diff --git a/.github/workflows/mises-a-jour.yml b/.github/workflows/mises-a-jour.yml new file mode 100644 index 0000000..52e1845 --- /dev/null +++ b/.github/workflows/mises-a-jour.yml @@ -0,0 +1,39 @@ +name: Mises à jour amont + +# Issue #766 : chaque semaine (et à la demande), compare le commit importé de +# chaque dissecteur (README, tableau « Import ») à la pointe de sa source git +# et publie le rapport dans le résumé du job et en artefact. Non bloquant : +# rien n'est importé automatiquement, chaque mise à jour reste une PR +# d'import relue (convention #563). Procédure : docs/maintenance.md. + +"on": + schedule: + - cron: "17 5 * * 1" # lundi, 5 h 17 UTC + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + rapport: + name: "Rapport des mises à jour amont" + runs-on: ${{ fromJSON(vars.RUNS_ON_LINUX || '{"group":"maison","labels":["self-hosted","linux"]}') }} + timeout-minutes: 30 + steps: + - uses: actions/checkout@v7 + + - name: Interrogation des sources (git ls-remote) + run: | + python3 scripts/verifier_mises_a_jour.py --sortie rapport-mises-a-jour.md + cat rapport-mises-a-jour.md >> "$GITHUB_STEP_SUMMARY" + + - name: Artefact du rapport + uses: actions/upload-artifact@v4 + with: + name: rapport-mises-a-jour + path: rapport-mises-a-jour.md + retention-days: 30 diff --git a/README.md b/README.md index 5d0640b..5ceb285 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ Un sous-dossier par dissecteur dans `dissectors//` : les fichiers Lua importés tels quels de l'amont (en-tête SPDX + provenance ajouté), plus un `README.md` d'import (source, commit, licence amont, utilisation). +Les amonts sont suivis par `scripts/verifier_mises_a_jour.py`, avec un +rapport hebdomadaire (workflow « Mises à jour amont »). La procédure de mise +à jour est décrite dans [docs/maintenance.md](docs/maintenance.md) (#766). + ## Licence [GPL-3.0-or-later](LICENSE) — Wireshark lui-même est en GPL-2.0-or-later, diff --git a/dissectors/aeronautical-airbus-cyber/COPYING b/dissectors/aeronautical-airbus-cyber/COPYING new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/aeronautical-airbus-cyber/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/aeronautical-airbus-cyber/LICENSE b/dissectors/aeronautical-airbus-cyber/LICENSE new file mode 100644 index 0000000..da38d69 --- /dev/null +++ b/dissectors/aeronautical-airbus-cyber/LICENSE @@ -0,0 +1,16 @@ +Aeronautical Wireshark Plugin + +Copyright (C) 2023 Airbus CyberSecurity SAS + +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 3 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, see . diff --git a/dissectors/aeronautical-airbus-cyber/README.md b/dissectors/aeronautical-airbus-cyber/README.md new file mode 100644 index 0000000..7ea0ba3 --- /dev/null +++ b/dissectors/aeronautical-airbus-cyber/README.md @@ -0,0 +1,83 @@ +# ARINC 429 et signaux discrets (Airbus CyberSecurity) + +Deux dissecteurs Wireshark Lua d'Airbus CyberSecurity pour les captures +avioniques au format PCAPNG (issue #539) : + +- `a429` décode le mot ARINC 429 de 32 bits sur la couche de liaison 147 + (`USER_DLT0`) : label en octal, avec ses bits inversés, SDI, SSM, + données sur 19 bits et parité ; +- `discrete` décode la valeur d'un signal discret sur la couche de + liaison 148 (`USER_DLT1`). + +Dans les deux cas, le nom du canal suit la valeur. C'est une chaîne +terminée par un octet nul, placée dans la colonne Source. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/airbus-cyber/Aeronautical-Wireshark-Plugin (`cyber_a429.lua`, `cyber_discrete.lua`, `pcapng_files/`) | +| Commit importé | `6185ec4519dd50890bffe15973ac5b89a0f19344` du 09/01/2025 (dernier commit de `main`) ; dernière modification des scripts, des captures et des licences : commit `e309db5d7cb5e8ae120f2c47dbf9e8ac2585ef09` du 26/03/2024 | +| Licence amont | GPL-3.0-or-later. L'en-tête de chaque script, le `LICENSE` amont et le README amont portent tous « either version 3 of the License, or (at your option) any later version », © 2023 Airbus CyberSecurity SAS. `COPYING` amont contient le texte de la GPLv3. GitHub affiche « NOASSERTION » faute de reconnaître le `LICENSE` court. Identique à la licence de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur ARINC 429 ni discret dans `tshark -G protocols` (seul `a615a`, ARINC 615A, sans rapport) | + +Textes de licence : `COPYING` (GPLv3) et `LICENSE` (avis de licence), +copies conformes des fichiers amont. Les scripts sont repris tels quels +(aucune modification de code) ; seule l'en-tête de provenance de cinq +lignes est ajoutée en tête de chacun (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/cyber_a429.lua` | Protocole `a429` (« ARINC 429 », ligne 23), champs `A429.WORD`, `A429.LABEL`, `A429.SDI`, `A429.SSM`, `A429.DATA`, `A429.PARITY` ; dissecteur ligne 87 | +| `src/cyber_discrete.lua` | Protocole `discrete` (« DISCRETE », ligne 23), champ `DISCRETE.VALUE` ; dissecteur ligne 54 | +| `captures/arinc429_broadcast.pcapng` | Capture amont `pcapng_files/arinc429_broadcast.pcapng` (140 octets, 2 mots ARINC 429, canal « RX3 », USER 0) | +| `captures/discrete.pcapng` | Capture amont `pcapng_files/discrete.pcapng` (212 octets, 3 valeurs discrètes, canal « DS1 », USER 1) | + +## Utilisation + +Copier les deux scripts de `src/` dans le dossier des plugins Lua +personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »). +Il faut ensuite associer les couches de liaison utilisateur, soit dans +« Préférences › Protocols › DLT_USER » (`User 0 (DLT=147)` → `a429`, +`User 1 (DLT=148)` → `discrete`), soit avec le fichier `user_dlts` du +dépôt amont, soit en ligne de commande : + +``` +tshark -o 'uat:user_dlts:"User 0 (DLT=147)","a429","0","","0",""' \ + -o 'uat:user_dlts:"User 1 (DLT=148)","discrete","0","","0",""' \ + -r captures/arinc429_broadcast.pcapng +``` + +Filtres : `a429`, `A429.LABEL == 0136`, `discrete`, `DISCRETE.VALUE`. + +## Vérification à l'import + +`luac5.4 -p` : OK pour les deux scripts. tshark 4.6.4, chargés par `-X +lua_script:`, puis copiés dans le dossier des plugins, avec l'association +DLT 147/148 : aucun message au chargement. Le README amont annonce +pourtant Wireshark < 4.3 et Lua 5.2 : le `require("bit")` de la ligne 50 +de `cyber_a429.lua` trouve la bibliothèque BitOp intégrée à Wireshark. + +| Essai | Résultat | +|---|---| +| `captures/arinc429_broadcast.pcapng` | 2 mots décodés, Source « RX3 » ; sortie `-T fields` identique à `test/a429_broadcast.output` amont (labels 94 et 35, mots `0x4700007a` et `0xc80001c4`, SDI, SSM, données, parité) | +| `captures/discrete.pcapng` | 3 valeurs décodées, Source « DS1 » ; sortie identique à `test/discrete.output` amont (`0x00000000`, `0x00000001`, `0x00000001`) | +| Capture synthétique DLT 147 : mot seul (4 octets) et mot suivi de « RX1 » sans octet nul | mot décodé, colonne Source vide | +| Capture synthétique DLT 147 : 2 octets | **erreur Lua** ligne 83 de `cyber_a429.lua`, ou ligne 49 de `cyber_discrete.lua` quand les deux scripts sont chargés (`Range is out of bounds`) | + +## Limites constatées + +- Les deux scripts définissent les mêmes fonctions globales + (`_get_string_length`, `_set_source_column_value`). Le second chargé + remplace celles du premier. Elles sont équivalentes, donc sans effet + visible, mais les erreurs sont alors signalées dans l'autre fichier. + Les champs `WORD`, `LABEL`, `VALUE`, etc. sont aussi globaux. +- Pas de contrôle de longueur : une trame de moins de 4 octets provoque + une erreur Lua. +- Le nom du canal n'est pris que s'il se termine par un octet nul. +- Le label et les champs sont décodés, mais les données ne sont pas + interprétées selon le label (pas de table d'équipements ni d'unités + BNR/BCD). +- Sans l'association DLT 147/148, rien n'est décodé. diff --git a/dissectors/aeronautical-airbus-cyber/captures/arinc429_broadcast.pcapng b/dissectors/aeronautical-airbus-cyber/captures/arinc429_broadcast.pcapng new file mode 100644 index 0000000..bb1acd6 Binary files /dev/null and b/dissectors/aeronautical-airbus-cyber/captures/arinc429_broadcast.pcapng differ diff --git a/dissectors/aeronautical-airbus-cyber/captures/discrete.pcapng b/dissectors/aeronautical-airbus-cyber/captures/discrete.pcapng new file mode 100644 index 0000000..32b9d7f Binary files /dev/null and b/dissectors/aeronautical-airbus-cyber/captures/discrete.pcapng differ diff --git a/dissectors/aeronautical-airbus-cyber/src/cyber_a429.lua b/dissectors/aeronautical-airbus-cyber/src/cyber_a429.lua new file mode 100644 index 0000000..176e8ad --- /dev/null +++ b/dissectors/aeronautical-airbus-cyber/src/cyber_a429.lua @@ -0,0 +1,93 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/airbus-cyber/Aeronautical-Wireshark-Plugin (cyber_a429.lua), +-- commit 6185ec4519dd50890bffe15973ac5b89a0f19344 du 09/01/2025 (dernière modification du fichier : +-- commit e309db5d7cb5e8ae120f2c47dbf9e8ac2585ef09 du 26/03/2024). +-- Licence amont : GPL-3.0-or-later (en-tête du fichier, LICENSE et COPYING amont) — voir README.md et COPYING. +-- This file is part of Aeronautical Wireshark Plugin. +-- +-- Copyright (C) 2023 Airbus CyberSecurity SAS +-- +-- Aeronautical Wireshark Plugin 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 3 of the License, +-- or (at your option) any later version. +-- +-- Aeronautical Wireshark Plugin 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 +-- Aeronautical Wireshark Plugin. If not, see . + +a429_protocol = Proto("a429", "ARINC 429") +WORD = ProtoField.uint32("A429.WORD","Word value", base.HEX) +LABEL = ProtoField.uint8("A429.LABEL","Label", base.OCT) +SDI = ProtoField.uint8("A429.SDI","SDI", base.HEX) +SSM = ProtoField.uint8("A429.SSM","SSM", base.HEX) +DATA = ProtoField.uint32("A429.DATA","Data", base.HEX) +PARITY = ProtoField.uint8("A429.PARITY","Parity", base.DEC) +a429_protocol.fields = {WORD, LABEL, SDI, SSM, DATA, PARITY} + +function _get_string_length(buffer, start, max) + local string_length = 0 + for i = start, max - 1, 1 do + if (buffer(i,1):le_uint() == 0) then + -- +1 to include the \0 + string_length = i - start + 1 + break + end + end + return string_length +end + +function _create_word_subtree(buffer, tree) + local broadcast_word_subtree = tree:add(a429_protocol, buffer(), "Broadcast word") + + local word = buffer(0,4):uint() + broadcast_word_subtree:add(WORD, word) + + local bit = require("bit") + + local label_byte = bit.band(word, 0xff) + label_byte = bit.bor(bit.rshift(bit.band(label_byte, bit.lshift(1, 7)), 7), + bit.rshift(bit.band(label_byte, bit.lshift(1, 6)), 5), + bit.rshift(bit.band(label_byte, bit.lshift(1, 5)), 3), + bit.rshift(bit.band(label_byte, bit.lshift(1, 4)), 1), + bit.lshift(bit.band(label_byte, bit.lshift(1, 3)), 1), + bit.lshift(bit.band(label_byte, bit.lshift(1, 2)), 3), + bit.lshift(bit.band(label_byte, bit.lshift(1, 1)), 5), + bit.lshift(bit.band(label_byte, 1), 7)) + broadcast_word_subtree:add(LABEL, label_byte) + + local sdi = bit.rshift(word, 8) + sdi = bit.band(sdi, 3) + broadcast_word_subtree:add(SDI, sdi) + + local ssm = bit.rshift(word, 29) + ssm = bit.band(ssm, 3) + broadcast_word_subtree:add(SSM, ssm) + + local data = bit.rshift(word, 10) + data = bit.band(data, 0x3ffff) + broadcast_word_subtree:add(DATA, data) + + local parity = bit.rshift(word, 31) + parity = bit.band(parity, 1) + broadcast_word_subtree:add(PARITY, parity) +end + +function _set_source_column_value(buffer, offset, pinfo, tree) + local buffer_length = buffer:len() + local channel_name_length = _get_string_length(buffer, offset, buffer_length) + local channel_name = buffer(offset, channel_name_length) + pinfo.cols.src = channel_name:string() +end + +function a429_protocol.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = a429_protocol.name + + _set_source_column_value(buffer, 4, pinfo, tree) + + _create_word_subtree(buffer, tree) +end diff --git a/dissectors/aeronautical-airbus-cyber/src/cyber_discrete.lua b/dissectors/aeronautical-airbus-cyber/src/cyber_discrete.lua new file mode 100644 index 0000000..ad2d98e --- /dev/null +++ b/dissectors/aeronautical-airbus-cyber/src/cyber_discrete.lua @@ -0,0 +1,60 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/airbus-cyber/Aeronautical-Wireshark-Plugin (cyber_discrete.lua), +-- commit 6185ec4519dd50890bffe15973ac5b89a0f19344 du 09/01/2025 (dernière modification du fichier : +-- commit e309db5d7cb5e8ae120f2c47dbf9e8ac2585ef09 du 26/03/2024). +-- Licence amont : GPL-3.0-or-later (en-tête du fichier, LICENSE et COPYING amont) — voir README.md et COPYING. +-- This file is part of Aeronautical Wireshark Plugin. +-- +-- Copyright (C) 2023 Airbus CyberSecurity SAS +-- +-- Aeronautical Wireshark Plugin 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 3 of the License, +-- or (at your option) any later version. +-- +-- Aeronautical Wireshark Plugin 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 +-- Aeronautical Wireshark Plugin. If not, see . + +discrete_protocol = Proto("discrete", "DISCRETE") +VALUE = ProtoField.uint32("DISCRETE.VALUE","Value", base.HEX) +discrete_protocol.fields = {VALUE} + +function _get_string_length(buffer, start, max) + local string_length = 0 + for i = start, max - 1, 1 do + if (buffer(i,1):le_uint() == 0) then + -- +1 to include the \0 + string_length = i - start + 1 + break + end + end + return string_length +end + +function _create_data_subtree(buffer, tree) + local data_subtree = tree:add(discrete_protocol, buffer(), "Data") + + local value = buffer(0,4):uint() + data_subtree:add(VALUE, value) +end + +function _set_source_column_value(buffer, offset, pinfo) + local buffer_length = buffer:len() + local channel_name_length = _get_string_length(buffer, offset, buffer_length) + local channel_name = buffer(offset, channel_name_length) + + pinfo.cols.src = channel_name:string() +end + +function discrete_protocol.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = discrete_protocol.name + + _set_source_column_value(buffer, 4, pinfo) + + _create_data_subtree(buffer, tree) +end diff --git a/dissectors/afedri-ve3nea/LICENSE b/dissectors/afedri-ve3nea/LICENSE new file mode 100644 index 0000000..73f8a86 --- /dev/null +++ b/dissectors/afedri-ve3nea/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Alex Shovkoplyas + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/afedri-ve3nea/README.md b/dissectors/afedri-ve3nea/README.md new file mode 100644 index 0000000..049ea6e --- /dev/null +++ b/dissectors/afedri-ve3nea/README.md @@ -0,0 +1,80 @@ +# Afedri SDR — protocoles de commande (TCP) et d'échantillons I/Q (UDP) + +Dissecteur Wireshark Lua des récepteurs de radio logicielle Afedri +(SDR-Net, SDR-IP, AFE822x), écrit par Alex Shovkoplyas (VE3NEA). Deux +protocoles sur le port 50000 : + +- `afedri` (TCP) : messages de commande, au format « NET » (élément de + contrôle : fréquence, état du récepteur, gain RF, débit + d'échantillonnage, taille des paquets…) ou au format « HID » + (commandes génériques du micrologiciel, avec arguments et réponses) ; +- `afedri-iq` (UDP) : paquets d'échantillons I/Q 16 ou 24 bits (en-tête, + numéro de séquence, premiers échantillons) (issue #950). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/VE3NEA/Afedri-Dissector (`afedri.lua`) | +| Commit importé | `c05ac838f6bd06ae69ddade3d33bfdcd0c9767c3` du 05/09/2018 (dernier commit de la branche par défaut `master`, qui est aussi la dernière modification du fichier) | +| Licence amont | MIT : `LICENSE` du dépôt (© 2018 Alex Shovkoplyas) ; l'en-tête du script porte le même copyright, sans nom de licence | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur Afedri dans `tshark -G protocols` | + +Texte de la licence : fichier `LICENSE` de ce dossier (copie conforme +du `LICENSE` amont). Le fichier est repris tel quel (aucune +modification ; fins de ligne CRLF conservées) ; seule l'en-tête de +provenance de cinq lignes est ajoutée en tête de `afedri.lua` +(convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/afedri.lua` | Protocoles `afedri-iq` et `afedri` (lignes 22 et 23, variables globales) ; dissecteurs UDP (ligne 26) et TCP (ligne 35) ; éléments de contrôle (ligne 201) ; en-têtes UDP (ligne 226) ; commandes HID (ligne 273) ; décodage des types de paramètres (lignes 381 à 528) ; inscription sur TCP et UDP 50000 (lignes 582 et 585) | + +## Utilisation + +Copier `src/afedri.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`), ou le charger par +`-X lua_script:afedri.lua`. Le trafic des ports TCP et UDP 50000 est +décodé. Le script n'a pas de champs filtrables : seuls `afedri` et +`afedri-iq` peuvent servir de filtres. Voir les limites : la partie +TCP ne fonctionne pas avec Wireshark 4.6.4. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, par `-X lua_script:` et dans le +dossier des plugins : chargement sans erreur, protocoles `afedri` et +`afedri-iq` présents dans `tshark -G protocols`. Le dépôt amont ne +contient aucune capture. Essais sur deux captures synthétiques (UDP et +TCP 50000), non commitées : + +| Essai | Résultat | +|---|---| +| UDP, en-tête 0x8404, 1028 octets, 256 couples 16 bits | « header: 0x8404 (16-Bit data, large packet) », « sequence number: 1 », « I/Q data, 256 2x16-bit samples », 16 premiers couples puis « ... » | +| UDP, en-tête 0x8484, 388 octets | « 24-Bit data, small packet », « 64 2x24-bit samples » en hexadécimal | +| UDP, en-tête inconnu 0x1234, 104 octets, seul dans la capture | Erreur Lua « attempt to perform arithmetic on a nil value (global 'width') » (ligne 506) | +| Même paquet après un paquet 24 bits | Décodé avec la largeur du paquet précédent : « 16 2x24-bit samples » | +| TCP : SET_CONTROL_ITEM fréquence, état du récepteur, HID débit, réponse HID version | Erreur Lua « attempt to index a nil value (global 'bit32') » (ligne 42) sur chaque message | +| TCP, copie d'essai non commitée précédée d'une fonction `bit32.extract` | « CI_FREQUENCY », « frequency: 7,074,000 Hz » ; « RCV_START » ; « HID_GENERIC_SET_SAMPLE_RATE_COMMAND », « sampling rate: 192,000 Hz » ; « firmware version: 291 (0x0123) » | + +## Limites constatées + +- Le dissecteur TCP appelle `bit32.extract` (lignes 42, 43 et 458) : la + bibliothèque `bit32` de Lua 5.2 n'existe pas dans Wireshark 4.6.4 + (Lua 5.4), et chaque message de commande provoque une erreur. Seul le + protocole UDP des échantillons fonctionne tel quel. +- La largeur des échantillons est une variable globale (`width`, + lignes 503 et 504), fixée seulement pour les quatre tailles de paquet + connues : pour une autre taille, elle reste celle du paquet + précédent, ou provoque une erreur s'il n'y en a pas. +- Toutes les fonctions et tables sont globales (`subtree`, `look_up`, + `Gain`, `Frequency`…), ce qui peut entrer en conflit avec d'autres + scripts. +- Aucun champ filtrable : les valeurs sont ajoutées comme texte. +- Pas de réassemblage TCP : plusieurs messages dans un même segment ne + sont pas séparés. +- La commande HID 24 (`HID_GENERIC_SAVE_DST_IP_ADDRESS`, ligne 353) + déclare son argument comme un octet, avec une étiquette mal placée. +- L'adresse MAC est reconstituée à partir de deux octets seulement + (ligne 402), selon une convention propre à l'auteur. diff --git a/dissectors/afedri-ve3nea/src/afedri.lua b/dissectors/afedri-ve3nea/src/afedri.lua new file mode 100644 index 0000000..7e4e157 --- /dev/null +++ b/dissectors/afedri-ve3nea/src/afedri.lua @@ -0,0 +1,585 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/VE3NEA/Afedri-Dissector (afedri.lua), +-- commit c05ac838f6bd06ae69ddade3d33bfdcd0c9767c3 du 05/09/2018 (dernière modification du fichier : +-- commit c05ac838f6bd06ae69ddade3d33bfdcd0c9767c3 du 05/09/2018). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +---------------------------------------------------------------------------------------------------- +-- WireShark dissector for the Aftedri SDR radio protocol +---------------------------------------------------------------------------------------------------- + +-- Copyright (c) 2018 Alex Shovkoplyas VE3NEA + + +-- to install the dissector, just put this file in the WireShark plugins folder, +-- e.g., C:\Program Files (x86)\Wireshark\plugins\2.4.1 + + + + +---------------------------------------------------------------------------------------------------- +-- dissector +---------------------------------------------------------------------------------------------------- +afedri_udp_protocol = Proto("Afedri-IQ", "Afedri UDP Data Protocol") +afedri_tcp_protocol = Proto("Afedri", "Afedri TCP Control Protocol") + + +function afedri_udp_protocol.dissector(buffer, pinfo, tree) + if buffer:len() < 4 then return end + pinfo.cols.protocol = afedri_udp_protocol.name + subtree = tree:add(afedri_udp_protocol, buffer(), "Afedri Protocol Data") + UdpHeader.dissect(buffer(0, 2)) + Word.dissect(buffer(2, 2), "sequence number") + IqSamples.dissect(buffer(4, buffer:len()-4)) +end + +function afedri_tcp_protocol.dissector(buffer, pinfo, tree) + if buffer:len() < 4 then return end + pinfo.cols.protocol = afedri_tcp_protocol.name + subtree = tree:add(afedri_tcp_protocol, buffer(), "Afedri Protocol Data") + + --common to all formats + local word = buffer(0,2):le_uint() + local message_size = bit32.extract(word, 0, 13) + local message_type = bit32.extract(word, 13, 3) + subtree:add(buffer(0,2), "message size: " .. message_size) + subtree:add(buffer(1,1), "message type: " .. message_type .. " (" .. look_up(message_type, MessageTypes) .. ")") + + --net format + if (message_type == SET_CONTROL_ITEM) or (message_type == REQUEST_CONTROL_ITEM) then + pinfo.cols.protocol = afedri_tcp_protocol.name .. "-NET" + dissect_net_message(buffer) + + --hid format + elseif message_type == TCP_HID_PACKET then + pinfo.cols.protocol = afedri_tcp_protocol.name .. "-HID" + dissect_hid_message(buffer) + end +end + +function dissect_net_message(buffer) + local control_item = ControlItem.dissect(buffer(2,2)) + + if control_item == CI_FREQUENCY then + Channel.dissect(buffer(4,1)) + Frequency.dissect(buffer(5,4)) + + elseif control_item == CI_RECEIVER_STATE then + ReceiverState.dissect(buffer(5,1)) + + elseif control_item == CI_RF_GAIN then + Channel.dissect(buffer(4,1)) + Gain.dissect(buffer(5,1)) + + elseif control_item == CI_DDC_SAMPLE_RATE then + Frequency.dissect(buffer(5,4), "sampling rate") + + elseif control_item == CI_SAMPLE_RATE_CALIBRATION then + -- if len=4, no args + if buffer:len() == 9 then Frequency.dissect(buffer(5,4), "clock rate") end + + elseif control_item == CI_DATA_PACKET_SIZE then + PacketSize.dissect(buffer(4,1)) + + else + RawData.dissect(buffer(4, buffer:len()-4)) + end +end + +function dissect_hid_message(buffer) + local hid_command_type = HidCommandType.dissect(buffer(2,1)) + + if (hid_command_type == HID_FREQUENCY_REPORT) or (hid_command_type == HID_FREQUENCY_REPLY) then + Frequency.dissect(buffer(3,4)) + Channel.dissect(buffer(7,1)) + + elseif hid_command_type == HID_GENERIC_REPORT + then dissect_hid_request(buffer, subtree) + + elseif hid_command_type == HID_GENERIC_REPLY + then dissect_hid_reply(buffer) + end +end + +function dissect_hid_request(buffer) + local hid_command = HidCommand.dissect(buffer(3,1)) + local cmd = HidCommands[hid_command] + local start_pos = 4 + + if cmd ~= nil then + if cmd.arg1 ~= nil then + cmd.arg1.type.dissect(buffer(start_pos, cmd.arg1.type.length), cmd.arg1.label) + start_pos = start_pos + cmd.arg1.type.length + end + if cmd.arg2 ~= nil then + cmd.arg2.type.dissect(buffer(start_pos, cmd.arg2.type.length), cmd.arg2.label) + end + else + RawData.dissect(buffer(start_pos, buffer:len()-start_pos)) + end +end + +function dissect_hid_reply(buffer) + local hid_command = HidCommand.dissect(buffer(3,1)) + local cmd = HidCommands[hid_command] + + if (cmd ~= nil) and (cmd.ret ~= nil) then + cmd.ret.type.dissect(buffer(4, cmd.ret.type.length), cmd.ret.label) + else + DWord.dissect(buffer(4,4)) + end +end + + + + +---------------------------------------------------------------------------------------------------- +-- readonly data +---------------------------------------------------------------------------------------------------- + +--parameter types + +Gain = {length = 1} +Frequency = {length = 4} +IpAddress = {length = 4} +MacAddress = {length = 2} +ControlItem = {length = 2} +HidCommand = {length = 1} +HidCommandType = {length = 1} +OnOff = {length = 1} +Channel = {length = 1} +MultiChannelMode = {length = 1} +PacketSize = {length = 1} +ReceiverState = {length = 1} +InitStatus = {length = 1} +SdrModel = {length = 1} +Bits = {length = 1} +Char = {length = 1} +Byte = {length = 1} +Word = {length = 2} +DWord = {length = 4} +RawData = {length = 5} +IqSamples = {length = 4} +UdpHeader = {length = 2} + + +--constants + +SET_CONTROL_ITEM = 0 +REQUEST_CONTROL_ITEM = 1 +TCP_HID_PACKET = 7 + +HID_MEMORY_READ_WRITE_REPORT = 1 +HID_GENERIC_REPORT = 2 +HID_FREQUENCY_REPORT = 3 +HID_GENERIC_REPLY = 6 +HID_FREQUENCY_REPLY = 7 + +CI_FREQUENCY = 0x0020 +CI_RECEIVER_STATE = 0x0018 +CI_RF_GAIN = 0x0038 +CI_SAMPLE_RATE_CALIBRATION = 0x00B0 +CI_DDC_SAMPLE_RATE = 0x00B8 +CI_DATA_PACKET_SIZE = 0x00C4 + + +--lookup tables + +MessageTypes = { + [SET_CONTROL_ITEM] = "SET_CONTROL_ITEM", + [REQUEST_CONTROL_ITEM] = "REQUEST_CONTROL_ITEM", + [TCP_HID_PACKET] = "TCP_HID_PACKET" +} + +HidCommandTypes = { + [HID_MEMORY_READ_WRITE_REPORT] = "HID_MEMORY_READ_WRITE_REPORT", + [HID_GENERIC_REPORT] = "HID_GENERIC_REPORT", + [HID_FREQUENCY_REPORT] = "HID_FREQUENCY_REPORT", + [HID_GENERIC_REPLY] = "HID_GENERIC_REPLY", + [HID_FREQUENCY_REPLY] = "HID_FREQUENCY_REPLY" +} + +ControlItems = { + [0x0001] = "CI_TARGET_NAME", + [0x0002] = "CI_TARGET_SERIAL_NUMBER", + [0x0003] = "CI_INTERFACE_VERSION", + [0x0004] = "CI_HW_FW_VERSION", + [0x0005] = "CI_STATUS_ERROR_CODE", + [0x0009] = "CI_PRODUCT_ID", + [0x0018] = "CI_RECEIVER_STATE", + [0x0020] = "CI_FREQUENCY", + [0x0038] = "CI_RF_GAIN", + [0x0048] = "CI_AF_GAIN", + [0x0044] = "CI_RF_FILTER_SELECT", + [0x008A] = "CI_AD_MODES", + [0x00B4] = "CI_INPUT_SYNC_MODES", + [0x00B8] = "CI_DDC_SAMPLE_RATE", + [0x00B0] = "CI_SAMPLE_RATE_CALIBRATION", --read clock frequency + [0x00D0] = "CI_CALIBRATION_DATA", + [0x00B6] = "CI_PULSE_OUTPUT_MODE", + [0x012A] = "CI_DA_OUTPUT_MODE", + [0x00C4] = "CI_DATA_PACKET_SIZE", + [0x00C5] = "CI_UDP_IP_PORT", + [0x0200] = "CI_RS232_OPEN", + [0x0201] = "CI_RS232_CLOSE" +} + +UdpHeaders = { + [0x8404] = "16-Bit data, large packet", + [0x8204] = "16-Bit data, small packet", + [0x85A4] = "24-Bit data, large packet", + [0x8484] = "24-Bit data, small packet" +} + +OnOffValues = { + [0] = "OFF", + [1] = "ON" +} + +Channels = { + [0] = "AFEDRI_CH1", + [2] = "AFEDRI_CH2", + [3] = "AFEDRI_CH3", + [4] = "AFEDRI_CH4" +} + +MultiChannelModes = { + [0] = "DUAL_CHANNEL_MODE_OFF", + [1] = "DIVERSITY_MODE", + [2] = "DUAL_CHANNEL_MODE", + [3] = "DIVERSITY_INTERNAL_ADD_MODE", + [4] = "QUAD_DIVERSITY_MODE", + [5] = "QUAD_CHANNEL_MODE" +} + +SdrModels = { + [0] = "'AFEDRI SDR-Net'", + [1] = "'SDR-IP'", + [2] = "'AFE822x SDR-Net'" +} + +PacketSizes = { + [0] = "Large, 1028 or 1444 bytes", + [1] = "Small, 515 or 388 bytes" +} + +ReceiverStates = { + [1] = "RCV_STOP", + [2] = "RCV_START" +} + + +--hid commands + +HidCommands = { + --only as return value in ACK message + [3] = {name = "HID_FREQUENCY_REPORT"}, + --only SDR to PC + [27] = {name = "HID_GENERIC_OVERLAOD_STATE"}, -- bug in mainwindow.cpp, return type unknown + [28] = {name = "HID_GENERIC_ACK", ret = {type = HidCommand, label = "reply to"}}, + --no args + [9] = {name = "HID_GENERIC_VER_COMMAND", ret = {type = Word, label = "firmware version"}}, + [14] = {name = "HID_GENERIC_GET_SR_COMMAND", ret = {type = Frequency, label = "sampling rate"}}, + [15] = {name = "HID_GENERIC_GET_DIVERSITY_MODE", ret = {type = MultiChannelMode}}, + [16] = {name = "HID_GENERIC_GET_SDR_IP_ADDRESS", ret = {type = IpAddress}}, + [17] = {name = "HID_GENERIC_GET_SDR_IP_MASK", ret = {type = IpAddress, label = "IP mask"}}, + [18] = {name = "HID_GENERIC_GET_GATEWAY_IP_ADDRESS", ret = {type = IpAddress, label = "gateway IP address"}}, + [19] = {name = "HID_GENERIC_GET_DST_IP_ADDRESS", ret = {type = IpAddress, label = "DSP IP address"}}, + [20] = {name = "HID_GENERIC_GET_DST_PORT", ret = {type = Word, label="port"}}, + [29] = {name = "HID_GENERIC_GET_SERIAL_NUMBER_COMMAND", ret = {type = DWord, label="serial number"}}, + [32] = {name = "HID_GENERIC_GET_VCO_COMMAND", ret = {type = Word, label = "VCO voltage"}}, + [34] = {name = "HID_GENERIC_GET_GAIN_TABLE_COMMAND", ret = {type = Word, label = "gain table"}}, + [36] = {name = "HID_GENERIC_SYNC_WORD_COMMAND", ret = {type = DWord, label="sync word"}}, + [37] = {name = "HID_GENERIC_HW_CPLD_SN_COMMAND", ret = {type = DWord, label="HW/CPLD version"}}, + [38] = {name = "HID_GENERIC_IAP_COMMAND"}, --firmware upgrade + [41] = {name = "HID_GENERIC_GET_BROADCAST_STATE_COMMAND", ret = {type = OnOff}}, + [43] = {name = "HID_GENERIC_GET_BYPASS_LPF_COMMAND", ret = {type = OnOff}}, + [51] = {name = "HID_GENERIC_GET_AFEDRI_ID_COMMAND", ret = {type = SdrModel}}, + [53] = {name = "HID_GENERIC_SOFT_RESET_COMMAND"}, + [54] = {name = "HID_GENERIC_GET_DHCP_STATE_COMMAND", ret = {type = OnOff}}, + [57] = {name = "HID_GENERIC_HW_CPLD2_SN_COMMAND", ret = {type = DWord, label="CPLD2 version"}}, + [63] = {name = "HID_GENERIC_GET_MAXIMUM_SR_COMMAND", ret = {type = Frequency, label = "sampling rate"}}, + [71] = {name = "HID_GENERIC_AGC_GET_STATE_COMMAND", ret = {type = Bits, label = "AGC on/off"}}, --todo: bit field + [73] = {name = "HID_GENERIC_GET_MULTISTREAM_MODE", ret = {type = OnOff}}, + [76] = {name = "HID_GENERIC_GET_DHCP_CLIENT_STATE_COMMAND", ret = {type = OnOff}}, + [91] = {name = "HID_GENERIC_GET_R820T_REF_FREQ_COMMAND", ret = {type = Frequency}}, + [93] = {name = "HID_GENERIC_GET_MAC_COMMAND", ret = {type = MacAddress}}, + --boolean arg + [11] = {name = "HID_GENERIC_HID_CONSOLE_ON", arg1 = {type = OnOff}}, + [26] = {name = "HID_GENERIC_START_UDP_STREAM_COMMAND", arg1 = {type = OnOff}}, + [40] = {name = "HID_GENERIC_BROADCAST_COMMAND", arg1 = {type = OnOff}}, + [42] = {name = "HID_GENERIC_BYPASS_LPF_COMMAND", arg1 = {type = OnOff}}, + [49] = {name = "HID_GENERIC_MULTICAST_COMMAND", arg1 = {type = OnOff}}, + [50] = {name = "HID_GENERIC_SET_AFEDRI_ID_COMMAND", arg1 = {type = SdrModel}}, + [52] = {name = "HID_GENERIC_SAVE_AFEDRI_ID_COMMAND", arg1 = {type = SdrModel}}, + [55] = {name = "HID_GENERIC_SET_DHCP_STATE_COMMAND", arg1 = {type = OnOff}}, + [72] = {name = "HID_GENERIC_SET_MULTISTREAM_MODE", arg1 = {type = MultiChannelMode}}, + [74] = {name = "HID_GENERIC_SAVE_MULTISTREAM_MODE", arg1 = {type = MultiChannelMode}}, + [75] = {name = "HID_SET_LED_ON_OFF", arg1 = {type = OnOff}}, + [77] = {name = "HID_GENERIC_SET_DHCP_CLIENT_STATE_COMMAND", arg1 = {type = OnOff}}, + [82] = {name = "HID_GENERIC_SET_R820T_LNA_AGC_COMMAND", arg1 = {type = OnOff}}, + [83] = {name = "HID_GENERIC_SET_R820T_MIXER_AGC_COMMAND", arg1 = {type = OnOff}}, + [87] = {name = "HID_GENERIC_SET_R820T_PWR_ON_COMMAND", arg1 = {type = OnOff}}, + --byte arg + [1] = {name = "HID_GENERIC_GET_FREQ_COMMAND", arg1 = {type = Channel}, ret = {type = Frequency}}, + [10] = {name = "HID_GENERIC_CONSOLE_IO_COMMAND", arg1 = {type = Char}, ret = {type = Char}}, + [0x55] = {name = "HID_READ_EEPROM_COMMAND", arg1 = {type = Byte, label = "address"}, ret = {type = Word, label = "EEPROM data"}}, + [68] = {name = "HID_GENERIC_SET_USB_MODE", arg1 = {type = Byte, label = "mode"}}, + [69] = {name = "HID_GENERIC_SET_OVR_MODE", arg1 = {type = Bits, label = "AGC on/off"}}, --todo: bit field + [70] = {name = "HID_GENERIC_AGC_LEVEL_COMMAND", arg1 = {type = Channel}}, + [79] = {name = "HID_GENERIC_SET_R820T_LNA_GAIN_COMMAND", arg1 = {type = Byte, label = "gain"}}, -- find out the format + [80] = {name = "HID_GENERIC_SET_R820T_MIXER_GAIN_COMMAND", arg1 = {type = Byte, label = "gain"}}, -- find out the format + [81] = {name = "HID_GENERIC_SET_R820T_VGA_GAIN_COMMAND", arg1 = {type = Byte, label = "gain"}}, -- find out the format + [84] = {name = "HID_GENERIC_SET_R820T_IF_BW_COMMAND", arg1 = {type = Byte, label = "bandwidth"}}, + [88] = {name = "HID_GENERIC_SET_R820T_HIGHPASS_BW_COMMAND", arg1 = {type = Byte, label = "low cutoff"}}, + [89] = {name = "HID_GENERIC_SET_R820T_LOWPASS_BW_COMMAND", arg1 = {type = Byte, label = "high cutoff"}}, + --byte + byte + [2] = {name = "HID_GENERIC_GAIN_COMMAND", arg1 = {type = Byte, label = "gain"}, arg2 = {type = Channel}}, -- for AFE822x should be 0 + [8] = {name = "HID_GENERIC_DAC_COMMAND", arg1 = {type = Gain}, arg2 = {type = Channel}}, -- rf gain, maps to dB + [48] = {name = "HID_GENERIC_SET_MULTICHANNEL_COMMAND", arg1 = {type = MultiChannelMode}, arg2 = {type = Channel}}, + --word + [31] = {name = "HID_GENERIC_SET_VCO_COMMAND", arg1 = {type = Word, label = "VCO voltage"}}, --(2048 + vco_voltage) + [33] = {name = "HID_GENERIC_SAVE_GAIN_TABLE_COMMAND", arg1 = {type = Word, label = "gain table"}}, --(gain_table) + [35] = {name = "HID_GENERIC_SET_BPF_COMMAND", arg1 = {type = Word}}, --(bpf_value) + --byte + word + [0x56] = {name = "HID_WRITE_EEPROM_COMMAND", arg1 = {type = Byte, label = "address"}, arg2 = {type = Word, label = "data"}}, + --word + byte + [56] = {name = "HID_GENERIC_SET_PHASE_SHIFT_COMMAND", arg1 = {type = Word, label = "phase"}, arg2 = {type = Channel}}, + --word + word + [39] = {name = "HID_GENERIC_WRITE_HWORD_TO_FLASH", arg1 = {type = Word, label = "address"}, arg2 = {type = Word, label = "data"}}, + --ip + [21] = {name = "HID_GENERIC_SAVE_SDR_IP_ADDRESS", arg1 = {type = IpAddress, label = "IP address"}}, + [22] = {name = "HID_GENERIC_SAVE_SDR_IP_MASK", arg1 = {type = IpAddress, label = "IP mask"}}, + [23] = {name = "HID_GENERIC_SAVE_GATEWAY_IP_ADDRESS", arg1 = {type = IpAddress, label = "IP gateway"}}, + [24] = {name = "HID_GENERIC_SAVE_DST_IP_ADDRESS", arg1 = {type = Byte, IpAddress = "dst IP address"}}, + --dword + [25] = {name = "HID_GENERIC_SAVE_DST_PORT", arg1 = {type = Word, label = "port"}}, --dword in mainwindow.cpp, should be word + [92] = {name = "HID_GENERIC_SAVE_MAC_COMMAND", arg1 = {type = MacAddress}, ret = {type = MacAddress}}, + [30] = {name = "HID_GENERIC_SET_SAMPLE_RATE_COMMAND", arg1 = {type = Frequency, label = "sampling rate"}}, + [78] = {name = "HID_GENERIC_SET_R820T_FREQ_COMMAND", arg1 = {type = Frequency, label = "frequency"}}, + [90] = {name = "HID_GENERIC_SAVE_R820T_REF_FREQ_COMMAND", arg1 = {type = Frequency, label = "frequency"}}, + --inverted command + [4] = {name = "HID_GENERIC_GET_INIT_STATUS_COMMAND", arg1 = {type = Byte, label = "inverted HID command"}, ret = {type = InitStatus}}, + [0xE1] = {name = "HID_GENERIC_INIT_FE_COMMAND", arg1 = {type = Byte, label = "inverted HID command"}}, + [12] = {name = "HID_GENERIC_SAVE_DEFAULT_PARAMS_COMMAND", arg1 = {type = Byte, label = "inverted HID command"}} + + + --unused HID commands: + --HID_GENERIC_I2C_SEND_COMMAND = 58 + --HID_GENERIC_I2C_READ_COMMAND = 59 + --HID_GENERIC_I2C_START_COND_COMMAND = 60 + --HID_GENERIC_I2C_STOP_COND_COMMAND = 61 + --HID_GENERIC_MULT_WRITE_JTAG_COMMAND = 62 + --HID_GENERIC_GET_MAIN_CLOCK_FREQ = 67 +} + + + + +---------------------------------------------------------------------------------------------------- +-- parameter dissectors +---------------------------------------------------------------------------------------------------- +function Gain.dissect(data, label) + if label == nil then label = "gain" end + local byte = data:le_int() + local gain = byte + if gain > 0 then gain = gain * 3/8 - 10 end + subtree:add(data, label .. ": " .. byte .. " (" .. gain .. " dB)") +end + +function Frequency.dissect(data, label) + if label == nil then label = "frequency" end + subtree:add(data, label .. ": " .. comma_value(data:le_uint()) .. " Hz") +end + +function IpAddress.dissect(data, label) + if label == nil then label = "IP address" end + local dword = data:le_uint() + ip = data(3,1):uint() .. "." .. data(2,1):uint() .. "." .. data(1,1):uint() .. "." .. data(0,1):uint(); + subtree:add(data, label .. ": " .. ip) +end + + +function MacAddress.dissect(data, label) + if label == nil then label = "MAC address" end + local byte1 = data(0,1):le_uint() + local byte2 = data(1,1):le_uint() + mac = string.format("0x%04X (82:2A:%02X:%02X:%02X:%02X)", data:le_uint(), byte2, byte1, byte2, byte1) + subtree:add(data, label .. ": " .. mac) +end + +function InitStatus.dissect(data, label) + if label == nil then label = "init status" end + local value = data:le_uint() + local str = "error" + if value == 0 then str = "success" end + subtree:add(data, label .. ": " .. value .. " (" .. str .. ")") +end + +function ControlItem.dissect(data, label) + return dissect_lookup(data, ControlItems, label, "control item") +end + +function HidCommand.dissect(data, label) + return dissect_lookup(data, HidCommands, label, "HID command") +end + +function HidCommandType.dissect(data, label) + return dissect_lookup(data, HidCommandTypes, label, "HID command type") +end + +function OnOff.dissect(data, label) + dissect_lookup(data, OnOffValues, label, "on/off") +end + +function Channel.dissect(data, label) + dissect_lookup(data, Channels, label, "channel") +end + +function MultiChannelMode.dissect(data, label) + dissect_lookup(data, MultiChannelModes, label, "mode") +end + +function PacketSize.dissect(data, label) + dissect_lookup(data, PacketSizes, label, "packet size") +end + +function ReceiverState.dissect(data, label) + dissect_lookup(data, ReceiverStates, label, "receiver state") +end + +function SdrModel.dissect(data, label) + dissect_lookup(data, SdrModels, label, "SDR model") +end + +function Bits.dissect(data, label) + if label == nil then label = "bits" end + local value = data:le_uint() + local str = "" + for i=data:len() * 8 - 1, 0, -1 do str = str .. string.char(0x30 + bit32.extract(value, i, 1)) .. " " end + subtree:add(data, label .. ": " .. str) +end + +function Char.dissect(data, label) + if label == nil then label = "char" end + local byte = data:le_uint() + subtree:add(data, label .. ": " .. string.format('%02X', byte) .. " ('" .. string.char(byte) .. "')") +end + +function Byte.dissect(data, label) + if label == nil then label = "8-bit value" end + local byte = data:le_uint() + subtree:add(data, label .. ": " .. byte .. " (0x" .. string.format('%02X', byte) .. ")") +end + +function Word.dissect(data, label) + if label == nil then label = "16-bit value" end + local word = data:le_uint() + subtree:add(data, label .. ": " .. word .. " (0x" .. string.format('%04X', word) .. ")") +end + +function DWord.dissect(data, label) + if label == nil then label = "32-bit value" end + local dword = data:le_uint() + subtree:add(data, label .. ": " .. dword .. " (0x" .. string.format('%08X', dword) .. ")") +end + +function RawData.dissect(data, label) + if data:len() == 0 then return end + if label == nil then label = "raw data" end + local str = "" + local count = data:len() + if count > 20 then count = 20 end + for i = 0, count-1 do str = str .. string.format('%02X ', data(i,1):uint()) end + if count < data:len() then str = str .. "..." end + subtree:add(data, label .. ": " .. str) +end + +function IqSamples.dissect(data, label) + local byte_count = data:len() + if byte_count < 4 then return end + if label == nil then label = "I/Q data" end + local str = " " + + if (byte_count == 1028-4) or (byte_count == 515-4) then width = 2 + elseif (byte_count == 1444-4) or (byte_count == 388-4) then width = 3 end + + local sample_count = math.floor(byte_count / (2 * width)) + local node = subtree:add(data, label .. string.format(", %d 2x%d-bit samples", sample_count, width * 8)) + + for i = 0, sample_count-1 do + str = str .. "(" .. sample(data(i*2*width, width)) .. ", " .. sample(data(i*2*width+width, width)) .. ")" + + if (i % 4) == 3 then + node:add(data((i-3)*2*width, 8 * width), str) + str = " " + if i == 15 then node:add(data((i+1)*2*width, (sample_count-i-1) * 2 * width), " ..."); break end + end + end + + if str ~= " " then node:add(data, str) end +end + +function UdpHeader.dissect(data, label) + if label == nil then label = "header" end + local value = data:le_uint() + local name = look_up(value, UdpHeaders) + subtree:add(data, label .. ": " .. string.format('0x%04X', value) .. " (" .. name .. ")") + return name ~= "Unknown" +end + + + + +---------------------------------------------------------------------------------------------------- +-- helper functions +---------------------------------------------------------------------------------------------------- +function look_up(value, table) + local result = table[value] + if type(result) == "table" then result = result.name end + if result == nil then result = "Unknown" end + return result +end + +function dissect_lookup(data, table, label, default_label) + if label == nil then label = default_label end + local value = data:le_uint() + local name = look_up(value, table) + subtree:add(data, label .. ": " .. value .. " (" .. name .. ")") + return value +end + +--found on the Internet +function comma_value(value) + local formatted = value + local k = 0 + while true do + formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') + if k == 0 then break end + end + return formatted + end + +function sample(data) + local v = data:le_int() + + --16-bit, dec format + if data:len() == 2 then return string.format('%6d', v) end + + --24-bit, hex format, helps to see zero padding + local str = string.format('+0x%06x', v) + if bit.band(v, 0x800000) ~= 0 then str = string.format('-0x%06x', 0x1000000 - v) end + return str +end + + + + + +---------------------------------------------------------------------------------------------------- +-- register dissector +---------------------------------------------------------------------------------------------------- +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(50000, afedri_tcp_protocol) + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(50000, afedri_udp_protocol) \ No newline at end of file diff --git a/dissectors/agwpe-mfncooper/LICENSE b/dissectors/agwpe-mfncooper/LICENSE new file mode 100644 index 0000000..326e654 --- /dev/null +++ b/dissectors/agwpe-mfncooper/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2025 Martin F N Cooper + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/agwpe-mfncooper/README.md b/dissectors/agwpe-mfncooper/README.md new file mode 100644 index 0000000..a88122c --- /dev/null +++ b/dissectors/agwpe-mfncooper/README.md @@ -0,0 +1,88 @@ +# AGWPE — interface TCP des modems paquets radio + +Dissecteur Wireshark Lua du protocole AGWPE (AGW Packet Engine) : +l'interface TCP par laquelle les applications de radio paquet (APRS, +BBS, Winlink…) pilotent un modem logiciel ou un TNC (AGWPE, Direwolf, +ldsped…). Le script décode l'en-tête de 36 octets (port, type de +données, PID, indicatifs émetteur et destinataire, longueur), distingue +requêtes et réponses selon le port du serveur, puis décode les données +de chaque type : connexion, version, ports, capacités, stations +entendues, trames surveillées, données connectées, digipéteurs, et +trames AX.25 brutes confiées au dissecteur AX.25 natif. TCP 8000 par +défaut (issue #946). Auteur : Martin F N Cooper, KD6YAM. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/mfncooper/dissect-agwpe (`agwpe.lua`, version 1.0.0) | +| Commit importé | `e499ba2e3023d956663b18f78d4c058ead65716e` du 13/07/2025 (dernier commit de la branche par défaut `main`, qui est aussi la dernière modification du fichier) | +| Licence amont | MIT : `LICENSE` du dépôt (© 2025 Martin F N Cooper) et en-tête du script (« License: MIT License ») | +| Natif Wireshark 4.6.4 | Non : AX.25 et KISS sont natifs, mais aucun dissecteur AGWPE dans `tshark -G protocols` | + +Texte de la licence : fichier `LICENSE` de ce dossier (copie conforme +du `LICENSE` amont). Le fichier est repris tel quel (aucune +modification) ; seule l'en-tête de provenance de cinq lignes est ajoutée +en tête de `agwpe.lua` (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/agwpe.lua` | Types de données côté client (ligne 47) et côté serveur (ligne 69) ; champs `agwpe.*` (ligne 87) ; décodage des données des requêtes (ligne 332) et des réponses (ligne 359) ; contrôle de l'en-tête (ligne 451) ; protocole `agwpe` (ligne 464) ; dissection d'une trame (ligne 476) ; réassemblage TCP (lignes 545 et 554) ; préférences (ligne 562) ; inscription sur TCP 8000 ligne 594 | + +## Utilisation + +Copier `src/agwpe.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`), ou le charger par +`-X lua_script:agwpe.lua`. Préférences (Protocols → AGWPE) : +`agwpe.server_port` (port du serveur, 8000 par défaut ; sert à +distinguer requêtes et réponses), `agwpe.strict_validation` (rejet des +en-têtes dont les octets réservés ne sont pas nuls, activé par défaut), +`agwpe.show_reserved`. Filtres : `agwpe`, `agwpe.kind`, +`agwpe.callfrom`, `agwpe.callto`, `agwpe.text_data`… + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, par `-X lua_script:` et dans le +dossier des plugins : chargement sans erreur. Le dépôt amont ne +contient aucune capture. Essais sur une capture synthétique (session +TCP vers le port 8000), non commitée, construite d'après la +[spécification AGWPE](https://www.on7lds.net/42/sites/default/files/AGWPEAPI.HTM) +citée par l'auteur : + +| Essai | Résultat | +|---|---| +| Requête et réponse `R` (version 2005.127) | « Major Version: 2005 » puis « Major Version: 127 » (la version mineure porte le nom de la majeure) | +| Réponse `G` « 2;Port1 Direwolf;Port2 TNC-Pi; » | « Port Count: 2 » et les deux noms de port | +| `X` (enregistrement d'indicatif) | « Registered: True (1) » | +| `M` (UNPROTO, PID 0xF0) | « Unproto Data: Bonjour APRS » | +| `U` (trame surveillée, « Len=12 ») | Texte d'en-tête jusqu'au `\r`, puis les 12 octets en « Binary » (le texte « Bonjour Hgn! » n'est pas affiché en clair) | +| `H` (station entendue avec deux SYSTEMTIME) | « First Heard: 2026-11-02 11:00:00 », « Last Heard: 2026-11-02 12:00:00 » | +| `g` (capacités du port) | Débit, TXDelay, persistance, etc., « Bytes Received: 12345 » | +| `K` (trame AX.25 brute APRS) | AX.25 natif : « Src: F4XYZ, Dst: APRS », UI | +| `v` (connexion par deux digipéteurs) | « Via 1: WIDE1-1 », « Via 2: WIDE2-1 » | +| `P` (connexion de l'application) | « User Id: utilisateur », « Password: motdepasse » (en clair, filtrable par `agwpe.password`) | +| Deux trames `y` et `Y` dans un même segment TCP | Deux arbres AGWPE | +| Octet réservé non nul | Trame laissée à TCP ; décodée avec `agwpe.strict_validation:FALSE` | + +## Limites constatées + +- La colonne Info n'est pas renseignée : elle garde le texte de TCP + (« 40000 → 8000 [PSH, ACK]… »). +- La version mineure de la réponse `R` est ajoutée au champ + `agwpe.version_major` (ligne 362) : le champ `agwpe.version_minor` + n'est jamais rempli. +- `add_port_info` lit la variable globale `header` (ligne 256), laissée + par `get_total_length`, au lieu de l'en-tête de la trame en cours ; + d'autres variables sont globales (`text`, `binary`, `port_len`, + `dissect_one`, `get_total_length`). +- Les données des trames surveillées (`I`, `S`, `U`, `T`) sont affichées + en octets bruts, sans décodage AX.25 ni texte. +- Le sens requête/réponse dépend uniquement du port du serveur + (ligne 488) ; une capture sur un autre port doit être déclarée dans + la préférence. +- Les champs des digipéteurs s'appellent `agwpe.var1` à `agwpe.var7` + (ligne 183), et non `agwpe.via1`… +- Le mot de passe de la requête `P` est affiché en clair (c'est le + protocole qui le transmet ainsi). diff --git a/dissectors/agwpe-mfncooper/src/agwpe.lua b/dissectors/agwpe-mfncooper/src/agwpe.lua new file mode 100644 index 0000000..3ae4db0 --- /dev/null +++ b/dissectors/agwpe-mfncooper/src/agwpe.lua @@ -0,0 +1,594 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/mfncooper/dissect-agwpe (agwpe.lua), +-- commit e499ba2e3023d956663b18f78d4c058ead65716e du 13/07/2025 (dernière modification du fichier : +-- commit e499ba2e3023d956663b18f78d4c058ead65716e du 13/07/2025). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- ============================================================================= +-- Copyright (c) 2025 Martin F N Cooper +-- +-- Author: Martin F N Cooper +-- License: MIT License +-- +-- Version: 1.0.0 +-- ============================================================================= + +--[[ + AGWPE Dissector for Wireshark + + A comprehensive dissector that shows the AGWPE header fields, and also the + associated data where present. + + Preferences: + + * Server port (default: 8000) + This is used to determine whether a frame is a request or response, which + in turn allows correct interpretation of the data kind field. This must + be set correctly for the dissector to work properly. + + * Strict validation (default: true) + When true, the reserved fields of a possible header are checked for + compliance with the AGWPE spec before dissecting and showing the header. + When false, reserved fields are ignored, which can be useful when working + with a non-compliant client or server. However, it can also lead to false + positives and incorrect identification of AGWPE frames. + + * Show reserved fields (default: false) + When true, every field in a header is shown, including the reserved + fields, which should always be zeroed out per the AGWPE spec. This can + be useful when Strict validation is disabled in order to examine the + details of a non-compliant header. +]] + +local PROTOCOL_NAME = "AGWPE" +local PROTOCOL_DESC = "AGWPE Protocol" +local FILTER_PREFIX = "agwpe." +local HEADER_LEN = 36 + +local DATAKIND_FROM_CLIENT = { + P = "Application Login", + X = "Register CallSign", + x = "Unregister CallSign", + G = "Ask Port Information", + m = "Enable Reception of Monitoring Frames", + R = "AGWPE Version Info", + g = "Ask Port Capabilities", + H = "Callsign Heard on a Port", + y = "Ask Outstanding frames waiting on a Port", + Y = "Ask Outstanding frames waiting for a connection", + M = "Send UNPROTO Information", + C = "Connect, Start an AX.25 Connection", + D = "Send Connected Data", + d = "Disconnect, Terminate an AX.25 Connection", + v = "Connect VIA, Start an AX.25 circuit thru digipeaters", + V = "Send UNPROTO VIA", + c = "Non-Standard Connections, Connection with PID", + K = "Send Data in 'raw' AX.25 format", + k = "Activate reception of Frames in 'raw' format" +} + +local DATAKIND_FROM_SERVER = { + R = "Version Number", + X = "Callsign Registration", + G = "Port Information", + g = "Capabilities of a Port", + y = "Frames Outstanding on a Port", + Y = "Frames Outstanding on a Connection", + H = "Heard Stations on a Port", + C = "AX.25 Connection Received", + D = "Connected AX.25 Data", + d = "Disconnect Completed", + I = "Monitored Connected Information", + S = "Monitored Supervisory Information", + U = "Monitored Unproto Information", + T = "Monitoring Own Information", + K = "Monitored Information in Raw Format" +} + +local FIELDS = { + -- + -- Generated direction field + -- + frametype = ProtoField.string(FILTER_PREFIX .. "frametype", + "Frame Type", base.ASCII), + -- + -- Header fields + -- + port = ProtoField.uint8(FILTER_PREFIX .. "port", + "AGWPE Port", base.DEC), + reserved_1 = ProtoField.bytes(FILTER_PREFIX .. "reserved_1", + "Reserved 1", base.SPACE), + datakind = ProtoField.string(FILTER_PREFIX .. "kind", + "DataKind", base.ASCII), + reserved_2 = ProtoField.uint8(FILTER_PREFIX .. "reserved_2", + "Reserved 2", base.HEX), + pid = ProtoField.uint8(FILTER_PREFIX .. "pid", + "Protocol ID", base.HEX), + reserved_3 = ProtoField.uint8(FILTER_PREFIX .. "reserved_3", + "Reserved 3", base.HEX), + callfrom = ProtoField.string(FILTER_PREFIX .. "callfrom", + "Call From", base.ASCII), + callto = ProtoField.string(FILTER_PREFIX .. "callto", + "Call To", base.ASCII), + datalen = ProtoField.uint32(FILTER_PREFIX .. "datalen", + "Data Length", base.DEC), + reserved_user = ProtoField.uint32(FILTER_PREFIX .. "reserved_user", + "Reserved User", base.DEC), + -- + -- Data fields + -- + -- Application login + userid = ProtoField.stringz(FILTER_PREFIX .. "userid", + "User Id", base.ASCII), + password = ProtoField.stringz(FILTER_PREFIX .. "password", + "Password", base.ASCII), + -- Version information + version_major = ProtoField.uint16(FILTER_PREFIX .. "version_major", + "Major Version", base.DEC), + version_minor = ProtoField.uint16(FILTER_PREFIX .. "version_minor", + "Minor Version", base.DEC), + -- Callsign registration + callsign_registered = ProtoField.uint8(FILTER_PREFIX .. "registered", + "Registered", base.DEC, {[0] = "False", [1] = "True"}), + -- Port information + port_count = ProtoField.uint16(FILTER_PREFIX .. "port_count", + "Port Count", base.DEC), + port_name = ProtoField.string(FILTER_PREFIX .. "port_name", + "Port Name", base.UNICODE), + -- Port capabilities + pc_baud_rate = ProtoField.uint8(FILTER_PREFIX .. "baud_rate", + "Baud Rate", base.DEC, + {[0] = "1200", [1] = "2400", [2] = "4800", [3] = "9600"}), + pc_traffic_level = ProtoField.uint8(FILTER_PREFIX .. "traffic_level", + "Traffic Level", base.HEX), + pc_tx_delay = ProtoField.uint16(FILTER_PREFIX .. "tx_delay", + "TX Delay", base.DEC), + pc_tx_tail = ProtoField.uint16(FILTER_PREFIX .. "tx_tail", + "TX Tail", base.DEC), + pc_persist = ProtoField.uint16(FILTER_PREFIX .. "persist", + "Persist", base.DEC), + pc_slot_time = ProtoField.uint16(FILTER_PREFIX .. "slot_time", + "Slot Time", base.DEC), + pc_max_frame = ProtoField.uint16(FILTER_PREFIX .. "max_frame", + "Max Frame", base.DEC), + pc_active_conns = ProtoField.uint16(FILTER_PREFIX .. "active_conns", + "Active Connections", base.DEC), + pc_bytes_recd = ProtoField.uint32(FILTER_PREFIX .. "bytes_received", + "Bytes Received", base.DEC), + -- Outstanding frames + frames_on_port = ProtoField.uint32(FILTER_PREFIX .. "frames_on_port", + "Frames Outstanding on Port", base.DEC), + frames_on_conn = ProtoField.uint32(FILTER_PREFIX .. "frames_on_conn", + "Frames Outstanding on Connection", base.DEC), + -- Heard calls + heard_text = ProtoField.stringz(FILTER_PREFIX .. "heard_text", + "Heard Text", base.ASCII), + heard_first = ProtoField.string(FILTER_PREFIX .. "heard_first", + "First Heard", base.ASCII), + heard_last = ProtoField.string(FILTER_PREFIX .. "heard_last", + "Last Heard", base.ASCII), + -- Unproto data + unproto_data = ProtoField.string(FILTER_PREFIX .. "unproto_data", + "Unproto Data", base.UNICODE), + -- Connections + conn_message = ProtoField.stringz(FILTER_PREFIX .. "connection_message", + "Connection Message", base.ASCII), + disconn_message = ProtoField.stringz( + FILTER_PREFIX .. "disconnection_message", + "Disconnection Message", base.ASCII), + conn_data = ProtoField.string(FILTER_PREFIX .. "connected_data", + "Connected Data", base.UNICODE), + -- Vias + via_count = ProtoField.uint8(FILTER_PREFIX .. "via_count", + "Number of Vias", base.DEC), + via1 = ProtoField.stringz(FILTER_PREFIX .. "var1", "Via 1", base.ASCII), + via2 = ProtoField.stringz(FILTER_PREFIX .. "var2", "Via 2", base.ASCII), + via3 = ProtoField.stringz(FILTER_PREFIX .. "var3", "Via 3", base.ASCII), + via4 = ProtoField.stringz(FILTER_PREFIX .. "var4", "Via 4", base.ASCII), + via5 = ProtoField.stringz(FILTER_PREFIX .. "var5", "Via 5", base.ASCII), + via6 = ProtoField.stringz(FILTER_PREFIX .. "var6", "Via 6", base.ASCII), + via7 = ProtoField.stringz(FILTER_PREFIX .. "var7", "Via 7", base.ASCII), + -- Monitoring text and data + text_data = ProtoField.string(FILTER_PREFIX .. "text_data", + "Text", base.UNICODE), + binary_data = ProtoField.bytes(FILTER_PREFIX .. "binary_data", + "Binary", base.SPACE), + -- Raw data + tnc_port = ProtoField.uint8(FILTER_PREFIX .. "tnc_port", + "TNC Port", base.DEC) +} + +-- Monitoring frames from the server have two parts, first text and then some +-- binary data. Here we split the buffer content into its constituent parts. +local function split_buffer(buffer) + local s = buffer:string() + local ix = s:find('\r') + if ix == nil then + return nil, buffer(0) + end + local text = s:sub(1, ix) + local remaining = buffer:len() - ix + if remaining <= 0 then + return buffer(0), nil + end + local length + _, _, length = text:find(" Len=(%d+)") + if length == nil or tonumber(length) > remaining then + return buffer(0, ix), buffer(ix) + else + return buffer(0, ix), buffer(ix, length) + end +end + +-- After splitting the buffer, we add the relevant parts to the tree. Note that +-- either part may be empty. +local function add_split_data(tree, buffer) + text, binary = split_buffer(buffer) + if text ~= nil then + tree:add(FIELDS.text_data, text) + end + if binary ~= nil then + tree:add(FIELDS.binary_data, binary) + end +end + +-- Dealing with the presentation of vias is handled slightly differently only +-- because there may be up to 7 of them, and we don't want to repeat ourselves. +local function add_vias(tree, buffer) + local count = buffer(0, 1):uint() + if count > 7 then + count = 7 + end + if buffer:len() < (1 + count * 10) then + count = math.floor((buffer:len() - 1) / 10) + end + tree:add(FIELDS.via_count, buffer(0, 1)) + local offset = 1 + for ix = 1, count do + local via_id = "via" .. ix + tree:add(FIELDS[via_id], buffer(offset, 10)) + offset = offset + 10 + end +end + +-- Parse the port info string into a count and the port names. The elements of +-- the string are separated by semicolons, but the string also ends with one. +local function add_port_info(tree, buffer) + local text = buffer(0, header.datalen):stringz() + local iter = string.gmatch(text, "([^;]+)") + + local count = iter() + tree:add(FIELDS.port_count, tonumber(count)) + + local buffer_pos = count:len() + 1 + for port in iter do + port_len = port:len() + if port_len > 0 then + tree:add(FIELDS.port_name, buffer(buffer_pos, port_len)) + end + buffer_pos = buffer_pos + port_len + 1 + end +end + +-- The binary portion of the timestamp in a heard call, if present, uses the +-- Windows SYSTEMTIME structure. Here we break that apart and format is (but +-- ignoring the weekday). +local function format_systemtime(buffer) + return string.format("%04d-%02d-%02d %02d:%02d:%02d", + buffer(0, 2):le_uint(), buffer(2, 2):le_uint(), + buffer(6, 2):le_uint(), buffer(8, 2):le_uint(), + buffer(10, 2):le_uint(), buffer(12, 2):le_uint()) +end + +-- Each heard call record consists of either one or three parts. If one, there +-- is only text. If three, there is text along with two time structures, one +-- for first heard and the other for last heard. +-- +-- The AGWPE spec says that all parts are always there. However, versions of +-- ldsped earlier than 1.19 have the text part but not timestamps. Further, +-- AGWPE itself inserts null padding before the timestamps, so we have to look +-- for it in the buffer. Direwolf does not currently implement heard calls. +local function add_heard_calls(tree, buffer, header) + local ST_LEN = 16 + local EXPECTED_LEN = 2 * ST_LEN + local text_len = buffer:strsize() + + tree:add(FIELDS.heard_text, buffer(0, text_len)) + + local remaining = header.datalen - text_len + if remaining < EXPECTED_LEN then + return + end + local offset + if remaining == EXPECTED_LEN then + -- Case 1: data has expected length for 2 SYSTEMTIME instances + offset = 0 + else + -- Case 2: padding somewhere + -- Case 2a: data at end, leading nulls, per AGWPE (but not spec) + offset = remaining - EXPECTED_LEN + local year1 = buffer(offset, 2):uint() + local year2 = buffer(offset + ST_LEN, 2):uint() + if not(year1 > 2000 and year1 < 2200 + and year2 > 2000 and year2 < 2200) then + -- Case 2b: data at beginning, random padding at end + offset = 0 + year1 = buffer(offset, 2):uint() + year2 = buffer(offset + ST_LEN, 2):uint() + if not(year1 > 2000 and year1 < 2200 + and year2 > 2000 and year2 < 2200) then + -- Out of luck - no valid timestamp data + offset = nil + end + end + end + if offset ~= nil then + tree:add(FIELDS.heard_first, + format_systemtime(buffer(text_len + offset, ST_LEN))) + tree:add(FIELDS.heard_last, + format_systemtime(buffer(text_len + offset + ST_LEN, ST_LEN))) + end +end + +local REQUEST_FNS = { + P = function(tree, buffer, header, pinfo) + tree:add(FIELDS.userid, buffer(0, 255)) + tree:add(FIELDS.password, buffer(255, 255)) + end, + M = function(tree, buffer, header, pinfo) + if header.pid == 0xF0 then + tree:add(FIELDS.unproto_data, buffer(0, header.datalen)) + end + end, + D = function(tree, buffer, header, pinfo) + if header.pid == 0xF0 then + tree:add(FIELDS.conn_data, buffer(0, header.datalen)) + end + end, + v = function(tree, buffer, header, pinfo) + add_vias(tree, buffer) + end, + V = function(tree, buffer, header, pinfo) + add_vias(tree, buffer) + end, + K = function(tree, buffer, header, pinfo) + tree:add(FIELDS.tnc_port, buffer(0, 1)) + Dissector.get("ax25"):call( buffer(1):tvb(), pinfo, tree) + end +} + +local RESPONSE_FNS = { + R = function(tree, buffer, header, pinfo) + tree:add_le(FIELDS.version_major, buffer(0, 2)) + tree:add_le(FIELDS.version_major, buffer(4, 2)) + end, + X = function(tree, buffer, header, pinfo) + tree:add(FIELDS.callsign_registered, buffer(0, 1)) + end, + G = function(tree, buffer, header, pinfo) + add_port_info(tree, buffer) + end, + g = function(tree, buffer, header, pinfo) + tree:add(FIELDS.pc_baud_rate, buffer(0, 1)) + tree:add(FIELDS.pc_traffic_level, buffer(1, 1)) + tree:add(FIELDS.pc_tx_delay, buffer(2, 1)) + tree:add(FIELDS.pc_tx_tail, buffer(3, 1)) + tree:add(FIELDS.pc_persist, buffer(4, 1)) + tree:add(FIELDS.pc_slot_time, buffer(5, 1)) + tree:add(FIELDS.pc_max_frame, buffer(6, 1)) + tree:add(FIELDS.pc_active_conns, buffer(7, 1)) + tree:add_le(FIELDS.pc_bytes_recd, buffer(8, 4)) + end, + y = function(tree, buffer, header, pinfo) + tree:add_le(FIELDS.frames_on_port, buffer(0, 4)) + end, + Y = function(tree, buffer, header, pinfo) + tree:add_le(FIELDS.frames_on_conn, buffer(0, 4)) + end, + H = function(tree, buffer, header, pinfo) + add_heard_calls(tree, buffer, header) + end, + C = function(tree, buffer, header, pinfo) + tree:add(FIELDS.conn_message, buffer(0, header.datalen)) + end, + D = function(tree, buffer, header, pinfo) + if header.pid == 0xF0 then + tree:add(FIELDS.conn_data, buffer(0, header.datalen)) + end + end, + d = function(tree, buffer, header, pinfo) + tree:add(FIELDS.disconn_message, buffer(0, header.datalen)) + end, + I = function(tree, buffer, header, pinfo) + add_split_data(tree, buffer, pinfo) + end, + S = function(tree, buffer, header, pinfo) + add_split_data(tree, buffer) + end, + U = function(tree, buffer, header, pinfo) + add_split_data(tree, buffer) + end, + T = function(tree, buffer, header, pinfo) + add_split_data(tree, buffer) + end, + K = function(tree, buffer, header, pinfo) + tree:add(FIELDS.tnc_port, buffer(0, 1)) + Dissector.get("ax25"):call( buffer(1):tvb(), pinfo, tree) + end +} + +local FRAME_TYPE = { + request = "Request from Client", + response = "Response from Server" +} + +local preferences = { + server_port = 8000, + strict_validation = true, + show_reserved = false +} + +-- Parse the 36-byte AGWPE frame header, including reserved bytes +local function parse_header(buffer) + return { + port = buffer(0, 1):uint(), + reserved_1 = buffer(1, 3):uint(), + datakind = string.char(buffer(4, 1):uint()), + reserved_2 = buffer(5, 1):uint(), + pid = buffer(6, 1):uint(), + reserved_3 = buffer(7, 1):uint(), + callfrom = buffer(8, 10):string(), + callto = buffer(18, 10):string(), + datalen = buffer(28, 4):le_uint(), + reserved_user = buffer(32, 4):uint() + } +end + +-- Examine the header data to determine whether or not this looks like a real +-- AGWPE frame header. This is really the only way that we can tell if the +-- data looks valid. Since the spec says that reserved bytes should be zero, +-- we check those, but allow for an opt-out by the user, in case they are using +-- a non-compliant implementation. +local function is_valid_header(header) + return string.match(header.datakind, "%a") ~= nil + and (not preferences.strict_validation + or (header.reserved_1 == 0 + and header.reserved_2 == 0 + and header.reserved_3 == 0 + and header.reserved_user == 0)) +end + +-- +-- Protocol +-- + +local protocol = Proto(PROTOCOL_NAME, PROTOCOL_DESC) + +protocol.fields = FIELDS + +-- +-- Dissector +-- + +-- This function does the real work of dissecting an AGWPE PDU. However, it is +-- not the dissector function that we hand to Wireshark, because there may be +-- more than one AGWPE frame within a single TCP segment. Wireshark will make +-- sure that what we are handed contains what we need. +function dissect_one(buffer, pinfo, tree) + if buffer:len() < HEADER_LEN then + return 0 + end + + local header = parse_header(buffer) + if not is_valid_header(header) then + return 0 + end + + pinfo.cols.protocol = PROTOCOL_NAME + + local is_request = pinfo.dst_port == preferences.server_port + local datakind_desc = is_request + and DATAKIND_FROM_CLIENT[header.datakind] + or DATAKIND_FROM_SERVER[header.datakind] + if datakind_desc == nil then + datakind_desc = "Unknown" + end + + local subtree = tree:add(protocol, buffer(), "AGWPE Protocol Data" + .. ", Type: " .. (is_request and "Request" or "Response") + .. ", DataKind: " .. header.datakind) + + subtree:add(FIELDS.frametype, is_request + and FRAME_TYPE.request + or FRAME_TYPE.response):set_generated() + subtree:add(FIELDS.port, buffer(0, 1)) + if preferences.show_reserved then + subtree:add(FIELDS.reserved_1, buffer(1, 3)) + end + subtree:add(FIELDS.datakind, buffer(4, 1)) + :append_text(" (" .. datakind_desc .. ")") + if preferences.show_reserved then + subtree:add(FIELDS.reserved_2, buffer(5, 1)) + end + subtree:add(FIELDS.pid, buffer(6, 1)) + if preferences.show_reserved then + subtree:add(FIELDS.reserved_3, buffer(7, 1)) + end + subtree:add(FIELDS.callfrom, buffer(8, 10)) + subtree:add(FIELDS.callto, buffer(18, 10)) + subtree:add_le(FIELDS.datalen, buffer(28, 4)) + if preferences.show_reserved then + subtree:add(FIELDS.reserved_user, buffer(32, 4)) + end + + -- If there's no data, we're done + if header.datalen == 0 then + return HEADER_LEN + end + + local fn + if is_request then + fn = REQUEST_FNS[header.datakind] + else + fn = RESPONSE_FNS[header.datakind] + end + if fn ~= nil then + local data_tree = subtree:add("Data") + fn(data_tree, buffer:range(HEADER_LEN), header, pinfo) + end + + return HEADER_LEN + header.datalen +end + +-- We need to be able to tell Wireshark how much data is in our entire frame. +-- That is just the size of the frame header plus however much data that header +-- tells us will follow. +function get_total_length(tvb, pinfo, offset) + header = parse_header(tvb(offset, HEADER_LEN):tvb()) + return HEADER_LEN + header.datalen +end + +-- This is the dissector that we hand to Wireshark. When invoked, it will call +-- back into Wireshark, which will later result in one or more calls to our +-- length function and to our real dissector function, depending upon how many +-- AGWPE frames are in the TCP segment. +function protocol.dissector(buffer, pinfo, tree) + dissect_tcp_pdus(buffer, tree, HEADER_LEN, get_total_length, dissect_one) +end + +-- +-- Preferences +-- + +protocol.prefs.server_port = Pref.uint( + "Server port", preferences.server_port, + "The TCP port on which the AGWPE server is listening") +protocol.prefs.strict_validation = Pref.bool( + "Strict validation", preferences.strict_validation, + "Should the dissector strictly validate headers before showing fields?") +protocol.prefs.show_reserved = Pref.bool( + "Show reserved fields", preferences.show_reserved, + "Should the content of reserved fields be displayed?") + +function protocol.prefs_changed() + preferences.strict_validation = protocol.prefs.strict_validation + preferences.show_reserved = protocol.prefs.show_reserved + -- If the port has been changed, then we need to change our entry in the + -- dissector table so that it takes effect. Otherwise it will not take + -- effect until Wireshark is restarted. + if preferences.server_port ~= protocol.prefs.server_port then + local dtable = DissectorTable.get("tcp.port") + if preferences.server_port ~= 0 then + dtable:remove(preferences.server_port, protocol) + end + preferences.server_port = protocol.prefs.server_port + if preferences.server_port ~= 0 then + dtable:add(preferences.server_port, protocol) + end + end +end + +-- +-- Mainline +-- + +DissectorTable.get("tcp.port"):add(preferences.server_port, protocol) diff --git a/dissectors/amx-device-discovery/LICENSE b/dissectors/amx-device-discovery/LICENSE new file mode 100644 index 0000000..c25d221 --- /dev/null +++ b/dissectors/amx-device-discovery/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright © 2017 Hisanobu Doi + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dissectors/amx-device-discovery/README.md b/dissectors/amx-device-discovery/README.md new file mode 100644 index 0000000..6f2fb42 --- /dev/null +++ b/dissectors/amx-device-discovery/README.md @@ -0,0 +1,45 @@ +# AMX Device Discovery — balises de découverte des équipements AMX + +Dissecteur Wireshark Lua des **balises AMX Device Discovery (AMX +Beacon)**, émises en UDP par les contrôleurs et équipements AMX +(Harman) d'automatisation audiovisuelle et domotique : trame texte +`AMXB<-SDKClass=…><-UUID=…><-Make=…><-Model=…>…` terminée par un retour +chariot, décodée en paires nom / valeur (classe, identifiant, fabricant, +modèle, révision, URL de configuration…), avec les valeurs reprises dans +la colonne Info. Port UDP 9131. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/hisasan/amxdd-dissector | +| Commit importé | `df867fd0311b35e331d0be75e532b2c43a7fb7fb` du 06/02/2020 (branche `master`, dernier commit, qui est aussi la dernière modification de `amxdd.lua`) | +| Licence amont | MIT (`LICENSE` amont, © 2017 Hisanobu Doi) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur AMX Beacon natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont, fins de ligne CRLF). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `amxdd.lua` | Protocole `amxdd` sur UDP 9131 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `amxdd.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `amxdd`. + +## Remarques + +- Seules les balises sont décodées (comme l'indique le README amont) ; + les paires nom / valeur sont des éléments texte, non filtrables + individuellement. +- Variable globale `amxdd` et nom de protocole en majuscules, comme dans + l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/amx-device-discovery/amxdd.lua b/dissectors/amx-device-discovery/amxdd.lua new file mode 100644 index 0000000..7b2c6c8 --- /dev/null +++ b/dissectors/amx-device-discovery/amxdd.lua @@ -0,0 +1,47 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/hisasan/amxdd-dissector (amxdd.lua), +-- commit df867fd0311b35e331d0be75e532b2c43a7fb7fb du 06/02/2020. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- AMX Device Discovery protocol dissector for Wireshark +-- Version 0.1.0 +-- Author H.Doi + +amxdd = Proto("AMXDD","AMX Device Discovery") + +function amxdd.dissector(buffer, pinfo, tree) + local datalen = buffer:len(); + if buffer(0, 5):string() ~= "AMXB<" or buffer(datalen - 1, 1):uint() ~= 0x0d then + return + end + + pinfo.cols.protocol = amxdd.name + pinfo.cols.info = "AMX Beacon" + + local subtree = tree:add(amxdd, buffer(), "AMX Beacon") + local start = 0 + local equal = 0 + + for offset = 4, datalen - 1 do + local chr = buffer(offset, 1):string() + if chr == "<" then + start = offset + elseif chr == "=" then + equal = offset + elseif chr == ">" then + if 0 < start and start < equal then + local name = buffer(start + 1, equal - start - 1):string() + local value = buffer(equal + 1, offset - equal - 1):string() + if name:sub(1,1) == "-" then + name = "Device" .. name + end + subtree:add(buffer(start, offset - start + 1), name .. ":", value) + pinfo.cols.info:append(" " .. value) + end + start = 0 + equal = 0 + end + end +end + +udp_table = DissectorTable.get("udp.port") +udp_table:add(9131, amxdd) diff --git a/dissectors/arid2-tiiuae/LICENSE b/dissectors/arid2-tiiuae/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dissectors/arid2-tiiuae/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/arid2-tiiuae/README.md b/dissectors/arid2-tiiuae/README.md new file mode 100644 index 0000000..fa37ad1 --- /dev/null +++ b/dissectors/arid2-tiiuae/README.md @@ -0,0 +1,69 @@ +# ARID2 — identification à distance anonyme des drones (TII) + +Dissecteur Wireshark Lua du protocole ARID2 (« Anonymous and Verifiable +Remote Identification »). Il a été conçu par le Technology Innovation +Institute (TII, Abou Dabi) pour l'identification à distance de drones +avec signature de groupe anonyme vérifiable. La trame, sous Ethertype +`0xA21D`, porte l'identifiant de groupe, la position et la vitesse du +drone, la position de l'opérateur, un horodatage, un code d'urgence et +la signature avec sa longueur (issue #538). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/tiiuae/arid2 (`wireshark_dissector/arid.lua`) | +| Commit importé | `60c395e3b21d4669d702ed01354c20c747adb814` du 21/06/2022 (dernier commit de `main`) ; dernière modification du script : commit `d829c299edccdcf338df2438943b6d9d4f6bc7a4` du 27/05/2022 | +| Licence amont | Apache-2.0 (`LICENSE` amont ; README amont : « Distributed under the Apache 2 License » ; aucune mention de licence dans le script, pas de fichier `NOTICE`). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur ARID dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/arid.lua` | Protocole `tii-arid` (« TII ARID Protocol », ligne 6), champs `tii_arid.*` (lignes 9 à 21) ; inscrit dans la table `ethertype` pour `0xA21D` (lignes 28 et 62) | + +## Utilisation + +Copier `src/arid.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis recharger +avec Ctrl+Maj+L. Dans le projet amont, l'émetteur (`sign.cpp`, bibliothèque +libtins) place la trame après un en-tête 802.1Q (`Dot1Q`, Ethertype +`0xA21D`) dans des trames 802.11 en mode moniteur. L'inscription se fait +dans la table `ethertype` (vérifiée en Ethernet et derrière 802.1Q). Filtres : `tii-arid`, +`tii_arid.group_id`, `tii_arid.timestamp`. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. +Captures synthétiques construites d'après `sign.cpp` amont (entiers +gros-boutistes, coordonnées multipliées par 10⁶) : + +| Essai | Résultat | +|---|---| +| Ethernet, Ethertype `0xA21D`, 50 octets | « TII ARID », « Drone Group ID: cafebabe », champs de position en octets bruts (« Latitude [deg]: 02e8e1d8 »), « Timestamp [s]: 1790000000 », « Emergency Code: 01 », « Signature Length [B]: 7 », signature | +| Même trame derrière une étiquette 802.1Q | décodé de la même façon | +| Trame de 2 octets | **erreur Lua** ligne 47 (`Range is out of bounds`) | + +## Limites constatées + +- Latitude, longitude, altitude, vitesse et route sont déclarées en + `bytes` : les valeurs (entiers signés ×10⁶ dans `sign.cpp`) ne sont + ni converties ni filtrables par valeur. +- Le script appelle le dissecteur `data` avant le sien (ligne 39) : la + charge apparaît deux fois, en « Data » puis en « TII ARID ». +- La longueur de signature n'est pas utilisée : la signature est lue + jusqu'à la fin de la trame (ligne 59), FCS ou bourrage compris. +- Les champs sont des variables globales (`len`, `timestamp`, `sign`, + etc., lignes 9 à 21). Ils peuvent entrer en collision avec d'autres + scripts Lua. +- Pas de contrôle de longueur : une trame de moins de 43 octets provoque + une erreur Lua. +- Pas de capture réelle dans le dépôt amont (seulement des copies + d'écran, non reprises). diff --git a/dissectors/arid2-tiiuae/src/arid.lua b/dissectors/arid2-tiiuae/src/arid.lua new file mode 100644 index 0000000..faeab29 --- /dev/null +++ b/dissectors/arid2-tiiuae/src/arid.lua @@ -0,0 +1,62 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/tiiuae/arid2 (wireshark_dissector/arid.lua), +-- commit 60c395e3b21d4669d702ed01354c20c747adb814 du 21/06/2022 (dernière modification du fichier : +-- commit d829c299edccdcf338df2438943b6d9d4f6bc7a4 du 27/05/2022). +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md et LICENSE. +local tii_arid = Proto("TII-ARID", "TII ARID Protocol") + +-- Header fields +group_id = ProtoField.bytes("tii_arid.group_id", "Drone Group ID") +latitude = ProtoField.bytes("tii_arid.latitude", "Latitude [deg]") +longitude = ProtoField.bytes("tii_arid.longitude", "Longitude [deg]") +altitude = ProtoField.bytes("tii_arid.altitude", "Altitude [m]") +speed = ProtoField.bytes("tii_arid.speed", "Speed [m/s]") +cog = ProtoField.bytes("tii_arid.cog", "Course Over Ground [deg]") +latitude_uas = ProtoField.bytes("tii_arid.latitude_uas", "Latitude UAS [deg]") +longitude_uas = ProtoField.bytes("tii_arid.longitude_uas", "Longitude UAS [deg]") +altitude_uas = ProtoField.bytes("tii_arid.altitude_uas", "Altitude UAS [m]") +timestamp = ProtoField.uint32("tii_arid.timestamp", "Timestamp [s]", base.DEC) +es = ProtoField.bytes("tii_arid.es", "Emergency Code") +len = ProtoField.uint16("tii_arid.len", "Signature Length [B]", base.DEC) +sign = ProtoField.bytes("tii_arid.sign", "Signature") + +-- Register protocol fields +tii_arid.fields = {group_id, latitude, longitude, altitude, speed, cog, latitude_uas, longitude_uas, + altitude_uas, timestamp, es, len, sign} + +-- TII_ARID_ETYPE Ethertype represents a tii_arid packet +local TII_ARID_ETYPE = 0xa21d + +local etypetable = DissectorTable.get("ethertype") +local etype_orig = etypetable:get_dissector(TII_ARID_ETYPE) +local data_dis = Dissector.get("data") + +function tii_arid.dissector(tvbuf, pinfo, tree) + + if etype_orig ~= nil then + etype_orig:call(tvbuf, pinfo, tree) + else + data_dis:call(tvbuf, pinfo, tree) + end + + pinfo.cols.protocol:set("TII ARID") + + local subtree = tree:add(tii_arid, tvbuf(0, tvbuf:len()), "TII ARID Protocol Data") + + -- Header + subtree:add(group_id, tvbuf(0, 4)) + subtree:add(latitude, tvbuf(4, 4)) + subtree:add(longitude, tvbuf(8, 4)) + subtree:add(altitude, tvbuf(12, 4)) + subtree:add(speed, tvbuf(16, 4)) + subtree:add(cog, tvbuf(20, 4)) + subtree:add(latitude_uas, tvbuf(24, 4)) + subtree:add(longitude_uas, tvbuf(28, 4)) + subtree:add(altitude_uas, tvbuf(32, 4)) + subtree:add(timestamp, tvbuf(36, 4)) + subtree:add(es, tvbuf(40, 1)) + subtree:add(len, tvbuf(41, 2)) + subtree:add(sign, tvbuf(43, tvbuf:len() - 43)) +end + +etypetable:add(TII_ARID_ETYPE, tii_arid) diff --git a/dissectors/async-tcp-chat/README.md b/dissectors/async-tcp-chat/README.md new file mode 100644 index 0000000..ece2d9b --- /dev/null +++ b/dissectors/async-tcp-chat/README.md @@ -0,0 +1,52 @@ +# async-tcp-ip — protocole de chat d'exemple (TCP 2048) + +Dissecteur Wireshark Lua du **protocole de chat d'exemple** du dépôt +async-tcp-ip (serveur et client de discussion en C# / .NET, série +d'exemples de programmation TCP/IP asynchrone de Stephen Cleary). Il gère +le réassemblage TCP et décode : + +- l'en-tête : préfixe de longueur (4 octets gros-boutiste) et type de + message (4 octets) — CHAT, BROADCAST, KEEPALIVE, SET_NICKNAME, ACK, NAK ; +- le contenu des messages CHAT (longueur + texte UTF-8) ; les autres types + sont passés au dissecteur `data`. + +Port TCP 2048. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/handlemind/async-tcp-ip (fichier `chat.lua` à la racine ; spécification dans `protocol.md`) | +| Commit importé | `8b3ea3f73e6a220e54bd69a1f3ee5e487660ce4d` du 12/06/2025 (branche `main`, dernier commit ; dernière modification de `chat.lua` : `7f4e621` du 18/01/2025) | +| Licence amont | BSD-3-Clause, d'après l'en-tête de `chat.lua` : « This code is in the Public Domain, or the BSD (3 clause) license if Public Domain does not apply in your country », © 2015-2022 Hadriel Kaplan, Stephen Cleary | +| Natif Wireshark 4.6.4 | Non — protocole d'exemple propre à ce projet | + +Le dépôt amont n'a pas de fichier de licence ; seul l'en-tête du script +en définit une. Comme pour `dissectors/clou-hrp/`, la variante BSD-3-Clause +est retenue (le domaine public n'étant pas reconnu partout). Le script est +dérivé du modèle FPM de Hadriel Kaplan (exemple du wiki Wireshark). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `chat.lua` | Protocole `chat` (« Sample chat protocol ») sur TCP 2048 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le code C# n'est pas importé. + +## Utilisation + +Copier `chat.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `chat`. + +## Remarques + +- **Conflit de nom** : le protocole s'appelle `chat`, comme celui de + `dissectors/superfunkychat/` ; les deux scripts ne peuvent pas être + chargés ensemble (« Proto already registered »). +- Seul le contenu des messages CHAT est décodé (pas BROADCAST, + SET_NICKNAME, ACK/NAK) ; fonctions déclarées globales, comme dans + l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/async-tcp-chat/chat.lua b/dissectors/async-tcp-chat/chat.lua new file mode 100644 index 0000000..8c67275 --- /dev/null +++ b/dissectors/async-tcp-chat/chat.lua @@ -0,0 +1,245 @@ +-- SPDX-License-Identifier: BSD-3-Clause +-- Importé de https://github.com/handlemind/async-tcp-ip (chat.lua), +-- commit 8b3ea3f73e6a220e54bd69a1f3ee5e487660ce4d du 12/06/2025. +-- Licence amont : domaine public, ou BSD-3-Clause à défaut (en-tête du fichier) — voir README.md. +-- authors: Hadriel Kaplan , Stephen Cleary +-- Copyright (c) 2015-2022, Hadriel Kaplan, Stephen Cleary +-- This code is in the Public Domain, or the BSD (3 clause) license if Public Domain does not apply in your country. +-- Thanks to Hadriel Kaplan, who wrote the original FPM Lua script. + +-- This is a starting point for defining a dissector for a custom TCP protocol. +-- This approach assumes that each message has a header that indicates the message length. +-- The code in this example uses a 4-byte header which is just a 4-byte big-endian message length, +-- and this length does not include the length of the header. +-- Modify the sections marked TODO to adjust these assumptions. + +-- TODO: Change these constants to match your protocol. +local NAME = "chat" +local PORT = 2048 +local HEADER_SIZE = 8 -- size (in bytes) of the message header; this doesn't have to be the complete header, but should be enough to determine the length. +local proto = Proto(NAME, "Sample chat protocol") +local fields = { + -- All fields should go here, not just header fields. + -- https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Proto.html#:~:text=11.6.7.%C2%A0ProtoField + length_prefix = ProtoField.uint32(NAME .. ".length_prefix", "Length Prefix", base.DEC), + type = ProtoField.uint32(NAME .. ".type", "Type", base.DEC), + text_length = ProtoField.uint16(NAME .. ".text_length", "Text Length", base.DEC), + text = ProtoField.string(NAME .. ".text", "Text"), +} +proto.fields = fields +local types = { + [0] = "CHAT", + [1] = "BROADCAST", + [2] = "KEEPALIVE", + [3] = "SET_NICKNAME", + [4] = "ACK", + [5] = "NAK", +} + +-- this holds the plain "data" Dissector, in case we can't dissect it +local data = Dissector.get("data") + +-- Extract the length of the message from the header. +-- This length should include the size of the header itself. +function read_message_length_from_header(header_range) + -- TODO: This sample protocol assumes the header is just a 4-byte big-endian uint length field. + local length_prefix_range = header_range:range(0, 4) + return length_prefix_range:uint() + 4 +end + +-- Whatever you return from this method is passed as the first argument into dissect_message_fields +function dissect_header_fields(header_range, packet_info, tree) + -- TODO: Add other header fields here; the example protocol is just a 4-byte big endian "length_prefix" + -- https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Tree.html + local length_prefix_range = header_range:range(0, 4) + tree:add_packet_field(fields.length_prefix, length_prefix_range, ENC_BIG_ENDIAN) + + local type_range = header_range:range(4, 4) + tree:add_packet_field(fields.type, type_range, ENC_BIG_ENDIAN) + + return type_range:uint() + -- TODO: Consider returning some values (e.g., a "type" value parsed from the header) so dissect_message_fields can use it. +end + +function dissect_message_fields(header_result, body_range, packet_info, tree) + -- TODO: dissect the message fields + -- https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Tree.html + local type = types[header_result] + if type == nil then + type = "Unknown (" .. header_result .. ")" + end + packet_info.cols.info:append(": " .. type) + + local offset = 0 + if header_result == 0 then + tree:add_packet_field(fields.text_length, body_range:range(offset, 2), ENC_BIG_ENDIAN) + local text_length = body_range:range(offset, 2):uint() + offset = offset + 2 + + tree:add_packet_field(fields.text, body_range(offset, text_length), ENC_UTF_8 + ENC_STRING) + offset = offset + text_length + else + -- Fallback behavior: if we find an unknown message type, pass it to the `data` dissector. + -- append the INFO column + data:call(body_range:tvb(offset), packet_info, tree) + end +end + +-- +-- From here on out, there shouldn't have to be any changes for your protocol. +-- + +---------------------------------------- +-- The function to check the length field. +-- +-- This returns two things: +-- 1. the length of the message, including the header. +-- If 0, then some parsing error happened. +-- If negative, then the absolute value of this is the number of bytes necessary to get a complete message. +-- If -DESEGMENT_ONE_MORE_SEGMENT, then an unknown number of bytes are still necessary to get a complete message. +-- 2. the TvbRange object for the header. This is nil if length <= 0. +checkLength = function(tvbuf, offset) + -- This example protocol implementation never returns 0 from this function, + -- but if you get a packet that doesn't look like it's from your protocol, + -- then it would be appropriate to return 0 from this function. + + -- "bytes_remaining" is the number of bytes remaining in the Tvb buffer which we + -- have available to dissect in this run + local bytes_remaining = tvbuf:len() - offset + + if bytes_remaining < HEADER_SIZE then + -- we need more bytes, so tell the main dissector function that we + -- didn't dissect anything, and we need an unknown number of more + -- bytes (which is what "DESEGMENT_ONE_MORE_SEGMENT" is used for) + -- return as a negative number + return -DESEGMENT_ONE_MORE_SEGMENT + end + + -- if we got here, then we know we have enough bytes in the Tvb buffer + -- to at least figure out the full length of this messsage + + local header_range = tvbuf:range(offset, HEADER_SIZE) + local message_length = read_message_length_from_header(header_range) + + if bytes_remaining < message_length then + -- we need more bytes to get the whole message + return -(message_length - bytes_remaining) + end + + return message_length, header_range +end + +---------------------------------------- +-- The following is a local function used for dissecting our messages +-- inside the TCP segment using the desegment_offset/desegment_len method. +-- It's a separate function because we run over TCP and thus might need to +-- parse multiple messages in a single segment/packet. So we invoke this +-- function only dissects one message and we invoke it in a while loop +-- from the Proto's main disector function. +-- +-- This function is passed in the original Tvb, Pinfo, and TreeItem from the Proto's +-- dissector function, as well as the offset in the Tvb that this function should +-- start dissecting from. +-- +-- This function returns the length of the message it dissected as a +-- positive number, or as a negative number the number of additional bytes it +-- needs if the Tvb doesn't have them all, or a 0 for error. +-- +function dissect(tvbuf, packet_info, root, offset) + local message_length, header_range = checkLength(tvbuf, offset) + + if message_length <= 0 then + return message_length + end + + -- if we got here, then we have a whole message in the Tvb buffer + -- so let's finish dissecting it... + + -- set the protocol column to show our protocol name + packet_info.cols.protocol:set(NAME) + + -- set the INFO column too, but only if we haven't already set it before + -- for this frame/packet, because this function can be called multiple + -- times per packet/Tvb + if string.find(tostring(packet_info.cols.info), "^" .. NAME) == nil then + packet_info.cols.info:set(NAME) + end + + -- We start by adding our protocol to the dissection display tree. + local tree = root:add(proto, tvbuf:range(offset, message_length)) + + -- dissect the header fields + local header_result = dissect_header_fields(header_range, packet_info, tree) + + -- dissect the message fields + dissect_message_fields(header_result, tvbuf(offset + HEADER_SIZE, message_length - HEADER_SIZE), packet_info, tree) + + return message_length +end + +-------------------------------------------------------------------------------- +-- The following creates the callback function for the dissector. +-- The 'tvbuf' is a Tvb object, 'packet_info' is a Pinfo object, and 'root' is a TreeItem object. +-- Whenever Wireshark dissects a packet that our Proto is hooked into, it will call +-- this function and pass it these arguments for the packet it's dissecting. +function proto.dissector(tvbuf, packet_info, root) + -- get the length of the packet buffer (Tvb). + local packet_length = tvbuf:len() + + -- check if capture was only capturing partial packet size + if packet_length ~= tvbuf:reported_length_remaining() then + -- captured packets are being sliced/cut-off, so don't try to dissect/reassemble + return 0 + end + + local bytes_consumed = 0 + + -- we do this in a while loop, because there could be multiple messages + -- inside a single TCP segment, and thus in the same tvbuf - but our + -- dissector() will only be called once per TCP segment, so we + -- need to do this loop to dissect each message in it + while bytes_consumed < packet_length do + -- We're going to call our "dissect()" function, which is defined + -- later in this script file. The dissect() function returns the + -- length of the message it dissected as a positive number, or if + -- it's a negative number then it's the number of additional bytes it + -- needs if the Tvb doesn't have them all. If it returns a 0, it's a + -- dissection error. + local result = dissect(tvbuf, packet_info, root, bytes_consumed) + + if result > 0 then + -- we successfully processed a message, of 'result' length + bytes_consumed = bytes_consumed + result + -- go again on another while loop + elseif result == 0 then + -- If the result is 0, then it means we hit an error of some kind, + -- so return 0. Returning 0 tells Wireshark this packet is not for + -- us, and it will try heuristic dissectors or the plain "data" + -- one, which is what should happen in this case. + return 0 + else + -- we need more bytes, so set the desegment_offset to what we + -- already consumed, and the desegment_len to how many more + -- are needed + packet_info.desegment_offset = bytes_consumed + + -- the negative result so it's a positive number + packet_info.desegment_len = -result + + -- even though we need more bytes, this packet is for us, so we + -- tell wireshark all of its bytes are for us by returning the + -- number of Tvb bytes we "successfully processed", namely the + -- length of the Tvb + return packet_length + end + end + + -- In a TCP dissector, you can either return nothing, or return the number of + -- bytes of the tvbuf that belong to this protocol, which is what we do here. + -- Do NOT return the number 0, or else Wireshark will interpret that to mean + -- this packet did not belong to your protocol, and will try to dissect it + -- with other protocol dissectors (such as heuristic ones) + return bytes_consumed +end + +DissectorTable.get("tcp.port"):add(PORT, proto) diff --git a/dissectors/automower-ble/LICENSE b/dissectors/automower-ble/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/automower-ble/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/automower-ble/README.md b/dissectors/automower-ble/README.md new file mode 100644 index 0000000..bb56899 --- /dev/null +++ b/dissectors/automower-ble/README.md @@ -0,0 +1,44 @@ +# Husqvarna Automower Connect (BLE) + +Dissecteur Wireshark Lua du **protocole BLE propriétaire Husqvarna +Automower Connect**, utilisé pour interroger et commander localement les +tondeuses robotisées Automower : réassemblage des messages répartis sur +plusieurs paquets BLE (post-dissecteur), en-tête, canal, CRC, commande +(majeur / mineur, nommés), longueur et données de requête ou de réponse. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/alistair23/AutoMower-BLE (fichier `husqvarna_automower_protocol.lua`) | +| Commit importé | `c53e3e460aa8f296e57d1f71b410052d86b9f46b` du 09/10/2026 (branche `main`, dernier commit) | +| Licence amont | GPL-3.0-or-later (`LICENSE` amont : GPL v3 ; `pyproject.toml` amont : `GPL-3.0-or-later` ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Automower natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `husqvarna_automower_protocol.lua` | Dissecteur `automower` (post-dissecteur sur le trafic BLE), champs `automower.*` | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `husqvarna_automower_protocol.lua` dans le dossier `plugins` de +Wireshark (ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins +Lua, ouvrir une capture BLE (par exemple un journal HCI Bluetooth Android +« btsnoop », comme le décrit `Wireshark-decoding.md` amont) et filtrer avec +`automower`. + +## Remarques + +- Protocole obtenu par rétro-ingénierie (bibliothèque non officielle) ; + toutes les commandes ne sont pas nommées. +- Le dissecteur s'exécute en post-dissecteur sur toutes les trames ; effet + sur les performances non mesuré. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/automower-ble/husqvarna_automower_protocol.lua b/dissectors/automower-ble/husqvarna_automower_protocol.lua new file mode 100644 index 0000000..1701e98 --- /dev/null +++ b/dissectors/automower-ble/husqvarna_automower_protocol.lua @@ -0,0 +1,813 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/alistair23/AutoMower-BLE (husqvarna_automower_protocol.lua), +-- commit c53e3e460aa8f296e57d1f71b410052d86b9f46b du 09/10/2026. +-- Licence amont : GPL-3.0-or-later (LICENSE amont) — voir README.md. +do + automower_reassembler = Proto("automower_reassembler", "Husqvarna AutoMower Reassembler") + automower_reassembler_full_data = ProtoField.bytes("automower_reassembler.full_data", "Reassembled Data") + automower_reassembler.fields = { automower_reassembler_full_data } + + automower_protocol = Proto("automower_protocol", "Husqvarna AutoMower Protocol") + + automower_header = ProtoField.new("Header", "automower.header", ftypes.UINT16, nil, base.HEX) + automower_length = ProtoField.new("Length", "automower.length", ftypes.UINT8, nil, base.DEC) + automower_channel_id = ProtoField.new("ChannelId", "automower.channel_id", ftypes.UINT8, nil, base.HEX) + automower_bool = ProtoField.new("Unknown Bool", "automower.bool", ftypes.UINT8, nil, base.HEX) + automower_first_crc = ProtoField.new("First CRC", "automower.first_crc", ftypes.UINT8, nil, base.HEX) + automower_protocol_major = ProtoField.new("Request Major", "automower.request_major", ftypes.UINT8, nil, base.DEC) + automower_protocol_major_text = ProtoField.new("Req Major", "automower.req_major", ftypes.STRING, nil, base.NONE) + automower_protocol_minor_text = ProtoField.new("Req Minor", "automower.req_minor", ftypes.STRING, nil, base.NONE) + automower_protocol_minor = ProtoField.new("Request Minor", "automower.request_minor", ftypes.UINT8, nil, base.DEC) + automower_request_length = ProtoField.new("Request Length", "automower.request_length", ftypes.UINT8, nil, base.DEC) + automower_response_length = ProtoField.new("Response Length", "automower.response_length", ftypes.UINT8, nil, base.DEC) + automower_request_data = ProtoField.bytes("automower.request_data", "Request Data") + automower_response_data = ProtoField.bytes("automower.response_data", "Response Data") + automower_full_crc = ProtoField.new("Full CRC", "automower.full_crc", ftypes.UINT8, nil, base.HEX) + automower_footer = ProtoField.new("Footer", "automower.footer", ftypes.UINT8, nil, base.HEX) + + automower_protocol.fields = { automower_header, automower_length, automower_channel_id, automower_bool, automower_first_crc, + automower_protocol_major, automower_protocol_major_text, automower_protocol_minor,automower_protocol_minor_text, + automower_request_length, automower_response_length, automower_request_data, automower_response_data, automower_full_crc, automower_footer } + + do + local buffers = {} + buffers[0x000b] = {} -- Request + buffers[0x000e] = {} -- Response + + function find_packet_bounds(att_handle, current_num) + local keys = {} + for k in pairs(buffers[att_handle]) do + table.insert(keys, k) + end + table.sort(keys) + + local start_index = nil + local end_index = nil + local concat = ByteArray.new() + + for _, num in ipairs(keys) do + local tvb = buffers[att_handle][num]:tvb() + if num <= current_num then + if tvb:len() >= 2 and tvb(0,2):le_uint() == 0xFD02 then + start_index = num + concat = ByteArray.new() + end + end + concat:append(buffers[att_handle][num]) + if num >= current_num then + if tvb:len() >= 1 and tvb(tvb:len() - 1, 1):uint() == 0x03 then + end_index = num + return start_index, end_index, concat + end + end + end + + return start_index, end_index, concat + end + + function automower_reassembler.dissector(buffer, pinfo, tree) + if buffer:len() < 13 then return end + if buffer(7, 2):le_uint() ~= 0x0004 then return end -- Bluetooth L2CAP CID + + local att_handle = buffer(10, 2):le_uint() + if (att_handle ~= 0x000b) and (att_handle ~= 0x000e) then return end + local is_request = att_handle == 0x000b + + if buffers[att_handle][pinfo.number] == nil then + buffers[att_handle][pinfo.number] = ByteArray.new() + buffers[att_handle][pinfo.number]:append(buffer(12, buffer:len() - 12):bytes()) + end + + local start_index, end_index, concat = find_packet_bounds(att_handle, pinfo.number) + if start_index and end_index then + local reassembled_tvb = ByteArray.tvb(concat, "Reassembled Data") + + subtree = tree:add(automower_reassembler, buffer(), "Husqvarna AutoMower Reassembler") + subtree:add(automower_reassembler_full_data, reassembled_tvb:range()) + + automower_protocol_dissector(reassembled_tvb, pinfo, tree, is_request) + end + end + end + + function undecoded_automower_protocol(tvb, pinfo, tree) + pinfo.cols.protocol = "HCI_EVT" + subtree = tree:add_le(btcommon_eir_ad_entry_data, tvb()) + subtree:add_proto_expert_info(btcommon_eir_ad_entry_data_undecoded, "Undecoded") + end + + function automower_protocol_dissector(tvb, pinfo, tree, is_request) + if tvb:len() == 0 then return end + + pinfo.cols.protocol = automower_protocol.name + + subtree = tree:add(automower_protocol, tvb(), "Husqvarna AutoMower Protocol") + + if not tvb(0,2):uint() == 0xFD02 then + undecoded_automower_protocol(tvb, pinfo, tree) + return + end + subtree:add_le(automower_header, tvb(0,2)) + + subtree:add_le(automower_length, tvb(2,1)) + + if not tvb(3,1):uint() == 0x00 then + undecoded_automower_protocol(tvb, pinfo, tree) + return + end + + if tvb(4,4):uint() == 0x00 then + undecoded_automower_protocol(tvb, pinfo, tree) + return + end + subtree:add_le(automower_channel_id, tvb(4,4)) + + subtree:add_le(automower_bool, tvb(8,1)) + + subtree:add_le(automower_first_crc, tvb(9,1)) + + if not tvb(10,1):uint() == 0x00 then + undecoded_automower_protocol(tvb, pinfo, tree) + return + end + + if not tvb(11,1):uint() == 0xAF then + undecoded_automower_protocol(tvb, pinfo, tree) + return + end + + minorText = "" + maj = tvb(12, 2):uint() + min = tvb(14, 1):uint() + + subtree:add_le(automower_protocol_major, tvb(12,2)) + if maj == 0x0A10 then -- BatteryCommands 4106 + subtree:add(automower_protocol_major_text, "BatteryCommands") + if min == 0x00 then + minorText = "getCapacityRequest" + elseif min == 0x01 then + minorText = "getEnergyLevelRequest" + elseif min == 0x02 then + minorText = "setSimulatedEnergyLevelRequest" + elseif min == 0x03 then + minorText = "getSimulatedEnergyLevelRequest" + elseif min == 0x04 then + minorText = "setSimulationRequest" + elseif min == 0x05 then + minorText = "getSimulationRequest" + elseif min == 0x14 then + minorText = "getBatteryLevelRequest" + --elseif min == 0x01 => weird voltage request / + elseif min == 0x15 then + minorText = "isChargingRequest" + elseif min == 0x16 then + minorText = "getRemainingChargingTimeRequest" + elseif min == 0x08 then + minorText = "getBatteryCurrentRequest" + elseif min == 0x09 then + minorText = "getBatteryTemperatureRequest" + elseif min == 0x0A then + minorText = "getBatteryNbrChargingCyclesRequest" + end + elseif maj == 0xB010 then -- TemperatureCommands 4272 + subtree:add(automower_protocol_major_text, "TemperatureCommands") + if min == 0x00 then + minorText = "getTemperatureRequest" + end + elseif maj == 0x4611 then -- CuttingHeightCommands 4422 + subtree:add(automower_protocol_major_text, "CuttingHeightCommands") + if min == 0x00 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x01 then + minorText = "subscribeEventChannelRequest" + elseif min == 0x02 then + minorText = "getCuttingHeightRequest" + elseif min == 0x03 then + minorText = "setCuttingHeightRequest" + elseif min == 0x04 then + minorText = "getAllSettingsRequest" + elseif min == 0x05 then + minorText = "getAvailableRequest" + elseif min == 0x06 then + minorText = "getHeightPercentageRequest" + elseif min == 0x07 then + minorText = "setHeightPercentageRequest" + elseif min == 0x08 then + minorText = "getDownCuttingEnabledRequest" + elseif min == 0x09 then + minorText = "setDownCuttingEnabledRequest" + elseif min == 0x0A then + minorText = "getDownCuttingAvailableRequest" + elseif min == 0x0C then + minorText = "getDownCuttingStatusRequest" + elseif min == 0x0F then + minorText = "getMinimumHeightRequest" + elseif min == 0x11 then + minorText = "getMaximumHeightRequest" + elseif min == 0x13 then + minorText = "getCurrentHeightPercentageRequest" + elseif min == 0x19 then + minorText = "getRaiseDistanceRequest" + end + elseif maj == 0x6C11 then -- AutotimerCommands 4460 + subtree:add(automower_protocol_major_text, "AutotimerCommands") + if min == 0x00 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x01 then + minorText = "subscribeEventChannelRequest" + elseif min == 0x02 then + minorText = "getAvailableRequest" + elseif min == 0x04 then + minorText = "getEnabledRequest" + elseif min == 0x05 then + minorText = "setEnabledRequest" + elseif min == 0x06 then + minorText = "getSensitivityRequest" + elseif min == 0x07 then + minorText = "setSensitivityRequest" + elseif min == 0x08 then + minorText = "getAllSettingsRequest" + end + elseif maj == 0xEA11 then -- MowerAppCommands 4586 + subtree:add(automower_protocol_major_text, "MowerAppCommands") + if min == 0x0 then + minorText = "modeOfOperation" + elseif min == 0x01 then + minorText = "getModeRequest" + elseif min == 0x02 then + minorText = "getStateRequest" + elseif min == 0x03 then + minorText = "getActivityRequest" + elseif min == 0x04 then + minorText = "startTriggerRequest" + elseif min == 0x05 then + minorText = "pauseRequest" + elseif min == 0x06 then + minorText = "getErrorRequest" + elseif min == 0x07 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x08 then + minorText = "isErrorConfirmableRequest" + elseif min == 0x09 then + minorText = "confirmErrorRequest" + elseif min == 0x0D then + minorText = "getMissionRequest" + elseif min == 0x0F then + minorText = "abortStartTriggerRequest" + elseif min == 0x13 then + minorText = "getInactiveReasonRequest" + end + elseif maj == 0x3212 then -- PlannerCommands 4658 + subtree:add(automower_protocol_major_text, "PlannerCommands") + if min == 0x00 then + minorText = "getRestrictionReasonRequest" + elseif min == 0x01 then + minorText = "getNextStartTimeRequest" + elseif min == 0x02 then + minorText = "getOverrideRequest" + elseif min == 0x03 then + minorText = "setOverrideMowRequest" + elseif min == 0x04 then + minorText = "setOverrideParkRequest" + elseif min == 0x05 then + minorText = "setOverrideParkUntilNextStartRequest" + elseif min == 0x06 then + minorText = "clearOverrideRequest" + end + elseif maj == 0x3812 then -- AuthenticationCommands 4664 + subtree:add(automower_protocol_major_text, "AuthenticationCommands") + if min == 0x00 then + minorText = "getLoginLevelRequest" + elseif min == 0x01 then + minorText = "isBlockedRequest" + elseif min == 0x02 then + minorText = "getBlockedTimeRequest" + elseif min == 0x03 then + minorText = "isOperatorLoggedInRequest" + elseif min == 0x04 then + minorText = "enterOperatorPinRequest" + elseif min == 0x05 then + minorText = "setOperatorPinRequest" + elseif min == 0x08 then + minorText = "isTrustedToEnterSafetyPinRequest" + elseif min == 0x0A then + minorText = "initiateAuthenticationV2Request" + elseif min == 0x0B then + minorText = "challengeResponseV2Request" + elseif min == 0x0E then + minorText= "getSecurityCodeV2Request" + elseif min == 0x0F then + minorText = "logoutRequest" + elseif min == 0x11 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x17 then + minorText = "isOperatorPinUserSelectedRequest" + end + elseif maj == 0x4212 then -- SystemPowerCommands 4674 + subtree:add(automower_protocol_major_text, "SystemPowerCommands") + if min == 0x00 then + minorText = "enableEventsRequest" + elseif min == 0x01 then + minorText = "getPowerModeRequest" + elseif min == 0x02 then + minorText = "keepAliveRequest" + end + elseif maj == 0x5212 then -- CalendarCommands 4690 + subtree:add(automower_protocol_major_text, "CalendarCommands") + if min == 0x00 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x01 then + minorText = "subscribeEventChannelRequest" + elseif min == 0x02 then + minorText = "getTimeRequest" + elseif min == 0x03 then + minorText = "setTimeRequest" + elseif min == 0x04 then + minorText = "getNumberOfTasksRequest" + elseif min == 0x05 then + minorText = "getTaskRequest" + elseif min == 0x06 then + minorText = "setTaskRequest" + elseif min == 0x07 then + minorText= "addTaskRequest" + elseif min == 0x08 then + minorText = "deleteTaskRequest" + elseif min == 0x09 then + minorText = "deleteAllTaskRequest" + elseif min == 0x0A then + minorText = "startTaskTransactionRequest" + elseif min == 0x0B then + minorText = "commitTaskTransactionRequest" + end + elseif maj == 0x5412 then -- ChargingStationCommands 4692 + subtree:add(automower_protocol_major_text, "ChargingStationCommands") + if min == 0x00 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x01 then + minorText = "subscribeEventChannelRequest" + elseif min == 0x02 then + minorText = "initiateNewPairingRequest" + elseif min == 0x03 then + minorText = "setMowerHouseInstalledRequest" + elseif min == 0x04 then + minorText = "getMowerHouseInstalledRequest" + elseif min == 0x05 then + minorText = "setEcoModeEnabledRequest" + elseif min == 0x06 then + minorText = "getEcoModeEnabledRequest" + elseif min == 0x07 then + minorText = "getAllSettingsRequest" + end + elseif maj == 0x5A12 then -- SystemCommands 4698 + subtree:add(automower_protocol_major_text, "SystemCommands") + if min == 0x0 then + minorText = "ClearStartupSequenceRequiredRequest" + elseif min == 0x01 then + minorText = "setStartupSequenceRequiredRequest" + elseif min == 0x02 then + minorText = "getStartupSequenceRequiredRequest" + elseif min == 0x03 then + minorText = "getUserMowerNameRequest" + elseif min == 0x04 then + minorText = "setUserMowerNameRequest" + elseif min == 0x05 then + minorText = "getUserMowerNameAsAciiStringRequest" + elseif min == 0x06 then + minorText = "setUserMowerNameAsAciiStringRequest" + elseif min == 0x07 then + minorText = "getLocalHmiAvailableRequest" + elseif min == 0x08 then + minorText = "resetToUserDefaultRequest" + elseif min == 0x09 then + minorText = "getModelRequest" + elseif min == 0x0A then + minorText = "getSerialNumberRequest" + elseif min == 0x0C then + minorText = "getConfigVersionStringRequest" + elseif min == 0x0E then + minorText = "getProductionTimeRequest" + elseif min == 0x14 then + minorText = "getSwUpdateRequiredRequest" + elseif min == 0x16 then + minorText = "getSwPackageVersionStringRequest" + elseif min == 0x27 then + minorText = "getForcedSwUpdateRequiredRequest" + end + elseif maj == 0x6212 then -- FollowWireCommands 4706 + subtree:add(automower_protocol_major_text, "FollowWireCommands") + if min == 0x00 then + minorText = "getBoundaryCorridorRequest" + elseif min == 0x01 then + minorText = "setBoundaryCorridorRequest" + elseif min == 0x02 then + minorText = "getGuideCorridorRequest" + elseif min == 0x03 then + minorText = "setGuideCorridorRequest" + elseif min == 0x06 then + minorText = "getStartingPointEnabledRequest" + elseif min == 0x07 then + minorText = "setStartingPointEnabledRequest" + elseif min == 0x08 then + minorText = "getStartingPointWireRequest" + elseif min == 0x09 then + minorText = "setStartingPointWireRequest" + elseif min == 0x0A then + minorText = "getStartingPointDistanceRequest" + elseif min == 0x0B then + minorText = "setStartingPointDistanceRequest" + elseif min == 0x0C then + minorText = "getStartingPointProportionRequest" + elseif min == 0x0D then + minorText = "setStartingPointProportionRequest" + elseif min == 0x0E then + minorText = "getNumberOfGuidesRequest" + elseif min == 0x0F then + minorText = "testStartingPointRequest" + elseif min == 0x10 then + minorText = "getCurrentDistanceRequest" + elseif min == 0x11 then + minorText = "testFollowInRequest" + elseif min == 0x12 then + minorText = "testAbortRequest" + elseif min == 0x13 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x14 then + minorText = "subscribeEventChannelRequest" + elseif min == 0x15 then + minorText = "getStartingPointSettingsRequest" + elseif min == 0x16 then + minorText = "getTestModeRequest" + elseif min == 0x17 then + minorText = "getTestStateRequest" + elseif min == 0x18 then + minorText = "getBoundaryCorridorRequestG4" + elseif min == 0x19 then + minorText = "setBoundaryCorridorRequestG4" + elseif min == 0x1A then + minorText = "getPassageCuttingEnabledRequestG4" + elseif min == 0x1B then + minorText = "setPassageCuttingEnabledRequestG4" + elseif min == 0x1C then + minorText = "getStartingPointMaxRequest" + elseif min == 0x1D then + minorText = "getTestErrorRequest" + end + elseif maj == 0x6412 then -- SearchChargingStationCommands 4708 + subtree:add(automower_protocol_major_text, "SearchChargingStationCommands") + if min == 0x00 then + minorText = "getSearchTypeAvailableRequest" + elseif min == 0x01 then + minorText = "getEnabledRequest" + elseif min == 0x02 then + minorText = "setEnabledRequest" + elseif min == 0x03 then + minorText = "getDelayTimeRequest" + elseif min == 0x04 then + minorText = "setDelayTimeRequest" + elseif min == 0x05 then + minorText = "getDirectSearchChargingStationRangeRequest" + elseif min == 0x06 then + minorText = "setDirectSearchChargingStationRangeRequest" + elseif min == 0x07 then + minorText = "getAllSettingsRequest" + elseif min == 0x08 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x09 then + minorText = "subscribeEventChannelRequest" + end + elseif maj == 0x6612 then -- SpotCuttingCommands 4710 + subtree:add(automower_protocol_major_text, "SpotCuttingCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x01 then + minorText = "getEnabledRequest" + elseif min == 0x02 then + minorText = "setEnabledRequest" + elseif min == 0x03 then + minorText = "getSensitivityRequest" + elseif min == 0x04 then + minorText = "setSensitivityRequest" + elseif min == 0x05 then + minorText = "getAllSettingsRequest" + elseif min == 0x06 then + minorText = "setAvailableRequest" + elseif min == 0x07 then + minorText = "startTriggerRequest" + elseif min == 0x08 then + minorText = "abortRequest" + elseif min == 0x09 then + minorText = "getStatusRequest" + elseif min == 0x0A then + minorText = "subscribeAllEventsRequest" + end + elseif maj == 0x6812 then -- DrivingSettingsCommands 4712 + subtree:add(automower_protocol_major_text, "DrivingSettingsCommands") + if min == 0x00 then + minorText = "getDrivePastWireRequest" + elseif min == 0x01 then + minorText = "setDrivePastWireRequest" + elseif min == 0x02 then + minorText = "getAllSettingsRequest" + elseif min == 0x09 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x0A then + minorText = "subscribeEventChannelRequest" + elseif min == 0x0B then + minorText = "getBounceEnabledRequest" + elseif min == 0x0C then + minorText = "setBounceEnabledRequest" + elseif min == 0x0D then + minorText = "getBounceSlopeOnlyRequest" + elseif min == 0x0E then + minorText = "setBounceSlopeOnlyRequest" + end + elseif maj == 0x6C12 then -- LeaveChargingStationCommands 4716 + subtree:add(automower_protocol_major_text, "LeaveChargingStationCommands") + if min == 0x00 then + minorText = "getReversingDistanceRequest" + elseif min == 0x01 then + minorText = "setReversingDistanceRequest" + elseif min == 0x03 then + minorText = "setMinAngleSector1Request" + elseif min == 0x05 then + minorText = "setMaxAngleSector1Request" + elseif min == 0x07 then + minorText = "setMinAngleSector2Request" + elseif min == 0x09 then + minorText = "setMaxAngleSector2Request" + elseif min == 0x0B then + minorText = "setSector1ProportionRequest" + elseif min == 0x0C then + minorText = "getAllSettingsRequest" + elseif min == 0x0F then + minorText = "getAllSettingsRequestG4" + elseif min == 0x10 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x11 then + minorText = "subscribeEventChannelRequest" + end + elseif maj == 0x7612 then -- StatisticsCommands 4726 + subtree:add(automower_protocol_major_text, "StatisticsCommands") + if min == 0x00 then + minorText = "getAllStatisticsRequest" + elseif min == 0x01 then + minorText = "getTotalRunningTimeRequest" + elseif min == 0x02 then + minorText = "getTotalCuttingTimeRequest" + elseif min == 0x03 then + minorText = "getTotalChargingTimeRequest" + elseif min == 0x04 then + minorText = "getTotalSearchingTimeRequest" + elseif min == 0x05 then + minorText = "getNumberOfCollisionsRequest" + elseif min == 0x06 then + minorText = "getNumberOfChargingCyclesRequest" + elseif min == 0x07 then + minorText = "getCuttingBladeUsageTimeRequest" + elseif min == 0x08 then + minorText = "resetCuttingBladeUsageTimeRequest" + elseif min == 0x0A then + minorText = "subscribeAllStatisticsRequest" + end + elseif maj == 0x7812 then -- UltrasonicCommands 4728 + subtree:add(automower_protocol_major_text, "UltrasonicCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x01 then + minorText = "getEnabledRequest" + elseif min == 0x02 then + minorText = "setEnabledRequest" + elseif min == 0x03 then + minorText = "subscribeAllEventsRequest" + elseif min == 0x04 then + minorText = "getAllSettingsRequest" + end + elseif maj == 0x7A12 then -- MessagesCommands 4730 + subtree:add(automower_protocol_major_text, "MessagesCommands") + if min == 0x00 then + minorText = "getNumberOfMessagesRequest" + elseif min == 0x01 then + minorText = "getMessageRequest" + end + elseif maj == 0x7C12 then -- GpsNavigationCommands 4732 + subtree:add(automower_protocol_major_text, "GpsNavigationCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x01 then + minorText = "getEnabledRequest" + elseif min == 0x02 then + minorText = "setEnabledRequest" + elseif min == 0x03 then + minorText = "getStatusRequest" + end + elseif maj == 0x7E12 then -- GeoFenceCommands 4734 + subtree:add(automower_protocol_major_text, "GeoFenceCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + end + elseif maj == 0x8212 then -- AutomowerConnectCommands 4738 + subtree:add(automower_protocol_major_text, "AutomowerConnectCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x02 then + minorText = "setEnabledNoPinRequest" + elseif min == 0x03 then + minorText = "initiateNewPairingRequest" + elseif min == 0x04 then + minorText = "removeAllPairingsRequest" + elseif min == 0x05 then + minorText = "getPairingStatusRequest" + elseif min == 0x06 then + minorText = "getPairingCodeRequest" + elseif min == 0x07 then + minorText = "getConnectionStatusRequest" + elseif min == 0x08 then + minorText = "getSignalStrengthRequest" + elseif min == 0x10 then + minorText = "getConnectionStatsRequest" + end + elseif maj == 0x5413 then -- ModemCommands 4948 + subtree:add(automower_protocol_major_text, "ModemCommands") + if min == 0x02 then + minorText = "getAvailableRequest" + end + elseif maj == 0x0414 then -- AuthenticationCommands 5124 + subtree:add(automower_protocol_major_text, "AuthenticationCommands") + if min == 0x0A then + minorText = "getRemainingLoginAttemptsRequest" + end + elseif maj == 0x9014 then -- PositionCommands 5264 + subtree:add(automower_protocol_major_text, "PositionCommands") + if min == 0x04 then + minorText = "getAvailableRequest" + end + elseif maj == 0xEC14 then -- ObstacleAvoidance 5356 + subtree:add(automower_protocol_major_text, "ObstacleAvoidance") + if min == 0x00 then + minorText = "subscribeSettingsEventsRequest" + elseif min == 0x02 then + minorText = "getAvailableRequest" + elseif min == 0x03 then + minorText = "setEnabledRequest" + elseif min == 0x04 then + minorText = "getEnabledRequest" + elseif min == 0x05 then + minorText = "setUseAtBoundaryRequest" + elseif min == 0x06 then + minorText = "getUseAtBoundaryRequest" + elseif min == 0x07 then + minorText = "getAllSettingsRequest" + end + elseif maj == 0xFA14 then -- FrostSensorCommands 5370 + subtree:add(automower_protocol_major_text, "FrostSensorCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x01 then + minorText = "getEnabledRequest" + elseif min == 0x02 then + minorText = "setEnabledRequest" + elseif min == 0x03 then + minorText = "getSleepTimeRequest" + elseif min == 0x04 then + minorText = "setSleepTimeRequest" + end + elseif maj == 0xCE15 then -- SystematicMissions 5582 + subtree:add(automower_protocol_major_text, "SystematicMissions") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x03 then + minorText = "setOrientationRequest" + elseif min == 0x04 then + minorText = "getOrientationRequest" + elseif min == 0x05 then + minorText = "setOrientationShiftRequest" + elseif min == 0x06 then + minorText = "getOrientationShiftRequest" + elseif min == 0x07 then + minorText = "getCurrentOrientationRequest" + elseif min == 0x0A then + minorText = "getBoundaryMowingEnabledRequest" + elseif min == 0x0B then + minorText = "getBoundaryMowingEnabledRequest" + end + elseif maj == 0xE815 then -- RandomMissionsCommands 5608 + subtree:add(automower_protocol_major_text, "RandomMissionsCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + end + elseif maj == 0x8C16 then -- SpotcuttingCommands 5772 + subtree:add(automower_protocol_major_text, "SpotCuttingCommands") + if min == 0x00 then + minorText = "getStateRequest" + elseif min == 0x01 then + minorText = "getDetailedLogEnabledRequest" + elseif min == 0x02 then + minorText = "setDetailedLogEnabledRequest" + elseif min == 0x03 then + minorText = "getUseCurrentEnabledRequest" + elseif min == 0x04 then + minorText = "setUseCurrentEnabledRequest" + elseif min == 0x05 then + minorText = "getMeanCutCurrentRequest" + elseif min == 0x06 then + minorText = "getMeanCutIntensityRequest" + elseif min == 0x07 then + minorText = "setMeanCutCurrentRequest" + elseif min == 0x08 then + minorText = "setMeanCutIntensityRequest" + elseif min == 0x09 then + minorText = "getAutoTrigCurrentRequest" + elseif min == 0x0A then + minorText = "getAutoTrigIntensityRequest" + end + elseif maj == 0x0C17 then -- SiteManagerCommands 5900 + subtree:add(automower_protocol_major_text, "SiteManagerCommands") + if min == 0x05 then + minorText = "getSiteNameRequest" + elseif min == 0x09 then + minorText = "getSiteUuidRequest" + elseif min == 0x0C then + minorText = "getCurrentSiteIdRequest" + elseif min == 0x11 then + minorText = "getAvailableRequest" + end + elseif maj == 0x1C17 then -- WifiCommands 5916 + subtree:add(automower_protocol_major_text, "WifiCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x01 then + minorText = "getEnabledRequest" + elseif min == 0x02 then + minorText = "setEnabledRequest" + end + elseif maj == 0x2617 then -- MobileLoopCommands 5926 + subtree:add(automower_protocol_major_text, "MobileLoopCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x01 then + minorText = "setAvailableRequest" + elseif min == 0x02 then + minorText = "getEnabledRequest" + elseif min == 0x03 then + minorText = "setEnabledRequest" + elseif min == 0x04 then + minorText = "getAllSettingsRequest" + elseif min == 0x05 then + minorText = "subscribeSettingsEventsRequest" + end + elseif maj == 0xA217 then -- MobileLoopCommands 6050 + subtree:add(automower_protocol_major_text, "MobileLoopCommands") + if min == 0x00 then + minorText = "getAvailableRequest" + elseif min == 0x01 then + minorText = "setAvailableRequest" + elseif min == 0x02 then + minorText = "getEnabledRequest" + elseif min == 0x03 then + minorText = "setEnabledRequest" + end + elseif maj == 0x1A18 then -- EposCommands 6170 + subtree:add(automower_protocol_major_text, "EposCommands") + if min == 0x01 then + minorText = "getAvailableRequest" + end + else + subtree:add(automower_protocol_major_text, "NotImplementedYet") + end + + subtree:add_le(automower_protocol_minor, tvb(14,1)) + if minorText ~= "" then + subtree:add(automower_protocol_minor_text, minorText) + end + + if is_request then + subtree:add_le(automower_request_length, tvb(16,1)) + subtree:add(automower_request_data, tvb(17, tvb:len() - 20)) + + local automower_request_data_le = "" + for i = tvb:len() - 4, 17, -1 do + automower_request_data_le = automower_request_data_le .. string.format("%02x", tvb(i, 1):uint()) + end + subtree:add(tvb(17, tvb:len() - 20), "Request Data (Little Endian): " .. automower_request_data_le) + else + subtree:add_le(automower_response_length, tvb(17,1)) + subtree:add(automower_response_data, tvb(19, tvb:len() - 21)) + + local automower_response_data_le = "" + for i = tvb:len() - 3, 19, -1 do + automower_response_data_le = automower_response_data_le .. string.format("%02x", tvb(i, 1):uint()) + end + subtree:add(tvb(19, tvb:len() - 21), "Response Data (Little Endian): " .. automower_response_data_le) + end + + subtree:add_le(automower_full_crc, tvb(tvb:len() - 2,1)) + + if not tvb(tvb:len() - 1,1):uint() == 0x03 then + undecoded_automower_protocol(tvb, pinfo, tree) + return + end + subtree:add_le(automower_footer, tvb(tvb:len() - 1,1)) + end + + register_postdissector(automower_reassembler) +end diff --git a/dissectors/ave-dominaplus/LICENSE b/dissectors/ave-dominaplus/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/ave-dominaplus/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/ave-dominaplus/README.md b/dissectors/ave-dominaplus/README.md new file mode 100644 index 0000000..131059a --- /dev/null +++ b/dissectors/ave-dominaplus/README.md @@ -0,0 +1,61 @@ +# AVE DominaPlus — serveur domotique AVE (WebSocket, port 14001) + +Dissecteur Wireshark Lua du **protocole du serveur domotique AVE +DominaPlus** (AVE S.p.A., Italie), échangé entre les clients +(application, tablettes) et le serveur Domina Plus sur WebSocket : +trames `STX commande [GS paramètres] [RS enregistrements] ETX CRC EOT`, +décodage de la commande (liste des zones, des appareils, des commandes +de plan, état et réglage des thermostats, variateurs, éclairage, volets, +scénarios, abonnements aux mises à jour…), des paramètres, des +enregistrements et de leurs champs, et vérification du CRC (XOR des +octets de STX à ETX, soustrait de `0xFF`). Pour les captures TCP brutes, +le script décode lui-même l'en-tête WebSocket (y compris le masquage). +Port TCP 14001. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/pyavedominaplus/pyavedominaplus (dossier `wireshark/`) | +| Commit importé | `670016da82d3c599eabd7bd3d9a13787a6d624c6` du 06/09/2026 (branche `main`, dernier commit ; dernière modification du script : `0a571c8` du 06/09/2026) | +| Licence amont | GPL-3.0-only (`LICENSE` GPL v3 à la racine ; aucun en-tête ni mention « or later » dans le script ou le README) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur AVE natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `ave_dominaplus.lua` | Protocole `ave_domina` : sous-protocole WebSocket `binary`, heuristique WebSocket et TCP 14001 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le reste du dépôt (bibliothèque Python, +script `extract_pcap.py`) n'est pas importé. + +## Utilisation + +Copier `ave_dominaplus.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer +`wireshark -X lua_script:ave_dominaplus.lua`, puis filtrer avec +`ave_domina`. Champs filtrables : `ave.command`, `ave.param`, +`ave.crc_valid`… + +## Remarques + +- **`bit32` absent des Wireshark récents** : le décodage WebSocket du + mode TCP brut appelle `bit32.band` et `bit32.bxor`, bibliothèque de + Lua 5.2 absente par défaut de Lua 5.3 et 5.4, seules versions prises + en charge depuis Wireshark 4.4 (qui fournit `bit` à la place). Sans + `bit32` global, ce chemin échoue (« attempt to index a nil value + (global 'bit32') ») ; le décodage via le dissecteur WebSocket natif + n'est pas concerné. Contournement local : ajouter `bit32 = bit` en tête + du fichier (code amont non modifié ici). +- S'enregistre sur le sous-protocole WebSocket générique `binary` et en + heuristique sur tout WebSocket : d'autres flux WebSocket binaires + commençant par `0x02` peuvent être pris pour de l'AVE. +- Les notes amont (README) détaillent des comportements observés sur des + captures réelles (`WSF` répondu par des `upd WS`, numérotation des + icônes…) ; ces captures ne sont pas publiées. +- Non vérifié dans Wireshark. diff --git a/dissectors/ave-dominaplus/ave_dominaplus.lua b/dissectors/ave-dominaplus/ave_dominaplus.lua new file mode 100644 index 0000000..5ad4b4d --- /dev/null +++ b/dissectors/ave-dominaplus/ave_dominaplus.lua @@ -0,0 +1,950 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/pyavedominaplus/pyavedominaplus (wireshark/ave_dominaplus.lua), +-- commit 670016da82d3c599eabd7bd3d9a13787a6d624c6 du 06/09/2026. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- AVE DominaPlus Wireshark Dissector +-- Place in Wireshark plugins directory or load via -X lua_script:ave_dominaplus.lua +-- +-- Protocol framing (over WebSocket text/binary on port 14001): +-- STX(0x02) + command [+ GS(0x1D) + param1 + GS + param2 ...] +-- [+ RS(0x1E) + rec1_f1 + GS + rec1_f2 ...] +-- + ETX(0x03) + CRC(2 hex chars) + EOT(0x04) + +local ave = Proto("ave_domina", "AVE DominaPlus") + +-- Protocol fields +local f_raw = ProtoField.string("ave.raw", "Raw Message") +local f_command = ProtoField.string("ave.command", "Command") +local f_cmd_desc = ProtoField.string("ave.cmd_desc", "Description") +local f_params = ProtoField.string("ave.params", "Parameters") +local f_param = ProtoField.string("ave.param", "Parameter") +local f_records = ProtoField.string("ave.records", "Records") +local f_record = ProtoField.string("ave.record", "Record") +local f_field = ProtoField.string("ave.field", "Field") +local f_crc = ProtoField.string("ave.crc", "CRC") +local f_crc_valid = ProtoField.bool ("ave.crc_valid", "CRC Valid") + +ave.fields = { + f_raw, f_command, f_cmd_desc, f_params, f_param, + f_records, f_record, f_field, f_crc, f_crc_valid, +} + +-- Control characters +local STX = 0x02 +local ETX = 0x03 +local EOT = 0x04 +local GS = 0x1D +local RS = 0x1E + +-- Command descriptions +local cmd_names = { + -- Client -> Server + ["LM"] = "List Maps (Areas)", + ["LDI"] = "List Devices", + ["LI2"] = "List Device Addresses", + ["LMC"] = "List Map Commands", + ["LML"] = "List Map Labels", + ["WTS"] = "Get Thermostat Status", + ["STS"] = "Set Thermostat Status", + ["WSF"] = "Get Device Status Family", + ["SU2"] = "Subscribe Updates 2", + ["SU3"] = "Subscribe Updates 3", + ["GTM"] = "Get Thermostat Mode", + ["GMA"] = "Get Marcia/Arresto", + ["GNA"] = "Get No Action", + ["GGS"] = "Get Global Security", + ["GSF"] = "Get Sensor Family", + ["PONG"] = "Pong", + ["PING"] = "Ping", + ["SIL"] = "Set Dimmer Level", + ["EBI"] = "Light/Energy Command", + ["EAI"] = "Shutter Command", + ["ES"] = "Execute Scenario", + ["EBC"] = "Execute Map Command", + ["TOO"] = "Thermostat Local Off", + ["TUU"] = "Thermostat Local Off (TS01)", + ["TTK"] = "Thermostat Keyboard Lock", + -- Server -> Client + ["lm"] = "List Maps Response", + ["ldi"] = "List Devices Response", + ["li2"] = "Device Addresses Response", + ["lmc"] = "Map Commands Response", + ["lml"] = "Map Labels Response", + ["wts"] = "Thermostat Status Response", + ["wsf"] = "Device Status Family Response", + ["gsf"] = "Sensor Family Response", + ["upd"] = "Status Update", + ["ack"] = "Acknowledgement", + ["ping"] = "Ping", + ["net"] = "Network Status", +} + +-- UPD subtypes +local upd_names = { + ["WS"] = "Device Status", + ["WT"] = "Thermostat", + ["TP"] = "Thermostat Set Point", + ["TM"] = "Thermostat Mode", + ["TK"] = "Thermostat Keyboard Lock", + ["TW"] = "Thermostat Window", + ["TLO"] = "Thermostat Local Off (map)", + ["TS"] = "Thermostat Season (map)", + ["TT"] = "Thermostat Temperature (map)", + ["TO"] = "Thermostat Offset (map)", + ["TL"] = "Thermostat Fan Level (map)", + ["TF"] = "Thermostat Function", + ["TR"] = "Thermostat Request", + ["UMI"] = "Humidity", + ["RGB"] = "RGB", + ["S"] = "Tutondo", + ["VI"] = "Vivaldi", + ["D"] = "Device Icon", + ["A"] = "Alarm", + ["X"] = "Antitheft Area", + ["GRP"] = "Group Dimmer", + ["epv"] = "Economizer", + ["htl"] = "Hotel", +} + +-- EBI (light) sub-commands +local ebi_subcmds = { + ["10"] = "Toggle", + ["11"] = "On", + ["12"] = "Off", + ["2"] = "Dimmer Step", + ["3"] = "Dimmer On", + ["4"] = "Dimmer Off", +} + +-- EAI (shutter) sub-commands +local eai_subcmds = { + ["8"] = "Open", + ["9"] = "Close", +} + +-- Thermostat mode values +local thermo_modes = { + ["0"] = "Auto (schedule)", + ["1"] = "Manual", + ["31"] = "Antifreeze", + ["A"] = "Auto (schedule)", + ["M"] = "Manual", +} + +-- Thermostat season values +local thermo_seasons = { + ["0"] = "Summer", + ["1"] = "Winter", + ["2"] = "All", +} + +-- Thermostat local off values +local thermo_local_off = { + ["0"] = "ON", + ["1"] = "OFF (local off)", +} + +-- Thermostat keyboard lock values +local thermo_keylock = { + ["0"] = "Unlocked", + ["1"] = "Locked", +} + +-- Shutter status values +local shutter_statuses = { + ["1"] = "Open", + ["2"] = "Opening", + ["3"] = "Closed", + ["4"] = "Closing", + ["5"] = "Stopped", +} + +-- UPD parameter layout. WS and WT carry a discriminator in params[2] +-- (device family / WT sub-type), so their device id is params[3] and the +-- value params[4]. Every other subtype observed on real hardware is +-- , , ... with the id in params[2]. Verified against the +-- captures in this repo: WS n=230 and WT n=202 are 4-param; TP, TM, TT, +-- TL, TK, TLO, TS, TO, TR, L and D are all 3-param. +local upd_id_at_3 = { + ["WS"] = true, + ["WT"] = true, +} + +-- Subtypes that carry no device id at all. +local upd_no_device = { + ["MS"] = true, + ["X"] = true, +} + +-- upd D reports the icon for a MAP COMMAND, not for a device. Confirmed on +-- real traffic: the map command pointing at a shutter receives one icon +-- update per status change of that shutter, while the shutter's own device +-- id receives almost none. Icon numbering is per device family - shutters +-- sit around 184 (185 open, 186 closed, 187 opening, 188 closing), lights +-- 147, dimmers 132 - and a D message does not say which family it belongs +-- to, so the raw icon id is shown rather than a guessed label. + +-- Light/dimmer on/off helper +local function light_status(val) + local n = tonumber(val) + if not n then return val end + if n == 0 then return "OFF" end + return "ON (" .. val .. ")" +end + +-- Dimmer level helper +local function dimmer_level(val) + local n = tonumber(val) + if not n then return val end + if n == 0 then return "OFF (0/31)" end + return "ON level=" .. val .. "/31" +end + +-- Format temperature from raw tenths-of-degree value +local function fmt_temp(val) + local n = tonumber(val) + if not n then return val end + return string.format("%.1f°C", n / 10.0) +end + +-- Device type names +local device_types = { + ["1"] = "Light", + ["2"] = "Dimmer", + ["3"] = "Shutter", + ["4"] = "Thermostat", + ["5"] = "Economizer", + ["6"] = "Scenario", + ["9"] = "Energy", + ["12"] = "P3000 Area", + ["13"] = "P3000 Sensor", + ["14"] = "Audio", + ["16"] = "Shutter (16)", + ["17"] = "Abano", + ["19"] = "Shutter (19)", + ["22"] = "Light (22)", +} + +-- WT (thermostat) sub-type names +local wt_subtypes = { + ["T"] = "Temperature", + ["S"] = "Season", + ["Z"] = "Local Off", + ["L"] = "Fan Level", + ["O"] = "Offset", +} + +-- Calculate CRC: XOR all bytes, subtract from 0xFF, return 2-char hex +local function calc_crc(data) + local crc = 0 + for i = 1, #data do + crc = crc ~ data:byte(i) -- Lua 5.3+ native bitwise XOR + end + crc = 0xFF - crc + return string.format("%02X", crc) +end + +-- Split a string by a single-byte delimiter +local function split(str, delim_byte) + local parts = {} + local start = 1 + for i = 1, #str do + if str:byte(i) == delim_byte then + parts[#parts + 1] = str:sub(start, i - 1) + start = i + 1 + end + end + parts[#parts + 1] = str:sub(start) + return parts +end + +-- Build a human-readable info string for a parsed message +local function build_info(command, params, records) + local info = command + local desc = cmd_names[command] + if desc then + info = info .. " (" .. desc .. ")" + end + + -- Add contextual detail based on command type + if command == "upd" or command == "UPD" then + if #params >= 1 then + local sub = params[1] + local sub_desc = upd_names[sub] or sub + info = info .. " " .. sub_desc + local id_idx = upd_id_at_3[sub] and 3 or 2 + local val_idx = id_idx + 1 + if not upd_no_device[sub] and #params >= id_idx then + -- D identifies a map command; everything else a device + local id_label = (sub == "D") and " cmd=" or " dev=" + info = info .. id_label .. params[id_idx] + end + if sub == "WS" and #params >= 4 then + -- Device status: decode based on device type + local dt = params[2] or "" + if dt == "3" or dt == "16" or dt == "19" then + info = info .. " " .. (shutter_statuses[params[4]] or ("val=" .. params[4])) + elseif dt == "2" then + info = info .. " " .. dimmer_level(params[4]) + elseif dt == "1" or dt == "22" or dt == "9" then + info = info .. " " .. light_status(params[4]) + else + info = info .. " val=" .. params[4] + end + elseif sub == "WT" and #params >= 4 then + -- WT format: WT, sub_type, device_id, value + local wt_sub = params[2] or "" + local wt_name = wt_subtypes[wt_sub] or wt_sub + if wt_sub == "T" then + info = info .. " " .. wt_name .. " " .. fmt_temp(params[4]) + elseif wt_sub == "S" then + info = info .. " " .. (thermo_seasons[params[4]] or ("season=" .. params[4])) + elseif wt_sub == "Z" then + info = info .. " " .. (thermo_local_off[params[4]] or ("local_off=" .. params[4])) + elseif wt_sub == "L" then + info = info .. " fan=" .. params[4] + elseif wt_sub == "O" then + info = info .. " offset=" .. fmt_temp(params[4]) + else + info = info .. " " .. wt_name .. "=" .. params[4] + end + elseif sub == "TP" and #params >= val_idx then + info = info .. " setpoint=" .. fmt_temp(params[val_idx]) + elseif sub == "TM" and #params >= val_idx then + info = info .. " " .. (thermo_modes[params[val_idx]] + or ("mode=" .. params[val_idx])) + elseif sub == "TS" and #params >= val_idx then + info = info .. " " .. (thermo_seasons[params[val_idx]] + or ("season=" .. params[val_idx])) + elseif sub == "TLO" and #params >= val_idx then + info = info .. " " .. (thermo_local_off[params[val_idx]] + or ("local_off=" .. params[val_idx])) + elseif sub == "TT" and #params >= val_idx then + info = info .. " temp=" .. fmt_temp(params[val_idx]) + elseif sub == "TO" and #params >= val_idx then + info = info .. " offset=" .. fmt_temp(params[val_idx]) + elseif sub == "TL" and #params >= val_idx then + info = info .. " fan=" .. params[val_idx] + elseif sub == "TK" and #params >= val_idx then + info = info .. " " .. (thermo_keylock[params[val_idx]] + or ("lock=" .. params[val_idx])) + elseif sub == "UMI" and #params >= val_idx then + info = info .. " humidity=" .. params[val_idx] .. "%" + elseif sub == "D" and #params >= val_idx then + info = info .. " icon=" .. params[val_idx] + elseif #params >= val_idx then + info = info .. " val=" .. params[val_idx] + end + end + elseif command == "EBI" then + if #params >= 1 then info = info .. " dev=" .. params[1] end + if #params >= 2 then + local sub = ebi_subcmds[params[2]] or params[2] + info = info .. " " .. sub + end + elseif command == "EAI" then + if #params >= 1 then info = info .. " dev=" .. params[1] end + if #params >= 2 then + local sub = eai_subcmds[params[2]] or params[2] + info = info .. " " .. sub + end + elseif command == "STS" then + if #params >= 1 then info = info .. " dev=" .. params[1] end + if #records >= 1 and #records[1] >= 3 then + local season = thermo_seasons[records[1][1]] or records[1][1] + local mode = thermo_modes[records[1][2]] or records[1][2] + local sp = tonumber(records[1][3]) + if sp then sp = sp / 10.0 end + info = info .. " season=" .. season .. " mode=" .. mode + if sp then info = info .. " sp=" .. string.format("%.1f", sp) .. "°C" end + end + elseif command == "SIL" then + if #params >= 1 then info = info .. " dev=" .. params[1] end + if #records >= 1 and #records[1] >= 1 then + info = info .. " level=" .. records[1][1] + end + elseif command == "WTS" then + if #params >= 1 then info = info .. " dev=" .. params[1] end + elseif command == "wts" then + if #params >= 1 then info = info .. " dev=" .. params[1] end + if #records >= 1 and #records[1] >= 10 then + local r = records[1] + local temp = fmt_temp(r[6]) + local sp = fmt_temp(r[8]) + local season_bits = tonumber(r[5]) or 0 + local season = thermo_seasons[tostring(season_bits & 0x01)] or "?" + local mode = thermo_modes[r[7]] or r[7] + local lo = thermo_local_off[r[10]] or r[10] + info = info .. " " .. temp .. " sp=" .. sp .. " " .. season .. " " .. mode .. " " .. lo + end + elseif command == "WSF" or command == "wsf" then + if #params >= 1 then + local dt = device_types[params[1]] or params[1] + info = info .. " family=" .. dt + end + elseif command == "LMC" or command == "lmc" then + if #params >= 1 then info = info .. " area=" .. params[1] end + elseif command == "TOO" or command == "TUU" then + if #params >= 1 then info = info .. " dev=" .. params[1] end + if #params >= 2 then + -- TOO/TUU sends current local_off; server inverts it + -- So sending 0 means "currently ON → turn OFF", sending 1 means "currently OFF → turn ON" + if params[2] == "0" then + info = info .. " → Turn OFF" + elseif params[2] == "1" then + info = info .. " → Turn ON" + else + info = info .. " val=" .. params[2] + end + end + elseif command == "TTK" then + if #params >= 1 then info = info .. " dev=" .. params[1] end + elseif command == "ack" then + if #params >= 1 then info = info .. " " .. params[1] end + elseif command == "ldi" then + info = info .. " (" .. #records .. " devices)" + elseif command == "lm" then + info = info .. " (" .. #records .. " areas)" + end + + return info +end + +-- Parse a single message (between STX and EOT), add to tree +local function parse_message(tvb, offset, len, tree, pinfo, msg_num) + local msg_tree = tree:add(ave, tvb(offset, len), "Message " .. msg_num) + + -- Get message bytes as string + local raw = tvb(offset, len):string() + msg_tree:add(f_raw, tvb(offset, len), raw) + + -- Strip STX at start + local body_start = 1 + if raw:byte(1) == STX then + body_start = 2 + end + + -- Find ETX position + local etx_pos = nil + for i = body_start, #raw do + if raw:byte(i) == ETX then + etx_pos = i + break + end + end + + if not etx_pos then + msg_tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Missing ETX") + return + end + + -- Payload is between STX and ETX + local payload = raw:sub(body_start, etx_pos - 1) + + -- CRC is 2 chars after ETX (before EOT) + local crc_str = "" + if #raw >= etx_pos + 2 then + crc_str = raw:sub(etx_pos + 1, etx_pos + 2) + end + + -- Verify CRC (computed over STX + payload + ETX) + local crc_data = raw:sub(1, etx_pos) + local expected_crc = calc_crc(crc_data) + local crc_ok = (crc_str:upper() == expected_crc:upper()) + + local crc_offset = offset + etx_pos -- byte offset in tvb for CRC + if #raw >= etx_pos + 2 then + local crc_item = msg_tree:add(f_crc, tvb(crc_offset, 2), crc_str) + msg_tree:add(f_crc_valid, tvb(crc_offset, 2), crc_ok) + if not crc_ok then + crc_item:add_expert_info(PI_CHECKSUM, PI_WARN, + "CRC mismatch: got " .. crc_str .. " expected " .. expected_crc) + end + end + + -- Split on RS to get command+params and records + local pieces = split(payload, RS) + + -- First piece: command + GS-separated parameters + local fields = split(pieces[1], GS) + local command = fields[1] or "" + local params = {} + for i = 2, #fields do + params[#params + 1] = fields[i] + end + + -- Parse records + local records = {} + for i = 2, #pieces do + local rec_fields = split(pieces[i], GS) + records[#records + 1] = rec_fields + end + + -- Add command to tree + local cmd_desc = cmd_names[command] or "Unknown" + -- Find command position in tvb + local cmd_tvb_offset = offset + body_start - 1 + local cmd_tvb_len = #command + msg_tree:add(f_command, tvb(cmd_tvb_offset, cmd_tvb_len), command) + msg_tree:add(f_cmd_desc, tvb(cmd_tvb_offset, cmd_tvb_len), cmd_desc) + + -- Add parameters + if #params > 0 then + local params_tree = msg_tree:add(f_params, tvb(offset, len), + #params .. " parameter(s)") + for i, p in ipairs(params) do + local label = "Param " .. i .. ": " .. p + + -- Add contextual labels + if command == "EBI" then + if i == 1 then label = "Device ID: " .. p + elseif i == 2 then label = "Action: " .. (ebi_subcmds[p] or p) end + elseif command == "EAI" then + if i == 1 then label = "Device ID: " .. p + elseif i == 2 then label = "Action: " .. (eai_subcmds[p] or p) end + elseif command == "STS" or command == "WTS" or command == "wts" + or command == "TOO" or command == "TUU" or command == "TTK" then + if i == 1 then label = "Device ID: " .. p end + if (command == "TOO" or command == "TUU") and i == 2 then + if p == "0" then + label = "Current State: ON (server will turn OFF)" + elseif p == "1" then + label = "Current State: OFF (server will turn ON)" + else + label = "Local Off: " .. p + end + end + if command == "TTK" and i == 2 then + label = "Lock: " .. (thermo_keylock[p] or p) + end + elseif command == "SIL" then + if i == 1 then label = "Device ID: " .. p end + elseif command == "WSF" or command == "wsf" then + -- Note: no capture in this repo contains a lowercase "wsf" + -- record response. Real hardware answers WSF with a stream + -- of individual "upd WS " messages + -- (122 of them across the captures, 0 wsf). The wsf branch + -- is kept for firmware that does reply that way. + if i == 1 then + label = "Family: " .. (device_types[p] or p) + end + elseif command == "upd" then + local sub = params[1] or "" + if i == 1 then label = "Type: " .. (upd_names[p] or p) + elseif i == 2 then + if sub == "WS" then + label = "Device Type: " .. (device_types[p] or p) + elseif sub == "WT" then + label = "Sub-type: " .. (wt_subtypes[p] or p) + elseif sub == "D" then + label = "Map Command ID: " .. p + elseif upd_no_device[sub] then + label = "Value: " .. p + else + label = "Device ID: " .. p + end + elseif i == 3 then + if sub == "WS" then label = "Device ID: " .. p + elseif sub == "WT" then label = "Device ID: " .. p + elseif sub == "D" then label = "Icon: " .. p + else label = "Value: " .. p end + elseif i == 4 then + if sub == "WS" then + local dt = params[2] or "" + if dt == "3" or dt == "16" or dt == "19" then + label = "Status: " .. (shutter_statuses[p] or p) + elseif dt == "2" then + label = "Status: " .. dimmer_level(p) + elseif dt == "1" or dt == "22" or dt == "9" then + label = "Status: " .. light_status(p) + else + label = "Status: " .. p + end + elseif sub == "WT" then + local wt_sub = params[2] or "" + if wt_sub == "T" then + label = "Temperature: " .. fmt_temp(p) + elseif wt_sub == "S" then + label = "Season: " .. (thermo_seasons[p] or p) + elseif wt_sub == "Z" then + label = "Local Off: " .. (thermo_local_off[p] or p) + elseif wt_sub == "L" then + label = "Fan Level: " .. p + elseif wt_sub == "O" then + label = "Offset: " .. fmt_temp(p) + else + label = "Value: " .. p + end + elseif sub == "TP" then + label = "Set Point: " .. fmt_temp(p) + elseif sub == "TM" then + label = "Mode: " .. (thermo_modes[p] or p) + elseif sub == "TS" then + label = "Season: " .. (thermo_seasons[p] or p) + elseif sub == "TLO" then + label = "Local Off: " .. (thermo_local_off[p] or p) + elseif sub == "TT" then + label = "Temperature: " .. fmt_temp(p) + elseif sub == "TO" then + label = "Offset: " .. fmt_temp(p) + elseif sub == "TL" then + label = "Fan Level: " .. p + elseif sub == "TK" then + label = "Keyboard Lock: " .. (thermo_keylock[p] or p) + elseif sub == "UMI" then + label = "Humidity: " .. p .. "%" + else + label = "Value: " .. p + end + end + elseif command == "ack" then + if i == 1 then label = "Acked Command: " .. p end + elseif command == "LMC" or command == "lmc" then + if i == 1 then label = "Area ID: " .. p end + end + + params_tree:add(f_param, tvb(offset, len), label) + end + end + + -- Add records + if #records > 0 then + local rec_tree = msg_tree:add(f_records, tvb(offset, len), + #records .. " record(s)") + for i, rec in ipairs(records) do + local rec_label = "Record " .. i + -- Contextual record labels + if command == "STS" and #rec >= 3 then + local season = thermo_seasons[rec[1]] or rec[1] + local mode = thermo_modes[rec[2]] or rec[2] + local sp = tonumber(rec[3]) + if sp then sp = string.format("%.1f°C", sp / 10.0) else sp = rec[3] end + rec_label = "Season=" .. season .. " Mode=" .. mode .. " SP=" .. sp + elseif command == "SIL" and #rec >= 1 then + rec_label = "Level: " .. rec[1] + elseif (command == "ldi") and #rec >= 3 then + local dt = device_types[rec[3]] or ("type " .. rec[3]) + rec_label = "Dev " .. rec[1] .. ": " .. rec[2] .. " (" .. dt .. ")" + elseif (command == "lm") and #rec >= 3 then + rec_label = "Area " .. rec[1] .. ": " .. rec[2] .. " (order " .. rec[3] .. ")" + elseif (command == "wts") and #rec >= 10 then + -- WTS response: full thermostat status + local temp = fmt_temp(rec[6]) + local sp = fmt_temp(rec[8]) + local season_bits = tonumber(rec[5]) or 0 + local season = thermo_seasons[tostring(season_bits & 0x01)] or "?" + local mode = thermo_modes[rec[7]] or rec[7] + local lo = thermo_local_off[rec[10]] or rec[10] + rec_label = temp .. " sp=" .. sp .. " " .. season .. " " .. mode .. " " .. lo + elseif (command == "wsf") and #rec >= 2 then + -- WSF response: device status by family + local dev_id = rec[1] + local val = rec[2] + local family = params[1] or "" + if family == "3" or family == "16" or family == "19" then + rec_label = "Dev " .. dev_id .. ": " .. (shutter_statuses[val] or val) + elseif family == "2" then + rec_label = "Dev " .. dev_id .. ": " .. dimmer_level(val) + elseif family == "1" or family == "22" or family == "9" then + rec_label = "Dev " .. dev_id .. ": " .. light_status(val) + else + rec_label = "Dev " .. dev_id .. ": val=" .. val + end + elseif (command == "lmc") and #rec >= 3 then + rec_label = "Cmd " .. rec[1] .. ": " .. rec[2] .. " (type " .. rec[3] .. ")" + end + + local r_tree = rec_tree:add(f_record, tvb(offset, len), rec_label) + + -- Add decoded field labels + local field_labels = {} + if (command == "wts") and #rec >= 10 then + field_labels = { + [1] = "Fan On", + [2] = "Fan Level", + [3] = "Configuration", + [4] = "Offset: " .. fmt_temp(rec[4]), + [5] = "Season Bits", + [6] = "Temperature: " .. fmt_temp(rec[6]), + [7] = "Mode: " .. (thermo_modes[rec[7]] or rec[7]), + [8] = "Set Point: " .. fmt_temp(rec[8]), + [9] = "Antifreeze", + [10] = "Local Off: " .. (thermo_local_off[rec[10]] or rec[10]), + } + elseif (command == "wsf") and #rec >= 2 then + field_labels = { + [1] = "Device ID", + [2] = "Status", + } + elseif (command == "ldi") and #rec >= 3 then + field_labels = { + [1] = "Device ID", + [2] = "Name", + [3] = "Type: " .. (device_types[rec[3]] or rec[3]), + } + end + + for j, fld in ipairs(rec) do + local fl = field_labels[j] + if fl then + r_tree:add(f_field, tvb(offset, len), fl .. ": " .. fld) + else + r_tree:add(f_field, tvb(offset, len), "Field " .. j .. ": " .. fld) + end + end + end + end + + -- Build info column + local info = build_info(command, params, records) + msg_tree:set_text(info) + + return info +end + +-- Main dissector: parse AVE protocol messages (STX..EOT) from payload +function ave.dissector(tvb, pinfo, tree) + local length = tvb:len() + if length == 0 then return end + + pinfo.cols.protocol = "AVE DominaPlus" + + local main_tree = tree:add(ave, tvb(), "AVE DominaPlus Protocol") + local infos = {} + + -- Find message boundaries (STX to EOT) + local pos = 0 + local msg_num = 0 + while pos < length do + -- Find STX + local stx_pos = nil + for i = pos, length - 1 do + if tvb(i, 1):uint() == STX then + stx_pos = i + break + end + end + if not stx_pos then break end + + -- Find EOT + local eot_pos = nil + for i = stx_pos + 1, length - 1 do + if tvb(i, 1):uint() == EOT then + eot_pos = i + break + end + end + if not eot_pos then break end + + -- Parse this message + msg_num = msg_num + 1 + local msg_len = eot_pos - stx_pos + 1 + local info = parse_message(tvb, stx_pos, msg_len, main_tree, pinfo, msg_num) + if info then + infos[#infos + 1] = info + end + + pos = eot_pos + 1 + end + + if #infos > 0 then + pinfo.cols.info = table.concat(infos, " | ") + end +end + +-- ============================================================ +-- WebSocket frame parser for raw TCP captures on port 14001 +-- ============================================================ +-- Unmask a WebSocket payload using a 4-byte masking key +local function ws_unmask(payload, mask_key) + local unmasked = {} + for i = 1, #payload do + local mi = ((i - 1) % 4) + unmasked[i] = string.char(bit32.bxor(payload:byte(i), mask_key:byte(mi + 1))) + end + return table.concat(unmasked) +end + +-- Parse WebSocket frames from a TVB range starting at `offset`. +-- Returns a list of {payload_str=..., frame_offset=..., frame_len=...} +local function parse_ws_frames(tvb, offset, length) + local frames = {} + local pos = offset + while pos < length do + -- Need at least 2 bytes for frame header + if pos + 2 > length then break end + + local b0 = tvb(pos, 1):uint() + local b1 = tvb(pos + 1, 1):uint() + local opcode = bit32.band(b0, 0x0F) + local masked = bit32.band(b1, 0x80) ~= 0 + local payload_len = bit32.band(b1, 0x7F) + local header_len = 2 + + if payload_len == 126 then + if pos + 4 > length then break end + payload_len = tvb(pos + 2, 2):uint() + header_len = 4 + elseif payload_len == 127 then + if pos + 10 > length then break end + -- Use only the lower 32 bits (Lua number precision) + payload_len = tvb(pos + 6, 4):uint() + header_len = 10 + end + + local mask_key_str = nil + if masked then + if pos + header_len + 4 > length then break end + mask_key_str = tvb(pos + header_len, 4):raw() + header_len = header_len + 4 + end + + local frame_len = header_len + payload_len + if pos + frame_len > length then break end + + -- Only process data frames (text=1, binary=2) + if opcode == 1 or opcode == 2 then + local raw_payload = tvb(pos + header_len, payload_len):raw() + local payload_str + if masked and mask_key_str then + payload_str = ws_unmask(raw_payload, mask_key_str) + else + payload_str = raw_payload + end + frames[#frames + 1] = { + payload_str = payload_str, + frame_offset = pos, + frame_len = frame_len, + masked = masked, + } + end + + pos = pos + frame_len + end + return frames, pos +end + +-- TCP dissector for port 14001: handles WebSocket framing, then AVE protocol +local function ave_tcp_dissector(tvb, pinfo, tree) + local length = tvb:len() + if length == 0 then return end + + -- Skip HTTP handshake packets + local first_bytes = tvb(0, math.min(4, length)):string() + if first_bytes == "GET " or first_bytes == "HTTP" then + return + end + + -- Check if this looks like raw AVE protocol (starts with STX) + if tvb(0, 1):uint() == STX then + ave.dissector(tvb, pinfo, tree) + return + end + + -- Try to parse as WebSocket frames + local b0 = tvb(0, 1):uint() + local opcode = bit32.band(b0, 0x0F) + -- Valid WS opcodes: 0-2 (data), 8-10 (control) + if opcode > 2 and opcode < 8 then return end + if opcode > 10 then return end + + local frames, _ = parse_ws_frames(tvb, 0, length) + if #frames == 0 then return end + + pinfo.cols.protocol = "AVE DominaPlus" + local main_tree = tree:add(ave, tvb(), "AVE DominaPlus Protocol") + local infos = {} + local msg_num = 0 + + for _, frame in ipairs(frames) do + local payload = frame.payload_str + + -- Find AVE messages (STX..EOT) within the unmasked payload + local fpos = 1 + while fpos <= #payload do + -- Find STX + local stx = nil + for j = fpos, #payload do + if payload:byte(j) == STX then + stx = j + break + end + end + if not stx then break end + + -- Find EOT + local eot = nil + for j = stx + 1, #payload do + if payload:byte(j) == EOT then + eot = j + break + end + end + if not eot then break end + + -- Create a ByteArray from the unmasked message and wrap in TVB + local msg_str = payload:sub(stx, eot) + local ba = ByteArray.new() + ba:set_size(#msg_str) + for k = 1, #msg_str do + ba:set_index(k - 1, msg_str:byte(k)) + end + local msg_tvb = ba:tvb("AVE Message") + + msg_num = msg_num + 1 + local info = parse_message(msg_tvb, 0, #msg_str, main_tree, pinfo, msg_num) + if info then + infos[#infos + 1] = info + end + + fpos = eot + 1 + end + end + + if #infos > 0 then + pinfo.cols.info = table.concat(infos, " | ") + end +end + +-- ============================================================ +-- Registration +-- ============================================================ + +-- Register for WebSocket payload dissection (Wireshark handles unmasking) +local ws_binary_dissector = DissectorTable.get("ws.protocol") +if ws_binary_dissector then + ws_binary_dissector:add("binary", ave) +end + +-- Register as a heuristic on WebSocket payloads +local function ave_heuristic(tvb, pinfo, tree) + local length = tvb:len() + if length < 4 then return false end + + -- Check if first byte is STX + if tvb(0, 1):uint() ~= STX then return false end + + -- Check for at least one ETX and EOT + local has_etx = false + local has_eot = false + for i = 1, length - 1 do + local b = tvb(i, 1):uint() + if b == ETX then has_etx = true end + if b == EOT then has_eot = true end + if has_etx and has_eot then break end + end + if not (has_etx and has_eot) then return false end + + ave.dissector(tvb, pinfo, tree) + return true +end + +if pcall(function() + ave:register_heuristic("ws", ave_heuristic) +end) then + -- registered successfully +end + +-- Register on TCP port 14001 with WebSocket-aware dissector +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(14001, ave_tcp_dissector) diff --git a/dissectors/c10-tools-atac/LICENSE.txt b/dissectors/c10-tools-atac/LICENSE.txt new file mode 100644 index 0000000..ce1b5b8 --- /dev/null +++ b/dissectors/c10-tools-atac/LICENSE.txt @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Avionics Test and Analysis Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dissectors/c10-tools-atac/README.md b/dissectors/c10-tools-atac/README.md new file mode 100644 index 0000000..983644e --- /dev/null +++ b/dissectors/c10-tools-atac/README.md @@ -0,0 +1,71 @@ +# IRIG 106 Chapter 10 sur UDP (atac/c10-tools) + +Dissecteur Wireshark Lua des paquets de télémesure IRIG 106 Chapter 10 +transportés sur UDP selon le Chapter 10 / 11. Il vient de la boîte à +outils Python c10-tools d'Avionics Test and Analysis Corporation (ATAC). +Il décode l'en-tête de transport UDP (version, type de message, numéro +de séquence), puis l'en-tête du paquet Chapter 10 : motif de +synchronisation `0xEB25`, canal, longueurs, version, séquence, +drapeaux, type de données, compteur de temps relatif et somme de +contrôle (issue #532). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/atac/c10-tools (`c10_tools/wireshark_dissector.lua`) | +| Commit importé | `1562de718a92f4c4e0e30b4e6673dd9108f7077c` du 15/06/2022 (dernier commit de `master`) ; dernière modification du script : commit `1570135df507aea98a76b278efbdd1aa81537626` du 18/08/2020 | +| Licence amont | BSD-3-Clause (`LICENSE.txt` amont, © 2019 Avionics Test and Analysis Corporation ; aucune mention de licence dans le script). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur IRIG 106 / Chapter 10 dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE.txt` de ce dossier (copie +conforme du `LICENSE.txt` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/wireshark_dissector.lua` | Protocole `c10` (« Chapter 10 », ligne 44), inscrit sur UDP 2000 (variable globale `target_port`, ligne 15 ; inscription lignes 88 et 89) ; contrôle du motif de synchronisation ligne 51 | + +## Utilisation + +Copier `src/wireshark_dissector.lua` dans le dossier des plugins Lua +personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »), +puis recharger avec Ctrl+Maj+L, ou lancer `wireshark -X +lua_script:src/wireshark_dissector.lua`. Filtre : `c10`. Pour un autre +port que 2000, utiliser « Décoder comme… » (pas de préférence). + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. +Essai sur la capture de test amont `tests/test.pcap`. Elle n'est pas +copiée ici : elle fait 1 048 576 octets et elle est tronquée (« cut +short in the middle of a packet » après 1020 paquets). Elle contient +1020 datagrammes UDP 62360 → 2000 : + +| Essai | Résultat | +|---|---| +| 5 datagrammes au format de transport non segmenté (premier octet `0x01`) | tous décodés : en-tête de transport, « Sync Pattern: 0x25eb », canal, longueurs, « Data Type: 0x11 (Time data format 1) », « 0x00 (Computer Generated data format 0) », « 0x19 (Mil-STD-1553 data format 1) », compteur de temps relatif, somme de contrôle | +| 1014 datagrammes segmentés (premier octet `0x11`, en-tête de transport de 12 octets) | non décodés : le motif `25eb` n'est pas à l'octet 4, le script rend 0 (seule la colonne Protocole passe à « Chapter10 ») | +| Datagramme de 4 octets `01 43 01 00` (trame 324, en-tête de transport seul) | **erreur Lua** ligne 51 (`Range is out of bounds`) | + +## Limites constatées + +- Les paquets segmentés (type de message 1, « Todo » de l'amont ligne + 63) ne sont pas pris en charge ; dans la capture amont, c'est la + quasi-totalité du trafic. +- Les données du paquet (corps Time, 1553, PCM, etc.) ne sont pas + décodées : seul l'en-tête Chapter 10 de 24 octets l'est. L'en-tête + secondaire et la somme de contrôle ne sont pas vérifiés. +- La colonne Protocole passe à « Chapter10 » avant le contrôle du motif + de synchronisation, même pour les paquets refusés. +- Le script définit des variables globales (`target_port`, + `data_types`, `format`, `udp_table`). Elles peuvent entrer en + collision avec d'autres scripts Lua. +- Pas de contrôle de longueur : un datagramme de moins de 6 octets + provoque une erreur Lua. +- Champs affichés en texte libre (pas de champs filtrables) : seul le + filtre `c10` est disponible. diff --git a/dissectors/c10-tools-atac/src/wireshark_dissector.lua b/dissectors/c10-tools-atac/src/wireshark_dissector.lua new file mode 100644 index 0000000..0ed0121 --- /dev/null +++ b/dissectors/c10-tools-atac/src/wireshark_dissector.lua @@ -0,0 +1,89 @@ +-- SPDX-License-Identifier: BSD-3-Clause +-- Importé de https://github.com/atac/c10-tools (c10_tools/wireshark_dissector.lua), +-- commit 1562de718a92f4c4e0e30b4e6673dd9108f7077c du 15/06/2022 (dernière modification du fichier : +-- commit 1570135df507aea98a76b278efbdd1aa81537626 du 18/08/2020). +-- Licence amont : BSD-3-Clause (LICENSE.txt amont) — voir README.md et LICENSE.txt. + +-- This script is a dissector for wireshark that allows inspecting chapter 10 +-- data within a network capture. +-- +-- Installation: +-- Windows: Add to \AppData\Roaming\Wireshark\plugins +-- OSX: Add to /.wireshark/plugins + +-- Port to listen for +target_port = 2000 + +-- Convert a data type value to a type and format string. +data_types = { + 'Computer Generated', + 'PCM', + 'Time', + 'Mil-STD-1553', + 'Analog', + 'Discrete', + 'Message', + 'ARINC 429', + 'Video', + 'Image', + 'UART', + 'IEEE-1394', + 'Parallel', + 'Ethernet', + 'TSPI/CTS Data', + 'Controller Area Network Bus'} + +function format(data_type) + t = math.floor(tonumber(data_type) / 8.0) + f = data_type - (t * 8) + return string.format("%s data format %d", data_types[t + 1], f) +end + + +-- Declare our protocol. +chapter10_proto = Proto("c10", "Chapter 10") + +-- Create a function to dissect it. +function chapter10_proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "Chapter10" + + -- Ensure there is chapter 10 data in this packet. + if tostring(buffer(4, 2)) ~= '25eb' then + return 0 + end + + local subtree = tree:add(chapter10_proto, buffer(), "Chapter 10 Data") + + local trans = subtree:add(buffer(0, 4), "UDP Transport Header") + local trans_raw = buffer(0, 4) + trans:add(trans_raw(3, 1), "Version " .. trans_raw:bitfield(28, 4)) + trans:add(trans_raw(3, 1), "Message Type " .. trans_raw:bitfield(24, 4)) + trans:add(trans_raw(1, 3), "Sequence Number " .. trans_raw(1, 3):le_uint()) + + -- Todo: add actual support for segmented chapter 10 packets. + subtree = subtree:add(buffer(4), "Chapter 10 Packet") + buffer = buffer(4) + subtree:add(buffer(0, 2), "Sync Pattern: 0x" .. buffer(0, 2)) + subtree:add(buffer(2, 2), "Channel ID: " .. buffer(2, 2):le_int()) + subtree:add(buffer(4, 4), "Packet Length: " .. buffer(4, 4):le_int()) + subtree:add(buffer(8, 4), "Data Length: " .. buffer(8, 4):le_int()) + subtree:add(buffer(12, 1), "Header Version: " .. buffer(12, 1):le_uint()) + subtree:add(buffer(13, 1), "Sequence Number: " .. buffer(13, 1):le_uint()) + subtree:add(buffer(14, 1), "Flags: 0x" .. buffer(14, 1)) + subtree:add(buffer(15, 1), string.format("Data Type: 0x%s (%s)", + tostring(buffer(15, 1)), format(buffer(15, 1):le_uint()))) + local rtc_low = tostring(buffer(16, 3)):reverse() + local rtc_high = tostring(buffer(19, 3)):reverse() + local rtc = tonumber(rtc_high .. rtc_low, 16) + subtree:add(buffer(16, 6), "Relative Time Counter: " .. tostring(rtc)) + subtree:add(buffer(22, 2), "Header Checksum: 0x" .. buffer(22, 2)) + + -- subtree:add(buffer(0,2),"The first two bytes: " .. buffer(0,2)) + -- subtree = subtree:add(buffer(4,2),"The next two bytes") + -- subtree:add(buffer(2,1),"The 3rd byte: " .. buffer(2,1):uint()) + -- subtree:add(buffer(3,1),"The 4th byte: " .. buffer(3,1):uint()) +end + +-- Register our protocol to handle an arbitrary udp port +udp_table = DissectorTable.get("udp.port") +udp_table:add(target_port, chapter10_proto) diff --git a/dissectors/canaerospace-ubx/LICENSE b/dissectors/canaerospace-ubx/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/canaerospace-ubx/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/canaerospace-ubx/README.md b/dissectors/canaerospace-ubx/README.md new file mode 100644 index 0000000..5170050 --- /dev/null +++ b/dissectors/canaerospace-ubx/README.md @@ -0,0 +1,73 @@ +# CANaerospace (ubx) + +Dissecteur Wireshark Lua du protocole CANaerospace, couche applicative +légère pour bus CAN en avionique (Stock Flight Systems, spécification +1.7). Pour chaque trame CAN, il décode l'identifiant de paramètre +(table de 585 identifiants normalisés, 300 à 1800), l'identifiant de +nœud, le type de données, le code de service et le code de message, +puis la valeur, convertie selon son type (FLOAT, LONG, SHORT, etc.) et +son unité (issue #533). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ubx/CANaerospace-Wireshark-plugin (`src/canas-protocol.lua`, `src/utils.lua`) | +| Commit importé | `76adc5158f85dba77ca5505cd785eb3e47fc52e3` du 21/07/2026 (dernier commit de `master`, dernière modification de `utils.lua`) ; dernière modification de `canas-protocol.lua` : commit `baff5f8be9da966967186e3fe222005e09c2bf56` du 01/01/2026 | +| Licence amont | GPL-3.0-or-later (en-tête « SPDX-License-Identifier: GPL-3.0-or-later » des deux fichiers, © 2019 Andreas Lüthi ; `LICENSE` amont : texte de la GPLv3). Identique à la licence de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur CANaerospace dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Les scripts sont repris tels quels (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête de chacun (convention du dépôt, issue #563). Les +en-têtes d'origine, avec leur propre ligne SPDX, suivent cette en-tête. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/canas-protocol.lua` | Protocole `canas` (« CANaerospace Protocol », ligne 38), `set_plugin_info` (ligne 23) ; chargement de `utils` par `require` (ligne 31). Il s'inscrit sur `sll.ltype` 12 (ligne 130), en « Décoder comme » sur `can.subdissector` (ligne 137) et sur `can.id` pour chaque identifiant de la table (ligne 149). Il tente aussi `wtap_encap` (lignes 159 et 164) | +| `src/utils.lua` | Décodage des valeurs (`utils.getValue`, ligne 453), unités par identifiant (ligne 122), tables des identifiants (ligne 459), des nœuds (ligne 1052), des types de données et des codes de service | + +## Utilisation + +Copier les deux fichiers de `src/` ensemble dans le dossier des plugins +Lua personnels de Wireshark (« Aide › À propos de Wireshark › +Dossiers »), puis recharger avec Ctrl+Maj+L, ou lancer `wireshark -X +lua_script:src/canas-protocol.lua`. Le script ajoute son propre dossier +au `package.path` pour trouver `utils.lua`. Ouvrir ensuite une capture +SocketCAN (`candump`, pcap de type `LINKTYPE_CAN_SOCKETCAN`). Filtres : +`canas`, `canas.canid == 315`, `canas.nodeid`, `canas.datatype`. + +## Vérification à l'import + +`luac5.4 -p` : OK pour les deux scripts. tshark 4.6.4, chargés par `-X +lua_script:` (depuis un autre dossier de travail), puis copiés dans le +dossier des plugins : aucun message au chargement. Capture synthétique +SocketCAN (type de lien 227) construite d'après la spécification : + +| Essai | Résultat | +|---|---| +| ID 315, nœud 10, FLOAT 61,5 | « Indicated Airspeed », « Node ID: GPS (10) », « Data Type: FLOAT (2) », « Data: 61.500 m/s (221.400 km/h) » | +| ID 300, FLOAT −1,25 | « Body Longitudinal Acceleration », « Data: -1.25 m/s2 » | +| ID 311, SHORT −12 | « Body Pitch Angle », « Data: -12 deg » | +| ID 1500, ULONG 42 | « ISU Sensor board temperature », « Data: 42 K » | +| ID 302, DLC 2 (en-tête CANaerospace incomplet) | seul « CAN ID » est affiché, sans erreur | +| ID 128 (service de nœud, hors table) | non décodé : reste en CAN | + +## Limites constatées + +- L'inscription se fait par identifiant (`can.id`), et seulement pour + ceux de la table (300 à 1800). Les services de nœud (NSH, identifiants + 128 à 199), les identifiants définis par l'utilisateur et les autres + plages restent en CAN brut, sauf avec « Décoder comme » sur + `can.subdissector`. +- Le chemin « trame CAN complète » (16 octets ou plus, ligne 60) + suppose l'en-tête SocketCAN ; non vérifié sur `sll.ltype` 12. +- Le type de données est lu tel quel ; les types non gérés par + `utils.lua` (« WIP: to be extended » amont) sont affichés en octets + bruts. +- Le code de message et la valeur ne sont pas des champs filtrables. +- Pas de capture réelle dans le dépôt amont (seule une copie d'écran, + non reprise). diff --git a/dissectors/canaerospace-ubx/src/canas-protocol.lua b/dissectors/canaerospace-ubx/src/canas-protocol.lua new file mode 100644 index 0000000..483e4b1 --- /dev/null +++ b/dissectors/canaerospace-ubx/src/canas-protocol.lua @@ -0,0 +1,167 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/ubx/CANaerospace-Wireshark-plugin (src/canas-protocol.lua), +-- commit 76adc5158f85dba77ca5505cd785eb3e47fc52e3 du 21/07/2026 (dernière modification du fichier : +-- commit baff5f8be9da966967186e3fe222005e09c2bf56 du 01/01/2026). +-- Licence amont : GPL-3.0-or-later (en-tête SPDX du fichier, LICENSE amont) — voir README.md et LICENSE. +-- +-- canas-protocol.lua: CANaerospace Wireshark Lua plugin +-- +-- Copyright (C) 2019 Andreas Lüthi +-- +-- SPDX-License-Identifier: GPL-3.0-or-later +-- +-- +-- Run with: wireshark -X lua_script:canas-protocol.lua + + +-- Display version information for Wireshark +local plugin_info = { + version = "1.0.0", + author = "Andreas Lüthi", + repository = "https://github.com/ubx/CANaerospace-Wireshark-plugin" +} +set_plugin_info(plugin_info) + +-- Ensure we can load utils.lua if it's in the same directory as this script +local script_path = debug.getinfo(1).source:match("@?(.*[\\/])") +if script_path then + package.path = script_path .. "?.lua;" .. package.path +end + +local utils = require("utils") + +-- Compatibility for bitwise operations +local bit = bit or bit32 + +local can_id_field = Field.new("can.id") + +local canas_proto = Proto("canas", "CANaerospace Protocol") + +-- Proto header fields +local header_fields = { + canid = ProtoField.uint32("canas.canid", "CAN ID", base.DEC, utils.defaultIdentifierTable), + nodeid = ProtoField.uint8("canas.nodeid", "Node ID", base.DEC, utils.defaultNodeIdTable), + datatype = ProtoField.uint8("canas.datatype", "Data Type", base.DEC, utils.dataTypeTable), + servicecode = ProtoField.uint8("canas.servicecode", "Service Code", base.DEC, utils.serviceCodeTable) +} +canas_proto.fields = header_fields + +-- create a function to dissect it +function canas_proto.dissector(buffer, pinfo, tree) + --- print("[CANAS] Dissector called! Length: " .. buffer:len()) + + pinfo.cols.protocol = "CANaerospace" + local subtree = tree:add(canas_proto, buffer(), "CANaerospace Protocol Data") + + local canId + local aerospace_buffer + local aerospace_offset + + if buffer:len() >= 16 then + -- Assume full CAN frame (e.g. from Linux SocketCAN) + -- Bytes 0-3: CAN ID (little-endian, includes flags) + local can_subtree = subtree:add(buffer(0, 8), "CAN Frame") + local raw_canid = buffer(0, 4):le_uint() + canId = bit.band(raw_canid, 0x1FFFFFFF) + + can_subtree:add(header_fields.canid, buffer(0, 4), canId) + + local is_xtd = bit.band(raw_canid, 0x80000000) ~= 0 + local is_rtr = bit.band(raw_canid, 0x40000000) ~= 0 + local is_err = bit.band(raw_canid, 0x20000000) ~= 0 + + can_subtree:add(buffer(0, 4), "Flags: " .. + (is_xtd and "XTD " or "") .. + (is_rtr and "RTR " or "") .. + (is_err and "ERR" or "")) + + can_subtree:add(buffer(4, 1), "DLC: " .. buffer(4, 1):uint()) + can_subtree:add(buffer(5, 3), "Reserved") + + aerospace_buffer = buffer(8, 8) + aerospace_offset = 8 + else + -- Assume CAN payload (e.g. from can.subdissector) + -- We need to get the CAN ID from the parent dissector + local can_id_info = can_id_field() + if can_id_info then + canId = can_id_info.value + else + canId = 0 -- Default if not found + end + + aerospace_buffer = buffer(0, buffer:len()) + aerospace_offset = 0 + end + + -- CANaerospace part + local aerospace_subtree = subtree:add(aerospace_buffer, "CANaerospace") + + if canId then + local canid_range = (aerospace_offset == 8) and buffer(0, 4) or buffer(0,0) + aerospace_subtree:add(header_fields.canid, canid_range, canId) + end + + if aerospace_buffer:len() < 4 then + return + end + + aerospace_subtree:add(header_fields.nodeid, aerospace_buffer(0, 1), aerospace_buffer(0, 1):uint()) + local dataType = aerospace_buffer(1, 1):uint() + aerospace_subtree:add(header_fields.datatype, aerospace_buffer(1, 1), dataType) + aerospace_subtree:add(header_fields.servicecode, aerospace_buffer(2, 1), aerospace_buffer(2, 1):uint()) + aerospace_subtree:add(aerospace_buffer(3, 1), "Message Code: " .. aerospace_buffer(3, 1):uint()) + + if aerospace_buffer:len() > 4 then + local data_len = aerospace_buffer:len() - 4 + aerospace_subtree:add(aerospace_buffer(4, data_len), "Data: " .. utils.getValue(aerospace_buffer(4, data_len), dataType, canId)) + end + + local info = utils.defaultIdentifierTable[canId] + if info == nil then + info = "Identifier " .. canId + end + pinfo.cols.info = info +end + +local sll_dissector_table = DissectorTable.get("sll.ltype") +if sll_dissector_table then + pcall(function() + sll_dissector_table:add(12, canas_proto) + end) +end + +local can_dissector_table = DissectorTable.get("can.subdissector") +if can_dissector_table then + pcall(function() + can_dissector_table:add_for_decode_as(canas_proto) + end) +end + +-- Also register for standard CAN ID based dissection if possible +-- Some Wireshark versions use "can.id" +local can_id_table = DissectorTable.get("can.id") +if can_id_table then + -- Some Wireshark versions don't support add_for_decode_as for can.id. + -- We'll add it for all CANaerospace IDs defined in utils.defaultIdentifierTable. + for id, _ in pairs(utils.defaultIdentifierTable) do + pcall(function() + can_id_table:add(id, canas_proto) + end) + end +end + +-- Try to register for Link Layer types if they are used directly +local wtap_table = DissectorTable.get("wtap_encap") +if wtap_table then + if wtap and wtap.CANRAW then + pcall(function() + wtap_table:add(wtap.CANRAW, canas_proto) + end) + end + if wtap and wtap.CAN_ETH then + pcall(function() + wtap_table:add(wtap.CAN_ETH, canas_proto) + end) + end +end diff --git a/dissectors/canaerospace-ubx/src/utils.lua b/dissectors/canaerospace-ubx/src/utils.lua new file mode 100644 index 0000000..278d03a --- /dev/null +++ b/dissectors/canaerospace-ubx/src/utils.lua @@ -0,0 +1,1121 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/ubx/CANaerospace-Wireshark-plugin (src/utils.lua), +-- commit 76adc5158f85dba77ca5505cd785eb3e47fc52e3 du 21/07/2026 (dernière modification du fichier : +-- commit 76adc5158f85dba77ca5505cd785eb3e47fc52e3 du 21/07/2026). +-- Licence amont : GPL-3.0-or-later (en-tête SPDX du fichier, LICENSE amont) — voir README.md et LICENSE. +-- +-- Copyright (C) 2019 Andreas Lüthi +-- +-- SPDX-License-Identifier: GPL-3.0-or-later +-- + +local utils = {} + +-- interpret buffer according to https://www.stockflightsystems.com/tl_files/downloads/canaerospace/canas_17.pdf +-- WIP: to be extended ! +local function getValue4DataType(buffer, dataType) + if dataType == 2 then -- FLOAT + if buffer:len() < 4 then return buffer end + return buffer:float() + elseif dataType == 3 then -- LONG + if buffer:len() < 4 then return buffer end + return buffer:int() + elseif dataType == 4 then -- ULONG + if buffer:len() < 4 then return buffer end + return buffer:uint() + elseif dataType == 5 then -- BLONG + if buffer:len() < 4 then return buffer end + return string.format("0x%08X", buffer:uint()) + elseif dataType == 6 then -- SHORT + if buffer:len() < 2 then return buffer end + return buffer(0, 2):int() + elseif dataType == 7 then -- USHORT + if buffer:len() < 2 then return buffer end + return buffer(0, 2):uint() + elseif dataType == 8 then -- BSHORT + if buffer:len() < 2 then return buffer end + return string.format("0x%04X", buffer(0, 2):uint()) + elseif dataType == 9 then -- CHAR + if buffer:len() < 1 then return buffer end + return buffer(0, 1):int() + elseif dataType == 10 then -- UCHAR + if buffer:len() < 1 then return buffer end + return buffer(0, 1):uint() + elseif dataType == 11 then -- BCHAR + if buffer:len() < 1 then return buffer end + return string.format("0x%02X", buffer(0, 1):uint()) + elseif dataType == 12 then -- SHORT2 + if buffer:len() < 4 then return buffer end + return buffer(0, 2):int() .. ", " .. buffer(2, 2):int() + elseif dataType == 13 then -- USHORT2 + if buffer:len() < 4 then return buffer end + return buffer(0, 2):uint() .. ", " .. buffer(2, 2):uint() + elseif dataType == 14 then -- BSHORT2 + if buffer:len() < 4 then return buffer end + return string.format("0x%04X, 0x%04X", buffer(0, 2):uint(), buffer(2, 2):uint()) + elseif dataType == 15 then -- CHAR4 + if buffer:len() < 4 then return buffer end + return buffer(0, 1):int() .. ", " .. buffer(1, 1):int() .. ", " .. buffer(2, 1):int() .. ", " .. buffer(3, 1):int() + elseif dataType == 16 then -- UCHAR4 + if buffer:len() < 4 then return buffer end + return buffer(0, 1):uint() .. ", " .. buffer(1, 1):uint() .. ", " .. buffer(2, 1):uint() .. ", " .. buffer(3, 1):uint() + elseif dataType == 17 then -- BCHAR4 + if buffer:len() < 4 then return buffer end + return string.format("0x%02X, 0x%02X, 0x%02X, 0x%02X", buffer(0, 1):uint(), buffer(1, 1):uint(), buffer(2, 1):uint(), buffer(3, 1):uint()) + elseif dataType == 18 then -- CHAR2 + if buffer:len() < 2 then return buffer end + return buffer(0, 1):int() .. ", " .. buffer(1, 1):int() + elseif dataType == 19 then -- UCHAR2 + if buffer:len() < 2 then return buffer end + return buffer(0, 1):uint() .. ", " .. buffer(1, 1):uint() + elseif dataType == 20 then -- BCHAR2 + if buffer:len() < 2 then return buffer end + return string.format("0x%02X, 0x%02X", buffer(0, 1):uint(), buffer(1, 1):uint()) + elseif dataType == 21 then -- MEMID + if buffer:len() < 4 then return buffer end + return "MEMID: " .. buffer:uint() + elseif dataType == 22 then -- CHKSUM + if buffer:len() < 4 then return buffer end + return "CHKSUM: " .. buffer:uint() + elseif dataType == 23 then -- ACHAR + if buffer:len() < 1 then return buffer end + return "'" .. buffer(0, 1):string() .. "'" + elseif dataType == 30 then -- DOUBLEH + if buffer:len() < 4 then return buffer end + return "DOUBLEH: " .. buffer:uint() + elseif dataType == 31 then -- DOUBLEL + if buffer:len() < 4 then return buffer end + return "DOUBLEL: " .. buffer:uint() + else + return buffer + end +end + +local function formatSpeed(value) return string.format("%.3f m/s (%.3f km/h)", value, value * 3.6) end +local function formatDegree(value) return value / 1E7 .. " deg" end +local function formatAcceleration(value) return value .. " m/s2" end +local function formatRate(value) return value .. " deg/s" end +local function formatAngle(value) return value .. " deg" end +local function formatPercent(value) return value .. " %" end +local function formatAltitude(value) return value .. " m" end +local function formatPressure(value) return value .. " hPa" end +local function formatTemperature(value) return value .. " K" end +local function formatVoltage(value) return value .. " V" end +local function formatCurrent(value) return value .. " A" end +local function formatFrequency(value) return value .. " MHz" end +local function formatFlow(value) return value .. " kg/h" end +local function formatTorque(value) return value .. " Nm" end +local function formatUnknown(value) return value .. " ???" end +local function formatFlapPos(value) + if type(value) == "string" then + local p, i = string.match(value, "(%d+),%s*(%d+)") + if p then return p / 100 .. " V, index " .. i end + elseif type(value) ~= "number" then + -- it's a TvbRange + return value(0, 1):uint() .. " %_, index_ " .. value(1, 1):uint() + end + return value .. " 0..254" +end + +-- format value according to https://files.stockflightsystems.com/_5_CANaerospace/canas_17.pdf +-- WIP: to be extended ! +local canIdFormattingTable = { + [300] = formatAcceleration, + [301] = formatAcceleration, + [302] = formatAcceleration, + [303] = formatRate, + [304] = formatRate, + [305] = formatRate, + [306] = formatPercent, + [307] = formatPercent, + [308] = formatPercent, + [309] = formatPercent, + [310] = formatPercent, + [311] = formatAngle, + [312] = formatAngle, + [313] = formatAngle, + [314] = formatSpeed, + [315] = formatSpeed, + [316] = formatSpeed, + [317] = formatSpeed, + [320] = formatAltitude, + [321] = formatAngle, + [322] = formatAltitude, + [323] = formatTemperature, + [324] = formatTemperature, + [325] = formatPressure, + [326] = formatPressure, + [327] = formatRate, + [330] = formatAltitude, + [331] = formatRate, + [332] = formatAltitude, + [333] = formatSpeed, + [334] = formatAngle, + [335] = formatTemperature, + [336] = formatSpeed, + [337] = formatSpeed, + [338] = formatSpeed, + [339] = formatPressure, + [340] = formatFlapPos, + [342] = formatPercent, + [348] = formatSpeed, + [349] = formatSpeed, + [350] = formatPressure, + [345] = formatSpeed, + [500] = formatPercent, + [501] = formatPercent, + [502] = formatPercent, + [503] = formatPercent, + [504] = formatPercent, + [505] = formatPercent, + [506] = formatPercent, + [507] = formatPercent, + [508] = formatTorque, + [509] = formatTorque, + [510] = formatTorque, + [511] = formatTorque, + [512] = formatTemperature, + [513] = formatTemperature, + [514] = formatTemperature, + [515] = formatTemperature, + [516] = formatTemperature, + [517] = formatTemperature, + [518] = formatTemperature, + [519] = formatTemperature, + [520] = formatTemperature, + [521] = formatTemperature, + [522] = formatTemperature, + [523] = formatTemperature, + [524] = formatFlow, + [525] = formatFlow, + [526] = formatFlow, + [527] = formatFlow, + [528] = formatPressure, + [529] = formatPressure, + [530] = formatPressure, + [531] = formatPressure, + [532] = formatPressure, + [533] = formatPressure, + [534] = formatPressure, + [535] = formatPressure, + [536] = formatTemperature, + [537] = formatTemperature, + [538] = formatTemperature, + [539] = formatTemperature, + [540] = formatTemperature, + [541] = formatTemperature, + [542] = formatTemperature, + [543] = formatTemperature, + [564] = formatPercent, + [565] = formatPercent, + [566] = formatPercent, + [567] = formatPercent, + [568] = formatPercent, + [569] = formatPercent, + [570] = formatPercent, + [571] = formatPercent, + [572] = formatTorque, + [573] = formatTorque, + [574] = formatTorque, + [575] = formatTorque, + [576] = formatTemperature, + [577] = formatTemperature, + [578] = formatTemperature, + [579] = formatTemperature, + [580] = formatTemperature, + [581] = formatTemperature, + [582] = formatTemperature, + [583] = formatTemperature, + [584] = formatTemperature, + [585] = formatTemperature, + [586] = formatTemperature, + [587] = formatTemperature, + [588] = formatFlow, + [589] = formatFlow, + [590] = formatFlow, + [591] = formatFlow, + [592] = formatPressure, + [593] = formatPressure, + [594] = formatPressure, + [595] = formatPressure, + [596] = formatPressure, + [597] = formatPressure, + [598] = formatPressure, + [599] = formatPressure, + [600] = formatTemperature, + [601] = formatTemperature, + [602] = formatTemperature, + [603] = formatTemperature, + [604] = formatTemperature, + [605] = formatTemperature, + [606] = formatTemperature, + [607] = formatTemperature, + [612] = formatTemperature, + [613] = formatTemperature, + [614] = formatTemperature, + [615] = formatTemperature, + [660] = formatFlow, + [661] = formatFlow, + [662] = formatFlow, + [663] = formatFlow, + [664] = formatFlow, + [665] = formatFlow, + [666] = formatFlow, + [667] = formatFlow, + [676] = formatTemperature, + [677] = formatTemperature, + [678] = formatTemperature, + [679] = formatTemperature, + [680] = formatTemperature, + [681] = formatTemperature, + [682] = formatTemperature, + [683] = formatTemperature, + [684] = formatPressure, + [685] = formatPressure, + [686] = formatPressure, + [687] = formatPressure, + [688] = formatPressure, + [689] = formatPressure, + [690] = formatPressure, + [691] = formatPressure, + [712] = formatPressure, + [713] = formatPressure, + [714] = formatPressure, + [715] = formatPressure, + [716] = formatPressure, + [717] = formatPressure, + [718] = formatPressure, + [719] = formatPressure, + [720] = formatTemperature, + [721] = formatTemperature, + [722] = formatTemperature, + [723] = formatTemperature, + [724] = formatTemperature, + [725] = formatTemperature, + [726] = formatTemperature, + [727] = formatTemperature, + [800] = formatPressure, + [801] = formatPressure, + [802] = formatPressure, + [803] = formatPressure, + [804] = formatPressure, + [805] = formatPressure, + [806] = formatPressure, + [807] = formatPressure, + [808] = formatTemperature, + [809] = formatTemperature, + [810] = formatTemperature, + [811] = formatTemperature, + [812] = formatTemperature, + [813] = formatTemperature, + [814] = formatTemperature, + [815] = formatTemperature, + [900] = formatVoltage, + [901] = formatVoltage, + [902] = formatVoltage, + [903] = formatVoltage, + [904] = formatVoltage, + [905] = formatVoltage, + [906] = formatVoltage, + [907] = formatVoltage, + [908] = formatVoltage, + [909] = formatVoltage, + [910] = formatCurrent, + [911] = formatCurrent, + [912] = formatCurrent, + [913] = formatCurrent, + [914] = formatCurrent, + [915] = formatCurrent, + [916] = formatCurrent, + [917] = formatCurrent, + [918] = formatCurrent, + [919] = formatCurrent, + [920] = formatVoltage, + [921] = formatVoltage, + [922] = formatVoltage, + [923] = formatVoltage, + [924] = formatVoltage, + [925] = formatVoltage, + [926] = formatVoltage, + [927] = formatVoltage, + [928] = formatVoltage, + [929] = formatVoltage, + [930] = formatCurrent, + [931] = formatCurrent, + [932] = formatCurrent, + [933] = formatCurrent, + [934] = formatCurrent, + [935] = formatCurrent, + [936] = formatCurrent, + [937] = formatCurrent, + [938] = formatCurrent, + [939] = formatCurrent, + [940] = formatCurrent, + [941] = formatCurrent, + [942] = formatCurrent, + [943] = formatCurrent, + [944] = formatCurrent, + [945] = formatCurrent, + [946] = formatCurrent, + [947] = formatCurrent, + [948] = formatCurrent, + [949] = formatCurrent, + [1000] = formatDegree, + [1001] = formatDegree, + [1003] = formatAltitude, + [1004] = formatSpeed, + [1005] = formatAngle, + [1006] = formatAngle, + [1017] = formatDegree, + [1018] = formatDegree, + [1019] = formatAltitude, + [1023] = formatAltitude, + [1027] = formatAltitude, + [1036] = formatDegree, + [1037] = formatDegree, + [1039] = formatSpeed, + [1040] = formatAngle, + [1041] = formatAngle, + [1049] = formatDegree, + [1050] = formatDegree, + [1052] = formatSpeed, + [1053] = formatAngle, + [1054] = formatAngle, + [1059] = formatDegree, + [1060] = formatDegree, + [1062] = formatSpeed, + [1063] = formatAngle, + [1064] = formatAngle, + [1069] = formatAngle, + [1070] = formatAltitude, + [1079] = formatSpeed, + [1080] = formatSpeed, + [1081] = formatSpeed, + [1082] = formatSpeed, + [1083] = formatAngle, + [1084] = formatAngle, + [1085] = formatAngle, + [1086] = formatAngle, + [1100] = formatFrequency, + [1101] = formatFrequency, + [1102] = formatFrequency, + [1103] = formatFrequency, + [1104] = formatFrequency, + [1105] = formatFrequency, + [1106] = formatFrequency, + [1107] = formatFrequency, + [1108] = formatFrequency, + [1109] = formatFrequency, + [1110] = formatFrequency, + [1111] = formatFrequency, + [1120] = formatAngle, + [1121] = formatAngle, + [1122] = formatAngle, + [1123] = formatAngle, + [1124] = formatSpeed, + [1125] = formatAngle, + [1126] = formatAngle, + [1127] = formatAngle, + [1128] = formatAngle, + [1129] = formatAngle, + [1130] = formatSpeed, + [1131] = formatSpeed, + [1132] = formatSpeed, + [1133] = formatAngle, + [1134] = formatUnknown, + [1135] = formatUnknown, + [1177] = formatPressure, + [1178] = formatPressure, + [1179] = formatPressure, + [1180] = formatPressure, + [1200] = function(value) return value(0, 1):uint() .. ":" .. value(1, 1):uint() .. ":" .. string.format("%02d", value(2, 1):uint()) .. " utc" end, + [1201] = formatPressure, + [1202] = formatAltitude, + [1203] = formatTemperature, + [1206] = function(value) return value(0, 1):uint() .. "." .. value(1, 1):uint() + 1 .. "." .. value(2, 1):uint() .. value(3, 1):uint() .. " date" end, + + [1500] = formatTemperature, + [1501] = formatPressure, + [1502] = formatAcceleration, + [1503] = formatAcceleration, + [1504] = formatAcceleration +} + +local function getValue4CanId(value, canId) + local formatFunc = canIdFormattingTable[canId] + if formatFunc then + return formatFunc(value) + else + return value + end +end + +function utils.getValue(buffer, dataType, canId) + return getValue4CanId(getValue4DataType(buffer, dataType), canId) +end + +-- default identifier, see https://www.stockflightsystems.com/tl_files/downloads/canaerospace/canas_17.pdf +-- WIP: to be completed ! +utils.defaultIdentifierTable = { + [300] = "Body Longitudinal Acceleration", + [301] = "Body Lateral Acceleration", + [302] = "Body Normal Acceleration", + [303] = "Body Pitch Rate", + [304] = "Body Roll Rate", + [305] = "Body Yaw Rate", + [306] = "Rudder Position", + [307] = "Stabilizer Position", + [308] = "Elevator Position", + [309] = "Left Aileron Position", + [310] = "Right Aileron Position", + [311] = "Body Pitch Angle", + [312] = "Body Roll Angle", + [313] = "Body Sideslip", + [314] = "Altitude Rate", + [315] = "Indicated Airspeed", + [316] = "True Airspeed", + [317] = "Calibrated Airspeed", + [318] = "Mach Number", + [319] = "Baro Correction", + [320] = "Baro Corrected Altitude", + [321] = "Heading Angle", + [322] = "Standard Altitude", + [323] = "Total Air Temperature [K]", + [324] = "Static Air Temperature [K]", + [325] = "Differential Pressure [hPa]", + [326] = "Static Pressure [hPa]", + [327] = "Heading Rate", + [328] = "Port Side Angle Of Attack", + [329] = "Starbord Side Angle Of Attack", + [330] = "Density Altitude", + [331] = "Turn Coordination Rate", + [332] = "True Altitude", + [333] = "Wind Speed", + [334] = "Wind Direction", + [335] = "Outside Air Temperature [K]", + [336] = "Body Normal Velocity", + [337] = "Body Longitudinal Velocity", + [338] = "Body Lateral Velocity", + [339] = "Total Pressure [hPa]", + [340] = "Flaps Position", + [341] = "Slats Position", + [342] = "Speed Brake Position", + [343] = "Spoiler Position", + [344] = "Total Velocity", + [345] = "Vertical Speed Of The Airmass", + [346] = "Port Horizontal Tail Angle Of Attack", + [347] = "Starboard Horizontal Tail Angle Of Attack", + [348] = "TEK Altitude Rate", + [349] = "TEK Altitude altitude", + [350] = "TEK pressure", + [354] = "Vertical speed of the airmass earth NED (negative is lift)", + + [400] = "Pitch Control Position", + [401] = "Roll Control Position", + [402] = "Lateral Stick Trim Position Command", + [403] = "Yaw Control Position", + [404] = "Collective Control Position", + [405] = "Longitudinal Stick Trim Position Command", + [406] = "Directional Pedals Trim Position Command", + [407] = "Collective Lever Trim Position Command", + [408] = "Cyclic Control Stick Switches", + [409] = "Lateral Trim Speed", + [410] = "Longitudinal Trim Speed", + [411] = "Pedal Trim Speed", + [412] = "Collective Trim Speed", + [413] = "Nose Wheel Steering Handle Position", + [414] = "Engine 1 Throttle Lever Position Ecs Channel A", + [415] = "Engine 2 Throttle Lever Position Ecs Channel A", + [416] = "Engine 3 Throttle Lever Position Ecs Channel A", + [417] = "Engine 4 Throttle Lever Position Ecs Channel A", + [418] = "Engine 1 Condition Lever Position Ecs Channel A", + [419] = "Engine 2 Condition Lever Position Ecs Channel A", + [420] = "Engine 3 Condition Lever Position Ecs Channel A", + [421] = "Engine 4 Condition Lever Position Ecs Channel A", + [422] = "Engine 1 Throttle Lever Position Ecs Channel B", + [423] = "Engine 2 Throttle Lever Position Ecs Channel B", + [424] = "Engine 3 Throttle Lever Position Ecs Channel B", + [425] = "Engine 4 Throttle Lever Position Ecs Channel B", + [426] = "Engine 1 Condition Lever Position Ecs Channel B", + [427] = "Engine 2 Condition Lever Position Ecs Channel B", + [428] = "Engine 3 Condition Lever Position Ecs Channel B", + [429] = "Engine 4 Condition Lever Position Ecs Channel B", + [430] = "Flaps Lever Position", + [431] = "Slats Lever Position", + [432] = "Park Brake Lever Position", + [433] = "Speedbrake Lever Position", + [434] = "Throttle Max Lever Position", + [435] = "Pilot Left Brake Pedal Position", + [436] = "Pilot Right Brake Pedal Position", + [437] = "Copilot Left Brake Pedal Position", + [438] = "Copilot Right Brake Pedal Position", + [439] = "Trim System Switches", + [440] = "Trim System Lights", + [441] = "Collective Control Stick Switches", + [442] = "Stick Shaker Stall Warning Device", + [500] = "Engine 1 N1 Ecs Channel A", + [501] = "Engine 2 N1 Ecs Channel A", + [502] = "Engine 3 N1 Ecs Channel A", + [503] = "Engine 4 N1 Ecs Channel A", + [504] = "Engine 1 N2 Ecs Channel A", + [505] = "Engine 2 N2 Ecs Channel A", + [506] = "Engine 3 N2 Ecs Channel A", + [507] = "Engine 4 N2 Ecs Channel A", + [508] = "Engine 1 Torque Ecs Channel A", + [509] = "Engine 2 Torque Ecs Channel A", + [510] = "Engine 3 Torque Ecs Channel A", + [511] = "Engine 4 Torque Ecs Channel A", + [512] = "Engine 1 Turbine Inlet Temperature Ecs Channel A", + [513] = "Engine 2 Turbine Inlet Temperature Ecs Channel A", + [514] = "Engine 3 Turbine Inlet Temperature Ecs Channel A", + [515] = "Engine 4 Turbine Inlet Temperature Ecs Channel A", + [516] = "Engine 1 Inter Turbine Temperature Ecs Channel A", + [517] = "Engine 2 Inter Turbine Temperature Ecs Channel A", + [518] = "Engine 3 Inter Turbine Temperature Ecs Channel A", + [519] = "Engine 4 Inter Turbine Temperature Ecs Channel A", + [520] = "Engine 1 Turbine Outlet Temperature Ecs Channel A", + [521] = "Engine 2 Turbine Outlet Temperature Ecs Channel A", + [522] = "Engine 3 Turbine Outlet Temperature Ecs Channel A", + [523] = "Engine 4 Turbine Outlet Temperature Ecs Channel A", + [524] = "Engine 1 Fuel Flow Rate Ecs Channel A", + [525] = "Engine 2 Fuel Flow Rate Ecs Channel A", + [526] = "Engine 3 Fuel Flow Rate Ecs Channel A", + [527] = "Engine 4 Fuel Flow Rate Ecs Channel A", + [528] = "Engine 1 Manifold Pressure Ecs Channel A", + [529] = "Engine 2 Manifold Pressure Ecs Channel A", + [530] = "Engine 3 Manifold Pressure Ecs Channel A", + [531] = "Engine 4 Manifold Pressure Ecs Channel A", + [532] = "Engine 1 Oil Pressure Ecs Channel A", + [533] = "Engine 2 Oil Pressure Ecs Channel A", + [534] = "Engine 3 Oil Pressure Ecs Channel A", + [535] = "Engine 4 Oil Pressure Ecs Channel A", + [536] = "Engine 1 Oil Temperature Ecs Channel A", + [537] = "Engine 2 Oil Temperature Ecs Channel A", + [538] = "Engine 3 Oil Temperature Ecs Channel A", + [539] = "Engine 4 Oil Temperature Ecs Channel A", + [540] = "Engine 1 Cylinder Head Temperature Ecs Channel A", + [541] = "Engine 2 Cylinder Head Temperature Ecs Channel A", + [542] = "Engine 3 Cylinder Head Temperature Ecs Channel A", + [543] = "Engine 4 Cylinder Head Temperature Ecs Channel A", + [544] = "Engine 1 Oil Quantity Ecs Channel A", + [545] = "Engine 2 Oil Quantity Ecs Channel A", + [546] = "Engine 3 Oil Quantity Ecs Channel A", + [547] = "Engine 4 Oil Quantity Ecs Channel A", + [548] = "Engine 1 Coolant Temperature Ecs Channel A", + [549] = "Engine 2 Coolant Temperature Ecs Channel A", + [550] = "Engine 3 Coolant Temperature Ecs Channel A", + [551] = "Engine 4 Coolant Temperature Ecs Channel A", + [552] = "Engine 1 Power Rating Ecs Channel A", + [553] = "Engine 2 Power Rating Ecs Channel A", + [554] = "Engine 3 Power Rating Ecs Channel A", + [555] = "Engine 4 Power Rating Ecs Channel A", + [556] = "Engine 1 Status 1 Ecs Channel A", + [557] = "Engine 2 Status 1 Ecs Channel A", + [558] = "Engine 3 Status 1 Ecs Channel A", + [559] = "Engine 4 Status 1 Ecs Channel A", + [560] = "Engine 1 Status 2 Ecs Channel A", + [561] = "Engine 2 Status 2 Ecs Channel A", + [562] = "Engine 3 Status 2 Ecs Channel A", + [563] = "Engine 4 Status 2 Ecs Channel A", + [564] = "Engine 1 N1 Ecs Channel B", + [565] = "Engine 2 N1 Ecs Channel B", + [566] = "Engine 3 N1 Ecs Channel B", + [567] = "Engine 4 N1 Ecs Channel B", + [568] = "Engine 1 N2 Ecs Channel B", + [569] = "Engine 2 N2 Ecs Channel B", + [570] = "Engine 3 N2 Ecs Channel B", + [571] = "Engine 4 N2 Ecs Channel B", + [572] = "Engine 1 Torque Ecs Channel B", + [573] = "Engine 2 Torque Ecs Channel B", + [574] = "Engine 3 Torque Ecs Channel B", + [575] = "Engine 4 Torque Ecs Channel B", + [576] = "Engine 1 Turbine Inlet Temperature Ecs Channel B", + [577] = "Engine 2 Turbine Inlet Temperature Ecs Channel B", + [578] = "Engine 3 Turbine Inlet Temperature Ecs Channel B", + [579] = "Engine 4 Turbine Inlet Temperature Ecs Channel B", + [580] = "Engine 1 Inter Turbine Temperature Ecs Channel B", + [581] = "Engine 2 Inter Turbine Temperature Ecs Channel B", + [582] = "Engine 3 Inter Turbine Temperature Ecs Channel B", + [583] = "Engine 4 Inter Turbine Temperature Ecs Channel B", + [584] = "Engine 1 Turbine Outlet Temperature Ecs Channel B", + [585] = "Engine 2 Turbine Outlet Temperature Ecs Channel B", + [586] = "Engine 3 Turbine Outlet Temperature Ecs Channel B", + [587] = "Engine 4 Turbine Outlet Temperature Ecs Channel B", + [588] = "Engine 1 Fuel Flow Rate Ecs Channel B", + [589] = "Engine 2 Fuel Flow Rate Ecs Channel B", + [590] = "Engine 3 Fuel Flow Rate Ecs Channel B", + [591] = "Engine 4 Fuel Flow Rate Ecs Channel B", + [592] = "Engine 1 Manifold Pressure Ecs Channel B", + [593] = "Engine 2 Manifold Pressure Ecs Channel B", + [594] = "Engine 3 Manifold Pressure Ecs Channel B", + [595] = "Engine 4 Manifold Pressure Ecs Channel B", + [596] = "Engine 1 Oil Pressure Ecs Channel B", + [597] = "Engine 2 Oil Pressure Ecs Channel B", + [598] = "Engine 3 Oil Pressure Ecs Channel B", + [599] = "Engine 4 Oil Pressure Ecs Channel B", + [600] = "Engine 1 Oil Temperature Ecs Channel B", + [601] = "Engine 2 Oil Temperature Ecs Channel B", + [602] = "Engine 3 Oil Temperature Ecs Channel B", + [603] = "Engine 4 Oil Temperature Ecs Channel B", + [604] = "Engine 1 Cylinder Head Temperature Ecs Channel B", + [605] = "Engine 2 Cylinder Head Temperature Ecs Channel B", + [606] = "Engine 3 Cylinder Head Temperature Ecs Channel B", + [607] = "Engine 4 Cylinder Head Temperature Ecs Channel B", + [608] = "Engine 1 Oil Quantity Ecs Channel B", + [609] = "Engine 2 Oil Quantity Ecs Channel B", + [610] = "Engine 3 Oil Quantity Ecs Channel B", + [611] = "Engine 4 Oil Quantity Ecs Channel B", + [612] = "Engine 1 Coolant Temperature Ecs Channel B", + [613] = "Engine 2 Coolant Temperature Ecs Channel B", + [614] = "Engine 3 Coolant Temperature Ecs Channel B", + [615] = "Engine 4 Coolant Temperature Ecs Channel B", + [616] = "Engine 1 Power Rating Ecs Channel B", + [617] = "Engine 2 Power Rating Ecs Channel B", + [618] = "Engine 3 Power Rating Ecs Channel B", + [619] = "Engine 4 Power Rating Ecs Channel B", + [620] = "Engine 1 Status 1 Ecs Channel B", + [621] = "Engine 2 Status 1 Ecs Channel B", + [622] = "Engine 3 Status 1 Ecs Channel B", + [623] = "Engine 4 Status 1 Ecs Channel B", + [624] = "Engine 1 Status 2 Ecs Channel B", + [625] = "Engine 2 Status 2 Ecs Channel B", + [626] = "Engine 3 Status 2 Ecs Channel B", + [627] = "Engine 4 Status 2 Ecs Channel B", + [660] = "Fuel Pump 1 Flow Rate", + [661] = "Fuel Pump 2 Flow Rate", + [662] = "Fuel Pump 3 Flow Rate", + [663] = "Fuel Pump 4 Flow Rate", + [664] = "Fuel Pump 5 Flow Rate", + [665] = "Fuel Pump 6 Flow Rate", + [666] = "Fuel Pump 7 Flow Rate", + [667] = "Fuel Pump 8 Flow Rate", + [668] = "Fuel Tank 1 Quantity", + [669] = "Fuel Tank 2 Quantity", + [670] = "Fuel Tank 3 Quantity", + [671] = "Fuel Tank 4 Quantity", + [672] = "Fuel Tank 5 Quantity", + [673] = "Fuel Tank 6 Quantity", + [674] = "Fuel Tank 7 Quantity", + [675] = "Fuel Tank 8 Quantity", + [676] = "Fuel Tank 1 Temperature", + [677] = "Fuel Tank 2 Temperature", + [678] = "Fuel Tank 3 Temperature", + [679] = "Fuel Tank 4 Temperature", + [680] = "Fuel Tank 5 Temperature", + [681] = "Fuel Tank 6 Temperature", + [682] = "Fuel Tank 7 Temperature", + [683] = "Fuel Tank 8 Temperature", + [684] = "Fuel System 1 Pressure", + [685] = "Fuel System 2 Pressure", + [686] = "Fuel System 3 Pressure", + [687] = "Fuel System 4 Pressure", + [688] = "Fuel System 5 Pressure", + [689] = "Fuel System 6 Pressure", + [690] = "Fuel System 7 Pressure", + [691] = "Fuel System 8 Pressure", + [700] = "Rotor 1 Rpm", + [701] = "Rotor 2 Rpm", + [702] = "Rotor 3 Rpm", + [703] = "Rotor 4 Rpm", + [704] = "Gearbox 1 Speed", + [705] = "Gearbox 2 Speed", + [706] = "Gearbox 3 Speed", + [707] = "Gearbox 4 Speed", + [708] = "Gearbox 5 Speed", + [709] = "Gearbox 6 Speed", + [710] = "Gearbox 7 Speed", + [711] = "Gearbox 8 Speed", + [712] = "Gearbox 1 Oil Pressure", + [713] = "Gearbox 2 Oil Pressure", + [714] = "Gearbox 3 Oil Pressure", + [715] = "Gearbox 4 Oil Pressure", + [716] = "Gearbox 5 Oil Pressure", + [717] = "Gearbox 6 Oil Pressure", + [718] = "Gearbox 7 Oil Pressure", + [719] = "Gearbox 8 Oil Pressure", + [720] = "Gearbox 1 Oil Temperature", + [721] = "Gearbox 2 Oil Temperature", + [722] = "Gearbox 3 Oil Temperature", + [723] = "Gearbox 4 Oil Temperature", + [724] = "Gearbox 5 Oil Temperature", + [725] = "Gearbox 6 Oil Temperature", + [726] = "Gearbox 7 Oil Temperature", + [727] = "Gearbox 8 Oil Temperature", + [728] = "Gearbox 1 Oil Quantity", + [729] = "Gearbox 2 Oil Quantity", + [730] = "Gearbox 3 Oil Quantity", + [731] = "Gearbox 4 Oil Quantity", + [732] = "Gearbox 5 Oil Quantity", + [733] = "Gearbox 6 Oil Quantity", + [734] = "Gearbox 7 Oil Quantity", + [735] = "Gearbox 8 Oil Quantity", + [736] = "Gearbox 1 Status", + [737] = "Gearbox 2 Status", + [738] = "Gearbox 3 Status", + [739] = "Gearbox 4 Status", + [740] = "Gearbox 5 Status", + [741] = "Gearbox 6 Status", + [742] = "Gearbox 7 Status", + [743] = "Gearbox 8 Status", + [800] = "Hydraulic System 1 Pressure", + [801] = "Hydraulic System 2 Pressure", + [802] = "Hydraulic System 3 Pressure", + [803] = "Hydraulic System 4 Pressure", + [804] = "Hydraulic System 5 Pressure", + [805] = "Hydraulic System 6 Pressure", + [806] = "Hydraulic System 7 Pressure", + [807] = "Hydraulic System 8 Pressure", + [808] = "Hydraulic System 1 Fluid Temperature", + [809] = "Hydraulic System 2 Fluid Temperature", + [810] = "Hydraulic System 3 Fluid Temperature", + [811] = "Hydraulic System 4 Fluid Temperature", + [812] = "Hydraulic System 5 Fluid Temperature", + [813] = "Hydraulic System 6 Fluid Temperature", + [814] = "Hydraulic System 7 Fluid Temperature", + [815] = "Hydraulic System 8 Fluid Temperature", + [816] = "Hydraulic System 1 Fluid Quantity", + [817] = "Hydraulic System 2 Fluid Quantity", + [818] = "Hydraulic System 3 Fluid Quantity", + [819] = "Hydraulic System 4 Fluid Quantity", + [820] = "Hydraulic System 5 Fluid Quantity", + [821] = "Hydraulic System 6 Fluid Quantity", + [822] = "Hydraulic System 7 Fluid Quantity", + [823] = "Hydraulic System 8 Fluid Quantity", + [900] = "Ac System 1 Voltage", + [901] = "Ac System 2 Voltage", + [902] = "Ac System 3 Voltage", + [903] = "Ac System 4 Voltage", + [904] = "Ac System 5 Voltage", + [905] = "Ac System 6 Voltage", + [906] = "Ac System 7 Voltage", + [907] = "Ac System 8 Voltage", + [908] = "Ac System 9 Voltage", + [909] = "Ac System 10 Voltage", + [910] = "Ac System 1 Current", + [911] = "Ac System 2 Current", + [912] = "Ac System 3 Current", + [913] = "Ac System 4 Current", + [914] = "Ac System 5 Current", + [915] = "Ac System 6 Current", + [916] = "Ac System 7 Current", + [917] = "Ac System 8 Current", + [918] = "Ac System 9 Current", + [919] = "Ac System 10 Current", + [920] = "Dc System 1 Voltage", + [921] = "Dc System 2 Voltage", + [922] = "Dc System 3 Voltage", + [923] = "Dc System 4 Voltage", + [924] = "Dc System 5 Voltage", + [925] = "Dc System 6 Voltage", + [926] = "Dc System 7 Voltage", + [927] = "Dc System 8 Voltage", + [928] = "Dc System 9 Voltage", + [929] = "Dc System 10 Voltage", + [930] = "Dc System 1 Current", + [931] = "Dc System 2 Current", + [932] = "Dc System 3 Current", + [933] = "Dc System 4 Current", + [934] = "Dc System 5 Current", + [935] = "Dc System 6 Current", + [936] = "Dc System 7 Current", + [937] = "Dc System 8 Current", + [938] = "Dc System 9 Current", + [939] = "Dc System 10 Current", + [940] = "Prop 1 Iceguard Dc Current", + [941] = "Prop 2 Iceguard Dc Current", + [942] = "Prop 3 Iceguard Dc Current", + [943] = "Prop 4 Iceguard Dc Current", + [944] = "Prop 5 Iceguard Dc Current", + [945] = "Prop 6 Iceguard Dc Current", + [946] = "Prop 7 Iceguard Dc Current", + [947] = "Prop 8 Iceguard Dc Current", + [948] = "Prop 9 Iceguard Dc Current", + [949] = "Prop 10 Iceguard Dc Current", + [1000] = "Active Nav System Waypoint Latitude", + [1001] = "Active Nav System Waypoint Longitude", + [1002] = "Active Nav System Waypoint Height Above Ellipsoid", + [1003] = "Active Nav System Waypoint Altitude", + [1004] = "Active Nav System Ground Speed", + [1005] = "Active Nav System True Track", + [1006] = "Active Nav System Magnetic Track", + [1007] = "Active Nav System Cross Track Error", + [1008] = "Active Nav System Track Error Angle", + [1009] = "Active Nav System Time To Go", + [1010] = "Active Nav System Estimated Time Of Arrival", + [1011] = "Active Nav System Estimated Enroute Time", + [1012] = "Nav Waypoint Identifier 0 3", + [1013] = "Nav Waypoint Identifier 4 7", + [1014] = "Nav Waypoint Identifier 8 11", + [1015] = "Nav Waypoint Identifier 12 15", + [1016] = "Nav Waypoint Type Identifier", + [1017] = "Nav Waypoint Latitude", + [1018] = "Nav Waypoint Longitude", + [1019] = "Nav Waypoint Minimum Altitude", + [1020] = "Nav Waypoint Minimum Flight Level", + [1021] = "Nav Waypoint Minimum Radar Height", + [1022] = "Nav Waypoint Minimum Height Above Ellipsoid", + [1023] = "Nav Waypoint Maximum Altitude", + [1024] = "Nav Waypoint Maximum Flight Level", + [1025] = "Nav Waypoint Maximum Radar Height", + [1026] = "Nav Waypoint Maximum Height Above Ellipsoid", + [1027] = "Nav Waypoint Planned Altitude", + [1028] = "Nav Waypoint Planned Flight Level", + [1029] = "Nav Waypoint Planned Radar Height", + [1030] = "Nav Waypoint Planned Height Above Ellipsoid", + [1031] = "Distance To Nav Waypoint", + [1032] = "Time To Go To Nav Waypoint", + [1033] = "Nav Waypoint Estimated Time Of Arrival", + [1034] = "Nav Waypoint Estimated Enroute Time", + [1035] = "Nav Waypoint Status Information", + [1036] = "Gps Aircraft Latitude", + [1037] = "Gps Aircraft Longitude", + [1038] = "Gps Aircraft Height Above Ellipsoid", + [1039] = "Gps Ground Speed", + [1040] = "Gps True Track", + [1041] = "Gps Magnetic Track", + [1042] = "Gps Cross Track Error", + [1043] = "Gps Track Error Angle", + [1044] = "Gps Glideslope Deviation", + [1045] = "Gps Predicted Raim", + [1046] = "Gps Vertical Figure Of Merit", + [1047] = "Gps Horizontal Figure Of Merit", + [1048] = "Gps Mode Of Operation", + [1049] = "Ins Aircraft Latitude", + [1050] = "Ins Aircraft Longitude", + [1051] = "Ins Aircraft Height Above Ellipsoid", + [1052] = "Ins Aircraft Ground Speed", + [1053] = "Ins Aircraft True Track", + [1054] = "Ins Aircraft Magnetic Track", + [1055] = "Ins Aircraft Cross Track Error", + [1056] = "Ins Aircraft Track Error Angle", + [1057] = "Ins Vertical Figure Of Merit", + [1058] = "Ins Horizontal Figure Of Merit", + [1059] = "Auxiliary Nav System Aircraft Latitude", + [1060] = "Auxiliary Nav System Aircraft Longitude", + [1061] = "Auxiliary Nav System Aircraft Height Above Ellipsoid", + [1062] = "Auxiliary Nav System Aircraft Ground Speed", + [1063] = "Auxiliary Nav System Aircraft True Track", + [1064] = "Auxiliary Nav System Aircraft Magnetic Track", + [1065] = "Auxiliary Nav System Aircraft Cross Track Error", + [1066] = "Auxiliary Nav System Aircraft Track Error Angle", + [1067] = "Auxiliary Nav System Vertical Figure Of Merit", + [1068] = "Auxiliary Nav System Horizontal Figure Of Merit", + [1069] = "Magnetic Heading", + [1070] = "Radio Height", + [1071] = "Dme 1 Distance", + [1072] = "Dme 2 Distance", + [1073] = "Dme 3 Distance", + [1074] = "Dme 4 Distance", + [1075] = "Dme 1 Time To Go", + [1076] = "Dme 2 Time To Go", + [1077] = "Dme 3 Time To Go", + [1078] = "Dme 4 Time To Go", + [1079] = "Dme 1 Ground Speed", + [1080] = "Dme 2 Ground Speed", + [1081] = "Dme 3 Ground Speed", + [1082] = "Dme 4 Ground Speed", + [1083] = "Adf 1 Bearing", + [1084] = "Adf 2 Bearing", + [1085] = "Adf 3 Bearing", + [1086] = "Adf 4 Bearing", + [1087] = "Ils 1 Localizer Deviation", + [1088] = "Ils 2 Localizer Deviation", + [1089] = "Ils 3 Localizer Deviation", + [1090] = "Ils 4 Localizer Deviation", + [1091] = "Ils 1 Glideslope Deviation", + [1092] = "Ils 2 Glideslope Deviation", + [1093] = "Ils 3 Glideslope Deviation", + [1094] = "Ils 4 Glideslope Deviation", + [1095] = "Flight Director 1 Pitch Deviation", + [1096] = "Flight Director 2 Pitch Deviation", + [1097] = "Flight Director 1 Roll Deviation", + [1098] = "Flight Director 2 Roll Deviation", + [1099] = "Decision Height", + [1100] = "Vhf 1 Com Frequency", + [1101] = "Vhf 2 Com Frequency", + [1102] = "Vhf 3 Com Frequency", + [1103] = "Vhf 4 Com Frequency", + [1104] = "Vor Ils 1 Frequency", + [1105] = "Vor Ils 2 Frequency", + [1106] = "Vor Ils 3 Frequency", + [1107] = "Vor Ils 4 Frequency", + [1108] = "Adf 1 Frequency", + [1109] = "Adf 2 Frequency", + [1110] = "Adf 3 Frequency", + [1111] = "Adf 4 Frequency", + [1112] = "Dme 1 Channel", + [1113] = "Dme 2 Channel", + [1114] = "Dme 3 Channel", + [1115] = "Dme 4 Channel", + [1116] = "Transponder 1 Code", + [1117] = "Transponder 2 Code", + [1118] = "Transponder 3 Code", + [1119] = "Transponder 4 Code", + [1120] = "Desired Track Angle", + [1121] = "Magnetic Variation", + [1122] = "Selected Glidepath Angle", + [1123] = "Selected Runway Heading", + [1124] = "Computed Vertical Velocity", + [1125] = "Selected Course", + [1126] = "Vor 1 Radial", + [1127] = "Vor 2 Radial", + [1128] = "Vor 3 Radial", + [1129] = "Vor 4 Radial", + [1130] = "True East Velocity", + [1131] = "True North Velocity", + [1132] = "True Up Velocity", + [1133] = "True Heading", + [1134] = "GPS geoid separation", + [1135] = "GPS SV info, one message per SV", + [1175] = "Gear Lever Switches", + [1176] = "Gear Lever Lights Wow Solenoid", + [1177] = "Landing Gear 1 Tire Pressure", + [1178] = "Landing Gear 2 Tire Pressure", + [1179] = "Landing Gear 3 Tire Pressure", + [1180] = "Landing Gear 4 Tire Pressure", + [1181] = "Landing Gear 1 Brake Pad Thickness", + [1182] = "Landing Gear 2 Brake Pad Thickness", + [1183] = "Landing Gear 3 Brake Pad Thickness", + [1184] = "Landing Gear 4 Brake Pad Thickness", + [1185] = "Landing Gear 1 Status", + [1186] = "Landing Gear 2 Status", + [1187] = "Landing Gear 3 Status", + [1188] = "Landing Gear 4 Status", + [1189] = "Landing Gear 1 Extension Retraction Status", + [1190] = "Landing Gear 2 Extension Retraction Status", + [1191] = "Landing Gear 3 Extension Retraction Status", + [1192] = "Landing Gear 4 Extension Retraction Status", + [1193] = "Brake System 1 Pressure", + [1194] = "Brake System 2 Pressure", + [1195] = "Brake System 3 Pressure", + [1196] = "Brake System 4 Pressure", + [1197] = "Brake System 1 Status", + [1198] = "Brake System 2 Status", + [1199] = "Brake System 3 Status", + [1200] = "Utc", + [1201] = "Cabin Pressure", + [1202] = "Cabin Altitude", + [1203] = "Cabin Temperature", + [1204] = "Longitudinal Center Of Gravity", + [1205] = "Lateral Center Of Gravity", + [1206] = "Date", + [1207] = "Weight", + [1208] = "Fuel Weight", + [1209] = "Zero Fuel Weight", + + [1300] = "Flarm State", + [1301] = "FLAA AL 3", + [1302] = "FLAA AL 2", + [1303] = "FLAA AL 1", + [1304] = "FLAA AL 0", + [1305] = "ADSB State", + + [1500] = "ISU Sensor board temperature", + [1501] = "ISU QFF estimate", + [1502] = "ISU AHRS accelerometer bias estimate body ax X", + [1503] = "ISU AHRS accelerometer bias estimate body ax Y", + [1504] = "ISU AHRS accelerometer bias estimate body ax Z", + [1506] = "State of IGC flight recorder unit", + [1507] = "IGC flight recorder command NODATA means PILOT EVENT", + [1509] = "Retractable engine position", + [1510] = "Vario meter mode 0=variometer 1=speedcommand", + [1511] = "Voice mute, 1=mutes", + [1512] = "Audio and Volume broadcast", + [1513] = "glide polar coefficients, servicecode is 0=A,B,2=C", + [1514] = "glide polar bugs", + [1515] = "glide polar mass dry and ballast [ushort kg*10^1]", + [1516] = "glide polar pilot mass (dry payload) -> empty-mass + pilot-mass + ballast-mass = takeoff-mass [ushort kg*10^1]", + [1517] = "wind override AS_UCHAR == 1 override", + [1518] = "Expected Lift, the classic McCrady value", + [1519] = "barometric altitude corretion in meters: altQNH = altSTD + (SC=0: QNH, SC=1: QFE)", + [1520] = "magnetometer flux vector NORTH component in uT", + [1521] = "magnetometer flux vector EAST component in uT", + [1522] = "magnetometer flux vector DOWN component in uT", + [1530] = "voice message ID", + [1600] = "RU stream", + [1601] = "state of magneto calibration", + [1610] = "Route name, multiple zero terminated", + [1611] = "Route description, multiple zero terminated", + [1612] = "waypoint name, multiple zero terminated", + [1613] = "waypoint route segment type (reserved)", + [1614] = "waypoint latitude", + [1615] = "waypoint longitude", + [1616] = "waypoint altitude", + [1798] = "CPT6100 PRESS ID", + [1799] = "LAST USER DEFINED ID / NOD LAST", + [1800] = "who am i SC=0: S/N SC=1: P/N rate: 0.1 .. 1 hz", + [1209] = "Zero Fuel Weight" +} + +-- CANAerospace node_id +-- WIP: to be extended/changed ! +utils.defaultNodeIdTable = { + [01] = "AHRS", + [02] = "ADC", + [03] = "VHF1", + [04] = "VHF2", + [05] = "NAVILS1", + [06] = "NAVILS2", + [07] = "ATC", + [08] = "ADF", + + [10] = "GPS", + [11] = "DME", + [12] = "EMS", + [13] = "ETS", + [14] = "ES", + [15] = "WCS" +} + +-- Data types +utils.dataTypeTable = { + [0x00] = "NODATA", + [0x01] = "ERROR", + [0x02] = "FLOAT", + [0x03] = "LONG", + [0x04] = "ULONG", + [0x05] = "BLONG", + [0x06] = "SHORT", + [0x07] = "USHORT", + [0x08] = "BSHORT", + [0x09] = "CHAR", + [0x0A] = "UCHAR", + [0x0B] = "BCHAR", + [0x0C] = "SHORT2", + [0x0D] = "USHORT2", + [0x0E] = "BSHORT2", + [0x0F] = "CHAR4", + [0x10] = "UCHAR4", + [0x11] = "BCHAR4", + [0x12] = "CHAR2", + [0x13] = "UCHAR2", + [0x14] = "BCHAR2", + [0x15] = "MEMID", + [0x16] = "CHKSUM", + [0x17] = "ACHAR", + [0x18] = "ACHAR2", + [0x19] = "ACHAR4", + [0x1A] = "CHAR3", + [0x1B] = "UCHAR3", + [0x1C] = "BCHAR3", + [0x1D] = "ACHAR3", + [0x1E] = "DOUBLEH", + [0x1F] = "DOUBLEL", + [0x20] = "RESVD", + [0x64] = "UDEF" +} + +-- CANAerospace service_code +utils.serviceCodeTable = { + [0x00] = "SC0", + [0x01] = "SC1", + [0x02] = "SC2", + [0x03] = "SC3", + [0x04] = "SC4", + [0x05] = "SC5", + [0x06] = "SC6", + [0x07] = "SC7", + [0x08] = "SC8" +} + +return utils diff --git a/dissectors/catsniffer/LICENSE b/dissectors/catsniffer/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/catsniffer/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/catsniffer/README.md b/dissectors/catsniffer/README.md new file mode 100644 index 0000000..fc5b4c1 --- /dev/null +++ b/dissectors/catsniffer/README.md @@ -0,0 +1,65 @@ +# CatSniffer (Electronic Cats) + +Dissecteurs Wireshark Lua des **trames capturées par le renifleur radio +multiprotocole CatSniffer** d'Electronic Cats (BLE, IEEE 802.15.4 / +Zigbee / Thread, LoRa) : + +- outils historiques `pycatsniffer_bv3` (`legacy/`) : en-tête « CatSniffer + Radio Packet Info » (version, interface, protocole, PHY, fréquence, + canal, RSSI, statut), méta-en-tête BLE transmis ensuite au dissecteur + natif `btle`, et variante LoRa (bande passante, facteur d'étalement, + taux de codage, charge utile) ; +- outil actuel `catnip` (`catnip/`) : post-dissecteur qui réaffiche en + texte ASCII la charge utile LoRa décodée par le dissecteur natif LoRaTap. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ElectronicCats/CatSniffer-Tools | +| Commit importé | `8a34319dd50c560f15aeada3bfdacc2a3f838dab` du 22/10/2026 (branche `main`, dernier commit) | +| Licence amont | GPL-3.0-only (`LICENSE` amont : texte de la GPL v3, sans mention « or any later version » ; pas d'en-tête de licence dans les fichiers Lua) | +| Natif Wireshark 4.6.4 | Non selon l'issue ; les dissecteurs natifs `btle` et `loratap` sont utilisés | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). Le dossier amont `Legacy/cativity/`, sous une autre +licence, n'est pas concerné. + +## Fichiers + +| Fichier | Origine amont | Rôle | +|---|---|---| +| `legacy/catsniffer-rpi.lua` | `Legacy/pycatsniffer_bv3/dissectors/` | Module : en-tête Radio Packet Info (`build_catsniffer_rpi_p`) | +| `legacy/catsniffer-blepi.lua` | idem | Module : méta-en-tête BLE (`build_catsniffer_blepi_p`) | +| `legacy/catsniffer-register.lua` | idem | Point d'entrée BLE / 802.15.4 | +| `legacy/catsniffer-lora.lua` | idem | Point d'entrée LoRa | +| `catnip/lora_ascii.lua` | `catnip/protocol/` | Post-dissecteur `catnip_lora` (champ `catnip_lora.ascii`) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête de chaque fichier. + +## Utilisation + +- `catnip` : copier `catnip/lora_ascii.lua` dans le dossier `plugins` de + Wireshark ; il s'applique aux captures LoRa produites par + `catnip sniff lora -w capture.pcap` (voir `catnip/docs/wireshark.md` + amont). +- Historique : copier **un seul** des deux points d'entrée + (`catsniffer-register.lua` ou `catsniffer-lora.lua`) avec + `catsniffer-rpi.lua` et `catsniffer-blepi.lua`, qu'ils chargent par + `require`, dans le même dossier de plugins. + +## Remarques + +- Les deux points d'entrée historiques s'enregistrent sur la même entrée + (valeur 147) : les charger ensemble fait que le dernier chargé l'emporte. +- Cette entrée est ajoutée à la table `dtls.port` (port DTLS 147) et non à + une table de DLT utilisateur, alors que le commentaire amont parle de + « User DLT » : l'accrochage aux captures DLT 147 est donc douteux (non + vérifié dans Wireshark). +- Le chargement par `require` des modules depuis le dossier de plugins + n'est pas vérifié ; Wireshark charge aussi ces modules comme plugins. +- Le commentaire de `catsniffer-blepi.lua` indique un usage avec le + logiciel TI SmartRF Packet Sniffer 2 (TiWsPc2). +- Non repris : scripts Python, profils de filtres et captures d'écran. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/catsniffer/catnip/lora_ascii.lua b/dissectors/catsniffer/catnip/lora_ascii.lua new file mode 100644 index 0000000..d360f50 --- /dev/null +++ b/dissectors/catsniffer/catnip/lora_ascii.lua @@ -0,0 +1,46 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/ElectronicCats/CatSniffer-Tools (catnip/protocol/lora_ascii.lua), +-- commit 8a34319dd50c560f15aeada3bfdacc2a3f838dab du 22/10/2026. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- Renders the LoRa payload as text, for the ASCII column catnip adds to +-- Wireshark (see ``lora_wireshark_display_args`` in sniffer_sx.py). +-- +-- LoRaTap carries the payload as bytes, and Wireshark renders a bytes field as +-- hex, so a text payload -- most of what a LoRa bench sends -- can only be read +-- by clicking into a packet and squinting at the hex pane. A postdissector +-- runs after the LoRaTap dissector, so it can pick `loratap.payload` back up +-- and register the same bytes a second time as a string field, whichever +-- dissector the payload was handed to. + +local catnip_lora = Proto("catnip_lora", "CatSniffer LoRa") +local ascii_field = ProtoField.string("catnip_lora.ascii", "Payload (ASCII)") +catnip_lora.fields = { ascii_field } + +local lora_payload = Field.new("loratap.payload") + +-- Anything outside printable 7-bit ASCII becomes ".", the convention every hex +-- dump already uses, so one packet stays one line whatever the radio heard. +local function to_ascii(bytes) + local out = {} + for i = 0, bytes:len() - 1 do + local byte = bytes:get_index(i) + out[i + 1] = (byte >= 0x20 and byte <= 0x7E) and string.char(byte) or "." + end + return table.concat(out) +end + +function catnip_lora.dissector(tvb, pinfo, tree) + local payload = lora_payload() + if not payload then + return + end + + local range = payload.range + if range:len() == 0 then + return + end + + tree:add(catnip_lora, range):add(ascii_field, range, to_ascii(range:bytes())) +end + +register_postdissector(catnip_lora) diff --git a/dissectors/catsniffer/legacy/catsniffer-blepi.lua b/dissectors/catsniffer/legacy/catsniffer-blepi.lua new file mode 100644 index 0000000..d8bcddf --- /dev/null +++ b/dissectors/catsniffer/legacy/catsniffer-blepi.lua @@ -0,0 +1,67 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/ElectronicCats/CatSniffer-Tools (Legacy/pycatsniffer_bv3/dissectors/catsniffer-blepi.lua), +-- commit 8a34319dd50c560f15aeada3bfdacc2a3f838dab du 22/10/2026. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +--[[ + This dissector is for the CatSniffer radio Packet Info Header which includes meta information + and is mean to be used with the TiWsPc2 packet sniffer software from TI +]] + +UDP_PORT_DISSECTOR = 17760 +FRACT_CONSTANT = 65535 + +-- Minimum length (in bytes) of the protocol data. +BLEPI_MIN_LENGTH = 4 +-- Header field offset values +CONN_EVENT_OFFSET = 0 +INFO_OFFSET = 2 +PAYLOAD_OFFSET = 3 +-- Header field size values +CONN_EVENT_SIZE = 2 +INFO_SIZE = 1 + +-- Value and string pairs for the direction info field +DIRECTION_VALUE_STRING = { + [0x00] = "Not Connected", + [0x01] = "Master -> Slave", + [0x02] = "Slave -> Master", + [0x03] = "Unknown Direction", + [0] = nil +} + +function build_catsniffer_blepi_p() + + catsniffer_blepi_p = Proto("catsniffer_blepi", "CatSniffer BLE Packet Info") + + local cs_connection_evt = ProtoField.uint16("catsniffer.conn_event", "Connection Event", base.DEC) + local cs_info = ProtoField.uint8("catsniffer.info", "Info", base.HEX) + local cs_direction = ProtoField.uint8("catsniffer.direction", "Direction", base.HEX, DIRECTION_VALUE_STRING, 0x3) + + catsniffer_blepi_p.fields = { + cs_connection_evt, + cs_info, + cs_direction + } + + function catsniffer_blepi_p.dissector(tvbuf, pktinfo, tree) + if tvbuf:len() < BLEPI_MIN_LENGTH then + return 0 + end + + -- Add CatSniffer Protocol as sub tree in the wireshark display + local subtree_radio_packet = tree:add(catsniffer_blepi_p, tvbuf) + + -- Connection Event + local connection_event = tvbuf(CONN_EVENT_OFFSET, CONN_EVENT_SIZE):le_uint() + subtree_radio_packet:add_le(cs_connection_evt, connection_event) + + -- Info + local info = tvbuf(INFO_OFFSET, INFO_SIZE):le_uint() + subtree_radio_packet:add_le(cs_info, info) + local info_tree = subtree_radio_packet:add(cs_direction, info) + info_tree:add(cs_direction, tvbuf(INFO_OFFSET, INFO_SIZE):uint()) + + return tvbuf:len() + end + return catsniffer_blepi_p +end diff --git a/dissectors/catsniffer/legacy/catsniffer-lora.lua b/dissectors/catsniffer/legacy/catsniffer-lora.lua new file mode 100644 index 0000000..d3181cd --- /dev/null +++ b/dissectors/catsniffer/legacy/catsniffer-lora.lua @@ -0,0 +1,178 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/ElectronicCats/CatSniffer-Tools (Legacy/pycatsniffer_bv3/dissectors/catsniffer-lora.lua), +-- commit 8a34319dd50c560f15aeada3bfdacc2a3f838dab du 22/10/2026. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +require("catsniffer-blepi") +require("catsniffer-rpi") + +VERSION_RELEASE = "1.0.0" +DTL0_LINKLAYER = 148 + +UDP_PORT_DISSECTOR = 17760 +FRACT_CONSTANT = 65535 +STATUS_OK = 0x80 +TI_RPI_MIN_LENGTH = 17 + +INTERFACE_TYPE_COM = 0 +INTERFACE_TYPE_CEBAL = 1 +PHY_TYPE_LORA = 6 +PHY_LORA_STRING = "LoRa" + +-- /* Protocol values */ +PROTOCOL_LORA = 5 + + +-- /* Header field size values */ +INTERFACE_ID_SIZE = 2 +PHY_SIZE = 1 +FREQUENCY_SIZE = 4 -- /* Size of frequency + fractional frequency values in total */ +CHANNEL_SIZE = 2 +BANDWIDTH_SIZE = 1 +SPREADING_FACTOR_SIZE = 1 +CODING_RATE_SIZE = 1 +RSSI_SIZE = 1 +STATUS_SIZE = 1 + +-- /* Header field offset values */ +INTERFACE_TYPE_OFFSET = 3 +INTERFACE_ID_OFFSET = 4 +PROTOCOL_OFFSET = INTERFACE_ID_OFFSET + INTERFACE_ID_SIZE -- 6 +PHY_OFFSET = PROTOCOL_OFFSET + PHY_SIZE -- 7 +FREQUENCY_OFFSET = 8 +FRACTIONAL_FREQUENCY_OFFSET = 10 +CHANNEL_OFFSET = 12 +BANDWIDTH_OFFSET = 14 +SPREADING_FACTOR_OFFSET = 15 +CODING_RATE_OFFSET = 16 +RSSI_OFFSET = 17 +STATUS_OFFSET = 18 +PAYLOAD_OFFSET = 19 + + +function get_bandwidth_string(bandwidth) + if bandwidth == 0 then + return 7.8 + elseif bandwidth == 1 then + return 10.4 + elseif bandwidth == 2 then + return 15.6 + elseif bandwidth == 3 then + return 20.8 + elseif bandwidth == 4 then + return 31.25 + elseif bandwidth == 5 then + return 41.7 + elseif bandwidth == 6 then + return 62.5 + elseif bandwidth == 7 then + return 125 + elseif bandwidth == 8 then + return 250 + elseif bandwidth == 9 then + return 500 + else + return 0 + end +end + + +function build_catsniffer_rpi_lora() + catsniffer_rpi_lora_p = Proto("catsniffer_rpi_lora", "CatSniffer LoRa Radio Packet Info") + + local cs_version = ProtoField.string("catsniffer.version", "Version", base.NONE) + local cs_interface_id = ProtoField.string("catsniffer.interface", "Interface", base.NONE) + local cs_phy_protocol = ProtoField.string("catsniffer.phy", "PHY", base.NONE) + local cs_frequency = ProtoField.float("catsniffer.freq", "Frequency", base.NONE) + local cs_channel = ProtoField.uint16("catsniffer.channel", "Channel", base.DEC) + local cs_bandwidth = ProtoField.uint16("catsniffer.bandwidth", "Bandwidth", base.DEC) + local cs_spreading_factor = ProtoField.uint8("catsniffer.spreading_factor", "Spreading Factor", base.DEC) + local cs_coding_rate = ProtoField.string("catsniffer.coding_rate", "Coding Rate", base.NONE) + local cs_rssi = ProtoField.int32("catsniffer.rssi", "RSSI", base.DEC) + local cs_payload_length = ProtoField.int32("catsniffer.length", "Payload Length", base.DEC) + local cs_payload_data = ProtoField.bytes("catsniffer.payload", "Payload") + + catsniffer_rpi_lora_p.fields = { + cs_version, + cs_interface_id, + cs_phy_protocol, + cs_frequency, + cs_channel, + cs_bandwidth, + cs_spreading_factor, + cs_coding_rate, + cs_rssi, + -- cs_snr, + cs_payload_length, + cs_payload_data + } + + function catsniffer_rpi_lora_p.dissector(tvbuf, pktinfo, root) + if tvbuf:len() < TI_RPI_MIN_LENGTH then + return 0 + end + + local freq, fractFrq, fullFreq, protocol, chanell, phy, rssi, status, payload_length + + pktinfo.cols.info = "Broadcast" + pktinfo.cols.src = "CatSniffer" + pktinfo.cols.protocol = PHY_LORA_STRING + + -- Add CatSniffer Protocol as sub root in the wireshark display + local subtree_radio_packet = root:add(catsniffer_rpi_lora_p, tvbuf(), "CatSniffer Radio Packet Info") + + interface_subtree = subtree_radio_packet:add_le(cs_version, VERSION_RELEASE) + + -- Display interface information + interface_subtree = subtree_radio_packet:add_le(cs_interface_id, "CatSniffer v" .. tvbuf(INTERFACE_ID_OFFSET, INTERFACE_ID_SIZE):le_uint()) + + -- Display the PHY type for known values + phy = tvbuf(PHY_OFFSET, PHY_SIZE):le_uint() + subtree_radio_packet:add_le(cs_phy_protocol, PHY_LORA_STRING) + + -- Display frequency and fractional frequency in MHz + freq = tvbuf(FREQUENCY_OFFSET, FREQUENCY_SIZE):le_uint() + fractFrq = tvbuf(FRACTIONAL_FREQUENCY_OFFSET, FREQUENCY_SIZE):le_uint() + fullFreq = freq + (fractFrq/FRACT_CONSTANT) + + subtree_radio_packet:add(cs_frequency, fullFreq):append_text(" MHz") + + -- Find value of protocol field to set the channell + chanel = tvbuf(CHANNEL_OFFSET, CHANNEL_SIZE) + subtree_radio_packet:add(cs_channel, chanel) + + -- Display Bandwidth + bandwidth = tvbuf(BANDWIDTH_OFFSET, BANDWIDTH_SIZE):le_uint() + subtree_radio_packet:add(cs_bandwidth, get_bandwidth_string(bandwidth)):append_text(" kHz") + + -- Display Spreading Factor + spreading_factor = tvbuf(SPREADING_FACTOR_OFFSET, SPREADING_FACTOR_SIZE) + subtree_radio_packet:add(cs_spreading_factor, spreading_factor):append_text(" SF") + + -- Display Coding Rate + coding_rate = tvbuf(CODING_RATE_OFFSET, CODING_RATE_SIZE):le_uint() + subtree_radio_packet:add(cs_coding_rate, "4/".. coding_rate):append_text(" CR") + + -- Display RSSI + rssi = tvbuf(RSSI_OFFSET, RSSI_SIZE) + subtree_radio_packet:add(cs_rssi, rssi):append_text(" dBm") + + -- Foward the packet to the BLE dissector + local payloadTvb = tvbuf(PAYLOAD_OFFSET) -- :tvb() + local subtree_data_packet = root:add(catsniffer_rpi_lora_p, payloadTvb, "LoRa Data") + -- Display Payload Length + payload_length = tvbuf:reported_len() - PAYLOAD_OFFSET + subtree_data_packet:add(cs_payload_length, payload_length):set_generated(true):append_text(" Bytes") + + subtree_data_packet:add(cs_payload_data, payloadTvb) + + return tvbuf:captured_len() + end + return catsniffer_rpi_lora_p +end + + +local catsniffer_rpi_lora_p = build_catsniffer_rpi_lora() + +-- For User DLT to controll the information of all the CatSniffer packets +local user_dtls = DissectorTable.get("dtls.port") +user_dtls:add(DTL0_LINKLAYER, catsniffer_rpi_lora_p) diff --git a/dissectors/catsniffer/legacy/catsniffer-register.lua b/dissectors/catsniffer/legacy/catsniffer-register.lua new file mode 100644 index 0000000..48ed60e --- /dev/null +++ b/dissectors/catsniffer/legacy/catsniffer-register.lua @@ -0,0 +1,35 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/ElectronicCats/CatSniffer-Tools (Legacy/pycatsniffer_bv3/dissectors/catsniffer-register.lua), +-- commit 8a34319dd50c560f15aeada3bfdacc2a3f838dab du 22/10/2026. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- +-- CatSniffer BLE Dissector +-- Electronic Cats - PwnLab +-- +------------------------------------------------------------------------------- +------------------------- Register All Dissectors ------------------------- +------------------------------------------------------------------------------- +-- The format of the CatSniffer Radio Packet is shown below. +-- ---------------------------------------------------------------------------------------------------------------------- +-- | Version | Length | Interface Type | Interface ID | Protocol | PHY | Frequency | Channel | RSSI | Status | Payload | +-- | 1B | 2B | 1B | 2B | 1B | 1B | 4B | 2B | 1B | 1B | Variable | +-- ---------------------------------------------------------------------------------------------------------------------- +-- The format of the BLE meta header is shown below. +-- +-- The variable length payload is forwarded to the Wireshark BLE dissector (btle). +-- ----------------------------------------------------- +-- | Connection Event Counter | Info | Payload | +-- | 2B | 1B | Variable Length | +-- ----------------------------------------------------- +require("catsniffer-blepi") +require("catsniffer-rpi") + + +DTL0_LINKLAYER = 147 + +local catsniffer_blepi_p = build_catsniffer_blepi_p() +local catsniffer_rpi_p = build_catsniffer_rpi_p() + +-- For User DLT to controll the information of all the CatSniffer packets +local user_dtls = DissectorTable.get("dtls.port") +user_dtls:add(DTL0_LINKLAYER, catsniffer_rpi_p) diff --git a/dissectors/catsniffer/legacy/catsniffer-rpi.lua b/dissectors/catsniffer/legacy/catsniffer-rpi.lua new file mode 100644 index 0000000..63873c6 --- /dev/null +++ b/dissectors/catsniffer/legacy/catsniffer-rpi.lua @@ -0,0 +1,163 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/ElectronicCats/CatSniffer-Tools (Legacy/pycatsniffer_bv3/dissectors/catsniffer-rpi.lua), +-- commit 8a34319dd50c560f15aeada3bfdacc2a3f838dab du 22/10/2026. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +--[[ + This dissector is for the CatSniffer radio Packet Info Header which includes meta information + and is mean to be used with the TiWsPc2 packet sniffer software from TI +]] + +VERSION_RELEASE = "1.0.0" + +UDP_PORT_DISSECTOR = 17760 +FRACT_CONSTANT = 65535 +STATUS_OK = 0x80 +TI_RPI_MIN_LENGTH = 17 + +INTERFACE_TYPE_COM = 0 +INTERFACE_TYPE_CEBAL = 1 + +-- /* PHY type values */IEEE 802.15.4 +PHY_TYPE_UNUSED = 0 +PHY_TYPE_OQPSK = 3 +PHY_TYPE_BLE = 5 +PHY_TYPE_LORA = 6 + +PHY_OQPSK_STRING = "IEEE 802.15.4 O-QPSK" +PHY_BLE_STRING = "BLE 1 Mbps" +PHY_LORA_STRING = "LoRa" + +-- /* Protocol values */ +PROTOCOL_GENERIC = 0 +PROTOCOL_IEEE_802_15_4_G = 1 +PROTOCOL_IEEE_802_15_4 = 2 +PROTOCOL_BLE = 3 +PROTOCOL_WBMS = 4 +PROTOCOL_LORA = 5 + +-- /* Header field offset values */ +INTERFACE_TYPE_OFFSET = 3 +INTERFACE_ID_OFFSET = 4 +PROTOCOL_OFFSET = 6 +PHY_OFFSET = 7 +FREQUENCY_OFFSET = 8 +FRACTIONAL_FREQUENCY_OFFSET = 10 +CHANNEL_OFFSET = 12 +RSSI_OFFSET = 14 +STATUS_OFFSET = 15 +PAYLOAD_OFFSET = 16 + + +-- /* Header field size values */ +INTERFACE_ID_SIZE = 2 +PHY_SIZE = 1 +FREQUENCY_SIZE = 4 -- /* Size of frequency + fractional frequency values in total */ +CHANNEL_SIZE = 2 +RSSI_SIZE = 1 +STATUS_SIZE = 1 + + +function build_catsniffer_rpi_p() + catsniffer_rpi_p = Proto("catsniffer_rpi", "CatSniffer Radio Packet Info") + + local cs_version = ProtoField.string("catsniffer.version", "Version", base.NONE) + local cs_interface_id = ProtoField.string("catsniffer.interface", "Interface", base.NONE) + local cs_frequency = ProtoField.float("catsniffer.freq", "Frequency", base.NONE) + local cs_channel = ProtoField.uint16("catsniffer.channel", "Channel", base.DEC) + local cs_phy_protocol = ProtoField.string("catsniffer.phy", "PHY", base.NONE) + local cs_rssi = ProtoField.int8("catsniffer.rssi", "RSSI", base.DEC) + local cs_status = ProtoField.uint8("catsniffer.fcs", "Frame Check Status", base.HEX) + local cs_payload_length = ProtoField.string("catsniffer.length", "Payload Length", base.NONE) + + catsniffer_rpi_p.fields = { + cs_version, + cs_interface_id, + cs_frequency, + cs_channel, + cs_phy_protocol, + cs_rssi, + cs_status, + cs_payload_length + } + + function catsniffer_rpi_p.dissector(tvbuf, pktinfo, root) + if tvbuf:len() < TI_RPI_MIN_LENGTH then + return 0 + end + + local freq, fractFrq, fullFreq, protocol, chanell, phy, rssi, status, payload_length + + pktinfo.cols.info = "CatSniffer Low Energy Data" + + -- Add CatSniffer Protocol as sub root in the wireshark display + local subtree_radio_packet = root:add(catsniffer_rpi_p, tvbuf(), "CatSniffer Radio Packet Info") + + interface_subtree = subtree_radio_packet:add_le(cs_version, VERSION_RELEASE) + + -- Display interface information + if tvbuf(INTERFACE_ID_OFFSET, INTERFACE_ID_SIZE):le_uint() == 3 then + interface_subtree = subtree_radio_packet:add_le(cs_interface_id, "Catsniffer") + else + interface_subtree = subtree_radio_packet:add_le(cs_interface_id, "Board") + end + -- Display frequency and fractional frequency in MHz + freq = tvbuf(FREQUENCY_OFFSET, FREQUENCY_SIZE):le_uint() + fractFrq = tvbuf(FRACTIONAL_FREQUENCY_OFFSET, FREQUENCY_SIZE):float() + fullFreq = freq + (fractFrq/FRACT_CONSTANT) + + subtree_radio_packet:add_le(cs_frequency, fullFreq):append_text(" MHz") + + -- Find value of protocol field to set the channell + protocol = tvbuf(PROTOCOL_OFFSET,1):le_uint() + + if protocol ~= PROTOCOL_GENERIC then + chanell = tvbuf(CHANNEL_OFFSET, CHANNEL_SIZE):le_uint() + subtree_radio_packet:add_le(cs_channel, chanell) + end + + -- Display the PHY type for known values + phy = tvbuf(PHY_OFFSET, 1):le_uint() + if protocol == PROTOCOL_BLE and phy == PHY_TYPE_BLE then + subtree_radio_packet:add_le(cs_phy_protocol, PHY_BLE_STRING) + elseif protocol == PROTOCOL_IEEE_802_15_4 and phy == PHY_TYPE_OQPSK then + subtree_radio_packet:add_le(cs_phy_protocol, PHY_OQPSK_STRING) + end + + -- Display RSSI + rssi = tvbuf(RSSI_OFFSET, RSSI_SIZE) + subtree_radio_packet:add_le(cs_rssi, rssi):append_text(" dBm") + + -- Display Status + status = tvbuf(STATUS_OFFSET, STATUS_SIZE):le_uint() + status_subtree = subtree_radio_packet:add_le(cs_status, status) + if status == STATUS_OK then + status_subtree:append_text(" - OK") + else + status_subtree:append_text(" - BAD FCS") + end + + -- Display Payload Length + payload_length = tvbuf:reported_len() - PAYLOAD_OFFSET + subtree_radio_packet:add_le(cs_payload_length, payload_length):append_text(" Bytes") + + -- Foward the packet to the BLE dissector + local payloadTvb = tvbuf(PAYLOAD_OFFSET):tvb() + + if protocol == PROTOCOL_BLE then + local ble_dissector = Dissector.get("catsniffer_blepi") + ble_dissector:call(payloadTvb, pktinfo, root) + + local dissector = Dissector.get("btle") + dissector:call(tvbuf((PAYLOAD_OFFSET+2)):tvb(), pktinfo, root) + + elseif protocol == PROTOCOL_IEEE_802_15_4 then + local wbms_dissector = Dissector.get("wpan") + wbms_dissector:call(tvbuf((PAYLOAD_OFFSET+4)):tvb(), pktinfo, root) + end + + + + return tvbuf:captured_len() + end + return catsniffer_rpi_p +end diff --git a/dissectors/cerebus-nsp/Colours b/dissectors/cerebus-nsp/Colours new file mode 100644 index 0000000..a3deb5d --- /dev/null +++ b/dissectors/cerebus-nsp/Colours @@ -0,0 +1,6 @@ +# DO NOT EDIT THIS FILE! It was created by Wireshark +@Cerebus Generic@Cerebus.cbPKT_GENERIC.chid@[29298,40863,53199][42148,0,0] +@Cerebus NEV@Cerebus.nevPKT_GENERIC.chid@[13364,25957,42148][60909,54484,0] +@Cerebus sGroup@Cerebus.cbPKT_GROUP.chid@[13364,25957,42148][62965,31097,0] +@Cerebus Sysinfo@Cerebus.cbPKT_SYSINFO.chid@[8224,19018,34695][64764,59881,20303] +@Cerebus@cerebus@[8224,19018,34695][64764,44975,15934] diff --git a/dissectors/cerebus-nsp/LICENSE b/dissectors/cerebus-nsp/LICENSE new file mode 100644 index 0000000..5d4d808 --- /dev/null +++ b/dissectors/cerebus-nsp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + cbProtocol: a Wireshark Packet Dissector for Cerebus (R) network traffic + Copyright (C) 2017 Jonas B. Zimmermann + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + cbProtocol Copyright (C) 2017 Jonas B. Zimmermann + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/cerebus-nsp/README.md b/dissectors/cerebus-nsp/README.md new file mode 100644 index 0000000..5b7c3ce --- /dev/null +++ b/dissectors/cerebus-nsp/README.md @@ -0,0 +1,84 @@ +# Cerebus — processeurs de signaux neuronaux Blackrock + +Dissecteurs Wireshark Lua du protocole UDP **Cerebus**, utilisé entre les +Neural Signal Processors (NSP, Gemini Hub) de **Blackrock Microsystems** et +le PC hôte. Ils décodent les éléments suivants : +- l'en-tête : horodatage, canal `chid`, type, longueur en mots de + 32 bits ; +- les paquets de configuration (`chid` 0x8000) : signal de vie, état et + niveau de fonctionnement du système, canaux, filtres, tri des + impulsions, commentaires, journaux… ; +- les paquets de groupe d'échantillons (`chid` 0) ; +- les impulsions `nevPKT_SPK` et les entrées numériques `nevPKT_DIGIN` ; +- plusieurs paquets dans un même datagramme. + +Un script est fourni par version du protocole (issue #516). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/CerebusOSS/CerebusWireshark | +| Commit importé | `bf0cb2d4ccb2bc35ed09952d4fec6862519ebd21` du 13/05/2026 (dernier commit de la branche par défaut `master`) ; dernières modifications : `Cerebus311.lua` `ee618cc` (13/05/2026), `Cerebus400.lua` `1475eb0` (13/05/2026), `Cerebus41.lua` `bfd3f93` (13/05/2026), `Cerebus42.lua` `8ba4088` (13/05/2026), `Colours` `dc61c61` (16/03/2017) ; SHA complets dans l'en-tête de chaque script | +| Licence amont | GPL-3.0 (`LICENSE` du dépôt = texte de la GPLv3 ; README : « The dissector is licensed under the GPLv3 »), compatible avec la licence de ce dépôt (GPL-3.0-or-later). Aucune mention « ou ultérieure », d'où `GPL-3.0-only` dans les en-têtes | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur Cerebus dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Les scripts sont repris tels quels (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête de chacun (convention du dépôt, issue #563). `Colours` +(règles de coloration exportées par Wireshark) est copié sans +modification. + +## Fichiers + +| Fichier | Version du protocole (logiciel embarqué) | Ports UDP | +|---|---|---| +| `src/Cerebus311.lua` | 3.11 (7.0.x), en-tête de 8 octets | 51001 | +| `src/Cerebus400.lua` | 4.0 (7.5), en-tête de 16 octets, type sur 1 octet | 51001 à 51003 | +| `src/Cerebus41.lua` | 4.1 (7.6), en-tête de 16 octets, type sur 2 octets | 51001 à 51003 | +| `src/Cerebus42.lua` | 4.2 (7.8) | 51001 à 51004 | +| `Colours` | règles de coloration (filtres `Cerebus.cbPKT_GENERIC.chid`…) | — | + +## Utilisation + +Copier **un seul** des quatre scripts, celui qui correspond à la version +du protocole de l'appareil, dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis Ctrl+Maj+L. +Couleurs : « Affichage › Règles de coloration… › Importer… », fichier +`Colours`. Filtres : `cerebus`, `Cerebus.cbPKT_SYSINFO.runlevel`, +`Cerebus.nevPKT_SPK.chid`… Pour un seul appareil Gemini : `udp.port == +51001` (NSP), `51002` (Hub1) ou `51003` (Hub2). + +## Vérification à l'import + +tshark 4.6.4 : les quatre scripts se chargent sans erreur (`luac5.4 -p` : +OK). Captures synthétiques construites d'après les définitions de champs +des scripts : + +| Essai | Résultat | +|---|---| +| 4.2 : signal de vie (`chid` 0x8000, type 0) | `cbPKT_SYSHEARTBEAT` | +| 4.2 : datagramme de 3 paquets (`SYSREP`, impulsion sur le canal 5, groupe 5) | `cbPKT_SYSINFO (+ 2 others)` ; fréquence 30000 Hz, niveau 50, 8 échantillons `INT16` de l'impulsion, 4 du groupe | +| 4.2 : paquet annonçant 6 mots pour 2 présents | erreur Lua `Range is out of bounds` (ligne 1413 du fichier importé) | +| Mêmes captures avec `Cerebus41.lua` | même décodage (même en-tête) | +| Mêmes captures avec `Cerebus400.lua` | décalage attendu (en-tête 4.0 différent) ; seul le signal de vie est reconnu | +| 3.11 : signal de vie, puis `SYSREP` et paquet canal 5 dans un même datagramme | `cbPKT_SYSINFO (+ 1 other)` ; le canal 5 est affiché `cbPKT_GENERIC` (données brutes) | +| `Cerebus41.lua` et `Cerebus42.lua` chargés ensemble | erreur au chargement : `Proto_new: there cannot be two protocols with the same description` | + +## Limites constatées + +- Un seul script à la fois : les quatre déclarent le même protocole + (« Cerebus NSP Communication »). Aucune détection de version : un mauvais + choix donne un décodage décalé, sans avertissement. +- Paquet tronqué ou longueur `dlen` incohérente : erreur Lua (pas de + contrôle de longueur avant `buf_remain(0, packet_len)`). +- La colonne Info commence par `NSP:` ; dans un pcap + classique, sans identifiant d'interface, elle affiche `NSP:nil`. +- `Cerebus311.lua` écrit `Loading cb protocol ...` et `register proto ...` + sur la sortie standard au chargement (lignes 11 et 1250), ce qui pollue + les sorties de `tshark`. +- En 3.11, le paquet du canal 5 de l'essai est affiché `cbPKT_GENERIC` + au lieu de `nevPKT_SPK`, bien que ce type soit défini (ligne 1212). + Cause non analysée. +- Pas de capture réelle disponible. diff --git a/dissectors/cerebus-nsp/src/Cerebus311.lua b/dissectors/cerebus-nsp/src/Cerebus311.lua new file mode 100644 index 0000000..0182fba --- /dev/null +++ b/dissectors/cerebus-nsp/src/Cerebus311.lua @@ -0,0 +1,1374 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/CerebusOSS/CerebusWireshark (Cerebus311.lua), +-- commit bf0cb2d4ccb2bc35ed09952d4fec6862519ebd21 du 13/05/2026 (dernière modification du fichier : +-- commit ee618cc4baf78ff102384443c2fa1a84759662da du 13/05/2026). +-- Licence amont : GPL-3.0 (README « licensed under the GPLv3 », LICENSE du dépôt) — voir README.md et LICENSE. +-- Wireshark dissector for UDP packets exchanged between +-- Neural Signal Processors and controlling PCs +-- +-- Copyright 2017 Jonas Zimmermann, 2022 Hyrum Sessions + +print("Loading cb protocol ...") + +-- Definition of a few helpers + +-- implementation of a simple stack (Lifted from http://lua-users.org/wiki/SimpleStack) +-- and extended +local Stack = {} + +-- Create a Table with stack functions +function Stack:Create(default_element) + + -- stack table + local t = {} + -- entry table + t._et = {} + t._default_element = default_element + + -- push a value on to the stack + function t:push(...) + if ... then + local targs = {...} + -- add values + for _,v in ipairs(targs) do + table.insert(self._et, v) + end + end + end + + -- pop a value from the stack + function t:pop(num) + + -- get num values from stack + local num = num or 1 + + -- return table + local entries = {} + + -- get values into entries + for i = 1, num do + -- get last entry + if #self._et ~= 0 then + table.insert(entries, self._et[#self._et]) + -- remove last value + table.remove(self._et) + else + break + end + end + -- if we get fewer entries than requested, also include default (if not nil) + if #entries < num and self._default_element ~= nil then + table.insert(entries, self._default_element) + end + + -- return unpacked entries + return table.unpack(entries) + end + + -- get entries + function t:getn() + return #self._et + end + + -- list values + function t:list() + for i,v in pairs(self._et) do + print(i, v) + end + end + + -- get last entry without removing + function t:last() + return #self._et > 0 and self._et[#self._et] or self._default_element + end + + return t +end + +-- define Constants, lifted from cbhwlib.h +local cbConst = {} +cbConst.cbMAXHOOPS = 4 +cbConst.cbMAXSITES = 4 +cbConst.cbMAXSITEPLOTS = ((cbConst.cbMAXSITES - 1) * cbConst.cbMAXSITES / 2) +cbConst.cbNUM_FE_CHANS = 128 -- #Front end channels. TODO: 256 on some systems. +cbConst.cbNUM_ANAIN_CHANS = 16 -- #Analog Input channels +cbConst.cbNUM_ANALOG_CHANS = (cbConst.cbNUM_FE_CHANS + cbConst.cbNUM_ANAIN_CHANS) -- Total Analog Inputs +cbConst.cbNUM_ANAOUT_CHANS = 4 -- #Analog Output channels +cbConst.cbNUM_AUDOUT_CHANS = 2 -- #Audio Output channels +cbConst.cbNUM_ANALOGOUT_CHANS = (cbConst.cbNUM_ANAOUT_CHANS + cbConst.cbNUM_AUDOUT_CHANS) -- Total Analog Output +cbConst.cbNUM_DIGIN_CHANS = 1 -- #Digital Input channels +cbConst.cbNUM_SERIAL_CHANS = 1 -- #Serial Input channels +cbConst.cbNUM_DIGOUT_CHANS = 4 -- #Digital Output channels +-- Total of all channels = 156 +cbConst.cbMAXCHANS = (cbConst.cbNUM_ANALOG_CHANS + + cbConst.cbNUM_ANALOGOUT_CHANS + cbConst.cbNUM_DIGIN_CHANS + + cbConst.cbNUM_SERIAL_CHANS + cbConst.cbNUM_DIGOUT_CHANS) + +cbConst.cbFIRST_FE_CHAN = 0 -- 0 First Front end channel +cbConst.cbFIRST_ANAIN_CHAN = cbConst.cbNUM_FE_CHANS -- 256 First Analog Input channel +cbConst.cbFIRST_ANAOUT_CHAN = (cbConst.cbFIRST_ANAIN_CHAN + cbConst.cbNUM_ANAIN_CHANS) -- 288 First Analog Output channel +cbConst.cbFIRST_AUDOUT_CHAN = (cbConst.cbFIRST_ANAOUT_CHAN + cbConst.cbNUM_ANAOUT_CHANS) -- 296 First Audio Output channel +cbConst.cbFIRST_DIGIN_CHAN = (cbConst.cbFIRST_AUDOUT_CHAN + cbConst.cbNUM_AUDOUT_CHANS) -- 300 First Digital Input channel +cbConst.cbFIRST_SERIAL_CHAN = (cbConst.cbFIRST_DIGIN_CHAN + cbConst.cbNUM_DIGIN_CHANS) -- 302 First Serial Input channel +cbConst.cbFIRST_DIGOUT_CHAN = (cbConst.cbFIRST_SERIAL_CHAN + cbConst.cbNUM_SERIAL_CHANS) -- 304 First Digital Output channel + + +cbConst.cbLEN_STR_UNIT = 8 +cbConst.cbLEN_STR_LABEL = 16 +cbConst.cbLEN_STR_FILT_LABEL = 16 +cbConst.cbLEN_STR_IDENT = 64 +cbConst.cbMAXUNITS = 5 +cbConst.cbMAXNTRODES = (cbConst.cbNUM_ANALOG_CHANS / 2) +cbConst.cbPKT_SPKCACHELINECNT = cbConst.cbNUM_ANALOG_CHANS + +cbConst.cbMAX_PNTS = 128 + + +-- base of our rudimentary class system +local klass = {} +function klass:new (o) + o = o or {} + setmetatable(o, self) + self.__index = self + return o +end + +local AField = klass:new{ + n='name', + d=nil, + ftype='afield', +} + + +local PktField = AField:new{ + ftype='pktfield', + t='UINT8', + lf=nil, + lfactor=1, + len=nil, + format='NONE', + valuestring=nil, + mask=nil, + _data_width={ + UINT8=1, + INT8=1, + BYTES=1, + UINT16=2, + INT16=2, + UINT32=4, + INT32=4, + FLOAT=4, + UINT64=8, + DOUBLE=8, + STRING=1, + }, + _data_rng_getter={ + UINT8='le_uint', + INT8='le_int', + UINT16='le_uint', + INT16='le_int', + UINT32='le_uint', + UINT64='le_uint', + INT32='le_int', + FLOAT='le_float', + DOUBLE='le_float', + } +} +function PktField:dataWidth() + local dw = self._data_width[self.t] + return dw +end +function PktField:rangeGetter() + return self._data_rng_getter[self.t] +end + +local FlagField = AField:new{ + mask=0x00, + valuestring=nil, + ftype='flagfield', +} + +-- All Packets derive from CbPkt, which defines the packet header +local CbPkt = klass:new{ + name='HEADER', + fields={ + PktField:new{t='UINT32', n='time', d='Timestamp in tics'}, -- # TODO: UINT64 in protocol 4.x + PktField:new{t='UINT16', n='chid', format='HEX_DEC'}, + PktField:new{t='UINT8', n='type', format='HEX'}, + PktField:new{t='UINT8', n='dlen', d='Packet Data Length (in quadlets)'} -- # TODO: UINT16 in protocol 4.x + -- PktField:new{t='UINT8', n='instrument', format='HEX'}, + -- PktField:new{t='UINT16', n='reserved', format='HEX'} + }, + dfields={}, + pkttypes= setmetatable({}, {__mode="v"}), + conf_type_map = {[1]=setmetatable({}, {__mode="v"}), + [2]=setmetatable({}, {__mode="v"}) + }, + _conf_pkg_ch=0x8000 +} +function CbPkt:new(name, addfields) + local newobj = klass:new() + newobj.fields = {} + for i, f in ipairs(self.fields) do + newobj.fields[i] = f:new() + end + newobj.name = name + newobj.dfields = {} + addfields = addfields or {} + local types = addfields._types + addfields._types = nil + for _, f in pairs(addfields) do + table.insert(newobj.fields, f) + end + for i, f in ipairs(newobj.fields) do + newobj.fields[f.n] = f + end + + newobj.fields['type'].valuestring = types + + self.pkttypes[name] = newobj + setmetatable(newobj, self) + self.__index = self + + if newobj._kind == 1 or newobj._kind == 2 then + for k,_ in pairs(newobj.fields['type'].valuestring) do + self.conf_type_map[newobj._kind][k] = newobj + end + end + return newobj +end +function CbPkt:match(chid, type) + -- this matches all config packets, i.e. ones where chid==0x8000 + if chid == self._conf_pkg_ch and type ~= nil and self.conf_type_map[1][type] ~= nil then + return self.conf_type_map[1][type] + end + if (chid & self._conf_pkg_ch) == self._conf_pkg_ch and + (chid & ~(self._conf_pkg_ch)) > 0 and + type ~= nil and + self.conf_type_map[2][type] ~= nil then + return self.conf_type_map[2][type] + end + + if chid == 0x000 and self.pkttypes.cbPKT_GROUP ~= nil then + return self.pkttypes.cbPKT_GROUP + end + + if chid > 0x0000 and chid < cbConst.cbPKT_SPKCACHELINECNT and self.pkttypes.nevPKT_GENERIC ~= nil then + return self.pkttypes.nevPKT_GENERIC + end + + if (cbConst.cbFIRST_DIGIN_CHAN < chid) and (chid <= cbConst.cbFIRST_DIGIN_CHAN+cbConst.cbNUM_DIGIN_CHANS) and self.pkttypes.nevPKT_DIGIN ~= nil then + return self.pkttypes.nevPKT_DIGIN + end + + return self.pkttypes['cbPKT_GENERIC'] +end + +function CbPkt:iterate(b_len) + local i=0 + local n=#self.fields + local buf_pos=0 + -- store how many bytes we expect in total. That's composed of 8 header bytes and the reported 'dlen' + local dlen + + return function() + i = i + 1 + if i <= n then + local f = self.fields[i] + if f.ftype=='afield' or f.ftype=='flagfield' then + return i, buf_pos, 0, f, 1 + end + + -- if dlen hasn't been read yet, test if it is available, read it from field; add header size + if dlen == nil and self.dfields['dlen'] ~= nil and self.dfields['dlen']() ~= nil then + dlen = 8 + self.dfields['dlen']()() * 4 + end + + local width = f:dataWidth() + local field_w = width + local mult = 1 + if f.len ~= nil then + mult = f.len + elseif f.lf ~= nil and self.dfields[f.lf] ~= nil then + mult = f.lfactor * self.dfields[f.lf]()() + end + width = width * mult + local old_buf_pos = buf_pos + buf_pos = buf_pos + width + if f.t=='BYTES' or f.t=='STRING' then + field_w = width + mult = 1 + end + -- if we'd exceed buffer length (as passed through b_len) or dlen, stop by returning nil + if (b_len ~= nil and buf_pos > b_len) or (dlen ~= nil and buf_pos > dlen) then return nil end + return i, old_buf_pos, field_w, f, mult + end + end +end + +function CbPkt:makeInfoString() + return self.name +end + +-- Subclass for config packets. They all share that +-- chid == 0x8000 and 'type' corresponds to a packet type, which we store in the 'type' field's valuestring +local CbPktConfig = CbPkt:new('cb_cfg') +CbPktConfig._kind = 1 + +-- Subclass for preview stream packets. They all share that +-- (chid & 0x8000) == 0x8000 and (chid&0x0FFF) > 0 and 'type' corresponds to a packet type, which we store in the 'type' field's valuestring +local CbPktPrevStreamBase = CbPkt:new('cb_prev') +CbPktPrevStreamBase._kind = 2 + +-- Packet definitions start here + +-- Generic packets + +local CbPktGeneric = CbPkt:new('cbPKT_GENERIC', + { + PktField:new{t='BYTES', n='data', lf='dlen', lfactor=4}, + } +) + +-- Config packets (chid == 0x8000) + +-- System heartbeat +local CbPktSysHeartbeat = CbPktConfig:new('cbPKT_SYSHEARTBEAT', { + _types={ + [0x00] = "System Heartbeat cbPKTTYPE_SYSHEARTBEAT", + } +}) + +-- System protocol monitor +local CbPktSysProtocolMonitor = CbPktConfig:new('cbPKT_SYSPROTOCOLMONITOR', + { + PktField:new{t='UINT32', n='sentpkts', d='Packets sent since last cbPKT_SYSPROTOCOLMONITOR (or 0 if timestamp=0)'}, + _types={ + [0x01] = "System Protocol Monitor Packet", + } + } +) + +-- System condition report packet +local CbPktSysInfo = CbPktConfig:new('cbPKT_SYSINFO', + { + PktField:new{t='UINT32', n='sysfreq', d='System clock frequency in Hz', format='DEC'}, + PktField:new{t='UINT32', n='spikelen', d='The length of the spike events', format='DEC'}, + PktField:new{t='UINT32', n='spikepre', d='Spike pre-trigger samples', format='DEC'}, + PktField:new{t='UINT32', n='resetque', d='The channel for the reset to que on', format='DEC'}, + PktField:new{t='UINT32', n='runlevel', d='System runlevel', format='DEC_HEX'}, + PktField:new{t='UINT32', n='runflags', d='Run Flags', format='HEX'}, + _types={ + [0x10] = "System Condition Report cbPKTTYPE_SYSREP", + [0x11] = "System Spike Length Report cbPKTTYPE_SYSREPSPKLEN", + [0x12] = "System Runlevel Report cbPKTTYPE_SYSREPRUNLEV", + [0x90] = "System set Req cbPKTTYPE_SYSSET", + [0x91] = "System set Spike Length cbPKTTYPE_SYSSETSPKLEN", + [0x92] = "System set Runlevel cbPKTTYPE_SYSSETRUNLEV", + } + } +) + +-- System condition report packet +local CbPktSSModelSet = CbPktConfig:new('cbPKT_SS_MODELSET', + { + PktField:new{t='UINT32', n='chan', d='Channel being configured (zero-based)', format='DEC'}, + PktField:new{t='UINT32', n='unit_number', d='unit number (0 = noise)', format='DEC'}, + PktField:new{t='UINT32', n='valid', valuestring={[0]="invalid", [1]="valid"}, format='DEC'}, + PktField:new{t='UINT32', n='inverted', valuestring={[0]="not inverted", [1]="inverted"}, format='DEC'}, + PktField:new{t='INT32', n='num_samples', d='non-zero value means that the block stats are valid', format='DEC'}, + PktField:new{t='FLOAT', n='mu', len=2}, + PktField:new{t='FLOAT', n='Sigma_x', len=4}, + PktField:new{t='FLOAT', n='determinant_Sigma_x'}, + PktField:new{t='FLOAT', n='Sigma_x_inv', len=4}, + PktField:new{t='FLOAT', n='log_determinant_Sigma_x'}, + PktField:new{t='FLOAT', n='subcluster_spread_factor_numerator'}, + PktField:new{t='FLOAT', n='subcluster_spread_factor_denominator'}, + PktField:new{t='FLOAT', n='mu_e'}, + PktField:new{t='FLOAT', n='sigma_e_squared'}, + _types={ + [0x51] = "SS Model response cbPKTTYPE_SS_MODELREP", + [0xD1] = "SS Model request cbPKTTYPE_SS_MODELSET", + } + } +) + +-- NTrode Information Packets +local CbPktNTrodeInfo = CbPktConfig:new('cbPKT_NTRODEINFO', + { + PktField:new{t='UINT32', n='ntrode', d='nTrode being configured (1-based)', format='DEC'}, + PktField:new{t='STRING', n='label', d='nTrode label', len=cbConst.cbLEN_STR_LABEL}, + AField:new{n='placeholder', d='→ Other fields of this packet have not been implemented yet. ←'}, + -- typedef struct { + -- INT16 nOverride; + -- INT16 afOrigin[3]; + -- INT16 afShape[3][3]; + -- INT16 aPhi; + -- UINT32 bValid; // is this unit in use at this time? + -- // BOOL implemented as UINT32 - for structure alignment at paragraph boundary + -- } cbMANUALUNITMAPPING; + -- cbMANUALUNITMAPPING ellipses[cbMAXSITEPLOTS][cbMAXUNITS]; // unit mapping + -- UINT16 nSite; // number channels in this NTrode ( 0 <= nSite <= cbMAXSITES) + -- UINT16 fs; // NTrode feature space cbNTRODEINFO_FS_* + -- UINT16 nChan[cbMAXSITES]; // group of channels in this NTrode + _types={ + [0x27] = "NTrode info response cbPKTTYPE_REPNTRODEINFO", + [0xA7] = "NTrode info request cbPKTTYPE_SETNTRODEINFO", + } + } +) + +-- Channel Information Packets +local CbPktChanInfo = CbPktConfig:new('cbPKT_CHANINFO', + { + PktField:new{t='UINT32', n='chan', d='channel being configured', format='DEC'}, + PktField:new{t='UINT32', n='proc', d='address of the processor', format='DEC'}, + PktField:new{t='UINT32', n='bank', d='address of the bank', format='DEC'}, + PktField:new{t='UINT32', n='term', d='terminal number', format='DEC_HEX'}, + PktField:new{t='UINT32', n='chancaps', d='channel capabilities', format='HEX'}, + PktField:new{t='UINT32', n='doutcaps', d='digital output capablities', format='HEX'}, + PktField:new{t='UINT32', n='dinpcaps', d='digital input capablities', format='HEX'}, + PktField:new{t='UINT32', n='aoutcaps', d='analog output capablities', format='HEX'}, + PktField:new{t='UINT32', n='ainpcaps', d='analog input capablities', format='HEX'}, + PktField:new{t='UINT32', n='spkcaps', d='spike capablities', format='HEX'}, + + AField:new{n='physcalin', d='physical channel scaling information (in)'}, + PktField:new{t='INT16', n='physcalin.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='physcalin.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='physcalin.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalin.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalin.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='physcalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='phyfiltin', d='physical channel filter definition (in)'}, + PktField:new{t='STRING', n='phyfiltin.label', d='filter label', len=cbConst.cbLEN_STR_FILT_LABEL}, + PktField:new{t='UINT32', n='phyfiltin.hpfreq', d='high-pass corner frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltin.hporder', d='high-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltin.hptype', d='high-pass filter type', format='HEX'}, + PktField:new{t='UINT32', n='phyfiltin.lpfreq', d='low-pass frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltin.lporder', d='low-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltin.lptype', d='low-pass filter type', format='HEX'}, + + AField:new{n='physcalout', d='physical channel scaling information (out)'}, + PktField:new{t='INT16', n='physcalout.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='physcalout.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='physcalout.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalout.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalout.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='physcalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='phyfiltout', d='physical channel filter definition (out)'}, + PktField:new{t='STRING', n='phyfiltout.label', d='filter label', len=cbConst.cbLEN_STR_FILT_LABEL}, + PktField:new{t='UINT32', n='phyfiltout.hpfreq', d='high-pass corner frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltout.hporder', d='high-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltout.hptype', d='high-pass filter type', format='HEX'}, + PktField:new{t='UINT32', n='phyfiltout.lpfreq', d='low-pass frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltout.lporder', d='low-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltout.lptype', d='low-pass filter type', format='HEX'}, + + PktField:new{t='STRING', n='label', d='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='userflags', format='HEX'}, + PktField:new{t='INT32', n='position', len=4}, + + AField:new{n='scalin', d='scaling information (in)'}, + PktField:new{t='INT16', n='scalin.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='scalin.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='scalin.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='scalin.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='scalin.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='scalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='scalout', d='scaling information (out)'}, + PktField:new{t='INT16', n='scalout.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='scalout.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='scalout.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='scalout.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='scalout.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='scalout.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + PktField:new{t='UINT32', n='doutopts', format='HEX'}, + PktField:new{t='UINT32', n='dinpopts', format='HEX'}, + PktField:new{t='UINT32', n='aoutopts', format='HEX'}, + PktField:new{t='UINT32', n='eopchar', format='HEX'}, + PktField:new{t='UINT32', n='monsource', format='HEX'}, + PktField:new{t='INT32', n='outvalue'}, + + PktField:new{t='UINT8', n='trigtype'}, + PktField:new{t='UINT16', n='trigchan'}, + PktField:new{t='UINT16', n='trigval'}, + + PktField:new{t='UINT32', n='ainpopts', format='HEX'}, + FlagField:new{t='BOOLEAN', n='ainpopts.rawpreview', format=32, mask=0x00000001, d='cbAINP_RAWPREVIEW Generate scrolling preview data for the raw channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.lnc', format=32, mask=0x00000002, d='cbAINP_LNC Line Noise Cancellation', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.lncpreview', format=32, mask=0x00000004, d='cbAINP_LNCPREVIEW Retrieve the LNC correction waveform', valuestring={'yes', 'no'}}, + + FlagField:new{t='BOOLEAN', n='ainpopts.smpstream', format=32, mask=0x00000010, d='cbAINP_SMPSTREAM stream the analog input stream directly to disk', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.smpfilter', format=32, mask=0x00000020, d='cbAINP_SMPFILTER Digitally filter the analog input stream', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.rawtream', format=32, mask=0x00000040, d='cbAINP_RAWSTREAM Raw data stream available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkstream', format=32, mask=0x00000100, d='cbAINP_SPKSTREAM Spike Stream is available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkfilter', format=32, mask=0x00000200, d='cbAINP_SPKFILTER Selectable Filters', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkpreview', format=32, mask=0x00000400, d='cbAINP_SPKPREVIEW Generate scrolling preview of the spike channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkproc', format=32, mask=0x00000800, d='cbAINP_SPKPROC Channel is able to do online spike processing', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.offset_cor', format=32, mask=0x00001000, d='cbAINP_OFFSET_CORRECT_CAP Offset correction mode (0-disabled 1-enabled)', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='lncrate'}, + + PktField:new{t='UINT32', n='smpfilter'}, + PktField:new{t='UINT32', n='smpgroup'}, + + PktField:new{t='INT32', n='smpdispmin'}, + PktField:new{t='INT32', n='smpdispmax'}, + + PktField:new{t='UINT32', n='spkfilter'}, + + PktField:new{t='INT32', n='spkdispmax'}, + PktField:new{t='INT32', n='lncdispmax'}, + + PktField:new{t='UINT32', n='spkopts'}, + + PktField:new{t='INT32', n='spkthrlevel'}, + PktField:new{t='INT32', n='spkthrlimit'}, + + PktField:new{t='UINT32', n='spkgroup'}, + + PktField:new{t='INT16', n='amplrejpos'}, + PktField:new{t='INT16', n='amplrejneg'}, + PktField:new{t='UINT32', n='refelecchan'}, + + AField:new{n='placeholder', d='→ Other fields [unitmapping, spkhoops] of this packet have not been implemented yet. ←'}, + + _types={ + [0x40] = "cbPKTTYPE_CHANREP", + [0x41] = "cbPKTTYPE_CHANREPLABEL", + [0x42] = "cbPKTTYPE_CHANREPSCALE", + [0x43] = "cbPKTTYPE_CHANREPDOUT", + [0x44] = "cbPKTTYPE_CHANREPDINP", + [0x45] = "cbPKTTYPE_CHANREPAOUT", + [0x46] = "cbPKTTYPE_CHANREPDISP", + [0x47] = "cbPKTTYPE_CHANREPAINP", + [0x48] = "cbPKTTYPE_CHANREPSMP", + [0x49] = "cbPKTTYPE_CHANREPSPK", + [0x4A] = "cbPKTTYPE_CHANREPSPKTHR", + [0x4B] = "cbPKTTYPE_CHANREPSPKHPS", + [0x4C] = "cbPKTTYPE_CHANREPUNITOVERRIDES", + [0x4D] = "cbPKTTYPE_CHANREPNTRODEGROUP", + [0x4E] = "cbPKTTYPE_CHANREPREJECTAMPLITUDE", + [0x4F] = "cbPKTTYPE_CHANREPAUTOTHRESHOLD", + [0xC0] = "cbPKTTYPE_CHANSET", + [0xC1] = "cbPKTTYPE_CHANSETLABEL", + [0xC2] = "cbPKTTYPE_CHANSETSCALE", + [0xC3] = "cbPKTTYPE_CHANSETDOUT", + [0xC4] = "cbPKTTYPE_CHANSETDINP", + [0xC5] = "cbPKTTYPE_CHANSETAOUT", + [0xC6] = "cbPKTTYPE_CHANSETDISP", + [0xC7] = "cbPKTTYPE_CHANSETAINP", + [0xC8] = "cbPKTTYPE_CHANSETSMP", + [0xC9] = "cbPKTTYPE_CHANSETSPK", + [0xCA] = "cbPKTTYPE_CHANSETSPKTHR", + [0xCB] = "cbPKTTYPE_CHANSETSPKHPS", + [0xCC] = "cbPKTTYPE_CHANSETUNITOVERRIDES", + [0xCD] = "cbPKTTYPE_CHANSETNTRODEGROUP", + [0xCE] = "cbPKTTYPE_CHANSETREJECTAMPLITUDE", + [0xCF] = "cbPKTTYPE_CHANSETAUTOTHRESHOLD", + } + } +) + +-- File Config Information Packets +local CbPktFileCfg = CbPktConfig:new('cbPKT_FILECFG', + { + PktField:new{t='UINT32', n='options', d='File Config Option', format='HEX', valuestring={ + [0x00]="Launch File dialog, set file info, start or stop recording cbFILECFG_OPT_NONE", + [0x01]="Keep-alive message cbFILECFG_OPT_KEEPALIVE", + [0x02]="Recording is in progress cbFILECFG_OPT_REC", + [0x03]="Recording stopped cbFILECFG_OPT_STOP", + [0x04]="NeuroMotive recording status cbFILECFG_OPT_NMREC", + [0x05]="Close file application cbFILECFG_OPT_CLOSE", + [0x06]="Recording datetime cbFILECFG_OPT_SYNCH", + [0x07]="Launch File dialog, do not set or do anything cbFILECFG_OPT_OPEN", + }}, + -- FlagField:new{t='BOOLEAN', n='options.keepalive', format=32, mask=0x00000001, d='Keep-alive message cbFILECFG_OPT_KEEPALIVE', valuestring={'yes', 'no'}}, + -- FlagField:new{t='BOOLEAN', n='options.rec', format=32, mask=0x00000002, d='Recording is in progress cbFILECFG_OPT_REC', valuestring={'yes', 'no'}}, + -- FlagField:new{t='BOOLEAN', n='options.stop', format=32, mask=0x00000002, d='Recording is in progress cbFILECFG_OPT_REC', valuestring={'yes', 'no'}}, + PktField:new{t='UINT32', n='duration', format='DEC'}, + PktField:new{t='UINT32', n='recording', d='If cbFILECFG_OPT_NONE this option starts/stops recording remotely', format='HEX'}, + PktField:new{t='UINT32', n='extctrl', d='If cbFILECFG_OPT_REC this is split number (0 for non-TOC). If cbFILECFG_OPT_STOP this is error code.', format='DEC_HEX'}, + PktField:new{t='STRING', n='username', len=256}, + PktField:new{t='STRING', n='filename', len=256}, + PktField:new{t='STRING', n='comment', len=256, d='Comment or Datetime'}, + _types={ + [0x61] = "File Config response cbPKTTYPE_REPFILECFG", + [0xE1] = "File Config request cbPKTTYPE_SETFILECFG", + } + } +) + +-- Config All packet +local CbPktConfigAll = CbPktConfig:new('cbPKT_CONFIGALL', {_types={ + [0x08] = "Config All Report cbPKTTYPE_REPCONFIGALL", + [0x88] = "Config All Request cbPKTTYPE_REQCONFIGALL", + }}) + +-- Options for noise boundary packets +local CbPktSSNoiseBoundary = CbPktConfig:new('cbPKT_SS_NOISE_BOUNDARY', + { + PktField:new{t='UINT32', n='chan', d='channel being configured', format='DEC'}, + PktField:new{t='FLOAT', n='afc', len=3, d='Center of ellipsoid'}, + PktField:new{t='FLOAT', n='afS', len=9, d='Ellipsoid axes'}, + _types={ + [0x54] = "Noise boundary Report cbPKTTYPE_SS_NOISE_BOUNDARYREP", + [0xD4] = "Noise boundary Request cbPKTTYPE_SS_NOISE_BOUNDARYSET", + } + } +) + +-- SS Statistics packets +local CbPktSSStatistics = CbPktConfig:new('cbPKT_SS_STATISTICS', + { + PktField:new{t='UINT32', n='nUpdateSpikes', d='update rate in spike counts', format='DEC'}, + PktField:new{t='UINT32', n='nAutoalg', d='Sorting Algorithm', format='HEX', valuestring={ + [0x00]="No sorting cbAUTOALG_NONE", + [0x01]="Auto spread cbAUTOALG_SPREAD", + [0x02]="Auto Hist Correlation cbAUTOALG_HIST_CORR_MAJ", + [0x03]="Auto Hist Peak Maj cbAUTOALG_HIST_PEAK_COUNT_MAJ", + [0x04]="Auto Hist Peak Fish cbAUTOALG_HIST_PEAK_COUNT_FISH", + [0x05]="Manual PCA cbAUTOALG_PCA", + [0x06]="Manual Hoops cbAUTOALG_HOOPS", + [0x07]="K-means PCA cbAUTOALG_PCA_KMEANS", + [0x08]="EM-clustering PCA cbAUTOALG_PCA_EM", + [0x09]="DBSCAN PCA cbAUTOALG_PCA_DBSCAN", + }}, + PktField:new{t='UINT32', n='nMode', d='command to change sorting parameters', format='HEX', valuestring={ + [0x00]="Change the settings and leave sorting the same cbAUTOALG_MODE_SETTING", + [0x01]="Change settings and apply this sorting to all channels cbAUTOALG_MODE_APPLY", + }}, + PktField:new{t='FLOAT', n='fMinClusterPairSpreadFactor'}, + PktField:new{t='FLOAT', n='fMaxSubclusterSpreadFactor'}, + + PktField:new{t='FLOAT', n='fMinClusterHistCorrMajMeasure'}, + PktField:new{t='FLOAT', n='fMaxClusterPairHistCorrMajMeasure'}, + + PktField:new{t='FLOAT', n='fClusterHistValleyPercentage'}, + PktField:new{t='FLOAT', n='fClusterHistClosePeakPercentage'}, + PktField:new{t='FLOAT', n='fClusterHistMinPeakPercentage'}, + PktField:new{t='UINT32', n='nWaveBasisSize', d='number of wave to collect to calculate the basis', format='DEC'}, + PktField:new{t='UINT32', n='nWaveSampleSize', d='number of samples sorted with the same basis before re-calculating the basis', format='DEC'}, + _types={ + [0x55] = "SS Statistics Report cbPKTTYPE_SS_STATISTICSREP", + [0xD5] = "SS Statistics Request cbPKTTYPE_SS_STATISTICSSET", + } + } +) + +-- SS Status packets +local CbPktSSStatus = CbPktConfig:new('cbPKT_SS_STATUS', + { + AField:new{n='cntlUnitStats'}, + PktField:new{t='UINT32', n='cntlUnitStats.nMode', d='nMode', format='HEX', valuestring={ + [0x00]="do not adapt at all", + [0x01]="always adapt", + [0x02]="adapt if timer not timed out", + }}, + PktField:new{t='FLOAT', n='cntlUnitStats.fTimeOutMinutes', d='how many minutes until time out'}, + PktField:new{t='FLOAT', n='cntlUnitStats.fElapsedMinutes', d='amount of time that has elapsed'}, + AField:new{n='cntlNumUnits'}, + PktField:new{t='UINT32', n='cntlNumUnits.nMode', d='nMode', format='HEX', valuestring={ + [0x00]="do not adapt at all", + [0x01]="always adapt", + [0x02]="adapt if timer not timed out", + }}, + PktField:new{t='FLOAT', n='cntlNumUnits.fTimeOutMinutes', d='how many minutes until time out'}, + PktField:new{t='FLOAT', n='cntlNumUnits.fElapsedMinutes', d='amount of time that has elapsed'}, + _types={ + [0x57] = "SS Status Report cbPKTTYPE_SS_STATUSREP", + [0xD7] = "SS Status Request cbPKTTYPE_SS_STATUSSET", + } + } +) + +-- SS Recalc packets +local CbPktSSRecalc = CbPktConfig:new('cbPKT_SS_RECALC', + { + + PktField:new{t='UINT32', n='chan',format='DEC', d="Channel (1-based). If 0, perform for all"}, + PktField:new{t='UINT32', n='mode', d='mode', format='HEX', valuestring={ + [0]="PC ->NSP start recalculation cbPCA_RECALC_START", + [1]="NSP->PC finished recalculation cbPCA_RECALC_STOPPED", + [2]="NSP->PC waveform collection started cbPCA_COLLECTION_STARTED", + [3]="Change the basis of feature space cbBASIS_CHANGE", + [4]="cbUNDO_BASIS_CHANGE", + [5]="cbREDO_BASIS_CHANGE", + [6]="cbINVALIDATE_BASIS", + }}, + _types={ + [0x59] = "SS Recalc Report cbPKTTYPE_SS_RECALCREP", + [0xD9] = "SS Recalc Request cbPKTTYPE_SS_RECALCSET", + } + } +) + +-- Feature Space Basis Packets +local CbPktFSBasis = CbPktConfig:new('cbPKT_FS_BASIS', + { + + PktField:new{t='UINT32', n='chan',format='DEC', d="Channel (1-based)"}, + PktField:new{t='UINT32', n='mode', d='mode', format='HEX', valuestring={ + [0]="PC ->NSP start recalculation cbPCA_RECALC_START", + [1]="NSP->PC finished recalculation cbPCA_RECALC_STOPPED", + [2]="NSP->PC waveform collection started cbPCA_COLLECTION_STARTED", + [3]="Change the basis of feature space cbBASIS_CHANGE", + [4]="cbUNDO_BASIS_CHANGE", + [5]="cbREDO_BASIS_CHANGE", + [6]="cbINVALIDATE_BASIS", + }}, + PktField:new{t='UINT32', n='fs',format='DEC', d="Feature space: cbAUTOALG_PCA"}, + PktField:new{t='FLOAT', n='basis', d='Room for all possible points collected'}, + AField:new{n='notImpl', d="→ Variable number of points not imlpemented ←"}, + _types={ + [0x5B] = "FS Basis Report cbPKTTYPE_FS_BASISREP", + [0xDB] = "FS Basis Request cbPKTTYPE_FS_BASISSET", + } + } +) + +-- Sample Group Information packets +local CbPktGroupInfo = CbPktConfig:new('cbPKT_GROUPINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='group',format='DEC'}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='period', d='Sampling Period', format='DEC'}, + PktField:new{t='UINT32', n='length', format='DEC'}, + PktField:new{t='UINT32', n='list', lf='length', d='channelList'}, + _types={ + [0x30] = "Sample Group Report cbPKTTYPE_GROUPREP", + [0xB0] = "Sample Group Request cbPKTTYPE_GROUPSET", + } + } +) + +-- Processor Information packets +local CbPktProcInfo = CbPktConfig:new('cbPKT_PROCINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='idcode', format='DEC_HEX', d='Manufacturer ID'}, + PktField:new{t='STRING', n='ident', len=cbConst.cbLEN_STR_IDENT}, + PktField:new{t='UINT32', n='chanbase',format='DEC'}, + PktField:new{t='UINT32', n='chancount',format='DEC'}, + PktField:new{t='UINT32', n='bankcount',format='DEC'}, + PktField:new{t='UINT32', n='groupcount',format='DEC'}, + PktField:new{t='UINT32', n='filtcount',format='DEC'}, + PktField:new{t='UINT32', n='sortcount',format='DEC'}, + PktField:new{t='UINT32', n='unitcount',format='DEC'}, + PktField:new{t='UINT32', n='hoopcount',format='DEC'}, + PktField:new{t='UINT32', n='sortmethod',format='DEC', valuestring={[0]='manual', [1]='auto'}}, + PktField:new{t='UINT32', n='version',format='DEC'}, + _types={ + [0x21] = "Proc Report cbPKTTYPE_PROCREP", + }}) + +-- Bank Information packets +local CbPktBankInfo = CbPktConfig:new('cbPKT_BANKINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='bank',format='DEC'}, + PktField:new{t='UINT32', n='idcode', format='DEC_HEX', d='Manufacturer ID'}, + PktField:new{t='STRING', n='ident', len=cbConst.cbLEN_STR_IDENT}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='chanbase',format='DEC'}, + PktField:new{t='UINT32', n='chancount',format='DEC'}, + _types={ + [0x22] = "Bank Report cbPKTTYPE_BANKREP", + } + } +) + +-- Filter (FILT) Information packets +local CbPktFiltInfo = CbPktConfig:new('cbPKT_FILTINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='filt',format='DEC'}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_FILT_LABEL}, + AField:new{n='hp', d='High-pass filter'}, + PktField:new{t='UINT32', n='hp.hpfreq', d='Corner freq in mHz', format='DEC'}, + PktField:new{t='UINT32', n='hp.hporder', d='Filter order', format='DEC'}, + PktField:new{t='UINT32', n='hp.hptype', d='Filter type', format='HEX'}, + FlagField:new{t='BOOLEAN', n='hp.hptype.physical', format=32, mask=0x00000001, d='Physical cbFILTTYPE_PHYSICAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.digital', format=32, mask=0x00000002, d='Digital cbFILTTYPE_DIGITAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.adaptive', format=32, mask=0x00000004, d='Adaptive cbFILTTYPE_ADAPTIVE', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.nonlinear', format=32, mask=0x00000008, d='Nonlinear cbFILTTYPE_NONLINEAR', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.butter', format=32, mask=0x00000100, d='Butterworth cbFILTTYPE_BUTTERWORTH', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.cheb', format=32, mask=0x00000200, d='Chebychev cbFILTTYPE_CHEBYCHEV', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.bessel', format=32, mask=0x00000400, d='Bessel cbFILTTYPE_BESSEL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.elliptical', format=32, mask=0x00000800, d='Elliptical cbFILTTYPE_ELLIPTICAL', valuestring={'yes','no'}}, + + + AField:new{n='lp', d='Low-pass filter'}, + PktField:new{t='UINT32', n='lp.lpfreq', d='Corner freq in mHz', format='DEC'}, + PktField:new{t='UINT32', n='lp.lporder', d='Filter order', format='DEC'}, + PktField:new{t='UINT32', n='lp.lptype', d='Filter type', format='HEX'}, + FlagField:new{t='BOOLEAN', n='lp.lptype.physical', format=32, mask=0x00000001, d='Physical cbFILTTYPE_PHYSICAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.digital', format=32, mask=0x00000002, d='Digital cbFILTTYPE_DIGITAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.adaptive', format=32, mask=0x00000004, d='Adaptive cbFILTTYPE_ADAPTIVE', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.nonlinear', format=32, mask=0x00000008, d='Nonlinear cbFILTTYPE_NONLINEAR', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.butter', format=32, mask=0x00000100, d='Butterworth cbFILTTYPE_BUTTERWORTH', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.cheb', format=32, mask=0x00000200, d='Chebychev cbFILTTYPE_CHEBYCHEV', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.bessel', format=32, mask=0x00000400, d='Bessel cbFILTTYPE_BESSEL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.elliptical', format=32, mask=0x00000800, d='Elliptical cbFILTTYPE_ELLIPTICAL', valuestring={'yes','no'}}, + + + PktField:new{t='DOUBLE', n='sos1a1'}, + PktField:new{t='DOUBLE', n='sos1a2'}, + PktField:new{t='DOUBLE', n='sos1b1'}, + PktField:new{t='DOUBLE', n='sos1b2'}, + PktField:new{t='DOUBLE', n='sos2a1'}, + PktField:new{t='DOUBLE', n='sos2a2'}, + PktField:new{t='DOUBLE', n='sos2b1'}, + PktField:new{t='DOUBLE', n='sos2b2'}, + PktField:new{t='DOUBLE', n='sos1a1'}, + _types={ + [0x23] = "Filter Report cbPKTTYPE_FILTREP", + [0xA3] = "Filter Request cbPKTTYPE_FILTSET", + } + } +) + +-- cbPKT_CHANRESET Factory Default settings request packet +local CbPktChanReset = CbPktConfig:new('cbPKT_CHANRESET', + { + AField:new{d="This packet is untested."}, + PktField:new{t='UINT32', n='chan', d="Channel"}, + PktField:new{t='UINT8', n='label', d="Reset label", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='userflags', d="Reset User flags", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='position', d="Reset Reserved", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='scalin', d="Reset Scaling in", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='scalout', d="Reset Scaling out", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='doutopts', d="Reset dOut options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='dinpopts', d="Reset dIn options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='aoutopts', d="Reset aOut options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='eopchar', d="Reset endOfPacket char", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='monsource', d="Reset monitor source", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='outvalue', d="Reset outValue", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='ainpopts', d="Reset aIn options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='lncrate', d="Reset LNC rate", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpfilter', d="Reset filter id", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpgroup', d="Reset sample group", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpdispmin', d="Reset display min", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpdispmax', d="Reset display max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkfilter', d="Reset spk filter", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkdispmax', d="Reset spk disp max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='lncdispmax', d="Reset LNC disp max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkopts', d="Reset spk options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkthrlevel', d="Reset spk threshold lvl", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkthrlimit', d="Reset spk threshold limit", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkgroup', d="Reset spkgroup", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkhoops', d="Reset spkhoops", valuestring={[0]='no', [1]='yes'}}, + _types={ + [0x24] = "Factory Default settings Report cbPKTTYPE_CHANRESETREP", + [0xA4] = "Factory Default settings Request cbPKTTYPE_CHANRESET", + } + } +) + + +-- cbPKT_ADAPTFILTINFO +local CbPktAdaptFiltInfo = CbPktConfig:new('cbPKT_ADAPTFILTINFO', + { + PktField:new{t='UINT32', n='chan', d="Chan (Ignored)"}, + PktField:new{t='UINT32', n='nMode', valuestring= + { + [0]="disabled", + [1]="filter continuous & spikes", + [2]="filter spikes", + } + }, + + PktField:new{t='FLOAT', n='dLearningRate'}, + PktField:new{t='UINT32', n='refChan1', d="Reference Channel 1"}, + PktField:new{t='UINT32', n='refChan2', d="Reference Channel 2"}, + _types={ + [0x25] = "Adaptive filtering Report cbPKTTYPE_ADAPTFILTREP", + [0xA5] = "Adaptive filtering Request cbPKTTYPE_ADAPTFILTSET", + } + } +) + +-- cbPKT_REFELECFILTINFO +local CbPktRefElecFiltInfo = CbPktConfig:new('cbPKT_REFELECFILTINFO', + { + PktField:new{t='UINT32', n='chan', d="Chan (Ignored)"}, + PktField:new{t='UINT32', n='nMode', valuestring= + { + [0]="disabled", + [1]="filter continuous & spikes", + [2]="filter spikes", + } + }, + PktField:new{t='UINT32', n='refChan', d="Reference Channel"}, + _types={ + [0x26] = "Reference Electrode filtering Report cbPKTTYPE_REFELECFILTREP", + [0xA6] = "Reference Electrode filtering Request cbPKTTYPE_REFELECFILTSET", + } + } +) + +-- cbPKT_LNC +local CbPktLNC = CbPktConfig:new('cbPKT_LNC', + { + PktField:new{t='UINT32', n='lncFreq', d="Nominal line noise frequency to be canceled (in Hz)"}, + PktField:new{t='UINT32', n='lncRefChan', d="Reference channel for lnc synch (1-based)"}, + PktField:new{t='UINT32', n='lncGlobalMode', d="reserved"}, + _types={ + [0x28] = "Line Noise Cancellation Report cbPKTTYPE_LNCREP", + [0xA8] = "Line Noise Cancellation Request cbPKTTYPE_LNCSET", + } + } +) + + +-- cbPKT_NM +local CbPktNM = CbPktConfig:new('cbPKT_NM', + { + PktField:new{t='UINT32', n='mode', valuestring= + { + [0]="cbNM_MODE_NONE", + [1]="cbNM_MODE_CONFIG Ask NeuroMotive for configuration", + [2]="cbNM_MODE_SETVIDEOSOURCE Configure video source", + [3]="cbNM_MODE_SETTRACKABLE Configure trackable", + [4]="cbNM_MODE_STATUS NeuroMotive status reporting (cbNM_STATUS_*)", + [5]="cbNM_MODE_TSCOUNT Timestamp count (value is the period with 0 to disable this mode)", + [6]="cbNM_MODE_SYNCHCLOCK Start (or stop) synchronization clock (fps*1000 specified by value, zero fps to stop capture)", + [7]="cbNM_MODE_ASYNCHCLOCK Asynchronous clock", + } + }, + PktField:new{t='UINT32', n='flags', d="status of NeuroMotive"}, + PktField:new{t='UINT32', n='value'}, + PktField:new{t='UINT32', n='opt', len=cbConst.cbLEN_STR_LABEL/4}, + _types={ + [0x32] = "NeuroMotive Report cbPKTTYPE_NMREP", + [0xB2] = "NeuroMotive Request cbPKTTYPE_NMSET", + } + } +) + +-- cbPKT_VIDEOSYNCH +local CbPktVideosynch = CbPktConfig:new('cbPKT_VIDEOSYNCH', + { + PktField:new{t='UINT16', n='split', d="file split number"}, + PktField:new{t='UINT32', n='frame'}, + PktField:new{t='UINT32', n='etime', d="elapsed time"}, + PktField:new{t='UINT16', n='id', d="video source id"}, + _types={ + [0x29] = "VideoSynch Report cbPKTTYPE_VIDEOSYNCHREP", + [0xA9] = "VideoSynch Request cbPKTTYPE_VIDEOSYNCHSET", + } + } +) + +-- cbPKT_VIDEOTRACK +local CbPktVideoTrack = CbPktConfig:new('cbPKT_VIDEOTRACK', + { + PktField:new{t='UINT16', n='parentID'}, + PktField:new{t='UINT16', n='nodeID'}, + PktField:new{t='UINT16', n='nodeCount'}, + PktField:new{t='UINT16', n='pointCount'}, + _types={ + [0x5F] = "VideoTrack Report cbPKTTYPE_VIDEOTRACKREP", + [0xDF] = "VideoTrack Request cbPKTTYPE_VIDEOTRACKSET", + } + } +) + +-- cbPKT_NPLAY +local CbPktNPlay = CbPktConfig:new('cbPKT_NPLAY', + { + PktField:new{t='UINT32', n='ftimehi', d='ftime hi'}, + PktField:new{t='UINT32', n='ftimelo', d='ftime lo'}, + PktField:new{t='UINT32', n='stimehi', d='stime hi'}, + PktField:new{t='UINT32', n='stimelo', d='stime lo'}, + PktField:new{t='UINT32', n='etimehi', d='etime hi'}, + PktField:new{t='UINT32', n='etimelo', d='etime lo'}, + PktField:new{t='UINT32', n='valhi', d='val hi'}, + PktField:new{t='UINT32', n='vallo', d='val lo'}, + PktField:new{t='UINT16', n='mode', valuestring= + { + [0]="cbNPLAY_MODE_NONE", + [1]="cbNPLAY_MODE_PAUSE pause if val is non-zero, un-pause otherwise", + [2]="cbNPLAY_MODE_SEEK seek to time val", + [3]="cbNPLAY_MODE_CONFIG request full config", + [4]="cbNPLAY_MODE_OPEN open new file in val for playback", + [5]="cbNPLAY_MODE_PATH use the directory path in fname", + [6]="cbNPLAY_MODE_CONFIGMAIN request main config packet", + [7]="cbNPLAY_MODE_STEP run val procTime steps and pause, then send cbNPLAY_FLAG_STEPPED", + [8]="cbNPLAY_MODE_SINGLE single mode if val is non-zero, wrap otherwise", + [9]="cbNPLAY_MODE_RESET reset nPlay", + [10]="cbNPLAY_MODE_NEVRESORT resort NEV if val is non-zero, do not if otherwise", + [11]="cbNPLAY_MODE_AUDIO_CMD perform audio command in val (cbAUDIO_CMD_*), with option opt", + } + }, + PktField:new{t='UINT16', n='flag', valuestring= + { + [0]="cbNPLAY_FLAG_NONE no flag", + [1]="cbNPLAY_FLAG_CONF config packet (val is fname file index)", + [3]="cbNPLAY_FLAG_MAIN main config packet (val is file version)", + [2]="cbNPLAY_FLAG_DONE step command done", + } + }, + PktField:new{t='FLOAT', n='speed'}, + PktField:new{t='STRING', n='fname', len=256}, + _types={ + [0x5C] = "NPlay Report cbPKTTYPE_NPLAYREP", + [0xDC] = "NPlay Request cbPKTTYPE_NPLAYSET", + } + } +) + +-- cbPKT_AOUT_WAVEFORM Analog output packets +local CbPktAoutWaveform = CbPktConfig:new('cbPKT_AOUT_WAVEFORM', + { + PktField:new{t='UINT16', n='chan', d="Which analog output/audio output channel (1-based)"}, + + PktField:new{t='UINT16', n='mode', valuestring= + { + [0]="cbWAVEFORM_MODE_NONE Disabled", + [1]="cbWAVEFORM_MODE_PARAMETERS repeated sequence", + [2]="cbWAVEFORM_MODE_SINE sinusoid", + } + }, + PktField:new{t='UINT32', n='repeats'}, + PktField:new{t='UINT16', n='trig', valuestring= + { + [0]="cbWAVEFORM_TRIGGER_NONE instant software trigger", + [1]="cbWAVEFORM_TRIGGER_DINPREG digital input rising edge trigger", + [2]="cbWAVEFORM_TRIGGER_DINPFEG digital input falling edge trigger", + [3]="cbWAVEFORM_TRIGGER_SPIKEUNIT spike unit", + [4]="cbWAVEFORM_TRIGGER_COMMENTCOLOR comment RGBA color (A being big byte)", + [5]="cbWAVEFORM_TRIGGER_SOFTRESET soft-reset trigger", + [6]="cbWAVEFORM_TRIGGER_EXTENSION extension trigger", + } + }, + PktField:new{t='UINT16', n='trigChan'}, + PktField:new{t='UINT16', n='trigValue'}, + PktField:new{t='UINT8', n='active'}, + + AField:new{n='waveform'}, + PktField:new{t='INT16', n='waveform.offset'}, + PktField:new{t='UINT16', n='waveform.seq'}, + PktField:new{t='UINT16', n='waveform.seqTotal'}, + PktField:new{t='UINT16', n='waveform.phases'}, + PktField:new{t='UINT16', n='waveform.duration', lf='waveform.phases'}, + PktField:new{t='INT16', n='waveform.amplitude', lf='waveform.phases'}, + _types={ + [0x33] = "Analog Out Waveform Report cbPKTTYPE_WAVEFORMREP", + [0xB3] = "Analog Out Waveform Request cbPKTTYPE_WAVEFORMSET", + } + } +) + + +-- cbPKT_SS_DETECT +local CbPktSSDetect = CbPktConfig:new('cbPKT_SS_DETECT', + { + PktField:new{t='FLOAT', n='fThreshold'}, + PktField:new{t='FLOAT', n='fMultiplier'}, + _types={ + [0x52] = "SS Detect Report cbPKTTYPE_SS_DETECTREP", + [0xD2] = "SS Detect Request cbPKTTYPE_SS_DETECTSET", + } + } +) + +-- cbPKT_SS_ARTIF_REJECT +local CbPktSSArtifReject = CbPktConfig:new('cbPKT_SS_ARTIF_REJECT', + { + PktField:new{t='UINT32', n='nMaxSimulChans', d="How many channels can fire exactly at the same time?"}, + PktField:new{t='UINT32', n='nRefractoryCount', d="For how many samples (30 kHz) is a neuron refractory, so can't re-trigger"}, + _types={ + [0x53] = "Artifact Rejection Report cbPKTTYPE_SS_ARTIF_REJECTREP", + [0xD3] = "Artifact Rejection Request cbPKTTYPE_SS_ARTIF_REJECTSET", + } + } +) + +-- DOut set packets +local CbPktDOut = CbPktConfig:new('cbPKT_SET_DOUT', + { + PktField:new{t='INT16', n='chan', format='DEC'}, + PktField:new{t='INT16', n='value'}, + _types={ + [0x5D] = "Set Dout Report cbPKTTYPE_SET_DOUTREP", + [0xDD] = "Set Dout Request cbPKTTYPE_SET_DOUTSET", + } + } +) + +-- Preview streams +-- Configuration +local CbPktPrevStreamCfg = CbPktPrevStreamBase:new('prevStreamCfg', + { + _types={ + [0x03] = "Cfg Prev Stream Response cbPKTTYPE_PREVREP", + [0x81] = "Cfg Prev Stream Request cbPKTTYPE_PREVSETLNC", + [0x82] = "Cfg Prev Stream Request cbPKTTYPE_PREVSETSTREAM", + [0x83] = "Cfg Prev Stream Request cbPKTTYPE_PREVSET", + } + } +) + +-- Line Noise Cancellation waveform preview +local CbPktLNCPrev = CbPktPrevStreamBase:new('cbPKT_LNCPREV', + { + PktField:new{t='UINT32', n='freq', format='DEC', d='Estimated line noise frequency in mHz'}, + PktField:new{t='INT16', n='wave', len=300}, + _types={ + [0x01] = "LNC Prev Stream cbPKTTYPE_PREVREPLNC", + } + } +) + +-- Comment Packets +local CbPktComment = CbPktConfig:new('cbPKT_COMMENT', + { + PktField:new{t='UINT8', n='type', format='HEX'}, + PktField:new{t='UINT8', n='flags', d='Comment flags', format='HEX', valuestring={ + [0x00]="RGBA cbCOMMENT_FLAG_RGBA", + [0x01]="RGBA cbCOMMENT_FLAG_TIMESTAMP", + }}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT32', n='data', format='HEX'}, + PktField:new{t='STRING', n='comment', len=128}, + _types={ + [0x31] = "Comment response cbPKTTYPE_COMMENTREP", + [0xB1] = "Comment request cbPKTTYPE_COMMENTSET", + } + } +) + +-- LOG Packets +local CbPktLog = CbPktConfig:new('cbPKT_LOG', + { + PktField:new{t='UINT16', n='mode', d='Log Mode', format='HEX', valuestring={ + [0x00]="Normal log cbLOG_MODE_NONE", + [0x01]="Critical log cbLOG_MODE_CRITICAL", + [0x02]="RPC log cbLOG_MODE_RPC", + [0x03]="RPC log cbLOG_MODE_PLUGINFO", + [0x04]="RPC log cbLOG_MODE_RPC_RES", + [0x05]="RPC log cbLOG_MODE_PLUGINERR", + [0x06]="RPC log cbLOG_MODE_RPC_END", + [0x07]="RPC log cbLOG_MODE_RPC_KILL", + [0x08]="RPC log cbLOG_MODE_RPC_INPUT", + [0x09]="RPC log cbLOG_MODE_UPLOAD_RES", + [0x0A]="RPC log cbLOG_MODE_ENDPLUGIN", + [0x0B]="RPC log cbLOG_MODE_REBOOT", + }}, + PktField:new{t='STRING', n='name', len=16}, + PktField:new{t='STRING', n='desc', len=128}, + _types={ + [0x63] = "LOG response cbPKTTYPE_LOGREP", + [0xE3] = "LOG request cbPKTTYPE_LOGSET", + } + } +) + +-- Preview Stream +local CbPktStreamPrev = CbPktPrevStreamBase:new('cbPKT_STREAMPREV', + { + PktField:new{t='INT16', n='rawmin', format='DEC'}, + PktField:new{t='INT16', n='rawmax'}, + PktField:new{t='INT16', n='smpmin'}, + PktField:new{t='INT16', n='smpmax'}, + PktField:new{t='INT16', n='spkmin'}, + PktField:new{t='INT16', n='spkmax'}, + PktField:new{t='UINT32', n='spkmos'}, + PktField:new{t='UINT32', n='eventflag'}, + PktField:new{t='INT16', n='envmin'}, + PktField:new{t='INT16', n='envmax'}, + PktField:new{t='INT32', n='spkthrlevel'}, + PktField:new{t='UINT32', n='nWaveNum'}, + PktField:new{t='UINT32', n='nSampleRows'}, + PktField:new{t='UINT32', n='nFlags'}, + _types= { + [0x02] = "Prev Stream cbPKTTYPE_PREVREPSTREAM", + } + } +) + +-- Data packets (chid < 0x8000) +-- Sample Group packets +local CbPktGroup = CbPkt:new('cbPKT_GROUP', + { + PktField:new{t='INT16', n='data', lf='dlen', lfactor=2}, + } +) +CbPktGroup.fields['type'].d='Sample Group ID (1-127)' +CbPktGroup.fields['type'].format='DEC' + +function CbPktGroup:makeInfoString() + return self.name .. "(" .. self.dfields['type']()() .. ")" +end + +-- Spike packets +local CbPktNev = CbPkt:new('nevPKT_SPK', + { + PktField:new{t='INT16', n='data', lf='dlen', lfactor=2}, + } +) +CbPktNev.fields['type'].d='Packet Type' +CbPktNev.fields['type'].format='DEC' + +-- DigIn packets +local CbPktNevDigIn = CbPkt:new('nevPKT_DIGIN', + { + PktField:new{t='UINT32', n='data', lf='dlen', format='HEX_DEC'}, + } +) +CbPktNevDigIn.fields['type'].d='Packet Type' +CbPktNevDigIn.fields['type'].format='DEC' + +-- Packet definitions end here. + + +-- Now we define something that will make our protocol + +local ProtoMaker = klass:new{ + name='Cerebus', + desc="Cerebus NSP Communication", + colname="Cerebus", + port=51001 +} +function ProtoMaker:new(o) + o = o or {} + local newobj = klass.new(self) + for k,v in pairs(o) do newobj[k] = v end + newobj.proto = Proto(newobj.name, newobj.desc) + newobj.pfields = newobj.proto.fields + newobj.fByPkt = {} + return newobj +end +function ProtoMaker:register() + print("register proto ...") + + for _,p in pairs(CbPkt.pkttypes) do + self:makeFieldsForPacket(p) + end + + local fe_interface_id_f = Field.new("frame.interface_id") + + function self.proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = self.colname + local buflen = buffer:len() + local offset = 0 + local header_len = 8 + local buf_remain = buffer():tvb() + local i = 0 + while buflen >= header_len do + local chid = buf_remain(4,2):le_uint() + local ptype = buf_remain(6,1):uint() + local packet = CbPkt:match(chid, ptype) + -- get current + local packet_len = buf_remain(7,1):uint() * 4 + header_len + + + local subtree = tree:add(self.proto, buf_remain(0, packet_len), "Cerebus Protocol Data (" .. packet.name .. ")" ) + + self:addSubtreeForPkt(buf_remain(0, packet_len):tvb(), subtree, packet) + buflen = buflen - packet_len + buf_remain = buf_remain(packet_len):tvb() + if i == 0 then + pinfo.cols.info = packet:makeInfoString() + end + + i = i + 1 + end + if i > 1 then + pinfo.cols.info:append(" (+ " .. (i-1) .. " other" .. (i>2 and 's' or '') .. ")") + end + + local f_interface_id = fe_interface_id_f() + pinfo.cols.info:prepend("NSP:" .. tostring(f_interface_id) .. " ") + + end + local udp_table = DissectorTable.get("udp.port") + -- register our protocol to handle udp port (default 51001) + udp_table:add(self.port, self.proto) +end +function ProtoMaker:makeFieldsForPacket(pkt) + local n = self.name .. "." .. pkt.name .. "." + local fn = pkt.name .. "_" + self.fByPkt[pkt] = {} + for i, f in ipairs(pkt.fields) do + local thisfn = fn .. f.n + local thisn = n .. f.n + local pf + + if f.ftype~='afield' and f.ftype~='flagfield' then + pf = ProtoField.new(f.d and f.d or f.n, thisn, ftypes[f.t], f.valuestring, base[f.format], f.mask, f.d) + elseif f.ftype=='flagfield' then + pf = ProtoField.new(f.d and f.d or f.n, thisn, ftypes[f.t], f.valuestring, f.format, f.mask, f.d) + end + if pf~=nil then + self.pfields[thisfn] = pf + self.fByPkt[pkt][f.n] = pf + + local df = Field.new(thisn) + table.insert(pkt.dfields, df) + pkt.dfields[f.n] = df + end + end +end + +function ProtoMaker:addSubtreeForPkt(buffer, tree, pkt) + local tree_stack = Stack:Create({t=tree, p="", br=buffer()}) + + for i, bPos, width, pf, mult in pkt:iterate(buffer:len()) do + local current_parent_tree = nil + local current_parent_br = nil + repeat + local last_tree = tree_stack:last() + local i,j = string.find(pf.n, last_tree.p) + if i==1 and j > 0 and string.sub(pf.n, j+1, j+1)=='.' then + current_parent_tree = last_tree.t + current_parent_br = last_tree.br + -- tree_stack:push(last_tree) + elseif i==1 and j==0 then + current_parent_tree = last_tree.t + current_parent_br = last_tree.br + else + tree_stack:pop() + end + until current_parent_tree ~= nil + local subtree + local tvb_rng_wh + if pf.ftype == 'afield' then + subtree = current_parent_tree:add(pf.d ~= nil and pf.d or pf.n ) + elseif pf.ftype == 'flagfield' then + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], current_parent_br) + else + if mult > 0 then + tvb_rng_wh = buffer(bPos, width * mult) + local brng = buffer(bPos, width) + local this_rangeGetter = pf:rangeGetter() + if this_rangeGetter ~= nil then + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], tvb_rng_wh, brng[pf:rangeGetter()](brng) ) + else + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], tvb_rng_wh) + end + if mult > 1 then + local n = mult - 1 + subtree:append_text(" and "..n.." more item"..(n>1 and "s" or "")) + for i=0,n do + brng = buffer(bPos + width * i, width) + subtree:add( brng, 'item '..i..': ' .. brng[pf:rangeGetter()](brng)) + end + end + end + end + tree_stack:push({t=subtree, p=pf.n, f=pf, br=tvb_rng_wh}) + + end +end + +-- instantiate Protocol maker +local pm = ProtoMaker:new() +pm:register() diff --git a/dissectors/cerebus-nsp/src/Cerebus400.lua b/dissectors/cerebus-nsp/src/Cerebus400.lua new file mode 100644 index 0000000..a012570 --- /dev/null +++ b/dissectors/cerebus-nsp/src/Cerebus400.lua @@ -0,0 +1,1542 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/CerebusOSS/CerebusWireshark (Cerebus400.lua), +-- commit bf0cb2d4ccb2bc35ed09952d4fec6862519ebd21 du 13/05/2026 (dernière modification du fichier : +-- commit 1475eb0dff3b2086c89e7f8fcb96ddd11d285af6 du 13/05/2026). +-- Licence amont : GPL-3.0 (README « licensed under the GPLv3 », LICENSE du dépôt) — voir README.md et LICENSE. +-- Wireshark dissector for UDP packets exchanged between +-- Neural Signal Processors and controlling PCs +-- +-- Copyright 2017 Jonas Zimmermann, 2022 Hyrum Sessions + +-- info("Loading cb protocol ...") + +-- Definition of a few helpers + +-- implementation of a simple stack (Lifted from http://lua-users.org/wiki/SimpleStack) +-- and extended +local Stack = {} + +-- Create a Table with stack functions +function Stack:Create(default_element) + + -- stack table + local t = {} + -- entry table + t._et = {} + t._default_element = default_element + + -- push a value on to the stack + function t:push(...) + if ... then + local targs = {...} + -- add values + for _,v in ipairs(targs) do + table.insert(self._et, v) + end + end + end + + -- pop a value from the stack + function t:pop(num) + + -- get num values from stack + local num = num or 1 + + -- return table + local entries = {} + + -- get values into entries + for i = 1, num do + -- get last entry + if #self._et ~= 0 then + table.insert(entries, self._et[#self._et]) + -- remove last value + table.remove(self._et) + else + break + end + end + -- if we get fewer entries than requested, also include default (if not nil) + if #entries < num and self._default_element ~= nil then + table.insert(entries, self._default_element) + end + + -- return unpacked entries + return table.unpack(entries) + end + + -- get entries + function t:getn() + return #self._et + end + + -- list values + function t:list() + for i,v in pairs(self._et) do + print(i, v) + end + end + + -- get last entry without removing + function t:last() + return #self._et > 0 and self._et[#self._et] or self._default_element + end + + return t +end + +-- define Constants, lifted from cbhwlib.h +local cbConst = {} +cbConst.cbMAXHOOPS = 4 +cbConst.cbMAXSITES = 4 +cbConst.cbMAXSITEPLOTS = ((cbConst.cbMAXSITES - 1) * cbConst.cbMAXSITES / 2) +cbConst.cbNUM_FE_CHANS = 256 -- #Front end channels +cbConst.cbNUM_ANAIN_CHANS = 16 -- #Analog Input channels +cbConst.cbNUM_ANALOG_CHANS = (cbConst.cbNUM_FE_CHANS + cbConst.cbNUM_ANAIN_CHANS) -- Total Analog Inputs +cbConst.cbNUM_ANAOUT_CHANS = 4 -- #Analog Output channels +cbConst.cbNUM_AUDOUT_CHANS = 2 -- #Audio Output channels +cbConst.cbNUM_ANALOGOUT_CHANS = (cbConst.cbNUM_ANAOUT_CHANS + cbConst.cbNUM_AUDOUT_CHANS) -- Total Analog Output +cbConst.cbNUM_DIGIN_CHANS = 1 -- #Digital Input channels +cbConst.cbNUM_SERIAL_CHANS = 1 -- #Serial Input channels +cbConst.cbNUM_DIGOUT_CHANS = 4 -- #Digital Output channels +-- Total of all channels = 156 +cbConst.cbMAXCHANS = (cbConst.cbNUM_ANALOG_CHANS + + cbConst.cbNUM_ANALOGOUT_CHANS + cbConst.cbNUM_DIGIN_CHANS + + cbConst.cbNUM_SERIAL_CHANS + cbConst.cbNUM_DIGOUT_CHANS) + +cbConst.cbFIRST_FE_CHAN = 0 -- 0 First Front end channel +cbConst.cbFIRST_ANAIN_CHAN = cbConst.cbNUM_FE_CHANS -- 256 First Analog Input channel +cbConst.cbFIRST_ANAOUT_CHAN = (cbConst.cbFIRST_ANAIN_CHAN + cbConst.cbNUM_ANAIN_CHANS) -- 288 First Analog Output channel +cbConst.cbFIRST_AUDOUT_CHAN = (cbConst.cbFIRST_ANAOUT_CHAN + cbConst.cbNUM_ANAOUT_CHANS) -- 296 First Audio Output channel +cbConst.cbFIRST_DIGIN_CHAN = (cbConst.cbFIRST_AUDOUT_CHAN + cbConst.cbNUM_AUDOUT_CHANS) -- 300 First Digital Input channel +cbConst.cbFIRST_SERIAL_CHAN = (cbConst.cbFIRST_DIGIN_CHAN + cbConst.cbNUM_DIGIN_CHANS) -- 302 First Serial Input channel +cbConst.cbFIRST_DIGOUT_CHAN = (cbConst.cbFIRST_SERIAL_CHAN + cbConst.cbNUM_SERIAL_CHANS) -- 304 First Digital Output channel + + +cbConst.cbLEN_STR_UNIT = 8 +cbConst.cbLEN_STR_LABEL = 16 +cbConst.cbLEN_STR_FILT_LABEL = 16 +cbConst.cbLEN_STR_IDENT = 64 +cbConst.cbMAXUNITS = 5 +cbConst.cbMAXNTRODES = (cbConst.cbNUM_ANALOG_CHANS / 2) +cbConst.cbPKT_SPKCACHELINECNT = cbConst.cbNUM_ANALOG_CHANS + +cbConst.cbMAX_PNTS = 128 + + +-- base of our rudimentary class system +local klass = {} +function klass:new (o) + o = o or {} + setmetatable(o, self) + self.__index = self + return o +end + +local AField = klass:new{ + n='name', + d=nil, + ftype='afield', +} + + +local PktField = AField:new{ + ftype='pktfield', + t='UINT8', + lf=nil, + lfactor=1, + len=nil, + format='NONE', + valuestring=nil, + mask=nil, + _data_width={ + UINT8=1, + INT8=1, + BYTES=1, + UINT16=2, + INT16=2, + UINT32=4, + UINT64=8, + INT32=4, + FLOAT=4, + DOUBLE=8, + STRING=1, + }, + _data_rng_getter={ + UINT8='le_uint', + INT8='le_int', + UINT16='le_uint', + INT16='le_int', + UINT32='le_uint', + INT32='le_int', + FLOAT='le_float', + DOUBLE='le_float', + } +} +function PktField:dataWidth() + local dw = self._data_width[self.t] + return dw +end +function PktField:rangeGetter() + return self._data_rng_getter[self.t] +end + +local FlagField = AField:new{ + mask=0x00, + valuestring=nil, + ftype='flagfield', +} + +-- All Packets derive from CbPkt, which defines the packet header +local CbPkt = klass:new{ + name='HEADER', + fields={ + PktField:new{t='UINT64', n='time', d='Timestamp in tics', format='HEX'}, + PktField:new{t='UINT16', n='chid', format='HEX_DEC'}, + PktField:new{t='UINT8', n='type', format='HEX'}, + PktField:new{t='UINT16', n='dlen', d='Packet Data Length (in quadlets)'}, + PktField:new{t='UINT8', n='instrument', format='HEX'}, + PktField:new{t='UINT16', n='reserved', format='HEX'} + }, + dfields={}, + pkttypes= setmetatable({}, {__mode="v"}), + conf_type_map = {[1]=setmetatable({}, {__mode="v"}), + [2]=setmetatable({}, {__mode="v"}) + }, + _conf_pkg_ch=0x8000 +} +function CbPkt:new(name, addfields) + local newobj = klass:new() + newobj.fields = {} + for i, f in ipairs(self.fields) do + newobj.fields[i] = f:new() + end + newobj.name = name + newobj.dfields = {} + addfields = addfields or {} + local types = addfields._types + addfields._types = nil + for _, f in pairs(addfields) do + table.insert(newobj.fields, f) + end + for i, f in ipairs(newobj.fields) do + newobj.fields[f.n] = f + end + + newobj.fields['type'].valuestring = types + + self.pkttypes[name] = newobj + setmetatable(newobj, self) + self.__index = self + + if newobj._kind == 1 or newobj._kind == 2 then + for k,_ in pairs(newobj.fields['type'].valuestring) do + self.conf_type_map[newobj._kind][k] = newobj + end + end + return newobj +end +function CbPkt:match(chid, type) + -- this matches all config packets, i.e. ones where chid==0x8000 + if chid == self._conf_pkg_ch and type ~= nil and self.conf_type_map[1][type] ~= nil then + return self.conf_type_map[1][type] + end + if (chid & self._conf_pkg_ch) == self._conf_pkg_ch and + (chid & ~(self._conf_pkg_ch)) > 0 and + type ~= nil and + self.conf_type_map[2][type] ~= nil then + return self.conf_type_map[2][type] + end + + if chid == 0x000 and self.pkttypes.cbPKT_GROUP ~= nil then + return self.pkttypes.cbPKT_GROUP + end + + if chid > 0x0000 and chid < cbConst.cbPKT_SPKCACHELINECNT and self.pkttypes.nevPKT_GENERIC ~= nil then + return self.pkttypes.nevPKT_GENERIC + end + + if (cbConst.cbFIRST_DIGIN_CHAN < chid) and (chid <= cbConst.cbFIRST_DIGIN_CHAN+cbConst.cbNUM_DIGIN_CHANS) and self.pkttypes.nevPKT_DIGIN ~= nil then + return self.pkttypes.nevPKT_DIGIN + end + + return self.pkttypes['cbPKT_GENERIC'] +end + +function CbPkt:iterate(b_len) + local i=0 + local n=#self.fields + local buf_pos=0 + -- store how many bytes we expect in total. That's composed of 8 header bytes and the reported 'dlen' + local dlen + + return function() + i = i + 1 + if i <= n then + local f = self.fields[i] + if f.ftype=='afield' or f.ftype=='flagfield' then + return i, buf_pos, 0, f, 1 + end + + -- if dlen hasn't been read yet, test if it is available, read it from field; add header size + if dlen == nil and self.dfields['dlen'] ~= nil and self.dfields['dlen']() ~= nil then + dlen = 16 + self.dfields['dlen']()() * 4 + end + + local width = f:dataWidth() + local field_w = width + local mult = 1 + if f.len ~= nil then + mult = f.len + elseif f.lf ~= nil and self.dfields[f.lf] ~= nil then + mult = f.lfactor * self.dfields[f.lf]()() + end + width = width * mult + local old_buf_pos = buf_pos + buf_pos = buf_pos + width + if f.t=='BYTES' or f.t=='STRING' then + field_w = width + mult = 1 + end + -- if we'd exceed buffer length (as passed through b_len) or dlen, stop by returning nil + if (b_len ~= nil and buf_pos > b_len) or (dlen ~= nil and buf_pos > dlen) then return nil end + return i, old_buf_pos, field_w, f, mult + end + end +end + +function CbPkt:makeInfoString() + return self.name +end + +-- Subclass for config packets. They all share that +-- chid == 0x8000 and 'type' corresponds to a packet type, which we store in the 'type' field's valuestring +local CbPktConfig = CbPkt:new('cb_cfg') +CbPktConfig._kind = 1 + +-- Subclass for preview stream packets. They all share that +-- (chid & 0x8000) == 0x8000 and (chid&0x0FFF) > 0 and 'type' corresponds to a packet type, which we store in the 'type' field's valuestring +local CbPktPrevStreamBase = CbPkt:new('cb_prev') +CbPktPrevStreamBase._kind = 2 + +-- Packet definitions start here + +-- Generic packets + +local CbPktGeneric = CbPkt:new('cbPKT_GENERIC', + { + PktField:new{t='BYTES', n='data', lf='dlen', lfactor=4}, + } +) + +-- Config packets (chid == 0x8000) + +-- System heartbeat +local CbPktSysHeartbeat = CbPktConfig:new('cbPKT_SYSHEARTBEAT', { + _types={ + [0x00] = "System Heartbeat cbPKTTYPE_SYSHEARTBEAT", + } +}) + +-- System protocol monitor +local CbPktSysProtocolMonitor = CbPktConfig:new('cbPKT_SYSPROTOCOLMONITOR', + { + PktField:new{t='UINT32', n='sentpkts', d='Packets sent since last cbPKT_SYSPROTOCOLMONITOR (or 0 if timestamp=0)'}, + _types={ + [0x01] = "System Protocol Monitor Packet", + } + } +) + +-- System condition report packet +local CbPktSysInfo = CbPktConfig:new('cbPKT_SYSINFO', + { + PktField:new{t='UINT32', n='sysfreq', d='System clock frequency in Hz', format='DEC'}, + PktField:new{t='UINT32', n='spikelen', d='The length of the spike events', format='DEC'}, + PktField:new{t='UINT32', n='spikepre', d='Spike pre-trigger samples', format='DEC'}, + PktField:new{t='UINT32', n='resetque', d='The channel for the reset to que on', format='DEC'}, + PktField:new{t='UINT32', n='runlevel', d='System runlevel', format='DEC_HEX'}, + PktField:new{t='UINT32', n='runflags', d='Run Flags', format='HEX'}, + _types={ + [0x10] = "System Condition Report cbPKTTYPE_SYSREP", + [0x11] = "System Spike Length Report cbPKTTYPE_SYSREPSPKLEN", + [0x12] = "System Runlevel Report cbPKTTYPE_SYSREPRUNLEV", + [0x90] = "System set Req cbPKTTYPE_SYSSET", + [0x91] = "System set Spike Length cbPKTTYPE_SYSSETSPKLEN", + [0x92] = "System set Runlevel cbPKTTYPE_SYSSETRUNLEV", + } + } +) + +-- System condition report packet +local CbPktSSModelSet = CbPktConfig:new('cbPKT_SS_MODELSET', + { + PktField:new{t='UINT32', n='chan', d='Channel being configured (zero-based)', format='DEC'}, + PktField:new{t='UINT32', n='unit_number', d='unit number (0 = noise)', format='DEC'}, + PktField:new{t='UINT32', n='valid', valuestring={[0]="invalid", [1]="valid"}, format='DEC'}, + PktField:new{t='UINT32', n='inverted', valuestring={[0]="not inverted", [1]="inverted"}, format='DEC'}, + PktField:new{t='INT32', n='num_samples', d='non-zero value means that the block stats are valid', format='DEC'}, + PktField:new{t='FLOAT', n='mu', len=2}, + PktField:new{t='FLOAT', n='Sigma_x', len=4}, + PktField:new{t='FLOAT', n='determinant_Sigma_x'}, + PktField:new{t='FLOAT', n='Sigma_x_inv', len=4}, + PktField:new{t='FLOAT', n='log_determinant_Sigma_x'}, + PktField:new{t='FLOAT', n='subcluster_spread_factor_numerator'}, + PktField:new{t='FLOAT', n='subcluster_spread_factor_denominator'}, + PktField:new{t='FLOAT', n='mu_e'}, + PktField:new{t='FLOAT', n='sigma_e_squared'}, + _types={ + [0x51] = "SS Model response cbPKTTYPE_SS_MODELREP", + [0xD1] = "SS Model request cbPKTTYPE_SS_MODELSET", + } + } +) + +-- NTrode Information Packets +local CbPktNTrodeInfo = CbPktConfig:new('cbPKT_NTRODEINFO', + { + PktField:new{t='UINT32', n='ntrode', d='nTrode being configured (1-based)', format='DEC'}, + PktField:new{t='STRING', n='label', d='nTrode label', len=cbConst.cbLEN_STR_LABEL}, + AField:new{n='placeholder', d='→ Other fields of this packet have not been implemented yet. ←'}, + -- typedef struct { + -- INT16 nOverride; + -- INT16 afOrigin[3]; + -- INT16 afShape[3][3]; + -- INT16 aPhi; + -- UINT32 bValid; // is this unit in use at this time? + -- // BOOL implemented as UINT32 - for structure alignment at paragraph boundary + -- } cbMANUALUNITMAPPING; + -- cbMANUALUNITMAPPING ellipses[cbMAXSITEPLOTS][cbMAXUNITS]; // unit mapping + -- UINT16 nSite; // number channels in this NTrode ( 0 <= nSite <= cbMAXSITES) + -- UINT16 fs; // NTrode feature space cbNTRODEINFO_FS_* + -- UINT16 nChan[cbMAXSITES]; // group of channels in this NTrode + _types={ + [0x27] = "NTrode info response cbPKTTYPE_REPNTRODEINFO", + [0xA7] = "NTrode info request cbPKTTYPE_SETNTRODEINFO", + } + } +) + +-- Channel Information Packets +local CbPktChanInfo = CbPktConfig:new('cbPKT_CHANINFO', + { + PktField:new{t='UINT32', n='chan', d='channel being configured', format='DEC'}, + PktField:new{t='UINT32', n='proc', d='address of the processor', format='DEC'}, + PktField:new{t='UINT32', n='bank', d='address of the bank', format='DEC'}, + PktField:new{t='UINT32', n='term', d='terminal number', format='DEC_HEX'}, + + PktField:new{t='UINT32', n='chancaps', d='channel capabilities', format='HEX'}, + FlagField:new{t='BOOLEAN', n='chancaps.exists', format=32, mask=0x00000001, d='cbCHAN_EXISTS id is allocated', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='chancaps.connected', format=32, mask=0x00000002, d='cbCHAN_CONNECTED connected and mapped and ready to use', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='chancaps.isolated', format=32, mask=0x00000004, d='cbCHAN_ISOLATED electrically isolated', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='chancaps.ainp', format=32, mask=0x00000100, d='cbCHAN_AINP analog input capabilities', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='chancaps.aout', format=32, mask=0x00000200, d='cbCHAN_AOUT analog output capabilities', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='chancaps.dinp', format=32, mask=0x00000400, d='cbCHAN_DINP digital input capabilities', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='chancaps.dout', format=32, mask=0x00000800, d='cbCHAN_DOUT digital output capabilities', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='chancaps.gyro', format=32, mask=0x00001000, d='cbCHAN_GYRO gyroscope/accelerometer/magnetometer/temperature capabilities', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='doutcaps', d='digital output capabilities', format='HEX'}, + FlagField:new{t='BOOLEAN', n='doutcaps.serialmask', format=32, mask=0x000000FF, d='cbDOUT_SERIALMASK Port operates as an RS232 Serial Connection', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.baud2400', format=32, mask=0x00000001, d='cbDOUT_BAUD2400 Serial Port operates at 2400 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.baud9600', format=32, mask=0x00000002, d='cbDOUT_BAUD9600 Serial Port operates at 9600 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.baud19200', format=32, mask=0x00000004, d='cbDOUT_BAUD19200 Serial Port operates at 19200 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.baud38400', format=32, mask=0x00000008, d='cbDOUT_BAUD38400 Serial Port operates at 38400 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.baud57600', format=32, mask=0x00000010, d='cbDOUT_BAUD57600 Serial Port operates at 57600 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.baud115200', format=32, mask=0x00000020, d='cbDOUT_BAUD115200 Serial Port operates at 115200 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.1bit', format=32, mask=0x00000100, d='cbDOUT_1BIT Port has a single output bit (eg single BNC output)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.8bit', format=32, mask=0x00000200, d='cbDOUT_8BIT Port has 8 output bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.16bit', format=32, mask=0x00000400, d='cbDOUT_16BIT Port has 16 output bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.32bit', format=32, mask=0x00000800, d='cbDOUT_32BIT Port has 32 output bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.value', format=32, mask=0x00010000, d='cbDOUT_VALUE Port can be manually configured', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.track', format=32, mask=0x00020000, d='cbDOUT_TRACK Port should track the most recently selected channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.frequency', format=32, mask=0x00040000, d='cbDOUT_FREQUENCY Port can output a frequency', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.triggered', format=32, mask=0x00080000, d='cbDOUT_TRIGGERED Port can be triggered', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.monitor_unit0', format=32, mask=0x01000000, d='cbDOUT_MONITOR_UNIT0 Can monitor unit 0 = UNCLASSIFIED', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.monitor_unit1', format=32, mask=0x02000000, d='cbDOUT_MONITOR_UNIT1 Can monitor unit 1', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.monitor_unit2', format=32, mask=0x04000000, d='cbDOUT_MONITOR_UNIT2 Can monitor unit 2', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.monitor_unit3', format=32, mask=0x08000000, d='cbDOUT_MONITOR_UNIT3 Can monitor unit 3', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.monitor_unit4', format=32, mask=0x10000000, d='cbDOUT_MONITOR_UNIT4 Can monitor unit 4', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.monitor_unit5', format=32, mask=0x20000000, d='cbDOUT_MONITOR_UNIT5 Can monitor unit 5', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutcaps.monitor_unit_all', format=32, mask=0x3F000000, d='cbDOUT_MONITOR_UNIT_ALL Can monitor ALL units', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='dinpcaps', d='digital input capablities', format='HEX'}, + FlagField:new{t='BOOLEAN', n='dinpcaps.serialmask', format=32, mask=0x000000FF, d='cbDINP_SERIALMASK Bit mask used to detect RS232 Serial Baud Rates', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.baud2400', format=32, mask=0x00000001, d='cbDINP_BAUD2400 RS232 Serial Port operates at 2400 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.baud9600', format=32, mask=0x00000002, d='cbDINP_BAUD9600 RS232 Serial Port operates at 9600 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.baud19200', format=32, mask=0x00000004, d='cbDINP_BAUD19200 RS232 Serial Port operates at 19200 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.baud38400', format=32, mask=0x00000008, d='cbDINP_BAUD38400 RS232 Serial Port operates at 38400 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.baud57600', format=32, mask=0x00000010, d='cbDINP_BAUD57600 RS232 Serial Port operates at 57600 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.baud115200', format=32, mask=0x00000020, d='cbDINP_BAUD115200 RS232 Serial Port operates at 115200 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.1bit', format=32, mask=0x00000100, d='cbDINP_1BIT Port has a single input bit (eg single BNC input)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.8bit', format=32, mask=0x00000200, d='cbDINP_8BIT Port has 8 input bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.16bit', format=32, mask=0x00000400, d='cbDINP_16BIT Port has 16 input bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.32bit', format=32, mask=0x00000800, d='cbDINP_32BIT Port has 32 input bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.anybit', format=32, mask=0x00001000, d='cbDINP_ANYBIT Capture the port value when any bit changes.', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.wrdstrb', format=32, mask=0x00002000, d='cbDINP_WRDSTRB Capture the port when a word-write line is strobed', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.pktchar', format=32, mask=0x00004000, d='cbDINP_PKTCHAR Capture packets using an End of Packet Character', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.pktstrb', format=32, mask=0x00008000, d='cbDINP_PKTSTRB Capture packets using an End of Packet Logic Input', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.monitor', format=32, mask=0x00010000, d='cbDINP_MONITOR Port controls other ports or system events', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.redge', format=32, mask=0x00020000, d='cbDINP_REDGE Capture the port value when any bit changes lo-2-hi (rising edge)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.fedge', format=32, mask=0x00040000, d='cbDINP_FEDGE Capture the port value when any bit changes hi-2-lo (falling edge)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.strbany', format=32, mask=0x00080000, d='cbDINP_STRBANY Capture packets using 8-bit strobe/8-bit any Input', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.strbris', format=32, mask=0x00100000, d='cbDINP_STRBRIS Capture packets using 8-bit strobe/8-bit rising edge Input', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpcaps.strbfal', format=32, mask=0x00200000, d='cbDINP_STRBFAL Capture packets using 8-bit strobe/8-bit falling edge Input', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='aoutcaps', d='analog output capablities', format='HEX'}, + FlagField:new{t='BOOLEAN', n='aoutcaps.audio', format=32, mask=0x00000001, d='cbAOUT_AUDIO Channel is physically optimized for audio output', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.scale', format=32, mask=0x00000002, d='cbAOUT_SCALE Output a static value', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.track', format=32, mask=0x00000004, d='cbAOUT_TRACK Output a static value', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.static', format=32, mask=0x00000008, d='cbAOUT_STATIC Output a static value', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.monitorraw', format=32, mask=0x00000010, d='cbAOUT_MONITORRAW Monitor an analog signal line - RAW data', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.monitorlnc', format=32, mask=0x00000020, d='cbAOUT_MONITORLNC Monitor an analog signal line - Line Noise Cancelation', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.monitorsmp', format=32, mask=0x00000040, d='cbAOUT_MONITORSMP Monitor an analog signal line - Continuous', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.monitorspk', format=32, mask=0x00000080, d='cbAOUT_MONITORSPK Monitor an analog signal line - spike', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.stimulate', format=32, mask=0x00000100, d='cbAOUT_STIMULATE Stimulation waveform functions are available.', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.waveform', format=32, mask=0x00000200, d='cbAOUT_WAVEFORM Custom Waveform', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutcaps.extension', format=32, mask=0x00000400, d='cbAOUT_EXTENSION Output Waveform from Extension', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='ainpcaps', d='analog input capablities', format='HEX'}, + FlagField:new{t='BOOLEAN', n='ainpcaps.rawpreview', format=32, mask=0x00000001, d='cbAINP_RAWPREVIEW Generate scrolling preview data for the raw channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.lnc', format=32, mask=0x00000002, d='cbAINP_LNC Line Noise Cancellation', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.lncpreview', format=32, mask=0x00000004, d='cbAINP_LNCPREVIEW Retrieve the LNC correction waveform', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.smpstream', format=32, mask=0x00000010, d='cbAINP_SMPSTREAM stream the analog input stream directly to disk', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.smpfilter', format=32, mask=0x00000020, d='cbAINP_SMPFILTER Digitally filter the analog input stream', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.rawstream', format=32, mask=0x00000040, d='cbAINP_RAWSTREAM Raw data stream available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.spkstream', format=32, mask=0x00000100, d='cbAINP_SPKSTREAM Spike Stream is available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.spkfilter', format=32, mask=0x00000200, d='cbAINP_SPKFILTER Selectable Filters', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.spkpreview', format=32, mask=0x00000400, d='cbAINP_SPKPREVIEW Generate scrolling preview of the spike channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.spkproc', format=32, mask=0x00000800, d='cbAINP_SPKPROC Channel is able to do online spike processing', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpcaps.offset_correct_cap', format=32, mask=0x00001000, d='cbAINP_OFFSET_CORRECT_CAP Offset correction mode (0-disabled 1-enabled)', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='spkcaps', d='spike capablities', format='HEX'}, + FlagField:new{t='BOOLEAN', n='spkcaps.extract', format=32, mask=0x00000001, d='cbAINPSPK_EXTRACT time-stamp and packet to first superthreshold peak', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.rejart', format=32, mask=0x00000002, d='cbAINPSPK_REJART Reject around clipped signals on multiple channels', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.rejclip', format=32, mask=0x00000004, d='cbAINPSPK_REJCLIP Reject clipped signals on the channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.alignpk', format=32, mask=0x00000008, d='cbAINPSPK_ALIGNPK', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.rejampl', format=32, mask=0x00000010, d='cbAINPSPK_REJAMPL Reject based on amplitude', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.thrlevel', format=32, mask=0x00000100, d='cbAINPSPK_THRLEVEL Analog level threshold detection', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.threnergy', format=32, mask=0x00000200, d='cbAINPSPK_THRENERGY Energy threshold detection', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.thrauto', format=32, mask=0x00000400, d='cbAINPSPK_THRAUTO Auto threshold detection', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.spreadsort', format=32, mask=0x00001000, d='cbAINPSPK_SPREADSORT Enable auto spread sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.corrsort', format=32, mask=0x00002000, d='cbAINPSPK_CORRSORT Enable auto histogram correlation sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.peakmajsort', format=32, mask=0x00004000, d='cbAINPSPK_PEAKMAJSORT Enable auto histogram peak major sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.peakfishsort', format=32, mask=0x00008000, d='cbAINPSPK_PEAKFISHSORT Enable auto histogram peak fisher sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.hoopsort', format=32, mask=0x00010000, d='cbAINPSPK_HOOPSORT Enable manual hoop sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.pcamansort', format=32, mask=0x00020000, d='cbAINPSPK_PCAMANSORT Enable manual PCA sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.pcakmeansort', format=32, mask=0x00040000, d='cbAINPSPK_PCAKMEANSORT Enable k-means PCA sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.pcaemsort', format=32, mask=0x00080000, d='cbAINPSPK_PCAEMSORT Enable EM-clustering PCA sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkcaps.pcadbsort', format=32, mask=0x00100000, d='cbAINPSPK_PCADBSORT Enable DBSCAN PCA sorting', valuestring={'yes', 'no'}}, + + AField:new{n='physcalin', d='physical channel scaling information (in)'}, + PktField:new{t='INT16', n='physcalin.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='physcalin.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='physcalin.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalin.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalin.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='physcalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='phyfiltin', d='physical channel filter definition (in)'}, + PktField:new{t='STRING', n='phyfiltin.label', d='filter label', len=cbConst.cbLEN_STR_FILT_LABEL}, + PktField:new{t='UINT32', n='phyfiltin.hpfreq', d='high-pass corner frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltin.hporder', d='high-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltin.hptype', d='high-pass filter type', format='HEX'}, + PktField:new{t='UINT32', n='phyfiltin.lpfreq', d='low-pass frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltin.lporder', d='low-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltin.lptype', d='low-pass filter type', format='HEX'}, + + AField:new{n='physcalout', d='physical channel scaling information (out)'}, + PktField:new{t='INT16', n='physcalout.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='physcalout.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='physcalout.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalout.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalout.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='physcalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='phyfiltout', d='physical channel filter definition (out)'}, + PktField:new{t='STRING', n='phyfiltout.label', d='filter label', len=cbConst.cbLEN_STR_FILT_LABEL}, + PktField:new{t='UINT32', n='phyfiltout.hpfreq', d='high-pass corner frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltout.hporder', d='high-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltout.hptype', d='high-pass filter type', format='HEX'}, + PktField:new{t='UINT32', n='phyfiltout.lpfreq', d='low-pass frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltout.lporder', d='low-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltout.lptype', d='low-pass filter type', format='HEX'}, + + PktField:new{t='STRING', n='label', d='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='userflags', format='HEX'}, + PktField:new{t='INT32', n='position', len=4}, + + AField:new{n='scalin', d='scaling information (in)'}, + PktField:new{t='INT16', n='scalin.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='scalin.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='scalin.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='scalin.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='scalin.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='scalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='scalout', d='scaling information (out)'}, + PktField:new{t='INT16', n='scalout.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='scalout.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='scalout.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='scalout.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='scalout.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='scalout.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + PktField:new{t='UINT32', n='doutopts', d='digital output options', format='HEX'}, + FlagField:new{t='BOOLEAN', n='doutopts.serialmask', format=32, mask=0x000000FF, d='cbDOUT_SERIALMASK Port operates as an RS232 Serial Connection', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.baud2400', format=32, mask=0x00000001, d='cbDOUT_BAUD2400 Serial Port operates at 2400 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.baud9600', format=32, mask=0x00000002, d='cbDOUT_BAUD9600 Serial Port operates at 9600 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.baud19200', format=32, mask=0x00000004, d='cbDOUT_BAUD19200 Serial Port operates at 19200 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.baud38400', format=32, mask=0x00000008, d='cbDOUT_BAUD38400 Serial Port operates at 38400 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.baud57600', format=32, mask=0x00000010, d='cbDOUT_BAUD57600 Serial Port operates at 57600 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.baud115200', format=32, mask=0x00000020, d='cbDOUT_BAUD115200 Serial Port operates at 115200 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.1bit', format=32, mask=0x00000100, d='cbDOUT_1BIT Port has a single output bit (eg single BNC output)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.8bit', format=32, mask=0x00000200, d='cbDOUT_8BIT Port has 8 output bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.16bit', format=32, mask=0x00000400, d='cbDOUT_16BIT Port has 16 output bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.32bit', format=32, mask=0x00000800, d='cbDOUT_32BIT Port has 32 output bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.value', format=32, mask=0x00010000, d='cbDOUT_VALUE Port can be manually configured', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.track', format=32, mask=0x00020000, d='cbDOUT_TRACK Port should track the most recently selected channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.frequency', format=32, mask=0x00040000, d='cbDOUT_FREQUENCY Port can output a frequency', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.triggered', format=32, mask=0x00080000, d='cbDOUT_TRIGGERED Port can be triggered', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.monitor_unit0', format=32, mask=0x01000000, d='cbDOUT_MONITOR_UNIT0 Can monitor unit 0 = UNCLASSIFIED', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.monitor_unit1', format=32, mask=0x02000000, d='cbDOUT_MONITOR_UNIT1 Can monitor unit 1', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.monitor_unit2', format=32, mask=0x04000000, d='cbDOUT_MONITOR_UNIT2 Can monitor unit 2', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.monitor_unit3', format=32, mask=0x08000000, d='cbDOUT_MONITOR_UNIT3 Can monitor unit 3', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.monitor_unit4', format=32, mask=0x10000000, d='cbDOUT_MONITOR_UNIT4 Can monitor unit 4', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.monitor_unit5', format=32, mask=0x20000000, d='cbDOUT_MONITOR_UNIT5 Can monitor unit 5', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='doutopts.monitor_unit_all', format=32, mask=0x3F000000, d='cbDOUT_MONITOR_UNIT_ALL Can monitor ALL units', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='dinpopts', d='digital input options', format='HEX'}, + FlagField:new{t='BOOLEAN', n='dinpopts.serialmask', format=32, mask=0x000000FF, d='cbDINP_SERIALMASK Bit mask used to detect RS232 Serial Baud Rates', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.baud2400', format=32, mask=0x00000001, d='cbDINP_BAUD2400 RS232 Serial Port operates at 2400 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.baud9600', format=32, mask=0x00000002, d='cbDINP_BAUD9600 RS232 Serial Port operates at 9600 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.baud19200', format=32, mask=0x00000004, d='cbDINP_BAUD19200 RS232 Serial Port operates at 19200 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.baud38400', format=32, mask=0x00000008, d='cbDINP_BAUD38400 RS232 Serial Port operates at 38400 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.baud57600', format=32, mask=0x00000010, d='cbDINP_BAUD57600 RS232 Serial Port operates at 57600 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.baud115200', format=32, mask=0x00000020, d='cbDINP_BAUD115200 RS232 Serial Port operates at 115200 (n-8-1)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.1bit', format=32, mask=0x00000100, d='cbDINP_1BIT Port has a single input bit (eg single BNC input)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.8bit', format=32, mask=0x00000200, d='cbDINP_8BIT Port has 8 input bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.16bit', format=32, mask=0x00000400, d='cbDINP_16BIT Port has 16 input bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.32bit', format=32, mask=0x00000800, d='cbDINP_32BIT Port has 32 input bits', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.anybit', format=32, mask=0x00001000, d='cbDINP_ANYBIT Capture the port value when any bit changes.', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.wrdstrb', format=32, mask=0x00002000, d='cbDINP_WRDSTRB Capture the port when a word-write line is strobed', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.pktchar', format=32, mask=0x00004000, d='cbDINP_PKTCHAR Capture packets using an End of Packet Character', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.pktstrb', format=32, mask=0x00008000, d='cbDINP_PKTSTRB Capture packets using an End of Packet Logic Input', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.monitor', format=32, mask=0x00010000, d='cbDINP_MONITOR Port controls other ports or system events', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.redge', format=32, mask=0x00020000, d='cbDINP_REDGE Capture the port value when any bit changes lo-2-hi (rising edge)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.fedge', format=32, mask=0x00040000, d='cbDINP_FEDGE Capture the port value when any bit changes hi-2-lo (falling edge)', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.strbany', format=32, mask=0x00080000, d='cbDINP_STRBANY Capture packets using 8-bit strobe/8-bit any Input', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.strbris', format=32, mask=0x00100000, d='cbDINP_STRBRIS Capture packets using 8-bit strobe/8-bit rising edge Input', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='dinpopts.strbfal', format=32, mask=0x00200000, d='cbDINP_STRBFAL Capture packets using 8-bit strobe/8-bit falling edge Input', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='aoutopts', d='analog output options', format='HEX'}, + FlagField:new{t='BOOLEAN', n='aoutopts.audio', format=32, mask=0x00000001, d='cbAOUT_AUDIO Channel is physically optimized for audio output', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.scale', format=32, mask=0x00000002, d='cbAOUT_SCALE Output a static value', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.track', format=32, mask=0x00000004, d='cbAOUT_TRACK Output a static value', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.static', format=32, mask=0x00000008, d='cbAOUT_STATIC Output a static value', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.monitorraw', format=32, mask=0x00000010, d='cbAOUT_MONITORRAW Monitor an analog signal line - RAW data', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.monitorlnc', format=32, mask=0x00000020, d='cbAOUT_MONITORLNC Monitor an analog signal line - Line Noise Cancelation', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.monitorsmp', format=32, mask=0x00000040, d='cbAOUT_MONITORSMP Monitor an analog signal line - Continuous', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.monitorspk', format=32, mask=0x00000080, d='cbAOUT_MONITORSPK Monitor an analog signal line - spike', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.stimulate', format=32, mask=0x00000100, d='cbAOUT_STIMULATE Stimulation waveform functions are available.', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.waveform', format=32, mask=0x00000200, d='cbAOUT_WAVEFORM Custom Waveform', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='aoutopts.extension', format=32, mask=0x00000400, d='cbAOUT_EXTENSION Output Waveform from Extension', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='eopchar', format='HEX'}, + PktField:new{t='UINT16', n='moninst', format='HEX'}, + PktField:new{t='UINT16', n='monchan', format='HEX'}, + PktField:new{t='INT32', n='outvalue'}, + + PktField:new{t='UINT8', n='trigtype'}, + PktField:new{t='UINT16', n='trigchan'}, + PktField:new{t='UINT16', n='trigval'}, + + PktField:new{t='UINT32', n='ainpopts', d='analog input options', format='HEX'}, + FlagField:new{t='BOOLEAN', n='ainpopts.rawpreview', format=32, mask=0x00000001, d='cbAINP_RAWPREVIEW Generate scrolling preview data for the raw channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.lnc', format=32, mask=0x00000002, d='cbAINP_LNC Line Noise Cancellation', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.lncpreview', format=32, mask=0x00000004, d='cbAINP_LNCPREVIEW Retrieve the LNC correction waveform', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.smpstream', format=32, mask=0x00000010, d='cbAINP_SMPSTREAM stream the analog input stream directly to disk', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.smpfilter', format=32, mask=0x00000020, d='cbAINP_SMPFILTER Digitally filter the analog input stream', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.rawstream', format=32, mask=0x00000040, d='cbAINP_RAWSTREAM Raw data stream available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkstream', format=32, mask=0x00000100, d='cbAINP_SPKSTREAM Spike Stream is available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkfilter', format=32, mask=0x00000200, d='cbAINP_SPKFILTER Selectable Filters', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkpreview', format=32, mask=0x00000400, d='cbAINP_SPKPREVIEW Generate scrolling preview of the spike channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkproc', format=32, mask=0x00000800, d='cbAINP_SPKPROC Channel is able to do online spike processing', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.offset_cor', format=32, mask=0x00001000, d='cbAINP_OFFSET_CORRECT_CAP Offset correction mode (0-disabled 1-enabled)', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='lncrate'}, + + PktField:new{t='UINT32', n='smpfilter'}, + PktField:new{t='UINT32', n='smpgroup'}, + + PktField:new{t='INT32', n='smpdispmin'}, + PktField:new{t='INT32', n='smpdispmax'}, + + PktField:new{t='UINT32', n='spkfilter'}, + + PktField:new{t='INT32', n='spkdispmax'}, + PktField:new{t='INT32', n='lncdispmax'}, + + PktField:new{t='UINT32', n='spkopts', d='spike options', format='HEX'}, + FlagField:new{t='BOOLEAN', n='spkopts.extract', format=32, mask=0x00000001, d='cbAINPSPK_EXTRACT time-stamp and packet to first superthreshold peak', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.rejart', format=32, mask=0x00000002, d='cbAINPSPK_REJART Reject around clipped signals on multiple channels', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.rejclip', format=32, mask=0x00000004, d='cbAINPSPK_REJCLIP Reject clipped signals on the channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.alignpk', format=32, mask=0x00000008, d='cbAINPSPK_ALIGNPK', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.rejampl', format=32, mask=0x00000010, d='cbAINPSPK_REJAMPL Reject based on amplitude', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.thrlevel', format=32, mask=0x00000100, d='cbAINPSPK_THRLEVEL Analog level threshold detection', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.threnergy', format=32, mask=0x00000200, d='cbAINPSPK_THRENERGY Energy threshold detection', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.thrauto', format=32, mask=0x00000400, d='cbAINPSPK_THRAUTO Auto threshold detection', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.spreadsort', format=32, mask=0x00001000, d='cbAINPSPK_SPREADSORT Enable auto spread sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.corrsort', format=32, mask=0x00002000, d='cbAINPSPK_CORRSORT Enable auto histogram correlation sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.peakmajsort', format=32, mask=0x00004000, d='cbAINPSPK_PEAKMAJSORT Enable auto histogram peak major sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.peakfishsort', format=32, mask=0x00008000, d='cbAINPSPK_PEAKFISHSORT Enable auto histogram peak fisher sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.hoopsort', format=32, mask=0x00010000, d='cbAINPSPK_HOOPSORT Enable manual hoop sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.pcamansort', format=32, mask=0x00020000, d='cbAINPSPK_PCAMANSORT Enable manual PCA sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.pcakmeansort', format=32, mask=0x00040000, d='cbAINPSPK_PCAKMEANSORT Enable k-means PCA sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.pcaemsort', format=32, mask=0x00080000, d='cbAINPSPK_PCAEMSORT Enable EM-clustering PCA sorting', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='spkopts.pcadbsort', format=32, mask=0x00100000, d='cbAINPSPK_PCADBSORT Enable DBSCAN PCA sorting', valuestring={'yes', 'no'}}, + + PktField:new{t='INT32', n='spkthrlevel'}, + PktField:new{t='INT32', n='spkthrlimit'}, + + PktField:new{t='UINT32', n='spkgroup'}, + + PktField:new{t='INT16', n='amplrejpos'}, + PktField:new{t='INT16', n='amplrejneg'}, + PktField:new{t='UINT32', n='refelecchan'}, + + AField:new{n='placeholder', d='→ Other fields [unitmapping, spkhoops] of this packet have not been implemented yet. ←'}, + + _types={ + [0x40] = "cbPKTTYPE_CHANREP", + [0x41] = "cbPKTTYPE_CHANREPLABEL", + [0x42] = "cbPKTTYPE_CHANREPSCALE", + [0x43] = "cbPKTTYPE_CHANREPDOUT", + [0x44] = "cbPKTTYPE_CHANREPDINP", + [0x45] = "cbPKTTYPE_CHANREPAOUT", + [0x46] = "cbPKTTYPE_CHANREPDISP", + [0x47] = "cbPKTTYPE_CHANREPAINP", + [0x48] = "cbPKTTYPE_CHANREPSMP", + [0x49] = "cbPKTTYPE_CHANREPSPK", + [0x4A] = "cbPKTTYPE_CHANREPSPKTHR", + [0x4B] = "cbPKTTYPE_CHANREPSPKHPS", + [0x4C] = "cbPKTTYPE_CHANREPUNITOVERRIDES", + [0x4D] = "cbPKTTYPE_CHANREPNTRODEGROUP", + [0x4E] = "cbPKTTYPE_CHANREPREJECTAMPLITUDE", + [0x4F] = "cbPKTTYPE_CHANREPAUTOTHRESHOLD", + [0xC0] = "cbPKTTYPE_CHANSET", + [0xC1] = "cbPKTTYPE_CHANSETLABEL", + [0xC2] = "cbPKTTYPE_CHANSETSCALE", + [0xC3] = "cbPKTTYPE_CHANSETDOUT", + [0xC4] = "cbPKTTYPE_CHANSETDINP", + [0xC5] = "cbPKTTYPE_CHANSETAOUT", + [0xC6] = "cbPKTTYPE_CHANSETDISP", + [0xC7] = "cbPKTTYPE_CHANSETAINP", + [0xC8] = "cbPKTTYPE_CHANSETSMP", + [0xC9] = "cbPKTTYPE_CHANSETSPK", + [0xCA] = "cbPKTTYPE_CHANSETSPKTHR", + [0xCB] = "cbPKTTYPE_CHANSETSPKHPS", + [0xCC] = "cbPKTTYPE_CHANSETUNITOVERRIDES", + [0xCD] = "cbPKTTYPE_CHANSETNTRODEGROUP", + [0xCE] = "cbPKTTYPE_CHANSETREJECTAMPLITUDE", + [0xCF] = "cbPKTTYPE_CHANSETAUTOTHRESHOLD", + } + } +) + +-- File Config Information Packets +local CbPktFileCfg = CbPktConfig:new('cbPKT_FILECFG', + { + PktField:new{t='UINT32', n='options', d='File Config Option', format='HEX', valuestring={ + [0x00]="Launch File dialog, set file info, start or stop recording cbFILECFG_OPT_NONE", + [0x01]="Keep-alive message cbFILECFG_OPT_KEEPALIVE", + [0x02]="Recording is in progress cbFILECFG_OPT_REC", + [0x03]="Recording stopped cbFILECFG_OPT_STOP", + [0x04]="NeuroMotive recording status cbFILECFG_OPT_NMREC", + [0x05]="Close file application cbFILECFG_OPT_CLOSE", + [0x06]="Recording datetime cbFILECFG_OPT_SYNCH", + [0x07]="Launch File dialog, do not set or do anything cbFILECFG_OPT_OPEN", + }}, + -- FlagField:new{t='BOOLEAN', n='options.keepalive', format=32, mask=0x00000001, d='Keep-alive message cbFILECFG_OPT_KEEPALIVE', valuestring={'yes', 'no'}}, + -- FlagField:new{t='BOOLEAN', n='options.rec', format=32, mask=0x00000002, d='Recording is in progress cbFILECFG_OPT_REC', valuestring={'yes', 'no'}}, + -- FlagField:new{t='BOOLEAN', n='options.stop', format=32, mask=0x00000002, d='Recording is in progress cbFILECFG_OPT_REC', valuestring={'yes', 'no'}}, + PktField:new{t='UINT32', n='duration', format='DEC'}, + PktField:new{t='UINT32', n='recording', d='If cbFILECFG_OPT_NONE this option starts/stops recording remotely', format='HEX'}, + PktField:new{t='UINT32', n='extctrl', d='If cbFILECFG_OPT_REC this is split number (0 for non-TOC). If cbFILECFG_OPT_STOP this is error code.', format='DEC_HEX'}, + PktField:new{t='STRING', n='username', len=256}, + PktField:new{t='STRING', n='filename', len=256}, + PktField:new{t='STRING', n='comment', len=256, d='Comment or Datetime'}, + _types={ + [0x61] = "File Config response cbPKTTYPE_REPFILECFG", + [0xE1] = "File Config request cbPKTTYPE_SETFILECFG", + } + } +) + +-- Config All packet +local CbPktConfigAll = CbPktConfig:new('cbPKT_CONFIGALL', {_types={ + [0x08] = "Config All Report cbPKTTYPE_REPCONFIGALL", + [0x88] = "Config All Request cbPKTTYPE_REQCONFIGALL", + }}) + +-- Options for noise boundary packets +local CbPktSSNoiseBoundary = CbPktConfig:new('cbPKT_SS_NOISE_BOUNDARY', + { + PktField:new{t='UINT32', n='chan', d='channel being configured', format='DEC'}, + PktField:new{t='FLOAT', n='afc', len=3, d='Center of ellipsoid'}, + PktField:new{t='FLOAT', n='afS', len=9, d='Ellipsoid axes'}, + _types={ + [0x54] = "Noise boundary Report cbPKTTYPE_SS_NOISE_BOUNDARYREP", + [0xD4] = "Noise boundary Request cbPKTTYPE_SS_NOISE_BOUNDARYSET", + } + } +) + +-- SS Statistics packets +local CbPktSSStatistics = CbPktConfig:new('cbPKT_SS_STATISTICS', + { + PktField:new{t='UINT32', n='nUpdateSpikes', d='update rate in spike counts', format='DEC'}, + PktField:new{t='UINT32', n='nAutoalg', d='Sorting Algorithm', format='HEX', valuestring={ + [0x00]="No sorting cbAUTOALG_NONE", + [0x01]="Auto spread cbAUTOALG_SPREAD", + [0x02]="Auto Hist Correlation cbAUTOALG_HIST_CORR_MAJ", + [0x03]="Auto Hist Peak Maj cbAUTOALG_HIST_PEAK_COUNT_MAJ", + [0x04]="Auto Hist Peak Fish cbAUTOALG_HIST_PEAK_COUNT_FISH", + [0x05]="Manual PCA cbAUTOALG_PCA", + [0x06]="Manual Hoops cbAUTOALG_HOOPS", + [0x07]="K-means PCA cbAUTOALG_PCA_KMEANS", + [0x08]="EM-clustering PCA cbAUTOALG_PCA_EM", + [0x09]="DBSCAN PCA cbAUTOALG_PCA_DBSCAN", + }}, + PktField:new{t='UINT32', n='nMode', d='command to change sorting parameters', format='HEX', valuestring={ + [0x00]="Change the settings and leave sorting the same cbAUTOALG_MODE_SETTING", + [0x01]="Change settings and apply this sorting to all channels cbAUTOALG_MODE_APPLY", + }}, + PktField:new{t='FLOAT', n='fMinClusterPairSpreadFactor'}, + PktField:new{t='FLOAT', n='fMaxSubclusterSpreadFactor'}, + + PktField:new{t='FLOAT', n='fMinClusterHistCorrMajMeasure'}, + PktField:new{t='FLOAT', n='fMaxClusterPairHistCorrMajMeasure'}, + + PktField:new{t='FLOAT', n='fClusterHistValleyPercentage'}, + PktField:new{t='FLOAT', n='fClusterHistClosePeakPercentage'}, + PktField:new{t='FLOAT', n='fClusterHistMinPeakPercentage'}, + PktField:new{t='UINT32', n='nWaveBasisSize', d='number of wave to collect to calculate the basis', format='DEC'}, + PktField:new{t='UINT32', n='nWaveSampleSize', d='number of samples sorted with the same basis before re-calculating the basis', format='DEC'}, + _types={ + [0x55] = "SS Statistics Report cbPKTTYPE_SS_STATISTICSREP", + [0xD5] = "SS Statistics Request cbPKTTYPE_SS_STATISTICSSET", + } + } +) + +-- SS Status packets +local CbPktSSStatus = CbPktConfig:new('cbPKT_SS_STATUS', + { + AField:new{n='cntlUnitStats'}, + PktField:new{t='UINT32', n='cntlUnitStats.nMode', d='nMode', format='HEX', valuestring={ + [0x00]="do not adapt at all", + [0x01]="always adapt", + [0x02]="adapt if timer not timed out", + }}, + PktField:new{t='FLOAT', n='cntlUnitStats.fTimeOutMinutes', d='how many minutes until time out'}, + PktField:new{t='FLOAT', n='cntlUnitStats.fElapsedMinutes', d='amount of time that has elapsed'}, + AField:new{n='cntlNumUnits'}, + PktField:new{t='UINT32', n='cntlNumUnits.nMode', d='nMode', format='HEX', valuestring={ + [0x00]="do not adapt at all", + [0x01]="always adapt", + [0x02]="adapt if timer not timed out", + }}, + PktField:new{t='FLOAT', n='cntlNumUnits.fTimeOutMinutes', d='how many minutes until time out'}, + PktField:new{t='FLOAT', n='cntlNumUnits.fElapsedMinutes', d='amount of time that has elapsed'}, + _types={ + [0x57] = "SS Status Report cbPKTTYPE_SS_STATUSREP", + [0xD7] = "SS Status Request cbPKTTYPE_SS_STATUSSET", + } + } +) + +-- SS Recalc packets +local CbPktSSRecalc = CbPktConfig:new('cbPKT_SS_RECALC', + { + + PktField:new{t='UINT32', n='chan',format='DEC', d="Channel (1-based). If 0, perform for all"}, + PktField:new{t='UINT32', n='mode', d='mode', format='HEX', valuestring={ + [0]="PC ->NSP start recalculation cbPCA_RECALC_START", + [1]="NSP->PC finished recalculation cbPCA_RECALC_STOPPED", + [2]="NSP->PC waveform collection started cbPCA_COLLECTION_STARTED", + [3]="Change the basis of feature space cbBASIS_CHANGE", + [4]="cbUNDO_BASIS_CHANGE", + [5]="cbREDO_BASIS_CHANGE", + [6]="cbINVALIDATE_BASIS", + }}, + _types={ + [0x59] = "SS Recalc Report cbPKTTYPE_SS_RECALCREP", + [0xD9] = "SS Recalc Request cbPKTTYPE_SS_RECALCSET", + } + } +) + +-- Feature Space Basis Packets +local CbPktFSBasis = CbPktConfig:new('cbPKT_FS_BASIS', + { + + PktField:new{t='UINT32', n='chan',format='DEC', d="Channel (1-based)"}, + PktField:new{t='UINT32', n='mode', d='mode', format='HEX', valuestring={ + [0]="PC ->NSP start recalculation cbPCA_RECALC_START", + [1]="NSP->PC finished recalculation cbPCA_RECALC_STOPPED", + [2]="NSP->PC waveform collection started cbPCA_COLLECTION_STARTED", + [3]="Change the basis of feature space cbBASIS_CHANGE", + [4]="cbUNDO_BASIS_CHANGE", + [5]="cbREDO_BASIS_CHANGE", + [6]="cbINVALIDATE_BASIS", + }}, + PktField:new{t='UINT32', n='fs',format='DEC', d="Feature space: cbAUTOALG_PCA"}, + PktField:new{t='FLOAT', n='basis', d='Room for all possible points collected'}, + AField:new{n='notImpl', d="→ Variable number of points not imlpemented ←"}, + _types={ + [0x5B] = "FS Basis Report cbPKTTYPE_FS_BASISREP", + [0xDB] = "FS Basis Request cbPKTTYPE_FS_BASISSET", + } + } +) + + +-- Sample Group Information packets +local CbPktGroupInfo = CbPktConfig:new('cbPKT_GROUPINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='group',format='DEC'}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='period', d='Sampling Period', format='DEC'}, + PktField:new{t='UINT32', n='length', format='DEC'}, + PktField:new{t='UINT32', n='list', lf='length', d='channelList'}, + _types={ + [0x30] = "Sample Group Report cbPKTTYPE_GROUPREP", + [0xB0] = "Sample Group Request cbPKTTYPE_GROUPSET", + } + } +) + +-- Processor Information packets +local CbPktProcInfo = CbPktConfig:new('cbPKT_PROCINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='idcode', format='DEC_HEX', d='Manufacturer ID'}, + PktField:new{t='STRING', n='ident', len=cbConst.cbLEN_STR_IDENT}, + PktField:new{t='UINT32', n='chanbase',format='DEC'}, + PktField:new{t='UINT32', n='chancount',format='DEC'}, + PktField:new{t='UINT32', n='bankcount',format='DEC'}, + PktField:new{t='UINT32', n='groupcount',format='DEC'}, + PktField:new{t='UINT32', n='filtcount',format='DEC'}, + PktField:new{t='UINT32', n='sortcount',format='DEC'}, + PktField:new{t='UINT32', n='unitcount',format='DEC'}, + PktField:new{t='UINT32', n='hoopcount',format='DEC'}, + PktField:new{t='UINT32', n='sortmethod',format='DEC', valuestring={[0]='manual', [1]='auto'}}, + PktField:new{t='UINT32', n='version',format='DEC'}, + _types={ + [0x21] = "Proc Report cbPKTTYPE_PROCREP", + }}) + +-- Bank Information packets +local CbPktBankInfo = CbPktConfig:new('cbPKT_BANKINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='bank',format='DEC'}, + PktField:new{t='UINT32', n='idcode', format='DEC_HEX', d='Manufacturer ID'}, + PktField:new{t='STRING', n='ident', len=cbConst.cbLEN_STR_IDENT}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='chanbase',format='DEC'}, + PktField:new{t='UINT32', n='chancount',format='DEC'}, + _types={ + [0x22] = "Bank Report cbPKTTYPE_BANKREP", + } + } +) + +-- Filter (FILT) Information packets +local CbPktFiltInfo = CbPktConfig:new('cbPKT_FILTINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='filt',format='DEC'}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_FILT_LABEL}, + AField:new{n='hp', d='High-pass filter'}, + PktField:new{t='UINT32', n='hp.hpfreq', d='Corner freq in mHz', format='DEC'}, + PktField:new{t='UINT32', n='hp.hporder', d='Filter order', format='DEC'}, + PktField:new{t='UINT32', n='hp.hptype', d='Filter type', format='HEX'}, + FlagField:new{t='BOOLEAN', n='hp.hptype.physical', format=32, mask=0x00000001, d='Physical cbFILTTYPE_PHYSICAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.digital', format=32, mask=0x00000002, d='Digital cbFILTTYPE_DIGITAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.adaptive', format=32, mask=0x00000004, d='Adaptive cbFILTTYPE_ADAPTIVE', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.nonlinear', format=32, mask=0x00000008, d='Nonlinear cbFILTTYPE_NONLINEAR', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.butter', format=32, mask=0x00000100, d='Butterworth cbFILTTYPE_BUTTERWORTH', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.cheb', format=32, mask=0x00000200, d='Chebychev cbFILTTYPE_CHEBYCHEV', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.bessel', format=32, mask=0x00000400, d='Bessel cbFILTTYPE_BESSEL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.elliptical', format=32, mask=0x00000800, d='Elliptical cbFILTTYPE_ELLIPTICAL', valuestring={'yes','no'}}, + + + AField:new{n='lp', d='Low-pass filter'}, + PktField:new{t='UINT32', n='lp.lpfreq', d='Corner freq in mHz', format='DEC'}, + PktField:new{t='UINT32', n='lp.lporder', d='Filter order', format='DEC'}, + PktField:new{t='UINT32', n='lp.lptype', d='Filter type', format='HEX'}, + FlagField:new{t='BOOLEAN', n='lp.lptype.physical', format=32, mask=0x00000001, d='Physical cbFILTTYPE_PHYSICAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.digital', format=32, mask=0x00000002, d='Digital cbFILTTYPE_DIGITAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.adaptive', format=32, mask=0x00000004, d='Adaptive cbFILTTYPE_ADAPTIVE', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.nonlinear', format=32, mask=0x00000008, d='Nonlinear cbFILTTYPE_NONLINEAR', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.butter', format=32, mask=0x00000100, d='Butterworth cbFILTTYPE_BUTTERWORTH', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.cheb', format=32, mask=0x00000200, d='Chebychev cbFILTTYPE_CHEBYCHEV', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.bessel', format=32, mask=0x00000400, d='Bessel cbFILTTYPE_BESSEL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.elliptical', format=32, mask=0x00000800, d='Elliptical cbFILTTYPE_ELLIPTICAL', valuestring={'yes','no'}}, + + + PktField:new{t='DOUBLE', n='sos1a1'}, + PktField:new{t='DOUBLE', n='sos1a2'}, + PktField:new{t='DOUBLE', n='sos1b1'}, + PktField:new{t='DOUBLE', n='sos1b2'}, + PktField:new{t='DOUBLE', n='sos2a1'}, + PktField:new{t='DOUBLE', n='sos2a2'}, + PktField:new{t='DOUBLE', n='sos2b1'}, + PktField:new{t='DOUBLE', n='sos2b2'}, + PktField:new{t='DOUBLE', n='sos1a1'}, + _types={ + [0x23] = "Filter Report cbPKTTYPE_FILTREP", + [0xA3] = "Filter Request cbPKTTYPE_FILTSET", + } + } +) + +-- cbPKT_CHANRESET Factory Default settings request packet +local CbPktChanReset = CbPktConfig:new('cbPKT_CHANRESET', + { + AField:new{d="This packet is untested."}, + PktField:new{t='UINT32', n='chan', d="Channel"}, + PktField:new{t='UINT8', n='label', d="Reset label", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='userflags', d="Reset User flags", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='position', d="Reset Reserved", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='scalin', d="Reset Scaling in", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='scalout', d="Reset Scaling out", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='doutopts', d="Reset dOut options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='dinpopts', d="Reset dIn options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='aoutopts', d="Reset aOut options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='eopchar', d="Reset endOfPacket char", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='monsource', d="Reset monitor source", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='outvalue', d="Reset outValue", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='ainpopts', d="Reset aIn options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='lncrate', d="Reset LNC rate", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpfilter', d="Reset filter id", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpgroup', d="Reset sample group", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpdispmin', d="Reset display min", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpdispmax', d="Reset display max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkfilter', d="Reset spk filter", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkdispmax', d="Reset spk disp max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='lncdispmax', d="Reset LNC disp max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkopts', d="Reset spk options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkthrlevel', d="Reset spk threshold lvl", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkthrlimit', d="Reset spk threshold limit", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkgroup', d="Reset spkgroup", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkhoops', d="Reset spkhoops", valuestring={[0]='no', [1]='yes'}}, + _types={ + [0x24] = "Factory Default settings Report cbPKTTYPE_CHANRESETREP", + [0xA4] = "Factory Default settings Request cbPKTTYPE_CHANRESET", + } + } +) + + +-- cbPKT_ADAPTFILTINFO +local CbPktAdaptFiltInfo = CbPktConfig:new('cbPKT_ADAPTFILTINFO', + { + PktField:new{t='UINT32', n='chan', d="Chan (Ignored)"}, + PktField:new{t='UINT32', n='nMode', valuestring= + { + [0]="disabled", + [1]="filter continuous & spikes", + [2]="filter spikes", + } + }, + + PktField:new{t='FLOAT', n='dLearningRate'}, + PktField:new{t='UINT32', n='refChan1', d="Reference Channel 1"}, + PktField:new{t='UINT32', n='refChan2', d="Reference Channel 2"}, + _types={ + [0x25] = "Adaptive filtering Report cbPKTTYPE_ADAPTFILTREP", + [0xA5] = "Adaptive filtering Request cbPKTTYPE_ADAPTFILTSET", + } + } +) + +-- cbPKT_REFELECFILTINFO +local CbPktRefElecFiltInfo = CbPktConfig:new('cbPKT_REFELECFILTINFO', + { + PktField:new{t='UINT32', n='chan', d="Chan (Ignored)"}, + PktField:new{t='UINT32', n='nMode', valuestring= + { + [0]="disabled", + [1]="filter continuous & spikes", + [2]="filter spikes", + } + }, + PktField:new{t='UINT32', n='refChan', d="Reference Channel"}, + _types={ + [0x26] = "Reference Electrode filtering Report cbPKTTYPE_REFELECFILTREP", + [0xA6] = "Reference Electrode filtering Request cbPKTTYPE_REFELECFILTSET", + } + } +) + +-- cbPKT_LNC +local CbPktLNC = CbPktConfig:new('cbPKT_LNC', + { + PktField:new{t='UINT32', n='lncFreq', d="Nominal line noise frequency to be canceled (in Hz)"}, + PktField:new{t='UINT32', n='lncRefChan', d="Reference channel for lnc synch (1-based)"}, + PktField:new{t='UINT32', n='lncGlobalMode', d="reserved"}, + _types={ + [0x28] = "Line Noise Cancellation Report cbPKTTYPE_LNCREP", + [0xA8] = "Line Noise Cancellation Request cbPKTTYPE_LNCSET", + } + } +) + + +-- cbPKT_NM +local CbPktNM = CbPktConfig:new('cbPKT_NM', + { + PktField:new{t='UINT32', n='mode', valuestring= + { + [0]="cbNM_MODE_NONE", + [1]="cbNM_MODE_CONFIG Ask NeuroMotive for configuration", + [2]="cbNM_MODE_SETVIDEOSOURCE Configure video source", + [3]="cbNM_MODE_SETTRACKABLE Configure trackable", + [4]="cbNM_MODE_STATUS NeuroMotive status reporting (cbNM_STATUS_*)", + [5]="cbNM_MODE_TSCOUNT Timestamp count (value is the period with 0 to disable this mode)", + [6]="cbNM_MODE_SYNCHCLOCK Start (or stop) synchronization clock (fps*1000 specified by value, zero fps to stop capture)", + [7]="cbNM_MODE_ASYNCHCLOCK Asynchronous clock", + } + }, + PktField:new{t='UINT32', n='flags', d="status of NeuroMotive"}, + PktField:new{t='UINT32', n='value'}, + PktField:new{t='UINT32', n='opt', len=cbConst.cbLEN_STR_LABEL/4}, + _types={ + [0x32] = "NeuroMotive Report cbPKTTYPE_NMREP", + [0xB2] = "NeuroMotive Request cbPKTTYPE_NMSET", + } + } +) + +-- cbPKT_VIDEOSYNCH +local CbPktVideosynch = CbPktConfig:new('cbPKT_VIDEOSYNCH', + { + PktField:new{t='UINT16', n='split', d="file split number"}, + PktField:new{t='UINT32', n='frame'}, + PktField:new{t='UINT32', n='etime', d="elapsed time"}, + PktField:new{t='UINT16', n='id', d="video source id"}, + _types={ + [0x29] = "VideoSynch Report cbPKTTYPE_VIDEOSYNCHREP", + [0xA9] = "VideoSynch Request cbPKTTYPE_VIDEOSYNCHSET", + } + } +) + +-- cbPKT_VIDEOTRACK +local CbPktVideoTrack = CbPktConfig:new('cbPKT_VIDEOTRACK', + { + PktField:new{t='UINT16', n='parentID'}, + PktField:new{t='UINT16', n='nodeID'}, + PktField:new{t='UINT16', n='nodeCount'}, + PktField:new{t='UINT16', n='pointCount'}, + _types={ + [0x5F] = "VideoTrack Report cbPKTTYPE_VIDEOTRACKREP", + [0xDF] = "VideoTrack Request cbPKTTYPE_VIDEOTRACKSET", + } + } +) + +-- cbPKT_NPLAY +local CbPktNPlay = CbPktConfig:new('cbPKT_NPLAY', + { + PktField:new{t='UINT64', n='ftime', d='ftime'}, + PktField:new{t='UINT64', n='stime', d='stime'}, + PktField:new{t='UINT64', n='etime', d='etime'}, + PktField:new{t='UINT64', n='val', d='val'}, + PktField:new{t='UINT16', n='mode', valuestring= + { + [0]="cbNPLAY_MODE_NONE", + [1]="cbNPLAY_MODE_PAUSE pause if val is non-zero, un-pause otherwise", + [2]="cbNPLAY_MODE_SEEK seek to time val", + [3]="cbNPLAY_MODE_CONFIG request full config", + [4]="cbNPLAY_MODE_OPEN open new file in val for playback", + [5]="cbNPLAY_MODE_PATH use the directory path in fname", + [6]="cbNPLAY_MODE_CONFIGMAIN request main config packet", + [7]="cbNPLAY_MODE_STEP run val procTime steps and pause, then send cbNPLAY_FLAG_STEPPED", + [8]="cbNPLAY_MODE_SINGLE single mode if val is non-zero, wrap otherwise", + [9]="cbNPLAY_MODE_RESET reset nPlay", + [10]="cbNPLAY_MODE_NEVRESORT resort NEV if val is non-zero, do not if otherwise", + [11]="cbNPLAY_MODE_AUDIO_CMD perform audio command in val (cbAUDIO_CMD_*), with option opt", + } + }, + PktField:new{t='UINT16', n='flag', valuestring= + { + [0]="cbNPLAY_FLAG_NONE no flag", + [1]="cbNPLAY_FLAG_CONF config packet (val is fname file index)", + [3]="cbNPLAY_FLAG_MAIN main config packet (val is file version)", + [2]="cbNPLAY_FLAG_DONE step command done", + } + }, + PktField:new{t='FLOAT', n='speed'}, + PktField:new{t='STRING', n='fname', len=256}, + _types={ + [0x5C] = "NPlay Report cbPKTTYPE_NPLAYREP", + [0xDC] = "NPlay Request cbPKTTYPE_NPLAYSET", + } + } +) + +-- cbPKT_AOUT_WAVEFORM Analog output packets +local CbPktAoutWaveform = CbPktConfig:new('cbPKT_AOUT_WAVEFORM', + { + PktField:new{t='UINT16', n='chan', d="Which analog output/audio output channel (1-based)"}, + + PktField:new{t='UINT16', n='mode', valuestring= + { + [0]="cbWAVEFORM_MODE_NONE Disabled", + [1]="cbWAVEFORM_MODE_PARAMETERS repeated sequence", + [2]="cbWAVEFORM_MODE_SINE sinusoid", + } + }, + PktField:new{t='UINT32', n='repeats'}, + PktField:new{t='UINT8', n='trig', valuestring= + { + [0]="cbWAVEFORM_TRIGGER_NONE instant software trigger", + [1]="cbWAVEFORM_TRIGGER_DINPREG digital input rising edge trigger", + [2]="cbWAVEFORM_TRIGGER_DINPFEG digital input falling edge trigger", + [3]="cbWAVEFORM_TRIGGER_SPIKEUNIT spike unit", + [4]="cbWAVEFORM_TRIGGER_COMMENTCOLOR comment RGBA color (A being big byte)", + [5]="cbWAVEFORM_TRIGGER_SOFTRESET soft-reset trigger", + [6]="cbWAVEFORM_TRIGGER_EXTENSION extension trigger", + } + }, + PktField:new{t='UINT8', n='trigInst'}, + PktField:new{t='UINT16', n='trigChan'}, + PktField:new{t='UINT16', n='trigValue'}, + PktField:new{t='UINT8', n='active'}, + + AField:new{n='waveform'}, + PktField:new{t='INT16', n='waveform.offset'}, + PktField:new{t='UINT16', n='waveform.seq'}, + PktField:new{t='UINT16', n='waveform.seqTotal'}, + PktField:new{t='UINT16', n='waveform.phases'}, + PktField:new{t='UINT16', n='waveform.duration', lf='waveform.phases'}, + PktField:new{t='INT16', n='waveform.amplitude', lf='waveform.phases'}, + _types={ + [0x33] = "Analog Out Waveform Report cbPKTTYPE_WAVEFORMREP", + [0xB3] = "Analog Out Waveform Request cbPKTTYPE_WAVEFORMSET", + } + } +) + + +-- cbPKT_SS_DETECT +local CbPktSSDetect = CbPktConfig:new('cbPKT_SS_DETECT', + { + PktField:new{t='FLOAT', n='fThreshold'}, + PktField:new{t='FLOAT', n='fMultiplier'}, + _types={ + [0x52] = "SS Detect Report cbPKTTYPE_SS_DETECTREP", + [0xD2] = "SS Detect Request cbPKTTYPE_SS_DETECTSET", + } + } +) + +-- cbPKT_SS_ARTIF_REJECT +local CbPktSSArtifReject = CbPktConfig:new('cbPKT_SS_ARTIF_REJECT', + { + PktField:new{t='UINT32', n='nMaxSimulChans', d="How many channels can fire exactly at the same time?"}, + PktField:new{t='UINT32', n='nRefractoryCount', d="For how many samples (30 kHz) is a neuron refractory, so can't re-trigger"}, + _types={ + [0x53] = "Artifact Rejection Report cbPKTTYPE_SS_ARTIF_REJECTREP", + [0xD3] = "Artifact Rejection Request cbPKTTYPE_SS_ARTIF_REJECTSET", + } + } +) + +-- DOut set packets +local CbPktDOut = CbPktConfig:new('cbPKT_SET_DOUT', + { + PktField:new{t='INT16', n='chan', format='DEC'}, + PktField:new{t='INT16', n='value'}, + _types={ + [0x5D] = "Set Dout Report cbPKTTYPE_SET_DOUTREP", + [0xDD] = "Set Dout Request cbPKTTYPE_SET_DOUTSET", + } + } +) + +-- Preview streams +-- Configuration +local CbPktPrevStreamCfg = CbPktPrevStreamBase:new('prevStreamCfg', + { + _types={ + [0x03] = "Cfg Prev Stream Response cbPKTTYPE_PREVREP", + [0x81] = "Cfg Prev Stream Request cbPKTTYPE_PREVSETLNC", + [0x82] = "Cfg Prev Stream Request cbPKTTYPE_PREVSETSTREAM", + [0x83] = "Cfg Prev Stream Request cbPKTTYPE_PREVSET", + } + } +) + +-- Line Noise Cancellation waveform preview +local CbPktLNCPrev = CbPktPrevStreamBase:new('cbPKT_LNCPREV', + { + PktField:new{t='UINT32', n='freq', format='DEC', d='Estimated line noise frequency in mHz'}, + PktField:new{t='INT16', n='wave', len=300}, + _types={ + [0x01] = "LNC Prev Stream cbPKTTYPE_PREVREPLNC", + } + } +) + +-- Comment Packets +local CbPktComment = CbPktConfig:new('cbPKT_COMMENT', + { + PktField:new{t='UINT8', n='charset', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT64', n='time', d='Comment Start Time', format='HEX'}, + PktField:new{t='UINT32', n='rgba', format='HEX'}, + PktField:new{t='STRING', n='comment', d='First 8 chars of comment', len=8}, + _types={ + [0x31] = "Comment response cbPKTTYPE_COMMENTREP", + [0xB1] = "Comment request cbPKTTYPE_COMMENTSET", + } + } +) + +-- LOG Packets +local CbPktLog = CbPktConfig:new('cbPKT_LOG', + { + PktField:new{t='UINT16', n='mode', d='Log Mode', format='HEX', valuestring={ + [0x00]="Normal log cbLOG_MODE_NONE", + [0x01]="Critical log cbLOG_MODE_CRITICAL", + [0x02]="RPC log cbLOG_MODE_RPC", + [0x03]="RPC log cbLOG_MODE_PLUGINFO", + [0x04]="RPC log cbLOG_MODE_RPC_RES", + [0x05]="RPC log cbLOG_MODE_PLUGINERR", + [0x06]="RPC log cbLOG_MODE_RPC_END", + [0x07]="RPC log cbLOG_MODE_RPC_KILL", + [0x08]="RPC log cbLOG_MODE_RPC_INPUT", + [0x09]="RPC log cbLOG_MODE_UPLOAD_RES", + [0x0A]="RPC log cbLOG_MODE_ENDPLUGIN", + [0x0B]="RPC log cbLOG_MODE_REBOOT", + }}, + PktField:new{t='STRING', n='name', len=16}, + PktField:new{t='STRING', n='desc', len=128}, + _types={ + [0x63] = "LOG response cbPKTTYPE_LOGREP", + [0xE3] = "LOG request cbPKTTYPE_LOGSET", + } + } +) + + +-- Preview Stream +local CbPktStreamPrev = CbPktPrevStreamBase:new('cbPKT_STREAMPREV', + { + PktField:new{t='INT16', n='rawmin', format='DEC'}, + PktField:new{t='INT16', n='rawmax'}, + PktField:new{t='INT16', n='smpmin'}, + PktField:new{t='INT16', n='smpmax'}, + PktField:new{t='INT16', n='spkmin'}, + PktField:new{t='INT16', n='spkmax'}, + PktField:new{t='UINT32', n='spkmos'}, + PktField:new{t='UINT32', n='eventflag'}, + PktField:new{t='INT16', n='envmin'}, + PktField:new{t='INT16', n='envmax'}, + PktField:new{t='INT32', n='spkthrlevel'}, + PktField:new{t='UINT32', n='nWaveNum'}, + PktField:new{t='UINT32', n='nSampleRows'}, + PktField:new{t='UINT32', n='nFlags'}, + _types= { + [0x02] = "Prev Stream cbPKTTYPE_PREVREPSTREAM", + } + } +) + +-- Data packets (chid < 0x8000) +-- Sample Group packets +local CbPktGroup = CbPkt:new('cbPKT_GROUP', + { + PktField:new{t='INT16', n='data', lf='dlen', lfactor=2}, + } +) +CbPktGroup.fields['type'].d='Sample Group ID (1-127)' +CbPktGroup.fields['type'].format='DEC' + +function CbPktGroup:makeInfoString() + return self.name .. "(" .. self.dfields['type']()() .. ")" +end + +-- Spike packets +local CbPktNev = CbPkt:new('nevPKT_SPK', + { + PktField:new{t='INT16', n='data', lf='dlen', lfactor=2}, + } +) +CbPktNev.fields['type'].d='Packet Type' +CbPktNev.fields['type'].format='DEC' + +-- DigIn packets +local CbPktNevDigIn = CbPkt:new('nevPKT_DIGIN', + { + PktField:new{t='UINT32', n='data', lf='dlen', format='HEX_DEC'}, + } +) +CbPktNevDigIn.fields['type'].d='Packet Type' +CbPktNevDigIn.fields['type'].format='DEC' + +-- Packet definitions end here. + + +-- Now we define something that will make our protocol + +local ProtoMaker = klass:new{ + name='Cerebus', + desc="Cerebus NSP Communication", + colname="Cerebus", + ports={51001, 51002, 51003} +} +function ProtoMaker:new(o) + o = o or {} + local newobj = klass.new(self) + for k,v in pairs(o) do newobj[k] = v end + newobj.proto = Proto(newobj.name, newobj.desc) + newobj.pfields = newobj.proto.fields + newobj.fByPkt = {} + return newobj +end +function ProtoMaker:register() +-- info("register proto ...") + + for _,p in pairs(CbPkt.pkttypes) do + self:makeFieldsForPacket(p) + end + + local fe_interface_id_f = Field.new("frame.interface_id") + + function self.proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = self.colname + local buflen = buffer:len() + local offset = 0 + local header_len = 16 + local buf_remain = buffer():tvb() + local i = 0 + while buflen >= header_len do + local chid = buf_remain(8,2):le_uint() + local ptype = buf_remain(10,1):uint() + local packet = CbPkt:match(chid, ptype) + -- get current + local packet_len = buf_remain(11,2):le_uint() * 4 + header_len + + + local subtree = tree:add(self.proto, buf_remain(0, packet_len), "Cerebus Protocol Data (" .. packet.name .. ")(" .. packet_len ..")" ) + + self:addSubtreeForPkt(buf_remain(0, packet_len):tvb(), subtree, packet) + buflen = buflen - packet_len + buf_remain = buf_remain(packet_len):tvb() + if i == 0 then + pinfo.cols.info = packet:makeInfoString() + end + + i = i + 1 + end + if i > 1 then + pinfo.cols.info:append(" (+ " .. (i-1) .. " other" .. (i>2 and 's' or '') .. ")") + end + + local f_interface_id = fe_interface_id_f() + pinfo.cols.info:prepend("NSP:" .. tostring(f_interface_id) .. " ") + + end + local udp_table = DissectorTable.get("udp.port") + -- register our protocol to handle udp ports + for _, p in ipairs(self.ports) do + udp_table:add(p, self.proto) + end +end +function ProtoMaker:makeFieldsForPacket(pkt) + local n = self.name .. "." .. pkt.name .. "." + local fn = pkt.name .. "_" + self.fByPkt[pkt] = {} + for i, f in ipairs(pkt.fields) do + local thisfn = fn .. f.n + local thisn = n .. f.n + local pf + + if f.ftype~='afield' and f.ftype~='flagfield' then + pf = ProtoField.new(f.d and f.d or f.n, thisn, ftypes[f.t], f.valuestring, base[f.format], f.mask, f.d) + elseif f.ftype=='flagfield' then + pf = ProtoField.new(f.d and f.d or f.n, thisn, ftypes[f.t], f.valuestring, f.format, f.mask, f.d) + end + if pf~=nil then + self.pfields[thisfn] = pf + self.fByPkt[pkt][f.n] = pf + + local df = Field.new(thisn) + table.insert(pkt.dfields, df) + pkt.dfields[f.n] = df + end + end +end + +function ProtoMaker:addSubtreeForPkt(buffer, tree, pkt) + local tree_stack = Stack:Create({t=tree, p="", br=buffer()}) + + for i, bPos, width, pf, mult in pkt:iterate(buffer:len()) do + local current_parent_tree = nil + local current_parent_br = nil + repeat + local last_tree = tree_stack:last() + local i,j = string.find(pf.n, last_tree.p) + if i==1 and j > 0 and string.sub(pf.n, j+1, j+1)=='.' then + current_parent_tree = last_tree.t + current_parent_br = last_tree.br + -- tree_stack:push(last_tree) + elseif i==1 and j==0 then + current_parent_tree = last_tree.t + current_parent_br = last_tree.br + else + tree_stack:pop() + end + until current_parent_tree ~= nil + local subtree + local tvb_rng_wh + if pf.ftype == 'afield' then + subtree = current_parent_tree:add(pf.d ~= nil and pf.d or pf.n ) + elseif pf.ftype == 'flagfield' then + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], current_parent_br) + else + if mult > 0 then + tvb_rng_wh = buffer(bPos, width * mult) + local brng = buffer(bPos, width) + local this_rangeGetter = pf:rangeGetter() + if this_rangeGetter ~= nil then + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], tvb_rng_wh, brng[pf:rangeGetter()](brng) ) + else + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], tvb_rng_wh) + end + if mult > 1 then + local n = mult - 1 + subtree:append_text(" and "..n.." more item"..(n>1 and "s" or "")) + for i=0,n do + brng = buffer(bPos + width * i, width) + subtree:add( brng, 'item '..i..': ' .. brng[pf:rangeGetter()](brng)) + end + end + end + end + tree_stack:push({t=subtree, p=pf.n, f=pf, br=tvb_rng_wh}) + + end +end + +-- instantiate Protocol maker +local pm = ProtoMaker:new() +pm:register() diff --git a/dissectors/cerebus-nsp/src/Cerebus41.lua b/dissectors/cerebus-nsp/src/Cerebus41.lua new file mode 100644 index 0000000..fcde200 --- /dev/null +++ b/dissectors/cerebus-nsp/src/Cerebus41.lua @@ -0,0 +1,1515 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/CerebusOSS/CerebusWireshark (Cerebus41.lua), +-- commit bf0cb2d4ccb2bc35ed09952d4fec6862519ebd21 du 13/05/2026 (dernière modification du fichier : +-- commit bfd3f933e966114492fd3fe33e5c329c2106fdf2 du 13/05/2026). +-- Licence amont : GPL-3.0 (README « licensed under the GPLv3 », LICENSE du dépôt) — voir README.md et LICENSE. +-- Wireshark dissector for UDP packets exchanged between +-- Neural Signal Processors and controlling PCs +-- +-- Copyright 2017 Jonas Zimmermann, 2022 Hyrum Sessions + +-- info("Loading cb protocol ...") + +-- Definition of a few helpers + +-- implementation of a simple stack (Lifted from http://lua-users.org/wiki/SimpleStack) +-- and extended +local Stack = {} + +-- Create a Table with stack functions +function Stack:Create(default_element) + + -- stack table + local t = {} + -- entry table + t._et = {} + t._default_element = default_element + + -- push a value on to the stack + function t:push(...) + if ... then + local targs = {...} + -- add values + for _,v in ipairs(targs) do + table.insert(self._et, v) + end + end + end + + -- pop a value from the stack + function t:pop(num) + + -- get num values from stack + local num = num or 1 + + -- return table + local entries = {} + + -- get values into entries + for i = 1, num do + -- get last entry + if #self._et ~= 0 then + table.insert(entries, self._et[#self._et]) + -- remove last value + table.remove(self._et) + else + break + end + end + -- if we get fewer entries than requested, also include default (if not nil) + if #entries < num and self._default_element ~= nil then + table.insert(entries, self._default_element) + end + + -- return unpacked entries + return table.unpack(entries) + end + + -- get entries + function t:getn() + return #self._et + end + + -- list values + function t:list() + for i,v in pairs(self._et) do + print(i, v) + end + end + + -- get last entry without removing + function t:last() + return #self._et > 0 and self._et[#self._et] or self._default_element + end + + return t +end + +-- define Constants, lifted from cbhwlib.h +local cbConst = {} +cbConst.cbMAXHOOPS = 4 +cbConst.cbMAXSITES = 4 +cbConst.cbMAXSITEPLOTS = ((cbConst.cbMAXSITES - 1) * cbConst.cbMAXSITES / 2) +cbConst.cbNUM_FE_CHANS = 256 -- #Front end channels +cbConst.cbNUM_ANAIN_CHANS = 16 -- #Analog Input channels +cbConst.cbNUM_ANALOG_CHANS = (cbConst.cbNUM_FE_CHANS + cbConst.cbNUM_ANAIN_CHANS) -- Total Analog Inputs +cbConst.cbNUM_ANAOUT_CHANS = 4 -- #Analog Output channels +cbConst.cbNUM_AUDOUT_CHANS = 2 -- #Audio Output channels +cbConst.cbNUM_ANALOGOUT_CHANS = (cbConst.cbNUM_ANAOUT_CHANS + cbConst.cbNUM_AUDOUT_CHANS) -- Total Analog Output +cbConst.cbNUM_DIGIN_CHANS = 1 -- #Digital Input channels +cbConst.cbNUM_SERIAL_CHANS = 1 -- #Serial Input channels +cbConst.cbNUM_DIGOUT_CHANS = 4 -- #Digital Output channels +-- Total of all channels = 156 +cbConst.cbMAXCHANS = (cbConst.cbNUM_ANALOG_CHANS + + cbConst.cbNUM_ANALOGOUT_CHANS + cbConst.cbNUM_DIGIN_CHANS + + cbConst.cbNUM_SERIAL_CHANS + cbConst.cbNUM_DIGOUT_CHANS) + +cbConst.cbFIRST_FE_CHAN = 0 -- 0 First Front end channel +cbConst.cbFIRST_ANAIN_CHAN = cbConst.cbNUM_FE_CHANS -- 256 First Analog Input channel +cbConst.cbFIRST_ANAOUT_CHAN = (cbConst.cbFIRST_ANAIN_CHAN + cbConst.cbNUM_ANAIN_CHANS) -- 288 First Analog Output channel +cbConst.cbFIRST_AUDOUT_CHAN = (cbConst.cbFIRST_ANAOUT_CHAN + cbConst.cbNUM_ANAOUT_CHANS) -- 296 First Audio Output channel +cbConst.cbFIRST_DIGIN_CHAN = (cbConst.cbFIRST_AUDOUT_CHAN + cbConst.cbNUM_AUDOUT_CHANS) -- 300 First Digital Input channel +cbConst.cbFIRST_SERIAL_CHAN = (cbConst.cbFIRST_DIGIN_CHAN + cbConst.cbNUM_DIGIN_CHANS) -- 302 First Serial Input channel +cbConst.cbFIRST_DIGOUT_CHAN = (cbConst.cbFIRST_SERIAL_CHAN + cbConst.cbNUM_SERIAL_CHANS) -- 304 First Digital Output channel + + +cbConst.cbLEN_STR_UNIT = 8 +cbConst.cbLEN_STR_LABEL = 16 +cbConst.cbLEN_STR_FILT_LABEL = 16 +cbConst.cbLEN_STR_IDENT = 64 +cbConst.cbMAXUNITS = 5 +cbConst.cbMAXNTRODES = (cbConst.cbNUM_ANALOG_CHANS / 2) +cbConst.cbPKT_SPKCACHELINECNT = cbConst.cbNUM_ANALOG_CHANS + +cbConst.cbMAX_PNTS = 128 + + +-- base of our rudimentary class system +local klass = {} +function klass:new (o) + o = o or {} + setmetatable(o, self) + self.__index = self + return o +end + +local AField = klass:new{ + n='name', + d=nil, + ftype='afield', +} + + +local PktField = AField:new{ + ftype='pktfield', + t='UINT8', + lf=nil, + lfactor=1, + len=nil, + format='NONE', + valuestring=nil, + mask=nil, + _data_width={ + UINT8=1, + INT8=1, + BYTES=1, + UINT16=2, + INT16=2, + UINT32=4, + UINT64=8, + INT32=4, + FLOAT=4, + DOUBLE=8, + STRING=1, + }, + _data_rng_getter={ + UINT8='le_uint', + INT8='le_int', + UINT16='le_uint', + INT16='le_int', + UINT32='le_uint', + INT32='le_int', + FLOAT='le_float', + DOUBLE='le_float', + } +} +function PktField:dataWidth() + local dw = self._data_width[self.t] + return dw +end +function PktField:rangeGetter() + return self._data_rng_getter[self.t] +end + +local FlagField = AField:new{ + mask=0x00, + valuestring=nil, + ftype='flagfield', +} + +-- All Packets derive from CbPkt, which defines the packet header +local CbPkt = klass:new{ + name='HEADER', + fields={ + PktField:new{t='UINT64', n='time', d='Timestamp in tics'}, + PktField:new{t='UINT16', n='chid', format='HEX_DEC'}, + PktField:new{t='UINT16', n='type', format='HEX'}, + PktField:new{t='UINT16', n='dlen', d='Packet Data Length (in quadlets)'}, + PktField:new{t='UINT8', n='instrument', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'} + }, + dfields={}, + pkttypes= setmetatable({}, {__mode="v"}), + conf_type_map = { + [1]=setmetatable({}, {__mode="v"}), -- CbPktConfig + [2]=setmetatable({}, {__mode="v"}) -- CbPktPrevStreamBase + }, + _conf_pkg_ch=0x8000 +} +function CbPkt:new(name, addfields) + local newobj = klass:new() + newobj.fields = {} + for i, f in ipairs(self.fields) do + newobj.fields[i] = f:new() + end + newobj.name = name + newobj.dfields = {} + addfields = addfields or {} + local types = addfields._types + addfields._types = nil + for _, f in pairs(addfields) do + table.insert(newobj.fields, f) + end + for i, f in ipairs(newobj.fields) do + newobj.fields[f.n] = f + end + + newobj.fields['type'].valuestring = types + + self.pkttypes[name] = newobj + setmetatable(newobj, self) + self.__index = self + + if newobj._kind == 1 or newobj._kind == 2 then + for k,_ in pairs(newobj.fields['type'].valuestring) do + self.conf_type_map[newobj._kind][k] = newobj + end + end + return newobj +end +function CbPkt:match(chid, pkt_type) + -- this matches all config packets, i.e. ones where chid==0x8000 + if chid == self._conf_pkg_ch and pkt_type ~= nil and self.conf_type_map[1][pkt_type] ~= nil then + return self.conf_type_map[1][pkt_type] + end + if (chid & self._conf_pkg_ch) == self._conf_pkg_ch and + (chid & ~(self._conf_pkg_ch)) > 0 and + pkt_type ~= nil and + self.conf_type_map[2][pkt_type] ~= nil then + return self.conf_type_map[2][pkt_type] + end + + if chid == 0x0000 and self.pkttypes.cbPKT_GROUP ~= nil then + return self.pkttypes.cbPKT_GROUP + end + + if chid > 0x0000 and chid < cbConst.cbPKT_SPKCACHELINECNT and self.pkttypes.nevPKT_SPK ~= nil then + return self.pkttypes.nevPKT_SPK + end + + if (cbConst.cbFIRST_DIGIN_CHAN < chid) and (chid <= cbConst.cbFIRST_DIGIN_CHAN+cbConst.cbNUM_DIGIN_CHANS) and self.pkttypes.nevPKT_DIGIN ~= nil then + return self.pkttypes.nevPKT_DIGIN + end + + return self.pkttypes['cbPKT_GENERIC'] +end + +function CbPkt:iterate(b_len) + local i=0 + local n=#self.fields + local buf_pos=0 + -- store how many bytes we expect in total. That's composed of 8 header bytes and the reported 'dlen' + local dlen + + return function() + i = i + 1 + if i <= n then + local f = self.fields[i] + if f.ftype=='afield' or f.ftype=='flagfield' then + return i, buf_pos, 0, f, 1 + end + + -- if dlen hasn't been read yet, test if it is available, read it from field; add header size + if dlen == nil and self.dfields['dlen'] ~= nil and self.dfields['dlen']() ~= nil then + dlen = 16 + self.dfields['dlen']()() * 4 + end + + local width = f:dataWidth() + local field_w = width + local mult = 1 + if f.len ~= nil then + mult = f.len + elseif f.lf ~= nil and self.dfields[f.lf] ~= nil then + mult = f.lfactor * self.dfields[f.lf]()() + end + width = width * mult + local old_buf_pos = buf_pos + buf_pos = buf_pos + width + if f.t=='BYTES' or f.t=='STRING' then + field_w = width + mult = 1 + end + -- if we'd exceed buffer length (as passed through b_len) or dlen, stop by returning nil + if (b_len ~= nil and buf_pos > b_len) or (dlen ~= nil and buf_pos > dlen) then return nil end + return i, old_buf_pos, field_w, f, mult + end + end +end + +function CbPkt:makeInfoString() + return self.name +end + +-- Subclass for config packets. They all share that +-- chid == 0x8000 and 'type' corresponds to a packet type, which we store in the 'type' field's valuestring +local CbPktConfig = CbPkt:new('cb_cfg') +CbPktConfig._kind = 1 + +-- Subclass for preview stream packets. They all share that +-- (chid & 0x8000) == 0x8000 and (chid&0x0FFF) > 0 and 'type' corresponds to a packet type, which we store in the 'type' field's valuestring +local CbPktPrevStreamBase = CbPkt:new('cb_prev') +CbPktPrevStreamBase._kind = 2 + +-- Packet definitions start here + +-- Generic packets + +local CbPktGeneric = CbPkt:new('cbPKT_GENERIC', + { + PktField:new{t='BYTES', n='data', lf='dlen', lfactor=4}, + } +) + +-- Config packets (chid == 0x8000) + +-- System heartbeat +local CbPktSysHeartbeat = CbPktConfig:new('cbPKT_SYSHEARTBEAT', { + _types={ + [0x0000] = "System Heartbeat cbPKTTYPE_SYSHEARTBEAT", + } +}) + +-- System protocol monitor +local CbPktSysProtocolMonitor = CbPktConfig:new('cbPKT_SYSPROTOCOLMONITOR', + { + PktField:new{t='UINT32', n='sentpkts', d='Packets sent since last cbPKT_SYSPROTOCOLMONITOR (or 0 if timestamp=0)'}, + PktField:new{t='UINT32', n='counter', d='Number of cbPKT_SYSPROTOCOLMONITOR sent'}, + _types={ + [0x0001] = "System Protocol Monitor Packet", + } + } +) + +-- System condition report packet +local CbPktSysInfo = CbPktConfig:new('cbPKT_SYSINFO', + { + PktField:new{t='UINT32', n='sysfreq', d='System clock frequency in Hz', format='DEC'}, + PktField:new{t='UINT32', n='spikelen', d='The length of the spike events', format='DEC'}, + PktField:new{t='UINT32', n='spikepre', d='Spike pre-trigger samples', format='DEC'}, + PktField:new{t='UINT32', n='resetque', d='The channel for the reset to que on', format='DEC'}, + PktField:new{t='UINT32', n='runlevel', d='System runlevel', format='DEC_HEX'}, + PktField:new{t='UINT32', n='runflags', d='Run Flags', format='HEX'}, + _types={ + [0x0010] = "System Condition Report cbPKTTYPE_SYSREP", + [0x0011] = "System Spike Length Report cbPKTTYPE_SYSREPSPKLEN", + [0x0012] = "System Runlevel Report cbPKTTYPE_SYSREPRUNLEV", + [0x0090] = "System set Req cbPKTTYPE_SYSSET", + [0x0091] = "System set Spike Length cbPKTTYPE_SYSSETSPKLEN", + [0x0092] = "System set Runlevel cbPKTTYPE_SYSSETRUNLEV", + } + } +) + +-- System condition report packet +local CbPktSSModelSet = CbPktConfig:new('cbPKT_SS_MODELSET', + { + PktField:new{t='UINT32', n='chan', d='Channel being configured (zero-based)', format='DEC'}, + PktField:new{t='UINT32', n='unit_number', d='unit number (0 = noise)', format='DEC'}, + PktField:new{t='UINT32', n='valid', valuestring={[0]="invalid", [1]="valid"}, format='DEC'}, + PktField:new{t='UINT32', n='inverted', valuestring={[0]="not inverted", [1]="inverted"}, format='DEC'}, + PktField:new{t='INT32', n='num_samples', d='non-zero value means that the block stats are valid', format='DEC'}, + PktField:new{t='FLOAT', n='mu', len=2}, + PktField:new{t='FLOAT', n='Sigma_x', len=4}, + PktField:new{t='FLOAT', n='determinant_Sigma_x'}, + PktField:new{t='FLOAT', n='Sigma_x_inv', len=4}, + PktField:new{t='FLOAT', n='log_determinant_Sigma_x'}, + PktField:new{t='FLOAT', n='subcluster_spread_factor_numerator'}, + PktField:new{t='FLOAT', n='subcluster_spread_factor_denominator'}, + PktField:new{t='FLOAT', n='mu_e'}, + PktField:new{t='FLOAT', n='sigma_e_squared'}, + _types={ + [0x0051] = "SS Model response cbPKTTYPE_SS_MODELREP", + [0x00D1] = "SS Model request cbPKTTYPE_SS_MODELSET", + } + } +) + +-- NTrode Information Packets +local CbPktNTrodeInfo = CbPktConfig:new('cbPKT_NTRODEINFO', + { + PktField:new{t='UINT32', n='ntrode', d='nTrode being configured (1-based)', format='DEC'}, + PktField:new{t='STRING', n='label', d='nTrode label', len=cbConst.cbLEN_STR_LABEL}, + AField:new{n='placeholder', d='→ Other fields of this packet have not been implemented yet. ←'}, + -- typedef struct { + -- INT16 nOverride; + -- INT16 afOrigin[3]; + -- INT16 afShape[3][3]; + -- INT16 aPhi; + -- UINT32 bValid; // is this unit in use at this time? + -- // BOOL implemented as UINT32 - for structure alignment at paragraph boundary + -- } cbMANUALUNITMAPPING; + -- cbMANUALUNITMAPPING ellipses[cbMAXSITEPLOTS][cbMAXUNITS]; // unit mapping + -- UINT16 nSite; // number channels in this NTrode ( 0 <= nSite <= cbMAXSITES) + -- UINT16 fs; // NTrode feature space cbNTRODEINFO_FS_* + -- UINT16 nChan[cbMAXSITES]; // group of channels in this NTrode + _types={ + [0x0027] = "NTrode info response cbPKTTYPE_REPNTRODEINFO", + [0x00A7] = "NTrode info request cbPKTTYPE_SETNTRODEINFO", + } + } +) + +-- Channel Information Packets +local CbPktChanInfo = CbPktConfig:new('cbPKT_CHANINFO', + { + PktField:new{t='UINT32', n='chan', d='channel being configured', format='DEC'}, + PktField:new{t='UINT32', n='proc', d='address of the processor', format='DEC'}, + PktField:new{t='UINT32', n='bank', d='address of the bank', format='DEC'}, + PktField:new{t='UINT32', n='term', d='terminal number', format='DEC_HEX'}, + PktField:new{t='UINT32', n='chancaps', d='channel capabilities', format='HEX'}, + PktField:new{t='UINT32', n='doutcaps', d='digital output capabilities', format='HEX'}, + PktField:new{t='UINT32', n='dinpcaps', d='digital input capabilities', format='HEX'}, + PktField:new{t='UINT32', n='aoutcaps', d='analog output capabilities', format='HEX'}, + PktField:new{t='UINT32', n='ainpcaps', d='analog input capabilities', format='HEX'}, + PktField:new{t='UINT32', n='spkcaps', d='spike capabilities', format='HEX'}, + + AField:new{n='physcalin', d='physical channel scaling information (in)'}, + PktField:new{t='INT16', n='physcalin.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='physcalin.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='physcalin.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalin.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalin.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='physcalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='phyfiltin', d='physical channel filter definition (in)'}, + PktField:new{t='STRING', n='phyfiltin.label', d='filter label', len=cbConst.cbLEN_STR_FILT_LABEL}, + PktField:new{t='UINT32', n='phyfiltin.hpfreq', d='high-pass corner frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltin.hporder', d='high-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltin.hptype', d='high-pass filter type', format='HEX'}, + PktField:new{t='UINT32', n='phyfiltin.lpfreq', d='low-pass frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltin.lporder', d='low-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltin.lptype', d='low-pass filter type', format='HEX'}, + + AField:new{n='physcalout', d='physical channel scaling information (out)'}, + PktField:new{t='INT16', n='physcalout.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='physcalout.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='physcalout.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalout.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalout.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='physcalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='phyfiltout', d='physical channel filter definition (out)'}, + PktField:new{t='STRING', n='phyfiltout.label', d='filter label', len=cbConst.cbLEN_STR_FILT_LABEL}, + PktField:new{t='UINT32', n='phyfiltout.hpfreq', d='high-pass corner frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltout.hporder', d='high-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltout.hptype', d='high-pass filter type', format='HEX'}, + PktField:new{t='UINT32', n='phyfiltout.lpfreq', d='low-pass frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltout.lporder', d='low-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltout.lptype', d='low-pass filter type', format='HEX'}, + + PktField:new{t='STRING', n='label', d='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='userflags', format='HEX'}, + PktField:new{t='INT32', n='position', len=4}, + + AField:new{n='scalin', d='scaling information (in)'}, + PktField:new{t='INT16', n='scalin.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='scalin.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='scalin.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='scalin.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='scalin.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='scalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='scalout', d='scaling information (out)'}, + PktField:new{t='INT16', n='scalout.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='scalout.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='scalout.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='scalout.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='scalout.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='scalout.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + PktField:new{t='UINT32', n='doutopts', format='HEX'}, + PktField:new{t='UINT32', n='dinpopts', format='HEX'}, + PktField:new{t='UINT32', n='aoutopts', format='HEX'}, + PktField:new{t='UINT32', n='eopchar', format='HEX'}, + PktField:new{t='UINT16', n='moninst', format='HEX'}, + PktField:new{t='UINT16', n='monchan', format='HEX'}, + PktField:new{t='INT32', n='outvalue'}, + + PktField:new{t='UINT8', n='trigtype'}, + PktField:new{t='UINT16', n='reserved'}, + PktField:new{t='UINT8', n='triginst'}, + PktField:new{t='UINT16', n='trigchan'}, + PktField:new{t='UINT16', n='trigval'}, + + PktField:new{t='UINT32', n='ainpopts', format='HEX'}, + FlagField:new{t='BOOLEAN', n='ainpopts.rawpreview', format=32, mask=0x00000001, d='cbAINP_RAWPREVIEW Generate scrolling preview data for the raw channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.lnc', format=32, mask=0x00000002, d='cbAINP_LNC Line Noise Cancellation', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.lncpreview', format=32, mask=0x00000004, d='cbAINP_LNCPREVIEW Retrieve the LNC correction waveform', valuestring={'yes', 'no'}}, + + FlagField:new{t='BOOLEAN', n='ainpopts.smpstream', format=32, mask=0x00000010, d='cbAINP_SMPSTREAM stream the analog input stream directly to disk', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.smpfilter', format=32, mask=0x00000020, d='cbAINP_SMPFILTER Digitally filter the analog input stream', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.rawtream', format=32, mask=0x00000040, d='cbAINP_RAWSTREAM Raw data stream available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkstream', format=32, mask=0x00000100, d='cbAINP_SPKSTREAM Spike Stream is available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkfilter', format=32, mask=0x00000200, d='cbAINP_SPKFILTER Selectable Filters', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkpreview', format=32, mask=0x00000400, d='cbAINP_SPKPREVIEW Generate scrolling preview of the spike channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkproc', format=32, mask=0x00000800, d='cbAINP_SPKPROC Channel is able to do online spike processing', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.offset_cor', format=32, mask=0x00001000, d='cbAINP_OFFSET_CORRECT_CAP Offset correction mode (0-disabled 1-enabled)', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='lncrate'}, + + PktField:new{t='UINT32', n='smpfilter'}, + PktField:new{t='UINT32', n='smpgroup'}, + + PktField:new{t='INT32', n='smpdispmin'}, + PktField:new{t='INT32', n='smpdispmax'}, + + PktField:new{t='UINT32', n='spkfilter'}, + + PktField:new{t='INT32', n='spkdispmax'}, + PktField:new{t='INT32', n='lncdispmax'}, + + PktField:new{t='UINT32', n='spkopts'}, + + PktField:new{t='INT32', n='spkthrlevel'}, + PktField:new{t='INT32', n='spkthrlimit'}, + + PktField:new{t='UINT32', n='spkgroup'}, + + PktField:new{t='INT16', n='amplrejpos'}, + PktField:new{t='INT16', n='amplrejneg'}, + PktField:new{t='UINT32', n='refelecchan'}, + + -- cbMANUALUNITMAPPING unitmapping[cbMAXUNITS] + AField:new{n='unitmapping1', d='Defines an ellipsoid for sorting unit 1'}, + PktField:new{t='INT16', n='unitmapping1.nOverride'}, + PktField:new{t='INT16', n='unitmapping1.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping1.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping1.aPhi'}, + PktField:new{t='UINT32', n='unitmapping1.bValid'}, + AField:new{n='unitmapping2', d='Defines an ellipsoid for sorting unit 2'}, + PktField:new{t='INT16', n='unitmapping2.nOverride'}, + PktField:new{t='INT16', n='unitmapping2.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping2.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping2.aPhi'}, + PktField:new{t='UINT32', n='unitmapping2.bValid'}, + AField:new{n='unitmapping3', d='Defines an ellipsoid for sorting unit 3'}, + PktField:new{t='INT16', n='unitmapping3.nOverride'}, + PktField:new{t='INT16', n='unitmapping3.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping3.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping3.aPhi'}, + PktField:new{t='UINT32', n='unitmapping3.bValid'}, + AField:new{n='unitmapping4', d='Defines an ellipsoid for sorting unit 4'}, + PktField:new{t='INT16', n='unitmapping4.nOverride'}, + PktField:new{t='INT16', n='unitmapping4.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping4.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping4.aPhi'}, + PktField:new{t='UINT32', n='unitmapping4.bValid'}, + AField:new{n='unitmapping5', d='Defines an ellipsoid for sorting unit 5'}, + PktField:new{t='INT16', n='unitmapping5.nOverride'}, + PktField:new{t='INT16', n='unitmapping5.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping5.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping5.aPhi'}, + PktField:new{t='UINT32', n='unitmapping5.bValid'}, + -- cbHOOP spkhoops[cbMAXUNITS][cbMAXHOOPS] + AField:new{n='spkhoops1_1', d='Defines the hoop used for sorting unit 1 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops1_1.valid'}, + PktField:new{t='INT16', n='spkhoops1_1.time'}, + PktField:new{t='INT16', n='spkhoops1_1.min'}, + PktField:new{t='INT16', n='spkhoops1_1.max'}, + AField:new{n='spkhoops1_2', d='Defines the hoop used for sorting unit 1 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops1_2.valid'}, + PktField:new{t='INT16', n='spkhoops1_2.time'}, + PktField:new{t='INT16', n='spkhoops1_2.min'}, + PktField:new{t='INT16', n='spkhoops1_2.max'}, + AField:new{n='spkhoops1_3', d='Defines the hoop used for sorting unit 1 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops1_3.valid'}, + PktField:new{t='INT16', n='spkhoops1_3.time'}, + PktField:new{t='INT16', n='spkhoops1_3.min'}, + PktField:new{t='INT16', n='spkhoops1_3.max'}, + AField:new{n='spkhoops1_4', d='Defines the hoop used for sorting unit 1 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops1_4.valid'}, + PktField:new{t='INT16', n='spkhoops1_4.time'}, + PktField:new{t='INT16', n='spkhoops1_4.min'}, + PktField:new{t='INT16', n='spkhoops1_4.max'}, + AField:new{n='spkhoops2_1', d='Defines the hoop used for sorting unit 2 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops2_1.valid'}, + PktField:new{t='INT16', n='spkhoops2_1.time'}, + PktField:new{t='INT16', n='spkhoops2_1.min'}, + PktField:new{t='INT16', n='spkhoops2_1.max'}, + AField:new{n='spkhoops2_2', d='Defines the hoop used for sorting unit 2 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops2_2.valid'}, + PktField:new{t='INT16', n='spkhoops2_2.time'}, + PktField:new{t='INT16', n='spkhoops2_2.min'}, + PktField:new{t='INT16', n='spkhoops2_2.max'}, + AField:new{n='spkhoops2_3', d='Defines the hoop used for sorting unit 2 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops2_3.valid'}, + PktField:new{t='INT16', n='spkhoops2_3.time'}, + PktField:new{t='INT16', n='spkhoops2_3.min'}, + PktField:new{t='INT16', n='spkhoops2_3.max'}, + AField:new{n='spkhoops2_4', d='Defines the hoop used for sorting unit 2 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops2_4.valid'}, + PktField:new{t='INT16', n='spkhoops2_4.time'}, + PktField:new{t='INT16', n='spkhoops2_4.min'}, + PktField:new{t='INT16', n='spkhoops2_4.max'}, + AField:new{n='spkhoops3_1', d='Defines the hoop used for sorting unit 3 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops3_1.valid'}, + PktField:new{t='INT16', n='spkhoops3_1.time'}, + PktField:new{t='INT16', n='spkhoops3_1.min'}, + PktField:new{t='INT16', n='spkhoops3_1.max'}, + AField:new{n='spkhoops3_2', d='Defines the hoop used for sorting unit 3 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops3_2.valid'}, + PktField:new{t='INT16', n='spkhoops3_2.time'}, + PktField:new{t='INT16', n='spkhoops3_2.min'}, + PktField:new{t='INT16', n='spkhoops3_2.max'}, + AField:new{n='spkhoops3_3', d='Defines the hoop used for sorting unit 3 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops3_3.valid'}, + PktField:new{t='INT16', n='spkhoops3_3.time'}, + PktField:new{t='INT16', n='spkhoops3_3.min'}, + PktField:new{t='INT16', n='spkhoops3_3.max'}, + AField:new{n='spkhoops3_4', d='Defines the hoop used for sorting unit 3 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops3_4.valid'}, + PktField:new{t='INT16', n='spkhoops3_4.time'}, + PktField:new{t='INT16', n='spkhoops3_4.min'}, + PktField:new{t='INT16', n='spkhoops3_4.max'}, + AField:new{n='spkhoops4_1', d='Defines the hoop used for sorting unit 4 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops4_1.valid'}, + PktField:new{t='INT16', n='spkhoops4_1.time'}, + PktField:new{t='INT16', n='spkhoops4_1.min'}, + PktField:new{t='INT16', n='spkhoops4_1.max'}, + AField:new{n='spkhoops4_2', d='Defines the hoop used for sorting unit 4 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops4_2.valid'}, + PktField:new{t='INT16', n='spkhoops4_2.time'}, + PktField:new{t='INT16', n='spkhoops4_2.min'}, + PktField:new{t='INT16', n='spkhoops4_2.max'}, + AField:new{n='spkhoops4_3', d='Defines the hoop used for sorting unit 4 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops4_3.valid'}, + PktField:new{t='INT16', n='spkhoops4_3.time'}, + PktField:new{t='INT16', n='spkhoops4_3.min'}, + PktField:new{t='INT16', n='spkhoops4_3.max'}, + AField:new{n='spkhoops4_4', d='Defines the hoop used for sorting unit 4 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops4_4.valid'}, + PktField:new{t='INT16', n='spkhoops4_4.time'}, + PktField:new{t='INT16', n='spkhoops4_4.min'}, + PktField:new{t='INT16', n='spkhoops4_4.max'}, + AField:new{n='spkhoops5_1', d='Defines the hoop used for sorting unit 5 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops5_1.valid'}, + PktField:new{t='INT16', n='spkhoops5_1.time'}, + PktField:new{t='INT16', n='spkhoops5_1.min'}, + PktField:new{t='INT16', n='spkhoops5_1.max'}, + AField:new{n='spkhoops5_2', d='Defines the hoop used for sorting unit 5 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops5_2.valid'}, + PktField:new{t='INT16', n='spkhoops5_2.time'}, + PktField:new{t='INT16', n='spkhoops5_2.min'}, + PktField:new{t='INT16', n='spkhoops5_2.max'}, + AField:new{n='spkhoops5_3', d='Defines the hoop used for sorting unit 5 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops5_3.valid'}, + PktField:new{t='INT16', n='spkhoops5_3.time'}, + PktField:new{t='INT16', n='spkhoops5_3.min'}, + PktField:new{t='INT16', n='spkhoops5_3.max'}, + AField:new{n='spkhoops5_4', d='Defines the hoop used for sorting unit 5 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops5_4.valid'}, + PktField:new{t='INT16', n='spkhoops5_4.time'}, + PktField:new{t='INT16', n='spkhoops5_4.min'}, + PktField:new{t='INT16', n='spkhoops5_4.max'}, + + -- AField:new{n='placeholder', d='→ Other fields [unitmapping, spkhoops] of this packet have not been implemented yet. ←'}, + + _types={ + [0x0040] = "cbPKTTYPE_CHANREP", + [0x0041] = "cbPKTTYPE_CHANREPLABEL", + [0x0042] = "cbPKTTYPE_CHANREPSCALE", + [0x0043] = "cbPKTTYPE_CHANREPDOUT", + [0x0044] = "cbPKTTYPE_CHANREPDINP", + [0x0045] = "cbPKTTYPE_CHANREPAOUT", + [0x0046] = "cbPKTTYPE_CHANREPDISP", + [0x0047] = "cbPKTTYPE_CHANREPAINP", + [0x0048] = "cbPKTTYPE_CHANREPSMP", + [0x0049] = "cbPKTTYPE_CHANREPSPK", + [0x004A] = "cbPKTTYPE_CHANREPSPKTHR", + [0x004B] = "cbPKTTYPE_CHANREPSPKHPS", + [0x004C] = "cbPKTTYPE_CHANREPUNITOVERRIDES", + [0x004D] = "cbPKTTYPE_CHANREPNTRODEGROUP", + [0x004E] = "cbPKTTYPE_CHANREPREJECTAMPLITUDE", + [0x004F] = "cbPKTTYPE_CHANREPAUTOTHRESHOLD", + [0x00C0] = "cbPKTTYPE_CHANSET", + [0x00C1] = "cbPKTTYPE_CHANSETLABEL", + [0x00C2] = "cbPKTTYPE_CHANSETSCALE", + [0x00C3] = "cbPKTTYPE_CHANSETDOUT", + [0x00C4] = "cbPKTTYPE_CHANSETDINP", + [0x00C5] = "cbPKTTYPE_CHANSETAOUT", + [0x00C6] = "cbPKTTYPE_CHANSETDISP", + [0x00C7] = "cbPKTTYPE_CHANSETAINP", + [0x00C8] = "cbPKTTYPE_CHANSETSMP", + [0x00C9] = "cbPKTTYPE_CHANSETSPK", + [0x00CA] = "cbPKTTYPE_CHANSETSPKTHR", + [0x00CB] = "cbPKTTYPE_CHANSETSPKHPS", + [0x00CC] = "cbPKTTYPE_CHANSETUNITOVERRIDES", + [0x00CD] = "cbPKTTYPE_CHANSETNTRODEGROUP", + [0x00CE] = "cbPKTTYPE_CHANSETREJECTAMPLITUDE", + [0x00CF] = "cbPKTTYPE_CHANSETAUTOTHRESHOLD", + } + } +) + +-- File Config Information Packets +local CbPktFileCfg = CbPktConfig:new('cbPKT_FILECFG', + { + PktField:new{t='UINT32', n='options', d='File Config Option', format='HEX', valuestring={ + [0x00]="Launch File dialog, set file info, start or stop recording cbFILECFG_OPT_NONE", + [0x01]="Keep-alive message cbFILECFG_OPT_KEEPALIVE", + [0x02]="Recording is in progress cbFILECFG_OPT_REC", + [0x03]="Recording stopped cbFILECFG_OPT_STOP", + [0x04]="NeuroMotive recording status cbFILECFG_OPT_NMREC", + [0x05]="Close file application cbFILECFG_OPT_CLOSE", + [0x06]="Recording datetime cbFILECFG_OPT_SYNCH", + [0x07]="Launch File dialog, do not set or do anything cbFILECFG_OPT_OPEN", + }}, + -- FlagField:new{t='BOOLEAN', n='options.keepalive', format=32, mask=0x00000001, d='Keep-alive message cbFILECFG_OPT_KEEPALIVE', valuestring={'yes', 'no'}}, + -- FlagField:new{t='BOOLEAN', n='options.rec', format=32, mask=0x00000002, d='Recording is in progress cbFILECFG_OPT_REC', valuestring={'yes', 'no'}}, + -- FlagField:new{t='BOOLEAN', n='options.stop', format=32, mask=0x00000002, d='Recording is in progress cbFILECFG_OPT_REC', valuestring={'yes', 'no'}}, + PktField:new{t='UINT32', n='duration', format='DEC'}, + PktField:new{t='UINT32', n='recording', d='If cbFILECFG_OPT_NONE this option starts/stops recording remotely', format='HEX'}, + PktField:new{t='UINT32', n='extctrl', d='If cbFILECFG_OPT_REC this is split number (0 for non-TOC). If cbFILECFG_OPT_STOP this is error code.', format='DEC_HEX'}, + PktField:new{t='STRING', n='username', len=256}, + PktField:new{t='STRING', n='filename', len=256}, + PktField:new{t='STRING', n='comment', len=256, d='Comment or Datetime'}, + _types={ + [0x0061] = "File Config response cbPKTTYPE_REPFILECFG", + [0x00E1] = "File Config request cbPKTTYPE_SETFILECFG", + } + } +) + +-- Config All packet +local CbPktConfigAll = CbPktConfig:new('cbPKT_CONFIGALL', + { + _types={ + [0x0008] = "Config All Report cbPKTTYPE_REPCONFIGALL", + [0x0088] = "Config All Request cbPKTTYPE_REQCONFIGALL", + } + } +) + +-- Options for noise boundary packets +local CbPktSSNoiseBoundary = CbPktConfig:new('cbPKT_SS_NOISE_BOUNDARY', + { + PktField:new{t='UINT32', n='chan', d='channel being configured', format='DEC'}, + PktField:new{t='FLOAT', n='afc', len=3, d='Center of ellipsoid'}, + PktField:new{t='FLOAT', n='afS', len=9, d='Ellipsoid axes'}, + _types={ + [0x0054] = "Noise boundary Report cbPKTTYPE_SS_NOISE_BOUNDARYREP", + [0x00D4] = "Noise boundary Request cbPKTTYPE_SS_NOISE_BOUNDARYSET", + } + } +) + +-- SS Statistics packets +local CbPktSSStatistics = CbPktConfig:new('cbPKT_SS_STATISTICS', + { + PktField:new{t='UINT32', n='nUpdateSpikes', d='update rate in spike counts', format='DEC'}, + PktField:new{t='UINT32', n='nAutoalg', d='Sorting Algorithm', format='HEX', valuestring={ + [0x00]="No sorting cbAUTOALG_NONE", + [0x01]="Auto spread cbAUTOALG_SPREAD", + [0x02]="Auto Hist Correlation cbAUTOALG_HIST_CORR_MAJ", + [0x03]="Auto Hist Peak Maj cbAUTOALG_HIST_PEAK_COUNT_MAJ", + [0x04]="Auto Hist Peak Fish cbAUTOALG_HIST_PEAK_COUNT_FISH", + [0x05]="Manual PCA cbAUTOALG_PCA", + [0x06]="Manual Hoops cbAUTOALG_HOOPS", + [0x07]="K-means PCA cbAUTOALG_PCA_KMEANS", + [0x08]="EM-clustering PCA cbAUTOALG_PCA_EM", + [0x09]="DBSCAN PCA cbAUTOALG_PCA_DBSCAN", + }}, + PktField:new{t='UINT32', n='nMode', d='command to change sorting parameters', format='HEX', valuestring={ + [0x00]="Change the settings and leave sorting the same cbAUTOALG_MODE_SETTING", + [0x01]="Change settings and apply this sorting to all channels cbAUTOALG_MODE_APPLY", + }}, + PktField:new{t='FLOAT', n='fMinClusterPairSpreadFactor'}, + PktField:new{t='FLOAT', n='fMaxSubclusterSpreadFactor'}, + + PktField:new{t='FLOAT', n='fMinClusterHistCorrMajMeasure'}, + PktField:new{t='FLOAT', n='fMaxClusterPairHistCorrMajMeasure'}, + + PktField:new{t='FLOAT', n='fClusterHistValleyPercentage'}, + PktField:new{t='FLOAT', n='fClusterHistClosePeakPercentage'}, + PktField:new{t='FLOAT', n='fClusterHistMinPeakPercentage'}, + PktField:new{t='UINT32', n='nWaveBasisSize', d='number of wave to collect to calculate the basis', format='DEC'}, + PktField:new{t='UINT32', n='nWaveSampleSize', d='number of samples sorted with the same basis before re-calculating the basis', format='DEC'}, + _types={ + [0x0055] = "SS Statistics Report cbPKTTYPE_SS_STATISTICSREP", + [0x00D5] = "SS Statistics Request cbPKTTYPE_SS_STATISTICSSET", + } + } +) + +-- SS Status packets +local CbPktSSStatus = CbPktConfig:new('cbPKT_SS_STATUS', + { + AField:new{n='cntlUnitStats'}, + PktField:new{t='UINT32', n='cntlUnitStats.nMode', d='nMode', format='HEX', valuestring={ + [0x00]="do not adapt at all", + [0x01]="always adapt", + [0x02]="adapt if timer not timed out", + }}, + PktField:new{t='FLOAT', n='cntlUnitStats.fTimeOutMinutes', d='how many minutes until time out'}, + PktField:new{t='FLOAT', n='cntlUnitStats.fElapsedMinutes', d='amount of time that has elapsed'}, + AField:new{n='cntlNumUnits'}, + PktField:new{t='UINT32', n='cntlNumUnits.nMode', d='nMode', format='HEX', valuestring={ + [0x00]="do not adapt at all", + [0x01]="always adapt", + [0x02]="adapt if timer not timed out", + }}, + PktField:new{t='FLOAT', n='cntlNumUnits.fTimeOutMinutes', d='how many minutes until time out'}, + PktField:new{t='FLOAT', n='cntlNumUnits.fElapsedMinutes', d='amount of time that has elapsed'}, + _types={ + [0x0057] = "SS Status Report cbPKTTYPE_SS_STATUSREP", + [0x00D7] = "SS Status Request cbPKTTYPE_SS_STATUSSET", + } + } +) + +-- SS Recalc packets +local CbPktSSRecalc = CbPktConfig:new('cbPKT_SS_RECALC', + { + + PktField:new{t='UINT32', n='chan',format='DEC', d="Channel (1-based). If 0, perform for all"}, + PktField:new{t='UINT32', n='mode', d='mode', format='HEX', valuestring={ + [0]="PC ->NSP start recalculation cbPCA_RECALC_START", + [1]="NSP->PC finished recalculation cbPCA_RECALC_STOPPED", + [2]="NSP->PC waveform collection started cbPCA_COLLECTION_STARTED", + [3]="Change the basis of feature space cbBASIS_CHANGE", + [4]="cbUNDO_BASIS_CHANGE", + [5]="cbREDO_BASIS_CHANGE", + [6]="cbINVALIDATE_BASIS", + }}, + _types={ + [0x0059] = "SS Recalc Report cbPKTTYPE_SS_RECALCREP", + [0x00D9] = "SS Recalc Request cbPKTTYPE_SS_RECALCSET", + } + } +) + +-- Feature Space Basis Packets +local CbPktFSBasis = CbPktConfig:new('cbPKT_FS_BASIS', + { + + PktField:new{t='UINT32', n='chan',format='DEC', d="Channel (1-based)"}, + PktField:new{t='UINT32', n='mode', d='mode', format='HEX', valuestring={ + [0]="PC ->NSP start recalculation cbPCA_RECALC_START", + [1]="NSP->PC finished recalculation cbPCA_RECALC_STOPPED", + [2]="NSP->PC waveform collection started cbPCA_COLLECTION_STARTED", + [3]="Change the basis of feature space cbBASIS_CHANGE", + [4]="cbUNDO_BASIS_CHANGE", + [5]="cbREDO_BASIS_CHANGE", + [6]="cbINVALIDATE_BASIS", + }}, + PktField:new{t='UINT32', n='fs',format='DEC', d="Feature space: cbAUTOALG_PCA"}, + PktField:new{t='FLOAT', n='basis', d='Room for all possible points collected'}, + AField:new{n='notImpl', d="→ Variable number of points not imlpemented ←"}, + _types={ + [0x005B] = "FS Basis Report cbPKTTYPE_FS_BASISREP", + [0x00DB] = "FS Basis Request cbPKTTYPE_FS_BASISSET", + } + } +) + + +-- Sample Group Information packets +local CbPktGroupInfo = CbPktConfig:new('cbPKT_GROUPINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='group',format='DEC'}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='period', d='Sampling Period', format='DEC'}, + PktField:new{t='UINT32', n='length', format='DEC'}, + PktField:new{t='UINT32', n='list', lf='length', d='channelList'}, + _types={ + [0x0030] = "Sample Group Report cbPKTTYPE_GROUPREP", + [0x00B0] = "Sample Group Request cbPKTTYPE_GROUPSET", + } + } +) + +-- Processor Information packets +local CbPktProcInfo = CbPktConfig:new('cbPKT_PROCINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='idcode', format='DEC_HEX', d='Manufacturer ID'}, + PktField:new{t='STRING', n='ident', len=cbConst.cbLEN_STR_IDENT}, + PktField:new{t='UINT32', n='chanbase',format='DEC'}, + PktField:new{t='UINT32', n='chancount',format='DEC'}, + PktField:new{t='UINT32', n='bankcount',format='DEC'}, + PktField:new{t='UINT32', n='groupcount',format='DEC'}, + PktField:new{t='UINT32', n='filtcount',format='DEC'}, + PktField:new{t='UINT32', n='sortcount',format='DEC'}, + PktField:new{t='UINT32', n='unitcount',format='DEC'}, + PktField:new{t='UINT32', n='hoopcount',format='DEC'}, + PktField:new{t='UINT32', n='sortmethod',format='DEC', valuestring={[0]='manual', [1]='auto'}}, + PktField:new{t='UINT32', n='version',format='DEC'}, + _types={ + [0x0021] = "Proc Report cbPKTTYPE_PROCREP", + }}) + +-- Bank Information packets +local CbPktBankInfo = CbPktConfig:new('cbPKT_BANKINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='bank',format='DEC'}, + PktField:new{t='UINT32', n='idcode', format='DEC_HEX', d='Manufacturer ID'}, + PktField:new{t='STRING', n='ident', len=cbConst.cbLEN_STR_IDENT}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='chanbase',format='DEC'}, + PktField:new{t='UINT32', n='chancount',format='DEC'}, + _types={ + [0x0022] = "Bank Report cbPKTTYPE_BANKREP", + } + } +) + +-- Filter (FILT) Information packets +local CbPktFiltInfo = CbPktConfig:new('cbPKT_FILTINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='filt',format='DEC'}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_FILT_LABEL}, + AField:new{n='hp', d='High-pass filter'}, + PktField:new{t='UINT32', n='hp.hpfreq', d='Corner freq in mHz', format='DEC'}, + PktField:new{t='UINT32', n='hp.hporder', d='Filter order', format='DEC'}, + PktField:new{t='UINT32', n='hp.hptype', d='Filter type', format='HEX'}, + FlagField:new{t='BOOLEAN', n='hp.hptype.physical', format=32, mask=0x00000001, d='Physical cbFILTTYPE_PHYSICAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.digital', format=32, mask=0x00000002, d='Digital cbFILTTYPE_DIGITAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.adaptive', format=32, mask=0x00000004, d='Adaptive cbFILTTYPE_ADAPTIVE', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.nonlinear', format=32, mask=0x00000008, d='Nonlinear cbFILTTYPE_NONLINEAR', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.butter', format=32, mask=0x00000100, d='Butterworth cbFILTTYPE_BUTTERWORTH', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.cheb', format=32, mask=0x00000200, d='Chebychev cbFILTTYPE_CHEBYCHEV', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.bessel', format=32, mask=0x00000400, d='Bessel cbFILTTYPE_BESSEL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.elliptical', format=32, mask=0x00000800, d='Elliptical cbFILTTYPE_ELLIPTICAL', valuestring={'yes','no'}}, + + + AField:new{n='lp', d='Low-pass filter'}, + PktField:new{t='UINT32', n='lp.lpfreq', d='Corner freq in mHz', format='DEC'}, + PktField:new{t='UINT32', n='lp.lporder', d='Filter order', format='DEC'}, + PktField:new{t='UINT32', n='lp.lptype', d='Filter type', format='HEX'}, + FlagField:new{t='BOOLEAN', n='lp.lptype.physical', format=32, mask=0x00000001, d='Physical cbFILTTYPE_PHYSICAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.digital', format=32, mask=0x00000002, d='Digital cbFILTTYPE_DIGITAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.adaptive', format=32, mask=0x00000004, d='Adaptive cbFILTTYPE_ADAPTIVE', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.nonlinear', format=32, mask=0x00000008, d='Nonlinear cbFILTTYPE_NONLINEAR', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.butter', format=32, mask=0x00000100, d='Butterworth cbFILTTYPE_BUTTERWORTH', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.cheb', format=32, mask=0x00000200, d='Chebychev cbFILTTYPE_CHEBYCHEV', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.bessel', format=32, mask=0x00000400, d='Bessel cbFILTTYPE_BESSEL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.elliptical', format=32, mask=0x00000800, d='Elliptical cbFILTTYPE_ELLIPTICAL', valuestring={'yes','no'}}, + + + PktField:new{t='DOUBLE', n='sos1a1'}, + PktField:new{t='DOUBLE', n='sos1a2'}, + PktField:new{t='DOUBLE', n='sos1b1'}, + PktField:new{t='DOUBLE', n='sos1b2'}, + PktField:new{t='DOUBLE', n='sos2a1'}, + PktField:new{t='DOUBLE', n='sos2a2'}, + PktField:new{t='DOUBLE', n='sos2b1'}, + PktField:new{t='DOUBLE', n='sos2b2'}, + PktField:new{t='DOUBLE', n='sos1a1'}, + _types={ + [0x0023] = "Filter Report cbPKTTYPE_FILTREP", + [0x00A3] = "Filter Request cbPKTTYPE_FILTSET", + } + } +) + +-- cbPKT_CHANRESET Factory Default settings request packet +local CbPktChanReset = CbPktConfig:new('cbPKT_CHANRESET', + { + AField:new{d="This packet is untested."}, + PktField:new{t='UINT32', n='chan', d="Channel"}, + PktField:new{t='UINT8', n='label', d="Reset label", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='userflags', d="Reset User flags", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='position', d="Reset Reserved", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='scalin', d="Reset Scaling in", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='scalout', d="Reset Scaling out", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='doutopts', d="Reset dOut options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='dinpopts', d="Reset dIn options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='aoutopts', d="Reset aOut options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='eopchar', d="Reset endOfPacket char", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='monsource', d="Reset monitor source", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='outvalue', d="Reset outValue", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='ainpopts', d="Reset aIn options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='lncrate', d="Reset LNC rate", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpfilter', d="Reset filter id", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpgroup', d="Reset sample group", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpdispmin', d="Reset display min", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpdispmax', d="Reset display max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkfilter', d="Reset spk filter", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkdispmax', d="Reset spk disp max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='lncdispmax', d="Reset LNC disp max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkopts', d="Reset spk options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkthrlevel', d="Reset spk threshold lvl", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkthrlimit', d="Reset spk threshold limit", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkgroup', d="Reset spkgroup", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkhoops', d="Reset spkhoops", valuestring={[0]='no', [1]='yes'}}, + _types={ + [0x0024] = "Factory Default settings Report cbPKTTYPE_CHANRESETREP", + [0x00A4] = "Factory Default settings Request cbPKTTYPE_CHANRESET", + } + } +) + + +-- cbPKT_ADAPTFILTINFO +local CbPktAdaptFiltInfo = CbPktConfig:new('cbPKT_ADAPTFILTINFO', + { + PktField:new{t='UINT32', n='chan', d="Chan (Ignored)"}, + PktField:new{t='UINT32', n='nMode', valuestring= + { + [0]="disabled", + [1]="filter continuous & spikes", + [2]="filter spikes", + } + }, + + PktField:new{t='FLOAT', n='dLearningRate'}, + PktField:new{t='UINT32', n='refChan1', d="Reference Channel 1"}, + PktField:new{t='UINT32', n='refChan2', d="Reference Channel 2"}, + _types={ + [0x0025] = "Adaptive filtering Report cbPKTTYPE_ADAPTFILTREP", + [0x00A5] = "Adaptive filtering Request cbPKTTYPE_ADAPTFILTSET", + } + } +) + +-- cbPKT_REFELECFILTINFO +local CbPktRefElecFiltInfo = CbPktConfig:new('cbPKT_REFELECFILTINFO', + { + PktField:new{t='UINT32', n='chan', d="Chan (Ignored)"}, + PktField:new{t='UINT32', n='nMode', valuestring= + { + [0]="disabled", + [1]="filter continuous & spikes", + [2]="filter spikes", + } + }, + PktField:new{t='UINT32', n='refChan', d="Reference Channel"}, + _types={ + [0x0026] = "Reference Electrode filtering Report cbPKTTYPE_REFELECFILTREP", + [0x00A6] = "Reference Electrode filtering Request cbPKTTYPE_REFELECFILTSET", + } + } +) + +-- cbPKT_LNC +local CbPktLNC = CbPktConfig:new('cbPKT_LNC', + { + PktField:new{t='UINT32', n='lncFreq', d="Nominal line noise frequency to be canceled (in Hz)"}, + PktField:new{t='UINT32', n='lncRefChan', d="Reference channel for lnc synch (1-based)"}, + PktField:new{t='UINT32', n='lncGlobalMode', d="reserved"}, + _types={ + [0x0028] = "Line Noise Cancellation Report cbPKTTYPE_LNCREP", + [0x00A8] = "Line Noise Cancellation Request cbPKTTYPE_LNCSET", + } + } +) + + +-- cbPKT_NM +local CbPktNM = CbPktConfig:new('cbPKT_NM', + { + PktField:new{t='UINT32', n='mode', valuestring= + { + [0]="cbNM_MODE_NONE", + [1]="cbNM_MODE_CONFIG Ask NeuroMotive for configuration", + [2]="cbNM_MODE_SETVIDEOSOURCE Configure video source", + [3]="cbNM_MODE_SETTRACKABLE Configure trackable", + [4]="cbNM_MODE_STATUS NeuroMotive status reporting (cbNM_STATUS_*)", + [5]="cbNM_MODE_TSCOUNT Timestamp count (value is the period with 0 to disable this mode)", + [6]="cbNM_MODE_SYNCHCLOCK Start (or stop) synchronization clock (fps*1000 specified by value, zero fps to stop capture)", + [7]="cbNM_MODE_ASYNCHCLOCK Asynchronous clock", + } + }, + PktField:new{t='UINT32', n='flags', d="status of NeuroMotive"}, + PktField:new{t='UINT32', n='value'}, + PktField:new{t='UINT32', n='opt', len=cbConst.cbLEN_STR_LABEL/4}, + _types={ + [0x0032] = "NeuroMotive Report cbPKTTYPE_NMREP", + [0x00B2] = "NeuroMotive Request cbPKTTYPE_NMSET", + } + } +) + +-- cbPKT_VIDEOSYNCH +local CbPktVideosynch = CbPktConfig:new('cbPKT_VIDEOSYNCH', + { + PktField:new{t='UINT16', n='split', d="file split number"}, + PktField:new{t='UINT32', n='frame'}, + PktField:new{t='UINT32', n='etime', d="elapsed time"}, + PktField:new{t='UINT16', n='id', d="video source id"}, + _types={ + [0x0029] = "VideoSynch Report cbPKTTYPE_VIDEOSYNCHREP", + [0x00A9] = "VideoSynch Request cbPKTTYPE_VIDEOSYNCHSET", + } + } +) + +-- cbPKT_VIDEOTRACK +local CbPktVideoTrack = CbPktConfig:new('cbPKT_VIDEOTRACK', + { + PktField:new{t='UINT16', n='parentID'}, + PktField:new{t='UINT16', n='nodeID'}, + PktField:new{t='UINT16', n='nodeCount'}, + PktField:new{t='UINT16', n='pointCount'}, + _types={ + [0x005F] = "VideoTrack Report cbPKTTYPE_VIDEOTRACKREP", + [0x00DF] = "VideoTrack Request cbPKTTYPE_VIDEOTRACKSET", + } + } +) + +-- cbPKT_NPLAY +local CbPktNPlay = CbPktConfig:new('cbPKT_NPLAY', + { + PktField:new{t='UINT64', n='ftime', d='ftime'}, + PktField:new{t='UINT64', n='stime', d='stime'}, + PktField:new{t='UINT64', n='etime', d='etime'}, + PktField:new{t='UINT64', n='val', d='val'}, + PktField:new{t='UINT16', n='mode', valuestring= + { + [0]="cbNPLAY_MODE_NONE", + [1]="cbNPLAY_MODE_PAUSE pause if val is non-zero, un-pause otherwise", + [2]="cbNPLAY_MODE_SEEK seek to time val", + [3]="cbNPLAY_MODE_CONFIG request full config", + [4]="cbNPLAY_MODE_OPEN open new file in val for playback", + [5]="cbNPLAY_MODE_PATH use the directory path in fname", + [6]="cbNPLAY_MODE_CONFIGMAIN request main config packet", + [7]="cbNPLAY_MODE_STEP run val procTime steps and pause, then send cbNPLAY_FLAG_STEPPED", + [8]="cbNPLAY_MODE_SINGLE single mode if val is non-zero, wrap otherwise", + [9]="cbNPLAY_MODE_RESET reset nPlay", + [10]="cbNPLAY_MODE_NEVRESORT resort NEV if val is non-zero, do not if otherwise", + [11]="cbNPLAY_MODE_AUDIO_CMD perform audio command in val (cbAUDIO_CMD_*), with option opt", + } + }, + PktField:new{t='UINT16', n='flag', valuestring= + { + [0]="cbNPLAY_FLAG_NONE no flag", + [1]="cbNPLAY_FLAG_CONF config packet (val is fname file index)", + [3]="cbNPLAY_FLAG_MAIN main config packet (val is file version)", + [2]="cbNPLAY_FLAG_DONE step command done", + } + }, + PktField:new{t='FLOAT', n='speed'}, + PktField:new{t='STRING', n='fname', len=256}, + _types={ + [0x005C] = "NPlay Report cbPKTTYPE_NPLAYREP", + [0x00DC] = "NPlay Request cbPKTTYPE_NPLAYSET", + } + } +) + +-- cbPKT_AOUT_WAVEFORM Analog output packets +local CbPktAoutWaveform = CbPktConfig:new('cbPKT_AOUT_WAVEFORM', + { + PktField:new{t='UINT16', n='chan', d="Which analog output/audio output channel (1-based)"}, + + PktField:new{t='UINT16', n='mode', valuestring= + { + [0]="cbWAVEFORM_MODE_NONE Disabled", + [1]="cbWAVEFORM_MODE_PARAMETERS repeated sequence", + [2]="cbWAVEFORM_MODE_SINE sinusoid", + } + }, + PktField:new{t='UINT32', n='repeats'}, + PktField:new{t='UINT8', n='trig', valuestring= + { + [0]="cbWAVEFORM_TRIGGER_NONE instant software trigger", + [1]="cbWAVEFORM_TRIGGER_DINPREG digital input rising edge trigger", + [2]="cbWAVEFORM_TRIGGER_DINPFEG digital input falling edge trigger", + [3]="cbWAVEFORM_TRIGGER_SPIKEUNIT spike unit", + [4]="cbWAVEFORM_TRIGGER_COMMENTCOLOR comment RGBA color (A being big byte)", + [5]="cbWAVEFORM_TRIGGER_SOFTRESET soft-reset trigger", + [6]="cbWAVEFORM_TRIGGER_EXTENSION extension trigger", + } + }, + PktField:new{t='UINT8', n='trigInst', d="Instrument the trigChan belongs"}, + PktField:new{t='UINT16', n='trigChan'}, + PktField:new{t='UINT16', n='trigValue'}, + PktField:new{t='UINT8', n='trigNum'}, + PktField:new{t='UINT8', n='active'}, + + AField:new{n='waveform'}, + PktField:new{t='INT16', n='waveform.offset'}, + PktField:new{t='UINT16', n='waveform.seq'}, + PktField:new{t='UINT16', n='waveform.seqTotal'}, + PktField:new{t='UINT16', n='waveform.phases'}, + PktField:new{t='UINT16', n='waveform.duration', lf='waveform.phases'}, + PktField:new{t='INT16', n='waveform.amplitude', lf='waveform.phases'}, + _types={ + [0x0033] = "Analog Out Waveform Report cbPKTTYPE_WAVEFORMREP", + [0x00B3] = "Analog Out Waveform Request cbPKTTYPE_WAVEFORMSET", + } + } +) + + +-- cbPKT_SS_DETECT +local CbPktSSDetect = CbPktConfig:new('cbPKT_SS_DETECT', + { + PktField:new{t='FLOAT', n='fThreshold'}, + PktField:new{t='FLOAT', n='fMultiplier'}, + _types={ + [0x0052] = "SS Detect Report cbPKTTYPE_SS_DETECTREP", + [0x00D2] = "SS Detect Request cbPKTTYPE_SS_DETECTSET", + } + } +) + +-- cbPKT_SS_ARTIF_REJECT +local CbPktSSArtifReject = CbPktConfig:new('cbPKT_SS_ARTIF_REJECT', + { + PktField:new{t='UINT32', n='nMaxSimulChans', d="How many channels can fire exactly at the same time?"}, + PktField:new{t='UINT32', n='nRefractoryCount', d="For how many samples (30 kHz) is a neuron refractory, so can't re-trigger"}, + _types={ + [0x0053] = "Artifact Rejection Report cbPKTTYPE_SS_ARTIF_REJECTREP", + [0x00D3] = "Artifact Rejection Request cbPKTTYPE_SS_ARTIF_REJECTSET", + } + } +) + +-- DOut set packets +local CbPktDOut = CbPktConfig:new('cbPKT_SET_DOUT', + { + PktField:new{t='INT16', n='chan', format='DEC'}, + PktField:new{t='INT16', n='value'}, + _types={ + [0x005D] = "Set Dout Report cbPKTTYPE_SET_DOUTREP", + [0x00DD] = "Set Dout Request cbPKTTYPE_SET_DOUTSET", + } + } +) + +-- Preview streams +-- Configuration +local CbPktPrevStreamCfg = CbPktPrevStreamBase:new('prevStreamCfg', + { + _types={ + [0x0003] = "Cfg Prev Stream Response cbPKTTYPE_PREVREP", + [0x0081] = "Cfg Prev Stream Request cbPKTTYPE_PREVSETLNC", + [0x0082] = "Cfg Prev Stream Request cbPKTTYPE_PREVSETSTREAM", + [0x0083] = "Cfg Prev Stream Request cbPKTTYPE_PREVSET", + } + } +) + +-- Line Noise Cancellation waveform preview +local CbPktLNCPrev = CbPktPrevStreamBase:new('cbPKT_LNCPREV', + { + PktField:new{t='UINT32', n='freq', format='DEC', d='Estimated line noise frequency in mHz'}, + PktField:new{t='INT16', n='wave', len=300}, + _types={ + [0x0001] = "LNC Prev Stream cbPKTTYPE_PREVREPLNC", + } + } +) + +-- Comment Packets +local CbPktComment = CbPktConfig:new('cbPKT_COMMENT', + { + PktField:new{t='UINT8', n='charset', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT64', n='time', d='Comment Start Time', format='HEX'}, + PktField:new{t='UINT32', n='rgba', format='HEX'}, + PktField:new{t='STRING', n='comment', d='First 8 chars of comment', len=8}, + _types={ + [0x0031] = "Comment response cbPKTTYPE_COMMENTREP", + [0x00B1] = "Comment request cbPKTTYPE_COMMENTSET", + } + } +) + +-- LOG Packets +local CbPktLog = CbPktConfig:new('cbPKT_LOG', + { + PktField:new{t='UINT16', n='mode', d='Log Mode', format='HEX', valuestring={ + [0x00]="Normal log cbLOG_MODE_NONE", + [0x01]="Critical log cbLOG_MODE_CRITICAL", + [0x02]="RPC log cbLOG_MODE_RPC", + [0x03]="RPC log cbLOG_MODE_PLUGINFO", + [0x04]="RPC log cbLOG_MODE_RPC_RES", + [0x05]="RPC log cbLOG_MODE_PLUGINERR", + [0x06]="RPC log cbLOG_MODE_RPC_END", + [0x07]="RPC log cbLOG_MODE_RPC_KILL", + [0x08]="RPC log cbLOG_MODE_RPC_INPUT", + [0x09]="RPC log cbLOG_MODE_UPLOAD_RES", + [0x0A]="RPC log cbLOG_MODE_ENDPLUGIN", + [0x0B]="RPC log cbLOG_MODE_REBOOT", + }}, + PktField:new{t='STRING', n='name', len=16}, + PktField:new{t='STRING', n='desc', len=128}, + _types={ + [0x0063] = "LOG response cbPKTTYPE_LOGREP", + [0x00E3] = "LOG request cbPKTTYPE_LOGSET", + } + } +) + + +-- Preview Stream +local CbPktStreamPrev = CbPktPrevStreamBase:new('cbPKT_STREAMPREV', + { + PktField:new{t='INT16', n='rawmin', format='DEC'}, + PktField:new{t='INT16', n='rawmax'}, + PktField:new{t='INT16', n='smpmin'}, + PktField:new{t='INT16', n='smpmax'}, + PktField:new{t='INT16', n='spkmin'}, + PktField:new{t='INT16', n='spkmax'}, + PktField:new{t='UINT32', n='spkmos'}, + PktField:new{t='UINT32', n='eventflag'}, + PktField:new{t='INT16', n='envmin'}, + PktField:new{t='INT16', n='envmax'}, + PktField:new{t='INT32', n='spkthrlevel'}, + PktField:new{t='UINT32', n='nWaveNum'}, + PktField:new{t='UINT32', n='nSampleRows'}, + PktField:new{t='UINT32', n='nFlags'}, + _types= { + [0x0002] = "Prev Stream cbPKTTYPE_PREVREPSTREAM", + } + } +) + +-- Data packets (chid < 0x8000) +-- Sample Group packets +local CbPktGroup = CbPkt:new('cbPKT_GROUP', + { + PktField:new{t='INT16', n='data', lf='dlen', lfactor=2}, + } +) +CbPktGroup.fields['type'].d='Sample Group ID (1-127)' +CbPktGroup.fields['type'].format='DEC' + +function CbPktGroup:makeInfoString() + return self.name .. "(" .. self.dfields['type']()() .. ")" +end + +-- Spike packets +local CbPktNev = CbPkt:new('nevPKT_SPK', + { + PktField:new{t='INT16', n='data', lf='dlen', lfactor=2}, + } +) +CbPktNev.fields['type'].d='Packet Type' +CbPktNev.fields['type'].format='DEC' + +-- DigIn packets +local CbPktNevDigIn = CbPkt:new('nevPKT_DIGIN', + { + PktField:new{t='UINT32', n='data', lf='dlen', format='HEX_DEC'}, + } +) +CbPktNevDigIn.fields['type'].d='Packet Type' +CbPktNevDigIn.fields['type'].format='DEC' + +-- Packet definitions end here. + + +-- Now we define something that will make our protocol + +local ProtoMaker = klass:new{ + name='Cerebus', + desc="Cerebus NSP Communication", + colname="Cerebus", + ports={51001, 51002, 51003} +} +function ProtoMaker:new(o) + o = o or {} + local newobj = klass.new(self) + for k,v in pairs(o) do newobj[k] = v end + newobj.proto = Proto(newobj.name, newobj.desc) + newobj.pfields = newobj.proto.fields + newobj.fByPkt = {} + return newobj +end +function ProtoMaker:register() +-- info("register proto ...") + + for _,p in pairs(CbPkt.pkttypes) do + self:makeFieldsForPacket(p) + end + + local fe_interface_id_f = Field.new("frame.interface_id") + + function self.proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = self.colname + local buflen = buffer:len() + local offset = 0 + local header_len = 16 + local buf_remain = buffer():tvb() + local i = 0 + while buflen >= header_len do + local chid = buf_remain(8,2):le_uint() + local ptype = buf_remain(10,2):le_uint() + local packet = CbPkt:match(chid, ptype) + -- get current + local packet_len = buf_remain(12,2):le_uint() * 4 + header_len + + + local subtree = tree:add(self.proto, buf_remain(0, packet_len), "Cerebus Protocol Data (" .. packet.name .. ")(" .. packet_len ..")" ) + + self:addSubtreeForPkt(buf_remain(0, packet_len):tvb(), subtree, packet) + buflen = buflen - packet_len + buf_remain = buf_remain(packet_len):tvb() + if i == 0 then + pinfo.cols.info = packet:makeInfoString() + end + + i = i + 1 + end + if i > 1 then + pinfo.cols.info:append(" (+ " .. (i-1) .. " other" .. (i>2 and 's' or '') .. ")") + end + + local f_interface_id = fe_interface_id_f() + pinfo.cols.info:prepend("NSP:" .. tostring(f_interface_id) .. " ") + + end + local udp_table = DissectorTable.get("udp.port") + -- register our protocol to handle udp ports + for _, p in ipairs(self.ports) do + udp_table:add(p, self.proto) + end +end +function ProtoMaker:makeFieldsForPacket(pkt) + local n = self.name .. "." .. pkt.name .. "." + local fn = pkt.name .. "_" + self.fByPkt[pkt] = {} + for i, f in ipairs(pkt.fields) do + local thisfn = fn .. f.n + local thisn = n .. f.n + local pf + + if f.ftype~='afield' and f.ftype~='flagfield' then + pf = ProtoField.new(f.d and f.d or f.n, thisn, ftypes[f.t], f.valuestring, base[f.format], f.mask, f.d) + elseif f.ftype=='flagfield' then + pf = ProtoField.new(f.d and f.d or f.n, thisn, ftypes[f.t], f.valuestring, f.format, f.mask, f.d) + end + if pf~=nil then + self.pfields[thisfn] = pf + self.fByPkt[pkt][f.n] = pf + + local df = Field.new(thisn) + table.insert(pkt.dfields, df) + pkt.dfields[f.n] = df + end + end +end + +function ProtoMaker:addSubtreeForPkt(buffer, tree, pkt) + local tree_stack = Stack:Create({t=tree, p="", br=buffer()}) + + for i, bPos, width, pf, mult in pkt:iterate(buffer:len()) do + local current_parent_tree = nil + local current_parent_br = nil + repeat + local last_tree = tree_stack:last() + local i,j = string.find(pf.n, last_tree.p) + if i==1 and j > 0 and string.sub(pf.n, j+1, j+1)=='.' then + current_parent_tree = last_tree.t + current_parent_br = last_tree.br + -- tree_stack:push(last_tree) + elseif i==1 and j==0 then + current_parent_tree = last_tree.t + current_parent_br = last_tree.br + else + tree_stack:pop() + end + until current_parent_tree ~= nil + local subtree + local tvb_rng_wh + if pf.ftype == 'afield' then + subtree = current_parent_tree:add(pf.d ~= nil and pf.d or pf.n ) + elseif pf.ftype == 'flagfield' then + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], current_parent_br) + else + if mult > 0 then + tvb_rng_wh = buffer(bPos, width * mult) + local brng = buffer(bPos, width) + local this_rangeGetter = pf:rangeGetter() + if this_rangeGetter ~= nil then + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], tvb_rng_wh, brng[pf:rangeGetter()](brng) ) + else + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], tvb_rng_wh) + end + if mult > 1 then + local n = mult - 1 + subtree:append_text(" and "..n.." more item"..(n>1 and "s" or "")) + for i=0,n do + brng = buffer(bPos + width * i, width) + subtree:add( brng, 'item '..i..': ' .. brng[pf:rangeGetter()](brng)) + end + end + end + end + tree_stack:push({t=subtree, p=pf.n, f=pf, br=tvb_rng_wh}) + + end +end + +-- instantiate Protocol maker +local pm = ProtoMaker:new() +pm:register() diff --git a/dissectors/cerebus-nsp/src/Cerebus42.lua b/dissectors/cerebus-nsp/src/Cerebus42.lua new file mode 100644 index 0000000..440d6df --- /dev/null +++ b/dissectors/cerebus-nsp/src/Cerebus42.lua @@ -0,0 +1,1516 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/CerebusOSS/CerebusWireshark (Cerebus42.lua), +-- commit bf0cb2d4ccb2bc35ed09952d4fec6862519ebd21 du 13/05/2026 (dernière modification du fichier : +-- commit 8ba4088fc7519944d50ee4cf1edbd03cd682a328 du 13/05/2026). +-- Licence amont : GPL-3.0 (README « licensed under the GPLv3 », LICENSE du dépôt) — voir README.md et LICENSE. +-- Wireshark dissector for UDP packets exchanged between +-- Neural Signal Processors and controlling PCs +-- +-- Copyright 2017 Jonas Zimmermann, 2022 Hyrum Sessions + +-- info("Loading cb protocol ...") + +-- Definition of a few helpers + +-- implementation of a simple stack (Lifted from http://lua-users.org/wiki/SimpleStack) +-- and extended +local Stack = {} + +-- Create a Table with stack functions +function Stack:Create(default_element) + + -- stack table + local t = {} + -- entry table + t._et = {} + t._default_element = default_element + + -- push a value on to the stack + function t:push(...) + if ... then + local targs = {...} + -- add values + for _,v in ipairs(targs) do + table.insert(self._et, v) + end + end + end + + -- pop a value from the stack + function t:pop(num) + + -- get num values from stack + local num = num or 1 + + -- return table + local entries = {} + + -- get values into entries + for i = 1, num do + -- get last entry + if #self._et ~= 0 then + table.insert(entries, self._et[#self._et]) + -- remove last value + table.remove(self._et) + else + break + end + end + -- if we get fewer entries than requested, also include default (if not nil) + if #entries < num and self._default_element ~= nil then + table.insert(entries, self._default_element) + end + + -- return unpacked entries + return table.unpack(entries) + end + + -- get entries + function t:getn() + return #self._et + end + + -- list values + function t:list() + for i,v in pairs(self._et) do + print(i, v) + end + end + + -- get last entry without removing + function t:last() + return #self._et > 0 and self._et[#self._et] or self._default_element + end + + return t +end + +-- define Constants, lifted from cbhwlib.h +local cbConst = {} +cbConst.cbMAXHOOPS = 4 +cbConst.cbMAXSITES = 4 +cbConst.cbMAXSITEPLOTS = ((cbConst.cbMAXSITES - 1) * cbConst.cbMAXSITES / 2) +cbConst.cbNUM_FE_CHANS = 256 -- #Front end channels +cbConst.cbNUM_ANAIN_CHANS = 16 -- #Analog Input channels +cbConst.cbNUM_ANALOG_CHANS = (cbConst.cbNUM_FE_CHANS + cbConst.cbNUM_ANAIN_CHANS) -- Total Analog Inputs +cbConst.cbNUM_ANAOUT_CHANS = 4 -- #Analog Output channels +cbConst.cbNUM_AUDOUT_CHANS = 2 -- #Audio Output channels +cbConst.cbNUM_ANALOGOUT_CHANS = (cbConst.cbNUM_ANAOUT_CHANS + cbConst.cbNUM_AUDOUT_CHANS) -- Total Analog Output +cbConst.cbNUM_DIGIN_CHANS = 1 -- #Digital Input channels +cbConst.cbNUM_SERIAL_CHANS = 1 -- #Serial Input channels +cbConst.cbNUM_DIGOUT_CHANS = 4 -- #Digital Output channels +-- Total of all channels = 156 +cbConst.cbMAXCHANS = (cbConst.cbNUM_ANALOG_CHANS + + cbConst.cbNUM_ANALOGOUT_CHANS + cbConst.cbNUM_DIGIN_CHANS + + cbConst.cbNUM_SERIAL_CHANS + cbConst.cbNUM_DIGOUT_CHANS) + +cbConst.cbFIRST_FE_CHAN = 0 -- 0 First Front end channel +cbConst.cbFIRST_ANAIN_CHAN = cbConst.cbNUM_FE_CHANS -- 256 First Analog Input channel +cbConst.cbFIRST_ANAOUT_CHAN = (cbConst.cbFIRST_ANAIN_CHAN + cbConst.cbNUM_ANAIN_CHANS) -- 288 First Analog Output channel +cbConst.cbFIRST_AUDOUT_CHAN = (cbConst.cbFIRST_ANAOUT_CHAN + cbConst.cbNUM_ANAOUT_CHANS) -- 296 First Audio Output channel +cbConst.cbFIRST_DIGIN_CHAN = (cbConst.cbFIRST_AUDOUT_CHAN + cbConst.cbNUM_AUDOUT_CHANS) -- 300 First Digital Input channel +cbConst.cbFIRST_SERIAL_CHAN = (cbConst.cbFIRST_DIGIN_CHAN + cbConst.cbNUM_DIGIN_CHANS) -- 302 First Serial Input channel +cbConst.cbFIRST_DIGOUT_CHAN = (cbConst.cbFIRST_SERIAL_CHAN + cbConst.cbNUM_SERIAL_CHANS) -- 304 First Digital Output channel + + +cbConst.cbLEN_STR_UNIT = 8 +cbConst.cbLEN_STR_LABEL = 16 +cbConst.cbLEN_STR_FILT_LABEL = 16 +cbConst.cbLEN_STR_IDENT = 64 +cbConst.cbMAXUNITS = 5 +cbConst.cbMAXNTRODES = (cbConst.cbNUM_ANALOG_CHANS / 2) +cbConst.cbPKT_SPKCACHELINECNT = cbConst.cbNUM_ANALOG_CHANS + +cbConst.cbMAX_PNTS = 128 + + +-- base of our rudimentary class system +local klass = {} +function klass:new (o) + o = o or {} + setmetatable(o, self) + self.__index = self + return o +end + +local AField = klass:new{ + n='name', + d=nil, + ftype='afield', +} + + +local PktField = AField:new{ + ftype='pktfield', + t='UINT8', + lf=nil, + lfactor=1, + len=nil, + format='NONE', + valuestring=nil, + mask=nil, + _data_width={ + UINT8=1, + INT8=1, + BYTES=1, + UINT16=2, + INT16=2, + UINT32=4, + INT32=4, + UINT64=8, + FLOAT=4, + DOUBLE=8, + STRING=1, + }, + _data_rng_getter={ + UINT8='le_uint', + INT8='le_int', + UINT16='le_uint', + INT16='le_int', + UINT32='le_uint', + INT32='le_int', + FLOAT='le_float', + DOUBLE='le_float', + } +} +function PktField:dataWidth() + local dw = self._data_width[self.t] + return dw +end +function PktField:rangeGetter() + return self._data_rng_getter[self.t] +end + +local FlagField = AField:new{ + mask=0x00, + valuestring=nil, + ftype='flagfield', +} + +-- All Packets derive from CbPkt, which defines the packet header +local CbPkt = klass:new{ + name='HEADER', + fields={ + PktField:new{t='UINT64', n='time', d='Timestamp in tics', format='HEX'}, + PktField:new{t='UINT16', n='chid', format='HEX_DEC'}, + PktField:new{t='UINT16', n='type', format='HEX'}, + PktField:new{t='UINT16', n='dlen', d='Packet Data Length (in quadlets)'}, + PktField:new{t='UINT8', n='instrument', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'} + }, + dfields={}, + pkttypes= setmetatable({}, {__mode="v"}), + conf_type_map = { + [1]=setmetatable({}, {__mode="v"}), -- CbPktConfig + [2]=setmetatable({}, {__mode="v"}) -- CbPktPrevStreamBase + }, + _conf_pkg_ch=0x8000 +} +function CbPkt:new(name, addfields) + local newobj = klass:new() + newobj.fields = {} + for i, f in ipairs(self.fields) do + newobj.fields[i] = f:new() + end + newobj.name = name + newobj.dfields = {} + addfields = addfields or {} + local types = addfields._types + addfields._types = nil + for _, f in pairs(addfields) do + table.insert(newobj.fields, f) + end + for i, f in ipairs(newobj.fields) do + newobj.fields[f.n] = f + end + + newobj.fields['type'].valuestring = types + + self.pkttypes[name] = newobj + setmetatable(newobj, self) + self.__index = self + + if newobj._kind == 1 or newobj._kind == 2 then + for k,_ in pairs(newobj.fields['type'].valuestring) do + self.conf_type_map[newobj._kind][k] = newobj + end + end + return newobj +end +function CbPkt:match(chid, pkt_type) + -- this matches all config packets, i.e. ones where chid==0x8000 + if chid == self._conf_pkg_ch and pkt_type ~= nil and self.conf_type_map[1][pkt_type] ~= nil then + return self.conf_type_map[1][pkt_type] + end + if (chid & self._conf_pkg_ch) == self._conf_pkg_ch and + (chid & ~(self._conf_pkg_ch)) > 0 and + pkt_type ~= nil and + self.conf_type_map[2][pkt_type] ~= nil then + return self.conf_type_map[2][pkt_type] + end + + if chid == 0x0000 and self.pkttypes.cbPKT_GROUP ~= nil then + return self.pkttypes.cbPKT_GROUP + end + + if chid > 0x0000 and chid < cbConst.cbPKT_SPKCACHELINECNT and self.pkttypes.nevPKT_SPK ~= nil then + return self.pkttypes.nevPKT_SPK + end + + if (cbConst.cbFIRST_DIGIN_CHAN < chid) and (chid <= cbConst.cbFIRST_DIGIN_CHAN+cbConst.cbNUM_DIGIN_CHANS) and self.pkttypes.nevPKT_DIGIN ~= nil then + return self.pkttypes.nevPKT_DIGIN + end + + return self.pkttypes['cbPKT_GENERIC'] +end + +function CbPkt:iterate(b_len) + local i=0 + local n=#self.fields + local buf_pos=0 + -- store how many bytes we expect in total. That's composed of 8 header bytes and the reported 'dlen' + local dlen + + return function() + i = i + 1 + if i <= n then + local f = self.fields[i] + if f.ftype=='afield' or f.ftype=='flagfield' then + return i, buf_pos, 0, f, 1 + end + + -- if dlen hasn't been read yet, test if it is available, read it from field; add header size + if dlen == nil and self.dfields['dlen'] ~= nil and self.dfields['dlen']() ~= nil then + dlen = 16 + self.dfields['dlen']()() * 4 + end + + local width = f:dataWidth() + local field_w = width + local mult = 1 + if f.len ~= nil then + mult = f.len + elseif f.lf ~= nil and self.dfields[f.lf] ~= nil then + mult = f.lfactor * self.dfields[f.lf]()() + end + width = width * mult + local old_buf_pos = buf_pos + buf_pos = buf_pos + width + if f.t=='BYTES' or f.t=='STRING' then + field_w = width + mult = 1 + end + -- if we'd exceed buffer length (as passed through b_len) or dlen, stop by returning nil + if (b_len ~= nil and buf_pos > b_len) or (dlen ~= nil and buf_pos > dlen) then return nil end + return i, old_buf_pos, field_w, f, mult + end + end +end + +function CbPkt:makeInfoString() + return self.name +end + +-- Subclass for config packets. They all share that +-- chid == 0x8000 and 'type' corresponds to a packet type, which we store in the 'type' field's valuestring +local CbPktConfig = CbPkt:new('cb_cfg') +CbPktConfig._kind = 1 + +-- Subclass for preview stream packets. They all share that +-- (chid & 0x8000) == 0x8000 and (chid&0x0FFF) > 0 and 'type' corresponds to a packet type, which we store in the 'type' field's valuestring +local CbPktPrevStreamBase = CbPkt:new('cb_prev') +CbPktPrevStreamBase._kind = 2 + +-- Packet definitions start here + +-- Generic packets + +local CbPktGeneric = CbPkt:new('cbPKT_GENERIC', + { + PktField:new{t='BYTES', n='data', lf='dlen', lfactor=4}, + } +) + +-- Config packets (chid == 0x8000) + +-- System heartbeat +local CbPktSysHeartbeat = CbPktConfig:new('cbPKT_SYSHEARTBEAT', { + _types={ + [0x0000] = "System Heartbeat cbPKTTYPE_SYSHEARTBEAT", + } +}) + +-- System protocol monitor +local CbPktSysProtocolMonitor = CbPktConfig:new('cbPKT_SYSPROTOCOLMONITOR', + { + PktField:new{t='UINT32', n='sentpkts', d='Packets sent since last cbPKT_SYSPROTOCOLMONITOR (or 0 if timestamp=0)'}, + PktField:new{t='UINT32', n='counter', d='Number of cbPKT_SYSPROTOCOLMONITOR sent'}, + _types={ + [0x0001] = "System Protocol Monitor Packet", + } + } +) + +-- System condition report packet +local CbPktSysInfo = CbPktConfig:new('cbPKT_SYSINFO', + { + PktField:new{t='UINT32', n='sysfreq', d='System clock frequency in Hz', format='DEC'}, + PktField:new{t='UINT32', n='spikelen', d='The length of the spike events', format='DEC'}, + PktField:new{t='UINT32', n='spikepre', d='Spike pre-trigger samples', format='DEC'}, + PktField:new{t='UINT32', n='resetque', d='The channel for the reset to que on', format='DEC'}, + PktField:new{t='UINT32', n='runlevel', d='System runlevel', format='DEC_HEX'}, + PktField:new{t='UINT32', n='runflags', d='Run Flags', format='HEX'}, + _types={ + [0x0010] = "System Condition Report cbPKTTYPE_SYSREP", + [0x0011] = "System Spike Length Report cbPKTTYPE_SYSREPSPKLEN", + [0x0012] = "System Runlevel Report cbPKTTYPE_SYSREPRUNLEV", + [0x0090] = "System set Req cbPKTTYPE_SYSSET", + [0x0091] = "System set Spike Length cbPKTTYPE_SYSSETSPKLEN", + [0x0092] = "System set Runlevel cbPKTTYPE_SYSSETRUNLEV", + } + } +) + +-- System condition report packet +local CbPktSSModelSet = CbPktConfig:new('cbPKT_SS_MODELSET', + { + PktField:new{t='UINT32', n='chan', d='Channel being configured (zero-based)', format='DEC'}, + PktField:new{t='UINT32', n='unit_number', d='unit number (0 = noise)', format='DEC'}, + PktField:new{t='UINT32', n='valid', valuestring={[0]="invalid", [1]="valid"}, format='DEC'}, + PktField:new{t='UINT32', n='inverted', valuestring={[0]="not inverted", [1]="inverted"}, format='DEC'}, + PktField:new{t='INT32', n='num_samples', d='non-zero value means that the block stats are valid', format='DEC'}, + PktField:new{t='FLOAT', n='mu', len=2}, + PktField:new{t='FLOAT', n='Sigma_x', len=4}, + PktField:new{t='FLOAT', n='determinant_Sigma_x'}, + PktField:new{t='FLOAT', n='Sigma_x_inv', len=4}, + PktField:new{t='FLOAT', n='log_determinant_Sigma_x'}, + PktField:new{t='FLOAT', n='subcluster_spread_factor_numerator'}, + PktField:new{t='FLOAT', n='subcluster_spread_factor_denominator'}, + PktField:new{t='FLOAT', n='mu_e'}, + PktField:new{t='FLOAT', n='sigma_e_squared'}, + _types={ + [0x0051] = "SS Model response cbPKTTYPE_SS_MODELREP", + [0x00D1] = "SS Model request cbPKTTYPE_SS_MODELSET", + } + } +) + +-- NTrode Information Packets +local CbPktNTrodeInfo = CbPktConfig:new('cbPKT_NTRODEINFO', + { + PktField:new{t='UINT32', n='ntrode', d='nTrode being configured (1-based)', format='DEC'}, + PktField:new{t='STRING', n='label', d='nTrode label', len=cbConst.cbLEN_STR_LABEL}, + AField:new{n='placeholder', d='→ Other fields of this packet have not been implemented yet. ←'}, + -- typedef struct { + -- INT16 nOverride; + -- INT16 afOrigin[3]; + -- INT16 afShape[3][3]; + -- INT16 aPhi; + -- UINT32 bValid; // is this unit in use at this time? + -- // BOOL implemented as UINT32 - for structure alignment at paragraph boundary + -- } cbMANUALUNITMAPPING; + -- cbMANUALUNITMAPPING ellipses[cbMAXSITEPLOTS][cbMAXUNITS]; // unit mapping + -- UINT16 nSite; // number channels in this NTrode ( 0 <= nSite <= cbMAXSITES) + -- UINT16 fs; // NTrode feature space cbNTRODEINFO_FS_* + -- UINT16 nChan[cbMAXSITES]; // group of channels in this NTrode + _types={ + [0x0027] = "NTrode info response cbPKTTYPE_REPNTRODEINFO", + [0x00A7] = "NTrode info request cbPKTTYPE_SETNTRODEINFO", + } + } +) + +-- Channel Information Packets +local CbPktChanInfo = CbPktConfig:new('cbPKT_CHANINFO', + { + PktField:new{t='UINT32', n='chan', d='channel being configured', format='DEC'}, + PktField:new{t='UINT32', n='proc', d='address of the processor', format='DEC'}, + PktField:new{t='UINT32', n='bank', d='address of the bank', format='DEC'}, + PktField:new{t='UINT32', n='term', d='terminal number', format='DEC_HEX'}, + PktField:new{t='UINT32', n='chancaps', d='channel capabilities', format='HEX'}, + PktField:new{t='UINT32', n='doutcaps', d='digital output capabilities', format='HEX'}, + PktField:new{t='UINT32', n='dinpcaps', d='digital input capabilities', format='HEX'}, + PktField:new{t='UINT32', n='aoutcaps', d='analog output capabilities', format='HEX'}, + PktField:new{t='UINT32', n='ainpcaps', d='analog input capabilities', format='HEX'}, + PktField:new{t='UINT32', n='spkcaps', d='spike capabilities', format='HEX'}, + + AField:new{n='physcalin', d='physical channel scaling information (in)'}, + PktField:new{t='INT16', n='physcalin.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='physcalin.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='physcalin.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalin.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalin.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='physcalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='phyfiltin', d='physical channel filter definition (in)'}, + PktField:new{t='STRING', n='phyfiltin.label', d='filter label', len=cbConst.cbLEN_STR_FILT_LABEL}, + PktField:new{t='UINT32', n='phyfiltin.hpfreq', d='high-pass corner frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltin.hporder', d='high-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltin.hptype', d='high-pass filter type', format='HEX'}, + PktField:new{t='UINT32', n='phyfiltin.lpfreq', d='low-pass frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltin.lporder', d='low-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltin.lptype', d='low-pass filter type', format='HEX'}, + + AField:new{n='physcalout', d='physical channel scaling information (out)'}, + PktField:new{t='INT16', n='physcalout.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='physcalout.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='physcalout.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalout.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='physcalout.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='physcalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='phyfiltout', d='physical channel filter definition (out)'}, + PktField:new{t='STRING', n='phyfiltout.label', d='filter label', len=cbConst.cbLEN_STR_FILT_LABEL}, + PktField:new{t='UINT32', n='phyfiltout.hpfreq', d='high-pass corner frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltout.hporder', d='high-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltout.hptype', d='high-pass filter type', format='HEX'}, + PktField:new{t='UINT32', n='phyfiltout.lpfreq', d='low-pass frequency in milliHertz'}, + PktField:new{t='UINT32', n='phyfiltout.lporder', d='low-pass filter order'}, + PktField:new{t='UINT32', n='phyfiltout.lptype', d='low-pass filter type', format='HEX'}, + + PktField:new{t='STRING', n='label', d='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='userflags', format='HEX'}, + PktField:new{t='INT32', n='position', len=4}, + + AField:new{n='scalin', d='scaling information (in)'}, + PktField:new{t='INT16', n='scalin.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='scalin.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='scalin.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='scalin.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='scalin.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='scalin.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + AField:new{n='scalout', d='scaling information (out)'}, + PktField:new{t='INT16', n='scalout.digmin', d='digital value that cooresponds with the anamin value'}, + PktField:new{t='INT16', n='scalout.digmax', d='digital value that cooresponds with the anamax value'}, + PktField:new{t='INT32', n='scalout.anamin', d='minimum analog value present in the signal'}, + PktField:new{t='INT32', n='scalout.anamax', d='maximum analog value present in the signal'}, + PktField:new{t='INT32', n='scalout.anagain', d='gain applied to the default analog values to get the analog values'}, + PktField:new{t='STRING', n='scalout.anaunit', d='unit label', len=cbConst.cbLEN_STR_UNIT}, + + PktField:new{t='UINT32', n='doutopts', format='HEX'}, + PktField:new{t='UINT32', n='dinpopts', format='HEX'}, + PktField:new{t='UINT32', n='aoutopts', format='HEX'}, + PktField:new{t='UINT32', n='eopchar', format='HEX'}, + PktField:new{t='UINT16', n='moninst', format='HEX'}, + PktField:new{t='UINT16', n='monchan', format='HEX'}, + PktField:new{t='INT32', n='outvalue'}, + + PktField:new{t='UINT8', n='trigtype'}, + PktField:new{t='UINT16', n='reserved'}, + PktField:new{t='UINT8', n='triginst'}, + PktField:new{t='UINT16', n='trigchan'}, + PktField:new{t='UINT16', n='trigval'}, + + PktField:new{t='UINT32', n='ainpopts', format='HEX'}, + FlagField:new{t='BOOLEAN', n='ainpopts.rawpreview', format=32, mask=0x00000001, d='cbAINP_RAWPREVIEW Generate scrolling preview data for the raw channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.lnc', format=32, mask=0x00000002, d='cbAINP_LNC Line Noise Cancellation', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.lncpreview', format=32, mask=0x00000004, d='cbAINP_LNCPREVIEW Retrieve the LNC correction waveform', valuestring={'yes', 'no'}}, + + FlagField:new{t='BOOLEAN', n='ainpopts.smpstream', format=32, mask=0x00000010, d='cbAINP_SMPSTREAM stream the analog input stream directly to disk', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.smpfilter', format=32, mask=0x00000020, d='cbAINP_SMPFILTER Digitally filter the analog input stream', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.rawtream', format=32, mask=0x00000040, d='cbAINP_RAWSTREAM Raw data stream available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkstream', format=32, mask=0x00000100, d='cbAINP_SPKSTREAM Spike Stream is available', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkfilter', format=32, mask=0x00000200, d='cbAINP_SPKFILTER Selectable Filters', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkpreview', format=32, mask=0x00000400, d='cbAINP_SPKPREVIEW Generate scrolling preview of the spike channel', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.spkproc', format=32, mask=0x00000800, d='cbAINP_SPKPROC Channel is able to do online spike processing', valuestring={'yes', 'no'}}, + FlagField:new{t='BOOLEAN', n='ainpopts.offset_cor', format=32, mask=0x00001000, d='cbAINP_OFFSET_CORRECT_CAP Offset correction mode (0-disabled 1-enabled)', valuestring={'yes', 'no'}}, + + PktField:new{t='UINT32', n='lncrate'}, + + PktField:new{t='UINT32', n='smpfilter'}, + PktField:new{t='UINT32', n='smpgroup'}, + + PktField:new{t='INT32', n='smpdispmin'}, + PktField:new{t='INT32', n='smpdispmax'}, + + PktField:new{t='UINT32', n='spkfilter'}, + + PktField:new{t='INT32', n='spkdispmax'}, + PktField:new{t='INT32', n='lncdispmax'}, + + PktField:new{t='UINT32', n='spkopts'}, + + PktField:new{t='INT32', n='spkthrlevel'}, + PktField:new{t='INT32', n='spkthrlimit'}, + + PktField:new{t='UINT32', n='spkgroup'}, + + PktField:new{t='INT16', n='amplrejpos'}, + PktField:new{t='INT16', n='amplrejneg'}, + PktField:new{t='UINT32', n='refelecchan'}, + + -- cbMANUALUNITMAPPING unitmapping[cbMAXUNITS] + AField:new{n='unitmapping1', d='Defines an ellipsoid for sorting unit 1'}, + PktField:new{t='INT16', n='unitmapping1.nOverride'}, + PktField:new{t='INT16', n='unitmapping1.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping1.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping1.aPhi'}, + PktField:new{t='UINT32', n='unitmapping1.bValid'}, + AField:new{n='unitmapping2', d='Defines an ellipsoid for sorting unit 2'}, + PktField:new{t='INT16', n='unitmapping2.nOverride'}, + PktField:new{t='INT16', n='unitmapping2.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping2.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping2.aPhi'}, + PktField:new{t='UINT32', n='unitmapping2.bValid'}, + AField:new{n='unitmapping3', d='Defines an ellipsoid for sorting unit 3'}, + PktField:new{t='INT16', n='unitmapping3.nOverride'}, + PktField:new{t='INT16', n='unitmapping3.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping3.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping3.aPhi'}, + PktField:new{t='UINT32', n='unitmapping3.bValid'}, + AField:new{n='unitmapping4', d='Defines an ellipsoid for sorting unit 4'}, + PktField:new{t='INT16', n='unitmapping4.nOverride'}, + PktField:new{t='INT16', n='unitmapping4.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping4.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping4.aPhi'}, + PktField:new{t='UINT32', n='unitmapping4.bValid'}, + AField:new{n='unitmapping5', d='Defines an ellipsoid for sorting unit 5'}, + PktField:new{t='INT16', n='unitmapping5.nOverride'}, + PktField:new{t='INT16', n='unitmapping5.afOrigin', len=3}, + PktField:new{t='INT16', n='unitmapping5.afShape', len=9}, + PktField:new{t='INT16', n='unitmapping5.aPhi'}, + PktField:new{t='UINT32', n='unitmapping5.bValid'}, + -- cbHOOP spkhoops[cbMAXUNITS][cbMAXHOOPS] + AField:new{n='spkhoops1_1', d='Defines the hoop used for sorting unit 1 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops1_1.valid'}, + PktField:new{t='INT16', n='spkhoops1_1.time'}, + PktField:new{t='INT16', n='spkhoops1_1.min'}, + PktField:new{t='INT16', n='spkhoops1_1.max'}, + AField:new{n='spkhoops1_2', d='Defines the hoop used for sorting unit 1 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops1_2.valid'}, + PktField:new{t='INT16', n='spkhoops1_2.time'}, + PktField:new{t='INT16', n='spkhoops1_2.min'}, + PktField:new{t='INT16', n='spkhoops1_2.max'}, + AField:new{n='spkhoops1_3', d='Defines the hoop used for sorting unit 1 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops1_3.valid'}, + PktField:new{t='INT16', n='spkhoops1_3.time'}, + PktField:new{t='INT16', n='spkhoops1_3.min'}, + PktField:new{t='INT16', n='spkhoops1_3.max'}, + AField:new{n='spkhoops1_4', d='Defines the hoop used for sorting unit 1 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops1_4.valid'}, + PktField:new{t='INT16', n='spkhoops1_4.time'}, + PktField:new{t='INT16', n='spkhoops1_4.min'}, + PktField:new{t='INT16', n='spkhoops1_4.max'}, + AField:new{n='spkhoops2_1', d='Defines the hoop used for sorting unit 2 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops2_1.valid'}, + PktField:new{t='INT16', n='spkhoops2_1.time'}, + PktField:new{t='INT16', n='spkhoops2_1.min'}, + PktField:new{t='INT16', n='spkhoops2_1.max'}, + AField:new{n='spkhoops2_2', d='Defines the hoop used for sorting unit 2 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops2_2.valid'}, + PktField:new{t='INT16', n='spkhoops2_2.time'}, + PktField:new{t='INT16', n='spkhoops2_2.min'}, + PktField:new{t='INT16', n='spkhoops2_2.max'}, + AField:new{n='spkhoops2_3', d='Defines the hoop used for sorting unit 2 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops2_3.valid'}, + PktField:new{t='INT16', n='spkhoops2_3.time'}, + PktField:new{t='INT16', n='spkhoops2_3.min'}, + PktField:new{t='INT16', n='spkhoops2_3.max'}, + AField:new{n='spkhoops2_4', d='Defines the hoop used for sorting unit 2 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops2_4.valid'}, + PktField:new{t='INT16', n='spkhoops2_4.time'}, + PktField:new{t='INT16', n='spkhoops2_4.min'}, + PktField:new{t='INT16', n='spkhoops2_4.max'}, + AField:new{n='spkhoops3_1', d='Defines the hoop used for sorting unit 3 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops3_1.valid'}, + PktField:new{t='INT16', n='spkhoops3_1.time'}, + PktField:new{t='INT16', n='spkhoops3_1.min'}, + PktField:new{t='INT16', n='spkhoops3_1.max'}, + AField:new{n='spkhoops3_2', d='Defines the hoop used for sorting unit 3 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops3_2.valid'}, + PktField:new{t='INT16', n='spkhoops3_2.time'}, + PktField:new{t='INT16', n='spkhoops3_2.min'}, + PktField:new{t='INT16', n='spkhoops3_2.max'}, + AField:new{n='spkhoops3_3', d='Defines the hoop used for sorting unit 3 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops3_3.valid'}, + PktField:new{t='INT16', n='spkhoops3_3.time'}, + PktField:new{t='INT16', n='spkhoops3_3.min'}, + PktField:new{t='INT16', n='spkhoops3_3.max'}, + AField:new{n='spkhoops3_4', d='Defines the hoop used for sorting unit 3 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops3_4.valid'}, + PktField:new{t='INT16', n='spkhoops3_4.time'}, + PktField:new{t='INT16', n='spkhoops3_4.min'}, + PktField:new{t='INT16', n='spkhoops3_4.max'}, + AField:new{n='spkhoops4_1', d='Defines the hoop used for sorting unit 4 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops4_1.valid'}, + PktField:new{t='INT16', n='spkhoops4_1.time'}, + PktField:new{t='INT16', n='spkhoops4_1.min'}, + PktField:new{t='INT16', n='spkhoops4_1.max'}, + AField:new{n='spkhoops4_2', d='Defines the hoop used for sorting unit 4 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops4_2.valid'}, + PktField:new{t='INT16', n='spkhoops4_2.time'}, + PktField:new{t='INT16', n='spkhoops4_2.min'}, + PktField:new{t='INT16', n='spkhoops4_2.max'}, + AField:new{n='spkhoops4_3', d='Defines the hoop used for sorting unit 4 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops4_3.valid'}, + PktField:new{t='INT16', n='spkhoops4_3.time'}, + PktField:new{t='INT16', n='spkhoops4_3.min'}, + PktField:new{t='INT16', n='spkhoops4_3.max'}, + AField:new{n='spkhoops4_4', d='Defines the hoop used for sorting unit 4 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops4_4.valid'}, + PktField:new{t='INT16', n='spkhoops4_4.time'}, + PktField:new{t='INT16', n='spkhoops4_4.min'}, + PktField:new{t='INT16', n='spkhoops4_4.max'}, + AField:new{n='spkhoops5_1', d='Defines the hoop used for sorting unit 5 hoop 1'}, + PktField:new{t='UINT16', n='spkhoops5_1.valid'}, + PktField:new{t='INT16', n='spkhoops5_1.time'}, + PktField:new{t='INT16', n='spkhoops5_1.min'}, + PktField:new{t='INT16', n='spkhoops5_1.max'}, + AField:new{n='spkhoops5_2', d='Defines the hoop used for sorting unit 5 hoop 2'}, + PktField:new{t='UINT16', n='spkhoops5_2.valid'}, + PktField:new{t='INT16', n='spkhoops5_2.time'}, + PktField:new{t='INT16', n='spkhoops5_2.min'}, + PktField:new{t='INT16', n='spkhoops5_2.max'}, + AField:new{n='spkhoops5_3', d='Defines the hoop used for sorting unit 5 hoop 3'}, + PktField:new{t='UINT16', n='spkhoops5_3.valid'}, + PktField:new{t='INT16', n='spkhoops5_3.time'}, + PktField:new{t='INT16', n='spkhoops5_3.min'}, + PktField:new{t='INT16', n='spkhoops5_3.max'}, + AField:new{n='spkhoops5_4', d='Defines the hoop used for sorting unit 5 hoop 4'}, + PktField:new{t='UINT16', n='spkhoops5_4.valid'}, + PktField:new{t='INT16', n='spkhoops5_4.time'}, + PktField:new{t='INT16', n='spkhoops5_4.min'}, + PktField:new{t='INT16', n='spkhoops5_4.max'}, + + -- AField:new{n='placeholder', d='→ Other fields [unitmapping, spkhoops] of this packet have not been implemented yet. ←'}, + + _types={ + [0x0040] = "cbPKTTYPE_CHANREP", + [0x0041] = "cbPKTTYPE_CHANREPLABEL", + [0x0042] = "cbPKTTYPE_CHANREPSCALE", + [0x0043] = "cbPKTTYPE_CHANREPDOUT", + [0x0044] = "cbPKTTYPE_CHANREPDINP", + [0x0045] = "cbPKTTYPE_CHANREPAOUT", + [0x0046] = "cbPKTTYPE_CHANREPDISP", + [0x0047] = "cbPKTTYPE_CHANREPAINP", + [0x0048] = "cbPKTTYPE_CHANREPSMP", + [0x0049] = "cbPKTTYPE_CHANREPSPK", + [0x004A] = "cbPKTTYPE_CHANREPSPKTHR", + [0x004B] = "cbPKTTYPE_CHANREPSPKHPS", + [0x004C] = "cbPKTTYPE_CHANREPUNITOVERRIDES", + [0x004D] = "cbPKTTYPE_CHANREPNTRODEGROUP", + [0x004E] = "cbPKTTYPE_CHANREPREJECTAMPLITUDE", + [0x004F] = "cbPKTTYPE_CHANREPAUTOTHRESHOLD", + [0x00C0] = "cbPKTTYPE_CHANSET", + [0x00C1] = "cbPKTTYPE_CHANSETLABEL", + [0x00C2] = "cbPKTTYPE_CHANSETSCALE", + [0x00C3] = "cbPKTTYPE_CHANSETDOUT", + [0x00C4] = "cbPKTTYPE_CHANSETDINP", + [0x00C5] = "cbPKTTYPE_CHANSETAOUT", + [0x00C6] = "cbPKTTYPE_CHANSETDISP", + [0x00C7] = "cbPKTTYPE_CHANSETAINP", + [0x00C8] = "cbPKTTYPE_CHANSETSMP", + [0x00C9] = "cbPKTTYPE_CHANSETSPK", + [0x00CA] = "cbPKTTYPE_CHANSETSPKTHR", + [0x00CB] = "cbPKTTYPE_CHANSETSPKHPS", + [0x00CC] = "cbPKTTYPE_CHANSETUNITOVERRIDES", + [0x00CD] = "cbPKTTYPE_CHANSETNTRODEGROUP", + [0x00CE] = "cbPKTTYPE_CHANSETREJECTAMPLITUDE", + [0x00CF] = "cbPKTTYPE_CHANSETAUTOTHRESHOLD", + } + } +) + +-- File Config Information Packets +local CbPktFileCfg = CbPktConfig:new('cbPKT_FILECFG', + { + PktField:new{t='UINT32', n='options', d='File Config Option', format='HEX', valuestring={ + [0x00]="Launch File dialog, set file info, start or stop recording cbFILECFG_OPT_NONE", + [0x01]="Keep-alive message cbFILECFG_OPT_KEEPALIVE", + [0x02]="Recording is in progress cbFILECFG_OPT_REC", + [0x03]="Recording stopped cbFILECFG_OPT_STOP", + [0x04]="NeuroMotive recording status cbFILECFG_OPT_NMREC", + [0x05]="Close file application cbFILECFG_OPT_CLOSE", + [0x06]="Recording datetime cbFILECFG_OPT_SYNCH", + [0x07]="Launch File dialog, do not set or do anything cbFILECFG_OPT_OPEN", + }}, + -- FlagField:new{t='BOOLEAN', n='options.keepalive', format=32, mask=0x00000001, d='Keep-alive message cbFILECFG_OPT_KEEPALIVE', valuestring={'yes', 'no'}}, + -- FlagField:new{t='BOOLEAN', n='options.rec', format=32, mask=0x00000002, d='Recording is in progress cbFILECFG_OPT_REC', valuestring={'yes', 'no'}}, + -- FlagField:new{t='BOOLEAN', n='options.stop', format=32, mask=0x00000002, d='Recording is in progress cbFILECFG_OPT_REC', valuestring={'yes', 'no'}}, + PktField:new{t='UINT32', n='duration', format='DEC'}, + PktField:new{t='UINT32', n='recording', d='If cbFILECFG_OPT_NONE this option starts/stops recording remotely', format='HEX'}, + PktField:new{t='UINT32', n='extctrl', d='If cbFILECFG_OPT_REC this is split number (0 for non-TOC). If cbFILECFG_OPT_STOP this is error code.', format='DEC_HEX'}, + PktField:new{t='STRING', n='username', len=256}, + PktField:new{t='STRING', n='filename', len=256}, + PktField:new{t='STRING', n='comment', len=256, d='Comment or Datetime'}, + _types={ + [0x0061] = "File Config response cbPKTTYPE_REPFILECFG", + [0x00E1] = "File Config request cbPKTTYPE_SETFILECFG", + } + } +) + +-- Config All packet +local CbPktConfigAll = CbPktConfig:new('cbPKT_CONFIGALL', + { + _types={ + [0x0008] = "Config All Report cbPKTTYPE_REPCONFIGALL", + [0x0088] = "Config All Request cbPKTTYPE_REQCONFIGALL", + } + } +) + +-- Options for noise boundary packets +local CbPktSSNoiseBoundary = CbPktConfig:new('cbPKT_SS_NOISE_BOUNDARY', + { + PktField:new{t='UINT32', n='chan', d='channel being configured', format='DEC'}, + PktField:new{t='FLOAT', n='afc', len=3, d='Center of ellipsoid'}, + PktField:new{t='FLOAT', n='afS', len=9, d='Ellipsoid axes'}, + _types={ + [0x0054] = "Noise boundary Report cbPKTTYPE_SS_NOISE_BOUNDARYREP", + [0x00D4] = "Noise boundary Request cbPKTTYPE_SS_NOISE_BOUNDARYSET", + } + } +) + +-- SS Statistics packets +local CbPktSSStatistics = CbPktConfig:new('cbPKT_SS_STATISTICS', + { + PktField:new{t='UINT32', n='nUpdateSpikes', d='update rate in spike counts', format='DEC'}, + PktField:new{t='UINT32', n='nAutoalg', d='Sorting Algorithm', format='HEX', valuestring={ + [0x00]="No sorting cbAUTOALG_NONE", + [0x01]="Auto spread cbAUTOALG_SPREAD", + [0x02]="Auto Hist Correlation cbAUTOALG_HIST_CORR_MAJ", + [0x03]="Auto Hist Peak Maj cbAUTOALG_HIST_PEAK_COUNT_MAJ", + [0x04]="Auto Hist Peak Fish cbAUTOALG_HIST_PEAK_COUNT_FISH", + [0x05]="Manual PCA cbAUTOALG_PCA", + [0x06]="Manual Hoops cbAUTOALG_HOOPS", + [0x07]="K-means PCA cbAUTOALG_PCA_KMEANS", + [0x08]="EM-clustering PCA cbAUTOALG_PCA_EM", + [0x09]="DBSCAN PCA cbAUTOALG_PCA_DBSCAN", + }}, + PktField:new{t='UINT32', n='nMode', d='command to change sorting parameters', format='HEX', valuestring={ + [0x00]="Change the settings and leave sorting the same cbAUTOALG_MODE_SETTING", + [0x01]="Change settings and apply this sorting to all channels cbAUTOALG_MODE_APPLY", + }}, + PktField:new{t='FLOAT', n='fMinClusterPairSpreadFactor'}, + PktField:new{t='FLOAT', n='fMaxSubclusterSpreadFactor'}, + + PktField:new{t='FLOAT', n='fMinClusterHistCorrMajMeasure'}, + PktField:new{t='FLOAT', n='fMaxClusterPairHistCorrMajMeasure'}, + + PktField:new{t='FLOAT', n='fClusterHistValleyPercentage'}, + PktField:new{t='FLOAT', n='fClusterHistClosePeakPercentage'}, + PktField:new{t='FLOAT', n='fClusterHistMinPeakPercentage'}, + PktField:new{t='UINT32', n='nWaveBasisSize', d='number of wave to collect to calculate the basis', format='DEC'}, + PktField:new{t='UINT32', n='nWaveSampleSize', d='number of samples sorted with the same basis before re-calculating the basis', format='DEC'}, + _types={ + [0x0055] = "SS Statistics Report cbPKTTYPE_SS_STATISTICSREP", + [0x00D5] = "SS Statistics Request cbPKTTYPE_SS_STATISTICSSET", + } + } +) + +-- SS Status packets +local CbPktSSStatus = CbPktConfig:new('cbPKT_SS_STATUS', + { + AField:new{n='cntlUnitStats'}, + PktField:new{t='UINT32', n='cntlUnitStats.nMode', d='nMode', format='HEX', valuestring={ + [0x00]="do not adapt at all", + [0x01]="always adapt", + [0x02]="adapt if timer not timed out", + }}, + PktField:new{t='FLOAT', n='cntlUnitStats.fTimeOutMinutes', d='how many minutes until time out'}, + PktField:new{t='FLOAT', n='cntlUnitStats.fElapsedMinutes', d='amount of time that has elapsed'}, + AField:new{n='cntlNumUnits'}, + PktField:new{t='UINT32', n='cntlNumUnits.nMode', d='nMode', format='HEX', valuestring={ + [0x00]="do not adapt at all", + [0x01]="always adapt", + [0x02]="adapt if timer not timed out", + }}, + PktField:new{t='FLOAT', n='cntlNumUnits.fTimeOutMinutes', d='how many minutes until time out'}, + PktField:new{t='FLOAT', n='cntlNumUnits.fElapsedMinutes', d='amount of time that has elapsed'}, + _types={ + [0x0057] = "SS Status Report cbPKTTYPE_SS_STATUSREP", + [0x00D7] = "SS Status Request cbPKTTYPE_SS_STATUSSET", + } + } +) + +-- SS Recalc packets +local CbPktSSRecalc = CbPktConfig:new('cbPKT_SS_RECALC', + { + + PktField:new{t='UINT32', n='chan',format='DEC', d="Channel (1-based). If 0, perform for all"}, + PktField:new{t='UINT32', n='mode', d='mode', format='HEX', valuestring={ + [0]="PC ->NSP start recalculation cbPCA_RECALC_START", + [1]="NSP->PC finished recalculation cbPCA_RECALC_STOPPED", + [2]="NSP->PC waveform collection started cbPCA_COLLECTION_STARTED", + [3]="Change the basis of feature space cbBASIS_CHANGE", + [4]="cbUNDO_BASIS_CHANGE", + [5]="cbREDO_BASIS_CHANGE", + [6]="cbINVALIDATE_BASIS", + }}, + _types={ + [0x0059] = "SS Recalc Report cbPKTTYPE_SS_RECALCREP", + [0x00D9] = "SS Recalc Request cbPKTTYPE_SS_RECALCSET", + } + } +) + +-- Feature Space Basis Packets +local CbPktFSBasis = CbPktConfig:new('cbPKT_FS_BASIS', + { + + PktField:new{t='UINT32', n='chan',format='DEC', d="Channel (1-based)"}, + PktField:new{t='UINT32', n='mode', d='mode', format='HEX', valuestring={ + [0]="PC ->NSP start recalculation cbPCA_RECALC_START", + [1]="NSP->PC finished recalculation cbPCA_RECALC_STOPPED", + [2]="NSP->PC waveform collection started cbPCA_COLLECTION_STARTED", + [3]="Change the basis of feature space cbBASIS_CHANGE", + [4]="cbUNDO_BASIS_CHANGE", + [5]="cbREDO_BASIS_CHANGE", + [6]="cbINVALIDATE_BASIS", + }}, + PktField:new{t='UINT32', n='fs',format='DEC', d="Feature space: cbAUTOALG_PCA"}, + PktField:new{t='FLOAT', n='basis', d='Room for all possible points collected'}, + AField:new{n='notImpl', d="→ Variable number of points not imlpemented ←"}, + _types={ + [0x005B] = "FS Basis Report cbPKTTYPE_FS_BASISREP", + [0x00DB] = "FS Basis Request cbPKTTYPE_FS_BASISSET", + } + } +) + + +-- Sample Group Information packets +local CbPktGroupInfo = CbPktConfig:new('cbPKT_GROUPINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='group',format='DEC'}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='period', d='Sampling Period', format='DEC'}, + PktField:new{t='UINT32', n='length', format='DEC'}, + PktField:new{t='UINT32', n='list', lf='length', d='channelList'}, + _types={ + [0x0030] = "Sample Group Report cbPKTTYPE_GROUPREP", + [0x00B0] = "Sample Group Request cbPKTTYPE_GROUPSET", + } + } +) + +-- Processor Information packets +local CbPktProcInfo = CbPktConfig:new('cbPKT_PROCINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='idcode', format='DEC_HEX', d='Manufacturer ID'}, + PktField:new{t='STRING', n='ident', len=cbConst.cbLEN_STR_IDENT}, + PktField:new{t='UINT32', n='chanbase',format='DEC'}, + PktField:new{t='UINT32', n='chancount',format='DEC'}, + PktField:new{t='UINT32', n='bankcount',format='DEC'}, + PktField:new{t='UINT32', n='groupcount',format='DEC'}, + PktField:new{t='UINT32', n='filtcount',format='DEC'}, + PktField:new{t='UINT32', n='sortcount',format='DEC'}, + PktField:new{t='UINT32', n='unitcount',format='DEC'}, + PktField:new{t='UINT32', n='hoopcount',format='DEC'}, + PktField:new{t='UINT32', n='sortmethod',format='DEC', valuestring={[0]='manual', [1]='auto'}}, + PktField:new{t='UINT32', n='version',format='DEC'}, + _types={ + [0x0021] = "Proc Report cbPKTTYPE_PROCREP", + }}) + +-- Bank Information packets +local CbPktBankInfo = CbPktConfig:new('cbPKT_BANKINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='bank',format='DEC'}, + PktField:new{t='UINT32', n='idcode', format='DEC_HEX', d='Manufacturer ID'}, + PktField:new{t='STRING', n='ident', len=cbConst.cbLEN_STR_IDENT}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_LABEL}, + PktField:new{t='UINT32', n='chanbase',format='DEC'}, + PktField:new{t='UINT32', n='chancount',format='DEC'}, + _types={ + [0x0022] = "Bank Report cbPKTTYPE_BANKREP", + } + } +) + +-- Filter (FILT) Information packets +local CbPktFiltInfo = CbPktConfig:new('cbPKT_FILTINFO', + { + PktField:new{t='UINT32', n='proc',format='DEC'}, + PktField:new{t='UINT32', n='filt',format='DEC'}, + PktField:new{t='STRING', n='label', len=cbConst.cbLEN_STR_FILT_LABEL}, + AField:new{n='hp', d='High-pass filter'}, + PktField:new{t='UINT32', n='hp.hpfreq', d='Corner freq in mHz', format='DEC'}, + PktField:new{t='UINT32', n='hp.hporder', d='Filter order', format='DEC'}, + PktField:new{t='UINT32', n='hp.hptype', d='Filter type', format='HEX'}, + FlagField:new{t='BOOLEAN', n='hp.hptype.physical', format=32, mask=0x00000001, d='Physical cbFILTTYPE_PHYSICAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.digital', format=32, mask=0x00000002, d='Digital cbFILTTYPE_DIGITAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.adaptive', format=32, mask=0x00000004, d='Adaptive cbFILTTYPE_ADAPTIVE', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.nonlinear', format=32, mask=0x00000008, d='Nonlinear cbFILTTYPE_NONLINEAR', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.butter', format=32, mask=0x00000100, d='Butterworth cbFILTTYPE_BUTTERWORTH', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.cheb', format=32, mask=0x00000200, d='Chebychev cbFILTTYPE_CHEBYCHEV', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.bessel', format=32, mask=0x00000400, d='Bessel cbFILTTYPE_BESSEL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='hp.hptype.elliptical', format=32, mask=0x00000800, d='Elliptical cbFILTTYPE_ELLIPTICAL', valuestring={'yes','no'}}, + + + AField:new{n='lp', d='Low-pass filter'}, + PktField:new{t='UINT32', n='lp.lpfreq', d='Corner freq in mHz', format='DEC'}, + PktField:new{t='UINT32', n='lp.lporder', d='Filter order', format='DEC'}, + PktField:new{t='UINT32', n='lp.lptype', d='Filter type', format='HEX'}, + FlagField:new{t='BOOLEAN', n='lp.lptype.physical', format=32, mask=0x00000001, d='Physical cbFILTTYPE_PHYSICAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.digital', format=32, mask=0x00000002, d='Digital cbFILTTYPE_DIGITAL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.adaptive', format=32, mask=0x00000004, d='Adaptive cbFILTTYPE_ADAPTIVE', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.nonlinear', format=32, mask=0x00000008, d='Nonlinear cbFILTTYPE_NONLINEAR', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.butter', format=32, mask=0x00000100, d='Butterworth cbFILTTYPE_BUTTERWORTH', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.cheb', format=32, mask=0x00000200, d='Chebychev cbFILTTYPE_CHEBYCHEV', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.bessel', format=32, mask=0x00000400, d='Bessel cbFILTTYPE_BESSEL', valuestring={'yes','no'}}, + FlagField:new{t='BOOLEAN', n='lp.lptype.elliptical', format=32, mask=0x00000800, d='Elliptical cbFILTTYPE_ELLIPTICAL', valuestring={'yes','no'}}, + + + PktField:new{t='DOUBLE', n='sos1a1'}, + PktField:new{t='DOUBLE', n='sos1a2'}, + PktField:new{t='DOUBLE', n='sos1b1'}, + PktField:new{t='DOUBLE', n='sos1b2'}, + PktField:new{t='DOUBLE', n='sos2a1'}, + PktField:new{t='DOUBLE', n='sos2a2'}, + PktField:new{t='DOUBLE', n='sos2b1'}, + PktField:new{t='DOUBLE', n='sos2b2'}, + PktField:new{t='DOUBLE', n='sos1a1'}, + _types={ + [0x0023] = "Filter Report cbPKTTYPE_FILTREP", + [0x00A3] = "Filter Request cbPKTTYPE_FILTSET", + } + } +) + +-- cbPKT_CHANRESET Factory Default settings request packet +local CbPktChanReset = CbPktConfig:new('cbPKT_CHANRESET', + { + AField:new{d="This packet is untested."}, + PktField:new{t='UINT32', n='chan', d="Channel"}, + PktField:new{t='UINT8', n='label', d="Reset label", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='userflags', d="Reset User flags", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='position', d="Reset Reserved", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='scalin', d="Reset Scaling in", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='scalout', d="Reset Scaling out", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='doutopts', d="Reset dOut options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='dinpopts', d="Reset dIn options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='aoutopts', d="Reset aOut options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='eopchar', d="Reset endOfPacket char", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='moninst', d="Reset monitor instrument", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='monchan', d="Reset monitor channel", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='outvalue', d="Reset outValue", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='ainpopts', d="Reset aIn options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='lncrate', d="Reset LNC rate", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpfilter', d="Reset filter id", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpgroup', d="Reset sample group", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpdispmin', d="Reset display min", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='smpdispmax', d="Reset display max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkfilter', d="Reset spk filter", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkdispmax', d="Reset spk disp max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='lncdispmax', d="Reset LNC disp max", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkopts', d="Reset spk options", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkthrlevel', d="Reset spk threshold lvl", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkthrlimit', d="Reset spk threshold limit", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkgroup', d="Reset spkgroup", valuestring={[0]='no', [1]='yes'}}, + PktField:new{t='UINT8', n='spkhoops', d="Reset spkhoops", valuestring={[0]='no', [1]='yes'}}, + _types={ + [0x0024] = "Factory Default settings Report cbPKTTYPE_CHANRESETREP", + [0x00A4] = "Factory Default settings Request cbPKTTYPE_CHANRESET", + } + } +) + + +-- cbPKT_ADAPTFILTINFO +local CbPktAdaptFiltInfo = CbPktConfig:new('cbPKT_ADAPTFILTINFO', + { + PktField:new{t='UINT32', n='chan', d="Chan (Ignored)"}, + PktField:new{t='UINT32', n='nMode', valuestring= + { + [0]="disabled", + [1]="filter continuous & spikes", + [2]="filter spikes", + } + }, + + PktField:new{t='FLOAT', n='dLearningRate'}, + PktField:new{t='UINT32', n='refChan1', d="Reference Channel 1"}, + PktField:new{t='UINT32', n='refChan2', d="Reference Channel 2"}, + _types={ + [0x0025] = "Adaptive filtering Report cbPKTTYPE_ADAPTFILTREP", + [0x00A5] = "Adaptive filtering Request cbPKTTYPE_ADAPTFILTSET", + } + } +) + +-- cbPKT_REFELECFILTINFO +local CbPktRefElecFiltInfo = CbPktConfig:new('cbPKT_REFELECFILTINFO', + { + PktField:new{t='UINT32', n='chan', d="Chan (Ignored)"}, + PktField:new{t='UINT32', n='nMode', valuestring= + { + [0]="disabled", + [1]="filter continuous & spikes", + [2]="filter spikes", + } + }, + PktField:new{t='UINT32', n='refChan', d="Reference Channel"}, + _types={ + [0x0026] = "Reference Electrode filtering Report cbPKTTYPE_REFELECFILTREP", + [0x00A6] = "Reference Electrode filtering Request cbPKTTYPE_REFELECFILTSET", + } + } +) + +-- cbPKT_LNC +local CbPktLNC = CbPktConfig:new('cbPKT_LNC', + { + PktField:new{t='UINT32', n='lncFreq', d="Nominal line noise frequency to be canceled (in Hz)"}, + PktField:new{t='UINT32', n='lncRefChan', d="Reference channel for lnc synch (1-based)"}, + PktField:new{t='UINT32', n='lncGlobalMode', d="reserved"}, + _types={ + [0x0028] = "Line Noise Cancellation Report cbPKTTYPE_LNCREP", + [0x00A8] = "Line Noise Cancellation Request cbPKTTYPE_LNCSET", + } + } +) + + +-- cbPKT_NM +local CbPktNM = CbPktConfig:new('cbPKT_NM', + { + PktField:new{t='UINT32', n='mode', valuestring= + { + [0]="cbNM_MODE_NONE", + [1]="cbNM_MODE_CONFIG Ask NeuroMotive for configuration", + [2]="cbNM_MODE_SETVIDEOSOURCE Configure video source", + [3]="cbNM_MODE_SETTRACKABLE Configure trackable", + [4]="cbNM_MODE_STATUS NeuroMotive status reporting (cbNM_STATUS_*)", + [5]="cbNM_MODE_TSCOUNT Timestamp count (value is the period with 0 to disable this mode)", + [6]="cbNM_MODE_SYNCHCLOCK Start (or stop) synchronization clock (fps*1000 specified by value, zero fps to stop capture)", + [7]="cbNM_MODE_ASYNCHCLOCK Asynchronous clock", + } + }, + PktField:new{t='UINT32', n='flags', d="status of NeuroMotive"}, + PktField:new{t='UINT32', n='value'}, + PktField:new{t='UINT32', n='opt', len=cbConst.cbLEN_STR_LABEL/4}, + _types={ + [0x0032] = "NeuroMotive Report cbPKTTYPE_NMREP", + [0x00B2] = "NeuroMotive Request cbPKTTYPE_NMSET", + } + } +) + +-- cbPKT_VIDEOSYNCH +local CbPktVideosynch = CbPktConfig:new('cbPKT_VIDEOSYNCH', + { + PktField:new{t='UINT16', n='split', d="file split number"}, + PktField:new{t='UINT32', n='frame'}, + PktField:new{t='UINT32', n='etime', d="elapsed time"}, + PktField:new{t='UINT16', n='id', d="video source id"}, + _types={ + [0x0029] = "VideoSynch Report cbPKTTYPE_VIDEOSYNCHREP", + [0x00A9] = "VideoSynch Request cbPKTTYPE_VIDEOSYNCHSET", + } + } +) + +-- cbPKT_VIDEOTRACK +local CbPktVideoTrack = CbPktConfig:new('cbPKT_VIDEOTRACK', + { + PktField:new{t='UINT16', n='parentID'}, + PktField:new{t='UINT16', n='nodeID'}, + PktField:new{t='UINT16', n='nodeCount'}, + PktField:new{t='UINT16', n='pointCount'}, + _types={ + [0x005F] = "VideoTrack Report cbPKTTYPE_VIDEOTRACKREP", + [0x00DF] = "VideoTrack Request cbPKTTYPE_VIDEOTRACKSET", + } + } +) + +-- cbPKT_NPLAY +local CbPktNPlay = CbPktConfig:new('cbPKT_NPLAY', + { + PktField:new{t='UINT64', n='ftime', d='ftime'}, + PktField:new{t='UINT64', n='stime', d='stime'}, + PktField:new{t='UINT64', n='etime', d='etime'}, + PktField:new{t='UINT64', n='val', d='val'}, + PktField:new{t='UINT16', n='mode', valuestring= + { + [0]="cbNPLAY_MODE_NONE", + [1]="cbNPLAY_MODE_PAUSE pause if val is non-zero, un-pause otherwise", + [2]="cbNPLAY_MODE_SEEK seek to time val", + [3]="cbNPLAY_MODE_CONFIG request full config", + [4]="cbNPLAY_MODE_OPEN open new file in val for playback", + [5]="cbNPLAY_MODE_PATH use the directory path in fname", + [6]="cbNPLAY_MODE_CONFIGMAIN request main config packet", + [7]="cbNPLAY_MODE_STEP run val procTime steps and pause, then send cbNPLAY_FLAG_STEPPED", + [8]="cbNPLAY_MODE_SINGLE single mode if val is non-zero, wrap otherwise", + [9]="cbNPLAY_MODE_RESET reset nPlay", + [10]="cbNPLAY_MODE_NEVRESORT resort NEV if val is non-zero, do not if otherwise", + [11]="cbNPLAY_MODE_AUDIO_CMD perform audio command in val (cbAUDIO_CMD_*), with option opt", + } + }, + PktField:new{t='UINT16', n='flag', valuestring= + { + [0]="cbNPLAY_FLAG_NONE no flag", + [1]="cbNPLAY_FLAG_CONF config packet (val is fname file index)", + [3]="cbNPLAY_FLAG_MAIN main config packet (val is file version)", + [2]="cbNPLAY_FLAG_DONE step command done", + } + }, + PktField:new{t='FLOAT', n='speed'}, + PktField:new{t='STRING', n='fname', len=256}, + _types={ + [0x005C] = "NPlay Report cbPKTTYPE_NPLAYREP", + [0x00DC] = "NPlay Request cbPKTTYPE_NPLAYSET", + } + } +) + +-- cbPKT_AOUT_WAVEFORM Analog output packets +local CbPktAoutWaveform = CbPktConfig:new('cbPKT_AOUT_WAVEFORM', + { + PktField:new{t='UINT16', n='chan', d="Which analog output/audio output channel (1-based)"}, + + PktField:new{t='UINT16', n='mode', valuestring= + { + [0]="cbWAVEFORM_MODE_NONE Disabled", + [1]="cbWAVEFORM_MODE_PARAMETERS repeated sequence", + [2]="cbWAVEFORM_MODE_SINE sinusoid", + } + }, + PktField:new{t='UINT32', n='repeats'}, + PktField:new{t='UINT8', n='trig', valuestring= + { + [0]="cbWAVEFORM_TRIGGER_NONE instant software trigger", + [1]="cbWAVEFORM_TRIGGER_DINPREG digital input rising edge trigger", + [2]="cbWAVEFORM_TRIGGER_DINPFEG digital input falling edge trigger", + [3]="cbWAVEFORM_TRIGGER_SPIKEUNIT spike unit", + [4]="cbWAVEFORM_TRIGGER_COMMENTCOLOR comment RGBA color (A being big byte)", + [5]="cbWAVEFORM_TRIGGER_SOFTRESET soft-reset trigger", + [6]="cbWAVEFORM_TRIGGER_EXTENSION extension trigger", + } + }, + PktField:new{t='UINT8', n='trigInst', d="Instrument the trigChan belongs"}, + PktField:new{t='UINT16', n='trigChan'}, + PktField:new{t='UINT16', n='trigValue'}, + PktField:new{t='UINT8', n='trigNum'}, + PktField:new{t='UINT8', n='active'}, + + AField:new{n='waveform'}, + PktField:new{t='INT16', n='waveform.offset'}, + PktField:new{t='UINT16', n='waveform.seq'}, + PktField:new{t='UINT16', n='waveform.seqTotal'}, + PktField:new{t='UINT16', n='waveform.phases'}, + PktField:new{t='UINT16', n='waveform.duration', lf='waveform.phases'}, + PktField:new{t='INT16', n='waveform.amplitude', lf='waveform.phases'}, + _types={ + [0x0033] = "Analog Out Waveform Report cbPKTTYPE_WAVEFORMREP", + [0x00B3] = "Analog Out Waveform Request cbPKTTYPE_WAVEFORMSET", + } + } +) + + +-- cbPKT_SS_DETECT +local CbPktSSDetect = CbPktConfig:new('cbPKT_SS_DETECT', + { + PktField:new{t='FLOAT', n='fThreshold'}, + PktField:new{t='FLOAT', n='fMultiplier'}, + _types={ + [0x0052] = "SS Detect Report cbPKTTYPE_SS_DETECTREP", + [0x00D2] = "SS Detect Request cbPKTTYPE_SS_DETECTSET", + } + } +) + +-- cbPKT_SS_ARTIF_REJECT +local CbPktSSArtifReject = CbPktConfig:new('cbPKT_SS_ARTIF_REJECT', + { + PktField:new{t='UINT32', n='nMaxSimulChans', d="How many channels can fire exactly at the same time?"}, + PktField:new{t='UINT32', n='nRefractoryCount', d="For how many samples (30 kHz) is a neuron refractory, so can't re-trigger"}, + _types={ + [0x0053] = "Artifact Rejection Report cbPKTTYPE_SS_ARTIF_REJECTREP", + [0x00D3] = "Artifact Rejection Request cbPKTTYPE_SS_ARTIF_REJECTSET", + } + } +) + +-- DOut set packets +local CbPktDOut = CbPktConfig:new('cbPKT_SET_DOUT', + { + PktField:new{t='INT16', n='chan', format='DEC'}, + PktField:new{t='INT16', n='value'}, + _types={ + [0x005D] = "Set Dout Report cbPKTTYPE_SET_DOUTREP", + [0x00DD] = "Set Dout Request cbPKTTYPE_SET_DOUTSET", + } + } +) + +-- Preview streams +-- Configuration +local CbPktPrevStreamCfg = CbPktPrevStreamBase:new('prevStreamCfg', + { + _types={ + [0x0003] = "Cfg Prev Stream Response cbPKTTYPE_PREVREP", + [0x0084] = "Cfg Prev Stream Request cbPKTTYPE_PREVSETLNC", + [0x0082] = "Cfg Prev Stream Request cbPKTTYPE_PREVSETSTREAM", + [0x0083] = "Cfg Prev Stream Request cbPKTTYPE_PREVSET", + } + } +) + +-- Line Noise Cancellation waveform preview +local CbPktLNCPrev = CbPktPrevStreamBase:new('cbPKT_LNCPREV', + { + PktField:new{t='UINT32', n='freq', format='DEC', d='Estimated line noise frequency in mHz'}, + PktField:new{t='INT16', n='wave', len=300}, + _types={ + [0x0001] = "LNC Prev Stream cbPKTTYPE_PREVREPLNC", + } + } +) + +-- Comment Packets +local CbPktComment = CbPktConfig:new('cbPKT_COMMENT', + { + PktField:new{t='UINT8', n='charset', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT8', n='reserved', format='HEX'}, + PktField:new{t='UINT64', n='time', d='Comment Start Time', format='HEX'}, + PktField:new{t='UINT32', n='rgba', format='HEX'}, + PktField:new{t='STRING', n='comment', d='First 8 chars of comment', len=8}, + _types={ + [0x0031] = "Comment response cbPKTTYPE_COMMENTREP", + [0x00B1] = "Comment request cbPKTTYPE_COMMENTSET", + } + } +) + +-- LOG Packets +local CbPktLog = CbPktConfig:new('cbPKT_LOG', + { + PktField:new{t='UINT16', n='mode', d='Log Mode', format='HEX', valuestring={ + [0x00]="Normal log cbLOG_MODE_NONE", + [0x01]="Critical log cbLOG_MODE_CRITICAL", + [0x02]="RPC log cbLOG_MODE_RPC", + [0x03]="RPC log cbLOG_MODE_PLUGINFO", + [0x04]="RPC log cbLOG_MODE_RPC_RES", + [0x05]="RPC log cbLOG_MODE_PLUGINERR", + [0x06]="RPC log cbLOG_MODE_RPC_END", + [0x07]="RPC log cbLOG_MODE_RPC_KILL", + [0x08]="RPC log cbLOG_MODE_RPC_INPUT", + [0x09]="RPC log cbLOG_MODE_UPLOAD_RES", + [0x0A]="RPC log cbLOG_MODE_ENDPLUGIN", + [0x0B]="RPC log cbLOG_MODE_REBOOT", + }}, + PktField:new{t='STRING', n='name', len=16}, + PktField:new{t='STRING', n='desc', len=130}, + _types={ + [0x0063] = "LOG response cbPKTTYPE_LOGREP", + [0x00E3] = "LOG request cbPKTTYPE_LOGSET", + } + } +) + + +-- Preview Stream +local CbPktStreamPrev = CbPktPrevStreamBase:new('cbPKT_STREAMPREV', + { + PktField:new{t='INT16', n='rawmin', format='DEC'}, + PktField:new{t='INT16', n='rawmax'}, + PktField:new{t='INT16', n='smpmin'}, + PktField:new{t='INT16', n='smpmax'}, + PktField:new{t='INT16', n='spkmin'}, + PktField:new{t='INT16', n='spkmax'}, + PktField:new{t='UINT32', n='spkmos'}, + PktField:new{t='UINT32', n='eventflag'}, + PktField:new{t='INT16', n='envmin'}, + PktField:new{t='INT16', n='envmax'}, + PktField:new{t='INT32', n='spkthrlevel'}, + PktField:new{t='UINT32', n='nWaveNum'}, + PktField:new{t='UINT32', n='nSampleRows'}, + PktField:new{t='UINT32', n='nFlags'}, + _types= { + [0x0002] = "Prev Stream cbPKTTYPE_PREVREPSTREAM", + } + } +) + +-- Data packets (chid < 0x8000) +-- Sample Group packets +local CbPktGroup = CbPkt:new('cbPKT_GROUP', + { + PktField:new{t='INT16', n='data', lf='dlen', lfactor=2}, + } +) +CbPktGroup.fields['type'].d='Sample Group ID (1-127)' +CbPktGroup.fields['type'].format='DEC' + +function CbPktGroup:makeInfoString() + return self.name .. "(" .. self.dfields['type']()() .. ")" +end + +-- Spike packets +local CbPktNev = CbPkt:new('nevPKT_SPK', + { + PktField:new{t='INT16', n='data', lf='dlen', lfactor=2}, + } +) +CbPktNev.fields['type'].d='Packet Type' +CbPktNev.fields['type'].format='DEC' + +-- DigIn packets +local CbPktNevDigIn = CbPkt:new('nevPKT_DIGIN', + { + PktField:new{t='UINT32', n='data', lf='dlen', format='HEX_DEC'}, + } +) +CbPktNevDigIn.fields['type'].d='Packet Type' +CbPktNevDigIn.fields['type'].format='DEC' + +-- Packet definitions end here. + + +-- Now we define something that will make our protocol + +local ProtoMaker = klass:new{ + name='Cerebus', + desc="Cerebus NSP Communication", + colname="Cerebus", + ports={51001, 51002, 51003, 51004} +} +function ProtoMaker:new(o) + o = o or {} + local newobj = klass.new(self) + for k,v in pairs(o) do newobj[k] = v end + newobj.proto = Proto(newobj.name, newobj.desc) + newobj.pfields = newobj.proto.fields + newobj.fByPkt = {} + return newobj +end +function ProtoMaker:register() +-- info("register proto ...") + + for _,p in pairs(CbPkt.pkttypes) do + self:makeFieldsForPacket(p) + end + + local fe_interface_id_f = Field.new("frame.interface_id") + + function self.proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = self.colname + local buflen = buffer:len() + local offset = 0 + local header_len = 16 + local buf_remain = buffer():tvb() + local i = 0 + while buflen >= header_len do + local chid = buf_remain(8,2):le_uint() + local ptype = buf_remain(10,2):le_uint() + local packet = CbPkt:match(chid, ptype) + -- get current + local packet_len = buf_remain(12,2):le_uint() * 4 + header_len + + + local subtree = tree:add(self.proto, buf_remain(0, packet_len), "Cerebus Protocol Data (" .. packet.name .. ")(" .. packet_len ..")" ) + + self:addSubtreeForPkt(buf_remain(0, packet_len):tvb(), subtree, packet) + buflen = buflen - packet_len + buf_remain = buf_remain(packet_len):tvb() + if i == 0 then + pinfo.cols.info = packet:makeInfoString() + end + + i = i + 1 + end + if i > 1 then + pinfo.cols.info:append(" (+ " .. (i-1) .. " other" .. (i>2 and 's' or '') .. ")") + end + + local f_interface_id = fe_interface_id_f() + pinfo.cols.info:prepend("NSP:" .. tostring(f_interface_id) .. " ") + + end + local udp_table = DissectorTable.get("udp.port") + -- register our protocol to handle udp ports + for _, p in ipairs(self.ports) do + udp_table:add(p, self.proto) + end +end +function ProtoMaker:makeFieldsForPacket(pkt) + local n = self.name .. "." .. pkt.name .. "." + local fn = pkt.name .. "_" + self.fByPkt[pkt] = {} + for i, f in ipairs(pkt.fields) do + local thisfn = fn .. f.n + local thisn = n .. f.n + local pf + + if f.ftype~='afield' and f.ftype~='flagfield' then + pf = ProtoField.new(f.d and f.d or f.n, thisn, ftypes[f.t], f.valuestring, base[f.format], f.mask, f.d) + elseif f.ftype=='flagfield' then + pf = ProtoField.new(f.d and f.d or f.n, thisn, ftypes[f.t], f.valuestring, f.format, f.mask, f.d) + end + if pf~=nil then + self.pfields[thisfn] = pf + self.fByPkt[pkt][f.n] = pf + + local df = Field.new(thisn) + table.insert(pkt.dfields, df) + pkt.dfields[f.n] = df + end + end +end + +function ProtoMaker:addSubtreeForPkt(buffer, tree, pkt) + local tree_stack = Stack:Create({t=tree, p="", br=buffer()}) + + for i, bPos, width, pf, mult in pkt:iterate(buffer:len()) do + local current_parent_tree = nil + local current_parent_br = nil + repeat + local last_tree = tree_stack:last() + local i,j = string.find(pf.n, last_tree.p) + if i==1 and j > 0 and string.sub(pf.n, j+1, j+1)=='.' then + current_parent_tree = last_tree.t + current_parent_br = last_tree.br + -- tree_stack:push(last_tree) + elseif i==1 and j==0 then + current_parent_tree = last_tree.t + current_parent_br = last_tree.br + else + tree_stack:pop() + end + until current_parent_tree ~= nil + local subtree + local tvb_rng_wh + if pf.ftype == 'afield' then + subtree = current_parent_tree:add(pf.d ~= nil and pf.d or pf.n ) + elseif pf.ftype == 'flagfield' then + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], current_parent_br) + else + if mult > 0 then + tvb_rng_wh = buffer(bPos, width * mult) + local brng = buffer(bPos, width) + local this_rangeGetter = pf:rangeGetter() + if this_rangeGetter ~= nil then + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], tvb_rng_wh, brng[pf:rangeGetter()](brng) ) + else + subtree = current_parent_tree:add_le(self.fByPkt[pkt][pf.n], tvb_rng_wh) + end + if mult > 1 then + local n = mult - 1 + subtree:append_text(" and "..n.." more item"..(n>1 and "s" or "")) + for i=0,n do + brng = buffer(bPos + width * i, width) + subtree:add( brng, 'item '..i..': ' .. brng[pf:rangeGetter()](brng)) + end + end + end + end + tree_stack:push({t=subtree, p=pf.n, f=pf, br=tvb_rng_wh}) + + end +end + +-- instantiate Protocol maker +local pm = ProtoMaker:new() +pm:register() diff --git a/dissectors/cfs-sbn/LICENSE b/dissectors/cfs-sbn/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dissectors/cfs-sbn/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/cfs-sbn/README.md b/dissectors/cfs-sbn/README.md new file mode 100644 index 0000000..cf393fb --- /dev/null +++ b/dissectors/cfs-sbn/README.md @@ -0,0 +1,69 @@ +# cFS SBN — Software Bus Network de la NASA + +Dissecteur Wireshark Lua des messages SBN (Software Bus Network), une +application du Core Flight System (cFS) de la NASA. Elle relie le bus +logiciel cFE de plusieurs processeurs ou instances cFS. Le dissecteur +lit l'en-tête (taille, type `NOMSG`, `SUB`, `UNSUB`, `APP`, `PROTO`, +identifiant de processeur) et les abonnements (version, nombre, +identifiants de message). La charge `APP` (paquet CCSDS) est passée +au dissecteur générique `data` (issue #525). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/nasa/SBN (`wireshark-sbn.lua`, à la racine) | +| Commit importé | `9cb933fc92e4caebb618f2c83b251b7cf07a9920` du 30/10/2026 (dernier commit de la branche par défaut `dev`) ; dernière modification du fichier : commit `9c32aea5283602c10a8288c21db0897824b8a8c0` du 07/01/2020 (Chris Knight) | +| Licence amont | Apache-2.0 : `LICENSE` du dépôt (aucun fichier `NOTICE`). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non pour SBN (le dissecteur natif `ccsds` décode les paquets CCSDS, mais pas l'enveloppe SBN) | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/wireshark-sbn.lua` | Protocole `cfs_sbn` (« Core Flight Software - Software Bus Networking ») sur UDP et TCP 2234 (lignes 14, 15, 92 et 93) ; champs `cfs_sbn.MsgSz`, `cfs_sbn.MsgType`, `cfs_sbn.CPUID`, `cfs_sbn.sub.Version`, `cfs_sbn.sub.Cnt`, `cfs_sbn.sub.MID` | + +## Utilisation + +Copier `src/wireshark-sbn.lua` dans le dossier des plugins Lua personnels +de Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis +Ctrl+Maj+L. Filtre : `cfs_sbn`. Autre port : modifier les lignes 14 et +15 ou `Decode As…`. + +## Vérification à l'import + +tshark 4.6.4 : le fichier se charge sans erreur (`luac5.4 -p` : OK). +Captures UDP synthétiques, construites d'après le code SBN de la même +époque que le script (commit `9c32aea`, `fsw/src/sbn_app.c`, +`SBN_PackMsg` : taille u16, type u8, processeur u32, gros-boutiste ; +`fsw/src/sbn_subs.c` : identité de 48 octets, nombre u16, puis par +abonnement MsgID u16 et QoS de 2 octets). Format actuel d'après +`dev` (`fsw/src/sbn_app.c`, lignes 102 à 105). + +| Essai | Résultat | +|---|---| +| `SUB` (format 2020), 2 abonnements `0x0880` et `0x0881` | `MsgSz: 58`, `MsgType: SUB (1)`, `CPUID: 1`, `Version` lue ; **abonnements faux** : `0x0880`, puis `0x0000` (octets QoS) | +| `APP` (format 2020) avec un paquet CCSDS de 12 octets | en-tête exact ; charge affichée en `Data (12 bytes)` | +| `PROTO` sans charge | `MsgType: PROTO (4)`, `CPUID: 2` | +| `APP` au **format actuel** (taille u32, type, processeur, vaisseau u32) | décodage faux : `MsgSz: 0`, `MsgType: NOMSG (0)`, `CPUID: 201523200` | +| `SUB` tronqué à 30 octets | **erreur Lua** ligne 71 (`Range is out of bounds`) | + +## Limites constatées + +- **Format périmé** : depuis, SBN code la taille sur 32 bits et ajoute + l'identifiant du vaisseau (en-tête de 13 octets au lieu de 7), et les + MsgID sur 32 bits. Le trafic d'un SBN récent est mal décodé. +- Les 2 octets de QoS de chaque abonnement ne sont pas sautés (ligne + 81) : seul le premier identifiant est juste. +- `CPUID` lu à la position fixe 3 (ligne 67) ; champ `proto_sbn_sub` + inexistant dans la liste des champs (ligne 47). +- Charge `APP` passée à `data` (ligne 87) plutôt qu'au dissecteur natif + `ccsds` ; TCP sans réassemblage ni découpage de plusieurs messages + par segment ; aucune vérification de longueur (erreur Lua sur paquet + tronqué). +- Pas de capture réelle disponible. diff --git a/dissectors/cfs-sbn/src/wireshark-sbn.lua b/dissectors/cfs-sbn/src/wireshark-sbn.lua new file mode 100644 index 0000000..cacb23d --- /dev/null +++ b/dissectors/cfs-sbn/src/wireshark-sbn.lua @@ -0,0 +1,93 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/nasa/SBN (wireshark-sbn.lua), +-- commit 9cb933fc92e4caebb618f2c83b251b7cf07a9920 du 30/10/2026 (dernière modification du fichier : +-- commit 9c32aea5283602c10a8288c21db0897824b8a8c0 du 07/01/2020). +-- Licence amont : Apache-2.0, LICENSE du dépôt — voir README.md et LICENSE. +-- LUA code for a Wireshark protocol dissector for SBN messages. +-- TODO: would be nice to auto-decode CCSDS payloads in "app" messages. +-- +-- For install instructions, see: +-- https://www.wireshark.org/docs/wsdg_html_chunked/wsluarm.html + +-- change below or use "Decode As..." to decode SBN messages. + +local sbn_port_udp = 2234 +local sbn_port_tcp = 2234 + +local proto_sbn = Proto("cfs_sbn", "Core Flight Software - Software Bus Networking") + +local proto_sbn_types = { + [0] = "NOMSG", + [1] = "SUB", + [2] = "UNSUB", + [3] = "APP", + [4] = "PROTO" +} + +local proto_sbn_msgsz = ProtoField.uint16("cfs_sbn.MsgSz", "MsgSz", base.DEC) + +local proto_sbn_type = + ProtoField.uint8("cfs_sbn.MsgType", "MsgType", base.DEC, proto_sbn_types) + +local proto_sbn_cpuid = ProtoField.uint32("cfs_sbn.CPUID", "CPUID", base.DEC) + +local proto_sbn_version = + ProtoField.string("cfs_sbn.sub.Version", "Version", base.ASCII) + +local proto_sbn_sub_cnt = + ProtoField.uint16("cfs_sbn.sub.Cnt", "Sub Count", base.DEC) + +local proto_sbn_sub_mid = + ProtoField.uint16("cfs_sbn.sub.MID", "Subscription", base.HEX) + +proto_sbn.fields = { + proto_sbn_msgsz, + proto_sbn_type, + proto_sbn_cpuid, + proto_sbn_sub, + proto_sbn_version, + proto_sbn_sub_cnt, + proto_sbn_sub_mid +} + +function proto_sbn.dissector(buffer, pinfo, tree) + if buffer:len() == 0 then return end + pinfo.cols.protocol = proto_sbn.name + + local subtree = tree:add(proto_sbn, buffer(), "SBN Data") + local offset = 0 + + subtree:add(proto_sbn_msgsz, buffer(offset, 2)) + offset = offset + 2 + + subtree:add(proto_sbn_type, buffer(offset, 1)) + local msgtype = buffer(offset, 1):uint() + offset = offset + 1 + + subtree:add(proto_sbn_cpuid, buffer(3, 4)) + offset = offset + 4 + + if msgtype == 1 then -- sub + subtree:add(proto_sbn_version, buffer(offset, 48)) + offset = offset + 48 + end + + if msgtype == 1 or msgtype == 2 then -- sub/unsub + subtree:add(proto_sbn_sub_cnt, buffer(offset, 2)) + local sub_cnt = buffer(offset, 2):uint() + offset = offset + 2 + + for i = 0, sub_cnt - 1, 1 do + subtree:add(proto_sbn_sub_mid, buffer(offset, 2)) + offset = offset + 2 + end + end + + if msgtype == 3 then + local ccsds = Dissector.get("data") + ccsds:call(buffer(offset):tvb(), pinfo, subtree) + end +end + +DissectorTable.get("udp.port"):add(sbn_port_udp, proto_sbn) +DissectorTable.get("tcp.port"):add(sbn_port_tcp, proto_sbn) diff --git a/dissectors/chatstutis/LICENSE b/dissectors/chatstutis/LICENSE new file mode 100644 index 0000000..0ad25db --- /dev/null +++ b/dissectors/chatstutis/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + 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 +them 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/dissectors/chatstutis/README.md b/dissectors/chatstutis/README.md new file mode 100644 index 0000000..838dc1a --- /dev/null +++ b/dissectors/chatstutis/README.md @@ -0,0 +1,51 @@ +# Chatstutis — messagerie pair-à-pair sur réseau local + +Dissecteur Wireshark Lua du protocole de **Chatstutis**, petite messagerie +en mode texte (TUI, C) pair-à-pair sur réseau local, version 1 : + +- découverte des pairs par diffusion UDP (port 45678) : version, type + (Discover / Disconnect), nom d'utilisateur (32 octets) ; +- messages de discussion sur TCP (port 56789) : version, type + (Chat / Close Connection), expéditeur (32 octets), message (1024 octets). + +Le type de paquet est déterminé par sa longueur (34 octets = découverte, +1058 octets = discussion). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/codestutis/chatstutis (fichier `v1/utils/chatstutis.lua`) | +| Commit importé | `aa41df624fb0e23dd1eed9c886e9d633ccefed22` du 13/10/2026 (branche `main`, dernier commit ; dernière modification de `chatstutis.lua` : `5bf16c6` du 11/07/2026) | +| Licence amont | AGPL-3.0-only (fichier `LICENSE` / `v1/LICENSE` AGPL v3, identiques, copié ici sous le nom `LICENSE` ; aucune mention « or later » dans le dépôt, d'où `-only`) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Chatstutis natif | + +La GPLv3 du dépôt permet la combinaison avec du code AGPLv3 (article 13) ; +précédents : `dissectors/aerospike/`, `dissectors/space-coap/`. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `chatstutis.lua` | Protocole `chatstutis` sur UDP 45678 et TCP 56789 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le programme C n'est pas importé. + +## Utilisation + +Copier `chatstutis.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `chatstutis`. + +## Remarques + +- Correspond à l'implémentation C de la **v1** (`v1/src/peer_discovery.h` : + paquet de découverte de 34 octets sans port). Le `v1/spec.md` amont + décrit un champ `listening_port` (36 octets) que le script ne décode + pas (le champ est déclaré mais non enregistré dans `fields`). +- La version actuelle du programme (`src/packets.h`, racine du dépôt) + utilise un autre format (octet `info` version/type sur 4 bits, longueurs + variables) : **non pris en charge** par ce dissecteur. +- Pas de réassemblage TCP : un message de 1058 octets segmenté ne sera + pas reconnu. Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/chatstutis/chatstutis.lua b/dissectors/chatstutis/chatstutis.lua new file mode 100644 index 0000000..24adf28 --- /dev/null +++ b/dissectors/chatstutis/chatstutis.lua @@ -0,0 +1,81 @@ +-- SPDX-License-Identifier: AGPL-3.0-only +-- Importé de https://github.com/codestutis/chatstutis (v1/utils/chatstutis.lua), +-- commit aa41df624fb0e23dd1eed9c886e9d633ccefed22 du 13/10/2026. +-- Licence amont : AGPL-3.0-only (v1/LICENSE amont) — voir README.md. +-- Wireshark dissector for the Chatstutis protocol +-- UDP default port 45678 : peer discovery +-- TCP default port 56789 : chat packets +-- Install: copy into your Wireshark plugins directory, then Analyze -> Reload Lua Plugins +-- Linux/MacOS : ~/.local/lib/wireshark/plugins + +local chatstutis = Proto("Chatstutis", "Chatstutis Protocol") + +-- shared fields +local version = ProtoField.uint8("chatstutis.version", "Version", base.DEC) +local msg_type = ProtoField.uint8("chatstutis.message_type", "Message Type", base.DEC) + +-- only in discovery packets +local listening_port = ProtoField.uint16("chatstutis.listening_port", "Listening Port", base.DEC) +local username = ProtoField.string("chatstutis.username", "Username") + +local message = ProtoField.string("chatstutis.message", "Message") -- only in chat packets + +local DISCOVERY_TYPES = { [0] = "Discover", [1] = "Disconnect" } +local CHAT_TYPES = { [0] = "Chat", [1] = "Close Connection" } + +local DISCOVERY_LEN = 34 +local CHAT_LEN = 1058 + +chatstutis.fields = { version, msg_type, username, message } + + +local function parse_common_fields(buffer, subtree) + subtree:add(version, buffer(0, 1)) + local msg_type_item = subtree:add(msg_type, buffer(1, 1)) + local msg_type_val = buffer(1, 1):uint() + return msg_type_item, msg_type_val +end + +function chatstutis.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = "Chatstutis" + + -- determine packet type + local is_udp = (length == DISCOVERY_LEN) + local is_tcp = (length == CHAT_LEN) + + if is_udp then + pinfo.cols.info:set("Peer Discovery") + local subtree = tree:add(chatstutis, buffer(), "Chatstutis Peer Discovery Packet") + local type_item, type_val = parse_common_fields(buffer, subtree) + subtree:add(username, buffer(2, 32)) + + local type_name = DISCOVERY_TYPES[type_val] or + string.format("Unknown (0x%02x)", type_val) + type_item:append_text(" (" .. type_name .. ")") + pinfo.cols.info:set("Peer Discovery [" .. type_name .. "]") + elseif is_tcp then + pinfo.cols.info:set("Chat") + local subtree = tree:add(chatstutis, buffer(), "Chatstutis Chat Packet"); + local type_item, type_val = parse_common_fields(buffer, subtree); + subtree:add(username, buffer(2, 32)) + subtree:add(message, buffer(34, 1024)); + + local type_name = CHAT_TYPES[type_val] or + string.format("Unknown (0x%02x)", type_val) + type_item:append_text(" (" .. type_name .. ")") + pinfo.cols.info:set("Chat Packet [" .. type_name .. "]") + else + -- unknown packet + local subtree = tree:add(chatstutis, buffer(), "Chatstutis Packet (unrecognized length: " .. length .. ")") + pinfo.cols.info:set("Chatstutis (unknown)") + end +end + +local udp_table = DissectorTable.get("udp.port") +udp_table:add(45678, chatstutis) + +local tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(56789, chatstutis) \ No newline at end of file diff --git a/dissectors/chcnav-yangxin0/LICENSE b/dissectors/chcnav-yangxin0/LICENSE new file mode 100644 index 0000000..edb5d6b --- /dev/null +++ b/dissectors/chcnav-yangxin0/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Xin Yang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/chcnav-yangxin0/README.md b/dissectors/chcnav-yangxin0/README.md new file mode 100644 index 0000000..ba8395a --- /dev/null +++ b/dissectors/chcnav-yangxin0/README.md @@ -0,0 +1,72 @@ +# CHCNAV — récepteurs GNSS compatibles NovAtel (yangxin0) + +Dissecteur Wireshark Lua pour le débogage des récepteurs GNSS et +centrales inertielles du fabricant chinois CHCNAV. Ces appareils parlent +le protocole NovAtel (messages ASCII `#…` et trames binaires +`AA 44 12`), plus un format binaire propre (`AA CC 48 43`). Le script +vise à résumer chaque message en une ligne de texte : heure GPS +convertie en UTC, numéro de séquence et nom du message (BESTPOS, +INSPVA, RAWIMUX, HEADING…) (issue #777). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/yangxin0/wireshark-chcnav (`chcnav.lua`) | +| Commit importé | `700aeb45a0b7d12d4c25b57f71288d0e2791dca5` du 19/07/2024 (dernier commit de la branche par défaut) ; dernière modification du script : commit `fee73b9193a1e2cf07c99dc07dfbd0bc39c5048c` du 19/07/2024 | +| Licence amont | MIT (`LICENSE` amont, © 2024 Xin Yang) ; aucune mention de licence dans le script. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur NovAtel ni CHCNAV dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/chcnav.lua` | Protocole `chcnav` (« CHCNAV Protocol », ligne 6), champ texte `chcnav.text` (ligne 7) ; table des 9 messages reconnus (lignes 67 à 77) ; détection des formats (lignes 22 à 54) ; décodeurs ASCII, CHCNAV et NovAtel (lignes 56, 177 et 200) ; boucle principale ligne 231 ; dissecteur ligne 253 ; port UDP 2200 (ligne 261) | + +## Utilisation + +En l'état, **le script ne se charge pas** sous Wireshark 4.6.4 (voir +ci-dessous). Une fois copié dans le dossier des plugins Lua personnels, +il est prévu pour le port UDP 2200 ; filtre `chcnav`. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins. Le dépôt amont ne contient +aucune capture. Essais sur une capture synthétique (un message ASCII +`#BESTPOSA`, une trame binaire NovAtel BESTPOS et une trame CHCNAV +`0x1201`, sur le port 2200), non commitée : + +| Essai | Résultat | +|---|---| +| Chargement | **échec** : « Lua: Error during loading: chcnav.lua:141: module 'bit32' not found » ; aucun paquet n'est décodé | +| Pour aller plus loin, avec un module `bit32` de remplacement placé à part (hors de ce dépôt) | le script se charge ; les trois paquets s'affichent « CHCNAV_PROTO », puis **erreur Lua** ligne 234 (`No such method/field 'capture_len' for object type 'Tvb'`) sur chacun : aucun texte décodé | + +## Limites constatées + +- Ligne 141 : `require('bit32')`. Ce module de Lua 5.2 n'existe pas + dans le Lua 5.4 de Wireshark 4.6 : le chargement s'arrête là, avant + l'inscription sur le port 2200 (ligne 261). +- Lignes 23 et 234 : `Tvb:capture_len()` n'existe pas (c'est + `captured_len()` ou `len()`). Même corrigée, la boucle de la ligne 234 + (`while payload:capture_len() <= 0`) ne s'exécuterait jamais pour un + paquet non vide : le texte resterait vide. +- Autres erreurs repérées à la lecture, non atteintes à l'essai : + `payload.bytes` au lieu de `payload:bytes` (ligne 27) et + `payload(…).le_uint()` au lieu de `:le_uint()` (lignes 203 à 224) ; + la boucle de la ligne 28 dépasse d'un octet ; `is_ascii_format` + (ligne 41) exige que le premier octet soit à la fois `#`, `$` et `%`, + ce qui est impossible ; `hc_sync_bytes:len()` (ligne 179) et `sync_bytes:len()` (ligne 202) + appliqués à des tables Lua ; concaténation par `+` au lieu de `..` + (ligne 246) ; `calc_crc32` lit une variable `str` inexistante + (ligne 159) et n'est jamais appelée. +- Les analyseurs de messages (à partir de la ligne 104) ne renvoient que + le nom du message : aucun champ (position, vitesse, attitude) n'est + décodé, même une fois les erreurs corrigées. +- `chcnav_protocol` et `udp_table` sont des variables globales ; pas + d'heuristique ni de préférence de port. diff --git a/dissectors/chcnav-yangxin0/src/chcnav.lua b/dissectors/chcnav-yangxin0/src/chcnav.lua new file mode 100644 index 0000000..71a8d9f --- /dev/null +++ b/dissectors/chcnav-yangxin0/src/chcnav.lua @@ -0,0 +1,262 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/yangxin0/wireshark-chcnav (chcnav.lua), +-- commit 700aeb45a0b7d12d4c25b57f71288d0e2791dca5 du 19/07/2024 (dernière modification du fichier : +-- commit fee73b9193a1e2cf07c99dc07dfbd0bc39c5048c du 19/07/2024). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +chcnav_protocol = Proto("chcnav", "CHCNAV Protocol") +local f_text = ProtoField.string("chcnav.text", "Text") +chcnav_protocol.fields = { f_text } + +local supported_protocols = { + [42] = "BestPosId", + [1429] = "BestGnssPosId", + [1430] = "BestGnssVelId", + [507] = "InspvaId", + [812] = "CorrimudataId", + [1461] = "RawImuXId", + [2042] = "DualAntennaHeadingId", + [971] = "HeadingaId", + [0x1201] = "HCInspvazcbId" +} + +local function nav_format_check(sync, payload) + if payload:capture_len() < sync:len() then + return false + end + + local data = payload.bytes(0, sync:len()) + for i = 0, data:len() do + if sync[i] ~= data:get_index(i) then + return false + end + end + + return true +end + +local function is_ascii_format(payload) + local b = nav_format_check({ 0x23 }, payload) -- # + local a = nav_format_check({ 0x24 }, payload) -- $ + local c = nav_format_check({ 0x25 }, payload) -- % + return a and b and c +end + +local sync_bytes = { 0xaa, 0x44, 0x12 } + +local function is_novatel_format(payload) + return nav_format_check(sync_bytes, payload) +end + +local hc_sync_bytes = { 0xaa, 0xcc, 0x48, 0x43 } + +local function is_chcnav_format(payload) + return nav_format_check(hc_sync_bytes, payload) +end + +local function decode_ascii_protocol(payload) + local data = payload:bytes() + for i = 0, data:len()-1 do + if data:raw(i, 2) == "\r\n" then + local offset = i + 2 + return data:raw(0, offset), offset, payload(offset) + end + end + return nil, nil, nil +end + +local nav_protocol_parser = { + [42] = "BestPosId", + [1429] = "BestGnssPosId", + [1430] = "BestGnssVelId", + [507] = "InspvaId", + [812] = "CorrimudataId", + [1461] = "RawImuXId", + [2042] = "DualAntennaHeadingId", + [971] = "HeadingaId", + [0x1201] = "HCInspvazcbId" +} + +setmetatable(nav_protocol_parser, { + __call = function (msg_id, body) + local name = nav_protocol_parser[msg_id] + if name == nil then + return string.format("Unsupported Message: id %d, body size %d", msg_id, body:len()) + end + local parser = nav_protocol_parser.all_parsers[name] + if parser == nil then + return string.format("Unimplemented parser %s, body size %d", name, body:len()) + end + return parser(body) + end +}) + +function nav_protocol_parser.define_parser(name, parser) + if nav_protocol_parser.all_parsers == nil then + nav_protocol_parser.all_parsers = {} + end + for _, v in pairs(nav_protocol_parser) do + if v == name then + nav_protocol_parser.all_parsers[name] = parser + end + end +end + +nav_protocol_parser.define_parser("BestPosId", function(body) + return "BestPosId" +end) + +nav_protocol_parser.define_parser("BestGnssPosId", function(body) + return "BestGnssPosId" +end) + +nav_protocol_parser.define_parser("BestGnssVelId", function(body) + return "BestGnssVelId" +end) + +nav_protocol_parser.define_parser("InspvaId", function(body) + return "InspvaId" +end) + +nav_protocol_parser.define_parser("CorrimudataId", function(body) + return "CorrimudataId" +end) + +nav_protocol_parser.define_parser("RawImuXId", function(body) + return "RawImuXId" +end) + +nav_protocol_parser.define_parser("DualAntennaHeadingId", function(body) + return "DualAntennaHeadingId" +end) + +nav_protocol_parser.define_parser("HeadingaId", function(body) + return "HeadingaId" +end) + +nav_protocol_parser.define_parser("HCInspvazcbId", function(body) + return "HCInspvazcbId" +end) + + +local bit32 = require('bit32') +local crc32_table = {} +for i = 0, 255 do + local crc = i + for _ = 8, 1, -1 do + if crc % 2 == 1 then + crc = bit32.bxor(bit32.rshift(crc, 1), 0xedb88320) + else + crc = bit32.rshift(crc, 1) + end + end + crc32_table[i] = crc +end + +local function calc_crc32(data) + local crc_value = 0xffffffff + + for i = 1, #data do + local byte = string.byte(str, i) + crc_value = bit32.bxor(bit32.rshift(crc_value, 8), + crc32_table[bit32.bxor(bit32.band(crc_value, 0xff), byte)]) + end + + return bit32.bxor(crc_value, 0xffffffff) +end + +local function gps_time_to_utc(gps_week, gps_seconds_in_ms) + local gps_epoch = os.time({year=1980, month=1, day=6, hour=0}) + local gps_seconds_since_epoch = gps_week * 7 * 24 * 60 * 60 + gps_seconds_in_ms / 1000.0 + local gps_time = gps_epoch + gps_seconds_since_epoch + local gps_utc_offset = 18 + local utc_time = gps_time - gps_utc_offset + local utc_time_str = os.date("!%Y-%m-%d %H:%M:%S", utc_time) + return utc_time_str .. "." .. tostring(gps_seconds_in_ms % 1000) +end + +local function decode_chcnav_protocol(payload) + -- header + local skip = hc_sync_bytes:len() + local body_len = payload(skip, 2):le_uint() + local msg_id = payload(skip+2, 2):le_uint() + local week = payload(skip+4, 2):le_uint() + local gps_ms = payload(skip+6, 4):le_uint() + local sn = payload(skip+10, 4):le_uint() + local receiver = payload(skip+14, 4):le_uint() + + local utc_ts = gps_time_to_utc(week, gps_ms) + local header = string.format("[%s] -> ", utc_ts) + -- body + local header_size = skip + 18 + local body = payload:bytes(header_size, body_len) + -- crc32 + local crc32 = payload(header_size+body_len, 4):le_uint() + local msg_size = header_size + body_len + 4 + + local msg = nav_protocol_parser(msg_id, body) + return header..msg, msg_size, payload(msg_size) +end + +local function decode_novatel_protocol(payload) + -- header + local skip = sync_bytes:len() + local header_len = payload(skip, 1).le_uint() + local msg_id = payload(skip+1, 2).le_uint() + local msg_type = payload(skip+3, 1).le_uint() + local port_addr = payload(skip+4, 1).le_uint() + local body_len = payload(skip+5, 2).le_uint() + local seq = payload(skip+7, 2).le_uint() + local idle_time = payload(skip+9, 1).le_uint() + local time_status = payload(skip+10, 1).le_uint() + local week = payload(skip+11, 2).le_uint() + local gps_ms = payload(skip+13, 4).le_uint() + local receiver_status = payload(skip+17, 4).le_uint() + local reserved = payload(skip+21, 2).le_uint() + + local utc_ts = gps_time_to_utc(week, gps_ms) + local header = string.format("[%s] seq %d -> ", utc_ts, seq) + + -- body + local header_size = skip + 25 + local body = payload:bytes(header_size, body_len) + + -- crc32 + local crc32 = payload(header_size+body_len, 4).le_uint() + local msg_size = header_size + body_len + 4 + + local msg = nav_protocol_parser(msg_id, body) + return header..msg, msg_size, payload(msg_size) +end + +local function decode_chcnav_payload(payload) + local text = "" + local offset = 0 + while payload:capture_len() <= 0 do + local msg, msg_size -- original message size + if is_ascii_format(payload) then + msg, msg_size, payload = decode_ascii_protocol(payload) + elseif is_novatel_format(payload) then + msg, msg_size, payload = decode_novatel_protocol(payload) + elseif is_chcnav_format(payload) then + msg, msg_size, payload = decode_chcnav_protocol(payload) + end + if msg == nil then + return string.format("Invalid payload at %d", offset) + else + text = text + "\n" + msg + offset = offset + msg_size + end + end + return text +end + +function chcnav_protocol.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "CHCNAV_PROTO" + local subtree = tree:add(chcnav_protocol, buffer(), "Chcnav Protocol Data") + local text = decode_chcnav_payload(buffer) + subtree:add(f_text, text) +end + +udp_table = DissectorTable.get("udp.port") +udp_table:add(2200, chcnav_protocol) + diff --git a/dissectors/chia/LICENSE b/dissectors/chia/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/chia/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/chia/README.md b/dissectors/chia/README.md new file mode 100644 index 0000000..47950fd --- /dev/null +++ b/dissectors/chia/README.md @@ -0,0 +1,56 @@ +# Chia — protocole pair-à-pair de la blockchain Chia + +Dissecteur Wireshark Lua du protocole réseau binaire de **Chia** (version +du script 2.5.1.dev1) : protocole `chia` — en-tête de message (type, +identifiant optionnel, longueur) et désérialisation détaillée des charges +utiles pour 105 types de messages (1 à 107, plus 255 `error`) des +composants nœud complet, portefeuille, farmer, harvester et timelord. +Les pairs Chia échangent ces messages dans des WebSocket sécurisées : le +script s'enregistre dans la table native `ws.port` (ports 8000, 8444, 8447 +et 58444) et nécessite donc le déchiffrement TLS. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/10etennba/chia-wireshark-dissector-lua (fichier `chia.lua`) | +| Commit importé | `cf48287ddbdf3c25e1e173024fec24d340ca4227` du 15/02/2025 (branche `main`, dernier commit ; dernière modification du script : `897787b` du 15/02/2025) | +| Licence amont | GPL-3.0-or-later (en-tête du script : « either version 3 of the License, or (at your option) any later version », Copyright (C) 2025 10etennba ; fichier `LICENSE` amont GPLv3, copié ici) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Chia natif (WebSocket et TLS sont natifs) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `chia.lua` | Protocole `chia` sur WebSocket, ports 8000, 8444, 8447, 58444 | +| `LICENSE` | Licence GPLv3 amont | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le fichier amont `chia.lua.sha256sum` n'est +pas repris : il ne correspond plus au script après ajout de l'en-tête. + +## Utilisation + +Copier `chia.lua` dans le dossier `plugins` de Wireshark. Le trafic Chia +étant chiffré, il faut un fichier de clés TLS (`SSLKEYLOGFILE`), que le +logiciel Chia officiel ne produit pas sans modification de son code +(`server.py`, procédure détaillée dans le README amont), et capturer la +poignée de main TLS. Indiquer ce fichier dans Préférences → Protocols → +TLS, puis filtrer avec `chia`. + +## Remarques + +- La variable `SHOW_SERIAL_PROTO` (valeur `false`) en tête du + script affiche, si on la passe à `true`, les champs de sérialisation + (longueurs, indicateurs d'option). +- Défaut amont relevé à la lecture : la fonction locale `error` (message de + type 255) attend `(tvb, offset, data_range, data_tree)` mais est appelée + avec trois arguments `(tvb, offset, data_tree)` ; `data_tree` y vaut + alors `nil`, ce qui devrait provoquer une erreur Lua sur ces messages. + Cette fonction masque aussi la fonction standard `error` dans la suite du + fichier. +- Le protocole `p_chia` est une variable globale ; l'enregistrement dans + `ws.port` se fait dans la fonction `init` (à chaque rechargement). +- D'après le README amont, le test de tous les types de messages est + encore en cours. Pas de capture d'exemple amont ; non vérifié dans + Wireshark. diff --git a/dissectors/chia/chia.lua b/dissectors/chia/chia.lua new file mode 100644 index 0000000..4e42bac --- /dev/null +++ b/dissectors/chia/chia.lua @@ -0,0 +1,6342 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/10etennba/chia-wireshark-dissector-lua (chia.lua), +-- commit cf48287ddbdf3c25e1e173024fec24d340ca4227 du 15/02/2025. +-- Licence amont : GPL-3.0-or-later (LICENSE amont) — voir README.md. +--[[ + Chia Blockchain Protocol Dissector + Version: 2.5.1.dev1 + Copyright (C) 2025 10etennba + + 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 3 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. +--]] + + +local plugin_info = { + version = "2.5.1.dev1", + author = "10etennba", + description = "Chia Blockchain Protocol Dissector", + repository = "https://github.com/10etennba/chia-wireshark-dissector-lua/", + gratuity = "xch1a5ysw83rsk80aw65fn4zrfuha3jup96f4yc392fsy83paeccpvjs7jrxpr" +} +set_plugin_info(plugin_info) + + + +-- Define the ports the dissector is listening to: +local CHIA_PORTS = { + 8000, -- TimeLord + 8444, -- Full node, Wallet + 8447, -- Farmer, Harvester + 58444, -- testnet: Full node, Wallet +} + + +--Display Chia's de/serialization protocol fields (default is false). +local SHOW_SERIAL_PROTO = false + + +-- Register protocol +p_chia = Proto.new("Chia","Chia Blockchain Protocol") + +-------------------------------------------------------------------------------- +-- Fields for the various message types +-------------------------------------------------------------------------------- +local pf = { + + -- message / Message + msg__type = ProtoField.uint8( + "chia.type", + "type (uint8)"), + msg__type__enum = ProtoField.string( + "chia.type.enum", + "type.enum (str)"), + msg__id__option = ProtoField.bool( + "chia.id.option", + "{id_option (bool)}"), + msg__id = ProtoField.uint16( + "chia.id", + "id (uint16)"), + msg__data__length = ProtoField.uint32( + "chia.data.length", + "{data.length (uint32)}"), + msg__data = ProtoField.bytes( + "chia.data", + "data (bytes)"), + + + -- 1 handshake / Handshake + handshake__network_id__length = ProtoField.uint32( + "chia.data.handshake.network_id.length", + "{network_id.length (uint32)}"), + handshake__network_id = ProtoField.string( + "chia.data.handshake.network_id", + "network_id (str)"), + handshake__protocol_version__length = ProtoField.uint32( + "chia.data.handshake.protocol_version.length", + "{protocol_version.length (uint32)}"), + handshake__protocol_version = ProtoField.string( + "chia.data.handshake.protocol_version", + "protocol_version (str)"), + handshake__software_version__length = ProtoField.uint32( + "chia.data.handshake.software_version.length", + "{software_version.length (uint32)}"), + handshake__software_version = ProtoField.string( + "chia.data.handshake.software_version", + "software_version (str)"), + handshake__server_port = ProtoField.uint16( + "chia.data.handshake.server_port", + "server_port (uint16)"), + handshake__node_type = ProtoField.uint8( + "chia.data.handshake.node_type", + "node_type (uint8)"), + handshake__node_type__enum = ProtoField.string( + "chia.data.handshake.node_type.enum", + "{node_type.enum (str)}"), + handshake__capabilities__count = ProtoField.uint32( + "chia.data.handshake.capabilities.count", + "{capabilities.count (uint32)}"), + handshake__capability__enum = ProtoField.string( + "chia.data.handshake.capability.enum", + "{capability.enum (str)}"), + handshake__capability__uint16 = ProtoField.uint16( + "chia.data.handshake.capability.uint16", + "uint16 (uint16)"), + handshake__capability__str__length = ProtoField.uint32( + "chia.data.handshake.capability.str.length", + "{str.length (uint32)}"), + handshake__capability__str = ProtoField.string( + "chia.data.handshake.capability.str", + "str (str)"), + + + -- 2 (undefined) + + + -- 3 harvester_handshake / HarvesterHandshake + harvester_handshake__farmer_public_keys__count = ProtoField.uint32( + "chia.data.harvester_handshake.farmer_public_keys.count", + "{farmer_public_keys.count (uint32)}"), + harvester_handshake__farmer_public_key = ProtoField.bytes( + "chia.data.harvester_handshake.farmer_public_key", + "farmer_public_key (G1Element)"), + harvester_handshake__pool_public_keys__count = ProtoField.uint32( + "chia.data.harvester_handshake.pool_public_keys.count", + "{pool_public_keys.count (uint32)}"), + harvester_handshake__pool_public_key = ProtoField.bytes( + "chia.data.harvester_handshake.pool_public_key", + "pool_public_key (G1Element)"), + + + -- 4 (undefined) + + + -- 5 new_proof_of_space / NewProofOfSpace + new_proof_of_space__challenge_hash = ProtoField.bytes( + "chia.data.new_proof_of_space.challenge_hash", + "challenge_hash (bytes32)"), + new_proof_of_space__sp_hash = ProtoField.bytes( + "chia.data.new_proof_of_space.sp_hash", + "sp_hash (bytes32)"), + new_proof_of_space__plot_identifier__length = ProtoField.uint32( + "chia.data.new_proof_of_space.plot_identifier.length", + "{plot_identifier.length (uint32)}"), + new_proof_of_space__plot_identifier = ProtoField.string( + "chia.data.new_proof_of_space.plot_identifier", + "plot_identifier (str)"), + new_proof_of_space__signage_point_index = ProtoField.uint8( + "chia.data.new_proof_of_space.signage_point_index", + "signage_point_index (uint8)"), + new_proof_of_space__include_source_signature_data = ProtoField.bool( + "chia.data.new_proof_of_space.include_source_signature_data", + "include_source_signature_data (bool)"), + new_proof_of_space__farmer_reward_address_override__option = ProtoField.bool( + "chia.data.new_proof_of_space.farmer_reward_address_override.option", + "{farmer_reward_address_override.option (bool)}"), + new_proof_of_space__farmer_reward_address_override = ProtoField.bytes( + "chia.data.new_proof_of_space.farmer_reward_address_override", + "farmer_reward_address_override (bytes32)"), + new_proof_of_space__fee_info__option = ProtoField.bool( + "chia.data.new_proof_of_space.fee_info.option", + "{fee_info.option (bool)}"), + new_proof_of_space__fee_info__applied_fee_threshold = ProtoField.uint32( + "chia.data.new_proof_of_space.fee_info.applied_fee_threshold", + "applied_fee_threshold (uint32)"), + + + -- 6 request_signatures / RequestSignatures + request_signatures__plot_identifier__length = ProtoField.uint32( + "chia.data.request_signatures.plot_identifier.length", + "{plot_identifier.length (uint32)}"), + request_signatures__plot_identifier = ProtoField.string( + "chia.data.request_signatures.plot_identifier", + "plot_identifier (str)"), + request_signatures__challenge_hash = ProtoField.bytes( + "chia.data.request_signatures.challenge_hash", + "challenge_hash (bytes32)"), + request_signatures__sp_hash = ProtoField.bytes( + "chia.data.request_signatures.sp_hash", + "sp_hash (bytes32)"), + request_signatures__messages__count = ProtoField.uint32( + "chia.data.request_signatures.messages.count", + "{messages.count (uint32)}"), + request_signatures__message = ProtoField.bytes( + "chia.data.request_signatures.message", + "message (bytes32)"), + request_signatures__message_data__option = ProtoField.bool( + "chia.data.request_signatures.message_data.option", + "{message_data.option (bool)}"), + request_signatures__message_data__count = ProtoField.uint32( + "chia.data.request_signatures.message_data.count", + "{message_data.count (uint32)}"), + request_signatures__message_data__SignatureRequestSourceData__option = ProtoField.bool( + "chia.data.request_signatures.message_data.SignatureRequestSourceData.option", + "{SignatureRequestSourceData.option (bool)}"), + request_signatures__message_data__SignatureRequestSourceData__kind = ProtoField.uint8( + "chia.data.request_signatures.message_data.SignatureRequestSourceData.kind", + "kind (uint8)"), + request_signatures__message_data__SignatureRequestSourceData__data__length = ProtoField.uint32( + "chia.data.request_signatures.message_data.SignatureRequestSourceData.data.length", + "{data.length (uint32)}"), + request_signatures__message_data__SignatureRequestSourceData__data = ProtoField.bytes( + "chia.data.request_signatures.SignatureRequestSourceData.data", + "data (bytes)"), + request_signatures__rc_block_unfinished__option = ProtoField.bool( + "chia.data.request_signatures.rc_block_unfinished.option", + "{rc_block_unfinished.option (bool)}"), + + + -- 7 respond_signatures / RespondSignatures + respond_signatures__plot_identifier__length = ProtoField.uint32( + "chia.data.respond_signatures.plot_identifier.length", + "{plot_identifier.length (uint32)}"), + respond_signatures__plot_identifier = ProtoField.string( + "chia.data.respond_signatures.plot_identifier", + "plot_identifier (str)"), + respond_signatures__challenge_hash = ProtoField.bytes( + "chia.data.respond_signatures.challenge_hash", + "challenge_hash (bytes32)"), + respond_signatures__sp_hash = ProtoField.bytes( + "chia.data.respond_signatures.sp_hash", + "sp_hash (bytes32)"), + respond_signatures__local_pk = ProtoField.bytes( + "chia.data.respond_signatures.local_pk", + "local_pk (G1Element)"), + respond_signatures__farmer_pk = ProtoField.bytes( + "chia.data.respond_signatures.farmer_pk", + "farmer_pk (G1Element)"), + respond_signatures__message_signatures__count = ProtoField.uint32( + "chia.data.respond_signatures.message_signatures.count", + "{message_signatures.count (uint32)}"), + respond_signatures__message_signature__bytes32 = ProtoField.bytes( + "chia.data.respond_signatures.message_signatures.message_signature.bytes32", + "bytes32 (bytes32)"), + respond_signatures__message_signature__signature = ProtoField.bytes( + "chia.data.respond_signatures.message_signatures.message_signature.signature", + "signature (G2Element)"), + respond_signatures__include_source_signature_data = ProtoField.bool( + "chia.data.respond_signatures.include_source_signature_data", + "include_source_signature_data (bool)"), + respond_signatures__farmer_reward_address_override__option = ProtoField.bool( + "chia.data.respond_signatures.farmer_reward_address_override.option", + "{farmer_reward_address_override.option (bool)}"), + respond_signatures__farmer_reward_address_override = ProtoField.bytes( + "chia.data.respond_signatures.farmer_reward_address_override", + "farmer_reward_address_override (bytes32)"), + + + -- 8 new_signage_point / NewSignagePoint + new_signage_point__challenge_hash = ProtoField.bytes( + "chia.data.new_signage_point.challenge_hash", + "challenge_hash (bytes32)"), + new_signage_point__challenge_chain_sp = ProtoField.bytes( + "chia.data.new_signage_point.challenge_chain_sp", + "challenge_chain_sp (bytes32)"), + new_signage_point__reward_chain_sp = ProtoField.bytes( + "chia.data.new_signage_point.reward_chain_sp", + "reward_chain_sp (bytes32)"), + new_signage_point__difficulty = ProtoField.uint64( + "chia.data.new_signage_point.difficulty", + "difficulty (uint64)"), + new_signage_point__sub_slot_iters = ProtoField.uint64( + "chia.data.new_signage_point.sub_slot_iters", + "sub_slot_iters (uint64)"), + new_signage_point__signage_point_index = ProtoField.uint8( + "chia.data.new_signage_point.signage_point_index", + "signage_point_index (uint8)"), + new_signage_point__peak_height = ProtoField.uint32( + "chia.data.new_signage_point.peak_height", + "peak_height (uint32)"), + new_signage_point__sp_source_data__option = ProtoField.bool( + "chia.data.new_signage_point.sp_source_data.option", + "{sp_source_data.option (bool)}"), + new_signage_point__sp_source_data__sub_slot_data__option = ProtoField.bool( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.option", + "{sub_slot_data.option (bool)}"), + new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__infused_challenge_chain_sub_slot_hash__option = ProtoField.bool( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.cc_sub_slot.infused_challenge_chain_sub_slot_hash.option", + "{infused_challenge_chain_sub_slot_hash.option (bool)}"), + new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__infused_challenge_chain_sub_slot_hash = ProtoField.bytes( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.cc_sub_slot.infused_challenge_chain_sub_slot_hash", + "infused_challenge_chain_sub_slot_hash (Bytes32)"), + new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__subepoch_summary_hash__option = ProtoField.bool( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.cc_sub_slot.subepoch_summary_hash.option", + "{subepoch_summary_hash.option (bool)}"), + new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__subepoch_summary_hash = ProtoField.bytes( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.cc_sub_slot.subepoch_summary_hash", + "subepoch_summary_hash (Bytes32)"), + new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__new_sub_slot_iters__option = ProtoField.bool( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.cc_sub_slot.new_sub_slot_iters.option", + "{new_sub_slot_iters.option (bool)}"), + new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__new_sub_slot_iters = ProtoField.uint64( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.cc_sub_slot.new_sub_slot_iters", + "new_sub_slot_iters (u64)"), + new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__new_difficulty__option = ProtoField.bool( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.cc_sub_slot.new_difficulty.option", + "{new_difficulty.option (bool)}"), + new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__new_difficulty = ProtoField.uint64( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.cc_sub_slot.new_difficulty", + "new_difficulty (u64)"), + new_signage_point__sp_source_data__sub_slot_data__rc_sub_slot__challenge_chain_sub_slot_hash = ProtoField.bytes( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.rc_sub_slot.challenge_chain_sub_slot_hash", + "challenge_chain_sub_slot_hash (Bytes32)"), + new_signage_point__sp_source_data__sub_slot_data__rc_sub_slot__infused_challenge_chain_sub_slot_hash__option = ProtoField.bytes( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.rc_sub_slot.infused_challenge_chain_sub_slot_hash.option", + "{infused_challenge_chain_sub_slot_hash.option (bool)}"), + new_signage_point__sp_source_data__sub_slot_data__rc_sub_slot__infused_challenge_chain_sub_slot_hash = ProtoField.bytes( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.rc_sub_slot.infused_challenge_chain_sub_slot_hash", + "infused_challenge_chain_sub_slot_hash (Bytes32)"), + new_signage_point__sp_source_data__sub_slot_data__rc_sub_slot__deficit = ProtoField.uint8( + "chia.data.new_signage_point.sp_source_data.sub_slot_data.rc_sub_slot.deficit", + "deficit (u8)"), + new_signage_point__sp_source_data__vdf_data__option = ProtoField.bool( + "chia.data.new_signage_point.sp_source_data.vdf_data.option", + "{vdf_data.option (bool)}"), + new_signage_point__sp_source_data__vdf_data__cc_vdf__ClassgroupElement__data = ProtoField.bytes( + "chia.data.new_signage_point.sp_source_data.vdf_data.cc_vdf.ClassgroupElement.data", + "data (bytes100)"), + new_signage_point__sp_source_data__vdf_data__rc_vdf__ClassgroupElement__data = ProtoField.bytes( + "chia.data.new_signage_point.sp_source_data.vdf_data.rc_vdf.ClassgroupElement.data", + "data (bytes100)"), + + + -- 9 declare_proof_of_space / DeclareProofOfSpace + declare_proof_of_space__challenge_hash = ProtoField.bytes( + "chia.data.declare_proof_of_space.challenge_hash", + "challenge_hash (bytes32)"), + declare_proof_of_space__challenge_chain_sp = ProtoField.bytes( + "chia.data.declare_proof_of_space.challenge_chain_sp", + "challenge_chain_sp (bytes32)"), + declare_proof_of_space__signage_point_index = ProtoField.bytes( + "chia.data.declare_proof_of_space.signage_point_index", + "signage_point_index (uint8)"), + declare_proof_of_space__reward_chain_sp = ProtoField.bytes( + "chia.data.declare_proof_of_space.reward_chain_sp", + "reward_chain_sp (bytes32)"), + declare_proof_of_space__challenge_chain_sp_signature = ProtoField.bytes( + "chia.data.declare_proof_of_space.challenge_chain_sp_signature", + "challenge_chain_sp_signature (G2Element)"), + declare_proof_of_space__reward_chain_sp_signature = ProtoField.bytes( + "chia.data.declare_proof_of_space.reward_chain_sp_signature", + "reward_chain_sp_signature (G2Element)"), + declare_proof_of_space__farmer_puzzle_hash = ProtoField.bytes( + "chia.data.declare_proof_of_space.farmer_puzzle_hash", + "farmer_puzzle_hash (bytes32)"), + declare_proof_of_space__pool_target__option = ProtoField.bytes( + "chia.data.declare_proof_of_space.pool_target.option", + "{pool_target.option (bool)}"), + declare_proof_of_space__pool_target__puzzle_hash = ProtoField.bytes( + "chia.data.declare_proof_of_space.pool_target.puzzle_hash", + "puzzle_hash (Bytes32)"), + declare_proof_of_space__pool_target__height = ProtoField.bytes( + "chia.data.declare_proof_of_space.pool_target.height", + "pool_target.height (u32)"), + declare_proof_of_space__pool_signature__option = ProtoField.bytes( + "chia.data.declare_proof_of_space.pool_signature.option", + "{pool_signature.option (bool)}"), + declare_proof_of_space__pool_signature = ProtoField.bytes( + "chia.data.declare_proof_of_space.pool_signature", + "signature (G2Element)"), + declare_proof_of_space__include_signature_source_data = ProtoField.bool( + "chia.data.declare_proof_of_space.include_signature_source_data", + "include_signature_source_data (bool)"), + + + -- 10 request_signed_values / RequestSignedValues + request_signed_values__quality_string = ProtoField.bytes( + "chia.data.request_signed_values.quality_string", + "quality_string (bytes32)"), + request_signed_values__foliage_block_data_hash = ProtoField.bytes( + "chia.data.request_signed_values.foliage_block_data_hash", + "foliage_block_data_hash (bytes32)"), + request_signed_values__foliage_transaction_block_hash = ProtoField.bytes( + "chia.data.request_signed_values.foliage_transaction_block_hash", + "foliage_transaction_block_hash (bytes32)"), + request_signed_values__foliage_block_data__option = ProtoField.bytes( + "chia.data.request_signed_values.foliage_block_data.option", + "{foliage_block_data.option (bool)}"), + request_signed_values__foliage_transaction_block_data__option = ProtoField.bytes( + "chia.data.request_signed_values.foliage_transaction_block_data.option", + "{foliage_transaction_block_data.option (bool)}"), + request_signed_values__rc_block_unfinished__option = ProtoField.bytes( + "chia.data.request_signed_values.rc_block_unfinished.option", + "{rc_block_unfinished.option (bool)}"), + + + -- 11 signed_values / SignedValues + signed_values__quality_string = ProtoField.bytes( + "chia.data.signed_values.quality_string", + "quality_string (bytes32)"), + signed_values__foliage_block_data_signature = ProtoField.bytes( + "chia.data.signed_values.foliage_block_data_signature", + "foliage_block_data_signature (G2Element)"), + signed_values__foliage_transaction_block_signature = ProtoField.bytes( + "chia.data.signed_values.foliage_transaction_block_signature", + "foliage_transaction_block_signature (G2Element)"), + + + -- 12 farming_info / FarmingInfo + farming_info__challenge_hash = ProtoField.bytes( + "chia.data.farming_info.challenge_hash", + "challenge_hash (bytes32)"), + farming_info__sp_hash = ProtoField.bytes( + "chia.data.farming_info.sp_hash", + "sp_hash (bytes32)"), + farming_info__timestamp = ProtoField.uint64( + "chia.data.farming_info.timestamp", + "timestamp (uint64)"), + farming_info__passed = ProtoField.uint32( + "chia.data.farming_info.passed", + "passed (uint32)"), + farming_info__proofs = ProtoField.uint32( + "chia.data.farming_info.proofs", + "proofs (uint32)"), + farming_info__total_plots = ProtoField.uint32( + "chia.data.farming_info.total_plots", + "total_plots (uint32)"), + farming_info__lookup_time = ProtoField.uint64( + "chia.data.farming_info.lookup_time", + "lookup_time (uint64)"), + + + -- 13 new_peak_timelord / NewPeakTimelord + new_peak_timelord__difficulty = ProtoField.uint64( + "chia.data.new_peak_timelord.difficulty", + "difficulty (uint64)"), + new_peak_timelord__deficit = ProtoField.uint8( + "chia.data.new_peak_timelord.deficit", + "deficit (uint8)"), + new_peak_timelord__sub_slot_iters = ProtoField.uint64( + "chia.data.new_peak_timelord.sub_slot_iters", + "sub_slot_iters (uint64)"), + new_peak_timelord__sub_epoch_summary__option = ProtoField.bool( + "chia.data.new_peak_timelord.sub_epoch_summary.option", + "{sub_epoch_summary.option (bool)}"), + new_peak_timelord__previous_reward_challenges__count = ProtoField.uint32( + "chia.data.new_peak_timelord.previous_reward_challenges.count", + "{previous_reward_challenges.count (uint32)}"), + new_peak_timelord__previous_reward_challenges__tuples__bytes32 = ProtoField.bytes( + "chia.data.new_peak_timelord.previous_reward_challenges.tuples.bytes32", + "bytes32 (bytes32)"), + new_peak_timelord__previous_reward_challenges__tuples__uint128 = ProtoField.string( + "chia.data.new_peak_timelord.previous_reward_challenges.tuples.uint128", + "uint128 (uint128)"), + new_peak_timelord__last_challenge_sb_or_eos_total_iters = ProtoField.string( + "chia.data.new_peak_timelord.last_challenge_sb_or_eos_total_iters", + "last_challenge_sb_or_eos_total_iters (uint128)"), + new_peak_timelord__passes_ses_height_but_not_yet_included = ProtoField.bool( + "chia.data.new_peak_timelord.passes_ses_height_but_not_yet_included", + "passes_ses_height_but_not_yet_included (bool)"), + + + -- 14 new_unfinished_block_timelord / NewUnfinishedBlockTimelord + new_unfinished_block_timelord__difficulty = ProtoField.uint64( + "chia.data.new_unfinished_block_timelord.difficulty", + "difficulty (uint64)"), + new_unfinished_block_timelord__sub_slot_iters = ProtoField.uint64( + "chia.data.new_unfinished_block_timelord.sub_slot_iters", + "sub_slot_iters (uint64)"), + new_unfinished_block_timelord__sub_epoch_summary__option = ProtoField.bool( + "chia.data.new_unfinished_block_timelord.sub_epoch_summary.option", + "{sub_epoch_summary.option (bool)}"), + new_unfinished_block_timelord__rc_prev = ProtoField.bytes( + "chia.data.new_unfinished_block_timelord.rc_prev", + "rc_prev (bytes32)"), + + + -- 15 new_infusion_point_vdf / NewInfusionPointVDF + new_infusion_point_vdf__unfinished_reward_hash = ProtoField.bytes( + "chia.data.new_infusion_point_vdf.unfinished_reward_hash", + "unfinished_reward_hash (bytes32)"), + new_infusion_point_vdf__infused_challenge_chain_ip_vdf__option = ProtoField.bool( + "chia.data.new_infusion_point_vdf.infused_challenge_chain_ip_vdf.option", + "{infused_challenge_chain_ip_vdf.option (bool)}"), + new_infusion_point_vdf__infused_challenge_chain_ip_proof__option = ProtoField.bool( + "chia.data.new_infusion_point_vdf.infused_challenge_chain_ip_proof.option", + "{infused_challenge_chain_ip_proof.option (bool)}"), + + + -- 16 new_signage_point_vdf / NewSignagePointVDF + new_signage_point_vdf__index_from_challenge = ProtoField.uint8( + "chia.data.new_signage_point_vdf.index_from_challenge", + "index_from_challenge (uint8)"), + + + -- 17 new_end_of_sub_slot_vdf / NewEndOfSubSlotVDF + + + -- 18 request_compact_proof_of_time / RequestCompactProofOfTime + request_compact_proof_of_time__header_hash = ProtoField.bytes( + "chia.data.request_compact_proof_of_time.header_hash", + "header_hash (bytes32)"), + request_compact_proof_of_time__height = ProtoField.uint32( + "chia.data.request_compact_proof_of_time.height", + "height (uint32)"), + request_compact_proof_of_time__field_vdf = ProtoField.uint8( + "chia.data.request_compact_proof_of_time.field_vdf", + "field_vdf (uint8)"), + + + -- 19 respond_compact_proof_of_time / RespondCompactProofOfTime + respond_compact_proof_of_time__header_hash = ProtoField.bytes( + "chia.data.respond_compact_proof_of_time.header_hash", + "header_hash (bytes32)"), + respond_compact_proof_of_time__height = ProtoField.uint32( + "chia.data.respond_compact_proof_of_time.height", + "height (uint32)"), + respond_compact_proof_of_time__field_vdf = ProtoField.uint8( + "chia.data.respond_compact_proof_of_time.field_vd", + "field_vd (uint8)"), + + + -- 20 new_peak / NewPeak + new_peak__header_hash = ProtoField.bytes( + "chia.data.new_peak.header_hash", + "header_hash (bytes32)"), + new_peak__height = ProtoField.uint32( + "chia.data.new_peak.height", + "height (uint32)"), + new_peak__weight = ProtoField.string( + "chia.data.new_peak.weight", + "weight (uint128)"), + new_peak__fork_point_with_previous_peak = ProtoField.uint32( + "chia.data.new_peak.fork_point_with_previous_peak", + "fork_point_with_previous_peak (uint32)"), + new_peak__unfinished_reward_block_hash = ProtoField.bytes( + "chia.data.new_peak.unfinished_reward_block_hash", + "unfinished_reward_block_hash (bytes32)"), + + + -- 21 new_transaction / NewTransaction + new_transaction__transaction_id = ProtoField.bytes( + "chia.data.new_transaction.transaction_id", + "transaction_id (bytes32)"), + new_transaction__cost = ProtoField.uint64( + "chia.data.new_transaction__cost", + "cost (uint64)"), + new_transaction__fees = ProtoField.uint64( + "chia.data.new_transaction__fees", + "fees (uint64)"), + + + -- 22 request_transaction / RequestTransaction + request_transaction__transaction_id = ProtoField.bytes( + "chia.data.request_transaction.transaction_id", + "transaction_id (bytes32)"), + + + -- 23 respond_transaction / RespondTransaction + + + -- 24 request_proof_of_weight / RequestProofOfWeight + request_proof_of_weight__total_number_of_blocks = ProtoField.uint32( + "chia.data.request_proof_of_weight.total_number_of_blocks", + "total_number_of_blocks (uint32)"), + request_proof_of_weight__tip = ProtoField.bytes( + "chia.data.request_proof_of_weight.tip", + "tip (bytes32)"), + + + -- 25 respond_proof_of_weight / RespondProofOfWeight + respond_proof_of_weight__wp__sub_epochs__count = ProtoField.uint32( + "chia.data.respond_proof_of_weight.wp.sub_epochs.count", + "{sub_epochs.count (uint32)}"), + respond_proof_of_weight__wp__sub_epochs__reward_chain_hash = ProtoField.bytes( + "chia.data.respond_proof_of_weight.wp.sub_epochs.reward_chain_hash", + "reward_chain_hash (Bytes32)"), + respond_proof_of_weight__wp__sub_epochs__num_blocks_overflow = ProtoField.uint8( + "chia.data.respond_proof_of_weight.wp.sub_epochs.num_blocks_overflow", + "num_blocks_overflow (u8)"), + respond_proof_of_weight__wp__sub_epochs__new_sub_slot_iters__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epochs.new_sub_slot_iters.option", + "{new_sub_slot_iters.option (bool)}"), + respond_proof_of_weight__wp__sub_epochs__new_sub_slot_iters = ProtoField.uint64( + "chia.data.respond_proof_of_weight.wp.sub_epochs.new_sub_slot_iters", + "new_sub_slot_iters (u64)"), + respond_proof_of_weight__wp__sub_epochs__new_difficulty__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epochs.new_difficulty.option", + "{new_difficulty.option (bool)}"), + respond_proof_of_weight__wp__sub_epochs__new_difficulty = ProtoField.uint64( + "chia.data.respond_proof_of_weight.wp.sub_epochs.new_difficulty", + "new_difficulty (u64)"), + respond_proof_of_weight__wp__sub_epoch_segments__count = ProtoField.uint32( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.count", + "{sub_epoch_segments.count (uint32)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_epoch_n = ProtoField.uint32( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_epoch_n", + "sub_epoch_n (u32)"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__count = ProtoField.uint32( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.count", + "{sub_slots.count (uint32)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__proof_of_space__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.proof_of_space.option", + "{proof_of_space.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_signage_point__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.cc_signage_point.option", + "{cc_signage_point.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_infusion_point__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.cc_infusion_point.option", + "{cc_infusion_point.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__icc_infusion_point__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.icc_infusion_point.option", + "{icc_infusion_point.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_sp_vdf_info__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.cc_sp_vdf_info.option", + "{cc_sp_vdf_info.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__signage_point_index__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.signage_point_index.option", + "{signage_point_index.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__signage_point_index = ProtoField.uint8( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.signage_point_index", + "signage_point_index (u8)"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_slot_end__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.cc_slot_end.option", + "{cc_slot_end.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__icc_slot_end__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.icc_slot_end.option", + "{icc_slot_end.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_slot_end_info__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.cc_slot_end_info.option", + "{cc_slot_end_info.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__icc_slot_end_info__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.icc_slot_end_info.option", + "{icc_slot_end_info.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_ip_vdf_info__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.cc_ip_vdf_info.option", + "{cc_ip_vdf_info.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__icc_ip_vdf_info__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.icc_ip_vdf_info.option", + "{icc_ip_vdf_info.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__total_iters__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.total_iters.option", + "{total_iters.option (bool)}"), + respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__total_iters = ProtoField.string( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.sub_slots.total_iters", + "total_iters (u128)"), + respond_proof_of_weight__wp__sub_epoch_segments__rc_slot_end_info__option = ProtoField.bool( + "chia.data.respond_proof_of_weight.wp.sub_epoch_segments.rc_slot_end_info.option", + "{rc_slot_end_info.option (bool)}"), + respond_proof_of_weight__wp__recent_chain_data__count = ProtoField.uint32( + "chia.data.respond_proof_of_weight.wp.recent_chain_data.count", + "{recent_chain_data.count (uint32)}"), + respond_proof_of_weight__tip = ProtoField.bytes( + "chia.data.respond_proof_of_weight.tip", + "tip (bytes32)"), + + + -- 26 request_block / RequestBlock + request_block__height = ProtoField.uint32( + "chia.data.request_block.height", + "height (uint32)"), + request_block__include_transaction_block = ProtoField.bool( + "chia.data.request_block.include_transaction_block", + "include_transaction_block (bool)"), + + + -- 27 respond_block / RespondBlock + + + -- 28 reject_block / RejectBlock + reject_block__height = ProtoField.uint32( + "chia.data.reject_block.height", + "height (uint32)"), + + + -- 29 request_blocks / RequestBlocks + request_blocks__start_height = ProtoField.uint32( + "chia.data.request_blocks.start_height", + "start_height (uint32)"), + request_blocks__end_height = ProtoField.uint32( + "chia.data.request_blocks.end_height", + "end_height (uint32)"), + request_blocks__include_transaction_block = ProtoField.bool( + "chia.data.request_blocks.include_transaction_block", + "include_transaction_block (bool)"), + + + -- 30 respond_blocks / RespondBlocks + respond_blocks__start_height = ProtoField.uint32( + "chia.data.respond_blocks.start_height", + "start_height (uint32)"), + respond_blocks__end_height = ProtoField.uint32( + "chia.data.respond_blocks.end_height", + "end_height (uint32)"), + respond_blocks__blocks__count = ProtoField.uint32( + "chia.data.respond_blocks.blocks.count", + "{blocks.count (uint32)}"), + + + -- 31 reject_blocks / RejectBlocks + reject_blocks__start_height = ProtoField.uint32( + "chia.data.reject_blocks.start_height", + "start_height (uint32)"), + reject_blocks__end_height = ProtoField.uint32( + "chia.data.reject_blocks.end_height", + "end_height (uint32)"), + + + -- 32 new_unfinished_block / NewUnfinishedBlock + new_unfinished_block__unfinished_reward_hash = ProtoField.bytes( + "chia.data.new_unfinished_block.unfinished_reward_hash", + "unfinished_reward_hash (bytes32)"), + + + -- 33 request_unfinished_block / RequestUnfinishedBlock + request_unfinished_block__unfinished_reward_hash = ProtoField.bytes( + "chia.data.request_unfinished_block.unfinished_reward_hash", + "unfinished_reward_hash (bytes32)"), + + + -- 34 respond_unfinished_block / RespondUnfinishedBlock + + + -- 35 new_signage_point_or_end_of_sub_slot / NewSignagePointOrEndOfSubSlot + new_signage_point_or_end_of_sub_slot__prev_challenge_hash__option = ProtoField.bool( + "chia.data.new_signage_point_or_end_of_sub_slot.prev_challenge_hash.option", + "{prev_challenge_hash.option (bool)}"), + new_signage_point_or_end_of_sub_slot__prev_challenge_hash = ProtoField.bytes( + "chia.data.new_signage_point_or_end_of_sub_slot.prev_challenge_hash", + "prev_challenge_hash (bytes32)"), + new_signage_point_or_end_of_sub_slot__challenge_hash = ProtoField.bytes( + "chia.data.new_signage_point_or_end_of_sub_slot.challenge_hash", + "challenge_hash (bytes32)"), + new_signage_point_or_end_of_sub_slot__index_from_challenge = ProtoField.uint8( + "chia.data.new_signage_point_or_end_of_sub_slot.index_from_challenge", + "index_from_challenge (uint8)"), + new_signage_point_or_end_of_sub_slot__last_rc_infusion = ProtoField.bytes( + "chia.data.new_signage_point_or_end_of_sub_slot.last_rc_infusion", + "last_rc_infusion (bytes32)"), + + + -- 36 request_signage_point_or_end_of_sub_slot / RequestSignagePointOrEndOfSubSlot + request_signage_point_or_end_of_sub_slot__challenge_hash = ProtoField.bytes( + "chia.data.request_signage_point_or_end_of_sub_slot.challenge_hash", + "challenge_hash (bytes32)"), + request_signage_point_or_end_of_sub_slot__index_from_challenge = ProtoField.uint8( + "chia.data.request_signage_point_or_end_of_sub_slot.index_from_challenge", + "index_from_challenge (uint8)"), + request_signage_point_or_end_of_sub_slot__last_rc_infusion = ProtoField.bytes( + "chia.data.request_signage_point_or_end_of_sub_slot", + "last_rc_infusion (bytes32)"), + + + -- 37 respond_signage_point / RespondSignagePoint + respond_signage_point__index_from_challenge = ProtoField.uint8( + "chia.data.respond_signage_point.index_from_challenge", + "index_from_challenge (uint8)"), + + + -- 38 respond_end_of_sub_slot / RespondEndOfSubSlot + + + -- 39 request_mempool_transactions / RequestMempoolTransactions + request_mempool_transactions__filter__length = ProtoField.uint32( + "chia.data.request_mempool_transactions.filter.length", + "{filter.length (uint32)}"), + request_mempool_transactions__filter = ProtoField.bytes( + "chia.data.request_mempool_transactions.filter", + "filter (bytes)"), + + + -- 40 request_compact_vdf / RequestCompactVDF + request_compact_vdf__height = ProtoField.uint32( + "chia.data.request_compact_vdf.height", + "height (uint32)"), + request_compact_vdf__header_hash = ProtoField.bytes( + "chia.data.request_compact_vdf.header_hash", + "header_hash (bytes32)"), + request_compact_vdf__field_vdf = ProtoField.uint8( + "chia.data.request_compact_vdf.field_vdf", + "field_vdf (uint8)"), + + + -- 41 respond_compact_vdf / RespondCompactVDF + respond_compact_vdf__height = ProtoField.uint32( + "chia.data.respond_compact_vdf.height", + "height (uint32)"), + respond_compact_vdf__header_hash = ProtoField.bytes( + "chia.data.respond_compact_vdf.header_hash", + "header_hash (bytes32)"), + respond_compact_vdf__field_vdf = ProtoField.uint8( + "chia.data.respond_compact_vdf.field_vdf", + "field_vdf (uint8)"), + + + -- 42 new_compact_vdf / NewCompactVDF + new_compact_vdf__height = ProtoField.uint32( + "chia.data.new_compact_vdf.height", + "height (uint32)"), + new_compact_vdf__header_hash = ProtoField.bytes( + "chia.data.new_compact_vdf.header_hash", + "header_hash (bytes32)"), + new_compact_vdf__field_vdf = ProtoField.uint8( + "chia.data.new_compact_vdf.field_vdf", + "field_vdf (uint8)"), + + + -- 43 request_peers / RequestPeers + + + -- 44 respond_peers / RespondPeers + respond_peers__peer_list__count = ProtoField.uint32( + "chia.data.respond_peers_peer_list.count", + "{peer_list.count (uint32)}"), + + + -- 45 request_puzzle_solution / RequestPuzzleSolution + request_puzzle_solution__coin_name = ProtoField.bytes( + "chia.data.request_puzzle_solution_coin_name", + "coin_name (bytes32)"), + request_puzzle_solution__height = ProtoField.uint32( + "chia.data.request_puzzle_solution_height", + "height (uint32)"), + + + -- 46 respond_puzzle_solution / RespondPuzzleSolution + respond_puzzle_solution__coin_name = ProtoField.bytes( + "chia.data.request_puzzle_solution_coin_name", + "coin_name (bytes32)"), + respond_puzzle_solution__height = ProtoField.uint32( + "chia.data.request_puzzle_solution_height", + "height (uint32)"), + respond_puzzle_solution__puzzle = ProtoField.bytes( + "chia.data.request_puzzle_solution_puzzle", + "puzzle (SerializedProgram)"), + respond_puzzle_solution__solution = ProtoField.bytes( + "chia.data.request_puzzle_solution_solution", + "solution (SerializedProgram)"), + + + -- 47 reject_puzzle_solution / RejectPuzzleSolution + reject_puzzle_solution__coin_name = ProtoField.bytes( + "rchia.data.eject_puzzle_solution.coin_name", + "coin_name (bytes32)"), + reject_puzzle_solution__height = ProtoField.uint32( + "rchia.data.eject_puzzle_solution.height", + "height (uint32)"), + + + -- 48 send_transaction / SendTransaction + + + -- 49 transaction_ack / TransactionAck + transaction_ack__txid = ProtoField.bytes( + "transaction_ack__txid.txid", + "txid (bytes32)"), + transaction_ack__status = ProtoField.uint8( + "transaction_ack__txid.status", + "status (uint8)"), + transaction_ack__status__enum = ProtoField.string( + "transaction_ack__txid.status.enum", + "status_enum (str)"), + transaction_ack__error__option = ProtoField.bool( + "transaction_ack__txid.error.option", + "{error.option (bool)}"), + transaction_ack__error__length = ProtoField.uint32( + "transaction_ack__txid.error.length", + "{error.length (uint32)}"), + transaction_ack__error = ProtoField.string( + "transaction_ack__txid.error", + "error (str)"), + + + -- 50 new_peak_wallet / NewPeakWallet + new_peak_wallet__header_hash = ProtoField.bytes( + "chia.data.new_peak_wallet.header_hash", + "header_hash (bytes32)"), + new_peak_wallet__height = ProtoField.uint32( + "chia.data.new_peak_wallet.height", + "height (uint32)"), + new_peak_wallet__weight = ProtoField.string( + "chia.data.new_peak_wallet.weight", + "weight (uint128)"), + new_peak_wallet__fork_point_with_previous_peak = ProtoField.uint32( + "chia.data.new_peak_wallet.fork_point_with_previous_peak", + "fork_point_with_previous_peak (uint32)"), + + + -- 51 request_block_header / RequestBlockHeader + request_block_header__height = ProtoField.uint32( + "chia.data.request_block_header.height", + "height (uint32)"), + + + -- 52 respond_block_header / RespondBlockHeader + + + -- 53 reject_header_request / RejectHeaderRequest + reject_header_request__height = ProtoField.uint32( + "reject_header_request.height", + "height (uint32)"), + + + -- 54 request_removals / RequestRemovals + request_removals__height = ProtoField.uint32( + "chia.data.request_removals.height", + "height (uint32)"), + request_removals__header_hash = ProtoField.bytes( + "chia.data.request_removals.header_hash", + "header_hash (bytes32)"), + request_removals__coin_names__option = ProtoField.bool( + "chia.data.request_removals.coin_names.option", + "coin_names.option (bool)"), + request_removals__coin_names__count = ProtoField.uint32( + "chia.data.request_removals.coin_names.count", + "coin_names.count (uint32)"), + request_removals__coin_names__coin_name = ProtoField.bytes( + "chia.data.request_removals.coin_names.coin_name", + "coin_name (bytes32)"), + + + -- 55 respond_removals / RespondRemovals + respond_removals__height = ProtoField.uint32( + "chia.data.respond_removals.height", + "height (uint32)"), + respond_removals__header_hash = ProtoField.bytes( + "chia.data.respond_removals.header_hash", + "header_hash (bytes32)"), + respond_removals__coins__coin_tuple__count = ProtoField.uint32( + "chia.data.respond_removals.coins.coin_tuple.count", + "{coin_tuple.count (uint32)}"), + respond_removals__coins__coin_tuple__bytes32 = ProtoField.bytes( + "chia.data.respond_removals.coins.coin_tuple.bytes32", + "bytes32 (bytes32)"), + respond_removals__coins__coin_tuple__coin__option = ProtoField.bool( + "chia.data.respond_removals.coins.coin_tuple.coin.option", + "{coin.option (bool)}"), + respond_removals__proofs__option = ProtoField.bool( + "chia.data.respond_removals.proofs.option", + "{proofs.option (bool)}"), + respond_removals__proofs__count = ProtoField.uint32( + "chia.data.respond_removals.proofs.count", + "{proofs.count (uint32)}"), + respond_removals__proofs__proof_tuple__bytes32 = ProtoField.bytes( + "chia.data.respond_removals.proofs.proof_tuple.bytes32", + "bytes32 (bytes32)"), + respond_removals__proofs__proof_tuple__bytes__length = ProtoField.uint32( + "chia.data.respond_removals.proofs.proof_tuple.bytes.length", + "{bytes.length (uint32)}"), + respond_removals__proofs__proof_tuple__bytes = ProtoField.bytes( + "chia.data.respond_removals.proofs.proof_tuple.bytes", + "bytes (bytes)"), + + + -- 56 reject_removals_request / RejectRemovalsRequest + reject_removals_request__height = ProtoField.uint32( + "chia.data.reject_removals_request.height", + "height (uint32)"), + reject_removals_request__header_hash = ProtoField.uint32( + "chia.data.reject_removals_request.header_hash", + "header_hash (bytes32)"), + + + -- 57 request_additions / RequestAdditions + request_additions__height = ProtoField.uint32( + "chia.data.request_additions.height", + "height (uint32)"), + request_additions__header_hash__option = ProtoField.bool( + "chia.data.request_additions.header_hash.option", + "{header_hash.option (bool)}"), + request_additions__header_hash = ProtoField.bytes( + "chia.data.request_additions.header_hash", + "header_hash (bytes32)"), + request_additions__puzzle_hashes__option = ProtoField.bool( + "chia.data.request_additions.puzzle_hashes.option", + "{puzzle_hashes.option (bool)}"), + request_additions__puzzle_hashes__count = ProtoField.uint32( + "chia.data.request_additions.puzzle_hashes.count", + "{puzzle_hashes.count (uint32)}"), + request_additions__puzzle_hash = ProtoField.bytes( + "chia.data.request_additions.puzzle_hashes", + "puzzle_hash (bytes32)"), + + + -- 58 respond_additions / RespondAdditions + respond_additions__height = ProtoField.uint32( + "chia.data.respond_additions.height", + "height (uint32)"), + respond_additions__header_hash = ProtoField.bytes( + "chia.data.respond_additions.header_hash", + "header_hash (bytes32)"), + respond_additions__coins__count = ProtoField.uint32( + "chia.data.respond_additions.coins.count", + "{coins.count (uint32)}"), + respond_additions__coins__bytes32 = ProtoField.bytes( + "chia.data.respond_additions.coins.bytes32", + "bytes32 (bytes32)"), + respond_additions__coins__coin__count= ProtoField.uint32( + "chia.data.respond_additions.coins.coin.coint", + "{list[Coin].count (uint32)}"), + respond_additions__proofs__option = ProtoField.bool( + "chia.data.respond_additions.proofs.option", + "{proofs.option (bool)}"), + respond_additions__proofs__count = ProtoField.uint32( + "chia.data.respond_additions.proofs.count", + "{proofs.count (uint32)}"), + respond_additions__proofs__proof_tuple__bytes32 = ProtoField.bytes( + "chia.data.respond_additions.proofs.proof.bytes32", + "bytes32 (bytes32)"), + respond_additions__proofs__proof_tuple__bytes__length = ProtoField.uint32( + "chia.data.respond_additions.proofs.proof.bytes.length", + "{bytes.length (uint32)}"), + respond_additions__proofs__proof_tuple__bytes = ProtoField.bytes( + "chia.data.respond_additions.proofs.proof.bytes", + "bytes (bytes)"), + respond_additions__proofs__proof_tuple__bytes2__option = ProtoField.bool( + "chia.data.respond_additions.proofs.proof.bytes2__option", + "{bytes.option (bool)}"), + respond_additions__proofs__proof_tuple__bytes2__length = ProtoField.uint32( + "chia.data.respond_additions.proofs.proof.bytes2__length", + "{bytes.length (uint32)}"), + respond_additions__proofs__proof_tuple__bytes2 = ProtoField.bytes( + "chia.data.respond_additions.proofs.proof.bytes2", + "bytes (bytes)"), + + + -- 59 reject_additions_request / RejectAdditionsRequest + reject_additions_request__height = ProtoField.uint32( + "chia.data.reject_additions_request.height", + "height (uint32)"), + reject_additions_request__header_hash = ProtoField.uint32( + "chia.data.reject_additions_request.header_hash", + "header_hash (bytes32)"), + + + -- 60 request_header_blocks / RequestHeaderBlocks + request_header_blocks__start_height = ProtoField.uint32( + "chia.data.request_header_blocks.start_height", + "start_height (uint32)"), + request_header_blocks__end_height = ProtoField.uint32( + "chia.data.request_header_blocks.end_height", + "end_height (uint32)"), + + + -- 61 reject_header_blocks / RejectHeaderBlocks + reject_header_blocks__start_height = ProtoField.uint32( + "chia.data.reject_header_blocks.start_height", + "start_height (uint32)"), + reject_header_blocks__end_height = ProtoField.uint32( + "chia.data.reject_header_blocks.end_height", + "end_height (uint32)"), + + + -- 62 respond_header_blocks / RespondHeaderBlocks + respond_header_blocks__start_height = ProtoField.uint32( + "chia.data.respond_header_blocks.start_height", + "start_height (uint32)"), + respond_header_blocks__end_height = ProtoField.uint32( + "chia.data.respond_header_blocks.end_height", + "end_height (uint32)"), + + + -- 63 request_peers_introducer / RequestPeersIntroducer + + + -- 64 respond_peers_introducer / RespondPeersIntroducer + respond_peers_introducer__peer_list__count = ProtoField.uint32( + "chia.data.respond_peers_introducer.peer_list.count", + "{peer_list.count (uint32)}"), + + + -- 65 farm_new_block / FarmNewBlockProtocol + farm_new_block__puzzle_hash = ProtoField.bytes( + "chia.data.farm_new_block.puzzle_hash", + "puzzle_hash (bytes32)"), + + + -- 66 new_signage_point_harvester / NewSignagePointHarvester + new_signage_point_harvester__challenge_hash = ProtoField.bytes( + "chia.data.new_signage_point_harvester.challenge_hash", + "challenge_hash (bytes32)"), + new_signage_point_harvester__difficulty = ProtoField.uint64( + "chia.data.new_signage_point_harvester.difficulty", + "difficulty (uint64)"), + new_signage_point_harvester__sub_slot_iters = ProtoField.uint64( + "chia.data.new_signage_point_harvester.sub_slot_iters", + "sub_slot_iters (uint64)"), + new_signage_point_harvester__signage_point_index = ProtoField.uint8( + "chia.data.new_signage_point_harvester.signage_point_index", + "signage_point_index (uint8)"), + new_signage_point_harvester__sp_hash = ProtoField.bytes( + "chia.data.new_signage_point_harvester.sp_hash", + "sp_hash (bytes32)"), + new_signage_point_harvester__pool_difficulties__count = ProtoField.uint32( + "chia.data.new_signage_point_harvester.pool_difficulties.count", + "{pool_difficulties.count}"), + new_signage_point_harvester__PoolDifficulty__difficulty = ProtoField.uint64( + "chia.data.new_signage_point_harvester.PoolDifficulty.difficulty", + "difficulty (uint64)"), + new_signage_point_harvester__PoolDifficulty__sub_slot_iters = ProtoField.uint64( + "chia.data.new_signage_point_harvester.PoolDifficulty.sub_slot_iters", + "sub_slot_iters (uint64)"), + new_signage_point_harvester__PoolDifficulty__pool_contract_puzzle_hash = ProtoField.bytes( + "chia.data.new_signage_point_harvester.PoolDifficulty.pool_contract_puzzle_hash", + "pool_contract_puzzle_hash (bytes32)"), + new_signage_point_harvester__filter_prefix_bits = ProtoField.uint8( + "chia.data.new_signage_point_harvester.filter_prefix_bits", + "filter_prefix_bits (uint8)"), + + + -- 67 request_plots / RequestPlots + + + -- 68 respond_plots / RespondPlots + respond_plots__failed_to_open_filenames__count = ProtoField.uint32( + "chia.data.respond_plots.failed_to_open_filenames.count", + "{failed_to_open_filenames.count (uint32)}"), + respond_plots__failed_to_open_filenames__filename__length = ProtoField.uint32( + "chia.data.respond_plots.failed_to_open_filenames.filename.length", + "{filename.length (uint32)}"), + respond_plots__failed_to_open_filenames__filename = ProtoField.string( + "chia.data.respond_plots.failed_to_open_filenames.filename", + "filename (str)"), + respond_plots__no_key_filenames__count = ProtoField.uint32( + "chia.data.respond_plots.no_key_filenames.count", + "{no_key_filenames.count (uint32)}"), + respond_plots__no_key_filenames__filename__length = ProtoField.uint32( + "chia.data.respond_plots.no_key_filenames.filename.length", + "{filename.length (uint32)}"), + respond_plots__no_key_filenames__filename = ProtoField.string( + "chia.data.respond_plots.no_key_filenames.filename", + "filename (str)"), + + + -- 69 coin_state_update / CoinStateUpdate + coin_state_update__height = ProtoField.uint32( + "chia.data.coin_state_update.height", + "height (uint32)"), + coin_state_update__fork_height = ProtoField.uint32( + "chia.data.coin_state_update.fork_height", + "fork_height (uint32)"), + coin_state_update__peak_hash = ProtoField.bytes( + "chia.data.coin_state_update.peak_hash", + "peak_hash (bytes32)"), + coin_state_update__items__count = ProtoField.uint32( + "chia.data.coin_state_update.items.count", + "{items.count (uint32)}"), + + + -- 70 register_for_ph_updates / RegisterForPhUpdates + register_for_ph_updates__puzzle_hash = ProtoField.bytes( + "chia.data.register_for_ph_updates.puzzle_hash", + "puzzle_hash (bytes32)"), + register_for_ph_updates__puzzle_hashes__count = ProtoField.uint32( + "chia.data.register_for_ph_updates.puzzle_hashes.count", + "{puzzle_hashes.count (uint32)}"), + register_for_ph_updates__min_height = ProtoField.uint32( + "chia.data.register_for_ph_updates.min_height", + "min_height (uint32)"), + + + -- 71 respond_to_ph_updates / RespondToPhUpdates + respond_to_ph_updates__puzzle_hashes__count = ProtoField.uint32( + "chia.data.to_ph_update.puzzle_hashes.count", + "{puzzle_hashes.count (uint32)}"), + respond_to_ph_updates__puzzle_hash = ProtoField.bytes( + "chia.data.respond_to_ph_updates.puzzle_hash", + "puzzle_hash (Bytes32)"), + respond_to_ph_updates__min_height = ProtoField.uint32( + "chia.data.respond_to_ph_updates.min_height", + "min_height (u32)"), + respond_to_ph_updates__coin_states__count = ProtoField.uint32( + "chia.data.respond_to_ph_updates.coin_states.count", + "{coin_states.count (uint32)}"), + + + -- 72 register_for_coin_updates / RegisterForCoinUpdates + register_for_coin_updates__coin_ids__count = ProtoField.uint32( + "chia.data.register_for_coin_updates.coin_ids.count", + "{coin_ids.count (uint32)}"), + register_for_coin_updates__coin_ids__coin_id = ProtoField.bytes( + "chia.data.register_for_coin_updates.coin_ids.coin_id", + "coin_id (bytes32)"), + register_for_coin_updates__min_height = ProtoField.uint32( + "chia.data.register_for_coin_updates.min_height", + "min_height (uint32)"), + + + -- 73 respond_to_coin_updates / RespondToCoinUpdates + respond_to_coin_updates__coin_ids__count = ProtoField.uint32( + "chia.data.respond_to_coin_updates.coin_ids.count", + "{coin_ids.count (uint32)}"), + respond_to_coin_updates__coin_ids__coin_id = ProtoField.bytes( + "chia.data.respond_to_coin_updates.coin_ids.coin_id", + "coin_id (bytes32)"), + respond_to_coin_updates__min_height = ProtoField.uint32( + "chia.data.respond_to_coin_updates.min_height", + "min_height (uint32)"), + respond_to_coin_updates__coin_states__count = ProtoField.uint32( + "chia.data.respond_to_coin_updates.coin_states.count", + "{coin_states.count (uint32)}"), + + + -- 74 request_children / RequestChildren + request_children__coin_name = ProtoField.bytes( + "chia.data.request_children.coin_name", + "coin_name (bytes32)"), + + + -- 75 respond_children / RespondChildren + respond_children__coin_states__count = ProtoField.uint32( + "chia.data.respond_children.coin_states.count", + "{coin_states.count (uint32)}"), + + + -- 76 request_ses_hashes / RequestSESInfo + request_ses_hashes__start_height = ProtoField.uint32( + "chia.data.request_ses_hashes.start_height", + "start_height (uint32)"), + request_ses_hashes__end_height = ProtoField.uint32( + "chia.data.request_ses_hashes.end_height", + "end_height (uint32)"), + + + -- 77 respond_ses_hashes / RespondSESInfo + respond_ses_hashes__reward_chain_hash__count = ProtoField.uint32( + "chia.data.respond_ses_hashes.reward_chain_hash.count", + "{reward_chain_hash.count (uint32)}"), + respond_ses_hashes__reward_chain_hash = ProtoField.bytes( + "chia.data.respond_ses_hashes.reward_chain_hash", + "reward_chain_hash (bytes32)"), + respond_ses_hashes__heights__count = ProtoField.uint32( + "chia.data.respond_ses_hashes.heights.count", + "{heights.count (uint32)}"), + respond_ses_hashes__heights__heights_list__count = ProtoField.uint32( + "chia.data.respond_ses_hashes.heights.heights_list.count", + "{heights_list.count (uint32)}"), + respond_ses_hashes__heights__heights_list__height = ProtoField.uint32( + "chia.data.respond_ses_hashes.heights_list.height", + "height (uint32)"), + + + -- 78 plot_sync_start / PlotSyncStart + plot_sync_start__initial = ProtoField.bool( + "chia.data.plot_sync_start.initial", + "initial (bool)"), + plot_sync_start__last_sync_id = ProtoField.uint64( + "chia.data.plot_sync_start.last_sync_id", + "last_sync_id (uint64)"), + plot_sync_start__plot_file_count = ProtoField.uint32( + "chia.data.plot_sync_start.plot_file_count", + "{plot_file.count (uint32)}"), + plot_sync_start__harvesting_mode = ProtoField.uint8( + "chia.data.plot_sync_start.harvesting_mode", + "harvesting_mode (uint8)"), + plot_sync_start__harvesting_mode__enum = ProtoField.string( + "chia.data.plot_sync_start.harvesting_mode.enum", + "harvesting_mode.enum (str)"), + + + -- 79 plot_sync_loaded / PlotSyncPlotList + plot_sync_loaded__data__count = ProtoField.uint32( + "chia.data.plot_sync_loaded.data.count", + "{data.count (uint32)}"), + plot_sync_loaded__final = ProtoField.bool( + "chia.data.plot_sync_loaded.final", + "final (bool)"), + + + -- 80 plot_sync_removed / PlotSyncPathtList + + -- 81 plot_sync_invalid / PlotSyncPathtList + + -- 82 plot_sync_keys_missing / PlotSyncPathtList + + -- 83 plot_sync_duplicates / PlotSyncPathtList + + + -- 84 plot_sync_done / PlotSyncDone + plot_sync_done__duration = ProtoField.uint64( + "chia.data.plot_sync_done.duration", + "duration (uint64)"), + + + -- 85 plot_sync_response / PlotSyncResponse + plot_sync_response__message_type = ProtoField.uint16( + "chia.data.plot_sync_response.message_type", + "message_type (uint16)"), + plot_sync_response__error__option = ProtoField.bool( + "chia.data.plot_sync_response.error.option", + "{error.option (bool)}"), + plot_sync_response__error__code = ProtoField.int16( + "chia.data.plot_sync_response.error.code", + "code (int16)"), + plot_sync_response__error__code__enum = ProtoField.string( + "chia.data.plot_sync_response.error.code.enum", + "code.enum (str)"), + plot_sync_response__error__message__length = ProtoField.uint32( + "chia.data.plot_sync_response.error.message.length", + "{message.length (uint32)}"), + plot_sync_response__error__message = ProtoField.string( + "chia.data.plot_sync_response.error.message", + "message (str)"), + plot_sync_response__error__expected_identifier__option = ProtoField.bool( + "chia.data.plot_sync_response.error.expected_identifier.option", + "{expected_identifier.option (bool)}"), + + + -- 86 request_block_headers / RequestBlockHeaders + request_block_headers__start_height = ProtoField.uint32( + "chia.data.request_block_headers.start_height", + "start_height (uint32)"), + request_block_headers__end_height = ProtoField.uint32( + "chia.data.request_block_headers.end_height", + "end_height (uint32)"), + request_block_headers__return_filter = ProtoField.bool( + "chia.data.request_block_headers.return_filter", + "return_filter (bool)"), + + + -- 87 reject_block_headers / RejectBlockHeaders + reject_block_headers__start_height = ProtoField.uint32( + "chia.data.reject_block_headers.start_height", + "start_height (uint32)"), + reject_block_headers__end_height = ProtoField.uint32( + "chia.data.reject_block_headers.end_height", + "end_height (uint32)"), + + + -- 88 respond_block_headers / RespondBlockHeaders + respond_block_headers__start_height = ProtoField.uint32( + "chia.data.respond_block_headers.start_height", + "start_height (uint32)"), + respond_block_headers__end_height = ProtoField.uint32( + "chia.data.respond_block_headers.end_height", + "end_height (uint32)"), + respond_block_headers__header_blocks__count = ProtoField.uint32( + "chia.data.respond_block_headers.header_blocks.count", + "{header_blocks_count (uint32)}"), + + + -- 89 request_fee_estimates / RequestFeeEstimates + request_fee_estimates__time_targets__count = ProtoField.uint32( + "chia.data.request_fee_estimates.time_targets.count", + "{time_targets.count (uint32)}"), + request_fee_estimates__time_targets__time_target = ProtoField.uint64( + "chia.data.request_fee_estimates.time_targets.time_target", + "time_target (uint64)"), + + + -- 90 respond_fee_estimates / RespondFeeEstimates + respond_fee_estimates__error__option = ProtoField.bool( + "chia.data.respond_fee_estimates.error.option", + "{error.option (bool)}"), + respond_fee_estimates__error__length = ProtoField.uint32( + "chia.data.respond_fee_estimates.error.length", + "{error.length (uint32)}"), + respond_fee_estimates__error = ProtoField.string( + "chia.data.respond_fee_estimates.error", + "error (str)"), + respond_fee_estimates__estimates__count = ProtoField.uint32( + "chia.data.respond_fee_estimates.estimates.count", + "{estimates.count (uint32)}"), + respond_fee_estimates__estimates__error__option = ProtoField.bool( + "chia.data.respond_fee_estimates.estimates.error.option", + "{error.option (bool)}"), + respond_fee_estimates__estimates__error__length = ProtoField.uint32( + "chia.data.respond_fee_estimates.estimates.error.length", + "{error.length (uint32)}"), + respond_fee_estimates__estimates__error = ProtoField.string( + "chia.data.respond_fee_estimates.estimates.error", + "error (str)"), + respond_fee_estimates__estimates__time_target = ProtoField.uint64( + "chia.data.respond_fee_estimates.estimates.time_target", + "time_target (uint64)"), + respond_fee_estimates__estimates__estimated_fee_rate__mojos_per_clvm_cost = ProtoField.uint64( + "chia.data.respond_fee_estimates.estimates.estimated_fee_rate.mojos_per_clvm_cost", + "mojos_per_clvm_cost (uint64)"), + + + -- 91 (deprecated) none_response / NoneResponse + + + -- 92 new_unfinished_block2 / NewUnfinishedBlock2 + new_unfinished_block2__unfinished_reward_hash = ProtoField.bytes( + "chia.data.new_unfinished_block2.unfinished_reward_hash", + "unfinished_reward_hash (bytes32)"), + new_unfinished_block2__foliage_hash__option = ProtoField.bool( + "chia.data.new_unfinished_block2.foliage_hash.option", + "{foliage_hash.option (bool)}"), + new_unfinished_block2__foliage_hash = ProtoField.bytes( + "chia.data.new_unfinished_block2.foliage_hash", + "foliage_hash (bytes32)"), + + + -- 93 request_unfinished_block2 / RequestUnfinishedBlock2 + request_unfinished_block2__unfinished_reward_hash = ProtoField.bytes( + "chia.data.request_unfinished_block2.unfinished_reward_hash", + "unfinished_reward_hash (bytes32)"), + request_unfinished_block2__foliage_hash__option = ProtoField.bool( + "chia.data.request_unfinished_block2.foliage_hash.option", + "{foliage_hash.option (bool)}"), + request_unfinished_block2__foliage_hash = ProtoField.bytes( + "chia.data.request_unfinished_block2.foliage_hash", + "foliage_hash (bytes32)"), + + + -- 94 request_remove_puzzle_subscriptions / RequestRemovePuzzleSubscriptions + request_remove_puzzle_subscriptions__puzzle_hashes__option = ProtoField.bool( + "chia.data.request_remove_puzzle_subscriptions.puzzle_hashes.option", + "{puzzle_hashes.option (bool)}"), + request_remove_puzzle_subscriptions__puzzle_hashes__count = ProtoField.uint32( + "chia.data.request_remove_puzzle_subscriptions.puzzle_hashes.count", + "{puzzle_hashes.count (uint32)}"), + request_remove_puzzle_subscriptions__puzzle_hash = ProtoField.bytes( + "chia.data.request_remove_puzzle_subscriptions.puzzle_hashes.puzzle_hash", + "puzzle_hash (bytes32)"), + + + -- 95 respond_remove_puzzle_subscriptions / RespondRemovePuzzleSubscriptions + respond_remove_puzzle_subscriptions__puzzle_hashes__option = ProtoField.bool( + "chia.data.respond_remove_puzzle_subscriptions.puzzle_hashes.option", + "{puzzle_hashes.option (bool)}"), + respond_remove_puzzle_subscriptions__puzzle_hashes__count = ProtoField.uint32( + "chia.data.respond_remove_puzzle_subscriptions.puzzle_hashes.count", + "{puzzle_hashes.count (uint32)}"), + respond_remove_puzzle_subscriptions__puzzle_hash = ProtoField.bytes( + "chia.data.respond_remove_puzzle_subscriptions.puzzle_hashes.puzzle_hash", + "puzzle_hash (bytes32)"), + + + -- 96 request_remove_coin_subscriptions / RequestRemoveCoinSubscriptions + request_remove_coin_subscriptions__puzzle_hashes__option = ProtoField.bool( + "chia.data.request_remove_coin_subscriptions.puzzle_hashes.option", + "{puzzle_hashes.option (bool)}"), + request_remove_coin_subscriptions__puzzle_hashes__count = ProtoField.uint32( + "chia.data.request_remove_coin_subscriptions.puzzle_hashes.count", + "{puzzle_hashes.count (uint32)}"), + request_remove_coin_subscriptions__puzzle_hash = ProtoField.bytes( + "chia.data.request_remove_coin_subscriptions.puzzle_hashes.puzzle_hash", + "puzzle_hash (bytes32)"), + + + -- 97 respond_remove_coin_subscriptions / RespondRemoveCoinSubscriptions + respond_remove_coin_subscriptions__coin_ids__count = ProtoField.uint32( + "chia.data.respond_remove_coin_subscriptions.coin_ids.count", + "{coin_ids.count (uint32)}"), + respond_remove_coin_subscriptions__coin_ids__coin_id = ProtoField.bytes( + "chia.data.respond_remove_coin_subscriptions.coin_ids.coin_id", + "coin_id (bytes32)"), + + + -- 98 request_puzzle_state / RequestPuzzleState + request_puzzle_state__puzzle_hashes__count = ProtoField.uint32( + "chia.data.request_puzzle_state.puzzle_hashes.count", + "{puzzle_hashes.count (uint32)}"), + request_puzzle_state__puzzle_hashes = ProtoField.bytes( + "chia.data.request_puzzle_state.puzzle_hash", + "puzzle_hash (bytes32)"), + request_puzzle_state__previous_height__option = ProtoField.bool( + "chia.data.request_puzzle_state.previous_height.option", + "{previous_height.option (bool)}"), + request_puzzle_state__previous_height = ProtoField.uint32( + "chia.data.request_puzzle_state.previous_height", + "previous_height (uint32)"), + request_puzzle_state__header_hash = ProtoField.bytes( + "chia.data.request_puzzle_state.header_hash", + "header_hash (bytes32)"), + request_puzzle_state__filters__include_spent = ProtoField.bool( + "chia.data.request_puzzle_state.filters.include_spent", + "include_spent (bool)"), + request_puzzle_state__filters__include_unspent = ProtoField.bool( + "chia.data.request_puzzle_state.filters.include_unspent", + "include_unspent (bool)"), + request_puzzle_state__filters__include_hinted = ProtoField.bool( + "chia.data.request_puzzle_state.filters.include_hinted", + "include_hinted (bool)"), + request_puzzle_state__filters__min_amount = ProtoField.uint64( + "chia.data.request_puzzle_state.filters.filters__min_amount", + "filters__min_amount (uint64)"), + request_puzzle_state__subscribe_when_finished = ProtoField.bool( + "chia.data.request_puzzle_state.subscribe_when_finished", + "subscribe_when_finished (bool)"), + + + -- 99 respond_puzzle_state / RespondPuzzleState + respond_puzzle_state__puzzle_hashes__count = ProtoField.uint32( + "chia.data.respond_puzzle_state.puzzle_hashes.count", + "{puzzle_hashes.count (uint32)}"), + respond_puzzle_state__puzzle_hashes__puzzle_hash = ProtoField.bytes( + "chia.data.respond_puzzle_state.puzzle_hashes.puzzle_hash", + "puzzle_hash (bytes32)"), + respond_puzzle_state__height = ProtoField.uint32( + "chia.data.respond_puzzle_state.height", + "height (uint32)"), + respond_puzzle_state__header_hash = ProtoField.bytes( + "chia.data.respond_puzzle_state.header_hash", + "header_hash (bytes32)"), + respond_puzzle_state__is_finished = ProtoField.bool( + "chia.data.respond_puzzle_state.is_finished", + "is_finished (bool)"), + respond_puzzle_state__coin_states__count = ProtoField.uint32( + "chia.data.respond_puzzle_state.coin_states.count", + "{coin_states.count (uint32)}"), + + + -- 100 reject_puzzle_state / RejectPuzzleState + reject_puzzle_state__reason = ProtoField.uint8( + "chia.data.reject_puzzle_state.reason", + "reason (uint8)"), + reject_puzzle_state__reason__enum = ProtoField.string( + "chia.data.reject_puzzle_state.reason.enum", + "reason.enum (str)"), + + + -- 101 request_coin_state / RequestCoinState + request_coin_state__coin_ids__count = ProtoField.uint32( + "chia.data.request_coin_state.coin_ids.count", + "{coin_ids.count (uint32)}"), + request_coin_state__coin_ids__coin_id = ProtoField.bytes( + "chia.data.request_coin_state.coin_ids.coin_id", + "coin_id (bytes32)"), + request_coin_state__previous_height__option = ProtoField.bool( + "chia.data.request_coin_state.previous_height.option", + "{previous_height.option (bool)}"), + request_coin_state__previous_height = ProtoField.uint32( + "chia.data.request_coin_state.previous_height", + "previous_height (uint32)"), + request_coin_state__header_hash = ProtoField.bytes( + "chia.data.request_coin_state.header_hash", + "header_hash (bytes32)"), + request_coin_state__subscribe = ProtoField.bool( + "chia.data.request_coin_state.subscribe", + "subscribe_when_finished (bool)"), + + + -- 102 respond_coin_state / RespondCoinState + respond_coin_state__coin_ids__count = ProtoField.uint32( + "chia.data.respond_coin_state.coin_ids.count", + "{coin_ids.count (uint32)}"), + respond_coin_state__coin_ids__coin_id = ProtoField.uint32( + "chia.data.respond_coin_state.coin_ids.coin_id", + "coin_id (bytes32)"), + respond_coin_state__coin_states__count = ProtoField.uint32( + "chia.data.respond_coin_state.coin_states.count", + "{coin_states.count (uint32)}"), + + + -- 103 reject_coin_state / RejectCoinState + reject_coin_state__reason = ProtoField.uint8( + "chia.data.reject_coin_state.reason", + "reason (uint8)"), + reject_coin_state__reason__enum = ProtoField.string( + "chia.data.reject_coin_state.reason.enum", + "reason.enum (str)"), + + + -- 104 mempool_items_added / MempoolItemsAdded + mempool_items_added__transaction_ids__count = ProtoField.uint32( + "chia.data.mempool_items_added.transaction_ids.count", + "{transaction_id.count (uint32)}"), + mempool_items_added__transaction_ids__transaction_id = ProtoField.bytes( + "chia.data.mempool_items_added.transaction_ids.transaction_id", + "transaction_id (bytes32)"), + + + -- 105 mempool_items_removed / MempoolItemsRemoved + mempool_items_removed__removed_items__count = ProtoField.uint32( + "chia.data.mempool_items_removed.removed_items.count", + "{removed_items.count (uint32)}"), + mempool_items_removed__removed_items__transaction_id = ProtoField.bytes( + "chia.data.mempool_items_removed.removed_items.transaction_id", + "transaction_id (bytes32)"), + mempool_items_removed__removed_items__reason = ProtoField.uint8( + "chia.data.mempool_items_removed.removed_items.reason", + "reason (uint8)"), + mempool_items_removed__removed_items__reason__enum = ProtoField.string( + "chia.data.mempool_items_removed.removed_items.reason.enum", + "{reason.enum (str)}"), + + + -- 106 request_cost_info / RequestCostInfo + + + -- 107 respond_cost_info / RespondCostInfo + respond_cost_info__max_transaction_cost = ProtoField.uint64( + "chia.data.respond_cost_info.max_transaction_cost", + "max_transaction_cost (int64)"), + respond_cost_info__max_block_cost = ProtoField.uint64( + "chia.data.respond_cost_info.max_block_cost", + "max_block_cost (uint64)"), + respond_cost_info__max_mempool_cost = ProtoField.uint64( + "chia.data.respond_cost_info.max_mempool_cost", + "max_mempool_cost (uint64)"), + respond_cost_info__mempool_cost = ProtoField.uint64( + "chia.data.respond_cost_info.mempool_cost", + "mempool_cost (uint64)"), + respond_cost_info__mempool_fee = ProtoField.uint64( + "chia.data.respond_cost_info.mempool_fee", + "mempool_fee (uint64)"), + respond_cost_info__bump_fee_per_cost = ProtoField.uint8( + "chia.data.respond_cost_info.bump_fee_per_cost", + "bump_fee_per_cost (uint8)"), + + + -- 255 error / Error + error__code = ProtoField.uint16( + "chia.data.error.code", + "code (uint16)"), + error__message__length = ProtoField.uint32( + "chia.data.error.message.length", + "{message.length (uint32)}"), + error__message = ProtoField.string( + "chia.data.error.message", + "message (str)"), + error__data__option = ProtoField.bool( + "chia.data.error.data.option", + "{data.option (bool)}"), + error__data__length = ProtoField.uint32( + "chia.data.error.data.length", + "{data.length (uint32)}"), + error__data = ProtoField.uint32( + "chia.data.error.data", + "data (bytes)"), + +-------------------------------------------------------------------------------- +-- ProtoField variables of functions that get called by multiple message types +-------------------------------------------------------------------------------- + + -- misc. dissector fields + dissector__deprecated_message_type = ProtoField.bytes( + "dissector.deprecated_message_type", + "{dissector.deprecated_message_type (bytes)}"), + dissector__unknown_message_type = ProtoField.bytes( + "dissector.unknown_message_type", + "{dissector.unknown_message_type (bytes)}"), + dissector__error = ProtoField.string("dissector.error", + "{dissector.error (str)}"), + + + -- Block + Block__finished_sub_slots__count = ProtoField.uint32( + "chia.data.Block.finished_sub_slots.count", + "{finished_sub_slots.count (uint32)}"), + Block__reward_chain_sp_proof__option = ProtoField.bool( + "chia.data.reward_chain_sp_proof.option", + "{reward_chain_sp_proof.option (bool)}"), + Block__challenge_chain_sp_proof__option = ProtoField.bool( + "chia.data.challenge_chain_sp_proof.option", + "{challenge_chain_sp_proof.option (bool)}"), + Block__infused_challenge_chain_ip_proof__option = ProtoField.bool( + "chia.data.Block.infused_challenge_chain_ip_proof.option", + "{reward_chain_sp_proof.option (bool)}"), + Block__foliage_transaction_block__option = ProtoField.bool( + "chia.data.Block.foliage_transaction_block.option", + "{foliage_transaction_block.option (bool)}"), + Block__transactions_info__option = ProtoField.bool( + "chia.data.Block.transactions_info.option", + "{transactions_info.option (bool)}"), + Block__transactions_info__generator_root = ProtoField.bytes( + "chia.data.Block.transactions_info.generator_root", + "generator_root (Bytes32)"), + Block__transactions_info__generator_refs_root = ProtoField.bytes( + "chia.data.Block.transactions_info.generator_refs_root", + "generator_refs_root (Bytes32)"), + Block__transactions_info__aggregated_signature = ProtoField.bytes( + "chia.data.Block.transactions_info.aggregated_signature", + "aggregated_signature (G2Element)"), + Block__transactions_info__fees = ProtoField.uint64( + "chia.data.Block.transactions_info.fees", + "fees (u64)"), + Block__transactions_info__cost = ProtoField.uint64( + "chia.data.Block.transactions_info.cost", + "cost (u64)"), + Block__transactions_info__reward_claims_incorporated__count = ProtoField.uint32( + "chia.data.Block.transactions_info.reward_claims_incorporated.count", + "{reward_claims_incorporated.count (uint32)}"), + Block__transaction_generator= ProtoField.bytes( + "chia.data.Block.transaction_generator", + "transaction_generator (Program)"), + + + -- ClassgroupElement + ClassgroupElement__data = ProtoField.bytes( + "chia.data.ClassgroupElement.data", + "data (Bytes100)"), + + + -- Coin + Coin__parent_coin_info = ProtoField.bytes( + "chia.data.Coin.parent_coin_info", + "parent_coin_info (Bytes32)"), + Coin__puzzle_hash = ProtoField.bytes( + "chia.data.Coin.puzzle_hash", + "puzzle_hash (Bytes32)"), + Coin__amount = ProtoField.uint64( + "chia.data.Coin.amount", + "amount (u64)"), + + + -- CoinState + CoinState__spent_height__option = ProtoField.bool( + "chia.data.CoinState.spent_height.option", + "{spent_height.option (bool)}"), + CoinState__spent_height = ProtoField.uint32( + "chia.data.CoinState.spent_height", + "spent_height (u32)"), + CoinState__created_height__option = ProtoField.bool( + "chia.data.CoinState.created_height.option", + "{created_height.option (bool)}"), + CoinState__created_height = ProtoField.uint32( + "chia.data.CoinState.created_height", + "created_height (u32)"), + + + -- EndOfSubSlotBundle + EndOfSubSlotBundle__challenge_chain__infused_challenge_chain_sub_slot_hash__option = ProtoField.bool( + "chia.data.EndOfSubSlotBundle.challenge_chain.infused_challenge_chain_sub_slot_hash.option", + "{infused_challenge_chain_sub_slot_hash.option (bool)}"), + EndOfSubSlotBundle__challenge_chain__infused_challenge_chain_sub_slot_hash = ProtoField.bytes( + "chia.data.EndOfSubSlotBundle.challenge_chain.infused_challenge_chain_sub_slot_hash", + "infused_challenge_chain_sub_slot_hash (Bytes32)"), + EndOfSubSlotBundle__challenge_chain__subepoch_summary_hash__option = ProtoField.bool( + "chia.data.EndOfSubSlotBundle.challenge_chain.subepoch_summary_hash.option", + "{subepoch_summary_hash.option (bool)}"), + EndOfSubSlotBundle__challenge_chain__subepoch_summary_hash = ProtoField.bytes( + "chia.data.EndOfSubSlotBundle.challenge_chain.subepoch_summary_hash", + "subepoch_summary_hash (Bytes32)"), + EndOfSubSlotBundle__challenge_chain__new_sub_slot_iters__option = ProtoField.bool( + "chia.data.EndOfSubSlotBundle.challenge_chain.new_sub_slot_iters.option", + "{new_sub_slot_iters.option (bool)}"), + EndOfSubSlotBundle__challenge_chain__new_sub_slot_iters = ProtoField.uint64( + "chia.data.EndOfSubSlotBundle.challenge_chain.new_sub_slot_iters", + "new_sub_slot_iters (u64)"), + EndOfSubSlotBundle__challenge_chain__new_difficulty__option = ProtoField.bool( + "chia.data.EndOfSubSlotBundle.challenge_chain.new_difficulty.option", + "{new_difficulty.option (bool)}"), + EndOfSubSlotBundle__challenge_chain__new_difficulty = ProtoField.uint64( + "chia.data.EndOfSubSlotBundle.challenge_chain.new_difficulty", + "new_difficulty (u64)"), + EndOfSubSlotBundle__infused_challenge_chain__infused_challenge_chain_end_of_slot_vdf__option = ProtoField.bool( + "chia.data.EndOfSubSlotBundle.infused_challenge_chain.infused_challenge_chain_end_of_slot_vdf.option", + "{infused_challenge_chain_end_of_slot_vdf.option (bool)}"), + EndOfSubSlotBundle__reward_chain__challenge_chain_sub_slot_hash = ProtoField.bytes( + "chia.data.EndOfSubSlotBundle.reward_chain.challenge_chain_sub_slot_hash", + "challenge_chain_sub_slot_hash (Bytes32)"), + EndOfSubSlotBundle__reward_chain__infused_challenge_chain_sub_slot_hash__option = ProtoField.bool( + "chia.data.EndOfSubSlotBundle.reward_chain.infused_challenge_chain_sub_slot_hash.option", + "{infused_challenge_chain_sub_slot_hash.option (bool)}"), + EndOfSubSlotBundle__reward_chain__infused_challenge_chain_sub_slot_hash = ProtoField.bytes( + "chia.data.EndOfSubSlotBundle.reward_chain.infused_challenge_chain_sub_slot_hash", + "infused_challenge_chain_sub_slot_hash (Bytes32)"), + EndOfSubSlotBundle__reward_chain__deficit = ProtoField.uint8( + "chia.data.EndOfSubSlotBundle.reward_chain.deficit", + "deficit (u8)"), + EndOfSubSlotBundle__proofs__infused_challenge_chain_slot_proof__option= ProtoField.bool( + "chia.data.EndOfSubSlotBundle.proofs.infused_challenge_chain_slot_proof.option", + "{infused_challenge_chain_slot_proof.option (bool)}"), + + + -- Foliage + Foliage__prev_block_hash = ProtoField.bytes( + "chia.data.Foliage.prev_block_hash", + "prev_block_hash (Bytes32)"), + Foliage__reward_block_hash = ProtoField.bytes( + "chia.data.Foliage.reward_block_hash", + "reward_block_hash (Bytes32)"), + Foliage__foliage_block_data_signature = ProtoField.bytes( + "chia.data.Foliage.foliage_block_data_signature", + "foliage_block_data_signature (G2Element)"), + Foliage__foliage_transaction_block_hash__option = ProtoField.bool( + "chia.data.Foliage.foliage_transaction_block_hash.option", + "{foliage_transaction_block_hash.option (bool)}"), + Foliage__foliage_transaction_block_hash = ProtoField.bytes( + "chia.data.Foliage.foliage_transaction_block_hash", + "foliage_transaction_block_hash (Bytes32)"), + Foliage__foliage_transaction_block_signature__option = ProtoField.bool( + "chia.data.Foliage.foliage_transaction_block_signature.option", + "{foliage_transaction_block_signature.option (bool)}"), + Foliage__foliage_transaction_block_signature = ProtoField.bytes( + "chia.data.Foliage.foliage_transaction_block_signature", + "foliage_transaction_block_signature (G2Element)"), + + + -- FoliageBlockData + FoliageBlockData__unfinished_reward_block_hash = ProtoField.bytes( + "chia.data.FoliageBlockData.unfinished_reward_block_hash", + "unfinished_reward_block_hash (Bytes32)"), + FoliageBlockData__pool_target__puzzle_hash = ProtoField.bytes( + "chia.data.FoliageBlockData.pool_target.puzzle_hash", + "puzzle_hash (Bytes32)"), + FoliageBlockData__pool_target__max_height = ProtoField.uint32( + "chia.data.FoliageBlockData.pool_target.max_height", + "max_height (u32)"), + FoliageBlockData__pool_signature__option = ProtoField.bool( + "chia.data.FoliageBlockData.pool_signature.option", + "{pool_signature.option (bool)}"), + FoliageBlockData__pool_signature = ProtoField.bytes( + "chia.data.FoliageBlockData.pool_signature", + "pool_signature (G2Element)"), + FoliageBlockData__farmer_reward_puzzle_hash = ProtoField.bytes( + "chia.data.FoliageBlockData.farmer_reward_puzzle_hash", + "farmer_reward_puzzle_hash (Bytes32)"), + FoliageBlockData__extension_data = ProtoField.bytes( + "chia.data.FoliageBlockData.extension_data", + "extension_data (Bytes32)"), + + + -- FoliageTransactionBlock + FoliageTransactionBlock__option = ProtoField.bool( + "chia.data.FoliageTransactionBlock.option", + "{foliage_transaction_block.option (bool)}"), + FoliageTransactionBlock__prev_transaction_block_hash = ProtoField.bytes( + "chia.data.FoliageTransactionBlock.prev_transaction_block_hash", + "prev_transaction_block_hash (Bytes32)"), + FoliageTransactionBlock__timestamp = ProtoField.uint64( + "chia.data.FoliageTransactionBlock.timestamp", + "timestamp (u64)"), + FoliageTransactionBlock__filter_hash = ProtoField.bytes( + "chia.data.FoliageTransactionBlock.filter_hash", + "filter_hash (Bytes32)"), + FoliageTransactionBlock__additions_root = ProtoField.bytes( + "chia.data.FoliageTransactionBlock.additions_root", + "additions_root (Bytes32)"), + FoliageTransactionBlock__removals_root = ProtoField.bytes( + "chia.data.FoliageTransactionBlock.removals_root", + "removals_root (Bytes32)"), + FoliageTransactionBlock__transactions_info_hash = ProtoField.bytes( + "chia.data.FoliageTransactionBlock.transactions_info_hash", + "transactions_info_hash (Bytes32)"), + + + -- FullBlock / UnfinishedBlock + FullBlock__transactions_generator__option = ProtoField.bool( + "chia.data.FullBlock.transactions_generator.option", + "{transactions_generator.option (bool)}"), + FullBlock__transactions_generator_ref_list__count = ProtoField.uint32( + "chia.data.FullBlock.transactions_generator_ref_list.count", + "{transactions_generator_ref_list.count (uint32)}"), + FullBlock__transactions_generator_ref_list__block_height = ProtoField.uint32( + "chia.data.FullBlock.transactions_generator_ref_list.block_height", + "block_height (u32)"), + + + -- HeaderBlock + HeaderBlock__transactions_filter__length = ProtoField.uint32( + "chia.data.HeaderBlock.transactions_filter.length", + "{transactions_filter.length (uint32)}"), + HeaderBlock__transactions_filter = ProtoField.bytes( + "chia.data.HeaderBlock.transactions_filter", + "transactions_filter (Bytes)"), + + + -- Plot + Plot__filename__length = ProtoField.uint32( + "chia.data.Plot.filename.length", + "{filename.length (uint32)}"), + Plot__filename = ProtoField.string( + "chia.data.Plot.filename", + "filename (str)"), + Plot__size = ProtoField.uint8( + "chia.data.Plot.size", + "size (uint8)"), + Plot__plot_id = ProtoField.bytes( + "chia.data.Plot.plot_id", + "plot_id (bytes32)"), + Plot__pool_public_key__option = ProtoField.bool( + "chia.data.Plot.pool_public_key.option", + "{pool_public_key.option (bool)}"), + Plot__pool_public_key = ProtoField.bytes( + "chia.data.Plot.pool_public_key", + "pool_public_key (G1Element)"), + Plot__pool_contract_puzzle_hash__option = ProtoField.bool( + "chia.data.Plot.contract_puzzle_hash.option", + "{contract_puzzle_hash.option (bool)}"), + Plot__pool_contract_puzzle_hash = ProtoField.bytes( + "chia.data.Plot.contract_puzzle_hash", + "contract_puzzle_hash (bytes32)"), + Plot__plot_public_key = ProtoField.bytes( + "chia.data.Plot.plot_public_key", + "plot_public_key (G1Element)"), + Plot__file_size = ProtoField.uint64( + "chia.data.Plot.file_size", + "file_size (uint64)"), + Plot__time_modified = ProtoField.uint64( + "chia.data.Plot.time_modified", + "time_modified (uint64)"), + Plot__compression_level__option = ProtoField.bool( + "chia.data.Plot.compression_level.option", + "{compression_level.option (bool)}"), + Plot__compression_level = ProtoField.uint8( + "chia.data.Plot.compression_level", + "compression_level (uint8)"), + + + -- PlotSyncIdentifier + PlotSyncIdentifier__identifier__timestamp = ProtoField.uint64( + "chia.data.PlotSyncIdentifier.identifier.timestamp", + "timestamp (uint64)"), + PlotSyncIdentifier__identifier__sync_id = ProtoField.uint64( + "chia.data.PlotSyncIdentifier.identifier.sync_id", + "sync_id (uint64)"), + PlotSyncIdentifier__identifier__message_id = ProtoField.uint64( + "chia.data.PlotSyncIdentifier.identifier.message_id", + "message_id (uint64)"), + + + -- PlotSyncPathList + PlotSyncPathList__data__count = ProtoField.uint32( + "chia.data.PlotSyncPathList.data.count", + "{data.count (uint32)}"), + PlotSyncPathList__data__length = ProtoField.uint32( + "chia.data.PlotSyncPathList.data.length", + "{data.length (uint32)}"), + PlotSyncPathList__data = ProtoField.string( + "chia.data.PlotSyncPathList.data", + "data (str)"), + PlotSyncPathList__final = ProtoField.bool( + "chia.data.PlotSyncPathList.final", + "final (bool)"), + + + -- ProofOfSpace + ProofOfSpace__challenge = ProtoField.bytes( + "chia.data.ProofOfSpace.challenge", + "challenge (Bytes32)"), + ProofOfSpace__pool_public_key__option = ProtoField.bool( + "chia.data.ProofOfSpace.pool_public_key.option", + "{pool_public_key.option (bool)}"), + ProofOfSpace__pool_public_key = ProtoField.bytes( + "chia.data.ProofOfSpace.pool_public_key", + "pool_public_key (G1Element)"), + ProofOfSpace__pool_contract_puzzle_hash__option = ProtoField.bool( + "chia.data.ProofOfSpace.pool_contract_puzzle_hash.option", + "{pool_contract_puzzle_hash.option (bool)}"), + ProofOfSpace__pool_contract_puzzle_hash = ProtoField.bytes( + "chia.data.ProofOfSpace.pool_contract_puzzle_hash", + "pool_contract_puzzle_hash (Bytes32)"), + ProofOfSpace__plot_public_key = ProtoField.bytes( + "chia.data.ProofOfSpace.plot_public_key", + "plot_public_key (G1Element)"), + ProofOfSpace__size = ProtoField.uint8( + "chia.data.ProofOfSpace.size", + "size (u8)"), + ProofOfSpace__proof__length = ProtoField.uint32( + "chia.data.ProofOfSpace.proof.length", + "{proof.length (uint32)}"), + ProofOfSpace__proof = ProtoField.bytes( + "chia.data.ProofOfSpace.proof", + "proof (Bytes)"), + + + -- RewardChainBlock + RewardChainBlock__weight = ProtoField.string( + "chia.data.RewardChainBlock.weight", + "weight (u128)"), + RewardChainBlock__height = ProtoField.uint32( + "chia.data.RewardChainBlock.height", + "height (uint32)"), + RewardChainBlock__total_iters = ProtoField.string( + "chia.data.RewardChainBlock.total_iters", + "total_iters (u128)"), + RewardChainBlock__signage_point_index = ProtoField.uint8( + "chia.data.RewardChainBlock.signage_point_index", + "signage_point_index (u8)"), + RewardChainBlock__pos_ss_cc_challenge_hash = ProtoField.bytes( + "chia.data.RewardChainBlock.pos_ss_cc_challenge_hash", + "pos_ss_cc_challenge_hash (Bytes32)"), + RewardChainBlock__challenge_chain_sp_vdf__option = ProtoField.bool( + "chia.data.RewardChainBlock.challenge_chain_sp_vdf.option", + "{challenge_chain_sp_vdf.option (bool)}"), + RewardChainBlock__challenge_chain_sp_signature = ProtoField.bytes( + "chia.data.RewardChainBlock.challenge_chain_sp_signature", + "challenge_chain_sp_signature (G2Element)"), + RewardChainBlock__reward_chain_sp_vdf__option = ProtoField.bool( + "chia.data.RewardChainBlock.reward_chain_sp_vdf.option", + "{reward_chain_sp_vdf.option (bool)}"), + RewardChainBlock__reward_chain_sp_signature = ProtoField.bytes( + "chia.data.RewardChainBlock.reward_chain_sp_signature", + "reward_chain_sp_signature (G2Element)"), + RewardChainBlock__infused_challenge_chain_ip_vdf__option = ProtoField.bool( + "chia.data.RewardChainBlock.infused_challenge_chain_ip_vdf.option", + "{infused_challenge_chain_ip_vdf.option (bool)}"), + RewardChainBlock__is_transaction_block = ProtoField.bool( + "chia.data.RewardChainBlock.is_transaction_block", + "is_transaction_block (bool)"), + + + -- SpendBundle + SpendBundle__coin_spends__count = ProtoField.uint32( + "chia.data.SpendBundle.coin_spends.count", + "{coin_spends.count (uint32)}"), + SpendBundle__aggregated_signature = ProtoField.bytes( + "chia.data.SpendBundle.aggregated_signature", + "aggregated_signature (G2Element)"), + SpendBundle__puzzle_reveal = ProtoField.bytes( + "chia.data.SpendBundle.puzzle_reveal", + "puzzle_reveal (Program)"), + SpendBundle__solution = ProtoField.bytes( + "chia.data.SpendBundle.solution", + "solution (Program)"), + + + -- SubEpochSummary + SubEpochSummary__prev_subepoch_summary_hash = ProtoField.bytes( + "chia.data.SubEpochSummary.prev_subepoch_summary_hash", + "prev_subepoch_summary_hash (Bytes32)"), + SubEpochSummary__reward_chain_hash = ProtoField.bytes( + "chia.data.SubEpochSummary.reward_chain_hash", + "reward_chain_hash (Bytes32)"), + SubEpochSummary__num_blocks_overflow = ProtoField.uint8( + "chia.data.SubEpochSummary.num_blocks_overflow", + "num_blocks_overflow (u8)"), + SubEpochSummary__new_difficulty__option = ProtoField.bool( + "chia.data.SubEpochSummary.new_difficulty.option", + "{new_difficulty.option (bool)}"), + SubEpochSummary__new_difficulty = ProtoField.uint64( + "chia.data.SubEpochSummary.new_difficulty", + "new_difficulty (u64)"), + SubEpochSummary__new_sub_slot_iters__option = ProtoField.bool( + "chia.data.SubEpochSummary.new_sub_slot_iters.option", + "{new_sub_slot_iters.option (bool)}"), + SubEpochSummary__new_sub_slot_iters = ProtoField.uint64( + "chia.data.SubEpochSummary.new_sub_slot_iters", + "new_sub_slot_iters (u64)"), + + + -- TimestampedPeerInfo + TimestampedPeerInfo__host__length = ProtoField.uint32( + "chia.data.TimestampedPeerInfo.host.length", + "{host.length (uint32)}"), + TimestampedPeerInfo__host = ProtoField.string( + "chia.data.TimestampedPeerInfo.host", + "host (String)"), + TimestampedPeerInfo__port = ProtoField.uint16( + "chia.data.TimestampedPeerInfo.port", + "port (u16)"), + TimestampedPeerInfo__timestamp = ProtoField.uint64( + "chia.data.TimestampedPeerInfo.timestamp", + "timestamp (u64)"), + + + -- VDFInfo + VDFInfo__challenge = ProtoField.bytes( + "chia.data.VDFInfo.challenge", + "challenge (Bytes32)"), + VDFInfo__number_of_iterations = ProtoField.uint64( + "chia.data.VDFInfo.number_of_iterations", + "number_of_iterations (u64)"), + + + -- VDFProof + VDFProof__witness_type = ProtoField.uint8( + "chia.data.VDFProof.witness_type", + "witness_type (u8)"), + VDFProof__witness__length = ProtoField.uint32( + "chia.data.VDFProof.witness.length", + "{witness.length (uint32)}"), + VDFProof__witness = ProtoField.bytes( + "chia.data.VDFProof.witness", + "witness (Bytes)"), + VDFProof__normalized_to_identity = ProtoField.bool( + "chia.data.VDFProof.normalized_to_identity", + "normalized_to_identity (bool)"), + +} -- pf + + +-- Register protocol fields +p_chia.fields = pf + + +-------------------------------------------------------------------------------- +-- Enums to augment the capture results (:set_generated()) +-------------------------------------------------------------------------------- + +-- chia-blockchain/chia/protocols/shared_protocol.py +local chia_enum_capabilities = { + [1] = "BASE", + [2] = "BLOCK_HEADERS", + [3] = "RATE_LIMITS_V2", + [4] = "NONE_RESPONSE", + [5] = "MEMPOOL_UPDATES" +} + +-- chia-blockchain/chia/plot_sync/util.py +local chia_enum_ErrorCodes = { + [-1] = "unknown", + [0] = "invalid_state", + [1] = "invalid_peer_id", + [2] = "invalid_identifier", + [3] = "invalid_last_sync_id", + [4] = "invalid_connection_type", + [5] = "plot_already_available", + [6] = "plot_not_available", + [7] = "sync_ids_match", +} + +-- chia-blockchain/chia/plotting/util.py +local chia_enum_HarvestingMode = { + [1] = "CPU", + [2] = "GPU", +} + +-- chia-blockchain/chia/types/mempool_inclusion_status.py +local chia_enum_MempoolInclusionStatus = { + [1] = "SUCCESS", + [2] = "PENDING", + [3] = "FAILED", +} + +-- chia-blockchain/chia/full_node/mempool.py +local chia_enum_MempoolRemoveReason = { + [1] = "CONFLICT", + [2] = "BLOCK_INCLUSION", + [3] = "POOL_FULL", + [4] = "EXPIRED" +} + +-- chia_rs/crates/chia-protocol/src/chia_protocol.rs +local chia_enum_node_type = { + [1] = "FULL_NODE", + [2] = "HARVESTER", + [3] = "FARMER", + [4] = "TIMELORD", + [5] = "INTRODUCER", + [6] = "WALLET", + [7] = "DATALAYER" +} + +-- chia-blockchain/chia/protocols/wallet_protocol.py +local chia_enum_RejectStateReason = { + [0] = "REORG", + [1] = "EXCEEDED_SUBSCRIPTION_LIMIT", +} + +-- chia-blockchain/chia/protocols/protocol_message_types.py +local chia_enum_ProtocolMessageTypes = { + -- Shared protocol (all services) + [1] = "handshake", + -- [2] undefined + -- Harvester protocol (harvester <-> farmer) + [3] = "harvester_handshake", + -- [4] undefined + [5] = "new_proof_of_space", + [6] = "request_signatures", + [7] = "respond_signatures", + -- Farmer protocol (farmer <-> full_node) + [8] = "new_signage_point", + [9] = "declare_proof_of_space", + [10] = "request_signed_values", + [11] = "signed_values", + [12] = "farming_info", + -- Timelord protocol (timelord <-> full_node) + [13] = "new_peak_timelord", + [14] = "new_unfinished_block_timelord", + [15] = "new_infusion_point_vdf", + [16] = "new_signage_point_vdf", + [17] = "new_end_of_sub_slot_vdf", + [18] = "request_compact_proof_of_time", + [19] = "respond_compact_proof_of_time", + -- Full node protocol (full_node <-> full_node) + [20] = "new_peak", + [21] = "new_transaction", + [22] = "request_transaction", + [23] = "respond_transaction", + [24] = "request_proof_of_weight", + [25] = "respond_proof_of_weight", + [26] = "request_block", + [27] = "respond_block", + [28] = "reject_block", + [29] = "request_blocks", + [30] = "respond_blocks", + [31] = "reject_blocks", + [32] = "new_unfinished_block", + [33] = "request_unfinished_block", + [34] = "respond_unfinished_block", + [35] = "new_signage_point_or_end_of_sub_slot", + [36] = "request_signage_point_or_end_of_sub_slot", + [37] = "respond_signage_point", + [38] = "respond_end_of_sub_slot", + [39] = "request_mempool_transactions", + [40] = "request_compact_vdf", + [41] = "respond_compact_vdf", + [42] = "new_compact_vdf", + [43] = "request_peers", + [44] = "respond_peers", + -- Wallet protocol (wallet <-> full_node) + [45] = "request_puzzle_solution", + [46] = "respond_puzzle_solution", + [47] = "reject_puzzle_solution", + [48] = "send_transaction", + [49] = "transaction_ack", + [50] = "new_peak_wallet", + [51] = "request_block_header", + [52] = "respond_block_header", + [53] = "reject_header_request", + [54] = "request_removals", + [55] = "respond_removals", + [56] = "reject_removals_request", + [57] = "request_additions", + [58] = "respond_additions", + [59] = "reject_additions_request", + [60] = "request_header_blocks", + [61] = "reject_header_blocks", + [62] = "respond_header_blocks", + -- Introducer protocol (introducer <-> full_node) + [63] = "request_peers_introducer", + [64] = "respond_peers_introducer", + -- Simulator protocol + [65] = "farm_new_block", + -- New harvester protocol + [66] = "new_signage_point_harvester", + [67] = "request_plots", + [68] = "respond_plots", + -- More wallet protocol + [69] = "coin_state_update", + [70] = "register_for_ph_updates", + [71] = "respond_to_ph_updates", + [72] = "register_for_coin_updates", + [73] = "respond_to_coin_updates", + [74] = "request_children", + [75] = "respond_children", + [76] = "request_ses_hashes", + [77] = "respond_ses_hashes", + -- New harvester protocol + [78] = "plot_sync_start", + [79] = "plot_sync_loaded", + [80] = "plot_sync_removed", + [81] = "plot_sync_invalid", + [82] = "plot_sync_keys_missing", + [83] = "plot_sync_duplicates", + [84] = "plot_sync_done", + [85] = "plot_sync_response", + -- More wallet protocol + [86] = "request_block_headers", + [87] = "reject_block_headers", + [88] = "respond_block_headers", + [89] = "request_fee_estimates", + [90] = "respond_fee_estimates", + -- Full node protocol + [91] = "none_response", -- deprecated + -- New Full node protocol messages + [92] = "new_unfinished_block2", + [93] = "request_unfinished_block2", + -- New wallet sync protocol + [94] = "request_remove_puzzle_subscriptions", + [95] = "respond_remove_puzzle_subscriptions", + [96] = "request_remove_coin_subscriptions", + [97] = "respond_remove_coin_subscriptions", + [98] = "request_puzzle_state", + [99] = "respond_puzzle_state", + [100] = "reject_puzzle_state", + [101] = "request_coin_state", + [102] = "respond_coin_state", + [103] = "reject_coin_state", + -- Wallet protocol mempool updates + [104] = "mempool_items_added", + [105] = "mempool_items_removed", + [106] = "request_cost_info", + [107] = "respond_cost_info", + [255] = "error" +} -- chia_enum_ProtocolMessageTypes + + +local hexToBin = { + ["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011", + ["4"] = "0100", ["5"] = "0101", ["6"] = "0110", ["7"] = "0111", + ["8"] = "1000", ["9"] = "1001", ["A"] = "1010", ["B"] = "1011", + ["C"] = "1100", ["D"] = "1101", ["E"] = "1110", ["F"] = "1111" +} -- hexToBin + + +-------------------------------------------------------------------------------- +-- Functions to determine the size of embedded CLVM programs +-------------------------------------------------------------------------------- + +local function DecodeSize (tvb, offset, data_tree, parsed_byte) + -- parse the bits of the first byte until you hit 0 to determine the number of length bytes + local parsed_byte_binary = "" + for i = 7, 0, -1 do + local bit = math.floor(parsed_byte / 2^i) % 2 + parsed_byte_binary = parsed_byte_binary .. bit + if bit == 0 then break end + end + + -- parse the length_bytes + local length_bits_end_pos = string.find(parsed_byte_binary, 0) + local length_bytes = tostring(tvb:range(offset, length_bits_end_pos - 1)) + + -- convert the length_bytes to binary + local binary_lenght_bytes = "" + for i = 1, #length_bytes, 2 do + local hexByte = length_bytes:sub(i, i + 1):upper() + local binStr = "" + for j = 1, 2 do + local hexChar = hexByte:sub(j, j) + binStr = binStr .. hexToBin[hexChar] + end + binary_lenght_bytes = binary_lenght_bytes .. binStr + end + + -- remove the length bits of the first byte from the start of the binary_length_bytes + local truncated_binary = string.sub(binary_lenght_bytes, length_bits_end_pos + 1) + + -- convert the truncated binary_length_bytes to integer + local decoded_size = 0 + local length = #truncated_binary + for i = 1, length do + local bit = tonumber(truncated_binary:sub(i, i)) + if bit then + decoded_size = decoded_size + bit * 2^(length - i) + end + end + + -- return the number of length bits (1s) and the decoded_size + return (length_bits_end_pos - 1), decoded_size +end -- DecodeSize + + +local function ParseSerializedProgramTrusted (tvb, offset, data_tree) + -- this function returns the offset for the last byte of the serialized program + local ops_counter = 1 + while ops_counter > 0 do + ops_counter = ops_counter - 1 + + local parsed_byte = tvb:range(offset, 1):uint() + + if parsed_byte == 255 then -- 0xff / cons + ops_counter = ops_counter + 2 + offset = offset + 1 + elseif parsed_byte == 254 then -- 0xfe / back references + offset = offset + 1 + local back_reference_byte = tvb:range(offset, 1):uint() + if back_reference_byte > 128 then -- BLOBS + local size_bytes, path_size = DecodeSize(tvb, offset, data_tree, back_reference_byte) + offset = offset + path_size + offset = offset + 1 + elseif back_reference_byte == 128 then -- 0x80 / nil + else -- <= 0x7f / small chars + offset = offset + 1 + end + elseif parsed_byte == 128 then -- 0x80 / nil + offset = offset + 1 + elseif parsed_byte > 128 then -- BLOBS + local size_bytes, path_size = DecodeSize (tvb, offset, data_tree, parsed_byte) + offset = offset + size_bytes + path_size + elseif parsed_byte <= 127 then -- <= 0x7f small chars + offset = offset + 1 + end + end + -- decrease offset by one to account for the last increment + return offset - 1 +end -- ParseSerializedProgramTrusted + +-------------------------------------------------------------------------------- +-- Functions that get called by various message type dissector functions +-------------------------------------------------------------------------------- + +local function VDFInfo (tvb, offset, data_tree) + data_tree:add(pf.VDFInfo__challenge, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.VDFInfo__number_of_iterations, tvb:range(offset, 8)) + offset = offset + 8 + local output_tree = data_tree:add("output (ClassgroupElement)") + output_tree:add(pf.ClassgroupElement__data, tvb:range(offset, 100)) + offset = offset + 100 + -- end of output_tree + return offset +end -- VDFInfo + + +local function VDFProof (tvb, offset, data_tree) + data_tree:add(pf.VDFProof__witness_type, tvb:range(offset, 1)) + offset = offset + 1 + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.VDFProof__witness__length, tvb:range(offset, 4)) + end + local witness_length = tvb:range(offset, 4):uint() + offset = offset + 4 + + data_tree:add(pf.VDFProof__witness, tvb:range(offset, witness_length)) + offset = offset + witness_length + + data_tree:add(pf.VDFProof__normalized_to_identity, tvb:range(offset, 1)) + offset = offset + 1 + return offset +end -- VDFProof + + +local function EndOfSubSlotBundle (tvb, offset, data_tree) + -- challenge_chain + local challenge_chain_tree = data_tree:add("challenge_chain (ChallengeChainSubSlot)") + -- challenge_chain_end_of_slot_vdf + local challenge_chain_end_of_slot_vdf_tree = + challenge_chain_tree:add("challenge_chain_end_of_slot_vdf (VDFInfo)") + offset = VDFInfo(tvb, offset, challenge_chain_end_of_slot_vdf_tree) + -- end of challenge_chain_end_of_slot_vdf_tree + + -- infused_challenge_chain_sub_slot_hash + if SHOW_SERIAL_PROTO == true then + challenge_chain_tree:add( + pf.EndOfSubSlotBundle__challenge_chain__infused_challenge_chain_sub_slot_hash__option, + tvb:range(offset, 1)) + end + local infused_challenge_chain_sub_slot_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_sub_slot_hash_option == 0 then + elseif infused_challenge_chain_sub_slot_hash_option == 1 then + challenge_chain_tree:add(pf.EndOfSubSlotBundle__challenge_chain__infused_challenge_chain_sub_slot_hash, + tvb:range(offset, 32)) + offset = offset + 32 + else + challenge_chain_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- subepoch_summary_hash + if SHOW_SERIAL_PROTO == true then + challenge_chain_tree:add(pf.EndOfSubSlotBundle__challenge_chain__subepoch_summary_hash__option, + tvb:range(offset, 1)) + end + local subepoch_summary_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if subepoch_summary_hash_option == 0 then + elseif subepoch_summary_hash_option == 1 then + challenge_chain_tree:add(pf.EndOfSubSlotBundle__challenge_chain__subepoch_summary_hash, + tvb:range(offset, 32)) + offset = offset + 32 + else + challenge_chain_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- new_sub_slot_iters + if SHOW_SERIAL_PROTO == true then + challenge_chain_tree:add(pf.EndOfSubSlotBundle__challenge_chain__new_sub_slot_iters__option, + tvb:range(offset, 1)) + end + local new_sub_slot_iters_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if new_sub_slot_iters_option == 0 then + elseif new_sub_slot_iters_option == 1 then + challenge_chain_tree:add(pf.EndOfSubSlotBundle__challenge_chain__new_sub_slot_iters, + tvb:range(offset, 8)) + offset = offset + 8 + else + challenge_chain_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- new_difficulty + if SHOW_SERIAL_PROTO == true then + challenge_chain_tree:add(pf.EndOfSubSlotBundle__challenge_chain__new_difficulty__option, + tvb:range(offset, 1)) + end + local new_difficulty_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if new_difficulty_option == 0 then + elseif new_difficulty_option == 1 then + challenge_chain_tree:add( pf.EndOfSubSlotBundle__challenge_chain__new_difficulty, tvb:range(offset, 8)) + offset = offset + 8 + else + challenge_chain_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of challenge_chain_tree + + -- infused_challenge_chain + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.EndOfSubSlotBundle__infused_challenge_chain__infused_challenge_chain_end_of_slot_vdf__option, + tvb:range(offset, 1)) + end + local infused_challenge_chain_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_option == 0 then + elseif infused_challenge_chain_option == 1 then + local infused_challenge_chain_tree = data_tree:add("infused_challenge_chain (InfusedChallengeChainSubSlot)") + local infused_challenge_chain_end_of_slot_vdf_tree = + infused_challenge_chain_tree:add("infused_challenge_chain_end_of_slot_vdf: VDFInfo") + offset = VDFInfo(tvb, offset, infused_challenge_chain_end_of_slot_vdf_tree) + -- end of infused_challenge_chain_end_of_slot_vdf_tree + -- end of infused_challenge_chain_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- reward_chain + local reward_chain_tree = data_tree:add("reward_chain: RewardChainSubSlot") + -- end_of_slot_vdf + local end_of_slot_vdf_tree = reward_chain_tree:add("end_of_slot_vdf_tree (VDFInfo)") + offset = VDFInfo(tvb, offset, end_of_slot_vdf_tree) + -- end of end_of_slot_vdf_tree + + -- challenge_chain_sub_slot_hash + reward_chain_tree:add(pf.EndOfSubSlotBundle__reward_chain__challenge_chain_sub_slot_hash, + tvb:range(offset, 32)) + offset = offset + 32 + + -- infused_challenge_chain_sub_slot_hash + if SHOW_SERIAL_PROTO == true then + reward_chain_tree:add(pf.EndOfSubSlotBundle__reward_chain__infused_challenge_chain_sub_slot_hash__option, + tvb:range(offset, 1)) + end + local infused_challenge_chain_sub_slot_hash__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_sub_slot_hash__option == 0 then + elseif infused_challenge_chain_sub_slot_hash__option == 1 then + reward_chain_tree:add(pf.EndOfSubSlotBundle__reward_chain__infused_challenge_chain_sub_slot_hash, + tvb:range(offset, 32)) + offset = offset + 32 + else + reward_chain_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- deficit + reward_chain_tree:add(pf.EndOfSubSlotBundle__reward_chain__deficit, tvb:range(offset, 1)) + offset = offset + 1 + -- end of reward_chain_tree + + -- proofs + local proofs_tree = data_tree:add("proofs: SubSlotProofs") + -- challenge_chain_slot_proof + local challenge_chain_slot_proof_tree = proofs_tree:add("challenge_chain_slot_proof (VDFProof)") + offset = VDFProof(tvb, offset, challenge_chain_slot_proof_tree) + -- end of challenge_chain_slot_proof_tree + + -- infused_challenge_chain_slot_proof + if SHOW_SERIAL_PROTO == true then + proofs_tree:add(pf.EndOfSubSlotBundle__proofs__infused_challenge_chain_slot_proof__option, + tvb:range(offset, 1)) + end + local infused_challenge_chain_slot_proof_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_slot_proof_option == 0 then + elseif infused_challenge_chain_slot_proof_option == 1 then + local infused_challenge_chain_slot_proof_tree = + proofs_tree:add("infused_challenge_chain_slot_proof (VDFProof)") + offset = VDFProof(tvb, offset, infused_challenge_chain_slot_proof_tree) + -- end of infused_challenge_chain_slot_proof_tree + else + proofs_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- reward_chain_slot_proof + local reward_chain_slot_proof_tree = proofs_tree:add("reward_chain_slot_proof (VDFProof)") + offset = VDFProof(tvb, offset, proofs_tree) + -- end of reward_chain_slot_proof_tree + -- end of proofs_tree + return offset +end -- EndOfSubSlotBundle + + +local function ProofOfSpace (tvb, offset, data_tree) + local proof_of_space_tree = data_tree:add("proof_of_space (ProofOfSpace)") + -- challenge + proof_of_space_tree:add(pf.ProofOfSpace__challenge, tvb:range(offset, 32)) + offset = offset + 32 + + -- pool_public_key + if SHOW_SERIAL_PROTO == true then + proof_of_space_tree:add(pf.ProofOfSpace__pool_public_key__option, tvb:range(offset, 1)) + end + local pool_public_key_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if pool_public_key_option == 0 then + elseif pool_public_key_option == 1 then + proof_of_space_tree:add(pf.ProofOfSpace__pool_public_key, tvb:range(offset, 48)) + offset = offset + 48 + else + proof_of_space_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- pool_contract_puzzle_hash + if SHOW_SERIAL_PROTO == true then + proof_of_space_tree:add(pf.ProofOfSpace__pool_contract_puzzle_hash__option, + tvb:range(offset, 1)) + end + local pool_contract_puzzle_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if pool_contract_puzzle_hash_option == 0 then + elseif pool_contract_puzzle_hash_option == 1 then + proof_of_space_tree:add(pf.ProofOfSpace__pool_contract_puzzle_hash, + tvb:range(offset, 32)) + offset = offset + 32 + else + proof_of_space_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- plot_public_key + proof_of_space_tree:add(pf.ProofOfSpace__plot_public_key, tvb:range(offset, 48)) + offset = offset + 48 + + -- size + proof_of_space_tree:add(pf.ProofOfSpace__size, tvb:range(offset, 1)) + offset = offset + 1 + + -- proof + if SHOW_SERIAL_PROTO == true then + proof_of_space_tree:add(pf.ProofOfSpace__proof__length, tvb:range(offset, 4)) + end + local reward_chain_block__proof_length = tvb:range(offset, 4):uint() + offset = offset + 4 + proof_of_space_tree:add( + pf.ProofOfSpace__proof, tvb:range(offset, reward_chain_block__proof_length)) + offset = offset + reward_chain_block__proof_length + -- end of proof_of_space_tree + return offset +end -- ProofOfSpace + + +local function RewardChainBlock (tvb, offset, data_tree, block_type) + local reward_chain_block_tree = data_tree:add("reward_chain_block (RewardChainBlock)") + if block_type ~= "UnfinishedBlock" then + -- weight + reward_chain_block_tree:add(pf.RewardChainBlock__weight, tonumber(tostring(tvb:range(offset, 16):bytes()), 16)) + offset = offset + 16 + + -- height + reward_chain_block_tree:add(pf.RewardChainBlock__height, tvb:range(offset, 4)) + offset = offset + 4 + end + + -- total_iters + reward_chain_block_tree:add(pf.RewardChainBlock__total_iters, tonumber(tostring(tvb:range(offset, 16):bytes()), 16)) + offset = offset + 16 + + -- signage_point_index + reward_chain_block_tree:add(pf.RewardChainBlock__signage_point_index, tvb:range(offset, 1)) + offset = offset + 1 + + -- pos_ss_cc_challenge_hash + reward_chain_block_tree:add(pf.RewardChainBlock__pos_ss_cc_challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + + -- proof_of_space + offset = ProofOfSpace(tvb, offset, reward_chain_block_tree) + + -- challenge_chain_sp_vdf + if SHOW_SERIAL_PROTO == true then + reward_chain_block_tree:add(pf.RewardChainBlock__challenge_chain_sp_vdf__option, tvb:range(offset, 1)) + end + local challenge_chain_sp_vdf_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if challenge_chain_sp_vdf_option == 0 then + elseif challenge_chain_sp_vdf_option == 1 then + local challenge_chain_sp_vdf_tree = reward_chain_block_tree:add("challenge_chain_sp_vdf (VDFInfo)") + offset = VDFInfo(tvb, offset, challenge_chain_sp_vdf_tree) + -- end of challenge_chain_sp_vdf_tree + else + reward_chain_block_tree:add( + pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- challenge_chain_sp_signature + reward_chain_block_tree:add(pf.RewardChainBlock__challenge_chain_sp_signature, tvb:range(offset, 96)) + offset = offset + 96 + + -- challenge_chain_ip_vdf + if block_type ~= "UnfinishedBlock" then + local challenge_chain_ip_vdf_tree = reward_chain_block_tree:add("challenge_chain_ip_vdf (VDFInfo)") + offset = VDFInfo(tvb, offset, challenge_chain_ip_vdf_tree) + -- end of challenge_chain_ip_vdf_tree + end + + -- reward_chain_sp_vdf + if SHOW_SERIAL_PROTO == true then + reward_chain_block_tree:add( + pf.RewardChainBlock__reward_chain_sp_vdf__option, tvb:range(offset, 1)) + end + local reward_chain_sp_vdf__challenge_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if reward_chain_sp_vdf__challenge_option == 0 then + elseif reward_chain_sp_vdf__challenge_option == 1 then + local reward_chain_sp_vdf_tree = reward_chain_block_tree:add("reward_chain_sp_vdf (VDFInfo)") + offset = VDFInfo(tvb, offset, reward_chain_sp_vdf_tree) + -- end of reward_chain_sp_vdf_tree + else + + reward_chain_block_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- reward_chain_sp_signature + reward_chain_block_tree:add(pf.RewardChainBlock__reward_chain_sp_signature, tvb:range(offset, 96)) + offset = offset + 96 + + -- reward_chain_ip_vdf + -- infused_challenge_chain_ip_vdf + -- is_transaction_block + if block_type ~= "UnfinishedBlock" then + local reward_chain_ip_vdf_tree = reward_chain_block_tree:add("reward_chain_ip_vdf (VDFInfo)") + offset = VDFInfo(tvb, offset, reward_chain_ip_vdf_tree) + -- end of reward_chain_ip_vdf_tree + + -- infused_challenge_chain_ip_vdf + if SHOW_SERIAL_PROTO == true then + + reward_chain_block_tree:add(pf.RewardChainBlock__infused_challenge_chain_ip_vdf__option, + tvb:range(offset, 1)) + end + local infused_challenge_chain_ip_vdf__challenge_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_ip_vdf__challenge_option == 0 then + elseif infused_challenge_chain_ip_vdf__challenge_option == 1 then + + local infused_challenge_chain_ip_vdf_tree = + reward_chain_block_tree:add("infused_challenge_chain_ip_vdf (VDFInfo)") + + offset = VDFInfo(tvb, offset, infused_challenge_chain_ip_vdf_tree) + -- end of infused_challenge_chain_ip_vdf + else + reward_chain_block_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- is_transaction_block + reward_chain_block_tree:add(pf.RewardChainBlock__is_transaction_block, tvb:range(offset, 1)) + offset = offset + 1 + end + -- end of reward_chain_block_tree + return offset +end -- RewardChainBlock + + +local function FoliageTransactionBlock (tvb, offset, data_tree) + local foliage_transaction_block_tree = data_tree:add( + "foliage_transaction_block (FoliageTransactionBlock)") + foliage_transaction_block_tree:add(pf.FoliageTransactionBlock__prev_transaction_block_hash, + tvb:range(offset, 32)) + offset = offset + 32 + foliage_transaction_block_tree:add(pf.FoliageTransactionBlock__timestamp, tvb:range(offset, 8)) + offset = offset + 8 + foliage_transaction_block_tree:add(pf.FoliageTransactionBlock__filter_hash, tvb:range(offset, 32)) + offset = offset + 32 + foliage_transaction_block_tree:add(pf.FoliageTransactionBlock__additions_root, tvb:range(offset, 32)) + offset = offset + 32 + foliage_transaction_block_tree:add(pf.FoliageTransactionBlock__removals_root, tvb:range(offset, 32)) + offset = offset + 32 + foliage_transaction_block_tree:add(pf.FoliageTransactionBlock__transactions_info_hash, tvb:range(offset, 32)) + offset = offset + 32 + -- end of foliage_transaction_block_tree + return offset +end -- FoliageTransactionBlock + + +local function FoliageBlockData (tvb, offset, data_tree) + local foilage_block_data_tree = data_tree:add("foilage_block_data (FoliageBlockData)") + -- unfinished_reward_block_hash + foilage_block_data_tree:add(pf.FoliageBlockData__unfinished_reward_block_hash, tvb:range(offset, 32)) + offset = offset + 32 + + -- pool_target + local pool_target_tree = foilage_block_data_tree:add("pool_target (PoolTarget)") + pool_target_tree:add(pf.FoliageBlockData__pool_target__puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + pool_target_tree:add(pf.FoliageBlockData__pool_target__max_height, tvb:range(offset, 4)) + offset = offset + 4 + -- end of pool_target_tree + + -- pool_signature + if SHOW_SERIAL_PROTO == true then + foilage_block_data_tree:add(pf.FoliageBlockData__pool_signature__option, tvb:range(offset, 1)) + end + local pool_signature__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if pool_signature__option == 0 then + elseif pool_signature__option == 1 then + foilage_block_data_tree:add(pf.FoliageBlockData__pool_signature, tvb:range(offset, 96)) + offset = offset + 96 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- farmer_reward_puzzle_hash + foilage_block_data_tree:add(pf.FoliageBlockData__farmer_reward_puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + + -- extension_data + foilage_block_data_tree:add(pf.FoliageBlockData__extension_data, tvb:range(offset, 32)) + offset = offset + 32 + -- end of foilage_block_data_tree + return offset +end -- FoliageBlockData + + +local function Foliage (tvb, offset, data_tree) + data_tree:add(pf.Foliage__prev_block_hash, tvb:range(offset, 32)) + offset = offset + 32 + + data_tree:add(pf.Foliage__reward_block_hash, tvb:range(offset, 32)) + offset = offset + 32 + + offset = FoliageBlockData(tvb, offset, data_tree) + + data_tree:add(pf.Foliage__foliage_block_data_signature, tvb:range(offset, 96)) + offset = offset + 96 + + -- foliage_transaction_block_hash + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.Foliage__foliage_transaction_block_hash__option, tvb:range(offset, 1)) + end + local foliage_transaction_block_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if foliage_transaction_block_hash_option == 0 then + elseif foliage_transaction_block_hash_option == 1 then + data_tree:add(pf.Foliage__foliage_transaction_block_hash, tvb:range(offset, 32)) + offset = offset + 32 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- foliage_transaction_block_signature + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.Foliage__foliage_transaction_block_signature__option, tvb:range(offset, 1)) + end + local foliage_transaction_block_signature_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if foliage_transaction_block_signature_option == 0 then + elseif foliage_transaction_block_signature_option == 1 then + data_tree:add(pf.Foliage__foliage_transaction_block_signature, tvb:range(offset, 96)) + offset = offset + 96 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + return offset +end -- Foliage + + +local function Coin (tvb, offset, data_tree) + data_tree:add(pf.Coin__parent_coin_info, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.Coin__puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.Coin__amount, tvb:range(offset, 8)) + offset = offset + 8 + return offset +end -- Coin + + +local function SpendBundle (tvb, offset, data_tree) + -- coin_spends + data_tree:add(pf.SpendBundle__coin_spends__count, tvb:range(offset, 4)) + local coin_spends_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_spends_tree = data_tree:add("coin_spends (Vec)") + for i=1, coin_spends_count do + local coin_spend_tree = coin_spends_tree:add("CoinSpend") + local coin_tree = coin_spend_tree:add("coin (Coin)") + offset = Coin(tvb, offset, coin_tree) + -- end of coin_tree + + -- puzzle_reveal + local puzzle_reveal_offset = ParseSerializedProgramTrusted (tvb, offset, coin_spend_tree) + coin_spend_tree:add(pf.SpendBundle__puzzle_reveal, tvb:range(offset, (puzzle_reveal_offset - offset + 1))) + offset = puzzle_reveal_offset + 1 + + -- solution + local solution_offset = ParseSerializedProgramTrusted (tvb, offset, coin_spend_tree) + coin_spend_tree:add(pf.SpendBundle__solution, tvb:range(offset, (solution_offset - offset + 1))) + offset = solution_offset + 1 + -- end of coin_spend_tree + end + -- end of coin_spends_tree + + -- aggregated_signature + data_tree:add(pf.SpendBundle__aggregated_signature, tvb:range(offset, 96)) + offset = offset + 96 + + return offset +end -- SpendBundle + + +-- block_type: FullBlock, UnfinishedBlock, HeaderBlock +local function Block (tvb, offset, data_tree, block_type) + -- finished_sub_slots + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.Block__finished_sub_slots__count, tvb:range(offset, 4)) + end + local finished_sub_slots_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local finished_sub_slots_tree = data_tree:add("finished_sub_slots (Vec)") + for i=1, finished_sub_slots_count do + local end_of_sub_slot_bundle_tree = finished_sub_slots_tree:add("EndOfSubSlotBundle") + offset = EndOfSubSlotBundle(tvb, offset, end_of_sub_slot_bundle_tree) + -- end of end_of_sub_slot_bundle_tree + end + -- end of finished_sub_slots_tree + + + -- reward_chain_block + offset = RewardChainBlock(tvb, offset, data_tree, block_type) + + -- challenge_chain_sp_proof + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.Block__challenge_chain_sp_proof__option, tvb:range(offset, 1)) + end + local challenge_chain_sp_proof_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if challenge_chain_sp_proof_option == 0 then + elseif challenge_chain_sp_proof_option == 1 then + local challenge_chain_sp_proof_tree = data_tree:add("challenge_chain_sp_proof (VDFProof)") + offset = VDFProof(tvb, offset, challenge_chain_sp_proof_tree) + -- end of challenge_chain_sp_proof_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- challenge_chain_ip_proof + if block_type ~= "UnfinishedBlock" then + local challenge_chain_ip_proof_tree = data_tree:add("challenge_chain_ip_proof (VDFProof)") + offset = VDFProof(tvb, offset, challenge_chain_ip_proof_tree) + -- end of challenge_chain_ip_proof_tree + end + + -- reward_chain_sp_proof + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.Block__reward_chain_sp_proof__option, tvb:range(offset, 1)) + end + local reward_chain_sp_proof__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if reward_chain_sp_proof__option == 0 then + elseif reward_chain_sp_proof__option == 1 then + local reward_chain_sp_proof_tree = data_tree:add("reward_chain_sp_proof (VDFProof)") + offset = VDFProof(tvb, offset, reward_chain_sp_proof_tree) + -- end of reward_chain_sp_proof_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- reward_chain_ip_proof + -- infused_challenge_chain_ip_proof + if block_type ~= "UnfinishedBlock" then + local reward_chain_ip_proof_tree = data_tree:add("reward_chain_ip_proof (VDFProof)") + offset = VDFProof(tvb, offset, reward_chain_ip_proof_tree) + -- end of reward_chain_ip_proof_tree + + -- infused_challenge_chain_ip_proof + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.Block__infused_challenge_chain_ip_proof__option, tvb:range(offset, 1)) + end + local infused_challenge_chain_ip_proof__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_ip_proof__option == 0 then + elseif infused_challenge_chain_ip_proof__option == 1 then + local infused_challenge_chain_ip_proof_tree = data_tree:add("infused_challenge_chain_ip_proofS (VDFProof)") + offset = VDFProof(tvb, offset, infused_challenge_chain_ip_proof_tree) + -- end of infused_challenge_chain_ip_proof_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + end -- Block + + -- foilage + local foilage_tree = data_tree:add("foilage (Foliage)") + offset = Foliage(tvb, offset, foilage_tree) + -- end of foilage_tree + + -- foliage_transaction_block + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.Block__foliage_transaction_block__option, tvb:range(offset, 1)) + end + local foliage_transaction_block_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if foliage_transaction_block_option == 0 then + elseif foliage_transaction_block_option == 1 then + offset = FoliageTransactionBlock(tvb, offset, data_tree) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- transactions_filter + if block_type == "HeaderBlock" then + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.HeaderBlock__transactions_filter__length, tvb:range(offset, 4)) + end + local header_block__transactions_filter_length = tvb:range(offset, 4):uint() + offset = offset + 4 + + if header_block__transactions_filter_length > 0 then + data_tree:add(pf.HeaderBlock__transactions_filter, + tvb:range(offset, header_block__transactions_filter_length)) + offset = offset + header_block__transactions_filter_length + end + end + + -- transactions_info + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.Block__transactions_info__option, tvb:range(offset, 1)) + end + local transactions_info__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if transactions_info__option == 0 then + elseif transactions_info__option == 1 then + local transactions_info_tree = data_tree:add("transactions_info (TransactionsInfo)") + transactions_info_tree:add(pf.Block__transactions_info__generator_root, tvb:range(offset, 32)) + offset = offset + 32 + transactions_info_tree:add(pf.Block__transactions_info__generator_refs_root, tvb:range(offset, 32)) + offset = offset + 32 + transactions_info_tree:add(pf.Block__transactions_info__aggregated_signature, tvb:range(offset, 96)) + offset = offset + 96 + transactions_info_tree:add(pf.Block__transactions_info__fees, tvb:range(offset, 8)) + offset = offset + 8 + transactions_info_tree:add(pf.Block__transactions_info__cost, tvb:range(offset, 8)) + offset = offset + 8 + + if SHOW_SERIAL_PROTO == true then + transactions_info_tree:add(pf.Block__transactions_info__reward_claims_incorporated__count, + tvb:range(offset, 4)) + end + local reward_claims_incorporated_count = tvb:range(offset, 4):uint() + offset = offset + 4 + -- reward_claims_incorporated + if reward_claims_incorporated_count > 0 then + local reward_claims_incorporated_tree = + transactions_info_tree:add("reward_claims_incorporated (Vec)") + for i = 1, reward_claims_incorporated_count do + local coin_tree = reward_claims_incorporated_tree:add("coin (Coin)") + offset = Coin(tvb, offset, coin_tree) + -- end of coin_tree + end + -- end of reward_claims_incorporated_tree + else + transactions_info_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of transactions_info_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- transactions_generator + -- transactions_generator_ref_list + if block_type == "FullBlock" or block_type == "UnfinishedBlock" then + -- transactions_generator + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.FullBlock__transactions_generator__option, tvb:range(offset, 1)) + end + local transactions_generator__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if transactions_generator__option == 0 then + elseif transactions_generator__option == 1 then + program_offset = ParseSerializedProgramTrusted(tvb, offset, data_tree) + data_tree:add(pf.Block__transaction_generator, tvb:range(offset, (program_offset - offset))) + offset = program_offset + 1 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + end + + -- transactions_generator_ref_list + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.FullBlock__transactions_generator_ref_list__count, tvb:range(offset, 4)) + end + local ref_list_count = tvb:range(offset, 4):uint() + offset = offset + 4 + if ref_list_count > 0 then + local transactions_generator_ref_list_tree = data_tree:add("transactions_generator_ref_list (Vec)") + for i=1, ref_list_count do + transactions_generator_ref_list_tree:add(pf.FullBlock__transactions_generator_ref_list__block_height, + tvb:range(offset, 4)) + offset = offset + 4 + end + -- end of transactions_generator_ref_list_tree + end + end + + return offset +end -- Block + + +local function SubEpochSummary (tvb, offset, data_tree) + local sub_epoch_summary_tree = data_tree:add( + "sub_epoch_summary (SubEpochSummary)") + sub_epoch_summary_tree:add(pf.SubEpochSummary__prev_subepoch_summary_hash, tvb:range(offset, 32)) + offset = offset + 32 + sub_epoch_summary_tree:add(pf.SubEpochSummary__reward_chain_hash, tvb:range(offset, 32)) + offset = offset + 32 + sub_epoch_summary_tree:add(pf.SubEpochSummary__num_blocks_overflow, tvb:range(offset, 1)) + offset = offset + 1 + + -- new_difficulty + if SHOW_SERIAL_PROTO == true then + sub_epoch_summary_tree:add(pf.SubEpochSummary__new_difficulty__option, tvb:range(offset, 1)) + end + local new_difficulty_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if new_difficulty_option == 0 then + elseif new_difficulty_option == 1 then + sub_epoch_summary_tree:add(pf.SubEpochSummary__new_difficulty, tvb:range(offset, 8)) + offset = offset + 8 + else + sub_epoch_summary_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- new_sub_slot_iters + if SHOW_SERIAL_PROTO == true then + sub_epoch_summary_tree:add(pf.SubEpochSummary__new_sub_slot_iters__option, tvb:range(offset, 1)) + end + local new_sub_slot_iters_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if new_sub_slot_iters_option == 0 then + elseif new_sub_slot_iters_option == 1 then + sub_epoch_summary_tree:add(pf.SubEpochSummary__new_sub_slot_iters, tvb:range(offset, 8)) + offset = offset + 8 + else + sub_epoch_summary_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of sub_epoch_summary_tree + return offset +end -- SubEpochSummary + + +local function TimestampedPeerInfo (tvb, offset, data_tree) + local TimestampedPeerInfo_tree = data_tree:add( + "peer_list (TimestampedPeerInfo)") + if SHOW_SERIAL_PROTO == true then + TimestampedPeerInfo_tree:add(pf.TimestampedPeerInfo__host__length, tvb:range(offset, 4)) + end + local host_length = tvb:range(offset, 4):uint() + offset = offset + 4 + TimestampedPeerInfo_tree:add(pf.TimestampedPeerInfo__host, tvb:range(offset, host_length)) + offset = offset + host_length + TimestampedPeerInfo_tree:add(pf.TimestampedPeerInfo__port, tvb:range(offset, 2)) + offset = offset + 2 + TimestampedPeerInfo_tree:add(pf.TimestampedPeerInfo__timestamp, tvb:range(offset, 8)) + offset = offset + 8 + -- end of TimestampedPeerInfo_tree + return offset +end -- TimestampedPeerInfo + + +local function Plot (tvb, offset, data_tree) + local plot_tree = data_tree:add("plot (Plot)") + -- filename + if SHOW_SERIAL_PROTO == true then + plot_tree:add(pf.Plot__filename__length, tvb:range(offset, 4)) + end + local filename_length = tvb:range(offset, 4):uint() + offset = offset + 4 + plot_tree:add(pf.Plot__filename, tvb:range(offset, filename_length)) + offset = offset + filename_length + + -- size + plot_tree:add(pf.Plot__size, tvb:range(offset, 1)) + offset = offset + 1 + + -- plot_id + plot_tree:add(pf.Plot__plot_id, tvb:range(offset, 32)) + offset = offset + 32 + + -- pool_public_key + if SHOW_SERIAL_PROTO == true then + plot_tree:add(pf.Plot__pool_public_key__option, tvb:range(offset, 1)) + end + local public_key_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if public_key_option == 0 then + elseif public_key_option == 1 then + plot_tree:add(pf.Plot__pool_public_key, tvb:range(offset, 48)) + offset = offset + 48 + else + plot_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- pool_contract_puzzle_hash + if SHOW_SERIAL_PROTO == true then + plot_tree:add(pf.Plot__pool_contract_puzzle_hash__option, tvb:range(offset, 1)) + end + local pool_contract_puzzle_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if pool_contract_puzzle_hash_option == 0 then + elseif pool_contract_puzzle_hash_option == 1 then + plot_tree:add(pf.Plot__pool_contract_puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + else + plot_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- plot_public_key + plot_tree:add(pf.Plot__plot_public_key, tvb:range(offset, 48)) + offset = offset + 48 + + -- file_size + plot_tree:add(pf.Plot__file_size, tvb:range(offset, 8)) + offset = offset + 8 + + -- time_modified + plot_tree:add(pf.Plot__time_modified, tvb:range(offset, 8)) + offset = offset + 8 + + -- compression_level + if SHOW_SERIAL_PROTO == true then + plot_tree:add(pf.Plot__compression_level__option, tvb:range(offset, 1)) + end + local compression_level_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if compression_level_option == 0 then + elseif compression_level_option == 1 then + plot_tree:add(pf.Plot__compression_level, tvb:range(offset, 1)) + offset = offset + 1 + else + plot_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of plot_tree + return offset +end -- Plot + + +local function CoinState (tvb, offset, data_tree) + local coin_state_tree = data_tree:add("coin_state (CoinState)") + local coin_tree = coin_state_tree:add("coin (Coin)")offset = Coin(tvb, offset, coin_tree) + -- end of coin_tree + + -- spent_height + if SHOW_SERIAL_PROTO == true then + coin_state_tree:add(pf.CoinState__spent_height__option, tvb:range(offset, 1)) + end + local spent_height__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if spent_height__option == 0 then + elseif spent_height__option == 1 then + coin_state_tree:add(pf.CoinState__spent_height, tvb:range(offset, 4)) + offset = offset + 4 + else + coin_state_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- created_height + if SHOW_SERIAL_PROTO == true then + coin_state_tree:add(pf.CoinState__created_height__option, tvb:range(offset, 1)) + end + local created_height__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if created_height__option == 0 then + elseif created_height__option == 1 then + coin_state_tree:add(pf.CoinState__created_height, tvb:range(offset, 4)) + offset = offset + 4 + else + coin_state_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of coin_state_tree + return offset +end -- CoinState + + +local function PlotSyncIdentifier (tvb, offset, data_tree) + local identifier_tree = data_tree:add("identifier (PlotSyncIdentifier)") + identifier_tree:add(pf.PlotSyncIdentifier__identifier__timestamp, tvb:range(offset, 8)) + offset = offset + 8 + + identifier_tree:add(pf.PlotSyncIdentifier__identifier__sync_id, tvb:range(offset, 8)) + offset = offset + 8 + + identifier_tree:add(pf.PlotSyncIdentifier__identifier__message_id, tvb:range(offset, 8)) + offset = offset + 8 + -- end of identifier_tree + return offset +end -- PlotSyncIdentifier + + +local function PlotSyncPathList (tvb, offset, data_tree) + -- identifier + offset = PlotSyncIdentifier(tvb, offset, data_tree) + + -- data + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.PlotSyncPathList__data__count, tvb:range(offset, 4)) + end + local data_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local plot_data_tree = data_tree:add("data (list[str])") + for i=1, data_count do + if SHOW_SERIAL_PROTO == true then + plot_data_tree:add(pf.PlotSyncPathList__data__length, tvb:range(offset, 4)) + end + local data_length = tvb:range(offset, 4):uint() + offset = offset + 4 + + plot_data_tree:add(pf.PlotSyncPathList__data, tvb:range(offset, data_length)) + offset = offset + data_length + end + -- end of plot_data_tree + + -- final + data_tree:add(pf.PlotSyncPathList__final, tvb:range(offset, 1)) + offset = offset + 1 + + return offset +end -- PlotSyncPathList + +-------------------------------------------------------------------------------- +-- Functions to dissect the data of specific message types +-------------------------------------------------------------------------------- + +-- 1 Handshake +local function handshake (tvb, offset, data_tree) + local len_network_id = tvb:range(offset, 4):uint() + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.handshake__network_id__length, tvb:range(offset, 4)) + end + offset = offset + 4 + + data_tree:add(pf.handshake__network_id, tvb:range(offset, len_network_id)) + offset = offset + len_network_id + + local len_protocol_version = tvb:range(offset, 4):uint() + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.handshake__protocol_version__length, tvb:range(offset, 4)) + end + offset = offset + 4 + + data_tree:add(pf.handshake__protocol_version, tvb:range(offset, len_protocol_version)) + offset = offset + len_protocol_version + + local len_software_version = tvb:range(offset, 4):uint() + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.handshake__software_version__length, tvb:range(offset, 4)) + end + offset = offset + 4 + + data_tree:add(pf.handshake__software_version, tvb:range(offset, len_software_version)) + offset = offset + len_software_version + + data_tree:add(pf.handshake__server_port, tvb:range(offset, 2)) + offset = offset + 2 + + data_tree:add(pf.handshake__node_type, tvb:range(offset, 1)) + data_tree:add(pf.handshake__node_type__enum, chia_enum_node_type[tvb:range(offset, 1):uint()]):set_generated() + offset = offset + 1 + + -- capabilities + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.handshake__capabilities__count, tvb:range(offset, 4)) + end + local capabilities_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local capabilities_tree = data_tree:add("capabilities (list[tuple[uint16, str]])") + -- capability_item_tree + for i = 1, capabilities_count do + local len_capability_item_str_length = tvb:range(offset+2, 4):uint() + local capability_item_tree = capabilities_tree:add("capability (tuple[uint16, str])") + + capability_item_tree:add(pf.handshake__capability__enum, + chia_enum_capabilities[tvb:range(offset, 2):uint()]):set_generated() + + capability_item_tree:add(pf.handshake__capability__uint16, tvb:range(offset, 2)) + + offset = offset + 2 + local len_capability_str = tvb:range(offset, 4):uint() + if SHOW_SERIAL_PROTO == true then + capability_item_tree:add(pf.handshake__capability__str__length, tvb:range(offset, 4)) + end + offset = offset + 4 + capability_item_tree:add(pf.handshake__capability__str, tvb:range(offset, len_capability_str)) + offset = offset + len_capability_str + -- end of capability_item_tree + end + -- end of capabilities_tree +end -- 1 handshake + + +-- 3 HarvesterHandshake +local function harvester_handshake (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.harvester_handshake__farmer_public_keys__count, tvb:range(offset, 4)) + end + local farmer_public_keys_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local farmer_public_keys_tree = data_tree:add("farmer_public_keys (list[G1Element])") + for i=1, farmer_public_keys_count do + farmer_public_keys_tree:add(pf.harvester_handshake__farmer_public_key, tvb:range(offset, 48)) + offset = offset + 48 + end + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.harvester_handshake__pool_public_keys__count, tvb:range(offset, 4)) + end + local pool_public_keys_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local pool_public_keys_tree = data_tree:add("pool_public_keys (list[G1Element])") + for i=1, pool_public_keys_count do + farmer_public_keys_tree:add(pf.harvester_handshake__pool_public_key, tvb:range(offset, 48)) + offset = offset + 48 + end +end -- 3 harvester_handshake + + +-- 5 NewProofOfSpace +local function new_proof_of_space (tvb, offset, data_tree) + data_tree:add(pf.new_proof_of_space__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + + data_tree:add(pf.new_proof_of_space__sp_hash, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_proof_of_space__plot_identifier__length, tvb:range(offset, 4)) + end + local plot_identifier_length = tvb:range(offset, 4):uint() + offset = offset + 4 + + data_tree:add(pf.new_proof_of_space__plot_identifier, tvb:range(offset, plot_identifier_length)) + offset = offset + plot_identifier_length + + local proof_tree = data_tree:add("proof (ProofOfSpace)") + offset = ProofOfSpace(tvb, offset, proof_tree) + + data_tree:add(pf.new_proof_of_space__signage_point_index, tvb:range(offset, 1)) + offset = offset + 1 + + data_tree:add(pf.new_proof_of_space__include_source_signature_data, tvb:range(offset, 1)) + offset = offset + 1 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_proof_of_space__farmer_reward_address_override__option, tvb:range(offset, 1)) + end + local farmer_reward_address_override_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if farmer_reward_address_override_option == 0 then + elseif farmer_reward_address_override_option == 1 then + data_tree:add(pf.new_proof_of_space__farmer_reward_address_override, tvb:range(offset, 32)) + offset = offset + 32 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_proof_of_space__fee_info__option, tvb:range(offset, 1)) + end + local fee_info_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if fee_info_option == 0 then + elseif fee_info_option == 1 then + data_tree:add(pf.new_proof_of_space__fee_info__applied_fee_threshold, tvb:range(offset, 4)) + offset = offset + 4 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 5 new_proof_of_space + + +-- 6 RequestSignatures +local function request_signatures (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_signatures__plot_identifier__length, tvb:range(offset, 4)) + end + local plot_identifier__length = tvb:range(offset, 4):uint() + offset = offset + 4 + data_tree:add(pf.request_signatures__plot_identifier, tvb:range(offset, plot_identifier__length)) + offset = offset + plot_identifier__length + data_tree:add(pf.request_signatures__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.request_signatures__sp_hash, tvb:range(offset, 32)) + offset = offset + 32 + -- messages + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_signatures__messages__count, tvb:range(offset, 4)) + end + local messages_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local messages_tree = data_tree:add("messages (list[bytes32])") + for i=1, messages_count do + messages_tree:add(pf.request_signatures__message, tvb:range(offset, 32)) + offset = offset + 32 + end + --_message_data + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_signatures__message_data__option, tvb:range(offset, 1)) + end + local message_data_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if message_data_option == 0 then + elseif message_data_option == 1 then + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_signatures__message_data__count, tvb:range(offset, 4)) + end + local message_data_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local message_data_tree = data_tree:add("message_data (Optional[list[Optional[SignatureRequestSourceData]]])") + for i=1, message_data_count do + if SHOW_SERIAL_PROTO == true then + message_data_tree:add(pf.request_signatures__message_data__SignatureRequestSourceData__option, + tvb:range(offset, 1)) + end + local SignatureRequestSourceData_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if SignatureRequestSourceData_option == 0 then + elseif SignatureRequestSourceData_option == 1 then + local SignatureRequestSourceData_tree = message_data_tree:add("SignatureRequestSourceData ((uint8, bytes))") + SignatureRequestSourceData_tree:add( + pf.request_signatures__message_data__SignatureRequestSourceData__kind, + tvb:range(offset, 1)) + offset = offset + 1 + if SHOW_SERIAL_PROTO == true then + SignatureRequestSourceData_tree:add( + pf.request_signatures__message_data__SignatureRequestSourceData__data__length, + tvb:range(offset, 4)) + end + local data_length = tvb:range(offset, 4):uint() + offset = offset + 4 + SignatureRequestSourceData_tree:add( + pf.request_signatures__message_data__SignatureRequestSourceData__data, + tvb:range(offset, data_length)) + offset = offset + data_length + -- end of SignatureRequestSourceData_tree + else + message_data_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + end + -- end of message_data_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + -- rc_block_unfinished + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_signatures__rc_block_unfinished__option, tvb:range(offset, 1)) + end + local rc_block_unfinished_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if rc_block_unfinished_option == 0 then + elseif rc_block_unfinished_option == 1 then + offset = RewardChainBlock(tvb, offset, data_tree, "UnfinishedBlock") + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 6 request_signatures + + +-- 7 RespondSignatures +local function respond_signatures (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_signatures__plot_identifier__length, tvb:range(offset, 4)) + end + local plot_identifier_length = tvb:range(offset, 4):uint() + offset = offset + 4 + data_tree:add(pf.respond_signatures__plot_identifier, tvb:range(offset, plot_identifier_length)) + offset = offset + plot_identifier_length + data_tree:add(pf.respond_signatures__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.respond_signatures__sp_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.respond_signatures__local_pk, tvb:range(offset, 48)) + offset = offset + 48 + data_tree:add(pf.respond_signatures__farmer_pk, tvb:range(offset, 48)) + offset = offset + 48 + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_signatures__message_signatures__count, tvb:range(offset, 4)) + end + local message_signatures_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local message_signatures_list_tree = data_tree:add("message_signatures") + for i=1, message_signatures_count do + local message_signatures_tuples_tree = message_signatures_list_tree:add("message_signature_tuple") + message_signatures_tuples_tree:add(pf.respond_signatures__message_signature__bytes32, + tvb:range(offset, 32)) + offset = offset + 32 + message_signatures_tuples_tree:add(pf.respond_signatures__message_signature__signature, + tvb:range(offset, 96)) + offset = offset + 96 + -- end of message_signatures_tuples_tree + end + -- end of message_signatures_list_tree + + data_tree:add(pf.respond_signatures__include_source_signature_data, tvb:range(offset, 1)) + offset = offset + 1 + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_signatures__farmer_reward_address_override__option, tvb:range(offset, 1)) + end + local farmer_reward_address_override_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if farmer_reward_address_override_option == 0 then + elseif farmer_reward_address_override_option == 1 then + data_tree:add(pf.respond_signatures__farmer_reward_address_override, tvb:range(offset, 32)) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 7 respond_signatures + + +-- 8 NewSignagePoint +local function new_signage_point (tvb, offset, data_tree) + data_tree:add(pf.new_signage_point__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.new_signage_point__challenge_chain_sp, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.new_signage_point__reward_chain_sp, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.new_signage_point__difficulty, tvb:range(offset, 8)) + offset = offset + 8 + data_tree:add(pf.new_signage_point__sub_slot_iters, tvb:range(offset, 8)) + offset = offset + 8 + data_tree:add(pf.new_signage_point__signage_point_index, tvb:range(offset, 1)) + offset = offset + 1 + data_tree:add(pf.new_signage_point__peak_height, tvb:range(offset, 4)) + offset = offset + 4 + -- sp_source_data + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_signage_point__sp_source_data__option, tvb:range(offset, 1)) + end + local sp_source_data_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if sp_source_data_option == 0 then + elseif sp_source_data_option == 1 then + local sp_source_data_tree = data_tree:add("sp_source_data") + -- SignagePointSourceData + if SHOW_SERIAL_PROTO == true then + sp_source_data_tree:add(pf.new_signage_point__sp_source_data__sub_slot_data__option, + tvb:range(offset, 1)) + end + local sub_slot_data_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if sub_slot_data_option == 0 then + elseif sub_slot_data_option == 1 then + local sub_slot_data_tree = sp_source_data_tree:add("SPSubSlotSourceData") + -- ChallengeChainSubSlot + local cc_sub_slot_tree = sub_slot_data_tree:add("ChallengeChainSubSlot") + local challenge_chain_end_of_slot_vdf_tree = + sp_source_data_tree:add("challenge_chain_end_of_slot_vdf") + offset = VDFInfo(tvb, offset, sp_source_data_tree) + -- end of challenge_chain_end_of_slot_vdf_tree + + -- infused_challenge_chain_sub_slot_hash + if SHOW_SERIAL_PROTO == true then + cc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__infused_challenge_chain_sub_slot_hash__option, + tvb:range(offset, 1)) + end + local infused_challenge_chain_sub_slot_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_sub_slot_hash_option == 0 then + elseif infused_challenge_chain_sub_slot_hash_option == 1 then + cc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__infused_challenge_chain_sub_slot_hash, + tvb:range(offset, 32)) + offset = offset + 32 + else + cc_sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- subepoch_summary_hash + if SHOW_SERIAL_PROTO == true then + cc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__subepoch_summary_hash__option, + tvb:range(offset, 1)) + end + local subepoch_summary_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if subepoch_summary_hash_option == 0 then + elseif subepoch_summary_hash_option == 1 then + cc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__subepoch_summary_hash, + tvb:range(offset, 32)) + offset = offset + 32 + else + cc_sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- new_sub_slot_iters + if SHOW_SERIAL_PROTO == true then + cc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__new_sub_slot_iters__option, + tvb:range(offset, 1)) + end + local new_sub_slot_iters_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if new_sub_slot_iters_option == 0 then + elseif new_sub_slot_iters_option == 1 then + cc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__new_sub_slot_iters, + tvb:range(offset, 8)) + offset = offset + 8 + else + cc_sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- new_difficulty + if SHOW_SERIAL_PROTO == true then + cc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__new_difficulty__option, + tvb:range(offset, 1)) + end + local new_difficulty_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if new_difficulty_option == 0 then + elseif new_difficulty_option == 1 then + cc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__cc_sub_slot__new_difficulty, + tvb:range(offset, 8)) + offset = offset + 8 + else + cc_sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of cc_sub_slot_tree + + -- RewardChainSubSlot + local rc_sub_slot_tree = + sp_source_data_tree:add("RewardChainSubSlot") + -- end_of_slot_vdf + offset = VDFInfo(tvb, offset, sp_source_data_tree) + + -- challenge_chain_sub_slot_hash + rc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__rc_sub_slot__challenge_chain_sub_slot_hash, + tvb:range(offset, 32)) + offset = offset + 32 + + -- infused_challenge_chain_sub_slot_hash + if SHOW_SERIAL_PROTO == true then + rc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__rc_sub_slot__infused_challenge_chain_sub_slot_hash__option, + tvb:range(offset, 1)) + end + local infused_challenge_chain_sub_slot_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_sub_slot_hash_option == 0 then + elseif infused_challenge_chain_sub_slot_hash_option == 1 then + rc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__rc_sub_slot__infused_challenge_chain_sub_slot_hash, + tvb:range(offset, 32)) + offset = offset + 32 + else + rc_sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- deficit + rc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__sub_slot_data__rc_sub_slot__deficit, + tvb:range(offset, 1)) + offset = offset + 1 + -- end of rc_sub_slot_tree + -- end of sub_slot_data_tree + + -- vdf_data + local vdf_data_tree = sp_source_data_tree:add("SPVDFSourceData") + if SHOW_SERIAL_PROTO == true then + rc_sub_slot_tree:add(pf.new_signage_point__sp_source_data__vdf_data__option, + tvb:range(offset, 1)) + end + local vdf_data_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if vdf_data_option == 0 then + elseif vdf_data_option == 1 then + rc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__vdf_data__cc_vdf__ClassgroupElement__data, + tvb:range(offset, 100)) + offset = offset + 100 + rc_sub_slot_tree:add( + pf.new_signage_point__sp_source_data__vdf_data__rc_vdf__ClassgroupElement__data, + tvb:range(offset, 100)) + offset = offset + 100 + else + rc_sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of vdf_data_tree + else + sp_source_data_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of sp_source_data_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 8 new_signage_point + + +-- 9 DeclareProofOfSpace +local function declare_proof_of_space (tvb, offset, data_tree) + data_tree:add(pf.declare_proof_of_space__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.declare_proof_of_space__challenge_chain_sp, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.declare_proof_of_space__signage_point_index, tvb:range(offset, 1)) + offset = offset + 1 + data_tree:add(pf.declare_proof_of_space__reward_chain_sp, tvb:range(offset, 32)) + offset = offset + 32 + offset = ProofOfSpace(tvb, offset, data_tree) + data_tree:add(pf.declare_proof_of_space__challenge_chain_sp_signature, tvb:range(offset, 96)) + offset = offset + 96 + data_tree:add(pf.declare_proof_of_space__reward_chain_sp_signature, tvb:range(offset, 96)) + offset = offset + 96 + data_tree:add(pf.declare_proof_of_space__farmer_puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + -- pool_target + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.declare_proof_of_space__pool_target__option, tvb:range(offset, 1)) + end + local pool_target_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if pool_target_option == 0 then + elseif pool_target_option == 1 then + local pool_target_tree = data_tree:add("PoolTarget") + data_tree:add(pf.declare_proof_of_space__pool_target__puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.declare_proof_of_space__pool_target__height, tvb:range(offset, 4)) + offset = offset + 4 + -- end of pool_target_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + -- pool_signature + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.declare_proof_of_space__pool_signature__option, tvb:range(offset, 1)) + end + local pool_signature_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if pool_signature_option == 0 then + elseif pool_signature_option == 1 then + data_tree:add(pf.declare_proof_of_space__pool_signature, tvb:range(offset, 96)) + offset = offset + 96 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + -- include_signature_source_data + data_tree:add(pf.declare_proof_of_space__include_signature_source_data, tvb:range(offset, 1)) + offset = offset + 1 +end -- 9 declare_proof_of_space + + +-- 10 RequestSignedValues +local function request_signed_values (tvb, offset, data_tree) + data_tree:add(pf.request_signed_values__quality_string, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.request_signed_values__foliage_block_data_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.request_signed_values__foliage_transaction_block_hash, tvb:range(offset, 32)) + offset = offset + 32 + -- foliage_block_data + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_signed_values__foliage_block_data__option, tvb:range(offset, 1)) + end + local foliage_block_data_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if foliage_block_data_option == 0 then + elseif foliage_block_data_option == 1 then + offset = FoliageBlockData(tvb, offset, data_tree) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- foliage_transaction_block_data + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_signed_values__foliage_transaction_block_data__option, tvb:range(offset, 1)) + end + local foliage_transaction_block_data_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if foliage_transaction_block_data_option == 0 then + elseif foliage_transaction_block_data_option == 1 then + offset = FoliageTransactionBlock(tvb, offset, data_tree) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- rc_block_unfinished + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_signed_values__rc_block_unfinished__option, tvb:range(offset, 1)) + end + local rc_block_unfinished_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if rc_block_unfinished_option == 0 then + elseif rc_block_unfinished_option == 1 then + offset = RewardChainBlock(tvb, offset, data_tree, "UnfinishedBlock") + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 10 request_signed_values + + +-- 11 SignedValues +local function signed_values (tvb, offset, data_tree) + data_tree:add(pf.signed_values__quality_string, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.signed_values__foliage_block_data_signature, tvb:range(offset, 96)) + offset = offset + 96 + data_tree:add(pf.signed_values__foliage_transaction_block_signature, tvb:range(offset, 96)) + offset = offset + 96 +end -- 11 signed_values + + +-- 12 FarmingInfo +local function farming_info (tvb, offset, data_tree) + data_tree:add(pf.farming_info__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.farming_info__sp_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.farming_info__timestamp, tvb:range(offset, 8)) + offset = offset + 8 + data_tree:add(pf.farming_info__passed, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.farming_info__proofs, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.farming_info__total_plots, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.farming_info__lookup_time, tvb:range(offset, 8)) + offset = offset + 8 +end -- 12 farming_info + + +-- 13 NewPeakTimelord +local function new_peak_timelord (tvb, offset, data_tree) + -- reward_chain_block + offset = RewardChainBlock(tvb, offset, data_tree, "FinishedBlock") + + data_tree:add(pf.new_peak_timelord__difficulty, tvb:range(offset, 8)) + offset = offset + 8 + data_tree:add(pf.new_peak_timelord__deficit, tvb:range(offset, 1)) + offset = offset + 1 + data_tree:add(pf.new_peak_timelord__sub_slot_iters, tvb:range(offset, 8)) + offset = offset + 8 + + -- sub_epoch_summary + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_peak_timelord__sub_epoch_summary__option, tvb:range(offset, 1)) + end + local sub_epoch_summary_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if sub_epoch_summary_option == 0 then + elseif sub_epoch_summary_option == 1 then + offset = SubEpochSummary(tvb, offset, data_tree) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- previous_reward_challenges + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_peak_timelord__previous_reward_challenges__count, tvb:range(offset, 4)) + end + local previous_reward_challenges_count = tvb:range(offset, 4):uint() + offset = offset + 4 + for i=1, previous_reward_challenges_count do + local previous_reward_challenges_tree = data_tree:add("previous_reward_challenges") + local tuples_tree = + previous_reward_challenges_tree:add("tuple "..i) + tuples_tree:add(pf.new_peak_timelord__previous_reward_challenges__tuples__bytes32, + tvb:range(offset, 4)) + offset = offset + 4 + tuples_tree:add(pf.new_peak_timelord__previous_reward_challenges__tuples__uint128, + tonumber(tostring(tvb:range(offset, 16):bytes()), 16)) + offset = offset + 16 + -- end of tuples_tree + -- end of previous_reward_challenges_tree + end + + data_tree:add( + pf.new_peak_timelord__last_challenge_sb_or_eos_total_iters, + tonumber(tostring(tvb:range(offset, 16):bytes()), 16)) + offset = offset + 16 + + data_tree:add( + pf.new_peak_timelord__passes_ses_height_but_not_yet_included, tvb:range(offset, 1)) + offset = offset + 1 +end -- 13 new_peak_timelord + + +-- 14 NewUnfinishedBlockTimelord +local function new_unfinished_block_timelord (tvb, offset, data_tree) + + offset = RewardChainBlock(tvb, offset, data_tree, "UnfinishedBlock") + + data_tree:add(pf.new_unfinished_block_timelord__difficulty, tvb:range(offset, 8)) + offset = offset + 8 + data_tree:add(pf.new_unfinished_block_timelord__sub_slot_iters, tvb:range(offset, 8)) + offset = offset + 8 + + offset = Foliage(tvb, offset, data_tree) + + -- sub_epoch_summary + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_unfinished_block_timelord__sub_epoch_summary__option, tvb:range(offset, 1)) + end + local sub_epoch_summary_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if sub_epoch_summary_option == 0 then + elseif sub_epoch_summary_option == 1 then + offset = SubEpochSummary(tvb, offset, data_tree) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + data_tree:add(pf.new_unfinished_block_timelord__rc_prev, tvb:range(offset, 4)) + offset = offset + 4 +end -- 14 new_unfinished_block_timelord + + +-- 15 NewInfusionPointVDF +local function new_infusion_point_vdf (tvb, offset, data_tree) + data_tree:add(pf.new_infusion_point_vdf__unfinished_reward_hash, tvb:range(offset, 4)) + offset = offset + 4 + + offset = VDFInfo(tvb, offset, data_tree) + offset = VDFProof(tvb, offset, data_tree) + offset = VDFInfo(tvb, offset, data_tree) + offset = VDFProof(tvb, offset, data_tree) + + -- infused_challenge_chain_ip_vdf + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_infusion_point_vdf__infused_challenge_chain_ip_vdf__option, tvb:range(offset, 1)) + end + local infused_challenge_chain_ip_vdf_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_ip_vdf_option == 0 then + elseif infused_challenge_chain_ip_vdf_option == 1 then + offset = VDFInfo(tvb, offset, data_tree) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- infused_challenge_chain_ip_proof + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_infusion_point_vdf__infused_challenge_chain_ip_proof__option, tvb:range(offset, 1)) + end + local infused_challenge_chain_ip_proof_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if infused_challenge_chain_ip_proof_option == 0 then + elseif infused_challenge_chain_ip_proof_option == 1 then + offset = VDFProof(tvb, offset, data_tree) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 15 new_infusion_point_vdf + + +-- 16 NewSignagePointVDF +local function new_signage_point_vdf (tvb, offset, data_tree) + data_tree:add(pf.new_signage_point_vdf__index_from_challenge, tvb:range(offset, 1)) + offset = offset + 1 + offset = VDFInfo(tvb, offset, data_tree) + offset = VDFProof(tvb, offset, data_tree) + offset = VDFInfo(tvb, offset, data_tree) + offset = VDFProof(tvb, offset, data_tree) +end -- 16 new_signage_point_vdf + + +-- 17 NewEndOfSubSlotVDF +local function new_end_of_sub_slot_vdf (tvb, offset, data_tree) + offset = EndOfSubSlotBundle(tvb, offset, data_tree) +end -- 17 new_end_of_sub_slot_vdf + + +-- 18 RequestCompactProofOfTime +local function request_compact_proof_of_time (tvb, offset, data_tree) + + offset = VDFInfo(tvb, offset, data_tree) + + data_tree:add(pf.request_compact_proof_of_time__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.request_compact_proof_of_time__height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.request_compact_proof_of_time__field_vdf, tvb:range(offset, 1)) + offset = offset + 1 +end -- 18 request_compact_proof_of_time + + +-- 19 RespondCompactProofOfTime +local function respond_compact_proof_of_time (tvb, offset, data_tree) + + offset = VDFInfo(tvb, offset, data_tree) + offset = VDFProof(tvb, offset, data_tree) + + data_tree:add(pf.respond_compact_proof_of_time__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.respond_compact_proof_of_time__height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.respond_compact_proof_of_time__field_vdf, tvb:range(offset, 1)) + offset = offset + 1 +end -- 19 respond_compact_proof_of_time + + +-- 20 NewPeak +local function new_peak (tvb, offset, data_tree) + data_tree:add(pf.new_peak__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + + data_tree:add(pf.new_peak__height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.new_peak__weight, tonumber(tostring(tvb:range(offset, 16):bytes()), 16)) + offset = offset + 16 + + data_tree:add(pf.new_peak__fork_point_with_previous_peak, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.new_peak__unfinished_reward_block_hash, tvb:range(offset, 32)) + offset = offset + 32 +end -- 20 new_peak + + +-- 21 NewTransaction +local function new_transaction (tvb, offset, data_tree) + data_tree:add(pf.new_transaction__transaction_id, tvb:range(offset, 32)) + offset = offset + 32 + + data_tree:add(pf.new_transaction__cost, tvb:range(offset, 8)) + offset = offset + 8 + + data_tree:add(pf.new_transaction__fees, tvb:range(offset, 8)) + offset = offset + 8 +end -- 21 new_transaction + + +-- 22 RequestTransaction +local function request_transaction (tvb, offset, data_tree) + data_tree:add(pf.request_transaction__transaction_id, tvb:range(offset, 32)) + offset = offset + 32 +end -- 22 request_transaction + + +-- 23 RespondTransaction +local function respond_transaction (tvb, offset, data_tree) + offset = SpendBundle(tvb, offset, data_tree) +end -- 23 respond_transaction + + +-- 24 RequestProofOfWeight +local function request_proof_of_weight (tvb, offset, data_tree) + data_tree:add(pf.request_proof_of_weight__total_number_of_blocks, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.request_proof_of_weight__tip, tvb:range(offset, 32)) + offset = offset + 32 +end -- 24 request_proof_of_weight + + +-- 25 RespondProofOfWeight +local function respond_proof_of_weight (tvb, offset, data_tree) + -- wp + local wp_tree = data_tree:add("wp (WeightProof)") + if SHOW_SERIAL_PROTO == true then + wp_tree:add(pf.respond_proof_of_weight__wp__sub_epochs__count, tvb:range(offset, 4)) + end + local sub_epochs_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local sub_epochs_tree = wp_tree:add("sub_epochs (Vec)") + for i=1, sub_epochs_count do + local sub_epoch_data_tree = sub_epochs_tree:add("SubEpochData") + sub_epoch_data_tree:add(pf.respond_proof_of_weight__wp__sub_epochs__reward_chain_hash, + tvb:range(offset, 32)) + offset = offset + 32 + + sub_epoch_data_tree:add( + pf.respond_proof_of_weight__wp__sub_epochs__num_blocks_overflow, tvb:range(offset, 1)) + offset = offset + 1 + + if SHOW_SERIAL_PROTO == true then + sub_epoch_data_tree:add(pf.respond_proof_of_weight__wp__sub_epochs__new_sub_slot_iters__option, tvb:range(offset, 1)) + end + local new_sub_slot_iters__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if new_sub_slot_iters__option == 0 then + elseif new_sub_slot_iters__option == 1 then + sub_epoch_data_tree:add(pf.respond_proof_of_weight__wp__sub_epochs__new_sub_slot_iters, + tvb:range(offset, 8)) + offset = offset + 8 + else + sub_epoch_data_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + if SHOW_SERIAL_PROTO == true then + sub_epoch_data_tree:add(pf.respond_proof_of_weight__wp__sub_epochs__new_difficulty__option, + tvb:range(offset, 1)) + end + local new_difficulty__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if new_difficulty__option == 0 then + elseif new_difficulty__option == 1 then + sub_epoch_data_tree:add( + pf.respond_proof_of_weight__wp__sub_epochs__new_difficulty, tvb:range(offset, 8)) + offset = offset + 8 + else + sub_epoch_data_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of sub_epoch_data_tree + end + -- end of sub_epochs_tree + + if SHOW_SERIAL_PROTO == true then + wp_tree:add(pf.respond_proof_of_weight__wp__sub_epoch_segments__count, tvb:range(offset, 4)) + end + local sub_epoch_segments_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local sub_epoch_segments_tree = wp_tree:add("sub_epoch_segments (Vec])") + for i=1, sub_epoch_segments_count do + local sub_epoch_challenge_segment_tree = sub_epoch_segments_tree:add("SubEpochChallengeSegment") + sub_epoch_challenge_segment_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_epoch_n, tvb:range(offset, 4)) + offset = offset + 4 + + if SHOW_SERIAL_PROTO == true then + sub_epoch_challenge_segment_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__count, tvb:range(offset, 4)) + end + local sub_slots_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local sub_slots_tree = sub_epoch_challenge_segment_tree:add("sub_slots (Vec)") + for i=1, sub_slots_count do + local sub_slot_tree = sub_slots_tree:add("SubSlotData") + -- proof_of_space + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__proof_of_space__option, + tvb:range(offset, 1)) + end + local proof_of_space__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if proof_of_space__option == 0 then + elseif proof_of_space__option == 1 then + offset = ProofOfSpace(tvb, offset, sub_slot_tree) + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- cc_signage_point + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_signage_point__option, + tvb:range(offset, 1)) + end + local cc_signage_point__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if cc_signage_point__option == 0 then + elseif cc_signage_point__option == 1 then + local cc_signage_point_tree = sub_slot_tree:add("cc_signage_point (VDFProof)") + offset = VDFProof(tvb, offset, cc_signage_point_tree) + -- end of cc_signage_point_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- cc_infusion_point + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_infusion_point__option, + tvb:range(offset, 1)) + end + local cc_infusion_point__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if cc_infusion_point__option == 0 then + elseif cc_infusion_point__option == 1 then + local cc_infusion_point_tree = sub_slot_tree:add("cc_infusion_point (VDFProof)") + offset = VDFProof(tvb, offset, cc_infusion_point_tree) + -- end of cc_infusion_point_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- icc_infusion_point + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add(pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__icc_infusion_point__option, tvb:range(offset, 1)) + end + local icc_infusion_point__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if icc_infusion_point__option == 0 then + elseif icc_infusion_point__option == 1 then + local icc_infusion_point_tree = sub_slot_tree:add("icc_infusion_point (VDFProof)") + offset = VDFProof(tvb, offset, icc_infusion_point_tree) + -- end of icc_infusion_point_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- cc_sp_vdf_info + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_sp_vdf_info__option, + tvb:range(offset, 1)) + end + local cc_sp_vdf_info__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if cc_sp_vdf_info__option == 0 then + elseif cc_sp_vdf_info__option == 1 then + local cc_sp_vdf_info_tree = sub_slot_tree:add("cc_sp_vdf_info (VDFInfo)") + offset = VDFInfo(tvb, offset, cc_sp_vdf_info_tree) + -- end of cc_sp_vdf_info_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- signage_point_index + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__signage_point_index__option, + tvb:range(offset, 1)) + end + local signage_point_index__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if signage_point_index__option == 0 then + elseif signage_point_index__option == 1 then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__signage_point_index, + tvb:range(offset, 1)) + offset = offset + 1 + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- cc_slot_end + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_slot_end__option, + tvb:range(offset, 1)) + end + local cc_slot_end__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if cc_slot_end__option == 0 then + elseif cc_slot_end__option == 1 then + local cc_slot_end_tree = sub_slot_tree:add("cc_slot_end (VDFProof)") + offset = VDFProof(tvb, offset, cc_slot_end_tree) + -- end of cc_slot_end_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- icc_slot_end + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add(pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__icc_slot_end__option, + tvb:range(offset, 1)) + end + local icc_slot_end__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if icc_slot_end__option == 0 then + elseif icc_slot_end__option == 1 then + local icc_slot_end_tree = sub_slot_tree:add("icc_slot_end (VDFProof)") + offset = VDFProof(tvb, offset, icc_slot_end_tree) + -- end of icc_slot_end_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- cc_slot_end_info + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_slot_end_info__option, + tvb:range(offset, 1)) + end + local cc_slot_end_info__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if cc_slot_end_info__option == 0 then + elseif cc_slot_end_info__option == 1 then + local cc_slot_end_info_tree = sub_slot_tree:add("cc_slot_end_info (VDFInfo)") + offset = VDFInfo(tvb, offset, cc_slot_end_info_tree) + -- end of cc_slot_end_info_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- icc_slot_end_info + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__icc_slot_end_info__option, + tvb:range(offset, 1)) + end + local icc_slot_end_info__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if icc_slot_end_info__option == 0 then + elseif icc_slot_end_info__option == 1 then + local icc_slot_end_info_tree = sub_slot_tree:add("icc_slot_end_info (VDFInfo)") + offset = VDFInfo(tvb, offset, icc_slot_end_info_tree) + -- end of icc_slot_end_info_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- cc_ip_vdf_info + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add(pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__cc_ip_vdf_info__option, + tvb:range(offset, 1)) + end + local cc_ip_vdf_info__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if cc_ip_vdf_info__option == 0 then + elseif cc_ip_vdf_info__option == 1 then + local cc_ip_vdf_info_tree = sub_slot_tree:add("cc_ip_vdf_info (VDFInfo)") + offset = VDFInfo(tvb, offset, cc_ip_vdf_info_tree) + -- end of cc_ip_vdf_info_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- icc_ip_vdf_info + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__icc_ip_vdf_info__option, + tvb:range(offset, 1)) + end + local icc_ip_vdf_info__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if icc_ip_vdf_info__option == 0 then + elseif icc_ip_vdf_info__option == 1 then + local icc_ip_vdf_info_tree = sub_slot_tree:add("icc_ip_vdf_info (VDFInfo)") + offset = VDFInfo(tvb, offset, icc_ip_vdf_info_tree) + -- end of icc_ip_vdf_info_tree + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- total_iters + if SHOW_SERIAL_PROTO == true then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__total_iters__option, + tvb:range(offset, 1)) + end + local total_iters__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if total_iters__option == 0 then + elseif total_iters__option == 1 then + sub_slot_tree:add( + pf.respond_proof_of_weight__wp__sub_epoch_segments__sub_slots__total_iters, + tonumber(tostring(tvb:range(offset, 16):bytes()), 16)) + offset = offset + 16 + else + sub_slot_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of sub_slot_tree + end + -- end of sub_slots_tree + + -- rc_slot_end_info + if SHOW_SERIAL_PROTO == true then + sub_epoch_challenge_segment_tree:add(pf.respond_proof_of_weight__wp__sub_epoch_segments__rc_slot_end_info__option, + tvb:range(offset, 1)) + end + local rc_slot_end_info__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if rc_slot_end_info__option == 0 then + elseif rc_slot_end_info__option == 1 then + local rc_slot_end_info_tree = sub_epoch_challenge_segment_tree:add("rc_slot_end_info (VDFInfo)") + offset = VDFInfo(tvb, offset, rc_slot_end_info_tree) + -- end of rc_slot_end_info_tree + else + sub_epoch_challenge_segment_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- end of sub_epoch_challenge_segment_tree + end + -- end of sub_epoch_segments_tree + + -- recent_chain_data + if SHOW_SERIAL_PROTO == true then + wp_tree:add(pf.respond_proof_of_weight__wp__recent_chain_data__count, + tvb:range(offset, 4)) + end + local recent_chain_data_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local recent_chain_data_tree = wp_tree:add("recent_chain_data (Vec)") + for i=1, recent_chain_data_count do + local header_block_tree = recent_chain_data_tree:add("HeaderBlock") + offset = Block(tvb, offset, header_block_tree, "HeaderBlock") + end + -- end of recent_chain_data_tree + -- end of wp_tree + + -- tip + data_tree:add(pf.respond_proof_of_weight__tip, tvb:range(offset, 32)) +end -- 25 respond_proof_of_weight + + +-- 26 RequestBlock +local function request_block (tvb, offset, data_tree) + data_tree:add(pf.request_block__height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.request_block__include_transaction_block, tvb:range(offset, 1)) + offset = offset + 1 +end -- 26 request_block + + +-- 27 RespondBlock +local function respond_block (tvb, offset, data_tree) + offset = Block(tvb, offset, data_tree, "FullBlock") +end -- 27 respond_block + + +-- 28 RejectBlock +local function reject_block (tvb, offset, data_tree) + data_tree:add(pf.reject_block__height, tvb:range(offset, 4)) + offset = offset + 4 +end -- 28 reject_block + + +-- 29 RequestBlocks +local function request_blocks (tvb, offset, data_tree) + data_tree:add(pf.request_blocks__start_height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.request_blocks__end_height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.request_blocks__include_transaction_block, tvb:range(offset, 1)) + offset = offset + 1 +end -- 29 request_blocks + + +-- 30 RespondBlocks +local function respond_blocks (tvb, offset, data_tree) + data_tree:add(pf.respond_blocks__start_height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.respond_blocks__end_height, tvb:range(offset, 4)) + offset = offset + 4 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_blocks__blocks__count, tvb:range(offset, 4)) + end + local blocks_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local blocks_tree = data_tree:add("FullBlocks") + for i=1, blocks_count do + local fullblock_tree = blocks_tree:add("FullBlock") + offset = Block(tvb, offset, fullblock_tree, "FullBlock") + -- end of fullblock_tree + end +end -- 30 respond_blocks + + +-- 31 RejectBlocks +local function reject_blocks (tvb, offset, data_tree) + data_tree:add(pf.reject_blocks__start_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.reject_blocks__end_height, tvb:range(offset, 4)) +end -- 31 reject_blocks + + +-- 32 NewUnfinishedBlock +local function new_unfinished_block (tvb, offset, data_tree) + data_tree:add(pf.new_unfinished_block__unfinished_reward_hash, tvb:range(offset, 32)) +end -- 32 new_unfinished_block + + +-- 33 RequestUnfinishedBlock +local function request_unfinished_block (tvb, offset, data_tree) + data_tree:add(pf.request_unfinished_block__unfinished_reward_hash, tvb:range(offset, 32)) +end -- 33 request_unfinished_block + + +-- 34 RespondUnfinishedBlock +local function respond_unfinished_block (tvb, offset, data_tree) + local unfinished_block_tree = data_tree:add("unfinished_block (UnfinishedBlock)") + offset = Block(tvb, offset, unfinished_block_tree, "UnfinishedBlock") + -- end of unfinished_block_tree +end -- 34 respond_unfinished_block + + +-- 35 NewSignagePointOrEndOfSubSlot +local function new_signage_point_or_end_of_sub_slot (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_signage_point_or_end_of_sub_slot__prev_challenge_hash__option, tvb:range(offset, 1)) + end + local prev_challenge_hash__option = tvb:range(offset, 1):uint() + offset = offset + 1 + + if prev_challenge_hash__option == 0 then + elseif prev_challenge_hash__option == 1 then + data_tree:add(pf.new_signage_point_or_end_of_sub_slot__prev_challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + data_tree:add(pf.new_signage_point_or_end_of_sub_slot__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + + data_tree:add(pf.new_signage_point_or_end_of_sub_slot__index_from_challenge, tvb:range(offset, 1)) + offset = offset + 1 + + data_tree:add(pf.new_signage_point_or_end_of_sub_slot__last_rc_infusion, tvb:range(offset, 32)) + offset = offset + 32 +end -- 35 new_signage_point_or_end_of_sub_slot + + +-- 36 RequestSignagePointOrEndOfSubSlot +local function request_signage_point_or_end_of_sub_slot (tvb, offset, data_tree) + data_tree:add(pf.request_signage_point_or_end_of_sub_slot__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + + data_tree:add(pf.request_signage_point_or_end_of_sub_slot__index_from_challenge, tvb:range(offset, 1)) + offset = offset + 1 + + data_tree:add(pf.request_signage_point_or_end_of_sub_slot__last_rc_infusion, tvb:range(offset, 32)) + offset = offset + 32 +end -- 36 request_signage_point_or_end_of_sub_slot + + +-- 37 RespondSignagePoint +local function respond_signage_point (tvb, offset, data_tree) + data_tree:add(pf.respond_signage_point__index_from_challenge, tvb:range(offset, 1)) + offset = offset + 1 + -- challenge_chain_vdf + offset = VDFInfo(tvb, offset, data_tree) + -- challenge_chain_proof + offset = VDFProof(tvb, offset, data_tree) + -- reward_chain_vdf + offset = VDFInfo(tvb, offset, data_tree) + -- reward_chain_proof + offset = VDFProof(tvb, offset, data_tree) +end -- 37 respond_signage_point + + +-- 38 RespondEndOfSubSlot +local function respond_end_of_sub_slot (tvb, offset, data_tree) + offset = EndOfSubSlotBundle(tvb, offset, data_tree) +end -- 38 respond_end_of_sub_slot + + +-- 39 RequestMempoolTransactions +local function request_mempool_transactions (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_mempool_transactions__filter__length, tvb:range(offset, 4)) + end + local filter__length = tvb:range(offset, 4):uint() + offset = offset + 4 + + data_tree:add(pf.request_mempool_transactions__filter, tvb:range(offset, filter__length)) + offset = offset + filter__length +end -- 39 request_mempool_transactions + + +-- 40 RequestCompactVDF +local function request_compact_vdf (tvb, offset, data_tree) + data_tree:add(pf.request_compact_vdf__height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.request_compact_vdf__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.request_compact_vdf__field_vdf, tvb:range(offset, 1)) + offset = offset + 1 + + offset = VDFInfo(tvb, offset, data_tree) +end -- 40 request_compact_vdf + + +-- 41 RespondCompactVDF +local function respond_compact_vdf (tvb, offset, data_tree) + data_tree:add(pf.respond_compact_vdf__height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.respond_compact_vdf__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.respond_compact_vdf__field_vdf, tvb:range(offset, 1)) + offset = offset + 1 + + offset = VDFInfo(tvb, offset, data_tree) + offset = VDFProof(tvb, offset, data_tree) +end -- 41 respond_compact_vdf + + +-- 42 NewCompactVDF +local function new_compact_vdf (tvb, offset, data_tree) + data_tree:add(pf.respond_compact_vdf__height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.new_compact_vdf__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.new_compact_vdf__field_vdf, tvb:range(offset, 1)) + offset = offset + 1 + + offset = VDFInfo(tvb, offset, data_tree) +end -- 42 new_compact_vdf + + +-- 43 RequestPeers / request_peers + + +-- 44 RespondPeers +local function respond_peers(tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_peers__peer_list__count, tvb:range(offset, 4)) + end + local peer_list_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local peer_list_tree = data_tree:add("peer_list") + for i=1, peer_list_count do + offset = TimestampedPeerInfo(tvb, offset, peer_list_tree) + end +end -- 44 respond_peers + + +-- 45 RequestPuzzleSolution +local function request_puzzle_solution (tvb, offset, data_tree) + data_tree:add(pf.request_puzzle_solution__coin_name, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.request_puzzle_solution__height, tvb:range(offset, 4)) +end -- 45 request_puzzle_solution + + +-- 46 RespondPuzzleSolution +local function respond_puzzle_solution (tvb, offset, data_tree) + data_tree:add(pf.respond_puzzle_solution__coin_name, tvb:range(offset+5,32)) + offset = offset + 32 + data_tree:add(pf.respond_puzzle_solution__height, tvb:range(offset, 4)) + offset = offset + 4 + local puzzle_offset = ParseSerializedProgramTrusted(tvb,offset, data_tree) + data_tree:add(pf.respond_puzzle_solution__puzzle, tvb:range(offset, (puzzle_offset - offset))) + offset = puzzle_offset + 1 + local solution_offset = ParseSerializedProgramTrusted(tvb,offset, data_tree) + data_tree:add(pf.respond_puzzle_solution__solution, tvb:range(offset, (solution_offset - offset))) +end -- 46 respond_puzzle_solution + + +-- 47 RejectPuzzleSolution +local function reject_puzzle_solution (tvb, offset, data_tree) + data_tree:add(pf.reject_puzzle_solution__coin_name, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.reject_puzzle_solution__height, tvb:range(offset, 4)) +end -- 47 reject_puzzle_solution + + +-- 48 SendTransaction +local function send_transaction (tvb, offset, data_tree) + offset = SpendBundle(tvb, offset, data_tree) +end -- 48 send_transaction + + +-- 49 TransactionAck +local function transaction_ack (tvb, offset, data_tree) + data_tree:add(pf.transaction_ack__txid, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.transaction_ack__status, tvb:range(offset, 1)) + local status_enum = chia_enum_MempoolInclusionStatus[tvb:range(offset, 1):uint()] + offset = offset + 1 + data_tree:add(pf.transaction_ack__status__enum, status_enum):set_generated() + -- eror + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.transaction_ack__error__option, tvb:range(offset, 1)) + end + local error_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if error_option == 0 then + elseif error_option == 1 then + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.transaction_ack__error__length, tvb:range(offset, 4)) + end + local error_length = tvb:range(offset, 4):uint() + offset = offset + 4 + data_tree:add(pf.transaction_ack__error, tvb:range(offset, error_length)) + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 49 transaction_ack + + +-- 50 NewPeakWallet +local function new_peak_wallet (tvb, offset, data_tree) + data_tree:add(pf.new_peak_wallet__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.new_peak_wallet__height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.new_peak_wallet__weight, tonumber(tostring(tvb:range(offset, 16):bytes()), 16)) + offset = offset + 16 + data_tree:add(pf.new_peak_wallet__fork_point_with_previous_peak, tvb:range(offset, 4)) +end -- 50 new_peak_wallet + + +-- 51 RequestBlockHeader +local function request_block_header (tvb, offset, data_tree) + data_tree:add(pf.request_block_header__height, tvb:range(offset, 4)) +end -- 51 request_block_header + + +-- 52 RespondBlockHeader +local function respond_block_header (tvb, offset, data_tree) + local header_block_tree = data_tree:add("header_block (HeaderBlock)") + Block(tvb, offset, header_block_tree, "HeaderBlock") + -- end of header_block_tree +end -- 52 respond_block_header + + +-- 53 RejectHeaderRequest +local function reject_header_request (tvb, offset, data_tree) + data_tree:add(pf.reject_header_request__height, tvb:range(offset, 4)) +end -- 53 reject_header_request + + +-- 54 RequestRemovals +local function request_removals (tvb, offset, data_tree) + data_tree:add(pf.request_removals__height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.request_removals__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_removals__coin_names__option, tvb:range(offset, 1)) + end + local coin_names__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if coin_names__option == 0 then + elseif coin_names__option == 1 then + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_removals__coin_names__count, tvb:range(offset, 4)) + end + local coin_names_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local coin_names_tree = data_tree:add("coin_names") + for i=1, coin_names_count do + coin_names_tree:add(pf.request_removals__coin_names__coin_name, tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of coin_names_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 54 request_removals + + +-- 55 RespondRemovals +local function respond_removals (tvb, offset, data_tree) + data_tree:add(pf.respond_removals__height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.respond_removals__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + + local coins_tree = data_tree:add("coins") + if SHOW_SERIAL_PROTO == true then + coins_tree:add(pf.respond_removals__coins__coin_tuple__count, tvb:range(offset, 4)) + end + local coins__coin_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local coin_tuple_tree = coins_tree:add("coin_tuple") + for i=1, coins__coin_count do + coin_tuple_tree:add(pf.respond_removals__coins__coin_tuple__bytes32, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + coin_tuple_tree:add(pf.respond_removals__coins__coin_tuple__coin__option, tvb:range(offset, 1)) + end + local coin_tuple__coin__option = tvb:range(offset, 1):uint() + offset = offset + 1 + + if coin_tuple__coin__option == 0 then + elseif coin_tuple__coin__option == 1 then + local coin_tree = coin_tuple_tree:add("coin") + offset = Coin(tvb, offset, coin_tree) + -- end of coin_tree + else + coin_tuple_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + end + -- end of coin_tuple + -- end of coins_tree + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_removals__proofs__option, tvb:range(offset, 1)) + end + local proofs_option = tvb:range(offset, 1):uint() + offset = offset + 1 + + if proofs_option == 0 then + elseif proofs_option == 1 then + local proofs_tree = data_tree:add("proofs") + if SHOW_SERIAL_PROTO == true then + proofs_tree:add(pf.respond_removals__proofs__count, tvb:range(offset, 4)) + end + local proofs_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + for i=1, proofs_count do + local proof_tuple_tree = proofs_tree:add("proof_tuple") + proof_tuple_tree:add(pf.respond_removals__proofs__proof_tuple__bytes32, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + proof_tuple_tree:add(pf.respond_removals__proofs__proof_tuple__bytes__length, + tvb:range(offset, 4)) + end + local proof_tuple__bytes__length = tvb:range(offset, 4):uint() + offset = offset + 4 + + proof_tuple_tree:add(pf.respond_removals__proofs__proof_tuple__bytes, + tvb:range(offset, proof_tuple__bytes__length)) + offset = offset + proof_tuple__bytes__length + -- end of proof_tuple_tree + end + -- end of proofs_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 55 respond_removals + + +-- 56 RejectRemovalsRequest +local function reject_removals_request (tvb, offset, data_tree) + data_tree:add(pf.reject_removals_request__height, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.reject_removals_request__header_hash, tvb:range(offset, 4)) +end + + +-- 57 RequestAdditions +local function request_additions (tvb, offset, data_tree) + data_tree:add(pf.request_additions__height, tvb:range(offset, 4)) + offset = offset + 4 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_additions__header_hash__option, tvb:range(offset, 1)) + end + local header_hash__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if header_hash__option == 0 then + elseif header_hash__option == 1 then + data_tree:add(pf.request_additions__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_additions__puzzle_hashes__option, tvb:range(offset, 1)) + end + local puzzle_hashes__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if puzzle_hashes__option == 0 then + elseif puzzle_hashes__option == 1 then + data_tree:add(pf.request_additions__puzzle_hashes__count, tvb:range(offset, 4)) + local puzzle_hashes_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local puzzle_hash_tree = data_tree:add("puzzle_hashes") + for i=1, puzzle_hashes_count do + puzzle_hash_tree:add(pf.request_additions__puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + end + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 57 request_additions + + +-- 58 RespondAdditions +local function respond_additions (tvb, offset, data_tree) + data_tree:add(pf.respond_additions__height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.respond_additions__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_additions__coins__count, tvb:range(offset, 4)) + end + local coins_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local coins_tree = data_tree:add("coins (list[tuple[bytes32, list[Coin]]])") + for i=1, coins_count do + local coin_tuple_tree = coins_tree:add("(tuple[bytes32, list[Coin]])") + coin_tuple_tree:add(pf.respond_additions__coins__bytes32, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + coin_tuple_tree:add(pf.respond_additions__coins__coin__count, tvb:range(offset, 4)) + end + local coin_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local coins_tree = coin_tuple_tree:add("(list[Coin])") + for i=1, coin_count do + local coin_tree = coins_tree:add("(Coin)") + offset = Coin(tvb, offset, coin_tree) + -- end of coin_tree + end + -- end of coin_tuple_tree + end + -- end of coins_tree + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_additions__proofs__option, tvb:range(offset, 1)) + end + local proofs__option = tvb:range(offset, 1):uint() + offset = offset + 1 + + if proofs__option == 0 then + elseif proofs__option == 1 then + local proofs_tree = data_tree:add("proofs (list[tuple[bytes32, bytes, Optional[bytes]]])") + if SHOW_SERIAL_PROTO == true then + proofs_tree:add(pf.respond_additions__proofs__count, tvb:range(offset, 4)) + end + offset = offset + 4 + + local proofs_tuple_tree = proofs_tree:add("(tuple[bytes32, bytes, Optional[bytes]])") + proofs_tuple_tree:add(pf.respond_additions__proofs__proof_tuple__bytes32, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + proofs_tuple_tree:add(pf.respond_additions__proofs__proof_tuple__bytes__length, + tvb:range(offset, 4)) + end + local proof_tuple__bytes__length = tvb:range(offset, 4):uint() + offset = offset + 4 + + proofs_tuple_tree:add(pf.respond_additions__proofs__proof_tuple__bytes, + tvb:range(offset, proof_tuple__bytes__length)) + offset = offset + proof_tuple__bytes__length + + proofs_tuple_tree:add(pf.respond_additions__proofs__proof_tuple__bytes2__option, tvb:range(offset, 1)) + local proof_tuple__bytes2__option = tvb:range(offset, 1):uint() + offset = offset + 1 + + if proof_tuple__bytes2__option == 0 then + elseif proof_tuple__bytes2__option == 1 then + if SHOW_SERIAL_PROTO == true then + proofs_tuple_tree:add(pf.respond_additions__proofs__proof_tuple__bytes2__length, + tvb:range(offset, 4)) + end + local proof_tuple__bytes2__length = tvb:range(offset, 4):uint() + offset = offset + 4 + + proofs_tuple_tree:add(pf.respond_additions__proofs__proof_tuple__bytes2, + tvb:range(offset, proof_tuple__bytes2__length)) + offset = offset + proof_tuple__bytes2__length + else + proofs_tuple_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + -- endo of proofs_tuple_tree + -- end of proofs_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 58 respond_additions + + +-- 59 RejectAdditionsRequest +local function reject_additions_request (tvb, offset, data_tree) + data_tree:add(pf.reject_additions_request__height, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.reject_additions_request__header_hash, tvb:range(offset, 4)) +end -- 59 reject_additions_request + + +-- 60 RequestHeaderBlocks +local function request_header_blocks (tvb, offset, data_tree) + data_tree:add(pf.request_header_blocks__start_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.request_header_blocks__end_height, tvb:range(offset, 4)) +end -- 60 request_header_blocks + + +-- 61 RejectHeaderBlocks +local function reject_header_blocks (tvb, offset, data_tree) + data_tree:add(pf.reject_header_blocks__start_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.reject_header_blocks__end_height, tvb:range(offset, 4)) +end -- 61 reject_header_blocks + + +-- 62 RespondHeaderBlocks +local function respond_header_blocks (tvb, offset, data_tree) + data_tree:add(pf.respond_header_blocks__start_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.respond_header_blocks__end_height, tvb:range(offset, 4)) + offset = offset + 4 + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_header_blocks__header_blocks__count, tvb:range(offset, 4)) + end + local header_blocks_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local header_blocks_tree = data_tree:add("header_blocks (list[HeaderBlock])") + for i=1, header_blocks_count do + local header_block_tree = header_blocks_tree:add("HeaderBlock") + offset = Block(tvb, offset, header_block_tree, "HeaderBlock") + -- end of header_block_tree + end + -- end of header_blocks_tree +end -- 62 respond_header_blocks + + +-- 63 RequestPeersIntroducer / request_peers_introducer + + +-- 64 RespondPeersIntroducer +local function respond_peers_introducer (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_peers_introducer__peer_list__count, tvb:range(offset, 4)) + end + local peer_list_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local peer_list_tree = data_tree:add("peer_list (list[TimestampedPeerInfo])") + for i=1, peer_list_count do + offset = TimestampedPeerInfo(tvb, offset, peer_list_tree) + end + -- end of peer_list_tree +end -- 64 respond_peers_introducer + + +-- 65 FarmNewBlockProtocol +local function farm_new_block (tvb, offset, data_tree) + data_tree:add(pf.farm_new_block__puzzle_hash, tvb:range(offset, 32)) +end -- 65 farm_new_block + + +-- 66 NewSignagePointHarvester +local function new_signage_point_harvester (tvb, offset, data_tree) + data_tree:add(pf.new_signage_point_harvester__challenge_hash, tvb:range(offset, 32)) + offset = offset + 32 + data_tree:add(pf.new_signage_point_harvester__difficulty, tvb:range(offset, 8)) + offset = offset + 8 + data_tree:add(pf.new_signage_point_harvester__sub_slot_iters, tvb:range(offset, 8)) + offset = offset + 8 + data_tree:add(pf.new_signage_point_harvester__signage_point_index, tvb:range(offset, 1)) + offset = offset + 1 + data_tree:add(pf.new_signage_point_harvester__sp_hash, tvb:range(offset, 32)) + offset = offset + 32 + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_signage_point_harvester__pool_difficulties__count, tvb:range(offset, 4)) + end + local pool_difficulties_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local pool_difficulties_tree = data_tree:add("pool_difficulties (list[PoolDifficulty])") + for i=1, pool_difficulties_count do + local pool_difficulty_tree = pool_difficulties_tree:add("PoolDifficulty") + pool_difficulty_tree:add(pf.new_signage_point_harvester__PoolDifficulty__difficulty, tvb:range(offset, 8)) + offset = offset + 8 + pool_difficulty_tree:add(pf.new_signage_point_harvester__PoolDifficulty__sub_slot_iters, tvb:range(offset, 8)) + offset = offset + 8 + pool_difficulty_tree:add(pf.new_signage_point_harvester__PoolDifficulty__pool_contract_puzzle_hash, + tvb:range(offset, 32)) + offset = offset + 32 + -- end of pool_difficulty_tree + end + -- end of pool_difficulties_tree + + data_tree:add(pf.new_signage_point_harvester__filter_prefix_bits, tvb:range(offset, 1)) +end -- 66 new_signage_point_harvester + + +-- 67 RequestPlots / request_plots + + +-- 68 RespondPlots +local function respond_plots (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_plots__plots__count, tvb:range(offset, 4)) + end + local plots_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local plots_tree = data_tree:add("plots") + for i=1, plots_count do + offset = Plot(tvb, offset, plots_tree) + end + -- end of plots_tree + + -- failed_to_open_filenames + local failed_to_open_filenames_tree = data_tree:add("failed_to_open_filenames") + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_plots__failed_to_open_filenames__count, tvb:range(offset, 4)) + end + local failed_to_open_filenames_count = tvb:range(offset, 4):uint() + offset = offset + 4 + for i=1, failed_to_open_filenames_count do + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_plots__failed_to_open_filenames__filename__length, tvb:range(offset, 4)) + end + local filename_length = tvb:range(offset, 4):uint() + offset = offset + 4 + data_tree:add(pf.respond_plots__failed_to_open_filenames__filename, tvb:range(offset, filename_length)) + offset = offset + filename_length + end + -- end of failed_to_open_filenames_tree + -- no_key_filenames + local no_key_filenames_tree = data_tree:add("no_key_filenames") + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_plots__no_key_filenames__count, tvb:range(offset, 4)) + end + local no_key_filenames_count = tvb:range(offset, 4):uint() + offset = offset + 4 + for i=1, no_key_filenames_count do + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_plots__no_key_filenames__filename__length, tvb:range(offset, 4)) + end + local filename_length = tvb:range(offset, 4):uint() + offset = offset + 4 + data_tree:add(pf.respond_plots__no_key_filenames__filename, tvb:range(offset, filename_length)) + offset = offset + filename_length + end + -- end of no_key_filenames_tree +end -- 68 respond_plots + + +-- 69 CoinStateUpdate +local function coin_state_update (tvb, offset, data_tree) + data_tree:add(pf.coin_state_update__height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.coin_state_update__fork_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.coin_state_update__peak_hash, tvb:range(offset, 32)) + offset = offset + 32 + local items_tree = data_tree:add("items") + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.coin_state_update__items__count, tvb:range(offset, 4)) + end + local items_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_states_tree = data_tree:add("coin_states") + for i=1, items_count do + offset = CoinState(tvb, offset, coin_states_tree) + end + -- end of coin_states_tree + -- end of items_tree +end -- 69 coin_state_update + + +-- 70 RegisterForPhUpdates +local function register_for_ph_updates (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.register_for_ph_updates__puzzle_hashes__count, tvb:range(offset, 4)) + end + local puzzle_hashes_list_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local puzzle_hashes_tree = data_tree:add("puzzle_hashes") + for i = 1, puzzle_hashes_list_count do + puzzle_hashes_tree:add(pf.register_for_ph_updates__puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + end + data_tree:add(pf.register_for_ph_updates__min_height, tvb:range(offset, 4)) +end -- 70 register_for_ph_updates + + +-- 71 RespondToPhUpdates +local function respond_to_ph_updates (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_to_ph_updates__puzzle_hashes__count, tvb:range(offset, 4)) + end + local puzzle_hashes_list_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local puzzle_hashes_tree = data_tree:add("puzzle_hashes") + for i = 1, puzzle_hashes_list_count do + puzzle_hashes_tree:add(pf.respond_to_ph_updates__puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + end + + data_tree:add(pf.respond_to_ph_updates__min_height, tvb:range(offset, 4)) + offset = offset + 4 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_to_ph_updates__coin_states__count, tvb:range(offset, 4)) + end + local coin_states_count = tvb:range(offset, 4):uint() + offset = offset + 4 + if coin_states_count == 0 then return end + local coin_states_tree = data_tree:add("coin_states") + for i = 1, coin_states_count do + offset = CoinState(tvb, offset, coin_states_tree) + end + -- end of coin_states_tree +end -- 71 respond_to_ph_updates + + +-- 72 RegisterForCoinUpdates +local function register_for_coin_updates (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.register_for_coin_updates__coin_ids__count, tvb:range(offset, 4)) + end + local coin_ids_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local coin_ids_tree = data_tree:add("coin_ids: list") + for i=1, coin_ids_count do + coin_ids_tree:add(pf.register_for_coin_updates__coin_ids__coin_id, tvb:range(offset, 32)) + offset = offset + 32 + end + + data_tree:add(pf.register_for_coin_updates__min_height, tvb:range(offset, 4)) +end -- 72 register_for_coin_updates + + +-- 73 RespondToCoinUpdates +local function respond_to_coin_updates (tvb, offset, data_tree) + -- coin_ids + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_to_coin_updates__coin_ids__count, tvb:range(offset, 4)) + end + local coin_ids_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_ids_tree = data_tree:add("coin_ids: list") + for i=1, coin_ids_count do + coin_ids_tree:add(pf.respond_to_coin_updates__coin_ids__coin_id, tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of coin_ids_tree + + -- min_height + data_tree:add(pf.respond_to_coin_updates__min_height, tvb:range(offset, 4)) + offset = offset + 4 + + -- coin_states + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_to_coin_updates__coin_states__count, tvb:range(offset, 4)) + end + local coin_states_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_states_tree = data_tree:add("coin_states: list") + for i=1, coin_states_count do + offset = CoinState(tvb, offset, coin_states_tree) + end + -- end of coin_states_tree +end -- 73 respond_to_coin_updates + + +-- 74 RequestChildren +local function request_children (tvb, offset, data_tree) + data_tree:add(pf.request_children__coin_name, tvb:range(offset, 32)) +end -- 74 request_children + + +-- 75 RespondChildren +local function respond_children (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_children__coin_states__count, tvb:range(offset, 4)) + end + local coin_states_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_states_tree = data_tree:add("coin_states: list") + for i=1, coin_states_count do + offset = CoinState(tvb, offset, coin_states_tree) + end + -- end of coin_states_tree +end -- 75 respond_children + + +-- 76 RequestSESInfo +local function request_ses_hashes (tvb, offset, data_tree) + data_tree:add(pf.request_ses_hashes__start_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.request_ses_hashes__end_height, tvb:range(offset, 4)) +end -- 76 request_ses_hashes + + +-- 77 RespondSESInfo +local function respond_ses_hashes (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_ses_hashes__reward_chain_hash__count, tvb:range(offset, 4)) + end + local reward_chain_hash_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local reward_chain_hash_tree = data_tree:add("reward_chain_hash") + for i=1, reward_chain_hash_count do + data_tree:add(pf.respond_ses_hashes__reward_chain_hash, tvb:range(offset, 32)) + offset = offset + 32 + end + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_ses_hashes__heights__count, tvb:range(offset, 4)) + end + local heights_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local heights_tree = data_tree:add("heights") + for i=1, heights_count do + + if SHOW_SERIAL_PROTO == true then + heights_tree:add(pf.respond_ses_hashes__heights__heights_list__count, tvb:range(offset, 4)) + end + local heights_list_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + for i=1, heights_list_count do + local heights_tree_tree = heights_tree:add("height_list") + heights_tree_tree:add(pf.respond_ses_hashes__heights__heights_list__height) + offset = offset + 4 + -- end of heights_tree_tree + end + -- end of heights_tree_tree + end + -- end of heights_tree +end -- 77 respond_ses_hashes + + +-- 78 PlotSyncStart +local function plot_sync_start (tvb, offset, data_tree) + offset = PlotSyncIdentifier(tvb, offset, data_tree) + + data_tree:add(pf.plot_sync_start__initial, tvb:range(offset, 1)) + offset = offset + 1 + + data_tree:add(pf.plot_sync_start__last_sync_id, tvb:range(offset, 8)) + offset = offset + 8 + + data_tree:add(pf.plot_sync_start__plot_file_count, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.plot_sync_start__harvesting_mode, tvb:range(offset, 1)) + local harvesting_mode_enum = chia_enum_HarvestingMode[tvb:range(offset, 1):uint()] + offset = offset + 1 + + data_tree:add(pf.plot_sync_start__harvesting_mode__enum, harvesting_mode_enum):set_generated() +end -- 78 plot_sync_start + + +-- 79 PlotSyncPlotList +local function plot_sync_loaded (tvb, offset, data_tree) + -- identifier + offset = PlotSyncIdentifier(tvb, offset, data_tree) + + -- data + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.plot_sync_loaded__data__count, tvb:range(offset, 4)) + end + local data_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local data_subtree = data_tree:add("data (list[Plot])") + for i=1, data_count do + Plot(tvb, offset, data_subtree) + end + -- end of data_count + + -- final + data_tree:add(pf.plot_sync_loaded__final, tvb:range(offset, 1)) + offset = offset + 1 + + +end -- 79 plot_sync_loaded + + +-- 80 PlotSyncPathtList +local function plot_sync_removed (tvb, offset, data_tree) + offset = PlotSyncPathList(tvb, offset, data_tree) +end -- 80 plot_sync_removed + + +-- 81 PlotSyncPathtList +local function plot_sync_invalid (tvb, offset, data_tree) + offset = PlotSyncPathList(tvb, offset, data_tree) +end -- 81 plot_sync_invalid + + +-- 82 PlotSyncPathtList +local function plot_sync_keys_missing (tvb, offset, data_tree) + offset = PlotSyncPathList(tvb, offset, data_tree) +end -- 82 plot_sync_keys_missing + + +-- 83 PlotSyncPathtList +local function plot_sync_duplicates(tvb, offset, data_tree) + offset = PlotSyncPathList(tvb, offset, data_tree) +end -- 83 plot_sync_duplicates + + +-- 84 PlotSyncDone +local function plot_sync_done (tvb, offset, data_tree) + offset = PlotSyncIdentifier(tvb, offset, data_tree) + + data_tree:add(pf.plot_sync_done__duration, tvb:range(offset, 8)) + offset = offset + 8 +end -- 84 plot_sync_done + + +-- 85 PlotSyncResponse +local function plot_sync_response (tvb, offset, data_tree) + offset = PlotSyncIdentifier(tvb, offset, data_tree) + + data_tree:add(pf.plot_sync_response__message_type, tvb:range(offset, 2)) + offset = offset + 2 + + -- PlotSyncError + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.plot_sync_response__error__option, tvb:range(offset, 1)) + end + local error_option = tvb:range(offset, 1):uint() + if error_option == 0 then + elseif error_option == 1 then + local error_tree = data_tree:add("error") + error_tree:add(pf.plot_sync_response__error__code, tvb:range(offset, 2)) + local error_code_enum = chia_enum_ErrorCodes[tvb:range(offset, 2):int()] + offset = offset + 2 + + error_tree:add(pf.plot_sync_response__error__code__enum, error_code_enum):set_generated() + + if SHOW_SERIAL_PROTO == true then + error_tree:add(pf.plot_sync_response__error__message__length, tvb:range(offset, 4)) + end + local message_length = tvb:range(offset, 2):uint() + offset = offset + 4 + + error_tree:add(pf.plot_sync_response__error__message, tvb:range(offset, message_length)) + offset = offset + message_length + + if SHOW_SERIAL_PROTO == true then + error_tree:add(pf.plot_sync_response__error__expected_identifier__option, tvb:range(offset, 1)) + end + local expected_identifier_option = tvb:range(offset, 1):uint() + offset = offset + 1 + + local expected_identifier_tree = error_tree:add("expected_identifier") + PlotSyncIdentifier(tvb, offset, expected_identifier_tree) + -- end of expected_identifier_tree + -- end of error_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 85 plot_sync_response + + +-- 86 RequestBlockHeaders +local function request_block_headers (tvb, offset, data_tree) + data_tree:add(pf.request_block_headers__start_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.request_block_headers__end_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.request_block_headers__return_filter, tvb:range(offset, -1)) +end -- 86 request_block_headers + + +-- 87 RejectBlockHeaders +local function reject_block_headers (tvb, offset, data_tree) + data_tree:add(pf.reject_block_headers__start_height, tvb:range(offset, 4)) + offset = offset + 4 + data_tree:add(pf.reject_block_headers__end_height, tvb:range(offset, 4)) +end -- 87 reject_block_headers + + +-- 88 RespondBlockHeaders +local function respond_block_headers (tvb, offset, data_tree) + data_tree:add(pf.respond_block_headers__start_height, tvb:range(offset, 4)) + offset = offset + 4 + + data_tree:add(pf.respond_block_headers__end_height, tvb:range(offset, 4)) + offset = offset + 4 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_block_headers__header_blocks__count, tvb:range(offset, 4)) + end + local header_blocks_count = tvb:range(offset, 4):uint() + offset = offset + 4 + + local header_blocks_tree = data_tree:add("header_blocks (list[HeaderBlock])") + for i=1, header_blocks_count do + local header_block_tree = header_blocks_tree:add("HeaderBlock") + offset = Block(tvb, offset, header_block_tree, "HeaderBlock") + -- end of header_block_tree + end + -- end of header_blocks_tree +end -- 88 respond_block_headers + + +-- 89 RequestFeeEstimates +local function request_fee_estimates (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_fee_estimates__time_targets__count, tvb:range(offset, 4)) + end + local time_targets_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local time_targets_tree = data_tree:add("time_targets") + for i=1, time_targets_count do + time_targets_tree:add(pf.request_fee_estimates__time_targets__time_target, tvb:range(offset, 8)) + offset = offset + 8 + end + -- end of time_targets_tree +end -- 89 request_fee_estimates + + +-- 90 RespondFeeEstimates +local function respond_fee_estimates (tvb, offset, data_tree) + local estimates_group_tree = data_tree:add("estimates") + -- error + if SHOW_SERIAL_PROTO == true then + estimates_group_tree:add(pf.respond_fee_estimates__error__option, tvb:range(offset, 1)) + end + local error_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if error_option == 0 then + elseif error_option == 1 then + if SHOW_SERIAL_PROTO == true then + estimates_group_tree:add(pf.respond_fee_estimates__error__length, tvb:range(offset, 4)) + end + local error_length = tvb:range(offset, 4):uint() + offset = offset + 4 + estimates_group_tree:add(pf.respond_fee_estimates__error, tvb:range(offset, error_length)) + offset = offset + error_length + else + estimates_group_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- estimates + if SHOW_SERIAL_PROTO == true then + estimates_group_tree:add(pf.respond_fee_estimates__estimates__count, tvb:range(offset, 4)) + end + local estimates_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local fee_estimate_tree = estimates_group_tree:add("estimates") + for i=1, estimates_count do + -- error + if SHOW_SERIAL_PROTO == true then + fee_estimate_tree:add(pf.respond_fee_estimates__estimates__error__option, tvb:range(offset, 1)) + end + local error_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if error_option == 0 then + elseif error_option == 1 then + if SHOW_SERIAL_PROTO == true then + fee_estimate_tree:add(pf.respond_fee_estimates__estimates__error__length, tvb:range(offset, 4)) + end + local estimates_error_length = tvb:range(offset, 4):uint() + offset = offset + 4 + fee_estimate_tree:add(pf.respond_fee_estimates__estimates__error, + tvb:range(offset, estimates_error_length)) + offset = offset + estimates_error_length + else + fee_estimate_tree:add(pf.dissector__error, + "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- time_target + fee_estimate_tree:add(pf.respond_fee_estimates__estimates__time_target, tvb:range(offset, 8)) + offset = offset + 8 + + -- estimated_fee_rate + local estimated_fee_rate_tree = fee_estimate_tree:add("estimated_fee_rate") + -- mojos_per_clvm_cost + estimated_fee_rate_tree:add( + pf.respond_fee_estimates__estimates__estimated_fee_rate__mojos_per_clvm_cost, + tvb:range(offset, 8)) + offset = offset + 8 + -- end of estimated_fee_rate_tree + end + -- end of fee_estimate_tree + -- end of estimates_tree +end -- 90 respond_fee_estimates + + +-- 91 none_response (deprecated message type) + + +-- 92 NewUnfinishedBlock2 +local function new_unfinished_block2 (tvb, offset, data_tree) + data_tree:add(pf.new_unfinished_block2__unfinished_reward_hash, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.new_unfinished_block2__foliage_hash__option, tvb:range(offset, 1)) + end + local foliage_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + + if foliage_hash_option == 0 then + elseif foliage_hash_option == 1 then + data_tree:add(pf.new_unfinished_block2__foliage_hash, tvb:range(offset, 32)) + offset = offset + 32 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 92 new_unfinished_block2 + + +-- 93 RequestUnfinishedBlock2 +local function request_unfinished_block2 (tvb, offset, data_tree) + data_tree:add(pf.request_unfinished_block2__unfinished_reward_hash, tvb:range(offset, 32)) + offset = offset + 32 + + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_unfinished_block2__foliage_hash__option, tvb:range(offset, 1)) + end + local foliage_hash_option = tvb:range(offset, 1):uint() + offset = offset + 1 + + if foliage_hash_option == 0 then + elseif foliage_hash_option == 1 then + data_tree:add(pf.request_unfinished_block2__foliage_hash, tvb:range(offset, 32)) + offset = offset + 32 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 93 request_unfinished_block2 + + +-- 94 RequestRemovePuzzleSubscriptions +local function request_remove_puzzle_subscriptions (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_remove_puzzle_subscriptions__puzzle_hashes__option, tvb:range(offset, 1)) + end + local puzzle_hashes__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if puzzle_hashes__option == 0 then + elseif puzzle_hashes__option == 1 then + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_remove_puzzle_subscriptions__puzzle_hashes__count, tvb:range(offset, 4)) + end + local puzzle_hashes_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local puzzle_hashes_tree = data_tree:add("puzzle_hashes") + for i=1, puzzle_hashes_count do + puzzle_hashes_tree:add(pf.request_remove_puzzle_subscriptions__puzzle_hashes__puzzle_hash, + tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of puzzle_hashes_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 94 request_remove_puzzle_subscriptions + + +-- 95 RespondRemovePuzzleSubscriptions +local function respond_remove_puzzle_subscriptions (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_remove_puzzle_subscriptions__puzzle_hashes__option, tvb:range(offset, 1)) + end + local puzzle_hashes__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if puzzle_hashes__option == 0 then + elseif puzzle_hashes__option == 1 then + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_remove_puzzle_subscriptions__puzzle_hashes__count, tvb:range(offset, 4)) + end + local puzzle_hashes_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local puzzle_hashes_tree = data_tree:add("puzzle_hashes") + for i=1, puzzle_hashes_count do + puzzle_hashes_tree:add(pf.respond_remove_puzzle_subscriptions__puzzle_hashes__puzzle_hash, + tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of puzzle_hashes_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 95 respond_remove_puzzle_subscriptions + + +-- 96 RequestRemoveCoinSubscriptions +local function request_remove_coin_subscriptions (tvb, offset, data_tree) + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_remove_coin_subscriptions__puzzle_hashes__option, tvb:range(offset, 1)) + end + local puzzle_hashes__option = tvb:range(offset, 1):uint() + offset = offset + 1 + if puzzle_hashes__option == 0 then + elseif puzzle_hashes__option == 1 then + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_remove_coin_subscriptions__puzzle_hashes__count, tvb:range(offset, 4)) + end + local puzzle_hashes_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local puzzle_hashes_tree = data_tree:add("puzzle_hashes") + for i=1, puzzle_hashes_count do + puzzle_hashes_tree:add(pf.request_remove_coin_subscriptions__puzzle_hashes__puzzle_hash, + tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of puzzle_hashes_tree + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 96 request_remove_coin_subscriptions + + +-- 97 RespondRemoveCoinSubscriptions +local function respond_remove_coin_subscriptions (tvb, offset, data_tree) + -- coin_ids + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_remove_coin_subscriptions__coin_ids__count, tvb:range(offset, 4)) + end + local coin_ids_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_ids_tree = data_tree:add("coin_ids") + for i=1, coin_ids_count do + coin_ids_tree:add(pf.respond_remove_coin_subscriptions__coin_ids__coin_id, tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of coin_ids_tree +end -- 97 respond_remove_coin_subscriptions + + +-- 98 RequestPuzzleState +local function request_puzzle_state (tvb, offset, data_tree) + -- puzzle_hashes + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_puzzle_state__puzzle_hashes__count, tvb:range(offset, 4)) + end + local puzzle_hashes_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local puzzle_hashes_tree = data_tree:add("puzzle_hashes") + for i=1, puzzle_hashes_count do + puzzle_hashes_tree:add(pf.request_puzzle_state__puzzle_hashes__puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of puzzle_hashes_tree + + -- previous_height + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_puzzle_state__previous_height__option, tvb:range(offset, 1)) + end + local previous_height_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if puzzle_hashes__option == 0 then + elseif puzzle_hashes__option == 1 then + data_tree:add(pf.request_puzzle_state__previous_height, tvb:range(offset, 4)) + offset = offset + 4 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- header_hash + data_tree:add(pf.request_puzzle_state__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + + -- filters + local filters_tree = data_tree:add("filters") + filters_tree:add(pf.request_puzzle_state__filters__include_spent, tvb:range(offset, 1)) + offset = offset + 1 + filters_tree:add(pf.request_puzzle_state__filters__include_unspent, tvb:range(offset, 1)) + offset = offset + 1 + filters_tree:add(pf.request_puzzle_state__filters__include_hinted, tvb:range(offset, 1)) + offset = offset + 1 + filters_tree:add(pf.request_puzzle_state__filters__min_amount, tvb:range(offset, 8)) + offset = offset + 8 + -- end of filters_tree + + -- subscribe_when_finished + filters_tree:add(pf.request_puzzle_state__subscribe_when_finished, tvb:range(offset, 1)) + offset = offset + 1 +end -- 98 request_puzzle_state + + +-- 99 RespondPuzzleState +local function respond_puzzle_state (tvb, offset, data_tree) + -- puzzle_hashes + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_puzzle_state__puzzle_hashes__count, tvb:range(offset, 4)) + end + local puzzle_hashes_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local puzzle_hashes_tree = data_tree:add("puzzle_hashes") + for i=1, puzzle_hashes_count do + puzzle_hashes_tree:add(pf.respond_puzzle_state__puzzle_hashes__puzzle_hash, tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of puzzle_hashes_tree + + -- height + data_tree:add(pf.respond_puzzle_state__height, tvb:range(offset, 4)) + offset = offset + 4 + + -- header_hash + data_tree:add(pf.respond_puzzle_state__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + + -- is_finished + data_tree:add(pf.respond_puzzle_state__is_finished, tvb:range(offset, 1)) + offset = offset + 1 + + -- coin_states + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_puzzle_state__coin_states__count, tvb:range(offset, 4)) + end + local coin_states_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_states_tree = data_tree:add("coin_states") + for i=1, coin_states_count do + offset = CoinState(tvb, offset, coin_states_tree) + end + -- end of coin_states_tree +end -- 99 respond_puzzle_state + + +-- 100 RejectPuzzleState +local function reject_puzzle_state (tvb, offset, data_tree) + data_tree:add(pf.reject_puzzle_state__reason, tvb:range(offset, 1)) + local reason_enum = chia_enum_RejectStateReason[tvb:range(offset, 1):uint()] + data_tree:add(pf.reject_puzzle_state__reason__enum, reason_enum):set_generated() +end -- 100 reject_puzzle_state + + +-- 101 RequestCoinState +local function request_coin_state (tvb, offset, data_tree) + -- coin_ids + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_coin_state__coin_ids__count, tvb:range(offset, 4)) + end + local coin_ids_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_ids_tree = data_tree:add("coin_ids") + for i=1, coin_ids_count do + puzzle_hashes_tree:add(pf.request_coin_state__coin_ids__coin_id, tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of coin_ids_tree + + -- previous_height + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.request_coin_state__previous_height__option, tvb:range(offset, 1)) + end + local previous_height_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if puzzle_hashes__option == 0 then + elseif puzzle_hashes__option == 1 then + data_tree:add(pf.request_coin_state__previous_height, tvb:range(offset, 4)) + offset = offset + 4 + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -- header_hash + data_tree:add(pf.request_coin_state__header_hash, tvb:range(offset, 32)) + offset = offset + 32 + + -- subscribe + data_tree:add(pf.request_coin_state__subscribe, tvb:range(offset, 1)) + offset = offset + 1 +end -- 101 request_coin_state + + +-- 102 RespondCoinState +local function respond_coin_state (tvb, offset, data_tree) + -- coin_ids + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_coin_state__coin_ids__count, tvb:range(offset, 4)) + end + local coin_ids_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_ids_tree = data_tree:add("coin_ids") + for i=1, coin_ids_count do + puzzle_hashes_tree:add(pf.respond_coin_state__coin_ids__coin_id, tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of coin_ids_tree + + -- coin_states + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.respond_coin_state__coin_states__count, tvb:range(offset, 4)) + end + local coin_states_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local coin_states_tree = data_tree:add("coin_states") + for i=1, coin_states_count do + offset = CoinState(tvb, offset, coin_states_tree) + end + -- end of coin_states_tree +end -- 102 respond_coin_state + + +-- 103 RejectCoinState +local function reject_coin_state (tvb, offset, data_tree) + filters_tree:add(pf.reject_coin_state__reason, tvb:range(offset, 1)) + local reason_enum = chia_enum_RejectStateReason[tvb:range(offset, 1):uint()] + data_tree:add(pf.reject_coin_state__reason__enum, reason_enum):set_generated() +end -- 103 reject_coin_state + + +-- 104 MempoolItemsAdded +local function mempool_items_added (tvb, offset, data_tree) + -- transaction_ids + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.mempool_items_added__transaction_ids__count, tvb:range(offset, 4)) + end + local transaction_ids_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local transaction_ids_tree = data_tree:add("transaction_ids") + for i=1, transaction_ids_count do + transaction_ids_tree:add(pf.mempool_items_added__transaction_ids__transaction_id, tvb:range(offset, 32)) + offset = offset + 32 + end + -- end of transaction_ids_tree +end -- 104 mempool_items_added + + +-- 105 MempoolItemsRemoved +local function mempool_items_removed (tvb, offset, data_tree) + -- removed_items + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.mempool_items_removed__removed_items__count, tvb:range(offset, 4)) + end + local removed_items_count = tvb:range(offset, 4):uint() + offset = offset + 4 + local removed_items_tree = data_tree:add("removed_items") + for i=1, removed_items_count do + removed_items_tree:add(pf.mempool_items_removed__removed_items__transaction_id, tvb:range(offset, 32)) + offset = offset + 32 + removed_items_tree:add(pf.mempool_items_removed__removed_items__reason, tvb:range(offset, 1)) + local reason_enum = chia_enum_MempoolRemoveReason[tvb:range(offset, 1):uint()] + offset = offset + 1 + + removed_items_tree:add(pf.mempool_items_removed__removed_items__reason__enum, reason_enum):set_generated() + end + -- end of removed_items_tree +end -- 105 mempool_items_removed + + +-- 106 RequestCostInfo / request_cost_info + + +-- 107 RespondCostInfo +local function respond_cost_info (tvb, offset, data_tree) + data_tree:add(pf.respond_cost_info__max_transaction_cost, tvb:range(offset, 8)) + offset = offset + 4 + data_tree:add(pf.respond_cost_info__max_block_cost, tvb:range(offset, 8)) + offset = offset + 4 + data_tree:add(pf.respond_cost_info__max_mempool_cost, tvb:range(offset, 8)) + offset = offset + 4 + data_tree:add(pf.respond_cost_info__mempool_cost, tvb:range(offset, 8)) + offset = offset + 4 + data_tree:add(pf.respond_cost_info__mempool_fee, tvb:range(offset, 8)) + offset = offset + 4 + data_tree:add(pf.respond_cost_info__bump_fee_per_cost, tvb:range(offset, 1)) + offset = offset + 1 +end -- 107 respond_cost_info + +-- 255 Error +local function error (tvb, offset, data_range, data_tree) + -- error + data_tree:add(pf.error__code, tvb:range(offset, 2)) + offset = offset + 2 + + -- message + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.error__message__length, tvb:range(offset, 4)) + end + local message_length = tvb:range(offset, 4):uint() + offset = offset + 4 + data_tree:add(pf.error__message, tvb:range(offset, message_length)) + offset = offset + message_length + + -- data + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.error__data__option, tvb:range(offset, 1)) + end + local data_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if data_option == 0 then + elseif data_option == 1 then + if SHOW_SERIAL_PROTO == true then + data_tree:add(pf.error__data__length, tvb:range(offset, 4)) + end + local data_length = tvb:range(offset, 4):uint() + offset = offset + 4 + data_tree:add(pf.error__data, tvb:range(offset, data_length)) + offset = offset + data_length + else + data_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end +end -- 255 error + + +---------------------------------------------------------------------------------- +-- Dissector +---------------------------------------------------------------------------------- + +function p_chia.dissector (tvb, pktinfo, root) + + if tvb:len() == 0 then return end + pktinfo.cols.protocol = p_chia.name + + local msg_tree = root:add(p_chia, tvb:range(0, tvb:reported_length_remaining())) + local offset = 0 + + + -------------------------------------------------------------------------------- + -- Deserialize the Message header + -------------------------------------------------------------------------------- + + local msg_type = tvb:range(offset, 1):uint() + offset = offset + 1 + + local msg_type_enum = chia_enum_ProtocolMessageTypes[msg_type] + + -- handle unknown message types + if msg_type_enum == nil then + msg_tree:add(pf.dissector__unknown_message_type, tvb:range(offset, -1)) + pktinfo.cols.info = "unknown_chia_message_type: "..msg_type + return + elseif msg_type_enum == "none_response" then + msg_tree:add(pf.dissector__deprecated_message_type, tvb:range(offset, -1)) + pktinfo.cols.info = "deprecated_chia_message_type: none_response (91)" + return end + + -- type.enum + msg_tree:add(pf.msg__type__enum, msg_type_enum):set_generated() + -- show type.enum in wireshark's info column + pktinfo.cols.info = msg_type_enum + + -- type + msg_tree:add(pf.msg__type, msg_type) + -- append type to wireshark's info column + pktinfo.cols.info:append(" (" .. msg_type .. ") ") + + -- id + if SHOW_SERIAL_PROTO == true then + msg_tree:add(pf.msg__id__option, tvb:range(offset, 1)) + end + local id_option = tvb:range(offset, 1):uint() + offset = offset + 1 + if id_option == 0 then + elseif id_option == 1 then + msg_tree:add(pf.msg__id, tvb:range(offset, 2)) + offset = offset + 2 + else + msg_tree:add(pf.dissector__error, "Deserialization Error: value of type bool (0/1) expected!") + return end + + -------------------------------------------------------------------------------- + -- Deserialize the message data payload + -------------------------------------------------------------------------------- + + if SHOW_SERIAL_PROTO == true then + msg_tree:add(pf.msg__data__length, tvb:range(offset, 4)) + end + local data_length = tvb:range(offset, 4):uint() + offset = offset + 4 + + if data_length > 0 then + local data_tree = msg_tree:add(pf.msg__data, tvb:range(offset, -1)) + + if msg_type == 1 then + handshake(tvb, offset, data_tree) + elseif msg_type == 3 then + harvester_handshake(tvb, offset, data_tree) + elseif msg_type == 5 then + new_proof_of_space(tvb, offset, data_tree) + elseif msg_type == 6 then + request_signatures(tvb, offset, data_tree) + elseif msg_type == 7 then + respond_signatures(tvb, offset, data_tree) + elseif msg_type == 8 then + new_signage_point(tvb, offset, data_tree) + elseif msg_type == 9 then + declare_proof_of_space(tvb, offset, data_tree) + elseif msg_type == 10 then + request_signed_values(tvb, offset, data_tree) + elseif msg_type == 11 then + signed_values(tvb, offset, data_tree) + elseif msg_type == 12 then + farming_info(tvb, offset, data_tree) + elseif msg_type == 13 then + new_peak_timelord(tvb, offset, data_tree) + elseif msg_type == 14 then + new_unfinished_block_timelord(tvb, offset, data_tree) + elseif msg_type == 15 then + new_infusion_point_vdf(tvb, offset, data_tree) + elseif msg_type == 16 then + new_signage_point_vdf(tvb, offset, data_tree) + elseif msg_type == 17 then + new_end_of_sub_slot_vdf(tvb, offset, data_tree) + elseif msg_type == 18 then + request_compact_proof_of_time(tvb, offset, data_tree) + elseif msg_type == 19 then + respond_compact_proof_of_time(tvb, offset, data_tree) + elseif msg_type == 20 then + new_peak(tvb, offset, data_tree) + elseif msg_type == 21 then + new_transaction(tvb, offset, data_tree) + elseif msg_type == 22 then + request_transaction(tvb, offset, data_tree) + elseif msg_type == 23 then + respond_transaction(tvb, offset, data_tree) + elseif msg_type == 24 then + request_proof_of_weight(tvb, offset, data_tree) + elseif msg_type == 25 then + respond_proof_of_weight (tvb, offset, data_tree) + elseif msg_type == 26 then + request_block(tvb, offset, data_tree) + elseif msg_type == 27 then + respond_block(tvb, offset, data_tree) + elseif msg_type == 28 then + reject_block(tvb, offset, data_tree) + elseif msg_type == 29 then + request_blocks(tvb, offset, data_tree) + elseif msg_type == 30 then + respond_blocks(tvb, offset, data_tree) + elseif msg_type == 31 then + reject_blocks(tvb, offset, data_tree) + elseif msg_type == 32 then + new_unfinished_block(tvb, offset, data_tree) + elseif msg_type == 33 then + request_unfinished_block(tvb, offset, data_tree) + elseif msg_type == 34 then + respond_unfinished_block(tvb, offset, data_tree) + elseif msg_type == 35 then + new_signage_point_or_end_of_sub_slot(tvb, offset, data_tree) + elseif msg_type == 36 then + request_signage_point_or_end_of_sub_slot(tvb, offset, data_tree) + elseif msg_type == 37 then + respond_signage_point(tvb, offset, data_tree) + elseif msg_type == 38 then + respond_end_of_sub_slot(tvb, offset, data_tree) + elseif msg_type == 39 then + request_mempool_transactions(tvb, offset, data_tree) + elseif msg_type == 40 then + request_compact_vdf(tvb, offset, data_tree) + elseif msg_type == 41 then + respond_compact_vdf(tvb, offset, data_tree) + elseif msg_type == 42 then + new_compact_vdf(tvb, offset, data_tree) + elseif msg_type == 43 then -- 43 request_peers is without data payload + elseif msg_type == 44 then + respond_peers(tvb, offset, data_tree) + elseif msg_type == 45 then + request_puzzle_solution(tvb, offset, data_tree) + elseif msg_type == 46 then + respond_puzzle_solution(tvb, offset, data_tree) + elseif msg_type == 47 then + reject_puzzle_solution(tvb, offset, data_tree) + elseif msg_type == 48 then + send_transaction(tvb, offset, data_tree) + elseif msg_type == 49 then + transaction_ack(tvb, offset, data_tree) + elseif msg_type == 50 then + new_peak_wallet(tvb, offset, data_tree) + elseif msg_type == 51 then + request_block_header(tvb, offset, data_tree) + elseif msg_type == 52 then + respond_block_header(tvb, offset, data_tree) + elseif msg_type == 53 then + reject_header_request(tvb, offset, data_tree) + elseif msg_type == 54 then + request_removals(tvb, offset, data_tree) + elseif msg_type == 55 then + respond_removals(tvb, offset, data_tree) + elseif msg_type == 56 then + reject_removals_request(tvb, offset, data_tree) + elseif msg_type == 57 then + request_additions(tvb, offset, data_tree) + elseif msg_type == 58 then + respond_additions(tvb, offset, data_tree) + elseif msg_type == 59 then + reject_additions_request(tvb, offset, data_tree) + elseif msg_type == 60 then + request_header_blocks(tvb, offset, data_tree) + elseif msg_type == 61 then + reject_header_blocks(tvb, offset, data_tree) + elseif msg_type == 62 then + respond_header_blocks(tvb, offset, data_tree) + elseif msg_type == 63 then -- 63 request_peers_introducer is without data payload + elseif msg_type == 64 then + respond_peers_introducer(tvb, offset, data_tree) + elseif msg_type == 65 then + farm_new_block(tvb, offset, data_tree) + elseif msg_type == 66 then + new_signage_point_harvester(tvb, offset, data_tree) + elseif msg_type == 67 then -- 67 request_peers_introducer is without data payload + elseif msg_type == 68 then + respond_plots(tvb, offset, data_tree) + elseif msg_type == 69 then + coin_state_update(tvb, offset, data_tree) + elseif msg_type == 70 then + register_for_ph_updates(tvb, offset, data_tree) + elseif msg_type == 71 then + respond_to_ph_updates(tvb, offset, data_tree) + elseif msg_type == 72 then + register_for_coin_updates(tvb, offset, data_tree) + elseif msg_type == 73 then + respond_to_coin_updates(tvb, offset, data_tree) + elseif msg_type == 74 then + request_children(tvb, offset, data_tree) + elseif msg_type == 75 then + respond_children(tvb, offset, data_tree) + elseif msg_type == 76 then + request_ses_hashes(tvb, offset, data_tree) + elseif msg_type == 77 then + respond_ses_hashes(tvb, offset, data_tree) + elseif msg_type == 78 then + plot_sync_start(tvb, offset, data_tree) + elseif msg_type == 79 then + plot_sync_loaded(tvb, offset, data_tree) + elseif msg_type == 80 then + plot_sync_removed(tvb, offset, data_tree) + elseif msg_type == 81 then + plot_sync_invalid(tvb, offset, data_tree) + elseif msg_type == 82 then + plot_sync_keys_missing(tvb, offset, data_tree) + elseif msg_type == 83 then + plot_sync_duplicates(tvb, offset, data_tree) + elseif msg_type == 84 then + plot_sync_done(tvb, offset, data_tree) + elseif msg_type == 85 then + plot_sync_response(tvb, offset, data_tree) + elseif msg_type == 86 then + request_block_headers(tvb, offset, data_tree) + elseif msg_type == 87 then + reject_block_headers(tvb, offset, data_tree) + elseif msg_type == 88 then + respond_block_headers(tvb, offset, data_tree) + elseif msg_type == 89 then + request_fee_estimates(tvb, offset, data_tree) + elseif msg_type == 90 then + respond_fee_estimates(tvb, offset, data_tree) + elseif msg_type == 92 then + new_unfinished_block2(tvb, offset, data_tree) + elseif msg_type == 93 then + request_unfinished_block2(tvb, offset, data_tree) + elseif msg_type == 94 then + request_remove_puzzle_subscriptions(tvb, offset, data_tree) + elseif msg_type == 95 then + respond_remove_puzzle_subscriptions(tvb, offset, data_tree) + elseif msg_type == 96 then + request_remove_coin_subscriptions(tvb, offset, data_tree) + elseif msg_type == 97 then + respond_remove_coin_subscriptions(tvb, offset, data_tree) + elseif msg_type == 98 then + request_puzzle_state(tvb, offset, data_tree) + elseif msg_type == 99 then + respond_puzzle_state(tvb, offset, data_tree) + elseif msg_type == 100 then + reject_puzzle_state(tvb, offset, data_tree) + elseif msg_type == 101 then + request_coin_state(tvb, offset, data_tree) + elseif msg_type == 102 then + respond_coin_state(tvb, offset, data_tree) + elseif msg_type == 103 then + reject_coin_state(tvb, offset, data_tree) + elseif msg_type == 104 then + mempool_items_added(tvb, offset, data_tree) + elseif msg_type == 105 then + mempool_items_removed(tvb, offset, data_tree) + elseif msg_type == 106 then -- 106 request_peers_introducer is without data payload + elseif msg_type == 107 then + respond_cost_info(tvb, offset, data_tree) + elseif msg_type == 255 then + error(tvb, offset, data_tree) + else + msg_tree:add(pf.dissector__error, "!Unknown message type snug in: " .. msg_type) + return end + end + return tvb:len() +end + +-------------------------------------------------------------------------------- +-- Dissector Initilization +-------------------------------------------------------------------------------- + +function p_chia.init () + local ws_dissector_table = DissectorTable.get("ws.port") + local dissector = ws_dissector_table:get_dissector(CHIA_PORTS[1]) + for i=1, #CHIA_PORTS do + ws_dissector_table:add(CHIA_PORTS[i], p_chia) + end +end diff --git a/dissectors/chromium-ipc/LICENSE b/dissectors/chromium-ipc/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/chromium-ipc/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/chromium-ipc/README.md b/dissectors/chromium-ipc/README.md new file mode 100644 index 0000000..fe95c61 --- /dev/null +++ b/dissectors/chromium-ipc/README.md @@ -0,0 +1,65 @@ +# Chromium IPC Sniffer — dissecteurs IPC de Chrome / Chromium + +Dissecteurs Wireshark Lua de l'outil **Chromium IPC Sniffer**, qui capture +sous Windows les échanges inter-processus de Chrome / Chromium passant par +des canaux nommés (*named pipes*) et les envoie à Wireshark : + +- `npfs` : en-tête de capture de l'outil (processus source / destination, + canal nommé…), transporté sous l'ethertype `0x0807` ; +- `mojo` (Mojo Core : ports, nœuds, invitations, poignées…) ; +- `ipcz` (successeur de Mojo Core : portails, routeurs, colis…) ; +- `mojouser` (appels de méthodes `.mojom` avec nom d'interface et de + méthode, à partir des tables `helpers/`) ; +- `legacyipc` (ancien IPC de Chromium) ; +- `mojodata` (contrôle des *data pipes*) et `audiosync` + (`\pipe\chrome.sync.*`). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/tomer8007/chromium-ipc-sniffer (dossier `Chrome IPC Sniffer/Dissectors/`) | +| Commit importé | `f72c80b4eec42c0fb8956f1a941420c6f8835038` du 10/12/2025 (branche `master`, dernier commit ; dernière modification du dossier `Dissectors/` : `9325dcd` du 10/12/2025) | +| Licence amont | GPL-3.0-only (fichier `LICENSE` GPL v3, copié ici ; pas de mention « or later ») ; `helpers/json.lua` : MIT (bibliothèque rxi/json.lua, © 2020 rxi, licence en tête du fichier) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Mojo / IPCZ / IPC Chromium natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `npfs.lua` | Protocole `npfs` (« NamedPipe Capture Protocol »), ethertype `0x0807`, aiguillage vers les autres | +| `mojo_core.lua`, `ipcz.lua`, `mojo_user.lua`, `legacy_ipc.lua`, `mojo_data_pipe.lua`, `audio_sync.lua` | Protocoles `mojo`, `ipcz`, `mojouser`, `legacyipc`, `mojodata`, `audiosync` | +| `helpers/common.lua` | Fonctions communes (types de processus Chrome, lecture de fichiers, chemin du script) | +| `helpers/json.lua` | Analyseur JSON rxi/json.lua (MIT) | +| `helpers/mojo_interfaces_map.lua` | Table générée identifiant de méthode → nom `.mojom` (pour un `chrome.dll` donné) | +| `helpers/mojo_interfaces.json` (3,4 Mo), `helpers/legacy_ipc_interfaces.json` | Descriptions générées des interfaces, lues au chargement | + +Fichiers `.lua` importés tels quels ; seule une en-tête SPDX + provenance +de quatre lignes a été ajoutée en tête. Les fichiers JSON sont copiés sans +modification. Le programme de capture (C#, `chromeipc.exe`) n'est pas +importé. + +## Utilisation + +Ces dissecteurs n'ont de sens qu'avec le programme de capture amont +(`chromeipc.exe`, Windows), qui les copie lui-même dans le dossier +`plugins` de Wireshark, régénère les tables `helpers/` pour la version de +Chrome installée et alimente Wireshark par le canal `\\.\pipe\chromeipc`. +Pour une installation manuelle, copier tout le dossier (avec `helpers/`) +dans le dossier `plugins`, puis filtrer avec `npfs`, `mojo`, `ipcz` ou +`mojouser`. + +## Remarques + +- Prévu pour Windows : les `require("helpers\\common")` et les chemins + `helpers\\*.json` utilisent des barres obliques inverses ; + `helpers/common.lua` charge le module `json` par `require('json')`, ce + qui suppose le dossier `helpers` dans `package.path`. +- Les tables `helpers/` correspondent à la version de Chrome de l'auteur + (`chrome.dll` `b853b6f…`) : pour une autre version, les noms de méthodes + peuvent être faux tant que l'outil ne les a pas régénérées. +- `legacy_ipc.lua` utilise `bit32.band` / `bit32.arshift` ; Wireshark 4.4 + et plus ne fournit plus `bit32` mais `bit` : ajouter `bit32 = bit` en + tête du script si besoin. +- Les protocoles sont déclarés dans des variables globales, comme dans + l'amont. Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/chromium-ipc/audio_sync.lua b/dissectors/chromium-ipc/audio_sync.lua new file mode 100644 index 0000000..1beca51 --- /dev/null +++ b/dissectors/chromium-ipc/audio_sync.lua @@ -0,0 +1,68 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/audio_sync.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +sync_protocol = Proto("AudioSync", "Audio Sync Protocol") + +local get_chrome_name = require("helpers\\common").get_chrome_type_name + +-- Header fields + +-- https://source.chromium.org/chromium/chromium/src/+/master:services/audio/sync_reader.cc;l=163 +local control_signal = ProtoField.uint32 ("audiosync.control_signal" , "Control Signal" , base.HEX) + +-- https://source.chromium.org/chromium/chromium/src/+/master:services/audio/sync_reader.cc;l=257 +local buffer_index = ProtoField.uint32 ("audiosync.buffer_index" , "Renderer Buffer Index" , base.DEC) + +-- From other layers +local source_pid_type = ProtoField.int32 ("npfs.sourcetype" , "Source Process Type" , base.DEC) +local dest_pid_type = ProtoField.int32 ("npfs.desttype" , "Destination Process Type" , base.DEC) + + +sync_protocol.fields = { + source_pid_type, dest_pid_type, -- (From NPFS) + control_signal, buffer_index, -- Header +} + +local _controlcode = Field.new("audiosync.control_signal") +local _bufferindex = Field.new("audiosync.buffer_index") + + +-- Fields from other layers +local _sourcetype = Field.new("npfs.sourcetype") +local _desttype = Field.new("npfs.desttype") + + +function sync_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = sync_protocol.name + + local subtree = tree:add(sync_protocol, buffer(), "Audio Synchronization Protocol") + + pinfo.cols.info = tostring(pinfo.cols.info) .. " Audio Sync" + + -- Header + local offset = 0 + + if get_chrome_name(_sourcetype()()) == "Renderer" then + subtree:add_le(buffer_index, buffer(offset,4)); offset = offset + 4 + + pinfo.cols.info = tostring(pinfo.cols.info) .. ": Buffer #" .. _bufferindex()() + else + subtree:add_le(control_signal, buffer(offset,4)):append_text(" (" .. get_opcode_name(_controlcode()()) .. ")"); offset = offset + 4 + + pinfo.cols.info = tostring(pinfo.cols.info) .. " (" .. get_opcode_name(_controlcode()()) .. ")" + end + +end + +function get_opcode_name(opcode) + local opcode_name = "Unknown" + + if opcode == 0 then opcode_name = "Request More Data" end + if opcode == 0xffffffff then opcode_name = "Stop" end + + return opcode_name +end \ No newline at end of file diff --git a/dissectors/chromium-ipc/helpers/common.lua b/dissectors/chromium-ipc/helpers/common.lua new file mode 100644 index 0000000..8f54bc2 --- /dev/null +++ b/dissectors/chromium-ipc/helpers/common.lua @@ -0,0 +1,99 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/helpers/common.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +local common = {} +-- local d = require('debug') + +local json = require('json') + +function common.get_chrome_type_name(opcode) + local opcode_name = "Unknown" + + if opcode == 0 then opcode_name = "Unknown" end + if opcode == 1 then opcode_name = "Broker" end + if opcode == 2 then opcode_name = "Renderer" end + if opcode == 3 then opcode_name = "Extension" end + if opcode == 4 then opcode_name = "Notification" end + if opcode == 5 then opcode_name = "Plugin" end + if opcode == 6 then opcode_name = "Worker" end + if opcode == 7 then opcode_name = "NCAL" end + if opcode == 8 then opcode_name = "GPU Process" end + if opcode == 9 then opcode_name = "Watcher" end + if opcode == 10 then opcode_name = "Service Worker" end + if opcode == 11 then opcode_name = "Network Service" end + if opcode == 12 then opcode_name = "Audio Service" end + if opcode == 13 then opcode_name = "CDM Service" end + if opcode == 14 then opcode_name = "Crashpad Handler" end + if opcode == 15 then opcode_name = "Ppapi Broker" end + if opcode == 16 then opcode_name = "Utility" end + + return opcode_name +end + +function common.readAll(file) + local f = assert(io.open(file, "rb")) + local content = f:read("*all") + f:close() + return content +end + +function common.script_path() + local str = debug.getinfo(2, "S").source:sub(2) + return str:match("(.*[/\\])") +end + +function common.json_to_table(json_str) + -- L="return ".. json:gsub('("[^"]-"):','[%1]=') + -- return loadstring(L)() + return json.decode(json_str) +end + +function common.split (inputstr, sep) + if sep == nil then + sep = "%s" + end + + local t={} + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + table.insert(t, str) + end + return t +end + +function common.trim(s) + return s:gsub("^%s+", ""):gsub("%s+$", "") +end + +function common.startswith(str,start) + return str:sub(1, #start) == start +end + +function common.endswith(str,ending) + return ending == "" or str:sub(-#ending) == ending +end + +function common.last_indexof(str, pattern) + return str:match(".*()" .. pattern) +end + +function common.find_last(haystack, needle) + local i=haystack:match(".*"..needle.."()") + if i==nil then return nil else return i-1 end +end + +function common.merge_tables(first_table, second_table) + for k,v in pairs(second_table) do first_table[k] = v end + return first_table +end + +function common.numLong(s) + ret = 0 + for i=1,string.len(s),1 do + ret = (ret * 256) + string.byte(s,i) + end + return ret +end + + +return common \ No newline at end of file diff --git a/dissectors/chromium-ipc/helpers/json.lua b/dissectors/chromium-ipc/helpers/json.lua new file mode 100644 index 0000000..dc71bb0 --- /dev/null +++ b/dissectors/chromium-ipc/helpers/json.lua @@ -0,0 +1,392 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/helpers/json.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : MIT (rxi/json.lua, © 2020 rxi, licence en tête du fichier) — voir README.md. +-- +-- json.lua +-- +-- Copyright (c) 2020 rxi +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy of +-- this software and associated documentation files (the "Software"), to deal in +-- the Software without restriction, including without limitation the rights to +-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-- SOFTWARE. +-- + +local json = { _version = "0.1.2" } + +------------------------------------------------------------------------------- +-- Encode +------------------------------------------------------------------------------- + +local encode + +local escape_char_map = { + [ "\\" ] = "\\", + [ "\"" ] = "\"", + [ "\b" ] = "b", + [ "\f" ] = "f", + [ "\n" ] = "n", + [ "\r" ] = "r", + [ "\t" ] = "t", +} + +local escape_char_map_inv = { [ "/" ] = "/" } +for k, v in pairs(escape_char_map) do + escape_char_map_inv[v] = k +end + + +local function escape_char(c) + return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte())) +end + + +local function encode_nil(val) + return "null" +end + + +local function encode_table(val, stack) + local res = {} + stack = stack or {} + + -- Circular reference? + if stack[val] then error("circular reference") end + + stack[val] = true + + if rawget(val, 1) ~= nil or next(val) == nil then + -- Treat as array -- check keys are valid and it is not sparse + local n = 0 + for k in pairs(val) do + if type(k) ~= "number" then + error("invalid table: mixed or invalid key types") + end + n = n + 1 + end + if n ~= #val then + error("invalid table: sparse array") + end + -- Encode + for i, v in ipairs(val) do + table.insert(res, encode(v, stack)) + end + stack[val] = nil + return "[" .. table.concat(res, ",") .. "]" + + else + -- Treat as an object + for k, v in pairs(val) do + if type(k) ~= "string" then + error("invalid table: mixed or invalid key types") + end + table.insert(res, encode(k, stack) .. ":" .. encode(v, stack)) + end + stack[val] = nil + return "{" .. table.concat(res, ",") .. "}" + end +end + + +local function encode_string(val) + return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' +end + + +local function encode_number(val) + -- Check for NaN, -inf and inf + if val ~= val or val <= -math.huge or val >= math.huge then + error("unexpected number value '" .. tostring(val) .. "'") + end + return string.format("%.14g", val) +end + + +local type_func_map = { + [ "nil" ] = encode_nil, + [ "table" ] = encode_table, + [ "string" ] = encode_string, + [ "number" ] = encode_number, + [ "boolean" ] = tostring, +} + + +encode = function(val, stack) + local t = type(val) + local f = type_func_map[t] + if f then + return f(val, stack) + end + error("unexpected type '" .. t .. "'") +end + + +function json.encode(val) + return ( encode(val) ) +end + + +------------------------------------------------------------------------------- +-- Decode +------------------------------------------------------------------------------- + +local parse + +local function create_set(...) + local res = {} + for i = 1, select("#", ...) do + res[ select(i, ...) ] = true + end + return res +end + +local space_chars = create_set(" ", "\t", "\r", "\n") +local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",") +local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u") +local literals = create_set("true", "false", "null") + +local literal_map = { + [ "true" ] = true, + [ "false" ] = false, + [ "null" ] = nil, +} + + +local function next_char(str, idx, set, negate) + for i = idx, #str do + if set[str:sub(i, i)] ~= negate then + return i + end + end + return #str + 1 +end + + +local function decode_error(str, idx, msg) + local line_count = 1 + local col_count = 1 + for i = 1, idx - 1 do + col_count = col_count + 1 + if str:sub(i, i) == "\n" then + line_count = line_count + 1 + col_count = 1 + end + end + error( string.format("%s at line %d col %d", msg, line_count, col_count) ) +end + + +local function codepoint_to_utf8(n) + -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa + local f = math.floor + if n <= 0x7f then + return string.char(n) + elseif n <= 0x7ff then + return string.char(f(n / 64) + 192, n % 64 + 128) + elseif n <= 0xffff then + return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128) + elseif n <= 0x10ffff then + return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128, + f(n % 4096 / 64) + 128, n % 64 + 128) + end + error( string.format("invalid unicode codepoint '%x'", n) ) +end + + +local function parse_unicode_escape(s) + local n1 = tonumber( s:sub(1, 4), 16 ) + local n2 = tonumber( s:sub(7, 10), 16 ) + -- Surrogate pair? + if n2 then + return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) + else + return codepoint_to_utf8(n1) + end +end + + +local function parse_string(str, i) + local res = "" + local j = i + 1 + local k = j + + while j <= #str do + local x = str:byte(j) + + if x < 32 then + decode_error(str, j, "control character in string") + + elseif x == 92 then -- `\`: Escape + res = res .. str:sub(k, j - 1) + j = j + 1 + local c = str:sub(j, j) + if c == "u" then + local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) + or str:match("^%x%x%x%x", j + 1) + or decode_error(str, j - 1, "invalid unicode escape in string") + res = res .. parse_unicode_escape(hex) + j = j + #hex + else + if not escape_chars[c] then + decode_error(str, j - 1, "invalid escape char '" .. c .. "' in string") + end + res = res .. escape_char_map_inv[c] + end + k = j + 1 + + elseif x == 34 then -- `"`: End of string + res = res .. str:sub(k, j - 1) + return res, j + 1 + end + + j = j + 1 + end + + decode_error(str, i, "expected closing quote for string") +end + + +local function parse_number(str, i) + local x = next_char(str, i, delim_chars) + local s = str:sub(i, x - 1) + local n = tonumber(s) + if not n then + decode_error(str, i, "invalid number '" .. s .. "'") + end + return n, x +end + + +local function parse_literal(str, i) + local x = next_char(str, i, delim_chars) + local word = str:sub(i, x - 1) + if not literals[word] then + decode_error(str, i, "invalid literal '" .. word .. "'") + end + return literal_map[word], x +end + + +local function parse_array(str, i) + local res = {} + local n = 1 + i = i + 1 + while 1 do + local x + i = next_char(str, i, space_chars, true) + -- Empty / end of array? + if str:sub(i, i) == "]" then + i = i + 1 + break + end + -- Read token + x, i = parse(str, i) + res[n] = x + n = n + 1 + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "]" then break end + if chr ~= "," then decode_error(str, i, "expected ']' or ','") end + end + return res, i +end + + +local function parse_object(str, i) + local res = {} + i = i + 1 + while 1 do + local key, val + i = next_char(str, i, space_chars, true) + -- Empty / end of object? + if str:sub(i, i) == "}" then + i = i + 1 + break + end + -- Read key + if str:sub(i, i) ~= '"' then + decode_error(str, i, "expected string for key") + end + key, i = parse(str, i) + -- Read ':' delimiter + i = next_char(str, i, space_chars, true) + if str:sub(i, i) ~= ":" then + decode_error(str, i, "expected ':' after key") + end + i = next_char(str, i + 1, space_chars, true) + -- Read value + val, i = parse(str, i) + -- Set + res[key] = val + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "}" then break end + if chr ~= "," then decode_error(str, i, "expected '}' or ','") end + end + return res, i +end + + +local char_func_map = { + [ '"' ] = parse_string, + [ "0" ] = parse_number, + [ "1" ] = parse_number, + [ "2" ] = parse_number, + [ "3" ] = parse_number, + [ "4" ] = parse_number, + [ "5" ] = parse_number, + [ "6" ] = parse_number, + [ "7" ] = parse_number, + [ "8" ] = parse_number, + [ "9" ] = parse_number, + [ "-" ] = parse_number, + [ "t" ] = parse_literal, + [ "f" ] = parse_literal, + [ "n" ] = parse_literal, + [ "[" ] = parse_array, + [ "{" ] = parse_object, +} + + +parse = function(str, idx) + local chr = str:sub(idx, idx) + local f = char_func_map[chr] + if f then + return f(str, idx) + end + decode_error(str, idx, "unexpected character '" .. chr .. "'") +end + + +function json.decode(str) + if type(str) ~= "string" then + error("expected argument of type string, got " .. type(str)) + end + local res, idx = parse(str, next_char(str, 1, space_chars, true)) + idx = next_char(str, idx, space_chars, true) + if idx <= #str then + decode_error(str, idx, "trailing garbage") + end + return res +end + + +return json diff --git a/dissectors/chromium-ipc/helpers/legacy_ipc_interfaces.json b/dissectors/chromium-ipc/helpers/legacy_ipc_interfaces.json new file mode 100644 index 0000000..fa822ba --- /dev/null +++ b/dissectors/chromium-ipc/helpers/legacy_ipc_interfaces.json @@ -0,0 +1,1986 @@ +{ + "metadata": { + "version": "138.0.7204.97", + "commit": "14f98e519099bc5d4beb1c54e49807a284fe3e63" + }, + "1000F": { + "name": "SyncChannelTestMsg_NoArgs", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_NoArgs)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=15" + }, + "10012": { + "name": "SyncChannelTestMsg_AnswerToLife", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_1(SyncChannelTestMsg_AnswerToLife, int /* answer */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=17" + }, + "10016": { + "name": "SyncChannelTestMsg_Double", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_1(SyncChannelTestMsg_Double, int /* in */, int /* out */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=20" + }, + "10019": { + "name": "SyncChannelNestedTestMsg_String", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_1(SyncChannelNestedTestMsg_String, std::string)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=24" + }, + "1001C": { + "name": "Msg_C_0_1", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_1(Msg_C_0_1, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=28" + }, + "1001F": { + "name": "Msg_C_0_2", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_2(Msg_C_0_2, bool, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=31" + }, + "10022": { + "name": "Msg_C_0_3", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_3(Msg_C_0_3, bool, int, std::string)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=34" + }, + "10025": { + "name": "Msg_C_1_1", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_1(Msg_C_1_1, int, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=37" + }, + "10028": { + "name": "Msg_C_1_2", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_2(Msg_C_1_2, bool, bool, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=40" + }, + "1002B": { + "name": "Msg_C_1_3", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_3(Msg_C_1_3, int, std::string, int, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=43" + }, + "1002E": { + "name": "Msg_C_2_1", + "definition": "IPC_SYNC_MESSAGE_CONTROL2_1(Msg_C_2_1, int, bool, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=46" + }, + "10031": { + "name": "Msg_C_2_2", + "definition": "IPC_SYNC_MESSAGE_CONTROL2_2(Msg_C_2_2, bool, int, bool, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=49" + }, + "10034": { + "name": "Msg_C_2_3", + "definition": "IPC_SYNC_MESSAGE_CONTROL2_3(Msg_C_2_3, int, bool, std::string, int, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=52" + }, + "10037": { + "name": "Msg_C_3_1", + "definition": "IPC_SYNC_MESSAGE_CONTROL3_1(Msg_C_3_1, int, bool, std::string, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=55" + }, + "1003B": { + "name": "Msg_C_3_2", + "definition": "IPC_SYNC_MESSAGE_CONTROL3_2(Msg_C_3_2, std::string, bool, int, bool, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=59" + }, + "10040": { + "name": "Msg_C_3_3", + "definition": "IPC_SYNC_MESSAGE_CONTROL3_3(Msg_C_3_3, int, std::string, bool, std::string, int, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=63" + }, + "10045": { + "name": "Msg_C_3_4", + "definition": "IPC_SYNC_MESSAGE_CONTROL3_4(Msg_C_3_4, bool, int, std::string, int, bool, std::string, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=68" + }, + "1004A": { + "name": "Msg_R_0_1", + "definition": "IPC_SYNC_MESSAGE_ROUTED0_1(Msg_R_0_1, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=74" + }, + "1004D": { + "name": "Msg_R_0_2", + "definition": "IPC_SYNC_MESSAGE_ROUTED0_2(Msg_R_0_2, bool, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=77" + }, + "10050": { + "name": "Msg_R_0_3", + "definition": "IPC_SYNC_MESSAGE_ROUTED0_3(Msg_R_0_3, bool, int, std::string)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=80" + }, + "10053": { + "name": "Msg_R_1_1", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(Msg_R_1_1, int, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=83" + }, + "10056": { + "name": "Msg_R_1_2", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_2(Msg_R_1_2, bool, bool, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=86" + }, + "10059": { + "name": "Msg_R_1_3", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_3(Msg_R_1_3, int, std::string, int, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=89" + }, + "1005C": { + "name": "Msg_R_2_1", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_1(Msg_R_2_1, int, bool, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=92" + }, + "1005F": { + "name": "Msg_R_2_2", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(Msg_R_2_2, bool, int, bool, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=95" + }, + "10062": { + "name": "Msg_R_2_3", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_3(Msg_R_2_3, int, bool, std::string, int, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=98" + }, + "10065": { + "name": "Msg_R_3_1", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_1(Msg_R_3_1, int, bool, std::string, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=101" + }, + "10069": { + "name": "Msg_R_3_2", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_2(Msg_R_3_2, std::string, bool, int, bool, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=105" + }, + "1006E": { + "name": "Msg_R_3_3", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_3(Msg_R_3_3, int, std::string, bool, std::string, int, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=109" + }, + "10073": { + "name": "Msg_R_3_4", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_4(Msg_R_3_4, bool, int, std::string, int, bool, std::string, bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=114" + }, + "10075": { + "name": "SyncChannelTestMsg_Ping", + "definition": "IPC_MESSAGE_CONTROL1(SyncChannelTestMsg_Ping, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=117" + }, + "10076": { + "name": "SyncChannelTestMsg_PingTTL", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_1(SyncChannelTestMsg_PingTTL, int, int)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=118" + }, + "10077": { + "name": "SyncChannelTestMsg_Done", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Done)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=119" + }, + "1007A": { + "name": "SyncChannelTestMsg_Reentrant1", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant1)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=122" + }, + "1007B": { + "name": "SyncChannelTestMsg_Reentrant2", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant2)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=123" + }, + "1007C": { + "name": "SyncChannelTestMsg_Reentrant3", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant3)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_sync_message_unittest.h;l=124" + }, + "20024": { + "name": "TestMsg_Bounce", + "definition": "IPC_MESSAGE_CONTROL0(TestMsg_Bounce)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_channel_proxy_unittest_messages.h;l=36" + }, + "20025": { + "name": "TestMsg_SendBadMessage", + "definition": "IPC_MESSAGE_CONTROL0(TestMsg_SendBadMessage)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_channel_proxy_unittest_messages.h;l=37" + }, + "20026": { + "name": "TestMsg_BadMessage", + "definition": "IPC_MESSAGE_CONTROL1(TestMsg_BadMessage, BadType)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_channel_proxy_unittest_messages.h;l=38" + }, + "2002A": { + "name": "AutomationMsg_Bounce", + "definition": "IPC_MESSAGE_CONTROL0(AutomationMsg_Bounce)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_channel_proxy_unittest_messages.h;l=42" + }, + "2002E": { + "name": "WorkerMsg_Bounce", + "definition": "IPC_MESSAGE_CONTROL0(WorkerMsg_Bounce)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_channel_proxy_unittest_messages.h;l=46" + }, + "2002F": { + "name": "WorkerMsg_Quit", + "definition": "IPC_MESSAGE_CONTROL0(WorkerMsg_Quit)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ipc/ipc_channel_proxy_unittest_messages.h;l=47" + }, + "30037": { + "name": "NaClProcessMsg_AddPrefetchedResource", + "definition": "IPC_MESSAGE_CONTROL1(NaClProcessMsg_AddPrefetchedResource, nacl::NaClResourcePrefetchResult)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_messages.h;l=54" + }, + "3003B": { + "name": "NaClProcessMsg_Start", + "definition": "IPC_MESSAGE_CONTROL1(NaClProcessMsg_Start, nacl::NaClStartParams /* params */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_messages.h;l=58" + }, + "30041": { + "name": "NaClProcessMsg_QueryKnownToValidate", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_1(NaClProcessMsg_QueryKnownToValidate, std::string, /* A validation signature */ bool /* Can validation be skipped? */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_messages.h;l=63" + }, + "30046": { + "name": "NaClProcessMsg_SetKnownToValidate", + "definition": "IPC_MESSAGE_CONTROL1(NaClProcessMsg_SetKnownToValidate, std::string /* A validation signature */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_messages.h;l=69" + }, + "3004D": { + "name": "NaClProcessMsg_ResolveFileToken", + "definition": "IPC_MESSAGE_CONTROL2(NaClProcessMsg_ResolveFileToken, uint64_t, /* file_token_lo */ uint64_t /* file_token_hi */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_messages.h;l=75" + }, + "30052": { + "name": "NaClProcessMsg_ResolveFileTokenReply", + "definition": "IPC_MESSAGE_CONTROL4(NaClProcessMsg_ResolveFileTokenReply, uint64_t, /* file_token_lo */ uint64_t, /* file_token_hi */ IPC::PlatformFileForTransit, /* fd */ base::FilePath /* Path opened to get fd */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_messages.h;l=78" + }, + "401A2": { + "name": "PpapiMsg_LoadPlugin", + "definition": "IPC_MESSAGE_CONTROL2(PpapiMsg_LoadPlugin, base::FilePath /* path */, ppapi::PpapiPermissions /* permissions */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=416" + }, + "401AB": { + "name": "PpapiMsg_CreateChannel", + "definition": "IPC_MESSAGE_CONTROL3(PpapiMsg_CreateChannel, base::ProcessId /* renderer_pid */, int /* renderer_child_id */, bool /* incognito */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=424" + }, + "401AF": { + "name": "PpapiMsg_InitializeNaClDispatcher", + "definition": "IPC_MESSAGE_CONTROL1(PpapiMsg_InitializeNaClDispatcher, ppapi::PpapiNaClPluginArgs /* args */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=430" + }, + "401C1": { + "name": "PpapiMsg_ReserveInstanceId", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_ReserveInstanceId, PP_Instance /* instance */, bool /* usable */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=447" + }, + "401C5": { + "name": "PpapiMsg_SetPreferences", + "definition": "IPC_MESSAGE_CONTROL1(PpapiMsg_SetPreferences, ppapi::Preferences)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=452" + }, + "401CB": { + "name": "PpapiMsg_SupportsInterface", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_SupportsInterface, std::string /* interface_name */, bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=457" + }, + "401D1": { + "name": "PpapiMsg_SetNetworkState", + "definition": "IPC_MESSAGE_CONTROL1(PpapiMsg_SetNetworkState, bool /* online */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=464" + }, + "401E2": { + "name": "PpapiMsg_PPBAudio_NotifyAudioStreamCreated", + "definition": "IPC_MESSAGE_ROUTED4(PpapiMsg_PPBAudio_NotifyAudioStreamCreated, ppapi::HostResource /* audio_id */, int32_t /* result_code (will be != PP_OK on failure) */, ppapi::proxy::SerializedHandle /* socket_handle */, ppapi::proxy::SerializedHandle /* handle */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=478" + }, + "401E7": { + "name": "PpapiMsg_PPBGraphics3D_SwapBuffersACK", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPBGraphics3D_SwapBuffersACK, ppapi::HostResource /* graphics_3d */, int32_t /* pp_error */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=485" + }, + "401EB": { + "name": "PpapiMsg_PPBImageData_NotifyUnusedImageData", + "definition": "IPC_MESSAGE_ROUTED1(PpapiMsg_PPBImageData_NotifyUnusedImageData, ppapi::HostResource /* old_image_data */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=490" + }, + "401F0": { + "name": "PpapiMsg_PPBInstance_MouseLockComplete", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPBInstance_MouseLockComplete, PP_Instance /* instance */, int32_t /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=494" + }, + "401F8": { + "name": "PpapiMsg_PPPClass_HasProperty", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasProperty, int64_t /* ppp_class */, int64_t /* object */, ppapi::proxy::SerializedVar /* property */, ppapi::proxy::SerializedVar /* out_exception */, bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=499" + }, + "401FE": { + "name": "PpapiMsg_PPPClass_HasMethod", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_HasMethod, int64_t /* ppp_class */, int64_t /* object */, ppapi::proxy::SerializedVar /* method */, ppapi::proxy::SerializedVar /* out_exception */, bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=505" + }, + "40204": { + "name": "PpapiMsg_PPPClass_GetProperty", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_GetProperty, int64_t /* ppp_class */, int64_t /* object */, ppapi::proxy::SerializedVar /* property */, ppapi::proxy::SerializedVar /* out_exception */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=511" + }, + "40209": { + "name": "PpapiMsg_PPPClass_EnumerateProperties", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPClass_EnumerateProperties, int64_t /* ppp_class */, int64_t /* object */, std::vector /* props */, ppapi::proxy::SerializedVar /* out_exception */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=517" + }, + "4020F": { + "name": "PpapiMsg_PPPClass_SetProperty", + "definition": "IPC_SYNC_MESSAGE_ROUTED4_1(PpapiMsg_PPPClass_SetProperty, int64_t /* ppp_class */, int64_t /* object */, ppapi::proxy::SerializedVar /* name */, ppapi::proxy::SerializedVar /* value */, ppapi::proxy::SerializedVar /* out_exception */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=522" + }, + "40214": { + "name": "PpapiMsg_PPPClass_RemoveProperty", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPClass_RemoveProperty, int64_t /* ppp_class */, int64_t /* object */, ppapi::proxy::SerializedVar /* property */, ppapi::proxy::SerializedVar /* out_exception */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=528" + }, + "4021B": { + "name": "PpapiMsg_PPPClass_Call", + "definition": "IPC_SYNC_MESSAGE_ROUTED4_2(PpapiMsg_PPPClass_Call, int64_t /* ppp_class */, int64_t /* object */, ppapi::proxy::SerializedVar /* method_name */, std::vector /* args */, ppapi::proxy::SerializedVar /* out_exception */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=533" + }, + "40221": { + "name": "PpapiMsg_PPPClass_Construct", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_2(PpapiMsg_PPPClass_Construct, int64_t /* ppp_class */, int64_t /* object */, std::vector /* args */, ppapi::proxy::SerializedVar /* out_exception */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=540" + }, + "40224": { + "name": "PpapiMsg_PPPClass_Deallocate", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPPClass_Deallocate, int64_t /* ppp_class */, int64_t /* object */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=546" + }, + "40228": { + "name": "PpapiMsg_PPPGraphics3D_ContextLost", + "definition": "IPC_MESSAGE_ROUTED1(PpapiMsg_PPPGraphics3D_ContextLost, PP_Instance /* instance */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=551" + }, + "4022D": { + "name": "PpapiMsg_PPPInputEvent_HandleInputEvent", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInputEvent_HandleInputEvent, PP_Instance /* instance */, ppapi::InputEventData /* data */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=555" + }, + "40231": { + "name": "PpapiMsg_PPPInputEvent_HandleFilteredInputEvent", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPInputEvent_HandleFilteredInputEvent, PP_Instance /* instance */, ppapi::InputEventData /* data */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=558" + }, + "40238": { + "name": "PpapiMsg_PPPInstance_DidCreate", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_1(PpapiMsg_PPPInstance_DidCreate, PP_Instance /* instance */, std::vector /* argn */, std::vector /* argv */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=564" + }, + "4023A": { + "name": "PpapiMsg_PPPInstance_DidDestroy", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_0(PpapiMsg_PPPInstance_DidDestroy, PP_Instance /* instance */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=569" + }, + "4023E": { + "name": "PpapiMsg_PPPInstance_DidChangeView", + "definition": "IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_DidChangeView, PP_Instance /* instance */, ppapi::ViewData /* new_data */, PP_Bool /* flash_fullscreen */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=571" + }, + "40241": { + "name": "PpapiMsg_PPPInstance_DidChangeFocus", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPPInstance_DidChangeFocus, PP_Instance /* instance */, PP_Bool /* has_focus */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=575" + }, + "40245": { + "name": "PpapiMsg_PPPInstance_HandleDocumentLoad", + "definition": "IPC_MESSAGE_ROUTED3(PpapiMsg_PPPInstance_HandleDocumentLoad, PP_Instance /* instance */, int /* pending_loader_host_id */, ppapi::URLResponseInfoData /* response */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=578" + }, + "4024A": { + "name": "PpapiMsg_PPPMessaging_HandleMessage", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPPMessaging_HandleMessage, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* message */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=584" + }, + "4024F": { + "name": "PpapiMsg_PPPMessageHandler_HandleBlockingMessage", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiMsg_PPPMessageHandler_HandleBlockingMessage, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* message */, ppapi::proxy::SerializedVar /* result */, bool /* was_handled */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=587" + }, + "40253": { + "name": "PpapiMsg_PPPMouseLock_MouseLockLost", + "definition": "IPC_MESSAGE_ROUTED1(PpapiMsg_PPPMouseLock_MouseLockLost, PP_Instance /* instance */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=594" + }, + "40258": { + "name": "PpapiMsg_PPPPrinting_QuerySupportedFormats", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_QuerySupportedFormats, PP_Instance /* instance */, uint32_t /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=598" + }, + "4025C": { + "name": "PpapiMsg_PPPPrinting_Begin", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPPrinting_Begin, PP_Instance /* instance */, PP_PrintSettings_Dev /* settings */, int32_t /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=601" + }, + "40260": { + "name": "PpapiMsg_PPPPrinting_PrintPages", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_1(PpapiMsg_PPPPrinting_PrintPages, PP_Instance /* instance */, std::vector /* pages */, ppapi::HostResource /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=605" + }, + "40262": { + "name": "PpapiMsg_PPPPrinting_End", + "definition": "IPC_MESSAGE_ROUTED1(PpapiMsg_PPPPrinting_End, PP_Instance /* instance */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=609" + }, + "40265": { + "name": "PpapiMsg_PPPPrinting_IsScalingDisabled", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPPrinting_IsScalingDisabled, PP_Instance /* instance */, bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=611" + }, + "4026A": { + "name": "PpapiMsg_PPPTextInput_RequestSurroundingText", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPPTextInput_RequestSurroundingText, PP_Instance /* instance */, uint32_t /* desired_number_of_characters */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=616" + }, + "40270": { + "name": "PpapiMsg_PPPInstancePrivate_GetInstanceObject", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiMsg_PPPInstancePrivate_GetInstanceObject, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=622" + }, + "40283": { + "name": "PpapiMsg_PnaclTranslatorCompileInit", + "definition": "IPC_SYNC_MESSAGE_CONTROL3_2(PpapiMsg_PnaclTranslatorCompileInit, /* number of threads to use */ int, /* object file FDs for outputs */ std::vector, /* list of command line flags */ std::vector, /* success status result */ bool, /* error string if the success field is false */ std::string)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=633" + }, + "4028F": { + "name": "PpapiMsg_PnaclTranslatorCompileChunk", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_1(PpapiMsg_PnaclTranslatorCompileChunk, /* chunk of data for the input pexe file */ std::string, /* success status result */ bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=651" + }, + "40299": { + "name": "PpapiMsg_PnaclTranslatorCompileEnd", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_2(PpapiMsg_PnaclTranslatorCompileEnd, /* success status result */ bool, /* error string if the success field is false */ std::string)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=661" + }, + "402A5": { + "name": "PpapiMsg_PnaclTranslatorLink", + "definition": "IPC_SYNC_MESSAGE_CONTROL2_1(PpapiMsg_PnaclTranslatorLink, /* object file FDs for inputs */ std::vector, /* nexe file FD for output */ ppapi::proxy::SerializedHandle, /* success status result */ bool)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=671" + }, + "402AF": { + "name": "PpapiHostMsg_ChannelCreated", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated, IPC::ChannelHandle /* handle */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=686" + }, + "402B2": { + "name": "PpapiHostMsg_StartupInitializationComplete", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_StartupInitializationComplete)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=690" + }, + "402C6": { + "name": "PpapiHostMsg_OpenResource", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_3(PpapiHostMsg_OpenResource, std::string /* key */, uint64_t /* file_token_lo */, uint64_t /* file_token_hi */, ppapi::proxy::SerializedHandle /* fd */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=706" + }, + "402CD": { + "name": "PpapiHostMsg_LogWithSource", + "definition": "IPC_MESSAGE_CONTROL4(PpapiHostMsg_LogWithSource, PP_Instance /* instance */, int /* log_level */, std::string /* source */, std::string /* value */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=713" + }, + "402D4": { + "name": "PpapiHostMsg_PPBAudio_Create", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudio_Create, PP_Instance /* instance_id */, int32_t /* sample_rate */, uint32_t /* sample_frame_count */, ppapi::HostResource /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=720" + }, + "402D7": { + "name": "PpapiHostMsg_PPBAudio_StartOrStop", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBAudio_StartOrStop, ppapi::HostResource /* audio_id */, bool /* play */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=725" + }, + "402DB": { + "name": "PpapiHostMsg_PPBCore_AddRefResource", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_AddRefResource, ppapi::HostResource)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=730" + }, + "402DD": { + "name": "PpapiHostMsg_PPBCore_ReleaseResource", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource, ppapi::HostResource)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=732" + }, + "402EC": { + "name": "PpapiHostMsg_PPBGraphics3D_SetGetBuffer", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_SetGetBuffer, ppapi::HostResource /* context */, int32_t /* transfer_buffer_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=746" + }, + "402F2": { + "name": "PpapiHostMsg_PPBGraphics3D_WaitForTokenInRange", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBGraphics3D_WaitForTokenInRange, ppapi::HostResource /* context */, int32_t /* start */, int32_t /* end */, gpu::CommandBuffer::State /* state */, bool /* success */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=749" + }, + "402F9": { + "name": "PpapiHostMsg_PPBGraphics3D_WaitForGetOffsetInRange", + "definition": "IPC_SYNC_MESSAGE_ROUTED4_2(PpapiHostMsg_PPBGraphics3D_WaitForGetOffsetInRange, ppapi::HostResource /* context */, uint32_t /* set_get_buffer_count */, int32_t /* start */, int32_t /* end */, gpu::CommandBuffer::State /* state */, bool /* success */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=755" + }, + "402FD": { + "name": "PpapiHostMsg_PPBGraphics3D_AsyncFlush", + "definition": "IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBGraphics3D_AsyncFlush, ppapi::HostResource /* context */, int32_t /* put_offset */, uint64_t /* release_count */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=762" + }, + "40302": { + "name": "PpapiHostMsg_PPBGraphics3D_CreateTransferBuffer", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBGraphics3D_CreateTransferBuffer, ppapi::HostResource /* context */, uint32_t /* size */, int32_t /* id */, ppapi::proxy::SerializedHandle /* transfer_buffer */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=766" + }, + "40305": { + "name": "PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer, ppapi::HostResource /* context */, int32_t /* id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=771" + }, + "4030F": { + "name": "PpapiHostMsg_PPBGraphics3D_SwapBuffers", + "definition": "IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBGraphics3D_SwapBuffers, ppapi::HostResource /* graphics_3d */, gpu::SyncToken /* sync_token */, gfx::Size /* size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=780" + }, + "40311": { + "name": "PpapiHostMsg_PPBGraphics3D_EnsureWorkVisible", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_EnsureWorkVisible, ppapi::HostResource /* context */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=784" + }, + "40313": { + "name": "PpapiHostMsg_PPBGraphics3D_ResolveAndDetachFramebuffer", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_ResolveAndDetachFramebuffer, ppapi::HostResource /* graphics_3d */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=786" + }, + "40316": { + "name": "PpapiHostMsg_PPBGraphics3D_Resize", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_Resize, ppapi::HostResource /* graphics_3d */, gfx::Size /* size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=788" + }, + "40320": { + "name": "PpapiHostMsg_PPBImageData_CreatePlatform", + "definition": "IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreatePlatform, PP_Instance /* instance */, int32_t /* format */, PP_Size /* size */, PP_Bool /* init_to_zero */, ppapi::HostResource /* result_resource */, PP_ImageDataDesc /* image_data_desc */, ppapi::proxy::SerializedHandle /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=793" + }, + "40328": { + "name": "PpapiHostMsg_PPBImageData_CreateSimple", + "definition": "IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_CreateSimple, PP_Instance /* instance */, int32_t /* format */, PP_Size /* size */, PP_Bool /* init_to_zero */, ppapi::HostResource /* result_resource */, PP_ImageDataDesc /* image_data_desc */, ppapi::proxy::SerializedHandle /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=801" + }, + "4032D": { + "name": "PpapiHostMsg_PPBInstance_GetWindowObject", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetWindowObject, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=811" + }, + "40330": { + "name": "PpapiHostMsg_PPBInstance_GetOwnerElementObject", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetOwnerElementObject, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=814" + }, + "40333": { + "name": "PpapiHostMsg_PPBInstance_BindGraphics", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_BindGraphics, PP_Instance /* instance */, PP_Resource /* device */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=817" + }, + "4033E": { + "name": "PpapiHostMsg_PPBInstance_IsFullFrame", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_IsFullFrame, PP_Instance /* instance */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=828" + }, + "40343": { + "name": "PpapiHostMsg_PPBInstance_ExecuteScript", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBInstance_ExecuteScript, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* script */, ppapi::proxy::SerializedVar /* out_exception */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=831" + }, + "40346": { + "name": "PpapiHostMsg_PPBInstance_GetDefaultCharSet", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetDefaultCharSet, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=836" + }, + "4034A": { + "name": "PpapiHostMsg_PPBInstance_SetFullscreen", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_SetFullscreen, PP_Instance /* instance */, PP_Bool /* fullscreen */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=839" + }, + "4034E": { + "name": "PpapiHostMsg_PPBInstance_GetScreenSize", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetScreenSize, PP_Instance /* instance */, PP_Bool /* result */, PP_Size /* size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=843" + }, + "40352": { + "name": "PpapiHostMsg_PPBInstance_RequestInputEvents", + "definition": "IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_RequestInputEvents, PP_Instance /* instance */, bool /* is_filtering */, uint32_t /* event_classes */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=847" + }, + "40355": { + "name": "PpapiHostMsg_PPBInstance_ClearInputEvents", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_ClearInputEvents, PP_Instance /* instance */, uint32_t /* event_classes */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=851" + }, + "40358": { + "name": "PpapiHostMsg_PPBInstance_PostMessage", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_PostMessage, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* message */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=854" + }, + "4035A": { + "name": "PpapiHostMsg_PPBInstance_LockMouse", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_LockMouse, PP_Instance /* instance */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=857" + }, + "4035C": { + "name": "PpapiHostMsg_PPBInstance_UnlockMouse", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_UnlockMouse, PP_Instance /* instance */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=859" + }, + "40360": { + "name": "PpapiHostMsg_PPBInstance_ResolveRelativeToDocument", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_ResolveRelativeToDocument, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* relative */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=861" + }, + "40364": { + "name": "PpapiHostMsg_PPBInstance_DocumentCanRequest", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_DocumentCanRequest, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* relative */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=865" + }, + "40368": { + "name": "PpapiHostMsg_PPBInstance_DocumentCanAccessDocument", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_DocumentCanAccessDocument, PP_Instance /* active */, PP_Instance /* target */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=869" + }, + "4036C": { + "name": "PpapiHostMsg_PPBInstance_GetDocumentURL", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetDocumentURL, PP_Instance /* active */, PP_URLComponents_Dev /* components */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=873" + }, + "4036F": { + "name": "PpapiHostMsg_PPBInstance_GetPluginInstanceURL", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetPluginInstanceURL, PP_Instance /* active */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=877" + }, + "40372": { + "name": "PpapiHostMsg_PPBInstance_GetPluginReferrerURL", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBInstance_GetPluginReferrerURL, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=880" + }, + "40377": { + "name": "PpapiHostMsg_PPBInstance_SetCursor", + "definition": "IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_SetCursor, PP_Instance /* instance */, int32_t /* type */, ppapi::HostResource /* custom_image */, PP_Point /* hot_spot */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=883" + }, + "4037A": { + "name": "PpapiHostMsg_PPBInstance_SetTextInputType", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SetTextInputType, PP_Instance /* instance */, PP_TextInput_Type /* type */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=888" + }, + "4037E": { + "name": "PpapiHostMsg_PPBInstance_UpdateCaretPosition", + "definition": "IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_UpdateCaretPosition, PP_Instance /* instance */, PP_Rect /* caret */, PP_Rect /* bounding_box */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=891" + }, + "40380": { + "name": "PpapiHostMsg_PPBInstance_CancelCompositionText", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBInstance_CancelCompositionText, PP_Instance /* instance */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=895" + }, + "40385": { + "name": "PpapiHostMsg_PPBInstance_UpdateSurroundingText", + "definition": "IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_UpdateSurroundingText, PP_Instance /* instance */, std::string /* text */, uint32_t /* caret */, uint32_t /* anchor */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=897" + }, + "40389": { + "name": "PpapiHostMsg_PPBVar_AddRefObject", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVar_AddRefObject, int64_t /* object_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=904" + }, + "4038A": { + "name": "PpapiHostMsg_PPBVar_ReleaseObject", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_ReleaseObject, int64_t /* object_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=906" + }, + "4038F": { + "name": "PpapiHostMsg_PPBVar_HasProperty", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasProperty, ppapi::proxy::SerializedVar /* object */, ppapi::proxy::SerializedVar /* property */, ppapi::proxy::SerializedVar /* out_exception */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=907" + }, + "40394": { + "name": "PpapiHostMsg_PPBVar_HasMethodDeprecated", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_HasMethodDeprecated, ppapi::proxy::SerializedVar /* object */, ppapi::proxy::SerializedVar /* method */, ppapi::proxy::SerializedVar /* out_exception */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=912" + }, + "40399": { + "name": "PpapiHostMsg_PPBVar_GetProperty", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_GetProperty, ppapi::proxy::SerializedVar /* object */, ppapi::proxy::SerializedVar /* property */, ppapi::proxy::SerializedVar /* out_exception */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=917" + }, + "4039E": { + "name": "PpapiHostMsg_PPBVar_DeleteProperty", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_DeleteProperty, ppapi::proxy::SerializedVar /* object */, ppapi::proxy::SerializedVar /* property */, ppapi::proxy::SerializedVar /* out_exception */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=922" + }, + "403A2": { + "name": "PpapiHostMsg_PPBVar_EnumerateProperties", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBVar_EnumerateProperties, ppapi::proxy::SerializedVar /* object */, std::vector /* props */, ppapi::proxy::SerializedVar /* out_exception */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=927" + }, + "403A7": { + "name": "PpapiHostMsg_PPBVar_SetPropertyDeprecated", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_SetPropertyDeprecated, ppapi::proxy::SerializedVar /* object */, ppapi::proxy::SerializedVar /* name */, ppapi::proxy::SerializedVar /* value */, ppapi::proxy::SerializedVar /* out_exception */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=931" + }, + "403AD": { + "name": "PpapiHostMsg_PPBVar_CallDeprecated", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBVar_CallDeprecated, ppapi::proxy::SerializedVar /* object */, ppapi::proxy::SerializedVar /* method_name */, std::vector /* args */, ppapi::proxy::SerializedVar /* out_exception */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=936" + }, + "403B2": { + "name": "PpapiHostMsg_PPBVar_Construct", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_Construct, ppapi::proxy::SerializedVar /* object */, std::vector /* args */, ppapi::proxy::SerializedVar /* out_exception */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=942" + }, + "403B7": { + "name": "PpapiHostMsg_PPBVar_IsInstanceOfDeprecated", + "definition": "IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_IsInstanceOfDeprecated, ppapi::proxy::SerializedVar /* var */, int64_t /* object_class */, int64_t /* object-data */, PP_Bool /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=947" + }, + "403BC": { + "name": "PpapiHostMsg_PPBVar_CreateObjectDeprecated", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_CreateObjectDeprecated, PP_Instance /* instance */, int64_t /* object_class */, int64_t /* object_data */, ppapi::proxy::SerializedVar /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=952" + }, + "403D2": { + "name": "PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance, PP_Instance /* instance */, uint32_t /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=976" + }, + "403D5": { + "name": "PpapiHostMsg_PPBTesting_SimulateInputEvent", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBTesting_SimulateInputEvent, PP_Instance /* instance */, ppapi::InputEventData /* input_event */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=979" + }, + "403E2": { + "name": "PpapiHostMsg_PPBVideoDecoder_Create", + "definition": "IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVideoDecoder_Create, PP_Instance /* instance */, ppapi::HostResource /* context */, PP_VideoDecoder_Profile /* profile */, ppapi::HostResource /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=990" + }, + "403E7": { + "name": "PpapiHostMsg_PPBVideoDecoder_Decode", + "definition": "IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBVideoDecoder_Decode, ppapi::HostResource /* video_decoder */, ppapi::HostResource /* bitstream buffer */, int32_t /* bitstream buffer id */, uint32_t /* size of buffer */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=995" + }, + "403EA": { + "name": "PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers, ppapi::HostResource /* video_decoder */, std::vector /* picture buffers */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1000" + }, + "403ED": { + "name": "PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer", + "definition": "IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer, ppapi::HostResource /* video_decoder */, int32_t /* picture buffer id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1003" + }, + "403EF": { + "name": "PpapiHostMsg_PPBVideoDecoder_Flush", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Flush, ppapi::HostResource /* video_decoder */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1006" + }, + "403F1": { + "name": "PpapiHostMsg_PPBVideoDecoder_Reset", + "definition": "IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Reset, ppapi::HostResource /* video_decoder */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1008" + }, + "403F3": { + "name": "PpapiHostMsg_PPBVideoDecoder_Destroy", + "definition": "IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVideoDecoder_Destroy, ppapi::HostResource /* video_decoder */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1010" + }, + "403FA": { + "name": "PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK", + "definition": "IPC_MESSAGE_ROUTED3(PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK, ppapi::HostResource /* video_decoder */, int32_t /* bitstream buffer id */, int32_t /* PP_CompletionCallback result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1015" + }, + "403FD": { + "name": "PpapiMsg_PPBVideoDecoder_FlushACK", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_FlushACK, ppapi::HostResource /* video_decoder */, int32_t /* PP_CompletionCallback result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1019" + }, + "40400": { + "name": "PpapiMsg_PPBVideoDecoder_ResetACK", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_ResetACK, ppapi::HostResource /* video_decoder */, int32_t /* PP_CompletionCallback result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1022" + }, + "40407": { + "name": "PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers", + "definition": "IPC_MESSAGE_ROUTED4(PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers, ppapi::HostResource /* video_decoder */, uint32_t /* requested number of buffers */, PP_Size /* dimensions of buffers */, uint32_t /* texture_target */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1027" + }, + "4040A": { + "name": "PpapiMsg_PPPVideoDecoder_DismissPictureBuffer", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_DismissPictureBuffer, ppapi::HostResource /* video_decoder */, int32_t /* picture buffer id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1032" + }, + "4040D": { + "name": "PpapiMsg_PPPVideoDecoder_PictureReady", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_PictureReady, ppapi::HostResource /* video_decoder */, PP_Picture_Dev /* output picture */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1035" + }, + "40410": { + "name": "PpapiMsg_PPPVideoDecoder_NotifyError", + "definition": "IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_NotifyError, ppapi::HostResource /* video_decoder */, PP_VideoDecodeError_Dev /* error */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1038" + }, + "40422": { + "name": "PpapiHostMsg_ResourceCreated", + "definition": "IPC_MESSAGE_CONTROL3(PpapiHostMsg_ResourceCreated, ppapi::proxy::ResourceMessageCallParams /* call_params */, PP_Instance /* instance */, IPC::Message /* nested_msg */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1055" + }, + "40426": { + "name": "PpapiHostMsg_ResourceDestroyed", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_ResourceDestroyed, PP_Resource /* resource */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1061" + }, + "40434": { + "name": "PpapiHostMsg_AttachToPendingHost", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_AttachToPendingHost, PP_Resource /* resource */, int /* pending_host_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1074" + }, + "4043B": { + "name": "PpapiHostMsg_ResourceCall", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_ResourceCall, ppapi::proxy::ResourceMessageCallParams /* call_params */, IPC::Message /* nested_msg */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1081" + }, + "4043F": { + "name": "PpapiHostMsg_InProcessResourceCall", + "definition": "IPC_MESSAGE_CONTROL3(PpapiHostMsg_InProcessResourceCall, int /* routing_id */, ppapi::proxy::ResourceMessageCallParams /* call_params */, IPC::Message /* nested_msg */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1084" + }, + "40451": { + "name": "PpapiHostMsg_ResourceSyncCall", + "definition": "IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_ResourceSyncCall, ppapi::proxy::ResourceMessageCallParams /* call_params */, IPC::Message /* nested_msg */, ppapi::proxy::ResourceMessageReplyParams /* reply_params */, IPC::Message /* reply_msg */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1101" + }, + "4046E": { + "name": "PpapiHostMsg_UMA_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_UMA_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1134" + }, + "40474": { + "name": "PpapiHostMsg_UMA_HistogramCustomTimes", + "definition": "IPC_MESSAGE_CONTROL5(PpapiHostMsg_UMA_HistogramCustomTimes, std::string /* name */, int64_t /* sample */, int64_t /* min */, int64_t /* max */, uint32_t /* bucket_count */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1135" + }, + "4047A": { + "name": "PpapiHostMsg_UMA_HistogramCustomCounts", + "definition": "IPC_MESSAGE_CONTROL5(PpapiHostMsg_UMA_HistogramCustomCounts, std::string /* name */, int32_t /* sample */, int32_t /* min */, int32_t /* max */, uint32_t /* bucket_count */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1141" + }, + "4047E": { + "name": "PpapiHostMsg_UMA_HistogramEnumeration", + "definition": "IPC_MESSAGE_CONTROL3(PpapiHostMsg_UMA_HistogramEnumeration, std::string /* name */, int32_t /* sample */, int32_t /* boundary_value */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1147" + }, + "4047F": { + "name": "PpapiHostMsg_UMA_IsCrashReportingEnabled", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_UMA_IsCrashReportingEnabled)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1151" + }, + "40480": { + "name": "PpapiPluginMsg_UMA_IsCrashReportingEnabledReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UMA_IsCrashReportingEnabledReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1152" + }, + "40483": { + "name": "PpapiHostMsg_FileChooser_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileChooser_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1155" + }, + "40488": { + "name": "PpapiHostMsg_FileChooser_Show", + "definition": "IPC_MESSAGE_CONTROL4(PpapiHostMsg_FileChooser_Show, bool /* save_as */, bool /* open_multiple */, std::string /* suggested_file_name */, std::vector /* accept_mime_types */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1156" + }, + "4048A": { + "name": "PpapiPluginMsg_FileChooser_ShowReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileChooser_ShowReply, std::vector /* files */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1161" + }, + "4048D": { + "name": "PpapiHostMsg_FileIO_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1165" + }, + "40490": { + "name": "PpapiHostMsg_FileIO_Open", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Open, PP_Resource /* file_ref_resource */, int32_t /* open_flags */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1166" + }, + "40493": { + "name": "PpapiPluginMsg_FileIO_OpenReply", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileIO_OpenReply, PP_Resource /* quota_file_system */, int64_t /* file_size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1169" + }, + "40495": { + "name": "PpapiHostMsg_FileIO_Close", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_Close, ppapi::FileGrowth /* file_growth */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1172" + }, + "40498": { + "name": "PpapiHostMsg_FileIO_Touch", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileIO_Touch, PP_Time /* last_access_time */, PP_Time /* last_modified_time */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1174" + }, + "4049A": { + "name": "PpapiHostMsg_FileIO_SetLength", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileIO_SetLength, int64_t /* length */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1177" + }, + "4049B": { + "name": "PpapiHostMsg_FileIO_Flush", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_Flush)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1179" + }, + "4049C": { + "name": "PpapiHostMsg_FileIO_RequestOSFileHandle", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileIO_RequestOSFileHandle)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1180" + }, + "4049D": { + "name": "PpapiPluginMsg_FileIO_RequestOSFileHandleReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_RequestOSFileHandleReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1181" + }, + "4049E": { + "name": "PpapiPluginMsg_FileIO_GeneralReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileIO_GeneralReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1182" + }, + "404A4": { + "name": "PpapiHostMsg_FileRef_CreateForRawFS", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_CreateForRawFS, base::FilePath /* external_path */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1187" + }, + "404AA": { + "name": "PpapiHostMsg_FileRef_CreateForFileAPI", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileRef_CreateForFileAPI, PP_Resource /* file_system */, std::string /* internal_path */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1192" + }, + "404AF": { + "name": "PpapiHostMsg_FileRef_MakeDirectory", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_MakeDirectory, int32_t /* make_directory_flags */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1198" + }, + "404B0": { + "name": "PpapiPluginMsg_FileRef_MakeDirectoryReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_MakeDirectoryReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1200" + }, + "404B6": { + "name": "PpapiHostMsg_FileRef_Touch", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileRef_Touch, PP_Time /* last_accessed */, PP_Time /* last_modified */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1204" + }, + "404B7": { + "name": "PpapiPluginMsg_FileRef_TouchReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_TouchReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1207" + }, + "404BB": { + "name": "PpapiHostMsg_FileRef_Delete", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_Delete)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1211" + }, + "404BC": { + "name": "PpapiPluginMsg_FileRef_DeleteReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_DeleteReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1212" + }, + "404C1": { + "name": "PpapiHostMsg_FileRef_Rename", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileRef_Rename, PP_Resource /* new_file_ref */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1216" + }, + "404C2": { + "name": "PpapiPluginMsg_FileRef_RenameReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileRef_RenameReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1218" + }, + "404C6": { + "name": "PpapiHostMsg_FileRef_Query", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_Query)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1222" + }, + "404C8": { + "name": "PpapiPluginMsg_FileRef_QueryReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileRef_QueryReply, PP_FileInfo /* file_info */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1223" + }, + "404CC": { + "name": "PpapiHostMsg_FileRef_ReadDirectoryEntries", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_ReadDirectoryEntries)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1228" + }, + "404D2": { + "name": "PpapiPluginMsg_FileRef_ReadDirectoryEntriesReply", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileRef_ReadDirectoryEntriesReply, std::vector /* files */, std::vector /* file_types */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1232" + }, + "404D6": { + "name": "PpapiHostMsg_FileRef_GetAbsolutePath", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_FileRef_GetAbsolutePath)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1238" + }, + "404D8": { + "name": "PpapiPluginMsg_FileRef_GetAbsolutePathReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileRef_GetAbsolutePathReply, std::string /* absolute_path */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1239" + }, + "404DC": { + "name": "PpapiHostMsg_FileSystem_Create", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_Create, PP_FileSystemType /* type */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1243" + }, + "404DE": { + "name": "PpapiHostMsg_FileSystem_Open", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_FileSystem_Open, int64_t /* expected_size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1245" + }, + "404DF": { + "name": "PpapiPluginMsg_FileSystem_OpenReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileSystem_OpenReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1247" + }, + "404E2": { + "name": "PpapiHostMsg_FileSystem_InitIsolatedFileSystem", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_InitIsolatedFileSystem, std::string /* fsid */, PP_IsolatedFileSystemType_Private /* type */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1248" + }, + "404E3": { + "name": "PpapiPluginMsg_FileSystem_InitIsolatedFileSystemReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_FileSystem_InitIsolatedFileSystemReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1251" + }, + "404E8": { + "name": "PpapiHostMsg_FileSystem_CreateFromRenderer", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_CreateFromRenderer, std::string /* root_url */, PP_FileSystemType /* file_system_type */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1254" + }, + "404ED": { + "name": "PpapiPluginMsg_FileSystem_CreateFromPendingHost", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_FileSystem_CreateFromPendingHost, PP_FileSystemType /* file_system_type */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1260" + }, + "404F0": { + "name": "PpapiHostMsg_FileSystem_ReserveQuota", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_FileSystem_ReserveQuota, int64_t /* amount */, ppapi::FileGrowthMap /* file_growths */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1262" + }, + "404F3": { + "name": "PpapiPluginMsg_FileSystem_ReserveQuotaReply", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_FileSystem_ReserveQuotaReply, int64_t /* amount */, ppapi::FileSizeMap /* file_sizes */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1265" + }, + "404F6": { + "name": "PpapiHostMsg_Gamepad_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1270" + }, + "404FA": { + "name": "PpapiHostMsg_Gamepad_RequestMemory", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_Gamepad_RequestMemory)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1274" + }, + "404FE": { + "name": "PpapiPluginMsg_Gamepad_SendMemory", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Gamepad_SendMemory)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1278" + }, + "40504": { + "name": "PpapiHostMsg_Graphics2D_Create", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_Create, PP_Size /* size */, PP_Bool /* is_always_opaque */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1282" + }, + "40509": { + "name": "PpapiHostMsg_Graphics2D_PaintImageData", + "definition": "IPC_MESSAGE_CONTROL4(PpapiHostMsg_Graphics2D_PaintImageData, ppapi::HostResource /* image_data */, PP_Point /* top_left */, bool /* src_rect_specified */, PP_Rect /* src_rect */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1285" + }, + "4050D": { + "name": "PpapiHostMsg_Graphics2D_Scroll", + "definition": "IPC_MESSAGE_CONTROL3(PpapiHostMsg_Graphics2D_Scroll, bool /* clip_specified */, PP_Rect /* clip */, PP_Point /* amount */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1290" + }, + "4050F": { + "name": "PpapiHostMsg_Graphics2D_ReplaceContents", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_ReplaceContents, ppapi::HostResource /* image_data */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1294" + }, + "40511": { + "name": "PpapiHostMsg_Graphics2D_SetScale", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_Graphics2D_SetScale, float /* scale */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1296" + }, + "40514": { + "name": "PpapiHostMsg_Graphics2D_SetLayerTransform", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_SetLayerTransform, float /* scale */, PP_FloatPoint /* translate */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1298" + }, + "40517": { + "name": "PpapiHostMsg_Graphics2D_Flush", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_Graphics2D_Flush)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1303" + }, + "40518": { + "name": "PpapiPluginMsg_Graphics2D_FlushAck", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_FlushAck)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1304" + }, + "4051C": { + "name": "PpapiHostMsg_Graphics2D_ReadImageData", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_Graphics2D_ReadImageData, PP_Resource /* image */, PP_Point /* top_left */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1306" + }, + "4051D": { + "name": "PpapiPluginMsg_Graphics2D_ReadImageDataAck", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_Graphics2D_ReadImageDataAck)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1309" + }, + "40520": { + "name": "PpapiHostMsg_CameraDevice_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_CameraDevice_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1312" + }, + "40521": { + "name": "PpapiHostMsg_CameraDevice_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_CameraDevice_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1313" + }, + "40524": { + "name": "PpapiHostMsg_CameraDevice_Open", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_CameraDevice_Open, std::string /* camera_source_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1315" + }, + "40525": { + "name": "PpapiPluginMsg_CameraDevice_OpenReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_CameraDevice_OpenReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1317" + }, + "4052E": { + "name": "PpapiHostMsg_IsolatedFileSystem_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_IsolatedFileSystem_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1326" + }, + "40530": { + "name": "PpapiHostMsg_IsolatedFileSystem_BrowserOpen", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_IsolatedFileSystem_BrowserOpen, PP_IsolatedFileSystemType_Private /* type */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1327" + }, + "40532": { + "name": "PpapiPluginMsg_IsolatedFileSystem_BrowserOpenReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_IsolatedFileSystem_BrowserOpenReply, std::string /* fsid */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1329" + }, + "40536": { + "name": "PpapiPluginMsg_MediaStreamAudioTrack_CreateFromPendingHost", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamAudioTrack_CreateFromPendingHost, std::string /* track_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1333" + }, + "4053A": { + "name": "PpapiPluginMsg_MediaStreamAudioTrack_ConfigureReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_MediaStreamAudioTrack_ConfigureReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1338" + }, + "4053C": { + "name": "PpapiPluginMsg_MediaStreamVideoTrack_CreateFromPendingHost", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamVideoTrack_CreateFromPendingHost, std::string /* track_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1339" + }, + "4053D": { + "name": "PpapiHostMsg_MediaStreamVideoTrack_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_MediaStreamVideoTrack_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1341" + }, + "40542": { + "name": "PpapiPluginMsg_MediaStreamVideoTrack_ConfigureReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamVideoTrack_ConfigureReply, std::string /* track_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1345" + }, + "40549": { + "name": "PpapiPluginMsg_MediaStreamTrack_InitBuffers", + "definition": "IPC_MESSAGE_CONTROL3(PpapiPluginMsg_MediaStreamTrack_InitBuffers, int32_t /* number_of_buffers */, int32_t /* buffer_size */, bool /* readonly */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1350" + }, + "4054B": { + "name": "PpapiPluginMsg_MediaStreamTrack_EnqueueBuffer", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamTrack_EnqueueBuffer, int32_t /* index */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1354" + }, + "4054D": { + "name": "PpapiHostMsg_MediaStreamTrack_EnqueueBuffer", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_MediaStreamTrack_EnqueueBuffer, int32_t /* index */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1356" + }, + "4054F": { + "name": "PpapiPluginMsg_MediaStreamTrack_EnqueueBuffers", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_MediaStreamTrack_EnqueueBuffers, std::vector /* indices */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1358" + }, + "40550": { + "name": "PpapiHostMsg_MediaStreamTrack_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_MediaStreamTrack_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1360" + }, + "40553": { + "name": "PpapiHostMsg_NetworkMonitor_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_NetworkMonitor_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1363" + }, + "40555": { + "name": "PpapiPluginMsg_NetworkMonitor_NetworkList", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_NetworkMonitor_NetworkList, ppapi::proxy::SerializedNetworkList /* network_list */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1364" + }, + "40556": { + "name": "PpapiPluginMsg_NetworkMonitor_Forbidden", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_NetworkMonitor_Forbidden)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1366" + }, + "40559": { + "name": "PpapiHostMsg_NetworkProxy_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_NetworkProxy_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1369" + }, + "4055D": { + "name": "PpapiHostMsg_NetworkProxy_GetProxyForURL", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_NetworkProxy_GetProxyForURL, std::string /* url */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1372" + }, + "40561": { + "name": "PpapiPluginMsg_NetworkProxy_GetProxyForURLReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_NetworkProxy_GetProxyForURLReply, std::string /* proxy */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1376" + }, + "40565": { + "name": "PpapiHostMsg_HostResolver_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_HostResolver_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1381" + }, + "40568": { + "name": "PpapiHostMsg_HostResolver_CreatePrivate", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_HostResolver_CreatePrivate)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1384" + }, + "4056D": { + "name": "PpapiHostMsg_HostResolver_Resolve", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_HostResolver_Resolve, ppapi::HostPortPair /* host_port */, PP_HostResolver_Private_Hint /* hint */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1387" + }, + "40574": { + "name": "PpapiPluginMsg_HostResolver_ResolveReply", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_HostResolver_ResolveReply, std::string /* canonical_name */, std::vector /* net_address_list */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1394" + }, + "40577": { + "name": "PpapiHostMsg_Printing_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1399" + }, + "40578": { + "name": "PpapiHostMsg_Printing_GetDefaultPrintSettings", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_GetDefaultPrintSettings)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1400" + }, + "4057A": { + "name": "PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_Printing_GetDefaultPrintSettingsReply, PP_PrintSettings_Dev /* print_settings */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1401" + }, + "4057F": { + "name": "PpapiHostMsg_TCPSocket_Create", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Create, ppapi::TCPSocketVersion /* version */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1406" + }, + "40582": { + "name": "PpapiHostMsg_TCPSocket_CreatePrivate", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_CreatePrivate)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1410" + }, + "40585": { + "name": "PpapiHostMsg_TCPSocket_Bind", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Bind, PP_NetAddress_Private /* net_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1412" + }, + "40587": { + "name": "PpapiPluginMsg_TCPSocket_BindReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_BindReply, PP_NetAddress_Private /* local_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1414" + }, + "4058A": { + "name": "PpapiHostMsg_TCPSocket_Connect", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPSocket_Connect, std::string /* host */, uint16_t /* port */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1416" + }, + "4058C": { + "name": "PpapiHostMsg_TCPSocket_ConnectWithNetAddress", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_ConnectWithNetAddress, PP_NetAddress_Private /* net_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1419" + }, + "4058F": { + "name": "PpapiPluginMsg_TCPSocket_ConnectReply", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_TCPSocket_ConnectReply, PP_NetAddress_Private /* local_addr */, PP_NetAddress_Private /* remote_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1421" + }, + "40594": { + "name": "PpapiHostMsg_TCPSocket_SSLHandshake", + "definition": "IPC_MESSAGE_CONTROL4(PpapiHostMsg_TCPSocket_SSLHandshake, std::string /* server_name */, uint16_t /* server_port */, std::vector > /* trusted_certs */, std::vector > /* untrusted_certs */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1424" + }, + "40596": { + "name": "PpapiPluginMsg_TCPSocket_SSLHandshakeReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_SSLHandshakeReply, ppapi::PPB_X509Certificate_Fields /* certificate_fields */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1429" + }, + "40598": { + "name": "PpapiHostMsg_TCPSocket_Read", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Read, int32_t /* bytes_to_read */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1431" + }, + "4059A": { + "name": "PpapiPluginMsg_TCPSocket_ReadReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPSocket_ReadReply, std::string /* data */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1433" + }, + "4059C": { + "name": "PpapiHostMsg_TCPSocket_Write", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Write, std::string /* data */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1435" + }, + "4059D": { + "name": "PpapiPluginMsg_TCPSocket_WriteReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_WriteReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1437" + }, + "4059F": { + "name": "PpapiHostMsg_TCPSocket_Listen", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_TCPSocket_Listen, int32_t /* backlog */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1438" + }, + "405A0": { + "name": "PpapiPluginMsg_TCPSocket_ListenReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_ListenReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1440" + }, + "405A1": { + "name": "PpapiHostMsg_TCPSocket_Accept", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_Accept)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1441" + }, + "405A5": { + "name": "PpapiPluginMsg_TCPSocket_AcceptReply", + "definition": "IPC_MESSAGE_CONTROL3(PpapiPluginMsg_TCPSocket_AcceptReply, int /* pending_host_id*/, PP_NetAddress_Private /* local_addr */, PP_NetAddress_Private /* remote_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1442" + }, + "405A6": { + "name": "PpapiHostMsg_TCPSocket_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPSocket_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1446" + }, + "405A9": { + "name": "PpapiHostMsg_TCPSocket_SetOption", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPSocket_SetOption, PP_TCPSocket_Option /* name */, ppapi::SocketOptionData /* value */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1447" + }, + "405AA": { + "name": "PpapiPluginMsg_TCPSocket_SetOptionReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_TCPSocket_SetOptionReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1450" + }, + "405AE": { + "name": "PpapiHostMsg_TCPServerSocket_CreatePrivate", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_CreatePrivate)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1454" + }, + "405B2": { + "name": "PpapiHostMsg_TCPServerSocket_Listen", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_TCPServerSocket_Listen, PP_NetAddress_Private /* addr */, int32_t /* backlog */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1456" + }, + "405B4": { + "name": "PpapiPluginMsg_TCPServerSocket_ListenReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_TCPServerSocket_ListenReply, PP_NetAddress_Private /* local_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1459" + }, + "405B5": { + "name": "PpapiHostMsg_TCPServerSocket_Accept", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_Accept)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1461" + }, + "405B9": { + "name": "PpapiPluginMsg_TCPServerSocket_AcceptReply", + "definition": "IPC_MESSAGE_CONTROL3(PpapiPluginMsg_TCPServerSocket_AcceptReply, int /* pending_resource_id */, PP_NetAddress_Private /* local_addr */, PP_NetAddress_Private /* remote_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1462" + }, + "405BA": { + "name": "PpapiHostMsg_TCPServerSocket_StopListening", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_TCPServerSocket_StopListening)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1466" + }, + "405BE": { + "name": "PpapiHostMsg_UDPSocket_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1470" + }, + "405C1": { + "name": "PpapiHostMsg_UDPSocket_CreatePrivate", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_CreatePrivate)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1473" + }, + "405C5": { + "name": "PpapiHostMsg_UDPSocket_SetOption", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_UDPSocket_SetOption, PP_UDPSocket_Option /* name */, ppapi::SocketOptionData /* value */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1475" + }, + "405C6": { + "name": "PpapiPluginMsg_UDPSocket_SetOptionReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UDPSocket_SetOptionReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1478" + }, + "405C8": { + "name": "PpapiHostMsg_UDPSocket_Bind", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_UDPSocket_Bind, PP_NetAddress_Private /* net_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1479" + }, + "405CA": { + "name": "PpapiPluginMsg_UDPSocket_BindReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_UDPSocket_BindReply, PP_NetAddress_Private /* bound_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1481" + }, + "405CE": { + "name": "PpapiPluginMsg_UDPSocket_PushRecvResult", + "definition": "IPC_MESSAGE_CONTROL3(PpapiPluginMsg_UDPSocket_PushRecvResult, int32_t /* result */, std::string /* data */, PP_NetAddress_Private /* remote_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1483" + }, + "405CF": { + "name": "PpapiHostMsg_UDPSocket_RecvSlotAvailable", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_RecvSlotAvailable)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1487" + }, + "405D2": { + "name": "PpapiHostMsg_UDPSocket_SendTo", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_UDPSocket_SendTo, std::string /* data */, PP_NetAddress_Private /* net_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1488" + }, + "405D4": { + "name": "PpapiPluginMsg_UDPSocket_SendToReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_UDPSocket_SendToReply, int32_t /* bytes_written */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1491" + }, + "405D5": { + "name": "PpapiHostMsg_UDPSocket_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_UDPSocket_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1493" + }, + "405D7": { + "name": "PpapiHostMsg_UDPSocket_JoinGroup", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_UDPSocket_JoinGroup, PP_NetAddress_Private /* net_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1494" + }, + "405D8": { + "name": "PpapiPluginMsg_UDPSocket_JoinGroupReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UDPSocket_JoinGroupReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1496" + }, + "405DA": { + "name": "PpapiHostMsg_UDPSocket_LeaveGroup", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_UDPSocket_LeaveGroup, PP_NetAddress_Private /* net_addr */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1497" + }, + "405DB": { + "name": "PpapiPluginMsg_UDPSocket_LeaveGroupReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_UDPSocket_LeaveGroupReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1499" + }, + "405DF": { + "name": "PpapiHostMsg_URLLoader_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1503" + }, + "405E4": { + "name": "PpapiHostMsg_URLLoader_Open", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_Open, ppapi::URLRequestInfoData /* request_data */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1507" + }, + "405F1": { + "name": "PpapiHostMsg_URLLoader_SetDeferLoading", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_URLLoader_SetDeferLoading, bool /* defers_loading */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1520" + }, + "405F4": { + "name": "PpapiHostMsg_URLLoader_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1524" + }, + "405F9": { + "name": "PpapiHostMsg_URLLoader_GrantUniversalAccess", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_URLLoader_GrantUniversalAccess)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1529" + }, + "405FD": { + "name": "PpapiPluginMsg_URLLoader_ReceivedResponse", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_ReceivedResponse, ppapi::URLResponseInfoData /* response */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1532" + }, + "40602": { + "name": "PpapiPluginMsg_URLLoader_SendData", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_URLLoader_SendData)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1538" + }, + "40608": { + "name": "PpapiPluginMsg_URLLoader_FinishedLoading", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_URLLoader_FinishedLoading, int32_t /* result */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1543" + }, + "40612": { + "name": "PpapiPluginMsg_URLLoader_UpdateProgress", + "definition": "IPC_MESSAGE_CONTROL4(PpapiPluginMsg_URLLoader_UpdateProgress, int64_t /* bytes_sent */, int64_t /* total_bytes_to_be_sent */, int64_t /* bytes_received */, int64_t /* total_bytes_to_be_received */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1550" + }, + "4061E": { + "name": "PpapiHostMsg_SharedMemory_CreateSharedMemory", + "definition": "IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory, PP_Instance /* instance */, uint32_t /* size */, int /* host_handle_id */, ppapi::proxy::SerializedHandle /* plugin_handle */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1562" + }, + "40621": { + "name": "PpapiHostMsg_VpnProvider_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VpnProvider_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1569" + }, + "40626": { + "name": "PpapiHostMsg_VpnProvider_Bind", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_VpnProvider_Bind, std::string /* configuration_id */, std::string /* configuration_name */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1572" + }, + "4062A": { + "name": "PpapiPluginMsg_VpnProvider_BindReply", + "definition": "IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VpnProvider_BindReply, uint32_t /* queue_size */, uint32_t /* max_packet_size */, int32_t /* status */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1575" + }, + "4062D": { + "name": "PpapiHostMsg_VpnProvider_SendPacket", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_VpnProvider_SendPacket, uint32_t /* packet_size */, uint32_t /* id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1579" + }, + "4062F": { + "name": "PpapiPluginMsg_VpnProvider_SendPacketReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VpnProvider_SendPacketReply, uint32_t /* id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1582" + }, + "40632": { + "name": "PpapiPluginMsg_VpnProvider_OnUnbind", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VpnProvider_OnUnbind)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1586" + }, + "40637": { + "name": "PpapiPluginMsg_VpnProvider_OnPacketReceived", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_VpnProvider_OnPacketReceived, uint32_t /* packet_size */, uint32_t /* id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1589" + }, + "40639": { + "name": "PpapiHostMsg_VpnProvider_OnPacketReceivedReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_VpnProvider_OnPacketReceivedReply, uint32_t /* id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1592" + }, + "4063D": { + "name": "PpapiHostMsg_WebSocket_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1597" + }, + "40643": { + "name": "PpapiHostMsg_WebSocket_Connect", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Connect, std::string /* url */, std::vector /* protocols */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1601" + }, + "40649": { + "name": "PpapiHostMsg_WebSocket_Close", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_WebSocket_Close, int32_t /* code */, std::string /* reason */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1607" + }, + "4064D": { + "name": "PpapiHostMsg_WebSocket_SendText", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendText, std::string /* message */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1612" + }, + "40651": { + "name": "PpapiHostMsg_WebSocket_SendBinary", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_SendBinary, std::vector /* message */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1616" + }, + "40656": { + "name": "PpapiHostMsg_WebSocket_Fail", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_WebSocket_Fail, std::string /* message */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1621" + }, + "40661": { + "name": "PpapiPluginMsg_WebSocket_ConnectReply", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_WebSocket_ConnectReply, std::string /* url */, std::string /* protocol */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1631" + }, + "4066C": { + "name": "PpapiPluginMsg_WebSocket_CloseReply", + "definition": "IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_CloseReply, uint64_t /* buffered_amount */, bool /* was_clean */, uint16_t /* code */, std::string /* reason */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1640" + }, + "40670": { + "name": "PpapiPluginMsg_WebSocket_ReceiveTextReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveTextReply, std::string /* message */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1647" + }, + "40674": { + "name": "PpapiPluginMsg_WebSocket_ReceiveBinaryReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_ReceiveBinaryReply, std::vector /* message */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1651" + }, + "40677": { + "name": "PpapiPluginMsg_WebSocket_ErrorReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_WebSocket_ErrorReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1655" + }, + "4067B": { + "name": "PpapiPluginMsg_WebSocket_BufferedAmountReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_BufferedAmountReply, uint64_t /* buffered_amount */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1658" + }, + "40680": { + "name": "PpapiPluginMsg_WebSocket_StateReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_WebSocket_StateReply, int32_t /* state */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1663" + }, + "40689": { + "name": "PpapiPluginMsg_WebSocket_ClosedReply", + "definition": "IPC_MESSAGE_CONTROL4(PpapiPluginMsg_WebSocket_ClosedReply, uint64_t /* buffered_amount */, bool /* was_clean */, uint16_t /* code */, std::string /* reason */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1669" + }, + "4068D": { + "name": "PpapiHostMsg_VideoDecoder_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1677" + }, + "40692": { + "name": "PpapiHostMsg_VideoDecoder_Initialize", + "definition": "IPC_MESSAGE_CONTROL4(PpapiHostMsg_VideoDecoder_Initialize, ppapi::HostResource /* graphics_context */, PP_VideoProfile /* profile */, PP_HardwareAcceleration /* acceleration */, uint32_t /* min_picture_count */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1678" + }, + "40693": { + "name": "PpapiPluginMsg_VideoDecoder_InitializeReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_InitializeReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1683" + }, + "40696": { + "name": "PpapiHostMsg_VideoDecoder_GetShm", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDecoder_GetShm, uint32_t /* shm_id */, uint32_t /* shm_size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1684" + }, + "40699": { + "name": "PpapiPluginMsg_VideoDecoder_GetShmReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_GetShmReply, uint32_t /* shm_size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1688" + }, + "4069D": { + "name": "PpapiHostMsg_VideoDecoder_Decode", + "definition": "IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoDecoder_Decode, uint32_t /* shm_id */, uint32_t /* size */, int32_t /* decode_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1690" + }, + "4069F": { + "name": "PpapiPluginMsg_VideoDecoder_DecodeReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_DecodeReply, uint32_t /* shm_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1694" + }, + "406A4": { + "name": "PpapiPluginMsg_VideoDecoder_SharedImageReady", + "definition": "IPC_MESSAGE_CONTROL4(PpapiPluginMsg_VideoDecoder_SharedImageReady, int32_t /* decode_id */, gpu::Mailbox /* mailbox */, PP_Size /* size */, PP_Rect /* visible_rect */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1696" + }, + "406A6": { + "name": "PpapiHostMsg_VideoDecoder_RecycleSharedImage", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoDecoder_RecycleSharedImage, gpu::Mailbox /* mailbox */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1701" + }, + "406A7": { + "name": "PpapiHostMsg_VideoDecoder_Flush", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Flush)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1703" + }, + "406A8": { + "name": "PpapiPluginMsg_VideoDecoder_FlushReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_FlushReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1704" + }, + "406A9": { + "name": "PpapiHostMsg_VideoDecoder_Reset", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDecoder_Reset)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1705" + }, + "406AA": { + "name": "PpapiPluginMsg_VideoDecoder_ResetReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDecoder_ResetReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1706" + }, + "406AC": { + "name": "PpapiPluginMsg_VideoDecoder_NotifyError", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoDecoder_NotifyError, int32_t /* error */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1707" + }, + "406B0": { + "name": "PpapiHostMsg_VideoEncoder_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoEncoder_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1712" + }, + "406B1": { + "name": "PpapiHostMsg_VideoEncoder_GetSupportedProfiles", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoEncoder_GetSupportedProfiles)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1713" + }, + "406B3": { + "name": "PpapiPluginMsg_VideoEncoder_GetSupportedProfilesReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoEncoder_GetSupportedProfilesReply, std::vector /* results */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1714" + }, + "406B9": { + "name": "PpapiHostMsg_VideoEncoder_Initialize", + "definition": "IPC_MESSAGE_CONTROL5(PpapiHostMsg_VideoEncoder_Initialize, PP_VideoFrame_Format /* input_format */, PP_Size /* input_visible_size */, PP_VideoProfile /* output_profile */, uint32_t /* initial_bitrate */, PP_HardwareAcceleration /* acceleration */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1716" + }, + "406BC": { + "name": "PpapiPluginMsg_VideoEncoder_InitializeReply", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_VideoEncoder_InitializeReply, uint32_t /* input_frame_count */, PP_Size /* input_coded_size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1722" + }, + "406BE": { + "name": "PpapiPluginMsg_VideoEncoder_BitstreamBuffers", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoEncoder_BitstreamBuffers, uint32_t /* buffer_length */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1725" + }, + "406BF": { + "name": "PpapiHostMsg_VideoEncoder_GetVideoFrames", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoEncoder_GetVideoFrames)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1727" + }, + "406C3": { + "name": "PpapiPluginMsg_VideoEncoder_GetVideoFramesReply", + "definition": "IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoEncoder_GetVideoFramesReply, uint32_t /* frame_count */, uint32_t /* frame_length */, PP_Size /* frame_size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1728" + }, + "406C6": { + "name": "PpapiHostMsg_VideoEncoder_Encode", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoEncoder_Encode, uint32_t /* frame_id */, bool /* force_keyframe */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1732" + }, + "406C8": { + "name": "PpapiPluginMsg_VideoEncoder_EncodeReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoEncoder_EncodeReply, uint32_t /* frame_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1735" + }, + "406CC": { + "name": "PpapiPluginMsg_VideoEncoder_BitstreamBufferReady", + "definition": "IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoEncoder_BitstreamBufferReady, uint32_t /* buffer_id */, uint32_t /* buffer_size */, bool /* key_frame */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1737" + }, + "406CE": { + "name": "PpapiHostMsg_VideoEncoder_RecycleBitstreamBuffer", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoEncoder_RecycleBitstreamBuffer, uint32_t /* buffer_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1741" + }, + "406D1": { + "name": "PpapiHostMsg_VideoEncoder_RequestEncodingParametersChange", + "definition": "IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoEncoder_RequestEncodingParametersChange, uint32_t /* bitrate */, uint32_t /* framerate */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1743" + }, + "406D3": { + "name": "PpapiPluginMsg_VideoEncoder_NotifyError", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoEncoder_NotifyError, int32_t /* error */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1746" + }, + "406D4": { + "name": "PpapiHostMsg_VideoEncoder_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoEncoder_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1748" + }, + "406D9": { + "name": "PpapiHostMsg_AudioInput_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1753" + }, + "406DD": { + "name": "PpapiHostMsg_AudioInput_Open", + "definition": "IPC_MESSAGE_CONTROL3(PpapiHostMsg_AudioInput_Open, std::string /* device_id */, PP_AudioSampleRate /* sample_rate */, uint32_t /* sample_frame_count */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1754" + }, + "406E0": { + "name": "PpapiPluginMsg_AudioInput_OpenReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_AudioInput_OpenReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1760" + }, + "406E1": { + "name": "PpapiHostMsg_AudioInput_StartOrStop", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_AudioInput_StartOrStop, bool /* capture */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1761" + }, + "406E2": { + "name": "PpapiHostMsg_AudioInput_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioInput_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1762" + }, + "406E5": { + "name": "PpapiHostMsg_AudioOutput_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioOutput_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1765" + }, + "406E9": { + "name": "PpapiHostMsg_AudioOutput_Open", + "definition": "IPC_MESSAGE_CONTROL3(PpapiHostMsg_AudioOutput_Open, std::string /* device_id */, PP_AudioSampleRate /* sample_rate */, uint32_t /* sample_frame_count */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1766" + }, + "406EC": { + "name": "PpapiPluginMsg_AudioOutput_OpenReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_AudioOutput_OpenReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1772" + }, + "406ED": { + "name": "PpapiHostMsg_AudioOutput_StartOrStop", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_AudioOutput_StartOrStop, bool /* playback */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1773" + }, + "406EE": { + "name": "PpapiHostMsg_AudioOutput_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_AudioOutput_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1774" + }, + "406F2": { + "name": "PpapiHostMsg_BrowserFontSingleton_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_BrowserFontSingleton_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1778" + }, + "406F6": { + "name": "PpapiHostMsg_BrowserFontSingleton_GetFontFamilies", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_BrowserFontSingleton_GetFontFamilies)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1782" + }, + "406FC": { + "name": "PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply, std::string /* families */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1787" + }, + "40700": { + "name": "PpapiHostMsg_DeviceEnumeration_EnumerateDevices", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_DeviceEnumeration_EnumerateDevices)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1792" + }, + "40702": { + "name": "PpapiPluginMsg_DeviceEnumeration_EnumerateDevicesReply", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_DeviceEnumeration_EnumerateDevicesReply, std::vector /* devices */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1793" + }, + "40704": { + "name": "PpapiHostMsg_DeviceEnumeration_MonitorDeviceChange", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_DeviceEnumeration_MonitorDeviceChange, uint32_t /* callback_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1795" + }, + "40705": { + "name": "PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1797" + }, + "40708": { + "name": "PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange", + "definition": "IPC_MESSAGE_CONTROL2(PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange, uint32_t /* callback_id */, std::vector /* devices */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1798" + }, + "4070D": { + "name": "PpapiHostMsg_VideoCapture_Create", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_Create)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1805" + }, + "4070E": { + "name": "PpapiHostMsg_VideoCapture_StartCapture", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_StartCapture)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1806" + }, + "40710": { + "name": "PpapiHostMsg_VideoCapture_ReuseBuffer", + "definition": "IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoCapture_ReuseBuffer, uint32_t /* buffer */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1807" + }, + "40711": { + "name": "PpapiHostMsg_VideoCapture_StopCapture", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_StopCapture)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1809" + }, + "40712": { + "name": "PpapiHostMsg_VideoCapture_Close", + "definition": "IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoCapture_Close)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1810" + }, + "40718": { + "name": "PpapiHostMsg_VideoCapture_Open", + "definition": "IPC_MESSAGE_CONTROL3(PpapiHostMsg_VideoCapture_Open, std::string /* device_id */, PP_VideoCaptureDeviceInfo_Dev /* requested_info */, uint32_t /* buffer_count */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1813" + }, + "40719": { + "name": "PpapiPluginMsg_VideoCapture_OpenReply", + "definition": "IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoCapture_OpenReply)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1817" + }, + "4071F": { + "name": "PpapiPluginMsg_VideoCapture_OnDeviceInfo", + "definition": "IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoCapture_OnDeviceInfo, PP_VideoCaptureDeviceInfo_Dev /* info */, std::vector /* buffers */, uint32_t /* buffer_size */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1820" + }, + "40721": { + "name": "PpapiPluginMsg_VideoCapture_OnStatus", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnStatus, uint32_t /* status */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1824" + }, + "40723": { + "name": "PpapiPluginMsg_VideoCapture_OnError", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnError, uint32_t /* error */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1826" + }, + "40725": { + "name": "PpapiPluginMsg_VideoCapture_OnBufferReady", + "definition": "IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnBufferReady, uint32_t /* buffer */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:ppapi/proxy/ppapi_messages.h;l=1828" + }, + "70046": { + "name": "NaClHostMsg_LaunchNaCl", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_2(NaClHostMsg_LaunchNaCl, nacl::NaClLaunchParams /* launch_params */, nacl::NaClLaunchResult /* launch_result */, std::string /* error_message */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=67" + }, + "7004F": { + "name": "NaClHostMsg_GetReadonlyPnaclFD", + "definition": "IPC_SYNC_MESSAGE_CONTROL2_3(NaClHostMsg_GetReadonlyPnaclFD, std::string /* name of requested PNaCl file */, bool /* is_executable */, IPC::PlatformFileForTransit /* output file */, uint64_t /* file_token_lo */, uint64_t /* file_token_hi */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=74" + }, + "70054": { + "name": "NaClHostMsg_NaClCreateTemporaryFile", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_1(NaClHostMsg_NaClCreateTemporaryFile, IPC::PlatformFileForTransit /* out file */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=83" + }, + "7005A": { + "name": "NaClHostMsg_NexeTempFileRequest", + "definition": "IPC_MESSAGE_CONTROL2(NaClHostMsg_NexeTempFileRequest, int /* instance */, nacl::PnaclCacheInfo /* cache info */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=88" + }, + "70062": { + "name": "NaClViewMsg_NexeTempFileReply", + "definition": "IPC_MESSAGE_CONTROL3(NaClViewMsg_NexeTempFileReply, int /* instance */, bool /* is_cache_hit */, IPC::PlatformFileForTransit /* output file */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=95" + }, + "70068": { + "name": "NaClHostMsg_ReportTranslationFinished", + "definition": "IPC_MESSAGE_CONTROL2(NaClHostMsg_ReportTranslationFinished, int /* instance */, bool /* success */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=102" + }, + "7006C": { + "name": "NaClHostMsg_MissingArchError", + "definition": "IPC_MESSAGE_CONTROL1(NaClHostMsg_MissingArchError, int /* render_frame_id */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=108" + }, + "70075": { + "name": "NaClHostMsg_OpenNaClExecutable", + "definition": "IPC_SYNC_MESSAGE_CONTROL2_3(NaClHostMsg_OpenNaClExecutable, int /* render_frame_id */, GURL /* URL of NaCl executable file */, IPC::PlatformFileForTransit /* output file */, uint64_t /* file_token_lo */, uint64_t /* file_token_hi */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=112" + }, + "7007A": { + "name": "NaClHostMsg_NaClGetNumProcessors", + "definition": "IPC_SYNC_MESSAGE_CONTROL0_1(NaClHostMsg_NaClGetNumProcessors, int /* Number of processors */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=121" + }, + "70081": { + "name": "NaClHostMsg_NaClDebugEnabledForURL", + "definition": "IPC_SYNC_MESSAGE_CONTROL1_1(NaClHostMsg_NaClDebugEnabledForURL, GURL /* alleged URL of NMF file */, bool /* should debug */)", + "link": "https://source.chromium.org/chromium/chromium/src/+/14f98e519099bc5d4beb1c54e49807a284fe3e63:components/nacl/common/nacl_host_messages.h;l=127" + } +} \ No newline at end of file diff --git a/dissectors/chromium-ipc/helpers/mojo_interfaces.json b/dissectors/chromium-ipc/helpers/mojo_interfaces.json new file mode 100644 index 0000000..92db0e2 --- /dev/null +++ b/dissectors/chromium-ipc/helpers/mojo_interfaces.json @@ -0,0 +1,34678 @@ +{ + "metadata": { + "version": "143.0.7499.41", + "commit": "09d0e08b622603fde13600b061231d0f1e54957e" + }, + "cc.mojom.BrowserControlsOffsetTagModifications": { + "definition": "struct BrowserControlsOffsetTagModifications { BrowserControlsOffsetTags tags; int32 top_controls_additional_height; int32 bottom_controls_additional_height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/browser_controls_offset_tag_modifications.mojom;l=10" + }, + "cc.mojom.BrowserControlsOffsetTags": { + "definition": "struct BrowserControlsOffsetTags { viz.mojom.OffsetTag top_controls_offset_tag; viz.mojom.OffsetTag content_offset_tag; viz.mojom.OffsetTag bottom_controls_offset_tag;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/browser_controls_offset_tags.mojom;l=10" + }, + "cc.mojom.BrowserControlsParams": { + "definition": "struct BrowserControlsParams { float top_controls_height = 0.0; float top_controls_min_height = 0.0; float bottom_controls_height = 0.0; float bottom_controls_min_height = 0.0; bool animate_browser_controls_height_changes = false; bool browser_controls_shrink_blink_size = false; bool only_expand_top_controls_at_page_top = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/browser_controls_params.mojom;l=7" + }, + "cc.mojom.BrowserControlsState": { + "definition": "enum BrowserControlsState;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/browser_controls_state.mojom;l=8" + }, + "cc.mojom.ElementId": { + "definition": "struct ElementId { uint64 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/element_id.mojom;l=8" + }, + "cc.mojom.HitTestOpaqueness": { + "definition": "enum HitTestOpaqueness { kTransparent, kMixed, kOpaque,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/hit_test_opaqueness.mojom;l=9" + }, + "cc.mojom.LayerSelectionBound": { + "definition": "struct LayerSelectionBound { gfx.mojom.SelectionBoundType type; gfx.mojom.Point edge_start; gfx.mojom.Point edge_end; int32 layer_id; bool hidden;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/layer_selection_bound.mojom;l=11" + }, + "cc.mojom.LayerSelection": { + "definition": "struct LayerSelection { LayerSelectionBound start; LayerSelectionBound end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/layer_selection_bound.mojom;l=22" + }, + "cc.mojom.LayerTreeDebugState": { + "definition": "struct LayerTreeDebugState { bool debugger_paused; bool show_fps_counter; bool show_render_pass_borders; bool show_surface_borders; bool show_layer_borders; bool show_layout_shift_regions; bool show_paint_rects; bool show_property_changed_rects; bool show_surface_damage_rects; bool show_screen_space_rects; bool show_touch_event_handler_rects; bool show_wheel_event_handler_rects; bool show_scroll_event_handler_rects; bool show_main_thread_scroll_hit_test_rects; bool show_main_thread_scroll_repaint_rects; bool show_raster_inducing_scroll_rects; bool show_layer_animation_bounds_rects; int32 slow_down_raster_scale_factor; bool rasterize_only_visible_content; bool highlight_non_lcd_text_layers; bool record_rendering_stats;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/layer_tree_debug_state.mojom;l=8" + }, + "cc.mojom.LayerType": { + "definition": "enum LayerType { kLayer, kSolidColor, kTexture, kSurface, kPicture, kTileDisplay, kMirror, kHeadsUpDisplay, kUIResource, kNinePatch, kSolidColorScrollbar, kPaintedScrollbar, kNinePatchThumbScrollbar, kVideo, kViewTransitionContent,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/layer_type.mojom;l=8" + }, + "cc.mojom.MissingTileReason": { + "definition": "enum MissingTileReason { kOutOfMemory, kResourceNotReady, kTileDeleted,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/missing_tile_reason.mojom;l=13" + }, + "cc.mojom.OverscrollBehavior": { + "definition": "struct OverscrollBehavior;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/overscroll_behavior.mojom;l=8" + }, + "cc.mojom.DynamicRangeLimit": { + "definition": "struct DynamicRangeLimit { float standard_mix; float constrained_high_mix;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/paint_flags.mojom;l=14" + }, + "cc.mojom.FilterQuality": { + "definition": "enum FilterQuality { kNone, kLow, kMedium, kHigh,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/paint_flags.mojom;l=7" + }, + "cc.mojom.RenderFrameMetadataObserver.ReportAllFrameSubmissionsForTesting": { + "definition": "ReportAllFrameSubmissionsForTesting(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/render_frame_metadata.mojom;l=161" + }, + "cc.mojom.RenderFrameMetadataObserverClient.OnRenderFrameMetadataChanged": { + "definition": "OnRenderFrameMetadataChanged( uint32 frame_token, RenderFrameMetadata metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/render_frame_metadata.mojom;l=171" + }, + "cc.mojom.RenderFrameMetadataObserverClient.OnFrameSubmissionForTesting": { + "definition": "OnFrameSubmissionForTesting(uint32 frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/render_frame_metadata.mojom;l=175" + }, + "cc.mojom.DelegatedInkBrowserMetadata": { + "definition": "struct DelegatedInkBrowserMetadata { bool delegated_ink_is_hovering;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/render_frame_metadata.mojom;l=15" + }, + "cc.mojom.RenderFrameMetadata": { + "definition": "struct RenderFrameMetadata { skia.mojom.SkColor4f root_background_color; gfx.mojom.PointF? root_scroll_offset; bool is_scroll_offset_at_top; viz.mojom.Selection selection; bool is_mobile_optimized; DelegatedInkBrowserMetadata? delegated_ink_metadata; float device_scale_factor; gfx.mojom.Size viewport_size_in_pixels; viz.mojom.LocalSurfaceId? local_surface_id; float page_scale_factor; float external_page_scale_factor; float top_controls_height; float top_controls_shown_ratio; viz.mojom.VerticalScrollDirection new_vertical_scroll_direction; int64 primary_main_frame_item_sequence_number; [EnableIf=is_android|is_ios] float bottom_controls_height; [EnableIf=is_android|is_ios] float bottom_controls_shown_ratio; [EnableIf=is_android|is_ios] float top_controls_min_height_offset; [EnableIf=is_android|is_ios] float bottom_controls_min_height_offset; [EnableIf=is_android|is_ios] float min_page_scale_factor; [EnableIf=is_android|is_ios] float max_page_scale_factor; [EnableIf=is_android|is_ios] bool root_overflow_y_hidden; [EnableIf=is_android|is_ios] gfx.mojom.SizeF scrollable_viewport_size; [EnableIf=is_android|is_ios] gfx.mojom.SizeF root_layer_size; [EnableIf=is_android|is_ios] bool has_transparent_background;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/render_frame_metadata.mojom;l=26" + }, + "cc.mojom.RootScrollOffsetUpdateFrequency": { + "definition": "enum RootScrollOffsetUpdateFrequency { kNone, kOnScrollEnd, kAllUpdates,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/render_frame_metadata.mojom;l=122" + }, + "cc.mojom.RenderSurfaceReason": { + "definition": "enum RenderSurfaceReason { kNone, kRoot, k3dTransformFlattening, kBackdropScope, kBlendMode, kBlendModeDstIn, kOpacity, kOpacityAnimation, kFilter, kFilterAnimation, kBackdropFilter, kBackdropFilterAnimation, kRoundedCorner, kClipPath, kClipAxisAlignment, kMask, kTrilinearFiltering, kCache, kCopyRequest, kMirrored, kSubtreeIsBeingCaptured, kViewTransitionParticipant, kGradientMask, k2DScaleTransformWithCompositedDescendants, kTest,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/render_surface_reason.mojom;l=10" + }, + "cc.mojom.ScrollbarAnimator": { + "definition": "enum ScrollbarAnimator { kNoAnimator, kAndroidOverlay, kAuraOverlay,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/scrollbar_animator.mojom;l=8" + }, + "cc.mojom.SyncedScrollOffset": { + "definition": "struct SyncedScrollOffset { gfx.mojom.PointF scroll_offset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/synced_scroll_offset.mojom;l=10" + }, + "cc.mojom.TouchAction": { + "definition": "enum TouchAction;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/touch_action.mojom;l=8" + }, + "cc.mojom.UIResourceId": { + "definition": "struct UIResourceId { int32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:cc/mojom/ui_resource_id.mojom;l=7" + }, + "actor.ui.mojom.ActorOverlayPageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_remote page, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/actor/ui/actor_overlay.mojom;l=14" + }, + "actor.ui.mojom.ActorOverlayPageHandler.OnHoverStatusChanged": { + "definition": "OnHoverStatusChanged(bool is_hovering);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/actor/ui/actor_overlay.mojom;l=22" + }, + "actor.ui.mojom.ActorOverlayPageHandler.GetCurrentBorderGlowVisibility": { + "definition": "GetCurrentBorderGlowVisibility() => (bool is_visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/actor/ui/actor_overlay.mojom;l=25" + }, + "actor.ui.mojom.ActorOverlayPage.SetScrimBackground": { + "definition": "SetScrimBackground(bool is_visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/actor/ui/actor_overlay.mojom;l=32" + }, + "actor.ui.mojom.ActorOverlayPage.SetBorderGlowVisibility": { + "definition": "SetBorderGlowVisibility(bool is_visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/actor/ui/actor_overlay.mojom;l=35" + }, + "borealis.mojom.InstallResult": { + "definition": "enum InstallResult { kSuccess = 0, kCancelled = 1, kBorealisNotAllowed = 2, kBorealisInstallInProgress = 3, kDlcInternalError = 4, kDlcUnsupportedError = 5, kDlcBusyError = 6, kDlcNeedRebootError = 7, kDlcNeedSpaceError = 8, kDlcUnknownError = 9, kOffline = 10, kDlcNeedUpdateError = 11, kStartupFailed = 12, kMainAppNotPresent = 13,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/ash/borealis/borealis_types.mojom;l=9" + }, + "crostini.mojom.DiskSliderTick": { + "definition": "struct DiskSliderTick { int64 value; string label; string aria_value; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/ash/crostini/crostini_types.mojom;l=42" + }, + "crostini.mojom.InstallerState": { + "definition": "enum InstallerState { kStart = 0, kInstallImageLoader = 1, kCreateDiskImage = 2, kStartTerminaVm = 3, kStartLxd = 4, kCreateContainer = 5, kSetupContainer = 6, kStartContainer = 7, kFetchSshKeys_DEPRECATED = 8, kMountContainer_DEPRECATED = 9, kConfigureContainer = 10, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/ash/crostini/crostini_types.mojom;l=10" + }, + "crostini.mojom.InstallerError": { + "definition": "enum InstallerError { kNone, kErrorLoadingTermina, kNeedUpdate, kErrorCreatingDiskImage, kErrorStartingTermina, kErrorStartingLxd, kErrorStartingContainer, kErrorOffline, kErrorSettingUpContainer, kErrorInsufficientDiskSpace, kErrorConfiguringContainer, kErrorCreateContainer, kErrorUnknown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/ash/crostini/crostini_types.mojom;l=24" + }, + "guest_os.mojom.DiagnosticMessage": { + "definition": "struct DiagnosticMessage { string message; url.mojom.Url? learn_more_link;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/ash/guest_os/guest_os_diagnostics.mojom;l=9" + }, + "guest_os.mojom.DiagnosticEntry": { + "definition": "struct DiagnosticEntry { string requirement; Status status; DiagnosticMessage? explanation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/ash/guest_os/guest_os_diagnostics.mojom;l=14" + }, + "guest_os.mojom.Diagnostics": { + "definition": "struct Diagnostics { array entries; DiagnosticMessage? top_error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/ash/guest_os/guest_os_diagnostics.mojom;l=26" + }, + "guest_os.mojom.Status": { + "definition": "enum Status { kPass, kFail, kNotApplicable, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/ash/guest_os/guest_os_diagnostics.mojom;l=15" + }, + "contextual_tasks.mojom.PageHandler.GetThreadUrl": { + "definition": "GetThreadUrl() => (url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/contextual_tasks/contextual_tasks.mojom;l=16" + }, + "contextual_tasks.mojom.PageHandler.GetUrlForTask": { + "definition": "GetUrlForTask(mojo_base.mojom.Uuid uuid) => (url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/contextual_tasks/contextual_tasks.mojom;l=21" + }, + "contextual_tasks.mojom.PageHandler.SetTaskId": { + "definition": "SetTaskId(mojo_base.mojom.Uuid uuid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/contextual_tasks/contextual_tasks.mojom;l=24" + }, + "contextual_tasks.mojom.PageHandler.SetThreadTitle": { + "definition": "SetThreadTitle(string title);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/contextual_tasks/contextual_tasks.mojom;l=27" + }, + "contextual_tasks.mojom.PageHandler.ShowUi": { + "definition": "ShowUi();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/contextual_tasks/contextual_tasks.mojom;l=30" + }, + "contextual_tasks.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler( pending_remote page, pending_receiver page_handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/contextual_tasks/contextual_tasks.mojom;l=43" + }, + "glic.mojom.FrePageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=12" + }, + "glic.mojom.FrePageHandler.AcceptFre": { + "definition": "AcceptFre();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=19" + }, + "glic.mojom.FrePageHandler.RejectFre": { + "definition": "RejectFre();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=22" + }, + "glic.mojom.FrePageHandler.DismissFre": { + "definition": "DismissFre(FreWebUiState panel);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=26" + }, + "glic.mojom.FrePageHandler.FreReloaded": { + "definition": "FreReloaded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=29" + }, + "glic.mojom.FrePageHandler.PrepareForClient": { + "definition": "PrepareForClient() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=34" + }, + "glic.mojom.FrePageHandler.ValidateAndOpenLinkInNewTab": { + "definition": "ValidateAndOpenLinkInNewTab(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=38" + }, + "glic.mojom.FrePageHandler.WebUiStateChanged": { + "definition": "WebUiStateChanged(FreWebUiState new_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=41" + }, + "glic.mojom.FrePageHandler.ExceededTimeoutError": { + "definition": "ExceededTimeoutError();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=45" + }, + "glic.mojom.FrePageHandler.LogWebUiLoadComplete": { + "definition": "LogWebUiLoadComplete();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=50" + }, + "glic.mojom.FreWebUiState": { + "definition": "enum FreWebUiState { kUninitialized, kBeginLoading, kShowLoading, kHoldLoading, kFinishLoading, kError, kOffline, kReady, kDisabledByAdmin,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/fre/glic_fre.mojom;l=54" + }, + "glic.mojom.Page.IntentToShow": { + "definition": "IntentToShow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=43" + }, + "glic.mojom.Page.SetProfileReadyState": { + "definition": "SetProfileReadyState(ProfileReadyState ready_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=47" + }, + "glic.mojom.Page.UpdatePageState": { + "definition": "UpdatePageState(PanelStateKind panelStateKind);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=50" + }, + "glic.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler( pending_receiver receiver, pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=56" + }, + "glic.mojom.PageHandler.CreateWebClient": { + "definition": "CreateWebClient(pending_receiver web_client_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=124" + }, + "glic.mojom.PageHandler.PrepareForClient": { + "definition": "PrepareForClient() => (PrepareForClientResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=129" + }, + "glic.mojom.PageHandler.WebviewCommitted": { + "definition": "WebviewCommitted(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=132" + }, + "glic.mojom.PageHandler.ClosePanel": { + "definition": "ClosePanel() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=135" + }, + "glic.mojom.PageHandler.OpenProfilePickerAndClosePanel": { + "definition": "OpenProfilePickerAndClosePanel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=138" + }, + "glic.mojom.PageHandler.OpenDisabledByAdminLinkAndClosePanel": { + "definition": "OpenDisabledByAdminLinkAndClosePanel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=141" + }, + "glic.mojom.PageHandler.SignInAndClosePanel": { + "definition": "SignInAndClosePanel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=144" + }, + "glic.mojom.PageHandler.ResizeWidget": { + "definition": "ResizeWidget(gfx.mojom.Size size, mojo_base.mojom.TimeDelta duration) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=148" + }, + "glic.mojom.PageHandler.EnableDragResize": { + "definition": "EnableDragResize(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=152" + }, + "glic.mojom.PageHandler.WebUiStateChanged": { + "definition": "WebUiStateChanged(WebUiState new_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=155" + }, + "glic.mojom.PinCandidatesObserver.OnPinCandidatesChanged": { + "definition": "OnPinCandidatesChanged(array candidates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=514" + }, + "glic.mojom.WebClientHandler.WebClientCreated": { + "definition": "WebClientCreated(pending_remote web_client) => (WebClientInitialState initial_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=524" + }, + "glic.mojom.WebClientHandler.WebClientInitialized": { + "definition": "WebClientInitialized();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=530" + }, + "glic.mojom.WebClientHandler.WebClientInitializeFailed": { + "definition": "WebClientInitializeFailed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=533" + }, + "glic.mojom.WebClientHandler.CreateTab": { + "definition": "CreateTab(url.mojom.Url url, bool open_in_background, int32? window_id) => (TabData? tab_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=538" + }, + "glic.mojom.WebClientHandler.OpenLinkInPopup": { + "definition": "OpenLinkInPopup(url.mojom.Url url, int32 popup_width, int32 popup_height);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=542" + }, + "glic.mojom.WebClientHandler.OpenGlicSettingsPage": { + "definition": "OpenGlicSettingsPage(OpenSettingsOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=545" + }, + "glic.mojom.WebClientHandler.OpenPasswordManagerSettingsPage": { + "definition": "OpenPasswordManagerSettingsPage();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=548" + }, + "glic.mojom.WebClientHandler.ClosePanel": { + "definition": "ClosePanel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=551" + }, + "glic.mojom.WebClientHandler.ClosePanelAndShutdown": { + "definition": "ClosePanelAndShutdown();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=554" + }, + "glic.mojom.WebClientHandler.AttachPanel": { + "definition": "AttachPanel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=558" + }, + "glic.mojom.WebClientHandler.DetachPanel": { + "definition": "DetachPanel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=562" + }, + "glic.mojom.WebClientHandler.OnModeChange": { + "definition": "OnModeChange(WebClientMode new_mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=565" + }, + "glic.mojom.WebClientHandler.ShowProfilePicker": { + "definition": "ShowProfilePicker();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=570" + }, + "glic.mojom.WebClientHandler.GetModelQualityClientId": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicAppendModelQualityClientId] GetModelQualityClientId() => (string model_quality_client_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=573" + }, + "glic.mojom.WebClientHandler.GetContextFromFocusedTab": { + "definition": "GetContextFromFocusedTab(GetTabContextOptions options) => (GetContextResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=580" + }, + "glic.mojom.WebClientHandler.GetContextFromTab": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicMultiTab] GetContextFromTab(int32 tab_id, GetTabContextOptions options) => (GetContextResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=587" + }, + "glic.mojom.WebClientHandler.GetContextForActorFromTab": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicActorTabContext] GetContextForActorFromTab(int32 tab_id, GetTabContextOptions options) => (GetContextResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=593" + }, + "glic.mojom.WebClientHandler.SetMaximumNumberOfPinnedTabs": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicMultiTab] SetMaximumNumberOfPinnedTabs(uint32 requested_max) => (uint32 effective_max);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=602" + }, + "glic.mojom.WebClientHandler.PinTabs": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicMultiTab] PinTabs(array tab_ids) => (bool pinned_all);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=609" + }, + "glic.mojom.WebClientHandler.UnpinTabs": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicMultiTab] UnpinTabs(array tab_ids) => (bool unpinned_all);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=614" + }, + "glic.mojom.WebClientHandler.UnpinAllTabs": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicMultiTab] UnpinAllTabs();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=618" + }, + "glic.mojom.WebClientHandler.SubscribeToPinCandidates": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicMultiTab] SubscribeToPinCandidates(GetPinCandidatesOptions options, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=622" + }, + "glic.mojom.WebClientHandler.CreateTask": { + "definition": "CreateTask(actor.webui.mojom.TaskOptions? task_options) => result; PerformActions(array actions_proto) => result; StopActorTask(int32 task_id, ActorTaskStopReason stop_reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=628" + }, + "glic.mojom.WebClientHandler.PauseActorTask": { + "definition": "PauseActorTask( int32 task_id, ActorTaskPauseReason pause_reason, int32? tab_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=653" + }, + "glic.mojom.WebClientHandler.ResumeActorTask": { + "definition": "ResumeActorTask(int32 task_id, GetTabContextOptions context_options) => (GetContextResultWithActionResultCode result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=661" + }, + "glic.mojom.WebClientHandler.InterruptActorTask": { + "definition": "InterruptActorTask(int32 task_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=669" + }, + "glic.mojom.WebClientHandler.UninterruptActorTask": { + "definition": "UninterruptActorTask(int32 task_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=675" + }, + "glic.mojom.WebClientHandler.CreateActorTab": { + "definition": "CreateActorTab(int32 task_id, bool open_in_background, int32? initiator_tab_id, int32? initiator_window_id) => (TabData? tab_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=683" + }, + "glic.mojom.WebClientHandler.ActivateTab": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicActivateTabApi] ActivateTab(int32 task_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=690" + }, + "glic.mojom.WebClientHandler.ResizeWidget": { + "definition": "ResizeWidget(gfx.mojom.Size size, mojo_base.mojom.TimeDelta duration) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=697" + }, + "glic.mojom.WebClientHandler.CaptureScreenshot": { + "definition": "CaptureScreenshot() => (CaptureScreenshotResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=702" + }, + "glic.mojom.WebClientHandler.CaptureRegion": { + "definition": "CaptureRegion(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=714" + }, + "glic.mojom.WebClientHandler.SetAudioDucking": { + "definition": "SetAudioDucking(bool enable) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=723" + }, + "glic.mojom.WebClientHandler.SetPanelDraggableAreas": { + "definition": "SetPanelDraggableAreas(array draggable_areas) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=731" + }, + "glic.mojom.WebClientHandler.SetMinimumPanelSize": { + "definition": "SetMinimumPanelSize(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=735" + }, + "glic.mojom.WebClientHandler.SetMicrophonePermissionState": { + "definition": "SetMicrophonePermissionState(bool enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=740" + }, + "glic.mojom.WebClientHandler.SetLocationPermissionState": { + "definition": "SetLocationPermissionState(bool enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=745" + }, + "glic.mojom.WebClientHandler.SetTabContextPermissionState": { + "definition": "SetTabContextPermissionState(bool enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=750" + }, + "glic.mojom.WebClientHandler.SetClosedCaptioningSetting": { + "definition": "SetClosedCaptioningSetting(bool enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=755" + }, + "glic.mojom.WebClientHandler.SetActuationOnWebSetting": { + "definition": "SetActuationOnWebSetting(bool enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=760" + }, + "glic.mojom.WebClientHandler.ShouldAllowMediaPermissionRequest": { + "definition": "ShouldAllowMediaPermissionRequest() => (bool is_allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=764" + }, + "glic.mojom.WebClientHandler.ShouldAllowGeolocationPermissionRequest": { + "definition": "ShouldAllowGeolocationPermissionRequest() => (bool is_allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=768" + }, + "glic.mojom.WebClientHandler.SetContextAccessIndicator": { + "definition": "SetContextAccessIndicator(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=771" + }, + "glic.mojom.WebClientHandler.GetUserProfileInfo": { + "definition": "GetUserProfileInfo() => (UserProfileInfo? profile_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=776" + }, + "glic.mojom.WebClientHandler.SyncCookies": { + "definition": "SyncCookies() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=781" + }, + "glic.mojom.WebClientHandler.LogBeginAsyncEvent": { + "definition": "LogBeginAsyncEvent( uint64 event_async_id, int32 task_id, string event, string details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=784" + }, + "glic.mojom.WebClientHandler.LogEndAsyncEvent": { + "definition": "LogEndAsyncEvent(uint64 event_async_id, string details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=788" + }, + "glic.mojom.WebClientHandler.LogInstantEvent": { + "definition": "LogInstantEvent(int32 task_id, string event, string details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=791" + }, + "glic.mojom.WebClientHandler.JournalClear": { + "definition": "JournalClear();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=794" + }, + "glic.mojom.WebClientHandler.JournalSnapshot": { + "definition": "JournalSnapshot(bool clear_journal) => (Journal journal);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=798" + }, + "glic.mojom.WebClientHandler.JournalStart": { + "definition": "JournalStart(uint64 max_bytes, bool capture_screenshots);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=801" + }, + "glic.mojom.WebClientHandler.JournalStop": { + "definition": "JournalStop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=804" + }, + "glic.mojom.WebClientHandler.JournalRecordFeedback": { + "definition": "JournalRecordFeedback(bool positive, string reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=809" + }, + "glic.mojom.WebClientHandler.OnUserInputSubmitted": { + "definition": "OnUserInputSubmitted(WebClientMode mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=812" + }, + "glic.mojom.WebClientHandler.OnContextUploadStarted": { + "definition": "OnContextUploadStarted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=815" + }, + "glic.mojom.WebClientHandler.OnContextUploadCompleted": { + "definition": "OnContextUploadCompleted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=818" + }, + "glic.mojom.WebClientHandler.OnReaction": { + "definition": "OnReaction(MetricUserInputReactionType reactionType);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=822" + }, + "glic.mojom.WebClientHandler.OnResponseStarted": { + "definition": "OnResponseStarted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=825" + }, + "glic.mojom.WebClientHandler.OnResponseStopped": { + "definition": "OnResponseStopped(OnResponseStoppedDetails details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=828" + }, + "glic.mojom.WebClientHandler.OnSessionTerminated": { + "definition": "OnSessionTerminated();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=831" + }, + "glic.mojom.WebClientHandler.OnTurnCompleted": { + "definition": "OnTurnCompleted(WebClientModel model, mojo_base.mojom.TimeDelta duration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=834" + }, + "glic.mojom.WebClientHandler.OnModelChanged": { + "definition": "OnModelChanged(WebClientModel model);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=837" + }, + "glic.mojom.WebClientHandler.OnRecordUseCounter": { + "definition": "OnRecordUseCounter(uint16 counter);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=845" + }, + "glic.mojom.WebClientHandler.OnResponseRated": { + "definition": "OnResponseRated(bool positive);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=848" + }, + "glic.mojom.WebClientHandler.OnClosedCaptionsShown": { + "definition": "OnClosedCaptionsShown();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=851" + }, + "glic.mojom.WebClientHandler.ScrollTo": { + "definition": "ScrollTo(ScrollToParams params) => (ScrollToErrorReason? error_reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=856" + }, + "glic.mojom.WebClientHandler.DropScrollToHighlight": { + "definition": "DropScrollToHighlight();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=860" + }, + "glic.mojom.WebClientHandler.SetSyntheticExperimentState": { + "definition": "SetSyntheticExperimentState(string trial_name, string group_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=865" + }, + "glic.mojom.WebClientHandler.OpenOsPermissionSettingsMenu": { + "definition": "OpenOsPermissionSettingsMenu( content_settings.mojom.ContentSettingsType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=868" + }, + "glic.mojom.WebClientHandler.GetOsMicrophonePermissionStatus": { + "definition": "GetOsMicrophonePermissionStatus() => (bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=872" + }, + "glic.mojom.WebClientHandler.GetZeroStateSuggestionsAndSubscribe": { + "definition": "[RuntimeFeature=glic.mojom.features.kZeroStateSuggestionsV2] GetZeroStateSuggestionsAndSubscribe( bool is_live, ZeroStateSuggestionsOptions options) => (ZeroStateSuggestionsV2? zero_state_suggestions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=878" + }, + "glic.mojom.WebClientHandler.GetZeroStateSuggestionsForFocusedTab": { + "definition": "GetZeroStateSuggestionsForFocusedTab(bool? is_first_run) => (ZeroStateSuggestions? suggestions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=884" + }, + "glic.mojom.WebClientHandler.MaybeRefreshUserStatus": { + "definition": "MaybeRefreshUserStatus();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=890" + }, + "glic.mojom.WebClientHandler.IsDebuggerAttached": { + "definition": "IsDebuggerAttached() => (bool is_attached_to_webview);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=895" + }, + "glic.mojom.WebClientHandler.OnViewChanged": { + "definition": "OnViewChanged(ViewChangedNotification notification);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=900" + }, + "glic.mojom.WebClientHandler.SubscribeToPageMetadata": { + "definition": "SubscribeToPageMetadata(int32 tab_id, array names) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=905" + }, + "glic.mojom.WebClientHandler.SwitchConversation": { + "definition": "SwitchConversation(ConversationInfo? info) => (SwitchConversationErrorReason? error_reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=910" + }, + "glic.mojom.WebClientHandler.RegisterConversation": { + "definition": "RegisterConversation(ConversationInfo info) => (RegisterConversationErrorReason? error_reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=915" + }, + "glic.mojom.WebClient.NotifyPanelWillOpen": { + "definition": "NotifyPanelWillOpen(PanelOpeningData panel_opening_data) => (OpenPanelInfo openPanelInfo);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1120" + }, + "glic.mojom.WebClient.NotifyPanelWasClosed": { + "definition": "NotifyPanelWasClosed() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1125" + }, + "glic.mojom.WebClient.NotifyPanelStateChange": { + "definition": "NotifyPanelStateChange(PanelState panel_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1128" + }, + "glic.mojom.WebClient.NotifyPanelActiveChange": { + "definition": "NotifyPanelActiveChange(bool panel_active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1133" + }, + "glic.mojom.WebClient.NotifyPanelCanAttachChange": { + "definition": "NotifyPanelCanAttachChange(bool can_attach);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1136" + }, + "glic.mojom.WebClient.NotifyMicrophonePermissionStateChanged": { + "definition": "NotifyMicrophonePermissionStateChanged(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1140" + }, + "glic.mojom.WebClient.NotifyLocationPermissionStateChanged": { + "definition": "NotifyLocationPermissionStateChanged(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1144" + }, + "glic.mojom.WebClient.NotifyTabContextPermissionStateChanged": { + "definition": "NotifyTabContextPermissionStateChanged(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1148" + }, + "glic.mojom.WebClient.NotifyOsLocationPermissionStateChanged": { + "definition": "NotifyOsLocationPermissionStateChanged(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1152" + }, + "glic.mojom.WebClient.NotifyFocusedTabChanged": { + "definition": "NotifyFocusedTabChanged(FocusedTabData focused_tab_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1155" + }, + "glic.mojom.WebClient.NotifyManualResizeChanged": { + "definition": "NotifyManualResizeChanged(bool resizing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1158" + }, + "glic.mojom.WebClient.NotifyOsHotkeyStateChanged": { + "definition": "NotifyOsHotkeyStateChanged(string hotkey);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1161" + }, + "glic.mojom.WebClient.NotifyBrowserIsOpenChanged": { + "definition": "NotifyBrowserIsOpenChanged(bool browser_is_open);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1164" + }, + "glic.mojom.WebClient.NotifyInstanceActivationChanged": { + "definition": "NotifyInstanceActivationChanged(bool instance_active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1169" + }, + "glic.mojom.WebClient.NotifyClosedCaptioningSettingChanged": { + "definition": "NotifyClosedCaptioningSettingChanged(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1172" + }, + "glic.mojom.WebClient.NotifyPinnedTabsChanged": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicMultiTab] NotifyPinnedTabsChanged(array tab_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1175" + }, + "glic.mojom.WebClient.NotifyPinnedTabDataChanged": { + "definition": "[RuntimeFeature=glic.mojom.features.kGlicMultiTab] NotifyPinnedTabDataChanged(TabData tab_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1179" + }, + "glic.mojom.WebClient.NotifyZeroStateSuggestionsChanged": { + "definition": "NotifyZeroStateSuggestionsChanged(ZeroStateSuggestionsV2? suggestions, ZeroStateSuggestionsOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1183" + }, + "glic.mojom.WebClient.NotifyActorTaskStateChanged": { + "definition": "NotifyActorTaskStateChanged(int32 task_id, ActorTaskState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1188" + }, + "glic.mojom.WebClient.NotifyTabDataChanged": { + "definition": "NotifyTabDataChanged(TabData tab_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1191" + }, + "glic.mojom.WebClient.RequestViewChange": { + "definition": "RequestViewChange(ViewChangeRequest request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1198" + }, + "glic.mojom.WebClient.NotifyPageMetadataChanged": { + "definition": "NotifyPageMetadataChanged( int32 tab_id, blink.mojom.PageMetadata? metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1202" + }, + "glic.mojom.WebClient.NotifyDefaultTabContextPermissionStateChanged": { + "definition": "NotifyDefaultTabContextPermissionStateChanged(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1207" + }, + "glic.mojom.WebClient.RequestToShowCredentialSelectionDialog": { + "definition": "RequestToShowCredentialSelectionDialog( actor.webui.mojom.SelectCredentialDialogRequest request) => (actor.webui.mojom.SelectCredentialDialogResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1212" + }, + "glic.mojom.WebClient.RequestToShowAutofillSuggestionsDialog": { + "definition": "RequestToShowAutofillSuggestionsDialog( actor.webui.mojom.SelectAutofillSuggestionsDialogRequest request) => (actor.webui.mojom.SelectAutofillSuggestionsDialogResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1222" + }, + "glic.mojom.WebClient.RequestToShowUserConfirmationDialog": { + "definition": "RequestToShowUserConfirmationDialog( actor.webui.mojom.UserConfirmationDialogRequest request) => (actor.webui.mojom.UserConfirmationDialogResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1229" + }, + "glic.mojom.WebClient.RequestToConfirmNavigation": { + "definition": "RequestToConfirmNavigation( actor.webui.mojom.NavigationConfirmationRequest request) => (actor.webui.mojom.NavigationConfirmationResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1236" + }, + "glic.mojom.WebClient.NotifyAdditionalContext": { + "definition": "NotifyAdditionalContext(AdditionalContext context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1241" + }, + "glic.mojom.WebClient.NotifyActuationOnWebSettingChanged": { + "definition": "NotifyActuationOnWebSettingChanged(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1244" + }, + "glic.mojom.WebClient.NotifyActOnWebCapabilityChanged": { + "definition": "NotifyActOnWebCapabilityChanged(bool can_act_on_web);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1247" + }, + "glic.mojom.CaptureRegionObserver.OnUpdate": { + "definition": "OnUpdate(CaptureRegionResult? result, CaptureRegionErrorReason? reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1404" + }, + "glic.mojom.GetContextResultWithActionResultCode": { + "definition": "struct GetContextResultWithActionResultCode { GetContextResult get_context_result; int32? action_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=248" + }, + "glic.mojom.UserProfileInfo": { + "definition": "struct UserProfileInfo { skia.mojom.BitmapN32? avatar_icon; string display_name; string local_profile_name; string email; string given_name; bool is_managed;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=263" + }, + "glic.mojom.WebClientInitialState": { + "definition": "struct WebClientInitialState { PanelState panel_state; FocusedTabData focused_tab_data; bool microphone_permission_enabled; bool location_permission_enabled; bool tab_context_permission_enabled; bool os_location_permission_enabled; string hotkey; mojo_base.mojom.Version chrome_version; bool can_attach; bool panel_is_active; bool browser_is_open; bool instance_is_active; bool always_detached_mode; bool enable_zero_state_suggestions; bool enable_act_in_focused_tab; bool enable_scroll_to; bool enable_default_tab_context_setting_feature; bool default_tab_context_setting_enabled; bool enable_closed_captioning_feature; bool closed_captioning_setting_enabled; bool enable_maybe_refresh_user_status; bool enable_multi_tab; bool enable_get_context_actor; array host_capabilities; bool enable_get_page_metadata; bool enable_api_activation_gating; bool enable_capture_region; bool enable_web_actuation_setting_feature; bool actuation_on_web_setting_enabled; bool can_act_on_web; bool enable_activate_tab; bool enable_get_tab_by_id; bool enable_open_password_manager_settings_page;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=281" + }, + "glic.mojom.GetTabContextOptions": { + "definition": "struct GetTabContextOptions { bool include_inner_text; uint32 inner_text_bytes_limit; bool include_viewport_screenshot; bool include_annotated_page_content; uint32 max_meta_tags; bool include_pdf; uint32 pdf_size_limit; uint32 annotated_page_content_mode = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=342" + }, + "glic.mojom.GetPinCandidatesOptions": { + "definition": "struct GetPinCandidatesOptions { uint32 max_candidates; string? query;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=366" + }, + "glic.mojom.ScrollToParams": { + "definition": "struct ScrollToParams { ScrollToSelector selector; bool highlight; mojo_base.mojom.UnguessableToken? document_id; url.mojom.Url? url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=374" + }, + "glic.mojom.ScrollToTextSelector": { + "definition": "struct ScrollToTextSelector { string text; int32? search_range_start_node_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=401" + }, + "glic.mojom.ScrollToTextFragmentSelector": { + "definition": "struct ScrollToTextFragmentSelector { string text_start; string text_end; int32? search_range_start_node_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=413" + }, + "glic.mojom.ScrollToNodeSelector": { + "definition": "struct ScrollToNodeSelector { int32 node_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=426" + }, + "glic.mojom.SuggestionContent": { + "definition": "struct SuggestionContent { string suggestion;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=475" + }, + "glic.mojom.ZeroStateSuggestions": { + "definition": "struct ZeroStateSuggestions { array suggestions; int32 tab_id; url.mojom.Url tab_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=481" + }, + "glic.mojom.ZeroStateSuggestionsV2": { + "definition": "struct ZeroStateSuggestionsV2 { array suggestions; bool is_pending;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=491" + }, + "glic.mojom.ZeroStateSuggestionsOptions": { + "definition": "struct ZeroStateSuggestionsOptions { bool is_first_run; array supported_tools;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=500" + }, + "glic.mojom.PinCandidate": { + "definition": "struct PinCandidate { TabData tab_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=506" + }, + "glic.mojom.ConversationInfo": { + "definition": "struct ConversationInfo { string conversation_id; string conversation_title;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=920" + }, + "glic.mojom.PanelOpeningData": { + "definition": "struct PanelOpeningData { PanelState panel_state; InvocationSource invocation_source; string? conversation_id; string? prompt_suggestion; array? recently_active_conversations;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=942" + }, + "glic.mojom.PanelState": { + "definition": "struct PanelState { PanelStateKind kind; int32? window_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=973" + }, + "glic.mojom.OnResponseStoppedDetails": { + "definition": "struct OnResponseStoppedDetails { ResponseStopCause cause;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1063" + }, + "glic.mojom.OpenPanelInfo": { + "definition": "struct OpenPanelInfo { WebClientMode web_client_mode; gfx.mojom.Size? panelSize; mojo_base.mojom.TimeDelta resizeDuration; bool can_user_resize;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1069" + }, + "glic.mojom.ContextData": { + "definition": "struct ContextData { string mime_type; mojo_base.mojom.BigBuffer data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1083" + }, + "glic.mojom.AdditionalContext": { + "definition": "struct AdditionalContext { string? name; int32? tab_id; url.mojom.Origin? origin; url.mojom.Url? frameUrl; array parts;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1102" + }, + "glic.mojom.TabContext": { + "definition": "struct TabContext { TabData tab_data; WebPageData? web_page_data; Screenshot? viewport_screenshot; PdfDocumentData? pdf_document_data; AnnotatedPageData? annotated_page_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1251" + }, + "glic.mojom.WebPageData": { + "definition": "struct WebPageData { DocumentData main_document;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1270" + }, + "glic.mojom.DocumentData": { + "definition": "struct DocumentData { url.mojom.Origin origin; string inner_text; bool inner_text_truncated;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1276" + }, + "glic.mojom.PdfDocumentData": { + "definition": "struct PdfDocumentData { url.mojom.Origin origin; array? pdf_data; bool size_limit_exceeded;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1287" + }, + "glic.mojom.TabData": { + "definition": "struct TabData { int32 tab_id; int32 window_id; url.mojom.Url url; string? title; skia.mojom.BitmapN32? favicon; url.mojom.Url? favicon_url; string document_mime_type; bool? is_observable; bool? is_media_active; bool? is_tab_content_captured; bool? is_active_in_window; bool? is_window_active;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1298" + }, + "glic.mojom.NoFocusedTabData": { + "definition": "struct NoFocusedTabData { TabData? active_tab_data; string no_focus_reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1343" + }, + "glic.mojom.AnnotatedPageData": { + "definition": "struct AnnotatedPageData { mojo_base.mojom.ProtoWrapper? annotated_page_content; blink.mojom.PageMetadata? metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1351" + }, + "glic.mojom.ImageOriginAnnotations": { + "definition": "struct ImageOriginAnnotations {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1364" + }, + "glic.mojom.Journal": { + "definition": "struct Journal { array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1368" + }, + "glic.mojom.CaptureRegionResult": { + "definition": "struct CaptureRegionResult { int32 tab_id; CapturedRegion region;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1380" + }, + "glic.mojom.Screenshot": { + "definition": "struct Screenshot { uint32 width_pixels; uint32 height_pixels; array data; string mime_type; ImageOriginAnnotations origin_annotations;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1408" + }, + "glic.mojom.OpenSettingsOptions": { + "definition": "struct OpenSettingsOptions { SettingsPageField highlightField;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1432" + }, + "glic.mojom.ViewChangeRequestActuation": { + "definition": "struct ViewChangeRequestActuation {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1454" + }, + "glic.mojom.ViewChangeRequestConversation": { + "definition": "struct ViewChangeRequestConversation {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1458" + }, + "glic.mojom.ViewChangeRequest": { + "definition": "struct ViewChangeRequest { ViewChangeRequestDetails details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1468" + }, + "glic.mojom.ViewChangedNotification": { + "definition": "struct ViewChangedNotification { CurrentView current_view;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1483" + }, + "glic.mojom.ProfileReadyState": { + "definition": "enum ProfileReadyState { kUnknownError, kSignInRequired, kReady, kIneligible, kDisabledByAdmin,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=27" + }, + "glic.mojom.WebUiState": { + "definition": "enum WebUiState { kUninitialized = 0, kBeginLoad = 1, kShowLoading = 2, kHoldLoading = 3, kFinishLoading = 4, kError = 5, kOffline = 6, kUnavailable = 7, kReady = 8, kUnresponsive = 9, kSignIn = 10, kGuestError = 11, kDisabledByAdmin = 12,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=63" + }, + "glic.mojom.MetricUserInputReactionType": { + "definition": "enum MetricUserInputReactionType { [Default] kUnknown = 0, kCanned = 1, kModel = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=101" + }, + "glic.mojom.PrepareForClientResult": { + "definition": "enum PrepareForClientResult { kSuccess, kErrorResyncingCookies, kRequiresSignIn,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=112" + }, + "glic.mojom.PerformActionsErrorReason": { + "definition": "enum PerformActionsErrorReason { [Default] kUnknown = 0, [MinVersion=1] kInvalidProto = 1, [MinVersion=2] kMissingTaskId = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=162" + }, + "glic.mojom.CreateTaskErrorReason": { + "definition": "enum CreateTaskErrorReason { [Default] kUnknown = 0, kTaskSystemUnavailable = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=177" + }, + "glic.mojom.ActorTaskState": { + "definition": "enum ActorTaskState { [Default] kUnknown = 0, kIdle = 1, kActing = 2, kPaused = 3, kStopped = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=189" + }, + "glic.mojom.ActorTaskPauseReason": { + "definition": "enum ActorTaskPauseReason { [Default] kPausedByModel = 0, kPausedByUser = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=204" + }, + "glic.mojom.ActorTaskStopReason": { + "definition": "enum ActorTaskStopReason { [Default] kTaskComplete = 0, kStoppedByUser = 1, [MinVersion=1] kModelError = 2, [MinVersion=2] kUserStartedNewChat = 3, [MinVersion=2] kUserLoadedPreviousChat = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=215" + }, + "glic.mojom.CaptureScreenshotErrorReason": { + "definition": "enum CaptureScreenshotErrorReason { [Default] kUnknown = 0, kScreenCaptureRequestThrottled = 1, kUserCancelledScreenPickerDialog = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=233" + }, + "glic.mojom.ScrollToErrorReason": { + "definition": "enum ScrollToErrorReason { [Default] kNotSupported = 0, [MinVersion=1] kNewerScrollToCall, [MinVersion=1] kNoFocusedTab, [MinVersion=1] kNoMatchFound, [MinVersion=1] kFocusedTabChangedOrNavigated, [MinVersion=2] kNoMatchingDocument, [MinVersion=5] kSearchRangeInvalid, [MinVersion=6] kTabContextPermissionDisabled, [MinVersion=7] kDroppedByWebClient,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=436" + }, + "glic.mojom.SwitchConversationErrorReason": { + "definition": "enum SwitchConversationErrorReason { [Default] kUnknown = 0,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=928" + }, + "glic.mojom.RegisterConversationErrorReason": { + "definition": "enum RegisterConversationErrorReason { [Default] kUnknown = 0, kInstanceAlreadyHasConversationId = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=935" + }, + "glic.mojom.PanelStateKind": { + "definition": "enum PanelStateKind { kHidden = 0, kDetached = 1, kAttached = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=963" + }, + "glic.mojom.InvocationSource": { + "definition": "enum InvocationSource { kOsButton = 0, kOsButtonMenu = 1, kOsHotkey = 2, kTopChromeButton = 3, kFre = 4, kProfilePicker = 5, kNudge = 6, kThreeDotsMenu = 7, [Default] kUnsupported = 8, [MinVersion=1] kWhatsNew = 9, [MinVersion=2] kAfterSignIn = 10, [MinVersion=3] kSharedTab = 11, [MinVersion=4] kActorTaskIcon = 12, [MinVersion=5] kSharedImage = 13, [MinVersion=6] kHandoffButton = 14,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=983" + }, + "glic.mojom.WebClientMode": { + "definition": "enum WebClientMode { [Default] kUnknown = 2, kText = 0, kAudio = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1024" + }, + "glic.mojom.WebClientModel": { + "definition": "enum WebClientModel { [Default] kDefault = 0, kActor = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1037" + }, + "glic.mojom.WebUseCounter": { + "definition": "enum WebUseCounter { [Default] kDefault = 0, kSubmitPromptWithAutoMode = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1048" + }, + "glic.mojom.ResponseStopCause": { + "definition": "enum ResponseStopCause { [Default] kUnknown = 0, kUser = 1, kOther = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1056" + }, + "glic.mojom.CaptureRegionErrorReason": { + "definition": "enum CaptureRegionErrorReason { [Default] kUnknown = 0, kNoFocusableTab = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1392" + }, + "glic.mojom.SettingsPageField": { + "definition": "enum SettingsPageField { [Default] kNone = 0, kOsHotkey, kOsEntrypointToggle,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1423" + }, + "glic.mojom.HostCapability": { + "definition": "enum HostCapability { kScrollToPdf = 0, kResetSizeAndLocationOnOpen = 1, kGetModelQualityClientId = 2, kMultiInstance = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1440" + }, + "glic.mojom.CurrentView": { + "definition": "enum CurrentView { kConversation = 0, kActuation = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1473" + }, + "glic.mojom.GetContextResult": { + "definition": "union GetContextResult { string error_reason; TabContext tab_context;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=243" + }, + "glic.mojom.CaptureScreenshotResult": { + "definition": "union CaptureScreenshotResult { CaptureScreenshotErrorReason error_reason; Screenshot screenshot;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=257" + }, + "glic.mojom.ScrollToSelector": { + "definition": "union ScrollToSelector { ScrollToTextSelector exact_text_selector; ScrollToTextFragmentSelector text_fragment_selector; ScrollToNodeSelector node_selector;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=394" + }, + "glic.mojom.AdditionalContextPart": { + "definition": "union AdditionalContextPart { ContextData data; Screenshot screenshot; WebPageData web_page_data; AnnotatedPageData annotated_page_data; PdfDocumentData pdf_document_data; TabContext tab_context;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1091" + }, + "glic.mojom.FocusedTabData": { + "definition": "union FocusedTabData { TabData focused_tab; NoFocusedTabData no_focused_tab_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1335" + }, + "glic.mojom.CapturedRegion": { + "definition": "union CapturedRegion { gfx.mojom.Rect rect;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1374" + }, + "glic.mojom.ViewChangeRequestDetails": { + "definition": "union ViewChangeRequestDetails { ViewChangeRequestActuation actuation; ViewChangeRequestConversation conversation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/glic/host/glic.mojom;l=1460" + }, + "lens.mojom.CenterRotatedBox": { + "definition": "struct CenterRotatedBox { gfx.mojom.RectF box; float rotation; CoordinateType coordinate_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/geometry.mojom;l=10" + }, + "lens.mojom.Geometry": { + "definition": "struct Geometry { CenterRotatedBox bounding_box; array segmentation_polygon;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/geometry.mojom;l=32" + }, + "lens.mojom.CoordinateType": { + "definition": "enum CoordinateType { kUnspecified = 0, kNormalized = 1, kImage = 2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/geometry.mojom;l=19" + }, + "lens.mojom.LensPageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_receiver handler, pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=58" + }, + "lens.mojom.LensPageHandler.ActivityRequestedByOverlay": { + "definition": "ActivityRequestedByOverlay(ui.mojom.ClickModifiers click_modifiers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=80" + }, + "lens.mojom.LensPageHandler.CloseRequestedByOverlayCloseButton": { + "definition": "CloseRequestedByOverlayCloseButton();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=84" + }, + "lens.mojom.LensPageHandler.CloseRequestedByOverlayBackgroundClick": { + "definition": "CloseRequestedByOverlayBackgroundClick();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=87" + }, + "lens.mojom.LensPageHandler.NotifyOverlayInitialized": { + "definition": "NotifyOverlayInitialized();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=91" + }, + "lens.mojom.LensPageHandler.AddBackgroundBlur": { + "definition": "AddBackgroundBlur();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=95" + }, + "lens.mojom.LensPageHandler.SetLiveBlur": { + "definition": "SetLiveBlur(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=98" + }, + "lens.mojom.LensPageHandler.FeedbackRequestedByOverlay": { + "definition": "FeedbackRequestedByOverlay();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=102" + }, + "lens.mojom.LensPageHandler.GetOverlayInvocationSource": { + "definition": "GetOverlayInvocationSource() => (string invocation_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=107" + }, + "lens.mojom.LensPageHandler.InfoRequestedByOverlay": { + "definition": "InfoRequestedByOverlay(ui.mojom.ClickModifiers click_modifiers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=111" + }, + "lens.mojom.LensPageHandler.IssueLensRegionRequest": { + "definition": "IssueLensRegionRequest(CenterRotatedBox region, bool is_click);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=120" + }, + "lens.mojom.LensPageHandler.IssueLensObjectRequest": { + "definition": "IssueLensObjectRequest(CenterRotatedBox region, bool is_mask_click);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=128" + }, + "lens.mojom.LensPageHandler.IssueTextSelectionRequest": { + "definition": "IssueTextSelectionRequest(string query, int32 selection_start_index, int32 selection_end_index, bool is_translate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=138" + }, + "lens.mojom.LensPageHandler.IssueTranslateSelectionRequest": { + "definition": "IssueTranslateSelectionRequest(string query, string content_language, int32 selection_start_index, int32 selection_end_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=145" + }, + "lens.mojom.LensPageHandler.IssueMathSelectionRequest": { + "definition": "IssueMathSelectionRequest(string query, string formula, int32 selection_start_index, int32 selection_end_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=151" + }, + "lens.mojom.LensPageHandler.IssueTranslateFullPageRequest": { + "definition": "IssueTranslateFullPageRequest( string source_language, string target_language);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=162" + }, + "lens.mojom.LensPageHandler.IssueEndTranslateModeRequest": { + "definition": "IssueEndTranslateModeRequest();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=168" + }, + "lens.mojom.LensPageHandler.CopyText": { + "definition": "CopyText(string text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=176" + }, + "lens.mojom.LensPageHandler.CopyImage": { + "definition": "CopyImage(CenterRotatedBox region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=181" + }, + "lens.mojom.LensPageHandler.SaveAsImage": { + "definition": "SaveAsImage(CenterRotatedBox region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=185" + }, + "lens.mojom.LensPageHandler.ClosePreselectionBubble": { + "definition": "ClosePreselectionBubble();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=188" + }, + "lens.mojom.LensPageHandler.RecordUkmAndTaskCompletionForLensOverlayInteraction": { + "definition": "RecordUkmAndTaskCompletionForLensOverlayInteraction( UserAction user_action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=191" + }, + "lens.mojom.LensPageHandler.RecordLensOverlaySemanticEvent": { + "definition": "RecordLensOverlaySemanticEvent(SemanticEvent event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=195" + }, + "lens.mojom.LensPageHandler.MaybeShowTranslateFeaturePromo": { + "definition": "MaybeShowTranslateFeaturePromo();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=203" + }, + "lens.mojom.LensPageHandler.MaybeCloseTranslateFeaturePromo": { + "definition": "MaybeCloseTranslateFeaturePromo(bool feature_engaged);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=208" + }, + "lens.mojom.LensPageHandler.FetchSupportedLanguages": { + "definition": "FetchSupportedLanguages() => (string browser_locale, array source_languages, array target_languages);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=216" + }, + "lens.mojom.LensPageHandler.FinishReshowOverlay": { + "definition": "FinishReshowOverlay();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=222" + }, + "lens.mojom.LensPage.ScreenshotDataReceived": { + "definition": "ScreenshotDataReceived( skia.mojom.BitmapMappedFromTrustedProcess screenshot_data, bool is_side_panel_open);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=229" + }, + "lens.mojom.LensPage.NotifyHandshakeComplete": { + "definition": "NotifyHandshakeComplete();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=234" + }, + "lens.mojom.LensPage.NotifyResultsPanelOpened": { + "definition": "NotifyResultsPanelOpened();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=237" + }, + "lens.mojom.LensPage.NotifyOverlayClosing": { + "definition": "NotifyOverlayClosing();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=241" + }, + "lens.mojom.LensPage.ObjectsReceived": { + "definition": "ObjectsReceived(array objects);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=244" + }, + "lens.mojom.LensPage.TextReceived": { + "definition": "TextReceived(Text text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=247" + }, + "lens.mojom.LensPage.RegionTextReceived": { + "definition": "RegionTextReceived(Text text, bool is_injected_image);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=254" + }, + "lens.mojom.LensPage.ThemeReceived": { + "definition": "ThemeReceived(OverlayTheme theme);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=257" + }, + "lens.mojom.LensPage.ShouldShowContextualSearchBox": { + "definition": "ShouldShowContextualSearchBox(bool should_show);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=260" + }, + "lens.mojom.LensPage.PageContentTypeChanged": { + "definition": "PageContentTypeChanged(PageContentType new_page_content_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=264" + }, + "lens.mojom.LensPage.SetPostRegionSelection": { + "definition": "SetPostRegionSelection(CenterRotatedBox region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=267" + }, + "lens.mojom.LensPage.SetTextSelection": { + "definition": "SetTextSelection(int32 selection_start_index, int32 selection_end_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=270" + }, + "lens.mojom.LensPage.SetTranslateMode": { + "definition": "SetTranslateMode(string source_language, string target_language);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=273" + }, + "lens.mojom.LensPage.ClearRegionSelection": { + "definition": "ClearRegionSelection();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=276" + }, + "lens.mojom.LensPage.ClearTextSelection": { + "definition": "ClearTextSelection();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=279" + }, + "lens.mojom.LensPage.ClearAllSelections": { + "definition": "ClearAllSelections();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=283" + }, + "lens.mojom.LensPage.OnCopyCommand": { + "definition": "OnCopyCommand();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=287" + }, + "lens.mojom.LensPage.SuppressGhostLoader": { + "definition": "SuppressGhostLoader();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=290" + }, + "lens.mojom.LensPage.OnOverlayReshown": { + "definition": "OnOverlayReshown(skia.mojom.BitmapMappedFromTrustedProcess screenshot_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=293" + }, + "lens.mojom.OverlayTheme": { + "definition": "struct OverlayTheme { skia.mojom.SkColor primary; skia.mojom.SkColor shader_layer_1; skia.mojom.SkColor shader_layer_2; skia.mojom.SkColor shader_layer_3; skia.mojom.SkColor shader_layer_4; skia.mojom.SkColor shader_layer_5; skia.mojom.SkColor scrim; skia.mojom.SkColor surface_container_highest_light; skia.mojom.SkColor surface_container_highest_dark; skia.mojom.SkColor selection_element;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=63" + }, + "lens.mojom.UserAction": { + "definition": "enum UserAction { kRegionSelection = 0, kRegionSelectionChange = 1, kTextSelection = 2, kObjectClick = 3, kTranslateText = 4, kCopyText = 5, kMyActivity = 6, kLearnMore = 7, kSendFeedback = 8, kTapRegionSelection = 9, kTranslateButtonEnableAction = 10, kTranslateButtonDisableAction = 11, kTranslateSourceLanguageChanged = 12, kTranslateTargetLanguageChanged = 13, kTranslateTextSelection = 14, kCopyAsImage = 15, kSaveAsImage = 16, kMathSelection = 17, kFullScreenshotRegionSelection = 18,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=25" + }, + "lens.mojom.SemanticEvent": { + "definition": "enum SemanticEvent { kTextGleamsViewStart = 0, kTextGleamsViewEnd = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens.mojom;l=50" + }, + "lens.mojom.LensGhostLoaderPageHandlerFactory.CreateGhostLoaderPage": { + "definition": "CreateGhostLoaderPage(pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_ghost_loader.mojom;l=11" + }, + "lens.mojom.LensGhostLoaderPage.ShowErrorState": { + "definition": "ShowErrorState();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_ghost_loader.mojom;l=19" + }, + "lens.mojom.LensSidePanelPageHandlerFactory.CreateSidePanelPageHandler": { + "definition": "CreateSidePanelPageHandler( pending_receiver handler, pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=13" + }, + "lens.mojom.LensSidePanelPageHandler.PopAndLoadQueryFromHistory": { + "definition": "PopAndLoadQueryFromHistory();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=23" + }, + "lens.mojom.LensSidePanelPageHandler.GetIsContextualSearchbox": { + "definition": "GetIsContextualSearchbox() => (bool is_contextual_searchbox);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=26" + }, + "lens.mojom.LensSidePanelPageHandler.OnScrollToMessage": { + "definition": "OnScrollToMessage(array text_fragments, uint32 pdf_page_number);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=32" + }, + "lens.mojom.LensSidePanelPageHandler.RequestSendFeedback": { + "definition": "RequestSendFeedback();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=35" + }, + "lens.mojom.LensSidePanelPageHandler.OnAimMessage": { + "definition": "OnAimMessage(array message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=39" + }, + "lens.mojom.LensSidePanelPageHandler.OnImageQueryWithEmptyText": { + "definition": "OnImageQueryWithEmptyText();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=42" + }, + "lens.mojom.LensSidePanelPage.LoadResultsInFrame": { + "definition": "LoadResultsInFrame(url.mojom.Url results_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=67" + }, + "lens.mojom.LensSidePanelPage.SetIsLoadingResults": { + "definition": "SetIsLoadingResults(bool is_loading);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=74" + }, + "lens.mojom.LensSidePanelPage.SetPageContentUploadProgress": { + "definition": "SetPageContentUploadProgress(float progress);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=78" + }, + "lens.mojom.LensSidePanelPage.SetBackArrowVisible": { + "definition": "SetBackArrowVisible(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=81" + }, + "lens.mojom.LensSidePanelPage.SetShowErrorPage": { + "definition": "SetShowErrorPage( bool should_show_error_page, SidePanelResultStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=86" + }, + "lens.mojom.LensSidePanelPage.SuppressGhostLoader": { + "definition": "SuppressGhostLoader();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=90" + }, + "lens.mojom.LensSidePanelPage.PageContentTypeChanged": { + "definition": "PageContentTypeChanged(PageContentType new_page_content_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=94" + }, + "lens.mojom.LensSidePanelPage.ShowToast": { + "definition": "ShowToast(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=98" + }, + "lens.mojom.LensSidePanelPage.SendClientMessageToAim": { + "definition": "SendClientMessageToAim(array serialized_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=103" + }, + "lens.mojom.LensSidePanelPage.AimHandshakeReceived": { + "definition": "AimHandshakeReceived();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=106" + }, + "lens.mojom.LensSidePanelPage.AimResultsChanged": { + "definition": "AimResultsChanged(bool on_aim);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=110" + }, + "lens.mojom.LensSidePanelPage.FocusResultsFrame": { + "definition": "FocusResultsFrame();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=113" + }, + "lens.mojom.LensSidePanelPage.SetIsOverlayShowing": { + "definition": "SetIsOverlayShowing(bool is_showing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=116" + }, + "lens.mojom.LensSidePanelPage.FocusSearchbox": { + "definition": "FocusSearchbox();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=119" + }, + "lens.mojom.SidePanelResultStatus": { + "definition": "enum SidePanelResultStatus { kUnknown = 0, kResultShown = 1, kErrorPageShownOffline = 2, kErrorPageShownStartQueryError = 3, kErrorPageShownProtected = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/lens_side_panel.mojom;l=47" + }, + "lens.mojom.OverlayObject": { + "definition": "struct OverlayObject { string id; Geometry geometry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/overlay_object.mojom;l=11" + }, + "lens.mojom.PageContentType": { + "definition": "enum PageContentType { kUnknown = 0, kPdf = 1, kHtml = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/page_content_type.mojom;l=8" + }, + "lens.mojom.Polygon": { + "definition": "struct Polygon { array vertex; VertexOrdering vertex_ordering; CoordinateType coordinate_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/polygon.mojom;l=10" + }, + "lens.mojom.Vertex": { + "definition": "struct Vertex { float x; float y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/polygon.mojom;l=30" + }, + "lens.mojom.VertexOrdering": { + "definition": "enum VertexOrdering { kUnspecified = 0, kClockwise = 1, kCounterClockwise = 2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/polygon.mojom;l=13" + }, + "lens.mojom.CoordinateType": { + "definition": "enum CoordinateType { kUnspecified = 0, kNormalized = 1, kImage = 2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/polygon.mojom;l=20" + }, + "lens.mojom.Text": { + "definition": "struct Text { TextLayout? text_layout; string? content_language;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=29" + }, + "lens.mojom.TextLayout": { + "definition": "struct TextLayout { array paragraphs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=38" + }, + "lens.mojom.Word": { + "definition": "struct Word { string plain_text; string? text_separator; Geometry? geometry; WritingDirection? writing_direction; FormulaMetadata? formula_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=44" + }, + "lens.mojom.Line": { + "definition": "struct Line { array words; Geometry? geometry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=65" + }, + "lens.mojom.BackgroundImageData": { + "definition": "struct BackgroundImageData { mojo_base.mojom.BigBuffer background_image; gfx.mojom.Size image_size; float vertical_padding; float horizontal_padding; mojo_base.mojom.BigBuffer text_mask;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=73" + }, + "lens.mojom.TranslatedLine": { + "definition": "struct TranslatedLine { array words; string translation; skia.mojom.SkColor text_color; skia.mojom.SkColor background_primary_color; BackgroundImageData? background_image_data; Geometry? geometry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=95" + }, + "lens.mojom.TranslatedParagraph": { + "definition": "struct TranslatedParagraph { array lines; gfx.mojom.Size resized_bitmap_size; Alignment? alignment; WritingDirection? writing_direction; string? content_language;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=119" + }, + "lens.mojom.Paragraph": { + "definition": "struct Paragraph { array lines; TranslatedParagraph? translation; Geometry? geometry; WritingDirection? writing_direction; string? content_language;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=143" + }, + "lens.mojom.FormulaMetadata": { + "definition": "struct FormulaMetadata { string? latex;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=168" + }, + "lens.mojom.WritingDirection": { + "definition": "enum WritingDirection { kLeftToRight = 0, kRightToLeft = 1, kTopToBottom = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=16" + }, + "lens.mojom.Alignment": { + "definition": "enum Alignment { kDefaultLeftAlgined = 0, kRightAligned = 1, kCenterAligned = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/text.mojom;l=23" + }, + "lens.mojom.Language": { + "definition": "struct Language { string language_code; string name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/lens/core/mojom/translate.mojom;l=8" + }, + "media.mojom.MediaEngagementScoreDetailsProvider.GetMediaEngagementScoreDetails": { + "definition": "GetMediaEngagementScoreDetails() => (array info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/media/media_engagement_score_details.mojom;l=49" + }, + "media.mojom.MediaEngagementScoreDetailsProvider.GetMediaEngagementConfig": { + "definition": "GetMediaEngagementConfig() => (MediaEngagementConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/media/media_engagement_score_details.mojom;l=50" + }, + "media.mojom.MediaEngagementScoreDetails": { + "definition": "struct MediaEngagementScoreDetails { url.mojom.Origin origin; double total_score; int32 visits; int32 media_playbacks; double last_media_playback_time; bool is_high;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/media/media_engagement_score_details.mojom;l=9" + }, + "media.mojom.MediaEngagementConfig": { + "definition": "struct MediaEngagementConfig { int32 score_min_visits; double high_score_lower_threshold; double high_score_upper_threshold; bool feature_record_data; bool feature_bypass_autoplay; bool feature_preload_data; bool feature_https_only; bool feature_autoplay_disable_settings; bool pref_disable_unified_autoplay; bool has_custom_autoplay_policy; string autoplay_policy; string preload_version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/media/media_engagement_score_details.mojom;l=24" + }, + "file_suggestion.mojom.DriveSuggestionHandler.GetFiles": { + "definition": "GetFiles() => (array files);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/file_suggestion/drive_suggestion.mojom;l=12" + }, + "file_suggestion.mojom.DriveSuggestionHandler.DismissModule": { + "definition": "DismissModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/file_suggestion/drive_suggestion.mojom;l=14" + }, + "file_suggestion.mojom.DriveSuggestionHandler.RestoreModule": { + "definition": "RestoreModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/file_suggestion/drive_suggestion.mojom;l=16" + }, + "file_suggestion.mojom.File": { + "definition": "struct File { string id; string justification_text; url.mojom.Url icon_url; string title; url.mojom.Url item_url; RecommendationType? recommendation_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/file_suggestion/file_suggestion.mojom;l=19" + }, + "file_suggestion.mojom.RecommendationType": { + "definition": "enum RecommendationType { kUsed = 0, kShared = 1, kTrending = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/file_suggestion/file_suggestion.mojom;l=12" + }, + "file_suggestion.mojom.MicrosoftFilesPageHandler.GetFiles": { + "definition": "GetFiles() => (array files);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/file_suggestion/microsoft_files.mojom;l=15" + }, + "file_suggestion.mojom.MicrosoftFilesPageHandler.DismissModule": { + "definition": "DismissModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/file_suggestion/microsoft_files.mojom;l=17" + }, + "file_suggestion.mojom.MicrosoftFilesPageHandler.RestoreModule": { + "definition": "RestoreModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/file_suggestion/microsoft_files.mojom;l=19" + }, + "ntp.safe_browsing.mojom.SafeBrowsingHandler.CanShowModule": { + "definition": "CanShowModule() => (bool show);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/safe_browsing/safe_browsing.mojom;l=11" + }, + "ntp.safe_browsing.mojom.SafeBrowsingHandler.ProcessModuleClick": { + "definition": "ProcessModuleClick();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/safe_browsing/safe_browsing.mojom;l=13" + }, + "ntp.safe_browsing.mojom.SafeBrowsingHandler.DismissModule": { + "definition": "DismissModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/safe_browsing/safe_browsing.mojom;l=17" + }, + "ntp.safe_browsing.mojom.SafeBrowsingHandler.RestoreModule": { + "definition": "RestoreModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/safe_browsing/safe_browsing.mojom;l=19" + }, + "ntp.authentication.mojom.MicrosoftAuthPageHandler.DismissModule": { + "definition": "DismissModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/authentication/microsoft_auth.mojom;l=11" + }, + "ntp.authentication.mojom.MicrosoftAuthPageHandler.RestoreModule": { + "definition": "RestoreModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/authentication/microsoft_auth.mojom;l=13" + }, + "ntp.authentication.mojom.MicrosoftAuthPageHandler.ShouldShowModule": { + "definition": "ShouldShowModule() => (bool show);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/authentication/microsoft_auth.mojom;l=15" + }, + "ntp.calendar.mojom.Attachment": { + "definition": "struct Attachment { string title; url.mojom.Url? resource_url; url.mojom.Url icon_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/calendar/calendar_data.mojom;l=11" + }, + "ntp.calendar.mojom.CalendarEvent": { + "definition": "struct CalendarEvent { string title; mojo_base.mojom.Time start_time; mojo_base.mojom.Time end_time; url.mojom.Url url; string? location; array attachments; url.mojom.Url? conference_url; bool is_accepted; bool has_other_attendee;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/calendar/calendar_data.mojom;l=21" + }, + "ntp.calendar.mojom.GoogleCalendarPageHandler.GetEvents": { + "definition": "GetEvents() => (array events);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/calendar/google_calendar.mojom;l=12" + }, + "ntp.calendar.mojom.GoogleCalendarPageHandler.DismissModule": { + "definition": "DismissModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/calendar/google_calendar.mojom;l=14" + }, + "ntp.calendar.mojom.GoogleCalendarPageHandler.RestoreModule": { + "definition": "RestoreModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/calendar/google_calendar.mojom;l=16" + }, + "ntp.calendar.mojom.OutlookCalendarPageHandler.GetEvents": { + "definition": "GetEvents() => (array events);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/calendar/outlook_calendar.mojom;l=14" + }, + "ntp.calendar.mojom.OutlookCalendarPageHandler.DismissModule": { + "definition": "DismissModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/calendar/outlook_calendar.mojom;l=16" + }, + "ntp.calendar.mojom.OutlookCalendarPageHandler.RestoreModule": { + "definition": "RestoreModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/calendar/outlook_calendar.mojom;l=18" + }, + "ntp.most_relevant_tab_resumption.mojom.PageHandler.GetURLVisits": { + "definition": "GetURLVisits() => (array url_visits);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption.mojom;l=20" + }, + "ntp.most_relevant_tab_resumption.mojom.PageHandler.DismissModule": { + "definition": "DismissModule(array url_visits);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption.mojom;l=23" + }, + "ntp.most_relevant_tab_resumption.mojom.PageHandler.DismissURLVisit": { + "definition": "DismissURLVisit(URLVisit url_visit);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption.mojom;l=26" + }, + "ntp.most_relevant_tab_resumption.mojom.PageHandler.RestoreModule": { + "definition": "RestoreModule(array url_visits);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption.mojom;l=29" + }, + "ntp.most_relevant_tab_resumption.mojom.PageHandler.RestoreURLVisit": { + "definition": "RestoreURLVisit(URLVisit url_visit);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption.mojom;l=32" + }, + "ntp.most_relevant_tab_resumption.mojom.PageHandler.RecordAction": { + "definition": "RecordAction(ScoredURLUserAction action, string url_key, int64 visit_request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption.mojom;l=35" + }, + "ntp.most_relevant_tab_resumption.mojom.ScoredURLUserAction": { + "definition": "enum ScoredURLUserAction { kUnknown = 0, kSeen = 1, kActivated = 2, kDismissed = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption.mojom;l=10" + }, + "ntp.most_relevant_tab_resumption.mojom.Decoration": { + "definition": "struct Decoration { DecorationType type; string display_string;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/url_visit_types.mojom;l=37" + }, + "ntp.most_relevant_tab_resumption.mojom.URLVisit": { + "definition": "struct URLVisit { FormFactor form_factor; bool is_known_to_sync; VisitSource source; string? session_name; url.mojom.Url url; string title; Decoration decoration; mojo_base.mojom.TimeDelta relative_time; mojo_base.mojom.Time? timestamp; string url_key; int64 training_request_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/url_visit_types.mojom;l=43" + }, + "ntp.most_relevant_tab_resumption.mojom.FormFactor": { + "definition": "enum FormFactor { kUnknown = 0, kDesktop = 1, kPhone = 2, kTablet = 3, kAutomotive = 4, kWearable = 5, kTv = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/url_visit_types.mojom;l=11" + }, + "ntp.most_relevant_tab_resumption.mojom.DecorationType": { + "definition": "enum DecorationType { kVisitedXAgo, kMostRecent, kFrequentlyVisited, kFrequentlyVisitedAtTime,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/url_visit_types.mojom;l=22" + }, + "ntp.most_relevant_tab_resumption.mojom.VisitSource": { + "definition": "enum VisitSource { kTab, kHistory,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/url_visit_types.mojom;l=32" + }, + "ntp.tab_groups.mojom.PageHandler.CreateNewTabGroup": { + "definition": "CreateNewTabGroup();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/tab_groups/tab_groups.mojom;l=34" + }, + "ntp.tab_groups.mojom.PageHandler.GetTabGroups": { + "definition": "GetTabGroups() => (array? tab_groups, bool showZeroState);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/tab_groups/tab_groups.mojom;l=38" + }, + "ntp.tab_groups.mojom.PageHandler.OpenTabGroup": { + "definition": "OpenTabGroup(string id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/tab_groups/tab_groups.mojom;l=40" + }, + "ntp.tab_groups.mojom.PageHandler.DismissModule": { + "definition": "DismissModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/tab_groups/tab_groups.mojom;l=42" + }, + "ntp.tab_groups.mojom.PageHandler.RestoreModule": { + "definition": "RestoreModule();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/tab_groups/tab_groups.mojom;l=44" + }, + "ntp.tab_groups.mojom.TabGroup": { + "definition": "struct TabGroup { string id; string title; string update_time; string? device_name; int32 total_tab_count; tab_groups.mojom.Color color; array favicon_urls; bool is_shared_tab_group;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/new_tab_page/modules/v2/tab_groups/tab_groups.mojom;l=11" + }, + "privacy_sandbox.notice.mojom.PrivacySandboxNoticeEvent": { + "definition": "enum PrivacySandboxNoticeEvent { kAck = 0, kClosed = 1, kOptIn = 2, kOptOut = 3, kSettings = 4, kShown = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/privacy_sandbox/notice/notice.mojom;l=8" + }, + "privacy_sandbox.notice.mojom.PrivacySandboxNotice": { + "definition": "enum PrivacySandboxNotice { kTopicsConsentNotice = 0, kProtectedAudienceMeasurementNotice = 1, kThreeAdsApisNotice = 2, kMeasurementNotice = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/privacy_sandbox/notice/notice.mojom;l=27" + }, + "mojom.LifecycleUnitState": { + "definition": "enum LifecycleUnitState { ACTIVE = 0, FROZEN = 3, DISCARDED = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resource_coordinator/lifecycle_unit_state.mojom;l=9" + }, + "mojom.LifecycleUnitLoadingState": { + "definition": "enum LifecycleUnitLoadingState { UNLOADED = 0, LOADING = 1, LOADED = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resource_coordinator/lifecycle_unit_state.mojom;l=25" + }, + "mojom.LifecycleUnitStateChangeReason": { + "definition": "enum LifecycleUnitStateChangeReason { BROWSER_INITIATED = 0, RENDERER_INITIATED = 1, SYSTEM_MEMORY_PRESSURE = 2, EXTENSION_INITIATED = 3, USER_INITIATED = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resource_coordinator/lifecycle_unit_state.mojom;l=36" + }, + "mojom.LifecycleUnitDiscardReason": { + "definition": "enum LifecycleUnitDiscardReason { EXTERNAL = 0, URGENT = 1, PROACTIVE = 2, SUGGESTED = 3, FROZEN_WITH_GROWING_MEMORY = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resource_coordinator/lifecycle_unit_state.mojom;l=50" + }, + "certificate_manager.mojom.CertificateManagerPageHandlerFactory.CreateCertificateManagerPageHandler": { + "definition": "CreateCertificateManagerPageHandler( pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=22" + }, + "certificate_manager.mojom.CertificateManagerPageHandler.GetCertificates": { + "definition": "GetCertificates(CertificateSource source) => (array certs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=118" + }, + "certificate_manager.mojom.CertificateManagerPageHandler.GetCertManagementMetadata": { + "definition": "GetCertManagementMetadata() => (CertManagementMetadata metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=121" + }, + "certificate_manager.mojom.CertificateManagerPageHandler.ViewCertificate": { + "definition": "ViewCertificate(CertificateSource source, string sha256_hash_hex);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=124" + }, + "certificate_manager.mojom.CertificateManagerPageHandler.ExportCertificates": { + "definition": "ExportCertificates(CertificateSource source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=127" + }, + "certificate_manager.mojom.CertificateManagerPageHandler.ImportCertificate": { + "definition": "ImportCertificate(CertificateSource source) => (ActionResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=137" + }, + "certificate_manager.mojom.CertificateManagerPageHandler.ImportAndBindCertificate": { + "definition": "ImportAndBindCertificate(CertificateSource source) => (ActionResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=140" + }, + "certificate_manager.mojom.CertificateManagerPageHandler.DeleteCertificate": { + "definition": "DeleteCertificate( CertificateSource source, string display_name, string sha256_hash_hex) => (ActionResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=148" + }, + "certificate_manager.mojom.CertificateManagerPageHandler.SetIncludeSystemTrustStore": { + "definition": "[EnableIfNot=is_chromeos] SetIncludeSystemTrustStore(bool include);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=157" + }, + "certificate_manager.mojom.CertificateManagerPage.AskForImportPassword": { + "definition": "AskForImportPassword() => (string? password);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=164" + }, + "certificate_manager.mojom.CertificateManagerPage.AskForConfirmation": { + "definition": "AskForConfirmation(string title, string message) => (bool confirmed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=169" + }, + "certificate_manager.mojom.CertificateManagerPage.TriggerReload": { + "definition": "TriggerReload(array sources);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=172" + }, + "certificate_manager.mojom.CertificateManagerPage.TriggerMetadataUpdate": { + "definition": "TriggerMetadataUpdate();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=175" + }, + "certificate_manager.mojom.SummaryCertInfo": { + "definition": "struct SummaryCertInfo { string sha256hash_hex; string display_name; bool is_deletable;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=9" + }, + "certificate_manager.mojom.CertManagementMetadata": { + "definition": "struct CertManagementMetadata { [EnableIfNot=is_chromeos] bool include_system_trust_store; [EnableIfNot=is_chromeos] uint8 num_user_added_system_certs; [EnableIfNot=is_chromeos] bool is_include_system_trust_store_managed; uint8 num_policy_certs; uint32 num_user_certs; bool show_user_certs_ui;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=77" + }, + "certificate_manager.mojom.CertificateSource": { + "definition": "enum CertificateSource { kChromeRootStore = 1, kPlatformClientCert, kEnterpriseTrustedCerts, kEnterpriseIntermediateCerts, kEnterpriseDistrustedCerts, [EnableIfNot=is_chromeos] kPlatformUserTrustedCerts, [EnableIfNot=is_chromeos] kPlatformUserIntermediateCerts, [EnableIfNot=is_chromeos] kPlatformUserDistrustedCerts, [EnableIf=is_linux|is_mac|is_win] kProvisionedClientCert, [EnableIf=is_chromeos] kExtensionsClientCert, kUserTrustedCerts, kUserIntermediateCerts, kUserDistrustedCerts,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=27" + }, + "certificate_manager.mojom.SuccessResult": { + "definition": "enum SuccessResult { kSuccess,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=102" + }, + "certificate_manager.mojom.ActionResult": { + "definition": "union ActionResult { string error; SuccessResult success;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:chrome/browser/resources/certificate_manager/certificate_manager.mojom;l=107" + }, + "signin.mojom.AccountId": { + "definition": "struct AccountId { AccountType account_type; string id; string user_email;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/account_id/mojom/account_id.mojom;l=15" + }, + "signin.mojom.AccountType": { + "definition": "enum AccountType { UNKNOWN, GOOGLE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/account_id/mojom/account_id.mojom;l=8" + }, + "attribution_reporting.mojom.DataHost.SourceDataAvailable": { + "definition": "SourceDataAvailable(attribution_reporting.mojom.SuitableOrigin reporting_origin, attribution_reporting.mojom.SourceRegistration data, bool was_fetched_via_service_worker);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/data_host.mojom;l=16" + }, + "attribution_reporting.mojom.DataHost.TriggerDataAvailable": { + "definition": "TriggerDataAvailable(attribution_reporting.mojom.SuitableOrigin reporting_origin, attribution_reporting.mojom.TriggerRegistration data, bool was_fetched_via_service_worker);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/data_host.mojom;l=22" + }, + "attribution_reporting.mojom.DataHost.OsSourceDataAvailable": { + "definition": "OsSourceDataAvailable(attribution_reporting.mojom.OsRegistration registration, bool was_fetched_via_service_worker);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/data_host.mojom;l=29" + }, + "attribution_reporting.mojom.DataHost.OsTriggerDataAvailable": { + "definition": "OsTriggerDataAvailable(attribution_reporting.mojom.OsRegistration registration, bool was_fetched_via_service_worker);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/data_host.mojom;l=35" + }, + "attribution_reporting.mojom.DataHost.ReportRegistrationHeaderError": { + "definition": "ReportRegistrationHeaderError( attribution_reporting.mojom.SuitableOrigin reporting_origin, attribution_reporting.mojom.RegistrationHeaderError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/data_host.mojom;l=40" + }, + "attribution_reporting.mojom.DataAvailableCallsite": { + "definition": "enum DataAvailableCallsite { kBlink = 0, kBrowser,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/data_host.mojom;l=51" + }, + "attribution_reporting.mojom.DebugDataType": { + "definition": "enum DebugDataType { kSourceDestinationLimit = 0, kSourceNoised = 1, kSourceStorageLimit = 2, kSourceSuccess = 3, kSourceUnknownError = 4, kSourceDestinationRateLimit = 5, kTriggerNoMatchingSource = 6, kTriggerNoMatchingFilterData = 8, kTriggerReportingOriginLimit = 9, kTriggerEventDeduplicated = 10, kTriggerEventNoMatchingConfigurations = 11, kTriggerEventNoise = 12, kTriggerEventLowPriority = 13, kTriggerEventExcessiveReports = 14, kTriggerEventStorageLimit = 15, kTriggerEventReportWindowPassed = 16, kTriggerAggregateDeduplicated = 17, kTriggerAggregateNoContributions = 18, kTriggerAggregateInsufficientBudget = 19, kTriggerAggregateStorageLimit = 20, kTriggerAggregateReportWindowPassed = 21, kTriggerAggregateExcessiveReports = 22, kTriggerUnknownError = 23, kOsSourceDelegated = 24, kOsTriggerDelegated = 25, kTriggerEventReportWindowNotStarted = 26, kTriggerEventNoMatchingTriggerData = 27, kHeaderParsingError = 28, kSourceReportingOriginPerSiteLimit = 29, kTriggerEventAttributionsPerSourceDestinationLimit = 30, kTriggerAggregateAttributionsPerSourceDestinationLimit = 31, kSourceChannelCapacityLimit = 32, kSourceTriggerStateCardinalityLimit = 33, kSourceDestinationGlobalRateLimit = 34, kSourceReportingOriginLimit = 35, kSourceDestinationPerDayRateLimit = 36, kSourceDestinationLimitReplaced = 37, kSourceScopesChannelCapacityLimit = 38, kSourceMaxEventStatesLimit = 39, kTriggerAggregateInsufficientNamedBudget = 40,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/debug_types.mojom;l=11" + }, + "attribution_reporting.mojom.OsRegistrationError": { + "definition": "enum OsRegistrationError { kInvalidList,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/os_registration_error.mojom;l=8" + }, + "attribution_reporting.mojom.SuitableOrigin": { + "definition": "struct SuitableOrigin { url.mojom.Origin origin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=18" + }, + "attribution_reporting.mojom.FilterData": { + "definition": "struct FilterData { map> filter_values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=25" + }, + "attribution_reporting.mojom.FilterConfig": { + "definition": "struct FilterConfig { mojo_base.mojom.TimeDelta? lookback_window; map> filter_values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=32" + }, + "attribution_reporting.mojom.FilterPair": { + "definition": "struct FilterPair { array positive; array negative;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=40" + }, + "attribution_reporting.mojom.AggregationKeys": { + "definition": "struct AggregationKeys { map keys;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=52" + }, + "attribution_reporting.mojom.AggregatableTriggerData": { + "definition": "struct AggregatableTriggerData { mojo_base.mojom.Uint128 key_piece; array source_keys; FilterPair filters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=57" + }, + "attribution_reporting.mojom.DestinationSet": { + "definition": "struct DestinationSet { array destinations;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=64" + }, + "attribution_reporting.mojom.EventReportWindows": { + "definition": "struct EventReportWindows { mojo_base.mojom.TimeDelta start_time; array end_times;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=70" + }, + "attribution_reporting.mojom.TriggerDataSet": { + "definition": "struct TriggerDataSet { array trigger_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=76" + }, + "attribution_reporting.mojom.AggregatableDebugReportingContribution": { + "definition": "struct AggregatableDebugReportingContribution { mojo_base.mojom.Uint128 key_piece; uint32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=81" + }, + "attribution_reporting.mojom.AggregatableDebugReportingConfig": { + "definition": "struct AggregatableDebugReportingConfig { mojo_base.mojom.Uint128 key_piece; map debug_data; SuitableOrigin? aggregation_coordinator_origin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=87" + }, + "attribution_reporting.mojom.SourceAggregatableDebugReportingConfig": { + "definition": "struct SourceAggregatableDebugReportingConfig { int32 budget; AggregatableDebugReportingConfig config;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=95" + }, + "attribution_reporting.mojom.AttributionScopesSet": { + "definition": "struct AttributionScopesSet { array scopes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=101" + }, + "attribution_reporting.mojom.AttributionScopesData": { + "definition": "struct AttributionScopesData { AttributionScopesSet attribution_scopes_set; uint32 attribution_scope_limit; uint32 max_event_states;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=106" + }, + "attribution_reporting.mojom.AggregatableNamedBudgetDefs": { + "definition": "struct AggregatableNamedBudgetDefs { map budgets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=120" + }, + "attribution_reporting.mojom.SourceRegistration": { + "definition": "struct SourceRegistration { DestinationSet destinations; uint64 source_event_id = 0; mojo_base.mojom.TimeDelta expiry; TriggerDataSet trigger_data; EventReportWindows event_report_windows; int32 max_event_level_reports; mojo_base.mojom.TimeDelta aggregatable_report_window; int64 priority = 0; uint64? debug_key; FilterData filter_data; AggregationKeys aggregation_keys; bool debug_reporting = false; TriggerDataMatching trigger_data_matching; double event_level_epsilon; SourceAggregatableDebugReportingConfig aggregatable_debug_reporting_config; int64 destination_limit_priority; AttributionScopesData? attribution_scopes_data; AggregatableNamedBudgetDefs aggregatable_named_budget_defs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=124" + }, + "attribution_reporting.mojom.EventTriggerData": { + "definition": "struct EventTriggerData { uint64 data = 0; int64 priority = 0; uint64? dedup_key; FilterPair filters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=187" + }, + "attribution_reporting.mojom.AggregatableDedupKey": { + "definition": "struct AggregatableDedupKey { uint64? dedup_key; FilterPair filters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=204" + }, + "attribution_reporting.mojom.AggregatableValuesValue": { + "definition": "struct AggregatableValuesValue { uint32 value; uint64 filtering_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=212" + }, + "attribution_reporting.mojom.AggregatableValues": { + "definition": "struct AggregatableValues { map values; FilterPair filters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=217" + }, + "attribution_reporting.mojom.AggregatableNamedBudgetCandidate": { + "definition": "struct AggregatableNamedBudgetCandidate { string? name; FilterPair filters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=225" + }, + "attribution_reporting.mojom.TriggerRegistration": { + "definition": "struct TriggerRegistration { array event_triggers; FilterPair filters; array aggregatable_trigger_data; array aggregatable_values; uint64? debug_key; array aggregatable_dedup_keys; bool debug_reporting = false; SuitableOrigin? aggregation_coordinator_origin; SourceRegistrationTimeConfig source_registration_time_config; string? trigger_context_id; uint8 aggregatable_filtering_id_max_bytes; AggregatableDebugReportingConfig aggregatable_debug_reporting_config; AttributionScopesSet attribution_scopes; array aggregatable_named_budget_candidates;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=237" + }, + "attribution_reporting.mojom.OsRegistrationItem": { + "definition": "struct OsRegistrationItem { url.mojom.Url url; bool debug_reporting;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=290" + }, + "attribution_reporting.mojom.OsRegistration": { + "definition": "struct OsRegistration { array items;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration.mojom;l=300" + }, + "attribution_reporting.mojom.RegistrationEligibility": { + "definition": "enum RegistrationEligibility { kSourceOrTrigger, kSource, kTrigger,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration_eligibility.mojom;l=8" + }, + "attribution_reporting.mojom.RegistrationHeaderError": { + "definition": "struct RegistrationHeaderError { string header_value; RegistrationHeaderErrorDetails error_details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration_header_error.mojom;l=20" + }, + "attribution_reporting.mojom.RegistrationHeaderErrorDetails": { + "definition": "union RegistrationHeaderErrorDetails { SourceRegistrationError source_error; TriggerRegistrationError trigger_error; OsRegistrationError os_source_error; OsRegistrationError os_trigger_error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/registration_header_error.mojom;l=12" + }, + "attribution_reporting.mojom.SourceRegistrationError": { + "definition": "enum SourceRegistrationError { kInvalidJson = 0, kRootWrongType = 1, kDestinationMissing = 2, kDestinationWrongType = 3, kDestinationUntrustworthy = 4, kDestinationListUntrustworthy = 5, kFilterDataKeyTooLong = 6, kFilterDataKeyReserved = 7, kFilterDataDictInvalid = 8, kFilterDataListInvalid = 9, kFilterDataListValueInvalid = 10, kAggregationKeysKeyTooLong = 11, kAggregationKeysDictInvalid = 12, kAggregationKeysValueInvalid = 13, kSourceEventIdValueInvalid = 14, kPriorityValueInvalid = 15, kExpiryValueInvalid = 16, kEventReportWindowValueInvalid = 17, kAggregatableReportWindowValueInvalid = 18, kMaxEventLevelReportsValueInvalid = 19, kEventReportWindowsWrongType = 20, kEventReportWindowsEndTimesMissing = 21, kEventReportWindowsEndTimeDurationLTEStart = 22, kBothEventReportWindowFieldsFound = 23, kEventReportWindowsEndTimesListInvalid = 24, kEventReportWindowsStartTimeInvalid = 25, kEventReportWindowsEndTimeValueInvalid = 26, kTriggerDataMatchingValueInvalid = 27, kTriggerDataListInvalid = 31, kDuplicateTriggerData = 32, kExcessiveTriggerData = 34, kInvalidTriggerDataForMatchingMode = 36, kEventLevelEpsilonValueInvalid = 41, kDestinationLimitPriorityInvalid = 42, kAttributionScopeLimitInvalid = 43, kAttributionScopeLimitRequired = 44, kMaxEventStatesInvalid = 45, kAttributionScopesInvalid = 46, kAttributionScopesListInvalid = 47, kAttributionScopesListValueInvalid = 48, kAggregatableNamedBudgetsDictInvalid = 49, kAggregatableNamedBudgetsKeyTooLong = 50, kAggregatableNamedBudgetsValueInvalid = 51,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/source_registration_error.mojom;l=11" + }, + "attribution_reporting.mojom.SourceRegistrationTimeConfig": { + "definition": "enum SourceRegistrationTimeConfig { kInclude = 0, kExclude = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/source_registration_time_config.mojom;l=13" + }, + "attribution_reporting.mojom.SourceType": { + "definition": "enum SourceType { kNavigation = 0, kEvent = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/source_type.mojom;l=7" + }, + "attribution_reporting.mojom.TriggerDataMatching": { + "definition": "enum TriggerDataMatching { kModulus = 0, kExact = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/trigger_data_matching.mojom;l=14" + }, + "attribution_reporting.mojom.TriggerRegistrationError": { + "definition": "enum TriggerRegistrationError { kInvalidJson = 0, kRootWrongType = 1, kFiltersWrongType = 2, kFiltersValueInvalid = 3, kFiltersLookbackWindowValueInvalid = 4, kFiltersUsingReservedKey = 5, kFiltersListValueInvalid = 6, kFiltersListLookbackWindowValueInvalid = 7, kFiltersListUsingReservedKey = 8, kAggregatableValuesWrongType = 9, kAggregatableValuesKeyTooLong = 10, kAggregatableValuesListValuesFieldMissing = 11, kAggregatableValuesValueInvalid = 12, kAggregatableValuesListKeyTooLong = 13, kAggregatableValuesListValueInvalid = 14, kAggregatableTriggerDataWrongType = 15, kAggregatableTriggerDataKeyPieceMissing = 16, kAggregatableTriggerDataSourceKeysInvalid = 17, kAggregatableTriggerDataKeyPieceInvalid = 18, kEventTriggerDataWrongType = 19, kEventTriggerDataValueInvalid = 20, kEventPriorityValueInvalid = 21, kEventDedupKeyValueInvalid = 22, kAggregationCoordinatorValueInvalid = 23, kAggregatableDedupKeyValueInvalid = 24, kAggregatableDedupKeyWrongType = 25, kAggregatableSourceRegistrationTimeValueInvalid = 26, kTriggerContextIdInvalidValue = 27, kTriggerContextIdInvalidSourceRegistrationTimeConfig = 28, kAggregatableFilteringIdMaxBytesInvalidValue = 30, kAggregatableFilteringIdsMaxBytesInvalidSourceRegistrationTimeConfig = 31, kAttributionScopesInvalid = 32, kAttributionScopesValueInvalid = 33, kAggregatableNamedBudgetWrongType = 34, kAggregatableNamedBudgetNameInvalid = 35,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/attribution_reporting/trigger_registration_error.mojom;l=11" + }, + "autofill.mojom.AutofillAgent.TriggerFormExtraction": { + "definition": "TriggerFormExtraction();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=16" + }, + "autofill.mojom.AutofillAgent.TriggerFormExtractionWithResponse": { + "definition": "TriggerFormExtractionWithResponse() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=22" + }, + "autofill.mojom.AutofillAgent.ApplyFieldsAction": { + "definition": "ApplyFieldsAction(FormActionType action_type, ActionPersistence action_persistence, array fields);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=27" + }, + "autofill.mojom.AutofillAgent.ApplyFieldAction": { + "definition": "ApplyFieldAction(FieldActionType action_type, ActionPersistence action_persistence, FieldRendererId field, mojo_base.mojom.String16 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=39" + }, + "autofill.mojom.AutofillAgent.ExtractForm": { + "definition": "ExtractForm(FormRendererId form) => (FormData? form);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=46" + }, + "autofill.mojom.AutofillAgent.ExtractLabeledTextNodeValue": { + "definition": "ExtractLabeledTextNodeValue(mojo_base.mojom.String16 value_regex, mojo_base.mojom.String16 label_regex, uint32 number_of_ancestor_levels_to_search) => (string value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=53" + }, + "autofill.mojom.AutofillAgent.FieldTypePredictionsAvailable": { + "definition": "FieldTypePredictionsAvailable(array forms);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=59" + }, + "autofill.mojom.AutofillAgent.ExposeDomNodeIds": { + "definition": "ExposeDomNodeIds();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=63" + }, + "autofill.mojom.AutofillAgent.ClearPreviewedForm": { + "definition": "ClearPreviewedForm();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=66" + }, + "autofill.mojom.AutofillAgent.TriggerSuggestions": { + "definition": "TriggerSuggestions( FieldRendererId field, AutofillSuggestionTriggerSource trigger_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=79" + }, + "autofill.mojom.AutofillAgent.SetSuggestionAvailability": { + "definition": "SetSuggestionAvailability( FieldRendererId field, AutofillSuggestionAvailability suggestion_availability);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=84" + }, + "autofill.mojom.AutofillAgent.AcceptDataListSuggestion": { + "definition": "AcceptDataListSuggestion( FieldRendererId field, mojo_base.mojom.String16 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=90" + }, + "autofill.mojom.AutofillAgent.PreviewPasswordSuggestion": { + "definition": "PreviewPasswordSuggestion( mojo_base.mojom.String16 username, mojo_base.mojom.String16 password);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=95" + }, + "autofill.mojom.AutofillAgent.PreviewPasswordGenerationSuggestion": { + "definition": "PreviewPasswordGenerationSuggestion(mojo_base.mojom.String16 password);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=99" + }, + "autofill.mojom.AutofillAgent.GetPotentialLastFourCombinationsForStandaloneCvc": { + "definition": "GetPotentialLastFourCombinationsForStandaloneCvc() => (array potential_matches);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=105" + }, + "autofill.mojom.AutofillAgent.DispatchEmailVerifiedEvent": { + "definition": "DispatchEmailVerifiedEvent( FieldRendererId field_id, string presentation_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=110" + }, + "autofill.mojom.PasswordAutofillAgent.ApplyFillDataOnParsingCompletion": { + "definition": "ApplyFillDataOnParsingCompletion(PasswordFormFillData form_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=121" + }, + "autofill.mojom.PasswordAutofillAgent.FillPasswordSuggestion": { + "definition": "FillPasswordSuggestion( mojo_base.mojom.String16 username, mojo_base.mojom.String16 password) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=124" + }, + "autofill.mojom.PasswordAutofillAgent.FillPasswordSuggestionById": { + "definition": "FillPasswordSuggestionById(FieldRendererId username_element_id, FieldRendererId password_element_id, mojo_base.mojom.String16 username, mojo_base.mojom.String16 password, AutofillSuggestionTriggerSource suggestion_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=133" + }, + "autofill.mojom.PasswordAutofillAgent.PreviewPasswordSuggestionById": { + "definition": "PreviewPasswordSuggestionById(FieldRendererId username_element_id, FieldRendererId password_element_id, mojo_base.mojom.String16 username, mojo_base.mojom.String16 password);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=141" + }, + "autofill.mojom.PasswordAutofillAgent.InformNoSavedCredentials": { + "definition": "InformNoSavedCredentials(bool should_show_popup_without_passwords);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=150" + }, + "autofill.mojom.PasswordAutofillAgent.FillIntoFocusedField": { + "definition": "FillIntoFocusedField( bool is_password, mojo_base.mojom.String16 credential);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=153" + }, + "autofill.mojom.PasswordAutofillAgent.PreviewField": { + "definition": "PreviewField(FieldRendererId field_id, mojo_base.mojom.String16 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=157" + }, + "autofill.mojom.PasswordAutofillAgent.FillField": { + "definition": "FillField(FieldRendererId field_id, mojo_base.mojom.String16 value, uint32 field_properties) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=163" + }, + "autofill.mojom.PasswordAutofillAgent.FillChangePasswordForm": { + "definition": "FillChangePasswordForm(FieldRendererId password_element_id, FieldRendererId new_password_element_id, FieldRendererId confirm_password_element_id, mojo_base.mojom.String16 old_password, mojo_base.mojom.String16 new_password) => (FormData? form_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=170" + }, + "autofill.mojom.PasswordAutofillAgent.SetLoggingState": { + "definition": "SetLoggingState(bool active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=179" + }, + "autofill.mojom.PasswordAutofillAgent.AnnotateFieldsWithParsingResult": { + "definition": "AnnotateFieldsWithParsingResult(ParsingResult parsing_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=187" + }, + "autofill.mojom.PasswordAutofillAgent.CheckViewAreaVisible": { + "definition": "CheckViewAreaVisible(FieldRendererId field_id) => (bool is_visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=191" + }, + "autofill.mojom.PasswordGenerationAgent.GeneratedPasswordAccepted": { + "definition": "GeneratedPasswordAccepted(mojo_base.mojom.String16 generated_password);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=199" + }, + "autofill.mojom.PasswordGenerationAgent.GeneratedPasswordRejected": { + "definition": "GeneratedPasswordRejected();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=203" + }, + "autofill.mojom.PasswordGenerationAgent.TriggeredGeneratePassword": { + "definition": "TriggeredGeneratePassword() => (PasswordGenerationUIData? data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=208" + }, + "autofill.mojom.PasswordGenerationAgent.FoundFormEligibleForGeneration": { + "definition": "FoundFormEligibleForGeneration(PasswordFormGenerationData form);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=212" + }, + "autofill.mojom.PasswordGenerationAgent.FocusNextFieldAfterPasswords": { + "definition": "FocusNextFieldAfterPasswords();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_agent.mojom;l=216" + }, + "autofill.mojom.AutofillDriver.FormsSeen": { + "definition": "FormsSeen(array updated_forms, array removed_forms);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=21" + }, + "autofill.mojom.AutofillDriver.FormSubmitted": { + "definition": "FormSubmitted(FormData form, SubmissionSource source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=24" + }, + "autofill.mojom.AutofillDriver.CaretMovedInFormField": { + "definition": "CaretMovedInFormField(FormData form, FieldRendererId field_id, gfx.mojom.Rect caret_bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=38" + }, + "autofill.mojom.AutofillDriver.TextFieldValueChanged": { + "definition": "TextFieldValueChanged(FormData form, FieldRendererId field_id, mojo_base.mojom.TimeTicks timestamp);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=54" + }, + "autofill.mojom.AutofillDriver.DidEndTextFieldEditing": { + "definition": "DidEndTextFieldEditing();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=63" + }, + "autofill.mojom.AutofillDriver.TextFieldDidScroll": { + "definition": "TextFieldDidScroll(FormData form, FieldRendererId field_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=69" + }, + "autofill.mojom.AutofillDriver.SelectControlSelectionChanged": { + "definition": "SelectControlSelectionChanged(FormData form, FieldRendererId field_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=81" + }, + "autofill.mojom.AutofillDriver.SelectFieldOptionsDidChange": { + "definition": "SelectFieldOptionsDidChange(FormData form);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=85" + }, + "autofill.mojom.AutofillDriver.FocusOnFormField": { + "definition": "FocusOnFormField(FormData form, FieldRendererId field_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=96" + }, + "autofill.mojom.AutofillDriver.FocusOnNonFormField": { + "definition": "FocusOnNonFormField();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=97" + }, + "autofill.mojom.AutofillDriver.AskForValuesToFill": { + "definition": "AskForValuesToFill(FormData form, FieldRendererId field_id, gfx.mojom.Rect caret_bounds, AutofillSuggestionTriggerSource trigger_source, PasswordSuggestionRequest? password_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=111" + }, + "autofill.mojom.AutofillDriver.HidePopup": { + "definition": "HidePopup();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=118" + }, + "autofill.mojom.AutofillDriver.DidAutofillForm": { + "definition": "DidAutofillForm(FormData form, mojo_base.mojom.TimeTicks timestamp);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=121" + }, + "autofill.mojom.AutofillDriver.JavaScriptChangedAutofilledValue": { + "definition": "JavaScriptChangedAutofilledValue(FormData form, FieldRendererId field_id, mojo_base.mojom.String16 old_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=133" + }, + "autofill.mojom.PasswordManagerDriver.PasswordFormsParsed": { + "definition": "PasswordFormsParsed(array forms_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=144" + }, + "autofill.mojom.PasswordManagerDriver.PasswordFormsRendered": { + "definition": "PasswordFormsRendered(array visible_forms_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=148" + }, + "autofill.mojom.PasswordManagerDriver.PasswordFormSubmitted": { + "definition": "PasswordFormSubmitted(FormData form_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=151" + }, + "autofill.mojom.PasswordManagerDriver.InformAboutUserInput": { + "definition": "InformAboutUserInput(FormData form_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=156" + }, + "autofill.mojom.PasswordManagerDriver.DynamicFormSubmission": { + "definition": "DynamicFormSubmission(SubmissionIndicatorEvent submission_indication_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=161" + }, + "autofill.mojom.PasswordManagerDriver.PasswordFormCleared": { + "definition": "PasswordFormCleared(FormData form_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=165" + }, + "autofill.mojom.PasswordManagerDriver.RecordSavePasswordProgress": { + "definition": "RecordSavePasswordProgress(string log);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=171" + }, + "autofill.mojom.PasswordManagerDriver.UserModifiedPasswordField": { + "definition": "UserModifiedPasswordField();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=175" + }, + "autofill.mojom.PasswordManagerDriver.UserModifiedNonPasswordField": { + "definition": "UserModifiedNonPasswordField( FieldRendererId renderer_id, mojo_base.mojom.String16 value, bool autocomplete_attribute_has_username, bool is_likely_otp);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=179" + }, + "autofill.mojom.PasswordManagerDriver.ShowPasswordSuggestions": { + "definition": "ShowPasswordSuggestions(PasswordSuggestionRequest request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=193" + }, + "autofill.mojom.PasswordManagerDriver.CheckSafeBrowsingReputation": { + "definition": "CheckSafeBrowsingReputation( url.mojom.Url form_action, url.mojom.Url frame_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=197" + }, + "autofill.mojom.PasswordManagerDriver.FocusedInputChanged": { + "definition": "FocusedInputChanged(FieldRendererId focused_field_id, FocusedFieldType focused_field_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=202" + }, + "autofill.mojom.PasswordManagerDriver.LogFirstFillingResult": { + "definition": "LogFirstFillingResult(FormRendererId form_renderer_id, int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=210" + }, + "autofill.mojom.PasswordGenerationDriver.AutomaticGenerationAvailable": { + "definition": "AutomaticGenerationAvailable( PasswordGenerationUIData password_generation_ui_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=218" + }, + "autofill.mojom.PasswordGenerationDriver.PresaveGeneratedPassword": { + "definition": "PresaveGeneratedPassword(FormData form_data, mojo_base.mojom.String16 password_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=222" + }, + "autofill.mojom.PasswordGenerationDriver.PasswordNoLongerGenerated": { + "definition": "PasswordNoLongerGenerated(FormData form_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=227" + }, + "autofill.mojom.PasswordGenerationDriver.ShowPasswordEditingPopup": { + "definition": "[EnableIfNot=is_android] ShowPasswordEditingPopup( gfx.mojom.RectF bounds, FormData form_data, FieldRendererId field_renderer_id, mojo_base.mojom.String16 password_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=234" + }, + "autofill.mojom.PasswordGenerationDriver.PasswordGenerationRejectedByTyping": { + "definition": "[EnableIfNot=is_android] PasswordGenerationRejectedByTyping();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=245" + }, + "autofill.mojom.PasswordGenerationDriver.FrameWasScrolled": { + "definition": "[EnableIfNot=is_android] FrameWasScrolled();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=251" + }, + "autofill.mojom.PasswordGenerationDriver.GenerationElementLostFocus": { + "definition": "[EnableIfNot=is_android] GenerationElementLostFocus();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/content/common/mojom/autofill_driver.mojom;l=257" + }, + "autofill.mojom.EntityTypeName": { + "definition": "enum EntityTypeName { kPassport = 0, kDriversLicense = 1, kVehicle = 2, kNationalIdCard = 3, kKnownTravelerNumber = 4, kRedressNumber = 5, kFlightReservation = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/browser/data_model/autofill_ai/autofill_ai_enums.mojom;l=11" + }, + "autofill_ml_internals.mojom.Page.OnLogAdded": { + "definition": "OnLogAdded(MlPredictionLog log);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/browser/ml_model/logging/autofill_ml_internals.mojom;l=51" + }, + "autofill_ml_internals.mojom.PageHandler.SetPage": { + "definition": "SetPage(pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/browser/ml_model/logging/autofill_ml_internals.mojom;l=59" + }, + "autofill_ml_internals.mojom.SelectOption": { + "definition": "struct SelectOption { string value; string text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/browser/ml_model/logging/autofill_ml_internals.mojom;l=16" + }, + "autofill_ml_internals.mojom.MlFieldPredictionLog": { + "definition": "struct MlFieldPredictionLog { string label; string placeholder; string name; string id; string autocomplete; string form_control_type; array select_options; array? probabilities; array tokenized_field_representation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/browser/ml_model/logging/autofill_ml_internals.mojom;l=22" + }, + "autofill_ml_internals.mojom.MlPredictionLog": { + "definition": "struct MlPredictionLog { string form_signature; url.mojom.Url form_url; array model_output_types; array field_predictions; mojo_base.mojom.Time start_time; mojo_base.mojom.Time end_time; mojo_base.mojom.TimeDelta duration; OptimizationTarget optimization_target;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/browser/ml_model/logging/autofill_ml_internals.mojom;l=36" + }, + "autofill_ml_internals.mojom.OptimizationTarget": { + "definition": "enum OptimizationTarget { kUnknown, kAutofill, kPassword,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/browser/ml_model/logging/autofill_ml_internals.mojom;l=10" + }, + "autofill.mojom.FrameToken": { + "definition": "struct FrameToken { mojo_base.mojom.UnguessableToken token; bool is_local;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=251" + }, + "autofill.mojom.FrameTokenWithPredecessor": { + "definition": "struct FrameTokenWithPredecessor { FrameToken token; int32 predecessor;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=260" + }, + "autofill.mojom.FormRendererId": { + "definition": "struct FormRendererId { uint64 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=266" + }, + "autofill.mojom.FieldRendererId": { + "definition": "struct FieldRendererId { uint64 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=271" + }, + "autofill.mojom.SelectOption": { + "definition": "struct SelectOption { mojo_base.mojom.String16 value; mojo_base.mojom.String16 text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=276" + }, + "autofill.mojom.AutocompleteParsingResult": { + "definition": "struct AutocompleteParsingResult { string section; HtmlFieldMode mode; HtmlFieldType field_type; bool webauthn; bool webidentity;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=283" + }, + "autofill.mojom.FormFieldData": { + "definition": "struct FormFieldData { mojo_base.mojom.String16 label; mojo_base.mojom.String16 name; mojo_base.mojom.String16 id_attribute; mojo_base.mojom.String16 name_attribute; mojo_base.mojom.String16 value; mojo_base.mojom.String16 selected_text; FormControlType form_control_type; string autocomplete_attribute; AutocompleteParsingResult? parsed_autocomplete; mojo_base.mojom.String16 pattern; mojo_base.mojom.String16 placeholder; mojo_base.mojom.String16 css_classes; mojo_base.mojom.String16 aria_label; mojo_base.mojom.String16 aria_description; mojo_base.mojom.String16 nonce; FieldRendererId renderer_id; FormRendererId host_form_id; uint32 properties_mask; int32 form_control_ax_id; uint64 max_length; bool is_user_edited; bool is_autofilled; CheckStatus check_status; bool is_focusable; bool is_visible; bool should_autocomplete; RoleAttribute role; mojo_base.mojom.TextDirection text_direction; bool is_enabled; bool is_readonly; mojo_base.mojom.String16 user_input; bool allows_writing_suggestions; array options; LabelSource label_source; gfx.mojom.RectF bounds; array datalist_options; bool force_override;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=292" + }, + "autofill.mojom.FormFieldData_FillData": { + "definition": "struct FormFieldData_FillData { mojo_base.mojom.String16 value; FieldRendererId renderer_id; FormRendererId host_form_id; bool is_autofilled; bool force_override;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=378" + }, + "autofill.mojom.ButtonTitleInfo": { + "definition": "struct ButtonTitleInfo { mojo_base.mojom.String16 title; ButtonTitleType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=387" + }, + "autofill.mojom.FormData": { + "definition": "struct FormData { mojo_base.mojom.String16 id_attribute; mojo_base.mojom.String16 name_attribute; mojo_base.mojom.String16 name; array button_titles; url.mojom.Url action; bool is_action_empty; FormRendererId renderer_id; array child_frames; SubmissionIndicatorEvent submission_event; array fields; array username_predictions; bool is_gaia_with_skip_save_password_form; bool likely_contains_captcha;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=393" + }, + "autofill.mojom.FormFieldDataPredictions": { + "definition": "struct FormFieldDataPredictions { string host_form_signature; string signature; string heuristic_type; string? server_type; string html_type; string overall_type; string attribute_types; string format_string; string parseable_name; string parseable_label; string section; uint32 rank; uint32 rank_in_signature_group; uint32 rank_in_host_form; uint32 rank_in_host_form_signature_group;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=411" + }, + "autofill.mojom.FormDataPredictions": { + "definition": "struct FormDataPredictions { FormData data; string signature; string alternative_signature; array fields;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=433" + }, + "autofill.mojom.PasswordAndMetadata": { + "definition": "struct PasswordAndMetadata { mojo_base.mojom.String16 username_value; mojo_base.mojom.String16 password_value; string realm; bool uses_account_store; bool is_grouped_affiliation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=442" + }, + "autofill.mojom.PasswordFormFillData": { + "definition": "struct PasswordFormFillData { FormRendererId form_renderer_id; url.mojom.Url url; FieldRendererId username_element_renderer_id; FieldRendererId password_element_renderer_id; PasswordAndMetadata preferred_login; array additional_logins; bool wait_for_username; array suggestion_banned_fields; bool notify_browser_of_successful_filling;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=452" + }, + "autofill.mojom.PasswordFormGenerationData": { + "definition": "struct PasswordFormGenerationData { FieldRendererId new_password_renderer_id; FieldRendererId confirmation_password_renderer_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=466" + }, + "autofill.mojom.PasswordGenerationUIData": { + "definition": "struct PasswordGenerationUIData { gfx.mojom.RectF bounds; int32 max_length; mojo_base.mojom.String16 generation_element; FieldRendererId generation_element_id; bool is_generation_element_password_type; mojo_base.mojom.TextDirection text_direction; FormData form_data; bool generation_rejected;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=473" + }, + "autofill.mojom.TriggeringField": { + "definition": "struct TriggeringField { FieldRendererId element_id; AutofillSuggestionTriggerSource trigger_source; mojo_base.mojom.TextDirection text_direction; mojo_base.mojom.String16 typed_username; bool show_webauthn_credentials; bool show_identity_credentials; gfx.mojom.RectF bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=486" + }, + "autofill.mojom.PasswordSuggestionRequest": { + "definition": "struct PasswordSuggestionRequest { TriggeringField field; FormData form_data; uint64 username_field_index; uint64 password_field_index;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=498" + }, + "autofill.mojom.ParsingResult": { + "definition": "struct ParsingResult { FieldRendererId username_renderer_id; FieldRendererId password_renderer_id; FieldRendererId new_password_renderer_id; FieldRendererId confirm_password_renderer_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=507" + }, + "autofill.mojom.FormControlType": { + "definition": "enum FormControlType { kContentEditable = 0, kInputCheckbox = 1, kInputEmail = 2, kInputMonth = 3, kInputNumber = 4, kInputPassword = 5, kInputRadio = 6, kInputSearch = 7, kInputTelephone = 8, kInputText = 9, kInputUrl = 10, kSelectOne = 11, kTextArea = 14, kInputDate = 15,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=17" + }, + "autofill.mojom.HtmlFieldMode": { + "definition": "enum HtmlFieldMode { kNone = 0, kBilling = 1, kShipping = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=38" + }, + "autofill.mojom.HtmlFieldType": { + "definition": "enum HtmlFieldType { kUnspecified = 0, kName = 1, kHonorificPrefix = 2, kGivenName = 3, kAdditionalName = 4, kFamilyName = 5, kOrganization = 6, kStreetAddress = 7, kAddressLine1 = 8, kAddressLine2 = 9, kAddressLine3 = 10, kAddressLevel1 = 11, kAddressLevel2 = 12, kAddressLevel3 = 13, kCountryCode = 14, kCountryName = 15, kPostalCode = 16, kCreditCardNameFull = 18, kCreditCardNameFirst = 19, kCreditCardNameLast = 20, kCreditCardNumber = 21, kCreditCardExp = 22, kCreditCardExpMonth = 23, kCreditCardExpYear = 24, kCreditCardVerificationCode = 25, kCreditCardType = 26, kTel = 27, kTelCountryCode = 28, kTelNational = 29, kTelAreaCode = 30, kTelLocal = 31, kTelLocalPrefix = 32, kTelLocalSuffix = 33, kTelExtension = 34, kEmail = 35, kBirthdateDay = 36, kBirthdateMonth = 37, kBirthdateYear = 38, kTransactionAmount = 39, kTransactionCurrency = 40, kAdditionalNameInitial = 41, kCreditCardExpDate2DigitYear = 42, kCreditCardExpDate4DigitYear = 43, kCreditCardExp2DigitYear = 44, kCreditCardExp4DigitYear = 45, kOneTimeCode = 47, kMerchantPromoCode = 48, kIban = 49, kUnrecognized = 50,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=46" + }, + "autofill.mojom.SubmissionIndicatorEvent": { + "definition": "enum SubmissionIndicatorEvent { NONE = 0, HTML_FORM_SUBMISSION = 1, SAME_DOCUMENT_NAVIGATION = 2, XHR_SUCCEEDED = 3, FRAME_DETACHED = 4, PROBABLE_FORM_SUBMISSION = 10, CHANGE_PASSWORD_FORM_CLEARED = 11, DOM_MUTATION_AFTER_AUTOFILL = 12,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=133" + }, + "autofill.mojom.SubmissionSource": { + "definition": "enum SubmissionSource { NONE = 0, SAME_DOCUMENT_NAVIGATION = 1, XHR_SUCCEEDED = 2, FRAME_DETACHED = 3, PROBABLY_FORM_SUBMITTED = 4, FORM_SUBMISSION = 5, DOM_MUTATION_AFTER_AUTOFILL = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=152" + }, + "autofill.mojom.FocusedFieldType": { + "definition": "enum FocusedFieldType { kUnknown, kUnfillableElement, kFillableTextArea, kFillableSearchField, kFillableNonSearchField, kFillableWebauthnTaggedField, kFillableUsernameField, kFillablePasswordField,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=177" + }, + "autofill.mojom.ButtonTitleType": { + "definition": "enum ButtonTitleType { NONE = 0, BUTTON_ELEMENT_SUBMIT_TYPE = 1, BUTTON_ELEMENT_BUTTON_TYPE = 2, INPUT_ELEMENT_SUBMIT_TYPE = 3, INPUT_ELEMENT_BUTTON_TYPE = 4, HYPERLINK = 5, DIV = 6, SPAN = 7 };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=191" + }, + "autofill.mojom.SubmissionReadinessState": { + "definition": "enum SubmissionReadinessState { kNoInformation = 0, kError = 1, kNoUsernameField = 2, kFieldBetweenUsernameAndPassword = 3, kFieldAfterPasswordField = 4, kEmptyFields = 5, kMoreThanTwoFields = 6, kTwoFields = 7, kNoPasswordField = 8, kLikelyHasCaptcha = 9,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=208" + }, + "autofill.mojom.CheckStatus": { + "definition": "enum CheckStatus { kNotCheckable, kCheckableButUnchecked, kChecked, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=293" + }, + "autofill.mojom.RoleAttribute": { + "definition": "enum RoleAttribute { kPresentation, kOther, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=300" + }, + "autofill.mojom.LabelSource": { + "definition": "enum LabelSource { kUnknown, kLabelTag, kPTag, kDivTable, kTdTag, kDdTag, kLiTag, kPlaceHolder, kAriaLabel, kCombined, kValue, kForId, kForName, kForShadowHostId, kForShadowHostName, kOverlayingLabel, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=308" + }, + "autofill.mojom.AutofillSuggestionAvailability": { + "definition": "enum AutofillSuggestionAvailability { kNoSuggestions, kAutofillAvailable, kAutocompleteAvailable,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=515" + }, + "autofill.mojom.ActionPersistence": { + "definition": "enum ActionPersistence { kFill, kPreview, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=529" + }, + "autofill.mojom.FormActionType": { + "definition": "enum FormActionType { kFill, kUndo, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=535" + }, + "autofill.mojom.FieldActionType": { + "definition": "enum FieldActionType { kReplaceAll, kReplaceSelection, kSelectAll, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=541" + }, + "autofill.mojom.AutofillSuggestionTriggerSource": { + "definition": "enum AutofillSuggestionTriggerSource { kUnspecified = 0, kFormControlElementClicked = 1, kTextareaFocusedWithoutClick = 2, kContentEditableClicked = 3, kTextFieldValueChanged = 4, kTextFieldDidReceiveKeyDown = 5, kOpenTextDataListChooser = 6, kPasswordManager = 8, kiOS = 9, kManualFallbackPasswords = 12, kManualFallbackPlusAddresses = 13, kComposeDialogLostFocus = 15, kComposeDelayedProactiveNudge = 16, kPasswordManagerProcessedFocusedField = 17, kPlusAddressUpdatedInBrowserProcess = 19, kProactivePasswordRecovery = 20};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/autofill_types.mojom;l=557" + }, + "autofill.mojom.TypeTraitsTest.PassFormData": { + "definition": "PassFormData(FormData s) => (FormData passed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/test_autofill_types.mojom;l=10" + }, + "autofill.mojom.TypeTraitsTest.PassFormFieldData": { + "definition": "PassFormFieldData(FormFieldData s) => (FormFieldData passed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/test_autofill_types.mojom;l=11" + }, + "autofill.mojom.TypeTraitsTest.PassFormDataPredictions": { + "definition": "PassFormDataPredictions(FormDataPredictions s) => (FormDataPredictions passed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/test_autofill_types.mojom;l=12" + }, + "autofill.mojom.TypeTraitsTest.PassFormFieldDataPredictions": { + "definition": "PassFormFieldDataPredictions(FormFieldDataPredictions s) => (FormFieldDataPredictions passed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/test_autofill_types.mojom;l=14" + }, + "autofill.mojom.TypeTraitsTest.PassPasswordFormFillData": { + "definition": "PassPasswordFormFillData(PasswordFormFillData s) => (PasswordFormFillData passed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/test_autofill_types.mojom;l=16" + }, + "autofill.mojom.TypeTraitsTest.PassPasswordFormGenerationData": { + "definition": "PassPasswordFormGenerationData(PasswordFormGenerationData s) => (PasswordFormGenerationData passed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/test_autofill_types.mojom;l=18" + }, + "autofill.mojom.TypeTraitsTest.PassPasswordGenerationUIData": { + "definition": "PassPasswordGenerationUIData(PasswordGenerationUIData s) => (PasswordGenerationUIData passed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/test_autofill_types.mojom;l=20" + }, + "autofill.mojom.TypeTraitsTest.PassPasswordSuggestionRequest": { + "definition": "PassPasswordSuggestionRequest(PasswordSuggestionRequest s) => (PasswordSuggestionRequest passed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/autofill/core/common/mojom/test_autofill_types.mojom;l=22" + }, + "tabs_api.mojom.TabsObserver.OnTabEvents": { + "definition": "OnTabEvents(array events);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api.mojom;l=101" + }, + "tabs_api.mojom.TabsSnapshot": { + "definition": "struct TabsSnapshot { Container tab_strip; pending_associated_receiver stream;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api.mojom;l=15" + }, + "tabs_api.mojom.TabsEvent": { + "definition": "union TabsEvent { OnTabsCreatedEvent tabs_created_event; OnTabsClosedEvent tabs_closed_event; OnNodeMovedEvent node_moved_event; OnDataChangedEvent data_changed_event; OnCollectionCreatedEvent collection_created_event;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api.mojom;l=73" + }, + "tabs_api.mojom.Image": { + "definition": "struct Image { url.mojom.Url data_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=12" + }, + "tabs_api.mojom.Tab": { + "definition": "struct Tab { NodeId id; string title; url.mojom.Url url; Image favicon; array alert_states; NetworkState network_state; bool is_active; bool is_selected; bool is_blocked;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=46" + }, + "tabs_api.mojom.TabStrip": { + "definition": "struct TabStrip { NodeId id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=66" + }, + "tabs_api.mojom.PinnedTabs": { + "definition": "struct PinnedTabs { NodeId id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=72" + }, + "tabs_api.mojom.UnpinnedTabs": { + "definition": "struct UnpinnedTabs { NodeId id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=78" + }, + "tabs_api.mojom.TabGroup": { + "definition": "struct TabGroup { NodeId id; TabGroupVisualData data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=84" + }, + "tabs_api.mojom.TabGroupVisualData": { + "definition": "struct TabGroupVisualData { string title; tab_groups.mojom.Color color; bool is_collapsed;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=93" + }, + "tabs_api.mojom.SplitTab": { + "definition": "struct SplitTab { NodeId id; SplitTabVisualData data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=99" + }, + "tabs_api.mojom.SplitTabVisualData": { + "definition": "struct SplitTabVisualData { Layout layout; double split_ratio;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=104" + }, + "tabs_api.mojom.Container": { + "definition": "struct Container { Data data; array children;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=130" + }, + "tabs_api.mojom.TabCreatedContainer": { + "definition": "struct TabCreatedContainer { Tab tab; Position position;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=138" + }, + "tabs_api.mojom.AlertState": { + "definition": "enum AlertState { kAudioMuting, kAudioRecording, kAudioPlaying, kBluetoothConnected, kBluetoothScanActive, kDesktopCapturing, kActorAccessing, kActorWaitingOnUser, kGlicAccessing, kGlicSharing, kHidConnected, kMediaRecording, kPipPlaying, kSerialConnected, kTabCapturing, kUsbConnected, kVideoRecording, kVrPresentingInHeadset,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=18" + }, + "tabs_api.mojom.NetworkState": { + "definition": "enum NetworkState { kNone, kWaiting, kLoading, kError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=39" + }, + "tabs_api.mojom.Layout": { + "definition": "enum Layout { kVertical, kHorizontal, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=105" + }, + "tabs_api.mojom.Data": { + "definition": "union Data { Tab tab; TabStrip tab_strip; PinnedTabs pinned_tabs; UnpinnedTabs unpinned_tabs; TabGroup tab_group; SplitTab split_tab;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_data_model.mojom;l=117" + }, + "tabs_api.mojom.OnTabsCreatedEvent": { + "definition": "struct OnTabsCreatedEvent { array tabs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_events.mojom;l=10" + }, + "tabs_api.mojom.OnTabsClosedEvent": { + "definition": "struct OnTabsClosedEvent { array tabs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_events.mojom;l=15" + }, + "tabs_api.mojom.OnDataChangedEvent": { + "definition": "struct OnDataChangedEvent { Data data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_events.mojom;l=20" + }, + "tabs_api.mojom.OnCollectionCreatedEvent": { + "definition": "struct OnCollectionCreatedEvent { Data data; Position position;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_events.mojom;l=26" + }, + "tabs_api.mojom.OnNodeMovedEvent": { + "definition": "struct OnNodeMovedEvent { NodeId id; Position from; Position to;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_events.mojom;l=35" + }, + "tabs_api.mojom.NodeId": { + "definition": "struct NodeId { string id; Type type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_types.mojom;l=9" + }, + "tabs_api.mojom.Position": { + "definition": "struct Position { NodeId? parent_id; uint32 index;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_types.mojom;l=33" + }, + "tabs_api.mojom.Type": { + "definition": "enum Type { kUnknown, kContent, kCollection, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browser_apis/tab_strip/tab_strip_api_types.mojom;l=11" + }, + "browsing_topics.mojom.PageHandler.GetBrowsingTopicsConfiguration": { + "definition": "GetBrowsingTopicsConfiguration() => (WebUIBrowsingTopicsConfiguration config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=154" + }, + "browsing_topics.mojom.PageHandler.GetBrowsingTopicsState": { + "definition": "GetBrowsingTopicsState(bool calculate_now) => (WebUIGetBrowsingTopicsStateResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=158" + }, + "browsing_topics.mojom.PageHandler.GetModelInfo": { + "definition": "GetModelInfo() => (WebUIGetModelInfoResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=162" + }, + "browsing_topics.mojom.PageHandler.ClassifyHosts": { + "definition": "ClassifyHosts(array hosts) => (array> topics_for_hosts);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=177" + }, + "browsing_topics.mojom.WebUIBrowsingTopicsConfiguration": { + "definition": "struct WebUIBrowsingTopicsConfiguration { bool browsing_topics_enabled; bool privacy_sandbox_ads_apis_override_enabled; bool override_privacy_sandbox_settings_local_testing_enabled; bool browsing_topics_bypass_ip_is_publicly_routable_check_enabled; bool browsing_topics_document_api_enabled; int32 config_version; bool browsing_topics_parameters_enabled; int32 number_of_epochs_to_expose; mojo_base.mojom.TimeDelta time_period_per_epoch; int32 number_of_top_topics_per_epoch; int32 use_random_topic_probability_percent; mojo_base.mojom.TimeDelta max_epoch_introduction_delay; int32 number_of_epochs_of_observation_data_to_use_for_filtering; int32 max_number_of_api_usage_context_domains_to_keep_per_topic; int32 max_number_of_api_usage_context_entries_to_load_per_epoch; int32 max_number_of_api_usage_context_domains_to_store_per_page_load; int32 taxonomy_version; string disabled_topics_list;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=12" + }, + "browsing_topics.mojom.WebUITopic": { + "definition": "struct WebUITopic { int32 topic_id; mojo_base.mojom.String16 topic_name; bool is_real_topic; array observed_by_domains;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=87" + }, + "browsing_topics.mojom.WebUIEpoch": { + "definition": "struct WebUIEpoch { array topics; mojo_base.mojom.Time calculation_time; string model_version; string taxonomy_version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=104" + }, + "browsing_topics.mojom.WebUIBrowsingTopicsState": { + "definition": "struct WebUIBrowsingTopicsState { array epochs; mojo_base.mojom.Time next_scheduled_calculation_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=119" + }, + "browsing_topics.mojom.WebUIModelInfo": { + "definition": "struct WebUIModelInfo { string model_version; string model_file_path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=138" + }, + "browsing_topics.mojom.WebUIGetBrowsingTopicsStateResult": { + "definition": "union WebUIGetBrowsingTopicsStateResult { string override_status_message; WebUIBrowsingTopicsState browsing_topics_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=128" + }, + "browsing_topics.mojom.WebUIGetModelInfoResult": { + "definition": "union WebUIGetModelInfoResult { string override_status_message; WebUIModelInfo model_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/browsing_topics/mojom/browsing_topics_internals.mojom;l=144" + }, + "cast_streaming.mojom.AudioBufferRequester.GetBuffer": { + "definition": "GetBuffer() => (GetAudioBufferResponse? buffer_response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=67" + }, + "cast_streaming.mojom.AudioBufferRequester.EnableBitstreamConverter": { + "definition": "EnableBitstreamConverter() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=71" + }, + "cast_streaming.mojom.VideoBufferRequester.GetBuffer": { + "definition": "GetBuffer() => (GetVideoBufferResponse? buffer_response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=79" + }, + "cast_streaming.mojom.VideoBufferRequester.EnableBitstreamConverter": { + "definition": "EnableBitstreamConverter() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=82" + }, + "cast_streaming.mojom.DemuxerConnector.EnableReceiver": { + "definition": "EnableReceiver() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=112" + }, + "cast_streaming.mojom.DemuxerConnector.OnStreamsInitialized": { + "definition": "OnStreamsInitialized( AudioStreamInitializationInfo? audio_buffer_requester, VideoStreamInitializationInfo? video_buffer_requester);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=117" + }, + "cast_streaming.mojom.AudioStreamInfo": { + "definition": "struct AudioStreamInfo { media.mojom.AudioDecoderConfig decoder_config; handle data_pipe;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=10" + }, + "cast_streaming.mojom.VideoStreamInfo": { + "definition": "struct VideoStreamInfo { media.mojom.VideoDecoderConfig decoder_config; handle data_pipe;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=19" + }, + "cast_streaming.mojom.AudioStreamInitializationInfo": { + "definition": "struct AudioStreamInitializationInfo { pending_remote buffer_requester; AudioStreamInfo stream_initialization_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=86" + }, + "cast_streaming.mojom.VideoStreamInitializationInfo": { + "definition": "struct VideoStreamInitializationInfo { pending_remote buffer_requester; VideoStreamInfo stream_initialization_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=96" + }, + "cast_streaming.mojom.GetAudioBufferResponse": { + "definition": "union GetAudioBufferResponse { AudioStreamInfo stream_info; media.mojom.DecoderBuffer buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=29" + }, + "cast_streaming.mojom.GetVideoBufferResponse": { + "definition": "union GetVideoBufferResponse { VideoStreamInfo stream_info; media.mojom.DecoderBuffer buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/demuxer_connector.mojom;l=36" + }, + "cast_streaming.mojom.RendererController.SetPlaybackController": { + "definition": "SetPlaybackController(pending_receiver renderer) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/cast_streaming/common/public/mojom/renderer_controller.mojom;l=21" + }, + "chromeos_camera.mojom.DmaBufPlane": { + "definition": "struct DmaBufPlane { handle fd_handle; int32 stride; uint32 offset; uint32 size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/dmabuf.mojom;l=13" + }, + "chromeos_camera.mojom.DmaBufVideoFrame": { + "definition": "struct DmaBufVideoFrame { media.mojom.VideoPixelFormat format; uint32 coded_width; uint32 coded_height; array planes; [MinVersion=1] bool has_modifier; [MinVersion=1] uint64 modifier;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/dmabuf.mojom;l=25" + }, + "chromeos_camera.mojom.JpegEncodeAccelerator.Initialize": { + "definition": "Initialize() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/jpeg_encode_accelerator.mojom;l=28" + }, + "chromeos_camera.mojom.JpegEncodeAccelerator.EncodeWithFD": { + "definition": "EncodeWithFD(int32 task_id, handle input_fd, uint32 input_buffer_size, int32 coded_size_width, int32 coded_size_height, handle exif_fd, uint32 exif_buffer_size, handle output_fd, uint32 output_buffer_size) => (int32 task_id, uint32 encoded_buffer_size, EncodeStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/jpeg_encode_accelerator.mojom;l=46" + }, + "chromeos_camera.mojom.JpegEncodeAccelerator.EncodeWithDmaBuf": { + "definition": "EncodeWithDmaBuf( int32 task_id, uint32 input_format, array input_planes, array output_planes, handle exif_handle, uint32 exif_buffer_size, int32 coded_size_width, int32 coded_size_height, int32 quality, [MinVersion=1] bool has_input_modifier, [MinVersion=1] uint64 input_modifier) => (uint32 encoded_buffer_size, EncodeStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/jpeg_encode_accelerator.mojom;l=67" + }, + "chromeos_camera.mojom.EncodeStatus": { + "definition": "enum EncodeStatus { ENCODE_OK, HW_JPEG_ENCODE_NOT_SUPPORTED, THREAD_CREATION_FAILED, INVALID_ARGUMENT, INACCESSIBLE_OUTPUT_BUFFER, PARSE_IMAGE_FAILED, PLATFORM_FAILURE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/jpeg_encode_accelerator.mojom;l=13" + }, + "chromeos_camera.mojom.MjpegDecodeAccelerator.Initialize@0": { + "definition": "Initialize@0() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/mjpeg_decode_accelerator.mojom;l=43" + }, + "chromeos_camera.mojom.MjpegDecodeAccelerator.Decode@1": { + "definition": "Decode@1(BitstreamBuffer input_buffer, gfx.mojom.Size coded_size, handle output_handle, uint32 output_buffer_size) => (int32 bitstream_buffer_id, DecodeError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/mjpeg_decode_accelerator.mojom;l=54" + }, + "chromeos_camera.mojom.MjpegDecodeAccelerator.DecodeWithDmaBuf@3": { + "definition": "DecodeWithDmaBuf@3(int32 task_id, handle src_dmabuf_fd, uint32 src_size, uint32 src_offset, DmaBufVideoFrame dst_frame) => (DecodeError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/mjpeg_decode_accelerator.mojom;l=63" + }, + "chromeos_camera.mojom.MjpegDecodeAccelerator.Uninitialize@4": { + "definition": "Uninitialize@4();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/mjpeg_decode_accelerator.mojom;l=69" + }, + "chromeos_camera.mojom.BitstreamBuffer": { + "definition": "struct BitstreamBuffer { int32 id; handle memory_handle; uint32 size; int64 offset; mojo_base.mojom.TimeDelta timestamp; string key_id; string iv; array subsamples;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/mjpeg_decode_accelerator.mojom;l=24" + }, + "chromeos_camera.mojom.DecodeError": { + "definition": "enum DecodeError { NO_ERRORS, INVALID_ARGUMENT, UNREADABLE_INPUT, PARSE_JPEG_FAILED, UNSUPPORTED_JPEG, PLATFORM_FAILURE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/chromeos_camera/common/mjpeg_decode_accelerator.mojom;l=13" + }, + "commerce.mojom.CommerceInternalsHandlerFactory.CreateCommerceInternalsHandler": { + "definition": "CreateCommerceInternalsHandler( pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=34" + }, + "commerce.mojom.CommerceInternalsHandler.GetIsShoppingListEligible": { + "definition": "GetIsShoppingListEligible() => (bool eligible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=60" + }, + "commerce.mojom.CommerceInternalsHandler.ResetPriceTrackingEmailPref": { + "definition": "ResetPriceTrackingEmailPref();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=64" + }, + "commerce.mojom.CommerceInternalsHandler.GetProductInfoForUrl": { + "definition": "GetProductInfoForUrl(url.mojom.Url url) => (commerce.shared.mojom.ProductInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=66" + }, + "commerce.mojom.CommerceInternalsHandler.GetSubscriptionDetails": { + "definition": "GetSubscriptionDetails() => (array subscriptions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=69" + }, + "commerce.mojom.CommerceInternalsHandler.GetProductSpecificationsDetails": { + "definition": "GetProductSpecificationsDetails() => (array product_specifications_set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=72" + }, + "commerce.mojom.CommerceInternalsHandler.ResetProductSpecifications": { + "definition": "ResetProductSpecifications();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=76" + }, + "commerce.mojom.CommerceInternalsHandler.GetShoppingEligibilityDetails": { + "definition": "GetShoppingEligibilityDetails() => (ShoppingEligibilityDetails details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=78" + }, + "commerce.mojom.CommerceInternalsPage.OnShoppingListEligibilityChanged": { + "definition": "OnShoppingListEligibilityChanged(bool eligible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=85" + }, + "commerce.mojom.EligibilityDetail": { + "definition": "struct EligibilityDetail { string name; bool value; bool expected_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=13" + }, + "commerce.mojom.ShoppingEligibilityDetails": { + "definition": "struct ShoppingEligibilityDetails { string country; string locale; array details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=25" + }, + "commerce.mojom.Subscription": { + "definition": "struct Subscription { uint64 cluster_id; array product_infos;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=39" + }, + "commerce.mojom.ProductSpecificationsSet": { + "definition": "struct ProductSpecificationsSet { string uuid; string name; string creation_time; string update_time; array url_infos;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/internals/mojom/commerce_internals.mojom;l=47" + }, + "commerce_web_extractor.mojom.CommerceWebExtractor.ExtractMetaInfo": { + "definition": "ExtractMetaInfo() => (mojo_base.mojom.Value result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/commerce_web_extractor.mojom;l=15" + }, + "commerce.price_insights.mojom.PriceInsightsHandler.ShowSidePanelUI": { + "definition": "ShowSidePanelUI();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_insights.mojom;l=11" + }, + "commerce.price_insights.mojom.PriceInsightsHandler.ShowFeedback": { + "definition": "ShowFeedback();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_insights.mojom;l=14" + }, + "commerce.price_insights.mojom.PriceInsightsHandlerFactory.CreatePriceInsightsHandler": { + "definition": "CreatePriceInsightsHandler( pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_insights.mojom;l=20" + }, + "commerce.price_tracking.mojom.PriceTrackingHandler.TrackPriceForBookmark": { + "definition": "TrackPriceForBookmark(int64 bookmark_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=13" + }, + "commerce.price_tracking.mojom.PriceTrackingHandler.UntrackPriceForBookmark": { + "definition": "UntrackPriceForBookmark(int64 bookmark_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=16" + }, + "commerce.price_tracking.mojom.PriceTrackingHandler.SetPriceTrackingStatusForCurrentUrl": { + "definition": "SetPriceTrackingStatusForCurrentUrl(bool track);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=19" + }, + "commerce.price_tracking.mojom.PriceTrackingHandler.GetAllShoppingBookmarkProductInfo": { + "definition": "GetAllShoppingBookmarkProductInfo() => (array productInfos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=22" + }, + "commerce.price_tracking.mojom.PriceTrackingHandler.GetAllPriceTrackedBookmarkProductInfo": { + "definition": "GetAllPriceTrackedBookmarkProductInfo() => (array productInfos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=26" + }, + "commerce.price_tracking.mojom.PriceTrackingHandler.GetShoppingCollectionBookmarkFolderId": { + "definition": "GetShoppingCollectionBookmarkFolderId() => (int64 collectionId);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=30" + }, + "commerce.price_tracking.mojom.PriceTrackingHandler.GetParentBookmarkFolderNameForCurrentUrl": { + "definition": "GetParentBookmarkFolderNameForCurrentUrl() => (mojo_base.mojom.String16 name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=34" + }, + "commerce.price_tracking.mojom.PriceTrackingHandler.ShowBookmarkEditorForCurrentUrl": { + "definition": "ShowBookmarkEditorForCurrentUrl();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=39" + }, + "commerce.price_tracking.mojom.Page.PriceTrackedForBookmark": { + "definition": "PriceTrackedForBookmark( commerce.shared.mojom.BookmarkProductInfo bookmark_product);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=46" + }, + "commerce.price_tracking.mojom.Page.PriceUntrackedForBookmark": { + "definition": "PriceUntrackedForBookmark( commerce.shared.mojom.BookmarkProductInfo bookmark_product);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=51" + }, + "commerce.price_tracking.mojom.Page.OperationFailedForBookmark": { + "definition": "OperationFailedForBookmark( commerce.shared.mojom.BookmarkProductInfo bookmark_product, bool attempted_track);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=59" + }, + "commerce.price_tracking.mojom.Page.OnProductBookmarkMoved": { + "definition": "OnProductBookmarkMoved( commerce.shared.mojom.BookmarkProductInfo bookmark_product);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=65" + }, + "commerce.price_tracking.mojom.PriceTrackingHandlerFactory.CreatePriceTrackingHandler": { + "definition": "CreatePriceTrackingHandler( pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/price_tracking.mojom;l=73" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.SetAcceptedDisclosureVersion": { + "definition": "SetAcceptedDisclosureVersion(DisclosureVersion version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=24" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.MaybeShowDisclosure": { + "definition": "MaybeShowDisclosure(array urls, string name, string set_id) => (bool disclosure_shown);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=32" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.DeclineDisclosure": { + "definition": "DeclineDisclosure();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=37" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.ShowSyncSetupFlow": { + "definition": "ShowSyncSetupFlow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=40" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.GetPageTitleFromHistory": { + "definition": "GetPageTitleFromHistory(url.mojom.Url url) => (string title);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=43" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.ShowProductSpecificationsSetForUuid": { + "definition": "ShowProductSpecificationsSetForUuid(mojo_base.mojom.Uuid uuid, bool in_new_tab);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=48" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.ShowProductSpecificationsSetsForUuids": { + "definition": "ShowProductSpecificationsSetsForUuids( array uuids, ShowSetDisposition disposition);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=54" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.ShowComparePage": { + "definition": "ShowComparePage(bool in_new_tab);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=58" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandler.GetComparisonTableUrlForUuid": { + "definition": "GetComparisonTableUrlForUuid(mojo_base.mojom.Uuid uuid) => (url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=61" + }, + "commerce.product_specifications.mojom.Page.OnProductSpecificationsSetAdded": { + "definition": "OnProductSpecificationsSetAdded( commerce.shared.mojom.ProductSpecificationsSet set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=68" + }, + "commerce.product_specifications.mojom.Page.OnProductSpecificationsSetUpdated": { + "definition": "OnProductSpecificationsSetUpdated( commerce.shared.mojom.ProductSpecificationsSet set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=72" + }, + "commerce.product_specifications.mojom.Page.OnProductSpecificationsSetRemoved": { + "definition": "OnProductSpecificationsSetRemoved(mojo_base.mojom.Uuid uuid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=76" + }, + "commerce.product_specifications.mojom.Page.OnSyncStateChanged": { + "definition": "OnSyncStateChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=79" + }, + "commerce.product_specifications.mojom.ProductSpecificationsHandlerFactory.CreateProductSpecificationsHandler": { + "definition": "CreateProductSpecificationsHandler( pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=86" + }, + "commerce.product_specifications.mojom.DisclosureVersion": { + "definition": "enum DisclosureVersion { kUnknown = 0, kV1 = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=11" + }, + "commerce.product_specifications.mojom.ShowSetDisposition": { + "definition": "enum ShowSetDisposition { kInNewTabs = 0, kInNewWindow = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/product_specifications.mojom;l=16" + }, + "commerce.shared.mojom.ProductInfo": { + "definition": "struct ProductInfo { string title; string cluster_title; string domain; url.mojom.Url image_url; url.mojom.Url product_url; string current_price; string previous_price; uint64 cluster_id; array category_labels; string price_summary;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shared.mojom;l=13" + }, + "commerce.shared.mojom.BookmarkProductInfo": { + "definition": "struct BookmarkProductInfo { int64 bookmark_id; ProductInfo info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shared.mojom;l=52" + }, + "commerce.shared.mojom.ProductSpecificationsSet": { + "definition": "struct ProductSpecificationsSet { string name; mojo_base.mojom.Uuid uuid; array urls;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shared.mojom;l=62" + }, + "shopping_service.mojom.ShoppingServiceHandlerFactory.CreateShoppingServiceHandler": { + "definition": "CreateShoppingServiceHandler( pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=160" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetProductInfoForCurrentUrl": { + "definition": "GetProductInfoForCurrentUrl() => (commerce.shared.mojom.ProductInfo productInfo);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=168" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetProductInfoForUrl": { + "definition": "GetProductInfoForUrl(url.mojom.Url url) => (url.mojom.Url url, commerce.shared.mojom.ProductInfo productInfo);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=172" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetProductInfoForUrls": { + "definition": "GetProductInfoForUrls(array urls) => (array productInfos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=176" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetPriceInsightsInfoForCurrentUrl": { + "definition": "GetPriceInsightsInfoForCurrentUrl() => (PriceInsightsInfo priceInsightsInfo);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=180" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetPriceInsightsInfoForUrl": { + "definition": "GetPriceInsightsInfoForUrl(url.mojom.Url url) => (url.mojom.Url url, PriceInsightsInfo priceInsightsInfo);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=184" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetProductSpecificationsForUrls": { + "definition": "GetProductSpecificationsForUrls(array urls) => (ProductSpecifications productSpecs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=188" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetUrlInfosForProductTabs": { + "definition": "GetUrlInfosForProductTabs() => (array url_infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=193" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetUrlInfosForRecentlyViewedTabs": { + "definition": "GetUrlInfosForRecentlyViewedTabs() => (array url_infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=197" + }, + "shopping_service.mojom.ShoppingServiceHandler.IsShoppingListEligible": { + "definition": "IsShoppingListEligible() => (bool eligible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=200" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetPriceTrackingStatusForCurrentUrl": { + "definition": "GetPriceTrackingStatusForCurrentUrl() => (bool tracked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=203" + }, + "shopping_service.mojom.ShoppingServiceHandler.OpenUrlInNewTab": { + "definition": "OpenUrlInNewTab(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=206" + }, + "shopping_service.mojom.ShoppingServiceHandler.SwitchToOrOpenTab": { + "definition": "SwitchToOrOpenTab(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=209" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetAllProductSpecificationsSets": { + "definition": "GetAllProductSpecificationsSets() => ( array sets);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=212" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetProductSpecificationsSetByUuid": { + "definition": "GetProductSpecificationsSetByUuid(mojo_base.mojom.Uuid uuid) => (commerce.shared.mojom.ProductSpecificationsSet? set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=216" + }, + "shopping_service.mojom.ShoppingServiceHandler.AddProductSpecificationsSet": { + "definition": "AddProductSpecificationsSet(string name, array urls) => (commerce.shared.mojom.ProductSpecificationsSet? created_set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=220" + }, + "shopping_service.mojom.ShoppingServiceHandler.DeleteProductSpecificationsSet": { + "definition": "DeleteProductSpecificationsSet(mojo_base.mojom.Uuid uuid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=224" + }, + "shopping_service.mojom.ShoppingServiceHandler.SetNameForProductSpecificationsSet": { + "definition": "SetNameForProductSpecificationsSet(mojo_base.mojom.Uuid uuid, string name) => (commerce.shared.mojom.ProductSpecificationsSet? updated_set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=228" + }, + "shopping_service.mojom.ShoppingServiceHandler.SetUrlsForProductSpecificationsSet": { + "definition": "SetUrlsForProductSpecificationsSet(mojo_base.mojom.Uuid uuid, array urls) => ( commerce.shared.mojom.ProductSpecificationsSet? updated_set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=233" + }, + "shopping_service.mojom.ShoppingServiceHandler.SetProductSpecificationsUserFeedback": { + "definition": "SetProductSpecificationsUserFeedback(UserFeedback feedback);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=237" + }, + "shopping_service.mojom.ShoppingServiceHandler.GetProductSpecificationsFeatureState": { + "definition": "GetProductSpecificationsFeatureState() => (ProductSpecificationsFeatureState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=240" + }, + "shopping_service.mojom.PricePoint": { + "definition": "struct PricePoint { string date; float price; string formatted_price;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=13" + }, + "shopping_service.mojom.UrlInfo": { + "definition": "struct UrlInfo { string title; url.mojom.Url url; url.mojom.Url favicon_url; url.mojom.Url thumbnail_url; string previewText;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=19" + }, + "shopping_service.mojom.PriceInsightsInfo": { + "definition": "struct PriceInsightsInfo { uint64 cluster_id; string typical_low_price; string typical_high_price; string catalog_attributes; url.mojom.Url jackpot; PriceBucket bucket; bool has_multiple_catalogs; array history; string locale; string currency_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=37" + }, + "shopping_service.mojom.ProductSpecificationsDescriptionText": { + "definition": "struct ProductSpecificationsDescriptionText { string text; array urls;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=76" + }, + "shopping_service.mojom.ProductSpecificationsOption": { + "definition": "struct ProductSpecificationsOption { array descriptions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=84" + }, + "shopping_service.mojom.ProductSpecificationsDescription": { + "definition": "struct ProductSpecificationsDescription { array options; string label; string alt_text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=89" + }, + "shopping_service.mojom.ProductSpecificationsValue": { + "definition": "struct ProductSpecificationsValue { array specification_descriptions; array summary;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=100" + }, + "shopping_service.mojom.ProductSpecificationsProduct": { + "definition": "struct ProductSpecificationsProduct { uint64 product_cluster_id; string title; url.mojom.Url image_url; map product_dimension_values; array summary; url.mojom.Url buying_options_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=108" + }, + "shopping_service.mojom.ProductSpecificationsFeatureState": { + "definition": "struct ProductSpecificationsFeatureState { bool is_syncing_tab_compare; bool can_load_full_page_ui; bool can_manage_sets; bool can_fetch_data; bool is_allowed_for_enterprise; bool is_quality_logging_allowed; bool is_signed_in;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=129" + }, + "shopping_service.mojom.ProductSpecifications": { + "definition": "struct ProductSpecifications { map product_dimension_map; array products;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=141" + }, + "shopping_service.mojom.PriceBucket": { + "definition": "enum PriceBucket { kUnknown, kLow, kTypical, kHigh, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=38" + }, + "shopping_service.mojom.UserFeedback": { + "definition": "enum UserFeedback { kUnspecified, kThumbsUp, kThumbsDown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/commerce/core/mojom/shopping_service.mojom;l=150" + }, + "compose.mojom.ComposeStatus": { + "definition": "enum ComposeStatus { kOk = 0, kClientError = 1, kMisconfiguration = 5, kPermissionDenied = 6, kServerError = 7, kInvalidRequest = 8, kRequestThrottled = 9, kRetryableError = 10, kNonRetryableError = 11, kUnsupportedLanguage = 12, kFiltered = 13, kDisabled = 14, kCancelled = 15, kNoResponse = 16, kOffline = 17, kRequestTimeout = 18,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/compose/core/browser/compose_enums.mojom;l=11" + }, + "content_capture.mojom.ContentCaptureReceiver.DidCompleteBatchCaptureContent": { + "definition": "DidCompleteBatchCaptureContent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_capture/common/content_capture.mojom;l=31" + }, + "content_capture.mojom.ContentCaptureReceiver.DidCaptureContent": { + "definition": "DidCaptureContent(ContentCaptureData data, bool first_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_capture/common/content_capture.mojom;l=35" + }, + "content_capture.mojom.ContentCaptureReceiver.DidUpdateContent": { + "definition": "DidUpdateContent(ContentCaptureData data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_capture/common/content_capture.mojom;l=40" + }, + "content_capture.mojom.ContentCaptureReceiver.DidRemoveContent": { + "definition": "DidRemoveContent(array ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_capture/common/content_capture.mojom;l=43" + }, + "content_capture.mojom.ContentCaptureSender.StartCapture": { + "definition": "StartCapture();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_capture/common/content_capture.mojom;l=49" + }, + "content_capture.mojom.ContentCaptureSender.StopCapture": { + "definition": "StopCapture();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_capture/common/content_capture.mojom;l=50" + }, + "content_capture.mojom.ContentCaptureData": { + "definition": "struct ContentCaptureData { int64 id; mojo_base.mojom.String16 value; gfx.mojom.Rect bounds; array children;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_capture/common/content_capture_data.mojom;l=11" + }, + "content_settings.mojom.ContentSettingsAgent.SetAllowRunningInsecureContent": { + "definition": "SetAllowRunningInsecureContent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/common/content_settings_agent.mojom;l=13" + }, + "content_settings.mojom.ContentSettingsAgent.SendRendererContentSettingRules": { + "definition": "SendRendererContentSettingRules( RendererContentSettingRules renderer_settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/common/content_settings_agent.mojom;l=16" + }, + "content_settings.mojom.ContentSettingsManager.Clone": { + "definition": "Clone(pending_receiver clone);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/common/content_settings_manager.mojom;l=18" + }, + "content_settings.mojom.ContentSettingsManager.AllowStorageAccess": { + "definition": "[Sync] AllowStorageAccess( blink.mojom.LocalFrameToken frame_token, StorageType storage_type, url.mojom.Origin origin, network.mojom.SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin) => (bool allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/common/content_settings_manager.mojom;l=35" + }, + "content_settings.mojom.ContentSettingsManager.OnContentBlocked": { + "definition": "OnContentBlocked(blink.mojom.LocalFrameToken frame_token, ContentSettingsType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/common/content_settings_manager.mojom;l=45" + }, + "content_settings.mojom.StorageType": { + "definition": "enum StorageType { LOCAL_STORAGE, SESSION_STORAGE, FILE_SYSTEM, INDEXED_DB, CACHE, WEB_LOCKS, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/common/content_settings_manager.mojom;l=20" + }, + "content_settings.mojom.PatternParts": { + "definition": "struct PatternParts { string scheme; bool is_scheme_wildcard; string host; bool has_domain_wildcard; string port; bool is_port_wildcard; string path; bool is_path_wildcard;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings.mojom;l=12" + }, + "content_settings.mojom.ContentSettingsPattern": { + "definition": "struct ContentSettingsPattern { PatternParts parts; bool is_valid;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings.mojom;l=47" + }, + "content_settings.mojom.RuleMetaData": { + "definition": "struct RuleMetaData { mojo_base.mojom.Time last_modified; mojo_base.mojom.Time last_used; mojo_base.mojom.Time last_visited; mojo_base.mojom.Time expiration; SessionModel session_model; mojo_base.mojom.TimeDelta lifetime; TpcdMetadataRuleSource tpcd_metadata_rule_source; TpcdMetadataCohort tpcd_metadata_cohort; bool decided_by_related_website_sets; mojo_base.mojom.Value rule_options;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings.mojom;l=62" + }, + "content_settings.mojom.ContentSettingPatternSource": { + "definition": "struct ContentSettingPatternSource { ContentSettingsPattern primary_pattern; ContentSettingsPattern secondary_pattern; mojo_base.mojom.Value setting_value; RuleMetaData metadata; ProviderType source; bool incognito;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings.mojom;l=77" + }, + "content_settings.mojom.RendererContentSettingRules": { + "definition": "struct RendererContentSettingRules { array mixed_content_rules;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings.mojom;l=88" + }, + "content_settings.mojom.ContentSetting": { + "definition": "enum ContentSetting { DEFAULT = 0, ALLOW, BLOCK, ASK, SESSION_ONLY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings.mojom;l=53" + }, + "content_settings.mojom.TpcdMetadataRuleSource": { + "definition": "enum TpcdMetadataRuleSource { SOURCE_UNSPECIFIED = 0, SOURCE_TEST, SOURCE_1P_DT, SOURCE_3P_DT, SOURCE_DOGFOOD, SOURCE_CRITICAL_SECTOR, SOURCE_CUJ, SOURCE_GOV_EDU_TLD,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings_enums.mojom;l=11" + }, + "content_settings.mojom.TpcdMetadataCohort": { + "definition": "enum TpcdMetadataCohort { DEFAULT = 0, GRACE_PERIOD_FORCED_OFF, GRACE_PERIOD_FORCED_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings_enums.mojom;l=25" + }, + "content_settings.mojom.SessionModel": { + "definition": "enum SessionModel { DURABLE = 0, USER_SESSION = 1, ONE_TIME = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings_enums.mojom;l=47" + }, + "content_settings.mojom.ProviderType": { + "definition": "enum ProviderType { kWebuiAllowlistProvider = 0, kComponentExtensionProvider, kPolicyProvider, kSupervisedProvider, kCustomExtensionProvider, kInstalledWebappProvider, kNotificationAndroidProvider, kOneTimePermissionProvider, kPrefProvider, kJavascriptOptimizerAndroidProvider, kProviderForTests, kOtherProviderForTests, kDefaultProvider, kNone,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings_enums.mojom;l=69" + }, + "content_settings.mojom.ContentSettingsType": { + "definition": "enum ContentSettingsType { DEFAULT = -1, COOKIES = 0, IMAGES, JAVASCRIPT, POPUPS, GEOLOCATION, GEOLOCATION_WITH_OPTIONS, NOTIFICATIONS, AUTO_SELECT_CERTIFICATE, MIXEDSCRIPT, MEDIASTREAM_MIC, MEDIASTREAM_CAMERA, PROTOCOL_HANDLERS, DEPRECATED_PPAPI_BROKER, AUTOMATIC_DOWNLOADS, MIDI_SYSEX, SSL_CERT_DECISIONS, PROTECTED_MEDIA_IDENTIFIER, APP_BANNER, SITE_ENGAGEMENT, DURABLE_STORAGE, USB_CHOOSER_DATA, BLUETOOTH_GUARD, BACKGROUND_SYNC, AUTOPLAY, IMPORTANT_SITE_INFO, PERMISSION_AUTOBLOCKER_DATA, ADS, ADS_DATA, MIDI, PASSWORD_PROTECTION, MEDIA_ENGAGEMENT, SOUND, CLIENT_HINTS, SENSORS, DEPRECATED_ACCESSIBILITY_EVENTS, PAYMENT_HANDLER, USB_GUARD, BACKGROUND_FETCH, INTENT_PICKER_DISPLAY, IDLE_DETECTION, SERIAL_GUARD, SERIAL_CHOOSER_DATA, PERIODIC_BACKGROUND_SYNC, BLUETOOTH_SCANNING, HID_GUARD, HID_CHOOSER_DATA, WAKE_LOCK_SCREEN, WAKE_LOCK_SYSTEM, LEGACY_COOKIE_ACCESS, FILE_SYSTEM_WRITE_GUARD, NFC, BLUETOOTH_CHOOSER_DATA, CLIPBOARD_READ_WRITE, CLIPBOARD_SANITIZED_WRITE, SAFE_BROWSING_URL_CHECK_DATA, VR, AR, FILE_SYSTEM_READ_GUARD, STORAGE_ACCESS, CAMERA_PAN_TILT_ZOOM, WINDOW_MANAGEMENT, LOCAL_FONTS, PERMISSION_AUTOREVOCATION_DATA, FILE_SYSTEM_LAST_PICKED_DIRECTORY, DISPLAY_CAPTURE, FILE_SYSTEM_ACCESS_CHOOSER_DATA, FEDERATED_IDENTITY_SHARING, JAVASCRIPT_JIT, HTTP_ALLOWED, FORMFILL_METADATA, DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION, AUTO_DARK_WEB_CONTENT, REQUEST_DESKTOP_SITE, FEDERATED_IDENTITY_API, NOTIFICATION_INTERACTIONS, REDUCED_ACCEPT_LANGUAGE, NOTIFICATION_PERMISSION_REVIEW, FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS, REVOKED_UNUSED_SITE_PERMISSIONS, TOP_LEVEL_STORAGE_ACCESS, FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION, FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION, ANTI_ABUSE, THIRD_PARTY_STORAGE_PARTITIONING, HTTPS_ENFORCED, ALL_SCREEN_CAPTURE, COOKIE_CONTROLS_METADATA, TPCD_HEURISTICS_GRANTS, TPCD_METADATA_GRANTS, TPCD_TRIAL, AUTO_PICTURE_IN_PICTURE, FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION, FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, CAPTURED_SURFACE_CONTROL, SMART_CARD_GUARD, SMART_CARD_DATA, WEB_PRINTING, AUTOMATIC_FULLSCREEN, SUB_APP_INSTALLATION_PROMPTS, SPEAKER_SELECTION, DIRECT_SOCKETS, KEYBOARD_LOCK, POINTER_LOCK, REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS, TRACKING_PROTECTION, DISPLAY_MEDIA_SYSTEM_AUDIO, JAVASCRIPT_OPTIMIZER, STORAGE_ACCESS_HEADER_ORIGIN_TRIAL, HAND_TRACKING, WEB_APP_INSTALLATION, DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS, LEGACY_COOKIE_SCOPE, ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER, CONTROLLED_FRAME, REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS, LOCAL_NETWORK_ACCESS, ON_DEVICE_SPEECH_RECOGNITION_LANGUAGES_DOWNLOADED, INITIALIZED_TRANSLATIONS, SUSPICIOUS_NOTIFICATION_IDS, DEVICE_ATTRIBUTES, PERMISSION_ACTIONS_HISTORY, SUSPICIOUS_NOTIFICATION_SHOW_ORIGINAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/content_settings/core/common/content_settings_types.mojom;l=18" + }, + "continuous_search.mojom.SearchResultExtractor.ExtractCurrentSearchResults": { + "definition": "ExtractCurrentSearchResults(array result_types) => (Status status, CategoryResults results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/continuous_search/common/public/mojom/continuous_search.mojom;l=78" + }, + "continuous_search.mojom.SearchResult": { + "definition": "struct SearchResult { url.mojom.Url link; mojo_base.mojom.String16 title;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/continuous_search/common/public/mojom/continuous_search.mojom;l=14" + }, + "continuous_search.mojom.ResultGroup": { + "definition": "struct ResultGroup { ResultType type; array results;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/continuous_search/common/public/mojom/continuous_search.mojom;l=34" + }, + "continuous_search.mojom.CategoryResults": { + "definition": "struct CategoryResults { url.mojom.Url document_url; Category category_type = kNone; array groups;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/continuous_search/common/public/mojom/continuous_search.mojom;l=52" + }, + "continuous_search.mojom.ResultType": { + "definition": "enum ResultType { kSearchResults, kRelatedSearches};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/continuous_search/common/public/mojom/continuous_search.mojom;l=24" + }, + "continuous_search.mojom.Category": { + "definition": "enum Category { kNone, kOrganic,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/continuous_search/common/public/mojom/continuous_search.mojom;l=43" + }, + "continuous_search.mojom.Status": { + "definition": "enum Status { kSuccess, kNoResults, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/continuous_search/common/public/mojom/continuous_search.mojom;l=66" + }, + "data_sharing_internals.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/data_sharing/data_sharing_internals/webui/data_sharing_internals.mojom;l=14" + }, + "data_sharing_internals.mojom.PageHandler.IsEmptyService": { + "definition": "IsEmptyService() => (bool is_empty);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/data_sharing/data_sharing_internals/webui/data_sharing_internals.mojom;l=21" + }, + "data_sharing_internals.mojom.PageHandler.GetAllGroups": { + "definition": "GetAllGroups() => (bool is_success, array data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/data_sharing/data_sharing_internals/webui/data_sharing_internals.mojom;l=24" + }, + "data_sharing_internals.mojom.Page.OnLogMessageAdded": { + "definition": "OnLogMessageAdded(mojo_base.mojom.Time event_time, logger_common.mojom.LogSource log_source, string source_file, int32 source_line, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/data_sharing/data_sharing_internals/webui/data_sharing_internals.mojom;l=32" + }, + "logger_common.mojom.LogSource": { + "definition": "enum LogSource { Unknown, CollaborationService, DataSharingService, TabGroupSyncService, UI,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/data_sharing/public/logger_common.mojom;l=11" + }, + "data_sharing.mojom.GroupMember": { + "definition": "struct GroupMember { string gaia_id; string display_name; string email; MemberRole role; url.mojom.Url avatar_url; string given_name; mojo_base.mojom.JSTime creation_time; mojo_base.mojom.JSTime last_updated_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/data_sharing/public/protocol/group_data.mojom;l=23" + }, + "data_sharing.mojom.GroupData": { + "definition": "struct GroupData { string group_id; string display_name; array members; array former_members; string access_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/data_sharing/public/protocol/group_data.mojom;l=50" + }, + "data_sharing.mojom.MemberRole": { + "definition": "enum MemberRole { kUnspecified, kOwner, kMember, kInvitee, kFormerMember,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/data_sharing/public/protocol/group_data.mojom;l=14" + }, + "device_signals.mojom.SystemSignalsService.GetFileSystemSignals": { + "definition": "GetFileSystemSignals(array requests) => (array items);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=85" + }, + "device_signals.mojom.SystemSignalsService.GetAntiVirusSignals": { + "definition": "[EnableIf=is_win] GetAntiVirusSignals() => (array av_signals);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=90" + }, + "device_signals.mojom.SystemSignalsService.GetHotfixSignals": { + "definition": "[EnableIf=is_win] GetHotfixSignals() => (array hotfix_signals);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=95" + }, + "device_signals.mojom.ExecutableMetadata": { + "definition": "struct ExecutableMetadata { bool is_running; array? public_keys_hashes; string? product_name; string? version; bool is_os_verified; string? subject_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=29" + }, + "device_signals.mojom.FileSystemItem": { + "definition": "struct FileSystemItem { mojo_base.mojom.FilePath file_path; PresenceValue presence; mojo_base.mojom.ByteString? sha256_hash; ExecutableMetadata? executable_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=38" + }, + "device_signals.mojom.FileSystemItemRequest": { + "definition": "struct FileSystemItemRequest { mojo_base.mojom.FilePath file_path; bool compute_sha256; bool compute_executable_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=45" + }, + "device_signals.mojom.AntiVirusSignal": { + "definition": "struct AntiVirusSignal { string display_name; AntiVirusProductState state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=66" + }, + "device_signals.mojom.HotfixSignal": { + "definition": "struct HotfixSignal { string hotfix_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=72" + }, + "device_signals.mojom.PresenceValue": { + "definition": "enum PresenceValue { kUnspecified, kAccessDenied, kNotFound, kFound};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=12" + }, + "device_signals.mojom.AntiVirusProductState": { + "definition": "enum AntiVirusProductState { kOn, kOff, kSnoozed, kExpired};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/device_signals/core/common/mojom/system_signals.mojom;l=52" + }, + "payments.mojom.ItemDetails": { + "definition": "struct ItemDetails { string item_id; string title; string description; PaymentCurrencyAmount price; string? subscription_period; string? free_trial_period; PaymentCurrencyAmount? introductory_price; string? introductory_price_period; [MinVersion=1] uint32 introductory_price_cycles; [MinVersion=1] ItemType type; [MinVersion=1] array? icon_urls;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/digital_goods/mojom/digital_goods.mojom;l=55" + }, + "payments.mojom.PurchaseReference": { + "definition": "struct PurchaseReference { string item_id; string purchase_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/digital_goods/mojom/digital_goods.mojom;l=84" + }, + "payments.mojom.BillingResponseCode": { + "definition": "enum BillingResponseCode { kOk, [Default] kError, kItemAlreadyOwned, kItemNotOwned, kItemUnavailable, kClientAppUnavailable, kClientAppError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/digital_goods/mojom/digital_goods.mojom;l=21" + }, + "payments.mojom.ItemType": { + "definition": "enum ItemType { [Default] kUnknown, kProduct, kSubscription,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/digital_goods/mojom/digital_goods.mojom;l=46" + }, + "payments.mojom.CreateDigitalGoodsResponseCode": { + "definition": "enum CreateDigitalGoodsResponseCode { kOk, [Default] kError, kUnsupportedPaymentMethod, kUnsupportedContext,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/digital_goods/mojom/digital_goods.mojom;l=74" + }, + "discardable_memory.mojom.DiscardableSharedMemoryManager.AllocateLockedDiscardableSharedMemory": { + "definition": "AllocateLockedDiscardableSharedMemory( uint32 size, int32 id) => (mojo_base.mojom.UnsafeSharedMemoryRegion? region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/discardable_memory/public/mojom/discardable_shared_memory_manager.mojom;l=13" + }, + "discardable_memory.mojom.DiscardableSharedMemoryManager.DeletedDiscardableSharedMemory": { + "definition": "DeletedDiscardableSharedMemory(int32 id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/discardable_memory/public/mojom/discardable_shared_memory_manager.mojom;l=17" + }, + "dom_distiller.mojom.DistillabilityService.NotifyIsDistillable": { + "definition": "NotifyIsDistillable(bool page_is_distillable, bool is_last_update, bool is_long_article, bool is_mobile_friendly);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/dom_distiller/content/common/mojom/distillability_service.mojom;l=17" + }, + "dom_distiller.mojom.DistillerJavaScriptService.HandleDistillerOpenSettingsCall": { + "definition": "HandleDistillerOpenSettingsCall();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/dom_distiller/content/common/mojom/distiller_javascript_service.mojom;l=14" + }, + "dom_distiller.mojom.DistillerJavaScriptService.HandleStoreThemePref": { + "definition": "HandleStoreThemePref(Theme theme);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/dom_distiller/content/common/mojom/distiller_javascript_service.mojom;l=17" + }, + "dom_distiller.mojom.DistillerJavaScriptService.HandleStoreFontFamilyPref": { + "definition": "HandleStoreFontFamilyPref(FontFamily font_family);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/dom_distiller/content/common/mojom/distiller_javascript_service.mojom;l=19" + }, + "dom_distiller.mojom.DistillerJavaScriptService.HandleStoreFontScalingPref": { + "definition": "HandleStoreFontScalingPref(float font_scale);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/dom_distiller/content/common/mojom/distiller_javascript_service.mojom;l=21" + }, + "dom_distiller.mojom.Theme": { + "definition": "enum Theme { kLight = 0, kDark = 1, kSepia = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/dom_distiller/core/mojom/distilled_page_prefs.mojom;l=7" + }, + "dom_distiller.mojom.FontFamily": { + "definition": "enum FontFamily { kSansSerif = 0, kSerif = 1, kMonospace = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/dom_distiller/core/mojom/distilled_page_prefs.mojom;l=13" + }, + "download.mojom.DownloadStreamClient.OnStreamCompleted": { + "definition": "OnStreamCompleted(NetworkRequestStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/download/public/common/download_stream.mojom;l=22" + }, + "download.mojom.DownloadStreamHandle": { + "definition": "struct DownloadStreamHandle { handle stream; pending_receiver client_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/download/public/common/download_stream.mojom;l=25" + }, + "download.mojom.NetworkRequestStatus": { + "definition": "enum NetworkRequestStatus { OK, NETWORK_TIMEOUT, NETWORK_DISCONNECTED, NETWORK_SERVER_DOWN, SERVER_NO_RANGE, SERVER_CONTENT_LENGTH_MISMATCH, SERVER_UNREACHABLE, SERVER_CERT_PROBLEM, USER_CANCELED, NETWORK_FAILED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/download/public/common/download_stream.mojom;l=7" + }, + "watermark.mojom.WatermarkBlock": { + "definition": "struct WatermarkBlock { mojo_base.mojom.ReadOnlySharedMemoryRegion serialized_skpicture; uint32 width; uint32 height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/enterprise/watermarking/mojom/watermark.mojom;l=10" + }, + "payments.facilitated.mojom.PixCodeValidator.ValidatePixCode": { + "definition": "ValidatePixCode(string input_text) => (PixQrCodeType? pix_qr_code_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/facilitated_payments/core/mojom/pix_code_validator.mojom;l=22" + }, + "payments.facilitated.mojom.PixQrCodeType": { + "definition": "enum PixQrCodeType { kInvalid, kDynamic, kStatic,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/facilitated_payments/core/mojom/pix_code_validator.mojom;l=7" + }, + "feed.mojom.RssLinkReader.GetRssLinks": { + "definition": "GetRssLinks() => (RssLinks rss_links);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/feed/mojom/rss_link_reader.mojom;l=18" + }, + "feed.mojom.RssLinks": { + "definition": "struct RssLinks { url.mojom.Url page_url; array links;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/feed/mojom/rss_link_reader.mojom;l=8" + }, + "fingerprinting_protection_filter.mojom.FingerprintingProtectionAgent.ActivateForNextCommittedLoad": { + "definition": "ActivateForNextCommittedLoad( subresource_filter.mojom.ActivationState activation_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/fingerprinting_protection_filter/mojom/fingerprinting_protection_filter.mojom;l=19" + }, + "fingerprinting_protection_filter.mojom.FingerprintingProtectionHost.DidDisallowFirstSubresource": { + "definition": "DidDisallowFirstSubresource();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/fingerprinting_protection_filter/mojom/fingerprinting_protection_filter.mojom;l=30" + }, + "fingerprinting_protection_filter.mojom.FingerprintingProtectionHost.SetDocumentLoadStatistics": { + "definition": "SetDocumentLoadStatistics( subresource_filter.mojom.DocumentLoadStatistics statistics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/fingerprinting_protection_filter/mojom/fingerprinting_protection_filter.mojom;l=38" + }, + "fingerprinting_protection_filter.mojom.FingerprintingProtectionRulesetObserver.SetRulesetForProcess": { + "definition": "SetRulesetForProcess(mojo_base.mojom.ReadOnlyFile ruleset_file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/fingerprinting_protection_filter/mojom/fingerprinting_protection_filter.mojom;l=48" + }, + "global_media_controls.mojom.DeviceListHost.SelectDevice@0": { + "definition": "SelectDevice@0(string device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=47" + }, + "global_media_controls.mojom.DeviceListClient.OnDevicesUpdated@0": { + "definition": "OnDevicesUpdated@0(array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=59" + }, + "global_media_controls.mojom.DeviceListClient.OnPermissionRejected@1": { + "definition": "[MinVersion=1] OnPermissionRejected@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=62" + }, + "global_media_controls.mojom.DeviceService.GetDeviceListHostForSession@0": { + "definition": "GetDeviceListHostForSession@0( string session_id, pending_receiver host_receiver, pending_remote client_remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=78" + }, + "global_media_controls.mojom.DeviceService.GetDeviceListHostForPresentation@1": { + "definition": "GetDeviceListHostForPresentation@1( pending_receiver host_receiver, pending_remote client_remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=93" + }, + "global_media_controls.mojom.DeviceService.SetDevicePickerProvider@2": { + "definition": "[MinVersion=1] SetDevicePickerProvider@2( pending_remote provider_remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=99" + }, + "global_media_controls.mojom.DevicePickerProvider.CreateItem@0": { + "definition": "CreateItem@0(mojo_base.mojom.UnguessableToken source_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=116" + }, + "global_media_controls.mojom.DevicePickerProvider.DeleteItem@1": { + "definition": "DeleteItem@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=120" + }, + "global_media_controls.mojom.DevicePickerProvider.ShowItem@2": { + "definition": "ShowItem@2();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=123" + }, + "global_media_controls.mojom.DevicePickerProvider.HideItem@3": { + "definition": "HideItem@3();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=128" + }, + "global_media_controls.mojom.DevicePickerProvider.OnMetadataChanged@4": { + "definition": "OnMetadataChanged@4(media_session.mojom.MediaMetadata metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=131" + }, + "global_media_controls.mojom.DevicePickerProvider.OnArtworkImageChanged@5": { + "definition": "OnArtworkImageChanged@5(gfx.mojom.ImageSkia? artwork_image);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=134" + }, + "global_media_controls.mojom.DevicePickerProvider.OnFaviconImageChanged@6": { + "definition": "OnFaviconImageChanged@6(gfx.mojom.ImageSkia? favicon_image);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=137" + }, + "global_media_controls.mojom.DevicePickerProvider.AddObserver@7": { + "definition": "AddObserver@7(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=141" + }, + "global_media_controls.mojom.DevicePickerProvider.HideMediaUI@8": { + "definition": "HideMediaUI@8();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=144" + }, + "global_media_controls.mojom.DevicePickerObserver.OnMediaUIOpened@0": { + "definition": "OnMediaUIOpened@0();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=155" + }, + "global_media_controls.mojom.DevicePickerObserver.OnMediaUIClosed@1": { + "definition": "OnMediaUIClosed@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=158" + }, + "global_media_controls.mojom.DevicePickerObserver.OnMediaUIUpdated@2": { + "definition": "OnMediaUIUpdated@2();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=162" + }, + "global_media_controls.mojom.DevicePickerObserver.OnPickerDismissed@3": { + "definition": "OnPickerDismissed@3();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=165" + }, + "global_media_controls.mojom.Device": { + "definition": "struct Device { string id@0; string name@1; string status_text@2; IconType icon@3;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=32" + }, + "global_media_controls.mojom.IconType": { + "definition": "enum IconType { kUnknown = 0, kThrobber = 1, kInfo = 2, kTv = 3, kSpeaker = 4, kSpeakerGroup = 5, kInput = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/global_media_controls/public/mojom/device_service.mojom;l=16" + }, + "guest_contents.mojom.GuestContentsHost.Attach": { + "definition": "Attach(blink.mojom.LocalFrameToken frame_to_swap, int32 guest_contents_id) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/guest_contents/common/guest_contents.mojom;l=16" + }, + "guest_view.mojom.GuestViewHost.AttachToEmbedderFrame": { + "definition": "AttachToEmbedderFrame( int32 element_instance_id, int32 guest_instance_id, mojo_base.mojom.DictionaryValue params) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/guest_view/common/guest_view.mojom;l=23" + }, + "guest_view.mojom.GuestViewHost.ViewCreated": { + "definition": "ViewCreated(int32 view_instance_id, string view_type, pending_receiver keep_alive_handle_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/guest_view/common/guest_view.mojom;l=31" + }, + "heap_profiling.mojom.SnapshotController.TakeSnapshot": { + "definition": "TakeSnapshot(uint32 process_probability_pct, uint32 process_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/heap_profiling/in_process/mojom/snapshot_controller.mojom;l=20" + }, + "heap_profiling.mojom.SnapshotController.LogMetricsWithoutSnapshot": { + "definition": "LogMetricsWithoutSnapshot();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/heap_profiling/in_process/mojom/snapshot_controller.mojom;l=25" + }, + "heap_profiling.mojom.TestConnector.ConnectSnapshotController": { + "definition": "ConnectSnapshotController( pending_receiver controller) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/heap_profiling/in_process/mojom/test_connector.mojom;l=15" + }, + "heap_profiling.mojom.TestConnector.ConnectProfileCollector": { + "definition": "ConnectProfileCollector( pending_remote collector) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/heap_profiling/in_process/mojom/test_connector.mojom;l=20" + }, + "heap_profiling.mojom.TestConnector.Disconnect": { + "definition": "Disconnect();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/heap_profiling/in_process/mojom/test_connector.mojom;l=24" + }, + "history_clusters_internals.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_remote page, pending_receiver page_handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/history_clusters_internals/webui/history_clusters_internals.mojom;l=11" + }, + "history_clusters_internals.mojom.PageHandler.GetContextClustersJson": { + "definition": "GetContextClustersJson() => (string context_clusters_json);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/history_clusters_internals/webui/history_clusters_internals.mojom;l=19" + }, + "history_clusters_internals.mojom.PageHandler.PrintKeywordBagStateToLogMessages": { + "definition": "PrintKeywordBagStateToLogMessages();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/history_clusters_internals/webui/history_clusters_internals.mojom;l=24" + }, + "history_clusters_internals.mojom.Page.OnLogMessageAdded": { + "definition": "OnLogMessageAdded(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/history_clusters_internals/webui/history_clusters_internals.mojom;l=31" + }, + "history_clusters.mojom.MatchPosition": { + "definition": "struct MatchPosition { uint32 begin; uint32 end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/public/mojom/history_cluster_types.mojom;l=22" + }, + "history_clusters.mojom.SearchQuery": { + "definition": "struct SearchQuery { string query; url.mojom.Url url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/public/mojom/history_cluster_types.mojom;l=28" + }, + "history_clusters.mojom.RawVisitData": { + "definition": "struct RawVisitData { url.mojom.Url url; mojo_base.mojom.Time visit_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/public/mojom/history_cluster_types.mojom;l=58" + }, + "history_clusters.mojom.URLVisit": { + "definition": "struct URLVisit { int64 visit_id; url.mojom.Url normalized_url; string url_for_display; string page_title; array title_match_positions; array url_for_display_match_positions; RawVisitData raw_visit_data; array duplicates; string relative_date; array annotations; bool is_known_to_sync; map debug_info; bool has_url_keyed_image;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/public/mojom/history_cluster_types.mojom;l=68" + }, + "history_clusters.mojom.Cluster": { + "definition": "struct Cluster { int64 id; array visits; string label; string? tab_group_name; array label_match_positions; array related_searches; url.mojom.Url? image_url; bool from_persistence; string? debug_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/public/mojom/history_cluster_types.mojom;l=118" + }, + "history_clusters.mojom.Annotation": { + "definition": "enum Annotation { kBookmarked, kSearchResultsPage,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/public/mojom/history_cluster_types.mojom;l=11" + }, + "history_clusters.mojom.InteractionState": { + "definition": "enum InteractionState { kDefault = 0, kHidden = 1, kDone = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/history_clusters/public/mojom/history_cluster_types.mojom;l=41" + }, + "input.mojom.RenderInputRouterDelegate.StateOnTouchTransfer": { + "definition": "StateOnTouchTransfer(TouchTransferState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=64" + }, + "input.mojom.RenderInputRouterDelegate.ForceEnableZoomStateChanged": { + "definition": "ForceEnableZoomStateChanged(bool force_enable_zoom, viz.mojom.FrameSinkId frame_sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=69" + }, + "input.mojom.RenderInputRouterDelegate.StopFlingingOnViz": { + "definition": "StopFlingingOnViz(viz.mojom.FrameSinkId frame_sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=73" + }, + "input.mojom.RenderInputRouterDelegate.RestartInputEventAckTimeoutIfNecessary": { + "definition": "RestartInputEventAckTimeoutIfNecessary( viz.mojom.FrameSinkId frame_sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=79" + }, + "input.mojom.RenderInputRouterDelegate.NotifyVisibilityChanged": { + "definition": "NotifyVisibilityChanged(viz.mojom.FrameSinkId frame_sink_id, bool is_hidden);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=84" + }, + "input.mojom.RenderInputRouterDelegate.ResetGestureDetection": { + "definition": "ResetGestureDetection(viz.mojom.FrameSinkId root_widget_frame_sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=88" + }, + "input.mojom.RenderInputRouterDelegateClient.NotifyObserversOfInputEvent": { + "definition": "NotifyObserversOfInputEvent(blink.mojom.Event event, bool dispatched_to_renderer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=97" + }, + "input.mojom.RenderInputRouterDelegateClient.NotifyObserversOfInputEventAcks": { + "definition": "NotifyObserversOfInputEventAcks(blink.mojom.InputEventResultSource ack_source, blink.mojom.InputEventResultState ack_result, blink.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=102" + }, + "input.mojom.RenderInputRouterDelegateClient.OnInvalidInputEventSource": { + "definition": "OnInvalidInputEventSource();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=107" + }, + "input.mojom.RenderInputRouterDelegateClient.StateOnOverscrollTransfer": { + "definition": "StateOnOverscrollTransfer( blink.mojom.DidOverscrollParams? overscroll);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=111" + }, + "input.mojom.RenderInputRouterDelegateClient.RendererInputResponsivenessChanged": { + "definition": "RendererInputResponsivenessChanged( bool is_responsive, mojo_base.mojom.TimeTicks? ack_timeout_ts);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=118" + }, + "input.mojom.RenderInputRouterConfig": { + "definition": "struct RenderInputRouterConfig { pending_remote rir_client; mojo_base.mojom.UnguessableToken grouping_id; bool force_enable_zoom = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=20" + }, + "input.mojom.TouchTransferState": { + "definition": "struct TouchTransferState { mojo_base.mojom.TimeTicks down_time_ms; viz.mojom.FrameSinkId root_widget_frame_sink_id; float web_contents_y_offset_pix; float dip_scale; bool browser_would_have_handled = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/input/render_input_router.mojom;l=31" + }, + "ip_protection.mojom.CoreControl.AuthTokensMayBeAvailable": { + "definition": "AuthTokensMayBeAvailable();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core.mojom;l=19" + }, + "ip_protection.mojom.CoreControl.SetIpProtectionEnabled": { + "definition": "SetIpProtectionEnabled(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core.mojom;l=23" + }, + "ip_protection.mojom.CoreControl.BindTestInterfaceForTesting": { + "definition": "BindTestInterfaceForTesting(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core.mojom;l=26" + }, + "ip_protection.mojom.CoreHost.TryGetAuthTokens": { + "definition": "TryGetAuthTokens(uint32 batch_size, ProxyLayer proxy_layer) => (array? bsa_tokens, mojo_base.mojom.Time? try_again_after);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core.mojom;l=37" + }, + "ip_protection.mojom.CoreHost.GetProxyConfig": { + "definition": "GetProxyConfig() => (array? proxy_list, GeoHint? geo_hint);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core.mojom;l=48" + }, + "ip_protection.mojom.CoreHost.TryGetProbabilisticRevealTokens": { + "definition": "TryGetProbabilisticRevealTokens() => (TryGetProbabilisticRevealTokensOutcome? outcome, TryGetProbabilisticRevealTokensResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core.mojom;l=58" + }, + "ip_protection.mojom.CoreHost.RecycleTokens": { + "definition": "RecycleTokens(ProxyLayer proxy_layer, array tokens);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core.mojom;l=73" + }, + "ip_protection.mojom.CoreControlTest.VerifyIpProtectionCoreHostForTesting": { + "definition": "VerifyIpProtectionCoreHostForTesting() => (BlindSignedAuthToken? bsa_token, mojo_base.mojom.Time? try_again_after);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core_test.mojom;l=14" + }, + "ip_protection.mojom.CoreControlTest.IsIpProtectionEnabledForTesting": { + "definition": "IsIpProtectionEnabledForTesting() => (bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core_test.mojom;l=19" + }, + "ip_protection.mojom.CoreControlTest.GetAuthTokenForTesting": { + "definition": "GetAuthTokenForTesting(ProxyLayer proxy_layer, string geo_id) => (BlindSignedAuthToken? token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core_test.mojom;l=25" + }, + "ip_protection.mojom.CoreControlTest.HasTrackingProtectionExceptionForTesting": { + "definition": "HasTrackingProtectionExceptionForTesting(url.mojom.Url first_party_url) => (bool has_exception);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/core_test.mojom;l=29" + }, + "ip_protection.mojom.GeoHint": { + "definition": "struct GeoHint { string country_code; string iso_region; string city_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/data_types.mojom;l=22" + }, + "ip_protection.mojom.BlindSignedAuthToken": { + "definition": "struct BlindSignedAuthToken { string token; mojo_base.mojom.Time expiration; GeoHint geo_hint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/data_types.mojom;l=46" + }, + "ip_protection.mojom.ProbabilisticRevealToken": { + "definition": "struct ProbabilisticRevealToken { int32 version; string u; string e;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/data_types.mojom;l=60" + }, + "ip_protection.mojom.TryGetProbabilisticRevealTokensResult": { + "definition": "struct TryGetProbabilisticRevealTokensResult { TryGetProbabilisticRevealTokensStatus status; int32 network_error_code; mojo_base.mojom.Time? try_again_after;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/data_types.mojom;l=87" + }, + "ip_protection.mojom.TryGetProbabilisticRevealTokensOutcome": { + "definition": "struct TryGetProbabilisticRevealTokensOutcome { array tokens; string public_key; uint64 expiration_time_seconds; uint64 next_epoch_start_time_seconds; int32 num_tokens_with_signal; string epoch_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/data_types.mojom;l=93" + }, + "ip_protection.mojom.ProxyLayer": { + "definition": "enum ProxyLayer {kProxyA, kProxyB};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/data_types.mojom;l=12" + }, + "ip_protection.mojom.TryGetProbabilisticRevealTokensStatus": { + "definition": "enum TryGetProbabilisticRevealTokensStatus { kSuccess, kNetNotOk, kNetOkNullResponse, kNullResponse, kResponseParsingFailed, kInvalidTokenVersion, kInvalidTokenSize, kTooFewTokens, kTooManyTokens, kExpirationTooSoon, kExpirationTooLate, kInvalidPublicKey, kInvalidNumTokensWithSignal, kRequestBackedOff, kNoGoogleChromeBranding, kInvalidEpochIdSize};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/data_types.mojom;l=68" + }, + "ip_protection.mojom.IpProxyStatus": { + "definition": "enum IpProxyStatus { kOk, kFeatureNotEnabled, kMaskedDomainListNotEnabled, kMaskedDomainListNotPopulated, kAuthTokensUnavailable, kUnavailable, kBypassedByDevTools};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ip_protection/mojom/data_types.mojom;l=104" + }, + "js_injection.mojom.JsToBrowserMessaging.PostMessage": { + "definition": "PostMessage(JsWebMessage message, array ports);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=61" + }, + "js_injection.mojom.JsToBrowserMessaging.SetBrowserToJsMessaging": { + "definition": "SetBrowserToJsMessaging( pending_associated_remote browser_to_js_messaging);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=66" + }, + "js_injection.mojom.JsObjectsClient.OnWindowObjectCleared": { + "definition": "OnWindowObjectCleared();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=73" + }, + "js_injection.mojom.BrowserToJsMessagingFactory.SendBrowserToJsMessaging": { + "definition": "SendBrowserToJsMessaging( pending_associated_receiver browser_to_js_messaging);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=79" + }, + "js_injection.mojom.BrowserToJsMessaging.OnPostMessage": { + "definition": "OnPostMessage(JsWebMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=87" + }, + "js_injection.mojom.JsCommunication.SetJsObjects": { + "definition": "SetJsObjects(array js_objects, pending_associated_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=94" + }, + "js_injection.mojom.JsCommunication.AddDocumentStartScript": { + "definition": "AddDocumentStartScript(js_injection.mojom.DocumentStartJavaScript script);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=100" + }, + "js_injection.mojom.JsCommunication.RemoveDocumentStartScript": { + "definition": "RemoveDocumentStartScript(int32 script_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=103" + }, + "js_injection.mojom.JsObject": { + "definition": "struct JsObject { mojo_base.mojom.String16 js_object_name; pending_associated_remote js_to_browser_messaging; pending_associated_receiver browser_to_js_factory; origin_matcher.mojom.OriginMatcher origin_matcher;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=20" + }, + "js_injection.mojom.DocumentStartJavaScript": { + "definition": "struct DocumentStartJavaScript { int32 script_id; mojo_base.mojom.String16 script; origin_matcher.mojom.OriginMatcher origin_matcher;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=31" + }, + "js_injection.mojom.JsWebMessageArrayBufferValue": { + "definition": "struct JsWebMessageArrayBufferValue { mojo_base.mojom.BigBuffer array_buffer_value; bool is_resizable_by_user_javascript = false; uint64 max_byte_length = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=39" + }, + "js_injection.mojom.JsWebMessage": { + "definition": "union JsWebMessage { mojo_base.mojom.String16 string_value; JsWebMessageArrayBufferValue array_buffer_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/js_injection/common/interfaces.mojom;l=51" + }, + "language_detection.mojom.ContentLanguageDetectionDriver.GetLanguageDetectionModel": { + "definition": "GetLanguageDetectionModel() => (mojo_base.mojom.ReadOnlyFile? model_file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/language_detection/content/common/language_detection.mojom;l=24" + }, + "language_detection.mojom.ContentLanguageDetectionDriver.GetLanguageDetectionModelStatus": { + "definition": "GetLanguageDetectionModelStatus() => (LanguageDetectionModelStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/language_detection/content/common/language_detection.mojom;l=30" + }, + "language_detection.mojom.LanguageDetectionModelStatus": { + "definition": "enum LanguageDetectionModelStatus { kReadily = 0, kAfterDownload = 1, kNotAvailable = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/language_detection/content/common/language_detection.mojom;l=10" + }, + "lens.mojom.LatencyLog": { + "definition": "struct LatencyLog { Phase phase; gfx.mojom.Size original_size; gfx.mojom.Size downscaled_size; ImageFormat image_format; mojo_base.mojom.Time time; uint32 encoded_bytes_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/lens/lens_metadata.mojom;l=27" + }, + "lens.mojom.ImageFormat": { + "definition": "enum ImageFormat { JPEG, PNG, WEBP, ORIGINAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/lens/lens_metadata.mojom;l=10" + }, + "lens.mojom.Phase": { + "definition": "enum Phase { OVERALL_START, DOWNSCALE_START, DOWNSCALE_END, ENCODE_START, ENCODE_END,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/lens/lens_metadata.mojom;l=19" + }, + "components.media_control.mojom.MediaPlaybackOptions.SetMediaLoadingBlocked": { + "definition": "SetMediaLoadingBlocked(bool blocked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_control/mojom/media_playback_options.mojom;l=15" + }, + "components.media_control.mojom.MediaPlaybackOptions.SetBackgroundVideoPlaybackEnabled": { + "definition": "SetBackgroundVideoPlaybackEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_control/mojom/media_playback_options.mojom;l=18" + }, + "components.media_control.mojom.MediaPlaybackOptions.SetRendererType": { + "definition": "SetRendererType(content.mojom.RendererType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_control/mojom/media_playback_options.mojom;l=21" + }, + "media_router.mojom.Debugger.ShouldFetchMirroringStats": { + "definition": "ShouldFetchMirroringStats() => (bool should_fetch);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/debugger.mojom;l=13" + }, + "media_router.mojom.Debugger.OnMirroringStats": { + "definition": "OnMirroringStats(mojo_base.mojom.Value json_stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/debugger.mojom;l=20" + }, + "media_router.mojom.Debugger.BindReceiver": { + "definition": "BindReceiver(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/debugger.mojom;l=24" + }, + "media_router.mojom.Logger.LogInfo": { + "definition": "LogInfo(LogCategory category, string component, string message, string sink_id, string media_source, string session_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/logger.mojom;l=29" + }, + "media_router.mojom.Logger.LogWarning": { + "definition": "LogWarning(LogCategory category, string component, string message, string sink_id, string media_source, string session_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/logger.mojom;l=37" + }, + "media_router.mojom.Logger.LogError": { + "definition": "LogError(LogCategory category, string component, string message, string sink_id, string media_source, string session_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/logger.mojom;l=45" + }, + "media_router.mojom.Logger.BindReceiver": { + "definition": "BindReceiver(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/logger.mojom;l=54" + }, + "media_router.mojom.LogCategory": { + "definition": "enum LogCategory { kDiscovery, kRoute, kMirroring, kUi,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/logger.mojom;l=7" + }, + "media_router.mojom.MediaController.Play": { + "definition": "Play();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_controller.mojom;l=17" + }, + "media_router.mojom.MediaController.Pause": { + "definition": "Pause();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_controller.mojom;l=21" + }, + "media_router.mojom.MediaController.SetMute": { + "definition": "SetMute(bool mute);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_controller.mojom;l=25" + }, + "media_router.mojom.MediaController.SetVolume": { + "definition": "SetVolume(float volume);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_controller.mojom;l=30" + }, + "media_router.mojom.MediaController.Seek": { + "definition": "Seek(mojo_base.mojom.TimeDelta time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_controller.mojom;l=34" + }, + "media_router.mojom.MediaController.NextTrack": { + "definition": "NextTrack();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_controller.mojom;l=38" + }, + "media_router.mojom.MediaController.PreviousTrack": { + "definition": "PreviousTrack();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_controller.mojom;l=42" + }, + "media_router.mojom.MediaRouteProviderId": { + "definition": "enum MediaRouteProviderId { WIRED_DISPLAY, CAST, DIAL, ANDROID_CAF, TEST,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_route_provider_id.mojom;l=10" + }, + "media_router.mojom.MediaRouteProvider.CreateRoute": { + "definition": "CreateRoute(string media_source, string sink_id, string original_presentation_id, url.mojom.Origin origin, int32 frame_tree_node_id, mojo_base.mojom.TimeDelta timeout) => (MediaRoute? route, RoutePresentationConnection? connection, string? error_text, RouteRequestResultCode result_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=220" + }, + "media_router.mojom.MediaRouteProvider.JoinRoute": { + "definition": "JoinRoute(string media_source, string presentation_id, url.mojom.Origin origin, int32 frame_tree_node_id, mojo_base.mojom.TimeDelta timeout) => (MediaRoute? route, RoutePresentationConnection? connection, string? error_text, RouteRequestResultCode result_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=249" + }, + "media_router.mojom.MediaRouteProvider.TerminateRoute": { + "definition": "TerminateRoute(string route_id) => (string? error_text, RouteRequestResultCode result_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=263" + }, + "media_router.mojom.MediaRouteProvider.SendRouteMessage": { + "definition": "SendRouteMessage(string media_route_id, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=268" + }, + "media_router.mojom.MediaRouteProvider.SendRouteBinaryMessage": { + "definition": "SendRouteBinaryMessage(string media_route_id, array data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=272" + }, + "media_router.mojom.MediaRouteProvider.StartObservingMediaSinks": { + "definition": "StartObservingMediaSinks(string media_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=276" + }, + "media_router.mojom.MediaRouteProvider.StopObservingMediaSinks": { + "definition": "StopObservingMediaSinks(string media_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=279" + }, + "media_router.mojom.MediaRouteProvider.StartObservingMediaRoutes": { + "definition": "StartObservingMediaRoutes();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=282" + }, + "media_router.mojom.MediaRouteProvider.DetachRoute": { + "definition": "DetachRoute(string route_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=287" + }, + "media_router.mojom.MediaRouteProvider.DiscoverSinksNow": { + "definition": "DiscoverSinksNow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=292" + }, + "media_router.mojom.MediaRouteProvider.BindMediaController": { + "definition": "BindMediaController( string route_id, pending_receiver media_controller, pending_remote observer) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=303" + }, + "media_router.mojom.MediaRouteProvider.GetState": { + "definition": "GetState() => (ProviderState? state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=312" + }, + "media_router.mojom.MediaRouter.RegisterMediaRouteProvider": { + "definition": "RegisterMediaRouteProvider(MediaRouteProviderId provider_id, pending_remote media_router_provider);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=320" + }, + "media_router.mojom.MediaRouter.OnSinksReceived": { + "definition": "OnSinksReceived(MediaRouteProviderId provider_id, string media_source, array sinks, array origins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=326" + }, + "media_router.mojom.MediaRouter.OnIssue": { + "definition": "OnIssue(Issue issue);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=332" + }, + "media_router.mojom.MediaRouter.ClearTopIssueForSink": { + "definition": "ClearTopIssueForSink(string sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=335" + }, + "media_router.mojom.MediaRouter.OnRoutesUpdated": { + "definition": "OnRoutesUpdated(MediaRouteProviderId provider_id, array routes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=338" + }, + "media_router.mojom.MediaRouter.OnPresentationConnectionStateChanged": { + "definition": "OnPresentationConnectionStateChanged( string route_id, blink.mojom.PresentationConnectionState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=343" + }, + "media_router.mojom.MediaRouter.OnPresentationConnectionClosed": { + "definition": "OnPresentationConnectionClosed( string route_id, blink.mojom.PresentationConnectionCloseReason reason, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=347" + }, + "media_router.mojom.MediaRouter.OnRouteMessagesReceived": { + "definition": "OnRouteMessagesReceived(string route_id, array messages);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=357" + }, + "media_router.mojom.MediaRouter.GetMediaSinkServiceStatus": { + "definition": "GetMediaSinkServiceStatus() => (string status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=361" + }, + "media_router.mojom.MediaRouter.GetLogger": { + "definition": "GetLogger(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=364" + }, + "media_router.mojom.MediaRouter.GetDebugger": { + "definition": "GetDebugger(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=368" + }, + "media_router.mojom.MediaRouter.GetLogsAsString": { + "definition": "GetLogsAsString() => (string logs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=374" + }, + "media_router.mojom.MediaSink": { + "definition": "struct MediaSink { string sink_id; string name; SinkIconType icon_type; MediaRouteProviderId provider_id; MediaSinkExtraData? extra_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=31" + }, + "media_router.mojom.DialMediaSink": { + "definition": "struct DialMediaSink { network.mojom.IPAddress ip_address; string model_name; url.mojom.Url app_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=49" + }, + "media_router.mojom.CastMediaSink": { + "definition": "struct CastMediaSink { network.mojom.IPEndPoint ip_endpoint; string model_name; uint64 capabilities; int32 cast_channel_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=59" + }, + "media_router.mojom.MediaRoute": { + "definition": "struct MediaRoute { string media_route_id; string presentation_id; string? media_source; string media_sink_id; string media_sink_name; string description; bool is_local; RouteControllerType controller_type; bool is_local_presentation; bool is_connecting;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=83" + }, + "media_router.mojom.Issue": { + "definition": "struct Issue { string route_id; string sink_id; Severity severity; string title; string? message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=110" + }, + "media_router.mojom.RouteMessage": { + "definition": "struct RouteMessage { Type type; string? message; array? data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=134" + }, + "media_router.mojom.RoutePresentationConnection": { + "definition": "struct RoutePresentationConnection { pending_remote connection_remote; pending_receiver connection_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=150" + }, + "media_router.mojom.CastSessionState": { + "definition": "struct CastSessionState { string sink_id; string app_id; string session_id; string route_description;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=160" + }, + "media_router.mojom.CastProviderState": { + "definition": "struct CastProviderState { array session_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=172" + }, + "media_router.mojom.SinkIconType": { + "definition": "enum SinkIconType { CAST = 0, CAST_AUDIO_GROUP = 1, CAST_AUDIO = 2, WIRED_DISPLAY = 6, GENERIC = 7};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=22" + }, + "media_router.mojom.RouteControllerType": { + "definition": "enum RouteControllerType { kNone, kGeneric, kMirroring };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=74" + }, + "media_router.mojom.Severity": { + "definition": "enum Severity { WARNING, NOTIFICATION };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=111" + }, + "media_router.mojom.Type": { + "definition": "enum Type { TEXT, BINARY };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=135" + }, + "media_router.mojom.MediaSinkExtraData": { + "definition": "union MediaSinkExtraData { DialMediaSink dial_media_sink; CastMediaSink cast_media_sink;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=44" + }, + "media_router.mojom.ProviderState": { + "definition": "union ProviderState { CastProviderState cast_provider_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router.mojom;l=179" + }, + "media_router.mojom.MediaRouterTraitsTestService.EchoMediaSink": { + "definition": "[Sync] EchoMediaSink(MediaSink s) => (MediaSink sink);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_router_traits_test_service.mojom;l=12" + }, + "media_router.mojom.MediaStatusObserver.OnMediaStatusUpdated": { + "definition": "OnMediaStatusUpdated(MediaStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_status.mojom;l=89" + }, + "media_router.mojom.MediaImage": { + "definition": "struct MediaImage { url.mojom.Url url; gfx.mojom.Size? size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_status.mojom;l=11" + }, + "media_router.mojom.MediaStatus": { + "definition": "struct MediaStatus { string title; string secondary_title; bool can_play_pause; bool can_mute; bool can_set_volume; bool can_seek; bool can_skip_to_next_track; bool can_skip_to_previous_track; PlayState play_state; bool is_muted; float volume; mojo_base.mojom.TimeDelta duration; mojo_base.mojom.TimeDelta current_time; array images;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_status.mojom;l=21" + }, + "media_router.mojom.PlayState": { + "definition": "enum PlayState { PLAYING, PAUSED, BUFFERING };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/media_status.mojom;l=22" + }, + "media_router.mojom.RouteRequestResultCode": { + "definition": "enum RouteRequestResultCode { UNKNOWN_ERROR, OK, TIMED_OUT, ROUTE_NOT_FOUND, SINK_NOT_FOUND, INVALID_ORIGIN, DEPRECATED_OFF_THE_RECORD_MISMATCH, NO_SUPPORTED_PROVIDER, CANCELLED, ROUTE_ALREADY_EXISTS, DESKTOP_PICKER_FAILED, ROUTE_ALREADY_TERMINATED, REDUNDANT_REQUEST, USER_NOT_ALLOWED, NOTIFICATION_DISABLED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/media_router/common/mojom/route_request_result_code.mojom;l=9" + }, + "metrics.dwa.mojom.DwaRecorderInterface.AddEntry": { + "definition": "AddEntry(DwaEntry entry);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/dwa/mojom/dwa_interface.mojom;l=35" + }, + "metrics.dwa.mojom.DwaRecorderFactory.CreateDwaRecorder": { + "definition": "CreateDwaRecorder(pending_receiver receiver, pending_remote client_remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/dwa/mojom/dwa_interface.mojom;l=43" + }, + "metrics.dwa.mojom.DwaEntry": { + "definition": "struct DwaEntry { uint64 event_hash; uint64 content_hash; map studies_of_interest; map metrics;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/dwa/mojom/dwa_interface.mojom;l=7" + }, + "metrics.private_metrics.mojom.PrivateMetricsEntry": { + "definition": "struct PrivateMetricsEntry { uint64 event_hash; uint64? content_hash; uint64? source_id; map studies_of_interest; map metrics; Type type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/private_metrics/mojom/private_metrics_interface.mojom;l=11" + }, + "metrics.private_metrics.mojom.Type": { + "definition": "enum Type { kDwa, kDkm, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/private_metrics/mojom/private_metrics_interface.mojom;l=38" + }, + "metrics.mojom.CallStackProfileCollector.Collect": { + "definition": "Collect(mojo_base.mojom.TimeTicks start_timestamp, ProfileType profile_type, SampledProfile profile);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/call_stack_profile_collector.mojom;l=38" + }, + "metrics.mojom.SampledProfile": { + "definition": "struct SampledProfile { mojo_base.mojom.ProtoWrapper contents;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/call_stack_profile_collector.mojom;l=15" + }, + "metrics.mojom.ProfileType": { + "definition": "enum ProfileType { kCPU, kHeap,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/call_stack_profile_collector.mojom;l=20" + }, + "metrics.mojom.CallStackProfileCollectorTest.BounceSampledProfile": { + "definition": "[Sync] BounceSampledProfile(SampledProfile in) => (SampledProfile out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/call_stack_profile_collector_test.mojom;l=10" + }, + "metrics.mojom.ChildHistogramFetcherFactory.CreateFetcher": { + "definition": "CreateFetcher( mojo_base.mojom.UnsafeSharedMemoryRegion? shared_memory, pending_receiver child_histogram_fetcher);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/histogram_fetcher.mojom;l=32" + }, + "metrics.mojom.ChildHistogramFetcher.GetChildNonPersistentHistogramData": { + "definition": "GetChildNonPersistentHistogramData() => (array deltas);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/histogram_fetcher.mojom;l=41" + }, + "metrics.mojom.ChildHistogramFetcher.Ping": { + "definition": "Ping(UmaPingCallSource call_source) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/histogram_fetcher.mojom;l=46" + }, + "metrics.mojom.UmaChildPingStatus": { + "definition": "enum UmaChildPingStatus { BROWSER_SENT_IPC = 0, CHILD_RECEIVED_IPC = 1, BROWSER_REPLY_CALLBACK = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/histogram_fetcher.mojom;l=14" + }, + "metrics.mojom.UmaPingCallSource": { + "definition": "enum UmaPingCallSource { PERIODIC, SHARED_MEMORY_SET_UP,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/histogram_fetcher.mojom;l=20" + }, + "metrics.mojom.SingleSampleMetricsProvider.AcquireSingleSampleMetric": { + "definition": "AcquireSingleSampleMetric(string histogram_name, int32 min, int32 max, uint32 bucket_count, int32 flags, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/single_sample_metrics.mojom;l=17" + }, + "metrics.mojom.SingleSampleMetric.SetSample": { + "definition": "SetSample(int32 sample);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/public/mojom/single_sample_metrics.mojom;l=23" + }, + "metrics.structured.mojom.Event": { + "definition": "struct Event { string project_name@0; string event_name@1; map metrics@2; [MinVersion=1] mojo_base.mojom.TimeDelta? system_uptime@3; [MinVersion=1] bool is_event_sequence@4;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/structured/mojom/event.mojom;l=16" + }, + "metrics.structured.mojom.MetricValue": { + "definition": "union MetricValue { string hmac_value; int64 long_value; int32 int_value; double double_value; string raw_str_value; bool bool_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/metrics/structured/mojom/event.mojom;l=35" + }, + "mirroring.mojom.CastMessageChannel.OnMessage": { + "definition": "OnMessage(CastMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/cast_message_channel.mojom;l=30" + }, + "mirroring.mojom.CastMessage": { + "definition": "struct CastMessage { string message_namespace; string json_format_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/cast_message_channel.mojom;l=16" + }, + "mirroring.mojom.MirroringService.Start": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] Start(SessionParameters params, gfx.mojom.Size max_resolution, pending_remote observer, pending_remote resource_provider, pending_remote outbound_channel, pending_receiver inbound_channel);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/mirroring_service.mojom;l=45" + }, + "mirroring.mojom.MirroringService.SwitchMirroringSourceTab": { + "definition": "SwitchMirroringSourceTab();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/mirroring_service.mojom;l=54" + }, + "mirroring.mojom.MirroringService.GetMirroringStats": { + "definition": "GetMirroringStats() => (mojo_base.mojom.Value json_stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/mirroring_service.mojom;l=58" + }, + "mirroring.mojom.AudioStreamCreatorClient.StreamCreated": { + "definition": "StreamCreated( pending_remote stream, pending_receiver client_receiver, media.mojom.ReadWriteAudioDataPipe data_pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/resource_provider.mojom;l=21" + }, + "mirroring.mojom.ResourceProvider.BindGpu": { + "definition": "BindGpu(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/resource_provider.mojom;l=32" + }, + "mirroring.mojom.ResourceProvider.GetVideoCaptureHost": { + "definition": "GetVideoCaptureHost(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/resource_provider.mojom;l=37" + }, + "mirroring.mojom.ResourceProvider.GetVideoEncoderMetricsProvider": { + "definition": "GetVideoEncoderMetricsProvider( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/resource_provider.mojom;l=42" + }, + "mirroring.mojom.ResourceProvider.GetNetworkContext": { + "definition": "[AllowedContext=sandbox.mojom.Context.kPrivilegedUtility] GetNetworkContext(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/resource_provider.mojom;l=44" + }, + "mirroring.mojom.ResourceProvider.CreateAudioStream": { + "definition": "CreateAudioStream(pending_remote client, media.mojom.AudioParameters param, uint32 shared_memory_count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/resource_provider.mojom;l=47" + }, + "mirroring.mojom.ResourceProvider.ConnectToRemotingSource": { + "definition": "ConnectToRemotingSource( pending_remote remoter, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/resource_provider.mojom;l=50" + }, + "mirroring.mojom.SessionObserver.OnError": { + "definition": "OnError(SessionError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_observer.mojom;l=33" + }, + "mirroring.mojom.SessionObserver.DidStart": { + "definition": "DidStart();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_observer.mojom;l=36" + }, + "mirroring.mojom.SessionObserver.DidStop": { + "definition": "DidStop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_observer.mojom;l=39" + }, + "mirroring.mojom.SessionObserver.LogInfoMessage": { + "definition": "LogInfoMessage(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_observer.mojom;l=42" + }, + "mirroring.mojom.SessionObserver.LogErrorMessage": { + "definition": "LogErrorMessage(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_observer.mojom;l=45" + }, + "mirroring.mojom.SessionObserver.OnSourceChanged": { + "definition": "OnSourceChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_observer.mojom;l=48" + }, + "mirroring.mojom.SessionObserver.OnRemotingStateChanged": { + "definition": "OnRemotingStateChanged(bool is_remoting);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_observer.mojom;l=51" + }, + "mirroring.mojom.SessionError": { + "definition": "enum SessionError { ANSWER_TIME_OUT, ANSWER_NOT_OK, ANSWER_MISMATCHED_CAST_MODE, ANSWER_MISMATCHED_SSRC_LENGTH, ANSWER_SELECT_MULTIPLE_AUDIO, ANSWER_SELECT_MULTIPLE_VIDEO, ANSWER_SELECT_INVALID_INDEX, ANSWER_NO_AUDIO_OR_VIDEO, AUDIO_CAPTURE_ERROR, VIDEO_CAPTURE_ERROR, RTP_STREAM_ERROR, ENCODING_ERROR, CAST_TRANSPORT_ERROR, OPENSCREEN_SESSION_ERROR, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_observer.mojom;l=11" + }, + "mirroring.mojom.SessionParameters": { + "definition": "struct SessionParameters { SessionType type; network.mojom.IPAddress receiver_address; string receiver_friendly_name; string source_id; string destination_id; mojo_base.mojom.TimeDelta? target_playout_delay; bool is_remote_playback; bool force_letterboxing; bool enable_rtcp_reporting;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_parameters.mojom;l=21" + }, + "mirroring.mojom.SessionType": { + "definition": "enum SessionType { AUDIO_ONLY, VIDEO_ONLY, AUDIO_AND_VIDEO,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/mirroring/mojom/session_parameters.mojom;l=12" + }, + "network_hints.mojom.NetworkHintsHandler.PrefetchDNS": { + "definition": "PrefetchDNS(array url_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/network_hints/common/network_hints.mojom;l=13" + }, + "network_hints.mojom.NetworkHintsHandler.Preconnect": { + "definition": "Preconnect(url.mojom.SchemeHostPort url, bool allow_credentials);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/network_hints/common/network_hints.mojom;l=17" + }, + "prerender.mojom.NoStatePrefetchCanceler.CancelNoStatePrefetchForUnsupportedScheme": { + "definition": "CancelNoStatePrefetchForUnsupportedScheme();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/no_state_prefetch/common/no_state_prefetch_canceler.mojom;l=12" + }, + "prerender.mojom.NoStatePrefetchCanceler.CancelNoStatePrefetchAfterSubresourcesDiscovered": { + "definition": "CancelNoStatePrefetchAfterSubresourcesDiscovered();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/no_state_prefetch/common/no_state_prefetch_canceler.mojom;l=16" + }, + "prerender.mojom.NoStatePrefetchMessages.SetIsNoStatePrefetching": { + "definition": "SetIsNoStatePrefetching(string histogram_prefix);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/no_state_prefetch/common/render_frame_prerender_messages.mojom;l=11" + }, + "ntp_tiles.mojom.TileSource": { + "definition": "enum TileSource { TOP_SITES = 0, POPULAR = 1, POPULAR_BAKED_IN = 2, CUSTOM_LINKS = 3, ALLOWLIST = 4, HOMEPAGE = 5, ENTERPRISE_SHORTCUTS = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ntp_tiles/tile_source.mojom;l=8" + }, + "ntp_tiles.mojom.TileType": { + "definition": "enum TileType { kTopSites = 0, kCustomLinks = 1, kEnterpriseShortcuts = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/ntp_tiles/tile_type.mojom;l=16" + }, + "omnibox.mojom.NavigationPredictor": { + "definition": "enum NavigationPredictor { kMouseDown = 1, kUpOrDownArrowButton = 2, kTouchDown = 3 };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/omnibox.mojom;l=8" + }, + "omnibox.mojom.PageClassification": { + "definition": "enum PageClassification { INVALID_SPEC = 0, NTP = 1, BLANK = 2, HOME_PAGE = 3, OTHER = 4, SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6, INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS = 7, SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9, APP_HOME = 10, APP_SEARCH = 11, APP_MAPS = 12, SEARCH_BUTTON_AS_STARTING_FOCUS = 13, CHROMEOS_APP_LIST = 14, NTP_REALBOX = 15, ANDROID_SEARCH_WIDGET = 16, ANDROID_SHORTCUTS_WIDGET = 19, NTP_ZPS_PREFETCH = 20, JOURNEYS = 21, SRP_ZPS_PREFETCH = 22, OTHER_ZPS_PREFETCH = 23, CONTEXTUAL_SEARCHBOX = 24, SEARCH_SIDE_PANEL_SEARCHBOX = 25, LENS_SIDE_PANEL_SEARCHBOX = 26, SEARCH_RESULT_PAGE_ON_CCT = 27, OTHER_ON_CCT = 28};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/omnibox.mojom;l=17" + }, + "searchbox.mojom.PageHandler.SetPage": { + "definition": "SetPage(pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=240" + }, + "searchbox.mojom.PageHandler.OnFocusChanged": { + "definition": "OnFocusChanged(bool focused);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=243" + }, + "searchbox.mojom.PageHandler.QueryAutocomplete": { + "definition": "QueryAutocomplete( mojo_base.mojom.String16 input, bool prevent_inline_autocomplete);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=246" + }, + "searchbox.mojom.PageHandler.StopAutocomplete": { + "definition": "StopAutocomplete(bool clear_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=251" + }, + "searchbox.mojom.PageHandler.OpenAutocompleteMatch": { + "definition": "OpenAutocompleteMatch(uint8 line, url.mojom.Url url, bool are_matches_showing, uint8 mouse_button, bool alt_key, bool ctrl_key, bool meta_key, bool shift_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=258" + }, + "searchbox.mojom.PageHandler.OnNavigationLikely": { + "definition": "OnNavigationLikely(uint8 line, url.mojom.Url url, omnibox.mojom.NavigationPredictor navigation_predictor);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=271" + }, + "searchbox.mojom.PageHandler.DeleteAutocompleteMatch": { + "definition": "DeleteAutocompleteMatch(uint8 line, url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=277" + }, + "searchbox.mojom.PageHandler.ActivateKeyword": { + "definition": "ActivateKeyword(uint8 line, url.mojom.Url url, mojo_base.mojom.TimeTicks match_selection_timestamp, bool is_mouse_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=282" + }, + "searchbox.mojom.PageHandler.ShowContextMenu": { + "definition": "ShowContextMenu(gfx.mojom.Point point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=288" + }, + "searchbox.mojom.PageHandler.ExecuteAction": { + "definition": "ExecuteAction(uint8 line, uint8 action_index, url.mojom.Url url, mojo_base.mojom.TimeTicks match_selection_timestamp, uint8 mouse_button, bool alt_key, bool ctrl_key, bool meta_key, bool shift_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=294" + }, + "searchbox.mojom.PageHandler.OnThumbnailRemoved": { + "definition": "OnThumbnailRemoved();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=305" + }, + "searchbox.mojom.PageHandler.GetPlaceholderConfig": { + "definition": "GetPlaceholderConfig() => (PlaceholderConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=309" + }, + "searchbox.mojom.PageHandler.GetRecentTabs": { + "definition": "GetRecentTabs() => (array tabs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=312" + }, + "searchbox.mojom.PageHandler.GetTabPreview": { + "definition": "GetTabPreview(int32 tab_id) => (string? preview_data_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=315" + }, + "searchbox.mojom.PageHandler.NotifySessionStarted": { + "definition": "NotifySessionStarted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=318" + }, + "searchbox.mojom.PageHandler.NotifySessionAbandoned": { + "definition": "NotifySessionAbandoned();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=321" + }, + "searchbox.mojom.PageHandler.AddFileContext": { + "definition": "AddFileContext(SelectedFileInfo file_info, mojo_base.mojom.BigBuffer file_bytes) => (mojo_base.mojom.UnguessableToken token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=333" + }, + "searchbox.mojom.PageHandler.AddTabContext": { + "definition": "AddTabContext(int32 tab_id, bool delay_upload) => (mojo_base.mojom.UnguessableToken? token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=339" + }, + "searchbox.mojom.PageHandler.DeleteContext": { + "definition": "DeleteContext(mojo_base.mojom.UnguessableToken token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=344" + }, + "searchbox.mojom.PageHandler.ClearFiles": { + "definition": "ClearFiles();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=347" + }, + "searchbox.mojom.PageHandler.SubmitQuery": { + "definition": "SubmitQuery(string query_text, uint8 mouse_button, bool alt_key, bool ctrl_key, bool meta_key, bool shift_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=350" + }, + "searchbox.mojom.Page.AutocompleteResultChanged": { + "definition": "AutocompleteResultChanged(AutocompleteResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=361" + }, + "searchbox.mojom.Page.UpdateSelection": { + "definition": "UpdateSelection( OmniboxPopupSelection old_selection, OmniboxPopupSelection selection);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=365" + }, + "searchbox.mojom.Page.SetKeywordSelected": { + "definition": "SetKeywordSelected(bool is_keyword_selected);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=369" + }, + "searchbox.mojom.Page.SetInputText": { + "definition": "SetInputText(string input);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=372" + }, + "searchbox.mojom.Page.SetThumbnail": { + "definition": "SetThumbnail(string thumbnail_url, bool is_deletable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=375" + }, + "searchbox.mojom.Page.OnContextualInputStatusChanged": { + "definition": "OnContextualInputStatusChanged( mojo_base.mojom.UnguessableToken token, composebox_query.mojom.FileUploadStatus status, composebox_query.mojom.FileUploadErrorType? error_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=381" + }, + "searchbox.mojom.Page.OnTabStripChanged": { + "definition": "OnTabStripChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=387" + }, + "searchbox.mojom.Page.AddFileContext": { + "definition": "AddFileContext(mojo_base.mojom.UnguessableToken token, SelectedFileInfo file_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=390" + }, + "searchbox.mojom.ACMatchClassification": { + "definition": "struct ACMatchClassification { uint32 offset; int32 style;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=17" + }, + "searchbox.mojom.Action": { + "definition": "struct Action { string hint; string suggestion_contents; string icon_path; string a11y_label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=23" + }, + "searchbox.mojom.SuggestionAnswer": { + "definition": "struct SuggestionAnswer { mojo_base.mojom.String16 first_line; mojo_base.mojom.String16 second_line;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=35" + }, + "searchbox.mojom.AutocompleteMatch": { + "definition": "struct AutocompleteMatch { bool is_hidden; mojo_base.mojom.String16 a11y_label; bool allowed_to_be_default_match; array actions; SuggestionAnswer? answer; mojo_base.mojom.String16 contents; array contents_class; mojo_base.mojom.String16 description; array description_class; url.mojom.Url destination_url; mojo_base.mojom.String16 inline_autocompletion; mojo_base.mojom.String16 fill_into_edit; bool? is_weather_answer_suggestion; string icon_path; url.mojom.Url icon_url; string image_dominant_color; string image_url; bool is_noncanned_aim_suggestion; bool is_rich_suggestion; bool is_search_type; bool is_enterprise_search_aggregator_people_type; string type; mojo_base.mojom.String16 remove_button_a11y_label; bool swap_contents_and_description; int32 suggestion_group_id; bool supports_deletion; mojo_base.mojom.String16? tail_suggest_common_prefix; bool has_instant_keyword; string keyword_chip_hint; string keyword_chip_a11y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=40" + }, + "searchbox.mojom.TabInfo": { + "definition": "struct TabInfo { int32 tab_id; string title; url.mojom.Url url; bool show_in_recent_tab_chip; mojo_base.mojom.TimeTicks last_active;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=98" + }, + "searchbox.mojom.FileAttachmentStub": { + "definition": "struct FileAttachmentStub { mojo_base.mojom.UnguessableToken uuid; string name; string mime_type; string? image_data_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=125" + }, + "searchbox.mojom.TabAttachmentStub": { + "definition": "struct TabAttachmentStub { int32 tab_id; string title; url.mojom.Url url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=142" + }, + "searchbox.mojom.SearchContextStub": { + "definition": "struct SearchContextStub { string input; array attachments; ToolMode tool_mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=161" + }, + "searchbox.mojom.SelectedFileInfo": { + "definition": "struct SelectedFileInfo { string file_name; string mime_type; string? image_data_url; bool is_deletable; mojo_base.mojom.JSTime selection_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=171" + }, + "searchbox.mojom.SuggestionGroup": { + "definition": "struct SuggestionGroup { mojo_base.mojom.String16 header; RenderType render_type = RenderType.kDefaultVertical; SideType side_type = SideType.kDefaultPrimary;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=199" + }, + "searchbox.mojom.AutocompleteResult": { + "definition": "struct AutocompleteResult { mojo_base.mojom.String16 input; map suggestion_groups_map; array matches; mojo_base.mojom.String16? smart_compose_inline_hint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=205" + }, + "searchbox.mojom.OmniboxPopupSelection": { + "definition": "struct OmniboxPopupSelection { uint8 line; SelectionLineState state; uint8 action_index;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=221" + }, + "searchbox.mojom.PlaceholderConfig": { + "definition": "struct PlaceholderConfig { array texts; mojo_base.mojom.TimeDelta change_text_animation_interval; mojo_base.mojom.TimeDelta fade_text_animation_duration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=229" + }, + "searchbox.mojom.ToolMode": { + "definition": "enum ToolMode { kDefault = 0, kDeepSearch = 1, kCreateImage = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=114" + }, + "searchbox.mojom.SideType": { + "definition": "enum SideType { kDefaultPrimary = 0, kSecondary = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=186" + }, + "searchbox.mojom.RenderType": { + "definition": "enum RenderType { kDefaultVertical = 0, kHorizontal = 1, kGrid = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=193" + }, + "searchbox.mojom.SelectionLineState": { + "definition": "enum SelectionLineState { kNormal = 1, kKeywordMode = 2, kFocusedButtonAction = 3, kFocusedButtonRemoveSuggestion = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=213" + }, + "searchbox.mojom.SearchContextAttachmentStub": { + "definition": "union SearchContextAttachmentStub { FileAttachmentStub file_attachment; TabAttachmentStub tab_attachment;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/browser/searchbox.mojom;l=155" + }, + "composebox_query.mojom.FileUploadStatus": { + "definition": "enum FileUploadStatus { kNotUploaded = 0, kProcessing = 1, kValidationFailed = 2, kUploadStarted = 3, kUploadSuccessful = 4, kUploadFailed = 5, kUploadExpired = 6, kProcessingSuggestSignalsReady = 7,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/composebox/composebox_query.mojom;l=8" + }, + "composebox_query.mojom.FileUploadErrorType": { + "definition": "enum FileUploadErrorType { kUnknown = 0, kBrowserProcessingError = 1, kNetworkError = 2, kServerError = 3, kServerSizeLimitExceeded = 4, kAborted = 5, kImageProcessingError = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/omnibox/composebox/composebox_query.mojom;l=28" + }, + "on_load_script_injector.mojom.OnLoadScriptInjector.AddOnLoadScript": { + "definition": "AddOnLoadScript(mojo_base.mojom.ReadOnlySharedMemoryRegion script);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/on_load_script_injector/on_load_script_injector.mojom;l=14" + }, + "on_load_script_injector.mojom.OnLoadScriptInjector.ClearOnLoadScripts": { + "definition": "ClearOnLoadScripts();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/on_load_script_injector/on_load_script_injector.mojom;l=15" + }, + "optimization_guide.mojom.PageTextConsumer.OnTextDumpChunk": { + "definition": "OnTextDumpChunk(mojo_base.mojom.String16 chunk);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/content/mojom/page_text_service.mojom;l=41" + }, + "optimization_guide.mojom.PageTextConsumer.OnChunksEnd": { + "definition": "OnChunksEnd();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/content/mojom/page_text_service.mojom;l=44" + }, + "optimization_guide.mojom.PageTextService.RequestPageTextDump": { + "definition": "RequestPageTextDump(PageTextDumpRequest request, pending_remote consumer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/content/mojom/page_text_service.mojom;l=53" + }, + "optimization_guide.mojom.PageTextDumpRequest": { + "definition": "struct PageTextDumpRequest { uint32 max_size; TextDumpEvent event;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/content/mojom/page_text_service.mojom;l=24" + }, + "optimization_guide.mojom.TextDumpEvent": { + "definition": "enum TextDumpEvent { kFirstLayout, kFinishedLoad,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/content/mojom/page_text_service.mojom;l=10" + }, + "optimization_guide_common.mojom.LogSource": { + "definition": "enum LogSource { SERVICE_AND_SETTINGS, HINTS, MODEL_MANAGEMENT, PAGE_CONTENT_ANNOTATIONS, HINTS_NOTIFICATIONS, TEXT_CLASSIFIER, MODEL_EXECUTION, NTP_MODULE, BUILT_IN_AI, CONTEXTUAL_TASKS_CONTEXT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/core/optimization_guide_common.mojom;l=10" + }, + "optimization_guide_internals.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/optimization_guide_internals/webui/optimization_guide_internals.mojom;l=45" + }, + "optimization_guide_internals.mojom.PageHandlerFactory.RequestDownloadedModelsInfo": { + "definition": "RequestDownloadedModelsInfo() => (array downloaded_models_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/optimization_guide_internals/webui/optimization_guide_internals.mojom;l=49" + }, + "optimization_guide_internals.mojom.PageHandlerFactory.RequestLoggedModelQualityClientIds": { + "definition": "RequestLoggedModelQualityClientIds() => (array logged_client_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/optimization_guide_internals/webui/optimization_guide_internals.mojom;l=54" + }, + "optimization_guide_internals.mojom.PageHandlerFactory.RequestMqlsLogs": { + "definition": "RequestMqlsLogs() => (array mqls_logs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/optimization_guide_internals/webui/optimization_guide_internals.mojom;l=59" + }, + "optimization_guide_internals.mojom.Page.OnLogMessageAdded": { + "definition": "OnLogMessageAdded(mojo_base.mojom.Time event_time, optimization_guide_common.mojom.LogSource log_source, string source_file, int64 source_line, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/optimization_guide_internals/webui/optimization_guide_internals.mojom;l=66" + }, + "optimization_guide_internals.mojom.DownloadedModelInfo": { + "definition": "struct DownloadedModelInfo { string optimization_target; int64 version; string file_path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/optimization_guide_internals/webui/optimization_guide_internals.mojom;l=12" + }, + "optimization_guide_internals.mojom.LoggedClientIds": { + "definition": "struct LoggedClientIds { int64 client_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/optimization_guide_internals/webui/optimization_guide_internals.mojom;l=26" + }, + "optimization_guide_internals.mojom.MqlsLog": { + "definition": "struct MqlsLog { string feature; string proto; string status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/optimization_guide_internals/webui/optimization_guide_internals.mojom;l=33" + }, + "optimization_guide.mojom.ModelSolution.CreateSession": { + "definition": "CreateSession( pending_receiver session, on_device_model.mojom.SessionParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=47" + }, + "optimization_guide.mojom.ModelSolution.CreateTextSafetySession": { + "definition": "CreateTextSafetySession( pending_receiver session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=54" + }, + "optimization_guide.mojom.ModelSolution.ReportHealthyCompletion": { + "definition": "ReportHealthyCompletion();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=58" + }, + "optimization_guide.mojom.ModelSubscriber.Unavailable": { + "definition": "Unavailable(ModelUnavailableReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=80" + }, + "optimization_guide.mojom.ModelSubscriber.Available": { + "definition": "Available( ModelSolutionConfig config, pending_remote capability);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=85" + }, + "optimization_guide.mojom.ModelBroker.Subscribe": { + "definition": "Subscribe( ModelSubscriptionOptions opts, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=99" + }, + "optimization_guide.mojom.ModelSolutionConfig": { + "definition": "struct ModelSolutionConfig { mojo_base.mojom.ProtoWrapper feature_config; mojo_base.mojom.ProtoWrapper text_safety_config; mojo_base.mojom.ProtoWrapper model_versions; int32 max_tokens;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=33" + }, + "optimization_guide.mojom.ModelSubscriptionOptions": { + "definition": "struct ModelSubscriptionOptions { ModelBasedCapabilityKey id; bool mark_used;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=90" + }, + "optimization_guide.mojom.ModelBasedCapabilityKey": { + "definition": "enum ModelBasedCapabilityKey { kCompose = 1, kTabOrganization = 2, kWallpaperSearch = 3, kTest = 4, kTextSafety = 5, kPromptApi = 6, kHistorySearch = 7, kSummarize = 8, kHistoryQueryIntent = 12, kBlingPrototyping = 13, kPasswordChangeSubmission = 14, kScamDetection = 15, kPermissionsAi = 17, kWritingAssistanceApi = 18, kFormsClassifications = 20, kEnhancedCalendar = 23, kZeroStateSuggestions = 24, kOnDeviceSpeechRecognition = 25,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=10" + }, + "optimization_guide.mojom.ModelUnavailableReason": { + "definition": "enum ModelUnavailableReason { kUnknown = 0, kNotSupported = 2, kPendingAssets = 3, kPendingUsage = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/optimization_guide/public/mojom/model_broker.mojom;l=61" + }, + "origin_matcher.mojom.SubdomainMatchingRule": { + "definition": "struct SubdomainMatchingRule { string scheme; string optional_host; int32 optional_port;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/origin_matcher/origin_matcher.mojom;l=8" + }, + "origin_matcher.mojom.OriginMatcherRule": { + "definition": "struct OriginMatcherRule { SubdomainMatchingRule? subdomain_matching_rule;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/origin_matcher/origin_matcher.mojom;l=15" + }, + "origin_matcher.mojom.OriginMatcher": { + "definition": "struct OriginMatcher { array rules;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/origin_matcher/origin_matcher.mojom;l=20" + }, + "os_crypt_async.mojom.Algorithm": { + "definition": "enum Algorithm { kAES256GCM, kAES128CBC,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/os_crypt/async/common/algorithm.mojom;l=8" + }, + "os_crypt_async.mojom.Key": { + "definition": "struct Key { Algorithm algorithm; mojo_base.mojom.UnsafeSharedMemoryRegion key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/os_crypt/async/common/encryptor.mojom;l=13" + }, + "os_crypt_async.mojom.Encryptor": { + "definition": "struct Encryptor { string provider_for_encryption; map key_entries;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/os_crypt/async/common/encryptor.mojom;l=24" + }, + "page_image_service.mojom.PageImageServiceHandler.GetPageImageUrl": { + "definition": "GetPageImageUrl(ClientId client_id, url.mojom.Url page_url, Options options) => (ImageResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_image_service/mojom/page_image_service.mojom;l=45" + }, + "page_image_service.mojom.Options": { + "definition": "struct Options { bool suggest_images = true; bool optimization_guide_images = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_image_service/mojom/page_image_service.mojom;l=29" + }, + "page_image_service.mojom.ImageResult": { + "definition": "struct ImageResult { url.mojom.Url image_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_image_service/mojom/page_image_service.mojom;l=35" + }, + "page_image_service.mojom.ClientId": { + "definition": "enum ClientId { Journeys, JourneysSidePanel, NtpRealbox, NtpQuests, Bookmarks, NtpTabResumption, HistoryEmbeddings,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_image_service/mojom/page_image_service.mojom;l=11" + }, + "page_load_metrics.mojom.PageLoadMetrics.UpdateTiming": { + "definition": "UpdateTiming(PageLoadTiming page_load_timing, FrameMetadata frame_metadata, array new_features, array resources, FrameRenderDataUpdate render_data, CpuTiming cpu_load_timing, InputTiming input_timing_delta, SubresourceLoadMetrics? subresource_load_metrics, SoftNavigationMetrics soft_navigation_metrics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=589" + }, + "page_load_metrics.mojom.PageLoadMetrics.SetUpSharedMemoryForDroppedFrames": { + "definition": "SetUpSharedMemoryForDroppedFrames( mojo_base.mojom.ReadOnlySharedMemoryRegion dropped_frames_memory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=603" + }, + "page_load_metrics.mojom.PageLoadMetrics.AddCustomUserTiming": { + "definition": "AddCustomUserTiming(CustomUserTimingMark custom_user_timing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=615" + }, + "page_load_metrics.mojom.DocumentTiming": { + "definition": "struct DocumentTiming { mojo_base.mojom.TimeDelta? dom_content_loaded_event_start; mojo_base.mojom.TimeDelta? load_event_start;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=16" + }, + "page_load_metrics.mojom.LcpResourceLoadTimings": { + "definition": "struct LcpResourceLoadTimings { mojo_base.mojom.TimeDelta? discovery_time; mojo_base.mojom.TimeDelta? load_start; mojo_base.mojom.TimeDelta? load_end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=24" + }, + "page_load_metrics.mojom.LargestContentfulPaintTiming": { + "definition": "struct LargestContentfulPaintTiming { mojo_base.mojom.TimeDelta? largest_image_paint; uint64 largest_image_paint_size; mojo_base.mojom.TimeDelta? largest_text_paint; uint64 largest_text_paint_size; LcpResourceLoadTimings resource_load_timings; uint64 type; double image_bpp; bool image_request_priority_valid = false; network.mojom.RequestPriority image_request_priority_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=35" + }, + "page_load_metrics.mojom.PaintTiming": { + "definition": "struct PaintTiming { mojo_base.mojom.TimeDelta? first_paint; mojo_base.mojom.TimeDelta? first_image_paint; mojo_base.mojom.TimeDelta? first_contentful_paint; mojo_base.mojom.TimeDelta? first_meaningful_paint; LargestContentfulPaintTiming largest_contentful_paint; LargestContentfulPaintTiming experimental_largest_contentful_paint; mojo_base.mojom.TimeDelta? first_eligible_to_paint; mojo_base.mojom.TimeDelta? first_input_or_scroll_notified_timestamp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=70" + }, + "page_load_metrics.mojom.MonotonicPaintTiming": { + "definition": "struct MonotonicPaintTiming { mojo_base.mojom.TimeTicks? first_paint; mojo_base.mojom.TimeTicks? first_contentful_paint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=107" + }, + "page_load_metrics.mojom.ParseTiming": { + "definition": "struct ParseTiming { mojo_base.mojom.TimeDelta? parse_start; mojo_base.mojom.TimeDelta? parse_stop; mojo_base.mojom.TimeDelta? parse_blocked_on_script_load_duration; mojo_base.mojom.TimeDelta? parse_blocked_on_script_load_from_document_write_duration; mojo_base.mojom.TimeDelta? parse_blocked_on_script_execution_duration; mojo_base.mojom.TimeDelta? parse_blocked_on_script_execution_from_document_write_duration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=116" + }, + "page_load_metrics.mojom.InteractiveTiming": { + "definition": "struct InteractiveTiming { mojo_base.mojom.TimeDelta? first_input_delay; mojo_base.mojom.TimeDelta? first_input_timestamp; mojo_base.mojom.TimeDelta? first_scroll_delay; mojo_base.mojom.TimeDelta? first_scroll_timestamp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=153" + }, + "page_load_metrics.mojom.CustomUserTimingMark": { + "definition": "struct CustomUserTimingMark { string mark_name; mojo_base.mojom.TimeDelta start_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=169" + }, + "page_load_metrics.mojom.DomainLookupTiming": { + "definition": "struct DomainLookupTiming { mojo_base.mojom.TimeDelta? domain_lookup_start; mojo_base.mojom.TimeDelta? domain_lookup_end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=176" + }, + "page_load_metrics.mojom.PageLoadTiming": { + "definition": "struct PageLoadTiming { mojo_base.mojom.Time navigation_start; mojo_base.mojom.TimeDelta? connect_start; mojo_base.mojom.TimeDelta? connect_end; mojo_base.mojom.TimeDelta? response_start; DocumentTiming document_timing; InteractiveTiming interactive_timing; PaintTiming paint_timing; ParseTiming parse_timing; DomainLookupTiming domain_lookup_timing; array back_forward_cache_timings; mojo_base.mojom.TimeDelta? activation_start; mojo_base.mojom.TimeDelta? input_to_navigation_start; mojo_base.mojom.TimeDelta? user_timing_mark_fully_loaded; mojo_base.mojom.TimeDelta? user_timing_mark_fully_visible; mojo_base.mojom.TimeDelta? user_timing_mark_interactive; MonotonicPaintTiming? monotonic_paint_timing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=187" + }, + "page_load_metrics.mojom.FrameMetadata": { + "definition": "struct FrameMetadata { int32 behavior_flags = 0; gfx.mojom.Rect? main_frame_intersection_rect; gfx.mojom.Rect? main_frame_viewport_rect; map main_frame_ad_rects; blink.mojom.JavaScriptFrameworkDetectionResult framework_detection_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=241" + }, + "page_load_metrics.mojom.SubresourceLoadMetrics": { + "definition": "struct SubresourceLoadMetrics { uint32 number_of_subresources_loaded; uint32 number_of_subresource_loads_handled_by_service_worker; ServiceWorkerSubresourceLoadMetrics? service_worker_subresource_load_metrics;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=270" + }, + "page_load_metrics.mojom.ServiceWorkerSubresourceLoadMetrics": { + "definition": "struct ServiceWorkerSubresourceLoadMetrics { bool image_handled; bool image_fallback; bool css_handled; bool css_fallback; bool script_handled; bool script_fallback; bool font_handled; bool font_fallback; bool raw_handled; bool raw_fallback; bool svg_handled; bool svg_fallback; bool xsl_handled; bool xsl_fallback; bool link_prefetch_handled; bool link_prefetch_fallback; bool text_track_handled; bool text_track_fallback; bool audio_handled; bool audio_fallback; bool video_handled; bool video_fallback; bool manifest_handled; bool manifest_fallback; bool speculation_rules_handled; bool speculation_rules_fallback; bool mock_handled; bool mock_fallback; bool dictionary_handled; bool dictionary_fallback; uint32 matched_cache_router_source_count = 0; uint32 matched_fetch_event_router_source_count = 0; uint32 matched_network_router_source_count = 0; uint32 matched_race_network_and_fetch_router_source_count = 0; uint32 matched_race_network_and_cache_router_source_count = 0; mojo_base.mojom.TimeDelta total_router_evaluation_time_for_subresources; mojo_base.mojom.TimeDelta total_cache_lookup_time_for_subresources;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=283" + }, + "page_load_metrics.mojom.ResourceDataUpdate": { + "definition": "struct ResourceDataUpdate { int32 request_id = 0; mojo_base.mojom.ByteCount delta_bytes; mojo_base.mojom.ByteCount received_data_length; mojo_base.mojom.ByteCount encoded_body_length; mojo_base.mojom.ByteCount decoded_body_length; bool is_complete; bool reported_as_ad_resource; bool is_main_frame_resource; CacheType cache_type; bool is_primary_frame_resource; string mime_type; bool is_secure_scheme; bool proxy_used;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=491" + }, + "page_load_metrics.mojom.LayoutShift": { + "definition": "struct LayoutShift { mojo_base.mojom.TimeTicks layout_shift_time; double layout_shift_score;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=540" + }, + "page_load_metrics.mojom.FrameRenderDataUpdate": { + "definition": "struct FrameRenderDataUpdate { float layout_shift_delta; float layout_shift_delta_before_input_or_scroll; array new_layout_shifts;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=546" + }, + "page_load_metrics.mojom.CpuTiming": { + "definition": "struct CpuTiming { mojo_base.mojom.TimeDelta task_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=560" + }, + "page_load_metrics.mojom.InputTiming": { + "definition": "struct InputTiming { array user_interaction_latencies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=566" + }, + "page_load_metrics.mojom.UserInteractionLatency": { + "definition": "struct UserInteractionLatency { mojo_base.mojom.TimeDelta interaction_latency; uint64 interaction_offset; mojo_base.mojom.TimeTicks interaction_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=571" + }, + "page_load_metrics.mojom.BackForwardCacheTiming": { + "definition": "struct BackForwardCacheTiming { mojo_base.mojom.TimeDelta first_paint_after_back_forward_cache_restore; array request_animation_frames_after_back_forward_cache_restore; mojo_base.mojom.TimeDelta? first_input_delay_after_back_forward_cache_restore;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=620" + }, + "page_load_metrics.mojom.SoftNavigationMetrics": { + "definition": "struct SoftNavigationMetrics { uint64 count; mojo_base.mojom.TimeDelta start_time; uint32 navigation_id; LargestContentfulPaintTiming largest_contentful_paint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=639" + }, + "page_load_metrics.mojom.CacheType": { + "definition": "enum CacheType { kNotCached, kHttp, kMemory, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/page_load_metrics/common/page_load_metrics.mojom;l=485" + }, + "paint_preview.mojom.PaintPreviewRecorder.CapturePaintPreview": { + "definition": "CapturePaintPreview(PaintPreviewCaptureParams params) => result; GetGeometryMetadata(GeometryMetadataParams params) => (GeometryMetadataResponse? response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_recorder.mojom;l=158" + }, + "paint_preview.mojom.PaintPreviewCaptureParams": { + "definition": "struct PaintPreviewCaptureParams { RecordingPersistence persistence; mojo_base.mojom.UnguessableToken guid; GeometryMetadataParams geometry_metadata_params; bool is_main_frame; bool capture_links; mojo_base.mojom.File? file; uint64 max_capture_size; uint64 max_decoded_image_size_bytes; bool skip_accelerated_content;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_recorder.mojom;l=42" + }, + "paint_preview.mojom.LinkData": { + "definition": "struct LinkData { url.mojom.Url url; gfx.mojom.Rect rect;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_recorder.mojom;l=83" + }, + "paint_preview.mojom.PaintPreviewCaptureResponse": { + "definition": "struct PaintPreviewCaptureResponse { mojo_base.mojom.UnguessableToken? embedding_token; map content_id_to_embedding_token; array links; mojo_base.mojom.TimeDelta blink_recording_time; uint64 serialized_size; GeometryMetadataResponse geometry_metadata; mojo_base.mojom.BigBuffer? skp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_recorder.mojom;l=91" + }, + "paint_preview.mojom.GeometryMetadataParams": { + "definition": "struct GeometryMetadataParams { gfx.mojom.Rect clip_rect; ClipCoordOverride clip_x_coord_override = kNone; ClipCoordOverride clip_y_coord_override = kNone; bool clip_rect_is_hint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_recorder.mojom;l=117" + }, + "paint_preview.mojom.GeometryMetadataResponse": { + "definition": "struct GeometryMetadataResponse { gfx.mojom.Point scroll_offsets; gfx.mojom.Point frame_offsets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_recorder.mojom;l=135" + }, + "paint_preview.mojom.PaintPreviewStatus": { + "definition": "enum PaintPreviewStatus { kOk, kAlreadyCapturing, kCaptureFailed, kGuidCollision, kFileCreationError, kPartialSuccess, kFailed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_recorder.mojom;l=16" + }, + "paint_preview.mojom.RecordingPersistence": { + "definition": "enum RecordingPersistence { kFileSystem, kMemoryBuffer,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_types.mojom;l=12" + }, + "paint_preview.mojom.ClipCoordOverride": { + "definition": "enum ClipCoordOverride { kNone, kCenterOnScrollOffset, kScrollOffset,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_types.mojom;l=18" + }, + "paint_preview.mojom.SerializedRecording": { + "definition": "union SerializedRecording { mojo_base.mojom.File file; mojo_base.mojom.BigBuffer buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/paint_preview/common/mojom/paint_preview_types.mojom;l=29" + }, + "password_manager.mojom.CSVPasswordParser.ParseCSV": { + "definition": "ParseCSV(string raw_csv) => (CSVPasswordSequence? sequence);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/password_manager/services/csv_password/public/mojom/csv_password_parser.mojom;l=38" + }, + "password_manager.mojom.CSVPasswordSequence": { + "definition": "struct CSVPasswordSequence { array csv_passwords;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/password_manager/services/csv_password/public/mojom/csv_password_parser.mojom;l=10" + }, + "password_manager.mojom.CSVPassword": { + "definition": "struct CSVPassword { Status status; string username; string password; string note; url.mojom.Url url; string? invalid_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/password_manager/services/csv_password/public/mojom/csv_password_parser.mojom;l=14" + }, + "password_manager.mojom.Status": { + "definition": "enum Status { kOK = 0, kSyntaxError = 1, kSemanticError = 2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/password_manager/services/csv_password/public/mojom/csv_password_parser.mojom;l=15" + }, + "payments.mojom.PaymentAddress": { + "definition": "struct PaymentAddress { string country; array address_line; string region; string city; string dependent_locality; string postal_code; string sorting_code; string organization; string recipient; string phone;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/payments/mojom/payment_request_data.mojom;l=10" + }, + "payments.mojom.PaymentCurrencyAmount": { + "definition": "struct PaymentCurrencyAmount { string currency; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/payments/mojom/payment_request_data.mojom;l=29" + }, + "payments.mojom.PaymentValidationErrors": { + "definition": "struct PaymentValidationErrors { string error; PayerErrors payer; AddressErrors shipping_address;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/payments/mojom/payment_request_data.mojom;l=43" + }, + "payments.mojom.PayerErrors": { + "definition": "struct PayerErrors { string email; string name; string phone;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/payments/mojom/payment_request_data.mojom;l=51" + }, + "payments.mojom.AddressErrors": { + "definition": "struct AddressErrors { string address_line; string city; string country; string dependent_locality; string organization; string phone; string postal_code; string recipient; string region; string sorting_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/payments/mojom/payment_request_data.mojom;l=59" + }, + "performance_manager.mojom.DocumentCoordinationUnit.SetNetworkAlmostIdle": { + "definition": "SetNetworkAlmostIdle();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=29" + }, + "performance_manager.mojom.DocumentCoordinationUnit.SetLifecycleState": { + "definition": "SetLifecycleState(LifecycleState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=30" + }, + "performance_manager.mojom.DocumentCoordinationUnit.SetHasNonEmptyBeforeUnload": { + "definition": "SetHasNonEmptyBeforeUnload(bool has_nonempty_beforeunload);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=31" + }, + "performance_manager.mojom.DocumentCoordinationUnit.SetHadFormInteraction": { + "definition": "SetHadFormInteraction();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=34" + }, + "performance_manager.mojom.DocumentCoordinationUnit.SetHadUserEdits": { + "definition": "SetHadUserEdits();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=40" + }, + "performance_manager.mojom.DocumentCoordinationUnit.OnStartedUsingWebRTC": { + "definition": "OnStartedUsingWebRTC();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=43" + }, + "performance_manager.mojom.DocumentCoordinationUnit.OnStoppedUsingWebRTC": { + "definition": "OnStoppedUsingWebRTC();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=46" + }, + "performance_manager.mojom.DocumentCoordinationUnit.SetIsAdFrame": { + "definition": "SetIsAdFrame(bool is_ad_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=50" + }, + "performance_manager.mojom.DocumentCoordinationUnit.OnNonPersistentNotificationCreated": { + "definition": "OnNonPersistentNotificationCreated();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=54" + }, + "performance_manager.mojom.DocumentCoordinationUnit.OnFirstContentfulPaint": { + "definition": "OnFirstContentfulPaint(mojo_base.mojom.TimeDelta time_since_navigation_start);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=62" + }, + "performance_manager.mojom.DocumentCoordinationUnit.OnWebMemoryMeasurementRequested": { + "definition": "OnWebMemoryMeasurementRequested(WebMemoryMeasurement.Mode mode) => (WebMemoryMeasurement measurement);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=66" + }, + "performance_manager.mojom.DocumentCoordinationUnit.OnFreezingOriginTrialOptOut": { + "definition": "OnFreezingOriginTrialOptOut();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=70" + }, + "performance_manager.mojom.ProcessCoordinationUnit.SetMainThreadTaskLoadIsLow": { + "definition": "SetMainThreadTaskLoadIsLow(bool main_thread_task_load_is_low);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=79" + }, + "performance_manager.mojom.ProcessCoordinationUnit.OnV8ContextCreated": { + "definition": "OnV8ContextCreated(V8ContextDescription description, IframeAttributionData? iframe_attribution_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=92" + }, + "performance_manager.mojom.ProcessCoordinationUnit.OnV8ContextDetached": { + "definition": "OnV8ContextDetached(blink.mojom.V8ContextToken v8_context_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=104" + }, + "performance_manager.mojom.ProcessCoordinationUnit.OnV8ContextDestroyed": { + "definition": "OnV8ContextDestroyed(blink.mojom.V8ContextToken v8_context_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=111" + }, + "performance_manager.mojom.ProcessCoordinationUnit.OnRemoteIframeAttached": { + "definition": "OnRemoteIframeAttached(blink.mojom.LocalFrameToken parent_frame_token, blink.mojom.RemoteFrameToken remote_frame_token, IframeAttributionData iframe_attribution_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=117" + }, + "performance_manager.mojom.ProcessCoordinationUnit.OnRemoteIframeDetached": { + "definition": "OnRemoteIframeDetached(blink.mojom.LocalFrameToken parent_frame_token, blink.mojom.RemoteFrameToken remote_frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=125" + }, + "performance_manager.mojom.ChildProcessCoordinationUnit.InitializeChildProcessCoordination": { + "definition": "InitializeChildProcessCoordination() => (mojo_base.mojom.ReadOnlySharedMemoryRegion? global_region, mojo_base.mojom.ReadOnlySharedMemoryRegion? process_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=148" + }, + "performance_manager.mojom.CoordinationUnitType": { + "definition": "enum CoordinationUnitType { kFrame, kPage, kProcess, kSystem,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/coordination_unit.mojom;l=18" + }, + "performance_manager.mojom.LifecycleState": { + "definition": "enum LifecycleState { kRunning, kFrozen,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/lifecycle.mojom;l=8" + }, + "performance_manager.mojom.IframeAttributionData": { + "definition": "struct IframeAttributionData { string? id; string? src;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/v8_contexts.mojom;l=13" + }, + "performance_manager.mojom.V8ContextDescription": { + "definition": "struct V8ContextDescription { blink.mojom.V8ContextToken token; V8ContextWorldType world_type; string? world_name; blink.mojom.ExecutionContextToken? execution_context_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/v8_contexts.mojom;l=47" + }, + "performance_manager.mojom.V8ContextWorldType": { + "definition": "enum V8ContextWorldType { kMain, kWorkerOrWorklet, kShadowRealm, kExtension, kIsolated, kInspector, kRegExp,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/v8_contexts.mojom;l=24" + }, + "performance_manager.mojom.WebMemoryAttribution": { + "definition": "struct WebMemoryAttribution { Scope scope; string? url; string? src; string? id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/web_memory.mojom;l=31" + }, + "performance_manager.mojom.WebMemoryBreakdownEntry": { + "definition": "struct WebMemoryBreakdownEntry { mojo_base.mojom.ByteCount? memory; mojo_base.mojom.ByteCount? canvas_memory; array attribution;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/web_memory.mojom;l=57" + }, + "performance_manager.mojom.WebMemoryMeasurement": { + "definition": "struct WebMemoryMeasurement { array breakdown; mojo_base.mojom.ByteCount? detached_memory; mojo_base.mojom.ByteCount? shared_memory; mojo_base.mojom.ByteCount? blink_memory;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/web_memory.mojom;l=71" + }, + "performance_manager.mojom.Scope": { + "definition": "enum Scope { kCrossOriginAggregated, kWindow, kDedicatedWorker, kServiceWorker, kSharedWorker };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/web_memory.mojom;l=33" + }, + "performance_manager.mojom.Mode": { + "definition": "enum Mode { kDefault, kEager };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/performance_manager/public/mojom/web_memory.mojom;l=75" + }, + "persistent_cache.mojom.ReadWriteBackendParams": { + "definition": "struct ReadWriteBackendParams { mojo_base.mojom.File db_file; mojo_base.mojom.File journal_file; mojo_base.mojom.UnsafeSharedMemoryRegion shared_lock;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/persistent_cache/mojom/persistent_cache.mojom;l=11" + }, + "printing.mojom.PrintRenderer.CreatePreviewDocument": { + "definition": "CreatePreviewDocument(mojo_base.mojom.DictionaryValue job_settings) => (mojo_base.mojom.ReadOnlySharedMemoryRegion? preview_document_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=216" + }, + "printing.mojom.PrintPreviewUI.SetOptionsFromDocument": { + "definition": "[EnableIf=enable_print_preview] SetOptionsFromDocument(OptionsFromDocumentParams params, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=226" + }, + "printing.mojom.PrintPreviewUI.DidPrepareDocumentForPreview": { + "definition": "[EnableIf=enable_print_preview] DidPrepareDocumentForPreview(int32 document_cookie, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=232" + }, + "printing.mojom.PrintPreviewUI.DidPreviewPage": { + "definition": "[EnableIf=enable_print_preview] DidPreviewPage(DidPreviewPageParams params, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=236" + }, + "printing.mojom.PrintPreviewUI.MetafileReadyForPrinting": { + "definition": "[EnableIf=enable_print_preview] MetafileReadyForPrinting( DidPreviewDocumentParams params, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=241" + }, + "printing.mojom.PrintPreviewUI.PrintPreviewFailed": { + "definition": "[EnableIf=enable_print_preview] PrintPreviewFailed(int32 document_cookie, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=249" + }, + "printing.mojom.PrintPreviewUI.PrintPreviewCancelled": { + "definition": "[EnableIf=enable_print_preview] PrintPreviewCancelled(int32 document_cookie, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=255" + }, + "printing.mojom.PrintPreviewUI.PrinterSettingsInvalid": { + "definition": "[EnableIf=enable_print_preview] PrinterSettingsInvalid(int32 document_cookie, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=263" + }, + "printing.mojom.PrintPreviewUI.DidGetDefaultPageLayout": { + "definition": "[EnableIf=enable_print_preview] DidGetDefaultPageLayout(PageSizeMargins page_layout_in_points, gfx.mojom.RectF printable_area_in_points, bool all_pages_have_custom_size, bool all_pages_have_custom_orientation, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=273" + }, + "printing.mojom.PrintPreviewUI.DidStartPreview": { + "definition": "[EnableIf=enable_print_preview] DidStartPreview(DidStartPreviewParams params, int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=281" + }, + "printing.mojom.PrintRenderFrame.PrintRequestedPages": { + "definition": "PrintRequestedPages();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=302" + }, + "printing.mojom.PrintRenderFrame.PrintWithParams": { + "definition": "PrintWithParams(PrintPagesParams params) => result; [EnableIf=enable_print_preview] PrintForSystemDialog();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=311" + }, + "printing.mojom.PrintRenderFrame.SetPrintPreviewUI": { + "definition": "[EnableIf=enable_print_preview] SetPrintPreviewUI(pending_associated_remote preview);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=329" + }, + "printing.mojom.PrintRenderFrame.PrintPreview": { + "definition": "[EnableIf=enable_print_preview] PrintPreview(mojo_base.mojom.DictionaryValue settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=335" + }, + "printing.mojom.PrintRenderFrame.OnPrintPreviewDialogClosed": { + "definition": "[EnableIf=enable_print_preview] OnPrintPreviewDialogClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=339" + }, + "printing.mojom.PrintRenderFrame.PrintFrameContent": { + "definition": "PrintFrameContent(PrintFrameContentParams params) => (int32 document_cookie, DidPrintContentParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=344" + }, + "printing.mojom.PrintRenderFrame.ConnectToPdfRenderer": { + "definition": "ConnectToPdfRenderer();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=351" + }, + "printing.mojom.PrintRenderFrame.PrintingDone": { + "definition": "PrintingDone(bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=354" + }, + "printing.mojom.PrintRenderFrame.PrintNodeUnderContextMenu": { + "definition": "PrintNodeUnderContextMenu();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=358" + }, + "printing.mojom.PrintManagerHost.DidGetPrintedPagesCount": { + "definition": "DidGetPrintedPagesCount(int32 cookie, uint32 number_pages);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=366" + }, + "printing.mojom.PrintManagerHost.GetDefaultPrintSettings": { + "definition": "[Sync] GetDefaultPrintSettings() => (PrintParams? default_settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=369" + }, + "printing.mojom.PrintManagerHost.DidShowPrintDialog": { + "definition": "DidShowPrintDialog();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=373" + }, + "printing.mojom.PrintManagerHost.DidPrintDocument": { + "definition": "[Sync] DidPrintDocument(DidPrintDocumentParams params) => (bool completed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=378" + }, + "printing.mojom.PrintManagerHost.IsPrintingEnabled": { + "definition": "[Sync] IsPrintingEnabled() => (bool printing_enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=382" + }, + "printing.mojom.PrintManagerHost.ScriptedPrint": { + "definition": "[Sync] ScriptedPrint(ScriptedPrintParams params) => (PrintPagesParams? settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=388" + }, + "printing.mojom.PrintManagerHost.PrintingFailed": { + "definition": "PrintingFailed(int32 cookie, PrintFailureReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=392" + }, + "printing.mojom.PrintManagerHost.UpdatePrintSettings": { + "definition": "[EnableIf=enable_print_preview, Sync] UpdatePrintSettings(mojo_base.mojom.DictionaryValue job_settings) => (PrintPagesParams? current_settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=396" + }, + "printing.mojom.PrintManagerHost.SetupScriptedPrintPreview": { + "definition": "[EnableIf=enable_print_preview] SetupScriptedPrintPreview() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=403" + }, + "printing.mojom.PrintManagerHost.ShowScriptedPrintPreview": { + "definition": "[EnableIf=enable_print_preview] ShowScriptedPrintPreview(bool is_modifiable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=409" + }, + "printing.mojom.PrintManagerHost.RequestPrintPreview": { + "definition": "[EnableIf=enable_print_preview] RequestPrintPreview(RequestPrintPreviewParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=413" + }, + "printing.mojom.PrintManagerHost.CheckForCancel": { + "definition": "[EnableIf=enable_print_preview, Sync] CheckForCancel(int32 preview_ui_id, int32 request_id) => (bool cancel);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=419" + }, + "printing.mojom.PrintManagerHost.SetAccessibilityTree": { + "definition": "[EnableIf=enable_print_preview] SetAccessibilityTree( int32 cookie, ax.mojom.AXTreeUpdate accessibility_tree);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=424" + }, + "printing.mojom.PreviewIds": { + "definition": "struct PreviewIds { int32 request_id = -1; int32 ui_id = -1;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=18" + }, + "printing.mojom.RequestPrintPreviewParams": { + "definition": "struct RequestPrintPreviewParams { [EnableIf=is_chromeos] bool is_from_arc = false; bool is_modifiable = false; bool webnode_only = false; bool has_selection = false; bool selection_only = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=25" + }, + "printing.mojom.PrintFrameContentParams": { + "definition": "struct PrintFrameContentParams { gfx.mojom.Rect printable_area; int32 document_cookie;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=36" + }, + "printing.mojom.OptionsFromDocumentParams": { + "definition": "struct OptionsFromDocumentParams { bool is_scaling_disabled; int32 copies; DuplexMode duplex;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=46" + }, + "printing.mojom.DidPrintContentParams": { + "definition": "struct DidPrintContentParams { mojo_base.mojom.ReadOnlySharedMemoryRegion? metafile_data_region; map subframe_content_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=59" + }, + "printing.mojom.DidStartPreviewParams": { + "definition": "struct DidStartPreviewParams { uint32 page_count; array pages_to_render; int32 pages_per_sheet; gfx.mojom.SizeF page_size; int32 fit_to_page_scaling;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=68" + }, + "printing.mojom.DidPreviewPageParams": { + "definition": "struct DidPreviewPageParams { DidPrintContentParams content; uint32 page_index; int32 document_cookie;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=83" + }, + "printing.mojom.DidPreviewDocumentParams": { + "definition": "struct DidPreviewDocumentParams { DidPrintContentParams content; int32 document_cookie; uint32 expected_pages_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=93" + }, + "printing.mojom.PrintParams": { + "definition": "struct PrintParams { gfx.mojom.SizeF page_size; gfx.mojom.SizeF content_size; gfx.mojom.RectF printable_area; float margin_top = 0; float margin_left = 0; PageOrientation page_orientation = kUpright; gfx.mojom.Size dpi; double scale_factor = 1.0; int32 document_cookie = 0; bool selection_only = false; int32 preview_ui_id = -1; int32 preview_request_id = 0; bool is_first_request = false; PrintScalingOption print_scaling_option = kSourceSize; bool print_to_pdf = false; bool display_header_footer = false; mojo_base.mojom.String16 title; mojo_base.mojom.String16 url; mojo_base.mojom.String16 header_template; mojo_base.mojom.String16 footer_template; bool rasterize_pdf = false; int32 rasterize_pdf_dpi = 0; bool should_print_backgrounds = false; SkiaDocumentType printed_doc_type = kPDF; bool prefer_css_page_size = false; uint32 pages_per_sheet = 1; bool? generate_tagged_pdf; GenerateDocumentOutline generate_document_outline = kNone;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=103" + }, + "printing.mojom.PrintPagesParams": { + "definition": "struct PrintPagesParams { PrintParams params; array pages;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=174" + }, + "printing.mojom.DidPrintDocumentParams": { + "definition": "struct DidPrintDocumentParams { DidPrintContentParams content; int32 document_cookie; gfx.mojom.Size page_size; gfx.mojom.Rect content_area; gfx.mojom.Point physical_offsets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=183" + }, + "printing.mojom.ScriptedPrintParams": { + "definition": "struct ScriptedPrintParams { int32 cookie; uint32 expected_pages_count; bool has_selection; bool is_scripted; MarginType margin_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=199" + }, + "printing.mojom.PrintWithParamsResultData": { + "definition": "struct PrintWithParamsResultData { DidPrintDocumentParams params; ax.mojom.AXTreeUpdate accessibility_tree; GenerateDocumentOutline generate_document_outline = kNone;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=285" + }, + "printing.mojom.PrintFailureReason": { + "definition": "enum PrintFailureReason { kGeneralFailure, kInvalidPageRange, kPrintingInProgress,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/printing/common/print.mojom;l=291" + }, + "remote_cocoa.mojom.AlertBridge.Show": { + "definition": "Show(AlertBridgeInitParams params) => (AlertDisposition disposition, mojo_base.mojom.String16 text_field_value, bool check_box_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/alert.mojom;l=45" + }, + "remote_cocoa.mojom.AlertBridge.Dismiss": { + "definition": "Dismiss();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/alert.mojom;l=51" + }, + "remote_cocoa.mojom.AlertBridgeInitParams": { + "definition": "struct AlertBridgeInitParams { mojo_base.mojom.String16 title; mojo_base.mojom.String16 message_text; mojo_base.mojom.String16 primary_button_text; mojo_base.mojom.String16? secondary_button_text; mojo_base.mojom.String16? text_field_text; mojo_base.mojom.String16? check_box_text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/alert.mojom;l=9" + }, + "remote_cocoa.mojom.AlertDisposition": { + "definition": "enum AlertDisposition { PRIMARY_BUTTON, SECONDARY_BUTTON, CLOSE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/alert.mojom;l=31" + }, + "remote_cocoa.mojom.Application.CreateAlert": { + "definition": "CreateAlert(pending_receiver alert_bridge_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/application.mojom;l=34" + }, + "remote_cocoa.mojom.Application.CreateNativeWidgetNSWindow": { + "definition": "CreateNativeWidgetNSWindow( uint64 bridge_id, pending_associated_receiver window_receiver, pending_associated_remote host, pending_associated_remote text_input_host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/application.mojom;l=39" + }, + "remote_cocoa.mojom.Application.CreateRenderWidgetHostNSView": { + "definition": "CreateRenderWidgetHostNSView( uint64 view_id, pending_associated_remote host, pending_associated_receiver view_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/application.mojom;l=49" + }, + "remote_cocoa.mojom.Application.CreateSystemMediaControlsBridge": { + "definition": "CreateSystemMediaControlsBridge( pending_receiver receiver, pending_remote host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/application.mojom;l=59" + }, + "remote_cocoa.mojom.Application.CreateWebContentsNSView": { + "definition": "CreateWebContentsNSView( uint64 view_id, pending_associated_remote host, pending_associated_receiver view_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/application.mojom;l=67" + }, + "remote_cocoa.mojom.Application.ForwardCutCopyPaste": { + "definition": "ForwardCutCopyPaste(CutCopyPasteCommand command);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/application.mojom;l=73" + }, + "remote_cocoa.mojom.CutCopyPasteCommand": { + "definition": "enum CutCopyPasteCommand { kCut, kCopy, kPaste};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/application.mojom;l=25" + }, + "remote_cocoa.mojom.Font": { + "definition": "struct Font { FontName name; uint32 size; uint32 style; FontWeight weight;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/font.mojom;l=37" + }, + "remote_cocoa.mojom.SystemFont": { + "definition": "enum SystemFont { kGeneral, kMenu, kToolTip,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/font.mojom;l=8" + }, + "remote_cocoa.mojom.FontWeight": { + "definition": "enum FontWeight { kThin = 100, kExtraLight = 200, kLight = 300, kNormal = 400, kMedium = 500, kSemibold = 600, kBold = 700, kExtraBold = 800, kBlack = 900,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/font.mojom;l=14" + }, + "remote_cocoa.mojom.FontName": { + "definition": "union FontName { SystemFont system_font; string regular_font;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/font.mojom;l=29" + }, + "remote_cocoa.mojom.MenuHost.CommandActivated": { + "definition": "CommandActivated(int32 command_id, int32 event_flags);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=46" + }, + "remote_cocoa.mojom.MenuHost.MenuClosed": { + "definition": "MenuClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=49" + }, + "remote_cocoa.mojom.Menu.Cancel": { + "definition": "Cancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=56" + }, + "remote_cocoa.mojom.Menu.UpdateMenuItem": { + "definition": "UpdateMenuItem(int32 command_id, bool enabled, bool visible, mojo_base.mojom.String16 label);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=59" + }, + "remote_cocoa.mojom.MenuItemCommonFields": { + "definition": "struct MenuItemCommonFields { int32 command_id; mojo_base.mojom.String16 label; bool may_have_mnemonics = false; bool is_checked = false; gfx.mojom.ImageSkia? icon; bool is_enabled = false; bool is_visible = false; bool is_alerted = false; bool is_new_feature = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=16" + }, + "remote_cocoa.mojom.SubmenuMenuItem": { + "definition": "struct SubmenuMenuItem { MenuItemCommonFields common; array children;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=29" + }, + "remote_cocoa.mojom.MenuControllerParams": { + "definition": "struct MenuControllerParams { Font badge_font; skia.mojom.SkColor badge_color; skia.mojom.SkColor badge_text_color; uint32 badge_horizontal_margin; uint32 badge_internal_padding; uint32 badge_min_height; uint32 badge_radius; skia.mojom.SkColor iph_dot_color;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=67" + }, + "remote_cocoa.mojom.ContextMenu": { + "definition": "struct ContextMenu { array items; gfx.mojom.Point anchor; uint64 target_view_id; MenuControllerParams params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=83" + }, + "remote_cocoa.mojom.MenuItem": { + "definition": "union MenuItem { MenuItemCommonFields separator; MenuItemCommonFields regular; SubmenuMenuItem submenu;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/menu.mojom;l=34" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.CreateWindow": { + "definition": "CreateWindow(CreateWindowParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=110" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetParent": { + "definition": "SetParent(uint64 parent_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=114" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.CreateSelectFileDialog": { + "definition": "CreateSelectFileDialog(pending_receiver dialog);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=117" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.ShowCertificateViewer": { + "definition": "ShowCertificateViewer(network.mojom.X509Certificate certificate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=120" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.StackAbove": { + "definition": "StackAbove(uint64 sibling_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=124" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.StackAtTop": { + "definition": "StackAtTop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=125" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.ShowEmojiPanel": { + "definition": "ShowEmojiPanel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=129" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.InitWindow": { + "definition": "InitWindow(NativeWidgetNSWindowInitParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=132" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.InitCompositorView": { + "definition": "InitCompositorView() => (uint32 cg_window_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=138" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.CreateContentView": { + "definition": "CreateContentView(uint64 ns_view_id, gfx.mojom.Rect bounds, int32? corner_radius);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=144" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.DestroyContentView": { + "definition": "DestroyContentView();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=150" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.CloseWindow": { + "definition": "CloseWindow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=154" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.CloseWindowNow": { + "definition": "CloseWindowNow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=158" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetInitialBounds": { + "definition": "SetInitialBounds(gfx.mojom.Rect new_bounds, gfx.mojom.Size minimum_content_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=164" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetBounds": { + "definition": "SetBounds(gfx.mojom.Rect new_bounds, gfx.mojom.Size minimum_content_size, gfx.mojom.Size? maximum_content_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=171" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetSize": { + "definition": "SetSize(gfx.mojom.Size new_size, gfx.mojom.Size minimum_content_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=178" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetSizeAndCenter": { + "definition": "SetSizeAndCenter(gfx.mojom.Size content_size, gfx.mojom.Size minimum_content_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=184" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetVisibilityState": { + "definition": "SetVisibilityState(WindowVisibilityState new_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=189" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetAnimationEnabled": { + "definition": "SetAnimationEnabled(bool animation_enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=192" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetTransitionsToAnimate": { + "definition": "SetTransitionsToAnimate(VisibilityTransition transitions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=196" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetVisibleOnAllSpaces": { + "definition": "SetVisibleOnAllSpaces(bool always_visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=200" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.EnterFullscreen": { + "definition": "EnterFullscreen(int64 target_display_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=205" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.ExitFullscreen": { + "definition": "ExitFullscreen();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=208" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetCanAppearInExistingFullscreenSpaces": { + "definition": "SetCanAppearInExistingFullscreenSpaces( bool can_appear_in_existing_fullscreen_spaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=212" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetMiniaturized": { + "definition": "SetMiniaturized(bool miniaturized);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=216" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetZoomed": { + "definition": "SetZoomed(bool zoomed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=219" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetSizeConstraints": { + "definition": "SetSizeConstraints(gfx.mojom.Size min_size, gfx.mojom.Size max_size, bool is_resizable, bool is_maximizable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=222" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetOpacity": { + "definition": "SetOpacity(float opacity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=228" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetWindowLevel": { + "definition": "SetWindowLevel(int32 level);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=231" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetActivationIndependence": { + "definition": "SetActivationIndependence(bool independence);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=243" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetAspectRatio": { + "definition": "SetAspectRatio(gfx.mojom.SizeF aspect_ratio, gfx.mojom.Size excluded_margin);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=261" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetCALayerParams": { + "definition": "SetCALayerParams(gfx.mojom.CALayerParams ca_layer_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=264" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetWindowTitle": { + "definition": "SetWindowTitle(mojo_base.mojom.String16 title);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=267" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetIgnoresMouseEvents": { + "definition": "SetIgnoresMouseEvents(bool ignores_mouse_events);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=270" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.MakeFirstResponder": { + "definition": "MakeFirstResponder();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=273" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SortSubviews": { + "definition": "SortSubviews(array attached_subview_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=278" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.ClearTouchBar": { + "definition": "ClearTouchBar();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=281" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.UpdateTooltip": { + "definition": "UpdateTooltip();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=284" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.AcquireCapture": { + "definition": "AcquireCapture();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=288" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.ReleaseCapture": { + "definition": "ReleaseCapture();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=289" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.RedispatchKeyEvent": { + "definition": "RedispatchKeyEvent(array native_event_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=292" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetLocalEventMonitorEnabled": { + "definition": "SetLocalEventMonitorEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=295" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetCursor": { + "definition": "SetCursor(ui.mojom.Cursor cursor);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=298" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.EnableImmersiveFullscreen": { + "definition": "EnableImmersiveFullscreen(uint64 fullscreen_overlay_widget_id, uint64 tab_widget_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=303" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.DisableImmersiveFullscreen": { + "definition": "DisableImmersiveFullscreen();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=308" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.UpdateToolbarVisibility": { + "definition": "UpdateToolbarVisibility(ToolbarVisibilityStyle style);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=314" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.OnTopContainerViewBoundsChanged": { + "definition": "OnTopContainerViewBoundsChanged(gfx.mojom.Rect bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=318" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.ImmersiveFullscreenRevealLock": { + "definition": "ImmersiveFullscreenRevealLock();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=323" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.ImmersiveFullscreenRevealUnlock": { + "definition": "ImmersiveFullscreenRevealUnlock();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=326" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetCanGoBack": { + "definition": "SetCanGoBack(bool can_go_back);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=329" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetCanGoForward": { + "definition": "SetCanGoForward(bool can_go_forward);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=332" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.DisplayContextMenu": { + "definition": "DisplayContextMenu(ContextMenu menu, pending_remote host, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=335" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetAllowScreenshots": { + "definition": "SetAllowScreenshots(bool allow);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=340" + }, + "remote_cocoa.mojom.NativeWidgetNSWindow.SetColorMode": { + "definition": "SetColorMode(ui.mojom.ColorMode color_mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=343" + }, + "remote_cocoa.mojom.CreateWindowParams": { + "definition": "struct CreateWindowParams { WindowClass window_class; uint64 style_mask; bool titlebar_appears_transparent; bool window_title_hidden; bool animation_enabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=32" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowInitParams": { + "definition": "struct NativeWidgetNSWindowInitParams { ui.mojom.ModalType modal_type; bool is_translucent; bool has_window_server_shadow; bool force_into_collection_cycle; array state_restoration_data; bool is_tooltip;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=73" + }, + "remote_cocoa.mojom.WindowClass": { + "definition": "enum WindowClass { kDefault, kBrowser, kFrameless, kOverlay,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=20" + }, + "remote_cocoa.mojom.WindowVisibilityState": { + "definition": "enum WindowVisibilityState { kHideWindow, kShowAndActivateWindow, kShowInactive, kMiniaturizeWindow};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=53" + }, + "remote_cocoa.mojom.VisibilityTransition": { + "definition": "enum VisibilityTransition { kShow = 1, kHide = 2, kBoth = 3, kNone = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=66" + }, + "remote_cocoa.mojom.ToolbarVisibilityStyle": { + "definition": "enum ToolbarVisibilityStyle { kNone, kAlways, kAutohide,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window.mojom;l=94" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnVisibilityChanged": { + "definition": "OnVisibilityChanged(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=61" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnSpaceActivationChanged": { + "definition": "OnSpaceActivationChanged(bool is_space_active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=64" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowNativeThemeChanged": { + "definition": "OnWindowNativeThemeChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=67" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnViewSizeChanged": { + "definition": "OnViewSizeChanged(gfx.mojom.Size new_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=72" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetSheetOffsetY": { + "definition": "[Sync] GetSheetOffsetY() => (int32 offset_y);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=76" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.SetKeyboardAccessible": { + "definition": "SetKeyboardAccessible(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=81" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnIsFirstResponderChanged": { + "definition": "OnIsFirstResponderChanged(bool is_first_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=85" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnMouseCaptureActiveChanged": { + "definition": "OnMouseCaptureActiveChanged(bool capture_is_active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=88" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnScrollEvent": { + "definition": "OnScrollEvent(ui.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=92" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnMouseEvent": { + "definition": "OnMouseEvent(ui.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=93" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnGestureEvent": { + "definition": "OnGestureEvent(ui.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=94" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.DispatchKeyEventRemote": { + "definition": "[Sync] DispatchKeyEventRemote(ui.mojom.Event event) => (bool event_handled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=99" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.DispatchKeyEventToMenuControllerRemote": { + "definition": "[Sync] DispatchKeyEventToMenuControllerRemote(ui.mojom.Event event) => (bool event_swallowed, bool event_handled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=109" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.DispatchMonitorEvent": { + "definition": "[Sync] DispatchMonitorEvent(ui.mojom.Event event, bool target_is_this_window) => (bool event_handled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=117" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetHasMenuController": { + "definition": "[Sync] GetHasMenuController() => (bool has_menu_controller);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=123" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetHitTestResult": { + "definition": "[Sync] GetHitTestResult(gfx.mojom.Point location_in_content) => (HitTestResult hit_test_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=128" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetTooltipTextAt": { + "definition": "GetTooltipTextAt(gfx.mojom.Point location_in_content) => (mojo_base.mojom.String16 new_tooltip_text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=133" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetWidgetIsModal": { + "definition": "[Sync] GetWidgetIsModal() => (bool widget_is_modal);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=138" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetIsFocusedViewTextual": { + "definition": "[Sync] GetIsFocusedViewTextual() => (bool is_textual);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=143" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowGeometryChanged": { + "definition": "OnWindowGeometryChanged( gfx.mojom.Rect window_bounds_in_screen_dips, gfx.mojom.Rect content_bounds_in_screen_dips);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=147" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowWillStartLiveResize": { + "definition": "OnWindowWillStartLiveResize();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=152" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowDidEndLiveResize": { + "definition": "OnWindowDidEndLiveResize();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=155" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowFullscreenTransitionStart": { + "definition": "OnWindowFullscreenTransitionStart( bool target_fullscreen_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=158" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowFullscreenTransitionComplete": { + "definition": "OnWindowFullscreenTransitionComplete(bool is_fullscreen);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=165" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowMiniaturizedChanged": { + "definition": "OnWindowMiniaturizedChanged(bool miniaturized);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=168" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowZoomedChanged": { + "definition": "OnWindowZoomedChanged(bool zoomed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=171" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowDisplayChanged": { + "definition": "OnWindowDisplayChanged(display.mojom.Display display);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=175" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowWillClose": { + "definition": "OnWindowWillClose();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=178" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowHasClosed": { + "definition": "OnWindowHasClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=181" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowKeyStatusChanged": { + "definition": "OnWindowKeyStatusChanged(bool is_key, bool is_content_first_responder, bool full_keyboard_access_enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=188" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowStateRestorationDataChanged": { + "definition": "OnWindowStateRestorationDataChanged(array data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=194" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnSheetModalShown": { + "definition": "OnSheetModalShown();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=197" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnSheetModalClosed": { + "definition": "OnSheetModalClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=200" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnImmersiveFullscreenToolbarRevealChanged": { + "definition": "OnImmersiveFullscreenToolbarRevealChanged(bool is_revealed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=205" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnImmersiveFullscreenMenuBarRevealChanged": { + "definition": "OnImmersiveFullscreenMenuBarRevealChanged(double reveal_amount);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=210" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnAutohidingMenuBarHeightChanged": { + "definition": "OnAutohidingMenuBarHeightChanged(int32 menu_bar_height);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=213" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.DoDialogButtonAction": { + "definition": "DoDialogButtonAction(ui.mojom.DialogButton button);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=217" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetDialogButtonInfo": { + "definition": "[Sync] GetDialogButtonInfo(ui.mojom.DialogButton button) => (bool button_exists, mojo_base.mojom.String16 title, bool is_button_enabled, bool is_button_default);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=222" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetDoDialogButtonsExist": { + "definition": "[Sync] GetDoDialogButtonsExist() => (bool buttons_exist);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=230" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetShouldShowWindowTitle": { + "definition": "[Sync] GetShouldShowWindowTitle() => (bool should_show_window_title);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=234" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetCanWindowBecomeKey": { + "definition": "[Sync] GetCanWindowBecomeKey() => (bool can_window_become_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=239" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetAlwaysRenderWindowAsKey": { + "definition": "[Sync] GetAlwaysRenderWindowAsKey() => (bool always_render_as_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=244" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnWindowCloseRequested": { + "definition": "[Sync] OnWindowCloseRequested() => (bool can_window_close);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=249" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetWindowFrameTitlebarHeight": { + "definition": "[Sync] GetWindowFrameTitlebarHeight() => (bool override_titlebar_height, float titlebar_height);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=254" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.OnFocusWindowToolbar": { + "definition": "OnFocusWindowToolbar();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=259" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.SetRemoteAccessibilityTokens": { + "definition": "SetRemoteAccessibilityTokens( array window_token, array view_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=262" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.GetRootViewAccessibilityToken": { + "definition": "[Sync] GetRootViewAccessibilityToken() => (mojo_base.mojom.ProcessId host_pid, array element_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=267" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.ValidateUserInterfaceItem": { + "definition": "[Sync] ValidateUserInterfaceItem(int32 command) => (ValidateUserInterfaceItemResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=274" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.WillExecuteCommand": { + "definition": "[Sync] WillExecuteCommand(int32 command, ui.mojom.WindowOpenDisposition window_open_disposition, bool is_before_first_responder) => (bool will_execute);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=281" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.ExecuteCommand": { + "definition": "[Sync] ExecuteCommand(int32 command, ui.mojom.WindowOpenDisposition window_open_disposition, bool is_before_first_responder) => (bool was_executed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=291" + }, + "remote_cocoa.mojom.NativeWidgetNSWindowHost.HandleAccelerator": { + "definition": "[Sync] HandleAccelerator(ui.mojom.Accelerator accelerator, bool require_priority_handler) => (bool was_handled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=300" + }, + "remote_cocoa.mojom.ValidateUserInterfaceItemResult": { + "definition": "struct ValidateUserInterfaceItemResult { bool enable; bool disable_if_has_no_key_equivalent; mojo_base.mojom.String16? new_title; bool set_hidden_state; bool new_hidden_state; bool set_toggle_state; bool new_toggle_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=17" + }, + "remote_cocoa.mojom.HitTestResult": { + "definition": "enum HitTestResult { kDraggableBackground, kRootView, kSubView, kOther,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=42" + }, + "remote_cocoa.mojom.SelectFileDialog.Show": { + "definition": "Show(SelectFileDialogType type, mojo_base.mojom.String16 title, mojo_base.mojom.FilePath file_path, SelectFileTypeInfo? file_types, int32 file_type_index, string default_extension) => (bool was_cancelled, array files, int32 index, array file_tags);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/select_file_dialog.mojom;l=57" + }, + "remote_cocoa.mojom.SelectFileTypeInfo": { + "definition": "struct SelectFileTypeInfo { array> extensions; array extension_description_overrides; bool include_all_files; bool keep_extension_visible;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/select_file_dialog.mojom;l=22" + }, + "remote_cocoa.mojom.SelectFileDialogType": { + "definition": "enum SelectFileDialogType { kFolder, kUploadFolder, kExistingFolder, kOpenFile, kOpenMultiFile, kSaveAsFile};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/select_file_dialog.mojom;l=12" + }, + "remote_cocoa.mojom.TextInputHost.HasClient": { + "definition": "[Sync] HasClient() => (bool has_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=17" + }, + "remote_cocoa.mojom.TextInputHost.HasInputContext": { + "definition": "[Sync] HasInputContext() => (bool has_input_context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=22" + }, + "remote_cocoa.mojom.TextInputHost.IsRTL": { + "definition": "[Sync] IsRTL() => (bool is_rtl);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=27" + }, + "remote_cocoa.mojom.TextInputHost.GetSelectionRange": { + "definition": "[Sync] GetSelectionRange() => (gfx.mojom.Range range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=33" + }, + "remote_cocoa.mojom.TextInputHost.GetSelectionText": { + "definition": "[Sync] GetSelectionText() => (bool result, mojo_base.mojom.String16 text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=38" + }, + "remote_cocoa.mojom.TextInputHost.InsertText": { + "definition": "InsertText(mojo_base.mojom.String16 text, bool as_character);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=42" + }, + "remote_cocoa.mojom.TextInputHost.DeleteRange": { + "definition": "DeleteRange(gfx.mojom.Range range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=45" + }, + "remote_cocoa.mojom.TextInputHost.SetCompositionText": { + "definition": "SetCompositionText(mojo_base.mojom.String16 text, gfx.mojom.Range selected_range, gfx.mojom.Range replacement_range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=50" + }, + "remote_cocoa.mojom.TextInputHost.ConfirmCompositionText": { + "definition": "ConfirmCompositionText();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=55" + }, + "remote_cocoa.mojom.TextInputHost.HasCompositionText": { + "definition": "[Sync] HasCompositionText() => (bool has_composition_text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=58" + }, + "remote_cocoa.mojom.TextInputHost.GetCompositionTextRange": { + "definition": "[Sync] GetCompositionTextRange() => (gfx.mojom.Range composition_range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=63" + }, + "remote_cocoa.mojom.TextInputHost.GetAttributedSubstringForRange": { + "definition": "[Sync] GetAttributedSubstringForRange(gfx.mojom.Range requested_range) => (mojo_base.mojom.String16 text, gfx.mojom.Range actual_range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=70" + }, + "remote_cocoa.mojom.TextInputHost.GetFirstRectForRange": { + "definition": "[Sync] GetFirstRectForRange(gfx.mojom.Range requested_range) => (gfx.mojom.Rect rect, gfx.mojom.Range actual_range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=79" + }, + "remote_cocoa.mojom.TextInputHost.IsTextEditCommandEnabled": { + "definition": "[Sync] IsTextEditCommandEnabled(ui.mojom.TextEditCommand command) => (bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=85" + }, + "remote_cocoa.mojom.TextInputHost.SetTextEditCommandForNextKeyEvent": { + "definition": "SetTextEditCommandForNextKeyEvent(ui.mojom.TextEditCommand command);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/remote_cocoa/common/text_input_host.mojom;l=89" + }, + "safe_browsing.mojom.SafeBrowsing.CreateCheckerAndCheck": { + "definition": "CreateCheckerAndCheck(blink.mojom.LocalFrameToken? frame_token, pending_receiver receiver, url.mojom.Url url, string method, network.mojom.HttpRequestHeaders headers, int32 load_flags, bool has_user_gesture, bool originated_from_service_worker) => (bool proceed, bool showed_interstitial);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=40" + }, + "safe_browsing.mojom.SafeBrowsing.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=51" + }, + "safe_browsing.mojom.ThreatReporter.GetThreatDOMDetails": { + "definition": "GetThreatDOMDetails() => (array nodes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=91" + }, + "safe_browsing.mojom.PhishingDetector.StartPhishingDetection": { + "definition": "StartPhishingDetection( url.mojom.Url url, ClientSideDetectionType request_type) => (PhishingDetectorResult result, mojo_base.mojom.ProtoWrapper? request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=167" + }, + "safe_browsing.mojom.PhishingModelSetter.SetImageEmbeddingAndPhishingFlatBufferModel": { + "definition": "SetImageEmbeddingAndPhishingFlatBufferModel( mojo_base.mojom.ReadOnlySharedMemoryRegion region, mojo_base.mojom.ReadOnlyFile? tflite_model, mojo_base.mojom.ReadOnlyFile? image_embedding_model);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=186" + }, + "safe_browsing.mojom.PhishingModelSetter.AttachImageEmbeddingModel": { + "definition": "AttachImageEmbeddingModel( mojo_base.mojom.ReadOnlyFile? image_embedding_model);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=195" + }, + "safe_browsing.mojom.PhishingModelSetter.SetPhishingFlatBufferModel": { + "definition": "SetPhishingFlatBufferModel( mojo_base.mojom.ReadOnlySharedMemoryRegion region, mojo_base.mojom.ReadOnlyFile? tflite_model);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=205" + }, + "safe_browsing.mojom.PhishingModelSetter.ClearScorer": { + "definition": "ClearScorer();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=212" + }, + "safe_browsing.mojom.PhishingModelSetter.SetTestObserver": { + "definition": "SetTestObserver(pending_remote? observer) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=216" + }, + "safe_browsing.mojom.PhishingModelSetterTestObserver.PhishingModelUpdated": { + "definition": "PhishingModelUpdated();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=224" + }, + "safe_browsing.mojom.PhishingImageEmbedderDetector.StartImageEmbedding": { + "definition": "StartImageEmbedding(url.mojom.Url url) => (PhishingImageEmbeddingResult result, mojo_base.mojom.ProtoWrapper? image_embedding_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=252" + }, + "safe_browsing.mojom.ExtensionWebRequestReporter.SendWebRequestData": { + "definition": "SendWebRequestData(string origin_extension_id, url.mojom.Url telemetry_url, WebRequestProtocolType protocol_type, WebRequestContactInitiatorType contact_initiator_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=280" + }, + "safe_browsing.mojom.ExtensionWebRequestReporter.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=287" + }, + "safe_browsing.mojom.AttributeNameValue": { + "definition": "struct AttributeNameValue { string name; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=55" + }, + "safe_browsing.mojom.ThreatDOMDetailsNode": { + "definition": "struct ThreatDOMDetailsNode { int32 node_id; url.mojom.Url url; string tag_name; url.mojom.Url parent; int32 parent_node_id; array children; array child_node_ids; array attributes; blink.mojom.FrameToken? child_frame_token; string inner_html;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=61" + }, + "safe_browsing.mojom.PhishingDetectorResult": { + "definition": "enum PhishingDetectorResult { SUCCESS = 0, CLASSIFIER_NOT_READY = 1, CANCELLED = 2, FORWARD_BACK_TRANSITION = 3, INVALID_SCORE = 4, INVALID_URL_FORMAT_REQUEST = 5, INVALID_DOCUMENT_LOADER = 6, URL_FEATURE_EXTRACTION_FAILED = 7, DOM_EXTRACTION_FAILED = 8, TERM_EXTRACTION_FAILED = 9, VISUAL_EXTRACTION_FAILED = 10,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=97" + }, + "safe_browsing.mojom.ClientSideDetectionType": { + "definition": "enum ClientSideDetectionType { kForceRequest, kTriggerModels, kNotificationPermissionPrompt, kKeyboardLock, kPointerLock, kVibrationApi, kFullscreen, kPasswordProtection, kClipboardCopyApi, kCreditCardForm,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=134" + }, + "safe_browsing.mojom.PhishingImageEmbeddingResult": { + "definition": "enum PhishingImageEmbeddingResult { kSuccess, kImageEmbedderNotReady, kCancelled, kForwardBackTransition, kFailed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=230" + }, + "safe_browsing.mojom.WebRequestProtocolType": { + "definition": "enum WebRequestProtocolType { kHttpHttps = 0, kWebSocket = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=258" + }, + "safe_browsing.mojom.WebRequestContactInitiatorType": { + "definition": "enum WebRequestContactInitiatorType { kExtension = 0, kContentScript = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/content/common/safe_browsing.mojom;l=264" + }, + "safe_browsing.mojom.SafeBrowsingUrlChecker.CheckUrl": { + "definition": "CheckUrl(url.mojom.Url url, string method) => (bool proceed, bool showed_interstitial);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/safe_browsing/core/common/safe_browsing_url_checker.mojom;l=16" + }, + "schema_org.improved.mojom.Values": { + "definition": "struct Values { array bool_values; array long_values; array string_values; array double_values; array date_time_values; array time_values; array url_values; array entity_values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/schema_org/common/improved_metadata.mojom;l=18" + }, + "schema_org.improved.mojom.Property": { + "definition": "struct Property { string name; Values values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/schema_org/common/improved_metadata.mojom;l=30" + }, + "schema_org.improved.mojom.Entity": { + "definition": "struct Entity { string type; string id; array properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/schema_org/common/improved_metadata.mojom;l=38" + }, + "schema_org.mojom.Property": { + "definition": "struct Property { string name; Values values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/schema_org/common/metadata.mojom;l=17" + }, + "schema_org.mojom.Entity": { + "definition": "struct Entity { string type; array properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/schema_org/common/metadata.mojom;l=25" + }, + "schema_org.mojom.Values": { + "definition": "union Values { array bool_values; array long_values; array string_values; array entity_values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/schema_org/common/metadata.mojom;l=9" + }, + "security_interstitials.mojom.InterstitialCommands.DontProceed": { + "definition": "DontProceed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=8" + }, + "security_interstitials.mojom.InterstitialCommands.Proceed": { + "definition": "Proceed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=9" + }, + "security_interstitials.mojom.InterstitialCommands.ShowMoreSection": { + "definition": "ShowMoreSection();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=10" + }, + "security_interstitials.mojom.InterstitialCommands.OpenHelpCenter": { + "definition": "OpenHelpCenter();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=11" + }, + "security_interstitials.mojom.InterstitialCommands.OpenDiagnostic": { + "definition": "OpenDiagnostic();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=12" + }, + "security_interstitials.mojom.InterstitialCommands.Reload": { + "definition": "Reload();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=13" + }, + "security_interstitials.mojom.InterstitialCommands.OpenDateSettings": { + "definition": "OpenDateSettings();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=14" + }, + "security_interstitials.mojom.InterstitialCommands.OpenLogin": { + "definition": "OpenLogin();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=15" + }, + "security_interstitials.mojom.InterstitialCommands.DoReport": { + "definition": "DoReport();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=16" + }, + "security_interstitials.mojom.InterstitialCommands.DontReport": { + "definition": "DontReport();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=17" + }, + "security_interstitials.mojom.InterstitialCommands.OpenReportingPrivacy": { + "definition": "OpenReportingPrivacy();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=18" + }, + "security_interstitials.mojom.InterstitialCommands.OpenWhitepaper": { + "definition": "OpenWhitepaper();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=19" + }, + "security_interstitials.mojom.InterstitialCommands.OpenHelpCenterInNewTab": { + "definition": "OpenHelpCenterInNewTab();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=20" + }, + "security_interstitials.mojom.InterstitialCommands.OpenDiagnosticInNewTab": { + "definition": "OpenDiagnosticInNewTab();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=21" + }, + "security_interstitials.mojom.InterstitialCommands.OpenReportingPrivacyInNewTab": { + "definition": "OpenReportingPrivacyInNewTab();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=22" + }, + "security_interstitials.mojom.InterstitialCommands.OpenWhitepaperInNewTab": { + "definition": "OpenWhitepaperInNewTab();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=23" + }, + "security_interstitials.mojom.InterstitialCommands.ReportPhishingErrorInNewTab": { + "definition": "ReportPhishingErrorInNewTab();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=24" + }, + "security_interstitials.mojom.InterstitialCommands.ReportPhishingError": { + "definition": "ReportPhishingError();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=25" + }, + "security_interstitials.mojom.InterstitialCommands.OpenEnhancedProtectionSettings": { + "definition": "OpenEnhancedProtectionSettings();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=27" + }, + "security_interstitials.mojom.InterstitialCommands.ShowCertificateViewer": { + "definition": "[EnableIfNot=is_android|is_ios] ShowCertificateViewer();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/security_interstitials/core/common/mojom/interstitial_commands.mojom;l=31" + }, + "filesystem.mojom.Directory.Read": { + "definition": "[Sync] Read() => (mojo_base.mojom.FileError error, array? directory_contents);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=34" + }, + "filesystem.mojom.Directory.OpenFileHandle": { + "definition": "[Sync] OpenFileHandle(string path, uint32 open_flags) => (mojo_base.mojom.FileError error, mojo_base.mojom.File? file_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=42" + }, + "filesystem.mojom.Directory.OpenFileHandles": { + "definition": "[Sync] OpenFileHandles(array files) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=48" + }, + "filesystem.mojom.Directory.OpenDirectory": { + "definition": "[Sync] OpenDirectory(string path, pending_receiver? directory, uint32 open_flags) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=54" + }, + "filesystem.mojom.Directory.Rename": { + "definition": "[Sync] Rename(string path, string new_path) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=60" + }, + "filesystem.mojom.Directory.Replace": { + "definition": "[Sync] Replace(string path, string new_path) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=67" + }, + "filesystem.mojom.Directory.Delete": { + "definition": "[Sync] Delete(string path, uint32 delete_flags) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=72" + }, + "filesystem.mojom.Directory.Exists": { + "definition": "[Sync] Exists(string path) => (mojo_base.mojom.FileError error, bool exists);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=77" + }, + "filesystem.mojom.Directory.IsWritable": { + "definition": "[Sync] IsWritable(string path) => (mojo_base.mojom.FileError error, bool is_writable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=81" + }, + "filesystem.mojom.Directory.Flush": { + "definition": "[Sync] Flush() => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=87" + }, + "filesystem.mojom.Directory.StatFile": { + "definition": "[Sync] StatFile(string path) => (mojo_base.mojom.FileError error, FileInformation? file_information);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=92" + }, + "filesystem.mojom.Directory.Clone": { + "definition": "Clone(pending_receiver directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=97" + }, + "filesystem.mojom.Directory.ReadEntireFile": { + "definition": "[Sync] ReadEntireFile(string path) => (mojo_base.mojom.FileError error, array data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=100" + }, + "filesystem.mojom.Directory.WriteFile": { + "definition": "[Sync] WriteFile(string path, array data) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=105" + }, + "filesystem.mojom.FileOpenDetails": { + "definition": "struct FileOpenDetails { string path; uint32 open_flags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=11" + }, + "filesystem.mojom.FileOpenResult": { + "definition": "struct FileOpenResult { string path; mojo_base.mojom.FileError error; mojo_base.mojom.File? file_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/directory.mojom;l=16" + }, + "filesystem.mojom.TimespecOrNow": { + "definition": "struct TimespecOrNow { bool now; double seconds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/types.mojom;l=24" + }, + "filesystem.mojom.FileInformation": { + "definition": "struct FileInformation { FsFileType type; int64 size; double atime; double mtime; double ctime;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/types.mojom;l=32" + }, + "filesystem.mojom.DirectoryEntry": { + "definition": "struct DirectoryEntry { mojo_base.mojom.SafeBaseName name; string display_name; FsFileType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/types.mojom;l=77" + }, + "filesystem.mojom.Whence": { + "definition": "enum Whence { FROM_BEGIN = 0, FROM_CURRENT = 1, FROM_END = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/types.mojom;l=12" + }, + "filesystem.mojom.FsFileType": { + "definition": "enum FsFileType { UNKNOWN = 0, REGULAR_FILE, DIRECTORY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/filesystem/public/mojom/types.mojom;l=70" + }, + "font_service.mojom.FontService.MatchFamilyName": { + "definition": "MatchFamilyName(string family_name, TypefaceStyle style) => (FontIdentity? identity, string family_name, TypefaceStyle style);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=63" + }, + "font_service.mojom.FontService.OpenStream": { + "definition": "OpenStream(uint32 id_number) => (mojo_base.mojom.ReadOnlyFile? font_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=67" + }, + "font_service.mojom.FontService.FallbackFontForCharacter": { + "definition": "FallbackFontForCharacter(uint32 character, string locale) => (FontIdentity? identity, string family_name, bool is_bold, bool is_italic);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=71" + }, + "font_service.mojom.FontService.FontRenderStyleForStrike": { + "definition": "FontRenderStyleForStrike(string family, uint32 size, bool is_italic, bool is_bold, float device_scale_factor) => (FontRenderStyle? font_render_style);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=80" + }, + "font_service.mojom.FontService.MatchFontByPostscriptNameOrFullFontName": { + "definition": "MatchFontByPostscriptNameOrFullFontName( string postscript_name_or_full_font_name) => (FontIdentity? identity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=90" + }, + "font_service.mojom.FontService.ListFamilies": { + "definition": "[EnableIf=enable_pdf] ListFamilies() => (array families);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=94" + }, + "font_service.mojom.FontService.MatchFontWithFallback": { + "definition": "[EnableIf=enable_pdf] MatchFontWithFallback(string family, bool is_bold, bool is_italic, uint32 charset, uint32 fallback_family_type) => (mojo_base.mojom.ReadOnlyFile? font_file_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=98" + }, + "font_service.mojom.TypefaceStyle": { + "definition": "struct TypefaceStyle { uint16 weight; uint8 width; TypefaceSlant slant;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=16" + }, + "font_service.mojom.FontIdentity": { + "definition": "struct FontIdentity { uint32 id; int32 ttc_index; mojo_base.mojom.FilePath filepath;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=23" + }, + "font_service.mojom.FontRenderStyle": { + "definition": "struct FontRenderStyle { RenderStyleSwitch use_bitmaps; RenderStyleSwitch use_autohint; RenderStyleSwitch use_hinting; uint8 hint_style; RenderStyleSwitch use_antialias; RenderStyleSwitch use_subpixel_rendering; RenderStyleSwitch use_subpixel_positioning;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=39" + }, + "font_service.mojom.TypefaceSlant": { + "definition": "enum TypefaceSlant { ROMAN = 0, ITALIC = 1, OBLIQUE = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=10" + }, + "font_service.mojom.RenderStyleSwitch": { + "definition": "enum RenderStyleSwitch { OFF = 0, ON = 1, NO_PREFERENCE = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font/public/mojom/font_service.mojom;l=33" + }, + "font_data_service.mojom.FontDataService.MatchFamilyName": { + "definition": "[Sync] MatchFamilyName(string family_name, TypefaceStyle style) => (MatchFamilyNameResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=69" + }, + "font_data_service.mojom.FontDataService.MatchFamilyNameCharacter": { + "definition": "[Sync] MatchFamilyNameCharacter( string family_name, TypefaceStyle style, array bcp47s, int32 character) => (MatchFamilyNameResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=76" + }, + "font_data_service.mojom.FontDataService.GetAllFamilyNames": { + "definition": "[Sync] GetAllFamilyNames() => (array result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=86" + }, + "font_data_service.mojom.FontDataService.LegacyMakeTypeface": { + "definition": "[Sync] LegacyMakeTypeface(string? family_name, TypefaceStyle style) => (MatchFamilyNameResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=92" + }, + "font_data_service.mojom.TypefaceStyle": { + "definition": "struct TypefaceStyle { uint16 weight; uint8 width; TypefaceSlant slant;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=16" + }, + "font_data_service.mojom.Coordinate": { + "definition": "struct Coordinate { uint32 axis; float value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=22" + }, + "font_data_service.mojom.VariationPosition": { + "definition": "struct VariationPosition { array coordinates; uint16 coordinateCount;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=27" + }, + "font_data_service.mojom.TypefaceFile": { + "definition": "struct TypefaceFile { mojo_base.mojom.ReadOnlyFile file_handle; uint64 id; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=32" + }, + "font_data_service.mojom.MatchFamilyNameResult": { + "definition": "struct MatchFamilyNameResult { TypefaceData typeface_data; int32 ttc_index; VariationPosition? variation_position;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=48" + }, + "font_data_service.mojom.TypefaceSlant": { + "definition": "enum TypefaceSlant { kRoman = 0, kItalic = 1, kOblique = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=10" + }, + "font_data_service.mojom.TypefaceData": { + "definition": "union TypefaceData { mojo_base.mojom.ReadOnlySharedMemoryRegion region; TypefaceFile font_file;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/font_data/public/mojom/font_data_service.mojom;l=40" + }, + "heap_profiling.mojom.ProfilingClient.StartProfiling": { + "definition": "StartProfiling(ProfilingParams params) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_client.mojom;l=78" + }, + "heap_profiling.mojom.ProfilingClient.RetrieveHeapProfile": { + "definition": "RetrieveHeapProfile() => (HeapProfile profile);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_client.mojom;l=81" + }, + "heap_profiling.mojom.ProfilingParams": { + "definition": "struct ProfilingParams { StackMode stack_mode; uint32 sampling_rate;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_client.mojom;l=25" + }, + "heap_profiling.mojom.HeapProfileSample": { + "definition": "struct HeapProfileSample { AllocatorType allocator; uint64 size; uint64 total; uint64 context_id; array stack;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_client.mojom;l=38" + }, + "heap_profiling.mojom.HeapProfile": { + "definition": "struct HeapProfile { array samples; map strings;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_client.mojom;l=61" + }, + "heap_profiling.mojom.StackMode": { + "definition": "enum StackMode { NATIVE_WITH_THREAD_NAMES, NATIVE_WITHOUT_THREAD_NAMES,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_client.mojom;l=8" + }, + "heap_profiling.mojom.AllocatorType": { + "definition": "enum AllocatorType { kMalloc, kPartitionAlloc,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_client.mojom;l=18" + }, + "heap_profiling.mojom.ProfilingService.AddProfilingClient": { + "definition": "AddProfilingClient(mojo_base.mojom.ProcessId pid, pending_remote client, ProcessType process_type, ProfilingParams params) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_service.mojom;l=28" + }, + "heap_profiling.mojom.ProfilingService.GetProfiledPids": { + "definition": "GetProfiledPids() => (array pids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_service.mojom;l=34" + }, + "heap_profiling.mojom.ProcessType": { + "definition": "enum ProcessType { OTHER = 0, BROWSER = 1, RENDERER = 2, GPU = 3, LAST = GPU};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/heap_profiling/public/mojom/heap_profiling_service.mojom;l=12" + }, + "on_device_translation.mojom.FileOperationProxy.FileExists": { + "definition": "[Sync] FileExists(uint32 package_index, mojo_base.mojom.FilePath relative_path) => (bool exists, bool is_directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/on_device_translation_service.mojom;l=35" + }, + "on_device_translation.mojom.FileOperationProxy.Open": { + "definition": "[Sync] Open(uint32 package_index, mojo_base.mojom.FilePath relative_path) => (mojo_base.mojom.ReadOnlyFile? file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/on_device_translation_service.mojom;l=43" + }, + "on_device_translation.mojom.OnDeviceTranslationService.SetServiceConfig": { + "definition": "SetServiceConfig(OnDeviceTranslationServiceConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/on_device_translation_service.mojom;l=102" + }, + "on_device_translation.mojom.OnDeviceTranslationService.CreateTranslator": { + "definition": "CreateTranslator(string source_lang, string target_lang, pending_receiver receiver) => (CreateTranslatorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/on_device_translation_service.mojom;l=111" + }, + "on_device_translation.mojom.OnDeviceTranslationService.CanTranslate": { + "definition": "CanTranslate(string source_lang, string target_lang) => (bool can_stranslate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/on_device_translation_service.mojom;l=118" + }, + "on_device_translation.mojom.OnDeviceTranslationLanguagePackage": { + "definition": "struct OnDeviceTranslationLanguagePackage { string language1; string language2;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/on_device_translation_service.mojom;l=17" + }, + "on_device_translation.mojom.OnDeviceTranslationServiceConfig": { + "definition": "struct OnDeviceTranslationServiceConfig { array packages; pending_remote file_operation_proxy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/on_device_translation_service.mojom;l=49" + }, + "on_device_translation.mojom.CreateTranslatorResult": { + "definition": "enum CreateTranslatorResult { kSuccess = 0, kErrorInvalidBinary = 1, kErrorInvalidFunctionPointer = 2, kErrorFailedToInitialize = 3, kErrorFailedToCreateTranslator = 4, kErrorInvalidVersion= 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/on_device_translation_service.mojom;l=57" + }, + "on_device_translation.mojom.Translator.Translate": { + "definition": "Translate(string input) => (string? output);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/translator.mojom;l=12" + }, + "on_device_translation.mojom.Translator.SplitSentences": { + "definition": "SplitSentences(string input) => (array sentences);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/on_device_translation/public/mojom/translator.mojom;l=16" + }, + "paint_preview.mojom.PaintPreviewCompositor.BeginSeparatedFrameComposite": { + "definition": "BeginSeparatedFrameComposite(PaintPreviewBeginCompositeRequest request) => (BeginCompositeStatus status, PaintPreviewBeginCompositeResponse? response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=104" + }, + "paint_preview.mojom.PaintPreviewCompositor.BitmapForSeparatedFrame": { + "definition": "BitmapForSeparatedFrame(mojo_base.mojom.UnguessableToken frame_guid, gfx.mojom.Rect clip_rect, float scale_factor) => (BitmapStatus status, skia.mojom.BitmapN32? bitmap);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=113" + }, + "paint_preview.mojom.PaintPreviewCompositor.BeginMainFrameComposite": { + "definition": "BeginMainFrameComposite(PaintPreviewBeginCompositeRequest request) => (BeginCompositeStatus status, PaintPreviewBeginCompositeResponse? response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=121" + }, + "paint_preview.mojom.PaintPreviewCompositor.BitmapForMainFrame": { + "definition": "BitmapForMainFrame(gfx.mojom.Rect clip_rect, float scale_factor) => (BitmapStatus status, skia.mojom.BitmapN32? bitmap);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=130" + }, + "paint_preview.mojom.PaintPreviewCompositor.SetRootFrameUrl": { + "definition": "SetRootFrameUrl(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=134" + }, + "paint_preview.mojom.PaintPreviewCompositorCollection.SetDiscardableSharedMemoryManager": { + "definition": "SetDiscardableSharedMemoryManager( pending_remote manager);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=144" + }, + "paint_preview.mojom.PaintPreviewCompositorCollection.CreateCompositor": { + "definition": "CreateCompositor(pending_receiver compositor) => (mojo_base.mojom.UnguessableToken compositor_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=150" + }, + "paint_preview.mojom.PaintPreviewCompositorCollection.OnMemoryPressure": { + "definition": "OnMemoryPressure(mojo_base.mojom.MemoryPressureLevel memory_pressure_level);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=154" + }, + "paint_preview.mojom.PaintPreviewCompositorCollection.ListCompositors": { + "definition": "ListCompositors() => (array compositor_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=157" + }, + "paint_preview.mojom.PaintPreviewBeginCompositeRequest": { + "definition": "struct PaintPreviewBeginCompositeRequest { mojo_base.mojom.ProtoWrapper preview; map recording_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=18" + }, + "paint_preview.mojom.SubframeClipRect": { + "definition": "struct SubframeClipRect { mojo_base.mojom.UnguessableToken frame_guid; gfx.mojom.RectF clip_rect;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=27" + }, + "paint_preview.mojom.FrameData": { + "definition": "struct FrameData { gfx.mojom.Size scroll_extents; gfx.mojom.Size scroll_offsets; array subframes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=33" + }, + "paint_preview.mojom.PaintPreviewBeginCompositeResponse": { + "definition": "struct PaintPreviewBeginCompositeResponse { mojo_base.mojom.UnguessableToken root_frame_guid; map frames;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=48" + }, + "paint_preview.mojom.BeginCompositeStatus": { + "definition": "enum BeginCompositeStatus { kSuccess = 0, kPartialSuccess = 1, kDeserializingFailure = -1, kCompositingFailure = -2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=66" + }, + "paint_preview.mojom.BitmapStatus": { + "definition": "enum BitmapStatus { kSuccess = 0, kMissingFrame = 1, kAllocFailed = 2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom;l=85" + }, + "patch.mojom.FilePatcher.PatchFilePuffPatch": { + "definition": "PatchFilePuffPatch(mojo_base.mojom.ReadOnlyFile input_file, mojo_base.mojom.ReadOnlyFile patch_file, mojo_base.mojom.File output_file) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/patch/public/mojom/file_patcher.mojom;l=33" + }, + "patch.mojom.FilePatcher.PatchFileZucchini": { + "definition": "PatchFileZucchini(mojo_base.mojom.ReadOnlyFile input_file, mojo_base.mojom.ReadOnlyFile patch_file, mojo_base.mojom.File output_file) => (ZucchiniStatus result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/patch/public/mojom/file_patcher.mojom;l=39" + }, + "patch.mojom.ZucchiniStatus": { + "definition": "enum ZucchiniStatus { kStatusSuccess, kStatusInvalidParam, kStatusFileReadError, kStatusFileWriteError, kStatusPatchReadError, kStatusPatchWriteError, kStatusInvalidOldImage, kStatusInvalidNewImage, kStatusDiskFull, kStatusIoError, kStatusFatal,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/patch/public/mojom/file_patcher.mojom;l=11" + }, + "printing.mojom.PrintCompositor.NotifyUnavailableSubframe": { + "definition": "NotifyUnavailableSubframe(uint64 frame_guid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=35" + }, + "printing.mojom.PrintCompositor.AddSubframeContent": { + "definition": "AddSubframeContent( uint64 frame_guid, mojo_base.mojom.ReadOnlySharedMemoryRegion serialized_content, map subframe_content_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=43" + }, + "printing.mojom.PrintCompositor.SetAccessibilityTree": { + "definition": "[UnlimitedSize] SetAccessibilityTree(ax.mojom.AXTreeUpdate accessibility_tree);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=54" + }, + "printing.mojom.PrintCompositor.CompositePage": { + "definition": "CompositePage(uint64 frame_guid, mojo_base.mojom.ReadOnlySharedMemoryRegion sk_region, map subframe_content_info) => (Status status, mojo_base.mojom.ReadOnlySharedMemoryRegion? document_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=67" + }, + "printing.mojom.PrintCompositor.CompositeDocument": { + "definition": "CompositeDocument(uint64 frame_guid, mojo_base.mojom.ReadOnlySharedMemoryRegion sk_region, map subframe_content_info, DocumentType document_type) => (Status status, mojo_base.mojom.ReadOnlySharedMemoryRegion? document_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=78" + }, + "printing.mojom.PrintCompositor.PrepareToCompositeDocument": { + "definition": "PrepareToCompositeDocument(DocumentType document_type) => (Status status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=89" + }, + "printing.mojom.PrintCompositor.FinishDocumentComposition": { + "definition": "FinishDocumentComposition(uint32 pages_count) => (Status status, mojo_base.mojom.ReadOnlySharedMemoryRegion? document_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=97" + }, + "printing.mojom.PrintCompositor.SetWebContentsURL": { + "definition": "SetWebContentsURL(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=103" + }, + "printing.mojom.PrintCompositor.SetUserAgent": { + "definition": "SetUserAgent(string user_agent);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=106" + }, + "printing.mojom.PrintCompositor.SetGenerateDocumentOutline": { + "definition": "SetGenerateDocumentOutline(GenerateDocumentOutline generate_document_outline);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=109" + }, + "printing.mojom.PrintCompositor.SetTitle": { + "definition": "SetTitle(string title);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=112" + }, + "printing.mojom.PrintCompositor.SetWatermarkBlock": { + "definition": "[EnableIf=enterprise_watermark] SetWatermarkBlock(watermark.mojom.WatermarkBlock? watermark_block);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=117" + }, + "printing.mojom.Status": { + "definition": "enum Status { kSuccess = 0, kHandleMapError = 1, kContentFormatError = 2, kCompositingFailure = 3, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=19" + }, + "printing.mojom.DocumentType": { + "definition": "enum DocumentType { kPDF = 0, kXPS = 1, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/print_compositor/public/mojom/print_compositor.mojom;l=26" + }, + "quarantine.mojom.Quarantine.QuarantineFile": { + "definition": "QuarantineFile(mojo_base.mojom.FilePath full_path, url.mojom.Url source_url, url.mojom.Url referrer_url, url.mojom.Origin? request_initiator, string client_guid) => (QuarantineFileResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/quarantine/public/mojom/quarantine.mojom;l=38" + }, + "quarantine.mojom.QuarantineFileResult": { + "definition": "enum QuarantineFileResult { OK, ACCESS_DENIED, BLOCKED_BY_POLICY, ANNOTATION_FAILED, FILE_MISSING, SECURITY_CHECK_FAILED, VIRUS_INFECTED };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/quarantine/public/mojom/quarantine.mojom;l=12" + }, + "storage.mojom.BucketClientInfo": { + "definition": "struct BucketClientInfo { int32 process_id; blink.mojom.ExecutionContextToken context_token; blink.mojom.DocumentToken? document_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/bucket_client_info.mojom;l=13" + }, + "storage.mojom.IndexedDBClientStateChecker.DisallowInactiveClient": { + "definition": "DisallowInactiveClient( int32 connection_id, DisallowInactiveClientReason reason, pending_receiver? keep_active) => (bool was_active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_client_state_checker.mojom;l=48" + }, + "storage.mojom.IndexedDBClientStateChecker.MakeClone": { + "definition": "MakeClone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_client_state_checker.mojom;l=55" + }, + "storage.mojom.DisallowInactiveClientReason": { + "definition": "enum DisallowInactiveClientReason { kVersionChangeEvent = 0, kTransactionIsAcquiringLocks = 1, kTransactionIsStartingWhileBlockingOthers = 2, kTransactionIsOngoingAndBlockingOthers = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_client_state_checker.mojom;l=7" + }, + "storage.mojom.IndexedDBObserver.OnIndexedDBListChanged": { + "definition": "OnIndexedDBListChanged(storage.mojom.BucketLocator bucket_locator);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=33" + }, + "storage.mojom.IndexedDBObserver.OnIndexedDBContentChanged": { + "definition": "OnIndexedDBContentChanged(storage.mojom.BucketLocator bucket_locator, mojo_base.mojom.String16 database_name, mojo_base.mojom.String16 object_store_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=37" + }, + "storage.mojom.IndexedDBControl.BindIndexedDB": { + "definition": "BindIndexedDB( storage.mojom.BucketLocator bucket_locator, storage.mojom.BucketClientInfo client_info, pending_remote client_state_checker_remote, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=51" + }, + "storage.mojom.IndexedDBControl.ForceClose": { + "definition": "ForceClose(storage.mojom.BucketId bucket_id, ForceCloseReason reason) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=59" + }, + "storage.mojom.IndexedDBControl.DownloadBucketData": { + "definition": "DownloadBucketData(storage.mojom.BucketId bucket_id) => (bool success, mojo_base.mojom.FilePath temp_path, mojo_base.mojom.FilePath zip_path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=65" + }, + "storage.mojom.IndexedDBControl.GetAllBucketsDetails": { + "definition": "GetAllBucketsDetails() => (bool incognito, array details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=72" + }, + "storage.mojom.IndexedDBControl.StartMetadataRecording": { + "definition": "StartMetadataRecording(storage.mojom.BucketId bucket_id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=78" + }, + "storage.mojom.IndexedDBControl.StopMetadataRecording": { + "definition": "StopMetadataRecording(storage.mojom.BucketId bucket_id) => (array metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=82" + }, + "storage.mojom.IndexedDBControl.SetForceKeepSessionState": { + "definition": "SetForceKeepSessionState();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=87" + }, + "storage.mojom.IndexedDBControl.AddObserver": { + "definition": "AddObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=90" + }, + "storage.mojom.IndexedDBControl.ApplyPolicyUpdates": { + "definition": "ApplyPolicyUpdates(array policy_updates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=94" + }, + "storage.mojom.IndexedDBControl.BindTestInterfaceForTesting": { + "definition": "BindTestInterfaceForTesting(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=98" + }, + "storage.mojom.ForceCloseReason": { + "definition": "enum ForceCloseReason { FORCE_CLOSE_DELETE_ORIGIN = 0, FORCE_CLOSE_BACKING_STORE_FAILURE = 1, FORCE_CLOSE_INTERNALS_PAGE = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control.mojom;l=21" + }, + "storage.mojom.MockFailureInjector.FailOperation": { + "definition": "FailOperation(FailClass failure_class, FailMethod failure_method, int32 instance_num, int32 call_num);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=32" + }, + "storage.mojom.IndexedDBControlTest.GetBaseDataPathForTesting": { + "definition": "GetBaseDataPathForTesting() => (mojo_base.mojom.FilePath path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=41" + }, + "storage.mojom.IndexedDBControlTest.GetFilePathForTesting": { + "definition": "GetFilePathForTesting(storage.mojom.BucketLocator bucket_locator, bool for_sqlite) => (mojo_base.mojom.FilePath path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=44" + }, + "storage.mojom.IndexedDBControlTest.ResetCachesForTesting": { + "definition": "ResetCachesForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=49" + }, + "storage.mojom.IndexedDBControlTest.GetPathForBlobForTesting": { + "definition": "GetPathForBlobForTesting(storage.mojom.BucketLocator bucket_locator, int64 database_id, int64 blob_number) => (mojo_base.mojom.FilePath path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=52" + }, + "storage.mojom.IndexedDBControlTest.FlushBackingStoreForTesting": { + "definition": "FlushBackingStoreForTesting(storage.mojom.BucketLocator bucket_locator) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=59" + }, + "storage.mojom.IndexedDBControlTest.FlushBucketSequenceForTesting": { + "definition": "FlushBucketSequenceForTesting(storage.mojom.BucketLocator bucket_locator) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=62" + }, + "storage.mojom.IndexedDBControlTest.GetUsageForTesting": { + "definition": "GetUsageForTesting() => (int64 total_usage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=66" + }, + "storage.mojom.IndexedDBControlTest.BindMockFailureSingletonForTesting": { + "definition": "BindMockFailureSingletonForTesting( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=75" + }, + "storage.mojom.IndexedDBControlTest.ForceInitializeFromFilesForTesting": { + "definition": "ForceInitializeFromFilesForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=79" + }, + "storage.mojom.FailClass": { + "definition": "enum FailClass { NOTHING, LEVELDB_ITERATOR, LEVELDB_DIRECT_TRANSACTION, LEVELDB_TRANSACTION, LEVELDB_DATABASE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=11" + }, + "storage.mojom.FailMethod": { + "definition": "enum FailMethod { NOTHING, COMMIT, COMMIT_DISK_FULL, COMMIT_SYNC, GET, SEEK, WRITE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_control_test.mojom;l=19" + }, + "storage.mojom.IdbOriginMetadata": { + "definition": "struct IdbOriginMetadata { url.mojom.Origin origin; array storage_keys;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_internals_types.mojom;l=18" + }, + "storage.mojom.IdbStorageKeyMetadata": { + "definition": "struct IdbStorageKeyMetadata { network.mojom.SchemefulSite top_level_site; string serialized_storage_key; array buckets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_internals_types.mojom;l=23" + }, + "storage.mojom.IdbBucketMetadata": { + "definition": "struct IdbBucketMetadata { BucketLocator bucket_locator; string name; uint64 size; mojo_base.mojom.Time last_modified; array paths; uint64 connection_count; array databases; array clients; uint64 delta_recording_start_ms;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_internals_types.mojom;l=30" + }, + "storage.mojom.IdbDatabaseMetadata": { + "definition": "struct IdbDatabaseMetadata { mojo_base.mojom.String16 name; uint64 connection_count; uint64 active_open_delete; uint64 pending_open_delete; array transactions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_internals_types.mojom;l=45" + }, + "storage.mojom.IdbTransactionMetadataStateHistory": { + "definition": "struct IdbTransactionMetadataStateHistory { IdbTransactionState state; double duration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_internals_types.mojom;l=70" + }, + "storage.mojom.IdbTransactionMode": { + "definition": "enum IdbTransactionMode { kReadOnly = 0, kReadWrite = 1, kVersionChange = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_internals_types.mojom;l=77" + }, + "storage.mojom.IdbTransactionState": { + "definition": "enum IdbTransactionState { kBlocked = 0, kRunning = 1, kStarted = 2, kCommitting = 3, kFinished = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/privileged/mojom/indexed_db_internals_types.mojom;l=84" + }, + "storage.mojom.BlobDataItemReader.Read": { + "definition": "Read(uint64 offset, uint64 length, handle pipe) => (int32 success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=16" + }, + "storage.mojom.BlobDataItemReader.ReadSideData": { + "definition": "ReadSideData() => (int32 success, mojo_base.mojom.BigBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=20" + }, + "storage.mojom.BlobStorageContext.RegisterFromDataItem": { + "definition": "RegisterFromDataItem(pending_receiver blob, string uuid, BlobDataItem item);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=69" + }, + "storage.mojom.BlobStorageContext.RegisterFromMemory": { + "definition": "RegisterFromMemory(pending_receiver blob, string uuid, mojo_base.mojom.BigBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=73" + }, + "storage.mojom.BlobStorageContext.WriteBlobToFile": { + "definition": "WriteBlobToFile(pending_remote blob, mojo_base.mojom.FilePath path, bool flush_on_write, mojo_base.mojom.Time? last_modified) => (WriteBlobToFileResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=83" + }, + "storage.mojom.BlobStorageContext.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=90" + }, + "storage.mojom.BlobDataItem": { + "definition": "struct BlobDataItem { BlobDataItemType type; uint64 size; uint64 side_data_size; string content_type; pending_remote reader;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=31" + }, + "storage.mojom.BlobDataItemType": { + "definition": "enum BlobDataItemType { kUnknown, kCacheStorage, kIndexedDB, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=24" + }, + "storage.mojom.WriteBlobToFileResult": { + "definition": "enum WriteBlobToFileResult { kError, kBadPath, kInvalidBlob, kIOError, kTimestampError, kSuccess,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/blob_storage_context.mojom;l=50" + }, + "storage.mojom.BucketId": { + "definition": "struct BucketId { int64 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/buckets/bucket_id.mojom;l=12" + }, + "storage.mojom.BucketInfo": { + "definition": "struct BucketInfo { int64 id; blink.mojom.StorageKey storage_key; string name; mojo_base.mojom.Time expiration; uint64 quota; bool persistent; blink.mojom.BucketDurability durability;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/buckets/bucket_info.mojom;l=16" + }, + "storage.mojom.BucketLocator": { + "definition": "struct BucketLocator { BucketId? id; blink.mojom.StorageKey storage_key; bool is_default;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/buckets/bucket_locator.mojom;l=18" + }, + "storage.mojom.CacheStorageObserver.OnCacheListChanged": { + "definition": "OnCacheListChanged(BucketLocator bucket_locator);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/cache_storage_control.mojom;l=27" + }, + "storage.mojom.CacheStorageObserver.OnCacheContentChanged": { + "definition": "OnCacheContentChanged(BucketLocator bucket_locator, string cache_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/cache_storage_control.mojom;l=30" + }, + "storage.mojom.CacheStorageControl.AddReceiver": { + "definition": "AddReceiver( network.mojom.CrossOriginEmbedderPolicy cross_origin_embedder_policy, pending_remote? coep_reporter, network.mojom.DocumentIsolationPolicy document_isolation_policy, pending_remote? dip_reporter, BucketLocator bucket_locator, CacheStorageOwner owner, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/cache_storage_control.mojom;l=44" + }, + "storage.mojom.CacheStorageControl.AddObserver": { + "definition": "AddObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/cache_storage_control.mojom;l=56" + }, + "storage.mojom.CacheStorageControl.ApplyPolicyUpdates": { + "definition": "ApplyPolicyUpdates(array policy_updates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/cache_storage_control.mojom;l=60" + }, + "storage.mojom.CacheStorageOwner": { + "definition": "enum CacheStorageOwner { kCacheAPI, kBackgroundFetch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/cache_storage_control.mojom;l=15" + }, + "storage.mojom.FileSystemAccessContext.SerializeHandle": { + "definition": "SerializeHandle( pending_remote token) => (array bits);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/file_system_access_context.mojom;l=23" + }, + "storage.mojom.FileSystemAccessContext.DeserializeHandle": { + "definition": "DeserializeHandle( blink.mojom.StorageKey storage_key, array bits, pending_receiver token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/file_system_access_context.mojom;l=32" + }, + "storage.mojom.FileSystemAccessContext.Clone": { + "definition": "Clone(pending_receiver receiever);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/file_system_access_context.mojom;l=38" + }, + "storage.mojom.FileLock.Release": { + "definition": "[Sync] Release() => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=91" + }, + "storage.mojom.Directory.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=103" + }, + "storage.mojom.Directory.PathExists": { + "definition": "[Sync] PathExists(StrictRelativePath path) => (bool exists);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=106" + }, + "storage.mojom.Directory.GetEntries": { + "definition": "[Sync] GetEntries(StrictRelativePath path, GetEntriesMode mode) => (mojo_base.mojom.FileError error, array entries);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=111" + }, + "storage.mojom.Directory.OpenFile": { + "definition": "[Sync] OpenFile(StrictRelativePath path, FileOpenMode mode, FileReadAccess read_access, FileWriteAccess write_access) => (mojo_base.mojom.FileError error, mojo_base.mojom.File? file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=117" + }, + "storage.mojom.Directory.CreateDirectory": { + "definition": "[Sync] CreateDirectory(StrictRelativePath path) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=125" + }, + "storage.mojom.Directory.DeleteFile": { + "definition": "[Sync] DeleteFile(StrictRelativePath path) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=131" + }, + "storage.mojom.Directory.GetFileInfo": { + "definition": "[Sync] GetFileInfo(StrictRelativePath path) => (mojo_base.mojom.FileInfo? info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=136" + }, + "storage.mojom.Directory.GetPathAccess": { + "definition": "[Sync] GetPathAccess(StrictRelativePath path) => (PathAccessInfo? info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=141" + }, + "storage.mojom.Directory.RenameFile": { + "definition": "[Sync] RenameFile(StrictRelativePath old_path, StrictRelativePath new_path) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=146" + }, + "storage.mojom.Directory.LockFile": { + "definition": "[Sync] LockFile(StrictRelativePath path) => (mojo_base.mojom.FileError error, pending_remote? lock);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=155" + }, + "storage.mojom.StrictRelativePath": { + "definition": "struct StrictRelativePath { mojo_base.mojom.FilePath path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=26" + }, + "storage.mojom.PathAccessInfo": { + "definition": "struct PathAccessInfo { bool can_read; bool can_write;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=75" + }, + "storage.mojom.GetEntriesMode": { + "definition": "enum GetEntriesMode { kFilesOnly, kFilesAndDirectories,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=14" + }, + "storage.mojom.FileOpenMode": { + "definition": "enum FileOpenMode { kOpenIfExists, kCreateAndOpenOnlyIfNotExists, kAlwaysOpen, kAlwaysCreate, kOpenIfExistsAndTruncate,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=33" + }, + "storage.mojom.FileReadAccess": { + "definition": "enum FileReadAccess { kReadNotAllowed, kReadAllowed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=52" + }, + "storage.mojom.FileWriteAccess": { + "definition": "enum FileWriteAccess { kWriteNotAllowed, kWriteAllowed, kAppendOnly,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/filesystem/directory.mojom;l=62" + }, + "storage.mojom.LocalStorageControl.BindStorageArea": { + "definition": "BindStorageArea(blink.mojom.StorageKey storage_key, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/local_storage_control.mojom;l=20" + }, + "storage.mojom.LocalStorageControl.GetUsage": { + "definition": "GetUsage() => (array info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/local_storage_control.mojom;l=24" + }, + "storage.mojom.LocalStorageControl.DeleteStorage": { + "definition": "DeleteStorage(blink.mojom.StorageKey storage_key) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/local_storage_control.mojom;l=28" + }, + "storage.mojom.LocalStorageControl.CleanUpStorage": { + "definition": "CleanUpStorage() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/local_storage_control.mojom;l=33" + }, + "storage.mojom.LocalStorageControl.Flush": { + "definition": "Flush();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/local_storage_control.mojom;l=36" + }, + "storage.mojom.LocalStorageControl.PurgeMemory": { + "definition": "PurgeMemory();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/local_storage_control.mojom;l=40" + }, + "storage.mojom.LocalStorageControl.ApplyPolicyUpdates": { + "definition": "ApplyPolicyUpdates(array policy_updates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/local_storage_control.mojom;l=44" + }, + "storage.mojom.LocalStorageControl.ForceKeepSessionState": { + "definition": "ForceKeepSessionState();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/local_storage_control.mojom;l=50" + }, + "storage.mojom.QuotaClient.GetBucketUsage": { + "definition": "GetBucketUsage(BucketLocator bucket) => (int64 usage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/quota_client.mojom;l=26" + }, + "storage.mojom.QuotaClient.GetDefaultStorageKeys": { + "definition": "GetDefaultStorageKeys() => (array storage_keys);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/quota_client.mojom;l=42" + }, + "storage.mojom.QuotaClient.DeleteBucketData": { + "definition": "DeleteBucketData(BucketLocator bucket) => (blink.mojom.QuotaStatusCode status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/quota_client.mojom;l=45" + }, + "storage.mojom.QuotaClient.PerformStorageCleanup": { + "definition": "PerformStorageCleanup() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/quota_client.mojom;l=49" + }, + "storage.mojom.ServiceWorkerRegistrationData": { + "definition": "struct ServiceWorkerRegistrationData { int64 registration_id = blink.mojom.kInvalidServiceWorkerRegistrationId; url.mojom.Url scope; blink.mojom.StorageKey key; url.mojom.Url script; blink.mojom.ScriptType script_type = blink.mojom.ScriptType.kClassic; blink.mojom.ServiceWorkerUpdateViaCache update_via_cache = blink.mojom.ServiceWorkerUpdateViaCache.kImports; int64 version_id = blink.mojom.kInvalidServiceWorkerVersionId; bool is_active = false; blink.mojom.ServiceWorkerFetchHandlerType fetch_handler_type = blink.mojom.ServiceWorkerFetchHandlerType.kNoHandler; mojo_base.mojom.Time last_update_check; mojo_base.mojom.Time script_response_time; map>? origin_trial_tokens; blink.mojom.NavigationPreloadState navigation_preload_state; array used_features; int64 resources_total_size_bytes = 0; blink.mojom.PolicyContainerPolicies? policy_container_policies; blink.mojom.AncestorFrameType ancestor_frame_type; blink.mojom.ServiceWorkerRouterRules? router_rules; bool has_hid_event_handlers; bool has_usb_event_handlers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_database.mojom;l=40" + }, + "storage.mojom.ServiceWorkerResourceRecord": { + "definition": "struct ServiceWorkerResourceRecord { int64 resource_id = blink.mojom.kInvalidServiceWorkerResourceId; url.mojom.Url url; int64 size_bytes = 0; string? sha256_checksum;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_database.mojom;l=94" + }, + "storage.mojom.ServiceWorkerDatabaseStatus": { + "definition": "enum ServiceWorkerDatabaseStatus { kOk = 0, kErrorNotFound = 1, kErrorIOError = 2, kErrorCorrupted = 3, kErrorFailed = 4, kErrorNotSupported = 5, kErrorDisabled = 6, kErrorStorageDisconnected = 7,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_database.mojom;l=23" + }, + "storage.mojom.ServiceWorkerResourceReader.ReadResponseHead": { + "definition": "ReadResponseHead() => (int32 status, network.mojom.URLResponseHead? response_head, mojo_base.mojom.BigBuffer? metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=86" + }, + "storage.mojom.ServiceWorkerResourceReader.PrepareReadData": { + "definition": "PrepareReadData(int64 size) => (handle? pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=94" + }, + "storage.mojom.ServiceWorkerResourceReader.ReadData": { + "definition": "ReadData() => (int32 status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=100" + }, + "storage.mojom.ServiceWorkerResourceWriter.WriteResponseHead": { + "definition": "WriteResponseHead(network.mojom.URLResponseHead response_head) => (int32 status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=110" + }, + "storage.mojom.ServiceWorkerResourceWriter.WriteData": { + "definition": "WriteData(mojo_base.mojom.BigBuffer data) => (int32 status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=114" + }, + "storage.mojom.ServiceWorkerResourceMetadataWriter.WriteMetadata": { + "definition": "WriteMetadata(mojo_base.mojom.BigBuffer data) => (int32 status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=122" + }, + "storage.mojom.ServiceWorkerStorageControl.Disable": { + "definition": "Disable() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=143" + }, + "storage.mojom.ServiceWorkerStorageControl.Delete": { + "definition": "Delete() => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=146" + }, + "storage.mojom.ServiceWorkerStorageControl.Recover": { + "definition": "Recover(array versions) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=152" + }, + "storage.mojom.ServiceWorkerStorageControl.GetRegisteredStorageKeys": { + "definition": "GetRegisteredStorageKeys() => (array keys);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=155" + }, + "storage.mojom.ServiceWorkerStorageControl.FindRegistrationForClientUrl": { + "definition": "FindRegistrationForClientUrl(url.mojom.Url client_url, blink.mojom.StorageKey key) => (ServiceWorkerDatabaseStatus status, ServiceWorkerFindRegistrationResult? result, array? scopes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=168" + }, + "storage.mojom.ServiceWorkerStorageControl.FindRegistrationForScope": { + "definition": "FindRegistrationForScope(url.mojom.Url scope, blink.mojom.StorageKey key) => (ServiceWorkerDatabaseStatus status, ServiceWorkerFindRegistrationResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=174" + }, + "storage.mojom.ServiceWorkerStorageControl.FindRegistrationForId": { + "definition": "FindRegistrationForId(int64 registration_id, blink.mojom.StorageKey? key) => (ServiceWorkerDatabaseStatus status, ServiceWorkerFindRegistrationResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=179" + }, + "storage.mojom.ServiceWorkerStorageControl.GetRegistrationsForStorageKey": { + "definition": "GetRegistrationsForStorageKey(blink.mojom.StorageKey key) => (ServiceWorkerDatabaseStatus status, array registrations);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=184" + }, + "storage.mojom.ServiceWorkerStorageControl.GetUsageForStorageKey": { + "definition": "GetUsageForStorageKey(blink.mojom.StorageKey key) => (ServiceWorkerDatabaseStatus status, int64 usage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=189" + }, + "storage.mojom.ServiceWorkerStorageControl.GetAllRegistrationsDeprecated": { + "definition": "GetAllRegistrationsDeprecated() => (ServiceWorkerDatabaseStatus status, array registrations);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=195" + }, + "storage.mojom.ServiceWorkerStorageControl.GetFakeRegistrationForClientUrl": { + "definition": "GetFakeRegistrationForClientUrl(url.mojom.Url client_url, blink.mojom.StorageKey key) => (ServiceWorkerDatabaseStatus status, ServiceWorkerFindRegistrationResult? result, array? scopes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=220" + }, + "storage.mojom.ServiceWorkerStorageControl.StoreRegistration": { + "definition": "StoreRegistration(ServiceWorkerRegistrationData registration, array resources) => (ServiceWorkerDatabaseStatus status, uint64 deleted_resources_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=230" + }, + "storage.mojom.ServiceWorkerStorageControl.DeleteRegistration": { + "definition": "DeleteRegistration(int64 registration_id, blink.mojom.StorageKey key) => (ServiceWorkerDatabaseStatus status, uint64 deleted_resources_size, ServiceWorkerStorageStorageKeyState storage_key_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=238" + }, + "storage.mojom.ServiceWorkerStorageControl.UpdateToActiveState": { + "definition": "UpdateToActiveState(int64 registration_id, blink.mojom.StorageKey key) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=244" + }, + "storage.mojom.ServiceWorkerStorageControl.UpdateLastUpdateCheckTime": { + "definition": "UpdateLastUpdateCheckTime(int64 registration_id, blink.mojom.StorageKey key, mojo_base.mojom.Time last_update_check_time) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=247" + }, + "storage.mojom.ServiceWorkerStorageControl.UpdateNavigationPreloadEnabled": { + "definition": "UpdateNavigationPreloadEnabled(int64 registration_id, blink.mojom.StorageKey key, bool enable) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=252" + }, + "storage.mojom.ServiceWorkerStorageControl.UpdateNavigationPreloadHeader": { + "definition": "UpdateNavigationPreloadHeader(int64 registration_id, blink.mojom.StorageKey key, string value) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=257" + }, + "storage.mojom.ServiceWorkerStorageControl.UpdateFetchHandlerType": { + "definition": "UpdateFetchHandlerType(int64 registration_id, blink.mojom.StorageKey key, blink.mojom.ServiceWorkerFetchHandlerType type) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=262" + }, + "storage.mojom.ServiceWorkerStorageControl.UpdateResourceSha256Checksums": { + "definition": "UpdateResourceSha256Checksums(int64 registratation_id, blink.mojom.StorageKey key, map updated_sha256_checksums) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=267" + }, + "storage.mojom.ServiceWorkerStorageControl.GetNewRegistrationId": { + "definition": "GetNewRegistrationId() => (int64 registration_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=274" + }, + "storage.mojom.ServiceWorkerStorageControl.GetNewVersionId": { + "definition": "GetNewVersionId() => (int64 version_id, pending_remote? version_reference);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=279" + }, + "storage.mojom.ServiceWorkerStorageControl.GetNewResourceId": { + "definition": "GetNewResourceId() => (int64 resource_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=285" + }, + "storage.mojom.ServiceWorkerStorageControl.CreateResourceReader": { + "definition": "CreateResourceReader(int64 resource_id, pending_receiver reader);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=288" + }, + "storage.mojom.ServiceWorkerStorageControl.CreateResourceWriter": { + "definition": "CreateResourceWriter(int64 resource_id, pending_receiver writer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=291" + }, + "storage.mojom.ServiceWorkerStorageControl.CreateResourceMetadataWriter": { + "definition": "CreateResourceMetadataWriter( int64 resource_id, pending_receiver writer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=294" + }, + "storage.mojom.ServiceWorkerStorageControl.StoreUncommittedResourceId": { + "definition": "StoreUncommittedResourceId(int64 resource_id) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=304" + }, + "storage.mojom.ServiceWorkerStorageControl.DoomUncommittedResources": { + "definition": "DoomUncommittedResources(array resource_ids) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=308" + }, + "storage.mojom.ServiceWorkerStorageControl.GetUserData": { + "definition": "GetUserData(int64 registration_id, array keys) => (ServiceWorkerDatabaseStatus status, array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=314" + }, + "storage.mojom.ServiceWorkerStorageControl.StoreUserData": { + "definition": "StoreUserData(int64 registration_id, blink.mojom.StorageKey key, array user_data) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=318" + }, + "storage.mojom.ServiceWorkerStorageControl.ClearUserData": { + "definition": "ClearUserData(int64 registration_id, array keys) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=323" + }, + "storage.mojom.ServiceWorkerStorageControl.GetUserDataByKeyPrefix": { + "definition": "GetUserDataByKeyPrefix(int64 registration_id, string key_prefix) => (ServiceWorkerDatabaseStatus status, array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=328" + }, + "storage.mojom.ServiceWorkerStorageControl.GetUserKeysAndDataByKeyPrefix": { + "definition": "GetUserKeysAndDataByKeyPrefix(int64 registration_id, string key_prefix) => (ServiceWorkerDatabaseStatus status, map user_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=333" + }, + "storage.mojom.ServiceWorkerStorageControl.ClearUserDataByKeyPrefixes": { + "definition": "ClearUserDataByKeyPrefixes(int64 registratation_id, array key_prefixes) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=338" + }, + "storage.mojom.ServiceWorkerStorageControl.GetUserDataForAllRegistrations": { + "definition": "GetUserDataForAllRegistrations(string key) => (ServiceWorkerDatabaseStatus status, array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=343" + }, + "storage.mojom.ServiceWorkerStorageControl.GetUserDataForAllRegistrationsByKeyPrefix": { + "definition": "GetUserDataForAllRegistrationsByKeyPrefix(string key_prefix) => (ServiceWorkerDatabaseStatus status, array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=348" + }, + "storage.mojom.ServiceWorkerStorageControl.ClearUserDataForAllRegistrationsByKeyPrefix": { + "definition": "ClearUserDataForAllRegistrationsByKeyPrefix(string key_prefix) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=353" + }, + "storage.mojom.ServiceWorkerStorageControl.PerformStorageCleanup": { + "definition": "PerformStorageCleanup() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=357" + }, + "storage.mojom.ServiceWorkerStorageControl.ApplyPolicyUpdates": { + "definition": "ApplyPolicyUpdates(array policy_updates) => (ServiceWorkerDatabaseStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=361" + }, + "storage.mojom.ServiceWorkerStorageControl.GetPurgingResourceIdsForTest": { + "definition": "GetPurgingResourceIdsForTest() => (ServiceWorkerDatabaseStatus status, array resource_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=365" + }, + "storage.mojom.ServiceWorkerStorageControl.GetPurgingResourceIdsForLiveVersionForTest": { + "definition": "GetPurgingResourceIdsForLiveVersionForTest(int64 version_id) => (ServiceWorkerDatabaseStatus status, array resource_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=370" + }, + "storage.mojom.ServiceWorkerStorageControl.GetPurgeableResourceIdsForTest": { + "definition": "GetPurgeableResourceIdsForTest() => (ServiceWorkerDatabaseStatus status, array resource_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=375" + }, + "storage.mojom.ServiceWorkerStorageControl.GetUncommittedResourceIdsForTest": { + "definition": "GetUncommittedResourceIdsForTest() => (ServiceWorkerDatabaseStatus status, array resource_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=378" + }, + "storage.mojom.ServiceWorkerStorageControl.SetPurgingCompleteCallbackForTest": { + "definition": "SetPurgingCompleteCallbackForTest() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=383" + }, + "storage.mojom.ServiceWorkerLiveVersionInfo": { + "definition": "struct ServiceWorkerLiveVersionInfo { int64 id; array purgeable_resources; pending_receiver reference;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=32" + }, + "storage.mojom.ServiceWorkerFindRegistrationResult": { + "definition": "struct ServiceWorkerFindRegistrationResult { pending_remote version_reference; ServiceWorkerRegistrationData registration; array resources;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=47" + }, + "storage.mojom.ServiceWorkerUserData": { + "definition": "struct ServiceWorkerUserData { int64 registration_id; string key; mojo_base.mojom.ByteString value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=129" + }, + "storage.mojom.ServiceWorkerStorageStorageKeyState": { + "definition": "enum ServiceWorkerStorageStorageKeyState { kKeep, kDelete,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/service_worker_storage_control.mojom;l=59" + }, + "storage.mojom.SessionStorageControl.BindNamespace": { + "definition": "BindNamespace(string namespace_id, pending_receiver receiver) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=46" + }, + "storage.mojom.SessionStorageControl.BindStorageArea": { + "definition": "BindStorageArea(blink.mojom.StorageKey storage_key, string namespace_id, pending_receiver receiver) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=57" + }, + "storage.mojom.SessionStorageControl.GetUsage": { + "definition": "GetUsage() => (array info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=63" + }, + "storage.mojom.SessionStorageControl.DeleteStorage": { + "definition": "DeleteStorage(blink.mojom.StorageKey storage_key, string namespace_id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=67" + }, + "storage.mojom.SessionStorageControl.CleanUpStorage": { + "definition": "CleanUpStorage() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=71" + }, + "storage.mojom.SessionStorageControl.ScavengeUnusedNamespaces": { + "definition": "ScavengeUnusedNamespaces() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=75" + }, + "storage.mojom.SessionStorageControl.Flush": { + "definition": "Flush();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=78" + }, + "storage.mojom.SessionStorageControl.PurgeMemory": { + "definition": "PurgeMemory();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=82" + }, + "storage.mojom.SessionStorageControl.CreateNamespace": { + "definition": "CreateNamespace(string namespace_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=86" + }, + "storage.mojom.SessionStorageControl.CloneNamespace": { + "definition": "CloneNamespace(string namespace_id_to_clone, string clone_namespace_id, SessionStorageCloneType clone_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=91" + }, + "storage.mojom.SessionStorageControl.DeleteNamespace": { + "definition": "DeleteNamespace(string namespace_id, bool should_persist);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=99" + }, + "storage.mojom.SessionStorageUsageInfo": { + "definition": "struct SessionStorageUsageInfo { blink.mojom.StorageKey storage_key; string namespace_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=13" + }, + "storage.mojom.SessionStorageCloneType": { + "definition": "enum SessionStorageCloneType { kImmediate, kWaitForCloneOnNamespace,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/session_storage_control.mojom;l=23" + }, + "storage.mojom.StoragePolicyUpdate": { + "definition": "struct StoragePolicyUpdate { url.mojom.Origin origin; bool purge_on_shutdown;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/storage_policy_update.mojom;l=10" + }, + "storage.mojom.StorageService.EnableAggressiveDomStorageFlushing": { + "definition": "EnableAggressiveDomStorageFlushing();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/storage_service.mojom;l=27" + }, + "storage.mojom.StorageService.SetDataDirectory": { + "definition": "[EnableIfNot=is_android] SetDataDirectory( mojo_base.mojom.FilePath path, pending_remote directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/storage_service.mojom;l=40" + }, + "storage.mojom.StorageService.BindSessionStorageControl": { + "definition": "BindSessionStorageControl(mojo_base.mojom.FilePath? path, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/storage_service.mojom;l=51" + }, + "storage.mojom.StorageService.BindLocalStorageControl": { + "definition": "BindLocalStorageControl(mojo_base.mojom.FilePath? path, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/storage_service.mojom;l=61" + }, + "storage.mojom.StorageService.BindTestApi": { + "definition": "BindTestApi(handle test_api_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/storage_service.mojom;l=67" + }, + "storage.mojom.StorageUsageInfo": { + "definition": "struct StorageUsageInfo { blink.mojom.StorageKey storage_key; int64 total_size_bytes; mojo_base.mojom.Time last_modified;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/storage/public/mojom/storage_usage_info.mojom;l=11" + }, + "unzip.mojom.UnzipFilter.ShouldUnzipFile": { + "definition": "[Sync] ShouldUnzipFile(mojo_base.mojom.FilePath path) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/unzip/public/mojom/unzipper.mojom;l=34" + }, + "unzip.mojom.UnzipListener.OnProgress": { + "definition": "OnProgress(uint64 bytes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/unzip/public/mojom/unzipper.mojom;l=42" + }, + "unzip.mojom.Unzipper.Unzip": { + "definition": "Unzip(mojo_base.mojom.ReadOnlyFile zip_file, pending_remote output_dir, UnzipOptions options, pending_remote? filter, pending_remote? listener) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/unzip/public/mojom/unzipper.mojom;l=56" + }, + "unzip.mojom.Unzipper.DetectEncoding": { + "definition": "DetectEncoding(mojo_base.mojom.ReadOnlyFile zip_file) => (int32 encoding);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/unzip/public/mojom/unzipper.mojom;l=66" + }, + "unzip.mojom.Unzipper.GetExtractedInfo": { + "definition": "GetExtractedInfo(mojo_base.mojom.ReadOnlyFile zip_file) => (Info info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/unzip/public/mojom/unzipper.mojom;l=69" + }, + "unzip.mojom.Unzipper.DecodeXz": { + "definition": "DecodeXz(mojo_base.mojom.ReadOnlyFile in_file, mojo_base.mojom.File out_file) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/unzip/public/mojom/unzipper.mojom;l=73" + }, + "unzip.mojom.UnzipOptions": { + "definition": "struct UnzipOptions { string encoding; string password;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/unzip/public/mojom/unzipper.mojom;l=12" + }, + "unzip.mojom.Info": { + "definition": "struct Info { bool size_is_valid; uint64 size; bool is_encrypted; bool uses_aes_encryption;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/services/unzip/public/mojom/unzipper.mojom;l=20" + }, + "site_engagement.mojom.SiteEngagementDetailsProvider.GetSiteEngagementDetails": { + "definition": "GetSiteEngagementDetails() => (array info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/site_engagement/core/mojom/site_engagement_details.mojom;l=20" + }, + "site_engagement.mojom.SiteEngagementDetailsProvider.SetSiteEngagementBaseScoreForUrl": { + "definition": "SetSiteEngagementBaseScoreForUrl(url.mojom.Url url, double score);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/site_engagement/core/mojom/site_engagement_details.mojom;l=21" + }, + "site_engagement.mojom.SiteEngagementDetails": { + "definition": "struct SiteEngagementDetails { url.mojom.Url origin; double total_score; double base_score; double installed_bonus;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/site_engagement/core/mojom/site_engagement_details.mojom;l=9" + }, + "spellcheck.mojom.SpellChecker.Initialize": { + "definition": "Initialize(array dictionaries, array custom_words, bool enable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=17" + }, + "spellcheck.mojom.SpellChecker.CustomDictionaryChanged": { + "definition": "CustomDictionaryChanged( array words_added, array words_removed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=23" + }, + "spellcheck.mojom.SpellCheckInitializationHost.RequestDictionary": { + "definition": "RequestDictionary();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=39" + }, + "spellcheck.mojom.SpellCheckHost.NotifyChecked": { + "definition": "NotifyChecked(mojo_base.mojom.String16 word, bool misspelled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=48" + }, + "spellcheck.mojom.SpellCheckHost.CallSpellingService": { + "definition": "[EnableIf=USE_RENDERER_SPELLCHECKER] CallSpellingService(mojo_base.mojom.String16 text) => (bool success, array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=53" + }, + "spellcheck.mojom.SpellCheckHost.RequestTextCheck": { + "definition": "[EnableIf=USE_BROWSER_SPELLCHECKER] RequestTextCheck(mojo_base.mojom.String16 text) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=59" + }, + "spellcheck.mojom.SpellCheckHost.CheckSpelling": { + "definition": "[EnableIf=USE_BROWSER_SPELLCHECKER_AND_SPELLING_SERVICE, Sync] CheckSpelling(mojo_base.mojom.String16 word) => (bool correct);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=68" + }, + "spellcheck.mojom.SpellCheckHost.FillSuggestionList": { + "definition": "[EnableIf=USE_BROWSER_SPELLCHECKER_AND_SPELLING_SERVICE, Sync] FillSuggestionList(mojo_base.mojom.String16 word) => (array suggestions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=73" + }, + "spellcheck.mojom.SpellCheckHost.InitializeDictionaries": { + "definition": "[EnableIf=is_win] InitializeDictionaries() => (array dictionaries, array custom_words, bool enable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=78" + }, + "spellcheck.mojom.SpellCheckBDictLanguage": { + "definition": "struct SpellCheckBDictLanguage { mojo_base.mojom.ReadOnlyFile? file; string language;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=27" + }, + "spellcheck.mojom.SpellCheckResult": { + "definition": "struct SpellCheckResult { Decoration decoration; int32 location; int32 length; array replacements; bool should_hide_suggestion_menu;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=89" + }, + "spellcheck.mojom.Decoration": { + "definition": "enum Decoration { kSpelling, kGrammar,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck.mojom;l=84" + }, + "spellcheck.mojom.SpellCheckPanel.ToggleSpellPanel": { + "definition": "ToggleSpellPanel(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck_panel.mojom;l=17" + }, + "spellcheck.mojom.SpellCheckPanel.AdvanceToNextMisspelling": { + "definition": "AdvanceToNextMisspelling();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck_panel.mojom;l=22" + }, + "spellcheck.mojom.SpellCheckPanelHost.ShowSpellingPanel": { + "definition": "ShowSpellingPanel(bool show);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck_panel.mojom;l=31" + }, + "spellcheck.mojom.SpellCheckPanelHost.UpdateSpellingPanelWithMisspelledWord": { + "definition": "UpdateSpellingPanelWithMisspelledWord(mojo_base.mojom.String16 word);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/spellcheck/common/spellcheck_panel.mojom;l=34" + }, + "subresource_filter.mojom.SubresourceFilterAgent.ActivateForNextCommittedLoad": { + "definition": "ActivateForNextCommittedLoad(ActivationState activation_state, blink.mojom.FrameAdEvidence? ad_evidence);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/content/mojom/subresource_filter.mojom;l=23" + }, + "subresource_filter.mojom.SubresourceFilterHost.DidDisallowFirstSubresource": { + "definition": "DidDisallowFirstSubresource();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/content/mojom/subresource_filter.mojom;l=33" + }, + "subresource_filter.mojom.SubresourceFilterHost.FrameIsAd": { + "definition": "FrameIsAd();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/content/mojom/subresource_filter.mojom;l=40" + }, + "subresource_filter.mojom.SubresourceFilterHost.FrameWasCreatedByAdScript": { + "definition": "FrameWasCreatedByAdScript();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/content/mojom/subresource_filter.mojom;l=44" + }, + "subresource_filter.mojom.SubresourceFilterHost.AdScriptDidCreateFencedFrame": { + "definition": "AdScriptDidCreateFencedFrame( blink.mojom.RemoteFrameToken fenced_frame_root_placeholder_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/content/mojom/subresource_filter.mojom;l=60" + }, + "subresource_filter.mojom.SubresourceFilterHost.SetDocumentLoadStatistics": { + "definition": "SetDocumentLoadStatistics(DocumentLoadStatistics statistics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/content/mojom/subresource_filter.mojom;l=69" + }, + "subresource_filter.mojom.SubresourceFilterHost.OnAdsViolationTriggered": { + "definition": "OnAdsViolationTriggered(AdsViolation violation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/content/mojom/subresource_filter.mojom;l=73" + }, + "subresource_filter.mojom.SubresourceFilterRulesetObserver.SetRulesetForProcess": { + "definition": "SetRulesetForProcess(mojo_base.mojom.File ruleset_file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/core/mojom/subresource_filter.mojom;l=78" + }, + "subresource_filter.mojom.ActivationState": { + "definition": "struct ActivationState { ActivationLevel activation_level = kDisabled; bool filtering_disabled_for_document = false; bool generic_blocking_rules_disabled = false; bool measure_performance = false; bool enable_logging = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/core/mojom/subresource_filter.mojom;l=27" + }, + "subresource_filter.mojom.DocumentLoadStatistics": { + "definition": "struct DocumentLoadStatistics { int32 num_loads_total = 0; int32 num_loads_evaluated = 0; int32 num_loads_matching_rules = 0; int32 num_loads_disallowed = 0; mojo_base.mojom.TimeDelta evaluation_total_wall_duration; mojo_base.mojom.TimeDelta evaluation_total_cpu_duration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/core/mojom/subresource_filter.mojom;l=56" + }, + "subresource_filter.mojom.ActivationLevel": { + "definition": "enum ActivationLevel { kDisabled, kDryRun, kEnabled};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/core/mojom/subresource_filter.mojom;l=10" + }, + "subresource_filter.mojom.AdsViolation": { + "definition": "enum AdsViolation { kMobileAdDensityByHeightAbove30, kHeavyAdsInterventionAtHostLimit, kLargeStickyAd, kOverlayPopupAd,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/subresource_filter/core/mojom/subresource_filter.mojom;l=20" + }, + "syncer.mojom.StringOrdinal": { + "definition": "struct StringOrdinal { array bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/sync/mojom/syncer.mojom;l=12" + }, + "system_media_controls.mojom.SystemMediaControls.SetIsNextEnabled": { + "definition": "SetIsNextEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=24" + }, + "system_media_controls.mojom.SystemMediaControls.SetIsPreviousEnabled": { + "definition": "SetIsPreviousEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=27" + }, + "system_media_controls.mojom.SystemMediaControls.SetIsPlayPauseEnabled": { + "definition": "SetIsPlayPauseEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=30" + }, + "system_media_controls.mojom.SystemMediaControls.SetIsStopEnabled": { + "definition": "SetIsStopEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=33" + }, + "system_media_controls.mojom.SystemMediaControls.SetIsSeekToEnabled": { + "definition": "SetIsSeekToEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=36" + }, + "system_media_controls.mojom.SystemMediaControls.SetPlaybackStatus": { + "definition": "SetPlaybackStatus(PlaybackStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=39" + }, + "system_media_controls.mojom.SystemMediaControls.SetTitle": { + "definition": "SetTitle(mojo_base.mojom.String16 title);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=42" + }, + "system_media_controls.mojom.SystemMediaControls.SetArtist": { + "definition": "SetArtist(mojo_base.mojom.String16 artist);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=45" + }, + "system_media_controls.mojom.SystemMediaControls.SetAlbum": { + "definition": "SetAlbum(mojo_base.mojom.String16 album);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=48" + }, + "system_media_controls.mojom.SystemMediaControls.SetThumbnail": { + "definition": "SetThumbnail(media_session.mojom.MediaImageBitmap thumbnail);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=51" + }, + "system_media_controls.mojom.SystemMediaControls.SetPosition": { + "definition": "SetPosition(media_session.mojom.MediaPosition position);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=54" + }, + "system_media_controls.mojom.SystemMediaControls.ClearMetadata": { + "definition": "ClearMetadata();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=57" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnNext": { + "definition": "OnNext();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=64" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnPrevious": { + "definition": "OnPrevious();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=67" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnPause": { + "definition": "OnPause();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=70" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnPlayPause": { + "definition": "OnPlayPause();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=73" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnStop": { + "definition": "OnStop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=76" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnPlay": { + "definition": "OnPlay();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=79" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnSeekTo": { + "definition": "OnSeekTo(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=82" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnBridgeCreatedForTesting": { + "definition": "OnBridgeCreatedForTesting();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=85" + }, + "system_media_controls.mojom.SystemMediaControlsObserver.OnMetadataClearedForTesting": { + "definition": "OnMetadataClearedForTesting();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=89" + }, + "system_media_controls.mojom.PlaybackStatus": { + "definition": "enum PlaybackStatus { kPlaying, kPaused, kStopped,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/system_media_controls/mac/remote_cocoa/system_media_controls.mojom;l=17" + }, + "tab_groups.mojom.Color": { + "definition": "enum Color { [Default] kGrey, kBlue, kRed, kYellow, kGreen, kPink, kPurple, kCyan, kOrange,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/tab_groups/public/mojom/tab_group_types.mojom;l=10" + }, + "translate.mojom.TranslateAgent.TranslateFrame": { + "definition": "TranslateFrame(string translate_script, string source_lang, string target_lang) => (bool cancelled, string original_lang, string translated_lang, TranslateError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/translate/content/common/translate.mojom;l=98" + }, + "translate.mojom.TranslateAgent.RevertTranslation": { + "definition": "RevertTranslation();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/translate/content/common/translate.mojom;l=105" + }, + "translate.mojom.ContentTranslateDriver.RegisterPage": { + "definition": "RegisterPage(pending_remote translate_agent, LanguageDetectionDetails details, bool translation_critiera_met);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/translate/content/common/translate.mojom;l=114" + }, + "translate.mojom.LanguageDetectionDetails": { + "definition": "struct LanguageDetectionDetails { url.mojom.Url url; string adopted_language; bool has_notranslate; bool has_run_lang_detection; mojo_base.mojom.Time time; string content_language; string model_detected_language; bool is_model_reliable; string html_root_language; mojo_base.mojom.String16 contents; float model_reliability_score; string detection_model_version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/translate/content/common/translate.mojom;l=30" + }, + "translate.mojom.TranslateError": { + "definition": "enum TranslateError { NONE, NETWORK, INITIALIZATION_ERROR, UNKNOWN_LANGUAGE, UNSUPPORTED_LANGUAGE, IDENTICAL_LANGUAGES, TRANSLATION_ERROR, TRANSLATION_TIMEOUT, UNEXPECTED_SCRIPT_ERROR, BAD_ORIGIN, SCRIPT_LOAD_ERROR, TRANSLATE_ERROR_MAX,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/translate/content/common/translate.mojom;l=12" + }, + "url_rewrite.mojom.UrlRequestRulesReceiver.OnRulesUpdated": { + "definition": "OnRulesUpdated(UrlRequestRewriteRules rules);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=14" + }, + "url_rewrite.mojom.UrlRequestRewriteRules": { + "definition": "struct UrlRequestRewriteRules { array rules;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=18" + }, + "url_rewrite.mojom.UrlRequestRule": { + "definition": "struct UrlRequestRule { array? hosts_filter; array? schemes_filter; array actions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=23" + }, + "url_rewrite.mojom.UrlRequestRewriteAddHeaders": { + "definition": "struct UrlRequestRewriteAddHeaders { array headers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=59" + }, + "url_rewrite.mojom.UrlHeader": { + "definition": "struct UrlHeader { string name; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=65" + }, + "url_rewrite.mojom.UrlRequestRewriteRemoveHeader": { + "definition": "struct UrlRequestRewriteRemoveHeader { string? query_pattern; string header_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=73" + }, + "url_rewrite.mojom.UrlRequestRewriteSubstituteQueryPattern": { + "definition": "struct UrlRequestRewriteSubstituteQueryPattern { string pattern; string substitution;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=83" + }, + "url_rewrite.mojom.UrlRequestRewriteReplaceUrl": { + "definition": "struct UrlRequestRewriteReplaceUrl { string url_ends_with; url.mojom.Url new_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=93" + }, + "url_rewrite.mojom.UrlRequestRewriteAppendToQuery": { + "definition": "struct UrlRequestRewriteAppendToQuery { string query;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=104" + }, + "url_rewrite.mojom.UrlRequestAccessPolicy": { + "definition": "enum UrlRequestAccessPolicy { kAllow, kDeny,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=109" + }, + "url_rewrite.mojom.UrlRequestAction": { + "definition": "union UrlRequestAction { UrlRequestRewriteAddHeaders add_headers; UrlRequestRewriteRemoveHeader remove_header; UrlRequestRewriteSubstituteQueryPattern substitute_query_pattern; UrlRequestRewriteReplaceUrl replace_url; UrlRequestRewriteAppendToQuery append_to_query; UrlRequestAccessPolicy policy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/url_rewrite/mojom/url_request_rewrite.mojom;l=36" + }, + "user_data_importer.mojom.ImportedBookmarkEntry": { + "definition": "struct ImportedBookmarkEntry { bool is_folder; url.mojom.Url url; array path; mojo_base.mojom.String16 title; mojo_base.mojom.Time creation_time; mojo_base.mojom.Time? last_visit_time; bool in_toolbar;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/user_data_importer/mojom/bookmark_html_parser.mojom;l=13" + }, + "user_data_importer.mojom.SearchEngineInfo": { + "definition": "struct SearchEngineInfo { mojo_base.mojom.String16 display_name; mojo_base.mojom.String16 keyword; mojo_base.mojom.String16 url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/user_data_importer/mojom/bookmark_html_parser.mojom;l=24" + }, + "user_data_importer.mojom.FaviconUsageData": { + "definition": "struct FaviconUsageData { url.mojom.Url favicon_url; array png_data; array urls;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/user_data_importer/mojom/bookmark_html_parser.mojom;l=31" + }, + "user_data_importer.mojom.ParsedBookmarks": { + "definition": "struct ParsedBookmarks { array bookmarks; array reading_list; array search_engines; array favicons;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/user_data_importer/mojom/bookmark_html_parser.mojom;l=38" + }, + "variations.mojom.VariationsHeaders": { + "definition": "struct VariationsHeaders { map headers_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/variations/variations.mojom;l=19" + }, + "variations.mojom.GoogleWebVisibility": { + "definition": "enum GoogleWebVisibility { ANY = 0, FIRST_PARTY = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/variations/variations.mojom;l=12" + }, + "visitedlink.mojom.VisitedLinkNotificationSink.UpdateVisitedLinks": { + "definition": "UpdateVisitedLinks(mojo_base.mojom.ReadOnlySharedMemoryRegion table_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/visitedlink/common/visitedlink.mojom;l=13" + }, + "visitedlink.mojom.VisitedLinkNotificationSink.AddVisitedLinks": { + "definition": "AddVisitedLinks(array link_hashes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/visitedlink/common/visitedlink.mojom;l=17" + }, + "visitedlink.mojom.VisitedLinkNotificationSink.ResetVisitedLinks": { + "definition": "ResetVisitedLinks(bool invalidate_cached_hashes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/visitedlink/common/visitedlink.mojom;l=24" + }, + "visitedlink.mojom.VisitedLinkNotificationSink.UpdateOriginSalts": { + "definition": "UpdateOriginSalts(map origin_salts);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/visitedlink/common/visitedlink.mojom;l=35" + }, + "viz.mojom.VizDebugOutput.LogFrame": { + "definition": "LogFrame(mojo_base.mojom.Value frameData);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/viz/service/debugger/mojom/viz_debugger.mojom;l=16" + }, + "wallet.mojom.ImageExtractor.ExtractImages": { + "definition": "ExtractImages() => (array images);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/wallet/content/common/mojom/image_extractor.mojom;l=19" + }, + "web_cache.mojom.WebCache.ClearCache": { + "definition": "ClearCache(bool on_navigation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_cache/public/mojom/web_cache.mojom;l=9" + }, + "web_package.mojom.WebBundleParserFactory.GetParserForDataSource": { + "definition": "GetParserForDataSource(pending_receiver receiver, url.mojom.Url? base_url, pending_remote data_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=14" + }, + "web_package.mojom.WebBundleParserFactory.BindFileDataSource": { + "definition": "BindFileDataSource(pending_receiver data_source, mojo_base.mojom.ReadOnlyFile file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=19" + }, + "web_package.mojom.WebBundleParser.ParseIntegrityBlock": { + "definition": "ParseIntegrityBlock() => (BundleIntegrityBlock? Result, BundleIntegrityBlockParseError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=27" + }, + "web_package.mojom.WebBundleParser.ParseMetadata": { + "definition": "ParseMetadata(uint64? offset) => (BundleMetadata? Result, BundleMetadataParseError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=35" + }, + "web_package.mojom.WebBundleParser.ParseResponse": { + "definition": "ParseResponse(uint64 response_offset, uint64 response_length) => (BundleResponse? Result, BundleResponseParseError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=40" + }, + "web_package.mojom.WebBundleParser.Close": { + "definition": "Close() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=47" + }, + "web_package.mojom.BundleDataSource.Read": { + "definition": "Read(uint64 offset, uint64 length) => (array? buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=54" + }, + "web_package.mojom.BundleDataSource.Length": { + "definition": "Length() => (int64 length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=58" + }, + "web_package.mojom.BundleDataSource.IsRandomAccessContext": { + "definition": "IsRandomAccessContext() => (bool is_random_access);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=61" + }, + "web_package.mojom.BundleDataSource.Close": { + "definition": "Close() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=68" + }, + "web_package.mojom.BundleIntegrityBlockParseError": { + "definition": "struct BundleIntegrityBlockParseError { BundleParseErrorType type; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=77" + }, + "web_package.mojom.BundleMetadataParseError": { + "definition": "struct BundleMetadataParseError { BundleParseErrorType type; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=82" + }, + "web_package.mojom.BundleResponseParseError": { + "definition": "struct BundleResponseParseError { BundleParseErrorType type; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=87" + }, + "web_package.mojom.BundleIntegrityBlockAttributes": { + "definition": "struct BundleIntegrityBlockAttributes { string web_bundle_id; array cbor;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=92" + }, + "web_package.mojom.BundleIntegrityBlock": { + "definition": "struct BundleIntegrityBlock { uint64 size; array signature_stack; BundleIntegrityBlockAttributes attributes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=100" + }, + "web_package.mojom.Ed25519PublicKey": { + "definition": "struct Ed25519PublicKey { array bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=110" + }, + "web_package.mojom.Ed25519Signature": { + "definition": "struct Ed25519Signature { array bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=115" + }, + "web_package.mojom.SignatureInfoEd25519": { + "definition": "struct SignatureInfoEd25519 { Ed25519PublicKey public_key; Ed25519Signature signature;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=119" + }, + "web_package.mojom.EcdsaP256PublicKey": { + "definition": "struct EcdsaP256PublicKey { array bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=127" + }, + "web_package.mojom.EcdsaP256SHA256Signature": { + "definition": "struct EcdsaP256SHA256Signature { array bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=132" + }, + "web_package.mojom.SignatureInfoEcdsaP256SHA256": { + "definition": "struct SignatureInfoEcdsaP256SHA256 { EcdsaP256PublicKey public_key; EcdsaP256SHA256Signature signature;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=136" + }, + "web_package.mojom.SignatureInfoUnknown": { + "definition": "struct SignatureInfoUnknown {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=143" + }, + "web_package.mojom.BundleIntegrityBlockSignatureStackEntry": { + "definition": "struct BundleIntegrityBlockSignatureStackEntry { array attributes_cbor; SignatureInfo signature_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=151" + }, + "web_package.mojom.BundleMetadata": { + "definition": "struct BundleMetadata { BundleFormatVersion version; url.mojom.Url? primary_url; map requests;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=158" + }, + "web_package.mojom.BundleResponseLocation": { + "definition": "struct BundleResponseLocation { uint64 offset; uint64 length;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=172" + }, + "web_package.mojom.BundleResponse": { + "definition": "struct BundleResponse { int32 response_code; map response_headers; uint64 payload_offset; uint64 payload_length;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=178" + }, + "web_package.mojom.BundleParseErrorType": { + "definition": "enum BundleParseErrorType { kParserInternalError, kFormatError, kVersionError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=71" + }, + "web_package.mojom.BundleFormatVersion": { + "definition": "enum BundleFormatVersion { kB1, kB2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=166" + }, + "web_package.mojom.SignatureInfo": { + "definition": "union SignatureInfo { SignatureInfoUnknown unknown; SignatureInfoEd25519 ed25519; SignatureInfoEcdsaP256SHA256 ecdsa_p256_sha256;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/web_package/mojom/web_bundle_parser.mojom;l=145" + }, + "webapps.mojom.WebPageIconInfo": { + "definition": "struct WebPageIconInfo { url.mojom.Url url; int32 square_size_px; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webapps/common/web_page_metadata.mojom;l=18" + }, + "webapps.mojom.WebPageMetadata": { + "definition": "struct WebPageMetadata { mojo_base.mojom.String16 application_name; mojo_base.mojom.String16 description; url.mojom.Url application_url; mojo_base.mojom.String16 title; array icons; WebPageMobileCapable mobile_capable = WebPageMobileCapable.UNSPECIFIED;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webapps/common/web_page_metadata.mojom;l=24" + }, + "webapps.mojom.WebPageMobileCapable": { + "definition": "enum WebPageMobileCapable { UNSPECIFIED, ENABLED, ENABLED_APPLE };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webapps/common/web_page_metadata.mojom;l=10" + }, + "webapps.mojom.WebPageMetadataAgent.GetWebPageMetadata": { + "definition": "GetWebPageMetadata() => (WebPageMetadata web_page_metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webapps/common/web_page_metadata_agent.mojom;l=12" + }, + "webapps.mojom.WebAppOriginAssociationParser.ParseWebAppOriginAssociation": { + "definition": "ParseWebAppOriginAssociation(string raw_json, url.mojom.Origin associate_origin) => (WebAppOriginAssociation? association, array errors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webapps/services/web_app_origin_association/public/mojom/web_app_origin_association_parser.mojom;l=44" + }, + "webapps.mojom.WebAppOriginAssociation": { + "definition": "struct WebAppOriginAssociation { array apps;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webapps/services/web_app_origin_association/public/mojom/web_app_origin_association_parser.mojom;l=15" + }, + "webapps.mojom.AssociatedWebApp": { + "definition": "struct AssociatedWebApp { url.mojom.Url web_app_identity; url.mojom.Url scope;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webapps/services/web_app_origin_association/public/mojom/web_app_origin_association_parser.mojom;l=25" + }, + "webapps.mojom.WebAppOriginAssociationError": { + "definition": "struct WebAppOriginAssociationError { string message; int32 line; int32 column;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webapps/services/web_app_origin_association/public/mojom/web_app_origin_association_parser.mojom;l=30" + }, + "chrome_urls.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webui/chrome_urls/mojom/chrome_urls.mojom;l=32" + }, + "chrome_urls.mojom.PageHandler.GetUrls": { + "definition": "GetUrls() => (ChromeUrlsData urls_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webui/chrome_urls/mojom/chrome_urls.mojom;l=39" + }, + "chrome_urls.mojom.PageHandler.SetDebugPagesEnabled": { + "definition": "SetDebugPagesEnabled(bool enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webui/chrome_urls/mojom/chrome_urls.mojom;l=44" + }, + "chrome_urls.mojom.WebuiUrlInfo": { + "definition": "struct WebuiUrlInfo { url.mojom.Url url; bool enabled; bool internal;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webui/chrome_urls/mojom/chrome_urls.mojom;l=9" + }, + "chrome_urls.mojom.ChromeUrlsData": { + "definition": "struct ChromeUrlsData { array webui_urls; array command_urls; bool internal_debugging_uis_enabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:components/webui/chrome_urls/mojom/chrome_urls.mojom;l=18" + }, + "attribution_reporting.mojom.AggregatableResult": { + "definition": "enum AggregatableResult { kSuccess = 0, kInternalError = 1, kNoCapacityForConversionDestination = 2, kNoMatchingImpressions = 3, kExcessiveAttributions = 4, kExcessiveReportingOrigins = 5, kNoHistograms = 6, kInsufficientBudget = 7, kNoMatchingSourceFilterData = 8, kNotRegistered = 9, kProhibitedByBrowserPolicy = 10, kDeduplicated = 11, kReportWindowPassed = 12, kExcessiveReports = 13, kInsufficientNamedBudget = 14,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/aggregatable_result.mojom;l=14" + }, + "attribution_internals.mojom.Observer.OnSourcesChanged": { + "definition": "OnSourcesChanged(array sources);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=198" + }, + "attribution_internals.mojom.Observer.OnReportsChanged": { + "definition": "OnReportsChanged(array reports);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=201" + }, + "attribution_internals.mojom.Observer.OnSourceHandled": { + "definition": "OnSourceHandled(WebUISourceRegistration source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=204" + }, + "attribution_internals.mojom.Observer.OnReportHandled": { + "definition": "OnReportHandled(WebUIReport report);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=208" + }, + "attribution_internals.mojom.Observer.OnDebugReportSent": { + "definition": "OnDebugReportSent(WebUIDebugReport report);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=211" + }, + "attribution_internals.mojom.Observer.OnAggregatableDebugReportSent": { + "definition": "OnAggregatableDebugReportSent(WebUIAggregatableDebugReport report);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=215" + }, + "attribution_internals.mojom.Observer.OnTriggerHandled": { + "definition": "OnTriggerHandled(WebUITrigger trigger);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=218" + }, + "attribution_internals.mojom.Observer.OnOsRegistration": { + "definition": "OnOsRegistration(WebUIOsRegistration registration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=222" + }, + "attribution_internals.mojom.Observer.OnDebugModeChanged": { + "definition": "OnDebugModeChanged(bool debug_mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=226" + }, + "attribution_internals.mojom.Handler.IsAttributionReportingEnabled": { + "definition": "IsAttributionReportingEnabled() => (bool enabled, network.mojom.AttributionSupport attribution_support);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=234" + }, + "attribution_internals.mojom.Handler.SendReport": { + "definition": "SendReport(ReportID id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=239" + }, + "attribution_internals.mojom.Handler.ClearStorage": { + "definition": "ClearStorage() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=243" + }, + "attribution_internals.mojom.Factory.Create": { + "definition": "Create(pending_remote observer, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=249" + }, + "attribution_internals.mojom.ReportID": { + "definition": "struct ReportID { int64 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=21" + }, + "attribution_internals.mojom.WebUIReportEventLevelData": { + "definition": "struct WebUIReportEventLevelData { int64 priority; bool attributed_truthfully;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=26" + }, + "attribution_internals.mojom.AggregatableHistogramContribution": { + "definition": "struct AggregatableHistogramContribution { string key; uint32 value; uint64 filtering_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=32" + }, + "attribution_internals.mojom.WebUIReportAggregatableAttributionData": { + "definition": "struct WebUIReportAggregatableAttributionData { array contributions; string aggregation_coordinator; bool is_null_report;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=40" + }, + "attribution_internals.mojom.Empty": { + "definition": "struct Empty {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=52" + }, + "attribution_internals.mojom.WebUIReport": { + "definition": "struct WebUIReport { ReportID id; url.mojom.Url report_url; double trigger_time; double report_time; string report_body; ReportStatus status; WebUIReportData data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=71" + }, + "attribution_internals.mojom.WebUIDebugReport": { + "definition": "struct WebUIDebugReport { url.mojom.Url url; double time; string body; NetworkStatus status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=83" + }, + "attribution_internals.mojom.WebUIAggregatableDebugReport": { + "definition": "struct WebUIAggregatableDebugReport { url.mojom.Url url; double time; string body; attribution_reporting.mojom.ProcessAggregatableDebugReportResult process_result; SendAggregatableDebugReportResult send_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=95" + }, + "attribution_internals.mojom.WebUISource": { + "definition": "struct WebUISource { int64 id; uint64 source_event_id; url.mojom.Origin source_origin; attribution_reporting.mojom.DestinationSet destinations; url.mojom.Origin reporting_origin; double source_time; double expiry_time; attribution_reporting.mojom.EventReportWindows event_report_windows; array trigger_data; int32 max_event_level_reports; double aggregatable_report_window_time; attribution_reporting.mojom.SourceType source_type; int64 priority; uint64? debug_key; array dedup_keys; attribution_reporting.mojom.FilterData filter_data; map aggregation_keys; int32 remaining_aggregatable_attribution_budget; array aggregatable_dedup_keys; attribution_reporting.mojom.TriggerDataMatching trigger_data_matching; double event_level_epsilon; bool cookie_based_debug_allowed; int32 remaining_aggregatable_debug_budget; string aggregatable_debug_key_piece; string attribution_scopes_data_json; string aggregatable_named_budgets; Attributability attributability;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=108" + }, + "attribution_internals.mojom.WebUIRegistration": { + "definition": "struct WebUIRegistration { double time; url.mojom.Origin context_origin; url.mojom.Origin reporting_origin; string registration_json; uint64? cleared_debug_key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=158" + }, + "attribution_internals.mojom.WebUITrigger": { + "definition": "struct WebUITrigger { WebUIRegistration registration; attribution_reporting.mojom.EventLevelResult event_level_result; attribution_reporting.mojom.AggregatableResult aggregatable_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=168" + }, + "attribution_internals.mojom.WebUISourceRegistration": { + "definition": "struct WebUISourceRegistration { WebUIRegistration registration; attribution_reporting.mojom.SourceType type; attribution_reporting.mojom.StoreSourceResult status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=175" + }, + "attribution_internals.mojom.WebUIOsRegistration": { + "definition": "struct WebUIOsRegistration { double time; url.mojom.Url registration_url; url.mojom.Origin top_level_origin; bool is_debug_key_allowed; bool debug_reporting; attribution_reporting.mojom.RegistrationType type; attribution_reporting.mojom.OsRegistrationResult result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=183" + }, + "attribution_internals.mojom.Attributability": { + "definition": "enum Attributability { kAttributable, kNoisedNever, kNoisedFalsely, kReachedEventLevelAttributionLimit, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=147" + }, + "attribution_internals.mojom.WebUIReportData": { + "definition": "union WebUIReportData { WebUIReportEventLevelData event_level_data; WebUIReportAggregatableAttributionData aggregatable_attribution_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=46" + }, + "attribution_internals.mojom.NetworkStatus": { + "definition": "union NetworkStatus { int32 http_response_code; string network_error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=54" + }, + "attribution_internals.mojom.ReportStatus": { + "definition": "union ReportStatus { Empty pending; string replaced_by_higher_priority_report; Empty prohibited_by_browser_policy; Empty expired; NetworkStatus network_status; Empty failed_to_assemble;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=59" + }, + "attribution_internals.mojom.SendAggregatableDebugReportResult": { + "definition": "union SendAggregatableDebugReportResult { Empty assembly_failed; NetworkStatus network_status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_internals.mojom;l=90" + }, + "attribution_reporting.mojom.ReportType": { + "definition": "enum ReportType { kEventLevel = 0, kAggregatableAttribution = 1, kNullAggregatable = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_reporting.mojom;l=7" + }, + "attribution_reporting.mojom.RegistrationType": { + "definition": "enum RegistrationType { kSource = 0, kTrigger = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_reporting.mojom;l=18" + }, + "attribution_reporting.mojom.OsRegistrationResult": { + "definition": "enum OsRegistrationResult { kPassedToOs = 0, kInvalidRegistrationUrl = 2, kProhibitedByBrowserPolicy = 3, kRejectedByOs = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/attribution_reporting.mojom;l=27" + }, + "attribution_reporting.mojom.EventLevelResult": { + "definition": "enum EventLevelResult { kSuccess = 0, kSuccessDroppedLowerPriority = 1, kInternalError = 2, kNoCapacityForConversionDestination = 3, kNoMatchingImpressions = 4, kDeduplicated = 5, kExcessiveAttributions = 6, kPriorityTooLow = 7, kNeverAttributedSource = 8, kExcessiveReportingOrigins = 9, kNoMatchingSourceFilterData = 10, kProhibitedByBrowserPolicy = 11, kNoMatchingConfigurations = 12, kExcessiveReports = 13, kFalselyAttributedSource = 14, kReportWindowPassed = 15, kNotRegistered = 16, kReportWindowNotStarted = 17, kNoMatchingTriggerData = 18,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/event_level_result.mojom;l=14" + }, + "attribution_reporting.mojom.ProcessAggregatableDebugReportResult": { + "definition": "enum ProcessAggregatableDebugReportResult { kSuccess = 0, kNoDebugData = 1, kInsufficientBudget = 2, kExcessiveReports = 3, kGlobalRateLimitReached = 4, kReportingSiteRateLimitReached = 5, kBothRateLimitsReached = 6, kInternalError = 7,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/process_aggregatable_debug_report_result.mojom;l=14" + }, + "attribution_reporting.mojom.StoreSourceResult": { + "definition": "enum StoreSourceResult { kSuccess = 0, kInternalError = 1, kInsufficientSourceCapacity = 2, kInsufficientUniqueDestinationCapacity = 3, kExcessiveReportingOrigins = 4, kProhibitedByBrowserPolicy = 5, kSuccessNoised = 6, kDestinationReportingLimitReached = 7, kDestinationGlobalLimitReached = 8, kDestinationBothLimitsReached = 9, kReportingOriginsPerSiteLimitReached = 10, kExceedsMaxChannelCapacity = 11, kExceedsMaxTriggerStateCardinality = 13, kDestinationPerDayReportingLimitReached = 14, kExceedsMaxScopesChannelCapacity = 15, kExceedsMaxEventStatesLimit = 16,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/attribution_reporting/store_source_result.mojom;l=13" + }, + "storage.mojom.IdbInternalsHandler.GetAllBucketsAcrossAllStorageKeys": { + "definition": "GetAllBucketsAcrossAllStorageKeys() => (string? error, array partitions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/indexed_db/indexed_db_internals.mojom;l=24" + }, + "storage.mojom.IdbInternalsHandler.DownloadBucketData": { + "definition": "DownloadBucketData(BucketId bucketId) => (string? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/indexed_db/indexed_db_internals.mojom;l=28" + }, + "storage.mojom.IdbInternalsHandler.ForceClose": { + "definition": "ForceClose(BucketId bucketId) => (string? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/indexed_db/indexed_db_internals.mojom;l=31" + }, + "storage.mojom.IdbInternalsHandler.StartMetadataRecording": { + "definition": "StartMetadataRecording(BucketId bucket_id) => (string? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/indexed_db/indexed_db_internals.mojom;l=35" + }, + "storage.mojom.IdbInternalsHandler.StopMetadataRecording": { + "definition": "StopMetadataRecording(BucketId bucket_id) => (string? error, array metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/indexed_db/indexed_db_internals.mojom;l=39" + }, + "storage.mojom.IdbInternalsHandler.InspectClient": { + "definition": "InspectClient(BucketClientInfo client_info) => (string? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/indexed_db/indexed_db_internals.mojom;l=44" + }, + "storage.mojom.IdbPartitionMetadata": { + "definition": "struct IdbPartitionMetadata { mojo_base.mojom.FilePath partition_path; array origin_list;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/indexed_db/indexed_db_internals.mojom;l=13" + }, + "private_aggregation_internals.mojom.Observer.OnRequestStorageModified": { + "definition": "OnRequestStorageModified();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=47" + }, + "private_aggregation_internals.mojom.Observer.OnReportHandled": { + "definition": "OnReportHandled(WebUIAggregatableReport report);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=50" + }, + "private_aggregation_internals.mojom.Handler.GetReports": { + "definition": "GetReports() => (array reports);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=58" + }, + "private_aggregation_internals.mojom.Handler.SendReports": { + "definition": "SendReports(array ids) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=62" + }, + "private_aggregation_internals.mojom.Handler.ClearStorage": { + "definition": "ClearStorage() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=66" + }, + "private_aggregation_internals.mojom.Factory.Create": { + "definition": "Create(pending_remote observer, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=72" + }, + "private_aggregation_internals.mojom.AggregatableReportRequestID": { + "definition": "struct AggregatableReportRequestID { int64 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=10" + }, + "private_aggregation_internals.mojom.AggregatableHistogramContribution": { + "definition": "struct AggregatableHistogramContribution { mojo_base.mojom.Uint128 bucket; int32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=16" + }, + "private_aggregation_internals.mojom.WebUIAggregatableReport": { + "definition": "struct WebUIAggregatableReport { AggregatableReportRequestID? id; double report_time; string api_identifier; string api_version; url.mojom.Url report_url; array contributions; ReportStatus status; string report_body;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=29" + }, + "private_aggregation_internals.mojom.ReportStatus": { + "definition": "enum ReportStatus { kPending, kSent, kFailedToAssemble, kFailedToSend,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/private_aggregation/private_aggregation_internals.mojom;l=21" + }, + "mojom.ProcessInternalsHandler.GetProcessCountInfo": { + "definition": "GetProcessCountInfo() => (ProcessCountInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=105" + }, + "mojom.ProcessInternalsHandler.GetIsolationMode": { + "definition": "GetIsolationMode() => (string mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=108" + }, + "mojom.ProcessInternalsHandler.GetProcessPerSiteMode": { + "definition": "GetProcessPerSiteMode() => (string mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=111" + }, + "mojom.ProcessInternalsHandler.GetUserTriggeredIsolatedOrigins": { + "definition": "GetUserTriggeredIsolatedOrigins() => (array isolated_origins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=117" + }, + "mojom.ProcessInternalsHandler.GetWebTriggeredIsolatedOrigins": { + "definition": "GetWebTriggeredIsolatedOrigins() => (array isolated_origins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=125" + }, + "mojom.ProcessInternalsHandler.GetGloballyIsolatedOrigins": { + "definition": "GetGloballyIsolatedOrigins() => (array isolated_origins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=128" + }, + "mojom.ProcessInternalsHandler.GetAllWebContentsInfo": { + "definition": "GetAllWebContentsInfo() => (array infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=132" + }, + "mojom.ProcessCountInfo": { + "definition": "struct ProcessCountInfo { uint64 renderer_process_limit; uint64 renderer_process_count_total; uint64 live_renderer_processes_count_total; uint64 renderer_process_count_for_limit;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=10" + }, + "mojom.SiteInstanceInfo": { + "definition": "struct SiteInstanceInfo { int32 id; int32 site_instance_group_id; int32 browsing_instance_id; bool locked; url.mojom.Url? site_url; url.mojom.Url? process_lock_url; bool requires_origin_keyed_process; bool is_sandbox_for_iframes; bool is_guest; bool is_pdf; bool are_javascript_optimizers_enabled; string? storage_partition;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=27" + }, + "mojom.FrameInfo": { + "definition": "struct FrameInfo { int32 routing_id; int32 agent_scheduling_group_id; int32 process_id; SiteInstanceInfo site_instance; url.mojom.Url? last_committed_url; array subframes; Type type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=69" + }, + "mojom.WebContentsInfo": { + "definition": "struct WebContentsInfo { string title; FrameInfo root_frame; array bfcached_root_frames; array prerender_root_frames;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=85" + }, + "mojom.IsolatedOriginInfo": { + "definition": "struct IsolatedOriginInfo { string origin; string source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=94" + }, + "mojom.Type": { + "definition": "enum Type { kActive, kBackForwardCache, kPrerender };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/process_internals/process_internals.mojom;l=79" + }, + "traces_internals.mojom.TracesInternalsHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=100" + }, + "traces_internals.mojom.PageHandler.StartTraceSession": { + "definition": "StartTraceSession( mojo_base.mojom.BigBuffer config_pb, bool enable_privacy_filters) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=110" + }, + "traces_internals.mojom.PageHandler.CloneTraceSession": { + "definition": "CloneTraceSession() => (mojo_base.mojom.BigBuffer? trace, mojo_base.mojom.Token? uuid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=117" + }, + "traces_internals.mojom.PageHandler.StopTraceSession": { + "definition": "StopTraceSession() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=122" + }, + "traces_internals.mojom.PageHandler.GetTrackEventCategories": { + "definition": "GetTrackEventCategories() => (array categories);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=125" + }, + "traces_internals.mojom.PageHandler.GetBufferUsage": { + "definition": "GetBufferUsage() => (bool success, float percent_full, bool data_loss);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=129" + }, + "traces_internals.mojom.PageHandler.GetAllTraceReports": { + "definition": "GetAllTraceReports() => (array reports);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=133" + }, + "traces_internals.mojom.PageHandler.DeleteSingleTrace": { + "definition": "DeleteSingleTrace(mojo_base.mojom.Token uuid) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=136" + }, + "traces_internals.mojom.PageHandler.DeleteAllTraces": { + "definition": "DeleteAllTraces() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=139" + }, + "traces_internals.mojom.PageHandler.UserUploadSingleTrace": { + "definition": "UserUploadSingleTrace(mojo_base.mojom.Token uuid) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=142" + }, + "traces_internals.mojom.PageHandler.DownloadTrace": { + "definition": "DownloadTrace(mojo_base.mojom.Token uuid) => (mojo_base.mojom.BigBuffer? trace);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=145" + }, + "traces_internals.mojom.PageHandler.GetAllScenarios": { + "definition": "GetAllScenarios() => (array config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=149" + }, + "traces_internals.mojom.PageHandler.SetEnabledScenarios": { + "definition": "SetEnabledScenarios(array new_config) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=152" + }, + "traces_internals.mojom.PageHandler.SetScenariosConfigFromString": { + "definition": "SetScenariosConfigFromString(string config_string) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=155" + }, + "traces_internals.mojom.PageHandler.SetScenariosConfigFromBuffer": { + "definition": "SetScenariosConfigFromBuffer(mojo_base.mojom.BigBuffer config_pb) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=160" + }, + "traces_internals.mojom.PageHandler.GetPrivacyFilterEnabled": { + "definition": "GetPrivacyFilterEnabled() => (bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=165" + }, + "traces_internals.mojom.PageHandler.SetPrivacyFilterEnabled": { + "definition": "SetPrivacyFilterEnabled(bool enable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=169" + }, + "traces_internals.mojom.PageHandler.GetSystemTracingState": { + "definition": "[EnableIf=is_win] GetSystemTracingState() => (bool service_supported, bool service_registered);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=175" + }, + "traces_internals.mojom.PageHandler.GetSecurityShieldIconUrl": { + "definition": "[EnableIf=is_win] GetSecurityShieldIconUrl() => (url.mojom.Url shield_icon_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=182" + }, + "traces_internals.mojom.PageHandler.EnableSystemTracing": { + "definition": "[EnableIf=is_win] EnableSystemTracing() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=186" + }, + "traces_internals.mojom.PageHandler.DisableSystemTracing": { + "definition": "[EnableIf=is_win] DisableSystemTracing() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=190" + }, + "traces_internals.mojom.Page.OnTraceComplete": { + "definition": "OnTraceComplete( mojo_base.mojom.BigBuffer? trace, mojo_base.mojom.Token? uuid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=199" + }, + "traces_internals.mojom.ClientTraceReport": { + "definition": "struct ClientTraceReport { mojo_base.mojom.Token uuid; mojo_base.mojom.Time creation_time; string scenario_name; string upload_rule_name; int32? upload_rule_value; int64 total_size; ReportUploadState upload_state; mojo_base.mojom.Time upload_time; SkipUploadReason skip_reason; bool has_trace_content;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=34" + }, + "traces_internals.mojom.Scenario": { + "definition": "struct Scenario { string scenario_name; string description; bool is_local_scenario; bool is_enabled; TracingScenarioState current_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=82" + }, + "traces_internals.mojom.TraceCategory": { + "definition": "struct TraceCategory { string name; bool is_group; string description; array tags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=90" + }, + "traces_internals.mojom.ReportUploadState": { + "definition": "enum ReportUploadState { kNotUploaded = 0, kPending = 1, kPending_UserRequested = 2, kUploaded = 3};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=15" + }, + "traces_internals.mojom.SkipUploadReason": { + "definition": "enum SkipUploadReason { kNoSkip = 0, kSizeLimitExceeded = 1, kNotAnonymized = 2, kScenarioQuotaExceeded = 3, kUploadTimedOut = 4, kLocalScenario = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=24" + }, + "traces_internals.mojom.TracingScenarioState": { + "definition": "enum TracingScenarioState { kDisabled = 0, kEnabled = 1, kSetup = 2, kStarting = 3, kRecording = 4, kStopping = 5, kFinalizing = 6, kCloning = 7,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/tracing/traces_internals/traces_internals.mojom;l=71" + }, + "webxr.mojom.WebXrInternalsHandler.GetDeviceInfo": { + "definition": "GetDeviceInfo() => (DeviceInfo device_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=67" + }, + "webxr.mojom.WebXrInternalsHandler.GetActiveRuntimes": { + "definition": "GetActiveRuntimes() => (array active_runtimes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=71" + }, + "webxr.mojom.WebXrInternalsHandler.SubscribeToEvents": { + "definition": "SubscribeToEvents(pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=74" + }, + "webxr.mojom.XRInternalsSessionListener.LogXrSessionRequested": { + "definition": "LogXrSessionRequested(SessionRequestedRecord session_requested_record);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=81" + }, + "webxr.mojom.XRInternalsSessionListener.LogXrSessionRejected": { + "definition": "LogXrSessionRejected(SessionRejectedRecord session_rejected_record);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=84" + }, + "webxr.mojom.XRInternalsSessionListener.LogXrSessionStarted": { + "definition": "LogXrSessionStarted(SessionStartedRecord session_started_record);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=87" + }, + "webxr.mojom.XRInternalsSessionListener.LogXrSessionStopped": { + "definition": "LogXrSessionStopped(SessionStoppedRecord session_stopped_record);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=90" + }, + "webxr.mojom.XRInternalsSessionListener.LogXrRuntimeAdded": { + "definition": "LogXrRuntimeAdded(RuntimeInfo runtime_added_record);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=94" + }, + "webxr.mojom.XRInternalsSessionListener.LogXrRuntimeRemoved": { + "definition": "LogXrRuntimeRemoved(device.mojom.XRDeviceId device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=99" + }, + "webxr.mojom.XRInternalsSessionListener.LogFrameData": { + "definition": "LogFrameData(device.mojom.XrFrameStatistics xrframe_statistics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=103" + }, + "webxr.mojom.XRInternalsSessionListener.LogConsoleMessages": { + "definition": "LogConsoleMessages(device.mojom.XrLogMessage xrlogging_statistics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=107" + }, + "webxr.mojom.DeviceInfo": { + "definition": "struct DeviceInfo { string operating_system_name; string operating_system_version; string gpu_gl_vendor; string gpu_gl_renderer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=12" + }, + "webxr.mojom.SessionRequestedRecord": { + "definition": "struct SessionRequestedRecord { device.mojom.XRSessionOptions options; mojo_base.mojom.Time requested_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=20" + }, + "webxr.mojom.SessionRejectedRecord": { + "definition": "struct SessionRejectedRecord { uint64 trace_id; device.mojom.RequestSessionError failure_reason; mojo_base.mojom.Time rejected_time; string failure_reason_description; array rejected_features;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=26" + }, + "webxr.mojom.SessionStartedRecord": { + "definition": "struct SessionStartedRecord { uint64 trace_id; device.mojom.XRDeviceId device_id; mojo_base.mojom.Time started_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=36" + }, + "webxr.mojom.SessionStoppedRecord": { + "definition": "struct SessionStoppedRecord { uint64 trace_id; mojo_base.mojom.Time stopped_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=44" + }, + "webxr.mojom.RuntimeInfo": { + "definition": "struct RuntimeInfo { device.mojom.XRDeviceId device_id; array supported_features; bool is_ar_blend_mode_supported;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/browser/xr/webxr_internals/mojom/webxr_internals.mojom;l=54" + }, + "content.mojom.AgentSchedulingGroupHost.DidUnloadRenderFrame": { + "definition": "DidUnloadRenderFrame(blink.mojom.LocalFrameToken frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/agent_scheduling_group.mojom;l=31" + }, + "content.mojom.AgentSchedulingGroup.BindAssociatedInterfaces": { + "definition": "BindAssociatedInterfaces( pending_associated_remote remote_host, pending_associated_receiver route_provider_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/agent_scheduling_group.mojom;l=63" + }, + "content.mojom.AgentSchedulingGroup.CreateView": { + "definition": "CreateView(CreateViewParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/agent_scheduling_group.mojom;l=68" + }, + "content.mojom.AgentSchedulingGroup.CreateFrame": { + "definition": "CreateFrame(CreateFrameParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/agent_scheduling_group.mojom;l=71" + }, + "content.mojom.AgentSchedulingGroup.CreateSharedStorageWorkletService": { + "definition": "CreateSharedStorageWorkletService( pending_receiver receiver, blink.mojom.WorkletGlobalScopeCreationParams global_scope_creation_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/agent_scheduling_group.mojom;l=75" + }, + "content.mojom.RouteProvider.GetRoute": { + "definition": "GetRoute(blink.mojom.LocalFrameToken frame_token, pending_associated_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/associated_interfaces.mojom;l=13" + }, + "content.mojom.ChildProcessHost.Ping": { + "definition": "Ping() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=32" + }, + "content.mojom.ChildProcessHost.BindHostReceiver": { + "definition": "BindHostReceiver(mojo_base.mojom.GenericPendingReceiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=37" + }, + "content.mojom.ChildProcess.ProcessShutdown": { + "definition": "ProcessShutdown();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=44" + }, + "content.mojom.ChildProcess.GetTaskPort": { + "definition": "[EnableIf=is_apple] GetTaskPort() => (handle task_port);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=47" + }, + "content.mojom.ChildProcess.GetBackgroundTracingAgentProvider": { + "definition": "GetBackgroundTracingAgentProvider( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=55" + }, + "content.mojom.ChildProcess.CrashHungProcess": { + "definition": "CrashHungProcess();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=72" + }, + "content.mojom.ChildProcess.BindServiceInterface": { + "definition": "BindServiceInterface(mojo_base.mojom.GenericPendingReceiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=79" + }, + "content.mojom.ChildProcess.BindReceiver": { + "definition": "BindReceiver(mojo_base.mojom.GenericPendingReceiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=89" + }, + "content.mojom.ChildProcess.SetPseudonymizationSalt": { + "definition": "SetPseudonymizationSalt(uint32 salt);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=106" + }, + "content.mojom.ChildProcess.SetBatterySaverMode": { + "definition": "SetBatterySaverMode(bool battery_saver_mode_enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=129" + }, + "content.mojom.LoggingSettings": { + "definition": "struct LoggingSettings { uint32 logging_dest; handle log_file_descriptor;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/child_process.mojom;l=17" + }, + "content.mojom.DomAutomationControllerHost.DomOperationResponse": { + "definition": "DomOperationResponse(string json_string);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/dom_automation_controller.mojom;l=18" + }, + "content.mojom.MhtmlFileWriter.SerializeAsMHTML": { + "definition": "SerializeAsMHTML(SerializeAsMHTMLParams params) => (MhtmlSaveStatus status, array digests_of_uris_to_skip);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/download/mhtml_file_writer.mojom;l=90" + }, + "content.mojom.SerializeAsMHTMLParams": { + "definition": "struct SerializeAsMHTMLParams { string mhtml_boundary_marker; bool mhtml_binary_encoding; bool mhtml_popup_overlay_removal; array digests_of_uris_to_skip; mojo_base.mojom.ByteString salt; MhtmlOutputHandle output_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/download/mhtml_file_writer.mojom;l=52" + }, + "content.mojom.MhtmlSaveStatus": { + "definition": "enum MhtmlSaveStatus { kSuccess = 0, kFileClosingError, kFileCreationError, kFileWritingError, kFrameNoLongerExists, kDeprecatedFrameSerializationForbidden, kRenderProcessExited, kStreamingError};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/download/mhtml_file_writer.mojom;l=14" + }, + "content.mojom.MhtmlOutputHandle": { + "definition": "union MhtmlOutputHandle { mojo_base.mojom.File file_handle; handle producer_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/download/mhtml_file_writer.mojom;l=44" + }, + "content.mojom.FieldTrialRecorder.FieldTrialActivated": { + "definition": "FieldTrialActivated(string trial_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/field_trial_recorder.mojom;l=10" + }, + "content.mojom.FrameHTMLSerializerHandler.DidReceiveData": { + "definition": "DidReceiveData(string data_buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=377" + }, + "content.mojom.FrameHTMLSerializerHandler.Done": { + "definition": "Done();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=381" + }, + "content.mojom.Frame.CommitSameDocumentNavigation": { + "definition": "[SupportsUrgent] CommitSameDocumentNavigation( blink.mojom.CommonNavigationParams common_params, blink.mojom.CommitNavigationParams request_params) => (blink.mojom.CommitResult commit_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=433" + }, + "content.mojom.Frame.UpdateSubresourceLoaderFactories": { + "definition": "UpdateSubresourceLoaderFactories( blink.mojom.URLLoaderFactoryBundle subresource_loader_factories);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=446" + }, + "content.mojom.Frame.SetWantErrorMessageStackTrace": { + "definition": "SetWantErrorMessageStackTrace();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=452" + }, + "content.mojom.Frame.Unload": { + "definition": "Unload( bool is_loading, blink.mojom.FrameReplicationState new_remote_frame_replication_state, blink.mojom.RemoteFrameToken new_remote_frame_token, blink.mojom.RemoteFrameInterfacesFromBrowser new_remote_frame_interfaces, blink.mojom.RemoteMainFrameInterfaces new_remote_main_frame_interfaces, mojo_base.mojom.UnguessableToken? devtools_frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=472" + }, + "content.mojom.Frame.Delete": { + "definition": "Delete(FrameDeleteIntention intention);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=484" + }, + "content.mojom.Frame.UndoCommitNavigation": { + "definition": "UndoCommitNavigation( bool is_loading, blink.mojom.FrameReplicationState new_remote_frame_replication_state, blink.mojom.RemoteFrameToken new_remote_frame_token, blink.mojom.RemoteFrameInterfacesFromBrowser new_remote_frame_interfaces, blink.mojom.RemoteMainFrameInterfaces new_remote_main_frame_interfaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=520" + }, + "content.mojom.Frame.GetInterfaceProvider": { + "definition": "GetInterfaceProvider( pending_receiver interfaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=526" + }, + "content.mojom.Frame.SnapshotAccessibilityTree": { + "definition": "SnapshotAccessibilityTree(SnapshotAccessibilityTreeParams params) => (ax.mojom.AXTreeUpdate snapshot);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=532" + }, + "content.mojom.Frame.GetSerializedHtmlWithLocalLinks": { + "definition": "GetSerializedHtmlWithLocalLinks( map url_map, map frame_token_map, bool save_with_empty_url, pending_remote handler_remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=540" + }, + "content.mojom.FrameBindingsControl.AllowBindings": { + "definition": "AllowBindings(int64 enabled_bindings_flags);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=554" + }, + "content.mojom.FrameBindingsControl.EnableMojoJsBindings": { + "definition": "EnableMojoJsBindings(ExtraMojoJsFeatures? features);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=565" + }, + "content.mojom.FrameBindingsControl.EnableMojoJsBindingsWithBroker": { + "definition": "EnableMojoJsBindingsWithBroker( pending_remote broker);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=569" + }, + "content.mojom.FrameBindingsControl.BindWebUI": { + "definition": "BindWebUI(pending_associated_receiver receiver, pending_associated_remote remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=573" + }, + "content.mojom.NavigationRendererCancellationListener.RendererCancellationWindowEnded": { + "definition": "RendererCancellationWindowEnded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=742" + }, + "content.mojom.FrameHost.CreateNewWindow": { + "definition": "[Sync] CreateNewWindow(CreateNewWindowParams params) => (CreateNewWindowStatus status, CreateNewWindowReply? reply);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=750" + }, + "content.mojom.FrameHost.CreateChildFrame": { + "definition": "CreateChildFrame(blink.mojom.LocalFrameToken child_frame_token, pending_associated_remote frame, pending_receiver browser_interface_broker, blink.mojom.PolicyContainerBindParams policy_container_bind_params, pending_associated_receiver associated_interface_provider, blink.mojom.TreeScopeType scope, string frame_name, string frame_unique_name, bool is_created_by_script, blink.mojom.FramePolicy frame_policy, blink.mojom.FrameOwnerProperties frame_owner_properties, ChildFrameOwnerElementType child_frame_owner_element_type, int64 document_ukm_source_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=758" + }, + "content.mojom.FrameHost.DidCommitProvisionalLoad": { + "definition": "[UnlimitedSize] DidCommitProvisionalLoad( DidCommitProvisionalLoadParams params, DidCommitProvisionalLoadInterfaceParams? interface_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=794" + }, + "content.mojom.FrameHost.DidCommitSameDocumentNavigation": { + "definition": "[UnlimitedSize] DidCommitSameDocumentNavigation( DidCommitProvisionalLoadParams params, DidCommitSameDocumentNavigationParams same_document_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=805" + }, + "content.mojom.FrameHost.DidOpenDocumentInputStream": { + "definition": "DidOpenDocumentInputStream(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=814" + }, + "content.mojom.FrameHost.BeginNavigation": { + "definition": "BeginNavigation( blink.mojom.CommonNavigationParams common_params, blink.mojom.BeginNavigationParams begin_params, pending_remote? blob_url_token, pending_associated_remote? navigation_client, pending_remote? initiator_navigation_state_keep_alive_handle, pending_receiver renderer_cancellation_listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=841" + }, + "content.mojom.FrameHost.SubresourceResponseStarted": { + "definition": "SubresourceResponseStarted( url.mojom.SchemeHostPort final_response_url, uint32 cert_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=860" + }, + "content.mojom.FrameHost.ResourceLoadComplete": { + "definition": "ResourceLoadComplete(blink.mojom.ResourceLoadInfo url_load_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=865" + }, + "content.mojom.FrameHost.DidChangeName": { + "definition": "DidChangeName(string name, string unique_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=868" + }, + "content.mojom.FrameHost.CancelInitialHistoryLoad": { + "definition": "CancelInitialHistoryLoad();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=873" + }, + "content.mojom.FrameHost.UpdateEncoding": { + "definition": "UpdateEncoding(string encoding_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=877" + }, + "content.mojom.FrameHost.UpdateState": { + "definition": "[UnlimitedSize] UpdateState(PageState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=890" + }, + "content.mojom.FrameHost.OpenURL": { + "definition": "OpenURL(blink.mojom.OpenURLParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=894" + }, + "content.mojom.FrameHost.DidStopLoading": { + "definition": "DidStopLoading();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=897" + }, + "content.mojom.CreateViewParams": { + "definition": "struct CreateViewParams { blink.mojom.RendererPreferences renderer_preferences; blink.mojom.WebPreferences web_preferences; string session_storage_namespace_id; blink.mojom.FrameToken? opener_frame_token; blink.mojom.FrameReplicationState replication_state; mojo_base.mojom.UnguessableToken devtools_main_frame_token; CreateMainFrameUnion main_frame; bool hidden; blink.mojom.PrerenderParam? prerender_param; bool never_composited; bool window_was_opened_by_another_window; ViewWidgetType type; blink.mojom.DeprecatedFencedFrameMode fenced_frame_mode; url.mojom.Origin? outermost_origin; pending_associated_receiver blink_page_broadcast; skia.mojom.SkColor? base_background_color; blink.mojom.ColorProviderColorMaps color_provider_colors; mojo_base.mojom.UnguessableToken browsing_context_group_token; network.mojom.AttributionSupport attribution_support; blink.mojom.PartitionedPopinParams? partitioned_popin_params; mojo_base.mojom.UnguessableToken? navigation_metrics_token; int32 history_index = -1; int32 history_length = 0; blink.mojom.NoiseToken? canvas_noise_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=93" + }, + "content.mojom.CreateLocalMainFrameParams": { + "definition": "struct CreateLocalMainFrameParams { blink.mojom.LocalFrameToken frame_token; int32 routing_id = IPC.mojom.kRoutingIdNone; pending_associated_receiver frame; pending_remote interface_broker; pending_associated_remote associated_interface_provider_remote; bool is_on_initial_empty_document = true; blink.mojom.DocumentToken document_token; blink.mojom.PolicyContainer? policy_container; CreateFrameWidgetParams widget_params; blink.mojom.URLLoaderFactoryBundle subresource_loader_factories;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=200" + }, + "content.mojom.CreateProvisionalLocalMainFrameParams": { + "definition": "struct CreateProvisionalLocalMainFrameParams { CreateLocalMainFrameParams local_params; blink.mojom.FrameToken? previous_frame_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=240" + }, + "content.mojom.CreateRemoteMainFrameParams": { + "definition": "struct CreateRemoteMainFrameParams { blink.mojom.RemoteFrameToken token; blink.mojom.RemoteFrameInterfacesFromBrowser frame_interfaces; blink.mojom.RemoteMainFrameInterfaces main_frame_interfaces;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=250" + }, + "content.mojom.CreateFrameWidgetParams": { + "definition": "struct CreateFrameWidgetParams { int32 routing_id; pending_associated_remote frame_widget_host; pending_associated_receiver frame_widget; pending_associated_remote widget_host; pending_associated_receiver widget; blink.mojom.VisualProperties visual_properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=259" + }, + "content.mojom.CreateFrameParams": { + "definition": "struct CreateFrameParams { blink.mojom.LocalFrameToken frame_token; int32 routing_id; blink.mojom.FrameToken? previous_frame_token; blink.mojom.FrameToken? opener_frame_token; blink.mojom.FrameToken? parent_frame_token; blink.mojom.FrameToken? previous_sibling_frame_token; pending_remote interface_broker; blink.mojom.TreeScopeType tree_scope_type; blink.mojom.FrameReplicationState replication_state; mojo_base.mojom.UnguessableToken devtools_frame_token; blink.mojom.FrameOwnerProperties frame_owner_properties; CreateFrameWidgetParams? widget_params; bool is_on_initial_empty_document = true; blink.mojom.DocumentToken document_token; blink.mojom.PolicyContainer? policy_container; pending_associated_receiver frame; pending_associated_remote associated_interface_provider_remote; bool is_for_nested_main_frame; mojo_base.mojom.UnguessableToken? navigation_metrics_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=285" + }, + "content.mojom.SnapshotAccessibilityTreeParams": { + "definition": "struct SnapshotAccessibilityTreeParams { uint32 ax_mode; uint64 max_nodes; mojo_base.mojom.TimeDelta timeout;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=384" + }, + "content.mojom.CreateNewWindowParams": { + "definition": "struct CreateNewWindowParams { bool allow_popup; WindowContainerType window_container_type; string session_storage_namespace_id; string clone_from_session_storage_namespace_id; string frame_name; bool opener_suppressed; bool is_form_submission; bool consumes_user_activation; network.mojom.URLRequestBody? form_submission_post_data; string form_submission_post_content_type; ui.mojom.WindowOpenDisposition disposition; url.mojom.Url target_url; blink.mojom.Referrer referrer; blink.mojom.WindowFeatures features; blink.mojom.Impression? impression; blink.mojom.NavigationDownloadPolicy download_policy; blink.mojom.PictureInPictureWindowOptions? pip_options; blink.mojom.NavigationInitiatorActivationAndAdStatus initiator_activation_and_ad_status; pending_associated_remote frame_remote; pending_associated_remote page_broadcast_remote; pending_receiver main_frame_interface_broker; pending_associated_receiver associated_interface_provider; pending_associated_receiver widget_host; pending_associated_remote widget; pending_associated_receiver frame_widget_host; pending_associated_remote frame_widget;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=577" + }, + "content.mojom.CreateNewWindowReply": { + "definition": "struct CreateNewWindowReply { blink.mojom.LocalFrameToken main_frame_token; int32 main_frame_route_id; int32 widget_routing_id; blink.mojom.VisualProperties visual_properties; string cloned_session_storage_namespace_id; mojo_base.mojom.UnguessableToken devtools_main_frame_token; bool wait_for_debugger; blink.mojom.DocumentToken document_token; blink.mojom.PolicyContainer policy_container; mojo_base.mojom.UnguessableToken browsing_context_group_token; blink.mojom.ColorProviderColorMaps color_provider_colors; blink.mojom.PartitionedPopinParams? partitioned_popin_params; gfx.mojom.Rect? widget_screen_rect; gfx.mojom.Rect? window_screen_rect;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=680" + }, + "content.mojom.ViewWidgetType": { + "definition": "enum ViewWidgetType { kTopLevel, kGuestView, kFencedFrame};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=72" + }, + "content.mojom.ChildFrameOwnerElementType": { + "definition": "enum ChildFrameOwnerElementType { kIframe, kObject, kEmbed, kFrame,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=86" + }, + "content.mojom.FrameDeleteIntention": { + "definition": "enum FrameDeleteIntention { kNotMainFrame, kSpeculativeMainFrameForShutdown, kSpeculativeMainFrameForNavigationCancelled,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=403" + }, + "content.mojom.CreateNewWindowStatus": { + "definition": "enum CreateNewWindowStatus { kBlocked, kIgnore, kReuse, kSuccess,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=664" + }, + "content.mojom.CreateMainFrameUnion": { + "definition": "union CreateMainFrameUnion { CreateLocalMainFrameParams local_params; CreateProvisionalLocalMainFrameParams provisional_local_params; CreateRemoteMainFrameParams remote_params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame.mojom;l=193" + }, + "content.mojom.DidCommitProvisionalLoadInterfaceParams": { + "definition": "struct DidCommitProvisionalLoadInterfaceParams { pending_receiver browser_interface_broker_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/frame_messages.mojom;l=10" + }, + "content.mojom.GinJavaBridge.AddNamedObject": { + "definition": "AddNamedObject(string name, int32 object_id, origin_matcher.mojom.OriginMatcher origin_matcher);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=29" + }, + "content.mojom.GinJavaBridge.RemoveNamedObject": { + "definition": "RemoveNamedObject(string name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=33" + }, + "content.mojom.GinJavaBridge.SetHost": { + "definition": "SetHost(pending_remote host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=36" + }, + "content.mojom.GinJavaBridgeRemoteObject.GetMethods": { + "definition": "[Sync] GetMethods() => (array method_names);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=48" + }, + "content.mojom.GinJavaBridgeRemoteObject.HasMethod": { + "definition": "[Sync] HasMethod(string method_name) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=53" + }, + "content.mojom.GinJavaBridgeRemoteObject.InvokeMethod": { + "definition": "[Sync] InvokeMethod(string method_name, mojo_base.mojom.ListValue arguments) => (GinJavaBridgeError error_code, mojo_base.mojom.ListValue result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=65" + }, + "content.mojom.GinJavaBridgeHost.GetObject": { + "definition": "GetObject(int32 object_id, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=77" + }, + "content.mojom.GinJavaBridgeHost.ObjectWrapperDeleted": { + "definition": "ObjectWrapperDeleted(int32 object_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=90" + }, + "content.mojom.GinJavaBridgeError": { + "definition": "enum GinJavaBridgeError { kGinJavaBridgeNoError, kGinJavaBridgeUnknownObjectId, kGinJavaBridgeObjectIsGone, kGinJavaBridgeMethodNotFound, kGinJavaBridgeAccessToObjectGetClassIsBlocked, kGinJavaBridgeJavaExceptionRaised, kGinJavaBridgeNonAssignableTypes, kGinJavaBridgeRenderFrameDeleted,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/gin_java_bridge.mojom;l=11" + }, + "content.mojom.InputInjector.QueueSyntheticSmoothDrag": { + "definition": "QueueSyntheticSmoothDrag(SyntheticSmoothDrag drag) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=122" + }, + "content.mojom.InputInjector.QueueSyntheticSmoothScroll": { + "definition": "QueueSyntheticSmoothScroll(SyntheticSmoothScroll scroll) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=123" + }, + "content.mojom.InputInjector.QueueSyntheticPinch": { + "definition": "QueueSyntheticPinch(SyntheticPinch pinch) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=124" + }, + "content.mojom.InputInjector.QueueSyntheticTap": { + "definition": "QueueSyntheticTap(SyntheticTap tap) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=125" + }, + "content.mojom.InputInjector.QueueSyntheticPointerAction": { + "definition": "QueueSyntheticPointerAction(SyntheticPointerAction pointer_action) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=126" + }, + "content.mojom.SyntheticSmoothDrag": { + "definition": "struct SyntheticSmoothDrag { GestureSourceType gesture_source_type; gfx.mojom.PointF start_point; array distances; float speed_in_pixels_s; float vsync_offset_ms; InputEventPattern input_event_pattern;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=51" + }, + "content.mojom.SyntheticSmoothScroll": { + "definition": "struct SyntheticSmoothScroll { GestureSourceType gesture_source_type; gfx.mojom.PointF anchor; array distances; bool prevent_fling; float speed_in_pixels_s; float fling_velocity_x; float fling_velocity_y; ui.mojom.ScrollGranularity granularity; int32 modifiers; float vsync_offset_ms; InputEventPattern input_event_pattern;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=62" + }, + "content.mojom.SyntheticPinch": { + "definition": "struct SyntheticPinch { float scale_factor; gfx.mojom.PointF anchor; float relative_pointer_speed_in_pixels_s; float vsync_offset_ms; InputEventPattern input_event_pattern;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=78" + }, + "content.mojom.SyntheticTap": { + "definition": "struct SyntheticTap { GestureSourceType gesture_source_type; gfx.mojom.PointF position; float duration_ms;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=88" + }, + "content.mojom.SyntheticPointerActionParams": { + "definition": "struct SyntheticPointerActionParams { PointerActionType pointer_action_type; gfx.mojom.PointF position; uint32 pointer_id; SyntheticButton button; int32 key_modifiers; float width; float height; float rotation_angle; float force; float tangential_pressure; int32 tilt_x; int32 tilt_y; mojo_base.mojom.TimeTicks timestamp; mojo_base.mojom.TimeDelta duration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=96" + }, + "content.mojom.SyntheticPointerAction": { + "definition": "struct SyntheticPointerAction { GestureSourceType gesture_source_type; array> params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=113" + }, + "content.mojom.GestureSourceType": { + "definition": "enum GestureSourceType { kDefaultInput, kTouchInput, kMouseInput, kTouchpadInput = kMouseInput, kPenInput, kGestureSourceTypeMax = kPenInput,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=14" + }, + "content.mojom.PointerActionType": { + "definition": "enum PointerActionType { kNotInitialized, kPress, kMove, kRelease, kCancel, kLeave, kIdle,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=23" + }, + "content.mojom.SyntheticButton": { + "definition": "enum SyntheticButton { kNoButton, kLeft, kMiddle, kRight, kBack, kForward,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=33" + }, + "content.mojom.InputEventPattern": { + "definition": "enum InputEventPattern { kDefaultPattern, kOnePerVsync, kTwoPerVsync, kEveryOtherVsync,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/input/input_injector.mojom;l=42" + }, + "content.mojom.MediaInternalLogRecords.Log": { + "definition": "Log(array events);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/media/media_log_records.mojom;l=13" + }, + "content.mojom.MemoryConsumerTraitsTest.EchoMemoryConsumerTraits": { + "definition": "[Sync] EchoMemoryConsumerTraits(MemoryConsumerTraits in) => (MemoryConsumerTraits out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/memory_coordinator/mojom/memory_consumer_traits_test.mojom;l=12" + }, + "content.mojom.ChildMemoryConsumer.NotifyReleaseMemory": { + "definition": "NotifyReleaseMemory();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/memory_coordinator/mojom/memory_coordinator.mojom;l=10" + }, + "content.mojom.ChildMemoryConsumer.NotifyUpdateMemoryLimit": { + "definition": "NotifyUpdateMemoryLimit(int32 percentage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/memory_coordinator/mojom/memory_coordinator.mojom;l=13" + }, + "content.mojom.BrowserMemoryConsumerRegistry.RegisterChildMemoryConsumer": { + "definition": "RegisterChildMemoryConsumer( string consumer_id, MemoryConsumerTraits traits, pending_remote child_consumer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/memory_coordinator/mojom/memory_coordinator.mojom;l=36" + }, + "content.mojom.MemoryConsumerTraits": { + "definition": "struct MemoryConsumerTraits { uint8 supports_memory_limit; uint8 in_process; uint8 estimated_memory_usage; uint8 release_memory_cost; uint8 recreate_memory_cost; uint8 information_retention; uint8 memory_release_behavior; uint8 execution_type; uint8 release_gc_references; uint8 garbage_collects_v8_heap;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/memory_coordinator/mojom/memory_coordinator.mojom;l=19" + }, + "content.mojom.ScrollbarButtonsPlacement": { + "definition": "enum ScrollbarButtonsPlacement;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/native_types.mojom;l=13" + }, + "content.mojom.ScrollerStyle": { + "definition": "enum ScrollerStyle;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/native_types.mojom;l=17" + }, + "content.mojom.NetworkConnectionType": { + "definition": "enum NetworkConnectionType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/native_types.mojom;l=22" + }, + "content.mojom.NavigationClient.CommitNavigation": { + "definition": "[SupportsUrgent] CommitNavigation( blink.mojom.CommonNavigationParams common_params, blink.mojom.CommitNavigationParams request_params, network.mojom.URLResponseHead response_head, handle? response_body, network.mojom.URLLoaderClientEndpoints? url_loader_client_endpoints, blink.mojom.URLLoaderFactoryBundle? subresource_loader_factories, array? subresource_overrides, blink.mojom.ControllerServiceWorkerInfo? controller_service_worker_info, blink.mojom.ServiceWorkerContainerInfoForClient? container_info, pending_remote? subresource_proxying_loader_factory, pending_remote? keep_alive_loader_factory, pending_associated_remote? fetch_later_loader_factory, blink.mojom.DocumentToken document_token, mojo_base.mojom.UnguessableToken devtools_navigation_token, mojo_base.mojom.Uuid base_auction_nonce, array? permissions_policy, blink.mojom.PolicyContainer policy_container, pending_remote? code_cache_host, pending_remote? code_cache_host_for_background, CookieManagerInfo? cookie_manager_info, StorageInfo? storage_info) => (DidCommitProvisionalLoadParams params, DidCommitProvisionalLoadInterfaceParams? interface_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=328" + }, + "content.mojom.NavigationClient.CommitFailedNavigation": { + "definition": "[SupportsUrgent] CommitFailedNavigation( blink.mojom.CommonNavigationParams common_params, blink.mojom.CommitNavigationParams request_params, bool has_stale_copy_in_cache, int32 error_code, int32 extended_error_code, network.mojom.ResolveErrorInfo resolve_error_info, string? error_page_content, blink.mojom.URLLoaderFactoryBundle? subresource_loader_factories, blink.mojom.DocumentToken document_token, mojo_base.mojom.UnguessableToken devtools_navigation_token, blink.mojom.PolicyContainer policy_container, AlternativeErrorPageOverrideInfo? alternative_error_page_info) => (DidCommitProvisionalLoadParams params, DidCommitProvisionalLoadInterfaceParams? interface_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=372" + }, + "content.mojom.PageState": { + "definition": "struct PageState;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=44" + }, + "content.mojom.DidCommitProvisionalLoadParams": { + "definition": "struct DidCommitProvisionalLoadParams { int64 item_sequence_number = -1; int64 document_sequence_number = -1; string navigation_api_key; url.mojom.Url url; blink.mojom.Referrer referrer; PageTransition transition; bool should_update_history = false; string contents_mime_type; bool did_create_new_entry; string method; int64 post_id; int32 http_status_code; bool url_is_unreachable; PageState? previous_page_state; PageState page_state; bool is_overriding_user_agent; bool history_list_was_cleared; url.mojom.Origin origin; url.mojom.Url? initiator_base_url; array permissions_policy_header; map document_policy_header; blink.mojom.InsecureRequestPolicy insecure_request_policy; array insecure_navigations_set; bool has_potentially_trustworthy_unique_origin; int32 request_id; mojo_base.mojom.UnguessableToken navigation_token; mojo_base.mojom.UnguessableToken? embedding_token; mojo_base.mojom.TimeTicks? unload_start; mojo_base.mojom.TimeTicks? unload_end; mojo_base.mojom.TimeTicks commit_navigation_start; mojo_base.mojom.TimeTicks? commit_navigation_end; mojo_base.mojom.TimeTicks commit_reply_sent;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=51" + }, + "content.mojom.DidCommitSameDocumentNavigationParams": { + "definition": "struct DidCommitSameDocumentNavigationParams { blink.mojom.SameDocumentNavigationType same_document_navigation_type; bool is_client_redirect = false; bool started_with_transient_activation = false; bool should_replace_current_entry; blink.mojom.SameDocNavigationScreenshotDestinationToken? navigation_entry_screenshot_destination;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=196" + }, + "content.mojom.CookieManagerInfo": { + "definition": "struct CookieManagerInfo { url.mojom.Origin origin; pending_remote cookie_manager;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=221" + }, + "content.mojom.StorageInfo": { + "definition": "struct StorageInfo { pending_remote? local_storage_area; pending_remote? session_storage_area;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=229" + }, + "content.mojom.NavigationGesture": { + "definition": "enum NavigationGesture;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=38" + }, + "content.mojom.PageTransition": { + "definition": "enum PageTransition;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=41" + }, + "content.mojom.NavigationClientDisconnectReason": { + "definition": "enum NavigationClientDisconnectReason { kNoExplicitReason = 0, kResetForSwap, kResetForAbort, kResetForNewNavigation, kResetForDuplicateNavigation,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/navigation_client.mojom;l=237" + }, + "content.mojom.RenderMessageFilter.GenerateSingleFrameRoutingInfo": { + "definition": "[Sync] GenerateSingleFrameRoutingInfo() => (FrameRoutingInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_message_filter.mojom;l=25" + }, + "content.mojom.RenderMessageFilter.GenerateFrameRoutingInfos": { + "definition": "[Sync] GenerateFrameRoutingInfos() => (array info_array);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_message_filter.mojom;l=29" + }, + "content.mojom.FrameRoutingInfo": { + "definition": "struct FrameRoutingInfo { int32 routing_id; blink.mojom.LocalFrameToken frame_token; mojo_base.mojom.UnguessableToken devtools_frame_token; blink.mojom.DocumentToken document_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_message_filter.mojom;l=12" + }, + "remote_cocoa.mojom.PopupMenuRunner.Hide": { + "definition": "Hide();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=26" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.InitAsPopup": { + "definition": "InitAsPopup(gfx.mojom.Rect content_rect, uint64 popup_parent_ns_view_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=48" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetParentWebContentsNSView": { + "definition": "SetParentWebContentsNSView(uint64 parent_ns_view_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=52" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.DisableDisplay": { + "definition": "DisableDisplay();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=56" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.MakeFirstResponder": { + "definition": "MakeFirstResponder();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=59" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetBounds": { + "definition": "SetBounds(gfx.mojom.Rect rect);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=63" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetCALayerParams": { + "definition": "SetCALayerParams(gfx.mojom.CALayerParams ca_layer_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=66" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetBackgroundColor": { + "definition": "SetBackgroundColor(uint32 color);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=69" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetVisible": { + "definition": "SetVisible(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=72" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetTooltipText": { + "definition": "SetTooltipText(mojo_base.mojom.String16 display_text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=75" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetTextInputState": { + "definition": "SetTextInputState(ui.mojom.TextInputType text_input_type, uint32 flags);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=78" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetTextSelection": { + "definition": "SetTextSelection(mojo_base.mojom.String16 text, uint64 offset, gfx.mojom.Range range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=81" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetCompositionRangeInfo": { + "definition": "SetCompositionRangeInfo(gfx.mojom.Range range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=86" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.CancelComposition": { + "definition": "CancelComposition();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=89" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetShowingContextMenu": { + "definition": "SetShowingContextMenu(bool showing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=92" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.DisplayCursor": { + "definition": "DisplayCursor(ui.mojom.Cursor cursor);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=95" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetCursorLocked": { + "definition": "SetCursorLocked(bool locked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=98" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.SetCursorLockedUnacceleratedMovement": { + "definition": "SetCursorLockedUnacceleratedMovement(bool unaccelerated_movement);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=102" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.ShowDictionaryOverlayForSelection": { + "definition": "ShowDictionaryOverlayForSelection();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=106" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.ShowDictionaryOverlay": { + "definition": "ShowDictionaryOverlay(ui.mojom.AttributedString attributed_string, gfx.mojom.Point baseline_point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=110" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.LockKeyboard": { + "definition": "LockKeyboard(array? dom_codes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=114" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.UnlockKeyboard": { + "definition": "UnlockKeyboard();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=117" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.ShowSharingServicePicker": { + "definition": "ShowSharingServicePicker(string title, string text, url.mojom.Url url, array file_paths) => (blink.mojom.ShareError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=121" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.Destroy": { + "definition": "Destroy();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=131" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.GestureScrollEventAck": { + "definition": "GestureScrollEventAck(blink.mojom.Event event, bool consumed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=134" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.DidOverscroll": { + "definition": "DidOverscroll(blink.mojom.DidOverscrollParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=137" + }, + "remote_cocoa.mojom.RenderWidgetHostNSView.DisplayPopupMenu": { + "definition": "DisplayPopupMenu(PopupMenu menu) => (uint32? selected_item);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=142" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.SyncIsWidgetForMainFrame": { + "definition": "[Sync] SyncIsWidgetForMainFrame() => (bool is_for_main_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=156" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.RequestShutdown": { + "definition": "RequestShutdown();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=161" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.OnFirstResponderChanged": { + "definition": "OnFirstResponderChanged(bool is_first_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=164" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.OnWindowIsKeyChanged": { + "definition": "OnWindowIsKeyChanged(bool is_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=167" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.OnBoundsInWindowChanged": { + "definition": "OnBoundsInWindowChanged( gfx.mojom.Rect view_bounds_in_window_dip, bool attached_to_window);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=173" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.OnWindowFrameInScreenChanged": { + "definition": "OnWindowFrameInScreenChanged( gfx.mojom.Rect window_frame_in_screen_dip);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=180" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.OnScreenInfosChanged": { + "definition": "OnScreenInfosChanged(display.mojom.ScreenInfos screen_infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=184" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.BeginKeyboardEvent": { + "definition": "BeginKeyboardEvent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=189" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.EndKeyboardEvent": { + "definition": "EndKeyboardEvent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=190" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.ForwardKeyboardEventWithCommands": { + "definition": "ForwardKeyboardEventWithCommands( blink.mojom.Event event, array native_event_data, bool skip_if_unhandled, array commands);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=194" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.RouteOrProcessMouseEvent": { + "definition": "RouteOrProcessMouseEvent(blink.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=201" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.RouteOrProcessTouchEvent": { + "definition": "RouteOrProcessTouchEvent(blink.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=202" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.RouteOrProcessWheelEvent": { + "definition": "RouteOrProcessWheelEvent(blink.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=203" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.ForwardMouseEvent": { + "definition": "ForwardMouseEvent(blink.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=206" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.ForwardWheelEvent": { + "definition": "ForwardWheelEvent(blink.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=207" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.PinchEvent": { + "definition": "PinchEvent(blink.mojom.Event event, bool is_synthetically_injected);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=210" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.SmartMagnifyEvent": { + "definition": "SmartMagnifyEvent(blink.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=213" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.ImeSetComposition": { + "definition": "ImeSetComposition( mojo_base.mojom.String16 text, array ime_text_spans, gfx.mojom.Range replacement_range, int32 selection_start, int32 selection_end);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=219" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.ImeCommitText": { + "definition": "ImeCommitText(mojo_base.mojom.String16 text, gfx.mojom.Range replacement_range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=225" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.ImeFinishComposingText": { + "definition": "ImeFinishComposingText();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=227" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.ImeCancelCompositionFromCocoa": { + "definition": "ImeCancelCompositionFromCocoa();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=230" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.LookUpDictionaryOverlayAtPoint": { + "definition": "LookUpDictionaryOverlayAtPoint(gfx.mojom.PointF root_point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=234" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.LookUpDictionaryOverlayFromRange": { + "definition": "LookUpDictionaryOverlayFromRange(gfx.mojom.Range range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=238" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.SyncGetCharacterIndexAtPoint": { + "definition": "[Sync] SyncGetCharacterIndexAtPoint( gfx.mojom.PointF root_point) => (uint32 index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=242" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.SyncGetFirstRectForRange": { + "definition": "[Sync] SyncGetFirstRectForRange( gfx.mojom.Range requested_range) => (gfx.mojom.Rect out_rect, gfx.mojom.Range out_actual_range, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=250" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.ExecuteEditCommand": { + "definition": "ExecuteEditCommand(string command);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=259" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.Undo": { + "definition": "Undo();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=260" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.Redo": { + "definition": "Redo();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=261" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.Cut": { + "definition": "Cut();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=262" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.Copy": { + "definition": "Copy();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=263" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.CopyToFindPboard": { + "definition": "CopyToFindPboard();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=264" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.CenterSelection": { + "definition": "CenterSelection();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=265" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.Paste": { + "definition": "Paste();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=266" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.PasteAndMatchStyle": { + "definition": "PasteAndMatchStyle();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=267" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.SelectAll": { + "definition": "SelectAll();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=268" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.StartSpeaking": { + "definition": "StartSpeaking();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=272" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.StopSpeaking": { + "definition": "StopSpeaking();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=275" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.SyncIsSpeaking": { + "definition": "[Sync] SyncIsSpeaking() => (bool is_speaking);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=279" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.GetRenderWidgetAccessibilityToken": { + "definition": "[Sync] GetRenderWidgetAccessibilityToken() => (mojo_base.mojom.ProcessId host_pid, array element_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=284" + }, + "remote_cocoa.mojom.RenderWidgetHostNSViewHost.SetRemoteAccessibilityWindowToken": { + "definition": "SetRemoteAccessibilityWindowToken(array window_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=289" + }, + "remote_cocoa.mojom.PopupMenu": { + "definition": "struct PopupMenu { array items; gfx.mojom.Rect bounds; double item_font_size; bool right_aligned; uint32 selected_item; pending_receiver receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/render_widget_host_ns_view.mojom;l=32" + }, + "content.mojom.Renderer.CreateAgentSchedulingGroup": { + "definition": "CreateAgentSchedulingGroup( pending_receiver bootstrap);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=58" + }, + "content.mojom.Renderer.CreateAssociatedAgentSchedulingGroup": { + "definition": "CreateAssociatedAgentSchedulingGroup( pending_associated_receiver agent_scheduling_group);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=67" + }, + "content.mojom.Renderer.TransferSharedLastForegroundTime": { + "definition": "TransferSharedLastForegroundTime( mojo_base.mojom.ReadOnlySharedMemoryRegion last_foreground_time_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=74" + }, + "content.mojom.Renderer.OnNetworkConnectionChanged": { + "definition": "OnNetworkConnectionChanged(NetworkConnectionType connection_type, double max_bandwidth_mbps);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=79" + }, + "content.mojom.Renderer.OnNetworkQualityChanged": { + "definition": "OnNetworkQualityChanged( network.mojom.EffectiveConnectionType effective_connection_type, mojo_base.mojom.TimeDelta http_rtt, mojo_base.mojom.TimeDelta transport_rtt, double bandwidth_kbps);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=89" + }, + "content.mojom.Renderer.SetWebKitSharedTimersSuspended": { + "definition": "SetWebKitSharedTimersSuspended(bool suspend);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=97" + }, + "content.mojom.Renderer.UpdateScrollbarTheme": { + "definition": "UpdateScrollbarTheme(UpdateScrollbarThemeParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=101" + }, + "content.mojom.Renderer.OnSystemColorsChanged": { + "definition": "OnSystemColorsChanged(int32 aqua_color_variant);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=104" + }, + "content.mojom.Renderer.UpdateSystemColorInfo": { + "definition": "UpdateSystemColorInfo(UpdateSystemColorInfoParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=107" + }, + "content.mojom.Renderer.PurgePluginListCache": { + "definition": "PurgePluginListCache(bool reload_pages);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=111" + }, + "content.mojom.Renderer.PurgeResourceCache": { + "definition": "PurgeResourceCache() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=114" + }, + "content.mojom.Renderer.SetProcessState": { + "definition": "SetProcessState(mojo_base.mojom.ProcessPriority process_priority, RenderProcessVisibleState visible_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=117" + }, + "content.mojom.Renderer.SetIsLockedToSite": { + "definition": "SetIsLockedToSite();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=123" + }, + "content.mojom.Renderer.SetIsCrossOriginIsolated": { + "definition": "SetIsCrossOriginIsolated(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=137" + }, + "content.mojom.Renderer.SetIsWebSecurityDisabled": { + "definition": "SetIsWebSecurityDisabled(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=142" + }, + "content.mojom.Renderer.SetIsIsolatedContext": { + "definition": "SetIsIsolatedContext(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=149" + }, + "content.mojom.Renderer.SetWebUIResourceUrlToCodeCacheMap": { + "definition": "SetWebUIResourceUrlToCodeCacheMap(map resource_map);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=154" + }, + "content.mojom.Renderer.InitializeRenderer": { + "definition": "InitializeRenderer(string user_agent, blink.mojom.UserAgentMetadata metadata, array cors_exempt_header_list, blink.mojom.OriginTrialsSettings? origin_trials_settings, uint64 trace_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=175" + }, + "content.mojom.UpdateScrollbarThemeParams": { + "definition": "struct UpdateScrollbarThemeParams { bool has_initial_button_delay; float initial_button_delay; bool has_autoscroll_button_delay; float autoscroll_button_delay; bool jump_on_track_click; ScrollerStyle preferred_scroller_style; bool redraw; bool scroll_view_rubber_banding;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=20" + }, + "content.mojom.UpdateSystemColorInfoParams": { + "definition": "struct UpdateSystemColorInfoParams { uint32? accent_color;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=35" + }, + "content.mojom.RenderProcessVisibleState": { + "definition": "enum RenderProcessVisibleState { kVisible, kHidden,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer.mojom;l=42" + }, + "content.mojom.RendererHost.GetBrowserHistogram": { + "definition": "[Sync] GetBrowserHistogram(string name) => (string histogram_json);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer_host.mojom;l=15" + }, + "content.mojom.RendererHost.SuddenTerminationAllowedChanged": { + "definition": "SuddenTerminationAllowedChanged(bool allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer_host.mojom;l=20" + }, + "content.mojom.RendererHost.RecordUserMetricsAction": { + "definition": "RecordUserMetricsAction(string action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer_host.mojom;l=23" + }, + "content.mojom.RendererHost.HasGpuProcess": { + "definition": "[Sync] HasGpuProcess() => (bool has_gpu_process);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer_host.mojom;l=44" + }, + "content.mojom.RendererVariationsConfiguration.SetVariationsHeaders": { + "definition": "SetVariationsHeaders(variations.mojom.VariationsHeaders? variations_headers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer_variations_configuration.mojom;l=16" + }, + "content.mojom.RendererVariationsConfiguration.SetFieldTrialGroup": { + "definition": "SetFieldTrialGroup(string trial_name, string group_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/renderer_variations_configuration.mojom;l=22" + }, + "content.mojom.SandboxSupport.LcidAndFirstDayOfWeek": { + "definition": "[Sync, EnableIf=is_win, RuntimeFeature=kWinSboxProxyLocale] LcidAndFirstDayOfWeek(mojo_base.mojom.String16 locale, mojo_base.mojom.String16 default_language, bool defaults) => (uint32 lcid, uint32 first_day_of_week);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/sandbox_support.mojom;l=35" + }, + "content.mojom.SandboxSupport.DigitsAndSigns": { + "definition": "[Sync, EnableIf=is_win, RuntimeFeature=kWinSboxProxyLocale] DigitsAndSigns(uint32 lcid, bool defaults) => (uint32 digit_substitution, mojo_base.mojom.String16 digits, mojo_base.mojom.String16 decimal, mojo_base.mojom.String16 thousand, mojo_base.mojom.String16 negative_sign, uint32 negnumber);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/sandbox_support.mojom;l=45" + }, + "content.mojom.SandboxSupport.LocaleString": { + "definition": "[Sync, EnableIf=is_win, RuntimeFeature=kWinSboxProxyLocale] LocaleString(uint32 lcid, bool defaults, LcTypeString type) => (mojo_base.mojom.String16 str);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/sandbox_support.mojom;l=64" + }, + "content.mojom.SandboxSupport.LocaleStrings": { + "definition": "[Sync, EnableIf=is_win, RuntimeFeature=kWinSboxProxyLocale] LocaleStrings(uint32 lcid, bool defaults, LcTypeStrings collection) => (array strings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/sandbox_support.mojom;l=82" + }, + "content.mojom.LcTypeString": { + "definition": "enum LcTypeString { kShortDate, kYearMonth, kTimeFormat, kShortTime, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/sandbox_support.mojom;l=56" + }, + "content.mojom.LcTypeStrings": { + "definition": "enum LcTypeStrings { kMonths, kShortMonths, kShortWeekDays, kAmPm, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/sandbox_support.mojom;l=70" + }, + "content.mojom.SyntheticTrialConfiguration.AddOrUpdateSyntheticTrialGroups": { + "definition": "AddOrUpdateSyntheticTrialGroups(array groups);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/synthetic_trial_configuration.mojom;l=17" + }, + "content.mojom.SyntheticTrialConfiguration.RemoveSyntheticTrialGroups": { + "definition": "RemoveSyntheticTrialGroups(array groups);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/synthetic_trial_configuration.mojom;l=20" + }, + "content.mojom.SyntheticTrialGroup": { + "definition": "struct SyntheticTrialGroup { string trial_name; string group_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/synthetic_trial_configuration.mojom;l=7" + }, + "content.mojom.ThreadTypeSwitcher.SetThreadType": { + "definition": "SetThreadType(int32 platform_thread_id, mojo_base.mojom.ThreadType thread_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/thread_type_switcher.mojom;l=13" + }, + "remote_cocoa.mojom.WebContentsNSView.SetParentNSView": { + "definition": "SetParentNSView(uint64 parent_ns_view_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=20" + }, + "remote_cocoa.mojom.WebContentsNSView.ResetParentNSView": { + "definition": "ResetParentNSView();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=23" + }, + "remote_cocoa.mojom.WebContentsNSView.SetBounds": { + "definition": "SetBounds(gfx.mojom.Rect bounds_in_window);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=26" + }, + "remote_cocoa.mojom.WebContentsNSView.SetVisible": { + "definition": "SetVisible(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=29" + }, + "remote_cocoa.mojom.WebContentsNSView.MakeFirstResponder": { + "definition": "MakeFirstResponder();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=32" + }, + "remote_cocoa.mojom.WebContentsNSView.TakeFocus": { + "definition": "TakeFocus(bool reverse);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=37" + }, + "remote_cocoa.mojom.WebContentsNSView.StartDrag": { + "definition": "StartDrag(content.mojom.DropData drop_data, url.mojom.Origin source_origin, uint32 operation_mask, gfx.mojom.ImageSkia? image, gfx.mojom.Vector2d image_offset, bool is_privileged);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=46" + }, + "remote_cocoa.mojom.WebContentsNSView.Destroy": { + "definition": "Destroy();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=57" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.OnMouseEvent": { + "definition": "OnMouseEvent(ui.mojom.Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=103" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.OnBecameFirstResponder": { + "definition": "OnBecameFirstResponder(SelectionDirection direction);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=107" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.OnWindowVisibilityChanged": { + "definition": "OnWindowVisibilityChanged(Visibility visibility);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=111" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.SetDropData": { + "definition": "SetDropData(content.mojom.DropData drop_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=115" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.DraggingEntered": { + "definition": "[Sync] DraggingEntered(DraggingInfo dragging_info) => (uint32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=119" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.DraggingExited": { + "definition": "DraggingExited();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=123" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.DraggingUpdated": { + "definition": "[Sync] DraggingUpdated(DraggingInfo dragging_info) => (uint32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=127" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.PerformDragOperation": { + "definition": "[Sync] PerformDragOperation(DraggingInfo dragging_info) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=133" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.DragPromisedFileTo": { + "definition": "[Sync] DragPromisedFileTo(mojo_base.mojom.FilePath file_path, content.mojom.DropData drop_data, url.mojom.Url download_url, url.mojom.Origin source_origin) => (mojo_base.mojom.FilePath file_path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=140" + }, + "remote_cocoa.mojom.WebContentsNSViewHost.EndDrag": { + "definition": "EndDrag(uint32 drag_operation, gfx.mojom.PointF local_point, gfx.mojom.PointF screen_point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=148" + }, + "remote_cocoa.mojom.DraggingInfo": { + "definition": "struct DraggingInfo { gfx.mojom.PointF location_in_view; gfx.mojom.PointF location_in_screen; url.mojom.Url? url; uint32 operation_mask;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=83" + }, + "remote_cocoa.mojom.SelectionDirection": { + "definition": "enum SelectionDirection { kDirect, kForward, kReverse,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=62" + }, + "remote_cocoa.mojom.Visibility": { + "definition": "enum Visibility { kVisible, kOccluded, kHidden,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_contents_ns_view_bridge.mojom;l=72" + }, + "content.mojom.WebUIHost.Send": { + "definition": "[UnlimitedSize] Send(string message, mojo_base.mojom.ListValue args);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_ui.mojom;l=16" + }, + "content.mojom.WebUI.SetProperty": { + "definition": "SetProperty(string property_name, string property_value_json);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/common/web_ui.mojom;l=24" + }, + "content.mojom.AlternativeErrorPageOverrideInfo": { + "definition": "struct AlternativeErrorPageOverrideInfo { uint32 resource_id; mojo_base.mojom.DictionaryValue alternative_error_page_params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/alternative_error_page_override_info.mojom;l=11" + }, + "content.mojom.DropData": { + "definition": "struct DropData;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/drop_data.mojom;l=8" + }, + "content.mojom.ExtraMojoJsFeatures": { + "definition": "struct ExtraMojoJsFeatures { bool file_system_access = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/extra_mojo_js_features.mojom;l=10" + }, + "content.mojom.FontCacheWin.PreCacheFont": { + "definition": "[Sync] PreCacheFont(mojo_base.mojom.LOGFONT log_font) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/font_cache_win.mojom;l=15" + }, + "content.mojom.FontCacheWin.ReleaseCachedFonts": { + "definition": "ReleaseCachedFonts();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/font_cache_win.mojom;l=19" + }, + "content.mojom.RendererType": { + "definition": "enum RendererType { DEFAULT_RENDERER = 0, MOJO_RENDERER = 1, REMOTING_RENDERER = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/media_playback_renderer_type.mojom;l=7" + }, + "content.mojom.ResourceUsageReporter.GetUsageData": { + "definition": "GetUsageData() => (ResourceUsageData data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/resource_usage_reporter.mojom;l=40" + }, + "content.mojom.ResourceTypeStat": { + "definition": "struct ResourceTypeStat { uint64 count = 0; uint64 size = 0; uint64 live_size = 0; uint64 decoded_size = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/resource_usage_reporter.mojom;l=9" + }, + "content.mojom.ResourceTypeStats": { + "definition": "struct ResourceTypeStats { ResourceTypeStat images; ResourceTypeStat css_style_sheets; ResourceTypeStat scripts; ResourceTypeStat xsl_style_sheets; ResourceTypeStat fonts; ResourceTypeStat other;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/resource_usage_reporter.mojom;l=18" + }, + "content.mojom.ResourceUsageData": { + "definition": "struct ResourceUsageData { bool reports_v8_stats = false; uint64 v8_bytes_allocated = 0; uint64 v8_bytes_used = 0; ResourceTypeStats? web_cache_stats;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/resource_usage_reporter.mojom;l=27" + }, + "content.mojom.WebPluginInfo": { + "definition": "struct WebPluginInfo;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/webplugininfo.mojom;l=8" + }, + "content.mojom.WindowContainerType": { + "definition": "enum WindowContainerType { NORMAL = 0, BACKGROUND, PERSISTENT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/common/window_container_type.mojom;l=7" + }, + "content.mojom.TestInterfaceForDefer.Ping": { + "definition": "Ping() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/mojo_capability_control_test_interfaces.mojom;l=12" + }, + "content.mojom.TestService.DoSomething": { + "definition": "DoSomething() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=14" + }, + "content.mojom.TestService.DoTerminateProcess": { + "definition": "DoTerminateProcess() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=18" + }, + "content.mojom.TestService.DoCrashImmediately": { + "definition": "DoCrashImmediately() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=22" + }, + "content.mojom.TestService.CreateFolder": { + "definition": "CreateFolder() => (bool succeeded);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=25" + }, + "content.mojom.TestService.GetRequestorName": { + "definition": "GetRequestorName() => (string name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=28" + }, + "content.mojom.TestService.CreateReadOnlySharedMemoryRegion": { + "definition": "CreateReadOnlySharedMemoryRegion(string message) => (mojo_base.mojom.ReadOnlySharedMemoryRegion? region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=33" + }, + "content.mojom.TestService.CreateWritableSharedMemoryRegion": { + "definition": "CreateWritableSharedMemoryRegion(string message) => (mojo_base.mojom.WritableSharedMemoryRegion? region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=39" + }, + "content.mojom.TestService.CreateUnsafeSharedMemoryRegion": { + "definition": "CreateUnsafeSharedMemoryRegion(string message) => (mojo_base.mojom.UnsafeSharedMemoryRegion? region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=45" + }, + "content.mojom.TestService.CloneSharedMemoryContents": { + "definition": "CloneSharedMemoryContents(mojo_base.mojom.ReadOnlySharedMemoryRegion region) => (mojo_base.mojom.UnsafeSharedMemoryRegion new_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=51" + }, + "content.mojom.TestService.IsProcessSandboxed": { + "definition": "IsProcessSandboxed() => (bool is_sandboxed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=55" + }, + "content.mojom.TestService.PseudonymizeString": { + "definition": "PseudonymizeString(string value) => (uint32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=58" + }, + "content.mojom.TestService.PassWriteableFile": { + "definition": "PassWriteableFile(mojo_base.mojom.File file) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=62" + }, + "content.mojom.TestService.WriteToPreloadedPipe": { + "definition": "WriteToPreloadedPipe();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/public/test/test_service.mojom;l=66" + }, + "auction_worklet.mojom.AuctionNetworkEventsHandler.OnNetworkSendRequest": { + "definition": "OnNetworkSendRequest(network.mojom.URLRequest request, mojo_base.mojom.TimeTicks timestamp);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_network_events_handler.mojom;l=19" + }, + "auction_worklet.mojom.AuctionNetworkEventsHandler.OnNetworkResponseReceived": { + "definition": "OnNetworkResponseReceived( string request_id, string loader_id, url.mojom.Url request_url, network.mojom.URLResponseHead headers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_network_events_handler.mojom;l=22" + }, + "auction_worklet.mojom.AuctionNetworkEventsHandler.OnNetworkRequestComplete": { + "definition": "OnNetworkRequestComplete( string request_id, network.mojom.URLLoaderCompletionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_network_events_handler.mojom;l=28" + }, + "auction_worklet.mojom.AuctionNetworkEventsHandler.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_network_events_handler.mojom;l=32" + }, + "auction_worklet.mojom.AuctionSharedStorageHost.SharedStorageUpdate": { + "definition": "SharedStorageUpdate( network.mojom.SharedStorageModifierMethodWithOptions method_with_options, AuctionWorkletFunction source_auction_worklet_function);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_shared_storage_host.mojom;l=22" + }, + "auction_worklet.mojom.AuctionSharedStorageHost.SharedStorageBatchUpdate": { + "definition": "SharedStorageBatchUpdate( network.mojom.SharedStorageBatchUpdateMethodsArgument methods_with_options, network.mojom.LockName? with_lock, AuctionWorkletFunction source_auction_worklet_function);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_shared_storage_host.mojom;l=30" + }, + "auction_worklet.mojom.AuctionWorkletFunction": { + "definition": "enum AuctionWorkletFunction { kBidderGenerateBid, kBidderReportWin, kSellerScoreAd, kSellerReportResult,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_shared_storage_host.mojom;l=9" + }, + "auction_worklet.mojom.LoadSellerWorkletClient.SellerWorkletLoaded": { + "definition": "SellerWorkletLoaded(bool trusted_signals_url_allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_worklet_service.mojom;l=49" + }, + "auction_worklet.mojom.AuctionWorkletService.SetTrustedSignalsCache": { + "definition": "SetTrustedSignalsCache( pending_remote trusted_signals_cache);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_worklet_service.mojom;l=64" + }, + "auction_worklet.mojom.AuctionWorkletService.LoadBidderWorklet": { + "definition": "LoadBidderWorklet( pending_receiver bidder_worklet, array?> shared_storage_hosts, bool pause_for_debugger_on_start, pending_remote url_loader_factory, pending_remote auction_network_events_handler, InProgressAuctionDownload script_source_load, InProgressAuctionDownload? wasm_helper_load, url.mojom.Url? trusted_bidding_signals_url, string trusted_bidding_signals_slot_size_param, url.mojom.Origin top_window_origin, AuctionWorkletPermissionsPolicyState permissions_policy_state, uint16? experiment_group_id, TrustedSignalsPublicKey? public_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_worklet_service.mojom;l=133" + }, + "auction_worklet.mojom.AuctionWorkletService.LoadSellerWorklet": { + "definition": "LoadSellerWorklet( pending_receiver seller_worklet, array?> shared_storage_hosts, bool pause_for_debugger_on_start, pending_remote url_loader_factory, pending_remote auction_network_events_handler, InProgressAuctionDownload script_source_load, url.mojom.Url? trusted_scoring_signals_url, url.mojom.Origin top_window_origin, AuctionWorkletPermissionsPolicyState permissions_policy_state, uint16? experiment_group_id, bool? send_creative_scanning_metadata, TrustedSignalsPublicKey? public_key, pending_remote? load_seller_worklet_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_worklet_service.mojom;l=211" + }, + "auction_worklet.mojom.BrowserSignals": { + "definition": "struct BrowserSignals { url.mojom.Origin top_frame_origin; url.mojom.Origin seller;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_worklet_service.mojom;l=19" + }, + "auction_worklet.mojom.AuctionWorkletPermissionsPolicyState": { + "definition": "struct AuctionWorkletPermissionsPolicyState { bool private_aggregation_allowed; bool shared_storage_allowed;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_worklet_service.mojom;l=29" + }, + "auction_worklet.mojom.TrustedSignalsPublicKey": { + "definition": "struct TrustedSignalsPublicKey { string key; uint8 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/auction_worklet_service.mojom;l=36" + }, + "auction_worklet.mojom.GenerateBidClient.OnBiddingSignalsReceived": { + "definition": "OnBiddingSignalsReceived( map priority_vector, mojo_base.mojom.TimeDelta trusted_signals_fetch_latency, mojo_base.mojom.TimeDelta? update_if_older_than) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=249" + }, + "auction_worklet.mojom.GenerateBidClient.OnGenerateBidComplete": { + "definition": "OnGenerateBidComplete( array bids, uint32? bidding_signals_data_version, url.mojom.Url? debug_loss_report_url, url.mojom.Url? debug_win_report_url, double? set_priority, map update_priority_signals_overrides, array pa_requests, array non_kanon_pa_requests, array real_time_contributions, BidderTimingMetrics generate_bid_timing_metrics, GenerateBidDependencyLatencies generate_bid_dependency_latencies, RejectReason reject_reason, array errors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=316" + }, + "auction_worklet.mojom.GenerateBidFinalizer.FinishGenerateBid": { + "definition": "FinishGenerateBid( string? auction_signals_json, string? per_buyer_signals_json, mojo_base.mojom.TimeDelta? per_buyer_timeout, blink.mojom.AdCurrency? expected_buyer_currency, url.mojom.Url? direct_from_seller_per_buyer_signals, string? direct_from_seller_per_buyer_signals_header_ad_slot, url.mojom.Url? direct_from_seller_auction_signals, string? direct_from_seller_auction_signals_header_ad_slot);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=369" + }, + "auction_worklet.mojom.BidderWorklet.BeginGenerateBid": { + "definition": "BeginGenerateBid( BidderWorkletNonSharedParams bidder_worklet_non_shared_params, TrustedSignalsCacheKey? key_value_signals_cache_key, KAnonymityBidMode kanon_mode, url.mojom.Origin interest_group_join_origin, url.mojom.Url? direct_from_seller_per_buyer_signals, url.mojom.Url? direct_from_seller_auction_signals, url.mojom.Origin browser_signal_seller_origin, url.mojom.Origin? browser_signal_top_level_seller_origin, mojo_base.mojom.TimeDelta browser_signal_recency, bool browser_signal_for_debugging_only_sampling, blink.mojom.BiddingBrowserSignals bidding_browser_signals, mojo_base.mojom.Time auction_start_time, blink.mojom.AdSize? requested_ad_size, uint16 multi_bid_limit, uint64 group_by_origin_id, uint64 trace_id, pending_associated_remote generate_bid_client, pending_associated_receiver bid_finalizer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=491" + }, + "auction_worklet.mojom.BidderWorklet.SendPendingSignalsRequests": { + "definition": "SendPendingSignalsRequests();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=518" + }, + "auction_worklet.mojom.BidderWorklet.ReportWin": { + "definition": "ReportWin( bool is_for_additional_bid, string? interest_group_name_reporting_id, string? buyer_reporting_id, string? buyer_and_seller_reporting_id, string? selected_buyer_and_seller_reporting_id, string? auction_signals_json, string? per_buyer_signals_json, url.mojom.Url? direct_from_seller_per_buyer_signals, string? direct_from_seller_per_buyer_signals_header_ad_slot, url.mojom.Url? direct_from_seller_auction_signals, string? direct_from_seller_auction_signals_header_ad_slot, string seller_signals_json, KAnonymityStatus kanon_status, url.mojom.Url browser_signal_render_url, double browser_signal_bid, blink.mojom.AdCurrency? browser_signal_bid_currency, double browser_signal_highest_scoring_other_bid, blink.mojom.AdCurrency? browser_signal_highest_scoring_other_bid_currency, bool browser_signal_made_highest_scoring_other_bid, double? browser_signal_ad_cost, uint16? browser_signal_modeling_signals, uint8 browser_signal_join_count, uint8 browser_signal_recency, url.mojom.Origin browser_signal_seller_origin, url.mojom.Origin? browser_signal_top_level_seller_origin, mojo_base.mojom.TimeDelta? browser_signal_reporting_timeout, uint32? bidding_signals_data_version, string? aggregate_win_signals, uint64 trace_id) => ( url.mojom.Url? report_url, map ad_beacon_map, map ad_macro_map, array pa_requests, PrivateModelTrainingRequestData? pmt_request_data, BidderTimingMetrics timing_metrics, array errors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=668" + }, + "auction_worklet.mojom.BidderWorklet.ConnectDevToolsAgent": { + "definition": "ConnectDevToolsAgent( pending_associated_receiver agent, uint32 thread_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=710" + }, + "auction_worklet.mojom.KAnonKey": { + "definition": "struct KAnonKey { string data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=37" + }, + "auction_worklet.mojom.BidderWorkletNonSharedParams": { + "definition": "struct BidderWorkletNonSharedParams { string name; blink.mojom.InterestGroup.TrustedBiddingSignalsSlotSizeMode trusted_bidding_signals_slot_size_mode; bool enable_bidding_signals_prioritization; map? priority_vector; blink.mojom.InterestGroup.ExecutionMode execution_mode; url.mojom.Url? update_url; array? trusted_bidding_signals_keys; int32 max_trusted_bidding_signals_url_length; string? user_bidding_signals; array? ads; array? ad_components; array kanon_keys;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=51" + }, + "auction_worklet.mojom.BidderWorkletBid": { + "definition": "struct BidderWorkletBid { BidRole bid_role; string ad; double bid; blink.mojom.AdCurrency? bid_currency; double? ad_cost; blink.mojom.AdDescriptor ad_descriptor; string? selected_buyer_and_seller_reporting_id; array? ad_component_descriptors; uint16? modeling_signals; string? aggregate_win_signals; mojo_base.mojom.TimeDelta bid_duration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=75" + }, + "auction_worklet.mojom.PrioritySignalsDouble": { + "definition": "struct PrioritySignalsDouble { double value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=139" + }, + "auction_worklet.mojom.GenerateBidDependencyLatencies": { + "definition": "struct GenerateBidDependencyLatencies { mojo_base.mojom.TimeDelta? code_ready_latency; mojo_base.mojom.TimeDelta? config_promises_latency; mojo_base.mojom.TimeDelta? direct_from_seller_signals_latency; mojo_base.mojom.TimeDelta? trusted_bidding_signals_latency; mojo_base.mojom.TimeTicks deps_wait_start_time; mojo_base.mojom.TimeTicks generate_bid_start_time; mojo_base.mojom.TimeTicks generate_bid_finish_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=159" + }, + "auction_worklet.mojom.BidderTimingMetrics": { + "definition": "struct BidderTimingMetrics { mojo_base.mojom.TimeDelta? js_fetch_latency; mojo_base.mojom.TimeDelta? wasm_fetch_latency; mojo_base.mojom.TimeDelta script_latency; bool script_timed_out;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=183" + }, + "auction_worklet.mojom.PrivateModelTrainingRequestData": { + "definition": "struct PrivateModelTrainingRequestData { mojo_base.mojom.BigBuffer payload; uint32 payload_length; url.mojom.Url aggregation_coordinator_origin; url.mojom.Url destination;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=198" + }, + "auction_worklet.mojom.KAnonymityBidMode": { + "definition": "enum KAnonymityBidMode { kNone, kSimulate, kEnforce };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=21" + }, + "auction_worklet.mojom.KAnonymityStatus": { + "definition": "enum KAnonymityStatus { kUnknown, kBelowThreshold, kPassingNotEnforced, kPassingAndEnforced,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=28" + }, + "auction_worklet.mojom.BidRole": { + "definition": "enum BidRole { kUnenforcedKAnon, kEnforcedKAnon, kBothKAnonModes};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=124" + }, + "auction_worklet.mojom.ReportingIdField": { + "definition": "enum ReportingIdField { kNone = 0, kInterestGroupName = 1, kBuyerReportingId = 2, kBuyerAndSellerReportingId = 3, kSelectedBuyerAndSellerReportingId = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/bidder_worklet.mojom;l=146" + }, + "auction_worklet.mojom.InProgressAuctionDownload": { + "definition": "struct InProgressAuctionDownload { url.mojom.Url url; network.mojom.URLLoaderClientEndpoints endpoints; string devtools_request_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/in_progress_auction_download.mojom;l=12" + }, + "auction_worklet.mojom.BucketOffset": { + "definition": "struct BucketOffset { mojo_base.mojom.Uint128 value; bool is_negative;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=41" + }, + "auction_worklet.mojom.SignalBucket": { + "definition": "struct SignalBucket { BaseValue base_value; double scale = 1.0; BucketOffset? offset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=47" + }, + "auction_worklet.mojom.SignalValue": { + "definition": "struct SignalValue { BaseValue base_value; double scale = 1.0; int32 offset = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=59" + }, + "auction_worklet.mojom.AggregatableReportForEventContribution": { + "definition": "struct AggregatableReportForEventContribution { ForEventSignalBucket bucket; ForEventSignalValue value; uint64? filtering_id; EventType event_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=125" + }, + "auction_worklet.mojom.PrivateAggregationRequest": { + "definition": "struct PrivateAggregationRequest { AggregatableReportContribution contribution; blink.mojom.DebugModeDetails debug_mode_details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=146" + }, + "auction_worklet.mojom.FinalizedPrivateAggregationRequest": { + "definition": "struct FinalizedPrivateAggregationRequest { blink.mojom.AggregatableReportHistogramContribution contribution; blink.mojom.DebugModeDetails debug_mode_details; blink.mojom.PrivateAggregationErrorEvent? error_event;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=154" + }, + "auction_worklet.mojom.BaseValue": { + "definition": "enum BaseValue { kWinningBid = 0, kHighestScoringOtherBid = 1, kScriptRunTime = 2, kSignalsFetchTime = 3, kBidRejectReason = 4, kParticipatingInterestGroupCount = 5, kAverageCodeFetchTime = 6, kPercentScriptsTimeout = 7, kPercentInterestGroupsCumulativeTimeout = 8, kCumulativeBuyerTime = 9, kRegularInterestGroupsUsed = 10, kPercentRegularInterestGroupQuotaUsed = 11, kNegativeInterestGroupsUsed = 12, kPercentNegativeInterestGroupQuotaUsed = 13, kInterestGroupStorageUsed = 14, kPercentInterestGroupStorageQuotaUsed = 15,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=16" + }, + "auction_worklet.mojom.ReservedNonErrorEventType": { + "definition": "enum ReservedNonErrorEventType { kReservedAlways, kReservedWin, kReservedLoss, kReservedOnce,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=72" + }, + "auction_worklet.mojom.ReservedErrorEventType": { + "definition": "enum ReservedErrorEventType { kReportSuccess, kTooManyContributions, kEmptyReportDropped, kPendingReportLimitReached, kInsufficientBudget, kUncaughtError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=84" + }, + "auction_worklet.mojom.ForEventSignalBucket": { + "definition": "union ForEventSignalBucket { mojo_base.mojom.Uint128 id_bucket; SignalBucket signal_bucket;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=100" + }, + "auction_worklet.mojom.ForEventSignalValue": { + "definition": "union ForEventSignalValue { int32 int_value; SignalValue signal_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=108" + }, + "auction_worklet.mojom.EventType": { + "definition": "union EventType { ReservedNonErrorEventType reserved_non_error; ReservedErrorEventType reserved_error; string non_reserved;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=116" + }, + "auction_worklet.mojom.AggregatableReportContribution": { + "definition": "union AggregatableReportContribution { blink.mojom.AggregatableReportHistogramContribution histogram_contribution; AggregatableReportForEventContribution for_event_contribution;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/private_aggregation_request.mojom;l=138" + }, + "auction_worklet.mojom.RealTimeReportingContribution": { + "definition": "struct RealTimeReportingContribution { int32 bucket; double priority_weight = 1.0; int32? latency_threshold;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/real_time_reporting.mojom;l=8" + }, + "auction_worklet.mojom.RejectReason": { + "definition": "enum RejectReason { kNotAvailable = 0, kInvalidBid = 1, kBidBelowAuctionFloor = 2, kPendingApprovalByExchange = 3, kDisapprovedByExchange = 4, kBlockedByPublisher = 5, kLanguageExclusions = 6, kCategoryExclusions = 7, kBelowKAnonThreshold = 8, kWrongGenerateBidCurrency = 9, kWrongScoreAdCurrency = 10, kMultiBidLimitExceeded = 11,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/reject_reason.mojom;l=8" + }, + "auction_worklet.mojom.ScoreAdClient.OnScoreAdComplete": { + "definition": "OnScoreAdComplete(double score, RejectReason reject_reason, ComponentAuctionModifiedBidParams? component_auction_modified_bid_params, double? bid_in_seller_currency, uint32? scoring_signals_data_version, url.mojom.Url? debug_loss_report_url, url.mojom.Url? debug_win_report_url, array pa_requests, array real_time_contributions, SellerTimingMetrics score_ad_timing_metrics, ScoreAdDependencyLatencies score_ad_dependency_latencies, array errors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=141" + }, + "auction_worklet.mojom.SellerWorklet.ScoreAd": { + "definition": "ScoreAd(string ad_metadata_json, double bid, blink.mojom.AdCurrency? bid_currency, blink.mojom.AuctionAdConfigNonSharedParams auction_ad_config_non_shared_params, TrustedSignalsCacheKey? key_value_signals_cache_key, CreativeInfoWithoutOwner ad, array ad_components, url.mojom.Url? direct_from_seller_seller_signals, string? direct_from_seller_seller_signals_header_ad_slot, url.mojom.Url? direct_from_seller_auction_signals, string? direct_from_seller_auction_signals_header_ad_slot, ComponentAuctionOtherSeller? browser_signals_other_seller, blink.mojom.AdCurrency? component_expect_bid_currency, url.mojom.Origin browser_signal_interest_group_owner, string? browser_signal_selected_buyer_and_seller_reporting_id, string? browser_signal_buyer_and_seller_reporting_id, uint32 browser_signal_bidding_duration_msecs, bool browser_signal_for_debugging_only_in_cooldown_or_lockout, bool browser_signal_for_debugging_only_sampling, mojo_base.mojom.TimeDelta? seller_timeout, uint64 group_by_origin_id, bool allow_group_by_origin_mode, uint64 trace_id, url.mojom.Origin bidder_joining_origin, pending_remote score_ad_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=299" + }, + "auction_worklet.mojom.SellerWorklet.SendPendingSignalsRequests": { + "definition": "SendPendingSignalsRequests();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=333" + }, + "auction_worklet.mojom.SellerWorklet.ReportResult": { + "definition": "ReportResult( blink.mojom.AuctionAdConfigNonSharedParams auction_ad_config_non_shared_params, url.mojom.Url? direct_from_seller_seller_signals, string? direct_from_seller_seller_signals_header_ad_slot, url.mojom.Url? direct_from_seller_auction_signals, string? direct_from_seller_auction_signals_header_ad_slot, ComponentAuctionOtherSeller? browser_signals_other_seller, url.mojom.Origin browser_signal_interest_group_owner, string? browser_signal_buyer_and_seller_reporting_id, string? browser_signal_selected_buyer_and_seller_reporting_id, url.mojom.Url browser_signal_render_url, double browser_signal_bid, blink.mojom.AdCurrency? browser_signal_bid_currency, double browser_signal_desirability, double browser_signal_highest_scoring_other_bid, blink.mojom.AdCurrency? browser_signal_highest_scoring_other_bid_currency, ComponentAuctionReportResultParams? browser_signals_component_auction_report_result_params, uint32? scoring_signals_data_version, uint64 trace_id) => (string? signals_for_winner, url.mojom.Url? report_url, map ad_beacon_map, array pa_requests, SellerTimingMetrics time_metrics, array error_msgs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=443" + }, + "auction_worklet.mojom.SellerWorklet.ConnectDevToolsAgent": { + "definition": "ConnectDevToolsAgent( pending_associated_receiver agent, uint32 thread_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=475" + }, + "auction_worklet.mojom.ComponentAuctionModifiedBidParams": { + "definition": "struct ComponentAuctionModifiedBidParams { string ad; double? bid; blink.mojom.AdCurrency? bid_currency;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=31" + }, + "auction_worklet.mojom.ComponentAuctionReportResultParams": { + "definition": "struct ComponentAuctionReportResultParams { string top_level_seller_signals; double? modified_bid;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=43" + }, + "auction_worklet.mojom.ScoreAdDependencyLatencies": { + "definition": "struct ScoreAdDependencyLatencies { mojo_base.mojom.TimeDelta? code_ready_latency; mojo_base.mojom.TimeDelta? direct_from_seller_signals_latency; mojo_base.mojom.TimeDelta? trusted_scoring_signals_latency; mojo_base.mojom.TimeTicks deps_wait_start_time; mojo_base.mojom.TimeTicks score_ad_start_time; mojo_base.mojom.TimeTicks score_ad_finish_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=58" + }, + "auction_worklet.mojom.SellerTimingMetrics": { + "definition": "struct SellerTimingMetrics { mojo_base.mojom.TimeDelta? js_fetch_latency; mojo_base.mojom.TimeDelta script_latency; bool script_timed_out;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=79" + }, + "auction_worklet.mojom.CreativeInfoWithoutOwner": { + "definition": "struct CreativeInfoWithoutOwner { blink.mojom.AdDescriptor ad_descriptor; string? creative_scanning_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=163" + }, + "auction_worklet.mojom.ComponentAuctionOtherSeller": { + "definition": "union ComponentAuctionOtherSeller { url.mojom.Origin top_level_seller; url.mojom.Origin component_seller;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/seller_worklet.mojom;l=23" + }, + "auction_worklet.mojom.TrustedSignalsCacheClient.OnSuccess": { + "definition": "OnSuccess(TrustedSignalsCompressionScheme compression_scheme, mojo_base.mojom.BigBuffer compression_group_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/trusted_signals_cache.mojom;l=55" + }, + "auction_worklet.mojom.TrustedSignalsCacheClient.OnError": { + "definition": "OnError(string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/trusted_signals_cache.mojom;l=61" + }, + "auction_worklet.mojom.TrustedSignalsCache.GetTrustedSignals": { + "definition": "GetTrustedSignals(mojo_base.mojom.UnguessableToken compression_group_token, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/trusted_signals_cache.mojom;l=87" + }, + "auction_worklet.mojom.TrustedSignalsCacheKey": { + "definition": "struct TrustedSignalsCacheKey { mojo_base.mojom.UnguessableToken compression_group_token; int32 partition_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/trusted_signals_cache.mojom;l=16" + }, + "auction_worklet.mojom.TrustedSignalsCompressionScheme": { + "definition": "enum TrustedSignalsCompressionScheme { kNone, kGzip, kBrotli,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/services/auction_worklet/public/mojom/trusted_signals_cache.mojom;l=32" + }, + "content.mojom.MainFrameCounterTest.HasMainFrame": { + "definition": "HasMainFrame() => (bool has_main_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/shell/common/main_frame_counter_test.mojom;l=12" + }, + "content.mojom.PowerMonitorTest.QueryNextState": { + "definition": "QueryNextState() => (mojo_base.mojom.BatteryPowerStatus battery_power_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/shell/common/power_monitor_test.mojom;l=17" + }, + "content.mojom.RenderFrameTestHelper.GetDocumentToken": { + "definition": "GetDocumentToken() => (blink.mojom.DocumentToken token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/shell/common/render_frame_test_helper.mojom;l=16" + }, + "content.mojom.RenderFrameTestHelper.GetCanvasNoiseToken": { + "definition": "GetCanvasNoiseToken() => (blink.mojom.NoiseToken? canvas_noise_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/shell/common/render_frame_test_helper.mojom;l=21" + }, + "content.mojom.FrameHostTestInterface.Ping": { + "definition": "Ping(url.mojom.Url source_url, string source_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/test/frame_host_test_interface.mojom;l=18" + }, + "content.mojom.sandbox.UtilityConfig": { + "definition": "struct UtilityConfig { array preload_libraries; uint32 bootstrap_event_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/utility/sandbox_delegate_data.mojom;l=12" + }, + "content.mojom.FakeBluetoothChooser.SelectPeripheral": { + "definition": "SelectPeripheral(string peripheral_address);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/fake_bluetooth_chooser.mojom;l=45" + }, + "content.mojom.FakeBluetoothChooser.Cancel": { + "definition": "Cancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/fake_bluetooth_chooser.mojom;l=48" + }, + "content.mojom.FakeBluetoothChooser.Rescan": { + "definition": "Rescan();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/fake_bluetooth_chooser.mojom;l=51" + }, + "content.mojom.FakeBluetoothChooserFactory.CreateFakeBluetoothChooser": { + "definition": "CreateFakeBluetoothChooser( pending_receiver fake_chooser, pending_associated_remote client) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/fake_bluetooth_chooser.mojom;l=57" + }, + "content.mojom.FakeBluetoothChooserClient.OnEvent": { + "definition": "OnEvent(FakeBluetoothChooserEvent event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/fake_bluetooth_chooser.mojom;l=77" + }, + "content.mojom.FakeBluetoothChooserEvent": { + "definition": "struct FakeBluetoothChooserEvent { ChooserEventType type; url.mojom.Origin? origin; string? peripheral_address;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/fake_bluetooth_chooser.mojom;l=64" + }, + "content.mojom.ChooserEventType": { + "definition": "enum ChooserEventType { CHOOSER_OPENED, CHOOSER_CLOSED, ADAPTER_REMOVED, ADAPTER_DISABLED, ADAPTER_ENABLED, DISCOVERY_FAILED_TO_START, DISCOVERING, DISCOVERY_IDLE, ADD_OR_UPDATE_DEVICE, UNAUTHORIZED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/fake_bluetooth_chooser.mojom;l=27" + }, + "content.mojom.MojoEcho.EchoBoolFromUnion": { + "definition": "EchoBoolFromUnion(TestUnion test_union) => (bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=28" + }, + "content.mojom.MojoEcho.EchoInt32FromUnion": { + "definition": "EchoInt32FromUnion(TestUnion test_union) => (int32 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=30" + }, + "content.mojom.MojoEcho.EchoStringFromUnion": { + "definition": "EchoStringFromUnion(TestUnion test_union) => (string value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=32" + }, + "content.mojom.MojoEcho.EchoBoolAsUnion": { + "definition": "EchoBoolAsUnion(bool value) => (TestUnion test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=37" + }, + "content.mojom.MojoEcho.EchoInt32AsUnion": { + "definition": "EchoInt32AsUnion(int32 value) => (TestUnion test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=39" + }, + "content.mojom.MojoEcho.EchoStringAsUnion": { + "definition": "EchoStringAsUnion(string value) => (TestUnion test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=41" + }, + "content.mojom.MojoEcho.EchoNullFromOptionalUnion": { + "definition": "EchoNullFromOptionalUnion(TestUnion? test_union) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=47" + }, + "content.mojom.MojoEcho.EchoBoolFromOptionalUnion": { + "definition": "EchoBoolFromOptionalUnion(TestUnion? test_union) => (bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=49" + }, + "content.mojom.MojoEcho.EchoInt32FromOptionalUnion": { + "definition": "EchoInt32FromOptionalUnion(TestUnion? test_union) => (int32 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=51" + }, + "content.mojom.MojoEcho.EchoStringFromOptionalUnion": { + "definition": "EchoStringFromOptionalUnion(TestUnion? test_union) => (string value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=53" + }, + "content.mojom.MojoEcho.EchoNullAsOptionalUnion": { + "definition": "EchoNullAsOptionalUnion() => (TestUnion? test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=59" + }, + "content.mojom.MojoEcho.EchoBoolAsOptionalUnion": { + "definition": "EchoBoolAsOptionalUnion(bool value) => (TestUnion? test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=61" + }, + "content.mojom.MojoEcho.EchoInt32AsOptionalUnion": { + "definition": "EchoInt32AsOptionalUnion(int32 value) => (TestUnion? test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=63" + }, + "content.mojom.MojoEcho.EchoStringAsOptionalUnion": { + "definition": "EchoStringAsOptionalUnion(string value) => (TestUnion? test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=65" + }, + "content.mojom.MojoEcho.EchoInt8FromNestedUnion": { + "definition": "EchoInt8FromNestedUnion(NestedUnion test_union) => (int8 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=71" + }, + "content.mojom.MojoEcho.EchoBoolFromNestedUnion": { + "definition": "EchoBoolFromNestedUnion(NestedUnion test_union) => (bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=73" + }, + "content.mojom.MojoEcho.EchoStringFromNestedUnion": { + "definition": "EchoStringFromNestedUnion(NestedUnion test_union) => (string value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=75" + }, + "content.mojom.MojoEcho.EchoInt8AsNestedUnion": { + "definition": "EchoInt8AsNestedUnion(int8 value) => (NestedUnion test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=80" + }, + "content.mojom.MojoEcho.EchoBoolAsNestedUnion": { + "definition": "EchoBoolAsNestedUnion(bool value) => (NestedUnion test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=82" + }, + "content.mojom.MojoEcho.EchoStringAsNestedUnion": { + "definition": "EchoStringAsNestedUnion(string value) => (NestedUnion test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=84" + }, + "content.mojom.MojoEcho.EchoNullFromOptionalNestedUnion": { + "definition": "EchoNullFromOptionalNestedUnion(NestedUnion? test_union) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=90" + }, + "content.mojom.MojoEcho.EchoInt8FromOptionalNestedUnion": { + "definition": "EchoInt8FromOptionalNestedUnion(NestedUnion? test_union) => (int8 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=92" + }, + "content.mojom.MojoEcho.EchoBoolFromOptionalNestedUnion": { + "definition": "EchoBoolFromOptionalNestedUnion(NestedUnion? test_union) => (bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=94" + }, + "content.mojom.MojoEcho.EchoStringFromOptionalNestedUnion": { + "definition": "EchoStringFromOptionalNestedUnion(NestedUnion? test_union) => (string value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=96" + }, + "content.mojom.MojoEcho.EchoNullAsOptionalNestedUnion": { + "definition": "EchoNullAsOptionalNestedUnion() => (NestedUnion? test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=102" + }, + "content.mojom.MojoEcho.EchoInt8AsOptionalNestedUnion": { + "definition": "EchoInt8AsOptionalNestedUnion(int8 value) => (NestedUnion? test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=104" + }, + "content.mojom.MojoEcho.EchoBoolAsOptionalNestedUnion": { + "definition": "EchoBoolAsOptionalNestedUnion(bool value) => (NestedUnion? test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=106" + }, + "content.mojom.MojoEcho.EchoStringAsOptionalNestedUnion": { + "definition": "EchoStringAsOptionalNestedUnion(string value) => (NestedUnion? test_union);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=108" + }, + "content.mojom.MojoEcho.EchoBoolArray": { + "definition": "EchoBoolArray(array values) => (array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=112" + }, + "content.mojom.TestUnion": { + "definition": "union TestUnion { bool bool_value; int32 int32_value; string string_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=10" + }, + "content.mojom.NestedUnion": { + "definition": "union NestedUnion { int8 int8_value; TestUnion union_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_echo.mojom;l=16" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullBool": { + "definition": "SendNullBool(bool? optional_bool) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=36" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullUint8": { + "definition": "SendNullUint8(uint8? optional_uint8) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=38" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullInt8": { + "definition": "SendNullInt8(int8? optional_int8) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=40" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullUint16": { + "definition": "SendNullUint16(uint16? optional_uint16) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=42" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullInt16": { + "definition": "SendNullInt16(int16? optional_int16) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=44" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullUint32": { + "definition": "SendNullUint32(uint32? optional_uint32) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=46" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullInt32": { + "definition": "SendNullInt32(int32? optional_int32) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=48" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullUint64": { + "definition": "SendNullUint64(uint64? optional_uint64) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=50" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullInt64": { + "definition": "SendNullInt64(int64? optional_int64) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=52" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullFloat": { + "definition": "SendNullFloat(float? optional_float) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=54" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullDouble": { + "definition": "SendNullDouble(double? optional_double) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=56" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullEnum": { + "definition": "SendNullEnum(RegularEnum? optional_enum) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=58" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullBools": { + "definition": "SendNullBools(array optional_bools) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=61" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullInt16s": { + "definition": "SendNullInt16s(array optional_int16s) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=63" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullUint32s": { + "definition": "SendNullUint32s(array optional_uint32s) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=65" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullDoubles": { + "definition": "SendNullDoubles(array optional_doubles) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=67" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullEnums": { + "definition": "SendNullEnums(array optional_enums) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=69" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullBoolMap": { + "definition": "SendNullBoolMap(map values) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=72" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullDoubleMap": { + "definition": "SendNullDoubleMap(map values) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=74" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullEnumMap": { + "definition": "SendNullEnumMap(map values) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=76" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalBool": { + "definition": "SendOptionalBool(bool? optional_bool) => (bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=82" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalUint8": { + "definition": "SendOptionalUint8(uint8? optional_uint8) => (uint8 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=84" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalInt8": { + "definition": "SendOptionalInt8(int8? optional_int8) => (int8 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=86" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalUint16": { + "definition": "SendOptionalUint16(uint16? optional_uint16) => (uint16 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=88" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalInt16": { + "definition": "SendOptionalInt16(int16? optional_int16) => (int16 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=90" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalUint32": { + "definition": "SendOptionalUint32(uint32? optional_uint32) => (uint32 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=92" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalInt32": { + "definition": "SendOptionalInt32(int32? optional_int32) => (int32 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=94" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalUint64": { + "definition": "SendOptionalUint64(uint64? optional_uint64) => (uint64 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=96" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalInt64": { + "definition": "SendOptionalInt64(int64? optional_int64) => (int64 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=98" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalFloat": { + "definition": "SendOptionalFloat(float? optional_float) => (float value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=100" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalDouble": { + "definition": "SendOptionalDouble(double? optional_double) => (double value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=102" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalEnum": { + "definition": "SendOptionalEnum(RegularEnum? optional_enum) => (RegularEnum value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=104" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalBools": { + "definition": "SendOptionalBools(array optional_enums) => (array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=107" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalInt16s": { + "definition": "SendOptionalInt16s(array optional_int16s) => (array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=109" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalUint32s": { + "definition": "SendOptionalUint32s(array optional_uint32s) => (array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=111" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalDoubles": { + "definition": "SendOptionalDoubles(array optional_doubles) => (array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=114" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalEnums": { + "definition": "SendOptionalEnums(array optional_enums) => (array values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=117" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalBoolMap": { + "definition": "SendOptionalBoolMap(map values) => (map values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=121" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalDoubleMap": { + "definition": "SendOptionalDoubleMap(map values) => (map values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=124" + }, + "content.optional_numerics_unittest.mojom.Params.SendOptionalEnumMap": { + "definition": "SendOptionalEnumMap(map values) => (map values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=127" + }, + "content.optional_numerics_unittest.mojom.Params.SendNullStructWithOptionalNumerics": { + "definition": "SendNullStructWithOptionalNumerics(OptionalNumericsStruct? s) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=132" + }, + "content.optional_numerics_unittest.mojom.Params.SendStructWithNullOptionalNumerics": { + "definition": "SendStructWithNullOptionalNumerics(OptionalNumericsStruct s) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=137" + }, + "content.optional_numerics_unittest.mojom.Params.SendStructWithOptionalNumerics": { + "definition": "SendStructWithOptionalNumerics(OptionalNumericsStruct s) => ( bool bool_value, uint8 uint8_value, int8 int8_value, uint16 uint16_value, int16 int16_value, uint32 uint32_value, int32 int32_value, uint64 uint64_value, int64 int64_value, float float_value, double double_value, RegularEnum enum_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=141" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullBool": { + "definition": "GetNullBool() => (bool? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=164" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullUint8": { + "definition": "GetNullUint8() => (uint8? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=166" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullInt8": { + "definition": "GetNullInt8() => (int8? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=168" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullUint16": { + "definition": "GetNullUint16() => (uint16? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=170" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullInt16": { + "definition": "GetNullInt16() => (int16? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=172" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullUint32": { + "definition": "GetNullUint32() => (uint32? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=174" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullInt32": { + "definition": "GetNullInt32() => (int32? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=176" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullUint64": { + "definition": "GetNullUint64() => (uint64? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=178" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullInt64": { + "definition": "GetNullInt64() => (int64? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=180" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullFloat": { + "definition": "GetNullFloat() => (float? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=182" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullDouble": { + "definition": "GetNullDouble() => (double? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=184" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullEnum": { + "definition": "GetNullEnum() => (RegularEnum? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=186" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullBools": { + "definition": "GetNullBools() => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=189" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullInt16s": { + "definition": "GetNullInt16s() => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=191" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullUint32s": { + "definition": "GetNullUint32s() => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=193" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullDoubles": { + "definition": "GetNullDoubles() => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=195" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullEnums": { + "definition": "GetNullEnums() => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=197" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullBoolMap": { + "definition": "GetNullBoolMap() => (map optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=200" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullInt32Map": { + "definition": "GetNullInt32Map() => (map optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=202" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullEnumMap": { + "definition": "GetNullEnumMap() => (map optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=204" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalBool": { + "definition": "GetOptionalBool(bool value) => (bool? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=210" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalUint8": { + "definition": "GetOptionalUint8(uint8 value) => (uint8? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=212" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalInt8": { + "definition": "GetOptionalInt8(int8 value) => (int8? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=214" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalUint16": { + "definition": "GetOptionalUint16(uint16 value) => (uint16? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=216" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalInt16": { + "definition": "GetOptionalInt16(int16 value) => (int16? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=218" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalUint32": { + "definition": "GetOptionalUint32(uint32 value) => (uint32? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=220" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalInt32": { + "definition": "GetOptionalInt32(int32 value) => (int32? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=222" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalUint64": { + "definition": "GetOptionalUint64(uint64 value) => (uint64? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=224" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalInt64": { + "definition": "GetOptionalInt64(int64 value) => (int64? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=226" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalFloat": { + "definition": "GetOptionalFloat(float value) => (float? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=228" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalDouble": { + "definition": "GetOptionalDouble(double value) => (double? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=230" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalEnum": { + "definition": "GetOptionalEnum(RegularEnum value) => (RegularEnum? optional_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=232" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalBools": { + "definition": "GetOptionalBools(bool value) => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=236" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalInt16s": { + "definition": "GetOptionalInt16s(int16 value) => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=239" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalUint32s": { + "definition": "GetOptionalUint32s(uint32 value) => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=242" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalDoubles": { + "definition": "GetOptionalDoubles(double value) => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=245" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalEnums": { + "definition": "GetOptionalEnums(RegularEnum value) => (array optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=248" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalBoolMap": { + "definition": "GetOptionalBoolMap(int16 key, bool value) => (map optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=256" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalFloatMap": { + "definition": "GetOptionalFloatMap(int16 key, float value) => (map optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=259" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetOptionalEnumMap": { + "definition": "GetOptionalEnumMap(int16 key, RegularEnum value) => (map optional_values);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=262" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetNullStructWithOptionalNumerics": { + "definition": "GetNullStructWithOptionalNumerics() => (OptionalNumericsStruct? s);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=267" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetStructWithNullOptionalNumerics": { + "definition": "GetStructWithNullOptionalNumerics() => (OptionalNumericsStruct s);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=271" + }, + "content.optional_numerics_unittest.mojom.ResponseParams.GetStructWithOptionalNumerics": { + "definition": "GetStructWithOptionalNumerics( bool bool_value, uint8 uint8_value, int8 int8_value, uint16 uint16_value, int16 int16_value, uint32 uint32_value, int32 int32_value, uint64 uint64_value, int64 int64_value, float float_value, double double_value, RegularEnum enum_value) => (OptionalNumericsStruct s);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=275" + }, + "content.optional_numerics_unittest.mojom.InterfaceV0.MethodWithVersionedParams@1": { + "definition": "MethodWithVersionedParams@1() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=312" + }, + "content.optional_numerics_unittest.mojom.InterfaceV0.MethodWithVersionedStruct@2": { + "definition": "MethodWithVersionedStruct@2(VersionedStructV0 s) => (VersionedStructV0 s);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=315" + }, + "content.optional_numerics_unittest.mojom.InterfaceV2.MethodWithVersionedParams@1": { + "definition": "MethodWithVersionedParams@1( [MinVersion=2] bool? bool_value, [MinVersion=2] uint8? uint8_value, [MinVersion=2] int8? int8_value, [MinVersion=2] uint16? uint16_value, [MinVersion=2] int16? int16_value, [MinVersion=2] uint32? uint32_value, [MinVersion=2] int32? int32_value, [MinVersion=2] uint64? uint64_value, [MinVersion=2] int64? int64_value, [MinVersion=2] float? float_value, [MinVersion=2] double? double_value, [MinVersion=2] RegularEnum? enum_value ) => ( [MinVersion=2] bool? bool_value, [MinVersion=2] uint8? uint8_value, [MinVersion=2] int8? int8_value, [MinVersion=2] uint16? uint16_value, [MinVersion=2] int16? int16_value, [MinVersion=2] uint32? uint32_value, [MinVersion=2] int32? int32_value, [MinVersion=2] uint64? uint64_value, [MinVersion=2] int64? int64_value, [MinVersion=2] float? float_value, [MinVersion=2] double? double_value, [MinVersion=2] RegularEnum? enum_value );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=324" + }, + "content.optional_numerics_unittest.mojom.InterfaceV2.MethodWithVersionedStruct@2": { + "definition": "MethodWithVersionedStruct@2(VersionedStructV2 s) => (VersionedStructV2 s);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=355" + }, + "content.optional_numerics_unittest.mojom.OptionalNumericsStruct": { + "definition": "struct OptionalNumericsStruct { bool? optional_bool; uint8? optional_uint8; int8? optional_int8; uint16? optional_uint16; int16? optional_int16; uint32? optional_uint32; int32? optional_int32; uint64? optional_uint64; int64? optional_int64; float? optional_float; double? optional_double; RegularEnum? optional_enum;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=13" + }, + "content.optional_numerics_unittest.mojom.VersionedStructV0": { + "definition": "struct VersionedStructV0 {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=290" + }, + "content.optional_numerics_unittest.mojom.VersionedStructV2": { + "definition": "struct VersionedStructV2 { [MinVersion=2] bool? bool_value; [MinVersion=2] uint8? uint8_value; [MinVersion=2] int8? int8_value; [MinVersion=2] uint16? uint16_value; [MinVersion=2] int16? int16_value; [MinVersion=2] uint32? uint32_value; [MinVersion=2] int32? int32_value; [MinVersion=2] uint64? uint64_value; [MinVersion=2] int64? int64_value; [MinVersion=2] float? float_value; [MinVersion=2] double? double_value; [MinVersion=2] RegularEnum? enum_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=293" + }, + "content.optional_numerics_unittest.mojom.RegularEnum": { + "definition": "enum RegularEnum { kFoo = 1, kBar = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/mojo_optional_numerics_unittest.mojom;l=7" + }, + "content.mojom.WebTestRenderFrame.SynchronouslyCompositeAfterTest": { + "definition": "SynchronouslyCompositeAfterTest() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=108" + }, + "content.mojom.WebTestRenderFrame.DumpFrameLayout": { + "definition": "DumpFrameLayout() => (string frame_layout_dump);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=111" + }, + "content.mojom.WebTestRenderFrame.SetTestConfiguration": { + "definition": "SetTestConfiguration(WebTestRunTestConfiguration config, bool starting_test);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=120" + }, + "content.mojom.WebTestRenderFrame.OnDeactivated": { + "definition": "OnDeactivated();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=124" + }, + "content.mojom.WebTestRenderFrame.OnReactivated": { + "definition": "OnReactivated();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=128" + }, + "content.mojom.WebTestRenderFrame.BlockTestUntilStart": { + "definition": "BlockTestUntilStart();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=132" + }, + "content.mojom.WebTestRenderFrame.StartTest": { + "definition": "StartTest();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=137" + }, + "content.mojom.WebTestRenderFrame.SetupRendererProcessForNonTestWindow": { + "definition": "SetupRendererProcessForNonTestWindow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=145" + }, + "content.mojom.WebTestRenderFrame.ReplicateWebTestRuntimeFlagsChanges": { + "definition": "ReplicateWebTestRuntimeFlagsChanges( mojo_base.mojom.DictionaryValue changed_layout_test_runtime_flags);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=150" + }, + "content.mojom.WebTestRenderFrame.TestFinishedFromSecondaryRenderer": { + "definition": "TestFinishedFromSecondaryRenderer();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=156" + }, + "content.mojom.WebTestRenderFrame.ResetRendererAfterWebTest": { + "definition": "ResetRendererAfterWebTest();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=167" + }, + "content.mojom.WebTestRenderFrame.ProcessWorkItem": { + "definition": "ProcessWorkItem(WorkItem work_item);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=171" + }, + "content.mojom.WebTestRenderFrame.ReplicateWorkQueueStates": { + "definition": "ReplicateWorkQueueStates( mojo_base.mojom.DictionaryValue work_queue_states);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=174" + }, + "content.mojom.WebTestControlHost.InitiateCaptureDump": { + "definition": "InitiateCaptureDump(WebTestRendererDumpResult result, bool capture_navigation_history, bool capture_pixels);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=185" + }, + "content.mojom.WebTestControlHost.TestFinishedInSecondaryRenderer": { + "definition": "TestFinishedInSecondaryRenderer();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=190" + }, + "content.mojom.WebTestControlHost.PrintMessageToStderr": { + "definition": "PrintMessageToStderr(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=194" + }, + "content.mojom.WebTestControlHost.PrintMessage": { + "definition": "PrintMessage(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=197" + }, + "content.mojom.WebTestControlHost.OverridePreferences": { + "definition": "OverridePreferences(blink.mojom.WebPreferences web_preferences);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=200" + }, + "content.mojom.WebTestControlHost.Reload": { + "definition": "Reload();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=203" + }, + "content.mojom.WebTestControlHost.CheckForLeakedWindows": { + "definition": "CheckForLeakedWindows();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=208" + }, + "content.mojom.WebTestControlHost.SetMainWindowHidden": { + "definition": "SetMainWindowHidden(bool hidden);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=212" + }, + "content.mojom.WebTestControlHost.SetFrameWindowHidden": { + "definition": "SetFrameWindowHidden(blink.mojom.LocalFrameToken frame_token, bool hidden);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=217" + }, + "content.mojom.WebTestControlHost.GoToOffset": { + "definition": "GoToOffset(int32 offset);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=220" + }, + "content.mojom.WebTestControlHost.SendBluetoothManualChooserEvent": { + "definition": "SendBluetoothManualChooserEvent(string event, string argument);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=227" + }, + "content.mojom.WebTestControlHost.SetBluetoothManualChooser": { + "definition": "SetBluetoothManualChooser(bool enable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=232" + }, + "content.mojom.WebTestControlHost.GetBluetoothManualChooserEvents": { + "definition": "GetBluetoothManualChooserEvents() => (array events);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=235" + }, + "content.mojom.WebTestControlHost.SetPopupBlockingEnabled": { + "definition": "SetPopupBlockingEnabled(bool block_popups);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=238" + }, + "content.mojom.WebTestControlHost.LoadURLForFrame": { + "definition": "LoadURLForFrame(url.mojom.Url url, string frame_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=241" + }, + "content.mojom.WebTestControlHost.SimulateScreenOrientationChanged": { + "definition": "SimulateScreenOrientationChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=245" + }, + "content.mojom.WebTestControlHost.SetPermission": { + "definition": "SetPermission(string name, blink.mojom.PermissionStatus status, url.mojom.Url origin, url.mojom.Url embedding_origin);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=249" + }, + "content.mojom.WebTestControlHost.BlockThirdPartyCookies": { + "definition": "BlockThirdPartyCookies(bool block);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=257" + }, + "content.mojom.WebTestControlHost.GetWritableDirectory": { + "definition": "[Sync] GetWritableDirectory() => (mojo_base.mojom.FilePath path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=263" + }, + "content.mojom.WebTestControlHost.SetFilePathForMockFileDialog": { + "definition": "SetFilePathForMockFileDialog(mojo_base.mojom.FilePath path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=268" + }, + "content.mojom.WebTestControlHost.CreateSubresourceFilterRulesetFile": { + "definition": "[Sync] CreateSubresourceFilterRulesetFile(array disallowed_suffixes) => (mojo_base.mojom.File file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=272" + }, + "content.mojom.WebTestControlHost.FocusDevtoolsSecondaryWindow": { + "definition": "FocusDevtoolsSecondaryWindow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=278" + }, + "content.mojom.WebTestControlHost.SetTrustTokenKeyCommitments": { + "definition": "SetTrustTokenKeyCommitments(string raw_commitments) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=283" + }, + "content.mojom.WebTestControlHost.ClearTrustTokenState": { + "definition": "ClearTrustTokenState() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=286" + }, + "content.mojom.WebTestControlHost.SimulateWebNotificationClick": { + "definition": "SimulateWebNotificationClick( string title, int32 action_index, mojo_base.mojom.String16? reply);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=292" + }, + "content.mojom.WebTestControlHost.SimulateWebNotificationClose": { + "definition": "SimulateWebNotificationClose(string title, bool by_user);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=299" + }, + "content.mojom.WebTestControlHost.SimulateWebContentIndexDelete": { + "definition": "SimulateWebContentIndexDelete(string id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=302" + }, + "content.mojom.WebTestControlHost.WebTestRuntimeFlagsChanged": { + "definition": "WebTestRuntimeFlagsChanged( mojo_base.mojom.DictionaryValue changed_web_test_runtime_flags);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=306" + }, + "content.mojom.WebTestControlHost.RegisterIsolatedFileSystem": { + "definition": "[Sync] RegisterIsolatedFileSystem( array file_paths) => (string filesystem_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=311" + }, + "content.mojom.WebTestControlHost.DropPointerLock": { + "definition": "DropPointerLock();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=316" + }, + "content.mojom.WebTestControlHost.SetPointerLockWillFail": { + "definition": "SetPointerLockWillFail();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=319" + }, + "content.mojom.WebTestControlHost.SetPointerLockWillRespondAsynchronously": { + "definition": "SetPointerLockWillRespondAsynchronously();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=324" + }, + "content.mojom.WebTestControlHost.AllowPointerLock": { + "definition": "AllowPointerLock();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=327" + }, + "content.mojom.WebTestControlHost.WorkItemAdded": { + "definition": "WorkItemAdded(WorkItem work_item);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=330" + }, + "content.mojom.WebTestControlHost.RequestWorkItem": { + "definition": "RequestWorkItem();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=337" + }, + "content.mojom.WebTestControlHost.WorkQueueStatesChanged": { + "definition": "WorkQueueStatesChanged( mojo_base.mojom.DictionaryValue changed_work_queue_states);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=340" + }, + "content.mojom.WebTestControlHost.SetAcceptLanguages": { + "definition": "SetAcceptLanguages(string accept_languages);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=344" + }, + "content.mojom.WebTestControlHost.SetRegisterProtocolHandlerMode": { + "definition": "SetRegisterProtocolHandlerMode(AutoResponseMode mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=358" + }, + "content.mojom.WebTestControlHost.EnableAutoResize": { + "definition": "EnableAutoResize(gfx.mojom.Size min_size, gfx.mojom.Size max_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=363" + }, + "content.mojom.WebTestControlHost.DisableAutoResize": { + "definition": "DisableAutoResize(gfx.mojom.Size new_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=366" + }, + "content.mojom.NonAssociatedWebTestControlHost.SetLCPPNavigationHint": { + "definition": "SetLCPPNavigationHint( blink.mojom.LCPCriticalPathPredictorNavigationTimeHint hint);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=377" + }, + "content.mojom.WebTestRunTestConfiguration": { + "definition": "struct WebTestRunTestConfiguration { mojo_base.mojom.FilePath current_working_directory; mojo_base.mojom.FilePath temp_path; url.mojom.Url test_url; bool allow_external_pages; string expected_pixel_hash; bool wpt_print_mode; bool protocol_mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=20" + }, + "content.mojom.WebTestRendererDumpResult": { + "definition": "struct WebTestRendererDumpResult { array? audio; mojo_base.mojom.ByteString? layout; skia.mojom.BitmapN32? pixels; string actual_pixel_hash; gfx.mojom.Rect selection_rect;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=45" + }, + "content.mojom.WorkItemBackForward": { + "definition": "struct WorkItemBackForward { int32 distance;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=70" + }, + "content.mojom.WorkItemLoad": { + "definition": "struct WorkItemLoad { string url; string target;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=76" + }, + "content.mojom.WorkItemReload": { + "definition": "struct WorkItemReload {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=83" + }, + "content.mojom.WorkItemLoadingScript": { + "definition": "struct WorkItemLoadingScript { string script;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=86" + }, + "content.mojom.WorkItemNonLoadingScript": { + "definition": "struct WorkItemNonLoadingScript { string script;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=91" + }, + "content.mojom.AutoResponseMode": { + "definition": "enum AutoResponseMode { kNone = 0, kAutoAccept = 1, kAutoReject = 2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=347" + }, + "content.mojom.WorkItem": { + "definition": "union WorkItem { WorkItemBackForward back_forward; WorkItemLoad load; WorkItemReload reload; WorkItemLoadingScript loading_script; WorkItemNonLoadingScript non_loading_script;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test.mojom;l=95" + }, + "content.mojom.WebTestBluetoothFakeAdapterSetter.Set": { + "definition": "Set(string adapter_name) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:content/web_test/common/web_test_bluetooth_fake_adapter_setter.mojom;l=12" + }, + "bluetooth.mojom.Advertisement.Unregister": { + "definition": "[Sync] Unregister() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=98" + }, + "bluetooth.mojom.DiscoverySession.IsActive": { + "definition": "[Sync] IsActive() => (bool active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=113" + }, + "bluetooth.mojom.DiscoverySession.Stop": { + "definition": "[Sync] Stop() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=124" + }, + "bluetooth.mojom.Socket.Disconnect": { + "definition": "[Sync] Disconnect() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=140" + }, + "bluetooth.mojom.ServerSocket.Accept": { + "definition": "[Sync] Accept() => (AcceptConnectionResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=154" + }, + "bluetooth.mojom.ServerSocket.Disconnect": { + "definition": "[Sync] Disconnect() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=161" + }, + "bluetooth.mojom.GattService.CreateCharacteristic": { + "definition": "[Sync] CreateCharacteristic(UUID characteristic_uuid, GattCharacteristicPermissions permissions, GattCharacteristicProperties properties) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=180" + }, + "bluetooth.mojom.GattService.Register": { + "definition": "Register() => (GattServiceErrorCode? error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=190" + }, + "bluetooth.mojom.GattServiceObserver.OnLocalCharacteristicRead": { + "definition": "OnLocalCharacteristicRead(DeviceInfo remote_device, UUID characteristic_uuid, UUID service_uuid, uint32 offset) => (LocalCharacteristicReadResult read_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=200" + }, + "bluetooth.mojom.Adapter.ConnectToDevice": { + "definition": "ConnectToDevice(string address) => (ConnectResult result, pending_remote? device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=215" + }, + "bluetooth.mojom.Adapter.GetDevices": { + "definition": "GetDevices() => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=221" + }, + "bluetooth.mojom.Adapter.GetInfo": { + "definition": "[Sync] GetInfo() => (AdapterInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=224" + }, + "bluetooth.mojom.Adapter.AddObserver": { + "definition": "[Sync] AddObserver(pending_remote observer) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=228" + }, + "bluetooth.mojom.Adapter.RegisterAdvertisement": { + "definition": "[Sync] RegisterAdvertisement(UUID service_id, array service_data, bool use_scan_response, bool connectable) => (pending_remote? advertisement);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=252" + }, + "bluetooth.mojom.Adapter.SetDiscoverable": { + "definition": "[Sync] SetDiscoverable(bool discoverable) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=259" + }, + "bluetooth.mojom.Adapter.SetName": { + "definition": "[Sync] SetName(string name) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=265" + }, + "bluetooth.mojom.Adapter.StartDiscoverySession": { + "definition": "[Sync] StartDiscoverySession(string client_name) => (pending_remote? session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=270" + }, + "bluetooth.mojom.Adapter.ConnectToServiceInsecurely": { + "definition": "[Sync] ConnectToServiceInsecurely(string address, UUID service_uuid, bool should_unbond_on_error) => (ConnectToServiceResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=284" + }, + "bluetooth.mojom.Adapter.CreateRfcommServiceInsecurely": { + "definition": "[Sync] CreateRfcommServiceInsecurely(string service_name, UUID service_uuid) => (pending_remote? server_socket);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=294" + }, + "bluetooth.mojom.Adapter.CreateLocalGattService": { + "definition": "[Sync] CreateLocalGattService(UUID service_id, pending_remote observer) => (pending_remote gatt_service);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=304" + }, + "bluetooth.mojom.Adapter.IsLeScatternetDualRoleSupported": { + "definition": "[Sync] IsLeScatternetDualRoleSupported() => (bool is_supported);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=314" + }, + "bluetooth.mojom.AdapterObserver.PresentChanged": { + "definition": "PresentChanged(bool present);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=321" + }, + "bluetooth.mojom.AdapterObserver.PoweredChanged": { + "definition": "PoweredChanged(bool powered);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=324" + }, + "bluetooth.mojom.AdapterObserver.DiscoverableChanged": { + "definition": "DiscoverableChanged(bool discoverable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=327" + }, + "bluetooth.mojom.AdapterObserver.DiscoveringChanged": { + "definition": "DiscoveringChanged(bool discovering);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=330" + }, + "bluetooth.mojom.AdapterObserver.DeviceAdded": { + "definition": "DeviceAdded(DeviceInfo device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=333" + }, + "bluetooth.mojom.AdapterObserver.DeviceChanged": { + "definition": "DeviceChanged(DeviceInfo device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=342" + }, + "bluetooth.mojom.AdapterObserver.DeviceRemoved": { + "definition": "DeviceRemoved(DeviceInfo device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=345" + }, + "bluetooth.mojom.ConnectToServiceResult": { + "definition": "struct ConnectToServiceResult { pending_remote socket; handle receive_stream; handle send_stream;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=54" + }, + "bluetooth.mojom.AcceptConnectionResult": { + "definition": "struct AcceptConnectionResult { DeviceInfo device; pending_remote socket; handle receive_stream; handle send_stream;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=61" + }, + "bluetooth.mojom.AdapterInfo": { + "definition": "struct AdapterInfo { string address; string name; string system_name; bool floss; bool extended_advertisement_support; bool initialized; bool present; bool powered; bool discoverable; bool discovering;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=68" + }, + "bluetooth.mojom.ConnectResult": { + "definition": "enum ConnectResult { SUCCESS, AUTH_CANCELED, AUTH_FAILED, AUTH_REJECTED, AUTH_TIMEOUT, FAILED, INPROGRESS, UNKNOWN, UNSUPPORTED_DEVICE, DEVICE_NO_LONGER_IN_RANGE, NOT_READY, ALREADY_CONNECTED, ALREADY_EXISTS, NOT_CONNECTED, DOES_NOT_EXIST, INVALID_ARGS, NON_AUTH_TIMEOUT, NO_MEMORY, JNI_ENVIRONMENT, JNI_THREAD_ATTACH, WAKELOCK, UNEXPECTED_STATE, SOCKET,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=21" + }, + "bluetooth.mojom.LocalCharacteristicReadResult": { + "definition": "union LocalCharacteristicReadResult { GattServiceErrorCode error_code; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/adapter.mojom;l=48" + }, + "bluetooth.mojom.Device.Disconnect": { + "definition": "Disconnect();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=122" + }, + "bluetooth.mojom.Device.GetInfo": { + "definition": "GetInfo() => (DeviceInfo? info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=126" + }, + "bluetooth.mojom.Device.GetServices": { + "definition": "GetServices() => (array services);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=129" + }, + "bluetooth.mojom.Device.GetCharacteristics": { + "definition": "GetCharacteristics(string service_id) => (array? characteristics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=135" + }, + "bluetooth.mojom.Device.ReadValueForCharacteristic": { + "definition": "ReadValueForCharacteristic(string service_id, string characteristic_id) => (GattResult result, array? value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=140" + }, + "bluetooth.mojom.Device.WriteValueForCharacteristic": { + "definition": "WriteValueForCharacteristic(string service_id, string characteristic_id, array value) => (GattResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=145" + }, + "bluetooth.mojom.Device.GetDescriptors": { + "definition": "GetDescriptors(string service_id, string characteristic_id) => (array? descriptors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=153" + }, + "bluetooth.mojom.Device.ReadValueForDescriptor": { + "definition": "ReadValueForDescriptor(string service_id, string characteristic_id, string descriptor_id) => (GattResult result, array? value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=161" + }, + "bluetooth.mojom.Device.WriteValueForDescriptor": { + "definition": "WriteValueForDescriptor(string service_id, string characteristic_id, string descriptor_id, array value) => (GattResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=169" + }, + "bluetooth.mojom.RSSIWrapper": { + "definition": "struct RSSIWrapper { int8 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=67" + }, + "bluetooth.mojom.DeviceInfo": { + "definition": "struct DeviceInfo { string? name; string name_for_display; string address; bool is_gatt_connected; RSSIWrapper? rssi; array service_uuids; map> manufacturer_data_map; map> service_data_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=71" + }, + "bluetooth.mojom.ServiceInfo": { + "definition": "struct ServiceInfo { string id; UUID uuid; bool is_primary;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=90" + }, + "bluetooth.mojom.CharacteristicInfo": { + "definition": "struct CharacteristicInfo { string id; UUID uuid; uint32 properties; uint32 permissions; array last_known_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=96" + }, + "bluetooth.mojom.DescriptorInfo": { + "definition": "struct DescriptorInfo { string id; UUID uuid; array last_known_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=111" + }, + "bluetooth.mojom.Property": { + "definition": "enum Property { NONE = 0, BROADCAST = 1, READ = 2, WRITE_WITHOUT_RESPONSE = 4, WRITE = 8, NOTIFY = 16, INDICATE = 32, AUTHENTICATED_SIGNED_WRITES = 64, EXTENDED_PROPERTIES = 128, RELIABLE_WRITE = 256, WRITABLE_AUXILIARIES = 512, READ_ENCRYPTED = 1024, WRITE_ENCRYPTED = 2048, READ_ENCRYPTED_AUTHENTICATED = 4096, WRITE_ENCRYPTED_AUTHENTICATED = 8192};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=26" + }, + "bluetooth.mojom.GattResult": { + "definition": "enum GattResult { SUCCESS, UNKNOWN, FAILED, IN_PROGRESS, INVALID_LENGTH, NOT_PERMITTED, NOT_AUTHORIZED, NOT_PAIRED, NOT_SUPPORTED, SERVICE_NOT_FOUND, CHARACTERISTIC_NOT_FOUND, DESCRIPTOR_NOT_FOUND,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/device.mojom;l=50" + }, + "bluetooth.mojom.FakeBluetooth.SetLESupported": { + "definition": "SetLESupported(bool available) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=111" + }, + "bluetooth.mojom.FakeBluetooth.SimulateCentral": { + "definition": "SimulateCentral(CentralState state) => (pending_remote fake_central);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=114" + }, + "bluetooth.mojom.FakeBluetooth.AllResponsesConsumed": { + "definition": "AllResponsesConsumed() => (bool consumed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=129" + }, + "bluetooth.mojom.FakeCentral.SimulatePreconnectedPeripheral": { + "definition": "SimulatePreconnectedPeripheral(string address, string name, map> manufacturer_data, array known_service_uuids) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=173" + }, + "bluetooth.mojom.FakeCentral.SimulateAdvertisementReceived": { + "definition": "SimulateAdvertisementReceived(ScanResult result) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=182" + }, + "bluetooth.mojom.FakeCentral.SetState": { + "definition": "SetState(CentralState state) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=185" + }, + "bluetooth.mojom.FakeCentral.SetNextGATTConnectionResponse": { + "definition": "SetNextGATTConnectionResponse(string address, uint16 code) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=195" + }, + "bluetooth.mojom.FakeCentral.SetNextGATTDiscoveryResponse": { + "definition": "SetNextGATTDiscoveryResponse(string address, uint16 code) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=215" + }, + "bluetooth.mojom.FakeCentral.SimulateGATTOperationResponse": { + "definition": "SimulateGATTOperationResponse( GATTOperationType type, string address, uint16 code) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=219" + }, + "bluetooth.mojom.FakeCentral.SimulateGATTDisconnection": { + "definition": "SimulateGATTDisconnection(string address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=227" + }, + "bluetooth.mojom.FakeCentral.SimulateGATTServicesChanged": { + "definition": "SimulateGATTServicesChanged(string address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=239" + }, + "bluetooth.mojom.FakeCentral.SimulateCharacteristicOperationResponse": { + "definition": "SimulateCharacteristicOperationResponse( CharacteristicOperationType type, string characteristic_id, string service_id, string peripheral_address, uint16 code, array? data) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=244" + }, + "bluetooth.mojom.FakeCentral.SimulateDescriptorOperationResponse": { + "definition": "SimulateDescriptorOperationResponse( DescriptorOperationType type, string descriptor_id, string characteristic_id, string service_id, string peripheral_address, uint16 code, array? data) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=256" + }, + "bluetooth.mojom.FakeCentral.AddFakeService": { + "definition": "AddFakeService(string peripheral_address, UUID service_uuid) => (string? service_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=269" + }, + "bluetooth.mojom.FakeCentral.RemoveFakeService": { + "definition": "RemoveFakeService(string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=274" + }, + "bluetooth.mojom.FakeCentral.AddFakeCharacteristic": { + "definition": "AddFakeCharacteristic( UUID characteristic_uuid, CharacteristicProperties properties, string service_id, string peripheral_address) => (string? characteristic_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=282" + }, + "bluetooth.mojom.FakeCentral.RemoveFakeCharacteristic": { + "definition": "RemoveFakeCharacteristic( string identifier, string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=290" + }, + "bluetooth.mojom.FakeCentral.AddFakeDescriptor": { + "definition": "AddFakeDescriptor(UUID descriptor_uuid, string characteristic_id, string service_id, string peripheral_address) => (string? descriptor_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=300" + }, + "bluetooth.mojom.FakeCentral.RemoveFakeDescriptor": { + "definition": "RemoveFakeDescriptor( string descriptor_id, string characteristic_id, string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=308" + }, + "bluetooth.mojom.FakeCentral.SetNextReadCharacteristicResponse": { + "definition": "SetNextReadCharacteristicResponse(uint16 gatt_code, array? value, string characteristic_id, string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=323" + }, + "bluetooth.mojom.FakeCentral.SetNextWriteCharacteristicResponse": { + "definition": "SetNextWriteCharacteristicResponse( uint16 gatt_code, string characteristic_id, string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=338" + }, + "bluetooth.mojom.FakeCentral.SetNextSubscribeToNotificationsResponse": { + "definition": "SetNextSubscribeToNotificationsResponse( uint16 gatt_code, string characteristic_id, string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=352" + }, + "bluetooth.mojom.FakeCentral.SetNextUnsubscribeFromNotificationsResponse": { + "definition": "SetNextUnsubscribeFromNotificationsResponse( uint16 gatt_code, string characteristic_id, string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=366" + }, + "bluetooth.mojom.FakeCentral.IsNotifying": { + "definition": "IsNotifying(string characteristic_id, string service_id, string peripheral_address) => (bool success, bool is_notifying);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=376" + }, + "bluetooth.mojom.FakeCentral.GetLastWrittenCharacteristicValue": { + "definition": "GetLastWrittenCharacteristicValue( string characteristic_id, string service_id, string peripheral_address) => (bool success, array? value, WriteType write_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=385" + }, + "bluetooth.mojom.FakeCentral.SetNextReadDescriptorResponse": { + "definition": "SetNextReadDescriptorResponse( uint16 gatt_code, array? value, string descriptor_id, string characteristic_id, string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=400" + }, + "bluetooth.mojom.FakeCentral.SetNextWriteDescriptorResponse": { + "definition": "SetNextWriteDescriptorResponse( uint16 gatt_code, string descriptor_id, string characteristic_id, string service_id, string peripheral_address) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=416" + }, + "bluetooth.mojom.FakeCentral.GetLastWrittenDescriptorValue": { + "definition": "GetLastWrittenDescriptorValue( string descriptor_id, string characteristic_id, string service_id, string peripheral_address) => (bool success, array? value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=428" + }, + "bluetooth.mojom.FakeCentral.SetClient": { + "definition": "SetClient( pending_associated_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=436" + }, + "bluetooth.mojom.FakeCentralClient.DispatchGATTOperationEvent": { + "definition": "DispatchGATTOperationEvent(GATTOperationType type, string peripheral_address);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=444" + }, + "bluetooth.mojom.FakeCentralClient.DispatchCharacteristicOperationEvent": { + "definition": "DispatchCharacteristicOperationEvent( CharacteristicOperationType type, array? data, WriteType? write_type, string characteristic_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=448" + }, + "bluetooth.mojom.FakeCentralClient.DispatchDescriptorOperationEvent": { + "definition": "DispatchDescriptorOperationEvent( DescriptorOperationType type, array? data, string descriptor_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=455" + }, + "bluetooth.mojom.Appearance": { + "definition": "struct Appearance { bool has_value; int8 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=70" + }, + "bluetooth.mojom.Power": { + "definition": "struct Power { bool has_value; int8 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=76" + }, + "bluetooth.mojom.ServiceDataMap": { + "definition": "struct ServiceDataMap { map> service_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=81" + }, + "bluetooth.mojom.ScanRecord": { + "definition": "struct ScanRecord { string? name; array? uuids; Appearance appearance; Power tx_power; map>? manufacturer_data; ServiceDataMap? service_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=86" + }, + "bluetooth.mojom.ScanResult": { + "definition": "struct ScanResult { string device_address; int8 rssi; ScanRecord scan_record;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=99" + }, + "bluetooth.mojom.CharacteristicProperties": { + "definition": "struct CharacteristicProperties { bool broadcast; bool read; bool write_without_response; bool write; bool notify; bool indicate; bool authenticated_signed_writes; bool extended_properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=141" + }, + "bluetooth.mojom.CentralState": { + "definition": "enum CentralState { ABSENT, POWERED_ON, POWERED_OFF,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=35" + }, + "bluetooth.mojom.WriteType": { + "definition": "enum WriteType { kNone, kWriteDefaultDeprecated, kWriteWithResponse, kWriteWithoutResponse,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=42" + }, + "bluetooth.mojom.GATTOperationType": { + "definition": "enum GATTOperationType { kConnect, kDiscovery,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=50" + }, + "bluetooth.mojom.CharacteristicOperationType": { + "definition": "enum CharacteristicOperationType { kRead, kWrite, kSubscribeToNotifications, kUnsubscribeFromNotifications,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=56" + }, + "bluetooth.mojom.DescriptorOperationType": { + "definition": "enum DescriptorOperationType { kRead, kWrite,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/emulation/fake_bluetooth.mojom;l=64" + }, + "bluetooth.mojom.GattCharacteristicPermissions": { + "definition": "struct GattCharacteristicPermissions { bool read; bool write; bool read_encrypted; bool write_encrypted; bool read_encrypted_authenticated; bool write_encrypted_authenticated;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/gatt_characteristic_permissions.mojom;l=11" + }, + "bluetooth.mojom.GattCharacteristicProperties": { + "definition": "struct GattCharacteristicProperties { bool broadcast; bool read; bool write_without_response; bool write; bool notify; bool indicate; bool authenticated_signed_writes; bool extended_properties; bool reliable_write; bool writable_auxiliaries; bool read_encrypted; bool write_encrypted; bool read_encrypted_authenticated; bool write_encrypted_authenticated;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/gatt_characteristic_properties.mojom;l=11" + }, + "bluetooth.mojom.GattServiceErrorCode": { + "definition": "enum GattServiceErrorCode { kUnknown, kFailed, kInProgress, kInvalidLength, kNotPermitted, kNotAuthorized, kNotPaired, kNotSupported,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/gatt_service_error_code.mojom;l=11" + }, + "bluetooth.mojom.UUID": { + "definition": "struct UUID { string uuid;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/bluetooth/public/mojom/uuid.mojom;l=7" + }, + "device.mojom.GamepadObserver.GamepadConnected": { + "definition": "GamepadConnected(uint32 index, Gamepad gamepad);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=91" + }, + "device.mojom.GamepadObserver.GamepadDisconnected": { + "definition": "GamepadDisconnected(uint32 index, Gamepad gamepad);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=96" + }, + "device.mojom.GamepadMonitor.GamepadStartPolling": { + "definition": "[Sync] GamepadStartPolling() => (mojo_base.mojom.ReadOnlySharedMemoryRegion memory_region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=104" + }, + "device.mojom.GamepadMonitor.GamepadStopPolling": { + "definition": "[Sync] GamepadStopPolling() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=107" + }, + "device.mojom.GamepadMonitor.SetObserver": { + "definition": "SetObserver(pending_remote gamepad_observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=110" + }, + "device.mojom.GamepadHapticsManager.PlayVibrationEffectOnce": { + "definition": "PlayVibrationEffectOnce(uint32 pad_index, GamepadHapticEffectType type, GamepadEffectParameters params) => (GamepadHapticsResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=132" + }, + "device.mojom.GamepadHapticsManager.ResetVibrationActuator": { + "definition": "ResetVibrationActuator(uint32 pad_index) => (GamepadHapticsResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=136" + }, + "device.mojom.GamepadQuaternion": { + "definition": "struct GamepadQuaternion { float x; float y; float z; float w;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=9" + }, + "device.mojom.GamepadVector": { + "definition": "struct GamepadVector { float x; float y; float z;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=16" + }, + "device.mojom.GamepadButton": { + "definition": "struct GamepadButton { bool pressed; bool touched; double value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=22" + }, + "device.mojom.GamepadTouch": { + "definition": "struct GamepadTouch { uint32 touch_id; uint8 surface_id; double x; double y; uint32 surface_height; uint32 surface_width; bool has_surface_dimensions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=34" + }, + "device.mojom.GamepadPose": { + "definition": "struct GamepadPose { GamepadQuaternion? orientation; GamepadVector? position; GamepadVector? angular_velocity; GamepadVector? linear_velocity; GamepadVector? angular_acceleration; GamepadVector? linear_acceleration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=44" + }, + "device.mojom.GamepadHapticActuator": { + "definition": "struct GamepadHapticActuator { GamepadHapticActuatorType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=70" + }, + "device.mojom.Gamepad": { + "definition": "struct Gamepad { bool connected; array id; int64 timestamp; array axes; array buttons; GamepadHapticActuator? vibration_actuator; GamepadMapping mapping; GamepadPose? pose; GamepadHand hand; array touch_events; uint32 display_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=74" + }, + "device.mojom.GamepadEffectParameters": { + "definition": "struct GamepadEffectParameters { double duration; double start_delay; double strong_magnitude; double weak_magnitude; double left_trigger; double right_trigger;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=114" + }, + "device.mojom.GamepadMapping": { + "definition": "enum GamepadMapping { GamepadMappingNone = 0, GamepadMappingStandard = 1, GamepadMappingXRStandard = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=28" + }, + "device.mojom.GamepadHand": { + "definition": "enum GamepadHand { GamepadHandNone = 0, GamepadHandLeft = 1, GamepadHandRight = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=53" + }, + "device.mojom.GamepadHapticActuatorType": { + "definition": "enum GamepadHapticActuatorType { GamepadHapticActuatorTypeVibration = 0, GamepadHapticActuatorTypeDualRumble = 1, GamepadHapticActuatorTypeTriggerRumble = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=59" + }, + "device.mojom.GamepadHapticEffectType": { + "definition": "enum GamepadHapticEffectType { GamepadHapticEffectTypeDualRumble = 0, GamepadHapticEffectTypeTriggerRumble = 1};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=65" + }, + "device.mojom.GamepadHapticsResult": { + "definition": "enum GamepadHapticsResult { GamepadHapticsResultError = 0, GamepadHapticsResultComplete = 1, GamepadHapticsResultPreempted = 2, GamepadHapticsResultInvalidParameter = 3, GamepadHapticsResultNotSupported = 4};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/gamepad/public/mojom/gamepad.mojom;l=123" + }, + "device.mojom.XRSessionController.SetFrameDataRestricted": { + "definition": "SetFrameDataRestricted(bool restricted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=29" + }, + "device.mojom.XRRuntimeEventListener.OnVisibilityStateChanged": { + "definition": "OnVisibilityStateChanged(device.mojom.XRVisibilityState visibility_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=37" + }, + "device.mojom.XRRuntimeEventListener.OnExitPresent": { + "definition": "OnExitPresent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=40" + }, + "device.mojom.XRRuntime.RequestSession": { + "definition": "RequestSession(XRRuntimeSessionOptions options) => ( XRRuntimeSessionResult? session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=101" + }, + "device.mojom.XRRuntime.ShutdownSession": { + "definition": "ShutdownSession() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=106" + }, + "device.mojom.XRRuntime.ListenToDeviceChanges": { + "definition": "ListenToDeviceChanges( pending_associated_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=109" + }, + "device.mojom.ImmersiveOverlay.RequestNextOverlayPose": { + "definition": "RequestNextOverlayPose() => (XRRenderInfo render_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=119" + }, + "device.mojom.ImmersiveOverlay.SubmitOverlayTexture": { + "definition": "SubmitOverlayTexture(int16 frame_id, gfx.mojom.GpuMemoryBufferHandle texture, gpu.mojom.SyncToken sync_token, gfx.mojom.RectF left_bounds, gfx.mojom.RectF right_bounds) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=124" + }, + "device.mojom.ImmersiveOverlay.SetOverlayAndWebXRVisibility": { + "definition": "SetOverlayAndWebXRVisibility(bool overlay_visible, bool webxr_visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=129" + }, + "device.mojom.ImmersiveOverlay.RequestNotificationOnWebXrSubmitted": { + "definition": "RequestNotificationOnWebXrSubmitted() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=138" + }, + "device.mojom.IsolatedXRRuntimeProviderClient.OnDeviceAdded": { + "definition": "OnDeviceAdded(pending_remote runtime, XRDeviceData device_data, device.mojom.XRDeviceId device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=159" + }, + "device.mojom.IsolatedXRRuntimeProviderClient.OnDeviceRemoved": { + "definition": "OnDeviceRemoved(device.mojom.XRDeviceId device_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=167" + }, + "device.mojom.IsolatedXRRuntimeProviderClient.OnDevicesEnumerated": { + "definition": "OnDevicesEnumerated();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=172" + }, + "device.mojom.IsolatedXRRuntimeProvider.RequestDevices": { + "definition": "RequestDevices(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=181" + }, + "device.mojom.XRDeviceService.BindRuntimeProvider": { + "definition": "BindRuntimeProvider(pending_receiver receiver, pending_remote host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=195" + }, + "device.mojom.XRDeviceService.BindTestHook": { + "definition": "BindTestHook(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=200" + }, + "device.mojom.XRDeviceServiceHost.BindGpu": { + "definition": "BindGpu(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=208" + }, + "device.mojom.XRRuntimeSessionOptions": { + "definition": "struct XRRuntimeSessionOptions { XRSessionMode mode; array required_features; array optional_features; int32 render_process_id; int32 render_frame_id; array tracked_images; XRDepthOptions? depth_options; uint64 trace_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=43" + }, + "device.mojom.XRRuntimeSessionResult": { + "definition": "struct XRRuntimeSessionResult { pending_remote controller; XRSession session; viz.mojom.FrameSinkId? frame_sink_id; pending_remote? overlay;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=70" + }, + "device.mojom.XRDeviceData": { + "definition": "struct XRDeviceData { array supported_features; [EnableIf=is_win] gpu.mojom.Luid? luid; bool is_ar_blend_mode_supported;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/isolated_xr_service.mojom;l=143" + }, + "device.mojom.OpenXrInteractionProfileType": { + "definition": "enum OpenXrInteractionProfileType { kMicrosoftMotion = 0, kKHRSimple = 1, kOculusTouch = 2, kValveIndex = 3, kHTCVive = 4, kSamsungOdyssey = 5, kHPReverbG2 = 6, kHandSelectGrasp = 7, kViveCosmos = 8, kExtHand = 9, kMetaHandAim = 10, kInvalid,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/openxr_interaction_profile_type.mojom;l=15" + }, + "device_test.mojom.XRTestHook.OnFrameSubmitted": { + "definition": "[Sync] OnFrameSubmitted(array frame_data) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=94" + }, + "device_test.mojom.XRTestHook.WaitGetDeviceConfig": { + "definition": "[Sync] WaitGetDeviceConfig() => (DeviceConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=98" + }, + "device_test.mojom.XRTestHook.WaitGetPresentingPose": { + "definition": "[Sync] WaitGetPresentingPose() => (gfx.mojom.Transform? data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=102" + }, + "device_test.mojom.XRTestHook.WaitGetMagicWindowPose": { + "definition": "[Sync] WaitGetMagicWindowPose() => (gfx.mojom.Transform? data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=106" + }, + "device_test.mojom.XRTestHook.WaitGetControllerRoleForTrackedDeviceIndex": { + "definition": "[Sync] WaitGetControllerRoleForTrackedDeviceIndex(uint32 index) => (ControllerRole role);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=111" + }, + "device_test.mojom.XRTestHook.WaitGetControllerData": { + "definition": "[Sync] WaitGetControllerData(uint32 index) => (ControllerFrameData data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=117" + }, + "device_test.mojom.XRTestHook.WaitGetEventData": { + "definition": "[Sync] WaitGetEventData() => (EventData data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=120" + }, + "device_test.mojom.XRTestHook.WaitGetCanCreateSession": { + "definition": "[Sync] WaitGetCanCreateSession() => (bool can_create_session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=123" + }, + "device_test.mojom.XRTestHook.WaitGetVisibilityMask": { + "definition": "[Sync] WaitGetVisibilityMask(uint32 view_index) => (XRVisibilityMask? mask);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=126" + }, + "device_test.mojom.XRServiceTestHook.SetTestHook": { + "definition": "[Sync] SetTestHook(pending_remote? hook) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=143" + }, + "device_test.mojom.XRServiceTestHook.TerminateDeviceServiceProcessForTesting": { + "definition": "[Sync] TerminateDeviceServiceProcessForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=148" + }, + "device_test.mojom.Color": { + "definition": "struct Color { uint8 r; uint8 g; uint8 b; uint8 a;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=12" + }, + "device_test.mojom.ViewData": { + "definition": "struct ViewData { Color color; Eye eye; gfx.mojom.Rect viewport;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=25" + }, + "device_test.mojom.DeviceConfig": { + "definition": "struct DeviceConfig { float interpupillary_distance; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=31" + }, + "device_test.mojom.ControllerAxisData": { + "definition": "struct ControllerAxisData { float x; float y; uint8 axis_type; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=35" + }, + "device_test.mojom.ControllerFrameData": { + "definition": "struct ControllerFrameData { uint32 packet_number; uint64 buttons_pressed; uint64 buttons_touched; uint64 supported_buttons; array axis_data; gfx.mojom.Transform? pose_data; ControllerRole role = kControllerRoleInvalid; device.mojom.XRHandTrackingData? hand_data; bool is_valid;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=48" + }, + "device_test.mojom.EventData": { + "definition": "struct EventData { EventType type = kNoEvent; device.mojom.OpenXrInteractionProfileType interaction_profile = kInvalid;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=70" + }, + "device_test.mojom.XRVisibilityMask": { + "definition": "struct XRVisibilityMask { array vertices; array indices;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=77" + }, + "device_test.mojom.Eye": { + "definition": "enum Eye { LEFT = 1, RIGHT = 2, NONE = 3};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=19" + }, + "device_test.mojom.ControllerRole": { + "definition": "enum ControllerRole { kControllerRoleInvalid, kControllerRoleLeft, kControllerRoleRight, kControllerRoleVoice };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=41" + }, + "device_test.mojom.EventType": { + "definition": "enum EventType { kSessionLost, kVisibilityVisibleBlurred, kInstanceLost, kInteractionProfileChanged, kNoEvent};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/test/browser_test_interfaces.mojom;l=61" + }, + "device.mojom.VRService.SetClient": { + "definition": "SetClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=939" + }, + "device.mojom.VRService.RequestSession": { + "definition": "RequestSession(XRSessionOptions options) => (RequestSessionResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=943" + }, + "device.mojom.VRService.SupportsSession": { + "definition": "SupportsSession(XRSessionOptions options) => (bool supports_session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=944" + }, + "device.mojom.VRService.ExitPresent": { + "definition": "ExitPresent() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=949" + }, + "device.mojom.VRService.SetFramesThrottled": { + "definition": "SetFramesThrottled(bool throttled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=958" + }, + "device.mojom.VRService.MakeXrCompatible": { + "definition": "[Sync] MakeXrCompatible() => (XrCompatibleResult xr_compatible_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=968" + }, + "device.mojom.XRSessionMetricsRecorder.ReportFeatureUsed": { + "definition": "ReportFeatureUsed(XRSessionFeature feature);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=978" + }, + "device.mojom.VRServiceClient.OnDeviceChanged": { + "definition": "OnDeviceChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=985" + }, + "device.mojom.XREnvironmentIntegrationProvider.SubscribeToHitTest": { + "definition": "SubscribeToHitTest( XRNativeOriginInformation native_origin_information, array entity_types, XRRay ray) => (HitTestSubscriptionId? subscription_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1015" + }, + "device.mojom.XREnvironmentIntegrationProvider.SubscribeToHitTestForTransientInput": { + "definition": "SubscribeToHitTestForTransientInput( string profile_name, array entity_types, XRRay ray) => (HitTestSubscriptionId? subscription_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1037" + }, + "device.mojom.XREnvironmentIntegrationProvider.UnsubscribeFromHitTest": { + "definition": "UnsubscribeFromHitTest(HitTestSubscriptionId subscription_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1047" + }, + "device.mojom.XREnvironmentIntegrationProvider.CreateAnchor": { + "definition": "CreateAnchor( XRNativeOriginInformation native_origin_information, Pose native_origin_from_anchor, PlaneId? plane_id) => (AnchorId? anchor_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1060" + }, + "device.mojom.XREnvironmentIntegrationProvider.DetachAnchor": { + "definition": "DetachAnchor(AnchorId anchor_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1069" + }, + "device.mojom.XRFrameDataProvider.GetFrameData": { + "definition": "GetFrameData(XRFrameDataRequestOptions? options) => (XRFrameData? frame_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1101" + }, + "device.mojom.XRFrameDataProvider.GetEnvironmentIntegrationProvider": { + "definition": "GetEnvironmentIntegrationProvider( pending_associated_receiver environment_provider);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1102" + }, + "device.mojom.XRPresentationProvider.UpdateLayerBounds": { + "definition": "UpdateLayerBounds(int16 frame_id, gfx.mojom.RectF left_bounds, gfx.mojom.RectF right_bounds, gfx.mojom.Size source_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1113" + }, + "device.mojom.XRPresentationProvider.SubmitFrameMissing": { + "definition": "SubmitFrameMissing(int16 frame_id, gpu.mojom.SyncToken sync_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1124" + }, + "device.mojom.XRPresentationProvider.SubmitFrame": { + "definition": "SubmitFrame(int16 frame_id, gpu.mojom.MailboxHolder mailbox_holder, mojo_base.mojom.TimeDelta time_waited);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1127" + }, + "device.mojom.XRPresentationProvider.SubmitFrameWithTextureHandle": { + "definition": "[EnableIf=is_win] SubmitFrameWithTextureHandle(int16 frame_id, handle texture, gpu.mojom.SyncToken sync_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1132" + }, + "device.mojom.XRPresentationProvider.SubmitFrameDrawnIntoTexture": { + "definition": "SubmitFrameDrawnIntoTexture(int16 frame_id, array layer_ids, gpu.mojom.SyncToken sync_token, mojo_base.mojom.TimeDelta time_waited);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1141" + }, + "device.mojom.XRPresentationClient.OnSubmitFrameTransferred": { + "definition": "OnSubmitFrameTransferred(bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1165" + }, + "device.mojom.XRPresentationClient.OnSubmitFrameRendered": { + "definition": "OnSubmitFrameRendered();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1171" + }, + "device.mojom.XRPresentationClient.OnSubmitFrameGpuFence": { + "definition": "OnSubmitFrameGpuFence(gfx.mojom.GpuFenceHandle gpu_fence_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1177" + }, + "device.mojom.XRSessionClient.OnExitPresent": { + "definition": "OnExitPresent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1191" + }, + "device.mojom.XRSessionClient.OnVisibilityStateChanged": { + "definition": "OnVisibilityStateChanged(XRVisibilityState visibility_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1193" + }, + "device.mojom.XRLayerManager.CreateCompositionLayer": { + "definition": "CreateCompositionLayer(XRCompositionLayerData create_data) => (CreateCompositionLayerResult code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1203" + }, + "device.mojom.XRLayerManager.DestroyCompositionLayer": { + "definition": "DestroyCompositionLayer(LayerId layer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1207" + }, + "device.mojom.XRLayerManager.UpdateCompositionLayer": { + "definition": "UpdateCompositionLayer(LayerId layer_id, XRLayerMutableData update_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1212" + }, + "device.mojom.XRLayerManager.SetEnabledCompositionLayers": { + "definition": "SetEnabledCompositionLayers(array layer_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1218" + }, + "device.mojom.WebXrInternalsRendererListener.OnFrameData": { + "definition": "OnFrameData(device.mojom.XrFrameStatistics xrframe_statistics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1226" + }, + "device.mojom.WebXrInternalsRendererListener.OnConsoleLog": { + "definition": "OnConsoleLog(device.mojom.XrLogMessage xrlogging_statistics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1230" + }, + "device.mojom.XRDepthConfig": { + "definition": "struct XRDepthConfig { XRDepthUsage depth_usage; XRDepthDataFormat depth_data_format; XRDepthType? depth_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=72" + }, + "device.mojom.XRSessionDeviceConfig": { + "definition": "struct XRSessionDeviceConfig { float default_framebuffer_scale = 1.0; array views; bool supports_viewport_scaling; bool enable_anti_aliasing = true; XRDepthConfig? depth_configuration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=82" + }, + "device.mojom.XRSession": { + "definition": "struct XRSession { pending_remote data_provider; pending_remote? layer_manager; pending_receiver? client_receiver; XRPresentationConnection? submit_frame_sink; array enabled_features; XRSessionDeviceConfig device_config; XREnvironmentBlendMode enviroment_blend_mode; XRInteractionMode interaction_mode; [EnableIf=is_android] bool wants_fullscreen = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=120" + }, + "device.mojom.XRPresentationConnection": { + "definition": "struct XRPresentationConnection { pending_remote provider; pending_receiver client_receiver; XRPresentationTransportOptions transport_options;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=148" + }, + "device.mojom.XRInputSourceDescription": { + "definition": "struct XRInputSourceDescription { XRTargetRayMode target_ray_mode; XRHandedness handedness; gfx.mojom.Transform? input_from_pointer; array profiles;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=154" + }, + "device.mojom.XRInputSourceState": { + "definition": "struct XRInputSourceState { uint32 source_id; XRInputSourceDescription? description; gfx.mojom.Transform? mojo_from_input; bool emulated_position; bool is_auxiliary; bool primary_input_pressed; bool primary_input_clicked; bool primary_squeeze_pressed; bool primary_squeeze_clicked; Gamepad? gamepad; gfx.mojom.PointF? overlay_pointer_position; XRHandTrackingData? hand_tracking_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=175" + }, + "device.mojom.VRFieldOfView": { + "definition": "struct VRFieldOfView { float up_degrees; float down_degrees; float left_degrees; float right_degrees;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=252" + }, + "device.mojom.VRPose": { + "definition": "struct VRPose { gfx.mojom.Quaternion? orientation; gfx.mojom.Point3F? position; bool emulated_position;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=262" + }, + "device.mojom.Pose": { + "definition": "struct Pose { gfx.mojom.Quaternion orientation; gfx.mojom.Point3F position;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=273" + }, + "device.mojom.AnchorId": { + "definition": "struct AnchorId { uint64 id_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=278" + }, + "device.mojom.HitTestSubscriptionId": { + "definition": "struct HitTestSubscriptionId { uint64 id_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=282" + }, + "device.mojom.PlaneId": { + "definition": "struct PlaneId { uint64 id_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=286" + }, + "device.mojom.XrVisibilityMaskId": { + "definition": "struct XrVisibilityMaskId { uint64 id_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=290" + }, + "device.mojom.XRRay": { + "definition": "struct XRRay { gfx.mojom.Point3F origin; gfx.mojom.Vector3dF direction;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=295" + }, + "device.mojom.XRHitResult": { + "definition": "struct XRHitResult { Pose mojo_from_result; PlaneId? plane_id; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=300" + }, + "device.mojom.XRViewGeometry": { + "definition": "struct XRViewGeometry { VRFieldOfView field_of_view; gfx.mojom.Transform mojo_from_view;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=322" + }, + "device.mojom.XRVisibilityMask": { + "definition": "struct XRVisibilityMask { array vertices; array unvalidated_indices;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=351" + }, + "device.mojom.XRView": { + "definition": "struct XRView { XREye eye; XRViewGeometry geometry; gfx.mojom.Rect viewport; XRDepthData? depth_data; bool is_first_person_observer = false; XRVisibilityMask? visibility_mask; XrVisibilityMaskId visibility_mask_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=365" + }, + "device.mojom.VRStageParameters": { + "definition": "struct VRStageParameters { gfx.mojom.Transform mojo_from_stage; array? bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=397" + }, + "device.mojom.XRPresentationTransportOptions": { + "definition": "struct XRPresentationTransportOptions { XRPresentationTransportMethod transport_method; bool wait_for_transfer_notification; bool wait_for_render_notification; bool wait_for_gpu_fence;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=426" + }, + "device.mojom.XRInputSourceSpaceInfo": { + "definition": "struct XRInputSourceSpaceInfo { uint32 input_source_id; XRInputSourceSpaceType input_source_space_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=475" + }, + "device.mojom.XRHandJointSpaceInfo": { + "definition": "struct XRHandJointSpaceInfo { XRHandedness handedness; XRHandJoint joint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=483" + }, + "device.mojom.XRPlanePointData": { + "definition": "struct XRPlanePointData { float x; float z;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=494" + }, + "device.mojom.XRPlaneData": { + "definition": "struct XRPlaneData { PlaneId id; XRPlaneOrientation orientation; Pose? mojo_from_plane; array polygon;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=501" + }, + "device.mojom.XRPlaneDetectionData": { + "definition": "struct XRPlaneDetectionData { array all_planes_ids; array updated_planes_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=523" + }, + "device.mojom.XRAnchorData": { + "definition": "struct XRAnchorData { AnchorId id; Pose? mojo_from_anchor;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=538" + }, + "device.mojom.XRAnchorsData": { + "definition": "struct XRAnchorsData { array all_anchors_ids; array updated_anchors_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=552" + }, + "device.mojom.XRHitTestSubscriptionResultData": { + "definition": "struct XRHitTestSubscriptionResultData { HitTestSubscriptionId subscription_id; array hit_test_results;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=565" + }, + "device.mojom.XRHitTestTransientInputSubscriptionResultData": { + "definition": "struct XRHitTestTransientInputSubscriptionResultData { HitTestSubscriptionId subscription_id; map> input_source_id_to_hit_test_results;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=573" + }, + "device.mojom.XRHitTestSubscriptionResultsData": { + "definition": "struct XRHitTestSubscriptionResultsData { array results; array transient_input_results;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=584" + }, + "device.mojom.RgbTupleF32": { + "definition": "struct RgbTupleF32 { float red; float green; float blue;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=594" + }, + "device.mojom.XRSphericalHarmonics": { + "definition": "struct XRSphericalHarmonics { array coefficients;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=601" + }, + "device.mojom.XRCubeMap": { + "definition": "struct XRCubeMap { const uint64 kNumComponentsPerPixel = 4; uint32 width_and_height; array positive_x; array negative_x; array positive_y; array negative_y; array positive_z; array negative_z;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=611" + }, + "device.mojom.XRLightProbe": { + "definition": "struct XRLightProbe { XRSphericalHarmonics spherical_harmonics; gfx.mojom.Vector3dF main_light_direction; RgbTupleF32 main_light_intensity;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=639" + }, + "device.mojom.XRReflectionProbe": { + "definition": "struct XRReflectionProbe { XRCubeMap cube_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=649" + }, + "device.mojom.XRLightEstimationData": { + "definition": "struct XRLightEstimationData { XRLightProbe? light_probe; XRReflectionProbe? reflection_probe;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=654" + }, + "device.mojom.XRDepthDataStillValid": { + "definition": "struct XRDepthDataStillValid {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=661" + }, + "device.mojom.XRDepthDataUpdated": { + "definition": "struct XRDepthDataUpdated { mojo_base.mojom.BigBuffer pixel_data; gfx.mojom.Transform norm_texture_from_norm_view; gfx.mojom.Size size; float raw_value_to_meters; XRViewGeometry? view_geometry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=665" + }, + "device.mojom.XRTrackedImageData": { + "definition": "struct XRTrackedImageData { uint32 index; Pose mojo_from_image; bool actively_tracked; float width_in_meters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=696" + }, + "device.mojom.XRTrackedImagesData": { + "definition": "struct XRTrackedImagesData { array images_data; array? image_trackable_scores;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=715" + }, + "device.mojom.LayerId": { + "definition": "struct LayerId { uint64 id_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=725" + }, + "device.mojom.XRProjectionLayerData": { + "definition": "struct XRProjectionLayerData {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=730" + }, + "device.mojom.XRQuadLayerData": { + "definition": "struct XRQuadLayerData { gfx.mojom.Transform transform; float width; float height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=733" + }, + "device.mojom.XRCylinderLayerData": { + "definition": "struct XRCylinderLayerData { gfx.mojom.Transform transform; float radius; float central_angle; float aspect_ratio;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=738" + }, + "device.mojom.XREquirectLayerData": { + "definition": "struct XREquirectLayerData { gfx.mojom.Transform transform; float radius; float central_horizontal_angle; float upper_vertical_angle; float lower_vertical_angle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=744" + }, + "device.mojom.XRLayerReadOnlyData": { + "definition": "struct XRLayerReadOnlyData { LayerId layer_id; uint32 texture_width; uint32 texture_height; bool is_static;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=762" + }, + "device.mojom.XRLayerMutableData": { + "definition": "struct XRLayerMutableData { bool blend_texture_source_alpha; float opacity; XRReferenceSpaceType reference_space_type; XRLayerSpecificData layer_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=772" + }, + "device.mojom.XRCompositionLayerData": { + "definition": "struct XRCompositionLayerData { XRLayerReadOnlyData read_only_data; XRLayerMutableData mutable_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=780" + }, + "device.mojom.XRLayerFrameData": { + "definition": "struct XRLayerFrameData { LayerId layer_id; gpu.mojom.ExportedSharedImage buffer_shared_image; gpu.mojom.SyncToken buffer_sync_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=786" + }, + "device.mojom.XRFrameData": { + "definition": "struct XRFrameData { XRRenderInfo render_info; mojo_base.mojom.TimeDelta time_delta; gpu.mojom.ExportedSharedImage? buffer_shared_image; gpu.mojom.SyncToken? buffer_sync_token; gpu.mojom.ExportedSharedImage? camera_image_buffer_shared_image; gpu.mojom.SyncToken? camera_image_buffer_sync_token; gfx.mojom.Size? camera_image_size; bool mojo_space_reset; gfx.mojom.Transform? mojo_from_floor; array? input_state; uint32 stage_parameters_id; VRStageParameters? stage_parameters; XRPlaneDetectionData? detected_planes_data; XRAnchorsData? anchors_data; array? composition_layers_data; XRLightEstimationData? light_estimation_data; XRHitTestSubscriptionResultsData? hit_test_subscription_results; float rendering_time_ratio; XRTrackedImagesData? tracked_images;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=822" + }, + "device.mojom.RequestSessionSuccess": { + "definition": "struct RequestSessionSuccess { XRSession session; uint64 trace_id; pending_remote metrics_recorder; pending_remote? xr_internals_listener;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=901" + }, + "device.mojom.XRFrameDataRequestOptions": { + "definition": "struct XRFrameDataRequestOptions { bool include_lighting_estimation_data; bool depth_active; uint32 stage_parameters_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1072" + }, + "device.mojom.XRHandedness": { + "definition": "enum XRHandedness { NONE = 0, LEFT = 1, RIGHT = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=28" + }, + "device.mojom.XRTargetRayMode": { + "definition": "enum XRTargetRayMode { GAZING = 1, POINTING = 2, TAPPING = 3};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=34" + }, + "device.mojom.XRSessionFeatureRequestStatus": { + "definition": "enum XRSessionFeatureRequestStatus { kNotRequested = 0, kRequired = 1, kOptionalAccepted = 2, kOptionalRejected = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=44" + }, + "device.mojom.XREnvironmentBlendMode": { + "definition": "enum XREnvironmentBlendMode { kOpaque = 1, kAlphaBlend = 2, kAdditive = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=56" + }, + "device.mojom.XRInteractionMode": { + "definition": "enum XRInteractionMode { kScreenSpace = 1, kWorldSpace = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=67" + }, + "device.mojom.XREye": { + "definition": "enum XREye { kNone = 0, kLeft = 1, kRight = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=310" + }, + "device.mojom.XRPresentationTransportMethod": { + "definition": "enum XRPresentationTransportMethod { NONE = 0, SUBMIT_AS_TEXTURE_HANDLE = 1, SUBMIT_AS_MAILBOX_HOLDER = 2, DRAW_INTO_TEXTURE_MAILBOX = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=412" + }, + "device.mojom.XRReferenceSpaceType": { + "definition": "enum XRReferenceSpaceType { kViewer = 0, kLocal = 1, kLocalFloor = 2, kBoundedFloor = 3, kUnbounded = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=439" + }, + "device.mojom.XRInputSourceSpaceType": { + "definition": "enum XRInputSourceSpaceType { kTargetRay = 0, kGrip = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=468" + }, + "device.mojom.XRPlaneOrientation": { + "definition": "enum XRPlaneOrientation { UNKNOWN = 0, HORIZONTAL = 1, VERTICAL = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=488" + }, + "device.mojom.CreateCompositionLayerResult": { + "definition": "enum CreateCompositionLayerResult { SUCCESS = 0, FAILURE = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=796" + }, + "device.mojom.XrCompatibleResult": { + "definition": "enum XrCompatibleResult { kAlreadyCompatible, kNoDeviceAvailable, kWebXrFeaturePolicyBlocked, kCompatibleAfterRestart, kNotCompatibleAfterRestart, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=921" + }, + "device.mojom.EntityTypeForHitTest": { + "definition": "enum EntityTypeForHitTest { POINT = 1, PLANE = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=988" + }, + "device.mojom.XRVisibilityState": { + "definition": "enum XRVisibilityState { VISIBLE = 1, VISIBLE_BLURRED = 2, HIDDEN = 3};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=1180" + }, + "device.mojom.XRNativeOriginInformation": { + "definition": "union XRNativeOriginInformation { XRInputSourceSpaceInfo input_source_space_info; PlaneId plane_id; AnchorId anchor_id; XRReferenceSpaceType reference_space_type; XRHandJointSpaceInfo hand_joint_space_info; uint32 image_index;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=456" + }, + "device.mojom.XRDepthData": { + "definition": "union XRDepthData { XRDepthDataStillValid data_still_valid; XRDepthDataUpdated updated_depth_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=691" + }, + "device.mojom.XRLayerSpecificData": { + "definition": "union XRLayerSpecificData { XRProjectionLayerData projection; XRQuadLayerData quad; XRCylinderLayerData cylinder; XREquirectLayerData equirect;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=753" + }, + "device.mojom.RequestSessionResult": { + "definition": "union RequestSessionResult { RequestSessionSuccess success; RequestSessionError failure_reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/vr_service.mojom;l=914" + }, + "device.mojom.XRDeviceId": { + "definition": "enum XRDeviceId { WEB_TEST_DEVICE_ID = 0, FAKE_DEVICE_ID = 1, ORIENTATION_DEVICE_ID = 2, [EnableIf=enable_arcore] ARCORE_DEVICE_ID = 7, [EnableIf=enable_openxr] OPENXR_DEVICE_ID = 8, [EnableIf=enable_cardboard] CARDBOARD_DEVICE_ID = 9,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_device.mojom;l=12" + }, + "device.mojom.XRHandJointData": { + "definition": "struct XRHandJointData { XRHandJoint joint; gfx.mojom.Transform? mojo_from_joint; float radius;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_hand_tracking_data.mojom;l=41" + }, + "device.mojom.XRHandTrackingData": { + "definition": "struct XRHandTrackingData { array hand_joint_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_hand_tracking_data.mojom;l=51" + }, + "device.mojom.XRHandJoint": { + "definition": "enum XRHandJoint { kWrist = 0, kThumbMetacarpal = 1, kThumbPhalanxProximal = 2, kThumbPhalanxDistal = 3, kThumbTip = 4, kIndexFingerMetacarpal = 5, kIndexFingerPhalanxProximal = 6, kIndexFingerPhalanxIntermediate = 7, kIndexFingerPhalanxDistal = 8, kIndexFingerTip = 9, kMiddleFingerMetacarpal = 10, kMiddleFingerPhalanxProximal = 11, kMiddleFingerPhalanxIntermediate = 12, kMiddleFingerPhalanxDistal = 13, kMiddleFingerTip = 14, kRingFingerMetacarpal = 15, kRingFingerPhalanxProximal = 16, kRingFingerPhalanxIntermediate = 17, kRingFingerPhalanxDistal = 18, kRingFingerTip = 19, kPinkyFingerMetacarpal = 20, kPinkyFingerPhalanxProximal = 21, kPinkyFingerPhalanxIntermediate = 22, kPinkyFingerPhalanxDistal = 23, kPinkyFingerTip = 24,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_hand_tracking_data.mojom;l=10" + }, + "device.mojom.XRTrackedImage": { + "definition": "struct XRTrackedImage { skia.mojom.BitmapN32 bitmap; gfx.mojom.Size size_in_pixels; float width_in_meters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=78" + }, + "device.mojom.XRDepthOptions": { + "definition": "struct XRDepthOptions { array usage_preferences; array data_format_preferences; array depth_type_request; bool match_depth_view;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=104" + }, + "device.mojom.XRSessionOptions": { + "definition": "struct XRSessionOptions { XRSessionMode mode; array required_features; array optional_features; array tracked_images; XRDepthOptions? depth_options; uint64 trace_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=132" + }, + "device.mojom.XrFrameStatistics": { + "definition": "struct XrFrameStatistics { uint64 trace_id; mojo_base.mojom.TimeDelta duration; uint64 num_frames; uint64 dropped_frames; mojo_base.mojom.TimeDelta frame_data_time; mojo_base.mojom.TimeDelta page_animation_frame_time; mojo_base.mojom.TimeDelta submit_frame_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=158" + }, + "device.mojom.XrLogMessage": { + "definition": "struct XrLogMessage { uint64 trace_id; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=178" + }, + "device.mojom.RequestSessionError": { + "definition": "enum RequestSessionError { EXISTING_IMMERSIVE_SESSION = 1, INVALID_CLIENT = 2, USER_DENIED_CONSENT = 3, NO_RUNTIME_FOUND = 4, UNKNOWN_RUNTIME_ERROR = 5, RUNTIME_INSTALL_FAILURE = 6, RUNTIMES_CHANGED = 7, FULLSCREEN_ERROR = 8, UNKNOWN_FAILURE = 9,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=16" + }, + "device.mojom.XRSessionFeature": { + "definition": "enum XRSessionFeature { REF_SPACE_VIEWER = 1, REF_SPACE_LOCAL = 2, REF_SPACE_LOCAL_FLOOR = 3, REF_SPACE_BOUNDED_FLOOR = 4, REF_SPACE_UNBOUNDED = 5, DOM_OVERLAY = 6, HIT_TEST = 7, LIGHT_ESTIMATION = 8, ANCHORS = 9, CAMERA_ACCESS = 10, PLANE_DETECTION = 11, DEPTH = 12, IMAGE_TRACKING = 13, HAND_INPUT = 14, SECONDARY_VIEWS = 15, LAYERS = 16, FRONT_FACING = 17, WEBGPU = 18,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=47" + }, + "device.mojom.XRSessionMode": { + "definition": "enum XRSessionMode { kInline = 1, kImmersiveVr = 2, kImmersiveAr = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=72" + }, + "device.mojom.XRDepthUsage": { + "definition": "enum XRDepthUsage { kCPUOptimized = 1, kGPUOptimized = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=84" + }, + "device.mojom.XRDepthDataFormat": { + "definition": "enum XRDepthDataFormat { kLuminanceAlpha = 1, kFloat32 = 2, kUnsignedShort = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=89" + }, + "device.mojom.XRDepthType": { + "definition": "enum XRDepthType { kRaw = 1, kSmooth = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:device/vr/public/mojom/xr_session.mojom;l=95" + }, + "gpu.mojom.Capabilities": { + "definition": "struct Capabilities;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/capabilities.mojom;l=8" + }, + "gpu.mojom.GLCapabilities": { + "definition": "struct GLCapabilities;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/capabilities.mojom;l=11" + }, + "gpu.mojom.ContextResult": { + "definition": "enum ContextResult { Success, TransientFailure, FatalFailure, SurfaceFailure};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/context_result.mojom;l=8" + }, + "gpu.mojom.DevicePerfInfo": { + "definition": "struct DevicePerfInfo { uint32 total_physical_memory_mb; uint32 total_disk_space_mb; uint32 hardware_concurrency; [EnableIf=is_win] uint32 system_commit_limit_mb; [EnableIf=is_win] Direct3DFeatureLevel d3d11_feature_level; [EnableIf=is_win] HasDiscreteGpu has_discrete_gpu;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/device_perf_info.mojom;l=31" + }, + "gpu.mojom.Direct3DFeatureLevel": { + "definition": "enum Direct3DFeatureLevel { k1_0_Generic, k1_0_Core, k9_1, k9_2, k9_3, k10_0, k10_1, k11_0, k11_1, k12_0, k12_1, k12_2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/device_perf_info.mojom;l=8" + }, + "gpu.mojom.HasDiscreteGpu": { + "definition": "enum HasDiscreteGpu { kUnknown, kNo, kYes,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/device_perf_info.mojom;l=24" + }, + "gpu.mojom.ExportedSharedImage": { + "definition": "struct ExportedSharedImage { gpu.mojom.Mailbox mailbox; gpu.mojom.SharedImageMetadata metadata; gpu.mojom.SyncToken creation_sync_token; string debug_label; gfx.mojom.GpuMemoryBufferHandle? buffer_handle; gfx.mojom.BufferUsage? buffer_usage; uint32 texture_target;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/exported_shared_image.mojom;l=13" + }, + "gpu.mojom.GpuChannel.CrashForTesting": { + "definition": "CrashForTesting();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=117" + }, + "gpu.mojom.GpuChannel.TerminateForTesting": { + "definition": "TerminateForTesting();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=123" + }, + "gpu.mojom.GpuChannel.GetChannelToken": { + "definition": "[Sync] GetChannelToken() => (mojo_base.mojom.UnguessableToken token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=127" + }, + "gpu.mojom.GpuChannel.Flush": { + "definition": "[Sync, NoInterrupt] Flush() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=134" + }, + "gpu.mojom.GpuChannel.GetSharedMemoryForFlushId": { + "definition": "[Sync, NoInterrupt] GetSharedMemoryForFlushId() => (mojo_base.mojom.ReadOnlySharedMemoryRegion? version_buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=140" + }, + "gpu.mojom.GpuChannel.CreateCommandBuffer": { + "definition": "[Sync, NoInterrupt] CreateCommandBuffer( CreateCommandBufferParams params, int32 routing_id, mojo_base.mojom.UnsafeSharedMemoryRegion shared_state, pending_associated_receiver receiver, pending_associated_remote client) => (ContextResult result, Capabilities capabilties, GLCapabilities gl_capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=148" + }, + "gpu.mojom.GpuChannel.DestroyCommandBuffer": { + "definition": "[Sync, NoInterrupt] DestroyCommandBuffer(int32 routing_id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=159" + }, + "gpu.mojom.GpuChannel.FlushDeferredRequests": { + "definition": "FlushDeferredRequests(array requests, uint32 flushed_deferred_message_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=165" + }, + "gpu.mojom.GpuChannel.CreateGpuMemoryBuffer": { + "definition": "[Sync] CreateGpuMemoryBuffer(gfx.mojom.Size size, viz.mojom.SharedImageFormat format, gfx.mojom.BufferUsage buffer_usage) => (gfx.mojom.GpuMemoryBufferHandle buffer_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=171" + }, + "gpu.mojom.GpuChannel.CreateDCOMPTexture": { + "definition": "[Sync, EnableIf=is_win] CreateDCOMPTexture( int32 route_id, pending_associated_receiver receiver) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=179" + }, + "gpu.mojom.GpuChannel.RegisterOverlayStateObserver": { + "definition": "[Sync, EnableIf=is_win] RegisterOverlayStateObserver( pending_remote promotion_hint_observer, gpu.mojom.Mailbox mailbox) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=188" + }, + "gpu.mojom.GpuChannel.WaitForTokenInRange": { + "definition": "[Sync, NoInterrupt] WaitForTokenInRange( int32 routing_id, int32 start, int32 end) => (CommandBufferState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=202" + }, + "gpu.mojom.GpuChannel.WaitForGetOffsetInRange": { + "definition": "[Sync, NoInterrupt] WaitForGetOffsetInRange( int32 routing_id, uint32 set_get_buffer_count, int32 start, int32 end) => (CommandBufferState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=215" + }, + "gpu.mojom.GpuChannel.CopyToGpuMemoryBufferAsync": { + "definition": "[EnableIf=is_win] CopyToGpuMemoryBufferAsync( Mailbox mailbox, array sync_token_dependencies, uint64 release_count) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=229" + }, + "gpu.mojom.GpuChannel.CopyNativeGmbToSharedMemoryAsync": { + "definition": "[EnableIf=is_win|is_android] CopyNativeGmbToSharedMemoryAsync(gfx.mojom.GpuMemoryBufferHandle buffer_handle, mojo_base.mojom.UnsafeSharedMemoryRegion shared_memory) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=239" + }, + "gpu.mojom.CommandBuffer.SetGetBuffer": { + "definition": "SetGetBuffer(int32 shm_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=251" + }, + "gpu.mojom.CommandBuffer.RegisterTransferBuffer": { + "definition": "RegisterTransferBuffer(int32 id, mojo_base.mojom.UnsafeSharedMemoryRegion buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=255" + }, + "gpu.mojom.CommandBuffer.CreateGpuFenceFromHandle": { + "definition": "CreateGpuFenceFromHandle(uint32 gpu_fence_id, gfx.mojom.GpuFenceHandle fence_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=259" + }, + "gpu.mojom.CommandBuffer.GetGpuFenceHandle": { + "definition": "GetGpuFenceHandle(uint32 id) => (gfx.mojom.GpuFenceHandle? fence_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=263" + }, + "gpu.mojom.CommandBuffer.SignalSyncToken": { + "definition": "SignalSyncToken(SyncToken sync_token, uint32 signal_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=268" + }, + "gpu.mojom.CommandBuffer.SignalQuery": { + "definition": "SignalQuery(uint32 query, uint32 signal_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=273" + }, + "gpu.mojom.CommandBufferClient.OnConsoleMessage": { + "definition": "OnConsoleMessage(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=286" + }, + "gpu.mojom.CommandBufferClient.OnGpuSwitched": { + "definition": "OnGpuSwitched();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=289" + }, + "gpu.mojom.CommandBufferClient.OnDestroyed": { + "definition": "OnDestroyed(ContextLostReason reason, Error error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=293" + }, + "gpu.mojom.CommandBufferClient.OnReturnData": { + "definition": "OnReturnData(array data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=298" + }, + "gpu.mojom.CommandBufferClient.OnSignalAck": { + "definition": "OnSignalAck(uint32 signal_id, CommandBufferState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=303" + }, + "gpu.mojom.DCOMPTexture.StartListening": { + "definition": "StartListening(pending_associated_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=314" + }, + "gpu.mojom.DCOMPTexture.SetTextureSize": { + "definition": "SetTextureSize(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=317" + }, + "gpu.mojom.DCOMPTexture.SetDCOMPSurfaceHandle": { + "definition": "SetDCOMPSurfaceHandle(mojo_base.mojom.UnguessableToken token) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=322" + }, + "gpu.mojom.DCOMPTextureClient.OnSharedImageMailboxBound": { + "definition": "OnSharedImageMailboxBound(Mailbox mailbox);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=335" + }, + "gpu.mojom.DCOMPTextureClient.OnOutputRectChange": { + "definition": "OnOutputRectChange(gfx.mojom.Rect output_rect);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=338" + }, + "gpu.mojom.OverlayStateObserver.OnStateChanged": { + "definition": "OnStateChanged(bool promoted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=349" + }, + "gpu.mojom.RasterCreationAttribs": { + "definition": "struct RasterCreationAttribs { bool enable_gpu_rasterization = false; bool lose_context_when_out_of_memory = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=53" + }, + "gpu.mojom.GLESCreationAttribs": { + "definition": "struct GLESCreationAttribs { gl.mojom.GpuPreference gpu_preference = kLowPower; bool fail_if_major_perf_caveat = false; bool lose_context_when_out_of_memory = false; ContextType context_type = kOpenGLES2;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=58" + }, + "gpu.mojom.WebGPUCreationAttribs": { + "definition": "struct WebGPUCreationAttribs {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=65" + }, + "gpu.mojom.CreateCommandBufferParams": { + "definition": "struct CreateCommandBufferParams { int32 stream_id; SchedulingPriority stream_priority; ContextCreationAttribs attribs; url.mojom.Url active_url; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=76" + }, + "gpu.mojom.CommandBufferState": { + "definition": "struct CommandBufferState { int32 get_offset; int32 token; uint64 release_count; Error error; ContextLostReason context_lost_reason; uint32 generation; uint32 set_get_buffer_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=95" + }, + "gpu.mojom.SwapBuffersCompleteParams": { + "definition": "struct SwapBuffersCompleteParams;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=278" + }, + "gpu.mojom.DeferredRequest": { + "definition": "struct DeferredRequest { DeferredRequestParams params; array sync_token_fences; uint64 release_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=354" + }, + "gpu.mojom.DeferredCommandBufferRequest": { + "definition": "struct DeferredCommandBufferRequest { int32 routing_id; DeferredCommandBufferRequestParams params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=383" + }, + "gpu.mojom.AsyncFlushParams": { + "definition": "struct AsyncFlushParams { int32 put_offset; uint32 flush_id; array sync_token_fences;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=463" + }, + "gpu.mojom.SharedImageInfo": { + "definition": "struct SharedImageInfo { SharedImageMetadata meta; string debug_label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=470" + }, + "gpu.mojom.CreateSharedImageParams": { + "definition": "struct CreateSharedImageParams { Mailbox mailbox; SharedImageInfo si_info; SharedImagePoolId? pool_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=480" + }, + "gpu.mojom.CreateSharedImageWithDataParams": { + "definition": "struct CreateSharedImageWithDataParams { Mailbox mailbox; SharedImageInfo si_info; uint32 pixel_data_offset; uint32 pixel_data_size; bool done_with_shm;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=494" + }, + "gpu.mojom.CreateSharedImageWithBufferParams": { + "definition": "struct CreateSharedImageWithBufferParams { Mailbox mailbox; SharedImageInfo si_info; gfx.mojom.GpuMemoryBufferHandle buffer_handle; SharedImagePoolId? pool_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=515" + }, + "gpu.mojom.UpdateSharedImageParams": { + "definition": "struct UpdateSharedImageParams { Mailbox mailbox; gfx.mojom.GpuFenceHandle? in_fence_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=532" + }, + "gpu.mojom.AddReferenceToSharedImageParams": { + "definition": "struct AddReferenceToSharedImageParams { Mailbox mailbox;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=544" + }, + "gpu.mojom.CopyToGpuMemoryBufferParams": { + "definition": "struct CopyToGpuMemoryBufferParams { Mailbox mailbox;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=553" + }, + "gpu.mojom.CreateSwapChainParams": { + "definition": "struct CreateSwapChainParams { Mailbox front_buffer_mailbox; Mailbox back_buffer_mailbox; viz.mojom.SharedImageFormat format; gfx.mojom.Size size; gfx.mojom.ColorSpace color_space; uint32 usage; skia.mojom.SurfaceOrigin surface_origin; skia.mojom.AlphaType alpha_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=559" + }, + "gpu.mojom.PresentSwapChainParams": { + "definition": "struct PresentSwapChainParams { Mailbox mailbox;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=587" + }, + "gpu.mojom.RegisterDxgiFenceParams": { + "definition": "struct RegisterDxgiFenceParams { Mailbox mailbox; gfx.mojom.DXGIHandleToken dxgi_token; gfx.mojom.GpuFenceHandle fence_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=593" + }, + "gpu.mojom.UpdateDxgiFenceParams": { + "definition": "struct UpdateDxgiFenceParams { Mailbox mailbox; gfx.mojom.DXGIHandleToken dxgi_token; uint64 fence_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=606" + }, + "gpu.mojom.UnregisterDxgiFenceParams": { + "definition": "struct UnregisterDxgiFenceParams { Mailbox mailbox; gfx.mojom.DXGIHandleToken dxgi_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=618" + }, + "gpu.mojom.CreateSharedImagePoolParams": { + "definition": "struct CreateSharedImagePoolParams { SharedImagePoolId pool_id; pending_remote client_remote;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=627" + }, + "gpu.mojom.DestroySharedImagePoolParams": { + "definition": "struct DestroySharedImagePoolParams { SharedImagePoolId pool_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=638" + }, + "gpu.mojom.ContextType": { + "definition": "enum ContextType { kWebGL1, kWebGL2, kOpenGLES2, kOpenGLES3, kOpenGLES31ForTesting,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=31" + }, + "gpu.mojom.ContextColorSpace": { + "definition": "enum ContextColorSpace { kUnspecified, kSRGB, kDisplayP3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=40" + }, + "gpu.mojom.SchedulingPriority": { + "definition": "enum SchedulingPriority { kHigh, kNormal, kLow,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=47" + }, + "gpu.mojom.Error": { + "definition": "enum Error;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=86" + }, + "gpu.mojom.ContextLostReason": { + "definition": "enum ContextLostReason;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=90" + }, + "gpu.mojom.ContextCreationAttribs": { + "definition": "union ContextCreationAttribs { GLESCreationAttribs gles; RasterCreationAttribs raster; WebGPUCreationAttribs webgpu;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=70" + }, + "gpu.mojom.DeferredRequestParams": { + "definition": "union DeferredRequestParams { DeferredCommandBufferRequest command_buffer_request; DeferredSharedImageRequest shared_image_request; [EnableIf=is_win] int32 destroy_dcomp_texture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=369" + }, + "gpu.mojom.DeferredCommandBufferRequestParams": { + "definition": "union DeferredCommandBufferRequestParams { AsyncFlushParams async_flush; int32 destroy_transfer_buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=392" + }, + "gpu.mojom.DeferredSharedImageRequest": { + "definition": "union DeferredSharedImageRequest { uint8 nop; CreateSharedImageParams create_shared_image; CreateSharedImageWithDataParams create_shared_image_with_data; CreateSharedImageWithBufferParams create_shared_image_with_buffer; mojo_base.mojom.ReadOnlySharedMemoryRegion register_upload_buffer; UpdateSharedImageParams update_shared_image; CopyToGpuMemoryBufferParams copy_to_gpu_memory_buffer; Mailbox destroy_shared_image; AddReferenceToSharedImageParams add_reference_to_shared_image; [EnableIf=is_win] CreateSwapChainParams create_swap_chain; [EnableIf=is_win] PresentSwapChainParams present_swap_chain; [EnableIf=is_win] RegisterDxgiFenceParams register_dxgi_fence; [EnableIf=is_win] UpdateDxgiFenceParams update_dxgi_fence; [EnableIf=is_win] UnregisterDxgiFenceParams unregister_dxgi_fence; CreateSharedImagePoolParams create_shared_image_pool; DestroySharedImagePoolParams destroy_shared_image_pool;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_channel.mojom;l=401" + }, + "gpu.mojom.GpuDiskCacheGlShaderHandle": { + "definition": "struct GpuDiskCacheGlShaderHandle { int32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_disk_cache_type.mojom;l=19" + }, + "gpu.mojom.GpuDiskCacheDawnWebGPUHandle": { + "definition": "struct GpuDiskCacheDawnWebGPUHandle { int32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_disk_cache_type.mojom;l=24" + }, + "gpu.mojom.GpuDiskCacheDawnGraphiteHandle": { + "definition": "struct GpuDiskCacheDawnGraphiteHandle { int32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_disk_cache_type.mojom;l=29" + }, + "gpu.mojom.GpuDiskCacheType": { + "definition": "enum GpuDiskCacheType { kGlShaders, kDawnWebGPU, kDawnGraphite,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_disk_cache_type.mojom;l=8" + }, + "gpu.mojom.GpuDiskCacheHandle": { + "definition": "union GpuDiskCacheHandle { GpuDiskCacheGlShaderHandle gl_shader_handle; GpuDiskCacheDawnWebGPUHandle dawn_webgpu_handle; GpuDiskCacheDawnGraphiteHandle dawn_graphite_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_disk_cache_type.mojom;l=38" + }, + "gpu.mojom.GpuFeatureInfo": { + "definition": "struct GpuFeatureInfo { array status_values; array enabled_gpu_driver_bug_workarounds; string disabled_extensions; string disabled_webgl_extensions; array applied_gpu_blocklist_entries; array applied_gpu_driver_bug_list_entries; array supported_buffer_formats_for_allocation_and_texturing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_feature_info.mojom;l=21" + }, + "gpu.mojom.GpuFeatureStatus": { + "definition": "enum GpuFeatureStatus { Enabled, Blocklisted, Disabled, Software, Undefined, Max};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_feature_info.mojom;l=11" + }, + "gpu.mojom.GpuDevice": { + "definition": "struct GpuDevice { uint32 vendor_id; uint32 device_id; [EnableIf=is_win] uint32 sub_sys_id; [EnableIf=is_chromeos|is_win] uint32 revision; bool active; string vendor_string; string device_string; string driver_vendor; string driver_version; [EnableIf=is_win] Luid luid; gl.mojom.GpuPreference gpu_preference;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=20" + }, + "gpu.mojom.VideoDecodeAcceleratorSupportedProfile": { + "definition": "struct VideoDecodeAcceleratorSupportedProfile { VideoCodecProfile profile; gfx.mojom.Size max_resolution; gfx.mojom.Size min_resolution; bool encrypted_only;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=112" + }, + "gpu.mojom.VideoDecodeAcceleratorCapabilities": { + "definition": "struct VideoDecodeAcceleratorCapabilities { array supported_profiles; uint32 flags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=120" + }, + "gpu.mojom.VideoEncodeAcceleratorSupportedProfile": { + "definition": "struct VideoEncodeAcceleratorSupportedProfile { VideoCodecProfile profile; gfx.mojom.Size min_resolution; gfx.mojom.Size max_resolution; uint32 max_framerate_numerator; uint32 max_framerate_denominator;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=126" + }, + "gpu.mojom.ImageDecodeAcceleratorSupportedProfile": { + "definition": "struct ImageDecodeAcceleratorSupportedProfile { ImageDecodeAcceleratorType image_type; gfx.mojom.Size min_encoded_dimensions; gfx.mojom.Size max_encoded_dimensions; array subsamplings;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=149" + }, + "gpu.mojom.OverlayInfo": { + "definition": "struct OverlayInfo { bool direct_composition; bool supports_overlays; OverlaySupport yuy2_overlay_support; OverlaySupport nv12_overlay_support; OverlaySupport bgra8_overlay_support; OverlaySupport rgb10a2_overlay_support; OverlaySupport p010_overlay_support;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=167" + }, + "gpu.mojom.GpuInfo": { + "definition": "struct GpuInfo { mojo_base.mojom.TimeDelta initialization_time; bool optimus; bool amd_switchable; GpuDevice gpu; array secondary_gpus; array npus; string pixel_shader_version; string vertex_shader_version; string max_msaa_samples; string machine_model_name; string machine_model_version; string display_type; SkiaBackendType skia_backend_type; string gl_version; string gl_vendor; string gl_renderer; string gl_extensions; string gl_ws_vendor; string gl_ws_version; string gl_ws_extensions; uint32 gl_reset_notification_strategy; gl.mojom.GLImplementationParts gl_implementation_parts; string direct_rendering_version; bool sandboxed; bool in_process_gpu; bool passthrough_cmd_decoder; bool can_support_threaded_texture_mailbox; [EnableIf=is_win] uint32 directml_feature_level; [EnableIf=is_win] uint32 d3d12_feature_level; [EnableIf=is_win] uint32 vulkan_version; [EnableIf=is_win] OverlayInfo overlay_info; [EnableIf=is_win] bool shared_image_d3d; array video_decode_accelerator_supported_profiles; array video_encode_accelerator_supported_profiles; bool jpeg_decode_accelerator_supported; bool subpixel_font_rendering; uint32 visibility_callback_call_count; [EnableIf=supports_vulkan] bool hardware_supports_vulkan; [EnableIf=supports_vulkan] VulkanInfo? vulkan_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=178" + }, + "gpu.mojom.SkiaBackendType": { + "definition": "enum SkiaBackendType { kUnknown, kNone, kGaneshGL, kGaneshVulkan, kGraphiteDawnVulkan, kGraphiteDawnMetal, kGraphiteDawnD3D11, kGraphiteDawnD3D12, kGraphiteMetal,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=41" + }, + "gpu.mojom.VideoCodecProfile": { + "definition": "enum VideoCodecProfile { VIDEO_CODEC_PROFILE_UNKNOWN = -1, H264PROFILE_BASELINE = 0, H264PROFILE_MAIN = 1, H264PROFILE_EXTENDED = 2, H264PROFILE_HIGH = 3, H264PROFILE_HIGH10PROFILE = 4, H264PROFILE_HIGH422PROFILE = 5, H264PROFILE_HIGH444PREDICTIVEPROFILE = 6, H264PROFILE_SCALABLEBASELINE = 7, H264PROFILE_SCALABLEHIGH = 8, H264PROFILE_STEREOHIGH = 9, H264PROFILE_MULTIVIEWHIGH = 10, VP8PROFILE_ANY = 11, VP9PROFILE_PROFILE0 = 12, VP9PROFILE_PROFILE1 = 13, VP9PROFILE_PROFILE2 = 14, VP9PROFILE_PROFILE3 = 15, HEVCPROFILE_MAIN = 16, HEVCPROFILE_MAIN10 = 17, HEVCPROFILE_MAIN_STILL_PICTURE = 18, DOLBYVISION_PROFILE0 = 19, DOLBYVISION_PROFILE5 = 21, DOLBYVISION_PROFILE7 = 22, THEORAPROFILE_ANY = 23, AV1PROFILE_PROFILE_MAIN = 24, AV1PROFILE_PROFILE_HIGH = 25, AV1PROFILE_PROFILE_PRO = 26, DOLBYVISION_PROFILE8 = 27, DOLBYVISION_PROFILE9 = 28, HEVCPROFILE_REXT = 29, HEVCPROFILE_HIGH_THROUGHPUT = 30, HEVCPROFILE_MULTIVIEW_MAIN = 31, HEVCPROFILE_SCALABLE_MAIN = 32, HEVCPROFILE_3D_MAIN = 33, HEVCPROFILE_SCREEN_EXTENDED = 34, HEVCPROFILE_SCALABLE_REXT = 35, HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED = 36, VVCPROFILE_MAIN10 = 37, VVCPROFILE_MAIN12 = 38, VVCPROFILE_MAIN12_INTRA = 39, VVCPROIFLE_MULTILAYER_MAIN10 = 40, VVCPROFILE_MAIN10_444 = 41, VVCPROFILE_MAIN12_444 = 42, VVCPROFILE_MAIN16_444 = 43, VVCPROFILE_MAIN12_444_INTRA = 44, VVCPROFILE_MAIN16_444_INTRA = 45, VVCPROFILE_MULTILAYER_MAIN10_444 = 46, VVCPROFILE_MAIN10_STILL_PICTURE = 47, VVCPROFILE_MAIN12_STILL_PICTURE = 48, VVCPROFILE_MAIN10_444_STILL_PICTURE = 49, VVCPROFILE_MAIN12_444_STILL_PICTURE = 50, VVCPROFILE_MAIN16_444_STILL_PICTURE = 51};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=54" + }, + "gpu.mojom.ImageDecodeAcceleratorType": { + "definition": "enum ImageDecodeAcceleratorType { kJpeg, kWebP, kUnknown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=135" + }, + "gpu.mojom.ImageDecodeAcceleratorSubsampling": { + "definition": "enum ImageDecodeAcceleratorSubsampling { k420, k422, k444,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=142" + }, + "gpu.mojom.OverlaySupport": { + "definition": "enum OverlaySupport { NONE, DIRECT, SCALING, SOFTWARE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_info.mojom;l=158" + }, + "gpu.mojom.GpuPreferences": { + "definition": "struct GpuPreferences { bool disable_accelerated_video_decode; bool disable_accelerated_video_encode; bool gpu_startup_dialog; bool disable_gpu_watchdog; bool gpu_sandbox_start_early; bool enable_low_latency_dxva; bool enable_zero_copy_dxgi_video; bool enable_nv12_dxgi_video; bool disable_software_rasterizer; bool log_gpu_control_list_decisions; bool compile_shader_always_succeeds; bool disable_gl_error_limit; bool disable_glsl_translator; bool disable_shader_name_hashing; bool enable_gpu_command_logging; bool enable_gpu_debugging; bool enable_gpu_service_logging_gpu; bool enable_gpu_driver_debug_logging; bool disable_gpu_program_cache; bool enforce_gl_minimums; uint32 force_gpu_mem_discardable_limit_bytes; uint32 force_max_texture_size; uint32 gpu_program_cache_size; bool disable_gpu_shader_disk_cache; bool enable_threaded_texture_mailboxes; bool gl_shader_interm_output; bool perform_graphite_precompilation; bool enable_gpu_service_logging; bool enable_gpu_service_tracing; bool use_passthrough_cmd_decoder; bool ignore_gpu_blocklist; bool watchdog_starts_backgrounded; GrContextType gr_context_type; VulkanImplementationName use_vulkan; bool enable_vulkan_protected_memory; bool disable_vulkan_surface; bool disable_vulkan_fallback_to_gl_for_testing; uint32 vulkan_heap_memory_limit; uint32 vulkan_sync_cpu_memory_limit; bool enable_gpu_benchmarking_extension; bool enable_webgpu; bool enable_unsafe_webgpu; bool enable_webgpu_developer_features; bool enable_webgpu_experimental_features; WebGPUAdapterName use_webgpu_adapter; WebGPUPowerPreference use_webgpu_power_preference; bool force_webgpu_compat; DawnBackendValidationLevel enable_dawn_backend_validation; array enabled_dawn_features_list; array disabled_dawn_features_list; bool enable_perf_data_collection; [EnableIf=use_ozone] mojo_base.mojom.MessagePumpType message_pump_type; bool enable_native_gpu_memory_buffers; bool force_separate_egl_display_for_webgl_testing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_preferences.mojom;l=56" + }, + "gpu.mojom.VulkanImplementationName": { + "definition": "enum VulkanImplementationName { kNone = 0, kNative = 1, kForcedNative = 2, kSwiftshader = 3, kLast = kSwiftshader,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_preferences.mojom;l=14" + }, + "gpu.mojom.WebGPUAdapterName": { + "definition": "enum WebGPUAdapterName { kDefault = 0, kD3D11 = 1, kOpenGLES = 2, kSwiftShader = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_preferences.mojom;l=23" + }, + "gpu.mojom.WebGPUPowerPreference": { + "definition": "enum WebGPUPowerPreference { kNone = 0, kDefaultLowPower = 1, kDefaultHighPerformance = 2, kForceLowPower = 3, kForceHighPerformance = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_preferences.mojom;l=31" + }, + "gpu.mojom.GrContextType": { + "definition": "enum GrContextType { kNone, kGL, kVulkan, kGraphiteDawn, kGraphiteMetal,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_preferences.mojom;l=40" + }, + "gpu.mojom.DawnBackendValidationLevel": { + "definition": "enum DawnBackendValidationLevel { kDisabled = 0, kPartial = 1, kFull = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/gpu_preferences.mojom;l=49" + }, + "gpu.mojom.Luid": { + "definition": "struct Luid { int32 high; uint32 low;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/luid.mojom;l=9" + }, + "gpu.mojom.Mailbox": { + "definition": "struct Mailbox { array name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/mailbox.mojom;l=8" + }, + "gpu.mojom.MailboxHolder": { + "definition": "struct MailboxHolder { gpu.mojom.Mailbox mailbox; gpu.mojom.SyncToken sync_token; uint32 texture_target;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/mailbox_holder.mojom;l=11" + }, + "gpu.mojom.VideoMemoryProcessStats": { + "definition": "struct VideoMemoryProcessStats { uint64 video_memory_bytes; bool has_duplicates;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/memory_stats.mojom;l=7" + }, + "gpu.mojom.VideoMemoryUsageStats": { + "definition": "struct VideoMemoryUsageStats { map process_map; uint64 bytes_allocated;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/memory_stats.mojom;l=12" + }, + "gpu.mojom.SharedImageCapabilities": { + "definition": "struct SharedImageCapabilities { bool supports_scanout_shared_images; [EnableIf=is_win] bool supports_scanout_shared_images_for_software_video_frames; bool supports_luminance_shared_images; bool supports_r16_shared_images; bool supports_native_nv12_mappable_shared_images; bool is_r16f_supported; bool disable_r8_shared_images; bool disable_webgpu_shared_images; bool disable_one_component_textures; bool shared_image_d3d; bool shared_image_swap_chain; [EnableIf=is_mac] uint32 texture_target_for_io_surfaces;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/shared_image_capabilities.mojom;l=8" + }, + "gpu.mojom.SharedImageMetadata": { + "definition": "struct SharedImageMetadata { viz.mojom.SharedImageFormat format; gfx.mojom.Size size; gfx.mojom.ColorSpace color_space; skia.mojom.SurfaceOrigin surface_origin; skia.mojom.AlphaType alpha_type; uint32 usage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/shared_image_metadata.mojom;l=14" + }, + "gpu.mojom.SharedImagePoolClientInterface.OnClearPool": { + "definition": "OnClearPool();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/shared_image_pool_client_interface.mojom;l=13" + }, + "gpu.mojom.SharedImagePoolId": { + "definition": "struct SharedImagePoolId { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/shared_image_pool_id.mojom;l=11" + }, + "gpu.mojom.SurfaceHandle": { + "definition": "struct SurfaceHandle { uint64 surface_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/surface_handle.mojom;l=8" + }, + "gpu.mojom.SyncToken": { + "definition": "struct SyncToken { bool verified_flush; CommandBufferNamespace namespace_id; uint64 command_buffer_id; uint64 release_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/sync_token.mojom;l=20" + }, + "gpu.mojom.CommandBufferNamespace": { + "definition": "enum CommandBufferNamespace { INVALID = -1, GPU_IO, IN_PROCESS, VIZ_SKIA_OUTPUT_SURFACE, VIZ_SKIA_OUTPUT_SURFACE_NON_DDL, GPU_CHANNEL_SHARED_IMAGE_INTERFACE, WEBNN_CONTEXT_INTERFACE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/sync_token.mojom;l=8" + }, + "gpu.mojom.VulkanPhysicalDeviceInfo": { + "definition": "struct VulkanPhysicalDeviceInfo { VkPhysicalDeviceProperties properties; array extensions; VkPhysicalDeviceFeatures features; bool feature_sampler_ycbcr_conversion; bool feature_protected_memory; array queue_families;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_info.mojom;l=10" + }, + "gpu.mojom.VulkanInfo": { + "definition": "struct VulkanInfo { uint32 api_version; uint32 used_api_version; array instance_extensions; array enabled_instance_extensions; array instance_layers; array physical_devices;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_info.mojom;l=19" + }, + "gpu.mojom.VkExtensionProperties": { + "definition": "struct VkExtensionProperties { string extensionName; uint32 specVersion;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=13" + }, + "gpu.mojom.VkLayerProperties": { + "definition": "struct VkLayerProperties { string layerName; uint32 specVersion; uint32 implementationVersion; string description;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=18" + }, + "gpu.mojom.VkPhysicalDeviceLimits": { + "definition": "struct VkPhysicalDeviceLimits { uint32 maxImageDimension1D; uint32 maxImageDimension2D; uint32 maxImageDimension3D; uint32 maxImageDimensionCube; uint32 maxImageArrayLayers; uint32 maxTexelBufferElements; uint32 maxUniformBufferRange; uint32 maxStorageBufferRange; uint32 maxPushConstantsSize; uint32 maxMemoryAllocationCount; uint32 maxSamplerAllocationCount; uint64 bufferImageGranularity; uint64 sparseAddressSpaceSize; uint32 maxBoundDescriptorSets; uint32 maxPerStageDescriptorSamplers; uint32 maxPerStageDescriptorUniformBuffers; uint32 maxPerStageDescriptorStorageBuffers; uint32 maxPerStageDescriptorSampledImages; uint32 maxPerStageDescriptorStorageImages; uint32 maxPerStageDescriptorInputAttachments; uint32 maxPerStageResources; uint32 maxDescriptorSetSamplers; uint32 maxDescriptorSetUniformBuffers; uint32 maxDescriptorSetUniformBuffersDynamic; uint32 maxDescriptorSetStorageBuffers; uint32 maxDescriptorSetStorageBuffersDynamic; uint32 maxDescriptorSetSampledImages; uint32 maxDescriptorSetStorageImages; uint32 maxDescriptorSetInputAttachments; uint32 maxVertexInputAttributes; uint32 maxVertexInputBindings; uint32 maxVertexInputAttributeOffset; uint32 maxVertexInputBindingStride; uint32 maxVertexOutputComponents; uint32 maxTessellationGenerationLevel; uint32 maxTessellationPatchSize; uint32 maxTessellationControlPerVertexInputComponents; uint32 maxTessellationControlPerVertexOutputComponents; uint32 maxTessellationControlPerPatchOutputComponents; uint32 maxTessellationControlTotalOutputComponents; uint32 maxTessellationEvaluationInputComponents; uint32 maxTessellationEvaluationOutputComponents; uint32 maxGeometryShaderInvocations; uint32 maxGeometryInputComponents; uint32 maxGeometryOutputComponents; uint32 maxGeometryOutputVertices; uint32 maxGeometryTotalOutputComponents; uint32 maxFragmentInputComponents; uint32 maxFragmentOutputAttachments; uint32 maxFragmentDualSrcAttachments; uint32 maxFragmentCombinedOutputResources; uint32 maxComputeSharedMemorySize; array maxComputeWorkGroupCount; uint32 maxComputeWorkGroupInvocations; array maxComputeWorkGroupSize; uint32 subPixelPrecisionBits; uint32 subTexelPrecisionBits; uint32 mipmapPrecisionBits; uint32 maxDrawIndexedIndexValue; uint32 maxDrawIndirectCount; float maxSamplerLodBias; float maxSamplerAnisotropy; uint32 maxViewports; array maxViewportDimensions; array viewportBoundsRange; uint32 viewportSubPixelBits; uint64 minMemoryMapAlignment; uint64 minTexelBufferOffsetAlignment; uint64 minUniformBufferOffsetAlignment; uint64 minStorageBufferOffsetAlignment; int32 minTexelOffset; uint32 maxTexelOffset; int32 minTexelGatherOffset; uint32 maxTexelGatherOffset; float minInterpolationOffset; float maxInterpolationOffset; uint32 subPixelInterpolationOffsetBits; uint32 maxFramebufferWidth; uint32 maxFramebufferHeight; uint32 maxFramebufferLayers; uint32 framebufferColorSampleCounts; uint32 framebufferDepthSampleCounts; uint32 framebufferStencilSampleCounts; uint32 framebufferNoAttachmentsSampleCounts; uint32 maxColorAttachments; uint32 sampledImageColorSampleCounts; uint32 sampledImageIntegerSampleCounts; uint32 sampledImageDepthSampleCounts; uint32 sampledImageStencilSampleCounts; uint32 storageImageSampleCounts; uint32 maxSampleMaskWords; bool timestampComputeAndGraphics; float timestampPeriod; uint32 maxClipDistances; uint32 maxCullDistances; uint32 maxCombinedClipAndCullDistances; uint32 discreteQueuePriorities; array pointSizeRange; array lineWidthRange; float pointSizeGranularity; float lineWidthGranularity; bool strictLines; bool standardSampleLocations; uint64 optimalBufferCopyOffsetAlignment; uint64 optimalBufferCopyRowPitchAlignment; uint64 nonCoherentAtomSize;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=34" + }, + "gpu.mojom.VkPhysicalDeviceSparseProperties": { + "definition": "struct VkPhysicalDeviceSparseProperties { bool residencyStandard2DBlockShape; bool residencyStandard2DMultisampleBlockShape; bool residencyStandard3DBlockShape; bool residencyAlignedMipSize; bool residencyNonResidentStrict;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=143" + }, + "gpu.mojom.VkPhysicalDeviceProperties": { + "definition": "struct VkPhysicalDeviceProperties { uint32 apiVersion; uint32 driverVersion; uint32 vendorID; uint32 deviceID; VkPhysicalDeviceType deviceType; string deviceName; array pipelineCacheUUID; VkPhysicalDeviceLimits limits; VkPhysicalDeviceSparseProperties sparseProperties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=151" + }, + "gpu.mojom.VkPhysicalDeviceFeatures": { + "definition": "struct VkPhysicalDeviceFeatures { bool robustBufferAccess; bool fullDrawIndexUint32; bool imageCubeArray; bool independentBlend; bool geometryShader; bool tessellationShader; bool sampleRateShading; bool dualSrcBlend; bool logicOp; bool multiDrawIndirect; bool drawIndirectFirstInstance; bool depthClamp; bool depthBiasClamp; bool fillModeNonSolid; bool depthBounds; bool wideLines; bool largePoints; bool alphaToOne; bool multiViewport; bool samplerAnisotropy; bool textureCompressionETC2; bool textureCompressionASTC_LDR; bool textureCompressionBC; bool occlusionQueryPrecise; bool pipelineStatisticsQuery; bool vertexPipelineStoresAndAtomics; bool fragmentStoresAndAtomics; bool shaderTessellationAndGeometryPointSize; bool shaderImageGatherExtended; bool shaderStorageImageExtendedFormats; bool shaderStorageImageMultisample; bool shaderStorageImageReadWithoutFormat; bool shaderStorageImageWriteWithoutFormat; bool shaderUniformBufferArrayDynamicIndexing; bool shaderSampledImageArrayDynamicIndexing; bool shaderStorageBufferArrayDynamicIndexing; bool shaderStorageImageArrayDynamicIndexing; bool shaderClipDistance; bool shaderCullDistance; bool shaderFloat64; bool shaderInt64; bool shaderInt16; bool shaderResourceResidency; bool shaderResourceMinLod; bool sparseBinding; bool sparseResidencyBuffer; bool sparseResidencyImage2D; bool sparseResidencyImage3D; bool sparseResidency2Samples; bool sparseResidency4Samples; bool sparseResidency8Samples; bool sparseResidency16Samples; bool sparseResidencyAliased; bool variableMultisampleRate; bool inheritedQueries;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=163" + }, + "gpu.mojom.VkExtent3D": { + "definition": "struct VkExtent3D { uint32 width; uint32 height; uint32 depth;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=221" + }, + "gpu.mojom.VkQueueFamilyProperties": { + "definition": "struct VkQueueFamilyProperties { uint32 queueFlags; uint32 queueCount; uint32 timestampValidBits; VkExtent3D minImageTransferGranularity;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=227" + }, + "gpu.mojom.VkPhysicalDeviceType": { + "definition": "enum VkPhysicalDeviceType { OTHER = 0, INTEGRATED_GPU = 1, DISCRETE_GPU = 2, VIRTUAL_GPU = 3, CPU = 4, INVALID_VALUE = -1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_types.mojom;l=25" + }, + "gpu.mojom.VulkanYCbCrInfo": { + "definition": "struct VulkanYCbCrInfo { uint32 image_format; uint64 external_format; uint32 suggested_ycbcr_model; uint32 suggested_ycbcr_range; uint32 suggested_xchroma_offset; uint32 suggested_ychroma_offset; uint32 format_features;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:gpu/ipc/common/vulkan_ycbcr_info.mojom;l=12" + }, + "IPC.mojom.Channel.SetPeerPid": { + "definition": "SetPeerPid(int32 pid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ipc/ipc.mojom;l=20" + }, + "IPC.mojom.Channel.GetAssociatedInterface": { + "definition": "GetAssociatedInterface( mojo_base.mojom.GenericPendingAssociatedReceiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ipc/ipc.mojom;l=23" + }, + "IPC.mojom.Message": { + "definition": "struct Message { array bytes; array? handles;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ipc/ipc.mojom;l=12" + }, + "media.mojom.Range": { + "definition": "struct Range { double max; double min; double current; double step;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=11" + }, + "media.mojom.PhotoState": { + "definition": "struct PhotoState { array supported_white_balance_modes; MeteringMode current_white_balance_mode; array supported_exposure_modes; MeteringMode current_exposure_mode; array supported_focus_modes; MeteringMode current_focus_mode; array points_of_interest; Range exposure_compensation; Range exposure_time; Range color_temperature; Range iso; Range brightness; Range contrast; Range saturation; Range sharpness; Range focus_distance; Range pan; Range tilt; Range zoom; bool supports_torch; bool torch; RedEyeReduction red_eye_reduction; Range height; Range width; array fill_light_mode; [MinVersion=1] array? supported_background_blur_modes; [MinVersion=1] BackgroundBlurMode background_blur_mode; [MinVersion=2] array? supported_face_framing_modes; [MinVersion=2] MeteringMode current_face_framing_mode; [MinVersion=3] array? supported_eye_gaze_correction_modes; [MinVersion=3] EyeGazeCorrectionMode current_eye_gaze_correction_mode; [MinVersion=4] array? supported_background_segmentation_mask_states; [MinVersion=4] bool current_background_segmentation_mask_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=73" + }, + "media.mojom.Point2D": { + "definition": "struct Point2D { double x; double y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=210" + }, + "media.mojom.PhotoSettings": { + "definition": "struct PhotoSettings { bool has_white_balance_mode; MeteringMode white_balance_mode; bool has_exposure_mode; MeteringMode exposure_mode; bool has_focus_mode; MeteringMode focus_mode; array points_of_interest; bool has_exposure_compensation; double exposure_compensation; bool has_exposure_time; double exposure_time; bool has_color_temperature; double color_temperature; bool has_iso; double iso; bool has_brightness; double brightness; bool has_contrast; double contrast; bool has_saturation; double saturation; bool has_sharpness; double sharpness; bool has_focus_distance; double focus_distance; bool has_pan; double pan; bool has_tilt; double tilt; bool has_zoom; double zoom; bool has_torch; bool torch; bool has_fill_light_mode; FillLightMode fill_light_mode; bool has_width; double width; bool has_height; double height; bool has_red_eye_reduction; bool red_eye_reduction; [MinVersion=1] bool has_background_blur_mode; [MinVersion=1] BackgroundBlurMode background_blur_mode; [MinVersion=2] bool has_face_framing_mode; [MinVersion=2] MeteringMode face_framing_mode; [MinVersion=3] EyeGazeCorrectionMode? eye_gaze_correction_mode; [MinVersion=4] bool? background_segmentation_mask_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=219" + }, + "media.mojom.Blob": { + "definition": "struct Blob { string mime_type; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=288" + }, + "media.mojom.BackgroundBlurMode": { + "definition": "enum BackgroundBlurMode { [Default] OFF, BLUR};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=19" + }, + "media.mojom.EyeGazeCorrectionMode": { + "definition": "enum EyeGazeCorrectionMode { [Default] OFF, ON, STARE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=26" + }, + "media.mojom.MeteringMode": { + "definition": "enum MeteringMode { NONE, MANUAL, SINGLE_SHOT, CONTINUOUS };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=35" + }, + "media.mojom.RedEyeReduction": { + "definition": "enum RedEyeReduction { NEVER, ALWAYS, CONTROLLABLE };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=39" + }, + "media.mojom.FillLightMode": { + "definition": "enum FillLightMode { OFF, AUTO, FLASH };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/image_capture.mojom;l=43" + }, + "media.mojom.VideoCaptureObserver.OnStateChanged": { + "definition": "OnStateChanged(VideoCaptureResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=71" + }, + "media.mojom.VideoCaptureObserver.OnNewBuffer": { + "definition": "OnNewBuffer(int32 buffer_id, media.mojom.VideoBufferHandle buffer_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=76" + }, + "media.mojom.VideoCaptureObserver.OnBufferReady": { + "definition": "OnBufferReady(ReadyBuffer buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=79" + }, + "media.mojom.VideoCaptureObserver.OnBufferDestroyed": { + "definition": "OnBufferDestroyed(int32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=83" + }, + "media.mojom.VideoCaptureObserver.OnFrameDropped": { + "definition": "OnFrameDropped(media.mojom.VideoCaptureFrameDropReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=87" + }, + "media.mojom.VideoCaptureObserver.OnNewCaptureVersion": { + "definition": "OnNewCaptureVersion(media.mojom.CaptureVersion capture_version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=91" + }, + "media.mojom.VideoCaptureHost.Start": { + "definition": "Start(mojo_base.mojom.UnguessableToken device_id, mojo_base.mojom.UnguessableToken session_id, VideoCaptureParams params, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=98" + }, + "media.mojom.VideoCaptureHost.Stop": { + "definition": "Stop(mojo_base.mojom.UnguessableToken device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=104" + }, + "media.mojom.VideoCaptureHost.Pause": { + "definition": "Pause(mojo_base.mojom.UnguessableToken device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=107" + }, + "media.mojom.VideoCaptureHost.Resume": { + "definition": "Resume(mojo_base.mojom.UnguessableToken device_id, mojo_base.mojom.UnguessableToken session_id, VideoCaptureParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=110" + }, + "media.mojom.VideoCaptureHost.RequestRefreshFrame": { + "definition": "RequestRefreshFrame(mojo_base.mojom.UnguessableToken device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=116" + }, + "media.mojom.VideoCaptureHost.ReleaseBuffer": { + "definition": "ReleaseBuffer(mojo_base.mojom.UnguessableToken device_id, int32 buffer_id, VideoCaptureFeedback feedback);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=119" + }, + "media.mojom.VideoCaptureHost.GetDeviceSupportedFormats": { + "definition": "GetDeviceSupportedFormats(mojo_base.mojom.UnguessableToken device_id, mojo_base.mojom.UnguessableToken session_id) => (array formats_supported);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=123" + }, + "media.mojom.VideoCaptureHost.GetDeviceFormatsInUse": { + "definition": "GetDeviceFormatsInUse(mojo_base.mojom.UnguessableToken device_id, mojo_base.mojom.UnguessableToken session_id) => (array formats_in_use);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=128" + }, + "media.mojom.VideoCaptureHost.OnLog": { + "definition": "OnLog(mojo_base.mojom.UnguessableToken device_id, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=133" + }, + "media.mojom.VideoCaptureState": { + "definition": "enum VideoCaptureState { STARTED, PAUSED, RESUMED, STOPPED, ENDED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=53" + }, + "media.mojom.VideoCaptureResult": { + "definition": "union VideoCaptureResult { VideoCaptureState state; media.mojom.VideoCaptureError error_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture.mojom;l=61" + }, + "media.mojom.VideoFrameInfo": { + "definition": "struct VideoFrameInfo { mojo_base.mojom.TimeDelta timestamp; VideoFrameMetadata metadata; VideoCapturePixelFormat pixel_format; gfx.mojom.Size coded_size; gfx.mojom.Rect visible_rect; bool is_premapped; gfx.mojom.ColorSpace color_space; PlaneStrides? strides;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_buffer.mojom;l=18" + }, + "media.mojom.ReadyBuffer": { + "definition": "struct ReadyBuffer { int32 buffer_id; VideoFrameInfo info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_buffer.mojom;l=38" + }, + "media.mojom.SharedImageBufferHandleSet": { + "definition": "struct SharedImageBufferHandleSet { gpu.mojom.ExportedSharedImage shared_image; gpu.mojom.SyncToken sync_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_buffer.mojom;l=45" + }, + "media.mojom.VideoBufferHandle": { + "definition": "union VideoBufferHandle { mojo_base.mojom.UnsafeSharedMemoryRegion unsafe_shmem_region; mojo_base.mojom.ReadOnlySharedMemoryRegion read_only_shmem_region; SharedImageBufferHandleSet shared_image_handle; gfx.mojom.GpuMemoryBufferHandle gpu_memory_buffer_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_buffer.mojom;l=50" + }, + "media.mojom.VideoCaptureControlSupport": { + "definition": "struct VideoCaptureControlSupport { bool pan; bool tilt; bool zoom;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=116" + }, + "media.mojom.VideoCaptureFormat": { + "definition": "struct VideoCaptureFormat { gfx.mojom.Size frame_size; float frame_rate; VideoCapturePixelFormat pixel_format;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=315" + }, + "media.mojom.VideoCaptureParams": { + "definition": "struct VideoCaptureParams { VideoCaptureFormat requested_format; VideoCaptureBufferType buffer_type; ResolutionChangePolicy resolution_change_policy; PowerLineFrequency power_line_frequency; bool enable_face_detection; [MinVersion=1] bool is_high_dpi_enabled; [MinVersion=2] uint32 capture_version_source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=322" + }, + "media.mojom.VideoCaptureFeedback": { + "definition": "struct VideoCaptureFeedback { double resource_utilization; float max_framerate_fps; int32 max_pixels; bool require_mapped_frame; [MinVersion=1] array? DEPRECATED_mapped_sizes; [MinVersion=2] int32 frame_id = 0; [MinVersion=2] bool has_frame_id = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=340" + }, + "media.mojom.PlaneStrides": { + "definition": "struct PlaneStrides { array stride_by_plane;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=386" + }, + "media.mojom.VideoCaptureDeviceDescriptor": { + "definition": "struct VideoCaptureDeviceDescriptor { string display_name; string device_id; string model_id; VideoFacingMode facing_mode; VideoCaptureApi capture_api; VideoCaptureControlSupport control_support; VideoCaptureTransportType transport_type; [MinVersion=1] CameraAvailability? availability;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=396" + }, + "media.mojom.VideoCaptureDeviceInfo": { + "definition": "struct VideoCaptureDeviceInfo { VideoCaptureDeviceDescriptor descriptor; array supported_formats;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=410" + }, + "media.mojom.VideoCapturePixelFormat": { + "definition": "enum VideoCapturePixelFormat { UNKNOWN, I420, YV12, I422, I420A, I444, NV12, NV21, UYVY, YUY2, ARGB, XRGB, RGB24, MJPEG, YUV420P9_DEPRECATED, YUV420P10, YUV422P9_DEPRECATED, YUV422P10, YUV444P9_DEPRECATED, YUV444P10, YUV420P12, YUV422P12, YUV444P12, Y16, ABGR, XBGR, P010LE, XR30, XB30, BGRA, RGBAF16, [MinVersion=1] I422A, [MinVersion=1] I444A, [MinVersion=1] YUV420AP10, [MinVersion=1] YUV422AP10, [MinVersion=1] YUV444AP10, [MinVersion=2] NV12A, [MinVersion=3] NV16, [MinVersion=3] NV24, [MinVersion=3] P210LE, [MinVersion=3] P410LE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=10" + }, + "media.mojom.ResolutionChangePolicy": { + "definition": "enum ResolutionChangePolicy { FIXED_RESOLUTION, FIXED_ASPECT_RATIO, ANY_WITHIN_LIMIT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=55" + }, + "media.mojom.PowerLineFrequency": { + "definition": "enum PowerLineFrequency { DEFAULT, HZ_50, HZ_60};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=62" + }, + "media.mojom.VideoFacingMode": { + "definition": "enum VideoFacingMode { NONE, USER, ENVIRONMENT};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=69" + }, + "media.mojom.CameraAvailability": { + "definition": "enum CameraAvailability { [Default] kAvailable, kUnavailableExclusivelyUsedByOtherApplication,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=76" + }, + "media.mojom.VideoCaptureApi": { + "definition": "enum VideoCaptureApi { LINUX_V4L2_SINGLE_PLANE, WIN_MEDIA_FOUNDATION, WIN_MEDIA_FOUNDATION_SENSOR, WIN_DIRECT_SHOW, MACOSX_AVFOUNDATION, MACOSX_DECKLINK, ANDROID_API1, ANDROID_API2_LEGACY, ANDROID_API2_FULL, ANDROID_API2_LIMITED, FUCHSIA_CAMERA3, VIRTUAL_DEVICE, UNKNOWN, [MinVersion=1] WEBRTC_LINUX_PIPEWIRE_SINGLE_PLANE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=82" + }, + "media.mojom.VideoCaptureTransportType": { + "definition": "enum VideoCaptureTransportType { APPLE_USB_OR_BUILT_IN, OTHER_TRANSPORT};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=100" + }, + "media.mojom.VideoCaptureBufferType": { + "definition": "enum VideoCaptureBufferType { kSharedMemory, kSharedMemoryViaRawFileDescriptor_DEPRECATED, kMailboxHolder, kGpuMemoryBuffer};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=107" + }, + "media.mojom.VideoCaptureError": { + "definition": "enum VideoCaptureError { kNone, kVideoCaptureControllerInvalidOrUnsupportedVideoCaptureParametersRequested, kVideoCaptureControllerIsAlreadyInErrorState, kVideoCaptureManagerDeviceConnectionLost, kFrameSinkVideoCaptureDeviceAlreadyEndedOnFatalError, kFrameSinkVideoCaptureDeviceEncounteredFatalError, kV4L2FailedToOpenV4L2DeviceDriverFile, kV4L2ThisIsNotAV4L2VideoCaptureDevice, kV4L2FailedToFindASupportedCameraFormat, kV4L2FailedToSetVideoCaptureFormat, kV4L2UnsupportedPixelFormat, kV4L2FailedToSetCameraFramerate, kV4L2ErrorRequestingMmapBuffers, kV4L2AllocateBufferFailed, kV4L2VidiocStreamonFailed, kV4L2VidiocStreamoffFailed, kV4L2FailedToVidiocReqbufsWithCount0, kV4L2PollFailed, kV4L2MultipleContinuousTimeoutsWhileReadPolling, kV4L2FailedToDequeueCaptureBuffer, kV4L2FailedToEnqueueCaptureBuffer, kSingleClientVideoCaptureHostLostConnectionToDevice, kSingleClientVideoCaptureDeviceLaunchAborted, kDesktopCaptureDeviceWebrtcDesktopCapturerHasFailed, kFileVideoCaptureDeviceCouldNotOpenVideoFile, kDeviceCaptureLinuxFailedToCreateVideoCaptureDelegate, kErrorFakeDeviceIntentionallyEmittingErrorEvent, kDeviceClientTooManyFramesDroppedY16, kDeviceMediaToMojoAdapterEncounteredUnsupportedBufferType, kVideoCaptureManagerProcessDeviceStartQueueDeviceInfoNotFound, kInProcessDeviceLauncherFailedToCreateDeviceInstance, kServiceDeviceLauncherLostConnectionToDeviceFactoryDuringDeviceStart, kServiceDeviceLauncherServiceRespondedWithDeviceNotFound, kServiceDeviceLauncherConnectionLostWhileWaitingForCallback, kIntentionalErrorRaisedByUnitTest, kCrosHalV3FailedToStartDeviceThread, kCrosHalV3DeviceDelegateMojoConnectionError, kCrosHalV3DeviceDelegateFailedToGetCameraInfo, kCrosHalV3DeviceDelegateMissingSensorOrientationInfo, kCrosHalV3DeviceDelegateFailedToOpenCameraDevice, kCrosHalV3DeviceDelegateFailedToInitializeCameraDevice, kCrosHalV3DeviceDelegateFailedToConfigureStreams, kCrosHalV3DeviceDelegateWrongNumberOfStreamsConfigured, kCrosHalV3DeviceDelegateFailedToGetDefaultRequestSettings, kCrosHalV3BufferManagerHalRequestedTooManyBuffers, kCrosHalV3BufferManagerFailedToCreateMappableSI, kCrosHalV3BufferManagerFailedToMapGpuMemoryBuffer, kCrosHalV3BufferManagerUnsupportedVideoPixelFormat, kCrosHalV3BufferManagerFailedToDupFd, kCrosHalV3BufferManagerFailedToWrapGpuMemoryHandle, kCrosHalV3BufferManagerFailedToRegisterBuffer, kCrosHalV3BufferManagerProcessCaptureRequestFailed, kCrosHalV3BufferManagerInvalidPendingResultId, kCrosHalV3BufferManagerReceivedDuplicatedPartialMetadata, kCrosHalV3BufferManagerIncorrectNumberOfOutputBuffersReceived, kCrosHalV3BufferManagerInvalidTypeOfOutputBuffersReceived, kCrosHalV3BufferManagerReceivedMultipleResultBuffersForFrame, kCrosHalV3BufferManagerUnknownStreamInCamera3NotifyMsg, kCrosHalV3BufferManagerReceivedInvalidShutterTime, kCrosHalV3BufferManagerFatalDeviceError, kCrosHalV3BufferManagerReceivedFrameIsOutOfOrder, kCrosHalV3BufferManagerFailedToUnwrapReleaseFenceFd, kCrosHalV3BufferManagerSyncWaitOnReleaseFenceTimedOut, kCrosHalV3BufferManagerInvalidJpegBlob, kAndroidFailedToAllocate, kAndroidFailedToStartCapture, kAndroidFailedToStopCapture, kAndroidApi1CameraErrorCallbackReceived, kAndroidApi2CameraDeviceErrorReceived, kAndroidApi2CaptureSessionConfigureFailed, kAndroidApi2ImageReaderUnexpectedImageFormat, kAndroidApi2ImageReaderSizeDidNotMatchImageSize, kAndroidApi2ErrorRestartingPreview, kAndroidScreenCaptureUnsupportedFormat, kAndroidScreenCaptureFailedToStartCaptureMachine, kAndroidScreenCaptureTheUserDeniedScreenCapture, kAndroidScreenCaptureFailedToStartScreenCapture, kWinDirectShowCantGetCaptureFormatSettings, kWinDirectShowFailedToGetNumberOfCapabilities, kWinDirectShowFailedToGetCaptureDeviceCapabilities, kWinDirectShowFailedToSetCaptureDeviceOutputFormat, kWinDirectShowFailedToConnectTheCaptureGraph, kWinDirectShowFailedToPauseTheCaptureDevice, kWinDirectShowFailedToStartTheCaptureDevice, kWinDirectShowFailedToStopTheCaptureGraph, kWinMediaFoundationEngineIsNull, kWinMediaFoundationEngineGetSourceFailed , kWinMediaFoundationFillPhotoCapabilitiesFailed , kWinMediaFoundationFillVideoCapabilitiesFailed, kWinMediaFoundationNoVideoCapabilityFound, kWinMediaFoundationGetAvailableDeviceMediaTypeFailed, kWinMediaFoundationSetCurrentDeviceMediaTypeFailed, kWinMediaFoundationEngineGetSinkFailed, kWinMediaFoundationSinkQueryCapturePreviewInterfaceFailed, kWinMediaFoundationSinkRemoveAllStreamsFailed, kWinMediaFoundationCreateSinkVideoMediaTypeFailed, kWinMediaFoundationConvertToVideoSinkMediaTypeFailed, kWinMediaFoundationSinkAddStreamFailed, kWinMediaFoundationSinkSetSampleCallbackFailed, kWinMediaFoundationEngineStartPreviewFailed, kWinMediaFoundationGetMediaEventStatusFailed, kMacSetCaptureDeviceFailed, kMacCouldNotStartCaptureDevice, kMacReceivedFrameWithUnexpectedResolution, kMacUpdateCaptureResolutionFailed, kMacDeckLinkDeviceIdNotFoundInTheSystem, kMacDeckLinkErrorQueryingInputInterface, kMacDeckLinkErrorCreatingDisplayModeIterator, kMacDeckLinkCouldNotFindADisplayMode, kMacDeckLinkCouldNotSelectTheVideoFormatWeLike, kMacDeckLinkCouldNotStartCapturing, kMacDeckLinkUnsupportedPixelFormat, kMacAvFoundationReceivedAVCaptureSessionRuntimeErrorNotification, kAndroidApi2ErrorConfiguringCamera, kCrosHalV3DeviceDelegateFailedToFlush, kFuchsiaCameraDeviceDisconnected, kFuchsiaCameraStreamDisconnected, kFuchsiaSysmemDidNotSetImageFormat, kFuchsiaSysmemInvalidBufferIndex, kFuchsiaSysmemInvalidBufferSize, kFuchsiaUnsupportedPixelFormat, kFuchsiaFailedToMapSysmemBuffer, kCrosHalV3DeviceContextDuplicatedClient, kDesktopCaptureDeviceMacFailedStreamCreate, kDesktopCaptureDeviceMacFailedStreamStart, kCrosHalV3BufferManagerFailedToReserveBuffers, [MinVersion=1] kWinMediaFoundationSystemPermissionDenied, [MinVersion=2] kVideoCaptureImplTimedOutOnStart, [MinVersion=3] kLacrosVideoCaptureDeviceProxyAlreadyEndedOnFatalError, [MinVersion=3] kLacrosVideoCaptureDeviceProxyEncounteredFatalError, [MinVersion=4] kScreenCaptureKitFailedGetShareableContent, [MinVersion=4] kScreenCaptureKitFailedAddStreamOutput, [MinVersion=4] kScreenCaptureKitFailedStartCapture, [MinVersion=4] kScreenCaptureKitFailedStopCapture, [MinVersion=4] kScreenCaptureKitStreamError, [MinVersion=4] kScreenCaptureKitFailedToFindSCDisplay, [MinVersion=5] kVideoCaptureControllerInvalid, [MinVersion=5] kVideoCaptureDeviceFactoryChromeOSCreateDeviceFailed, [MinVersion=5] kVideoCaptureControllerUnsupportedPixelFormat, [MinVersion=5] kVideoCaptureDeviceAlreadyReleased, [MinVersion=5] kVideoCaptureSystemDeviceIdNotFound, [MinVersion=5] kVideoCaptureDeviceFactoryWinUnknownError, [MinVersion=5] kWinMediaFoundationDeviceInitializationFailed, [MinVersion=5] kWinMediaFoundationSourceCreationFailed, [MinVersion=5] kWinDirectShowDeviceFilterCreationFailed, [MinVersion=5] kWinDirectShowDeviceInitializationFailed, [MinVersion=6] kVideoCaptureDeviceFactorySecondCreateDenied, [MinVersion=7] kScreenCaptureKitResetStreamError, [MinVersion=8] kWinMediaFoundationCameraBusy, [MinVersion=9] kWebRtcStartCaptureFailed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=123" + }, + "media.mojom.VideoCaptureFrameDropReason": { + "definition": "enum VideoCaptureFrameDropReason { kNone, kDeviceClientFrameHasInvalidFormat, kDeviceClientLibyuvConvertToI420Failed, kV4L2BufferErrorFlagWasSet, kV4L2InvalidNumberOfBytesInBuffer, kAndroidThrottling, kAndroidGetByteArrayElementsFailed, kAndroidApi1UnexpectedDataLength, kAndroidApi2AcquiredImageIsNull, kWinDirectShowUnexpectedSampleLength, kWinDirectShowFailedToGetMemoryPointerFromMediaSample, kWinMediaFoundationReceivedSampleIsNull, kWinMediaFoundationLockingBufferDelieveredNullptr, kWinMediaFoundationGetBufferByIndexReturnedNull, kBufferPoolMaxBufferCountExceeded, kBufferPoolBufferAllocationFailed, kVideoCaptureImplNotInStartedState, kVideoCaptureImplFailedToWrapDataAsMediaVideoFrame, kVideoTrackAdapterHasNoResolutionAdapters, kResolutionAdapterFrameIsNotValid, kResolutionAdapterWrappingFrameForCroppingFailed, kResolutionAdapterTimestampTooCloseToPrevious_DEPRECATED, kResolutionAdapterFrameRateIsHigherThanRequested, kResolutionAdapterHasNoCallbacks, kVideoTrackFrameDelivererNotEnabledReplacingWithBlackFrame, kRendererSinkFrameDelivererIsNotStarted, [MinVersion=1] kCropVersionNotCurrent_DEPRECATED, [MinVersion=5] kGpuMemoryBufferMapFailed, [MinVersion=12] kSubCaptureTargetVersionNotCurrent_DEPRECATED, [MinVersion=13] kPostProcessingFailed, [MinVersion=14] kResolutionAdapterFrameIsNotMappable, [MinVersion=14] kResolutionAdapterCannotCreateConvertFrame, [MinVersion=14] kResolutionAdapterConvertAndScaleFailed, [MinVersion=15] kOldCaptureVersion,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=277" + }, + "media.mojom.SubCaptureTargetType": { + "definition": "enum SubCaptureTargetType { kCropTarget, kRestrictionTarget};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=415" + }, + "media.mojom.ApplySubCaptureTargetResult": { + "definition": "enum ApplySubCaptureTargetResult { kSuccess, kErrorGeneric, kUnsupportedCaptureDevice, kNotImplemented, kNonIncreasingVersion, kInvalidTarget,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=423" + }, + "media.mojom.DeviceEnumerationResult": { + "definition": "enum DeviceEnumerationResult { kSuccess, kUnknownError, kErrorCaptureServiceCrash, kErrorCaptureServiceDroppedRequest};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/mojom/video_capture_types.mojom;l=432" + }, + "cros.mojom.Camera3CallbackOps.ProcessCaptureResult@0": { + "definition": "ProcessCaptureResult@0(Camera3CaptureResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=241" + }, + "cros.mojom.Camera3CallbackOps.Notify@1": { + "definition": "Notify@1(Camera3NotifyMsg msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=245" + }, + "cros.mojom.Camera3CallbackOps.RequestStreamBuffers@2": { + "definition": "[MinVersion=5] RequestStreamBuffers@2(array buffer_reqs) => (Camera3BufferRequestStatus result, array returned_buf_reqs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=249" + }, + "cros.mojom.Camera3CallbackOps.ReturnStreamBuffers@3": { + "definition": "[MinVersion=5] ReturnStreamBuffers@3(array buffers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=256" + }, + "cros.mojom.Camera3DeviceOps.Initialize@0": { + "definition": "Initialize@0(pending_remote callback_ops) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=318" + }, + "cros.mojom.Camera3DeviceOps.ConfigureStreams@1": { + "definition": "ConfigureStreams@1(Camera3StreamConfiguration config) => (int32 result, Camera3StreamConfiguration? updated_config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=323" + }, + "cros.mojom.Camera3DeviceOps.ConstructDefaultRequestSettings@2": { + "definition": "ConstructDefaultRequestSettings@2(Camera3RequestTemplate type) => (CameraMetadata? settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=328" + }, + "cros.mojom.Camera3DeviceOps.ProcessCaptureRequest@3": { + "definition": "ProcessCaptureRequest@3(Camera3CaptureRequest request) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=334" + }, + "cros.mojom.Camera3DeviceOps.Dump@4": { + "definition": "Dump@4(handle fd);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=338" + }, + "cros.mojom.Camera3DeviceOps.Flush@5": { + "definition": "Flush@5() => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=342" + }, + "cros.mojom.Camera3DeviceOps.RegisterBuffer@6": { + "definition": "RegisterBuffer@6(uint64 buffer_id, BufferType type, array fds, uint32 drm_format, HalPixelFormat hal_pixel_format, uint32 width, uint32 height, array strides, array offsets) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=361" + }, + "cros.mojom.Camera3DeviceOps.Close@7": { + "definition": "Close@7() => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=368" + }, + "cros.mojom.Camera3DeviceOps.ConfigureStreamsAndGetAllocatedBuffers@8": { + "definition": "[MinVersion=3] ConfigureStreamsAndGetAllocatedBuffers@8(Camera3StreamConfiguration config) => (int32 result, Camera3StreamConfiguration? updated_config, map> allocated_buffers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=373" + }, + "cros.mojom.Camera3DeviceOps.SignalStreamFlush@9": { + "definition": "[MinVersion=5] SignalStreamFlush@9(array stream_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=382" + }, + "cros.mojom.Camera3DeviceOps.OnNewBuffer@10": { + "definition": "[MinVersion=8] OnNewBuffer@10(CameraBufferHandle buffer) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=388" + }, + "cros.mojom.Camera3DeviceOps.OnBufferRetired@11": { + "definition": "[MinVersion=8] OnBufferRetired@11(uint64 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=393" + }, + "cros.mojom.CropRotateScaleInfo": { + "definition": "struct CropRotateScaleInfo { Camera3StreamRotation crop_rotate_scale_degrees;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=49" + }, + "cros.mojom.Camera3Stream": { + "definition": "struct Camera3Stream { uint64 id; Camera3StreamType stream_type; uint32 width; uint32 height; HalPixelFormat format; uint32 usage; uint32 max_buffers; uint32 data_space; Camera3StreamRotation rotation; [MinVersion=1] CropRotateScaleInfo? crop_rotate_scale_info; [MinVersion=4] string? physical_camera_id; [MinVersion=6] array? effects;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=74" + }, + "cros.mojom.Camera3StreamConfiguration": { + "definition": "struct Camera3StreamConfiguration { array streams; Camera3StreamConfigurationMode operation_mode; [MinVersion=4] CameraMetadata? session_parameters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=94" + }, + "cros.mojom.CameraBufferHandle": { + "definition": "struct CameraBufferHandle { uint64 buffer_id; array fds; uint32 drm_format; HalPixelFormat hal_pixel_format; uint32 width; uint32 height; array strides; array offsets; [MinVersion=3] array? sizes; [MinVersion=7] bool has_modifier; [MinVersion=7] uint64 modifier;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=108" + }, + "cros.mojom.Camera3StreamBuffer": { + "definition": "struct Camera3StreamBuffer { uint64 stream_id; uint64 buffer_id; Camera3BufferStatus status; handle? acquire_fence; handle? release_fence; [MinVersion=2] CameraBufferHandle? buffer_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=126" + }, + "cros.mojom.Camera3ErrorMsg": { + "definition": "struct Camera3ErrorMsg { uint32 frame_number; uint64 error_stream_id; Camera3ErrorMsgCode error_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=147" + }, + "cros.mojom.Camera3ShutterMsg": { + "definition": "struct Camera3ShutterMsg { uint32 frame_number; uint64 timestamp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=153" + }, + "cros.mojom.Camera3NotifyMsg": { + "definition": "struct Camera3NotifyMsg { Camera3MsgType type; Camera3NotifyMsgMessage message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=164" + }, + "cros.mojom.Camera3BufferRequest": { + "definition": "struct Camera3BufferRequest { uint64 stream_id; uint32 num_buffers_requested;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=185" + }, + "cros.mojom.Camera3StreamBufferRet": { + "definition": "struct Camera3StreamBufferRet { uint64 stream_id; Camera3StreamBufferReqStatus status; array? output_buffers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=190" + }, + "cros.mojom.Camera3PhyscamMetadata": { + "definition": "struct Camera3PhyscamMetadata { int32 id; CameraMetadata metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=206" + }, + "cros.mojom.Camera3CaptureRequest": { + "definition": "struct Camera3CaptureRequest { uint32 frame_number; CameraMetadata settings; Camera3StreamBuffer? input_buffer; array output_buffers; [MinVersion=4] array? physcam_settings;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=214" + }, + "cros.mojom.Camera3CaptureResult": { + "definition": "struct Camera3CaptureResult { uint32 frame_number; CameraMetadata result; array? output_buffers; Camera3StreamBuffer? input_buffer; uint32 partial_result; [MinVersion=4] array? physcam_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=223" + }, + "cros.mojom.HalPixelFormat": { + "definition": "enum HalPixelFormat { HAL_PIXEL_FORMAT_RGBA_8888 = 0x1, HAL_PIXEL_FORMAT_RGBX_8888 = 0x2, HAL_PIXEL_FORMAT_BGRA_8888 = 0x5, HAL_PIXEL_FORMAT_YCrCb_420_SP = 0x11, HAL_PIXEL_FORMAT_YCbCr_422_I = 0x14, HAL_PIXEL_FORMAT_BLOB = 0x21, HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED = 0x22, HAL_PIXEL_FORMAT_YCbCr_420_888 = 0x23, HAL_PIXEL_FORMAT_YV12 = 0x32315659,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=34" + }, + "cros.mojom.Camera3StreamType": { + "definition": "enum Camera3StreamType { CAMERA3_STREAM_OUTPUT = 0, CAMERA3_STREAM_INPUT = 1, CAMERA3_STREAM_BIDIRECTIONAL = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=56" + }, + "cros.mojom.Camera3StreamRotation": { + "definition": "enum Camera3StreamRotation { CAMERA3_STREAM_ROTATION_0 = 0, CAMERA3_STREAM_ROTATION_90 = 1, CAMERA3_STREAM_ROTATION_180 = 2, CAMERA3_STREAM_ROTATION_270 = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=62" + }, + "cros.mojom.Camera3StreamConfigurationMode": { + "definition": "enum Camera3StreamConfigurationMode { CAMERA3_STREAM_CONFIGURATION_NORMAL_MODE = 0, CAMERA3_STREAM_CONFIGURATION_CONSTRAINED_HIGH_SPEED_MODE =1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=69" + }, + "cros.mojom.Camera3BufferStatus": { + "definition": "enum Camera3BufferStatus { CAMERA3_BUFFER_STATUS_OK = 0, CAMERA3_BUFFER_STATUS_ERROR = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=101" + }, + "cros.mojom.Camera3MsgType": { + "definition": "enum Camera3MsgType { CAMERA3_MSG_ERROR = 1, CAMERA3_MSG_SHUTTER = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=135" + }, + "cros.mojom.Camera3ErrorMsgCode": { + "definition": "enum Camera3ErrorMsgCode { CAMERA3_MSG_ERROR_DEVICE = 1, CAMERA3_MSG_ERROR_REQUEST = 2, CAMERA3_MSG_ERROR_RESULT = 3, CAMERA3_MSG_ERROR_BUFFER = 4};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=140" + }, + "cros.mojom.Camera3BufferRequestStatus": { + "definition": "enum Camera3BufferRequestStatus { CAMERA3_BUF_REQ_OK = 0, CAMERA3_BUF_REQ_FAILED_PARTIAL = 1, CAMERA3_BUF_REQ_FAILED_CONFIGURING = 2, CAMERA3_BUF_REQ_FAILED_ILLEGAL_ARGUMENTS = 3, CAMERA3_BUF_REQ_FAILED_UNKNOWN = 4};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=169" + }, + "cros.mojom.Camera3StreamBufferReqStatus": { + "definition": "enum Camera3StreamBufferReqStatus { CAMERA3_PS_BUF_REQ_OK = 0, CAMERA3_PS_BUF_REQ_NO_BUFFER_AVAILABLE = 1, CAMERA3_PS_BUF_REQ_MAX_BUFFER_EXCEEDED = 2, CAMERA3_PS_BUF_REQ_STREAM_DISCONNECTED = 3, CAMERA3_PS_BUF_REQ_UNKNOWN_ERROR = 4};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=177" + }, + "cros.mojom.Camera3RequestTemplate": { + "definition": "enum Camera3RequestTemplate { CAMERA3_TEMPLATE_PREVIEW = 1, CAMERA3_TEMPLATE_STILL_CAPTURE = 2, CAMERA3_TEMPLATE_VIDEO_RECORD = 3, CAMERA3_TEMPLATE_VIDEO_SNAPSHOT = 4, CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG = 5, CAMERA3_TEMPLATE_MANUAL = 6, CAMERA3_TEMPLATE_COUNT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=196" + }, + "cros.mojom.BufferType": { + "definition": "enum BufferType { DMABUF = 0, SHM = 1, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=349" + }, + "cros.mojom.Camera3NotifyMsgMessage": { + "definition": "union Camera3NotifyMsgMessage { Camera3ErrorMsg error; Camera3ShutterMsg shutter; array generic;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera3.mojom;l=158" + }, + "cros.mojom.CameraAppDeviceProvider.GetCameraAppDevice": { + "definition": "GetCameraAppDevice(string source_id) => (GetCameraAppDeviceStatus status, pending_remote? device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=49" + }, + "cros.mojom.CameraAppDeviceProvider.IsSupported": { + "definition": "IsSupported() => (bool is_supported);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=56" + }, + "cros.mojom.CameraAppDeviceProvider.IsDeviceInUse": { + "definition": "IsDeviceInUse(string source_id) => (bool in_use);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=59" + }, + "cros.mojom.CameraAppDeviceBridge.GetCameraAppDevice": { + "definition": "GetCameraAppDevice(string device_id) => (GetCameraAppDeviceStatus status, pending_remote? device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=67" + }, + "cros.mojom.CameraAppDeviceBridge.IsSupported": { + "definition": "IsSupported() => (bool is_supported);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=74" + }, + "cros.mojom.CameraAppDeviceBridge.SetVirtualDeviceEnabled": { + "definition": "SetVirtualDeviceEnabled(string device_id, bool enabled) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=79" + }, + "cros.mojom.CameraAppDeviceBridge.IsDeviceInUse": { + "definition": "IsDeviceInUse(string device_id) => (bool in_use);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=82" + }, + "cros.mojom.CameraAppDevice.TakePortraitModePhoto": { + "definition": "TakePortraitModePhoto( pending_remote observer) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=92" + }, + "cros.mojom.CameraAppDevice.SetFpsRange": { + "definition": "SetFpsRange(gfx.mojom.Range fps_range) => (bool is_success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=100" + }, + "cros.mojom.CameraAppDevice.SetStillCaptureResolution": { + "definition": "SetStillCaptureResolution(gfx.mojom.Size resolution) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=104" + }, + "cros.mojom.CameraAppDevice.SetCaptureIntent": { + "definition": "SetCaptureIntent(CaptureIntent intent) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=110" + }, + "cros.mojom.CameraAppDevice.AddResultMetadataObserver": { + "definition": "AddResultMetadataObserver(pending_remote observer, StreamType stream_type) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=114" + }, + "cros.mojom.CameraAppDevice.AddCameraEventObserver": { + "definition": "AddCameraEventObserver(pending_remote observer) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=119" + }, + "cros.mojom.CameraAppDevice.SetCameraFrameRotationEnabledAtSource": { + "definition": "SetCameraFrameRotationEnabledAtSource(bool is_enabled) => (bool is_success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=123" + }, + "cros.mojom.CameraAppDevice.GetCameraFrameRotation": { + "definition": "GetCameraFrameRotation() => (uint32 rotation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=129" + }, + "cros.mojom.CameraAppDevice.RegisterDocumentCornersObserver": { + "definition": "RegisterDocumentCornersObserver( pending_remote observer) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=132" + }, + "cros.mojom.CameraAppDevice.SetMultipleStreamsEnabled": { + "definition": "SetMultipleStreamsEnabled(bool enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=137" + }, + "cros.mojom.CameraAppDevice.RegisterCameraInfoObserver": { + "definition": "RegisterCameraInfoObserver( pending_remote observer) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=140" + }, + "cros.mojom.CameraAppDevice.SetCropRegion": { + "definition": "SetCropRegion(gfx.mojom.Rect crop_region) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=146" + }, + "cros.mojom.CameraAppDevice.ResetCropRegion": { + "definition": "ResetCropRegion() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=150" + }, + "cros.mojom.ResultMetadataObserver.OnMetadataAvailable": { + "definition": "OnMetadataAvailable(CameraMetadata camera_metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=157" + }, + "cros.mojom.CameraEventObserver.OnShutterDone": { + "definition": "OnShutterDone();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=163" + }, + "cros.mojom.DocumentCornersObserver.OnDocumentCornersUpdated": { + "definition": "OnDocumentCornersUpdated(array corners);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=172" + }, + "cros.mojom.CameraInfoObserver.OnCameraInfoUpdated": { + "definition": "OnCameraInfoUpdated(CameraInfo camera_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=179" + }, + "cros.mojom.StillCaptureResultObserver.OnStillCaptureDone": { + "definition": "OnStillCaptureDone(Effect effect, int32 status, media.mojom.Blob? blob);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=185" + }, + "cros.mojom.Effect": { + "definition": "enum Effect { kNoEffect = 0, kPortraitMode = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=14" + }, + "cros.mojom.StreamType": { + "definition": "enum StreamType { kPreviewOutput = 0, kJpegOutput = 1, kJpegPortraitOutput = 2, kRecordingOutput = 3, kUnknown = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=21" + }, + "cros.mojom.GetCameraAppDeviceStatus": { + "definition": "enum GetCameraAppDeviceStatus { kSuccess = 0, kErrorInvalidId = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=30" + }, + "cros.mojom.CaptureIntent": { + "definition": "enum CaptureIntent { kDefault = 0, kVideoRecord = 1, kStillCapture = 2, kPortraitCapture = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_app.mojom;l=37" + }, + "cros.mojom.CameraModuleCallbacks.CameraDeviceStatusChange@0": { + "definition": "CameraDeviceStatusChange@0(int32 camera_id, CameraDeviceStatus new_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=62" + }, + "cros.mojom.CameraModuleCallbacks.TorchModeStatusChange@1": { + "definition": "[MinVersion=1] TorchModeStatusChange@1(int32 camera_id, TorchModeStatus new_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=67" + }, + "cros.mojom.VendorTagOps.GetTagCount@0": { + "definition": "GetTagCount@0() => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=82" + }, + "cros.mojom.VendorTagOps.GetAllTags@1": { + "definition": "GetAllTags@1() => (array tag_array);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=85" + }, + "cros.mojom.VendorTagOps.GetSectionName@2": { + "definition": "GetSectionName@2(uint32 tag) => (string? name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=88" + }, + "cros.mojom.VendorTagOps.GetTagName@3": { + "definition": "GetTagName@3(uint32 tag) => (string? name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=91" + }, + "cros.mojom.VendorTagOps.GetTagType@4": { + "definition": "GetTagType@4(uint32 tag) => (int32 type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=94" + }, + "cros.mojom.CameraModule.OpenDevice@0": { + "definition": "OpenDevice@0(int32 camera_id, pending_receiver device_ops_receiver) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=105" + }, + "cros.mojom.CameraModule.GetNumberOfCameras@1": { + "definition": "GetNumberOfCameras@1() => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=110" + }, + "cros.mojom.CameraModule.GetCameraInfo@2": { + "definition": "GetCameraInfo@2(int32 camera_id) => (int32 result, CameraInfo? camera_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=113" + }, + "cros.mojom.CameraModule.SetCallbacks@3": { + "definition": "SetCallbacks@3(pending_remote callbacks) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=117" + }, + "cros.mojom.CameraModule.SetTorchMode@4": { + "definition": "[MinVersion=1] SetTorchMode@4(int32 camera_id, bool enabled) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=122" + }, + "cros.mojom.CameraModule.Init@5": { + "definition": "[MinVersion=1] Init@5() => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=128" + }, + "cros.mojom.CameraModule.GetVendorTagOps@6": { + "definition": "[MinVersion=2] GetVendorTagOps@6(pending_receiver vendor_tag_ops_receiver) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=134" + }, + "cros.mojom.CameraModule.SetCallbacksAssociated@7": { + "definition": "[MinVersion=3] SetCallbacksAssociated@7( pending_associated_remote callbacks) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=140" + }, + "cros.mojom.CameraResourceCost": { + "definition": "struct CameraResourceCost { uint32 resource_cost;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=21" + }, + "cros.mojom.CameraInfo": { + "definition": "struct CameraInfo { CameraFacing facing; int32 orientation; uint32 device_version; CameraMetadata static_camera_characteristics; [MinVersion=1] CameraResourceCost? resource_cost; [MinVersion=1] array? conflicting_devices;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=33" + }, + "cros.mojom.CameraFacing": { + "definition": "enum CameraFacing { CAMERA_FACING_BACK = 0, CAMERA_FACING_FRONT = 1, CAMERA_FACING_EXTERNAL = 2, CAMERA_FACING_VIRTUAL_BACK = 3, CAMERA_FACING_VIRTUAL_FRONT = 4, CAMERA_FACING_VIRTUAL_EXTERNAL = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=12" + }, + "cros.mojom.CameraDeviceStatus": { + "definition": "enum CameraDeviceStatus { CAMERA_DEVICE_STATUS_NOT_PRESENT = 0, CAMERA_DEVICE_STATUS_PRESENT = 1, CAMERA_DEVICE_STATUS_ENUMERATING = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=42" + }, + "cros.mojom.TorchModeStatus": { + "definition": "enum TorchModeStatus { TORCH_MODE_STATUS_NOT_AVAILABLE = 0, TORCH_MODE_STATUS_AVAILABLE_OFF = 1, TORCH_MODE_STATUS_AVAILABLE_ON = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_common.mojom;l=48" + }, + "cros.mojom.PortraitModeConfig": { + "definition": "struct PortraitModeConfig { bool enable_rectiface;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_features.mojom;l=20" + }, + "cros.mojom.PortraitModeSegResult": { + "definition": "enum PortraitModeSegResult { kSuccess = 0, kFailure = 1, kTimeout = 2, kNoFaces = 3, kUnknown = 4, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_features.mojom;l=26" + }, + "cros.mojom.Camera3StreamEffect": { + "definition": "union Camera3StreamEffect { [Default] uint8 unknown_config; PortraitModeConfig portrait_mode_config;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_features.mojom;l=11" + }, + "cros.mojom.CameraMetadataEntry": { + "definition": "struct CameraMetadataEntry { uint32 index; CameraMetadataTag tag; EntryType type; uint32 count; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata.mojom;l=22" + }, + "cros.mojom.CameraMetadata": { + "definition": "struct CameraMetadata { uint32 size; uint32 entry_count; uint32 entry_capacity; uint32 data_count; uint32 data_capacity; array? entries;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata.mojom;l=33" + }, + "cros.mojom.EntryType": { + "definition": "enum EntryType { TYPE_BYTE = 0, TYPE_INT32 = 1, TYPE_FLOAT = 2, TYPE_INT64 = 3, TYPE_DOUBLE = 4, TYPE_RATIONAL = 5, NUM_TYPES};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata.mojom;l=9" + }, + ".CameraMetadataSection": { + "definition": "enum CameraMetadataSection { ANDROID_COLOR_CORRECTION = 0x0, ANDROID_CONTROL = 0x1, ANDROID_DEMOSAIC = 0x2, ANDROID_EDGE = 0x3, ANDROID_FLASH = 0x4, ANDROID_FLASH_INFO = 0x5, ANDROID_HOT_PIXEL = 0x6, ANDROID_JPEG = 0x7, ANDROID_LENS = 0x8, ANDROID_LENS_INFO = 0x9, ANDROID_NOISE_REDUCTION = 0xA, ANDROID_QUIRKS = 0xB, ANDROID_REQUEST = 0xC, ANDROID_SCALER = 0xD, ANDROID_SENSOR = 0xE, ANDROID_SENSOR_INFO = 0xF, ANDROID_SHADING = 0x10, ANDROID_STATISTICS = 0x11, ANDROID_STATISTICS_INFO = 0x12, ANDROID_TONEMAP = 0x13, ANDROID_LED = 0x14, ANDROID_INFO = 0x15, ANDROID_BLACK_LEVEL = 0x16, ANDROID_SYNC = 0x17, ANDROID_REPROCESS = 0x18, ANDROID_DEPTH = 0x19, ANDROID_LOGICAL_MULTI_CAMERA = 0x1A, ANDROID_DISTORTION_CORRECTION = 0x1B, ANDROID_HEIC = 0x1C, ANDROID_HEIC_INFO = 0x1D, ANDROID_AUTOMOTIVE = 0x1E, ANDROID_AUTOMOTIVE_LENS = 0x1F, ANDROID_SECTION_COUNT = 0x20, VENDOR_SECTION = 0x8000};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=29" + }, + ".CameraMetadataSectionStart": { + "definition": "enum CameraMetadataSectionStart { ANDROID_COLOR_CORRECTION_START = 0x0, ANDROID_CONTROL_START = 0x10000, ANDROID_DEMOSAIC_START = 0x20000, ANDROID_EDGE_START = 0x30000, ANDROID_FLASH_START = 0x40000, ANDROID_FLASH_INFO_START = 0x50000, ANDROID_HOT_PIXEL_START = 0x60000, ANDROID_JPEG_START = 0x70000, ANDROID_LENS_START = 0x80000, ANDROID_LENS_INFO_START = 0x90000, ANDROID_NOISE_REDUCTION_START = 0xA0000, ANDROID_QUIRKS_START = 0xB0000, ANDROID_REQUEST_START = 0xC0000, ANDROID_SCALER_START = 0xD0000, ANDROID_SENSOR_START = 0xE0000, ANDROID_SENSOR_INFO_START = 0xF0000, ANDROID_SHADING_START = 0x100000, ANDROID_STATISTICS_START = 0x110000, ANDROID_STATISTICS_INFO_START = 0x120000, ANDROID_TONEMAP_START = 0x130000, ANDROID_LED_START = 0x140000, ANDROID_INFO_START = 0x150000, ANDROID_BLACK_LEVEL_START = 0x160000, ANDROID_SYNC_START = 0x170000, ANDROID_REPROCESS_START = 0x180000, ANDROID_DEPTH_START = 0x190000, ANDROID_LOGICAL_MULTI_CAMERA_START = 0x1A0000, ANDROID_DISTORTION_CORRECTION_START = 0x1B0000, ANDROID_HEIC_START = 0x1C0000, ANDROID_HEIC_INFO_START = 0x1D0000, ANDROID_AUTOMOTIVE_START = 0x1E0000, ANDROID_AUTOMOTIVE_LENS_START = 0x1F0000,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=72" + }, + ".CameraMetadataTag": { + "definition": "enum CameraMetadataTag { ANDROID_COLOR_CORRECTION_MODE = 0x0, ANDROID_COLOR_CORRECTION_TRANSFORM, ANDROID_COLOR_CORRECTION_GAINS, ANDROID_COLOR_CORRECTION_ABERRATION_MODE, ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES, ANDROID_COLOR_CORRECTION_END, ANDROID_CONTROL_AE_ANTIBANDING_MODE = 0x10000, ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION, ANDROID_CONTROL_AE_LOCK, ANDROID_CONTROL_AE_MODE, ANDROID_CONTROL_AE_REGIONS, ANDROID_CONTROL_AE_TARGET_FPS_RANGE, ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, ANDROID_CONTROL_AF_MODE, ANDROID_CONTROL_AF_REGIONS, ANDROID_CONTROL_AF_TRIGGER, ANDROID_CONTROL_AWB_LOCK, ANDROID_CONTROL_AWB_MODE, ANDROID_CONTROL_AWB_REGIONS, ANDROID_CONTROL_CAPTURE_INTENT, ANDROID_CONTROL_EFFECT_MODE, ANDROID_CONTROL_MODE, ANDROID_CONTROL_SCENE_MODE, ANDROID_CONTROL_VIDEO_STABILIZATION_MODE, ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, ANDROID_CONTROL_AE_AVAILABLE_MODES, ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES, ANDROID_CONTROL_AE_COMPENSATION_RANGE, ANDROID_CONTROL_AE_COMPENSATION_STEP, ANDROID_CONTROL_AF_AVAILABLE_MODES, ANDROID_CONTROL_AVAILABLE_EFFECTS, ANDROID_CONTROL_AVAILABLE_SCENE_MODES, ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES, ANDROID_CONTROL_AWB_AVAILABLE_MODES, ANDROID_CONTROL_MAX_REGIONS, ANDROID_CONTROL_SCENE_MODE_OVERRIDES, ANDROID_CONTROL_AE_PRECAPTURE_ID, ANDROID_CONTROL_AE_STATE, ANDROID_CONTROL_AF_STATE, ANDROID_CONTROL_AF_TRIGGER_ID, ANDROID_CONTROL_AWB_STATE, ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS, ANDROID_CONTROL_AE_LOCK_AVAILABLE, ANDROID_CONTROL_AWB_LOCK_AVAILABLE, ANDROID_CONTROL_AVAILABLE_MODES, ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE, ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST, ANDROID_CONTROL_ENABLE_ZSL, ANDROID_CONTROL_AF_SCENE_CHANGE, ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES, ANDROID_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES, ANDROID_CONTROL_EXTENDED_SCENE_MODE, ANDROID_CONTROL_ZOOM_RATIO_RANGE, ANDROID_CONTROL_ZOOM_RATIO, ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION, ANDROID_CONTROL_AF_REGIONS_SET, ANDROID_CONTROL_AE_REGIONS_SET, ANDROID_CONTROL_AWB_REGIONS_SET, ANDROID_CONTROL_END, ANDROID_DEMOSAIC_MODE = 0x20000, ANDROID_DEMOSAIC_END, ANDROID_EDGE_MODE = 0x30000, ANDROID_EDGE_STRENGTH, ANDROID_EDGE_AVAILABLE_EDGE_MODES, ANDROID_EDGE_END, ANDROID_FLASH_FIRING_POWER = 0x40000, ANDROID_FLASH_FIRING_TIME, ANDROID_FLASH_MODE, ANDROID_FLASH_COLOR_TEMPERATURE, ANDROID_FLASH_MAX_ENERGY, ANDROID_FLASH_STATE, ANDROID_FLASH_END, ANDROID_FLASH_INFO_AVAILABLE = 0x50000, ANDROID_FLASH_INFO_CHARGE_DURATION, ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL, ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL, ANDROID_FLASH_INFO_END, ANDROID_HOT_PIXEL_MODE = 0x60000, ANDROID_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES, ANDROID_HOT_PIXEL_END, ANDROID_JPEG_GPS_COORDINATES = 0x70000, ANDROID_JPEG_GPS_PROCESSING_METHOD, ANDROID_JPEG_GPS_TIMESTAMP, ANDROID_JPEG_ORIENTATION, ANDROID_JPEG_QUALITY, ANDROID_JPEG_THUMBNAIL_QUALITY, ANDROID_JPEG_THUMBNAIL_SIZE, ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES, ANDROID_JPEG_MAX_SIZE, ANDROID_JPEG_SIZE, ANDROID_JPEG_END, ANDROID_LENS_APERTURE = 0x80000, ANDROID_LENS_FILTER_DENSITY, ANDROID_LENS_FOCAL_LENGTH, ANDROID_LENS_FOCUS_DISTANCE, ANDROID_LENS_OPTICAL_STABILIZATION_MODE, ANDROID_LENS_FACING, ANDROID_LENS_POSE_ROTATION, ANDROID_LENS_POSE_TRANSLATION, ANDROID_LENS_FOCUS_RANGE, ANDROID_LENS_STATE, ANDROID_LENS_INTRINSIC_CALIBRATION, ANDROID_LENS_RADIAL_DISTORTION, ANDROID_LENS_POSE_REFERENCE, ANDROID_LENS_DISTORTION, ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION, ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION, ANDROID_LENS_END, ANDROID_LENS_INFO_AVAILABLE_APERTURES = 0x90000, ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES, ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS, ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION, ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE, ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE, ANDROID_LENS_INFO_SHADING_MAP_SIZE, ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION, ANDROID_LENS_INFO_END, ANDROID_NOISE_REDUCTION_MODE = 0xA0000, ANDROID_NOISE_REDUCTION_STRENGTH, ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES, ANDROID_NOISE_REDUCTION_END, ANDROID_QUIRKS_METERING_CROP_REGION = 0xB0000, ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO, ANDROID_QUIRKS_USE_ZSL_FORMAT, ANDROID_QUIRKS_USE_PARTIAL_RESULT, ANDROID_QUIRKS_PARTIAL_RESULT, ANDROID_QUIRKS_END, ANDROID_REQUEST_FRAME_COUNT = 0xC0000, ANDROID_REQUEST_ID, ANDROID_REQUEST_INPUT_STREAMS, ANDROID_REQUEST_METADATA_MODE, ANDROID_REQUEST_OUTPUT_STREAMS, ANDROID_REQUEST_TYPE, ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS, ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS, ANDROID_REQUEST_PIPELINE_DEPTH, ANDROID_REQUEST_PIPELINE_MAX_DEPTH, ANDROID_REQUEST_PARTIAL_RESULT_COUNT, ANDROID_REQUEST_AVAILABLE_CAPABILITIES, ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS, ANDROID_REQUEST_AVAILABLE_RESULT_KEYS, ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS, ANDROID_REQUEST_AVAILABLE_SESSION_KEYS, ANDROID_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS, ANDROID_REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP, ANDROID_REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE, ANDROID_REQUEST_END, ANDROID_SCALER_CROP_REGION = 0xD0000, ANDROID_SCALER_AVAILABLE_FORMATS, ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS, ANDROID_SCALER_AVAILABLE_JPEG_SIZES, ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM, ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS, ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES, ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS, ANDROID_SCALER_AVAILABLE_RAW_SIZES, ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP, ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, ANDROID_SCALER_AVAILABLE_STALL_DURATIONS, ANDROID_SCALER_CROPPING_TYPE, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS, ANDROID_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP, ANDROID_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES, ANDROID_SCALER_ROTATE_AND_CROP, ANDROID_SCALER_DEFAULT_SECURE_IMAGE_SIZE, ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS, ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION, ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION, ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED, ANDROID_SCALER_CROP_REGION_SET, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES, ANDROID_SCALER_END, ANDROID_SENSOR_EXPOSURE_TIME = 0xE0000, ANDROID_SENSOR_FRAME_DURATION, ANDROID_SENSOR_SENSITIVITY, ANDROID_SENSOR_REFERENCE_ILLUMINANT1, ANDROID_SENSOR_REFERENCE_ILLUMINANT2, ANDROID_SENSOR_CALIBRATION_TRANSFORM1, ANDROID_SENSOR_CALIBRATION_TRANSFORM2, ANDROID_SENSOR_COLOR_TRANSFORM1, ANDROID_SENSOR_COLOR_TRANSFORM2, ANDROID_SENSOR_FORWARD_MATRIX1, ANDROID_SENSOR_FORWARD_MATRIX2, ANDROID_SENSOR_BASE_GAIN_FACTOR, ANDROID_SENSOR_BLACK_LEVEL_PATTERN, ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY, ANDROID_SENSOR_ORIENTATION, ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS, ANDROID_SENSOR_TIMESTAMP, ANDROID_SENSOR_TEMPERATURE, ANDROID_SENSOR_NEUTRAL_COLOR_POINT, ANDROID_SENSOR_NOISE_PROFILE, ANDROID_SENSOR_PROFILE_HUE_SAT_MAP, ANDROID_SENSOR_PROFILE_TONE_CURVE, ANDROID_SENSOR_GREEN_SPLIT, ANDROID_SENSOR_TEST_PATTERN_DATA, ANDROID_SENSOR_TEST_PATTERN_MODE, ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES, ANDROID_SENSOR_ROLLING_SHUTTER_SKEW, ANDROID_SENSOR_OPTICAL_BLACK_REGIONS, ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL, ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL, ANDROID_SENSOR_OPAQUE_RAW_SIZE, ANDROID_SENSOR_OPAQUE_RAW_SIZE_MAXIMUM_RESOLUTION, ANDROID_SENSOR_PIXEL_MODE, ANDROID_SENSOR_RAW_BINNING_FACTOR_USED, ANDROID_SENSOR_END, ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE = 0xF0000, ANDROID_SENSOR_INFO_SENSITIVITY_RANGE, ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, ANDROID_SENSOR_INFO_MAX_FRAME_DURATION, ANDROID_SENSOR_INFO_PHYSICAL_SIZE, ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE, ANDROID_SENSOR_INFO_WHITE_LEVEL, ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE, ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED, ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION, ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION, ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION, ANDROID_SENSOR_INFO_BINNING_FACTOR, ANDROID_SENSOR_INFO_END, ANDROID_SHADING_MODE = 0x100000, ANDROID_SHADING_STRENGTH, ANDROID_SHADING_AVAILABLE_MODES, ANDROID_SHADING_END, ANDROID_STATISTICS_FACE_DETECT_MODE = 0x110000, ANDROID_STATISTICS_HISTOGRAM_MODE, ANDROID_STATISTICS_SHARPNESS_MAP_MODE, ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE, ANDROID_STATISTICS_FACE_IDS, ANDROID_STATISTICS_FACE_LANDMARKS, ANDROID_STATISTICS_FACE_RECTANGLES, ANDROID_STATISTICS_FACE_SCORES, ANDROID_STATISTICS_HISTOGRAM, ANDROID_STATISTICS_SHARPNESS_MAP, ANDROID_STATISTICS_LENS_SHADING_CORRECTION_MAP, ANDROID_STATISTICS_LENS_SHADING_MAP, ANDROID_STATISTICS_PREDICTED_COLOR_GAINS, ANDROID_STATISTICS_PREDICTED_COLOR_TRANSFORM, ANDROID_STATISTICS_SCENE_FLICKER, ANDROID_STATISTICS_HOT_PIXEL_MAP, ANDROID_STATISTICS_LENS_SHADING_MAP_MODE, ANDROID_STATISTICS_OIS_DATA_MODE, ANDROID_STATISTICS_OIS_TIMESTAMPS, ANDROID_STATISTICS_OIS_X_SHIFTS, ANDROID_STATISTICS_OIS_Y_SHIFTS, ANDROID_STATISTICS_END, ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = 0x120000, ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT, ANDROID_STATISTICS_INFO_MAX_FACE_COUNT, ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT, ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE, ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE, ANDROID_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES, ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES, ANDROID_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES, ANDROID_STATISTICS_INFO_END, ANDROID_TONEMAP_CURVE_BLUE = 0x130000, ANDROID_TONEMAP_CURVE_GREEN, ANDROID_TONEMAP_CURVE_RED, ANDROID_TONEMAP_MODE, ANDROID_TONEMAP_MAX_CURVE_POINTS, ANDROID_TONEMAP_AVAILABLE_TONE_MAP_MODES, ANDROID_TONEMAP_GAMMA, ANDROID_TONEMAP_PRESET_CURVE, ANDROID_TONEMAP_END, ANDROID_LED_TRANSMIT = 0x140000, ANDROID_LED_AVAILABLE_LEDS, ANDROID_LED_END, ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL = 0x150000, ANDROID_INFO_VERSION, ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION, ANDROID_INFO_DEVICE_STATE_ORIENTATIONS, ANDROID_INFO_END, ANDROID_BLACK_LEVEL_LOCK = 0x160000, ANDROID_BLACK_LEVEL_END, ANDROID_SYNC_FRAME_NUMBER = 0x170000, ANDROID_SYNC_MAX_LATENCY, ANDROID_SYNC_END, ANDROID_REPROCESS_EFFECTIVE_EXPOSURE_FACTOR = 0x180000, ANDROID_REPROCESS_MAX_CAPTURE_STALL, ANDROID_REPROCESS_END, ANDROID_DEPTH_MAX_DEPTH_SAMPLES = 0x190000, ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS, ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS, ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE, ANDROID_DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS, ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS, ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS, ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS, ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION, ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION, ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_DEPTH_END, ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS = 0x1A0000, ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE, ANDROID_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID, ANDROID_LOGICAL_MULTI_CAMERA_END, ANDROID_DISTORTION_CORRECTION_MODE = 0x1B0000, ANDROID_DISTORTION_CORRECTION_AVAILABLE_MODES, ANDROID_DISTORTION_CORRECTION_END, ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS = 0x1C0000, ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS, ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS, ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION, ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_HEIC_END, ANDROID_HEIC_INFO_SUPPORTED = 0x1D0000, ANDROID_HEIC_INFO_MAX_JPEG_APP_SEGMENTS_COUNT, ANDROID_HEIC_INFO_END, ANDROID_AUTOMOTIVE_LOCATION = 0x1E0000, ANDROID_AUTOMOTIVE_END, ANDROID_AUTOMOTIVE_LENS_FACING = 0x1F0000, ANDROID_AUTOMOTIVE_LENS_END,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=122" + }, + ".AndroidColorCorrectionMode": { + "definition": "enum AndroidColorCorrectionMode { ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX, ANDROID_COLOR_CORRECTION_MODE_FAST, ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=458" + }, + ".AndroidColorCorrectionAberrationMode": { + "definition": "enum AndroidColorCorrectionAberrationMode { ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF, ANDROID_COLOR_CORRECTION_ABERRATION_MODE_FAST, ANDROID_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=465" + }, + ".AndroidControlAeAntibandingMode": { + "definition": "enum AndroidControlAeAntibandingMode { ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF, ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ, ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ, ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=472" + }, + ".AndroidControlAeLock": { + "definition": "enum AndroidControlAeLock { ANDROID_CONTROL_AE_LOCK_OFF, ANDROID_CONTROL_AE_LOCK_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=480" + }, + ".AndroidControlAeMode": { + "definition": "enum AndroidControlAeMode { ANDROID_CONTROL_AE_MODE_OFF, ANDROID_CONTROL_AE_MODE_ON, ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH, ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH, ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE, ANDROID_CONTROL_AE_MODE_ON_EXTERNAL_FLASH,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=486" + }, + ".AndroidControlAePrecaptureTrigger": { + "definition": "enum AndroidControlAePrecaptureTrigger { ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE, ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_START, ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=496" + }, + ".AndroidControlAfMode": { + "definition": "enum AndroidControlAfMode { ANDROID_CONTROL_AF_MODE_OFF, ANDROID_CONTROL_AF_MODE_AUTO, ANDROID_CONTROL_AF_MODE_MACRO, ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO, ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE, ANDROID_CONTROL_AF_MODE_EDOF,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=503" + }, + ".AndroidControlAfTrigger": { + "definition": "enum AndroidControlAfTrigger { ANDROID_CONTROL_AF_TRIGGER_IDLE, ANDROID_CONTROL_AF_TRIGGER_START, ANDROID_CONTROL_AF_TRIGGER_CANCEL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=513" + }, + ".AndroidControlAwbLock": { + "definition": "enum AndroidControlAwbLock { ANDROID_CONTROL_AWB_LOCK_OFF, ANDROID_CONTROL_AWB_LOCK_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=520" + }, + ".AndroidControlAwbMode": { + "definition": "enum AndroidControlAwbMode { ANDROID_CONTROL_AWB_MODE_OFF, ANDROID_CONTROL_AWB_MODE_AUTO, ANDROID_CONTROL_AWB_MODE_INCANDESCENT, ANDROID_CONTROL_AWB_MODE_FLUORESCENT, ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT, ANDROID_CONTROL_AWB_MODE_DAYLIGHT, ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT, ANDROID_CONTROL_AWB_MODE_TWILIGHT, ANDROID_CONTROL_AWB_MODE_SHADE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=526" + }, + ".AndroidControlCaptureIntent": { + "definition": "enum AndroidControlCaptureIntent { ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM, ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW, ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE, ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD, ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT, ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG, ANDROID_CONTROL_CAPTURE_INTENT_MANUAL, ANDROID_CONTROL_CAPTURE_INTENT_MOTION_TRACKING,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=539" + }, + ".AndroidControlEffectMode": { + "definition": "enum AndroidControlEffectMode { ANDROID_CONTROL_EFFECT_MODE_OFF, ANDROID_CONTROL_EFFECT_MODE_MONO, ANDROID_CONTROL_EFFECT_MODE_NEGATIVE, ANDROID_CONTROL_EFFECT_MODE_SOLARIZE, ANDROID_CONTROL_EFFECT_MODE_SEPIA, ANDROID_CONTROL_EFFECT_MODE_POSTERIZE, ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD, ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD, ANDROID_CONTROL_EFFECT_MODE_AQUA,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=551" + }, + ".AndroidControlMode": { + "definition": "enum AndroidControlMode { ANDROID_CONTROL_MODE_OFF, ANDROID_CONTROL_MODE_AUTO, ANDROID_CONTROL_MODE_USE_SCENE_MODE, ANDROID_CONTROL_MODE_OFF_KEEP_STATE, ANDROID_CONTROL_MODE_USE_EXTENDED_SCENE_MODE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=564" + }, + ".AndroidControlSceneMode": { + "definition": "enum AndroidControlSceneMode { ANDROID_CONTROL_SCENE_MODE_DISABLED = 0, ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY, ANDROID_CONTROL_SCENE_MODE_ACTION, ANDROID_CONTROL_SCENE_MODE_PORTRAIT, ANDROID_CONTROL_SCENE_MODE_LANDSCAPE, ANDROID_CONTROL_SCENE_MODE_NIGHT, ANDROID_CONTROL_SCENE_MODE_NIGHT_PORTRAIT, ANDROID_CONTROL_SCENE_MODE_THEATRE, ANDROID_CONTROL_SCENE_MODE_BEACH, ANDROID_CONTROL_SCENE_MODE_SNOW, ANDROID_CONTROL_SCENE_MODE_SUNSET, ANDROID_CONTROL_SCENE_MODE_STEADYPHOTO, ANDROID_CONTROL_SCENE_MODE_FIREWORKS, ANDROID_CONTROL_SCENE_MODE_SPORTS, ANDROID_CONTROL_SCENE_MODE_PARTY, ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT, ANDROID_CONTROL_SCENE_MODE_BARCODE, ANDROID_CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO, ANDROID_CONTROL_SCENE_MODE_HDR, ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT, ANDROID_CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100, ANDROID_CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=573" + }, + ".AndroidControlVideoStabilizationMode": { + "definition": "enum AndroidControlVideoStabilizationMode { ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF, ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON, ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=599" + }, + ".AndroidControlAeState": { + "definition": "enum AndroidControlAeState { ANDROID_CONTROL_AE_STATE_INACTIVE, ANDROID_CONTROL_AE_STATE_SEARCHING, ANDROID_CONTROL_AE_STATE_CONVERGED, ANDROID_CONTROL_AE_STATE_LOCKED, ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED, ANDROID_CONTROL_AE_STATE_PRECAPTURE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=606" + }, + ".AndroidControlAfState": { + "definition": "enum AndroidControlAfState { ANDROID_CONTROL_AF_STATE_INACTIVE, ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN, ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED, ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN, ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED, ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED, ANDROID_CONTROL_AF_STATE_PASSIVE_UNFOCUSED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=616" + }, + ".AndroidControlAwbState": { + "definition": "enum AndroidControlAwbState { ANDROID_CONTROL_AWB_STATE_INACTIVE, ANDROID_CONTROL_AWB_STATE_SEARCHING, ANDROID_CONTROL_AWB_STATE_CONVERGED, ANDROID_CONTROL_AWB_STATE_LOCKED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=627" + }, + ".AndroidControlAeLockAvailable": { + "definition": "enum AndroidControlAeLockAvailable { ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE, ANDROID_CONTROL_AE_LOCK_AVAILABLE_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=635" + }, + ".AndroidControlAwbLockAvailable": { + "definition": "enum AndroidControlAwbLockAvailable { ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE, ANDROID_CONTROL_AWB_LOCK_AVAILABLE_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=641" + }, + ".AndroidControlEnableZsl": { + "definition": "enum AndroidControlEnableZsl { ANDROID_CONTROL_ENABLE_ZSL_FALSE, ANDROID_CONTROL_ENABLE_ZSL_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=647" + }, + ".AndroidControlAfSceneChange": { + "definition": "enum AndroidControlAfSceneChange { ANDROID_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED, ANDROID_CONTROL_AF_SCENE_CHANGE_DETECTED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=653" + }, + ".AndroidControlExtendedSceneMode": { + "definition": "enum AndroidControlExtendedSceneMode { ANDROID_CONTROL_EXTENDED_SCENE_MODE_DISABLED = 0, ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE, ANDROID_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS, ANDROID_CONTROL_EXTENDED_SCENE_MODE_VENDOR_START = 0x40,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=659" + }, + ".AndroidControlAfRegionsSet": { + "definition": "enum AndroidControlAfRegionsSet { ANDROID_CONTROL_AF_REGIONS_SET_FALSE, ANDROID_CONTROL_AF_REGIONS_SET_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=667" + }, + ".AndroidControlAeRegionsSet": { + "definition": "enum AndroidControlAeRegionsSet { ANDROID_CONTROL_AE_REGIONS_SET_FALSE, ANDROID_CONTROL_AE_REGIONS_SET_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=673" + }, + ".AndroidControlAwbRegionsSet": { + "definition": "enum AndroidControlAwbRegionsSet { ANDROID_CONTROL_AWB_REGIONS_SET_FALSE, ANDROID_CONTROL_AWB_REGIONS_SET_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=679" + }, + ".AndroidDemosaicMode": { + "definition": "enum AndroidDemosaicMode { ANDROID_DEMOSAIC_MODE_FAST, ANDROID_DEMOSAIC_MODE_HIGH_QUALITY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=685" + }, + ".AndroidEdgeMode": { + "definition": "enum AndroidEdgeMode { ANDROID_EDGE_MODE_OFF, ANDROID_EDGE_MODE_FAST, ANDROID_EDGE_MODE_HIGH_QUALITY, ANDROID_EDGE_MODE_ZERO_SHUTTER_LAG,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=691" + }, + ".AndroidFlashMode": { + "definition": "enum AndroidFlashMode { ANDROID_FLASH_MODE_OFF, ANDROID_FLASH_MODE_SINGLE, ANDROID_FLASH_MODE_TORCH,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=699" + }, + ".AndroidFlashState": { + "definition": "enum AndroidFlashState { ANDROID_FLASH_STATE_UNAVAILABLE, ANDROID_FLASH_STATE_CHARGING, ANDROID_FLASH_STATE_READY, ANDROID_FLASH_STATE_FIRED, ANDROID_FLASH_STATE_PARTIAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=706" + }, + ".AndroidFlashInfoAvailable": { + "definition": "enum AndroidFlashInfoAvailable { ANDROID_FLASH_INFO_AVAILABLE_FALSE, ANDROID_FLASH_INFO_AVAILABLE_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=715" + }, + ".AndroidHotPixelMode": { + "definition": "enum AndroidHotPixelMode { ANDROID_HOT_PIXEL_MODE_OFF, ANDROID_HOT_PIXEL_MODE_FAST, ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=721" + }, + ".AndroidLensOpticalStabilizationMode": { + "definition": "enum AndroidLensOpticalStabilizationMode { ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF, ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=728" + }, + ".AndroidLensFacing": { + "definition": "enum AndroidLensFacing { ANDROID_LENS_FACING_FRONT, ANDROID_LENS_FACING_BACK, ANDROID_LENS_FACING_EXTERNAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=734" + }, + ".AndroidLensState": { + "definition": "enum AndroidLensState { ANDROID_LENS_STATE_STATIONARY, ANDROID_LENS_STATE_MOVING,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=741" + }, + ".AndroidLensPoseReference": { + "definition": "enum AndroidLensPoseReference { ANDROID_LENS_POSE_REFERENCE_PRIMARY_CAMERA, ANDROID_LENS_POSE_REFERENCE_GYROSCOPE, ANDROID_LENS_POSE_REFERENCE_UNDEFINED, ANDROID_LENS_POSE_REFERENCE_AUTOMOTIVE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=747" + }, + ".AndroidLensInfoFocusDistanceCalibration": { + "definition": "enum AndroidLensInfoFocusDistanceCalibration { ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED, ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE, ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=755" + }, + ".AndroidNoiseReductionMode": { + "definition": "enum AndroidNoiseReductionMode { ANDROID_NOISE_REDUCTION_MODE_OFF, ANDROID_NOISE_REDUCTION_MODE_FAST, ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY, ANDROID_NOISE_REDUCTION_MODE_MINIMAL, ANDROID_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=762" + }, + ".AndroidQuirksPartialResult": { + "definition": "enum AndroidQuirksPartialResult { ANDROID_QUIRKS_PARTIAL_RESULT_FINAL, ANDROID_QUIRKS_PARTIAL_RESULT_PARTIAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=771" + }, + ".AndroidRequestMetadataMode": { + "definition": "enum AndroidRequestMetadataMode { ANDROID_REQUEST_METADATA_MODE_NONE, ANDROID_REQUEST_METADATA_MODE_FULL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=777" + }, + ".AndroidRequestType": { + "definition": "enum AndroidRequestType { ANDROID_REQUEST_TYPE_CAPTURE, ANDROID_REQUEST_TYPE_REPROCESS,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=783" + }, + ".AndroidRequestAvailableCapabilities": { + "definition": "enum AndroidRequestAvailableCapabilities { ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=789" + }, + ".AndroidRequestAvailableDynamicRangeProfilesMap": { + "definition": "enum AndroidRequestAvailableDynamicRangeProfilesMap { ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD = 0x1, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 = 0x2, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 = 0x4, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS = 0x8, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF = 0x10, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO = 0x20, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM = 0x40, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO = 0x80, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF = 0x100, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO = 0x200, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM = 0x400, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO = 0x800, ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX = 0x1000,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=813" + }, + ".AndroidScalerAvailableFormats": { + "definition": "enum AndroidScalerAvailableFormats { ANDROID_SCALER_AVAILABLE_FORMATS_RAW16 = 0x20, ANDROID_SCALER_AVAILABLE_FORMATS_RAW_OPAQUE = 0x24, ANDROID_SCALER_AVAILABLE_FORMATS_YV12 = 0x32315659, ANDROID_SCALER_AVAILABLE_FORMATS_YCrCb_420_SP = 0x11, ANDROID_SCALER_AVAILABLE_FORMATS_IMPLEMENTATION_DEFINED = 0x22, ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_888 = 0x23, ANDROID_SCALER_AVAILABLE_FORMATS_BLOB = 0x21, ANDROID_SCALER_AVAILABLE_FORMATS_RAW10 = 0x25, ANDROID_SCALER_AVAILABLE_FORMATS_RAW12 = 0x26, ANDROID_SCALER_AVAILABLE_FORMATS_Y8 = 0x20203859,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=840" + }, + ".AndroidScalerAvailableStreamConfigurations": { + "definition": "enum AndroidScalerAvailableStreamConfigurations { ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT, ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=854" + }, + ".AndroidScalerCroppingType": { + "definition": "enum AndroidScalerCroppingType { ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY, ANDROID_SCALER_CROPPING_TYPE_FREEFORM,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=860" + }, + ".AndroidScalerAvailableRecommendedStreamConfigurations": { + "definition": "enum AndroidScalerAvailableRecommendedStreamConfigurations { ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW = 0x0, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD = 0x1, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT = 0x2, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT = 0x3, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL = 0x4, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RAW = 0x5, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_LOW_LATENCY_SNAPSHOT = 0x6, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PUBLIC_END = 0x7, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_10BIT_OUTPUT = 0x8, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PUBLIC_END_3_8 = 0x9, ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VENDOR_START = 0x18,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=866" + }, + ".AndroidScalerRotateAndCrop": { + "definition": "enum AndroidScalerRotateAndCrop { ANDROID_SCALER_ROTATE_AND_CROP_NONE, ANDROID_SCALER_ROTATE_AND_CROP_90, ANDROID_SCALER_ROTATE_AND_CROP_180, ANDROID_SCALER_ROTATE_AND_CROP_270, ANDROID_SCALER_ROTATE_AND_CROP_AUTO,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=892" + }, + ".AndroidScalerPhysicalCameraMultiResolutionStreamConfigurations": { + "definition": "enum AndroidScalerPhysicalCameraMultiResolutionStreamConfigurations { ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT, ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=901" + }, + ".AndroidScalerAvailableStreamConfigurationsMaximumResolution": { + "definition": "enum AndroidScalerAvailableStreamConfigurationsMaximumResolution { ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT, ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=907" + }, + ".AndroidScalerMultiResolutionStreamSupported": { + "definition": "enum AndroidScalerMultiResolutionStreamSupported { ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE, ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=913" + }, + ".AndroidScalerCropRegionSet": { + "definition": "enum AndroidScalerCropRegionSet { ANDROID_SCALER_CROP_REGION_SET_FALSE, ANDROID_SCALER_CROP_REGION_SET_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=919" + }, + ".AndroidScalerAvailableStreamUseCases": { + "definition": "enum AndroidScalerAvailableStreamUseCases { ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT = 0x0, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW = 0x1, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE = 0x2, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD = 0x3, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL = 0x4, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL = 0x5, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_VENDOR_START = 0x10000,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=925" + }, + ".AndroidSensorReferenceIlluminant1": { + "definition": "enum AndroidSensorReferenceIlluminant1 { ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55 = 20, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65 = 21, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75 = 22, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50 = 23, ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=937" + }, + ".AndroidSensorTestPatternMode": { + "definition": "enum AndroidSensorTestPatternMode { ANDROID_SENSOR_TEST_PATTERN_MODE_OFF, ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR, ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS, ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY, ANDROID_SENSOR_TEST_PATTERN_MODE_PN9, ANDROID_SENSOR_TEST_PATTERN_MODE_BLACK, ANDROID_SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=960" + }, + ".AndroidSensorPixelMode": { + "definition": "enum AndroidSensorPixelMode { ANDROID_SENSOR_PIXEL_MODE_DEFAULT, ANDROID_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=971" + }, + ".AndroidSensorRawBinningFactorUsed": { + "definition": "enum AndroidSensorRawBinningFactorUsed { ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_TRUE, ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_FALSE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=977" + }, + ".AndroidSensorInfoColorFilterArrangement": { + "definition": "enum AndroidSensorInfoColorFilterArrangement { ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB, ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG, ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG, ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR, ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB, ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO, ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=983" + }, + ".AndroidSensorInfoTimestampSource": { + "definition": "enum AndroidSensorInfoTimestampSource { ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN, ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=994" + }, + ".AndroidSensorInfoLensShadingApplied": { + "definition": "enum AndroidSensorInfoLensShadingApplied { ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE, ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1000" + }, + ".AndroidShadingMode": { + "definition": "enum AndroidShadingMode { ANDROID_SHADING_MODE_OFF, ANDROID_SHADING_MODE_FAST, ANDROID_SHADING_MODE_HIGH_QUALITY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1006" + }, + ".AndroidStatisticsFaceDetectMode": { + "definition": "enum AndroidStatisticsFaceDetectMode { ANDROID_STATISTICS_FACE_DETECT_MODE_OFF, ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE, ANDROID_STATISTICS_FACE_DETECT_MODE_FULL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1013" + }, + ".AndroidStatisticsHistogramMode": { + "definition": "enum AndroidStatisticsHistogramMode { ANDROID_STATISTICS_HISTOGRAM_MODE_OFF, ANDROID_STATISTICS_HISTOGRAM_MODE_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1020" + }, + ".AndroidStatisticsSharpnessMapMode": { + "definition": "enum AndroidStatisticsSharpnessMapMode { ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF, ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1026" + }, + ".AndroidStatisticsHotPixelMapMode": { + "definition": "enum AndroidStatisticsHotPixelMapMode { ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF, ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1032" + }, + ".AndroidStatisticsSceneFlicker": { + "definition": "enum AndroidStatisticsSceneFlicker { ANDROID_STATISTICS_SCENE_FLICKER_NONE, ANDROID_STATISTICS_SCENE_FLICKER_50HZ, ANDROID_STATISTICS_SCENE_FLICKER_60HZ,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1038" + }, + ".AndroidStatisticsLensShadingMapMode": { + "definition": "enum AndroidStatisticsLensShadingMapMode { ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF, ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1045" + }, + ".AndroidStatisticsOisDataMode": { + "definition": "enum AndroidStatisticsOisDataMode { ANDROID_STATISTICS_OIS_DATA_MODE_OFF, ANDROID_STATISTICS_OIS_DATA_MODE_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1051" + }, + ".AndroidTonemapMode": { + "definition": "enum AndroidTonemapMode { ANDROID_TONEMAP_MODE_CONTRAST_CURVE, ANDROID_TONEMAP_MODE_FAST, ANDROID_TONEMAP_MODE_HIGH_QUALITY, ANDROID_TONEMAP_MODE_GAMMA_VALUE, ANDROID_TONEMAP_MODE_PRESET_CURVE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1057" + }, + ".AndroidTonemapPresetCurve": { + "definition": "enum AndroidTonemapPresetCurve { ANDROID_TONEMAP_PRESET_CURVE_SRGB, ANDROID_TONEMAP_PRESET_CURVE_REC709,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1066" + }, + ".AndroidLedTransmit": { + "definition": "enum AndroidLedTransmit { ANDROID_LED_TRANSMIT_OFF, ANDROID_LED_TRANSMIT_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1072" + }, + ".AndroidLedAvailableLeds": { + "definition": "enum AndroidLedAvailableLeds { ANDROID_LED_AVAILABLE_LEDS_TRANSMIT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1078" + }, + ".AndroidInfoSupportedHardwareLevel": { + "definition": "enum AndroidInfoSupportedHardwareLevel { ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED, ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL, ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY, ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3, ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1083" + }, + ".AndroidInfoSupportedBufferManagementVersion": { + "definition": "enum AndroidInfoSupportedBufferManagementVersion { ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_HIDL_DEVICE_3_5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1092" + }, + ".AndroidBlackLevelLock": { + "definition": "enum AndroidBlackLevelLock { ANDROID_BLACK_LEVEL_LOCK_OFF, ANDROID_BLACK_LEVEL_LOCK_ON,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1097" + }, + ".AndroidSyncFrameNumber": { + "definition": "enum AndroidSyncFrameNumber { ANDROID_SYNC_FRAME_NUMBER_CONVERGING = -1, ANDROID_SYNC_FRAME_NUMBER_UNKNOWN = -2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1103" + }, + ".AndroidSyncMaxLatency": { + "definition": "enum AndroidSyncMaxLatency { ANDROID_SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0, ANDROID_SYNC_MAX_LATENCY_UNKNOWN = -1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1109" + }, + ".AndroidDepthAvailableDepthStreamConfigurations": { + "definition": "enum AndroidDepthAvailableDepthStreamConfigurations { ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT, ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1115" + }, + ".AndroidDepthDepthIsExclusive": { + "definition": "enum AndroidDepthDepthIsExclusive { ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE, ANDROID_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1121" + }, + ".AndroidDepthAvailableDynamicDepthStreamConfigurations": { + "definition": "enum AndroidDepthAvailableDynamicDepthStreamConfigurations { ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_OUTPUT, ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1127" + }, + ".AndroidDepthAvailableDepthStreamConfigurationsMaximumResolution": { + "definition": "enum AndroidDepthAvailableDepthStreamConfigurationsMaximumResolution { ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT, ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1133" + }, + ".AndroidDepthAvailableDynamicDepthStreamConfigurationsMaximumResolution": { + "definition": "enum AndroidDepthAvailableDynamicDepthStreamConfigurationsMaximumResolution { ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT, ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1139" + }, + ".AndroidLogicalMultiCameraSensorSyncType": { + "definition": "enum AndroidLogicalMultiCameraSensorSyncType { ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE, ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1145" + }, + ".AndroidDistortionCorrectionMode": { + "definition": "enum AndroidDistortionCorrectionMode { ANDROID_DISTORTION_CORRECTION_MODE_OFF, ANDROID_DISTORTION_CORRECTION_MODE_FAST, ANDROID_DISTORTION_CORRECTION_MODE_HIGH_QUALITY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1151" + }, + ".AndroidHeicAvailableHeicStreamConfigurations": { + "definition": "enum AndroidHeicAvailableHeicStreamConfigurations { ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_OUTPUT, ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1158" + }, + ".AndroidHeicAvailableHeicStreamConfigurationsMaximumResolution": { + "definition": "enum AndroidHeicAvailableHeicStreamConfigurationsMaximumResolution { ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT, ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1164" + }, + ".AndroidHeicInfoSupported": { + "definition": "enum AndroidHeicInfoSupported { ANDROID_HEIC_INFO_SUPPORTED_FALSE, ANDROID_HEIC_INFO_SUPPORTED_TRUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1170" + }, + ".AndroidAutomotiveLocation": { + "definition": "enum AndroidAutomotiveLocation { ANDROID_AUTOMOTIVE_LOCATION_INTERIOR, ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_OTHER, ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_FRONT, ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_REAR, ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_LEFT, ANDROID_AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT, ANDROID_AUTOMOTIVE_LOCATION_EXTRA_OTHER, ANDROID_AUTOMOTIVE_LOCATION_EXTRA_FRONT, ANDROID_AUTOMOTIVE_LOCATION_EXTRA_REAR, ANDROID_AUTOMOTIVE_LOCATION_EXTRA_LEFT, ANDROID_AUTOMOTIVE_LOCATION_EXTRA_RIGHT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1176" + }, + ".AndroidAutomotiveLensFacing": { + "definition": "enum AndroidAutomotiveLensFacing { ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER, ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT, ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR, ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT, ANDROID_AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER, ANDROID_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/camera_metadata_tags.mojom;l=1191" + }, + "cros.mojom.CameraHalClient.SetUpChannel@0": { + "definition": "SetUpChannel@0(pending_remote camera_module);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_client.mojom;l=22" + }, + "cros.mojom.KioskVisionObserver.OnFrameProcessed@0": { + "definition": "OnFrameProcessed@0(KioskVisionDetection detection);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=73" + }, + "cros.mojom.KioskVisionObserver.OnTrackCompleted@1": { + "definition": "OnTrackCompleted@1(KioskVisionTrack track);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=77" + }, + "cros.mojom.KioskVisionObserver.OnError@2": { + "definition": "OnError@2(KioskVisionError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=80" + }, + "cros.mojom.CameraHalDispatcher.RegisterClientWithToken@5": { + "definition": "[MinVersion=4] RegisterClientWithToken@5( pending_remote client, CameraClientType type, mojo_base.mojom.UnguessableToken auth_token) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=175" + }, + "cros.mojom.CrosCameraServiceObserver.CameraDeviceActivityChange@0": { + "definition": "CameraDeviceActivityChange@0(int32 camera_id, bool opened, CameraClientType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=190" + }, + "cros.mojom.CrosCameraServiceObserver.CameraPrivacySwitchStateChange@1": { + "definition": "CameraPrivacySwitchStateChange@1(CameraPrivacySwitchState state, int32 camera_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=196" + }, + "cros.mojom.CrosCameraServiceObserver.CameraSWPrivacySwitchStateChange@2": { + "definition": "CameraSWPrivacySwitchStateChange@2(CameraPrivacySwitchState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=200" + }, + "cros.mojom.CrosCameraServiceObserver.CameraEffectChange@3": { + "definition": "[MinVersion=14] CameraEffectChange@3(EffectsConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=203" + }, + "cros.mojom.CrosCameraServiceObserver.AutoFramingStateChange@4": { + "definition": "[MinVersion=15] AutoFramingStateChange@4(CameraAutoFramingState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=206" + }, + "cros.mojom.CrosCameraService.GetCameraModule@0": { + "definition": "GetCameraModule@0(CameraClientType type) => (pending_remote camera_module_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=216" + }, + "cros.mojom.CrosCameraService.SetTracingEnabled@1": { + "definition": "SetTracingEnabled@1(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=220" + }, + "cros.mojom.CrosCameraService.SetAutoFramingState@2": { + "definition": "SetAutoFramingState@2(CameraAutoFramingState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=223" + }, + "cros.mojom.CrosCameraService.GetCameraSWPrivacySwitchState@3": { + "definition": "GetCameraSWPrivacySwitchState@3() => (CameraPrivacySwitchState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=226" + }, + "cros.mojom.CrosCameraService.SetCameraSWPrivacySwitchState@4": { + "definition": "SetCameraSWPrivacySwitchState@4(CameraPrivacySwitchState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=229" + }, + "cros.mojom.CrosCameraService.GetAutoFramingSupported@5": { + "definition": "GetAutoFramingSupported@5() => (bool supported);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=232" + }, + "cros.mojom.CrosCameraService.SetCameraEffect@6": { + "definition": "SetCameraEffect@6(EffectsConfig config) => (SetEffectResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=235" + }, + "cros.mojom.CrosCameraService.AddCrosCameraServiceObserver@7": { + "definition": "AddCrosCameraServiceObserver@7( pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=238" + }, + "cros.mojom.CrosCameraService.StartKioskVisionDetection@8": { + "definition": "StartKioskVisionDetection@8( string dlc_path, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=244" + }, + "cros.mojom.KioskVisionDetection": { + "definition": "struct KioskVisionDetection { int64 timestamp_in_us; array appearances;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=84" + }, + "cros.mojom.KioskVisionTrack": { + "definition": "struct KioskVisionTrack { int32 person_id; int64 start_timestamp_in_us; int64 end_timestamp_in_us; array appearances;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=92" + }, + "cros.mojom.KioskVisionAppearance": { + "definition": "struct KioskVisionAppearance { int64 timestamp_in_us; int32 person_id; KioskVisionFaceDetection? face; KioskVisionBodyDetection? body;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=105" + }, + "cros.mojom.KioskVisionFaceDetection": { + "definition": "struct KioskVisionFaceDetection { double confidence; float roll; float pan; float tilt; KioskVisionBoundingBox box;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=119" + }, + "cros.mojom.KioskVisionBodyDetection": { + "definition": "struct KioskVisionBodyDetection { double confidence; KioskVisionBoundingBox box;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=133" + }, + "cros.mojom.KioskVisionBoundingBox": { + "definition": "struct KioskVisionBoundingBox { int32 x; int32 y; int32 width; int32 height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=141" + }, + "cros.mojom.CameraClientType": { + "definition": "enum CameraClientType { UNKNOWN = 0, TESTING = 1, CHROME = 2, ANDROID = 3, PLUGINVM = 4, ASH_CHROME = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=21" + }, + "cros.mojom.CameraPrivacySwitchState": { + "definition": "enum CameraPrivacySwitchState { UNKNOWN = 0, ON = 1, OFF = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=34" + }, + "cros.mojom.CameraAutoFramingState": { + "definition": "enum CameraAutoFramingState { [Default] OFF = 0, ON_SINGLE = 1, ON_MULTI = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=55" + }, + "cros.mojom.KioskVisionError": { + "definition": "enum KioskVisionError { [Default] UNKNOWN = 0, DLC_ERROR = 1, MODEL_ERROR = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/cros_camera_service.mojom;l=154" + }, + "cros.mojom.CrosDocumentScanner.DetectCornersFromNV12Image@0": { + "definition": "DetectCornersFromNV12Image@0( mojo_base.mojom.ReadOnlySharedMemoryRegion nv12_image) => (DetectCornersResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/document_scanner.mojom;l=27" + }, + "cros.mojom.DetectCornersResult": { + "definition": "struct DetectCornersResult { bool success; array corners;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/document_scanner.mojom;l=13" + }, + "cros.mojom.EffectsConfig": { + "definition": "struct EffectsConfig { CameraEffect effect@0 = kNone; BlurLevel blur_level@1 = kMedium; GpuApi segmentation_gpu_api@2 = kOpenGL; uint16 graph_max_frames_in_flight@3 = 2; [MinVersion=1] bool blur_enabled@4; [MinVersion=1] bool replace_enabled@5; [MinVersion=1] bool relight_enabled@6; [MinVersion=2] SegmentationModel segmentation_model@7; [MinVersion=3] mojo_base.mojom.RelativeFilePath? background_filepath@8; [MinVersion=4] float? light_intensity@9; [MinVersion=5] InferenceBackend segmentation_inference_backend@10; [MinVersion=5] InferenceBackend relighting_inference_backend@11; [MinVersion=6] bool retouch_enabled@12; [MinVersion=6] bool studio_look_enabled@13 = true; [MinVersion=7] InferenceBackend retouch_inference_backend@14;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/effects_pipeline.mojom;l=70" + }, + "cros.mojom.CameraEffect": { + "definition": "enum CameraEffect { [Default] kNone = 0, kBackgroundBlur = 1, kBackgroundReplace = 2, kPortraitRelight = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/effects_pipeline.mojom;l=18" + }, + "cros.mojom.GpuApi": { + "definition": "enum GpuApi { kOpenCL = 0, [Default] kOpenGL = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/effects_pipeline.mojom;l=27" + }, + "cros.mojom.SetEffectResult": { + "definition": "enum SetEffectResult { [Default] kOk = 0, kError = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/effects_pipeline.mojom;l=34" + }, + "cros.mojom.BlurLevel": { + "definition": "enum BlurLevel { kLowest, kLight, [Default] kMedium, kHeavy, kMaximum,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/effects_pipeline.mojom;l=41" + }, + "cros.mojom.SegmentationModel": { + "definition": "enum SegmentationModel { kAuto = 0, [Default] kHighResolution = 1, kLowerResolution = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/effects_pipeline.mojom;l=52" + }, + "cros.mojom.InferenceBackend": { + "definition": "enum InferenceBackend { kGpu = 0, kNpu = 1, [Default] kAuto = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/effects_pipeline.mojom;l=60" + }, + "cros.mojom.JpegAcceleratorProvider.GetJpegEncodeAccelerator@0": { + "definition": "GetJpegEncodeAccelerator@0( pending_receiver jea);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/jpeg_accelerator.mojom;l=18" + }, + "cros.mojom.JpegAcceleratorProvider.GetMjpegDecodeAccelerator@1": { + "definition": "GetMjpegDecodeAccelerator@1( pending_receiver jda);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/jpeg_accelerator.mojom;l=21" + }, + "cros.mojom.CrosDisplayObserver.OnDisplayRotationChanged@0": { + "definition": "OnDisplayRotationChanged@0(ClockwiseRotation rotation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=39" + }, + "cros.mojom.CrosLidObserver.OnLidStateChanged@0": { + "definition": "OnLidStateChanged@0(LidState new_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=49" + }, + "cros.mojom.CrosPowerObserver.OnSystemSuspend@0": { + "definition": "OnSystemSuspend@0() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=65" + }, + "cros.mojom.CrosPowerObserver.OnSystemResume@1": { + "definition": "OnSystemResume@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=68" + }, + "cros.mojom.CrosSystemEventMonitor.AddDisplayObserver@0": { + "definition": "AddDisplayObserver@0(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=77" + }, + "cros.mojom.CrosSystemEventMonitor.AddLidObserver@1": { + "definition": "AddLidObserver@1(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=80" + }, + "cros.mojom.CrosSystemEventMonitor.AddPowerObserver@2": { + "definition": "AddPowerObserver@2(string client_name, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=84" + }, + "cros.mojom.CrosSystemEventMonitor.NotifyDeviceChanged@3": { + "definition": "NotifyDeviceChanged@3(DeviceType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=90" + }, + "cros.mojom.LidState": { + "definition": "enum LidState { kOpen, kClosed, kNotPresent, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=12" + }, + "cros.mojom.DeviceType": { + "definition": "enum DeviceType { kAudio, kVideoCapture, kUnkown, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=19" + }, + "cros.mojom.ClockwiseRotation": { + "definition": "enum ClockwiseRotation { kRotate0, kRotate90, kRotate180, kRotate270,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/system_event_monitor.mojom;l=25" + }, + "cros.mojom.VideoCaptureDeviceInfoObserver.OnGetCameraIdToDeviceIdMapping@0": { + "definition": "OnGetCameraIdToDeviceIdMapping@0(int32 camera_id, string device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/video_capture_device_info_monitor.mojom;l=20" + }, + "cros.mojom.VideoCaptureDeviceInfoMonitor.AddVideoCaptureDeviceInfoObserver@0": { + "definition": "AddVideoCaptureDeviceInfoObserver@0( pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/capture/video/chromeos/mojom/video_capture_device_info_monitor.mojom;l=30" + }, + "midi.mojom.MidiSessionClient.AddInputPort": { + "definition": "AddInputPort(PortInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=37" + }, + "midi.mojom.MidiSessionClient.AddOutputPort": { + "definition": "AddOutputPort(PortInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=38" + }, + "midi.mojom.MidiSessionClient.SetInputPortState": { + "definition": "SetInputPortState(uint32 port, PortState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=43" + }, + "midi.mojom.MidiSessionClient.SetOutputPortState": { + "definition": "SetOutputPortState(uint32 port, PortState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=44" + }, + "midi.mojom.MidiSessionClient.SessionStarted": { + "definition": "SessionStarted(Result result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=48" + }, + "midi.mojom.MidiSessionClient.AcknowledgeSentData": { + "definition": "AcknowledgeSentData(uint32 bytes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=52" + }, + "midi.mojom.MidiSessionClient.DataReceived": { + "definition": "DataReceived(uint32 port, array data, mojo_base.mojom.TimeTicks timestamp);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=55" + }, + "midi.mojom.MidiSessionProvider.StartSession": { + "definition": "StartSession(pending_receiver receiver, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=63" + }, + "midi.mojom.MidiSession.SendData": { + "definition": "SendData(uint32 port, array data, mojo_base.mojom.TimeTicks timestamp);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=71" + }, + "midi.mojom.PortInfo": { + "definition": "struct PortInfo { string id; string manufacturer; string name; string version; PortState state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=22" + }, + "midi.mojom.Result": { + "definition": "enum Result { NOT_INITIALIZED, OK, NOT_SUPPORTED, INITIALIZATION_ERROR,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=9" + }, + "midi.mojom.PortState": { + "definition": "enum PortState { DISCONNECTED, CONNECTED, OPENED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/midi/midi_service.mojom;l=16" + }, + "media.mojom.AndroidOverlayProvider.CreateOverlay": { + "definition": "CreateOverlay(pending_receiver overlay, pending_remote client, AndroidOverlayConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/android_overlay.mojom;l=19" + }, + "media.mojom.AndroidOverlay.ScheduleLayout": { + "definition": "ScheduleLayout(gfx.mojom.Rect rect);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/android_overlay.mojom;l=30" + }, + "media.mojom.AndroidOverlayClient.OnSurfaceReady": { + "definition": "OnSurfaceReady(uint64 surface_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/android_overlay.mojom;l=39" + }, + "media.mojom.AndroidOverlayClient.OnDestroyed": { + "definition": "OnDestroyed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/android_overlay.mojom;l=44" + }, + "media.mojom.AndroidOverlayClient.OnSynchronouslyDestroyed": { + "definition": "[Sync] OnSynchronouslyDestroyed() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/android_overlay.mojom;l=52" + }, + "media.mojom.AndroidOverlayClient.OnPowerEfficientState": { + "definition": "OnPowerEfficientState(bool is_power_efficient);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/android_overlay.mojom;l=57" + }, + "media.mojom.AndroidOverlayConfig": { + "definition": "struct AndroidOverlayConfig { mojo_base.mojom.UnguessableToken routing_token; gfx.mojom.Rect rect; bool secure; bool power_efficient;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/android_overlay.mojom;l=63" + }, + "media.mojom.AudioDataS16": { + "definition": "struct AudioDataS16 { int32 channel_count; int32 sample_rate; int32 frame_count; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_data.mojom;l=9" + }, + "media.mojom.ReadWriteAudioDataPipe": { + "definition": "struct ReadWriteAudioDataPipe { mojo_base.mojom.UnsafeSharedMemoryRegion shared_memory; handle socket;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_data_pipe.mojom;l=39" + }, + "media.mojom.AudioDecoder.GetSupportedConfigs": { + "definition": "[Sync] GetSupportedConfigs() => (array supported_configs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=22" + }, + "media.mojom.AudioDecoder.Construct": { + "definition": "Construct(pending_associated_remote client, pending_remote media_log);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=30" + }, + "media.mojom.AudioDecoder.Initialize": { + "definition": "Initialize(AudioDecoderConfig config, mojo_base.mojom.UnguessableToken? cdm_id) => (DecoderStatus success, bool needs_bitstream_conversion, AudioDecoderType decoder_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=37" + }, + "media.mojom.AudioDecoder.SetDataSource": { + "definition": "SetDataSource(handle receive_pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=44" + }, + "media.mojom.AudioDecoder.Decode": { + "definition": "Decode(DecoderBuffer buffer) => (DecoderStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=54" + }, + "media.mojom.AudioDecoder.Reset": { + "definition": "Reset() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=59" + }, + "media.mojom.AudioDecoderClient.OnBufferDecoded": { + "definition": "OnBufferDecoded(AudioBuffer buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=64" + }, + "media.mojom.AudioDecoderClient.OnWaiting": { + "definition": "OnWaiting(WaitingReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=68" + }, + "media.mojom.SupportedAudioDecoderConfig": { + "definition": "struct SupportedAudioDecoderConfig { AudioCodec codec; AudioCodecProfile profile;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_decoder.mojom;l=13" + }, + "media.mojom.AudioEncoder.Initialize": { + "definition": "Initialize(pending_associated_remote client, AudioEncoderConfig config) => (EncoderStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_encoder.mojom;l=61" + }, + "media.mojom.AudioEncoder.Encode": { + "definition": "Encode(AudioBuffer buffer) => (EncoderStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_encoder.mojom;l=67" + }, + "media.mojom.AudioEncoder.Flush": { + "definition": "Flush() => (EncoderStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_encoder.mojom;l=72" + }, + "media.mojom.AudioEncoderClient.OnEncodedBufferReady": { + "definition": "OnEncodedBufferReady(EncodedAudioBuffer buffer, array description);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_encoder.mojom;l=84" + }, + "media.mojom.AacAudioEncoderConfig": { + "definition": "struct AacAudioEncoderConfig { AacOutputFormat format;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_encoder.mojom;l=12" + }, + "media.mojom.AudioEncoderConfig": { + "definition": "struct AudioEncoderConfig { AudioCodec codec; uint8 channel_count; uint32 sample_rate; uint32 bitrate; AacAudioEncoderConfig aac;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_encoder.mojom;l=18" + }, + "media.mojom.EncodedAudioBuffer": { + "definition": "struct EncodedAudioBuffer { AudioParameters params; mojo_base.mojom.TimeDelta timestamp; mojo_base.mojom.TimeDelta duration; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_encoder.mojom;l=38" + }, + "media.mojom.AacOutputFormat": { + "definition": "enum AacOutputFormat { kAAC, kADTS };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_encoder.mojom;l=11" + }, + "media.mojom.AudioInputStream.Record": { + "definition": "Record();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_input_stream.mojom;l=15" + }, + "media.mojom.AudioInputStream.SetVolume": { + "definition": "SetVolume(double volume);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_input_stream.mojom;l=18" + }, + "media.mojom.AudioInputStreamClient.OnError": { + "definition": "OnError(InputStreamErrorCode code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_input_stream.mojom;l=24" + }, + "media.mojom.AudioInputStreamClient.OnMutedStateChanged": { + "definition": "OnMutedStateChanged(bool is_muted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_input_stream.mojom;l=25" + }, + "media.mojom.AudioInputStreamObserver.DidStartRecording": { + "definition": "DidStartRecording();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_input_stream.mojom;l=50" + }, + "media.mojom.DisconnectReason": { + "definition": "enum DisconnectReason { kDefault = 0, kPlatformError = 1, kTerminatedByClient = 2, kStreamCreationFailed = 3, kDocumentDestroyed = 4, kSystemPermissions = 5, kDeviceInUse = 6, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_input_stream.mojom;l=34" + }, + "media.mojom.AudioLog.OnCreated": { + "definition": "OnCreated(media.mojom.AudioParameters params, string device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=15" + }, + "media.mojom.AudioLog.OnStarted": { + "definition": "OnStarted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=20" + }, + "media.mojom.AudioLog.OnStopped": { + "definition": "OnStopped();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=24" + }, + "media.mojom.AudioLog.OnClosed": { + "definition": "OnClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=28" + }, + "media.mojom.AudioLog.OnError": { + "definition": "OnError();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=31" + }, + "media.mojom.AudioLog.OnSetVolume": { + "definition": "OnSetVolume(double volume);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=34" + }, + "media.mojom.AudioLog.OnProcessingStateChanged": { + "definition": "OnProcessingStateChanged(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=38" + }, + "media.mojom.AudioLog.OnLogMessage": { + "definition": "OnLogMessage(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=41" + }, + "media.mojom.AudioLogFactory.CreateAudioLog": { + "definition": "CreateAudioLog(AudioLogComponent component, int32 component_id, pending_receiver audio_log_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=57" + }, + "media.mojom.AudioLogComponent": { + "definition": "enum AudioLogComponent { kInputController, kOutputController, kOutputStream,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_logging.mojom;l=44" + }, + "media.mojom.AudioOutputStream.Play": { + "definition": "Play();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=18" + }, + "media.mojom.AudioOutputStream.Pause": { + "definition": "Pause();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=22" + }, + "media.mojom.AudioOutputStream.Flush": { + "definition": "Flush();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=25" + }, + "media.mojom.AudioOutputStream.SetVolume": { + "definition": "SetVolume(double volume);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=28" + }, + "media.mojom.AudioOutputStreamObserver.DidStartPlaying": { + "definition": "DidStartPlaying();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=57" + }, + "media.mojom.AudioOutputStreamObserver.DidStopPlaying": { + "definition": "DidStopPlaying();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=62" + }, + "media.mojom.AudioOutputStreamObserver.DidChangeAudibleState": { + "definition": "DidChangeAudibleState(bool is_audible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=67" + }, + "media.mojom.AudioOutputStreamProvider.Acquire": { + "definition": "Acquire(AudioParameters params, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=76" + }, + "media.mojom.AudioOutputStreamProviderClient.Created": { + "definition": "Created(pending_remote stream, ReadWriteAudioDataPipe data_pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=85" + }, + "media.mojom.DeviceSwitchInterface.SwitchAudioOutputDeviceId": { + "definition": "SwitchAudioOutputDeviceId(string output_device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=92" + }, + "media.mojom.DisconnectReason": { + "definition": "enum DisconnectReason { kDefault = 0, kPlatformError = 1, kTerminatedByClient = 2, kStreamCreationFailed = 3, kDocumentDestroyed = 4, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_output_stream.mojom;l=41" + }, + "media.mojom.AudioParameters": { + "definition": "struct AudioParameters;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_parameters.mojom;l=9" + }, + "media.mojom.AudioProcessorControls.GetStats": { + "definition": "GetStats() => (AudioProcessingStats stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_processing.mojom;l=43" + }, + "media.mojom.AudioProcessorControls.SetPreferredNumCaptureChannels": { + "definition": "SetPreferredNumCaptureChannels(int32 num_preferred_channels);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_processing.mojom;l=50" + }, + "media.mojom.AudioProcessingStats": { + "definition": "struct AudioProcessingStats { bool has_echo_return_loss; double echo_return_loss; bool has_echo_return_loss_enhancement; double echo_return_loss_enhancement;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_processing.mojom;l=10" + }, + "media.mojom.AudioProcessingSettings": { + "definition": "struct AudioProcessingSettings { bool echo_cancellation; bool noise_suppression; bool automatic_gain_control; bool multi_channel_capture_processing; bool use_loopback_aec_reference;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_processing.mojom;l=25" + }, + "media.mojom.AudioProcessingConfig": { + "definition": "struct AudioProcessingConfig { pending_receiver controls_receiver; AudioProcessingSettings settings;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_processing.mojom;l=53" + }, + "media.mojom.AudioStreamFactory.CreateInputStream": { + "definition": "CreateInputStream( pending_receiver stream, pending_remote client, pending_remote? observer, pending_remote? log, string device_id, media.mojom.AudioParameters params, mojo_base.mojom.UnguessableToken group_id, uint32 shared_memory_count, bool enable_agc, media.mojom.AudioProcessingConfig? processing_config) => (media.mojom.ReadWriteAudioDataPipe? data_pipe, bool initially_muted, mojo_base.mojom.UnguessableToken? stream_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_stream_factory.mojom;l=49" + }, + "media.mojom.AudioStreamFactory.AssociateInputAndOutputForAec": { + "definition": "AssociateInputAndOutputForAec( mojo_base.mojom.UnguessableToken input_stream_id, string output_device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_stream_factory.mojom;l=66" + }, + "media.mojom.AudioStreamFactory.CreateOutputStream": { + "definition": "CreateOutputStream( pending_receiver stream, pending_associated_remote? observer, pending_remote? log, string device_id, media.mojom.AudioParameters params, mojo_base.mojom.UnguessableToken group_id) => (media.mojom.ReadWriteAudioDataPipe? data_pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_stream_factory.mojom;l=75" + }, + "media.mojom.AudioStreamFactory.CreateSwitchableOutputStream": { + "definition": "CreateSwitchableOutputStream( pending_receiver stream, pending_receiver device_switch_receiver, pending_associated_remote? observer, pending_remote? log, string device_id, media.mojom.AudioParameters params, mojo_base.mojom.UnguessableToken group_id) => (media.mojom.ReadWriteAudioDataPipe? data_pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_stream_factory.mojom;l=85" + }, + "media.mojom.AudioStreamFactory.BindMuter": { + "definition": "BindMuter(pending_associated_receiver receiver, mojo_base.mojom.UnguessableToken group_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_stream_factory.mojom;l=103" + }, + "media.mojom.AudioStreamFactory.CreateLoopbackStream": { + "definition": "CreateLoopbackStream( pending_receiver receiver, pending_remote client, pending_remote observer, media.mojom.AudioParameters params, uint32 shared_memory_count, mojo_base.mojom.UnguessableToken group_id) => (media.mojom.ReadWriteAudioDataPipe? data_pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/audio_stream_factory.mojom;l=113" + }, + "media.mojom.CaptureHandle": { + "definition": "struct CaptureHandle { url.mojom.Origin origin; mojo_base.mojom.String16 capture_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/capture_handle.mojom;l=10" + }, + "media.mojom.CastApplicationMediaInfoManager.GetCastApplicationMediaInfo": { + "definition": "GetCastApplicationMediaInfo() => (CastApplicationMediaInfo cast_application_media_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cast_application_media_info_manager.mojom;l=22" + }, + "media.mojom.CastApplicationMediaInfo": { + "definition": "struct CastApplicationMediaInfo { string application_session_id; bool mixer_audio_enabled; bool is_audio_only_session;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cast_application_media_info_manager.mojom;l=7" + }, + "media.mojom.CdmContextEventCallback.EventCallback": { + "definition": "EventCallback(CdmContextEvent event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=27" + }, + "media.mojom.CdmContextForOOPVD.GetHwKeyData": { + "definition": "GetHwKeyData(DecryptConfig decrypt_config, array hw_identifier) => (DecryptStatus status, array key_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=34" + }, + "media.mojom.CdmContextForOOPVD.RegisterEventCallback": { + "definition": "RegisterEventCallback(pending_remote callback);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=39" + }, + "media.mojom.CdmContextForOOPVD.GetHwConfigData": { + "definition": "GetHwConfigData() => (bool success, array config_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=42" + }, + "media.mojom.CdmContextForOOPVD.GetScreenResolutions": { + "definition": "GetScreenResolutions() => (array resolutions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=46" + }, + "media.mojom.CdmContextForOOPVD.AllocateSecureBuffer": { + "definition": "AllocateSecureBuffer(uint32 size) => (handle? secure_buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=50" + }, + "media.mojom.CdmContextForOOPVD.ParseEncryptedSliceHeader": { + "definition": "ParseEncryptedSliceHeader(uint64 secure_handle, uint32 offset, array stream_data) => (bool success, array slice_header);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=54" + }, + "media.mojom.CdmContextForOOPVD.DecryptVideoBuffer": { + "definition": "DecryptVideoBuffer(DecoderBuffer buffer, array bytes) => (DecryptStatus status, DecoderBuffer? decoder_buffer, array bytes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=60" + }, + "media.mojom.DecryptStatus": { + "definition": "enum DecryptStatus { kSuccess, kNoKey, kFailure,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=11" + }, + "media.mojom.CdmContextEvent": { + "definition": "enum CdmContextEvent { kHasAdditionalUsableKey, kHardwareContextReset,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_context_for_oopvd.mojom;l=18" + }, + "media.mojom.CdmDocumentService.ChallengePlatform": { + "definition": "ChallengePlatform(string service_id, string challenge) => (bool success, string signed_data, string signed_data_signature, string platform_key_certificate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_document_service.mojom;l=48" + }, + "media.mojom.CdmDocumentService.GetStorageId": { + "definition": "GetStorageId(uint32 version) => (uint32 version, array storage_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_document_service.mojom;l=57" + }, + "media.mojom.CdmDocumentService.GetMediaFoundationCdmData": { + "definition": "[EnableIf=is_win] GetMediaFoundationCdmData() => (MediaFoundationCdmData cdm_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_document_service.mojom;l=66" + }, + "media.mojom.CdmDocumentService.SetCdmClientToken": { + "definition": "[EnableIf=is_win] SetCdmClientToken(array client_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_document_service.mojom;l=72" + }, + "media.mojom.CdmDocumentService.OnCdmEvent": { + "definition": "[EnableIf=is_win] OnCdmEvent(CdmEvent event, uint32 hresult);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_document_service.mojom;l=78" + }, + "media.mojom.MediaFoundationCdmData": { + "definition": "struct MediaFoundationCdmData { mojo_base.mojom.UnguessableToken origin_id; array? client_token; mojo_base.mojom.FilePath cdm_store_path_root;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_document_service.mojom;l=14" + }, + "media.mojom.CdmService.CreateCdmFactory": { + "definition": "CreateCdmFactory(pending_receiver factory, pending_remote frame_interfaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_service.mojom;l=24" + }, + "media.mojom.SeatbeltExtensionTokenProvider.GetTokens": { + "definition": "[Sync] GetTokens() => (array tokens);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_service.mojom;l=31" + }, + "media.mojom.CdmServiceBroker.GetService": { + "definition": "GetService(mojo_base.mojom.FilePath cdm_path, [EnableIf=is_mac] pending_remote? token_provider, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_service.mojom;l=52" + }, + "media.mojom.CdmStorage.Open": { + "definition": "Open(string file_name) => (Status status, pending_associated_remote? cdm_file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_storage.mojom;l=27" + }, + "media.mojom.CdmFile.Read": { + "definition": "Read() => (Status status, array data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_storage.mojom;l=45" + }, + "media.mojom.CdmFile.Write": { + "definition": "Write(array data) => (Status status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_storage.mojom;l=52" + }, + "media.mojom.Status": { + "definition": "enum Status { kSuccess = 0, kInUse = 1, kFailure = 2 };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_storage.mojom;l=12" + }, + "media.mojom.Status": { + "definition": "enum Status { kSuccess, kFailure };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/cdm_storage.mojom;l=36" + }, + "media.mojom.ContentDecryptionModule.SetClient": { + "definition": "SetClient(pending_associated_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=88" + }, + "media.mojom.ContentDecryptionModule.SetServerCertificate": { + "definition": "SetServerCertificate(array certificate_data) => (CdmPromiseResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=92" + }, + "media.mojom.ContentDecryptionModule.GetStatusForPolicy": { + "definition": "GetStatusForPolicy(HdcpVersion min_hdcp_version) => (CdmPromiseResult result, CdmKeyStatus key_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=99" + }, + "media.mojom.ContentDecryptionModule.CreateSessionAndGenerateRequest": { + "definition": "CreateSessionAndGenerateRequest(CdmSessionType session_type, EmeInitDataType init_data_type, array init_data) => (CdmPromiseResult result, string session_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=105" + }, + "media.mojom.ContentDecryptionModule.LoadSession": { + "definition": "LoadSession(CdmSessionType session_type, string session_id) => (CdmPromiseResult result, string session_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=116" + }, + "media.mojom.ContentDecryptionModule.UpdateSession": { + "definition": "UpdateSession(string session_id, array response) => (CdmPromiseResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=120" + }, + "media.mojom.ContentDecryptionModule.CloseSession": { + "definition": "CloseSession(string session_id) => (CdmPromiseResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=124" + }, + "media.mojom.ContentDecryptionModule.RemoveSession": { + "definition": "RemoveSession(string session_id) => (CdmPromiseResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=128" + }, + "media.mojom.ContentDecryptionModuleClient.OnSessionMessage": { + "definition": "OnSessionMessage(string session_id, CdmMessageType message_type, array message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=138" + }, + "media.mojom.ContentDecryptionModuleClient.OnSessionClosed": { + "definition": "OnSessionClosed(string session_id, CdmSessionClosedReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=147" + }, + "media.mojom.ContentDecryptionModuleClient.OnSessionKeysChange": { + "definition": "OnSessionKeysChange(string session_id, bool has_additional_usable_key, array keys_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=152" + }, + "media.mojom.ContentDecryptionModuleClient.OnSessionExpirationUpdate": { + "definition": "OnSessionExpirationUpdate(string session_id, double new_expiry_time_sec);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=158" + }, + "media.mojom.CdmFactory.CreateCdm": { + "definition": "CreateCdm(CdmConfig cdm_config) => (pending_remote? cdm, CdmContext? cdm_context, CreateCdmStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=186" + }, + "media.mojom.CdmConfig": { + "definition": "struct CdmConfig { string key_system; bool allow_distinctive_identifier; bool allow_persistent_state; bool use_hw_secure_codecs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=40" + }, + "media.mojom.CdmPromiseResult": { + "definition": "struct CdmPromiseResult { [Native] bool success; Exception exception; uint32 system_code; string error_message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=52" + }, + "media.mojom.CdmKeyInformation": { + "definition": "struct CdmKeyInformation { array key_id; CdmKeyStatus status; uint32 system_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=66" + }, + "media.mojom.CdmContext": { + "definition": "struct CdmContext { mojo_base.mojom.UnguessableToken cdm_id; pending_remote? decryptor; [EnableIf=is_win] bool requires_media_foundation_renderer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=162" + }, + "media.mojom.EmeInitDataType": { + "definition": "enum EmeInitDataType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=13" + }, + "media.mojom.CdmSessionType": { + "definition": "enum CdmSessionType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=17" + }, + "media.mojom.CdmMessageType": { + "definition": "enum CdmMessageType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=21" + }, + "media.mojom.CdmKeyStatus": { + "definition": "enum CdmKeyStatus { USABLE, INTERNAL_ERROR, EXPIRED, OUTPUT_RESTRICTED, OUTPUT_DOWNSCALED, KEY_STATUS_PENDING, RELEASED, USABLE_IN_FUTURE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=24" + }, + "media.mojom.HdcpVersion": { + "definition": "enum HdcpVersion;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=37" + }, + "media.mojom.Exception": { + "definition": "enum Exception;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/content_decryption_module.mojom;l=55" + }, + "media.mojom.DCOMPSurfaceRegistry.RegisterDCOMPSurfaceHandle": { + "definition": "RegisterDCOMPSurfaceHandle(handle surface_handle) => (mojo_base.mojom.UnguessableToken? token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/dcomp_surface_registry.mojom;l=22" + }, + "media.mojom.DCOMPSurfaceRegistry.UnregisterDCOMPSurfaceHandle": { + "definition": "UnregisterDCOMPSurfaceHandle(mojo_base.mojom.UnguessableToken token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/dcomp_surface_registry.mojom;l=29" + }, + "media.mojom.Decryptor.Initialize": { + "definition": "Initialize(handle audio_pipe, handle video_pipe, handle decrypt_pipe, handle decrypted_pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=28" + }, + "media.mojom.Decryptor.Decrypt": { + "definition": "Decrypt(StreamType stream_type, DecoderBuffer encrypted) => (Status status, DecoderBuffer? buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=36" + }, + "media.mojom.Decryptor.CancelDecrypt": { + "definition": "CancelDecrypt(StreamType stream_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=40" + }, + "media.mojom.Decryptor.InitializeAudioDecoder": { + "definition": "InitializeAudioDecoder(AudioDecoderConfig config) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=44" + }, + "media.mojom.Decryptor.InitializeVideoDecoder": { + "definition": "InitializeVideoDecoder(VideoDecoderConfig config) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=45" + }, + "media.mojom.Decryptor.DecryptAndDecodeAudio": { + "definition": "DecryptAndDecodeAudio(DecoderBuffer encrypted) => (Status status, array audio_buffers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=57" + }, + "media.mojom.Decryptor.DecryptAndDecodeVideo": { + "definition": "DecryptAndDecodeVideo(DecoderBuffer encrypted) => (Status status, VideoFrame? video_frame, pending_remote? releaser);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=59" + }, + "media.mojom.Decryptor.ResetDecoder": { + "definition": "ResetDecoder(StreamType stream_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=68" + }, + "media.mojom.Decryptor.DeinitializeDecoder": { + "definition": "DeinitializeDecoder(StreamType stream_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=77" + }, + "media.mojom.Status": { + "definition": "enum Status;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=17" + }, + "media.mojom.StreamType": { + "definition": "enum StreamType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/decryptor.mojom;l=21" + }, + "media.mojom.DemuxerStream.Initialize": { + "definition": "Initialize() => (Type type, handle pipe, AudioDecoderConfig? audio_config, VideoDecoderConfig? video_config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/demuxer_stream.mojom;l=26" + }, + "media.mojom.DemuxerStream.Read": { + "definition": "Read(uint32 count) => (Status status, array batch_buffers, AudioDecoderConfig? audio_config, VideoDecoderConfig? video_config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/demuxer_stream.mojom;l=47" + }, + "media.mojom.DemuxerStream.EnableBitstreamConverter": { + "definition": "EnableBitstreamConverter();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/demuxer_stream.mojom;l=54" + }, + "media.mojom.Type": { + "definition": "enum Type;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/demuxer_stream.mojom;l=15" + }, + "media.mojom.Status": { + "definition": "enum Status;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/demuxer_stream.mojom;l=19" + }, + "media.mojom.DisplayMediaInformation": { + "definition": "struct DisplayMediaInformation { DisplayCaptureSurfaceType display_surface; bool logical_surface; CursorCaptureType cursor; CaptureHandle? capture_handle; int32 initial_zoom_level;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/display_media_information.mojom;l=23" + }, + "media.mojom.DisplayCaptureSurfaceType": { + "definition": "enum DisplayCaptureSurfaceType { MONITOR, WINDOW, BROWSER,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/display_media_information.mojom;l=10" + }, + "media.mojom.CursorCaptureType": { + "definition": "enum CursorCaptureType { NEVER, ALWAYS, MOTION,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/display_media_information.mojom;l=17" + }, + "media.mojom.EncryptionPattern": { + "definition": "struct EncryptionPattern { uint32 crypt_byte_block; uint32 skip_byte_block;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/encryption_pattern.mojom;l=10" + }, + "media.mojom.MuteStateObserver.OnMuteStateChange": { + "definition": "OnMuteStateChange(bool muted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/frame_interface_factory.mojom;l=20" + }, + "media.mojom.FrameInterfaceFactory.CreateProvisionFetcher": { + "definition": "CreateProvisionFetcher(pending_receiver provision_fetcher);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/frame_interface_factory.mojom;l=30" + }, + "media.mojom.FrameInterfaceFactory.CreateCdmStorage": { + "definition": "CreateCdmStorage(pending_receiver cdm_storage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/frame_interface_factory.mojom;l=34" + }, + "media.mojom.FrameInterfaceFactory.RegisterMuteStateObserver": { + "definition": "[EnableIf=is_win] RegisterMuteStateObserver( pending_remote site_mute_observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/frame_interface_factory.mojom;l=37" + }, + "media.mojom.FrameInterfaceFactory.CreateDCOMPSurfaceRegistry": { + "definition": "[EnableIf=is_win] CreateDCOMPSurfaceRegistry(pending_receiver registry);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/frame_interface_factory.mojom;l=42" + }, + "media.mojom.FrameInterfaceFactory.GetCdmOrigin": { + "definition": "[Sync] GetCdmOrigin() => (url.mojom.Origin cdm_origin);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/frame_interface_factory.mojom;l=46" + }, + "media.mojom.FrameInterfaceFactory.BindEmbedderReceiver": { + "definition": "BindEmbedderReceiver(mojo_base.mojom.GenericPendingReceiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/frame_interface_factory.mojom;l=51" + }, + "media.mojom.FuchsiaMediaCdmProvider.CreateCdm": { + "definition": "CreateCdm(string key_system, CdmRequest cdm_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/fuchsia_media.mojom;l=38" + }, + "media.mojom.FuchsiaMediaCodecProvider.CreateVideoDecoder": { + "definition": "CreateVideoDecoder(VideoCodec codec, VideoDecoderSecureMemoryMode secure_mode, StreamProcessorRequest stream_processor_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/fuchsia_media.mojom;l=46" + }, + "media.mojom.FuchsiaMediaCodecProvider.GetSupportedVideoDecoderConfigs": { + "definition": "GetSupportedVideoDecoderConfigs() => (array supported_configs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/fuchsia_media.mojom;l=51" + }, + "media.mojom.CdmRequest": { + "definition": "struct CdmRequest { handle request;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/fuchsia_media.mojom;l=12" + }, + "media.mojom.StreamProcessorRequest": { + "definition": "struct StreamProcessorRequest { handle request;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/fuchsia_media.mojom;l=17" + }, + "media.mojom.VideoDecoderSecureMemoryMode": { + "definition": "enum VideoDecoderSecureMemoryMode { CLEAR, SECURE, SECURE_OUTPUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/fuchsia_media.mojom;l=21" + }, + "media.mojom.InterfaceFactory.CreateAudioDecoder": { + "definition": "CreateAudioDecoder(pending_receiver audio_decoder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=32" + }, + "media.mojom.InterfaceFactory.CreateVideoDecoder": { + "definition": "CreateVideoDecoder( pending_receiver video_decoder, pending_remote? dst_video_decoder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=41" + }, + "media.mojom.InterfaceFactory.CreateVideoDecoderWithTracker": { + "definition": "[EnableIf=allow_oop_video_decoder] CreateVideoDecoderWithTracker( pending_receiver receiver, pending_remote? tracker);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=52" + }, + "media.mojom.InterfaceFactory.CreateAudioEncoder": { + "definition": "CreateAudioEncoder(pending_receiver audio_encoder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=58" + }, + "media.mojom.InterfaceFactory.CreateDefaultRenderer": { + "definition": "CreateDefaultRenderer(string audio_device_id, pending_receiver renderer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=63" + }, + "media.mojom.InterfaceFactory.CreateCastRenderer": { + "definition": "CreateCastRenderer(mojo_base.mojom.UnguessableToken overlay_plane_id, pending_receiver renderer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=74" + }, + "media.mojom.InterfaceFactory.CreateMediaFoundationRenderer": { + "definition": "CreateMediaFoundationRenderer( pending_remote media_log, pending_receiver renderer, pending_receiver renderer_extension);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=81" + }, + "media.mojom.InterfaceFactory.CreateFlingingRenderer": { + "definition": "CreateFlingingRenderer( string presentation_id, pending_remote client_extension, pending_receiver renderer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=90" + }, + "media.mojom.InterfaceFactory.CreateCdm": { + "definition": "CreateCdm(CdmConfig cdm_config) => (pending_remote? cdm, CdmContext? cdm_context, CreateCdmStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/interface_factory.mojom;l=105" + }, + "media.mojom.KeySystemSupportObserver.OnKeySystemSupportUpdated": { + "definition": "OnKeySystemSupportUpdated(map key_systems);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/key_system_support.mojom;l=71" + }, + "media.mojom.KeySystemSupport.SetObserver": { + "definition": "SetObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/key_system_support.mojom;l=82" + }, + "media.mojom.VideoCodecInfo": { + "definition": "struct VideoCodecInfo { array supported_profiles; bool supports_clear_lead = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/key_system_support.mojom;l=11" + }, + "media.mojom.CdmCapability": { + "definition": "struct CdmCapability { array audio_codecs; map video_codecs; array encryption_schemes; array session_types; mojo_base.mojom.Version version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/key_system_support.mojom;l=24" + }, + "media.mojom.KeySystemCapability": { + "definition": "struct KeySystemCapability { CdmCapability? sw_secure_capability; CdmCapability? hw_secure_capability; CdmCapabilityQueryStatus? sw_secure_capability_query_status; CdmCapabilityQueryStatus? hw_secure_capability_query_status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/key_system_support.mojom;l=59" + }, + "media.mojom.CdmCapabilityQueryStatus": { + "definition": "enum CdmCapabilityQueryStatus { kSuccess = 0, kUnknown = 1, kHardwareSecureCodecNotSupported = 2, kNoSupportedVideoCodec = 3, kNoSupportedEncryptionScheme = 4, kUnsupportedKeySystem = 5, kMediaFoundationCdmNotSupported = 6, kDisconnectionError = 7, kMediaFoundationGetCdmFactoryFailed = 8, kCreateDummyMediaFoundationCdmFailed = 9, kUnexpectedEmptyCapability = 10, kNoMediaDrmSupport = 11, kMediaFoundationGetExtendedDRMTypeSupportFailed = 12,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/key_system_support.mojom;l=40" + }, + "media.mojom.MediaDrmStorage.Initialize": { + "definition": "Initialize() => (bool success, mojo_base.mojom.UnguessableToken? origin_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_drm_storage.mojom;l=34" + }, + "media.mojom.MediaDrmStorage.OnProvisioned": { + "definition": "OnProvisioned() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_drm_storage.mojom;l=39" + }, + "media.mojom.MediaDrmStorage.SavePersistentSession": { + "definition": "SavePersistentSession( string session_id, SessionData session_data) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_drm_storage.mojom;l=42" + }, + "media.mojom.MediaDrmStorage.LoadPersistentSession": { + "definition": "LoadPersistentSession(string session_id) => (SessionData? session_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_drm_storage.mojom;l=47" + }, + "media.mojom.MediaDrmStorage.RemovePersistentSession": { + "definition": "RemovePersistentSession(string session_id) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_drm_storage.mojom;l=50" + }, + "media.mojom.SessionData": { + "definition": "struct SessionData { [Native] array key_set_id; string mime_type; KeyType key_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_drm_storage.mojom;l=9" + }, + "media.mojom.KeyType": { + "definition": "enum KeyType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_drm_storage.mojom;l=12" + }, + "media.mojom.MediaFoundationPreferences.IsHardwareSecureDecryptionAllowed": { + "definition": "IsHardwareSecureDecryptionAllowed() => (bool allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_foundation_preferences.mojom;l=10" + }, + "media.mojom.GpuInfoObserver.OnGpuInfoUpdate": { + "definition": "OnGpuInfoUpdate(gpu.mojom.GpuInfo gpu_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_foundation_service.mojom;l=18" + }, + "media.mojom.MediaFoundationService.IsKeySystemSupported": { + "definition": "IsKeySystemSupported(string key_system) => (bool is_supported, KeySystemCapability key_system_capability);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_foundation_service.mojom;l=29" + }, + "media.mojom.MediaFoundationService.CreateInterfaceFactory": { + "definition": "CreateInterfaceFactory( pending_receiver factory, pending_remote frame_interfaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_foundation_service.mojom;l=37" + }, + "media.mojom.MediaFoundationServiceBroker.UpdateGpuInfo": { + "definition": "UpdateGpuInfo(gpu.mojom.GpuInfo gpu_info) => (pending_remote gpu_info_observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_foundation_service.mojom;l=57" + }, + "media.mojom.MediaFoundationServiceBroker.GetService": { + "definition": "GetService( mojo_base.mojom.FilePath cdm_path, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_foundation_service.mojom;l=62" + }, + "media.mojom.MediaLog.AddLogRecord": { + "definition": "AddLogRecord(MediaLogRecord event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_log.mojom;l=10" + }, + "media.mojom.MediaMetricsProvider.Initialize": { + "definition": "Initialize(bool is_mse, MediaURLScheme url_scheme, MediaStreamType stream_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=40" + }, + "media.mojom.MediaMetricsProvider.OnStarted": { + "definition": "OnStarted(PipelineStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=47" + }, + "media.mojom.MediaMetricsProvider.OnError": { + "definition": "OnError(PipelineStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=51" + }, + "media.mojom.MediaMetricsProvider.OnFallback": { + "definition": "OnFallback(PipelineStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=57" + }, + "media.mojom.MediaMetricsProvider.SetHasPlayed": { + "definition": "SetHasPlayed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=60" + }, + "media.mojom.MediaMetricsProvider.SetHaveEnough": { + "definition": "SetHaveEnough();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=61" + }, + "media.mojom.MediaMetricsProvider.SetIsEME": { + "definition": "SetIsEME();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=62" + }, + "media.mojom.MediaMetricsProvider.SetTimeToMetadata": { + "definition": "SetTimeToMetadata(mojo_base.mojom.TimeDelta elapsed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=63" + }, + "media.mojom.MediaMetricsProvider.SetTimeToFirstFrame": { + "definition": "SetTimeToFirstFrame(mojo_base.mojom.TimeDelta elapsed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=64" + }, + "media.mojom.MediaMetricsProvider.SetTimeToPlayReady": { + "definition": "SetTimeToPlayReady(mojo_base.mojom.TimeDelta elapsed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=65" + }, + "media.mojom.MediaMetricsProvider.SetRendererType": { + "definition": "SetRendererType(RendererType renderer_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=68" + }, + "media.mojom.MediaMetricsProvider.SetDemuxerType": { + "definition": "SetDemuxerType(DemuxerType demuxer_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=71" + }, + "media.mojom.MediaMetricsProvider.SetKeySystem": { + "definition": "SetKeySystem(string key_system);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=76" + }, + "media.mojom.MediaMetricsProvider.SetHasWaitingForKey": { + "definition": "SetHasWaitingForKey();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=80" + }, + "media.mojom.MediaMetricsProvider.SetIsHardwareSecure": { + "definition": "SetIsHardwareSecure();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=83" + }, + "media.mojom.MediaMetricsProvider.SetContainerName": { + "definition": "SetContainerName(MediaContainerName container_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=86" + }, + "media.mojom.MediaMetricsProvider.AcquireWatchTimeRecorder": { + "definition": "AcquireWatchTimeRecorder(PlaybackProperties properties, pending_receiver recorder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=90" + }, + "media.mojom.MediaMetricsProvider.AcquireVideoDecodeStatsRecorder": { + "definition": "AcquireVideoDecodeStatsRecorder( pending_receiver recorder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=94" + }, + "media.mojom.MediaMetricsProvider.AcquirePlaybackEventsRecorder": { + "definition": "AcquirePlaybackEventsRecorder( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=99" + }, + "media.mojom.MediaMetricsProvider.SetHasAudio": { + "definition": "SetHasAudio(AudioCodec codec);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=103" + }, + "media.mojom.MediaMetricsProvider.SetHasVideo": { + "definition": "SetHasVideo(VideoCodec codec);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=104" + }, + "media.mojom.MediaMetricsProvider.SetVideoPipelineInfo": { + "definition": "SetVideoPipelineInfo(VideoPipelineInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=105" + }, + "media.mojom.MediaMetricsProvider.SetAudioPipelineInfo": { + "definition": "SetAudioPipelineInfo(AudioPipelineInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=106" + }, + "media.mojom.MediaURLScheme": { + "definition": "enum MediaURLScheme { kUnknown = 0, kMissing, kHttp, kHttps, kFtp, kChromeExtension, kJavascript, kFile, kBlob, kData, kFileSystem, kChrome, kContent, kContentId,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_metrics_provider.mojom;l=15" + }, + "media.mojom.MediaPlayer.RequestPlay": { + "definition": "RequestPlay();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=16" + }, + "media.mojom.MediaPlayer.RequestPause": { + "definition": "RequestPause(bool triggered_by_user);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=19" + }, + "media.mojom.MediaPlayer.RequestSeekForward": { + "definition": "RequestSeekForward(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=22" + }, + "media.mojom.MediaPlayer.RequestSeekBackward": { + "definition": "RequestSeekBackward(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=25" + }, + "media.mojom.MediaPlayer.RequestSeekTo": { + "definition": "RequestSeekTo(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=28" + }, + "media.mojom.MediaPlayer.RequestEnterPictureInPicture": { + "definition": "RequestEnterPictureInPicture();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=31" + }, + "media.mojom.MediaPlayer.RequestMute": { + "definition": "RequestMute(bool mute);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=34" + }, + "media.mojom.MediaPlayer.SetVolumeMultiplier": { + "definition": "SetVolumeMultiplier(double multiplier);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=39" + }, + "media.mojom.MediaPlayer.SetPersistentState": { + "definition": "SetPersistentState(bool persistent);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=43" + }, + "media.mojom.MediaPlayer.SetPowerExperimentState": { + "definition": "SetPowerExperimentState(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=47" + }, + "media.mojom.MediaPlayer.SetAudioSinkId": { + "definition": "SetAudioSinkId(string sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=50" + }, + "media.mojom.MediaPlayer.SuspendForFrameClosed": { + "definition": "SuspendForFrameClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=53" + }, + "media.mojom.MediaPlayer.RequestMediaRemoting": { + "definition": "RequestMediaRemoting();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=57" + }, + "media.mojom.MediaPlayer.RequestVisibility": { + "definition": "RequestVisibility() => (bool has_sufficiently_visible_video);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=65" + }, + "media.mojom.MediaPlayer.RecordAutoPictureInPictureInfo ": { + "definition": "RecordAutoPictureInPictureInfo (AutoPipInfo auto_picture_in_picture_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=70" + }, + "media.mojom.MediaPlayerObserverClient.GetHasPlayedBefore": { + "definition": "GetHasPlayedBefore() => (bool has_played_before);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=77" + }, + "media.mojom.MediaPlayerObserver.OnMediaPlaying": { + "definition": "OnMediaPlaying();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=84" + }, + "media.mojom.MediaPlayerObserver.OnMediaPaused": { + "definition": "OnMediaPaused(bool stream_ended);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=88" + }, + "media.mojom.MediaPlayerObserver.OnMutedStatusChanged": { + "definition": "OnMutedStatusChanged(bool muted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=91" + }, + "media.mojom.MediaPlayerObserver.OnMediaMetadataChanged": { + "definition": "OnMediaMetadataChanged( bool has_audio, bool has_video, MediaContentType content_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=95" + }, + "media.mojom.MediaPlayerObserver.OnMediaPositionStateChanged": { + "definition": "OnMediaPositionStateChanged(media_session.mojom.MediaPosition media_position);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=100" + }, + "media.mojom.MediaPlayerObserver.OnMediaEffectivelyFullscreenChanged": { + "definition": "OnMediaEffectivelyFullscreenChanged(FullscreenVideoStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=106" + }, + "media.mojom.MediaPlayerObserver.OnMediaSizeChanged": { + "definition": "OnMediaSizeChanged(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=109" + }, + "media.mojom.MediaPlayerObserver.OnPictureInPictureAvailabilityChanged": { + "definition": "OnPictureInPictureAvailabilityChanged(bool available);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=112" + }, + "media.mojom.MediaPlayerObserver.OnAudioOutputSinkChanged": { + "definition": "OnAudioOutputSinkChanged(string hashed_device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=115" + }, + "media.mojom.MediaPlayerObserver.OnUseAudioServiceChanged": { + "definition": "OnUseAudioServiceChanged(bool uses_audio_service);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=118" + }, + "media.mojom.MediaPlayerObserver.OnAudioOutputSinkChangingDisabled": { + "definition": "OnAudioOutputSinkChangingDisabled();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=122" + }, + "media.mojom.MediaPlayerObserver.OnRemotePlaybackMetadataChange": { + "definition": "OnRemotePlaybackMetadataChange(media_session.mojom.RemotePlaybackMetadata remote_playback_metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=125" + }, + "media.mojom.MediaPlayerObserver.OnVideoVisibilityChanged": { + "definition": "OnVideoVisibilityChanged(bool meets_visibility_threshold);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=129" + }, + "media.mojom.MediaPlayerHost.OnMediaPlayerAdded": { + "definition": "OnMediaPlayerAdded(pending_associated_remote player_remote, pending_associated_receiver observer, int32 player_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_player.mojom;l=142" + }, + "media.mojom.MediaService.CreateInterfaceFactory": { + "definition": "CreateInterfaceFactory( pending_receiver factory, pending_remote frame_interfaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_service.mojom;l=29" + }, + "media.mojom.MediaLogRecord": { + "definition": "struct MediaLogRecord;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=45" + }, + "media.mojom.VideoTransformation": { + "definition": "struct VideoTransformation { VideoRotation rotation; bool mirrored;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=89" + }, + "media.mojom.VideoAspectRatio": { + "definition": "struct VideoAspectRatio { Type type; double value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=173" + }, + "media.mojom.VideoColorSpace": { + "definition": "struct VideoColorSpace { [Native] [Native] [Native] [Native] PrimaryID primaries; TransferID transfer; MatrixID matrix; RangeID range;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=185" + }, + "media.mojom.AudioDecoderConfig": { + "definition": "struct AudioDecoderConfig { AudioCodec codec; SampleFormat sample_format; ChannelLayout channel_layout; int32 samples_per_second; array extra_data; EncryptionScheme encryption_scheme; mojo_base.mojom.TimeDelta seek_preroll; int32 codec_delay; AudioCodecProfile profile; ChannelLayout target_output_channel_layout; SampleFormat target_output_sample_format; bool should_discard_decoder_delay;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=208" + }, + "media.mojom.VideoDecoderConfig": { + "definition": "struct VideoDecoderConfig { VideoCodec codec; VideoCodecProfile profile; uint32 level; bool has_alpha; VideoTransformation transformation; gfx.mojom.Size coded_size; gfx.mojom.Rect visible_rect; gfx.mojom.Size natural_size; VideoAspectRatio aspect_ratio; array extra_data; EncryptionScheme encryption_scheme; VideoColorSpace color_space_info; gfx.mojom.HDRMetadata? hdr_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=225" + }, + "media.mojom.SubsampleEntry": { + "definition": "struct SubsampleEntry;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=243" + }, + "media.mojom.DecryptConfig": { + "definition": "struct DecryptConfig { EncryptionScheme encryption_scheme; mojo_base.mojom.ByteString key_id; mojo_base.mojom.ByteString iv; array subsamples; EncryptionPattern? encryption_pattern;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=266" + }, + "media.mojom.DecoderBufferSideData": { + "definition": "struct DecoderBufferSideData { array spatial_layers; array alpha_data; uint64 secure_handle; mojo_base.mojom.TimeDelta front_discard; mojo_base.mojom.TimeDelta back_discard;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=280" + }, + "media.mojom.DataDecoderBuffer": { + "definition": "struct DataDecoderBuffer { mojo_base.mojom.TimeDelta timestamp; mojo_base.mojom.TimeDelta duration; uint32 data_size; bool is_key_frame; DecryptConfig? decrypt_config; DecoderBufferSideData? side_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=299" + }, + "media.mojom.EosDecoderBuffer": { + "definition": "struct EosDecoderBuffer { DecoderBufferSideDataNextConfig? next_config;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=319" + }, + "media.mojom.AudioBuffer": { + "definition": "struct AudioBuffer { SampleFormat sample_format; ChannelLayout channel_layout; int32 channel_count; int32 sample_rate; int32 frame_count; bool end_of_stream; mojo_base.mojom.TimeDelta timestamp; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=332" + }, + "media.mojom.CaptureVersion": { + "definition": "struct CaptureVersion { uint32 source; uint32 sub_capture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=366" + }, + "media.mojom.VideoFrameMetadata": { + "definition": "struct VideoFrameMetadata { bool allow_overlay; mojo_base.mojom.TimeTicks? capture_begin_time; mojo_base.mojom.TimeTicks? capture_end_time; bool has_capture_counter; int32 capture_counter; gfx.mojom.Rect? capture_update_rect; gfx.mojom.Size? source_size; gfx.mojom.Rect? region_capture_rect; CaptureVersion capture_version; bool copy_required; bool end_of_stream; mojo_base.mojom.TimeDelta? frame_duration; bool has_frame_rate; double frame_rate; bool interactive_content; mojo_base.mojom.TimeTicks? reference_time; bool read_lock_fences_enabled; VideoTransformation? transformation; bool in_surface_view; bool wants_promotion_hint; bool protected_video; bool hw_protected; bool needs_detiling; bool is_webgpu_compatible; mojo_base.mojom.UnguessableToken? tracking_token; bool power_efficient; bool has_device_scale_factor; double device_scale_factor; bool has_page_scale_factor; double page_scale_factor; bool has_root_scroll_offset_x; double root_scroll_offset_x; bool has_root_scroll_offset_y; double root_scroll_offset_y; bool has_top_controls_visible_height; double top_controls_visible_height; mojo_base.mojom.TimeTicks? decode_begin_time; mojo_base.mojom.TimeTicks? decode_end_time; mojo_base.mojom.TimeDelta? processing_time; bool has_rtp_timestamp; double rtp_timestamp; mojo_base.mojom.TimeTicks? receive_time; mojo_base.mojom.TimeDelta? wallclock_frame_duration; uint64? frame_sequence; uint64? source_id; EffectState background_blur;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=373" + }, + "media.mojom.VideoFrame": { + "definition": "struct VideoFrame { VideoPixelFormat format; gfx.mojom.Size coded_size; gfx.mojom.Rect visible_rect; gfx.mojom.Size natural_size; mojo_base.mojom.TimeDelta timestamp; VideoFrameData data; VideoFrameMetadata metadata; gfx.mojom.ColorSpace color_space; gfx.mojom.HDRMetadata? hdr_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=456" + }, + "media.mojom.EosVideoFrameData": { + "definition": "struct EosVideoFrameData {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=494" + }, + "media.mojom.SharedMemoryVideoFrameData": { + "definition": "struct SharedMemoryVideoFrameData { mojo_base.mojom.ReadOnlySharedMemoryRegion frame_data; array strides; array offsets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=498" + }, + "media.mojom.GpuMemoryBufferSharedImageVideoFrameData": { + "definition": "struct GpuMemoryBufferSharedImageVideoFrameData { gfx.mojom.GpuMemoryBufferHandle gpu_memory_buffer_handle; gpu.mojom.ExportedSharedImage? shared_image; gpu.mojom.SyncToken sync_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=508" + }, + "media.mojom.SharedImageVideoFrameData": { + "definition": "struct SharedImageVideoFrameData { gpu.mojom.ExportedSharedImage shared_image; gpu.mojom.SyncToken sync_token; bool is_mappable_si_enabled; [EnableIf=is_android] gpu.mojom.VulkanYCbCrInfo? ycbcr_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=515" + }, + "media.mojom.OpaqueVideoFrameData": { + "definition": "struct OpaqueVideoFrameData {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=528" + }, + "media.mojom.ColorPlaneLayout": { + "definition": "struct ColorPlaneLayout { uint64 stride; uint64 offset; uint64 size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=532" + }, + "media.mojom.DmabufVideoFrameData": { + "definition": "struct DmabufVideoFrameData { array planes; bool is_multi_planar; uint64 buffer_addr_align; uint64 modifier; array> fds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=541" + }, + "media.mojom.PipelineStatistics": { + "definition": "struct PipelineStatistics { uint64 audio_bytes_decoded; uint64 video_bytes_decoded; uint32 video_frames_decoded; uint32 video_frames_dropped; int64 audio_memory_usage; int64 video_memory_usage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=560" + }, + "media.mojom.PredictionFeatures": { + "definition": "struct PredictionFeatures { VideoCodecProfile profile; gfx.mojom.Size video_size; double frames_per_sec = 0; string key_system; bool use_hw_secure_codecs = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=571" + }, + "media.mojom.PredictionTargets": { + "definition": "struct PredictionTargets { uint32 frames_decoded = 0; uint32 frames_dropped = 0; uint32 frames_power_efficient = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=587" + }, + "media.mojom.AudioPipelineInfo": { + "definition": "struct AudioPipelineInfo { AudioDecoderType decoder_type; bool is_platform_decoder = false; bool has_decrypting_demuxer_stream = false; EncryptionType encryption_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=594" + }, + "media.mojom.VideoPipelineInfo": { + "definition": "struct VideoPipelineInfo { VideoDecoderType decoder_type; bool is_platform_decoder = false; bool has_decrypting_demuxer_stream = false; EncryptionType encryption_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=602" + }, + "media.mojom.StatusData": { + "definition": "struct StatusData { string group; uint16 code; string message; mojo_base.mojom.ListValue frames; StatusData? cause; mojo_base.mojom.Value data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=610" + }, + "media.mojom.EncoderStatus": { + "definition": "struct EncoderStatus { StatusData? internal;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=619" + }, + "media.mojom.DecoderStatus": { + "definition": "struct DecoderStatus { StatusData? internal;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=623" + }, + "media.mojom.PipelineStatus": { + "definition": "struct PipelineStatus { StatusData? internal;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=627" + }, + "media.mojom.AutoPipInfo": { + "definition": "struct AutoPipInfo { AutoPipReason auto_pip_reason; bool has_audio_focus; bool is_playing; bool was_recently_audible; bool has_safe_url; bool meets_media_engagement_conditions; bool blocked_due_to_content_setting;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=725" + }, + "media.mojom.AudioCodec": { + "definition": "enum AudioCodec;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=25" + }, + "media.mojom.AudioCodecProfile": { + "definition": "enum AudioCodecProfile;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=27" + }, + "media.mojom.BufferingState": { + "definition": "enum BufferingState;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=31" + }, + "media.mojom.BufferingStateChangeReason": { + "definition": "enum BufferingStateChangeReason;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=33" + }, + "media.mojom.ChannelLayout": { + "definition": "enum ChannelLayout;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=37" + }, + "media.mojom.MediaContentType": { + "definition": "enum MediaContentType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=41" + }, + "media.mojom.OutputDeviceStatus": { + "definition": "enum OutputDeviceStatus;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=49" + }, + "media.mojom.SampleFormat": { + "definition": "enum SampleFormat;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=53" + }, + "media.mojom.VideoCodec": { + "definition": "enum VideoCodec;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=57" + }, + "media.mojom.VideoCodecProfile": { + "definition": "enum VideoCodecProfile;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=61" + }, + "media.mojom.VideoPixelFormat": { + "definition": "enum VideoPixelFormat;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=65" + }, + "media.mojom.VideoDecoderType": { + "definition": "enum VideoDecoderType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=69" + }, + "media.mojom.AudioDecoderType": { + "definition": "enum AudioDecoderType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=73" + }, + "media.mojom.VideoRotation": { + "definition": "enum VideoRotation { kVideoRotation0, kVideoRotation90, kVideoRotation180, kVideoRotation270,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=76" + }, + "media.mojom.FullscreenVideoStatus": { + "definition": "enum FullscreenVideoStatus;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=86" + }, + "media.mojom.WaitingReason": { + "definition": "enum WaitingReason;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=96" + }, + "media.mojom.WatchTimeKey": { + "definition": "enum WatchTimeKey;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=100" + }, + "media.mojom.MediaContainerName": { + "definition": "enum MediaContainerName;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=104" + }, + "media.mojom.MediaStatusState": { + "definition": "enum MediaStatusState;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=108" + }, + "media.mojom.EncryptionScheme": { + "definition": "enum EncryptionScheme;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=112" + }, + "media.mojom.EncryptionType": { + "definition": "enum EncryptionType { kNone, kClear, kEncrypted, kEncryptedWithClearLead,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=115" + }, + "media.mojom.SVCScalabilityMode": { + "definition": "enum SVCScalabilityMode { kL1T1, kL1T2, kL1T3, kL2T1, kL2T2, kL2T3, kL3T1, kL3T2, kL3T3, kL2T1h, kL2T2h, kL2T3h, kS2T1, kS2T2, kS2T3, kS2T1h, kS2T2h, kS2T3h, kS3T1, kS3T2, kS3T3, kS3T1h, kS3T2h, kS3T3h, kL2T1Key, kL2T2Key, kL2T2KeyShift, kL2T3Key, kL2T3KeyShift, kL3T1Key, kL3T2Key, kL3T2KeyShift, kL3T3Key, kL3T3KeyShift, kL3T1h, kL3T2h, kL3T3h,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=123" + }, + "media.mojom.SVCInterLayerPredMode": { + "definition": "enum SVCInterLayerPredMode { kOff, kOn, kOnKeyPic};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=165" + }, + "media.mojom.Type": { + "definition": "enum Type { kDisplay, kPixel, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=174" + }, + "media.mojom.PrimaryID": { + "definition": "enum PrimaryID;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=187" + }, + "media.mojom.TransferID": { + "definition": "enum TransferID;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=190" + }, + "media.mojom.MatrixID": { + "definition": "enum MatrixID;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=193" + }, + "media.mojom.RangeID": { + "definition": "enum RangeID;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=196" + }, + "media.mojom.CdmEvent": { + "definition": "enum CdmEvent { kSignificantPlayback, kPlaybackError, kCdmError, kHardwareContextReset,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=248" + }, + "media.mojom.CdmSessionClosedReason": { + "definition": "enum CdmSessionClosedReason { kInternalError, kClose, kReleaseAcknowledged, kHardwareContextReset, kResourceEvicted,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=256" + }, + "media.mojom.EffectState": { + "definition": "enum EffectState { kUnknown = 0, kDisabled = 1, kEnabled = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=359" + }, + "media.mojom.MediaStreamType": { + "definition": "enum MediaStreamType { kLocalElementCapture = 0, kLocalDeviceCapture = 1, kLocalTabCapture = 2, kLocalDesktopCapture = 3, kLocalDisplayCapture = 4, kRemote = 5, kNone = 6, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=633" + }, + "media.mojom.InputStreamErrorCode": { + "definition": "enum InputStreamErrorCode { kUnknown = 0, kSystemPermissions = 1, kDeviceInUse = 2, kSocketError = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=645" + }, + "media.mojom.RendererType": { + "definition": "enum RendererType { kRendererImpl = 0, kMojo = 1, kCourier = 3, kFlinging = 4, kCast = 5, kMediaFoundation = 6, kRemoting = 8, kCastStreaming = 9, kContentEmbedderDefined = 10, kTest= 11, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=653" + }, + "media.mojom.DemuxerType": { + "definition": "enum DemuxerType { kUnknownDemuxer = 0, kMockDemuxer = 1, kFFmpegDemuxer = 2, kChunkDemuxer = 3, kFrameInjectingDemuxer = 5, kStreamProviderDemuxer = 6, kManifestDemuxer = 7,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=669" + }, + "media.mojom.CreateCdmStatus": { + "definition": "enum CreateCdmStatus { kSuccess = 0, kUnknownError = 1, kCdmCreationAborted = 2, kCreateCdmFuncNotAvailable = 4, kCdmHelperCreationFailed = 5, kGetCdmPrefDataFailed = 6, kGetCdmOriginIdFailed = 7, kInitCdmFailed = 8, kCdmFactoryCreationFailed = 9, kCdmNotSupported = 10, kInvalidCdmConfig = 11, kUnsupportedKeySystem = 12, kDisconnectionError = 13, kNotAllowedOnUniqueOrigin = 14, kMediaCryptoNotAvailable = 16, kNoMoreInstances = 17, kInsufficientGpuResources = 18, kCrOsVerifiedAccessDisabled = 19, kCrOsRemoteFactoryCreationFailed = 20, kAndroidMediaDrmIllegalArgument = 21, kAndroidMediaDrmIllegalState = 22, kAndroidFailedL1SecurityLevel = 23, kAndroidFailedL3SecurityLevel = 24, kAndroidFailedSecurityOrigin = 25, kAndroidFailedMediaCryptoSession = 26, kAndroidFailedToStartProvisioning = 27, kAndroidFailedMediaCryptoCreate = 28, kAndroidUnsupportedMediaCryptoScheme = 29,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=681" + }, + "media.mojom.AutoPipReason": { + "definition": "enum AutoPipReason { kUnknown = 0, kVideoConferencing = 1, kMediaPlayback = 2, kBrowserInitiated = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=716" + }, + "media.mojom.DecoderBufferSideDataNextConfig": { + "definition": "union DecoderBufferSideDataNextConfig { AudioDecoderConfig next_audio_config; VideoDecoderConfig next_video_config;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=274" + }, + "media.mojom.DecoderBuffer": { + "definition": "union DecoderBuffer { EosDecoderBuffer eos; DataDecoderBuffer data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=326" + }, + "media.mojom.VideoFrameData": { + "definition": "union VideoFrameData { EosVideoFrameData eos_data; SharedMemoryVideoFrameData shared_memory_data; GpuMemoryBufferSharedImageVideoFrameData gpu_memory_buffer_shared_image_data; SharedImageVideoFrameData shared_image_data; OpaqueVideoFrameData opaque_data; [EnableIf=is_chromeos|is_linux] DmabufVideoFrameData dmabuf_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/media_types.mojom;l=483" + }, + "media.mojom.MediaDrmSupport.IsKeySystemSupported": { + "definition": "IsKeySystemSupported(string key_system, bool is_secure) => (MediaDrmSupportResult? key_system_supports);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/mediadrm_support.mojom;l=23" + }, + "media.mojom.MediaDrmSupportResult": { + "definition": "struct MediaDrmSupportResult { bool key_system_supports_video_mp4; bool key_system_supports_video_webm; mojo_base.mojom.Version? key_system_version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/mediadrm_support.mojom;l=10" + }, + "media.mojom.OutputProtection.QueryStatus": { + "definition": "QueryStatus() => (bool success, uint32 link_mask, uint32 protection_mask);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/output_protection.mojom;l=39" + }, + "media.mojom.OutputProtection.EnableProtection": { + "definition": "EnableProtection(uint32 desired_protection_mask) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/output_protection.mojom;l=57" + }, + "media.mojom.ProtectionType": { + "definition": "enum ProtectionType { [Default] NONE = 0, HDCP = 1, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/output_protection.mojom;l=12" + }, + "media.mojom.LinkType": { + "definition": "enum LinkType { [Default] NONE = 0, UNKNOWN = 1, INTERNAL = 2, VGA = 4, HDMI = 8, DVI = 16, DISPLAYPORT = 32, NETWORK = 64, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/output_protection.mojom;l=19" + }, + "media.mojom.PlaybackEventsRecorder.OnPlaying": { + "definition": "OnPlaying();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=16" + }, + "media.mojom.PlaybackEventsRecorder.OnPaused": { + "definition": "OnPaused();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=19" + }, + "media.mojom.PlaybackEventsRecorder.OnSeeking": { + "definition": "OnSeeking();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=22" + }, + "media.mojom.PlaybackEventsRecorder.OnEnded": { + "definition": "OnEnded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=25" + }, + "media.mojom.PlaybackEventsRecorder.OnError": { + "definition": "OnError(PipelineStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=28" + }, + "media.mojom.PlaybackEventsRecorder.OnBuffering": { + "definition": "OnBuffering();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=31" + }, + "media.mojom.PlaybackEventsRecorder.OnBufferingComplete": { + "definition": "OnBufferingComplete();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=38" + }, + "media.mojom.PlaybackEventsRecorder.OnNaturalSizeChanged": { + "definition": "OnNaturalSizeChanged(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=41" + }, + "media.mojom.PlaybackEventsRecorder.OnPipelineStatistics": { + "definition": "OnPipelineStatistics(PipelineStatistics stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/playback_events_recorder.mojom;l=44" + }, + "media.mojom.ProvisionFetcher.Retrieve": { + "definition": "Retrieve(url.mojom.Url default_url, string request_data) => (bool result, string response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/provision_fetcher.mojom;l=18" + }, + "media.mojom.RemoterFactory.Create": { + "definition": "Create(pending_remote source, pending_receiver remoter);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=15" + }, + "media.mojom.RemotingDataStreamSender.SendFrame": { + "definition": "SendFrame(media.mojom.DecoderBuffer frame) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=29" + }, + "media.mojom.RemotingDataStreamSender.CancelInFlightData": { + "definition": "CancelInFlightData();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=37" + }, + "media.mojom.Remoter.Start": { + "definition": "Start();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=48" + }, + "media.mojom.Remoter.StartWithPermissionAlreadyGranted": { + "definition": "StartWithPermissionAlreadyGranted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=52" + }, + "media.mojom.Remoter.StartDataStreams": { + "definition": "StartDataStreams(handle? audio_pipe, handle? video_pipe, pending_receiver? audio_sender, pending_receiver? video_sender);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=60" + }, + "media.mojom.Remoter.Stop": { + "definition": "Stop(RemotingStopReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=67" + }, + "media.mojom.Remoter.SendMessageToSink": { + "definition": "SendMessageToSink(array message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=71" + }, + "media.mojom.Remoter.EstimateTransmissionCapacity": { + "definition": "EstimateTransmissionCapacity() => (double rate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=75" + }, + "media.mojom.RemotingSource.OnSinkAvailable": { + "definition": "OnSinkAvailable(RemotingSinkMetadata metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=83" + }, + "media.mojom.RemotingSource.OnSinkGone": { + "definition": "OnSinkGone();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=88" + }, + "media.mojom.RemotingSource.OnStarted": { + "definition": "OnStarted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=95" + }, + "media.mojom.RemotingSource.OnStartFailed": { + "definition": "OnStartFailed(RemotingStartFailReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=96" + }, + "media.mojom.RemotingSource.OnMessageFromSink": { + "definition": "OnMessageFromSink(array message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=101" + }, + "media.mojom.RemotingSource.OnStopped": { + "definition": "OnStopped(RemotingStopReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=106" + }, + "media.mojom.Remotee.OnRemotingSinkReady": { + "definition": "OnRemotingSinkReady(pending_remote sink);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=115" + }, + "media.mojom.Remotee.SendMessageToSource": { + "definition": "SendMessageToSource(array message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=119" + }, + "media.mojom.Remotee.StartDataStreams": { + "definition": "StartDataStreams( pending_remote? audio_stream, pending_remote? video_stream);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=126" + }, + "media.mojom.Remotee.OnFlushUntil": { + "definition": "OnFlushUntil(uint32 audio_frame_count, uint32 video_frame_count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=134" + }, + "media.mojom.Remotee.OnVideoNaturalSizeChange": { + "definition": "OnVideoNaturalSizeChange(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=138" + }, + "media.mojom.RemotingSink.OnMessageFromSource": { + "definition": "OnMessageFromSource(array message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=145" + }, + "media.mojom.RemotingDataStreamReceiver.InitializeDataPipe": { + "definition": "InitializeDataPipe(handle data_pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=154" + }, + "media.mojom.RemotingDataStreamReceiver.ReceiveFrame": { + "definition": "ReceiveFrame(uint32 frame_count, DecoderBuffer buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=158" + }, + "media.mojom.RemotingDataStreamReceiver.FlushUntil": { + "definition": "FlushUntil(uint32 frame_count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting.mojom;l=162" + }, + "media.mojom.RemotingSinkMetadata": { + "definition": "struct RemotingSinkMetadata { array features; array audio_capabilities; array video_capabilities; string friendly_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting_common.mojom;l=48" + }, + "media.mojom.RemotingStopReason": { + "definition": "enum RemotingStopReason { ROUTE_TERMINATED, LOCAL_PLAYBACK, SOURCE_GONE, MESSAGE_SEND_FAILED, DATA_SEND_FAILED, UNEXPECTED_FAILURE, SERVICE_GONE, USER_DISABLED, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting_common.mojom;l=7" + }, + "media.mojom.RemotingStartFailReason": { + "definition": "enum RemotingStartFailReason { CANNOT_START_MULTIPLE = 0, ROUTE_TERMINATED = 1, INVALID_ANSWER_MESSAGE = 2, REMOTING_NOT_PERMITTED = 3, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting_common.mojom;l=20" + }, + "media.mojom.RemotingSinkFeature": { + "definition": "enum RemotingSinkFeature { RENDERING, CONTENT_DECRYPTION,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting_common.mojom;l=27" + }, + "media.mojom.RemotingSinkAudioCapability": { + "definition": "enum RemotingSinkAudioCapability { CODEC_BASELINE_SET, CODEC_AAC, CODEC_OPUS,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting_common.mojom;l=32" + }, + "media.mojom.RemotingSinkVideoCapability": { + "definition": "enum RemotingSinkVideoCapability { SUPPORT_4K, CODEC_BASELINE_SET, CODEC_H264, CODEC_VP8, CODEC_VP9, CODEC_HEVC, CODEC_AV1};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/remoting_common.mojom;l=38" + }, + "media.mojom.Renderer.Initialize": { + "definition": "Initialize(pending_associated_remote client, array>? streams) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=25" + }, + "media.mojom.Renderer.Flush": { + "definition": "Flush() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=31" + }, + "media.mojom.Renderer.StartPlayingFrom": { + "definition": "StartPlayingFrom(mojo_base.mojom.TimeDelta time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=34" + }, + "media.mojom.Renderer.SetPlaybackRate": { + "definition": "SetPlaybackRate(double playback_rate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=37" + }, + "media.mojom.Renderer.SetVolume": { + "definition": "SetVolume(float volume);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=40" + }, + "media.mojom.Renderer.SetCdm": { + "definition": "SetCdm(mojo_base.mojom.UnguessableToken? cdm_id) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=44" + }, + "media.mojom.Renderer.SetLatencyHint": { + "definition": "SetLatencyHint(mojo_base.mojom.TimeDelta? latency_hint);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=51" + }, + "media.mojom.RendererClient.OnTimeUpdate": { + "definition": "OnTimeUpdate(mojo_base.mojom.TimeDelta time, mojo_base.mojom.TimeDelta max_time, mojo_base.mojom.TimeTicks capture_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=63" + }, + "media.mojom.RendererClient.OnBufferingStateChange": { + "definition": "OnBufferingStateChange(BufferingState state, BufferingStateChangeReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=68" + }, + "media.mojom.RendererClient.OnEnded": { + "definition": "OnEnded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=72" + }, + "media.mojom.RendererClient.OnError": { + "definition": "OnError(PipelineStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=77" + }, + "media.mojom.RendererClient.OnAudioConfigChange": { + "definition": "OnAudioConfigChange(AudioDecoderConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=81" + }, + "media.mojom.RendererClient.OnVideoConfigChange": { + "definition": "OnVideoConfigChange(VideoDecoderConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=82" + }, + "media.mojom.RendererClient.OnVideoNaturalSizeChange": { + "definition": "OnVideoNaturalSizeChange(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=85" + }, + "media.mojom.RendererClient.OnVideoOpacityChange": { + "definition": "OnVideoOpacityChange(bool opaque);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=88" + }, + "media.mojom.RendererClient.OnStatisticsUpdate": { + "definition": "OnStatisticsUpdate(PipelineStatistics stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=92" + }, + "media.mojom.RendererClient.OnWaiting": { + "definition": "OnWaiting(WaitingReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer.mojom;l=96" + }, + "media.mojom.FlingingRendererClientExtension.OnRemotePlayStateChange": { + "definition": "OnRemotePlayStateChange(MediaStatusState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer_extensions.mojom;l=24" + }, + "media.mojom.MediaFoundationRendererExtension.GetDCOMPSurface": { + "definition": "GetDCOMPSurface() => (mojo_base.mojom.UnguessableToken? token, string error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer_extensions.mojom;l=52" + }, + "media.mojom.MediaFoundationRendererExtension.SetVideoStreamEnabled": { + "definition": "SetVideoStreamEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer_extensions.mojom;l=55" + }, + "media.mojom.MediaFoundationRendererExtension.SetOutputRect": { + "definition": "SetOutputRect(gfx.mojom.Rect rect) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer_extensions.mojom;l=63" + }, + "media.mojom.MediaFoundationRendererNotifier.MediaFoundationRendererCreated": { + "definition": "MediaFoundationRendererCreated( pending_receiver observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer_extensions.mojom;l=83" + }, + "media.mojom.FrameTextureInfo": { + "definition": "struct FrameTextureInfo { gfx.mojom.GpuMemoryBufferHandle texture_handle; mojo_base.mojom.UnguessableToken token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer_extensions.mojom;l=28" + }, + "media.mojom.FramePoolInitializationParameters": { + "definition": "struct FramePoolInitializationParameters { array frame_textures; gfx.mojom.Size texture_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/renderer_extensions.mojom;l=34" + }, + "media.mojom.SpeechRecognitionContext.BindRecognizer@0": { + "definition": "BindRecognizer@0(pending_receiver receiver, pending_remote client, SpeechRecognitionOptions options) => (bool is_multichannel_supported);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=45" + }, + "media.mojom.SpeechRecognitionContext.BindWebSpeechRecognizer@1": { + "definition": "[MinVersion=6] BindWebSpeechRecognizer@1( pending_receiver session_receiver, pending_remote session_client, pending_receiver audio_forwarder, int32 channel_count, int32 sample_rate, SpeechRecognitionOptions options, bool continuous);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=51" + }, + "media.mojom.SpeechRecognitionRecognizer.SendAudioToSpeechRecognitionService@0": { + "definition": "SendAudioToSpeechRecognitionService@0(AudioDataS16 buffer, [MinVersion=10] mojo_base.mojom.TimeDelta? media_start_pts);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=77" + }, + "media.mojom.SpeechRecognitionRecognizer.MarkDone@1": { + "definition": "MarkDone@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=84" + }, + "media.mojom.SpeechRecognitionRecognizer.OnLanguageChanged@2": { + "definition": "OnLanguageChanged@2(string language);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=88" + }, + "media.mojom.SpeechRecognitionRecognizer.OnMaskOffensiveWordsChanged@3": { + "definition": "[MinVersion=2] OnMaskOffensiveWordsChanged@3(bool mask_offensive_words);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=92" + }, + "media.mojom.SpeechRecognitionRecognizer.UpdateRecognitionContext@4": { + "definition": "[MinVersion=8] UpdateRecognitionContext@4( SpeechRecognitionRecognitionContext recognition_context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=96" + }, + "media.mojom.SpeechRecognitionRecognizerClient.OnSpeechRecognitionRecognitionEvent@0": { + "definition": "OnSpeechRecognitionRecognitionEvent@0(SpeechRecognitionResult result) => (bool continue_recognition);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=110" + }, + "media.mojom.SpeechRecognitionRecognizerClient.OnSpeechRecognitionStopped@1": { + "definition": "OnSpeechRecognitionStopped@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=114" + }, + "media.mojom.SpeechRecognitionRecognizerClient.OnSpeechRecognitionError@2": { + "definition": "OnSpeechRecognitionError@2();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=117" + }, + "media.mojom.SpeechRecognitionRecognizerClient.OnLanguageIdentificationEvent@3": { + "definition": "OnLanguageIdentificationEvent@3(LanguageIdentificationEvent event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=120" + }, + "media.mojom.SpeechRecognitionBrowserObserver.SpeechRecognitionAvailabilityChanged@0": { + "definition": "SpeechRecognitionAvailabilityChanged@0( bool is_speech_recognition_available);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=209" + }, + "media.mojom.SpeechRecognitionBrowserObserver.SpeechRecognitionLanguageChanged@1": { + "definition": "SpeechRecognitionLanguageChanged@1(string language);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=214" + }, + "media.mojom.SpeechRecognitionBrowserObserver.SpeechRecognitionMaskOffensiveWordsChanged@2": { + "definition": "[MinVersion=2] SpeechRecognitionMaskOffensiveWordsChanged@2(bool mask_offensive_words);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=218" + }, + "media.mojom.SpeechRecognitionSurface.Activate@0": { + "definition": "Activate@0();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=227" + }, + "media.mojom.SpeechRecognitionSurface.GetBounds@1": { + "definition": "GetBounds@1() => (gfx.mojom.Rect? bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=231" + }, + "media.mojom.SpeechRecognitionSurfaceClient.OnSessionEnded@0": { + "definition": "OnSessionEnded@0();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=242" + }, + "media.mojom.SpeechRecognitionSurfaceClient.OnFullscreenToggled@1": { + "definition": "OnFullscreenToggled@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=245" + }, + "media.mojom.SpeechRecognitionClientBrowserInterface.BindSpeechRecognitionBrowserObserver@0": { + "definition": "BindSpeechRecognitionBrowserObserver@0( pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=254" + }, + "media.mojom.SpeechRecognitionClientBrowserInterface.REMOVED_1@1": { + "definition": "[MinVersion=1] REMOVED_1@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=256" + }, + "media.mojom.HypothesisParts": { + "definition": "struct HypothesisParts { array text; mojo_base.mojom.TimeDelta hypothesis_part_offset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=125" + }, + "media.mojom.MediaTimestampRange": { + "definition": "struct MediaTimestampRange { mojo_base.mojom.TimeDelta start; mojo_base.mojom.TimeDelta end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=138" + }, + "media.mojom.TimingInformation": { + "definition": "struct TimingInformation { mojo_base.mojom.TimeDelta audio_start_time; mojo_base.mojom.TimeDelta audio_end_time; array? hypothesis_parts; [MinVersion=11] array? originating_media_timestamps;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=144" + }, + "media.mojom.SpeechRecognitionResult": { + "definition": "struct SpeechRecognitionResult { string transcription; bool is_final; TimingInformation? timing_information;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=172" + }, + "media.mojom.LanguageIdentificationEvent": { + "definition": "struct LanguageIdentificationEvent { string language; ConfidenceLevel confidence_level; [MinVersion=1] AsrSwitchResult? asr_switch_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=189" + }, + "media.mojom.SpeechRecognitionOptions": { + "definition": "struct SpeechRecognitionOptions { SpeechRecognitionMode recognition_mode; bool enable_formatting; string? language; [MinVersion=1] bool is_server_based; [MinVersion=1] RecognizerClientType recognizer_client_type; [MinVersion=4] bool skip_continuously_empty_audio = false; [MinVersion=5] string? experiment_recognizer_routing_key; [MinVersion=6] int32 channel_count; [MinVersion=6] int32 sample_rate; [MinVersion=8] SpeechRecognitionRecognitionContext? recognition_context;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=294" + }, + "media.mojom.ConfidenceLevel": { + "definition": "enum ConfidenceLevel { kUnknown, kNotConfident, kConfident, kHighlyConfident,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=19" + }, + "media.mojom.AsrSwitchResult": { + "definition": "enum AsrSwitchResult { kDefaultNoSwitch, kSwitchSucceeded, kSwitchFailed, kSwitchSkipedNoLp,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=28" + }, + "media.mojom.SpeechRecognitionMode": { + "definition": "enum SpeechRecognitionMode { kUnknown, kIme, kCaption,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=269" + }, + "media.mojom.RecognizerClientType": { + "definition": "enum RecognizerClientType { kUnknown, kDictation, kLiveCaption, kProjector, kCastModerator, [MinVersion=9] kSchoolTools,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition.mojom;l=279" + }, + "media.mojom.SpeechRecognitionAudioForwarder.AddAudioFromRenderer@1": { + "definition": "[MinVersion=6] AddAudioFromRenderer@1(AudioDataS16 buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_audio_forwarder.mojom;l=16" + }, + "media.mojom.SpeechRecognitionError": { + "definition": "struct SpeechRecognitionError { media.mojom.SpeechRecognitionErrorCode code; media.mojom.SpeechAudioErrorDetails details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_error.mojom;l=17" + }, + "media.mojom.SpeechAudioErrorDetails": { + "definition": "enum SpeechAudioErrorDetails { kNone = 0, kNoMic = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_error.mojom;l=10" + }, + "media.mojom.SpeechRecognitionErrorCode": { + "definition": "enum SpeechRecognitionErrorCode { kNone = 0, kNoSpeech = 1, kAborted = 2, kAudioCapture = 3, kNetwork = 4, kNotAllowed = 5, kServiceNotAllowed = 6, kBadGrammar = 7, kLanguageNotSupported = 8, kNoMatch = 9, [MinVersion=1] kPhrasesNotSupported = 10,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_error_code.mojom;l=15" + }, + "media.mojom.SpeechRecognitionGrammar": { + "definition": "struct SpeechRecognitionGrammar { url.mojom.Url url; double weight;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_grammar.mojom;l=9" + }, + "media.mojom.SpeechRecognitionPhrase": { + "definition": "struct SpeechRecognitionPhrase { string phrase; float boost;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_recognition_context.mojom;l=8" + }, + "media.mojom.SpeechRecognitionRecognitionContext": { + "definition": "struct SpeechRecognitionRecognitionContext { array phrases;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_recognition_context.mojom;l=21" + }, + "media.mojom.SpeechRecognitionHypothesis": { + "definition": "struct SpeechRecognitionHypothesis { mojo_base.mojom.String16 utterance; double confidence;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_result.mojom;l=11" + }, + "media.mojom.WebSpeechRecognitionResult": { + "definition": "struct WebSpeechRecognitionResult { array hypotheses; bool is_provisional;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_result.mojom;l=21" + }, + "media.mojom.AudioSourceSpeechRecognitionContext.BindAudioSourceFetcher": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] BindAudioSourceFetcher( pending_receiver fetcher_receiver, pending_remote client, SpeechRecognitionOptions options) => (bool is_multichannel_supported);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_service.mojom;l=26" + }, + "media.mojom.SpeechRecognitionService.BindSpeechRecognitionContext": { + "definition": "BindSpeechRecognitionContext( pending_receiver context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_service.mojom;l=41" + }, + "media.mojom.SpeechRecognitionService.BindAudioSourceSpeechRecognitionContext": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] BindAudioSourceSpeechRecognitionContext( pending_receiver context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_service.mojom;l=46" + }, + "media.mojom.SpeechRecognitionService.SetSodaPaths": { + "definition": "SetSodaPaths(mojo_base.mojom.FilePath binary_path, map config_paths, string primary_language_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_service.mojom;l=52" + }, + "media.mojom.SpeechRecognitionService.SetSodaParams": { + "definition": "SetSodaParams(bool mask_offensive_words);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_service.mojom;l=57" + }, + "media.mojom.SpeechRecognitionService.SetSodaConfigPaths": { + "definition": "SetSodaConfigPaths(map config_paths);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_service.mojom;l=61" + }, + "media.mojom.AudioSourceFetcher.Start": { + "definition": "[AllowedContext=sandbox.mojom.Context.kPrivilegedUtility] Start(pending_remote factory, string device_id, media.mojom.AudioParameters audio_parameters);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_service.mojom;l=72" + }, + "media.mojom.AudioSourceFetcher.Stop": { + "definition": "Stop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognition_service.mojom;l=77" + }, + "media.mojom.SpeechRecognizer.Start": { + "definition": "Start(StartSpeechRecognitionRequestParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=74" + }, + "media.mojom.OnDeviceSpeechRecognition.Available": { + "definition": "Available(array languages) => (AvailabilityStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=85" + }, + "media.mojom.OnDeviceSpeechRecognition.Install": { + "definition": "Install(array languages) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=90" + }, + "media.mojom.SpeechRecognitionSession.Abort@0": { + "definition": "Abort@0();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=101" + }, + "media.mojom.SpeechRecognitionSession.StopCapture@1": { + "definition": "StopCapture@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=105" + }, + "media.mojom.SpeechRecognitionSession.UpdateRecognitionContext@2": { + "definition": "[MinVersion=1] UpdateRecognitionContext@2( SpeechRecognitionRecognitionContext recognition_context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=108" + }, + "media.mojom.SpeechRecognitionSessionClient.ResultRetrieved@0": { + "definition": "ResultRetrieved@0(array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=121" + }, + "media.mojom.SpeechRecognitionSessionClient.ErrorOccurred@1": { + "definition": "ErrorOccurred@1(SpeechRecognitionError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=125" + }, + "media.mojom.SpeechRecognitionSessionClient.Started@2": { + "definition": "Started@2();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=128" + }, + "media.mojom.SpeechRecognitionSessionClient.AudioStarted@3": { + "definition": "AudioStarted@3();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=131" + }, + "media.mojom.SpeechRecognitionSessionClient.SoundStarted@4": { + "definition": "SoundStarted@4();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=134" + }, + "media.mojom.SpeechRecognitionSessionClient.SoundEnded@5": { + "definition": "SoundEnded@5();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=137" + }, + "media.mojom.SpeechRecognitionSessionClient.AudioEnded@6": { + "definition": "AudioEnded@6();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=140" + }, + "media.mojom.SpeechRecognitionSessionClient.Ended@7": { + "definition": "Ended@7();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=143" + }, + "media.mojom.StartSpeechRecognitionRequestParams": { + "definition": "struct StartSpeechRecognitionRequestParams { pending_receiver session_receiver; pending_remote client; string language; array grammars; SpeechRecognitionRecognitionContext? recognition_context; uint32 max_hypotheses; bool continuous; bool interim_results; bool on_device; bool allow_cloud_fallback; pending_receiver? audio_forwarder; int32 channel_count; int32 sample_rate;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=24" + }, + "media.mojom.AvailabilityStatus": { + "definition": "enum AvailabilityStatus { kUnavailable, kDownloadable, kDownloading, kAvailable,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/speech_recognizer.mojom;l=15" + }, + "media.stable.mojom.NativePixmapPlane": { + "definition": "struct NativePixmapPlane { uint32 stride@0; uint64 offset@1; uint64 size@2; handle buffer_handle@3;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/stable/native_pixmap_handle.mojom;l=10" + }, + "media.stable.mojom.NativePixmapHandle": { + "definition": "struct NativePixmapHandle { array planes@0; uint64 modifier@1;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/stable/native_pixmap_handle.mojom;l=22" + }, + "media.mojom.VideoDecodePerfHistory.GetPerfInfo": { + "definition": "GetPerfInfo(PredictionFeatures features) => (bool is_smooth, bool is_power_efficient);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decode_perf_history.mojom;l=16" + }, + "media.mojom.VideoDecodeStatsRecorder.StartNewRecord": { + "definition": "StartNewRecord(PredictionFeatures features);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decode_stats_recorder.mojom;l=14" + }, + "media.mojom.VideoDecodeStatsRecorder.UpdateRecord": { + "definition": "UpdateRecord(PredictionTargets targets);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decode_stats_recorder.mojom;l=19" + }, + "media.mojom.VideoFrameHandleReleaser.ReleaseVideoFrame": { + "definition": "ReleaseVideoFrame(mojo_base.mojom.UnguessableToken release_token, gpu.mojom.SyncToken? release_sync_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=59" + }, + "media.mojom.VideoDecoder.GetSupportedConfigs": { + "definition": "[Sync] GetSupportedConfigs() => (array supported_configs, VideoDecoderType decoder_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=83" + }, + "media.mojom.VideoDecoder.Construct": { + "definition": "Construct( pending_associated_remote client, pending_remote media_log, pending_receiver video_frame_handle_releaser, handle decoder_buffer_pipe, CommandBufferId? command_buffer_id, gfx.mojom.ColorSpace target_color_space);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=111" + }, + "media.mojom.VideoDecoder.Initialize": { + "definition": "Initialize(VideoDecoderConfig config, bool low_delay, Cdm? cdm) => (DecoderStatus status, bool needs_bitstream_conversion, int32 max_decode_requests, VideoDecoderType decoder_type, bool needs_transcryption);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=151" + }, + "media.mojom.VideoDecoder.Decode": { + "definition": "Decode(DecoderBuffer buffer) => (DecoderStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=171" + }, + "media.mojom.VideoDecoder.Reset": { + "definition": "Reset() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=176" + }, + "media.mojom.VideoDecoder.OnOverlayInfoChanged": { + "definition": "OnOverlayInfoChanged(OverlayInfo overlay_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=179" + }, + "media.mojom.VideoDecoderClient.OnVideoFrameDecoded": { + "definition": "OnVideoFrameDecoded(VideoFrame frame, bool can_read_without_stalling, mojo_base.mojom.UnguessableToken? release_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=192" + }, + "media.mojom.VideoDecoderClient.OnWaiting": { + "definition": "OnWaiting(WaitingReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=198" + }, + "media.mojom.VideoDecoderClient.RequestOverlayInfo": { + "definition": "RequestOverlayInfo();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=202" + }, + "media.mojom.SupportedVideoDecoderConfig": { + "definition": "struct SupportedVideoDecoderConfig { VideoCodecProfile profile_min; VideoCodecProfile profile_max; gfx.mojom.Size coded_size_min; gfx.mojom.Size coded_size_max; bool allow_encrypted; bool require_encrypted;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=18" + }, + "media.mojom.CommandBufferId": { + "definition": "struct CommandBufferId { mojo_base.mojom.UnguessableToken channel_token; int32 route_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=38" + }, + "media.mojom.OverlayInfo": { + "definition": "struct OverlayInfo;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=44" + }, + "media.mojom.Cdm": { + "definition": "union Cdm { mojo_base.mojom.UnguessableToken cdm_id; [EnableIf=allow_oop_video_decoder] pending_remote cdm_context;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder.mojom;l=64" + }, + "media.mojom.VideoDecoderFactoryProcess.InitializeVideoDecoderFactory": { + "definition": "InitializeVideoDecoderFactory( gpu.mojom.GpuFeatureInfo gpu_feature_info, pending_receiver receiver, pending_remote? gpu_remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_decoder_factory_process.mojom;l=28" + }, + "media.mojom.VideoEncodeAcceleratorProvider.CreateVideoEncodeAccelerator": { + "definition": "CreateVideoEncodeAccelerator( EncodeCommandBufferId? command_buffer_id, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=76" + }, + "media.mojom.VideoEncodeAcceleratorProvider.GetVideoEncodeAcceleratorSupportedProfiles": { + "definition": "[Sync] GetVideoEncodeAcceleratorSupportedProfiles() => (array profiles);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=81" + }, + "media.mojom.VideoEncodeAcceleratorProviderFactory.CreateVideoEncodeAcceleratorProvider": { + "definition": "CreateVideoEncodeAcceleratorProvider( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=107" + }, + "media.mojom.VideoEncodeAccelerator.Initialize": { + "definition": "[Sync] Initialize(VideoEncodeAcceleratorConfig config, pending_associated_remote client, pending_remote media_log) => (EncoderStatus result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=228" + }, + "media.mojom.VideoEncodeAccelerator.Encode": { + "definition": "Encode(VideoFrame frame, VideoEncodeOptions options) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=234" + }, + "media.mojom.VideoEncodeAccelerator.UseOutputBitstreamBuffer": { + "definition": "UseOutputBitstreamBuffer(int32 bitstream_buffer_id, mojo_base.mojom.UnsafeSharedMemoryRegion region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=235" + }, + "media.mojom.VideoEncodeAccelerator.RequestEncodingParametersChangeWithLayers": { + "definition": "RequestEncodingParametersChangeWithLayers( VideoBitrateAllocation bitrate_allocation, uint32 framerate, gfx.mojom.Size? size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=249" + }, + "media.mojom.VideoEncodeAccelerator.RequestEncodingParametersChangeWithBitrate": { + "definition": "RequestEncodingParametersChangeWithBitrate( Bitrate bitrate, uint32 framerate, gfx.mojom.Size? size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=265" + }, + "media.mojom.VideoEncodeAccelerator.IsFlushSupported": { + "definition": "[Sync] IsFlushSupported() => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=267" + }, + "media.mojom.VideoEncodeAccelerator.Flush": { + "definition": "Flush() => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=270" + }, + "media.mojom.VideoEncodeAcceleratorClient.RequireBitstreamBuffers": { + "definition": "RequireBitstreamBuffers(uint32 input_count, gfx.mojom.Size input_coded_size, uint32 output_buffer_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=344" + }, + "media.mojom.VideoEncodeAcceleratorClient.BitstreamBufferReady": { + "definition": "BitstreamBufferReady( int32 bitstream_buffer_id, BitstreamBufferMetadata metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=347" + }, + "media.mojom.VideoEncodeAcceleratorClient.NotifyErrorStatus": { + "definition": "NotifyErrorStatus(EncoderStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=353" + }, + "media.mojom.VideoEncodeAcceleratorClient.NotifyEncoderInfoChange": { + "definition": "NotifyEncoderInfoChange(VideoEncoderInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=357" + }, + "media.mojom.VideoEncodeAcceleratorSupportedProfile": { + "definition": "struct VideoEncodeAcceleratorSupportedProfile { VideoCodecProfile profile; gfx.mojom.Size min_resolution; gfx.mojom.Size max_resolution; uint32 max_framerate_numerator; uint32 max_framerate_denominator; array rate_control_modes; array scalability_modes; bool is_software_codec; array gpu_supported_pixel_formats; bool supports_gpu_shared_images;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=47" + }, + "media.mojom.EncodeCommandBufferId": { + "definition": "struct EncodeCommandBufferId { mojo_base.mojom.UnguessableToken channel_token; int32 route_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=62" + }, + "media.mojom.VariableBitratePeak": { + "definition": "struct VariableBitratePeak { uint32 bps;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=113" + }, + "media.mojom.VideoBitrateAllocation": { + "definition": "struct VideoBitrateAllocation { array bitrates; VariableBitratePeak? variable_bitrate_peak;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=119" + }, + "media.mojom.SpatialLayer": { + "definition": "struct SpatialLayer { int32 width; int32 height; uint32 bitrate_bps; uint32 framerate; uint8 max_qp; uint8 num_of_temporal_layers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=126" + }, + "media.mojom.ConstantBitrate": { + "definition": "struct ConstantBitrate { uint32 target_bps = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=137" + }, + "media.mojom.VariableBitrate": { + "definition": "struct VariableBitrate { uint32 target_bps = 0; uint32 peak_bps;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=143" + }, + "media.mojom.ExternalBitrate": { + "definition": "struct ExternalBitrate {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=148" + }, + "media.mojom.VideoEncodeAcceleratorConfig": { + "definition": "struct VideoEncodeAcceleratorConfig { VideoPixelFormat input_format; gfx.mojom.Size input_visible_size; VideoCodecProfile output_profile; Bitrate bitrate; uint32 framerate; StorageType storage_type; ContentType content_type; uint32 gop_length; bool has_gop_length; uint8 h264_output_level; bool has_h264_output_level; bool is_constrained_h264; uint8 drop_frame_thresh_percentage; array spatial_layers; SVCInterLayerPredMode inter_layer_pred; bool require_low_delay; EncoderType required_encoder_type; bool manual_reference_buffer_control;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=159" + }, + "media.mojom.VideoEncodeOptions": { + "definition": "struct VideoEncodeOptions { bool force_keyframe; int32 quantizer; uint8? update_buffer; array reference_buffers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=207" + }, + "media.mojom.DropFrameMetadata": { + "definition": "struct DropFrameMetadata { uint8 spatial_idx; bool end_of_picture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=285" + }, + "media.mojom.H264Metadata": { + "definition": "struct H264Metadata { uint8 temporal_idx; bool layer_sync;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=290" + }, + "media.mojom.Vp8Metadata": { + "definition": "struct Vp8Metadata { bool non_reference; uint8 temporal_idx; bool layer_sync;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=295" + }, + "media.mojom.Vp9Metadata": { + "definition": "struct Vp9Metadata { bool inter_pic_predicted; bool temporal_up_switch; bool referenced_by_upper_spatial_layers; bool reference_lower_spatial_layers; bool end_of_picture; uint8 temporal_idx; uint8 spatial_idx; array spatial_layer_resolutions; uint8 begin_active_spatial_layer_index; uint8 end_active_spatial_layer_index; array p_diffs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=301" + }, + "media.mojom.SVCGenericMetadata": { + "definition": "struct SVCGenericMetadata { bool follow_svc_spec; uint8 temporal_idx; uint8 spatial_idx; uint16? reference_flags; uint16? refresh_flags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=315" + }, + "media.mojom.BitstreamBufferMetadata": { + "definition": "struct BitstreamBufferMetadata { uint32 payload_size_bytes; bool key_frame; mojo_base.mojom.TimeDelta timestamp; int32 qp; OptionalMetadata? optional_metadata; SVCGenericMetadata? svc_generic; gfx.mojom.Size? encoded_size; gfx.mojom.ColorSpace? encoded_color_space;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=331" + }, + "media.mojom.VideoEncodeAcceleratorSupportedRateControlMode": { + "definition": "enum VideoEncodeAcceleratorSupportedRateControlMode { kNoMode, kConstantMode, kVariableMode, kExternalMode,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=40" + }, + "media.mojom.ContentType": { + "definition": "enum ContentType { kCamera, kDisplay, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=161" + }, + "media.mojom.StorageType": { + "definition": "enum StorageType { kShmem, kGpuMemoryBuffer, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=167" + }, + "media.mojom.EncoderType": { + "definition": "enum EncoderType { kHardware, kSoftware, kNoPreference, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=173" + }, + "media.mojom.Bitrate": { + "definition": "union Bitrate { ConstantBitrate constant; VariableBitrate variable; ExternalBitrate external;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=151" + }, + "media.mojom.OptionalMetadata": { + "definition": "union OptionalMetadata { DropFrameMetadata drop; H264Metadata h264; Vp8Metadata vp8; Vp9Metadata vp9;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encode_accelerator.mojom;l=324" + }, + "media.mojom.ResolutionRateLimit": { + "definition": "struct ResolutionRateLimit { gfx.mojom.Size frame_size; int32 min_start_bitrate_bps; int32 min_bitrate_bps; int32 max_bitrate_bps; uint32 max_framerate_numerator; uint32 max_framerate_denominator;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encoder_info.mojom;l=14" + }, + "media.mojom.VideoEncoderInfo": { + "definition": "struct VideoEncoderInfo { string implementation_name; bool has_frame_delay = false; int32 frame_delay; bool has_input_capacity = false; int32 input_capacity; bool supports_native_handle; bool has_trusted_rate_controller; bool is_hardware_accelerated; bool supports_simulcast; bool reports_average_qp; uint32 requested_resolution_alignment; bool apply_alignment_to_all_simulcast_layers; bool supports_frame_size_change = false; array, 5> fps_allocation; array resolution_rate_limits; array gpu_supported_pixel_formats; bool supports_gpu_shared_images;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encoder_info.mojom;l=30" + }, + "media.mojom.VideoEncoderMetricsProvider.Initialize": { + "definition": "Initialize(uint64 encoder_id, VideoEncoderUseCase encoder_use_case, VideoCodecProfile profile, gfx.mojom.Size encode_size, bool is_hardware_encoder, SVCScalabilityMode svc_mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encoder_metrics_provider.mojom;l=29" + }, + "media.mojom.VideoEncoderMetricsProvider.SetEncodedFrameCount": { + "definition": "SetEncodedFrameCount(uint64 encoder_id, uint64 num_encoded_frames);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encoder_metrics_provider.mojom;l=36" + }, + "media.mojom.VideoEncoderMetricsProvider.SetError": { + "definition": "SetError(uint64 encoder_id, EncoderStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encoder_metrics_provider.mojom;l=40" + }, + "media.mojom.VideoEncoderMetricsProvider.Complete": { + "definition": "Complete(uint64 encoder_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encoder_metrics_provider.mojom;l=45" + }, + "media.mojom.VideoEncoderUseCase": { + "definition": "enum VideoEncoderUseCase { kCastMirroring = 0, kMediaRecorder = 1, kWebCodecs = 2, kWebRTC = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/video_encoder_metrics_provider.mojom;l=13" + }, + "media.mojom.WatchTimeRecorder.RecordWatchTime": { + "definition": "RecordWatchTime(WatchTimeKey key, mojo_base.mojom.TimeDelta watch_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=63" + }, + "media.mojom.WatchTimeRecorder.FinalizeWatchTime": { + "definition": "FinalizeWatchTime(array watch_time_keys);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=67" + }, + "media.mojom.WatchTimeRecorder.OnError": { + "definition": "OnError(PipelineStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=71" + }, + "media.mojom.WatchTimeRecorder.UpdateSecondaryProperties": { + "definition": "UpdateSecondaryProperties(SecondaryPlaybackProperties secondary_properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=75" + }, + "media.mojom.WatchTimeRecorder.SetAutoplayInitiated": { + "definition": "SetAutoplayInitiated(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=82" + }, + "media.mojom.WatchTimeRecorder.OnDurationChanged": { + "definition": "OnDurationChanged(mojo_base.mojom.TimeDelta duration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=88" + }, + "media.mojom.WatchTimeRecorder.UpdateVideoDecodeStats": { + "definition": "UpdateVideoDecodeStats(uint32 frames_decoded, uint32 frames_dropped);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=92" + }, + "media.mojom.WatchTimeRecorder.UpdateUnderflowCount": { + "definition": "UpdateUnderflowCount(int32 total_count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=97" + }, + "media.mojom.WatchTimeRecorder.UpdateUnderflowDuration": { + "definition": "UpdateUnderflowDuration(int32 total_completed_count, mojo_base.mojom.TimeDelta total_duration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=98" + }, + "media.mojom.PlaybackProperties": { + "definition": "struct PlaybackProperties { bool has_audio; bool has_video; bool is_background; bool is_muted; bool is_eme; bool is_embedded_media_experience; MediaStreamType media_stream_type; RendererType renderer_type; DemuxerType demuxer_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=13" + }, + "media.mojom.SecondaryPlaybackProperties": { + "definition": "struct SecondaryPlaybackProperties { AudioCodec audio_codec; VideoCodec video_codec; AudioCodecProfile audio_codec_profile; VideoCodecProfile video_codec_profile; AudioDecoderType audio_decoder; VideoDecoderType video_decoder; EncryptionScheme audio_encryption_scheme; EncryptionScheme video_encryption_scheme; gfx.mojom.Size natural_size; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/watch_time_recorder.mojom;l=30" + }, + "media.mojom.WebrtcVideoPerfRecorder.UpdateRecord": { + "definition": "UpdateRecord( WebrtcPredictionFeatures features, WebrtcVideoStats video_stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/webrtc_video_perf.mojom;l=32" + }, + "media.mojom.WebrtcVideoPerfHistory.GetPerfInfo": { + "definition": "GetPerfInfo(WebrtcPredictionFeatures features, int32 frames_per_second) => (bool is_smooth);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/webrtc_video_perf.mojom;l=41" + }, + "media.mojom.WebrtcPredictionFeatures": { + "definition": "struct WebrtcPredictionFeatures { bool is_decode_stats = true; VideoCodecProfile profile; int32 video_pixels = 0; bool hardware_accelerated = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/webrtc_video_perf.mojom;l=10" + }, + "media.mojom.WebrtcVideoStats": { + "definition": "struct WebrtcVideoStats { uint32 frames_processed = 0; uint32 key_frames_processed = 0; float p99_processing_time_ms = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:media/mojo/mojom/webrtc_video_perf.mojom;l=20" + }, + "mojo.interface_control.RunMessageParams": { + "definition": "struct RunMessageParams { RunInput input;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=20" + }, + "mojo.interface_control.RunResponseMessageParams": { + "definition": "struct RunResponseMessageParams { RunOutput? output;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=28" + }, + "mojo.interface_control.QueryVersion": { + "definition": "struct QueryVersion {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=37" + }, + "mojo.interface_control.QueryVersionResult": { + "definition": "struct QueryVersionResult { uint32 version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=39" + }, + "mojo.interface_control.FlushForTesting": { + "definition": "struct FlushForTesting {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=44" + }, + "mojo.interface_control.RunOrClosePipeMessageParams": { + "definition": "struct RunOrClosePipeMessageParams { RunOrClosePipeInput input;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=55" + }, + "mojo.interface_control.RequireVersion": { + "definition": "struct RequireVersion { uint32 version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=68" + }, + "mojo.interface_control.EnableIdleTracking": { + "definition": "struct EnableIdleTracking { int64 timeout_in_microseconds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=77" + }, + "mojo.interface_control.MessageAck": { + "definition": "struct MessageAck {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=86" + }, + "mojo.interface_control.NotifyIdle": { + "definition": "struct NotifyIdle {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=91" + }, + "mojo.interface_control.RunInput": { + "definition": "union RunInput { QueryVersion query_version; FlushForTesting flush_for_testing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=23" + }, + "mojo.interface_control.RunOutput": { + "definition": "union RunOutput { QueryVersionResult query_version_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=31" + }, + "mojo.interface_control.RunOrClosePipeInput": { + "definition": "union RunOrClosePipeInput { RequireVersion require_version; EnableIdleTracking enable_idle_tracking; MessageAck message_ack; NotifyIdle notify_idle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=58" + }, + "mojo.native.SerializedHandle": { + "definition": "struct SerializedHandle { handle the_handle; SerializedHandleType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/native_struct.mojom;l=16" + }, + "mojo.native.NativeStruct": { + "definition": "struct NativeStruct { array data; array? handles;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/native_struct.mojom;l=22" + }, + "mojo.native.SerializedHandleType": { + "definition": "enum SerializedHandleType { MOJO_HANDLE, PLATFORM_FILE, WIN_HANDLE, MACH_PORT, FUCHSIA_HANDLE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/native_struct.mojom;l=8" + }, + "mojo.pipe_control.RunOrClosePipeMessageParams": { + "definition": "struct RunOrClosePipeMessageParams { RunOrClosePipeInput input;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/pipe_control_messages.mojom;l=22" + }, + "mojo.pipe_control.DisconnectReason": { + "definition": "struct DisconnectReason { uint32 custom_reason; string description;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/pipe_control_messages.mojom;l=33" + }, + "mojo.pipe_control.PeerAssociatedEndpointClosedEvent": { + "definition": "struct PeerAssociatedEndpointClosedEvent { uint32 id; DisconnectReason? disconnect_reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/pipe_control_messages.mojom;l=43" + }, + "mojo.pipe_control.PauseUntilFlushCompletes": { + "definition": "struct PauseUntilFlushCompletes { handle flush_pipe;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/pipe_control_messages.mojom;l=52" + }, + "mojo.pipe_control.FlushAsync": { + "definition": "struct FlushAsync { handle flusher_pipe;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/pipe_control_messages.mojom;l=58" + }, + "mojo.pipe_control.RunOrClosePipeInput": { + "definition": "union RunOrClosePipeInput { PeerAssociatedEndpointClosedEvent peer_associated_endpoint_closed_event; PauseUntilFlushCompletes pause_until_flush_completes; FlushAsync flush_async;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/interfaces/bindings/pipe_control_messages.mojom;l=26" + }, + "mojo_base.mojom.AbslStatusCode": { + "definition": "enum AbslStatusCode { kOk = 0, kCancelled = 1, kUnknown = 2, kInvalidArgument = 3, kDeadlineExceeded = 4, kNotFound = 5, kAlreadyExists = 6, kPermissionDenied = 7, kResourceExhausted = 8, kFailedPrecondition = 9, kAborted = 10, kOutOfRange = 11, kUnimplemented = 12, kInternal = 13, kUnavailable = 14, kDataLoss = 15, kUnauthenticated = 16,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/absl_status.mojom;l=13" + }, + "mojo_base.mojom.ApplicationState": { + "definition": "enum ApplicationState { UNKNOWN, HAS_RUNNING_ACTIVITIES, HAS_PAUSED_ACTIVITIES, HAS_STOPPED_ACTIVITIES, HAS_DESTROYED_ACTIVITIES,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/application_state.mojom;l=8" + }, + "mojo_base.mojom.BatteryPowerStatus": { + "definition": "enum BatteryPowerStatus { kUnknown = 0, kBatteryPower = 1, kExternalPower = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/battery_power_status.mojom;l=10" + }, + "mojo_base.mojom.BigBufferSharedMemoryRegion": { + "definition": "struct BigBufferSharedMemoryRegion { handle buffer_handle; uint32 size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/big_buffer.mojom;l=8" + }, + "mojo_base.mojom.BigBuffer": { + "definition": "union BigBuffer { array bytes; BigBufferSharedMemoryRegion shared_memory; bool invalid_buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/big_buffer.mojom;l=26" + }, + "mojo_base.mojom.BigString": { + "definition": "struct BigString { mojo_base.mojom.BigBuffer data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/big_string.mojom;l=18" + }, + "mojo_base.mojom.Binder.Bind@0": { + "definition": "Bind@0(GenericPendingReceiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/binder.mojom;l=17" + }, + "mojo_base.mojom.ByteCount": { + "definition": "struct ByteCount { int64 count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/byte_count.mojom;l=8" + }, + "mojo_base.mojom.ByteString": { + "definition": "struct ByteString { array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/byte_string.mojom;l=15" + }, + "mojo_base.mojom.Empty": { + "definition": "struct Empty {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/empty.mojom;l=10" + }, + "mojo_base.mojom.Error": { + "definition": "struct Error { Code code; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/error.mojom;l=50" + }, + "mojo_base.mojom.Code": { + "definition": "enum Code { kCancelled = 1, kUnknown = 2, kInvalidArgument = 3, kDeadlineExceeded = 4, kNotFound = 5, kAlreadyExists = 6, kPermissionDenied = 7, kResourceExhausted = 8, kFailedPrecondition = 9, kAborted = 10, kOutOfRange = 11, kUnimplemented = 12, kInternal = 13, kUnavailable = 14, kDataLoss = 15, kUnauthenticated = 16,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/error.mojom;l=12" + }, + "mojo_base.mojom.File": { + "definition": "struct File { handle fd; bool async;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/file.mojom;l=9" + }, + "mojo_base.mojom.ReadOnlyFile": { + "definition": "struct ReadOnlyFile { handle fd; bool async;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/file.mojom;l=24" + }, + "mojo_base.mojom.FileError": { + "definition": "enum FileError { OK = 0, FAILED = -1, IN_USE = -2, EXISTS = -3, NOT_FOUND = -4, ACCESS_DENIED = -5, TOO_MANY_OPENED = -6, NO_MEMORY = -7, NO_SPACE = -8, NOT_A_DIRECTORY = -9, INVALID_OPERATION = -10, SECURITY = -11, ABORT = -12, NOT_A_FILE = -13, NOT_EMPTY = -14, INVALID_URL = -15, IO = -16,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/file_error.mojom;l=9" + }, + "mojo_base.mojom.FileInfo": { + "definition": "struct FileInfo { int64 size; bool is_directory; bool is_symbolic_link; Time last_modified; Time last_accessed; Time creation_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/file_info.mojom;l=10" + }, + "mojo_base.mojom.FilePath": { + "definition": "struct FilePath { [EnableIf=file_path_is_string] string path; [EnableIf=file_path_is_string16] array path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/file_path.mojom;l=40" + }, + "mojo_base.mojom.RelativeFilePath": { + "definition": "struct RelativeFilePath { [EnableIf=file_path_is_string] string path; [EnableIf=file_path_is_string16] array path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/file_path.mojom;l=57" + }, + "mojo_base.mojom.GenericPendingAssociatedReceiver": { + "definition": "struct GenericPendingAssociatedReceiver { string interface_name; pending_associated_receiver receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/generic_pending_associated_receiver.mojom;l=13" + }, + "mojo_base.mojom.GenericPendingReceiver": { + "definition": "struct GenericPendingReceiver { string interface_name@0; handle receiving_pipe@1;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/generic_pending_receiver.mojom;l=17" + }, + "mojo_base.mojom.Int128": { + "definition": "struct Int128 { int64 high; uint64 low;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/int128.mojom;l=10" + }, + "mojo_base.mojom.Uint128": { + "definition": "struct Uint128 { uint64 high; uint64 low;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/int128.mojom;l=18" + }, + "mojo_base.mojom.JsError": { + "definition": "struct JsError { string? name; string? cause; string? message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/jserror.mojom;l=22" + }, + "mojo_base.mojom.LOGFONT": { + "definition": "struct LOGFONT { array bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/logfont_win.mojom;l=9" + }, + "mojo_base.mojom.MemoryAllocatorDumpCrossProcessUid": { + "definition": "struct MemoryAllocatorDumpCrossProcessUid { uint64 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/memory_allocator_dump_cross_process_uid.mojom;l=8" + }, + "mojo_base.mojom.MemoryPressureLevel": { + "definition": "enum MemoryPressureLevel { NONE, MODERATE, CRITICAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/memory_pressure_level.mojom;l=8" + }, + "mojo_base.mojom.MessagePumpType": { + "definition": "enum MessagePumpType { kDefault, kUi, kCustom, kIo, [EnableIf=is_android] kJava, [EnableIf=is_mac] kNsRunloop, [EnableIf=is_ios] kNsRunloop,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/message_pump_type.mojom;l=8" + }, + "mojo_base.mojom.ProcessId": { + "definition": "struct ProcessId { uint32 pid;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/process_id.mojom;l=8" + }, + "mojo_base.mojom.ProcessPriority": { + "definition": "enum ProcessPriority { kBestEffort, kUserVisible, kUserBlocking,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/process_priority.mojom;l=8" + }, + "mojo_base.mojom.ProtoWrapper": { + "definition": "struct ProtoWrapper { string proto_name; mojo_base.mojom.BigBuffer smuggled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/proto_wrapper.mojom;l=24" + }, + "mojo_base.mojom.ReadOnlyBuffer": { + "definition": "struct ReadOnlyBuffer { array buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/read_only_buffer.mojom;l=10" + }, + "mojo_base.mojom.RefCountedMemory": { + "definition": "struct RefCountedMemory { mojo_base.mojom.BigBuffer data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/ref_counted_memory.mojom;l=13" + }, + "mojo_base.mojom.SafeBaseName": { + "definition": "struct SafeBaseName { FilePath path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/safe_base_name.mojom;l=10" + }, + "mojo_base.mojom.ReadOnlySharedMemoryRegion": { + "definition": "struct ReadOnlySharedMemoryRegion { handle buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/shared_memory.mojom;l=10" + }, + "mojo_base.mojom.WritableSharedMemoryRegion": { + "definition": "struct WritableSharedMemoryRegion { handle buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/shared_memory.mojom;l=17" + }, + "mojo_base.mojom.UnsafeSharedMemoryRegion": { + "definition": "struct UnsafeSharedMemoryRegion { handle buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/shared_memory.mojom;l=25" + }, + "mojo_base.mojom.String16": { + "definition": "struct String16 { array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/string16.mojom;l=13" + }, + "mojo_base.mojom.BigString16": { + "definition": "struct BigString16 { BigBuffer data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/string16.mojom;l=22" + }, + "mojo_base.mojom.TextDirection": { + "definition": "enum TextDirection { UNKNOWN_DIRECTION, RIGHT_TO_LEFT, LEFT_TO_RIGHT};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/text_direction.mojom;l=8" + }, + "mojo_base.mojom.ThreadType": { + "definition": "enum ThreadType { kBackground, kUtility, kDefault, kDisplayCritical, kInteractive, kRealtimeAudio,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/thread_type.mojom;l=8" + }, + "mojo_base.mojom.Time": { + "definition": "struct Time { int64 internal_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/time.mojom;l=8" + }, + "mojo_base.mojom.JSTime": { + "definition": "struct JSTime { double msec;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/time.mojom;l=15" + }, + "mojo_base.mojom.TimeDelta": { + "definition": "struct TimeDelta { int64 microseconds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/time.mojom;l=25" + }, + "mojo_base.mojom.TimeTicks": { + "definition": "struct TimeTicks { int64 internal_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/time.mojom;l=30" + }, + "mojo_base.mojom.Token": { + "definition": "struct Token { uint64 high; uint64 low;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/token.mojom;l=9" + }, + "mojo_base.mojom.UnguessableToken": { + "definition": "struct UnguessableToken { uint64 high; uint64 low;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/unguessable_token.mojom;l=9" + }, + "mojo_base.mojom.Uuid": { + "definition": "struct Uuid { string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/uuid.mojom;l=9" + }, + "mojo_base.mojom.DictionaryValue": { + "definition": "struct DictionaryValue { map storage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/values.mojom;l=32" + }, + "mojo_base.mojom.ListValue": { + "definition": "struct ListValue { array storage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/values.mojom;l=37" + }, + "mojo_base.mojom.Value": { + "definition": "union Value { uint8 null_value; bool bool_value; int32 int_value; double double_value; string string_value; array binary_value; DictionaryValue dictionary_value; ListValue list_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/values.mojom;l=12" + }, + "mojo_base.mojom.Version": { + "definition": "struct Version { array components;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/version.mojom;l=9" + }, + "mojo_base.mojom.WString": { + "definition": "struct WString { array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/mojom/base/wstring.mojom;l=9" + }, + "fuzz.mojom.FuzzDummyInterface.Ping": { + "definition": "Ping();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=69" + }, + "fuzz.mojom.FuzzInterface.FuzzBasic": { + "definition": "FuzzBasic();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=74" + }, + "fuzz.mojom.FuzzInterface.FuzzBasicResp": { + "definition": "FuzzBasicResp() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=75" + }, + "fuzz.mojom.FuzzInterface.FuzzBasicSyncResp": { + "definition": "[Sync] FuzzBasicSyncResp() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=76" + }, + "fuzz.mojom.FuzzInterface.FuzzArgs": { + "definition": "FuzzArgs(FuzzStruct a, FuzzStruct? b);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=78" + }, + "fuzz.mojom.FuzzInterface.FuzzArgsResp": { + "definition": "FuzzArgsResp(FuzzStruct a, FuzzStruct? b) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=80" + }, + "fuzz.mojom.FuzzInterface.FuzzArgsSyncResp": { + "definition": "[Sync] FuzzArgsSyncResp(FuzzStruct a, FuzzStruct? b) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=81" + }, + "fuzz.mojom.FuzzInterface.FuzzAssociated": { + "definition": "FuzzAssociated(pending_associated_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=83" + }, + "fuzz.mojom.FuzzDummyStruct": { + "definition": "struct FuzzDummyStruct { int8 dummy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=14" + }, + "fuzz.mojom.FuzzStruct": { + "definition": "struct FuzzStruct { bool fuzz_bool; int8 fuzz_int8; uint8 fuzz_uint8; int16 fuzz_int16; uint16 fuzz_uint16; int32 fuzz_int32; uint32 fuzz_uint32; int64 fuzz_int64; uint64 fuzz_uint64; float fuzz_float; double fuzz_double; string fuzz_string; array fuzz_bool_array; array fuzz_primitive_array; map fuzz_primitive_map; map> fuzz_array_map; map fuzz_union_map; array fuzz_union_array; array fuzz_struct_array; array? fuzz_nullable_array; array?>>>? fuzz_complex;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=42" + }, + "fuzz.mojom.FuzzEnum": { + "definition": "enum FuzzEnum { FUZZ_VALUE0, FUZZ_VALUE1, FUZZ_VALUE2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=8" + }, + "fuzz.mojom.FuzzUnion": { + "definition": "union FuzzUnion { bool fuzz_bool; int8 fuzz_int8; uint8 fuzz_uint8; int16 fuzz_int16; uint16 fuzz_uint16; int32 fuzz_int32; uint32 fuzz_uint32; int64 fuzz_int64; uint64 fuzz_uint64; float fuzz_float; double fuzz_double; string fuzz_string; array fuzz_bool_array; array fuzz_primitive_array; array fuzz_struct_array; map fuzz_primitive_map; map> fuzz_array_map; map fuzz_struct_map; map fuzz_union_map; array?>>>? fuzz_complex;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:mojo/public/tools/fuzzers/fuzz.mojom;l=18" + }, + "ax.android.mojom.AccessibilityHelperHost.OnAccessibilityEvent@1": { + "definition": "OnAccessibilityEvent@1(AccessibilityEventData event_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=536" + }, + "ax.android.mojom.AccessibilityHelperHost.OnNotificationStateChanged@2": { + "definition": "[MinVersion=10] OnNotificationStateChanged@2( string notification_key, AccessibilityNotificationStateType state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=540" + }, + "ax.android.mojom.AccessibilityHelperHost.OnToggleNativeChromeVoxArcSupport@3": { + "definition": "[MinVersion=18] OnToggleNativeChromeVoxArcSupport@3(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=545" + }, + "ax.android.mojom.AccessibilityHelperInstance.Init@7": { + "definition": "[MinVersion=9] Init@7( pending_remote host_remote) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=567" + }, + "ax.android.mojom.AccessibilityHelperInstance.SetFilter@2": { + "definition": "SetFilter@2(AccessibilityFilterType filter_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=571" + }, + "ax.android.mojom.AccessibilityHelperInstance.PerformAction@4": { + "definition": "[MinVersion=4] PerformAction@4(AccessibilityActionData action_data) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=574" + }, + "ax.android.mojom.AccessibilityHelperInstance.SetExploreByTouchEnabled@8": { + "definition": "[MinVersion=11] SetExploreByTouchEnabled@8(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=578" + }, + "ax.android.mojom.AccessibilityHelperInstance.RefreshWithExtraData@9": { + "definition": "[MinVersion=13] RefreshWithExtraData@9(AccessibilityActionData refresh_data) => (Rect? text_location);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=582" + }, + "ax.android.mojom.AccessibilityHelperInstance.RequestSendAccessibilityTree@11": { + "definition": "[MinVersion=17] RequestSendAccessibilityTree@11( AccessibilityWindowKey window);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=586" + }, + "ax.android.mojom.AccessibilityHelperInstance.SetNativeChromeVoxArcSupportForFocusedWindow@12": { + "definition": "[MinVersion=24] SetNativeChromeVoxArcSupportForFocusedWindow@12( bool enabled) => (SetNativeChromeVoxResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=591" + }, + "ax.android.mojom.Rect": { + "definition": "struct Rect { int32 left; int32 top; int32 right; int32 bottom;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=11" + }, + "ax.android.mojom.SpanEntry": { + "definition": "struct SpanEntry { int32 start; int32 end; SpanType span_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=246" + }, + "ax.android.mojom.AccessibilityCollectionInfoData": { + "definition": "struct AccessibilityCollectionInfoData { int32 row_count; int32 column_count; bool is_hierarchical; AccessibilitySelectionMode selection_mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=262" + }, + "ax.android.mojom.AccessibilityCollectionItemInfoData": { + "definition": "struct AccessibilityCollectionItemInfoData { int32 row_index; int32 column_index; int32 row_span; int32 column_span; bool is_heading; bool is_selected;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=270" + }, + "ax.android.mojom.AccessibilityRangeInfoData": { + "definition": "struct AccessibilityRangeInfoData { AccessibilityRangeType range_type; float min; float max; float current;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=289" + }, + "ax.android.mojom.AccessibilityActionInAndroid": { + "definition": "struct AccessibilityActionInAndroid { int32 id; string? label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=319" + }, + "ax.android.mojom.AccessibilityNodeInfoData": { + "definition": "struct AccessibilityNodeInfoData { Rect bounds_in_screen; [MinVersion=1] int32 id; [MinVersion=1] map? boolean_properties; [MinVersion=1] map? string_properties; [MinVersion=1] map? int_properties; [MinVersion=1] map>? int_list_properties; [MinVersion=3] map>? string_list_properties; [MinVersion=5] map>? spannable_string_properties; [MinVersion=5] AccessibilityCollectionInfoData? collection_info; [MinVersion=5] AccessibilityCollectionItemInfoData? collection_item_info; [MinVersion=5] AccessibilityRangeInfoData? range_info; [MinVersion=12] int32 window_id; [MinVersion=20] bool is_virtual_node; [MinVersion=24] array? standard_actions; [MinVersion=24] array? custom_actions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=326" + }, + "ax.android.mojom.AccessibilityWindowInfoData": { + "definition": "struct AccessibilityWindowInfoData { int32 window_id; int32 root_node_id; Rect bounds_in_screen; AccessibilityWindowType window_type; map? boolean_properties; map? string_properties; map? int_properties; map>? int_list_properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=349" + }, + "ax.android.mojom.AccessibilityEventData": { + "definition": "struct AccessibilityEventData { AccessibilityEventType event_type; int32 source_id; array node_data; [MinVersion=6] string? notification_key; [MinVersion=6] int32 window_id; [MinVersion=8] int32 task_id; [MinVersion=12] array? window_data; [MinVersion=14] bool is_input_method_window; [MinVersion=15] array? event_text; [MinVersion=21] map? int_properties; [MinVersion=21] map? string_properties; [MinVersion=23] map>? int_list_properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=426" + }, + "ax.android.mojom.AccessibilityActionData": { + "definition": "struct AccessibilityActionData { int32 node_id; AccessibilityActionType action_type; int32 custom_action_id; [MinVersion=6] int32 window_id; [MinVersion=13] int32 start_index; [MinVersion=13] int32 end_index; [MinVersion=25] map? int_parameters; [MinVersion=25] map? string_parameters; [MinVersion=25] map? float_parameters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=500" + }, + "ax.android.mojom.AccessibilityEventType": { + "definition": "enum AccessibilityEventType { VIEW_FOCUSED, VIEW_CLICKED, VIEW_LONG_CLICKED, VIEW_SELECTED, VIEW_TEXT_CHANGED, WINDOW_STATE_CHANGED, NOTIFICATION_STATE_CHANGED, VIEW_HOVER_ENTER, VIEW_HOVER_EXIT, TOUCH_EXPLORATION_GESTURE_START, TOUCH_EXPLORATION_GESTURE_END, WINDOW_CONTENT_CHANGED, VIEW_SCROLLED, VIEW_TEXT_SELECTION_CHANGED, ANNOUNCEMENT, VIEW_ACCESSIBILITY_FOCUSED, VIEW_ACCESSIBILITY_FOCUS_CLEARED, VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY, GESTURE_DETECTION_START, GESTURE_DETECTION_END, TOUCH_INTERACTION_START, TOUCH_INTERACTION_END, WINDOWS_CHANGED, VIEW_CONTEXT_CLICKED, ASSIST_READING_CONTEXT, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=30" + }, + "ax.android.mojom.ContentChangeType": { + "definition": "enum ContentChangeType { CONTENT_DESCRIPTION, STATE_DESCRIPTION, SUBTREE, TEXT, PANE_TITLE, UNDEFINED, PANE_APPEARED, PANE_DISAPPEARED, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=64" + }, + "ax.android.mojom.AccessibilityActionType": { + "definition": "enum AccessibilityActionType { FOCUS, CLEAR_FOCUS, SELECT, CLEAR_SELECTION, CLICK, LONG_CLICK, ACCESSIBILITY_FOCUS, CLEAR_ACCESSIBILITY_FOCUS, NEXT_AT_MOVEMENT_GRANULARITY, PREVIOUS_AT_MOVEMENT_GRANULARITY, NEXT_HTML_ELEMENT, PREVIOUS_HTML_ELEMENT, SCROLL_FORWARD, SCROLL_BACKWARD, COPY, PASTE, CUT, SET_SELECTION, EXPAND, COLLAPSE, DISMISS, SET_TEXT, CONTEXT_CLICK, SCROLL_DOWN, SCROLL_LEFT, SCROLL_RIGHT, SCROLL_TO_POSITION, SCROLL_UP, SET_PROGRESS, SHOW_ON_SCREEN, CUSTOM_ACTION, GET_TEXT_LOCATION, SHOW_TOOLTIP, HIDE_TOOLTIP, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=78" + }, + "ax.android.mojom.AccessibilityBooleanProperty": { + "definition": "enum AccessibilityBooleanProperty { CHECKABLE, CHECKED, FOCUSABLE, FOCUSED, SELECTED, CLICKABLE, LONG_CLICKABLE, ENABLED, PASSWORD, SCROLLABLE, ACCESSIBILITY_FOCUSED, VISIBLE_TO_USER, EDITABLE, OPENS_POPUP, DISMISSABLE, MULTI_LINE, CONTENT_INVALID, CONTEXT_CLICKABLE, IMPORTANCE, SCREEN_READER_FOCUSABLE, SHOWING_HINT_TEXT, HEADING, SUPPORTS_TEXT_LOCATION, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=120" + }, + "ax.android.mojom.AccessibilityStringProperty": { + "definition": "enum AccessibilityStringProperty { PACKAGE_NAME, CLASS_NAME, TEXT, CONTENT_DESCRIPTION, VIEW_ID_RESOURCE_NAME, CHROME_ROLE, ROLE_DESCRIPTION, TOOLTIP, PANE_TITLE, HINT_TEXT, STATE_DESCRIPTION, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=150" + }, + "ax.android.mojom.AccessibilityIntProperty": { + "definition": "enum AccessibilityIntProperty { LABEL_FOR, LABELED_BY, TRAVERSAL_BEFORE, TRAVERSAL_AFTER, MAX_TEXT_LENGTH, TEXT_SELECTION_START, TEXT_SELECTION_END, INPUT_TYPE, LIVE_REGION, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=168" + }, + "ax.android.mojom.AccessibilityIntListProperty": { + "definition": "enum AccessibilityIntListProperty { CHILD_NODE_IDS, CUSTOM_ACTION_IDS_DEPRECATED, STANDARD_ACTION_IDS_DEPRECATED, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=184" + }, + "ax.android.mojom.AccessibilityStringListProperty": { + "definition": "enum AccessibilityStringListProperty { CUSTOM_ACTION_DESCRIPTIONS, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=195" + }, + "ax.android.mojom.AccessibilityWindowBooleanProperty": { + "definition": "enum AccessibilityWindowBooleanProperty { ACCESSIBILITY_FOCUSED, FOCUSED, IN_PICTURE_IN_PICTURE_MODE, WINDOW_ACTIVE, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=203" + }, + "ax.android.mojom.AccessibilityWindowIntProperty": { + "definition": "enum AccessibilityWindowIntProperty { ANCHOR_NODE_ID, LAYER_ORDER, PARENT_WINDOW_ID, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=214" + }, + "ax.android.mojom.AccessibilityWindowStringProperty": { + "definition": "enum AccessibilityWindowStringProperty { TITLE, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=224" + }, + "ax.android.mojom.AccessibilityWindowIntListProperty": { + "definition": "enum AccessibilityWindowIntListProperty { CHILD_WINDOW_IDS, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=232" + }, + "ax.android.mojom.SpanType": { + "definition": "enum SpanType { URL, CLICKABLE, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=239" + }, + "ax.android.mojom.AccessibilitySelectionMode": { + "definition": "enum AccessibilitySelectionMode { NONE, SINGLE, MULTIPLE, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=254" + }, + "ax.android.mojom.AccessibilityRangeType": { + "definition": "enum AccessibilityRangeType { INT, FLOAT, PERCENT, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=281" + }, + "ax.android.mojom.AccessibilityLiveRegionType": { + "definition": "enum AccessibilityLiveRegionType { NONE, POLITE, ASSERTIVE, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=298" + }, + "ax.android.mojom.AccessibilityWindowType": { + "definition": "enum AccessibilityWindowType { TYPE_ACCESSIBILITY_OVERLAY, TYPE_APPLICATION, TYPE_INPUT_METHOD, TYPE_SPLIT_SCREEN_DIVIDER, TYPE_SYSTEM, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=307" + }, + "ax.android.mojom.AccessibilityFilterType": { + "definition": "enum AccessibilityFilterType { OFF, FOCUS, ALL, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=363" + }, + "ax.android.mojom.AccessibilityNotificationStateType": { + "definition": "enum AccessibilityNotificationStateType { SURFACE_CREATED, SURFACE_REMOVED, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=376" + }, + "ax.android.mojom.AccessibilityEventIntProperty": { + "definition": "enum AccessibilityEventIntProperty { ACTION, FROM_INDEX, TO_INDEX, ITEM_COUNT, CURRENT_ITEM_INDEX, SCROLL_X, SCROLL_Y, MAX_SCROLL_X, MAX_SCROLL_Y, SCROLL_DELTA_X, SCROLL_DELTA_Y, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=390" + }, + "ax.android.mojom.AccessibilityEventStringProperty": { + "definition": "enum AccessibilityEventStringProperty { CLASS_NAME, PACKAGE_NAME, CONTENT_DESCRIPTION, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=408" + }, + "ax.android.mojom.ActionFloatArgumentType": { + "definition": "enum ActionFloatArgumentType { PROGRESS_VALUE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=465" + }, + "ax.android.mojom.ActionIntArgumentType": { + "definition": "enum ActionIntArgumentType { MOVEMENT_GRANULARITY_INT, SELECTION_START_INT, SELECTION_END_INT, ROW_INT, COLUMN_INT, MOVE_WINDOW_X, MOVE_WINDOW_Y, PRESS_AND_HOLD_DURATION_MILLIS_INT};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=472" + }, + "ax.android.mojom.ActionStringArgumentType": { + "definition": "enum ActionStringArgumentType { HTML_ELEMENT_STRING, SET_TEXT_CHARSEQUENCE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=486" + }, + "ax.android.mojom.ActionComplexArgumentType": { + "definition": "enum ActionComplexArgumentType { ACCESSIBLE_CLICKABLE_SPAN};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=494" + }, + "ax.android.mojom.SetNativeChromeVoxResponse": { + "definition": "enum SetNativeChromeVoxResponse { SUCCESS, WINDOW_NOT_FOUND, TALKBACK_NOT_INSTALLED, FAILURE, NEED_DEPRECATION_CONFIRMATION, [Default] INVALID_ENUM_VALUE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=550" + }, + "ax.android.mojom.AccessibilityWindowKey": { + "definition": "union AccessibilityWindowKey { uint32 window_id; uint32 task_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/android/public/mojom/accessibility_helper.mojom;l=525" + }, + "ax.mojom.AssistiveTechnologyController.EnableAssistiveTechnology": { + "definition": "EnableAssistiveTechnology(array enabled_features);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=34" + }, + "ax.mojom.AccessibilityService.BindAccessibilityServiceClient": { + "definition": "BindAccessibilityServiceClient( pending_remote accessibility_service_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=47" + }, + "ax.mojom.AccessibilityService.BindAssistiveTechnologyController": { + "definition": "[EnableIf=supports_os_accessibility_service] BindAssistiveTechnologyController( pending_receiver at_controller, array enabled_features);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=54" + }, + "ax.mojom.AccessibilityService.ConnectDevToolsAgent": { + "definition": "[EnableIf=supports_os_accessibility_service] ConnectDevToolsAgent( pending_associated_receiver agent, AssistiveTechnologyType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=62" + }, + "ax.mojom.AccessibilityServiceClient.BindAutomation": { + "definition": "BindAutomation( pending_associated_remote automation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=81" + }, + "ax.mojom.AccessibilityServiceClient.BindAutomationClient": { + "definition": "BindAutomationClient(pending_receiver automation_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=86" + }, + "ax.mojom.AccessibilityServiceClient.BindAutoclickClient": { + "definition": "[EnableIf=supports_os_accessibility_service] BindAutoclickClient( pending_receiver autoclick_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=90" + }, + "ax.mojom.AccessibilityServiceClient.BindSpeechRecognition": { + "definition": "[EnableIf=supports_os_accessibility_service] BindSpeechRecognition(pending_receiver sr_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=96" + }, + "ax.mojom.AccessibilityServiceClient.BindTts": { + "definition": "[EnableIf=supports_os_accessibility_service] BindTts(pending_receiver tts_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=101" + }, + "ax.mojom.AccessibilityServiceClient.BindUserInput": { + "definition": "[EnableIf=supports_os_accessibility_service] BindUserInput(pending_receiver user_input_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=106" + }, + "ax.mojom.AccessibilityServiceClient.BindUserInterface": { + "definition": "[EnableIf=supports_os_accessibility_service] BindUserInterface(pending_receiver user_interface_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=111" + }, + "ax.mojom.AccessibilityServiceClient.BindAccessibilityFileLoader": { + "definition": "[EnableIf=supports_os_accessibility_service] BindAccessibilityFileLoader( pending_receiver file_loader_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/accessibility_service.mojom;l=116" + }, + "ax.mojom.AssistiveTechnologyType": { + "definition": "enum AssistiveTechnologyType { [Default] kUnknown = 0, kChromeVox, kSelectToSpeak, kSwitchAccess, kAutoClick, kMagnifier, kDictation,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/assistive_technology_type.mojom;l=9" + }, + "ax.mojom.Autoclick.RequestScrollableBoundsForPoint": { + "definition": "RequestScrollableBoundsForPoint(gfx.mojom.Point point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/autoclick.mojom;l=16" + }, + "ax.mojom.AutoclickClient.HandleScrollableBoundsForPointFound": { + "definition": "HandleScrollableBoundsForPointFound(gfx.mojom.Rect bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/autoclick.mojom;l=28" + }, + "ax.mojom.AutoclickClient.BindAutoclick": { + "definition": "BindAutoclick() => (pending_receiver autoclick_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/autoclick.mojom;l=32" + }, + "ax.mojom.Automation.DispatchTreeDestroyedEvent": { + "definition": "DispatchTreeDestroyedEvent(ax.mojom.AXTreeID tree_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation.mojom;l=21" + }, + "ax.mojom.Automation.DispatchActionResult": { + "definition": "DispatchActionResult(ax.mojom.AXActionData data, bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation.mojom;l=26" + }, + "ax.mojom.Automation.DispatchAccessibilityEvents": { + "definition": "DispatchAccessibilityEvents( ax.mojom.AXTreeID tree_id, array updates, gfx.mojom.Point mouse_location, array events);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation.mojom;l=29" + }, + "ax.mojom.Automation.DispatchAccessibilityLocationChange": { + "definition": "DispatchAccessibilityLocationChange( ax.mojom.AXTreeID tree_id, int32 node_id, ax.mojom.AXRelativeBounds bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation.mojom;l=38" + }, + "ax.mojom.Automation.DispatchAccessibilityScrollChange": { + "definition": "DispatchAccessibilityScrollChange( ax.mojom.AXTreeID tree_id, int32 node_id, int32 scroll_x, int32 scroll_y);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation.mojom;l=45" + }, + "ax.mojom.AutomationClient.Enable": { + "definition": "Enable() => (ax.mojom.AXTreeID desktop_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation_client.mojom;l=22" + }, + "ax.mojom.AutomationClient.Disable": { + "definition": "Disable();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation_client.mojom;l=28" + }, + "ax.mojom.AutomationClient.EnableChildTree": { + "definition": "EnableChildTree(ax.mojom.AXTreeID tree_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation_client.mojom;l=35" + }, + "ax.mojom.AutomationClient.PerformAction": { + "definition": "PerformAction(ax.mojom.AXActionData action_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/automation_client.mojom;l=40" + }, + "ax.mojom.AccessibilityFileLoader.Load": { + "definition": "Load(mojo_base.mojom.RelativeFilePath path) => (mojo_base.mojom.ReadOnlyFile? file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/file_loader.mojom;l=15" + }, + "ax.mojom.SpeechRecognitionEventObserver.OnStop": { + "definition": "OnStop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=57" + }, + "ax.mojom.SpeechRecognitionEventObserver.OnResult": { + "definition": "OnResult(SpeechRecognitionResultEvent event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=60" + }, + "ax.mojom.SpeechRecognitionEventObserver.OnError": { + "definition": "OnError(SpeechRecognitionErrorEvent event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=65" + }, + "ax.mojom.SpeechRecognition.Start": { + "definition": "Start(StartOptions options) => (SpeechRecognitionStartInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=90" + }, + "ax.mojom.SpeechRecognition.Stop": { + "definition": "Stop(StopOptions options) => (string? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=97" + }, + "ax.mojom.SpeechRecognitionResultEvent": { + "definition": "struct SpeechRecognitionResultEvent { string transcript; bool is_final;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=16" + }, + "ax.mojom.SpeechRecognitionErrorEvent": { + "definition": "struct SpeechRecognitionErrorEvent { string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=24" + }, + "ax.mojom.StartOptions": { + "definition": "struct StartOptions { AssistiveTechnologyType type; string? locale; bool? interim_results;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=30" + }, + "ax.mojom.StopOptions": { + "definition": "struct StopOptions { AssistiveTechnologyType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=41" + }, + "ax.mojom.SpeechRecognitionStartInfo": { + "definition": "struct SpeechRecognitionStartInfo { SpeechRecognitionType type; ObserverOrError observer_or_error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=79" + }, + "ax.mojom.SpeechRecognitionType": { + "definition": "enum SpeechRecognitionType { kOnDevice, kNetwork,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=10" + }, + "ax.mojom.ObserverOrError": { + "definition": "union ObserverOrError { pending_receiver observer; string error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/speech_recognition.mojom;l=71" + }, + "ax.mojom.TtsUtteranceClient.OnEvent": { + "definition": "OnEvent(TtsEvent event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=140" + }, + "ax.mojom.Tts.Speak": { + "definition": "Speak(string utterance, TtsOptions options) => (TtsSpeakResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=156" + }, + "ax.mojom.Tts.Stop": { + "definition": "Stop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=161" + }, + "ax.mojom.Tts.Pause": { + "definition": "Pause();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=165" + }, + "ax.mojom.Tts.Resume": { + "definition": "Resume();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=168" + }, + "ax.mojom.Tts.IsSpeaking": { + "definition": "IsSpeaking() => (bool speaking);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=171" + }, + "ax.mojom.Tts.GetVoices": { + "definition": "GetVoices() => (array voices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=174" + }, + "ax.mojom.TtsVoice": { + "definition": "struct TtsVoice { string? voice_name; string? lang; bool remote; string? engine_id; array? event_types;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=48" + }, + "ax.mojom.TtsOptions": { + "definition": "struct TtsOptions { double pitch = 1.0; double rate = 1.0; double volume = 1.0; bool enqueue = false; string? voice_name; string? engine_id; string? lang; bool on_event = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=69" + }, + "ax.mojom.TtsEvent": { + "definition": "struct TtsEvent { TtsEventType type; int32 char_index; string? error_message; int32 length; bool is_final;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=111" + }, + "ax.mojom.TtsSpeakResult": { + "definition": "struct TtsSpeakResult { TtsError error = kNoError; pending_receiver? utterance_client;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=145" + }, + "ax.mojom.TtsEventType": { + "definition": "enum TtsEventType { kStart, kEnd, kWord, kSentence, kMarker, kInterrupted, kCancelled, kError, kPause, kResume,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=21" + }, + "ax.mojom.TtsError": { + "definition": "enum TtsError { kNoError = 0, kErrorExtensionIdMismatch, kErrorInvalidLang, kErrorInvalidPitch, kErrorInvalidRate, kErrorInvalidVolume, kErrorMissingPauseOrResume, kErrorUndeclaredEventType, kErrorUtteranceTooLong,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/tts.mojom;l=35" + }, + "ax.mojom.UserInput.SendSyntheticKeyEventForShortcutOrNavigation": { + "definition": "SendSyntheticKeyEventForShortcutOrNavigation(SyntheticKeyEvent key_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_input.mojom;l=52" + }, + "ax.mojom.UserInput.SendSyntheticMouseEvent": { + "definition": "SendSyntheticMouseEvent(SyntheticMouseEvent mouse_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_input.mojom;l=57" + }, + "ax.mojom.SyntheticKeyEvent": { + "definition": "struct SyntheticKeyEvent { ui.mojom.EventType type; ui.mojom.KeyData key_data; int32 flags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_input.mojom;l=21" + }, + "ax.mojom.SyntheticMouseEvent": { + "definition": "struct SyntheticMouseEvent { ui.mojom.EventType type; gfx.mojom.Point point; SyntheticMouseEventButton? mouse_button; bool? touch_accessibility;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_input.mojom;l=33" + }, + "ax.mojom.SyntheticMouseEventButton": { + "definition": "enum SyntheticMouseEventButton { kLeft, kMiddle, kRight, kBack, kForward,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_input.mojom;l=12" + }, + "ax.mojom.UserInterface.DarkenScreen": { + "definition": "DarkenScreen(bool darken);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=57" + }, + "ax.mojom.UserInterface.OpenSettingsSubpage": { + "definition": "OpenSettingsSubpage(string subpage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=62" + }, + "ax.mojom.UserInterface.ShowConfirmationDialog": { + "definition": "ShowConfirmationDialog(string title, string description, string? cancelName) => (bool confirmed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=68" + }, + "ax.mojom.UserInterface.SetFocusRings": { + "definition": "SetFocusRings(array focus_rings, AssistiveTechnologyType at_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=76" + }, + "ax.mojom.UserInterface.SetHighlights": { + "definition": "SetHighlights(array rects, skia.mojom.SkColor color);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=80" + }, + "ax.mojom.UserInterface.SetVirtualKeyboardVisible": { + "definition": "SetVirtualKeyboardVisible(bool is_visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=83" + }, + "ax.mojom.FocusRingInfo": { + "definition": "struct FocusRingInfo { array rects; FocusType type; skia.mojom.SkColor? color; skia.mojom.SkColor? secondary_color; skia.mojom.SkColor? background_color; FocusRingStackingOrder? stacking_order; string? id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=26" + }, + "ax.mojom.FocusType": { + "definition": "enum FocusType { kGlow, kSolid, kDashed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=12" + }, + "ax.mojom.FocusRingStackingOrder": { + "definition": "enum FocusRingStackingOrder { kAboveAccessibilityBubbles, kBelowAccessibilityBubbles,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/accessibility/public/mojom/user_interface.mojom;l=20" + }, + "audio.mojom.AudioDeviceDescription": { + "definition": "struct AudioDeviceDescription { string device_name; string unique_id; string group_id; bool is_system_default; bool is_communications_device;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/audio_device_description.mojom;l=9" + }, + "audio.mojom.AudioService.BindSystemInfo": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] BindSystemInfo(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/audio_service.mojom;l=23" + }, + "audio.mojom.AudioService.BindDebugRecording": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] BindDebugRecording(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/audio_service.mojom;l=27" + }, + "audio.mojom.AudioService.BindStreamFactory": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] BindStreamFactory(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/audio_service.mojom;l=31" + }, + "audio.mojom.AudioService.BindDeviceNotifier": { + "definition": "BindDeviceNotifier(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/audio_service.mojom;l=35" + }, + "audio.mojom.AudioService.BindLogFactoryManager": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] BindLogFactoryManager(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/audio_service.mojom;l=38" + }, + "audio.mojom.AudioService.BindTestingApi": { + "definition": "BindTestingApi(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/audio_service.mojom;l=43" + }, + "audio.mojom.DebugRecordingFileProvider.CreateWavFile": { + "definition": "CreateWavFile(DebugRecordingStreamType stream_type, uint32 id) => (mojo_base.mojom.File? file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/debug_recording.mojom;l=28" + }, + "audio.mojom.DebugRecordingFileProvider.CreateAecdumpFile": { + "definition": "CreateAecdumpFile(uint32 id) => (mojo_base.mojom.File? file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/debug_recording.mojom;l=36" + }, + "audio.mojom.DebugRecording.Enable": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] Enable(pending_remote file_provider);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/debug_recording.mojom;l=46" + }, + "audio.mojom.DebugRecordingStreamType": { + "definition": "enum DebugRecordingStreamType { kInput = 0, kOutput = 1, kLoopback = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/debug_recording.mojom;l=10" + }, + "audio.mojom.DeviceListener.DevicesChanged": { + "definition": "DevicesChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/device_notifications.mojom;l=10" + }, + "audio.mojom.DeviceNotifier.RegisterListener": { + "definition": "RegisterListener(pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/device_notifications.mojom;l=17" + }, + "audio.mojom.LogFactoryManager.SetLogFactory": { + "definition": "SetLogFactory(pending_remote factory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/log_factory_manager.mojom;l=17" + }, + "audio.mojom.SystemInfo.GetInputStreamParameters": { + "definition": "GetInputStreamParameters(string device_id) => (media.mojom.AudioParameters? params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/system_info.mojom;l=16" + }, + "audio.mojom.SystemInfo.GetOutputStreamParameters": { + "definition": "GetOutputStreamParameters(string device_id) => (media.mojom.AudioParameters? params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/system_info.mojom;l=21" + }, + "audio.mojom.SystemInfo.HasInputDevices": { + "definition": "HasInputDevices() => (bool has_input_devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/system_info.mojom;l=25" + }, + "audio.mojom.SystemInfo.HasOutputDevices": { + "definition": "HasOutputDevices() => (bool has_output_devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/system_info.mojom;l=28" + }, + "audio.mojom.SystemInfo.GetInputDeviceDescriptions": { + "definition": "GetInputDeviceDescriptions() => (array device_descriptions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/system_info.mojom;l=31" + }, + "audio.mojom.SystemInfo.GetOutputDeviceDescriptions": { + "definition": "GetOutputDeviceDescriptions() => (array device_descriptions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/system_info.mojom;l=35" + }, + "audio.mojom.SystemInfo.GetAssociatedOutputDeviceID": { + "definition": "GetAssociatedOutputDeviceID(string input_device_id) => (string? associated_output_device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/system_info.mojom;l=40" + }, + "audio.mojom.SystemInfo.GetInputDeviceInfo": { + "definition": "GetInputDeviceInfo(string input_device_id) => (media.mojom.AudioParameters? input_params, string? associated_output_device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/system_info.mojom;l=49" + }, + "audio.mojom.TestingApi.Crash": { + "definition": "Crash();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/audio/public/mojom/testing_api.mojom;l=12" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.GetNewCertVerifier": { + "definition": "GetNewCertVerifier(pending_receiver receiver, pending_receiver? updater, pending_remote client, CertVerifierCreationParams? creation_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=76" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.UpdateCRLSet": { + "definition": "UpdateCRLSet(mojo_base.mojom.BigBuffer crl_set) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=88" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.UpdateCtLogList": { + "definition": "[EnableIf=is_ct_supported] UpdateCtLogList(array log_list, mojo_base.mojom.Time update_time) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=92" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.DisableCtEnforcement": { + "definition": "[EnableIf=is_ct_supported] DisableCtEnforcement() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=97" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.UpdateChromeRootStore": { + "definition": "[EnableIf=is_chrome_root_store_supported] UpdateChromeRootStore(mojo_base.mojom.ProtoWrapper new_root_store) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=103" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.SetUseChromeRootStore": { + "definition": "[EnableIf=is_chrome_root_store_optional] SetUseChromeRootStore(bool use_crs) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=109" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.GetChromeRootStoreInfo": { + "definition": "[EnableIf=is_chrome_root_store_supported] GetChromeRootStoreInfo() => (ChromeRootStoreInfo root_store_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=113" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.GetPlatformRootStoreInfo": { + "definition": "[EnableIf=is_platform_root_store_info_supported] GetPlatformRootStoreInfo() => (PlatformRootStoreInfo root_store_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=117" + }, + "cert_verifier.mojom.CertVerifierServiceFactory.UpdateNetworkTime": { + "definition": "UpdateNetworkTime(mojo_base.mojom.Time system_time, mojo_base.mojom.TimeTicks system_ticks, mojo_base.mojom.Time current_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=125" + }, + "cert_verifier.mojom.CertVerifierCreationParams": { + "definition": "struct CertVerifierCreationParams { AdditionalCertificates? initial_additional_certificates; bool wait_for_update = false; [EnableIf=is_ct_supported] network.mojom.CTPolicy? ct_policy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=22" + }, + "cert_verifier.mojom.ChromeRootCertInfo": { + "definition": "struct ChromeRootCertInfo { string sha256hash_hex; array cert;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=40" + }, + "cert_verifier.mojom.ChromeRootStoreInfo": { + "definition": "struct ChromeRootStoreInfo { int64 version; array root_cert_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=47" + }, + "cert_verifier.mojom.PlatformCertInfo": { + "definition": "struct PlatformCertInfo { array cert; CertificateTrust trust_setting;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=60" + }, + "cert_verifier.mojom.PlatformRootStoreInfo": { + "definition": "struct PlatformRootStoreInfo { array user_added_certs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=66" + }, + "cert_verifier.mojom.CertificateTrust": { + "definition": "enum CertificateTrust { kUnspecified, kDistrusted, kTrusted,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom;l=53" + }, + "data_decoder.mojom.CborParser.Parse": { + "definition": "Parse(mojo_base.mojom.BigBuffer cbor) => (mojo_base.mojom.Value? result, string? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/cbor_parser.mojom;l=21" + }, + "data_decoder.mojom.DataDecoderService.BindImageDecoder": { + "definition": "BindImageDecoder(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/data_decoder_service.mojom;l=25" + }, + "data_decoder.mojom.DataDecoderService.BindXmlParser": { + "definition": "BindXmlParser(pending_receiver reciever);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/data_decoder_service.mojom;l=28" + }, + "data_decoder.mojom.DataDecoderService.BindWebBundleParserFactory": { + "definition": "BindWebBundleParserFactory( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/data_decoder_service.mojom;l=31" + }, + "data_decoder.mojom.DataDecoderService.BindGzipper": { + "definition": "BindGzipper(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/data_decoder_service.mojom;l=36" + }, + "data_decoder.mojom.DataDecoderService.BindStructuredHeadersParser": { + "definition": "BindStructuredHeadersParser( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/data_decoder_service.mojom;l=39" + }, + "data_decoder.mojom.DataDecoderService.BindCborParser": { + "definition": "BindCborParser(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/data_decoder_service.mojom;l=43" + }, + "data_decoder.mojom.DataDecoderService.BindPixCodeValidator": { + "definition": "BindPixCodeValidator( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/data_decoder_service.mojom;l=47" + }, + "data_decoder.mojom.Gzipper.Deflate": { + "definition": "Deflate(mojo_base.mojom.BigBuffer data) => (mojo_base.mojom.BigBuffer? deflated_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/gzipper.mojom;l=12" + }, + "data_decoder.mojom.Gzipper.Inflate": { + "definition": "Inflate(mojo_base.mojom.BigBuffer data, uint64 max_uncompressed_size) => (mojo_base.mojom.BigBuffer? inflated_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/gzipper.mojom;l=19" + }, + "data_decoder.mojom.Gzipper.Compress": { + "definition": "Compress(mojo_base.mojom.BigBuffer data) => (mojo_base.mojom.BigBuffer? compressed_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/gzipper.mojom;l=24" + }, + "data_decoder.mojom.Gzipper.Uncompress": { + "definition": "Uncompress(mojo_base.mojom.BigBuffer compressed_data) => (mojo_base.mojom.BigBuffer? data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/gzipper.mojom;l=29" + }, + "data_decoder.mojom.ImageDecoder.DecodeImage": { + "definition": "DecodeImage(mojo_base.mojom.BigBuffer encoded_data, ImageCodec codec, bool shrink_to_fit, int64 max_size_in_bytes, gfx.mojom.Size desired_image_frame_size) => (mojo_base.mojom.TimeDelta decoding_duration, skia.mojom.BitmapN32? decoded_image);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/image_decoder.mojom;l=35" + }, + "data_decoder.mojom.ImageDecoder.DecodeAnimation": { + "definition": "DecodeAnimation(mojo_base.mojom.BigBuffer encoded_data, bool shrink_to_fit, int64 max_size_in_bytes) => (array decoded_image);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/image_decoder.mojom;l=51" + }, + "data_decoder.mojom.AnimationFrame": { + "definition": "struct AnimationFrame { skia.mojom.InlineBitmap bitmap; mojo_base.mojom.TimeDelta duration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/image_decoder.mojom;l=18" + }, + "data_decoder.mojom.ImageCodec": { + "definition": "enum ImageCodec { kDefault, kPng,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/image_decoder.mojom;l=12" + }, + "data_decoder.mojom.StructuredHeadersParser.ParseItem": { + "definition": "ParseItem(string header) => (network.mojom.StructuredHeadersParameterizedItem? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/structured_headers_parser.mojom;l=12" + }, + "data_decoder.mojom.StructuredHeadersParser.ParseList": { + "definition": "ParseList(string header) => (array? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/structured_headers_parser.mojom;l=15" + }, + "data_decoder.mojom.StructuredHeadersParser.ParseDictionary": { + "definition": "ParseDictionary(string header) => ( network.mojom.StructuredHeadersDictionary? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/structured_headers_parser.mojom;l=18" + }, + "data_decoder.mojom.WhitespaceBehavior": { + "definition": "enum WhitespaceBehavior { kIgnore, kPreserveSignificant, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/data_decoder/public/mojom/xml_parser.mojom;l=27" + }, + "device.mojom.BatteryMonitor.QueryNextStatus": { + "definition": "QueryNextStatus() => (BatteryStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/battery_monitor.mojom;l=14" + }, + "device.mojom.BatteryStatus": { + "definition": "struct BatteryStatus { bool charging = true; double charging_time = 0.0; double discharging_time = double.INFINITY; double level = 1.0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/battery_status.mojom;l=7" + }, + "device.mojom.DeviceService.BindFingerprint": { + "definition": "BindFingerprint(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=42" + }, + "device.mojom.DeviceService.BindGeolocationContext": { + "definition": "BindGeolocationContext(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=45" + }, + "device.mojom.DeviceService.BindGeolocationControl": { + "definition": "BindGeolocationControl(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=48" + }, + "device.mojom.DeviceService.BindGeolocationInternals": { + "definition": "BindGeolocationInternals(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=51" + }, + "device.mojom.DeviceService.BindInputDeviceManager": { + "definition": "[EnableIf=enable_input_device_manager] BindInputDeviceManager(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=54" + }, + "device.mojom.DeviceService.BindBatteryMonitor": { + "definition": "BindBatteryMonitor(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=58" + }, + "device.mojom.DeviceService.BindPressureManager": { + "definition": "[EnableIf=enable_compute_pressure] BindPressureManager(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=61" + }, + "device.mojom.DeviceService.BindVibrationManager": { + "definition": "BindVibrationManager(pending_receiver receiver, pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=69" + }, + "device.mojom.DeviceService.BindHidManager": { + "definition": "[EnableIfNot=is_android] BindHidManager(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=73" + }, + "device.mojom.DeviceService.BindPowerMonitor": { + "definition": "BindPowerMonitor(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=81" + }, + "device.mojom.DeviceService.BindPublicIpAddressGeolocationProvider": { + "definition": "BindPublicIpAddressGeolocationProvider( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=84" + }, + "device.mojom.DeviceService.BindScreenOrientationListener": { + "definition": "BindScreenOrientationListener( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=88" + }, + "device.mojom.DeviceService.BindSensorProvider": { + "definition": "BindSensorProvider(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=92" + }, + "device.mojom.DeviceService.BindSerialPortManager": { + "definition": "BindSerialPortManager(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=95" + }, + "device.mojom.DeviceService.BindTimeZoneMonitor": { + "definition": "BindTimeZoneMonitor(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=98" + }, + "device.mojom.DeviceService.BindWakeLockProvider": { + "definition": "BindWakeLockProvider(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=101" + }, + "device.mojom.DeviceService.BindUsbDeviceManager": { + "definition": "BindUsbDeviceManager(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=104" + }, + "device.mojom.DeviceService.BindUsbDeviceManagerTest": { + "definition": "BindUsbDeviceManagerTest(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/device_service.mojom;l=107" + }, + "device.mojom.FingerprintObserver.OnRestarted": { + "definition": "OnRestarted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=71" + }, + "device.mojom.FingerprintObserver.OnStatusChanged": { + "definition": "OnStatusChanged(BiometricsManagerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=75" + }, + "device.mojom.FingerprintObserver.OnEnrollScanDone": { + "definition": "OnEnrollScanDone(ScanResult scan_result, bool is_complete, int32 percent_complete);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=83" + }, + "device.mojom.FingerprintObserver.OnAuthScanDone": { + "definition": "OnAuthScanDone(FingerprintMessage msg, map> matches);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=90" + }, + "device.mojom.FingerprintObserver.OnSessionFailed": { + "definition": "OnSessionFailed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=95" + }, + "device.mojom.Fingerprint.GetRecordsForUser": { + "definition": "GetRecordsForUser(string user_id) => (map records, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=102" + }, + "device.mojom.Fingerprint.StartEnrollSession": { + "definition": "StartEnrollSession(string user_id, string label);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=105" + }, + "device.mojom.Fingerprint.CancelCurrentEnrollSession": { + "definition": "CancelCurrentEnrollSession() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=108" + }, + "device.mojom.Fingerprint.RequestRecordLabel": { + "definition": "RequestRecordLabel(string record_path) => (string label);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=111" + }, + "device.mojom.Fingerprint.SetRecordLabel": { + "definition": "SetRecordLabel(string record_path, string new_label) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=114" + }, + "device.mojom.Fingerprint.RemoveRecord": { + "definition": "RemoveRecord(string record_path) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=118" + }, + "device.mojom.Fingerprint.StartAuthSession": { + "definition": "StartAuthSession();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=121" + }, + "device.mojom.Fingerprint.EndCurrentAuthSession": { + "definition": "EndCurrentAuthSession() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=124" + }, + "device.mojom.Fingerprint.DestroyAllRecords": { + "definition": "DestroyAllRecords() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=127" + }, + "device.mojom.Fingerprint.AddFingerprintObserver": { + "definition": "AddFingerprintObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=130" + }, + "device.mojom.Fingerprint.RequestType": { + "definition": "RequestType() => (BiometricType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=133" + }, + "device.mojom.ScanResult": { + "definition": "enum ScanResult { SUCCESS = 0, PARTIAL = 1, INSUFFICIENT = 2, SENSOR_DIRTY = 3, TOO_SLOW = 4, TOO_FAST = 5, IMMOBILE = 6, NO_MATCH = 7,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=13" + }, + "device.mojom.FingerprintError": { + "definition": "enum FingerprintError { UNKNOWN = 0, HW_UNAVAILABLE = 1, UNABLE_TO_PROCESS = 2, TIMEOUT = 3, NO_SPACE = 4, CANCELED = 5, UNABLE_TO_REMOVE = 6, LOCKOUT = 7, NO_TEMPLATES = 8,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=32" + }, + "device.mojom.BiometricType": { + "definition": "enum BiometricType { UNKNOWN = 0, FINGERPRINT = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=47" + }, + "device.mojom.BiometricsManagerStatus": { + "definition": "enum BiometricsManagerStatus { UNKNOWN = 0, INITIALIZED = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=61" + }, + "device.mojom.FingerprintMessage": { + "definition": "union FingerprintMessage { FingerprintError fingerprint_error; ScanResult scan_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/fingerprint.mojom;l=54" + }, + "device.mojom.Geolocation.SetHighAccuracyHint": { + "definition": "SetHighAccuracyHint(bool high_accuracy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation.mojom;l=20" + }, + "device.mojom.Geolocation.QueryNextPosition": { + "definition": "QueryNextPosition() => (GeopositionResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation.mojom;l=34" + }, + "device.mojom.GeolocationClientId": { + "definition": "enum GeolocationClientId { kForTesting = 0, kGeolocationServiceImpl = 1, kGeoLanguageProvider = 2, kFingerprintDataLoader = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_client_id.mojom;l=8" + }, + "device.mojom.GeolocationContext.BindGeolocation": { + "definition": "BindGeolocation(pending_receiver receiver, url.mojom.Url requesting_url, GeolocationClientId client_id, bool has_precise_permission);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_context.mojom;l=41" + }, + "device.mojom.GeolocationContext.OnPermissionUpdated": { + "definition": "OnPermissionUpdated(url.mojom.Origin origin, GeolocationPermissionLevel permission_level);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_context.mojom;l=54" + }, + "device.mojom.GeolocationContext.SetOverride": { + "definition": "SetOverride(GeopositionResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_context.mojom;l=60" + }, + "device.mojom.GeolocationContext.ClearOverride": { + "definition": "ClearOverride();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_context.mojom;l=63" + }, + "device.mojom.GeolocationPermissionLevel": { + "definition": "enum GeolocationPermissionLevel { kDenied, kApproximate, kPrecise,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_context.mojom;l=18" + }, + "device.mojom.GeolocationControl.UserDidOptIntoLocationServices": { + "definition": "UserDidOptIntoLocationServices();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_control.mojom;l=23" + }, + "device.mojom.GeolocationInternalsObserver.OnDiagnosticsChanged": { + "definition": "OnDiagnosticsChanged(GeolocationDiagnostics diagnostics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=179" + }, + "device.mojom.GeolocationInternalsObserver.OnNetworkLocationRequested": { + "definition": "OnNetworkLocationRequested(array access_point_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=183" + }, + "device.mojom.GeolocationInternalsObserver.OnNetworkLocationReceived": { + "definition": "OnNetworkLocationReceived(NetworkLocationResponse? response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=188" + }, + "device.mojom.GeolocationInternals.AddInternalsObserver": { + "definition": "AddInternalsObserver(pending_remote observer) => (GeolocationDiagnostics? diagnostics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=195" + }, + "device.mojom.AccessPointData": { + "definition": "struct AccessPointData { string mac_address; int32 radio_signal_strength = kInvalidRadioSignalStrength; int32 channel = kInvalidChannel; int32 signal_to_noise = kInvalidSignalToNoise; mojo_base.mojom.Time? timestamp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=18" + }, + "device.mojom.NetworkLocationDiagnostics": { + "definition": "struct NetworkLocationDiagnostics { array access_point_data; mojo_base.mojom.Time? wifi_timestamp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=40" + }, + "device.mojom.PositionCacheDiagnostics": { + "definition": "struct PositionCacheDiagnostics { uint32 cache_size = 0; mojo_base.mojom.Time? last_hit; mojo_base.mojom.Time? last_miss; double? hit_rate; GeopositionResult? last_network_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=52" + }, + "device.mojom.WifiPollingPolicyDiagnostics": { + "definition": "struct WifiPollingPolicyDiagnostics { mojo_base.mojom.Time? interval_start; mojo_base.mojom.TimeDelta interval_duration; mojo_base.mojom.TimeDelta polling_interval; mojo_base.mojom.TimeDelta default_interval; mojo_base.mojom.TimeDelta no_change_interval; mojo_base.mojom.TimeDelta two_no_change_interval; mojo_base.mojom.TimeDelta no_wifi_interval;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=70" + }, + "device.mojom.GeolocationDiagnostics": { + "definition": "struct GeolocationDiagnostics { [Extensible] ProviderState provider_state; NetworkLocationDiagnostics? network_location_diagnostics; PositionCacheDiagnostics? position_cache_diagnostics; WifiPollingPolicyDiagnostics? wifi_polling_policy_diagnostics; LocationProviderManagerMode? location_provider_manager_mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=97" + }, + "device.mojom.NetworkLocationResponse": { + "definition": "struct NetworkLocationResponse { double latitude; double longitude; double? accuracy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=133" + }, + "device.mojom.ProviderState": { + "definition": "enum ProviderState { [Default] kStopped, kHighAccuracy, kLowAccuracy, kBlockedBySystemPermission, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=100" + }, + "device.mojom.LocationProviderManagerMode": { + "definition": "enum LocationProviderManagerMode { kNetworkOnly = 0, kPlatformOnly = 1, kCustomOnly = 2, kHybridPlatform = 3, kHybridFallbackNetwork = 4, kHybridPlatform2 = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geolocation_internals.mojom;l=146" + }, + "device.mojom.Geoposition": { + "definition": "struct Geoposition { double latitude = kBadLatitudeLongitude; double longitude = kBadLatitudeLongitude; double altitude = kBadAltitude; double accuracy = kBadAccuracy; double altitude_accuracy = kBadAccuracy; double heading = kBadHeading; double speed = kBadSpeed; mojo_base.mojom.Time timestamp; bool is_precise = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geoposition.mojom;l=29" + }, + "device.mojom.GeopositionError": { + "definition": "struct GeopositionError { GeopositionErrorCode error_code; string error_message; string error_technical;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geoposition.mojom;l=73" + }, + "device.mojom.GeopositionErrorCode": { + "definition": "enum GeopositionErrorCode { kPermissionDenied = 1, kPositionUnavailable = 2, kWifiDisabled = 3};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geoposition.mojom;l=59" + }, + "device.mojom.GeopositionResult": { + "definition": "union GeopositionResult { Geoposition position; GeopositionError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/geoposition.mojom;l=85" + }, + "device.mojom.HidManagerClient.DeviceAdded@0": { + "definition": "DeviceAdded@0(HidDeviceInfo device_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=361" + }, + "device.mojom.HidManagerClient.DeviceRemoved@1": { + "definition": "DeviceRemoved@1(HidDeviceInfo device_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=365" + }, + "device.mojom.HidManagerClient.DeviceChanged@2": { + "definition": "[MinVersion=2] DeviceChanged@2(HidDeviceInfo device_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=372" + }, + "device.mojom.HidManager.GetDevicesAndSetClient@0": { + "definition": "GetDevicesAndSetClient@0(pending_associated_remote client) => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=383" + }, + "device.mojom.HidManager.GetDevices@1": { + "definition": "GetDevices@1() => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=387" + }, + "device.mojom.HidManager.Connect@2": { + "definition": "Connect@2(string device_guid, pending_remote? connection_client, pending_remote? watcher, [MinVersion=1] bool allow_protected_reports, [MinVersion=2] bool allow_fido_reports) => (pending_remote? connection);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=407" + }, + "device.mojom.HidManager.AddReceiver@3": { + "definition": "AddReceiver@3(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=415" + }, + "device.mojom.HidConnection.Read@0": { + "definition": "Read@0() => (bool success, uint8 report_id, array? buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=426" + }, + "device.mojom.HidConnection.Write@1": { + "definition": "Write@1(uint8 report_id, array buffer) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=429" + }, + "device.mojom.HidConnection.GetFeatureReport@2": { + "definition": "GetFeatureReport@2(uint8 report_id) => (bool success, array? buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=434" + }, + "device.mojom.HidConnection.SendFeatureReport@3": { + "definition": "SendFeatureReport@3(uint8 report_id, array buffer) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=437" + }, + "device.mojom.HidConnectionClient.OnInputReport@0": { + "definition": "OnInputReport@0(uint8 report_id, array buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=446" + }, + "device.mojom.HidUsageAndPage": { + "definition": "struct HidUsageAndPage { uint16 usage@0; uint16 usage_page@1;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=140" + }, + "device.mojom.HidReportItem": { + "definition": "struct HidReportItem { bool is_range@0; bool is_constant@1; bool is_variable@2; bool is_relative@3; bool wrap@4; bool is_non_linear@5; bool no_preferred_state@6; bool has_null_position@7; bool is_volatile@8; bool is_buffered_bytes@9; array usages@10; HidUsageAndPage usage_minimum@11; HidUsageAndPage usage_maximum@12; uint32 designator_minimum@13; uint32 designator_maximum@14; uint32 string_minimum@15; uint32 string_maximum@16; int32 logical_minimum@17; int32 logical_maximum@18; int32 physical_minimum@19; int32 physical_maximum@20; uint32 unit_exponent@21; uint32 unit@22; uint32 report_size@23; uint32 report_count@24;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=156" + }, + "device.mojom.HidReportDescription": { + "definition": "struct HidReportDescription { uint8 report_id@0; array items@1;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=245" + }, + "device.mojom.HidCollectionInfo": { + "definition": "struct HidCollectionInfo { HidUsageAndPage usage@0; array report_ids@1; uint32 collection_type@2; array input_reports@3; array output_reports@4; array feature_reports@5; array children@6;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=264" + }, + "device.mojom.HidDeviceInfo": { + "definition": "struct HidDeviceInfo { string guid@0; string physical_device_id@1; uint16 vendor_id@2; uint16 product_id@3; string product_name@4; string serial_number@5; HidBusType bus_type@6; array report_descriptor@7; array collections@8; bool has_report_id@9; uint64 max_input_report_size@10; uint64 max_output_report_size@11; uint64 max_feature_report_size@12; string device_node@13; [MinVersion=1] array? protected_input_report_ids@14; [MinVersion=1] array? protected_output_report_ids@15; [MinVersion=1] array? protected_feature_report_ids@16; [MinVersion=3] bool is_excluded_by_blocklist@17;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=293" + }, + "device.mojom.HidBusType": { + "definition": "enum HidBusType { kHIDBusTypeUSB = 0, kHIDBusTypeBluetooth = 1, [MinVersion=1] kHIDBusTypeUnknown = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/hid.mojom;l=11" + }, + "device.mojom.InputDeviceManagerClient.InputDeviceAdded": { + "definition": "InputDeviceAdded(InputDeviceInfo device_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/input_service.mojom;l=42" + }, + "device.mojom.InputDeviceManagerClient.InputDeviceRemoved": { + "definition": "InputDeviceRemoved(string id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/input_service.mojom;l=45" + }, + "device.mojom.InputDeviceManager.GetDevicesAndSetClient": { + "definition": "GetDevicesAndSetClient( pending_associated_remote client) => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/input_service.mojom;l=53" + }, + "device.mojom.InputDeviceManager.GetDevices": { + "definition": "GetDevices() => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/input_service.mojom;l=58" + }, + "device.mojom.InputDeviceInfo": { + "definition": "struct InputDeviceInfo { string id; string name; InputDeviceSubsystem subsystem; InputDeviceType type; bool is_accelerometer; bool is_joystick; bool is_key; bool is_keyboard; bool is_mouse; bool is_tablet; bool is_touchpad; bool is_touchscreen;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/input_service.mojom;l=24" + }, + "device.mojom.InputDeviceSubsystem": { + "definition": "enum InputDeviceSubsystem { SUBSYSTEM_HID = 0, SUBSYSTEM_INPUT = 1, SUBSYSTEM_UNKNOWN = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/input_service.mojom;l=11" + }, + "device.mojom.InputDeviceType": { + "definition": "enum InputDeviceType { TYPE_BLUETOOTH = 0, TYPE_USB = 1, TYPE_SERIO = 2, TYPE_UNKNOWN = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/input_service.mojom;l=17" + }, + "device.mojom.MtpFileEntry": { + "definition": "struct MtpFileEntry { uint32 item_id = 0xFFFFFFFF; uint32 parent_id = 0XFFFFFFFF; string file_name; uint64 file_size = 0; int64 modification_time = 0; FileType file_type = FileType.FILE_TYPE_UNKNOWN;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_file_entry.mojom;l=10" + }, + "device.mojom.FileType": { + "definition": "enum FileType { FILE_TYPE_FOLDER = 0, FILE_TYPE_JPEG = 14, FILE_TYPE_JFIF = 15, FILE_TYPE_TIFF = 16, FILE_TYPE_BMP = 17, FILE_TYPE_GIF = 18, FILE_TYPE_PICT = 19, FILE_TYPE_PNG = 20, FILE_TYPE_WINDOWSIMAGEFORMAT = 25, FILE_TYPE_JP2 = 40, FILE_TYPE_JPX = 41, FILE_TYPE_UNKNOWN = 44, FILE_TYPE_OTHER = 9999 };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_file_entry.mojom;l=11" + }, + "device.mojom.MtpManagerClient.StorageAttached": { + "definition": "StorageAttached(MtpStorageInfo storage_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=12" + }, + "device.mojom.MtpManagerClient.StorageDetached": { + "definition": "StorageDetached(string storage_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=15" + }, + "device.mojom.MtpManager.EnumerateStoragesAndSetClient": { + "definition": "EnumerateStoragesAndSetClient( pending_associated_remote client) => (array storages);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=23" + }, + "device.mojom.MtpManager.GetStorageInfo": { + "definition": "GetStorageInfo(string storage_name) => (MtpStorageInfo storage_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=28" + }, + "device.mojom.MtpManager.GetStorageInfoFromDevice": { + "definition": "GetStorageInfoFromDevice(string storage_name) => (MtpStorageInfo storage_info, bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=32" + }, + "device.mojom.MtpManager.OpenStorage": { + "definition": "OpenStorage(string storage_name, string mode) => (string storage_handle, bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=36" + }, + "device.mojom.MtpManager.CloseStorage": { + "definition": "CloseStorage(string storage_handle) => (bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=40" + }, + "device.mojom.MtpManager.CreateDirectory": { + "definition": "CreateDirectory(string storage_handle, uint32 parent_id, string directory_name) => (bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=43" + }, + "device.mojom.MtpManager.ReadDirectoryEntryIds": { + "definition": "ReadDirectoryEntryIds(string storage_handle, uint32 file_id) => (array file_ids, bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=47" + }, + "device.mojom.MtpManager.ReadFileChunk": { + "definition": "ReadFileChunk(string storage_handle, uint32 file_id, uint32 offset, uint32 count) => (string data, bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=52" + }, + "device.mojom.MtpManager.GetFileInfo": { + "definition": "GetFileInfo(string storage_handle, array file_ids) => (array file_entries, bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=58" + }, + "device.mojom.MtpManager.RenameObject": { + "definition": "RenameObject(string storage_handle, uint32 object_id, string new_name) => (bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=63" + }, + "device.mojom.MtpManager.CopyFileFromLocal": { + "definition": "CopyFileFromLocal(string storage_handle, int64 source_file_descriptor, uint32 parent_id, string file_name) => (bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=69" + }, + "device.mojom.MtpManager.DeleteObject": { + "definition": "DeleteObject(string storage_handle, uint32 object_id) => (bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_manager.mojom;l=75" + }, + "device.mojom.MtpStorageInfo": { + "definition": "struct MtpStorageInfo { string storage_name; string vendor; uint32 vendor_id = 0; string product; uint32 product_id = 0; uint32 device_flags = 0; uint32 storage_type = 0; uint32 filesystem_type = 0; uint32 access_capability = 0; uint64 max_capacity = 0; uint64 free_space_in_bytes = 0; uint64 free_space_in_objects = 0; string storage_description; string volume_identifier; string serial_number;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/mtp_storage_info.mojom;l=10" + }, + "device.mojom.NFC.SetClient": { + "definition": "[EnableIfNot=is_ios_iphoneos] SetClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=147" + }, + "device.mojom.NFC.Push": { + "definition": "Push(NDEFMessage message, NDEFWriteOptions? options) => (NDEFError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=156" + }, + "device.mojom.NFC.CancelPush": { + "definition": "CancelPush();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=159" + }, + "device.mojom.NFC.MakeReadOnly": { + "definition": "MakeReadOnly() => (NDEFError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=162" + }, + "device.mojom.NFC.CancelMakeReadOnly": { + "definition": "CancelMakeReadOnly();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=165" + }, + "device.mojom.NFC.Watch": { + "definition": "Watch(uint32 id) => (NDEFError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=169" + }, + "device.mojom.NFC.CancelWatch": { + "definition": "CancelWatch(uint32 id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=172" + }, + "device.mojom.NFCClient.OnWatch": { + "definition": "OnWatch(array watch_ids, string? serial_number, NDEFMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=184" + }, + "device.mojom.NFCClient.OnError": { + "definition": "OnError(NDEFError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=188" + }, + "device.mojom.RawNFCClient.OnWatch": { + "definition": "OnWatch(array watch_ids, NDEFRawMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=199" + }, + "device.mojom.RawNFCClient.OnError": { + "definition": "OnError(NDEFError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=203" + }, + "device.mojom.NDEFError": { + "definition": "struct NDEFError { NDEFErrorType error_type; string error_message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=38" + }, + "device.mojom.NDEFRecord": { + "definition": "struct NDEFRecord { NDEFRecordTypeCategory category; string record_type; string? media_type; string? id; string? encoding; string? lang; array data; NDEFMessage? payload_message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=51" + }, + "device.mojom.NDEFMessage": { + "definition": "struct NDEFMessage { array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=97" + }, + "device.mojom.NDEFRawRecord": { + "definition": "struct NDEFRawRecord { array identifier; array payload; array type; NSRawTypeNameFormat type_name_format;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=117" + }, + "device.mojom.NDEFRawMessage": { + "definition": "struct NDEFRawMessage { array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=131" + }, + "device.mojom.NDEFWriteOptions": { + "definition": "struct NDEFWriteOptions { bool overwrite;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=135" + }, + "device.mojom.NDEFErrorType": { + "definition": "enum NDEFErrorType { NOT_ALLOWED, NOT_SUPPORTED, NOT_READABLE, INVALID_MESSAGE, OPERATION_CANCELLED, IO_ERROR};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=7" + }, + "device.mojom.NDEFRecordTypeCategory": { + "definition": "enum NDEFRecordTypeCategory { kStandardized, kExternal, kLocal};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=22" + }, + "device.mojom.NSRawTypeNameFormat": { + "definition": "enum NSRawTypeNameFormat { kAbsoluteURI, kEmpty, kMedia, kExternal, kWellKnown, kUnchanged, kUnknown};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc.mojom;l=103" + }, + "device.mojom.NFCProvider.GetNFCForHost": { + "definition": "GetNFCForHost(int32 host_id, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc_provider.mojom;l=13" + }, + "device.mojom.NFCProvider.SuspendNFCOperations": { + "definition": "SuspendNFCOperations();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc_provider.mojom;l=17" + }, + "device.mojom.NFCProvider.ResumeNFCOperations": { + "definition": "ResumeNFCOperations();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/nfc_provider.mojom;l=20" + }, + "device.mojom.PowerMonitor.AddClient": { + "definition": "AddClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/power_monitor.mojom;l=11" + }, + "device.mojom.PowerMonitorClient.PowerStateChange": { + "definition": "PowerStateChange(mojo_base.mojom.BatteryPowerStatus battery_power_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/power_monitor.mojom;l=18" + }, + "device.mojom.PowerMonitorClient.Suspend": { + "definition": "Suspend();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/power_monitor.mojom;l=21" + }, + "device.mojom.PowerMonitorClient.Resume": { + "definition": "Resume();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/power_monitor.mojom;l=24" + }, + "device.mojom.PressureManager.AddVirtualPressureSource": { + "definition": "AddVirtualPressureSource( mojo_base.mojom.UnguessableToken token, PressureSource source, VirtualPressureSourceMetadata metadata) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_manager.mojom;l=32" + }, + "device.mojom.PressureManager.RemoveVirtualPressureSource": { + "definition": "RemoveVirtualPressureSource( mojo_base.mojom.UnguessableToken token, PressureSource source) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_manager.mojom;l=38" + }, + "device.mojom.PressureManager.UpdateVirtualPressureSourceData": { + "definition": "UpdateVirtualPressureSourceData( mojo_base.mojom.UnguessableToken token, PressureSource source, PressureState state, double own_contribution_estimate) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_manager.mojom;l=45" + }, + "device.mojom.PressureManager.AddClient": { + "definition": "AddClient(PressureSource source, mojo_base.mojom.UnguessableToken? token, pending_associated_remote client) => (PressureManagerAddClientResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_manager.mojom;l=54" + }, + "device.mojom.PressureClient.OnPressureUpdated": { + "definition": "OnPressureUpdated(PressureUpdate update);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_manager.mojom;l=67" + }, + "device.mojom.VirtualPressureSourceMetadata": { + "definition": "struct VirtualPressureSourceMetadata { bool available = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_manager.mojom;l=16" + }, + "device.mojom.PressureManagerAddClientResult": { + "definition": "enum PressureManagerAddClientResult { kNotSupported, kOk,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_manager.mojom;l=11" + }, + "device.mojom.PressureUpdate": { + "definition": "struct PressureUpdate { PressureSource source; PressureData data; mojo_base.mojom.TimeTicks timestamp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_update.mojom;l=34" + }, + "device.mojom.PressureData": { + "definition": "struct PressureData { double cpu_utilization = 0; double own_contribution_estimate = kDefaultOwnContributionEstimate;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_update.mojom;l=41" + }, + "device.mojom.PressureSource": { + "definition": "enum PressureSource { kCpu,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_update.mojom;l=11" + }, + "device.mojom.PressureState": { + "definition": "enum PressureState { kNominal, kFair, kSerious, kCritical,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/pressure_update.mojom;l=17" + }, + "device.mojom.PublicIpAddressGeolocationProvider.CreateGeolocation": { + "definition": "CreateGeolocation(network.mojom.MutablePartialNetworkTrafficAnnotationTag tag, pending_receiver receiver, GeolocationClientId client_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/public_ip_address_geolocation_provider.mojom;l=20" + }, + "device.mojom.ScreenOrientation.LockOrientation": { + "definition": "LockOrientation(ScreenOrientationLockType orientation) => (ScreenOrientationLockResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/screen_orientation.mojom;l=10" + }, + "device.mojom.ScreenOrientation.UnlockOrientation": { + "definition": "UnlockOrientation();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/screen_orientation.mojom;l=12" + }, + "device.mojom.ScreenOrientationListener.IsAutoRotateEnabledByUser": { + "definition": "IsAutoRotateEnabledByUser() => (bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/screen_orientation.mojom;l=22" + }, + "device.mojom.ScreenOrientationLockResult": { + "definition": "enum ScreenOrientationLockResult { SCREEN_ORIENTATION_LOCK_RESULT_SUCCESS, SCREEN_ORIENTATION_LOCK_RESULT_ERROR_NOT_AVAILABLE, SCREEN_ORIENTATION_LOCK_RESULT_ERROR_FULLSCREEN_REQUIRED, SCREEN_ORIENTATION_LOCK_RESULT_ERROR_CANCELED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/screen_orientation_lock_types.mojom;l=7" + }, + "device.mojom.ScreenOrientationLockType": { + "definition": "enum ScreenOrientationLockType { DEFAULT = 0, PORTRAIT_PRIMARY, PORTRAIT_SECONDARY, LANDSCAPE_PRIMARY, LANDSCAPE_SECONDARY, ANY, LANDSCAPE, PORTRAIT, NATURAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/screen_orientation_lock_types.mojom;l=21" + }, + "device.mojom.Sensor.GetDefaultConfiguration": { + "definition": "GetDefaultConfiguration() => (SensorConfiguration configuration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=55" + }, + "device.mojom.Sensor.AddConfiguration": { + "definition": "AddConfiguration(SensorConfiguration configuration) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=66" + }, + "device.mojom.Sensor.RemoveConfiguration": { + "definition": "RemoveConfiguration(SensorConfiguration configuration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=76" + }, + "device.mojom.Sensor.Suspend": { + "definition": "Suspend();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=80" + }, + "device.mojom.Sensor.Resume": { + "definition": "Resume();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=84" + }, + "device.mojom.Sensor.ConfigureReadingChangeNotifications": { + "definition": "ConfigureReadingChangeNotifications(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=89" + }, + "device.mojom.SensorClient.RaiseError": { + "definition": "RaiseError();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=96" + }, + "device.mojom.SensorClient.SensorReadingChanged": { + "definition": "SensorReadingChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=100" + }, + "device.mojom.SensorReadingRaw": { + "definition": "struct SensorReadingRaw { double timestamp; array values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=28" + }, + "device.mojom.SensorConfiguration": { + "definition": "struct SensorConfiguration { double frequency;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=45" + }, + "device.mojom.SensorType": { + "definition": "enum SensorType { AMBIENT_LIGHT, ACCELEROMETER, LINEAR_ACCELERATION, GRAVITY, GYROSCOPE, MAGNETOMETER, ABSOLUTE_ORIENTATION_EULER_ANGLES, ABSOLUTE_ORIENTATION_QUATERNION, RELATIVE_ORIENTATION_EULER_ANGLES, RELATIVE_ORIENTATION_QUATERNION,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=10" + }, + "device.mojom.ReportingMode": { + "definition": "enum ReportingMode { ON_CHANGE, CONTINUOUS};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor.mojom;l=40" + }, + "device.mojom.SensorProvider.GetSensor": { + "definition": "GetSensor(SensorType type) => (SensorCreationResult result, SensorInitParams? init_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=96" + }, + "device.mojom.SensorProvider.CreateVirtualSensor": { + "definition": "CreateVirtualSensor(SensorType type, VirtualSensorMetadata metadata) => (CreateVirtualSensorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=101" + }, + "device.mojom.SensorProvider.UpdateVirtualSensor": { + "definition": "UpdateVirtualSensor(SensorType type, SensorReadingRaw reading) => (UpdateVirtualSensorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=106" + }, + "device.mojom.SensorProvider.RemoveVirtualSensor": { + "definition": "RemoveVirtualSensor(SensorType type) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=111" + }, + "device.mojom.SensorProvider.GetVirtualSensorInformation": { + "definition": "GetVirtualSensorInformation(SensorType type) => (GetVirtualSensorInformationResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=116" + }, + "device.mojom.SensorInitParams": { + "definition": "struct SensorInitParams { pending_remote sensor; pending_receiver client_receiver; mojo_base.mojom.ReadOnlySharedMemoryRegion memory; uint64 buffer_offset; ReportingMode mode; SensorConfiguration default_configuration; double maximum_frequency; double minimum_frequency; const uint64 kReadBufferSizeForTests = 48;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=10" + }, + "device.mojom.VirtualSensorMetadata": { + "definition": "struct VirtualSensorMetadata { bool available = true; double? maximum_frequency; double? minimum_frequency; ReportingMode? reporting_mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=68" + }, + "device.mojom.VirtualSensorInformation": { + "definition": "struct VirtualSensorInformation { double sampling_frequency;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=78" + }, + "device.mojom.SensorCreationResult": { + "definition": "enum SensorCreationResult { SUCCESS, ERROR_NOT_AVAILABLE, ERROR_NOT_ALLOWED, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=43" + }, + "device.mojom.CreateVirtualSensorResult": { + "definition": "enum CreateVirtualSensorResult { kSuccess, kSensorTypeAlreadyOverridden,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=49" + }, + "device.mojom.UpdateVirtualSensorResult": { + "definition": "enum UpdateVirtualSensorResult { kSuccess, kSensorTypeNotOverridden,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=54" + }, + "device.mojom.GetVirtualSensorInformationError": { + "definition": "enum GetVirtualSensorInformationError { kSensorTypeNotOverridden,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=59" + }, + "device.mojom.GetVirtualSensorInformationResult": { + "definition": "union GetVirtualSensorInformationResult { VirtualSensorInformation info; GetVirtualSensorInformationError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/sensor_provider.mojom;l=63" + }, + "device.mojom.SerialPortManager.SetClient": { + "definition": "SetClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=162" + }, + "device.mojom.SerialPortManager.GetDevices": { + "definition": "GetDevices() => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=165" + }, + "device.mojom.SerialPortManager.OpenPort": { + "definition": "OpenPort(mojo_base.mojom.UnguessableToken token, bool use_alternate_path, SerialConnectionOptions options, pending_remote client, pending_remote? watcher) => (pending_remote? port);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=172" + }, + "device.mojom.SerialPortManagerClient.OnPortAdded": { + "definition": "OnPortAdded(SerialPortInfo port_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=183" + }, + "device.mojom.SerialPortManagerClient.OnPortRemoved": { + "definition": "OnPortRemoved(SerialPortInfo port_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=186" + }, + "device.mojom.SerialPortManagerClient.OnPortConnectedStateChanged": { + "definition": "OnPortConnectedStateChanged(SerialPortInfo port_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=190" + }, + "device.mojom.SerialPort.StartWriting": { + "definition": "StartWriting(handle consumer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=198" + }, + "device.mojom.SerialPort.StartReading": { + "definition": "StartReading(handle producer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=203" + }, + "device.mojom.SerialPort.Flush": { + "definition": "Flush(SerialPortFlushMode mode) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=206" + }, + "device.mojom.SerialPort.Drain": { + "definition": "Drain() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=210" + }, + "device.mojom.SerialPort.GetControlSignals": { + "definition": "GetControlSignals() => (SerialPortControlSignals? signals);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=213" + }, + "device.mojom.SerialPort.SetControlSignals": { + "definition": "SetControlSignals(SerialHostControlSignals signals) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=216" + }, + "device.mojom.SerialPort.ConfigurePort": { + "definition": "ConfigurePort(SerialConnectionOptions options) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=219" + }, + "device.mojom.SerialPort.GetPortInfo": { + "definition": "GetPortInfo() => (SerialConnectionInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=222" + }, + "device.mojom.SerialPort.Close": { + "definition": "Close(bool flush) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=227" + }, + "device.mojom.SerialPortClient.OnReadError": { + "definition": "OnReadError(SerialReceiveError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=231" + }, + "device.mojom.SerialPortClient.OnSendError": { + "definition": "OnSendError(SerialSendError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=232" + }, + "device.mojom.SerialPortInfo": { + "definition": "struct SerialPortInfo { mojo_base.mojom.UnguessableToken token; mojo_base.mojom.FilePath path; SerialPortType type = PLATFORM_SERIAL; [EnableIf=is_mac] mojo_base.mojom.FilePath? alternate_path; [EnableIf=is_mac] string? usb_driver_name; [EnableIf=is_win] string device_instance_id; uint16 vendor_id; bool has_vendor_id = false; uint16 product_id; bool has_product_id = false; bluetooth.mojom.UUID? bluetooth_service_class_id; string? display_name; string? serial_number; bool connected = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=11" + }, + "device.mojom.SerialConnectionOptions": { + "definition": "struct SerialConnectionOptions { uint32 bitrate = 0; SerialDataBits data_bits = NONE; SerialParityBit parity_bit = NONE; SerialStopBits stop_bits = NONE; bool cts_flow_control; bool has_cts_flow_control = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=122" + }, + "device.mojom.SerialConnectionInfo": { + "definition": "struct SerialConnectionInfo { uint32 bitrate = 0; SerialDataBits data_bits = NONE; SerialParityBit parity_bit = NONE; SerialStopBits stop_bits = NONE; bool cts_flow_control;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=131" + }, + "device.mojom.SerialHostControlSignals": { + "definition": "struct SerialHostControlSignals { bool dtr; bool has_dtr = false; bool rts; bool has_rts = false; bool brk; bool has_brk = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=139" + }, + "device.mojom.SerialPortControlSignals": { + "definition": "struct SerialPortControlSignals { bool dcd; bool cts; bool ri; bool dsr;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=151" + }, + "device.mojom.SerialSendError": { + "definition": "enum SerialSendError { NONE, DISCONNECTED, SYSTEM_ERROR,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=64" + }, + "device.mojom.SerialReceiveError": { + "definition": "enum SerialReceiveError { NONE, DISCONNECTED, DEVICE_LOST, BREAK, FRAME_ERROR, OVERRUN, BUFFER_OVERFLOW, PARITY_ERROR, SYSTEM_ERROR,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=70" + }, + "device.mojom.SerialDataBits": { + "definition": "enum SerialDataBits { NONE, SEVEN, EIGHT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=82" + }, + "device.mojom.SerialParityBit": { + "definition": "enum SerialParityBit { NONE, NO_PARITY, ODD, EVEN,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=88" + }, + "device.mojom.SerialStopBits": { + "definition": "enum SerialStopBits { NONE, ONE, TWO,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=95" + }, + "device.mojom.SerialPortFlushMode": { + "definition": "enum SerialPortFlushMode { kReceiveAndTransmit, kReceive, kTransmit,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=101" + }, + "device.mojom.SerialPortType": { + "definition": "enum SerialPortType { PLATFORM_SERIAL, BLUETOOTH_CLASSIC_RFCOMM,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/serial.mojom;l=115" + }, + "device.mojom.SmartCardTransaction.EndTransaction": { + "definition": "EndTransaction(SmartCardDisposition disposition) => (SmartCardResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=238" + }, + "device.mojom.SmartCardConnection.Disconnect": { + "definition": "Disconnect(SmartCardDisposition disposition) => (SmartCardResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=245" + }, + "device.mojom.SmartCardConnection.Transmit": { + "definition": "Transmit(SmartCardProtocol protocol, array data) => (SmartCardDataResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=249" + }, + "device.mojom.SmartCardConnection.Control": { + "definition": "Control(uint32 control_code, array data) => (SmartCardDataResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=254" + }, + "device.mojom.SmartCardConnection.GetAttrib": { + "definition": "GetAttrib(uint32 id) => (SmartCardDataResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=258" + }, + "device.mojom.SmartCardConnection.SetAttrib": { + "definition": "SetAttrib(uint32 id, array data) => (SmartCardResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=261" + }, + "device.mojom.SmartCardConnection.Status": { + "definition": "Status() => (SmartCardStatusResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=264" + }, + "device.mojom.SmartCardConnection.BeginTransaction": { + "definition": "BeginTransaction() => (SmartCardTransactionResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=274" + }, + "device.mojom.SmartCardConnectionWatcher.NotifyConnectionUsed": { + "definition": "NotifyConnectionUsed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=282" + }, + "device.mojom.SmartCardContext.ListReaders": { + "definition": "ListReaders() => (SmartCardListReadersResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=291" + }, + "device.mojom.SmartCardContext.GetStatusChange": { + "definition": "GetStatusChange(mojo_base.mojom.TimeDelta timeout, array reader_states) => (SmartCardStatusChangeResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=295" + }, + "device.mojom.SmartCardContext.Cancel": { + "definition": "Cancel() => (SmartCardResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=301" + }, + "device.mojom.SmartCardContext.Connect": { + "definition": "Connect(string reader, SmartCardShareMode share_mode, SmartCardProtocols preferred_protocols, pending_remote? connection_watcher) => (SmartCardConnectResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=304" + }, + "device.mojom.SmartCardContextFactory.CreateContext": { + "definition": "CreateContext() => (SmartCardCreateContextResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=313" + }, + "device.mojom.SmartCardReaderStateFlags": { + "definition": "struct SmartCardReaderStateFlags { bool unaware; bool ignore; bool changed; bool unknown; bool unavailable; bool empty; bool present; bool exclusive; bool inuse; bool mute; bool unpowered;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=128" + }, + "device.mojom.SmartCardReaderStateIn": { + "definition": "struct SmartCardReaderStateIn { string reader; SmartCardReaderStateFlags current_state; uint16 current_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=145" + }, + "device.mojom.SmartCardReaderStateOut": { + "definition": "struct SmartCardReaderStateOut { string reader; SmartCardReaderStateFlags event_state; uint16 event_count; array answer_to_reset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=154" + }, + "device.mojom.SmartCardProtocols": { + "definition": "struct SmartCardProtocols { bool t0; bool t1; bool raw;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=164" + }, + "device.mojom.SmartCardStatus": { + "definition": "struct SmartCardStatus { string reader_name; SmartCardConnectionState state; SmartCardProtocol protocol; array answer_to_reset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=174" + }, + "device.mojom.SmartCardConnectSuccess": { + "definition": "struct SmartCardConnectSuccess { pending_remote connection; SmartCardProtocol active_protocol;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=201" + }, + "device.mojom.SmartCardSuccess": { + "definition": "enum SmartCardSuccess { kOk};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=26" + }, + "device.mojom.SmartCardError": { + "definition": "enum SmartCardError { kRemovedCard, kResetCard, kUnpoweredCard, kUnresponsiveCard, kUnsupportedCard, kReaderUnavailable, kSharingViolation, kNotTransacted, kNoSmartcard, kProtoMismatch, kSystemCancelled, kNotReady, kCancelled, kInsufficientBuffer, kInvalidHandle, kInvalidParameter, kInvalidValue, kNoMemory, kTimeout, kUnknownReader, kUnsupportedFeature, kNoReadersAvailable, kServiceStopped, kNoService, kCommError, kInternalError, kUnknownError, kServerTooBusy, kUnexpected, kShutdown, kUnknown, kPermissionDenied};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=31" + }, + "device.mojom.SmartCardShareMode": { + "definition": "enum SmartCardShareMode { kShared, kExclusive, kDirect};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=73" + }, + "device.mojom.SmartCardProtocol": { + "definition": "enum SmartCardProtocol { kUndefined, kT0, kT1, kRaw};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=83" + }, + "device.mojom.SmartCardDisposition": { + "definition": "enum SmartCardDisposition { kLeave, kReset, kUnpower, kEject};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=97" + }, + "device.mojom.SmartCardConnectionState": { + "definition": "enum SmartCardConnectionState { kAbsent, kPresent, kSwallowed, kPowered, kNegotiable, kSpecific};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=111" + }, + "device.mojom.SmartCardResult": { + "definition": "union SmartCardResult { SmartCardSuccess success; SmartCardError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=20" + }, + "device.mojom.SmartCardStatusChangeResult": { + "definition": "union SmartCardStatusChangeResult { array reader_states; SmartCardError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=182" + }, + "device.mojom.SmartCardListReadersResult": { + "definition": "union SmartCardListReadersResult { array readers; SmartCardError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=188" + }, + "device.mojom.SmartCardCreateContextResult": { + "definition": "union SmartCardCreateContextResult { pending_remote context; SmartCardError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=194" + }, + "device.mojom.SmartCardConnectResult": { + "definition": "union SmartCardConnectResult { SmartCardConnectSuccess success; SmartCardError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=207" + }, + "device.mojom.SmartCardDataResult": { + "definition": "union SmartCardDataResult { array data; SmartCardError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=214" + }, + "device.mojom.SmartCardStatusResult": { + "definition": "union SmartCardStatusResult { SmartCardStatus status; SmartCardError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=220" + }, + "device.mojom.SmartCardTransactionResult": { + "definition": "union SmartCardTransactionResult { pending_associated_remote transaction; SmartCardError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/smart_card.mojom;l=226" + }, + "device.mojom.TimeZoneMonitor.AddClient": { + "definition": "AddClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/time_zone_monitor.mojom;l=11" + }, + "device.mojom.TimeZoneMonitorClient.OnTimeZoneChange": { + "definition": "OnTimeZoneChange(string tz_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/time_zone_monitor.mojom;l=16" + }, + "device.mojom.UsbDevice.Open": { + "definition": "Open() => (UsbOpenDeviceResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=216" + }, + "device.mojom.UsbDevice.Close": { + "definition": "Close() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=219" + }, + "device.mojom.UsbDevice.SetConfiguration": { + "definition": "SetConfiguration(uint8 value) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=223" + }, + "device.mojom.UsbDevice.ClaimInterface": { + "definition": "ClaimInterface(uint8 interface_number) => (UsbClaimInterfaceResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=226" + }, + "device.mojom.UsbDevice.ReleaseInterface": { + "definition": "ReleaseInterface(uint8 interface_number) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=229" + }, + "device.mojom.UsbDevice.SetInterfaceAlternateSetting": { + "definition": "SetInterfaceAlternateSetting(uint8 interface_number, uint8 alternate_setting) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=232" + }, + "device.mojom.UsbDevice.Reset": { + "definition": "Reset() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=236" + }, + "device.mojom.UsbDevice.ClearHalt": { + "definition": "ClearHalt(UsbTransferDirection direction, uint8 endpoint_number) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=239" + }, + "device.mojom.UsbDevice.ControlTransferIn": { + "definition": "ControlTransferIn(UsbControlTransferParams params, uint32 length, uint32 timeout) => (UsbTransferStatus status, mojo_base.mojom.ReadOnlyBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=253" + }, + "device.mojom.UsbDevice.ControlTransferOut": { + "definition": "ControlTransferOut(UsbControlTransferParams params, mojo_base.mojom.ReadOnlyBuffer data, uint32 timeout) => (UsbTransferStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=267" + }, + "device.mojom.UsbDevice.GenericTransferIn": { + "definition": "GenericTransferIn(uint8 endpoint_number, uint32 length, uint32 timeout) => (UsbTransferStatus status, mojo_base.mojom.ReadOnlyBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=285" + }, + "device.mojom.UsbDevice.GenericTransferOut": { + "definition": "GenericTransferOut(uint8 endpoint_number, mojo_base.mojom.ReadOnlyBuffer data, uint32 timeout) => (UsbTransferStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=299" + }, + "device.mojom.UsbDevice.IsochronousTransferIn": { + "definition": "IsochronousTransferIn(uint8 endpoint_number, array packet_lengths, uint32 timeout) => (mojo_base.mojom.ReadOnlyBuffer data, array packets);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=322" + }, + "device.mojom.UsbDevice.IsochronousTransferOut": { + "definition": "IsochronousTransferOut(uint8 endpoint_number, mojo_base.mojom.ReadOnlyBuffer data, array packet_lengths, uint32 timeout) => (array packets);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=344" + }, + "device.mojom.UsbDeviceClient.OnDeviceOpened": { + "definition": "OnDeviceOpened();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=358" + }, + "device.mojom.UsbDeviceClient.OnDeviceClosed": { + "definition": "OnDeviceClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=364" + }, + "device.mojom.UsbEndpointInfo": { + "definition": "struct UsbEndpointInfo { uint8 endpoint_number; UsbTransferDirection direction; UsbTransferType type; uint32 packet_size; UsbSynchronizationType synchronization_type; UsbUsageType usage_type; uint8 polling_interval; array extra_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=97" + }, + "device.mojom.UsbAlternateInterfaceInfo": { + "definition": "struct UsbAlternateInterfaceInfo { uint8 alternate_setting; uint8 class_code; uint8 subclass_code; uint8 protocol_code; mojo_base.mojom.String16? interface_name; array endpoints; array extra_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=108" + }, + "device.mojom.UsbInterfaceInfo": { + "definition": "struct UsbInterfaceInfo { uint8 interface_number; uint8 first_interface; array alternates;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=118" + }, + "device.mojom.UsbConfigurationInfo": { + "definition": "struct UsbConfigurationInfo { uint8 configuration_value; mojo_base.mojom.String16? configuration_name; bool self_powered; bool remote_wakeup; uint8 maximum_power; array interfaces; array extra_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=125" + }, + "device.mojom.UsbDeviceInfo": { + "definition": "struct UsbDeviceInfo { string guid; uint8 usb_version_major; uint8 usb_version_minor; uint8 usb_version_subminor; uint8 class_code; uint8 subclass_code; uint8 protocol_code; uint32 bus_number; uint32 port_number; uint16 vendor_id; uint16 product_id; uint8 device_version_major; uint8 device_version_minor; uint8 device_version_subminor; mojo_base.mojom.String16? manufacturer_name; mojo_base.mojom.String16? product_name; mojo_base.mojom.String16? serial_number; url.mojom.Url? webusb_landing_page; uint8 active_configuration; array configurations;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=135" + }, + "device.mojom.UsbControlTransferParams": { + "definition": "struct UsbControlTransferParams { UsbControlTransferType type; UsbControlTransferRecipient recipient; uint8 request; uint16 value; uint16 index; const string kSecurityKeyAOAModel = \"12eba9f901039b36\";};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=158" + }, + "device.mojom.UsbIsochronousPacket": { + "definition": "struct UsbIsochronousPacket { uint32 length; uint32 transferred_length; UsbTransferStatus status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=208" + }, + "device.mojom.UsbOpenDeviceSuccess": { + "definition": "enum UsbOpenDeviceSuccess { OK};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=21" + }, + "device.mojom.UsbOpenDeviceError": { + "definition": "enum UsbOpenDeviceError { ACCESS_DENIED, ALREADY_OPEN,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=25" + }, + "device.mojom.UsbClaimInterfaceResult": { + "definition": "enum UsbClaimInterfaceResult { kSuccess, kProtectedClass, kFailure,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=38" + }, + "device.mojom.UsbTransferDirection": { + "definition": "enum UsbTransferDirection { INBOUND = 0, OUTBOUND,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=51" + }, + "device.mojom.UsbControlTransferType": { + "definition": "enum UsbControlTransferType { STANDARD, CLASS, VENDOR, RESERVED};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=56" + }, + "device.mojom.UsbControlTransferRecipient": { + "definition": "enum UsbControlTransferRecipient { DEVICE, INTERFACE, ENDPOINT, OTHER};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=64" + }, + "device.mojom.UsbTransferType": { + "definition": "enum UsbTransferType { CONTROL = 0, ISOCHRONOUS, BULK, INTERRUPT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=71" + }, + "device.mojom.UsbSynchronizationType": { + "definition": "enum UsbSynchronizationType { NONE = 0, ASYNCHRONOUS, ADAPTIVE, SYNCHRONOUS,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=78" + }, + "device.mojom.UsbUsageType": { + "definition": "enum UsbUsageType { DATA = 0, FEEDBACK, EXPLICIT_FEEDBACK, PERIODIC, NOTIFICATION, RESERVED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=85" + }, + "device.mojom.UsbTransferStatus": { + "definition": "enum UsbTransferStatus { COMPLETED = 0, TRANSFER_ERROR, TIMEOUT, CANCELLED, STALLED, DISCONNECT, BABBLE, SHORT_PACKET, PERMISSION_DENIED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=177" + }, + "device.mojom.UsbOpenDeviceResult": { + "definition": "union UsbOpenDeviceResult { UsbOpenDeviceSuccess success; UsbOpenDeviceError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_device.mojom;l=33" + }, + "device.mojom.UsbDeviceFilter": { + "definition": "struct UsbDeviceFilter { bool has_vendor_id; uint16 vendor_id; bool has_product_id; uint16 product_id; bool has_class_code; uint8 class_code; bool has_subclass_code; uint8 subclass_code; bool has_protocol_code; uint8 protocol_code; mojo_base.mojom.String16? serial_number;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_enumeration_options.mojom;l=9" + }, + "device.mojom.UsbEnumerationOptions": { + "definition": "struct UsbEnumerationOptions { array filters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_enumeration_options.mojom;l=28" + }, + "device.mojom.UsbDeviceManager.EnumerateDevicesAndSetClient": { + "definition": "EnumerateDevicesAndSetClient( pending_associated_remote client) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager.mojom;l=15" + }, + "device.mojom.UsbDeviceManager.GetDevices": { + "definition": "GetDevices(UsbEnumerationOptions? options) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager.mojom;l=21" + }, + "device.mojom.UsbDeviceManager.GetDevice": { + "definition": "GetDevice(string guid, array blocked_interface_classes, pending_receiver device_receiver, pending_remote? device_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager.mojom;l=24" + }, + "device.mojom.UsbDeviceManager.GetSecurityKeyDevice": { + "definition": "GetSecurityKeyDevice(string guid, pending_receiver device_receiver, pending_remote? device_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager.mojom;l=32" + }, + "device.mojom.UsbDeviceManager.SetClient": { + "definition": "SetClient(pending_associated_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager.mojom;l=59" + }, + "device.mojom.UsbDeviceManagerClient.OnDeviceAdded": { + "definition": "OnDeviceAdded(UsbDeviceInfo device_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager_client.mojom;l=11" + }, + "device.mojom.UsbDeviceManagerClient.OnDeviceRemoved": { + "definition": "OnDeviceRemoved(UsbDeviceInfo device_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager_client.mojom;l=14" + }, + "device.mojom.UsbDeviceManagerTest.AddDeviceForTesting": { + "definition": "AddDeviceForTesting(string name, string serial_number, string landing_page) => (bool success, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager_test.mojom;l=18" + }, + "device.mojom.UsbDeviceManagerTest.RemoveDeviceForTesting": { + "definition": "RemoveDeviceForTesting(string guid) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager_test.mojom;l=23" + }, + "device.mojom.UsbDeviceManagerTest.GetTestDevices": { + "definition": "GetTestDevices() => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager_test.mojom;l=26" + }, + "device.mojom.TestDeviceInfo": { + "definition": "struct TestDeviceInfo { string guid; string name; string serial_number; url.mojom.Url landing_page;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/usb_manager_test.mojom;l=9" + }, + "device.mojom.VibrationManager.Vibrate": { + "definition": "Vibrate(int64 milliseconds) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/vibration_manager.mojom;l=12" + }, + "device.mojom.VibrationManager.Cancel": { + "definition": "Cancel() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/vibration_manager.mojom;l=14" + }, + "device.mojom.VibrationManagerListener.OnVibrate": { + "definition": "OnVibrate();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/vibration_manager.mojom;l=22" + }, + "device.mojom.WakeLock.RequestWakeLock": { + "definition": "RequestWakeLock();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock.mojom;l=43" + }, + "device.mojom.WakeLock.CancelWakeLock": { + "definition": "CancelWakeLock();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock.mojom;l=48" + }, + "device.mojom.WakeLock.AddClient": { + "definition": "AddClient(pending_receiver wake_lock);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock.mojom;l=55" + }, + "device.mojom.WakeLock.ChangeType": { + "definition": "ChangeType(WakeLockType type) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock.mojom;l=65" + }, + "device.mojom.WakeLock.HasWakeLockForTests": { + "definition": "HasWakeLockForTests() => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock.mojom;l=68" + }, + "device.mojom.WakeLockType": { + "definition": "enum WakeLockType { kPreventAppSuspension = 0, kPreventDisplaySleep = 1, kPreventDisplaySleepAllowDimming = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock.mojom;l=8" + }, + "device.mojom.WakeLockReason": { + "definition": "enum WakeLockReason { kAudioPlayback = 0, kVideoPlayback = 1, kOther = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock.mojom;l=29" + }, + "device.mojom.WakeLockContext.GetWakeLock": { + "definition": "GetWakeLock(WakeLockType type, WakeLockReason reason, string description, pending_receiver wake_lock);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock_context.mojom;l=12" + }, + "device.mojom.WakeLockProvider.GetWakeLockContextForID": { + "definition": "GetWakeLockContextForID(int32 context_id, pending_receiver context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock_provider.mojom;l=15" + }, + "device.mojom.WakeLockProvider.GetWakeLockWithoutContext": { + "definition": "GetWakeLockWithoutContext(WakeLockType type, WakeLockReason reason, string description, pending_receiver wake_lock);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock_provider.mojom;l=22" + }, + "device.mojom.WakeLockProvider.NotifyOnWakeLockDeactivation": { + "definition": "NotifyOnWakeLockDeactivation(WakeLockType type, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock_provider.mojom;l=30" + }, + "device.mojom.WakeLockProvider.GetActiveWakeLocksForTests": { + "definition": "GetActiveWakeLocksForTests(WakeLockType type) => (int32 count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock_provider.mojom;l=35" + }, + "device.mojom.WakeLockObserver.OnWakeLockDeactivated": { + "definition": "OnWakeLockDeactivated(WakeLockType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/device/public/mojom/wake_lock_provider.mojom;l=41" + }, + "image_annotation.mojom.ImageProcessor.GetJpgImageData": { + "definition": "GetJpgImageData() => (array bytes, int32 width, int32 height);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/image_annotation/public/mojom/image_annotation.mojom;l=13" + }, + "image_annotation.mojom.Annotator.AnnotateImage": { + "definition": "AnnotateImage(string source_id, string description_language_tag, pending_remote image_processor) => (AnnotateImageResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/image_annotation/public/mojom/image_annotation.mojom;l=66" + }, + "image_annotation.mojom.ImageAnnotationService.BindAnnotator": { + "definition": "BindAnnotator(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/image_annotation/public/mojom/image_annotation.mojom;l=74" + }, + "image_annotation.mojom.Annotation": { + "definition": "struct Annotation { AnnotationType type; double score; string text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/image_annotation/public/mojom/image_annotation.mojom;l=34" + }, + "image_annotation.mojom.AnnotateImageError": { + "definition": "enum AnnotateImageError { kCanceled, kFailure, kAdult,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/image_annotation/public/mojom/image_annotation.mojom;l=17" + }, + "image_annotation.mojom.AnnotationType": { + "definition": "enum AnnotationType { kOcr = 1, kLabel = 2, kCaption = 3, kIcon = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/image_annotation/public/mojom/image_annotation.mojom;l=26" + }, + "image_annotation.mojom.AnnotateImageResult": { + "definition": "union AnnotateImageResult { AnnotateImageError error_code; array annotations;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/image_annotation/public/mojom/image_annotation.mojom;l=40" + }, + "media_session.mojom.AudioFocusObserver.OnFocusGained@0": { + "definition": "OnFocusGained@0(AudioFocusRequestState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=73" + }, + "media_session.mojom.AudioFocusObserver.OnFocusLost@1": { + "definition": "OnFocusLost@1(AudioFocusRequestState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=76" + }, + "media_session.mojom.AudioFocusObserver.OnRequestIdReleased@2": { + "definition": "[MinVersion=8] OnRequestIdReleased@2( mojo_base.mojom.UnguessableToken request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=81" + }, + "media_session.mojom.AudioFocusRequestClient.RequestAudioFocus@0": { + "definition": "RequestAudioFocus@0(MediaSessionInfo session_info, AudioFocusType type) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=92" + }, + "media_session.mojom.AudioFocusRequestClient.AbandonAudioFocus@1": { + "definition": "AbandonAudioFocus@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=95" + }, + "media_session.mojom.AudioFocusRequestClient.MediaSessionInfoChanged@2": { + "definition": "MediaSessionInfoChanged@2(MediaSessionInfo session_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=98" + }, + "media_session.mojom.AudioFocusManager.RequestAudioFocus@0": { + "definition": "RequestAudioFocus@0(pending_receiver client, pending_remote session, MediaSessionInfo session_info, AudioFocusType type) => (mojo_base.mojom.UnguessableToken request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=113" + }, + "media_session.mojom.AudioFocusManager.RequestGroupedAudioFocus@4": { + "definition": "[MinVersion=4] RequestGroupedAudioFocus@4( mojo_base.mojom.UnguessableToken request_id, pending_receiver client, pending_remote session, MediaSessionInfo session_info, AudioFocusType type, mojo_base.mojom.UnguessableToken group_id) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=126" + }, + "media_session.mojom.AudioFocusManager.GetFocusRequests@1": { + "definition": "GetFocusRequests@1() => (array requests);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=136" + }, + "media_session.mojom.AudioFocusManager.AddObserver@2": { + "definition": "AddObserver@2(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=139" + }, + "media_session.mojom.AudioFocusManager.SetSource@6": { + "definition": "[MinVersion=6] SetSource@6( mojo_base.mojom.UnguessableToken identity, string name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=147" + }, + "media_session.mojom.AudioFocusManager.SetEnforcementMode@5": { + "definition": "[MinVersion=5] SetEnforcementMode@5(EnforcementMode mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=151" + }, + "media_session.mojom.AudioFocusManager.AddSourceObserver@7": { + "definition": "[MinVersion=7] AddSourceObserver@7( mojo_base.mojom.UnguessableToken source_id, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=155" + }, + "media_session.mojom.AudioFocusManager.GetSourceFocusRequests@8": { + "definition": "[MinVersion=7] GetSourceFocusRequests@8( mojo_base.mojom.UnguessableToken source_id) => (array requests);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=161" + }, + "media_session.mojom.AudioFocusManager.RequestIdReleased@9": { + "definition": "[MinVersion=8] RequestIdReleased@9( mojo_base.mojom.UnguessableToken request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=168" + }, + "media_session.mojom.AudioFocusManager.StartDuckingAllAudio@10": { + "definition": "[MinVersion=10] StartDuckingAllAudio@10( mojo_base.mojom.UnguessableToken? exempted_request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=175" + }, + "media_session.mojom.AudioFocusManager.StopDuckingAllAudio@11": { + "definition": "[MinVersion=10] StopDuckingAllAudio@11();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=180" + }, + "media_session.mojom.AudioFocusManager.FlushForTesting@12": { + "definition": "[MinVersion=10] FlushForTesting@12() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=184" + }, + "media_session.mojom.AudioFocusManagerDebug.GetDebugInfoForRequest@0": { + "definition": "GetDebugInfoForRequest@0(mojo_base.mojom.UnguessableToken request_id) => (MediaSessionDebugInfo debug_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=192" + }, + "media_session.mojom.AudioFocusRequestState": { + "definition": "struct AudioFocusRequestState { MediaSessionInfo session_info; AudioFocusType audio_focus_type; [MinVersion=2] string? source_name; [MinVersion=3] mojo_base.mojom.UnguessableToken? request_id; [MinVersion=9] mojo_base.mojom.UnguessableToken? source_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=59" + }, + "media_session.mojom.EnforcementMode": { + "definition": "enum EnforcementMode { kDefault, kNone, kSingleGroup, kSingleSession,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=14" + }, + "media_session.mojom.AudioFocusType": { + "definition": "enum AudioFocusType { kGain, kGainTransientMayDuck, kGainTransient, kAmbient,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/audio_focus.mojom;l=36" + }, + "media_session.mojom.MediaControllerManager.CreateMediaControllerForSession@0": { + "definition": "CreateMediaControllerForSession@0( pending_receiver receiver, mojo_base.mojom.UnguessableToken request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=18" + }, + "media_session.mojom.MediaControllerManager.CreateActiveMediaController@1": { + "definition": "CreateActiveMediaController@1(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=25" + }, + "media_session.mojom.MediaControllerManager.SuspendAllSessions@2": { + "definition": "SuspendAllSessions@2();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=28" + }, + "media_session.mojom.MediaController.Suspend@0": { + "definition": "Suspend@0();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=40" + }, + "media_session.mojom.MediaController.Resume@1": { + "definition": "Resume@1();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=43" + }, + "media_session.mojom.MediaController.Stop@2": { + "definition": "Stop@2();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=46" + }, + "media_session.mojom.MediaController.ToggleSuspendResume@3": { + "definition": "ToggleSuspendResume@3();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=50" + }, + "media_session.mojom.MediaController.AddObserver@4": { + "definition": "AddObserver@4(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=55" + }, + "media_session.mojom.MediaController.PreviousTrack@5": { + "definition": "PreviousTrack@5();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=59" + }, + "media_session.mojom.MediaController.NextTrack@6": { + "definition": "NextTrack@6();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=63" + }, + "media_session.mojom.MediaController.Seek@7": { + "definition": "Seek@7(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=70" + }, + "media_session.mojom.MediaController.ObserveImages@8": { + "definition": "ObserveImages@8( MediaSessionImageType type, int32 minimum_size_px, int32 desired_size_px, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=75" + }, + "media_session.mojom.MediaController.SeekTo@9": { + "definition": "SeekTo@9(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=82" + }, + "media_session.mojom.MediaController.ScrubTo@10": { + "definition": "ScrubTo@10(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=88" + }, + "media_session.mojom.MediaController.EnterPictureInPicture@11": { + "definition": "EnterPictureInPicture@11();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=91" + }, + "media_session.mojom.MediaController.ExitPictureInPicture@12": { + "definition": "ExitPictureInPicture@12();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=94" + }, + "media_session.mojom.MediaController.SetAudioSinkId@13": { + "definition": "SetAudioSinkId@13(string? id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=98" + }, + "media_session.mojom.MediaController.ToggleMicrophone@14": { + "definition": "[MinVersion=1] ToggleMicrophone@14();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=101" + }, + "media_session.mojom.MediaController.ToggleCamera@15": { + "definition": "[MinVersion=1] ToggleCamera@15();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=104" + }, + "media_session.mojom.MediaController.HangUp@16": { + "definition": "[MinVersion=1] HangUp@16();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=107" + }, + "media_session.mojom.MediaController.Raise@17": { + "definition": "[MinVersion=2] Raise@17();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=111" + }, + "media_session.mojom.MediaController.SetMute@18": { + "definition": "[MinVersion=3] SetMute@18(bool mute);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=114" + }, + "media_session.mojom.MediaController.RequestMediaRemoting@19": { + "definition": "[MinVersion=4] RequestMediaRemoting@19();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=117" + }, + "media_session.mojom.MediaController.EnterAutoPictureInPicture@20": { + "definition": "[MinVersion=5] EnterAutoPictureInPicture@20();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=121" + }, + "media_session.mojom.MediaController.SkipAd@21": { + "definition": "[MinVersion=6] SkipAd@21();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=124" + }, + "media_session.mojom.MediaControllerObserver.MediaSessionInfoChanged@0": { + "definition": "MediaSessionInfoChanged@0(MediaSessionInfo? info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=136" + }, + "media_session.mojom.MediaControllerObserver.MediaSessionMetadataChanged@1": { + "definition": "MediaSessionMetadataChanged@1(MediaMetadata? metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=141" + }, + "media_session.mojom.MediaControllerObserver.MediaSessionActionsChanged@2": { + "definition": "MediaSessionActionsChanged@2(array action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=145" + }, + "media_session.mojom.MediaControllerObserver.MediaSessionChanged@3": { + "definition": "MediaSessionChanged@3(mojo_base.mojom.UnguessableToken? request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=149" + }, + "media_session.mojom.MediaControllerObserver.MediaSessionPositionChanged@4": { + "definition": "MediaSessionPositionChanged@4(MediaPosition? position);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=156" + }, + "media_session.mojom.MediaControllerImageObserver.MediaControllerImageChanged@0": { + "definition": "MediaControllerImageChanged@0( MediaSessionImageType type, MediaImageBitmap? bitmap);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=167" + }, + "media_session.mojom.MediaControllerImageObserver.MediaControllerChapterImageChanged@1": { + "definition": "[MinVersion=7] MediaControllerChapterImageChanged@1( int32 index, MediaImageBitmap? bitmap);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_controller.mojom;l=172" + }, + "media_session.mojom.MediaSessionObserver.MediaSessionInfoChanged@0": { + "definition": "MediaSessionInfoChanged@0(MediaSessionInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=270" + }, + "media_session.mojom.MediaSessionObserver.MediaSessionMetadataChanged@1": { + "definition": "MediaSessionMetadataChanged@1(MediaMetadata? metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=275" + }, + "media_session.mojom.MediaSessionObserver.MediaSessionActionsChanged@2": { + "definition": "MediaSessionActionsChanged@2(array action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=279" + }, + "media_session.mojom.MediaSessionObserver.MediaSessionImagesChanged@3": { + "definition": "MediaSessionImagesChanged@3( map> images);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=282" + }, + "media_session.mojom.MediaSessionObserver.MediaSessionPositionChanged@4": { + "definition": "MediaSessionPositionChanged@4(MediaPosition? position);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=286" + }, + "media_session.mojom.MediaSession.GetMediaSessionInfo@0": { + "definition": "GetMediaSessionInfo@0() => (MediaSessionInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=305" + }, + "media_session.mojom.MediaSession.GetDebugInfo@1": { + "definition": "GetDebugInfo@1() => (MediaSessionDebugInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=308" + }, + "media_session.mojom.MediaSession.StartDucking@2": { + "definition": "StartDucking@2();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=312" + }, + "media_session.mojom.MediaSession.StopDucking@3": { + "definition": "StopDucking@3();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=316" + }, + "media_session.mojom.MediaSession.Suspend@4": { + "definition": "Suspend@4(SuspendType suspend_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=320" + }, + "media_session.mojom.MediaSession.Resume@5": { + "definition": "Resume@5(SuspendType suspend_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=324" + }, + "media_session.mojom.MediaSession.AddObserver@6": { + "definition": "AddObserver@6(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=325" + }, + "media_session.mojom.MediaSession.PreviousTrack@7": { + "definition": "PreviousTrack@7();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=330" + }, + "media_session.mojom.MediaSession.NextTrack@8": { + "definition": "NextTrack@8();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=334" + }, + "media_session.mojom.MediaSession.Seek@9": { + "definition": "Seek@9(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=341" + }, + "media_session.mojom.MediaSession.Stop@10": { + "definition": "Stop@10(SuspendType suspend_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=345" + }, + "media_session.mojom.MediaSession.SkipAd@11": { + "definition": "SkipAd@11();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=348" + }, + "media_session.mojom.MediaSession.GetMediaImageBitmap@12": { + "definition": "GetMediaImageBitmap@12( MediaImage image, int32 minimum_size_px, int32 desired_size_px) => (MediaImageBitmap? image);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=354" + }, + "media_session.mojom.MediaSession.SeekTo@13": { + "definition": "SeekTo@13(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=361" + }, + "media_session.mojom.MediaSession.ScrubTo@14": { + "definition": "ScrubTo@14(mojo_base.mojom.TimeDelta seek_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=367" + }, + "media_session.mojom.MediaSession.EnterPictureInPicture@15": { + "definition": "EnterPictureInPicture@15();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=370" + }, + "media_session.mojom.MediaSession.ExitPictureInPicture@16": { + "definition": "ExitPictureInPicture@16();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=373" + }, + "media_session.mojom.MediaSession.SetAudioSinkId@17": { + "definition": "SetAudioSinkId@17(string? id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=377" + }, + "media_session.mojom.MediaSession.ToggleMicrophone@18": { + "definition": "[MinVersion=11] ToggleMicrophone@18();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=380" + }, + "media_session.mojom.MediaSession.ToggleCamera@19": { + "definition": "[MinVersion=11] ToggleCamera@19();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=383" + }, + "media_session.mojom.MediaSession.HangUp@20": { + "definition": "[MinVersion=11] HangUp@20();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=386" + }, + "media_session.mojom.MediaSession.Raise@21": { + "definition": "[MinVersion=12] Raise@21();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=390" + }, + "media_session.mojom.MediaSession.SetMute@22": { + "definition": "[MinVersion=13] SetMute@22(bool mute);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=393" + }, + "media_session.mojom.MediaSession.RequestMediaRemoting@23": { + "definition": "[MinVersion=16] RequestMediaRemoting@23();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=396" + }, + "media_session.mojom.MediaSession.PreviousSlide@24": { + "definition": "[MinVersion=18] PreviousSlide@24();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=399" + }, + "media_session.mojom.MediaSession.NextSlide@25": { + "definition": "[MinVersion=18] NextSlide@25();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=402" + }, + "media_session.mojom.MediaSession.EnterAutoPictureInPicture@26": { + "definition": "[MinVersion=19] EnterAutoPictureInPicture@26();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=406" + }, + "media_session.mojom.MediaSession.GetVisibility@27": { + "definition": "[MinVersion=23] GetVisibility@27() => (bool has_sufficiently_visible_video);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=414" + }, + "media_session.mojom.MediaImage": { + "definition": "struct MediaImage { url.mojom.Url src; mojo_base.mojom.String16 type; array sizes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=76" + }, + "media_session.mojom.ChapterInformation": { + "definition": "struct ChapterInformation { mojo_base.mojom.String16 title; mojo_base.mojom.TimeDelta startTime; array artwork;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=85" + }, + "media_session.mojom.MediaMetadata": { + "definition": "struct MediaMetadata { mojo_base.mojom.String16 title; mojo_base.mojom.String16 artist; mojo_base.mojom.String16 album; mojo_base.mojom.String16 source_title; [MinVersion=21] array? chapters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=93" + }, + "media_session.mojom.MediaImageBitmap": { + "definition": "struct MediaImageBitmap { int32 width; int32 height; array pixel_data; [MinVersion=5] MediaImageBitmapColorType color_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=119" + }, + "media_session.mojom.MediaPosition": { + "definition": "struct MediaPosition { double playback_rate; mojo_base.mojom.TimeDelta duration; mojo_base.mojom.TimeDelta position; mojo_base.mojom.TimeTicks last_updated_time; [MinVersion=13] bool end_of_media;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=127" + }, + "media_session.mojom.RemotePlaybackMetadata": { + "definition": "struct RemotePlaybackMetadata { string video_codec@0; string audio_codec@1; bool remote_playback_disabled@2; [MinVersion=17] bool remote_playback_started@3; [MinVersion=17] string? unused_field@4; [MinVersion=18] bool is_encrypted_media@5;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=150" + }, + "media_session.mojom.MediaSessionInfo": { + "definition": "struct MediaSessionInfo { [Stable, Extensible] SessionState state; bool force_duck; [MinVersion=1] MediaPlaybackState playback_state; [MinVersion=2] bool is_controllable; [MinVersion=4] bool prefer_stop_for_gain_focus_loss; [MinVersion=6] bool deprecated_is_sensitive; [MinVersion=7] MediaPictureInPictureState picture_in_picture_state; [MinVersion=8] MediaAudioVideoState deprecated_audio_video_state; [MinVersion=9] string? audio_sink_id; [MinVersion=10] array? audio_video_states; [MinVersion=11] MicrophoneState microphone_state; [MinVersion=11] CameraState camera_state; [MinVersion=12] bool muted; [MinVersion=14] bool has_presentation; [MinVersion=15] RemotePlaybackMetadata? remote_playback_metadata; [MinVersion=16] bool hide_metadata; [MinVersion=20] bool ignore_for_active_session; [MinVersion=21] bool meets_visibility_threshold; [MinVersion=24] bool can_enter_browser_initiated_autopip;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=162" + }, + "media_session.mojom.MediaSessionDebugInfo": { + "definition": "struct MediaSessionDebugInfo { string name; string owner; string state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=254" + }, + "media_session.mojom.MediaPlaybackState": { + "definition": "enum MediaPlaybackState { kPaused, kPlaying,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=15" + }, + "media_session.mojom.MediaSessionAction": { + "definition": "enum MediaSessionAction { kPlay, kPause, kPreviousTrack, kNextTrack, kSeekBackward, kSeekForward, kSkipAd, kStop, kSeekTo, kScrubTo, kEnterPictureInPicture, kExitPictureInPicture, kSwitchAudioDevice, [MinVersion=11] kToggleMicrophone, [MinVersion=11] kToggleCamera, [MinVersion=11] kHangUp, [MinVersion=12] kRaise, [MinVersion=13] kSetMute, [MinVersion=18] kPreviousSlide, [MinVersion=18] kNextSlide, [MinVersion=19] kEnterAutoPictureInPicture,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=21" + }, + "media_session.mojom.MediaSessionImageType": { + "definition": "enum MediaSessionImageType { kArtwork, kSourceIcon, [MinVersion=22] kChapter,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=46" + }, + "media_session.mojom.MediaPictureInPictureState": { + "definition": "enum MediaPictureInPictureState { kNotInPictureInPicture, kInPictureInPicture,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=58" + }, + "media_session.mojom.MediaAudioVideoState": { + "definition": "enum MediaAudioVideoState { kDeprecatedUnknown, kAudioOnly, kAudioVideo, [MinVersion=10] kVideoOnly,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=64" + }, + "media_session.mojom.MediaImageBitmapColorType": { + "definition": "enum MediaImageBitmapColorType { kRGBA_8888, kBGRA_8888,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=110" + }, + "media_session.mojom.MicrophoneState": { + "definition": "enum MicrophoneState { kUnknown, kMuted, kUnmuted,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=136" + }, + "media_session.mojom.CameraState": { + "definition": "enum CameraState { kUnknown, kTurnedOn, kTurnedOff,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=143" + }, + "media_session.mojom.SessionState": { + "definition": "enum SessionState { kActive, kDucking, kSuspended, kInactive, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=164" + }, + "media_session.mojom.SuspendType": { + "definition": "enum SuspendType { kSystem, kUI, kContent, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session.mojom;l=295" + }, + "media_session.mojom.MediaSessionService.BindAudioFocusManager@0": { + "definition": "BindAudioFocusManager@0(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session_service.mojom;l=18" + }, + "media_session.mojom.MediaSessionService.BindAudioFocusManagerDebug@1": { + "definition": "BindAudioFocusManagerDebug@1(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session_service.mojom;l=21" + }, + "media_session.mojom.MediaSessionService.BindMediaControllerManager@2": { + "definition": "BindMediaControllerManager@2(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session_service.mojom;l=24" + }, + "media_session.mojom.MediaSessionService.Bind@3": { + "definition": "Bind@3(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/media_session/public/mojom/media_session_service.mojom;l=29" + }, + "ukm.mojom.SingularUkmInterface.Submit": { + "definition": "Submit(UkmEntry entry);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/metrics/public/mojom/ukm_interface.mojom;l=18" + }, + "ukm.mojom.UkmRecorderClientInterface.SetParameters": { + "definition": "SetParameters(UkmRecorderParameters params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/metrics/public/mojom/ukm_interface.mojom;l=44" + }, + "ukm.mojom.UkmRecorderInterface.AddEntry": { + "definition": "AddEntry(UkmEntry entry);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/metrics/public/mojom/ukm_interface.mojom;l=48" + }, + "ukm.mojom.UkmRecorderInterface.UpdateSourceURL": { + "definition": "UpdateSourceURL(int64 source_id, string url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/metrics/public/mojom/ukm_interface.mojom;l=49" + }, + "ukm.mojom.UkmEntry": { + "definition": "struct UkmEntry { int64 source_id; uint64 event_hash; map metrics;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/metrics/public/mojom/ukm_interface.mojom;l=7" + }, + "ukm.mojom.UkmRecorderParameters": { + "definition": "struct UkmRecorderParameters { bool is_enabled; array event_hash_bypass_list;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/metrics/public/mojom/ukm_interface.mojom;l=21" + }, + "network.mojom.TraitsTestService.EchoHttpRequestHeaders": { + "definition": "[Sync] EchoHttpRequestHeaders(HttpRequestHeaders headers) => (HttpRequestHeaders pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/cpp/network_traits_test_service.mojom;l=10" + }, + "network.mojom.AcceptCHFrameObserver.OnAcceptCHFrameReceived": { + "definition": "OnAcceptCHFrameReceived( url.mojom.Origin origin, array accept_ch_frame) => (int32 status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/accept_ch_frame_observer.mojom;l=25" + }, + "network.mojom.AcceptCHFrameObserver.Clone": { + "definition": "Clone(pending_receiver listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/accept_ch_frame_observer.mojom;l=31" + }, + "network.mojom.AdAuctionEventRecord": { + "definition": "struct AdAuctionEventRecord { Type type; url.mojom.Origin providing_origin; array eligible_origins;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ad_auction.mojom;l=12" + }, + "network.mojom.Type": { + "definition": "enum Type { kUninitialized = 0, kView, kClick, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ad_auction.mojom;l=13" + }, + "network.mojom.AddressFamily": { + "definition": "enum AddressFamily { UNSPECIFIED, IPV4, IPV6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/address_family.mojom;l=8" + }, + "network.mojom.AddressList": { + "definition": "struct AddressList { array addresses; array dns_aliases;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/address_list.mojom;l=10" + }, + "network.mojom.AlternateProtocolUsage": { + "definition": "enum AlternateProtocolUsage { kNoRace, kWonRace, kMainJobWonRace, kMappingMissing, kBroken, kDnsAlpnH3JobWonWithoutRace, kDnsAlpnH3JobWonRace, kUnspecifiedReason};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/alternate_protocol_usage.mojom;l=8" + }, + "network.mojom.AttributionSupport": { + "definition": "enum AttributionSupport { kWeb = 0, kWebAndOs = 1, kOs = 2, kNone = 3, kUnset = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/attribution.mojom;l=13" + }, + "network.mojom.AttributionReportingEligibility": { + "definition": "enum AttributionReportingEligibility { kUnset, kEmpty, kEventSource, kNavigationSource, kTrigger, kEventSourceOrTrigger,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/attribution.mojom;l=28" + }, + "network.mojom.BlockedByResponseReason": { + "definition": "enum BlockedByResponseReason { kCoepFrameResourceNeedsCoepHeader, kCoopSandboxedIFrameCannotNavigateToCoopPage, kCorpNotSameOrigin, kCorpNotSameOriginAfterDefaultedToSameOriginByCoep, kCorpNotSameOriginAfterDefaultedToSameOriginByDip, kCorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip, kCorpNotSameSite, kSRIMessageSignatureMismatch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/blocked_by_response_reason.mojom;l=10" + }, + "cert_verifier.mojom.URLLoaderFactoryConnector.CreateURLLoaderFactory": { + "definition": "CreateURLLoaderFactory( pending_receiver url_loader_factory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=35" + }, + "cert_verifier.mojom.CertVerifierService.EnableNetworkAccess": { + "definition": "EnableNetworkAccess( pending_remote url_loader_factory, pending_remote? reconnector);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=48" + }, + "cert_verifier.mojom.CertVerifierService.Verify": { + "definition": "Verify(RequestParams params, network.mojom.NetLogSource net_log_source, pending_remote cert_verifier_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=54" + }, + "cert_verifier.mojom.CertVerifierService.Verify2QwacBinding": { + "definition": "Verify2QwacBinding(string binding, string hostname, network.mojom.X509Certificate tls_certificate, network.mojom.NetLogSource net_log_source) => (network.mojom.X509Certificate verified_cert);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=60" + }, + "cert_verifier.mojom.CertVerifierService.SetConfig": { + "definition": "SetConfig(CertVerifierConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=67" + }, + "cert_verifier.mojom.CertVerifierServiceClient.OnCertVerifierChanged": { + "definition": "OnCertVerifierChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=75" + }, + "cert_verifier.mojom.CertVerifierRequest.Complete": { + "definition": "Complete(network.mojom.CertVerifyResult result, int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=85" + }, + "cert_verifier.mojom.RequestParams": { + "definition": "struct RequestParams { network.mojom.X509Certificate certificate; string hostname; int32 flags; mojo_base.mojom.ByteString ocsp_response; mojo_base.mojom.ByteString sct_list;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=13" + }, + "cert_verifier.mojom.CertVerifierConfig": { + "definition": "struct CertVerifierConfig { bool enable_rev_checking; bool require_rev_checking_local_anchors; bool enable_sha1_local_anchors;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service.mojom;l=24" + }, + "cert_verifier.mojom.CertVerifierServiceUpdater.UpdateAdditionalCertificates": { + "definition": "UpdateAdditionalCertificates(AdditionalCertificates certificates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service_updater.mojom;l=62" + }, + "cert_verifier.mojom.CertVerifierServiceUpdater.WaitUntilNextUpdateForTesting": { + "definition": "WaitUntilNextUpdateForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service_updater.mojom;l=69" + }, + "cert_verifier.mojom.CertVerifierServiceUpdater.SetCTPolicy": { + "definition": "[EnableIf=is_ct_supported] SetCTPolicy(network.mojom.CTPolicy ct_policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service_updater.mojom;l=72" + }, + "cert_verifier.mojom.CIDR": { + "definition": "struct CIDR { network.mojom.IPAddress ip; network.mojom.IPAddress mask;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service_updater.mojom;l=10" + }, + "cert_verifier.mojom.CertWithConstraints": { + "definition": "struct CertWithConstraints { array certificate; array permitted_dns_names; array permitted_cidrs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service_updater.mojom;l=16" + }, + "cert_verifier.mojom.AdditionalCertificates": { + "definition": "struct AdditionalCertificates { array> all_certificates; array> trust_anchors; array> trust_anchors_with_enforced_constraints; array trust_anchors_with_additional_constraints; array trust_anchors_and_leafs; array trust_leafs; array> distrusted_spkis; [EnableIfNot=is_chromeos] bool include_system_trust_store = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cert_verifier_service_updater.mojom;l=26" + }, + "network.mojom.ChunkedDataPipeGetter.GetSize": { + "definition": "GetSize() => (int32 status, uint64 size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/chunked_data_pipe_getter.mojom;l=27" + }, + "network.mojom.ChunkedDataPipeGetter.StartReading": { + "definition": "StartReading(handle pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/chunked_data_pipe_getter.mojom;l=34" + }, + "network.mojom.ClearDataFilter": { + "definition": "struct ClearDataFilter { Type type; array domains; array origins;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/clear_data_filter.mojom;l=11" + }, + "network.mojom.Type": { + "definition": "enum Type {DELETE_MATCHES, KEEP_MATCHES};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/clear_data_filter.mojom;l=12" + }, + "network.mojom.ClientSecurityState": { + "definition": "struct ClientSecurityState { CrossOriginEmbedderPolicy cross_origin_embedder_policy; bool is_web_secure_context = false; IPAddressSpace ip_address_space = kUnknown; PrivateNetworkRequestPolicy private_network_request_policy = kAllow; DocumentIsolationPolicy document_isolation_policy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/client_security_state.mojom;l=57" + }, + "network.mojom.PrivateNetworkRequestPolicy": { + "definition": "enum PrivateNetworkRequestPolicy { kAllow, kWarn, kBlock, kPreflightWarn, kPreflightBlock, kPermissionWarn, kPermissionBlock,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/client_security_state.mojom;l=29" + }, + "network.mojom.ConnectionAllowlist": { + "definition": "struct ConnectionAllowlist { array allowlist; string? reporting_endpoint; array issues;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_allowlist.mojom;l=24" + }, + "network.mojom.ConnectionAllowlists": { + "definition": "struct ConnectionAllowlists { ConnectionAllowlist? enforced; ConnectionAllowlist? report_only;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_allowlist.mojom;l=37" + }, + "network.mojom.ConnectionAllowlistIssue": { + "definition": "enum ConnectionAllowlistIssue { kInvalidHeader, kMoreThanOneList, kItemNotInnerList, kInvalidAllowlistItemType, kReportingEndpointNotToken,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_allowlist.mojom;l=13" + }, + "network.mojom.ConnectionChangeObserverClient.OnSessionClosed": { + "definition": "OnSessionClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_change_observer_client.mojom;l=30" + }, + "network.mojom.ConnectionChangeObserverClient.OnNetworkEvent": { + "definition": "OnNetworkEvent(NetworkChangeEvent event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_change_observer_client.mojom;l=34" + }, + "network.mojom.ConnectionChangeObserverClient.OnConnectionFailed": { + "definition": "OnConnectionFailed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_change_observer_client.mojom;l=39" + }, + "network.mojom.ConnectionKeepAliveConfig": { + "definition": "struct ConnectionKeepAliveConfig { int32 idle_timeout_in_seconds = 0; int32 ping_interval_in_seconds = 0; bool enable_connection_keep_alive = false; string quic_connection_options = \"\";};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_change_observer_client.mojom;l=45" + }, + "network.mojom.NetworkChangeEvent": { + "definition": "enum NetworkChangeEvent { kSoonToDisconnect, kDisconnected, kConnected, kDefaultNetworkChanged};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_change_observer_client.mojom;l=9" + }, + "network.mojom.ConnectionEndpointMetadata": { + "definition": "struct ConnectionEndpointMetadata { array supported_protocol_alpns; array ech_config_list; string target_name; array> trust_anchor_ids;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/connection_endpoint_metadata.mojom;l=8" + }, + "network.mojom.ContentSecurityPolicyHeader": { + "definition": "struct ContentSecurityPolicyHeader { string header_value; ContentSecurityPolicyType type = kEnforce; ContentSecurityPolicySource source = kHTTP;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=35" + }, + "network.mojom.CSPSource": { + "definition": "struct CSPSource { string scheme; string host; int32 port = -1; string path; bool is_host_wildcard = false; bool is_port_wildcard = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=55" + }, + "network.mojom.CSPSourceList": { + "definition": "struct CSPSourceList { array sources; array nonces; array hashes; array url_hashes; array eval_hashes; bool allow_self = false; bool allow_star = false; bool allow_inline = false; bool allow_inline_speculation_rules = false; bool allow_eval = false; bool allow_wasm_eval = false; bool allow_wasm_unsafe_eval = false; bool allow_dynamic = false; bool allow_dynamic_url = false; bool allow_unsafe_hashes = false; bool report_sample = false; IntegrityAlgorithm? report_hash_algorithm;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=64" + }, + "network.mojom.CSPTrustedTypes": { + "definition": "struct CSPTrustedTypes { array list; bool allow_any = false; bool allow_duplicates = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=135" + }, + "network.mojom.ContentSecurityPolicy": { + "definition": "struct ContentSecurityPolicy { CSPSource self_origin; map raw_directives; map directives; bool upgrade_insecure_requests = false; bool treat_as_public_address = false; bool block_all_mixed_content = false; WebSandboxFlags sandbox = WebSandboxFlags.kNone; ContentSecurityPolicyHeader header; bool use_reporting_api = false; array report_endpoints; CSPRequireTrustedTypesFor require_trusted_types_for = CSPRequireTrustedTypesFor.None; CSPTrustedTypes? trusted_types; array parsing_errors;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=148" + }, + "network.mojom.CSPViolation": { + "definition": "struct CSPViolation { string directive; string effective_directive; string console_message; url.mojom.Url blocked_url; array report_endpoints; bool use_reporting_api; string header; ContentSecurityPolicyType type; SourceLocation source_location;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=204" + }, + "network.mojom.ContentSecurityPolicyType": { + "definition": "enum ContentSecurityPolicyType { kReport, kEnforce};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=18" + }, + "network.mojom.ContentSecurityPolicySource": { + "definition": "enum ContentSecurityPolicySource { kHTTP, kMeta};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=24" + }, + "network.mojom.CSPDisposition": { + "definition": "enum CSPDisposition { CHECK, DO_NOT_CHECK,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=41" + }, + "network.mojom.CSPDirectiveName": { + "definition": "enum CSPDirectiveName { Unknown, BaseURI, BlockAllMixedContent, ChildSrc, ConnectSrc, DefaultSrc, FencedFrameSrc, FontSrc, FormAction, FrameAncestors, FrameSrc, ImgSrc, ManifestSrc, MediaSrc, ObjectSrc, ReportTo, ReportURI, RequireTrustedTypesFor, Sandbox, ScriptSrc, ScriptSrcV2, ScriptSrcAttr, ScriptSrcElem, StyleSrc, StyleSrcAttr, StyleSrcElem, TreatAsPublicAddress, TrustedTypes, UpgradeInsecureRequests, WorkerSrc,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=94" + }, + "network.mojom.CSPRequireTrustedTypesFor": { + "definition": "enum CSPRequireTrustedTypesFor { None = 0, Script = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=128" + }, + "network.mojom.AllowCSPFromHeaderValue": { + "definition": "union AllowCSPFromHeaderValue { bool allow_star; url.mojom.Origin origin; string error_message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/content_security_policy.mojom;l=238" + }, + "network.mojom.CookieAccessObserver.OnCookiesAccessed": { + "definition": "OnCookiesAccessed(array details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_access_observer.mojom;l=71" + }, + "network.mojom.CookieAccessObserver.Clone": { + "definition": "Clone(pending_receiver listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_access_observer.mojom;l=76" + }, + "network.mojom.CookieAccessDetails": { + "definition": "struct CookieAccessDetails { Type type; url.mojom.Url url; url.mojom.Origin? frame_origin; url.mojom.Origin top_frame_origin; SiteForCookies site_for_cookies; array cookie_list; string? devtools_request_id; bool is_ad_tagged; CookieSettingOverrides cookie_setting_overrides;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_access_observer.mojom;l=13" + }, + "network.mojom.Type": { + "definition": "enum Type { kRead, kChange, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_access_observer.mojom;l=14" + }, + "network.mojom.CookieEncryptionProvider.GetEncryptor": { + "definition": "GetEncryptor() => (os_crypt_async.mojom.Encryptor encryptor);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_encryption_provider.mojom;l=16" + }, + "network.mojom.CookieChangeListener.OnCookieChange": { + "definition": "OnCookieChange(CookieChangeInfo change);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=381" + }, + "network.mojom.CookieManager.GetAllCookies": { + "definition": "GetAllCookies() => (array cookies);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=398" + }, + "network.mojom.CookieManager.GetAllCookiesWithAccessSemantics": { + "definition": "GetAllCookiesWithAccessSemantics() => (array cookies, array access_semantics_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=411" + }, + "network.mojom.CookieManager.GetCookieList": { + "definition": "GetCookieList(url.mojom.Url url, CookieOptions cookie_options, CookiePartitionKeyCollection cookie_partition_key_collection) => (array cookies, array excluded_cookies);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=423" + }, + "network.mojom.CookieManager.SetCanonicalCookie": { + "definition": "SetCanonicalCookie(CanonicalCookie cookie, url.mojom.Url source_url, CookieOptions cookie_options) => (CookieAccessResult access_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=436" + }, + "network.mojom.CookieManager.DeleteCanonicalCookie": { + "definition": "DeleteCanonicalCookie(CanonicalCookie cookie) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=441" + }, + "network.mojom.CookieManager.DeleteCookies": { + "definition": "DeleteCookies(CookieDeletionFilter filter) => (uint32 num_deleted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=445" + }, + "network.mojom.CookieManager.DeleteSessionOnlyCookies": { + "definition": "DeleteSessionOnlyCookies() => (uint32 num_deleted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=449" + }, + "network.mojom.CookieManager.DeleteStaleSessionOnlyCookies": { + "definition": "DeleteStaleSessionOnlyCookies() => (uint32 num_deleted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=459" + }, + "network.mojom.CookieManager.AddCookieChangeListener": { + "definition": "AddCookieChangeListener( url.mojom.Url url, string? name, pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=476" + }, + "network.mojom.CookieManager.AddGlobalChangeListener": { + "definition": "AddGlobalChangeListener( pending_remote notification_pointer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=487" + }, + "network.mojom.CookieManager.CloneInterface": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] CloneInterface(pending_receiver new_interface);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=493" + }, + "network.mojom.CookieManager.FlushCookieStore": { + "definition": "FlushCookieStore() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=497" + }, + "network.mojom.CookieManager.AllowFileSchemeCookies": { + "definition": "AllowFileSchemeCookies(bool allow) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=504" + }, + "network.mojom.CookieManager.SetContentSettings": { + "definition": "SetContentSettings( content_settings.mojom.ContentSettingsType content_settings_type, array settings) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=509" + }, + "network.mojom.CookieManager.SetForceKeepSessionState": { + "definition": "SetForceKeepSessionState();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=514" + }, + "network.mojom.CookieManager.BlockThirdPartyCookies": { + "definition": "BlockThirdPartyCookies(bool block);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=517" + }, + "network.mojom.CookieManager.SetMitigationsEnabledFor3pcd": { + "definition": "SetMitigationsEnabledFor3pcd(bool enable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=520" + }, + "network.mojom.CookieManager.SetTrackingProtectionEnabledFor3pcd": { + "definition": "SetTrackingProtectionEnabledFor3pcd(bool enable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=523" + }, + "network.mojom.CookieManager.SetPreCommitCallbackDelayForTesting": { + "definition": "SetPreCommitCallbackDelayForTesting(mojo_base.mojom.TimeDelta delay);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=528" + }, + "network.mojom.CookieManagerParams": { + "definition": "struct CookieManagerParams { bool block_third_party_cookies = false; bool tracking_protection_enabled_for_3pcd = false; bool mitigations_enabled_for_3pcd = false; map> content_settings; array secure_origin_cookies_allowed_schemes; array matching_scheme_cookies_allowed_schemes; array third_party_cookies_allowed_schemes; bool allow_file_scheme_cookies = false; CookieAccessDelegateType cookie_access_delegate_type = USE_CONTENT_SETTINGS;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=17" + }, + "network.mojom.CookieSameSiteContextMetadata": { + "definition": "struct CookieSameSiteContextMetadata { CookieSameSiteContextMetadataDowngradeType cross_site_redirect_downgrade = kNoDowngrade; ContextRedirectTypeBug1221316 redirect_type_bug_1221316 = kUnset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=153" + }, + "network.mojom.CookieSameSiteContext": { + "definition": "struct CookieSameSiteContext { ContextType context = CROSS_SITE; ContextType schemeful_context = CROSS_SITE; CookieSameSiteContextMetadata metadata; CookieSameSiteContextMetadata schemeful_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=159" + }, + "network.mojom.CookieOptions": { + "definition": "struct CookieOptions { bool exclude_httponly = true; CookieSameSiteContext same_site_cookie_context; bool update_access_time = true; bool return_excluded_cookies = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=185" + }, + "network.mojom.CanonicalCookie": { + "definition": "struct CanonicalCookie { string name; string value; string domain; string path; mojo_base.mojom.Time creation; mojo_base.mojom.Time expiry; mojo_base.mojom.Time last_access; mojo_base.mojom.Time last_update; bool secure = false; bool httponly = false; CookieSameSite site_restrictions = NO_RESTRICTION; CookiePriority priority = MEDIUM; CookieSourceScheme source_scheme = kUnset; CookiePartitionKey? partition_key; int32 source_port = -1; CookieSourceType source_type = kUnknown;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=194" + }, + "network.mojom.ExclusionReasons": { + "definition": "struct ExclusionReasons { uint64 exclusions_bitmask;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=215" + }, + "network.mojom.WarningReasons": { + "definition": "struct WarningReasons { uint64 warnings_bitmask;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=221" + }, + "network.mojom.CookieInclusionStatus": { + "definition": "struct CookieInclusionStatus { ExclusionReasons exclusion_reasons; WarningReasons warning_reasons; CookieExemptionReason exemption_reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=230" + }, + "network.mojom.CookieAndLineWithAccessResult": { + "definition": "struct CookieAndLineWithAccessResult { CanonicalCookie? cookie; string cookie_string; CookieAccessResult access_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=237" + }, + "network.mojom.CookieOrLineWithAccessResult": { + "definition": "struct CookieOrLineWithAccessResult { CookieOrLine cookie_or_line; CookieAccessResult access_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=248" + }, + "network.mojom.CookieAccessResult": { + "definition": "struct CookieAccessResult { CookieEffectiveSameSite effective_same_site; CookieAccessSemantics access_semantics; CookieScopeSemantics scope_semantics; CookieInclusionStatus status; bool is_allowed_to_access_secure_cookies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=254" + }, + "network.mojom.CookieWithAccessResult": { + "definition": "struct CookieWithAccessResult { CanonicalCookie cookie; CookieAccessResult access_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=262" + }, + "network.mojom.CookieChangeInfo": { + "definition": "struct CookieChangeInfo { CanonicalCookie cookie; CookieAccessResult access_result; CookieChangeCause cause;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=289" + }, + "network.mojom.CookieDeletionFilter": { + "definition": "struct CookieDeletionFilter { mojo_base.mojom.Time? created_after_time; mojo_base.mojom.Time? created_before_time; array? excluding_domains; array? including_domains; string? cookie_name; string? host_name; url.mojom.Url? url; CookieDeletionSessionControl session_control = IGNORE_CONTROL; CookiePartitionKeyCollection? cookie_partition_key_collection; bool partitioned_state_only;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=327" + }, + "network.mojom.CookieAccessDelegateType": { + "definition": "enum CookieAccessDelegateType { USE_CONTENT_SETTINGS, ALWAYS_LEGACY, ALWAYS_NONLEGACY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=51" + }, + "network.mojom.CookiePriority": { + "definition": "enum CookiePriority { LOW, MEDIUM, HIGH};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=61" + }, + "network.mojom.CookieSourceScheme": { + "definition": "enum CookieSourceScheme { kUnset, kNonSecure, kSecure,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=67" + }, + "network.mojom.CookieSameSite": { + "definition": "enum CookieSameSite { UNSPECIFIED = -1, NO_RESTRICTION = 0, LAX_MODE = 1, STRICT_MODE = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=78" + }, + "network.mojom.CookieEffectiveSameSite": { + "definition": "enum CookieEffectiveSameSite { kNoRestriction = 0, kLaxMode = 1, kStrictMode = 2, kLaxModeAllowUnsafe = 3, kUndefined = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=86" + }, + "network.mojom.CookieExemptionReason": { + "definition": "enum CookieExemptionReason { kNone = 0, kUserSetting = 1, k3PCDMetadata = 2, k3PCDDeprecationTrial = 3, kTopLevel3PCDDeprecationTrial = 4, k3PCDHeuristics = 5, kEnterprisePolicy = 6, kStorageAccess = 7, kTopLevelStorageAccess = 8, kScheme = 9, kSameSiteNoneCookiesInSandbox = 10,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=95" + }, + "network.mojom.ContextType": { + "definition": "enum ContextType { CROSS_SITE, SAME_SITE_LAX_METHOD_UNSAFE, SAME_SITE_LAX, SAME_SITE_STRICT};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=109" + }, + "network.mojom.CookieSameSiteContextMetadataDowngradeType": { + "definition": "enum CookieSameSiteContextMetadataDowngradeType { kNoDowngrade, kStrictToLax, kStrictToCross, kLaxToCross,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=116" + }, + "network.mojom.CookieSourceType": { + "definition": "enum CookieSourceType { kUnknown, kHTTP, kScript, kOther,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=123" + }, + "network.mojom.ContextRedirectTypeBug1221316": { + "definition": "enum ContextRedirectTypeBug1221316 { kUnset, kNoRedirect, kCrossSiteRedirect, kPartialSameSiteRedirect, kAllSameSiteRedirect,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=130" + }, + "network.mojom.HttpMethod": { + "definition": "enum HttpMethod { kUnset, kUnknown, kGet, kHead, kPost, KPut, kDelete, kConnect, kOptions, kTrace, kPatch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=138" + }, + "network.mojom.CookieAccessSemantics": { + "definition": "enum CookieAccessSemantics { UNKNOWN = -1, NONLEGACY = 0, LEGACY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=169" + }, + "network.mojom.CookieScopeSemantics": { + "definition": "enum CookieScopeSemantics { UNKNOWN = -1, NONLEGACY = 0, LEGACY = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=177" + }, + "network.mojom.CookieChangeCause": { + "definition": "enum CookieChangeCause { INSERTED, EXPLICIT, UNKNOWN_DELETION, OVERWRITE, EXPIRED, EVICTED, EXPIRED_OVERWRITE, INSERTED_NO_CHANGE_OVERWRITE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=268" + }, + "network.mojom.CookieDeletionSessionControl": { + "definition": "enum CookieDeletionSessionControl { IGNORE_CONTROL, SESSION_COOKIES, PERSISTENT_COOKIES,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=299" + }, + "network.mojom.CookieOrLine": { + "definition": "union CookieOrLine { CanonicalCookie cookie; string cookie_string;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_manager.mojom;l=243" + }, + "network.mojom.CookiePartitionKey": { + "definition": "struct CookiePartitionKey { SchemefulSite site; bool from_script = false; mojo_base.mojom.UnguessableToken? nonce; AncestorChainBit ancestor_chain_bit = AncestorChainBit.kCrossSite;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_partition_key.mojom;l=22" + }, + "network.mojom.CookiePartitionKeyCollection": { + "definition": "struct CookiePartitionKeyCollection { bool contains_all_partitions = false; array keys;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_partition_key.mojom;l=35" + }, + "network.mojom.AncestorChainBit": { + "definition": "enum AncestorChainBit { kSameSite = 0, kCrossSite = 1, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_partition_key.mojom;l=14" + }, + "network.mojom.CookieSettingOverrides": { + "definition": "struct CookieSettingOverrides { uint64 overrides_bitmask = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cookie_setting_overrides.mojom;l=9" + }, + "network.mojom.CorsErrorStatus": { + "definition": "struct CorsErrorStatus { CorsError cors_error; string failed_parameter; IPAddressSpace target_address_space = IPAddressSpace.kUnknown; IPAddressSpace resource_address_space = IPAddressSpace.kUnknown; bool has_authorization_covered_by_wildcard_on_preflight = false; mojo_base.mojom.UnguessableToken issue_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors.mojom;l=164" + }, + "network.mojom.CorsPreflightPolicy": { + "definition": "enum CorsPreflightPolicy { kConsiderPreflight, kPreventPreflight,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors.mojom;l=11" + }, + "network.mojom.CorsError": { + "definition": "enum CorsError { kDisallowedByMode, kInvalidResponse, kWildcardOriginNotAllowed, kMissingAllowOriginHeader, kMultipleAllowOriginValues, kInvalidAllowOriginValue, kAllowOriginMismatch, kInvalidAllowCredentials, kCorsDisabledScheme, kPreflightInvalidStatus, kPreflightDisallowedRedirect, kPreflightWildcardOriginNotAllowed, kPreflightMissingAllowOriginHeader, kPreflightMultipleAllowOriginValues, kPreflightInvalidAllowOriginValue, kPreflightAllowOriginMismatch, kPreflightInvalidAllowCredentials, kPreflightMissingAllowPrivateNetwork, kPreflightInvalidAllowPrivateNetwork, kInvalidAllowMethodsPreflightResponse, kInvalidAllowHeadersPreflightResponse, kMethodDisallowedByPreflightResponse, kHeaderDisallowedByPreflightResponse, kRedirectContainsCredentials, kInsecurePrivateNetwork, kInvalidPrivateNetworkAccess, kUnexpectedPrivateNetworkAccess, kPreflightMissingPrivateNetworkAccessId, kPreflightMissingPrivateNetworkAccessName, kPrivateNetworkAccessPermissionUnavailable, kPrivateNetworkAccessPermissionDenied, kLocalNetworkAccessPermissionDenied,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors.mojom;l=20" + }, + "network.mojom.PrivateNetworkAccessPreflightResult": { + "definition": "enum PrivateNetworkAccessPreflightResult { kNone, kSuccess, kWarning, kError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors.mojom;l=200" + }, + "network.mojom.CorsOriginPattern": { + "definition": "struct CorsOriginPattern { string protocol; string domain; uint16 port; CorsDomainMatchMode domain_match_mode; CorsPortMatchMode port_match_mode; CorsOriginAccessMatchPriority priority;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors_origin_pattern.mojom;l=39" + }, + "network.mojom.CorsOriginAccessPatterns": { + "definition": "struct CorsOriginAccessPatterns { url.mojom.Origin source_origin; array allow_patterns; array block_patterns;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors_origin_pattern.mojom;l=64" + }, + "network.mojom.CorsPortMatchMode": { + "definition": "enum CorsPortMatchMode { kAllowAnyPort, kAllowOnlySpecifiedPort,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors_origin_pattern.mojom;l=10" + }, + "network.mojom.CorsDomainMatchMode": { + "definition": "enum CorsDomainMatchMode { kAllowSubdomains, kAllowRegistrableDomains, kDisallowSubdomains,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors_origin_pattern.mojom;l=17" + }, + "network.mojom.CorsOriginAccessMatchPriority": { + "definition": "enum CorsOriginAccessMatchPriority { kNoMatchingOrigin, kDefaultPriority, kLowPriority, kMediumPriority, kHighPriority, kMaxPriority};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cors_origin_pattern.mojom;l=29" + }, + "network.mojom.CrossOriginEmbedderPolicyReporter.QueueCorpViolationReport": { + "definition": "QueueCorpViolationReport(url.mojom.Url blocked_url, network.mojom.RequestDestination destination, bool report_only);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_embedder_policy.mojom;l=36" + }, + "network.mojom.CrossOriginEmbedderPolicyReporter.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_embedder_policy.mojom;l=41" + }, + "network.mojom.CrossOriginEmbedderPolicy": { + "definition": "struct CrossOriginEmbedderPolicy { CrossOriginEmbedderPolicyValue value = CrossOriginEmbedderPolicyValue.kNone; string? reporting_endpoint; CrossOriginEmbedderPolicyValue report_only_value = CrossOriginEmbedderPolicyValue.kNone; string? report_only_reporting_endpoint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_embedder_policy.mojom;l=46" + }, + "network.mojom.CrossOriginEmbedderPolicyValue": { + "definition": "enum CrossOriginEmbedderPolicyValue { kNone, kRequireCorp, kCredentialless,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_embedder_policy.mojom;l=13" + }, + "network.mojom.CrossOriginOpenerPolicyReporter.QueueAccessReport": { + "definition": "QueueAccessReport(CoopAccessReportType report_type, string property, SourceLocation source_location, string reported_window_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_opener_policy.mojom;l=26" + }, + "network.mojom.CrossOriginOpenerPolicyReporterParams": { + "definition": "struct CrossOriginOpenerPolicyReporterParams { network.mojom.CoopAccessReportType report_type; pending_remote reporter; bool endpoint_defined; string reported_window_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_opener_policy.mojom;l=33" + }, + "network.mojom.CrossOriginOpenerPolicy": { + "definition": "struct CrossOriginOpenerPolicy { CrossOriginOpenerPolicyValue value = CrossOriginOpenerPolicyValue.kUnsafeNone; string? reporting_endpoint; CrossOriginOpenerPolicyValue report_only_value = CrossOriginOpenerPolicyValue.kUnsafeNone; string? report_only_reporting_endpoint; CrossOriginOpenerPolicyValue soap_by_default_value = CrossOriginOpenerPolicyValue.kUnsafeNone;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_opener_policy.mojom;l=75" + }, + "network.mojom.CoopAccessReportType": { + "definition": "enum CoopAccessReportType { kAccessFromCoopPageToOpener, kAccessFromCoopPageToOpenee, kAccessFromCoopPageToOther, kAccessToCoopPageFromOpener, kAccessToCoopPageFromOpenee, kAccessToCoopPageFromOther,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_opener_policy.mojom;l=9" + }, + "network.mojom.CrossOriginOpenerPolicyValue": { + "definition": "enum CrossOriginOpenerPolicyValue { kUnsafeNone, kSameOriginAllowPopups, kSameOrigin, kSameOriginPlusCoep, kNoopenerAllowPopups,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/cross_origin_opener_policy.mojom;l=51" + }, + "network.mojom.PreviousOperatorEntry": { + "definition": "struct PreviousOperatorEntry { string name; mojo_base.mojom.Time end_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ct_log_info.mojom;l=11" + }, + "network.mojom.CTLogInfo": { + "definition": "struct CTLogInfo { mojo_base.mojom.ByteString id; mojo_base.mojom.ByteString public_key; string name; mojo_base.mojom.Time? disqualified_at; mojo_base.mojom.TimeDelta mmd; string current_operator; array previous_operators; LogType log_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ct_log_info.mojom;l=19" + }, + "network.mojom.LogType": { + "definition": "enum LogType { kUnspecified = 0, kRFC6962 = 1, kStaticCTAPI = 2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ct_log_info.mojom;l=48" + }, + "network.mojom.DataPipeGetter.Read": { + "definition": "Read(handle pipe) => (int32 status, uint64 size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/data_pipe_getter.mojom;l=15" + }, + "network.mojom.DataPipeGetter.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/data_pipe_getter.mojom;l=20" + }, + "network.mojom.DefaultCredentials": { + "definition": "enum DefaultCredentials { DISALLOW_DEFAULT_CREDENTIALS = 0, ALLOW_DEFAULT_CREDENTIALS = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/default_credentials.mojom;l=8" + }, + "network.mojom.DeviceBoundSessionManager.GetAllSessions": { + "definition": "GetAllSessions() => (array sessions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=112" + }, + "network.mojom.DeviceBoundSessionManager.DeleteSession": { + "definition": "DeleteSession( DeviceBoundSessionDeletionReason reason, DeviceBoundSessionKey session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=115" + }, + "network.mojom.DeviceBoundSessionManager.DeleteAllSessions": { + "definition": "DeleteAllSessions(DeviceBoundSessionDeletionReason reason, mojo_base.mojom.Time? created_after_time, mojo_base.mojom.Time? created_before_time, ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=123" + }, + "network.mojom.DeviceBoundSessionManager.AddObserver": { + "definition": "AddObserver(url.mojom.Url url, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=129" + }, + "network.mojom.DeviceBoundSessionManager.CreateBoundSession": { + "definition": "CreateBoundSession(DeviceBoundSessionParams params, array wrapped_key, array cookies_to_set, CookieOptions cookie_options) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=140" + }, + "network.mojom.DeviceBoundSessionAccessObserver.OnDeviceBoundSessionAccessed": { + "definition": "OnDeviceBoundSessionAccessed(DeviceBoundSessionAccess access);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=152" + }, + "network.mojom.DeviceBoundSessionAccessObserver.Clone": { + "definition": "Clone(pending_receiver observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=156" + }, + "network.mojom.DeviceBoundSessionKey": { + "definition": "struct DeviceBoundSessionKey { SchemefulSite site; string id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=15" + }, + "network.mojom.DeviceBoundSessionAccess": { + "definition": "struct DeviceBoundSessionAccess { DeviceBoundSessionAccessType access_type; DeviceBoundSessionKey session_key; array cookies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=32" + }, + "network.mojom.DeviceBoundSessionScopeSpecification": { + "definition": "struct DeviceBoundSessionScopeSpecification { DeviceBoundSessionScopeSpecificationType type; string domain; string path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=79" + }, + "network.mojom.DeviceBoundSessionScope": { + "definition": "struct DeviceBoundSessionScope { bool include_site; array specifications; string origin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=85" + }, + "network.mojom.DeviceBoundSessionCredential": { + "definition": "struct DeviceBoundSessionCredential { string name; string attributes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=91" + }, + "network.mojom.DeviceBoundSessionParams": { + "definition": "struct DeviceBoundSessionParams { string session_id; url.mojom.Url fetcher_url; string refresh_url; DeviceBoundSessionScope scope; array credentials; array allowed_refresh_initiators;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=96" + }, + "network.mojom.DeviceBoundSessionAccessType": { + "definition": "enum DeviceBoundSessionAccessType { kCreation = 0, kUpdate = 1, kTermination = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=26" + }, + "network.mojom.DeviceBoundSessionUsage": { + "definition": "enum DeviceBoundSessionUsage { kUnknown = 0, kNoUsage = 1, kInScopeNotDeferred = 2, kDeferred = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=46" + }, + "network.mojom.DeviceBoundSessionDeletionReason": { + "definition": "enum DeviceBoundSessionDeletionReason { kExpired = 0, kFailedToRestoreKey = 1, kFailedToUnwrapKey = 2, kStoragePartitionCleared = 3, kClearBrowsingData = 4, kServerRequested = 5, kInvalidSessionParams = 6, kRefreshFatalError = 7, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=56" + }, + "network.mojom.DeviceBoundSessionScopeSpecificationType": { + "definition": "enum DeviceBoundSessionScopeSpecificationType { kExclude, kInclude,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/device_bound_sessions.mojom;l=74" + }, + "network.mojom.DevToolsObserver.OnRawRequest": { + "definition": "OnRawRequest( string devtool_request_id, array cookies_with_access_result, array headers, mojo_base.mojom.TimeTicks timestamp, ClientSecurityState? client_security_state, OtherPartitionInfo? other_partition_info, mojo_base.mojom.UnguessableToken? applied_network_conditions_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=93" + }, + "network.mojom.DevToolsObserver.OnRawResponse": { + "definition": "OnRawResponse( string devtool_request_id, array cookies_with_access_result, array headers, string? raw_response_headers, IPAddressSpace resource_address_space, int32 http_status_code, CookiePartitionKey? cookie_partition_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=105" + }, + "network.mojom.DevToolsObserver.OnEarlyHintsResponse": { + "definition": "OnEarlyHintsResponse( string devtool_request_id, array headers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=116" + }, + "network.mojom.DevToolsObserver.OnPrivateNetworkRequest": { + "definition": "OnPrivateNetworkRequest( string? devtool_request_id, url.mojom.Url url, bool is_warning, IPAddressSpace resource_address_space, ClientSecurityState client_security_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=126" + }, + "network.mojom.DevToolsObserver.OnCorsPreflightRequest": { + "definition": "OnCorsPreflightRequest( mojo_base.mojom.UnguessableToken devtool_request_id, HttpRequestHeaders request_headers, URLRequestDevToolsInfo request_info, url.mojom.Url initiator_url, string initiator_devtool_request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=135" + }, + "network.mojom.DevToolsObserver.OnCorsPreflightResponse": { + "definition": "OnCorsPreflightResponse( mojo_base.mojom.UnguessableToken devtool_request_id, url.mojom.Url url, URLResponseHeadDevToolsInfo head);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=144" + }, + "network.mojom.DevToolsObserver.OnCorsPreflightRequestCompleted": { + "definition": "OnCorsPreflightRequestCompleted( mojo_base.mojom.UnguessableToken devtool_request_id, URLLoaderCompletionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=151" + }, + "network.mojom.DevToolsObserver.OnTrustTokenOperationDone": { + "definition": "OnTrustTokenOperationDone( string devtool_request_id, TrustTokenOperationResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=158" + }, + "network.mojom.DevToolsObserver.OnCorsError": { + "definition": "OnCorsError( string? devtool_request_id, url.mojom.Origin? initiator_origin, ClientSecurityState? client_security_state, url.mojom.Url url, CorsErrorStatus status, bool is_warning);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=169" + }, + "network.mojom.DevToolsObserver.OnOrbError": { + "definition": "OnOrbError( string? devtools_request_id, url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=182" + }, + "network.mojom.DevToolsObserver.OnSharedDictionaryError": { + "definition": "OnSharedDictionaryError( string devtool_request_id, url.mojom.Url url, SharedDictionaryError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=189" + }, + "network.mojom.DevToolsObserver.OnSRIMessageSignatureIssue": { + "definition": "OnSRIMessageSignatureIssue( string devtool_request_id, url.mojom.Url url, array issues);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=196" + }, + "network.mojom.DevToolsObserver.OnUnencodedDigestError": { + "definition": "OnUnencodedDigestError( string devtool_request_id, url.mojom.Url url, UnencodedDigestIssue issue);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=202" + }, + "network.mojom.DevToolsObserver.Clone": { + "definition": "Clone(pending_receiver listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=210" + }, + "network.mojom.URLRequestDevToolsInfo": { + "definition": "struct URLRequestDevToolsInfo { string method; url.mojom.Url url; RequestPriority priority; URLRequestReferrerPolicy referrer_policy; TrustTokenParams? trust_token_params; bool has_user_gesture; uint32 resource_type; bool is_ad_related;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=35" + }, + "network.mojom.URLResponseHeadDevToolsInfo": { + "definition": "struct URLResponseHeadDevToolsInfo { mojo_base.mojom.Time response_time; HttpResponseHeaders headers; string mime_type; string charset; LoadTimingInfo load_timing; uint32 cert_status; int64 encoded_data_length; bool was_in_prefetch_cache; bool was_fetched_via_service_worker; string cache_storage_cache_name; string alpn_negotiated_protocol; AlternateProtocolUsage alternate_protocol_usage; bool was_fetched_via_spdy; FetchResponseSource service_worker_response_source; ServiceWorkerRouterInfo? service_worker_router_info; SSLInfo? ssl_info; IPEndPoint remote_endpoint; bool emitted_extra_info; bool is_for_ip_protection;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=50" + }, + "network.mojom.OtherPartitionInfo": { + "definition": "struct OtherPartitionInfo { bool site_has_cookie_in_other_partition;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/devtools_observer.mojom;l=83" + }, + "network.mojom.DhcpWpadUrlClient.GetPacUrl": { + "definition": "GetPacUrl() => (mojo_base.mojom.BigString url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/dhcp_wpad_url_client.mojom;l=14" + }, + "network.mojom.DigitallySigned": { + "definition": "struct DigitallySigned { HashAlgorithm hash_algorithm; SignatureAlgorithm signature_algorithm; array signature;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/digitally_signed.mojom;l=26" + }, + "network.mojom.HashAlgorithm": { + "definition": "enum HashAlgorithm { HASH_ALGO_NONE = 0, HASH_ALGO_MD5 = 1, HASH_ALGO_SHA1 = 2, HASH_ALGO_SHA224 = 3, HASH_ALGO_SHA256 = 4, HASH_ALGO_SHA384 = 5, HASH_ALGO_SHA512 = 6};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/digitally_signed.mojom;l=7" + }, + "network.mojom.SignatureAlgorithm": { + "definition": "enum SignatureAlgorithm { SIG_ALGO_ANONYMOUS = 0, SIG_ALGO_RSA = 1, SIG_ALGO_DSA = 2, SIG_ALGO_ECDSA = 3};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/digitally_signed.mojom;l=18" + }, + "network.mojom.DocumentIsolationPolicyReporter.QueueCorpViolationReport": { + "definition": "QueueCorpViolationReport(url.mojom.Url blocked_url, network.mojom.RequestDestination destination, bool report_only);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/document_isolation_policy.mojom;l=59" + }, + "network.mojom.DocumentIsolationPolicyReporter.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/document_isolation_policy.mojom;l=64" + }, + "network.mojom.DocumentIsolationPolicy": { + "definition": "struct DocumentIsolationPolicy { DocumentIsolationPolicyValue value = DocumentIsolationPolicyValue.kNone; string? reporting_endpoint; DocumentIsolationPolicyValue report_only_value = DocumentIsolationPolicyValue.kNone; string? report_only_reporting_endpoint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/document_isolation_policy.mojom;l=40" + }, + "network.mojom.DocumentIsolationPolicyValue": { + "definition": "enum DocumentIsolationPolicyValue { kNone, kIsolateAndRequireCorp, kIsolateAndCredentialless,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/document_isolation_policy.mojom;l=14" + }, + "network.mojom.EarlyHints": { + "definition": "struct EarlyHints { ParsedHeaders headers; ReferrerPolicy referrer_policy; IPAddressSpace ip_address_space;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/early_hints.mojom;l=13" + }, + "network.mojom.EncodedBodyLength": { + "definition": "struct EncodedBodyLength { uint64 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/encoded_body_length.mojom;l=9" + }, + "network.mojom.RequestMode": { + "definition": "enum RequestMode { kSameOrigin = 0, kNoCors = 1, kCors = 2, kCorsWithForcedPreflight = 3, kNavigate = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/fetch_api.mojom;l=12" + }, + "network.mojom.RequestDestination": { + "definition": "enum RequestDestination { kEmpty = 0, kAudio = 1, kAudioWorklet = 2, kDocument = 3, kEmbed = 4, kFont = 5, kFrame = 6, kIframe = 7, kImage = 8, kManifest = 9, kObject = 10, kPaintWorklet = 11, kReport = 12, kScript = 13, kServiceWorker = 14, kSharedWorker = 15, kStyle = 16, kTrack = 17, kVideo = 18, kWebBundle = 19, kWorker = 20, kXslt = 21, kFencedframe = 22, kWebIdentity = 23, kDictionary = 24, kSpeculationRules = 25, kJson = 26, kSharedStorageWorklet = 27,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/fetch_api.mojom;l=26" + }, + "network.mojom.RedirectMode": { + "definition": "enum RedirectMode { kFollow, kError, kManual,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/fetch_api.mojom;l=82" + }, + "network.mojom.CredentialsMode": { + "definition": "enum CredentialsMode { kOmit, kSameOrigin, kInclude, kOmitBug_775438_Workaround};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/fetch_api.mojom;l=90" + }, + "network.mojom.FetchResponseType": { + "definition": "enum FetchResponseType { kBasic = 0, kCors = 1, kDefault = 2, kError = 3, kOpaque = 4, kOpaqueRedirect = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/fetch_api.mojom;l=113" + }, + "network.mojom.FetchResponseSource": { + "definition": "enum FetchResponseSource { kUnspecified, kNetwork, kHttpCache, kCacheStorage,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/fetch_api.mojom;l=126" + }, + "network.mojom.FetchRetryOptions": { + "definition": "struct FetchRetryOptions { uint32 max_attempts; mojo_base.mojom.TimeDelta? initial_delay; double? backoff_factor; mojo_base.mojom.TimeDelta? max_age; bool retry_after_unload = false; bool retry_non_idempotent = false; bool retry_only_if_server_unreached = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/fetch_retry_options.mojom;l=11" + }, + "network.mojom.FirstPartySetEntry": { + "definition": "struct FirstPartySetEntry { SchemefulSite primary; SiteType site_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets.mojom;l=18" + }, + "network.mojom.FirstPartySetMetadata": { + "definition": "struct FirstPartySetMetadata { FirstPartySetEntry? frame_entry; FirstPartySetEntry? top_frame_entry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets.mojom;l=25" + }, + "network.mojom.FirstPartySetEntryOverride": { + "definition": "struct FirstPartySetEntryOverride { FirstPartySetEntry? entry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets.mojom;l=34" + }, + "network.mojom.FirstPartySetsContextConfig": { + "definition": "struct FirstPartySetsContextConfig { map customizations; map aliases;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets.mojom;l=44" + }, + "network.mojom.FirstPartySetsCacheFilter": { + "definition": "struct FirstPartySetsCacheFilter { map filter; int64 browser_run_id = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets.mojom;l=56" + }, + "network.mojom.GlobalFirstPartySets": { + "definition": "struct GlobalFirstPartySets { mojo_base.mojom.Version public_sets_version; map sets; map aliases; FirstPartySetsContextConfig manual_config;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets.mojom;l=70" + }, + "network.mojom.SiteType": { + "definition": "enum SiteType { kPrimary, kAssociated, kService,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets.mojom;l=11" + }, + "network.mojom.FirstPartySetsAccessDelegate.NotifyReady": { + "definition": "NotifyReady(FirstPartySetsReadyEvent ready_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets_access_delegate.mojom;l=20" + }, + "network.mojom.FirstPartySetsAccessDelegate.SetEnabled": { + "definition": "SetEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets_access_delegate.mojom;l=27" + }, + "network.mojom.FirstPartySetsAccessDelegateParams": { + "definition": "struct FirstPartySetsAccessDelegateParams { bool enabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets_access_delegate.mojom;l=30" + }, + "network.mojom.FirstPartySetsReadyEvent": { + "definition": "struct FirstPartySetsReadyEvent { FirstPartySetsContextConfig config; FirstPartySetsCacheFilter cache_filter;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/first_party_sets_access_delegate.mojom;l=35" + }, + "network.mojom.SHA256HashValue": { + "definition": "struct SHA256HashValue { array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/hash_value.mojom;l=9" + }, + "network.mojom.ResolveHostHandle.Cancel": { + "definition": "Cancel(int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=123" + }, + "network.mojom.ResolveHostClient.OnComplete": { + "definition": "OnComplete(int32 result, ResolveErrorInfo resolve_error_info, AddressList resolved_addresses, array alternative_endpoints);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=155" + }, + "network.mojom.ResolveHostClient.OnTextResults": { + "definition": "OnTextResults(array text_results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=162" + }, + "network.mojom.ResolveHostClient.OnHostnameResults": { + "definition": "OnHostnameResults(array hosts);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=163" + }, + "network.mojom.MdnsListenClient.OnAddressResult": { + "definition": "OnAddressResult(UpdateType update_type, DnsQueryType query_type, IPEndPoint endpoint);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=284" + }, + "network.mojom.MdnsListenClient.OnTextResult": { + "definition": "OnTextResult(UpdateType update_type, DnsQueryType query_type, array text_records);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=288" + }, + "network.mojom.MdnsListenClient.OnHostnameResult": { + "definition": "OnHostnameResult(UpdateType update_type, DnsQueryType query_type, HostPortPair host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=291" + }, + "network.mojom.MdnsListenClient.OnUnhandledResult": { + "definition": "OnUnhandledResult(UpdateType update_type, DnsQueryType query_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=297" + }, + "network.mojom.HostResolver.ResolveHost": { + "definition": "ResolveHost(HostResolverHost host, NetworkAnonymizationKey network_anonymization_key, ResolveHostParameters? optional_parameters, pending_remote response_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=335" + }, + "network.mojom.HostResolver.MdnsListen": { + "definition": "MdnsListen(HostPortPair host, DnsQueryType query_type, pending_remote response_client) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=347" + }, + "network.mojom.DnsConfigChangeManagerClient.OnDnsConfigChanged": { + "definition": "OnDnsConfigChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=359" + }, + "network.mojom.DnsConfigChangeManager.RequestNotifications": { + "definition": "RequestNotifications(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=365" + }, + "network.mojom.DnsOverHttpsServerConfig": { + "definition": "struct DnsOverHttpsServerConfig { string server_template; array> endpoints;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=17" + }, + "network.mojom.DnsOverHttpsConfig": { + "definition": "struct DnsOverHttpsConfig { array servers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=23" + }, + "network.mojom.DnsConfigOverrides": { + "definition": "struct DnsConfigOverrides { array? nameservers; array? search; Tristate append_to_multi_label_name = Tristate.NO_OVERRIDE; int8 ndots = -1; mojo_base.mojom.TimeDelta? fallback_period; int32 attempts = -1; Tristate rotate = Tristate.NO_OVERRIDE; Tristate use_local_ipv6 = Tristate.NO_OVERRIDE; DnsOverHttpsConfig? dns_over_https_config; OptionalSecureDnsMode secure_dns_mode = OptionalSecureDnsMode.NO_OVERRIDE; Tristate allow_dns_over_https_upgrade = Tristate.NO_OVERRIDE; bool clear_hosts = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=62" + }, + "network.mojom.ResolveHostParameters": { + "definition": "struct ResolveHostParameters { DnsQueryType dns_query_type = DnsQueryType.UNSPECIFIED; RequestPriority initial_priority = RequestPriority.kLowest; Source source = Source.ANY; CacheUsage cache_usage = CacheUsage.ALLOWED; pending_receiver? control_handle; bool include_canonical_name = false; bool loopback_only = false; bool is_speculative = false; SecureDnsPolicy secure_dns_policy = SecureDnsPolicy.ALLOW; Purpose purpose = Purpose.kUnspecified;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=182" + }, + "network.mojom.OptionalSecureDnsMode": { + "definition": "enum OptionalSecureDnsMode { NO_OVERRIDE, OFF, AUTOMATIC, SECURE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=31" + }, + "network.mojom.SecureDnsMode": { + "definition": "enum SecureDnsMode { OFF, AUTOMATIC, SECURE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=39" + }, + "network.mojom.SecureDnsPolicy": { + "definition": "enum SecureDnsPolicy { ALLOW, DISABLE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=46" + }, + "network.mojom.Tristate": { + "definition": "enum Tristate { NO_OVERRIDE, TRISTATE_TRUE, TRISTATE_FALSE, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=65" + }, + "network.mojom.DnsQueryType": { + "definition": "enum DnsQueryType { UNSPECIFIED, A, AAAA, TXT, PTR, SRV, HTTPS,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=169" + }, + "network.mojom.Source": { + "definition": "enum Source { ANY, SYSTEM, DNS, MULTICAST_DNS, LOCAL_ONLY, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=191" + }, + "network.mojom.CacheUsage": { + "definition": "enum CacheUsage { ALLOWED, STALE_ALLOWED, DISALLOWED, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=221" + }, + "network.mojom.Purpose": { + "definition": "enum Purpose { kUnspecified, kPreconnect, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=265" + }, + "network.mojom.UpdateType": { + "definition": "enum UpdateType { ADDED, CHANGED, REMOVED };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=279" + }, + "network.mojom.HostResolverHost": { + "definition": "union HostResolverHost { url.mojom.SchemeHostPort scheme_host_port; HostPortPair host_port_pair;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver.mojom;l=54" + }, + "network.mojom.HostResolverEndpointResult": { + "definition": "struct HostResolverEndpointResult { array ip_endpoints; ConnectionEndpointMetadata metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/host_resolver_endpoint_result.mojom;l=11" + }, + "network.mojom.FileEnumerator.GetNext": { + "definition": "[Sync] GetNext(uint32 num_entries) => (array entries, bool end, bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=49" + }, + "network.mojom.HttpCacheBackendFileOperations.CreateDirectory": { + "definition": "[Sync] CreateDirectory(mojo_base.mojom.FilePath path) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=58" + }, + "network.mojom.HttpCacheBackendFileOperations.PathExists": { + "definition": "[Sync] PathExists(mojo_base.mojom.FilePath path) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=61" + }, + "network.mojom.HttpCacheBackendFileOperations.DirectoryExists": { + "definition": "[Sync] DirectoryExists(mojo_base.mojom.FilePath path) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=65" + }, + "network.mojom.HttpCacheBackendFileOperations.OpenFile": { + "definition": "[Sync] OpenFile( mojo_base.mojom.FilePath path, HttpCacheBackendOpenFileFlags flags) => (mojo_base.mojom.File? file, mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=69" + }, + "network.mojom.HttpCacheBackendFileOperations.DeleteFile": { + "definition": "[Sync] DeleteFile(mojo_base.mojom.FilePath path, HttpCacheBackendDeleteFileMode mode) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=74" + }, + "network.mojom.HttpCacheBackendFileOperations.RenameFile": { + "definition": "[Sync] RenameFile(mojo_base.mojom.FilePath from_path, mojo_base.mojom.FilePath to_path) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=78" + }, + "network.mojom.HttpCacheBackendFileOperations.GetFileInfo": { + "definition": "[Sync] GetFileInfo( mojo_base.mojom.FilePath path) => (mojo_base.mojom.FileInfo? info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=82" + }, + "network.mojom.HttpCacheBackendFileOperations.EnumerateFiles": { + "definition": "EnumerateFiles( mojo_base.mojom.FilePath path, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=86" + }, + "network.mojom.HttpCacheBackendFileOperations.CleanupDirectory": { + "definition": "CleanupDirectory(mojo_base.mojom.FilePath path) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=95" + }, + "network.mojom.HttpCacheBackendFileOperationsFactory.Create": { + "definition": "Create(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=101" + }, + "network.mojom.FileEnumerationEntry": { + "definition": "struct FileEnumerationEntry { mojo_base.mojom.FilePath path; int64 size; mojo_base.mojom.Time last_accessed; mojo_base.mojom.Time last_modified;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=37" + }, + "network.mojom.HttpCacheBackendOpenFileFlags": { + "definition": "enum HttpCacheBackendOpenFileFlags { kOpenAndRead = 0x21, kCreateAndWrite = 0x42, kOpenReadWriteWinShareDelete = 0x8061, kCreateReadWriteWinShareDelete = 0x8062, kCreateAlwaysWriteWinShareDelete = 0x8048, kOpenReadWinShareDeleteWinSequentialScan = 0x88021,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=16" + }, + "network.mojom.HttpCacheBackendDeleteFileMode": { + "definition": "enum HttpCacheBackendDeleteFileMode { kDefault, kEnsureImmediateAvailability,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_cache_backend_file_operations.mojom;l=26" + }, + "network.mojom.HttpRawHeaderPair": { + "definition": "struct HttpRawHeaderPair { string key; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_raw_headers.mojom;l=7" + }, + "network.mojom.HttpRequestHeaderKeyValuePair": { + "definition": "struct HttpRequestHeaderKeyValuePair { string key; mojo_base.mojom.ByteString value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_request_headers.mojom;l=9" + }, + "network.mojom.HttpRequestHeaders": { + "definition": "struct HttpRequestHeaders { array headers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/http_request_headers.mojom;l=20" + }, + "network.mojom.IntegrityAlgorithm": { + "definition": "enum IntegrityAlgorithm { kSha256, kSha384, kSha512, kEd25519,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/integrity_algorithm.mojom;l=15" + }, + "network.mojom.IntegrityMetadata": { + "definition": "struct IntegrityMetadata { IntegrityAlgorithm algorithm; array value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/integrity_metadata.mojom;l=13" + }, + "network.mojom.IntegrityPolicy": { + "definition": "struct IntegrityPolicy { array blocked_destinations; array sources; array endpoints; array parsing_errors;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/integrity_policy.mojom;l=10" + }, + "network.mojom.Destination": { + "definition": "enum Destination { kScript, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/integrity_policy.mojom;l=12" + }, + "network.mojom.Source": { + "definition": "enum Source { kInline, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/integrity_policy.mojom;l=17" + }, + "network.mojom.IPAddress": { + "definition": "struct IPAddress { array address_bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ip_address.mojom;l=9" + }, + "network.mojom.IPAddressSpace": { + "definition": "enum IPAddressSpace { kLoopback, kLocal, kPublic, kUnknown, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ip_address_space.mojom;l=10" + }, + "network.mojom.IPEndPoint": { + "definition": "struct IPEndPoint { IPAddress address; uint16 port;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ip_endpoint.mojom;l=10" + }, + "network.mojom.IsolationInfo": { + "definition": "struct IsolationInfo { IsolationInfoRequestType request_type; url.mojom.Origin? top_frame_origin; url.mojom.Origin? frame_origin; mojo_base.mojom.UnguessableToken? nonce; SiteForCookies site_for_cookies; NetworkIsolationPartition network_isolation_partition; IsolationInfoFrameAncestorRelation? frame_ancestor_relation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/isolation_info.mojom;l=30" + }, + "network.mojom.IsolationInfoRequestType": { + "definition": "enum IsolationInfoRequestType { kMainFrame, kSubFrame, kOther,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/isolation_info.mojom;l=15" + }, + "network.mojom.IsolationInfoFrameAncestorRelation": { + "definition": "enum IsolationInfoFrameAncestorRelation { kSameOrigin, kSameSite, kCrossSite,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/isolation_info.mojom;l=23" + }, + "network.mojom.PinSet": { + "definition": "struct PinSet { string name; array static_spki_hashes; array bad_static_spki_hashes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/key_pinning.mojom;l=10" + }, + "network.mojom.PinSetInfo": { + "definition": "struct PinSetInfo { string hostname; string pinset_name; bool include_subdomains;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/key_pinning.mojom;l=19" + }, + "network.mojom.PinList": { + "definition": "struct PinList { array pinsets; array host_pins;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/key_pinning.mojom;l=28" + }, + "network.mojom.LinkHeader": { + "definition": "struct LinkHeader { url.mojom.Url href; LinkRelAttribute rel; LinkAsAttribute as = LinkAsAttribute.kUnspecified; CrossOriginAttribute cross_origin = CrossOriginAttribute.kUnspecified; FetchPriorityAttribute fetch_priority = FetchPriorityAttribute.kAuto; string? mime_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/link_header.mojom;l=44" + }, + "network.mojom.LinkRelAttribute": { + "definition": "enum LinkRelAttribute { kDnsPrefetch, kPreconnect, kPreload, kModulePreload,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/link_header.mojom;l=11" + }, + "network.mojom.LinkAsAttribute": { + "definition": "enum LinkAsAttribute { kUnspecified, kFont, kImage, kScript, kStyleSheet, kFetch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/link_header.mojom;l=25" + }, + "network.mojom.CrossOriginAttribute": { + "definition": "enum CrossOriginAttribute { kUnspecified, kAnonymous, kUseCredentials,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/link_header.mojom;l=36" + }, + "network.mojom.LoadTimingInfoConnectTiming": { + "definition": "struct LoadTimingInfoConnectTiming { mojo_base.mojom.TimeTicks domain_lookup_start; mojo_base.mojom.TimeTicks domain_lookup_end; mojo_base.mojom.TimeTicks connect_start; mojo_base.mojom.TimeTicks connect_end; mojo_base.mojom.TimeTicks ssl_start; mojo_base.mojom.TimeTicks ssl_end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/load_timing_info.mojom;l=10" + }, + "network.mojom.LoadTimingInfo": { + "definition": "struct LoadTimingInfo { bool socket_reused; uint32 socket_log_id; mojo_base.mojom.Time request_start_time; mojo_base.mojom.TimeTicks request_start; mojo_base.mojom.TimeTicks proxy_resolve_start; mojo_base.mojom.TimeTicks proxy_resolve_end; LoadTimingInfoConnectTiming connect_timing; mojo_base.mojom.TimeTicks send_start; mojo_base.mojom.TimeTicks send_end; mojo_base.mojom.TimeTicks receive_headers_start; mojo_base.mojom.TimeTicks receive_headers_end; mojo_base.mojom.TimeTicks receive_non_informational_headers_start; mojo_base.mojom.TimeTicks first_early_hints_time; mojo_base.mojom.TimeTicks push_start; mojo_base.mojom.TimeTicks push_end; mojo_base.mojom.TimeTicks service_worker_start_time; mojo_base.mojom.TimeTicks service_worker_ready_time; mojo_base.mojom.TimeTicks service_worker_fetch_start; mojo_base.mojom.TimeTicks service_worker_respond_with_settled; mojo_base.mojom.TimeTicks service_worker_router_evaluation_start; mojo_base.mojom.TimeTicks service_worker_cache_lookup_start;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/load_timing_info.mojom;l=20" + }, + "network.mojom.LoadTimingInternalInfo": { + "definition": "struct LoadTimingInternalInfo { mojo_base.mojom.TimeDelta create_stream_delay; mojo_base.mojom.TimeDelta connected_callback_delay; mojo_base.mojom.TimeDelta initialize_stream_delay; SessionSource? session_source; AdvertisedAltSvcState advertised_alt_svc_state; bool http_network_session_quic_enabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/load_timing_internal_info.mojom;l=27" + }, + "network.mojom.SessionSource": { + "definition": "enum SessionSource { kNew, kExisting,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/load_timing_internal_info.mojom;l=11" + }, + "network.mojom.AdvertisedAltSvcState": { + "definition": "enum AdvertisedAltSvcState { kUnknown, kQuicNotBroken, kQuicBroken,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/load_timing_internal_info.mojom;l=19" + }, + "network.mojom.MdnsResponder.CreateNameForAddress": { + "definition": "CreateNameForAddress(IPAddress address) => (string name, bool announcement_scheduled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/mdns_responder.mojom;l=34" + }, + "network.mojom.MdnsResponder.RemoveNameForAddress": { + "definition": "RemoveNameForAddress(IPAddress address) => (bool removed, bool goodbye_scheduled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/mdns_responder.mojom;l=48" + }, + "network.mojom.MutableNetworkTrafficAnnotationTag": { + "definition": "struct MutableNetworkTrafficAnnotationTag { uint32 unique_id_hash_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/mutable_network_traffic_annotation_tag.mojom;l=11" + }, + "network.mojom.MutablePartialNetworkTrafficAnnotationTag": { + "definition": "struct MutablePartialNetworkTrafficAnnotationTag { uint32 unique_id_hash_code; uint32 completing_id_hash_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/mutable_partial_network_traffic_annotation_tag.mojom;l=11" + }, + "network.mojom.NetLogExporter.Start": { + "definition": "Start( mojo_base.mojom.File destination, mojo_base.mojom.DictionaryValue extra_constants, NetLogCaptureMode capture_mode, uint64 max_file_size) => (int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/net_log.mojom;l=47" + }, + "network.mojom.NetLogExporter.Stop": { + "definition": "Stop(mojo_base.mojom.DictionaryValue polled_values) => (int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/net_log.mojom;l=59" + }, + "network.mojom.NetLogProxySource.UpdateCaptureModes": { + "definition": "UpdateCaptureModes(uint8 modes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/net_log.mojom;l=75" + }, + "network.mojom.NetLogProxySink.AddEntry": { + "definition": "AddEntry(/*NetLogEventType*/ uint32 type, NetLogSource net_log_source, NetLogEventPhase phase, mojo_base.mojom.TimeTicks time, mojo_base.mojom.DictionaryValue params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/net_log.mojom;l=85" + }, + "network.mojom.NetLogCaptureMode": { + "definition": "enum NetLogCaptureMode { HEAVILY_REDACTED, DEFAULT, INCLUDE_PRIVACY_INFO, EVERYTHING, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/net_log.mojom;l=13" + }, + "network.mojom.NetLogEventPhase": { + "definition": "enum NetLogEventPhase { BEGIN, END, NONE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/net_log.mojom;l=64" + }, + "network.mojom.NetworkAnnotationMonitor.Report": { + "definition": "Report(int32 hash_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_annotation_monitor.mojom;l=12" + }, + "network.mojom.EmptyNetworkAnonymizationKey": { + "definition": "struct EmptyNetworkAnonymizationKey {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_anonymization_key.mojom;l=12" + }, + "network.mojom.NonEmptyNetworkAnonymizationKey": { + "definition": "struct NonEmptyNetworkAnonymizationKey { SchemefulSite top_frame_site; bool is_cross_site; mojo_base.mojom.UnguessableToken? nonce; NetworkIsolationPartition network_isolation_partition;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_anonymization_key.mojom;l=15" + }, + "network.mojom.NetworkAnonymizationKey": { + "definition": "union NetworkAnonymizationKey { EmptyNetworkAnonymizationKey empty; NonEmptyNetworkAnonymizationKey non_empty;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_anonymization_key.mojom;l=25" + }, + "network.mojom.NetworkChangeManagerClient.OnInitialConnectionType": { + "definition": "OnInitialConnectionType(ConnectionType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_change_manager.mojom;l=75" + }, + "network.mojom.NetworkChangeManagerClient.OnNetworkChanged": { + "definition": "OnNetworkChanged(ConnectionType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_change_manager.mojom;l=93" + }, + "network.mojom.NetworkChangeManager.RequestNotifications": { + "definition": "RequestNotifications( pending_remote client_remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_change_manager.mojom;l=99" + }, + "network.mojom.NetworkChangeManager.BindNetworkInterfaceChangeListener": { + "definition": "[EnableIf=use_network_interface_change_listener] BindNetworkInterfaceChangeListener( pending_associated_receiver notifier);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_change_manager.mojom;l=120" + }, + "network.mojom.ConnectionType": { + "definition": "enum ConnectionType { CONNECTION_UNKNOWN = 0, CONNECTION_ETHERNET = 1, CONNECTION_WIFI = 2, CONNECTION_2G = 3, CONNECTION_3G = 4, CONNECTION_4G = 5, CONNECTION_NONE = 6, CONNECTION_BLUETOOTH = 7, CONNECTION_5G = 8, CONNECTION_LAST = CONNECTION_5G};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_change_manager.mojom;l=10" + }, + "network.mojom.ConnectionSubtype": { + "definition": "enum ConnectionSubtype { SUBTYPE_UNKNOWN = 0, SUBTYPE_NONE, SUBTYPE_OTHER, SUBTYPE_GSM, SUBTYPE_IDEN, SUBTYPE_CDMA, SUBTYPE_1XRTT, SUBTYPE_GPRS, SUBTYPE_EDGE, SUBTYPE_UMTS, SUBTYPE_EVDO_REV_0, SUBTYPE_EVDO_REV_A, SUBTYPE_HSPA, SUBTYPE_EVDO_REV_B, SUBTYPE_HSDPA, SUBTYPE_HSUPA, SUBTYPE_EHRPD, SUBTYPE_HSPAP, SUBTYPE_LTE, SUBTYPE_LTE_ADVANCED, SUBTYPE_BLUETOOTH_1_2, SUBTYPE_BLUETOOTH_2_1, SUBTYPE_BLUETOOTH_3_0, SUBTYPE_BLUETOOTH_4_0, SUBTYPE_ETHERNET, SUBTYPE_FAST_ETHERNET, SUBTYPE_GIGABIT_ETHERNET, SUBTYPE_10_GIGABIT_ETHERNET, SUBTYPE_WIFI_B, SUBTYPE_WIFI_G, SUBTYPE_WIFI_N, SUBTYPE_WIFI_AC, SUBTYPE_WIFI_AD, SUBTYPE_LAST = SUBTYPE_WIFI_AD};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_change_manager.mojom;l=25" + }, + "network.mojom.IPAddressChangeType": { + "definition": "enum IPAddressChangeType { IP_ADDRESS_CHANGE_NONE = 0, IP_ADDRESS_CHANGE_NORMAL, IP_ADDRESS_CHANGE_IPV6_TEMPADDR, IP_ADDRESS_CHANGE_LAST = IP_ADDRESS_CHANGE_IPV6_TEMPADDR};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_change_manager.mojom;l=64" + }, + "network.mojom.CustomProxyConnectionObserver.OnFallback": { + "definition": "OnFallback(ProxyChain bad_chain, int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=132" + }, + "network.mojom.CustomProxyConnectionObserver.OnTunnelHeadersReceived": { + "definition": "OnTunnelHeadersReceived(ProxyChain proxy_chain, uint64 chain_index, HttpResponseHeaders response_headers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=136" + }, + "network.mojom.CustomProxyConfigClient.OnCustomProxyConfigUpdated": { + "definition": "OnCustomProxyConfigUpdated(CustomProxyConfig proxy_config) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=155" + }, + "network.mojom.TrustedHeaderClient.OnBeforeSendHeaders": { + "definition": "OnBeforeSendHeaders(HttpRequestHeaders headers) => (int32 result, HttpRequestHeaders? headers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=161" + }, + "network.mojom.TrustedHeaderClient.OnHeadersReceived": { + "definition": "OnHeadersReceived(string headers, IPEndPoint remote_endpoint) => (int32 result, string? headers, url.mojom.Url? preserve_fragment_on_redirect_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=173" + }, + "network.mojom.TrustedURLLoaderHeaderClient.OnLoaderCreated": { + "definition": "OnLoaderCreated( int32 request_id, pending_receiver header_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=185" + }, + "network.mojom.TrustedURLLoaderHeaderClient.OnLoaderForCorsPreflightCreated": { + "definition": "OnLoaderForCorsPreflightCreated( URLRequest request, pending_receiver header_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=190" + }, + "network.mojom.DurableMessageCollector.Configure": { + "definition": "Configure(NetworkDurableMessageConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=983" + }, + "network.mojom.DurableMessageCollector.Retrieve": { + "definition": "Retrieve(string devtools_request_id) => (mojo_base.mojom.BigBuffer? message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=987" + }, + "network.mojom.NetworkContext.SetClient": { + "definition": "SetClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1014" + }, + "network.mojom.NetworkContext.CreateURLLoaderFactory": { + "definition": "CreateURLLoaderFactory( pending_receiver url_loader_factory, URLLoaderFactoryParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1017" + }, + "network.mojom.NetworkContext.ResetURLLoaderFactories": { + "definition": "ResetURLLoaderFactories();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1022" + }, + "network.mojom.NetworkContext.GetViaObliviousHttp": { + "definition": "GetViaObliviousHttp(ObliviousHttpRequest request, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1026" + }, + "network.mojom.NetworkContext.GetCookieManager": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] GetCookieManager(pending_receiver cookie_manager);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1033" + }, + "network.mojom.NetworkContext.GetRestrictedCookieManager": { + "definition": "GetRestrictedCookieManager( pending_receiver restricted_cookie_manager, RestrictedCookieManagerRole role, url.mojom.Origin origin, IsolationInfo isolation_info, CookieSettingOverrides cookie_setting_overrides, CookieSettingOverrides devtools_cookie_setting_overrides, pending_remote? cookie_observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1050" + }, + "network.mojom.NetworkContext.GetTrustTokenQueryAnswerer": { + "definition": "GetTrustTokenQueryAnswerer( pending_receiver trust_token_query_answerer, url.mojom.Origin top_frame_origin);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1074" + }, + "network.mojom.NetworkContext.ClearTrustTokenData": { + "definition": "ClearTrustTokenData(ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1082" + }, + "network.mojom.NetworkContext.ClearTrustTokenSessionOnlyData": { + "definition": "ClearTrustTokenSessionOnlyData() => (bool any_data_deleted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1086" + }, + "network.mojom.NetworkContext.GetStoredTrustTokenCounts": { + "definition": "GetStoredTrustTokenCounts() => (array tokens);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1089" + }, + "network.mojom.NetworkContext.GetPrivateStateTokenRedemptionRecords": { + "definition": "GetPrivateStateTokenRedemptionRecords() => (map> issuer_redemption_record_map);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1092" + }, + "network.mojom.NetworkContext.GetIpProxyStatus": { + "definition": "GetIpProxyStatus() => (ip_protection.mojom.IpProxyStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1101" + }, + "network.mojom.NetworkContext.SetBypassIpProtectionProxy": { + "definition": "SetBypassIpProtectionProxy(bool bypass_proxy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1108" + }, + "network.mojom.NetworkContext.DeleteStoredTrustTokens": { + "definition": "DeleteStoredTrustTokens(url.mojom.Origin issuer) => (DeleteStoredTrustTokensStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1114" + }, + "network.mojom.NetworkContext.SetBlockTrustTokens": { + "definition": "SetBlockTrustTokens(bool block);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1118" + }, + "network.mojom.NetworkContext.SetTrackingProtectionContentSetting": { + "definition": "SetTrackingProtectionContentSetting( array settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1122" + }, + "network.mojom.NetworkContext.ClearNetworkingHistoryBetween": { + "definition": "ClearNetworkingHistoryBetween( mojo_base.mojom.Time start_time, mojo_base.mojom.Time end_time) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1132" + }, + "network.mojom.NetworkContext.ClearHttpCache": { + "definition": "ClearHttpCache(mojo_base.mojom.Time start_time, mojo_base.mojom.Time end_time, ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1140" + }, + "network.mojom.NetworkContext.ComputeHttpCacheSize": { + "definition": "ComputeHttpCacheSize( mojo_base.mojom.Time start_time, mojo_base.mojom.Time end_time) => (bool is_upper_bound, int64 size_or_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1155" + }, + "network.mojom.NetworkContext.NotifyBrowserIdle": { + "definition": "NotifyBrowserIdle();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1162" + }, + "network.mojom.NetworkContext.NotifyExternalCacheHit": { + "definition": "NotifyExternalCacheHit(url.mojom.Url url, string http_method, NetworkIsolationKey key, bool include_credentials);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1172" + }, + "network.mojom.NetworkContext.ClearHostCache": { + "definition": "ClearHostCache(ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1183" + }, + "network.mojom.NetworkContext.ClearHttpAuthCache": { + "definition": "ClearHttpAuthCache(mojo_base.mojom.Time start_time, mojo_base.mojom.Time end_time, ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1192" + }, + "network.mojom.NetworkContext.ClearCorsPreflightCache": { + "definition": "ClearCorsPreflightCache(ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1205" + }, + "network.mojom.NetworkContext.ClearReportingCacheReports": { + "definition": "ClearReportingCacheReports(ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1212" + }, + "network.mojom.NetworkContext.ClearReportingCacheClients": { + "definition": "ClearReportingCacheClients(ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1219" + }, + "network.mojom.NetworkContext.ClearNetworkErrorLogging": { + "definition": "ClearNetworkErrorLogging(ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1226" + }, + "network.mojom.NetworkContext.ClearDomainReliability": { + "definition": "ClearDomainReliability( ClearDataFilter? filter, DomainReliabilityClearMode mode) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1235" + }, + "network.mojom.NetworkContext.ClearSharedDictionaryCache": { + "definition": "ClearSharedDictionaryCache(mojo_base.mojom.Time start_time, mojo_base.mojom.Time end_time, ClearDataFilter? filter) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1243" + }, + "network.mojom.NetworkContext.ClearSharedDictionaryCacheForIsolationKey": { + "definition": "ClearSharedDictionaryCacheForIsolationKey( SharedDictionaryIsolationKey isolation_key) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1249" + }, + "network.mojom.NetworkContext.SetDocumentReportingEndpoints": { + "definition": "SetDocumentReportingEndpoints( mojo_base.mojom.UnguessableToken reporting_source, url.mojom.Origin origin, IsolationInfo isolation_info, map endpoints);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1267" + }, + "network.mojom.NetworkContext.SetEnterpriseReportingEndpoints": { + "definition": "SetEnterpriseReportingEndpoints(map endpoints);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1277" + }, + "network.mojom.NetworkContext.SendReportsAndRemoveSource": { + "definition": "SendReportsAndRemoveSource( mojo_base.mojom.UnguessableToken reporting_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1283" + }, + "network.mojom.NetworkContext.QueueReport": { + "definition": "QueueReport(string type, string group, url.mojom.Url url, mojo_base.mojom.UnguessableToken? reporting_source, NetworkAnonymizationKey network_anonymization_key, mojo_base.mojom.DictionaryValue body);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1308" + }, + "network.mojom.NetworkContext.QueueEnterpriseReport": { + "definition": "QueueEnterpriseReport(string type, string group, url.mojom.Url url, mojo_base.mojom.DictionaryValue body);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1314" + }, + "network.mojom.NetworkContext.QueueSignedExchangeReport": { + "definition": "QueueSignedExchangeReport(SignedExchangeReport report, NetworkAnonymizationKey network_anonymization_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1325" + }, + "network.mojom.NetworkContext.CloseAllConnections": { + "definition": "CloseAllConnections() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1329" + }, + "network.mojom.NetworkContext.CloseIdleConnections": { + "definition": "CloseIdleConnections() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1333" + }, + "network.mojom.NetworkContext.SetNetworkConditions": { + "definition": "SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, array conditions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1338" + }, + "network.mojom.NetworkContext.EnableDurableMessageCollector": { + "definition": "EnableDurableMessageCollector( mojo_base.mojom.UnguessableToken throttling_profile_id, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1342" + }, + "network.mojom.NetworkContext.SetAcceptLanguage": { + "definition": "SetAcceptLanguage(string new_accept_language);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1347" + }, + "network.mojom.NetworkContext.SetEnableReferrers": { + "definition": "SetEnableReferrers(bool enable_referrers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1350" + }, + "network.mojom.NetworkContext.SetCTPolicy": { + "definition": "[EnableIf=is_ct_supported] SetCTPolicy(CTPolicy ct_policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1356" + }, + "network.mojom.NetworkContext.CreateUDPSocket": { + "definition": "CreateUDPSocket(pending_receiver receiver, pending_remote? listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1364" + }, + "network.mojom.NetworkContext.CreateRestrictedUDPSocket": { + "definition": "CreateRestrictedUDPSocket( IPEndPoint addr, RestrictedUDPSocketMode mode, MutableNetworkTrafficAnnotationTag traffic_annotation, RestrictedUDPSocketParams? params, pending_receiver receiver, pending_remote? listener, bool allow_multicast) => (int32 result, IPEndPoint? local_addr_out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1385" + }, + "network.mojom.NetworkContext.CreateTCPServerSocket": { + "definition": "CreateTCPServerSocket(IPEndPoint local_addr, TCPServerSocketOptions options, MutableNetworkTrafficAnnotationTag traffic_annotation, pending_receiver socket) => (int32 result, IPEndPoint? local_addr_out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1405" + }, + "network.mojom.NetworkContext.CreateTCPConnectedSocket": { + "definition": "CreateTCPConnectedSocket( IPEndPoint? local_addr, AddressList remote_addr_list, TCPConnectedSocketOptions? tcp_connected_socket_options, MutableNetworkTrafficAnnotationTag traffic_annotation, pending_receiver socket, pending_remote? observer) => (int32 result, IPEndPoint? local_addr, IPEndPoint? peer_addr, handle? receive_stream, handle? send_stream);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1426" + }, + "network.mojom.NetworkContext.CreateTCPBoundSocket": { + "definition": "CreateTCPBoundSocket(IPEndPoint local_addr, MutableNetworkTrafficAnnotationTag traffic_annotation, pending_receiver socket) => (int32 result, IPEndPoint? local_addr);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1450" + }, + "network.mojom.NetworkContext.CreateProxyResolvingSocketFactory": { + "definition": "CreateProxyResolvingSocketFactory( pending_receiver factory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1460" + }, + "network.mojom.NetworkContext.LookUpProxyForURL": { + "definition": "LookUpProxyForURL(url.mojom.Url url, NetworkAnonymizationKey network_anonymization_key, pending_remote proxy_lookup_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1467" + }, + "network.mojom.NetworkContext.ForceReloadProxyConfig": { + "definition": "ForceReloadProxyConfig() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1472" + }, + "network.mojom.NetworkContext.ClearBadProxiesCache": { + "definition": "ClearBadProxiesCache() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1475" + }, + "network.mojom.NetworkContext.CreateWebSocket": { + "definition": "CreateWebSocket( url.mojom.Url url, array requested_protocols, SiteForCookies site_for_cookies, StorageAccessApiStatus storage_access_api_status, IsolationInfo isolation_info, array additional_headers, int32 process_id, url.mojom.Origin origin, ClientSecurityState client_security_state, uint32 options, MutableNetworkTrafficAnnotationTag traffic_annotation, pending_remote handshake_client, pending_remote? url_loader_network_observer, pending_remote? auth_handler, pending_remote? header_client, mojo_base.mojom.UnguessableToken? throttling_profile_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1516" + }, + "network.mojom.NetworkContext.CreateWebTransport": { + "definition": "CreateWebTransport( url.mojom.Url url, url.mojom.Origin origin, NetworkAnonymizationKey network_anonymization_key, array fingerprints, array application_protocols, pending_remote handshake_client, pending_remote? url_loader_network_observer, ClientSecurityState client_security_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1542" + }, + "network.mojom.NetworkContext.CreateNetLogExporter": { + "definition": "CreateNetLogExporter(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1557" + }, + "network.mojom.NetworkContext.PreconnectSockets": { + "definition": "PreconnectSockets( uint32 num_streams, url.mojom.Url url, network.mojom.CredentialsMode credentials_mode, NetworkAnonymizationKey network_anonymization_key, MutableNetworkTrafficAnnotationTag traffic_annotation, ConnectionKeepAliveConfig? keepalive_config, pending_remote? observer_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1569" + }, + "network.mojom.NetworkContext.CreateP2PSocketManager": { + "definition": "[EnableIf=is_p2p_enabled] CreateP2PSocketManager( NetworkAnonymizationKey network_anonymization_key, pending_remote client, pending_receiver trusted_socket_manager, pending_receiver socket_manager);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1582" + }, + "network.mojom.NetworkContext.CreateMdnsResponder": { + "definition": "CreateMdnsResponder(pending_receiver responder_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1590" + }, + "network.mojom.NetworkContext.ResolveHost": { + "definition": "ResolveHost(HostResolverHost host, NetworkAnonymizationKey network_anonymization_key, ResolveHostParameters? optional_parameters, pending_remote response_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1609" + }, + "network.mojom.NetworkContext.CreateHostResolver": { + "definition": "CreateHostResolver(DnsConfigOverrides? config_overrides, pending_receiver host_resolver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1629" + }, + "network.mojom.NetworkContext.VerifyCert": { + "definition": "VerifyCert(X509Certificate certificate, HostPortPair host_port, string ocsp_response, string sct_list) => (int32 error_code, CertVerifyResult cv_result, bool pkp_bypassed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1633" + }, + "network.mojom.NetworkContext.VerifyCertForSignedExchange": { + "definition": "VerifyCertForSignedExchange(X509Certificate certificate, HostPortPair host_port, string ocsp_response, string sct_list) => (int32 error_code, CertVerifyResult cv_result, bool pkp_bypassed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1641" + }, + "network.mojom.NetworkContext.Verify2QwacCertBinding": { + "definition": "Verify2QwacCertBinding( string binding, string hostname, X509Certificate tls_certificate) => (X509Certificate verified_cert);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1650" + }, + "network.mojom.NetworkContext.AddHSTS": { + "definition": "AddHSTS(string host, mojo_base.mojom.Time expiry, bool include_subdomains) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1656" + }, + "network.mojom.NetworkContext.IsHSTSActiveForHost": { + "definition": "IsHSTSActiveForHost(string host, bool is_top_level_nav) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1663" + }, + "network.mojom.NetworkContext.GetHSTSState": { + "definition": "GetHSTSState(string domain) => (mojo_base.mojom.DictionaryValue state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1667" + }, + "network.mojom.NetworkContext.SetCorsOriginAccessListsForOrigin": { + "definition": "SetCorsOriginAccessListsForOrigin(url.mojom.Origin source_origin, array allow_patterns, array block_patterns) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1678" + }, + "network.mojom.NetworkContext.DeleteDynamicDataForHost": { + "definition": "DeleteDynamicDataForHost(string host) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1686" + }, + "network.mojom.NetworkContext.SetSplitAuthCacheByNetworkAnonymizationKey": { + "definition": "SetSplitAuthCacheByNetworkAnonymizationKey( bool split_auth_cache_by_network_anonymization_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1691" + }, + "network.mojom.NetworkContext.SaveHttpAuthCacheProxyEntries": { + "definition": "SaveHttpAuthCacheProxyEntries() => (mojo_base.mojom.UnguessableToken cache_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1703" + }, + "network.mojom.NetworkContext.LoadHttpAuthCacheProxyEntries": { + "definition": "LoadHttpAuthCacheProxyEntries(mojo_base.mojom.UnguessableToken cache_key) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1709" + }, + "network.mojom.NetworkContext.AddAuthCacheEntry": { + "definition": "AddAuthCacheEntry(AuthChallengeInfo challenge, NetworkAnonymizationKey network_anonymization_key, AuthCredentials credentials) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1718" + }, + "network.mojom.NetworkContext.SetCorsNonWildcardRequestHeadersSupport": { + "definition": "SetCorsNonWildcardRequestHeadersSupport(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1725" + }, + "network.mojom.NetworkContext.EnableStaticKeyPinningForTesting": { + "definition": "EnableStaticKeyPinningForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1738" + }, + "network.mojom.NetworkContext.VerifyCertificateForTesting": { + "definition": "VerifyCertificateForTesting(X509Certificate certificate, string hostname, string ocsp_response, string sct_list) => (int32 error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1741" + }, + "network.mojom.NetworkContext.GetTrustAnchorIDsForTesting": { + "definition": "GetTrustAnchorIDsForTesting() => (array> trust_anchor_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1745" + }, + "network.mojom.NetworkContext.AddDomainReliabilityContextForTesting": { + "definition": "AddDomainReliabilityContextForTesting( url.mojom.Origin origin, url.mojom.Url upload_url) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1749" + }, + "network.mojom.NetworkContext.ForceDomainReliabilityUploadsForTesting": { + "definition": "ForceDomainReliabilityUploadsForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1754" + }, + "network.mojom.NetworkContext.SetSCTAuditingMode": { + "definition": "[EnableIf=is_ct_supported] SetSCTAuditingMode(SCTAuditingMode mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1757" + }, + "network.mojom.NetworkContext.AddReportingApiObserver": { + "definition": "[EnableIf=enable_reporting] AddReportingApiObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1762" + }, + "network.mojom.NetworkContext.GetSharedDictionaryUsageInfo": { + "definition": "GetSharedDictionaryUsageInfo() => (array usage_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1766" + }, + "network.mojom.NetworkContext.GetSharedDictionaryInfo": { + "definition": "GetSharedDictionaryInfo(SharedDictionaryIsolationKey isolation_key) => (array dictionaries);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1770" + }, + "network.mojom.NetworkContext.GetSharedDictionaryOriginsBetween": { + "definition": "GetSharedDictionaryOriginsBetween( mojo_base.mojom.Time start_time, mojo_base.mojom.Time end_time) => (array origins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1775" + }, + "network.mojom.NetworkContext.SetSharedDictionaryCacheMaxSize": { + "definition": "SetSharedDictionaryCacheMaxSize(uint64 cache_max_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1780" + }, + "network.mojom.NetworkContext.PreloadSharedDictionaryInfoForDocument": { + "definition": "PreloadSharedDictionaryInfoForDocument( array urls, pending_receiver preload_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1783" + }, + "network.mojom.NetworkContext.HasPreloadedSharedDictionaryInfoForTesting": { + "definition": "HasPreloadedSharedDictionaryInfoForTesting() => (bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1788" + }, + "network.mojom.NetworkContext.FlushCachedClientCertIfNeeded": { + "definition": "FlushCachedClientCertIfNeeded( HostPortPair host, X509Certificate certificate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1792" + }, + "network.mojom.NetworkContext.FlushMatchingCachedClientCert": { + "definition": "FlushMatchingCachedClientCert(X509Certificate certificate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1797" + }, + "network.mojom.NetworkContext.SetCookieDeprecationLabel": { + "definition": "SetCookieDeprecationLabel(string? label);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1800" + }, + "network.mojom.NetworkContext.RevokeNetworkForNonces": { + "definition": "RevokeNetworkForNonces(array nonces) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1815" + }, + "network.mojom.NetworkContext.ClearNonces": { + "definition": "ClearNonces(array nonces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1826" + }, + "network.mojom.NetworkContext.ExemptUrlFromNetworkRevocationForNonce": { + "definition": "ExemptUrlFromNetworkRevocationForNonce( url.mojom.Url exempted_url, mojo_base.mojom.UnguessableToken nonce) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1833" + }, + "network.mojom.NetworkContext.Prefetch": { + "definition": "Prefetch(int32 request_id, uint32 options, URLRequest request, MutableNetworkTrafficAnnotationTag traffic_annotation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1841" + }, + "network.mojom.NetworkContext.GetBoundNetworkForTesting": { + "definition": "GetBoundNetworkForTesting() => (int64 bound_network);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1850" + }, + "network.mojom.NetworkContext.GetDeviceBoundSessionManager": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] GetDeviceBoundSessionManager( pending_receiver device_bound_session_manager);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1855" + }, + "network.mojom.NetworkContext.AddQuicHints": { + "definition": "AddQuicHints(array origins, NetworkAnonymizationKey network_anonymization_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1861" + }, + "network.mojom.CustomProxyConfig": { + "definition": "struct CustomProxyConfig { ProxyRules rules; bool should_override_existing_config = false; bool allow_non_idempotent_methods = false; HttpRequestHeaders connect_tunnel_headers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=105" + }, + "network.mojom.CertVerifierServiceRemoteParams": { + "definition": "struct CertVerifierServiceRemoteParams { pending_remote? cert_verifier_service; pending_receiver? cert_verifier_service_client_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=143" + }, + "network.mojom.HttpAuthStaticNetworkContextParams": { + "definition": "struct HttpAuthStaticNetworkContextParams { DefaultCredentials allow_default_credentials = DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=195" + }, + "network.mojom.CTPolicy": { + "definition": "struct CTPolicy { array excluded_hosts; array excluded_spkis;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=203" + }, + "network.mojom.NetworkContextFilePaths": { + "definition": "struct NetworkContextFilePaths { TransferableDirectory? shared_dictionary_directory; TransferableDirectory? http_cache_directory; TransferableDirectory? no_vary_search_directory; TransferableDirectory data_directory; mojo_base.mojom.FilePath? unsandboxed_data_path; mojo_base.mojom.FilePath? cookie_database_name; mojo_base.mojom.FilePath? device_bound_sessions_database_name; mojo_base.mojom.FilePath? trust_token_database_name; mojo_base.mojom.FilePath? http_server_properties_file_name; mojo_base.mojom.FilePath? transport_security_persister_file_name; mojo_base.mojom.FilePath? reporting_and_nel_store_database_name; mojo_base.mojom.FilePath? sct_auditing_pending_reports_file_name; bool trigger_migration = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=208" + }, + "network.mojom.SocketBrokerRemotes": { + "definition": "struct SocketBrokerRemotes { pending_remote client; pending_remote server;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=314" + }, + "network.mojom.NetworkContextParams": { + "definition": "struct NetworkContextParams { string user_agent; string accept_language; bool enable_brotli = true; bool enable_zstd = false; bool enable_referrers = true; bool validate_referrer_policy_on_initial_request = true; pending_remote? proxy_resolver_factory; [EnableIf=is_win] pending_remote? system_proxy_resolver; [EnableIf=is_chromeos] pending_remote? dhcp_wpad_url_client; bool enable_encrypted_cookies = true; bool restore_old_session_cookies = false; bool persist_session_cookies = false; bool http_cache_enabled = true; int32 http_cache_max_size = 0; pending_remote? http_cache_file_operations_factory; [EnableIf=is_android] bool check_clear_text_permitted = false; bool disable_idle_sockets_close_on_memory_pressure = false; SSLConfig? initial_ssl_config; pending_receiver? ssl_config_client_receiver; ProxyConfigWithAnnotation? initial_proxy_config; pending_receiver? proxy_config_client_receiver; CustomProxyConfig? initial_custom_proxy_config; pending_receiver? custom_proxy_config_client_receiver; pending_remote? custom_proxy_connection_observer_remote; pending_remote? proxy_config_poller_client; pending_remote? proxy_error_client; [EnableIf=is_win] SocketBrokerRemotes? socket_brokers; pending_remote? ip_protection_core_host; pending_receiver? ip_protection_control; bool enable_ip_protection = false; bool ip_protection_incognito = false; map> initial_ip_protection_tokens; mojo_base.mojom.FilePath? ip_protection_data_directory; bool pac_quick_check_enabled = true; bool enable_certificate_reporting = false; [EnableIf=is_ct_supported] bool enforce_chrome_ct_policy = false; [EnableIf=is_ct_supported] SCTAuditingMode sct_auditing_mode = SCTAuditingMode.kDisabled; [EnableIf=is_ct_supported] CTPolicy? ct_policy; CertVerifierServiceRemoteParams cert_verifier_params; CookieManagerParams? cookie_manager_params; [EnableIf=is_android] pending_receiver? cookie_manager; bool enable_domain_reliability = false; string domain_reliability_upload_reporter; bool discard_domain_reliablity_uploads = false; mojo_base.mojom.TimeDelta? reporting_delivery_interval; bool skip_reporting_send_permission_check = false; array cors_origin_access_list; array cors_exempt_header_list; bool allow_any_cors_exempt_header_for_browser = false; array hsts_policy_bypass_list; HttpAuthStaticNetworkContextParams? http_auth_static_network_context_params; bool reset_http_cache_backend = false; bool split_auth_cache_by_network_anonymization_key = false; bool require_network_anonymization_key = false; [EnableIf=win_permissions_validation] bool win_permissions_set = false; NetworkContextFilePaths? file_paths; bool block_trust_tokens; bool shared_dictionary_enabled = false; uint64 shared_dictionary_cache_max_size = 0; FirstPartySetsAccessDelegateParams? first_party_sets_access_delegate_params; pending_receiver? first_party_sets_access_delegate_receiver; bool acam_preflight_spec_conformant = true; string? cookie_deprecation_label; pending_remote? cookie_encryption_provider; bool device_bound_sessions_enabled = false; int64 bound_network = -1; map? enterprise_reporting_endpoints; [EnableIf=is_android] bool stale_dns_enabled = false; int64? quic_idle_connection_timeout_seconds; array tracking_protection_content_settings; bool enable_encrypted_http_cache = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=320" + }, + "network.mojom.NetworkConditions": { + "definition": "struct NetworkConditions { bool offline; mojo_base.mojom.TimeDelta latency; double download_throughput; double upload_throughput; double packet_loss; int32 packet_queue_length; bool packet_reordering; mojo_base.mojom.UnguessableToken? rule_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=664" + }, + "network.mojom.MatchedNetworkConditions": { + "definition": "struct MatchedNetworkConditions { string pattern; NetworkConditions conditions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=695" + }, + "network.mojom.NetworkDurableMessageConfig": { + "definition": "struct NetworkDurableMessageConfig { uint64 http_storage_max_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=702" + }, + "network.mojom.SharedDictionaryInfo": { + "definition": "struct SharedDictionaryInfo { string match; array match_dest; string id; url.mojom.Url dictionary_url; mojo_base.mojom.Time last_fetch_time; mojo_base.mojom.Time response_time; mojo_base.mojom.TimeDelta expiration; mojo_base.mojom.Time last_used_time; uint64 size; SHA256HashValue hash;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=710" + }, + "network.mojom.SignedExchangeReport": { + "definition": "struct SignedExchangeReport { bool success; string type; url.mojom.Url outer_url; url.mojom.Url inner_url; url.mojom.Url cert_url; string referrer; IPAddress server_ip_address; string protocol; string method; int32 status_code; mojo_base.mojom.TimeDelta elapsed_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=738" + }, + "network.mojom.URLLoaderFactoryOverride": { + "definition": "struct URLLoaderFactoryOverride { pending_remote overriding_factory; pending_receiver? overridden_factory_receiver; bool skip_cors_enabled_scheme_check = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=770" + }, + "network.mojom.URLLoaderFactoryParams": { + "definition": "struct URLLoaderFactoryParams { int32 process_id = kInvalidProcessId; url.mojom.Origin? request_initiator_origin_lock; bool is_orb_enabled = true; bool ignore_isolated_world_origin = true; bool unsafe_non_webby_initiator = false; bool disable_web_security = false; pending_remote? header_client; IsolationInfo isolation_info; bool disable_secure_dns = false; bool is_trusted = false; bool automatically_assign_isolation_info = false; mojo_base.mojom.UnguessableToken? top_frame_id; URLLoaderFactoryOverride? factory_override; ClientSecurityState? client_security_state; pending_remote? coep_reporter; pending_remote? dip_reporter; pending_remote? cookie_observer; pending_remote? trust_token_observer; pending_remote? shared_dictionary_observer; pending_remote? url_loader_network_observer; pending_remote? devtools_observer; pending_remote? device_bound_session_observer; TrustTokenOperationPolicyVerdict trust_token_issuance_policy = kPotentiallyPermit; TrustTokenOperationPolicyVerdict trust_token_redemption_policy = kPotentiallyPermit; string debug_tag = \"\"; CookieSettingOverrides cookie_setting_overrides; CookieSettingOverrides devtools_cookie_setting_overrides; bool require_cross_site_request_for_cookies = false; bool ignore_factory_reset = false; bool is_main_frame_origin_recently_accessed = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=819" + }, + "network.mojom.TrustTokenOperationPolicyVerdict": { + "definition": "enum TrustTokenOperationPolicyVerdict { kForbid, kPotentiallyPermit,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=800" + }, + "network.mojom.SCTAuditingMode": { + "definition": "enum SCTAuditingMode { kDisabled, kEnhancedSafeBrowsingReporting, kHashdance,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=806" + }, + "network.mojom.DomainReliabilityClearMode": { + "definition": "enum DomainReliabilityClearMode { CLEAR_CONTEXTS, CLEAR_BEACONS, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context.mojom;l=1229" + }, + "network.mojom.NetworkContextClient.OnFileUploadRequested": { + "definition": "OnFileUploadRequested(int32 process_id, bool async, array file_paths, url.mojom.Url destination_url) => (int32 net_error, array files);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context_client.mojom;l=27" + }, + "network.mojom.NetworkContextClient.OnCanSendReportingReports": { + "definition": "OnCanSendReportingReports(array origins) => (array origins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context_client.mojom;l=35" + }, + "network.mojom.NetworkContextClient.OnCanSendDomainReliabilityUpload": { + "definition": "OnCanSendDomainReliabilityUpload(url.mojom.Origin origin) => (bool allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context_client.mojom;l=39" + }, + "network.mojom.NetworkContextClient.OnCanSendSCTAuditingReport": { + "definition": "[EnableIf=is_ct_supported] OnCanSendSCTAuditingReport() => (bool allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context_client.mojom;l=54" + }, + "network.mojom.NetworkContextClient.OnNewSCTAuditingReportSent": { + "definition": "[EnableIf=is_ct_supported] OnNewSCTAuditingReportSent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_context_client.mojom;l=60" + }, + "network.mojom.NetworkInterface": { + "definition": "struct NetworkInterface { string name; string friendly_name; uint32 interface_index; ConnectionType type; IPAddress address; uint32 prefix_length; int32 ip_address_attributes; array? mac_address;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_interface.mojom;l=11" + }, + "network.mojom.NetworkInterfaceChangeListener.OnNetworkInterfacesChanged": { + "definition": "OnNetworkInterfacesChanged(NetworkInterfaceChangeParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_interface_change_listener.mojom;l=64" + }, + "network.mojom.IfAddrMsg": { + "definition": "struct IfAddrMsg { uint8 ifa_family; uint8 ifa_prefixlen; uint8 ifa_flags; uint8 ifa_scope; uint32 ifa_index;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_interface_change_listener.mojom;l=14" + }, + "network.mojom.AddressMap": { + "definition": "struct AddressMap { map address_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_interface_change_listener.mojom;l=24" + }, + "network.mojom.OnlineLinks": { + "definition": "struct OnlineLinks { array online_links;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_interface_change_listener.mojom;l=32" + }, + "network.mojom.InitialAddressMap": { + "definition": "struct InitialAddressMap { AddressMap address_map; OnlineLinks online_links;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_interface_change_listener.mojom;l=40" + }, + "network.mojom.NetworkInterfaceChangeParams": { + "definition": "struct NetworkInterfaceChangeParams { map address_map; map online_links;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_interface_change_listener.mojom;l=49" + }, + "network.mojom.EmptyNetworkIsolationKey": { + "definition": "struct EmptyNetworkIsolationKey {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_isolation_key.mojom;l=12" + }, + "network.mojom.NonEmptyNetworkIsolationKey": { + "definition": "struct NonEmptyNetworkIsolationKey { SchemefulSite top_frame_site; SchemefulSite frame_site; mojo_base.mojom.UnguessableToken? nonce; NetworkIsolationPartition network_isolation_partition;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_isolation_key.mojom;l=16" + }, + "network.mojom.NetworkIsolationKey": { + "definition": "union NetworkIsolationKey { EmptyNetworkIsolationKey empty; NonEmptyNetworkIsolationKey non_empty;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_isolation_key.mojom;l=34" + }, + "network.mojom.NetworkIsolationPartition": { + "definition": "enum NetworkIsolationPartition { kGeneral, kProtectedAudienceSellerWorklet, kFedCmUncredentialedRequests,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_isolation_partition.mojom;l=9" + }, + "network.mojom.AuthChallengeInfo": { + "definition": "struct AuthChallengeInfo { bool is_proxy; url.mojom.SchemeHostPort challenger; string scheme; string realm; string challenge; string path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=12" + }, + "network.mojom.AuthCredentials": { + "definition": "struct AuthCredentials;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=28" + }, + "network.mojom.CertVerifyResult": { + "definition": "struct CertVerifyResult;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=31" + }, + "network.mojom.HttpResponseHeaders": { + "definition": "struct HttpResponseHeaders;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=34" + }, + "network.mojom.HttpVersion": { + "definition": "struct HttpVersion { uint16 major_value; uint16 minor_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=36" + }, + "network.mojom.HostPortPair": { + "definition": "struct HostPortPair { string host; uint16 port;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=42" + }, + "network.mojom.ProxyServer": { + "definition": "struct ProxyServer { ProxyScheme scheme; HostPortPair? host_and_port;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=58" + }, + "network.mojom.ProxyChain": { + "definition": "struct ProxyChain { array? proxy_servers; int32 ip_protection_chain_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=66" + }, + "network.mojom.ResolveErrorInfo": { + "definition": "struct ResolveErrorInfo { int32 error; bool is_secure_network_error = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=79" + }, + "network.mojom.SSLCertRequestInfo": { + "definition": "struct SSLCertRequestInfo { HostPortPair host_and_port; bool is_proxy = false; array cert_authorities; array signature_algorithms;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=91" + }, + "network.mojom.SSLInfo": { + "definition": "struct SSLInfo;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=109" + }, + "network.mojom.X509Certificate": { + "definition": "struct X509Certificate;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=112" + }, + "network.mojom.NetLogSource": { + "definition": "struct NetLogSource { uint32 source_type; uint32 source_id; mojo_base.mojom.TimeTicks start_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=115" + }, + "network.mojom.ProxyScheme": { + "definition": "enum ProxyScheme { kInvalid, kHttp, kSocks4, kSocks5, kHttps, kQuic,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_param.mojom;l=48" + }, + "network.mojom.NetworkQualityEstimatorManagerClient.OnNetworkQualityChanged": { + "definition": "OnNetworkQualityChanged( EffectiveConnectionType type, mojo_base.mojom.TimeDelta http_rtt, mojo_base.mojom.TimeDelta transport_rtt, int32 downlink_bandwidth_kbps);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_quality_estimator_manager.mojom;l=28" + }, + "network.mojom.NetworkQualityEstimatorManager.RequestNotifications": { + "definition": "RequestNotifications( pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_quality_estimator_manager.mojom;l=39" + }, + "network.mojom.GssapiLibraryLoadObserver.OnBeforeGssapiLibraryLoad": { + "definition": "OnBeforeGssapiLibraryLoad();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=179" + }, + "network.mojom.NetworkService.SetParams": { + "definition": "SetParams(NetworkServiceParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=192" + }, + "network.mojom.NetworkService.StartNetLog": { + "definition": "StartNetLog(mojo_base.mojom.File file, uint64 max_total_size, NetLogCaptureMode capture_mode, mojo_base.mojom.DictionaryValue constants, mojo_base.mojom.TimeDelta? duration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=205" + }, + "network.mojom.NetworkService.AttachNetLogProxy": { + "definition": "AttachNetLogProxy(pending_remote proxy_source, pending_receiver proxy_sink);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=215" + }, + "network.mojom.NetworkService.SetSSLKeyLogFile": { + "definition": "SetSSLKeyLogFile(mojo_base.mojom.File file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=221" + }, + "network.mojom.NetworkService.CreateNetworkContext": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] CreateNetworkContext( pending_receiver context, NetworkContextParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=224" + }, + "network.mojom.NetworkService.ConfigureStubHostResolver": { + "definition": "ConfigureStubHostResolver(bool insecure_dns_client_enabled, bool happy_eyeballs_v3_enabled, SecureDnsMode secure_dns_mode, DnsOverHttpsConfig dns_over_https_config, bool additional_dns_types_enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=256" + }, + "network.mojom.NetworkService.DisableQuic": { + "definition": "DisableQuic();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=264" + }, + "network.mojom.NetworkService.SetUpHttpAuth": { + "definition": "SetUpHttpAuth(HttpAuthStaticParams http_auth_static_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=272" + }, + "network.mojom.NetworkService.ConfigureHttpAuthPrefs": { + "definition": "ConfigureHttpAuthPrefs(HttpAuthDynamicParams http_auth_dynamic_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=277" + }, + "network.mojom.NetworkService.SetRawHeadersAccess": { + "definition": "SetRawHeadersAccess(int32 process_id, array origins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=288" + }, + "network.mojom.NetworkService.SetMaxConnectionsPerProxyChain": { + "definition": "SetMaxConnectionsPerProxyChain(int32 max_connections);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=294" + }, + "network.mojom.NetworkService.GetNetworkChangeManager": { + "definition": "GetNetworkChangeManager( pending_receiver network_change_manager);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=297" + }, + "network.mojom.NetworkService.GetNetworkQualityEstimatorManager": { + "definition": "GetNetworkQualityEstimatorManager( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=301" + }, + "network.mojom.NetworkService.GetDnsConfigChangeManager": { + "definition": "GetDnsConfigChangeManager( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=305" + }, + "network.mojom.NetworkService.GetNetworkList": { + "definition": "GetNetworkList(uint32 policy) => (array? networks);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=311" + }, + "network.mojom.NetworkService.OnTrustStoreChanged": { + "definition": "OnTrustStoreChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=314" + }, + "network.mojom.NetworkService.OnClientCertStoreChanged": { + "definition": "OnClientCertStoreChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=317" + }, + "network.mojom.NetworkService.SetEncryptionKey": { + "definition": "SetEncryptionKey(mojo_base.mojom.ByteString encryption_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=320" + }, + "network.mojom.NetworkService.OnMemoryPressure": { + "definition": "OnMemoryPressure( mojo_base.mojom.MemoryPressureLevel memory_pressure_level);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=323" + }, + "network.mojom.NetworkService.OnPeerToPeerConnectionsCountChange": { + "definition": "OnPeerToPeerConnectionsCountChange(uint32 count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=328" + }, + "network.mojom.NetworkService.SetTrustTokenKeyCommitments": { + "definition": "SetTrustTokenKeyCommitments(string raw_commitments) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=339" + }, + "network.mojom.NetworkService.ClearSCTAuditingCache": { + "definition": "[EnableIf=is_ct_supported] ClearSCTAuditingCache();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=342" + }, + "network.mojom.NetworkService.ConfigureSCTAuditing": { + "definition": "[EnableIf=is_ct_supported] ConfigureSCTAuditing(SCTAuditingConfiguration configuration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=346" + }, + "network.mojom.NetworkService.UpdateCtLogList": { + "definition": "[EnableIf=is_ct_supported] UpdateCtLogList(array log_list) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=350" + }, + "network.mojom.NetworkService.UpdateCtKnownPopularSCTs": { + "definition": "[EnableIf=is_ct_supported] UpdateCtKnownPopularSCTs(array> sct_hashes) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=354" + }, + "network.mojom.NetworkService.SetCtEnforcementEnabled": { + "definition": "[EnableIf=is_ct_supported] SetCtEnforcementEnabled(bool enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=358" + }, + "network.mojom.NetworkService.UpdateKeyPinsList": { + "definition": "UpdateKeyPinsList(PinList pin_list, mojo_base.mojom.Time update_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=364" + }, + "network.mojom.NetworkService.BindTestInterfaceForTesting": { + "definition": "BindTestInterfaceForTesting(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=374" + }, + "network.mojom.NetworkService.SetFirstPartySets": { + "definition": "SetFirstPartySets(GlobalFirstPartySets sets);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=380" + }, + "network.mojom.NetworkService.SetExplicitlyAllowedPorts": { + "definition": "SetExplicitlyAllowedPorts(array ports);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=384" + }, + "network.mojom.NetworkService.UpdateMaskedDomainList": { + "definition": "UpdateMaskedDomainList(mojo_base.mojom.File default_file, uint64 default_file_size, mojo_base.mojom.File regular_browsing_file, uint64 regular_browsing_file_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=398" + }, + "network.mojom.NetworkService.UpdateProbabilisticRevealTokenRegistry": { + "definition": "UpdateProbabilisticRevealTokenRegistry( mojo_base.mojom.DictionaryValue registry);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=405" + }, + "network.mojom.NetworkService.ParseHeaders": { + "definition": "ParseHeaders(url.mojom.Url url, HttpResponseHeaders headers) => (ParsedHeaders parsed_headers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=416" + }, + "network.mojom.NetworkService.EnableDataUseUpdates": { + "definition": "EnableDataUseUpdates(bool enable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=422" + }, + "network.mojom.NetworkService.SetIPv6ReachabilityOverride": { + "definition": "SetIPv6ReachabilityOverride(bool reachability_override);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=426" + }, + "network.mojom.NetworkService.SetNetworkAnnotationMonitor": { + "definition": "SetNetworkAnnotationMonitor( pending_remote remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=438" + }, + "network.mojom.NetworkService.SetTpcdMetadataGrants": { + "definition": "SetTpcdMetadataGrants( array settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=443" + }, + "network.mojom.NetworkService.InterceptUrlLoaderForBodyDecoding": { + "definition": "InterceptUrlLoaderForBodyDecoding( array content_encoding_types, handle source_body, handle dest_body, pending_remote source_url_loader, pending_receiver source_url_loader_client, pending_receiver dest_url_loader, pending_remote dest_url_loader_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=458" + }, + "network.mojom.NetworkService.DecodeContentEncoding": { + "definition": "DecodeContentEncoding( array content_encoding_types, handle source_body, handle dest_body) => (int32 error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=480" + }, + "network.mojom.NetworkService.SetTLS13EarlyDataEnabled": { + "definition": "SetTLS13EarlyDataEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=486" + }, + "network.mojom.HttpAuthStaticParams": { + "definition": "struct HttpAuthStaticParams { string gssapi_library_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=51" + }, + "network.mojom.HttpAuthDynamicParams": { + "definition": "struct HttpAuthDynamicParams { array? allowed_schemes; array patterns_allowed_to_use_all_schemes; string server_allowlist; string delegate_allowlist; bool delegate_by_kdc_policy = false; bool negotiate_disable_cname_lookup = false; bool enable_negotiate_port = false; bool ntlm_v2_enabled = true; string android_negotiate_account_type; bool allow_gssapi_library_load = true; bool basic_over_http_enabled = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=60" + }, + "network.mojom.EnvironmentVariable": { + "definition": "struct EnvironmentVariable { string name; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=107" + }, + "network.mojom.NetworkServiceParams": { + "definition": "struct NetworkServiceParams { ConnectionType initial_connection_type = CONNECTION_UNKNOWN; ConnectionSubtype initial_connection_subtype = SUBTYPE_UNKNOWN; [EnableIf=use_network_interface_change_listener] InitialAddressMap? initial_address_map; array environment; pending_remote default_observer; bool first_party_sets_enabled; pending_remote? system_dns_resolver; IpProtectionProxyBypassPolicy ip_protection_proxy_bypass_policy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=113" + }, + "network.mojom.SCTAuditingConfiguration": { + "definition": "struct SCTAuditingConfiguration { double sampling_rate; mojo_base.mojom.TimeDelta log_expected_ingestion_delay; mojo_base.mojom.TimeDelta log_max_ingestion_random_delay; url.mojom.Url report_uri; url.mojom.Url hashdance_lookup_uri; MutableNetworkTrafficAnnotationTag traffic_annotation; MutableNetworkTrafficAnnotationTag hashdance_traffic_annotation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service.mojom;l=148" + }, + "network.mojom.SimpleCacheEntry.WriteData": { + "definition": "WriteData(int32 index, int32 offset, array data, bool truncate) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=46" + }, + "network.mojom.SimpleCacheEntry.ReadData": { + "definition": "ReadData(int32 index, int32 offset, uint32 length) => (array data, int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=52" + }, + "network.mojom.SimpleCacheEntry.WriteSparseData": { + "definition": "WriteSparseData(int32 offset, array data) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=58" + }, + "network.mojom.SimpleCacheEntry.ReadSparseData": { + "definition": "ReadSparseData(int32 offset, uint32 length) => (array data, int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=62" + }, + "network.mojom.SimpleCacheEntry.Close": { + "definition": "Close() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=66" + }, + "network.mojom.SimpleCacheEntryEnumerator.GetNext": { + "definition": "GetNext() => (SimpleCacheOpenEntryResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=86" + }, + "network.mojom.SimpleCache.CreateEntry": { + "definition": "CreateEntry(string key) => (pending_remote? entry, int32 error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=92" + }, + "network.mojom.SimpleCache.OpenEntry": { + "definition": "OpenEntry(string key) => (pending_remote? entry, int32 error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=96" + }, + "network.mojom.SimpleCache.DoomEntry": { + "definition": "DoomEntry(string key) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=100" + }, + "network.mojom.SimpleCache.DoomAllEntries": { + "definition": "DoomAllEntries() => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=103" + }, + "network.mojom.SimpleCache.EnumerateEntries": { + "definition": "EnumerateEntries(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=106" + }, + "network.mojom.SimpleCache.Detach": { + "definition": "Detach() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=113" + }, + "network.mojom.NetworkServiceTest.AddRules": { + "definition": "[Sync] AddRules(array rules) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=122" + }, + "network.mojom.NetworkServiceTest.SimulateNetworkChange": { + "definition": "SimulateNetworkChange(ConnectionType type) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=128" + }, + "network.mojom.NetworkServiceTest.SimulateNetworkQualityChange": { + "definition": "SimulateNetworkQualityChange(EffectiveConnectionType type) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=133" + }, + "network.mojom.NetworkServiceTest.ForceNetworkQualityEstimatorReportWifiAsSlow2G": { + "definition": "ForceNetworkQualityEstimatorReportWifiAsSlow2G() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=138" + }, + "network.mojom.NetworkServiceTest.SimulateCrash": { + "definition": "SimulateCrash();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=141" + }, + "network.mojom.NetworkServiceTest.MockCertVerifierSetDefaultResult": { + "definition": "[Sync] MockCertVerifierSetDefaultResult(int32 default_result) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=144" + }, + "network.mojom.NetworkServiceTest.MockCertVerifierAddResultForCertAndHost": { + "definition": "[Sync] MockCertVerifierAddResultForCertAndHost( X509Certificate cert, string host_pattern, CertVerifyResult verify_result, int32 rv) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=146" + }, + "network.mojom.NetworkServiceTest.SetTransportSecurityStateTestSource": { + "definition": "SetTransportSecurityStateTestSource(bool enable_unittest_source) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=158" + }, + "network.mojom.NetworkServiceTest.SetAllowNetworkAccessToHostResolutions": { + "definition": "[Sync] SetAllowNetworkAccessToHostResolutions() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=163" + }, + "network.mojom.NetworkServiceTest.ReplaceSystemDnsConfig": { + "definition": "[Sync] ReplaceSystemDnsConfig() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=169" + }, + "network.mojom.NetworkServiceTest.SetTestDohConfig": { + "definition": "[Sync] SetTestDohConfig(SecureDnsMode secure_dns_mode, DnsOverHttpsConfig doh_config) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=173" + }, + "network.mojom.NetworkServiceTest.CrashOnResolveHost": { + "definition": "CrashOnResolveHost(string host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=178" + }, + "network.mojom.NetworkServiceTest.CrashOnGetCookieList": { + "definition": "CrashOnGetCookieList();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=181" + }, + "network.mojom.NetworkServiceTest.GetLatestMemoryPressureLevel": { + "definition": "[Sync] GetLatestMemoryPressureLevel() => (mojo_base.mojom.MemoryPressureLevel memory_pressure_level);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=185" + }, + "network.mojom.NetworkServiceTest.GetPeerToPeerConnectionsCountChange": { + "definition": "[Sync] GetPeerToPeerConnectionsCountChange() => (uint32 connection_count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=191" + }, + "network.mojom.NetworkServiceTest.GetEnvironmentVariableValue": { + "definition": "[Sync] GetEnvironmentVariableValue(string name) => (string value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=197" + }, + "network.mojom.NetworkServiceTest.Log": { + "definition": "[Sync] Log(string message) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=202" + }, + "network.mojom.NetworkServiceTest.ActivateFieldTrial": { + "definition": "ActivateFieldTrial(string field_trial_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=207" + }, + "network.mojom.NetworkServiceTest.SetSCTAuditingRetryDelay": { + "definition": "[Sync] SetSCTAuditingRetryDelay(mojo_base.mojom.TimeDelta? delay) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=212" + }, + "network.mojom.NetworkServiceTest.OpenFile": { + "definition": "OpenFile(mojo_base.mojom.FilePath path) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=216" + }, + "network.mojom.NetworkServiceTest.EnumerateFiles": { + "definition": "EnumerateFiles(mojo_base.mojom.FilePath path, pending_remote factory) => (array entries, bool error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=219" + }, + "network.mojom.NetworkServiceTest.CreateSimpleCache": { + "definition": "CreateSimpleCache( pending_remote factory, mojo_base.mojom.FilePath path, bool reset) => (pending_remote? backend);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=226" + }, + "network.mojom.NetworkServiceTest.MakeRequestToServer": { + "definition": "MakeRequestToServer(TransferableSocket s, IPEndPoint endpoint) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=235" + }, + "network.mojom.NetworkServiceTest.ResolveOwnHostnameWithSystemDns": { + "definition": "ResolveOwnHostnameWithSystemDns() => (network.mojom.AddressList addr_list, int32 os_error, int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=239" + }, + "network.mojom.NetworkServiceTest.SetIPv6ProbeResult": { + "definition": "SetIPv6ProbeResult(bool success) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=243" + }, + "network.mojom.NetworkServiceTest.GetAddressMapCacheLinux": { + "definition": "[Sync, EnableIf=use_network_interface_change_listener] GetAddressMapCacheLinux() => (network.mojom.AddressMap addr_map, network.mojom.OnlineLinks links);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=247" + }, + "network.mojom.NetworkServiceTest.AllowsGSSAPILibraryLoad": { + "definition": "[Sync] AllowsGSSAPILibraryLoad() => (bool allow_gssapi_library_load);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=253" + }, + "network.mojom.NetworkServiceTest.DisableExclusiveCookieDatabaseLockingForTesting": { + "definition": "[EnableIf=is_win] DisableExclusiveCookieDatabaseLockingForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=259" + }, + "network.mojom.NetworkServiceTest.IsHappyEyeballsV3Enabled": { + "definition": "IsHappyEyeballsV3Enabled() => (bool is_happy_eyeballs_v3_enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=263" + }, + "network.mojom.Rule": { + "definition": "struct Rule { ResolverType resolver_type; string host_pattern; string replacement; int32 host_resolver_flags; array dns_aliases;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=35" + }, + "network.mojom.SimpleCacheOpenEntryResult": { + "definition": "struct SimpleCacheOpenEntryResult { int32 error; string key; pending_remote? entry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=70" + }, + "network.mojom.ResolverType": { + "definition": "enum ResolverType { kResolverTypeFail, kResolverTypeFailTimeout, kResolverTypeSystem, kResolverTypeIPLiteral, kResolverTypeDirectLookup,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_service_test.mojom;l=24" + }, + "network.mojom.ConnectionInfo": { + "definition": "enum ConnectionInfo;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_types.mojom;l=12" + }, + "network.mojom.EffectiveConnectionType": { + "definition": "enum EffectiveConnectionType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_types.mojom;l=15" + }, + "network.mojom.CTPolicyCompliance": { + "definition": "enum CTPolicyCompliance;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/network_types.mojom;l=18" + }, + "network.mojom.NoVarySearch": { + "definition": "struct NoVarySearch { SearchParamsVariance search_variance; bool vary_on_key_order;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/no_vary_search.mojom;l=25" + }, + "network.mojom.NoVarySearchParseError": { + "definition": "enum NoVarySearchParseError { kOk, kDefaultValue, kNotDictionary, kUnknownDictionaryKey, kNonBooleanKeyOrder, kParamsNotStringList, kExceptNotStringList, kExceptWithoutTrueParams, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/no_vary_search.mojom;l=40" + }, + "network.mojom.SearchParamsVariance": { + "definition": "union SearchParamsVariance { array no_vary_params; array vary_params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/no_vary_search.mojom;l=11" + }, + "network.mojom.NoVarySearchWithParseError": { + "definition": "union NoVarySearchWithParseError { NoVarySearch no_vary_search; NoVarySearchParseError parse_error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/no_vary_search.mojom;l=55" + }, + "network.mojom.ObliviousHttpClient.OnCompleted": { + "definition": "OnCompleted(ObliviousHttpCompletionResult response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/oblivious_http_request.mojom;l=95" + }, + "network.mojom.ObliviousHttpRequestBody": { + "definition": "struct ObliviousHttpRequestBody { mojo_base.mojom.ByteString content; string content_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/oblivious_http_request.mojom;l=18" + }, + "network.mojom.ObliviousHttpResponse": { + "definition": "struct ObliviousHttpResponse { int32 response_code; HttpResponseHeaders headers; mojo_base.mojom.ByteString response_body;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/oblivious_http_request.mojom;l=24" + }, + "network.mojom.ObliviousHttpPaddingParameters": { + "definition": "struct ObliviousHttpPaddingParameters { bool add_exponential_pad; uint16 exponential_mean; bool pad_to_next_power_of_two;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/oblivious_http_request.mojom;l=50" + }, + "network.mojom.ObliviousHttpRequest": { + "definition": "struct ObliviousHttpRequest { url.mojom.Url relay_url; MutableNetworkTrafficAnnotationTag traffic_annotation; mojo_base.mojom.TimeDelta? timeout_duration; string key_config; url.mojom.Url resource_url; string method; ObliviousHttpRequestBody? request_body; network.mojom.TrustTokenParams? trust_token_params; ObliviousHttpPaddingParameters? padding_params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/oblivious_http_request.mojom;l=64" + }, + "network.mojom.ObliviousHttpCompletionResult": { + "definition": "union ObliviousHttpCompletionResult { int32 net_error; int32 outer_response_error_code; ObliviousHttpResponse inner_response;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/oblivious_http_request.mojom;l=36" + }, + "network.mojom.P2PNetworkNotificationClient.NetworkListChanged": { + "definition": "NetworkListChanged(array networks, IPAddress default_ipv4_local_address, IPAddress default_ipv6_local_address);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=57" + }, + "network.mojom.P2PSocketManager.StartNetworkNotifications": { + "definition": "StartNetworkNotifications( pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=64" + }, + "network.mojom.P2PSocketManager.GetHostAddress": { + "definition": "GetHostAddress(string host_name, AddressFamily? address_family, bool enable_mdns) => (array addresses);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=69" + }, + "network.mojom.P2PSocketManager.CreateSocket": { + "definition": "CreateSocket(P2PSocketType type, IPEndPoint local_address, P2PPortRange port_range, P2PHostAndIPEndPoint remote_address, MutableNetworkTrafficAnnotationTag traffic_annotation, mojo_base.mojom.UnguessableToken? devtools_token, pending_remote client, pending_receiver socket);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=75" + }, + "network.mojom.P2PSocket.Send": { + "definition": "Send(mojo_base.mojom.ReadOnlyBuffer data, P2PPacketInfo packet_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=86" + }, + "network.mojom.P2PSocket.SendBatch": { + "definition": "SendBatch(array packet_batch);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=89" + }, + "network.mojom.P2PSocket.SetOption": { + "definition": "SetOption(P2PSocketOption option, int32 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=90" + }, + "network.mojom.P2PSocketClient.SocketCreated": { + "definition": "SocketCreated(IPEndPoint local_address, IPEndPoint remote_address);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=95" + }, + "network.mojom.P2PSocketClient.SendComplete": { + "definition": "SendComplete(P2PSendPacketMetrics send_metrics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=98" + }, + "network.mojom.P2PSocketClient.SendBatchComplete": { + "definition": "SendBatchComplete(array send_metrics_batch);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=101" + }, + "network.mojom.P2PSocketClient.DataReceived": { + "definition": "DataReceived(array packets);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=104" + }, + "network.mojom.P2PHostAndIPEndPoint": { + "definition": "struct P2PHostAndIPEndPoint;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=20" + }, + "network.mojom.P2PPacketInfo": { + "definition": "struct P2PPacketInfo;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=23" + }, + "network.mojom.P2PPortRange": { + "definition": "struct P2PPortRange;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=26" + }, + "network.mojom.P2PSendPacketMetrics": { + "definition": "struct P2PSendPacketMetrics;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=29" + }, + "network.mojom.P2PReceivedPacket": { + "definition": "struct P2PReceivedPacket { mojo_base.mojom.ReadOnlyBuffer data; IPEndPoint socket_address; mojo_base.mojom.TimeTicks timestamp; EcnMarking ecn;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=43" + }, + "network.mojom.P2PSendPacket": { + "definition": "struct P2PSendPacket { mojo_base.mojom.ReadOnlyBuffer data; P2PPacketInfo packet_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=51" + }, + "network.mojom.P2PSocketType": { + "definition": "enum P2PSocketType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=17" + }, + "network.mojom.P2PSocketOption": { + "definition": "enum P2PSocketOption;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=32" + }, + "network.mojom.EcnMarking": { + "definition": "enum EcnMarking { kNotEct = 0, kEct1 = 1, kEct0 = 2, kCe = 3, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p.mojom;l=35" + }, + "network.mojom.P2PTrustedSocketManagerClient.InvalidSocketPortRangeRequested": { + "definition": "InvalidSocketPortRangeRequested();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p_trusted.mojom;l=16" + }, + "network.mojom.P2PTrustedSocketManagerClient.DumpPacket": { + "definition": "DumpPacket(array packet_header, uint64 packet_length, bool incoming);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p_trusted.mojom;l=19" + }, + "network.mojom.P2PTrustedSocketManager.StartRtpDump": { + "definition": "StartRtpDump(bool incoming, bool outgoing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p_trusted.mojom;l=28" + }, + "network.mojom.P2PTrustedSocketManager.StopRtpDump": { + "definition": "StopRtpDump(bool incoming, bool outgoing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p_trusted.mojom;l=31" + }, + "network.mojom.P2PTrustedSocketManager.PauseNetworkChangeNotifications": { + "definition": "PauseNetworkChangeNotifications();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p_trusted.mojom;l=34" + }, + "network.mojom.P2PTrustedSocketManager.ResumeNetworkChangeNotifications": { + "definition": "ResumeNetworkChangeNotifications();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/p2p_trusted.mojom;l=36" + }, + "network.mojom.ParsedHeaders": { + "definition": "struct ParsedHeaders { array content_security_policy; AllowCSPFromHeaderValue? allow_csp_from; ConnectionAllowlists connection_allowlists; CrossOriginEmbedderPolicy cross_origin_embedder_policy; CrossOriginOpenerPolicy cross_origin_opener_policy; DocumentIsolationPolicy document_isolation_policy; IntegrityPolicy integrity_policy; IntegrityPolicy integrity_policy_report_only; OriginAgentClusterValue origin_agent_cluster; array? accept_ch; array? critical_ch; bool client_hints_ignored_due_to_clear_site_data_header; XFrameOptionsValue xfo = XFrameOptionsValue.kNone; array link_headers; TimingAllowOrigin? timing_allow_origin; array supports_loading_mode; map? reporting_endpoints; array? cookie_indices; array? avail_language; array? content_language; NoVarySearchWithParseError? no_vary_search_with_parse_error; bool observe_browsing_topics; bool allow_cross_origin_event_reporting;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/parsed_headers.mojom;l=30" + }, + "network.mojom.OriginAgentClusterValue": { + "definition": "enum OriginAgentClusterValue { kAbsent, kTrue, kFalse };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/parsed_headers.mojom;l=20" + }, + "network.mojom.ParsedRequestCookie": { + "definition": "struct ParsedRequestCookie { string name; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/parsed_request_cookie.mojom;l=10" + }, + "network.mojom.OriginWithPossibleWildcards": { + "definition": "struct OriginWithPossibleWildcards { string scheme; string host; int32 port = -1; bool is_host_wildcard = false; bool is_port_wildcard = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/permissions_policy/permissions_policy.mojom;l=15" + }, + "network.mojom.ParsedPermissionsPolicyDeclaration": { + "definition": "struct ParsedPermissionsPolicyDeclaration { PermissionsPolicyFeature feature; array allowed_origins; url.mojom.Origin? self_if_matches; bool matches_all_origins; bool matches_opaque_src; string? reporting_endpoint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/permissions_policy/permissions_policy.mojom;l=28" + }, + "network.mojom.PermissionsPolicy": { + "definition": "struct PermissionsPolicy { url.mojom.Origin origin; bool headerless; array declarations; string inherited_policies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/permissions_policy/permissions_policy.mojom;l=39" + }, + "network.mojom.PermissionsPolicyFeature": { + "definition": "enum PermissionsPolicyFeature { kNotFound = 0, kAutoplay = 1, kCamera = 2, kEncryptedMedia = 3, kFullscreen = 4, kGeolocation = 5, kMicrophone = 6, kMidiFeature = 7, kPayment = 8, kSyncXHR = 13, kUsb = 14, kAccelerometer = 17, kAmbientLightSensor = 18, kGyroscope = 19, kMagnetometer = 20, kPictureInPicture = 26, kVerticalScroll = 27, kScreenWakeLock = 31, kFrobulate = 41, kSerial = 42, kHid = 43, kIdleDetection = 44, kExecutionWhileOutOfViewport = 50, kExecutionWhileNotRendered = 51, kFocusWithoutUserActivation = 52, kClientHintDPR = 53, kClientHintDeviceMemory = 54, kClientHintDownlink = 55, kClientHintECT = 56, kClientHintRTT = 58, kClientHintUA = 59, kClientHintUAArch = 60, kClientHintUAModel = 61, kClientHintUAPlatform = 62, kClientHintViewportWidth = 63, kClientHintWidth = 64, kWebXr = 66, kPublicKeyCredentialsGet = 67, kClientHintUAMobile = 69, kStorageAccessAPI = 70, kClientHintUAFullVersion = 71, kTrustTokenRedemption = 72, kAttributionReporting = 73, kClientHintUAPlatformVersion = 74, kCrossOriginIsolated = 75, kClipboardRead = 76, kClipboardWrite = 77, kWebShare = 78, kGamepad = 79, kOTPCredentials = 80, kDisplayCapture = 81, kSharedAutofill = 83, kDirectSockets = 84, kClientHintPrefersColorScheme = 85, kWindowManagement = 86, kClientHintUABitness = 87, kClientHintViewportHeight = 89, kKeyboardMap = 90, kRunAdAuction = 91, kJoinAdInterestGroup = 92, kClientHintUAFullVersionList = 93, kClientHintUAWoW64 = 95, kBrowsingTopics = 97, kBrowsingTopicsBackwardCompatible = 98, kClientHintSaveData = 99, kLocalFonts = 100, kBluetooth = 101, kIdentityCredentialsGet = 102, kSharedStorage = 103, kUnload = 104, kClientHintPrefersReducedMotion = 105, kComputePressure = 106, kSmartCard = 107, kSharedStorageSelectUrl = 108, kPrivateAggregation = 109, kPrivateStateTokenIssuance = 110, kClientHintUAFormFactors = 111, kClientHintPrefersReducedTransparency = 112, kWebPrinting = 113, kUsbUnrestricted = 114, kCapturedSurfaceControl = 115, kSubApps = 116, kPublicKeyCredentialsCreate = 117, kSpeakerSelection = 118, kDeferredFetch = 119, kDigitalCredentialsGet = 120, kMediaPlaybackWhileNotVisible = 121, kAllScreensCapture = 122, kPartitionedPopins = 123, kWebAppInstallation = 124, kControlledFrame = 125, kDirectSocketsPrivate = 126, kFencedUnpartitionedStorageRead = 127, kDeferredFetchMinimal = 128, kClientHintUAHighEntropyValues = 129, kSummarizer = 130, kWriter = 131, kRewriter = 132, kTranslator = 133, kLanguageDetector = 134, kDeviceAttributes = 135, kLocalNetworkAccess = 136, kRecordAdAuctionEvents = 137, kOnDeviceSpeechRecognition = 138, kLanguageModel = 139, kAriaNotify = 140, kDigitalCredentialsCreate = 141, kMulticastInDirectSockets = 142,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom;l=16" + }, + "network.mojom.ProxyBypassRules": { + "definition": "struct ProxyBypassRules { array rules;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config.mojom;l=11" + }, + "network.mojom.ProxyList": { + "definition": "struct ProxyList { array proxies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config.mojom;l=16" + }, + "network.mojom.ProxyRules": { + "definition": "struct ProxyRules { ProxyBypassRules bypass_rules; bool reverse_bypass; ProxyRulesType type; ProxyList single_proxies; ProxyList proxies_for_http; ProxyList proxies_for_https; ProxyList proxies_for_ftp; ProxyList fallback_proxies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config.mojom;l=28" + }, + "network.mojom.ProxyConfig": { + "definition": "struct ProxyConfig { bool auto_detect; bool from_system; mojo_base.mojom.BigString pac_url; bool pac_mandatory; ProxyRules proxy_rules;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config.mojom;l=40" + }, + "network.mojom.ProxyRulesType": { + "definition": "enum ProxyRulesType { EMPTY, PROXY_LIST, PROXY_LIST_PER_SCHEME,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config.mojom;l=21" + }, + "network.mojom.IpProtectionProxyBypassPolicy": { + "definition": "enum IpProtectionProxyBypassPolicy { kNone = 0, kFirstPartyToTopLevelFrame = 1, kExclusionList = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config.mojom;l=56" + }, + "network.mojom.ProxyConfigClient.OnProxyConfigUpdated": { + "definition": "OnProxyConfigUpdated(ProxyConfigWithAnnotation proxy_config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config_with_annotation.mojom;l=18" + }, + "network.mojom.ProxyConfigClient.FlushProxyConfig": { + "definition": "FlushProxyConfig() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config_with_annotation.mojom;l=21" + }, + "network.mojom.ProxyConfigPollerClient.OnLazyProxyConfigPoll": { + "definition": "OnLazyProxyConfigPoll();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config_with_annotation.mojom;l=27" + }, + "network.mojom.ProxyErrorClient.OnPACScriptError": { + "definition": "OnPACScriptError(int32 line_number, string details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config_with_annotation.mojom;l=36" + }, + "network.mojom.ProxyErrorClient.OnRequestMaybeFailedDueToProxySettings": { + "definition": "OnRequestMaybeFailedDueToProxySettings(int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config_with_annotation.mojom;l=50" + }, + "network.mojom.ProxyConfigWithAnnotation": { + "definition": "struct ProxyConfigWithAnnotation { ProxyConfig value; MutableNetworkTrafficAnnotationTag traffic_annotation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_config_with_annotation.mojom;l=11" + }, + "network.mojom.ProxyLookupClient.OnProxyLookupComplete": { + "definition": "OnProxyLookupComplete(int32 net_error, proxy_resolver.mojom.ProxyInfo? proxy_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_lookup_client.mojom;l=22" + }, + "network.mojom.ProxyResolvingSocket.UpgradeToTLS": { + "definition": "UpgradeToTLS(HostPortPair host_port_pair, MutableNetworkTrafficAnnotationTag traffic_annotation, pending_receiver receiver, pending_remote? observer) => (int32 net_error, handle? receive_stream, handle? send_stream);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_resolving_socket.mojom;l=31" + }, + "network.mojom.ProxyResolvingSocketFactory.CreateProxyResolvingSocket": { + "definition": "CreateProxyResolvingSocket( url.mojom.Url url, NetworkAnonymizationKey network_anonymization_key, ProxyResolvingSocketOptions? options, MutableNetworkTrafficAnnotationTag traffic_annotation, pending_receiver socket, pending_remote? observer) => (int32 result, network.mojom.IPEndPoint? local_addr, network.mojom.IPEndPoint? peer_addr, handle? receive_stream, handle? send_stream);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_resolving_socket.mojom;l=66" + }, + "network.mojom.ProxyResolvingSocketOptions": { + "definition": "struct ProxyResolvingSocketOptions { bool use_tls = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/proxy_resolving_socket.mojom;l=40" + }, + "network.mojom.ReferrerPolicy": { + "definition": "enum ReferrerPolicy { kAlways, [Default] kDefault, kNoReferrerWhenDowngrade, kNever, kOrigin, kOriginWhenCrossOrigin, kStrictOriginWhenCrossOrigin, kSameOrigin, kStrictOrigin,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/referrer_policy.mojom;l=8" + }, + "network.mojom.URLRequestReferrerPolicy": { + "definition": "enum URLRequestReferrerPolicy { kClearReferrerOnTransitionFromSecureToInsecure, kReduceReferrerGranularityOnTransitionCrossOrigin, kOriginOnlyOnTransitionCrossOrigin, kNeverClearReferrer, kOrigin, kClearReferrerOnTransitionCrossOrigin, kOriginClearOnTransitionFromSecureToInsecure, kNoReferrer};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/referrer_policy.mojom;l=21" + }, + "network.mojom.ReportingApiObserver.OnReportAdded": { + "definition": "OnReportAdded(ReportingApiReport report);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/reporting_service.mojom;l=81" + }, + "network.mojom.ReportingApiObserver.OnReportUpdated": { + "definition": "OnReportUpdated(ReportingApiReport report);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/reporting_service.mojom;l=83" + }, + "network.mojom.ReportingApiObserver.OnEndpointsUpdatedForOrigin": { + "definition": "OnEndpointsUpdatedForOrigin(array endpoints);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/reporting_service.mojom;l=85" + }, + "network.mojom.ReportingApiReport": { + "definition": "struct ReportingApiReport { mojo_base.mojom.UnguessableToken id; url.mojom.Url url; string group; string type; mojo_base.mojom.TimeTicks timestamp; int32 depth; int32 attempts; mojo_base.mojom.DictionaryValue body; ReportingApiReportStatus status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/reporting_service.mojom;l=23" + }, + "network.mojom.ReportingApiEndpoint": { + "definition": "struct ReportingApiEndpoint { url.mojom.Url url; int32 attempted_uploads; int32 successful_uploads; int32 attempted_reports; int32 successful_reports; int32 priority; int32 weight; url.mojom.Origin origin; string group_name; NetworkAnonymizationKey network_anonymization_key; mojo_base.mojom.UnguessableToken? reporting_source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/reporting_service.mojom;l=45" + }, + "network.mojom.ReportingApiReportStatus": { + "definition": "enum ReportingApiReportStatus { kQueued, kPending, kDoomed, kSuccess,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/reporting_service.mojom;l=15" + }, + "network.mojom.RequestPriority": { + "definition": "enum RequestPriority { kThrottled = 0, kIdle, kLowest, kLow, kMedium, kHighest};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/request_priority.mojom;l=10" + }, + "network.mojom.FetchPriorityAttribute": { + "definition": "enum FetchPriorityAttribute { kLow, kAuto, kHigh,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/request_priority.mojom;l=21" + }, + "network.mojom.RestrictedCookieManager.GetAllForUrl": { + "definition": "GetAllForUrl( url.mojom.Url url, SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin, StorageAccessApiStatus storage_access_api_status, CookieManagerGetOptions options, bool is_ad_tagged, bool apply_devtools_overrides, bool force_disable_third_party_cookies) => ( array cookies);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=88" + }, + "network.mojom.RestrictedCookieManager.SetCanonicalCookie": { + "definition": "SetCanonicalCookie(CanonicalCookie cookie, url.mojom.Url url, SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin, StorageAccessApiStatus storage_access_api_status, CookieInclusionStatus status, bool is_ad_tagged, bool apply_devtools_overrides) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=107" + }, + "network.mojom.RestrictedCookieManager.AddChangeListener": { + "definition": "AddChangeListener(url.mojom.Url url, SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin, StorageAccessApiStatus storage_access_api_status, pending_remote listener) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=119" + }, + "network.mojom.RestrictedCookieManager.SetCookieFromString": { + "definition": "[Sync] SetCookieFromString( url.mojom.Url url, SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin, StorageAccessApiStatus storage_access_api_status, bool get_version_shared_memory, bool is_ad_tagged, bool apply_devtools_overrides, string cookie) => (CookiesResponse? response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=141" + }, + "network.mojom.RestrictedCookieManager.GetCookiesString": { + "definition": "[Sync] GetCookiesString(url.mojom.Url url, SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin, StorageAccessApiStatus storage_access_api_status, bool get_version_shared_memory, bool is_ad_tagged, bool apply_devtools_overrides, bool force_disable_third_party_cookies) => ( uint64 version, mojo_base.mojom.ReadOnlySharedMemoryRegion? version_buffer, string cookies);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=172" + }, + "network.mojom.RestrictedCookieManager.CookiesEnabledFor": { + "definition": "[Sync] CookiesEnabledFor( url.mojom.Url url, SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin, StorageAccessApiStatus storage_access_api_status, bool apply_devtools_overrides) => (bool cookies_enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=197" + }, + "network.mojom.CookieManagerGetOptions": { + "definition": "struct CookieManagerGetOptions { string name; CookieMatchType match_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=22" + }, + "network.mojom.CookiesResponse": { + "definition": "struct CookiesResponse { uint64 version; mojo_base.mojom.ReadOnlySharedMemoryRegion? version_buffer; string cookies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=31" + }, + "network.mojom.CookieMatchType": { + "definition": "enum CookieMatchType { EQUALS, STARTS_WITH,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=17" + }, + "network.mojom.RestrictedCookieManagerRole": { + "definition": "enum RestrictedCookieManagerRole { SCRIPT, NETWORK};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_cookie_manager.mojom;l=39" + }, + "network.mojom.RestrictedUDPSocket.JoinGroup": { + "definition": "JoinGroup(IPAddress group_address) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_udp_socket.mojom;l=48" + }, + "network.mojom.RestrictedUDPSocket.LeaveGroup": { + "definition": "LeaveGroup(IPAddress group_address) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_udp_socket.mojom;l=54" + }, + "network.mojom.RestrictedUDPSocket.ReceiveMore": { + "definition": "ReceiveMore(uint32 num_additional_datagrams);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_udp_socket.mojom;l=59" + }, + "network.mojom.RestrictedUDPSocket.Send": { + "definition": "Send(mojo_base.mojom.ReadOnlyBuffer data) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_udp_socket.mojom;l=66" + }, + "network.mojom.RestrictedUDPSocket.SendTo": { + "definition": "SendTo( mojo_base.mojom.ReadOnlyBuffer data, HostPortPair dest_addr, network.mojom.DnsQueryType dns_query_type) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_udp_socket.mojom;l=77" + }, + "network.mojom.RestrictedUDPSocketParams": { + "definition": "struct RestrictedUDPSocketParams { UDPSocketOptions? socket_options; [EnableIf=is_chromeos] pending_remote? connection_tracker;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_udp_socket.mojom;l=23" + }, + "network.mojom.RestrictedUDPSocketMode": { + "definition": "enum RestrictedUDPSocketMode { CONNECTED, BOUND,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/restricted_udp_socket.mojom;l=18" + }, + "network.mojom.SchemefulSite": { + "definition": "struct SchemefulSite { url.mojom.Origin site_as_origin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/schemeful_site.mojom;l=11" + }, + "network.mojom.ServiceWorkerRouterInfo": { + "definition": "struct ServiceWorkerRouterInfo { uint32? rule_id_matched = 0; ServiceWorkerRouterSourceType? matched_source_type; ServiceWorkerRouterSourceType? actual_source_type; uint64 route_rule_num = 0; mojo_base.mojom.TimeDelta router_evaluation_time; mojo_base.mojom.TimeDelta cache_lookup_time; ServiceWorkerStatus? evaluation_worker_status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/service_worker_router_info.mojom;l=42" + }, + "network.mojom.ServiceWorkerRouterSourceType": { + "definition": "enum ServiceWorkerRouterSourceType { kNetwork = 0, kRaceNetworkAndFetchEvent = 1, kFetchEvent = 2, kCache = 3, kRaceNetworkAndCache = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/service_worker_router_info.mojom;l=12" + }, + "network.mojom.ServiceWorkerStatus": { + "definition": "enum ServiceWorkerStatus { kRunning = 0, kStarting = 1, kStopping = 2, kStopped = 3, kWarmingUp = 4, kWarmedUp = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/service_worker_router_info.mojom;l=30" + }, + "network.mojom.SharedDictionaryAccessObserver.OnSharedDictionaryAccessed": { + "definition": "OnSharedDictionaryAccessed(SharedDictionaryAccessDetails details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_dictionary_access_observer.mojom;l=34" + }, + "network.mojom.SharedDictionaryAccessObserver.Clone": { + "definition": "Clone(pending_receiver observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_dictionary_access_observer.mojom;l=37" + }, + "network.mojom.SharedDictionaryAccessDetails": { + "definition": "struct SharedDictionaryAccessDetails { Type type; url.mojom.Url url; SharedDictionaryIsolationKey isolation_key; bool is_blocked = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_dictionary_access_observer.mojom;l=11" + }, + "network.mojom.Type": { + "definition": "enum Type { kRead, kWrite, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_dictionary_access_observer.mojom;l=12" + }, + "network.mojom.SharedDictionaryError": { + "definition": "enum SharedDictionaryError { kUseErrorCrossOriginNoCorsRequest, kUseErrorDictionaryLoadFailure, kUseErrorMatchingDictionaryNotUsed, kUseErrorUnexpectedContentDictionaryHeader, kWriteErrorAlreadyRegistered, kWriteErrorCossOriginNoCorsRequest, kWriteErrorDisallowedBySettings, kWriteErrorExpiredResponse, kWriteErrorFeatureDisabled, kWriteErrorInsufficientResources, kWriteErrorInvalidMatchField, kWriteErrorInvalidStructuredHeader, kWriteErrorInvalidTTLField, kWriteErrorNavigationRequest, kWriteErrorNoMatchField, kWriteErrorNonIntegerTTLField, kWriteErrorNonListMatchDestField, kWriteErrorNonSecureContext, kWriteErrorNonStringIdField, kWriteErrorNonStringInMatchDestList, kWriteErrorNonStringMatchField, kWriteErrorNonTokenTypeField, kWriteErrorRequestAborted, kWriteErrorShuttingDown, kWriteErrorTooLongIdField, kWriteErrorUnsupportedType,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_dictionary_error.mojom;l=9" + }, + "network.mojom.SharedDictionaryIsolationKey": { + "definition": "struct SharedDictionaryIsolationKey { url.mojom.Origin frame_origin; SchemefulSite top_frame_site;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_dictionary_isolation_key.mojom;l=13" + }, + "network.mojom.SharedDictionaryUsageInfo": { + "definition": "struct SharedDictionaryUsageInfo { SharedDictionaryIsolationKey isolation_key; uint64 total_size_bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_dictionary_usage_info.mojom;l=11" + }, + "network.mojom.SharedStorageKeyArgument": { + "definition": "struct SharedStorageKeyArgument { mojo_base.mojom.String16 data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=12" + }, + "network.mojom.SharedStorageValueArgument": { + "definition": "struct SharedStorageValueArgument { mojo_base.mojom.String16 data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=19" + }, + "network.mojom.LockName": { + "definition": "struct LockName { string data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=26" + }, + "network.mojom.SharedStorageSetMethod": { + "definition": "struct SharedStorageSetMethod { SharedStorageKeyArgument key; SharedStorageValueArgument value; bool ignore_if_present;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=32" + }, + "network.mojom.SharedStorageAppendMethod": { + "definition": "struct SharedStorageAppendMethod { SharedStorageKeyArgument key; SharedStorageValueArgument value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=39" + }, + "network.mojom.SharedStorageDeleteMethod": { + "definition": "struct SharedStorageDeleteMethod { SharedStorageKeyArgument key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=45" + }, + "network.mojom.SharedStorageClearMethod": { + "definition": "struct SharedStorageClearMethod {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=50" + }, + "network.mojom.SharedStorageModifierMethodWithOptions": { + "definition": "struct SharedStorageModifierMethodWithOptions { SharedStorageModifierMethod method; LockName? with_lock;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=60" + }, + "network.mojom.SharedStorageBatchUpdateMethodsArgument": { + "definition": "struct SharedStorageBatchUpdateMethodsArgument { array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=72" + }, + "network.mojom.SharedStorageModifierMethod": { + "definition": "union SharedStorageModifierMethod { SharedStorageSetMethod set_method; SharedStorageAppendMethod append_method; SharedStorageDeleteMethod delete_method; SharedStorageClearMethod clear_method;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/shared_storage.mojom;l=52" + }, + "network.mojom.SiteForCookies": { + "definition": "struct SiteForCookies { SchemefulSite site; bool schemefully_same;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/site_for_cookies.mojom;l=10" + }, + "network.mojom.SocketBroker.CreateTcpSocket": { + "definition": "CreateTcpSocket(AddressFamily address_family) => (TransferableSocket created_socket, int32 rv);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/socket_broker.mojom;l=16" + }, + "network.mojom.SocketBroker.CreateUdpSocket": { + "definition": "CreateUdpSocket(AddressFamily address_family) => (TransferableSocket created_socket, int32 rv);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/socket_broker.mojom;l=21" + }, + "network.mojom.SourceLocation": { + "definition": "struct SourceLocation { string url; uint32 line = 0; uint32 column = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/source_location.mojom;l=12" + }, + "network.mojom.SourceType": { + "definition": "enum SourceType { kBrotli, kDeflate, kGzip, kZstd, kNone, kUnknown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/source_type.mojom;l=9" + }, + "network.mojom.SRIMessageSignatureComponentParameter": { + "definition": "struct SRIMessageSignatureComponentParameter { Type type; string? value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/sri_message_signature.mojom;l=18" + }, + "network.mojom.SRIMessageSignatureComponent": { + "definition": "struct SRIMessageSignatureComponent { string name; array params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/sri_message_signature.mojom;l=34" + }, + "network.mojom.SRIMessageSignature": { + "definition": "struct SRIMessageSignature { string label; array signature; array components; int64? created; int64? expires; array? keyid; string? nonce; string? tag; string serialized_signature_params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/sri_message_signature.mojom;l=51" + }, + "network.mojom.SRIMessageSignatureIssue": { + "definition": "struct SRIMessageSignatureIssue { SRIMessageSignatureError error; string? signature_base; array? integrity_assertions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/sri_message_signature.mojom;l=107" + }, + "network.mojom.SRIMessageSignatures": { + "definition": "struct SRIMessageSignatures { array signatures; array issues;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/sri_message_signature.mojom;l=123" + }, + "network.mojom.Type": { + "definition": "enum Type { kName, kRequest, kStrictStructuredFieldSerialization, kBinaryRepresentation };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/sri_message_signature.mojom;l=19" + }, + "network.mojom.SRIMessageSignatureError": { + "definition": "enum SRIMessageSignatureError { kMissingSignatureHeader, kMissingSignatureInputHeader, kInvalidSignatureHeader, kInvalidSignatureInputHeader, kSignatureHeaderValueIsNotByteSequence, kSignatureHeaderValueIsParameterized, kSignatureHeaderValueIsIncorrectLength, kSignatureInputHeaderMissingLabel, kSignatureInputHeaderValueNotInnerList, kSignatureInputHeaderValueMissingComponents, kSignatureInputHeaderInvalidComponentType, kSignatureInputHeaderInvalidComponentName, kSignatureInputHeaderInvalidHeaderComponentParameter, kSignatureInputHeaderInvalidDerivedComponentParameter, kSignatureInputHeaderKeyIdLength, kSignatureInputHeaderInvalidParameter, kSignatureInputHeaderMissingRequiredParameters, kValidationFailedSignatureExpired, kValidationFailedInvalidLength, kValidationFailedSignatureMismatch, kValidationFailedIntegrityMismatch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/sri_message_signature.mojom;l=81" + }, + "network.mojom.SSLConfigClient.OnSSLConfigUpdated": { + "definition": "OnSSLConfigUpdated(SSLConfig ssl_config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ssl_config.mojom;l=94" + }, + "network.mojom.SSLConfig": { + "definition": "struct SSLConfig { bool rev_checking_enabled = false; bool rev_checking_required_local_anchors = false; bool sha1_local_anchors_enabled = false; SSLVersion version_min = kTLS12; SSLVersion version_max = kTLS13; array disabled_cipher_suites; bool tls13_cipher_prefer_aes_256 = false; array client_cert_pooling_policy; SSLNamedGroupsPreset named_groups_preset = kDefault; bool post_quantum_key_agreement_enabled = true; bool ech_enabled = true; array> trust_anchor_ids;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ssl_config.mojom;l=45" + }, + "network.mojom.SSLVersion": { + "definition": "enum SSLVersion { kTLS12, kTLS13,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ssl_config.mojom;l=7" + }, + "network.mojom.SSLNamedGroupsPreset": { + "definition": "enum SSLNamedGroupsPreset { kDefault, kCnsa2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/ssl_config.mojom;l=14" + }, + "network.mojom.StorageAccessApiStatus": { + "definition": "enum StorageAccessApiStatus { kNone, kAccessViaAPI,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/storage_access_api.mojom;l=10" + }, + "network.mojom.StructuredHeadersParameter": { + "definition": "struct StructuredHeadersParameter { string key; StructuredHeadersItem item;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/structured_headers.mojom;l=26" + }, + "network.mojom.StructuredHeadersParameterizedItem": { + "definition": "struct StructuredHeadersParameterizedItem { StructuredHeadersItem item; array parameters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/structured_headers.mojom;l=32" + }, + "network.mojom.StructuredHeadersParameterizedMember": { + "definition": "struct StructuredHeadersParameterizedMember { array member; bool member_is_inner_list; array parameters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/structured_headers.mojom;l=40" + }, + "network.mojom.StructuredHeadersDictionaryMember": { + "definition": "struct StructuredHeadersDictionaryMember { string key; StructuredHeadersParameterizedMember value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/structured_headers.mojom;l=47" + }, + "network.mojom.StructuredHeadersDictionary": { + "definition": "struct StructuredHeadersDictionary { array members;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/structured_headers.mojom;l=53" + }, + "network.mojom.StructuredHeadersItem": { + "definition": "union StructuredHeadersItem { uint8 null_value; int64 integer_value; double decimal_value; string string_value; string token_value; mojo_base.mojom.ByteString byte_sequence_value; bool boolean_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/structured_headers.mojom;l=13" + }, + "network.mojom.SupportsLoadingMode": { + "definition": "struct SupportsLoadingMode { array supported_modes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/supports_loading_mode.mojom;l=38" + }, + "network.mojom.LoadingMode": { + "definition": "enum LoadingMode { kDefault, kUncredentialedPrefetch, kUncredentialedPrerender, kCredentialedPrerender, kFencedFrame, kPrerenderCrossOriginFrames,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/supports_loading_mode.mojom;l=8" + }, + "network.mojom.SystemDnsResolver.Resolve": { + "definition": "Resolve(string? hostname, AddressFamily addr_family, int32 flags, uint64 network) => (network.mojom.AddressList addr_list, int32 os_error, int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/system_dns_resolution.mojom;l=17" + }, + "network.mojom.TCPBoundSocket.Listen": { + "definition": "Listen(uint32 backlog, pending_receiver socket) => (int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=74" + }, + "network.mojom.TCPBoundSocket.Connect": { + "definition": "Connect( AddressList remote_addr_list, TCPConnectedSocketOptions? tcp_connected_socket_options, pending_receiver socket, pending_remote? observer) => (int32 net_error, IPEndPoint? local_addr, IPEndPoint? peer_addr, handle? receive_stream, handle? send_stream);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=82" + }, + "network.mojom.TCPConnectedSocket.UpgradeToTLS": { + "definition": "UpgradeToTLS(HostPortPair host_port_pair, TLSClientSocketOptions? options, MutableNetworkTrafficAnnotationTag traffic_annotation, pending_receiver receiver, pending_remote? observer) => (int32 net_error, handle? receive_stream, handle? send_stream, SSLInfo? ssl_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=110" + }, + "network.mojom.TCPConnectedSocket.SetSendBufferSize": { + "definition": "SetSendBufferSize(int32 send_buffer_size) => (int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=134" + }, + "network.mojom.TCPConnectedSocket.SetReceiveBufferSize": { + "definition": "SetReceiveBufferSize(int32 receive_buffer_size) => (int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=135" + }, + "network.mojom.TCPConnectedSocket.SetNoDelay": { + "definition": "SetNoDelay(bool no_delay) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=144" + }, + "network.mojom.TCPConnectedSocket.SetKeepAlive": { + "definition": "SetKeepAlive(bool enable, int32 delay_secs) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=153" + }, + "network.mojom.SocketObserver.OnReadError": { + "definition": "OnReadError(int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=163" + }, + "network.mojom.SocketObserver.OnWriteError": { + "definition": "OnWriteError(int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=167" + }, + "network.mojom.TCPServerSocket.Accept": { + "definition": "Accept(pending_remote? observer) => (int32 net_error, IPEndPoint? remote_addr, pending_remote? connected_socket, handle? send_stream, handle? receive_stream);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=186" + }, + "network.mojom.TCPKeepAliveOptions": { + "definition": "struct TCPKeepAliveOptions { bool enable = false; uint16 delay = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=15" + }, + "network.mojom.TCPConnectedSocketOptions": { + "definition": "struct TCPConnectedSocketOptions { int32 send_buffer_size = 0; int32 receive_buffer_size = 0; bool no_delay = true; TCPKeepAliveOptions? keep_alive_options;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=23" + }, + "network.mojom.TCPServerSocketOptions": { + "definition": "struct TCPServerSocketOptions { uint32 backlog; bool? ipv6_only; [EnableIf=is_chromeos] pending_remote? connection_tracker;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tcp_socket.mojom;l=48" + }, + "network.mojom.TimingAllowOrigin": { + "definition": "union TimingAllowOrigin { array serialized_origins; uint8 all;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/timing_allow_origin.mojom;l=7" + }, + "network.mojom.TLSClientSocketOptions": { + "definition": "struct TLSClientSocketOptions { SSLVersion version_min = kTLS12; SSLVersion version_max = kTLS13; bool send_ssl_info = false; bool unsafely_skip_cert_verification = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/tls_socket.mojom;l=20" + }, + "network.mojom.TransferableDirectory": { + "definition": "union TransferableDirectory { handle handle_for_ipc; mojo_base.mojom.FilePath path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/transferable_directory.mojom;l=14" + }, + "network.mojom.TransferableSocket": { + "definition": "struct TransferableSocket { array protocol_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/transferable_socket.mojom;l=10" + }, + "network.mojom.TransferableSocket": { + "definition": "struct TransferableSocket { handle? socket;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/transferable_socket.mojom;l=17" + }, + "network.mojom.TrustTokenAccessObserver.OnTrustTokensAccessed": { + "definition": "OnTrustTokensAccessed(TrustTokenAccessDetails details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_token_access_observer.mojom;l=64" + }, + "network.mojom.TrustTokenAccessObserver.Clone": { + "definition": "Clone(pending_receiver listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_token_access_observer.mojom;l=68" + }, + "network.mojom.TrustTokenIssuanceDetails": { + "definition": "struct TrustTokenIssuanceDetails { url.mojom.Origin origin; url.mojom.Origin? issuer; bool blocked = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_token_access_observer.mojom;l=15" + }, + "network.mojom.TrustTokenRedemptionDetails": { + "definition": "struct TrustTokenRedemptionDetails { url.mojom.Origin origin; url.mojom.Origin? issuer; bool blocked = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_token_access_observer.mojom;l=30" + }, + "network.mojom.TrustTokenSigningDetails": { + "definition": "struct TrustTokenSigningDetails { url.mojom.Origin origin; bool blocked = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_token_access_observer.mojom;l=45" + }, + "network.mojom.TrustTokenAccessDetails": { + "definition": "union TrustTokenAccessDetails { TrustTokenIssuanceDetails issuance; TrustTokenRedemptionDetails redemption; TrustTokenSigningDetails signing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_token_access_observer.mojom;l=9" + }, + "network.mojom.TrustTokenQueryAnswerer.HasTrustTokens": { + "definition": "HasTrustTokens(url.mojom.Origin issuer) => (HasTrustTokensResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=199" + }, + "network.mojom.TrustTokenQueryAnswerer.HasRedemptionRecord": { + "definition": "HasRedemptionRecord(url.mojom.Origin issuer) => (HasRedemptionRecordResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=209" + }, + "network.mojom.TrustTokenParams": { + "definition": "struct TrustTokenParams { TrustTokenOperationType operation; TrustTokenRefreshPolicy refresh_policy = kUseCached; string? custom_key_commitment; url.mojom.Origin? custom_issuer; TrustTokenSignRequestData sign_request_data = kOmit; bool include_timestamp_header = false; array issuers; array additional_signed_headers; string? possibly_unsafe_additional_signing_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=133" + }, + "network.mojom.HasTrustTokensResult": { + "definition": "struct HasTrustTokensResult { TrustTokenOperationStatus status; bool has_trust_tokens;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=167" + }, + "network.mojom.HasRedemptionRecordResult": { + "definition": "struct HasRedemptionRecordResult { TrustTokenOperationStatus status; bool has_redemption_record;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=174" + }, + "network.mojom.TrustTokenVerificationKey": { + "definition": "struct TrustTokenVerificationKey { string body; mojo_base.mojom.Time expiry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=218" + }, + "network.mojom.TrustTokenKeyCommitmentResult": { + "definition": "struct TrustTokenKeyCommitmentResult { TrustTokenProtocolVersion protocol_version; int32 id; int32 batch_size; array keys; array request_issuance_locally_on; UnavailableLocalOperationFallback unavailable_local_operation_fallback;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=223" + }, + "network.mojom.FulfillTrustTokenIssuanceRequest": { + "definition": "struct FulfillTrustTokenIssuanceRequest { url.mojom.Origin issuer; string request;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=270" + }, + "network.mojom.FulfillTrustTokenIssuanceAnswer": { + "definition": "struct FulfillTrustTokenIssuanceAnswer { Status status; string response;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=292" + }, + "network.mojom.TrustTokenOperationResult": { + "definition": "struct TrustTokenOperationResult { TrustTokenOperationType operation; TrustTokenOperationStatus status; url.mojom.Origin? issuer; url.mojom.Origin? top_level_origin; int32 issued_token_count = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=313" + }, + "network.mojom.StoredTrustTokensForIssuer": { + "definition": "struct StoredTrustTokensForIssuer { url.mojom.Origin issuer; int32 count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=328" + }, + "network.mojom.ToplevelRedemptionRecord": { + "definition": "struct ToplevelRedemptionRecord { url.mojom.Origin toplevel_origin; mojo_base.mojom.Time last_redemption;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=336" + }, + "network.mojom.TrustTokenProtocolVersion": { + "definition": "enum TrustTokenProtocolVersion { kTrustTokenV3Pmb, kTrustTokenV3Voprf, kPrivateStateTokenV1Pmb, kPrivateStateTokenV1Voprf,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=22" + }, + "network.mojom.TrustTokenOperationStatus": { + "definition": "enum TrustTokenOperationStatus { kOk = 0, kInvalidArgument = 1, kMissingIssuerKeys = 2, kFailedPrecondition = 3, kResourceExhausted = 4, kAlreadyExists = 5, kResourceLimited = 6, kUnauthorized = 7, kBadResponse = 8, kInternalError = 9, kUnknownError = 10, kOperationSuccessfullyFulfilledLocally = 11, kSiteIssuerLimit = 12,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=40" + }, + "network.mojom.TrustTokenOperationType": { + "definition": "enum TrustTokenOperationType { kIssuance, kRedemption, kSigning,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=90" + }, + "network.mojom.TrustTokenRefreshPolicy": { + "definition": "enum TrustTokenRefreshPolicy { kUseCached, kRefresh,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=105" + }, + "network.mojom.TrustTokenSignRequestData": { + "definition": "enum TrustTokenSignRequestData { kOmit, kHeadersOnly, kInclude,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=117" + }, + "network.mojom.Os": { + "definition": "enum Os { kAndroid, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=242" + }, + "network.mojom.UnavailableLocalOperationFallback": { + "definition": "enum UnavailableLocalOperationFallback { kWebIssuance, kReturnWithError, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=256" + }, + "network.mojom.Status": { + "definition": "enum Status { kOk, kNotFound, kUnknownError };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=295" + }, + "network.mojom.DeleteStoredTrustTokensStatus": { + "definition": "enum DeleteStoredTrustTokensStatus { kSuccessTokensDeleted, kSuccessNoTokensDeleted, kFailureFeatureDisabled, kFailureInvalidOrigin,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/trust_tokens.mojom;l=342" + }, + "network.mojom.UDPSocket.Bind": { + "definition": "Bind(IPEndPoint local_addr, UDPSocketOptions? socket_options) => (int32 result, IPEndPoint? local_addr_out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=98" + }, + "network.mojom.UDPSocket.Connect": { + "definition": "Connect(IPEndPoint remote_addr, UDPSocketOptions? socket_options) => (int32 result, IPEndPoint? local_addr_out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=109" + }, + "network.mojom.UDPSocket.SetBroadcast": { + "definition": "SetBroadcast(bool broadcast) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=114" + }, + "network.mojom.UDPSocket.SetSendBufferSize": { + "definition": "SetSendBufferSize(int32 send_buffer_size) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=119" + }, + "network.mojom.UDPSocket.SetReceiveBufferSize": { + "definition": "SetReceiveBufferSize(int32 receive_buffer_size) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=124" + }, + "network.mojom.UDPSocket.JoinGroup": { + "definition": "JoinGroup(IPAddress group_address) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=129" + }, + "network.mojom.UDPSocket.LeaveGroup": { + "definition": "LeaveGroup(IPAddress group_address) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=135" + }, + "network.mojom.UDPSocket.ReceiveMore": { + "definition": "ReceiveMore(uint32 num_additional_datagrams);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=176" + }, + "network.mojom.UDPSocket.ReceiveMoreWithBufferSize": { + "definition": "ReceiveMoreWithBufferSize( uint32 num_additional_datagrams, uint32 buffer_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=184" + }, + "network.mojom.UDPSocket.SendTo": { + "definition": "SendTo(IPEndPoint dest_addr, mojo_base.mojom.ReadOnlyBuffer data, MutableNetworkTrafficAnnotationTag traffic_annotation) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=198" + }, + "network.mojom.UDPSocket.Send": { + "definition": "Send(mojo_base.mojom.ReadOnlyBuffer data, MutableNetworkTrafficAnnotationTag traffic_annotation) => (int32 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=206" + }, + "network.mojom.UDPSocket.Close": { + "definition": "Close();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=211" + }, + "network.mojom.UDPSocketListener.OnReceived": { + "definition": "OnReceived(int32 result, IPEndPoint? src_addr, mojo_base.mojom.ReadOnlyBuffer? data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=231" + }, + "network.mojom.UDPSocketOptions": { + "definition": "struct UDPSocketOptions { bool allow_address_reuse = false; bool allow_broadcast = false; bool allow_address_sharing_for_multicast = false; uint32 multicast_interface = 0; uint32 multicast_time_to_live = 1; bool multicast_loopback_mode = true; int32 send_buffer_size = 0; int32 receive_buffer_size = 0; bool? ipv6_only;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/udp_socket.mojom;l=14" + }, + "network.mojom.UnencodedDigests": { + "definition": "struct UnencodedDigests { array digests; array issues;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/unencoded_digest.mojom;l=19" + }, + "network.mojom.UnencodedDigestIssue": { + "definition": "enum UnencodedDigestIssue { kMalformedDictionary, kUnknownAlgorithm, kIncorrectDigestType, kIncorrectDigestLength,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/unencoded_digest.mojom;l=9" + }, + "network.mojom.URLLoader.FollowRedirect": { + "definition": "FollowRedirect(array removed_headers, network.mojom.HttpRequestHeaders modified_headers, network.mojom.HttpRequestHeaders modified_cors_exempt_headers, url.mojom.Url? new_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=46" + }, + "network.mojom.URLLoader.SetPriority": { + "definition": "SetPriority(RequestPriority priority, int32 intra_priority_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=55" + }, + "network.mojom.URLLoaderClient.OnReceiveEarlyHints": { + "definition": "OnReceiveEarlyHints(EarlyHints early_hints);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=61" + }, + "network.mojom.URLLoaderClient.OnReceiveResponse": { + "definition": "OnReceiveResponse(URLResponseHead head, handle? body, mojo_base.mojom.BigBuffer? cached_metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=73" + }, + "network.mojom.URLLoaderClient.OnReceiveRedirect": { + "definition": "OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=81" + }, + "network.mojom.URLLoaderClient.OnUploadProgress": { + "definition": "OnUploadProgress(int64 current_position, int64 total_size) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=87" + }, + "network.mojom.URLLoaderClient.OnTransferSizeUpdated": { + "definition": "OnTransferSizeUpdated(int32 transfer_size_diff);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=101" + }, + "network.mojom.URLLoaderClient.OnComplete": { + "definition": "OnComplete(URLLoaderCompletionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=115" + }, + "network.mojom.URLRequestRedirectInfo": { + "definition": "struct URLRequestRedirectInfo;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=16" + }, + "network.mojom.URLLoaderClientEndpoints": { + "definition": "struct URLLoaderClientEndpoints { pending_remote url_loader; pending_receiver url_loader_client;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader.mojom;l=120" + }, + "network.mojom.BlockedByResponseReasonWrapper": { + "definition": "struct BlockedByResponseReasonWrapper { BlockedByResponseReason reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_completion_status.mojom;l=14" + }, + "network.mojom.URLLoaderCompletionStatus": { + "definition": "struct URLLoaderCompletionStatus { int32 error_code = 0; int32 extended_error_code = 0; bool exists_in_cache = false; mojo_base.mojom.TimeTicks completion_time; int64 encoded_data_length = 0; int64 encoded_body_length = 0; int64 decoded_body_length = 0; CorsErrorStatus? cors_error_status; PrivateNetworkAccessPreflightResult private_network_access_preflight_result = PrivateNetworkAccessPreflightResult.kNone; TrustTokenOperationStatus trust_token_operation_status = TrustTokenOperationStatus.kOk; SSLInfo? ssl_info; BlockedByResponseReasonWrapper? blocked_by_response_reason; bool should_report_orb_blocking = false; ResolveErrorInfo resolve_error_info; bool should_collapse_initiator = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_completion_status.mojom;l=20" + }, + "network.mojom.URLLoaderFactory.CreateLoaderAndStart": { + "definition": "CreateLoaderAndStart(pending_receiver loader, int32 request_id, uint32 options, URLRequest request, pending_remote client, MutableNetworkTrafficAnnotationTag traffic_annotation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_factory.mojom;l=77" + }, + "network.mojom.URLLoaderFactory.Clone": { + "definition": "Clone(pending_receiver factory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_factory.mojom;l=85" + }, + "network.mojom.ClientCertificateResponder.ContinueWithCertificate": { + "definition": "ContinueWithCertificate(network.mojom.X509Certificate x509_certificate, string provider_name, array algorithm_preferences, pending_remote ssl_private_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=42" + }, + "network.mojom.ClientCertificateResponder.ContinueWithoutCertificate": { + "definition": "ContinueWithoutCertificate();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=53" + }, + "network.mojom.ClientCertificateResponder.CancelRequest": { + "definition": "CancelRequest();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=57" + }, + "network.mojom.SSLPrivateKey.Sign": { + "definition": "Sign(uint16 algorithm, array input) => (int32 net_error, array signature);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=72" + }, + "network.mojom.AuthChallengeResponder.OnAuthCredentials": { + "definition": "OnAuthCredentials(AuthCredentials? credentials);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=82" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnSSLCertificateError": { + "definition": "OnSSLCertificateError(url.mojom.Url url, int32 net_error, SSLInfo ssl_info, bool fatal) => (int32 net_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=92" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnCertificateRequested": { + "definition": "OnCertificateRequested( mojo_base.mojom.UnguessableToken? window_id, network.mojom.SSLCertRequestInfo cert_info, pending_remote cert_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=109" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnAuthRequired": { + "definition": "OnAuthRequired( mojo_base.mojom.UnguessableToken? window_id, int32 request_id, url.mojom.Url url, bool first_auth_attempt, AuthChallengeInfo auth_info, HttpResponseHeaders? head_headers, pending_remote auth_challenge_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=125" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnLocalNetworkAccessPermissionRequired": { + "definition": "OnLocalNetworkAccessPermissionRequired() => (bool permission_granted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=139" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnClearSiteData": { + "definition": "OnClearSiteData(url.mojom.Url url, string header_value, int32 load_flags, CookiePartitionKey? cookie_partition_key, bool partitioned_state_allowed_only) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=146" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnLoadingStateUpdate": { + "definition": "OnLoadingStateUpdate(LoadInfo info) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=156" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnDataUseUpdate": { + "definition": "OnDataUseUpdate(int32 network_traffic_annotation_id_hash, int64 recv_bytes, int64 sent_bytes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=162" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnSharedStorageHeaderReceived": { + "definition": "OnSharedStorageHeaderReceived(url.mojom.Origin request_origin, network.mojom.SharedStorageBatchUpdateMethodsArgument methods_with_options, network.mojom.LockName? with_lock) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=187" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnAdAuctionEventRecordHeaderReceived": { + "definition": "OnAdAuctionEventRecordHeaderReceived( AdAuctionEventRecord ad_auction_event_record, url.mojom.Origin? top_frame_origin);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=199" + }, + "network.mojom.URLLoaderNetworkServiceObserver.Clone": { + "definition": "Clone(pending_receiver listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=206" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnWebSocketConnectedToPrivateNetwork": { + "definition": "OnWebSocketConnectedToPrivateNetwork( url.mojom.Url request_url, IPAddressSpace ip_address_space);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=210" + }, + "network.mojom.URLLoaderNetworkServiceObserver.OnUrlLoaderConnectedToPrivateNetwork": { + "definition": "OnUrlLoaderConnectedToPrivateNetwork( url.mojom.Url request_url, IPAddressSpace response_address_space, IPAddressSpace client_address_space, IPAddressSpace target_address_space);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=215" + }, + "network.mojom.LoadInfo": { + "definition": "struct LoadInfo { mojo_base.mojom.TimeTicks timestamp; string host; uint32 load_state; mojo_base.mojom.String16 state_param; uint64 upload_position; uint64 upload_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_loader_network_service_observer.mojom;l=20" + }, + "network.mojom.EnabledClientHints": { + "definition": "struct EnabledClientHints { url.mojom.Origin origin; bool is_outermost_main_frame; array hints; array not_allowed_hints;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=48" + }, + "network.mojom.TrustedUrlRequestParams": { + "definition": "struct TrustedUrlRequestParams { IsolationInfo isolation_info; bool disable_secure_dns; bool has_user_activation; bool allow_cookies_from_browser; bool include_request_cookies_with_response = false; EnabledClientHints? enabled_client_hints; pending_remote? cookie_observer; pending_remote? trust_token_observer; pending_remote? url_loader_network_observer; pending_remote? devtools_observer; pending_remote? device_bound_session_observer; ClientSecurityState? client_security_state; pending_remote? accept_ch_frame_observer; pending_remote? shared_dictionary_observer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=78" + }, + "network.mojom.WebBundleTokenParams": { + "definition": "struct WebBundleTokenParams { url.mojom.Url bundle_url; mojo_base.mojom.UnguessableToken token; pending_remote? web_bundle_handle; int32 render_process_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=162" + }, + "network.mojom.URLRequest": { + "definition": "struct URLRequest { string method; url.mojom.Url url; SiteForCookies site_for_cookies; bool update_first_party_url_on_redirect; url.mojom.Origin? request_initiator; array navigation_redirect_chain; url.mojom.Origin? isolated_world_origin; url.mojom.Url referrer; URLRequestReferrerPolicy referrer_policy; HttpRequestHeaders headers; HttpRequestHeaders cors_exempt_headers; int32 load_flags; int32 resource_type; RequestPriority priority; bool priority_incremental; CorsPreflightPolicy cors_preflight_policy; bool originated_from_service_worker; bool skip_service_worker; RequestMode mode; CredentialsMode credentials_mode; RedirectMode redirect_mode; string fetch_integrity; array> expected_public_keys; RequestDestination destination; URLRequestBody? request_body; bool keepalive; bool browsing_topics; bool ad_auction_headers; bool shared_storage_writable_eligible; bool has_user_gesture; bool enable_load_timing; bool enable_upload_progress; bool do_not_prompt_for_login; bool is_outermost_main_frame; int32 transition_type; int32 previews_state; bool upgrade_if_insecure; bool is_revalidating; mojo_base.mojom.UnguessableToken? throttling_profile_id; mojo_base.mojom.UnguessableToken? fetch_window_id; string? devtools_request_id; string? devtools_stack_id; bool is_fetch_like_api; bool is_fetch_later_api; bool is_favicon; RequestDestination original_destination; TrustedUrlRequestParams? trusted_params; mojo_base.mojom.UnguessableToken? recursive_prefetch_token; TrustTokenParams? trust_token_params; WebBundleTokenParams? web_bundle_token_params; array? devtools_accepted_stream_types; NetLogSource? net_log_create_info; NetLogSource? net_log_reference_info; IPAddressSpace target_ip_address_space; network.mojom.IPAddressSpace required_ip_address_space; StorageAccessApiStatus storage_access_api_status; AttributionSupport attribution_reporting_support; AttributionReportingEligibility attribution_reporting_eligibility = AttributionReportingEligibility.kUnset; mojo_base.mojom.UnguessableToken? attribution_reporting_src_token; mojo_base.mojom.UnguessableToken? keepalive_token; bool is_ad_tagged = false; bool shared_dictionary_writer_enabled = false; bool client_side_content_decoding_enabled = false; SocketTag socket_tag; bool allows_device_bound_session_registration; network.mojom.PermissionsPolicy? permissions_policy; network.mojom.FetchRetryOptions? fetch_retry_options;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=179" + }, + "network.mojom.URLRequestBody": { + "definition": "struct URLRequestBody { array elements; uint64 identifier; bool contains_sensitive_info; bool allow_http1_for_streaming_upload;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=653" + }, + "network.mojom.DataElementBytes": { + "definition": "struct DataElementBytes { mojo_base.mojom.BigBuffer data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=672" + }, + "network.mojom.DataElementFile": { + "definition": "struct DataElementFile { mojo_base.mojom.FilePath path; uint64 offset; uint64 length; mojo_base.mojom.Time expected_modification_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=677" + }, + "network.mojom.DataElementDataPipe": { + "definition": "struct DataElementDataPipe { pending_remote data_pipe_getter;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=686" + }, + "network.mojom.DataElementChunkedDataPipe": { + "definition": "struct DataElementChunkedDataPipe { pending_remote data_pipe_getter; bool read_only_once;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=692" + }, + "network.mojom.SocketTag": { + "definition": "struct SocketTag { [EnableIf=is_android] uint32 uid; [EnableIf=is_android] int32 tag;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=708" + }, + "network.mojom.DataElement": { + "definition": "union DataElement { DataElementBytes bytes; DataElementFile file; DataElementDataPipe data_pipe; DataElementChunkedDataPipe chunked_data_pipe;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_request.mojom;l=700" + }, + "network.mojom.URLResponseHead": { + "definition": "struct URLResponseHead { mojo_base.mojom.Time request_time; mojo_base.mojom.Time response_time; mojo_base.mojom.Time original_response_time; HttpResponseHeaders headers; string mime_type; string charset; int64 content_length = -1; int64 encoded_data_length = -1; network.mojom.EncodedBodyLength? encoded_body_length; bool network_accessed = false; LoadTimingInfo load_timing; LoadTimingInternalInfo? load_timing_internal_info; bool emitted_extra_info = false; bool was_fetched_via_spdy = false; bool was_alpn_negotiated = false; bool was_alternate_protocol_available = false; ConnectionInfo connection_info; string alpn_negotiated_protocol; AlternateProtocolUsage alternate_protocol_usage; IPEndPoint remote_endpoint; IPAddressSpace client_address_space = IPAddressSpace.kUnknown; IPAddressSpace response_address_space = IPAddressSpace.kUnknown; bool is_validated = false; bool was_fetched_via_cache = false; NavigationDeliveryType navigation_delivery_type = kDefault; ProxyChain proxy_chain; bool was_fetched_via_service_worker = false; FetchResponseSource service_worker_response_source = FetchResponseSource.kUnspecified; array url_list_via_service_worker; ServiceWorkerStatus? initial_service_worker_status; ServiceWorkerRouterInfo? service_worker_router_info; FetchResponseType response_type = FetchResponseType.kDefault; int64 padding = 0; string cache_storage_cache_name; uint32 cert_status = 0; SSLInfo? ssl_info; array request_cookies; array cors_exposed_header_names; bool did_service_worker_navigation_preload = false; bool async_revalidation_requested = false; bool did_mime_sniff = false; bool is_signed_exchange_inner_response = false; bool is_web_bundle_inner_response = false; bool was_in_prefetch_cache = false; bool is_prefetch_with_cross_site_contamination = false; bool was_cookie_in_request = false; bool intercepted_by_plugin = false; bool has_range_requested = false; bool timing_allow_passed = false; AuthChallengeInfo? auth_challenge_info; mojo_base.mojom.TimeTicks request_start; mojo_base.mojom.TimeTicks response_start; ParsedHeaders? parsed_headers; mojo_base.mojom.UnguessableToken? recursive_prefetch_token; array dns_aliases; bool has_authorization_covered_by_wildcard_on_preflight = false; bool request_include_credentials = true; bool should_use_source_hash_for_js_code_cache = false; PrivateNetworkAccessPreflightResult private_network_access_preflight_result = PrivateNetworkAccessPreflightResult.kNone; bool did_use_shared_dictionary = false; bool load_with_storage_access = false; array client_side_content_decoding_types; DeviceBoundSessionUsage device_bound_session_usage = DeviceBoundSessionUsage.kUnknown; bool from_synthetic_response = false; bool bypass_redirect_checks = false; UnencodedDigests? unencoded_digests; bool did_use_server_http_auth = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_response_head.mojom;l=39" + }, + "network.mojom.NavigationDeliveryType": { + "definition": "enum NavigationDeliveryType { kDefault, kNavigationalPrefetch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/url_response_head.mojom;l=34" + }, + "network.mojom.WebBundleHandle.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_bundle_handle.mojom;l=24" + }, + "network.mojom.WebBundleHandle.OnWebBundleError": { + "definition": "OnWebBundleError(WebBundleErrorType type, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_bundle_handle.mojom;l=27" + }, + "network.mojom.WebBundleHandle.OnWebBundleLoadFinished": { + "definition": "OnWebBundleLoadFinished(bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_bundle_handle.mojom;l=30" + }, + "network.mojom.WebBundleErrorType": { + "definition": "enum WebBundleErrorType { kMetadataParseError, kResponseParseError, kResourceNotFound, kMemoryQuotaExceeded, kServingConstraintsNotMet, kWebBundleFetchFailed, kWebBundleRedirected, kDeprecationWarning,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_bundle_handle.mojom;l=7" + }, + "network.mojom.WebClientHintsType": { + "definition": "enum WebClientHintsType { kDeviceMemory_DEPRECATED = 0, kDpr_DEPRECATED = 1, kResourceWidth_DEPRECATED = 2, kViewportWidth_DEPRECATED = 3, kRtt_DEPRECATED = 4, kDownlink_DEPRECATED = 5, kEct_DEPRECATED = 6, kUA = 8, kUAArch = 9, kUAPlatform = 10, kUAModel = 11, kUAMobile = 12, kUAFullVersion = 13, kUAPlatformVersion = 14, kPrefersColorScheme = 15, kUABitness = 16, kViewportHeight = 18, kDeviceMemory = 19, kDpr = 20, kResourceWidth = 21, kViewportWidth = 22, kUAFullVersionList = 23, kUAWoW64 = 25, kSaveData = 27, kPrefersReducedMotion = 28, kUAFormFactors = 29, kPrefersReducedTransparency = 30,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_client_hints_types.mojom;l=8" + }, + "network.mojom.WebSandboxFlags": { + "definition": "enum WebSandboxFlags { kNone = 0, kNavigation = 1, kPlugins = 2, kOrigin = 4, kForms = 8, kScripts = 16, kTopNavigation = 32, kPopups = 64, kAutomaticFeatures = 128, kPointerLock = 256, kDocumentDomain = 512, kOrientationLock = 1024, kPropagatesToAuxiliaryBrowsingContexts = 2048, kModals = 4096, kPresentationController = 8192, kTopNavigationByUserActivation = 16384, kDownloads = 32768, kStorageAccessByUserActivation = 65536, kTopNavigationToCustomProtocols = 131072, kAllowSameSiteNoneCookies = 262144, kAll = -1, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_sandbox_flags.mojom;l=17" + }, + "network.mojom.WebTransport.SendDatagram": { + "definition": "SendDatagram(mojo_base.mojom.ReadOnlyBuffer data) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=91" + }, + "network.mojom.WebTransport.CreateStream": { + "definition": "CreateStream(handle readable, handle? writable) => (bool succeeded, uint32 stream_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=97" + }, + "network.mojom.WebTransport.AcceptBidirectionalStream": { + "definition": "AcceptBidirectionalStream() => (uint32 stream_id, handle readable, handle writable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=102" + }, + "network.mojom.WebTransport.AcceptUnidirectionalStream": { + "definition": "AcceptUnidirectionalStream() => (uint32 stream_id, handle readable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=107" + }, + "network.mojom.WebTransport.SendFin": { + "definition": "SendFin(uint32 stream_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=114" + }, + "network.mojom.WebTransport.AbortStream": { + "definition": "AbortStream(uint32 stream_id, uint8 code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=119" + }, + "network.mojom.WebTransport.StopSending": { + "definition": "StopSending(uint32 stream_id, uint8 code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=124" + }, + "network.mojom.WebTransport.SetOutgoingDatagramExpirationDuration": { + "definition": "SetOutgoingDatagramExpirationDuration(mojo_base.mojom.TimeDelta duration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=129" + }, + "network.mojom.WebTransport.GetStats": { + "definition": "GetStats() => (WebTransportStats? stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=132" + }, + "network.mojom.WebTransport.Close": { + "definition": "Close(WebTransportCloseInfo? close_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=137" + }, + "network.mojom.WebTransportClient.OnDatagramReceived": { + "definition": "OnDatagramReceived(mojo_base.mojom.ReadOnlyBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=144" + }, + "network.mojom.WebTransportClient.OnIncomingStreamClosed": { + "definition": "OnIncomingStreamClosed(uint32 stream_id, bool fin_received);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=150" + }, + "network.mojom.WebTransportClient.OnOutgoingStreamClosed": { + "definition": "OnOutgoingStreamClosed(uint32 stream_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=154" + }, + "network.mojom.WebTransportClient.OnReceivedStopSending": { + "definition": "OnReceivedStopSending(uint32 stream_id, uint32 stream_error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=160" + }, + "network.mojom.WebTransportClient.OnReceivedResetStream": { + "definition": "OnReceivedResetStream(uint32 stream_id, uint32 stream_error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=166" + }, + "network.mojom.WebTransportClient.OnClosed": { + "definition": "OnClosed(WebTransportCloseInfo? close_info, WebTransportStats final_stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=172" + }, + "network.mojom.WebTransportHandshakeClient.OnBeforeConnect": { + "definition": "OnBeforeConnect(IPEndPoint server_address);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=187" + }, + "network.mojom.WebTransportHandshakeClient.OnConnectionEstablished": { + "definition": "OnConnectionEstablished(pending_remote transport, pending_receiver client, HttpResponseHeaders response_headers, string? selected_application_protocol, WebTransportStats initial_stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=190" + }, + "network.mojom.WebTransportHandshakeClient.OnHandshakeFailed": { + "definition": "OnHandshakeFailed(WebTransportError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=199" + }, + "network.mojom.WebTransportError": { + "definition": "struct WebTransportError { int32 net_error = 0; int32 quic_error = 0; string details; bool safe_to_report_details = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=14" + }, + "network.mojom.WebTransportCertificateFingerprint": { + "definition": "struct WebTransportCertificateFingerprint { string algorithm; string fingerprint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=35" + }, + "network.mojom.WebTransportCloseInfo": { + "definition": "struct WebTransportCloseInfo { uint32 code; string reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=43" + }, + "network.mojom.WebTransportStats": { + "definition": "struct WebTransportStats { mojo_base.mojom.Time timestamp; mojo_base.mojom.TimeDelta min_rtt; mojo_base.mojom.TimeDelta smoothed_rtt; mojo_base.mojom.TimeDelta rtt_variation; uint64 estimated_send_rate_bps; uint64 datagrams_expired_outgoing; uint64 datagrams_lost_outgoing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/web_transport.mojom;l=50" + }, + "network.mojom.WebSocketAuthenticationHandler.OnAuthRequired": { + "definition": "OnAuthRequired(AuthChallengeInfo info, HttpResponseHeaders headers, IPEndPoint remote_endpoint) => (AuthCredentials? credentials);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=51" + }, + "network.mojom.WebSocketHandshakeClient.OnOpeningHandshakeStarted": { + "definition": "OnOpeningHandshakeStarted(WebSocketHandshakeRequest request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=60" + }, + "network.mojom.WebSocketHandshakeClient.OnFailure": { + "definition": "OnFailure(string message, int32 net_error, int32 response_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=69" + }, + "network.mojom.WebSocketHandshakeClient.OnConnectionEstablished": { + "definition": "OnConnectionEstablished(pending_remote socket, pending_receiver client_receiver, WebSocketHandshakeResponse response, handle readable, handle writable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=79" + }, + "network.mojom.WebSocketClient.OnDataFrame": { + "definition": "OnDataFrame(bool fin, WebSocketMessageType type, uint64 data_length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=101" + }, + "network.mojom.WebSocketClient.OnDropChannel": { + "definition": "OnDropChannel(bool was_clean, uint16 code, string reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=119" + }, + "network.mojom.WebSocketClient.OnClosingHandshake": { + "definition": "OnClosingHandshake();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=123" + }, + "network.mojom.WebSocket.SendMessage": { + "definition": "SendMessage(WebSocketMessageType type, uint64 data_length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=138" + }, + "network.mojom.WebSocket.StartReceiving": { + "definition": "StartReceiving();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=144" + }, + "network.mojom.WebSocket.StartClosingHandshake": { + "definition": "StartClosingHandshake(uint16 code, string reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=155" + }, + "network.mojom.HttpHeader": { + "definition": "struct HttpHeader { string name; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=19" + }, + "network.mojom.WebSocketHandshakeRequest": { + "definition": "struct WebSocketHandshakeRequest { url.mojom.Url url; array headers; string headers_text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=26" + }, + "network.mojom.WebSocketHandshakeResponse": { + "definition": "struct WebSocketHandshakeResponse { url.mojom.Url url; HttpVersion http_version; int32 status_code; string status_text; IPEndPoint remote_endpoint; array headers; string headers_text; string selected_protocol; string extensions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=32" + }, + "network.mojom.WebSocketMessageType": { + "definition": "enum WebSocketMessageType { CONTINUATION, TEXT, BINARY, LAST = BINARY};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/websocket.mojom;l=11" + }, + "network.mojom.XFrameOptionsValue": { + "definition": "enum XFrameOptionsValue { kNone, kDeny, kSameOrigin, kAllowAll, kInvalid, kConflict };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/network/public/mojom/x_frame_options.mojom;l=9" + }, + "on_device_model.mojom.DownloaderParams": { + "definition": "struct DownloaderParams { bool require_persistent_mode = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/android/downloader_params.mojom;l=9" + }, + "on_device_model.mojom.StreamingResponder.OnResponse@0": { + "definition": "OnResponse@0(ResponseChunk chunk);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=74" + }, + "on_device_model.mojom.StreamingResponder.OnComplete@1": { + "definition": "OnComplete@1(ResponseSummary summary);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=79" + }, + "on_device_model.mojom.ContextClient.OnComplete@0": { + "definition": "OnComplete@0(uint32 tokens_processed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=88" + }, + "on_device_model.mojom.Session.Append@6": { + "definition": "[MinVersion=1] Append@6(AppendOptions options, pending_remote? client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=230" + }, + "on_device_model.mojom.Session.Generate@7": { + "definition": "[MinVersion=1] Generate@7( GenerateOptions options, pending_remote responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=236" + }, + "on_device_model.mojom.Session.GetSizeInTokens@5": { + "definition": "GetSizeInTokens@5(Input input) => (uint32 size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=242" + }, + "on_device_model.mojom.Session.Score@3": { + "definition": "Score@3(string text) => (float probability);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=246" + }, + "on_device_model.mojom.Session.Clone@4": { + "definition": "Clone@4(pending_receiver session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=250" + }, + "on_device_model.mojom.Session.GetProbabilitiesBlocking@8": { + "definition": "[MinVersion=3] GetProbabilitiesBlocking@8(string text) => (array probabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=256" + }, + "on_device_model.mojom.Session.SetPriority@9": { + "definition": "[MinVersion=4] SetPriority@9(Priority priority);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=262" + }, + "on_device_model.mojom.Session.AsrStream@10": { + "definition": "[MinVersion=5] AsrStream@10(AsrStreamOptions options, pending_receiver stream, pending_remote responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=266" + }, + "on_device_model.mojom.OnDeviceModel.StartSession@0": { + "definition": "StartSession@0(pending_receiver session, [MinVersion=1] SessionParams? params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=278" + }, + "on_device_model.mojom.OnDeviceModel.ClassifyTextSafety@1": { + "definition": "ClassifyTextSafety@1(string text) => (SafetyInfo? safety_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=282" + }, + "on_device_model.mojom.OnDeviceModel.DetectLanguage@2": { + "definition": "DetectLanguage@2(string text) => (LanguageDetectionResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=285" + }, + "on_device_model.mojom.OnDeviceModel.LoadAdaptation@3": { + "definition": "LoadAdaptation@3( LoadAdaptationParams params, pending_receiver model) => (LoadModelResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=289" + }, + "on_device_model.mojom.TextSafetySession.ClassifyTextSafety@1": { + "definition": "ClassifyTextSafety@1(string text) => (SafetyInfo? safety_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=300" + }, + "on_device_model.mojom.TextSafetySession.DetectLanguage@2": { + "definition": "DetectLanguage@2(string text) => (LanguageDetectionResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=304" + }, + "on_device_model.mojom.TextSafetySession.Clone@3": { + "definition": "Clone@3(pending_receiver session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=307" + }, + "on_device_model.mojom.TextSafetyModel.StartSession@0": { + "definition": "StartSession@0(pending_receiver session);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=315" + }, + "on_device_model.mojom.AsrStreamResponder.OnResponse@0": { + "definition": "OnResponse@0(array result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=371" + }, + "on_device_model.mojom.AsrStreamInput.AddAudioChunk@0": { + "definition": "AddAudioChunk@0(AudioData data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=383" + }, + "on_device_model.mojom.AdaptationAssets": { + "definition": "struct AdaptationAssets { mojo_base.mojom.File? weights; mojo_base.mojom.FilePath? weights_path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=13" + }, + "on_device_model.mojom.LanguageDetectionResult": { + "definition": "struct LanguageDetectionResult { string code; float reliability;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=27" + }, + "on_device_model.mojom.SafetyInfo": { + "definition": "struct SafetyInfo { array class_scores; LanguageDetectionResult? language;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=38" + }, + "on_device_model.mojom.ResponseChunk": { + "definition": "struct ResponseChunk { string text; SafetyInfo? safety_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=49" + }, + "on_device_model.mojom.ResponseSummary": { + "definition": "struct ResponseSummary { SafetyInfo? safety_info; uint32 output_token_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=61" + }, + "on_device_model.mojom.LoadAdaptationParams": { + "definition": "struct LoadAdaptationParams { AdaptationAssets assets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=93" + }, + "on_device_model.mojom.Capabilities": { + "definition": "struct Capabilities { bool image_input = false; bool audio_input = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=100" + }, + "on_device_model.mojom.SessionParams": { + "definition": "struct SessionParams { uint32 max_tokens = 0; Capabilities capabilities; [MinVersion=1] uint32 top_k; [MinVersion=1] float temperature;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=110" + }, + "on_device_model.mojom.Input": { + "definition": "struct Input { array pieces;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=170" + }, + "on_device_model.mojom.AppendOptions": { + "definition": "struct AppendOptions { Input input; uint32 max_tokens = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=177" + }, + "on_device_model.mojom.GenerateOptions": { + "definition": "struct GenerateOptions { uint32 max_output_tokens = 0; [MinVersion=2] ResponseConstraint? constraint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=201" + }, + "on_device_model.mojom.AudioData": { + "definition": "struct AudioData { int32 channel_count; int32 sample_rate; int32 frame_count; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=347" + }, + "on_device_model.mojom.SpeechRecognitionResult": { + "definition": "struct SpeechRecognitionResult { string transcript; bool is_final;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=362" + }, + "on_device_model.mojom.AsrStreamOptions": { + "definition": "struct AsrStreamOptions { uint32 sample_rate_hz = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=375" + }, + "on_device_model.mojom.DevicePerformanceInfo": { + "definition": "struct DevicePerformanceInfo { PerformanceClass performance_class; uint64 vram_mb;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=386" + }, + "on_device_model.mojom.DeviceInfo": { + "definition": "struct DeviceInfo { int32 vendor_id; int32 device_id; string driver_version; bool supports_fp16;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=393" + }, + "on_device_model.mojom.Token": { + "definition": "enum Token { kSystem, kModel, kUser, [Default] kEnd,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=135" + }, + "on_device_model.mojom.Priority": { + "definition": "enum Priority { [Default] kForeground, kBackground,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=215" + }, + "on_device_model.mojom.PerformanceClass": { + "definition": "enum PerformanceClass { [Default] kError, kGpuBlocked, kFailedToLoadLibrary, kVeryLow, kLow, kMedium, kHigh, kVeryHigh,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=321" + }, + "on_device_model.mojom.LoadModelResult": { + "definition": "enum LoadModelResult { kSuccess, kGpuBlocked, [Default] kFailedToLoadLibrary, [MinVersion=1, EnableIf=is_chromeos] kCrosNeedReboot,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=339" + }, + "on_device_model.mojom.InputPiece": { + "definition": "union InputPiece { Token token; string text; skia.mojom.BitmapWithArbitraryBpp bitmap; [Default] bool unknown_type; [MinVersion=1] AudioData audio;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=150" + }, + "on_device_model.mojom.ResponseConstraint": { + "definition": "union ResponseConstraint { string json_schema; string regex; [Default] bool unknown_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model.mojom;l=187" + }, + "on_device_model.mojom.PlatformModelProgressObserver.Progress@0": { + "definition": "Progress@0(double progress);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=105" + }, + "on_device_model.mojom.OnDeviceModelService.LoadModel": { + "definition": "LoadModel(LoadModelParams params, pending_receiver model) => (LoadModelResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=148" + }, + "on_device_model.mojom.OnDeviceModelService.GetCapabilities": { + "definition": "GetCapabilities(ModelFile weights) => (Capabilities capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=153" + }, + "on_device_model.mojom.OnDeviceModelService.LoadTextSafetyModel": { + "definition": "LoadTextSafetyModel( TextSafetyModelParams params, pending_receiver model);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=157" + }, + "on_device_model.mojom.OnDeviceModelService.GetDeviceAndPerformanceInfo": { + "definition": "GetDeviceAndPerformanceInfo() => (DevicePerformanceInfo performanceInfo, DeviceInfo device_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=162" + }, + "on_device_model.mojom.OnDeviceModelPlatformService.LoadPlatformModel@0": { + "definition": "LoadPlatformModel@0( mojo_base.mojom.Uuid uuid, pending_receiver model, pending_remote? progress_observer) => (LoadModelResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=176" + }, + "on_device_model.mojom.OnDeviceModelPlatformService.GetPlatformModelState@1": { + "definition": "GetPlatformModelState@1(mojo_base.mojom.Uuid uuid) => (PlatformModelState result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=183" + }, + "on_device_model.mojom.OnDeviceModelPlatformService.GetEstimatedPerformanceClass@2": { + "definition": "GetEstimatedPerformanceClass@2() => (PerformanceClass performance_class);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=187" + }, + "on_device_model.mojom.OnDeviceModelPlatformService.FormatInput@3": { + "definition": "FormatInput@3(mojo_base.mojom.Uuid uuid, FormatFeature feature, map fields) => (string? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=198" + }, + "on_device_model.mojom.OnDeviceModelPlatformService.ValidateSafetyResult@4": { + "definition": "ValidateSafetyResult@4( SafetyFeature safety_feature, string text, SafetyInfo safety_info) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=205" + }, + "on_device_model.mojom.ModelAssets": { + "definition": "struct ModelAssets { ModelFile weights; mojo_base.mojom.FilePath? sp_model_path; mojo_base.mojom.File? cache; mojo_base.mojom.File? encoder_cache; mojo_base.mojom.File? adapter_cache;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=26" + }, + "on_device_model.mojom.LoadModelParams": { + "definition": "struct LoadModelParams { ModelBackendType backend_type; ModelAssets assets; uint32 max_tokens; array adaptation_ranks; ModelPerformanceHint performance_hint = kHighestQuality;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=59" + }, + "on_device_model.mojom.TextSafetyModelAssets": { + "definition": "struct TextSafetyModelAssets { mojo_base.mojom.ReadOnlyFile data; mojo_base.mojom.ReadOnlyFile sp_model;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=78" + }, + "on_device_model.mojom.BertSafetyModelAssets": { + "definition": "struct BertSafetyModelAssets { mojo_base.mojom.ReadOnlyFile model;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=83" + }, + "on_device_model.mojom.LanguageModelAssets": { + "definition": "struct LanguageModelAssets { mojo_base.mojom.ReadOnlyFile model;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=87" + }, + "on_device_model.mojom.TextSafetyModelParams": { + "definition": "struct TextSafetyModelParams { SafetyModelAssets? safety_assets; LanguageModelAssets? language_assets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=96" + }, + "on_device_model.mojom.ModelBackendType": { + "definition": "enum ModelBackendType { kGpu, kApu, kCpu,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=42" + }, + "on_device_model.mojom.ModelPerformanceHint": { + "definition": "enum ModelPerformanceHint { kHighestQuality, kFastestInference,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=53" + }, + "on_device_model.mojom.PlatformModelState": { + "definition": "enum PlatformModelState { [Default] kUnknownState, kInstalledOnDisk, kInvalidUuid, kInvalidDlcClient, kInvalidDlcPackage, kInvalidDlcVerifiedState, kInvalidDlcInstall, kInvalidModelFormat, kInvalidModelDescriptor, kInvalidBaseModelDescriptor,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=109" + }, + "on_device_model.mojom.FormatFeature": { + "definition": "enum FormatFeature { [Default] kNone = 0, kPrompt = 1, kAudioSummary = 2, kAudioTitle = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=123" + }, + "on_device_model.mojom.SafetyFeature": { + "definition": "enum SafetyFeature { [Default] kGeneral = 0, kAudioSummaryRequest = 1, kAudioTitleRequest = 2, kAudioSummaryResponse = 3, kAudioTitleResponse = 4, [MinVersion=1] kAudioSummaryResponseV2 = 5, [MinVersion=1] kAudioTitleResponseV2 = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=131" + }, + "on_device_model.mojom.ModelFile": { + "definition": "union ModelFile { mojo_base.mojom.File file; mojo_base.mojom.FilePath path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=15" + }, + "on_device_model.mojom.SafetyModelAssets": { + "definition": "union SafetyModelAssets { TextSafetyModelAssets ts_assets; BertSafetyModelAssets bs_assets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/on_device_model/public/mojom/on_device_model_service.mojom;l=91" + }, + "passage_embeddings.mojom.PassageEmbedder.GenerateEmbeddings": { + "definition": "GenerateEmbeddings(array passages, PassagePriority priority) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/passage_embeddings/public/mojom/passage_embeddings.mojom;l=36" + }, + "passage_embeddings.mojom.PassageEmbeddingsService.LoadModels": { + "definition": "[AllowedContext=sandbox.mojom.Context.kBrowser] LoadModels(PassageEmbeddingsLoadModelsParams model_params, PassageEmbedderParams params, pending_receiver model) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/passage_embeddings/public/mojom/passage_embeddings.mojom;l=71" + }, + "passage_embeddings.mojom.PassageEmbeddingsResult": { + "definition": "struct PassageEmbeddingsResult { array embeddings;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/passage_embeddings/public/mojom/passage_embeddings.mojom;l=13" + }, + "passage_embeddings.mojom.PassageEmbeddingsLoadModelsParams": { + "definition": "struct PassageEmbeddingsLoadModelsParams { mojo_base.mojom.ReadOnlyFile embeddings_model; mojo_base.mojom.ReadOnlyFile sp_model; uint32 input_window_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/passage_embeddings/public/mojom/passage_embeddings.mojom;l=41" + }, + "passage_embeddings.mojom.PassageEmbedderParams": { + "definition": "struct PassageEmbedderParams { uint32 user_initiated_priority_num_threads; uint32 urgent_priority_num_threads; uint32 passive_priority_num_threads; uint32 embedder_cache_size; bool allow_gpu_execution;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/passage_embeddings/public/mojom/passage_embeddings.mojom;l=52" + }, + "passage_embeddings.mojom.PassagePriority": { + "definition": "enum PassagePriority { kUnknown, kUrgent, kUserInitiated, kPassive,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/passage_embeddings/public/mojom/passage_embeddings.mojom;l=20" + }, + "prefs.mojom.ResetOnLoadObserver.OnResetOnLoad": { + "definition": "OnResetOnLoad();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/preferences.mojom;l=52" + }, + "prefs.mojom.TrackedPersistentPrefStoreConfiguration": { + "definition": "struct TrackedPersistentPrefStoreConfiguration { mojo_base.mojom.FilePath unprotected_pref_filename; mojo_base.mojom.FilePath protected_pref_filename; array tracking_configuration; uint64 reporting_ids_count; string seed; string registry_seed; mojo_base.mojom.String16 registry_path; pending_remote? validation_delegate; pending_remote? reset_on_load_observer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/preferences.mojom;l=15" + }, + "prefs.mojom.TrackedPreferenceMetadata": { + "definition": "struct TrackedPreferenceMetadata { uint64 reporting_id; string name; EnforcementLevel enforcement_level; PrefTrackingStrategy strategy; ValueType value_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/preferences.mojom;l=27" + }, + "prefs.mojom.EnforcementLevel": { + "definition": "enum EnforcementLevel { NO_ENFORCEMENT, ENFORCE_ON_LOAD };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/preferences.mojom;l=28" + }, + "prefs.mojom.PrefTrackingStrategy": { + "definition": "enum PrefTrackingStrategy { ATOMIC, SPLIT, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/preferences.mojom;l=30" + }, + "prefs.mojom.ValueType": { + "definition": "enum ValueType { IMPERSONAL, PERSONAL, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/preferences.mojom;l=38" + }, + "prefs.mojom.TrackedPreferenceValidationDelegate.OnAtomicPreferenceValidation": { + "definition": "OnAtomicPreferenceValidation( string pref_path, mojo_base.mojom.Value? value, ValueState value_state, ValueState external_validation_value_state, bool is_personal);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/tracked_preference_validation_delegate.mojom;l=56" + }, + "prefs.mojom.TrackedPreferenceValidationDelegate.OnSplitPreferenceValidation": { + "definition": "OnSplitPreferenceValidation( string pref_path, array invalid_keys, array external_validation_invalid_keys, ValueState value_state, ValueState external_validation_value_state, bool is_personal);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/tracked_preference_validation_delegate.mojom;l=66" + }, + "prefs.mojom.ValueState": { + "definition": "enum ValueState { UNCHANGED, CLEARED, CHANGED, UNTRUSTED_UNKNOWN_VALUE, TRUSTED_UNKNOWN_VALUE, TRUSTED_NULL_VALUE, UNSUPPORTED, UNCHANGED_ENCRYPTED, CHANGED_ENCRYPTED, CLEARED_ENCRYPTED, UNCHANGED_VIA_HMAC_FALLBACK, CHANGED_VIA_HMAC_FALLBACK, CLEARED_VIA_HMAC_FALLBACK };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/preferences/public/mojom/tracked_preference_validation_delegate.mojom;l=12" + }, + "proxy_resolver.mojom.HostResolverRequestClient.ReportResult": { + "definition": "ReportResult(int32 error, array result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=31" + }, + "proxy_resolver.mojom.ProxyResolver.GetProxyForUrl": { + "definition": "GetProxyForUrl( url.mojom.Url url, network.mojom.NetworkAnonymizationKey network_anonymization_key, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=44" + }, + "proxy_resolver.mojom.ProxyResolverRequestClient.ReportResult": { + "definition": "ReportResult(int32 error, ProxyInfo proxy_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=51" + }, + "proxy_resolver.mojom.ProxyResolverRequestClient.Alert": { + "definition": "Alert(string error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=52" + }, + "proxy_resolver.mojom.ProxyResolverRequestClient.OnError": { + "definition": "OnError(int32 line_number, string error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=54" + }, + "proxy_resolver.mojom.ProxyResolverRequestClient.ResolveDns": { + "definition": "ResolveDns( string host, HostResolveOperation operation, network.mojom.NetworkAnonymizationKey network_anonymization_key, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=63" + }, + "proxy_resolver.mojom.ProxyResolverFactory.CreateResolver": { + "definition": "CreateResolver(string pac_script, pending_receiver receiver, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=78" + }, + "proxy_resolver.mojom.ProxyResolverFactoryRequestClient.ReportResult": { + "definition": "ReportResult(int32 error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=84" + }, + "proxy_resolver.mojom.ProxyResolverFactoryRequestClient.Alert": { + "definition": "Alert(string error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=85" + }, + "proxy_resolver.mojom.ProxyResolverFactoryRequestClient.OnError": { + "definition": "OnError(int32 line_number, string error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=87" + }, + "proxy_resolver.mojom.ProxyResolverFactoryRequestClient.ResolveDns": { + "definition": "ResolveDns(string host, HostResolveOperation operation, network.mojom.NetworkAnonymizationKey network_anonymization_key, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=88" + }, + "proxy_resolver.mojom.SystemProxyResolver.GetProxyForUrl": { + "definition": "GetProxyForUrl(url.mojom.Url url) => (network.mojom.ProxyList proxy_list, SystemProxyResolutionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=133" + }, + "proxy_resolver.mojom.ProxyInfo": { + "definition": "struct ProxyInfo { array proxy_chains;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=34" + }, + "proxy_resolver.mojom.SystemProxyResolutionStatus": { + "definition": "struct SystemProxyResolutionStatus { bool is_success; int32 os_error; [EnableIf=is_win] WinHttpStatus? win_http_status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=117" + }, + "proxy_resolver.mojom.HostResolveOperation": { + "definition": "enum HostResolveOperation { DNS_RESOLVE, DNS_RESOLVE_EX, MY_IP_ADDRESS, MY_IP_ADDRESS_EX,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=20" + }, + "proxy_resolver.mojom.WinHttpStatus": { + "definition": "enum WinHttpStatus { kOk, kAborted, kWinHttpOpenFailed, kWinHttpSetTimeoutsFailed, kWinHttpSetStatusCallbackFailed, kWinHttpGetIEProxyConfigForCurrentUserFailed, kWinHttpCreateProxyResolverFailed, kWinHttpGetProxyForURLExFailed, kStatusCallbackFailed, kWinHttpGetProxyResultFailed, kEmptyProxyList,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/proxy_resolver/public/mojom/proxy_resolver.mojom;l=100" + }, + "memory_instrumentation.mojom.ClientProcess.RequestChromeMemoryDump": { + "definition": "RequestChromeMemoryDump(RequestArgs args) => (RequestOutcome outcome, uint64 dump_id, RawProcessMemoryDump? raw_process_memory_dump);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=319" + }, + "memory_instrumentation.mojom.ClientProcess.RequestOSMemoryDump": { + "definition": "RequestOSMemoryDump( MemoryMapOption option, array flags, array pids) => (RequestOutcome outcome, map dumps);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=338" + }, + "memory_instrumentation.mojom.HeapProfiler.DumpProcessesForTracing": { + "definition": "DumpProcessesForTracing( bool strip_path_from_mapped_files, bool write_proto) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=368" + }, + "memory_instrumentation.mojom.HeapProfilerHelper.GetVmRegionsForHeapProfiler": { + "definition": "GetVmRegionsForHeapProfiler(array pids) => (map> vm_regions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=378" + }, + "memory_instrumentation.mojom.Coordinator.RequestGlobalMemoryDump": { + "definition": "RequestGlobalMemoryDump(DumpType dump_type, LevelOfDetail level_of_detail, Determinism determinism, array allocator_dump_names) => (RequestOutcome outcome, GlobalMemoryDump? global_memory_dump);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=395" + }, + "memory_instrumentation.mojom.Coordinator.RequestGlobalMemoryDumpForPid": { + "definition": "RequestGlobalMemoryDumpForPid( mojo_base.mojom.ProcessId pid, array allocator_dump_names) => (RequestOutcome outcome, GlobalMemoryDump? global_memory_dump);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=403" + }, + "memory_instrumentation.mojom.Coordinator.RequestPrivateMemoryFootprint": { + "definition": "RequestPrivateMemoryFootprint(mojo_base.mojom.ProcessId pid) => (RequestOutcome outcome, GlobalMemoryDump? global_memory_dump);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=410" + }, + "memory_instrumentation.mojom.Coordinator.RequestGlobalMemoryDumpAndAppendToTrace": { + "definition": "RequestGlobalMemoryDumpAndAppendToTrace(DumpType dump_type, LevelOfDetail level_of_detail, Determinism determinism) => (RequestOutcome outcome, uint64 dump_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=415" + }, + "memory_instrumentation.mojom.CoordinatorConnector.RegisterCoordinatorClient": { + "definition": "RegisterCoordinatorClient(pending_receiver receiver, pending_remote client_process);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=427" + }, + "memory_instrumentation.mojom.RequestArgs": { + "definition": "struct RequestArgs { uint64 dump_guid; DumpType dump_type; LevelOfDetail level_of_detail; Determinism determinism;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=98" + }, + "memory_instrumentation.mojom.RawAllocatorDumpEdge": { + "definition": "struct RawAllocatorDumpEdge { uint64 source_id; uint64 target_id; int32 importance; bool overridable;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=105" + }, + "memory_instrumentation.mojom.RawAllocatorDumpEntry": { + "definition": "struct RawAllocatorDumpEntry { string name; string units; RawAllocatorDumpEntryValue value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=117" + }, + "memory_instrumentation.mojom.RawAllocatorDump": { + "definition": "struct RawAllocatorDump { uint64 id; string absolute_name; bool weak; LevelOfDetail level_of_detail; array entries;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=123" + }, + "memory_instrumentation.mojom.RawProcessMemoryDump": { + "definition": "struct RawProcessMemoryDump { LevelOfDetail level_of_detail; array allocator_dump_edges; array allocator_dumps;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=131" + }, + "memory_instrumentation.mojom.VmRegion": { + "definition": "struct VmRegion { const uint32 kProtectionFlagsRead = 4; const uint32 kProtectionFlagsWrite = 2; const uint32 kProtectionFlagsExec = 1; const uint32 kProtectionFlagsMayshare = 128; uint64 start_address; uint64 size_in_bytes; uint64 module_timestamp; string module_debugid; string module_debug_path; uint32 protection_flags; string mapped_file; uint64 byte_stats_private_dirty_resident; uint64 byte_stats_private_clean_resident; uint64 byte_stats_shared_dirty_resident; uint64 byte_stats_shared_clean_resident; uint64 byte_stats_swapped; uint64 byte_locked; uint64 byte_stats_proportional_resident;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=137" + }, + "memory_instrumentation.mojom.PlatformPrivateFootprint": { + "definition": "struct PlatformPrivateFootprint { uint64 phys_footprint_bytes = 0; uint64 internal_bytes = 0; uint64 compressed_bytes = 0; uint64 rss_anon_bytes = 0; uint64 vm_swap_bytes = 0; uint64 private_bytes = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=169" + }, + "memory_instrumentation.mojom.RawOSMemDump": { + "definition": "struct RawOSMemDump { uint32 resident_set_kb = 0; uint32 peak_resident_set_kb = 0; bool is_peak_rss_resettable = false; PlatformPrivateFootprint platform_private_footprint; array memory_maps; array native_library_pages_bitmap; [EnableIf=is_android|is_chromeos|is_linux] uint32 mappings_count = 0; [EnableIf=is_android|is_chromeos|is_linux] uint32 pss_kb = 0; [EnableIf=is_android|is_chromeos|is_linux] uint32 swap_pss_kb = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=188" + }, + "memory_instrumentation.mojom.OSMemDump": { + "definition": "struct OSMemDump { uint32 resident_set_kb = 0; uint32 peak_resident_set_kb = 0; bool is_peak_rss_resettable = false; uint32 private_footprint_kb = 0; uint32 shared_footprint_kb = 0; [EnableIf=is_android|is_chromeos|is_linux] uint32 private_footprint_swap_kb = 0; [EnableIf=is_android|is_chromeos|is_linux] uint32 mappings_count = 0; [EnableIf=is_android|is_chromeos|is_linux] uint32 pss_kb = 0; [EnableIf=is_android|is_chromeos|is_linux] uint32 swap_pss_kb = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=216" + }, + "memory_instrumentation.mojom.AllocatorMemDump": { + "definition": "struct AllocatorMemDump { map numeric_entries; map children;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=262" + }, + "memory_instrumentation.mojom.ProcessMemoryDump": { + "definition": "struct ProcessMemoryDump { ProcessType process_type; OSMemDump os_dump; map chrome_allocator_dumps; mojo_base.mojom.ProcessId pid; string? service_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=274" + }, + "memory_instrumentation.mojom.AggregatedMetrics": { + "definition": "struct AggregatedMetrics { int32 native_library_resident_kb = 0; int32 native_library_resident_not_ordered_kb = 0; int32 native_library_not_resident_ordered_kb = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=294" + }, + "memory_instrumentation.mojom.GlobalMemoryDump": { + "definition": "struct GlobalMemoryDump { mojo_base.mojom.TimeTicks start_time; array process_dumps; AggregatedMetrics aggregated_metrics;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=303" + }, + "memory_instrumentation.mojom.HeapProfileResult": { + "definition": "struct HeapProfileResult { mojo_base.mojom.ProcessId pid; mojo_base.mojom.BigString json;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=345" + }, + "memory_instrumentation.mojom.DumpType": { + "definition": "enum DumpType { PERIODIC_INTERVAL, EXPLICITLY_TRIGGERED, SUMMARY_ONLY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=12" + }, + "memory_instrumentation.mojom.LevelOfDetail": { + "definition": "enum LevelOfDetail { BACKGROUND, LIGHT, DETAILED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=18" + }, + "memory_instrumentation.mojom.Determinism": { + "definition": "enum Determinism { NONE, FORCE_GC,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=26" + }, + "memory_instrumentation.mojom.ProcessType": { + "definition": "enum ProcessType { OTHER, BROWSER, RENDERER, GPU, UTILITY, PLUGIN, ARC,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=31" + }, + "memory_instrumentation.mojom.MemoryMapOption": { + "definition": "enum MemoryMapOption { NONE, MODULES, FULL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=41" + }, + "memory_instrumentation.mojom.MemDumpFlags": { + "definition": "enum MemDumpFlags { MEM_DUMP_COUNT_MAPPINGS = 0, MEM_DUMP_PSS = 1, MEM_DUMP_PAGES_BITMAP = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=54" + }, + "memory_instrumentation.mojom.RequestOutcome": { + "definition": "enum RequestOutcome { kSuccess = 0, kRedundant = 1, kFillOsMemoryDumpFailed = 2, kFillProcessMemoryMapsFailed = 3, kNullPid = 4, kProcessNotFound = 5, kInvalidTracingState = 6, kProcessUnregistered = 7, kTimeout = 8, kInProcessMemoryDumpFailed = 9,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=68" + }, + "memory_instrumentation.mojom.RawAllocatorDumpEntryValue": { + "definition": "union RawAllocatorDumpEntryValue { uint64 value_uint64; string value_string;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom;l=112" + }, + "screen_ai.mojom.ScreenAIServiceShutdownHandler.ShuttingDownOnIdle": { + "definition": "ShuttingDownOnIdle();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_factory.mojom;l=18" + }, + "screen_ai.mojom.ScreenAIServiceFactory.InitializeOCR": { + "definition": "[RuntimeFeature=ax.mojom.features.kScreenAIOCREnabled] InitializeOCR( mojo_base.mojom.FilePath library_path, map model_files, pending_receiver? ocr_service_receiver) => (bool initialized);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_factory.mojom;l=38" + }, + "screen_ai.mojom.ScreenAIServiceFactory.InitializeMainContentExtraction": { + "definition": "[RuntimeFeature=ax.mojom.features.kScreenAIMainContentExtractionEnabled] InitializeMainContentExtraction( mojo_base.mojom.FilePath library_path, map model_files, pending_receiver? main_content_extractor_service) => (bool initialized);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_factory.mojom;l=52" + }, + "screen_ai.mojom.ScreenAIServiceFactory.BindShutdownHandler": { + "definition": "BindShutdownHandler( pending_remote shutdown_handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_factory.mojom;l=61" + }, + "screen_ai.mojom.ScreenAIAnnotator.PerformOcrAndReturnAnnotation": { + "definition": "PerformOcrAndReturnAnnotation(skia.mojom.BitmapN32 image) => (VisualAnnotation visual_annotation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=140" + }, + "screen_ai.mojom.ScreenAIAnnotator.SetClientType": { + "definition": "SetClientType(OcrClientType client_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=144" + }, + "screen_ai.mojom.ScreenAIAnnotator.GetMaxImageDimension": { + "definition": "GetMaxImageDimension() => (uint32 max_dimension);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=149" + }, + "screen_ai.mojom.ScreenAIAnnotator.SetOCRLightMode": { + "definition": "SetOCRLightMode(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=153" + }, + "screen_ai.mojom.ScreenAIAnnotator.IsOCRBusy": { + "definition": "IsOCRBusy() => (bool busy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=158" + }, + "screen_ai.mojom.Screen2xMainContentExtractor.ExtractMainContent": { + "definition": "ExtractMainContent(ax.mojom.AXTreeUpdate snapshot) => (array content_node_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=168" + }, + "screen_ai.mojom.Screen2xMainContentExtractor.ExtractMainNode": { + "definition": "ExtractMainNode(ax.mojom.AXTreeUpdate snapshot) => (int32 main_node_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=175" + }, + "screen_ai.mojom.Screen2xMainContentExtractor.IdentifyMainNode": { + "definition": "IdentifyMainNode(ax.mojom.AXTreeUpdate ax_tree) => (ax.mojom.AXTreeID tree_id, int32 node_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=180" + }, + "screen_ai.mojom.Screen2xMainContentExtractor.SetClientType": { + "definition": "SetClientType(MceClientType client_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=184" + }, + "screen_ai.mojom.OCRService.BindAnnotator": { + "definition": "BindAnnotator(pending_receiver? annotator);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=195" + }, + "screen_ai.mojom.MainContentExtractionService.BindMainContentExtractor": { + "definition": "BindMainContentExtractor(pending_receiver? main_content_extractor);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=207" + }, + "screen_ai.mojom.VisualAnnotation": { + "definition": "struct VisualAnnotation { array lines;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=52" + }, + "screen_ai.mojom.LineBox": { + "definition": "struct LineBox { array words; string text_line; string language; int32 block_id; int32 paragraph_id; gfx.mojom.Rect bounding_box; float bounding_box_angle; float confidence;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=57" + }, + "screen_ai.mojom.WordBox": { + "definition": "struct WordBox { string word; string language; gfx.mojom.Rect bounding_box; float bounding_box_angle; Direction direction; gfx.mojom.Rect whitespace_bounding_box; float whitespace_bounding_box_angle; float confidence;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=87" + }, + "screen_ai.mojom.Direction": { + "definition": "enum Direction { DIRECTION_UNSPECIFIED, DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_TOP_TO_BOTTOM,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=15" + }, + "screen_ai.mojom.OcrClientType": { + "definition": "enum OcrClientType { kTest, kPdfViewer, kLocalSearch, kCameraApp, kMediaApp, kScreenshotTextDetection,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=23" + }, + "screen_ai.mojom.MceClientType": { + "definition": "enum MceClientType { kTest, kReadingMode, kMainNode, kMahi,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/screen_ai/public/mojom/screen_ai_service.mojom;l=40" + }, + "service_manager.mojom.ProcessMetadata.SetPID": { + "definition": "SetPID(mojo_base.mojom.ProcessId pid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=90" + }, + "service_manager.mojom.Connector.BindInterface": { + "definition": "BindInterface(ServiceFilter filter, string interface_name, handle interface_pipe, BindInterfacePriority priority) => (ConnectResult result, Identity? identity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=125" + }, + "service_manager.mojom.Connector.QueryService": { + "definition": "QueryService(string service_name) => (ServiceInfo? info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=135" + }, + "service_manager.mojom.Connector.WarmService": { + "definition": "WarmService(ServiceFilter filter) => (ConnectResult result, Identity? identity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=146" + }, + "service_manager.mojom.Connector.RegisterServiceInstance": { + "definition": "RegisterServiceInstance(Identity identity, handle service, pending_receiver? metadata_receiver) => (ConnectResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=174" + }, + "service_manager.mojom.Connector.Clone": { + "definition": "Clone(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=182" + }, + "service_manager.mojom.Identity": { + "definition": "struct Identity { string name; mojo_base.mojom.Token instance_group; mojo_base.mojom.Token instance_id; mojo_base.mojom.Token globally_unique_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=46" + }, + "service_manager.mojom.ServiceInfo": { + "definition": "struct ServiceInfo { string sandbox_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=78" + }, + "service_manager.mojom.ConnectResult": { + "definition": "enum ConnectResult { SUCCEEDED, INVALID_ARGUMENT, ACCESS_DENIED};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=15" + }, + "service_manager.mojom.BindInterfacePriority": { + "definition": "enum BindInterfacePriority { kImportant, kBestEffort,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/connector.mojom;l=31" + }, + "service_manager.mojom.Constants_UnusedStruct_Internal": { + "definition": "struct Constants_UnusedStruct_Internal {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/constants.mojom;l=22" + }, + "service_manager.mojom.InterfaceProvider.GetInterface": { + "definition": "GetInterface(string interface_name, handle pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/interface_provider.mojom;l=16" + }, + "service_manager.mojom.InterfaceSet": { + "definition": "struct InterfaceSet { array interfaces;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/interface_provider_spec.mojom;l=11" + }, + "service_manager.mojom.CapabilitySet": { + "definition": "struct CapabilitySet { array capabilities;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/interface_provider_spec.mojom;l=18" + }, + "service_manager.mojom.InterfaceProviderSpec": { + "definition": "struct InterfaceProviderSpec { map provides; map needs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/interface_provider_spec.mojom;l=25" + }, + "service_manager.mojom.Service.OnStart": { + "definition": "OnStart(Identity identity) => (pending_receiver connector_receiver, pending_associated_receiver control_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service.mojom;l=50" + }, + "service_manager.mojom.Service.OnBindInterface": { + "definition": "OnBindInterface(BindSourceInfo source, string interface_name, handle interface_pipe) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service.mojom;l=73" + }, + "service_manager.mojom.Service.CreatePackagedServiceInstance": { + "definition": "CreatePackagedServiceInstance(Identity identity, pending_receiver receiver, pending_remote metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service.mojom;l=85" + }, + "service_manager.mojom.BindSourceInfo": { + "definition": "struct BindSourceInfo { Identity identity; CapabilitySet required_capabilities;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service.mojom;l=14" + }, + "service_manager.mojom.ServiceControl.RequestQuit": { + "definition": "RequestQuit();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_control.mojom;l=15" + }, + "service_manager.mojom.ServiceFilter": { + "definition": "struct ServiceFilter { string service_name; mojo_base.mojom.Token? instance_group; mojo_base.mojom.Token? instance_id; mojo_base.mojom.Token? globally_unique_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_filter.mojom;l=18" + }, + "service_manager.mojom.ServiceManagerListener.OnInit": { + "definition": "OnInit(array running_services);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=48" + }, + "service_manager.mojom.ServiceManagerListener.OnServiceCreated": { + "definition": "OnServiceCreated(RunningServiceInfo service);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=57" + }, + "service_manager.mojom.ServiceManagerListener.OnServiceStarted": { + "definition": "OnServiceStarted(Identity identity, uint32 pid_deprecated);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=67" + }, + "service_manager.mojom.ServiceManagerListener.OnServicePIDReceived": { + "definition": "OnServicePIDReceived(Identity identity, uint32 pid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=71" + }, + "service_manager.mojom.ServiceManagerListener.OnServiceFailedToStart": { + "definition": "OnServiceFailedToStart(Identity identity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=75" + }, + "service_manager.mojom.ServiceManagerListener.OnServiceStopped": { + "definition": "OnServiceStopped(Identity identity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=79" + }, + "service_manager.mojom.ServiceManager.AddListener": { + "definition": "AddListener(pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=84" + }, + "service_manager.mojom.RunningServiceInfo": { + "definition": "struct RunningServiceInfo { Identity identity; uint32 pid; InstanceState state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=36" + }, + "service_manager.mojom.InstanceState": { + "definition": "enum InstanceState { kCreated, kStarted, kUnreachable,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/service_manager/public/mojom/service_manager.mojom;l=9" + }, + "shape_detection.mojom.BarcodeDetection.Detect": { + "definition": "Detect(skia.mojom.BitmapN32 bitmap_data) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/barcodedetection.mojom;l=40" + }, + "shape_detection.mojom.BarcodeDetectionResult": { + "definition": "struct BarcodeDetectionResult { string raw_value; gfx.mojom.RectF bounding_box; BarcodeFormat format; array corner_points;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/barcodedetection.mojom;l=30" + }, + "shape_detection.mojom.BarcodeFormat": { + "definition": "enum BarcodeFormat { AZTEC, CODE_128, CODE_39, CODE_93, CODABAR, DATA_MATRIX, EAN_13, EAN_8, ITF, PDF417, QR_CODE, UNKNOWN, UPC_A, UPC_E};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/barcodedetection.mojom;l=13" + }, + "shape_detection.mojom.BarcodeDetectionProvider.CreateBarcodeDetection": { + "definition": "CreateBarcodeDetection(pending_receiver receiver, BarcodeDetectorOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/barcodedetection_provider.mojom;l=17" + }, + "shape_detection.mojom.BarcodeDetectionProvider.EnumerateSupportedFormats": { + "definition": "EnumerateSupportedFormats() => (array supported_formats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/barcodedetection_provider.mojom;l=19" + }, + "shape_detection.mojom.BarcodeDetectorOptions": { + "definition": "struct BarcodeDetectorOptions { array formats;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/barcodedetection_provider.mojom;l=12" + }, + "shape_detection.mojom.FaceDetection.Detect": { + "definition": "Detect(skia.mojom.BitmapN32 bitmap_data) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/facedetection.mojom;l=35" + }, + "shape_detection.mojom.Landmark": { + "definition": "struct Landmark { array locations; LandmarkType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/facedetection.mojom;l=16" + }, + "shape_detection.mojom.FaceDetectionResult": { + "definition": "struct FaceDetectionResult { gfx.mojom.RectF bounding_box; array landmarks;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/facedetection.mojom;l=24" + }, + "shape_detection.mojom.FaceDetectorOptions": { + "definition": "struct FaceDetectorOptions { uint32 max_detected_faces; bool fast_mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/facedetection.mojom;l=29" + }, + "shape_detection.mojom.LandmarkType": { + "definition": "enum LandmarkType { MOUTH, EYE, NOSE };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/facedetection.mojom;l=13" + }, + "shape_detection.mojom.FaceDetectionProvider.CreateFaceDetection": { + "definition": "CreateFaceDetection(pending_receiver receiver, FaceDetectorOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/facedetection_provider.mojom;l=12" + }, + "shape_detection.mojom.ShapeDetectionService.BindBarcodeDetectionProvider": { + "definition": "BindBarcodeDetectionProvider( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/shape_detection_service.mojom;l=27" + }, + "shape_detection.mojom.ShapeDetectionService.BindFaceDetectionProvider": { + "definition": "BindFaceDetectionProvider(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/shape_detection_service.mojom;l=31" + }, + "shape_detection.mojom.ShapeDetectionService.BindTextDetection": { + "definition": "BindTextDetection(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/shape_detection_service.mojom;l=34" + }, + "shape_detection.mojom.TextDetection.Detect": { + "definition": "Detect(skia.mojom.BitmapN32 bitmap_data) => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/textdetection.mojom;l=19" + }, + "shape_detection.mojom.TextDetectionResult": { + "definition": "struct TextDetectionResult { string raw_value; gfx.mojom.RectF bounding_box; array corner_points;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/shape_detection/public/mojom/textdetection.mojom;l=12" + }, + "echo.mojom.EchoService.EchoString": { + "definition": "EchoString(string input) => (string echoed_input);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/test/echo/public/mojom/echo.mojom;l=16" + }, + "echo.mojom.EchoService.EchoStringToSharedMemory": { + "definition": "EchoStringToSharedMemory( string input, mojo_base.mojom.UnsafeSharedMemoryRegion region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/test/echo/public/mojom/echo.mojom;l=19" + }, + "echo.mojom.EchoService.Quit": { + "definition": "Quit();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/test/echo/public/mojom/echo.mojom;l=23" + }, + "echo.mojom.EchoService.Crash": { + "definition": "Crash();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/test/echo/public/mojom/echo.mojom;l=26" + }, + "echo.mojom.EchoService.DelayLoad": { + "definition": "[EnableIf=is_win] DelayLoad();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/test/echo/public/mojom/echo.mojom;l=29" + }, + "echo.mojom.EchoService.LoadNativeLibrary": { + "definition": "[EnableIf=is_win] LoadNativeLibrary( mojo_base.mojom.FilePath library, bool call_sec32_delayload) => (LoadStatus status, uint32 error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/test/echo/public/mojom/echo.mojom;l=48" + }, + "echo.mojom.EchoService.DecryptEncrypt": { + "definition": "DecryptEncrypt( os_crypt_async.mojom.Encryptor encryptor, array input) => (array? output);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/test/echo/public/mojom/echo.mojom;l=56" + }, + "echo.mojom.LoadStatus": { + "definition": "enum LoadStatus { kSuccess, kFailedLoadLibrary, kFailedGetProcAddress, kFailedCallingDelayLoad, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/test/echo/public/mojom/echo.mojom;l=33" + }, + "tracing.mojom.BackgroundTracingAgentClient.OnInitialized": { + "definition": "OnInitialized();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/background_tracing_agent.mojom;l=15" + }, + "tracing.mojom.BackgroundTracingAgentClient.OnTriggerBackgroundTrace": { + "definition": "OnTriggerBackgroundTrace(BackgroundTracingRule rule, int32? histogram_value, uint64 flow_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/background_tracing_agent.mojom;l=18" + }, + "tracing.mojom.BackgroundTracingAgent.SetUMACallback": { + "definition": "SetUMACallback(BackgroundTracingRule rule, string histogram_name, int32 histogram_lower_value, int32 histogram_upper_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/background_tracing_agent.mojom;l=30" + }, + "tracing.mojom.BackgroundTracingAgent.ClearUMACallback": { + "definition": "ClearUMACallback(BackgroundTracingRule rule);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/background_tracing_agent.mojom;l=35" + }, + "tracing.mojom.BackgroundTracingAgentProvider.Create": { + "definition": "Create(uint64 tracing_process_id, pending_remote client, pending_receiver agent);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/background_tracing_agent.mojom;l=41" + }, + "tracing.mojom.BackgroundTracingRule": { + "definition": "struct BackgroundTracingRule { string rule_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/background_tracing_agent.mojom;l=8" + }, + "tracing.mojom.ProducerHost.CommitData": { + "definition": "CommitData(CommitDataRequest data_request) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=159" + }, + "tracing.mojom.ProducerHost.RegisterDataSource": { + "definition": "RegisterDataSource(DataSourceRegistration registration_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=163" + }, + "tracing.mojom.ProducerHost.UpdateDataSource": { + "definition": "UpdateDataSource(DataSourceRegistration registration_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=167" + }, + "tracing.mojom.ProducerHost.RegisterTraceWriter": { + "definition": "RegisterTraceWriter(uint32 writer_id, uint32 target_buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=171" + }, + "tracing.mojom.ProducerHost.UnregisterTraceWriter": { + "definition": "UnregisterTraceWriter(uint32 writer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=172" + }, + "tracing.mojom.ProducerClient.OnTracingStart": { + "definition": "OnTracingStart();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=181" + }, + "tracing.mojom.ProducerClient.StartDataSource": { + "definition": "StartDataSource(uint64 id, DataSourceConfig data_source_config) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=185" + }, + "tracing.mojom.ProducerClient.StopDataSource": { + "definition": "StopDataSource(uint64 id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=189" + }, + "tracing.mojom.ProducerClient.Flush": { + "definition": "Flush(uint64 flush_request_id, array data_source_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=190" + }, + "tracing.mojom.ProducerClient.ClearIncrementalState": { + "definition": "ClearIncrementalState();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=192" + }, + "tracing.mojom.PerfettoService.ConnectToProducerHost": { + "definition": "ConnectToProducerHost( pending_remote producer_client, pending_receiver producer_host_receiver, mojo_base.mojom.UnsafeSharedMemoryRegion shared_memory, uint64 shared_memory_buffer_page_size_bytes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=204" + }, + "tracing.mojom.ConsumerHost.EnableTracing": { + "definition": "EnableTracing(pending_receiver tracing_session_host, pending_remote tracing_session_client, TraceConfig config, mojo_base.mojom.File? output_file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=289" + }, + "tracing.mojom.ConsumerHost.CloneSession": { + "definition": "CloneSession(pending_receiver tracing_session_host, pending_remote tracing_session_client, mojo_base.mojom.UnguessableToken unguessable_name, bool privacy_filtering_enabled) => (bool success, string error, mojo_base.mojom.Token uuid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=297" + }, + "tracing.mojom.TracingSessionHost.ChangeTraceConfig": { + "definition": "ChangeTraceConfig(TraceConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=310" + }, + "tracing.mojom.TracingSessionHost.DisableTracing": { + "definition": "DisableTracing();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=315" + }, + "tracing.mojom.TracingSessionHost.ReadBuffers": { + "definition": "ReadBuffers(handle stream) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=322" + }, + "tracing.mojom.TracingSessionHost.RequestBufferUsage": { + "definition": "RequestBufferUsage() => (bool success, float percent_full, bool data_loss);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=328" + }, + "tracing.mojom.TracingSessionHost.DisableTracingAndEmitJson": { + "definition": "DisableTracingAndEmitJson(string agent_label_filter, handle stream, bool privacy_filtering_enabled) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=337" + }, + "tracing.mojom.TracingSessionClient.OnTracingEnabled": { + "definition": "OnTracingEnabled();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=348" + }, + "tracing.mojom.TracingSessionClient.OnTracingDisabled": { + "definition": "OnTracingDisabled(bool tracing_succeeded);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=353" + }, + "tracing.mojom.ChunksToMove": { + "definition": "struct ChunksToMove { uint32 page; uint32 chunk; uint32 target_buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=52" + }, + "tracing.mojom.ChunkPatch": { + "definition": "struct ChunkPatch { uint32 offset; mojo_base.mojom.ByteString data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=64" + }, + "tracing.mojom.ChunksToPatch": { + "definition": "struct ChunksToPatch { uint32 target_buffer; uint32 writer_id; uint32 chunk_id; array patches; bool has_more_patches;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=70" + }, + "tracing.mojom.CommitDataRequest": { + "definition": "struct CommitDataRequest { array chunks_to_move; array chunks_to_patch; uint64 flush_request_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=82" + }, + "tracing.mojom.ChromeConfig": { + "definition": "struct ChromeConfig { string trace_config; bool privacy_filtering_enabled; bool convert_to_legacy_json; bool event_package_name_filter_enabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=89" + }, + "tracing.mojom.ConsoleConfig": { + "definition": "struct ConsoleConfig { ConsoleOutput output; bool enable_colors;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=114" + }, + "tracing.mojom.InterceptorConfig": { + "definition": "struct InterceptorConfig { string name; ConsoleConfig? console_config;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=119" + }, + "tracing.mojom.DataSourceConfig": { + "definition": "struct DataSourceConfig { string name; uint32 target_buffer; uint32 trace_duration_ms; uint64 tracing_session_id; ChromeConfig chrome_config; InterceptorConfig? interceptor_config; string legacy_config; mojo_base.mojom.ByteString track_event_config_raw; mojo_base.mojom.ByteString etw_config_raw; mojo_base.mojom.ByteString system_metrics_config_raw; mojo_base.mojom.ByteString histogram_samples_config_raw;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=126" + }, + "tracing.mojom.DataSourceRegistration": { + "definition": "struct DataSourceRegistration { string name; uint64 id; bool will_notify_on_start; bool will_notify_on_stop; bool handles_incremental_state_clear;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=140" + }, + "tracing.mojom.BufferConfig": { + "definition": "struct BufferConfig { uint32 size_kb; BufferFillPolicy fill_policy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=220" + }, + "tracing.mojom.DataSource": { + "definition": "struct DataSource { DataSourceConfig config; array producer_name_filter;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=227" + }, + "tracing.mojom.PerfettoBuiltinDataSource": { + "definition": "struct PerfettoBuiltinDataSource { bool disable_clock_snapshotting; bool disable_trace_config; bool disable_system_info; bool disable_service_events; int32 primary_trace_clock_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=235" + }, + "tracing.mojom.IncrementalStateConfig": { + "definition": "struct IncrementalStateConfig { uint32 clear_period_ms;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=243" + }, + "tracing.mojom.TraceConfig": { + "definition": "struct TraceConfig { array data_sources; PerfettoBuiltinDataSource perfetto_builtin_data_source; array buffers; IncrementalStateConfig incremental_state_config; uint32 duration_ms; bool write_into_file; mojo_base.mojom.Token? trace_uuid; mojo_base.mojom.UnguessableToken? unique_session_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=252" + }, + "tracing.mojom.ConsoleOutput": { + "definition": "enum ConsoleOutput { kOutputUnspecified, kOutputStdOut, kOutputStdErr,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=108" + }, + "tracing.mojom.BufferFillPolicy": { + "definition": "enum BufferFillPolicy { kUnspecified, kRingBuffer, kDiscard,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=212" + }, + "tracing.mojom.TracingClientPriority": { + "definition": "enum TracingClientPriority { kUnknown, kBackground, kUserInitiated,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/perfetto_service.mojom;l=268" + }, + "tracing.mojom.SystemTracingService.OpenProducerSocket": { + "definition": "OpenProducerSocket() => (mojo_base.mojom.File? traced_socket);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/system_tracing_service.mojom;l=19" + }, + "tracing.mojom.TracedProcess.ConnectToTracingService": { + "definition": "ConnectToTracingService(ConnectToTracingRequest request) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/traced_process.mojom;l=19" + }, + "tracing.mojom.ConnectToTracingRequest": { + "definition": "struct ConnectToTracingRequest {[EnableIf=is_perfetto_supported_os] pending_remote perfetto_service;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/traced_process.mojom;l=10" + }, + "tracing.mojom.TracingService.Initialize": { + "definition": "Initialize(array clients);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/tracing_service.mojom;l=34" + }, + "tracing.mojom.TracingService.AddClient": { + "definition": "AddClient(ClientInfo client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/tracing_service.mojom;l=37" + }, + "tracing.mojom.TracingService.BindConsumerHost": { + "definition": "[EnableIf=is_perfetto_supported_os] BindConsumerHost(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/tracing_service.mojom;l=41" + }, + "tracing.mojom.ClientInfo": { + "definition": "struct ClientInfo { int32 pid; pending_remote process;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/tracing/public/mojom/tracing_service.mojom;l=15" + }, + "video_capture.mojom.Device.Start": { + "definition": "Start(media.mojom.VideoCaptureParams requested_settings, pending_remote handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/device.mojom;l=19" + }, + "video_capture.mojom.Device.MaybeSuspend": { + "definition": "MaybeSuspend();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/device.mojom;l=21" + }, + "video_capture.mojom.Device.Resume": { + "definition": "Resume();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/device.mojom;l=22" + }, + "video_capture.mojom.Device.GetPhotoState": { + "definition": "GetPhotoState() => (media.mojom.PhotoState? capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/device.mojom;l=23" + }, + "video_capture.mojom.Device.SetPhotoOptions": { + "definition": "SetPhotoOptions(media.mojom.PhotoSettings settings) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/device.mojom;l=25" + }, + "video_capture.mojom.Device.TakePhoto": { + "definition": "TakePhoto() => (media.mojom.Blob? blob);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/device.mojom;l=27" + }, + "video_capture.mojom.Device.ProcessFeedback": { + "definition": "ProcessFeedback(media.mojom.VideoCaptureFeedback feedback);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/device.mojom;l=31" + }, + "video_capture.mojom.Device.RequestRefreshFrame": { + "definition": "RequestRefreshFrame();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/device.mojom;l=50" + }, + "video_capture.mojom.DevicesChangedObserver.OnDevicesChanged": { + "definition": "OnDevicesChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/devices_changed_observer.mojom;l=10" + }, + "video_capture.mojom.Producer.OnNewBuffer": { + "definition": "OnNewBuffer(int32 buffer_id, media.mojom.VideoBufferHandle buffer_handle) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/producer.mojom;l=13" + }, + "video_capture.mojom.Producer.OnBufferRetired": { + "definition": "OnBufferRetired(int32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/producer.mojom;l=15" + }, + "video_capture.mojom.TestingControls .Crash": { + "definition": "Crash();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/testing_controls.mojom;l=10" + }, + "video_capture.mojom.AcceleratorFactory.CreateJpegDecodeAccelerator": { + "definition": "CreateJpegDecodeAccelerator( pending_receiver jda);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_capture_service.mojom;l=24" + }, + "video_capture.mojom.VideoCaptureService .ConnectToVideoSourceProvider": { + "definition": "ConnectToVideoSourceProvider(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_capture_service.mojom;l=63" + }, + "video_capture.mojom.VideoCaptureService .BindControlsForTesting": { + "definition": "BindControlsForTesting(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_capture_service.mojom;l=66" + }, + "video_capture.mojom.VideoCaptureService .OnGpuInfoUpdate": { + "definition": "[EnableIf=is_win] OnGpuInfoUpdate(gpu.mojom.Luid luid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_capture_service.mojom;l=70" + }, + "video_capture.mojom.VideoFrameAccessHandler.OnFinishedConsumingBuffer": { + "definition": "OnFinishedConsumingBuffer(int32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=27" + }, + "video_capture.mojom.VideoFrameHandler.OnCaptureConfigurationChanged": { + "definition": "OnCaptureConfigurationChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=37" + }, + "video_capture.mojom.VideoFrameHandler.OnNewBuffer": { + "definition": "OnNewBuffer(int32 buffer_id, media.mojom.VideoBufferHandle buffer_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=45" + }, + "video_capture.mojom.VideoFrameHandler.OnFrameAccessHandlerReady": { + "definition": "OnFrameAccessHandlerReady( pending_remote frame_access_handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=52" + }, + "video_capture.mojom.VideoFrameHandler.OnFrameReadyInBuffer": { + "definition": "OnFrameReadyInBuffer(ReadyFrameInBuffer buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=59" + }, + "video_capture.mojom.VideoFrameHandler.OnBufferRetired": { + "definition": "OnBufferRetired(int32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=69" + }, + "video_capture.mojom.VideoFrameHandler.OnError": { + "definition": "OnError(media.mojom.VideoCaptureError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=72" + }, + "video_capture.mojom.VideoFrameHandler.OnFrameDropped": { + "definition": "OnFrameDropped(media.mojom.VideoCaptureFrameDropReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=73" + }, + "video_capture.mojom.VideoFrameHandler.OnNewCaptureVersion": { + "definition": "OnNewCaptureVersion(media.mojom.CaptureVersion capture_version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=85" + }, + "video_capture.mojom.VideoFrameHandler.OnFrameWithEmptyRegionCapture": { + "definition": "OnFrameWithEmptyRegionCapture();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=93" + }, + "video_capture.mojom.VideoFrameHandler.OnLog": { + "definition": "OnLog(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=94" + }, + "video_capture.mojom.VideoFrameHandler.OnStarted": { + "definition": "OnStarted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=99" + }, + "video_capture.mojom.VideoFrameHandler.OnStartedUsingGpuDecode": { + "definition": "OnStartedUsingGpuDecode();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=100" + }, + "video_capture.mojom.VideoFrameHandler.OnStopped": { + "definition": "OnStopped();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=105" + }, + "video_capture.mojom.ReadyFrameInBuffer": { + "definition": "struct ReadyFrameInBuffer { int32 buffer_id; int32 frame_feedback_id; media.mojom.VideoFrameInfo frame_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_frame_handler.mojom;l=15" + }, + "video_capture.mojom.PushVideoStreamSubscription.Activate": { + "definition": "Activate();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=29" + }, + "video_capture.mojom.PushVideoStreamSubscription.Suspend": { + "definition": "Suspend() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=36" + }, + "video_capture.mojom.PushVideoStreamSubscription.Resume": { + "definition": "Resume();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=37" + }, + "video_capture.mojom.PushVideoStreamSubscription.GetPhotoState": { + "definition": "GetPhotoState() => (media.mojom.PhotoState? capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=39" + }, + "video_capture.mojom.PushVideoStreamSubscription.SetPhotoOptions": { + "definition": "SetPhotoOptions(media.mojom.PhotoSettings settings) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=47" + }, + "video_capture.mojom.PushVideoStreamSubscription.TakePhoto": { + "definition": "TakePhoto() => (media.mojom.Blob? blob);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=48" + }, + "video_capture.mojom.PushVideoStreamSubscription.Close": { + "definition": "Close() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=58" + }, + "video_capture.mojom.PushVideoStreamSubscription.ProcessFeedback": { + "definition": "ProcessFeedback(media.mojom.VideoCaptureFeedback feedback);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=62" + }, + "video_capture.mojom.VideoSource.CreatePushSubscription": { + "definition": "CreatePushSubscription( pending_remote subscriber, media.mojom.VideoCaptureParams requested_settings, bool force_reopen_with_new_settings, pending_receiver subscription) => (CreatePushSubscriptionResultCode result_code, media.mojom.VideoCaptureParams settings_source_was_opened_with);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=90" + }, + "video_capture.mojom.CreatePushSubscriptionSuccessCode": { + "definition": "enum CreatePushSubscriptionSuccessCode { kCreatedWithRequestedSettings, kCreatedWithDifferentSettings,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=11" + }, + "video_capture.mojom.CreatePushSubscriptionResultCode": { + "definition": "union CreatePushSubscriptionResultCode { CreatePushSubscriptionSuccessCode success_code; media.mojom.VideoCaptureError error_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source.mojom;l=16" + }, + "video_capture.mojom.VideoSourceProvider.GetSourceInfos": { + "definition": "GetSourceInfos() => (GetSourceInfosResult result, array source_infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source_provider.mojom;l=25" + }, + "video_capture.mojom.VideoSourceProvider.GetVideoSource": { + "definition": "GetVideoSource(string source_id, pending_receiver stream);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source_provider.mojom;l=31" + }, + "video_capture.mojom.VideoSourceProvider.AddSharedMemoryVirtualDevice": { + "definition": "AddSharedMemoryVirtualDevice( media.mojom.VideoCaptureDeviceInfo device_info, pending_remote producer, pending_receiver virtual_device_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source_provider.mojom;l=44" + }, + "video_capture.mojom.VideoSourceProvider.AddTextureVirtualDevice": { + "definition": "AddTextureVirtualDevice( media.mojom.VideoCaptureDeviceInfo device_info, pending_receiver virtual_device_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source_provider.mojom;l=52" + }, + "video_capture.mojom.VideoSourceProvider.RegisterVirtualDevicesChangedObserver": { + "definition": "RegisterVirtualDevicesChangedObserver( pending_remote observer, bool raise_event_if_virtual_devices_already_present);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source_provider.mojom;l=58" + }, + "video_capture.mojom.VideoSourceProvider.RegisterDevicesChangedObserver": { + "definition": "RegisterDevicesChangedObserver( pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source_provider.mojom;l=65" + }, + "video_capture.mojom.VideoSourceProvider.Close": { + "definition": "Close() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source_provider.mojom;l=70" + }, + "video_capture.mojom.GetSourceInfosResult": { + "definition": "enum GetSourceInfosResult { kSuccess, kErrorDroppedRequest };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/video_source_provider.mojom;l=18" + }, + "video_capture.mojom.SharedMemoryVirtualDevice.RequestFrameBuffer": { + "definition": "RequestFrameBuffer(gfx.mojom.Size dimension, media.mojom.VideoCapturePixelFormat pixel_format, media.mojom.PlaneStrides? strides) => (int32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=39" + }, + "video_capture.mojom.SharedMemoryVirtualDevice.OnFrameReadyInBuffer": { + "definition": "OnFrameReadyInBuffer(int32 buffer_id, media.mojom.VideoFrameInfo frame_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=46" + }, + "video_capture.mojom.TextureVirtualDevice.OnNewSharedImageBufferHandle": { + "definition": "OnNewSharedImageBufferHandle(int32 buffer_id, media.mojom.SharedImageBufferHandleSet shared_image_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=56" + }, + "video_capture.mojom.TextureVirtualDevice.OnFrameAccessHandlerReady": { + "definition": "OnFrameAccessHandlerReady( pending_remote frame_access_handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=64" + }, + "video_capture.mojom.TextureVirtualDevice.OnFrameReadyInBuffer": { + "definition": "OnFrameReadyInBuffer(int32 buffer_id, media.mojom.VideoFrameInfo frame_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=71" + }, + "video_capture.mojom.TextureVirtualDevice.OnBufferRetired": { + "definition": "OnBufferRetired(int32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=76" + }, + "video_capture.mojom.GpuMemoryBufferVirtualDevice.OnNewGpuMemoryBufferHandle": { + "definition": "OnNewGpuMemoryBufferHandle( int32 buffer_id, gfx.mojom.GpuMemoryBufferHandle gmb_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=82" + }, + "video_capture.mojom.GpuMemoryBufferVirtualDevice.OnFrameAccessHandlerReady": { + "definition": "OnFrameAccessHandlerReady( pending_remote frame_access_handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=90" + }, + "video_capture.mojom.GpuMemoryBufferVirtualDevice.OnFrameReadyInBuffer": { + "definition": "OnFrameReadyInBuffer(int32 buffer_id, media.mojom.VideoFrameInfo frame_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=98" + }, + "video_capture.mojom.GpuMemoryBufferVirtualDevice.OnBufferRetired": { + "definition": "OnBufferRetired(int32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/video_capture/public/mojom/virtual_device.mojom;l=104" + }, + "viz.mojom.BeginFrameObserver.OnStandaloneBeginFrame": { + "definition": "OnStandaloneBeginFrame(BeginFrameArgs args);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/begin_frame_observer.mojom;l=14" + }, + "viz.mojom.DisplayPrivate.SetDisplayVisible": { + "definition": "SetDisplayVisible(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=25" + }, + "viz.mojom.DisplayPrivate.DisableSwapUntilResize": { + "definition": "[EnableIf=is_win, Sync] DisableSwapUntilResize() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=29" + }, + "viz.mojom.DisplayPrivate.Resize": { + "definition": "Resize(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=33" + }, + "viz.mojom.DisplayPrivate.SetDisplayColorMatrix": { + "definition": "SetDisplayColorMatrix(gfx.mojom.Transform color_matrix);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=37" + }, + "viz.mojom.DisplayPrivate.SetDisplayColorSpaces": { + "definition": "SetDisplayColorSpaces(gfx.mojom.DisplayColorSpaces display_color_spaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=41" + }, + "viz.mojom.DisplayPrivate.SetOutputIsSecure": { + "definition": "SetOutputIsSecure(bool secure);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=42" + }, + "viz.mojom.DisplayPrivate.SetDisplayVSyncParameters": { + "definition": "SetDisplayVSyncParameters( mojo_base.mojom.TimeTicks timebase, mojo_base.mojom.TimeDelta interval);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=50" + }, + "viz.mojom.DisplayPrivate.ForceImmediateDrawAndSwapIfPossible": { + "definition": "ForceImmediateDrawAndSwapIfPossible();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=60" + }, + "viz.mojom.DisplayPrivate.SetSupportedRefreshRates": { + "definition": "[EnableIf=can_set_refresh_rate] SetSupportedRefreshRates(array refresh_rates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=73" + }, + "viz.mojom.DisplayPrivate.AddVSyncParameterObserver": { + "definition": "AddVSyncParameterObserver( pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=92" + }, + "viz.mojom.DisplayPrivate.SetDelegatedInkPointRenderer": { + "definition": "SetDelegatedInkPointRenderer( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=97" + }, + "viz.mojom.DisplayPrivate.SetStandaloneBeginFrameObserver": { + "definition": "SetStandaloneBeginFrameObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=105" + }, + "viz.mojom.DisplayPrivate.SetMaxVSyncAndVrr": { + "definition": "SetMaxVSyncAndVrr( mojo_base.mojom.TimeDelta? max_vsync_interval, display.mojom.VariableRefreshRateState vrr_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=110" + }, + "viz.mojom.DisplayClient.OnDisplayReceivedCALayerParams": { + "definition": "[EnableIf=is_apple] OnDisplayReceivedCALayerParams(gfx.mojom.CALayerParams ca_layer_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=118" + }, + "viz.mojom.DisplayClient.CreateLayeredWindowUpdater": { + "definition": "[EnableIf=is_win] CreateLayeredWindowUpdater(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=123" + }, + "viz.mojom.DisplayClient.AddChildWindowToBrowser": { + "definition": "[EnableIf=is_win] AddChildWindowToBrowser(gpu.mojom.SurfaceHandle child_window);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=128" + }, + "viz.mojom.DisplayClient.DidCompleteSwapWithNewSize": { + "definition": "[EnableIf=linux_x11] DidCompleteSwapWithNewSize(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=137" + }, + "viz.mojom.DisplayClient.SetPreferredRefreshRate": { + "definition": "[EnableIf=can_set_refresh_rate] SetPreferredRefreshRate(float refresh_rate);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/display_private.mojom;l=151" + }, + "viz.mojom.ExternalBeginFrameController.IssueExternalBeginFrame": { + "definition": "[EnableIfNot=is_ios] IssueExternalBeginFrame(BeginFrameArgs args, bool force) => (BeginFrameAck ack);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/external_begin_frame_controller.mojom;l=19" + }, + "viz.mojom.ExternalBeginFrameControllerClient.SetNeedsBeginFrame": { + "definition": "SetNeedsBeginFrame(bool needs_begin_frames);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/external_begin_frame_controller.mojom;l=33" + }, + "viz.mojom.ExternalBeginFrameControllerClient.SetPreferredInterval": { + "definition": "SetPreferredInterval(mojo_base.mojom.TimeDelta interval);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/external_begin_frame_controller.mojom;l=36" + }, + "viz.mojom.FrameSinkManager.RegisterFrameSinkId": { + "definition": "RegisterFrameSinkId(FrameSinkId frame_sink_id, bool report_activation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=87" + }, + "viz.mojom.FrameSinkManager.InvalidateFrameSinkId": { + "definition": "InvalidateFrameSinkId(FrameSinkId frame_sink_id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=93" + }, + "viz.mojom.FrameSinkManager.SetFrameSinkDebugLabel": { + "definition": "SetFrameSinkDebugLabel(FrameSinkId frame_sink_id, string debug_label);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=97" + }, + "viz.mojom.FrameSinkManager.CreateRootCompositorFrameSink": { + "definition": "CreateRootCompositorFrameSink(RootCompositorFrameSinkParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=108" + }, + "viz.mojom.FrameSinkManager.CreateFrameSinkBundle": { + "definition": "CreateFrameSinkBundle(FrameSinkBundleId bundle_id, pending_receiver receiver, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=113" + }, + "viz.mojom.FrameSinkManager.CreateCompositorFrameSink": { + "definition": "CreateCompositorFrameSink( FrameSinkId frame_sink_id, FrameSinkBundleId? bundle_id, pending_receiver compositor_frame_sink, pending_remote compositor_frame_sink_client, input.mojom.RenderInputRouterConfig? config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=130" + }, + "viz.mojom.FrameSinkManager.DestroyCompositorFrameSink": { + "definition": "[Sync, NoInterrupt] DestroyCompositorFrameSink(FrameSinkId frame_sink_id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=141" + }, + "viz.mojom.FrameSinkManager.RegisterFrameSinkHierarchy": { + "definition": "RegisterFrameSinkHierarchy( FrameSinkId parent_frame_sink_id, FrameSinkId child_frame_sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=147" + }, + "viz.mojom.FrameSinkManager.UnregisterFrameSinkHierarchy": { + "definition": "UnregisterFrameSinkHierarchy( FrameSinkId parent_frame_sink_id, FrameSinkId child_frame_sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=151" + }, + "viz.mojom.FrameSinkManager.AddVideoDetectorObserver": { + "definition": "AddVideoDetectorObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=156" + }, + "viz.mojom.FrameSinkManager.CreateVideoCapturer": { + "definition": "CreateVideoCapturer(pending_receiver receiver, uint32 capture_version_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=159" + }, + "viz.mojom.FrameSinkManager.EvictSurfaces": { + "definition": "EvictSurfaces(array surface_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=164" + }, + "viz.mojom.FrameSinkManager.Throttle": { + "definition": "Throttle( array frame_sink_ids, mojo_base.mojom.TimeDelta interval);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=169" + }, + "viz.mojom.FrameSinkManager.StartThrottlingAllFrameSinks": { + "definition": "StartThrottlingAllFrameSinks(mojo_base.mojom.TimeDelta interval);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=177" + }, + "viz.mojom.FrameSinkManager.StopThrottlingAllFrameSinks": { + "definition": "StopThrottlingAllFrameSinks();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=181" + }, + "viz.mojom.FrameSinkManager.RequestCopyOfOutput": { + "definition": "RequestCopyOfOutput(SurfaceId surface_id, CopyOutputRequest request, bool capture_exact_surface_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=189" + }, + "viz.mojom.FrameSinkManager.UpdateDebugRendererSettings": { + "definition": "UpdateDebugRendererSettings(DebugRendererSettings debug_settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=206" + }, + "viz.mojom.FrameSinkManager.ClearUnclaimedViewTransitionResources": { + "definition": "ClearUnclaimedViewTransitionResources( blink.mojom.ViewTransitionToken transition_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=211" + }, + "viz.mojom.FrameSinkManager.CreateMetricsRecorderForTest": { + "definition": "[RuntimeFeature=EnableVizTestApis] CreateMetricsRecorderForTest( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=216" + }, + "viz.mojom.FrameSinkManager.EnableFrameSinkManagerTestApi": { + "definition": "[RuntimeFeature=EnableVizTestApis] EnableFrameSinkManagerTestApi( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=221" + }, + "viz.mojom.FrameSinkManager.SetupRendererInputRouterDelegateRegistry": { + "definition": "SetupRendererInputRouterDelegateRegistry( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=228" + }, + "viz.mojom.FrameSinkManager.NotifyRendererBlockStateChanged": { + "definition": "NotifyRendererBlockStateChanged( bool blocked, array render_input_routers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=233" + }, + "viz.mojom.FrameSinkManager.RequestInputBack": { + "definition": "RequestInputBack();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=240" + }, + "viz.mojom.FrameSinkManagerClient.OnFirstSurfaceActivation": { + "definition": "OnFirstSurfaceActivation(SurfaceInfo surface_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=250" + }, + "viz.mojom.FrameSinkManagerClient.OnAggregatedHitTestRegionListUpdated": { + "definition": "OnAggregatedHitTestRegionListUpdated( FrameSinkId frame_sink_id, array hit_test_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=253" + }, + "viz.mojom.FrameSinkManagerClient.OnFrameTokenChanged": { + "definition": "OnFrameTokenChanged(FrameSinkId frame_sink_id, uint32 frame_token, mojo_base.mojom.TimeTicks activation_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=259" + }, + "viz.mojom.FrameSinkManagerClient.OnScreenshotCaptured": { + "definition": "OnScreenshotCaptured( blink.mojom.SameDocNavigationScreenshotDestinationToken destination_token, CopyOutputResult copy_output_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=278" + }, + "viz.mojom.FrameSinkManagerClient.OnVizTouchStateAvailable": { + "definition": "OnVizTouchStateAvailable(mojo_base.mojom.ReadOnlySharedMemoryRegion region);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=284" + }, + "viz.mojom.RendererInputRouterDelegateRegistry.SetupRenderInputRouterDelegateConnection": { + "definition": "SetupRenderInputRouterDelegateConnection( FrameSinkId id, pending_associated_remote rir_delegate_client_remote, pending_associated_receiver rir_delegate_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=299" + }, + "viz.mojom.RootCompositorFrameSinkParams": { + "definition": "struct RootCompositorFrameSinkParams { FrameSinkId frame_sink_id; gpu.mojom.SurfaceHandle widget; bool gpu_compositing = true; RendererSettings renderer_settings; bool send_swap_size_notifications = false; bool disable_frame_rate_limit = false; [EnableIf=is_android] bool create_input_receiver = false; [EnableIf=is_android] float refresh_rate; pending_associated_receiver compositor_frame_sink; pending_remote compositor_frame_sink_client; pending_associated_receiver display_private; pending_remote display_client; pending_associated_receiver? external_begin_frame_controller; pending_associated_remote? external_begin_frame_controller_client;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager.mojom;l=35" + }, + "viz.mojom.FrameSinkManagerTestApi.HasUnclaimedViewTransitionResources": { + "definition": "[Sync] HasUnclaimedViewTransitionResources() => (bool has_resources);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager_test_api.mojom;l=16" + }, + "viz.mojom.FrameSinkManagerTestApi.SetSameDocNavigationScreenshotSize": { + "definition": "[Sync] SetSameDocNavigationScreenshotSize(gfx.mojom.Size result_size) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager_test_api.mojom;l=20" + }, + "viz.mojom.FrameSinkManagerTestApi.GetForceEnableZoomState": { + "definition": "[Sync] GetForceEnableZoomState(FrameSinkId frame_sink_id) => (bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager_test_api.mojom;l=25" + }, + "viz.mojom.FrameSinkManagerTestApi.WaitForSurfaceAnimationManager": { + "definition": "[Sync] WaitForSurfaceAnimationManager(FrameSinkId frame_sink_id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_manager_test_api.mojom;l=30" + }, + "viz.mojom.FrameSinkVideoConsumerFrameCallbacks.Done": { + "definition": "Done();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=23" + }, + "viz.mojom.FrameSinkVideoConsumerFrameCallbacks.ProvideFeedback": { + "definition": "ProvideFeedback(media.mojom.VideoCaptureFeedback feedback);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=27" + }, + "viz.mojom.FrameSinkVideoConsumer.OnFrameCaptured": { + "definition": "OnFrameCaptured(media.mojom.VideoBufferHandle data, media.mojom.VideoFrameInfo info, gfx.mojom.Rect content_rect, pending_remote callbacks);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=56" + }, + "viz.mojom.FrameSinkVideoConsumer.OnNewCaptureVersion": { + "definition": "OnNewCaptureVersion( media.mojom.CaptureVersion capture_version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=71" + }, + "viz.mojom.FrameSinkVideoConsumer.OnFrameWithEmptyRegionCapture": { + "definition": "OnFrameWithEmptyRegionCapture();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=80" + }, + "viz.mojom.FrameSinkVideoConsumer.OnStopped": { + "definition": "OnStopped();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=84" + }, + "viz.mojom.FrameSinkVideoConsumer.OnLog": { + "definition": "OnLog(string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=87" + }, + "viz.mojom.FrameSinkVideoCapturer.SetFormat": { + "definition": "SetFormat(media.mojom.VideoPixelFormat format);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=126" + }, + "viz.mojom.FrameSinkVideoCapturer.SetMinCapturePeriod": { + "definition": "SetMinCapturePeriod(mojo_base.mojom.TimeDelta min_period);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=134" + }, + "viz.mojom.FrameSinkVideoCapturer.SetMinSizeChangePeriod": { + "definition": "SetMinSizeChangePeriod(mojo_base.mojom.TimeDelta min_period);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=143" + }, + "viz.mojom.FrameSinkVideoCapturer.SetResolutionConstraints": { + "definition": "SetResolutionConstraints(gfx.mojom.Size min_size, gfx.mojom.Size max_size, bool use_fixed_aspect_ratio);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=156" + }, + "viz.mojom.FrameSinkVideoCapturer.SetAutoThrottlingEnabled": { + "definition": "SetAutoThrottlingEnabled(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=166" + }, + "viz.mojom.FrameSinkVideoCapturer.SetAnimationFpsLockIn": { + "definition": "SetAnimationFpsLockIn(bool enabled, float majority_damaged_pixel_min_ratio);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=177" + }, + "viz.mojom.FrameSinkVideoCapturer.ChangeTarget": { + "definition": "ChangeTarget(VideoCaptureTarget? target, uint32 sub_capture_version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=207" + }, + "viz.mojom.FrameSinkVideoCapturer.Start": { + "definition": "Start(pending_remote consumer, BufferFormatPreference buffer_format_preference);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=214" + }, + "viz.mojom.FrameSinkVideoCapturer.Stop": { + "definition": "Stop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=220" + }, + "viz.mojom.FrameSinkVideoCapturer.RequestRefreshFrame": { + "definition": "RequestRefreshFrame();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=224" + }, + "viz.mojom.FrameSinkVideoCapturer.CreateOverlay": { + "definition": "CreateOverlay(int32 stacking_index, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=232" + }, + "viz.mojom.FrameSinkVideoCaptureOverlay.SetImageAndBounds": { + "definition": "SetImageAndBounds(skia.mojom.BitmapN32 image, gfx.mojom.RectF bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=247" + }, + "viz.mojom.FrameSinkVideoCaptureOverlay.SetBounds": { + "definition": "SetBounds(gfx.mojom.RectF bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=253" + }, + "viz.mojom.FrameSinkVideoCaptureOverlay.OnCapturedMouseEvent": { + "definition": "OnCapturedMouseEvent(gfx.mojom.Point coordinates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=259" + }, + "viz.mojom.VideoCaptureTarget": { + "definition": "struct VideoCaptureTarget { FrameSinkId frame_sink_id; VideoCaptureSubTarget? sub_target;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=37" + }, + "viz.mojom.BufferFormatPreference": { + "definition": "enum BufferFormatPreference { kDefault = 0, kPreferGpuMemoryBuffer, kPreferSharedImageWithNativeHandle};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=93" + }, + "viz.mojom.VideoCaptureSubTarget": { + "definition": "union VideoCaptureSubTarget { SubtreeCaptureId subtree_capture_id; mojo_base.mojom.Token region_capture_crop_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom;l=32" + }, + "viz.mojom.FrameSinksMetricsRecorder.StartFrameCounting": { + "definition": "StartFrameCounting(mojo_base.mojom.TimeTicks start_time, mojo_base.mojom.TimeDelta bucket_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sinks_metrics_recorder.mojom;l=43" + }, + "viz.mojom.FrameSinksMetricsRecorder.StopFrameCounting": { + "definition": "StopFrameCounting() => (FrameCountingData? data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sinks_metrics_recorder.mojom;l=48" + }, + "viz.mojom.FrameSinksMetricsRecorder.StartOverdrawTracking": { + "definition": "StartOverdrawTracking( FrameSinkId root_frame_sink_id, mojo_base.mojom.TimeDelta bucket_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sinks_metrics_recorder.mojom;l=51" + }, + "viz.mojom.FrameSinksMetricsRecorder.StopOverdrawTracking": { + "definition": "StopOverdrawTracking(FrameSinkId root_frame_sink_id) => (OverdrawData? data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sinks_metrics_recorder.mojom;l=56" + }, + "viz.mojom.FrameCountingPerSinkData": { + "definition": "struct FrameCountingPerSinkData { bool is_root; string debug_label; uint16 start_bucket; array presented_frames;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sinks_metrics_recorder.mojom;l=14" + }, + "viz.mojom.FrameCountingData": { + "definition": "struct FrameCountingData { array per_sink_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sinks_metrics_recorder.mojom;l=28" + }, + "viz.mojom.OverdrawData": { + "definition": "struct OverdrawData { array average_overdraws;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/frame_sinks_metrics_recorder.mojom;l=32" + }, + "viz.mojom.LayeredWindowUpdater.OnAllocatedSharedMemory": { + "definition": "OnAllocatedSharedMemory( gfx.mojom.Size pixel_size, mojo_base.mojom.UnsafeSharedMemoryRegion region );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/layered_window_updater.mojom;l=20" + }, + "viz.mojom.LayeredWindowUpdater.Draw": { + "definition": "Draw() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/layered_window_updater.mojom;l=29" + }, + "viz.mojom.OverlayStrategy": { + "definition": "enum OverlayStrategy { kFullscreen, kSingleOnTop, kUnderlay, [EnableIf=enable_cast_overlay_strategy] kUnderlayCast,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/overlay_strategy.mojom;l=11" + }, + "viz.mojom.OcclusionCullerSettings": { + "definition": "struct OcclusionCullerSettings { uint16 quad_split_limit; uint16 maximum_occluder_complexity; uint16 minimum_fragments_reduced; bool generate_complex_occluder_for_rounded_corners;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/renderer_settings.mojom;l=14" + }, + "viz.mojom.RendererSettings": { + "definition": "struct RendererSettings { bool allow_antialiasing; bool force_antialiasing; bool force_blending_with_shaders; int32 highp_threshold_min; bool partial_swap_enabled; bool release_overlay_resources_after_gpu_query; bool should_clear_root_render_pass; int32 slow_down_compositing_scale_factor; bool auto_resize_output_surface; bool requires_alpha_channel; OcclusionCullerSettings occlusion_culler_settings; [EnableIf=use_ozone] array overlay_strategies; [EnableIf=is_mac] int64 display_id = kInvalidDisplayId;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/renderer_settings.mojom;l=21" + }, + "viz.mojom.DebugRendererSettings": { + "definition": "struct DebugRendererSettings { bool tint_composited_content; bool tint_composited_content_modulate; bool show_overdraw_feedback; bool show_dc_layer_debug_borders; bool show_aggregated_damage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/renderer_settings.mojom;l=42" + }, + "viz.mojom.VSyncParameterObserver.OnUpdateVSyncParameters": { + "definition": "OnUpdateVSyncParameters( mojo_base.mojom.TimeTicks timebase, mojo_base.mojom.TimeDelta interval);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom;l=13" + }, + "viz.mojom.ContextLostReason": { + "definition": "enum ContextLostReason { GUILTY, INNOCENT, UNKNOWN, OUT_OF_MEMORY, MAKE_CURRENT_FAILED, GPU_CHANNEL_LOST, INVALID_GPU_MESSAGE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/context_lost_reason.mojom;l=7" + }, + "viz.mojom.GpuHost.DidInitialize": { + "definition": "DidInitialize(gpu.mojom.GpuInfo gpu_info, gpu.mojom.GpuFeatureInfo gpu_feature_info, gpu.mojom.GpuInfo? gpu_info_for_hardware_gpu, gpu.mojom.GpuFeatureInfo? gpu_feature_info_for_hardware_gpu, gfx.mojom.GpuExtraInfo gpu_extra_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=25" + }, + "viz.mojom.GpuHost.DidFailInitialize": { + "definition": "DidFailInitialize();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=30" + }, + "viz.mojom.GpuHost.DidCreateContextSuccessfully": { + "definition": "DidCreateContextSuccessfully();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=31" + }, + "viz.mojom.GpuHost.DidCreateOffscreenContext": { + "definition": "DidCreateOffscreenContext(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=33" + }, + "viz.mojom.GpuHost.DidDestroyOffscreenContext": { + "definition": "DidDestroyOffscreenContext(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=34" + }, + "viz.mojom.GpuHost.DidDestroyChannel": { + "definition": "DidDestroyChannel(int32 client_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=35" + }, + "viz.mojom.GpuHost.DidDestroyAllChannels": { + "definition": "DidDestroyAllChannels();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=39" + }, + "viz.mojom.GpuHost.DidLoseContext": { + "definition": "DidLoseContext(ContextLostReason reason, url.mojom.Url active_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=42" + }, + "viz.mojom.GpuHost.DidUpdateGPUInfo": { + "definition": "DidUpdateGPUInfo(gpu.mojom.GpuInfo gpu_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=47" + }, + "viz.mojom.GpuHost.DidUpdateOverlayInfo": { + "definition": "[EnableIf=is_win] DidUpdateOverlayInfo(gpu.mojom.OverlayInfo overlay_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=51" + }, + "viz.mojom.GpuHost.DidUpdateDXGIInfo": { + "definition": "[EnableIf=is_win] DidUpdateDXGIInfo(gfx.mojom.DXGIInfo dxgi_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=56" + }, + "viz.mojom.GpuHost.DisableGpuCompositing": { + "definition": "DisableGpuCompositing();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=61" + }, + "viz.mojom.GpuHost.GetIsolationKey": { + "definition": "GetIsolationKey(int32 client_id, blink.mojom.WebGPUExecutionContextToken wgpu_context_token) => (string isolation_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=67" + }, + "viz.mojom.GpuHost.StoreBlobToDisk": { + "definition": "StoreBlobToDisk(gpu.mojom.GpuDiskCacheHandle cache_handle, mojo_base.mojom.ByteString key, mojo_base.mojom.ByteString blob);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=72" + }, + "viz.mojom.GpuHost.ClearGrShaderDiskCache": { + "definition": "ClearGrShaderDiskCache();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_host.mojom;l=77" + }, + "viz.mojom.GpuLogging.RecordLogMessage": { + "definition": "RecordLogMessage(int32 severity, string header, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_logging.mojom;l=14" + }, + "viz.mojom.GpuService.EstablishGpuChannel": { + "definition": "[Sync, NoInterrupt] EstablishGpuChannel( int32 client_id, uint64 client_tracing_id, bool is_gpu_host, bool enable_extra_handles_validation) => (handle? channel_handle, gpu.mojom.GpuInfo gpu_info, gpu.mojom.GpuFeatureInfo gpu_feature_info, gpu.mojom.SharedImageCapabilities shared_image_capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=60" + }, + "viz.mojom.GpuService.SetChannelClientPid": { + "definition": "SetChannelClientPid(int32 client_id, mojo_base.mojom.ProcessId client_pid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=74" + }, + "viz.mojom.GpuService.SetChannelDiskCacheHandle": { + "definition": "SetChannelDiskCacheHandle( int32 client_id, gpu.mojom.GpuDiskCacheHandle cache_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=78" + }, + "viz.mojom.GpuService.SetChannelPersistentCacheParams": { + "definition": "SetChannelPersistentCacheParams( int32 client_id, gpu.mojom.GpuDiskCacheHandle cache_handle, persistent_cache.mojom.ReadWriteBackendParams backend_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=82" + }, + "viz.mojom.GpuService.OnDiskCacheHandleDestoyed": { + "definition": "OnDiskCacheHandleDestoyed(gpu.mojom.GpuDiskCacheHandle cache_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=89" + }, + "viz.mojom.GpuService.CloseChannel": { + "definition": "CloseChannel(int32 client_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=93" + }, + "viz.mojom.GpuService.RegisterDCOMPSurfaceHandle": { + "definition": "[EnableIf=is_win] RegisterDCOMPSurfaceHandle(handle surface_handle) => (mojo_base.mojom.UnguessableToken? token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=110" + }, + "viz.mojom.GpuService.UnregisterDCOMPSurfaceHandle": { + "definition": "[EnableIf=is_win] UnregisterDCOMPSurfaceHandle(mojo_base.mojom.UnguessableToken token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=118" + }, + "viz.mojom.GpuService.CreateVideoEncodeAcceleratorProvider": { + "definition": "CreateVideoEncodeAcceleratorProvider( pending_receiver vea_provider);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=122" + }, + "viz.mojom.GpuService.BindWebNNContextProvider": { + "definition": "[RuntimeFeature=webnn.mojom.features.kWebMachineLearningNeuralNetwork] BindWebNNContextProvider( pending_receiver? receiver, int32 client_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=127" + }, + "viz.mojom.GpuService.GetVideoMemoryUsageStats": { + "definition": "GetVideoMemoryUsageStats() => (gpu.mojom.VideoMemoryUsageStats stats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=133" + }, + "viz.mojom.GpuService.StartPeakMemoryMonitor": { + "definition": "StartPeakMemoryMonitor(uint32 sequence_num);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=138" + }, + "viz.mojom.GpuService.GetPeakMemoryUsage": { + "definition": "GetPeakMemoryUsage(uint32 sequence_num) => (uint64 memory_usage, map memory_per_allocation_source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=142" + }, + "viz.mojom.GpuService.RequestDXGIInfo": { + "definition": "[EnableIf=is_win] RequestDXGIInfo() => (gfx.mojom.DXGIInfo dxgi_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=149" + }, + "viz.mojom.GpuService.LoadedBlob": { + "definition": "LoadedBlob(gpu.mojom.GpuDiskCacheHandle cache_handle, mojo_base.mojom.ByteString key, mojo_base.mojom.ByteString data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=156" + }, + "viz.mojom.GpuService.WakeUpGpu": { + "definition": "WakeUpGpu();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=161" + }, + "viz.mojom.GpuService.GpuSwitched": { + "definition": "GpuSwitched();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=165" + }, + "viz.mojom.GpuService.DisplayAdded": { + "definition": "DisplayAdded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=168" + }, + "viz.mojom.GpuService.DisplayRemoved": { + "definition": "DisplayRemoved();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=171" + }, + "viz.mojom.GpuService.DisplayMetricsChanged": { + "definition": "DisplayMetricsChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=174" + }, + "viz.mojom.GpuService.DestroyAllChannels": { + "definition": "DestroyAllChannels();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=177" + }, + "viz.mojom.GpuService.OnBackgroundCleanup": { + "definition": "OnBackgroundCleanup();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=183" + }, + "viz.mojom.GpuService.OnBackgrounded": { + "definition": "OnBackgrounded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=186" + }, + "viz.mojom.GpuService.OnForegrounded": { + "definition": "OnForegrounded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=189" + }, + "viz.mojom.GpuService.OnMemoryPressure": { + "definition": "[EnableIfNot=is_android] OnMemoryPressure(mojo_base.mojom.MemoryPressureLevel level);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=192" + }, + "viz.mojom.GpuService.BeginCATransaction": { + "definition": "[EnableIf=is_apple] BeginCATransaction();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=196" + }, + "viz.mojom.GpuService.CommitCATransaction": { + "definition": "[EnableIf=is_apple] CommitCATransaction() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=201" + }, + "viz.mojom.GpuService.WriteClangProfilingProfile": { + "definition": "[EnableIf=use_clang_profiling_inside_sandbox] WriteClangProfilingProfile() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=206" + }, + "viz.mojom.GpuService.GetDawnInfo": { + "definition": "GetDawnInfo(bool collect_metrics) => (array dawn_info_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=210" + }, + "viz.mojom.GpuService.Crash": { + "definition": "Crash();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=211" + }, + "viz.mojom.GpuService.Hang": { + "definition": "Hang();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=213" + }, + "viz.mojom.GpuService.ThrowJavaException": { + "definition": "ThrowJavaException();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/gpu_service.mojom;l=215" + }, + "viz.mojom.InfoCollectionGpuService.GetGpuSupportedDirectXVersionAndDevicePerfInfo": { + "definition": "[EnableIf=is_win] GetGpuSupportedDirectXVersionAndDevicePerfInfo() => (uint32 d3d12_feature_level, uint32 highest_shader_model_version, uint32 directml_feature_level, gpu.mojom.DevicePerfInfo device_perf_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/info_collection_gpu_service.mojom;l=18" + }, + "viz.mojom.InfoCollectionGpuService.GetGpuSupportedVulkanVersionInfo": { + "definition": "[EnableIf=is_win] GetGpuSupportedVulkanVersionInfo() => (uint32 vulkan_version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/gl/info_collection_gpu_service.mojom;l=26" + }, + "viz.mojom.VizMain.CreateFrameSinkManager": { + "definition": "CreateFrameSinkManager(FrameSinkManagerParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=51" + }, + "viz.mojom.VizMain.CreateGpuService": { + "definition": "CreateGpuService( pending_receiver gpu_service, pending_remote gpu_host, pending_remote gpu_logging, pending_remote discardable_memory_manager, mojo_base.mojom.UnsafeSharedMemoryRegion? use_shader_cache_shm_count, GpuServiceCreationParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=52" + }, + "viz.mojom.VizMain.SetRenderParams": { + "definition": "SetRenderParams( gfx.mojom.SubpixelRendering subpixel_rendering, float text_contrast, float text_gamma);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=63" + }, + "viz.mojom.VizMain.CreateInfoCollectionGpuService": { + "definition": "[EnableIf=is_win] CreateInfoCollectionGpuService( pending_receiver info_collection_gpu_service);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=70" + }, + "viz.mojom.VizMain.StartDebugStream": { + "definition": "[EnableIf=use_viz_debugger] StartDebugStream(pending_remote viz_debug);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=86" + }, + "viz.mojom.VizMain.FilterDebugStream": { + "definition": "[EnableIf=use_viz_debugger] FilterDebugStream(mojo_base.mojom.DictionaryValue filterData);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=91" + }, + "viz.mojom.VizMain.StopDebugStream": { + "definition": "[EnableIf=use_viz_debugger] StopDebugStream();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=96" + }, + "viz.mojom.FrameSinkManagerParams": { + "definition": "struct FrameSinkManagerParams { uint32 restart_id; bool use_activation_deadline = true; uint32 activation_deadline_in_frames = 4; pending_receiver frame_sink_manager; pending_remote frame_sink_manager_client; DebugRendererSettings debug_renderer_settings;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=21" + }, + "viz.mojom.GpuServiceCreationParams": { + "definition": "struct GpuServiceCreationParams { [EnableIf=use_ozone] bool supports_overlays = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/privileged/mojom/viz_main.mojom;l=41" + }, + "viz.mojom.CubicBezierTimingFunction": { + "definition": "struct CubicBezierTimingFunction { double x1; double y1; double x2; double y2;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=14" + }, + "viz.mojom.StepsTimingFunction": { + "definition": "struct StepsTimingFunction { uint32 num_steps; TimingStepPosition step_position;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=32" + }, + "viz.mojom.LinearEasingPoint": { + "definition": "struct LinearEasingPoint { double in; double out;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=42" + }, + "viz.mojom.AxisAngle": { + "definition": "struct AxisAngle { gfx.mojom.Vector3dF axis; float angle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=58" + }, + "viz.mojom.AnimationKeyframe": { + "definition": "struct AnimationKeyframe { AnimationKeyframeValue value; mojo_base.mojom.TimeDelta start_time; TimingFunction? timing_function;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=96" + }, + "viz.mojom.AnimationKeyframeModel": { + "definition": "struct AnimationKeyframeModel { int32 id; int32 group_id; int32 target_property_type; cc.mojom.ElementId element_id; TimingFunction timing_function; array keyframes; double scaled_duration; AnimationDirection direction; AnimationFillMode fill_mode; double playback_rate; double iterations; double iteration_start; mojo_base.mojom.TimeDelta time_offset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=128" + }, + "viz.mojom.Animation": { + "definition": "struct Animation { int32 id; cc.mojom.ElementId element_id; array keyframe_models;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=179" + }, + "viz.mojom.AnimationTimeline": { + "definition": "struct AnimationTimeline { int32 id; array new_animations; array removed_animations;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=193" + }, + "viz.mojom.TimingStepPosition": { + "definition": "enum TimingStepPosition { kStart, kEnd, kJumpBoth, kJumpEnd, kJumpNone, kJumpStart,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=22" + }, + "viz.mojom.AnimationDirection": { + "definition": "enum AnimationDirection { kNormal, kReverse, kAlternateNormal, kAlternateReverse,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=108" + }, + "viz.mojom.AnimationFillMode": { + "definition": "enum AnimationFillMode { kNone, kForwards, kBackwards, kBoth, kAuto,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=116" + }, + "viz.mojom.TimingFunction": { + "definition": "union TimingFunction { CubicBezierTimingFunction cubic_bezier; StepsTimingFunction steps; array linear;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=51" + }, + "viz.mojom.TransformOperation": { + "definition": "union TransformOperation { bool identity; float perspective_depth; gfx.mojom.Vector2dF skew; gfx.mojom.Vector3dF scale; gfx.mojom.Vector3dF translate; AxisAngle rotate; gfx.mojom.Transform matrix;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=65" + }, + "viz.mojom.AnimationKeyframeValue": { + "definition": "union AnimationKeyframeValue { float scalar; skia.mojom.SkColor color; gfx.mojom.SizeF size; gfx.mojom.Rect rect; array transform;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/animation.mojom;l=87" + }, + "viz.mojom.BeginFrameId": { + "definition": "struct BeginFrameId { uint64 source_id; uint64 sequence_number;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/begin_frame_args.mojom;l=16" + }, + "viz.mojom.BeginFrameArgs": { + "definition": "struct BeginFrameArgs { mojo_base.mojom.TimeTicks frame_time; mojo_base.mojom.TimeTicks deadline; mojo_base.mojom.TimeDelta interval; BeginFrameId frame_id; uint64 frames_throttled_since_last; int64 trace_id; mojo_base.mojom.TimeTicks dispatch_time; mojo_base.mojom.TimeTicks client_arrival_time; BeginFrameArgsType type; bool on_critical_path; bool animate_only;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/begin_frame_args.mojom;l=22" + }, + "viz.mojom.BeginFrameAck": { + "definition": "struct BeginFrameAck { uint64 source_id; uint64 sequence_number; int64 trace_id; bool has_damage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/begin_frame_args.mojom;l=37" + }, + "viz.mojom.BeginFrameArgsType": { + "definition": "enum BeginFrameArgsType { INVALID, NORMAL, MISSED};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/begin_frame_args.mojom;l=9" + }, + "viz.mojom.BitmapInSharedMemory": { + "definition": "struct BitmapInSharedMemory { skia.mojom.ImageInfo image_info; uint64 row_bytes; mojo_base.mojom.WritableSharedMemoryRegion? pixels;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/bitmap_in_shared_memory.mojom;l=14" + }, + "viz.mojom.BlitRequest": { + "definition": "struct BlitRequest { gfx.mojom.Point destination_region_offset; LetterboxingBehavior letterboxing_behavior; gpu.mojom.ExportedSharedImage shared_image; gpu.mojom.SyncToken sync_token; bool populates_gpu_memory_buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/blit_request.mojom;l=18" + }, + "viz.mojom.LetterboxingBehavior": { + "definition": "enum LetterboxingBehavior { kDoNotLetterbox, kLetterbox,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/blit_request.mojom;l=12" + }, + "viz.mojom.CompositingModeWatcher.CompositingModeFallbackToSoftware": { + "definition": "CompositingModeFallbackToSoftware();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositing_mode_watcher.mojom;l=8" + }, + "viz.mojom.CompositingModeReporter.AddCompositingModeWatcher": { + "definition": "AddCompositingModeWatcher(pending_remote watcher);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositing_mode_watcher.mojom;l=15" + }, + "viz.mojom.CompositorFrame": { + "definition": "struct CompositorFrame { CompositorFrameMetadata metadata; array resources; array passes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame.mojom;l=12" + }, + "viz.mojom.CompositorFrameMetadata": { + "definition": "struct CompositorFrameMetadata { float device_scale_factor; gfx.mojom.PointF root_scroll_offset; float page_scale_factor; gfx.mojom.SizeF scrollable_viewport_size; gfx.mojom.Size visible_viewport_size; gfx.mojom.ContentColorUsage content_color_usage; bool may_contain_video; bool may_throttle_if_undrawn_frames; bool is_handling_interaction; bool is_handling_animation; skia.mojom.SkColor4f root_background_color; array latency_info; array referenced_surfaces; FrameDeadline deadline; array activation_dependencies; BeginFrameAck begin_frame_ack; uint32 frame_token; bool send_frame_token_to_embedder; bool top_controls_visible_height_set; float top_controls_visible_height; float min_page_scale_factor; gfx.mojom.OverlayTransform display_transform_hint; bool is_mobile_optimized; gfx.mojom.DelegatedInkMetadata? delegated_ink_metadata; array transition_directives; RegionCaptureBounds capture_bounds; bool has_shared_element_resources; blink.mojom.SameDocNavigationScreenshotDestinationToken? screenshot_destination; bool is_software; array offset_tag_definitions; array offset_tag_values; FrameIntervalInputs frame_interval_inputs; TreesInVizTiming trees_in_viz_timing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_metadata.mojom;l=28" + }, + "viz.mojom.CompositorFrameSink.SetParams": { + "definition": "SetParams(CompositorFrameSinkParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=63" + }, + "viz.mojom.CompositorFrameSink.SetNeedsBeginFrame": { + "definition": "SetNeedsBeginFrame(bool needs_begin_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=67" + }, + "viz.mojom.CompositorFrameSink.SubmitCompositorFrame": { + "definition": "[EstimateSize, UnlimitedSize] SubmitCompositorFrame(LocalSurfaceId local_surface_id, CompositorFrame frame, HitTestRegionList? hit_test_region_list, uint64 submit_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=88" + }, + "viz.mojom.CompositorFrameSink.DidNotProduceFrame": { + "definition": "DidNotProduceFrame(BeginFrameAck ack);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=96" + }, + "viz.mojom.CompositorFrameSink.NotifyNewLocalSurfaceIdExpectedWhilePaused": { + "definition": "NotifyNewLocalSurfaceIdExpectedWhilePaused();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=102" + }, + "viz.mojom.CompositorFrameSink.BindLayerContext": { + "definition": "BindLayerContext(PendingLayerContext context, LayerContextSettings settings);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=109" + }, + "viz.mojom.CompositorFrameSinkClient.DidReceiveCompositorFrameAck": { + "definition": "DidReceiveCompositorFrameAck(array resources);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=127" + }, + "viz.mojom.CompositorFrameSinkClient.OnBeginFrame": { + "definition": "OnBeginFrame(BeginFrameArgs args, map details, array resources);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=134" + }, + "viz.mojom.CompositorFrameSinkClient.OnBeginFramePausedChanged": { + "definition": "OnBeginFramePausedChanged(bool paused);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=139" + }, + "viz.mojom.CompositorFrameSinkClient.ReclaimResources": { + "definition": "ReclaimResources(array resources);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=142" + }, + "viz.mojom.CompositorFrameSinkClient.OnCompositorFrameTransitionDirectiveProcessed": { + "definition": "OnCompositorFrameTransitionDirectiveProcessed(uint32 sequence_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=146" + }, + "viz.mojom.CompositorFrameSinkClient.OnSurfaceEvicted": { + "definition": "OnSurfaceEvicted(LocalSurfaceId local_surface_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=152" + }, + "viz.mojom.LayerContextSettings": { + "definition": "struct LayerContextSettings { bool draw_mode_is_gpu; bool enable_early_damage_check; int32 damaged_frame_limit; cc.mojom.ScrollbarAnimator scrollbar_animator; mojo_base.mojom.TimeDelta scrollbar_fade_delay; mojo_base.mojom.TimeDelta scrollbar_fade_duration; mojo_base.mojom.TimeDelta scrollbar_thinning_duration; float idle_thickness_scale; float top_controls_show_threshold; float top_controls_hide_threshold; gfx.mojom.Size minimum_occlusion_tracking_size; bool enable_edge_anti_aliasing; bool enable_backface_visibility_interop; bool enable_fluent_scrollbar; bool enable_fluent_overlay_scrollbar;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=20" + }, + "viz.mojom.CompositorFrameSinkParams": { + "definition": "struct CompositorFrameSinkParams { bool wants_animate_only_begin_frames; bool auto_needs_begin_frame; bool no_compositor_frame_acks;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_sink.mojom;l=41" + }, + "viz.mojom.CompositorFrameTransitionDirectiveSharedElement": { + "definition": "struct CompositorFrameTransitionDirectiveSharedElement { CompositorRenderPassId render_pass_id; ViewTransitionElementResourceId view_transition_element_resource_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_transition_directive.mojom;l=20" + }, + "viz.mojom.CompositorFrameTransitionDirective": { + "definition": "struct CompositorFrameTransitionDirective { blink.mojom.ViewTransitionToken transition_token; bool maybe_cross_frame_sink; uint32 sequence_id; CompositorFrameTransitionDirectiveType type; array shared_elements; gfx.mojom.DisplayColorSpaces display_color_spaces;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_transition_directive.mojom;l=27" + }, + "viz.mojom.CompositorFrameTransitionDirectiveType": { + "definition": "enum CompositorFrameTransitionDirectiveType { kSave, kAnimateRenderer, kRelease};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_frame_transition_directive.mojom;l=13" + }, + "viz.mojom.CompositorRenderPass": { + "definition": "struct CompositorRenderPass { CompositorRenderPassId id; gfx.mojom.Rect output_rect; gfx.mojom.Rect damage_rect; gfx.mojom.Transform transform_to_root_target; FilterOperations filters; FilterOperations backdrop_filters; skia.mojom.SkPath? backdrop_filter_bounds; SubtreeCaptureId subtree_capture_id; gfx.mojom.Size subtree_size; ViewTransitionElementResourceId? view_transition_element_resource_id; bool has_transparent_background; bool cache_render_pass = false; bool has_damage_from_contributing_content = false; bool generate_mipmap = false; array copy_requests; array quad_list; bool has_per_quad_damage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_render_pass.mojom;l=18" + }, + "viz.mojom.CompositorRenderPassId": { + "definition": "struct CompositorRenderPassId { uint64 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/compositor_render_pass_id.mojom;l=7" + }, + "viz.mojom.CopyOutputResultSender.SendResult": { + "definition": "SendResult(CopyOutputResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/copy_output_request.mojom;l=35" + }, + "viz.mojom.CopyOutputRequest": { + "definition": "struct CopyOutputRequest { CopyOutputResultFormat result_format; CopyOutputResultDestination result_destination; mojo_base.mojom.TimeDelta send_result_delay; gfx.mojom.Vector2d scale_from; gfx.mojom.Vector2d scale_to; mojo_base.mojom.UnguessableToken? source; gfx.mojom.Rect? area; gfx.mojom.Rect? result_selection; BlitRequest? blit_request; pending_remote result_sender;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/copy_output_request.mojom;l=14" + }, + "viz.mojom.CopyOutputResult": { + "definition": "struct CopyOutputResult { CopyOutputResultFormat format; CopyOutputResultDestination destination; gfx.mojom.Rect rect; BitmapInSharedMemory? bitmap; gpu.mojom.Mailbox? mailbox; gfx.mojom.ColorSpace? color_space; pending_remote? releaser;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/copy_output_result.mojom;l=27" + }, + "viz.mojom.CopyOutputResultFormat": { + "definition": "enum CopyOutputResultFormat { RGBA,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/copy_output_result.mojom;l=16" + }, + "viz.mojom.CopyOutputResultDestination": { + "definition": "enum CopyOutputResultDestination { kSystemMemory, kSharedImage,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/copy_output_result.mojom;l=21" + }, + "viz.mojom.FilterOperation": { + "definition": "struct FilterOperation { FilterType type; float amount; gfx.mojom.Point offset; skia.mojom.SkColor4f drop_shadow_color; PaintFilter image_filter; array? matrix; int32 zoom_inset; skia.mojom.TileMode blur_tile_mode; array? shape;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/filter_operation.mojom;l=33" + }, + "viz.mojom.FilterType": { + "definition": "enum FilterType { GRAYSCALE, SEPIA, SATURATE, HUE_ROTATE, INVERT, BRIGHTNESS, CONTRAST, OPACITY, BLUR, DROP_SHADOW, COLOR_MATRIX, ZOOM, REFERENCE, SATURATING_BRIGHTNESS, ALPHA_THRESHOLD, OFFSET, FILTER_TYPE_LAST = OFFSET};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/filter_operation.mojom;l=12" + }, + "viz.mojom.FilterOperations": { + "definition": "struct FilterOperations { array operations;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/filter_operations.mojom;l=10" + }, + "viz.mojom.FrameDeadline": { + "definition": "struct FrameDeadline { mojo_base.mojom.TimeTicks frame_start_time; uint32 deadline_in_frames; mojo_base.mojom.TimeDelta frame_interval; bool use_default_lower_bound_deadline;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_deadline.mojom;l=9" + }, + "viz.mojom.ContentFrameIntervalInfo": { + "definition": "struct ContentFrameIntervalInfo { ContentFrameIntervalType type; mojo_base.mojom.TimeDelta frame_interval; uint32 duplicate_count = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_interval_inputs.mojom;l=24" + }, + "viz.mojom.FrameIntervalInputs": { + "definition": "struct FrameIntervalInputs { mojo_base.mojom.TimeTicks frame_time; bool has_user_input; bool has_input; float major_scroll_speed_in_pixels_per_second; array content_interval_info; bool has_only_content_frame_interval_updates = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_interval_inputs.mojom;l=32" + }, + "viz.mojom.ContentFrameIntervalType": { + "definition": "enum ContentFrameIntervalType { kVideo, kAnimatingImage, kScrollBarFadeOutAnimation, kCompositorScroll,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_interval_inputs.mojom;l=15" + }, + "viz.mojom.FrameSinkBundle.SetNeedsBeginFrame": { + "definition": "SetNeedsBeginFrame(uint32 sink_id, bool needs_begin_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=53" + }, + "viz.mojom.FrameSinkBundle.Submit": { + "definition": "[UnlimitedSize] Submit(array submissions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=59" + }, + "viz.mojom.FrameSinkBundleClient.FlushNotifications": { + "definition": "FlushNotifications(array acks, array begin_frames, array reclaimed_resources);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=92" + }, + "viz.mojom.FrameSinkBundleClient.OnBeginFramePausedChanged": { + "definition": "OnBeginFramePausedChanged(uint32 sink_id, bool paused);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=98" + }, + "viz.mojom.FrameSinkBundleClient.OnCompositorFrameTransitionDirectiveProcessed": { + "definition": "OnCompositorFrameTransitionDirectiveProcessed( uint32 sink_id, uint32 sequence_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=102" + }, + "viz.mojom.BundledFrameSubmission": { + "definition": "struct BundledFrameSubmission { uint32 sink_id; BundledFrameSubmissionData data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=19" + }, + "viz.mojom.BundledCompositorFrame": { + "definition": "struct BundledCompositorFrame { LocalSurfaceId local_surface_id; CompositorFrame frame; HitTestRegionList? hit_test_region_list; uint64 submit_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=40" + }, + "viz.mojom.BundledReturnedResources": { + "definition": "struct BundledReturnedResources { uint32 sink_id; array resources;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=69" + }, + "viz.mojom.BeginFrameInfo": { + "definition": "struct BeginFrameInfo { uint32 sink_id; BeginFrameArgs args; map details; array resources;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=76" + }, + "viz.mojom.BundledFrameSubmissionData": { + "definition": "union BundledFrameSubmissionData { BundledCompositorFrame frame; BeginFrameAck did_not_produce_frame;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle.mojom;l=30" + }, + "viz.mojom.FrameSinkBundleId": { + "definition": "struct FrameSinkBundleId { uint32 client_id; uint32 bundle_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_bundle_id.mojom;l=7" + }, + "viz.mojom.FrameSinkId": { + "definition": "struct FrameSinkId { uint32 client_id; uint32 sink_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_sink_id.mojom;l=7" + }, + "viz.mojom.FrameTimingDetails": { + "definition": "struct FrameTimingDetails { mojo_base.mojom.TimeTicks received_compositor_frame_timestamp; mojo_base.mojom.TimeTicks embedded_frame_timestamp; mojo_base.mojom.TimeTicks draw_start_timestamp; gfx.mojom.SwapTimings swap_timings; gfx.mojom.PresentationFeedback presentation_feedback; BeginFrameId frame_id; mojo_base.mojom.TimeTicks start_update_display_tree; mojo_base.mojom.TimeTicks start_prepare_to_draw; mojo_base.mojom.TimeTicks start_draw_layers; mojo_base.mojom.TimeTicks submit_compositor_frame;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/frame_timing_details.mojom;l=13" + }, + "viz.mojom.SingleplanarFormat": { + "definition": "enum SingleplanarFormat { RGBA_8888, RGBA_4444, BGRA_8888, ALPHA_8, BGR_565, ETC1, R_8, RG_88, LUMINANCE_F16, RGBA_F16, R_16, RG_1616, RGBX_8888, BGRX_8888, RGBA_1010102, BGRA_1010102, R_F16,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/internal/singleplanar_format.mojom;l=9" + }, + "viz.mojom.RareProperties": { + "definition": "struct RareProperties { cc.mojom.FilterQuality filter_quality = cc.mojom.FilterQuality.kLow; cc.mojom.DynamicRangeLimit dynamic_range_limit; RegionCaptureBounds capture_bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=35" + }, + "viz.mojom.MirrorLayerExtra": { + "definition": "struct MirrorLayerExtra { int32 mirrored_layer_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=51" + }, + "viz.mojom.SurfaceLayerExtra": { + "definition": "struct SurfaceLayerExtra { SurfaceRange surface_range; uint32? deadline_in_frames; bool stretch_content_to_fill_bounds; bool surface_hit_testable; bool has_pointer_events_none; bool is_reflection; bool will_draw_needs_reset; bool override_child_paint_flags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=57" + }, + "viz.mojom.TextureLayerExtra": { + "definition": "struct TextureLayerExtra { bool blend_background_color; bool force_texture_to_opaque; gfx.mojom.PointF uv_top_left; gfx.mojom.PointF uv_bottom_right; TransferableResource? transferable_resource;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=90" + }, + "viz.mojom.UIResourceLayerExtra": { + "definition": "struct UIResourceLayerExtra { cc.mojom.UIResourceId ui_resource_id; gfx.mojom.Size image_bounds; gfx.mojom.PointF uv_top_left; gfx.mojom.PointF uv_bottom_right;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=100" + }, + "viz.mojom.TileDisplayLayerExtra": { + "definition": "struct TileDisplayLayerExtra { skia.mojom.SkColor4f? solid_color; bool is_backdrop_filter_mask; bool is_directly_composited_image; bool nearest_neighbor; gfx.mojom.ContentColorUsage content_color_usage; gfx.mojom.Rect recorded_bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=109" + }, + "viz.mojom.ScrollbarLayerBaseExtra": { + "definition": "struct ScrollbarLayerBaseExtra { cc.mojom.ElementId scroll_element_id; bool is_overlay_scrollbar; bool is_web_test; float thumb_thickness_scale_factor; float current_pos; float clip_layer_length; float scroll_layer_length; bool is_horizontal_orientation; bool is_left_side_vertical_scrollbar; float vertical_adjust; bool has_find_in_page_tickmarks;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=134" + }, + "viz.mojom.NinePatchThumbScrollbarLayerExtra": { + "definition": "struct NinePatchThumbScrollbarLayerExtra { ScrollbarLayerBaseExtra scrollbar_base_extra; int32 thumb_thickness; int32 thumb_length; int32 track_start; int32 track_length; gfx.mojom.Size image_bounds; gfx.mojom.Rect aperture; cc.mojom.UIResourceId thumb_ui_resource_id; cc.mojom.UIResourceId track_and_buttons_ui_resource_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=150" + }, + "viz.mojom.PaintedScrollbarLayerExtra": { + "definition": "struct PaintedScrollbarLayerExtra { ScrollbarLayerBaseExtra scrollbar_base_extra; float internal_contents_scale; gfx.mojom.Size internal_content_bounds; bool jump_on_track_click; bool supports_drag_snap_back; int32 thumb_thickness; int32 thumb_length; gfx.mojom.Rect back_button_rect; gfx.mojom.Rect forward_button_rect; gfx.mojom.Rect track_rect; skia.mojom.SkColor4f? thumb_color; bool uses_nine_patch_track_and_buttons; gfx.mojom.Size track_and_buttons_image_bounds; gfx.mojom.Rect track_and_buttons_aperture; float painted_opacity; cc.mojom.UIResourceId track_and_buttons_ui_resource_id; cc.mojom.UIResourceId thumb_ui_resource_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=165" + }, + "viz.mojom.SolidColorScrollbarLayerExtra": { + "definition": "struct SolidColorScrollbarLayerExtra { ScrollbarLayerBaseExtra scrollbar_base_extra; int32 thumb_thickness; int32 track_start; skia.mojom.SkColor4f color;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=188" + }, + "viz.mojom.ViewTransitionContentLayerExtra": { + "definition": "struct ViewTransitionContentLayerExtra { ViewTransitionElementResourceId resource_id; bool is_live_content_layer; gfx.mojom.RectF max_extents_rect;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=198" + }, + "viz.mojom.NinePatchLayerExtra": { + "definition": "struct NinePatchLayerExtra { gfx.mojom.Rect image_aperture; gfx.mojom.Rect border; gfx.mojom.Rect layer_occlusion; bool fill_center; cc.mojom.UIResourceId ui_resource_id; gfx.mojom.Size image_bounds; gfx.mojom.PointF uv_top_left; gfx.mojom.PointF uv_bottom_right;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=213" + }, + "viz.mojom.Layer": { + "definition": "struct Layer { int64 id; cc.mojom.LayerType type; gfx.mojom.Size bounds; bool contents_opaque; bool contents_opaque_for_text; bool is_drawable; bool layer_property_changed_not_from_property_trees; bool layer_property_changed_from_property_trees; cc.mojom.HitTestOpaqueness hit_test_opaqueness; skia.mojom.SkColor4f background_color; skia.mojom.SkColor4f safe_opaque_background_color; cc.mojom.ElementId element_id; gfx.mojom.Rect update_rect; gfx.mojom.Vector2dF offset_to_transform_parent; int32 transform_tree_index; int32 clip_tree_index; int32 effect_tree_index; int32 scroll_tree_index; bool should_check_backface_visibility; RareProperties? rare_properties; LayerExtra? layer_extra;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=254" + }, + "viz.mojom.AnchorPositionScrollData": { + "definition": "struct AnchorPositionScrollData { array adjustment_container_ids; gfx.mojom.Vector2d accumulated_scroll_origin; bool needs_scroll_adjustment_in_x; bool needs_scroll_adjustment_in_y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=319" + }, + "viz.mojom.StickyPositionNodeData": { + "definition": "struct StickyPositionNodeData { int32 scroll_ancestor; bool is_anchored_left; bool is_anchored_right; bool is_anchored_top; bool is_anchored_bottom; float left_offset; float right_offset; float top_offset; float bottom_offset; gfx.mojom.RectF constraint_box_rect; gfx.mojom.RectF scroll_container_relative_sticky_box_rect; gfx.mojom.RectF scroll_container_relative_containing_block_rect; gfx.mojom.Vector2dF pixel_snap_offset; int32 nearest_node_shifting_sticky_box; int32 nearest_node_shifting_containing_block; gfx.mojom.Vector2dF total_sticky_box_sticky_offset; gfx.mojom.Vector2dF total_containing_block_sticky_offset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=327" + }, + "viz.mojom.TransformTreeUpdate": { + "definition": "struct TransformTreeUpdate { float page_scale_factor; float device_scale_factor; float device_transform_scale_factor; array nodes_affected_by_outer_viewport_bounds_delta; array nodes_affected_by_safe_area_bottom; array sticky_position_data; array anchor_position_scroll_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=353" + }, + "viz.mojom.TransformNode": { + "definition": "struct TransformNode { int32 id; int32 parent_id; int32 parent_frame_id; cc.mojom.ElementId element_id; gfx.mojom.Transform local; gfx.mojom.Point3F origin; gfx.mojom.Vector2dF post_translation; gfx.mojom.Transform to_parent; gfx.mojom.PointF scroll_offset; gfx.mojom.Vector2dF snap_amount; uint32? sticky_position_constraint_id; uint32? anchor_position_scroll_data_id; int32 sorting_context_id; bool has_potential_animation; bool is_currently_animating; bool flattens_inherited_transform; bool scrolls; bool should_undo_overscroll; bool should_be_snapped; bool moved_by_outer_viewport_bounds_delta_y; bool in_subtree_of_page_scale_layer; bool transform_changed; bool delegates_to_parent_for_backface; bool will_change_transform; float maximum_animation_scale; bool node_and_ancestors_are_animated_or_invertible; bool is_invertible; bool ancestors_are_invertible; bool node_and_ancestors_are_flat; bool node_or_ancestors_will_change_transform; cc.mojom.ElementId visible_frame_element_id; uint64 damage_reasons_bit_mask; bool moved_by_safe_area_bottom;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=364" + }, + "viz.mojom.ClipNode": { + "definition": "struct ClipNode { int32 id; int32 parent_id; int32 transform_id; gfx.mojom.RectF clip; int32 pixel_moving_filter_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=438" + }, + "viz.mojom.EffectNode": { + "definition": "struct EffectNode { int32 id; int32 parent_id; int32 transform_id; int32 clip_id; cc.mojom.ElementId element_id; float opacity; cc.mojom.RenderSurfaceReason render_surface_reason; gfx.mojom.Vector2dF surface_contents_scale; SubtreeCaptureId subtree_capture_id; gfx.mojom.Size subtree_size; uint32 blend_mode; int32 target_id; int32 view_transition_target_id; int32 closest_ancestor_with_cached_render_surface_id; int32 closest_ancestor_with_copy_request_id; int32 closest_ancestor_being_captured_id; int32 closest_ancestor_with_shared_element_id; ViewTransitionElementResourceId view_transition_element_resource_id; FilterOperations filters; FilterOperations backdrop_filters; skia.mojom.SkPath? backdrop_filter_bounds; float backdrop_filter_quality; cc.mojom.ElementId backdrop_mask_element_id; gfx.mojom.MaskFilterInfo mask_filter_info; bool cache_render_surface; bool double_sided; bool trilinear_filtering; bool subtree_hidden; bool has_potential_filter_animation; bool has_potential_backdrop_filter_animation; bool has_potential_opacity_animation; bool subtree_has_copy_request; bool is_fast_rounded_corner; bool may_have_backdrop_effect; bool needs_effect_for_2d_scale_transform; array copy_output_requests;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=461" + }, + "viz.mojom.ScrollTreeUpdate": { + "definition": "struct ScrollTreeUpdate { map synced_scroll_offsets; map scrolling_contents_cull_rects; map elastic_overscroll;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=578" + }, + "viz.mojom.ScrollNode": { + "definition": "struct ScrollNode { int32 id; int32 parent_id; int32 transform_id; gfx.mojom.Size container_bounds; gfx.mojom.Size bounds; cc.mojom.ElementId element_id; bool max_scroll_offset_affected_by_page_scale; bool scrolls_inner_viewport; bool scrolls_outer_viewport; bool prevent_viewport_scrolling_from_inner; bool user_scrollable_horizontal; bool user_scrollable_vertical; bool is_composited;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=585" + }, + "viz.mojom.LayerExtra": { + "definition": "union LayerExtra { MirrorLayerExtra mirror_layer_extra; NinePatchThumbScrollbarLayerExtra nine_patch_thumb_scrollbar_layer_extra; PaintedScrollbarLayerExtra painted_scrollbar_layer_extra; SolidColorScrollbarLayerExtra solid_color_scrollbar_layer_extra; SurfaceLayerExtra surface_layer_extra; TextureLayerExtra texture_layer_extra; UIResourceLayerExtra ui_resource_layer_extra; TileDisplayLayerExtra tile_display_layer_extra; ViewTransitionContentLayerExtra view_transition_content_layer_extra; NinePatchLayerExtra nine_patch_layer_extra;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer.mojom;l=229" + }, + "viz.mojom.LayerContext.SetVisible": { + "definition": "SetVisible(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer_context.mojom;l=221" + }, + "viz.mojom.LayerContext.UpdateDisplayTree": { + "definition": "UpdateDisplayTree(LayerTreeUpdate update);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer_context.mojom;l=224" + }, + "viz.mojom.LayerContext.UpdateDisplayTiling": { + "definition": "UpdateDisplayTiling(Tiling tiling, bool update_damage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer_context.mojom;l=229" + }, + "viz.mojom.LayerContextClient.OnRequestCommitForFrame": { + "definition": "OnRequestCommitForFrame(BeginFrameArgs args);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer_context.mojom;l=238" + }, + "viz.mojom.TransferableUIResourceRequest": { + "definition": "struct TransferableUIResourceRequest { Type type; cc.mojom.UIResourceId uid; TransferableResource? transferable_resource; bool opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer_context.mojom;l=28" + }, + "viz.mojom.LayerTreeUpdate": { + "definition": "struct LayerTreeUpdate { BeginFrameArgs begin_frame_args; int32 source_frame_number; uint64 trace_id; int64 primary_main_frame_item_sequence_number; cc.mojom.LayerSelection selection; float page_scale_factor; float min_page_scale_factor; float max_page_scale_factor; float external_page_scale_factor; gfx.mojom.Rect device_viewport; float device_scale_factor; float painted_device_scale_factor; gfx.mojom.DisplayColorSpaces display_color_spaces; LocalSurfaceId? local_surface_id_from_parent; LocalSurfaceId current_local_surface_id; uint32 next_frame_token; bool send_frame_token_to_embedder; LocalSurfaceId? target_local_surface_id; skia.mojom.SkColor4f background_color; int32 overscroll_elasticity_transform; int32 page_scale_transform; int32 inner_scroll; int32 outer_clip; int32 outer_scroll; gfx.mojom.Rect viewport_damage_rect; bool full_tree_damaged; cc.mojom.LayerTreeDebugState debug_state; gfx.mojom.OverlayTransform display_transform_hint; float max_safe_area_inset_bottom; cc.mojom.BrowserControlsParams browser_controls_params; cc.mojom.BrowserControlsOffsetTagModifications browser_controls_offset_tag_modifications; float top_controls_shown_ratio; float bottom_controls_shown_ratio; array ui_resource_requests; array layers; array? layer_order; TransformTreeUpdate? transform_tree_update; ScrollTreeUpdate? scroll_tree_update; array transform_nodes; array clip_nodes; array effect_nodes; array scroll_nodes; uint32 num_transform_nodes; uint32 num_clip_nodes; uint32 num_effect_nodes; uint32 num_scroll_nodes; array tilings; array? surface_ranges; array? view_transition_requests; array? animation_timelines; array? removed_animation_timelines;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer_context.mojom;l=63" + }, + "viz.mojom.PendingLayerContext": { + "definition": "struct PendingLayerContext { pending_associated_receiver receiver; pending_associated_remote client;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer_context.mojom;l=242" + }, + "viz.mojom.Type": { + "definition": "enum Type { kCreate, kDelete };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/layer_context.mojom;l=30" + }, + "viz.mojom.LocalSurfaceId": { + "definition": "struct LocalSurfaceId { uint32 parent_sequence_number; uint32 child_sequence_number; mojo_base.mojom.UnguessableToken embed_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/local_surface_id.mojom;l=9" + }, + "viz.mojom.OffsetTag": { + "definition": "struct OffsetTag { mojo_base.mojom.Token token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/offset_tag.mojom;l=12" + }, + "viz.mojom.OffsetTagValue": { + "definition": "struct OffsetTagValue { OffsetTag tag; gfx.mojom.Vector2dF offset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/offset_tag.mojom;l=17" + }, + "viz.mojom.OffsetTagDefinition": { + "definition": "struct OffsetTagDefinition { OffsetTag tag; SurfaceRange provider; gfx.mojom.Vector2dF min_offset; gfx.mojom.Vector2dF max_offset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/offset_tag.mojom;l=23" + }, + "viz.mojom.PaintFilter": { + "definition": "struct PaintFilter { array? data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/paint_filter.mojom;l=8" + }, + "viz.mojom.RoundedDisplayMasksInfo": { + "definition": "struct RoundedDisplayMasksInfo { bool is_horizontally_positioned; array radii;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=32" + }, + "viz.mojom.DebugBorderQuadState": { + "definition": "struct DebugBorderQuadState { skia.mojom.SkColor4f color; int32 width;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=37" + }, + "viz.mojom.CompositorRenderPassQuadState": { + "definition": "struct CompositorRenderPassQuadState { CompositorRenderPassId render_pass_id; ResourceId mask_resource_id; gfx.mojom.RectF mask_uv_rect; gfx.mojom.Size mask_texture_size; gfx.mojom.Vector2dF filters_scale; gfx.mojom.PointF filters_origin; gfx.mojom.RectF tex_coord_rect; bool force_anti_aliasing_off; float backdrop_filter_quality; bool intersects_damage_under;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=45" + }, + "viz.mojom.SolidColorQuadState": { + "definition": "struct SolidColorQuadState { skia.mojom.SkColor4f color; bool force_anti_aliasing_off;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=74" + }, + "viz.mojom.SurfaceQuadState": { + "definition": "struct SurfaceQuadState { SurfaceRange surface_range; skia.mojom.SkColor4f default_background_color; bool stretch_content_to_fill_bounds; bool is_reflection; bool allow_merge; cc.mojom.FilterQuality? override_child_filter_quality; cc.mojom.DynamicRangeLimit? override_child_dynamic_range_limit;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=79" + }, + "viz.mojom.TextureQuadState": { + "definition": "struct TextureQuadState { ResourceId resource_id; gfx.mojom.PointF uv_top_left; gfx.mojom.PointF uv_bottom_right; skia.mojom.SkColor4f background_color; cc.mojom.DynamicRangeLimit dynamic_range_limit; bool nearest_neighbor; bool secure_output_only; bool is_video_frame; bool force_rgbx; ProtectedVideoState protected_video_type; gfx.mojom.Rect? damage_rect; OverlayPriority overlay_priority_hint; RoundedDisplayMasksInfo rounded_display_masks_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=89" + }, + "viz.mojom.TileQuadState": { + "definition": "struct TileQuadState { gfx.mojom.RectF tex_coord_rect; ResourceId resource_id; bool nearest_neighbor; bool force_anti_aliasing_off;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=105" + }, + "viz.mojom.VideoHoleQuadState": { + "definition": "struct VideoHoleQuadState { mojo_base.mojom.UnguessableToken overlay_plane_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=112" + }, + "viz.mojom.SharedElementQuadState": { + "definition": "struct SharedElementQuadState { ViewTransitionElementResourceId element_resource_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=116" + }, + "viz.mojom.DrawQuad": { + "definition": "struct DrawQuad { gfx.mojom.Rect rect; gfx.mojom.Rect visible_rect; bool needs_blending; SharedQuadState? sqs; DrawQuadState draw_quad_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=131" + }, + "viz.mojom.ProtectedVideoState": { + "definition": "enum ProtectedVideoState { kClear, kSoftwareProtected, kHardwareProtected,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=20" + }, + "viz.mojom.OverlayPriority": { + "definition": "enum OverlayPriority { kLow, kRegular, kRequired};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=26" + }, + "viz.mojom.DrawQuadState": { + "definition": "union DrawQuadState { DebugBorderQuadState debug_border_quad_state; CompositorRenderPassQuadState render_pass_quad_state; SolidColorQuadState solid_color_quad_state; SurfaceQuadState surface_quad_state; TextureQuadState texture_quad_state; TileQuadState tile_quad_state; VideoHoleQuadState video_hole_quad_state; SharedElementQuadState shared_element_quad_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/quads.mojom;l=120" + }, + "viz.mojom.CropIdBoundsPair": { + "definition": "struct CropIdBoundsPair { mojo_base.mojom.Token crop_id; gfx.mojom.Rect bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/region_capture_bounds.mojom;l=16" + }, + "viz.mojom.RegionCaptureBounds": { + "definition": "struct RegionCaptureBounds { array bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/region_capture_bounds.mojom;l=34" + }, + "viz.mojom.ResourceId": { + "definition": "struct ResourceId { uint32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/resource_id.mojom;l=7" + }, + "viz.mojom.ReturnedResource": { + "definition": "struct ReturnedResource { ResourceId id; gpu.mojom.SyncToken sync_token; gfx.mojom.GpuFenceHandle? release_fence; int32 count; bool lost;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/returned_resource.mojom;l=12" + }, + "viz.mojom.Selection": { + "definition": "struct Selection { gfx.mojom.SelectionBound start; gfx.mojom.SelectionBound end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/selection.mojom;l=10" + }, + "viz.mojom.MultiplanarFormat": { + "definition": "struct MultiplanarFormat { PlaneConfig plane_config; Subsampling subsampling; ChannelFormat channel_format; [EnableIf=use_ozone] bool prefers_external_sampler;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/shared_image_format.mojom;l=21" + }, + "viz.mojom.PlaneConfig": { + "definition": "enum PlaneConfig { kY_U_V, kY_V_U, kY_UV, kY_UV_A, kY_U_V_A };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/shared_image_format.mojom;l=10" + }, + "viz.mojom.Subsampling": { + "definition": "enum Subsampling { k420, k422, k444 };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/shared_image_format.mojom;l=13" + }, + "viz.mojom.ChannelFormat": { + "definition": "enum ChannelFormat { k8, k10, k16, k16F };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/shared_image_format.mojom;l=16" + }, + "viz.mojom.SharedImageFormat": { + "definition": "union SharedImageFormat { SingleplanarFormat singleplanar_format; MultiplanarFormat multiplanar_format;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/shared_image_format.mojom;l=32" + }, + "viz.mojom.SharedQuadState": { + "definition": "struct SharedQuadState { gfx.mojom.Transform quad_to_target_transform; gfx.mojom.Rect quad_layer_rect; gfx.mojom.Rect visible_quad_layer_rect; gfx.mojom.MaskFilterInfo? mask_filter_info; gfx.mojom.Rect? clip_rect; bool are_contents_opaque; float opacity; uint32 blend_mode; int32 sorting_context_id; uint32 layer_id; bool is_fast_rounded_corner; OffsetTag offset_tag;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/shared_quad_state.mojom;l=15" + }, + "viz.mojom.SubtreeCaptureId": { + "definition": "struct SubtreeCaptureId { mojo_base.mojom.Token subtree_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/subtree_capture_id.mojom;l=10" + }, + "viz.mojom.SurfaceId": { + "definition": "struct SurfaceId { FrameSinkId frame_sink_id; LocalSurfaceId local_surface_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/surface_id.mojom;l=17" + }, + "viz.mojom.SurfaceInfo": { + "definition": "struct SurfaceInfo { SurfaceId surface_id; float device_scale_factor; gfx.mojom.Size size_in_pixels;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/surface_info.mojom;l=12" + }, + "viz.mojom.SurfaceRange": { + "definition": "struct SurfaceRange { SurfaceId? start; SurfaceId end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/surface_range.mojom;l=9" + }, + "viz.mojom.TextureReleaser.Release": { + "definition": "Release(gpu.mojom.SyncToken sync_token, bool is_lost);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/texture_releaser.mojom;l=13" + }, + "viz.mojom.Thread": { + "definition": "struct Thread { [EnableIf=thread_id_is_64_bit] uint64 id; [EnableIf=thread_id_is_32_bit] uint32 id; ThreadType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/thread.mojom;l=17" + }, + "viz.mojom.ThreadType": { + "definition": "enum ThreadType { kMain, kIO, kCompositor, kVideo, kOther,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/thread.mojom;l=9" + }, + "viz.mojom.TileResource": { + "definition": "struct TileResource { TransferableResource resource; bool is_checkered;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/tiling.mojom;l=13" + }, + "viz.mojom.Tile": { + "definition": "struct Tile { uint32 column_index; uint32 row_index; TileContents contents;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/tiling.mojom;l=34" + }, + "viz.mojom.Tiling": { + "definition": "struct Tiling { int64 layer_id; gfx.mojom.Vector2dF raster_translation; gfx.mojom.Vector2dF raster_scale; gfx.mojom.Size tile_size; gfx.mojom.Rect tiling_rect; array tiles; float scale_key; bool is_deleted;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/tiling.mojom;l=44" + }, + "viz.mojom.TileContents": { + "definition": "union TileContents { cc.mojom.MissingTileReason missing_reason; TileResource resource; skia.mojom.SkColor4f solid_color;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/tiling.mojom;l=22" + }, + "viz.mojom.TransferableResource": { + "definition": "struct TransferableResource { ResourceId id; SharedImageFormat format; gfx.mojom.Size size; gpu.mojom.Mailbox memory_buffer_id; gpu.mojom.SyncToken sync_token; uint32 texture_target; SynchronizationType synchronization_type; bool is_software; bool is_overlay_candidate; bool is_low_latency_rendering; [EnableIf=is_android] bool is_backed_by_surface_view; [EnableIf=is_android|is_win] bool wants_promotion_hint; gfx.mojom.ColorSpace color_space; gfx.mojom.HDRMetadata hdr_metadata; bool needs_detiling; [EnableIf=is_android] gpu.mojom.VulkanYCbCrInfo? ycbcr_info; skia.mojom.SurfaceOrigin origin; skia.mojom.AlphaType alpha_type; ResourceSource resource_source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/transferable_resource.mojom;l=53" + }, + "viz.mojom.SynchronizationType": { + "definition": "enum SynchronizationType { kSyncToken, kGpuCommandsCompleted, kReleaseFence,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/transferable_resource.mojom;l=20" + }, + "viz.mojom.ResourceSource": { + "definition": "enum ResourceSource { kUnknown, kAR, kCanvas, kDrawingBuffer, kExoBuffer, kHeadsUpDisplay, kImageLayerBridge, kPPBGraphics3D, kPepperGraphics2D, kViewTransition, kStaleContent, kTest, kTileRasterTask, kUI, kVideo, kWebGPUSwapBuffer,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/transferable_resource.mojom;l=28" + }, + "viz.mojom.TreesInVizTiming": { + "definition": "struct TreesInVizTiming { mojo_base.mojom.TimeTicks start_update_display_tree; mojo_base.mojom.TimeTicks start_prepare_to_draw; mojo_base.mojom.TimeTicks start_draw_layers; mojo_base.mojom.TimeTicks submit_compositor_frame;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/trees_in_viz_timing.mojom;l=11" + }, + "viz.mojom.VerticalScrollDirection": { + "definition": "enum VerticalScrollDirection { kNull, kDown, kUp };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/vertical_scroll_direction.mojom;l=10" + }, + "viz.mojom.VideoDetectorObserver.OnVideoActivityStarted": { + "definition": "OnVideoActivityStarted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/video_detector_observer.mojom;l=9" + }, + "viz.mojom.VideoDetectorObserver.OnVideoActivityEnded": { + "definition": "OnVideoActivityEnded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/video_detector_observer.mojom;l=10" + }, + "viz.mojom.ViewTransitionElementResourceId": { + "definition": "struct ViewTransitionElementResourceId { blink.mojom.ViewTransitionToken? transition_token; uint32 local_id; bool for_scope_snapshot;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/view_transition_element_resource_id.mojom;l=27" + }, + "viz.mojom.ViewTransitionRequest": { + "definition": "struct ViewTransitionRequest { CompositorFrameTransitionDirectiveType type; blink.mojom.ViewTransitionToken transition_token; bool maybe_cross_frame_sink; uint32 sequence_id; array capture_resource_ids;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/compositing/view_transition_request.mojom;l=11" + }, + "viz.mojom.Gpu.EstablishGpuChannel": { + "definition": "EstablishGpuChannel() => (int32 client_id, handle? channel_handle, gpu.mojom.GpuInfo gpu_info, gpu.mojom.GpuFeatureInfo gpu_feature_info, gpu.mojom.SharedImageCapabilities shared_image_capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/gpu.mojom;l=23" + }, + "viz.mojom.Gpu.CreateVideoEncodeAcceleratorProvider": { + "definition": "CreateVideoEncodeAcceleratorProvider( pending_receiver vea_provider);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/gpu.mojom;l=36" + }, + "viz.mojom.AggregatedHitTestRegion": { + "definition": "struct AggregatedHitTestRegion { FrameSinkId frame_sink_id; uint32 flags; uint32 async_hit_test_reasons; gfx.mojom.Rect rect; uint32 child_count; gfx.mojom.Transform transform;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/hit_test/aggregated_hit_test_region.mojom;l=12" + }, + "viz.mojom.HitTestRegion": { + "definition": "struct HitTestRegion { uint32 flags; uint32 async_hit_test_reasons; FrameSinkId frame_sink_id; gfx.mojom.Rect rect; gfx.mojom.Transform transform;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/hit_test/hit_test_region_list.mojom;l=13" + }, + "viz.mojom.HitTestRegionList": { + "definition": "struct HitTestRegionList { uint32 flags; uint32 async_hit_test_reasons; gfx.mojom.Rect bounds; gfx.mojom.Transform transform; array regions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/hit_test/hit_test_region_list.mojom;l=22" + }, + "viz.mojom.InputTargetClient.FrameSinkIdAt": { + "definition": "FrameSinkIdAt(gfx.mojom.PointF point, uint64 trace_id) => (FrameSinkId id, gfx.mojom.PointF local_point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/viz/public/mojom/hit_test/input_target_client.mojom;l=22" + }, + "webnn.mojom.WebNNContext.CreateGraphBuilder": { + "definition": "CreateGraphBuilder(pending_associated_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context.mojom;l=39" + }, + "webnn.mojom.WebNNContext.CreateTensor": { + "definition": "CreateTensor(TensorInfo tensor_info, mojo_base.mojom.BigBuffer tensor_data) => (CreateTensorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context.mojom;l=46" + }, + "webnn.mojom.WebNNContext.CreateTensorFromMailbox": { + "definition": "CreateTensorFromMailbox(TensorInfo tensor_info, gpu.mojom.Mailbox mailbox, gpu.mojom.SyncToken fence) => (CreateTensorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context.mojom;l=53" + }, + "webnn.mojom.CreateTensorSuccess": { + "definition": "struct CreateTensorSuccess { pending_associated_remote tensor_remote; blink.mojom.WebNNTensorToken tensor_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context.mojom;l=17" + }, + "webnn.mojom.CreateTensorResult": { + "definition": "union CreateTensorResult { CreateTensorSuccess success; Error error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context.mojom;l=28" + }, + "webnn.mojom.SupportedDataTypes": { + "definition": "struct SupportedDataTypes { bool float32; bool float16; bool int32; bool uint32; bool int64; bool uint64; bool int8; bool uint8; bool int4; bool uint4;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_properties.mojom;l=34" + }, + "webnn.mojom.SupportedRanks": { + "definition": "struct SupportedRanks { uint32 min; uint32 max;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_properties.mojom;l=47" + }, + "webnn.mojom.SupportedTensors": { + "definition": "struct SupportedTensors { SupportedDataTypes data_types; SupportedRanks ranks;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_properties.mojom;l=52" + }, + "webnn.mojom.DataTypeLimits": { + "definition": "struct DataTypeLimits { SupportedTensors input; SupportedTensors constant; SupportedTensors arg_min_max_input; SupportedTensors arg_min_max_output; SupportedTensors batch_normalization_input; SupportedTensors batch_normalization_mean; SupportedTensors cast_input; SupportedTensors clamp_input; SupportedTensors concat_inputs; SupportedTensors conv2d_input; SupportedTensors conv2d_bias; SupportedTensors conv_transpose2d_input; SupportedTensors conv_transpose2d_bias; SupportedTensors cumulative_sum_input; SupportedTensors dequantize_linear_input; SupportedTensors dequantize_linear_scale; SupportedTensors dequantize_linear_zero_point; SupportedTensors add_input; SupportedTensors sub_input; SupportedTensors mul_input; SupportedTensors div_input; SupportedTensors max_input; SupportedTensors min_input; SupportedTensors pow_input; SupportedTensors equal_input; SupportedTensors greater_input; SupportedTensors greater_or_equal_input; SupportedTensors lesser_input; SupportedTensors lesser_or_equal_input; SupportedTensors not_equal_input; SupportedTensors logical_and_input; SupportedTensors logical_or_input; SupportedTensors logical_xor_input; SupportedTensors logical_not_input; SupportedTensors is_nan_input; SupportedTensors is_infinite_input; SupportedDataTypes logical_output; SupportedTensors abs_input; SupportedTensors ceil_input; SupportedTensors cos_input; SupportedTensors erf_input; SupportedTensors exp_input; SupportedTensors floor_input; SupportedTensors identity_input; SupportedTensors log_input; SupportedTensors neg_input; SupportedTensors reciprocal_input; SupportedTensors round_even_input; SupportedTensors sign_input; SupportedTensors sin_input; SupportedTensors sqrt_input; SupportedTensors tan_input; SupportedTensors elu_input; SupportedTensors expand_input; SupportedTensors gather_input; SupportedTensors gather_indices; SupportedTensors gather_elements_input; SupportedTensors gather_elements_indices; SupportedTensors gather_nd_input; SupportedTensors gather_nd_indices; SupportedTensors gelu_input; SupportedTensors gemm_a; SupportedTensors gemm_c; SupportedTensors gru_input; SupportedTensors gru_bias; SupportedTensors gru_output_sequence; SupportedTensors gru_cell_input; SupportedTensors gru_cell_bias; SupportedTensors hard_sigmoid_input; SupportedTensors hard_swish_input; SupportedTensors instance_normalization_input; SupportedTensors instance_normalization_scale; SupportedTensors layer_normalization_input; SupportedTensors leaky_relu_input; SupportedTensors linear_input; SupportedTensors lstm_input; SupportedTensors lstm_bias; SupportedTensors lstm_output_sequence; SupportedTensors lstm_cell_input; SupportedTensors lstm_cell_bias; SupportedTensors matmul_input; SupportedTensors pad_input; SupportedTensors average_pool2d_input; SupportedTensors l2_pool2d_input; SupportedTensors max_pool2d_input; SupportedTensors prelu_input; SupportedTensors quantize_linear_input; SupportedTensors quantize_linear_zero_point; SupportedTensors reduce_l1_input; SupportedTensors reduce_l2_input; SupportedTensors reduce_log_sum_input; SupportedTensors reduce_log_sum_exp_input; SupportedTensors reduce_max_input; SupportedTensors reduce_mean_input; SupportedTensors reduce_min_input; SupportedTensors reduce_product_input; SupportedTensors reduce_sum_input; SupportedTensors reduce_sum_square_input; SupportedTensors relu_input; SupportedTensors resample2d_input; SupportedTensors reshape_input; SupportedTensors reverse_input; SupportedTensors scatter_elements_input; SupportedTensors scatter_elements_indices; SupportedTensors scatter_nd_input; SupportedTensors scatter_nd_indices; SupportedTensors scatter_nd_updates; SupportedTensors sigmoid_input; SupportedTensors slice_input; SupportedTensors softmax_input; SupportedTensors softplus_input; SupportedTensors softsign_input; SupportedTensors split_input; SupportedTensors tanh_input; SupportedTensors tile_input; SupportedTensors transpose_input; SupportedTensors triangular_input; SupportedTensors where_condition; SupportedTensors where_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_properties.mojom;l=61" + }, + "webnn.mojom.ContextProperties": { + "definition": "struct ContextProperties { InputOperandLayout input_operand_layout; Resample2DAxes resample_2d_axes; BatchNormalizationAxis batch_normalization_axis; uint64 tensor_byte_length_limit; DataTypeLimits data_type_limits;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_properties.mojom;l=233" + }, + "webnn.mojom.InputOperandLayout": { + "definition": "enum InputOperandLayout { kChannelsFirst, kChannelsLast,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_properties.mojom;l=12" + }, + "webnn.mojom.Resample2DAxes": { + "definition": "enum Resample2DAxes { kAny, kChannelsFirst, kChannelsLast,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_properties.mojom;l=20" + }, + "webnn.mojom.BatchNormalizationAxis": { + "definition": "enum BatchNormalizationAxis { kAny, kChannelsFirst,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_properties.mojom;l=29" + }, + "webnn.mojom.WebNNContextProvider.CreateWebNNContext": { + "definition": "CreateWebNNContext(CreateContextOptions options) => (CreateContextResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_provider.mojom;l=64" + }, + "webnn.mojom.CreateContextOptions": { + "definition": "struct CreateContextOptions { Device device; PowerPreference power_preference;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_provider.mojom;l=15" + }, + "webnn.mojom.CreateContextSuccess": { + "definition": "struct CreateContextSuccess { pending_remote? context_remote; ContextProperties context_properties; blink.mojom.WebNNContextToken context_handle; handle? write_tensor_producer; handle? read_tensor_consumer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_provider.mojom;l=33" + }, + "webnn.mojom.PowerPreference": { + "definition": "enum PowerPreference { kDefault, kHighPerformance, kLowPower, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_provider.mojom;l=16" + }, + "webnn.mojom.CreateContextResult": { + "definition": "union CreateContextResult { CreateContextSuccess success; Error error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_context_provider.mojom;l=50" + }, + "webnn.mojom.Device": { + "definition": "enum Device { kCpu, kGpu, kNpu,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_device.mojom;l=7" + }, + "webnn.mojom.Error": { + "definition": "struct Error { Code code; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_error.mojom;l=10" + }, + "webnn.mojom.Code": { + "definition": "enum Code { kUnknownError, kNotSupportedError, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_error.mojom;l=12" + }, + "webnn.mojom.WebNNGraph.Dispatch": { + "definition": "Dispatch(map named_inputs, map named_outputs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1459" + }, + "webnn.mojom.OperandDescriptor": { + "definition": "struct OperandDescriptor { DataType data_type; array shape; array pending_permutation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=32" + }, + "webnn.mojom.OperandId": { + "definition": "struct OperandId { uint32 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=40" + }, + "webnn.mojom.Operand": { + "definition": "struct Operand { Kind kind; OperandDescriptor descriptor; string? name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=46" + }, + "webnn.mojom.ArgMinMax": { + "definition": "struct ArgMinMax { Kind kind; OperandId input_operand_id; OperandId output_operand_id; uint32 axis; bool keep_dimensions = false; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=61" + }, + "webnn.mojom.BatchNormalization": { + "definition": "struct BatchNormalization { OperandId input_operand_id; OperandId mean_operand_id; OperandId variance_operand_id; OperandId output_operand_id; OperandId? scale_operand_id; OperandId? bias_operand_id; uint32 axis = 1; float epsilon = 1e-5; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=89" + }, + "webnn.mojom.Clamp": { + "definition": "struct Clamp { OperandId input_operand_id; OperandId output_operand_id; Number min_value; Number max_value; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=121" + }, + "webnn.mojom.Concat": { + "definition": "struct Concat { array input_operand_ids; OperandId output_operand_id; uint32 axis; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=139" + }, + "webnn.mojom.Size2d": { + "definition": "struct Size2d { uint32 height; uint32 width;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=153" + }, + "webnn.mojom.Padding2d": { + "definition": "struct Padding2d { Size2d beginning; Size2d ending;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=160" + }, + "webnn.mojom.Conv2d": { + "definition": "struct Conv2d { Kind kind; OperandId input_operand_id; OperandId filter_operand_id; OperandId output_operand_id; Padding2d padding; Size2d strides; Size2d dilations; uint32 groups = 1; OperandId? bias_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=179" + }, + "webnn.mojom.CumulativeSum": { + "definition": "struct CumulativeSum { OperandId input_operand_id; OperandId output_operand_id; uint32 axis; bool exclusive = false; bool reversed = false; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=221" + }, + "webnn.mojom.DequantizeLinear": { + "definition": "struct DequantizeLinear { OperandId input_operand_id; OperandId scale_operand_id; OperandId zero_point_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=247" + }, + "webnn.mojom.ElementWiseBinary": { + "definition": "struct ElementWiseBinary { Kind kind; OperandId lhs_operand_id; OperandId rhs_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=272" + }, + "webnn.mojom.ElementWiseUnary": { + "definition": "struct ElementWiseUnary { Kind kind; OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=309" + }, + "webnn.mojom.Expand": { + "definition": "struct Expand { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=347" + }, + "webnn.mojom.ConstantPadding": { + "definition": "struct ConstantPadding { Number value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=359" + }, + "webnn.mojom.EdgePadding": { + "definition": "struct EdgePadding {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=363" + }, + "webnn.mojom.ReflectionPadding": { + "definition": "struct ReflectionPadding {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=365" + }, + "webnn.mojom.InstanceNormalization": { + "definition": "struct InstanceNormalization { OperandId input_operand_id; OperandId output_operand_id; OperandId? scale_operand_id; OperandId? bias_operand_id; float epsilon = 1e-5; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=378" + }, + "webnn.mojom.Matmul": { + "definition": "struct Matmul { OperandId a_operand_id; OperandId b_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=399" + }, + "webnn.mojom.Pad": { + "definition": "struct Pad { OperandId input_operand_id; OperandId output_operand_id; array beginning_padding; array ending_padding; PaddingMode mode; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=415" + }, + "webnn.mojom.Reduce": { + "definition": "struct Reduce { Kind kind; OperandId input_operand_id; OperandId output_operand_id; array axes; bool keep_dimensions = false; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=434" + }, + "webnn.mojom.Pool2d": { + "definition": "struct Pool2d { Kind kind; OperandId input_operand_id; OperandId output_operand_id; Size2d window_dimensions; Padding2d padding; Size2d strides; Size2d dilations; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=473" + }, + "webnn.mojom.Range": { + "definition": "struct Range { uint32 start; uint32 size; uint32 stride;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=504" + }, + "webnn.mojom.Slice": { + "definition": "struct Slice { OperandId input_operand_id; OperandId output_operand_id; array ranges; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=513" + }, + "webnn.mojom.Elu": { + "definition": "struct Elu { OperandId input_operand_id; OperandId output_operand_id; float alpha = 1.0; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=528" + }, + "webnn.mojom.Gather": { + "definition": "struct Gather { OperandId input_operand_id; OperandId indices_operand_id; OperandId output_operand_id; uint32 axis = 0; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=589" + }, + "webnn.mojom.GatherElements": { + "definition": "struct GatherElements { OperandId input_operand_id; OperandId indices_operand_id; OperandId output_operand_id; uint32 axis = 0; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=622" + }, + "webnn.mojom.GatherND": { + "definition": "struct GatherND { OperandId input_operand_id; OperandId indices_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=665" + }, + "webnn.mojom.Gelu": { + "definition": "struct Gelu { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=680" + }, + "webnn.mojom.Gru": { + "definition": "struct Gru { OperandId input_operand_id; OperandId weight_operand_id; OperandId recurrent_weight_operand_id; uint32 steps; uint32 hidden_size; array output_operand_ids; OperandId? bias_operand_id; OperandId? recurrent_bias_operand_id; OperandId? initial_hidden_state_operand_id; bool reset_after; bool return_sequence; RecurrentNetworkDirection direction; GruWeightLayout layout; array activations; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=712" + }, + "webnn.mojom.GruCell": { + "definition": "struct GruCell { OperandId input_operand_id; OperandId weight_operand_id; OperandId recurrent_weight_operand_id; OperandId hidden_state_operand_id; uint32 hidden_size; OperandId output_operand_id; OperandId? bias_operand_id; OperandId? recurrent_bias_operand_id; bool reset_after; GruWeightLayout layout; array activations; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=750" + }, + "webnn.mojom.Gemm": { + "definition": "struct Gemm { OperandId a_operand_id; OperandId b_operand_id; OperandId output_operand_id; OperandId? c_operand_id; float alpha = 1.0; float beta = 1.0; bool a_transpose = false; bool b_transpose = false; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=782" + }, + "webnn.mojom.HardSigmoid": { + "definition": "struct HardSigmoid { OperandId input_operand_id; OperandId output_operand_id; float alpha = 0.2; float beta = 0.5; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=812" + }, + "webnn.mojom.HardSwish": { + "definition": "struct HardSwish { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=828" + }, + "webnn.mojom.LayerNormalization": { + "definition": "struct LayerNormalization { OperandId input_operand_id; OperandId output_operand_id; OperandId? scale_operand_id; OperandId? bias_operand_id; array axes; float epsilon = 1e-5; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=845" + }, + "webnn.mojom.LeakyRelu": { + "definition": "struct LeakyRelu { OperandId input_operand_id; OperandId output_operand_id; float alpha = 0.01; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=867" + }, + "webnn.mojom.Linear": { + "definition": "struct Linear { OperandId input_operand_id; OperandId output_operand_id; float alpha = 1.0; float beta = 0; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=882" + }, + "webnn.mojom.Lstm": { + "definition": "struct Lstm { OperandId input_operand_id; OperandId weight_operand_id; OperandId recurrent_weight_operand_id; array output_operand_ids; uint32 steps; uint32 hidden_size; OperandId? bias_operand_id; OperandId? recurrent_bias_operand_id; OperandId? peephole_weight_operand_id; OperandId? initial_hidden_state_operand_id; OperandId? initial_cell_state_operand_id; bool return_sequence; RecurrentNetworkDirection direction; LstmWeightLayout layout; array activations; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=905" + }, + "webnn.mojom.LstmCell": { + "definition": "struct LstmCell { OperandId input_operand_id; OperandId weight_operand_id; OperandId recurrent_weight_operand_id; OperandId hidden_state_operand_id; OperandId cell_state_operand_id; array output_operand_ids; uint32 hidden_size; OperandId? bias_operand_id; OperandId? recurrent_bias_operand_id; OperandId? peephole_weight_operand_id; LstmWeightLayout layout; array activations; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=945" + }, + "webnn.mojom.Prelu": { + "definition": "struct Prelu { OperandId input_operand_id; OperandId slope_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=979" + }, + "webnn.mojom.QuantizeLinear": { + "definition": "struct QuantizeLinear { OperandId input_operand_id; OperandId scale_operand_id; OperandId zero_point_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=996" + }, + "webnn.mojom.Relu": { + "definition": "struct Relu { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1019" + }, + "webnn.mojom.Reshape": { + "definition": "struct Reshape { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1033" + }, + "webnn.mojom.Reverse": { + "definition": "struct Reverse { OperandId input_operand_id; OperandId output_operand_id; array axes; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1045" + }, + "webnn.mojom.ScatterElements": { + "definition": "struct ScatterElements { OperandId input_operand_id; OperandId indices_operand_id; OperandId updates_operand_id; OperandId output_operand_id; uint32 axis = 0; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1098" + }, + "webnn.mojom.ScatterND": { + "definition": "struct ScatterND { OperandId input_operand_id; OperandId indices_operand_id; OperandId updates_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1167" + }, + "webnn.mojom.Sigmoid": { + "definition": "struct Sigmoid { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1182" + }, + "webnn.mojom.Softmax": { + "definition": "struct Softmax { OperandId input_operand_id; OperandId output_operand_id; uint32 axis; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1195" + }, + "webnn.mojom.Softplus": { + "definition": "struct Softplus { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1211" + }, + "webnn.mojom.Softsign": { + "definition": "struct Softsign { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1222" + }, + "webnn.mojom.Split": { + "definition": "struct Split { OperandId input_operand_id; array output_operand_ids; uint32 axis = 0; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1242" + }, + "webnn.mojom.Tanh": { + "definition": "struct Tanh { OperandId input_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1259" + }, + "webnn.mojom.Tile": { + "definition": "struct Tile { OperandId input_operand_id; OperandId output_operand_id; array repetitions; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1272" + }, + "webnn.mojom.Transpose": { + "definition": "struct Transpose { OperandId input_operand_id; OperandId output_operand_id; array permutation; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1287" + }, + "webnn.mojom.Triangular": { + "definition": "struct Triangular { OperandId input_operand_id; OperandId output_operand_id; bool upper; int32 diagonal; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1303" + }, + "webnn.mojom.Resample2d": { + "definition": "struct Resample2d { OperandId input_operand_id; OperandId output_operand_id; InterpolationMode mode; array? scales; array axes; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1323" + }, + "webnn.mojom.Where": { + "definition": "struct Where { OperandId condition_operand_id; OperandId true_value_operand_id; OperandId false_value_operand_id; OperandId output_operand_id; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1350" + }, + "webnn.mojom.GraphInfo": { + "definition": "struct GraphInfo { array operands; array input_operands; array output_operands; array operations; map constant_operand_ids_to_handles; map id_to_constant_tensor_operand_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1426" + }, + "webnn.mojom.DataType": { + "definition": "enum DataType { kFloat32, kFloat16, kInt32, kUint32, kInt64, kUint64, kInt8, kUint8, kInt4, kUint4};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=18" + }, + "webnn.mojom.Kind": { + "definition": "enum Kind { kInput, kConstant, kOutput, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=47" + }, + "webnn.mojom.Kind": { + "definition": "enum Kind { kMin, kMax, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=62" + }, + "webnn.mojom.Kind": { + "definition": "enum Kind { kDirect, kTransposed, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=180" + }, + "webnn.mojom.Kind": { + "definition": "enum Kind { kAdd, kSub, kMul, kDiv, kMax, kMin, kPow, kEqual, kGreater, kGreaterOrEqual, kLesser, kLesserOrEqual, kNotEqual, kLogicalAnd, kLogicalOr, kLogicalXor, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=273" + }, + "webnn.mojom.Kind": { + "definition": "enum Kind { kAbs, kCeil, kCos, kExp, kFloor, kLog, kNeg, kSign, kRoundEven, kSin, kTan, kIsNaN, kIsInfinite, kLogicalNot, kIdentity, kSqrt, kErf, kReciprocal, kCast, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=310" + }, + "webnn.mojom.Kind": { + "definition": "enum Kind { kL1, kL2, kLogSum, kLogSumExp, kMax, kMean, kMin, kProduct, kSum, kSumSquare, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=435" + }, + "webnn.mojom.Kind": { + "definition": "enum Kind { kAveragePool2d, kL2Pool2d, kMaxPool2d, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=474" + }, + "webnn.mojom.RecurrentNetworkActivation": { + "definition": "enum RecurrentNetworkActivation { kRelu, kSigmoid, kTanh,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=691" + }, + "webnn.mojom.RecurrentNetworkDirection": { + "definition": "enum RecurrentNetworkDirection { kForward, kBackward, kBoth,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=699" + }, + "webnn.mojom.GruWeightLayout": { + "definition": "enum GruWeightLayout { kZrn, kRzn,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=706" + }, + "webnn.mojom.LstmWeightLayout": { + "definition": "enum LstmWeightLayout { kIofg, kIfgo,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=899" + }, + "webnn.mojom.InterpolationMode": { + "definition": "enum InterpolationMode { kNearestNeighbor, kLinear, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1329" + }, + "webnn.mojom.Number": { + "definition": "union Number { double floating_point; int64 signed_integer; uint64 unsigned_integer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=11" + }, + "webnn.mojom.PaddingMode": { + "definition": "union PaddingMode { ConstantPadding constant; EdgePadding edge; ReflectionPadding reflection;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=367" + }, + "webnn.mojom.Operation": { + "definition": "union Operation { ArgMinMax arg_min_max; BatchNormalization batch_normalization; Clamp clamp; Concat concat; Conv2d conv2d; CumulativeSum cumulative_sum; DequantizeLinear dequantize_linear; ElementWiseBinary element_wise_binary; Elu elu; ElementWiseUnary element_wise_unary; Expand expand; Gather gather; GatherElements gather_elements; GatherND gather_nd; Gelu gelu; Gemm gemm; Gru gru; GruCell gru_cell; HardSigmoid hard_sigmoid; HardSwish hard_swish; LayerNormalization layer_normalization; InstanceNormalization instance_normalization; LeakyRelu leaky_relu; Linear linear; Lstm lstm; LstmCell lstm_cell; Matmul matmul; Pad pad; Pool2d pool2d; Prelu prelu; QuantizeLinear quantize_linear; Reduce reduce; Relu relu; Resample2d resample2d; Reshape reshape; Reverse reverse; ScatterElements scatter_elements; ScatterND scatter_nd; Sigmoid sigmoid; Slice slice; Softmax softmax; Softplus softplus; Softsign softsign; Split split; Tanh tanh; Tile tile; Transpose transpose; Triangular triangular; Where where;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph.mojom;l=1372" + }, + "webnn.mojom.WebNNGraphBuilder.CreatePendingConstant": { + "definition": "CreatePendingConstant(blink.mojom.WebNNPendingConstantToken constant_handle, DataType data_type, mojo_base.mojom.BigBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph_builder.mojom;l=36" + }, + "webnn.mojom.WebNNGraphBuilder.CreateGraph": { + "definition": "CreateGraph(GraphInfo graph_info) => result; IsValidGraphForTesting(ContextProperties context_properties, GraphInfo graph_info) => (bool is_valid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph_builder.mojom;l=45" + }, + "webnn.mojom.CreateGraphSuccess": { + "definition": "struct CreateGraphSuccess { pending_associated_remote graph_remote; array devices;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_graph_builder.mojom;l=16" + }, + "webnn.mojom.WebNNTensor.ReadTensor": { + "definition": "ReadTensor() => (ReadTensorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_tensor.mojom;l=46" + }, + "webnn.mojom.WebNNTensor.WriteTensor": { + "definition": "WriteTensor(mojo_base.mojom.BigBuffer src_buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_tensor.mojom;l=50" + }, + "webnn.mojom.WebNNTensor.ExportTensor": { + "definition": "ExportTensor() => result; ImportTensor(gpu.mojom.SyncToken fence);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_tensor.mojom;l=67" + }, + "webnn.mojom.TensorUsage": { + "definition": "struct TensorUsage { bool web_gpu_interop; bool read; bool write; bool graph_constant;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_tensor.mojom;l=14" + }, + "webnn.mojom.TensorInfo": { + "definition": "struct TensorInfo { OperandDescriptor descriptor; TensorUsage usage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_tensor.mojom;l=26" + }, + "webnn.mojom.ReadTensorResult": { + "definition": "union ReadTensorResult { mojo_base.mojom.BigBuffer buffer; Error error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:services/webnn/public/mojom/webnn_tensor.mojom;l=33" + }, + "blink.mojom.FrameAdEvidence": { + "definition": "struct FrameAdEvidence { bool is_complete; bool parent_is_ad; FilterListResult latest_filter_list_result = kNotChecked; FilterListResult most_restrictive_filter_list_result = kNotChecked; FrameCreationStackEvidence created_by_ad_script = kNotCreatedByAdScript;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ad_tagging/ad_evidence.mojom;l=30" + }, + "blink.mojom.FilterListResult": { + "definition": "enum FilterListResult { kNotChecked = 0, kMatchedAllowingRule = 1, kMatchedNoRules = 2, kMatchedBlockingRule = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ad_tagging/ad_evidence.mojom;l=9" + }, + "blink.mojom.FrameCreationStackEvidence": { + "definition": "enum FrameCreationStackEvidence { kNotCreatedByAdScript, kCreatedByAdScript};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ad_tagging/ad_evidence.mojom;l=22" + }, + "blink.mojom.AggregatableReportHistogramContribution": { + "definition": "struct AggregatableReportHistogramContribution { mojo_base.mojom.Uint128 bucket; int32 value; uint64? filtering_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/aggregation_service/aggregatable_report.mojom;l=12" + }, + "blink.mojom.AILanguageCode": { + "definition": "struct AILanguageCode { string code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_common.mojom;l=11" + }, + "blink.mojom.QuotaErrorInfo": { + "definition": "struct QuotaErrorInfo { uint32 requested; uint32 quota;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_common.mojom;l=17" + }, + "blink.mojom.AIManagerCreateClientError": { + "definition": "enum AIManagerCreateClientError { kUnableToCreateSession = 0, kUnableToCalculateTokenSize = 1, kInitialInputTooLarge = 2, kUnsupportedLanguage = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_common.mojom;l=27" + }, + "blink.mojom.AIManagerCreateLanguageModelClient.OnResult": { + "definition": "OnResult(pending_remote language_model_remote, AILanguageModelInstanceInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=110" + }, + "blink.mojom.AIManagerCreateLanguageModelClient.OnError": { + "definition": "OnError(AIManagerCreateClientError error, QuotaErrorInfo? quota_error_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=115" + }, + "blink.mojom.AILanguageModel.Prompt": { + "definition": "Prompt(array prompts, on_device_model.mojom.ResponseConstraint? constraint, pending_remote pending_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=124" + }, + "blink.mojom.AILanguageModel.Append": { + "definition": "Append(array prompts, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=131" + }, + "blink.mojom.AILanguageModel.Fork": { + "definition": "Fork(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=142" + }, + "blink.mojom.AILanguageModel.Destroy": { + "definition": "Destroy();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=145" + }, + "blink.mojom.AILanguageModel.MeasureInputUsage": { + "definition": "MeasureInputUsage(array input) => (uint32? number_of_tokens);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=150" + }, + "blink.mojom.AILanguageModelSamplingParams": { + "definition": "struct AILanguageModelSamplingParams { uint32 top_k; float temperature;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=22" + }, + "blink.mojom.AILanguageModelParams": { + "definition": "struct AILanguageModelParams { AILanguageModelSamplingParams default_sampling_params; AILanguageModelSamplingParams max_sampling_params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=29" + }, + "blink.mojom.AILanguageModelInstanceInfo": { + "definition": "struct AILanguageModelInstanceInfo { uint64 input_quota; uint64 input_usage; AILanguageModelSamplingParams sampling_params; array? input_types;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=36" + }, + "blink.mojom.AILanguageModelExpected": { + "definition": "struct AILanguageModelExpected { AILanguageModelPromptType type; array? languages;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=68" + }, + "blink.mojom.AILanguageModelPrompt": { + "definition": "struct AILanguageModelPrompt { AILanguageModelPromptRole role; array content; bool is_prefix = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=87" + }, + "blink.mojom.AILanguageModelCreateOptions": { + "definition": "struct AILanguageModelCreateOptions { AILanguageModelSamplingParams? sampling_params; array initial_prompts; array? expected_inputs; array? expected_outputs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=95" + }, + "blink.mojom.AILanguageModelPromptRole": { + "definition": "enum AILanguageModelPromptRole { kSystem = 0, kUser = 1, kAssistant = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=53" + }, + "blink.mojom.AILanguageModelPromptType": { + "definition": "enum AILanguageModelPromptType { kText = 0, kImage = 1, kAudio = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=60" + }, + "blink.mojom.AILanguageModelPromptContent": { + "definition": "union AILanguageModelPromptContent { string text; skia.mojom.BitmapN32 bitmap; on_device_model.mojom.AudioData audio;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_language_model.mojom;l=75" + }, + "blink.mojom.AIManagerCreateWriterClient.OnResult": { + "definition": "OnResult(pending_remote writer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=82" + }, + "blink.mojom.AIManagerCreateWriterClient.OnError": { + "definition": "OnError(AIManagerCreateClientError error, QuotaErrorInfo? quota_error_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=86" + }, + "blink.mojom.AIManagerCreateRewriterClient.OnResult": { + "definition": "OnResult(pending_remote rewriter);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=93" + }, + "blink.mojom.AIManagerCreateRewriterClient.OnError": { + "definition": "OnError(AIManagerCreateClientError error, QuotaErrorInfo? quota_error_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=97" + }, + "blink.mojom.AIManagerCreateSummarizerClient.OnResult": { + "definition": "OnResult(pending_remote summarizer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=104" + }, + "blink.mojom.AIManagerCreateSummarizerClient.OnError": { + "definition": "OnError(AIManagerCreateClientError error, QuotaErrorInfo? quota_error_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=108" + }, + "blink.mojom.AIManagerCreateProofreaderClient.OnResult": { + "definition": "OnResult(pending_remote proofreader);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=115" + }, + "blink.mojom.AIManagerCreateProofreaderClient.OnError": { + "definition": "OnError(AIManagerCreateClientError error, QuotaErrorInfo? quota_error_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=119" + }, + "blink.mojom.AIManager.CanCreateLanguageModel": { + "definition": "CanCreateLanguageModel(AILanguageModelCreateOptions options) => (ModelAvailabilityCheckResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=125" + }, + "blink.mojom.AIManager.CreateLanguageModel": { + "definition": "CreateLanguageModel( pending_remote client, AILanguageModelCreateOptions options );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=129" + }, + "blink.mojom.AIManager.CanCreateSummarizer": { + "definition": "CanCreateSummarizer(AISummarizerCreateOptions? options) => (ModelAvailabilityCheckResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=137" + }, + "blink.mojom.AIManager.CreateSummarizer": { + "definition": "CreateSummarizer( pending_remote client, AISummarizerCreateOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=141" + }, + "blink.mojom.AIManager.GetLanguageModelParams": { + "definition": "GetLanguageModelParams() => ( AILanguageModelParams? language_model_params );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=145" + }, + "blink.mojom.AIManager.CanCreateWriter": { + "definition": "CanCreateWriter(AIWriterCreateOptions options) => (ModelAvailabilityCheckResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=149" + }, + "blink.mojom.AIManager.CreateWriter": { + "definition": "CreateWriter(pending_remote client, AIWriterCreateOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=155" + }, + "blink.mojom.AIManager.CanCreateRewriter": { + "definition": "CanCreateRewriter(AIRewriterCreateOptions options) => (ModelAvailabilityCheckResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=158" + }, + "blink.mojom.AIManager.CreateRewriter": { + "definition": "CreateRewriter(pending_remote client, AIRewriterCreateOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=164" + }, + "blink.mojom.AIManager.CanCreateProofreader": { + "definition": "CanCreateProofreader(AIProofreaderCreateOptions options) => (ModelAvailabilityCheckResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=167" + }, + "blink.mojom.AIManager.CreateProofreader": { + "definition": "CreateProofreader(pending_remote client, AIProofreaderCreateOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=171" + }, + "blink.mojom.AIManager.AddModelDownloadProgressObserver": { + "definition": "AddModelDownloadProgressObserver( pending_remote observer_remote );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=175" + }, + "blink.mojom.ModelAvailabilityCheckResult": { + "definition": "enum ModelAvailabilityCheckResult { kAvailable = 0, kDownloadable = 1, kDownloading = 2, kUnavailableServiceNotRunning = 3, kUnavailableUnsupportedLanguage = 4, kUnavailableUnknown = 5, kUnavailableFeatureNotEnabled = 6, kUnavailableConfigNotAvailableForFeature = 7, kUnavailableGpuBlocked = 8, kUnavailableTooManyRecentCrashes = 9, kUnavailableSafetyModelNotAvailable = 10, kUnavailableSafetyConfigNotAvailableForFeature = 11, kUnavailableLanguageDetectionModelNotAvailable = 12, kUnavailableFeatureExecutionNotEnabled = 13, kUnavailableModelAdaptationNotAvailable = 14, kUnavailableValidationPending = 15, kUnavailableValidationFailed = 16, kUnavailableModelNotEligible = 17, kUnavailableInsufficientDiskSpace = 18, kUnavailableTranslationNotEligible = 19, kUnavailableEnterprisePolicyDisabled = 20,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_manager.mojom;l=16" + }, + "blink.mojom.AIProofreader.Proofread": { + "definition": "Proofread(string input, pending_remote pending_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_proofreader.mojom;l=26" + }, + "blink.mojom.AIProofreader.GetCorrectionType": { + "definition": "GetCorrectionType(string input, string corrected_input, string correction_instruction, pending_remote pending_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_proofreader.mojom;l=35" + }, + "blink.mojom.AIProofreaderCreateOptions": { + "definition": "struct AIProofreaderCreateOptions { bool include_correction_types; bool include_correction_explanations; AILanguageCode correction_explanation_language; array expected_input_languages;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_proofreader.mojom;l=14" + }, + "blink.mojom.AIRewriter.Rewrite": { + "definition": "Rewrite( string input, string? context, pending_remote pending_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_rewriter.mojom;l=55" + }, + "blink.mojom.AIRewriter.MeasureUsage": { + "definition": "MeasureUsage(string input, string context) => (uint32? number_of_tokens);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_rewriter.mojom;l=62" + }, + "blink.mojom.AIRewriterCreateOptions": { + "definition": "struct AIRewriterCreateOptions { string? shared_context; AIRewriterTone tone; AIRewriterFormat format; AIRewriterLength length; array expected_input_languages; array expected_context_languages; AILanguageCode output_language;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_rewriter.mojom;l=35" + }, + "blink.mojom.AIRewriterTone": { + "definition": "enum AIRewriterTone { kAsIs, kMoreFormal, kMoreCasual,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_rewriter.mojom;l=14" + }, + "blink.mojom.AIRewriterFormat": { + "definition": "enum AIRewriterFormat { kAsIs, kPlainText, kMarkdown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_rewriter.mojom;l=21" + }, + "blink.mojom.AIRewriterLength": { + "definition": "enum AIRewriterLength { kAsIs, kShorter, kLonger,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_rewriter.mojom;l=28" + }, + "blink.mojom.AISummarizer.Summarize": { + "definition": "Summarize(string input, string context, pending_remote pending_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_summarizer.mojom;l=50" + }, + "blink.mojom.AISummarizer.MeasureUsage": { + "definition": "MeasureUsage(string input, string context) => (uint32? number_of_tokens);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_summarizer.mojom;l=56" + }, + "blink.mojom.AISummarizerCreateOptions": { + "definition": "struct AISummarizerCreateOptions { string? shared_context; AISummarizerType type; AISummarizerFormat format; AISummarizerLength length; array expected_input_languages; array expected_context_languages; AILanguageCode output_language;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_summarizer.mojom;l=35" + }, + "blink.mojom.AISummarizerType": { + "definition": "enum AISummarizerType { kTLDR, kKeyPoints, kTeaser, kHeadline,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_summarizer.mojom;l=14" + }, + "blink.mojom.AISummarizerFormat": { + "definition": "enum AISummarizerFormat { kPlainText, kMarkDown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_summarizer.mojom;l=22" + }, + "blink.mojom.AISummarizerLength": { + "definition": "enum AISummarizerLength { kShort, kMedium, kLong,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_summarizer.mojom;l=28" + }, + "blink.mojom.AIWriter.Write": { + "definition": "Write( string input, string? context, pending_remote pending_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_writer.mojom;l=53" + }, + "blink.mojom.AIWriter.MeasureUsage": { + "definition": "MeasureUsage(string input, string context) => (uint32? number_of_tokens);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_writer.mojom;l=60" + }, + "blink.mojom.AIWriterCreateOptions": { + "definition": "struct AIWriterCreateOptions { string? shared_context; AIWriterTone tone; AIWriterFormat format; AIWriterLength length; array expected_input_languages; array expected_context_languages; AILanguageCode output_language;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_writer.mojom;l=34" + }, + "blink.mojom.AIWriterTone": { + "definition": "enum AIWriterTone { kFormal, kNeutral, kCasual,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_writer.mojom;l=14" + }, + "blink.mojom.AIWriterFormat": { + "definition": "enum AIWriterFormat { kPlainText, kMarkdown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_writer.mojom;l=21" + }, + "blink.mojom.AIWriterLength": { + "definition": "enum AIWriterLength { kShort, kMedium, kLong,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/ai_writer.mojom;l=27" + }, + "blink.mojom.ModelDownloadProgressObserver.OnDownloadProgressUpdate": { + "definition": "OnDownloadProgressUpdate(uint64 downloaded_bytes, uint64 total_bytes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/model_download_progress_observer.mojom;l=24" + }, + "blink.mojom.ModelStreamingResponder.OnCompletion": { + "definition": "OnCompletion(ModelExecutionContextInfo? context_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/model_streaming_responder.mojom;l=79" + }, + "blink.mojom.ModelStreamingResponder.OnError": { + "definition": "OnError(ModelStreamingResponseStatus status, QuotaErrorInfo? quota_error_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/model_streaming_responder.mojom;l=83" + }, + "blink.mojom.ModelStreamingResponder.OnStreaming": { + "definition": "OnStreaming(string text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/model_streaming_responder.mojom;l=89" + }, + "blink.mojom.ModelStreamingResponder.OnQuotaOverflow": { + "definition": "OnQuotaOverflow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/model_streaming_responder.mojom;l=94" + }, + "blink.mojom.ModelExecutionContextInfo": { + "definition": "struct ModelExecutionContextInfo { uint64 current_tokens;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/model_streaming_responder.mojom;l=55" + }, + "blink.mojom.ModelStreamingResponseStatus": { + "definition": "enum ModelStreamingResponseStatus { kOngoing = 0, kComplete = 1, kErrorUnknown = 2, kErrorInvalidRequest = 3, kErrorRequestThrottled = 4, kErrorPermissionDenied = 5, kErrorGenericFailure = 6, kErrorRetryableError = 7, kErrorNonRetryableError = 8, kErrorUnsupportedLanguage = 9, kErrorFiltered = 10, kErrorDisabled = 11, kErrorCancelled = 12, kErrorSessionDestroyed = 13, kErrorInputTooLarge = 14, kErrorResponseLowQuality = 15,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/ai/model_streaming_responder.mojom;l=15" + }, + "blink.mojom.AndroidFontLookup.GetUniqueNameLookupTable": { + "definition": "[Sync] GetUniqueNameLookupTable() => (array unique_font_names);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom;l=15" + }, + "blink.mojom.AndroidFontLookup.MatchLocalFontByUniqueName": { + "definition": "[Sync] MatchLocalFontByUniqueName(string font_unique_name) => (mojo_base.mojom.ReadOnlyFile? font_file_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom;l=24" + }, + "blink.mojom.AndroidFontLookup.FetchAllFontFiles": { + "definition": "FetchAllFontFiles() => (map font_files);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom;l=30" + }, + "blink.mojom.AnnotationAgent.ScrollIntoView": { + "definition": "ScrollIntoView(bool applies_focus);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=64" + }, + "blink.mojom.AnnotationAgentHost.DidFinishAttachment": { + "definition": "DidFinishAttachment(gfx.mojom.Rect document_relative_rect, AttachmentResult attachment_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=94" + }, + "blink.mojom.AnnotationAgentContainer.CreateAgent": { + "definition": "CreateAgent(pending_remote host_remote, pending_receiver agent_receiver, AnnotationType type, Selector selector, int32? search_range_start_node_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=115" + }, + "blink.mojom.AnnotationAgentContainer.CreateAgentFromSelection": { + "definition": "CreateAgentFromSelection(AnnotationType type) => ( SelectorCreationResult? result, LinkGenerationError error, LinkGenerationReadyStatus ready_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=145" + }, + "blink.mojom.AnnotationAgentContainer.RemoveAgentsOfType": { + "definition": "RemoveAgentsOfType(AnnotationType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=153" + }, + "blink.mojom.SelectorCreationResult": { + "definition": "struct SelectorCreationResult { pending_receiver host_receiver; pending_remote agent_remote; string serialized_selector; mojo_base.mojom.String16 selected_text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=12" + }, + "blink.mojom.AnnotationType": { + "definition": "enum AnnotationType { kSharedHighlight, kUserNote, kTextFinder, kGlic,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=34" + }, + "blink.mojom.AttachmentResult": { + "definition": "enum AttachmentResult { kSuccess, kSelectorNotMatched, kRangeInvalid,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=67" + }, + "blink.mojom.Selector": { + "definition": "union Selector { string serialized_selector; int32 node_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/annotation/annotation.mojom;l=77" + }, + "blink.mojom.AppBannerController.BannerPromptRequest": { + "definition": "BannerPromptRequest(pending_remote service, pending_receiver event_receiver, array platform) => (AppBannerPromptReply reply);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/app_banner/app_banner.mojom;l=14" + }, + "blink.mojom.AppBannerEvent.BannerAccepted": { + "definition": "BannerAccepted(string platform);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/app_banner/app_banner.mojom;l=21" + }, + "blink.mojom.AppBannerEvent.BannerDismissed": { + "definition": "BannerDismissed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/app_banner/app_banner.mojom;l=22" + }, + "blink.mojom.AppBannerService.DisplayAppBanner": { + "definition": "DisplayAppBanner();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/app_banner/app_banner.mojom;l=27" + }, + "blink.mojom.AppBannerPromptReply": { + "definition": "enum AppBannerPromptReply { NONE, CANCEL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/app_banner/app_banner.mojom;l=7" + }, + "blink.mojom.SerializedArrayBufferContents": { + "definition": "struct SerializedArrayBufferContents { mojo_base.mojom.BigBuffer contents; bool is_resizable_by_user_javascript = false; uint64 max_byte_length = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/array_buffer/array_buffer_contents.mojom;l=11" + }, + "blink.mojom.AssociatedInterfaceProvider.GetAssociatedInterface": { + "definition": "GetAssociatedInterface( string name, pending_associated_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/associated_interfaces/associated_interfaces.mojom;l=14" + }, + "blink.mojom.AutoplayConfigurationClient.AddAutoplayFlags": { + "definition": "AddAutoplayFlags(url.mojom.Origin origin, int32 flags);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/autoplay/autoplay.mojom;l=23" + }, + "blink.mojom.SameOriginBfcacheNotRestoredDetails": { + "definition": "struct SameOriginBfcacheNotRestoredDetails { url.mojom.Url url; array children;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/back_forward_cache_not_restored_reasons.mojom;l=15" + }, + "blink.mojom.BFCacheBlockingDetailedReason": { + "definition": "struct BFCacheBlockingDetailedReason { string name; ScriptSourceLocation? source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/back_forward_cache_not_restored_reasons.mojom;l=25" + }, + "blink.mojom.BackForwardCacheNotRestoredReasons": { + "definition": "struct BackForwardCacheNotRestoredReasons { string? src; string? id; string? name; array reasons; SameOriginBfcacheNotRestoredDetails? same_origin_details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/back_forward_cache_not_restored_reasons.mojom;l=36" + }, + "blink.mojom.BackgroundFetchRegistrationObserver.OnProgress": { + "definition": "OnProgress(uint64 upload_total, uint64 uploaded, uint64 download_total, uint64 downloaded, BackgroundFetchResult result, BackgroundFetchFailureReason failure_reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=106" + }, + "blink.mojom.BackgroundFetchRegistrationObserver.OnRecordsUnavailable": { + "definition": "OnRecordsUnavailable();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=116" + }, + "blink.mojom.BackgroundFetchRegistrationObserver.OnRequestCompleted": { + "definition": "OnRequestCompleted(FetchAPIRequest request, FetchAPIResponse? response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=120" + }, + "blink.mojom.BackgroundFetchService.Fetch": { + "definition": "Fetch(int64 service_worker_registration_id, string developer_id, array requests, BackgroundFetchOptions options, skia.mojom.BitmapN32? icon, BackgroundFetchUkmData ukm_data) => (BackgroundFetchError error, BackgroundFetchRegistration? registration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=130" + }, + "blink.mojom.BackgroundFetchService.GetRegistration": { + "definition": "GetRegistration(int64 service_worker_registration_id, string developer_id) => (BackgroundFetchError error, BackgroundFetchRegistration? registration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=140" + }, + "blink.mojom.BackgroundFetchService.GetDeveloperIds": { + "definition": "GetDeveloperIds(int64 service_worker_registration_id) => (BackgroundFetchError error, array developer_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=147" + }, + "blink.mojom.BackgroundFetchService.GetIconDisplaySize": { + "definition": "GetIconDisplaySize() => (gfx.mojom.Size icon_size_pixels);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=152" + }, + "blink.mojom.BackgroundFetchRegistrationService.UpdateUI": { + "definition": "UpdateUI(string? title, skia.mojom.BitmapN32? icon) => (BackgroundFetchError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=159" + }, + "blink.mojom.BackgroundFetchRegistrationService.Abort": { + "definition": "Abort() => (BackgroundFetchError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=165" + }, + "blink.mojom.BackgroundFetchRegistrationService.MatchRequests": { + "definition": "MatchRequests(FetchAPIRequest? request_to_match, CacheQueryOptions? cache_query_options, bool match_all) => (array fetches);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=168" + }, + "blink.mojom.BackgroundFetchRegistrationService.AddRegistrationObserver": { + "definition": "AddRegistrationObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=173" + }, + "blink.mojom.BackgroundFetchSettledFetch": { + "definition": "struct BackgroundFetchSettledFetch { FetchAPIRequest request; FetchAPIResponse? response;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=28" + }, + "blink.mojom.BackgroundFetchOptions": { + "definition": "struct BackgroundFetchOptions { array icons; uint64 download_total; string title;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=65" + }, + "blink.mojom.BackgroundFetchRegistrationData": { + "definition": "struct BackgroundFetchRegistrationData { string developer_id; uint64 upload_total; uint64 uploaded; uint64 download_total; uint64 downloaded; BackgroundFetchResult result = BackgroundFetchResult.UNSET; BackgroundFetchFailureReason failure_reason = BackgroundFetchFailureReason.NONE;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=74" + }, + "blink.mojom.BackgroundFetchRegistration": { + "definition": "struct BackgroundFetchRegistration { BackgroundFetchRegistrationData registration_data; pending_remote registration_interface;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=89" + }, + "blink.mojom.BackgroundFetchUkmData": { + "definition": "struct BackgroundFetchUkmData { int64 ideal_to_chosen_icon_size = -1;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=96" + }, + "blink.mojom.BackgroundFetchError": { + "definition": "enum BackgroundFetchError { NONE, DUPLICATED_DEVELOPER_ID, INVALID_ARGUMENT, INVALID_ID, STORAGE_ERROR, SERVICE_WORKER_UNAVAILABLE, QUOTA_EXCEEDED, PERMISSION_DENIED, REGISTRATION_LIMIT_EXCEEDED};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=14" + }, + "blink.mojom.BackgroundFetchResult": { + "definition": "enum BackgroundFetchResult { UNSET, FAILURE, SUCCESS};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=33" + }, + "blink.mojom.BackgroundFetchFailureReason": { + "definition": "enum BackgroundFetchFailureReason { NONE = 0, CANCELLED_FROM_UI = 1, CANCELLED_BY_DEVELOPER = 2, BAD_STATUS = 3, FETCH_ERROR = 4, SERVICE_WORKER_UNAVAILABLE = 5, QUOTA_EXCEEDED = 6, DOWNLOAD_TOTAL_EXCEEDED = 7,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_fetch/background_fetch.mojom;l=40" + }, + "blink.mojom.OneShotBackgroundSyncService.Register": { + "definition": "Register(SyncRegistrationOptions options, int64 service_worker_registration_id) => (BackgroundSyncError err, SyncRegistrationOptions? options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=56" + }, + "blink.mojom.OneShotBackgroundSyncService.DidResolveRegistration": { + "definition": "DidResolveRegistration(BackgroundSyncRegistrationInfo registration_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=62" + }, + "blink.mojom.OneShotBackgroundSyncService.GetRegistrations": { + "definition": "GetRegistrations(int64 service_worker_registration_id) => (BackgroundSyncError err, array registrations);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=65" + }, + "blink.mojom.PeriodicBackgroundSyncService.Register": { + "definition": "Register(SyncRegistrationOptions options, int64 service_worker_registration_id) => (BackgroundSyncError err, SyncRegistrationOptions? options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=73" + }, + "blink.mojom.PeriodicBackgroundSyncService.Unregister": { + "definition": "Unregister(int64 service_worker_registration_id, string tag) => (BackgroundSyncError err);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=79" + }, + "blink.mojom.PeriodicBackgroundSyncService.GetRegistrations": { + "definition": "GetRegistrations(int64 service_worker_registration_id) => (BackgroundSyncError err, array registrations);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=83" + }, + "blink.mojom.SyncRegistrationOptions": { + "definition": "struct SyncRegistrationOptions { string tag = \"\"; int64 min_interval = -1;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=7" + }, + "blink.mojom.BackgroundSyncRegistrationInfo": { + "definition": "struct BackgroundSyncRegistrationInfo { int64 service_worker_registration_id = -1; string tag; BackgroundSyncType sync_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=43" + }, + "blink.mojom.BackgroundSyncError": { + "definition": "enum BackgroundSyncError { NONE, STORAGE, NOT_FOUND, NO_SERVICE_WORKER, NOT_ALLOWED, PERMISSION_DENIED, MAX=PERMISSION_DENIED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=15" + }, + "blink.mojom.BackgroundSyncState": { + "definition": "enum BackgroundSyncState { PENDING, FIRING, REREGISTERED_WHILE_FIRING,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=25" + }, + "blink.mojom.BackgroundSyncEventLastChance": { + "definition": "enum BackgroundSyncEventLastChance { IS_NOT_LAST_CHANCE, IS_LAST_CHANCE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=31" + }, + "blink.mojom.BackgroundSyncType": { + "definition": "enum BackgroundSyncType { ONE_SHOT, PERIODIC,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/background_sync/background_sync.mojom;l=36" + }, + "blink.mojom.BadgeService.SetBadge": { + "definition": "SetBadge(BadgeValue value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/badging/badging.mojom;l=21" + }, + "blink.mojom.BadgeService.ClearBadge": { + "definition": "ClearBadge();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/badging/badging.mojom;l=24" + }, + "blink.mojom.BadgeValue": { + "definition": "union BadgeValue { uint8 flag; uint64 number;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/badging/badging.mojom;l=8" + }, + "blink.mojom.BlobReaderClient.OnCalculatedSize": { + "definition": "OnCalculatedSize(uint64 total_size, uint64 expected_content_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=21" + }, + "blink.mojom.BlobReaderClient.OnComplete": { + "definition": "OnComplete(int32 status, uint64 data_length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=29" + }, + "blink.mojom.Blob.Clone": { + "definition": "Clone(pending_receiver blob);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=35" + }, + "blink.mojom.Blob.AsDataPipeGetter": { + "definition": "AsDataPipeGetter(pending_receiver data_pipe_getter);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=38" + }, + "blink.mojom.Blob.ReadAll": { + "definition": "ReadAll(handle pipe, pending_remote? client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=43" + }, + "blink.mojom.Blob.ReadRange": { + "definition": "ReadRange(uint64 offset, uint64 length, handle pipe, pending_remote? client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=50" + }, + "blink.mojom.Blob.Load": { + "definition": "Load(pending_receiver loader, string request_method, network.mojom.HttpRequestHeaders headers, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=57" + }, + "blink.mojom.Blob.ReadSideData": { + "definition": "ReadSideData() => (mojo_base.mojom.BigBuffer? data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=65" + }, + "blink.mojom.Blob.CaptureSnapshot": { + "definition": "[Sync] CaptureSnapshot() => (uint64 length, mojo_base.mojom.Time? modification_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=69" + }, + "blink.mojom.Blob.GetInternalUUID": { + "definition": "GetInternalUUID() => (string uuid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob.mojom;l=76" + }, + "blink.mojom.ProgressClient.OnProgress": { + "definition": "OnProgress(uint64 delta);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_registry.mojom;l=20" + }, + "blink.mojom.BlobRegistry.Register": { + "definition": "[Sync] Register(pending_receiver blob, string uuid, string content_type, string content_disposition, array elements) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_registry.mojom;l=31" + }, + "blink.mojom.BlobRegistry.RegisterFromStream": { + "definition": "RegisterFromStream(string content_type, string content_disposition, uint64 length_hint, handle data, pending_associated_remote? progress_client) => (SerializedBlob? blob);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_registry.mojom;l=44" + }, + "blink.mojom.BlobURLStore.Register": { + "definition": "[Sync] Register( pending_remote blob, url.mojom.Url url) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_url_store.mojom;l=20" + }, + "blink.mojom.BlobURLStore.Revoke": { + "definition": "Revoke(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_url_store.mojom;l=25" + }, + "blink.mojom.BlobURLStore.ResolveAsURLLoaderFactory": { + "definition": "ResolveAsURLLoaderFactory( url.mojom.Url url, pending_receiver factory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_url_store.mojom;l=34" + }, + "blink.mojom.BlobURLStore.ResolveAsBlobURLToken": { + "definition": "ResolveAsBlobURLToken(url.mojom.Url url, pending_receiver token, bool is_top_level_navigation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_url_store.mojom;l=42" + }, + "blink.mojom.BlobURLToken.Clone": { + "definition": "Clone(pending_receiver token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_url_store.mojom;l=51" + }, + "blink.mojom.BlobURLToken.GetToken": { + "definition": "GetToken() => (mojo_base.mojom.UnguessableToken token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/blob_url_store.mojom;l=52" + }, + "blink.mojom.BytesProvider.RequestAsReply": { + "definition": "RequestAsReply() => (array data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/data_element.mojom;l=48" + }, + "blink.mojom.BytesProvider.RequestAsStream": { + "definition": "RequestAsStream(handle pipe);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/data_element.mojom;l=55" + }, + "blink.mojom.BytesProvider.RequestAsFile": { + "definition": "RequestAsFile(uint64 source_offset, uint64 source_size, mojo_base.mojom.File file, uint64 file_offset) => (mojo_base.mojom.Time? time_file_modified);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/data_element.mojom;l=64" + }, + "blink.mojom.DataElementBytes": { + "definition": "struct DataElementBytes { const uint64 kMaximumEmbeddedDataSize = 256000; uint64 length; array? embedded_data; pending_remote data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/data_element.mojom;l=25" + }, + "blink.mojom.DataElementFile": { + "definition": "struct DataElementFile { mojo_base.mojom.FilePath path; uint64 offset; uint64 length; mojo_base.mojom.Time? expected_modification_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/data_element.mojom;l=70" + }, + "blink.mojom.DataElementBlob": { + "definition": "struct DataElementBlob { pending_remote blob; uint64 offset; uint64 length;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/data_element.mojom;l=85" + }, + "blink.mojom.DataElement": { + "definition": "union DataElement { DataElementBytes bytes; DataElementFile file; DataElementBlob blob;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/data_element.mojom;l=13" + }, + "blink.mojom.FileBackedBlobFactory.RegisterBlob": { + "definition": "RegisterBlob(pending_receiver blob, string uuid, string content_type, blink.mojom.DataElementFile file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/file_backed_blob_factory.mojom;l=15" + }, + "blink.mojom.FileBackedBlobFactory.RegisterBlobSync": { + "definition": "[Sync] RegisterBlobSync(pending_receiver blob, string uuid, string content_type, blink.mojom.DataElementFile file) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/file_backed_blob_factory.mojom;l=19" + }, + "blink.mojom.SerializedBlob": { + "definition": "struct SerializedBlob { string uuid; string content_type; uint64 size; pending_remote blob;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/blob/serialized_blob.mojom;l=13" + }, + "blink.mojom.WebBluetoothService.GetAvailability": { + "definition": "GetAvailability() => (bool is_available);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=225" + }, + "blink.mojom.WebBluetoothService.RequestDevice": { + "definition": "RequestDevice(WebBluetoothRequestDeviceOptions options) => (WebBluetoothResult result, WebBluetoothDevice? device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=234" + }, + "blink.mojom.WebBluetoothService.GetDevices": { + "definition": "GetDevices() => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=241" + }, + "blink.mojom.WebBluetoothService.ForgetDevice": { + "definition": "ForgetDevice(WebBluetoothDeviceId device_id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=245" + }, + "blink.mojom.WebBluetoothService.RemoteServerConnect": { + "definition": "RemoteServerConnect( WebBluetoothDeviceId device_id, pending_associated_remote client) => ( WebBluetoothResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=252" + }, + "blink.mojom.WebBluetoothService.RemoteServerDisconnect": { + "definition": "RemoteServerDisconnect(WebBluetoothDeviceId device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=259" + }, + "blink.mojom.WebBluetoothService.RemoteServerGetPrimaryServices": { + "definition": "RemoteServerGetPrimaryServices( WebBluetoothDeviceId device_id, WebBluetoothGATTQueryQuantity quantity, bluetooth.mojom.UUID? services_uuid) => ( WebBluetoothResult result, array? services);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=266" + }, + "blink.mojom.WebBluetoothService.RemoteServiceGetCharacteristics": { + "definition": "RemoteServiceGetCharacteristics( string service_instance_id, WebBluetoothGATTQueryQuantity quantity, bluetooth.mojom.UUID? characteristics_uuid) => ( WebBluetoothResult result, array? characteristics);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=279" + }, + "blink.mojom.WebBluetoothService.RemoteCharacteristicReadValue": { + "definition": "RemoteCharacteristicReadValue( string characteristic_instance_id) => ( WebBluetoothResult result, mojo_base.mojom.ReadOnlyBuffer value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=291" + }, + "blink.mojom.WebBluetoothService.RemoteCharacteristicWriteValue": { + "definition": "RemoteCharacteristicWriteValue( string characteristic_instance_id, mojo_base.mojom.ReadOnlyBuffer value, WebBluetoothWriteType write_type) => (WebBluetoothResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=300" + }, + "blink.mojom.WebBluetoothService.RemoteCharacteristicStartNotifications": { + "definition": "RemoteCharacteristicStartNotifications( string characteristic_instance_id, pending_associated_remote client) => ( WebBluetoothResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=308" + }, + "blink.mojom.WebBluetoothService.RemoteCharacteristicStopNotifications": { + "definition": "RemoteCharacteristicStopNotifications( string characteristic_instance_id) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=315" + }, + "blink.mojom.WebBluetoothService.RemoteCharacteristicGetDescriptors": { + "definition": "RemoteCharacteristicGetDescriptors( string characteristics_instance_id, WebBluetoothGATTQueryQuantity quantity, bluetooth.mojom.UUID? descriptor_uuid) => ( WebBluetoothResult result, array? descriptors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=324" + }, + "blink.mojom.WebBluetoothService.RemoteDescriptorReadValue": { + "definition": "RemoteDescriptorReadValue( string descriptor_instance_id) => ( WebBluetoothResult result, mojo_base.mojom.ReadOnlyBuffer value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=336" + }, + "blink.mojom.WebBluetoothService.RemoteDescriptorWriteValue": { + "definition": "RemoteDescriptorWriteValue( string descriptor_instance_id, mojo_base.mojom.ReadOnlyBuffer value) => (WebBluetoothResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=345" + }, + "blink.mojom.WebBluetoothService.RequestScanningStart": { + "definition": "RequestScanningStart( pending_associated_remote client, WebBluetoothRequestLEScanOptions options) => ( WebBluetoothResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=350" + }, + "blink.mojom.WebBluetoothService.WatchAdvertisementsForDevice": { + "definition": "WatchAdvertisementsForDevice( WebBluetoothDeviceId device_id, pending_associated_remote client) => (WebBluetoothResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=359" + }, + "blink.mojom.WebBluetoothServerClient.GATTServerDisconnected": { + "definition": "GATTServerDisconnected();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=368" + }, + "blink.mojom.WebBluetoothCharacteristicClient.RemoteCharacteristicValueChanged": { + "definition": "RemoteCharacteristicValueChanged(mojo_base.mojom.ReadOnlyBuffer value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=375" + }, + "blink.mojom.WebBluetoothAdvertisementClient.AdvertisingEvent": { + "definition": "AdvertisingEvent(WebBluetoothAdvertisingEvent result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=382" + }, + "blink.mojom.WebBluetoothLeScanFilter": { + "definition": "struct WebBluetoothLeScanFilter { array? services; string? name; string? name_prefix; map>? manufacturer_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=125" + }, + "blink.mojom.WebBluetoothCompany": { + "definition": "struct WebBluetoothCompany { uint16 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=136" + }, + "blink.mojom.WebBluetoothDataFilter": { + "definition": "struct WebBluetoothDataFilter { uint8 data; uint8 mask;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=144" + }, + "blink.mojom.WebBluetoothRequestDeviceOptions": { + "definition": "struct WebBluetoothRequestDeviceOptions { array? filters; array? exclusion_filters; array optional_services; array optional_manufacturer_data; bool accept_all_devices;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=149" + }, + "blink.mojom.WebBluetoothRequestLEScanOptions": { + "definition": "struct WebBluetoothRequestLEScanOptions { array? filters; bool keep_repeated_devices; bool accept_all_advertisements;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=157" + }, + "blink.mojom.WebBluetoothDeviceId": { + "definition": "struct WebBluetoothDeviceId { array device_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=174" + }, + "blink.mojom.WebBluetoothDevice": { + "definition": "struct WebBluetoothDevice { WebBluetoothDeviceId id; string? name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=178" + }, + "blink.mojom.WebBluetoothRemoteGATTService": { + "definition": "struct WebBluetoothRemoteGATTService { string instance_id; bluetooth.mojom.UUID uuid;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=183" + }, + "blink.mojom.WebBluetoothRemoteGATTCharacteristic": { + "definition": "struct WebBluetoothRemoteGATTCharacteristic { string instance_id; bluetooth.mojom.UUID uuid; uint32 properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=188" + }, + "blink.mojom.WebBluetoothAdvertisingEvent": { + "definition": "struct WebBluetoothAdvertisingEvent { WebBluetoothDevice device; string? name; array uuids; bool appearance_is_set; uint16 appearance; bool tx_power_is_set; uint8 tx_power; bool rssi_is_set; uint8 rssi; map> manufacturer_data; map> service_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=194" + }, + "blink.mojom.WebBluetoothRemoteGATTDescriptor": { + "definition": "struct WebBluetoothRemoteGATTDescriptor { string instance_id; bluetooth.mojom.UUID uuid;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=208" + }, + "blink.mojom.WebBluetoothResult": { + "definition": "enum WebBluetoothResult { SUCCESS, WATCH_ADVERTISEMENTS_ABORTED, GATT_INVALID_ATTRIBUTE_LENGTH, CONNECT_INVALID_ARGS, SERVICE_NO_LONGER_EXISTS, CHARACTERISTIC_NO_LONGER_EXISTS, PROMPT_CANCELED, CONNECT_DOES_NOT_EXIST, CONNECT_ALREADY_IN_PROGRESS, CONNECT_AUTH_CANCELED, CONNECT_AUTH_FAILED, CONNECT_AUTH_REJECTED, CONNECT_AUTH_TIMEOUT, CONNECT_UNKNOWN_ERROR, CONNECT_UNKNOWN_FAILURE, CONNECT_UNSUPPORTED_DEVICE, DEVICE_NO_LONGER_IN_RANGE, GATT_NOT_PAIRED, GATT_OPERATION_IN_PROGRESS, CONNECT_CONN_FAILED, CONNECT_NOT_READY, CONNECT_ALREADY_CONNECTED, CONNECT_ALREADY_EXISTS, CONNECT_NOT_CONNECTED, CONNECT_NON_AUTH_TIMEOUT, CONNECT_NO_MEMORY, CONNECT_JNI_ENVIRONMENT, CONNECT_JNI_THREAD_ATTACH, CONNECT_WAKELOCK, CONNECT_UNEXPECTED_STATE, CONNECT_SOCKET_ERROR, NO_BLUETOOTH_ADAPTER, CHOSEN_DEVICE_VANISHED, CHOOSER_CANCELLED, CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED, CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED, CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN, SERVICE_NOT_FOUND, NO_SERVICES_FOUND, CHARACTERISTIC_NOT_FOUND, NO_CHARACTERISTICS_FOUND, DESCRIPTOR_NOT_FOUND, NO_DESCRIPTORS_FOUND, WEB_BLUETOOTH_NOT_SUPPORTED, BLUETOOTH_LOW_ENERGY_NOT_AVAILABLE, GATT_UNKNOWN_ERROR, GATT_UNKNOWN_FAILURE, GATT_NOT_PERMITTED, GATT_NOT_SUPPORTED, GATT_UNTRANSLATED_ERROR_CODE, GATT_NOT_AUTHORIZED, BLOCKLISTED_DESCRIPTOR_UUID, BLOCKLISTED_CHARACTERISTIC_UUID, BLOCKLISTED_READ, BLOCKLISTED_WRITE, NOT_ALLOWED_TO_ACCESS_ANY_SERVICE, NOT_ALLOWED_TO_ACCESS_SERVICE, REQUEST_DEVICE_WITH_BLOCKLISTED_UUID_OR_MANUFACTURER_DATA, DESCRIPTOR_NO_LONGER_EXISTS, PERMISSIONS_POLICY_VIOLATION, SCANNING_BLOCKED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=47" + }, + "blink.mojom.WebBluetoothGATTQueryQuantity": { + "definition": "enum WebBluetoothGATTQueryQuantity { SINGLE, MULTIPLE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=165" + }, + "blink.mojom.WebBluetoothWriteType": { + "definition": "enum WebBluetoothWriteType { kWriteDefaultDeprecated, kWriteWithResponse, kWriteWithoutResponse,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom;l=214" + }, + "blink.mojom.BroadcastChannelClient.OnMessage": { + "definition": "OnMessage(blink.mojom.CloneableMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/broadcastchannel/broadcast_channel.mojom;l=16" + }, + "blink.mojom.BroadcastChannelProvider.ConnectToChannel": { + "definition": "ConnectToChannel( string name, pending_associated_remote client, pending_associated_receiver connection);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/broadcastchannel/broadcast_channel.mojom;l=36" + }, + "blink.mojom.BrowserInterfaceBroker.GetInterface": { + "definition": "GetInterface(mojo_base.mojom.GenericPendingReceiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/browser_interface_broker.mojom;l=14" + }, + "blink.mojom.EpochTopic": { + "definition": "struct EpochTopic { int32 topic; string version; string config_version; string model_version; string taxonomy_version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom;l=7" + }, + "blink.mojom.BucketHost.Persist": { + "definition": "Persist() => (bool persisted, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=52" + }, + "blink.mojom.BucketHost.Persisted": { + "definition": "Persisted() => (bool persisted, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=55" + }, + "blink.mojom.BucketHost.Estimate": { + "definition": "Estimate() => (int64 current_usage, int64 current_quota, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=62" + }, + "blink.mojom.BucketHost.Durability": { + "definition": "Durability() => (BucketDurability durability, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=66" + }, + "blink.mojom.BucketHost.SetExpires": { + "definition": "SetExpires(mojo_base.mojom.Time expires) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=70" + }, + "blink.mojom.BucketHost.Expires": { + "definition": "Expires() => (mojo_base.mojom.Time? expires, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=74" + }, + "blink.mojom.BucketHost.GetIdbFactory": { + "definition": "GetIdbFactory(pending_receiver idb_factory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=77" + }, + "blink.mojom.BucketHost.GetLockManager": { + "definition": "GetLockManager(pending_receiver lock_manager);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=80" + }, + "blink.mojom.BucketHost.GetCaches": { + "definition": "GetCaches(pending_receiver cache_storage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=83" + }, + "blink.mojom.BucketHost.GetDirectory": { + "definition": "GetDirectory() => (FileSystemAccessError result, pending_remote? directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=86" + }, + "blink.mojom.BucketHost.GetDirectoryForDevtools": { + "definition": "GetDirectoryForDevtools(array directory_path_components) => (FileSystemAccessError result, pending_remote? directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=96" + }, + "blink.mojom.BucketManagerHost.OpenBucket": { + "definition": "OpenBucket(string name, BucketPolicies policy) => (pending_remote? remote, BucketError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=113" + }, + "blink.mojom.BucketManagerHost.GetBucketForDevtools": { + "definition": "GetBucketForDevtools(string name, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=117" + }, + "blink.mojom.BucketManagerHost.Keys": { + "definition": "Keys() => (array buckets, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=120" + }, + "blink.mojom.BucketManagerHost.DeleteBucket": { + "definition": "DeleteBucket(string name) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=123" + }, + "blink.mojom.BucketPolicies": { + "definition": "struct BucketPolicies { bool persisted; bool has_persisted = false; BucketDurability durability; bool has_durability = false; int64 quota; bool has_quota = false; mojo_base.mojom.Time? expires;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=26" + }, + "blink.mojom.BucketError": { + "definition": "enum BucketError { kUnknown = 0, kQuotaExceeded = 1, kInvalidExpiration = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/buckets/bucket_manager_host.mojom;l=19" + }, + "blink.mojom.CacheStorageCache.Match": { + "definition": "Match(blink.mojom.FetchAPIRequest request, CacheQueryOptions query_options, bool in_related_fetch_event, bool in_range_fetch_event, int64 trace_id) => result; MatchAll(blink.mojom.FetchAPIRequest? request, CacheQueryOptions query_options, int64 trace_id) => result, CacheStorageError>; GetAllMatchedEntries(blink.mojom.FetchAPIRequest? request, CacheQueryOptions query_options, int64 trace_id) => result, CacheStorageError>; Keys(blink.mojom.FetchAPIRequest? request, CacheQueryOptions query_options, int64 trace_id) => result, CacheStorageError>; Batch(array batch_operations, int64 trace_id) => (CacheStorageVerboseError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=107" + }, + "blink.mojom.CacheStorageCache.WriteSideData": { + "definition": "WriteSideData(url.mojom.Url url, mojo_base.mojom.Time expected_response_time, mojo_base.mojom.BigBuffer data, int64 trace_id) => (CacheStorageError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=137" + }, + "blink.mojom.CacheStorage.Has": { + "definition": "Has(mojo_base.mojom.String16 cache_name, int64 trace_id) => (CacheStorageError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=147" + }, + "blink.mojom.CacheStorage.Delete": { + "definition": "Delete(mojo_base.mojom.String16 cache_name, int64 trace_id) => (CacheStorageError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=150" + }, + "blink.mojom.CacheStorage.Keys": { + "definition": "Keys(int64 trace_id) => (array keys);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=153" + }, + "blink.mojom.CacheStorageVerboseError": { + "definition": "struct CacheStorageVerboseError { CacheStorageError value; string? message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=39" + }, + "blink.mojom.CacheQueryOptions": { + "definition": "struct CacheQueryOptions { bool ignore_search = false; bool ignore_method = false; bool ignore_vary = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=45" + }, + "blink.mojom.MultiCacheQueryOptions": { + "definition": "struct MultiCacheQueryOptions { CacheQueryOptions query_options; mojo_base.mojom.String16? cache_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=52" + }, + "blink.mojom.BatchOperation": { + "definition": "struct BatchOperation { OperationType operation_type; blink.mojom.FetchAPIRequest request; blink.mojom.FetchAPIResponse? response; CacheQueryOptions? match_options;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=65" + }, + "blink.mojom.EagerResponse": { + "definition": "struct EagerResponse { blink.mojom.FetchAPIResponse response; handle pipe; pending_receiver client_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=80" + }, + "blink.mojom.CacheEntry": { + "definition": "struct CacheEntry { blink.mojom.FetchAPIRequest request; blink.mojom.FetchAPIResponse response;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=93" + }, + "blink.mojom.CacheStorageError": { + "definition": "enum CacheStorageError { kSuccess = 0, kErrorExists = 1, kErrorStorage = 2, kErrorNotFound = 3, kErrorQuotaExceeded = 4, kErrorCacheNameNotFound = 5, kErrorQueryTooLarge = 6, kErrorNotImplemented = 7, kErrorDuplicateOperation = 8, kErrorCrossOriginResourcePolicy = 9,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=19" + }, + "blink.mojom.OperationType": { + "definition": "enum OperationType { kUndefined, kPut, kDelete,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=58" + }, + "blink.mojom.MatchResponse": { + "definition": "union MatchResponse { blink.mojom.FetchAPIResponse response; EagerResponse eager_response;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cache_storage/cache_storage.mojom;l=88" + }, + "blink.mojom.CallStackGenerator.CollectJavaScriptCallStack": { + "definition": "CollectJavaScriptCallStack() => ( string javascript_call_stack, LocalFrameToken? frame_token );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/call_stack_generator/call_stack_generator.mojom;l=15" + }, + "blink.mojom.ColorChooser.SetSelectedColor": { + "definition": "SetSelectedColor(uint32 color);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/color_chooser.mojom;l=26" + }, + "blink.mojom.ColorChooserClient.DidChooseColor": { + "definition": "DidChooseColor(uint32 color);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/color_chooser.mojom;l=31" + }, + "blink.mojom.EyeDropperChooser.Choose": { + "definition": "Choose() => (bool success, uint32 color);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/color_chooser.mojom;l=37" + }, + "blink.mojom.ColorSuggestion": { + "definition": "struct ColorSuggestion { uint32 color; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/color_chooser.mojom;l=7" + }, + "blink.mojom.DateTimeChooser.OpenDateTimeDialog": { + "definition": "OpenDateTimeDialog(DateTimeDialogValue value) => (bool success, double dialog_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/date_time_chooser.mojom;l=34" + }, + "blink.mojom.DateTimeChooser.CloseDateTimeDialog": { + "definition": "CloseDateTimeDialog();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/date_time_chooser.mojom;l=38" + }, + "blink.mojom.DateTimeSuggestion": { + "definition": "struct DateTimeSuggestion { double value; mojo_base.mojom.String16 localized_value; mojo_base.mojom.String16 label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/date_time_chooser.mojom;l=10" + }, + "blink.mojom.DateTimeDialogValue": { + "definition": "struct DateTimeDialogValue { ui.mojom.TextInputType dialog_type; double dialog_value; double minimum; double maximum; double step; array suggestions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/date_time_chooser.mojom;l=21" + }, + "blink.mojom.FileChooser.OpenFileChooser": { + "definition": "[UnlimitedSize] OpenFileChooser(FileChooserParams params) => (FileChooserResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/file_chooser.mojom;l=136" + }, + "blink.mojom.FileChooser.EnumerateChosenDirectory": { + "definition": "EnumerateChosenDirectory(mojo_base.mojom.FilePath directory_path) => (FileChooserResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/file_chooser.mojom;l=141" + }, + "blink.mojom.FileChooserParams": { + "definition": "struct FileChooserParams { Mode mode = kOpen; mojo_base.mojom.String16 title; mojo_base.mojom.FilePath default_file_name; array selected_files; array accept_types; bool need_local_path = true; bool use_media_capture = false; bool open_writable = false; url.mojom.Url requestor;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/file_chooser.mojom;l=14" + }, + "blink.mojom.NativeFileInfo": { + "definition": "struct NativeFileInfo { mojo_base.mojom.FilePath file_path; mojo_base.mojom.String16 display_name; array base_subdirs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/file_chooser.mojom;l=82" + }, + "blink.mojom.FileSystemFileInfo": { + "definition": "struct FileSystemFileInfo { url.mojom.Url url; mojo_base.mojom.Time modification_time; int64 length = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/file_chooser.mojom;l=103" + }, + "blink.mojom.FileChooserResult": { + "definition": "struct FileChooserResult { array files; mojo_base.mojom.FilePath base_directory;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/file_chooser.mojom;l=117" + }, + "blink.mojom.Mode": { + "definition": "enum Mode { kOpen, kOpenMultiple, kUploadFolder, kOpenDirectory, kSave, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/file_chooser.mojom;l=15" + }, + "blink.mojom.FileChooserFileInfo": { + "definition": "union FileChooserFileInfo { NativeFileInfo native_file; FileSystemFileInfo file_system;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/file_chooser.mojom;l=110" + }, + "blink.mojom.PopupMenuClient.DidAcceptIndices": { + "definition": "DidAcceptIndices(array indices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/popup_menu.mojom;l=27" + }, + "blink.mojom.PopupMenuClient.DidCancel": { + "definition": "DidCancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/popup_menu.mojom;l=31" + }, + "blink.mojom.MenuItem": { + "definition": "struct MenuItem { string? label; string? tool_tip; Type type = kOption; uint32 action = 0; mojo_base.mojom.TextDirection text_direction = mojo_base.mojom.TextDirection.LEFT_TO_RIGHT; bool has_text_direction_override = false; bool enabled = false; bool checked = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/popup_menu.mojom;l=10" + }, + "blink.mojom.Type": { + "definition": "enum Type { kOption, kCheckableOption, kGroup, kSeparator, kSubMenu };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/choosers/popup_menu.mojom;l=11" + }, + "blink.mojom.ClipboardListener.OnClipboardDataChanged": { + "definition": "OnClipboardDataChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=61" + }, + "blink.mojom.ClipboardHost.GetSequenceNumber": { + "definition": "[Sync] GetSequenceNumber(ClipboardBuffer buffer) => (mojo_base.mojom.Uint128 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=107" + }, + "blink.mojom.ClipboardHost.IsFormatAvailable": { + "definition": "[Sync] IsFormatAvailable(ClipboardFormat format, ClipboardBuffer buffer) => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=109" + }, + "blink.mojom.ClipboardHost.ReadAvailableTypes": { + "definition": "[Sync] ReadAvailableTypes(ClipboardBuffer buffer) => (array types);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=115" + }, + "blink.mojom.ClipboardHost.ReadText": { + "definition": "[Sync] ReadText(ClipboardBuffer buffer) => (mojo_base.mojom.BigString16 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=118" + }, + "blink.mojom.ClipboardHost.ReadHtml": { + "definition": "[Sync] ReadHtml(ClipboardBuffer buffer) => (mojo_base.mojom.BigString16 markup, url.mojom.Url url, uint32 fragment_start, uint32 fragment_end);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=121" + }, + "blink.mojom.ClipboardHost.ReadSvg": { + "definition": "ReadSvg(ClipboardBuffer buffer) => (mojo_base.mojom.BigString16 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=129" + }, + "blink.mojom.ClipboardHost.ReadRtf": { + "definition": "[Sync] ReadRtf(ClipboardBuffer buffer) => (mojo_base.mojom.BigString result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=130" + }, + "blink.mojom.ClipboardHost.ReadPng": { + "definition": "[Sync] ReadPng(ClipboardBuffer buffer) => (mojo_base.mojom.BigBuffer png);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=136" + }, + "blink.mojom.ClipboardHost.ReadFiles": { + "definition": "[Sync] ReadFiles(ClipboardBuffer buffer) => (ClipboardFiles result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=147" + }, + "blink.mojom.ClipboardHost.ReadDataTransferCustomData": { + "definition": "[Sync] ReadDataTransferCustomData(ClipboardBuffer buffer, mojo_base.mojom.String16 type) => (mojo_base.mojom.BigString16 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=149" + }, + "blink.mojom.ClipboardHost.ReadAvailableCustomAndStandardFormats": { + "definition": "[Sync] ReadAvailableCustomAndStandardFormats() => (array format_types);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=158" + }, + "blink.mojom.ClipboardHost.ReadUnsanitizedCustomFormat": { + "definition": "ReadUnsanitizedCustomFormat(mojo_base.mojom.String16 format) => (mojo_base.mojom.BigBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=167" + }, + "blink.mojom.ClipboardHost.WriteText": { + "definition": "WriteText(mojo_base.mojom.BigString16 text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=174" + }, + "blink.mojom.ClipboardHost.WriteHtml": { + "definition": "WriteHtml(mojo_base.mojom.BigString16 markup, url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=175" + }, + "blink.mojom.ClipboardHost.WriteSvg": { + "definition": "WriteSvg(mojo_base.mojom.BigString16 markup);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=180" + }, + "blink.mojom.ClipboardHost.WriteSmartPasteMarker": { + "definition": "WriteSmartPasteMarker();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=181" + }, + "blink.mojom.ClipboardHost.WriteDataTransferCustomData": { + "definition": "WriteDataTransferCustomData(map data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=185" + }, + "blink.mojom.ClipboardHost.WriteBookmark": { + "definition": "WriteBookmark(string url, mojo_base.mojom.String16 title);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=191" + }, + "blink.mojom.ClipboardHost.WriteImage": { + "definition": "WriteImage(skia.mojom.BitmapN32 image);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=193" + }, + "blink.mojom.ClipboardHost.WriteUnsanitizedCustomFormat": { + "definition": "WriteUnsanitizedCustomFormat(mojo_base.mojom.String16 format, mojo_base.mojom.BigBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=201" + }, + "blink.mojom.ClipboardHost.CommitWrite": { + "definition": "CommitWrite();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=203" + }, + "blink.mojom.ClipboardHost.RegisterClipboardListener": { + "definition": "RegisterClipboardListener(pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=219" + }, + "blink.mojom.ClipboardFiles": { + "definition": "struct ClipboardFiles { array files; string? file_system_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=50" + }, + "blink.mojom.ClipboardFormat": { + "definition": "enum ClipboardFormat { kPlaintext, kHtml, kSmartPaste, kBookmark,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=16" + }, + "blink.mojom.ClipboardBuffer": { + "definition": "enum ClipboardBuffer { kStandard, kSelection,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=23" + }, + "blink.mojom.PlatformClipboardPermissionState": { + "definition": "enum PlatformClipboardPermissionState { kAllow, kAsk, kDeny,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/clipboard/clipboard.mojom;l=38" + }, + "blink.mojom.CloseListener.Signal": { + "definition": "Signal();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/close_watcher/close_listener.mojom;l=12" + }, + "blink.mojom.CommitResult": { + "definition": "enum CommitResult { Ok, Aborted, RestartCrossDocument,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/commit_result/commit_result.mojom;l=8" + }, + "blink.mojom.WebPressureManager.AddClient": { + "definition": "AddClient(device.mojom.PressureSource source, pending_associated_remote client) => (device.mojom.PressureManagerAddClientResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/compute_pressure/web_pressure_manager.mojom;l=18" + }, + "blink.mojom.WebPressureClient.OnPressureUpdated": { + "definition": "OnPressureUpdated(WebPressureUpdate update);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/compute_pressure/web_pressure_manager.mojom;l=31" + }, + "blink.mojom.WebPressureUpdate": { + "definition": "struct WebPressureUpdate { device.mojom.PressureSource source; device.mojom.PressureState state; double own_contribution_estimate = -1.0; mojo_base.mojom.TimeTicks timestamp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/compute_pressure/web_pressure_update.mojom;l=13" + }, + "blink.mojom.ConfidenceLevel": { + "definition": "enum ConfidenceLevel { kHigh, kLow,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/confidence_level.mojom;l=9" + }, + "blink.mojom.ContactsManager.Select": { + "definition": "Select(bool multiple, bool include_names, bool include_emails, bool include_tel, bool include_addresses, bool include_icons) => (array? contacts);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/contacts/contacts_manager.mojom;l=31" + }, + "blink.mojom.ContactIconBlob": { + "definition": "struct ContactIconBlob { string mime_type; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/contacts/contacts_manager.mojom;l=10" + }, + "blink.mojom.ContactInfo": { + "definition": "struct ContactInfo { array? name; array? email; array? tel; array? address; array? icon;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/contacts/contacts_manager.mojom;l=16" + }, + "blink.mojom.AIPageContentAgent.GetAIPageContent": { + "definition": "GetAIPageContent(AIPageContentOptions request) => (AIPageContent? page_content);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=600" + }, + "blink.mojom.AIPageContentGeometry": { + "definition": "struct AIPageContentGeometry { gfx.mojom.Rect outer_bounding_box; gfx.mojom.Rect visible_bounding_box; array fragment_visible_bounding_boxes; bool is_fixed_or_sticky_position;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=64" + }, + "blink.mojom.AIPageContentSelection": { + "definition": "struct AIPageContentSelection { int32 start_dom_node_id; int32 start_offset; int32 end_dom_node_id; int32 end_offset; string selected_text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=98" + }, + "blink.mojom.AIPageContentPageInteractionInfo": { + "definition": "struct AIPageContentPageInteractionInfo { int32? focused_dom_node_id; int32? accessibility_focused_dom_node_id; gfx.mojom.Point? mouse_position;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=125" + }, + "blink.mojom.AIPageContentFrameInteractionInfo": { + "definition": "struct AIPageContentFrameInteractionInfo { AIPageContentSelection? selection;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=137" + }, + "blink.mojom.AIPageContentNodeInteractionInfo": { + "definition": "struct AIPageContentNodeInteractionInfo { AIPageContentScrollerInfo? scroller_info; bool is_focusable; bool is_clickable; int32? document_scoped_z_order; array clickability_reasons; bool is_disabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=200" + }, + "blink.mojom.AIPageContentScrollerInfo": { + "definition": "struct AIPageContentScrollerInfo { gfx.mojom.Size scrolling_bounds; gfx.mojom.Rect visible_area; bool user_scrollable_horizontal; bool user_scrollable_vertical;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=239" + }, + "blink.mojom.AIPageContentTextStyle": { + "definition": "struct AIPageContentTextStyle { AIPageContentTextSize text_size; bool has_emphasis; uint32 color;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=262" + }, + "blink.mojom.AIPageContentTextInfo": { + "definition": "struct AIPageContentTextInfo { string text_content; AIPageContentTextStyle text_style;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=270" + }, + "blink.mojom.AIPageContentAnchorData": { + "definition": "struct AIPageContentAnchorData { url.mojom.Url url; array rel;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=284" + }, + "blink.mojom.AIPageContentImageInfo": { + "definition": "struct AIPageContentImageInfo { string? image_caption; url.mojom.Origin? source_origin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=294" + }, + "blink.mojom.AIPageContentSVGData": { + "definition": "struct AIPageContentSVGData { string? inner_text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=303" + }, + "blink.mojom.AIPageContentCanvasData": { + "definition": "struct AIPageContentCanvasData { gfx.mojom.Size layout_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=308" + }, + "blink.mojom.AIPageContentVideoData": { + "definition": "struct AIPageContentVideoData { url.mojom.Url url; url.mojom.Origin? source_origin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=314" + }, + "blink.mojom.AIPageContentMeta": { + "definition": "struct AIPageContentMeta { string name; string content;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=327" + }, + "blink.mojom.AIPageContentFrameData": { + "definition": "struct AIPageContentFrameData { AIPageContentFrameInteractionInfo frame_interaction_info; array meta_data; string? title; bool? contains_paid_content; array script_tools; AIPageContentPopup? popup;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=333" + }, + "blink.mojom.RedactedFrameMetadata": { + "definition": "struct RedactedFrameMetadata { Reason reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=357" + }, + "blink.mojom.AIPageContentIframeData": { + "definition": "struct AIPageContentIframeData { blink.mojom.FrameToken frame_token; AIPageContentIframeContent? content;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=377" + }, + "blink.mojom.AIPageContentTableData": { + "definition": "struct AIPageContentTableData { string? table_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=386" + }, + "blink.mojom.AIPageContentTableRowData": { + "definition": "struct AIPageContentTableRowData { AIPageContentTableRowType row_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=397" + }, + "blink.mojom.AIPageContentFormData": { + "definition": "struct AIPageContentFormData { string? form_name; url.mojom.Url? action_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=401" + }, + "blink.mojom.AIPageContentSelectOption": { + "definition": "struct AIPageContentSelectOption { string? value; string? text; bool is_selected; bool disabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=418" + }, + "blink.mojom.AIPageContentFormControlData": { + "definition": "struct AIPageContentFormControlData { FormControlType form_control_type; string? field_name; string? field_value; array select_options; string? placeholder; bool is_checked; bool is_required; AIPageContentRedactionDecision redaction_decision;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=431" + }, + "blink.mojom.AIPageContentAttributes": { + "definition": "struct AIPageContentAttributes { int32? dom_node_id; AIPageContentAttributeType attribute_type; AIPageContentGeometry? geometry; AIPageContentNodeInteractionInfo? node_interaction_info; AIPageContentTextInfo? text_info; AIPageContentImageInfo? image_info; AIPageContentSVGData? svg_data; AIPageContentCanvasData? canvas_data; AIPageContentVideoData? video_data; AIPageContentAnchorData? anchor_data; AIPageContentFormData? form_data; AIPageContentFormControlData? form_control_data; AIPageContentTableData? table_data; AIPageContentIframeData? iframe_data; AIPageContentTableRowData? table_row_data; array annotated_roles; string? label; ax.mojom.Role? aria_role; int32? label_for_dom_node_id; bool is_ad_related;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=457" + }, + "blink.mojom.AIPageContentNode": { + "definition": "struct AIPageContentNode { array children_nodes; AIPageContentAttributes content_attributes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=524" + }, + "blink.mojom.AIPageContentPopup": { + "definition": "struct AIPageContentPopup { AIPageContentNode root_node; int32 opener_dom_node_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=531" + }, + "blink.mojom.AIPageContent": { + "definition": "struct AIPageContent { AIPageContentNode root_node; AIPageContentPageInteractionInfo? page_interaction_info; AIPageContentFrameData frame_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=540" + }, + "blink.mojom.AIPageContentOptions": { + "definition": "struct AIPageContentOptions { AIPageContentMode mode; bool on_critical_path = false; int32 max_meta_elements = 0; bool include_same_site_only = false; gfx.mojom.Rect main_frame_view_rect_in_dips;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=567" + }, + "blink.mojom.AIPageContentAttributeType": { + "definition": "enum AIPageContentAttributeType { kRoot, kIframe, kContainer, kText, kAnchor, kParagraph, kHeading, kImage, kSVG, kCanvas, kVideo, kForm, kFormControl, kTable, kTableRow, kTableCell, kOrderedList, kUnorderedList, kListItem,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=23" + }, + "blink.mojom.AIPageContentAnnotatedRole": { + "definition": "enum AIPageContentAnnotatedRole { kHeader, kNav, kSearch, kMain, kArticle, kSection, kAside, kFooter, kContentHidden, kPaidContent,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=51" + }, + "blink.mojom.AIPageContentClickabilityReason": { + "definition": "enum AIPageContentClickabilityReason { kClickableControl, kClickEvents, kMouseEvents, kMouseClick, kMouseHover, kKeyEvents, kEditable, kCursorPointer, kAriaRole, kAriaHasPopup, kAriaExpandedTrue, kAriaExpandedFalse, kTabIndex, kAutocomplete, kHoverPseudoClass,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=143" + }, + "blink.mojom.AIPageContentTextSize": { + "definition": "enum AIPageContentTextSize { kXS, kS, kM, kL, kXL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=254" + }, + "blink.mojom.AIPageContentAnchorRel": { + "definition": "enum AIPageContentAnchorRel { kRelationUnknown, kRelationNoReferrer, kRelationNoOpener, kRelationOpener, kRelationPrivacyPolicy, kRelationTermsOfService,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=275" + }, + "blink.mojom.Reason": { + "definition": "enum Reason { kCrossSite, kCrossOrigin, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=358" + }, + "blink.mojom.AIPageContentTableRowType": { + "definition": "enum AIPageContentTableRowType { kHeader, kBody, kFooter,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=391" + }, + "blink.mojom.AIPageContentRedactionDecision": { + "definition": "enum AIPageContentRedactionDecision { kNoRedactionNecessary, kUnredacted_EmptyPassword, kRedacted_HasBeenPassword };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=425" + }, + "blink.mojom.AIPageContentMode": { + "definition": "enum AIPageContentMode { kDefault, kActionableElements,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=555" + }, + "blink.mojom.AIPageContentIframeContent": { + "definition": "union AIPageContentIframeContent { AIPageContentFrameData local_frame_data; RedactedFrameMetadata redacted_frame_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content.mojom;l=370" + }, + "blink.mojom.MetaTag": { + "definition": "struct MetaTag { string name; string content;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content_metadata.mojom;l=10" + }, + "blink.mojom.FrameMetadata": { + "definition": "struct FrameMetadata { url.mojom.Url url; array meta_tags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content_metadata.mojom;l=16" + }, + "blink.mojom.PageMetadata": { + "definition": "struct PageMetadata { array frame_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/ai_page_content_metadata.mojom;l=23" + }, + "blink.mojom.PaidContentMetadataObserver.OnPaidContentMetadataChanged": { + "definition": "OnPaidContentMetadataChanged(bool has_paid_content);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/frame_metadata_observer_registry.mojom;l=17" + }, + "blink.mojom.MetaTagsObserver.OnMetaTagsChanged": { + "definition": "OnMetaTagsChanged(array meta_tags);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/frame_metadata_observer_registry.mojom;l=24" + }, + "blink.mojom.FrameMetadataObserverRegistry.AddPaidContentMetadataObserver": { + "definition": "AddPaidContentMetadataObserver( pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/frame_metadata_observer_registry.mojom;l=32" + }, + "blink.mojom.FrameMetadataObserverRegistry.AddMetaTagsObserver": { + "definition": "AddMetaTagsObserver( array names, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/frame_metadata_observer_registry.mojom;l=36" + }, + "blink.mojom.InnerHtmlAgent.GetInnerHtml": { + "definition": "GetInnerHtml() => (string inner_html);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/inner_html.mojom;l=11" + }, + "blink.mojom.InnerTextAgent.GetInnerText": { + "definition": "GetInnerText(InnerTextParams params) => (InnerTextFrame frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/inner_text.mojom;l=64" + }, + "blink.mojom.InnerTextFrame": { + "definition": "struct InnerTextFrame { blink.mojom.LocalFrameToken token; array segments;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/inner_text.mojom;l=10" + }, + "blink.mojom.InnerTextParams": { + "definition": "struct InnerTextParams { int32? node_id; uint32? max_words_per_aggregate_passage; bool? greedily_aggregate_sibling_nodes; uint32 max_passages; uint32? min_words_per_passage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/inner_text.mojom;l=29" + }, + "blink.mojom.NodeLocationType": { + "definition": "enum NodeLocationType { kStart,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/inner_text.mojom;l=16" + }, + "blink.mojom.InnerTextSegment": { + "definition": "union InnerTextSegment { NodeLocationType node_location; string text; InnerTextFrame frame;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/inner_text.mojom;l=22" + }, + "blink.mojom.ScriptToolAnnotations": { + "definition": "struct ScriptToolAnnotations { bool read_only;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/script_tools.mojom;l=9" + }, + "blink.mojom.ScriptTool": { + "definition": "struct ScriptTool { string name; string description; string? input_schema; ScriptToolAnnotations? annotations;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_extraction/script_tools.mojom;l=15" + }, + "blink.mojom.ContentIndexService.GetIconSizes": { + "definition": "GetIconSizes(ContentCategory category) => (array icon_sizes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_index/content_index.mojom;l=74" + }, + "blink.mojom.ContentIndexService.Add": { + "definition": "Add(int64 service_worker_registration_id, ContentDescription description, array icon, url.mojom.Url launchUrl) => (ContentIndexError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_index/content_index.mojom;l=75" + }, + "blink.mojom.ContentIndexService.Delete": { + "definition": "Delete(int64 service_worker_registration_id, string id) => (ContentIndexError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_index/content_index.mojom;l=81" + }, + "blink.mojom.ContentIndexService.GetDescriptions": { + "definition": "GetDescriptions(int64 service_worker_registration_id) => (ContentIndexError error, array descriptions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_index/content_index.mojom;l=83" + }, + "blink.mojom.ContentIconDefinition": { + "definition": "struct ContentIconDefinition { string src; string? sizes; string? type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_index/content_index.mojom;l=49" + }, + "blink.mojom.ContentDescription": { + "definition": "struct ContentDescription { string id; string title; string description; ContentCategory category; array icons; string launch_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_index/content_index.mojom;l=55" + }, + "blink.mojom.ContentIndexError": { + "definition": "enum ContentIndexError { NONE, INVALID_PARAMETER, STORAGE_ERROR, NO_SERVICE_WORKER,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_index/content_index.mojom;l=14" + }, + "blink.mojom.ContentCategory": { + "definition": "enum ContentCategory { NONE = 0, HOME_PAGE, ARTICLE, VIDEO, AUDIO,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/content_index/content_index.mojom;l=28" + }, + "blink.mojom.ContextMenuClient.CustomContextMenuAction": { + "definition": "CustomContextMenuAction(uint32 action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=238" + }, + "blink.mojom.ContextMenuClient.ContextMenuClosed": { + "definition": "ContextMenuClosed(url.mojom.Url link_followed, Impression? impression);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=243" + }, + "blink.mojom.Accelerator": { + "definition": "struct Accelerator { uint16 key_code; int32 modifiers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=50" + }, + "blink.mojom.FormRendererId": { + "definition": "struct FormRendererId { uint64 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=58" + }, + "blink.mojom.FieldRendererId": { + "definition": "struct FieldRendererId { uint64 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=65" + }, + "blink.mojom.CustomContextMenuItem": { + "definition": "struct CustomContextMenuItem { mojo_base.mojom.String16 label; Accelerator? accelerator; mojo_base.mojom.String16 icon; mojo_base.mojom.String16 tool_tip; CustomContextMenuItemType type; int32 action; mojo_base.mojom.String16 feature_name; bool is_experimental_feature; bool rtl; bool has_directional_override; bool enabled; bool checked; bool force_show_accelerator_for_item; array submenu;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=73" + }, + "blink.mojom.UntrustworthyContextMenuParams": { + "definition": "struct UntrustworthyContextMenuParams { ContextMenuDataMediaType media_type; int32 x; int32 y; url.mojom.Url link_url; mojo_base.mojom.String16 link_text; Impression? impression; url.mojom.Url unfiltered_link_url; url.mojom.Url src_url; bool has_image_contents; bool is_image_media_plugin_document; int32 media_flags; mojo_base.mojom.String16 selection_text; mojo_base.mojom.String16 title_text; mojo_base.mojom.String16 alt_text; mojo_base.mojom.String16 suggested_filename; mojo_base.mojom.String16 misspelled_word; array dictionary_suggestions; bool spellcheck_enabled; bool is_editable; int32 writing_direction_default; int32 writing_direction_left_to_right; int32 writing_direction_right_to_left; int32 edit_flags; string frame_charset; network.mojom.ReferrerPolicy referrer_policy; url.mojom.Url link_followed; array custom_items; ui.mojom.MenuSourceType source_type; gfx.mojom.Rect selection_rect; int32 selection_start_offset; AnnotationType? annotation_type; bool opened_from_interest_for; int32 interest_for_node_id; FormControlType? form_control_type; bool is_content_editable_for_autofill; FieldRendererId field_renderer_id; FormRendererId form_renderer_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=93" + }, + "blink.mojom.ContextMenuDataMediaType": { + "definition": "enum ContextMenuDataMediaType { kNone, kImage, kVideo, kAudio, kCanvas, kFile, kPlugin,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=18" + }, + "blink.mojom.CustomContextMenuItemType": { + "definition": "enum CustomContextMenuItemType { kOption, kCheckableOption, kGroup, kSeparator, kSubMenu,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/context_menu/context_menu.mojom;l=41" + }, + "blink.mojom.AttributionHost.RegisterDataHost": { + "definition": "RegisterDataHost(pending_receiver data_host, attribution_reporting.mojom.RegistrationEligibility registration_eligibility, bool is_for_background_requests, array reporting_origins );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/conversions/conversions.mojom;l=34" + }, + "blink.mojom.AttributionHost.RegisterNavigationDataHost": { + "definition": "RegisterNavigationDataHost(pending_receiver data_host, AttributionSrcToken attribution_src_token );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/conversions/conversions.mojom;l=46" + }, + "blink.mojom.AttributionHost.NotifyNavigationWithBackgroundRegistrationsWillStart": { + "definition": "NotifyNavigationWithBackgroundRegistrationsWillStart( AttributionSrcToken attribution_src_token, uint32 expected_registrations );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/conversions/conversions.mojom;l=54" + }, + "blink.mojom.Impression": { + "definition": "struct Impression { AttributionSrcToken attribution_src_token; bool is_empty_attribution_src_tag;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/conversions/conversions.mojom;l=14" + }, + "blink.mojom.CookieStore.AddSubscriptions": { + "definition": "AddSubscriptions( int64 service_worker_registration_id, array subscription) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cookie_store/cookie_store.mojom;l=29" + }, + "blink.mojom.CookieStore.RemoveSubscriptions": { + "definition": "RemoveSubscriptions( int64 service_worker_registration_id, array subscription) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cookie_store/cookie_store.mojom;l=37" + }, + "blink.mojom.CookieStore.GetSubscriptions": { + "definition": "GetSubscriptions(int64 service_worker_registration_id) => (array subscriptions, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cookie_store/cookie_store.mojom;l=42" + }, + "blink.mojom.CookieChangeSubscription": { + "definition": "struct CookieChangeSubscription { url.mojom.Url url; network.mojom.CookieMatchType match_type; string name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/cookie_store/cookie_store.mojom;l=10" + }, + "blink.mojom.CrashMemoryMetricsReporter.SetSharedMemory": { + "definition": "SetSharedMemory(mojo_base.mojom.UnsafeSharedMemoryRegion shared_metrics_buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/crash/crash_memory_metrics_reporter.mojom;l=15" + }, + "blink.mojom.CredentialManager.Store": { + "definition": "Store(CredentialInfo credential) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom;l=42" + }, + "blink.mojom.CredentialManager.PreventSilentAccess": { + "definition": "PreventSilentAccess() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom;l=45" + }, + "blink.mojom.CredentialManager.Get": { + "definition": "Get(CredentialMediationRequirement mediation, bool include_passwords, array federations) => (CredentialManagerError error, CredentialInfo? credential);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom;l=50" + }, + "blink.mojom.CredentialInfo": { + "definition": "struct CredentialInfo { CredentialType type; mojo_base.mojom.String16? id; mojo_base.mojom.String16? name; url.mojom.Url icon; mojo_base.mojom.String16? password; url.mojom.SchemeHostPort federation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom;l=31" + }, + "blink.mojom.CredentialType": { + "definition": "enum CredentialType { EMPTY, PASSWORD, FEDERATED};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom;l=11" + }, + "blink.mojom.CredentialMediationRequirement": { + "definition": "enum CredentialMediationRequirement { kSilent, kOptional, kRequired, kConditional,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom;l=17" + }, + "blink.mojom.CredentialManagerError": { + "definition": "enum CredentialManagerError { SUCCESS, PENDING_REQUEST, PASSWORD_STORE_UNAVAILABLE, UNKNOWN};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/credentialmanagement/credential_manager.mojom;l=24" + }, + "blink.mojom.CredentialTypeFlags": { + "definition": "enum CredentialTypeFlags { kNone = 0, kPassword = 1, kPublicKey = 2, kAll = -1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/credentialmanagement/credential_type_flags.mojom;l=9" + }, + "blink.mojom.PreferredColorScheme": { + "definition": "enum PreferredColorScheme { kDark, kLight,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/css/preferred_color_scheme.mojom;l=7" + }, + "blink.mojom.PreferredContrast": { + "definition": "enum PreferredContrast { kMore, kLess, kNoPreference, kCustom,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/css/preferred_contrast.mojom;l=8" + }, + "blink.mojom.DataTransferFile": { + "definition": "struct DataTransferFile { mojo_base.mojom.FilePath path; mojo_base.mojom.FilePath display_name; pending_remote? file_system_access_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/data_transfer/data_transfer.mojom;l=11" + }, + "blink.mojom.ManagedConfigurationObserver.OnConfigurationChanged": { + "definition": "OnConfigurationChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=11" + }, + "blink.mojom.DeviceAPIService.GetDirectoryId": { + "definition": "GetDirectoryId() => (DeviceAttributeResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=24" + }, + "blink.mojom.DeviceAPIService.GetHostname": { + "definition": "GetHostname() => (DeviceAttributeResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=29" + }, + "blink.mojom.DeviceAPIService.GetSerialNumber": { + "definition": "GetSerialNumber() => (DeviceAttributeResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=35" + }, + "blink.mojom.DeviceAPIService.GetAnnotatedAssetId": { + "definition": "GetAnnotatedAssetId() => (DeviceAttributeResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=40" + }, + "blink.mojom.DeviceAPIService.GetAnnotatedLocation": { + "definition": "GetAnnotatedLocation() => (DeviceAttributeResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=45" + }, + "blink.mojom.ManagedConfigurationService.GetManagedConfiguration": { + "definition": "GetManagedConfiguration(array keys) => (map? configurations);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=57" + }, + "blink.mojom.ManagedConfigurationService.SubscribeToManagedConfiguration": { + "definition": "SubscribeToManagedConfiguration( pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=60" + }, + "blink.mojom.DeviceAttributeResult": { + "definition": "union DeviceAttributeResult { string error_message; string? attribute;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device/device.mojom;l=65" + }, + "blink.mojom.DevicePostureProvider.AddListenerAndGetCurrentPosture": { + "definition": "AddListenerAndGetCurrentPosture( pending_remote client) => (DevicePostureType posture);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device_posture/device_posture_provider.mojom;l=20" + }, + "blink.mojom.DevicePostureProvider.OverrideDevicePostureForEmulation": { + "definition": "OverrideDevicePostureForEmulation(DevicePostureType posture);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device_posture/device_posture_provider.mojom;l=25" + }, + "blink.mojom.DevicePostureProvider.DisableDevicePostureOverrideForEmulation": { + "definition": "DisableDevicePostureOverrideForEmulation();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device_posture/device_posture_provider.mojom;l=27" + }, + "blink.mojom.DevicePostureClient.OnPostureChanged": { + "definition": "OnPostureChanged(DevicePostureType posture);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device_posture/device_posture_provider.mojom;l=34" + }, + "blink.mojom.DevicePostureType": { + "definition": "enum DevicePostureType { kContinuous, kFolded,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/device_posture/device_posture_provider.mojom;l=9" + }, + "blink.mojom.ConsoleMessageLevel": { + "definition": "enum ConsoleMessageLevel { kVerbose, kInfo, kWarning, kError};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/console_message.mojom;l=7" + }, + "blink.mojom.ConsoleMessageSource": { + "definition": "enum ConsoleMessageSource { kXml, kJavaScript, kNetwork, kConsoleApi, kStorage, kRendering, kSecurity, kOther, kDeprecation, kWorker, kViolation, kIntervention, kRecommendation};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/console_message.mojom;l=14" + }, + "blink.mojom.ConsoleMessageCategory": { + "definition": "enum ConsoleMessageCategory { Cors,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/console_message.mojom;l=30" + }, + "blink.mojom.DevToolsAgent.AttachDevToolsSession": { + "definition": "AttachDevToolsSession(pending_associated_remote host, pending_associated_receiver session, pending_receiver io_session, DevToolsSessionState? reattach_session_state, string script_to_evaluate_on_load, bool client_expects_binary_responses, bool client_is_trusted, string session_id, bool session_waits_for_debugger);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=98" + }, + "blink.mojom.DevToolsAgent.InspectElement": { + "definition": "InspectElement(gfx.mojom.Point point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=114" + }, + "blink.mojom.DevToolsAgent.ReportChildTargets": { + "definition": "ReportChildTargets(bool report, bool wait_for_debugger) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=120" + }, + "blink.mojom.DevToolsAgentHost.ChildTargetCreated": { + "definition": "ChildTargetCreated( pending_remote worker_devtools_agent, pending_receiver worker_devtools_agent_host, url.mojom.Url url, string name, mojo_base.mojom.UnguessableToken devtools_worker_token, bool waiting_for_debugger, DevToolsExecutionContextType context_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=132" + }, + "blink.mojom.DevToolsAgentHost.MainThreadDebuggerPaused": { + "definition": "MainThreadDebuggerPaused();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=145" + }, + "blink.mojom.DevToolsAgentHost.MainThreadDebuggerResumed": { + "definition": "MainThreadDebuggerResumed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=151" + }, + "blink.mojom.DevToolsAgentHost.BringToForeground": { + "definition": "BringToForeground();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=154" + }, + "blink.mojom.DevToolsSession.DispatchProtocolCommand": { + "definition": "DispatchProtocolCommand(int32 call_id, string method, mojo_base.mojom.ReadOnlyBuffer message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=168" + }, + "blink.mojom.DevToolsSession.UnpauseAndTerminate": { + "definition": "UnpauseAndTerminate();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=173" + }, + "blink.mojom.DevToolsSessionHost.DispatchProtocolResponse": { + "definition": "[UnlimitedSize] DispatchProtocolResponse(DevToolsMessage message, int32 call_id, DevToolsSessionState? updates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=188" + }, + "blink.mojom.DevToolsSessionHost.DispatchProtocolNotification": { + "definition": "[UnlimitedSize] DispatchProtocolNotification(DevToolsMessage message, DevToolsSessionState? updates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=194" + }, + "blink.mojom.DevToolsMessage": { + "definition": "struct DevToolsMessage { mojo_base.mojom.BigBuffer data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=13" + }, + "blink.mojom.DevToolsSessionState": { + "definition": "struct DevToolsSessionState { map?> entries;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=205" + }, + "blink.mojom.DevToolsExecutionContextType": { + "definition": "enum DevToolsExecutionContextType { kDedicatedWorker, kWorklet,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_agent.mojom;l=17" + }, + "blink.mojom.DevToolsFrontend.SetupDevToolsFrontend": { + "definition": "SetupDevToolsFrontend(string api_script, pending_associated_remote host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_frontend.mojom;l=22" + }, + "blink.mojom.DevToolsFrontend.SetupDevToolsExtensionAPI": { + "definition": "SetupDevToolsExtensionAPI(string extension_api);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_frontend.mojom;l=29" + }, + "blink.mojom.DevToolsFrontendHost.DispatchEmbedderMessage": { + "definition": "DispatchEmbedderMessage(mojo_base.mojom.DictionaryValue message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/devtools_frontend.mojom;l=35" + }, + "blink.mojom.AffectedCookie": { + "definition": "struct AffectedCookie { string name; string path; string domain;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=35" + }, + "blink.mojom.AffectedRequest": { + "definition": "struct AffectedRequest { string? request_id; string url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=41" + }, + "blink.mojom.AffectedFrame": { + "definition": "struct AffectedFrame { string frame_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=46" + }, + "blink.mojom.AffectedLocation": { + "definition": "struct AffectedLocation { string? script_id; string? url; uint32 line = 0; uint32 column = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=50" + }, + "blink.mojom.BlockedByResponseIssueDetails": { + "definition": "struct BlockedByResponseIssueDetails { AffectedRequest request; AffectedFrame? parentFrame; AffectedFrame? blockedFrame; network.mojom.BlockedByResponseReason reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=57" + }, + "blink.mojom.HeavyAdIssueDetails": { + "definition": "struct HeavyAdIssueDetails { HeavyAdResolutionStatus resolution; HeavyAdReason reason; AffectedFrame frame;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=75" + }, + "blink.mojom.AttributionReportingIssueDetails": { + "definition": "struct AttributionReportingIssueDetails { AttributionReportingIssueType violation_type; AffectedRequest? request; string? invalid_parameter;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=105" + }, + "blink.mojom.MixedContentIssueDetails": { + "definition": "struct MixedContentIssueDetails { RequestContextType request_context; MixedContentResolutionStatus resolution_status; string insecure_url; string main_resource_url; AffectedRequest? request; AffectedFrame? frame;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=117" + }, + "blink.mojom.ContentSecurityPolicyIssueDetails": { + "definition": "struct ContentSecurityPolicyIssueDetails { url.mojom.Url? blocked_url; string violated_directive; bool is_report_only; ContentSecurityPolicyViolationType content_security_policy_violation_type; AffectedFrame? frame_ancestor; AffectedLocation? affected_location; int32 violating_node_id = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=136" + }, + "blink.mojom.CookieIssueDetails": { + "definition": "struct CookieIssueDetails { AffectedCookie cookie; array exclusion_reason; array warning_reason; CookieOperation operation; url.mojom.Url? site_for_cookies; url.mojom.Url? cookie_url; AffectedRequest? request;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=182" + }, + "blink.mojom.SharedArrayBufferIssueDetails": { + "definition": "struct SharedArrayBufferIssueDetails { AffectedLocation? affected_location; bool is_warning; SharedArrayBufferIssueType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=197" + }, + "blink.mojom.LowTextContrastIssue": { + "definition": "struct LowTextContrastIssue { int32 violating_node_id; string violating_node_selector; float contrast_ratio; float threshold_aa; float threshold_aaa; string font_size; string font_weight;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=203" + }, + "blink.mojom.FederatedAuthRequestIssueDetails": { + "definition": "struct FederatedAuthRequestIssueDetails { FederatedAuthRequestResult status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=266" + }, + "blink.mojom.FederatedAuthUserInfoRequestIssueDetails": { + "definition": "struct FederatedAuthUserInfoRequestIssueDetails { FederatedAuthUserInfoRequestResult status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=294" + }, + "blink.mojom.BounceTrackingIssueDetails": { + "definition": "struct BounceTrackingIssueDetails { array tracking_sites;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=298" + }, + "blink.mojom.PartitioningBlobURLIssueDetails": { + "definition": "struct PartitioningBlobURLIssueDetails { url.mojom.Url url; PartitioningBlobURLInfo partitioning_blob_url_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=307" + }, + "blink.mojom.CookieDeprecationMetadataIssueDetails": { + "definition": "struct CookieDeprecationMetadataIssueDetails { array allowed_sites; uint32 opt_out_percentage; bool is_opt_out_top_level; CookieOperation operation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=312" + }, + "blink.mojom.GenericIssueDetails": { + "definition": "struct GenericIssueDetails { GenericIssueErrorType error_type; string? frame_id; int32 violating_node_id = 0; string? violating_node_attribute;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=333" + }, + "blink.mojom.DeprecationIssueDetails": { + "definition": "struct DeprecationIssueDetails { DeprecationIssueType type; AffectedLocation affected_location;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=345" + }, + "blink.mojom.UserReidentificationIssueDetails": { + "definition": "struct UserReidentificationIssueDetails { UserReidentificationIssueType type; AffectedRequest? request; AffectedLocation? sourceCodeLocation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=360" + }, + "blink.mojom.InspectorIssueDetails": { + "definition": "struct InspectorIssueDetails { CookieIssueDetails? cookie_issue_details; MixedContentIssueDetails? mixed_content_issue_details; BlockedByResponseIssueDetails? blocked_by_response_issue_details; ContentSecurityPolicyIssueDetails? csp_issue_details; SharedArrayBufferIssueDetails? sab_issue_details; HeavyAdIssueDetails? heavy_ad_issue_details; AttributionReportingIssueDetails? attribution_reporting_issue_details; LowTextContrastIssue? low_text_contrast_details; FederatedAuthRequestIssueDetails? federated_auth_request_details; BounceTrackingIssueDetails? bounce_tracking_issue_details; PartitioningBlobURLIssueDetails? partitioning_blob_url_issue_details; CookieDeprecationMetadataIssueDetails? cookie_deprecation_metadata_issue_details; GenericIssueDetails? generic_issue_details; DeprecationIssueDetails? deprecation_issue_details; FederatedAuthUserInfoRequestIssueDetails? federated_auth_user_info_request_details; UserReidentificationIssueDetails? user_reidentification_issue_details; mojo_base.mojom.UnguessableToken? issue_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=368" + }, + "blink.mojom.InspectorIssueInfo": { + "definition": "struct InspectorIssueInfo { InspectorIssueCode code; InspectorIssueDetails details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=390" + }, + "blink.mojom.InspectorIssueCode": { + "definition": "enum InspectorIssueCode { kCookieIssue, kMixedContentIssue, kBlockedByResponseIssue, kContentSecurityPolicyIssue, kSharedArrayBufferIssue, kHeavyAdIssue, kAttributionReportingIssue, kLowTextContrastIssue, kFederatedAuthRequestIssue, kBounceTrackingIssue, kCookieDeprecationMetadataIssue, kGenericIssue, kDeprecationIssue, kFederatedAuthUserInfoRequestIssue, kPartitioningBlobURLIssue, kUserReidentificationIssue,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=15" + }, + "blink.mojom.HeavyAdResolutionStatus": { + "definition": "enum HeavyAdResolutionStatus { kHeavyAdBlocked, kHeavyAdWarning,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=64" + }, + "blink.mojom.HeavyAdReason": { + "definition": "enum HeavyAdReason { kNetworkTotalLimit, kCpuTotalLimit, kCpuPeakLimit,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=69" + }, + "blink.mojom.AttributionReportingIssueType": { + "definition": "enum AttributionReportingIssueType { kPermissionPolicyDisabled, kUntrustworthyReportingOrigin, kInsecureContext, kInvalidRegisterSourceHeader, kInvalidRegisterTriggerHeader, kSourceAndTriggerHeaders, kSourceIgnored, kTriggerIgnored, kOsSourceIgnored, kOsTriggerIgnored, kInvalidRegisterOsSourceHeader, kInvalidRegisterOsTriggerHeader, kWebAndOsHeaders, kNoWebOrOsSupport, kNavigationRegistrationWithoutTransientUserActivation, kInvalidInfoHeader, kNoRegisterSourceHeader, kNoRegisterTriggerHeader, kNoRegisterOsSourceHeader, kNoRegisterOsTriggerHeader, kNavigationRegistrationUniqueScopeAlreadySet,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=81" + }, + "blink.mojom.MixedContentResolutionStatus": { + "definition": "enum MixedContentResolutionStatus { kMixedContentBlocked, kMixedContentAutomaticallyUpgraded, kMixedContentWarning,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=111" + }, + "blink.mojom.ContentSecurityPolicyViolationType": { + "definition": "enum ContentSecurityPolicyViolationType { kInlineViolation, kEvalViolation, kURLViolation, kSRIViolation, kTrustedTypesSinkViolation, kTrustedTypesPolicyViolation, kWasmEvalViolation,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=126" + }, + "blink.mojom.CookieOperation": { + "definition": "enum CookieOperation { kSetCookie, kReadCookie,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=147" + }, + "blink.mojom.CookieExclusionReason": { + "definition": "enum CookieExclusionReason { kExcludeSameSiteUnspecifiedTreatedAsLax, kExcludeSameSiteNoneInsecure, kExcludeSameSiteLax, kExcludeSameSiteStrict, kExcludeDomainNonASCII, kExcludeThirdPartyPhaseout, kExcludePortMismatch, kExcludeSchemeMismatch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=154" + }, + "blink.mojom.CookieWarningReason": { + "definition": "enum CookieWarningReason { kWarnSameSiteUnspecifiedCrossSiteContext, kWarnSameSiteNoneInsecure, kWarnSameSiteUnspecifiedLaxAllowUnsafe, kWarnSameSiteStrictLaxDowngradeStrict, kWarnSameSiteStrictCrossDowngradeStrict, kWarnSameSiteStrictCrossDowngradeLax, kWarnSameSiteLaxCrossDowngradeStrict, kWarnSameSiteLaxCrossDowngradeLax, kWarnAttributeValueExceedsMaxSize, kWarnDomainNonASCII, kWarnThirdPartyPhaseout, kWarnCrossSiteRedirectDowngradeChangesInclusion,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=166" + }, + "blink.mojom.SharedArrayBufferIssueType": { + "definition": "enum SharedArrayBufferIssueType { kTransferIssue, kCreationIssue,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=192" + }, + "blink.mojom.FederatedAuthRequestResult": { + "definition": "enum FederatedAuthRequestResult { kSuccess, kShouldEmbargo, kIdpNotPotentiallyTrustworthy, kDisabledInSettings, kDisabledInFlags, kTooManyRequests, kWellKnownHttpNotFound, kWellKnownNoResponse, kWellKnownInvalidResponse, kWellKnownListEmpty, kWellKnownInvalidContentType, kConfigNotInWellKnown, kWellKnownTooBig, kConfigHttpNotFound, kConfigNoResponse, kConfigInvalidResponse, kConfigInvalidContentType, kClientMetadataHttpNotFound, kClientMetadataNoResponse, kClientMetadataInvalidResponse, kClientMetadataInvalidContentType, kAccountsHttpNotFound, kAccountsNoResponse, kAccountsInvalidResponse, kAccountsListEmpty, kAccountsInvalidContentType, kIdTokenHttpNotFound, kIdTokenNoResponse, kIdTokenInvalidResponse, kIdTokenIdpErrorResponse, kIdTokenCrossSiteIdpErrorResponse, kIdTokenInvalidContentType, kCanceled, kRpPageNotVisible, kSilentMediationFailure, kThirdPartyCookiesBlocked, kNotSignedInWithIdp, kMissingTransientUserActivation, kReplacedByActiveMode, kInvalidFieldsSpecified, kRelyingPartyOriginIsOpaque, kTypeNotMatching, kError, kUiDismissedNoEmbargo, kCorsError, kSuppressedBySegmentationPlatform,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=217" + }, + "blink.mojom.FederatedAuthUserInfoRequestResult": { + "definition": "enum FederatedAuthUserInfoRequestResult { kSuccess = 0, kNotSameOrigin = 1, kNotIframe = 2, kNotPotentiallyTrustworthy = 3, kNoApiPermission = 4, kNotSignedInWithIdp = 5, kNoAccountSharingPermission = 6, kInvalidConfigOrWellKnown = 7, kInvalidAccountsResponse = 8, kNoReturningUserFromFetchedAccounts = 9, kUnhandledRequest = 10,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=278" + }, + "blink.mojom.PartitioningBlobURLInfo": { + "definition": "enum PartitioningBlobURLInfo { kBlockedCrossPartitionFetching, kEnforceNoopenerForNavigation,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=302" + }, + "blink.mojom.GenericIssueErrorType": { + "definition": "enum GenericIssueErrorType { kFormLabelForNameError, kFormDuplicateIdForInputError, kFormInputWithNoLabelError, kFormAutocompleteAttributeEmptyError, kFormEmptyIdAndNameAttributesForInputError, kFormAriaLabelledByToNonExistingId, kFormInputAssignedAutocompleteValueToIdOrNameAttributeError, kFormLabelHasNeitherForNorNestedInput, kFormLabelForMatchesNonExistingIdError, kFormInputHasWrongButWellIntendedAutocompleteValueError, kResponseWasBlockedByORB,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=319" + }, + "blink.mojom.DeprecationIssueType": { + "definition": "enum DeprecationIssueType { kPrivacySandboxExtensionsAPI,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=341" + }, + "blink.mojom.UserReidentificationIssueType": { + "definition": "enum UserReidentificationIssueType { kBlockedFrameNavigation, kBlockedSubresource, kNoisedCanvasReadback,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/devtools/inspector_issue.mojom;l=350" + }, + "payments.mojom.DigitalGoods.GetDetails": { + "definition": "GetDetails(array item_ids) => (BillingResponseCode code, array item_details_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/digital_goods/digital_goods.mojom;l=14" + }, + "payments.mojom.DigitalGoods.ListPurchases": { + "definition": "ListPurchases() => (BillingResponseCode code, array purchase_reference_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/digital_goods/digital_goods.mojom;l=19" + }, + "payments.mojom.DigitalGoods.ListPurchaseHistory": { + "definition": "ListPurchaseHistory() => (BillingResponseCode code, array purchase_reference_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/digital_goods/digital_goods.mojom;l=26" + }, + "payments.mojom.DigitalGoods.Consume": { + "definition": "Consume(string purchase_token) => (BillingResponseCode code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/digital_goods/digital_goods.mojom;l=32" + }, + "payments.mojom.DigitalGoodsFactory.CreateDigitalGoods": { + "definition": "CreateDigitalGoods(string payment_method) => (CreateDigitalGoodsResponseCode code, pending_remote? digital_goods);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/digital_goods/digital_goods.mojom;l=41" + }, + "blink.mojom.DirectSocketsService.OpenTCPSocket": { + "definition": "OpenTCPSocket( DirectTCPSocketOptions options, pending_receiver receiver, pending_remote? observer) => (int32 result, network.mojom.IPEndPoint? local_addr, network.mojom.IPEndPoint? peer_addr, handle? receive_stream, handle? send_stream);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom;l=123" + }, + "blink.mojom.DirectSocketsService.OpenConnectedUDPSocket": { + "definition": "OpenConnectedUDPSocket( DirectConnectedUDPSocketOptions options, pending_receiver receiver, pending_remote? listener) => (int32 result, network.mojom.IPEndPoint? local_addr, network.mojom.IPEndPoint? peer_addr);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom;l=141" + }, + "blink.mojom.DirectSocketsService.OpenBoundUDPSocket": { + "definition": "OpenBoundUDPSocket( DirectBoundUDPSocketOptions options, pending_receiver receiver, pending_remote? listener) => (int32 result, network.mojom.IPEndPoint? local_addr);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom;l=156" + }, + "blink.mojom.DirectSocketsService.OpenTCPServerSocket": { + "definition": "OpenTCPServerSocket( DirectTCPServerSocketOptions options, pending_receiver receiver) => (int32 result, network.mojom.IPEndPoint? local_addr);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom;l=169" + }, + "blink.mojom.DirectTCPSocketOptions": { + "definition": "struct DirectTCPSocketOptions { network.mojom.HostPortPair remote_addr; int32? send_buffer_size; int32? receive_buffer_size; bool no_delay = false; network.mojom.TCPKeepAliveOptions? keep_alive_options; network.mojom.DnsQueryType? dns_query_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom;l=19" + }, + "blink.mojom.DirectConnectedUDPSocketOptions": { + "definition": "struct DirectConnectedUDPSocketOptions { network.mojom.HostPortPair remote_addr; int32? send_buffer_size; int32? receive_buffer_size; network.mojom.DnsQueryType? dns_query_type; uint8? multicast_time_to_live; bool? multicast_loopback;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom;l=39" + }, + "blink.mojom.DirectBoundUDPSocketOptions": { + "definition": "struct DirectBoundUDPSocketOptions { network.mojom.IPEndPoint local_addr; int32? send_buffer_size; int32? receive_buffer_size; bool? ipv6_only; bool? multicast_allow_address_sharing; uint8? multicast_time_to_live; bool? multicast_loopback;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom;l=64" + }, + "blink.mojom.DirectTCPServerSocketOptions": { + "definition": "struct DirectTCPServerSocketOptions { network.mojom.IPEndPoint local_addr; bool? ipv6_only; uint32? backlog;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom;l=98" + }, + "blink.mojom.DiskAllocator.ProvideTemporaryFile": { + "definition": "ProvideTemporaryFile(mojo_base.mojom.File file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/disk_allocator.mojom;l=20" + }, + "blink.mojom.DocumentMetadata.GetEntities": { + "definition": "GetEntities() => (WebPage? page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/document_metadata/document_metadata.mojom;l=18" + }, + "blink.mojom.WebPage": { + "definition": "struct WebPage { url.mojom.Url url; string title; array entities;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/document_metadata/document_metadata.mojom;l=10" + }, + "blink.mojom.DomStorageProvider.BindDomStorage": { + "definition": "BindDomStorage(pending_receiver receiver, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/dom_storage.mojom;l=18" + }, + "blink.mojom.DomStorage.OpenLocalStorage": { + "definition": "OpenLocalStorage(blink.mojom.StorageKey storage_key, blink.mojom.LocalFrameToken local_frame_token, pending_receiver area);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/dom_storage.mojom;l=31" + }, + "blink.mojom.DomStorage.BindSessionStorageNamespace": { + "definition": "BindSessionStorageNamespace( string namespace_id, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/dom_storage.mojom;l=37" + }, + "blink.mojom.DomStorage.BindSessionStorageArea": { + "definition": "BindSessionStorageArea(blink.mojom.StorageKey storage_key, blink.mojom.LocalFrameToken local_frame_token, string namespace_id, pending_receiver session_namespace);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/dom_storage.mojom;l=46" + }, + "blink.mojom.DomStorageClient.ResetSessionStorageConnections": { + "definition": "ResetSessionStorageConnections();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/dom_storage.mojom;l=59" + }, + "blink.mojom.DomStorageClient.ResetLocalStorageConnections": { + "definition": "ResetLocalStorageConnections();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/dom_storage.mojom;l=62" + }, + "blink.mojom.SessionStorageNamespace.Clone": { + "definition": "Clone(string clone_to_namespace);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/session_storage_namespace.mojom;l=12" + }, + "blink.mojom.StorageAreaObserver.KeyChanged": { + "definition": "KeyChanged(array key, array new_value, array? old_value, string source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=18" + }, + "blink.mojom.StorageAreaObserver.KeyChangeFailed": { + "definition": "KeyChangeFailed(array key, string source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=24" + }, + "blink.mojom.StorageAreaObserver.KeyDeleted": { + "definition": "KeyDeleted(array key, array? old_value, string source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=28" + }, + "blink.mojom.StorageAreaObserver.AllDeleted": { + "definition": "AllDeleted(bool was_nonempty, string source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=33" + }, + "blink.mojom.StorageAreaObserver.ShouldSendOldValueOnMutations": { + "definition": "ShouldSendOldValueOnMutations(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=39" + }, + "blink.mojom.StorageArea.AddObserver": { + "definition": "AddObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=70" + }, + "blink.mojom.StorageArea.Put": { + "definition": "Put(array key, array value, array? client_old_value, string source) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=88" + }, + "blink.mojom.StorageArea.Delete": { + "definition": "Delete(array key, array? client_old_value, string source) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=110" + }, + "blink.mojom.StorageArea.DeleteAll": { + "definition": "DeleteAll(string source, pending_remote? new_observer) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=120" + }, + "blink.mojom.StorageArea.Get": { + "definition": "Get(array key) => (bool success, array value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=127" + }, + "blink.mojom.StorageArea.GetAll": { + "definition": "[Sync] GetAll(pending_remote? new_observer) => (array data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=132" + }, + "blink.mojom.KeyValue": { + "definition": "struct KeyValue { array key; array value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dom_storage/storage_area.mojom;l=42" + }, + "blink.mojom.AllowedDragOperations": { + "definition": "struct AllowedDragOperations { bool allow_copy; bool allow_link; bool allow_move;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/drag/drag.mojom;l=21" + }, + "blink.mojom.DragItemString": { + "definition": "struct DragItemString { string string_type; mojo_base.mojom.BigString16 string_data; mojo_base.mojom.String16? title; url.mojom.Url? base_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/drag/drag.mojom;l=29" + }, + "blink.mojom.DragItemBinary": { + "definition": "struct DragItemBinary { mojo_base.mojom.BigBuffer data; bool is_image_accessible; url.mojom.Url source_url; mojo_base.mojom.FilePath filename_extension; string? content_disposition;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/drag/drag.mojom;l=45" + }, + "blink.mojom.DragItemFileSystemFile": { + "definition": "struct DragItemFileSystemFile { url.mojom.Url url; int64 size; string? file_system_id; SerializedBlob? serialized_blob;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/drag/drag.mojom;l=58" + }, + "blink.mojom.DragData": { + "definition": "struct DragData { array items; string? file_system_id; bool force_default_action; network.mojom.ReferrerPolicy referrer_policy = network.mojom.ReferrerPolicy.kDefault;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/drag/drag.mojom;l=74" + }, + "blink.mojom.DragEventSourceInfo": { + "definition": "struct DragEventSourceInfo { gfx.mojom.Point location; ui.mojom.DragEventSource source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/drag/drag.mojom;l=99" + }, + "blink.mojom.DragItem": { + "definition": "union DragItem { DragItemString string; DataTransferFile file; DragItemBinary binary; DragItemFileSystemFile file_system_file;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/drag/drag.mojom;l=66" + }, + "blink.mojom.DWriteFontProxy.FindFamily": { + "definition": "[Sync] FindFamily(mojo_base.mojom.String16 family_name) => (uint32 out_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=34" + }, + "blink.mojom.DWriteFontProxy.GetFamilyCount": { + "definition": "[Sync] GetFamilyCount() => (uint32 out_count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=38" + }, + "blink.mojom.DWriteFontProxy.GetFamilyNames": { + "definition": "[Sync] GetFamilyNames(uint32 family_index) => (array out_family_names);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=43" + }, + "blink.mojom.DWriteFontProxy.GetFontFileHandles": { + "definition": "[Sync] GetFontFileHandles(uint32 family_index) => (array file_handles);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=50" + }, + "blink.mojom.DWriteFontProxy.MatchUniqueFont": { + "definition": "[Sync] MatchUniqueFont(mojo_base.mojom.String16 font_unique_name) => (mojo_base.mojom.ReadOnlyFile? file_handle, uint32 ttc_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=58" + }, + "blink.mojom.DWriteFontProxy.MapCharacters": { + "definition": "[Sync] MapCharacters(mojo_base.mojom.String16 text, DWriteFontStyle font_style, mojo_base.mojom.String16 locale_name, uint32 reading_direction, mojo_base.mojom.String16 base_family_name) => (MapCharactersResult out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=69" + }, + "blink.mojom.DWriteStringPair": { + "definition": "struct DWriteStringPair { mojo_base.mojom.String16 first; mojo_base.mojom.String16 second;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=12" + }, + "blink.mojom.DWriteFontStyle": { + "definition": "struct DWriteFontStyle { uint16 font_weight; uint8 font_slant; uint8 font_stretch;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=17" + }, + "blink.mojom.MapCharactersResult": { + "definition": "struct MapCharactersResult { uint32 family_index; mojo_base.mojom.String16 family_name; uint32 mapped_length; float scale; DWriteFontStyle font_style;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom;l=23" + }, + "payments.facilitated.mojom.PaymentLinkHandler.HandlePaymentLink": { + "definition": "HandlePaymentLink(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/facilitated_payments/payment_link_handler.mojom;l=24" + }, + "blink.mojom.FaviconURL": { + "definition": "struct FaviconURL { url.mojom.Url icon_url; FaviconIconType icon_type; array icon_sizes; bool is_default_icon;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/favicon/favicon_url.mojom;l=21" + }, + "blink.mojom.FaviconIconType": { + "definition": "enum FaviconIconType { kInvalid, kFavicon, kTouchIcon, kTouchPrecomposedIcon,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/favicon/favicon_url.mojom;l=13" + }, + "blink.mojom.FeatureObserver.Register": { + "definition": "Register(pending_receiver feature, ObservedFeatureType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/feature_observer/feature_observer.mojom;l=23" + }, + "blink.mojom.ObservedFeatureType": { + "definition": "enum ObservedFeatureType { kWebLock = 0, kBlockingIndexedDBLock,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/feature_observer/feature_observer.mojom;l=7" + }, + "blink.mojom.FencedFrameOwnerHost.Navigate": { + "definition": "Navigate(url.mojom.Url url, mojo_base.mojom.TimeTicks navigation_start_time, mojo_base.mojom.String16? embedder_shared_storage_context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame.mojom;l=23" + }, + "blink.mojom.FencedFrameOwnerHost.DidChangeFramePolicy": { + "definition": "DidChangeFramePolicy(blink.mojom.FramePolicy frame_policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame.mojom;l=29" + }, + "blink.mojom.AdAuctionData": { + "definition": "struct AdAuctionData { url.mojom.Origin interest_group_owner; string interest_group_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=74" + }, + "blink.mojom.URNConfigPair": { + "definition": "struct URNConfigPair { url.mojom.Url urn; FencedFrameConfig config;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=89" + }, + "blink.mojom.SharedStorageBudgetMetadata": { + "definition": "struct SharedStorageBudgetMetadata { network.mojom.SchemefulSite site; double budget_to_charge; bool top_navigated;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=99" + }, + "blink.mojom.ParentPermissionsInfo": { + "definition": "struct ParentPermissionsInfo { array parsed_permissions_policy; url.mojom.Origin origin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=114" + }, + "blink.mojom.FencedFrameConfig": { + "definition": "struct FencedFrameConfig { PotentiallyOpaqueURL? mapped_url; PotentiallyOpaqueSize? container_size; PotentiallyOpaqueSize? content_size; PotentiallyOpaqueBool? deprecated_should_freeze_initial_size; PotentiallyOpaqueAdAuctionData? ad_auction_data; PotentiallyOpaqueConfigVector? nested_configs; PotentiallyOpaqueSharedStorageBudgetMetadata? shared_storage_budget_metadata; url.mojom.Url urn_uuid; DeprecatedFencedFrameMode mode; array effective_enabled_permissions; ParentPermissionsInfo? parent_permissions_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=136" + }, + "blink.mojom.FencedFrameProperties": { + "definition": "struct FencedFrameProperties { PotentiallyOpaqueURL? mapped_url; PotentiallyOpaqueSize? container_size; PotentiallyOpaqueSize? content_size; PotentiallyOpaqueBool? deprecated_should_freeze_initial_size; PotentiallyOpaqueAdAuctionData? ad_auction_data; PotentiallyOpaqueURNConfigVector? nested_urn_config_pairs; PotentiallyOpaqueSharedStorageBudgetMetadata? shared_storage_budget_metadata; DeprecatedFencedFrameMode mode; array effective_enabled_permissions; ParentPermissionsInfo? parent_permissions_info; bool can_disable_untrusted_network; bool is_cross_origin_content; bool allow_cross_origin_event_reporting;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=199" + }, + "blink.mojom.ReportingDestination": { + "definition": "enum ReportingDestination { kBuyer, kSeller, kComponentSeller, kSharedStorageSelectUrl, kDirectSeller,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=17" + }, + "blink.mojom.DeprecatedFencedFrameMode": { + "definition": "enum DeprecatedFencedFrameMode { kDefault = 0, kOpaqueAds = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=32" + }, + "blink.mojom.Opaque": { + "definition": "enum Opaque { kOpaque};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=42" + }, + "blink.mojom.AutomaticBeaconType": { + "definition": "enum AutomaticBeaconType { kDeprecatedTopNavigation = 0, kTopNavigationStart = 1, kTopNavigationCommit = 2};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=53" + }, + "blink.mojom.PotentiallyOpaqueURL": { + "definition": "union PotentiallyOpaqueURL { url.mojom.Url transparent; Opaque opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=59" + }, + "blink.mojom.PotentiallyOpaqueSize": { + "definition": "union PotentiallyOpaqueSize { gfx.mojom.Size transparent; Opaque opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=64" + }, + "blink.mojom.PotentiallyOpaqueBool": { + "definition": "union PotentiallyOpaqueBool { bool transparent; Opaque opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=69" + }, + "blink.mojom.PotentiallyOpaqueAdAuctionData": { + "definition": "union PotentiallyOpaqueAdAuctionData { AdAuctionData transparent; Opaque opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=79" + }, + "blink.mojom.PotentiallyOpaqueConfigVector": { + "definition": "union PotentiallyOpaqueConfigVector { array transparent; Opaque opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=84" + }, + "blink.mojom.PotentiallyOpaqueURNConfigVector": { + "definition": "union PotentiallyOpaqueURNConfigVector { array transparent; Opaque opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=94" + }, + "blink.mojom.PotentiallyOpaqueSharedStorageBudgetMetadata": { + "definition": "union PotentiallyOpaqueSharedStorageBudgetMetadata { SharedStorageBudgetMetadata transparent; Opaque opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom;l=105" + }, + "blink.mojom.FetchAPIRequestHeaders": { + "definition": "struct FetchAPIRequestHeaders { map headers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fetch/fetch_api_request.mojom;l=116" + }, + "blink.mojom.FetchAPIRequestBody": { + "definition": "struct FetchAPIRequestBody { array elements; uint64 identifier; bool contains_sensitive_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fetch/fetch_api_request.mojom;l=129" + }, + "blink.mojom.FetchAPIRequest": { + "definition": "struct FetchAPIRequest { network.mojom.RequestMode mode = network.mojom.RequestMode.kNoCors; bool is_main_resource_load = false; network.mojom.RequestDestination destination = network.mojom.RequestDestination.kEmpty; RequestContextFrameType frame_type = RequestContextFrameType.kNone; url.mojom.Url url; string method; FetchAPIRequestHeaders headers; SerializedBlob? blob; FetchAPIRequestBody? body; url.mojom.Origin? request_initiator; array navigation_redirect_chain; Referrer? referrer; network.mojom.CredentialsMode credentials_mode = network.mojom.CredentialsMode.kOmit; FetchCacheMode cache_mode = FetchCacheMode.kDefault; network.mojom.RedirectMode redirect_mode = network.mojom.RedirectMode.kFollow; string? integrity; network.mojom.RequestPriority priority = network.mojom.RequestPriority.kIdle; mojo_base.mojom.UnguessableToken? fetch_window_id; bool keepalive = false; bool is_reload = false; bool is_history_navigation = false; string? devtools_stack_id; network.mojom.TrustTokenParams? trust_token_params; network.mojom.IPAddressSpace target_address_space = network.mojom.IPAddressSpace.kUnknown; network.mojom.AttributionReportingEligibility attribution_reporting_eligibility = network.mojom.AttributionReportingEligibility.kUnset; network.mojom.AttributionSupport attribution_reporting_support = network.mojom.AttributionSupport.kUnset; mojo_base.mojom.UnguessableToken? service_worker_race_network_request_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fetch/fetch_api_request.mojom;l=152" + }, + "blink.mojom.RequestContextType": { + "definition": "enum RequestContextType { UNSPECIFIED, ATTRIBUTION_SRC, AUDIO, BEACON, CSP_REPORT, DOWNLOAD, EMBED, EVENT_SOURCE, FAVICON, FETCH, FONT, FORM, FRAME, HYPERLINK, IFRAME, IMAGE, IMAGE_SET, INTERNAL, JSON, LOCATION, MANIFEST, OBJECT, PING, PLUGIN, PREFETCH, SCRIPT, SERVICE_WORKER, SHARED_WORKER, SPECULATION_RULES, SUBRESOURCE, SUBRESOURCE_WEBBUNDLE, STYLE, TRACK, VIDEO, WORKER, XML_HTTP_REQUEST, XSLT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fetch/fetch_api_request.mojom;l=28" + }, + "blink.mojom.FetchCacheMode": { + "definition": "enum FetchCacheMode { kDefault, kNoStore, kBypassCache, kValidateCache, kForceCache, kOnlyIfCached, kUnspecifiedOnlyIfCachedStrict, kUnspecifiedForceCacheMiss,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fetch/fetch_api_request.mojom;l=69" + }, + "blink.mojom.FetchPriorityHint": { + "definition": "enum FetchPriorityHint { kLow, kAuto, kHigh};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fetch/fetch_api_request.mojom;l=108" + }, + "blink.mojom.FetchAPIResponse": { + "definition": "struct FetchAPIResponse { array url_list; uint16 status_code = 0; string status_text; network.mojom.FetchResponseType response_type = network.mojom.FetchResponseType.kDefault; int64 padding = 0; network.mojom.FetchResponseSource response_source = network.mojom.FetchResponseSource.kUnspecified; map headers; string? mime_type; string? request_method; SerializedBlob? blob; ServiceWorkerResponseError error = blink.mojom.ServiceWorkerResponseError.kUnknown; mojo_base.mojom.Time response_time; string? cache_storage_cache_name; array cors_exposed_header_names; SerializedBlob? side_data_blob; SerializedBlob? side_data_blob_for_cache_put; network.mojom.ParsedHeaders? parsed_headers; network.mojom.ConnectionInfo connection_info; string alpn_negotiated_protocol = \"unknown\"; bool was_fetched_via_spdy = false; bool has_range_requested = false; network.mojom.AuthChallengeInfo? auth_challenge_info; bool request_include_credentials = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fetch/fetch_api_response.mojom;l=20" + }, + "blink.mojom.FileUtilitiesHost.GetFileInfo": { + "definition": "[Sync] GetFileInfo(mojo_base.mojom.FilePath path) => ( mojo_base.mojom.FileInfo? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file/file_utilities.mojom;l=12" + }, + "blink.mojom.FileSystemAccessAccessHandleHost.Close": { + "definition": "[Sync] Close() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_access_handle_host.mojom;l=28" + }, + "blink.mojom.FileSystemAccessCloudIdentifier": { + "definition": "struct FileSystemAccessCloudIdentifier { string provider_name; string id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_cloud_identifier.mojom;l=9" + }, + "blink.mojom.FileSystemAccessDataTransferToken.GetInternalId": { + "definition": "GetInternalId() => (mojo_base.mojom.UnguessableToken id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_data_transfer_token.mojom;l=19" + }, + "blink.mojom.FileSystemAccessDataTransferToken.Clone": { + "definition": "Clone(pending_receiver token_clone);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_data_transfer_token.mojom;l=24" + }, + "blink.mojom.FileSystemAccessDirectoryEntriesListener.DidReadDirectory": { + "definition": "DidReadDirectory(FileSystemAccessError result, array entries, bool has_more_entries);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=32" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.GetPermissionStatus": { + "definition": "GetPermissionStatus(FileSystemAccessPermissionMode mode) => (PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=47" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.RequestPermission": { + "definition": "RequestPermission(FileSystemAccessPermissionMode mode) => (FileSystemAccessError result, PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=53" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.GetFile": { + "definition": "GetFile(string basename, bool create) => (FileSystemAccessError result, pending_remote? file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=61" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.GetDirectory": { + "definition": "GetDirectory(string basename, bool create) => (FileSystemAccessError result, pending_remote? directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=71" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.GetEntries": { + "definition": "GetEntries(pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=76" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.Rename": { + "definition": "Rename(string new_entry_name) => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=80" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.Move": { + "definition": "Move(pending_remote destination_directory, string new_entry_name) => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=88" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.Remove": { + "definition": "Remove(bool recurse) => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=95" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.RemoveEntry": { + "definition": "RemoveEntry(string basename, bool recurse) => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=99" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.Resolve": { + "definition": "Resolve(pending_remote possible_child) => (FileSystemAccessError result, array? path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=108" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.Transfer": { + "definition": "Transfer(pending_receiver token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=114" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.GetUniqueId": { + "definition": "GetUniqueId() => (FileSystemAccessError result, string id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=120" + }, + "blink.mojom.FileSystemAccessDirectoryHandle.GetCloudIdentifiers": { + "definition": "GetCloudIdentifiers() => (FileSystemAccessError result, array cloud_identifiers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=127" + }, + "blink.mojom.FileSystemAccessEntry": { + "definition": "struct FileSystemAccessEntry { FileSystemAccessHandle entry_handle; string name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=21" + }, + "blink.mojom.FileSystemAccessHandle": { + "definition": "union FileSystemAccessHandle { pending_remote file; pending_remote directory;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_directory_handle.mojom;l=16" + }, + "blink.mojom.FileSystemAccessError": { + "definition": "struct FileSystemAccessError { FileSystemAccessStatus status; mojo_base.mojom.FileError file_error; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_error.mojom;l=37" + }, + "blink.mojom.FileSystemAccessStatus": { + "definition": "enum FileSystemAccessStatus { kOk, kPermissionDenied, kSecurityError, kNoModificationAllowedError, kInvalidModificationError, kNotSupportedError, kInvalidState, kInvalidArgument, kOperationFailed, kOperationAborted, kFileError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_error.mojom;l=10" + }, + "blink.mojom.FileSystemAccessFileDelegateHost.Read": { + "definition": "[Sync] Read(int64 offset, int32 bytes_to_read) => (mojo_base.mojom.BigBuffer? data, mojo_base.mojom.FileError error, int32 bytes_read);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_delegate_host.mojom;l=26" + }, + "blink.mojom.FileSystemAccessFileDelegateHost.Write": { + "definition": "[Sync] Write(int64 offset, handle data) => (mojo_base.mojom.FileError error, int32 bytes_written);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_delegate_host.mojom;l=38" + }, + "blink.mojom.FileSystemAccessFileDelegateHost.GetLength": { + "definition": "[Sync] GetLength() => (mojo_base.mojom.FileError error, int64 length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_delegate_host.mojom;l=47" + }, + "blink.mojom.FileSystemAccessFileDelegateHost.SetLength": { + "definition": "[Sync] SetLength(int64 length) => (mojo_base.mojom.FileError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_delegate_host.mojom;l=56" + }, + "blink.mojom.FileSystemAccessFileHandle.GetPermissionStatus": { + "definition": "GetPermissionStatus(FileSystemAccessPermissionMode mode) => (PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=71" + }, + "blink.mojom.FileSystemAccessFileHandle.RequestPermission": { + "definition": "RequestPermission(FileSystemAccessPermissionMode mode) => (FileSystemAccessError result, PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=77" + }, + "blink.mojom.FileSystemAccessFileHandle.AsBlob": { + "definition": "AsBlob() => (FileSystemAccessError result, mojo_base.mojom.FileInfo info, SerializedBlob? blob);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=82" + }, + "blink.mojom.FileSystemAccessFileHandle.CreateFileWriter": { + "definition": "CreateFileWriter( bool keep_existing_data, bool auto_close, FileSystemAccessWritableFileStreamLockMode mode) => ( FileSystemAccessError result, pending_remote? writer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=87" + }, + "blink.mojom.FileSystemAccessFileHandle.Rename": { + "definition": "Rename(string new_entry_name) => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=95" + }, + "blink.mojom.FileSystemAccessFileHandle.Move": { + "definition": "Move(pending_remote destination_directory, string new_entry_name) => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=102" + }, + "blink.mojom.FileSystemAccessFileHandle.Remove": { + "definition": "Remove() => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=107" + }, + "blink.mojom.FileSystemAccessFileHandle.OpenAccessHandle": { + "definition": "OpenAccessHandle(FileSystemAccessAccessHandleLockMode mode) => ( FileSystemAccessError result, FileSystemAccessAccessHandleFile? file, pending_remote? access_handle_host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=114" + }, + "blink.mojom.FileSystemAccessFileHandle.IsSameEntry": { + "definition": "IsSameEntry(pending_remote other) => (FileSystemAccessError result, bool is_same);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=121" + }, + "blink.mojom.FileSystemAccessFileHandle.Transfer": { + "definition": "Transfer(pending_receiver token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=127" + }, + "blink.mojom.FileSystemAccessFileHandle.GetUniqueId": { + "definition": "GetUniqueId() => (FileSystemAccessError result, string id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=133" + }, + "blink.mojom.FileSystemAccessFileHandle.GetCloudIdentifiers": { + "definition": "GetCloudIdentifiers() => (FileSystemAccessError result, array cloud_identifiers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=140" + }, + "blink.mojom.FileSystemAccessRegularFile": { + "definition": "struct FileSystemAccessRegularFile { mojo_base.mojom.File os_file; int64 file_size; pending_remote file_modification_host;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=41" + }, + "blink.mojom.FileSystemAccessAccessHandleLockMode": { + "definition": "enum FileSystemAccessAccessHandleLockMode { kReadwrite, kReadOnly, kReadwriteUnsafe,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=56" + }, + "blink.mojom.FileSystemAccessWritableFileStreamLockMode": { + "definition": "enum FileSystemAccessWritableFileStreamLockMode { kExclusive, kSiloed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=62" + }, + "blink.mojom.FileSystemAccessAccessHandleFile": { + "definition": "union FileSystemAccessAccessHandleFile { FileSystemAccessRegularFile regular_file; pending_remote incognito_file_delegate;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom;l=51" + }, + "blink.mojom.FileSystemAccessFileModificationHost.RequestCapacityChange": { + "definition": "[Sync] RequestCapacityChange(int64 capacity_delta) => (int64 granted_capacity_delta);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_modification_host.mojom;l=31" + }, + "blink.mojom.FileSystemAccessFileModificationHost.OnContentsModified": { + "definition": "OnContentsModified();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_modification_host.mojom;l=42" + }, + "blink.mojom.FileSystemAccessFileWriter.Write": { + "definition": "Write(uint64 offset, handle stream) => (FileSystemAccessError result, uint64 bytes_written);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_writer.mojom;l=18" + }, + "blink.mojom.FileSystemAccessFileWriter.Truncate": { + "definition": "Truncate(uint64 length) => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_writer.mojom;l=24" + }, + "blink.mojom.FileSystemAccessFileWriter.Close": { + "definition": "Close() => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_writer.mojom;l=32" + }, + "blink.mojom.FileSystemAccessFileWriter.Abort": { + "definition": "Abort() => (FileSystemAccessError result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_file_writer.mojom;l=38" + }, + "blink.mojom.FileSystemAccessManager.GetSandboxedFileSystem": { + "definition": "GetSandboxedFileSystem() => (FileSystemAccessError result, pending_remote? directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=103" + }, + "blink.mojom.FileSystemAccessManager.GetSandboxedFileSystemForDevtools": { + "definition": "GetSandboxedFileSystemForDevtools( array directory_path_components ) => (FileSystemAccessError result, pending_remote? directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=116" + }, + "blink.mojom.FileSystemAccessManager.ChooseEntries": { + "definition": "ChooseEntries(FilePickerOptions options) => (FileSystemAccessError result, array entries);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=127" + }, + "blink.mojom.FileSystemAccessManager.GetFileHandleFromToken": { + "definition": "GetFileHandleFromToken( pending_remote token, pending_receiver file_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=138" + }, + "blink.mojom.FileSystemAccessManager.GetDirectoryHandleFromToken": { + "definition": "GetDirectoryHandleFromToken( pending_remote token, pending_receiver directory_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=144" + }, + "blink.mojom.FileSystemAccessManager.GetEntryFromDataTransferToken": { + "definition": "GetEntryFromDataTransferToken( pending_remote token ) => (FileSystemAccessError result, FileSystemAccessEntry? entry);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=160" + }, + "blink.mojom.FileSystemAccessManager.BindObserverHost": { + "definition": "BindObserverHost( pending_receiver observer_host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=167" + }, + "blink.mojom.ChooseFileSystemEntryAcceptsOption": { + "definition": "struct ChooseFileSystemEntryAcceptsOption { mojo_base.mojom.String16 description; array mime_types; array extensions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=29" + }, + "blink.mojom.AcceptsTypesInfo": { + "definition": "struct AcceptsTypesInfo { array accepts; bool include_accepts_all;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=38" + }, + "blink.mojom.OpenFilePickerOptions": { + "definition": "struct OpenFilePickerOptions { AcceptsTypesInfo accepts_types_info; bool can_select_multiple_files;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=43" + }, + "blink.mojom.SaveFilePickerOptions": { + "definition": "struct SaveFilePickerOptions { AcceptsTypesInfo accepts_types_info; string suggested_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=48" + }, + "blink.mojom.DirectoryPickerOptions": { + "definition": "struct DirectoryPickerOptions { FileSystemAccessPermissionMode permission_mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=53" + }, + "blink.mojom.FilePickerOptions": { + "definition": "struct FilePickerOptions { TypeSpecificFilePickerOptionsUnion type_specific_options; string starting_directory_id; FilePickerStartInOptionsUnion? start_in_options;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=89" + }, + "blink.mojom.WellKnownDirectory": { + "definition": "enum WellKnownDirectory { kDirDesktop, kDirDocuments, kDirDownloads, kDirMusic, kDirPictures, kDirVideos,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=16" + }, + "blink.mojom.TypeSpecificFilePickerOptionsUnion": { + "definition": "union TypeSpecificFilePickerOptionsUnion { OpenFilePickerOptions open_file_picker_options; SaveFilePickerOptions save_file_picker_options; DirectoryPickerOptions directory_picker_options;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=57" + }, + "blink.mojom.FilePickerStartInOptionsUnion": { + "definition": "union FilePickerStartInOptionsUnion { WellKnownDirectory well_known_directory; pending_remote directory_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom;l=63" + }, + "blink.mojom.FileSystemAccessObserver.OnFileChanges": { + "definition": "OnFileChanges(array changes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=59" + }, + "blink.mojom.FileSystemAccessChangeTypeAppeared": { + "definition": "struct FileSystemAccessChangeTypeAppeared {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=11" + }, + "blink.mojom.FileSystemAccessChangeTypeDisappeared": { + "definition": "struct FileSystemAccessChangeTypeDisappeared {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=12" + }, + "blink.mojom.FileSystemAccessChangeTypeErrored": { + "definition": "struct FileSystemAccessChangeTypeErrored {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=13" + }, + "blink.mojom.FileSystemAccessChangeTypeModified": { + "definition": "struct FileSystemAccessChangeTypeModified {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=14" + }, + "blink.mojom.FileSystemAccessChangeTypeMoved": { + "definition": "struct FileSystemAccessChangeTypeMoved { array? former_relative_path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=15" + }, + "blink.mojom.FileSystemAccessChangeTypeUnknown": { + "definition": "struct FileSystemAccessChangeTypeUnknown {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=21" + }, + "blink.mojom.FileSystemAccessChangeMetadata": { + "definition": "struct FileSystemAccessChangeMetadata { FileSystemAccessEntry root; FileSystemAccessEntry changed_entry; array relative_path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=40" + }, + "blink.mojom.FileSystemAccessChange": { + "definition": "struct FileSystemAccessChange { FileSystemAccessChangeMetadata metadata; FileSystemAccessChangeType type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=51" + }, + "blink.mojom.FileSystemAccessChangeType": { + "definition": "union FileSystemAccessChangeType { FileSystemAccessChangeTypeAppeared appeared; FileSystemAccessChangeTypeDisappeared disappeared; FileSystemAccessChangeTypeErrored errored; FileSystemAccessChangeTypeModified modified; FileSystemAccessChangeTypeMoved moved; FileSystemAccessChangeTypeUnknown unknown;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer.mojom;l=26" + }, + "blink.mojom.FileSystemAccessObserverHost.Observe": { + "definition": "Observe(pending_remote token, bool is_recursive) => (FileSystemAccessError result, pending_receiver? observer_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer_host.mojom;l=24" + }, + "blink.mojom.FileSystemAccessObserverHost.Unobserve": { + "definition": "Unobserve(pending_remote token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_observer_host.mojom;l=34" + }, + "blink.mojom.FileSystemAccessPermissionMode": { + "definition": "enum FileSystemAccessPermissionMode { kRead, kReadWrite, kWrite,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_permission_mode.mojom;l=8" + }, + "blink.mojom.FileSystemAccessTransferToken.GetInternalID": { + "definition": "GetInternalID() => (mojo_base.mojom.UnguessableToken id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_transfer_token.mojom;l=13" + }, + "blink.mojom.FileSystemAccessTransferToken.Clone": { + "definition": "Clone(pending_receiver token_clone);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/file_system_access/file_system_access_transfer_token.mojom;l=17" + }, + "blink.mojom.FileSystemCancellableOperation.Cancel": { + "definition": "Cancel() => (mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=37" + }, + "blink.mojom.FileSystemOperationListener.ResultsRetrieved": { + "definition": "ResultsRetrieved(array entries, bool has_more);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=50" + }, + "blink.mojom.FileSystemOperationListener.DidWrite": { + "definition": "DidWrite(int64 byte_count, bool complete);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=55" + }, + "blink.mojom.FileSystemOperationListener.ErrorOccurred": { + "definition": "ErrorOccurred(mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=59" + }, + "blink.mojom.ReceivedSnapshotListener.DidReceiveSnapshotFile": { + "definition": "DidReceiveSnapshotFile();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=66" + }, + "blink.mojom.FileSystemManager.Open": { + "definition": "[Sync] Open(url.mojom.Origin origin, blink.mojom.FileSystemType file_system_type) => (string name, url.mojom.Url root_url, mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=78" + }, + "blink.mojom.FileSystemManager.ResolveURL": { + "definition": "[Sync] ResolveURL(url.mojom.Url filesystem_url) => (FileSystemInfo info, mojo_base.mojom.FilePath file_path, bool is_directory, mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=87" + }, + "blink.mojom.FileSystemManager.Move": { + "definition": "[Sync] Move(url.mojom.Url src_path, url.mojom.Url dest_path) => (mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=97" + }, + "blink.mojom.FileSystemManager.Copy": { + "definition": "[Sync] Copy(url.mojom.Url src_path, url.mojom.Url dest_path) => (mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=104" + }, + "blink.mojom.FileSystemManager.Remove": { + "definition": "[Sync] Remove(url.mojom.Url path, bool recursive) => (mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=111" + }, + "blink.mojom.FileSystemManager.ReadMetadata": { + "definition": "[Sync] ReadMetadata(url.mojom.Url path) => (mojo_base.mojom.FileInfo file_info, mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=119" + }, + "blink.mojom.FileSystemManager.Create": { + "definition": "[Sync] Create(url.mojom.Url path, bool exclusive, bool is_directory, bool recursive) => (mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=128" + }, + "blink.mojom.FileSystemManager.Exists": { + "definition": "[Sync] Exists(url.mojom.Url path, bool is_directory) => (mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=139" + }, + "blink.mojom.FileSystemManager.ReadDirectory": { + "definition": "ReadDirectory(url.mojom.Url path, pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=146" + }, + "blink.mojom.FileSystemManager.ReadDirectorySync": { + "definition": "[Sync] ReadDirectorySync(url.mojom.Url path) => (array entries, mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=148" + }, + "blink.mojom.FileSystemManager.Write": { + "definition": "Write(url.mojom.Url file_path, pending_remote blob, int64 position, pending_receiver op_receiver, pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=157" + }, + "blink.mojom.FileSystemManager.WriteSync": { + "definition": "[Sync] WriteSync(url.mojom.Url file_path, pending_remote blob, int64 position) => (int64 byte_count, mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=162" + }, + "blink.mojom.FileSystemManager.Truncate": { + "definition": "Truncate(url.mojom.Url file_path, int64 length, pending_receiver op_receiver) => (mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=170" + }, + "blink.mojom.FileSystemManager.TruncateSync": { + "definition": "[Sync] TruncateSync(url.mojom.Url file_path, int64 length) => (mojo_base.mojom.FileError error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=174" + }, + "blink.mojom.FileSystemManager.CreateSnapshotFile": { + "definition": "[Sync] CreateSnapshotFile(url.mojom.Url file_path) => (mojo_base.mojom.FileInfo file_info, mojo_base.mojom.FilePath platform_path, mojo_base.mojom.FileError error_code, pending_remote? snapshot_listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=190" + }, + "blink.mojom.FileSystemManager.GetPlatformPath": { + "definition": "[Sync] GetPlatformPath(url.mojom.Url file_path) => (mojo_base.mojom.FilePath platform_path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=198" + }, + "blink.mojom.FileSystemManager.RegisterBlob": { + "definition": "[Sync] RegisterBlob(string content_type, url.mojom.Url url, uint64 length, mojo_base.mojom.Time? expected_modification_time) => (SerializedBlob blob);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=219" + }, + "blink.mojom.FileSystemInfo": { + "definition": "struct FileSystemInfo { string name; url.mojom.Url root_url; FileSystemType mount_type = kTemporary;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=24" + }, + "blink.mojom.FileSystemType": { + "definition": "enum FileSystemType { kTemporary, kPersistent, kIsolated, kExternal};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/filesystem/file_system.mojom;l=17" + }, + "blink.mojom.CanvasNoiseTokenUpdater.OnTokenReceived": { + "definition": "OnTokenReceived(NoiseToken? token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fingerprinting_protection/canvas_interventions.mojom;l=17" + }, + "blink.mojom.NoiseToken": { + "definition": "struct NoiseToken { uint64 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/fingerprinting_protection/noise_token.mojom;l=8" + }, + "blink.mojom.FontAccessManager.EnumerateLocalFonts": { + "definition": "EnumerateLocalFonts() => (FontEnumerationStatus enumeration_status, mojo_base.mojom.ReadOnlySharedMemoryRegion? enumeration_table);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/font_access/font_access.mojom;l=39" + }, + "blink.mojom.FontData": { + "definition": "struct FontData { string postscript_name; string full_name; string family; string style;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/font_access/font_access.mojom;l=26" + }, + "blink.mojom.FontEnumerationStatus": { + "definition": "enum FontEnumerationStatus { kOk, kUnimplemented, kUnexpectedError, kNeedsUserActivation, kNotVisible, kPermissionDenied,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/font_access/font_access.mojom;l=10" + }, + "blink.mojom.FontUniqueNameLookup.GetUniqueNameLookupTableIfAvailable": { + "definition": "[Sync] GetUniqueNameLookupTableIfAvailable() => (bool sync_available, mojo_base.mojom.ReadOnlySharedMemoryRegion? font_lookup_table);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/font_unique_name_lookup/font_unique_name_lookup.mojom;l=17" + }, + "blink.mojom.FontUniqueNameLookup.GetUniqueNameLookupTable": { + "definition": "GetUniqueNameLookupTable() => (mojo_base.mojom.ReadOnlySharedMemoryRegion? font_lookup_table);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/font_unique_name_lookup/font_unique_name_lookup.mojom;l=28" + }, + "blink.mojom.FormControlType": { + "definition": "enum FormControlType { kButtonButton, kButtonSubmit, kButtonReset, kButtonPopover, kFieldset, kInputButton, kInputCheckbox, kInputColor, kInputDate, kInputDatetimeLocal, kInputEmail, kInputFile, kInputHidden, kInputImage, kInputMonth, kInputNumber, kInputPassword, kInputRadio, kInputRange, kInputReset, kInputSearch, kInputSubmit, kInputTelephone, kInputText, kInputTime, kInputUrl, kInputWeek, kOutput, kSelectOne, kSelectMultiple, kTextArea,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/forms/form_control_type.mojom;l=9" + }, + "blink.mojom.BackForwardCacheControllerHost.EvictFromBackForwardCache": { + "definition": "EvictFromBackForwardCache(RendererEvictionReason reason, ScriptSourceLocation? source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/back_forward_cache_controller.mojom;l=33" + }, + "blink.mojom.BackForwardCacheControllerHost.DidChangeBackForwardCacheDisablingFeatures": { + "definition": "DidChangeBackForwardCacheDisablingFeatures( array details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/back_forward_cache_controller.mojom;l=39" + }, + "blink.mojom.BlockingDetails": { + "definition": "struct BlockingDetails { WebSchedulerTrackedFeature feature; ScriptSourceLocation? source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/back_forward_cache_controller.mojom;l=12" + }, + "blink.mojom.NavigationBlockedReason": { + "definition": "enum NavigationBlockedReason { kRedirectWithNoUserGesture, kRedirectWithNoUserGestureSandbox};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/blocked_navigation_types.mojom;l=8" + }, + "blink.mojom.ColorScheme": { + "definition": "enum ColorScheme { kLight, kDark,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/color_scheme.mojom;l=7" + }, + "blink.mojom.DeferredFetchPolicy": { + "definition": "enum DeferredFetchPolicy { kDisabled, kDeferredFetch, kDeferredFetchMinimal,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/deferred_fetch_policy.mojom;l=22" + }, + "blink.mojom.FindInPage.Find": { + "definition": "Find(int32 request_id, string search_text, FindOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=16" + }, + "blink.mojom.FindInPage.StopFinding": { + "definition": "StopFinding(StopFindAction action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=22" + }, + "blink.mojom.FindInPage.ClearActiveFindMatch": { + "definition": "ClearActiveFindMatch();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=27" + }, + "blink.mojom.FindInPage.SetClient": { + "definition": "SetClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=32" + }, + "blink.mojom.FindInPageClient.SetNumberOfMatches": { + "definition": "SetNumberOfMatches(int32 request_id, uint32 number_of_matches, FindMatchUpdateType update_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=76" + }, + "blink.mojom.FindInPageClient.SetActiveMatch": { + "definition": "SetActiveMatch(int32 request_id, gfx.mojom.Rect active_match_rect, int32 active_match_ordinal, FindMatchUpdateType update_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=82" + }, + "blink.mojom.FindOptions": { + "definition": "struct FindOptions { bool forward = true; bool match_case = false; bool new_session = true; bool find_match = true; bool force = false; bool run_synchronously_for_testing = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=104" + }, + "blink.mojom.StopFindAction": { + "definition": "enum StopFindAction { kStopFindActionClearSelection, kStopFindActionKeepSelection, kStopFindActionActivateSelection};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=89" + }, + "blink.mojom.FindMatchUpdateType": { + "definition": "enum FindMatchUpdateType { kFinalUpdate, kMoreUpdatesComing};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/find_in_page.mojom;l=99" + }, + "blink.mojom.LocalFrameHost.EnterFullscreen": { + "definition": "EnterFullscreen(FullscreenOptions options) => (bool granted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=279" + }, + "blink.mojom.LocalFrameHost.ExitFullscreen": { + "definition": "ExitFullscreen();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=282" + }, + "blink.mojom.LocalFrameHost.FullscreenStateChanged": { + "definition": "FullscreenStateChanged(bool is_fullscreen, FullscreenOptions? options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=286" + }, + "blink.mojom.LocalFrameHost.RegisterProtocolHandler": { + "definition": "RegisterProtocolHandler(string scheme, url.mojom.Url url, bool user_gesture);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=293" + }, + "blink.mojom.LocalFrameHost.UnregisterProtocolHandler": { + "definition": "UnregisterProtocolHandler(string scheme, url.mojom.Url url, bool user_gesture);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=300" + }, + "blink.mojom.LocalFrameHost.DidDisplayInsecureContent": { + "definition": "DidDisplayInsecureContent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=305" + }, + "blink.mojom.LocalFrameHost.DidContainInsecureFormAction": { + "definition": "DidContainInsecureFormAction();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=309" + }, + "blink.mojom.LocalFrameHost.MainDocumentElementAvailable": { + "definition": "MainDocumentElementAvailable(bool uses_temporary_zoom_level);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=314" + }, + "blink.mojom.LocalFrameHost.SetNeedsOcclusionTracking": { + "definition": "SetNeedsOcclusionTracking(bool needs_tracking);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=319" + }, + "blink.mojom.LocalFrameHost.SetVirtualKeyboardMode": { + "definition": "SetVirtualKeyboardMode(ui.mojom.VirtualKeyboardMode type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=323" + }, + "blink.mojom.LocalFrameHost.VisibilityChanged": { + "definition": "VisibilityChanged(blink.mojom.FrameVisibility visibility);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=329" + }, + "blink.mojom.LocalFrameHost.DidChangeThemeColor": { + "definition": "DidChangeThemeColor(skia.mojom.SkColor? theme_color);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=335" + }, + "blink.mojom.LocalFrameHost.DidChangeBackgroundColor": { + "definition": "DidChangeBackgroundColor(skia.mojom.SkColor4f background_color, bool color_adjust);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=340" + }, + "blink.mojom.LocalFrameHost.DidFailLoadWithError": { + "definition": "DidFailLoadWithError(url.mojom.Url url, int32 error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=344" + }, + "blink.mojom.LocalFrameHost.DidFocusFrame": { + "definition": "DidFocusFrame();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=347" + }, + "blink.mojom.LocalFrameHost.DidCallFocus": { + "definition": "DidCallFocus();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=351" + }, + "blink.mojom.LocalFrameHost.EnforceInsecureRequestPolicy": { + "definition": "EnforceInsecureRequestPolicy(blink.mojom.InsecureRequestPolicy policy_bitmap);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=358" + }, + "blink.mojom.LocalFrameHost.EnforceInsecureNavigationsSet": { + "definition": "EnforceInsecureNavigationsSet(array set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=361" + }, + "blink.mojom.LocalFrameHost.SuddenTerminationDisablerChanged": { + "definition": "SuddenTerminationDisablerChanged(bool present, SuddenTerminationDisablerType disabler_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=365" + }, + "blink.mojom.LocalFrameHost.HadStickyUserActivationBeforeNavigationChanged": { + "definition": "HadStickyUserActivationBeforeNavigationChanged(bool has_gesture);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=371" + }, + "blink.mojom.LocalFrameHost.ScrollRectToVisibleInParentFrame": { + "definition": "ScrollRectToVisibleInParentFrame(gfx.mojom.RectF rect_to_scroll, ScrollIntoViewParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=374" + }, + "blink.mojom.LocalFrameHost.BubbleLogicalScrollInParentFrame": { + "definition": "BubbleLogicalScrollInParentFrame(ScrollDirection direction, ui.mojom.ScrollGranularity granularity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=379" + }, + "blink.mojom.LocalFrameHost.StartLoadingForAsyncNavigationApiCommit": { + "definition": "StartLoadingForAsyncNavigationApiCommit();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=386" + }, + "blink.mojom.LocalFrameHost.DidBlockNavigation": { + "definition": "DidBlockNavigation(url.mojom.Url blocked_url, blink.mojom.NavigationBlockedReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=390" + }, + "blink.mojom.LocalFrameHost.DidChangeLoadProgress": { + "definition": "DidChangeLoadProgress(double load_progress);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=394" + }, + "blink.mojom.LocalFrameHost.DidFinishLoad": { + "definition": "DidFinishLoad(url.mojom.Url validated_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=397" + }, + "blink.mojom.LocalFrameHost.DispatchLoad": { + "definition": "DispatchLoad();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=402" + }, + "blink.mojom.LocalFrameHost.GoToEntryAtOffset": { + "definition": "GoToEntryAtOffset(int32 offset, bool has_user_gesture, mojo_base.mojom.TimeTicks actual_navigation_start, TaskAttributionId? soft_navigation_heuristics_task_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=411" + }, + "blink.mojom.LocalFrameHost.NavigateToNavigationApiKey": { + "definition": "NavigateToNavigationApiKey(string key, bool has_user_gesture, mojo_base.mojom.TimeTicks actual_navigation_start, TaskAttributionId? soft_navigation_heuristics_task_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=432" + }, + "blink.mojom.LocalFrameHost.NavigateEventHandlerPresenceChanged": { + "definition": "NavigateEventHandlerPresenceChanged(bool present);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=438" + }, + "blink.mojom.LocalFrameHost.UpdateTitle": { + "definition": "UpdateTitle(mojo_base.mojom.String16? title, mojo_base.mojom.TextDirection title_direction);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=443" + }, + "blink.mojom.LocalFrameHost.UpdateApplicationTitle": { + "definition": "UpdateApplicationTitle(mojo_base.mojom.String16 application_title);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=450" + }, + "blink.mojom.LocalFrameHost.UpdateUserActivationState": { + "definition": "UpdateUserActivationState(UserActivationUpdateType update_type, UserActivationNotificationType notification_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=458" + }, + "blink.mojom.LocalFrameHost.DidConsumeHistoryUserActivation": { + "definition": "DidConsumeHistoryUserActivation();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=464" + }, + "blink.mojom.LocalFrameHost.HandleAccessibilityFindInPageResult": { + "definition": "HandleAccessibilityFindInPageResult(FindInPageResultAXParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=467" + }, + "blink.mojom.LocalFrameHost.HandleAccessibilityFindInPageTermination": { + "definition": "HandleAccessibilityFindInPageTermination();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=471" + }, + "blink.mojom.LocalFrameHost.DocumentOnLoadCompleted": { + "definition": "DocumentOnLoadCompleted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=475" + }, + "blink.mojom.LocalFrameHost.ForwardResourceTimingToParent": { + "definition": "ForwardResourceTimingToParent(ResourceTimingInfo timing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=479" + }, + "blink.mojom.LocalFrameHost.DidDispatchDOMContentLoadedEvent": { + "definition": "DidDispatchDOMContentLoadedEvent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=483" + }, + "blink.mojom.LocalFrameHost.RunModalAlertDialog": { + "definition": "[Sync] RunModalAlertDialog(mojo_base.mojom.String16 alert_message, bool disable_third_party_subframe_suppresion) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=486" + }, + "blink.mojom.LocalFrameHost.RunModalConfirmDialog": { + "definition": "[Sync] RunModalConfirmDialog(mojo_base.mojom.String16 alert_message, bool disable_third_party_subframe_suppresion) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=493" + }, + "blink.mojom.LocalFrameHost.RunModalPromptDialog": { + "definition": "[Sync] RunModalPromptDialog(mojo_base.mojom.String16 alert_message, mojo_base.mojom.String16 default_value, bool disable_third_party_subframe_suppresion) => (bool success, mojo_base.mojom.String16 result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=503" + }, + "blink.mojom.LocalFrameHost.RunBeforeUnloadConfirm": { + "definition": "[Sync] RunBeforeUnloadConfirm(bool is_reload) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=512" + }, + "blink.mojom.LocalFrameHost.UpdateFaviconURL": { + "definition": "UpdateFaviconURL(array favicon_urls);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=516" + }, + "blink.mojom.LocalFrameHost.DownloadURL": { + "definition": "DownloadURL(DownloadURLParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=519" + }, + "blink.mojom.LocalFrameHost.FocusedElementChanged": { + "definition": "FocusedElementChanged(bool is_editable_element, bool is_richly_editable_element, gfx.mojom.Rect bounds_in_frame_widget, blink.mojom.FocusType focus_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=531" + }, + "blink.mojom.LocalFrameHost.TextSelectionChanged": { + "definition": "TextSelectionChanged(mojo_base.mojom.BigString16 text, uint32 offset, gfx.mojom.Range range);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=539" + }, + "blink.mojom.LocalFrameHost.ShowPopupMenu": { + "definition": "ShowPopupMenu(pending_remote popup_client, gfx.mojom.Rect bounds, double font_size, int32 selected_item, array menu_items, bool right_aligned, bool allow_multiple_selection);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=545" + }, + "blink.mojom.LocalFrameHost.CreateNewPopupWidget": { + "definition": "CreateNewPopupWidget( pending_associated_receiver popup_host, pending_associated_receiver blink_widget_host, pending_associated_remote blink_widget);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=558" + }, + "blink.mojom.LocalFrameHost.ShowContextMenu": { + "definition": "ShowContextMenu(pending_associated_remote client, UntrustworthyContextMenuParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=567" + }, + "blink.mojom.LocalFrameHost.DidLoadResourceFromMemoryCache": { + "definition": "DidLoadResourceFromMemoryCache( url.mojom.Url url, string http_method, string mime_type, network.mojom.RequestDestination request_destination, bool include_credentials);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=581" + }, + "blink.mojom.LocalFrameHost.DidChangeFrameOwnerProperties": { + "definition": "DidChangeFrameOwnerProperties( blink.mojom.FrameToken child_frame_token, blink.mojom.FrameOwnerProperties frame_owner_properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=590" + }, + "blink.mojom.LocalFrameHost.DidChangeOpener": { + "definition": "DidChangeOpener(blink.mojom.LocalFrameToken? opener_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=597" + }, + "blink.mojom.LocalFrameHost.DidChangeFramePolicy": { + "definition": "DidChangeFramePolicy( blink.mojom.FrameToken child_frame_token, blink.mojom.FramePolicy frame_policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=601" + }, + "blink.mojom.LocalFrameHost.DidChangeIframeAttributes": { + "definition": "DidChangeIframeAttributes( blink.mojom.FrameToken child_frame_token, IframeAttributes attributes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=607" + }, + "blink.mojom.LocalFrameHost.CapturePaintPreviewOfSubframe": { + "definition": "CapturePaintPreviewOfSubframe( gfx.mojom.Rect clip_rect, mojo_base.mojom.UnguessableToken guid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=615" + }, + "blink.mojom.LocalFrameHost.SetCloseListener": { + "definition": "SetCloseListener( pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=620" + }, + "blink.mojom.LocalFrameHost.Detach": { + "definition": "Detach();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=624" + }, + "blink.mojom.LocalFrameHost.GetKeepAliveHandleFactory": { + "definition": "GetKeepAliveHandleFactory( pending_receiver factory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=627" + }, + "blink.mojom.LocalFrameHost.DidAddMessageToConsole": { + "definition": "DidAddMessageToConsole( ConsoleMessageLevel log_level, mojo_base.mojom.BigString16 msg, uint32 line_number, mojo_base.mojom.String16? source_id, mojo_base.mojom.BigString16? untrusted_stack_trace);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=637" + }, + "blink.mojom.LocalFrameHost.FrameSizeChanged": { + "definition": "FrameSizeChanged(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=647" + }, + "blink.mojom.LocalFrameHost.DidInferColorScheme": { + "definition": "DidInferColorScheme(PreferredColorScheme color_scheme);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=650" + }, + "blink.mojom.LocalFrameHost.DidChangeSrcDoc": { + "definition": "DidChangeSrcDoc(blink.mojom.FrameToken child_frame_token, string srcdoc_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=655" + }, + "blink.mojom.LocalFrameHost.ReceivedDelegatedCapability": { + "definition": "ReceivedDelegatedCapability(DelegatedCapability delegated_capability);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=662" + }, + "blink.mojom.LocalFrameHost.SendFencedFrameReportingBeacon": { + "definition": "SendFencedFrameReportingBeacon( string event_data, string event_type, array destinations, bool cross_origin_exposed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=684" + }, + "blink.mojom.LocalFrameHost.SendFencedFrameReportingBeaconToCustomURL": { + "definition": "SendFencedFrameReportingBeaconToCustomURL( url.mojom.Url destination_url, bool cross_origin_exposed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=704" + }, + "blink.mojom.LocalFrameHost.DisableUntrustedNetworkInFencedFrame": { + "definition": "DisableUntrustedNetworkInFencedFrame() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=717" + }, + "blink.mojom.LocalFrameHost.ExemptUrlFromNetworkRevocationForTesting": { + "definition": "ExemptUrlFromNetworkRevocationForTesting(url.mojom.Url exempted_url) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=723" + }, + "blink.mojom.LocalFrameHost.SendLegacyTechEvent": { + "definition": "SendLegacyTechEvent( string type, LegacyTechEventCodeLocation code_location);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=733" + }, + "blink.mojom.LocalFrameHost.SetFencedFrameAutomaticBeaconReportEventData": { + "definition": "SetFencedFrameAutomaticBeaconReportEventData( AutomaticBeaconType event_type, string event_data, array destinations, bool once, bool cross_origin_exposed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=747" + }, + "blink.mojom.LocalFrameHost.SendPrivateAggregationRequestsForFencedFrameEvent": { + "definition": "SendPrivateAggregationRequestsForFencedFrameEvent(string event_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=762" + }, + "blink.mojom.LocalFrameHost.CreateFencedFrame": { + "definition": "CreateFencedFrame( pending_associated_receiver fenced_frame, RemoteFrameInterfacesFromRenderer remote_frame_interfaces, blink.mojom.RemoteFrameToken frame_token, mojo_base.mojom.UnguessableToken devtools_frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=772" + }, + "blink.mojom.LocalFrameHost.ForwardFencedFrameEventAndUserActivationToEmbedder": { + "definition": "ForwardFencedFrameEventAndUserActivationToEmbedder(string event_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=785" + }, + "blink.mojom.LocalFrameHost.OnViewTransitionOptInChanged": { + "definition": "OnViewTransitionOptInChanged( ViewTransitionSameOriginOptIn view_transition_opt_in);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=790" + }, + "blink.mojom.LocalFrameHost.StartDragging": { + "definition": "StartDragging(DragData drag_data, AllowedDragOperations operations_allowed, skia.mojom.BitmapN32? image, gfx.mojom.Vector2d cursor_offset_in_dip, gfx.mojom.Rect drag_obj_rect_in_dip, DragEventSourceInfo event_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=797" + }, + "blink.mojom.LocalFrameHost.IssueKeepAliveHandle": { + "definition": "IssueKeepAliveHandle( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=806" + }, + "blink.mojom.LocalFrameHost.NotifyStorageAccessed": { + "definition": "NotifyStorageAccessed(StorageTypeAccessed storageType, bool blocked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=810" + }, + "blink.mojom.LocalFrameHost.RecordWindowProxyUsageMetrics": { + "definition": "RecordWindowProxyUsageMetrics(blink.mojom.FrameToken target_frame_token, WindowProxyAccessType access_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=813" + }, + "blink.mojom.LocalFrameHost.NotifyDocumentInteractive": { + "definition": "NotifyDocumentInteractive();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=818" + }, + "blink.mojom.LocalFrameHost.SetStorageAccessApiStatus": { + "definition": "SetStorageAccessApiStatus(network.mojom.StorageAccessApiStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=821" + }, + "blink.mojom.LocalFrameHost.InitializeCrashReportStorage": { + "definition": "InitializeCrashReportStorage(uint64 length) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=834" + }, + "blink.mojom.LocalFrameHost.SetCrashReportStorageKey": { + "definition": "[Sync] SetCrashReportStorageKey(string key, string value) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=847" + }, + "blink.mojom.LocalFrameHost.RemoveCrashReportStorageKey": { + "definition": "[Sync] RemoveCrashReportStorageKey(string key) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=851" + }, + "blink.mojom.NonAssociatedLocalFrameHost.MaybeStartOutermostMainFrameNavigation": { + "definition": "MaybeStartOutermostMainFrameNavigation(array urls);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=878" + }, + "blink.mojom.LocalFrame.GetTextSurroundingSelection": { + "definition": "GetTextSurroundingSelection(uint32 max_length) => (mojo_base.mojom.String16 content, uint32 start_offset, uint32 end_offset);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=892" + }, + "blink.mojom.LocalFrame.SendInterventionReport": { + "definition": "SendInterventionReport(string id, string message, blink.mojom.FrameToken? child_frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=911" + }, + "blink.mojom.LocalFrame.SetFrameOwnerProperties": { + "definition": "SetFrameOwnerProperties(FrameOwnerProperties properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=919" + }, + "blink.mojom.LocalFrame.NotifyUserActivation": { + "definition": "NotifyUserActivation(UserActivationNotificationType notification_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=924" + }, + "blink.mojom.LocalFrame.NotifyVirtualKeyboardOverlayRect": { + "definition": "NotifyVirtualKeyboardOverlayRect(gfx.mojom.Rect keyboard_rect);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=928" + }, + "blink.mojom.LocalFrame.ShowInterestInElement": { + "definition": "ShowInterestInElement(int32 nodeID);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=932" + }, + "blink.mojom.LocalFrame.AddMessageToConsole": { + "definition": "AddMessageToConsole(ConsoleMessageLevel level, string message, bool discard_duplicates);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=935" + }, + "blink.mojom.LocalFrame.SwapInImmediately": { + "definition": "SwapInImmediately();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=944" + }, + "blink.mojom.LocalFrame.CheckCompleted": { + "definition": "CheckCompleted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=948" + }, + "blink.mojom.LocalFrame.StopLoading": { + "definition": "StopLoading();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=951" + }, + "blink.mojom.LocalFrame.Collapse": { + "definition": "Collapse(bool collapsed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=957" + }, + "blink.mojom.LocalFrame.EnableViewSourceMode": { + "definition": "EnableViewSourceMode();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=961" + }, + "blink.mojom.LocalFrame.Focus": { + "definition": "Focus();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=965" + }, + "blink.mojom.LocalFrame.ClearFocusedElement": { + "definition": "ClearFocusedElement();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=968" + }, + "blink.mojom.LocalFrame.CopyImageAt": { + "definition": "CopyImageAt(gfx.mojom.Point window_point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=972" + }, + "blink.mojom.LocalFrame.SaveImageAt": { + "definition": "SaveImageAt(gfx.mojom.Point window_point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=976" + }, + "blink.mojom.LocalFrame.ReportBlinkFeatureUsage": { + "definition": "ReportBlinkFeatureUsage(array features);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=981" + }, + "blink.mojom.LocalFrame.RenderFallbackContent": { + "definition": "RenderFallbackContent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=986" + }, + "blink.mojom.LocalFrame.BeforeUnload": { + "definition": "[SupportsUrgent] BeforeUnload(bool is_reload) => (bool proceed, mojo_base.mojom.TimeTicks before_unload_start_time, mojo_base.mojom.TimeTicks before_unload_end_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1000" + }, + "blink.mojom.LocalFrame.MediaPlayerActionAt": { + "definition": "MediaPlayerActionAt(gfx.mojom.Point location, blink.mojom.MediaPlayerAction action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1007" + }, + "blink.mojom.LocalFrame.RequestVideoFrameAtWithBoundsHint": { + "definition": "RequestVideoFrameAtWithBoundsHint(gfx.mojom.Point location, gfx.mojom.Size max_size, int32 max_area) => (skia.mojom.BitmapN32? bitmap, gfx.mojom.Rect bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1022" + }, + "blink.mojom.LocalFrame.PluginActionAt": { + "definition": "PluginActionAt(gfx.mojom.Point location, blink.mojom.PluginActionType action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1029" + }, + "blink.mojom.LocalFrame.AdvanceFocusInFrame": { + "definition": "AdvanceFocusInFrame(blink.mojom.FocusType focus_type, blink.mojom.RemoteFrameToken? source_frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1035" + }, + "blink.mojom.LocalFrame.AdvanceFocusForIME": { + "definition": "AdvanceFocusForIME(blink.mojom.FocusType focus_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1043" + }, + "blink.mojom.LocalFrame.ReportContentSecurityPolicyViolation": { + "definition": "ReportContentSecurityPolicyViolation(network.mojom.CSPViolation violation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1047" + }, + "blink.mojom.LocalFrame.DidUpdateFramePolicy": { + "definition": "DidUpdateFramePolicy(blink.mojom.FramePolicy frame_policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1051" + }, + "blink.mojom.LocalFrame.OnFrameVisibilityChanged": { + "definition": "OnFrameVisibilityChanged(blink.mojom.FrameVisibility visibility);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1057" + }, + "blink.mojom.LocalFrame.PostMessageEvent": { + "definition": "PostMessageEvent(blink.mojom.RemoteFrameToken? source_frame_token, url.mojom.Origin? source_origin, url.mojom.Origin? target_origin, blink.mojom.TransferableMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1080" + }, + "blink.mojom.LocalFrame.JavaScriptMethodExecuteRequest": { + "definition": "JavaScriptMethodExecuteRequest( mojo_base.mojom.String16 object_name, mojo_base.mojom.String16 method_name, mojo_base.mojom.ListValue arguments, bool wants_result) => (mojo_base.mojom.Value result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1097" + }, + "blink.mojom.LocalFrame.JavaScriptExecuteRequest": { + "definition": "JavaScriptExecuteRequest( mojo_base.mojom.BigString16 javascript, bool wants_result) => (mojo_base.mojom.Value result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1115" + }, + "blink.mojom.LocalFrame.JavaScriptExecuteRequestForTests": { + "definition": "JavaScriptExecuteRequestForTests( mojo_base.mojom.BigString16 javascript, bool has_user_gesture, bool resolve_promises, bool honor_js_content_settings, int32 world_id) => (JavaScriptExecutionResultType result_type, mojo_base.mojom.Value result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1127" + }, + "blink.mojom.LocalFrame.JavaScriptExecuteRequestInIsolatedWorld": { + "definition": "JavaScriptExecuteRequestInIsolatedWorld( mojo_base.mojom.BigString16 javascript, bool wants_result, int32 world_id) => (mojo_base.mojom.Value result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1138" + }, + "blink.mojom.LocalFrame.BindReportingObserver": { + "definition": "BindReportingObserver( pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1161" + }, + "blink.mojom.LocalFrame.UpdateOpener": { + "definition": "UpdateOpener(blink.mojom.FrameToken? opener_frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1166" + }, + "blink.mojom.LocalFrame.GetSavableResourceLinks": { + "definition": "GetSavableResourceLinks() => (GetSavableResourceLinksReply? reply);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1170" + }, + "blink.mojom.LocalFrame.MixedContentFound": { + "definition": "MixedContentFound(url.mojom.Url main_resource_url, url.mojom.Url mixed_content_url, RequestContextType request_context, bool was_allowed, url.mojom.Url url_before_redirects, bool had_redirect, network.mojom.SourceLocation? source_location);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1173" + }, + "blink.mojom.LocalFrame.BindDevToolsAgent": { + "definition": "BindDevToolsAgent( pending_associated_remote agent_host, pending_associated_receiver agent);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1186" + }, + "blink.mojom.LocalFrame.HandleRendererDebugURL": { + "definition": "HandleRendererDebugURL(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1198" + }, + "blink.mojom.LocalFrame.GetCanonicalUrlForSharing": { + "definition": "GetCanonicalUrlForSharing() => (url.mojom.Url? canonical_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1202" + }, + "blink.mojom.LocalFrame.GetOpenGraphMetadata": { + "definition": "GetOpenGraphMetadata() => (blink.mojom.OpenGraphMetadata metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1207" + }, + "blink.mojom.LocalFrame.SetNavigationApiHistoryEntriesForRestore": { + "definition": "SetNavigationApiHistoryEntriesForRestore( NavigationApiHistoryEntryArrays entry_arrays, NavigationApiEntryRestoreReason restore_reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1213" + }, + "blink.mojom.LocalFrame.UpdatePrerenderURL": { + "definition": "UpdatePrerenderURL(url.mojom.Url matched_url) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1219" + }, + "blink.mojom.LocalFrame.NotifyNavigationApiOfDisposedEntries": { + "definition": "NotifyNavigationApiOfDisposedEntries(array keys);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1223" + }, + "blink.mojom.LocalFrame.TraverseCancelled": { + "definition": "TraverseCancelled(string navigation_api_key, TraverseCancelledReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1231" + }, + "blink.mojom.LocalFrame.DispatchNavigateEventForCrossDocumentTraversal": { + "definition": "DispatchNavigateEventForCrossDocumentTraversal( url.mojom.Url url, mojo_base.mojom.ByteString page_state, bool is_browser_initiated);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1238" + }, + "blink.mojom.LocalFrame.SnapshotDocumentForViewTransition": { + "definition": "SnapshotDocumentForViewTransition( blink.mojom.ViewTransitionToken transition_token, PageSwapEventParams page_swap_event_params) => ( blink.mojom.ViewTransitionState view_transition_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1248" + }, + "blink.mojom.LocalFrame.NotifyViewTransitionAbortedToOldDocument": { + "definition": "NotifyViewTransitionAbortedToOldDocument();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1256" + }, + "blink.mojom.LocalFrame.DispatchPageSwap": { + "definition": "DispatchPageSwap( PageSwapEventParams? page_swap_event_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1264" + }, + "blink.mojom.LocalFrame.AddResourceTimingEntryForFailedSubframeNavigation": { + "definition": "AddResourceTimingEntryForFailedSubframeNavigation( blink.mojom.FrameToken subframe_token, url.mojom.Url initial_url, mojo_base.mojom.TimeTicks start_time, mojo_base.mojom.TimeTicks redirect_time, mojo_base.mojom.TimeTicks request_start, mojo_base.mojom.TimeTicks response_start, uint32 response_code, string mime_type, network.mojom.LoadTimingInfo load_timing_info, network.mojom.ConnectionInfo connection_info, string alpn_negotiated_protocol, bool is_secure_transport, bool is_validated, string normalized_server_timing, network.mojom.URLLoaderCompletionStatus completion_status );", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1270" + }, + "blink.mojom.LocalFrame.GetScrollPosition": { + "definition": "GetScrollPosition() => (gfx.mojom.Point scroll_position);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1289" + }, + "blink.mojom.LocalMainFrame.AnimateDoubleTapZoom": { + "definition": "AnimateDoubleTapZoom(gfx.mojom.Point point, gfx.mojom.Rect rect);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1301" + }, + "blink.mojom.LocalMainFrame.SetScaleFactor": { + "definition": "SetScaleFactor(float scale);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1304" + }, + "blink.mojom.LocalMainFrame.ClosePage": { + "definition": "ClosePage() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1308" + }, + "blink.mojom.LocalMainFrame.GetFullPageSize": { + "definition": "GetFullPageSize() => (gfx.mojom.Size full_page_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1311" + }, + "blink.mojom.LocalMainFrame.SetInitialFocus": { + "definition": "SetInitialFocus(bool reverse);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1315" + }, + "blink.mojom.LocalMainFrame.EnablePreferredSizeChangedMode": { + "definition": "EnablePreferredSizeChangedMode();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1318" + }, + "blink.mojom.LocalMainFrame.ZoomToFindInPageRect": { + "definition": "ZoomToFindInPageRect(gfx.mojom.Rect rect_in_root_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1322" + }, + "blink.mojom.LocalMainFrame.InstallCoopAccessMonitor": { + "definition": "InstallCoopAccessMonitor( blink.mojom.FrameToken accessed_window, network.mojom.CrossOriginOpenerPolicyReporterParams coop_reporter_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1330" + }, + "blink.mojom.LocalMainFrame.UpdateBrowserControlsState": { + "definition": "UpdateBrowserControlsState( cc.mojom.BrowserControlsState constraints, cc.mojom.BrowserControlsState current, bool animate, cc.mojom.BrowserControlsOffsetTagModifications? offset_tag_modifications);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1353" + }, + "blink.mojom.LocalMainFrame.SetV8CompileHints": { + "definition": "SetV8CompileHints(mojo_base.mojom.ReadOnlySharedMemoryRegion data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1362" + }, + "blink.mojom.LocalMainFrame.Discard": { + "definition": "Discard() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1366" + }, + "blink.mojom.LocalMainFrame.FinalizeNavigationConfidence": { + "definition": "FinalizeNavigationConfidence( double randomized_trigger_rate, ConfidenceLevel confidence);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1370" + }, + "blink.mojom.LocalMainFrameHost.ScaleFactorChanged": { + "definition": "ScaleFactorChanged(float scale);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1382" + }, + "blink.mojom.LocalMainFrameHost.ContentsPreferredSizeChanged": { + "definition": "ContentsPreferredSizeChanged(gfx.mojom.Size pref_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1385" + }, + "blink.mojom.LocalMainFrameHost.TextAutosizerPageInfoChanged": { + "definition": "TextAutosizerPageInfoChanged(TextAutosizerPageInfo page_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1391" + }, + "blink.mojom.LocalMainFrameHost.FocusPage": { + "definition": "FocusPage();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1394" + }, + "blink.mojom.LocalMainFrameHost.TakeFocus": { + "definition": "TakeFocus(bool reverse);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1399" + }, + "blink.mojom.LocalMainFrameHost.UpdateTargetURL": { + "definition": "UpdateTargetURL(url.mojom.Url url) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1405" + }, + "blink.mojom.LocalMainFrameHost.RequestClose": { + "definition": "RequestClose();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1409" + }, + "blink.mojom.LocalMainFrameHost.ShowCreatedWindow": { + "definition": "ShowCreatedWindow(blink.mojom.LocalFrameToken opener_frame_token, ui.mojom.WindowOpenDisposition disposition, blink.mojom.WindowFeatures window_features, bool opened_by_user_gesture) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1414" + }, + "blink.mojom.LocalMainFrameHost.SetWindowRect": { + "definition": "SetWindowRect(gfx.mojom.Rect bounds) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1422" + }, + "blink.mojom.LocalMainFrameHost.DidFirstVisuallyNonEmptyPaint": { + "definition": "DidFirstVisuallyNonEmptyPaint();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1426" + }, + "blink.mojom.LocalMainFrameHost.DidAccessInitialMainDocument": { + "definition": "DidAccessInitialMainDocument();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1431" + }, + "blink.mojom.LocalMainFrameHost.Maximize": { + "definition": "Maximize();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1435" + }, + "blink.mojom.LocalMainFrameHost.Minimize": { + "definition": "Minimize();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1439" + }, + "blink.mojom.LocalMainFrameHost.Restore": { + "definition": "Restore();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1443" + }, + "blink.mojom.LocalMainFrameHost.SetResizable": { + "definition": "SetResizable(bool resizable);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1447" + }, + "blink.mojom.LocalMainFrameHost.DraggableRegionsChanged": { + "definition": "DraggableRegionsChanged(array regions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1451" + }, + "blink.mojom.LocalMainFrameHost.OnFirstContentfulPaint": { + "definition": "OnFirstContentfulPaint(mojo_base.mojom.TimeDelta duration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=1454" + }, + "blink.mojom.SavableSubframe": { + "definition": "struct SavableSubframe { url.mojom.Url original_url; blink.mojom.FrameToken subframe_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=91" + }, + "blink.mojom.GetSavableResourceLinksReply": { + "definition": "struct GetSavableResourceLinksReply { array resources_list; blink.mojom.Referrer referrer; array subframes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=100" + }, + "blink.mojom.FindInPageResultAXParams": { + "definition": "struct FindInPageResultAXParams { int32 request_id; int32 match_index; int32 start_id; int32 start_offset; int32 end_id; int32 end_offset;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=106" + }, + "blink.mojom.DownloadURLParams": { + "definition": "struct DownloadURLParams { url.mojom.Url url; blink.mojom.Referrer? referrer; url.mojom.Origin? initiator_origin; mojo_base.mojom.String16? suggested_name; network.mojom.RedirectMode cross_origin_redirects; pending_remote? blob_url_token; pending_remote? data_url_blob; bool is_context_menu_save = false; bool has_user_gesture = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=128" + }, + "blink.mojom.IframeAttributes": { + "definition": "struct IframeAttributes { network.mojom.ContentSecurityPolicy? parsed_csp_attribute; bool credentialless; bool browsing_topics; bool ad_auction_headers; bool shared_storage_writable_opted_in; string? id; string? name; string? src;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=231" + }, + "blink.mojom.LegacyTechEventCodeLocation": { + "definition": "struct LegacyTechEventCodeLocation { string filename; uint64 line; uint64 column;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=254" + }, + "blink.mojom.PluginActionType": { + "definition": "enum PluginActionType { kRotate90Clockwise, kRotate90Counterclockwise,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=149" + }, + "blink.mojom.JavaScriptExecutionResultType": { + "definition": "enum JavaScriptExecutionResultType { kSuccess, kException,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=155" + }, + "blink.mojom.TraverseCancelledReason": { + "definition": "enum TraverseCancelledReason { kNotFound, kSandboxViolation, kAbortedBeforeCommit,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=163" + }, + "blink.mojom.ViewTransitionSameOriginOptIn": { + "definition": "enum ViewTransitionSameOriginOptIn { kDisabled, kEnabled,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=172" + }, + "blink.mojom.FrameOwnerElementType": { + "definition": "enum FrameOwnerElementType { kNone, kIframe, kObject, kEmbed, kFrame, kFencedframe};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=177" + }, + "blink.mojom.NavigationApiEntryRestoreReason": { + "definition": "enum NavigationApiEntryRestoreReason { kBFCache, kPrerenderActivationPush, kPrerenderActivationReplace};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=186" + }, + "blink.mojom.StorageTypeAccessed": { + "definition": "enum StorageTypeAccessed { kCacheStorage, kIndexedDB, kFileSystem, kWebLocks, kLocalStorage, kSessionStorage};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=192" + }, + "blink.mojom.WindowProxyAccessType": { + "definition": "enum WindowProxyAccessType { kLocation, kClosed, kLength, kSelf, kWindow, kFrames, kOpener, kParent, kTop, kPostMessage, kAnonymousIndexedGetter, kClose, kFocus, kBlur, kAnonymousNamedGetter};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame.mojom;l=203" + }, + "blink.mojom.FrameOwnerProperties": { + "definition": "struct FrameOwnerProperties { string name; ScrollbarMode scrollbar_mode; int32 margin_width; int32 margin_height; bool allow_fullscreen; bool allow_payment_request; bool is_display_none; ColorScheme color_scheme = ColorScheme.kLight; PreferredColorScheme preferred_color_scheme = PreferredColorScheme.kLight;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame_owner_properties.mojom;l=11" + }, + "blink.mojom.FramePolicy": { + "definition": "struct FramePolicy { network.mojom.WebSandboxFlags sandbox_flags; array container_policy; map required_document_policy; DeferredFetchPolicy deferred_fetch_policy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame_policy.mojom;l=17" + }, + "blink.mojom.FrameReplicationState": { + "definition": "struct FrameReplicationState { url.mojom.Origin origin; string name; string unique_name; array permissions_policy_header; network.mojom.WebSandboxFlags active_sandbox_flags = network.mojom.WebSandboxFlags.kNone; blink.mojom.FramePolicy frame_policy; blink.mojom.InsecureRequestPolicy insecure_request_policy = blink.mojom.InsecureRequestPolicy.kLeaveInsecureRequestsAlone; array insecure_navigations_set; bool has_potentially_trustworthy_unique_origin = false; bool has_active_user_gesture = false; bool has_received_user_gesture_before_nav = false; bool is_ad_frame = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame_replication_state.mojom;l=16" + }, + "blink.mojom.FrameVisualProperties": { + "definition": "struct FrameVisualProperties { display.mojom.ScreenInfos screen_infos; bool auto_resize_enabled; bool is_pinch_gesture_active; uint32 capture_sequence_number; double zoom_level; double css_zoom_factor; float page_scale_factor = 1; float compositing_scale_factor = 1; float cursor_accessibility_scale_factor = 1; gfx.mojom.Size visible_viewport_size; gfx.mojom.Size min_size_for_auto_resize; gfx.mojom.Size max_size_for_auto_resize; array root_widget_viewport_segments; gfx.mojom.Rect compositor_viewport; gfx.mojom.Rect rect_in_local_root; gfx.mojom.Size local_frame_size; viz.mojom.LocalSurfaceId local_surface_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/frame_visual_properties.mojom;l=13" + }, + "blink.mojom.FullscreenOptions": { + "definition": "struct FullscreenOptions { bool prefers_navigation_bar = false; bool prefers_status_bar = false; int64 display_id = -1; bool is_prefixed = false; bool is_xr_overlay = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/fullscreen.mojom;l=7" + }, + "blink.mojom.IntrinsicSizingInfo": { + "definition": "struct IntrinsicSizingInfo { gfx.mojom.SizeF size; gfx.mojom.SizeF aspect_ratio; bool has_width; bool has_height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/intrinsic_sizing_info.mojom;l=10" + }, + "blink.mojom.FrameVisibility": { + "definition": "enum FrameVisibility { kRenderedOutOfViewport, kRenderedInViewport, kNotRendered,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/lifecycle.mojom;l=8" + }, + "blink.mojom.FrameLifecycleState": { + "definition": "enum FrameLifecycleState { kRunning, kPaused, kFrozen,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/lifecycle.mojom;l=18" + }, + "blink.mojom.MediaPlayerAction": { + "definition": "struct MediaPlayerAction { MediaPlayerActionType type = kDefaultActionType; bool enable = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/media_player_action.mojom;l=21" + }, + "blink.mojom.MediaPlayerActionType": { + "definition": "enum MediaPlayerActionType { kLoop, kControls, kSaveVideoFrameAs, kCopyVideoFrame, kPictureInPicture, kDefaultActionType = kPictureInPicture};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/media_player_action.mojom;l=8" + }, + "blink.mojom.PolicyContainerHost.SetReferrerPolicy": { + "definition": "SetReferrerPolicy(network.mojom.ReferrerPolicy referrer_policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/policy_container.mojom;l=46" + }, + "blink.mojom.PolicyContainerHost.AddContentSecurityPolicies": { + "definition": "AddContentSecurityPolicies(array content_security_policies);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/policy_container.mojom;l=49" + }, + "blink.mojom.PolicyContainerPolicies": { + "definition": "struct PolicyContainerPolicies { network.mojom.ConnectionAllowlists connection_allowlists; network.mojom.CrossOriginEmbedderPolicy cross_origin_embedder_policy; network.mojom.IntegrityPolicy integrity_policy; network.mojom.IntegrityPolicy integrity_policy_report_only; network.mojom.ReferrerPolicy referrer_policy = network.mojom.ReferrerPolicy.kDefault; array content_security_policies; bool is_credentialless = false; network.mojom.WebSandboxFlags sandbox_flags = network.mojom.WebSandboxFlags.kNone; network.mojom.IPAddressSpace ip_address_space = network.mojom.IPAddressSpace.kUnknown; bool can_navigate_top_without_user_gesture = true; bool cross_origin_isolation_enabled_by_dip = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/policy_container.mojom;l=19" + }, + "blink.mojom.PolicyContainer": { + "definition": "struct PolicyContainer { PolicyContainerPolicies policies; pending_associated_remote remote;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/policy_container.mojom;l=56" + }, + "blink.mojom.PolicyContainerBindParams": { + "definition": "struct PolicyContainerBindParams { pending_associated_receiver receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/policy_container.mojom;l=70" + }, + "blink.mojom.RemoteFrameHost.SetInheritedEffectiveTouchAction": { + "definition": "SetInheritedEffectiveTouchAction(cc.mojom.TouchAction touch_action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=192" + }, + "blink.mojom.RemoteFrameHost.UpdateRenderThrottlingStatus": { + "definition": "UpdateRenderThrottlingStatus( bool is_throttled, bool subtree_throttled, bool display_locked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=200" + }, + "blink.mojom.RemoteFrameHost.VisibilityChanged": { + "definition": "VisibilityChanged(blink.mojom.FrameVisibility visibility);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=207" + }, + "blink.mojom.RemoteFrameHost.DidFocusFrame": { + "definition": "DidFocusFrame();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=210" + }, + "blink.mojom.RemoteFrameHost.CheckCompleted": { + "definition": "CheckCompleted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=215" + }, + "blink.mojom.RemoteFrameHost.CapturePaintPreviewOfCrossProcessSubframe": { + "definition": "CapturePaintPreviewOfCrossProcessSubframe( gfx.mojom.Rect clip_rect, mojo_base.mojom.UnguessableToken guid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=222" + }, + "blink.mojom.RemoteFrameHost.SetIsInert": { + "definition": "SetIsInert(bool inert);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=230" + }, + "blink.mojom.RemoteFrameHost.DidChangeOpener": { + "definition": "DidChangeOpener(blink.mojom.LocalFrameToken? opener_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=235" + }, + "blink.mojom.RemoteFrameHost.AdvanceFocus": { + "definition": "AdvanceFocus(blink.mojom.FocusType focus_type, blink.mojom.LocalFrameToken source_frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=242" + }, + "blink.mojom.RemoteFrameHost.RouteMessageEvent": { + "definition": "RouteMessageEvent(blink.mojom.LocalFrameToken? source_frame_token, url.mojom.Origin source_origin, url.mojom.Origin? target_origin, blink.mojom.TransferableMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=268" + }, + "blink.mojom.RemoteFrameHost.PrintCrossProcessSubframe": { + "definition": "PrintCrossProcessSubframe( gfx.mojom.Rect frame_content_rect, int32 document_cookie);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=279" + }, + "blink.mojom.RemoteFrameHost.Detach": { + "definition": "Detach();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=283" + }, + "blink.mojom.RemoteFrameHost.UpdateViewportIntersection": { + "definition": "UpdateViewportIntersection( ViewportIntersectionState intersection_state, FrameVisualProperties? visual_properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=288" + }, + "blink.mojom.RemoteFrameHost.SynchronizeVisualProperties": { + "definition": "SynchronizeVisualProperties( FrameVisualProperties properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=293" + }, + "blink.mojom.RemoteFrameHost.OpenURL": { + "definition": "OpenURL(blink.mojom.OpenURLParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=297" + }, + "blink.mojom.RemoteFrame.WillEnterFullscreen": { + "definition": "WillEnterFullscreen(FullscreenOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=313" + }, + "blink.mojom.RemoteFrame.EnforceInsecureNavigationsSet": { + "definition": "EnforceInsecureNavigationsSet(array set);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=318" + }, + "blink.mojom.RemoteFrame.SetFrameOwnerProperties": { + "definition": "SetFrameOwnerProperties(FrameOwnerProperties properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=325" + }, + "blink.mojom.RemoteFrame.EnforceInsecureRequestPolicy": { + "definition": "EnforceInsecureRequestPolicy(blink.mojom.InsecureRequestPolicy policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=330" + }, + "blink.mojom.RemoteFrame.SetReplicatedOrigin": { + "definition": "SetReplicatedOrigin(url.mojom.Origin origin, bool is_potentially_trustworthy_unique_origin);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=334" + }, + "blink.mojom.RemoteFrame.SetReplicatedIsAdFrame": { + "definition": "SetReplicatedIsAdFrame(bool is_ad_frame);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=339" + }, + "blink.mojom.RemoteFrame.SetReplicatedName": { + "definition": "SetReplicatedName(string name, string unique_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=343" + }, + "blink.mojom.RemoteFrame.DispatchLoadEventForFrameOwner": { + "definition": "DispatchLoadEventForFrameOwner();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=347" + }, + "blink.mojom.RemoteFrame.SetNeedsOcclusionTracking": { + "definition": "SetNeedsOcclusionTracking(bool needs_tracking);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=352" + }, + "blink.mojom.RemoteFrame.Collapse": { + "definition": "Collapse(bool collapsed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=358" + }, + "blink.mojom.RemoteFrame.Focus": { + "definition": "Focus();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=362" + }, + "blink.mojom.RemoteFrame.SetHadStickyUserActivationBeforeNavigation": { + "definition": "SetHadStickyUserActivationBeforeNavigation(bool has_gesture);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=366" + }, + "blink.mojom.RemoteFrame.BubbleLogicalScroll": { + "definition": "BubbleLogicalScroll(ScrollDirection direction, ui.mojom.ScrollGranularity granularity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=370" + }, + "blink.mojom.RemoteFrame.UpdateUserActivationState": { + "definition": "UpdateUserActivationState(blink.mojom.UserActivationUpdateType state_update_type, UserActivationNotificationType notification_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=379" + }, + "blink.mojom.RemoteFrame.SetEmbeddingToken": { + "definition": "SetEmbeddingToken(mojo_base.mojom.UnguessableToken embedding_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=385" + }, + "blink.mojom.RemoteFrame.SetPageFocus": { + "definition": "SetPageFocus(bool is_focused);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=388" + }, + "blink.mojom.RemoteFrame.RenderFallbackContent": { + "definition": "RenderFallbackContent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=393" + }, + "blink.mojom.RemoteFrame.AddResourceTimingFromChild": { + "definition": "AddResourceTimingFromChild(ResourceTimingInfo timing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=397" + }, + "blink.mojom.RemoteFrame.ScrollRectToVisible": { + "definition": "ScrollRectToVisible(gfx.mojom.RectF rect, ScrollIntoViewParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=401" + }, + "blink.mojom.RemoteFrame.DidStartLoading": { + "definition": "DidStartLoading();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=405" + }, + "blink.mojom.RemoteFrame.DidStopLoading": { + "definition": "DidStopLoading();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=409" + }, + "blink.mojom.RemoteFrame.IntrinsicSizingInfoOfChildChanged": { + "definition": "IntrinsicSizingInfoOfChildChanged(IntrinsicSizingInfo sizing_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=415" + }, + "blink.mojom.RemoteFrame.DidSetFramePolicyHeaders": { + "definition": "DidSetFramePolicyHeaders(network.mojom.WebSandboxFlags sandbox_flags, array parsed_permissions_policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=419" + }, + "blink.mojom.RemoteFrame.DidUpdateFramePolicy": { + "definition": "DidUpdateFramePolicy(blink.mojom.FramePolicy frame_policy);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=424" + }, + "blink.mojom.RemoteFrame.UpdateOpener": { + "definition": "UpdateOpener(blink.mojom.FrameToken? opener_frame_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=428" + }, + "blink.mojom.RemoteFrame.DetachAndDispose": { + "definition": "DetachAndDispose();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=433" + }, + "blink.mojom.RemoteFrame.EnableAutoResize": { + "definition": "EnableAutoResize(gfx.mojom.Size min_size, gfx.mojom.Size max_size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=437" + }, + "blink.mojom.RemoteFrame.DisableAutoResize": { + "definition": "DisableAutoResize();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=441" + }, + "blink.mojom.RemoteFrame.DidUpdateVisualProperties": { + "definition": "DidUpdateVisualProperties(cc.mojom.RenderFrameMetadata metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=445" + }, + "blink.mojom.RemoteFrame.SetFrameSinkId": { + "definition": "SetFrameSinkId(viz.mojom.FrameSinkId frame_sink_id, bool allow_paint_holding);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=453" + }, + "blink.mojom.RemoteFrame.ChildProcessGone": { + "definition": "ChildProcessGone();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=457" + }, + "blink.mojom.RemoteFrame.CreateRemoteChild": { + "definition": "CreateRemoteChild(blink.mojom.RemoteFrameToken token, blink.mojom.FrameToken? opener_frame_token, blink.mojom.TreeScopeType tree_scope_type, blink.mojom.FrameReplicationState replication_state, blink.mojom.FrameOwnerProperties owner_properties, bool is_loading, mojo_base.mojom.UnguessableToken devtools_frame_token, RemoteFrameInterfacesFromBrowser remote_frame_interfaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=481" + }, + "blink.mojom.RemoteFrame.CreateRemoteChildren": { + "definition": "CreateRemoteChildren( array params, mojo_base.mojom.UnguessableToken? navigation_metrics_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=497" + }, + "blink.mojom.RemoteFrame.ForwardFencedFrameEventToEmbedder": { + "definition": "ForwardFencedFrameEventToEmbedder(string event_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=508" + }, + "blink.mojom.RemoteMainFrame.UpdateTextAutosizerPageInfo": { + "definition": "UpdateTextAutosizerPageInfo(blink.mojom.TextAutosizerPageInfo page_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=522" + }, + "blink.mojom.RemoteMainFrameHost.FocusPage": { + "definition": "FocusPage();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=529" + }, + "blink.mojom.RemoteMainFrameHost.TakeFocus": { + "definition": "TakeFocus(bool reverse);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=534" + }, + "blink.mojom.RemoteMainFrameHost.UpdateTargetURL": { + "definition": "UpdateTargetURL(url.mojom.Url url) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=540" + }, + "blink.mojom.RemoteMainFrameHost.RouteCloseEvent": { + "definition": "RouteCloseEvent();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=544" + }, + "blink.mojom.RemoteMainFrameInterfaces": { + "definition": "struct RemoteMainFrameInterfaces { pending_associated_remote main_frame_host; pending_associated_receiver main_frame;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=51" + }, + "blink.mojom.RemoteFrameInterfacesFromRenderer": { + "definition": "struct RemoteFrameInterfacesFromRenderer { pending_associated_remote frame; pending_associated_receiver frame_host_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=57" + }, + "blink.mojom.RemoteFrameInterfacesFromBrowser": { + "definition": "struct RemoteFrameInterfacesFromBrowser { pending_associated_receiver frame_receiver; pending_associated_remote frame_host;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=63" + }, + "blink.mojom.CreateRemoteChildParams": { + "definition": "struct CreateRemoteChildParams { blink.mojom.RemoteFrameToken token; blink.mojom.FrameToken? opener_frame_token; blink.mojom.TreeScopeType tree_scope_type; blink.mojom.FrameReplicationState replication_state; blink.mojom.FrameOwnerProperties owner_properties; bool is_loading; mojo_base.mojom.UnguessableToken devtools_frame_token; blink.mojom.RemoteFrameInterfacesFromBrowser frame_interfaces; array child_params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=71" + }, + "blink.mojom.OpenURLParams": { + "definition": "struct OpenURLParams { url.mojom.Url url; url.mojom.Origin initiator_origin; url.mojom.Url? initiator_base_url; mojo_base.mojom.TimeTicks actual_navigation_start; blink.mojom.LocalFrameToken? initiator_frame_token; network.mojom.URLRequestBody? post_body; string extra_headers; blink.mojom.Referrer referrer; bool is_form_submission; ui.mojom.WindowOpenDisposition disposition; bool should_replace_current_entry; bool user_gesture; bool is_unfenced_top_navigation = false; blink.mojom.TriggeringEventInfo triggering_event_info; pending_remote? blob_url_token; string href_translate; Impression? impression; NavigationDownloadPolicy download_policy; network.mojom.SourceLocation source_location; pending_remote? initiator_navigation_state_keep_alive_handle; blink.mojom.NavigationInitiatorActivationAndAdStatus initiator_activation_and_ad_status; bool is_container_initiated = false; bool has_rel_opener = false; network.mojom.StorageAccessApiStatus storage_access_api_status = kNone;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/remote_frame.mojom;l=93" + }, + "blink.mojom.ReportingObserver.Notify": { + "definition": "Notify(Report report);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/reporting_observer.mojom;l=36" + }, + "blink.mojom.ReportBodyElement": { + "definition": "struct ReportBodyElement { string name; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/reporting_observer.mojom;l=9" + }, + "blink.mojom.ReportBody": { + "definition": "struct ReportBody { array body;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/reporting_observer.mojom;l=17" + }, + "blink.mojom.Report": { + "definition": "struct Report { string type; url.mojom.Url url; ReportBody? body;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/reporting_observer.mojom;l=22" + }, + "blink.mojom.SuddenTerminationDisablerType": { + "definition": "enum SuddenTerminationDisablerType { kBeforeUnloadHandler, kPageHideHandler, kUnloadHandler, kVisibilityChangeHandler};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/sudden_termination_disabler_type.mojom;l=9" + }, + "blink.mojom.TextAutosizerPageInfo": { + "definition": "struct TextAutosizerPageInfo { int32 main_frame_width; int32 main_frame_layout_width; float device_scale_adjustment;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/text_autosizer_page_info.mojom;l=7" + }, + "blink.mojom.TreeScopeType": { + "definition": "enum TreeScopeType { kDocument, kShadow,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/tree_scope_type.mojom;l=9" + }, + "blink.mojom.TriggeringEventInfo": { + "definition": "enum TriggeringEventInfo { kUnknown, kNotFromEvent, kFromTrustedEvent, kFromUntrustedEvent,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/triggering_event_info.mojom;l=7" + }, + "blink.mojom.UserActivationNotificationType": { + "definition": "enum UserActivationNotificationType { kNone, kInteraction, kDevTools, kExtensionEvent, kExtensionGuestView, kExtensionMessaging, kMedia, kFileSystemAccess, kPlugin, kTest, kWebScriptExec, kVoiceSearch, kExtensionMessagingBothPrivileged, kExtensionMessagingSenderPrivileged, kExtensionMessagingReceiverPrivileged, kExtensionMessagingNeitherPrivileged};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/user_activation_notification_type.mojom;l=8" + }, + "blink.mojom.UserActivationUpdateType": { + "definition": "enum UserActivationUpdateType { kNotifyActivation, kNotifyActivationStickyOnly, kConsumeTransientActivation, kClearActivation};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/user_activation_update_types.mojom;l=9" + }, + "blink.mojom.ViewTransitionElementLayeredBoxProperties": { + "definition": "struct ViewTransitionElementLayeredBoxProperties { gfx.mojom.RectF content_box; gfx.mojom.RectF padding_box; ViewTransitionElementBoxSizing box_sizing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/view_transition_state.mojom;l=28" + }, + "blink.mojom.ViewTransitionElement": { + "definition": "struct ViewTransitionElement { string tag_name; gfx.mojom.RectF border_box_rect_in_enclosing_layer_css_space; gfx.mojom.Transform viewport_matrix; gfx.mojom.RectF overflow_rect_in_layout_space; gfx.mojom.RectF? captured_rect_in_layout_space; viz.mojom.ViewTransitionElementResourceId snapshot_id; int32 paint_order; map captured_css_properties; map group_children_css_properties; gfx.mojom.Vector2d border_offset; array class_list; string containing_group_name; ViewTransitionElementLayeredBoxProperties? layered_box_properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/view_transition_state.mojom;l=40" + }, + "blink.mojom.ViewTransitionState": { + "definition": "struct ViewTransitionState { array elements; blink.mojom.ViewTransitionToken transition_token; gfx.mojom.Size snapshot_root_size_at_capture; float device_pixel_ratio; uint32 next_element_resource_id; viz.mojom.ViewTransitionElementResourceId subframe_snapshot_id; map id_to_auto_name_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/view_transition_state.mojom;l=96" + }, + "blink.mojom.ViewTransitionPropertyId": { + "definition": "enum ViewTransitionPropertyId { kBackdropFilter, kBorderRadius, kBorderWidth, kColorScheme, kCornerShape, kMixBlendMode, kTextOrientation, kWritingMode,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/view_transition_state.mojom;l=12" + }, + "blink.mojom.ViewTransitionElementBoxSizing": { + "definition": "enum ViewTransitionElementBoxSizing { kBorderBox, kContentBox,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/view_transition_state.mojom;l=23" + }, + "blink.mojom.ViewportIntersectionState": { + "definition": "struct ViewportIntersectionState { gfx.mojom.Rect viewport_intersection; gfx.mojom.Rect main_frame_intersection; gfx.mojom.Rect compositor_visible_rect; FrameOcclusionState occlusion_state = FrameOcclusionState.kUnknown; gfx.mojom.Size outermost_main_frame_size; gfx.mojom.Point outermost_main_frame_scroll_position; gfx.mojom.Transform main_frame_transform;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/viewport_intersection_state.mojom;l=23" + }, + "blink.mojom.FrameOcclusionState": { + "definition": "enum FrameOcclusionState { kUnknown = 0, kPossiblyOccluded = 1, kGuaranteedNotOccluded = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame/viewport_intersection_state.mojom;l=12" + }, + "blink.mojom.SurfaceEmbedder.SetLocalSurfaceId": { + "definition": "SetLocalSurfaceId(viz.mojom.LocalSurfaceId local_surface_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=17" + }, + "blink.mojom.SurfaceEmbedder.OnOpacityChanged": { + "definition": "OnOpacityChanged(bool is_opaque);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=21" + }, + "blink.mojom.EmbeddedFrameSinkClient.BindSurfaceEmbedder": { + "definition": "BindSurfaceEmbedder(pending_receiver embedder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=29" + }, + "blink.mojom.EmbeddedFrameSinkProvider.RegisterEmbeddedFrameSink": { + "definition": "RegisterEmbeddedFrameSink(viz.mojom.FrameSinkId parent_frame_sink_id, viz.mojom.FrameSinkId frame_sink_id, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=40" + }, + "blink.mojom.EmbeddedFrameSinkProvider.RegisterEmbeddedFrameSinkBundle": { + "definition": "RegisterEmbeddedFrameSinkBundle( viz.mojom.FrameSinkBundleId bundle_id, pending_receiver receiver, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=49" + }, + "blink.mojom.EmbeddedFrameSinkProvider.CreateCompositorFrameSink": { + "definition": "CreateCompositorFrameSink(viz.mojom.FrameSinkId frame_sink_id, pending_remote client, pending_receiver sink);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=56" + }, + "blink.mojom.EmbeddedFrameSinkProvider.CreateBundledCompositorFrameSink": { + "definition": "CreateBundledCompositorFrameSink( viz.mojom.FrameSinkId frame_sink_id, viz.mojom.FrameSinkBundleId bundle_id, pending_remote client, pending_receiver sink);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=63" + }, + "blink.mojom.EmbeddedFrameSinkProvider.CreateSimpleCompositorFrameSink": { + "definition": "CreateSimpleCompositorFrameSink(viz.mojom.FrameSinkId parent_frame_sink_id, viz.mojom.FrameSinkId frame_sink_id, pending_remote surface_client, pending_remote client, pending_receiver sink);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=71" + }, + "blink.mojom.EmbeddedFrameSinkProvider.ConnectToEmbedder": { + "definition": "ConnectToEmbedder(viz.mojom.FrameSinkId frame_sink_id, pending_receiver embedder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=80" + }, + "blink.mojom.EmbeddedFrameSinkProvider.RegisterFrameSinkHierarchy": { + "definition": "RegisterFrameSinkHierarchy(viz.mojom.FrameSinkId frame_sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=88" + }, + "blink.mojom.EmbeddedFrameSinkProvider.UnregisterFrameSinkHierarchy": { + "definition": "UnregisterFrameSinkHierarchy(viz.mojom.FrameSinkId frame_sink_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/frame_sinks/embedded_frame_sink.mojom;l=94" + }, + "blink.mojom.GeolocationService.CreateGeolocation": { + "definition": "CreateGeolocation(pending_receiver receiver, bool user_gesture) => (PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/geolocation/geolocation_service.mojom;l=19" + }, + "blink.mojom.GpuDataManager.Are3DAPIsBlockedForUrl": { + "definition": "[Sync] Are3DAPIsBlockedForUrl(url.mojom.Url url) => (bool blocked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/gpu/gpu.mojom;l=16" + }, + "handwriting.mojom.HandwritingRecognizer.GetPrediction": { + "definition": "GetPrediction(array strokes, HandwritingHints hints) => (array? prediction);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=151" + }, + "handwriting.mojom.HandwritingRecognitionService.CreateHandwritingRecognizer": { + "definition": "CreateHandwritingRecognizer(HandwritingModelConstraint constraint) => (CreateHandwritingRecognizerResult result, pending_remote? handwriting_recognizer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=162" + }, + "handwriting.mojom.HandwritingRecognitionService.QueryHandwritingRecognizer": { + "definition": "QueryHandwritingRecognizer(HandwritingModelConstraint? constraint) => (QueryHandwritingRecognizerResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=168" + }, + "handwriting.mojom.HandwritingPoint": { + "definition": "struct HandwritingPoint { gfx.mojom.PointF location; mojo_base.mojom.TimeDelta? t;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=29" + }, + "handwriting.mojom.HandwritingStroke": { + "definition": "struct HandwritingStroke { array points;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=41" + }, + "handwriting.mojom.HandwritingDrawingSegment": { + "definition": "struct HandwritingDrawingSegment { uint32 stroke_index; uint32 begin_point_index; uint32 end_point_index;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=53" + }, + "handwriting.mojom.HandwritingSegment": { + "definition": "struct HandwritingSegment { string grapheme; uint32 begin_index; uint32 end_index; array drawing_segments;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=66" + }, + "handwriting.mojom.HandwritingPrediction": { + "definition": "struct HandwritingPrediction { string text; array segmentation_result;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=80" + }, + "handwriting.mojom.HandwritingHints": { + "definition": "struct HandwritingHints { string recognition_type; string input_type; string? text_context; uint32 alternatives;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=87" + }, + "handwriting.mojom.HandwritingHintsQueryResult": { + "definition": "struct HandwritingHintsQueryResult { array recognition_type; array input_type; bool text_context; bool alternatives;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=118" + }, + "handwriting.mojom.QueryHandwritingRecognizerResult": { + "definition": "struct QueryHandwritingRecognizerResult { bool text_alternatives; bool text_segmentation; HandwritingHintsQueryResult hints;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=127" + }, + "handwriting.mojom.HandwritingModelConstraint": { + "definition": "struct HandwritingModelConstraint { array languages;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=135" + }, + "handwriting.mojom.HandwritingRecognitionType": { + "definition": "enum HandwritingRecognitionType { kText,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=106" + }, + "handwriting.mojom.HandwritingInputType": { + "definition": "enum HandwritingInputType { kMouse, kStylus, kTouch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=110" + }, + "handwriting.mojom.CreateHandwritingRecognizerResult": { + "definition": "enum CreateHandwritingRecognizerResult { kOk, kError, kNotSupported,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/handwriting/handwriting.mojom;l=172" + }, + "blink.mojom.HidService.RegisterClient": { + "definition": "RegisterClient(pending_associated_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=76" + }, + "blink.mojom.HidService.GetDevices": { + "definition": "GetDevices() => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=80" + }, + "blink.mojom.HidService.RequestDevice": { + "definition": "RequestDevice(array filters, array exclusion_filters) => (array devices);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=90" + }, + "blink.mojom.HidService.Connect": { + "definition": "Connect(string device_guid, pending_remote client) => (pending_remote? connection);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=98" + }, + "blink.mojom.HidService.Forget": { + "definition": "Forget(device.mojom.HidDeviceInfo device_info) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=103" + }, + "blink.mojom.VendorAndProduct": { + "definition": "struct VendorAndProduct { uint16 vendor; uint16 product;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=23" + }, + "blink.mojom.HidDeviceFilter": { + "definition": "struct HidDeviceFilter { DeviceIdFilter? device_ids; UsageFilter? usage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=54" + }, + "blink.mojom.DeviceIdFilter": { + "definition": "union DeviceIdFilter { uint16 vendor; VendorAndProduct vendor_and_product;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=30" + }, + "blink.mojom.UsageFilter": { + "definition": "union UsageFilter { uint16 page; device.mojom.HidUsageAndPage usage_and_page;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hid/hid.mojom;l=46" + }, + "blink.mojom.Hyphenation.OpenDictionary": { + "definition": "[Sync] OpenDictionary(string locale) => (mojo_base.mojom.ReadOnlyFile? hyphenation_dictionary_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/hyphenation/hyphenation.mojom;l=12" + }, + "blink.mojom.IdleMonitor.Update": { + "definition": "Update(IdleState state, bool is_overridden_by_devtools);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/idle/idle_manager.mojom;l=33" + }, + "blink.mojom.IdleManager.AddMonitor": { + "definition": "AddMonitor(pending_remote monitor) => (IdleManagerError error, IdleState? state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/idle/idle_manager.mojom;l=46" + }, + "blink.mojom.IdleState": { + "definition": "struct IdleState { mojo_base.mojom.TimeDelta? idle_time; bool screen_locked;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/idle/idle_manager.mojom;l=18" + }, + "blink.mojom.IdleManagerError": { + "definition": "enum IdleManagerError { kSuccess, kPermissionDisabled,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/idle/idle_manager.mojom;l=13" + }, + "blink.mojom.ImageDownloader.DownloadImage": { + "definition": "DownloadImage(url.mojom.Url url, bool is_favicon, gfx.mojom.Size preferred_size, uint32 max_bitmap_size, bool bypass_cache) => (int32 http_status_code, array images, array original_image_sizes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/image_downloader/image_downloader.mojom;l=18" + }, + "blink.mojom.ImageDownloader.DownloadImageFromAxNode": { + "definition": "DownloadImageFromAxNode(int32 ax_node_id, gfx.mojom.Size preferred_size, uint32 max_bitmap_size, bool bypass_cache) => (int32 http_status_code, array images, array original_image_sizes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/image_downloader/image_downloader.mojom;l=33" + }, + "blink.mojom.IDBFactoryClient.Error": { + "definition": "Error(IDBException code, mojo_base.mojom.String16 message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=256" + }, + "blink.mojom.IDBFactoryClient.Blocked": { + "definition": "Blocked(int64 existing_version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=257" + }, + "blink.mojom.IDBFactoryClient.UpgradeNeeded": { + "definition": "UpgradeNeeded(pending_associated_remote pending_database, int64 old_version, IDBDataLoss data_loss, string data_loss_message, IDBDatabaseMetadata db_metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=260" + }, + "blink.mojom.IDBFactoryClient.OpenSuccess": { + "definition": "OpenSuccess(pending_associated_remote? pending_database, IDBDatabaseMetadata metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=263" + }, + "blink.mojom.IDBFactoryClient.DeleteSuccess": { + "definition": "DeleteSuccess(int64 old_version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=267" + }, + "blink.mojom.IDBDatabaseCallbacks.ForcedClose": { + "definition": "ForcedClose();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=274" + }, + "blink.mojom.IDBDatabaseCallbacks.VersionChange": { + "definition": "VersionChange(int64 old_version, int64 new_version);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=275" + }, + "blink.mojom.IDBDatabaseCallbacks.Abort": { + "definition": "Abort(int64 transaction_id, IDBException code, mojo_base.mojom.String16 message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=276" + }, + "blink.mojom.IDBDatabaseCallbacks.Complete": { + "definition": "Complete(int64 transaction_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=278" + }, + "blink.mojom.IDBCursor.Advance": { + "definition": "Advance(uint32 count) => (IDBCursorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=305" + }, + "blink.mojom.IDBCursor.Continue": { + "definition": "Continue(IDBKey key, IDBKey primary_key) => (IDBCursorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=306" + }, + "blink.mojom.IDBCursor.Prefetch": { + "definition": "Prefetch(int32 count) => (IDBCursorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=307" + }, + "blink.mojom.IDBCursor.PrefetchReset": { + "definition": "PrefetchReset(int32 used_prefetches);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=308" + }, + "blink.mojom.IDBTransaction.CreateObjectStore": { + "definition": "CreateObjectStore(int64 object_store_id, mojo_base.mojom.String16 name, IDBKeyPath key_path, bool auto_increment);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=317" + }, + "blink.mojom.IDBTransaction.DeleteObjectStore": { + "definition": "DeleteObjectStore(int64 object_store_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=321" + }, + "blink.mojom.IDBTransaction.Put": { + "definition": "Put(int64 object_store_id, IDBValue value, IDBKey key, IDBPutMode mode, array index_keys) => (IDBTransactionPutResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=322" + }, + "blink.mojom.IDBTransaction.SetIndexKeys": { + "definition": "SetIndexKeys(int64 object_store_id, IDBKey primary_key, IDBIndexKeys index_keys);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=333" + }, + "blink.mojom.IDBTransaction.SetIndexKeysDone": { + "definition": "SetIndexKeysDone();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=337" + }, + "blink.mojom.IDBTransaction.Commit": { + "definition": "Commit(int64 num_errors_handled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=338" + }, + "blink.mojom.IDBDatabaseGetAllResultSink.ReceiveResults": { + "definition": "ReceiveResults(array records, bool done);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=353" + }, + "blink.mojom.IDBDatabaseGetAllResultSink.OnError": { + "definition": "OnError(IDBError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=358" + }, + "blink.mojom.IDBDatabase.RenameObjectStore": { + "definition": "RenameObjectStore(int64 transaction_id, int64 object_store_id, mojo_base.mojom.String16 new_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=378" + }, + "blink.mojom.IDBDatabase.CreateTransaction": { + "definition": "CreateTransaction(pending_associated_receiver transaction_receiver, int64 transaction_id, array object_store_ids, IDBTransactionMode mode, IDBTransactionDurability durability);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=381" + }, + "blink.mojom.IDBDatabase.VersionChangeIgnored": { + "definition": "VersionChangeIgnored();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=386" + }, + "blink.mojom.IDBDatabase.Get": { + "definition": "Get(int64 transaction_id, int64 object_store_id, int64 index_id, IDBKeyRange key_range, bool key_only) => (IDBDatabaseGetResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=387" + }, + "blink.mojom.IDBDatabase.GetAll": { + "definition": "GetAll(int64 transaction_id, int64 object_store_id, int64 index_id, IDBKeyRange key_range, IDBGetAllResultType result_type, int64 max_count, IDBCursorDirection direction) => (pending_associated_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=401" + }, + "blink.mojom.IDBDatabase.OpenCursor": { + "definition": "OpenCursor(int64 transaction_id, int64 object_store_id, int64 index_id, IDBKeyRange key_range, IDBCursorDirection direction, bool key_only, IDBTaskType task_type) => (IDBDatabaseOpenCursorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=409" + }, + "blink.mojom.IDBDatabase.Count": { + "definition": "Count(int64 transaction_id, int64 object_store_id, int64 index_id, IDBKeyRange key_range) => (bool success, uint32 count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=419" + }, + "blink.mojom.IDBDatabase.DeleteRange": { + "definition": "DeleteRange(int64 transaction_id, int64 object_store_id, IDBKeyRange key_range) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=424" + }, + "blink.mojom.IDBDatabase.GetKeyGeneratorCurrentNumber": { + "definition": "GetKeyGeneratorCurrentNumber(int64 transaction_id, int64 object_store_id) => (int64 result, IDBError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=428" + }, + "blink.mojom.IDBDatabase.Clear": { + "definition": "Clear(int64 transaction_id, int64 object_store_id) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=431" + }, + "blink.mojom.IDBDatabase.CreateIndex": { + "definition": "CreateIndex(int64 transaction_id, int64 object_store_id, IDBIndexMetadata index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=434" + }, + "blink.mojom.IDBDatabase.DeleteIndex": { + "definition": "DeleteIndex(int64 transaction_id, int64 object_store_id, int64 index_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=437" + }, + "blink.mojom.IDBDatabase.RenameIndex": { + "definition": "RenameIndex(int64 transaction_id, int64 object_store_id, int64 index_id, mojo_base.mojom.String16 new_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=440" + }, + "blink.mojom.IDBDatabase.Abort": { + "definition": "Abort(int64 transaction_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=444" + }, + "blink.mojom.IDBDatabase.DidBecomeInactive": { + "definition": "DidBecomeInactive();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=449" + }, + "blink.mojom.IDBDatabase.UpdatePriority": { + "definition": "UpdatePriority(int32 new_priority);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=455" + }, + "blink.mojom.IDBFactory.GetDatabaseInfo": { + "definition": "GetDatabaseInfo() => (array names_and_versions, IDBError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=461" + }, + "blink.mojom.IDBFactory.Open": { + "definition": "Open(pending_associated_remote client, pending_associated_remote database_callbacks, mojo_base.mojom.String16 name, int64 version, pending_associated_receiver version_change_transaction_receiver, int64 transaction_id, int32 priority);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=473" + }, + "blink.mojom.IDBFactory.DeleteDatabase": { + "definition": "DeleteDatabase(pending_associated_remote client, mojo_base.mojom.String16 name, bool force_close);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=483" + }, + "blink.mojom.IDBKeyPath": { + "definition": "struct IDBKeyPath { IDBKeyPathData? data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=120" + }, + "blink.mojom.IDBKeyRange": { + "definition": "struct IDBKeyRange { IDBKey lower; IDBKey upper; bool lower_open; bool upper_open;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=125" + }, + "blink.mojom.IDBIndexMetadata": { + "definition": "struct IDBIndexMetadata { int64 id; mojo_base.mojom.String16 name; IDBKeyPath key_path; bool unique; bool multi_entry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=173" + }, + "blink.mojom.IDBObjectStoreMetadata": { + "definition": "struct IDBObjectStoreMetadata { int64 id; mojo_base.mojom.String16 name; IDBKeyPath key_path; bool auto_increment; int64 max_index_id; map indexes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=181" + }, + "blink.mojom.IDBDatabaseMetadata": { + "definition": "struct IDBDatabaseMetadata { mojo_base.mojom.String16 name; int64 version; int64 max_object_store_id; map object_stores; bool was_cold_open; bool is_sqlite;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=190" + }, + "blink.mojom.IDBNameAndVersion": { + "definition": "struct IDBNameAndVersion { mojo_base.mojom.String16 name; int64 version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=200" + }, + "blink.mojom.IDBIndexKeys": { + "definition": "struct IDBIndexKeys { int64 index_id; array index_keys;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=205" + }, + "blink.mojom.IDBFileInfo": { + "definition": "struct IDBFileInfo { mojo_base.mojom.String16 name; mojo_base.mojom.Time last_modified;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=210" + }, + "blink.mojom.IDBBlobInfo": { + "definition": "struct IDBBlobInfo { pending_remote blob; mojo_base.mojom.String16 mime_type; int64 size; IDBFileInfo? file;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=215" + }, + "blink.mojom.IDBValue": { + "definition": "struct IDBValue { array bits; array external_objects;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=227" + }, + "blink.mojom.IDBReturnValue": { + "definition": "struct IDBReturnValue { IDBValue value; IDBKey primary_key; IDBKeyPath key_path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=232" + }, + "blink.mojom.IDBRecord": { + "definition": "struct IDBRecord { IDBKey? primary_key; IDBReturnValue? return_value; IDBKey? index_key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=243" + }, + "blink.mojom.IDBError": { + "definition": "struct IDBError { IDBException error_code; mojo_base.mojom.String16 error_message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=281" + }, + "blink.mojom.IDBCursorValue": { + "definition": "struct IDBCursorValue { array keys; array primary_keys; array values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=286" + }, + "blink.mojom.IDBDatabaseOpenCursorValue": { + "definition": "struct IDBDatabaseOpenCursorValue { pending_associated_remote cursor; IDBKey key; IDBKey primary_key; IDBValue? value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=361" + }, + "blink.mojom.IDBCursorDirection": { + "definition": "enum IDBCursorDirection { Next, NextNoDuplicate, Prev, PrevNoDuplicate,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=36" + }, + "blink.mojom.IDBDataLoss": { + "definition": "enum IDBDataLoss { None, Total,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=43" + }, + "blink.mojom.IDBKeyType": { + "definition": "enum IDBKeyType { Invalid, Array, Binary, String, Date, Number, None, Min,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=49" + }, + "blink.mojom.IDBTransactionDurability": { + "definition": "enum IDBTransactionDurability { Default, Strict, Relaxed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=75" + }, + "blink.mojom.IDBGetAllResultType": { + "definition": "enum IDBGetAllResultType { Keys, Values, Records,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=89" + }, + "blink.mojom.IDBKeyPathType": { + "definition": "enum IDBKeyPathType { Null, String, Array,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=108" + }, + "blink.mojom.IDBOperationType": { + "definition": "enum IDBOperationType { Add, Put, Delete, Clear,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=132" + }, + "blink.mojom.IDBPutMode": { + "definition": "enum IDBPutMode { AddOrUpdate, AddOnly, CursorUpdate,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=139" + }, + "blink.mojom.IDBTaskType": { + "definition": "enum IDBTaskType { Normal, Preemptive,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=145" + }, + "blink.mojom.IDBTransactionMode": { + "definition": "enum IDBTransactionMode { ReadOnly = 0, ReadWrite = 1, VersionChange = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=153" + }, + "blink.mojom.IDBException": { + "definition": "enum IDBException { kNoError = 0, kUnknownError = 28, kConstraintError = 29, kDataError = 30, kVersionError = 33, kAbortError = 20, kIgnorableAbortError = 11, kQuotaError = 22, kTimeoutError = 23,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=161" + }, + "blink.mojom.IDBKey": { + "definition": "union IDBKey { array key_array; array binary; mojo_base.mojom.String16 string; double date; double number; bool other_none;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=95" + }, + "blink.mojom.IDBKeyPathData": { + "definition": "union IDBKeyPathData { mojo_base.mojom.String16 string; array string_array;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=115" + }, + "blink.mojom.IDBExternalObject": { + "definition": "union IDBExternalObject { IDBBlobInfo blob_or_file; pending_remote file_system_access_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=222" + }, + "blink.mojom.IDBCursorResult": { + "definition": "union IDBCursorResult { IDBError error_result; bool empty; IDBCursorValue values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=292" + }, + "blink.mojom.IDBTransactionPutResult": { + "definition": "union IDBTransactionPutResult { IDBError error_result; IDBKey key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=311" + }, + "blink.mojom.IDBDatabaseGetResult": { + "definition": "union IDBDatabaseGetResult { IDBError error_result; bool empty; IDBKey key; IDBReturnValue value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=341" + }, + "blink.mojom.IDBDatabaseOpenCursorResult": { + "definition": "union IDBDatabaseOpenCursorResult { IDBError error_result; bool empty; IDBDatabaseOpenCursorValue value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/indexeddb/indexeddb.mojom;l=368" + }, + "blink.mojom.FocusType": { + "definition": "enum FocusType { kNone = 0, kScript, kForward, kBackward, kSpatialNavigation, kMouse, kAccessKey, kPage,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/focus_type.mojom;l=7" + }, + "blink.mojom.GestureDevice": { + "definition": "enum GestureDevice { kUninitialized, kTouchpad, kTouchscreen, kSyntheticAutoscroll, kScrollbar,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/gesture_event.mojom;l=8" + }, + "blink.mojom.InertialPhaseState": { + "definition": "enum InertialPhaseState { kUnknownMomentum, kNonMomentum, kMomentum, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/gesture_event.mojom;l=23" + }, + "blink.mojom.HandwritingGestureResult": { + "definition": "enum HandwritingGestureResult { kUnknown = 0, kSuccess = 1, kUnsupported = 2, kFailed = 3, kCancelled = 4, kFallback = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/handwriting_gesture_result.mojom;l=10" + }, + "blink.mojom.ImeRenderWidgetHost.UpdateCursorAnchorInfo": { + "definition": "UpdateCursorAnchorInfo(InputCursorAnchorInfo cursor_anchor_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/ime_host.mojom;l=68" + }, + "blink.mojom.EditorBoundsInfo": { + "definition": "struct EditorBoundsInfo { gfx.mojom.RectF editor_bounds; gfx.mojom.RectF handwriting_bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/ime_host.mojom;l=12" + }, + "blink.mojom.TextAppearanceInfo": { + "definition": "struct TextAppearanceInfo { skia.mojom.SkColor text_color;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/ime_host.mojom;l=24" + }, + "blink.mojom.InputCursorAnchorInfo": { + "definition": "struct InputCursorAnchorInfo { array character_bounds; EditorBoundsInfo editor_bounds_info; TextAppearanceInfo text_appearance_info; array visible_line_bounds; bool requested;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/ime_host.mojom;l=39" + }, + "blink.mojom.Button": { + "definition": "enum Button { kNoButton = -1, kLeft, kMiddle, kRight, kBarrel = kRight, kBack, kForward, kEraser,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_event.mojom;l=8" + }, + "blink.mojom.DispatchType": { + "definition": "enum DispatchType { kBlocking, kEventNonBlocking, kListenersNonBlockingPassive, kListenersForcedNonBlockingDueToFling,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_event.mojom;l=21" + }, + "blink.mojom.EventType": { + "definition": "enum EventType { kUndefined = -1, kTypeFirst = kUndefined, kMouseDown, kMouseTypeFirst = kMouseDown, kMouseUp, kMouseMove, kMouseEnter, kMouseLeave, kContextMenu, kMouseTypeLast = kContextMenu, kMouseWheel, kRawKeyDown, kKeyboardTypeFirst = kRawKeyDown, kKeyDown, kKeyUp, kChar, kKeyboardTypeLast = kChar, kGestureScrollBegin, kGestureTypeFirst = kGestureScrollBegin, kGestureScrollEnd, kGestureScrollUpdate, kGestureFlingStart, kGestureFlingCancel, kGesturePinchBegin, kGesturePinchTypeFirst = kGesturePinchBegin, kGesturePinchEnd, kGesturePinchUpdate, kGesturePinchTypeLast = kGesturePinchUpdate, kGestureBegin, kGestureTapDown, kGestureShowPress, kGestureTap, kGestureTapCancel, kGestureShortPress, kGestureLongPress, kGestureLongTap, kGestureTwoFingerTap, kGestureTapUnconfirmed, kGestureDoubleTap, kGestureEnd, kGestureTypeLast = kGestureEnd, kTouchStart, kTouchTypeFirst = kTouchStart, kTouchMove, kTouchEnd, kTouchCancel, kTouchScrollStarted, kTouchTypeLast = kTouchScrollStarted, kPointerDown, kPointerTypeFirst = kPointerDown, kPointerUp, kPointerMove, kPointerRawUpdate, kPointerCancel, kPointerCausedUaAction, kPointerTypeLast = kPointerCausedUaAction, kTypeLast = kPointerTypeLast};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_event.mojom;l=34" + }, + "blink.mojom.InputEventResultSource": { + "definition": "enum InputEventResultSource { kUnknown, kCompositorThread, kMainThread, kBrowser,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_event_result.mojom;l=8" + }, + "blink.mojom.InputEventResultState": { + "definition": "enum InputEventResultState { kUnknown, kConsumed, kNotConsumed, kNoConsumerExists, kIgnored, kSetNonBlocking, kSetNonBlockingDueToFling};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_event_result.mojom;l=16" + }, + "blink.mojom.WidgetInputHandlerHost.SetTouchActionFromMain": { + "definition": "SetTouchActionFromMain(cc.mojom.TouchAction touch_action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=241" + }, + "blink.mojom.WidgetInputHandlerHost.SetPanAction": { + "definition": "SetPanAction(PanAction pan_action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=246" + }, + "blink.mojom.WidgetInputHandlerHost.DidOverscroll": { + "definition": "DidOverscroll(DidOverscrollParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=250" + }, + "blink.mojom.WidgetInputHandlerHost.DidStartScrollingViewport": { + "definition": "DidStartScrollingViewport();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=253" + }, + "blink.mojom.WidgetInputHandlerHost.ImeCancelComposition": { + "definition": "ImeCancelComposition();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=256" + }, + "blink.mojom.WidgetInputHandlerHost.ImeCompositionRangeChanged": { + "definition": "ImeCompositionRangeChanged( gfx.mojom.Range range, array? character_bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=260" + }, + "blink.mojom.WidgetInputHandlerHost.SetMouseCapture": { + "definition": "SetMouseCapture(bool capture);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=268" + }, + "blink.mojom.WidgetInputHandlerHost.SetAutoscrollSelectionActiveInMainFrame": { + "definition": "SetAutoscrollSelectionActiveInMainFrame(bool autoscroll_selection);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=275" + }, + "blink.mojom.WidgetInputHandlerHost.RequestMouseLock": { + "definition": "RequestMouseLock(bool from_user_gesture, bool unadjusted_movement) => (PointerLockResult result, pending_remote? context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=290" + }, + "blink.mojom.FrameWidgetInputHandler.AddImeTextSpansToExistingText": { + "definition": "AddImeTextSpansToExistingText( uint32 start, uint32 end, array ime_text_spans);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=304" + }, + "blink.mojom.FrameWidgetInputHandler.ClearImeTextSpansByType": { + "definition": "ClearImeTextSpansByType( uint32 start, uint32 end, ui.mojom.ImeTextSpanType type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=309" + }, + "blink.mojom.FrameWidgetInputHandler.SetCompositionFromExistingText": { + "definition": "SetCompositionFromExistingText( int32 start, int32 end, array ime_text_spans);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=314" + }, + "blink.mojom.FrameWidgetInputHandler.ExtendSelectionAndDelete": { + "definition": "ExtendSelectionAndDelete(int32 before, int32 after);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=319" + }, + "blink.mojom.FrameWidgetInputHandler.ExtendSelectionAndReplace": { + "definition": "ExtendSelectionAndReplace( uint32 before, uint32 after, mojo_base.mojom.String16 replacement_text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=323" + }, + "blink.mojom.FrameWidgetInputHandler.DeleteSurroundingText": { + "definition": "DeleteSurroundingText(int32 before, int32 after);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=329" + }, + "blink.mojom.FrameWidgetInputHandler.DeleteSurroundingTextInCodePoints": { + "definition": "DeleteSurroundingTextInCodePoints(int32 before, int32 after);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=335" + }, + "blink.mojom.FrameWidgetInputHandler.SetEditableSelectionOffsets": { + "definition": "SetEditableSelectionOffsets(int32 start, int32 end);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=339" + }, + "blink.mojom.FrameWidgetInputHandler.HandleStylusWritingGestureAction": { + "definition": "HandleStylusWritingGestureAction( blink.mojom.StylusWritingGestureData gesture_data) => (HandwritingGestureResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=342" + }, + "blink.mojom.FrameWidgetInputHandler.ExecuteEditCommand": { + "definition": "ExecuteEditCommand(string command, mojo_base.mojom.String16? value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=347" + }, + "blink.mojom.FrameWidgetInputHandler.Undo": { + "definition": "Undo();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=351" + }, + "blink.mojom.FrameWidgetInputHandler.Redo": { + "definition": "Redo();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=352" + }, + "blink.mojom.FrameWidgetInputHandler.Cut": { + "definition": "Cut();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=354" + }, + "blink.mojom.FrameWidgetInputHandler.Copy": { + "definition": "Copy();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=356" + }, + "blink.mojom.FrameWidgetInputHandler.CopyToFindPboard": { + "definition": "CopyToFindPboard();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=358" + }, + "blink.mojom.FrameWidgetInputHandler.CenterSelection": { + "definition": "CenterSelection();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=360" + }, + "blink.mojom.FrameWidgetInputHandler.Paste": { + "definition": "Paste();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=362" + }, + "blink.mojom.FrameWidgetInputHandler.PasteAndMatchStyle": { + "definition": "PasteAndMatchStyle();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=364" + }, + "blink.mojom.FrameWidgetInputHandler.Delete": { + "definition": "Delete();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=366" + }, + "blink.mojom.FrameWidgetInputHandler.SelectAll": { + "definition": "SelectAll();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=368" + }, + "blink.mojom.FrameWidgetInputHandler.CollapseSelection": { + "definition": "CollapseSelection();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=370" + }, + "blink.mojom.FrameWidgetInputHandler.Replace": { + "definition": "Replace(mojo_base.mojom.String16 word);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=375" + }, + "blink.mojom.FrameWidgetInputHandler.ReplaceMisspelling": { + "definition": "ReplaceMisspelling(mojo_base.mojom.String16 word);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=378" + }, + "blink.mojom.FrameWidgetInputHandler.SelectRange": { + "definition": "SelectRange(gfx.mojom.Point base, gfx.mojom.Point extent);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=382" + }, + "blink.mojom.FrameWidgetInputHandler.AdjustSelectionByCharacterOffset": { + "definition": "AdjustSelectionByCharacterOffset( int32 start, int32 end, SelectionMenuBehavior behavior);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=389" + }, + "blink.mojom.FrameWidgetInputHandler.SelectAroundCaret": { + "definition": "SelectAroundCaret(SelectionGranularity granularity, bool should_show_handle, bool should_show_context_menu) => (SelectAroundCaretResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=397" + }, + "blink.mojom.FrameWidgetInputHandler.MoveRangeSelectionExtent": { + "definition": "MoveRangeSelectionExtent(gfx.mojom.Point extent);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=404" + }, + "blink.mojom.FrameWidgetInputHandler.ScrollFocusedEditableNodeIntoView": { + "definition": "ScrollFocusedEditableNodeIntoView();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=409" + }, + "blink.mojom.FrameWidgetInputHandler.WaitForPageScaleAnimationForTesting": { + "definition": "WaitForPageScaleAnimationForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=420" + }, + "blink.mojom.FrameWidgetInputHandler.MoveCaret": { + "definition": "MoveCaret(gfx.mojom.Point point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=423" + }, + "blink.mojom.WidgetInputHandler.SetFocus": { + "definition": "SetFocus(FocusState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=458" + }, + "blink.mojom.WidgetInputHandler.MouseCaptureLost": { + "definition": "MouseCaptureLost();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=461" + }, + "blink.mojom.WidgetInputHandler.SetEditCommandsForNextKeyEvent": { + "definition": "SetEditCommandsForNextKeyEvent(array commands);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=475" + }, + "blink.mojom.WidgetInputHandler.CursorVisibilityChanged": { + "definition": "CursorVisibilityChanged(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=478" + }, + "blink.mojom.WidgetInputHandler.ImeSetComposition": { + "definition": "ImeSetComposition(mojo_base.mojom.String16 text, array ime_text_spans, gfx.mojom.Range range, int32 start, int32 end) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=482" + }, + "blink.mojom.WidgetInputHandler.ImeCommitText": { + "definition": "ImeCommitText(mojo_base.mojom.String16 text, array ime_text_spans, gfx.mojom.Range range, int32 relative_cursor_position) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=491" + }, + "blink.mojom.WidgetInputHandler.ImeFinishComposingText": { + "definition": "ImeFinishComposingText(bool keep_selection);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=497" + }, + "blink.mojom.WidgetInputHandler.RequestTextInputStateUpdate": { + "definition": "RequestTextInputStateUpdate();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=500" + }, + "blink.mojom.WidgetInputHandler.RequestCompositionUpdates": { + "definition": "RequestCompositionUpdates(bool immediate_request, bool monitor_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=508" + }, + "blink.mojom.WidgetInputHandler.DispatchEvent": { + "definition": "DispatchEvent(Event event, Event? original_event_for_gesture) => (blink.mojom.InputEventResultSource source, ui.mojom.LatencyInfo updated_latency, blink.mojom.InputEventResultState state, DidOverscrollParams? overscroll, TouchActionOptional? touch_action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=517" + }, + "blink.mojom.WidgetInputHandler.DispatchNonBlockingEvent": { + "definition": "DispatchNonBlockingEvent(Event event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=527" + }, + "blink.mojom.WidgetInputHandler.WaitForInputProcessed": { + "definition": "WaitForInputProcessed() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=534" + }, + "blink.mojom.WidgetInputHandler.GetFrameWidgetInputHandler": { + "definition": "GetFrameWidgetInputHandler( pending_associated_receiver interface_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=547" + }, + "blink.mojom.WidgetInputHandler.UpdateBrowserControlsState": { + "definition": "UpdateBrowserControlsState( cc.mojom.BrowserControlsState constraints, cc.mojom.BrowserControlsState current, bool animate, cc.mojom.BrowserControlsOffsetTagModifications? offset_tag_modifications);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=552" + }, + "blink.mojom.KeyData": { + "definition": "struct KeyData { int32 dom_key; int32 dom_code; int32 windows_key_code; int32 native_key_code; bool is_system_key; bool is_browser_shortcut; mojo_base.mojom.String16 text; mojo_base.mojom.String16 unmodified_text;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=42" + }, + "blink.mojom.PointerData": { + "definition": "struct PointerData { int32 pointer_id; float force; double tilt_x; double tilt_y; float tangential_pressure; int32 twist; blink.mojom.Button button; ui.mojom.EventPointerType pointer_type; int32 movement_x; int32 movement_y; bool is_raw_movement_event; gfx.mojom.PointF widget_position; gfx.mojom.PointF screen_position; MouseData? mouse_data; int32 device_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=53" + }, + "blink.mojom.WheelData": { + "definition": "struct WheelData { float delta_x; float delta_y; float wheel_ticks_x; float wheel_ticks_y; float acceleration_ratio_x; float acceleration_ratio_y; uint8 phase; uint8 momentum_phase; blink.mojom.DispatchType cancelable; uint8 event_action; uint8 delta_units;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=71" + }, + "blink.mojom.MouseData": { + "definition": "struct MouseData { int32 click_count; WheelData? wheel_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=85" + }, + "blink.mojom.ScrollData": { + "definition": "struct ScrollData { float delta_x; float delta_y; ui.mojom.ScrollGranularity delta_units; bool target_viewport; blink.mojom.InertialPhaseState inertial_phase; bool synthetic; int32 pointer_count; bool cursor_control;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=90" + }, + "blink.mojom.PinchBeginData": { + "definition": "struct PinchBeginData { bool needs_wheel_event;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=103" + }, + "blink.mojom.PinchUpdateData": { + "definition": "struct PinchUpdateData { float scale; bool zoom_disabled; bool needs_wheel_event;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=107" + }, + "blink.mojom.PinchEndData": { + "definition": "struct PinchEndData { bool needs_wheel_event;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=113" + }, + "blink.mojom.FlingData": { + "definition": "struct FlingData { float velocity_x; float velocity_y; bool target_viewport; bool prevent_boosting;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=117" + }, + "blink.mojom.TapData": { + "definition": "struct TapData { int32 tap_count; bool needs_wheel_event;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=124" + }, + "blink.mojom.TapDownData": { + "definition": "struct TapDownData { int32 tap_down_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=129" + }, + "blink.mojom.GestureData": { + "definition": "struct GestureData { gfx.mojom.PointF screen_position; gfx.mojom.PointF widget_position; blink.mojom.GestureDevice source_device; bool is_source_touch_event_set_blocking; ui.mojom.EventPointerType primary_pointer_type; int32 primary_unique_touch_event_id; int32 unique_touch_event_id; gfx.mojom.Size? contact_size; ScrollData? scroll_data; PinchBeginData? pinch_begin_data; PinchUpdateData? pinch_update_data; PinchEndData? pinch_end_data; TapData? tap_data; TapDownData? tap_down_data; FlingData? fling_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=133" + }, + "blink.mojom.TouchPoint": { + "definition": "struct TouchPoint { blink.mojom.TouchState state; float radius_x; float radius_y; float rotation_angle; PointerData pointer_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=151" + }, + "blink.mojom.TouchData": { + "definition": "struct TouchData { blink.mojom.DispatchType cancelable; bool moved_beyond_slop_region; bool touch_start_or_first_move; bool hovering; uint32 unique_touch_event_id; array touches;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=159" + }, + "blink.mojom.Event": { + "definition": "struct Event { blink.mojom.EventType type; int32 modifiers; mojo_base.mojom.TimeTicks timestamp; ui.mojom.LatencyInfo latency; ui.mojom.EventLatencyMetadata event_latency_metadata; KeyData? key_data; PointerData? pointer_data; GestureData? gesture_data; TouchData? touch_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=168" + }, + "blink.mojom.DidOverscrollParams": { + "definition": "struct DidOverscrollParams { gfx.mojom.Vector2dF accumulated_overscroll; gfx.mojom.Vector2dF latest_overscroll_delta; gfx.mojom.Vector2dF current_fling_velocity; gfx.mojom.PointF causal_event_viewport_point; cc.mojom.OverscrollBehavior overscroll_behavior; blink.mojom.GestureDevice source_device;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=181" + }, + "blink.mojom.TouchActionOptional": { + "definition": "struct TouchActionOptional { cc.mojom.TouchAction touch_action;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=192" + }, + "blink.mojom.EditCommand": { + "definition": "struct EditCommand { string name; string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=197" + }, + "blink.mojom.SelectAroundCaretResult": { + "definition": "struct SelectAroundCaretResult { int32 extended_start_adjust; int32 extended_end_adjust; int32 word_start_adjust; int32 word_end_adjust;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=204" + }, + "blink.mojom.SelectionGranularity": { + "definition": "enum SelectionGranularity { kWord, kSentence,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=218" + }, + "blink.mojom.PanAction": { + "definition": "enum PanAction { kNone, kScroll, kMoveCursorOrScroll, kStylusWritable,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=225" + }, + "blink.mojom.FocusState": { + "definition": "enum FocusState { kFocused, kNotFocusedAndActive, kNotFocusedAndNotActive,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_handler.mojom;l=445" + }, + "blink.mojom.TextSuggestionHost.StartSuggestionMenuTimer": { + "definition": "StartSuggestionMenuTimer();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_host.mojom;l=25" + }, + "blink.mojom.TextSuggestionHost.ShowSpellCheckSuggestionMenu": { + "definition": "ShowSpellCheckSuggestionMenu( double caret_x, double caret_y, string marked_text, array suggestions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_host.mojom;l=26" + }, + "blink.mojom.TextSuggestionHost.ShowTextSuggestionMenu": { + "definition": "ShowTextSuggestionMenu( double caret_x, double caret_y, string marked_text, array suggestions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_host.mojom;l=31" + }, + "blink.mojom.SpellCheckSuggestion": { + "definition": "struct SpellCheckSuggestion { string suggestion;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_host.mojom;l=7" + }, + "blink.mojom.TextSuggestion": { + "definition": "struct TextSuggestion { int32 marker_tag; int32 suggestion_index; string prefix; string suggestion; string suffix;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_host.mojom;l=11" + }, + "blink.mojom.TextSuggestionBackend.ApplySpellCheckSuggestion": { + "definition": "ApplySpellCheckSuggestion(string suggestion);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_messages.mojom;l=11" + }, + "blink.mojom.TextSuggestionBackend.ApplyTextSuggestion": { + "definition": "ApplyTextSuggestion(int32 marker_tag, int32 suggestion_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_messages.mojom;l=12" + }, + "blink.mojom.TextSuggestionBackend.DeleteActiveSuggestionRange": { + "definition": "DeleteActiveSuggestionRange();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_messages.mojom;l=13" + }, + "blink.mojom.TextSuggestionBackend.OnNewWordAddedToDictionary": { + "definition": "OnNewWordAddedToDictionary(string suggestion);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_messages.mojom;l=14" + }, + "blink.mojom.TextSuggestionBackend.OnSuggestionMenuClosed": { + "definition": "OnSuggestionMenuClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_messages.mojom;l=15" + }, + "blink.mojom.TextSuggestionBackend.SuggestionMenuTimeoutCallback": { + "definition": "SuggestionMenuTimeoutCallback(int32 max_number_of_suggestions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/input_messages.mojom;l=16" + }, + "blink.mojom.PointerLockContext.RequestMouseLockChange": { + "definition": "RequestMouseLockChange(bool unadjusted_movement) => (blink.mojom.PointerLockResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/pointer_lock_context.mojom;l=11" + }, + "blink.mojom.PointerLockResult": { + "definition": "enum PointerLockResult { kSuccess = 0, kUnsupportedOptions, kRequiresUserGesture, kUserRejected, kPermissionDenied, kAlreadyLocked, kWrongDocument, kElementDestroyed, kUnknownError };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/pointer_lock_result.mojom;l=11" + }, + "blink.mojom.ScrollDirection": { + "definition": "enum ScrollDirection { kScrollUpIgnoringWritingMode, kScrollDownIgnoringWritingMode, kScrollLeftIgnoringWritingMode, kScrollRightIgnoringWritingMode, kScrollBlockDirectionBackward, kScrollBlockDirectionForward, kScrollInlineDirectionBackward, kScrollInlineDirectionForward,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/scroll_direction.mojom;l=7" + }, + "blink.mojom.StylusWritingGestureData": { + "definition": "struct StylusWritingGestureData { StylusWritingGestureAction action; StylusWritingGestureGranularity granularity; gfx.mojom.Rect start_rect; gfx.mojom.Rect? end_rect; mojo_base.mojom.String16 text_alternative; mojo_base.mojom.String16? text_to_insert;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/stylus_writing_gesture.mojom;l=31" + }, + "blink.mojom.StylusWritingGestureAction": { + "definition": "enum StylusWritingGestureAction { DELETE_TEXT, ADD_SPACE_OR_TEXT, REMOVE_SPACES, SPLIT_OR_MERGE, SELECT_TEXT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/stylus_writing_gesture.mojom;l=13" + }, + "blink.mojom.StylusWritingGestureGranularity": { + "definition": "enum StylusWritingGestureGranularity { CHARACTER, WORD,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/stylus_writing_gesture.mojom;l=22" + }, + "blink.mojom.SynchronousCompositor.DemandDrawHwAsync": { + "definition": "DemandDrawHwAsync(SyncCompositorDemandDrawHwParams draw_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=54" + }, + "blink.mojom.SynchronousCompositor.DemandDrawHw": { + "definition": "[Sync] DemandDrawHw(SyncCompositorDemandDrawHwParams draw_params) => (SyncCompositorCommonRendererParams result, uint32 layer_tree_frame_sink_id, uint32 metadata_version, viz.mojom.LocalSurfaceId? local_surface_id, viz.mojom.CompositorFrame? frame, viz.mojom.HitTestRegionList? hit_test_region_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=58" + }, + "blink.mojom.SynchronousCompositor.SetSharedMemory": { + "definition": "[Sync] SetSharedMemory(mojo_base.mojom.WritableSharedMemoryRegion shm_region) => (bool success, SyncCompositorCommonRendererParams result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=71" + }, + "blink.mojom.SynchronousCompositor.DemandDrawSw": { + "definition": "[Sync] DemandDrawSw(SyncCompositorDemandDrawSwParams draw_params) => (SyncCompositorCommonRendererParams result, uint32 metadata_version, viz.mojom.CompositorFrameMetadata? meta_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=76" + }, + "blink.mojom.SynchronousCompositor.WillSkipDraw": { + "definition": "WillSkipDraw();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=83" + }, + "blink.mojom.SynchronousCompositor.ZeroSharedMemory": { + "definition": "ZeroSharedMemory();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=89" + }, + "blink.mojom.SynchronousCompositor.ZoomBy": { + "definition": "[Sync] ZoomBy(float delta, gfx.mojom.Point anchor) => (SyncCompositorCommonRendererParams result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=93" + }, + "blink.mojom.SynchronousCompositor.SetMemoryPolicy": { + "definition": "SetMemoryPolicy(uint32 bytes_limit);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=99" + }, + "blink.mojom.SynchronousCompositor.ReclaimResources": { + "definition": "ReclaimResources(uint32 layer_tree_frame_sink_id, array resources);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=102" + }, + "blink.mojom.SynchronousCompositor.OnCompositorFrameTransitionDirectiveProcessed": { + "definition": "OnCompositorFrameTransitionDirectiveProcessed(uint32 layer_tree_frame_sink_id, uint32 sequence_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=107" + }, + "blink.mojom.SynchronousCompositor.SetScroll": { + "definition": "SetScroll(gfx.mojom.PointF offset);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=111" + }, + "blink.mojom.SynchronousCompositor.BeginFrame": { + "definition": "BeginFrame(viz.mojom.BeginFrameArgs args, map timing_details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=124" + }, + "blink.mojom.SynchronousCompositor.SetBeginFrameSourcePaused": { + "definition": "SetBeginFrameSourcePaused(bool paused);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=128" + }, + "blink.mojom.SynchronousCompositorHost.LayerTreeFrameSinkCreated": { + "definition": "LayerTreeFrameSinkCreated();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=135" + }, + "blink.mojom.SynchronousCompositorHost.UpdateState": { + "definition": "UpdateState(SyncCompositorCommonRendererParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=138" + }, + "blink.mojom.SynchronousCompositorHost.SetNeedsBeginFrames": { + "definition": "SetNeedsBeginFrames(bool needs_begin_frames);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=141" + }, + "blink.mojom.SynchronousCompositorHost.SetThreads": { + "definition": "SetThreads(array threads);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=147" + }, + "blink.mojom.SynchronousCompositorControlHost.ReturnFrame": { + "definition": "ReturnFrame(uint32 layer_tree_frame_sink_id, uint32 metadata_version, viz.mojom.LocalSurfaceId? local_surface_id, viz.mojom.CompositorFrame? frame, viz.mojom.HitTestRegionList? hit_test_region_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=160" + }, + "blink.mojom.SynchronousCompositorControlHost.BeginFrameResponse": { + "definition": "BeginFrameResponse(SyncCompositorCommonRendererParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=167" + }, + "blink.mojom.SyncCompositorDemandDrawHwParams": { + "definition": "struct SyncCompositorDemandDrawHwParams { gfx.mojom.Size viewport_size; gfx.mojom.Rect viewport_rect_for_tile_priority; gfx.mojom.Transform transform_for_tile_priority; bool need_new_local_surface_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=19" + }, + "blink.mojom.SyncCompositorDemandDrawSwParams": { + "definition": "struct SyncCompositorDemandDrawSwParams { gfx.mojom.Size size; gfx.mojom.Rect clip; gfx.mojom.Transform transform;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=26" + }, + "blink.mojom.SyncCompositorCommonRendererParams": { + "definition": "struct SyncCompositorCommonRendererParams { uint32 version = 0; gfx.mojom.PointF total_scroll_offset; gfx.mojom.PointF max_scroll_offset; gfx.mojom.SizeF scrollable_size; float page_scale_factor = 0; float min_page_scale_factor = 0; float max_page_scale_factor = 0; uint32 need_invalidate_count = 0; bool invalidate_needs_draw = true; uint32 did_activate_pending_tree_count = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/synchronous_compositor.mojom;l=32" + }, + "blink.mojom.TextInputHost.GotCharacterIndexAtPoint": { + "definition": "GotCharacterIndexAtPoint(uint32 index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/text_input_host.mojom;l=23" + }, + "blink.mojom.TextInputHost.GotFirstRectForRange": { + "definition": "GotFirstRectForRange(gfx.mojom.Rect rect);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/text_input_host.mojom;l=29" + }, + "blink.mojom.TouchEventConsumers": { + "definition": "struct TouchEventConsumers { bool has_touch_event_handlers; bool has_hit_testable_scrollbar;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/touch_event.mojom;l=19" + }, + "blink.mojom.TouchState": { + "definition": "enum TouchState { kStateUndefined, kStateReleased, kStatePressed, kStateMoved, kStateStationary, kStateCancelled,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/input/touch_event.mojom;l=8" + }, + "blink.mojom.InstallationService.OnInstall": { + "definition": "OnInstall();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/installation/installation.mojom;l=10" + }, + "blink.mojom.InstalledAppProvider.FilterInstalledApps": { + "definition": "FilterInstalledApps(array related_apps, url.mojom.Url manifest_url, bool add_saved_related_applications) => (array installed_apps);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/installedapp/installed_app_provider.mojom;l=21" + }, + "blink.mojom.RelatedApplication": { + "definition": "struct RelatedApplication { string platform; string? url; string? id; string? version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/installedapp/related_application.mojom;l=10" + }, + "blink.mojom.AbortableAdAuction.ResolvedPromiseParam": { + "definition": "ResolvedPromiseParam(AuctionAdConfigAuctionId auction, AuctionAdConfigField field, string? json_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=47" + }, + "blink.mojom.AbortableAdAuction.ResolvedPerBuyerSignalsPromise": { + "definition": "ResolvedPerBuyerSignalsPromise( AuctionAdConfigAuctionId auction, map? per_buyer_signals);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=53" + }, + "blink.mojom.AbortableAdAuction.ResolvedBuyerTkvSignalsPromise": { + "definition": "ResolvedBuyerTkvSignalsPromise( AuctionAdConfigAuctionId auction, url.mojom.Origin buyer, string? json_value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=61" + }, + "blink.mojom.AbortableAdAuction.ResolvedBuyerTimeoutsPromise": { + "definition": "ResolvedBuyerTimeoutsPromise( AuctionAdConfigAuctionId auction, AuctionAdConfigBuyerTimeoutField field, AuctionAdConfigBuyerTimeouts buyer_timeouts);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=69" + }, + "blink.mojom.AbortableAdAuction.ResolvedBuyerCurrenciesPromise": { + "definition": "ResolvedBuyerCurrenciesPromise( AuctionAdConfigAuctionId auction, AuctionAdConfigBuyerCurrencies per_buyer_currencies);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=76" + }, + "blink.mojom.AbortableAdAuction.ResolvedDirectFromSellerSignalsPromise": { + "definition": "ResolvedDirectFromSellerSignalsPromise( AuctionAdConfigAuctionId auction, DirectFromSellerSignals? direct_from_seller_signals);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=82" + }, + "blink.mojom.AbortableAdAuction.ResolvedDirectFromSellerSignalsHeaderAdSlotPromise": { + "definition": "ResolvedDirectFromSellerSignalsHeaderAdSlotPromise( AuctionAdConfigAuctionId auction, string? direct_from_seller_signals_header_ad_slot);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=88" + }, + "blink.mojom.AbortableAdAuction.ResolvedDeprecatedRenderURLReplacementsPromise": { + "definition": "ResolvedDeprecatedRenderURLReplacementsPromise( AuctionAdConfigAuctionId auction, array deprecated_render_url_replacements);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=94" + }, + "blink.mojom.AbortableAdAuction.ResolvedAuctionAdResponsePromise": { + "definition": "ResolvedAuctionAdResponsePromise( AuctionAdConfigAuctionId auction, mojo_base.mojom.BigBuffer result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=102" + }, + "blink.mojom.AbortableAdAuction.ResolvedAdditionalBids": { + "definition": "ResolvedAdditionalBids(AuctionAdConfigAuctionId auction);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=111" + }, + "blink.mojom.AbortableAdAuction.Abort": { + "definition": "Abort();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=117" + }, + "blink.mojom.AdAuctionService.CreateAdRequest": { + "definition": "CreateAdRequest(AdRequestConfig config) => (string? ads_guid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=129" + }, + "blink.mojom.AdAuctionService.FinalizeAd": { + "definition": "FinalizeAd(string ads_guid, AuctionAdConfig config) => (url.mojom.Url? ad_display_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=138" + }, + "blink.mojom.AdAuctionService.RunAdAuction": { + "definition": "RunAdAuction(AuctionAdConfig config, pending_receiver? abort_receiver) => (bool aborted_by_script, FencedFrameConfig? config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=150" + }, + "blink.mojom.AdAuctionService.JoinInterestGroup": { + "definition": "JoinInterestGroup(InterestGroup group) => (bool failed_well_known_check);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=171" + }, + "blink.mojom.AdAuctionService.LeaveInterestGroup": { + "definition": "LeaveInterestGroup(url.mojom.Origin owner, string name) => (bool failed_well_known_check);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=190" + }, + "blink.mojom.AdAuctionService.LeaveInterestGroupForDocument": { + "definition": "LeaveInterestGroupForDocument();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=197" + }, + "blink.mojom.AdAuctionService.ClearOriginJoinedInterestGroups": { + "definition": "ClearOriginJoinedInterestGroups(url.mojom.Origin owner, array interest_groups_to_keep) => (bool failed_well_known_check);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=217" + }, + "blink.mojom.AdAuctionService.UpdateAdInterestGroups": { + "definition": "UpdateAdInterestGroups();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=230" + }, + "blink.mojom.AdAuctionService.DeprecatedGetURLFromURN": { + "definition": "DeprecatedGetURLFromURN(url.mojom.Url uuid_url, bool send_reports) => (url.mojom.Url? decoded_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=248" + }, + "blink.mojom.AdAuctionService.DeprecatedReplaceInURN": { + "definition": "DeprecatedReplaceInURN(url.mojom.Url uuid_url, array replacements) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=261" + }, + "blink.mojom.AdAuctionService.GetInterestGroupAdAuctionData": { + "definition": "GetInterestGroupAdAuctionData(map sellers, AuctionDataConfig config) => (array requests, mojo_base.mojom.Uuid? request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=267" + }, + "blink.mojom.AuctionAdConfigField": { + "definition": "enum AuctionAdConfigField { kAuctionSignals, kSellerSignals, kSellerTKVSignals};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=27" + }, + "blink.mojom.AuctionAdConfigBuyerTimeoutField": { + "definition": "enum AuctionAdConfigBuyerTimeoutField { kPerBuyerTimeouts, kPerBuyerCumulativeTimeouts};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=36" + }, + "blink.mojom.AuctionAdConfigAuctionId": { + "definition": "union AuctionAdConfigAuctionId { uint32 main_auction; uint32 component_auction; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_auction_service.mojom;l=20" + }, + "blink.mojom.AdSize": { + "definition": "struct AdSize { [Stable, Extensible] double width; LengthUnit width_units; double height; LengthUnit height_units;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_display_size.mojom;l=11" + }, + "blink.mojom.AdDescriptor": { + "definition": "struct AdDescriptor { url.mojom.Url url; AdSize? size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_display_size.mojom;l=28" + }, + "blink.mojom.LengthUnit": { + "definition": "enum LengthUnit { [Default] kInvalid, kPixels, kScreenWidth, kScreenHeight, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/ad_display_size.mojom;l=14" + }, + "blink.mojom.InterestGroupAd": { + "definition": "struct InterestGroupAd { string render_url; string? size_group; string? buyer_reporting_id; string? buyer_and_seller_reporting_id; array? selectable_buyer_and_seller_reporting_ids; string? metadata; string? ad_render_id; array? allowed_reporting_origins; string? creative_scanning_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=18" + }, + "blink.mojom.SellerCapabilities": { + "definition": "struct SellerCapabilities { bool allows_interest_group_counts = false; bool allows_latency_stats = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=60" + }, + "blink.mojom.AuctionServerRequestFlags": { + "definition": "struct AuctionServerRequestFlags { bool omit_ads = false; bool include_full_ads = false; bool omit_user_bidding_signals = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=69" + }, + "blink.mojom.AdKeywordReplacement": { + "definition": "struct AdKeywordReplacement { string match; string replacement;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=85" + }, + "blink.mojom.InterestGroup": { + "definition": "struct InterestGroup { [Stable, Extensible] [Stable, Extensible] mojo_base.mojom.Time expiry; url.mojom.Origin owner; string name; double priority = 0.0; bool enable_bidding_signals_prioritization; map? priority_vector; map? priority_signals_overrides; map? seller_capabilities; SellerCapabilities all_sellers_capabilities; ExecutionMode execution_mode = kCompatibilityMode; TrustedBiddingSignalsSlotSizeMode trusted_bidding_signals_slot_size_mode = kNone; url.mojom.Url? bidding_url; url.mojom.Url? bidding_wasm_helper_url; url.mojom.Url? update_url; url.mojom.Url? trusted_bidding_signals_url; array? trusted_bidding_signals_keys; int32 max_trusted_bidding_signals_url_length = 0; url.mojom.Origin? trusted_bidding_signals_coordinator; array? view_and_click_counts_providers; string? user_bidding_signals; array? ads; array? ad_components; map? ad_sizes; map>? size_groups; AuctionServerRequestFlags auction_server_request_flags; array? additional_bid_key; url.mojom.Origin? aggregation_coordinator_origin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=101" + }, + "blink.mojom.PreviousWin": { + "definition": "struct PreviousWin { mojo_base.mojom.Time time; string ad_json;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=202" + }, + "blink.mojom.ViewOrClickCounts": { + "definition": "struct ViewOrClickCounts { int32 past_hour = 0; int32 past_day = 0; int32 past_week = 0; int32 past_30_days = 0; int32 past_90_days = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=233" + }, + "blink.mojom.ViewAndClickCounts": { + "definition": "struct ViewAndClickCounts { ViewOrClickCounts view_counts; ViewOrClickCounts click_counts;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=252" + }, + "blink.mojom.BiddingBrowserSignals": { + "definition": "struct BiddingBrowserSignals { int32 join_count; int32 bid_count; array prev_wins; bool for_debugging_only_in_cooldown_or_lockout; ViewAndClickCounts view_and_click_counts;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=264" + }, + "blink.mojom.StorageInterestGroup": { + "definition": "struct StorageInterestGroup { InterestGroup interest_group; BiddingBrowserSignals bidding_browser_signals; url.mojom.Origin joining_origin; mojo_base.mojom.Time join_time; mojo_base.mojom.Time last_updated; mojo_base.mojom.Time next_update_after; uint64 estimated_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=286" + }, + "blink.mojom.DirectFromSellerSignalsSubresource": { + "definition": "struct DirectFromSellerSignalsSubresource { url.mojom.Url bundle_url; mojo_base.mojom.UnguessableToken token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=311" + }, + "blink.mojom.DirectFromSellerSignals": { + "definition": "struct DirectFromSellerSignals { url.mojom.Url prefix; map per_buyer_signals; DirectFromSellerSignalsSubresource? seller_signals; DirectFromSellerSignalsSubresource? auction_signals;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=347" + }, + "blink.mojom.AuctionAdConfigBuyerTimeouts": { + "definition": "struct AuctionAdConfigBuyerTimeouts { mojo_base.mojom.TimeDelta? all_buyers_timeout; map? per_buyer_timeouts;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=400" + }, + "blink.mojom.AdCurrency": { + "definition": "struct AdCurrency { string currency_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=416" + }, + "blink.mojom.AuctionAdConfigBuyerCurrencies": { + "definition": "struct AuctionAdConfigBuyerCurrencies { AdCurrency? all_buyers_currency; map? per_buyer_currencies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=422" + }, + "blink.mojom.AuctionAdServerResponseConfig": { + "definition": "struct AuctionAdServerResponseConfig { mojo_base.mojom.Uuid request_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=448" + }, + "blink.mojom.AuctionReportBuyerDebugModeConfig": { + "definition": "struct AuctionReportBuyerDebugModeConfig { bool is_enabled = false; uint64? debug_key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=454" + }, + "blink.mojom.AuctionReportBuyersConfig": { + "definition": "struct AuctionReportBuyersConfig { mojo_base.mojom.Uint128 bucket; double scale;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=465" + }, + "blink.mojom.AuctionAdConfigNonSharedParams": { + "definition": "struct AuctionAdConfigNonSharedParams { array? interest_group_buyers; AuctionAdConfigMaybePromiseJson auction_signals; AuctionAdConfigMaybePromiseJson seller_signals; AuctionAdConfigMaybePromiseJson seller_tkv_signals; mojo_base.mojom.TimeDelta? seller_timeout; AuctionAdConfigMaybePromisePerBuyerSignals per_buyer_signals; map per_buyer_tkv_signals; AuctionAdConfigMaybePromiseBuyerTimeouts buyer_timeouts; mojo_base.mojom.TimeDelta? reporting_timeout; AdCurrency? seller_currency; AuctionAdConfigMaybePromiseBuyerCurrencies buyer_currencies; AuctionAdConfigMaybePromiseBuyerTimeouts buyer_cumulative_timeouts; map per_buyer_group_limits; map>? per_buyer_priority_signals; map? all_buyers_priority_signals; uint16 all_buyers_group_limit = 65535; array? auction_report_buyer_keys; map? auction_report_buyers; AuctionReportBuyerDebugModeConfig? auction_report_buyer_debug_mode_config; SellerCapabilities required_seller_capabilities; AdSize? requested_size; array? all_slots_requested_sizes; map per_buyer_multi_bid_limits; uint16 all_buyers_multi_bid_limit; mojo_base.mojom.Uuid? auction_nonce; RealTimeReportingType? seller_real_time_reporting_type; map? per_buyer_real_time_reporting_types; array component_auctions; AuctionAdConfigMaybePromiseDeprecatedRenderURLReplacements deprecated_render_url_replacements; int32 max_trusted_scoring_signals_url_length = 0; url.mojom.Origin? trusted_scoring_signals_coordinator; InterestGroup.ExecutionMode execution_mode = kCompatibilityMode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=483" + }, + "blink.mojom.AuctionAdConfig": { + "definition": "struct AuctionAdConfig { url.mojom.Origin seller; AuctionAdServerResponseConfig? server_response; url.mojom.Url? decision_logic_url; url.mojom.Url? trusted_scoring_signals_url; AuctionAdConfigNonSharedParams auction_ad_config_non_shared_params; AuctionAdConfigMaybePromiseDirectFromSellerSignals direct_from_seller_signals; bool expects_direct_from_seller_signals_header_ad_slot = false; uint16? seller_experiment_group_id; uint16? all_buyer_experiment_group_id; map per_buyer_experiment_group_ids; bool expects_additional_bids = false; url.mojom.Origin? aggregation_coordinator_origin; bool? send_creative_scanning_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=673" + }, + "blink.mojom.AuctionDataBuyerConfig": { + "definition": "struct AuctionDataBuyerConfig { uint32? target_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=741" + }, + "blink.mojom.AuctionDataConfig": { + "definition": "struct AuctionDataConfig { map per_buyer_configs; uint32? request_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=749" + }, + "blink.mojom.AdAuctionPerSellerRequest": { + "definition": "struct AdAuctionPerSellerRequest { url.mojom.Origin seller; AdAuctionRequestOrError data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=766" + }, + "blink.mojom.ExecutionMode": { + "definition": "enum ExecutionMode { [Default] kCompatibilityMode = 0, kGroupedByOriginMode = 1, kFrozenContext = 2 };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=105" + }, + "blink.mojom.TrustedBiddingSignalsSlotSizeMode": { + "definition": "enum TrustedBiddingSignalsSlotSizeMode { [Default] kNone, kSlotSize, kAllSlotsRequestedSizes, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=125" + }, + "blink.mojom.BuyerReportType": { + "definition": "enum BuyerReportType { kInterestGroupCount, kBidCount, kTotalGenerateBidLatency, kTotalSignalsFetchLatency, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=486" + }, + "blink.mojom.RealTimeReportingType": { + "definition": "enum RealTimeReportingType { kDefaultLocalReporting, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=501" + }, + "blink.mojom.AuctionAdConfigMaybePromiseJson": { + "definition": "union AuctionAdConfigMaybePromiseJson { uint32 promise; string? value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=385" + }, + "blink.mojom.AuctionAdConfigMaybePromisePerBuyerSignals": { + "definition": "union AuctionAdConfigMaybePromisePerBuyerSignals { uint32 promise; map? value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=391" + }, + "blink.mojom.AuctionAdConfigMaybePromiseBuyerTimeouts": { + "definition": "union AuctionAdConfigMaybePromiseBuyerTimeouts { uint32 promise; AuctionAdConfigBuyerTimeouts value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=411" + }, + "blink.mojom.AuctionAdConfigMaybePromiseBuyerCurrencies": { + "definition": "union AuctionAdConfigMaybePromiseBuyerCurrencies { uint32 promise; AuctionAdConfigBuyerCurrencies value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=432" + }, + "blink.mojom.AuctionAdConfigMaybePromiseDirectFromSellerSignals": { + "definition": "union AuctionAdConfigMaybePromiseDirectFromSellerSignals { uint32 promise; DirectFromSellerSignals? value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=437" + }, + "blink.mojom.AuctionAdConfigMaybePromiseDeprecatedRenderURLReplacements": { + "definition": "union AuctionAdConfigMaybePromiseDeprecatedRenderURLReplacements { uint32 promise; array value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=443" + }, + "blink.mojom.AdAuctionRequestOrError": { + "definition": "union AdAuctionRequestOrError { mojo_base.mojom.BigBuffer request; string error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/interest_group/interest_group_types.mojom;l=758" + }, + "blink.mojom.KeyboardLockService.RequestKeyboardLock": { + "definition": "RequestKeyboardLock(array key_codes) => (KeyboardLockRequestResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/keyboard_lock/keyboard_lock.mojom;l=35" + }, + "blink.mojom.KeyboardLockService.CancelKeyboardLock": { + "definition": "CancelKeyboardLock();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/keyboard_lock/keyboard_lock.mojom;l=39" + }, + "blink.mojom.KeyboardLockService.GetKeyboardLayoutMap": { + "definition": "GetKeyboardLayoutMap() => (GetKeyboardLayoutMapResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/keyboard_lock/keyboard_lock.mojom;l=43" + }, + "blink.mojom.GetKeyboardLayoutMapResult": { + "definition": "struct GetKeyboardLayoutMapResult { GetKeyboardLayoutMapStatus status; map layout_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/keyboard_lock/keyboard_lock.mojom;l=21" + }, + "blink.mojom.KeyboardLockRequestResult": { + "definition": "enum KeyboardLockRequestResult { kSuccess = 0, kFrameDetachedError = 1, kNoValidKeyCodesError = 2, kChildFrameError = 3, kRequestFailedError = 4};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/keyboard_lock/keyboard_lock.mojom;l=7" + }, + "blink.mojom.GetKeyboardLayoutMapStatus": { + "definition": "enum GetKeyboardLayoutMapStatus { kSuccess = 0, kFail = 1, kDenied = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/keyboard_lock/keyboard_lock.mojom;l=15" + }, + "blink.mojom.LCPCriticalPathPredictorHost.OnLcpUpdated": { + "definition": "OnLcpUpdated(LcpElement lcp_element);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=30" + }, + "blink.mojom.LCPCriticalPathPredictorHost.OnLcpTimingPredictedForTesting": { + "definition": "OnLcpTimingPredictedForTesting(mojo_base.mojom.ByteString? element_locator);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=36" + }, + "blink.mojom.LCPCriticalPathPredictorHost.SetLcpInfluencerScriptUrls": { + "definition": "SetLcpInfluencerScriptUrls(array lcp_influencer_scripts);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=40" + }, + "blink.mojom.LCPCriticalPathPredictorHost.AddPreconnectOrigin": { + "definition": "AddPreconnectOrigin(url.mojom.Origin origin);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=43" + }, + "blink.mojom.LCPCriticalPathPredictorHost.NotifyFetchedFont": { + "definition": "NotifyFetchedFont(url.mojom.Url font_url, bool hit);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=52" + }, + "blink.mojom.LCPCriticalPathPredictorHost.NotifyFetchedSubresource": { + "definition": "NotifyFetchedSubresource(url.mojom.Url subresource_url, mojo_base.mojom.TimeDelta subresource_load_start, network.mojom.RequestDestination request_destination);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=61" + }, + "blink.mojom.LCPCriticalPathPredictorHost.SetUnusedPreloads": { + "definition": "SetUnusedPreloads(array unused_preloads);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=65" + }, + "blink.mojom.LcpElement": { + "definition": "struct LcpElement { mojo_base.mojom.ByteString? locator; bool is_image; uint32? predicted_index;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=13" + }, + "blink.mojom.LCPCriticalPathPredictorNavigationTimeHint": { + "definition": "struct LCPCriticalPathPredictorNavigationTimeHint { array lcp_element_locators; array lcp_element_locators_all; array lcp_influencer_scripts; array fetched_fonts; array preconnect_origins; array unused_preloads; bool for_testing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lcp_critical_path_predictor/lcp_critical_path_predictor.mojom;l=69" + }, + "blink.mojom.LeakDetector.PerformLeakDetection": { + "definition": "PerformLeakDetection() => (LeakDetectionResult? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/leak_detector/leak_detector.mojom;l=30" + }, + "blink.mojom.LeakDetectionResult": { + "definition": "struct LeakDetectionResult { uint32 number_of_live_audio_nodes; uint32 number_of_live_documents; uint32 number_of_live_nodes; uint32 number_of_live_layout_objects; uint32 number_of_live_resources; uint32 number_of_live_context_lifecycle_state_observers; uint32 number_of_live_frames; uint32 number_of_live_v8_per_context_data; uint32 number_of_worker_global_scopes; uint32 number_of_live_ua_css_resources; uint32 number_of_live_resource_fetchers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/leak_detector/leak_detector.mojom;l=9" + }, + "blink.mojom.TextFragmentReceiver.Cancel": { + "definition": "Cancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/link_to_text/link_to_text.mojom;l=43" + }, + "blink.mojom.TextFragmentReceiver.RequestSelector": { + "definition": "RequestSelector() => (string selector, LinkGenerationError error, LinkGenerationReadyStatus ready_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/link_to_text/link_to_text.mojom;l=49" + }, + "blink.mojom.TextFragmentReceiver.RemoveFragments": { + "definition": "RemoveFragments();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/link_to_text/link_to_text.mojom;l=55" + }, + "blink.mojom.TextFragmentReceiver.ExtractTextFragmentsMatches": { + "definition": "ExtractTextFragmentsMatches() => (array text);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/link_to_text/link_to_text.mojom;l=58" + }, + "blink.mojom.TextFragmentReceiver.GetExistingSelectors": { + "definition": "GetExistingSelectors() => (array selectors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/link_to_text/link_to_text.mojom;l=61" + }, + "blink.mojom.TextFragmentReceiver.ExtractFirstFragmentRect": { + "definition": "ExtractFirstFragmentRect() => (gfx.mojom.Rect bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/link_to_text/link_to_text.mojom;l=65" + }, + "blink.mojom.LinkGenerationReadyStatus": { + "definition": "enum LinkGenerationReadyStatus { kRequestedBeforeReady = 0, kRequestedAfterReady = 1};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/link_to_text/link_to_text.mojom;l=11" + }, + "blink.mojom.LinkGenerationError": { + "definition": "enum LinkGenerationError { kNone = -1, kIncorrectSelector = 0, kNoRange = 1, kNoContext = 2, kContextExhausted = 3, kContextLimitReached = 4, kEmptySelection = 5, kTabHidden = 6, kOmniboxNavigation = 7, kTabCrash = 8, kUnknown = 9, kIFrame = 10, kTimeout = 11, kBlockList = 12, kNoRemoteConnection = 13, kNotGenerated = 14};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/link_to_text/link_to_text.mojom;l=17" + }, + "blink.mojom.CodeCacheHost.DidGenerateCacheableMetadata": { + "definition": "DidGenerateCacheableMetadata(CodeCacheType cache_type, url.mojom.Url url, mojo_base.mojom.Time expected_response_time, mojo_base.mojom.BigBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/code_cache.mojom;l=24" + }, + "blink.mojom.CodeCacheHost.FetchCachedCode": { + "definition": "FetchCachedCode(CodeCacheType cache_type, url.mojom.Url url) => (mojo_base.mojom.Time response_time, mojo_base.mojom.BigBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/code_cache.mojom;l=28" + }, + "blink.mojom.CodeCacheHost.ClearCodeCacheEntry": { + "definition": "ClearCodeCacheEntry(CodeCacheType cache_type, url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/code_cache.mojom;l=31" + }, + "blink.mojom.CodeCacheHost.DidGenerateCacheableMetadataInCacheStorage": { + "definition": "DidGenerateCacheableMetadataInCacheStorage( url.mojom.Url url, mojo_base.mojom.Time expected_response_time, mojo_base.mojom.BigBuffer data, string cache_storage_cache_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/code_cache.mojom;l=37" + }, + "blink.mojom.CodeCacheType": { + "definition": "enum CodeCacheType { kJavascript, kWebAssembly, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/code_cache.mojom;l=13" + }, + "blink.mojom.ContentSecurityNotifier.NotifyContentWithCertificateErrorsRan": { + "definition": "NotifyContentWithCertificateErrorsRan();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/content_security_notifier.mojom;l=18" + }, + "blink.mojom.ContentSecurityNotifier.NotifyContentWithCertificateErrorsDisplayed": { + "definition": "NotifyContentWithCertificateErrorsDisplayed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/content_security_notifier.mojom;l=22" + }, + "blink.mojom.ContentSecurityNotifier.NotifyInsecureContentRan": { + "definition": "NotifyInsecureContentRan(url.mojom.Url origin, url.mojom.Url insecure_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/content_security_notifier.mojom;l=28" + }, + "blink.mojom.FetchClientSettingsObject": { + "definition": "struct FetchClientSettingsObject { network.mojom.ReferrerPolicy referrer_policy; url.mojom.Url outgoing_referrer; InsecureRequestsPolicy insecure_requests_policy;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/fetch_client_settings_object.mojom;l=24" + }, + "blink.mojom.InsecureRequestsPolicy": { + "definition": "enum InsecureRequestsPolicy { kDoNotUpgrade, kUpgrade,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/fetch_client_settings_object.mojom;l=11" + }, + "blink.mojom.FetchLaterLoaderFactory.CreateLoader": { + "definition": "CreateLoader( pending_associated_receiver loader, int32 request_id, uint32 options, network.mojom.URLRequest request, network.mojom.MutableNetworkTrafficAnnotationTag traffic_annotation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/fetch_later.mojom;l=37" + }, + "blink.mojom.FetchLaterLoaderFactory.Clone": { + "definition": "Clone(pending_associated_receiver factory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/fetch_later.mojom;l=45" + }, + "blink.mojom.FetchLaterLoader.SendNow": { + "definition": "SendNow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/fetch_later.mojom;l=69" + }, + "blink.mojom.FetchLaterLoader.Cancel": { + "definition": "Cancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/fetch_later.mojom;l=76" + }, + "blink.mojom.JavaScriptFrameworkDetectionResult": { + "definition": "struct JavaScriptFrameworkDetectionResult { map detected_versions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/javascript_framework_detection.mojom;l=36" + }, + "blink.mojom.JavaScriptFramework": { + "definition": "enum JavaScriptFramework { kNuxt = 0, kVuePress = 1, kSapper = 2, kGatsby = 3, kNext = 4, kAngular = 5, kVue = 6, kSvelte = 7, kPreact = 8, kReact = 9, kDrupal = 10, kJoomla = 11, kShopify = 12, kSquarespace = 13, kWix = 14, kWordPress = 15,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/javascript_framework_detection.mojom;l=14" + }, + "blink.mojom.KeepAliveHandleFactory.IssueKeepAliveHandle": { + "definition": "IssueKeepAliveHandle( pending_receiver keep_alive_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/keep_alive_handle_factory.mojom;l=13" + }, + "blink.mojom.LocalResourceSource": { + "definition": "struct LocalResourceSource { string headers; bool should_replace_i18n_in_js; map path_to_resource_id_map; map replacement_strings;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/local_resource_loader_config.mojom;l=12" + }, + "blink.mojom.LocalResourceLoaderConfig": { + "definition": "struct LocalResourceLoaderConfig { map sources;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/local_resource_loader_config.mojom;l=26" + }, + "blink.mojom.MHTMLLoadResult": { + "definition": "enum MHTMLLoadResult { kSuccess = 0, kEmptyFile = 1, kUrlSchemeNotAllowed = 2, kInvalidArchive = 3, kMissingMainResource = 4};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/mhtml_load_result.mojom;l=10" + }, + "blink.mojom.MixedContentContextType": { + "definition": "enum MixedContentContextType { kNotMixedContent, kBlockable, kOptionallyBlockable, kShouldBeBlockable,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/mixed_content.mojom;l=8" + }, + "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementClick": { + "definition": "ReportAnchorElementClick(AnchorElementClick clicked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=182" + }, + "blink.mojom.AnchorElementMetricsHost.ReportNewAnchorElements": { + "definition": "ReportNewAnchorElements(array metrics, array removed_elements);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=194" + }, + "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementsEnteredViewport": { + "definition": "ReportAnchorElementsEnteredViewport( array elements);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=205" + }, + "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementsLeftViewport": { + "definition": "ReportAnchorElementsLeftViewport(array elements);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=213" + }, + "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementsPositionUpdate": { + "definition": "ReportAnchorElementsPositionUpdate( array elements);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=219" + }, + "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementPointerOver": { + "definition": "ReportAnchorElementPointerOver(AnchorElementPointerOver pointer_over_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=224" + }, + "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementPointerOut": { + "definition": "ReportAnchorElementPointerOut(AnchorElementPointerOut hover_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=228" + }, + "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementPointerDown": { + "definition": "ReportAnchorElementPointerDown(AnchorElementPointerDown pointer_down_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=232" + }, + "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementPointerDataOnHoverTimerFired": { + "definition": "ReportAnchorElementPointerDataOnHoverTimerFired( AnchorElementPointerDataOnHoverTimerFired pointer_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=236" + }, + "blink.mojom.AnchorElementMetricsHost.ProcessPointerEventUsingMLModel": { + "definition": "ProcessPointerEventUsingMLModel( AnchorElementPointerEventForMLModel pointer_event);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=242" + }, + "blink.mojom.AnchorElementMetricsHost.ShouldSkipUpdateDelays": { + "definition": "ShouldSkipUpdateDelays() => (bool should_skip_for_testing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=248" + }, + "blink.mojom.AnchorElementMetrics": { + "definition": "struct AnchorElementMetrics { uint32 anchor_id; float ratio_area; float ratio_distance_top_to_visible_top; float ratio_distance_root_top; bool is_in_iframe; bool contains_image; bool is_same_host; bool is_url_incremented_by_one; bool has_text_sibling; uint32 font_size_px; uint32 font_weight; url.mojom.Url target_url; gfx.mojom.Size viewport_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=17" + }, + "blink.mojom.AnchorElementClick": { + "definition": "struct AnchorElementClick { uint32 anchor_id; url.mojom.Url target_url; mojo_base.mojom.TimeDelta navigation_start_to_click;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=73" + }, + "blink.mojom.AnchorElementPointerDataOnHoverTimerFired": { + "definition": "struct AnchorElementPointerDataOnHoverTimerFired { uint32 anchor_id; blink.mojom.AnchorElementPointerData pointer_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=85" + }, + "blink.mojom.AnchorElementEnteredViewport": { + "definition": "struct AnchorElementEnteredViewport { uint32 anchor_id; mojo_base.mojom.TimeDelta navigation_start_to_entered_viewport;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=93" + }, + "blink.mojom.AnchorElementLeftViewport": { + "definition": "struct AnchorElementLeftViewport { uint32 anchor_id; mojo_base.mojom.TimeDelta time_in_viewport;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=102" + }, + "blink.mojom.AnchorElementPointerOver": { + "definition": "struct AnchorElementPointerOver { uint32 anchor_id; mojo_base.mojom.TimeDelta navigation_start_to_pointer_over;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=111" + }, + "blink.mojom.AnchorElementPointerOut": { + "definition": "struct AnchorElementPointerOut { uint32 anchor_id; mojo_base.mojom.TimeDelta hover_dwell_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=120" + }, + "blink.mojom.AnchorElementPointerEventForMLModel": { + "definition": "struct AnchorElementPointerEventForMLModel { uint32 anchor_id; bool is_mouse; AnchorElementUserInteractionEventForMLModelType user_interaction_event_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=138" + }, + "blink.mojom.AnchorElementPointerDown": { + "definition": "struct AnchorElementPointerDown { uint32 anchor_id; mojo_base.mojom.TimeDelta navigation_start_to_pointer_down;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=149" + }, + "blink.mojom.AnchorElementPositionUpdate": { + "definition": "struct AnchorElementPositionUpdate { uint32 anchor_id; float vertical_position_ratio; float? distance_from_pointer_down_ratio;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=158" + }, + "blink.mojom.AnchorElementUserInteractionEventForMLModelType": { + "definition": "enum AnchorElementUserInteractionEventForMLModelType { kPointerOver, kPointerOut, kEnteredViewport, kLeftViewport, kUnknown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/navigation_predictor.mojom;l=130" + }, + "blink.mojom.Referrer": { + "definition": "struct Referrer { url.mojom.Url url; network.mojom.ReferrerPolicy policy = network.mojom.ReferrerPolicy.kDefault;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/referrer.mojom;l=13" + }, + "blink.mojom.RequestContextFrameType": { + "definition": "enum RequestContextFrameType { kAuxiliary, kNested, kNone, kTopLevel,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/request_context_frame_type.mojom;l=10" + }, + "blink.mojom.CommonNetworkInfo": { + "definition": "struct CommonNetworkInfo { bool network_accessed; bool always_access_network; network.mojom.IPEndPoint? remote_endpoint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info.mojom;l=50" + }, + "blink.mojom.RedirectInfo": { + "definition": "struct RedirectInfo { url.mojom.Origin origin_of_new_url; CommonNetworkInfo network_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info.mojom;l=63" + }, + "blink.mojom.ResourceLoadInfo": { + "definition": "struct ResourceLoadInfo { int64 request_id; url.mojom.Url final_url; url.mojom.Url referrer; url.mojom.Url original_url; string method; network.mojom.RequestDestination request_destination; network.mojom.RequestPriority request_priority; string mime_type; bool was_cached; CommonNetworkInfo network_info; int32 net_error; network.mojom.ProxyChain proxy_chain; network.mojom.LoadTimingInfo load_timing_info; mojo_base.mojom.ByteCount raw_body_bytes; mojo_base.mojom.ByteCount total_received_bytes; array redirect_info_chain; int32 http_status_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info.mojom;l=76" + }, + "blink.mojom.ResourceType": { + "definition": "enum ResourceType { kMainFrame = 0, kSubFrame = 1, kStylesheet = 2, kScript = 3, kImage = 4, kFontResource = 5, kSubResource = 6, kObject = 7, kMedia = 8, kWorker = 9, kSharedWorker = 10, kPrefetch = 11, kFavicon = 12, kXhr = 13, kPing = 14, kServiceWorker = 15, kCspReport = 16, kPluginResource = 17, kNavigationPreloadMainFrame = 19, kNavigationPreloadSubFrame = 20, kJson = 21, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info.mojom;l=21" + }, + "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceRedirectReceived": { + "definition": "NotifyResourceRedirectReceived(network.mojom.URLRequestRedirectInfo redirect_info, network.mojom.URLResponseHead redirect_response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info_notifier.mojom;l=23" + }, + "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceResponseReceived": { + "definition": "NotifyResourceResponseReceived(int64 request_id, url.mojom.SchemeHostPort final_response_url, network.mojom.URLResponseHead head, network.mojom.RequestDestination request_destination, bool is_ad_resource);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info_notifier.mojom;l=27" + }, + "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceTransferSizeUpdated": { + "definition": "NotifyResourceTransferSizeUpdated(int64 request_id, int32 transfer_size_diff);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info_notifier.mojom;l=34" + }, + "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceLoadCompleted": { + "definition": "NotifyResourceLoadCompleted(ResourceLoadInfo resource_load_info, network.mojom.URLLoaderCompletionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info_notifier.mojom;l=37" + }, + "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceLoadCanceled": { + "definition": "NotifyResourceLoadCanceled(int64 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info_notifier.mojom;l=41" + }, + "blink.mojom.ResourceLoadInfoNotifier.Clone": { + "definition": "Clone(pending_receiver pending_resource_load_info_notifier);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/resource_load_info_notifier.mojom;l=44" + }, + "blink.mojom.SameDocumentNavigationType": { + "definition": "enum SameDocumentNavigationType { kFragment = 0, kHistoryApi = 1, kNavigationApiIntercept = 2, kPrerenderNoVarySearchActivation = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/same_document_navigation_type.mojom;l=9" + }, + "blink.mojom.TransferrableURLLoader": { + "definition": "struct TransferrableURLLoader { url.mojom.Url url; pending_remote url_loader; pending_receiver url_loader_client; network.mojom.URLResponseHead head; handle? body;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/transferrable_url_loader.mojom;l=13" + }, + "blink.mojom.URLLoaderFactoryBundle": { + "definition": "struct URLLoaderFactoryBundle { pending_remote? default_factory; map> scheme_specific_factories; map> isolated_world_factories; bool bypass_redirect_checks = false; LocalResourceLoaderConfig? local_resource_loader_config;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/loader/url_loader_factory_bundle.mojom;l=17" + }, + "blink.mojom.LockScreenService.GetKeys": { + "definition": "GetKeys() => (array keys);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lock_screen/lock_screen.mojom;l=19" + }, + "blink.mojom.LockScreenService.SetData": { + "definition": "SetData(string key, string data) => (LockScreenServiceStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lock_screen/lock_screen.mojom;l=22" + }, + "blink.mojom.LockScreenServiceStatus": { + "definition": "enum LockScreenServiceStatus { kSuccess, kNotAllowedFromContext, kWriteError, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/lock_screen/lock_screen.mojom;l=7" + }, + "blink.mojom.LockRequest.Granted": { + "definition": "Granted(pending_associated_remote lock_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/locks/lock_manager.mojom;l=18" + }, + "blink.mojom.LockRequest.Failed": { + "definition": "Failed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/locks/lock_manager.mojom;l=21" + }, + "blink.mojom.LockManager.RequestLock": { + "definition": "RequestLock(string name, LockMode mode, WaitMode wait, pending_associated_remote request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/locks/lock_manager.mojom;l=66" + }, + "blink.mojom.LockManager.QueryState": { + "definition": "QueryState() => (array requested, array held);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/locks/lock_manager.mojom;l=73" + }, + "blink.mojom.LockInfo": { + "definition": "struct LockInfo { string name; LockMode mode; string client_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/locks/lock_manager.mojom;l=30" + }, + "blink.mojom.LockMode": { + "definition": "enum LockMode { SHARED, EXCLUSIVE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/locks/lock_manager.mojom;l=25" + }, + "blink.mojom.WaitMode": { + "definition": "enum WaitMode { WAIT, NO_WAIT, PREEMPT };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/locks/lock_manager.mojom;l=54" + }, + "blink.mojom.DisplayMode": { + "definition": "enum DisplayMode { kUndefined, kBrowser, kMinimalUi, kStandalone, kFullscreen, kWindowControlsOverlay, kTabbed, kBorderless, kPictureInPicture, /** * This enum is persisted to logs, and therefore is append-only and should not be reordered. */};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/display_mode.mojom;l=12" + }, + "blink.mojom.Manifest": { + "definition": "struct Manifest { url.mojom.Url manifest_url; TextDirection dir; mojo_base.mojom.String16? name; mojo_base.mojom.String16? short_name; mojo_base.mojom.String16? description; url.mojom.Url id; bool has_custom_id; url.mojom.Url start_url; bool has_valid_specified_start_url; DisplayMode display; array display_override; array borderless_url_patterns; device.mojom.ScreenOrientationLockType orientation; array icons; array screenshots; array shortcuts; ManifestShareTarget? share_target; array file_handlers; array protocol_handlers; array scope_extensions; ManifestLockScreen? lock_screen; ManifestNoteTaking? note_taking; array related_applications; bool prefer_related_applications; bool has_theme_color; uint32 theme_color; bool has_background_color; uint32 background_color; mojo_base.mojom.String16? gcm_sender_id; url.mojom.Url scope; array permissions_policy; ManifestLaunchHandler? launch_handler; map translations; bool has_dark_theme_color; uint32 dark_theme_color; bool has_dark_background_color; uint32 dark_background_color; ManifestTabStrip? tab_strip; mojo_base.mojom.String16? version; map name_localized; map short_name_localized; map description_localized; map> icons_localized;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=24" + }, + "blink.mojom.ManifestLocalizedTextObject": { + "definition": "struct ManifestLocalizedTextObject { mojo_base.mojom.String16 value; Manifest.TextDirection? dir; mojo_base.mojom.String16? lang;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=159" + }, + "blink.mojom.ManifestShortcutItem": { + "definition": "struct ManifestShortcutItem { mojo_base.mojom.String16 name; mojo_base.mojom.String16? short_name; mojo_base.mojom.String16? description; url.mojom.Url url; array icons; map name_localized; map short_name_localized; map description_localized; map> icons_localized;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=170" + }, + "blink.mojom.ManifestImageResource": { + "definition": "struct ManifestImageResource { url.mojom.Url src; mojo_base.mojom.String16? type; array sizes; array purpose;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=193" + }, + "blink.mojom.ManifestScreenshot": { + "definition": "struct ManifestScreenshot { ManifestImageResource image; FormFactor form_factor; mojo_base.mojom.String16? label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=220" + }, + "blink.mojom.ManifestFileFilter": { + "definition": "struct ManifestFileFilter { mojo_base.mojom.String16? name; array accept;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=237" + }, + "blink.mojom.ManifestProtocolHandler": { + "definition": "struct ManifestProtocolHandler { mojo_base.mojom.String16 protocol; url.mojom.Url url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=245" + }, + "blink.mojom.ManifestScopeExtension": { + "definition": "struct ManifestScopeExtension { url.mojom.Origin origin; bool has_origin_wildcard;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=250" + }, + "blink.mojom.ManifestLockScreen": { + "definition": "struct ManifestLockScreen { url.mojom.Url start_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=260" + }, + "blink.mojom.ManifestNoteTaking": { + "definition": "struct ManifestNoteTaking { url.mojom.Url new_note_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=268" + }, + "blink.mojom.ManifestRelatedApplication": { + "definition": "struct ManifestRelatedApplication { mojo_base.mojom.String16? platform; url.mojom.Url? url; mojo_base.mojom.String16? id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=275" + }, + "blink.mojom.ManifestShareTargetParams": { + "definition": "struct ManifestShareTargetParams { mojo_base.mojom.String16? title; mojo_base.mojom.String16? text; mojo_base.mojom.String16? url; array? files;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=293" + }, + "blink.mojom.ManifestShareTarget": { + "definition": "struct ManifestShareTarget { url.mojom.Url action; Method method; Enctype enctype; ManifestShareTargetParams params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=304" + }, + "blink.mojom.ManifestFileHandler": { + "definition": "struct ManifestFileHandler { url.mojom.Url action; mojo_base.mojom.String16 name; array icons; map> accept; LaunchType launch_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=333" + }, + "blink.mojom.ManifestTranslationItem": { + "definition": "struct ManifestTranslationItem { mojo_base.mojom.String16? name; mojo_base.mojom.String16? short_name; mojo_base.mojom.String16? description;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=358" + }, + "blink.mojom.ManifestTabStrip": { + "definition": "struct ManifestTabStrip { HomeTabUnion home_tab; NewTabButtonParams new_tab_button;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=367" + }, + "blink.mojom.HomeTabParams": { + "definition": "struct HomeTabParams { array icons; array scope_patterns;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=385" + }, + "blink.mojom.NewTabButtonParams": { + "definition": "struct NewTabButtonParams { url.mojom.Url? url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=395" + }, + "blink.mojom.ManifestDebugInfo": { + "definition": "struct ManifestDebugInfo { array errors; string raw_manifest;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=402" + }, + "blink.mojom.ManifestError": { + "definition": "struct ManifestError { string message; bool critical; uint32 line; uint32 column;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=409" + }, + "blink.mojom.TextDirection": { + "definition": "enum TextDirection { kAuto, kLTR, kRTL, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=25" + }, + "blink.mojom.Purpose": { + "definition": "enum Purpose { ANY = 0, MONOCHROME, MASKABLE, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=194" + }, + "blink.mojom.FormFactor": { + "definition": "enum FormFactor { kUnknown = 0, kWide, kNarrow, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=221" + }, + "blink.mojom.Method": { + "definition": "enum Method { kGet, kPost, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=307" + }, + "blink.mojom.Enctype": { + "definition": "enum Enctype { kFormUrlEncoded, kMultipartFormData, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=315" + }, + "blink.mojom.LaunchType": { + "definition": "enum LaunchType { kSingleClient, kMultipleClients, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=347" + }, + "blink.mojom.TabStripMemberVisibility": { + "definition": "enum TabStripMemberVisibility { kAuto, kAbsent,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=374" + }, + "blink.mojom.ManifestRequestResult": { + "definition": "enum ManifestRequestResult { kUnexpectedFailure, kNoManifestAllowed, kNoManifestSpecified, kManifestFailedToFetch, kManifestFailedToParse, kSuccess};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=417" + }, + "blink.mojom.HomeTabUnion": { + "definition": "union HomeTabUnion { TabStripMemberVisibility visibility; HomeTabParams params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest.mojom;l=379" + }, + "blink.mojom.ManifestLaunchHandler": { + "definition": "struct ManifestLaunchHandler { ClientMode? client_mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest_launch_handler.mojom;l=6" + }, + "blink.mojom.ClientMode": { + "definition": "enum ClientMode { kAuto = 0, kNavigateNew = 1, kNavigateExisting = 2, kFocusExisting = 3, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest_launch_handler.mojom;l=9" + }, + "blink.mojom.ManifestManager.RequestManifest": { + "definition": "RequestManifest() => (ManifestRequestResult result, url.mojom.Url url, Manifest manifest);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest_manager.mojom;l=28" + }, + "blink.mojom.ManifestManager.RequestManifestAndErrors": { + "definition": "RequestManifestAndErrors() => result; RequestManifestDebugInfo() => (url.mojom.Url url, Manifest parsed_manifest, ManifestDebugInfo debug_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest_manager.mojom;l=34" + }, + "blink.mojom.ManifestManager.ParseManifestFromString": { + "definition": "ParseManifestFromString(url.mojom.Url document_url, url.mojom.Url manifest_url, string manifest_content) => (Manifest? parsed_manifest);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest_manager.mojom;l=50" + }, + "blink.mojom.RequestManifestError": { + "definition": "struct RequestManifestError { ManifestRequestResult error; array details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest_manager.mojom;l=11" + }, + "blink.mojom.ManifestUrlChangeObserver.ManifestUrlChanged": { + "definition": "ManifestUrlChanged(url.mojom.Url manifest_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/manifest/manifest_observer.mojom;l=13" + }, + "blink.mojom.CaptureHandleConfig": { + "definition": "struct CaptureHandleConfig { bool expose_origin = false; mojo_base.mojom.String16 capture_handle; bool all_origins_permitted = false; array permitted_origins;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/media/capture_handle_config.mojom;l=10" + }, + "blink.mojom.FullscreenVideoElementHandler.RequestFullscreenVideoElement": { + "definition": "RequestFullscreenVideoElement();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/media/fullscreen_video_element.mojom;l=9" + }, + "blink.mojom.RendererAudioInputStreamFactory.CreateStream": { + "definition": "CreateStream( pending_remote client, mojo_base.mojom.UnguessableToken session_id, media.mojom.AudioParameters params, bool automatic_gain_control, uint32 shared_memory_count, media.mojom.AudioProcessingConfig? processing_config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom;l=21" + }, + "blink.mojom.RendererAudioInputStreamFactory.AssociateInputAndOutputForAec": { + "definition": "AssociateInputAndOutputForAec( mojo_base.mojom.UnguessableToken input_stream_id, string output_device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom;l=34" + }, + "blink.mojom.RendererAudioInputStreamFactoryClient.StreamCreated": { + "definition": "StreamCreated( pending_remote stream, pending_receiver client_request, media.mojom.ReadWriteAudioDataPipe data_pipe, bool initially_muted, mojo_base.mojom.UnguessableToken? stream_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom;l=48" + }, + "blink.mojom.RendererAudioOutputStreamFactory.RequestDeviceAuthorization": { + "definition": "RequestDeviceAuthorization( pending_receiver stream_provider_receiver, mojo_base.mojom.UnguessableToken? session_id, string device_id) => (media.mojom.OutputDeviceStatus state, media.mojom.AudioParameters output_params, string matched_device_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/media/renderer_audio_output_stream_factory.mojom;l=22" + }, + "blink.mojom.MediaSessionClient.DidReceiveAction": { + "definition": "DidReceiveAction(media_session.mojom.MediaSessionAction action, MediaSessionActionDetails? details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=35" + }, + "blink.mojom.MediaSessionService.SetClient": { + "definition": "SetClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=68" + }, + "blink.mojom.MediaSessionService.SetPlaybackState": { + "definition": "SetPlaybackState(MediaSessionPlaybackState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=71" + }, + "blink.mojom.MediaSessionService.SetPositionState": { + "definition": "SetPositionState(media_session.mojom.MediaPosition? position);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=74" + }, + "blink.mojom.MediaSessionService.SetMetadata": { + "definition": "SetMetadata(SpecMediaMetadata? metadata);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=78" + }, + "blink.mojom.MediaSessionService.SetMicrophoneState": { + "definition": "SetMicrophoneState(media_session.mojom.MicrophoneState microphone_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=81" + }, + "blink.mojom.MediaSessionService.SetCameraState": { + "definition": "SetCameraState(media_session.mojom.CameraState camera_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=84" + }, + "blink.mojom.MediaSessionService.EnableAction": { + "definition": "EnableAction(media_session.mojom.MediaSessionAction action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=89" + }, + "blink.mojom.MediaSessionService.DisableAction": { + "definition": "DisableAction(media_session.mojom.MediaSessionAction action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=94" + }, + "blink.mojom.MediaSessionSeekToDetails": { + "definition": "struct MediaSessionSeekToDetails { mojo_base.mojom.TimeDelta seek_time; bool fast_seek;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=41" + }, + "blink.mojom.MediaSessionEnterPictureInPictureDetails": { + "definition": "struct MediaSessionEnterPictureInPictureDetails { MediaSessionEnterPictureInPictureReason reason;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=46" + }, + "blink.mojom.SpecMediaMetadata": { + "definition": "struct SpecMediaMetadata { mojo_base.mojom.String16 title; mojo_base.mojom.String16 artist; mojo_base.mojom.String16 album; array artwork; array chapterInfo;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=57" + }, + "blink.mojom.MediaSessionPlaybackState": { + "definition": "enum MediaSessionPlaybackState { NONE, PAUSED, PLAYING,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=11" + }, + "blink.mojom.MediaSessionEnterPictureInPictureReason": { + "definition": "enum MediaSessionEnterPictureInPictureReason { kOther, kUserAction, kContentOccluded,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=17" + }, + "blink.mojom.MediaSessionActionDetails": { + "definition": "union MediaSessionActionDetails { MediaSessionSeekToDetails seek_to; MediaSessionEnterPictureInPictureDetails enter_picture_in_picture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediasession/media_session.mojom;l=50" + }, + "blink.mojom.AecDumpAgent.Start": { + "definition": "Start(mojo_base.mojom.File file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/aec_dump.mojom;l=11" + }, + "blink.mojom.AecDumpAgent.Stop": { + "definition": "Stop();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/aec_dump.mojom;l=12" + }, + "blink.mojom.AecDumpManager.Add": { + "definition": "Add(pending_remote agent);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/aec_dump.mojom;l=18" + }, + "blink.mojom.MediaDevicesDispatcherHost.EnumerateDevices": { + "definition": "EnumerateDevices(bool request_audio_input, bool request_video_input, bool request_audio_output, bool request_video_input_capabilities, bool request_audio_input_capabilities) => (array> enumeration, array video_input_device_capabilities, array audio_input_device_capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=93" + }, + "blink.mojom.MediaDevicesDispatcherHost.GetVideoInputCapabilities": { + "definition": "GetVideoInputCapabilities() => (array video_input_device_capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=108" + }, + "blink.mojom.MediaDevicesDispatcherHost.GetAllVideoInputDeviceFormats": { + "definition": "GetAllVideoInputDeviceFormats(string device_id) => (array formats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=114" + }, + "blink.mojom.MediaDevicesDispatcherHost.GetAvailableVideoInputDeviceFormats": { + "definition": "GetAvailableVideoInputDeviceFormats(string device_id) => (array formats);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=122" + }, + "blink.mojom.MediaDevicesDispatcherHost.GetAudioInputCapabilities": { + "definition": "GetAudioInputCapabilities() => (array audio_input_device_capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=132" + }, + "blink.mojom.MediaDevicesDispatcherHost.AddMediaDevicesListener": { + "definition": "AddMediaDevicesListener(bool subscribe_audio_input, bool subscribe_video_input, bool subscribe_audio_output, pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=139" + }, + "blink.mojom.MediaDevicesDispatcherHost.SetCaptureHandleConfig": { + "definition": "SetCaptureHandleConfig(CaptureHandleConfig config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=146" + }, + "blink.mojom.MediaDevicesDispatcherHost.CloseFocusWindowOfOpportunity": { + "definition": "CloseFocusWindowOfOpportunity(string label);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=157" + }, + "blink.mojom.MediaDevicesDispatcherHost.ProduceSubCaptureTargetId": { + "definition": "ProduceSubCaptureTargetId(media.mojom.SubCaptureTargetType type) => (string id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=164" + }, + "blink.mojom.MediaDevicesDispatcherHost.SetPreferredSinkId": { + "definition": "SetPreferredSinkId(string sink_id) => (media.mojom.OutputDeviceStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=168" + }, + "blink.mojom.MediaDevicesDispatcherHost.SelectAudioOutput": { + "definition": "SelectAudioOutput(string device_id) => (SelectAudioOutputResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=174" + }, + "blink.mojom.MediaDevicesListener.OnDevicesChanged": { + "definition": "OnDevicesChanged( MediaDeviceType type, array device_infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=184" + }, + "blink.mojom.MediaDeviceInfo": { + "definition": "struct MediaDeviceInfo { string device_id; string label; string group_id; media.mojom.VideoCaptureControlSupport control_support; FacingMode facing_mode; media.mojom.CameraAvailability? availability;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=32" + }, + "blink.mojom.VideoInputDeviceCapabilities": { + "definition": "struct VideoInputDeviceCapabilities { string device_id; string group_id; media.mojom.VideoCaptureControlSupport control_support; array formats; FacingMode facing_mode; media.mojom.CameraAvailability? availability;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=41" + }, + "blink.mojom.SelectAudioOutputResult": { + "definition": "struct SelectAudioOutputResult { AudioOutputStatus status; MediaDeviceInfo device_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=61" + }, + "blink.mojom.AudioInputDeviceCapabilities": { + "definition": "struct AudioInputDeviceCapabilities { string device_id; string group_id; media.mojom.AudioParameters parameters; bool is_valid; int32 channels; int32 sample_rate; mojo_base.mojom.TimeDelta latency;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=66" + }, + "blink.mojom.MediaDeviceType": { + "definition": "enum MediaDeviceType { kMediaAudioInput, kMediaVideoInput, kMediaAudioOutput, kNumMediaDeviceTypes,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=13" + }, + "blink.mojom.FacingMode": { + "definition": "enum FacingMode { kNone, kUser, kEnvironment, kLeft, kRight,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=24" + }, + "blink.mojom.AudioOutputStatus": { + "definition": "enum AudioOutputStatus { kSuccess, kNoPermission, kNoDevices, kUnknown, kDeviceNotFound, kErrorOtherRequestInProgress, kNotSupported, kNoUserActivation,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_devices.mojom;l=50" + }, + "blink.mojom.MediaStreamDeviceObserver.OnDeviceStopped": { + "definition": "OnDeviceStopped(string label, MediaStreamDevice device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=230" + }, + "blink.mojom.MediaStreamDeviceObserver.OnDeviceChanged": { + "definition": "OnDeviceChanged(string label, MediaStreamDevice old_device, MediaStreamDevice new_device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=231" + }, + "blink.mojom.MediaStreamDeviceObserver.OnDeviceRequestStateChange": { + "definition": "OnDeviceRequestStateChange(string label, MediaStreamDevice device, MediaStreamStateChange new_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=237" + }, + "blink.mojom.MediaStreamDeviceObserver.OnDeviceCaptureConfigurationChange": { + "definition": "OnDeviceCaptureConfigurationChange(string label, MediaStreamDevice device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=243" + }, + "blink.mojom.MediaStreamDeviceObserver.OnDeviceCaptureHandleChange": { + "definition": "OnDeviceCaptureHandleChange(string label, MediaStreamDevice device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=246" + }, + "blink.mojom.MediaStreamDeviceObserver.OnZoomLevelChange": { + "definition": "OnZoomLevelChange( string label, MediaStreamDevice device, int32 zoom_level);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=250" + }, + "blink.mojom.MediaStreamDispatcherHost.GenerateStreams": { + "definition": "GenerateStreams(int32 request_id, StreamControls controls, bool user_gesture, StreamSelectionInfo audio_stream_selection_info) => (MediaStreamRequestResult result, string label, StreamDevicesSet? stream_devices, bool pan_tilt_zoom_allowed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=290" + }, + "blink.mojom.MediaStreamDispatcherHost.FocusCapturedSurface": { + "definition": "[EnableIfNot=is_android|is_ios] FocusCapturedSurface(string label, bool focus);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=303" + }, + "blink.mojom.MediaStreamDispatcherHost.CancelRequest": { + "definition": "CancelRequest(int32 request_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=307" + }, + "blink.mojom.MediaStreamDispatcherHost.StopStreamDevice": { + "definition": "StopStreamDevice( string device_id, mojo_base.mojom.UnguessableToken? session_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=314" + }, + "blink.mojom.MediaStreamDispatcherHost.OpenDevice": { + "definition": "OpenDevice(int32 request_id, string device_id, MediaStreamType type) => (bool success, string label, MediaStreamDevice device);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=318" + }, + "blink.mojom.MediaStreamDispatcherHost.CloseDevice": { + "definition": "CloseDevice(string label);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=322" + }, + "blink.mojom.MediaStreamDispatcherHost.SetCapturingLinkSecured": { + "definition": "SetCapturingLinkSecured(mojo_base.mojom.UnguessableToken? session_id, MediaStreamType type, bool is_secure);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=332" + }, + "blink.mojom.MediaStreamDispatcherHost.ApplySubCaptureTarget": { + "definition": "ApplySubCaptureTarget(mojo_base.mojom.UnguessableToken session_id, media.mojom.SubCaptureTargetType type, mojo_base.mojom.Token sub_capture_target, uint32 sub_capture_target_version) => (media.mojom.ApplySubCaptureTargetResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=353" + }, + "blink.mojom.MediaStreamDispatcherHost.SendWheel": { + "definition": "[EnableIfNot=is_android|is_ios] SendWheel(mojo_base.mojom.UnguessableToken session_id, CapturedWheelAction action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=363" + }, + "blink.mojom.MediaStreamDispatcherHost.UpdateZoomLevel": { + "definition": "[EnableIfNot=is_android|is_ios] UpdateZoomLevel( mojo_base.mojom.UnguessableToken session_id, ZoomLevelAction action) => (CapturedSurfaceControlResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=375" + }, + "blink.mojom.MediaStreamDispatcherHost.RequestCapturedSurfaceControlPermission": { + "definition": "[EnableIfNot=is_android|is_ios] RequestCapturedSurfaceControlPermission( mojo_base.mojom.UnguessableToken session_id) => (CapturedSurfaceControlResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=382" + }, + "blink.mojom.MediaStreamDispatcherHost.GetOpenDevice": { + "definition": "[Sync] GetOpenDevice(int32 request_id, mojo_base.mojom.UnguessableToken session_id, mojo_base.mojom.UnguessableToken transfer_id) => (MediaStreamRequestResult result, GetOpenDeviceResponse? response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=403" + }, + "blink.mojom.MediaStreamDispatcherHost.KeepDeviceAliveForTransfer": { + "definition": "KeepDeviceAliveForTransfer(mojo_base.mojom.UnguessableToken session_id, mojo_base.mojom.UnguessableToken transfer_id) => (bool device_found);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=425" + }, + "blink.mojom.MediaStreamTrackMetricsHost.AddTrack": { + "definition": "AddTrack(uint64 id, bool is_audio, bool is_remote);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=434" + }, + "blink.mojom.MediaStreamTrackMetricsHost.RemoveTrack": { + "definition": "RemoveTrack(uint64 id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=437" + }, + "blink.mojom.SearchOnlyByDeviceId": { + "definition": "struct SearchOnlyByDeviceId {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=118" + }, + "blink.mojom.SearchBySessionId": { + "definition": "struct SearchBySessionId { map session_id_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=120" + }, + "blink.mojom.MediaStreamDevice": { + "definition": "struct MediaStreamDevice { MediaStreamType type; string id; int64 display_id; media.mojom.VideoFacingMode video_facing; string? group_id; string? matched_output_device_id; string name; media.mojom.AudioParameters input; mojo_base.mojom.UnguessableToken? session_id; media.mojom.DisplayMediaInformation? display_media_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=133" + }, + "blink.mojom.TrackControls": { + "definition": "struct TrackControls { MediaStreamType stream_type; array device_ids;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=147" + }, + "blink.mojom.StreamControls": { + "definition": "struct StreamControls { TrackControls audio; TrackControls video; bool hotword_enabled; bool disable_local_echo; bool suppress_local_audio_playback; bool restrict_own_audio; bool exclude_system_audio; WindowAudioPreference window_audio_preference; bool exclude_self_browser_surface; bool request_pan_tilt_zoom_permission; bool request_all_screens; PreferredDisplaySurface preferred_display_surface; bool dynamic_surface_switching_requested; bool exclude_monitor_type_surfaces;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=153" + }, + "blink.mojom.GetOpenDeviceResponse": { + "definition": "struct GetOpenDeviceResponse { string label; MediaStreamDevice device; bool pan_tilt_zoom_allowed;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=171" + }, + "blink.mojom.CapturedWheelAction": { + "definition": "struct CapturedWheelAction { double relative_x; double relative_y; int32 wheel_delta_x; int32 wheel_delta_y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=190" + }, + "blink.mojom.StreamDevices": { + "definition": "struct StreamDevices { MediaStreamDevice? audio_device; MediaStreamDevice? video_device;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=256" + }, + "blink.mojom.StreamDevicesSet": { + "definition": "struct StreamDevicesSet { array stream_devices;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=261" + }, + "blink.mojom.MediaStreamType": { + "definition": "enum MediaStreamType { NO_SERVICE, DEVICE_AUDIO_CAPTURE, DEVICE_VIDEO_CAPTURE, GUM_TAB_AUDIO_CAPTURE, GUM_TAB_VIDEO_CAPTURE, GUM_DESKTOP_VIDEO_CAPTURE, GUM_DESKTOP_AUDIO_CAPTURE, DISPLAY_VIDEO_CAPTURE, DISPLAY_AUDIO_CAPTURE, DISPLAY_VIDEO_CAPTURE_THIS_TAB, DISPLAY_VIDEO_CAPTURE_SET, NUM_MEDIA_TYPES,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=17" + }, + "blink.mojom.MediaStreamRequestResult": { + "definition": "enum MediaStreamRequestResult { OK, PERMISSION_DENIED, PERMISSION_DISMISSED, INVALID_STATE, NO_HARDWARE, INVALID_SECURITY_ORIGIN, TAB_CAPTURE_FAILURE, SCREEN_CAPTURE_FAILURE, CAPTURE_FAILURE, CONSTRAINT_NOT_SATISFIED, TRACK_START_FAILURE_AUDIO, TRACK_START_FAILURE_VIDEO, NOT_SUPPORTED, FAILED_DUE_TO_SHUTDOWN, KILL_SWITCH_ON, PERMISSION_DENIED_BY_SYSTEM, DEVICE_IN_USE, REQUEST_CANCELLED, START_TIMEOUT, PERMISSION_DENIED_BY_USER, AUDIO_DEVICE_SOCKET_ERROR, NUM_MEDIA_REQUEST_RESULTS,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=76" + }, + "blink.mojom.MediaStreamStateChange": { + "definition": "enum MediaStreamStateChange { PLAY, PAUSE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=102" + }, + "blink.mojom.PreferredDisplaySurface": { + "definition": "enum PreferredDisplaySurface { NO_PREFERENCE, MONITOR, WINDOW, BROWSER,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=109" + }, + "blink.mojom.CapturedSurfaceControlResult": { + "definition": "enum CapturedSurfaceControlResult { kSuccess, kUnknownError, kNoPermissionError, kCapturerNotFoundError, kCapturedSurfaceNotFoundError, kDisallowedForSelfCaptureError, kCapturerNotFocusedError, kMinZoomLevel, kMaxZoomLevel,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=199" + }, + "blink.mojom.ZoomLevelAction": { + "definition": "enum ZoomLevelAction { kIncrease, kDecrease, kReset,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=212" + }, + "blink.mojom.WindowAudioPreference": { + "definition": "enum WindowAudioPreference { kSystem, kWindow, kExclude,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=221" + }, + "blink.mojom.StreamSelectionInfo": { + "definition": "union StreamSelectionInfo { SearchOnlyByDeviceId search_only_by_device_id; SearchBySessionId search_by_session_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mediastream/media_stream.mojom;l=127" + }, + "blink.mojom.MemoryUsageMonitorLinux.SetProcFiles": { + "definition": "SetProcFiles(mojo_base.mojom.ReadOnlyFile statm_file, mojo_base.mojom.ReadOnlyFile status_file);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/memory_usage_monitor_linux.mojom;l=14" + }, + "blink.mojom.CloneableMessage": { + "definition": "struct CloneableMessage { mojo_base.mojom.BigBuffer encoded_message; array blobs; url.mojom.Origin? sender_origin; uint64 stack_trace_id; int64 stack_trace_debugger_id_first; int64 stack_trace_debugger_id_second; bool stack_trace_should_pause; mojo_base.mojom.UnguessableToken sender_agent_cluster_id; bool locked_to_sender_agent_cluster; array> file_system_access_tokens;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/cloneable_message.mojom;l=15" + }, + "blink.mojom.DelegatedCapability": { + "definition": "enum DelegatedCapability { kNone, kPaymentRequest, kFullscreenRequest, kDisplayCaptureRequest,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/delegated_capability.mojom;l=8" + }, + "blink.mojom.MessagePortDescriptor": { + "definition": "struct MessagePortDescriptor { handle pipe_handle; mojo_base.mojom.UnguessableToken id; uint64 sequence_number;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/message_port_descriptor.mojom;l=21" + }, + "blink.mojom.ImageReleaseCallback.Release": { + "definition": "Release(gpu.mojom.SyncToken token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/static_bitmap_image.mojom;l=25" + }, + "blink.mojom.AcceleratedStaticBitmapImage": { + "definition": "struct AcceleratedStaticBitmapImage { gpu.mojom.ExportedSharedImage shared_image; gpu.mojom.SyncToken sync_token; skia.mojom.AlphaType alpha_type; pending_remote release_callback;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/static_bitmap_image.mojom;l=29" + }, + "blink.mojom.SerializedStaticBitmapImage": { + "definition": "union SerializedStaticBitmapImage { skia.mojom.BitmapN32 bitmap; AcceleratedStaticBitmapImage accelerated_image;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/static_bitmap_image.mojom;l=46" + }, + "blink.mojom.TaskAttributionId": { + "definition": "struct TaskAttributionId { uint32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/task_attribution_id.mojom;l=8" + }, + "blink.mojom.TransferableMessage": { + "definition": "struct TransferableMessage { CloneableMessage message; array ports; array stream_channels; array array_buffer_contents_array; array image_bitmap_contents_array; UserActivationSnapshot? user_activation; DelegatedCapability delegated_capability = kNone; TaskAttributionId? task_state_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/transferable_message.mojom;l=26" + }, + "blink.mojom.UserActivationSnapshot": { + "definition": "struct UserActivationSnapshot { bool has_been_active; bool was_active;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/messaging/user_activation_snapshot.mojom;l=9" + }, + "blink.mojom.MimeRegistry.GetMimeTypeFromExtension": { + "definition": "[Sync] GetMimeTypeFromExtension(string extension) => (string mime_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/mime/mime_registry.mojom;l=13" + }, + "blink.mojom.NavigationApiHistoryEntry": { + "definition": "struct NavigationApiHistoryEntry { mojo_base.mojom.String16 key; mojo_base.mojom.String16 id; mojo_base.mojom.String16 url; int64 item_sequence_number; int64 document_sequence_number; mojo_base.mojom.String16? state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_api_history_entry_arrays.mojom;l=13" + }, + "blink.mojom.NavigationApiHistoryEntryArrays": { + "definition": "struct NavigationApiHistoryEntryArrays { array back_entries; array forward_entries; NavigationApiHistoryEntry? previous_entry;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_api_history_entry_arrays.mojom;l=26" + }, + "blink.mojom.NavigationInitiatorActivationAndAdStatus": { + "definition": "enum NavigationInitiatorActivationAndAdStatus { kDidNotStartWithTransientActivation, kStartedWithTransientActivationFromNonAd, kStartedWithTransientActivationFromAd,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_initiator_activation_and_ad_status.mojom;l=17" + }, + "blink.mojom.BeginNavigationParams": { + "definition": "struct BeginNavigationParams { blink.mojom.LocalFrameToken? initiator_frame_token; string headers; int32 load_flags = 0; bool skip_service_worker = false; blink.mojom.RequestContextType request_context_type = blink.mojom.RequestContextType.UNSPECIFIED; blink.mojom.MixedContentContextType mixed_content_context_type = blink.mojom.MixedContentContextType.kNotMixedContent; bool is_form_submission = false; bool was_initiated_by_link_click = false; ForceHistoryPush force_history_push = ForceHistoryPush.kNo; url.mojom.Url searchable_form_url; string searchable_form_encoding; url.mojom.Url client_side_redirect_url; mojo_base.mojom.DictionaryValue? devtools_initiator; network.mojom.TrustTokenParams? trust_token_params; Impression? impression; mojo_base.mojom.TimeTicks before_unload_start; mojo_base.mojom.TimeTicks before_unload_end; blink.mojom.NavigationInitiatorActivationAndAdStatus initiator_activation_and_ad_status; bool is_container_initiated = false; network.mojom.StorageAccessApiStatus storage_access_api_status = kNone; bool has_rel_opener = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=110" + }, + "blink.mojom.CommonNavigationParams": { + "definition": "struct CommonNavigationParams { url.mojom.Url url; url.mojom.Origin? initiator_origin; url.mojom.Url? initiator_base_url; blink.mojom.Referrer referrer; int32 transition; NavigationType navigation_type = DIFFERENT_DOCUMENT; blink.mojom.NavigationDownloadPolicy download_policy; bool should_replace_current_entry = false; url.mojom.Url base_url_for_data_url; mojo_base.mojom.TimeTicks actual_navigation_start; mojo_base.mojom.TimeTicks navigation_start; string method = \"GET\"; network.mojom.URLRequestBody? post_data; network.mojom.SourceLocation source_location; bool started_from_context_menu = false; bool has_user_gesture = false; bool text_fragment_token = false; network.mojom.CSPDisposition should_check_main_world_csp = network.mojom.CSPDisposition.CHECK; array initiator_origin_trial_features; string href_translate; bool is_history_navigation_in_new_child_frame = false; mojo_base.mojom.TimeTicks input_start; network.mojom.RequestDestination request_destination = network.mojom.RequestDestination.kEmpty;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=204" + }, + "blink.mojom.NavigationTiming": { + "definition": "struct NavigationTiming { mojo_base.mojom.TimeTicks redirect_start; mojo_base.mojom.TimeTicks redirect_end; mojo_base.mojom.TimeTicks fetch_start; SystemEntropy system_entropy_at_navigation_start = kEmpty; ParentResourceTimingAccess parent_resource_timing_access = ParentResourceTimingAccess.kDoNotReport;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=339" + }, + "blink.mojom.OldPageInfo": { + "definition": "struct OldPageInfo { blink.mojom.LocalFrameToken frame_token_for_old_main_frame; blink.mojom.PageLifecycleState new_lifecycle_state_for_old_page;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=357" + }, + "blink.mojom.CommitNavigationParams": { + "definition": "struct CommitNavigationParams { url.mojom.Origin origin_to_commit; blink.mojom.StorageKey storage_key; bool is_overriding_user_agent = false; array redirects; array redirect_response; array redirect_infos; string post_content_type; url.mojom.Url original_url; string original_method; bool can_load_local_resources = false; mojo_base.mojom.ByteString page_state; int32 nav_entry_id = 0; map subframe_unique_names; bool intended_as_new_entry = false; int32 pending_history_list_index = -1; int32 current_history_list_index = -1; int32 current_history_list_length = 0; bool was_discarded = false; bool is_view_source = false; bool should_clear_history_list = false; NavigationTiming navigation_timing; blink.mojom.WasActivatedOption was_activated = kUnknown; mojo_base.mojom.UnguessableToken navigation_token; array prefetched_signed_exchanges; [EnableIf=is_android] string data_url_as_string; bool is_browser_initiated = false; bool has_ua_visual_transition = false; int64 document_ukm_source_id; blink.mojom.FramePolicy frame_policy; array force_enabled_origin_trials; bool origin_agent_cluster = false; bool origin_agent_cluster_left_as_default = true; array enabled_client_hints; bool is_cross_site_cross_browsing_context_group = false; bool should_have_sticky_user_activation = false; OldPageInfo? old_page_info; int32 http_response_code = -1; NavigationApiHistoryEntryArrays navigation_api_history_entry_arrays; array early_hints_preloaded_resources; mojo_base.mojom.TimeTicks commit_sent; string srcdoc_value; bool is_load_data_with_base_url = false; bool ancestor_or_self_has_cspee = false; string reduced_accept_language; network.mojom.NavigationDeliveryType navigation_delivery_type = kDefault; blink.mojom.ViewTransitionState? view_transition_state; TaskAttributionId? soft_navigation_heuristics_task_id; map modified_runtime_features; FencedFrameProperties? fenced_frame_properties; blink.mojom.BackForwardCacheNotRestoredReasons? not_restored_reasons; network.mojom.StorageAccessApiStatus load_with_storage_access = kNone; mojo_base.mojom.UnguessableToken? browsing_context_group_token; blink.mojom.LCPCriticalPathPredictorNavigationTimeHint? lcpp_hint; RendererContentSettings content_settings; string? cookie_deprecation_label; uint64? visited_link_salt; viz.mojom.LocalSurfaceId? local_surface_id; map? initial_permission_statuses; bool should_skip_screenshot; bool force_new_document_sequence_number = false; mojo_base.mojom.UnguessableToken navigation_metrics_token; blink.mojom.LocalFrameToken? commit_target_frame_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=371" + }, + "blink.mojom.PageSwapEventParams": { + "definition": "struct PageSwapEventParams { url.mojom.Url url; mojo_base.mojom.ByteString page_state; NavigationTypeForNavigationApi navigation_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=704" + }, + "blink.mojom.NavigationType": { + "definition": "enum NavigationType { RELOAD, RELOAD_BYPASSING_CACHE, RESTORE, RESTORE_WITH_POST, HISTORY_SAME_DOCUMENT, HISTORY_DIFFERENT_DOCUMENT, SAME_DOCUMENT, DIFFERENT_DOCUMENT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=49" + }, + "blink.mojom.NavigationTypeForNavigationApi": { + "definition": "enum NavigationTypeForNavigationApi { kPush, kTraverse, kReplace, kReload,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=90" + }, + "blink.mojom.ForceHistoryPush": { + "definition": "enum ForceHistoryPush { kYes, kNo,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=101" + }, + "blink.mojom.ParentResourceTimingAccess": { + "definition": "enum ParentResourceTimingAccess { kDoNotReport, kReportWithoutResponseDetails, kReportWithResponseDetails,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_params.mojom;l=323" + }, + "blink.mojom.NavigationDownloadTypes": { + "definition": "struct NavigationDownloadTypes { bool view_source; bool interstitial; bool opener_cross_origin; bool ad_frame_no_gesture; bool ad_frame; bool sandbox; bool no_gesture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_policy.mojom;l=11" + }, + "blink.mojom.NavigationDownloadPolicy": { + "definition": "struct NavigationDownloadPolicy { NavigationDownloadTypes observed_types; NavigationDownloadTypes disallowed_types;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/navigation_policy.mojom;l=22" + }, + "blink.mojom.SHA256HashValue": { + "definition": "struct SHA256HashValue { mojo_base.mojom.ByteString data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/prefetched_signed_exchange_info.mojom;l=13" + }, + "blink.mojom.PrefetchedSignedExchangeInfo": { + "definition": "struct PrefetchedSignedExchangeInfo { url.mojom.Url outer_url; SHA256HashValue header_integrity; url.mojom.Url inner_url; network.mojom.URLResponseHead inner_response; pending_remote loader_factory_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/prefetched_signed_exchange_info.mojom;l=20" + }, + "blink.mojom.RendererContentSettings": { + "definition": "struct RendererContentSettings { bool allow_script; bool allow_image; bool allow_popup; bool allow_mixed_content; bool allow_controlled_frame;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/renderer_content_settings.mojom;l=9" + }, + "blink.mojom.RendererEvictionReason": { + "definition": "enum RendererEvictionReason { kJavaScriptExecution, kNetworkRequestDatapipeDrainedAsBytesConsumer, kNetworkRequestRedirected, kNetworkRequestTimeout, kNetworkExceedsBufferLimit, kBroadcastChannelOnMessage, kSharedWorkerMessage,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/renderer_eviction_reason.mojom;l=8" + }, + "blink.mojom.SystemEntropy": { + "definition": "enum SystemEntropy { kEmpty, kNormal, kHigh,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/system_entropy.mojom;l=7" + }, + "blink.mojom.WasActivatedOption": { + "definition": "enum WasActivatedOption { kUnknown, kYes, kNo,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/navigation/was_activated_option.mojom;l=9" + }, + "blink.mojom.NotificationAction": { + "definition": "struct NotificationAction { NotificationActionType type; string action; mojo_base.mojom.String16 title; url.mojom.Url icon; mojo_base.mojom.String16? placeholder;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification.mojom;l=32" + }, + "blink.mojom.NotificationData": { + "definition": "struct NotificationData { const uint64 kMaximumDeveloperDataSize = 1048576; const uint64 kMaximumActions = 2; mojo_base.mojom.String16 title; NotificationDirection direction = LEFT_TO_RIGHT; string? lang; mojo_base.mojom.String16 body; string tag; url.mojom.Url image; url.mojom.Url icon; url.mojom.Url badge; array? vibration_pattern; double timestamp = 0; bool renotify = false; bool silent = false; bool require_interaction = false; array? data; array? actions; mojo_base.mojom.Time? show_trigger_timestamp; NotificationScenario scenario = DEFAULT;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification.mojom;l=50" + }, + "blink.mojom.NotificationResources": { + "definition": "struct NotificationResources { skia.mojom.BitmapN32? image; skia.mojom.BitmapN32? icon; skia.mojom.BitmapN32? badge; array? action_icons;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification.mojom;l=129" + }, + "blink.mojom.NotificationDirection": { + "definition": "enum NotificationDirection { LEFT_TO_RIGHT, RIGHT_TO_LEFT, AUTO,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification.mojom;l=13" + }, + "blink.mojom.NotificationActionType": { + "definition": "enum NotificationActionType { BUTTON, TEXT};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification.mojom;l=20" + }, + "blink.mojom.NotificationScenario": { + "definition": "enum NotificationScenario { DEFAULT, INCOMING_CALL};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification.mojom;l=26" + }, + "blink.mojom.NonPersistentNotificationListener.OnShow": { + "definition": "OnShow();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=13" + }, + "blink.mojom.NonPersistentNotificationListener.OnClick": { + "definition": "OnClick() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=16" + }, + "blink.mojom.NonPersistentNotificationListener.OnClose": { + "definition": "OnClose() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=20" + }, + "blink.mojom.NotificationService.GetPermissionStatus": { + "definition": "[Sync] GetPermissionStatus() => (PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=38" + }, + "blink.mojom.NotificationService.DisplayNonPersistentNotification": { + "definition": "DisplayNonPersistentNotification( string token, NotificationData notification_data, NotificationResources notification_resources, pending_remote event_listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=46" + }, + "blink.mojom.NotificationService.CloseNonPersistentNotification": { + "definition": "CloseNonPersistentNotification(string token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=56" + }, + "blink.mojom.NotificationService.DisplayPersistentNotification": { + "definition": "DisplayPersistentNotification( int64 service_worker_registration_id, NotificationData notification_data, NotificationResources notification_resources) => (PersistentNotificationError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=62" + }, + "blink.mojom.NotificationService.ClosePersistentNotification": { + "definition": "ClosePersistentNotification(string notification_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=71" + }, + "blink.mojom.NotificationService.GetNotifications": { + "definition": "GetNotifications( int64 service_worker_registration_id, string filter_tag, bool include_triggered) => (array notification_ids, array notification_datas);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=85" + }, + "blink.mojom.PersistentNotificationError": { + "definition": "enum PersistentNotificationError { NONE, INTERNAL_ERROR, PERMISSION_DENIED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/notifications/notification_service.mojom;l=26" + }, + "blink.mojom.TranslationManagerCreateTranslatorClient.OnResult": { + "definition": "OnResult(CreateTranslatorResult result, TranslatorLanguageCode? source_lang, TranslatorLanguageCode? target_lang);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translation_manager.mojom;l=110" + }, + "blink.mojom.TranslationManager.CreateTranslator": { + "definition": "CreateTranslator( pending_remote client, TranslatorCreateOptions options, bool add_fake_download_delay);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translation_manager.mojom;l=140" + }, + "blink.mojom.TranslationManager.TranslationAvailable": { + "definition": "TranslationAvailable( TranslatorLanguageCode source_lang, TranslatorLanguageCode target_lang) => (CanCreateTranslatorResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translation_manager.mojom;l=146" + }, + "blink.mojom.TranslatorLanguageCode": { + "definition": "struct TranslatorLanguageCode { string code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translation_manager.mojom;l=10" + }, + "blink.mojom.TranslatorCreateOptions": { + "definition": "struct TranslatorCreateOptions { TranslatorLanguageCode source_lang; TranslatorLanguageCode target_lang; pending_remote? observer_remote;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translation_manager.mojom;l=121" + }, + "blink.mojom.CanCreateTranslatorResult": { + "definition": "enum CanCreateTranslatorResult { kReadily = 0, kAfterDownloadLibraryNotReady = 1, kAfterDownloadLanguagePackNotReady = 2, kAfterDownloadLibraryAndLanguagePackNotReady = 3, kAfterDownloadTranslatorCreationRequired = 4, kNoNotSupportedLanguage = 5, kNoServiceCrashed = 6, kNoDisallowedByPolicy = 7, kNoExceedsServiceCountLimitation = 8, kNoInvalidStoragePartition = 9,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translation_manager.mojom;l=20" + }, + "blink.mojom.CreateTranslatorError": { + "definition": "enum CreateTranslatorError { kInvalidBinary = 1, kInvalidFunctionPointer = 2, kFailedToInitialize = 3, kFailedToCreateTranslator = 4, kServiceCrashed = 5, kDisallowedByPolicy = 6, kExceedsServiceCountLimitation = 7, kExceedsPendingTaskCountLimitation = 8, kInvalidVersion = 9, kInvalidStoragePartition = 10,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translation_manager.mojom;l=58" + }, + "blink.mojom.CreateTranslatorResult": { + "definition": "union CreateTranslatorResult { pending_remote translator; CreateTranslatorError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translation_manager.mojom;l=98" + }, + "blink.mojom.Translator.Translate": { + "definition": "Translate(string input, pending_remote pending_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translator.mojom;l=12" + }, + "blink.mojom.Translator.TranslateStreaming": { + "definition": "TranslateStreaming(string input, pending_remote pending_responder);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/on_device_translation/translator.mojom;l=15" + }, + "blink.mojom.OomInterventionHost.OnHighMemoryUsage": { + "definition": "OnHighMemoryUsage();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/oom_intervention/oom_intervention.mojom;l=19" + }, + "blink.mojom.OomIntervention.StartDetection": { + "definition": "StartDetection(pending_remote host, DetectionArgs detection_args, bool renderer_pause_enabled, bool navigate_ads_enabled, bool purge_v8_memory_enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/oom_intervention/oom_intervention.mojom;l=42" + }, + "blink.mojom.DetectionArgs": { + "definition": "struct DetectionArgs { uint64 private_footprint_threshold;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/oom_intervention/oom_intervention.mojom;l=25" + }, + "blink.mojom.OpenGraphMetadata": { + "definition": "struct OpenGraphMetadata { url.mojom.Url? image;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/opengraph/metadata.mojom;l=18" + }, + "blink.mojom.OriginTrialStateHost.ApplyFeatureDiffForOriginTrial": { + "definition": "ApplyFeatureDiffForOriginTrial(map origin_trial_features);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/origin_trials/origin_trial_state_host.mojom;l=39" + }, + "blink.mojom.OriginTrialStateHost.EnablePersistentTrial": { + "definition": "EnablePersistentTrial(string token, array script_origins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/origin_trials/origin_trial_state_host.mojom;l=49" + }, + "blink.mojom.OriginTrialFeatureState": { + "definition": "struct OriginTrialFeatureState { bool is_enabled; array tokens;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/origin_trials/origin_trial_state_host.mojom;l=16" + }, + "blink.mojom.OriginTrialsSettings": { + "definition": "struct OriginTrialsSettings { array disabled_tokens;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/origin_trials/origin_trials_settings.mojom;l=7" + }, + "blink.mojom.DisplayCutoutHost.NotifyViewportFitChanged": { + "definition": "NotifyViewportFitChanged(blink.mojom.ViewportFit value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/display_cutout.mojom;l=29" + }, + "blink.mojom.DisplayCutoutHost.NotifyComplexSafeAreaConstraintChanged": { + "definition": "NotifyComplexSafeAreaConstraintChanged(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/display_cutout.mojom;l=32" + }, + "blink.mojom.DisplayCutoutClient.SetSafeArea": { + "definition": "SetSafeArea(gfx.mojom.Insets safe_area);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/display_cutout.mojom;l=39" + }, + "blink.mojom.ViewportFit": { + "definition": "enum ViewportFit { kAuto, kContain, kCover, kCoverForcedByUserAgent,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/display_cutout.mojom;l=9" + }, + "blink.mojom.DraggableRegion": { + "definition": "struct DraggableRegion { gfx.mojom.Rect bounds; bool draggable = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/draggable_region.mojom;l=10" + }, + "blink.mojom.PageBroadcast.SetPageLifecycleState": { + "definition": "SetPageLifecycleState( PageLifecycleState state, PageRestoreParams? page_restore_params) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=103" + }, + "blink.mojom.PageBroadcast.AudioStateChanged": { + "definition": "AudioStateChanged(bool is_audio_playing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=108" + }, + "blink.mojom.PageBroadcast.ActivatePrerenderedPage": { + "definition": "ActivatePrerenderedPage( PrerenderPageActivationParams prerender_page_activation_params) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=118" + }, + "blink.mojom.PageBroadcast.UpdateWebPreferences": { + "definition": "UpdateWebPreferences(blink.mojom.WebPreferences preferences);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=122" + }, + "blink.mojom.PageBroadcast.UpdateRendererPreferences": { + "definition": "UpdateRendererPreferences(blink.mojom.RendererPreferences preferences);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=125" + }, + "blink.mojom.PageBroadcast.SetHistoryIndexAndLength": { + "definition": "SetHistoryIndexAndLength(int32 index, int32 length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=128" + }, + "blink.mojom.PageBroadcast.SetPageBaseBackgroundColor": { + "definition": "SetPageBaseBackgroundColor(skia.mojom.SkColor? color);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=131" + }, + "blink.mojom.PageBroadcast.CreateRemoteMainFrame": { + "definition": "CreateRemoteMainFrame( RemoteFrameToken token, FrameToken? opener_frame_token, FrameReplicationState replication_state, bool is_loading, mojo_base.mojom.UnguessableToken devtools_frame_token, mojo_base.mojom.UnguessableToken? navigation_metrics_token, RemoteFrameInterfacesFromBrowser remote_frame_interfaces, RemoteMainFrameInterfaces remote_main_frame_interfaces);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=153" + }, + "blink.mojom.PageBroadcast.UpdatePageBrowsingContextGroup": { + "definition": "UpdatePageBrowsingContextGroup( mojo_base.mojom.UnguessableToken browsing_context_group_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=165" + }, + "blink.mojom.PageBroadcast.SetPageAttributionSupport": { + "definition": "SetPageAttributionSupport(network.mojom.AttributionSupport support);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=172" + }, + "blink.mojom.PageBroadcast.UpdateColorProviders": { + "definition": "UpdateColorProviders(ColorProviderColorMaps color_provider_colors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=179" + }, + "blink.mojom.PageBroadcast.UpdateCanvasNoiseToken": { + "definition": "UpdateCanvasNoiseToken(blink.mojom.NoiseToken? canvas_noise_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=184" + }, + "blink.mojom.PageBroadcast.SetSupportsDraggableRegions": { + "definition": "SetSupportsDraggableRegions(bool supports_draggable_regions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=188" + }, + "blink.mojom.PageLifecycleState": { + "definition": "struct PageLifecycleState { bool is_frozen; PageVisibilityState visibility; bool is_in_back_forward_cache; PagehideDispatch pagehide_dispatch; bool eviction_enabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=36" + }, + "blink.mojom.PageRestoreParams": { + "definition": "struct PageRestoreParams { mojo_base.mojom.TimeTicks navigation_start; int32 pending_history_list_index; int32 current_history_list_length; blink.mojom.ViewTransitionState? view_transition_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=51" + }, + "blink.mojom.ColorProviderColorMaps": { + "definition": "struct ColorProviderColorMaps { map light_colors_map; map dark_colors_map; map forced_colors_map;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=71" + }, + "blink.mojom.PrerenderPageActivationParams": { + "definition": "struct PrerenderPageActivationParams { blink.mojom.WasActivatedOption was_user_activated; mojo_base.mojom.TimeTicks? activation_start; blink.mojom.ViewTransitionState? view_transition_state;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=79" + }, + "blink.mojom.PagehideDispatch": { + "definition": "enum PagehideDispatch { kNotDispatched, kDispatchedNotPersisted, kDispatchedPersisted};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page.mojom;l=22" + }, + "blink.mojom.PageVisibilityState": { + "definition": "enum PageVisibilityState { kVisible, kHidden, kHiddenButPainting,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/page_visibility_state.mojom;l=9" + }, + "blink.mojom.PrerenderParam": { + "definition": "struct PrerenderParam { string page_metric_suffix; bool should_warm_up_compositor; bool should_prepare_paint_tree; bool should_pause_javascript_execution;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/prerender_page_param.mojom;l=8" + }, + "blink.mojom.FrameWidget.DragTargetDragEnter": { + "definition": "DragTargetDragEnter(DragData drag_data, gfx.mojom.PointF point_in_viewport, gfx.mojom.PointF screen_point, AllowedDragOperations operations_allowed, uint32 key_modifiers) => (ui.mojom.DragOperation operation, bool document_is_handling_drag);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=84" + }, + "blink.mojom.FrameWidget.DragTargetDragOver": { + "definition": "DragTargetDragOver(gfx.mojom.PointF point_in_viewport, gfx.mojom.PointF screen_point, AllowedDragOperations operations_allowed, uint32 key_modifiers) => (ui.mojom.DragOperation operation, bool document_is_handling_drag);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=99" + }, + "blink.mojom.FrameWidget.DragTargetDragLeave": { + "definition": "DragTargetDragLeave(gfx.mojom.PointF point_in_viewport, gfx.mojom.PointF screen_point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=107" + }, + "blink.mojom.FrameWidget.DragTargetDrop": { + "definition": "DragTargetDrop(DragData drag_data, gfx.mojom.PointF point_in_viewport, gfx.mojom.PointF screen_point, uint32 key_modifiers) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=111" + }, + "blink.mojom.FrameWidget.DragSourceEndedAt": { + "definition": "DragSourceEndedAt(gfx.mojom.PointF point_in_viewport, gfx.mojom.PointF screen_point, ui.mojom.DragOperation drag_operation) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=117" + }, + "blink.mojom.FrameWidget.DragSourceSystemDragEnded": { + "definition": "DragSourceSystemDragEnded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=122" + }, + "blink.mojom.FrameWidget.OnStartStylusWriting": { + "definition": "OnStartStylusWriting([EnableIf=is_win] gfx.mojom.Rect focus_widget_rect_in_dips) => (StylusWritingFocusResult? focus_result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=130" + }, + "blink.mojom.FrameWidget.SetBackgroundOpaque": { + "definition": "SetBackgroundOpaque(bool opaque);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=139" + }, + "blink.mojom.FrameWidget.SetTextDirection": { + "definition": "SetTextDirection(mojo_base.mojom.TextDirection direction);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=142" + }, + "blink.mojom.FrameWidget.SetActive": { + "definition": "SetActive(bool active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=149" + }, + "blink.mojom.FrameWidget.SetInheritedEffectiveTouchActionForSubFrame": { + "definition": "SetInheritedEffectiveTouchActionForSubFrame(cc.mojom.TouchAction touch_action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=154" + }, + "blink.mojom.FrameWidget.UpdateRenderThrottlingStatusForSubFrame": { + "definition": "UpdateRenderThrottlingStatusForSubFrame( bool is_throttled, bool subtree_throttled, bool display_locked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=157" + }, + "blink.mojom.FrameWidget.SetIsInertForSubFrame": { + "definition": "SetIsInertForSubFrame(bool inert);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=165" + }, + "blink.mojom.FrameWidget.EnableDeviceEmulation": { + "definition": "EnableDeviceEmulation(DeviceEmulationParams parameters, DeviceEmulationCacheBehavior cache_behavior);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=174" + }, + "blink.mojom.FrameWidget.DisableDeviceEmulation": { + "definition": "DisableDeviceEmulation();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=178" + }, + "blink.mojom.FrameWidget.BindWidgetCompositor": { + "definition": "BindWidgetCompositor(pending_receiver host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=181" + }, + "blink.mojom.FrameWidget.SetViewportIntersection": { + "definition": "SetViewportIntersection(ViewportIntersectionState intersection_state, VisualProperties? visual_properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=187" + }, + "blink.mojom.FrameWidget.NotifyClearedDisplayedGraphics": { + "definition": "NotifyClearedDisplayedGraphics();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=195" + }, + "blink.mojom.FrameWidgetHost.AnimateDoubleTapZoomInMainFrame": { + "definition": "AnimateDoubleTapZoomInMainFrame( gfx.mojom.Point tap_point, gfx.mojom.Rect rect_to_zoom);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=203" + }, + "blink.mojom.FrameWidgetHost.ZoomToFindInPageRectInMainFrame": { + "definition": "ZoomToFindInPageRectInMainFrame(gfx.mojom.Rect rect_to_zoom);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=209" + }, + "blink.mojom.FrameWidgetHost.SetHasTouchEventConsumers": { + "definition": "SetHasTouchEventConsumers(TouchEventConsumers touch_event_consumers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=213" + }, + "blink.mojom.FrameWidgetHost.IntrinsicSizingInfoChanged": { + "definition": "IntrinsicSizingInfoChanged(IntrinsicSizingInfo sizing_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=221" + }, + "blink.mojom.FrameWidgetHost.AutoscrollStart": { + "definition": "AutoscrollStart(gfx.mojom.PointF position);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=230" + }, + "blink.mojom.FrameWidgetHost.AutoscrollFling": { + "definition": "AutoscrollFling(gfx.mojom.Vector2dF velocity);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=234" + }, + "blink.mojom.FrameWidgetHost.AutoscrollEnd": { + "definition": "AutoscrollEnd();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=237" + }, + "blink.mojom.PopupWidgetHost.RequestClosePopup": { + "definition": "RequestClosePopup();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=247" + }, + "blink.mojom.PopupWidgetHost.ShowPopup": { + "definition": "ShowPopup(gfx.mojom.Rect initial_rect, gfx.mojom.Rect anchor_rect) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=250" + }, + "blink.mojom.PopupWidgetHost.SetPopupBounds": { + "definition": "SetPopupBounds(gfx.mojom.Rect bounds) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=253" + }, + "blink.mojom.ProximateCharacterRangeBounds": { + "definition": "struct ProximateCharacterRangeBounds { gfx.mojom.Range range; array widget_bounds_in_dips;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=31" + }, + "blink.mojom.StylusWritingFocusResult": { + "definition": "struct StylusWritingFocusResult { gfx.mojom.Rect focused_edit_bounds; gfx.mojom.Rect caret_bounds; [EnableIf=is_win] ProximateCharacterRangeBounds? proximate_bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=39" + }, + "blink.mojom.DeviceEmulationCacheBehavior": { + "definition": "enum DeviceEmulationCacheBehavior { kClearCache, kKeepCache,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page/widget.mojom;l=52" + }, + "blink.mojom.DEPRECATED_FileSystemFile": { + "definition": "struct DEPRECATED_FileSystemFile { url.mojom.Url filesystem_url@0; uint64 offset@1; uint64 length@2; mojo_base.mojom.Time modification_time@3;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=48" + }, + "blink.mojom.File": { + "definition": "struct File { mojo_base.mojom.String16 path@0; uint64 offset@1; uint64 length@2; mojo_base.mojom.Time modification_time@3;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=57" + }, + "blink.mojom.RequestBody": { + "definition": "struct RequestBody { array elements@0; int64 identifier@1; bool contains_sensitive_info@2;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=76" + }, + "blink.mojom.HttpBody": { + "definition": "struct HttpBody { mojo_base.mojom.String16? http_content_type@0; RequestBody? request_body@1; bool contains_passwords@2 = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=84" + }, + "blink.mojom.ViewState": { + "definition": "struct ViewState { gfx.mojom.PointF visual_viewport_scroll_offset@0; gfx.mojom.Point scroll_offset@1; double page_scale_factor@2; [MinVersion=1] mojo_base.mojom.String16? scroll_anchor_selector@3; [MinVersion=1] gfx.mojom.PointF? scroll_anchor_offset@4; [MinVersion=1] uint64 scroll_anchor_simhash@5 = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=98" + }, + "blink.mojom.FrameState": { + "definition": "struct FrameState { mojo_base.mojom.String16? url_string@0; mojo_base.mojom.String16? referrer@1; mojo_base.mojom.String16? target@2; mojo_base.mojom.String16? state_object@3; array document_state@4; ScrollRestorationType scroll_restoration_type@5; ViewState? view_state@6; int64 item_sequence_number@7; int64 document_sequence_number@8; network.mojom.ReferrerPolicy referrer_policy@9; HttpBody http_body@10; array children@11; [MinVersion=2] string? initiator_origin@12; [MinVersion=3] mojo_base.mojom.String16? navigation_api_key@13; [MinVersion=3] mojo_base.mojom.String16? navigation_api_id@14; [MinVersion=4] mojo_base.mojom.String16? navigation_api_state@15; [MinVersion=5] bool protect_url_in_navigation_api@16; [MinVersion=6] mojo_base.mojom.String16? initiator_base_url_string@17;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=110" + }, + "blink.mojom.PageState": { + "definition": "struct PageState { array referenced_files@0; FrameState top@1;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=136" + }, + "blink.mojom.ScrollRestorationType": { + "definition": "enum ScrollRestorationType { [Default] kAuto = 0, kManual = 1};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=91" + }, + "blink.mojom.Element": { + "definition": "union Element { string blob_uuid@0; array bytes@1; File file@2; DEPRECATED_FileSystemFile DEPRECATED_file_system_file@3;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/page_state/page_state.mojom;l=66" + }, + "blink.mojom.AdProperties": { + "definition": "struct AdProperties { string width; string height; string slot; string lang; string ad_type; double bid_floor;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/parakeet/ad_request.mojom;l=10" + }, + "blink.mojom.AdGeolocation": { + "definition": "struct AdGeolocation { double latitude; double longitude;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/parakeet/ad_request.mojom;l=20" + }, + "blink.mojom.AdTargeting": { + "definition": "struct AdTargeting { array? interests; AdGeolocation? geolocation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/parakeet/ad_request.mojom;l=26" + }, + "blink.mojom.AdRequestConfig": { + "definition": "struct AdRequestConfig { url.mojom.Url ad_request_url; array ad_properties; string? publisher_code; AdTargeting? targeting; array? anonymized_proxied_signals; url.mojom.Url? fallback_source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/parakeet/ad_request.mojom;l=45" + }, + "blink.mojom.AdSignals": { + "definition": "enum AdSignals { kCourseGeolocation = 0, kCourseUserAgent = 1, kTargeting = 2, kUserAdInterests = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/parakeet/ad_request.mojom;l=33" + }, + "blink.mojom.PartitionedPopinParams": { + "definition": "struct PartitionedPopinParams { url.mojom.Origin opener_top_frame_origin; network.mojom.SiteForCookies opener_site_for_cookies;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/partitioned_popins/partitioned_popin_params.mojom;l=15" + }, + "payments.mojom.PaymentManager.Init": { + "definition": "Init(url.mojom.Url context_url, string service_worker_scope);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=84" + }, + "payments.mojom.PaymentManager.DeletePaymentInstrument": { + "definition": "DeletePaymentInstrument(string instrument_key) => (PaymentHandlerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=85" + }, + "payments.mojom.PaymentManager.GetPaymentInstrument": { + "definition": "GetPaymentInstrument(string instrument_key) => (PaymentInstrument instrument, PaymentHandlerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=87" + }, + "payments.mojom.PaymentManager.KeysOfPaymentInstruments": { + "definition": "KeysOfPaymentInstruments() => (array keys, PaymentHandlerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=89" + }, + "payments.mojom.PaymentManager.HasPaymentInstrument": { + "definition": "HasPaymentInstrument(string instrument_key) => (PaymentHandlerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=91" + }, + "payments.mojom.PaymentManager.SetPaymentInstrument": { + "definition": "SetPaymentInstrument(string instrument_key, PaymentInstrument instrument) => (PaymentHandlerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=93" + }, + "payments.mojom.PaymentManager.ClearPaymentInstruments": { + "definition": "ClearPaymentInstruments() => (PaymentHandlerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=95" + }, + "payments.mojom.PaymentManager.SetUserHint": { + "definition": "SetUserHint(string user_hint);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=97" + }, + "payments.mojom.PaymentManager.EnableDelegations": { + "definition": "EnableDelegations(array delegations) =>(PaymentHandlerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=101" + }, + "payments.mojom.PaymentHandlerResponseCallback.OnResponseForAbortPayment": { + "definition": "OnResponseForAbortPayment(bool payment_aborted);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=156" + }, + "payments.mojom.PaymentHandlerResponseCallback.OnResponseForCanMakePayment": { + "definition": "OnResponseForCanMakePayment(CanMakePaymentResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=160" + }, + "payments.mojom.PaymentHandlerResponseCallback.OnResponseForPaymentRequest": { + "definition": "OnResponseForPaymentRequest(PaymentHandlerResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=164" + }, + "payments.mojom.PaymentInstrument": { + "definition": "struct PaymentInstrument { string name; array icons; string method;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=63" + }, + "payments.mojom.CanMakePaymentEventData": { + "definition": "struct CanMakePaymentEventData { url.mojom.Url top_origin; url.mojom.Url payment_request_origin; array method_data; array modifiers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=107" + }, + "payments.mojom.PaymentRequestEventData": { + "definition": "struct PaymentRequestEventData { url.mojom.Url top_origin; url.mojom.Url payment_request_origin; string payment_request_id; array method_data; PaymentCurrencyAmount total; array modifiers; string instrument_key; PaymentOptions? payment_options; array? shipping_options; pending_remote? payment_handler_host;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=116" + }, + "payments.mojom.CanMakePaymentResponse": { + "definition": "struct CanMakePaymentResponse { CanMakePaymentEventResponseType response_type; bool can_make_payment;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=133" + }, + "payments.mojom.PaymentHandlerResponse": { + "definition": "struct PaymentHandlerResponse { string method_name; string stringified_details; PaymentEventResponseType response_type; string? payer_name; string? payer_email; string? payer_phone; PaymentAddress? shipping_address; string? shipping_option;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=140" + }, + "payments.mojom.PaymentHandlerStatus": { + "definition": "enum PaymentHandlerStatus { SUCCESS, NOT_FOUND, NO_ACTIVE_WORKER, STORAGE_OPERATION_FAILED, FETCH_INSTRUMENT_ICON_FAILED, FETCH_PAYMENT_APP_INFO_FAILED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=13" + }, + "payments.mojom.CanMakePaymentEventResponseType": { + "definition": "enum CanMakePaymentEventResponseType { INCOGNITO, NO_EXPLICITLY_VERIFIED_METHODS, NOT_INSTALLED, NO_URL_BASED_PAYMENT_METHODS, BOOLEAN_CONVERSION_ERROR, BROWSER_ERROR, INTERNAL_ERROR, NO_RESPONSE, REJECT, SUCCESS, TIMEOUT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=22" + }, + "payments.mojom.PaymentEventResponseType": { + "definition": "enum PaymentEventResponseType { PAYER_NAME_EMPTY, PAYER_EMAIL_EMPTY, PAYER_PHONE_EMPTY, PAYMENT_DETAILS_ABSENT, PAYMENT_DETAILS_NOT_OBJECT, PAYMENT_DETAILS_STRINGIFY_ERROR, PAYMENT_EVENT_BROWSER_ERROR, PAYMENT_EVENT_INTERNAL_ERROR, PAYMENT_EVENT_NO_RESPONSE, PAYMENT_EVENT_REJECT, PAYMENT_EVENT_SERVICE_WORKER_ERROR, PAYMENT_EVENT_SUCCESS, PAYMENT_EVENT_TIMEOUT, PAYMENT_HANDLER_ACTIVITY_DIED, PAYMENT_HANDLER_FAIL_TO_LOAD_MAIN_FRAME, PAYMENT_HANDLER_INSECURE_NAVIGATION, PAYMENT_HANDLER_INSTALL_FAILED, PAYMENT_HANDLER_WINDOW_CLOSING, PAYMENT_METHOD_NAME_EMPTY, SHIPPING_ADDRESS_INVALID, SHIPPING_OPTION_EMPTY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=37" + }, + "payments.mojom.PaymentDelegation": { + "definition": "enum PaymentDelegation { SHIPPING_ADDRESS, PAYER_NAME, PAYER_PHONE, PAYER_EMAIL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_app.mojom;l=69" + }, + "payments.mojom.PaymentHandlerHost.ChangePaymentMethod": { + "definition": "ChangePaymentMethod(PaymentHandlerMethodData method_data) => (PaymentRequestDetailsUpdate response_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_handler_host.mojom;l=73" + }, + "payments.mojom.PaymentHandlerHost.ChangeShippingOption": { + "definition": "ChangeShippingOption(string shipping_option_id) => (PaymentRequestDetailsUpdate response_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_handler_host.mojom;l=75" + }, + "payments.mojom.PaymentHandlerHost.ChangeShippingAddress": { + "definition": "ChangeShippingAddress(PaymentAddress shipping_address) => (PaymentRequestDetailsUpdate response_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_handler_host.mojom;l=77" + }, + "payments.mojom.PaymentHandlerMethodData": { + "definition": "struct PaymentHandlerMethodData { string method_name; string? stringified_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_handler_host.mojom;l=11" + }, + "payments.mojom.PaymentHandlerModifier": { + "definition": "struct PaymentHandlerModifier { PaymentCurrencyAmount? total; PaymentHandlerMethodData method_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_handler_host.mojom;l=26" + }, + "payments.mojom.PaymentRequestDetailsUpdate": { + "definition": "struct PaymentRequestDetailsUpdate { PaymentCurrencyAmount? total; array? shipping_options; array? modifiers; string error = \"\"; string? stringified_payment_method_errors; AddressErrors? shipping_address_errors;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_handler_host.mojom;l=33" + }, + "payments.mojom.PaymentRequestClient.OnPaymentMethodChange": { + "definition": "OnPaymentMethodChange(string method_name, string stringified_details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=84" + }, + "payments.mojom.PaymentRequestClient.OnShippingAddressChange": { + "definition": "OnShippingAddressChange(PaymentAddress address);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=85" + }, + "payments.mojom.PaymentRequestClient.OnShippingOptionChange": { + "definition": "OnShippingOptionChange(string shipping_option_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=86" + }, + "payments.mojom.PaymentRequestClient.OnPayerDetailChange": { + "definition": "OnPayerDetailChange(PayerDetail detail);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=87" + }, + "payments.mojom.PaymentRequestClient.OnPaymentResponse": { + "definition": "OnPaymentResponse(PaymentResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=88" + }, + "payments.mojom.PaymentRequestClient.OnError": { + "definition": "OnError(PaymentErrorReason error, string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=89" + }, + "payments.mojom.PaymentRequestClient.OnComplete": { + "definition": "OnComplete();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=90" + }, + "payments.mojom.PaymentRequestClient.OnAbort": { + "definition": "OnAbort(bool aborted_successfully);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=91" + }, + "payments.mojom.PaymentRequestClient.OnCanMakePayment": { + "definition": "OnCanMakePayment(CanMakePaymentQueryResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=92" + }, + "payments.mojom.PaymentRequestClient.OnHasEnrolledInstrument": { + "definition": "OnHasEnrolledInstrument(HasEnrolledInstrumentQueryResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=93" + }, + "payments.mojom.PaymentRequestClient.WarnNoFavicon": { + "definition": "WarnNoFavicon();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=94" + }, + "payments.mojom.PaymentRequestClient.AllowConnectToSource": { + "definition": "AllowConnectToSource( url.mojom.Url url, url.mojom.Url url_before_redirects, bool did_follow_redirect) => (bool allow);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=100" + }, + "payments.mojom.PaymentRequest.Init": { + "definition": "Init(pending_remote client, array method_data, PaymentDetails details, PaymentOptions options);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=279" + }, + "payments.mojom.PaymentRequest.Show": { + "definition": "Show(bool wait_for_updated_details, bool had_user_activation);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=292" + }, + "payments.mojom.PaymentRequest.UpdateWith": { + "definition": "UpdateWith(PaymentDetails details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=299" + }, + "payments.mojom.PaymentRequest.OnPaymentDetailsNotUpdated": { + "definition": "OnPaymentDetailsNotUpdated();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=303" + }, + "payments.mojom.PaymentRequest.Abort": { + "definition": "Abort();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=307" + }, + "payments.mojom.PaymentRequest.Complete": { + "definition": "Complete(PaymentComplete result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=310" + }, + "payments.mojom.PaymentRequest.Retry": { + "definition": "Retry(PaymentValidationErrors errors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=316" + }, + "payments.mojom.PaymentRequest.CanMakePayment": { + "definition": "CanMakePayment();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=322" + }, + "payments.mojom.PaymentRequest.HasEnrolledInstrument": { + "definition": "HasEnrolledInstrument();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=327" + }, + "payments.mojom.PaymentResponse": { + "definition": "struct PaymentResponse { string method_name; string stringified_details; PaymentAddress? shipping_address; string? shipping_option; PayerDetail payer; blink.mojom.GetAssertionAuthenticatorResponse? get_assertion_authenticator_response;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=15" + }, + "payments.mojom.PayerDetail": { + "definition": "struct PayerDetail { string? email; string? name; string? phone;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=36" + }, + "payments.mojom.PaymentItem": { + "definition": "struct PaymentItem { string label; PaymentCurrencyAmount amount; bool pending;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=106" + }, + "payments.mojom.PaymentShippingOption": { + "definition": "struct PaymentShippingOption { string id; string label; PaymentCurrencyAmount amount; bool selected;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=112" + }, + "payments.mojom.SecurePaymentConfirmationRequest": { + "definition": "struct SecurePaymentConfirmationRequest { array> credential_ids; array challenge; blink.mojom.PaymentCredentialInstrument instrument; mojo_base.mojom.TimeDelta? timeout; url.mojom.Origin? payee_origin; string? payee_name; string rp_id; blink.mojom.AuthenticationExtensionsClientInputs? extensions; array browser_bound_pub_key_cred_params; bool show_opt_out; array payment_entities_logos;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=137" + }, + "payments.mojom.NetworkOrIssuerInformation": { + "definition": "struct NetworkOrIssuerInformation { string name; url.mojom.Url icon;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=184" + }, + "payments.mojom.PaymentEntityLogo": { + "definition": "struct PaymentEntityLogo { url.mojom.Url url; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=189" + }, + "payments.mojom.PaymentMethodData": { + "definition": "struct PaymentMethodData { string supported_method; string stringified_data; AndroidPayEnvironment environment; int32 min_google_play_services_version; int32 api_version; array supported_networks; SecurePaymentConfirmationRequest? secure_payment_confirmation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=195" + }, + "payments.mojom.PaymentDetailsModifier": { + "definition": "struct PaymentDetailsModifier { PaymentItem? total; array additional_display_items; PaymentMethodData method_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=224" + }, + "payments.mojom.PaymentDetails": { + "definition": "struct PaymentDetails { PaymentItem? total; array? display_items; array? shipping_options; array? modifiers; string error = \"\"; AddressErrors? shipping_address_errors; string? id; string? stringified_payment_method_errors;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=230" + }, + "payments.mojom.PaymentOptions": { + "definition": "struct PaymentOptions { bool request_payer_name; bool request_payer_email; bool request_payer_phone; bool request_shipping; PaymentShippingType shipping_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=257" + }, + "payments.mojom.PaymentErrorReason": { + "definition": "enum PaymentErrorReason { UNKNOWN, USER_CANCEL, NOT_SUPPORTED, NOT_SUPPORTED_FOR_INVALID_ORIGIN_OR_SSL, ALREADY_SHOWING, INVALID_DATA_FROM_RENDERER, NOT_ALLOWED_ERROR, USER_OPT_OUT, USER_ACTIVATION_REQUIRED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=42" + }, + "payments.mojom.CanMakePaymentQueryResult": { + "definition": "enum CanMakePaymentQueryResult { CAN_MAKE_PAYMENT, CANNOT_MAKE_PAYMENT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=54" + }, + "payments.mojom.HasEnrolledInstrumentQueryResult": { + "definition": "enum HasEnrolledInstrumentQueryResult { HAS_ENROLLED_INSTRUMENT, HAS_NO_ENROLLED_INSTRUMENT, QUERY_QUOTA_EXCEEDED, WARNING_HAS_ENROLLED_INSTRUMENT, WARNING_HAS_NO_ENROLLED_INSTRUMENT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=59" + }, + "payments.mojom.AndroidPayEnvironment": { + "definition": "enum AndroidPayEnvironment { PRODUCTION, TEST};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=119" + }, + "payments.mojom.BasicCardNetwork": { + "definition": "enum BasicCardNetwork { AMEX, DINERS, DISCOVER, JCB, MASTERCARD, MIR, UNIONPAY, VISA};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=124" + }, + "payments.mojom.PaymentShippingType": { + "definition": "enum PaymentShippingType { SHIPPING, DELIVERY, PICKUP};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=251" + }, + "payments.mojom.PaymentComplete": { + "definition": "enum PaymentComplete { FAIL, SUCCESS, UNKNOWN};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/payment_request.mojom;l=265" + }, + "payments.mojom.SecurePaymentConfirmationService.SecurePaymentConfirmationAvailability": { + "definition": "SecurePaymentConfirmationAvailability() => (SecurePaymentConfirmationAvailabilityEnum availability);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/secure_payment_confirmation_service.mojom;l=34" + }, + "payments.mojom.SecurePaymentConfirmationService.StorePaymentCredential": { + "definition": "StorePaymentCredential(array credential_id, string rp_id, array user_id) => (PaymentCredentialStorageStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/secure_payment_confirmation_service.mojom;l=38" + }, + "payments.mojom.SecurePaymentConfirmationService.MakePaymentCredential": { + "definition": "MakePaymentCredential(blink.mojom.PublicKeyCredentialCreationOptions options) => (blink.mojom.AuthenticatorStatus status, blink.mojom.MakeCredentialAuthenticatorResponse? credential, blink.mojom.WebAuthnDOMExceptionDetails? dom_exception_details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/secure_payment_confirmation_service.mojom;l=47" + }, + "payments.mojom.PaymentCredentialStorageStatus": { + "definition": "enum PaymentCredentialStorageStatus { SUCCESS, FAILED_TO_STORE_CREDENTIAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/secure_payment_confirmation_service.mojom;l=9" + }, + "payments.mojom.SecurePaymentConfirmationAvailabilityEnum": { + "definition": "enum SecurePaymentConfirmationAvailabilityEnum { kAvailable, kUnavailableUnknownReason, kUnavailableFeatureNotEnabled, kUnavailableNoPermissionPolicy, kUnavailableNoUserVerifyingPlatformAuthenticator,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/payments/secure_payment_confirmation_service.mojom;l=15" + }, + "blink.mojom.PeerConnectionManager.OnSuspend": { + "definition": "OnSuspend();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=39" + }, + "blink.mojom.PeerConnectionManager.OnThermalStateChange": { + "definition": "OnThermalStateChange(DeviceThermalState thermal_state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=42" + }, + "blink.mojom.PeerConnectionManager.StartEventLog": { + "definition": "StartEventLog(int32 peer_connection_local_id, int32 output_period_ms);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=45" + }, + "blink.mojom.PeerConnectionManager.StopEventLog": { + "definition": "StopEventLog(int32 peer_connection_local_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=48" + }, + "blink.mojom.PeerConnectionManager.StartDataChannelLog": { + "definition": "StartDataChannelLog(int32 peer_connection_local_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=51" + }, + "blink.mojom.PeerConnectionManager.StopDataChannelLog": { + "definition": "StopDataChannelLog(int32 peer_connection_local_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=54" + }, + "blink.mojom.PeerConnectionManager.GetStandardStats": { + "definition": "GetStandardStats();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=57" + }, + "blink.mojom.PeerConnectionManager.GetCurrentState": { + "definition": "GetCurrentState();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=60" + }, + "blink.mojom.PeerConnectionTrackerHost.AddPeerConnection": { + "definition": "AddPeerConnection(PeerConnectionInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=72" + }, + "blink.mojom.PeerConnectionTrackerHost.RemovePeerConnection": { + "definition": "RemovePeerConnection(int32 lid);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=76" + }, + "blink.mojom.PeerConnectionTrackerHost.UpdatePeerConnection": { + "definition": "UpdatePeerConnection(int32 lid, string type, string value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=83" + }, + "blink.mojom.PeerConnectionTrackerHost.OnPeerConnectionSessionIdSet": { + "definition": "OnPeerConnectionSessionIdSet(int32 lid, string session_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=87" + }, + "blink.mojom.PeerConnectionTrackerHost.GetUserMedia": { + "definition": "GetUserMedia(int32 request_id, bool audio, bool video, string audio_constraints, string video_constraints);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=98" + }, + "blink.mojom.PeerConnectionTrackerHost.GetUserMediaSuccess": { + "definition": "GetUserMediaSuccess(int32 request_id, string stream_id, string audio_track_info, string video_track_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=110" + }, + "blink.mojom.PeerConnectionTrackerHost.GetUserMediaFailure": { + "definition": "GetUserMediaFailure(int32 request_id, string error, string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=120" + }, + "blink.mojom.PeerConnectionTrackerHost.GetDisplayMedia": { + "definition": "GetDisplayMedia(int32 request_id, bool audio, bool video, string audio_constraints, string video_constraints);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=131" + }, + "blink.mojom.PeerConnectionTrackerHost.GetDisplayMediaSuccess": { + "definition": "GetDisplayMediaSuccess(int32 request_id, string stream_id, string audio_track_info, string video_track_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=143" + }, + "blink.mojom.PeerConnectionTrackerHost.GetDisplayMediaFailure": { + "definition": "GetDisplayMediaFailure(int32 request_id, string error, string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=153" + }, + "blink.mojom.PeerConnectionTrackerHost.WebRtcEventLogWrite": { + "definition": "WebRtcEventLogWrite(int32 lid, array output);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=156" + }, + "blink.mojom.PeerConnectionTrackerHost.WebRtcDataChannelLogWrite": { + "definition": "WebRtcDataChannelLogWrite(int32 lid, array output);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=159" + }, + "blink.mojom.PeerConnectionTrackerHost.AddStandardStats": { + "definition": "AddStandardStats(int32 lid, mojo_base.mojom.ListValue value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=164" + }, + "blink.mojom.PeerConnectionInfo": { + "definition": "struct PeerConnectionInfo { int32 lid; string rtc_configuration; string? url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=21" + }, + "blink.mojom.DeviceThermalState": { + "definition": "enum DeviceThermalState { kUnknown, kNominal, kFair, kSerious, kCritical,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom;l=10" + }, + "blink.mojom.WebRtcIpHandlingPolicy": { + "definition": "enum WebRtcIpHandlingPolicy { kDefault, kDefaultPublicAndPrivateInterfaces, kDefaultPublicInterfaceOnly, kDisableNonProxiedUdp,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/webrtc_ip_handling_policy.mojom;l=10" + }, + "blink.mojom.WebRtcIpHandlingUrlEntry": { + "definition": "struct WebRtcIpHandlingUrlEntry { content_settings.mojom.ContentSettingsPattern url_pattern; WebRtcIpHandlingPolicy handling;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/peerconnection/webrtc_ip_handling_url_entry.mojom;l=12" + }, + "blink.mojom.V8DetailedMemoryReporter.GetV8MemoryUsage": { + "definition": "GetV8MemoryUsage(Mode mode) => (PerProcessV8MemoryUsage memory_usage);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/performance_manager/v8_detailed_memory_reporter.mojom;l=69" + }, + "blink.mojom.PerContextV8MemoryUsage": { + "definition": "struct PerContextV8MemoryUsage { ExecutionContextToken token; mojo_base.mojom.ByteCount memory_used; string? url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/performance_manager/v8_detailed_memory_reporter.mojom;l=10" + }, + "blink.mojom.PerContextCanvasMemoryUsage": { + "definition": "struct PerContextCanvasMemoryUsage { ExecutionContextToken token; mojo_base.mojom.ByteCount memory_used;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/performance_manager/v8_detailed_memory_reporter.mojom;l=23" + }, + "blink.mojom.PerIsolateV8MemoryUsage": { + "definition": "struct PerIsolateV8MemoryUsage { uint64 num_detached_contexts; mojo_base.mojom.ByteCount detached_memory_used; mojo_base.mojom.ByteCount shared_memory_used; mojo_base.mojom.ByteCount blink_memory_used; array contexts; array canvas_contexts;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/performance_manager/v8_detailed_memory_reporter.mojom;l=28" + }, + "blink.mojom.PerProcessV8MemoryUsage": { + "definition": "struct PerProcessV8MemoryUsage { array isolates;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/performance_manager/v8_detailed_memory_reporter.mojom;l=49" + }, + "blink.mojom.Mode": { + "definition": "enum Mode { DEFAULT, EAGER, LAZY, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/performance_manager/v8_detailed_memory_reporter.mojom;l=58" + }, + "blink.mojom.PermissionObserver.OnPermissionStatusChange": { + "definition": "OnPermissionStatusChange(PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=95" + }, + "blink.mojom.EmbeddedPermissionControlClient.OnEmbeddedPermissionControlRegistered": { + "definition": "OnEmbeddedPermissionControlRegistered(bool allow, array? statuses);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=106" + }, + "blink.mojom.PermissionService.HasPermission": { + "definition": "HasPermission(PermissionDescriptor permission) => (PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=149" + }, + "blink.mojom.PermissionService.RegisterPageEmbeddedPermissionControl": { + "definition": "RegisterPageEmbeddedPermissionControl( array permissions, EmbeddedPermissionRequestDescriptor descriptor, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=156" + }, + "blink.mojom.PermissionService.RequestPageEmbeddedPermission": { + "definition": "RequestPageEmbeddedPermission(array permissions, EmbeddedPermissionRequestDescriptor descriptor) => (EmbeddedPermissionControlResult status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=163" + }, + "blink.mojom.PermissionService.RequestPermission": { + "definition": "RequestPermission(PermissionDescriptor permission, bool user_gesture) => (PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=168" + }, + "blink.mojom.PermissionService.RequestPermissions": { + "definition": "RequestPermissions(array permission, bool user_gesture) => (array statuses);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=170" + }, + "blink.mojom.PermissionService.RevokePermission": { + "definition": "RevokePermission(PermissionDescriptor permission) => (PermissionStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=172" + }, + "blink.mojom.PermissionService.AddPermissionObserver": { + "definition": "AddPermissionObserver(PermissionDescriptor permission, PermissionStatus last_known_status, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=176" + }, + "blink.mojom.PermissionService.AddPageEmbeddedPermissionObserver": { + "definition": "AddPageEmbeddedPermissionObserver(PermissionDescriptor permission, PermissionStatus last_known_status, pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=183" + }, + "blink.mojom.PermissionService.NotifyEventListener": { + "definition": "NotifyEventListener(PermissionDescriptor permission, string event_type, bool is_added);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=188" + }, + "blink.mojom.MidiPermissionDescriptor": { + "definition": "struct MidiPermissionDescriptor { bool sysex;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=49" + }, + "blink.mojom.ClipboardPermissionDescriptor": { + "definition": "struct ClipboardPermissionDescriptor { bool has_user_gesture; bool will_be_sanitized;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=53" + }, + "blink.mojom.CameraDevicePermissionDescriptor": { + "definition": "struct CameraDevicePermissionDescriptor { bool panTiltZoom;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=60" + }, + "blink.mojom.TopLevelStorageAccessPermissionDescriptor": { + "definition": "struct TopLevelStorageAccessPermissionDescriptor { url.mojom.Origin requestedOrigin;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=64" + }, + "blink.mojom.FullscreenPermissionDescriptor": { + "definition": "struct FullscreenPermissionDescriptor { bool allow_without_user_gesture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=72" + }, + "blink.mojom.PermissionDescriptor": { + "definition": "struct PermissionDescriptor { PermissionName name; PermissionDescriptorExtension? extension;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=88" + }, + "blink.mojom.GeolocationEmbeddedPermissionRequestDescriptor": { + "definition": "struct GeolocationEmbeddedPermissionRequestDescriptor { bool autolocate;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=129" + }, + "blink.mojom.EmbeddedPermissionRequestDescriptor": { + "definition": "struct EmbeddedPermissionRequestDescriptor { gfx.mojom.Rect element_position; GeolocationEmbeddedPermissionRequestDescriptor? geolocation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=135" + }, + "blink.mojom.PermissionName": { + "definition": "enum PermissionName { GEOLOCATION, NOTIFICATIONS, MIDI, PROTECTED_MEDIA_IDENTIFIER, DURABLE_STORAGE, AUDIO_CAPTURE, VIDEO_CAPTURE, BACKGROUND_SYNC, SENSORS, CLIPBOARD_READ, CLIPBOARD_WRITE, PAYMENT_HANDLER, BACKGROUND_FETCH, IDLE_DETECTION, PERIODIC_BACKGROUND_SYNC, SCREEN_WAKE_LOCK, SYSTEM_WAKE_LOCK, NFC, STORAGE_ACCESS, WINDOW_MANAGEMENT, LOCAL_FONTS, DISPLAY_CAPTURE, TOP_LEVEL_STORAGE_ACCESS, CAPTURED_SURFACE_CONTROL, SPEAKER_SELECTION, KEYBOARD_LOCK, POINTER_LOCK, FULLSCREEN, WEB_APP_INSTALLATION, LOCAL_NETWORK_ACCESS, VR, AR, HAND_TRACKING, WEB_PRINTING, SMART_CARD};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=11" + }, + "blink.mojom.EmbeddedPermissionControlResult": { + "definition": "enum EmbeddedPermissionControlResult { kDismissed = 0, kGranted = 1, kDenied = 2, kNotSupported = 3, kResolvedNoUserGesture = 4,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=111" + }, + "blink.mojom.PermissionDescriptorExtension": { + "definition": "union PermissionDescriptorExtension { MidiPermissionDescriptor midi; ClipboardPermissionDescriptor clipboard; CameraDevicePermissionDescriptor camera_device; TopLevelStorageAccessPermissionDescriptor top_level_storage_access; FullscreenPermissionDescriptor fullscreen;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission.mojom;l=78" + }, + "blink.mojom.PermissionStatus": { + "definition": "enum PermissionStatus { GRANTED, DENIED, ASK, LAST = ASK};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions/permission_status.mojom;l=12" + }, + "blink.mojom.DocumentPolicyFeature": { + "definition": "enum DocumentPolicyFeature { kDefault = 0, kForceLoadAtTop = 3, kJSProfiling = 11, kSyncXHR = 12, kIncludeJSCallStacksInCrashReports = 14, kExpectNoLinkedResources = 15, kNetworkEfficiencyGuardrails = 16,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions_policy/document_policy_feature.mojom;l=8" + }, + "blink.mojom.PolicyDisposition": { + "definition": "enum PolicyDisposition { kEnforce, kReport,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions_policy/policy_disposition.mojom;l=9" + }, + "blink.mojom.PolicyValueType": { + "definition": "enum PolicyValueType { kNull, kBool, kDecDouble, kEnum,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions_policy/policy_value.mojom;l=9" + }, + "blink.mojom.PolicyValue": { + "definition": "union PolicyValue { bool null_value; bool bool_value; double dec_double_value; int32 enum_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/permissions_policy/policy_value.mojom;l=23" + }, + "blink.mojom.PersistentRendererPrefsService.SetViewSourceLineWrapping": { + "definition": "SetViewSourceLineWrapping(bool value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/persistent_renderer_prefs.mojom;l=14" + }, + "blink.mojom.PictureInPictureSessionObserver.OnWindowSizeChanged": { + "definition": "OnWindowSizeChanged(gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/picture_in_picture/picture_in_picture.mojom;l=16" + }, + "blink.mojom.PictureInPictureSessionObserver.OnStopped": { + "definition": "OnStopped();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/picture_in_picture/picture_in_picture.mojom;l=21" + }, + "blink.mojom.PictureInPictureSession.Update": { + "definition": "Update(uint32 player_id, pending_associated_remote player_remote, viz.mojom.SurfaceId surface_id, gfx.mojom.Size natural_size, bool show_play_pause_button);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/picture_in_picture/picture_in_picture.mojom;l=30" + }, + "blink.mojom.PictureInPictureSession.Stop": { + "definition": "Stop() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/picture_in_picture/picture_in_picture.mojom;l=38" + }, + "blink.mojom.PictureInPictureSession.UpdateMediaPosition": { + "definition": "UpdateMediaPosition(media_session.mojom.MediaPosition media_position);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/picture_in_picture/picture_in_picture.mojom;l=42" + }, + "blink.mojom.PictureInPictureService.StartSession": { + "definition": "StartSession( uint32 player_id, pending_associated_remote player_remote, viz.mojom.SurfaceId surface_id, gfx.mojom.Size natural_size, bool show_play_pause_button, pending_remote observer, gfx.mojom.Rect source_bounds) => (pending_remote? session, gfx.mojom.Size size);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/picture_in_picture/picture_in_picture.mojom;l=75" + }, + "blink.mojom.PictureInPictureWindowOptions": { + "definition": "struct PictureInPictureWindowOptions { uint64 width; uint64 height; bool disallow_return_to_opener; bool prefer_initial_window_placement;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/picture_in_picture_window_options/picture_in_picture_window_options.mojom;l=7" + }, + "blink.mojom.PluginRegistry.GetPlugins": { + "definition": "[Sync] GetPlugins(bool refresh) => (array plugins);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/plugins/plugin_registry.mojom;l=31" + }, + "blink.mojom.PluginMimeType": { + "definition": "struct PluginMimeType { string mime_type; mojo_base.mojom.String16 description; array file_extensions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/plugins/plugin_registry.mojom;l=10" + }, + "blink.mojom.PluginInfo": { + "definition": "struct PluginInfo { mojo_base.mojom.String16 name; mojo_base.mojom.String16 description; mojo_base.mojom.FilePath filename; uint32 background_color; array mime_types; bool may_use_external_handler;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/plugins/plugin_registry.mojom;l=16" + }, + "blink.mojom.AnchorElementInteractionHost.OnPointerDown": { + "definition": "OnPointerDown(url.mojom.Url target);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/preloading/anchor_element_interaction_host.mojom;l=26" + }, + "blink.mojom.AnchorElementInteractionHost.OnPointerHoverEager": { + "definition": "OnPointerHoverEager(url.mojom.Url target, AnchorElementPointerData mouse_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/preloading/anchor_element_interaction_host.mojom;l=31" + }, + "blink.mojom.AnchorElementInteractionHost.OnPointerHoverModerate": { + "definition": "OnPointerHoverModerate(url.mojom.Url target, AnchorElementPointerData mouse_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/preloading/anchor_element_interaction_host.mojom;l=37" + }, + "blink.mojom.AnchorElementInteractionHost.OnModerateViewportHeuristicTriggered": { + "definition": "OnModerateViewportHeuristicTriggered(url.mojom.Url target);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/preloading/anchor_element_interaction_host.mojom;l=43" + }, + "blink.mojom.AnchorElementInteractionHost.OnEagerViewportHeuristicTriggered": { + "definition": "OnEagerViewportHeuristicTriggered(array targets);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/preloading/anchor_element_interaction_host.mojom;l=49" + }, + "blink.mojom.AnchorElementPointerData": { + "definition": "struct AnchorElementPointerData { bool is_mouse_pointer; double mouse_velocity; double mouse_acceleration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/preloading/anchor_element_interaction_host.mojom;l=11" + }, + "blink.mojom.NoStatePrefetchProcessor.Start": { + "definition": "Start(PrerenderAttributes prerender_attribute);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/prerender/prerender.mojom;l=34" + }, + "blink.mojom.NoStatePrefetchProcessor.Cancel": { + "definition": "Cancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/prerender/prerender.mojom;l=39" + }, + "blink.mojom.PrerenderAttributes": { + "definition": "struct PrerenderAttributes { url.mojom.Url url; PrerenderTriggerType trigger_type; blink.mojom.Referrer referrer; gfx.mojom.Size view_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/prerender/prerender.mojom;l=19" + }, + "blink.mojom.PrerenderTriggerType": { + "definition": "enum PrerenderTriggerType { kLinkRelPrerender, kLinkRelNext,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/prerender/prerender.mojom;l=11" + }, + "blink.mojom.PresentationConnection.OnMessage": { + "definition": "OnMessage(PresentationConnectionMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=72" + }, + "blink.mojom.PresentationConnection.DidChangeState": { + "definition": "DidChangeState(PresentationConnectionState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=76" + }, + "blink.mojom.PresentationConnection.DidClose": { + "definition": "DidClose(PresentationConnectionCloseReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=79" + }, + "blink.mojom.PresentationService.SetController": { + "definition": "SetController(pending_remote controller);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=109" + }, + "blink.mojom.PresentationService.SetReceiver": { + "definition": "SetReceiver(pending_remote receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=116" + }, + "blink.mojom.PresentationService.SetDefaultPresentationUrls": { + "definition": "SetDefaultPresentationUrls(array presentation_urls);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=123" + }, + "blink.mojom.PresentationService.ListenForScreenAvailability": { + "definition": "ListenForScreenAvailability(url.mojom.Url availability_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=128" + }, + "blink.mojom.PresentationService.StopListeningForScreenAvailability": { + "definition": "StopListeningForScreenAvailability(url.mojom.Url availability_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=133" + }, + "blink.mojom.PresentationService.StartPresentation": { + "definition": "StartPresentation(array presentation_urls) => (PresentationConnectionResult? result, PresentationError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=139" + }, + "blink.mojom.PresentationService.ReconnectPresentation": { + "definition": "ReconnectPresentation(array presentation_urls, string presentation_id) => (PresentationConnectionResult? result, PresentationError? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=146" + }, + "blink.mojom.PresentationService.CloseConnection": { + "definition": "CloseConnection(url.mojom.Url presentation_url, string presentation_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=154" + }, + "blink.mojom.PresentationService.Terminate": { + "definition": "Terminate(url.mojom.Url presentation_url, string presentation_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=159" + }, + "blink.mojom.PresentationController.OnScreenAvailabilityUpdated": { + "definition": "OnScreenAvailabilityUpdated(url.mojom.Url url, ScreenAvailability availability);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=172" + }, + "blink.mojom.PresentationController.OnDefaultPresentationStarted": { + "definition": "OnDefaultPresentationStarted(PresentationConnectionResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=176" + }, + "blink.mojom.PresentationController.OnConnectionStateChanged": { + "definition": "OnConnectionStateChanged(PresentationInfo presentation_info, PresentationConnectionState newState);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=180" + }, + "blink.mojom.PresentationController.OnConnectionClosed": { + "definition": "OnConnectionClosed(PresentationInfo presentation_info, PresentationConnectionCloseReason reason, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=185" + }, + "blink.mojom.PresentationReceiver.OnReceiverConnectionAvailable": { + "definition": "OnReceiverConnectionAvailable(PresentationConnectionResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=196" + }, + "blink.mojom.PresentationInfo": { + "definition": "struct PresentationInfo { url.mojom.Url url; string id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=13" + }, + "blink.mojom.PresentationError": { + "definition": "struct PresentationError { PresentationErrorType error_type; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=47" + }, + "blink.mojom.PresentationConnectionResult": { + "definition": "struct PresentationConnectionResult { PresentationInfo presentation_info; pending_remote connection_remote; pending_receiver connection_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=88" + }, + "blink.mojom.ScreenAvailability": { + "definition": "enum ScreenAvailability { UNKNOWN, UNAVAILABLE, SOURCE_NOT_SUPPORTED, DISABLED, AVAILABLE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=18" + }, + "blink.mojom.PresentationConnectionState": { + "definition": "enum PresentationConnectionState { CONNECTING, CONNECTED, CLOSED, TERMINATED};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=26" + }, + "blink.mojom.PresentationConnectionCloseReason": { + "definition": "enum PresentationConnectionCloseReason { CONNECTION_ERROR, CLOSED, WENT_AWAY};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=33" + }, + "blink.mojom.PresentationErrorType": { + "definition": "enum PresentationErrorType { NO_AVAILABLE_SCREENS, PRESENTATION_REQUEST_CANCELLED, NO_PRESENTATION_FOUND, PREVIOUS_START_IN_PROGRESS, UNKNOWN,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=39" + }, + "blink.mojom.PresentationConnectionMessage": { + "definition": "union PresentationConnectionMessage { string message; array data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/presentation/presentation.mojom;l=52" + }, + "blink.mojom.WebPrintJobStateObserver.OnWebPrintJobUpdate": { + "definition": "OnWebPrintJobUpdate(WebPrintJobUpdate update);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=229" + }, + "blink.mojom.WebPrintJobController.Cancel": { + "definition": "Cancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=235" + }, + "blink.mojom.WebPrinter.FetchAttributes": { + "definition": "FetchAttributes() => (WebPrinterFetchResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=280" + }, + "blink.mojom.WebPrinter.Print": { + "definition": "Print(pending_remote document, WebPrintJobTemplateAttributes attributes) => (WebPrintResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=283" + }, + "blink.mojom.WebPrintingService.GetPrinters": { + "definition": "GetPrinters() => (GetPrintersResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=291" + }, + "blink.mojom.WebPrinterInfo": { + "definition": "struct WebPrinterInfo { string printer_name; string printer_id; pending_remote printer_remote;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=91" + }, + "blink.mojom.WebPrintingRange": { + "definition": "struct WebPrintingRange { uint32 from; uint32 to;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=99" + }, + "blink.mojom.WebPrintingMediaSize": { + "definition": "struct WebPrintingMediaSize { WebPrintingMediaSizeDimension x_dimension; WebPrintingMediaSizeDimension y_dimension;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=125" + }, + "blink.mojom.WebPrintingMediaCollection": { + "definition": "struct WebPrintingMediaCollection { WebPrintingMediaSize media_size; string media_size_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=132" + }, + "blink.mojom.WebPrinterAttributes": { + "definition": "struct WebPrinterAttributes { uint32 copies_default; WebPrintingRange copies_supported; WebPrintingMediaCollection media_col_default; array media_col_database; string? media_source_default; array media_source_supported; WebPrintingMultipleDocumentHandling multiple_document_handling_default; array multiple_document_handling_supported; WebPrintingOrientationRequested orientation_requested_default; array orientation_requested_supported; gfx.mojom.Size printer_resolution_default; array printer_resolution_supported; WebPrintColorMode print_color_mode_default; array print_color_mode_supported; WebPrintQuality? print_quality_default; array print_quality_supported; WebPrinterState printer_state; string printer_state_message; array printer_state_reasons; WebPrintingSides? sides_default; array sides_supported; string printer_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=142" + }, + "blink.mojom.WebPrintingMediaCollectionRequested": { + "definition": "struct WebPrintingMediaCollectionRequested { gfx.mojom.Size media_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=186" + }, + "blink.mojom.WebPrintJobTemplateAttributes": { + "definition": "struct WebPrintJobTemplateAttributes { string job_name; uint32 copies; WebPrintingMediaCollectionRequested? media_col; string? media_source; WebPrintingMultipleDocumentHandling? multiple_document_handling; WebPrintingOrientationRequested? orientation_requested; gfx.mojom.Size? printer_resolution; WebPrintColorMode? print_color_mode; WebPrintQuality? print_quality; WebPrintingSides? sides;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=195" + }, + "blink.mojom.WebPrintJobUpdate": { + "definition": "struct WebPrintJobUpdate { WebPrintJobState state; uint32 pages_printed = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=221" + }, + "blink.mojom.WebPrintJobInfo": { + "definition": "struct WebPrintJobInfo { string job_name; uint32 job_pages; pending_receiver observer; pending_remote controller;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=238" + }, + "blink.mojom.WebPrintingMultipleDocumentHandling": { + "definition": "enum WebPrintingMultipleDocumentHandling { kSeparateDocumentsCollatedCopies, kSeparateDocumentsUncollatedCopies};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=10" + }, + "blink.mojom.WebPrintingSides": { + "definition": "enum WebPrintingSides { kOneSided, kTwoSidedLongEdge, kTwoSidedShortEdge};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=15" + }, + "blink.mojom.WebPrintQuality": { + "definition": "enum WebPrintQuality { kDraft, kNormal, kHigh};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=21" + }, + "blink.mojom.WebPrintColorMode": { + "definition": "enum WebPrintColorMode { kColor, kMonochrome};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=27" + }, + "blink.mojom.WebPrintingOrientationRequested": { + "definition": "enum WebPrintingOrientationRequested { kPortrait, kLandscape,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=32" + }, + "blink.mojom.WebPrinterState": { + "definition": "enum WebPrinterState { kIdle, kProcessing, kStopped,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=39" + }, + "blink.mojom.WebPrinterStateReason": { + "definition": "enum WebPrinterStateReason { kNone, kOther, kConnectingToDevice, kCoverOpen, kDeveloperEmpty, kDeveloperLow, kDoorOpen, kFuserOverTemp, kFuserUnderTemp, kInputTrayMissing, kInterlockOpen, kInterpreterResourceUnavailable, kMarkerSupplyEmpty, kMarkerSupplyLow, kMarkerWasteAlmostFull, kMarkerWasteFull, kMediaEmpty, kMediaJam, kMediaLow, kMediaNeeded, kMovingToPaused, kOpcLifeOver, kOpcNearEol, kOutputAreaAlmostFull, kOutputAreaFull, kOutputTrayMissing, kPaused, kShutdown, kSpoolAreaFull, kStoppedPartly, kStopping, kTimedOut, kTonerEmpty, kTonerLow, kCupsPkiExpired,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=47" + }, + "blink.mojom.WebPrintJobState": { + "definition": "enum WebPrintJobState { kPending, kProcessing, kCompleted, kCanceled, kAborted,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=213" + }, + "blink.mojom.GetPrintersError": { + "definition": "enum GetPrintersError { kUserPermissionDenied,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=245" + }, + "blink.mojom.WebPrinterFetchError": { + "definition": "enum WebPrinterFetchError { kPrinterUnreachable, kUserPermissionDenied,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=254" + }, + "blink.mojom.WebPrintError": { + "definition": "enum WebPrintError { kPrinterUnreachable, kDocumentMalformed, kPrintJobTemplateAttributesMismatch, kUserPermissionDenied,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=264" + }, + "blink.mojom.WebPrintingMediaSizeDimension": { + "definition": "union WebPrintingMediaSizeDimension { WebPrintingRange range; uint32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=104" + }, + "blink.mojom.GetPrintersResult": { + "definition": "union GetPrintersResult { array printers; GetPrintersError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=249" + }, + "blink.mojom.WebPrinterFetchResult": { + "definition": "union WebPrinterFetchResult { WebPrinterAttributes printer_attributes; WebPrinterFetchError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=259" + }, + "blink.mojom.WebPrintResult": { + "definition": "union WebPrintResult { WebPrintJobInfo print_job_info; WebPrintError error;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/printing/web_printing.mojom;l=271" + }, + "blink.mojom.PrivateAggregationHost.ContributeToHistogram": { + "definition": "ContributeToHistogram( array contributions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom;l=80" + }, + "blink.mojom.PrivateAggregationHost.ContributeToHistogramOnEvent": { + "definition": "ContributeToHistogramOnEvent( PrivateAggregationErrorEvent error_event, array contributions);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom;l=87" + }, + "blink.mojom.PrivateAggregationHost.EnableDebugMode": { + "definition": "EnableDebugMode(DebugKey? debug_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom;l=95" + }, + "blink.mojom.DebugKey": { + "definition": "struct DebugKey { uint64 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom;l=11" + }, + "blink.mojom.DebugModeDetails": { + "definition": "struct DebugModeDetails { bool is_enabled = false; DebugKey? debug_key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom;l=16" + }, + "blink.mojom.PrivateAggregationErrorEvent": { + "definition": "enum PrivateAggregationErrorEvent { kReportSuccess, kTooManyContributions, kEmptyReportDropped, kPendingReportLimitReached, kInsufficientBudget, kContributionTimeoutReached, kAlreadyTriggeredExternalError};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom;l=34" + }, + "blink.mojom.PushMessaging.Subscribe": { + "definition": "Subscribe(int64 service_worker_registration_id, PushSubscriptionOptions options, bool user_gesture) => (PushRegistrationStatus status, PushSubscription? subscription);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging.mojom;l=38" + }, + "blink.mojom.PushMessaging.Unsubscribe": { + "definition": "Unsubscribe(int64 service_worker_registration_id) => (PushErrorType error_type, bool did_unsubscribe, string? error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging.mojom;l=46" + }, + "blink.mojom.PushMessaging.GetSubscription": { + "definition": "GetSubscription(int64 service_worker_registration_id) => (PushGetRegistrationStatus status, PushSubscription? subscription);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging.mojom;l=50" + }, + "blink.mojom.PushSubscriptionOptions": { + "definition": "struct PushSubscriptionOptions { bool user_visible_only; array application_server_key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging.mojom;l=14" + }, + "blink.mojom.PushSubscription": { + "definition": "struct PushSubscription { url.mojom.Url endpoint; mojo_base.mojom.Time? expirationTime; PushSubscriptionOptions options; array p256dh; array auth;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging.mojom;l=19" + }, + "blink.mojom.PushErrorType": { + "definition": "enum PushErrorType { ABORT = 0, NETWORK = 1, NONE = 2, NOT_ALLOWED = 3, NOT_FOUND = 4, NOT_SUPPORTED = 5, INVALID_STATE = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging.mojom;l=27" + }, + "blink.mojom.PushEventStatus": { + "definition": "enum PushEventStatus { SUCCESS = 0, UNKNOWN_APP_ID = 2, PERMISSION_DENIED = 3, NO_SERVICE_WORKER = 4, SERVICE_WORKER_ERROR = 5, EVENT_WAITUNTIL_REJECTED = 6, TIMEOUT = 7, PERMISSION_REVOKED_ABUSIVE = 8, NO_APP_LEVEL_PERMISSION_IGNORE = 9, NO_APP_LEVEL_PERMISSION_UNSUBSCRIBE = 10, PERMISSION_REVOKED_DISRUPTIVE = 11,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging_status.mojom;l=10" + }, + "blink.mojom.PushGetRegistrationStatus": { + "definition": "enum PushGetRegistrationStatus { SUCCESS = 0, SERVICE_NOT_AVAILABLE = 1, STORAGE_ERROR = 2, REGISTRATION_NOT_FOUND = 3, INCOGNITO_REGISTRATION_NOT_FOUND = 4, STORAGE_CORRUPT = 6, RENDERER_SHUTDOWN = 7, NO_LIVE_SERVICE_WORKER = 8,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging_status.mojom;l=57" + }, + "blink.mojom.PushRegistrationStatus": { + "definition": "enum PushRegistrationStatus { SUCCESS_FROM_PUSH_SERVICE = 0, NO_SERVICE_WORKER = 1, SERVICE_NOT_AVAILABLE = 2, LIMIT_REACHED = 3, PERMISSION_DENIED = 4, SERVICE_ERROR = 5, NO_SENDER_ID = 6, STORAGE_ERROR = 7, SUCCESS_FROM_CACHE = 8, NETWORK_ERROR = 9, INCOGNITO_PERMISSION_DENIED = 10, PUBLIC_KEY_UNAVAILABLE = 11, MANIFEST_EMPTY_OR_MISSING = 12, SENDER_ID_MISMATCH = 13, STORAGE_CORRUPT = 14, RENDERER_SHUTDOWN = 15, SUCCESS_NEW_SUBSCRIPTION_FROM_PUSH_SERVICE = 16, UNSUPPORTED_GCM_SENDER_ID = 17,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging_status.mojom;l=93" + }, + "blink.mojom.PushUnregistrationReason": { + "definition": "enum PushUnregistrationReason { UNKNOWN = 0, JAVASCRIPT_API = 1, PERMISSION_REVOKED = 2, DELIVERY_UNKNOWN_APP_ID = 3, DELIVERY_PERMISSION_DENIED = 4, DELIVERY_NO_SERVICE_WORKER = 5, GCM_STORE_RESET = 6, SERVICE_WORKER_UNREGISTERED = 7, SUBSCRIBE_STORAGE_CORRUPT = 8, GET_SUBSCRIPTION_STORAGE_CORRUPT = 9, SERVICE_WORKER_DATABASE_WIPED = 10, SUBSCRIPTION_EXPIRED = 11, REFRESH_FINISHED = 12, PERMISSION_REVOKED_ABUSIVE = 13, NO_APP_LEVEL_PERMISSION = 14, PERMISSION_REVOKED_DISRUPTIVE = 15,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging_status.mojom;l=167" + }, + "blink.mojom.PushUnregistrationStatus": { + "definition": "enum PushUnregistrationStatus { SUCCESS_UNREGISTERED = 0, SUCCESS_WAS_NOT_REGISTERED = 1, PENDING_NETWORK_ERROR = 2, NO_SERVICE_WORKER = 3, SERVICE_NOT_AVAILABLE = 4, PENDING_SERVICE_ERROR = 5, STORAGE_ERROR = 6, NETWORK_ERROR = 7,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/push_messaging/push_messaging_status.mojom;l=229" + }, + "blink.mojom.QuotaManagerHost.QueryStorageUsageAndQuota": { + "definition": "QueryStorageUsageAndQuota() => (blink.mojom.QuotaStatusCode error, int64 current_usage, int64 current_quota, UsageBreakdown usage_breakdown);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/quota/quota_manager_host.mojom;l=18" + }, + "blink.mojom.UsageBreakdown": { + "definition": "struct UsageBreakdown { int64 fileSystem = 0; int64 webSql = 0; int64 indexedDatabase = 0; int64 serviceWorkerCache = 0; int64 serviceWorker = 0; int64 backgroundFetch = 0;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/quota/quota_types.mojom;l=26" + }, + "blink.mojom.BucketDurability": { + "definition": "enum BucketDurability { kRelaxed = 0, kStrict = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/quota/quota_types.mojom;l=9" + }, + "blink.mojom.QuotaStatusCode": { + "definition": "enum QuotaStatusCode { kOk = 0, kErrorNotSupported = 9, kErrorInvalidModification = 13, kErrorInvalidAccess = 15, kErrorAbort = 20, kUnknown = -1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/quota/quota_types.mojom;l=17" + }, + "blink.mojom.RemoteObjectHost.GetObject": { + "definition": "GetObject(int32 object_id, pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=23" + }, + "blink.mojom.RemoteObjectHost.AcquireObject": { + "definition": "AcquireObject(int32 object_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=26" + }, + "blink.mojom.RemoteObjectHost.ReleaseObject": { + "definition": "ReleaseObject(int32 object_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=31" + }, + "blink.mojom.RemoteObject.HasMethod": { + "definition": "[Sync] HasMethod(string name) => (bool method_exists);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=37" + }, + "blink.mojom.RemoteObject.GetMethods": { + "definition": "[Sync] GetMethods() => (array method_names);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=38" + }, + "blink.mojom.RemoteObject.InvokeMethod": { + "definition": "[Sync] InvokeMethod(string name, array arguments) => (RemoteInvocationResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=39" + }, + "blink.mojom.RemoteObject.NotifyReleasedObject": { + "definition": "NotifyReleasedObject();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=44" + }, + "blink.mojom.RemoteObjectGatewayFactory.CreateRemoteObjectGateway": { + "definition": "CreateRemoteObjectGateway(pending_remote host, pending_receiver gateway);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=51" + }, + "blink.mojom.RemoteObjectGateway.AddNamedObject": { + "definition": "AddNamedObject(string name, int32 object_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=58" + }, + "blink.mojom.RemoteObjectGateway.RemoveNamedObject": { + "definition": "RemoveNamedObject(string name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=61" + }, + "blink.mojom.RemoteTypedArray": { + "definition": "struct RemoteTypedArray { RemoteArrayType type; mojo_base.mojom.BigBuffer buffer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=80" + }, + "blink.mojom.RemoteInvocationResult": { + "definition": "struct RemoteInvocationResult { RemoteInvocationError error = OK; RemoteInvocationResultValue? value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=115" + }, + "blink.mojom.SingletonJavaScriptValue": { + "definition": "enum SingletonJavaScriptValue { kNull, kUndefined,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=64" + }, + "blink.mojom.RemoteArrayType": { + "definition": "enum RemoteArrayType { kInt8Array = 1, kUint8Array, kInt16Array, kUint16Array, kInt32Array, kUint32Array, kFloat32Array, kFloat64Array,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=69" + }, + "blink.mojom.RemoteInvocationError": { + "definition": "enum RemoteInvocationError { OK = 0, METHOD_NOT_FOUND, OBJECT_GET_CLASS_BLOCKED, EXCEPTION_THROWN, NON_ASSIGNABLE_TYPES,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=95" + }, + "blink.mojom.RemoteInvocationArgument": { + "definition": "union RemoteInvocationArgument { double number_value; bool boolean_value; mojo_base.mojom.String16 string_value; SingletonJavaScriptValue singleton_value; array array_value; RemoteTypedArray typed_array_value; int32 object_id_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=85" + }, + "blink.mojom.RemoteInvocationResultValue": { + "definition": "union RemoteInvocationResultValue { double number_value; bool boolean_value; mojo_base.mojom.String16 string_value; SingletonJavaScriptValue singleton_value; int32 object_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/remote_objects/remote_objects.mojom;l=103" + }, + "blink.mojom.RenderAccessibilityHost.HandleAXEvents": { + "definition": "[UnlimitedSize] HandleAXEvents(ax.mojom.AXUpdatesAndEvents events_and_updates, ax.mojom.AXLocationAndScrollUpdates location_and_scroll_updates, uint32 reset_token) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/render_accessibility.mojom;l=60" + }, + "blink.mojom.RenderAccessibilityHost.HandleAXLocationChanges": { + "definition": "[UnlimitedSize] HandleAXLocationChanges(ax.mojom.AXLocationAndScrollUpdates changes, uint32 reset_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/render_accessibility.mojom;l=73" + }, + "blink.mojom.RenderAccessibility.SetMode": { + "definition": "SetMode(ax.mojom.AXMode ax_mode, uint32 reset_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/render_accessibility.mojom;l=93" + }, + "blink.mojom.RenderAccessibility.FatalError": { + "definition": "FatalError();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/render_accessibility.mojom;l=97" + }, + "blink.mojom.RenderAccessibility.HitTest": { + "definition": "HitTest(gfx.mojom.Point point, ax.mojom.Event event_to_fire, int32 request_id) => (HitTestResponse? hit_test_response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/render_accessibility.mojom;l=112" + }, + "blink.mojom.RenderAccessibility.PerformAction": { + "definition": "PerformAction(ax.mojom.AXActionData action_data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/render_accessibility.mojom;l=119" + }, + "blink.mojom.RenderAccessibility.Reset": { + "definition": "Reset(uint32 reset_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/render_accessibility.mojom;l=131" + }, + "blink.mojom.HitTestResponse": { + "definition": "struct HitTestResponse { ax.mojom.AXTreeID stitched_child_tree_id; blink.mojom.FrameToken hit_frame_token; gfx.mojom.Point hit_frame_transformed_point; int32 hit_node_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/render_accessibility.mojom;l=19" + }, + "blink.mojom.RendererPreferenceWatcher.NotifyUpdate": { + "definition": "NotifyUpdate(RendererPreferences new_prefs);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/renderer_preference_watcher.mojom;l=13" + }, + "blink.mojom.RendererPreferences": { + "definition": "struct RendererPreferences { bool can_accept_load_drops = true; bool should_antialias_text = true; gfx.mojom.Hinting hinting = gfx.mojom.Hinting.kMedium; bool use_autohinter = false; bool use_bitmaps = false; gfx.mojom.SubpixelRendering subpixel_rendering = gfx.mojom.SubpixelRendering.kNone; bool use_subpixel_positioning = false; [EnableIf=is_win] float text_contrast = 0.5; [EnableIf=is_win] float text_gamma = 0.0; uint32 focus_ring_color = 0xFFE59700; uint32 active_selection_bg_color = 0xFF1967D2; uint32 active_selection_fg_color = 0xFFFFFFFF; uint32 inactive_selection_bg_color = 0xFFC8C8C8; uint32 inactive_selection_fg_color = 0xFF323232; bool browser_handles_all_top_level_requests = false; mojo_base.mojom.TimeDelta? caret_blink_interval; bool use_custom_colors = true; [EnableIf=is_chromeos] bool use_overlay_scrollbar = false; bool enable_referrers = true; bool allow_cross_origin_auth_prompt = false; bool enable_do_not_track = false; bool enable_encrypted_media = true; WebRtcIpHandlingPolicy webrtc_ip_handling_policy; array webrtc_ip_handling_urls; bool? webrtc_post_quantum_key_agreement; uint16 webrtc_udp_min_port = 0; uint16 webrtc_udp_max_port = 0; array webrtc_local_ips_allowed_urls; UserAgentOverride user_agent_override; string accept_languages; bool send_subresource_notification = false; bool plugin_fullscreen_allowed = true; bool caret_browsing_enabled = false; [EnableIf=is_chromeos|is_linux] string system_font_family_name; [EnableIf=is_win] mojo_base.mojom.String16 caption_font_family_name; [EnableIf=is_win] int32 caption_font_height = 0; [EnableIf=is_win] mojo_base.mojom.String16 small_caption_font_family_name; [EnableIf=is_win] int32 small_caption_font_height = 0; [EnableIf=is_win] mojo_base.mojom.String16 menu_font_family_name; [EnableIf=is_win] int32 menu_font_height = 0; [EnableIf=is_win] mojo_base.mojom.String16 status_font_family_name; [EnableIf=is_win] int32 status_font_height = 0; [EnableIf=is_win] mojo_base.mojom.String16 message_font_family_name; [EnableIf=is_win] int32 message_font_height = 0; [EnableIf=is_win] int32 vertical_scroll_bar_width_in_dips = 0; [EnableIf=is_win] int32 horizontal_scroll_bar_height_in_dips = 0; [EnableIf=is_win] int32 arrow_bitmap_height_vertical_scroll_bar_in_dips = 0; [EnableIf=is_win] int32 arrow_bitmap_width_horizontal_scroll_bar_in_dips = 0; [EnableIf=is_selection_clipboard_buffer_possible] bool selection_clipboard_buffer_available = false; [EnableIf=is_android] bool uses_platform_autofill = false; array explicitly_allowed_network_ports; bool view_source_line_wrap_enabled = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/renderer_preferences.mojom;l=17" + }, + "blink.mojom.ReportingServiceProxy.QueueInterventionReport": { + "definition": "QueueInterventionReport(url.mojom.Url url, string id, string message, string? source_file, int32 line_number, int32 column_number);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/reporting/reporting.mojom;l=17" + }, + "blink.mojom.ReportingServiceProxy.QueueDeprecationReport": { + "definition": "QueueDeprecationReport(url.mojom.Url url, string id, mojo_base.mojom.Time? anticipatedRemoval, string message, string? source_file, int32 line_number, int32 column_number);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/reporting/reporting.mojom;l=27" + }, + "blink.mojom.ReportingServiceProxy.QueueCspViolationReport": { + "definition": "QueueCspViolationReport(url.mojom.Url url, string group, string document_url, string? referrer, string? blocked_url, string effective_directive, string original_policy, string? source_file, string? script_sample, string disposition, uint16 status_code, int32 line_number, int32 column_number);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/reporting/reporting.mojom;l=38" + }, + "blink.mojom.ReportingServiceProxy.QueueIntegrityViolationReport": { + "definition": "QueueIntegrityViolationReport(url.mojom.Url url, string endpoint, string document_url, string blocked_url, string destination, bool report_only);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/reporting/reporting.mojom;l=55" + }, + "blink.mojom.ReportingServiceProxy.QueuePermissionsPolicyViolationReport": { + "definition": "QueuePermissionsPolicyViolationReport(url.mojom.Url url, string endpoint, string policy_id, string disposition, string? message, string? source_file, int32 line_number, int32 column_number);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/reporting/reporting.mojom;l=65" + }, + "blink.mojom.ReportingServiceProxy.QueuePotentialPermissionsPolicyViolationReport": { + "definition": "QueuePotentialPermissionsPolicyViolationReport(url.mojom.Url url, string endpoint, string policy_id, string disposition, string? message, string? allow_attribute, string? src_attribute, string? source_file, int32 line_number, int32 column_number);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/reporting/reporting.mojom;l=77" + }, + "blink.mojom.ReportingServiceProxy.QueueDocumentPolicyViolationReport": { + "definition": "QueueDocumentPolicyViolationReport(url.mojom.Url url, string group, string policy_id, string disposition, string? message, string? source_file, int32 line_number, int32 column_number);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/reporting/reporting.mojom;l=91" + }, + "blink.mojom.ReportingServiceProxy.QueueCSPHashReport": { + "definition": "QueueCSPHashReport(url.mojom.Url url, string endpoint, string subresource_url, string integrity_hash, string type, string destination);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/reporting/reporting.mojom;l=103" + }, + "blink.mojom.SafeUrlPattern": { + "definition": "struct SafeUrlPattern { array protocol; array username; array password; array hostname; array port; array pathname; array search; array hash; SafeUrlPatternOptions options;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/safe_url_pattern.mojom;l=10" + }, + "blink.mojom.FixedPattern": { + "definition": "struct FixedPattern { string value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/safe_url_pattern.mojom;l=25" + }, + "blink.mojom.WildcardPattern": { + "definition": "struct WildcardPattern { string name; string prefix; string value; string suffix;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/safe_url_pattern.mojom;l=32" + }, + "blink.mojom.SafeUrlPatternPart": { + "definition": "struct SafeUrlPatternPart { PatternTemplate pattern; Modifier modifier;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/safe_url_pattern.mojom;l=57" + }, + "blink.mojom.SafeUrlPatternOptions": { + "definition": "struct SafeUrlPatternOptions { bool ignore_case = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/safe_url_pattern.mojom;l=65" + }, + "blink.mojom.Modifier": { + "definition": "enum Modifier { kZeroOrMore, kOptional, kOneOrMore, kNone,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/safe_url_pattern.mojom;l=47" + }, + "blink.mojom.PatternTemplate": { + "definition": "union PatternTemplate { FixedPattern fixed; WildcardPattern full_wildcard; WildcardPattern segment_wildcard;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/safe_url_pattern.mojom;l=41" + }, + "blink.mojom.WebSchedulerTrackedFeature": { + "definition": "enum WebSchedulerTrackedFeature { kWebSocket = 0, kWebRTC = 1, kMainResourceHasCacheControlNoCache = 2, kMainResourceHasCacheControlNoStore = 3, kSubresourceHasCacheControlNoCache = 4, kSubresourceHasCacheControlNoStore = 5, kContainsPlugins = 12, kDocumentLoaded = 13, kOutstandingNetworkRequestOthers = 15, kRequestedMIDIPermission = 21, kRequestedAudioCapturePermission = 22, kRequestedVideoCapturePermission = 23, kRequestedBackForwardCacheBlockedSensors = 24, kWebTransportSticky = 25, kRequestedBackgroundWorkPermission = 26, kBroadcastChannel = 27, kWebXR = 31, kSharedWorker = 32, kWebLocks = 33, kWebHID = 34, kWebShare = 36, kRequestedStorageAccessGrant = 37, kWebNfc = 38, kOutstandingNetworkRequestFetch = 40, kOutstandingNetworkRequestXHR = 41, kPrinting = 43, kPictureInPicture = 45, kSpeechRecognizer = 47, kIdleManager = 48, kPaymentManager = 49, kKeyboardLock = 51, kWebOTPService = 52, kOutstandingNetworkRequestDirectSocket = 53, kInjectedJavascript = 54, kInjectedStyleSheet = 55, kWebTransport = 57, kDummy = 58, kKeepaliveRequest = 59, kJsNetworkRequestReceivedCacheControlNoStoreResource = 60, kIndexedDBEvent = 61, kWebSerial = 62, kWebSocketSticky = 63, kWebRTCSticky = 64, kSmartCard = 65, kLiveMediaStreamTrack = 66, kUnloadHandler = 67, kParserAborted = 68, kWebBluetooth = 69, kWebAuthentication = 70, kSharedWorkerMessage = 71,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/scheduler/web_scheduler_tracked_feature.mojom;l=21" + }, + "blink.mojom.UserActivationOption": { + "definition": "enum UserActivationOption { kDoNotActivate, kActivate,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/script/script_evaluation_params.mojom;l=10" + }, + "blink.mojom.WantResultOption": { + "definition": "enum WantResultOption { kNoResult, kWantResult, kWantResultDateAndRegExpAllowed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/script/script_evaluation_params.mojom;l=15" + }, + "blink.mojom.PromiseResultOption": { + "definition": "enum PromiseResultOption { kAwait, kDoNotWait,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/script/script_evaluation_params.mojom;l=26" + }, + "blink.mojom.EvaluationTiming": { + "definition": "enum EvaluationTiming { kAsynchronous, kSynchronous,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/script/script_evaluation_params.mojom;l=37" + }, + "blink.mojom.LoadEventBlockingOption": { + "definition": "enum LoadEventBlockingOption { kDoNotBlock, kBlock,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/script/script_evaluation_params.mojom;l=49" + }, + "blink.mojom.ScriptType": { + "definition": "enum ScriptType { kClassic, kModule,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/script/script_type.mojom;l=8" + }, + "blink.mojom.ScriptSourceLocation": { + "definition": "struct ScriptSourceLocation { url.mojom.Url url; string function_name; uint64 line_number; uint64 column_number;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/script_source_location.mojom;l=9" + }, + "blink.mojom.ScrollType": { + "definition": "enum ScrollType { kUser = 0, kProgrammatic, kClamping, kCompositor, kAnchoring, kScrollStart,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/scroll/scroll_enums.mojom;l=10" + }, + "blink.mojom.ScrollBehavior": { + "definition": "enum ScrollBehavior { kAuto = 0, kInstant, kSmooth,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/scroll/scroll_enums.mojom;l=21" + }, + "blink.mojom.ScrollAlignment": { + "definition": "struct ScrollAlignment { Behavior rect_visible = kNoScroll; Behavior rect_hidden = kCenter; Behavior rect_partial = kClosestEdge;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom;l=17" + }, + "blink.mojom.FocusedEditableParams": { + "definition": "struct FocusedEditableParams { gfx.mojom.Vector2dF relative_location; gfx.mojom.SizeF size; bool can_zoom = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom;l=33" + }, + "blink.mojom.ScrollIntoViewParams": { + "definition": "struct ScrollIntoViewParams { ScrollAlignment align_x; ScrollAlignment align_y; ScrollType type = ScrollType.kProgrammatic; bool make_visible_in_visual_viewport = true; ScrollBehavior behavior = ScrollBehavior.kAuto; bool is_for_scroll_sequence = false; FocusedEditableParams? for_focused_editable; bool cross_origin_boundaries = true;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom;l=51" + }, + "blink.mojom.Behavior": { + "definition": "enum Behavior { kNoScroll = 0, kCenter, kTop, kBottom, kLeft, kRight, kClosestEdge, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom;l=18" + }, + "blink.mojom.ScrollbarMode": { + "definition": "enum ScrollbarMode { kAuto, kAlwaysOff, kAlwaysOn};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/scroll/scrollbar_mode.mojom;l=8" + }, + "blink.mojom.InsecureRequestPolicy": { + "definition": "enum InsecureRequestPolicy { kLeaveInsecureRequestsAlone = 0, kUpgradeInsecureRequests = 1, kBlockAllMixedContent = 2, kMaxInsecureRequestPolicy = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/security_context/insecure_request_policy.mojom;l=14" + }, + "blink.mojom.SelectionMenuBehavior": { + "definition": "enum SelectionMenuBehavior { kHide, kShow,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/selection_menu/selection_menu_behavior.mojom;l=8" + }, + "blink.mojom.WebSensorProvider.GetSensor": { + "definition": "GetSensor(device.mojom.SensorType type) => (device.mojom.SensorCreationResult result, device.mojom.SensorInitParams? init_params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/sensor/web_sensor_provider.mojom;l=16" + }, + "blink.mojom.SerialService.SetClient": { + "definition": "SetClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/serial/serial.mojom;l=52" + }, + "blink.mojom.SerialService.GetPorts": { + "definition": "GetPorts() => (array ports);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/serial/serial.mojom;l=55" + }, + "blink.mojom.SerialService.RequestPort": { + "definition": "RequestPort(array filters, array allowed_bluetooth_service_class_ids) => (SerialPortInfo? port);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/serial/serial.mojom;l=58" + }, + "blink.mojom.SerialService.OpenPort": { + "definition": "OpenPort(mojo_base.mojom.UnguessableToken token, device.mojom.SerialConnectionOptions options, pending_remote client) => (pending_remote? port);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/serial/serial.mojom;l=64" + }, + "blink.mojom.SerialService.ForgetPort": { + "definition": "ForgetPort(mojo_base.mojom.UnguessableToken token) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/serial/serial.mojom;l=71" + }, + "blink.mojom.SerialServiceClient.OnPortConnectedStateChanged": { + "definition": "OnPortConnectedStateChanged(SerialPortInfo port_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/serial/serial.mojom;l=77" + }, + "blink.mojom.SerialPortInfo": { + "definition": "struct SerialPortInfo { mojo_base.mojom.UnguessableToken token; uint16 usb_vendor_id; bool has_usb_vendor_id = false; uint16 usb_product_id; bool has_usb_product_id = false; bluetooth.mojom.UUID? bluetooth_service_class_id; bool connected;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/serial/serial.mojom;l=11" + }, + "blink.mojom.SerialPortFilter": { + "definition": "struct SerialPortFilter { uint32 vendor_id; bool has_vendor_id; uint16 product_id; bool has_product_id; bluetooth.mojom.UUID? bluetooth_service_class_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/serial/serial.mojom;l=36" + }, + "blink.mojom.ControllerServiceWorker.DispatchFetchEventForSubresource": { + "definition": "DispatchFetchEventForSubresource( blink.mojom.DispatchFetchEventParams params, pending_remote response_callback) => (blink.mojom.ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/controller_service_worker.mojom;l=46" + }, + "blink.mojom.ControllerServiceWorker.Clone": { + "definition": "Clone(pending_receiver receiver, network.mojom.CrossOriginEmbedderPolicy cross_origin_embedder_policy, pending_remote? coep_reporter, network.mojom.DocumentIsolationPolicy document_isolation_policy, pending_remote? dip_reporter);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/controller_service_worker.mojom;l=59" + }, + "blink.mojom.ControllerServiceWorkerConnector.UpdateController": { + "definition": "UpdateController(pending_remote? controller);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/controller_service_worker.mojom;l=156" + }, + "blink.mojom.ServiceWorkerRouterData": { + "definition": "struct ServiceWorkerRouterData { ServiceWorkerRouterRules router_rules; ServiceWorkerEmbeddedWorkerStatus? initial_running_status; pending_receiver? running_status_receiver; pending_remote remote_cache_storage;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/controller_service_worker.mojom;l=70" + }, + "blink.mojom.ControllerServiceWorkerInfo": { + "definition": "struct ControllerServiceWorkerInfo { ControllerServiceWorkerMode mode = ControllerServiceWorkerMode.kNoController; ServiceWorkerFetchHandlerType fetch_handler_type = ServiceWorkerFetchHandlerType.kNoHandler; ServiceWorkerFetchHandlerBypassOption fetch_handler_bypass_option = ServiceWorkerFetchHandlerBypassOption.kDefault; string? sha256_script_checksum; bool need_router_evaluate; ServiceWorkerRouterData? router_data; pending_remote? remote_controller; string client_id; mojo_base.mojom.UnguessableToken? fetch_request_window_id; blink.mojom.ServiceWorkerObjectInfo? object_info; array used_features;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/controller_service_worker.mojom;l=91" + }, + "blink.mojom.ControllerServiceWorkerMode": { + "definition": "enum ControllerServiceWorkerMode { kNoController, kNoFetchEventHandler, kControlled};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/controller_service_worker_mode.mojom;l=10" + }, + "blink.mojom.DispatchFetchEventParams": { + "definition": "struct DispatchFetchEventParams { FetchAPIRequest request; string client_id; string resulting_client_id; pending_receiver? preload_url_loader_client_receiver; pending_remote? race_network_request_loader_factory;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/dispatch_fetch_event_params.mojom;l=18" + }, + "blink.mojom.EmbeddedWorkerInstanceClient.StartWorker": { + "definition": "StartWorker(EmbeddedWorkerStartParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=212" + }, + "blink.mojom.EmbeddedWorkerInstanceClient.StopWorker": { + "definition": "StopWorker();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=214" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.RequestTermination": { + "definition": "RequestTermination() => (bool will_be_terminated);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=233" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.CountFeature": { + "definition": "CountFeature(WebFeature feature);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=244" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.OnReadyForInspection": { + "definition": "OnReadyForInspection(pending_remote agent, pending_receiver agent_host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=251" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.OnScriptLoaded": { + "definition": "OnScriptLoaded();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=258" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.OnScriptEvaluationStart": { + "definition": "OnScriptEvaluationStart();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=261" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.OnStarted": { + "definition": "OnStarted(ServiceWorkerStartStatus status, blink.mojom.ServiceWorkerFetchHandlerType fetch_handler_type, bool has_hid_event_handlers, bool has_usb_event_handlers, int32 thread_id, EmbeddedWorkerStartTiming start_timing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=267" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.OnReportException": { + "definition": "OnReportException(mojo_base.mojom.String16 error_message, int32 line_number, int32 column_number, url.mojom.Url source_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=275" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.OnReportConsoleMessage": { + "definition": "OnReportConsoleMessage(ConsoleMessageSource source, ConsoleMessageLevel message_level, mojo_base.mojom.String16 message, int32 line_number, url.mojom.Url source_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=279" + }, + "blink.mojom.EmbeddedWorkerInstanceHost.OnStopped": { + "definition": "OnStopped();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=284" + }, + "blink.mojom.EmbeddedWorkerStartParams": { + "definition": "struct EmbeddedWorkerStartParams { int64 service_worker_version_id; url.mojom.Url scope; url.mojom.Url script_url; ScriptType script_type; FetchClientSettingsObject outside_fetch_client_settings_object; string user_agent; UserAgentMetadata ua_metadata; int32 service_worker_route_id; mojo_base.mojom.UnguessableToken devtools_worker_token; url.mojom.Url script_url_to_skip_throttling; bool wait_for_debugger; bool is_installed; RendererPreferences renderer_preferences; array forced_enabled_runtime_features; pending_receiver service_worker_receiver; pending_receiver interface_provider; pending_receiver controller_receiver; ServiceWorkerInstalledScriptsInfo? installed_scripts_info; pending_associated_remote instance_host; ServiceWorkerProviderInfoForStartWorker provider_info; pending_remote content_settings_proxy; pending_receiver preference_watcher_receiver; URLLoaderFactoryBundle subresource_loader_factories; pending_receiver subresource_loader_updater; ServiceWorkerToken service_worker_token; int64 ukm_source_id; WorkerMainScriptLoadParams? main_script_load_params; PolicyContainer? policy_container; blink.mojom.StorageKey storage_key; array cors_exempt_header_list; pending_receiver? coep_reporting_observer; pending_receiver? dip_reporting_observer; NoiseToken? canvas_noise_token; pending_receiver canvas_noise_token_observer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=41" + }, + "blink.mojom.EmbeddedWorkerStartTiming": { + "definition": "struct EmbeddedWorkerStartTiming { mojo_base.mojom.TimeTicks start_worker_received_time; mojo_base.mojom.TimeTicks script_evaluation_start_time; mojo_base.mojom.TimeTicks script_evaluation_end_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/embedded_worker.mojom;l=193" + }, + "blink.mojom.NavigationPreloadState": { + "definition": "struct NavigationPreloadState { bool enabled = false; string header = \"true\";};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/navigation_preload_state.mojom;l=9" + }, + "blink.mojom.ServiceWorkerHost.SetCachedMetadata": { + "definition": "SetCachedMetadata(url.mojom.Url url, mojo_base.mojom.ReadOnlyBuffer data);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=55" + }, + "blink.mojom.ServiceWorkerHost.ClearCachedMetadata": { + "definition": "ClearCachedMetadata(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=58" + }, + "blink.mojom.ServiceWorkerHost.GetClients": { + "definition": "GetClients(ServiceWorkerClientQueryOptions options) => (array clients);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=62" + }, + "blink.mojom.ServiceWorkerHost.GetClient": { + "definition": "GetClient(string client_uuid) => (ServiceWorkerClientInfo? client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=68" + }, + "blink.mojom.ServiceWorkerHost.OpenNewTab": { + "definition": "OpenNewTab(url.mojom.Url url) => (bool success, ServiceWorkerClientInfo? client, string? error_msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=78" + }, + "blink.mojom.ServiceWorkerHost.OpenPaymentHandlerWindow": { + "definition": "OpenPaymentHandlerWindow(url.mojom.Url url) => (bool success, ServiceWorkerClientInfo? client, string? error_msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=90" + }, + "blink.mojom.ServiceWorkerHost.PostMessageToClient": { + "definition": "PostMessageToClient(string client_uuid, TransferableMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=95" + }, + "blink.mojom.ServiceWorkerHost.FocusClient": { + "definition": "FocusClient(string client_uuid) => (FocusResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=99" + }, + "blink.mojom.ServiceWorkerHost.NavigateClient": { + "definition": "NavigateClient(string client_uuid, url.mojom.Url url) => (bool success, ServiceWorkerClientInfo? client, string? error_msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=109" + }, + "blink.mojom.ServiceWorkerHost.SkipWaiting": { + "definition": "SkipWaiting() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=119" + }, + "blink.mojom.ServiceWorkerHost.ClaimClients": { + "definition": "ClaimClients() => (ServiceWorkerErrorType error, string? error_msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=125" + }, + "blink.mojom.ServiceWorkerHost.AddRoutes": { + "definition": "AddRoutes(ServiceWorkerRouterRules rules) => (bool is_parse_error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=135" + }, + "blink.mojom.ServiceWorker.InitializeGlobalScope": { + "definition": "InitializeGlobalScope( pending_associated_remote service_worker_host, pending_associated_remote associated_interfaces_to_browser, pending_associated_receiver associated_interfaces_from_browser, ServiceWorkerRegistrationObjectInfo registration_info, ServiceWorkerObjectInfo service_worker_info, FetchHandlerExistence fetch_handler_existence, AncestorFrameType ancestor_frame_type, blink.mojom.StorageKey storage_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=209" + }, + "blink.mojom.ServiceWorker.DispatchInstallEvent": { + "definition": "DispatchInstallEvent() => (ServiceWorkerEventStatus status, uint32 fetch_count);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=224" + }, + "blink.mojom.ServiceWorker.DispatchActivateEvent": { + "definition": "DispatchActivateEvent() => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=226" + }, + "blink.mojom.ServiceWorker.DispatchBackgroundFetchAbortEvent": { + "definition": "DispatchBackgroundFetchAbortEvent( BackgroundFetchRegistration registration) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=234" + }, + "blink.mojom.ServiceWorker.DispatchBackgroundFetchClickEvent": { + "definition": "DispatchBackgroundFetchClickEvent( BackgroundFetchRegistration registration) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=237" + }, + "blink.mojom.ServiceWorker.DispatchBackgroundFetchFailEvent": { + "definition": "DispatchBackgroundFetchFailEvent( BackgroundFetchRegistration registration) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=240" + }, + "blink.mojom.ServiceWorker.DispatchBackgroundFetchSuccessEvent": { + "definition": "DispatchBackgroundFetchSuccessEvent( BackgroundFetchRegistration registration) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=243" + }, + "blink.mojom.ServiceWorker.DispatchCookieChangeEvent": { + "definition": "DispatchCookieChangeEvent(network.mojom.CookieChangeInfo change) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=251" + }, + "blink.mojom.ServiceWorker.DispatchFetchEventForMainResource": { + "definition": "DispatchFetchEventForMainResource( DispatchFetchEventParams params, pending_remote response_callback) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=259" + }, + "blink.mojom.ServiceWorker.DispatchNotificationClickEvent": { + "definition": "DispatchNotificationClickEvent( string notification_id, NotificationData notification_data, int32 action_index, mojo_base.mojom.String16? reply) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=263" + }, + "blink.mojom.ServiceWorker.DispatchNotificationCloseEvent": { + "definition": "DispatchNotificationCloseEvent( string notification_id, NotificationData notification_data) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=270" + }, + "blink.mojom.ServiceWorker.DispatchPushEvent": { + "definition": "DispatchPushEvent(string? payload) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=276" + }, + "blink.mojom.ServiceWorker.DispatchPushEventRecordingNetworkRequests": { + "definition": "DispatchPushEventRecordingNetworkRequests(string? payload) => (ServiceWorkerEventStatus status, array? requested_urls);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=280" + }, + "blink.mojom.ServiceWorker.DispatchPushSubscriptionChangeEvent": { + "definition": "DispatchPushSubscriptionChangeEvent( PushSubscription? old_subscription, PushSubscription? new_subscription) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=291" + }, + "blink.mojom.ServiceWorker.DispatchSyncEvent": { + "definition": "DispatchSyncEvent(string tag, bool last_chance, mojo_base.mojom.TimeDelta timeout) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=298" + }, + "blink.mojom.ServiceWorker.DispatchPeriodicSyncEvent": { + "definition": "DispatchPeriodicSyncEvent(string tag, mojo_base.mojom.TimeDelta timeout) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=304" + }, + "blink.mojom.ServiceWorker.DispatchAbortPaymentEvent": { + "definition": "DispatchAbortPaymentEvent( pending_remote result_of_abort_payment) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=307" + }, + "blink.mojom.ServiceWorker.DispatchCanMakePaymentEvent": { + "definition": "DispatchCanMakePaymentEvent( payments.mojom.CanMakePaymentEventData event_data, pending_remote result_of_can_make_payment) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=311" + }, + "blink.mojom.ServiceWorker.DispatchPaymentRequestEvent": { + "definition": "DispatchPaymentRequestEvent( payments.mojom.PaymentRequestEventData request_data, pending_remote response_callback) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=316" + }, + "blink.mojom.ServiceWorker.DispatchExtendableMessageEvent": { + "definition": "DispatchExtendableMessageEvent(ExtendableMessageEvent event) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=321" + }, + "blink.mojom.ServiceWorker.DispatchContentDeleteEvent": { + "definition": "DispatchContentDeleteEvent(string id) => (ServiceWorkerEventStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=324" + }, + "blink.mojom.ServiceWorker.Ping": { + "definition": "Ping() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=329" + }, + "blink.mojom.ServiceWorker.SetIdleDelay": { + "definition": "SetIdleDelay(mojo_base.mojom.TimeDelta delay);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=333" + }, + "blink.mojom.ServiceWorker.AddKeepAlive": { + "definition": "AddKeepAlive();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=336" + }, + "blink.mojom.ServiceWorker.ClearKeepAlive": { + "definition": "ClearKeepAlive();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=340" + }, + "blink.mojom.ServiceWorker.AddMessageToConsole": { + "definition": "AddMessageToConsole(ConsoleMessageLevel level, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=343" + }, + "blink.mojom.ServiceWorker.ExecuteScriptForTest": { + "definition": "ExecuteScriptForTest( mojo_base.mojom.BigString16 javascript, bool wants_result) => (mojo_base.mojom.Value result, string? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=355" + }, + "blink.mojom.ExtendableMessageEvent": { + "definition": "struct ExtendableMessageEvent { TransferableMessage message; url.mojom.Origin source_origin; ServiceWorkerClientInfo? source_info_for_client; ServiceWorkerObjectInfo? source_info_for_service_worker;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=138" + }, + "blink.mojom.FocusError": { + "definition": "enum FocusError { CLIENT_NOT_FOUND, CLIENT_INACTIVE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=36" + }, + "blink.mojom.FetchHandlerExistence": { + "definition": "enum FetchHandlerExistence { UNKNOWN, EXISTS, DOES_NOT_EXIST,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=151" + }, + "blink.mojom.FocusResult": { + "definition": "union FocusResult { ServiceWorkerClientInfo client; FocusError error_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker.mojom;l=43" + }, + "blink.mojom.AncestorFrameType": { + "definition": "enum AncestorFrameType { kNormalFrame, kFencedFrame};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_ancestor_frame_type.mojom;l=7" + }, + "blink.mojom.ServiceWorkerClientQueryOptions": { + "definition": "struct ServiceWorkerClientQueryOptions { bool include_uncontrolled = false; ServiceWorkerClientType client_type = ServiceWorkerClientType.kWindow;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_client.mojom;l=30" + }, + "blink.mojom.ServiceWorkerClientInfo": { + "definition": "struct ServiceWorkerClientInfo { url.mojom.Url url; RequestContextFrameType frame_type = RequestContextFrameType.kNone; string client_uuid; ServiceWorkerClientType client_type; bool page_hidden = true; bool is_focused = false; ServiceWorkerClientLifecycleState lifecycle_state = ServiceWorkerClientLifecycleState.kActive; mojo_base.mojom.TimeTicks last_focus_time; mojo_base.mojom.TimeTicks creation_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_client.mojom;l=44" + }, + "blink.mojom.ServiceWorkerClientType": { + "definition": "enum ServiceWorkerClientType { kWindow, kDedicatedWorker, kSharedWorker, kAll,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_client.mojom;l=14" + }, + "blink.mojom.ServiceWorkerClientLifecycleState": { + "definition": "enum ServiceWorkerClientLifecycleState { kActive, kFrozen,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_client.mojom;l=23" + }, + "blink.mojom.ServiceWorkerContainerHost.Register": { + "definition": "Register(url.mojom.Url script_url, ServiceWorkerRegistrationOptions options, FetchClientSettingsObject outside_fetch_client_settings_object) => (ServiceWorkerErrorType error, string? error_msg, ServiceWorkerRegistrationObjectInfo? registration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=55" + }, + "blink.mojom.ServiceWorkerContainerHost.GetRegistration": { + "definition": "GetRegistration(url.mojom.Url client_url) => (ServiceWorkerErrorType error, string? error_msg, ServiceWorkerRegistrationObjectInfo? registration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=68" + }, + "blink.mojom.ServiceWorkerContainerHost.GetRegistrations": { + "definition": "GetRegistrations() => (ServiceWorkerErrorType error, string? error_msg, array? infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=78" + }, + "blink.mojom.ServiceWorkerContainerHost.GetRegistrationForReady": { + "definition": "GetRegistrationForReady() => (ServiceWorkerRegistrationObjectInfo? registration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=87" + }, + "blink.mojom.ServiceWorkerContainerHost.EnsureControllerServiceWorker": { + "definition": "EnsureControllerServiceWorker( pending_receiver receiver, ControllerServiceWorkerPurpose purpose);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=99" + }, + "blink.mojom.ServiceWorkerContainerHost.CloneContainerHost": { + "definition": "CloneContainerHost(pending_receiver container_host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=104" + }, + "blink.mojom.ServiceWorkerContainerHost.HintToUpdateServiceWorker": { + "definition": "HintToUpdateServiceWorker();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=111" + }, + "blink.mojom.ServiceWorkerContainerHost.EnsureFileAccess": { + "definition": "EnsureFileAccess(array files) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=118" + }, + "blink.mojom.ServiceWorkerContainerHost.OnExecutionReady": { + "definition": "OnExecutionReady();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=122" + }, + "blink.mojom.ServiceWorkerContainer.SetController": { + "definition": "SetController(ControllerServiceWorkerInfo controller_info, bool should_notify_controllerchange);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=148" + }, + "blink.mojom.ServiceWorkerContainer.PostMessageToClient": { + "definition": "PostMessageToClient(ServiceWorkerObjectInfo source, TransferableMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=154" + }, + "blink.mojom.ServiceWorkerContainer.CountFeature": { + "definition": "CountFeature(WebFeature feature);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=159" + }, + "blink.mojom.ServiceWorkerContainerInfoForClient": { + "definition": "struct ServiceWorkerContainerInfoForClient { pending_associated_remote host_remote; pending_associated_receiver client_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=28" + }, + "blink.mojom.ControllerServiceWorkerPurpose": { + "definition": "enum ControllerServiceWorkerPurpose { FETCH_SUB_RESOURCE};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container.mojom;l=21" + }, + "blink.mojom.ServiceWorkerContainerType": { + "definition": "enum ServiceWorkerContainerType { kUnknown, kForWindow, kForDedicatedWorker, kForSharedWorker, kForServiceWorker,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_container_type.mojom;l=18" + }, + "blink.mojom.ServiceWorkerEmbeddedWorkerStatus": { + "definition": "enum ServiceWorkerEmbeddedWorkerStatus { kStopped = 0, kStarting = 1, kRunning = 2, kStopping = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_embedded_worker_status.mojom;l=8" + }, + "blink.mojom.ServiceWorkerErrorType": { + "definition": "enum ServiceWorkerErrorType { kNone = 0, kAbort, kActivate, kDisabled, kInstall, kNavigation, kNetwork, kNotFound, kScriptEvaluateFailed, kSecurity, kState, kTimeout, kType, kUnknown,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom;l=10" + }, + "blink.mojom.ServiceWorkerResponseError": { + "definition": "enum ServiceWorkerResponseError { kUnknown, kPromiseRejected, kDefaultPrevented, kNoV8Instance, kResponseTypeError, kResponseTypeOpaque, kResponseTypeNotBasicOrDefault, kBodyUsed, kResponseTypeOpaqueForClientRequest, kResponseTypeOpaqueRedirect, kBodyLocked, kRedirectedResponseForNotFollowRequest, kDataPipeCreationFailed, kResponseTypeCorsForRequestModeSameOrigin, kResponseBodyBroken, kDisallowedByCorp, kRequestBodyUnusable,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom;l=29" + }, + "blink.mojom.ServiceWorkerEventStatus": { + "definition": "enum ServiceWorkerEventStatus { COMPLETED, REJECTED, ABORTED, TIMEOUT, MAX=TIMEOUT};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom;l=10" + }, + "blink.mojom.ServiceWorkerStartStatus": { + "definition": "enum ServiceWorkerStartStatus { kNormalCompletion, kAbruptCompletion};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom;l=42" + }, + "blink.mojom.ServiceWorkerFetchHandlerBypassOption": { + "definition": "enum ServiceWorkerFetchHandlerBypassOption { kDefault, kBypassOnlyIfServiceWorkerNotStarted, kRaceNetworkRequest, kRaceNetworkRequestHoldback, kAutoPreload, kSyntheticResponse, kSyntheticResponseDryRunMode,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_fetch_handler_bypass_option.mojom;l=13" + }, + "blink.mojom.ServiceWorkerFetchHandlerType": { + "definition": "enum ServiceWorkerFetchHandlerType { kNoHandler = 0, kNotSkippable = 1, kEmptyFetchHandler = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_fetch_handler_type.mojom;l=12" + }, + "blink.mojom.ServiceWorkerFetchResponseCallback.OnResponse": { + "definition": "OnResponse(FetchAPIResponse response, ServiceWorkerFetchEventTiming timing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_fetch_response_callback.mojom;l=29" + }, + "blink.mojom.ServiceWorkerFetchResponseCallback.OnResponseStream": { + "definition": "OnResponseStream(FetchAPIResponse response, ServiceWorkerStreamHandle body_as_stream, ServiceWorkerFetchEventTiming timing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_fetch_response_callback.mojom;l=33" + }, + "blink.mojom.ServiceWorkerFetchResponseCallback.OnFallback": { + "definition": "OnFallback(network.mojom.DataElementChunkedDataPipe? request_body, ServiceWorkerFetchEventTiming timing);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_fetch_response_callback.mojom;l=40" + }, + "blink.mojom.ServiceWorkerFetchEventTiming": { + "definition": "struct ServiceWorkerFetchEventTiming { mojo_base.mojom.TimeTicks dispatch_event_time; mojo_base.mojom.TimeTicks respond_with_settled_time;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_fetch_response_callback.mojom;l=15" + }, + "blink.mojom.ServiceWorkerInstalledScriptsManagerHost.RequestInstalledScript": { + "definition": "RequestInstalledScript(url.mojom.Url script_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_installed_scripts_manager.mojom;l=38" + }, + "blink.mojom.ServiceWorkerInstalledScriptsManager.TransferInstalledScript": { + "definition": "TransferInstalledScript(ServiceWorkerScriptInfo script_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_installed_scripts_manager.mojom;l=45" + }, + "blink.mojom.ServiceWorkerInstalledScriptsInfo": { + "definition": "struct ServiceWorkerInstalledScriptsInfo { pending_receiver manager_receiver; pending_remote manager_host_remote; array installed_urls;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_installed_scripts_manager.mojom;l=11" + }, + "blink.mojom.ServiceWorkerScriptInfo": { + "definition": "struct ServiceWorkerScriptInfo { url.mojom.Url script_url; string encoding; map headers; handle body; uint64 body_size; handle? meta_data; uint64 meta_data_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_installed_scripts_manager.mojom;l=19" + }, + "blink.mojom.ServiceWorkerObjectHost.PostMessageToServiceWorker": { + "definition": "PostMessageToServiceWorker(TransferableMessage message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_object.mojom;l=37" + }, + "blink.mojom.ServiceWorkerObjectHost.TerminateForTesting": { + "definition": "TerminateForTesting() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_object.mojom;l=42" + }, + "blink.mojom.ServiceWorkerObject.StateChanged": { + "definition": "StateChanged(ServiceWorkerState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_object.mojom;l=50" + }, + "blink.mojom.ServiceWorkerObjectInfo": { + "definition": "struct ServiceWorkerObjectInfo { int64 version_id = kInvalidServiceWorkerVersionId; ServiceWorkerState state = ServiceWorkerState.kParsed; url.mojom.Url url; pending_associated_remote host_remote; pending_associated_receiver receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_object.mojom;l=14" + }, + "blink.mojom.ServiceWorkerProviderInfoForStartWorker": { + "definition": "struct ServiceWorkerProviderInfoForStartWorker { pending_associated_remote host_remote; pending_remote? script_loader_factory_remote; pending_remote? cache_storage; pending_remote browser_interface_broker;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_provider.mojom;l=25" + }, + "blink.mojom.ServiceWorkerRegistrationObjectHost.Update": { + "definition": "Update(FetchClientSettingsObject outside_fetch_client_settings_object) => (ServiceWorkerErrorType error, string? error_msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=55" + }, + "blink.mojom.ServiceWorkerRegistrationObjectHost.Unregister": { + "definition": "Unregister() => (ServiceWorkerErrorType error, string? error_msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=61" + }, + "blink.mojom.ServiceWorkerRegistrationObjectHost.EnableNavigationPreload": { + "definition": "EnableNavigationPreload(bool enable) => (ServiceWorkerErrorType error, string? error_msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=66" + }, + "blink.mojom.ServiceWorkerRegistrationObjectHost.GetNavigationPreloadState": { + "definition": "GetNavigationPreloadState() => (ServiceWorkerErrorType error, string? error_msg, blink.mojom.NavigationPreloadState? state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=72" + }, + "blink.mojom.ServiceWorkerRegistrationObjectHost.SetNavigationPreloadHeader": { + "definition": "SetNavigationPreloadHeader(string value) => (ServiceWorkerErrorType error, string? error_msg);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=80" + }, + "blink.mojom.ServiceWorkerRegistrationObject.SetServiceWorkerObjects": { + "definition": "SetServiceWorkerObjects(ChangedServiceWorkerObjectsMask changed_mask, ServiceWorkerObjectInfo? installing, ServiceWorkerObjectInfo? waiting, ServiceWorkerObjectInfo? active);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=93" + }, + "blink.mojom.ServiceWorkerRegistrationObject.SetUpdateViaCache": { + "definition": "SetUpdateViaCache(ServiceWorkerUpdateViaCache update_via_cache);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=99" + }, + "blink.mojom.ServiceWorkerRegistrationObject.UpdateFound": { + "definition": "UpdateFound();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=102" + }, + "blink.mojom.ChangedServiceWorkerObjectsMask": { + "definition": "struct ChangedServiceWorkerObjectsMask { bool installing; bool waiting; bool active;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=15" + }, + "blink.mojom.ServiceWorkerRegistrationObjectInfo": { + "definition": "struct ServiceWorkerRegistrationObjectInfo { int64 registration_id = kInvalidServiceWorkerRegistrationId; url.mojom.Url scope; ServiceWorkerUpdateViaCache update_via_cache; pending_associated_remote host_remote; pending_associated_receiver receiver; ServiceWorkerObjectInfo? installing; ServiceWorkerObjectInfo? waiting; ServiceWorkerObjectInfo? active;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration.mojom;l=23" + }, + "blink.mojom.ServiceWorkerRegistrationOptions": { + "definition": "struct ServiceWorkerRegistrationOptions { url.mojom.Url scope; ScriptType type = kClassic; ServiceWorkerUpdateViaCache update_via_cache = kImports;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom;l=20" + }, + "blink.mojom.ServiceWorkerUpdateViaCache": { + "definition": "enum ServiceWorkerUpdateViaCache { kImports, kAll, kNone,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom;l=12" + }, + "blink.mojom.ServiceWorkerRouterRunningStatusCondition": { + "definition": "struct ServiceWorkerRouterRunningStatusCondition { ServiceWorkerRouterRunningStatusEnum status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=28" + }, + "blink.mojom.ServiceWorkerRouterRequestCondition": { + "definition": "struct ServiceWorkerRouterRequestCondition { string? method; bool has_mode = false; network.mojom.RequestMode mode; bool has_destination = false; network.mojom.RequestDestination destination;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=33" + }, + "blink.mojom.ServiceWorkerRouterOrCondition": { + "definition": "struct ServiceWorkerRouterOrCondition { array conditions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=63" + }, + "blink.mojom.ServiceWorkerRouterNotCondition": { + "definition": "struct ServiceWorkerRouterNotCondition { ServiceWorkerRouterCondition condition;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=70" + }, + "blink.mojom.ServiceWorkerRouterCondition": { + "definition": "struct ServiceWorkerRouterCondition { SafeUrlPattern? url_pattern; ServiceWorkerRouterRequestCondition? request; ServiceWorkerRouterRunningStatusCondition? running_status; ServiceWorkerRouterOrCondition? or_condition; ServiceWorkerRouterNotCondition? not_condition;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=78" + }, + "blink.mojom.ServiceWorkerRouterNetworkSource": { + "definition": "struct ServiceWorkerRouterNetworkSource {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=91" + }, + "blink.mojom.ServiceWorkerRouterRaceNetworkAndFetchEventSource": { + "definition": "struct ServiceWorkerRouterRaceNetworkAndFetchEventSource {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=100" + }, + "blink.mojom.ServiceWorkerRouterFetchEventSource": { + "definition": "struct ServiceWorkerRouterFetchEventSource {};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=107" + }, + "blink.mojom.ServiceWorkerRouterCacheSource": { + "definition": "struct ServiceWorkerRouterCacheSource { string? cache_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=113" + }, + "blink.mojom.ServiceWorkerRouterRaceNetworkAndCacheSource": { + "definition": "struct ServiceWorkerRouterRaceNetworkAndCacheSource { ServiceWorkerRouterCacheSource cache_source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=123" + }, + "blink.mojom.ServiceWorkerRouterRule": { + "definition": "struct ServiceWorkerRouterRule { ServiceWorkerRouterCondition condition; array sources;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=147" + }, + "blink.mojom.ServiceWorkerRouterRules": { + "definition": "struct ServiceWorkerRouterRules { array rules;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=159" + }, + "blink.mojom.ServiceWorkerRouterRunningStatusEnum": { + "definition": "enum ServiceWorkerRouterRunningStatusEnum { kRunning = 0, kNotRunning = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=17" + }, + "blink.mojom.ServiceWorkerRouterSource": { + "definition": "union ServiceWorkerRouterSource { ServiceWorkerRouterNetworkSource network_source; ServiceWorkerRouterRaceNetworkAndFetchEventSource race_network_and_fetch_event_source; ServiceWorkerRouterFetchEventSource fetch_event_source; ServiceWorkerRouterCacheSource cache_source; ServiceWorkerRouterRaceNetworkAndCacheSource race_network_and_cache_source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_router_rule.mojom;l=132" + }, + "blink.mojom.ServiceWorkerRunningStatusCallback.OnStatusChanged": { + "definition": "OnStatusChanged(ServiceWorkerEmbeddedWorkerStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_running_status_callback.mojom;l=17" + }, + "blink.mojom.ServiceWorkerState": { + "definition": "enum ServiceWorkerState { kParsed, kInstalling, kInstalled, kActivating, kActivated, kRedundant,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_state.mojom;l=9" + }, + "blink.mojom.ServiceWorkerStreamCallback.OnCompleted": { + "definition": "OnCompleted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_stream_handle.mojom;l=10" + }, + "blink.mojom.ServiceWorkerStreamCallback.OnAborted": { + "definition": "OnAborted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_stream_handle.mojom;l=11" + }, + "blink.mojom.ServiceWorkerStreamHandle": { + "definition": "struct ServiceWorkerStreamHandle { handle stream; pending_receiver callback_receiver;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_stream_handle.mojom;l=14" + }, + "blink.mojom.ServiceWorkerWorkerClient.OnControllerChanged": { + "definition": "OnControllerChanged(ControllerServiceWorkerMode mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_worker_client.mojom;l=17" + }, + "blink.mojom.ServiceWorkerWorkerClientRegistry.RegisterWorkerClient": { + "definition": "RegisterWorkerClient(pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_worker_client_registry.mojom;l=18" + }, + "blink.mojom.ServiceWorkerWorkerClientRegistry.CloneWorkerClientRegistry": { + "definition": "CloneWorkerClientRegistry( pending_receiver host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/service_worker/service_worker_worker_client_registry.mojom;l=21" + }, + "blink.mojom.SharedStorageWorkletHost.SelectURL": { + "definition": "SelectURL(string name, array urls_with_metadata, CloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfig private_aggregation_config, bool resolve_to_config, mojo_base.mojom.String16 saved_query_name, mojo_base.mojom.TimeTicks start_time) => (bool success, string error_message, FencedFrameConfig? config);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=82" + }, + "blink.mojom.SharedStorageWorkletHost.Run": { + "definition": "Run(string name, CloneableMessage serialized_data, bool keep_alive_after_operation, PrivateAggregationConfig private_aggregation_config, mojo_base.mojom.TimeTicks start_time) => (bool success, string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=111" + }, + "blink.mojom.SharedStorageDocumentService.CreateWorklet": { + "definition": "CreateWorklet(url.mojom.Url script_source_url, url.mojom.Origin data_origin, SharedStorageDataOriginType data_origin_type, network.mojom.CredentialsMode credentials_mode, SharedStorageWorkletCreationMethod creation_method, array origin_trial_features, pending_associated_receiver worklet_host) => (bool success, string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=133" + }, + "blink.mojom.SharedStorageDocumentService.SharedStorageGet": { + "definition": "SharedStorageGet(network.mojom.SharedStorageKeyArgument key) => (SharedStorageGetStatus status, string error_message, mojo_base.mojom.String16 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=147" + }, + "blink.mojom.SharedStorageDocumentService.SharedStorageUpdate": { + "definition": "SharedStorageUpdate(network.mojom.SharedStorageModifierMethodWithOptions method_with_options) => (string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=154" + }, + "blink.mojom.SharedStorageDocumentService.SharedStorageBatchUpdate": { + "definition": "SharedStorageBatchUpdate( network.mojom.SharedStorageBatchUpdateMethodsArgument methods_with_options, network.mojom.LockName? with_lock) => (string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=162" + }, + "blink.mojom.SharedStorageUrlWithMetadata": { + "definition": "struct SharedStorageUrlWithMetadata { url.mojom.Url url; map reporting_metadata;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=20" + }, + "blink.mojom.PrivateAggregationConfig": { + "definition": "struct PrivateAggregationConfig { url.mojom.Origin? aggregation_coordinator_origin; string? context_id; uint32 filtering_id_max_bytes; uint16? max_contributions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=44" + }, + "blink.mojom.SharedStorageGetStatus": { + "definition": "enum SharedStorageGetStatus { kSuccess, kNotFound, kError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=25" + }, + "blink.mojom.SharedStorageWorkletCreationMethod": { + "definition": "enum SharedStorageWorkletCreationMethod { kAddModule, kCreateWorklet,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=31" + }, + "blink.mojom.SharedStorageDataOriginType": { + "definition": "enum SharedStorageDataOriginType { kContextOrigin, kScriptOrigin, kCustomOrigin,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage.mojom;l=36" + }, + "blink.mojom.SharedStorageEntriesListener.DidReadEntries": { + "definition": "DidReadEntries( bool success, string error_message, array entries, bool has_more_entries, int32 total_queued_to_send);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=47" + }, + "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageUpdate": { + "definition": "SharedStorageUpdate(network.mojom.SharedStorageModifierMethodWithOptions method_with_options) => (string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=68" + }, + "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageBatchUpdate": { + "definition": "SharedStorageBatchUpdate( network.mojom.SharedStorageBatchUpdateMethodsArgument methods_with_options, network.mojom.LockName? with_lock) => (string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=76" + }, + "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageGet": { + "definition": "SharedStorageGet(network.mojom.SharedStorageKeyArgument key) => (SharedStorageGetStatus status, string error_message, mojo_base.mojom.String16 value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=83" + }, + "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageKeys": { + "definition": "SharedStorageKeys(pending_remote listener);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=88" + }, + "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageEntries": { + "definition": "SharedStorageEntries( pending_remote listener, bool values_only);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=93" + }, + "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageLength": { + "definition": "SharedStorageLength() => (bool success, string error_message, uint32 length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=98" + }, + "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageRemainingBudget": { + "definition": "SharedStorageRemainingBudget() => (bool success, string error_message, double bits);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=103" + }, + "blink.mojom.SharedStorageWorkletServiceClient.GetInterestGroups": { + "definition": "GetInterestGroups() => (GetInterestGroupsResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=108" + }, + "blink.mojom.SharedStorageWorkletServiceClient.DidAddMessageToConsole": { + "definition": "DidAddMessageToConsole(ConsoleMessageLevel log_level, string message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=111" + }, + "blink.mojom.SharedStorageWorkletServiceClient.RecordUseCounters": { + "definition": "RecordUseCounters(array features);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=114" + }, + "blink.mojom.SharedStorageWorkletService.Initialize": { + "definition": "Initialize( pending_associated_remote client, SharedStorageWorkletPermissionsPolicyState permissions_policy_state, mojo_base.mojom.String16? embedder_context);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=130" + }, + "blink.mojom.SharedStorageWorkletService.AddModule": { + "definition": "AddModule(pending_remote url_loader_factory, url.mojom.Url script_source_url) => (bool success, string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=139" + }, + "blink.mojom.SharedStorageWorkletService.RunURLSelectionOperation": { + "definition": "RunURLSelectionOperation( string name, array urls, CloneableMessage serialized_data, PrivateAggregationOperationDetails? pa_operation_details) => (bool success, string error_message, uint32 index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=148" + }, + "blink.mojom.SharedStorageWorkletService.RunOperation": { + "definition": "RunOperation(string name, CloneableMessage serialized_data, PrivateAggregationOperationDetails? pa_operation_details) => (bool success, string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=155" + }, + "blink.mojom.SharedStorageWorkletPermissionsPolicyState": { + "definition": "struct SharedStorageWorkletPermissionsPolicyState { bool private_aggregation_allowed; bool join_ad_interest_group_allowed; bool run_ad_auction_allowed;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=22" + }, + "blink.mojom.SharedStorageKeyAndOrValue": { + "definition": "struct SharedStorageKeyAndOrValue { mojo_base.mojom.String16 key; mojo_base.mojom.String16 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=31" + }, + "blink.mojom.PrivateAggregationOperationDetails": { + "definition": "struct PrivateAggregationOperationDetails { pending_remote pa_host; uint32 filtering_id_max_bytes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=118" + }, + "blink.mojom.GetInterestGroupsResult": { + "definition": "union GetInterestGroupsResult { string error_message; array groups;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom;l=54" + }, + "blink.mojom.EngagementLevel": { + "definition": "enum EngagementLevel { NONE = 0, MINIMAL = 1, LOW = 2, MEDIUM = 3, HIGH = 4, MAX = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/site_engagement/site_engagement.mojom;l=8" + }, + "blink.mojom.SmartCardService.CreateContext": { + "definition": "CreateContext() => (device.mojom.SmartCardCreateContextResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/smart_card/smart_card.mojom;l=13" + }, + "blink.mojom.WebOTPService.Receive": { + "definition": "Receive() => (SmsStatus status, string? otp);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/sms/webotp_service.mojom;l=26" + }, + "blink.mojom.WebOTPService.Abort": { + "definition": "Abort();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/sms/webotp_service.mojom;l=29" + }, + "blink.mojom.SmsStatus": { + "definition": "enum SmsStatus { kSuccess, kUnhandledRequest, kCancelled, kAborted, kTimeout, kBackendNotAvailable };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/sms/webotp_service.mojom;l=10" + }, + "blink.mojom.SpeculationHost.UpdateSpeculationCandidates": { + "definition": "UpdateSpeculationCandidates(array candidates, bool enable_cross_origin_prerender_iframes);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom;l=30" + }, + "blink.mojom.SpeculationHost.OnLCPPredicted": { + "definition": "OnLCPPredicted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom;l=34" + }, + "blink.mojom.SpeculationHost.InitiatePreview": { + "definition": "InitiatePreview(url.mojom.Url url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom;l=39" + }, + "blink.mojom.SpeculationCandidate": { + "definition": "struct SpeculationCandidate { url.mojom.Url url; SpeculationAction action = kPrefetch; Referrer referrer; bool requires_anonymous_client_ip_when_cross_origin = false; SpeculationTargetHint target_browsing_context_name_hint = kNoHint; SpeculationEagerness eagerness = kConservative; network.mojom.NoVarySearch? no_vary_search_hint; SpeculationInjectionType injection_type = kNone; array tags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom;l=87" + }, + "blink.mojom.SpeculationAction": { + "definition": "enum SpeculationAction { kPrefetch, kPrefetchWithSubresources, kPrerender, kPrerenderUntilScript,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom;l=46" + }, + "blink.mojom.SpeculationTargetHint": { + "definition": "enum SpeculationTargetHint { kNoHint, kBlank, kSelf,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom;l=57" + }, + "blink.mojom.SpeculationEagerness": { + "definition": "enum SpeculationEagerness { kConservative = 0, kModerate = 1, kImmediate = 2, kEager = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom;l=68" + }, + "blink.mojom.SpeculationInjectionType": { + "definition": "enum SpeculationInjectionType { kNone, kMainWorldScript, kIsolatedWorldScript, kAutoSpeculationRules, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom;l=76" + }, + "blink.mojom.SpeechSynthesisVoiceListObserver.OnSetVoiceList": { + "definition": "OnSetVoiceList(array voice_list);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=51" + }, + "blink.mojom.SpeechSynthesisClient.OnStartedSpeaking": { + "definition": "OnStartedSpeaking();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=58" + }, + "blink.mojom.SpeechSynthesisClient.OnFinishedSpeaking": { + "definition": "OnFinishedSpeaking(SpeechSynthesisErrorCode error_code);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=61" + }, + "blink.mojom.SpeechSynthesisClient.OnPausedSpeaking": { + "definition": "OnPausedSpeaking();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=64" + }, + "blink.mojom.SpeechSynthesisClient.OnResumedSpeaking": { + "definition": "OnResumedSpeaking();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=67" + }, + "blink.mojom.SpeechSynthesisClient.OnEncounteredWordBoundary": { + "definition": "OnEncounteredWordBoundary(uint32 char_index, uint32 char_length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=70" + }, + "blink.mojom.SpeechSynthesisClient.OnEncounteredSentenceBoundary": { + "definition": "OnEncounteredSentenceBoundary(uint32 char_index, uint32 char_length);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=73" + }, + "blink.mojom.SpeechSynthesisClient.OnEncounteredSpeakingError": { + "definition": "OnEncounteredSpeakingError();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=77" + }, + "blink.mojom.SpeechSynthesis.AddVoiceListObserver": { + "definition": "AddVoiceListObserver(pending_remote observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=85" + }, + "blink.mojom.SpeechSynthesis.Speak": { + "definition": "Speak(SpeechSynthesisUtterance utterance, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=88" + }, + "blink.mojom.SpeechSynthesis.Pause": { + "definition": "Pause();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=92" + }, + "blink.mojom.SpeechSynthesis.Resume": { + "definition": "Resume();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=95" + }, + "blink.mojom.SpeechSynthesis.Cancel": { + "definition": "Cancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=98" + }, + "blink.mojom.SpeechSynthesisUtterance": { + "definition": "struct SpeechSynthesisUtterance { string text; string lang; string voice; double volume; double rate; double pitch;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=12" + }, + "blink.mojom.SpeechSynthesisVoice": { + "definition": "struct SpeechSynthesisVoice { string voice_uri; string name; string lang; bool is_local_service; bool is_default;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=21" + }, + "blink.mojom.SpeechSynthesisErrorCode": { + "definition": "enum SpeechSynthesisErrorCode { kCancelled, kInterrupted, kErrorOccurred, kNoError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/speech/speech_synthesis.mojom;l=33" + }, + "blink.mojom.StorageAccessHandle.BindIndexedDB": { + "definition": "BindIndexedDB(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_access/storage_access_handle.mojom;l=26" + }, + "blink.mojom.StorageAccessHandle.BindLocks": { + "definition": "BindLocks(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_access/storage_access_handle.mojom;l=29" + }, + "blink.mojom.StorageAccessHandle.BindCaches": { + "definition": "BindCaches(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_access/storage_access_handle.mojom;l=32" + }, + "blink.mojom.StorageAccessHandle.GetDirectory": { + "definition": "GetDirectory() => (FileSystemAccessError result, pending_remote? directory);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_access/storage_access_handle.mojom;l=36" + }, + "blink.mojom.StorageAccessHandle.Estimate": { + "definition": "Estimate() => (mojo_base.mojom.ByteCount current_usage, mojo_base.mojom.ByteCount current_quota, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_access/storage_access_handle.mojom;l=41" + }, + "blink.mojom.StorageAccessHandle.BindBlobStorage": { + "definition": "BindBlobStorage(pending_associated_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_access/storage_access_handle.mojom;l=46" + }, + "blink.mojom.StorageAccessHandle.BindBroadcastChannel": { + "definition": "BindBroadcastChannel(pending_associated_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_access/storage_access_handle.mojom;l=49" + }, + "blink.mojom.StorageAccessHandle.BindSharedWorker": { + "definition": "BindSharedWorker(pending_receiver receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_access/storage_access_handle.mojom;l=52" + }, + "blink.mojom.AncestorChainBit": { + "definition": "enum AncestorChainBit { kSameSite = 0, kCrossSite = 1};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_key/ancestor_chain_bit.mojom;l=14" + }, + "blink.mojom.StorageKey": { + "definition": "struct StorageKey { url.mojom.Origin origin; network.mojom.SchemefulSite top_level_site; mojo_base.mojom.UnguessableToken? nonce; blink.mojom.AncestorChainBit ancestor_chain_bit; network.mojom.SchemefulSite top_level_site_if_third_party_enabled; blink.mojom.AncestorChainBit ancestor_chain_bit_if_third_party_enabled;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/storage_key/storage_key.mojom;l=13" + }, + "blink.mojom.SubAppsService.Add": { + "definition": "Add(array sub_apps_to_add) => (array result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=56" + }, + "blink.mojom.SubAppsService.List": { + "definition": "List() => (SubAppsServiceListResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=59" + }, + "blink.mojom.SubAppsService.Remove": { + "definition": "Remove(array manifest_id_paths) => (array result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=63" + }, + "blink.mojom.SubAppsServiceAddParameters": { + "definition": "struct SubAppsServiceAddParameters { string manifest_id_path; string install_url_path;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=20" + }, + "blink.mojom.SubAppsServiceAddResult": { + "definition": "struct SubAppsServiceAddResult { string manifest_id_path; SubAppsServiceResultCode result_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=25" + }, + "blink.mojom.SubAppsServiceListResult": { + "definition": "struct SubAppsServiceListResult { SubAppsServiceResultCode result_code; array sub_apps_list;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=30" + }, + "blink.mojom.SubAppsServiceListResultEntry": { + "definition": "struct SubAppsServiceListResultEntry { string manifest_id_path; string app_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=35" + }, + "blink.mojom.SubAppsServiceRemoveResult": { + "definition": "struct SubAppsServiceRemoveResult { string manifest_id_path; SubAppsServiceResultCode result_code;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=40" + }, + "blink.mojom.SubAppsServiceResultCode": { + "definition": "enum SubAppsServiceResultCode { kSuccess, kFailure,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/subapps/sub_apps_service.mojom;l=7" + }, + "blink.mojom.PerformanceMarkOrMeasure": { + "definition": "struct PerformanceMarkOrMeasure { enum EntryType{ kMark, kMeasure, }; string name; EntryType entry_type; double start_time; double duration; mojo_base.mojom.BigBuffer? detail;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/timing/performance_mark_or_measure.mojom;l=12" + }, + "blink.mojom.ServerTimingInfo": { + "definition": "struct ServerTimingInfo { string name; double duration; string description;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/timing/resource_timing.mojom;l=19" + }, + "blink.mojom.ResourceTimingInfo": { + "definition": "struct ResourceTimingInfo { string name; mojo_base.mojom.TimeTicks start_time; string alpn_negotiated_protocol; string connection_info; network.mojom.LoadTimingInfo? timing; mojo_base.mojom.TimeTicks last_redirect_end_time; mojo_base.mojom.TimeTicks response_end; CacheState cache_state; uint64 encoded_body_size; uint64 decoded_body_size; bool did_reuse_connection; bool is_secure_transport; bool allow_timing_details; bool allow_negative_values; array server_timing; bool render_blocking_status; uint16 response_status; string content_type; string content_encoding; url.mojom.Url initiator_url; network.mojom.ServiceWorkerRouterInfo? service_worker_router_info; network.mojom.FetchResponseSource service_worker_response_source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/timing/resource_timing.mojom;l=47" + }, + "blink.mojom.CacheState": { + "definition": "enum CacheState { kNone, kLocal, kValidated,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/timing/resource_timing.mojom;l=37" + }, + "blink.mojom.DocumentToken": { + "definition": "struct DocumentToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=21" + }, + "blink.mojom.LocalFrameToken": { + "definition": "struct LocalFrameToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=28" + }, + "blink.mojom.RemoteFrameToken": { + "definition": "struct RemoteFrameToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=32" + }, + "blink.mojom.DedicatedWorkerToken": { + "definition": "struct DedicatedWorkerToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=44" + }, + "blink.mojom.ServiceWorkerToken": { + "definition": "struct ServiceWorkerToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=48" + }, + "blink.mojom.SharedWorkerToken": { + "definition": "struct SharedWorkerToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=52" + }, + "blink.mojom.AnimationWorkletToken": { + "definition": "struct AnimationWorkletToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=65" + }, + "blink.mojom.AudioWorkletToken": { + "definition": "struct AudioWorkletToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=69" + }, + "blink.mojom.LayoutWorkletToken": { + "definition": "struct LayoutWorkletToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=73" + }, + "blink.mojom.PaintWorkletToken": { + "definition": "struct PaintWorkletToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=77" + }, + "blink.mojom.SharedStorageWorkletToken": { + "definition": "struct SharedStorageWorkletToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=81" + }, + "blink.mojom.ShadowRealmToken": { + "definition": "struct ShadowRealmToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=96" + }, + "blink.mojom.AttributionSrcToken": { + "definition": "struct AttributionSrcToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=109" + }, + "blink.mojom.SameDocNavigationScreenshotDestinationToken": { + "definition": "struct SameDocNavigationScreenshotDestinationToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=126" + }, + "blink.mojom.V8ContextToken": { + "definition": "struct V8ContextToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=130" + }, + "blink.mojom.ViewTransitionToken": { + "definition": "struct ViewTransitionToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=134" + }, + "blink.mojom.WebNNContextToken": { + "definition": "struct WebNNContextToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=145" + }, + "blink.mojom.WebNNPendingConstantToken": { + "definition": "struct WebNNPendingConstantToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=149" + }, + "blink.mojom.WebNNTensorToken": { + "definition": "struct WebNNTensorToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=153" + }, + "blink.mojom.FrameToken": { + "definition": "union FrameToken { LocalFrameToken local_frame_token; RemoteFrameToken remote_frame_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=36" + }, + "blink.mojom.WorkerToken": { + "definition": "union WorkerToken { DedicatedWorkerToken dedicated_worker_token; ServiceWorkerToken service_worker_token; SharedWorkerToken shared_worker_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=56" + }, + "blink.mojom.WorkletToken": { + "definition": "union WorkletToken { AnimationWorkletToken animation_worklet_token; AudioWorkletToken audio_worklet_token; LayoutWorkletToken layout_worklet_token; PaintWorkletToken paint_worklet_token; SharedStorageWorkletToken shared_storage_worklet_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=85" + }, + "blink.mojom.ExecutionContextToken": { + "definition": "union ExecutionContextToken { LocalFrameToken local_frame_token; DedicatedWorkerToken dedicated_worker_token; ServiceWorkerToken service_worker_token; SharedWorkerToken shared_worker_token; AnimationWorkletToken animation_worklet_token; AudioWorkletToken audio_worklet_token; LayoutWorkletToken layout_worklet_token; PaintWorkletToken paint_worklet_token; SharedStorageWorkletToken shared_storage_worklet_token; ShadowRealmToken shadow_realm_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=113" + }, + "blink.mojom.WebGPUExecutionContextToken": { + "definition": "union WebGPUExecutionContextToken { DocumentToken document_token; DedicatedWorkerToken dedicated_worker_token; SharedWorkerToken shared_worker_token; ServiceWorkerToken service_worker_token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/tokens/tokens.mojom;l=138" + }, + "blink.mojom.UnhandledTapNotifier.ShowUnhandledTapUIIfNeeded": { + "definition": "ShowUnhandledTapUIIfNeeded(UnhandledTapInfo unhandled_tap_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/unhandled_tap_notifier/unhandled_tap_notifier.mojom;l=17" + }, + "blink.mojom.UnhandledTapInfo": { + "definition": "struct UnhandledTapInfo { gfx.mojom.Point tapped_position_in_viewport;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/unhandled_tap_notifier/unhandled_tap_notifier.mojom;l=12" + }, + "blink.mojom.WebUsbService.GetDevices": { + "definition": "GetDevices() => (array results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/usb/web_usb_service.mojom;l=22" + }, + "blink.mojom.WebUsbService.GetDevice": { + "definition": "GetDevice(string guid, pending_receiver device_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/usb/web_usb_service.mojom;l=25" + }, + "blink.mojom.WebUsbService.GetPermission": { + "definition": "GetPermission(WebUsbRequestDeviceOptions options) => (device.mojom.UsbDeviceInfo? result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/usb/web_usb_service.mojom;l=35" + }, + "blink.mojom.WebUsbService.ForgetDevice": { + "definition": "ForgetDevice(string guid) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/usb/web_usb_service.mojom;l=40" + }, + "blink.mojom.WebUsbService.SetClient": { + "definition": "SetClient( pending_associated_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/usb/web_usb_service.mojom;l=43" + }, + "blink.mojom.WebUsbRequestDeviceOptions": { + "definition": "struct WebUsbRequestDeviceOptions { array filters; array exclusion_filters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/usb/web_usb_service.mojom;l=11" + }, + "blink.mojom.CSSSampleId": { + "definition": "enum CSSSampleId { kInvalid = 0, kInternalAlignContentBlock = 0, kInternalAlignSelfBlock = 0, kInternalEmptyLineHeight = 0, kInternalVisitedBackgroundColor = 0, kInternalVisitedBorderBlockEndColor = 0, kInternalVisitedBorderBlockStartColor = 0, kInternalVisitedBorderBottomColor = 0, kInternalVisitedBorderInlineEndColor = 0, kInternalVisitedBorderInlineStartColor = 0, kInternalVisitedBorderLeftColor = 0, kInternalVisitedBorderRightColor = 0, kInternalVisitedBorderTopColor = 0, kInternalVisitedCaretColor = 0, kInternalVisitedColor = 0, kInternalVisitedColumnRuleColor = 0, kInternalVisitedFill = 0, kInternalVisitedOutlineColor = 0, kInternalVisitedStroke = 0, kInternalVisitedTextDecorationColor = 0, kInternalVisitedTextEmphasisColor = 0, kInternalVisitedTextFillColor = 0, kInternalVisitedTextStrokeColor = 0, kInternalFontSizeDelta = 0, kInternalForcedBackgroundColor = 0, kInternalForcedBorderColor = 0, kInternalForcedColor = 0, kInternalForcedOutlineColor = 0, kInternalForcedVisitedColor = 0, kInternalOverflowBlock = 0, kInternalOverflowInline = 0, kTotalPagesMeasured = 1, kColor = 2, kDirection = 3, kDisplay = 4, kFont = 5, kFontFamily = 6, kFontSize = 7, kFontStyle = 8, kFontVariant = 9, kFontWeight = 10, kTextRendering = 11, kAliasWebkitFontFeatureSettings = 12, kFontKerning = 13, kWebkitFontSmoothing = 14, kFontVariantLigatures = 15, kWebkitLocale = 16, kWebkitTextOrientation = 17, kWebkitWritingMode = 18, kZoom = 19, kLineHeight = 20, kBackground = 21, kBackgroundAttachment = 22, kBackgroundClip = 23, kBackgroundColor = 24, kBackgroundImage = 25, kBackgroundOrigin = 26, kBackgroundPosition = 27, kBackgroundPositionX = 28, kBackgroundPositionY = 29, kBackgroundRepeat = 30, kBackgroundSize = 33, kBorder = 34, kBorderBottom = 35, kBorderBottomColor = 36, kBorderBottomLeftRadius = 37, kBorderBottomRightRadius = 38, kBorderBottomStyle = 39, kBorderBottomWidth = 40, kBorderCollapse = 41, kBorderColor = 42, kBorderImage = 43, kBorderImageOutset = 44, kBorderImageRepeat = 45, kBorderImageSlice = 46, kBorderImageSource = 47, kBorderImageWidth = 48, kBorderLeft = 49, kBorderLeftColor = 50, kBorderLeftStyle = 51, kBorderLeftWidth = 52, kBorderRadius = 53, kBorderRight = 54, kBorderRightColor = 55, kBorderRightStyle = 56, kBorderRightWidth = 57, kBorderSpacing = 58, kBorderStyle = 59, kBorderTop = 60, kBorderTopColor = 61, kBorderTopLeftRadius = 62, kBorderTopRightRadius = 63, kBorderTopStyle = 64, kBorderTopWidth = 65, kBorderWidth = 66, kBottom = 67, kBoxShadow = 68, kBoxSizing = 69, kCaptionSide = 70, kClear = 71, kClip = 72, kAliasWebkitClipPath = 73, kContent = 74, kCounterIncrement = 75, kCounterReset = 76, kCursor = 77, kEmptyCells = 78, kFloat = 79, kFontStretch = 80, kHeight = 81, kImageRendering = 82, kLeft = 83, kLetterSpacing = 84, kListStyle = 85, kListStyleImage = 86, kListStylePosition = 87, kListStyleType = 88, kMargin = 89, kMarginBottom = 90, kMarginLeft = 91, kMarginRight = 92, kMarginTop = 93, kMaxHeight = 94, kMaxWidth = 95, kMinHeight = 96, kMinWidth = 97, kOpacity = 98, kOrphans = 99, kOutline = 100, kOutlineColor = 101, kOutlineOffset = 102, kOutlineStyle = 103, kOutlineWidth = 104, kOverflow = 105, kOverflowWrap = 106, kOverflowX = 107, kOverflowY = 108, kPadding = 109, kPaddingBottom = 110, kPaddingLeft = 111, kPaddingRight = 112, kPaddingTop = 113, kPage = 114, kPageBreakAfter = 115, kPageBreakBefore = 116, kPageBreakInside = 117, kPointerEvents = 118, kPosition = 119, kQuotes = 120, kResize = 121, kRight = 122, kSize = 123, kSrc = 124, kSpeak = 125, kTableLayout = 126, kTabSize = 127, kTextAlign = 128, kTextDecoration = 129, kTextIndent = 130, kTextOverflow = 136, kTextShadow = 142, kTextTransform = 143, kTop = 149, kTransition = 150, kTransitionDelay = 151, kTransitionDuration = 152, kTransitionProperty = 153, kTransitionTimingFunction = 154, kUnicodeBidi = 155, kUnicodeRange = 156, kVerticalAlign = 157, kVisibility = 158, kWhiteSpace = 159, kWidows = 160, kWidth = 161, kWordBreak = 162, kWordSpacing = 163, kAliasWordWrap = 164, kZIndex = 165, kAliasWebkitAnimation = 166, kAliasWebkitAnimationDelay = 167, kAliasWebkitAnimationDirection = 168, kAliasWebkitAnimationDuration = 169, kAliasWebkitAnimationFillMode = 170, kAliasWebkitAnimationIterationCount = 171, kAliasWebkitAnimationName = 172, kAliasWebkitAnimationPlayState = 173, kAliasWebkitAnimationTimingFunction = 174, kAliasWebkitAppearance = 175, kAliasWebkitBackfaceVisibility = 177, kAliasWebkitBackgroundClip = 178, kAliasWebkitBackgroundOrigin = 180, kAliasWebkitBackgroundSize = 181, kAliasWebkitBorderAfter = 182, kAliasWebkitBorderAfterColor = 183, kAliasWebkitBorderAfterStyle = 184, kAliasWebkitBorderAfterWidth = 185, kAliasWebkitBorderBefore = 186, kAliasWebkitBorderBeforeColor = 187, kAliasWebkitBorderBeforeStyle = 188, kAliasWebkitBorderBeforeWidth = 189, kAliasWebkitBorderEnd = 190, kAliasWebkitBorderEndColor = 191, kAliasWebkitBorderEndStyle = 192, kAliasWebkitBorderEndWidth = 193, kWebkitBorderHorizontalSpacing = 195, kWebkitBorderImage = 196, kAliasWebkitBorderRadius = 197, kAliasWebkitBorderStart = 198, kAliasWebkitBorderStartColor = 199, kAliasWebkitBorderStartStyle = 200, kAliasWebkitBorderStartWidth = 201, kWebkitBorderVerticalSpacing = 202, kWebkitBoxAlign = 203, kWebkitBoxDirection = 204, kWebkitBoxFlex = 205, kWebkitBoxOrdinalGroup = 208, kWebkitBoxOrient = 209, kWebkitBoxPack = 210, kWebkitBoxReflect = 211, kAliasWebkitBoxShadow = 212, kWebkitColumnBreakAfter = 215, kWebkitColumnBreakBefore = 216, kWebkitColumnBreakInside = 217, kAliasWebkitColumnCount = 218, kAliasWebkitColumnGap = 219, kAliasWebkitColumnRule = 221, kAliasWebkitColumnRuleColor = 222, kAliasWebkitColumnRuleStyle = 223, kAliasWebkitColumnRuleWidth = 224, kAliasWebkitColumnSpan = 225, kAliasWebkitColumnWidth = 226, kAliasWebkitColumns = 227, kAlignContent = 230, kAlignItems = 231, kAlignSelf = 232, kFlex = 233, kFlexBasis = 234, kFlexDirection = 235, kFlexFlow = 236, kFlexGrow = 237, kFlexShrink = 238, kFlexWrap = 239, kJustifyContent = 240, kGridTemplateColumns = 242, kGridTemplateRows = 243, kGridColumnStart = 244, kGridColumnEnd = 245, kGridRowStart = 246, kGridRowEnd = 247, kGridColumn = 248, kGridRow = 249, kGridAutoFlow = 250, kAliasWebkitHyphenateCharacter = 252, kWebkitLineBreak = 259, kWebkitLineClamp = 260, kAliasWebkitLogicalWidth = 263, kAliasWebkitLogicalHeight = 264, kWebkitMarginAfterCollapse = 265, kWebkitMarginBeforeCollapse = 266, kWebkitMarginBottomCollapse = 267, kWebkitMarginTopCollapse = 268, kWebkitMarginCollapse = 269, kAliasWebkitMarginAfter = 270, kAliasWebkitMarginBefore = 271, kAliasWebkitMarginEnd = 272, kAliasWebkitMarginStart = 273, kAliasWebkitMask = 280, kWebkitMaskBoxImage = 281, kWebkitMaskBoxImageOutset = 282, kWebkitMaskBoxImageRepeat = 283, kWebkitMaskBoxImageSlice = 284, kWebkitMaskBoxImageSource = 285, kWebkitMaskBoxImageWidth = 286, kAliasWebkitMaskClip = 287, kAliasWebkitMaskComposite = 288, kAliasWebkitMaskImage = 289, kAliasWebkitMaskOrigin = 290, kAliasWebkitMaskPosition = 291, kWebkitMaskPositionX = 292, kWebkitMaskPositionY = 293, kAliasWebkitMaskRepeat = 294, kAliasWebkitMaskSize = 297, kAliasWebkitMaxLogicalWidth = 298, kAliasWebkitMaxLogicalHeight = 299, kAliasWebkitMinLogicalWidth = 300, kAliasWebkitMinLogicalHeight = 301, kOrder = 303, kAliasWebkitPaddingAfter = 304, kAliasWebkitPaddingBefore = 305, kAliasWebkitPaddingEnd = 306, kAliasWebkitPaddingStart = 307, kAliasWebkitPerspective = 308, kAliasWebkitPerspectiveOrigin = 309, kWebkitPerspectiveOriginX = 310, kWebkitPerspectiveOriginY = 311, kAliasWebkitPrintColorAdjust = 312, kWebkitRtlOrdering = 313, kWebkitRubyPosition = 314, kWebkitTextCombine = 315, kWebkitTextDecorationsInEffect = 316, kAliasWebkitTextEmphasis = 317, kAliasWebkitTextEmphasisColor = 318, kAliasWebkitTextEmphasisPosition = 319, kAliasWebkitTextEmphasisStyle = 320, kWebkitTextFillColor = 321, kWebkitTextSecurity = 322, kWebkitTextStroke = 323, kWebkitTextStrokeColor = 324, kWebkitTextStrokeWidth = 325, kAliasWebkitTransform = 326, kAliasWebkitTransformOrigin = 327, kWebkitTransformOriginX = 328, kWebkitTransformOriginY = 329, kWebkitTransformOriginZ = 330, kAliasWebkitTransformStyle = 331, kAliasWebkitTransition = 332, kAliasWebkitTransitionDelay = 333, kAliasWebkitTransitionDuration = 334, kAliasWebkitTransitionProperty = 335, kAliasWebkitTransitionTimingFunction = 336, kWebkitUserDrag = 337, kWebkitUserModify = 338, kAliasWebkitUserSelect = 339, kShapeOutside = 347, kShapeMargin = 348, kClipPath = 355, kClipRule = 356, kMask = 357, kFilter = 359, kFloodColor = 360, kFloodOpacity = 361, kLightingColor = 362, kStopColor = 363, kStopOpacity = 364, kColorInterpolation = 365, kColorInterpolationFilters = 366, kColorRendering = 368, kFill = 369, kFillOpacity = 370, kFillRule = 371, kMarker = 372, kMarkerEnd = 373, kMarkerMid = 374, kMarkerStart = 375, kMaskType = 376, kShapeRendering = 377, kStroke = 378, kStrokeDasharray = 379, kStrokeDashoffset = 380, kStrokeLinecap = 381, kStrokeLinejoin = 382, kStrokeMiterlimit = 383, kStrokeOpacity = 384, kStrokeWidth = 385, kAlignmentBaseline = 386, kBaselineShift = 387, kDominantBaseline = 388, kTextAnchor = 392, kVectorEffect = 393, kWritingMode = 394, kTextDecorationLine = 401, kTextDecorationStyle = 402, kTextDecorationColor = 403, kTextAlignLast = 404, kTextUnderlinePosition = 405, kMaxZoom = 406, kMinZoom = 407, kOrientation = 408, kUserZoom = 409, kAliasWebkitAppRegion = 412, kAliasWebkitFilter = 413, kWebkitBoxDecorationBreak = 414, kWebkitTapHighlightColor = 415, kBufferedRendering = 416, kGridAutoRows = 417, kGridAutoColumns = 418, kBackgroundBlendMode = 419, kMixBlendMode = 420, kTouchAction = 421, kGridArea = 422, kGridTemplateAreas = 423, kAnimation = 424, kAnimationDelay = 425, kAnimationDirection = 426, kAnimationDuration = 427, kAnimationFillMode = 428, kAnimationIterationCount = 429, kAnimationName = 430, kAnimationPlayState = 431, kAnimationTimingFunction = 432, kObjectFit = 433, kPaintOrder = 434, kMaskSourceType = 435, kIsolation = 436, kObjectPosition = 437, kShapeImageThreshold = 439, kColumnFill = 440, kTextJustify = 441, kJustifySelf = 443, kScrollBehavior = 444, kWillChange = 445, kTransform = 446, kTransformOrigin = 447, kTransformStyle = 448, kPerspective = 449, kPerspectiveOrigin = 450, kBackfaceVisibility = 451, kGridTemplate = 452, kGrid = 453, kAll = 454, kJustifyItems = 455, kX = 461, kY = 462, kRx = 463, kRy = 464, kFontSizeAdjust = 465, kCx = 466, kCy = 467, kR = 468, kAliasEpubCaptionSide = 469, kAliasEpubTextCombine = 470, kAliasEpubTextEmphasis = 471, kAliasEpubTextEmphasisColor = 472, kAliasEpubTextEmphasisStyle = 473, kAliasEpubTextOrientation = 474, kAliasEpubTextTransform = 475, kAliasEpubWordBreak = 476, kAliasEpubWritingMode = 477, kAliasWebkitAlignContent = 478, kAliasWebkitAlignItems = 479, kAliasWebkitAlignSelf = 480, kAliasWebkitBorderBottomLeftRadius = 481, kAliasWebkitBorderBottomRightRadius = 482, kAliasWebkitBorderTopLeftRadius = 483, kAliasWebkitBorderTopRightRadius = 484, kAliasWebkitBoxSizing = 485, kAliasWebkitFlex = 486, kAliasWebkitFlexBasis = 487, kAliasWebkitFlexDirection = 488, kAliasWebkitFlexFlow = 489, kAliasWebkitFlexGrow = 490, kAliasWebkitFlexShrink = 491, kAliasWebkitFlexWrap = 492, kAliasWebkitJustifyContent = 493, kAliasWebkitOpacity = 494, kAliasWebkitOrder = 495, kAliasWebkitShapeImageThreshold = 496, kAliasWebkitShapeMargin = 497, kAliasWebkitShapeOutside = 498, kScrollSnapType = 499, kTranslate = 504, kRotate = 505, kScale = 506, kImageOrientation = 507, kBackdropFilter = 508, kTextCombineUpright = 509, kTextOrientation = 510, kAliasGridColumnGap = 511, kAliasGridRowGap = 512, kAliasGridGap = 513, kFontFeatureSettings = 514, kVariable = 515, kFontDisplay = 516, kContain = 517, kD = 518, kBreakAfter = 520, kBreakBefore = 521, kBreakInside = 522, kColumnCount = 523, kColumnGap = 524, kColumnRule = 525, kColumnRuleColor = 526, kColumnRuleStyle = 527, kColumnRuleWidth = 528, kColumnSpan = 529, kColumnWidth = 530, kColumns = 531, kFontVariantCaps = 533, kHyphens = 534, kFontVariantNumeric = 535, kTextSizeAdjust = 536, kAliasWebkitTextSizeAdjust = 537, kOverflowAnchor = 538, kUserSelect = 539, kOffsetDistance = 540, kOffsetPath = 541, kOffset = 543, kOffsetAnchor = 544, kOffsetPosition = 545, kCaretColor = 547, kOffsetRotate = 548, kFontVariationSettings = 549, kInlineSize = 550, kBlockSize = 551, kMinInlineSize = 552, kMinBlockSize = 553, kMaxInlineSize = 554, kMaxBlockSize = 555, kLineBreak = 556, kPlaceContent = 557, kPlaceItems = 558, kTransformBox = 559, kPlaceSelf = 560, kScrollSnapAlign = 561, kScrollPadding = 562, kScrollPaddingTop = 563, kScrollPaddingRight = 564, kScrollPaddingBottom = 565, kScrollPaddingLeft = 566, kScrollPaddingBlock = 567, kScrollPaddingBlockStart = 568, kScrollPaddingBlockEnd = 569, kScrollPaddingInline = 570, kScrollPaddingInlineStart = 571, kScrollPaddingInlineEnd = 572, kScrollMargin = 573, kScrollMarginTop = 574, kScrollMarginRight = 575, kScrollMarginBottom = 576, kScrollMarginLeft = 577, kScrollMarginBlock = 578, kScrollMarginBlockStart = 579, kScrollMarginBlockEnd = 580, kScrollMarginInline = 581, kScrollMarginInlineStart = 582, kScrollMarginInlineEnd = 583, kScrollSnapStop = 584, kOverscrollBehavior = 585, kOverscrollBehaviorX = 586, kOverscrollBehaviorY = 587, kFontVariantEastAsian = 588, kTextDecorationSkipInk = 589, kScrollCustomization = 590, kRowGap = 591, kGap = 592, kViewportFit = 593, kMarginBlockStart = 594, kMarginBlockEnd = 595, kMarginInlineStart = 596, kMarginInlineEnd = 597, kPaddingBlockStart = 598, kPaddingBlockEnd = 599, kPaddingInlineStart = 600, kPaddingInlineEnd = 601, kBorderBlockEndColor = 602, kBorderBlockEndStyle = 603, kBorderBlockEndWidth = 604, kBorderBlockStartColor = 605, kBorderBlockStartStyle = 606, kBorderBlockStartWidth = 607, kBorderInlineEndColor = 608, kBorderInlineEndStyle = 609, kBorderInlineEndWidth = 610, kBorderInlineStartColor = 611, kBorderInlineStartStyle = 612, kBorderInlineStartWidth = 613, kBorderBlockStart = 614, kBorderBlockEnd = 615, kBorderInlineStart = 616, kBorderInlineEnd = 617, kMarginBlock = 618, kMarginInline = 619, kPaddingBlock = 620, kPaddingInline = 621, kBorderBlockColor = 622, kBorderBlockStyle = 623, kBorderBlockWidth = 624, kBorderInlineColor = 625, kBorderInlineStyle = 626, kBorderInlineWidth = 627, kBorderBlock = 628, kBorderInline = 629, kInsetBlockStart = 630, kInsetBlockEnd = 631, kInsetBlock = 632, kInsetInlineStart = 633, kInsetInlineEnd = 634, kInsetInline = 635, kInset = 636, kColorScheme = 637, kOverflowInline = 638, kOverflowBlock = 639, kForcedColorAdjust = 640, kInherits = 641, kInitialValue = 642, kSyntax = 643, kOverscrollBehaviorInline = 644, kOverscrollBehaviorBlock = 645, kFontOpticalSizing = 647, kContainIntrinsicBlockSize = 648, kContainIntrinsicHeight = 649, kContainIntrinsicInlineSize = 650, kContainIntrinsicSize = 651, kContainIntrinsicWidth = 652, kOriginTrialTestProperty = 654, kMathStyle = 656, kAspectRatio = 657, kAppearance = 658, kRubyPosition = 660, kTextUnderlineOffset = 661, kContentVisibility = 662, kTextDecorationThickness = 663, kPageOrientation = 664, kAnimationTimeline = 665, kCounterSet = 666, kSource = 667, kStart = 668, kEnd = 669, kTimeRange = 670, kScrollbarGutter = 671, kAscentOverride = 672, kDescentOverride = 673, kAdvanceOverride = 674, kLineGapOverride = 675, kMathShift = 676, kMathDepth = 677, kOverflowClipMargin = 679, kScrollbarWidth = 680, kSystem = 681, kNegative = 682, kPrefix = 683, kSuffix = 684, kRange = 685, kPad = 686, kFallback = 687, kSymbols = 688, kAdditiveSymbols = 689, kSpeakAs = 690, kBorderStartStartRadius = 691, kBorderStartEndRadius = 692, kBorderEndStartRadius = 693, kBorderEndEndRadius = 694, kAccentColor = 695, kSizeAdjust = 696, kContainerName = 697, kContainerType = 698, kContainer = 699, kFontSynthesisWeight = 700, kFontSynthesisStyle = 701, kAppRegion = 702, kFontSynthesisSmallCaps = 703, kFontSynthesis = 704, kTextEmphasis = 705, kTextEmphasisColor = 706, kTextEmphasisPosition = 707, kTextEmphasisStyle = 708, kFontPalette = 709, kBasePalette = 710, kOverrideColors = 711, kViewTransitionName = 712, kObjectViewBox = 713, kObjectOverflow = 714, kAnchorName = 719, kPositionFallback = 720, kPopoverShowDelay = 722, kPopoverHideDelay = 723, kHyphenateCharacter = 724, kScrollTimeline = 725, kScrollTimelineName = 726, kScrollTimelineAxis = 727, kViewTimeline = 728, kViewTimelineAxis = 729, kViewTimelineInset = 730, kViewTimelineName = 731, kInitialLetter = 733, kHyphenateLimitChars = 734, kAnimationDelayStart = 735, kAnimationDelayEnd = 736, kFontVariantPosition = 737, kFontVariantAlternates = 738, kBaselineSource = 739, kAnimationRange = 740, kAnimationRangeStart = 741, kAnimationRangeEnd = 742, kAnimationComposition = 743, kTopLayer = 744, kTextWrap = 746, kTextBoxTrim = 747, kOverlay = 748, kWhiteSpaceCollapse = 749, kScrollTimelineAttachment = 750, kViewTimelineAttachment = 751, kScrollStartBlock = 752, kScrollStartInline = 753, kScrollStartX = 754, kScrollStartY = 755, kScrollStart = 756, kScrollInitialTarget = 761, kTimelineScope = 762, kScrollbarColor = 763, kPositionFallbackBounds = 765, kTransitionBehavior = 766, kTextAutospace = 767, kNavigation = 768, kDynamicRangeLimit = 769, kFieldSizing = 770, kTextSpacingTrim = 771, kMaskImage = 772, kMaskClip = 773, kMaskSize = 774, kMaskOrigin = 775, kTextSpacing = 776, kMaskRepeat = 777, kMaskComposite = 778, kMaskPosition = 779, kMaskMode = 780, kViewTransitionClass = 782, kPositionTryOrder = 783, kPositionTry = 785, kTextBoxEdge = 786, kReadingFlow = 787, kPositionAnchor = 788, kPositionVisibility = 789, kTypes = 790, kLineClamp = 791, kFontVariantEmoji = 792, kScrollMarkerGroup = 793, kAnchorScope = 794, kRubyAlign = 795, kBoxDecorationBreak = 796, kPositionTryFallbacks = 797, kInterpolateSize = 798, kViewTransitionGroup = 799, kPositionArea = 800, kTextBox = 801, kTextWrapMode = 805, kTextWrapStyle = 806, kItemTolerance = 808, kCaretAnimation = 809, kInteractivity = 811, kMasonryFill = 812, kMasonryDirection = 813, kMasonryFlow = 814, kResult = 816, kInterestDelayStart = 823, kInterestDelayEnd = 824, kAnimationTriggerRange = 825, kAnimationTriggerExitRange = 826, kInterestDelay = 827, kAnimationTrigger = 828, kColumnRuleBreak = 829, kRowRuleBreak = 830, kCornerBottomLeftShape = 831, kCornerBottomRightShape = 832, kCornerTopLeftShape = 833, kCornerTopRightShape = 834, kCornerStartStartShape = 835, kCornerStartEndShape = 836, kCornerEndStartShape = 837, kCornerEndEndShape = 838, kReadingOrder = 839, kColumnRuleOutset = 840, kRowRuleOutset = 841, kCornerShape = 842, kScrollTargetGroup = 843, kRowRuleStyle = 844, kGapRuleOverlap = 845, kRowRuleWidth = 846, kRowRuleColor = 847, kPrintColorAdjust = 848, kColumnHeight = 849, kColumnWrap = 850, kRuleColor = 851, kRuleWidth = 852, kRuleStyle = 853, kCaretShape = 854, kRowRule = 855, kTextGrow = 856, kTextShrink = 857, kRule = 858, kCornerTopShape = 860, kCornerRightShape = 861, kCornerBottomShape = 862, kCornerLeftShape = 863, kCornerBlockStartShape = 864, kCornerBlockEndShape = 865, kCornerInlineStartShape = 866, kCornerInlineEndShape = 867, kCorners = 868, kBorderShape = 869, kTimelineTriggerName = 871, kTimelineTriggerBehavior = 872, kTimelineTriggerRangeStart = 873, kTimelineTriggerRangeEnd = 874, kTimelineTriggerExitRangeStart = 875, kTimelineTriggerExitRangeEnd = 876, kTimelineTriggerSource = 877, kTimelineTrigger = 878, kMasonry = 879, kContinue = 880, kMaxLines = 881, kBlockEllipsis = 882, kOverscrollArea = 883, kOverscrollPosition = 884, kFontLanguageOverride = 885, kRubyOverhang = 886, kRuleBreak = 887, kRuleOutset = 888, kColumnRuleVisibilityItems = 889, kRowRuleVisibilityItems = 890,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom;l=16" + }, + "blink.mojom.WebFeature": { + "definition": "enum WebFeature { kOBSOLETE_PageDestruction = 0, kWorkerStart = 4, kSharedWorkerStart = 5, kOpenWebDatabase = 10, kUnprefixedRequestAnimationFrame = 13, kPrefixedRequestAnimationFrame = 14, kContentSecurityPolicy = 15, kContentSecurityPolicyReportOnly = 16, kPrefixedTransitionEndEvent = 18, kUnprefixedTransitionEndEvent = 19, kPrefixedAndUnprefixedTransitionEndEvent = 20, kAutoFocusAttribute = 21, kDataListElement = 23, kFormAttribute = 24, kIncrementalAttribute = 25, kInputTypeColor = 26, kInputTypeDate = 27, kInputTypeDateTimeFallback = 29, kInputTypeDateTimeLocal = 30, kInputTypeEmail = 31, kInputTypeMonth = 32, kInputTypeNumber = 33, kInputTypeRange = 34, kInputTypeSearch = 35, kInputTypeTel = 36, kInputTypeTime = 37, kInputTypeURL = 38, kInputTypeWeek = 39, kInputTypeWeekFallback = 40, kListAttribute = 41, kMaxAttribute = 42, kMinAttribute = 43, kPatternAttribute = 44, kPlaceholderAttribute = 45, kPrefixedDirectoryAttribute = 47, kRequiredAttribute = 49, kStepAttribute = 51, kPageVisits = 52, kHTMLMarqueeElement = 53, kReflection = 55, kOBSOLETE_PrefixedStorageInfo = 57, kDeprecatedFlexboxWebContent = 61, kDeprecatedFlexboxChrome = 62, kDeprecatedFlexboxChromeExtension = 63, kWindowEvent = 69, kContentSecurityPolicyWithBaseElement = 70, kDocumentClear = 74, kXMLDocument = 77, kXSLProcessingInstruction = 78, kXSLTProcessor = 79, kSVGSwitchElement = 80, kDocumentAll = 83, kFormElement = 84, kDemotedFormElement = 85, kSVGAnimationElement = 90, kLineClamp = 96, kSubFrameBeforeUnloadRegistered = 97, kSubFrameBeforeUnloadFired = 98, kDocumentCreateAttribute = 111, kDocumentCreateAttributeNS = 112, kDocumentXMLEncoding = 115, kDocumentXMLStandalone = 116, kDocumentXMLVersion = 117, kNavigatorProductSub = 123, kNavigatorVendor = 124, kNavigatorVendorSub = 125, kPrefixedAnimationEndEvent = 128, kUnprefixedAnimationEndEvent = 129, kPrefixedAndUnprefixedAnimationEndEvent = 130, kPrefixedAnimationStartEvent = 131, kUnprefixedAnimationStartEvent = 132, kPrefixedAndUnprefixedAnimationStartEvent = 133, kPrefixedAnimationIterationEvent = 134, kUnprefixedAnimationIterationEvent = 135, kPrefixedAndUnprefixedAnimationIterationEvent = 136, kEventReturnValue = 137, kSVGSVGElement = 138, kDOMSubtreeModifiedEvent = 143, kDOMNodeInsertedEvent = 144, kDOMNodeRemovedEvent = 145, kDOMNodeRemovedFromDocumentEvent = 146, kDOMNodeInsertedIntoDocumentEvent = 147, kDOMCharacterDataModifiedEvent = 148, kPrefixedAudioDecodedByteCount = 164, kPrefixedVideoDecodedByteCount = 165, kPrefixedVideoSupportsFullscreen = 166, kPrefixedVideoDisplayingFullscreen = 167, kPrefixedVideoEnterFullscreen = 168, kPrefixedVideoExitFullscreen = 169, kPrefixedVideoEnterFullScreen = 170, kPrefixedVideoExitFullScreen = 171, kPrefixedVideoDecodedFrameCount = 172, kPrefixedVideoDroppedFrameCount = 173, kPrefixedElementRequestFullscreen = 176, kPrefixedElementRequestFullScreen = 177, kBarPropLocationbar = 178, kBarPropMenubar = 179, kBarPropPersonalbar = 180, kBarPropScrollbars = 181, kBarPropStatusbar = 182, kBarPropToolbar = 183, kInputTypeEmailMultiple = 184, kInputTypeEmailMaxLength = 185, kInputTypeEmailMultipleMaxLength = 186, kInputTypeText = 190, kInputTypeTextMaxLength = 191, kInputTypePassword = 192, kInputTypePasswordMaxLength = 193, kPrefixedPageVisibility = 196, kDocumentBeforeUnloadRegistered = 200, kDocumentBeforeUnloadFired = 201, kDocumentUnloadRegistered = 202, kDocumentUnloadFired = 203, kSVGLocatableNearestViewportElement = 204, kSVGLocatableFarthestViewportElement = 205, kSVGPointMatrixTransform = 209, kDOMFocusInOutEvent = 211, kFileGetLastModifiedDate = 212, kHTMLElementInnerText = 213, kHTMLElementOuterText = 214, kReplaceDocumentViaJavaScriptURL = 215, kElementPrefixedMatchesSelector = 217, kCSSStyleSheetRules = 219, kCSSStyleSheetAddRule = 220, kCSSStyleSheetRemoveRule = 221, kInitMessageEvent = 222, kPrefixedDevicePixelRatioMediaFeature = 233, kPrefixedMaxDevicePixelRatioMediaFeature = 234, kPrefixedMinDevicePixelRatioMediaFeature = 235, kPrefixedTransform3dMediaFeature = 237, kPrefixedStorageQuota = 240, kResetReferrerPolicy = 243, kOBSOLETE_CaseInsensitiveAttrSelectorMatch = 244, kFormNameAccessForImageElement = 246, kFormNameAccessForPastNamesMap = 247, kFormAssociationByParser = 248, kSVGSVGElementInDocument = 250, kSVGDocumentRootElement = 251, kDeprecatedWebKitGradient = 260, kDeprecatedWebKitLinearGradient = 261, kDeprecatedWebKitRepeatingLinearGradient = 262, kDeprecatedWebKitRadialGradient = 263, kDeprecatedWebKitRepeatingRadialGradient = 264, kTextAutosizing = 274, kHTMLAnchorElementPingAttribute = 276, kSVGClassName = 279, kHTMLMediaElementSeekToFragmentStart = 281, kHTMLMediaElementPauseAtFragmentEnd = 282, kOBSOLETE_PrefixedWindowURL = 283, kWindowOrientation = 285, kDocumentCaptureEvents = 287, kDocumentReleaseEvents = 288, kWindowCaptureEvents = 289, kWindowReleaseEvents = 290, kDocumentXPathCreateExpression = 295, kDocumentXPathCreateNSResolver = 296, kDocumentXPathEvaluate = 297, kPrefixedCancelAnimationFrame = 304, kNamedNodeMapGetNamedItem = 306, kNamedNodeMapSetNamedItem = 307, kNamedNodeMapRemoveNamedItem = 308, kNamedNodeMapItem = 309, kNamedNodeMapGetNamedItemNS = 310, kNamedNodeMapSetNamedItemNS = 311, kNamedNodeMapRemoveNamedItemNS = 312, kPrefixedDocumentIsFullscreen = 318, kPrefixedDocumentCurrentFullScreenElement = 320, kPrefixedDocumentCancelFullScreen = 321, kPrefixedDocumentFullscreenEnabled = 322, kPrefixedDocumentFullscreenElement = 323, kPrefixedDocumentExitFullscreen = 324, kSVGForeignObjectElement = 325, kSelectionSetPosition = 327, kAnimationFinishEvent = 328, kSVGSVGElementInXMLDocument = 329, kEventSrcElement = 343, kEventCancelBubble = 344, kOBSOLETE_EventPath = 345, kNodeIteratorDetach = 347, kEventGetReturnValueTrue = 350, kEventGetReturnValueFalse = 351, kEventSetReturnValueTrue = 352, kEventSetReturnValueFalse = 353, kWindowOffscreenBuffering = 356, kWindowDefaultStatus = 357, kWindowDefaultstatus = 358, kPrefixedTransitionEventConstructor = 361, kPrefixedMutationObserverConstructor = 362, kNotificationPermission = 371, kRangeDetach = 372, kPrefixedFileRelativePath = 386, kDocumentCaretRangeFromPoint = 387, kElementScrollIntoViewIfNeeded = 389, kRangeExpand = 393, kHTMLImageElementX = 396, kHTMLImageElementY = 397, kSelectionBaseNode = 400, kSelectionBaseOffset = 401, kSelectionExtentNode = 402, kSelectionExtentOffset = 403, kSelectionType = 404, kSelectionModify = 405, kSelectionSetBaseAndExtent = 406, kSelectionEmpty = 407, kVTTCue = 409, kVTTCueRender = 410, kVTTCueRenderVertical = 411, kVTTCueRenderSnapToLinesFalse = 412, kVTTCueRenderLineNotAuto = 413, kVTTCueRenderPositionNot50 = 414, kVTTCueRenderSizeNot100 = 415, kVTTCueRenderAlignNotCenter = 416, kElementRequestPointerLock = 417, kVTTCueRenderRtl = 418, kPostMessageFromSecureToInsecure = 419, kPostMessageFromInsecureToSecure = 420, kDocumentExitPointerLock = 421, kDocumentPointerLockElement = 422, kPrefixedCursorZoomIn = 424, kPrefixedCursorZoomOut = 425, kTextEncoderConstructor = 429, kTextEncoderEncode = 430, kTextDecoderConstructor = 431, kTextDecoderDecode = 432, kFocusInOutEvent = 433, kMouseEventMovementX = 434, kMouseEventMovementY = 435, kDocumentFonts = 440, kMixedContentFormsSubmitted = 441, kFormsSubmitted = 442, kOBSOLETE_HTMLImports = 455, kOBSOLETE_ElementCreateShadowRoot = 456, kOBSOLETE_DocumentRegisterElement = 457, kEditingAppleInterchangeNewline = 458, kEditingAppleConvertedSpace = 459, kEditingApplePasteAsQuotation = 460, kEditingAppleStyleSpanClass = 461, kOBSOLETE_HTMLImportsAsyncAttribute = 463, kXMLHttpRequestSynchronous = 465, kCSSSelectorPseudoUnresolved = 466, kOBSOLETE_CSSSelectorPseudoShadow = 467, kOBSOLETE_CSSSelectorPseudoContent = 468, kCSSSelectorPseudoHost = 469, kCSSSelectorPseudoHostContext = 470, kOBSOLETE_CSSDeepCombinator = 471, kUseAsm = 473, kDOMWindowOpen = 475, kDOMWindowOpenFeatures = 476, kAspectRatioFlexItem = 479, kDetailsElement = 480, kDialogElement = 481, kMapElement = 482, kMeterElement = 483, kProgressElement = 484, kWheelEventWheelDeltaX = 491, kWheelEventWheelDeltaY = 492, kWheelEventWheelDelta = 493, kSendBeacon = 494, kSendBeaconQuotaExceeded = 495, kSVGSMILElementInDocument = 501, kMouseEventOffsetX = 502, kMouseEventOffsetY = 503, kMouseEventX = 504, kMouseEventY = 505, kMouseEventFromElement = 506, kMouseEventToElement = 507, kRequestFileSystem = 508, kRequestFileSystemWorker = 509, kRequestFileSystemSyncWorker = 510, kSVGStyleElementTitle = 519, kPictureSourceSrc = 520, kPicture = 521, kSizes = 522, kSrcsetXDescriptor = 523, kSrcsetWDescriptor = 524, kSelectionContainsNode = 525, kXMLExternalResourceLoad = 529, kMixedContentPrivateHostnameInPublicHostname = 530, kOBSOLETE_LegacyProtocolEmbeddedAsSubresource = 531, kRequestedSubresourceWithEmbeddedCredentials = 532, kNotificationCreated = 533, kNotificationClosed = 534, kNotificationPermissionRequested = 535, kSRIElementWithMatchingIntegrityAttribute = 540, kSRIElementWithNonMatchingIntegrityAttribute = 541, kSRIElementWithUnparsableIntegrityAttribute = 542, kV8Animation_StartTime_AttributeGetter = 545, kV8Animation_StartTime_AttributeSetter = 546, kV8Animation_CurrentTime_AttributeGetter = 547, kV8Animation_CurrentTime_AttributeSetter = 548, kV8Animation_PlaybackRate_AttributeGetter = 549, kV8Animation_PlaybackRate_AttributeSetter = 550, kV8Animation_PlayState_AttributeGetter = 551, kV8Animation_Finish_Method = 552, kV8Animation_Play_Method = 553, kV8Animation_Pause_Method = 554, kV8Animation_Reverse_Method = 555, kBreakIterator = 556, kScreenOrientationAngle = 557, kScreenOrientationType = 558, kScreenOrientationLock = 559, kScreenOrientationUnlock = 560, kGeolocationSecureOrigin = 561, kGeolocationInsecureOrigin = 562, kNotificationSecureOrigin = 563, kNotificationInsecureOrigin = 564, kNotificationShowEvent = 565, kSVGTransformListConsolidate = 569, kSVGAnimatedTransformListBaseVal = 570, kQuotedAnimationName = 571, kQuotedKeyframesRule = 572, kSrcsetDroppedCandidate = 573, kWindowPostMessage = 574, kRenderRuby = 576, kScriptElementWithInvalidTypeHasSrc = 578, kXMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload = 581, kCSSSelectorPseudoScrollbar = 582, kCSSSelectorPseudoScrollbarButton = 583, kCSSSelectorPseudoScrollbarThumb = 584, kCSSSelectorPseudoScrollbarTrack = 585, kCSSSelectorPseudoScrollbarTrackPiece = 586, kLangAttribute = 587, kLangAttributeOnHTML = 588, kLangAttributeOnBody = 589, kLangAttributeDoesNotMatchToUILocale = 590, kInputTypeSubmit = 591, kInputTypeSubmitWithValue = 592, kSetReferrerPolicy = 593, kTextWholeText = 599, kNotificationCloseEvent = 603, kStyleMedia = 606, kStyleMediaType = 607, kStyleMediaMatchMedium = 608, kMixedContentPresent = 609, kMixedContentBlockable = 610, kMixedContentAudio = 611, kMixedContentDownload = 612, kMixedContentFavicon = 613, kMixedContentImage = 614, kMixedContentInternal = 615, kMixedContentPlugin = 616, kMixedContentPrefetch = 617, kMixedContentVideo = 618, kCSSSelectorPseudoFullScreenAncestor = 628, kCSSSelectorPseudoFullScreen = 629, kWebKitCSSMatrix = 630, kAudioContextCreateAnalyser = 631, kAudioContextCreateBiquadFilter = 632, kAudioContextCreateBufferSource = 633, kAudioContextCreateChannelMerger = 634, kAudioContextCreateChannelSplitter = 635, kAudioContextCreateConvolver = 636, kAudioContextCreateDelay = 637, kAudioContextCreateDynamicsCompressor = 638, kAudioContextCreateGain = 639, kAudioContextCreateMediaElementSource = 640, kAudioContextCreateMediaStreamDestination = 641, kAudioContextCreateMediaStreamSource = 642, kAudioContextCreateOscillator = 643, kAudioContextCreatePeriodicWave = 645, kAudioContextCreateScriptProcessor = 646, kAudioContextCreateStereoPanner = 647, kAudioContextCreateWaveShaper = 648, kAudioContextDecodeAudioData = 649, kAudioContextResume = 650, kAudioContextSuspend = 651, kMixedContentInNonHTTPSFrameThatRestrictsMixedContent = 661, kMixedContentInSecureFrameThatDoesNotRestrictMixedContent = 662, kMixedContentWebSocket = 663, kSyntheticKeyframesInCompositedCSSAnimation = 664, kMixedContentFormPresent = 665, kGetUserMediaInsecureOrigin = 666, kGetUserMediaSecureOrigin = 667, kOBSOLETE_DeviceMotionInsecureOrigin = 668, kDeviceMotionSecureOrigin = 669, kOBSOLETE_DeviceOrientationInsecureOrigin = 670, kDeviceOrientationSecureOrigin = 671, kSandboxViaIFrame = 672, kSandboxViaCSP = 673, kBlockedSniffingImageToScript = 674, kFetch = 675, kFetchBodyStream = 676, kXMLHttpRequestAsynchronous = 677, kWhiteSpacePreFromXMLSpace = 679, kWhiteSpaceNowrapFromXMLSpace = 680, kSVGSVGElementForceRedraw = 685, kSVGSVGElementSuspendRedraw = 686, kSVGSVGElementUnsuspendRedraw = 687, kSVGSVGElementUnsuspendRedrawAll = 688, kAudioContextClose = 689, kCSSZoomNotEqualToOne = 691, kClientRectListItem = 694, kWindowClientInformation = 695, kWindowFind = 696, kWindowScreenLeft = 697, kWindowScreenTop = 698, kV8Animation_Cancel_Method = 699, kV8Animation_Onfinish_AttributeGetter = 700, kV8Animation_Onfinish_AttributeSetter = 701, kV8Window_WebKitAnimationEvent_ConstructorGetter = 707, kCryptoGetRandomValues = 710, kSubtleCryptoEncrypt = 711, kSubtleCryptoDecrypt = 712, kSubtleCryptoSign = 713, kSubtleCryptoVerify = 714, kSubtleCryptoDigest = 715, kSubtleCryptoGenerateKey = 716, kSubtleCryptoImportKey = 717, kSubtleCryptoExportKey = 718, kSubtleCryptoDeriveBits = 719, kSubtleCryptoDeriveKey = 720, kSubtleCryptoWrapKey = 721, kSubtleCryptoUnwrapKey = 722, kCryptoAlgorithmAesCbc = 723, kCryptoAlgorithmHmac = 724, kCryptoAlgorithmRsaSsaPkcs1v1_5 = 725, kCryptoAlgorithmSha1 = 726, kCryptoAlgorithmSha256 = 727, kCryptoAlgorithmSha384 = 728, kCryptoAlgorithmSha512 = 729, kCryptoAlgorithmAesGcm = 730, kCryptoAlgorithmRsaOaep = 731, kCryptoAlgorithmAesCtr = 732, kCryptoAlgorithmAesKw = 733, kCryptoAlgorithmRsaPss = 734, kCryptoAlgorithmEcdsa = 735, kCryptoAlgorithmEcdh = 736, kCryptoAlgorithmHkdf = 737, kCryptoAlgorithmPbkdf2 = 738, kDocumentSetDomain = 739, kUpgradeInsecureRequestsEnabled = 740, kOBSOLETE_UpgradeInsecureRequestsUpgradedRequest = 741, kDocumentDesignMode = 742, kGlobalCacheStorage = 743, kNetInfo = 744, kBackgroundSync = 745, kOBSOLETE_LegacyConst = 748, kV8Permissions_Query_Method = 750, kSVGHrefBaseVal = 758, kSVGHrefAnimVal = 759, kV8CSSRuleList_Item_Method = 760, kV8MediaList_Item_Method = 761, kV8StyleSheetList_Item_Method = 762, kStyleSheetListAnonymousNamedGetter = 763, kAutocapitalizeAttribute = 764, kFullscreenSecureOrigin = 765, kFullscreenInsecureOrigin = 766, kDialogInSandboxedContext = 767, kSVGSMILAnimationInImageRegardlessOfCache = 768, kEncryptedMediaSecureOrigin = 770, kPerformanceFrameTiming = 772, kV8Element_Animate_Method = 773, kV8SVGSVGElement_GetElementById_Method = 778, kV8MessageChannel_Constructor = 780, kV8MessagePort_PostMessage_Method = 781, kV8MessagePort_Start_Method = 782, kV8MessagePort_Close_Method = 783, kMessagePortsTransferred = 784, kCSSKeyframesRuleAnonymousIndexedGetter = 785, kV8Screen_AvailLeft_AttributeGetter = 786, kV8Screen_AvailTop_AttributeGetter = 787, kV8SVGFEConvolveMatrixElement_PreserveAlpha_AttributeGetter = 791, kV8SVGStyleElement_Disabled_AttributeGetter = 798, kV8SVGStyleElement_Disabled_AttributeSetter = 799, kInputTypeFileSecureOrigin = 801, kInputTypeFileInsecureOrigin = 802, kElementAttachShadow = 804, kV8SecurityPolicyViolationEvent_DocumentURI_AttributeGetter = 806, kV8SecurityPolicyViolationEvent_BlockedURI_AttributeGetter = 807, kV8SecurityPolicyViolationEvent_StatusCode_AttributeGetter = 808, kHTMLLinkElementDisabled = 809, kV8HTMLLinkElement_Disabled_AttributeGetter = 810, kV8HTMLLinkElement_Disabled_AttributeSetter = 811, kV8HTMLStyleElement_Disabled_AttributeGetter = 812, kV8HTMLStyleElement_Disabled_AttributeSetter = 813, kV8DOMError_Constructor = 816, kV8DOMError_Name_AttributeGetter = 817, kV8DOMError_Message_AttributeGetter = 818, kTextInputFired = 830, kV8TextEvent_Data_AttributeGetter = 831, kV8TextEvent_InitTextEvent_Method = 832, kClientHintsDPR_DEPRECATED = 835, kClientHintsResourceWidth_DEPRECATED = 836, kClientHintsViewportWidth_DEPRECATED = 837, kSRIElementIntegrityAttributeButIneligible = 838, kFormDataAppendNull = 843, kNonHTMLElementSetAttributeNodeFromHTMLDocumentNameNotLowercase = 845, kNavigatorVibrate = 850, kNavigatorVibrateSubFrame = 851, kV8XPathEvaluator_Constructor = 853, kV8XPathEvaluator_CreateExpression_Method = 854, kV8XPathEvaluator_CreateNSResolver_Method = 855, kV8XPathEvaluator_Evaluate_Method = 856, kRequestMIDIAccess_ObscuredByFootprinting = 857, kV8MouseEvent_LayerX_AttributeGetter = 858, kV8MouseEvent_LayerY_AttributeGetter = 859, kInnerTextWithShadowTree = 860, kSelectionToStringWithShadowTree = 861, kWindowFindWithShadowTree = 862, kV8CompositionEvent_InitCompositionEvent_Method = 863, kV8CustomEvent_InitCustomEvent_Method = 864, kV8DeviceMotionEvent_InitDeviceMotionEvent_Method = 865, kV8DeviceOrientationEvent_InitDeviceOrientationEvent_Method = 866, kV8Event_InitEvent_Method = 867, kV8KeyboardEvent_InitKeyboardEvent_Method = 868, kV8MouseEvent_InitMouseEvent_Method = 869, kOBSOLETE_V8MutationEvent_InitMutationEvent_Method = 870, kV8StorageEvent_InitStorageEvent_Method = 871, kV8UIEvent_InitUIEvent_Method = 873, kRequestFileSystemNonWebbyOrigin = 876, kV8MemoryInfo_TotalJSHeapSize_AttributeGetter = 879, kV8MemoryInfo_UsedJSHeapSize_AttributeGetter = 880, kV8MemoryInfo_JSHeapSizeLimit_AttributeGetter = 881, kV8Performance_Timing_AttributeGetter = 882, kV8Performance_Navigation_AttributeGetter = 883, kV8Performance_Memory_AttributeGetter = 884, kV8SharedWorker_WorkerStart_AttributeGetter = 885, kHTMLMediaElementPreloadNone = 892, kHTMLMediaElementPreloadMetadata = 893, kHTMLMediaElementPreloadAuto = 894, kHTMLMediaElementPreloadDefault = 895, kMixedContentBlockableAllowed = 896, kPseudoBeforeAfterForInputElement = 897, kV8Permissions_Revoke_Method = 898, kLinkRelDnsPrefetch = 899, kLinkRelPreconnect = 900, kLinkRelPreload = 901, kLinkHeaderDnsPrefetch = 902, kLinkHeaderPreconnect = 903, kClientHintsMetaHTTPEquivAcceptCH = 904, kHTMLElementDeprecatedWidth = 905, kClientHintsContentDPR = 906, kElementAttachShadowOpen = 907, kElementAttachShadowClosed = 908, kAudioParamSetValueAtTime = 909, kAudioParamLinearRampToValueAtTime = 910, kAudioParamExponentialRampToValueAtTime = 911, kAudioParamSetTargetAtTime = 912, kAudioParamSetValueCurveAtTime = 913, kAudioParamCancelScheduledValues = 914, kV8Permissions_Request_Method = 915, kLinkRelPrefetch = 917, kLinkRelPrerender = 918, kLinkRelNext = 919, kCSSValuePrefixedMinContent = 921, kCSSValuePrefixedMaxContent = 922, kCSSValuePrefixedFitContent = 923, kCSSValuePrefixedFillAvailable = 924, kPresentationDefaultRequest = 926, kPresentationAvailabilityChangeEventListener = 927, kPresentationRequestConstructor = 928, kPresentationRequestStart = 929, kPresentationRequestReconnect = 930, kPresentationRequestGetAvailability = 931, kPresentationRequestConnectionAvailableEventListener = 932, kPresentationConnectionTerminate = 933, kPresentationConnectionSend = 934, kPresentationConnectionMessageEventListener = 936, kCSSAnimationsStackedNeutralKeyframe = 937, kReadingCheckedInClickHandler = 938, kFlexboxIntrinsicSizeAlgorithmIsDifferent = 939, kOBSOLETE_HTMLImportsHasStyleSheets = 940, kNetInfoType = 946, kNetInfoDownlinkMax = 947, kNetInfoOnChange = 948, kNetInfoOnTypeChange = 949, kV8Window_Alert_Method = 950, kV8Window_Confirm_Method = 951, kV8Window_Prompt_Method = 952, kV8Window_Print_Method = 953, kV8Window_RequestIdleCallback_Method = 954, kFlexboxPercentagePaddingVertical = 955, kFlexboxPercentageMarginVertical = 956, kCredentialManagerGet = 960, kCredentialManagerGetMediationOptional = 961, kCredentialManagerGetMediationSilent = 962, kCredentialManagerStore = 963, kBlockableMixedContentInSubframeBlocked = 966, kCSSAtRuleCharset = 969, kCSSAtRuleFontFace = 970, kCSSAtRuleImport = 971, kCSSAtRuleKeyframes = 972, kCSSAtRuleMedia = 973, kCSSAtRuleNamespace = 974, kCSSAtRulePage = 975, kCSSAtRuleSupports = 976, kCSSAtRuleViewport = 977, kCSSAtRuleWebkitKeyframes = 978, kV8HTMLFieldSetElement_Elements_AttributeGetter = 979, kOBSOLETE_ExternalAddSearchProvider = 981, kOBSOLETE_ExternalIsSearchProviderInstalled = 982, kV8Permissions_RequestAll_Method = 983, kOBSOLETE_DeviceOrientationAbsoluteInsecureOrigin = 987, kDeviceOrientationAbsoluteSecureOrigin = 988, kFontFaceConstructor = 989, kServiceWorkerControlledPage = 990, kMeterElementWithMeterAppearance = 993, kMeterElementWithNoneAppearance = 994, kSelectionAnchorNode = 997, kSelectionAnchorOffset = 998, kSelectionFocusNode = 999, kSelectionFocusOffset = 1000, kSelectionIsCollapsed = 1001, kSelectionRangeCount = 1002, kSelectionGetRangeAt = 1003, kSelectionAddRange = 1004, kSelectionRemoveAllRanges = 1005, kSelectionCollapse = 1006, kSelectionCollapseToStart = 1007, kSelectionCollapseToEnd = 1008, kSelectionExtend = 1009, kSelectionSelectAllChildren = 1010, kSelectionDeleteDromDocument = 1011, kSelectionDOMString = 1012, kInputTypeRangeVerticalAppearance = 1013, kCSSFilterReference = 1014, kCSSFilterGrayscale = 1015, kCSSFilterSepia = 1016, kCSSFilterSaturate = 1017, kCSSFilterHueRotate = 1018, kCSSFilterInvert = 1019, kCSSFilterOpacity = 1020, kCSSFilterBrightness = 1021, kCSSFilterContrast = 1022, kCSSFilterBlur = 1023, kCSSFilterDropShadow = 1024, kBackgroundSyncRegister = 1025, kExecCommandOnInputOrTextarea = 1027, kV8History_ScrollRestoration_AttributeGetter = 1028, kV8History_ScrollRestoration_AttributeSetter = 1029, kObsoleteSVG1DOMFilter = 1030, kOfflineAudioContextStartRendering = 1031, kOfflineAudioContextSuspend = 1032, kOfflineAudioContextResume = 1033, kObsoleteSVG1DOMPaintServer = 1035, kSVGSVGElementFragmentSVGView = 1036, kSVGSVGElementFragmentSVGViewElement = 1037, kPresentationConnectionClose = 1038, kSVG1DOMShape = 1039, kObsoleteSVG1DOMText = 1040, kRTCPeerConnectionConstructorConstraints = 1041, kRTCPeerConnectionConstructorCompliant = 1042, kRTCPeerConnectionCreateOfferLegacyFailureCallback = 1044, kRTCPeerConnectionCreateOfferLegacyConstraints = 1045, kOBSOLETE_RTCPeerConnectionCreateOfferLegacyOfferOptions = 1046, kRTCPeerConnectionCreateOfferLegacyCompliant = 1047, kRTCPeerConnectionCreateAnswerLegacyFailureCallback = 1049, kOBSOLETE_RTCPeerConnectionCreateAnswerLegacyConstraints = 1050, kRTCPeerConnectionCreateAnswerLegacyCompliant = 1051, kRTCPeerConnectionSetLocalDescriptionLegacyNoSuccessCallback = 1052, kRTCPeerConnectionSetLocalDescriptionLegacyNoFailureCallback = 1053, kRTCPeerConnectionSetLocalDescriptionLegacyCompliant = 1054, kRTCPeerConnectionSetRemoteDescriptionLegacyNoSuccessCallback = 1055, kRTCPeerConnectionSetRemoteDescriptionLegacyNoFailureCallback = 1056, kRTCPeerConnectionSetRemoteDescriptionLegacyCompliant = 1057, kRTCPeerConnectionGetStatsLegacyNonCompliant = 1058, kNodeFilterIsFunction = 1059, kNodeFilterIsObject = 1060, kCSSSelectorInternalPseudoListBox = 1062, kCSSSelectorInternalMediaControlsOverlayCastButton = 1064, kCSSSelectorInternalPseudoSpatialNavigationFocus = 1065, kSameOriginTextScript = 1066, kSameOriginApplicationScript = 1067, kSameOriginOtherScript = 1068, kCrossOriginTextScript = 1069, kCrossOriginApplicationScript = 1070, kCrossOriginOtherScript = 1071, kSVG1DOMSVGTests = 1072, kDisableRemotePlaybackAttribute = 1074, kV8SloppyMode = 1075, kV8StrictMode = 1076, kOBSOLETE_V8StrongMode = 1077, kAudioNodeConnectToAudioNode = 1078, kAudioNodeConnectToAudioParam = 1079, kAudioNodeDisconnectFromAudioNode = 1080, kAudioNodeDisconnectFromAudioParam = 1081, kV8CSSFontFaceRule_Style_AttributeGetter = 1082, kSelectionCollapseNull = 1083, kSelectionSetBaseAndExtentNull = 1084, kV8SVGSVGElement_CreateSVGNumber_Method = 1085, kV8SVGSVGElement_CreateSVGLength_Method = 1086, kV8SVGSVGElement_CreateSVGAngle_Method = 1087, kV8SVGSVGElement_CreateSVGPoint_Method = 1088, kV8SVGSVGElement_CreateSVGMatrix_Method = 1089, kV8SVGSVGElement_CreateSVGRect_Method = 1090, kV8SVGSVGElement_CreateSVGTransform_Method = 1091, kV8SVGSVGElement_CreateSVGTransformFromMatrix_Method = 1092, kFormNameAccessForNonDescendantImageElement = 1093, kV8RegExpPrototypeStickyGetter = 1096, kV8RegExpPrototypeToString = 1097, kV8InputDeviceCapabilities_FiresTouchEvents_AttributeGetter = 1098, kDataElement = 1099, kTimeElement = 1100, kSVG1DOMUriReference = 1101, kSVG1DOMZoomAndPan = 1102, kV8SVGGraphicsElement_Transform_AttributeGetter = 1103, kMenuItemElement = 1104, kMenuItemCloseTag = 1105, kSVG1DOMMarkerElement = 1106, kSVG1DOMUseElement = 1107, kSVG1DOMMaskElement = 1108, kV8SVGAElement_Target_AttributeGetter = 1109, kV8SVGClipPathElement_ClipPathUnits_AttributeGetter = 1110, kSVG1DOMFitToViewBox = 1111, kSVG1DOMSVGElement = 1114, kSVG1DOMImageElement = 1115, kSVG1DOMForeignObjectElement = 1116, kAudioContextCreateIIRFilter = 1117, kCSSSelectorPseudoSlotted = 1118, kMediaDevicesEnumerateDevices = 1119, kEventComposedPath = 1123, kLinkHeaderPreload = 1124, kMouseWheelEvent = 1125, kWheelEvent = 1126, kMouseWheelAndWheelEvent = 1127, kBodyScrollsInAdditionToViewport = 1128, kDocumentDesignModeEnabeld = 1129, kContentEditableTrue = 1130, kContentEditableTrueOnHTML = 1131, kContentEditablePlainTextOnly = 1132, kV8RegExpPrototypeUnicodeGetter = 1133, kOBSOLETE_V8IntlV8Parse = 1134, kOBSOLETE_V8IntlPattern = 1135, kOBSOLETE_V8IntlResolved = 1136, kOBSOLETE_V8PromiseChain = 1137, kOBSOLETE_V8PromiseAccept = 1138, kOBSOLETE_V8PromiseDefer = 1139, kEventComposed = 1140, kGeolocationInsecureOriginIframe = 1141, kGeolocationSecureOriginIframe = 1142, kRequestMIDIAccessIframe_ObscuredByFootprinting = 1143, kGetUserMediaInsecureOriginIframe = 1144, kGetUserMediaSecureOriginIframe = 1145, kElementRequestPointerLockIframe = 1146, kNotificationAPIInsecureOriginIframe = 1147, kNotificationAPISecureOriginIframe = 1148, kWebSocket = 1149, kMediaStreamConstraintsNameValue = 1150, kOBSOLETE_MediaStreamConstraintsFromDictionary = 1151, kMediaStreamConstraintsConformant = 1152, kCSSSelectorIndirectAdjacent = 1153, kCreateImageBitmap = 1156, kPresentationConnectionConnectEventListener = 1157, kPresentationConnectionCloseEventListener = 1158, kPresentationConnectionTerminateEventListener = 1159, kDocumentCreateEventAnimationEvent = 1162, kDocumentCreateEventBeforeUnloadEvent = 1166, kDocumentCreateEventCompositionEvent = 1168, kDocumentCreateEventDragEvent = 1169, kDocumentCreateEventErrorEvent = 1170, kDocumentCreateEventFocusEvent = 1171, kDocumentCreateEventHashChangeEvent = 1172, kOBSOLETE_DocumentCreateEventMutationEvent = 1173, kDocumentCreateEventPageTransitionEvent = 1174, kDocumentCreateEventPopStateEvent = 1176, kDocumentCreateEventTextEvent = 1182, kDocumentCreateEventTransitionEvent = 1183, kDocumentCreateEventWheelEvent = 1184, kDocumentCreateEventTrackEvent = 1186, kOBSOLETE_DocumentCreateEventMutationEvents = 1188, kDocumentCreateEventSVGEvents = 1190, kDocumentCreateEventDeviceMotionEvent = 1195, kDocumentCreateEventDeviceOrientationEvent = 1196, kDocumentCreateEventIDBVersionChangeEvent = 1201, kDocumentCreateEventStorageEvent = 1221, kDocumentCreateEventWebGLContextEvent = 1224, kDocumentCreateEventCloseEvent = 1227, kDocumentCreateEventKeyboardEvents = 1228, kHTMLMediaElement = 1229, kHTMLMediaElementInDocument = 1230, kHTMLMediaElementControlsAttribute = 1231, kV8Animation_Oncancel_AttributeGetter = 1233, kV8Animation_Oncancel_AttributeSetter = 1234, kV8HTMLCommentInExternalScript = 1235, kV8HTMLComment = 1236, kV8SloppyModeBlockScopedFunctionRedefinition = 1237, kV8ForInInitializer = 1238, kV8Animation_Id_AttributeGetter = 1239, kV8Animation_Id_AttributeSetter = 1240, kOBSOLETE_ApplicationCacheManifestSelectInsecureOrigin = 1245, kOBSOLETE_ApplicationCacheManifestSelectSecureOrigin = 1246, kOBSOLETE_ApplicationCacheAPIInsecureOrigin = 1247, kOBSOLETE_ApplicationCacheAPISecureOrigin = 1248, kCSSAtRuleApply = 1249, kCSSSelectorPseudoAny = 1250, kHTMLLabelElementControlForNonFormAssociatedElement = 1263, kHTMLMediaElementLoadNetworkEmptyNotPaused = 1265, kV8Window_WebkitSpeechGrammar_ConstructorGetter = 1267, kV8Window_WebkitSpeechGrammarList_ConstructorGetter = 1268, kV8Window_WebkitSpeechRecognition_ConstructorGetter = 1269, kV8Window_WebkitSpeechRecognitionError_ConstructorGetter = 1270, kV8Window_WebkitSpeechRecognitionEvent_ConstructorGetter = 1271, kV8Window_SpeechSynthesis_AttributeGetter = 1272, kV8IDBFactory_WebkitGetDatabaseNames_Method = 1273, kScriptPassesCSPDynamic = 1275, kCSPWithStrictDynamic = 1277, kScrollAnchored = 1278, kSVGCalcModeDiscrete = 1287, kSVGCalcModeLinear = 1288, kSVGCalcModePaced = 1289, kSVGCalcModeSpline = 1290, kFormSubmissionStarted = 1291, kFormValidationStarted = 1292, kFormValidationAbortedSubmission = 1293, kFormValidationShowedMessage = 1294, kV8Document_Images_AttributeGetter = 1297, kV8Document_Embeds_AttributeGetter = 1298, kV8Document_Plugins_AttributeGetter = 1299, kV8Document_Links_AttributeGetter = 1300, kV8Document_Forms_AttributeGetter = 1301, kV8Document_Scripts_AttributeGetter = 1302, kV8Document_Anchors_AttributeGetter = 1303, kV8Document_Applets_AttributeGetter = 1304, kMediaStreamTrackRemote = 1306, kV8Node_IsConnected_AttributeGetter = 1307, kShadowRootDelegatesFocus = 1308, kOBSOLETE_MixedShadowRootV0AndV1 = 1309, kFileAPINativeLineEndings = 1320, kPointerEventAttributeCount = 1321, kCompositedReplication = 1322, kV8DataTransferItem_WebkitGetAsEntry_Method = 1325, kV8HTMLInputElement_WebkitEntries_AttributeGetter = 1326, kEntry_Filesystem_AttributeGetter_IsolatedFileSystem = 1327, kEntry_GetMetadata_Method_IsolatedFileSystem = 1328, kEntry_MoveTo_Method_IsolatedFileSystem = 1329, kEntry_CopyTo_Method_IsolatedFileSystem = 1330, kEntry_Remove_Method_IsolatedFileSystem = 1331, kEntry_GetParent_Method_IsolatedFileSystem = 1332, kEntry_ToURL_Method_IsolatedFileSystem = 1333, kDuring_Microtask_Alert = 1334, kDuring_Microtask_Confirm = 1335, kDuring_Microtask_Print = 1336, kDuring_Microtask_Prompt = 1337, kDuring_Microtask_SyncXHR = 1338, kCredentialManagerGetReturnedCredential = 1342, kGeolocationInsecureOriginDeprecatedNotRemoved = 1343, kGeolocationInsecureOriginIframeDeprecatedNotRemoved = 1344, kProgressElementWithNoneAppearance = 1345, kProgressElementWithProgressBarAppearance = 1346, kPointerEventAddListenerCount = 1347, kCSSValueAppearanceNone = 1351, kCSSValueAppearanceNotNone = 1352, kCSSValueAppearanceOthers = 1353, kCSSValueAppearanceButton = 1354, kCSSValueAppearanceCheckbox = 1356, kCSSValueAppearanceMenulist = 1357, kCSSValueAppearanceMenulistButton = 1358, kCSSValueAppearanceListbox = 1359, kCSSValueAppearanceRadio = 1360, kCSSValueAppearanceSearchField = 1361, kCSSValueAppearanceTextField = 1362, kAudioContextCreatePannerAutomated = 1363, kPannerNodeSetPosition = 1364, kPannerNodeSetOrientation = 1365, kAudioListenerSetPosition = 1366, kAudioListenerSetOrientation = 1367, kIntersectionObserver_Constructor = 1368, kDurableStoragePersist = 1369, kDurableStoragePersisted = 1370, kDurableStorageEstimate = 1371, kOBSOLETE_CSSDeepCombinatorAndShadow = 1375, kOpacityWithPreserve3DQuirk = 1376, kCSSSelectorPseudoReadOnly = 1377, kCSSSelectorPseudoReadWrite = 1378, kCSSSelectorPseudoDefined = 1383, kRTCPeerConnectionAddIceCandidatePromise = 1384, kRTCPeerConnectionAddIceCandidateLegacy = 1385, kRTCIceCandidateDefaultSdpMLineIndex = 1386, kMediaStreamConstraintsOldAndNew = 1389, kOBSOLETE_V8ArrayProtectorDirtied = 1390, kV8ArraySpeciesModified = 1391, kV8ArrayPrototypeConstructorModified = 1392, kOBSOLETE_V8ArrayInstanceProtoModified = 1393, kV8ArrayInstanceConstructorModified = 1394, kOBSOLETE_V8LegacyFunctionDeclaration = 1395, kOBSOLETE_V8RegExpPrototypeSourceGetter = 1396, kOBSOLETE_V8RegExpPrototypeOldFlagGetter = 1397, kV8DecimalWithLeadingZeroInStrictMode = 1398, kGetUserMediaPrefixed = 1400, kGetUserMediaLegacy = 1401, kGetUserMediaPromise = 1402, kCSSFilterFunctionNoArguments = 1403, kV8LegacyDateParser = 1404, kOpenSearchInsecureOriginInsecureTarget = 1405, kOpenSearchInsecureOriginSecureTarget = 1406, kOpenSearchSecureOriginInsecureTarget = 1407, kOpenSearchSecureOriginSecureTarget = 1408, kRegisterProtocolHandlerSecureOrigin = 1409, kRegisterProtocolHandlerInsecureOrigin = 1410, kCrossOriginWindowAlert = 1411, kCrossOriginWindowConfirm = 1412, kOBSOLETE_CrossOriginWindowPrompt = 1413, kCrossOriginWindowPrint = 1414, kMediaStreamOnActive = 1415, kMediaStreamOnInactive = 1416, kAddEventListenerPassiveTrue = 1417, kAddEventListenerPassiveFalse = 1418, kCSPReferrerDirective = 1419, kElementRequestPointerLockInShadow = 1421, kShadowRootPointerLockElement = 1422, kOBSOLETE_DocumentPointerLockElementInV0Shadow = 1423, kTextAreaMaxLength = 1424, kTextAreaMinLength = 1425, kTopNavigationFromSubFrame = 1426, kPrefixedElementRequestFullscreenInShadow = 1427, kMediaSourceAbortRemove = 1428, kMediaSourceDurationTruncatingBuffered = 1429, kAudioContextCrossOriginIframe = 1430, kOBSOLETE_PointerEventSetCapture = 1431, kOBSOLETE_PointerEventDispatch = 1432, kMIDIMessageEventReceivedTime = 1433, kV8MediaStream_Active_AttributeGetter = 1435, kBeforeInstallPromptEvent = 1436, kBeforeInstallPromptEventUserChoice = 1437, kBeforeInstallPromptEventPreventDefault = 1438, kBeforeInstallPromptEventPrompt = 1439, kExecCommandAltersHTMLStructure = 1440, kSecureContextCheckPassed = 1441, kSecureContextCheckFailed = 1442, kSecureContextCheckForSandboxedOriginPassed = 1443, kSecureContextCheckForSandboxedOriginFailed = 1444, kV8DefineGetterOrSetterWouldThrow = 1445, kV8FunctionConstructorReturnedUndefined = 1446, kV8BroadcastChannel_Constructor = 1447, kV8BroadcastChannel_PostMessage_Method = 1448, kV8BroadcastChannel_Close_Method = 1449, kTouchStartFired = 1450, kMouseDownFired = 1451, kPointerDownFired = 1452, kPointerDownFiredForTouch = 1453, kOBSOLETE_PointerEventDispatchPointerDown = 1454, kSVGSMILBeginOrEndEventValue = 1455, kSVGSMILBeginOrEndSyncbaseValue = 1456, kSVGSMILElementInsertedAfterLoad = 1457, kV8VisualViewport_OffsetLeft_AttributeGetter = 1458, kV8VisualViewport_OffsetTop_AttributeGetter = 1459, kV8VisualViewport_PageLeft_AttributeGetter = 1460, kV8VisualViewport_PageTop_AttributeGetter = 1461, kV8VisualViewport_Width_AttributeGetter = 1462, kV8VisualViewport_Height_AttributeGetter = 1463, kV8VisualViewport_Scale_AttributeGetter = 1464, kVisualViewportScrollFired = 1465, kVisualViewportResizeFired = 1466, kNodeGetRootNode = 1467, kSlotChangeEventAddListener = 1468, kCSSValueAppearanceButtonForButton = 1471, kCSSValueAppearanceButtonForOtherButtons = 1472, kCSSValueAppearanceTextFieldForSearch = 1474, kCSSValueAppearanceTextFieldForTextField = 1475, kRTCPeerConnectionGetStats = 1476, kSVGSMILAnimationAppliedEffect = 1477, kPerformanceResourceTimingSizes = 1478, kEventSourceDocument = 1479, kEventSourceWorker = 1480, kSingleOriginInTimingAllowOrigin = 1481, kMultipleOriginsInTimingAllowOrigin = 1482, kStarInTimingAllowOrigin = 1483, kSVGSMILAdditiveAnimation = 1484, kOBSOLETE_SendBeaconWithNonSimpleContentType = 1485, kChromeLoadTimesRequestTime = 1486, kChromeLoadTimesStartLoadTime = 1487, kChromeLoadTimesCommitLoadTime = 1488, kChromeLoadTimesFinishDocumentLoadTime = 1489, kChromeLoadTimesFinishLoadTime = 1490, kChromeLoadTimesFirstPaintTime = 1491, kChromeLoadTimesFirstPaintAfterLoadTime = 1492, kChromeLoadTimesNavigationType = 1493, kChromeLoadTimesWasFetchedViaSpdy = 1494, kChromeLoadTimesWasNpnNegotiated = 1495, kChromeLoadTimesNpnNegotiatedProtocol = 1496, kChromeLoadTimesWasAlternateProtocolAvailable = 1497, kChromeLoadTimesConnectionInfo = 1498, kChromeLoadTimesUnknown = 1499, kSVGViewElement = 1500, kWebShareShare = 1501, kAuxclickAddListenerCount = 1502, kHTMLCanvasElement = 1503, kSVGSMILAnimationElementTiming = 1504, kSVGSMILBeginEndAnimationElement = 1505, kSVGSMILPausing = 1506, kSVGSMILCurrentTime = 1507, kHTMLBodyElementOnSelectionChangeAttribute = 1508, kUsbGetDevices = 1519, kUsbRequestDevice = 1520, kUsbDeviceOpen = 1521, kUsbDeviceClose = 1522, kUsbDeviceSelectConfiguration = 1523, kUsbDeviceClaimInterface = 1524, kUsbDeviceReleaseInterface = 1525, kUsbDeviceSelectAlternateInterface = 1526, kUsbDeviceControlTransferIn = 1527, kUsbDeviceControlTransferOut = 1528, kUsbDeviceClearHalt = 1529, kUsbDeviceTransferIn = 1530, kUsbDeviceTransferOut = 1531, kUsbDeviceIsochronousTransferIn = 1532, kUsbDeviceIsochronousTransferOut = 1533, kUsbDeviceReset = 1534, kPointerEnterLeaveFired = 1535, kPointerOverOutFired = 1536, kDraggableAttribute = 1539, kCleanScriptElementWithNonce = 1540, kPotentiallyInjectedScriptElementWithNonce = 1541, kPendingStylesheetAddedAfterBodyStarted = 1542, kUntrustedMouseDownEventDispatchedToSelect = 1543, kBlockedSniffingAudioToScript = 1544, kBlockedSniffingVideoToScript = 1545, kBlockedSniffingCSVToScript = 1546, kMetaRefresh = 1548, kMetaRefreshWhenCSPBlocksInlineScript = 1550, kMiddleClickAutoscrollStart = 1551, kRTCPeerConnectionCreateOfferOptionsOfferToReceive = 1553, kDragAndDropScrollStart = 1554, kPresentationConnectionListConnectionAvailableEventListener = 1555, kWebAudioAutoplayCrossOriginIframe = 1556, kVRGetDisplays = 1558, kXSSAuditorBlockedScript = 1581, kXSSAuditorBlockedEntirePage = 1582, kXSSAuditorDisabled = 1583, kXSSAuditorEnabledFilter = 1584, kXSSAuditorEnabledBlock = 1585, kXSSAuditorInvalid = 1586, kTextInputEventOnInput = 1589, kTextInputEventOnTextArea = 1590, kTextInputEventOnContentEditable = 1591, kTextInputEventOnNotNode = 1592, kWebkitBeforeTextInsertedOnInput = 1593, kWebkitBeforeTextInsertedOnTextArea = 1594, kWebkitBeforeTextInsertedOnContentEditable = 1595, kWebkitBeforeTextInsertedOnNotNode = 1596, kWebkitEditableContentChangedOnInput = 1597, kWebkitEditableContentChangedOnTextArea = 1598, kWebkitEditableContentChangedOnContentEditable = 1599, kWebkitEditableContentChangedOnNotNode = 1600, kV8NavigatorUserMediaError_ConstraintName_AttributeGetter = 1601, kV8HTMLMediaElement_SrcObject_AttributeGetter = 1602, kV8HTMLMediaElement_SrcObject_AttributeSetter = 1603, kCreateObjectURLBlob = 1604, kCreateObjectURLMediaSource = 1605, kCreateObjectURLMediaStream = 1606, kLongTaskObserver = 1615, kCSSOffsetInEffect = 1617, kVRGetDisplaysInsecureOrigin = 1618, kVRRequestPresent = 1619, kVRRequestPresentInsecureOrigin = 1620, kVRDeprecatedFieldOfView = 1621, kVideoInCanvas = 1622, kHiddenAutoplayedVideoInCanvas = 1623, kOffscreenCanvas = 1624, kGamepadPose = 1625, kGamepadHand = 1626, kGamepadDisplayId = 1627, kGamepadButtonTouched = 1628, kGamepadPoseHasOrientation = 1629, kGamepadPoseHasPosition = 1630, kGamepadPosePosition = 1631, kGamepadPoseLinearVelocity = 1632, kGamepadPoseLinearAcceleration = 1633, kGamepadPoseOrientation = 1634, kGamepadPoseAngularVelocity = 1635, kGamepadPoseAngularAcceleration = 1636, kV8RTCDataChannel_MaxRetransmitTime_AttributeGetter = 1638, kV8RTCDataChannel_MaxRetransmits_AttributeGetter = 1639, kV8RTCDataChannel_Reliable_AttributeGetter = 1640, kV8RTCPeerConnection_AddStream_Method = 1641, kV8RTCPeerConnection_CreateDTMFSender_Method = 1642, kV8RTCPeerConnection_GetLocalStreams_Method = 1643, kV8RTCPeerConnection_GetRemoteStreams_Method = 1644, kV8RTCPeerConnection_RemoveStream_Method = 1646, kRTCPeerConnectionCreateDataChannelMaxRetransmitTime = 1648, kRTCPeerConnectionCreateDataChannelMaxRetransmits = 1649, kAudioContextCreateConstantSource = 1650, kWebAudioConstantSourceNode = 1651, kBlinkMacSystemFont = 1654, kRTCIceServerURL = 1656, kRTCIceServerURLs = 1657, kOffscreenCanvasTransferToImageBitmap2D = 1658, kOffscreenCanvasTransferToImageBitmapWebGL = 1659, kOBSOLETE_OffscreenCanvasCommit2D = 1660, kOBSOLETE_OffscreenCanvasCommitWebGL = 1661, kRTCConfigurationIceTransportPolicy = 1662, kRTCConfigurationIceTransports = 1664, kOBSOLETE_DocumentFullscreenElementInV0Shadow = 1665, kScriptWithCSPBypassingSchemeParserInserted = 1666, kScriptWithCSPBypassingSchemeNotParserInserted = 1667, kDocumentCreateElement2ndArgStringHandling = 1668, kV8MediaRecorder_Start_Method = 1669, kWebBluetoothRequestDevice = 1670, kUnitlessPerspectiveInPerspectiveProperty = 1671, kUnitlessPerspectiveInTransformProperty = 1672, kV8RTCSessionDescription_Type_AttributeGetter = 1673, kV8RTCSessionDescription_Type_AttributeSetter = 1674, kV8RTCSessionDescription_Sdp_AttributeGetter = 1675, kV8RTCSessionDescription_Sdp_AttributeSetter = 1676, kRTCSessionDescriptionInitNoType = 1677, kRTCSessionDescriptionInitNoSdp = 1678, kHTMLMediaElementPreloadForcedMetadata = 1679, kGenericSensorStart = 1680, kGenericSensorStop = 1681, kTouchEventPreventedNoTouchAction = 1682, kTouchEventPreventedForcedDocumentPassiveNoTouchAction = 1683, kV8Event_StopPropagation_Method = 1684, kV8Event_StopImmediatePropagation_Method = 1685, kImageCaptureConstructor = 1686, kV8Document_RootScroller_AttributeGetter = 1687, kV8Document_RootScroller_AttributeSetter = 1688, kCustomElementRegistryDefine = 1689, kLinkHeaderServiceWorker = 1690, kCSSFlexibleBox = 1692, kCSSGridLayout = 1693, kFullscreenAllowedByOrientationChange = 1696, kServiceWorkerRespondToNavigationRequestWithRedirectedResponse = 1697, kV8AudioContext_Constructor = 1698, kV8OfflineAudioContext_Constructor = 1699, kAppInstalledEventAddListener = 1700, kAudioContextGetOutputTimestamp = 1701, kV8MediaStreamAudioDestinationNode_Constructor = 1702, kV8AnalyserNode_Constructor = 1703, kV8AudioBuffer_Constructor = 1704, kV8AudioBufferSourceNode_Constructor = 1705, kV8AudioProcessingEvent_Constructor = 1706, kV8BiquadFilterNode_Constructor = 1707, kV8ChannelMergerNode_Constructor = 1708, kV8ChannelSplitterNode_Constructor = 1709, kV8ConstantSourceNode_Constructor = 1710, kV8ConvolverNode_Constructor = 1711, kV8DelayNode_Constructor = 1712, kV8DynamicsCompressorNode_Constructor = 1713, kV8GainNode_Constructor = 1714, kV8IIRFilterNode_Constructor = 1715, kV8MediaElementAudioSourceNode_Constructor = 1716, kV8MediaStreamAudioSourceNode_Constructor = 1717, kV8OfflineAudioCompletionEvent_Constructor = 1718, kV8OscillatorNode_Constructor = 1719, kV8PannerNode_Constructor = 1720, kV8PeriodicWave_Constructor = 1721, kV8StereoPannerNode_Constructor = 1722, kV8WaveShaperNode_Constructor = 1723, kV8Headers_GetAll_Method = 1724, kNavigatorVibrateEngagementNone = 1725, kNavigatorVibrateEngagementMinimal = 1726, kNavigatorVibrateEngagementLow = 1727, kNavigatorVibrateEngagementMedium = 1728, kNavigatorVibrateEngagementHigh = 1729, kNavigatorVibrateEngagementMax = 1730, kAlertEngagementNone = 1731, kAlertEngagementMinimal = 1732, kAlertEngagementLow = 1733, kAlertEngagementMedium = 1734, kAlertEngagementHigh = 1735, kAlertEngagementMax = 1736, kConfirmEngagementNone = 1737, kConfirmEngagementMinimal = 1738, kConfirmEngagementLow = 1739, kConfirmEngagementMedium = 1740, kConfirmEngagementHigh = 1741, kConfirmEngagementMax = 1742, kPromptEngagementNone = 1743, kPromptEngagementMinimal = 1744, kPromptEngagementLow = 1745, kPromptEngagementMedium = 1746, kPromptEngagementHigh = 1747, kPromptEngagementMax = 1748, kTopNavInSandbox = 1749, kTopNavInSandboxWithoutGesture = 1750, kTopNavInSandboxWithPerm = 1751, kTopNavInSandboxWithPermButNoGesture = 1752, kReferrerPolicyHeader = 1753, kHTMLAnchorElementReferrerPolicyAttribute = 1754, kHTMLIFrameElementReferrerPolicyAttribute = 1755, kHTMLImageElementReferrerPolicyAttribute = 1756, kHTMLLinkElementReferrerPolicyAttribute = 1757, kBaseElement = 1758, kBaseWithCrossOriginHref = 1759, kBaseWithDataHref = 1760, kBaseWithNewlinesInTarget = 1761, kBaseWithOpenBracketInTarget = 1762, kOBSOLETE_BaseWouldBeBlockedByDefaultSrc = 1763, kV8AssigmentExpressionLHSIsCallInSloppy = 1764, kV8AssigmentExpressionLHSIsCallInStrict = 1765, kV8PromiseConstructorReturnedUndefined = 1766, kFormSubmittedWithUnclosedFormControl = 1767, kScrollbarUseVerticalScrollbarButton = 1777, kScrollbarUseVerticalScrollbarTrack = 1779, kScrollbarUseHorizontalScrollbarButton = 1780, kScrollbarUseHorizontalScrollbarTrack = 1782, kHTMLTableCellElementColspan = 1783, kOBSOLETE_HTMLTableCellElementColspanGreaterThan1000 = 1784, kOBSOLETE_HTMLTableCellElementColspanGreaterThan8190 = 1785, kOBSOLETE_SelectionAddRangeIntersect = 1786, kPostMessageFromInsecureToSecureToplevel = 1787, kV8MediaSession_Metadata_AttributeGetter = 1788, kV8MediaSession_Metadata_AttributeSetter = 1789, kV8MediaSession_PlaybackState_AttributeGetter = 1790, kV8MediaSession_PlaybackState_AttributeSetter = 1791, kV8MediaSession_SetActionHandler_Method = 1792, kAudioParamCancelAndHoldAtTime = 1797, kCSSValueUserModifyReadOnly = 1798, kCSSValueUserModifyReadWrite = 1799, kCSSValueUserModifyReadWritePlaintextOnly = 1800, kCSSValueOnDemand = 1802, kServiceWorkerNavigationPreload = 1803, kFullscreenRequestWithPendingElement = 1804, kHTMLIFrameElementAllowfullscreenAttributeSetAfterContentLoad = 1805, kOBSOLETE_PointerEventSetCaptureOutsideDispatch = 1806, kNotificationPermissionRequestedInsecureOrigin = 1807, kV8DeprecatedStorageInfo_QueryUsageAndQuota_Method = 1808, kV8DeprecatedStorageInfo_RequestQuota_Method = 1809, kV8DeprecatedStorageQuota_QueryUsageAndQuota_Method = 1810, kV8DeprecatedStorageQuota_RequestQuota_Method = 1811, kV8FileReaderSync_Constructor = 1812, kV8HTMLVideoElement_Poster_AttributeGetter = 1815, kV8HTMLVideoElement_Poster_AttributeSetter = 1816, kNotificationPermissionRequestedIframe = 1817, kRtcpMuxPolicyNegotiate = 1823, kDOMClobberedWindowPropertyAccessed = 1824, kHTMLDocumentCreateProcessingInstruction = 1825, kFetchResponseConstructionWithStream = 1826, kLocationOrigin = 1827, kCanvas2DFilter = 1830, kOBSOLETE_Canvas2DImageSmoothingQuality = 1831, kCanvasToBlob = 1832, kCanvasToDataURL = 1833, kOffscreenCanvasConvertToBlob = 1834, kSVGInCanvas2D = 1835, kSVGInWebGL = 1836, kSelectionFuncionsChangeFocus = 1837, kHTMLObjectElementGetter = 1838, kHTMLObjectElementSetter = 1839, kHTMLEmbedElementGetter = 1840, kHTMLEmbedElementSetter = 1841, kTransformUsesBoxSizeOnSVG = 1842, kScrollByKeyboardArrowKeys = 1843, kScrollByKeyboardPageUpDownKeys = 1844, kScrollByKeyboardHomeEndKeys = 1845, kScrollByKeyboardSpacebarKey = 1846, kScrollByTouch = 1847, kScrollByWheel = 1848, kScheduledActionIgnored = 1849, kGetCanvas2DContextAttributes = 1850, kV8HTMLInputElement_Capture_AttributeGetter = 1851, kV8HTMLInputElement_Capture_AttributeSetter = 1852, kHTMLMediaElementControlsListAttribute = 1853, kHTMLMediaElementControlsListNoDownload = 1854, kHTMLMediaElementControlsListNoFullscreen = 1855, kHTMLMediaElementControlsListNoRemotePlayback = 1856, kPointerEventClickRetargetCausedByCapture = 1857, kVRDisplayDisplayName = 1861, kVREyeParametersOffset = 1862, kVRPoseLinearVelocity = 1863, kVRPoseLinearAcceleration = 1864, kVRPoseAngularVelocity = 1865, kVRPoseAngularAcceleration = 1866, kCSSOverflowPaged = 1867, kOBSOLETE_HTMLTableElementPresentationAttributeBackground = 1869, kV8Navigator_GetInstalledRelatedApps_Method = 1870, kNamedAccessOnWindow_ChildBrowsingContext = 1871, kNamedAccessOnWindow_ChildBrowsingContext_CrossOriginNameMismatch = 1872, kV0CustomElementsRegisterHTMLCustomTag = 1873, kV0CustomElementsRegisterHTMLTypeExtension = 1874, kV0CustomElementsRegisterSVGElement = 1875, kV0CustomElementsCreateCustomTagElement = 1877, kV0CustomElementsCreateTypeExtensionElement = 1878, kV0CustomElementsConstruct = 1879, kWebBluetoothRemoteCharacteristicGetDescriptor = 1882, kWebBluetoothRemoteCharacteristicGetDescriptors = 1883, kWebBluetoothRemoteCharacteristicReadValue = 1884, kWebBluetoothRemoteCharacteristicWriteValue = 1885, kWebBluetoothRemoteCharacteristicStartNotifications = 1886, kWebBluetoothRemoteCharacteristicStopNotifications = 1887, kWebBluetoothRemoteDescriptorReadValue = 1888, kWebBluetoothRemoteDescriptorWriteValue = 1889, kWebBluetoothRemoteServerConnect = 1890, kWebBluetoothRemoteServerDisconnect = 1891, kWebBluetoothRemoteServerGetPrimaryService = 1892, kWebBluetoothRemoteServerGetPrimaryServices = 1893, kWebBluetoothRemoteServiceGetCharacteristic = 1894, kWebBluetoothRemoteServiceGetCharacteristics = 1895, kOBSOLETE_HTMLContentElement = 1896, kOBSOLETE_HTMLShadowElement = 1897, kHTMLSlotElement = 1898, kAccelerometerConstructor = 1899, kAbsoluteOrientationSensorConstructor = 1900, kAmbientLightSensorConstructor = 1901, kGenericSensorOnActivate = 1902, kGenericSensorOnChange = 1903, kGenericSensorOnError = 1904, kGenericSensorActivated = 1905, kGyroscopeConstructor = 1906, kMagnetometerConstructor = 1907, kOrientationSensorPopulateMatrix = 1908, kWindowOpenWithInvalidURL = 1909, kCrossOriginMainFrameNulledNameAccessed = 1910, kMenuItemElementIconAttribute = 1911, kWebkitCSSMatrixSetMatrixValue = 1912, kWebkitCSSMatrixConstructFromString = 1913, kCanRequestURLHTTPContainingNewline = 1914, kGetGamepads = 1916, kMediaStreamConstraintsAudio = 1918, kMediaStreamConstraintsAudioUnconstrained = 1919, kMediaStreamConstraintsVideo = 1920, kMediaStreamConstraintsVideoUnconstrained = 1921, kMediaStreamConstraintsWidth = 1922, kMediaStreamConstraintsHeight = 1923, kMediaStreamConstraintsAspectRatio = 1924, kMediaStreamConstraintsFrameRate = 1925, kMediaStreamConstraintsFacingMode = 1926, kMediaStreamConstraintsVolume = 1927, kMediaStreamConstraintsSampleRate = 1928, kMediaStreamConstraintsSampleSize = 1929, kMediaStreamConstraintsEchoCancellation = 1930, kMediaStreamConstraintsLatency = 1931, kMediaStreamConstraintsChannelCount = 1932, kMediaStreamConstraintsDeviceIdAudio = 1933, kMediaStreamConstraintsDeviceIdVideo = 1934, kMediaStreamConstraintsDisableLocalEcho = 1935, kMediaStreamConstraintsGroupIdAudio = 1936, kMediaStreamConstraintsGroupIdVideo = 1937, kOBSOLETE_MediaStreamConstraintsVideoKind = 1938, kMediaStreamConstraintsMediaStreamSourceAudio = 1943, kMediaStreamConstraintsMediaStreamSourceVideo = 1944, kMediaStreamConstraintsRenderToAssociatedSink = 1945, kMediaStreamConstraintsHotwordEnabled = 1946, kOBSOLETE_MediaStreamConstraintsGoogEchoCancellation = 1947, kOBSOLETE_MediaStreamConstraintsGoogExperimentalEchoCancellation = 1948, kMediaStreamConstraintsAutoGainControl = 1949, kOBSOLETE_MediaStreamConstraintsGoogExperimentalAutoGainControl = 1950, kMediaStreamConstraintsNoiseSuppression = 1951, kOBSOLETE_MediaStreamConstraintsGoogHighpassFilter = 1952, kOBSOLETE_MediaStreamConstraintsGoogTypingNoiseDetection = 1953, kOBSOLETE_MediaStreamConstraintsGoogExperimentalNoiseSuppression = 1954, kOBSOLETE_MediaStreamConstraintsGoogBeamforming = 1955, kOBSOLETE_MediaStreamConstraintsGoogArrayGeometry = 1956, kOBSOLETE_MediaStreamConstraintsGoogAudioMirroring = 1957, kOBSOLETE_MediaStreamConstraintsGoogDAEchoCancellation = 1958, kMediaStreamConstraintsGoogNoiseReduction = 1959, kViewportFixedPositionUnderFilter = 1961, kRequestMIDIAccessWithSysExOption_ObscuredByFootprinting = 1962, kRequestMIDIAccessIframeWithSysExOption_ObscuredByFootprinting = 1963, kGamepadAxes = 1964, kGamepadButtons = 1965, kOBSOLETE_DispatchMouseEventOnDisabledFormControl = 1967, kElementNameDOMInvalidHTMLParserValid = 1968, kElementNameDOMValidHTMLParserInvalid = 1969, kGATTServerDisconnectedEvent = 1970, kAnchorClickDispatchForNonConnectedNode = 1971, kHTMLParseErrorNestedForm = 1972, kFontShapingNotDefGlyphObserved = 1973, kOBSOLETE_PostMessageOutgoingWouldBeBlockedByConnectSrc = 1974, kOBSOLETE_PostMessageIncomingWouldBeBlockedByConnectSrc = 1975, kCrossOriginPropertyAccess = 1977, kCrossOriginPropertyAccessFromOpener = 1978, kCredentialManagerCreate = 1979, kFieldEditInSecureContext = 1981, kFieldEditInNonSecureContext = 1982, kCredentialManagerGetMediationRequired = 1984, kNetInfoRtt = 1989, kNetInfoDownlink = 1990, kOBSOLETE_ShapeDetection_BarcodeDetectorConstructor = 1991, kOBSOLETE_ShapeDetection_FaceDetectorConstructor = 1992, kOBSOLETE_ShapeDetection_TextDetectorConstructor = 1993, kInertAttribute = 1995, kPluginInstanceAccessFromIsolatedWorld = 1996, kPluginInstanceAccessFromMainWorld = 1997, kShowModalForElementInFullscreenStack = 2000, kThreeValuedPositionBackground = 2001, kUnitlessZeroAngleFilter = 2007, kUnitlessZeroAngleGradient = 2008, kUnitlessZeroAngleTransform = 2010, kCredentialManagerPreventSilentAccess = 2012, kNetInfoEffectiveType = 2013, kV8SpeechRecognition_Start_Method = 2014, kTableRowDirectionDifferentFromTable = 2015, kTableSectionDirectionDifferentFromTable = 2016, kClientHintsDeviceMemory_DEPRECATED = 2017, kCSSRegisterProperty = 2018, kRelativeOrientationSensorConstructor = 2019, kOBSOLETE_kSmoothScrollJSInterventionActivated = 2020, kBudgetAPIGetCost = 2021, kBudgetAPIGetBudget = 2022, kCrossOriginMainFrameNulledNonEmptyNameAccessed = 2023, kDocumentDomainSetWithNonDefaultPort = 2025, kDocumentDomainSetWithDefaultPort = 2026, kFeaturePolicyHeader = 2027, kFeaturePolicyAllowAttribute = 2028, kMIDIPortOpen = 2029, kMIDIOutputSend = 2030, kMIDIMessageEvent = 2031, kFetchEventIsReload = 2032, kServiceWorkerClientFrameType = 2033, kQuirksModeDocument = 2034, kLimitedQuirksModeDocument = 2035, kEncryptedMediaCrossOriginIframe = 2036, kCSSSelectorWebkitMediaControls = 2037, kCSSSelectorWebkitMediaControlsOverlayEnclosure = 2038, kCSSSelectorWebkitMediaControlsOverlayPlayButton = 2039, kCSSSelectorWebkitMediaControlsEnclosure = 2040, kCSSSelectorWebkitMediaControlsPanel = 2041, kCSSSelectorWebkitMediaControlsPlayButton = 2042, kCSSSelectorWebkitMediaControlsCurrentTimeDisplay = 2043, kCSSSelectorWebkitMediaControlsTimeRemainingDisplay = 2044, kCSSSelectorWebkitMediaControlsTimeline = 2045, kCSSSelectorWebkitMediaControlsTimelineContainer = 2046, kCSSSelectorWebkitMediaControlsMuteButton = 2047, kCSSSelectorWebkitMediaControlsVolumeSlider = 2048, kCSSSelectorWebkitMediaControlsFullscreenButton = 2049, kCSSSelectorWebkitMediaControlsToggleClosedCaptionsButton = 2050, kLinearAccelerationSensorConstructor = 2051, kReportUriMultipleEndpoints = 2052, kReportUriSingleEndpoint = 2053, kOBSOLETE_V8ConstructorNonUndefinedPrimitiveReturn = 2054, kMediaSourceKeyframeTimeGreaterThanDependant = 2060, kMediaSourceMuxedSequenceMode = 2061, kPrepareModuleScript = 2062, kPresentationRequestStartSecureOrigin = 2063, kPresentationRequestStartInsecureOrigin = 2064, kPersistentClientHintHeader = 2065, kStyleSheetListNonNullAnonymousNamedGetter = 2066, kARIAActiveDescendantAttribute = 2069, kARIAAtomicAttribute = 2070, kARIAAutocompleteAttribute = 2071, kARIABusyAttribute = 2072, kARIACheckedAttribute = 2073, kARIAColCountAttribute = 2074, kARIAColIndexAttribute = 2075, kARIAColSpanAttribute = 2076, kARIAControlsAttribute = 2077, kARIACurrentAttribute = 2078, kARIADescribedByAttribute = 2079, kARIADetailsAttribute = 2080, kARIADisabledAttribute = 2081, kARIADropEffectAttribute = 2082, kARIAErrorMessageAttribute = 2083, kARIAExpandedAttribute = 2084, kARIAFlowToAttribute = 2085, kARIAGrabbedAttribute = 2086, kARIAHasPopupAttribute = 2087, kARIAHiddenAttribute = 2089, kARIAInvalidAttribute = 2090, kARIAKeyShortcutsAttribute = 2091, kARIALabelAttribute = 2092, kARIALabeledByAttribute = 2093, kARIALabelledByAttribute = 2094, kARIALevelAttribute = 2095, kARIALiveAttribute = 2096, kARIAModalAttribute = 2097, kARIAMultilineAttribute = 2098, kARIAMultiselectableAttribute = 2099, kARIAOrientationAttribute = 2100, kARIAOwnsAttribute = 2101, kARIAPlaceholderAttribute = 2102, kARIAPosInSetAttribute = 2103, kARIAPressedAttribute = 2104, kARIAReadOnlyAttribute = 2105, kARIARelevantAttribute = 2106, kARIARequiredAttribute = 2107, kARIARoleDescriptionAttribute = 2108, kARIARowCountAttribute = 2109, kARIARowIndexAttribute = 2110, kARIARowSpanAttribute = 2111, kARIASelectedAttribute = 2112, kARIASetSizeAttribute = 2113, kARIASortAttribute = 2114, kARIAValueMaxAttribute = 2115, kARIAValueMinAttribute = 2116, kARIAValueNowAttribute = 2117, kARIAValueTextAttribute = 2118, kOBSOLETE_V8LabeledExpressionStatement = 2119, kNavigatorDeviceMemory = 2121, kFixedWidthTableDistributionChanged = 2122, kWebkitBoxLayout = 2123, kWebkitBoxLayoutHorizontal = 2124, kWebkitBoxLayoutVertical = 2125, kWebkitBoxAlignNotInitial = 2126, kWebkitBoxDirectionNotInitial = 2127, kWebkitBoxLinesNotInitial = 2128, kWebkitBoxPackNotInitial = 2129, kWebkitBoxChildFlexNotInitial = 2130, kWebkitBoxChildFlexGroupNotInitial = 2131, kWebkitBoxChildOrdinalGroupNotInitial = 2132, kWebkitBoxNotDefaultOrder = 2133, kWebkitBoxNoChildren = 2134, kWebkitBoxOneChild = 2135, kWebkitBoxOneChildIsLayoutBlockFlowInline = 2136, kWebkitBoxManyChildren = 2137, kWebkitBoxLineClamp = 2138, kWebkitBoxLineClampPercentage = 2139, kWebkitBoxLineClampNoChildren = 2140, kWebkitBoxLineClampOneChild = 2141, kWebkitBoxLineClampOneChildIsLayoutBlockFlowInline = 2142, kWebkitBoxLineClampManyChildren = 2143, kWebkitBoxLineClampDoesSomething = 2144, kFeaturePolicyAllowAttributeDeprecatedSyntax = 2145, kSuppressHistoryEntryWithoutUserGesture = 2146, kPerformanceServerTiming = 2157, kAnimationSetPlaybackRateCompensatorySeek = 2162, kOBSOLETE_DeepCombinatorInStaticProfile = 2163, kOBSOLETE_PseudoShadowInStaticProfile = 2164, kSchemeBypassesCSP = 2165, kInnerSchemeBypassesCSP = 2166, kSameOriginApplicationOctetStream = 2167, kSameOriginApplicationXml = 2168, kSameOriginTextHtml = 2169, kSameOriginTextPlain = 2170, kSameOriginTextXml = 2171, kCrossOriginApplicationOctetStream = 2172, kCrossOriginApplicationXml = 2173, kCrossOriginTextHtml = 2174, kCrossOriginTextPlain = 2175, kCrossOriginTextXml = 2176, kPerformanceObserverForWindow = 2188, kPerformanceObserverForWorker = 2189, kPaintTimingObserved = 2190, kPaintTimingRequested = 2191, kHTMLMediaElementMediaPlaybackRateOutOfRange = 2192, kCookieSet = 2194, kCookieGet = 2195, kGeolocationDisabledByFeaturePolicy = 2196, kEncryptedMediaDisabledByFeaturePolicy = 2197, kBatteryStatusGetBattery = 2198, kOBSOLETE_BatteryStatusInsecureOrigin = 2199, kBatteryStatusCrossOrigin = 2200, kBatteryStatusSameOriginABA = 2201, kOBSOLETE_HasIDClassTagAttribute = 2203, kHasBeforeOrAfterPseudoElement = 2204, kShapeOutsideMaybeAffectedInlineSize = 2205, kShapeOutsideMaybeAffectedInlinePosition = 2206, kGamepadVibrationActuator = 2207, kMicrophoneDisabledByFeaturePolicyEstimate = 2208, kCameraDisabledByFeaturePolicyEstimate = 2209, kMidiDisabledByFeaturePolicy = 2210, kGeolocationGetCurrentPosition = 2214, kGeolocationWatchPosition = 2215, kNetInfoSaveData = 2217, kV8Element_GetClientRects_Method = 2218, kV8Element_GetBoundingClientRect_Method = 2219, kV8Range_GetClientRects_Method = 2220, kV8Range_GetBoundingClientRect_Method = 2221, kV8ErrorCaptureStackTrace = 2222, kV8ErrorPrepareStackTrace = 2223, kV8ErrorStackTraceLimit = 2224, kPaintWorklet = 2225, kDocumentPageHideRegistered = 2226, kDocumentPageHideFired = 2227, kDocumentPageShowRegistered = 2228, kDocumentPageShowFired = 2229, kReplaceCharsetInXHR = 2230, kLinkRelModulePreload = 2232, kCSPWithUnsafeEval = 2236, kWebAssemblyInstantiation = 2237, kV8IndexAccessor = 2238, kV8MediaCapabilities_DecodingInfo_Method = 2239, kV8MediaCapabilities_EncodingInfo_Method = 2240, kV8MediaCapabilitiesInfo_Supported_AttributeGetter = 2241, kV8MediaCapabilitiesInfo_Smooth_AttributeGetter = 2242, kV8MediaCapabilitiesInfo_PowerEfficient_AttributeGetter = 2243, kOBSOLETE_WindowEventInV0ShadowTree = 2244, kWindowOpenRealmMismatch = 2247, kGridRowTrackPercentIndefiniteHeight = 2248, kVRGetDisplaysSupportsPresent = 2249, kDuplicatedAttribute = 2250, kDuplicatedAttributeForExecutedScript = 2251, kV8RTCPeerConnection_GetSenders_Method = 2252, kV8RTCPeerConnection_GetReceivers_Method = 2253, kV8RTCPeerConnection_AddTrack_Method = 2254, kV8RTCPeerConnection_RemoveTrack_Method = 2255, kLocalCSSFile = 2256, kLocalCSSFileExtensionRejected = 2257, kUserMediaDisableHardwareNoiseSuppression = 2258, kCertificateTransparencyRequiredErrorOnResourceLoad = 2259, kCSSSelectorPseudoWebkitAnyLink = 2260, kAudioWorkletAddModule = 2261, kAudioWorkletGlobalScopeRegisterProcessor = 2262, kAudioWorkletNodeConstructor = 2263, kHTMLMediaElementEmptyLoadWithFutureData = 2264, kCSSValueDisplayContents = 2265, kCSSSelectorPseudoAnyLink = 2266, kFileAccessedCache = 2267, kFileAccessedCookies = 2268, kFileAccessedDatabase = 2269, kFileAccessedFileSystem = 2270, kFileAccessedLocalStorage = 2271, kFileAccessedLocks = 2272, kFileAccessedServiceWorker = 2273, kFileAccessedSessionStorage = 2274, kFileAccessedSharedWorker = 2275, kV8MediaKeys_GetStatusForPolicy_Method = 2276, kV8DeoptimizerDisableSpeculation = 2277, kCSSSelectorCue = 2278, kCSSSelectorWebkitCalendarPickerIndicator = 2279, kCSSSelectorWebkitClearButton = 2280, kCSSSelectorWebkitColorSwatch = 2281, kCSSSelectorWebkitColorSwatchWrapper = 2282, kCSSSelectorWebkitDateAndTimeValue = 2283, kCSSSelectorWebkitDatetimeEdit = 2284, kCSSSelectorWebkitDatetimeEditAmpmField = 2285, kCSSSelectorWebkitDatetimeEditDayField = 2286, kCSSSelectorWebkitDatetimeEditFieldsWrapper = 2287, kCSSSelectorWebkitDatetimeEditHourField = 2288, kCSSSelectorWebkitDatetimeEditMillisecondField = 2289, kCSSSelectorWebkitDatetimeEditMinuteField = 2290, kCSSSelectorWebkitDatetimeEditMonthField = 2291, kCSSSelectorWebkitDatetimeEditSecondField = 2292, kCSSSelectorWebkitDatetimeEditText = 2293, kCSSSelectorWebkitDatetimeEditWeekField = 2294, kCSSSelectorWebkitDatetimeEditYearField = 2295, kCSSSelectorWebkitFileUploadButton = 2297, kCSSSelectorWebkitInnerSpinButton = 2298, kCSSSelectorWebkitInputPlaceholder = 2299, kCSSSelectorWebkitMediaSliderContainer = 2300, kCSSSelectorWebkitMediaSliderThumb = 2301, kCSSSelectorWebkitMediaTextTrackContainer = 2302, kCSSSelectorWebkitMediaTextTrackDisplay = 2303, kCSSSelectorWebkitMediaTextTrackRegion = 2304, kCSSSelectorWebkitMediaTextTrackRegionContainer = 2305, kCSSSelectorWebkitMeterBar = 2306, kCSSSelectorWebkitMeterEvenLessGoodValue = 2307, kCSSSelectorWebkitMeterInnerElement = 2308, kCSSSelectorWebkitMeterOptimumValue = 2309, kCSSSelectorWebkitMeterSuboptimumValue = 2310, kCSSSelectorWebkitProgressBar = 2311, kCSSSelectorWebkitProgressInnerElement = 2312, kCSSSelectorWebkitProgressValue = 2313, kCSSSelectorWebkitSearchCancelButton = 2314, kCSSSelectorWebkitSliderContainer = 2315, kCSSSelectorWebkitSliderRunnableTrack = 2316, kCSSSelectorWebkitSliderThumb = 2317, kCSSSelectorWebkitTextfieldDecorationContainer = 2318, kCSSSelectorWebkitUnknownPseudo = 2319, kFilterAsContainingBlockMayChangeOutput = 2320, kOBSOLETE_DispatchMouseUpDownEventOnDisabledFormControl = 2321, kCSSSelectorPseudoIs = 2322, kV8RTCRtpSender_ReplaceTrack_Method = 2323, kInputTypeFileSecureOriginOpenChooser = 2324, kInputTypeFileInsecureOriginOpenChooser = 2325, kBasicShapeEllipseNoRadius = 2326, kBasicShapeEllipseTwoRadius = 2328, kTemporalInputTypeChooserByTrustedClick = 2329, kTemporalInputTypeChooserByUntrustedClick = 2330, kTemporalInputTypeIgnoreUntrustedClick = 2331, kColorInputTypeChooserByTrustedClick = 2332, kColorInputTypeChooserByUntrustedClick = 2333, kCSSTypedOMStylePropertyMap = 2334, kRTCPeerConnectionWithActiveCsp = 2346, kImageDecodingAttribute = 2347, kImageDecodeAPI = 2348, kV8HTMLElement_Autocapitalize_AttributeGetter = 2349, kV8HTMLElement_Autocapitalize_AttributeSetter = 2350, kCSSLegacyAlignment = 2351, kOBSOLETE_SRISignatureCheck = 2352, kOBSOLETE_SRISignatureSuccess = 2353, kCSSBasicShape = 2354, kCSSGradient = 2355, kCSSPaintFunction = 2356, kWebkitCrossFade = 2357, kDisablePictureInPictureAttribute = 2358, kOBSOLETE_CertificateTransparencyNonCompliantSubresourceInMainFrame = 2359, kOBSOLETE_CertificateTransparencyNonCompliantResourceInSubframe = 2360, kV8AbortController_Constructor = 2361, kReplaceCharsetInXHRIgnoringCase = 2362, kHTMLIFrameElementGestureMedia = 2363, kWorkletAddModule = 2364, kAnimationWorkletRegisterAnimator = 2365, kWorkletAnimationConstructor = 2366, kScrollTimelineConstructor = 2367, kAsyncClipboardAPIRead = 2369, kAsyncClipboardAPIWrite = 2370, kAsyncClipboardAPIReadText = 2371, kAsyncClipboardAPIWriteText = 2372, kOpenerNavigationWithoutGesture = 2373, kV8LockManager_Request_Method = 2375, kV8LockManager_Query_Method = 2376, kV8RTCDTMFSender_Track_AttributeGetter = 2378, kV8RTCDTMFSender_Duration_AttributeGetter = 2379, kV8RTCDTMFSender_InterToneGap_AttributeGetter = 2380, kV8RTCRtpSender_Dtmf_AttributeGetter = 2381, kRTCConstraintEnableDtlsSrtpTrue = 2382, kRTCConstraintEnableDtlsSrtpFalse = 2383, kDeprecatedRtcPeerConnectionId = 2384, kV8PaintWorkletGlobalScope_RegisterPaint_Method = 2385, kV8PaintWorkletGlobalScope_DevicePixelRatio_AttributeGetter = 2386, kCSSSelectorPseudoFocus = 2387, kCSSSelectorPseudoFocusVisible = 2388, kDistrustedLegacySymantecSubresource = 2389, kVRDisplayGetFrameData = 2390, kXMLHttpRequestResponseXML = 2391, kMessagePortTransferClosedPort = 2392, kRTCLocalSdpModification = 2393, kKeyboardApiLock = 2394, kKeyboardApiUnlock = 2395, kPPAPIURLRequestStreamToFile = 2396, kPaymentHandler = 2397, kPaymentRequestShowWithoutGesture = 2398, kReadableStreamConstructor = 2399, kWritableStreamConstructor = 2400, kTransformStreamConstructor = 2401, kNegativeBackgroundSize = 2402, kNegativeMaskSize = 2403, kClientHintsRtt_DEPRECATED = 2404, kClientHintsDownlink_DEPRECATED = 2405, kClientHintsEct_DEPRECATED = 2406, kCrossOriginHTMLIFrameElementContentDocument = 2407, kCrossOriginHTMLIFrameElementGetSVGDocument = 2408, kCrossOriginHTMLEmbedElementGetSVGDocument = 2409, kCrossOriginHTMLFrameElementContentDocument = 2410, kCrossOriginHTMLObjectElementContentDocument = 2411, kCrossOriginHTMLObjectElementGetSVGDocument = 2412, kNavigatorXR = 2413, kXRRequestDevice = 2414, kXRRequestSession = 2415, kXRSupportsSession = 2416, kXRSessionGetInputSources = 2417, kCSSResizeAuto = 2418, kPrefixedCursorGrab = 2419, kPrefixedCursorGrabbing = 2420, kCredentialManagerCreatePublicKeyCredential = 2421, kCredentialManagerGetPublicKeyCredential = 2422, kCredentialManagerMakePublicKeyCredentialSuccess = 2423, kCredentialManagerGetPublicKeyCredentialSuccess = 2424, kShapeOutsideContentBox = 2425, kShapeOutsidePaddingBox = 2426, kShapeOutsideBorderBox = 2427, kShapeOutsideMarginBox = 2428, kPerformanceTimeline = 2429, kUserTiming = 2430, kCSSSelectorPseudoWhere = 2431, kKeyboardApiGetLayoutMap = 2432, kPerformanceResourceTimingInitiatorType = 2434, kV8ArraySortNoElementsProtector = 2436, kOBSOLETE_V8ArrayPrototypeSortJSArrayModifiedPrototype = 2437, kV8Document_PictureInPictureEnabled_AttributeGetter = 2438, kV8Document_PictureInPictureElement_AttributeGetter = 2439, kV8Document_ExitPictureInPicture_Method = 2440, kV8ShadowRoot_PictureInPictureElement_AttributeGetter = 2441, kV8HTMLVideoElement_DisablePictureInPicture_AttributeGetter = 2442, kV8HTMLVideoElement_DisablePictureInPicture_AttributeSetter = 2443, kV8HTMLVideoElement_RequestPictureInPicture_Method = 2444, kEnterPictureInPictureEventListener = 2445, kLeavePictureInPictureEventListener = 2446, kV8PictureInPictureWindow_Height_AttributeGetter = 2447, kV8PictureInPictureWindow_Width_AttributeGetter = 2448, kPictureInPictureWindowResizeEventListener = 2449, kV8CookieStore_Delete_Method = 2450, kV8CookieStore_Get_Method = 2451, kV8CookieStore_GetAll_Method = 2452, kV8CookieStore_GetChangeSubscriptions_Method = 2453, kV8CookieStore_Has_Method = 2454, kV8CookieStore_Set_Method = 2455, kV8CookieStore_SubscribeToChanges_Method = 2456, kV8CookieChangeEvent_Changed_AttributeGetter = 2457, kV8CookieChangeEvent_Deleted_AttributeGetter = 2458, kV8ExtendableCookieChangeEvent_Changed_AttributeGetter = 2459, kV8ExtendableCookieChangeEvent_Deleted_AttributeGetter = 2460, kShapeOutsideContentBoxDifferentFromMarginBox = 2461, kShapeOutsidePaddingBoxDifferentFromMarginBox = 2462, kDeprecatedCSSContainLayoutPositionedDescendants = 2463, kCanvasConvertToBlob = 2465, kPolymerV1Detected = 2466, kPolymerV2Detected = 2467, kPerformanceEventTimingBuffer = 2468, kPerformanceEventTimingConstructor = 2469, kReverseIterateDOMStorage = 2470, kTextToSpeech_Speak = 2471, kTextToSpeech_SpeakCrossOrigin = 2472, kTextToSpeech_SpeakDisallowedByAutoplay = 2473, kStaleWhileRevalidateEnabled = 2474, kMediaElementSourceOnOfflineContext = 2475, kOBSOLETE_MediaStreamDestinationOnOfflineContext = 2476, kOBSOLETE_MediaStreamSourceOnOfflineContext = 2477, kRTCDataChannelInitMaxRetransmitTime = 2478, kRTCPeerConnectionCreateDataChannelMaxPacketLifeTime = 2479, kV8SpeechGrammarList_AddFromUri_Method = 2480, kV8SpeechSynthesis_Speak_Method = 2483, kLegacySymantecCertMainFrameResource = 2484, kLegacySymantecCertInSubresource = 2485, kLegacySymantecCertInSubframeMainResource = 2486, kEventTimingExplicitlyRequested = 2487, kCSSEnvironmentVariable = 2488, kCSSEnvironmentVariable_SafeAreaInsetTop = 2489, kCSSEnvironmentVariable_SafeAreaInsetLeft = 2490, kCSSEnvironmentVariable_SafeAreaInsetBottom = 2491, kCSSEnvironmentVariable_SafeAreaInsetRight = 2492, kMediaControlsDisplayCutoutGesture = 2493, kDocumentOpenTwoArgs = 2494, kDocumentOpenTwoArgsWithReplace = 2495, kDocumentOpenThreeArgs = 2496, kV8FunctionTokenOffsetTooLongForToString = 2497, kServiceWorkerImportScriptNotInstalled = 2498, kNestedDedicatedWorker = 2499, kOBSOLETE_ClientHintsMetaAcceptCHLifetime = 2500, kCSSFillAvailableLogicalWidth = 2507, kCSSFillAvailableLogicalHeight = 2508, kPopupOpenWhileFileChooserOpened = 2509, kCookieStoreAPI = 2510, kFeaturePolicyJSAPI = 2511, kV8RTCPeerConnection_GetTransceivers_Method = 2512, kV8RTCPeerConnection_AddTransceiver_Method = 2513, kV8RTCRtpTransceiver_Direction_AttributeGetter = 2514, kV8RTCRtpTransceiver_Direction_AttributeSetter = 2515, kHTMLLinkElementDisabledByParser = 2516, kRequestIsHistoryNavigation = 2517, kAddDocumentLevelPassiveTrueWheelEventListener = 2518, kAddDocumentLevelPassiveFalseWheelEventListener = 2519, kAddDocumentLevelPassiveDefaultWheelEventListener = 2520, kDocumentLevelPassiveDefaultEventListenerPreventedWheel = 2521, kOBSOLETE_ShapeDetectionAPI = 2522, kV8SourceBuffer_ChangeType_Method = 2523, kPPAPIWebSocket = 2524, kV8MediaStreamTrack_ContentHint_AttributeGetter = 2525, kV8MediaStreamTrack_ContentHint_AttributeSetter = 2526, kV8IDBFactory_Open_Method = 2527, kReportingObserver = 2529, kDeprecationReport = 2530, kInterventionReport = 2531, kV8WasmSharedMemory = 2532, kV8WasmThreadOpcodes = 2533, kFeaturePolicyReport = 2536, kV8Window_WebkitRTCPeerConnection_ConstructorGetter = 2537, kV8Window_WebkitMediaStream_ConstructorGetter = 2538, kTextEncoderStreamConstructor = 2539, kTextDecoderStreamConstructor = 2540, kSignedExchangeInnerResponse = 2541, kPaymentAddressLanguageCode = 2542, kDocumentDomainBlockedCrossOriginAccess = 2543, kDocumentDomainEnabledCrossOriginAccess = 2544, kSerialGetPorts = 2545, kSerialRequestPort = 2546, kSerialPortOpen = 2547, kSerialPortClose = 2548, kBackgroundFetchManagerFetch = 2549, kBackgroundFetchManagerGet = 2550, kBackgroundFetchManagerGetIds = 2551, kBackgroundFetchRegistrationAbort = 2552, kBackgroundFetchRegistrationMatch = 2553, kBackgroundFetchRegistrationMatchAll = 2554, kFormDisabledAttributePresent = 2557, kFormDisabledAttributePresentAndSubmit = 2558, kCSSValueAppearanceCheckboxRendered = 2559, kCSSValueAppearanceRadioRendered = 2561, kCSSValueAppearanceInnerSpinButtonRendered = 2563, kCSSValueAppearanceMenuListRendered = 2565, kCSSValueAppearanceProgressBarRendered = 2567, kCSSValueAppearanceSliderHorizontalRendered = 2568, kCSSValueAppearanceSliderVerticalRendered = 2570, kCSSValueAppearanceSliderThumbHorizontalRendered = 2572, kCSSValueAppearanceSliderThumbVerticalRendered = 2574, kCSSValueAppearanceSearchFieldRendered = 2576, kCSSValueAppearanceSearchCancelRendered = 2578, kCSSValueAppearanceTextAreaRendered = 2580, kCSSValueAppearanceMenuListButtonRendered = 2582, kCSSValueAppearancePushButtonRendered = 2584, kCSSValueAppearanceSquareButtonRendered = 2586, kCursorImageLE32x32 = 2589, kCursorImageGT32x32 = 2590, kOBSOLETE_RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics = 2591, kResizeObserver_Constructor = 2592, kCollator = 2593, kNumberFormat = 2594, kDateTimeFormat = 2595, kPluralRules = 2596, kRelativeTimeFormat = 2597, kLocale = 2598, kListFormat = 2599, kSegmenter = 2600, kStringLocaleCompare = 2601, kOBSOLETE_StringToLocaleUpperCase = 2602, kStringToLocaleLowerCase = 2603, kNumberToLocaleString = 2604, kDateToLocaleString = 2605, kDateToLocaleDateString = 2606, kDateToLocaleTimeString = 2607, kMalformedCSP = 2608, kV8AttemptOverrideReadOnlyOnPrototypeSloppy = 2609, kV8AttemptOverrideReadOnlyOnPrototypeStrict = 2610, kHTMLCanvasElementLowLatency = 2611, kOBSOLETE_V8OptimizedFunctionWithOneShotBytecode = 2612, kSVGGeometryPropertyHasNonZeroUnitlessValue = 2613, kCSSValueAppearanceNoImplementationSkipBorder = 2614, kInstantiateModuleScript = 2615, kDynamicImportModuleScript = 2616, kHistoryPushState = 2617, kHistoryReplaceState = 2618, kGetDisplayMedia = 2619, kCursorImageGT64x64 = 2620, kAdClick = 2621, kUpdateWithoutShippingOptionOnShippingAddressChange = 2622, kUpdateWithoutShippingOptionOnShippingOptionChange = 2623, kCSSSelectorEmptyWhitespaceOnlyFail = 2624, kActivatedImplicitRootScroller = 2625, kCSSUnknownNamespacePrefixInSelector = 2626, kPageLifeCycleFreeze = 2627, kOBSOLETE_DefaultInCustomIdent = 2628, kHTMLAnchorElementHrefTranslateAttribute = 2629, kWebKitUserModifyEffective = 2630, kPlainTextEditingEffective = 2631, kOBSOLETE_LegacyTLSVersionInMainFrameResource = 2634, kOBSOLETE_LegacyTLSVersionInSubresource = 2635, kOBSOLETE_LegacyTLSVersionInSubframeMainResource = 2636, kRTCMaxAudioBufferSize = 2637, kWebKitUserModifyReadWriteEffective = 2638, kWebKitUserModifyReadOnlyEffective = 2639, kWebKitUserModifyPlainTextEffective = 2640, kCSSAtRuleFontFeatureValues = 2641, kFlexboxSingleLineAlignContent = 2642, kSignedExchangeInnerResponseInMainFrame = 2643, kSignedExchangeInnerResponseInSubFrame = 2644, kV8IDBFactory_Databases_Method = 2648, kOpenerNavigationDownloadCrossOrigin = 2649, kV8RegExpMatchIsTrueishOnNonJSRegExp = 2650, kV8RegExpMatchIsFalseishOnJSRegExp = 2651, kDownloadInAdFrameWithoutUserGesture = 2653, kNavigatorAppVersion = 2654, kNavigatorDoNotTrack = 2655, kNavigatorHardwareConcurrency = 2656, kNavigatorLanguage = 2657, kNavigatorLanguages = 2658, kNavigatorMaxTouchPoints = 2659, kNavigatorMimeTypes = 2660, kNavigatorPlatform = 2661, kNavigatorPlugins = 2662, kNavigatorUserAgent = 2663, kWebBluetoothRequestScan = 2664, kV8SVGGeometryElement_IsPointInFill_Method = 2665, kV8SVGGeometryElement_IsPointInStroke_Method = 2666, kV8SVGGeometryElement_GetTotalLength_Method = 2667, kV8SVGGeometryElement_GetPointAtLength_Method = 2668, kOffscreenCanvasTransferToImageBitmap = 2669, kOBSOLETE_OffscreenCanvasIsPointInPath = 2670, kOBSOLETE_OffscreenCanvasIsPointInStroke = 2671, kOBSOLETE_OffscreenCanvasMeasureText = 2672, kOBSOLETE_OffscreenCanvasGetImageData = 2673, kV8SVGTextContentElement_GetComputedTextLength_Method = 2674, kV8SVGTextContentElement_GetEndPositionOfChar_Method = 2675, kV8SVGTextContentElement_GetExtentOfChar_Method = 2676, kV8SVGTextContentElement_GetStartPositionOfChar_Method = 2677, kV8SVGTextContentElement_GetSubStringLength_Method = 2678, kV8BatteryManager_ChargingTime_AttributeGetter = 2679, kV8BatteryManager_Charging_AttributeGetter = 2680, kV8BatteryManager_DischargingTime_AttributeGetter = 2681, kV8BatteryManager_Level_AttributeGetter = 2682, kV8PaintRenderingContext2D_IsPointInPath_Method = 2683, kV8PaintRenderingContext2D_IsPointInStroke_Method = 2684, kV8PaymentRequest_CanMakePayment_Method = 2685, kV8AnalyserNode_GetByteFrequencyData_Method = 2686, kV8AnalyserNode_GetByteTimeDomainData_Method = 2687, kV8AnalyserNode_GetFloatFrequencyData_Method = 2688, kV8AnalyserNode_GetFloatTimeDomainData_Method = 2689, kV8AudioBuffer_CopyFromChannel_Method = 2690, kV8AudioBuffer_GetChannelData_Method = 2691, kWebGLDebugRendererInfo = 2692, kV8WebGL2ComputeRenderingContext_GetExtension_Method = 2693, kV8WebGL2ComputeRenderingContext_GetSupportedExtensions_Method = 2694, kV8WebGL2RenderingContext_GetExtension_Method = 2695, kV8WebGL2RenderingContext_GetSupportedExtensions_Method = 2696, kV8WebGLRenderingContext_GetExtension_Method = 2697, kV8WebGLRenderingContext_GetSupportedExtensions_Method = 2698, kV8Screen_AvailHeight_AttributeGetter = 2699, kV8Screen_AvailWidth_AttributeGetter = 2700, kV8Screen_ColorDepth_AttributeGetter = 2701, kV8Screen_Height_AttributeGetter = 2702, kV8Screen_PixelDepth_AttributeGetter = 2703, kV8Screen_Width_AttributeGetter = 2704, kWindowInnerWidth = 2705, kWindowInnerHeight = 2706, kV8Window_MatchMedia_Method = 2707, kWindowScrollX = 2708, kWindowScrollY = 2709, kWindowPageXOffset = 2710, kWindowPageYOffset = 2711, kWindowScreenX = 2712, kWindowScreenY = 2713, kWindowOuterHeight = 2714, kWindowOuterWidth = 2715, kWindowDevicePixelRatio = 2716, kCanvasCaptureStream = 2717, kV8HTMLMediaElement_CanPlayType_Method = 2718, kHistoryLength = 2719, kFeaturePolicyReportOnlyHeader = 2720, kV8PaymentRequest_HasEnrolledInstrument_Method = 2721, kTrustedTypesEnabled = 2722, kTrustedTypesCreatePolicy = 2723, kTrustedTypesDefaultPolicyCreated = 2724, kTrustedTypesAssignmentError = 2725, kBadgeSet = 2726, kBadgeClear = 2727, kElementTimingExplicitlyRequested = 2728, kV8HTMLMediaElement_CaptureStream_Method = 2729, kQuirkyLineBoxBackgroundSize = 2730, kDirectlyCompositedImage = 2731, kOBSOLETE_V8HTMLVideoElement_AutoPictureInPicture_AttributeGetter = 2733, kOBSOLETE_V8HTMLVideoElement_AutoPictureInPicture_AttributeSetter = 2734, kOBSOLETE_AutoPictureInPictureAttribute = 2735, kOBSOLETE_RTCAudioJitterBufferRtxHandling = 2736, kWebShareCanShare = 2737, kPriorityHints = 2738, kTextAutosizedCrossSiteIframe = 2739, kOBSOLETE_V8RTCQuicTransport_Constructor = 2740, kOBSOLETE_V8RTCQuicTransport_Transport_AttributeGetter = 2741, kOBSOLETE_V8RTCQuicTransport_State_AttributeGetter = 2742, kOBSOLETE_V8RTCQuicTransport_GetKey_Method = 2743, kOBSOLETE_V8RTCQuicTransport_GetStats_Method = 2744, kOBSOLETE_V8RTCQuicTransport_Connect_Method = 2745, kOBSOLETE_V8RTCQuicTransport_Listen_Method = 2746, kOBSOLETE_V8RTCQuicTransport_Stop_Method = 2747, kOBSOLETE_V8RTCQuicTransport_CreateStream_Method = 2748, kV8RTCIceTransport_Constructor = 2749, kV8RTCIceTransport_Role_AttributeGetter = 2750, kV8RTCIceTransport_State_AttributeGetter = 2751, kV8RTCIceTransport_GatheringState_AttributeGetter = 2752, kV8RTCIceTransport_GetLocalCandidates_Method = 2753, kV8RTCIceTransport_GetRemoteCandidates_Method = 2754, kV8RTCIceTransport_GetSelectedCandidatePair_Method = 2755, kV8RTCIceTransport_GetLocalParameters_Method = 2756, kV8RTCIceTransport_GetRemoteParameters_Method = 2757, kOBSOLETE_V8RTCQuicStream_Transport_AttributeGetter = 2758, kOBSOLETE_V8RTCQuicStream_State_AttributeGetter = 2759, kOBSOLETE_V8RTCQuicStream_ReadBufferedAmount_AttributeGetter = 2760, kOBSOLETE_V8RTCQuicStream_MaxReadBufferedAmount_AttributeGetter = 2761, kOBSOLETE_V8RTCQuicStream_WriteBufferedAmount_AttributeGetter = 2762, kOBSOLETE_V8RTCQuicStream_MaxWriteBufferedAmount_AttributeGetter = 2763, kOBSOLETE_V8RTCQuicStream_ReadInto_Method = 2764, kOBSOLETE_V8RTCQuicStream_Write_Method = 2765, kOBSOLETE_V8RTCQuicStream_Reset_Method = 2766, kOBSOLETE_V8RTCQuicStream_WaitForWriteBufferedAmountBelow_Method = 2767, kOBSOLETE_V8RTCQuicStream_WaitForReadable_Method = 2768, kHTMLTemplateElement = 2769, kNoSysexWebMIDIWithoutPermission = 2770, kNoSysexWebMIDIOnInsecureOrigin = 2771, kOBSOLETE_ApplicationCacheInstalledButNoManifest = 2772, kOBSOLETE_CustomCursorIntersectsViewport = 2776, kOBSOLETE_ClientHintsLang = 2777, kLinkRelPreloadImageSrcset = 2778, kV8HTMLMediaElement_Remote_AttributeGetter = 2779, kV8RemotePlayback_WatchAvailability_Method = 2780, kV8RemotePlayback_Prompt_Method = 2781, kLayoutShiftExplicitlyRequested = 2782, kMediaSessionSkipAd = 2783, kV8UserActivation_HasBeenActive_AttributeGetter = 2785, kV8UserActivation_IsActive_AttributeGetter = 2786, kTextEncoderEncodeInto = 2787, kClientHintsUA = 2789, kClientHintsUAArch = 2790, kClientHintsUAPlatform = 2791, kClientHintsUAModel = 2792, kAnimationFrameCancelledWithinFrame = 2793, kSchedulingIsInputPending = 2794, kV8StringNormalize = 2795, kOBSOLETE_U2FCryptotokenRegister = 2812, kOBSOLETE_U2FCryptotokenSign = 2813, kCSSValueAppearanceInnerSpinButton = 2814, kCSSValueAppearanceMeter = 2815, kCSSValueAppearanceProgressBar = 2816, kCSSValueAppearancePushButton = 2818, kCSSValueAppearanceSquareButton = 2819, kCSSValueAppearanceSearchCancel = 2820, kCSSValueAppearanceTextarea = 2821, kCSSValueAppearanceTextFieldForTemporalRendered = 2823, kOBSOLETE_AdClickNavigation = 2826, kRTCStatsRelativePacketArrivalDelay = 2827, kCSSSelectorHostContextInSnapshotProfile = 2829, kCSSSelectorHostContextInLiveProfile = 2830, kImportMap = 2831, kRefreshHeader = 2832, kSearchEventFired = 2833, kIdleDetectionStart = 2834, kTargetCurrent = 2835, kSandboxBackForwardStaysWithinSubtree = 2836, kSandboxBackForwardAffectsFramesOutsideSubtree = 2837, kDownloadPrePolicyCheck = 2838, kDownloadPostPolicyCheck = 2839, kReadableStreamGetReader = 2841, kReadableStreamPipeThrough = 2842, kReadableStreamPipeTo = 2843, kCSSStyleSheetReplace = 2844, kCSSStyleSheetReplaceSync = 2845, kAdoptedStyleSheets = 2846, kOBSOLETE_HTMLImportsOnReverseOriginTrials = 2847, kOBSOLETE_ElementCreateShadowRootOnReverseOriginTrials = 2848, kOBSOLETE_DocumentRegisterElementOnReverseOriginTrials = 2849, kInputTypeRadio = 2850, kInputTypeCheckbox = 2851, kInputTypeImage = 2852, kInputTypeButton = 2853, kInputTypeHidden = 2854, kInputTypeReset = 2855, kSelectElementSingle = 2856, kSelectElementMultiple = 2857, kV8Animation_Effect_AttributeGetter = 2858, kV8Animation_Effect_AttributeSetter = 2859, kHidDeviceClose = 2860, kHidDeviceOpen = 2861, kHidDeviceReceiveFeatureReport = 2862, kHidDeviceSendFeatureReport = 2863, kHidDeviceSendReport = 2864, kHidGetDevices = 2865, kHidRequestDevice = 2866, kOBSOLETE_V8RTCQuicTransport_MaxDatagramLength_AttributeGetter = 2867, kOBSOLETE_V8RTCQuicTransport_ReadyToSendDatagram_Method = 2868, kOBSOLETE_V8RTCQuicTransport_SendDatagram_Method = 2869, kOBSOLETE_V8RTCQuicTransport_ReceiveDatagrams_Method = 2870, kCSSValueContainStyle = 2871, kWebShareSuccessfulContainingFiles = 2872, kWebShareSuccessfulWithoutFiles = 2873, kWebShareUnsuccessfulContainingFiles = 2874, kWebShareUnsuccessfulWithoutFiles = 2875, kVerticalScrollbarThumbScrollingWithMouse = 2876, kVerticalScrollbarThumbScrollingWithTouch = 2877, kHorizontalScrollbarThumbScrollingWithMouse = 2878, kHorizontalScrollbarThumbScrollingWithTouch = 2879, kWebOTP = 2880, kV8Animation_Pending_AttributeGetter = 2881, kFocusWithoutUserActivationNotSandboxedNotAdFrame = 2882, kFocusWithoutUserActivationNotSandboxedAdFrame = 2883, kFocusWithoutUserActivationSandboxedNotAdFrame = 2884, kFocusWithoutUserActivationSandboxedAdFrame = 2885, kV8RTCRtpReceiver_JitterBufferDelayHint_AttributeGetter = 2886, kV8RTCRtpReceiver_JitterBufferDelayHint_AttributeSetter = 2887, kMediaCapabilitiesDecodingInfoWithKeySystemConfig = 2888, kOBSOLETE_RevertInCustomIdent = 2889, kUnoptimizedImagePolicies = 2890, kVTTCueParser = 2891, kMediaElementTextTrackContainer = 2892, kMediaElementTextTrackList = 2893, kPaymentRequestInitialized = 2894, kPaymentRequestShow = 2895, kPaymentRequestShippingAddressChange = 2896, kPaymentRequestShippingOptionChange = 2897, kPaymentRequestPaymentMethodChange = 2898, kV8Animation_UpdatePlaybackRate_Method = 2899, kTwoValuedOverflow = 2900, kTextFragmentAnchor = 2901, kTextFragmentAnchorMatchFound = 2902, kNonPassiveTouchEventListener = 2903, kPassiveTouchEventListener = 2904, kWebXrFramebufferScale = 2906, kWebXrIgnoreDepthValues = 2907, kWebXrSessionCreated = 2908, kV8XRReferenceSpace_GetOffsetReferenceSpace_Method = 2909, kV8XRInputSource_Gamepad_AttributeGetter = 2910, kV8XRSession_End_Method = 2911, kV8XRWebGLLayer_Constructor = 2912, kFetchKeepalive = 2913, kOBSOLETE_CSSTransitionCancelledByRemovingStyle = 2914, kV8RTCRtpSender_SetStreams_Method = 2915, kCookieNoSameSite = 2916, kCookieInsecureAndSameSiteNone = 2917, kUnsizedMediaPolicy = 2918, kScrollByPrecisionTouchPad = 2919, kPinchZoom = 2920, kFeaturePolicyCommaSeparatedDeclarations = 2922, kFeaturePolicySemicolonSeparatedDeclarations = 2923, kV8CallSiteAPIGetFunctionSloppyCall = 2924, kV8CallSiteAPIGetThisSloppyCall = 2925, kLargestContentfulPaintExplicitlyRequested = 2927, kPageFreezeOptIn = 2928, kPageFreezeOptOut = 2929, kPeriodicBackgroundSync = 2930, kPeriodicBackgroundSyncRegister = 2931, kLazyLoadFrameLoadingAttributeEager = 2932, kLazyLoadFrameLoadingAttributeLazy = 2933, kLazyLoadImageLoadingAttributeEager = 2934, kLazyLoadImageLoadingAttributeLazy = 2935, kPeriodicBackgroundSyncGetTags = 2937, kPeriodicBackgroundSyncUnregister = 2938, kCreateObjectURLMediaSourceFromWorker = 2939, kCSSAtRuleProperty = 2940, kServiceWorkerInterceptedRequestFromOriginDirtyStyleSheet = 2941, kWebkitMarginBeforeCollapseDiscard = 2942, kWebkitMarginBeforeCollapseSeparate = 2943, kWebkitMarginBeforeCollapseSeparateMaybeDoesSomething = 2944, kWebkitMarginAfterCollapseDiscard = 2945, kWebkitMarginAfterCollapseSeparate = 2946, kWebkitMarginAfterCollapseSeparateMaybeDoesSomething = 2947, kCredentialManagerGetWithUVM = 2949, kCredentialManagerGetSuccessWithUVM = 2951, kDiscardInputEventToMovingIframe = 2952, kSignedExchangeSubresourcePrefetch = 2953, kBasicCardType = 2954, kExecutedJavaScriptURL = 2955, kLinkPrefetchLoadEvent = 2956, kLinkPrefetchErrorEvent = 2957, kFontSizeWebkitXxxLarge = 2958, kV8Database_ChangeVersion_Method = 2959, kV8Database_Transaction_Method = 2960, kV8Database_ReadTransaction_Method = 2961, kV8SQLTransaction_ExecuteSql_Method = 2962, kV8PointerEvent_GetPredictedEvents_Method = 2971, kOBSOLETE_ScrollSnapOnViewportBreaks = 2972, kOBSOLETE_ScrollPaddingOnViewportBreaks = 2973, kDownloadInAdFrame = 2974, kDownloadInSandbox = 2975, kDownloadWithoutUserGesture = 2976, kAutoplayDynamicDelegation = 2977, kToggleEventHandlerDuringParsing = 2978, kFragmentDoubleHash = 2979, kOBSOLETE_CSSValueOverflowXOverlay = 2981, kOBSOLETE_CSSValueOverflowYOverlay = 2982, kContentIndexAdd = 2983, kContentIndexDelete = 2984, kContentIndexGet = 2985, kV8SpeechGrammar_Constructor = 2986, kV8SpeechGrammarList_AddFromString_Method = 2987, kV8SpeechGrammarList_Constructor = 2988, kV8SpeechGrammarList_Item_Method = 2989, kV8SpeechRecognition_Constructor = 2990, kV8SpeechRecognition_Grammars_AttributeGetter = 2991, kV8SpeechRecognition_Grammars_AttributeSetter = 2992, kContactsManagerSelect = 2993, kV8MediaSession_SetPositionState_Method = 2994, kCSSValueOverflowOverlay = 2995, kRequestedFileSystemTemporary = 2996, kRequestedFileSystemPersistent = 2997, kElementWithLeftwardOrUpwardOverflowDirection_ScrollLeftOrTop = 2998, kElementWithLeftwardOrUpwardOverflowDirection_ScrollLeftOrTopSetPositive = 2999, kXMLHttpRequestSynchronousInMainFrame = 3000, kXMLHttpRequestSynchronousInCrossOriginSubframe = 3001, kXMLHttpRequestSynchronousInSameOriginSubframe = 3002, kXMLHttpRequestSynchronousInWorker = 3003, kPerformanceObserverBufferedFlag = 3004, kWakeLockAcquireScreenLock = 3005, kWakeLockAcquireSystemLock = 3006, kThirdPartyServiceWorker = 3007, kJSSelfProfiling = 3008, kHTMLFrameSetElement = 3009, kFetchRedirectError = 3012, kFetchRedirectManual = 3013, kFetchCacheReload = 3014, kV8Window_ChooseFileSystemEntries_Method = 3015, kV8FileSystemDirectoryHandle_GetSystemDirectory_Method = 3016, kNotificationShowTrigger = 3017, kWebSocketStreamConstructor = 3018, kDOMStorageRead = 3019, kDOMStorageWrite = 3020, kCacheStorageRead = 3021, kCacheStorageWrite = 3022, kIndexedDBRead = 3023, kIndexedDBWrite = 3024, kDeprecatedFileSystemRead = 3025, kDeprecatedFileSystemWrite = 3026, kPointerLockUnadjustedMovement = 3027, kCreateObjectBlob = 3028, kQuotaRead = 3029, kDelegateFocus = 3030, kThirdPartySharedWorker = 3032, kThirdPartyBroadcastChannel = 3033, kMediaSourceGroupEndTimestampDecreaseWithinMediaSegment = 3034, kTextFragmentAnchorTapToDismiss = 3035, kXRIsSessionSupported = 3036, kScrollbarUseScrollbarButtonReversedDirection = 3037, kCSSSelectorPseudoScrollbarButtonReversedDirection = 3038, kOBSOLETE_FragmentHasTildeAmpersandTilde = 3039, kOBSOLETE_FragmentHasColonTildeColon = 3040, kOBSOLETE_FragmentHasTildeAtTilde = 3041, kOBSOLETE_FragmentHasAmpersandDelimiterQuestion = 3042, kInvalidFragmentDirective = 3043, kContactsManagerGetProperties = 3044, kPluginElementLoadedDocument = 3046, kPluginElementLoadedImage = 3047, kPluginElementLoadedExternal = 3048, kRenderSubtreeAttribute = 3049, kARIAAnnotations = 3050, kIntersectionObserverV2 = 3051, kHeavyAdIntervention = 3052, kUserTimingL3 = 3053, kGetGamepadsFromCrossOriginSubframe = 3054, kGetGamepadsFromInsecureContext = 3055, kOriginCleanImageBitmapSerialization = 3056, kNonOriginCleanImageBitmapSerialization = 3057, kOriginCleanImageBitmapTransfer = 3058, kNonOriginCleanImageBitmapTransfer = 3059, kCompressionStreamConstructor = 3060, kDecompressionStreamConstructor = 3061, kV8RTCRtpReceiver_PlayoutDelayHint_AttributeGetter = 3062, kV8RTCRtpReceiver_PlayoutDelayHint_AttributeSetter = 3063, kV8RegExpExecCalledOnSlowRegExp = 3064, kV8RegExpReplaceCalledOnSlowRegExp = 3065, kHasMarkerPseudoElement = 3066, kWindowMove = 3067, kWindowResize = 3068, kMovedOrResizedPopup = 3069, kMovedOrResizedPopup2sAfterCreation = 3070, kDOMWindowOpenPositioningFeatures = 3071, kMouseEventScreenX = 3072, kMouseEventScreenY = 3073, kCredentialManagerIsUserVerifyingPlatformAuthenticatorAvailable = 3074, kObsoleteWebrtcTlsVersion = 3075, kUpgradeInsecureRequestsUpgradedRequestBlockable = 3076, kUpgradeInsecureRequestsUpgradedRequestOptionallyBlockable = 3077, kUpgradeInsecureRequestsUpgradedRequestWebsocket = 3078, kUpgradeInsecureRequestsUpgradedRequestForm = 3079, kUpgradeInsecureRequestsUpgradedRequestUnknown = 3080, kHasGlyphRelativeUnits = 3081, kCountQueuingStrategyConstructor = 3082, kByteLengthQueuingStrategyConstructor = 3083, kClassicDedicatedWorker = 3084, kModuleDedicatedWorker = 3085, kFetchBodyStreamInServiceWorker = 3086, kFetchBodyStreamOutsideServiceWorker = 3087, kGetComputedStyleOutsideFlatTree = 3088, kARIADescriptionAttribute = 3089, kStrictMimeTypeChecksWouldBlockWorker = 3090, kResourceTimingTaintedOriginFlagFail = 3091, kRegisterProtocolHandlerSameOriginAsTop = 3092, kRegisterProtocolHandlerCrossOriginSubframe = 3093, kWebNfcNdefReaderScan = 3094, kWebNfcNdefWriterWrite = 3095, kOBSOLETE_HTMLPortalElement = 3096, kOBSOLETE_V8HTMLPortalElement_Activate_Method = 3097, kOBSOLETE_V8HTMLPortalElement_PostMessage_Method = 3098, kOBSOLETE_V8Window_PortalHost_AttributeGetter = 3099, kOBSOLETE_V8PortalHost_PostMessage_Method = 3100, kOBSOLETE_V8PortalActivateEvent_Data_AttributeGetter = 3101, kOBSOLETE_V8PortalActivateEvent_AdoptPredecessor_Method = 3102, kLinkRelPrefetchForSignedExchanges = 3103, kMessageEventSharedArrayBufferSameOrigin = 3104, kMessageEventSharedArrayBufferSameAgentCluster = 3105, kMessageEventSharedArrayBufferDifferentAgentCluster = 3106, kCacheStorageCodeCacheHint = 3107, kV8Metadata_ModificationTime_AttributeGetter = 3108, kV8RTCLegacyStatsReport_Timestamp_AttributeGetter = 3109, kInputElementValueAsDateGetter = 3110, kInputElementValueAsDateSetter = 3111, kHTMLMetaElementReferrerPolicy = 3112, kNonWebbyMixedContent = 3113, kV8SharedArrayBufferConstructed = 3114, kScrollSnapCausesScrollOnInitialLayout = 3115, kClientHintsUAMobile = 3116, kV8VideoPlaybackQuality_CorruptedVideoFrames_AttributeGetter = 3117, kLongTaskBufferFull = 3118, kHTMLMetaElementMonetization = 3119, kHTMLLinkElementMonetization = 3120, kOBSOLETE_InputTypeCheckboxRenderedNonSquare = 3121, kOBSOLETE_InputTypeRadioRenderedNonSquare = 3122, kWebkitBoxPackJustifyDoesSomething = 3123, kWebkitBoxPackCenterDoesSomething = 3124, kWebkitBoxPackEndDoesSomething = 3125, kV8KeyframeEffect_Constructor = 3126, kOBSOLETE_WebNfcAPI = 3127, kHostCandidateAttributeGetter = 3128, kCSPWithReasonableObjectRestrictions = 3129, kCSPWithReasonableBaseRestrictions = 3130, kCSPWithReasonableScriptRestrictions = 3131, kCSPWithReasonableRestrictions = 3132, kCSPROWithReasonableObjectRestrictions = 3133, kCSPROWithReasonableBaseRestrictions = 3134, kCSPROWithReasonableScriptRestrictions = 3135, kCSPROWithReasonableRestrictions = 3136, kCSPWithBetterThanReasonableRestrictions = 3137, kCSPROWithBetterThanReasonableRestrictions = 3138, kMeasureMemory = 3139, kV8Animation_ReplaceState_AttributeGetter = 3140, kV8Animation_Persist_Method = 3141, kTaskControllerConstructor = 3142, kTaskControllerSetPriority = 3143, kTaskSignalPriority = 3144, kSchedulerPostTask = 3145, kV8Animation_Onremove_AttributeGetter = 3146, kV8Animation_Onremove_AttributeSetter = 3147, kClassicSharedWorker = 3148, kModuleSharedWorker = 3149, kV8Animation_CommitStyles_Method = 3150, kSameOriginIframeWindowAlert = 3151, kSameOriginIframeWindowConfirm = 3152, kSameOriginIframeWindowPrompt = 3153, kSameOriginIframeWindowPrint = 3154, kLargeStickyAd = 3155, kCSSComparisonFunctions = 3157, kOBSOLETE_FeaturePolicyProposalWouldChangeBehaviour = 3158, kRTCLocalSdpModificationSimulcast = 3159, kTrustedTypesEnabledEnforcing = 3160, kTrustedTypesEnabledReportOnly = 3161, kTrustedTypesAllowDuplicates = 3162, kV8ArrayPrototypeHasElements = 3163, kV8ObjectPrototypeHasElements = 3164, kDisallowDocumentAccess = 3165, kXRSessionRequestHitTestSource = 3166, kXRSessionRequestHitTestSourceForTransientInput = 3167, kXRDOMOverlay = 3168, kOBSOLETE_CssStyleSheetReplaceWithImport = 3169, kCryptoAlgorithmEd25519 = 3170, kCryptoAlgorithmX25519 = 3171, kDisplayNames = 3172, kNumberFormatStyleUnit = 3173, kDateTimeFormatRange = 3174, kDateTimeFormatDateTimeStyle = 3175, kBreakIteratorTypeWord = 3176, kBreakIteratorTypeLine = 3177, kV8FileSystemDirectoryHandle_Resolve_Method = 3178, kV8FileSystemHandle_IsSameEntry_Method = 3179, kOBSOLETE_V8RTCRtpSender_CreateEncodedAudioStreams_Method = 3180, kOBSOLETE_V8RTCRtpSender_CreateEncodedVideoStreams_Method = 3181, kOBSOLETE_V8RTCRtpReceiver_CreateEncodedAudioStreams_Method = 3182, kOBSOLETE_V8RTCRtpReceiver_CreateEncodedVideoStreams_Method = 3183, kQuicTransport = 3184, kQuicTransportStreamApis = 3185, kQuicTransportDatagramApis = 3186, kV8Document_GetAnimations_Method = 3187, kV8ShadowRoot_GetAnimations_Method = 3188, kClientHintsUAFullVersion = 3189, kOBSOLETE_SchedulerCurrentTaskSignal = 3190, kThirdPartyFileSystem = 3191, kThirdPartyIndexedDb = 3192, kThirdPartyCacheStorage = 3193, kThirdPartyLocalStorage = 3194, kThirdPartySessionStorage = 3195, kDeclarativeShadowRoot = 3196, kCrossOriginOpenerPolicySameOrigin = 3197, kCrossOriginOpenerPolicySameOriginAllowPopups = 3198, kCrossOriginEmbedderPolicyRequireCorp = 3199, kCoopAndCoepIsolated = 3200, kV8Document_HasTrustToken_Method = 3202, kForceLoadAtTop = 3203, kOBSOLETE_LegacyLayoutByDetailsMarker = 3206, kOBSOLETE_LegacyLayoutByEditing = 3207, kOBSOLETE_LegacyLayoutByFrameSet = 3211, kOBSOLETE_LegacyLayoutByGrid = 3212, kOBSOLETE_LegacyLayoutByMultiCol = 3214, kOBSOLETE_LegacyLayoutByPrinting = 3215, kOBSOLETE_LegacyLayoutBySVG = 3217, kOBSOLETE_LegacyLayoutByTable = 3219, kOBSOLETE_LegacyLayoutByTextCombine = 3220, kOBSOLETE_LegacyLayoutByTextControl = 3221, kOBSOLETE_LegacyLayoutByVTTCue = 3222, kOBSOLETE_LegacyLayoutByTableFlexGridBlockInNGFragmentationContext = 3224, kDocumentPolicyHeader = 3225, kDocumentPolicyReportOnlyHeader = 3226, kRequireDocumentPolicyHeader = 3227, kDocumentPolicyIframePolicyAttribute = 3228, kDocumentPolicyCausedPageUnload = 3229, kRequiredDocumentPolicy = 3230, kPerformanceObserverEntryTypesAndBuffered = 3231, kPerformanceObserverTypeError = 3232, kImageCaptureWhiteBalanceMode = 3233, kImageCaptureExposureMode = 3234, kImageCaptureFocusMode = 3235, kImageCapturePointsOfInterest = 3236, kImageCaptureExposureCompensation = 3237, kImageCaptureExposureTime = 3238, kImageCaptureColorTemperature = 3239, kImageCaptureIso = 3240, kImageCaptureBrightness = 3241, kImageCaptureContrast = 3242, kImageCaptureSaturation = 3243, kImageCaptureSharpness = 3244, kImageCaptureFocusDistance = 3245, kImageCapturePan = 3246, kImageCaptureTilt = 3247, kImageCaptureZoom = 3248, kImageCaptureTorch = 3249, kXRFrameCreateAnchor = 3250, kXRHitTestResultCreateAnchor = 3251, kCSSKeywordRevert = 3252, kOverlayPopupAd = 3253, kEventTimingFirstInputExplicitlyRequested = 3254, kCustomScrollbarPercentThickness = 3255, kCustomScrollbarPartPercentLength = 3256, kV8InvalidatedArrayBufferDetachingProtector = 3257, kV8InvalidatedArrayConstructorProtector = 3258, kV8InvalidatedArrayIteratorLookupChainProtector = 3259, kV8InvalidatedArraySpeciesLookupChainProtector = 3260, kV8InvalidatedIsConcatSpreadableLookupChainProtector = 3261, kV8InvalidatedMapIteratorLookupChainProtector = 3262, kV8InvalidatedNoElementsProtector = 3263, kV8InvalidatedPromiseHookProtector = 3264, kV8InvalidatedPromiseResolveLookupChainProtector = 3265, kV8InvalidatedPromiseSpeciesLookupChainProtector = 3266, kV8InvalidatedPromiseThenLookupChainProtector = 3267, kV8InvalidatedRegExpSpeciesLookupChainProtector = 3268, kV8InvalidatedSetIteratorLookupChainProtector = 3269, kV8InvalidatedStringIteratorLookupChainProtector = 3270, kV8InvalidatedStringLengthOverflowLookupChainProtector = 3271, kV8InvalidatedTypedArraySpeciesLookupChainProtector = 3272, kClientHintsUAPlatformVersion = 3273, kIFrameCSPAttribute = 3274, kNavigatorCookieEnabled = 3275, kTrustTokenFetch = 3276, kTrustTokenXhr = 3277, kTrustTokenIframe = 3278, kTrustedTypesPolicyCreated = 3279, kV8HTMLVideoElement_RequestVideoFrameCallback_Method = 3280, kV8HTMLVideoElement_CancelVideoFrameCallback_Method = 3281, kOBSOLETE_RubyElementWithDisplayBlock = 3282, kOBSOLETE_LocationFragmentDirectiveAccessed = 3283, kCanvasRenderingContext = 3284, kSchemefulSameSiteContextDowngrade = 3285, kOriginAgentClusterHeader = 3286, kV8WasmSimdOpcodes = 3287, kGridRowGapPercent = 3288, kGridRowGapPercentIndefinite = 3289, kFlexRowGapPercent = 3290, kFlexRowGapPercentIndefinite = 3291, kV8RTCRtpSender_CreateEncodedStreams_Method = 3292, kV8RTCRtpReceiver_CreateEncodedStreams_Method = 3293, kOBSOLETEForceEncodedAudioInsertableStreams = 3294, kOBSOLETEForceEncodedVideoInsertableStreams = 3295, kTransformStyleContainingBlockComputedUsedMismatch = 3296, kOBSOLETE_AdditionalGroupingPropertiesForCompat = 3297, kPopupDoesNotExceedOwnerWindowBounds = 3298, kPopupExceedsOwnerWindowBounds = 3299, kPopupExceedsOwnerWindowBoundsForIframe = 3300, kPopupGestureTapExceedsOwnerWindowBounds = 3301, kPopupMouseDownExceedsOwnerWindowBounds = 3302, kPopupMouseWheelExceedsOwnerWindowBounds = 3303, kV8VarRedeclaredCatchBinding = 3304, kWebBluetoothRemoteCharacteristicWriteValueWithResponse = 3305, kWebBluetoothRemoteCharacteristicWriteValueWithoutResponse = 3306, kFlexGapSpecified = 3307, kFlexGapPositive = 3308, kPluginInstanceAccessSuccessful = 3309, kStorageAccessAPI_HasStorageAccess_Method = 3310, kStorageAccessAPI_requestStorageAccess_Method = 3311, kWebBluetoothWatchAdvertisements = 3312, kRubyTextWithNonDefaultTextAlign = 3313, kHTMLMetaElementReferrerPolicyOutsideHead = 3314, kHTMLMetaElementReferrerPolicyMultipleTokens = 3315, kOBSOLETE_V8WasmBulkMemory = 3320, kV8WasmRefTypes = 3321, kOBSOLETE_V8WasmMultiValue = 3322, kHiddenBackfaceWithPossible3D = 3323, kHiddenBackfaceWithPreserve3D = 3324, kCSSAtRuleScrollTimeline = 3325, kFetchUploadStreaming = 3326, kWebkitLineClampWithoutWebkitBox = 3327, kWebBluetoothGetDevices = 3328, kDialogWithNonZeroScrollOffset = 3329, kDialogHeightLargerThanViewport = 3330, kOverlayPopup = 3331, kContentVisibilityAuto = 3332, kContentVisibilityHidden = 3333, kContentVisibilityHiddenMatchable = 3334, kInlineOverflowAutoWithInlineEndPadding = 3335, kInlineOverflowScrollWithInlineEndPadding = 3336, kSerialPortGetInfo = 3338, kFileSystemPickerMethod = 3339, kV8Window_ShowOpenFilePicker_Method = 3340, kV8Window_ShowSaveFilePicker_Method = 3341, kV8Window_ShowDirectoryPicker_Method = 3342, kOBSOLETE_RTCConstraintEnableRtpDataChannelsTrue = 3344, kOBSOLETE_RTCConstraintEnableRtpDataChannelsFalse = 3345, kFileSystemAccessDragAndDrop = 3346, kRTCAdaptivePtime = 3347, kHTMLMetaElementReferrerPolicyMultipleTokensAffectingRequest = 3348, kNavigationTimingL2 = 3349, kResourceTiming = 3350, kV8PointerEvent_AzimuthAngle_AttributeGetter = 3351, kV8PointerEvent_AltitudeAngle_AttributeGetter = 3352, kCrossBrowsingContextGroupMainFrameNulledNonEmptyNameAccessed = 3353, kPositionSticky = 3354, kOBSOLETE_CommaSeparatorInAllowAttribute = 3355, kMainFrameCSPViaHTTP = 3359, kMainFrameCSPViaMeta = 3360, kOBSOLETE_MainFrameCSPViaOriginPolicy = 3361, kHtmlClipboardApiRead = 3362, kHtmlClipboardApiWrite = 3363, kOBSOLETE_CSSSystemColorComputeToSelf = 3364, kAttributionReportingAPIAll = 3365, kOBSOLETE_ImpressionRegistration = 3366, kOBSOLETE_ConversionRegistration = 3367, kWebSharePolicyAllow = 3368, kWebSharePolicyDisallow = 3369, kFormAssociatedCustomElement = 3370, kWindowClosed = 3371, kWrongBaselineOfMultiLineButton = 3372, kWrongBaselineOfEmptyLineButton = 3373, kV8RTCRtpTransceiver_Stopped_AttributeGetter = 3374, kV8RTCRtpTransceiver_Stop_Method = 3375, kSecurePaymentConfirmation = 3376, kOBSOLETE_CSSInvalidVariableUnset = 3377, kElementInternalsShadowRoot = 3378, kOBSOLETE_UserDataFieldFilled_PredictedTypeMatch = 3379, kOBSOLETE_EmailFieldFilled_PredictedTypeMatch = 3380, kOBSOLETE_PhoneFieldFilled_PredictedTypeMatch = 3381, kOBSOLETE_EmailFieldFilled_PatternMatch = 3382, kOBSOLETE_LastLetterSpacingAffectsRendering = 3383, kV8FontData_GetTables_Method = 3384, kV8FontData_Blob_Method = 3385, kOBSOLETE_V8FontManager_Query_Method = 3386, kAudioContextBaseLatency = 3387, kV8Window_GetScreenDetails_Method = 3388, kOBSOLETE_V8Window_IsMultiScreen_Method = 3389, kOBSOLETE_V8Window_Onscreenschange_AttributeGetter = 3390, kOBSOLETE_V8Window_Onscreenschange_AttributeSetter = 3391, kDOMWindowOpenPositioningFeaturesCrossScreen = 3392, kDOMWindowSetWindowRectCrossScreen = 3393, kFullscreenCrossScreen = 3394, kOBSOLETE_BatterySavingsMeta = 3395, kDigitalGoodsGetDigitalGoodsService = 3396, kDigitalGoodsGetDetails = 3397, kDigitalGoodsAcknowledge = 3398, kMediaRecorder_MimeType = 3399, kMediaRecorder_VideoBitsPerSecond = 3400, kMediaRecorder_AudioBitsPerSecond = 3401, kOBSOLETE_BluetoothRemoteGATTCharacteristic_Uuid = 3402, kOBSOLETE_BluetoothRemoteGATTDescriptor_Uuid = 3403, kOBSOLETE_BluetoothRemoteGATTService_Uuid = 3404, kOBSOLETE_GPUAdapter_Name = 3405, kOBSOLETE_WindowScreenInternal = 3406, kOBSOLETE_WindowScreenPrimary = 3407, kThirdPartyCookieRead = 3408, kThirdPartyCookieWrite = 3409, kRTCLegacyRtpDataChannelNegotiated = 3410, kCrossSitePostMessage = 3411, kSchemelesslySameSitePostMessage = 3412, kSchemefulSameSitePostMessage = 3413, kUnspecifiedTargetOriginPostMessage = 3414, kSchemelesslySameSitePostMessageSecureToInsecure = 3415, kSchemelesslySameSitePostMessageInsecureToSecure = 3416, kOBSOLETE_BCPBroadcast = 3417, kOBSOLETE_BCPRead = 3418, kOBSOLETE_BCPWriteWithoutResponse = 3419, kOBSOLETE_BCPWrite = 3420, kOBSOLETE_BCPNotify = 3421, kOBSOLETE_BCPIndicate = 3422, kOBSOLETE_BCPAuthenticatedSignedWrites = 3423, kOBSOLETE_BCPReliableWrite = 3424, kOBSOLETE_BCPWritableAuxiliaries = 3425, kTextAlignSpecifiedToLegend = 3426, kV8Document_FragmentDirective_AttributeGetter = 3427, kV8StorageManager_GetDirectory_Method = 3428, kBeforematchHandlerRegistered = 3429, kBluetoothAdvertisingEventName = 3430, kBluetoothAdvertisingEventAppearance = 3431, kBluetoothAdvertisingEventTxPower = 3432, kCrossOriginOpenerPolicyReporting = 3433, kGamepadId = 3434, kElementAttachInternals = 3435, kBluetoothDeviceName = 3436, kRTCIceCandidateAddress = 3437, kRTCIceCandidateCandidate = 3438, kRTCIceCandidatePort = 3439, kRTCIceCandidateRelatedAddress = 3440, kRTCIceCandidateRelatedPort = 3441, kSlotAssignNode = 3442, kPluginName = 3443, kPluginFilename = 3444, kPluginDescription = 3445, kOBSOLETE_SubresourceWebBundles = 3446, kRTCPeerConnectionSetRemoteDescriptionPromise = 3447, kRTCPeerConnectionSetLocalDescriptionPromise = 3448, kRTCPeerConnectionCreateOfferPromise = 3449, kRTCPeerConnectionCreateAnswerPromise = 3450, kRTCPeerConnectionSetRemoteDescription = 3451, kRTCPeerConnectionSetLocalDescription = 3452, kRTCPeerConnectionCreateOffer = 3453, kRTCPeerConnectionCreateAnswer = 3454, kV8AuthenticatorAttestationResponse_GetTransports_Method = 3455, kWebCodecsAudioDecoder = 3456, kWebCodecsVideoDecoder = 3457, kWebCodecsVideoEncoder = 3458, kWebCodecsVideoTrackReader = 3459, kWebCodecsImageDecoder = 3460, kBackForwardCacheExperimentHTTPHeader = 3461, kV8Navigator_OpenTCPSocket_Method = 3462, kV8Navigator_OpenUDPSocket_Method = 3463, kWebCodecs = 3464, kCredentialManagerCrossOriginPublicKeyGetRequest = 3465, kCSSContainStrictWithoutContentVisibility = 3466, kCSSContainAllWithoutContentVisibility = 3467, kTimerInstallFromBeforeUnload = 3468, kTimerInstallFromUnload = 3469, kOBSOLETE_ElementAttachInternalsBeforeConstructor = 3470, kSMILElementHasRepeatNEventListener = 3471, kWebTransport = 3472, kIdleDetectionPermissionRequested = 3477, kIdentifiabilityStudyReserved3478 = 3478, kSpeechSynthesis_GetVoices_Method = 3479, kIdentifiabilityStudyReserved3480 = 3480, kV8Navigator_JavaEnabled_Method = 3481, kIdentifiabilityStudyReserved3482 = 3482, kIdentifiabilityStudyReserved3483 = 3483, kIdentifiabilityStudyReserved3484 = 3484, kIdentifiabilityStudyReserved3485 = 3485, kIdentifiabilityStudyReserved3486 = 3486, kIdentifiabilityStudyReserved3487 = 3487, kIdentifiabilityStudyReserved3488 = 3488, kIdentifiabilityStudyReserved3489 = 3489, kIdentifiabilityStudyReserved3490 = 3490, kIdentifiabilityStudyReserved3491 = 3491, kIdentifiabilityStudyReserved3492 = 3492, kIdentifiabilityStudyReserved3493 = 3493, kIdentifiabilityStudyReserved3494 = 3494, kIdentifiabilityStudyReserved3495 = 3495, kIdentifiabilityStudyReserved3496 = 3496, kIdentifiabilityStudyReserved3497 = 3497, kIdentifiabilityStudyReserved3498 = 3498, kV8BackgroundFetchRegistration_FailureReason_AttributeGetter = 3499, kV8Document_ElementFromPoint_Method = 3500, kV8Document_ElementsFromPoint_Method = 3501, kV8ShadowRoot_ElementFromPoint_Method = 3502, kV8ShadowRoot_ElementsFromPoint_Method = 3503, kOBSOLETE_WindowScreenTouchSupport = 3504, kIdentifiabilityStudyReserved3505 = 3505, kIdentifiabilityStudyReserved3506 = 3506, kV8PushManager_SupportedContentEncodings_AttributeGetter = 3507, kIdentifiabilityStudyReserved3508 = 3508, kV8RTCRtpReceiver_GetCapabilities_Method = 3509, kV8RTCRtpSender_GetCapabilities_Method = 3510, kIdentifiabilityStudyReserved3511 = 3511, kIdentifiabilityStudyReserved3512 = 3512, kIdentifiabilityStudyReserved3513 = 3513, kIdentifiabilityStudyReserved3514 = 3514, kIdentifiabilityStudyReserved3515 = 3515, kIdentifiabilityStudyReserved3516 = 3516, kIdentifiabilityStudyReserved3517 = 3517, kIdentifiabilityStudyReserved3518 = 3518, kIdentifiabilityStudyReserved3519 = 3519, kIdentifiabilityStudyReserved3520 = 3520, kIdentifiabilityStudyReserved3521 = 3521, kIdentifiabilityStudyReserved3522 = 3522, kIdentifiabilityStudyReserved3523 = 3523, kIdentifiabilityStudyReserved3524 = 3524, kIdentifiabilityStudyReserved3525 = 3525, kIdentifiabilityStudyReserved3526 = 3526, kIdentifiabilityStudyReserved3527 = 3527, kIdentifiabilityStudyReserved3528 = 3528, kIdentifiabilityStudyReserved3529 = 3529, kIdentifiabilityStudyReserved3530 = 3530, kIdentifiabilityStudyReserved3531 = 3531, kIdentifiabilityStudyReserved3532 = 3532, kIdentifiabilityStudyReserved3533 = 3533, kIdentifiabilityStudyReserved3534 = 3534, kIdentifiabilityStudyReserved3535 = 3535, kIdentifiabilityStudyReserved3536 = 3536, kIdentifiabilityStudyReserved3537 = 3537, kIdentifiabilityStudyReserved3538 = 3538, kIdentifiabilityStudyReserved3539 = 3539, kIdentifiabilityStudyReserved3540 = 3540, kV8WheelEvent_DeltaMode_AttributeGetter = 3541, kV8Touch_Force_AttributeGetter = 3542, kWebGLRenderingContextMakeXRCompatible = 3543, kV8WebGLCompressedTextureASTC_GetSupportedProfiles_Method = 3544, kHTMLCanvasGetContext = 3545, kV8BeforeInstallPromptEvent_Platforms_AttributeGetter = 3546, kIdentifiabilityStudyReserved3547 = 3547, kIdentifiabilityStudyReserved3548 = 3548, kIdentifiabilityStudyReserved3549 = 3549, kIdentifiabilityStudyReserved3550 = 3550, kIdentifiabilityStudyReserved3551 = 3551, kIdentifiabilityStudyReserved3552 = 3552, kIdentifiabilityStudyReserved3553 = 3553, kIdentifiabilityStudyReserved3554 = 3554, kIdentifiabilityStudyReserved3555 = 3555, kIdentifiabilityStudyReserved3556 = 3556, kIdentifiabilityStudyReserved3557 = 3557, kIdentifiabilityStudyReserved3558 = 3558, kIdentifiabilityStudyReserved3559 = 3559, kIdentifiabilityStudyReserved3560 = 3560, kIdentifiabilityStudyReserved3561 = 3561, kIdentifiabilityStudyReserved3562 = 3562, kIdentifiabilityStudyReserved3563 = 3563, kIdentifiabilityStudyReserved3564 = 3564, kIdentifiabilityStudyReserved3565 = 3565, kV8BaseAudioContext_SampleRate_AttributeGetter = 3566, kOBSOLETE_WindowScreenId = 3567, kWebGLRenderingContextGetParameter = 3568, kWebGLRenderingContextGetRenderbufferParameter = 3569, kWebGLRenderingContextGetShaderPrecisionFormat = 3570, kWebGL2RenderingContextGetInternalFormatParameter = 3571, kIdentifiabilityStudyReserved3572 = 3572, kIdentifiabilityStudyReserved3573 = 3573, kIdentifiabilityStudyReserved3574 = 3574, kIdentifiabilityStudyReserved3575 = 3575, kIdentifiabilityStudyReserved3576 = 3576, kIdentifiabilityStudyReserved3577 = 3577, kCascadedCSSZoomNotEqualToOne = 3578, kForcedDarkMode = 3579, kPreferredColorSchemeDark = 3580, kPreferredColorSchemeDarkSetting = 3581, kIdentifiabilityMediaDevicesEnumerateDevices = 3582, kIdentifiabilityStudyReserved3583 = 3583, kIdentifiabilityStudyReserved3584 = 3584, kIdentifiabilityStudyReserved3585 = 3585, kIdentifiabilityStudyReserved3586 = 3586, kIdentifiabilityStudyReserved3587 = 3587, kIdentifiabilityStudyReserved3588 = 3588, kIdentifiabilityStudyReserved3589 = 3589, kIdentifiabilityStudyReserved3590 = 3590, kIdentifiabilityStudyReserved3591 = 3591, kIdentifiabilityStudyReserved3592 = 3592, kIdentifiabilityStudyReserved3593 = 3593, kIdentifiabilityStudyReserved3594 = 3594, kIdentifiabilityStudyReserved3595 = 3595, kIdentifiabilityStudyReserved3596 = 3596, kIdentifiabilityStudyReserved3597 = 3597, kIdentifiabilityStudyReserved3598 = 3598, kIdentifiabilityStudyReserved3599 = 3599, kIdentifiabilityStudyReserved3600 = 3600, kIdentifiabilityStudyReserved3601 = 3601, kIdentifiabilityStudyReserved3602 = 3602, kIdentifiabilityStudyReserved3603 = 3603, kIdentifiabilityStudyReserved3604 = 3604, kIdentifiabilityStudyReserved3605 = 3605, kIdentifiabilityStudyReserved3606 = 3606, kIdentifiabilityStudyReserved3607 = 3607, kIdentifiabilityStudyReserved3608 = 3608, kIdentifiabilityStudyReserved3609 = 3609, kBarcodeDetector_GetSupportedFormats = 3610, kIdentifiabilityStudyReserved3611 = 3611, kIdentifiabilityStudyReserved3612 = 3612, kIdentifiabilityStudyReserved3613 = 3613, kIdentifiabilityStudyReserved3614 = 3614, kIdentifiabilityStudyReserved3615 = 3615, kIdentifiabilityStudyReserved3616 = 3616, kIdentifiabilityStudyReserved3617 = 3617, kIdentifiabilityStudyReserved3618 = 3618, kIdentifiabilityStudyReserved3619 = 3619, kIdentifiabilityStudyReserved3620 = 3620, kIdentifiabilityStudyReserved3621 = 3621, kIdentifiabilityStudyReserved3622 = 3622, kIdentifiabilityStudyReserved3623 = 3623, kIdentifiabilityStudyReserved3624 = 3624, kIdentifiabilityStudyReserved3625 = 3625, kIdentifiabilityStudyReserved3626 = 3626, kIdentifiabilityStudyReserved3627 = 3627, kIdentifiabilityStudyReserved3628 = 3628, kIdentifiabilityStudyReserved3629 = 3629, kIdentifiabilityStudyReserved3630 = 3630, kIdentifiabilityStudyReserved3631 = 3631, kIdentifiabilityStudyReserved3632 = 3632, kIdentifiabilityStudyReserved3633 = 3633, kIdentifiabilityStudyReserved3634 = 3634, kIdentifiabilityStudyReserved3635 = 3635, kIdentifiabilityStudyReserved3636 = 3636, kIdentifiabilityStudyReserved3637 = 3637, kIdentifiabilityStudyReserved3638 = 3638, kIdentifiabilityStudyReserved3639 = 3639, kIdentifiabilityStudyReserved3640 = 3640, kIdentifiabilityStudyReserved3641 = 3641, kIdentifiabilityStudyReserved3642 = 3642, kIdentifiabilityStudyReserved3643 = 3643, kIdentifiabilityStudyReserved3644 = 3644, kIdentifiabilityStudyReserved3645 = 3645, kIdentifiabilityStudyReserved3646 = 3646, kIdentifiabilityStudyReserved3647 = 3647, kIdentifiabilityStudyReserved3648 = 3648, kIdentifiabilityStudyReserved3649 = 3649, kIdentifiabilityStudyReserved3650 = 3650, kIdentifiabilityStudyReserved3651 = 3651, kIdentifiabilityStudyReserved3652 = 3652, kIdentifiabilityStudyReserved3653 = 3653, kIdentifiabilityStudyReserved3654 = 3654, kIdentifiabilityStudyReserved3655 = 3655, kIdentifiabilityStudyReserved3656 = 3656, kIdentifiabilityStudyReserved3657 = 3657, kIdentifiabilityStudyReserved3658 = 3658, kIdentifiabilityStudyReserved3659 = 3659, kIdentifiabilityStudyReserved3660 = 3660, kIdentifiabilityStudyReserved3661 = 3661, kIdentifiabilityStudyReserved3662 = 3662, kIdentifiabilityStudyReserved3663 = 3663, kIdentifiabilityStudyReserved3664 = 3664, kIdentifiabilityStudyReserved3665 = 3665, kIdentifiabilityStudyReserved3666 = 3666, kIdentifiabilityStudyReserved3667 = 3667, kIdentifiabilityStudyReserved3668 = 3668, kIdentifiabilityStudyReserved3669 = 3669, kIdentifiabilityStudyReserved3670 = 3670, kIdentifiabilityStudyReserved3671 = 3671, kIdentifiabilityStudyReserved3672 = 3672, kIdentifiabilityStudyReserved3673 = 3673, kIdentifiabilityStudyReserved3674 = 3674, kIdentifiabilityStudyReserved3675 = 3675, kIdentifiabilityStudyReserved3676 = 3676, kIdentifiabilityStudyReserved3677 = 3677, kIdentifiabilityStudyReserved3678 = 3678, kIdentifiabilityStudyReserved3679 = 3679, kIdentifiabilityStudyReserved3680 = 3680, kIdentifiabilityStudyReserved3681 = 3681, kUndeferrableThirdPartySubresourceRequestWithCookie = 3682, kXRDepthSensing = 3683, kXRFrameGetDepthInformation = 3684, kXRCPUDepthInformationGetDepth = 3685, kXRCPUDepthInformationDataAttribute = 3686, kOBSOLETE_InterestCohortAPI_interestCohort_Method = 3687, kOBSOLETE_AddressSpaceLocalEmbeddedInPrivateSecureContext = 3688, kOBSOLETE_AddressSpaceLocalEmbeddedInPrivateNonSecureContext = 3689, kOBSOLETE_AddressSpaceLocalEmbeddedInPublicSecureContext = 3690, kOBSOLETE_AddressSpaceLocalEmbeddedInPublicNonSecureContext = 3691, kOBSOLETE_AddressSpaceLocalEmbeddedInUnknownSecureContext = 3692, kOBSOLETE_AddressSpaceLocalEmbeddedInUnknownNonSecureContext = 3693, kOBSOLETE_AddressSpacePrivateEmbeddedInPublicSecureContext = 3694, kOBSOLETE_AddressSpacePrivateEmbeddedInPublicNonSecureContext = 3695, kOBSOLETE_AddressSpacePrivateEmbeddedInUnknownSecureContext = 3696, kOBSOLETE_AddressSpacePrivateEmbeddedInUnknownNonSecureContext = 3697, kThirdPartyAccess = 3698, kThirdPartyActivation = 3699, kThirdPartyAccessAndActivation = 3700, kOBSOLETE_FullscreenAllowedByScreensChange = 3701, kNewLayoutOverflowDifferentBlock = 3702, kNewLayoutOverflowDifferentFlex = 3703, kNewLayoutOverflowDifferentAndAlreadyScrollsBlock = 3704, kNewLayoutOverflowDifferentAndAlreadyScrollsFlex = 3705, kUnicodeBidiPlainText = 3706, kColorSchemeDarkSupportedOnRoot = 3707, kWebBluetoothGetAvailability = 3708, kDigitalGoodsListPurchases = 3709, kCompositedSVG = 3710, kBarcodeDetectorDetect = 3711, kFaceDetectorDetect = 3712, kTextDetectorDetect = 3713, kOBSOLETE_LocalStorageFirstUsedBeforeFcp = 3714, kOBSOLETE_LocalStorageFirstUsedAfterFcp = 3715, kOBSOLETE_CSSPseudoHostCompoundList = 3716, kOBSOLETE_CSSPseudoHostContextCompoundList = 3717, kOBSOLETE_CSSPseudoHostDynamicSpecificity = 3718, kOBSOLETE_GetCurrentBrowsingContextMedia = 3719, kMouseEventRelativePositionForInlineElement = 3720, kV8SharedArrayBufferConstructedWithoutIsolation = 3721, kV8HTMLVideoElement_GetVideoPlaybackQuality_Method = 3722, kXRWebGLBindingGetReflectionCubeMap = 3723, kXRFrameGetLightEstimate = 3724, kV8HTMLDialogElement_Show_Method = 3725, kV8HTMLDialogElement_ShowModal_Method = 3726, kAdFrameDetected = 3727, kMediaStreamTrackGenerator = 3728, kMediaStreamTrackProcessor = 3729, kAddEventListenerWithAbortSignal = 3730, kXRSessionRequestLightProbe = 3731, kBeforematchRevealedHiddenMatchable = 3732, kAddSourceBufferUsingConfig = 3733, kChangeTypeUsingConfig = 3734, kV8SourceBuffer_AppendEncodedChunks_Method = 3735, kOversrollBehaviorOnViewportBreaks = 3736, kSameOriginJsonTypeForScript = 3737, kCrossOriginJsonTypeForScript = 3738, kSameOriginStrictNosniffWouldBlock = 3739, kCrossOriginStrictNosniffWouldBlock = 3740, kCSSSelectorPseudoDir = 3741, kCrossOriginSubframeWithoutEmbeddingControl = 3742, kReadableStreamWithByteSource = 3743, kReadableStreamBYOBReader = 3744, kSamePartyCookieAttribute = 3746, kSamePartyCookieExclusionOverruledSameSite = 3747, kSamePartyCookieInclusionOverruledSameSite = 3748, kEmbedElementWithoutTypeSrcChanged = 3749, kPaymentHandlerStandardizedPaymentMethodIdentifier = 3750, kWebCodecsAudioEncoder = 3751, kEmbeddedCrossOriginFrameWithoutFrameAncestorsOrXFO = 3752, kAddressSpaceLocalSecureContextEmbeddedLoopbackV2 = 3753, kAddressSpaceLocalNonSecureContextEmbeddedLoopbackV2 = 3754, kAddressSpacePublicSecureContextEmbeddedLoopbackV2 = 3755, kAddressSpacePublicNonSecureContextEmbeddedLoopbackV2 = 3756, kAddressSpacePublicSecureContextEmbeddedLocalV2 = 3757, kAddressSpacePublicNonSecureContextEmbeddedLocalV2 = 3758, kAddressSpaceUnknownSecureContextEmbeddedLoopbackV2 = 3759, kAddressSpaceUnknownNonSecureContextEmbeddedLoopbackV2 = 3760, kAddressSpaceUnknownSecureContextEmbeddedLocalV2 = 3761, kAddressSpaceUnknownNonSecureContextEmbeddedLocalV2 = 3762, kAddressSpaceLocalSecureContextNavigatedToLoopbackV2 = 3763, kAddressSpaceLocalNonSecureContextNavigatedToLoopbackV2 = 3764, kAddressSpacePublicSecureContextNavigatedToLoopbackV2 = 3765, kAddressSpacePublicNonSecureContextNavigatedToLoopbackV2 = 3766, kAddressSpacePublicSecureContextNavigatedToLocalV2 = 3767, kAddressSpacePublicNonSecureContextNavigatedToLocalV2 = 3768, kAddressSpaceUnknownSecureContextNavigatedToLoopbackV2 = 3769, kAddressSpaceUnknownNonSecureContextNavigatedToLoopbackV2 = 3770, kAddressSpaceUnknownSecureContextNavigatedToLocalV2 = 3771, kAddressSpaceUnknownNonSecureContextNavigatedToLocalV2 = 3772, kOBSOLETE_RTCPeerConnectionSdpSemanticsPlanB = 3773, kFetchRespondWithNoResponseWithUsedRequestBody = 3774, kV8TCPSocket_Close_Method = 3775, kV8TCPSocket_Readable_AttributeGetter = 3776, kV8TCPSocket_Writable_AttributeGetter = 3777, kV8TCPSocket_RemoteAddress_AttributeGetter = 3778, kV8TCPSocket_RemotePort_AttributeGetter = 3779, kCSSSelectorTargetText = 3780, kOBSOLETE_PopoverAttribute = 3781, kOBSOLETE_V8HTMLPopupElement_Show_Method = 3782, kOBSOLETE_V8HTMLPopupElement_Hide_Method = 3783, kOBSOLETE_WindowOpenWithAdditionalBoolParameter = 3784, kOBSOLETE_RTCPeerConnectionConstructedWithPlanB = 3785, kOBSOLETE_RTCPeerConnectionConstructedWithUnifiedPlan = 3786, kOBSOLETE_RTCPeerConnectionUsingComplexPlanB = 3787, kOBSOLETE_RTCPeerConnectionUsingComplexUnifiedPlan = 3788, kWindowScreenIsExtended = 3789, kWindowScreenChange = 3790, kXRWebGLDepthInformationTextureAttribute = 3791, kXRWebGLBindingGetDepthInformation = 3792, kOBSOLETE_SessionStorageFirstUsedBeforeFcp = 3793, kOBSOLETE_SessionStorageFirstUsedAfterFcp = 3794, kGravitySensorConstructor = 3795, kElementInternalsStates = 3796, kWebPImage = 3797, kAVIFImage = 3798, kSVGTextEdited = 3799, kV8WasmExceptionHandling = 3800, kOverflowClipAlongEitherAxis = 3803, kCreateJSONModuleScript = 3804, kCreateCSSModuleScript = 3805, kInsertHTMLCommandOnInput = 3806, kInsertHTMLCommandOnTextarea = 3807, kInsertHTMLCommandOnReadWritePlainText = 3808, kCSSAtRuleCounterStyle = 3809, kCanvasUseColorSpace = 3810, kOBSOLETE_SelectListElement = 3811, kOBSOLETE_RTCPeerConnectionSdpSemanticsPlanBWithReverseOriginTrial = 3812, kWebAppManifestCaptureLinks = 3813, kSanitizerAPICreated = 3814, kSanitizerAPIDefaultConfiguration = 3815, kOBSOLETE_SanitizerAPIToString = 3816, kSanitizerAPIToFragment = 3817, kSanitizerAPIActionTaken = 3818, kSanitizerAPIFromString = 3819, kSanitizerAPIFromDocument = 3820, kSanitizerAPIFromFragment = 3821, kOBSOLETE_StorageFoundationOpen = 3822, kOBSOLETE_StorageFoundationRead = 3823, kOBSOLETE_StorageFoundationReadSync = 3824, kOBSOLETE_StorageFoundationWrite = 3825, kOBSOLETE_StorageFoundationWriteSync = 3826, kOBSOLETE_StorageFoundationFlush = 3827, kOBSOLETE_StorageFoundationFlushSync = 3828, kUnrestrictedSharedArrayBuffer = 3829, kFeaturePolicyJSAPIAllowsFeatureIFrame = 3830, kFeaturePolicyJSAPIAllowsFeatureDocument = 3831, kFeaturePolicyJSAPIAllowsFeatureOriginIFrame = 3832, kFeaturePolicyJSAPIAllowsFeatureOriginDocument = 3833, kFeaturePolicyJSAPIAllowedFeaturesIFrame = 3834, kFeaturePolicyJSAPIAllowedFeaturesDocument = 3835, kFeaturePolicyJSAPIFeaturesIFrame = 3836, kFeaturePolicyJSAPIFeaturesDocument = 3837, kFeaturePolicyJSAPIGetAllowlistIFrame = 3838, kFeaturePolicyJSAPIGetAllowlistDocument = 3839, kOBSOLETE_V8Screens_Onchange_AttributeGetter = 3840, kOBSOLETE_V8Screens_Onchange_AttributeSetter = 3841, kV8ScreenDetailed_Left_AttributeGetter = 3842, kV8ScreenDetailed_Top_AttributeGetter = 3843, kV8ScreenDetailed_IsPrimary_AttributeGetter = 3844, kV8ScreenDetailed_IsInternal_AttributeGetter = 3845, kV8ScreenDetailed_DevicePixelRatio_AttributeGetter = 3846, kV8ScreenDetailed_Id_AttributeGetter = 3847, kV8ScreenDetailed_PointerTypes_AttributeGetter = 3848, kV8ScreenDetailed_Label_AttributeGetter = 3849, kPermissionsPolicyHeader = 3850, kOBSOLETE_WebAppManifestUrlHandlers = 3851, kLaxAllowingUnsafeCookies = 3852, kV8MediaSession_SetMicrophoneActive_Method = 3853, kV8MediaSession_SetCameraActive_Method = 3854, kV8Navigator_JoinAdInterestGroup_Method = 3855, kV8Navigator_LeaveAdInterestGroup_Method = 3856, kV8Navigator_RunAdAuction_Method = 3857, kXHRJSONEncodingDetection = 3858, kWorkerControlledByServiceWorkerOutOfScope = 3859, kXRPlaneDetection = 3860, kXRFrameDetectedPlanes = 3861, kXRImageTracking = 3862, kXRSessionGetTrackedImageScores = 3863, kXRFrameGetImageTrackingResults = 3864, kOBSOLETE_OpenWebDatabaseThirdPartyContext = 3865, kPointerId = 3866, kTransform3dScene = 3867, kPrefersColorSchemeMediaFeature = 3868, kPrefersContrastMediaFeature = 3869, kForcedColorsMediaFeature = 3870, kPaymentRequestCSPViolation = 3871, kWorkerControlledByServiceWorkerWithFetchEventHandlerOutOfScope = 3872, kAuthorizationCoveredByWildcard = 3873, kOBSOLETE_ElementGetInnerHTML = 3874, kFileHandlingLaunch = 3875, kSameOriginDocumentsWithDifferentCOOPStatus = 3876, kHTMLMediaElementSetSinkId = 3877, kPrefixedStorageQuotaThirdPartyContext = 3878, kRequestedFileSystemPersistentThirdPartyContext = 3879, kPrefixedStorageInfoThirdPartyContext = 3880, kCrossOriginEmbedderPolicyCredentialless = 3881, kPostMessageFromSecureToSecure = 3882, kPostMessageFromInsecureToInsecure = 3883, kWebAppManifestProtocolHandlers = 3884, kRTCPeerConnectionOfferAllowExtmapMixedFalse = 3885, kOBSOLETE_NewCanvas2DAPI = 3886, kOBSOLETE_ServiceWorkerSubresourceFilterBypassedRequest = 3887, kWebGPURequestAdapter = 3888, kCSSFilterColorMatrix = 3889, kHTMLFencedFrameElement = 3890, kCSSFilterLuminanceToAlpha = 3891, kHandwritingRecognitionCreateRecognizer = 3892, kOBSOLETE_HandwritingRecognitionQuerySupport = 3893, kHandwritingRecognitionStartDrawing = 3894, kHandwritingRecognitionGetPrediction = 3895, kWebBluetoothManufacturerDataFilter = 3896, kSanitizerAPIGetConfig = 3897, kSanitizerAPIGetDefaultConfig = 3898, kPressureObserver_Constructor = 3899, kPressureObserver_Observe = 3900, kOBSOLETE_ComputePressureObserver_Stop = 3901, kWebAppWindowControlsOverlay = 3902, kPaymentRequestShowWithoutGestureOrToken = 3903, kV8Navigator_UpdateAdInterestGroups_Method = 3904, kV8ScreenDetails_Onscreenschange_AttributeGetter = 3905, kV8ScreenDetails_Onscreenschange_AttributeSetter = 3906, kV8ScreenDetails_Oncurrentscreenchange_AttributeGetter = 3907, kV8ScreenDetails_Oncurrentscreenchange_AttributeSetter = 3908, kRTCOfferAnswerOptionsVoiceActivityDetection = 3909, kMultiColAndListItem = 3910, kCaptureHandle = 3911, kSVGText = 3912, kGetBBoxForText = 3913, kSVGTextHangingFromPath = 3914, kClientHintsPrefersColorScheme = 3915, kOverscrollBehaviorWillBeFixed = 3916, kControlledWorkerWillBeUncontrolled = 3917, kOBSOLETE_kARIATouchpassthroughAttribute = 3918, kARIAVirtualcontentAttribute = 3919, kOBSOLETE_kAccessibilityTouchPassthroughSet = 3920, kTextFragmentBlockedByForceLoadAtTop = 3921, kOBSOLETE_UrnDocumentAccessedCookies = 3922, kFontFaceAscentOverride = 3923, kFontFaceDescentOverride = 3924, kFontFaceLineGapOverride = 3925, kFontFaceSizeAdjust = 3926, kHiddenBackfaceWith3D = 3927, kMainFrameNonSecurePrivateAddressSpace = 3928, kHTMLMediaElementControlsListNoPlaybackRate = 3930, kOBSOLETE_DocumentTransition = 3931, kSpeculationRules = 3932, kV8AbortSignal_Abort_Method = 3933, kOBSOLETE_SelectionBackgroundColorInversion = 3934, kOBSOLETE_RTCPeerConnectionPlanBThrewAnException = 3935, kHTMLRootContained = 3936, kHTMLBodyContained = 3937, kXRFrameGetJointPose = 3938, kXRFrameFillJointRadii = 3939, kXRFrameFillPoses = 3940, kOBSOLETE_kWindowOpenNewPopupBehaviorMismatch = 3941, kOBSOLETE_kExplicitPointerCaptureClickTargetDiff = 3942, kControlledNonBlobURLWorkerWillBeUncontrolled = 3943, kMediaMetaThemeColor = 3944, kClientHintsUABitness = 3945, kDifferentPerspectiveCBOrParent = 3946, kWebkitImageSet = 3947, kRTCPeerConnectionWithBlockingCsp = 3948, kSanitizerAPISanitizeFor = 3949, kSanitizerAPIElementSetSanitized = 3950, kTextShadowInHighlightPseudo = 3951, kTextShadowNotNoneInHighlightPseudo = 3952, kSameSiteNoneRequired = 3953, kSameSiteNoneIncludedBySamePartyTopResource = 3954, kSameSiteNoneIncludedBySamePartyAncestors = 3955, kSameSiteNoneIncludedBySameSiteLax = 3956, kSameSiteNoneIncludedBySameSiteStrict = 3957, kOBSOLETE_PrivateNetworkAccessNonSecureContextsAllowedDeprecationTrial = 3958, kV8URLPattern_Constructor = 3959, kV8URLPattern_Test_Method = 3960, kV8URLPattern_Exec_Method = 3961, kSameSiteCookieInclusionChangedByCrossSiteRedirect = 3962, kOBSOLETE_BlobStoreAccessAcrossAgentClustersInResolveAsURLLoaderFactory = 3963, kOBSOLETE_BlobStoreAccessAcrossAgentClustersInResolveForNavigation = 3964, kTapDelayEnabled = 3965, kV8URLPattern_CompareComponent_Method = 3966, kEarlyHintsPreload = 3967, kOBSOLETE_ClientHintsUAReduced = 3968, kSpeculationRulesPrerender = 3969, kOBSOLETE_ExecCommandWithTrustedTypes = 3970, kOBSOLETE_CSSSelectorPseudoHasInSnapshotProfile = 3971, kOBSOLETE_CSSSelectorPseudoHasInLiveProfile = 3972, kNavigatorPdfViewerEnabled = 3973, kCanvasRenderingContext2DContextLostEvent = 3974, kCanvasRenderingContext2DContextRestoredEvent = 3975, kClientHintsViewportHeight = 3976, kV8NavigatorManagedData_GetDirectoryId_Method = 3977, kV8NavigatorManagedData_GetHostname_Method = 3978, kV8NavigatorManagedData_GetSerialNumber_Method = 3979, kV8NavigatorManagedData_GetAnnotatedAssetId_Method = 3980, kV8NavigatorManagedData_GetAnnotatedLocation_Method = 3981, kOBSOLETE_UserDataFieldFilledPreviously = 3982, kTableCollapsedBorderDifferentToVisual = 3983, kHighlightAPIRegisterHighlight = 3984, kOBSOLETE_ReadOrWriteWebDatabaseThirdPartyContext = 3985, kOBSOLETE_FontSelectorCSSFontFamilyWebKitPrefixPictograph = 3986, kOBSOLETE_FontSelectorCSSFontFamilyWebKitPrefixStandard = 3987, kFontSelectorCSSFontFamilyWebKitPrefixBody = 3988, kFontBuilderCSSFontFamilyWebKitPrefixBody = 3989, kCapabilityDelegationOfPaymentRequest = 3990, kCredentialManagerGetLegacyFederatedCredential = 3992, kCredentialManagerGetPasswordCredential = 3993, kCredentialManagerStoreFederatedCredential = 3994, kCredentialManagerStorePasswordCredential = 3995, kCredentialManagerCreateFederatedCredential = 3996, kCredentialManagerCreatePasswordCredential = 3997, kCanvasRenderingContext2DRoundRect = 3998, kNewLayoutOverflowDifferentBlockWithNonEmptyInflowBounds = 3999, kCanvasRenderingContext2DReset = 4000, kCanvasRenderingContext2DLetterSpacing = 4001, kCanvasRenderingContext2DWordSpacing = 4002, kCanvasRenderingContext2DFontVariantCaps = 4003, kCanvasRenderingContext2DFontKerning = 4004, kCanvasRenderingContext2DFontStretch = 4005, kCanvasRenderingContext2DTextRendering = 4006, kCSSCascadeLayers = 4007, kCanvasRenderingContext2DConicGradient = 4008, kCanvasRenderingContext2DCanvasFilter = 4009, kOBSOLETE_HTMLParamElementURLParameter = 4010, kV8HTMLScriptElement_Supports_Method = 4011, kHandwritingRecognitionQueryRecognizer = 4012, kV8FileSystemFileHandle_CreateSyncAccessHandle_Method = 4013, kV8FileSystemSyncAccessHandle_Read_Method = 4014, kV8FileSystemSyncAccessHandle_Write_Method = 4015, kV8FileSystemSyncAccessHandle_Close_Method = 4016, kV8FileSystemSyncAccessHandle_Flush_Method = 4017, kV8FileSystemSyncAccessHandle_GetSize_Method = 4018, kV8FileSystemSyncAccessHandle_Truncate_Method = 4019, kV8SharedArrayBufferConstructedInExtensionWithoutIsolation = 4020, kMediaSourceExtensionsForWebCodecs = 4021, kPaymentRequestResponse = 4023, kPaymentRequestComplete = 4024, kHTMLCanvasElement_2D = 4025, kHTMLCanvasElement_WebGL = 4026, kHTMLCanvasElement_WebGL2 = 4027, kHTMLCanvasElement_BitmapRenderer = 4028, kHTMLCanvasElement_WebGPU = 4029, kOffscreenCanvas_2D = 4030, kOffscreenCanvas_WebGL = 4031, kOffscreenCanvas_WebGL2 = 4032, kOffscreenCanvas_BitmapRenderer = 4033, kOffscreenCanvas_WebGPU = 4034, kCanvasRenderingContext2DHasOverdraw = 4035, kDigitalGoodsConsume = 4036, kDigitalGoodsListPurchaseHistory = 4037, kWebShareContainingFiles = 4038, kWebShareContainingTitle = 4039, kWebShareContainingText = 4040, kWebShareContainingUrl = 4041, kCoepNoneSharedWorker = 4042, kCoepRequireCorpSharedWorker = 4043, kCoepCredentiallessSharedWorker = 4044, kPaymentRequestBasicCard = 4045, kClientHintsDeviceMemory = 4046, kClientHintsDPR = 4047, kClientHintsResourceWidth = 4048, kClientHintsViewportWidth = 4049, kInlineBoxIgnoringContinuation = 4050, kOBSOLETE_OffsetWidthOrHeightIgnoringContinuation = 4051, kConditionalFocus = 4052, kV8Navigator_CreateAdRequest_Method = 4053, kV8Navigator_FinalizeAd_Method = 4054, kRegionCapture = 4055, kNavigationAPI = 4056, kFlexboxAlignSingleLineDifference = 4057, kExternalProtocolBlockedBySandbox = 4058, kOBSOLETE_WebAssemblyDynamicTiering = 4059, kReadOrWriteWebDatabase = 4061, kAutoDarkMode = 4062, kHttpRefreshWhenScriptingDisabled = 4063, kV8FragmentDirective_Items_AttributeGetter = 4064, kV8FragmentDirective_CreateSelectorDirective_Method = 4065, kCSSTransitionBlockedByAnimation = 4066, kWebAppManifestHasComments = 4067, kAutoExpandedDetailsForFindInPage = 4068, kAutoExpandedDetailsForScrollToTextFragment = 4069, kOBSOLETE_WebCodecsVideoFrameDefaultTimestamp = 4070, kWebCodecsVideoFrameFromImage = 4071, kWebCodecsVideoFrameFromBuffer = 4072, kOBSOLETE_OpenWebDatabaseInsecureContext = 4073, kScriptWebBundle = 4074, kOBSOLETE_kRunAdAuction = 4075, kOBSOLETE_kJoinAdInterestGroup = 4076, kFileSystemUrlNavigation = 4077, kV8Navigator_AdAuctionComponents_Method = 4078, kClientHintsUAFullVersionList = 4079, kWebAppManifestLaunchHandler = 4080, kOBSOLETE_ClientHintsMetaNameAcceptCH = 4081, kOBSOLETE_CSSMatchMediaUnknown = 4082, kOBSOLETE_CSSMediaListUnknown = 4083, kOBSOLETE_CSSOMMediaConditionUnknown = 4084, kDocumentDomainSettingWithoutOriginAgentClusterHeader = 4085, kCrossOriginEmbedderPolicyCredentiallessReportOnly = 4086, kCrossOriginEmbedderPolicyRequireCorpReportOnly = 4087, kCoopAndCoepIsolatedReportOnly = 4088, kCrossOriginOpenerPolicySameOriginAllowPopupsReportOnly = 4089, kCrossOriginOpenerPolicySameOriginReportOnly = 4090, kImageLoadAtDismissalEvent = 4091, kOBSOLETE_PrivateNetworkAccessIgnoredPreflightError = 4092, kAbortPaymentRespondWithTrue = 4093, kAllowPaymentRequestAttributeHasEffect = 4094, kV8PaymentResponse_Retry_Method = 4095, kOBSOLETE_kWebAppManifestUserPreferences = 4096, kV8HTMLInputElement_ShowPicker_Method = 4097, kLayerXYWithMediaTarget = 4098, kLayerXYWithCanvasTarget = 4099, kLayerXYWithFrameTarget = 4100, kLayerXYWithSVGTarget = 4101, kHTMLObjectElementFallback = 4102, kSecureContextIncorrectForWorker = 4103, kV8UDPSocket_Close_Method = 4104, kHTMLInputElementSimulatedClick = 4105, kRTCLocalSdpModificationIceUfragPwd = 4106, kWebNfcNdefMakeReadOnly = 4107, kV8Navigator_DeprecatedURNToURL_Method = 4108, kOBSOLETE_WebAppManifestHandleLinks = 4109, kOBSOLETE_HTMLParamElementURLParameterInUsePdf = 4110, kOBSOLETE_HTMLParamElementURLParameterInUseNonPdf = 4111, kWebTransportServerCertificateHashes = 4112, kHiddenAttribute = 4113, kHiddenUntilFoundAttribute = 4114, kWindowProxyCrossOriginAccessBlur = 4115, kWindowProxyCrossOriginAccessClose = 4116, kWindowProxyCrossOriginAccessClosed = 4117, kWindowProxyCrossOriginAccessFocus = 4118, kWindowProxyCrossOriginAccessFrames = 4119, kWindowProxyCrossOriginAccessIndexedGetter = 4120, kWindowProxyCrossOriginAccessLength = 4121, kWindowProxyCrossOriginAccessLocation = 4122, kWindowProxyCrossOriginAccessNamedGetter = 4123, kWindowProxyCrossOriginAccessOpener = 4124, kWindowProxyCrossOriginAccessParent = 4125, kWindowProxyCrossOriginAccessPostMessage = 4126, kWindowProxyCrossOriginAccessSelf = 4127, kWindowProxyCrossOriginAccessTop = 4128, kWindowProxyCrossOriginAccessWindow = 4129, kWindowProxyCrossOriginAccessFromOtherPageBlur = 4130, kWindowProxyCrossOriginAccessFromOtherPageClose = 4131, kWindowProxyCrossOriginAccessFromOtherPageClosed = 4132, kWindowProxyCrossOriginAccessFromOtherPageFocus = 4133, kWindowProxyCrossOriginAccessFromOtherPageFrames = 4134, kWindowProxyCrossOriginAccessFromOtherPageIndexedGetter = 4135, kWindowProxyCrossOriginAccessFromOtherPageLength = 4136, kWindowProxyCrossOriginAccessFromOtherPageLocation = 4137, kWindowProxyCrossOriginAccessFromOtherPageNamedGetter = 4138, kWindowProxyCrossOriginAccessFromOtherPageOpener = 4139, kWindowProxyCrossOriginAccessFromOtherPageParent = 4140, kWindowProxyCrossOriginAccessFromOtherPagePostMessage = 4141, kWindowProxyCrossOriginAccessFromOtherPageSelf = 4142, kWindowProxyCrossOriginAccessFromOtherPageTop = 4143, kWindowProxyCrossOriginAccessFromOtherPageWindow = 4144, kPrivateNetworkAccessFetchedWorkerScript = 4145, kFrameNameContainsBrace = 4146, kFrameNameContainsNewline = 4147, kAbortSignalThrowIfAborted = 4148, kOBSOLETE_ClientHintsUAFull = 4149, kPrivateNetworkAccessWithinWorker = 4150, kClientHintsUAWoW64 = 4151, kFetchSetCookieInRequestGuardedHeaders = 4152, kOBSOLETE_V8Window_RequestPictureInPictureWindow_Method = 4153, kV8UDPSocket_LocalPort_AttributeGetter = 4154, kV8UDPSocket_Readable_AttributeGetter = 4155, kV8UDPSocket_RemoteAddress_AttributeGetter = 4156, kV8UDPSocket_RemotePort_AttributeGetter = 4157, kV8UDPSocket_Writable_AttributeGetter = 4158, kAbortSignalTimeout = 4159, kOBSOLETE_ClientHintsPartitionedCookies = 4160, kV8Document_Prerendering_AttributeGetter = 4161, kV8Document_Onprerenderingchange_AttributeGetter = 4162, kV8Document_Onprerenderingchange_AttributeSetter = 4163, kCSSAtRuleFontPaletteValues = 4164, kCSSAtRuleContainer = 4165, kFedCm = 4166, kFetchEventSourceLastEventIdCorsUnSafe = 4167, kWrongBaselineOfMultiLineButtonWithNonSpace = 4168, kOBSOLETE_BlobStoreAccessAcrossTopLevelSite = 4169, kOBSOLETE_BlobStoreAccessUnknownTopLevelSite = 4170, kCrossOriginAccessBasedOnDocumentDomain = 4171, kCookieWithTruncatingChar = 4172, kVideoTrackGenerator = 4173, kMediaCapabilitiesDecodingInfoWebrtc = 4174, kMediaCapabilitiesEncodingInfoWebrtc = 4175, kUsbDeviceForget = 4176, kPartitionedCookies = 4177, kSecureContextIncorrectForSharedWorker = 4178, kV8FunctionPrototypeArguments = 4179, kV8FunctionPrototypeCaller = 4180, kBluetoothDeviceForget = 4181, kTopicsAPI_BrowsingTopics_Method = 4182, kBlockingAttributeRenderToken = 4183, kPressureObserver_Unobserve = 4184, kPressureObserver_Disconnect = 4185, kPressureObserver_TakeRecords = 4186, kPrivacySandboxAdsAPIs = 4187, kFledge = 4188, kElementShowPopover = 4189, kElementHidePopover = 4190, kOBSOLETE_ValidPopoverAttribute = 4191, kDeprecationExample = 4192, kRTCLocalSdpModificationOpusStereo = 4193, kNavigatorUAData_Mobile = 4194, kNavigatorUAData_Platform = 4195, kNavigatorUAData_Brands = 4196, kOldConstraintsParsed = 4197, kOBSOLETE_OldConstraintNotReported = 4198, kOBSOLETE_OldConstraintRejected = 4199, kOBSOLETE_OldConstraintIgnored = 4200, kExplicitOverflowVisibleOnReplacedElement = 4201, kExplicitOverflowVisibleOnReplacedElementWithObjectProp = 4202, kPrivateNetworkAccessNullIpAddress = 4203, kOBSOLETE_LegacyConstraintGoogScreencastMinBitrate = 4204, kOBSOLETE_RTCPeerConnectionLegacyCreateWithMediaConstraints = 4205, kClientHintsSaveData = 4206, kOBSOLETE_LegacyConstraintGoogIPv6 = 4207, kOBSOLETE_LegacyConstraintGoogSuspendBelowMinBitrate = 4208, kOBSOLETE_LegacyConstraintGoogCpuOveruseDetection = 4209, kAudioContextOutputLatency = 4210, kV8Window_QueryLocalFonts_Method = 4211, kCSSAtRuleScope = 4212, kOBSOLETE_DeferredShapingDisabledByPositioned = 4213, kCapabilityDelegationOfFullscreenRequest = 4214, kSerialPortForget = 4215, kCookieHasNotBeenRefreshedIn201To300Days = 4216, kCookieHasNotBeenRefreshedIn301To350Days = 4217, kCookieHasNotBeenRefreshedIn351To400Days = 4218, kAnonymousIframe = 4219, kOBSOLETE_GestureScrollStart = 4220, kOBSOLETE_GestureScrollUpdate = 4221, kOBSOLETE_GestureScrollEnd = 4222, kArrayBufferTooBigForWebAPI = 4223, kFedCmDisconnect = 4224, kOBSOLETE_FedCmLogout = 4225, kOBSOLETE_FedCmLogoutRps = 4226, kV8Navigator_DeprecatedReplaceInURN_Method = 4227, kWebAppBorderless = 4228, kPaymentInstruments = 4229, kV8PaymentInstruments_Clear_Method = 4230, kV8PaymentInstruments_Delete_Method = 4231, kV8PaymentInstruments_Get_Method = 4232, kV8PaymentInstruments_Has_Method = 4233, kV8PaymentInstruments_Keys_Method = 4234, kV8PaymentInstruments_Set_Method = 4235, kPerformanceMeasureFindExistingName = 4236, kFlexboxNewAbsPos = 4237, kScriptSchedulingType_Defer = 4238, kScriptSchedulingType_ParserBlocking = 4239, kScriptSchedulingType_ParserBlockingInline = 4240, kScriptSchedulingType_InOrder = 4241, kScriptSchedulingType_Async = 4242, kFocusgroup = 4243, kV8HTMLElement_Focusgroup_AttributeGetter = 4244, kV8HTMLElement_Focusgroup_AttributeSetter = 4245, kV8MathMLElement_Focusgroup_AttributeGetter = 4246, kV8MathMLElement_Focusgroup_AttributeSetter = 4247, kV8SVGElement_Focusgroup_AttributeGetter = 4248, kV8SVGElement_Focusgroup_AttributeSetter = 4249, kCSSLegacyPerspectiveOrigin = 4250, kCSSLegacyTransformOrigin = 4251, kCSSLegacyBorderImage = 4252, kCSSLegacyBorderImageWidth = 4253, kCrossOriginOpenerPolicyRestrictProperties = 4254, kCrossOriginOpenerPolicyRestrictPropertiesReportOnly = 4255, kEventTimingInteractionId = 4256, kSecurePaymentConfirmationOptOut = 4257, kOBSOLETE_AnyPopoverAttribute = 4258, kOBSOLETE_DeferredShapingWorked = 4259, kOBSOLETE_DeferredShapingReshapedByForceLayout = 4260, kMediaSourceGetHandle = 4261, kIdentityInCanMakePaymentEvent = 4262, kSharedStorageAPI_SharedStorage_DOMReference = 4263, kSharedStorageAPI_AddModule_Method = 4264, kSharedStorageAPI_Set_Method = 4265, kSharedStorageAPI_Append_Method = 4266, kSharedStorageAPI_Delete_Method = 4267, kSharedStorageAPI_Clear_Method = 4268, kSharedStorageAPI_SelectURL_Method = 4269, kSharedStorageAPI_Run_Method = 4270, kViewTimelineConstructor = 4271, kOBSOLETE_H1UserAgentFontSizeInSectionApplied = 4272, kOBSOLETE_kV8PendingBeacon_Constructor = 4273, kOBSOLETE_kV8PendingBeacon_Url_AttributeGetter = 4274, kOBSOLETE_kV8PendingBeacon_Url_AttributeSetter = 4275, kOBSOLETE_kV8PendingBeacon_Method_AttributeGetter = 4276, kOBSOLETE_kV8PendingBeacon_Method_AttributeSetter = 4277, kOBSOLETE_kV8PendingBeacon_PageHideTimeout_AttributeGetter = 4278, kOBSOLETE_kV8PendingBeacon_PageHideTimeout_AttributeSetter = 4279, kOBSOLETE_kV8PendingBeacon_State_AttributeGetter = 4280, kOBSOLETE_kV8PendingBeacon_Deactivate_Method = 4281, kOBSOLETE_kV8PendingBeacon_SetData_Method = 4282, kOBSOLETE_kV8PendingBeacon_SendNow_Method = 4283, kTabSharingBarSwitchToCapturer = 4284, kTabSharingBarSwitchToCapturee = 4285, kOBSOLATE_AutomaticLazyAds = 4286, kOBSOLATE_AutomaticLazyEmbeds = 4287, kOBSOLETE_TouchActionChangedAtPointerDown = 4288, kDeviceOrientationPermissionRequested = 4289, kDeviceOrientationUsedWithoutPermissionRequest = 4290, kDeviceMotionPermissionRequested = 4291, kDeviceMotionUsedWithoutPermissionRequest = 4292, kOBSOLETE_PrivateNetworkAccessPermissionPrompt = 4293, kPseudoBeforeAfterForDateTimeInputElement = 4294, kOBSOLETE_kV8PendingBeacon_IsPending_AttributeGetter = 4295, kParentOfDisabledFormControlRespondsToMouseEvents = 4296, kUnhandledExceptionCountInMainThread = 4297, kUnhandledExceptionCountInWorker = 4298, kOBSOLETE_WebCodecsImageDecoderPremultiplyAlphaDeprecation = 4299, kCookieDomainNonASCII = 4300, kClientHintsMetaEquivDelegateCH = 4301, kOBSOLETE_ExpectCTHeader = 4302, kOBSOLETE_kNavigateEventTransitionWhile = 4303, kOBSOLETE_kNavigateEventRestoreScroll = 4304, kSendBeaconWithArrayBuffer = 4305, kSendBeaconWithArrayBufferView = 4306, kSendBeaconWithBlob = 4307, kSendBeaconWithFormData = 4308, kSendBeaconWithURLSearchParams = 4309, kSendBeaconWithUSVString = 4310, kReplacedElementPaintedWithOverflow = 4311, kOBSOLETE_kImageAd = 4312, kLinkRelPrefetchAsDocumentSameOrigin = 4313, kLinkRelPrefetchAsDocumentCrossOrigin = 4314, kPersistentQuotaType = 4315, kCrossOriginScrollIntoView = 4316, kLinkRelCanonical = 4317, kCredentialManagerIsConditionalMediationAvailable = 4318, kOBSOLETE_kV8PendingBeacon_Pending_AttributeGetter = 4319, kOBSOLETE_kV8PendingBeacon_BackgroundTimeout_AttributeGetter = 4320, kOBSOLETE_kV8PendingBeacon_BackgroundTimeout_AttributeSetter = 4321, kOBSOLETE_kV8PendingBeacon_Timeout_AttributeGetter = 4322, kOBSOLETE_kV8PendingBeacon_Timeout_AttributeSetter = 4323, kOBSOLETE_kV8PendingGetBeacon_Constructor = 4324, kOBSOLETE_kV8PendingGetBeacon_SetURL_Method = 4325, kOBSOLETE_kV8PendingPostBeacon_Constructor = 4326, kOBSOLETE_kV8PendingPostBeacon_SetData_Method = 4327, kContentVisibilityAutoStateChangeHandlerRegistered = 4328, kReplacedElementPaintedWithLargeOverflow = 4329, kFlexboxAbsPosJustifyContent = 4330, kMultipleFetchHandlersInServiceWorker = 4331, kStorageAccessAPI_requestStorageAccessFor_Method = 4332, kPrivateAggregationApiAll = 4333, kPrivateAggregationApiFledge = 4334, kPrivateAggregationApiSharedStorage = 4335, kOBSOLETE_DeferredShaping2ReshapedByComputedStyle = 4336, kOBSOLETE_DeferredShaping2ReshapedByDomContentLoaded = 4337, kOBSOLETE_DeferredShaping2ReshapedByFcp = 4338, kOBSOLETE_DeferredShaping2DisabledByFragmentAnchor = 4339, kOBSOLETE_DeferredShaping2ReshapedByFocus = 4340, kOBSOLETE_DeferredShaping2ReshapedByGeometry = 4341, kOBSOLETE_DeferredShaping2ReshapedByInspector = 4342, kOBSOLETE_DeferredShaping2ReshapedByPrinting = 4343, kOBSOLETE_DeferredShaping2ReshapedByScrolling = 4344, kOBSOLETE_LCPCandidateImageFromOriginDirtyStyle = 4345, kV8TurboFanOsrCompileStarted = 4346, kV8Document_HasRedemptionRecord_Method = 4347, kOBSOLETE_DeferredShaping2ReshapedByLastResort = 4348, kAudioContextSinkId = 4349, kAudioContextSetSinkId = 4350, kViewportDependentLazyLoadedImageWithSizesAttribute = 4351, kXRWebGLBindingGetCameraImage = 4352, kOBSOLETE_SelectiveInOrderScript = 4353, kV8AsyncStackTaggingCreateTaskCall = 4354, kWebkitBoxWithoutWebkitLineClamp = 4355, kDataUrlInSvgUse = 4356, kWebAuthnConditionalUiGet = 4357, kWebAuthnConditionalUiGetSuccess = 4358, kWebAuthnRkRequiredCreationSuccess = 4359, kDestructiveDocumentWriteAfterModuleScript = 4360, kOBSOLETE_CSSAtSupportsDropInvalidWhileForgivingParsing = 4361, kPermissionsPolicyUnload = 4362, kServiceWorkerSkippedForSubresourceLoad = 4363, kClientHintsPrefersReducedMotion = 4364, kOBSOLETE_WakeLockAcquireScreenLockWithoutActivation = 4365, kInteractiveWidgetOverlaysContent = 4366, kInteractiveWidgetResizesContent = 4367, kInteractiveWidgetResizesVisual = 4368, kSerivceWorkerFallbackMainResource = 4369, kOBSOLETE_GetDisplayMediaWithoutUserActivation = 4370, kBackForwardCacheNotRestoredReasons = 4371, kCSSNesting = 4372, kSandboxIneffectiveAllowOriginAllowScript = 4373, kDocumentOpenDifferentWindow = 4374, kDocumentOpenMutateSandbox = 4375, kEligibleForImageLoadingPrioritizationFix = 4376, kExecutedNonTrivialJavaScriptURL = 4377, kStorageBucketsOpen = 4378, kPerformanceEntryBufferSwaps = 4379, kClearPerformanceEntries = 4380, kViewportDependentLazyLoadedImageWithoutSizesAttribute = 4381, kV8MediaStreamTrack_ApplyConstraints_Method = 4382, kViewTransition = 4383, kElementTogglePopover = 4384, kOBSOLETE_LayoutMediaInlineChildren = 4385, kOBSOLETE_ReduceAcceptLanguage = 4386, kOBSOLETE_UuidInPackageUrlNavigation = 4387, kCSSValueAppearanceMediaSliderRendered = 4388, kCSSValueAppearanceMediaSliderThumbRendered = 4389, kCSSValueAppearanceMediaVolumeSliderRendered = 4390, kCSSValueAppearanceMediaVolumeSliderThumbRendered = 4391, kV8PerformanceResourceTiming_DeliveryType_AttributeGetter = 4392, kDocumentLoaderDeliveryTypeNavigationalPrefetch = 4393, kSpeculationRulesHeader = 4394, kSpeculationRulesDocumentRules = 4395, kFedCmIframe = 4396, kV8DocumentPictureInPicture_RequestWindow_Method = 4397, kV8DocumentPictureInPicture_Window_AttributeGetter = 4398, kV8DocumentPictureInPictureEvent_Window_AttributeGetter = 4399, kDocumentPictureInPictureEnterEvent = 4400, kSoftNavigationHeuristics = 4401, kMathMLMathElement = 4402, kMathMLMathElementInDocument = 4403, kCSSAtRuleStylistic = 4404, kCSSAtRuleStyleset = 4405, kCSSAtRuleCharacterVariant = 4406, kCSSAtRuleSwash = 4407, kCSSAtRuleOrnaments = 4408, kCSSAtRuleAnnotation = 4409, kOBSOLETE_ServiceWorkerBypassFetchHandlerForMainResource = 4410, kV8Document_HasPrivateToken_Method = 4411, kServiceWorkerSkippedForEmptyFetchHandler = 4412, kImageSet = 4413, kWindowCloseHistoryLengthOne = 4414, kOBSOLETE_CreateNSResolverWithNonElements = 4415, kCSSValueAppearanceNonStandard = 4416, kOBSOLETE_CSSGetComputedAnimationDelayZero = 4417, kGetEffectTimingDelayZero = 4418, kScrollend = 4419, kDOMWindowOpenCrossOriginIframe = 4420, kStreamingDeclarativeShadowDOM = 4421, kOBSOLETE_DialogCloseWatcherCancelSkipped = 4422, kOBSOLETE_DialogCloseWatcherCancelSkippedAndDefaultPrevented = 4423, kOBSOLETE_DialogCloseWatcherCloseSignalClosedMultiple = 4424, kNoVarySearch = 4425, kFedCmUserInfo = 4426, kOBSOLETE_IDNA2008DeviationCharacterInHostnameOfSubresource = 4427, kOBSOLETE_IDNA2008DeviationCharacterInHostnameOfIFrame = 4428, kWindowOpenPopupOnMobile = 4429, kWindowOpenedAsPopupOnMobile = 4430, kOBSOLETE_PrivateNetworkAccessIgnoredCrossOriginPreflightError = 4431, kOBSOLETE_PrivateNetworkAccessIgnoredCrossSitePreflightError = 4432, kLinkRelPrerenderSameOrigin = 4433, kLinkRelPrerenderSameSiteCrossOrigin = 4434, kLinkRelPrerenderCrossSite = 4435, kCSSBackgroundClipBorder = 4436, kCSSBackgroundClipContent = 4437, kCSSBackgroundClipPadding = 4438, kOBSOLETE_DisableThirdPartySessionStoragePartitioningAfterGeneralPartitioning = 4439, kOBSOLETE_kCSSPseudoHasContainsMixOfValidAndInvalid = 4440, kOBSOLETE_kCSSPseudoIsWhereContainsMixOfValidAndInvalid = 4441, kPrivateNetworkAccessFetchedSubFrame = 4442, kPrivateNetworkAccessFetchedTopFrame = 4443, kOBSOLETE_DisableThirdPartyStoragePartitioning = 4444, kServiceWorkerFetchHandlerAddedAfterInitialization = 4445, kObsoleteCreateImageBitmapImageOrientationNone = 4446, kOBSOLETE_kWindowManagementPermissionDescriptorUsed = 4447, kOBSOLETE_kWindowPlacementPermissionDescriptorUsed = 4448, kOBSOLETE_kWindowManagementPermissionPolicyParsed = 4449, kOBSOLETE_kWindowPlacementPermissionPolicyParsed = 4450, kContentDispositionInSvgUse = 4451, kSameDocumentCrossOriginInitiator = 4452, kServiceWorkerFetchHandlerModifiedAfterInitialization = 4453, kOBSOLETE_OptionLabelInQuirksMode = 4454, kParseFromStringIncludeShadows = 4455, kWebAppManifestScopeExtensions = 4456, kOBSOLETE_ServiceWorkerBypassFetchHandlerForMainResourceByOriginTrial = 4457, kOBSOLETE_V8RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 4458, kFedCmAutoReauthn = 4459, kTopicsAPIFetch = 4460, kOBSOLETE_TopicsAPIXhr = 4461, kParseFromString = 4462, kOBSOLETE_HTMLPatternRegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 4463, kPopoverTypeAuto = 4464, kPopoverTypeManual = 4465, kPopoverTypeInvalid = 4466, kCSSAnchorPositioning = 4467, kServiceWorkerEventHandlerAddedAfterInitialization = 4468, kServiceWorkerEventHandlerModifiedAfterInitialization = 4469, kAuthorizationCrossOrigin = 4470, kCSSColorMixFunction = 4471, kOBSOLETE_CSSColorColorSpecifiedSpace = 4472, kOBSOLETE_CSSColorLabOklab = 4473, kOBSOLETE_CSSColorLchOklch = 4474, kOBSOLETE_CreateNSResolverWithNonElements2 = 4475, kGetDisplayMediaWithPreferCurrentTabTrue = 4476, kFencedFrameConfigAttribute = 4477, kURLSearchParams_Has_Delete_MultipleArguments = 4478, kPopoverTypeHint = 4480, kOBSOLETE_WebGPUWebCodecs = 4481, kRTCPeerConnectionLegacyGetStatsTrial = 4482, kExecutedEmptyJavaScriptURLFromFrame = 4483, kExecutedJavaScriptURLFromFrame = 4484, kOBSOLETE_ServiceWorkerBypassFetchHandlerForSubResource = 4485, kCSSAtRuleStartingStyle = 4486, kPrivateAggregationApiFledgeExtensions = 4487, kDeprecatedInterestGroupDailyUpdateUrl = 4488, kCSSColorGradientColorSpace = 4489, kDanglingMarkupInWindowName = 4490, kDanglingMarkupInWindowNameNotEndsWithNewLineOrGT = 4491, kDanglingMarkupInWindowNameNotEndsWithGT = 4492, kDanglingMarkupInTarget = 4493, kDanglingMarkupInTargetNotEndsWithGT = 4494, kDanglingMarkupInTargetNotEndsWithNewLineOrGT = 4495, kAttributionFencedFrameReportingBeacon = 4496, kIframeBrowsingTopicsAttribute = 4497, kSpeculationRulesSelectorMatches = 4498, kSpeculationRulesExplicitEagerness = 4499, kSpeculationRulesEagernessConservative = 4500, kSpeculationRulesEagernessModerate = 4501, kSpeculationRulesEagernessImmediate = 4502, kOBSOLETE_URLSetPortCheckOverflow = 4503, kV8Animation_RangeStart_AttributeGetter = 4504, kV8Animation_RangeStart_AttributeSetter = 4505, kV8Animation_RangeEnd_AttributeGetter = 4506, kV8Animation_RangeEnd_AttributeSetter = 4507, kV8StorageBucket_Persist_Method = 4508, kV8StorageBucket_Persisted_Method = 4509, kV8StorageBucket_Estimate_Method = 4510, kV8StorageBucket_Durability_Method = 4511, kV8StorageBucket_SetExpires_Method = 4512, kV8StorageBucket_Expires_Method = 4513, kV8StorageBucket_IndexedDB_AttributeGetter = 4514, kV8StorageBucket_Locks_AttributeGetter = 4515, kV8StorageBucket_Caches_AttributeGetter = 4516, kV8StorageBucket_GetDirectory_Method = 4517, kV8StorageBucketManager_Keys_Method = 4518, kV8StorageBucketManager_Delete_Method = 4519, kNavigatorUAData_GetHighEntropyValues = 4520, kSchedulerYield = 4521, kHtmlClipboardApiUnsanitizedRead = 4522, kHtmlClipboardApiUnsanitizedWrite = 4523, kAsyncClipboardAPIUnsanitizedRead = 4524, kOBSOLETE_WindowOpenFullscreenRequested = 4525, kOBSOLETE_FullscreenAllowedByWindowOpen = 4526, kOBSOLETE_AttributeValueContainsLtOrGt = 4527, kOBSOLETE_V8ImportAssertionDeprecatedSyntax = 4528, kImageCaptureBackgroundBlur = 4529, kPrivateNetworkAccessPreflightError = 4530, kPrivateNetworkAccessPreflightSuccess = 4531, kPrivateNetworkAccessPreflightWarning = 4532, kCSSGetComputedAnimationDurationZero = 4533, kCSSGetComputedWebkitFontSmoothingAnimationDurationZero = 4534, kDocumentOpenAliasedOriginDocumentDomain = 4535, kGamepadTouchEvents = 4536, kGamepadTouchTouchId = 4537, kGamepadTouchSurfaceId = 4538, kGamepadTouchPosition = 4539, kGamepadTouchSurfaceDimension = 4540, kSandboxViaFencedFrame = 4541, kVisibilityStateObserver = 4542, kV8CompileHintsMagicAll = 4543, kOBSOLETE_TextWrapBalance = 4544, kOBSOLETE_TextWrapBalanceFail = 4545, kAttributionReportingCrossAppWeb = 4546, kSecurePaymentConfirmationActivationlessShow = 4547, kOBSOLETE_ServiceWorkerBypassFetchHandlerForAllWithRaceNetworkRequest = 4548, kFlexIntrinsicSizesCacheMiss = 4549, kCSSStyleContainerQuery = 4550, kCSSValueAppearanceMediaSlider = 4551, kCSSValueAppearanceMediaSliderthumb = 4552, kCSSValueAppearanceMediaVolumeSlider = 4553, kCSSValueAppearanceMediaVolumeSliderthumb = 4554, kCSSValueAppearanceSliderHorizontal = 4555, kCSSValueAppearanceSliderVertical = 4556, kCSSValueAppearanceSliderthumbHorizontal = 4557, kCSSValueAppearanceSliderthumbVertical = 4558, kOBSOLETE_ServiceWorkerBypassFetchHandlerForAllWithRaceNetworkRequestByOriginTrial = 4559, kOBSOLETE_EventTimingPaintedPresentationPromiseResolvedWithEarlierPromiseUnresolved = 4560, kLinkRelPreloadAsFont = 4561, kCrossWindowAccessToBrowserGeneratedDocument = 4562, kSpeculationRulesNoVarySearchHint = 4563, kFileSystemAccessMoveRename = 4564, kFileSystemAccessMoveReparent = 4565, kFileSystemAccessMoveReparentAndRename = 4566, kV8FileSystemDirectoryHandle_RemoveEntry_Method = 4567, kV8FileSystemFileHandle_CreateWritable_Method = 4568, kV8FileSystemFileHandle_GetFile_Method = 4569, kV8FileSystemHandle_GetUniqueId_Method = 4570, kV8FileSystemHandle_Remove_Method = 4571, kPerformanceNavigateSystemEntropy = 4572, kV8InvalidatedNumberStringNotRegexpLikeProtector = 4573, kCriticalCHRestartNavigationTiming = 4574, kTopLevelDocumentWithEmbeddedCredentials = 4575, kV8Navigator_GetInterestGroupAdAuctionData_Method = 4576, kLongAnimationFrameObserver = 4577, kLongAnimationFrameRequested = 4578, kFedCmLoginHint = 4579, kFedCmRpContext = 4580, kEventTimingArtificialPointerupOrClick = 4581, kAbortSignalAny = 4582, kOBSOLETE_FedCmIdpSigninStatusApi = 4583, kFedCmIdpSigninStatusJsApi = 4584, kExecCommand = 4585, kWebGPUQueueSubmit = 4586, kWebGPUCanvasContextGetCurrentTexture = 4587, kEditContext = 4588, kOBSOLETE_kServiceWorkerStaticRouter_RegisterRouter = 4589, kServiceWorkerStaticRouter_Evaluate = 4590, kClientHintsUAFormFactors = 4591, kURLSearchParamsHasFnBehaviourDiverged = 4592, kURLSearchParamsDeleteFnBehaviourDiverged = 4593, kOBSOLETE_TextWrapPretty = 4594, kOBSOLETE_TextWrapPrettyFail = 4595, kContainerQueryEvalUnknown = 4596, kOBSOLETE_EventTimingPresentationPromiseResolvedAfterReport = 4597, kOBSOLETE_GetCoalescedEventsInInsecureContext = 4598, kCSPEESameOriginBlanketEnforcement = 4599, kSharedDictionaryUsed = 4601, kSharedDictionaryUsedForNavigation = 4602, kSharedDictionaryUsedForMainFrameNavigation = 4603, kSharedDictionaryUsedForSubFrameNavigation = 4604, kSharedDictionaryUsedForSubresource = 4605, kPriceChangeConfirmation = 4606, kPaymentRequestActivationlessShow = 4607, kWebAppTabbed = 4608, kFetchLater = 4609, kOBSOLETE_URLPatternReliantOnImplicitURLComponentsInString = 4610, kOBSOLETE_URLPatternReliantOnLaterComponentFromBaseURL = 4611, kV8Navigator_CreateAuctionNonce_Method = 4612, kCrossOriginWindowFrameElement = 4613, kQuirksModeAboutBlankDocument = 4614, kV8WasmMemory64 = 4615, kV8WasmMultiMemory = 4616, kV8WasmGC = 4617, kOBSOLETE_ORBBlockWithoutAnyEventHandler = 4618, kOBSOLETE_ORBBlockWithOnErrorButWithoutOnLoadEventHandler = 4619, kOBSOLETE_ORBBlockWithOnLoadButWithoutOnErrorEventHandler = 4620, kOBSOLETE_ORBBlockWithOnLoadAndOnErrorEventHandler = 4621, kOBSOLETE_ORBBlockWithAnyEventHandler = 4622, kV8RTCEncodedVideoFrame_SetMetadata_Method = 4623, kV8RTCEncodedVideoFrame_SetTimestamp_Method = 4624, kV8RTCEncodedAudioFrame_SetTimestamp_Method = 4625, kCSSAtRuleViewTransition = 4626, kSharedDictionaryUsedWithSharedBrotli = 4627, kSharedDictionaryUsedWithSharedZstd = 4628, kZstdContentEncoding = 4629, kGetAllScreensMedia = 4630, kInputEventToRecentlyMovedIframeMistakenlyDiscarded = 4631, kCSSRelativeColor = 4632, kXPathMissingVariableParsed = 4633, kXPathMissingVariableEvaluated = 4634, kClientHintsPrefersReducedTransparency = 4635, kElementCapture = 4636, kSharedStorageAPI_Fetch_Attribute = 4637, kSharedStorageAPI_Image_Attribute = 4638, kSharedStorageAPI_Iframe_Attribute = 4639, kVirtualKeyboardShow = 4640, kVirtualKeyboardHide = 4641, kVirtualKeyboardOverlayPolicy = 4642, kScrollSnapNestedSnapAreas = 4643, kScrollSnapCoveringSnapArea = 4644, kV8RTCEncodedAudioFrame_SetMetadata_Method = 4645, kV8FetchLaterResult_Activated_AttributeGetter = 4646, kV8Window_FetchLater_Method = 4647, kOBSOLETE_FetchLaterInvokeStateDeferred = 4648, kOBSOLETE_FetchLaterInvokeStateScheduled = 4649, kOBSOLETE_FetchLaterInvokeStateTerminated = 4650, kFetchLaterInvokeStateAborted = 4651, kOBSOLETE_FetchLaterInvokeStateActivated = 4652, kFetchLaterErrorUnknownBodyLength = 4653, kFetchLaterErrorQuotaExceeded = 4654, kV8FileSystemHandle_GetCloudIdentifiers_Method = 4655, kPrivateAggregationApiEnableDebugMode = 4656, kLineBreakPhrase = 4657, kOBSOLETE_AttributionReportingUnderscorePrefixedFilterKey = 4658, kPercentOrCalcStickyUsedOffset = 4659, kPercentOrCalcRelativeUsedOffset = 4660, kAutoRelativeUsedOffset = 4661, kViewportFitContain = 4662, kViewportFitCover = 4663, kViewportFitCoverOrSafeAreaInsetBottom = 4664, kOutOfFlowJustifySelfNoInsets = 4665, kOutOfFlowJustifySelfSingleInset = 4666, kOutOfFlowJustifySelfBothInsets = 4667, kOutOfFlowAlignSelfNoInsets = 4668, kOutOfFlowAlignSelfSingleInset = 4669, kOutOfFlowAlignSelfBothInsets = 4670, kV8WebAssemblyJSStringBuiltins = 4671, kObservableConstructor = 4672, kTextWrapBalance = 4673, kTextWrapPretty = 4674, kSourceMappingUrlMagicCommentAtSign = 4676, kHTMLDetailsElementNameAttribute = 4677, kHTMLDetailsElementNameAttributeClosesSelf = 4678, kHTMLDetailsElementNameAttributeClosesOther = 4679, kCSSSubgridLayout = 4680, kV8TemporalObject = 4681, kChromeCSIUnknown = 4682, kChromeCSIOnloadT = 4683, kChromeCSIPageT = 4684, kChromeCSIStartE = 4685, kChromeCSITran = 4686, kParseHTMLUnsafe = 4687, kSetHTMLUnsafe = 4688, kWebAssemblyModuleCompilation = 4689, kV8MediaStreamTrack_Stats_AttributeGetter = 4690, kElementCheckVisibility = 4691, kV8ClipboardItem_Supports_Method = 4692, kThirdPartyCookieAccessBlockByExperiment = 4693, kCspWouldBlockIfWildcardDoesNotMatchWs = 4694, kOBSOLETE_CspWouldBlockIfWildcardDoesNotMatchFtp = 4695, kStorageAccessAPI_requestStorageAccess_BeyondCookies = 4696, kStorageAccessAPI_requestStorageAccess_BeyondCookies_all = 4697, kStorageAccessAPI_requestStorageAccess_BeyondCookies_sessionStorage = 4698, kStorageAccessAPI_requestStorageAccess_BeyondCookies_sessionStorage_Use = 4699, kStorageAccessAPI_requestStorageAccess_BeyondCookies_localStorage = 4700, kStorageAccessAPI_requestStorageAccess_BeyondCookies_localStorage_Use = 4701, kElementCheckVisibilityOptionCheckVisibilityCSS = 4702, kElementCheckVisibilityOptionCheckOpacity = 4703, kStorageAccessAPI_requestStorageAccess_BeyondCookies_indexedDB = 4704, kStorageAccessAPI_requestStorageAccess_BeyondCookies_indexedDB_Use = 4705, kStorageAccessAPI_requestStorageAccess_BeyondCookies_locks = 4706, kStorageAccessAPI_requestStorageAccess_BeyondCookies_locks_Use = 4707, kOBSOLETE_RubyElementWithDisplayBlockAndRt = 4708, kOBSOLETE_CSSDeclarationAfterNestedRule = 4709, kThirdPartyCookieAdAccessBlockByExperiment = 4710, kServiceWorkerStaticRouter_AddRoutes = 4711, kStorageAccessAPI_requestStorageAccess_BeyondCookies_caches = 4712, kStorageAccessAPI_requestStorageAccess_BeyondCookies_caches_Use = 4713, kStorageAccessAPI_requestStorageAccess_BeyondCookies_getDirectory = 4714, kStorageAccessAPI_requestStorageAccess_BeyondCookies_getDirectory_Use = 4715, kElementCheckVisibilityOptionContentVisibilityAuto = 4716, kElementCheckVisibilityOptionOpacityProperty = 4717, kElementCheckVisibilityOptionVisibilityProperty = 4718, kAdClickMainFrameNavigation = 4719, kLinkRelPrivacyPolicy = 4720, kLinkRelTermsOfService = 4721, kWebAppManifestIdField = 4722, kStorageAccessAPI_requestStorageAccess_BeyondCookies_estimate = 4723, kStorageAccessAPI_requestStorageAccess_BeyondCookies_estimate_Use = 4724, kStorageAccessAPI_requestStorageAccess_BeyondCookies_createObjectURL = 4725, kStorageAccessAPI_requestStorageAccess_BeyondCookies_createObjectURL_Use = 4726, kStorageAccessAPI_requestStorageAccess_BeyondCookies_revokeObjectURL = 4727, kStorageAccessAPI_requestStorageAccess_BeyondCookies_revokeObjectURL_Use = 4728, kStorageAccessAPI_requestStorageAccess_BeyondCookies_BroadcastChannel = 4729, kStorageAccessAPI_requestStorageAccess_BeyondCookies_BroadcastChannel_Use = 4730, kThirdPartyCookieDeprecation_AllowByExplicitSetting = 4731, kThirdPartyCookieDeprecation_AllowByGlobalSetting = 4732, kThirdPartyCookieDeprecation_AllowBy3PCDMetadata = 4733, kThirdPartyCookieDeprecation_AllowBy3PCD = 4734, kThirdPartyCookieDeprecation_AllowBy3PCDHeuristics = 4735, kThirdPartyCookieDeprecation_AllowByStorageAccess = 4736, kThirdPartyCookieDeprecation_AllowByTopLevelStorageAccess = 4737, kIframeAdAuctionHeadersAttribute = 4738, kAutoSpeculationRulesOptedOut = 4739, kOverrideFlashEmbedwithHTML = 4740, kLinkRelOpener = 4741, kLinkRelOpenerTargetingSameFrame = 4742, kCSSSelectorPseudoHas = 4743, kWakeLockAcquireScreenLockWithoutStickyActivation = 4744, kSubtleCryptoDeriveBitsZeroLength = 4745, kSubtleCryptoDeriveBitsTruncation = 4746, kTextDirectiveInShadowDOM = 4747, kOBSOLETE_PseudoFirstLetterOnRt = 4748, kOBSOLETE_PseudoFirstLineOnRt = 4749, kAutoSizesLazy = 4750, kAutoSizesNonLazy = 4751, kOBSOLETE_TrustedTypesIntrospection = 4752, kTrustedTypesIsCheck = 4753, kOBSOLETE_MouseDragOnCancelledMouseMove = 4754, kFedCmDomainHint = 4755, kLCPImageWasLazy = 4756, kEventTargetOnObservable = 4757, kCredentialManagerCrossOriginPublicKeyCreateRequest = 4758, kViewTransitionNameAuto = 4759, kV8WasmJavaScriptPromiseIntegration = 4760, kWindowMinimize = 4761, kWindowMaximize = 4762, kWindowRestore = 4763, kWindowSetResizable = 4764, kV8WasmReturnCall = 4765, kV8WasmExtendedConst = 4766, kV8WasmRelaxedSimd = 4767, kV8WasmTypeReflection = 4768, kV8WasmExnRef = 4769, kV8WasmTypedFuncRef = 4770, kHTMLButtonInSelect = 4771, kHTMLDatalistInSelect = 4772, kEffectiveAlignContentForBlock = 4773, kEffectiveAlignContentForTableCell = 4774, kUserFeatureNgOptimizedImage = 4775, kCSSAtRulePageMargin = 4776, kThirdPartyCookieDeprecation_AllowByEnterprisePolicyCookieAllowedForUrls = 4777, kUserFeatureNgAfterRender = 4778, kUserFeatureNgHydration = 4779, kCapturedSurfaceControl = 4780, kElementGetHTML = 4781, kElementAttachSerializableShadow = 4782, kCSSBareDeclarationShift = 4783, kCSSNestedGroupRuleSpecificity = 4784, kCSSRuleWithSignalingChildModified = 4785, kUserFeatureNextThirdPartiesGA = 4786, kUserFeatureNextThirdPartiesGTM = 4787, kUserFeatureNextThirdPartiesYouTubeEmbed = 4788, kUserFeatureNextThirdPartiesGoogleMapsEmbed = 4789, kStorageAccessAPI_hasUnpartitionedCookieAccess = 4790, kStorageAccessAPI_requestStorageAccess_BeyondCookies_cookies = 4791, kVisualViewportScrollEndFired = 4792, kOBSOLETE_AttributionReportingCrossAppWebSupportHeader = 4793, kV8Element_AriaActiveDescendantElement_AttributeGetter = 4794, kV8Element_AriaActiveDescendantElement_AttributeSetter = 4795, kV8Element_AriaControlsElements_AttributeGetter = 4796, kV8Element_AriaControlsElements_AttributeSetter = 4797, kV8Element_AriaDescribedByElements_AttributeGetter = 4798, kV8Element_AriaDescribedByElements_AttributeSetter = 4799, kV8Element_AriaDetailsElements_AttributeGetter = 4800, kV8Element_AriaDetailsElements_AttributeSetter = 4801, kV8Element_AriaErrorMessageElements_AttributeGetter = 4802, kV8Element_AriaErrorMessageElements_AttributeSetter = 4803, kV8Element_AriaFlowToElements_AttributeGetter = 4804, kV8Element_AriaFlowToElements_AttributeSetter = 4805, kV8Element_AriaLabelledByElements_AttributeGetter = 4806, kV8Element_AriaLabelledByElements_AttributeSetter = 4807, kV8Element_AriaOwnsElements_AttributeGetter = 4808, kV8Element_AriaOwnsElements_AttributeSetter = 4809, kV8ElementInternals_AriaActiveDescendantElement_AttributeGetter = 4810, kV8ElementInternals_AriaActiveDescendantElement_AttributeSetter = 4811, kV8ElementInternals_AriaControlsElements_AttributeGetter = 4812, kV8ElementInternals_AriaControlsElements_AttributeSetter = 4813, kV8ElementInternals_AriaDescribedByElements_AttributeGetter = 4814, kV8ElementInternals_AriaDescribedByElements_AttributeSetter = 4815, kV8ElementInternals_AriaDetailsElements_AttributeGetter = 4816, kV8ElementInternals_AriaDetailsElements_AttributeSetter = 4817, kV8ElementInternals_AriaErrorMessageElements_AttributeGetter = 4818, kV8ElementInternals_AriaErrorMessageElements_AttributeSetter = 4819, kV8ElementInternals_AriaFlowToElements_AttributeGetter = 4820, kV8ElementInternals_AriaFlowToElements_AttributeSetter = 4821, kV8ElementInternals_AriaLabelledByElements_AttributeGetter = 4822, kV8ElementInternals_AriaLabelledByElements_AttributeSetter = 4823, kV8ElementInternals_AriaOwnsElements_AttributeGetter = 4824, kV8ElementInternals_AriaOwnsElements_AttributeSetter = 4825, kIdentityDigitalCredentials = 4826, kCSSSelectorPseudoState = 4827, kSpeculationRulesPrefetch = 4828, kSpeculationRulesAuthorPrefetchRule = 4829, kSpeculationRulesAuthorPrerenderRule = 4830, kSpeculationRulesBrowserPrefetchRule = 4831, kSpeculationRulesBrowserPrerenderRule = 4832, kFirstPartySharedWorkerSameSiteCookiesNone = 4833, kOBSOLETE_CSSCustomStateDeprecatedSyntax = 4834, kFullscreenAllowedByContentSetting = 4835, kSharedStorageAPI_CreateWorklet_Method = 4836, kCanvas2DLayers = 4837, kUserFeatureNuxtImage = 4838, kUserFeatureNuxtPicture = 4839, kUserFeatureNuxtThirdPartiesGA = 4840, kUserFeatureNuxtThirdPartiesGTM = 4841, kUserFeatureNuxtThirdPartiesYouTubeEmbed = 4842, kUserFeatureNuxtThirdPartiesGoogleMaps = 4843, kSelectParserDroppedTag = 4844, kInputTypeRangeHorizontalLtr = 4845, kInputTypeRangeHorizontalRtl = 4846, kInputTypeRangeVerticalLtr = 4847, kInputTypeRangeVerticalRtl = 4848, kMeterElementHorizontalLtr = 4849, kMeterElementHorizontalRtl = 4850, kMeterElementVerticalLtr = 4851, kMeterElementVerticalRtl = 4852, kProgressElementHorizontalLtr = 4853, kProgressElementHorizontalRtl = 4854, kProgressElementVerticalLtr = 4855, kProgressElementVerticalRtl = 4856, kStorageAccessAPI_requestStorageAccess_BeyondCookies_SharedWorker = 4857, kStorageAccessAPI_requestStorageAccess_BeyondCookies_SharedWorker_Use = 4858, kV8PointerEvent_GetCoalescedEvents_Method = 4859, kV8RTCEncodedVideoFrame_Constructor = 4860, kCSSFunctions = 4861, kCSSPageRule = 4862, kV8RTCRtpReceiver_JitterBufferTarget_AttributeGetter = 4863, kV8RTCRtpReceiver_JitterBufferTarget_AttributeSetter = 4864, kTrustedTypesIntrospectionAttributeType = 4865, kTrustedTypesIntrospectionPropertyType = 4866, kTrustedTypesIntrospectionTypeMapping = 4867, kIndexedDBFileLastModifiedDate = 4868, kSpeculationRulesRejectedLaxReferrerPolicy = 4869, kSpeculationRulesUsedLinkReferrerPolicy = 4870, kSpeculationRulesExplicitReferrerPolicy = 4871, kDOMClobberedShadowedDocumentPropertyAccessed = 4872, kDOMClobberedNotShadowedDocumentPropertyAccessed = 4873, kDOMClobberedShadowedFormPropertyAccessed = 4874, kDOMClobberedNotShadowedFormPropertyAccessed = 4875, kTpcdCookieReadBlockedByAdHeuristics = 4876, kUsedColorSchemeRootScrollbarsDark = 4877, kSerialPortConnected = 4878, kDevicePostureMediaFeature = 4879, kDevicePosture = 4880, kViewportSegmentsMediaFeature = 4881, kViewportSegments = 4882, kPrivateNetworkAccessWebSocketConnected = 4883, kWebAppTitle = 4884, kDOMSubtreeModifiedEventFired = 4885, kDOMNodeInsertedEventFired = 4886, kDOMNodeRemovedEventFired = 4887, kDOMNodeRemovedFromDocumentEventFired = 4888, kDOMNodeInsertedIntoDocumentEventFired = 4889, kDOMCharacterDataModifiedEventFired = 4890, kOBSOLETE_AnyMutationEventFired = 4891, kOBSOLETE_AnyMutationEventListenerAdded = 4892, kBadgeSetWithoutNotificationPermissionInBrowserWindow = 4893, kBadgeSetWithoutNotificationPermissionInAppWindow = 4894, kBadgeSetWithoutNotificationPermissionInWorker = 4895, kQuirksModeCursorHand = 4896, kTrustedTypesCreatePolicyWithEmptyName = 4897, kV8RTCEncodedAudioFrame_Constructor = 4898, kTCPSocketConstructor = 4899, kTCPSocketOpenedAttribute = 4900, kTCPSocketClosedAttribute = 4901, kTCPSocketCloseFunction = 4902, kUDPSocketConstructor = 4903, kUDPSocketOpenedAttribute = 4904, kUDPSocketClosedAttribute = 4905, kUDPSocketCloseFunction = 4906, kTCPServerSocketConstructor = 4907, kTCPServerSocketOpenedAttribute = 4908, kTCPServerSocketClosedAttribute = 4909, kTCPServerSocketCloseFunction = 4910, kWebPrintingGetPrintersFunction = 4911, kWebPrinterCachedAttributesFunction = 4912, kWebPrinterFetchAttributesFunction = 4913, kWebPrinterPrintJobFunction = 4914, kWebPrintJobAttributesFunction = 4915, kWebPrintJobCancelFunction = 4916, kWebPrintJobOnJobStateChangeEvent = 4917, kFledgeAuctionReportBuyers = 4918, kFledgeAuctionReportBuyerDebugModeConfig = 4919, kFedCmButtonMode = 4920, kHTMLPermissionElement = 4921, kOBSOLETE_V8ModelGenericSession_Execute_Method = 4922, kOBSOLETE_V8ModelGenericSession_ExecuteStreaming_Method = 4923, kOBSOLETE_V8ModelManager_CanCreateGenericSession_Method = 4924, kOBSOLETE_V8ModelManager_CreateGenericSession_Method = 4925, kV8Animation_OverallProgress_AttributeGetter = 4926, kOBSOLETE_V8ModelManager_DefaultGenericSessionOptions_Method = 4927, kQuirksModeCursorHandApplied = 4928, kOBSOLETE_SkippedPreloadScanning = 4929, kCSSColor_SpaceRGB = 4930, kCSSColor_SpaceRGB_outOfRec2020 = 4931, kCSSColor_SpaceOkLxx = 4932, kCSSColor_SpaceOkLxx_outOfRec2020 = 4933, kSandboxedSrcdocFrameResolvesRelativeURL = 4934, kV8Ink_RequestPresenter_Method = 4935, kOBSOLETE_EventTimingOrphanPointerup = 4936, kNavigatorCookieEnabledThirdParty = 4937, kFoldableAPIs = 4938, kSnapEvent = 4939, kStaticPropertyInAnimation = 4940, kOBSOLETE_SimplifyLoadingTransparentPlaceholderImage = 4941, kIdentityDigitalCredentialsSuccess = 4942, kOBSOLETE_V8DeviceProperties_UniqueId_AttributeGetter = 4943, kSharedStorageAPI_SelectURLOverallPageloadBudgetInsufficient = 4944, kOBSOLETE_V8LanguageTranslator_Translate_Method = 4945, kOBSOLETE_V8Translation_CanTranslate_Method = 4946, kOBSOLETE_V8Translation_CreateTranslator_Method = 4947, kIdentityDigitalCredentialsDeepLink = 4948, kV8WebView_GetExperimentalMediaIntegrityTokenProvider_Method = 4949, kV8MediaIntegrityTokenProvider_RequestToken_Method = 4950, kCanvas2DLayersFilters = 4951, kCanvas2DLayersCSSFilters = 4952, kCanvas2DLayersFilterObjects = 4953, kCSSScrollInitialTarget = 4954, kFedCmContinueOnResponse = 4955, kFedCmMultipleIdentityProviders = 4956, kFedCmWithStorageAccessAPI = 4957, kCSSSelectorUserValid = 4958, kCSSSelectorUserInvalid = 4959, kCrossShadowAtomicMove = 4960, kPrefersReducedMotionMediaFeature = 4961, kPrefersReducedTransparencyMediaFeature = 4962, kPrefersReducedDataMediaFeature = 4963, kScriptingMediaFeature = 4964, kInvertedColorsMediaFeature = 4965, kCSSLightDark = 4966, kPrivateAggregationApiFilteringIds = 4967, kHTMLInputInSelect = 4968, kCanvas2DMesh = 4969, kCaretPositionFromPoint = 4970, kDocumentPolicyIncludeJSCallStacksInCrashReports = 4971, kMaximumHTMLParserDOMTreeDepthHit = 4972, kV8ModelGenericSession_Destroy_Method = 4973, kUsedDeviceScaleAdjustment = 4974, kOBSOLETE_DisableThirdPartyStoragePartitioning2 = 4975, kLinkRelFacilitatedPayment = 4976, kOBSOLETE_V8GPUAdapter_RequestAdapterInfo_Method = 4977, kOBSOLETE_V8ModelGenericSession_Destroy_Method = 4978, kOBSOLETE_V8AITextSession_Execute_Method = 4979, kOBSOLETE_V8AITextSession_ExecuteStreaming_Method = 4980, kOBSOLETE_V8AI_CanCreateGenericSession_Method = 4981, kOBSOLETE_V8AI_CreateGenericSession_Method = 4982, kOBSOLETE_V8AI_DefaultGenericSessionOptions_Method = 4983, kOBSOLETE_V8AITextSession_Prompt_Method = 4984, kOBSOLETE_V8AITextSession_PromptStreaming_Method = 4985, kOBSOLETE_V8AI_CanCreateTextSession_Method = 4986, kOBSOLETE_V8AI_CreateTextSession_Method = 4987, kOBSOLETE_V8AI_DefaultTextSessionOptions_Method = 4988, kOBSOLETE_V8AITextSession_Destroy_Method = 4989, kImportMapIntegrity = 4990, kSelectElementAppearanceNone = 4991, kRubyPositionAlternate = 4992, kRubyPositionInterCharacter = 4993, kTextSizeAdjustNotAuto = 4994, kTextSizeAdjustPercentNot100 = 4995, kServiceWorkerAutoPreload = 4996, kV8InvalidatedNoUndetectableObjectsProtector = 4997, kV8DocumentAllLegacyCall = 4998, kV8DocumentAllLegacyConstruct = 4999, kOBSOLETE_InsideListMarkerPositionQuirk = 5000, kZstdContentEncodingForNavigation = 5001, kZstdContentEncodingForMainFrameNavigation = 5002, kZstdContentEncodingForSubFrameNavigation = 5003, kZstdContentEncodingForSubresource = 5004, kOBSOLETE_EventTimingOrphanPointerupWithClick = 5005, kDisableReduceAcceptLanguage = 5006, kSharedStorageAPI_CreateWorklet_CrossOriginScriptDefaultDataOrigin = 5007, kDeprecatedAIModel = 5008, kDeprecatedAICanCreateGenericSession = 5009, kDeprecatedAICreateGenericSession = 5010, kDeprecatedAIDefaultGenericSessionOptions = 5011, kDeprecatedAITextSessionExecute = 5012, kDeprecatedAITextSessionExecuteStreaming = 5013, kARIAColIndexTextAttribute = 5014, kARIARowIndexTextAttribute = 5015, kV8PointerEvent_PersistentDeviceId_AttributeGetter = 5016, kOBSOLETE_DelegatedInkExpectedImprovement = 5017, kCSSSelectorNthChildOfSelector = 5018, kDisableStandardizedBrowserZoom = 5019, kV8FileSystemObserver_Constructor = 5020, kV8FileSystemObserver_Observe_Method = 5021, kV8FileSystemObserver_Disconnect_Method = 5022, kV8ML_CreateContext_Method = 5023, kV8MLContext_Compute_Method = 5024, kV8MLContext_Dispatch_Method = 5025, kCSSMixins = 5026, kDurationFormat = 5027, kSharedStorageAPI_AddModule_CrossOriginScript = 5028, kCrossOriginOpenerPolicyNoopenerAllowPopups = 5029, kCrossOriginOpenerPolicyNoopenerAllowPopupsReportOnly = 5030, kV8ConsoleContext = 5031, kButtonTypeAttrInvalid = 5032, kButtonTypeAttrEmptyString = 5033, kProtectedAudienceDirectFromSellerSignals = 5034, kOBSOLETE_WebGPUSubgroupsFeatures = 5035, kAudioContextOnError = 5036, kNoVarySearchPrerender = 5037, kOBSOLETE_V8AITextSession_Clone_Method = 5038, kGamepadHapticActuatorType = 5039, kSelectionDirection = 5040, kSelectionGetComposedRanges = 5041, kEyeDropperOpen = 5042, kFlexNewColumnWrapIntrinsicSize = 5043, kOBSOLETE_V8AI_TextModelInfo_Method = 5044, kEventTimingSimulatedClickWithNoKeyboardInteraction = 5045, kViewTransitionGroupNesting = 5046, kOBSOLETE_V8LanguageDetector_Detect_Method = 5047, kOBSOLETE_V8Translation_CanDetect_Method = 5048, kOBSOLETE_V8Translation_CreateDetector_Method = 5049, kOBSOLETE_V8AI_Summarizer_AttributeGetter = 5050, kOBSOLETE_V8AISummarizer_Summarize_Method = 5051, kOBSOLETE_V8AISummarizer_SummarizeStreaming_Method = 5052, kOBSOLETE_V8AISummarizer_Destroy_Method = 5053, kOBSOLETE_V8AISummarizerFactory_Capabilities_Method = 5054, kOBSOLETE_V8AISummarizerFactory_Create_Method = 5055, kSharedStorageWriteFromBidderGenerateBid = 5056, kSharedStorageWriteFromBidderReportWin = 5057, kSharedStorageWriteFromSellerScoreAd = 5058, kSharedStorageWriteFromSellerReportResult = 5059, kOBSOLETE_CSSInsetAreaProperty = 5060, kStructuredCloneMethod = 5061, kOBSOLETE_V8AI_Writer_AttributeGetter = 5062, kOBSOLETE_V8AIWriterFactory_Create_Method = 5063, kOBSOLETE_V8AIWriter_Write_Method = 5064, kOBSOLETE_V8AIWriter_WriteStreaming_Method = 5065, kOBSOLETE_V8AIWriter_Destroy_Method = 5066, kOBSOLETE_V8AI_Rewriter_AttributeGetter = 5067, kOBSOLETE_V8AIRewriterFactory_Create_Method = 5068, kOBSOLETE_V8AIRewriter_Rewrite_Method = 5069, kOBSOLETE_V8AIRewriter_RewriteStreaming_Method = 5070, kOBSOLETE_V8AIRewriter_Destroy_Method = 5071, kFencedFrameCanLoadOpaqueURL = 5072, kV8Performance_Memory_AttributeGetter_NotLockedToSite = 5073, kPartitionedPopin_OpenAttempt = 5074, kPartitionedPopin_Opened = 5075, kOBSOLETE_V8AISummarizer_SharedContext_AttributeGetter = 5076, kOBSOLETE_V8AISummarizer_Type_AttributeGetter = 5077, kOBSOLETE_V8AISummarizer_Format_AttributeGetter = 5078, kOBSOLETE_V8AISummarizer_Length_AttributeGetter = 5079, kOBSOLETE_V8AIAssistantCapabilities_Available_AttributeGetter = 5080, kOBSOLETE_V8AIAssistantCapabilities_DefaultTopK_AttributeGetter = 5081, kOBSOLETE_V8AIAssistantCapabilities_MaxTopK_AttributeGetter = 5082, kOBSOLETE_V8AIAssistantCapabilities_DefaultTemperature_AttributeGetter = 5083, kOBSOLETE_V8AIAssistantFactory_Capabilities_Method = 5084, kOBSOLETE_V8AIAssistantFactory_Create_Method = 5085, kOBSOLETE_V8AI_Assistant_AttributeGetter = 5086, kOBSOLETE_V8AIAssistant_MaxTokens_AttributeGetter = 5087, kOBSOLETE_V8AIAssistant_TokensSoFar_AttributeGetter = 5088, kOBSOLETE_V8AIAssistant_TokensLeft_AttributeGetter = 5089, kOBSOLETE_V8AIAssistant_TopK_AttributeGetter = 5090, kOBSOLETE_V8AIAssistant_Temperature_AttributeGetter = 5091, kOBSOLETE_V8AIAssistant_Clone_Method = 5092, kOBSOLETE_V8AIAssistant_Destroy_Method = 5093, kOBSOLETE_V8AIAssistant_Prompt_Method = 5094, kOBSOLETE_V8AIAssistant_PromptStreaming_Method = 5095, kV8Window_PopinContextTypesSupported_Method = 5096, kV8Window_PopinContextType_Method = 5097, kWebAuthentication_AttestationFormats = 5098, kCssDisplayPropertyMultipleValues = 5099, kDocumentPolicyExpectNoLinkedResources = 5100, kOBSOLETE_SelectionIsCollapsedBehaviorChange = 5101, kTopicsAPIAll = 5102, kPaymentRequestDeprecatedPaymentMethod = 5103, kV8PublicKeyCredential_SignalUnknownCredential_Method = 5104, kV8PublicKeyCredential_SignalAllAcceptedCredentials_Method = 5105, kV8PublicKeyCredential_SignalCurrentUserDetails_Method = 5106, kOBSOLETE_V8AIAssistant_CountPromptTokens_Method = 5107, kHTMLSearchElement = 5108, kHTMLUnsafeMethods = 5109, kOBSOLETE_V8GPUSupportedLimits_MaxInterStageShaderComponents_AttributeGetter = 5110, kOBSOLETE_MaxInterStageShaderComponentsRequiredLimit = 5111, kShowPickerSelect = 5112, kAudioContextPlayoutStats = 5113, kThirdPartyCookieBlocked = 5114, kV8PerformanceResourceTiming_WorkerRouterEvaluationStart_AttributeGetter = 5115, kV8PerformanceResourceTiming_WorkerCacheLookupStart_AttributeGetter = 5116, kV8PerformanceResourceTiming_WorkerMatchedSourceType_AttributeGetter = 5117, kV8PerformanceResourceTiming_WorkerFinalSourceType_AttributeGetter = 5118, kV8AI_LanguageModel_AttributeGetter = 5119, kV8RTCEncodedVideoFrame_Timestamp_AttributeGetter = 5120, kV8RTCEncodedAudioFrame_Timestamp_AttributeGetter = 5121, kOBSOLETE_V8AIAssistantCapabilities_LanguageAvailable_Method = 5122, kWebGLRenderingContextReadPixels = 5123, kSelectAudioOutput = 5124, kV8PaymentManager_UserHint_AttributeGetter = 5125, kV8PaymentManager_UserHint_AttributeSetter = 5126, kPerformanceNavigationTimingConfidence = 5127, kOBSOLETE_HttpParsersParseDateFromUTCStringDifferent = 5128, kOBSOLETE_HttpParsersParseDateFromStringDifferent = 5129, kMediaQueryRangeSyntax = 5130, kParseHTMLSafe = 5131, kSetHTMLSafe = 5132, kSelectElementAppearanceBaseSelect = 5133, kSelectElementPickerAppearanceBaseSelect = 5134, kCssValueWritingModeVerticalRl = 5135, kCssValueWritingModeVerticalLr = 5136, kCssValueWritingModeSidewaysRl = 5137, kCssValueWritingModeSidewaysLr = 5138, kOBSOLETE_V8AILanguageModel_TopK_AttributeGetter = 5139, kOBSOLETE_V8AILanguageModel_Temperature_AttributeGetter = 5140, kOBSOLETE_V8AILanguageModel_Clone_Method = 5141, kOBSOLETE_V8AILanguageModel_Destroy_Method = 5142, kOBSOLETE_V8AILanguageModel_Prompt_Method = 5143, kOBSOLETE_V8AILanguageModel_PromptStreaming_Method = 5144, kOBSOLETE_V8AILanguageModel_CountPromptTokens_Method = 5145, kOBSOLETE_V8AILanguageModelCapabilities_LanguageAvailable_Method = 5146, kOBSOLETE_V8AILanguageModelCapabilities_Available_AttributeGetter = 5147, kOBSOLETE_V8AILanguageModelCapabilities_DefaultTopK_AttributeGetter = 5148, kOBSOLETE_V8AILanguageModelCapabilities_MaxTopK_AttributeGetter = 5149, kOBSOLETE_V8AILanguageModelCapabilities_DefaultTemperature_AttributeGetter = 5150, kOBSOLETE_V8AILanguageModelFactory_Capabilities_Method = 5151, kOBSOLETE_V8AILanguageModelFactory_Create_Method = 5152, kOBSOLETE_V8AILanguageModel_MaxTokens_AttributeGetter = 5153, kOBSOLETE_V8AILanguageModel_TokensSoFar_AttributeGetter = 5154, kOBSOLETE_V8AILanguageModel_TokensLeft_AttributeGetter = 5155, kSvgContextFillOrStroke = 5156, kARIAActionsAttribute = 5157, kOBSOLETE_ResolveToConfigValueCoercedToTrue = 5158, kServiceWorkerStaticRouter_RaceNetworkAndFetchHandlerImprovement = 5159, kHasCapUnits = 5160, kHasRcapUnits = 5161, kHasIcUnits = 5162, kHasRicUnits = 5163, kHasLhUnits = 5164, kHasRlhUnits = 5165, kCSSColorFunction = 5166, kCSSColor_SpaceLxx = 5167, kCSSColor_SpaceHwb = 5168, kCSSRoundModRemFunctions = 5169, kCSSTrigFunctions = 5170, kCSSCalcConstants = 5171, kHasChUnits = 5172, kHasRchUnits = 5173, kHasRexUnits = 5174, kCSSExponentialFunctions = 5175, kCSSLinearEasing = 5176, kOverflowMediaQuery = 5177, kHasSpellingOrGrammarErrorPseudoElement = 5178, kDynamicRangeMediaQuery = 5179, kDisplayModeMediaQuery = 5180, kCSSWordBreakAutoPhrase = 5181, kCSSSelectorPseudoModal = 5182, kUpdateMediaQuery = 5183, kCSSSelectorPseudoFileSelectorButton = 5184, kWebAuthnGetClientCapabilities = 5185, kVisitedColumnRuleColor = 5186, kDocumentIsolationPolicyRequireCorp = 5187, kDocumentIsolationPolicyCredentialless = 5188, kClipPathGeometryBox = 5189, kActiveViewTransitionPseudo = 5190, kScrollFunctionTimeline = 5191, kViewFunctionTimeline = 5192, kV8Animation_Constructor = 5193, kV8Element_GetAnimations_Method = 5194, kCSSCalcSizeFunction = 5195, kMoveEvent = 5196, kCanvas2DDrawText = 5197, kCanvas2DMeasureText = 5198, kOBSOLETE_CrossPartitionBlobURLFetch = 5199, kCrossTopLevelSiteBlobURLNavigation = 5200, kGeolocationSucceeded = 5201, kGeolocationSucceededWithoutInjectionMitigation = 5202, kSharedWorkerScriptUnderServiceWorkerControlIsBlob = 5203, kOBSOLETE_DisableThirdPartyStoragePartitioning3 = 5204, kOBSOLETE_ControlledFrameElement = 5205, kCanvas2DIsPointInPath = 5206, kCanvas2DIsPointInStroke = 5207, kCanvas2DGetImageData = 5208, kV8ExtendingNonExtensibleWithPrivate = 5209, kSharedStorageAPI_BatchUpdate_Method = 5210, kPreservesPitch = 5211, kSelectionCustomProperty = 5212, kVerticalFormControls = 5213, kV8AuthenticatorAttestationResponse_GetPublicKey_Method = 5214, kCloseWatcherScriptConstructor = 5215, kCanvas2DImageSmoothingQuality2 = 5216, kOBSOLETENonNoneTouchActionWouldLoseEditableHandwriting = 5217, kCSSEnvironmentVariable_SafeAreaInsetBottom_FastPath = 5218, kSrcSetUsedHigherDensityImageFromCache = 5219, kHTMLElementWritingSuggestions = 5220, kCSSPseudoOpen = 5221, kAdScriptInStackOnGeoLocation = 5222, kAdScriptInStackOnClipboardRead = 5223, kAdScriptInStackOnBluetooth = 5224, kAdScriptInStackOnMicrophoneRead = 5225, kAdScriptInStackOnCameraRead = 5226, kClipboardCustomFormatRead = 5227, kClipboardCustomFormatWrite = 5228, kClipboardSvgRead = 5229, kClipboardSvgWrite = 5230, kOBSOLETE_VarFallbackValidation = 5231, kLocaleInfoObsoletedGetters = 5232, kInjectionMitigatedContextSubFrame = 5233, kInjectionMitigatedContextMainFrame = 5234, kCanvasTextDirectionConflict = 5235, kCanvasTextDirectionGet = 5236, kCanvasTextDirectionGetInherit = 5237, kCanvasTextDirectionSet = 5238, kCanvasTextDirectionSetInherit = 5239, kTopicsAPIImg = 5240, kMediaSessionEnterPictureInPicture = 5241, kOBSOLETE_V8AILanguageDetector_Detect_Method = 5242, kCharsetAutoDetection = 5243, kCharsetAutoDetectionISO2022JP = 5244, kRequestOTRMainFrame = 5245, kMixedContentOnLocalhost = 5246, kMixedFrameEmbeddedByLocalhost = 5247, kOBSOLETE_V8AILanguageModelCapabilities_MaxTemperature_AttributeGetter = 5248, kAboutSrcdocToBeControlledByServiceWorker = 5249, kDisplayNoneComputedInContentVisibilityAutoLockedSubtree = 5250, kOBSOLETE_V8AITranslator_SourceLanguage_AttributeGetter = 5251, kOBSOLETE_V8AITranslator_TargetLanguage_AttributeGetter = 5252, kOBSOLETE_V8AITranslator_Destroy_Method = 5253, kOBSOLETE_V8AITranslator_Translate_Method = 5254, kOBSOLETE_V8AITranslator_TranslateStreaming_Method = 5255, kOBSOLETE_V8AITranslatorFactory_Create_Method = 5256, kOBSOLETE_V8AILanguageDetectorFactory_Create_Method = 5257, kOBSOLETE_V8AILanguageDetector_Destroy_Method = 5258, kFetchLaterInvokeStatePending = 5259, kFetchLaterInvokeStateSent = 5260, kCSPWithUnsafeHashes = 5261, kOBSOLETE_V8AIRewriter_SharedContext_AttributeGetter = 5262, kOBSOLETE_V8AIRewriter_Tone_AttributeGetter = 5263, kOBSOLETE_V8AIRewriter_Format_AttributeGetter = 5264, kOBSOLETE_V8AIRewriter_Length_AttributeGetter = 5265, kOBSOLETE_V8AIRewriter_ExpectedInputLanguages_AttributeGetter = 5266, kOBSOLETE_V8AIRewriter_ExpectedContextLanguages_AttributeGetter = 5267, kOBSOLETE_V8AIRewriter_OutputLanguage_AttributeGetter = 5268, kOBSOLETE_V8AIWriter_SharedContext_AttributeGetter = 5269, kOBSOLETE_V8AIWriter_Tone_AttributeGetter = 5270, kOBSOLETE_V8AIWriter_Format_AttributeGetter = 5271, kOBSOLETE_V8AIWriter_Length_AttributeGetter = 5272, kOBSOLETE_V8AIWriter_ExpectedInputLanguages_AttributeGetter = 5273, kOBSOLETE_V8AIWriter_ExpectedContextLanguages_AttributeGetter = 5274, kOBSOLETE_V8AIWriter_OutputLanguage_AttributeGetter = 5275, kGridAutoFlowColumnDense = 5276, kGridAutoFlowRowDense = 5277, kSchedulerPostTaskAbortBeforeRunning = 5278, kSchedulerPostTaskAsyncAbort = 5279, kSchedulerPostTaskSelfAbort = 5280, kV8Window_Window_AttributeGetter = 5281, kV8Window_Self_AttributeGetter = 5282, kV8Window_Self_AttributeSetter = 5283, kV8Window_Location_AttributeGetter = 5284, kV8Window_Location_AttributeSetter = 5285, kV8Window_Frames_AttributeGetter = 5286, kV8Window_Frames_AttributeSetter = 5287, kV8Window_Length_AttributeGetter = 5288, kV8Window_Length_AttributeSetter = 5289, kV8Window_Top_AttributeGetter = 5290, kV8Window_Opener_AttributeGetter = 5291, kV8Window_Opener_AttributeSetter = 5292, kV8Window_Parent_AttributeGetter = 5293, kV8Window_Parent_AttributeSetter = 5294, kV8Window_Blur_Method = 5295, kV8Window_Close_Method = 5296, kV8Window_Focus_Method = 5297, kV8Window_PostMessage_Method = 5298, kHTMLImageElementNaturalSizeDiffersForSvgImage = 5299, kWindowProxyIndexedGetter = 5300, kWindowProxyNamedGetter = 5301, kOBSOLETE_V8AILanguageModelFactory_Availability_Method = 5302, kOBSOLETE_V8AILanguageModelFactory_Params_Method = 5303, kOBSOLETE_V8AISummarizerFactory_Availability_Method = 5304, kOBSOLETE_V8AISummarizer_ExpectedInputLanguages_AttributeGetter = 5305, kOBSOLETE_V8AISummarizer_ExpectedContextLanguages_AttributeGetter = 5306, kOBSOLETE_V8AISummarizer_OutputLanguage_AttributeGetter = 5307, kNestedScrollMarkers = 5308, kV8GeolocationCoordinates_Latitude_AttributeGetter = 5309, kV8GeolocationCoordinates_Longitude_AttributeGetter = 5310, kV8GeolocationCoordinates_Altitude_AttributeGetter = 5311, kV8GeolocationCoordinates_Accuracy_AttributeGetter = 5312, kV8GeolocationCoordinates_AltitudeAccuracy_AttributeGetter = 5313, kV8GeolocationCoordinates_Heading_AttributeGetter = 5314, kV8GeolocationCoordinates_Speed_AttributeGetter = 5315, kCSSEnvironmentVariable_SafeAreaMaxInsetBottom = 5316, kOBSOLETE_V8AILanguageModel_ExpectedInputLanguages_AttributeGetter = 5317, kV8AnimationTrigger_Constructor = 5318, kPrivateNetworkAccessInsecureResourceNotKnownPrivate = 5319, kGeolocationGetCurrentPositionHighAccuracy = 5320, kGeolocationWatchPositionHighAccuracy = 5321, kColumnPseudoElement = 5322, kScrollButtonPseudoElement = 5323, kScrollMarkerPseudoElement = 5324, kOBSOLETE_V8AITranslatorFactory_Availability_Method = 5325, kGeolocationWouldSucceedWhenAdScriptInStack = 5326, kAdScriptInStackOnWatchGeoLocation = 5327, kDeviceBoundSessionRegistered = 5328, kOBSOLETE_V8AILanguageDetectorFactory_Availability_Method = 5329, kCrossPartitionSameOriginBlobURLFetch = 5330, kWebAppManifestUpdate = 5331, kCSSEnvironmentVariable_PreferredTextScale = 5332, kButtonTypeAttrInvalidWithCommandOrCommandfor = 5333, kOBSOLETE_CSSVarFallbackCycle = 5334, kOBSOLETE_CSSAttrFallbackCycle = 5335, kCSSRainbowGradientPattern = 5336, kWebAppManifestStartUrl = 5337, kWebAppManifestDisplay = 5338, kWebAppManifestIcons = 5339, kWebAppManifestScreenshots = 5340, kWebAppManifestScope = 5341, kWebAppManifestLockScreen = 5342, kWebAppManifestNoteTaking = 5343, kWebAppManifestPermissionsPolicy = 5344, kWebAppManifestPrefer_Related_Applications = 5345, kWebAppManifestThemeColor = 5346, kWebAppManifestBackgroundColor = 5347, kWebAppManifestTranslations = 5348, kWebAppManifestTabStrip = 5349, kWebAppManifestVersion = 5350, kWebAppManifestRelated_Applications = 5351, kInstalledManifestApplied = 5352, kSRIHashAssertion = 5353, kSRIPublicKeyAssertion = 5354, kViewTransitionChangeRootElement = 5355, kCSPBlockedWorkerCreation = 5356, kV8Navigator_ClearOriginJoinedAdInterestGroups_Method = 5357, kWebAppManifestDisplayMinimalUI = 5358, kWebAppManifestDisplayBrowser = 5359, kWebAppManifestDisplayFullscreen = 5360, kWebAppManifestDisplayStandalone = 5361, kBlockingAttributeFullFrameRateToken = 5362, kCrossOriginOwnerInterestGroupSubframeCheckFailed = 5363, kPreferredAudioOutputDevices = 5364, kSharedStorageAPI_SelectURL_Method_CalledWithOneURL = 5365, kOBSOLETE_V8AIRewriter_MeasureInputUsage_Method = 5366, kOBSOLETE_V8AIRewriter_InputQuota_AttributeGetter = 5367, kOBSOLETE_V8AISummarizer_MeasureInputUsage_Method = 5368, kOBSOLETE_V8AISummarizer_InputQuota_AttributeGetter = 5369, kOBSOLETE_V8AIWriter_MeasureInputUsage_Method = 5370, kOBSOLETE_V8AIWriter_InputQuota_AttributeGetter = 5371, kSpeculationRulesTargetHintBlank = 5372, kInterestFor = 5373, kTextAutoSizingDisabledOnFlexbox = 5374, kAriaLabeledByAlternativeSpelling = 5375, kOBSOLETE_CanvasTextNg = 5376, kDOMWindowOpenPopup = 5377, kFencedFrameDisableUntrustedNetwork = 5378, kFencedFrameNotifyEvent = 5379, kSharedStorageGetInFencedFrame = 5380, kOBSOLETE_Translator_MeasureInputUsage_Method = 5381, kOBSOLETE_Translator_InputQuota_AttributeGetter = 5382, kAriaNotify = 5383, kLanguageDetector_MeasureInputUsage = 5384, kLanguageDetector_InputQuota = 5385, kOBSOLETE_V8AILanguageModel_InputUsage_AttributeGetter = 5386, kOBSOLETE_V8AILanguageModel_InputQuota_AttributeGetter = 5387, kOBSOLETE_V8AILanguageModel_MeasureInputUsage_Method = 5388, kCredentialsGetImmediateMediationWithWebAuthnOnly = 5389, kCredentialsGetImmediateMediationWithWebAuthnAndPasswords = 5390, kOBSOLETENonNoneTouchActionWouldLoseEditableHandwritingRestoredByScroller = 5391, kTranslator_Create = 5392, kTranslator_Availability = 5393, kTranslator_SourceLanguage = 5394, kTranslator_TargetLanguage = 5395, kTranslator_Destroy = 5396, kTranslator_Translate = 5397, kTranslator_TranslateStreaming = 5398, kTranslator_MeasureInputUsage = 5399, kTranslator_InputQuota = 5400, kLanguageDetector_Create = 5401, kLanguageDetector_Availability = 5402, kLanguageDetector_Detect = 5403, kLanguageDetector_Destroy = 5404, kLanguageModel_Create = 5405, kLanguageModel_Availability = 5406, kLanguageModel_Prompt = 5407, kLanguageModel_PromptStreaming = 5408, kLanguageModel_Destroy = 5409, kLanguageModel_Clone = 5410, kLanguageModel_MeasureInputUsage = 5411, kLanguageModel_InputUsage = 5412, kLanguageModel_InputQuota = 5413, kLanguageModel_Params = 5414, kLanguageModel_Temperature = 5415, kLanguageModel_TopK = 5416, kWriter_Create = 5417, kWriter_Availability = 5418, kWriter_Write = 5419, kWriter_WriteStreaming = 5420, kWriter_Destroy = 5421, kWriter_MeasureInputUsage = 5422, kWriter_ExpectedContextLanguages = 5423, kWriter_ExpectedInputLanguages = 5424, kWriter_Format = 5425, kWriter_InputQuota = 5426, kWriter_Length = 5427, kWriter_OutputLanguage = 5428, kWriter_SharedContext = 5429, kWriter_Tone = 5430, kRewriter_Create = 5431, kRewriter_Availability = 5432, kRewriter_Rewrite = 5433, kRewriter_RewriteStreaming = 5434, kRewriter_Destroy = 5435, kRewriter_MeasureInputUsage = 5436, kRewriter_ExpectedContextLanguages = 5437, kRewriter_ExpectedInputLanguages = 5438, kRewriter_Format = 5439, kRewriter_InputQuota = 5440, kRewriter_Length = 5441, kRewriter_OutputLanguage = 5442, kRewriter_SharedContext = 5443, kRewriter_Tone = 5444, kSummarizer_Create = 5445, kSummarizer_Availability = 5446, kSummarizer_Summarize = 5447, kSummarizer_SummarizeStreaming = 5448, kSummarizer_Destroy = 5449, kSummarizer_MeasureInputUsage = 5450, kSummarizer_ExpectedContextLanguages = 5451, kSummarizer_ExpectedInputLanguages = 5452, kSummarizer_Format = 5453, kSummarizer_InputQuota = 5454, kSummarizer_Length = 5455, kSummarizer_OutputLanguage = 5456, kSummarizer_SharedContext = 5457, kSummarizer_Type = 5458, kCrossOriginSameSiteCookieAccessViaStorageAccessAPI = 5459, kOBSOLETE_V8GPUAdapter_IsFallbackAdapter_AttributeGetter = 5460, kLanguageDetector_ExpectedInputLanguages = 5461, kServiceWorkerPushEventListener = 5462, kServiceWorkerPushSubscriptionChangeEventListener = 5463, kMediaPlaybackWhileNotVisiblePermissionPolicy = 5464, kFirstLinePseudoElement = 5465, kFirstLetterPseudoElement = 5466, kCheckMarkPseudoElement = 5467, kBeforePseudoElement = 5468, kAfterPseudoElement = 5469, kPickerIconPseudoElement = 5470, kMarkerPseudoElement = 5471, kBackdropPseudoElement = 5472, kSelectionPseudoElement = 5473, kSearchTextPseudoElement = 5474, kTargetTextPseudoElement = 5475, kCustomHighlightPseudoElement = 5476, kSpellingErrorPseudoElement = 5477, kGrammarErrorPseudoElement = 5478, kSpeculationRulesTags = 5479, kMLCreateContextGPUDevice = 5480, kDisallowedSelectChild = 5481, kDisallowedOptGroupChild = 5482, kNonPhrasingContentOptionChild = 5483, kInteractiveContentOptionChild = 5484, kInteractiveContentLegendChild = 5485, kPrivateAggregationApiErrorReporting = 5486, kLanguageModel_Prompt_Input_Image = 5487, kLanguageModel_Prompt_Input_Audio = 5488, kHttp3 = 5489, kCanvasReadbackNoise = 5490, kCanvasReadbackNoiseMatchesHeuristics = 5491, kSVGImage = 5492, kDeviceBoundSessionRequestInScope = 5493, kDeviceBoundSessionRequestDeferral = 5494, kRoleAttributeMenu = 5495, kRoleAttributeMenubar = 5496, kRoleAttributeMenuitem = 5497, kRoleAttributeMenuitemcheckbox = 5498, kRoleAttributeMenuitemradio = 5499, kRoleAttributeButton = 5500, kRoleAttributeCell = 5501, kRoleAttributeCheckbox = 5502, kRoleAttributeColumnheader = 5503, kRoleAttributeCombobox = 5504, kRoleAttributeDialog = 5505, kRoleAttributeGrid = 5506, kRoleAttributeGridcell = 5507, kRoleAttributeHeading = 5508, kRoleAttributeImg = 5509, kRoleAttributeInput = 5510, kRoleAttributeLink = 5511, kRoleAttributeList = 5512, kRoleAttributeListbox = 5513, kRoleAttributeListitem = 5514, kRoleAttributeMain = 5515, kRoleAttributeMarquee = 5516, kRoleAttributeMath = 5517, kRoleAttributeMeter = 5518, kRoleAttributeNavigation = 5519, kRoleAttributeOption = 5520, kRoleAttributeProgressbar = 5521, kRoleAttributeRadio = 5522, kRoleAttributeRadiogroup = 5523, kRoleAttributeRange = 5524, kRoleAttributeRow = 5525, kRoleAttributeRowgroup = 5526, kRoleAttributeRowheader = 5527, kRoleAttributeScrollbar = 5528, kRoleAttributeSearch = 5529, kRoleAttributeSearchbox = 5530, kRoleAttributeSelect = 5531, kRoleAttributeSeparator = 5532, kRoleAttributeSlider = 5533, kRoleAttributeSpinbutton = 5534, kRoleAttributeSwitch = 5535, kRoleAttributeTab = 5536, kRoleAttributeTable = 5537, kRoleAttributeTablist = 5538, kRoleAttributeTabpanel = 5539, kRoleAttributeTextbox = 5540, kRoleAttributeToolbar = 5541, kRoleAttributeTooltip = 5542, kRoleAttributeTree = 5543, kRoleAttributeTreegrid = 5544, kRoleAttributeTreeitem = 5545, kInputParsedParentSelect = 5546, kInputParsedAncestorSelect = 5547, kCSSSelectorPseudoHasSlotted = 5548, kSelectMultipleShowPopup = 5549, kSharedWorkerExtendedLifetimeFeatureEnabled = 5550, kSharedWorkerExtendedLifetimeIsTrue = 5551, kEditContextTextFormatUpdateAddListener = 5552, kEditContextTextFormatUpdateFireEvent = 5553, kEditContextTextFormatUpdateTextFormatThicknessOrStyleNotNone = 5554, kC2PAManifest = 5555, kLanguageModel_Append = 5556, kIntegrityPolicyInServiceWorkerResponse = 5557, kEditContextTextFormatUnderlineStyle = 5558, kEditContextTextFormatUnderlineThickness = 5559, kProofreader_IncludeCorrectionTypes = 5560, kProofreader_IncludeCorrectionExplanations = 5561, kProofreader_ExpectedInputLanguages = 5562, kProofreader_CorrectionExplanationLanguage = 5563, kProofreader_Destroy = 5564, kProofreader_Proofread = 5565, kProofreader_Availability = 5566, kProofreader_Create = 5567, kDataUrlDedicatedWorker = 5568, kDataUrlSharedWorker = 5569, kV8WebGLRenderingContextWebGPU_GetExtension_Method = 5570, kV8WebGLRenderingContextWebGPU_GetSupportedExtensions_Method = 5571, kV8WebGL2RenderingContextWebGPU_GetExtension_Method = 5572, kV8WebGL2RenderingContextWebGPU_GetSupportedExtensions_Method = 5573, kCredentialsGetImmediateMediationPasswordSuccess = 5574, kCredentialsGetImmediateMediationPublicKeySuccess = 5575, kCredentialsGetImmediateMediationFailure = 5576, kClearSiteData = 5577, kScrollIntoViewContainerNearest = 5578, kPopoverShown = 5579, kInputParsedParentOptionOrOptgroup = 5580, kNavigatorUAData_toJSON = 5581, kEditContextUpdateTextRangePrecedesOrOverlapsSelection = 5582, kEditContextUpdateTextRangePrecedesCompositionRange = 5583, kEditContextUpdateTextRangeOverlapsCompositionRange = 5584, kEditContextUpdateSelectionDuringActiveComposition = 5585, kClipboardChangeEventAddListener = 5586, kClipboardChangeEventFired = 5587, kClipboardChangeEventFiredAfterFocusGain = 5588, kClipboardChangeEventTypesAttribute = 5589, kSchedulerYieldNonTrivialInherit = 5590, kSchedulerYieldNonTrivialInheritCrossFrameIgnored = 5591, kLocalNetworkAccessPrivateAliasUse = 5592, kV8URLPattern_Generate_Method = 5593, kSelectMultipleSizeOne = 5594, kWebGPUFeatureLevelCompatibility = 5595, kOverscrollBehaviorOnNonScrollableScrollContainer = 5596, kInteractiveContentSummaryDescendant = 5597, kSpeculationRulesEagernessEager = 5598, kCSSSelectorPseudoNot = 5599, kCSSCustomMedia = 5600, kHTMLCanvasElementLowLatency_2D = 5601, kHTMLCanvasElementLowLatency_WebGL = 5602, kHTMLCanvasElementLowLatency_WebGL_Preserve = 5603, kHTMLCanvasElementLowLatency_WebGL_Discard = 5604, kAnimatedImageUsedMoreThanOnce = 5605, kClipboardPlatformPermissionDenied = 5606, kValidPopoverAttribute = 5607, kCanvasFallbackContent = 5608, kCanvasFallbackElementContent = 5609, kAutofillMaybeSyntheticSelect = 5610, kAutofillSyntheticSelect = 5611, kFetchRetry = 5612, kMessageEventDataBeforeSameOrigin = 5613, kMessageEventDataBeforeSameSiteOrigin = 5614, kMessageEventDataBeforeCrossSiteOrigin = 5615, kMessageEventDataBeforeOpaqueOrigin = 5616, kLocalNetworkAccessNonSecureContextAllowedDeprecationTrial = 5617, kCSPUrlHashes = 5618, kCSPEvalHashes = 5619, kWebAppManifestNameLocalized = 5620, kWebAppManifestShortNameLocalized = 5621, kWebAppManifestDescriptionLocalized = 5622, kWebAppManifestIconsLocalized = 5623, kHTMLControlledFrameElement = 5624, kSlowDeserialization = 5625, kSharedWorkerStartOnAndroid = 5626, kLocalNetworkAccessWithinSharedWorker = 5627, kLocalNetworkAccessWithinDedicatedWorker = 5628, kCSSPseudoParentInScope = 5629, kInterestHintPseudoElement = 5630, kCookieStoreEmptyPath = 5631, kV8CookieListItem_Domain_AttributeGetter = 5632, kV8CookieListItem_Path_AttributeGetter = 5633, kV8CookieListItem_Expires_AttributeGetter = 5634, kV8CookieListItem_Secure_AttributeGetter = 5635, kV8CookieListItem_SameSite_AttributeGetter = 5636, kV8CookieListItem_Partitioned_AttributeGetter = 5637, kWebkitLineClampWithHeight = 5638, kLineClampAuto = 5639, kLineClampByLinesAndHeight = 5640, kV8RegExpStaticPropertiesWithLastMatch = 5641, kGetStatusForPolicyCrossOriginIframe = 5642, kComputedBorderTopWidthWithNoneOrHiddenStyle = 5643, kComputedBorderRightWidthWithNoneOrHiddenStyle = 5644, kComputedBorderBottomWidthWithNoneOrHiddenStyle = 5645, kComputedBorderLeftWidthWithNoneOrHiddenStyle = 5646, kComputedBorderWidthWithNoneOrHiddenStyle = 5647, kComputedColumnRuleWidthWithNoneOrHiddenStyle = 5648, kComputedOutlineWidthWithNoneOrHiddenStyle = 5649, kNavigationNavigateJavaScriptURL = 5650, kV8WasmCustomDescriptors = 5651, kSRIIntegrityAttributeOnInlineScript = 5652, kCredentialsGetImmediateMediationWithPasswordsOnly = 5653, kCSSAtRuleRoute = 5654, kAbsposPositionTryFallbacksChange = 5655, kMulticastControllerJoinGroupFunction = 5656, kMulticastControllerLeaveGroupFunction = 5657, kMulticastControllerJoinedGroupsAttribute = 5658, kContainerNameQueryFailedTreeScope = 5659, kLocalNetworkAccessWebSocketResourceNotKnownPrivate = 5660, kCSSPseudoElementUsesImplicitAnchor = 5661, kLineClampByLinesOverflows = 5662, kPointerRawUpdateEventsInInsecureContext = 5663, kReportToHeader = 5664, kReportingEndpointsHeader = 5665, kOverscrollBehaviorWithOverflowHidden = 5666, kWebCodecsAv1EncodingWithQP = 5667, kExternalSVGDocumentResources = 5668, kIndexedDBGetAllRecords = 5669, kResolvedColumnRuleWidthWithNoneOrHiddenStyle = 5670, kResolvedOutlineWidthWithNoneOrHiddenStyle = 5671, kContextMenuEventDefaultPrevented = 5672, kSmartCardEstablishContext = 5673, kSmartCardConnect = 5674, kNavigatorCPUPerformance = 5675, kSelectionRemoveRangeNotFoundWouldThrow = 5676, kNestedSvgCssSizingProperties = 5677, kCryptoAlgorithmChaCha20Poly1305 = 5678, kCryptoAlgorithmMlDsa44 = 5679, kCryptoAlgorithmMlDsa65 = 5680, kCryptoAlgorithmMlDsa87 = 5681, kCryptoAlgorithmMlKem768 = 5682, kCryptoAlgorithmMlKem1024 = 5683, kClipboardChangedBetweenReadAndGetType = 5684, kClipboardChangedBetweenGetTypes = 5685, kClipboardReadAndGetTypeTimeDiffIsBetween5SecAnd1Min = 5686, kClipboardReadAndGetTypeTimeDiffIsBetween1MinAnd10Min = 5687, kClipboardReadAndGetTypeTimeDiffIsMoreThan10Min = 5688, kClipboardGetTypeTimeDiffOfSameTypeIsBetween5SecAnd1Min = 5689, kClipboardGetTypeTimeDiffOfSameTypeIsBetween1MinAnd10Min = 5690, kClipboardGetTypeTimeDiffOfSameTypeIsMoreThan10Min = 5691, kClipboardGetTypeWindowNotInFocus = 5692, kReportBodyToJSON = 5693, kCSPViolationReportBodyToJSON = 5694, kDeprecationReportBodyToJSON = 5695, kInterventionReportBodyToJSON = 5696, kDocumentPolicyViolationReportBodyToJSON = 5697, kIntegrityViolationReportBodyToJSON = 5698, kPermissionsPolicyViolationReportBodyToJSON = 5699, kCoopAccessViolationReportBodyToJSON = 5700, kTestReportBodyToJSON = 5701, kSpeculationRulesPrerenderUntilScript = 5702, kClipboardChangeEventChangeIdAttribute = 5703, kWebRTCLocalNetworkAccessCheck = 5704, kWebRTCLocalNetworkAccessPublicToLocal = 5705, kWebRTCLocalNetworkAccessPublicToLoopback = 5706, kWebRTCLocalNetworkAccessLocalToLoopback = 5707, kIdentityDigitalCredentialsCreation = 5708, kIdentityDigitalCredentialsCreationSuccess = 5709, kFedCmErrorCodeAttribute = 5710, kFedCmErrorErrorAttribute = 5711, kAnimationAllTypes = 5712, kAnimationSvgTypes = 5713, kAnimationNonCompositedTypes = 5714, kAnimationCompositedTypes = 5715, kAnimationSvgNonCompositedTypes = 5716, kAnimationSvgCompositedTypes = 5717,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom;l=24" + }, + "blink.mojom.WebDXFeature": { + "definition": "enum WebDXFeature { kPageVisits = 0, kCompressionStreams = 1, kViewTransitions = 2, kOBSOLETE_Popover = 3, kSubgrid = 4, kCascadeLayers = 5, kAccentColor = 6, kAnimationComposition = 7, kAppearance = 8, kAspectRatio = 9, kAvif = 10, kBackdropFilter = 11, kBlockingRender = 12, kBorderImage = 13, kBroadcastChannel = 14, kCanvasContextLost = 15, kColorScheme = 16, kComputePressure = 17, kConstructedStylesheets = 18, kContainerQueries = 19, kContainerStyleQueries = 20, kContainIntrinsicSize = 21, kCounterStyle = 22, kCssModules = 23, kDeclarativeShadowDom = 24, kDialog = 25, kDocumentPictureInPicture = 26, kFlexboxGap = 27, kFlexbox = 28, kFocusVisible = 29, kFontOpticalSizing = 30, kFontPaletteAnimation = 31, kFontPalette = 32, kFontSynthesisSmallCaps = 33, kFontSynthesisStyle = 34, kFontSynthesisWeight = 35, kFontSynthesis = 36, kFontVariantAlternates = 37, kGrid = 38, kHas = 39, kHyphens = 40, kIdleDetection = 41, kImportMaps = 42, kIndividualTransforms = 43, kIntersectionObserverV2 = 44, kIntersectionObserver = 45, kIs = 46, kJsModules = 47, kMediaSession = 48, kOffscreenCanvas = 49, kOriginPrivateFileSystem = 50, kPictureInPicture = 51, kPointerLock = 52, kRelativeColor = 53, kScope = 54, kScrollbarColor = 55, kScrollbarGutter = 56, kScrollbarWidth = 57, kScrollend = 58, kScrollSnap = 59, kScrollToTextFragment = 60, kShowPickerInput = 61, kSlot = 62, kSpeechRecognition = 63, kSpeechSynthesis = 64, kStorageAccess = 65, kStorageBuckets = 66, kTargetText = 67, kTemplate = 68, kTextIndent = 69, kTextSpacingTrim = 70, kTextWrapBalance = 71, kTextWrapPretty = 72, kTransitionBehavior = 73, kTrustedTypes = 74, kUserPseudos = 75, kWebcodecs = 76, kWebhid = 77, kWebLocks = 78, kWebp = 79, kWebtransport = 80, kWebusb = 81, kWebvtt = 82, kWhere = 83, kDatalist = 84, kDirPseudo = 85, kHiddenUntilFound = 86, kWillChange = 87, kAbortsignalAny = 88, kNavigation = 89, kMathml = 90, kCanvasCreateconicgradient = 91, kCanvasReset = 92, kCanvasRoundrect = 93, kOBSOLETE_CanvasTextBaselines = 94, kColorMix = 95, kAriaAttributeReflection = 96, kAnchorPositioning = 97, kImageSet = 98, kStructuredClone = 99, kSlotAssign = 100, kMasks = 101, kDeviceOrientationEvents = 102, kGamepad = 103, kScreenWakeLock = 104, kWebBluetooth = 105, kWebNfc = 106, kSerial = 107, kJsModulesServiceWorkers = 108, kJsModulesSharedWorkers = 109, kJsModulesWorkers = 110, kTwoValueDisplay = 111, kOverflowShorthand = 112, kFieldSizing = 113, kDetailsName = 114, kOBSOLETE_ElementCheckVisibility = 115, kKeyboardMap = 116, kOBSOLETE_HiddenUntilFoundAttribute = 117, kScheduler = 118, kKeyboardLock = 119, kSearch = 120, kAsyncClipboard = 121, kParseHtmlUnsafe = 122, kClipboardUnsanitizedFormats = 123, kAborting = 124, kEditContext = 125, kPaintOrder = 126, kShowPickerSelect = 127, kInert = 128, kIntlSegmenter = 129, kEyedropper = 130, kBackgroundClipText = 131, kContainInlineSize = 132, kCheckVisibility = 133, kOverlay = 134, kOBSOLETE_CanvasElement = 135, kOBSOLETE_CanvasFillText = 136, kOBSOLETE_CanvasMeasureText = 137, kOBSOLETE_Canvas2D = 138, kOBSOLETE_CanvasAlpha = 139, kOBSOLETE_CanvasColorManagement = 140, kOBSOLETE_CanvasDesynchronized = 141, kOBSOLETE_WillReadFrequently = 142, kStartingStyle = 143, kDocumentCaretpositionfrompoint = 144, kMediaQueryRangeSyntax = 145, kRegisteredCustomProperties = 146, kAccelerometer = 147, kContentVisibility = 148, kCounterSet = 149, kWebAudio = 150, kOfflineAudioContext = 151, kAudioWorklet = 152, kWebMidi = 153, kRequestVideoFrameCallback = 154, kContextFillStroke = 155, kObjectViewBox = 156, kCap = 157, kRcap = 158, kIc = 159, kRic = 160, kLh = 161, kRlh = 162, kNesting = 163, kNthChildOf = 164, kForcedColors = 165, kWhiteSpaceCollapse = 166, kImageOrientation = 167, kLogicalProperties = 168, kColorFunction = 169, kOklab = 170, kLab = 171, kHwb = 172, kRevertValue = 173, kPrefersContrast = 174, kPrefersReducedTransparency = 175, kRoundModRem = 176, kTrigFunctions = 177, kGradientInterpolation = 178, kFontVariantPosition = 179, kTextEmphasis = 180, kTextWrap = 181, kTextWrapStyle = 182, kCalcConstants = 183, kExpFunctions = 184, kFileSelectorButton = 185, kLinearEasing = 186, kModal = 187, kMotionPath = 188, kOutline = 189, kOverflow = 190, kRex = 191, kSpellingGrammarError = 192, kTextDecorationSelection = 193, kTransformBox = 194, kUpdate = 195, kWordBreakAutoPhrase = 196, kMarker = 197, kDynamicRange = 198, kDisplayMode = 199, kCanvas = 200, kCanvas2D = 201, kCanvas2DAlpha = 202, kCanvas2DColorManagement = 203, kCanvas2DDesynchronized = 204, kCanvas2DWillreadfrequently = 205, kCh = 206, kRch = 207, kRubyAlign = 208, kRubyPosition = 209, kInitialLetter = 210, kHyphenateCharacter = 211, kHyphenateLimitChars = 212, kQuotes = 213, kBaselineSource = 214, kClipPathBoxes = 215, kClipPath = 216, kActiveViewTransition = 217, kBoxDecorationBreak = 218, kPageOrientation = 219, kFontSizeAdjust = 220, kResizableBuffers = 221, kOBSOLETE_V8GrowableSharedArrayBuffer = 222, kArrayByCopy = 223, kArrayFromasync = 224, kIteratorMethods = 225, kPromiseAny = 226, kSetMethods = 227, kScrollSnapEvents = 228, kMoveBefore = 229, kScrollDrivenAnimations = 230, kWebAnimations = 231, kCrossDocumentViewTransitions = 232, kDisplayAnimation = 233, kCalcSize = 234, kInterpolateSize = 235, kLongAnimationFrames = 236, kPageVisibilityState = 237, kArrayFindlast = 238, kArrayGroup = 239, kPromiseWithresolvers = 240, kTransferableArraybuffer = 241, kAtomicsWaitAsync = 242, kOBSOLETE_LocaleInfoObsoletedGetters = 243, kIntlLocaleInfo = 244, kViewTransitionClass = 245, kDRAFT_ReferenceTarget = 246, kFedcm = 247, kWebOtp = 248, kPreservesPitch = 249, kViewportUnitVariants = 250, kPromiseTry = 251, kStringReplaceall = 252, kStringWellformed = 253, kWeakReferences = 254, kRemotePlayback = 255, kVerticalFormControls = 256, kPdfViewer = 257, kFileSystemAccess = 258, kClosewatcher = 259, kReferrerPolicy = 260, kUrlCanparse = 261, kWritingsuggestions = 262, kInk = 263, kVirtualKeyboard = 264, kNonCookieStorageAccess = 265, kIntlDurationFormat = 266, kWindowControlsOverlay = 267, kFetchPriority = 268, kHighlight = 269, kIsError = 270, kClipboardCustomFormat = 271, kClipboardSvg = 272, kClipboardSupports = 273, kBarprop = 274, kBeforeunload = 275, kBfcacheBlockingReasons = 276, kLayoutInstability = 277, kProfiler = 278, kAsyncIterableStreams = 279, kContainerScrollStateQueries = 280, kDRAFT_ScopedViewTransitions = 281, kAttributionReporting = 282, kCookieStore = 283, kFencedframe = 284, kFontVariantEmoji = 285, kGethtml = 286, kLocalFonts = 287, kMeasureMemory = 288, kMediaPlaybackQuality = 289, kWebgpu = 290, kZstd = 291, kColumnPseudo = 292, kInteractivity = 293, kScrollButtons = 294, kScrollMarkers = 295, kPopoverHint = 296, kRegexpEscape = 297, kFloat16Array = 298, kAppFileHandlers = 299, kAppProtocolHandlers = 300, kBadging = 301, kManifest = 302, kBeforeinstallprompt = 303, kAppShareTargets = 304, kAppShortcuts = 305, kFetchlater = 306, kDRAFT_WasmBranchHinting = 307, kDRAFT_ExplicitResourceManagement = 308, kAppLaunchHandler = 309, kFunction = 310, kIf = 311, kDRAFT_WebAppManifestUpdate = 312, kReadingFlow = 313, kComposedRanges = 314, kCompressionDictionaryTransport = 315, kHttp3 = 316, kSpeculationRules = 317, kTextBox = 318, kScrollInitialTarget = 319, kHasSlotted = 320, kElementCapture = 321, kRegionCapture = 322, kRequestAnimationFrame = 323, kRequestAnimationFrameWorkers= 324, kIframeCredentialless = 325, kUrlpattern = 326, kWebauthnPublicKeyEasy = 327, kIntlDisplayNames = 328, kState = 329, kPrintColorAdjust = 330, kTextUnderlineOffset = 331, kWindowManagement = 332, kRequestclose = 333, kUint8ArrayBase64Hex = 334, kLineBreak = 335, kOverflowClip = 336, kLightDark = 337, kRequestidlecallback = 338, kClearSiteData = 339, kLinkRelExpect = 340, kUaClientHints = 341, kCustomizableSelect = 342, kNot = 343, kScripting = 344, kAlignContentBlock = 345, kSizesAuto = 346, kWasmSimd = 347, kObservable = 348, kMetaApplicationTitle = 349, kDialogClosedby = 350, kFontFamilyMath = 351, kAutofill = 352, kFontMetricOverrides = 353, kDetailsContent = 354, kTimeRelativeSelectors = 355, kWasmExceptionHandling = 356, kWasmExtendedConstantExpressions = 357, kWasmGarbageCollection = 358, kWasmMultiMemory = 359, kWasmReferenceTypes = 360, kWasmSimdRelaxed = 361, kWasmTailCallOptimization = 362, kWasmThreads = 363, kWasmStringBuiltins = 364, kWasmTypedFunRefs = 365, kWasmMemory64 = 366, kWasmExnrefExceptions = 367, kWasmMultiValue = 368, kWasmBulkMemory = 369, kWasmMutableGlobals = 370, kWasmNonTrappingFloatToInt = 371, kWasmSignExtensionOperators = 372, kDRAFT_IncomingCallNotifications = 373, kPopover = 374, kDRAFT_WebInstallAPI = 375, kTopLevelAwait = 376, kAtomicsPause = 377, kLogicalAssignments = 378, kNullishCoalescing = 379, kDRAFT_CrashReportStorageAPIInitialize = 380, kExtTextureCompressionBptc = 381, kExtTextureCompressionRgtc = 382, kExtTextureNorm16 = 383, kOesFboRenderMipmap = 384, kWebglColorManagement = 385, kWebglCompressedTexturePvrtc = 386, kWebglDesynchronized = 387, kWebglMultiDraw = 388, kWebglOesDrawBuffersIndexed = 389, kWebgl2ColorManagement = 390, kWebgl2Desynchronized = 391, kRegexpCompile = 392, kWith = 393, kHtmlWrapperMethods = 394, kRegexpStaticProperties = 395, kJsonModules = 396, kDRAFT_WasmCustomDescriptors = 397, kFetchRequestStreams = 398, kTransferableStreams = 399, kReadableByteStreams = 400, kDevicePosture = 401, kWebxrAnchors = 402, kWebxrAr = 403, kWebxrCamera = 404, kWebxrDepthSensing = 405, kWebxrDomOverlays = 406, kWebxrHandInput = 407, kWebxrHitTest = 408, kWebxrLightingEstimation = 409, kReporting = 410, kFontLanguageOverride = 411, kWebnn = 412, kTextDetect = 413, kTextJustify = 414,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/use_counter/metrics/webdx_feature.mojom;l=61" + }, + "blink.mojom.UseCounterFeature": { + "definition": "struct UseCounterFeature { UseCounterFeatureType type; uint32 value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/use_counter/use_counter_feature.mojom;l=31" + }, + "blink.mojom.UseCounterFeatureType": { + "definition": "enum UseCounterFeatureType { kWebFeature, kCssProperty, kAnimatedCssProperty, kPermissionsPolicyViolationEnforce, kPermissionsPolicyIframeAttribute, kPermissionsPolicyHeader, kWebDXFeature, kPermissionsPolicyEnabledPrivacySensitive,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/use_counter/use_counter_feature.mojom;l=9" + }, + "blink.mojom.UserAgentBrandVersion": { + "definition": "struct UserAgentBrandVersion { string brand; string version;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/user_agent/user_agent_metadata.mojom;l=7" + }, + "blink.mojom.UserAgentMetadata": { + "definition": "struct UserAgentMetadata { array brand_version_list; array brand_full_version_list; string full_version; string platform; string platform_version; string architecture; string model; bool mobile; string bitness; bool wow64; array form_factors;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/user_agent/user_agent_metadata.mojom;l=14" + }, + "blink.mojom.UserAgentOverride": { + "definition": "struct UserAgentOverride { string ua_string_override; UserAgentMetadata? ua_metadata_override;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/user_agent/user_agent_metadata.mojom;l=31" + }, + "blink.mojom.V8CacheOptions": { + "definition": "enum V8CacheOptions { kDefault, kNone, kCode, kCodeWithoutHeatCheck, kFullCodeWithoutHeatCheck,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/v8_cache_options.mojom;l=10" + }, + "blink.mojom.WakeLockService.GetWakeLock": { + "definition": "GetWakeLock(device.mojom.WakeLockType type, device.mojom.WakeLockReason reason, string description, pending_receiver wake_lock);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/wake_lock/wake_lock.mojom;l=14" + }, + "blink.mojom.WebInstallService.Install": { + "definition": "Install(InstallOptions? options) => (WebInstallServiceResult result, url.mojom.Url manifest_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/web_install/web_install.mojom;l=41" + }, + "blink.mojom.InstallOptions": { + "definition": "struct InstallOptions { url.mojom.Url install_url; url.mojom.Url? manifest_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/web_install/web_install.mojom;l=20" + }, + "blink.mojom.WebInstallServiceResult": { + "definition": "enum WebInstallServiceResult { kSuccess, kAbortError, kDataError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/web_install/web_install.mojom;l=12" + }, + "blink.mojom.WebLaunchService.SetLaunchFiles": { + "definition": "SetLaunchFiles(array files);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/web_launch/web_launch.mojom;l=21" + }, + "blink.mojom.WebLaunchService.EnqueueLaunchParams": { + "definition": "EnqueueLaunchParams( url.mojom.Url launch_url, mojo_base.mojom.TimeTicks time_navigation_started_in_browser, bool navigation_started);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/web_launch/web_launch.mojom;l=26" + }, + "blink.mojom.AudioContextManager.AudioContextAudiblePlaybackStarted": { + "definition": "AudioContextAudiblePlaybackStarted(uint32 id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webaudio/audio_context_manager.mojom;l=14" + }, + "blink.mojom.AudioContextManager.AudioContextAudiblePlaybackStopped": { + "definition": "AudioContextAudiblePlaybackStopped(uint32 id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webaudio/audio_context_manager.mojom;l=18" + }, + "blink.mojom.AudioContextManager.AudioContextCreated": { + "definition": "AudioContextCreated(uint32 id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webaudio/audio_context_manager.mojom;l=23" + }, + "blink.mojom.AudioContextManager.AudioContextClosed": { + "definition": "AudioContextClosed(uint32 id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webaudio/audio_context_manager.mojom;l=28" + }, + "blink.mojom.Authenticator.MakeCredential": { + "definition": "MakeCredential(PublicKeyCredentialCreationOptions options) => (AuthenticatorStatus status, MakeCredentialAuthenticatorResponse? credential, WebAuthnDOMExceptionDetails? dom_exception_details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=722" + }, + "blink.mojom.Authenticator.GetCredential": { + "definition": "GetCredential(GetCredentialOptions options) => (GetCredentialResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=731" + }, + "blink.mojom.Authenticator.IsUserVerifyingPlatformAuthenticatorAvailable": { + "definition": "IsUserVerifyingPlatformAuthenticatorAvailable() => (bool available);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=737" + }, + "blink.mojom.Authenticator.IsConditionalMediationAvailable": { + "definition": "IsConditionalMediationAvailable() => (bool available);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=743" + }, + "blink.mojom.Authenticator.Report": { + "definition": "Report(PublicKeyCredentialReportOptions options) => (AuthenticatorStatus status, WebAuthnDOMExceptionDetails? dom_exception_details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=748" + }, + "blink.mojom.Authenticator.GetClientCapabilities": { + "definition": "GetClientCapabilities() => (array capabilities);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=753" + }, + "blink.mojom.Authenticator.Cancel": { + "definition": "Cancel();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=758" + }, + "blink.mojom.CommonCredentialInfo": { + "definition": "struct CommonCredentialInfo { string id; array raw_id; array client_data_json; array authenticator_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=83" + }, + "blink.mojom.UvmEntry": { + "definition": "struct UvmEntry { uint32 user_verification_method; uint16 key_protection_type; uint16 matcher_protection_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=104" + }, + "blink.mojom.SupplementalPubKeysResponse": { + "definition": "struct SupplementalPubKeysResponse { array> signatures;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=111" + }, + "blink.mojom.AuthenticationExtensionsPaymentResponse": { + "definition": "struct AuthenticationExtensionsPaymentResponse { array browser_bound_signature;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=116" + }, + "blink.mojom.MakeCredentialAuthenticatorResponse": { + "definition": "struct MakeCredentialAuthenticatorResponse { CommonCredentialInfo info; AuthenticatorAttachment authenticator_attachment; array attestation_object; array transports; bool echo_hmac_create_secret; bool hmac_create_secret; bool echo_prf; bool prf; PRFValues? prf_results; bool echo_cred_blob; bool cred_blob; array? public_key_der; int32 public_key_algo; bool echo_cred_props; bool has_cred_props_rk; bool cred_props_rk; bool echo_large_blob; bool supports_large_blob; SupplementalPubKeysResponse? supplemental_pub_keys; AuthenticationExtensionsPaymentResponse? payment;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=123" + }, + "blink.mojom.GetAssertionAuthenticatorResponse": { + "definition": "struct GetAssertionAuthenticatorResponse { CommonCredentialInfo info; AuthenticatorAttachment authenticator_attachment; array signature; array? user_handle; AuthenticationExtensionsClientOutputs extensions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=184" + }, + "blink.mojom.AuthenticationExtensionsClientOutputs": { + "definition": "struct AuthenticationExtensionsClientOutputs { bool echo_appid_extension; bool appid_extension; [EnableIf=is_android] bool echo_user_verification_methods; [EnableIf=is_android] array? user_verification_methods; bool echo_prf; PRFValues? prf_results; bool prf_not_evaluated; bool echo_large_blob; array? large_blob; bool echo_large_blob_written; bool large_blob_written; array? get_cred_blob; SupplementalPubKeysResponse? supplemental_pub_keys; AuthenticationExtensionsPaymentResponse? payment;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=203" + }, + "blink.mojom.PublicKeyCredentialRpEntity": { + "definition": "struct PublicKeyCredentialRpEntity { string id; string name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=253" + }, + "blink.mojom.PublicKeyCredentialUserEntity": { + "definition": "struct PublicKeyCredentialUserEntity { array id; string name; string display_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=264" + }, + "blink.mojom.PublicKeyCredentialParameters": { + "definition": "struct PublicKeyCredentialParameters { PublicKeyCredentialType type; int32 algorithm_identifier;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=278" + }, + "blink.mojom.CableAuthentication": { + "definition": "struct CableAuthentication { uint8 version; array? client_eid; array? authenticator_eid; array? session_pre_key; array? server_link_data; array? experiments;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=291" + }, + "blink.mojom.PRFValues": { + "definition": "struct PRFValues { array? id; array first; array? second;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=320" + }, + "blink.mojom.PaymentOptions": { + "definition": "struct PaymentOptions { payments.mojom.PaymentCurrencyAmount total; PaymentCredentialInstrument instrument; string? payee_name; url.mojom.Origin? payee_origin; array? payment_entities_logos; array? browser_bound_public_key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=335" + }, + "blink.mojom.PaymentCredentialInstrument": { + "definition": "struct PaymentCredentialInstrument { string display_name; url.mojom.Url icon; bool iconMustBeShown; string? details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=346" + }, + "blink.mojom.ShownPaymentEntityLogo": { + "definition": "struct ShownPaymentEntityLogo { url.mojom.Url url; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=365" + }, + "blink.mojom.RemoteDesktopClientOverride": { + "definition": "struct RemoteDesktopClientOverride { url.mojom.Origin origin; bool same_origin_with_ancestors;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=379" + }, + "blink.mojom.SupplementalPubKeysRequest": { + "definition": "struct SupplementalPubKeysRequest { bool device_scope_requested; bool provider_scope_requested; AttestationConveyancePreference attestation; array attestation_formats;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=384" + }, + "blink.mojom.PublicKeyCredentialRequestOptions": { + "definition": "struct PublicKeyCredentialRequestOptions { array? challenge; url.mojom.Url? challenge_url; mojo_base.mojom.TimeDelta? timeout; string relying_party_id; array allow_credentials; array hints; UserVerificationRequirement user_verification; AuthenticationExtensionsClientInputs extensions;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=404" + }, + "blink.mojom.AuthenticationExtensionsClientInputs": { + "definition": "struct AuthenticationExtensionsClientInputs { string? appid; array cable_authentication_data; [EnableIf=is_android] bool user_verification_methods; bool prf; array prf_inputs; bool large_blob_read; array? large_blob_write; bool get_cred_blob; RemoteDesktopClientOverride? remote_desktop_client_override; SupplementalPubKeysRequest? supplemental_pub_keys; array? payment_browser_bound_key_parameters;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=436" + }, + "blink.mojom.GetCredentialOptions": { + "definition": "struct GetCredentialOptions { Mediation mediation; PublicKeyCredentialRequestOptions? public_key; bool password = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=490" + }, + "blink.mojom.AuthenticatorSelectionCriteria": { + "definition": "struct AuthenticatorSelectionCriteria { AuthenticatorAttachment authenticator_attachment; ResidentKeyRequirement resident_key; UserVerificationRequirement user_verification;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=532" + }, + "blink.mojom.PublicKeyCredentialCreationOptions": { + "definition": "struct PublicKeyCredentialCreationOptions { PublicKeyCredentialRpEntity relying_party; PublicKeyCredentialUserEntity user; array challenge; array public_key_parameters; mojo_base.mojom.TimeDelta? timeout; array exclude_credentials; AuthenticatorSelectionCriteria? authenticator_selection; array hints; AttestationConveyancePreference attestation; bool hmac_create_secret; bool prf_enable; PRFValues? prf_input; ProtectionPolicy protection_policy; bool enforce_protection_policy; string? appid_exclude; bool cred_props; LargeBlobSupport large_blob_enable; bool is_payment_credential_creation; array? cred_blob; bool min_pin_length_requested = false; RemoteDesktopClientOverride? remote_desktop_client_override; SupplementalPubKeysRequest? supplemental_pub_keys; array? payment_browser_bound_key_parameters; array attestation_formats; bool is_conditional = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=545" + }, + "blink.mojom.PublicKeyCredentialDescriptor": { + "definition": "struct PublicKeyCredentialDescriptor { PublicKeyCredentialType type; array id; array transports;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=655" + }, + "blink.mojom.WebAuthnDOMExceptionDetails": { + "definition": "struct WebAuthnDOMExceptionDetails { string name; string message;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=667" + }, + "blink.mojom.PublicKeyCredentialReportOptions": { + "definition": "struct PublicKeyCredentialReportOptions { string relying_party_id; array? unknown_credential_id; AllAcceptedCredentialsOptions? all_accepted_credentials; CurrentUserDetailsOptions? current_user_details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=673" + }, + "blink.mojom.AllAcceptedCredentialsOptions": { + "definition": "struct AllAcceptedCredentialsOptions { array user_id; array> all_accepted_credentials_ids;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=681" + }, + "blink.mojom.CurrentUserDetailsOptions": { + "definition": "struct CurrentUserDetailsOptions { array user_id; string name; string display_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=687" + }, + "blink.mojom.WebAuthnClientCapability": { + "definition": "struct WebAuthnClientCapability { string name; bool supported;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=694" + }, + "blink.mojom.GetAssertionResponse": { + "definition": "struct GetAssertionResponse { AuthenticatorStatus status; GetAssertionAuthenticatorResponse? credential; WebAuthnDOMExceptionDetails? dom_exception_details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=703" + }, + "blink.mojom.AuthenticatorStatus": { + "definition": "enum AuthenticatorStatus { SUCCESS, PENDING_REQUEST, NOT_ALLOWED_ERROR, INVALID_DOMAIN, CREDENTIAL_EXCLUDED, NOT_IMPLEMENTED, NOT_FOCUSED, RESIDENT_CREDENTIALS_UNSUPPORTED, USER_VERIFICATION_UNSUPPORTED, ALGORITHM_UNSUPPORTED, EMPTY_ALLOW_CREDENTIALS, ANDROID_NOT_SUPPORTED_ERROR, PROTECTION_POLICY_INCONSISTENT, ABORT_ERROR, OPAQUE_DOMAIN, INVALID_PROTOCOL, BAD_RELYING_PARTY_ID, BAD_RELYING_PARTY_ID_ATTEMPTED_FETCH, BAD_RELYING_PARTY_ID_WRONG_CONTENT_TYPE, BAD_RELYING_PARTY_ID_JSON_PARSE_ERROR, BAD_RELYING_PARTY_ID_NO_JSON_MATCH, BAD_RELYING_PARTY_ID_NO_JSON_MATCH_HIT_LIMITS, CANNOT_READ_AND_WRITE_LARGE_BLOB, INVALID_ALLOW_CREDENTIALS_FOR_LARGE_BLOB, FAILED_TO_SAVE_CREDENTIAL_ID_FOR_PAYMENT_EXTENSION, REMOTE_DESKTOP_CLIENT_OVERRIDE_NOT_AUTHORIZED, DEVICE_PUBLIC_KEY_ATTESTATION_REJECTED, CERTIFICATE_ERROR, ERROR_WITH_DOM_EXCEPTION_DETAILS, IMMEDIATE_NOT_FOUND, UNKNOWN_ERROR,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=24" + }, + "blink.mojom.AuthenticatorTransport": { + "definition": "enum AuthenticatorTransport { USB, NFC, BLE, HYBRID, INTERNAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=66" + }, + "blink.mojom.Hint": { + "definition": "enum Hint { SECURITY_KEY, CLIENT_DEVICE, HYBRID,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=75" + }, + "blink.mojom.UserVerificationRequirement": { + "definition": "enum UserVerificationRequirement { REQUIRED, PREFERRED, DISCOURAGED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=284" + }, + "blink.mojom.Mediation": { + "definition": "enum Mediation { MODAL, CONDITIONAL, IMMEDIATE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=391" + }, + "blink.mojom.ResidentKeyRequirement": { + "definition": "enum ResidentKeyRequirement { DISCOURAGED, PREFERRED, REQUIRED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=503" + }, + "blink.mojom.AuthenticatorAttachment": { + "definition": "enum AuthenticatorAttachment { NO_PREFERENCE, PLATFORM, CROSS_PLATFORM,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=510" + }, + "blink.mojom.ProtectionPolicy": { + "definition": "enum ProtectionPolicy { UNSPECIFIED, NONE, UV_OR_CRED_ID_REQUIRED, UV_REQUIRED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=516" + }, + "blink.mojom.LargeBlobSupport": { + "definition": "enum LargeBlobSupport { NOT_REQUESTED, REQUIRED, PREFERRED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=525" + }, + "blink.mojom.AttestationConveyancePreference": { + "definition": "enum AttestationConveyancePreference { NONE, INDIRECT, DIRECT, ENTERPRISE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=639" + }, + "blink.mojom.PublicKeyCredentialType": { + "definition": "enum PublicKeyCredentialType { PUBLIC_KEY,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=648" + }, + "blink.mojom.GetCredentialResponse": { + "definition": "union GetCredentialResponse { GetAssertionResponse get_assertion_response; CredentialInfo password_response;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webauthn/authenticator.mojom;l=710" + }, + "blink.mojom.DigitalIdentityRequest.Get": { + "definition": "Get(array digital_credential_requests) => (RequestDigitalIdentityStatus status, string? protocol, mojo_base.mojom.Value? token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/digital_identity_request.mojom;l=50" + }, + "blink.mojom.DigitalIdentityRequest.Create": { + "definition": "Create(array digital_credential_requests) => (RequestDigitalIdentityStatus status, string? protocol, mojo_base.mojom.Value? token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/digital_identity_request.mojom;l=63" + }, + "blink.mojom.DigitalIdentityRequest.Abort": { + "definition": "Abort();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/digital_identity_request.mojom;l=69" + }, + "blink.mojom.DigitalCredentialGetRequest": { + "definition": "struct DigitalCredentialGetRequest { string protocol; mojo_base.mojom.Value data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/digital_identity_request.mojom;l=14" + }, + "blink.mojom.DigitalCredentialCreateRequest": { + "definition": "struct DigitalCredentialCreateRequest { string protocol; mojo_base.mojom.Value data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/digital_identity_request.mojom;l=20" + }, + "blink.mojom.RequestDigitalIdentityStatus": { + "definition": "enum RequestDigitalIdentityStatus { kSuccess, kError, kErrorTooManyRequests, kErrorCanceled, kErrorNoRequests, kErrorNoTransientUserActivation, kErrorInvalidJson,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/digital_identity_request.mojom;l=28" + }, + "blink.mojom.FederatedAuthRequest.RequestToken": { + "definition": "RequestToken(array idp_get_params, CredentialMediationRequirement requirement) => (RequestTokenStatus status, url.mojom.Url? selected_identity_provider_config_url, mojo_base.mojom.Value? token, TokenError? error, bool is_auto_selected);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=211" + }, + "blink.mojom.FederatedAuthRequest.RequestUserInfo": { + "definition": "RequestUserInfo(IdentityProviderConfig provider) => (RequestUserInfoStatus status, array? user_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=221" + }, + "blink.mojom.FederatedAuthRequest.CancelTokenRequest": { + "definition": "CancelTokenRequest();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=225" + }, + "blink.mojom.FederatedAuthRequest.ResolveTokenRequest": { + "definition": "ResolveTokenRequest(string? account_id, mojo_base.mojom.Value token) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=232" + }, + "blink.mojom.FederatedAuthRequest.SetIdpSigninStatus": { + "definition": "SetIdpSigninStatus(url.mojom.Origin origin, IdpSigninStatus status, LoginStatusOptions? options) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=238" + }, + "blink.mojom.FederatedAuthRequest.RegisterIdP": { + "definition": "RegisterIdP(url.mojom.Url url) => (RegisterIdpStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=243" + }, + "blink.mojom.FederatedAuthRequest.UnregisterIdP": { + "definition": "UnregisterIdP(url.mojom.Url url) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=246" + }, + "blink.mojom.FederatedAuthRequest.CloseModalDialogView": { + "definition": "CloseModalDialogView();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=249" + }, + "blink.mojom.FederatedAuthRequest.PreventSilentAccess": { + "definition": "PreventSilentAccess() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=258" + }, + "blink.mojom.FederatedAuthRequest.Disconnect": { + "definition": "Disconnect(IdentityCredentialDisconnectOptions options) => (DisconnectStatus status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=262" + }, + "blink.mojom.IdentityProviderConfig": { + "definition": "struct IdentityProviderConfig { url.mojom.Url config_url; bool from_idp_registration_api; string? type; string client_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=86" + }, + "blink.mojom.IdentityProviderRequestOptions": { + "definition": "struct IdentityProviderRequestOptions { IdentityProviderConfig config; string nonce; string login_hint; string domain_hint; array? fields; string? params_json; Format? format;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=111" + }, + "blink.mojom.IdentityCredentialDisconnectOptions": { + "definition": "struct IdentityCredentialDisconnectOptions { IdentityProviderConfig config; string account_hint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=144" + }, + "blink.mojom.IdentityUserInfo": { + "definition": "struct IdentityUserInfo { string email; string given_name; string name; string picture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=153" + }, + "blink.mojom.LoginStatusAccount": { + "definition": "struct LoginStatusAccount { string id; string email; string name; string? given_name; url.mojom.Url? picture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=161" + }, + "blink.mojom.LoginStatusOptions": { + "definition": "struct LoginStatusOptions { array accounts; mojo_base.mojom.TimeDelta? expiration;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=170" + }, + "blink.mojom.IdentityProviderGetParameters": { + "definition": "struct IdentityProviderGetParameters { array providers; RpContext context; RpMode mode;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=176" + }, + "blink.mojom.TokenError": { + "definition": "struct TokenError { string? code; string? url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=189" + }, + "blink.mojom.RequestTokenStatus": { + "definition": "enum RequestTokenStatus { kSuccess, kErrorTooManyRequests, kErrorCanceled, kError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=22" + }, + "blink.mojom.RequestUserInfoStatus": { + "definition": "enum RequestUserInfoStatus { kSuccess, kError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=32" + }, + "blink.mojom.DisconnectStatus": { + "definition": "enum DisconnectStatus { kSuccess, kErrorTooManyRequests, kError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=40" + }, + "blink.mojom.IdpSigninStatus": { + "definition": "enum IdpSigninStatus { kSignedIn, kSignedOut,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=46" + }, + "blink.mojom.RpContext": { + "definition": "enum RpContext { kSignIn = 0, kSignUp = 1, kUse = 2, kContinue = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=55" + }, + "blink.mojom.RpMode": { + "definition": "enum RpMode { kActive = 0, kPassive = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=68" + }, + "blink.mojom.RegisterIdpStatus": { + "definition": "enum RegisterIdpStatus { kSuccess, kErrorFeatureDisabled, kErrorCrossOriginConfig, kErrorNoTransientActivation, kErrorDeclined, kErrorInvalidConfig,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=76" + }, + "blink.mojom.Format": { + "definition": "enum Format { kSdJwt,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webid/federated_auth_request.mojom;l=106" + }, + "blink.mojom.WebPreferences": { + "definition": "struct WebPreferences { map standard_font_family_map; map fixed_font_family_map; map serif_font_family_map; map sans_serif_font_family_map; map cursive_font_family_map; map fantasy_font_family_map; map math_font_family_map; int32 default_font_size; int32 default_fixed_font_size; int32 minimum_font_size; int32 minimum_logical_font_size; string default_encoding; bool always_show_context_menu_on_touch; bool context_menu_on_mouse_up; bool javascript_enabled; bool web_security_enabled; bool loads_images_automatically; bool images_enabled; bool plugins_enabled; bool dom_paste_enabled; bool shrinks_standalone_images_to_fit; bool text_areas_are_resizable; bool allow_scripts_to_close_windows; bool remote_fonts_enabled; bool javascript_can_access_clipboard; bool dns_prefetching_enabled; bool data_saver_enabled; bool local_storage_enabled; bool tabs_to_links; bool disable_ipc_flooding_protection; bool hyperlink_auditing_enabled; bool allow_universal_access_from_file_urls; bool allow_file_access_from_file_urls; bool webgl1_enabled; bool webgl2_enabled; bool privileged_webgl_extensions_enabled; bool webgl_errors_to_console_enabled; bool hide_scrollbars; bool prefers_default_scrollbar_styles; bool accelerated_2d_canvas_enabled; bool canvas_2d_layers_enabled; bool antialiased_2d_canvas_disabled; bool antialiased_clips_2d_canvas_enabled; bool accelerated_filters_enabled; bool deferred_filters_enabled; bool container_culling_enabled; bool allow_running_insecure_content; bool disable_reading_from_canvas; bool strict_mixed_content_checking; bool strict_powerful_feature_restrictions; bool allow_geolocation_on_insecure_origins; bool strictly_block_blockable_mixed_content; bool block_mixed_plugin_content; bool password_echo_enabled; bool should_clear_document_background; bool enable_scroll_animator; bool prefers_reduced_motion; bool prefers_reduced_transparency; bool inverted_colors; bool touch_event_feature_detection_enabled; int32 pointer_events_max_touch_points; int32 available_pointer_types; PointerType primary_pointer_type; OutputDeviceUpdateAbilityType output_device_update_ability_type; int32 available_hover_types; HoverType primary_hover_type; bool dont_send_key_events_to_javascript; bool barrel_button_for_drag_enabled; bool sync_xhr_in_documents_enabled; bool target_blank_implies_no_opener_enabled_will_be_removed; bool ignore_permission_for_device_changed_event; int32 number_of_cpu_cores; EditingBehavior editing_behavior; bool supports_multiple_windows; bool viewport_enabled; bool viewport_meta_enabled; bool auto_zoom_focused_editable_to_legible_scale; bool shrinks_viewport_contents_to_fit; ViewportStyle viewport_style; bool smooth_scroll_for_find_enabled; bool main_frame_resizes_are_orientation_changes; bool initialize_at_minimum_page_scale; bool smart_insert_delete_enabled; bool spatial_navigation_enabled; V8CacheOptions v8_cache_options; bool record_whole_document; bool stylus_handwriting_enabled; bool cookie_enabled; bool accelerated_video_decode_enabled; ImageAnimationPolicy animation_policy; bool user_gesture_required_for_presentation; bool text_tracks_enabled; string text_track_background_color; string text_track_text_color; string text_track_text_size; string text_track_text_shadow; string text_track_font_family; string text_track_font_style; string text_track_font_variant; string text_track_window_color; string text_track_window_radius; float text_track_margin_percentage; bool immersive_mode_enabled; bool double_tap_to_zoom_enabled; bool fullscreen_supported; bool text_autosizing_enabled; url.mojom.Url web_app_scope; [EnableIf=is_android] float font_scale_factor; [EnableIf=is_android] int32 font_weight_adjustment; [EnableIf=is_android] int32 text_size_contrast_factor; [EnableIf=is_android] float device_scale_adjustment; [EnableIf=is_android] bool force_enable_zoom; [EnableIf=is_android] url.mojom.Url default_video_poster_url; [EnableIf=is_android] bool support_deprecated_target_density_dpi; [EnableIf=is_android] bool wide_viewport_quirk; [EnableIf=is_android] bool use_wide_viewport; [EnableIf=is_android] bool force_zero_layout_height; [EnableIf=is_android] bool viewport_meta_merge_content_quirk; [EnableIf=is_android] bool viewport_meta_non_user_scalable_quirk; [EnableIf=is_android] bool viewport_meta_zero_values_quirk; [EnableIf=is_android] bool clobber_user_agent_initial_scale_quirk; [EnableIf=is_android] bool ignore_main_frame_overflow_hidden_quirk; [EnableIf=is_android] bool report_screen_size_in_physical_pixels_quirk; [EnableIf=is_android] bool reuse_global_for_unowned_main_frame; [EnableIf=is_android] bool spellcheck_enabled_by_default; [EnableIf=is_android] bool video_fullscreen_orientation_lock_enabled; [EnableIf=is_android] bool video_rotate_to_fullscreen_enabled; [EnableIf=is_android] bool embedded_media_experience_enabled; [EnableIf=is_android] bool css_hex_alpha_color_enabled; [EnableIf=is_android] bool scroll_top_left_interop_enabled; [EnableIf=is_android] bool disable_accelerated_small_canvases; [EnableIf=is_android] bool long_press_link_select_text; [EnableIf=is_android] bool disable_webauthn; [EnableIf=is_fuchsia] bool disable_webauthn; bool force_dark_mode_enabled; float default_minimum_page_scale_factor; float default_maximum_page_scale_factor; bool hide_download_ui; bool presentation_receiver; bool media_controls_enabled; bool do_not_update_selection_on_mutating_selection_range; AutoplayPolicy autoplay_policy; bool require_transient_activation_for_get_display_media; bool require_transient_activation_for_show_file_or_directory_picker; bool require_transient_activation_and_user_confirmation_for_subapps_api; bool in_forced_colors; bool is_forced_colors_disabled; skia.mojom.SkColor? root_scrollbar_theme_color; PreferredColorScheme preferred_root_scrollbar_color_scheme; PreferredColorScheme preferred_color_scheme; PreferredContrast preferred_contrast; EffectiveConnectionType low_priority_iframes_threshold; bool picture_in_picture_enabled; bool translate_service_available; EffectiveConnectionType network_quality_estimator_web_holdback; bool lazy_load_enabled; bool allow_mixed_content_upgrades; bool always_show_focus; bool touch_drag_drop_enabled; bool touch_dragend_context_menu = false; bool webxr_immersive_ar_allowed; bool renderer_wide_named_frame_lookup; bool strict_mime_type_check_for_worker_scripts_enabled = true; bool modal_context_menu = true; [EnableIf=is_android] bool dynamic_safe_area_insets_enabled = false; bool payment_request_enabled = false; bool content_based_fingerprinting_protection_enabled = false; bool ai_prompt_api_enabled = false; [EnableIf=is_android] bool should_screenshot_on_mainframe_same_doc_navigation = true; [EnableIf=is_mac] bool should_disable_external_popups = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=116" + }, + "blink.mojom.PointerType": { + "definition": "enum PointerType { kPointerNone = 1, kPointerFirstType = kPointerNone, kPointerCoarseType = 2, kPointerFineType = 4, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=14" + }, + "blink.mojom.HoverType": { + "definition": "enum HoverType { kHoverNone = 1, kHoverFirstType = kHoverNone, kHoverHoverType = 2, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=21" + }, + "blink.mojom.OutputDeviceUpdateAbilityType": { + "definition": "enum OutputDeviceUpdateAbilityType { kSlowType, kFastType,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=32" + }, + "blink.mojom.EditingBehavior": { + "definition": "enum EditingBehavior { kEditingMacBehavior, kEditingWindowsBehavior, kEditingUnixBehavior, kEditingAndroidBehavior, kEditingChromeOSBehavior,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=51" + }, + "blink.mojom.ImageAnimationPolicy": { + "definition": "enum ImageAnimationPolicy { kImageAnimationPolicyAllowed, kImageAnimationPolicyAnimateOnce, kImageAnimationPolicyNoAnimation,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=63" + }, + "blink.mojom.ViewportStyle": { + "definition": "enum ViewportStyle { kDefault, kMobile, kTelevision, kLast = kTelevision,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=69" + }, + "blink.mojom.AutoplayPolicy": { + "definition": "enum AutoplayPolicy { kNoUserGestureRequired, kUserGestureRequired, kDocumentUserActivationRequired,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=78" + }, + "blink.mojom.EffectiveConnectionType": { + "definition": "enum EffectiveConnectionType { kEffectiveConnectionUnknownType, kEffectiveConnectionOfflineType, kEffectiveConnectionSlow2GType, kEffectiveConnection2GType, kEffectiveConnection3GType, kEffectiveConnection4GType, kEffectiveConnectionTypeLast,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webpreferences/web_preferences.mojom;l=84" + }, + "blink.mojom.ShareError": { + "definition": "enum ShareError { OK, INTERNAL_ERROR, PERMISSION_DENIED, CANCELED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webshare/share_error.mojom;l=8" + }, + "blink.mojom.ShareService.Share": { + "definition": "Share(string title, string text, url.mojom.Url url, array files) => (ShareError error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webshare/webshare.mojom;l=20" + }, + "blink.mojom.SharedFile": { + "definition": "struct SharedFile { mojo_base.mojom.SafeBaseName name; SerializedBlob blob;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webshare/webshare.mojom;l=13" + }, + "blink.mojom.WebSocketConnector.Connect": { + "definition": "Connect(url.mojom.Url url, array requested_protocols, network.mojom.SiteForCookies site_for_cookies, string? user_agent, network.mojom.StorageAccessApiStatus storage_access_api_status, pending_remote handshake_client, mojo_base.mojom.UnguessableToken? throttling_profile_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/websockets/websocket_connector.mojom;l=23" + }, + "blink.mojom.WebTransportConnector.Connect": { + "definition": "Connect( url.mojom.Url url, array fingerprints, array application_protocols, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webtransport/web_transport_connector.mojom;l=15" + }, + "blink.mojom.WebViewMediaIntegrityService.GetIntegrityProvider": { + "definition": "GetIntegrityProvider( pending_receiver provider_receiver, uint64 cloud_project_number) => (WebViewMediaIntegrityErrorCode? error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webview/webview_media_integrity.mojom;l=79" + }, + "blink.mojom.WebViewMediaIntegrityProvider.RequestToken": { + "definition": "RequestToken(string? content_binding) => (WebViewMediaIntegrityTokenResponse response);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webview/webview_media_integrity.mojom;l=118" + }, + "blink.mojom.WebViewMediaIntegrityErrorCode": { + "definition": "enum WebViewMediaIntegrityErrorCode { kInternalError, kNonRecoverableError, kApiDisabledByApplication, kInvalidArgument, kTokenProviderInvalid,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webview/webview_media_integrity.mojom;l=13" + }, + "blink.mojom.WebViewMediaIntegrityTokenResponse": { + "definition": "union WebViewMediaIntegrityTokenResponse { WebViewMediaIntegrityErrorCode error_code; string token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/webview/webview_media_integrity.mojom;l=39" + }, + "blink.mojom.DeviceEmulationParams": { + "definition": "struct DeviceEmulationParams { EmulatedScreenType screen_type; gfx.mojom.Size screen_size; gfx.mojom.Point? view_position; gfx.mojom.Size view_size; float device_scale_factor; float scale; gfx.mojom.PointF viewport_offset; float viewport_scale; display.mojom.ScreenOrientation screen_orientation_type; uint32 screen_orientation_angle; array viewport_segments; blink.mojom.DevicePostureType device_posture;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/device_emulation_params.mojom;l=13" + }, + "blink.mojom.EmulatedScreenType": { + "definition": "enum EmulatedScreenType { kDesktop, kMobile };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/device_emulation_params.mojom;l=11" + }, + "blink.mojom.WidgetCompositor.VisualStateRequest": { + "definition": "VisualStateRequest() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=25" + }, + "blink.mojom.WidgetHost.SetCursor": { + "definition": "SetCursor(ui.mojom.Cursor cursor);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=33" + }, + "blink.mojom.WidgetHost.UpdateTooltipUnderCursor": { + "definition": "UpdateTooltipUnderCursor(mojo_base.mojom.String16 tooltip_text, mojo_base.mojom.TextDirection text_direction_hint);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=37" + }, + "blink.mojom.WidgetHost.UpdateTooltipFromKeyboard": { + "definition": "UpdateTooltipFromKeyboard(mojo_base.mojom.String16 tooltip_text, mojo_base.mojom.TextDirection text_direction_hint, gfx.mojom.Rect bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=43" + }, + "blink.mojom.WidgetHost.ClearKeyboardTriggeredTooltip": { + "definition": "ClearKeyboardTriggeredTooltip();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=53" + }, + "blink.mojom.WidgetHost.TextInputStateChanged": { + "definition": "TextInputStateChanged(ui.mojom.TextInputState state);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=57" + }, + "blink.mojom.WidgetHost.SelectionBoundsChanged": { + "definition": "SelectionBoundsChanged(gfx.mojom.Rect anchor_rect, mojo_base.mojom.TextDirection anchor_dir, gfx.mojom.Rect focus_rect, mojo_base.mojom.TextDirection focus_dir, gfx.mojom.Rect bounding_box_rect, bool is_anchor_first);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=60" + }, + "blink.mojom.WidgetHost.CreateFrameSink": { + "definition": "CreateFrameSink( pending_receiver compositor_frame_sink_receiver, pending_remote compositor_frame_sink_client, pending_remote render_input_router_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=72" + }, + "blink.mojom.WidgetHost.RegisterRenderFrameMetadataObserver": { + "definition": "RegisterRenderFrameMetadataObserver( pending_receiver render_frame_metadata_observer_client_receiver, pending_remote render_frame_metadata_observer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=84" + }, + "blink.mojom.Widget.ForceRedraw": { + "definition": "ForceRedraw() => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=97" + }, + "blink.mojom.Widget.UpdateVisualProperties": { + "definition": "UpdateVisualProperties(VisualProperties visual_properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=100" + }, + "blink.mojom.Widget.UpdateScreenRects": { + "definition": "UpdateScreenRects(gfx.mojom.Rect widget_screen_rect, gfx.mojom.Rect window_screen_rect) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=105" + }, + "blink.mojom.Widget.WasHidden": { + "definition": "WasHidden();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=113" + }, + "blink.mojom.Widget.WasShown": { + "definition": "WasShown(bool was_evicted, RecordContentToVisibleTimeRequest? record_tab_switch_time_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=116" + }, + "blink.mojom.Widget.RequestSuccessfulPresentationTimeForNextFrame": { + "definition": "RequestSuccessfulPresentationTimeForNextFrame( RecordContentToVisibleTimeRequest visible_time_request);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=121" + }, + "blink.mojom.Widget.CancelSuccessfulPresentationTimeRequest": { + "definition": "CancelSuccessfulPresentationTimeRequest();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=127" + }, + "blink.mojom.Widget.SetupBrowserRenderInputRouterConnections": { + "definition": "SetupBrowserRenderInputRouterConnections( pending_receiver browser_client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=131" + }, + "blink.mojom.RenderInputRouterClient.GetWidgetInputHandler": { + "definition": "GetWidgetInputHandler( pending_receiver request, pending_remote host, bool from_viz);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=142" + }, + "blink.mojom.RenderInputRouterClient.ShowContextMenu": { + "definition": "ShowContextMenu( ui.mojom.MenuSourceType source_type, gfx.mojom.Point location);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=149" + }, + "blink.mojom.RenderInputRouterClient.BindInputTargetClient": { + "definition": "BindInputTargetClient(pending_receiver host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/platform_widget.mojom;l=153" + }, + "blink.mojom.RecordContentToVisibleTimeRequest": { + "definition": "struct RecordContentToVisibleTimeRequest { mojo_base.mojom.TimeTicks event_start_time; bool destination_is_loaded; bool show_reason_tab_switching = false; bool show_reason_bfcache_restore = false; bool show_reason_unfolding = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/record_content_to_visible_time_request.mojom;l=15" + }, + "blink.mojom.VisualProperties": { + "definition": "struct VisualProperties { display.mojom.ScreenInfos screen_infos; bool auto_resize_enabled = false; bool resizable = true; gfx.mojom.Size min_size_for_auto_resize; gfx.mojom.Size max_size_for_auto_resize; gfx.mojom.Size new_size_device_px; gfx.mojom.Size visible_viewport_size_device_px; gfx.mojom.Rect compositor_viewport_pixel_rect; cc.mojom.BrowserControlsParams browser_controls_params; bool scroll_focused_node_into_view; viz.mojom.LocalSurfaceId? local_surface_id; bool is_fullscreen_granted; DisplayMode display_mode = DisplayMode.kUndefined; ui.mojom.WindowShowState window_show_state = ui.mojom.WindowShowState.kDefault; uint32 capture_sequence_number; double zoom_level; double css_zoom_factor; float page_scale_factor = 1; float compositing_scale_factor = 1; float cursor_accessibility_scale_factor = 1; array root_widget_viewport_segments; bool is_pinch_gesture_active; gfx.mojom.Rect window_controls_overlay_rect; uint32 virtual_keyboard_resize_height_device_px;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/widget/visual_properties.mojom;l=15" + }, + "blink.mojom.WindowFeatures": { + "definition": "struct WindowFeatures { gfx.mojom.Rect bounds; bool has_x = false; bool has_y = false; bool has_width = false; bool has_height = false; bool is_popup = false; bool is_partitioned_popin = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/window_features/window_features.mojom;l=9" + }, + "blink.mojom.DedicatedWorkerHostFactoryClient.OnWorkerHostCreated": { + "definition": "OnWorkerHostCreated( pending_remote browser_interface_broker, pending_remote host, url.mojom.Origin origin);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom;l=38" + }, + "blink.mojom.DedicatedWorkerHostFactoryClient.OnScriptLoadStarted": { + "definition": "OnScriptLoadStarted( ServiceWorkerContainerInfoForClient? service_worker_container_info, WorkerMainScriptLoadParams main_script_load_params, URLLoaderFactoryBundle subresource_loader_factories, pending_receiver subresource_loader_updater, ControllerServiceWorkerInfo? controller_info, pending_remote back_forward_cache_controller_host, pending_receiver? coep_reporting_observer_receiver, pending_receiver? dip_reporting_observer_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom;l=49" + }, + "blink.mojom.DedicatedWorkerHostFactoryClient.OnScriptLoadStartFailed": { + "definition": "OnScriptLoadStartFailed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom;l=89" + }, + "blink.mojom.DedicatedWorkerHostFactory.CreateWorkerHostAndStartScriptLoad": { + "definition": "CreateWorkerHostAndStartScriptLoad( blink.mojom.DedicatedWorkerToken token, url.mojom.Url script_url, network.mojom.CredentialsMode credentials_mode, blink.mojom.FetchClientSettingsObject outside_fetch_client_settings_object, pending_remote? blob_url_token, pending_remote client, network.mojom.StorageAccessApiStatus storage_access_api_status);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom;l=104" + }, + "blink.mojom.SharedWorker.Connect": { + "definition": "Connect(int32 connection_id, MessagePortDescriptor message_port);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker.mojom;l=14" + }, + "blink.mojom.SharedWorker.Terminate": { + "definition": "Terminate();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker.mojom;l=18" + }, + "blink.mojom.SharedWorkerClient.OnCreated": { + "definition": "OnCreated(SharedWorkerCreationContextType creation_context_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_client.mojom;l=17" + }, + "blink.mojom.SharedWorkerClient.OnConnected": { + "definition": "OnConnected(array features_used);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_client.mojom;l=20" + }, + "blink.mojom.SharedWorkerClient.OnScriptLoadFailed": { + "definition": "OnScriptLoadFailed(string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_client.mojom;l=25" + }, + "blink.mojom.SharedWorkerClient.OnReportException": { + "definition": "OnReportException(SharedWorkerExceptionDetails details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_client.mojom;l=28" + }, + "blink.mojom.SharedWorkerClient.OnFeatureUsed": { + "definition": "OnFeatureUsed(WebFeature feature);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_client.mojom;l=32" + }, + "blink.mojom.SharedWorkerConnector.Connect": { + "definition": "Connect(SharedWorkerInfo info, pending_remote client, SharedWorkerCreationContextType creation_context_type, MessagePortDescriptor message_port, pending_remote? blob_url_token, int64 client_ukm_source_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_connector.mojom;l=23" + }, + "blink.mojom.SharedWorkerCreationContextType": { + "definition": "enum SharedWorkerCreationContextType { kNonsecure, kSecure};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_creation_context_type.mojom;l=7" + }, + "blink.mojom.SharedWorkerExceptionDetails": { + "definition": "struct SharedWorkerExceptionDetails { string error_message; network.mojom.SourceLocation source_location; SharedWorkerErrorType error_type;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_exception_details.mojom;l=22" + }, + "blink.mojom.SharedWorkerErrorType": { + "definition": "enum SharedWorkerErrorType { kParseError, kRuntimeError,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_exception_details.mojom;l=13" + }, + "blink.mojom.SharedWorkerFactory.CreateSharedWorker": { + "definition": "CreateSharedWorker( SharedWorkerInfo info, SharedWorkerToken token, blink.mojom.StorageKey constructor_key, url.mojom.Origin origin, bool is_constructor_secure_context, string user_agent, UserAgentMetadata ua_metadata, bool pause_on_start, mojo_base.mojom.UnguessableToken devtools_worker_token, RendererPreferences renderer_preferences, pending_receiver preference_watcher_receiver, pending_remote content_settings, ServiceWorkerContainerInfoForClient? service_worker_container_info, WorkerMainScriptLoadParams main_script_load_params, URLLoaderFactoryBundle subresource_loader_factories, ControllerServiceWorkerInfo? controller_info, PolicyContainer policy_container, pending_remote host, pending_receiver shared_worker, pending_remote browser_interface_broker, int64 ukm_source_id, bool require_cross_site_request_for_cookies, pending_receiver? coep_reporting_observer_receiver, pending_receiver? dip_reporting_observer_receiver);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_factory.mojom;l=41" + }, + "blink.mojom.SharedWorkerHost.OnConnected": { + "definition": "OnConnected(int32 connection_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_host.mojom;l=17" + }, + "blink.mojom.SharedWorkerHost.OnContextClosed": { + "definition": "OnContextClosed();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_host.mojom;l=21" + }, + "blink.mojom.SharedWorkerHost.OnReadyForInspection": { + "definition": "OnReadyForInspection(pending_remote agent, pending_receiver agent_host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_host.mojom;l=26" + }, + "blink.mojom.SharedWorkerHost.OnScriptLoadFailed": { + "definition": "OnScriptLoadFailed(string error_message);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_host.mojom;l=32" + }, + "blink.mojom.SharedWorkerHost.OnReportException": { + "definition": "OnReportException(SharedWorkerExceptionDetails details);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_host.mojom;l=35" + }, + "blink.mojom.SharedWorkerHost.OnFeatureUsed": { + "definition": "OnFeatureUsed(WebFeature feature);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_host.mojom;l=39" + }, + "blink.mojom.SharedWorkerInfo": { + "definition": "struct SharedWorkerInfo { url.mojom.Url url; WorkerOptions options; array content_security_policies; FetchClientSettingsObject outside_fetch_client_settings_object; SharedWorkerSameSiteCookies same_site_cookies = SharedWorkerSameSiteCookies.kNone; bool extended_lifetime;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_info.mojom;l=27" + }, + "blink.mojom.SharedWorkerSameSiteCookies": { + "definition": "enum SharedWorkerSameSiteCookies { kAll, kNone};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/shared_worker_info.mojom;l=18" + }, + "blink.mojom.SubresourceLoaderUpdater.UpdateSubresourceLoaderFactories": { + "definition": "UpdateSubresourceLoaderFactories( URLLoaderFactoryBundle subresource_loader_factories);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/subresource_loader_updater.mojom;l=14" + }, + "blink.mojom.WorkerContentSettingsProxy.AllowIndexedDB": { + "definition": "[Sync] AllowIndexedDB() => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/worker_content_settings_proxy.mojom;l=15" + }, + "blink.mojom.WorkerContentSettingsProxy.AllowCacheStorage": { + "definition": "[Sync] AllowCacheStorage() => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/worker_content_settings_proxy.mojom;l=19" + }, + "blink.mojom.WorkerContentSettingsProxy.AllowWebLocks": { + "definition": "[Sync] AllowWebLocks() => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/worker_content_settings_proxy.mojom;l=23" + }, + "blink.mojom.WorkerContentSettingsProxy.RequestFileSystemAccessSync": { + "definition": "[Sync] RequestFileSystemAccessSync() => (bool result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/worker_content_settings_proxy.mojom;l=27" + }, + "blink.mojom.WorkerMainScriptLoadParams": { + "definition": "struct WorkerMainScriptLoadParams { int32 request_id; network.mojom.URLResponseHead response_head; handle response_body; network.mojom.URLLoaderClientEndpoints? url_loader_client_endpoints; array redirect_infos; array redirect_response_heads;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/worker_main_script_load_params.mojom;l=13" + }, + "blink.mojom.WorkerOptions": { + "definition": "struct WorkerOptions { ScriptType type = ScriptType.kClassic; network.mojom.CredentialsMode credentials = network.mojom.CredentialsMode.kSameOrigin; string name = \"\";};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/worker_options.mojom;l=12" + }, + "blink.mojom.WorkletDevToolsHost.OnReadyForInspection": { + "definition": "OnReadyForInspection( pending_remote agent, pending_receiver agent_host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/worklet_global_scope_creation_params.mojom;l=20" + }, + "blink.mojom.WorkletGlobalScopeCreationParams": { + "definition": "struct WorkletGlobalScopeCreationParams { url.mojom.Url script_url; url.mojom.Origin starter_origin; array origin_trial_features; mojo_base.mojom.UnguessableToken devtools_token; pending_remote devtools_host; pending_remote code_cache_host; pending_remote browser_interface_broker; bool wait_for_debugger;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:third_party/blink/public/mojom/worker/worklet_global_scope_creation_params.mojom;l=27" + }, + "ax.mojom.Event": { + "definition": "enum Event { [Default]kNone = 0, kActiveDescendantChanged = 1, kAlert = 2, kAriaAttributeChangedDeprecated = 3, kAutocorrectionOccured = 4, kBlur = 5, kCheckedStateChanged = 6, kChildrenChanged = 7, kClicked = 8, kControlsChanged = 9, kDocumentSelectionChanged = 10, kDocumentTitleChanged = 11, kEndOfTest = 12, kExpandedChanged = 13, kFocus = 14, kFocusAfterMenuClose = 15, kFocusContext = 16, kHide = 17, kHitTestResult = 18, kHover = 19, kImageFrameUpdated = 20, kLayoutComplete = 21, kLiveRegionCreated = 22, kLiveRegionChanged = 23, kLoadComplete = 24, kLoadStart = 25, kLocationChanged = 26, kMediaStartedPlaying = 27, kMediaStoppedPlaying = 28, kMenuEnd = 29, kMenuListValueChangedDeprecated = 30, kMenuPopupEnd = 31, kMenuPopupStart = 32, kMenuStart = 33, kMouseCanceled = 34, kMouseDragged = 35, kMouseMoved = 36, kMousePressed = 37, kMouseReleased = 38, kRowCollapsed = 39, kRowCountChanged = 40, kRowExpanded = 41, kScrollPositionChanged = 42, kScrolledToAnchor = 43, kSelectedChildrenChanged = 44, kSelection = 45, kSelectionAdd = 46, kSelectionRemove = 47, kShow = 48, kStateChanged = 49, kTextChanged = 50, kTextSelectionChanged = 51, kTooltipClosed = 52, kTooltipOpened = 53, kTreeChanged = 54, kValueChanged = 55, kWindowActivated = 56, kWindowDeactivated = 57, kWindowVisibilityChanged = 58, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=33" + }, + "ax.mojom.Role": { + "definition": "enum Role { [Default]kUnknown = 181, kAbbr = 1, kAlert = 2, kAlertDialog = 3, kApplication = 4, kArticle = 5, kAudio = 6, kBanner = 7, kBlockquote = 8, kButton = 9, kCanvas = 10, kCaption = 11, kCaret = 12, kCell = 13, kCheckBox = 14, kClient = 15, kCode = 16, kColorWell = 17, kColumn = 18, kColumnHeader = 19, kComboBoxGrouping = 20, kComboBoxMenuButton = 21, [MinVersion=4] kComboBoxSelect = 209, kComplementary = 22, kComment = 23, kContentDeletion = 24, kContentInsertion = 25, kContentInfo = 26, kDate = 27, kDateTime = 28, kDefinition = 29, kDescriptionList = 30, kDescriptionListDetailDeprecated = 31, kDescriptionListTermDeprecated = 32, kDesktop = 33, kDetails = 34, kDialog = 35, kDirectoryDeprecated = 36, kDisclosureTriangle = 37, [MinVersion=5] kDisclosureTriangleGrouped = 210, kDocAbstract = 38, kDocAcknowledgments = 39, kDocAfterword = 40, kDocAppendix = 41, kDocBackLink = 42, kDocBiblioEntry = 43, kDocBibliography = 44, kDocBiblioRef = 45, kDocChapter = 46, kDocColophon = 47, kDocConclusion = 48, kDocCover = 49, kDocCredit = 50, kDocCredits = 51, kDocDedication = 52, kDocEndnote = 53, kDocEndnotes = 54, kDocEpigraph = 55, kDocEpilogue = 56, kDocErrata = 57, kDocExample = 58, kDocFootnote = 59, kDocForeword = 60, kDocGlossary = 61, kDocGlossRef = 62, kDocIndex = 63, kDocIntroduction = 64, kDocNoteRef = 65, kDocNotice = 66, kDocPageBreak = 67, kDocPageFooter = 68, kDocPageHeader = 69, kDocPageList = 70, kDocPart = 71, kDocPreface = 72, kDocPrologue = 73, kDocPullquote = 74, kDocQna = 75, kDocSubtitle = 76, kDocTip = 77, kDocToc = 78, kDocument = 79, kEmbeddedObject = 80, kEmphasis = 81, kFeed = 82, kFigcaption = 83, kFigure = 84, kFooter = 85, kSectionFooter = 86, kForm = 87, kGenericContainer = 88, kGraphicsDocument = 89, kGraphicsObject = 90, kGraphicsSymbol = 91, kGrid = 92, [MinVersion=7] kGridCell = 212, kGroup = 93, kHeader = 94, kSectionHeader = 95, kHeading = 96, kIframe = 97, kIframePresentational = 98, kImage = 99, kImeCandidate = 100, kInlineTextBox = 101, kInputTime = 102, kKeyboard = 103, kLabelText = 104, kLayoutTable = 105, kLayoutTableCell = 106, kLayoutTableRow = 107, kLegend = 108, kLineBreak = 109, kLink = 110, kList = 111, kListBox = 112, kListBoxOption = 113, kListGrid = 114, kListItem = 115, kListMarker = 116, kLog = 117, kMain = 118, kMark = 119, kMarquee = 120, kMath = 121, [MinVersion=3] kMathMLFraction = 188, [MinVersion=3] kMathMLIdentifier = 189, [MinVersion=2] kMathMLMath = 187, [MinVersion=3] kMathMLMultiscripts = 190, [MinVersion=3] kMathMLNoneScript = 191, [MinVersion=3] kMathMLNumber = 192, [MinVersion=3] kMathMLOperator = 193, [MinVersion=3] kMathMLOver = 194, [MinVersion=3] kMathMLPrescriptDelimiter = 195, [MinVersion=3] kMathMLRoot = 196, [MinVersion=3] kMathMLRow = 197, [MinVersion=3] kMathMLSquareRoot = 198, [MinVersion=3] kMathMLStringLiteral = 199, [MinVersion=3] kMathMLSub = 200, [MinVersion=3] kMathMLSubSup = 201, [MinVersion=3] kMathMLSup = 202, [MinVersion=3] kMathMLTable = 203, [MinVersion=3] kMathMLTableCell = 204, [MinVersion=3] kMathMLTableRow = 205, [MinVersion=3] kMathMLText = 206, [MinVersion=3] kMathMLUnder = 207, [MinVersion=3] kMathMLUnderOver = 208, kMenu = 122, kMenuBar = 123, kMenuItem = 124, kMenuItemCheckBox = 125, kMenuItemRadio = 126, [MinVersion=8] kMenuItemSeparator = 213, kMenuListOption = 127, kMenuListPopup = 128, kMeter = 129, kNavigation = 130, kNone = 0, kNote = 131, kPane = 132, kParagraph = 133, kPdfActionableHighlight = 134, kPdfRoot = 135, kPluginObject = 136, kPopUpButton = 137, kPortalDeprecated = 138, kPreDeprecated = 139, kProgressIndicator = 140, kRadioButton = 141, kRadioGroup = 142, kRegion = 143, kRootWebArea = 144, kRow = 145, kRowGroup = 146, kRowHeader = 147, kRuby = 148, kRubyAnnotation = 149, kScrollBar = 150, kScrollView = 151, kSearch = 152, kSearchBox = 153, kSection = 154, [MinVersion=6] kSectionWithoutName = 211, kSlider = 155, kSpinButton = 156, kSplitter = 157, kStaticText = 158, kStatus = 159, kStrong = 160, [MinVersion=1] kSubscript = 185, kSuggestion = 161, [MinVersion=1] kSuperscript = 186, kSvgRoot = 162, kSwitch = 163, kTab = 164, kTabList = 165, kTabPanel = 166, kTable = 167, kTableHeaderContainer = 168, kTerm = 169, kTextField = 170, kTextFieldWithComboBox = 171, kTime = 172, kTimer = 173, kTitleBar = 174, kToggleButton = 175, kToolbar = 176, kTooltip = 177, kTree = 178, kTreeGrid = 179, kTreeItem = 180, kVideo = 182, kWebView = 183, kWindow = 184,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=124" + }, + "ax.mojom.State": { + "definition": "enum State { [Default]kNone = 0, kAutofillAvailable = 1, kCollapsed = 2, kDefault = 3, kEditable = 4, kExpanded = 5, kFocusable = 6, kHorizontal = 7, kHovered = 8, kIgnored = 9, kInvisible = 10, kLinked = 11, kMultiline = 12, kMultiselectable = 13, kProtected = 14, kRequired = 15, kRichlyEditable = 16, kVertical = 17, kVisited = 18, [MinVersion=1] kHasActions = 19, [MinVersion=2] kHasInterestFor = 20,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=373" + }, + "ax.mojom.Action": { + "definition": "enum Action { [Default]kNone = 0, kAnnotatePageImages = 1, kBlur = 2, kClearAccessibilityFocus = 3, kCollapse = 4, kCustomAction = 5, kDecrement = 6, kDoDefault = 7, kExpand = 8, kFocus = 9, kGetImageData = 10, kGetTextLocation = 11, kHideTooltip = 12, kHitTest = 13, kIncrement = 14, kInternalInvalidateTree = 15, kLoadInlineTextBoxes = 16, [MinVersion=2] kLongClick = 38, kReplaceSelectedText = 17, [MinVersion=1] kResumeMedia = 34, kScrollBackward = 18, kScrollDown = 19, kScrollForward = 20, kScrollLeft = 21, kScrollRight = 22, kScrollUp = 23, kScrollToMakeVisible = 24, kScrollToPoint = 25, [MinVersion=3] kScrollToPositionAtRowColumn = 39, kSetAccessibilityFocus = 26, kSetScrollOffset = 27, kSetSelection = 28, kSetSequentialFocusNavigationStartingPoint = 29, kSetValue = 30, kShowContextMenu = 31, kSignalEndOfTest = 32, kShowTooltip = 33, [MinVersion=4] kStitchChildTree = 40, [MinVersion=1] kStartDuckingMedia = 35, [MinVersion=1] kStopDuckingMedia = 36, [MinVersion=1] kSuspendMedia = 37,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=406" + }, + "ax.mojom.ActionFlags": { + "definition": "enum ActionFlags { kNone, kRequestImages, kRequestInlineTextBoxes,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=524" + }, + "ax.mojom.ScrollAlignment": { + "definition": "enum ScrollAlignment { [Default]kNone = 0, kScrollAlignmentCenter = 1, kScrollAlignmentTop = 2, kScrollAlignmentBottom = 3, kScrollAlignmentLeft = 4, kScrollAlignmentRight = 5, kScrollAlignmentClosestEdge = 6};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=536" + }, + "ax.mojom.ScrollBehavior": { + "definition": "enum ScrollBehavior { [Default]kNone = 0, kDoNotScrollIfVisible = 1, kScrollIfVisible = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=551" + }, + "ax.mojom.DefaultActionVerb": { + "definition": "enum DefaultActionVerb { kNone, kActivate, kCheck, kClick, kClickAncestor, kJump, kOpen, kPress, kSelect, kUncheck,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=563" + }, + "ax.mojom.Mutation": { + "definition": "enum Mutation { kNone, kNodeCreated, kSubtreeCreated, kNodeChanged, kNodeRemoved, kTextChanged, kSubtreeUpdateEnd,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=583" + }, + "ax.mojom.StringAttribute": { + "definition": "enum StringAttribute { [Default]kNone = 0, kAccessKey = 1, kAppId = 2, kAriaInvalidValueDeprecated = 3, kAutoComplete = 4, [MinVersion=2] kAriaBrailleLabel = 33, [MinVersion=2] kAriaBrailleRoleDescription = 34, [MinVersion=6] kAriaCellColumnIndexText = 39, [MinVersion=6] kAriaCellRowIndexText = 40, [MinVersion=4] kAriaNotificationAnnouncementDeprecated = 36, [MinVersion=4] kAriaNotificationIdDeprecated = 37, kCheckedStateDescription = 5, kChildTreeId = 6, kChildTreeNodeAppId = 7, kClassName = 8, kContainerLiveRelevant = 9, kContainerLiveStatus = 10, [MinVersion=7] kDateTime = 41, kDescription = 11, kDisplay = 12, [MinVersion=1] kDoDefaultLabel = 31, kFontFamily = 13, [MinVersion=5] kHtmlId = 38, kHtmlTag = 14, [MinVersion=8] kHtmlInputName = 42, kImageAnnotation = 15, kImageDataUrl = 16, kInputType = 18, kKeyShortcuts = 19, kLanguage = 20, [MinVersion=3] kLinkTarget = 35, [MinVersion=1] kLongClickLabel = 32, kLiveRelevant = 22, kLiveStatus = 23, kMathContent = 17, kName = 21, kPlaceholder = 24, kRole = 25, kRoleDescription = 26, kTooltip = 27, kUrl = 28, kValue = 29, kVirtualContent = 30,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=596" + }, + "ax.mojom.IntAttribute": { + "definition": "enum IntAttribute { [Default]kNone = 0, kDefaultActionVerb = 1, kScrollX = 2, kScrollXMin = 3, kScrollXMax = 4, kScrollY = 5, kScrollYMin = 6, kScrollYMax = 7, kTextSelStart = 8, kTextSelEnd = 9, kAriaColumnCount = 10, kAriaCellColumnIndex = 11, kAriaCellColumnSpan = 12, kAriaRowCount = 13, kAriaCellRowIndex = 14, kAriaCellRowSpan = 15, kTableRowCount = 16, kTableColumnCount = 17, kTableHeaderId = 18, kTableRowIndex = 19, kTableRowHeaderId = 20, kTableColumnIndex = 21, kTableColumnHeaderId = 22, kTableCellColumnIndex = 23, kTableCellColumnSpan = 24, kTableCellRowIndex = 25, kTableCellRowSpan = 26, kSortDirection = 27, kHierarchicalLevel = 28, kNameFrom = 29, kDescriptionFrom = 30, kActivedescendantId = 31, kErrormessageIdDeprecated = 32, kInPageLinkTargetId = 33, kMemberOfId = 34, kNextOnLineId = 35, kPopupForId = 36, kPreviousOnLineId = 37, kRestriction = 38, kSetSize = 39, kPosInSet = 40, kColorValue = 41, kAriaCurrentState = 42, kBackgroundColor = 43, kColor = 44, kHasPopup = 45, kImageAnnotationStatus = 46, kInvalidState = 47, kCheckedState = 48, kListStyle = 49, kTextAlign = 50, kTextDirection = 51, kTextPosition = 52, kTextStyle = 53, kTextOverlineStyle = 54, kTextStrikethroughStyle = 55, kTextUnderlineStyle = 56, kPreviousFocusId = 57, kNextFocusId = 58, kDropeffectDeprecated = 59, kDOMNodeIdDeprecated = 60, [MinVersion=1] kIsPopup = 61, [MinVersion=2] kNextWindowFocusId = 62, [MinVersion=2] kPreviousWindowFocusId = 63, [MinVersion=3] kAriaNotificationInterruptDeprecated = 64, [MinVersion=3] kAriaNotificationPriorityDeprecated = 65, [MinVersion=4] kDetailsFrom = 66, [MinVersion=5] kMaxLength = 67, [MinVersion=6] kPaintOrder = 68,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=659" + }, + "ax.mojom.FloatAttribute": { + "definition": "enum FloatAttribute { [Default]kNone = 0, kValueForRange = 1, kMinValueForRange = 2, kMaxValueForRange = 3, kStepValueForRange = 4, kFontSize = 5, kFontWeight = 6, kTextIndent = 7, [MinVersion=1] kChildTreeScale = 8,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=823" + }, + "ax.mojom.BoolAttribute": { + "definition": "enum BoolAttribute { [Default]kNone = 0, kBusy = 1, kNonAtomicTextFieldRoot = 2, kContainerLiveAtomic = 3, kContainerLiveBusy = 4, kLiveAtomic = 5, kModal = 6, kUpdateLocationOnly = 7, kCanvasHasFallback = 8, kScrollable = 9, kClickable = 10, kClipsChildren = 11, kNotUserSelectableStyle = 12, kSelected = 13, kSelectedFromFocus = 14, kSupportsTextLocation = 15, kGrabbedDeprecated = 16, kIsLineBreakingObject = 17, kIsPageBreakingObject = 18, kHasAriaAttribute = 19, kTouchPassthroughDeprecated = 20, [MinVersion=1] kLongClickable = 21, [MinVersion=2] kHasHiddenOffscreenNodes = 22,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=859" + }, + "ax.mojom.IntListAttribute": { + "definition": "enum IntListAttribute { [Default]kNone = 0, kIndirectChildIds = 1, kControlsIds = 2, kDetailsIds = 3, kDescribedbyIds = 4, [MinVersion=5] kErrormessageIds = 26, kFlowtoIds = 5, kLabelledbyIds = 6, kRadioGroupIds = 7, [MinVersion=7]kActionsIds = 29, kMarkerTypes = 8, kMarkerStarts = 9, kMarkerEnds = 10, [MinVersion=3] kHighlightTypes = 20, [MinVersion=1] kCaretBounds = 16, kCharacterOffsets = 11, kLineStarts = 12, [MinVersion=2] kLineEnds = 17, [MinVersion=2] kSentenceStarts = 18, [MinVersion=2] kSentenceEnds = 19, kWordStarts = 13, kWordEnds = 14, kCustomActionIds = 15, [MinVersion=4] kTextOperationStartAnchorIds = 21, [MinVersion=4] kTextOperationStartOffsets = 22, [MinVersion=4] kTextOperationEndAnchorIds = 23, [MinVersion=4] kTextOperationEndOffsets = 24, [MinVersion=4] kTextOperations = 25, [MinVersion=6] kAriaNotificationInterruptProperties = 27, [MinVersion=6] kAriaNotificationPriorityProperties = 28,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=945" + }, + "ax.mojom.StringListAttribute": { + "definition": "enum StringListAttribute { [Default]kNone = 0, [MinVersion=1] kAriaNotificationAnnouncements = 2, [MinVersion=1] kAriaNotificationTypes = 3, kCustomActionDescriptions = 1,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1025" + }, + "ax.mojom.ListStyle": { + "definition": "enum ListStyle { kNone, kCircle, kDisc, kImage, kNumeric, kSquare, kOther, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1034" + }, + "ax.mojom.MarkerType": { + "definition": "enum MarkerType { kNone = 0, kSpelling = 1, kGrammar = 2, kTextMatch = 4, kActiveSuggestion = 16, kSuggestion = 32, kHighlight = 64,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1044" + }, + "ax.mojom.HighlightType": { + "definition": "enum HighlightType { kNone = 0, kHighlight = 1, kSpellingError = 2, kGrammarError = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1056" + }, + "ax.mojom.MoveDirection": { + "definition": "enum MoveDirection { [Default]kNone = 0, kBackward = 1, kForward = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1069" + }, + "ax.mojom.Command": { + "definition": "enum Command { [Default]kNone = 0, kClearSelection = 1, kDelete = 2, kDictate = 3, kExtendSelection = 4, kFormat = 5, kHistory = 6, kInsert = 7, kMarker = 8, kMoveSelection = 9, kSetSelection = 10, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1084" + }, + "ax.mojom.InputEventType": { + "definition": "enum InputEventType { [Default]kNone = 0, kInsertText = 1, kInsertLineBreak = 2, kInsertParagraph = 3, kInsertOrderedList = 4, kInsertUnorderedList = 5, kInsertHorizontalRule = 6, kInsertFromPaste = 7, kInsertFromDrop = 8, kInsertFromYank = 9, kInsertTranspose = 10, kInsertReplacementText = 11, kInsertCompositionText = 12, [MinVersion=1] kInsertLink = 39, kDeleteWordBackward = 13, kDeleteWordForward = 14, kDeleteSoftLineBackward = 15, kDeleteSoftLineForward = 16, kDeleteHardLineBackward = 17, kDeleteHardLineForward = 18, kDeleteContentBackward = 19, kDeleteContentForward = 20, kDeleteByCut = 21, kDeleteByDrag = 22, kHistoryUndo = 23, kHistoryRedo = 24, kFormatBold = 25, kFormatItalic = 26, kFormatUnderline = 27, kFormatStrikeThrough = 28, kFormatSuperscript = 29, kFormatSubscript = 30, kFormatJustifyCenter = 31, kFormatJustifyFull = 32, kFormatJustifyRight = 33, kFormatJustifyLeft = 34, kFormatIndent = 35, kFormatOutdent = 36, kFormatRemove = 37, kFormatSetBlockTextDirection = 38,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1106" + }, + "ax.mojom.TextBoundary": { + "definition": "enum TextBoundary { [Default]kNone = 0, kCharacter = 1, kFormatEnd = 2, [MinVersion=2] kFormatStart = 21, [MinVersion=2] kFormatStartOrEnd = 22, kLineEnd = 3, kLineStart = 4, kLineStartOrEnd = 5, kObject = 6, kPageEnd = 7, kPageStart = 8, kPageStartOrEnd = 9, kParagraphEnd = 10, kParagraphStart = 11, [MinVersion=1] kParagraphStartSkippingEmptyParagraphs = 20, kParagraphStartOrEnd = 12, kSentenceEnd = 13, kSentenceStart = 14, kSentenceStartOrEnd = 15, kWebPage = 16, kWordEnd = 17, kWordStart = 18, kWordStartOrEnd = 19,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1167" + }, + "ax.mojom.TextAlign": { + "definition": "enum TextAlign { kNone, kLeft, kRight, kCenter, kJustify,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1200" + }, + "ax.mojom.WritingDirection": { + "definition": "enum WritingDirection { kNone, kLtr, kRtl, kTtb, kBtt,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1208" + }, + "ax.mojom.TextPosition": { + "definition": "enum TextPosition { kNone, kSubscript, kSuperscript,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1216" + }, + "ax.mojom.TextStyle": { + "definition": "enum TextStyle { kNone, kBold, kItalic, kUnderline, kLineThrough, kOverline};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1224" + }, + "ax.mojom.TextDecorationStyle": { + "definition": "enum TextDecorationStyle { kNone, kDotted, kDashed, kSolid, kDouble, kWavy,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1233" + }, + "ax.mojom.AriaCurrentState": { + "definition": "enum AriaCurrentState { kNone, kFalse, kTrue, kPage, kStep, kLocation, kDate, kTime,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1242" + }, + "ax.mojom.HasPopup": { + "definition": "enum HasPopup { kFalse = 0, kTrue, kMenu, kListbox, kTree, kGrid, kDialog, kNone = kFalse};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1253" + }, + "ax.mojom.IsPopup": { + "definition": "enum IsPopup { kNone = 0, kManual, kAuto, kHint,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1264" + }, + "ax.mojom.InvalidState": { + "definition": "enum InvalidState { kNone, kFalse, kTrue,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1271" + }, + "ax.mojom.Restriction": { + "definition": "enum Restriction { kNone, kReadOnly, kDisabled,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1281" + }, + "ax.mojom.CheckedState": { + "definition": "enum CheckedState { kNone, kFalse, kTrue, kMixed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1287" + }, + "ax.mojom.SortDirection": { + "definition": "enum SortDirection { kNone, kUnsorted, kAscending, kDescending, kOther,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1294" + }, + "ax.mojom.NameFrom": { + "definition": "enum NameFrom { kNone, kAttribute, kAttributeExplicitlyEmpty, kCaption, kContents, kCssAltText, kPlaceholder, kRelatedElement, kProhibited, kProhibitedAndRedundant, kTitle, kValue, kPopoverTarget, kInterestFor,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1307" + }, + "ax.mojom.DescriptionFrom": { + "definition": "enum DescriptionFrom { kNone, kAriaDescription, kAttributeExplicitlyEmpty, kButtonLabel, kRelatedElement, kRubyAnnotation, kProhibitedNameRepair, kSummary, kSvgDescElement, kTableCaption, kTitle, kPopoverTarget, kInterestFor,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1367" + }, + "ax.mojom.DetailsFrom": { + "definition": "enum DetailsFrom { kAriaDetails, kCssAnchor, kPopoverTarget, kInterestFor, kCommandfor, kCssScrollMarkerPseudoElement,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1425" + }, + "ax.mojom.EventFrom": { + "definition": "enum EventFrom { [Default]kNone = 0, kUser = 1, kPage = 2, kAction = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1450" + }, + "ax.mojom.Gesture": { + "definition": "enum Gesture { kNone, kClick, kSwipeLeft1, kSwipeUp1, kSwipeRight1, kSwipeDown1, kSwipeLeft2, kSwipeUp2, kSwipeRight2, kSwipeDown2, kSwipeLeft3, kSwipeUp3, kSwipeRight3, kSwipeDown3, kSwipeLeft4, kSwipeUp4, kSwipeRight4, kSwipeDown4, kTap2, kTap3, kTap4, kTouchExplore,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1458" + }, + "ax.mojom.TextAffinity": { + "definition": "enum TextAffinity { [Default]kNone = 0, kDownstream = 1, kUpstream = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1485" + }, + "ax.mojom.TreeOrder": { + "definition": "enum TreeOrder { kNone, kUndefined, kBefore, kEqual, kAfter,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1492" + }, + "ax.mojom.AXTreeIDType": { + "definition": "enum AXTreeIDType { kUnknown, kToken, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1508" + }, + "ax.mojom.ImageAnnotationStatus": { + "definition": "enum ImageAnnotationStatus { kNone, kWillNotAnnotateDueToScheme, kIneligibleForAnnotation, kEligibleForAnnotation, kSilentlyEligibleForAnnotation, kAnnotationPending, kAnnotationSucceeded, kAnnotationEmpty, kAnnotationAdult, kAnnotationProcessFailed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1513" + }, + "ax.mojom.AriaNotificationInterrupt": { + "definition": "enum AriaNotificationInterrupt { kNone, kAll, kPending,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1553" + }, + "ax.mojom.AriaNotificationPriority": { + "definition": "enum AriaNotificationPriority { kNormal, kHigh,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/ax_enums.mojom;l=1559" + }, + "ax.mojom.AXActionData": { + "definition": "struct AXActionData { Action action; ax.mojom.AXTreeID target_tree_id; string source_extension_id; int32 target_node_id; int32 request_id; int32 flags; int32 anchor_node_id; int32 anchor_offset; int32 focus_node_id; int32 focus_offset; int32 custom_action_id; gfx.mojom.Rect target_rect; gfx.mojom.Point target_point; string value; Event hit_test_event_to_fire; ScrollAlignment horizontal_scroll_alignment; ScrollAlignment vertical_scroll_alignment; ScrollBehavior scroll_behavior; ax.mojom.AXTreeID child_tree_id; ax.mojom.Role target_role = ax.mojom.Role.kUnknown;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_action_data.mojom;l=13" + }, + "ax.mojom.AssistantTree": { + "definition": "struct AssistantTree { array nodes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_assistant_structure.mojom;l=16" + }, + "ax.mojom.AssistantNode": { + "definition": "struct AssistantNode { array children_indices; gfx.mojom.Rect rect; mojo_base.mojom.String16 text; float text_size; uint32 color; uint32 bgcolor; bool bold; bool italic; bool underline; bool line_through; gfx.mojom.Range? selection; string class_name; string? role;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_assistant_structure.mojom;l=22" + }, + "ax.mojom.AssistantExtra": { + "definition": "struct AssistantExtra { url.mojom.Url url; gfx.mojom.Rect bounds_pixel; mojo_base.mojom.String16 title;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_assistant_structure.mojom;l=53" + }, + "ax.mojom.AssistantStructure": { + "definition": "struct AssistantStructure { AssistantTree? assistant_tree; AssistantExtra? assistant_extra;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_assistant_structure.mojom;l=60" + }, + "ax.mojom.AXEvent": { + "definition": "struct AXEvent { Event event_type; int32 id; EventFrom event_from; Action event_from_action; array event_intents; int32 action_request_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_event.mojom;l=11" + }, + "ax.mojom.EventIntent": { + "definition": "struct EventIntent { Command command; InputEventType input_event_type; TextBoundary text_boundary; MoveDirection move_direction;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_event_intent.mojom;l=10" + }, + "ax.mojom.AXLocationChange": { + "definition": "struct AXLocationChange { int32 id; ax.mojom.AXRelativeBounds new_location;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_location_and_scroll_updates.mojom;l=10" + }, + "ax.mojom.AXScrollChange": { + "definition": "struct AXScrollChange { int32 id; int32 scroll_x; int32 scroll_y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_location_and_scroll_updates.mojom;l=18" + }, + "ax.mojom.AXLocationAndScrollUpdates": { + "definition": "struct AXLocationAndScrollUpdates { array location_changes; array scroll_changes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_location_and_scroll_updates.mojom;l=27" + }, + "ax.mojom.AXMode": { + "definition": "struct AXMode { uint32 flags; uint32 filter_flags;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_mode.mojom;l=13" + }, + "ax.mojom.AXBitsetData": { + "definition": "struct AXBitsetData { uint32 set_bits; uint32 values;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_node_data.mojom;l=11" + }, + "ax.mojom.AXNodeData": { + "definition": "struct AXNodeData { int32 id; ax.mojom.Role role; uint32 state; uint64 actions; map string_attributes; map int_attributes; map float_attributes; map? bool_attributes; map> intlist_attributes; map> stringlist_attributes; map html_attributes; array child_ids; ax.mojom.AXRelativeBounds relative_bounds; AXBitsetData? bool_attributes_data;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_node_data.mojom;l=17" + }, + "ax.mojom.AXRelativeBounds": { + "definition": "struct AXRelativeBounds { int32 offset_container_id; gfx.mojom.RectF bounds; gfx.mojom.Transform transform;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_relative_bounds.mojom;l=11" + }, + "ax.mojom.AXTreeChecks": { + "definition": "struct AXTreeChecks { uint64 node_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_tree_checks.mojom;l=8" + }, + "ax.mojom.AXTreeData": { + "definition": "struct AXTreeData { ax.mojom.AXTreeID tree_id; ax.mojom.AXTreeID parent_tree_id; ax.mojom.AXTreeID focused_tree_id; string doctype; bool loaded; float loading_progress; string mimetype; string title; string url; int32 focus_id; bool sel_is_backward; int32 sel_anchor_object_id; int32 sel_anchor_offset; ax.mojom.TextAffinity sel_anchor_affinity; int32 sel_focus_object_id; int32 sel_focus_offset; ax.mojom.TextAffinity sel_focus_affinity; int32 root_scroller_id; array? metadata; };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_tree_data.mojom;l=11" + }, + "ax.mojom.AXTreeID": { + "definition": "union AXTreeID { uint8 unknown; mojo_base.mojom.UnguessableToken token;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_tree_id.mojom;l=10" + }, + "ax.mojom.AXTreeUpdate": { + "definition": "struct AXTreeUpdate { bool has_tree_data; AXTreeData tree_data; int32 node_id_to_clear; int32 root_id; array nodes; ax.mojom.EventFrom event_from; ax.mojom.Action event_from_action; array event_intents; AXTreeChecks? tree_checks;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_tree_update.mojom;l=14" + }, + "ax.mojom.AXUpdatesAndEvents": { + "definition": "struct AXUpdatesAndEvents { ax.mojom.AXTreeID tree_id; array updates; array events;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/accessibility/mojom/ax_updates_and_events.mojom;l=13" + }, + "ui.mojom.Accelerator": { + "definition": "struct Accelerator { int32 key_code; AcceleratorKeyState key_state; int32 modifiers; mojo_base.mojom.TimeTicks time_stamp;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/accelerators/mojom/accelerator.mojom;l=18" + }, + "ui.mojom.AcceleratorKeyState": { + "definition": "enum AcceleratorKeyState { PRESSED, RELEASED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/accelerators/mojom/accelerator.mojom;l=12" + }, + "ui.mojom.Cursor": { + "definition": "struct Cursor { CursorType type; gfx.mojom.Point hotspot; skia.mojom.BitmapN32? bitmap; float image_scale_factor;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/cursor/mojom/cursor.mojom;l=12" + }, + "ui.mojom.CursorType": { + "definition": "enum CursorType { kNull = -1, kPointer, kCross, kHand, kIBeam, kWait, kHelp, kEastResize, kNorthResize, kNorthEastResize, kNorthWestResize, kSouthResize, kSouthEastResize, kSouthWestResize, kWestResize, kNorthSouthResize, kEastWestResize, kNorthEastSouthWestResize, kNorthWestSouthEastResize, kColumnResize, kRowResize, kMiddlePanning, kEastPanning, kNorthPanning, kNorthEastPanning, kNorthWestPanning, kSouthPanning, kSouthEastPanning, kSouthWestPanning, kWestPanning, kMove, kVerticalText, kCell, kContextMenu, kAlias, kProgress, kNoDrop, kCopy, kNone, kNotAllowed, kZoomIn, kZoomOut, kGrab, kGrabbing, kMiddlePanningVertical, kMiddlePanningHorizontal, kCustom, kDndNone, kDndMove, kDndCopy, kDndLink, kEastWestNoResize, kNorthSouthNoResize, kNorthEastSouthWestNoResize, kNorthWestSouthEastNoResize,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/cursor/mojom/cursor_type.mojom;l=8" + }, + "ui.mojom.DragEventSource": { + "definition": "enum DragEventSource { kMouse, kTouch};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/dragdrop/mojom/drag_drop_types.mojom;l=7" + }, + "ui.mojom.DragOperation": { + "definition": "enum DragOperation { kNone = 0, kCopy = 1, kLink = 2, kMove = 16,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/dragdrop/mojom/drag_drop_types.mojom;l=16" + }, + "ui.mojom.IMEStructTraitsTest.EchoTextInputType": { + "definition": "[Sync] EchoTextInputType(TextInputType in) => (TextInputType out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/ime_mojom_traits_test.mojom;l=10" + }, + "ui.mojom.ImeTextSpan": { + "definition": "struct ImeTextSpan { ImeTextSpanType type; uint32 start_offset; uint32 end_offset; uint32 underline_color; ImeTextSpanThickness thickness; ImeTextSpanUnderlineStyle underline_style; uint32 text_color; uint32 background_color; uint32 suggestion_highlight_color; bool remove_on_finish_composing; bool interim_char_selection; array suggestions; bool should_hide_suggestion_menu;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/ime_types.mojom;l=91" + }, + "ui.mojom.TextInputMode": { + "definition": "enum TextInputMode { kDefault, kNone, kText, kTel, kUrl, kEmail, kNumeric, kDecimal, kSearch,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/ime_types.mojom;l=7" + }, + "ui.mojom.TextInputAction": { + "definition": "enum TextInputAction { kDefault, kEnter, kDone, kGo, kNext, kPrevious, kSearch, kSend,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/ime_types.mojom;l=19" + }, + "ui.mojom.TextInputType": { + "definition": "enum TextInputType { NONE, TEXT, PASSWORD, SEARCH, EMAIL, NUMBER, TELEPHONE, URL, DATE, DATE_TIME, DATE_TIME_LOCAL, MONTH, TIME, WEEK, TEXT_AREA, CONTENT_EDITABLE, DATE_TIME_FIELD, TYPE_NULL, MAX = TYPE_NULL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/ime_types.mojom;l=31" + }, + "ui.mojom.ImeTextSpanType": { + "definition": "enum ImeTextSpanType { kComposition, kSuggestion, kMisspellingSuggestion, kAutocorrect, kGrammarSuggestion,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/ime_types.mojom;l=54" + }, + "ui.mojom.ImeTextSpanThickness": { + "definition": "enum ImeTextSpanThickness { kNone, kThin, kThick,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/ime_types.mojom;l=68" + }, + "ui.mojom.ImeTextSpanUnderlineStyle": { + "definition": "enum ImeTextSpanUnderlineStyle { kNone, kSolid, kDot, kDash, kSquiggle,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/ime_types.mojom;l=81" + }, + "ui.mojom.TextEditCommand": { + "definition": "enum TextEditCommand { kDeleteBackward, kDeleteForward, kDeleteToBeginningOfLine, kDeleteToBeginningOfParagraph, kDeleteToEndOfLine, kDeleteToEndOfParagraph, kDeleteWordBackward, kDeleteWordForward, kMoveBackward, kMoveBackwardAndModifySelection, kMoveDown, kMoveDownAndModifySelection, kMoveForward, kMoveForwardAndModifySelection, kMoveLeft, kMoveLeftAndModifySelection, kMovePageDown, kMovePageDownAndModifySelection, kMovePageUp, kMovePageUpAndModifySelection, kMoveRight, kMoveRightAndModifySelection, kMoveToBeginningOfDocument, kMoveToBeginningOfDocumentAndModifySelection, kMoveToBeginningOfLine, kMoveToBeginningOfLineAndModifySelection, kMoveToBeginningOfParagraph, kMoveToBeginningOfParagraphAndModifySelection, kMoveToEndOfDocument, kMoveToEndOfDocumentAndModifySelection, kMoveToEndOfLine, kMoveToEndOfLineAndModifySelection, kMoveToEndOfParagraph, kMoveToEndOfParagraphAndModifySelection, kMoveParagraphBackwardAndModifySelection, kMoveParagraphForwardAndModifySelection, kMoveUp, kMoveUpAndModifySelection, kMoveWordBackward, kMoveWordBackwardAndModifySelection, kMoveWordForward, kMoveWordForwardAndModifySelection, kMoveWordLeft, kMoveWordLeftAndModifySelection, kMoveWordRight, kMoveWordRightAndModifySelection, kScrollPageDown, kScrollPageUp, kScrollToBeginningOfDocument, kScrollToEndOfDocument, kUndo, kRedo, kCut, kCopy, kPaste, kSelectAll, kSelectWord, kTranspose, kYank, kInsertText, kSetMark, kUnselect, kInvalidCommand,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/text_edit_commands.mojom;l=9" + }, + "ui.mojom.ImeTextSpanInfo": { + "definition": "struct ImeTextSpanInfo { ui.mojom.ImeTextSpan span; gfx.mojom.Rect bounds;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/text_input_state.mojom;l=15" + }, + "ui.mojom.TextInputState": { + "definition": "struct TextInputState { int32 node_id = 0; ui.mojom.TextInputType type = ui.mojom.TextInputType.NONE; ui.mojom.TextInputMode mode = ui.mojom.TextInputMode.kDefault; ui.mojom.TextInputAction action = ui.mojom.TextInputAction.kDefault; uint32 flags; mojo_base.mojom.BigString16? value; gfx.mojom.Range selection; gfx.mojom.Range? composition; bool can_compose_inline = true; bool show_ime_if_needed; bool always_hide_ime; bool reply_to_request; gfx.mojom.Rect? edit_context_control_bounds; gfx.mojom.Rect? edit_context_selection_bounds; ui.mojom.VirtualKeyboardPolicy vk_policy = ui.mojom.VirtualKeyboardPolicy.AUTO; ui.mojom.VirtualKeyboardVisibilityRequest last_vk_visibility_request = ui.mojom.VirtualKeyboardVisibilityRequest.NONE; array ime_text_spans_info;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/text_input_state.mojom;l=21" + }, + "ui.mojom.VirtualKeyboardPolicy": { + "definition": "enum VirtualKeyboardPolicy { AUTO, MANUAL,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/virtual_keyboard_types.mojom;l=9" + }, + "ui.mojom.VirtualKeyboardVisibilityRequest": { + "definition": "enum VirtualKeyboardVisibilityRequest { NONE, SHOW, HIDE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/virtual_keyboard_types.mojom;l=16" + }, + "ui.mojom.VirtualKeyboardMode": { + "definition": "enum VirtualKeyboardMode { kUnset, kResizesVisual, kResizesContent, kOverlaysContent};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/ime/mojom/virtual_keyboard_types.mojom;l=24" + }, + "ui.mojom.FontAttribute": { + "definition": "struct FontAttribute { mojo_base.mojom.String16 font_name; float font_point_size; gfx.mojom.Range effective_range;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/attributed_string.mojom;l=18" + }, + "ui.mojom.AttributedString": { + "definition": "struct AttributedString { mojo_base.mojom.String16 string; array attributes;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/attributed_string.mojom;l=26" + }, + "ui.mojom.ColorMode": { + "definition": "enum ColorMode { kLight, kDark,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/color_mode.mojom;l=9" + }, + "ui.mojom.DialogButton": { + "definition": "enum DialogButton { kNone, kOk, kCancel};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/dialog_button.mojom;l=10" + }, + "ui.mojom.MenuSourceType": { + "definition": "enum MenuSourceType { [Default] kNone = 0, kMouse = 1, kKeyboard = 2, kTouch = 3, kTouchEditMenu = 4, kLongPress = 5, kLongTap = 6, kTouchHandle = 7, kStylus = 8, kAdjustSelection = 9, kAdjustSelectionReset = 10,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/menu_source_type.mojom;l=17" + }, + "ui.mojom.BrowserColorVariant": { + "definition": "enum BrowserColorVariant { kSystem, kTonalSpot, kNeutral, kVibrant, kExpressive,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/themes.mojom;l=7" + }, + "ui.mojom.ModalType": { + "definition": "enum ModalType { kNone, kWindow, kChild, kSystem};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/ui_base_types.mojom;l=9" + }, + "ui.mojom.ClickModifiers": { + "definition": "struct ClickModifiers { bool middle_button; bool alt_key; bool ctrl_key; bool meta_key; bool shift_key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/window_open_disposition.mojom;l=37" + }, + "ui.mojom.WindowOpenDisposition": { + "definition": "enum WindowOpenDisposition { UNKNOWN, CURRENT_TAB, SINGLETON_TAB, NEW_FOREGROUND_TAB, NEW_BACKGROUND_TAB, NEW_POPUP, NEW_WINDOW, SAVE_TO_DISK, OFF_THE_RECORD, IGNORE_ACTION, SWITCH_TO_TAB, NEW_PICTURE_IN_PICTURE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/window_open_disposition.mojom;l=12" + }, + "ui.mojom.WindowShowState": { + "definition": "enum WindowShowState { [Default] kDefault = 0, kNormal = 1, kMinimized = 2, kMaximized = 3, kInactive = 4, kFullscreen = 5, [MinVersion=1] kEnd = 6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/base/mojom/window_show_state.mojom;l=16" + }, + "color.mojom.RendererColorId": { + "definition": "enum RendererColorId { kColorCssSystemActiveText, kColorCssSystemBtnFace, kColorCssSystemBtnText, kColorCssSystemField, kColorCssSystemFieldText, kColorCssSystemGrayText, kColorCssSystemHighlight, kColorCssSystemHighlightText, kColorCssSystemHotlight, kColorCssSystemLinkText, kColorCssSystemMenuHilight, kColorCssSystemScrollbar, kColorCssSystemVisitedText, kColorCssSystemWindow, kColorCssSystemWindowText, kColorMenuBackground, kColorMenuItemBackgroundSelected, kColorMenuSeparator, kColorOverlayScrollbarFill, kColorOverlayScrollbarFillHovered, kColorOverlayScrollbarStroke, kColorOverlayScrollbarStrokeHovered, kColorWebNativeControlAccent, kColorWebNativeControlAccentDisabled, kColorWebNativeControlAccentHovered, kColorWebNativeControlAccentPressed, kColorWebNativeControlAutoCompleteBackground, kColorWebNativeControlBorder, kColorWebNativeControlBorderDisabled, kColorWebNativeControlBorderHovered, kColorWebNativeControlBorderPressed, kColorWebNativeControlButtonBorder, kColorWebNativeControlButtonBorderDisabled, kColorWebNativeControlButtonBorderHovered, kColorWebNativeControlButtonBorderPressed, kColorWebNativeControlButtonFill, kColorWebNativeControlButtonFillDisabled, kColorWebNativeControlButtonFillHovered, kColorWebNativeControlButtonFillPressed, kColorWebNativeControlCheckboxBackground, kColorWebNativeControlCheckboxBackgroundDisabled, kColorWebNativeControlFill, kColorWebNativeControlFillDisabled, kColorWebNativeControlFillHovered, kColorWebNativeControlFillPressed, kColorWebNativeControlLightenLayer, kColorWebNativeControlProgressValue, kColorWebNativeControlScrollbarArrowBackgroundDisabled, kColorWebNativeControlScrollbarArrowBackgroundHovered, kColorWebNativeControlScrollbarArrowBackgroundPressed, kColorWebNativeControlScrollbarArrowForeground, kColorWebNativeControlScrollbarArrowForegroundDisabled, kColorWebNativeControlScrollbarArrowForegroundPressed, kColorWebNativeControlScrollbarCorner, kColorWebNativeControlScrollbarThumb, kColorWebNativeControlScrollbarThumbHovered, kColorWebNativeControlScrollbarThumbOverlayMinimalMode, kColorWebNativeControlScrollbarThumbPressed, kColorWebNativeControlScrollbarTrack, kColorWebNativeControlSlider, kColorWebNativeControlSliderBorder, kColorWebNativeControlSliderBorderHovered, kColorWebNativeControlSliderBorderPressed, kColorWebNativeControlSliderDisabled, kColorWebNativeControlSliderHovered, kColorWebNativeControlSliderPressed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/color/color_id.mojom;l=11" + }, + "color.mojom.SchemeVariant": { + "definition": "enum SchemeVariant { [Default] kTonalSpot = 0, kNeutral = 1, kVibrant = 2, kExpressive = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/color/scheme_variant.mojom;l=8" + }, + "display.mojom.Display": { + "definition": "struct Display { int64 id; gfx.mojom.Rect bounds; gfx.mojom.Size size_in_pixels; gfx.mojom.Point native_origin; gfx.mojom.Rect work_area; float device_scale_factor; Rotation rotation; TouchSupport touch_support; AccelerometerSupport accelerometer_support; gfx.mojom.Size maximum_cursor_size; gfx.mojom.DisplayColorSpaces color_spaces; int32 color_depth; int32 depth_per_component; bool is_monochrome; float display_frequency; string label;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display.mojom;l=33" + }, + "display.mojom.Rotation": { + "definition": "enum Rotation { VALUE_0, VALUE_90, VALUE_180, VALUE_270,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display.mojom;l=11" + }, + "display.mojom.TouchSupport": { + "definition": "enum TouchSupport { UNKNOWN, AVAILABLE, UNAVAILABLE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display.mojom;l=19" + }, + "display.mojom.AccelerometerSupport": { + "definition": "enum AccelerometerSupport { UNKNOWN, AVAILABLE, UNAVAILABLE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display.mojom;l=26" + }, + "display.mojom.GammaCurve": { + "definition": "struct GammaCurve { array lut;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_color_management.mojom;l=12" + }, + "display.mojom.ColorCalibration": { + "definition": "struct ColorCalibration { display.mojom.GammaCurve srgb_to_linear; skia.mojom.SkcmsMatrix3x3 srgb_to_device_matrix; display.mojom.GammaCurve linear_to_device;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_color_management.mojom;l=21" + }, + "display.mojom.ColorTemperatureAdjustment": { + "definition": "struct ColorTemperatureAdjustment { skia.mojom.SkcmsMatrix3x3 srgb_matrix;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_color_management.mojom;l=36" + }, + "display.mojom.GammaAdjustment": { + "definition": "struct GammaAdjustment { display.mojom.GammaCurve curve;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_color_management.mojom;l=43" + }, + "display.mojom.DisplayConfigurationParams": { + "definition": "struct DisplayConfigurationParams { int64 id; gfx.mojom.Point origin; display.mojom.DisplayMode? mode; bool enable_vrr;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_configuration_params.mojom;l=11" + }, + "display.mojom.ModesetFlags": { + "definition": "struct ModesetFlags { uint64 bitmask;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_constants.mojom;l=58" + }, + "display.mojom.DisplayConnectionType": { + "definition": "enum DisplayConnectionType { DISPLAY_CONNECTION_TYPE_NONE = 0, DISPLAY_CONNECTION_TYPE_UNKNOWN = 1, DISPLAY_CONNECTION_TYPE_INTERNAL = 2, DISPLAY_CONNECTION_TYPE_VGA = 4, DISPLAY_CONNECTION_TYPE_HDMI = 8, DISPLAY_CONNECTION_TYPE_DVI = 16, DISPLAY_CONNECTION_TYPE_DISPLAYPORT = 32, DISPLAY_CONNECTION_TYPE_NETWORK = 64,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_constants.mojom;l=8" + }, + "display.mojom.HDCPState": { + "definition": "enum HDCPState { HDCP_STATE_UNDESIRED, HDCP_STATE_DESIRED, HDCP_STATE_ENABLED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_constants.mojom;l=20" + }, + "display.mojom.ContentProtectionMethod": { + "definition": "enum ContentProtectionMethod { CONTENT_PROTECTION_METHOD_NONE = 0, CONTENT_PROTECTION_METHOD_HDCP_TYPE_0 = 1, CONTENT_PROTECTION_METHOD_HDCP_TYPE_1 = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_constants.mojom;l=27" + }, + "display.mojom.PanelOrientation": { + "definition": "enum PanelOrientation { NORMAL = 0, BOTTOM_UP = 1, LEFT_UP = 2, RIGHT_UP = 3};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_constants.mojom;l=34" + }, + "display.mojom.PrivacyScreenState": { + "definition": "enum PrivacyScreenState { DISABLED = 0, ENABLED = 1, DISABLED_LOCKED = 2, ENABLED_LOCKED = 3, NOT_SUPPORTED = 4};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_constants.mojom;l=42" + }, + "display.mojom.VariableRefreshRateState": { + "definition": "enum VariableRefreshRateState { kVrrDisabled = 0, kVrrEnabled = 1, kVrrNotCapable = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_constants.mojom;l=51" + }, + "display.mojom.DisplayPlacement": { + "definition": "struct DisplayPlacement { int64 display_id; int64 parent_display_id; Position position; int32 offset; OffsetReference offset_reference;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_layout.mojom;l=22" + }, + "display.mojom.DisplayLayout": { + "definition": "struct DisplayLayout { bool default_unified; int64 primary_display_id; array placement_list;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_layout.mojom;l=31" + }, + "display.mojom.Position": { + "definition": "enum Position { TOP, RIGHT, BOTTOM, LEFT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_layout.mojom;l=8" + }, + "display.mojom.OffsetReference": { + "definition": "enum OffsetReference { TOP_LEFT, BOTTOM_RIGHT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_layout.mojom;l=16" + }, + "display.mojom.DisplayMode": { + "definition": "struct DisplayMode { gfx.mojom.Size size; bool is_interlaced; float refresh_rate; float? vsync_rate_min;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_mode.mojom;l=10" + }, + "display.mojom.DisplaySnapshotColorInfo": { + "definition": "struct DisplaySnapshotColorInfo { gfx.mojom.ColorSpace color_space; skia.mojom.SkColorSpacePrimaries edid_primaries; float edid_gamma; gfx.mojom.HDRStaticMetadata? hdr_static_metadata; bool supports_color_temperature_adjustment; uint32 bits_per_channel;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_snapshot.mojom;l=16" + }, + "display.mojom.DisplaySnapshot": { + "definition": "struct DisplaySnapshot { int64 display_id; int64 port_display_id; int64 edid_display_id; uint16 connector_index; gfx.mojom.Point origin; gfx.mojom.Size physical_size; display.mojom.DisplayConnectionType type; uint64 base_connector_id; array path_topology; bool is_aspect_preserving_scaling; bool has_overscan; display.mojom.PrivacyScreenState privacy_screen_state; bool has_content_protection_key; display.mojom.DisplaySnapshotColorInfo color_info; string display_name; mojo_base.mojom.FilePath sys_path; array modes; display.mojom.PanelOrientation panel_orientation; array edid; uint64 current_mode_index; bool has_current_mode; uint64 native_mode_index; bool has_native_mode; int64 product_code; int32 year_of_manufacture; gfx.mojom.Size maximum_cursor_size; VariableRefreshRateState variable_refresh_rate_state; [EnableIf=is_chromeos] map> drm_formats_and_modifiers;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/display_snapshot.mojom;l=26" + }, + "display.mojom.GammaRampRGBEntry": { + "definition": "struct GammaRampRGBEntry { uint16 r; uint16 g; uint16 b;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/gamma_ramp_rgb_entry.mojom;l=8" + }, + "display.mojom.ScreenInfo": { + "definition": "struct ScreenInfo { float device_scale_factor = 1; gfx.mojom.DisplayColorSpaces display_color_spaces; uint32 depth; uint32 depth_per_component; bool is_monochrome = false; gfx.mojom.Rect rect; gfx.mojom.Rect available_rect; ScreenOrientation orientation_type = ScreenOrientation.kUndefined; uint16 orientation_angle; bool is_extended; bool is_primary = false; bool is_internal = false; string label; int64 display_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/screen_info.mojom;l=16" + }, + "display.mojom.ScreenInfos": { + "definition": "struct ScreenInfos { array screen_infos; int64 current_display_id; gfx.mojom.Size system_cursor_size;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/screen_infos.mojom;l=15" + }, + "display.mojom.ScreenOrientation": { + "definition": "enum ScreenOrientation { kUndefined, kPortraitPrimary, kPortraitSecondary, kLandscapePrimary, kLandscapeSecondary,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/display/mojom/screen_orientation.mojom;l=10" + }, + "ui.mojom.ExtendedFkeysModifier": { + "definition": "enum ExtendedFkeysModifier { kDisabled = 0, kAlt = 1, kShift = 2, kCtrlShift = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/ash/mojom/extended_fkeys_modifier.mojom;l=11" + }, + "ui.mojom.MetaKey": { + "definition": "enum MetaKey { kSearch, kLauncher, kLauncherRefresh, kExternalMeta, kCommand};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/ash/mojom/meta_key.mojom;l=10" + }, + "ui.mojom.ModifierKey": { + "definition": "enum ModifierKey { kMeta = 0, kControl = 1, kAlt = 2, kVoid = 3, kCapsLock = 4, kEscape = 5, kBackspace = 6, kAssistant = 7, kIsoLevel5ShiftMod3 = 8, kFunction = 9, kQuickInsert = 10,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/ash/mojom/modifier_key.mojom;l=9" + }, + "ui.mojom.SimulateRightClickModifier": { + "definition": "enum SimulateRightClickModifier { kNone = 0, kAlt = 1, kSearch = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/ash/mojom/simulate_right_click_modifier.mojom;l=10" + }, + "ui.mojom.SixPackShortcutModifier": { + "definition": "enum SixPackShortcutModifier { kNone = 0, kAlt = 1, kSearch = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/ash/mojom/six_pack_shortcut_modifier.mojom;l=11" + }, + "ui.mojom.KeyData": { + "definition": "struct KeyData { int32 key_code; uint32 dom_code; int32 dom_key; bool is_char;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=14" + }, + "ui.mojom.LocationData": { + "definition": "struct LocationData { gfx.mojom.PointF relative_location; gfx.mojom.PointF root_location;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=28" + }, + "ui.mojom.GesturePinchData": { + "definition": "struct GesturePinchData { float scale;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=36" + }, + "ui.mojom.GestureSwipeData": { + "definition": "struct GestureSwipeData { bool left; bool right; bool up; bool down;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=41" + }, + "ui.mojom.GestureData": { + "definition": "struct GestureData { LocationData location; GestureDeviceType device_type; GestureDataDetails? details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=55" + }, + "ui.mojom.ScrollData": { + "definition": "struct ScrollData { LocationData location; float x_offset; float y_offset; float x_offset_ordinal; float y_offset_ordinal; int32 finger_count; EventMomentumPhase momentum_phase; ScrollEventPhase scroll_event_phase;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=65" + }, + "ui.mojom.PointerDetails": { + "definition": "struct PointerDetails { EventPointerType pointer_type; float radius_x; float radius_y; float force; float tilt_x; float tilt_y; float tangential_pressure; float twist; int32 id; int32 offset_x; int32 offset_y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=86" + }, + "ui.mojom.MouseData": { + "definition": "struct MouseData { int32 changed_button_flags; LocationData location; PointerDetails pointer_details; gfx.mojom.Vector2d wheel_offset; gfx.mojom.Vector2d tick_120ths;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=100" + }, + "ui.mojom.TouchData": { + "definition": "struct TouchData { bool may_cause_scrolling; bool hovering; LocationData location; PointerDetails pointer_details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=110" + }, + "ui.mojom.Event": { + "definition": "struct Event { EventType action; int32 flags; mojo_base.mojom.TimeTicks time_stamp; LatencyInfo latency; KeyData? key_data; GestureData? gesture_data; ScrollData? scroll_data; TouchData? touch_data; MouseData? mouse_data; map>? properties;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=117" + }, + "ui.mojom.GestureDataDetails": { + "definition": "union GestureDataDetails { GesturePinchData pinch; GestureSwipeData swipe;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event.mojom;l=48" + }, + "ui.mojom.AcceleratorPhase": { + "definition": "enum AcceleratorPhase { PRE_TARGET, POST_TARGET,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event_constants.mojom;l=10" + }, + "ui.mojom.EventType": { + "definition": "enum EventType { UNKNOWN, KEY_PRESSED, KEY_RELEASED, GESTURE_TAP, GESTURE_SWIPE, GESTURE_PINCH_BEGIN, GESTURE_PINCH_END, GESTURE_PINCH_UPDATE, SCROLL, SCROLL_FLING_START, SCROLL_FLING_CANCEL, CANCEL_MODE, MOUSE_PRESSED_EVENT, MOUSE_DRAGGED_EVENT, MOUSE_RELEASED_EVENT, MOUSE_MOVED_EVENT, MOUSE_ENTERED_EVENT, MOUSE_EXITED_EVENT, MOUSE_WHEEL_EVENT, MOUSE_CAPTURE_CHANGED_EVENT, TOUCH_RELEASED, TOUCH_PRESSED, TOUCH_MOVED, TOUCH_CANCELLED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event_constants.mojom;l=15" + }, + "ui.mojom.EventPointerType": { + "definition": "enum EventPointerType;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event_constants.mojom;l=74" + }, + "ui.mojom.ScrollEventPhase": { + "definition": "enum ScrollEventPhase { kNone, kBegan, kUpdate, kEnd,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event_constants.mojom;l=78" + }, + "ui.mojom.EventMomentumPhase": { + "definition": "enum EventMomentumPhase { NONE, BEGAN, MAY_BEGIN, INERTIAL_UPDATE, END, BLOCKED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event_constants.mojom;l=87" + }, + "ui.mojom.GestureDeviceType": { + "definition": "enum GestureDeviceType { DEVICE_UNKNOWN, DEVICE_TOUCHPAD, DEVICE_TOUCHSCREEN,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event_constants.mojom;l=98" + }, + "ui.mojom.EventLatencyMetadata": { + "definition": "struct EventLatencyMetadata { mojo_base.mojom.TimeTicks arrived_in_browser_main_timestamp; mojo_base.mojom.TimeTicks scrolls_blocking_touch_dispatched_to_renderer; mojo_base.mojom.TimeTicks dispatched_to_renderer;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/event_latency_metadata.mojom;l=12" + }, + "ui.mojom.KeyboardCode": { + "definition": "enum KeyboardCode { BACK = 0x08, TAB = 0x09, CLEAR = 0x0C, RETURN = 0x0D, SHIFT = 0x10, CONTROL = 0x11, MENU = 0x12, PAUSE = 0x13, CAPITAL = 0x14, KANA = 0x15, HANGUL = 0x15, JUNJA = 0x17, FINAL = 0x18, HANJA = 0x19, KANJI = 0x19, ESCAPE = 0x1B, CONVERT = 0x1C, NONCONVERT = 0x1D, ACCEPT = 0x1E, MODECHANGE = 0x1F, SPACE = 0x20, PRIOR = 0x21, NEXT = 0x22, END = 0x23, HOME = 0x24, LEFT = 0x25, UP = 0x26, RIGHT = 0x27, DOWN = 0x28, SELECT = 0x29, PRINT = 0x2A, EXECUTE = 0x2B, SNAPSHOT = 0x2C, INSERT = 0x2D, DELETE_KEY = 0x2E, HELP = 0x2F, NUM_0 = 0x30, NUM_1 = 0x31, NUM_2 = 0x32, NUM_3 = 0x33, NUM_4 = 0x34, NUM_5 = 0x35, NUM_6 = 0x36, NUM_7 = 0x37, NUM_8 = 0x38, NUM_9 = 0x39, A = 0x41, B = 0x42, C = 0x43, D = 0x44, E = 0x45, F = 0x46, G = 0x47, H = 0x48, I = 0x49, J = 0x4A, K = 0x4B, L = 0x4C, M = 0x4D, N = 0x4E, O = 0x4F, P = 0x50, Q = 0x51, R = 0x52, S = 0x53, T = 0x54, U = 0x55, V = 0x56, W = 0x57, X = 0x58, Y = 0x59, Z = 0x5A, LWIN = 0x5B, COMMAND = 0x5B, RWIN = 0x5C, APPS = 0x5D, SLEEP = 0x5F, NUMPAD0 = 0x60, NUMPAD1 = 0x61, NUMPAD2 = 0x62, NUMPAD3 = 0x63, NUMPAD4 = 0x64, NUMPAD5 = 0x65, NUMPAD6 = 0x66, NUMPAD7 = 0x67, NUMPAD8 = 0x68, NUMPAD9 = 0x69, MULTIPLY = 0x6A, ADD = 0x6B, SEPARATOR = 0x6C, SUBTRACT = 0x6D, DECIMAL = 0x6E, DIVIDE = 0x6F, F1 = 0x70, F2 = 0x71, F3 = 0x72, F4 = 0x73, F5 = 0x74, F6 = 0x75, F7 = 0x76, F8 = 0x77, F9 = 0x78, F10 = 0x79, F11 = 0x7A, F12 = 0x7B, F13 = 0x7C, F14 = 0x7D, F15 = 0x7E, F16 = 0x7F, F17 = 0x80, F18 = 0x81, F19 = 0x82, F20 = 0x83, F21 = 0x84, F22 = 0x85, F23 = 0x86, F24 = 0x87, NUMLOCK = 0x90, SCROLL = 0x91, LSHIFT = 0xA0, RSHIFT = 0xA1, LCONTROL = 0xA2, RCONTROL = 0xA3, LMENU = 0xA4, RMENU = 0xA5, BROWSER_BACK = 0xA6, BROWSER_FORWARD = 0xA7, BROWSER_REFRESH = 0xA8, BROWSER_STOP = 0xA9, BROWSER_SEARCH = 0xAA, BROWSER_FAVORITES = 0xAB, BROWSER_HOME = 0xAC, VOLUME_MUTE = 0xAD, VOLUME_DOWN = 0xAE, VOLUME_UP = 0xAF, MEDIA_NEXT_TRACK = 0xB0, MEDIA_PREV_TRACK = 0xB1, MEDIA_STOP = 0xB2, MEDIA_PLAY_PAUSE = 0xB3, MEDIA_LAUNCH_MAIL = 0xB4, MEDIA_LAUNCH_MEDIA_SELECT = 0xB5, MEDIA_LAUNCH_APP1 = 0xB6, MEDIA_LAUNCH_APP2 = 0xB7, OEM_1 = 0xBA, OEM_PLUS = 0xBB, OEM_COMMA = 0xBC, OEM_MINUS = 0xBD, OEM_PERIOD = 0xBE, OEM_2 = 0xBF, OEM_3 = 0xC0, OEM_4 = 0xDB, OEM_5 = 0xDC, OEM_6 = 0xDD, OEM_7 = 0xDE, OEM_8 = 0xDF, OEM_102 = 0xE2, PROCESSKEY = 0xE5, PACKET = 0xE7, DBE_SBCSCHAR = 0xF3, DBE_DBCSCHAR = 0xF4, ATTN = 0xF6, CRSEL = 0xF7, EXSEL = 0xF8, EREOF = 0xF9, PLAY = 0xFA, ZOOM = 0xFB, NONAME = 0xFC, PA1 = 0xFD, OEM_CLEAR = 0xFE, UNKNOWN = 0, WLAN = 0x97, POWER = 0x98, ASSISTANT = 0x99, BRIGHTNESS_DOWN = 0xD8, BRIGHTNESS_UP = 0xD9, KBD_BRIGHTNESS_DOWN = 0xDA, KBD_BRIGHTNESS_UP = 0xE8, ALTGR = 0xE1, COMPOSE = 0xE6,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/keyboard_codes.mojom;l=12" + }, + "ui.mojom.ScrollGranularity": { + "definition": "enum ScrollGranularity;", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/events/mojom/scroll_granularity.mojom;l=8" + }, + "gfx.mojom.Point": { + "definition": "struct Point { int32 x; int32 y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=8" + }, + "gfx.mojom.PointF": { + "definition": "struct PointF { float x; float y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=14" + }, + "gfx.mojom.Point3F": { + "definition": "struct Point3F { float x; float y; float z;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=19" + }, + "gfx.mojom.Size": { + "definition": "struct Size { int32 width; int32 height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=26" + }, + "gfx.mojom.SizeF": { + "definition": "struct SizeF { float width; float height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=31" + }, + "gfx.mojom.Rect": { + "definition": "struct Rect { int32 x; int32 y; int32 width; int32 height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=37" + }, + "gfx.mojom.RectF": { + "definition": "struct RectF { float x; float y; float width; float height;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=45" + }, + "gfx.mojom.Insets": { + "definition": "struct Insets { int32 top; int32 left; int32 bottom; int32 right;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=53" + }, + "gfx.mojom.InsetsF": { + "definition": "struct InsetsF { float top; float left; float bottom; float right;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=60" + }, + "gfx.mojom.Vector2d": { + "definition": "struct Vector2d { int32 x; int32 y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=67" + }, + "gfx.mojom.Vector2dF": { + "definition": "struct Vector2dF { float x; float y;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=72" + }, + "gfx.mojom.Vector3dF": { + "definition": "struct Vector3dF { float x; float y; float z;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=77" + }, + "gfx.mojom.Quaternion": { + "definition": "struct Quaternion { double x; double y; double z; double w;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=83" + }, + "gfx.mojom.QuadF": { + "definition": "struct QuadF { PointF p1; PointF p2; PointF p3; PointF p4;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry.mojom;l=90" + }, + "gfx.mojom.GeometryTraitsTestService.EchoPoint": { + "definition": "[Sync] EchoPoint(Point p) => (Point pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=12" + }, + "gfx.mojom.GeometryTraitsTestService.EchoPointF": { + "definition": "[Sync] EchoPointF(PointF p) => (PointF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=14" + }, + "gfx.mojom.GeometryTraitsTestService.EchoPoint3F": { + "definition": "[Sync] EchoPoint3F(Point3F p) => (Point3F pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=17" + }, + "gfx.mojom.GeometryTraitsTestService.EchoSize": { + "definition": "[Sync] EchoSize(Size s) => (Size pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=20" + }, + "gfx.mojom.GeometryTraitsTestService.EchoSizeF": { + "definition": "[Sync] EchoSizeF(SizeF s) => (SizeF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=23" + }, + "gfx.mojom.GeometryTraitsTestService.EchoRect": { + "definition": "[Sync] EchoRect(Rect r) => (Rect pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=26" + }, + "gfx.mojom.GeometryTraitsTestService.EchoRectF": { + "definition": "[Sync] EchoRectF(RectF r) => (RectF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=29" + }, + "gfx.mojom.GeometryTraitsTestService.EchoInsets": { + "definition": "[Sync] EchoInsets(Insets i) => (Insets pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=32" + }, + "gfx.mojom.GeometryTraitsTestService.EchoInsetsF": { + "definition": "[Sync] EchoInsetsF(InsetsF i) => (InsetsF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=35" + }, + "gfx.mojom.GeometryTraitsTestService.EchoVector2d": { + "definition": "[Sync] EchoVector2d(Vector2d v) => (Vector2d pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=38" + }, + "gfx.mojom.GeometryTraitsTestService.EchoVector2dF": { + "definition": "[Sync] EchoVector2dF(Vector2dF v) => (Vector2dF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=41" + }, + "gfx.mojom.GeometryTraitsTestService.EchoVector3dF": { + "definition": "[Sync] EchoVector3dF(Vector3dF v) => (Vector3dF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=44" + }, + "gfx.mojom.GeometryTraitsTestService.EchoQuaternion": { + "definition": "[Sync] EchoQuaternion(Quaternion q) => (Quaternion pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=47" + }, + "gfx.mojom.GeometryTraitsTestService.EchoQuadF": { + "definition": "[Sync] EchoQuadF(QuadF q) => (QuadF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/geometry/mojom/geometry_traits_test_service.mojom;l=50" + }, + "gfx.mojom.ImageSkiaRep": { + "definition": "struct ImageSkiaRep { skia.mojom.BitmapWithArbitraryBpp bitmap; float scale;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/image/mojom/image.mojom;l=10" + }, + "gfx.mojom.ImageSkia": { + "definition": "struct ImageSkia { array image_reps;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/image/mojom/image.mojom;l=25" + }, + "gfx.mojom.ImageTraitsTestService.EchoImageSkiaRep": { + "definition": "[Sync] EchoImageSkiaRep(ImageSkiaRep? in) => (ImageSkiaRep? out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/image/mojom/image_traits_test_service.mojom;l=11" + }, + "gfx.mojom.ImageTraitsTestService.EchoImageSkia": { + "definition": "[Sync] EchoImageSkia(ImageSkia? in) => (ImageSkia? out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/image/mojom/image_traits_test_service.mojom;l=13" + }, + "gfx.mojom.AcceleratedWidget": { + "definition": "struct AcceleratedWidget { uint64 widget;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/accelerated_widget.mojom;l=8" + }, + "gfx.mojom.BufferUsageAndFormat": { + "definition": "struct BufferUsageAndFormat { BufferUsage usage; BufferFormat format;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/buffer_types.mojom;l=46" + }, + "gfx.mojom.GpuMemoryBufferId": { + "definition": "struct GpuMemoryBufferId { int32 id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/buffer_types.mojom;l=61" + }, + "gfx.mojom.GpuMemoryBufferHandle": { + "definition": "struct GpuMemoryBufferHandle { uint32 offset; uint32 stride; GpuMemoryBufferPlatformHandle? platform_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/buffer_types.mojom;l=67" + }, + "gfx.mojom.BufferFormat": { + "definition": "enum BufferFormat { R_8, R_16, RG_88, RG_1616, BGR_565, RGBA_4444, RGBX_8888, RGBA_8888, BGRX_8888, BGRA_1010102, RGBA_1010102, BGRA_8888, RGBA_F16, YVU_420, YUV_420_BIPLANAR, YUVA_420_TRIPLANAR, P010,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/buffer_types.mojom;l=10" + }, + "gfx.mojom.BufferUsage": { + "definition": "enum BufferUsage { GPU_READ, SCANOUT, SCANOUT_CAMERA_READ_WRITE, CAMERA_AND_CPU_READ_WRITE, SCANOUT_CPU_READ_WRITE, SCANOUT_VDA_WRITE, PROTECTED_SCANOUT, PROTECTED_SCANOUT_VDA_WRITE, GPU_READ_CPU_READ_WRITE, SCANOUT_VEA_CPU_READ, VEA_READ_CAMERA_AND_CPU_READ_WRITE, SCANOUT_FRONT_RENDERING,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/buffer_types.mojom;l=31" + }, + "gfx.mojom.BufferPlane": { + "definition": "enum BufferPlane { DEFAULT, Y, UV, U, V, A,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/buffer_types.mojom;l=51" + }, + "gfx.mojom.CALayerParams": { + "definition": "struct CALayerParams { bool is_empty; CALayerContent content; gfx.mojom.Size pixel_size; float scale_factor;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/ca_layer_params.mojom;l=15" + }, + "gfx.mojom.CALayerContent": { + "definition": "union CALayerContent { uint32 ca_context_id; handle io_surface_mach_port;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/ca_layer_params.mojom;l=9" + }, + "gfx.mojom.CALayerResult": { + "definition": "enum CALayerResult { kCALayerSuccess = 0, kCALayerFailedUnknown = 1, kCALayerFailedTextureNotCandidate = 5, kCALayerFailedTileNotCandidate = 7, kCALayerFailedQuadBlendMode = 8, kCALayerFailedQuadClipping = 10, kCALayerFailedDebugBoarder = 11, kCALayerFailedPictureContent = 12, kCALayerFailedSurfaceContent = 14, kCALayerFailedDifferentClipSettings = 16, kCALayerFailedRenderPassBackdropFilters = 19, kCALayerFailedRenderPassPassMask = 20, kCALayerFailedRenderPassFilterOperation = 21, kCALayerFailedRenderPassSortingContextId = 22, kCALayerFailedTooManyRenderPassDrawQuads = 23, kCALayerFailedQuadRoundedCornerNotUniform = 26, kCALayerFailedTooManyQuads = 27, kCALayerFailedCopyRequests = 31, kCALayerFailedOverlayDisabled = 32, kCALayerFailedVideoCaptureEnabled = 33,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/ca_layer_result.mojom;l=8" + }, + "gfx.mojom.ColorSpace": { + "definition": "struct ColorSpace { ColorSpacePrimaryID primaries; ColorSpaceTransferID transfer; ColorSpaceMatrixID matrix; ColorSpaceRangeID range; array custom_primary_matrix; array transfer_params;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/color_space.mojom;l=79" + }, + "gfx.mojom.ColorSpacePrimaryID": { + "definition": "enum ColorSpacePrimaryID { INVALID, BT709, BT470M, BT470BG, SMPTE170M, SMPTE240M, FILM, BT2020, SMPTEST428_1, SMPTEST431_2, P3, XYZ_D50, ADOBE_RGB, APPLE_GENERIC_RGB, WIDE_GAMUT_COLOR_SPIN, CUSTOM, EBU_3213_E};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/color_space.mojom;l=10" + }, + "gfx.mojom.ColorSpaceTransferID": { + "definition": "enum ColorSpaceTransferID { INVALID, BT709, BT709_APPLE, GAMMA18, GAMMA22, GAMMA24, GAMMA28, SMPTE170M, SMPTE240M, LINEAR, LOG, LOG_SQRT, IEC61966_2_4, BT1361_ECG, SRGB, BT2020_10, BT2020_12, PQ, SMPTEST428_1, HLG, SRGB_HDR, LINEAR_HDR, CUSTOM, CUSTOM_HDR, SCRGB_LINEAR_80_NITS};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/color_space.mojom;l=30" + }, + "gfx.mojom.ColorSpaceMatrixID": { + "definition": "enum ColorSpaceMatrixID { INVALID, RGB, BT709, FCC, BT470BG, SMPTE170M, SMPTE240M, YCOCG, BT2020_NCL, YDZDX, GBR};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/color_space.mojom;l=58" + }, + "gfx.mojom.ColorSpaceRangeID": { + "definition": "enum ColorSpaceRangeID { INVALID, LIMITED, FULL, DERIVED};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/color_space.mojom;l=72" + }, + "gfx.mojom.DelegatedInkMetadata": { + "definition": "struct DelegatedInkMetadata { PointF point; double diameter; skia.mojom.SkColor color; mojo_base.mojom.TimeTicks timestamp; RectF presentation_area; mojo_base.mojom.TimeTicks frame_time; bool is_hovering;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/delegated_ink_metadata.mojom;l=12" + }, + "gfx.mojom.DelegatedInkPoint": { + "definition": "struct DelegatedInkPoint { PointF point; mojo_base.mojom.TimeTicks timestamp; int32 pointer_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/delegated_ink_point.mojom;l=11" + }, + "gfx.mojom.DelegatedInkPointRenderer.StoreDelegatedInkPoint": { + "definition": "StoreDelegatedInkPoint(DelegatedInkPoint point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/delegated_ink_point_renderer.mojom;l=20" + }, + "gfx.mojom.DelegatedInkPointRenderer.ResetPrediction": { + "definition": "ResetPrediction();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/delegated_ink_point_renderer.mojom;l=25" + }, + "gfx.mojom.DisplayColorSpaces": { + "definition": "struct DisplayColorSpaces { array color_spaces; array buffer_formats; skia.mojom.SkColorSpacePrimaries primaries; float sdr_max_luminance_nits; float hdr_max_luminance_relative;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/display_color_spaces.mojom;l=20" + }, + "gfx.mojom.ContentColorUsage": { + "definition": "enum ContentColorUsage { kSRGB, kWideColorGamut, kHDR,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/display_color_spaces.mojom;l=13" + }, + "gfx.mojom.DXGIOutputDesc": { + "definition": "struct DXGIOutputDesc { mojo_base.mojom.WString device_name; bool hdr_enabled; skia.mojom.SkColorSpacePrimaries primaries; float min_luminance; float max_luminance; float max_full_frame_luminance;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/dxgi_info.mojom;l=11" + }, + "gfx.mojom.DXGIInfo": { + "definition": "struct DXGIInfo { array output_descs;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/dxgi_info.mojom;l=37" + }, + "gfx.mojom.Hinting": { + "definition": "enum Hinting { kNone, kSlight, kMedium, kFull,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/font_render_params.mojom;l=8" + }, + "gfx.mojom.SubpixelRendering": { + "definition": "enum SubpixelRendering { kNone, kRGB, kBGR, kVRGB, kVBGR,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/font_render_params.mojom;l=16" + }, + "gfx.mojom.FrameData": { + "definition": "struct FrameData { int64 seq; int64 swap_trace_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/frame_data.mojom;l=9" + }, + "gfx.mojom.ANGLEFeature": { + "definition": "struct ANGLEFeature { string name; string category; string status;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/gpu_extra_info.mojom;l=11" + }, + "gfx.mojom.GpuExtraInfo": { + "definition": "struct GpuExtraInfo { array angle_features; [EnableIf=enable_x11_params] array gpu_memory_buffer_support_x11;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/gpu_extra_info.mojom;l=18" + }, + "gfx.mojom.GpuFenceHandle": { + "definition": "struct GpuFenceHandle { [EnableIf=is_posix] handle native_fd; [EnableIf=is_win] handle native_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/gpu_fence_handle.mojom;l=8" + }, + "gfx.mojom.HdrMetadataCta861_3": { + "definition": "struct HdrMetadataCta861_3 { uint32 max_content_light_level; uint32 max_frame_average_light_level;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/hdr_metadata.mojom;l=11" + }, + "gfx.mojom.HdrMetadataSmpteSt2086": { + "definition": "struct HdrMetadataSmpteSt2086 { skia.mojom.SkColorSpacePrimaries primaries; float luminance_max; float luminance_min;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/hdr_metadata.mojom;l=18" + }, + "gfx.mojom.HdrMetadataNdwl": { + "definition": "struct HdrMetadataNdwl { float nits;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/hdr_metadata.mojom;l=26" + }, + "gfx.mojom.HdrMetadataExtendedRange": { + "definition": "struct HdrMetadataExtendedRange { float current_headroom; float desired_headroom;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/hdr_metadata.mojom;l=32" + }, + "gfx.mojom.HdrMetadataAgtm": { + "definition": "struct HdrMetadataAgtm { array payload;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/hdr_metadata.mojom;l=39" + }, + "gfx.mojom.HDRMetadata": { + "definition": "struct HDRMetadata { HdrMetadataSmpteSt2086? smpte_st_2086; HdrMetadataCta861_3? cta_861_3; HdrMetadataNdwl? ndwl; HdrMetadataExtendedRange? extended_range; HdrMetadataAgtm? agtm;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/hdr_metadata.mojom;l=44" + }, + "gfx.mojom.HDRStaticMetadata": { + "definition": "struct HDRStaticMetadata { float max; float max_avg; float min; uint8 supported_eotf_mask;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/hdr_static_metadata.mojom;l=8" + }, + "gfx.mojom.Step": { + "definition": "struct Step { float fraction; uint8 alpha;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/linear_gradient.mojom;l=8" + }, + "gfx.mojom.LinearGradient": { + "definition": "struct LinearGradient { int16 angle = 0; uint8 step_count = 0; array steps;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/linear_gradient.mojom;l=13" + }, + "gfx.mojom.MaskFilterInfo": { + "definition": "struct MaskFilterInfo { gfx.mojom.RRectF rounded_corner_bounds; gfx.mojom.LinearGradient? gradient_mask; int32? clip_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/mask_filter_info.mojom;l=11" + }, + "gfx.mojom.NativePixmapPlane": { + "definition": "struct NativePixmapPlane { uint32 stride; uint64 offset; uint64 size; handle buffer_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/native_handle_types.mojom;l=12" + }, + "gfx.mojom.NativePixmapHandle": { + "definition": "struct NativePixmapHandle { array planes; [EnableIf=is_chromeos|is_linux] uint64 modifier; [EnableIf=is_chromeos|is_linux] bool supports_zero_copy_webgpu_import; [EnableIf=is_fuchsia] handle buffer_collection_handle; [EnableIf=is_fuchsia] uint32 buffer_index; [EnableIf=is_fuchsia] bool ram_coherency;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/native_handle_types.mojom;l=23" + }, + "gfx.mojom.AHardwareBufferHandle": { + "definition": "struct AHardwareBufferHandle { handle buffer_handle; handle tracking_pipe;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/native_handle_types.mojom;l=43" + }, + "gfx.mojom.DXGIHandleToken": { + "definition": "struct DXGIHandleToken { mojo_base.mojom.UnguessableToken value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/native_handle_types.mojom;l=67" + }, + "gfx.mojom.DXGIHandle": { + "definition": "struct DXGIHandle { handle buffer_handle; DXGIHandleToken token; mojo_base.mojom.UnsafeSharedMemoryRegion? shared_memory_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/native_handle_types.mojom;l=72" + }, + "gfx.mojom.IOSurfaceHandle": { + "definition": "struct IOSurfaceHandle { handle mach_send_right; [EnableIf=is_ios] mojo_base.mojom.UnsafeSharedMemoryRegion shared_memory_handle; [EnableIf=is_ios] array plane_strides; [EnableIf=is_ios] array plane_offsets;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/native_handle_types.mojom;l=91" + }, + "gfx.mojom.GpuMemoryBufferPlatformHandle": { + "definition": "union GpuMemoryBufferPlatformHandle { mojo_base.mojom.UnsafeSharedMemoryRegion shared_memory_handle; [EnableIf=supports_native_pixmap] NativePixmapHandle native_pixmap_handle; [EnableIf=is_apple] IOSurfaceHandle io_surface_handle; [EnableIf=is_win] DXGIHandle dxgi_handle; [EnableIf=is_android] AHardwareBufferHandle android_hardware_buffer_handle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/native_handle_types.mojom;l=111" + }, + "gfx.mojom.OverlayPriorityHint": { + "definition": "enum OverlayPriorityHint { kNone = 0, kRegular, kLowLatencyCanvas, kHardwareProtection, kVideo,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/overlay_priority_hint.mojom;l=8" + }, + "gfx.mojom.OverlayTransform": { + "definition": "enum OverlayTransform { OVERLAY_TRANSFORM_INVALID, OVERLAY_TRANSFORM_NONE, OVERLAY_TRANSFORM_FLIP_HORIZONTAL, OVERLAY_TRANSFORM_FLIP_VERTICAL, OVERLAY_TRANSFORM_ROTATE_CLOCKWISE_90, OVERLAY_TRANSFORM_ROTATE_CLOCKWISE_180, OVERLAY_TRANSFORM_ROTATE_CLOCKWISE_270, OVERLAY_TRANSFORM_FLIP_VERTICAL_CLOCKWISE_90, OVERLAY_TRANSFORM_FLIP_VERTICAL_CLOCKWISE_270, OVERLAY_TRANSFORM_LAST = OVERLAY_TRANSFORM_FLIP_VERTICAL_CLOCKWISE_270};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/overlay_transform.mojom;l=8" + }, + "gfx.mojom.OverlayType": { + "definition": "enum OverlayType { kSimple, kUnderlay, kSingleOnTop, kFullScreen,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/overlay_type.mojom;l=8" + }, + "gfx.mojom.PresentationFeedback": { + "definition": "struct PresentationFeedback { mojo_base.mojom.TimeTicks timestamp; mojo_base.mojom.TimeDelta interval; uint32 flags; mojo_base.mojom.TimeTicks available_timestamp; mojo_base.mojom.TimeTicks ready_timestamp; mojo_base.mojom.TimeTicks latch_timestamp; mojo_base.mojom.TimeTicks writes_done_timestamp;[EnableIf=is_apple] CALayerResult ca_layer_error_code; int64? display_trace_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/presentation_feedback.mojom;l=12" + }, + "gfx.mojom.RRectF": { + "definition": "struct RRectF { RRectFType type; gfx.mojom.RectF rect; gfx.mojom.Vector2dF upper_left; gfx.mojom.Vector2dF upper_right; gfx.mojom.Vector2dF lower_right; gfx.mojom.Vector2dF lower_left;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/rrect_f.mojom;l=19" + }, + "gfx.mojom.RRectFType": { + "definition": "enum RRectFType { kEmpty, kRect, kSingle, kSimple, kOval, kComplex,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/rrect_f.mojom;l=9" + }, + "gfx.mojom.SelectionBound": { + "definition": "struct SelectionBound { SelectionBoundType type; gfx.mojom.PointF edge_start; gfx.mojom.PointF edge_end; gfx.mojom.PointF visible_edge_start; gfx.mojom.PointF visible_edge_end; bool visible;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/selection_bound.mojom;l=19" + }, + "gfx.mojom.SelectionBoundType": { + "definition": "enum SelectionBoundType { LEFT, RIGHT, CENTER, HIDDEN, EMPTY, LAST = EMPTY};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/selection_bound.mojom;l=9" + }, + "gfx.mojom.SwapResult": { + "definition": "enum SwapResult { ACK, FAILED, SKIPPED, NAK_RECREATE_BUFFERS, NON_SIMPLE_OVERLAYS_FAILED,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/swap_result.mojom;l=12" + }, + "gfx.mojom.SwapTimings": { + "definition": "struct SwapTimings { mojo_base.mojom.TimeTicks swap_start; mojo_base.mojom.TimeTicks swap_end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/swap_timings.mojom;l=10" + }, + "gfx.mojom.TraitsTestService.EchoSelectionBound": { + "definition": "[Sync] EchoSelectionBound(SelectionBound s) => (SelectionBound pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/traits_test_service.mojom;l=15" + }, + "gfx.mojom.TraitsTestService.EchoTransform": { + "definition": "[Sync] EchoTransform(Transform t) => (Transform pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/traits_test_service.mojom;l=17" + }, + "gfx.mojom.TraitsTestService.EchoGpuMemoryBufferHandle": { + "definition": "[EnableIf=use_blink, Sync] EchoGpuMemoryBufferHandle(GpuMemoryBufferHandle g) => (GpuMemoryBufferHandle pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/traits_test_service.mojom;l=20" + }, + "gfx.mojom.TraitsTestService.EchoRRectF": { + "definition": "[Sync] EchoRRectF(RRectF t) => (RRectF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/traits_test_service.mojom;l=24" + }, + "gfx.mojom.Transform": { + "definition": "struct Transform { array? matrix;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/mojom/transform.mojom;l=9" + }, + "gfx.mojom.Range": { + "definition": "struct Range { uint32 start; uint32 end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/range/mojom/range.mojom;l=8" + }, + "gfx.mojom.RangeF": { + "definition": "struct RangeF { float start; float end;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/range/mojom/range.mojom;l=14" + }, + "gfx.mojom.RangeTraitsTestService.EchoRange": { + "definition": "[Sync] EchoRange(Range p) => (Range pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/range/mojom/range_traits_test_service.mojom;l=12" + }, + "gfx.mojom.RangeTraitsTestService.EchoRangeF": { + "definition": "[Sync] EchoRangeF(RangeF p) => (RangeF pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gfx/range/mojom/range_traits_test_service.mojom;l=14" + }, + "gl.mojom.GLImplementationParts": { + "definition": "struct GLImplementationParts { GLImplementation gl; ANGLEImplementation angle;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gl/mojom/gl_implementation.mojom;l=33" + }, + "gl.mojom.GLImplementation": { + "definition": "enum GLImplementation { kGLImplementationNone, kGLImplementationEGLGLES2, kGLImplementationMockGL, kGLImplementationStubGL, kGLImplementationDisabled, kGLImplementationEGLANGLE,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gl/mojom/gl_implementation.mojom;l=8" + }, + "gl.mojom.ANGLEImplementation": { + "definition": "enum ANGLEImplementation { kNone, kD3D9, kD3D11, kOpenGL, kOpenGLES, kNull, kVulkan, kSwiftShader, kMetal, kD3D11Warp, kDefault,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gl/mojom/gl_implementation.mojom;l=18" + }, + "gl.mojom.GpuPreference": { + "definition": "enum GpuPreference { kNone, kDefault, kLowPower, kHighPerformance,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gl/mojom/gpu_preference.mojom;l=8" + }, + "gl.mojom.TraitsTestService.EchoGpuPreference": { + "definition": "[Sync] EchoGpuPreference(GpuPreference g) => (GpuPreference pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gl/mojom/traits_test_service.mojom;l=14" + }, + "gl.mojom.TraitsTestService.EchoGLImplementationParts": { + "definition": "[Sync] EchoGLImplementationParts( GLImplementationParts impl) => (GLImplementationParts pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/gl/mojom/traits_test_service.mojom;l=17" + }, + "ui.mojom.LatencyInfo": { + "definition": "struct LatencyInfo { map latency_components; int64 trace_id; bool coalesced; bool began; bool terminated; int64 gesture_scroll_id; int64 touch_trace_id;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/latency/mojom/latency_info.mojom;l=46" + }, + "ui.mojom.LatencyComponentType": { + "definition": "enum LatencyComponentType { INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT, INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, INPUT_EVENT_LATENCY_UI_COMPONENT, INPUT_EVENT_LATENCY_RENDERER_MAIN_COMPONENT, INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN_COMPONENT, INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL_COMPONENT, INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT, INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, INPUT_EVENT_LATENCY_FRAME_SWAP_COMPONENT,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/latency/mojom/latency_info.mojom;l=9" + }, + "ui.ozone.mojom.DeviceCursor.SetCursor": { + "definition": "SetCursor(gfx.mojom.AcceleratedWidget window, array bitmaps, gfx.mojom.Point? point, mojo_base.mojom.TimeDelta frame_delay);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/device_cursor.mojom;l=18" + }, + "ui.ozone.mojom.DeviceCursor.MoveCursor": { + "definition": "MoveCursor(gfx.mojom.AcceleratedWidget window, gfx.mojom.Point point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/device_cursor.mojom;l=24" + }, + "ui.ozone.mojom.DrmDevice.CreateWindow": { + "definition": "CreateWindow(gfx.mojom.AcceleratedWidget widget, gfx.mojom.Rect initial_bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=26" + }, + "ui.ozone.mojom.DrmDevice.DestroyWindow": { + "definition": "DestroyWindow(gfx.mojom.AcceleratedWidget widget);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=30" + }, + "ui.ozone.mojom.DrmDevice.SetWindowBounds": { + "definition": "SetWindowBounds(gfx.mojom.AcceleratedWidget widget, gfx.mojom.Rect bounds);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=33" + }, + "ui.ozone.mojom.DrmDevice.TakeDisplayControl": { + "definition": "TakeDisplayControl() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=37" + }, + "ui.ozone.mojom.DrmDevice.RelinquishDisplayControl": { + "definition": "RelinquishDisplayControl() => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=41" + }, + "ui.ozone.mojom.DrmDevice.RefreshNativeDisplays": { + "definition": "RefreshNativeDisplays() => (array display_snapshots);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=44" + }, + "ui.ozone.mojom.DrmDevice.AddGraphicsDevice": { + "definition": "AddGraphicsDevice(mojo_base.mojom.FilePath path, handle fd_mojo_handle);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=48" + }, + "ui.ozone.mojom.DrmDevice.RemoveGraphicsDevice": { + "definition": "RemoveGraphicsDevice(mojo_base.mojom.FilePath path);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=52" + }, + "ui.ozone.mojom.DrmDevice.ShouldDisplayEventTriggerConfiguration": { + "definition": "ShouldDisplayEventTriggerConfiguration(map event_props) => (bool should_trigger);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=58" + }, + "ui.ozone.mojom.DrmDevice.ConfigureNativeDisplays": { + "definition": "ConfigureNativeDisplays( array config_requests, display.mojom.ModesetFlags modeset_flags) => (array request_results, bool config_success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=65" + }, + "ui.ozone.mojom.DrmDevice.SetHdcpKeyProp": { + "definition": "SetHdcpKeyProp(int64 display_id, string key) => (int64 display_id, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=72" + }, + "ui.ozone.mojom.DrmDevice.GetHDCPState": { + "definition": "GetHDCPState(int64 display_id) => (int64 display_id, bool success, display.mojom.HDCPState state, display.mojom.ContentProtectionMethod protection_method);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=77" + }, + "ui.ozone.mojom.DrmDevice.SetHDCPState": { + "definition": "SetHDCPState(int64 display_id, display.mojom.HDCPState state, display.mojom.ContentProtectionMethod protection_method) => (int64 display_id, bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=83" + }, + "ui.ozone.mojom.DrmDevice.SetColorTemperatureAdjustment": { + "definition": "SetColorTemperatureAdjustment(int64 display_id, display.mojom.ColorTemperatureAdjustment cta);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=89" + }, + "ui.ozone.mojom.DrmDevice.SetColorCalibration": { + "definition": "SetColorCalibration(int64 display_id, display.mojom.ColorCalibration calibration);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=93" + }, + "ui.ozone.mojom.DrmDevice.SetGammaAdjustment": { + "definition": "SetGammaAdjustment(int64 display_id, display.mojom.GammaAdjustment adjustment);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=97" + }, + "ui.ozone.mojom.DrmDevice.SetPrivacyScreen": { + "definition": "SetPrivacyScreen(int64 display_id, bool enabled) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=102" + }, + "ui.ozone.mojom.DrmDevice.GetSeamlessRefreshRates": { + "definition": "GetSeamlessRefreshRates(int64 display_id) => (array? ranges);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=107" + }, + "ui.ozone.mojom.DrmDevice.GetDeviceCursor": { + "definition": "GetDeviceCursor(pending_associated_receiver cursor);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/drm/mojom/drm_device.mojom;l=112" + }, + "ui.mojom.ScenicGpuHost.AttachSurfaceToWindow": { + "definition": "AttachSurfaceToWindow(int32 window_id, handle view_holder_token);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/flatland/mojom/scenic_gpu_host.mojom;l=11" + }, + "ui.mojom.ScenicGpuService.Initialize": { + "definition": "Initialize(pending_remote scenic_gpu_host);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/flatland/mojom/scenic_gpu_service.mojom;l=18" + }, + "ui.ozone.mojom.WaylandBufferManagerHost.SetWaylandBufferManagerGpu": { + "definition": "SetWaylandBufferManagerGpu( pending_associated_remote buffer_manager_gpu_associated);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=23" + }, + "ui.ozone.mojom.WaylandBufferManagerHost.CreateDmabufBasedBuffer": { + "definition": "CreateDmabufBasedBuffer(handle dmabuf_fd, gfx.mojom.Size size, array strides, array offsets, array modifiers, uint32 format, uint32 planes_count, gfx.mojom.ColorSpace color_space, gfx.mojom.HDRMetadata hdr_metadata, uint32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=43" + }, + "ui.ozone.mojom.WaylandBufferManagerHost.CreateShmBasedBuffer": { + "definition": "CreateShmBasedBuffer(handle shm_fd, uint64 length, gfx.mojom.Size size, uint32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=62" + }, + "ui.ozone.mojom.WaylandBufferManagerHost.CreateSinglePixelBuffer": { + "definition": "CreateSinglePixelBuffer(skia.mojom.SkColor4f color, uint32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=73" + }, + "ui.ozone.mojom.WaylandBufferManagerHost.DestroyBuffer": { + "definition": "DestroyBuffer(uint32 buffer_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=82" + }, + "ui.ozone.mojom.WaylandBufferManagerHost.CommitOverlays": { + "definition": "[EstimateSize] CommitOverlays(gfx.mojom.AcceleratedWidget widget, uint32 frame_id, gfx.mojom.FrameData data, array overlays);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=86" + }, + "ui.ozone.mojom.WaylandBufferManagerGpu.Initialize": { + "definition": "Initialize(pending_remote remote_host, map> buffer_formats_with_modifiers, bool supports_dma_buf, bool supports_viewporter, bool supports_acquire_fence, bool supports_overlays, bool supports_single_pixel_buffer);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=112" + }, + "ui.ozone.mojom.WaylandBufferManagerGpu.OnSubmission": { + "definition": "OnSubmission(gfx.mojom.AcceleratedWidget widget, uint32 frame_id, gfx.mojom.SwapResult swap_result, gfx.mojom.GpuFenceHandle? release_fence_handle, array presentation_infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=122" + }, + "ui.ozone.mojom.WaylandBufferManagerGpu.OnPresentation": { + "definition": "OnPresentation(gfx.mojom.AcceleratedWidget widget, array presentation_infos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_buffer_manager.mojom;l=132" + }, + "wl.mojom.WaylandOverlayConfig": { + "definition": "struct WaylandOverlayConfig { int32 z_order; gfx.mojom.ColorSpace? color_space; gfx.mojom.HDRMetadata? hdr_metadata; TransformUnion transform; uint32 buffer_id; float surface_scale_factor; gfx.mojom.RectF bounds_rect; gfx.mojom.RectF crop_rect; gfx.mojom.Rect damage_region; bool enable_blend; float opacity; gfx.mojom.GpuFenceHandle? access_fence_handle; gfx.mojom.OverlayPriorityHint priority_hint;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_overlay_config.mojom;l=24" + }, + "wl.mojom.TransformUnion": { + "definition": "union TransformUnion { gfx.mojom.OverlayTransform overlay_transform; gfx.mojom.Transform matrix_transform;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_overlay_config.mojom;l=17" + }, + "wl.mojom.ConfigTraitsTestService.EchoTransform": { + "definition": "[Sync] EchoTransform(TransformUnion t) => (TransformUnion pass);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_overlay_config_traits_test_service.mojom;l=12" + }, + "wl.mojom.WaylandPresentationInfo": { + "definition": "struct WaylandPresentationInfo { uint32 frame_id; gfx.mojom.PresentationFeedback feedback;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/platform/wayland/mojom/wayland_presentation_info.mojom;l=9" + }, + "ui.ozone.mojom.GesturePropertiesService.ListDevices": { + "definition": "ListDevices() => (map result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/public/mojom/gesture_properties_service.mojom;l=36" + }, + "ui.ozone.mojom.GesturePropertiesService.ListProperties": { + "definition": "ListProperties(int32 device_id) => (array properties);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/public/mojom/gesture_properties_service.mojom;l=40" + }, + "ui.ozone.mojom.GesturePropertiesService.GetProperty": { + "definition": "GetProperty(int32 device_id, string name) => (bool is_read_only, GesturePropValue? value);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/public/mojom/gesture_properties_service.mojom;l=45" + }, + "ui.ozone.mojom.GesturePropertiesService.SetProperty": { + "definition": "SetProperty(int32 device_id, string name, GesturePropValue value) => (SetGesturePropErrorCode error);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/public/mojom/gesture_properties_service.mojom;l=49" + }, + "ui.ozone.mojom.SetGesturePropErrorCode": { + "definition": "enum SetGesturePropErrorCode { SUCCESS = 0, UNKNOWN_ERROR = 1, NOT_FOUND = 2, READ_ONLY = 3, TYPE_MISMATCH = 4, SIZE_MISMATCH = 5,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/public/mojom/gesture_properties_service.mojom;l=17" + }, + "ui.ozone.mojom.GesturePropValue": { + "definition": "union GesturePropValue { array ints; array shorts; array bools; string str; array reals;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/ozone/public/mojom/gesture_properties_service.mojom;l=8" + }, + "webui_examples.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/examples/browser/ui/web/browser.mojom;l=13" + }, + "webui_examples.mojom.PageHandler.Navigate": { + "definition": "Navigate(int32 guest_contents_id, url.mojom.Url src);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/examples/browser/ui/web/browser.mojom;l=19" + }, + "webui_examples.mojom.PageHandler.GoBack": { + "definition": "GoBack(int32 guest_contents_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/examples/browser/ui/web/browser.mojom;l=22" + }, + "webui_examples.mojom.PageHandler.GoForward": { + "definition": "GoForward(int32 guest_contents_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/examples/browser/ui/web/browser.mojom;l=25" + }, + "app_management.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=191" + }, + "app_management.mojom.PageHandler.GetApps": { + "definition": "GetApps() => (array apps);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=197" + }, + "app_management.mojom.PageHandler.GetApp": { + "definition": "GetApp(string app_id) => (App? app);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=199" + }, + "app_management.mojom.PageHandler.GetSubAppToParentMap": { + "definition": "GetSubAppToParentMap() => (map sub_app_to_parent_map);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=202" + }, + "app_management.mojom.PageHandler.GetExtensionAppPermissionMessages": { + "definition": "GetExtensionAppPermissionMessages(string app_id) => (array messages);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=203" + }, + "app_management.mojom.PageHandler.SetPinned": { + "definition": "SetPinned(string app_id, bool pinned);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=206" + }, + "app_management.mojom.PageHandler.SetPermission": { + "definition": "SetPermission(string app_id, Permission permission);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=208" + }, + "app_management.mojom.PageHandler.SetResizeLocked": { + "definition": "SetResizeLocked(string app_id, bool locked);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=211" + }, + "app_management.mojom.PageHandler.Uninstall": { + "definition": "Uninstall(string app_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=212" + }, + "app_management.mojom.PageHandler.OpenNativeSettings": { + "definition": "OpenNativeSettings(string app_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=213" + }, + "app_management.mojom.PageHandler.SetPreferredApp": { + "definition": "SetPreferredApp(string app_id, bool is_preferred_app);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=220" + }, + "app_management.mojom.PageHandler.GetOverlappingPreferredApps": { + "definition": "GetOverlappingPreferredApps(string app_id) => (array app_ids);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=230" + }, + "app_management.mojom.PageHandler.UpdateAppSize": { + "definition": "UpdateAppSize(string app_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=233" + }, + "app_management.mojom.PageHandler.SetWindowMode": { + "definition": "SetWindowMode(string app_id, WindowMode window_mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=236" + }, + "app_management.mojom.PageHandler.SetRunOnOsLoginMode": { + "definition": "SetRunOnOsLoginMode(string app_id, RunOnOsLoginMode run_on_os_login_mode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=239" + }, + "app_management.mojom.PageHandler.SetFileHandlingEnabled": { + "definition": "SetFileHandlingEnabled(string app_id, bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=242" + }, + "app_management.mojom.PageHandler.ShowDefaultAppAssociationsUi": { + "definition": "ShowDefaultAppAssociationsUi();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=246" + }, + "app_management.mojom.PageHandler.OpenStorePage": { + "definition": "OpenStorePage(string app_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=248" + }, + "app_management.mojom.PageHandler.SetAppLocale": { + "definition": "SetAppLocale(string app_id, string locale_tag);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=251" + }, + "app_management.mojom.Page.OnAppAdded": { + "definition": "OnAppAdded(App app);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=261" + }, + "app_management.mojom.Page.OnAppChanged": { + "definition": "OnAppChanged(App update);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=262" + }, + "app_management.mojom.Page.OnAppRemoved": { + "definition": "OnAppRemoved(string app_id);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=263" + }, + "app_management.mojom.Permission": { + "definition": "struct Permission { PermissionType permission_type; PermissionValue value; bool is_managed; string? details;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=48" + }, + "app_management.mojom.RunOnOsLogin": { + "definition": "struct RunOnOsLogin { RunOnOsLoginMode login_mode; bool is_managed;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=111" + }, + "app_management.mojom.Locale": { + "definition": "struct Locale { string locale_tag; string display_name; string native_display_name;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=119" + }, + "app_management.mojom.App": { + "definition": "struct App { string id; AppType type; string? title; string? description; bool? is_pinned; bool? is_policy_pinned; string? version; string? size; map permissions; InstallReason install_reason; InstallSource install_source; bool hide_more_settings; bool hide_pin_to_shelf; bool is_preferred_app; WindowMode window_mode; bool hide_window_mode; bool resize_locked; bool hide_resize_locked; array supported_links; RunOnOsLogin? run_on_os_login; FileHandlingState? file_handling_state; string? app_size; string? data_size; string publisher_id; string? formatted_origin; array scope_extensions; array supported_locales; Locale? selected_locale; bool show_system_notifications_settings_link; bool allow_uninstall; bool disable_user_choice_navigation_capturing;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=132" + }, + "app_management.mojom.ExtensionAppPermissionMessage": { + "definition": "struct ExtensionAppPermissionMessage { string message; array submessages;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=185" + }, + "app_management.mojom.FileHandlingState": { + "definition": "struct FileHandlingState { bool enabled; bool is_managed; string user_visible_types; string user_visible_types_label; url.mojom.Url? learn_more_url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=266" + }, + "app_management.mojom.AppType": { + "definition": "enum AppType { kUnknown = 0, kArc, kCrostini, kChromeApp, kWeb, kPluginVm, kRemote, kBorealis, kSystemWeb, kExtension, kBruschetta, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=10" + }, + "app_management.mojom.PermissionType": { + "definition": "enum PermissionType { kUnknown = 0, kCamera = 1, kLocation = 2, kMicrophone = 3, kNotifications = 4, kContacts = 5, kStorage = 6, kPrinting = 7, kFileHandling = 8,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=25" + }, + "app_management.mojom.TriState": { + "definition": "enum TriState { kAllow, kBlock, kAsk,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=37" + }, + "app_management.mojom.InstallReason": { + "definition": "enum InstallReason { kUnknown = 0, kSystem, kPolicy, kOem, kDefault, kSync, kUser, kSubApp, kKiosk, kCommandLine, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=61" + }, + "app_management.mojom.InstallSource": { + "definition": "enum InstallSource { kUnknown = 0, kSystem, kSync, kPlayStore, kChromeWebStore, kBrowser, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=79" + }, + "app_management.mojom.WindowMode": { + "definition": "enum WindowMode { kUnknown = 0, kWindow, kBrowser, kTabbedWindow,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=89" + }, + "app_management.mojom.RunOnOsLoginMode": { + "definition": "enum RunOnOsLoginMode { kUnknown = 0, kNotRun, kWindowed,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=101" + }, + "app_management.mojom.PermissionValue": { + "definition": "union PermissionValue { bool bool_value; TriState tristate_value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/app_management/app_management.mojom;l=43" + }, + "color_change_listener.mojom.PageHandler.SetPage": { + "definition": "SetPage(pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/color_change_listener/color_change_listener.mojom;l=10" + }, + "color_change_listener.mojom.Page.OnColorProviderChanged": { + "definition": "OnColorProviderChanged();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/color_change_listener/color_change_listener.mojom;l=16" + }, + "composebox.mojom.PageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler(pending_remote page, pending_receiver handler, pending_remote searchbox_page, pending_receiver searchbox_handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/composebox/composebox.mojom;l=12" + }, + "composebox.mojom.PageHandler.FocusChanged": { + "definition": "FocusChanged(bool focused);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/composebox/composebox.mojom;l=21" + }, + "composebox.mojom.PageHandler.SetDeepSearchMode": { + "definition": "SetDeepSearchMode(bool enabled);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/composebox/composebox.mojom;l=23" + }, + "composebox.mojom.PageHandler.SetCreateImageMode": { + "definition": "SetCreateImageMode(bool enabled, bool image_present);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/composebox/composebox.mojom;l=25" + }, + "composebox.mojom.PageHandler.HandleLensButtonClick": { + "definition": "HandleLensButtonClick();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/composebox/composebox.mojom;l=28" + }, + "customize_color_scheme_mode.mojom.CustomizeColorSchemeModeHandlerFactory.CreateCustomizeColorSchemeModeHandler": { + "definition": "CreateCustomizeColorSchemeModeHandler( pending_remote pending_client, pending_receiver pending_handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/customize_color_scheme_mode/customize_color_scheme_mode.mojom;l=16" + }, + "customize_color_scheme_mode.mojom.CustomizeColorSchemeModeHandler.SetColorSchemeMode": { + "definition": "SetColorSchemeMode(ColorSchemeMode colorSchemeMode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/customize_color_scheme_mode/customize_color_scheme_mode.mojom;l=24" + }, + "customize_color_scheme_mode.mojom.CustomizeColorSchemeModeHandler.InitializeColorSchemeMode": { + "definition": "InitializeColorSchemeMode();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/customize_color_scheme_mode/customize_color_scheme_mode.mojom;l=26" + }, + "customize_color_scheme_mode.mojom.CustomizeColorSchemeModeClient.SetColorSchemeMode": { + "definition": "SetColorSchemeMode(ColorSchemeMode colorSchemeMode);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/customize_color_scheme_mode/customize_color_scheme_mode.mojom;l=32" + }, + "customize_color_scheme_mode.mojom.ColorSchemeMode": { + "definition": "enum ColorSchemeMode { kSystem = 0, kLight = 1, kDark = 2,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/customize_color_scheme_mode/customize_color_scheme_mode.mojom;l=7" + }, + "custom_help_bubble.mojom.CustomHelpBubbleHandlerFactory.CreateCustomHelpBubbleHandler": { + "definition": "CreateCustomHelpBubbleHandler( pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/custom_help_bubble.mojom;l=27" + }, + "custom_help_bubble.mojom.CustomHelpBubbleHandler.NotifyUserAction": { + "definition": "NotifyUserAction(CustomHelpBubbleUserAction action);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/custom_help_bubble.mojom;l=36" + }, + "custom_help_bubble.mojom.CustomHelpBubbleUserAction": { + "definition": "enum CustomHelpBubbleUserAction { kDismiss, kSnooze, kAction, kCancel, };", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/custom_help_bubble.mojom;l=15" + }, + "help_bubble.mojom.HelpBubbleHandlerFactory.CreateHelpBubbleHandler": { + "definition": "CreateHelpBubbleHandler( pending_remote client, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=93" + }, + "help_bubble.mojom.HelpBubbleHandler.BindTrackedElementHandler": { + "definition": "BindTrackedElementHandler( pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=113" + }, + "help_bubble.mojom.HelpBubbleHandler.HelpBubbleButtonPressed": { + "definition": "HelpBubbleButtonPressed(string native_identifier, uint8 button_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=121" + }, + "help_bubble.mojom.HelpBubbleHandler.HelpBubbleClosed": { + "definition": "HelpBubbleClosed(string native_identifier, HelpBubbleClosedReason reason);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=126" + }, + "help_bubble.mojom.HelpBubbleClient.ShowHelpBubble": { + "definition": "ShowHelpBubble(HelpBubbleParams params);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=134" + }, + "help_bubble.mojom.HelpBubbleClient.ToggleFocusForAccessibility": { + "definition": "ToggleFocusForAccessibility(string native_identifier);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=138" + }, + "help_bubble.mojom.HelpBubbleClient.HideHelpBubble": { + "definition": "HideHelpBubble(string native_identifier);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=142" + }, + "help_bubble.mojom.HelpBubbleClient.ExternalHelpBubbleUpdated": { + "definition": "ExternalHelpBubbleUpdated(string native_identifier, bool shown);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=147" + }, + "help_bubble.mojom.HelpBubbleButtonParams": { + "definition": "struct HelpBubbleButtonParams { string text; bool is_default = false;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=50" + }, + "help_bubble.mojom.Progress": { + "definition": "struct Progress { uint8 current; uint8 total;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=56" + }, + "help_bubble.mojom.HelpBubbleParams": { + "definition": "struct HelpBubbleParams { string native_identifier; HelpBubbleArrowPosition position = HelpBubbleArrowPosition.TOP_CENTER; string? title_text; string body_text; string close_button_alt_text; string? body_icon_name; string body_icon_alt_text; Progress? progress; array buttons; bool? focus_on_show_hint; mojo_base.mojom.TimeDelta? timeout;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=62" + }, + "help_bubble.mojom.HelpBubbleArrowPosition": { + "definition": "enum HelpBubbleArrowPosition { TOP_LEFT, TOP_CENTER, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, LEFT_TOP, LEFT_CENTER, LEFT_BOTTOM, RIGHT_TOP, RIGHT_CENTER, RIGHT_BOTTOM,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=21" + }, + "help_bubble.mojom.HelpBubbleClosedReason": { + "definition": "enum HelpBubbleClosedReason { kPageChanged, kDismissedByUser, kTimedOut,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/help_bubble/help_bubble.mojom;l=40" + }, + "history.mojom.PageHandler.SetPage": { + "definition": "SetPage(pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=160" + }, + "history.mojom.PageHandler.QueryHistory": { + "definition": "QueryHistory(string query, int32 max_results, double? begin_time) => (QueryResult results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=164" + }, + "history.mojom.PageHandler.QueryHistoryContinuation": { + "definition": "QueryHistoryContinuation() => (QueryResult results);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=168" + }, + "history.mojom.PageHandler.RemoveVisits": { + "definition": "RemoveVisits(array items) => ();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=171" + }, + "history.mojom.PageHandler.OpenClearBrowsingDataDialog": { + "definition": "OpenClearBrowsingDataDialog();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=174" + }, + "history.mojom.PageHandler.RemoveBookmark": { + "definition": "RemoveBookmark(string url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=177" + }, + "history.mojom.PageHandler.SetLastSelectedTab": { + "definition": "SetLastSelectedTab(int32 last_tab);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=181" + }, + "history.mojom.PageHandler.ShowSidePanelUI": { + "definition": "ShowSidePanelUI();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=184" + }, + "history.mojom.PageHandler.RequestAccountInfo": { + "definition": "RequestAccountInfo() => (AccountInfo account_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=188" + }, + "history.mojom.PageHandler.TurnOnHistorySync": { + "definition": "TurnOnHistorySync();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=191" + }, + "history.mojom.Page.OnHistoryDeleted": { + "definition": "OnHistoryDeleted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=197" + }, + "history.mojom.Page.OnHasOtherFormsChanged": { + "definition": "OnHasOtherFormsChanged(bool has_other_forms);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=200" + }, + "history.mojom.Page.SendAccountInfo": { + "definition": "SendAccountInfo(AccountInfo account_info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=203" + }, + "history.mojom.QueryState": { + "definition": "struct QueryState { bool incremental; bool querying; string search_term; string? after;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=22" + }, + "history.mojom.HistoryQuery": { + "definition": "struct HistoryQuery { string term; bool finished;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=38" + }, + "history.mojom.DebugInfo": { + "definition": "struct DebugInfo { bool is_url_in_local_database; uint32 visit_count; uint32 typed_count;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=47" + }, + "history.mojom.HistoryEntry": { + "definition": "struct HistoryEntry { string url; string title; string domain; string fallback_favicon_text; double time; array all_timestamps; string date_short; string device_name; string device_type; string date_time_of_day; string date_relative_day; bool selected; string readableTimestamp; string snippet; bool starred; FilteringBehavior host_filtering_behavior; bool blocked_visit; bool is_url_in_remote_user_data; bool is_actor_visit; string remote_icon_url_for_uma; DebugInfo? debug;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=62" + }, + "history.mojom.QueryResult": { + "definition": "struct QueryResult { HistoryQuery? info; array value;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=131" + }, + "history.mojom.RemovalItem": { + "definition": "struct RemovalItem { string url; array timestamps;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=140" + }, + "history.mojom.AccountInfo": { + "definition": "struct AccountInfo { url.mojom.Url account_image_src; string name; string email;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=150" + }, + "history.mojom.FilteringBehavior": { + "definition": "enum FilteringBehavior { kUnknown = -1, kAllow = 0, kBlock = 2, kInvalid = 3,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history/history.mojom;l=13" + }, + "history_clusters.mojom.PageHandler.OpenHistoryUrl": { + "definition": "OpenHistoryUrl(url.mojom.Url url, ui.mojom.ClickModifiers click_modifiers);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=66" + }, + "history_clusters.mojom.PageHandler.SetPage": { + "definition": "SetPage(pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=70" + }, + "history_clusters.mojom.PageHandler.ShowContextMenuForSearchbox": { + "definition": "ShowContextMenuForSearchbox(string query, gfx.mojom.Point point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=73" + }, + "history_clusters.mojom.PageHandler.ShowContextMenuForURL": { + "definition": "ShowContextMenuForURL(url.mojom.Url url, gfx.mojom.Point point);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=76" + }, + "history_clusters.mojom.PageHandler.ShowSidePanelUI": { + "definition": "ShowSidePanelUI();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=79" + }, + "history_clusters.mojom.PageHandler.ToggleVisibility": { + "definition": "ToggleVisibility(bool visible) => (bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=84" + }, + "history_clusters.mojom.PageHandler.StartQueryClusters": { + "definition": "StartQueryClusters(string query, mojo_base.mojom.Time? begin_time, bool recluster);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=89" + }, + "history_clusters.mojom.PageHandler.LoadMoreClusters": { + "definition": "LoadMoreClusters(string query);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=94" + }, + "history_clusters.mojom.PageHandler.HideVisits": { + "definition": "HideVisits(array visits) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=98" + }, + "history_clusters.mojom.PageHandler.RemoveVisits": { + "definition": "RemoveVisits(array visits) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=104" + }, + "history_clusters.mojom.PageHandler.RemoveVisitByUrlAndTime": { + "definition": "RemoveVisitByUrlAndTime(url.mojom.Url url, double timestamp) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=114" + }, + "history_clusters.mojom.PageHandler.OpenVisitUrlsInTabGroup": { + "definition": "OpenVisitUrlsInTabGroup(array visits, string? tab_group_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=119" + }, + "history_clusters.mojom.PageHandler.RecordVisitAction": { + "definition": "RecordVisitAction(VisitAction visit_action, uint32 visit_index, VisitType visit_type);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=122" + }, + "history_clusters.mojom.PageHandler.RecordRelatedSearchAction": { + "definition": "RecordRelatedSearchAction(RelatedSearchAction action, uint32 visit_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=127" + }, + "history_clusters.mojom.PageHandler.RecordClusterAction": { + "definition": "RecordClusterAction(ClusterAction cluster_action, uint32 cluster_index);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=130" + }, + "history_clusters.mojom.PageHandler.RecordToggledVisibility": { + "definition": "RecordToggledVisibility(bool visible);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=133" + }, + "history_clusters.mojom.Page.OnClustersQueryResult": { + "definition": "OnClustersQueryResult(QueryResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=142" + }, + "history_clusters.mojom.Page.OnClusterImageUpdated": { + "definition": "OnClusterImageUpdated(int32 cluster_index, url.mojom.Url image_url);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=145" + }, + "history_clusters.mojom.Page.OnVisitsHidden": { + "definition": "OnVisitsHidden(array hidden_visits);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=149" + }, + "history_clusters.mojom.Page.OnVisitsRemoved": { + "definition": "OnVisitsRemoved(array removed_visits);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=153" + }, + "history_clusters.mojom.Page.OnHistoryDeleted": { + "definition": "OnHistoryDeleted();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=156" + }, + "history_clusters.mojom.Page.OnQueryChangedByUser": { + "definition": "OnQueryChangedByUser(string query);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=159" + }, + "history_clusters.mojom.QueryResult": { + "definition": "struct QueryResult { string query; array clusters; bool can_load_more; bool is_continuation;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=47" + }, + "history_clusters.mojom.ClusterAction": { + "definition": "enum ClusterAction { kDeleted, kOpenedInTabGroup, kRelatedSearchClicked, kVisitClicked,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=20" + }, + "history_clusters.mojom.RelatedSearchAction": { + "definition": "enum RelatedSearchAction { kClicked,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=28" + }, + "history_clusters.mojom.VisitAction": { + "definition": "enum VisitAction { kClicked, kHidden, kDeleted,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=33" + }, + "history_clusters.mojom.VisitType": { + "definition": "enum VisitType { kSRP, kNonSRP};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_clusters/history_clusters.mojom;l=40" + }, + "history_embeddings.mojom.PageHandler.SetPage": { + "definition": "SetPage(pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=100" + }, + "history_embeddings.mojom.PageHandler.Search": { + "definition": "Search(SearchQuery query);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=104" + }, + "history_embeddings.mojom.PageHandler.SendQualityLog": { + "definition": "SendQualityLog(array selected_indices, uint32 num_entered_chars);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=108" + }, + "history_embeddings.mojom.PageHandler.RecordSearchResultsMetrics": { + "definition": "RecordSearchResultsMetrics(bool nonEmptyResults, bool userClickedResult, bool answerShown, bool answerCitationClicked, bool otherHistoryResultClicked, uint32 queryWordCount);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=112" + }, + "history_embeddings.mojom.PageHandler.SetUserFeedback": { + "definition": "SetUserFeedback(UserFeedback feedback);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=118" + }, + "history_embeddings.mojom.PageHandler.MaybeShowFeaturePromo": { + "definition": "MaybeShowFeaturePromo();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=122" + }, + "history_embeddings.mojom.PageHandler.OpenSettingsPage": { + "definition": "OpenSettingsPage();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=126" + }, + "history_embeddings.mojom.Page.SearchResultChanged": { + "definition": "SearchResultChanged(SearchResult result);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=132" + }, + "history_embeddings.mojom.AnswerData": { + "definition": "struct AnswerData { array answer_text_directives;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=23" + }, + "history_embeddings.mojom.SearchResultItem": { + "definition": "struct SearchResultItem { string title; url.mojom.Url url; string url_for_display; string relative_time; string short_date_time; double last_url_visit_timestamp; string source_passage; AnswerData? answer_data; bool is_url_known_to_sync;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=31" + }, + "history_embeddings.mojom.SearchQuery": { + "definition": "struct SearchQuery { string query; mojo_base.mojom.Time? time_range_start;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=66" + }, + "history_embeddings.mojom.SearchResult": { + "definition": "struct SearchResult { string query; AnswerStatus answer_status; string answer; array items;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=76" + }, + "history_embeddings.mojom.AnswerStatus": { + "definition": "enum AnswerStatus { kUnspecified, kLoading, kSuccess, kUnanswerable, kModelUnavailable, kExecutionFailure, kExecutionCanceled, kFiltered,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=10" + }, + "history_embeddings.mojom.UserFeedback": { + "definition": "enum UserFeedback { kUserFeedbackUnspecified, kUserFeedbackNegative, kUserFeedbackPositive,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/history_embeddings/history_embeddings.mojom;l=87" + }, + "most_visited.mojom.MostVisitedPageHandlerFactory.CreatePageHandler": { + "definition": "CreatePageHandler( pending_remote page, pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=45" + }, + "most_visited.mojom.MostVisitedPageHandler.AddMostVisitedTile": { + "definition": "AddMostVisitedTile(url.mojom.Url url, string title) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=53" + }, + "most_visited.mojom.MostVisitedPageHandler.DeleteMostVisitedTile": { + "definition": "DeleteMostVisitedTile(MostVisitedTile tile);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=55" + }, + "most_visited.mojom.MostVisitedPageHandler.ReorderMostVisitedTile": { + "definition": "ReorderMostVisitedTile(MostVisitedTile tile, uint8 new_pos);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=57" + }, + "most_visited.mojom.MostVisitedPageHandler.RestoreMostVisitedDefaults": { + "definition": "RestoreMostVisitedDefaults(ntp_tiles.mojom.TileSource source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=59" + }, + "most_visited.mojom.MostVisitedPageHandler.UndoMostVisitedTileAction": { + "definition": "UndoMostVisitedTileAction(ntp_tiles.mojom.TileSource source);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=62" + }, + "most_visited.mojom.MostVisitedPageHandler.UpdateMostVisitedInfo": { + "definition": "UpdateMostVisitedInfo();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=65" + }, + "most_visited.mojom.MostVisitedPageHandler.UpdateMostVisitedTile": { + "definition": "UpdateMostVisitedTile(MostVisitedTile tile, url.mojom.Url new_url, string new_title) => (bool success);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=67" + }, + "most_visited.mojom.MostVisitedPageHandler.PrerenderMostVisitedTile": { + "definition": "PrerenderMostVisitedTile(MostVisitedTile tile);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=71" + }, + "most_visited.mojom.MostVisitedPageHandler.PrefetchMostVisitedTile": { + "definition": "PrefetchMostVisitedTile(MostVisitedTile tile);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=73" + }, + "most_visited.mojom.MostVisitedPageHandler.PreconnectMostVisitedTile": { + "definition": "PreconnectMostVisitedTile(MostVisitedTile tile);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=77" + }, + "most_visited.mojom.MostVisitedPageHandler.CancelPrerender": { + "definition": "CancelPrerender();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=79" + }, + "most_visited.mojom.MostVisitedPageHandler.GetMostVisitedExpandedState": { + "definition": "GetMostVisitedExpandedState() => (bool is_expanded);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=81" + }, + "most_visited.mojom.MostVisitedPageHandler.SetMostVisitedExpandedState": { + "definition": "SetMostVisitedExpandedState(bool is_expanded);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=83" + }, + "most_visited.mojom.MostVisitedPageHandler.OnMostVisitedTilesRendered": { + "definition": "OnMostVisitedTilesRendered(array tiles, double time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=87" + }, + "most_visited.mojom.MostVisitedPageHandler.OnMostVisitedTileNavigation": { + "definition": "OnMostVisitedTileNavigation(MostVisitedTile tile, uint32 index, uint8 mouse_button, bool alt_key, bool ctrl_key, bool meta_key, bool shift_key);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=92" + }, + "most_visited.mojom.MostVisitedPage.SetMostVisitedInfo": { + "definition": "SetMostVisitedInfo(MostVisitedInfo info);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=105" + }, + "most_visited.mojom.MostVisitedTile": { + "definition": "struct MostVisitedTile { string title; mojo_base.mojom.TextDirection title_direction; url.mojom.Url url; bool is_query_tile; bool allow_user_edit; bool allow_user_delete; ntp_tiles.mojom.TileSource source; int32 title_source;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=12" + }, + "most_visited.mojom.MostVisitedTheme": { + "definition": "struct MostVisitedTheme { skia.mojom.SkColor background_color; bool use_white_tile_icon; bool is_dark;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=27" + }, + "most_visited.mojom.MostVisitedInfo": { + "definition": "struct MostVisitedInfo { bool custom_links_enabled; bool enterprise_shortcuts_enabled; bool visible; array tiles;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/most_visited/most_visited.mojom;l=35" + }, + "theme_color_picker.mojom.ThemeColorPickerHandlerFactory.CreateThemeColorPickerHandler": { + "definition": "CreateThemeColorPickerHandler(pending_receiver handler, pending_remote client);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=58" + }, + "theme_color_picker.mojom.ThemeColorPickerHandler.GetChromeColors": { + "definition": "GetChromeColors(bool is_dark_mode) => (array colors);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=66" + }, + "theme_color_picker.mojom.ThemeColorPickerHandler.UpdateTheme": { + "definition": "UpdateTheme();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=69" + }, + "theme_color_picker.mojom.ThemeColorPickerHandler.SetDefaultColor": { + "definition": "SetDefaultColor();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=72" + }, + "theme_color_picker.mojom.ThemeColorPickerHandler.SetGreyDefaultColor": { + "definition": "SetGreyDefaultColor();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=75" + }, + "theme_color_picker.mojom.ThemeColorPickerHandler.SetSeedColor": { + "definition": "SetSeedColor(skia.mojom.SkColor seed_color, ui.mojom.BrowserColorVariant variant);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=78" + }, + "theme_color_picker.mojom.ThemeColorPickerHandler.SetSeedColorFromHue": { + "definition": "SetSeedColorFromHue(float hue);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=81" + }, + "theme_color_picker.mojom.ThemeColorPickerHandler.RemoveBackgroundImage": { + "definition": "RemoveBackgroundImage();", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=84" + }, + "theme_color_picker.mojom.ThemeColorPickerClient.SetTheme": { + "definition": "SetTheme(Theme theme);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=90" + }, + "theme_color_picker.mojom.Theme": { + "definition": "struct Theme { bool has_background_image; bool has_third_party_theme; skia.mojom.SkColor? background_image_main_color; bool is_dark_mode; skia.mojom.SkColor seed_color; float seed_color_hue; skia.mojom.SkColor background_color; skia.mojom.SkColor? foreground_color; skia.mojom.SkColor color_picker_icon_color; bool colors_managed_by_policy; bool is_grey_baseline; ui.mojom.BrowserColorVariant browser_color_variant; bool follow_device_theme;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=11" + }, + "theme_color_picker.mojom.ChromeColor": { + "definition": "struct ChromeColor { string name; skia.mojom.SkColor seed; skia.mojom.SkColor background; skia.mojom.SkColor foreground; skia.mojom.SkColor base; ui.mojom.BrowserColorVariant variant;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom;l=40" + }, + "browser_command.mojom.CommandHandlerFactory.CreateBrowserCommandHandler": { + "definition": "CreateBrowserCommandHandler(pending_receiver handler);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/browser_command/browser_command.mojom;l=56" + }, + "browser_command.mojom.CommandHandler.CanExecuteCommand": { + "definition": "CanExecuteCommand(Command command_id) => (bool can_execute);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/browser_command/browser_command.mojom;l=62" + }, + "browser_command.mojom.CommandHandler.ExecuteCommand": { + "definition": "ExecuteCommand(Command command_id, ClickInfo click_info) => (bool command_executed);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/browser_command/browser_command.mojom;l=66" + }, + "browser_command.mojom.ClickInfo": { + "definition": "struct ClickInfo { bool middle_button; bool alt_key; bool ctrl_key; bool meta_key; bool shift_key;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/browser_command/browser_command.mojom;l=44" + }, + "browser_command.mojom.Command": { + "definition": "enum Command { kUnknownCommand = 0, kOpenSafetyCheck = 1, kOpenSafeBrowsingEnhancedProtectionSettings = 2, kOpenFeedbackForm = 3, kOpenPrivacyGuide = 4, kStartTabGroupTutorial = 5, kOpenPasswordManager = 6, kNoOpCommand = 7, kOpenPerformanceSettings = 8, kOpenNTPAndStartCustomizeChromeTutorial = 9, kStartPasswordManagerTutorial = 10, kStartSavedTabGroupTutorial = 11, kOpenAISettings = 12, kOpenSafetyCheckFromWhatsNew = 13, kOpenPaymentsSettings = 14, kOpenGlic = 16, kOpenGlicSettings = 17, kPrewarmGlicFre = 18, kOpenSplitView = 19, kOpenAutofillSettings = 20,};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/browser_command/browser_command.mojom;l=17" + }, + "metrics_reporter.mojom.PageMetricsHost.OnPageRemoteCreated": { + "definition": "OnPageRemoteCreated( pending_remote page);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/metrics_reporter/metrics_reporter.mojom;l=12" + }, + "metrics_reporter.mojom.PageMetricsHost.OnGetMark": { + "definition": "OnGetMark(string name) => (mojo_base.mojom.TimeDelta? marked_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/metrics_reporter/metrics_reporter.mojom;l=16" + }, + "metrics_reporter.mojom.PageMetricsHost.OnClearMark": { + "definition": "OnClearMark(string name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/metrics_reporter/metrics_reporter.mojom;l=19" + }, + "metrics_reporter.mojom.PageMetricsHost.OnUmaReportTime": { + "definition": "OnUmaReportTime(string name, mojo_base.mojom.TimeDelta time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/metrics_reporter/metrics_reporter.mojom;l=22" + }, + "metrics_reporter.mojom.PageMetrics.OnGetMark": { + "definition": "OnGetMark(string name) => (mojo_base.mojom.TimeDelta? marked_time);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/metrics_reporter/metrics_reporter.mojom;l=28" + }, + "metrics_reporter.mojom.PageMetrics.OnClearMark": { + "definition": "OnClearMark(string name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/metrics_reporter/metrics_reporter.mojom;l=31" + }, + "tracked_element.mojom.TrackedElementHandler.TrackedElementVisibilityChanged": { + "definition": "TrackedElementVisibilityChanged(string native_identifier, bool visible, gfx.mojom.RectF rect);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/tracked_element/tracked_element.mojom;l=14" + }, + "tracked_element.mojom.TrackedElementHandler.TrackedElementActivated": { + "definition": "TrackedElementActivated(string native_identifier);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/tracked_element/tracked_element.mojom;l=23" + }, + "tracked_element.mojom.TrackedElementHandler.TrackedElementCustomEvent": { + "definition": "TrackedElementCustomEvent(string native_identifier, string custom_event_name);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:ui/webui/resources/js/tracked_element/tracked_element.mojom;l=32" + }, + "url.mojom.Origin": { + "definition": "struct Origin { string scheme; string host; uint16 port; mojo_base.mojom.UnguessableToken? nonce_if_opaque;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:url/mojom/origin.mojom;l=10" + }, + "url.mojom.SchemeHostPort": { + "definition": "struct SchemeHostPort { string scheme; string host; uint16 port;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:url/mojom/scheme_host_port.mojom;l=9" + }, + "url.mojom.Url": { + "definition": "struct Url { string url;};", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:url/mojom/url.mojom;l=18" + }, + "url.mojom.UrlTest.BounceUrl": { + "definition": "[Sync] BounceUrl(Url in) => (Url out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:url/mojom/url_test.mojom;l=11" + }, + "url.mojom.UrlTest.BounceOrigin": { + "definition": "[Sync] BounceOrigin(Origin in) => (Origin out);", + "link": "https://source.chromium.org/chromium/chromium/src/+/09d0e08b622603fde13600b061231d0f1e54957e:url/mojom/url_test.mojom;l=13" + }, + "mojo.interface_control.Run": { + "definition": "Run@0xFFFFFFFF(RunInput input) => (RunOutput? output)", + "link": "https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=18" + }, + "mojo.interface_control.RunOrClosePipe": { + "definition": "RunOrClosePipe@0xFFFFFFFE(RunOrClosePipeInput input)", + "link": "https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/interfaces/bindings/interface_control_messages.mojom;l=48" + } +} \ No newline at end of file diff --git a/dissectors/chromium-ipc/helpers/mojo_interfaces_map.lua b/dissectors/chromium-ipc/helpers/mojo_interfaces_map.lua new file mode 100644 index 0000000..947b134 --- /dev/null +++ b/dissectors/chromium-ipc/helpers/mojo_interfaces_map.lua @@ -0,0 +1,3914 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/helpers/mojo_interfaces_map.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- method names map for chrome.dll b853b6fcf27ea31985c557624f04ec52d5339162 + +local interfacesMap = { +["n4e60cb10"] = "ukm.mojom.UkmRecorderClientInterface.SetParameters", +["n22eb683a"] = "network.mojom.AcceptCHFrameObserver.OnAcceptCHFrameReceived", +["n35a8dc3e"] = "network.mojom.AcceptCHFrameObserver.Clone", +["n389b662d"] = "network.mojom.ChunkedDataPipeGetter.GetSize", +["n71fee509"] = "network.mojom.ChunkedDataPipeGetter.StartReading", +["n5890bdae"] = "network.mojom.DataPipeGetter.Read", +["n4f5ba1c7"] = "network.mojom.DataPipeGetter.Clone", +["n280c0bce"] = "network.mojom.DeviceBoundSessionManager.GetAllSessions", +["n6d46868c"] = "network.mojom.DeviceBoundSessionManager.DeleteSession", +["n6653da75"] = "network.mojom.DeviceBoundSessionManager.DeleteAllSessions", +["n2b80e67d"] = "network.mojom.DeviceBoundSessionManager.AddObserver", +["n4d50aba7"] = "network.mojom.DeviceBoundSessionManager.CreateBoundSession", +["nad25119"] = "network.mojom.NetworkChangeManagerClient.OnInitialConnectionType", +["n7310ae5e"] = "network.mojom.NetworkChangeManagerClient.OnNetworkChanged", +["n3b8c413f"] = "network.mojom.TrustTokenQueryAnswerer.HasTrustTokens", +["n4689dc14"] = "network.mojom.TrustTokenQueryAnswerer.HasRedemptionRecord", +["n49d8e321"] = "network.mojom.ClientCertificateResponder.ContinueWithCertificate", +["n51a401e9"] = "network.mojom.ClientCertificateResponder.ContinueWithoutCertificate", +["nbf304db"] = "network.mojom.ClientCertificateResponder.CancelRequest", +["n2e00d0bd"] = "network.mojom.SSLPrivateKey.Sign", +["n6c6686a5"] = "network.mojom.AuthChallengeResponder.OnAuthCredentials", +["n3268be65"] = "network.mojom.URLLoaderNetworkServiceObserver.OnSSLCertificateError", +["n66d5421f"] = "network.mojom.URLLoaderNetworkServiceObserver.OnCertificateRequested", +["n6c28b336"] = "network.mojom.URLLoaderNetworkServiceObserver.OnAuthRequired", +["n39db41d5"] = "network.mojom.URLLoaderNetworkServiceObserver.OnLocalNetworkAccessPermissionRequired", +["n3f67f10"] = "network.mojom.URLLoaderNetworkServiceObserver.OnClearSiteData", +["n7411bce3"] = "network.mojom.URLLoaderNetworkServiceObserver.OnLoadingStateUpdate", +["n8b2ea9f"] = "network.mojom.URLLoaderNetworkServiceObserver.OnDataUseUpdate", +["n5babe4bc"] = "network.mojom.URLLoaderNetworkServiceObserver.OnSharedStorageHeaderReceived", +["n15966d20"] = "network.mojom.URLLoaderNetworkServiceObserver.OnAdAuctionEventRecordHeaderReceived", +["n4febe9b7"] = "network.mojom.URLLoaderNetworkServiceObserver.Clone", +["n3b1e9f"] = "network.mojom.URLLoaderNetworkServiceObserver.OnWebSocketConnectedToPrivateNetwork", +["n1ee9bc29"] = "network.mojom.URLLoaderNetworkServiceObserver.OnUrlLoaderConnectedToPrivateNetwork", +["n6ccb2cf7"] = "network.mojom.RestrictedCookieManager.GetAllForUrl", +["n795dad89"] = "network.mojom.RestrictedCookieManager.SetCanonicalCookie", +["n1ff179dd"] = "network.mojom.RestrictedCookieManager.AddChangeListener", +["n9b598a9"] = "network.mojom.RestrictedCookieManager.SetCookieFromString", +["n24fa44d7"] = "network.mojom.RestrictedCookieManager.GetCookiesString", +["n72290e5"] = "network.mojom.RestrictedCookieManager.CookiesEnabledFor", +["n67cc5bf5"] = "proxy_resolver.mojom.HostResolverRequestClient.ReportResult", +["n656c5512"] = "proxy_resolver.mojom.ProxyResolver.GetProxyForUrl", +["n6379b508"] = "proxy_resolver.mojom.ProxyResolverRequestClient.ReportResult", +["n789cfd2b"] = "proxy_resolver.mojom.ProxyResolverRequestClient.Alert", +["n685040c6"] = "proxy_resolver.mojom.ProxyResolverRequestClient.OnError", +["n66ee5f30"] = "proxy_resolver.mojom.ProxyResolverRequestClient.ResolveDns", +["nc5d865c"] = "proxy_resolver.mojom.ProxyResolverFactory.CreateResolver", +["n3a22baa7"] = "proxy_resolver.mojom.ProxyResolverFactoryRequestClient.ReportResult", +["n2d691f40"] = "proxy_resolver.mojom.ProxyResolverFactoryRequestClient.Alert", +["n6f7012e3"] = "proxy_resolver.mojom.ProxyResolverFactoryRequestClient.OnError", +["n788ccbbc"] = "proxy_resolver.mojom.ProxyResolverFactoryRequestClient.ResolveDns", +["n699b4f9"] = "proxy_resolver.mojom.SystemProxyResolver.GetProxyForUrl", +["n3b7ab924"] = "cert_verifier.mojom.CertVerifierServiceUpdater.UpdateAdditionalCertificates", +["n4ef8a5cc"] = "cert_verifier.mojom.CertVerifierServiceUpdater.WaitUntilNextUpdateForTesting", +["n5d2b2adf"] = "cert_verifier.mojom.CertVerifierServiceUpdater.SetCTPolicy", +["n437c10a9"] = "network.mojom.FileEnumerator.GetNext", +["n6e0d704b"] = "network.mojom.HttpCacheBackendFileOperations.CreateDirectory", +["n61b6e9fa"] = "network.mojom.HttpCacheBackendFileOperations.PathExists", +["n591dfbe5"] = "network.mojom.HttpCacheBackendFileOperations.DirectoryExists", +["n28eff5d3"] = "network.mojom.HttpCacheBackendFileOperations.OpenFile", +["n3e78c183"] = "network.mojom.HttpCacheBackendFileOperations.DeleteFile", +["n2846305e"] = "network.mojom.HttpCacheBackendFileOperations.RenameFile", +["n2bc51a94"] = "network.mojom.HttpCacheBackendFileOperations.GetFileInfo", +["n174546db"] = "network.mojom.HttpCacheBackendFileOperations.EnumerateFiles", +["n5d43fc63"] = "network.mojom.HttpCacheBackendFileOperations.CleanupDirectory", +["n21b30f25"] = "network.mojom.HttpCacheBackendFileOperationsFactory.Create", +["n614969d4"] = "network.mojom.NetLogExporter.Start", +["n2615a48b"] = "network.mojom.NetLogExporter.Stop", +["nef7eaef"] = "network.mojom.NetLogProxySource.UpdateCaptureModes", +["n1bb8acb9"] = "network.mojom.NetLogProxySink.AddEntry", +["n1b1ca690"] = "network.mojom.CustomProxyConnectionObserver.OnFallback", +["n19c6e57"] = "network.mojom.CustomProxyConnectionObserver.OnTunnelHeadersReceived", +["n7c43034f"] = "network.mojom.CustomProxyConfigClient.OnCustomProxyConfigUpdated", +["n5778bd44"] = "network.mojom.TrustedHeaderClient.OnBeforeSendHeaders", +["n2622482e"] = "network.mojom.TrustedHeaderClient.OnHeadersReceived", +["n5652c814"] = "network.mojom.TrustedURLLoaderHeaderClient.OnLoaderCreated", +["n64d762a0"] = "network.mojom.TrustedURLLoaderHeaderClient.OnLoaderForCorsPreflightCreated", +["n7eece1b9"] = "network.mojom.NetworkQualityEstimatorManagerClient.OnNetworkQualityChanged", +["n2157940a"] = "network.mojom.NetworkQualityEstimatorManager.RequestNotifications", +["n1a5eba39"] = "network.mojom.ObliviousHttpClient.OnCompleted", +["n36e61f23"] = "network.mojom.ProxyLookupClient.OnProxyLookupComplete", +["n409ec00c"] = "network.mojom.ProxyResolvingSocket.UpgradeToTLS", +["n47cbe9c0"] = "network.mojom.ProxyResolvingSocketFactory.CreateProxyResolvingSocket", +["n5a9e17e7"] = "network.mojom.ReportingApiObserver.OnReportAdded", +["n7dac0e0f"] = "network.mojom.ReportingApiObserver.OnReportUpdated", +["n5ff252aa"] = "network.mojom.ReportingApiObserver.OnEndpointsUpdatedForOrigin", +["n116b940d"] = "network.mojom.RestrictedUDPSocket.JoinGroup", +["n5f7bbdf6"] = "network.mojom.RestrictedUDPSocket.LeaveGroup", +["n5dd6aa12"] = "network.mojom.RestrictedUDPSocket.ReceiveMore", +["n5620fc79"] = "network.mojom.RestrictedUDPSocket.Send", +["n1e58bab4"] = "network.mojom.RestrictedUDPSocket.SendTo", +["n77608908"] = "network.mojom.SSLConfigClient.OnSSLConfigUpdated", +["n1897d84a"] = "network.mojom.SystemDnsResolver.Resolve", +["n1ab1b106"] = "network.mojom.TCPBoundSocket.Listen", +["nb8ab63b"] = "network.mojom.TCPBoundSocket.Connect", +["n41319a94"] = "network.mojom.TCPConnectedSocket.UpgradeToTLS", +["n6220fa93"] = "network.mojom.TCPConnectedSocket.SetSendBufferSize", +["n35be8055"] = "network.mojom.TCPConnectedSocket.SetReceiveBufferSize", +["n606eef40"] = "network.mojom.TCPConnectedSocket.SetNoDelay", +["n1fda71e1"] = "network.mojom.TCPConnectedSocket.SetKeepAlive", +["n4ee64027"] = "network.mojom.TCPServerSocket.Accept", +["n7681327b"] = "network.mojom.UDPSocket.Bind", +["n39f2e231"] = "network.mojom.UDPSocket.Connect", +["n33e4fa96"] = "network.mojom.UDPSocket.SetBroadcast", +["n4a20b7b9"] = "network.mojom.UDPSocket.SetSendBufferSize", +["n6265538c"] = "network.mojom.UDPSocket.SetReceiveBufferSize", +["n36dc40ca"] = "network.mojom.UDPSocket.JoinGroup", +["n5dda8395"] = "network.mojom.UDPSocket.LeaveGroup", +["n6bae4a0a"] = "network.mojom.UDPSocket.ReceiveMore", +["n6659c9ab"] = "network.mojom.UDPSocket.ReceiveMoreWithBufferSize", +["n1e2049b1"] = "network.mojom.UDPSocket.SendTo", +["n500bc78e"] = "network.mojom.UDPSocket.Send", +["n4b21e1d9"] = "network.mojom.UDPSocket.Close", +["n155f52df"] = "network.mojom.UDPSocketListener.OnReceived", +["n3f497f3b"] = "network.mojom.P2PSocket.Send", +["n145d4b9d"] = "network.mojom.P2PSocket.SendBatch", +["n55db8003"] = "network.mojom.P2PSocket.SetOption", +["n4723af24"] = "network.mojom.P2PTrustedSocketManagerClient.InvalidSocketPortRangeRequested", +["n47d55bf8"] = "network.mojom.P2PTrustedSocketManagerClient.DumpPacket", +["n5b5cbe89"] = "network.mojom.P2PTrustedSocketManager.StartRtpDump", +["n6303a695"] = "network.mojom.P2PTrustedSocketManager.StopRtpDump", +["n2e66c2c1"] = "network.mojom.P2PTrustedSocketManager.PauseNetworkChangeNotifications", +["n1b208253"] = "network.mojom.P2PTrustedSocketManager.ResumeNetworkChangeNotifications", +["n3acae77e"] = "network.mojom.ResolveHostHandle.Cancel", +["n426aab9"] = "network.mojom.ResolveHostClient.OnComplete", +["n181fdc81"] = "network.mojom.ResolveHostClient.OnTextResults", +["n4e814d03"] = "network.mojom.ResolveHostClient.OnHostnameResults", +["n4223948a"] = "network.mojom.WebSocketAuthenticationHandler.OnAuthRequired", +["n5c99b8da"] = "network.mojom.WebSocketHandshakeClient.OnOpeningHandshakeStarted", +["n21214dc2"] = "network.mojom.WebSocketHandshakeClient.OnFailure", +["n6bd2e275"] = "network.mojom.WebSocketHandshakeClient.OnConnectionEstablished", +["n1d97f9ab"] = "network.mojom.WebSocketClient.OnDataFrame", +["ne1bdb41"] = "network.mojom.WebSocketClient.OnDropChannel", +["n3cd14d39"] = "network.mojom.WebSocketClient.OnClosingHandshake", +["n3887396"] = "network.mojom.WebSocket.SendMessage", +["n34822cc1"] = "network.mojom.WebSocket.StartReceiving", +["n2bd74a7e"] = "network.mojom.WebSocket.StartClosingHandshake", +["n6e000e9a"] = "ip_protection.mojom.CoreControl.AuthTokensMayBeAvailable", +["n36122f96"] = "ip_protection.mojom.CoreControl.SetIpProtectionEnabled", +["n20652bb0"] = "ip_protection.mojom.CoreControl.BindTestInterfaceForTesting", +["n61133bbc"] = "ip_protection.mojom.CoreHost.TryGetAuthTokens", +["n692d3a8b"] = "ip_protection.mojom.CoreHost.GetProxyConfig", +["n64850d45"] = "ip_protection.mojom.CoreHost.TryGetProbabilisticRevealTokens", +["nde3e176"] = "ip_protection.mojom.CoreHost.RecycleTokens", +["n4c145e5d"] = "gfx.mojom.DelegatedInkPointRenderer.StoreDelegatedInkPoint", +["n16b4ed2b"] = "gfx.mojom.DelegatedInkPointRenderer.ResetPrediction", +["n5e05db28"] = "media.mojom.AudioDecoderClient.OnBufferDecoded", +["n50bcf8e3"] = "media.mojom.AudioDecoderClient.OnWaiting", +["n618164c3"] = "media.mojom.AudioEncoder.Initialize", +["n8605c76"] = "media.mojom.AudioEncoder.Encode", +["n6843b1a1"] = "media.mojom.AudioEncoder.Flush", +["n2bec9bb9"] = "media.mojom.AudioEncoderClient.OnEncodedBufferReady", +["n392b667c"] = "media.mojom.AudioInputStream.Record", +["n69cc4282"] = "media.mojom.AudioInputStream.SetVolume", +["n2a633e60"] = "media.mojom.AudioInputStreamClient.OnError", +["n48f9c2d4"] = "media.mojom.AudioInputStreamClient.OnMutedStateChanged", +["n3d4300d3"] = "media.mojom.AudioInputStreamObserver.DidStartRecording", +["n3cccbf28"] = "media.mojom.AudioLogFactory.CreateAudioLog", +["n34913cb1"] = "media.mojom.AudioOutputStreamProviderClient.Created", +["n4f94b34e"] = "media.mojom.AudioStreamFactory.CreateInputStream", +["n7a1287f9"] = "media.mojom.AudioStreamFactory.AssociateInputAndOutputForAec", +["n1a08f0db"] = "media.mojom.AudioStreamFactory.CreateOutputStream", +["n41d893c4"] = "media.mojom.AudioStreamFactory.CreateSwitchableOutputStream", +["n281eeeee"] = "media.mojom.AudioStreamFactory.BindMuter", +["n141c5eff"] = "media.mojom.AudioStreamFactory.CreateLoopbackStream", +["n58866e46"] = "media.mojom.CdmDocumentService.ChallengePlatform", +["n1079646e"] = "media.mojom.CdmDocumentService.GetStorageId", +["n69468cc4"] = "media.mojom.CdmDocumentService.GetMediaFoundationCdmData", +["n69a45a33"] = "media.mojom.CdmDocumentService.SetCdmClientToken", +["n768d234e"] = "media.mojom.CdmDocumentService.OnCdmEvent", +["n4e4452b3"] = "media.mojom.CdmService.CreateCdmFactory", +["n5d88f09"] = "media.mojom.CdmServiceBroker.GetService", +["n1233d730"] = "media.mojom.CdmStorage.Open", +["n1812b5d"] = "media.mojom.CdmFile.Read", +["n22e45bf5"] = "media.mojom.CdmFile.Write", +["n515338f2"] = "media.mojom.ContentDecryptionModule.SetClient", +["n1fa01e64"] = "media.mojom.ContentDecryptionModule.SetServerCertificate", +["n39c8ded"] = "media.mojom.ContentDecryptionModule.GetStatusForPolicy", +["ne299f76"] = "media.mojom.ContentDecryptionModule.CreateSessionAndGenerateRequest", +["n65fcc52f"] = "media.mojom.ContentDecryptionModule.LoadSession", +["n4bc1aa8d"] = "media.mojom.ContentDecryptionModule.UpdateSession", +["n38e5153c"] = "media.mojom.ContentDecryptionModule.CloseSession", +["n45cc9588"] = "media.mojom.ContentDecryptionModule.RemoveSession", +["n3a378898"] = "media.mojom.ContentDecryptionModuleClient.OnSessionMessage", +["n7bb6d758"] = "media.mojom.ContentDecryptionModuleClient.OnSessionClosed", +["n7283c6ac"] = "media.mojom.ContentDecryptionModuleClient.OnSessionKeysChange", +["n6b00b174"] = "media.mojom.ContentDecryptionModuleClient.OnSessionExpirationUpdate", +["n57786339"] = "media.mojom.CdmFactory.CreateCdm", +["n3b58cdcf"] = "media.mojom.Decryptor.Initialize", +["n18c6a520"] = "media.mojom.Decryptor.Decrypt", +["n1b227483"] = "media.mojom.Decryptor.CancelDecrypt", +["n17d6464c"] = "media.mojom.Decryptor.InitializeAudioDecoder", +["n585ae08f"] = "media.mojom.Decryptor.InitializeVideoDecoder", +["n16ba0b4a"] = "media.mojom.Decryptor.DecryptAndDecodeAudio", +["nb692d3a"] = "media.mojom.Decryptor.DecryptAndDecodeVideo", +["n7ea95973"] = "media.mojom.Decryptor.ResetDecoder", +["n9f39054"] = "media.mojom.Decryptor.DeinitializeDecoder", +["n28b6f233"] = "media.mojom.DemuxerStream.Initialize", +["n14528388"] = "media.mojom.DemuxerStream.Read", +["nf56910f"] = "media.mojom.DemuxerStream.EnableBitstreamConverter", +["n4e4e287e"] = "media.mojom.MuteStateObserver.OnMuteStateChange", +["n7af0ff12"] = "media.mojom.FrameInterfaceFactory.CreateProvisionFetcher", +["n5dfad9f0"] = "media.mojom.FrameInterfaceFactory.CreateCdmStorage", +["n70cd451a"] = "media.mojom.FrameInterfaceFactory.RegisterMuteStateObserver", +["n609aa63a"] = "media.mojom.FrameInterfaceFactory.CreateDCOMPSurfaceRegistry", +["n3e65feb2"] = "media.mojom.FrameInterfaceFactory.GetCdmOrigin", +["n2820330c"] = "media.mojom.FrameInterfaceFactory.BindEmbedderReceiver", +["n64727650"] = "media.mojom.KeySystemSupportObserver.OnKeySystemSupportUpdated", +["n490c4e96"] = "media.mojom.KeySystemSupport.SetObserver", +["n69e3c45c"] = "media.mojom.OutputProtection.QueryStatus", +["n16cb1817"] = "media.mojom.OutputProtection.EnableProtection", +["n47efc3ea"] = "media.mojom.Renderer.Initialize", +["n4298f758"] = "media.mojom.Renderer.Flush", +["nead4cf0"] = "media.mojom.Renderer.StartPlayingFrom", +["n2d512a82"] = "media.mojom.Renderer.SetPlaybackRate", +["n20e168a7"] = "media.mojom.Renderer.SetVolume", +["n53db8d7b"] = "media.mojom.Renderer.SetCdm", +["n667a0b27"] = "media.mojom.Renderer.SetLatencyHint", +["n5a669cc"] = "media.mojom.RendererClient.OnTimeUpdate", +["n1af069c7"] = "media.mojom.RendererClient.OnBufferingStateChange", +["n78528e30"] = "media.mojom.RendererClient.OnEnded", +["n39047c71"] = "media.mojom.RendererClient.OnError", +["n3941a972"] = "media.mojom.RendererClient.OnAudioConfigChange", +["n459252f5"] = "media.mojom.RendererClient.OnVideoConfigChange", +["ncf7ef0f"] = "media.mojom.RendererClient.OnVideoNaturalSizeChange", +["n1ed24f64"] = "media.mojom.RendererClient.OnVideoOpacityChange", +["n192cf3ed"] = "media.mojom.RendererClient.OnStatisticsUpdate", +["n32cc211a"] = "media.mojom.RendererClient.OnWaiting", +["ne237bae"] = "media.mojom.MediaFoundationRendererExtension.GetDCOMPSurface", +["n2dba6cbd"] = "media.mojom.MediaFoundationRendererExtension.SetVideoStreamEnabled", +["n262c5776"] = "media.mojom.MediaFoundationRendererExtension.SetOutputRect", +["n4f19754"] = "media.mojom.MediaFoundationRendererNotifier.MediaFoundationRendererCreated", +["n50dc234e"] = "media.mojom.WatchTimeRecorder.RecordWatchTime", +["n1ae4617"] = "media.mojom.WatchTimeRecorder.FinalizeWatchTime", +["n4a498f6b"] = "media.mojom.WatchTimeRecorder.OnError", +["n4c1e794a"] = "media.mojom.WatchTimeRecorder.UpdateSecondaryProperties", +["n18d2e685"] = "media.mojom.WatchTimeRecorder.SetAutoplayInitiated", +["n27d3c290"] = "media.mojom.WatchTimeRecorder.OnDurationChanged", +["n24b1801d"] = "media.mojom.WatchTimeRecorder.UpdateVideoDecodeStats", +["n905ffff"] = "media.mojom.WatchTimeRecorder.UpdateUnderflowCount", +["n2ebe6ab3"] = "media.mojom.WatchTimeRecorder.UpdateUnderflowDuration", +["n775f24d9"] = "media.mojom.WebrtcVideoPerfRecorder.UpdateRecord", +["n2f91d464"] = "media.mojom.AudioSourceFetcher.Start", +["n5d742626"] = "media.mojom.AudioSourceFetcher.Stop", +["n6f275988"] = "media.mojom.DCOMPSurfaceRegistry.RegisterDCOMPSurfaceHandle", +["n5a9b0865"] = "media.mojom.DCOMPSurfaceRegistry.UnregisterDCOMPSurfaceHandle", +["n666ac8f3"] = "media.mojom.MediaFoundationPreferences.IsHardwareSecureDecryptionAllowed", +["n57fda94d"] = "media.mojom.GpuInfoObserver.OnGpuInfoUpdate", +["n73a196b1"] = "media.mojom.MediaFoundationService.IsKeySystemSupported", +["n76d3efe"] = "media.mojom.MediaFoundationService.CreateInterfaceFactory", +["n14b36516"] = "media.mojom.MediaFoundationServiceBroker.UpdateGpuInfo", +["n7f70d7b3"] = "media.mojom.MediaFoundationServiceBroker.GetService", +["n7f366b23"] = "gpu.mojom.CommandBuffer.SetGetBuffer", +["n5c5664f"] = "gpu.mojom.CommandBuffer.RegisterTransferBuffer", +["n3c77a2f6"] = "gpu.mojom.CommandBuffer.CreateGpuFenceFromHandle", +["n76413992"] = "gpu.mojom.CommandBuffer.GetGpuFenceHandle", +["n4ed5d825"] = "gpu.mojom.CommandBuffer.SignalSyncToken", +["n8a73c7c"] = "gpu.mojom.CommandBuffer.SignalQuery", +["n22cf11e8"] = "gpu.mojom.CommandBufferClient.OnConsoleMessage", +["n5125d761"] = "gpu.mojom.CommandBufferClient.OnGpuSwitched", +["n7487cf60"] = "gpu.mojom.CommandBufferClient.OnDestroyed", +["n60438f80"] = "gpu.mojom.CommandBufferClient.OnReturnData", +["n2ab3b26e"] = "gpu.mojom.CommandBufferClient.OnSignalAck", +["n4164b06d"] = "gpu.mojom.DCOMPTexture.StartListening", +["n3173d52d"] = "gpu.mojom.DCOMPTexture.SetTextureSize", +["n5395eaf5"] = "gpu.mojom.DCOMPTexture.SetDCOMPSurfaceHandle", +["n56b549c1"] = "gpu.mojom.DCOMPTextureClient.OnSharedImageMailboxBound", +["n63569aff"] = "gpu.mojom.DCOMPTextureClient.OnOutputRectChange", +["n49d47833"] = "gpu.mojom.SharedImagePoolClientInterface.OnClearPool", +["n6be212c6"] = "media.mojom.MediaLog.AddLogRecord", +["n24b35406"] = "media.mojom.VideoEncodeAcceleratorProvider.CreateVideoEncodeAccelerator", +["n74483a25"] = "media.mojom.VideoEncodeAcceleratorProvider.GetVideoEncodeAcceleratorSupportedProfiles", +["n5ec65d4"] = "media.mojom.VideoEncodeAccelerator.Initialize", +["n3053297d"] = "media.mojom.VideoEncodeAccelerator.Encode", +["n6bd9d3c"] = "media.mojom.VideoEncodeAccelerator.UseOutputBitstreamBuffer", +["n3410ce30"] = "media.mojom.VideoEncodeAccelerator.RequestEncodingParametersChangeWithLayers", +["n5449391"] = "media.mojom.VideoEncodeAccelerator.RequestEncodingParametersChangeWithBitrate", +["n43f90bdc"] = "media.mojom.VideoEncodeAccelerator.IsFlushSupported", +["n759dc267"] = "media.mojom.VideoEncodeAccelerator.Flush", +["n77ab605e"] = "media.mojom.VideoEncodeAcceleratorClient.RequireBitstreamBuffers", +["n4e5cf7a7"] = "media.mojom.VideoEncodeAcceleratorClient.BitstreamBufferReady", +["n193969f6"] = "media.mojom.VideoEncodeAcceleratorClient.NotifyErrorStatus", +["n73896585"] = "media.mojom.VideoEncodeAcceleratorClient.NotifyEncoderInfoChange", +["n7cde0244"] = "media.mojom.VideoEncoderMetricsProvider.Initialize", +["n657bb456"] = "media.mojom.VideoEncoderMetricsProvider.SetEncodedFrameCount", +["n6587bc26"] = "media.mojom.VideoEncoderMetricsProvider.SetError", +["n1383691d"] = "media.mojom.VideoEncoderMetricsProvider.Complete", +["nb9c26cc"] = "metrics.mojom.CallStackProfileCollector.Collect", +["n79de5109"] = "media.mojom.VideoCaptureObserver.OnStateChanged", +["n25f93eb9"] = "media.mojom.VideoCaptureObserver.OnNewBuffer", +["n6e8a82fa"] = "media.mojom.VideoCaptureObserver.OnBufferReady", +["n2ce8a72d"] = "media.mojom.VideoCaptureObserver.OnBufferDestroyed", +["n3828dcca"] = "media.mojom.VideoCaptureObserver.OnFrameDropped", +["n746dca95"] = "media.mojom.VideoCaptureObserver.OnNewCaptureVersion", +["n44e97ae2"] = "media.mojom.VideoCaptureHost.Start", +["n1d80d771"] = "media.mojom.VideoCaptureHost.Stop", +["n3e2f2557"] = "media.mojom.VideoCaptureHost.Pause", +["n28aba650"] = "media.mojom.VideoCaptureHost.Resume", +["n2dc683a6"] = "media.mojom.VideoCaptureHost.RequestRefreshFrame", +["n611236a9"] = "media.mojom.VideoCaptureHost.ReleaseBuffer", +["n7a39c89"] = "media.mojom.VideoCaptureHost.GetDeviceSupportedFormats", +["n306cb42e"] = "media.mojom.VideoCaptureHost.GetDeviceFormatsInUse", +["n51a8d75"] = "media.mojom.VideoCaptureHost.OnLog", +["n454c0554"] = "video_capture.mojom.DevicesChangedObserver.OnDevicesChanged", +["n45f4d89d"] = "video_capture.mojom.Producer.OnNewBuffer", +["n7ce04030"] = "video_capture.mojom.Producer.OnBufferRetired", +["n316bbd04"] = "video_capture.mojom.VideoFrameAccessHandler.OnFinishedConsumingBuffer", +["n364e5823"] = "video_capture.mojom.VideoFrameHandler.OnCaptureConfigurationChanged", +["n1f8cdcee"] = "video_capture.mojom.VideoFrameHandler.OnNewBuffer", +["n1b497c17"] = "video_capture.mojom.VideoFrameHandler.OnFrameAccessHandlerReady", +["n6fde2c54"] = "video_capture.mojom.VideoFrameHandler.OnFrameReadyInBuffer", +["n78db81e7"] = "video_capture.mojom.VideoFrameHandler.OnBufferRetired", +["nb1d22ad"] = "video_capture.mojom.VideoFrameHandler.OnError", +["n38654302"] = "video_capture.mojom.VideoFrameHandler.OnFrameDropped", +["n5c1ff090"] = "video_capture.mojom.VideoFrameHandler.OnNewCaptureVersion", +["n292e0cd5"] = "video_capture.mojom.VideoFrameHandler.OnFrameWithEmptyRegionCapture", +["n10f59f21"] = "video_capture.mojom.VideoFrameHandler.OnLog", +["n600247e3"] = "video_capture.mojom.VideoFrameHandler.OnStarted", +["n2ad4752e"] = "video_capture.mojom.VideoFrameHandler.OnStartedUsingGpuDecode", +["n2b195c75"] = "video_capture.mojom.VideoFrameHandler.OnStopped", +["n624e10f5"] = "video_capture.mojom.PushVideoStreamSubscription.Activate", +["n45cb3ca9"] = "video_capture.mojom.PushVideoStreamSubscription.Suspend", +["n735b530"] = "video_capture.mojom.PushVideoStreamSubscription.Resume", +["n1950a4b2"] = "video_capture.mojom.PushVideoStreamSubscription.GetPhotoState", +["n797c8b7e"] = "video_capture.mojom.PushVideoStreamSubscription.SetPhotoOptions", +["n5343fe4a"] = "video_capture.mojom.PushVideoStreamSubscription.TakePhoto", +["n46660de9"] = "video_capture.mojom.PushVideoStreamSubscription.Close", +["n2caa58d1"] = "video_capture.mojom.PushVideoStreamSubscription.ProcessFeedback", +["n2a026557"] = "video_capture.mojom.VideoSource.CreatePushSubscription", +["n49ca7949"] = "video_capture.mojom.VideoSourceProvider.GetSourceInfos", +["n378137b7"] = "video_capture.mojom.VideoSourceProvider.GetVideoSource", +["n60aa9d2d"] = "video_capture.mojom.VideoSourceProvider.AddSharedMemoryVirtualDevice", +["n24707635"] = "video_capture.mojom.VideoSourceProvider.AddTextureVirtualDevice", +["n37db1cc8"] = "video_capture.mojom.VideoSourceProvider.RegisterVirtualDevicesChangedObserver", +["n143b90b2"] = "video_capture.mojom.VideoSourceProvider.RegisterDevicesChangedObserver", +["n68a841dc"] = "video_capture.mojom.VideoSourceProvider.Close", +["nd3155ec"] = "video_capture.mojom.SharedMemoryVirtualDevice.RequestFrameBuffer", +["n4570a0c0"] = "video_capture.mojom.SharedMemoryVirtualDevice.OnFrameReadyInBuffer", +["n36abdc1"] = "video_capture.mojom.TextureVirtualDevice.OnNewSharedImageBufferHandle", +["n24a0241e"] = "video_capture.mojom.TextureVirtualDevice.OnFrameAccessHandlerReady", +["n51746a28"] = "video_capture.mojom.TextureVirtualDevice.OnFrameReadyInBuffer", +["n2a1f880"] = "video_capture.mojom.TextureVirtualDevice.OnBufferRetired", +["n108957d6"] = "video_capture.mojom.GpuMemoryBufferVirtualDevice.OnNewGpuMemoryBufferHandle", +["n122ba32e"] = "video_capture.mojom.GpuMemoryBufferVirtualDevice.OnFrameAccessHandlerReady", +["n6016b535"] = "video_capture.mojom.GpuMemoryBufferVirtualDevice.OnFrameReadyInBuffer", +["n471a84d"] = "video_capture.mojom.GpuMemoryBufferVirtualDevice.OnBufferRetired", +["n33e9666b"] = "blink.mojom.IDBFactory.GetDatabaseInfo", +["n4a697611"] = "blink.mojom.IDBFactory.Open", +["n1ca02b34"] = "blink.mojom.IDBFactory.DeleteDatabase", +["n1527cc72"] = "blink.mojom.StorageAccessHandle.BindIndexedDB", +["n43a56188"] = "blink.mojom.StorageAccessHandle.BindLocks", +["n44299562"] = "blink.mojom.StorageAccessHandle.BindCaches", +["n2686b42d"] = "blink.mojom.StorageAccessHandle.GetDirectory", +["n475b2862"] = "blink.mojom.StorageAccessHandle.Estimate", +["n3b497f03"] = "blink.mojom.StorageAccessHandle.BindBlobStorage", +["n1abf3a1e"] = "blink.mojom.StorageAccessHandle.BindBroadcastChannel", +["n3673284d"] = "blink.mojom.StorageAccessHandle.BindSharedWorker", +["n68aa6b06"] = "device.mojom.BatteryMonitor.QueryNextStatus", +["n77ed9261"] = "device.mojom.Geolocation.SetHighAccuracyHint", +["n44979114"] = "device.mojom.Geolocation.QueryNextPosition", +["n2a2e9dee"] = "device.mojom.GeolocationContext.BindGeolocation", +["na920299"] = "device.mojom.GeolocationContext.OnPermissionUpdated", +["n49263ded"] = "device.mojom.GeolocationContext.SetOverride", +["n2abdbc1"] = "device.mojom.GeolocationContext.ClearOverride", +["n5fd2f715"] = "device.mojom.GeolocationControl.UserDidOptIntoLocationServices", +["n6a3dfca6"] = "device.mojom.PressureManager.AddVirtualPressureSource", +["n65cb7503"] = "device.mojom.PressureManager.RemoveVirtualPressureSource", +["n12426b84"] = "device.mojom.PressureManager.UpdateVirtualPressureSourceData", +["n59549d95"] = "device.mojom.PressureManager.AddClient", +["ncbe1538"] = "device.mojom.PressureClient.OnPressureUpdated", +["n61edd55b"] = "device.mojom.PublicIpAddressGeolocationProvider.CreateGeolocation", +["n6f88ed9c"] = "device.mojom.ScreenOrientation.LockOrientation", +["n7168dbcb"] = "device.mojom.ScreenOrientation.UnlockOrientation", +["n3c5f042d"] = "device.mojom.SerialPortManager.SetClient", +["n61ca20e5"] = "device.mojom.SerialPortManager.GetDevices", +["n7ac887f2"] = "device.mojom.SerialPortManager.OpenPort", +["n44b108f7"] = "device.mojom.SerialPortManagerClient.OnPortAdded", +["n5fc23a01"] = "device.mojom.SerialPortManagerClient.OnPortRemoved", +["n1d30664"] = "device.mojom.SerialPortManagerClient.OnPortConnectedStateChanged", +["n7423f3ef"] = "device.mojom.SerialPort.StartWriting", +["n67570312"] = "device.mojom.SerialPort.StartReading", +["n23b189de"] = "device.mojom.SerialPort.Flush", +["n24717cba"] = "device.mojom.SerialPort.Drain", +["n6b1467b5"] = "device.mojom.SerialPort.GetControlSignals", +["n127ac89d"] = "device.mojom.SerialPort.SetControlSignals", +["n3402c34a"] = "device.mojom.SerialPort.ConfigurePort", +["n73300505"] = "device.mojom.SerialPort.GetPortInfo", +["n7d60d3f6"] = "device.mojom.SerialPort.Close", +["n4f879705"] = "device.mojom.SerialPortClient.OnReadError", +["n7b11ae17"] = "device.mojom.SerialPortClient.OnSendError", +["nab71ff4"] = "device.mojom.WakeLockContext.GetWakeLock", +["n62b7ecf4"] = "device.mojom.WakeLockProvider.GetWakeLockContextForID", +["n5f4ff7fe"] = "device.mojom.WakeLockProvider.GetWakeLockWithoutContext", +["n52fa926f"] = "device.mojom.WakeLockProvider.NotifyOnWakeLockDeactivation", +["n258ace19"] = "device.mojom.WakeLockProvider.GetActiveWakeLocksForTests", +["ne7deb4a"] = "web_package.mojom.BundleDataSource.Read", +["n6c0811b7"] = "web_package.mojom.BundleDataSource.Length", +["n6b2c3295"] = "web_package.mojom.BundleDataSource.IsRandomAccessContext", +["n6f1786f1"] = "web_package.mojom.BundleDataSource.Close", +["n74479322"] = "device.mojom.GeolocationInternals.AddInternalsObserver", +["n1f3603be"] = "blink.mojom.BackForwardCacheControllerHost.EvictFromBackForwardCache", +["n363be759"] = "blink.mojom.BackForwardCacheControllerHost.DidChangeBackForwardCacheDisablingFeatures", +["n75e282ec"] = "blink.mojom.LocalFrameHost.EnterFullscreen", +["n711015e5"] = "blink.mojom.LocalFrameHost.ExitFullscreen", +["n5afd32d"] = "blink.mojom.LocalFrameHost.FullscreenStateChanged", +["n6628b6ce"] = "blink.mojom.LocalFrameHost.RegisterProtocolHandler", +["n578097be"] = "blink.mojom.LocalFrameHost.UnregisterProtocolHandler", +["n60deddbb"] = "blink.mojom.LocalFrameHost.DidDisplayInsecureContent", +["n4bd74b22"] = "blink.mojom.LocalFrameHost.DidContainInsecureFormAction", +["n6545639d"] = "blink.mojom.LocalFrameHost.MainDocumentElementAvailable", +["n786ebca2"] = "blink.mojom.LocalFrameHost.SetNeedsOcclusionTracking", +["n51941379"] = "blink.mojom.LocalFrameHost.SetVirtualKeyboardMode", +["nccd3b36"] = "blink.mojom.LocalFrameHost.VisibilityChanged", +["n4e7d9fbd"] = "blink.mojom.LocalFrameHost.DidChangeThemeColor", +["n6b0d4d33"] = "blink.mojom.LocalFrameHost.DidChangeBackgroundColor", +["n46839cd4"] = "blink.mojom.LocalFrameHost.DidFailLoadWithError", +["n1b54e492"] = "blink.mojom.LocalFrameHost.DidFocusFrame", +["n2bb3d462"] = "blink.mojom.LocalFrameHost.DidCallFocus", +["n2998185c"] = "blink.mojom.LocalFrameHost.EnforceInsecureRequestPolicy", +["n1a6e1edb"] = "blink.mojom.LocalFrameHost.EnforceInsecureNavigationsSet", +["n3671b825"] = "blink.mojom.LocalFrameHost.SuddenTerminationDisablerChanged", +["n7f3552e6"] = "blink.mojom.LocalFrameHost.HadStickyUserActivationBeforeNavigationChanged", +["n2cbccbf0"] = "blink.mojom.LocalFrameHost.ScrollRectToVisibleInParentFrame", +["n696ebfb9"] = "blink.mojom.LocalFrameHost.BubbleLogicalScrollInParentFrame", +["n688bc2e9"] = "blink.mojom.LocalFrameHost.StartLoadingForAsyncNavigationApiCommit", +["n6e3593a0"] = "blink.mojom.LocalFrameHost.DidBlockNavigation", +["n620857ad"] = "blink.mojom.LocalFrameHost.DidChangeLoadProgress", +["nf17f5c9"] = "blink.mojom.LocalFrameHost.DidFinishLoad", +["n5a43b814"] = "blink.mojom.LocalFrameHost.DispatchLoad", +["n24013274"] = "blink.mojom.LocalFrameHost.GoToEntryAtOffset", +["n3c017eff"] = "blink.mojom.LocalFrameHost.NavigateToNavigationApiKey", +["n405aca2b"] = "blink.mojom.LocalFrameHost.NavigateEventHandlerPresenceChanged", +["nb7a63d4"] = "blink.mojom.LocalFrameHost.UpdateTitle", +["n1277df3e"] = "blink.mojom.LocalFrameHost.UpdateApplicationTitle", +["n197bbd72"] = "blink.mojom.LocalFrameHost.UpdateUserActivationState", +["n6ba3fc1a"] = "blink.mojom.LocalFrameHost.DidConsumeHistoryUserActivation", +["n15b52432"] = "blink.mojom.LocalFrameHost.HandleAccessibilityFindInPageResult", +["n6fec0467"] = "blink.mojom.LocalFrameHost.HandleAccessibilityFindInPageTermination", +["n4d9dda08"] = "blink.mojom.LocalFrameHost.DocumentOnLoadCompleted", +["n180176ac"] = "blink.mojom.LocalFrameHost.ForwardResourceTimingToParent", +["n73a5769b"] = "blink.mojom.LocalFrameHost.DidDispatchDOMContentLoadedEvent", +["n14b0621c"] = "blink.mojom.LocalFrameHost.RunModalAlertDialog", +["n1d5cb2b"] = "blink.mojom.LocalFrameHost.RunModalConfirmDialog", +["n249a3c36"] = "blink.mojom.LocalFrameHost.RunModalPromptDialog", +["n3ca93a37"] = "blink.mojom.LocalFrameHost.RunBeforeUnloadConfirm", +["n11f89e9d"] = "blink.mojom.LocalFrameHost.UpdateFaviconURL", +["n755279d1"] = "blink.mojom.LocalFrameHost.DownloadURL", +["n63ff7b6d"] = "blink.mojom.LocalFrameHost.FocusedElementChanged", +["nb5c2dd3"] = "blink.mojom.LocalFrameHost.TextSelectionChanged", +["n4c15af2b"] = "blink.mojom.LocalFrameHost.ShowPopupMenu", +["n38e5f857"] = "blink.mojom.LocalFrameHost.CreateNewPopupWidget", +["n4eeab4e9"] = "blink.mojom.LocalFrameHost.ShowContextMenu", +["n4d3953d"] = "blink.mojom.LocalFrameHost.DidLoadResourceFromMemoryCache", +["n118cadd5"] = "blink.mojom.LocalFrameHost.DidChangeFrameOwnerProperties", +["n5f912a13"] = "blink.mojom.LocalFrameHost.DidChangeOpener", +["n539fef07"] = "blink.mojom.LocalFrameHost.DidChangeFramePolicy", +["n5920d84c"] = "blink.mojom.LocalFrameHost.DidChangeIframeAttributes", +["nb5c889"] = "blink.mojom.LocalFrameHost.CapturePaintPreviewOfSubframe", +["n6a8b5b8"] = "blink.mojom.LocalFrameHost.SetCloseListener", +["n3df1f87b"] = "blink.mojom.LocalFrameHost.Detach", +["n7cad5b6e"] = "blink.mojom.LocalFrameHost.GetKeepAliveHandleFactory", +["n6e549d34"] = "blink.mojom.LocalFrameHost.DidAddMessageToConsole", +["n64c6c618"] = "blink.mojom.LocalFrameHost.FrameSizeChanged", +["n25f96789"] = "blink.mojom.LocalFrameHost.DidInferColorScheme", +["nd90e8d3"] = "blink.mojom.LocalFrameHost.DidChangeSrcDoc", +["n144649c3"] = "blink.mojom.LocalFrameHost.ReceivedDelegatedCapability", +["n33e43d6e"] = "blink.mojom.LocalFrameHost.SendFencedFrameReportingBeacon", +["naa3e835"] = "blink.mojom.LocalFrameHost.SendFencedFrameReportingBeaconToCustomURL", +["n5c5b1fcd"] = "blink.mojom.LocalFrameHost.DisableUntrustedNetworkInFencedFrame", +["n1876811c"] = "blink.mojom.LocalFrameHost.ExemptUrlFromNetworkRevocationForTesting", +["n4ee1f492"] = "blink.mojom.LocalFrameHost.SendLegacyTechEvent", +["n5da42ddf"] = "blink.mojom.LocalFrameHost.SetFencedFrameAutomaticBeaconReportEventData", +["n52f8295e"] = "blink.mojom.LocalFrameHost.SendPrivateAggregationRequestsForFencedFrameEvent", +["n45386a60"] = "blink.mojom.LocalFrameHost.CreateFencedFrame", +["n443b8100"] = "blink.mojom.LocalFrameHost.ForwardFencedFrameEventAndUserActivationToEmbedder", +["n53d41aff"] = "blink.mojom.LocalFrameHost.OnViewTransitionOptInChanged", +["n6f5876fa"] = "blink.mojom.LocalFrameHost.StartDragging", +["n4eb8669a"] = "blink.mojom.LocalFrameHost.IssueKeepAliveHandle", +["n304cddf5"] = "blink.mojom.LocalFrameHost.NotifyStorageAccessed", +["n36528de4"] = "blink.mojom.LocalFrameHost.RecordWindowProxyUsageMetrics", +["n5152408b"] = "blink.mojom.LocalFrameHost.NotifyDocumentInteractive", +["n15402b83"] = "blink.mojom.LocalFrameHost.SetStorageAccessApiStatus", +["n5cee0f4d"] = "blink.mojom.LocalFrameHost.InitializeCrashReportStorage", +["n2987db68"] = "blink.mojom.LocalFrameHost.SetCrashReportStorageKey", +["n7bba901"] = "blink.mojom.LocalFrameHost.RemoveCrashReportStorageKey", +["n4f487355"] = "blink.mojom.LocalMainFrameHost.ScaleFactorChanged", +["n7f0567ad"] = "blink.mojom.LocalMainFrameHost.ContentsPreferredSizeChanged", +["n167790ff"] = "blink.mojom.LocalMainFrameHost.TextAutosizerPageInfoChanged", +["n3308443e"] = "blink.mojom.LocalMainFrameHost.FocusPage", +["n19de1698"] = "blink.mojom.LocalMainFrameHost.TakeFocus", +["n1768ef01"] = "blink.mojom.LocalMainFrameHost.UpdateTargetURL", +["n3a53d3ae"] = "blink.mojom.LocalMainFrameHost.RequestClose", +["n4e41975b"] = "blink.mojom.LocalMainFrameHost.ShowCreatedWindow", +["n6f10b137"] = "blink.mojom.LocalMainFrameHost.SetWindowRect", +["n3a569bdf"] = "blink.mojom.LocalMainFrameHost.DidFirstVisuallyNonEmptyPaint", +["n770ac9e8"] = "blink.mojom.LocalMainFrameHost.DidAccessInitialMainDocument", +["n74cc7a03"] = "blink.mojom.LocalMainFrameHost.Maximize", +["n1d062213"] = "blink.mojom.LocalMainFrameHost.Minimize", +["n3bedec4a"] = "blink.mojom.LocalMainFrameHost.Restore", +["n47c157aa"] = "blink.mojom.LocalMainFrameHost.SetResizable", +["n6acc5507"] = "blink.mojom.LocalMainFrameHost.DraggableRegionsChanged", +["n23b3d9c2"] = "blink.mojom.LocalMainFrameHost.OnFirstContentfulPaint", +["n688f7044"] = "blink.mojom.DisplayCutoutHost.NotifyViewportFitChanged", +["n56cbf39"] = "blink.mojom.DisplayCutoutHost.NotifyComplexSafeAreaConstraintChanged", +["n47c15fa"] = "blink.mojom.PageBroadcast.SetPageLifecycleState", +["n1c0aa2be"] = "blink.mojom.PageBroadcast.AudioStateChanged", +["n7e1b478e"] = "blink.mojom.PageBroadcast.ActivatePrerenderedPage", +["n10341051"] = "blink.mojom.PageBroadcast.UpdateWebPreferences", +["n7a95785"] = "blink.mojom.PageBroadcast.UpdateRendererPreferences", +["n4141bee8"] = "blink.mojom.PageBroadcast.SetHistoryIndexAndLength", +["n438c0ce9"] = "blink.mojom.PageBroadcast.SetPageBaseBackgroundColor", +["n2f8e575d"] = "blink.mojom.PageBroadcast.CreateRemoteMainFrame", +["n29d75963"] = "blink.mojom.PageBroadcast.UpdatePageBrowsingContextGroup", +["n6fd6e3ee"] = "blink.mojom.PageBroadcast.SetPageAttributionSupport", +["n5623f06b"] = "blink.mojom.PageBroadcast.UpdateColorProviders", +["n123be9"] = "blink.mojom.PageBroadcast.UpdateCanvasNoiseToken", +["n2e9ce0cc"] = "blink.mojom.PageBroadcast.SetSupportsDraggableRegions", +["n5c0a82ad"] = "blink.mojom.ImageReleaseCallback.Release", +["n15801911"] = "blink.mojom.BroadcastChannelClient.OnMessage", +["n3903e6d9"] = "blink.mojom.BroadcastChannelProvider.ConnectToChannel", +["n563ca9bb"] = "blink.mojom.ControllerServiceWorker.DispatchFetchEventForSubresource", +["n36c84476"] = "blink.mojom.ControllerServiceWorker.Clone", +["n43932697"] = "blink.mojom.ControllerServiceWorkerConnector.UpdateController", +["n67020765"] = "blink.mojom.EmbeddedWorkerInstanceClient.StartWorker", +["n463a6abe"] = "blink.mojom.EmbeddedWorkerInstanceClient.StopWorker", +["n25fd4845"] = "blink.mojom.EmbeddedWorkerInstanceHost.RequestTermination", +["n53e796c7"] = "blink.mojom.EmbeddedWorkerInstanceHost.CountFeature", +["n1f1a896d"] = "blink.mojom.EmbeddedWorkerInstanceHost.OnReadyForInspection", +["n5f44ca50"] = "blink.mojom.EmbeddedWorkerInstanceHost.OnScriptLoaded", +["n74f10edb"] = "blink.mojom.EmbeddedWorkerInstanceHost.OnScriptEvaluationStart", +["n3aba061c"] = "blink.mojom.EmbeddedWorkerInstanceHost.OnStarted", +["n231b4a63"] = "blink.mojom.EmbeddedWorkerInstanceHost.OnReportException", +["n581b119f"] = "blink.mojom.EmbeddedWorkerInstanceHost.OnReportConsoleMessage", +["n2432b1ab"] = "blink.mojom.EmbeddedWorkerInstanceHost.OnStopped", +["n4c320dbd"] = "blink.mojom.DedicatedWorkerHostFactoryClient.OnWorkerHostCreated", +["nb495bd7"] = "blink.mojom.DedicatedWorkerHostFactoryClient.OnScriptLoadStarted", +["n7456020e"] = "blink.mojom.DedicatedWorkerHostFactoryClient.OnScriptLoadStartFailed", +["n31ee5df"] = "blink.mojom.DedicatedWorkerHostFactory.CreateWorkerHostAndStartScriptLoad", +["n33845ab6"] = "blink.mojom.SharedWorkerFactory.CreateSharedWorker", +["n7473694c"] = "blink.mojom.WakeLockService.GetWakeLock", +["n62976c51"] = "viz.mojom.CompositingModeWatcher.CompositingModeFallbackToSoftware", +["n6455e6b5"] = "viz.mojom.CompositingModeReporter.AddCompositingModeWatcher", +["n16a53c9"] = "viz.mojom.CopyOutputResultSender.SendResult", +["n1bf73072"] = "viz.mojom.LayerContext.SetVisible", +["n6f21df74"] = "viz.mojom.LayerContext.UpdateDisplayTree", +["n1ca177d3"] = "viz.mojom.LayerContext.UpdateDisplayTiling", +["n5a47479c"] = "viz.mojom.LayerContextClient.OnRequestCommitForFrame", +["n7dde5d08"] = "viz.mojom.TextureReleaser.Release", +["n22972163"] = "viz.mojom.InputTargetClient.FrameSinkIdAt", +["n7b507699"] = "on_device_model.mojom.OnDeviceModelService.LoadModel", +["n67ddcb6a"] = "on_device_model.mojom.OnDeviceModelService.GetCapabilities", +["n5b398fc9"] = "on_device_model.mojom.OnDeviceModelService.LoadTextSafetyModel", +["n440c3166"] = "on_device_model.mojom.OnDeviceModelService.GetDeviceAndPerformanceInfo", +["n56dbc20"] = "blink.mojom.OriginTrialStateHost.ApplyFeatureDiffForOriginTrial", +["n6a9f8707"] = "blink.mojom.OriginTrialStateHost.EnablePersistentTrial", +["n165d401d"] = "blink.mojom.WebBluetoothService.GetAvailability", +["n793c0a8e"] = "blink.mojom.WebBluetoothService.RequestDevice", +["n6669e5e8"] = "blink.mojom.WebBluetoothService.GetDevices", +["n786a9a9f"] = "blink.mojom.WebBluetoothService.ForgetDevice", +["n58f62afd"] = "blink.mojom.WebBluetoothService.RemoteServerConnect", +["n41bab673"] = "blink.mojom.WebBluetoothService.RemoteServerDisconnect", +["n303cc7bd"] = "blink.mojom.WebBluetoothService.RemoteServerGetPrimaryServices", +["n24e8748b"] = "blink.mojom.WebBluetoothService.RemoteServiceGetCharacteristics", +["n3717661a"] = "blink.mojom.WebBluetoothService.RemoteCharacteristicReadValue", +["n6b6a1659"] = "blink.mojom.WebBluetoothService.RemoteCharacteristicWriteValue", +["n95b3b7b"] = "blink.mojom.WebBluetoothService.RemoteCharacteristicStartNotifications", +["n3f325612"] = "blink.mojom.WebBluetoothService.RemoteCharacteristicStopNotifications", +["n26d246d7"] = "blink.mojom.WebBluetoothService.RemoteCharacteristicGetDescriptors", +["n63cdce3d"] = "blink.mojom.WebBluetoothService.RemoteDescriptorReadValue", +["n57acf3b9"] = "blink.mojom.WebBluetoothService.RemoteDescriptorWriteValue", +["n61197e98"] = "blink.mojom.WebBluetoothService.RequestScanningStart", +["n7ffa650d"] = "blink.mojom.WebBluetoothService.WatchAdvertisementsForDevice", +["n51b675af"] = "storage.mojom.BlobDataItemReader.Read", +["n3ea1dbc"] = "storage.mojom.BlobDataItemReader.ReadSideData", +["n7ee7acbe"] = "storage.mojom.BlobStorageContext.RegisterFromDataItem", +["n818f0df"] = "storage.mojom.BlobStorageContext.RegisterFromMemory", +["n3e74921b"] = "storage.mojom.BlobStorageContext.WriteBlobToFile", +["n794c24be"] = "storage.mojom.BlobStorageContext.Clone", +["n3f10922"] = "storage.mojom.CacheStorageObserver.OnCacheListChanged", +["n41282b35"] = "storage.mojom.CacheStorageObserver.OnCacheContentChanged", +["n1f111aad"] = "storage.mojom.CacheStorageControl.AddReceiver", +["n44f7c4b8"] = "storage.mojom.CacheStorageControl.AddObserver", +["n63d1a50"] = "storage.mojom.CacheStorageControl.ApplyPolicyUpdates", +["n224e10b5"] = "storage.mojom.FileSystemAccessContext.SerializeHandle", +["n33159829"] = "storage.mojom.FileSystemAccessContext.DeserializeHandle", +["n32ead010"] = "storage.mojom.FileSystemAccessContext.Clone", +["n6e8953d9"] = "storage.mojom.ServiceWorkerResourceReader.ReadResponseHead", +["nf0671a6"] = "storage.mojom.ServiceWorkerResourceReader.PrepareReadData", +["n5382e518"] = "storage.mojom.ServiceWorkerResourceReader.ReadData", +["n5d69fae7"] = "storage.mojom.ServiceWorkerResourceWriter.WriteResponseHead", +["n44a4aa0"] = "storage.mojom.ServiceWorkerResourceWriter.WriteData", +["n4005144d"] = "storage.mojom.ServiceWorkerResourceMetadataWriter.WriteMetadata", +["n309149d2"] = "storage.mojom.SessionStorageControl.BindNamespace", +["n2e61b639"] = "storage.mojom.SessionStorageControl.BindStorageArea", +["n42fa9fee"] = "storage.mojom.SessionStorageControl.GetUsage", +["n14bf9c5a"] = "storage.mojom.SessionStorageControl.DeleteStorage", +["n4e65c484"] = "storage.mojom.SessionStorageControl.CleanUpStorage", +["n71470893"] = "storage.mojom.SessionStorageControl.ScavengeUnusedNamespaces", +["n4a946a1c"] = "storage.mojom.SessionStorageControl.Flush", +["nff519a2"] = "storage.mojom.SessionStorageControl.PurgeMemory", +["n56ce324b"] = "storage.mojom.SessionStorageControl.CreateNamespace", +["n321f98e6"] = "storage.mojom.SessionStorageControl.CloneNamespace", +["n42f60fcb"] = "storage.mojom.SessionStorageControl.DeleteNamespace", +["n61b6951f"] = "storage.mojom.StorageService.EnableAggressiveDomStorageFlushing", +["n164526f7"] = "storage.mojom.StorageService.SetDataDirectory", +["n5bd3474a"] = "storage.mojom.StorageService.BindSessionStorageControl", +["n55312bd2"] = "storage.mojom.StorageService.BindLocalStorageControl", +["ne2f4e0f"] = "storage.mojom.StorageService.BindTestApi", +["n4778fb3d"] = "quarantine.mojom.Quarantine.QuarantineFile", +["n36e646b8"] = "storage.mojom.IndexedDBClientStateChecker.DisallowInactiveClient", +["n16f63c9a"] = "storage.mojom.IndexedDBClientStateChecker.MakeClone", +["n5313b49"] = "storage.mojom.IndexedDBObserver.OnIndexedDBListChanged", +["n32a6902f"] = "storage.mojom.IndexedDBObserver.OnIndexedDBContentChanged", +["n7edfb976"] = "storage.mojom.IndexedDBControl.BindIndexedDB", +["n15780d45"] = "storage.mojom.IndexedDBControl.ForceClose", +["n4432d0a0"] = "storage.mojom.IndexedDBControl.DownloadBucketData", +["n34410fff"] = "storage.mojom.IndexedDBControl.GetAllBucketsDetails", +["n44e1624a"] = "storage.mojom.IndexedDBControl.StartMetadataRecording", +["n2d5cf23"] = "storage.mojom.IndexedDBControl.StopMetadataRecording", +["n1a63e2ad"] = "storage.mojom.IndexedDBControl.SetForceKeepSessionState", +["n3fdb1a18"] = "storage.mojom.IndexedDBControl.AddObserver", +["n581bf2e9"] = "storage.mojom.IndexedDBControl.ApplyPolicyUpdates", +["n11e0065d"] = "storage.mojom.IndexedDBControl.BindTestInterfaceForTesting", +["n1569cdea"] = "content.mojom.ResourceUsageReporter.GetUsageData", +["n1c6322d2"] = "content.mojom.FontCacheWin.PreCacheFont", +["n4867777e"] = "content.mojom.FontCacheWin.ReleaseCachedFonts", +["n1332a515"] = "content.mojom.RouteProvider.GetRoute", +["nab20881"] = "content.mojom.DomAutomationControllerHost.DomOperationResponse", +["n18855eac"] = "content.mojom.MhtmlFileWriter.SerializeAsMHTML", +["n7d6f151a"] = "content.mojom.FrameHost.CreateNewWindow", +["n23ae9f1d"] = "content.mojom.FrameHost.CreateChildFrame", +["n27b9b699"] = "content.mojom.FrameHost.DidCommitProvisionalLoad", +["n771978a5"] = "content.mojom.FrameHost.DidCommitSameDocumentNavigation", +["n42ba26e1"] = "content.mojom.FrameHost.DidOpenDocumentInputStream", +["n567254e8"] = "content.mojom.FrameHost.BeginNavigation", +["nbbd3702"] = "content.mojom.FrameHost.SubresourceResponseStarted", +["n22d7d62"] = "content.mojom.FrameHost.ResourceLoadComplete", +["n2b841f37"] = "content.mojom.FrameHost.DidChangeName", +["n1c214de1"] = "content.mojom.FrameHost.CancelInitialHistoryLoad", +["n4c09d507"] = "content.mojom.FrameHost.UpdateEncoding", +["n2e5d1742"] = "content.mojom.FrameHost.UpdateState", +["n7de5dfbe"] = "content.mojom.FrameHost.OpenURL", +["n72c552f3"] = "content.mojom.FrameHost.DidStopLoading", +["n2874a71c"] = "content.mojom.InputInjector.QueueSyntheticSmoothDrag", +["n3dadf06"] = "content.mojom.InputInjector.QueueSyntheticSmoothScroll", +["n17737e7f"] = "content.mojom.InputInjector.QueueSyntheticPinch", +["nf0fb09e"] = "content.mojom.InputInjector.QueueSyntheticTap", +["n272d8592"] = "content.mojom.InputInjector.QueueSyntheticPointerAction", +["n2751f021"] = "content.mojom.RenderMessageFilter.GenerateSingleFrameRoutingInfo", +["n49bd1b11"] = "content.mojom.RenderMessageFilter.GenerateFrameRoutingInfos", +["n13fc4d89"] = "content.mojom.SyntheticTrialConfiguration.AddOrUpdateSyntheticTrialGroups", +["n453477fa"] = "content.mojom.SyntheticTrialConfiguration.RemoveSyntheticTrialGroups", +["n90c01f6"] = "content.mojom.WebUIHost.Send", +["n6fc68047"] = "content.mojom.WebUI.SetProperty", +["n64b0b11b"] = "content.mojom.SandboxSupport.LcidAndFirstDayOfWeek", +["n2b7041c8"] = "content.mojom.SandboxSupport.DigitsAndSigns", +["n4462ec31"] = "content.mojom.SandboxSupport.LocaleString", +["n75e2b77"] = "content.mojom.SandboxSupport.LocaleStrings", +["n51a7c474"] = "audio.mojom.AudioService.BindSystemInfo", +["n1eedb4a4"] = "audio.mojom.AudioService.BindDebugRecording", +["n64b0e28b"] = "audio.mojom.AudioService.BindStreamFactory", +["n16c85552"] = "audio.mojom.AudioService.BindDeviceNotifier", +["n69aad0bb"] = "audio.mojom.AudioService.BindLogFactoryManager", +["n46093ca3"] = "audio.mojom.AudioService.BindTestingApi", +["ncdcc1a9"] = "audio.mojom.DebugRecordingFileProvider.CreateWavFile", +["n6bb4f2a3"] = "audio.mojom.DebugRecordingFileProvider.CreateAecdumpFile", +["n1aba4da9"] = "audio.mojom.DebugRecording.Enable", +["n52cf92f5"] = "audio.mojom.DeviceListener.DevicesChanged", +["n528b23ca"] = "audio.mojom.DeviceNotifier.RegisterListener", +["n5c254cb5"] = "audio.mojom.LogFactoryManager.SetLogFactory", +["n1c94ef98"] = "viz.mojom.BeginFrameObserver.OnStandaloneBeginFrame", +["n611de621"] = "viz.mojom.ExternalBeginFrameController.IssueExternalBeginFrame", +["n3d370849"] = "viz.mojom.FrameSinkManager.RegisterFrameSinkId", +["n5d4ea13a"] = "viz.mojom.FrameSinkManager.InvalidateFrameSinkId", +["nb5999ef"] = "viz.mojom.FrameSinkManager.SetFrameSinkDebugLabel", +["n624de1b"] = "viz.mojom.FrameSinkManager.CreateRootCompositorFrameSink", +["n6a9efb43"] = "viz.mojom.FrameSinkManager.CreateFrameSinkBundle", +["n38d009e8"] = "viz.mojom.FrameSinkManager.CreateCompositorFrameSink", +["n7cc4a97b"] = "viz.mojom.FrameSinkManager.DestroyCompositorFrameSink", +["n2c9079e4"] = "viz.mojom.FrameSinkManager.RegisterFrameSinkHierarchy", +["n3434c7c4"] = "viz.mojom.FrameSinkManager.UnregisterFrameSinkHierarchy", +["n19f43da0"] = "viz.mojom.FrameSinkManager.AddVideoDetectorObserver", +["n78c7b680"] = "viz.mojom.FrameSinkManager.CreateVideoCapturer", +["n7a163261"] = "viz.mojom.FrameSinkManager.EvictSurfaces", +["n1d26acac"] = "viz.mojom.FrameSinkManager.Throttle", +["n20f2e362"] = "viz.mojom.FrameSinkManager.StartThrottlingAllFrameSinks", +["n39e46202"] = "viz.mojom.FrameSinkManager.StopThrottlingAllFrameSinks", +["n65662916"] = "viz.mojom.FrameSinkManager.RequestCopyOfOutput", +["n44edd497"] = "viz.mojom.FrameSinkManager.UpdateDebugRendererSettings", +["n200656f4"] = "viz.mojom.FrameSinkManager.ClearUnclaimedViewTransitionResources", +["nf269831"] = "viz.mojom.FrameSinkManager.CreateMetricsRecorderForTest", +["n358089e4"] = "viz.mojom.FrameSinkManager.EnableFrameSinkManagerTestApi", +["n6e117940"] = "viz.mojom.FrameSinkManager.SetupRendererInputRouterDelegateRegistry", +["n1fa793bb"] = "viz.mojom.FrameSinkManager.NotifyRendererBlockStateChanged", +["n65e43041"] = "viz.mojom.FrameSinkManager.RequestInputBack", +["n7fb5bb7a"] = "viz.mojom.FrameSinkManagerClient.OnFirstSurfaceActivation", +["n2084c48d"] = "viz.mojom.FrameSinkManagerClient.OnAggregatedHitTestRegionListUpdated", +["n5465792e"] = "viz.mojom.FrameSinkManagerClient.OnFrameTokenChanged", +["nca9f074"] = "viz.mojom.FrameSinkManagerClient.OnScreenshotCaptured", +["n222dd706"] = "viz.mojom.FrameSinkManagerClient.OnVizTouchStateAvailable", +["n621561df"] = "viz.mojom.RendererInputRouterDelegateRegistry.SetupRenderInputRouterDelegateConnection", +["n71287e67"] = "viz.mojom.FrameSinkVideoConsumerFrameCallbacks.Done", +["n16ead460"] = "viz.mojom.FrameSinkVideoConsumerFrameCallbacks.ProvideFeedback", +["n498d0450"] = "viz.mojom.FrameSinkVideoConsumer.OnFrameCaptured", +["n51a0d5cb"] = "viz.mojom.FrameSinkVideoConsumer.OnNewCaptureVersion", +["n2fd9feb9"] = "viz.mojom.FrameSinkVideoConsumer.OnFrameWithEmptyRegionCapture", +["n36e3d1a4"] = "viz.mojom.FrameSinkVideoConsumer.OnStopped", +["nb5ede62"] = "viz.mojom.FrameSinkVideoConsumer.OnLog", +["n63d01318"] = "viz.mojom.FrameSinkVideoCapturer.SetFormat", +["n570db559"] = "viz.mojom.FrameSinkVideoCapturer.SetMinCapturePeriod", +["n439ba9d0"] = "viz.mojom.FrameSinkVideoCapturer.SetMinSizeChangePeriod", +["n36fcc03e"] = "viz.mojom.FrameSinkVideoCapturer.SetResolutionConstraints", +["ne81f8c0"] = "viz.mojom.FrameSinkVideoCapturer.SetAutoThrottlingEnabled", +["n1ac2bc46"] = "viz.mojom.FrameSinkVideoCapturer.SetAnimationFpsLockIn", +["n2c1026ff"] = "viz.mojom.FrameSinkVideoCapturer.ChangeTarget", +["n45b7dde4"] = "viz.mojom.FrameSinkVideoCapturer.Start", +["n7c1ad797"] = "viz.mojom.FrameSinkVideoCapturer.Stop", +["n4a07ba63"] = "viz.mojom.FrameSinkVideoCapturer.RequestRefreshFrame", +["n6762204e"] = "viz.mojom.FrameSinkVideoCapturer.CreateOverlay", +["n71e265d7"] = "viz.mojom.FrameSinkVideoCaptureOverlay.SetImageAndBounds", +["n4cc2e6b7"] = "viz.mojom.FrameSinkVideoCaptureOverlay.SetBounds", +["n7faaac0f"] = "viz.mojom.FrameSinkVideoCaptureOverlay.OnCapturedMouseEvent", +["n6f7643db"] = "viz.mojom.LayeredWindowUpdater.OnAllocatedSharedMemory", +["n510cca6e"] = "viz.mojom.LayeredWindowUpdater.Draw", +["n3cd8df3d"] = "discardable_memory.mojom.DiscardableSharedMemoryManager.AllocateLockedDiscardableSharedMemory", +["n526598bb"] = "discardable_memory.mojom.DiscardableSharedMemoryManager.DeletedDiscardableSharedMemory", +["n3c67423f"] = "viz.mojom.GpuLogging.RecordLogMessage", +["n459fd9fc"] = "viz.mojom.InfoCollectionGpuService.GetGpuSupportedDirectXVersionAndDevicePerfInfo", +["n2236d7fe"] = "viz.mojom.InfoCollectionGpuService.GetGpuSupportedVulkanVersionInfo", +["n6e2e6ba9"] = "ax.mojom.Automation.DispatchTreeDestroyedEvent", +["n75a11bf5"] = "ax.mojom.Automation.DispatchActionResult", +["n778a8cab"] = "ax.mojom.Automation.DispatchAccessibilityEvents", +["n588b48d7"] = "ax.mojom.Automation.DispatchAccessibilityLocationChange", +["n4aefa900"] = "ax.mojom.Automation.DispatchAccessibilityScrollChange", +["n5e5589d4"] = "media.mojom.RemoterFactory.Create", +["n5ca8c77a"] = "media.mojom.RemotingDataStreamSender.SendFrame", +["n1153f5a8"] = "media.mojom.RemotingDataStreamSender.CancelInFlightData", +["n7457c582"] = "media.mojom.Remoter.Start", +["n71a42fa9"] = "media.mojom.Remoter.StartWithPermissionAlreadyGranted", +["n3b943ded"] = "media.mojom.Remoter.StartDataStreams", +["n137ec04"] = "media.mojom.Remoter.Stop", +["n51a2c757"] = "media.mojom.Remoter.SendMessageToSink", +["n1fd06942"] = "media.mojom.Remoter.EstimateTransmissionCapacity", +["n20c33db7"] = "media.mojom.RemotingSource.OnSinkAvailable", +["n30da19f9"] = "media.mojom.RemotingSource.OnSinkGone", +["n29402783"] = "media.mojom.RemotingSource.OnStarted", +["n16253a4"] = "media.mojom.RemotingSource.OnStartFailed", +["n4e9fa665"] = "media.mojom.RemotingSource.OnMessageFromSink", +["n7a013171"] = "media.mojom.RemotingSource.OnStopped", +["n42380cda"] = "shape_detection.mojom.BarcodeDetection.Detect", +["n655ca5fa"] = "shape_detection.mojom.FaceDetection.Detect", +["n7b98e3c5"] = "shape_detection.mojom.FaceDetectionProvider.CreateFaceDetection", +["n2cb63188"] = "shape_detection.mojom.ShapeDetectionService.BindBarcodeDetectionProvider", +["n6301fa66"] = "shape_detection.mojom.ShapeDetectionService.BindFaceDetectionProvider", +["n6a3e2670"] = "shape_detection.mojom.ShapeDetectionService.BindTextDetection", +["n6f07c22e"] = "device_test.mojom.XRServiceTestHook.SetTestHook", +["n6d1bfb66"] = "device_test.mojom.XRServiceTestHook.TerminateDeviceServiceProcessForTesting", +["n7732843b"] = "metrics.mojom.SingleSampleMetric.SetSample", +["n60b9ff2f"] = "passage_embeddings.mojom.PassageEmbedder.GenerateEmbeddings", +["n3d4c280e"] = "passage_embeddings.mojom.PassageEmbeddingsService.LoadModels", +["n21a4868c"] = "security_interstitials.mojom.InterstitialCommands.DontProceed", +["n8d97eb8"] = "security_interstitials.mojom.InterstitialCommands.Proceed", +["n76c8bc31"] = "security_interstitials.mojom.InterstitialCommands.ShowMoreSection", +["n372bc02d"] = "security_interstitials.mojom.InterstitialCommands.OpenHelpCenter", +["n5b71bbcc"] = "security_interstitials.mojom.InterstitialCommands.OpenDiagnostic", +["ne1e7d48"] = "security_interstitials.mojom.InterstitialCommands.Reload", +["n396afa8e"] = "security_interstitials.mojom.InterstitialCommands.OpenDateSettings", +["n3f08f745"] = "security_interstitials.mojom.InterstitialCommands.OpenLogin", +["n75aa54a1"] = "security_interstitials.mojom.InterstitialCommands.DoReport", +["n4dda98f6"] = "security_interstitials.mojom.InterstitialCommands.DontReport", +["n5e7cc37d"] = "security_interstitials.mojom.InterstitialCommands.OpenReportingPrivacy", +["n6921a758"] = "security_interstitials.mojom.InterstitialCommands.OpenWhitepaper", +["n2158068f"] = "security_interstitials.mojom.InterstitialCommands.OpenHelpCenterInNewTab", +["ne3696d9"] = "security_interstitials.mojom.InterstitialCommands.OpenDiagnosticInNewTab", +["n30c4b478"] = "security_interstitials.mojom.InterstitialCommands.OpenReportingPrivacyInNewTab", +["n284ed1a7"] = "security_interstitials.mojom.InterstitialCommands.OpenWhitepaperInNewTab", +["n6540b391"] = "security_interstitials.mojom.InterstitialCommands.ReportPhishingErrorInNewTab", +["n2e310653"] = "security_interstitials.mojom.InterstitialCommands.ReportPhishingError", +["n6e37d43"] = "security_interstitials.mojom.InterstitialCommands.OpenEnhancedProtectionSettings", +["n6fc01baf"] = "security_interstitials.mojom.InterstitialCommands.ShowCertificateViewer", +["n607301e7"] = "safe_browsing.mojom.SafeBrowsingUrlChecker.CheckUrl", +["n11e63a4a"] = "autofill_ml_internals.mojom.PageHandler.SetPage", +["n1e0acca9"] = "prerender.mojom.NoStatePrefetchCanceler.CancelNoStatePrefetchForUnsupportedScheme", +["n1cbdf98b"] = "prerender.mojom.NoStatePrefetchCanceler.CancelNoStatePrefetchAfterSubresourcesDiscovered", +["n3a146fed"] = "prerender.mojom.NoStatePrefetchMessages.SetIsNoStatePrefetching", +["n7ae09870"] = "web_cache.mojom.WebCache.ClearCache", +["n4412ca82"] = "image_annotation.mojom.ImageAnnotationService.BindAnnotator", +["n7ab70db6"] = "screen_ai.mojom.ScreenAIAnnotator.PerformOcrAndReturnAnnotation", +["n1aaab762"] = "screen_ai.mojom.ScreenAIAnnotator.SetClientType", +["n64a741f4"] = "screen_ai.mojom.ScreenAIAnnotator.GetMaxImageDimension", +["n33c326aa"] = "screen_ai.mojom.ScreenAIAnnotator.SetOCRLightMode", +["n21665d28"] = "screen_ai.mojom.ScreenAIAnnotator.IsOCRBusy", +["n3efaa67c"] = "screen_ai.mojom.Screen2xMainContentExtractor.ExtractMainContent", +["n37f0840c"] = "screen_ai.mojom.Screen2xMainContentExtractor.ExtractMainNode", +["n6c69ba6e"] = "screen_ai.mojom.Screen2xMainContentExtractor.IdentifyMainNode", +["n34c20035"] = "screen_ai.mojom.Screen2xMainContentExtractor.SetClientType", +["n1f614073"] = "screen_ai.mojom.OCRService.BindAnnotator", +["n3550de81"] = "screen_ai.mojom.MainContentExtractionService.BindMainContentExtractor", +["n11e63a4a"] = "searchbox.mojom.PageHandler.SetPage", +["n646f5ece"] = "searchbox.mojom.PageHandler.OnFocusChanged", +["n68dfed0b"] = "searchbox.mojom.PageHandler.QueryAutocomplete", +["n77beb485"] = "searchbox.mojom.PageHandler.StopAutocomplete", +["n8758532"] = "searchbox.mojom.PageHandler.OpenAutocompleteMatch", +["n5b4328e0"] = "searchbox.mojom.PageHandler.OnNavigationLikely", +["n7be239af"] = "searchbox.mojom.PageHandler.DeleteAutocompleteMatch", +["n37058694"] = "searchbox.mojom.PageHandler.ActivateKeyword", +["n7dcb2d30"] = "searchbox.mojom.PageHandler.ShowContextMenu", +["n4ebcd316"] = "searchbox.mojom.PageHandler.ExecuteAction", +["n3bd576b4"] = "searchbox.mojom.PageHandler.OnThumbnailRemoved", +["n4e0a8923"] = "searchbox.mojom.PageHandler.GetPlaceholderConfig", +["n7894a70b"] = "searchbox.mojom.PageHandler.GetRecentTabs", +["n3b4d0f7f"] = "searchbox.mojom.PageHandler.GetTabPreview", +["n46a998e4"] = "searchbox.mojom.PageHandler.NotifySessionStarted", +["n7b3b741d"] = "searchbox.mojom.PageHandler.NotifySessionAbandoned", +["n1034db1b"] = "searchbox.mojom.PageHandler.AddFileContext", +["n30348849"] = "searchbox.mojom.PageHandler.AddTabContext", +["nb9b7740"] = "searchbox.mojom.PageHandler.DeleteContext", +["n3002f1a8"] = "searchbox.mojom.PageHandler.ClearFiles", +["n56d9cd60"] = "searchbox.mojom.PageHandler.SubmitQuery", +["n5e297fea"] = "optimization_guide.mojom.PageTextService.RequestPageTextDump", +["n4b80f7db"] = "continuous_search.mojom.SearchResultExtractor.ExtractCurrentSearchResults", +["n3622f58f"] = "chrome_urls.mojom.PageHandlerFactory.CreatePageHandler", +["n24f2c86c"] = "lens.mojom.LensGhostLoaderPageHandlerFactory.CreateGhostLoaderPage", +["n6a5b6cd3"] = "lens.mojom.LensGhostLoaderPage.ShowErrorState", +["n20bf92be"] = "lens.mojom.LensSidePanelPageHandler.PopAndLoadQueryFromHistory", +["n7897a93e"] = "lens.mojom.LensSidePanelPageHandler.GetIsContextualSearchbox", +["n22ee8e24"] = "lens.mojom.LensSidePanelPageHandler.OnScrollToMessage", +["n6e866e3a"] = "lens.mojom.LensSidePanelPageHandler.RequestSendFeedback", +["n775f5810"] = "lens.mojom.LensSidePanelPageHandler.OnAimMessage", +["n4d4151c6"] = "lens.mojom.LensSidePanelPageHandler.OnImageQueryWithEmptyText", +["n77375cc5"] = "file_suggestion.mojom.DriveSuggestionHandler.GetFiles", +["n475a107a"] = "file_suggestion.mojom.DriveSuggestionHandler.DismissModule", +["n70480baf"] = "file_suggestion.mojom.DriveSuggestionHandler.RestoreModule", +["n14e1211a"] = "file_suggestion.mojom.MicrosoftFilesPageHandler.GetFiles", +["n6e4ed9f"] = "file_suggestion.mojom.MicrosoftFilesPageHandler.DismissModule", +["n4d8f08ef"] = "file_suggestion.mojom.MicrosoftFilesPageHandler.RestoreModule", +["n5d30d819"] = "ntp.authentication.mojom.MicrosoftAuthPageHandler.DismissModule", +["n5dfe8a1a"] = "ntp.authentication.mojom.MicrosoftAuthPageHandler.RestoreModule", +["n52aea970"] = "ntp.authentication.mojom.MicrosoftAuthPageHandler.ShouldShowModule", +["nfac7161"] = "ntp.calendar.mojom.GoogleCalendarPageHandler.GetEvents", +["n667c9778"] = "ntp.calendar.mojom.GoogleCalendarPageHandler.DismissModule", +["n128c65ac"] = "ntp.calendar.mojom.GoogleCalendarPageHandler.RestoreModule", +["n2f71f79c"] = "composebox.mojom.PageHandlerFactory.CreatePageHandler", +["n11e63a4a"] = "composebox.mojom.PageHandler.FocusChanged", +["n646f5ece"] = "composebox.mojom.PageHandler.SetDeepSearchMode", +["n68dfed0b"] = "composebox.mojom.PageHandler.SetCreateImageMode", +["n77beb485"] = "composebox.mojom.PageHandler.HandleLensButtonClick", +["n763704d"] = "most_visited.mojom.MostVisitedPageHandlerFactory.CreatePageHandler", +["n63543a82"] = "most_visited.mojom.MostVisitedPageHandler.AddMostVisitedTile", +["n3dc3e451"] = "most_visited.mojom.MostVisitedPageHandler.DeleteMostVisitedTile", +["n6ae909de"] = "most_visited.mojom.MostVisitedPageHandler.ReorderMostVisitedTile", +["n7d3e94fe"] = "most_visited.mojom.MostVisitedPageHandler.RestoreMostVisitedDefaults", +["n7ce06034"] = "most_visited.mojom.MostVisitedPageHandler.UndoMostVisitedTileAction", +["n30197546"] = "most_visited.mojom.MostVisitedPageHandler.UpdateMostVisitedInfo", +["n525f59b2"] = "most_visited.mojom.MostVisitedPageHandler.UpdateMostVisitedTile", +["n638aabc5"] = "most_visited.mojom.MostVisitedPageHandler.PrerenderMostVisitedTile", +["n340f1f4d"] = "most_visited.mojom.MostVisitedPageHandler.PrefetchMostVisitedTile", +["n6024e046"] = "most_visited.mojom.MostVisitedPageHandler.PreconnectMostVisitedTile", +["n11ed8c44"] = "most_visited.mojom.MostVisitedPageHandler.CancelPrerender", +["n242e05d0"] = "most_visited.mojom.MostVisitedPageHandler.GetMostVisitedExpandedState", +["n7b0a65d7"] = "most_visited.mojom.MostVisitedPageHandler.SetMostVisitedExpandedState", +["n6543ac7d"] = "most_visited.mojom.MostVisitedPageHandler.OnMostVisitedTilesRendered", +["n5d4cf899"] = "most_visited.mojom.MostVisitedPageHandler.OnMostVisitedTileNavigation", +["n2f71f79c"] = "most_visited.mojom.MostVisitedPage.SetMostVisitedInfo", +["n500e102b"] = "help_bubble.mojom.HelpBubbleHandlerFactory.CreateHelpBubbleHandler", +["n47398cc2"] = "tracked_element.mojom.TrackedElementHandler.TrackedElementVisibilityChanged", +["n39884109"] = "tracked_element.mojom.TrackedElementHandler.TrackedElementActivated", +["n1ec1d1e4"] = "tracked_element.mojom.TrackedElementHandler.TrackedElementCustomEvent", +["n16f821b3"] = "translate.mojom.TranslateAgent.TranslateFrame", +["n45bc1882"] = "translate.mojom.TranslateAgent.RevertTranslation", +["n310f1bca"] = "translate.mojom.ContentTranslateDriver.RegisterPage", +["n4b214f51"] = "browser_command.mojom.CommandHandlerFactory.CreateBrowserCommandHandler", +["n51365ec4"] = "customize_color_scheme_mode.mojom.CustomizeColorSchemeModeHandlerFactory.CreateCustomizeColorSchemeModeHandler", +["n1fa49cb8"] = "customize_color_scheme_mode.mojom.CustomizeColorSchemeModeHandler.SetColorSchemeMode", +["n1a523fb1"] = "customize_color_scheme_mode.mojom.CustomizeColorSchemeModeHandler.InitializeColorSchemeMode", +["n11e63a4a"] = "history_clusters.mojom.PageHandler.OpenHistoryUrl", +["n646f5ece"] = "history_clusters.mojom.PageHandler.SetPage", +["n68dfed0b"] = "history_clusters.mojom.PageHandler.ShowContextMenuForSearchbox", +["n77beb485"] = "history_clusters.mojom.PageHandler.ShowContextMenuForURL", +["n8758532"] = "history_clusters.mojom.PageHandler.ShowSidePanelUI", +["n5b4328e0"] = "history_clusters.mojom.PageHandler.ToggleVisibility", +["n7be239af"] = "history_clusters.mojom.PageHandler.StartQueryClusters", +["n37058694"] = "history_clusters.mojom.PageHandler.LoadMoreClusters", +["n7dcb2d30"] = "history_clusters.mojom.PageHandler.HideVisits", +["n4ebcd316"] = "history_clusters.mojom.PageHandler.RemoveVisits", +["n3bd576b4"] = "history_clusters.mojom.PageHandler.RemoveVisitByUrlAndTime", +["n4e0a8923"] = "history_clusters.mojom.PageHandler.OpenVisitUrlsInTabGroup", +["n7894a70b"] = "history_clusters.mojom.PageHandler.RecordVisitAction", +["n3b4d0f7f"] = "history_clusters.mojom.PageHandler.RecordRelatedSearchAction", +["n46a998e4"] = "history_clusters.mojom.PageHandler.RecordClusterAction", +["n7b3b741d"] = "history_clusters.mojom.PageHandler.RecordToggledVisibility", +["n4b6eac98"] = "theme_color_picker.mojom.ThemeColorPickerHandlerFactory.CreateThemeColorPickerHandler", +["ne4eecb9"] = "theme_color_picker.mojom.ThemeColorPickerHandler.GetChromeColors", +["n62fcb1c3"] = "theme_color_picker.mojom.ThemeColorPickerHandler.UpdateTheme", +["n3dc76242"] = "theme_color_picker.mojom.ThemeColorPickerHandler.SetDefaultColor", +["n4415084d"] = "theme_color_picker.mojom.ThemeColorPickerHandler.SetGreyDefaultColor", +["n26f36c83"] = "theme_color_picker.mojom.ThemeColorPickerHandler.SetSeedColor", +["n6a3b9d56"] = "theme_color_picker.mojom.ThemeColorPickerHandler.SetSeedColorFromHue", +["n7b5f2c53"] = "theme_color_picker.mojom.ThemeColorPickerHandler.RemoveBackgroundImage", +["n358ca570"] = "history_embeddings.mojom.Page.SearchResultChanged", +["n48af132b"] = "heap_profiling.mojom.ProfilingClient.StartProfiling", +["n27b6287f"] = "heap_profiling.mojom.ProfilingClient.RetrieveHeapProfile", +["nba39891"] = "heap_profiling.mojom.ProfilingService.AddProfilingClient", +["n6d3d4357"] = "heap_profiling.mojom.ProfilingService.GetProfiledPids", +["n5ee18af1"] = "printing.mojom.PrintPreviewUI.SetOptionsFromDocument", +["n16a73213"] = "printing.mojom.PrintPreviewUI.DidPrepareDocumentForPreview", +["n469146c"] = "printing.mojom.PrintPreviewUI.DidPreviewPage", +["n2575cd60"] = "printing.mojom.PrintPreviewUI.MetafileReadyForPrinting", +["n5e6477f"] = "printing.mojom.PrintPreviewUI.PrintPreviewFailed", +["n4b41a5cb"] = "printing.mojom.PrintPreviewUI.PrintPreviewCancelled", +["n5bf99eab"] = "printing.mojom.PrintPreviewUI.PrinterSettingsInvalid", +["n1c3b6f52"] = "printing.mojom.PrintPreviewUI.DidGetDefaultPageLayout", +["n7d66361b"] = "printing.mojom.PrintPreviewUI.DidStartPreview", +["n9a8c13c"] = "printing.mojom.PrintManagerHost.DidGetPrintedPagesCount", +["n11cdbeb"] = "printing.mojom.PrintManagerHost.GetDefaultPrintSettings", +["n713b39ef"] = "printing.mojom.PrintManagerHost.DidShowPrintDialog", +["n3ca6c648"] = "printing.mojom.PrintManagerHost.DidPrintDocument", +["n2f714d20"] = "printing.mojom.PrintManagerHost.IsPrintingEnabled", +["n77129c6e"] = "printing.mojom.PrintManagerHost.ScriptedPrint", +["nc2411fd"] = "printing.mojom.PrintManagerHost.PrintingFailed", +["n71618efa"] = "printing.mojom.PrintManagerHost.UpdatePrintSettings", +["n3ae47b0d"] = "printing.mojom.PrintManagerHost.SetupScriptedPrintPreview", +["n5621564a"] = "printing.mojom.PrintManagerHost.ShowScriptedPrintPreview", +["nd63153e"] = "printing.mojom.PrintManagerHost.RequestPrintPreview", +["n355a9be3"] = "printing.mojom.PrintManagerHost.CheckForCancel", +["n4c2c611c"] = "printing.mojom.PrintManagerHost.SetAccessibilityTree", +["n6ffbd28f"] = "autofill.mojom.PasswordAutofillAgent.ApplyFillDataOnParsingCompletion", +["n4e795aba"] = "autofill.mojom.PasswordAutofillAgent.FillPasswordSuggestion", +["n5a896633"] = "autofill.mojom.PasswordAutofillAgent.FillPasswordSuggestionById", +["n5967db3d"] = "autofill.mojom.PasswordAutofillAgent.PreviewPasswordSuggestionById", +["n44ccc5cd"] = "autofill.mojom.PasswordAutofillAgent.InformNoSavedCredentials", +["n10afcab0"] = "autofill.mojom.PasswordAutofillAgent.FillIntoFocusedField", +["n212ccfd4"] = "autofill.mojom.PasswordAutofillAgent.PreviewField", +["n2feebd6b"] = "autofill.mojom.PasswordAutofillAgent.FillField", +["n3436513f"] = "autofill.mojom.PasswordAutofillAgent.FillChangePasswordForm", +["n47ca0c40"] = "autofill.mojom.PasswordAutofillAgent.SetLoggingState", +["n4a178950"] = "autofill.mojom.PasswordAutofillAgent.AnnotateFieldsWithParsingResult", +["n531ad2c5"] = "autofill.mojom.PasswordAutofillAgent.CheckViewAreaVisible", +["n545d2d54"] = "autofill.mojom.PasswordGenerationAgent.GeneratedPasswordAccepted", +["n490f2a3c"] = "autofill.mojom.PasswordGenerationAgent.GeneratedPasswordRejected", +["n5bef6a1a"] = "autofill.mojom.PasswordGenerationAgent.TriggeredGeneratePassword", +["n8771905"] = "autofill.mojom.PasswordGenerationAgent.FoundFormEligibleForGeneration", +["n230f7e7f"] = "autofill.mojom.PasswordGenerationAgent.FocusNextFieldAfterPasswords", +["n47324217"] = "autofill.mojom.AutofillDriver.FormsSeen", +["n299455d6"] = "autofill.mojom.AutofillDriver.FormSubmitted", +["n60f521b4"] = "autofill.mojom.AutofillDriver.CaretMovedInFormField", +["n5e2aadcc"] = "autofill.mojom.AutofillDriver.TextFieldValueChanged", +["n5326407c"] = "autofill.mojom.AutofillDriver.DidEndTextFieldEditing", +["n29ba1aa4"] = "autofill.mojom.AutofillDriver.TextFieldDidScroll", +["n674d17d4"] = "autofill.mojom.AutofillDriver.SelectControlSelectionChanged", +["n46ecf494"] = "autofill.mojom.AutofillDriver.SelectFieldOptionsDidChange", +["n435606c4"] = "autofill.mojom.AutofillDriver.FocusOnFormField", +["n6bf63e12"] = "autofill.mojom.AutofillDriver.FocusOnNonFormField", +["n51ca5c4a"] = "autofill.mojom.AutofillDriver.AskForValuesToFill", +["n631ece07"] = "autofill.mojom.AutofillDriver.HidePopup", +["n4db2dccc"] = "autofill.mojom.AutofillDriver.DidAutofillForm", +["n35f33b29"] = "autofill.mojom.AutofillDriver.JavaScriptChangedAutofilledValue", +["n1a90fc00"] = "autofill.mojom.PasswordManagerDriver.PasswordFormsParsed", +["n3ce6cf29"] = "autofill.mojom.PasswordManagerDriver.PasswordFormsRendered", +["n12b08d1b"] = "autofill.mojom.PasswordManagerDriver.PasswordFormSubmitted", +["n7176b2a"] = "autofill.mojom.PasswordManagerDriver.InformAboutUserInput", +["n72fcc9d7"] = "autofill.mojom.PasswordManagerDriver.DynamicFormSubmission", +["n3d6d1eac"] = "autofill.mojom.PasswordManagerDriver.PasswordFormCleared", +["n53dc0713"] = "autofill.mojom.PasswordManagerDriver.RecordSavePasswordProgress", +["n2ecac097"] = "autofill.mojom.PasswordManagerDriver.UserModifiedPasswordField", +["n76044f04"] = "autofill.mojom.PasswordManagerDriver.UserModifiedNonPasswordField", +["n56264624"] = "autofill.mojom.PasswordManagerDriver.ShowPasswordSuggestions", +["n692ffaf2"] = "autofill.mojom.PasswordManagerDriver.CheckSafeBrowsingReputation", +["n677d45f0"] = "autofill.mojom.PasswordManagerDriver.FocusedInputChanged", +["n7e30e105"] = "autofill.mojom.PasswordManagerDriver.LogFirstFillingResult", +["n365e707c"] = "autofill.mojom.PasswordGenerationDriver.AutomaticGenerationAvailable", +["n570f1012"] = "autofill.mojom.PasswordGenerationDriver.PresaveGeneratedPassword", +["n699c6dfe"] = "autofill.mojom.PasswordGenerationDriver.PasswordNoLongerGenerated", +["n94d73b9"] = "autofill.mojom.PasswordGenerationDriver.ShowPasswordEditingPopup", +["n30985e98"] = "autofill.mojom.PasswordGenerationDriver.PasswordGenerationRejectedByTyping", +["n31986cdf"] = "autofill.mojom.PasswordGenerationDriver.FrameWasScrolled", +["n7db328c9"] = "autofill.mojom.PasswordGenerationDriver.GenerationElementLostFocus", +["n75314227"] = "media_router.mojom.MediaController.Play", +["n3d391ba2"] = "media_router.mojom.MediaController.Pause", +["n79f0f6d3"] = "media_router.mojom.MediaController.SetMute", +["n5697ec6c"] = "media_router.mojom.MediaController.SetVolume", +["n3603dc26"] = "media_router.mojom.MediaController.Seek", +["n6db2c516"] = "media_router.mojom.MediaController.NextTrack", +["n6c78fb94"] = "media_router.mojom.MediaController.PreviousTrack", +["n4473d60c"] = "media_router.mojom.MediaStatusObserver.OnMediaStatusUpdated", +["n41f1f882"] = "device_signals.mojom.SystemSignalsService.GetFileSystemSignals", +["n499640f6"] = "device_signals.mojom.SystemSignalsService.GetAntiVirusSignals", +["n51c7aef4"] = "device_signals.mojom.SystemSignalsService.GetHotfixSignals", +["n6cc11a42"] = "safe_browsing.mojom.ThreatReporter.GetThreatDOMDetails", +["n1ab62d52"] = "safe_browsing.mojom.PhishingImageEmbedderDetector.StartImageEmbedding", +["n4bc8bcf6"] = "safe_browsing.mojom.ExtensionWebRequestReporter.SendWebRequestData", +["n5d10900b"] = "safe_browsing.mojom.ExtensionWebRequestReporter.Clone", +["n4bc8bcf6"] = "safe_browsing.mojom.SafeBrowsing.CreateCheckerAndCheck", +["n5d10900b"] = "safe_browsing.mojom.SafeBrowsing.Clone", +["n1e771774"] = "commerce_web_extractor.mojom.CommerceWebExtractor.ExtractMetaInfo", +["n6575183a"] = "commerce.price_tracking.mojom.PriceTrackingHandler.TrackPriceForBookmark", +["n2a356a53"] = "commerce.price_tracking.mojom.PriceTrackingHandler.UntrackPriceForBookmark", +["nc3847c7"] = "commerce.price_tracking.mojom.PriceTrackingHandler.SetPriceTrackingStatusForCurrentUrl", +["n3649579c"] = "commerce.price_tracking.mojom.PriceTrackingHandler.GetAllShoppingBookmarkProductInfo", +["n3d391d7f"] = "commerce.price_tracking.mojom.PriceTrackingHandler.GetAllPriceTrackedBookmarkProductInfo", +["n10665ca8"] = "commerce.price_tracking.mojom.PriceTrackingHandler.GetShoppingCollectionBookmarkFolderId", +["n18e903b6"] = "commerce.price_tracking.mojom.PriceTrackingHandler.GetParentBookmarkFolderNameForCurrentUrl", +["n2d6253c5"] = "commerce.price_tracking.mojom.PriceTrackingHandler.ShowBookmarkEditorForCurrentUrl", +["n68b5c9f5"] = "commerce.price_tracking.mojom.PriceTrackingHandlerFactory.CreatePriceTrackingHandler", +["n2749fec8"] = "shopping_service.mojom.ShoppingServiceHandlerFactory.CreateShoppingServiceHandler", +["n271c111f"] = "spellcheck.mojom.SpellChecker.Initialize", +["n59d66654"] = "spellcheck.mojom.SpellChecker.CustomDictionaryChanged", +["n264caa4c"] = "spellcheck.mojom.SpellCheckInitializationHost.RequestDictionary", +["nec0aedf"] = "spellcheck.mojom.SpellCheckHost.NotifyChecked", +["n7c44e7eb"] = "spellcheck.mojom.SpellCheckHost.CallSpellingService", +["n32a5bcc4"] = "spellcheck.mojom.SpellCheckHost.RequestTextCheck", +["n46a70767"] = "spellcheck.mojom.SpellCheckHost.CheckSpelling", +["n1df3b1be"] = "spellcheck.mojom.SpellCheckHost.FillSuggestionList", +["n5b284f24"] = "spellcheck.mojom.SpellCheckHost.InitializeDictionaries", +["n7987f27"] = "glic.mojom.FrePageHandlerFactory.CreatePageHandler", +["n79a7cac5"] = "glic.mojom.FrePageHandler.AcceptFre", +["n5bd1ab89"] = "glic.mojom.FrePageHandler.RejectFre", +["n403f5525"] = "glic.mojom.FrePageHandler.DismissFre", +["n78c71a11"] = "glic.mojom.FrePageHandler.FreReloaded", +["n75553578"] = "glic.mojom.FrePageHandler.PrepareForClient", +["n3e343af"] = "glic.mojom.FrePageHandler.ValidateAndOpenLinkInNewTab", +["n4a8d8965"] = "glic.mojom.FrePageHandler.WebUiStateChanged", +["n7398fa5a"] = "glic.mojom.FrePageHandler.ExceededTimeoutError", +["n669a9f84"] = "glic.mojom.FrePageHandler.LogWebUiLoadComplete", +["n17c0318f"] = "media_router.mojom.Debugger.ShouldFetchMirroringStats", +["n1bb2f58"] = "media_router.mojom.Debugger.OnMirroringStats", +["n1ab34b4f"] = "media_router.mojom.Debugger.BindReceiver", +["n5ea2c0a5"] = "mirroring.mojom.CastMessageChannel.OnMessage", +["n207afbd7"] = "mirroring.mojom.SessionObserver.OnError", +["n59ebf096"] = "mirroring.mojom.SessionObserver.DidStart", +["n5c9a889c"] = "mirroring.mojom.SessionObserver.DidStop", +["n4d36fa8d"] = "mirroring.mojom.SessionObserver.LogInfoMessage", +["n667552ef"] = "mirroring.mojom.SessionObserver.LogErrorMessage", +["n4a8a457a"] = "mirroring.mojom.SessionObserver.OnSourceChanged", +["n66eea66b"] = "mirroring.mojom.SessionObserver.OnRemotingStateChanged", +["n613215bb"] = "mirroring.mojom.AudioStreamCreatorClient.StreamCreated", +["n4e6df0d4"] = "mirroring.mojom.ResourceProvider.BindGpu", +["n6949db5a"] = "mirroring.mojom.ResourceProvider.GetVideoCaptureHost", +["n2b264974"] = "mirroring.mojom.ResourceProvider.GetVideoEncoderMetricsProvider", +["n1a6fc404"] = "mirroring.mojom.ResourceProvider.GetNetworkContext", +["n4e250aaa"] = "mirroring.mojom.ResourceProvider.CreateAudioStream", +["n426759"] = "mirroring.mojom.ResourceProvider.ConnectToRemotingSource", +["n1f9ed08c"] = "dom_distiller.mojom.DistillabilityService.NotifyIsDistillable", +["n15d8cb3c"] = "dom_distiller.mojom.DistillerJavaScriptService.HandleDistillerOpenSettingsCall", +["n3ae88d3e"] = "dom_distiller.mojom.DistillerJavaScriptService.HandleStoreThemePref", +["n4436b98"] = "dom_distiller.mojom.DistillerJavaScriptService.HandleStoreFontFamilyPref", +["n4520b0b1"] = "dom_distiller.mojom.DistillerJavaScriptService.HandleStoreFontScalingPref", +["n301799e6"] = "commerce.mojom.CommerceInternalsHandlerFactory.CreateCommerceInternalsHandler", +["n44e44709"] = "guest_contents.mojom.GuestContentsHost.Attach", +["n28f4fc1c"] = "content_capture.mojom.ContentCaptureReceiver.DidCompleteBatchCaptureContent", +["n7b89f32d"] = "content_capture.mojom.ContentCaptureReceiver.DidCaptureContent", +["n22a5e895"] = "content_capture.mojom.ContentCaptureReceiver.DidUpdateContent", +["n2a7ec47"] = "content_capture.mojom.ContentCaptureReceiver.DidRemoveContent", +["n27620b8f"] = "network_hints.mojom.NetworkHintsHandler.PrefetchDNS", +["n4f3f1a88"] = "network_hints.mojom.NetworkHintsHandler.Preconnect", +["n3f1f3011"] = "webnn.mojom.WebNNContext.CreateGraphBuilder", +["n42b50f9c"] = "webnn.mojom.WebNNContext.CreateTensor", +["n35b69c69"] = "webnn.mojom.WebNNContext.CreateTensorFromMailbox", +["not_found"] = "media.mojom.MediaEngagementScoreDetailsProvider.GetMediaEngagementScoreDetails", +["not_found"] = "media.mojom.MediaEngagementScoreDetailsProvider.GetMediaEngagementConfig", +["unscrambled_0"] = "media_session.mojom.AudioFocusRequestClient.RequestAudioFocus@0", +["unscrambled_1"] = "media_session.mojom.AudioFocusRequestClient.AbandonAudioFocus@1", +["unscrambled_2"] = "media_session.mojom.AudioFocusRequestClient.MediaSessionInfoChanged@2", +["unscrambled_0"] = "media_session.mojom.AudioFocusObserver.OnFocusGained@0", +["unscrambled_1"] = "media_session.mojom.AudioFocusObserver.OnFocusLost@1", +["unscrambled_2"] = "media_session.mojom.AudioFocusObserver.OnRequestIdReleased@2", +["unscrambled_0"] = "media_session.mojom.AudioFocusManager.RequestAudioFocus@0", +["unscrambled_1"] = "media_session.mojom.AudioFocusManager.RequestGroupedAudioFocus@4", +["unscrambled_2"] = "media_session.mojom.AudioFocusManager.GetFocusRequests@1", +["unscrambled_3"] = "media_session.mojom.AudioFocusManager.AddObserver@2", +["unscrambled_4"] = "media_session.mojom.AudioFocusManager.SetSource@6", +["unscrambled_5"] = "media_session.mojom.AudioFocusManager.SetEnforcementMode@5", +["unscrambled_6"] = "media_session.mojom.AudioFocusManager.AddSourceObserver@7", +["unscrambled_7"] = "media_session.mojom.AudioFocusManager.GetSourceFocusRequests@8", +["unscrambled_8"] = "media_session.mojom.AudioFocusManager.RequestIdReleased@9", +["unscrambled_9"] = "media_session.mojom.AudioFocusManager.StartDuckingAllAudio@10", +["unscrambled_a"] = "media_session.mojom.AudioFocusManager.StopDuckingAllAudio@11", +["unscrambled_b"] = "media_session.mojom.AudioFocusManager.FlushForTesting@12", +["unscrambled_0"] = "media_session.mojom.AudioFocusManagerDebug.GetDebugInfoForRequest@0", +["unscrambled_0"] = "media_session.mojom.MediaController.Suspend@0", +["unscrambled_1"] = "media_session.mojom.MediaController.Resume@1", +["unscrambled_2"] = "media_session.mojom.MediaController.Stop@2", +["unscrambled_3"] = "media_session.mojom.MediaController.ToggleSuspendResume@3", +["unscrambled_4"] = "media_session.mojom.MediaController.AddObserver@4", +["unscrambled_5"] = "media_session.mojom.MediaController.PreviousTrack@5", +["unscrambled_6"] = "media_session.mojom.MediaController.NextTrack@6", +["unscrambled_7"] = "media_session.mojom.MediaController.Seek@7", +["unscrambled_8"] = "media_session.mojom.MediaController.ObserveImages@8", +["unscrambled_9"] = "media_session.mojom.MediaController.SeekTo@9", +["unscrambled_a"] = "media_session.mojom.MediaController.ScrubTo@10", +["unscrambled_b"] = "media_session.mojom.MediaController.EnterPictureInPicture@11", +["unscrambled_c"] = "media_session.mojom.MediaController.ExitPictureInPicture@12", +["unscrambled_d"] = "media_session.mojom.MediaController.SetAudioSinkId@13", +["unscrambled_e"] = "media_session.mojom.MediaController.ToggleMicrophone@14", +["unscrambled_f"] = "media_session.mojom.MediaController.ToggleCamera@15", +["unscrambled_10"] = "media_session.mojom.MediaController.HangUp@16", +["unscrambled_11"] = "media_session.mojom.MediaController.Raise@17", +["unscrambled_12"] = "media_session.mojom.MediaController.SetMute@18", +["unscrambled_13"] = "media_session.mojom.MediaController.RequestMediaRemoting@19", +["unscrambled_14"] = "media_session.mojom.MediaController.EnterAutoPictureInPicture@20", +["unscrambled_15"] = "media_session.mojom.MediaController.SkipAd@21", +["unscrambled_0"] = "media_session.mojom.MediaControllerObserver.MediaSessionInfoChanged@0", +["unscrambled_1"] = "media_session.mojom.MediaControllerObserver.MediaSessionMetadataChanged@1", +["unscrambled_2"] = "media_session.mojom.MediaControllerObserver.MediaSessionActionsChanged@2", +["unscrambled_3"] = "media_session.mojom.MediaControllerObserver.MediaSessionChanged@3", +["unscrambled_4"] = "media_session.mojom.MediaControllerObserver.MediaSessionPositionChanged@4", +["unscrambled_0"] = "media_session.mojom.MediaControllerImageObserver.MediaControllerImageChanged@0", +["unscrambled_1"] = "media_session.mojom.MediaControllerImageObserver.MediaControllerChapterImageChanged@1", +["unscrambled_0"] = "media_session.mojom.MediaControllerManager.CreateMediaControllerForSession@0", +["unscrambled_1"] = "media_session.mojom.MediaControllerManager.CreateActiveMediaController@1", +["unscrambled_2"] = "media_session.mojom.MediaControllerManager.SuspendAllSessions@2", +["unscrambled_0"] = "media_session.mojom.MediaSessionObserver.MediaSessionInfoChanged@0", +["unscrambled_1"] = "media_session.mojom.MediaSessionObserver.MediaSessionMetadataChanged@1", +["unscrambled_2"] = "media_session.mojom.MediaSessionObserver.MediaSessionActionsChanged@2", +["unscrambled_3"] = "media_session.mojom.MediaSessionObserver.MediaSessionImagesChanged@3", +["unscrambled_4"] = "media_session.mojom.MediaSessionObserver.MediaSessionPositionChanged@4", +["unscrambled_0"] = "media_session.mojom.MediaSession.GetMediaSessionInfo@0", +["unscrambled_1"] = "media_session.mojom.MediaSession.GetDebugInfo@1", +["unscrambled_2"] = "media_session.mojom.MediaSession.StartDucking@2", +["unscrambled_3"] = "media_session.mojom.MediaSession.StopDucking@3", +["unscrambled_4"] = "media_session.mojom.MediaSession.Suspend@4", +["unscrambled_5"] = "media_session.mojom.MediaSession.Resume@5", +["unscrambled_6"] = "media_session.mojom.MediaSession.AddObserver@6", +["unscrambled_7"] = "media_session.mojom.MediaSession.PreviousTrack@7", +["unscrambled_8"] = "media_session.mojom.MediaSession.NextTrack@8", +["unscrambled_9"] = "media_session.mojom.MediaSession.Seek@9", +["unscrambled_a"] = "media_session.mojom.MediaSession.Stop@10", +["unscrambled_b"] = "media_session.mojom.MediaSession.SkipAd@11", +["unscrambled_c"] = "media_session.mojom.MediaSession.GetMediaImageBitmap@12", +["unscrambled_d"] = "media_session.mojom.MediaSession.SeekTo@13", +["unscrambled_e"] = "media_session.mojom.MediaSession.ScrubTo@14", +["unscrambled_f"] = "media_session.mojom.MediaSession.EnterPictureInPicture@15", +["unscrambled_10"] = "media_session.mojom.MediaSession.ExitPictureInPicture@16", +["unscrambled_11"] = "media_session.mojom.MediaSession.SetAudioSinkId@17", +["unscrambled_12"] = "media_session.mojom.MediaSession.ToggleMicrophone@18", +["unscrambled_13"] = "media_session.mojom.MediaSession.ToggleCamera@19", +["unscrambled_14"] = "media_session.mojom.MediaSession.HangUp@20", +["unscrambled_15"] = "media_session.mojom.MediaSession.Raise@21", +["unscrambled_16"] = "media_session.mojom.MediaSession.SetMute@22", +["unscrambled_17"] = "media_session.mojom.MediaSession.RequestMediaRemoting@23", +["unscrambled_18"] = "media_session.mojom.MediaSession.PreviousSlide@24", +["unscrambled_19"] = "media_session.mojom.MediaSession.NextSlide@25", +["unscrambled_1a"] = "media_session.mojom.MediaSession.EnterAutoPictureInPicture@26", +["unscrambled_1b"] = "media_session.mojom.MediaSession.GetVisibility@27", +["not_found"] = "ukm.mojom.UkmRecorderInterface.AddEntry", +["not_found"] = "ukm.mojom.UkmRecorderInterface.UpdateSourceURL", +["not_found"] = "media.mojom.ProvisionFetcher.Retrieve", +["not_found"] = "network.mojom.CrossOriginEmbedderPolicyReporter.QueueCorpViolationReport", +["not_found"] = "network.mojom.CrossOriginEmbedderPolicyReporter.Clone", +["not_found"] = "network.mojom.CrossOriginOpenerPolicyReporter.QueueAccessReport", +["not_found"] = "network.mojom.DeviceBoundSessionAccessObserver.OnDeviceBoundSessionAccessed", +["not_found"] = "network.mojom.DeviceBoundSessionAccessObserver.Clone", +["not_found"] = "network.mojom.DevToolsObserver.OnRawRequest", +["not_found"] = "network.mojom.DevToolsObserver.OnRawResponse", +["not_found"] = "network.mojom.DevToolsObserver.OnEarlyHintsResponse", +["not_found"] = "network.mojom.DevToolsObserver.OnPrivateNetworkRequest", +["not_found"] = "network.mojom.DevToolsObserver.OnCorsPreflightRequest", +["not_found"] = "network.mojom.DevToolsObserver.OnCorsPreflightResponse", +["not_found"] = "network.mojom.DevToolsObserver.OnCorsPreflightRequestCompleted", +["not_found"] = "network.mojom.DevToolsObserver.OnTrustTokenOperationDone", +["not_found"] = "network.mojom.DevToolsObserver.OnCorsError", +["not_found"] = "network.mojom.DevToolsObserver.OnOrbError", +["not_found"] = "network.mojom.DevToolsObserver.OnSharedDictionaryError", +["not_found"] = "network.mojom.DevToolsObserver.OnSRIMessageSignatureIssue", +["not_found"] = "network.mojom.DevToolsObserver.OnUnencodedDigestError", +["not_found"] = "network.mojom.DevToolsObserver.Clone", +["not_found"] = "network.mojom.DocumentIsolationPolicyReporter.QueueCorpViolationReport", +["not_found"] = "network.mojom.DocumentIsolationPolicyReporter.Clone", +["not_found"] = "network.mojom.NetworkChangeManager.RequestNotifications", +["not_found"] = "network.mojom.NetworkChangeManager.BindNetworkInterfaceChangeListener", +["not_found"] = "network.mojom.SharedDictionaryAccessObserver.OnSharedDictionaryAccessed", +["not_found"] = "network.mojom.SharedDictionaryAccessObserver.Clone", +["not_found"] = "network.mojom.TrustTokenAccessObserver.OnTrustTokensAccessed", +["not_found"] = "network.mojom.TrustTokenAccessObserver.Clone", +["not_found"] = "network.mojom.URLLoaderClient.OnReceiveEarlyHints", +["not_found"] = "network.mojom.URLLoaderClient.OnReceiveResponse", +["not_found"] = "network.mojom.URLLoaderClient.OnReceiveRedirect", +["not_found"] = "network.mojom.URLLoaderClient.OnUploadProgress", +["not_found"] = "network.mojom.URLLoaderClient.OnTransferSizeUpdated", +["not_found"] = "network.mojom.URLLoaderClient.OnComplete", +["not_found"] = "network.mojom.URLLoader.FollowRedirect", +["not_found"] = "network.mojom.URLLoader.SetPriority", +["not_found"] = "network.mojom.WebBundleHandle.Clone", +["not_found"] = "network.mojom.WebBundleHandle.OnWebBundleError", +["not_found"] = "network.mojom.WebBundleHandle.OnWebBundleLoadFinished", +["not_found"] = "network.mojom.WebTransportClient.OnDatagramReceived", +["not_found"] = "network.mojom.WebTransportClient.OnIncomingStreamClosed", +["not_found"] = "network.mojom.WebTransportClient.OnOutgoingStreamClosed", +["not_found"] = "network.mojom.WebTransportClient.OnReceivedStopSending", +["not_found"] = "network.mojom.WebTransportClient.OnReceivedResetStream", +["not_found"] = "network.mojom.WebTransportClient.OnClosed", +["not_found"] = "network.mojom.WebTransportHandshakeClient.OnBeforeConnect", +["not_found"] = "network.mojom.WebTransportHandshakeClient.OnConnectionEstablished", +["not_found"] = "network.mojom.WebTransportHandshakeClient.OnHandshakeFailed", +["not_found"] = "network.mojom.WebTransport.SendDatagram", +["not_found"] = "network.mojom.WebTransport.CreateStream", +["not_found"] = "network.mojom.WebTransport.AcceptBidirectionalStream", +["not_found"] = "network.mojom.WebTransport.AcceptUnidirectionalStream", +["not_found"] = "network.mojom.WebTransport.SendFin", +["not_found"] = "network.mojom.WebTransport.AbortStream", +["not_found"] = "network.mojom.WebTransport.StopSending", +["not_found"] = "network.mojom.WebTransport.SetOutgoingDatagramExpirationDuration", +["not_found"] = "network.mojom.WebTransport.GetStats", +["not_found"] = "network.mojom.WebTransport.Close", +["not_found"] = "network.mojom.CookieAccessObserver.OnCookiesAccessed", +["not_found"] = "network.mojom.CookieAccessObserver.Clone", +["not_found"] = "network.mojom.CookieChangeListener.OnCookieChange", +["not_found"] = "network.mojom.CookieManager.GetAllCookies", +["not_found"] = "network.mojom.CookieManager.GetAllCookiesWithAccessSemantics", +["not_found"] = "network.mojom.CookieManager.GetCookieList", +["not_found"] = "network.mojom.CookieManager.SetCanonicalCookie", +["not_found"] = "network.mojom.CookieManager.DeleteCanonicalCookie", +["not_found"] = "network.mojom.CookieManager.DeleteCookies", +["not_found"] = "network.mojom.CookieManager.DeleteSessionOnlyCookies", +["not_found"] = "network.mojom.CookieManager.DeleteStaleSessionOnlyCookies", +["not_found"] = "network.mojom.CookieManager.AddCookieChangeListener", +["not_found"] = "network.mojom.CookieManager.AddGlobalChangeListener", +["not_found"] = "network.mojom.CookieManager.CloneInterface", +["not_found"] = "network.mojom.CookieManager.FlushCookieStore", +["not_found"] = "network.mojom.CookieManager.AllowFileSchemeCookies", +["not_found"] = "network.mojom.CookieManager.SetContentSettings", +["not_found"] = "network.mojom.CookieManager.SetForceKeepSessionState", +["not_found"] = "network.mojom.CookieManager.BlockThirdPartyCookies", +["not_found"] = "network.mojom.CookieManager.SetMitigationsEnabledFor3pcd", +["not_found"] = "network.mojom.CookieManager.SetTrackingProtectionEnabledFor3pcd", +["not_found"] = "network.mojom.CookieManager.SetPreCommitCallbackDelayForTesting", +["not_found"] = "network.mojom.ProxyConfigClient.OnProxyConfigUpdated", +["not_found"] = "network.mojom.ProxyConfigClient.FlushProxyConfig", +["not_found"] = "network.mojom.ProxyConfigPollerClient.OnLazyProxyConfigPoll", +["not_found"] = "network.mojom.ProxyErrorClient.OnPACScriptError", +["not_found"] = "network.mojom.ProxyErrorClient.OnRequestMaybeFailedDueToProxySettings", +["not_found"] = "cert_verifier.mojom.URLLoaderFactoryConnector.CreateURLLoaderFactory", +["not_found"] = "cert_verifier.mojom.CertVerifierRequest.Complete", +["not_found"] = "cert_verifier.mojom.CertVerifierService.EnableNetworkAccess", +["not_found"] = "cert_verifier.mojom.CertVerifierService.Verify", +["not_found"] = "cert_verifier.mojom.CertVerifierService.Verify2QwacBinding", +["not_found"] = "cert_verifier.mojom.CertVerifierService.SetConfig", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceClient.OnCertVerifierChanged", +["not_found"] = "network.mojom.ConnectionChangeObserverClient.OnSessionClosed", +["not_found"] = "network.mojom.ConnectionChangeObserverClient.OnNetworkEvent", +["not_found"] = "network.mojom.ConnectionChangeObserverClient.OnConnectionFailed", +["not_found"] = "network.mojom.CookieEncryptionProvider.GetEncryptor", +["not_found"] = "network.mojom.FirstPartySetsAccessDelegate.NotifyReady", +["not_found"] = "network.mojom.FirstPartySetsAccessDelegate.SetEnabled", +["not_found"] = "network.mojom.MdnsResponder.CreateNameForAddress", +["not_found"] = "network.mojom.MdnsResponder.RemoveNameForAddress", +["not_found"] = "network.mojom.NetworkAnnotationMonitor.Report", +["not_found"] = "network.mojom.DurableMessageCollector.Configure", +["not_found"] = "network.mojom.DurableMessageCollector.Retrieve", +["not_found"] = "network.mojom.NetworkContext.SetClient", +["not_found"] = "network.mojom.NetworkContext.CreateURLLoaderFactory", +["not_found"] = "network.mojom.NetworkContext.ResetURLLoaderFactories", +["not_found"] = "network.mojom.NetworkContext.GetViaObliviousHttp", +["not_found"] = "network.mojom.NetworkContext.GetCookieManager", +["not_found"] = "network.mojom.NetworkContext.GetRestrictedCookieManager", +["not_found"] = "network.mojom.NetworkContext.GetTrustTokenQueryAnswerer", +["not_found"] = "network.mojom.NetworkContext.ClearTrustTokenData", +["not_found"] = "network.mojom.NetworkContext.ClearTrustTokenSessionOnlyData", +["not_found"] = "network.mojom.NetworkContext.GetStoredTrustTokenCounts", +["not_found"] = "network.mojom.NetworkContext.GetPrivateStateTokenRedemptionRecords", +["not_found"] = "network.mojom.NetworkContext.GetIpProxyStatus", +["not_found"] = "network.mojom.NetworkContext.SetBypassIpProtectionProxy", +["not_found"] = "network.mojom.NetworkContext.DeleteStoredTrustTokens", +["not_found"] = "network.mojom.NetworkContext.SetBlockTrustTokens", +["not_found"] = "network.mojom.NetworkContext.SetTrackingProtectionContentSetting", +["not_found"] = "network.mojom.NetworkContext.ClearNetworkingHistoryBetween", +["not_found"] = "network.mojom.NetworkContext.ClearHttpCache", +["not_found"] = "network.mojom.NetworkContext.ComputeHttpCacheSize", +["not_found"] = "network.mojom.NetworkContext.NotifyBrowserIdle", +["not_found"] = "network.mojom.NetworkContext.NotifyExternalCacheHit", +["not_found"] = "network.mojom.NetworkContext.ClearHostCache", +["not_found"] = "network.mojom.NetworkContext.ClearHttpAuthCache", +["not_found"] = "network.mojom.NetworkContext.ClearCorsPreflightCache", +["not_found"] = "network.mojom.NetworkContext.ClearReportingCacheReports", +["not_found"] = "network.mojom.NetworkContext.ClearReportingCacheClients", +["not_found"] = "network.mojom.NetworkContext.ClearNetworkErrorLogging", +["not_found"] = "network.mojom.NetworkContext.ClearDomainReliability", +["not_found"] = "network.mojom.NetworkContext.ClearSharedDictionaryCache", +["not_found"] = "network.mojom.NetworkContext.ClearSharedDictionaryCacheForIsolationKey", +["not_found"] = "network.mojom.NetworkContext.SetDocumentReportingEndpoints", +["not_found"] = "network.mojom.NetworkContext.SetEnterpriseReportingEndpoints", +["not_found"] = "network.mojom.NetworkContext.SendReportsAndRemoveSource", +["not_found"] = "network.mojom.NetworkContext.QueueReport", +["not_found"] = "network.mojom.NetworkContext.QueueEnterpriseReport", +["not_found"] = "network.mojom.NetworkContext.QueueSignedExchangeReport", +["not_found"] = "network.mojom.NetworkContext.CloseAllConnections", +["not_found"] = "network.mojom.NetworkContext.CloseIdleConnections", +["not_found"] = "network.mojom.NetworkContext.SetNetworkConditions", +["not_found"] = "network.mojom.NetworkContext.EnableDurableMessageCollector", +["not_found"] = "network.mojom.NetworkContext.SetAcceptLanguage", +["not_found"] = "network.mojom.NetworkContext.SetEnableReferrers", +["not_found"] = "network.mojom.NetworkContext.SetCTPolicy", +["not_found"] = "network.mojom.NetworkContext.CreateUDPSocket", +["not_found"] = "network.mojom.NetworkContext.CreateRestrictedUDPSocket", +["not_found"] = "network.mojom.NetworkContext.CreateTCPServerSocket", +["not_found"] = "network.mojom.NetworkContext.CreateTCPConnectedSocket", +["not_found"] = "network.mojom.NetworkContext.CreateTCPBoundSocket", +["not_found"] = "network.mojom.NetworkContext.CreateProxyResolvingSocketFactory", +["not_found"] = "network.mojom.NetworkContext.LookUpProxyForURL", +["not_found"] = "network.mojom.NetworkContext.ForceReloadProxyConfig", +["not_found"] = "network.mojom.NetworkContext.ClearBadProxiesCache", +["not_found"] = "network.mojom.NetworkContext.CreateWebSocket", +["not_found"] = "network.mojom.NetworkContext.CreateWebTransport", +["not_found"] = "network.mojom.NetworkContext.CreateNetLogExporter", +["not_found"] = "network.mojom.NetworkContext.PreconnectSockets", +["not_found"] = "network.mojom.NetworkContext.CreateP2PSocketManager", +["not_found"] = "network.mojom.NetworkContext.CreateMdnsResponder", +["not_found"] = "network.mojom.NetworkContext.ResolveHost", +["not_found"] = "network.mojom.NetworkContext.CreateHostResolver", +["not_found"] = "network.mojom.NetworkContext.VerifyCert", +["not_found"] = "network.mojom.NetworkContext.VerifyCertForSignedExchange", +["not_found"] = "network.mojom.NetworkContext.Verify2QwacCertBinding", +["not_found"] = "network.mojom.NetworkContext.AddHSTS", +["not_found"] = "network.mojom.NetworkContext.IsHSTSActiveForHost", +["not_found"] = "network.mojom.NetworkContext.GetHSTSState", +["not_found"] = "network.mojom.NetworkContext.SetCorsOriginAccessListsForOrigin", +["not_found"] = "network.mojom.NetworkContext.DeleteDynamicDataForHost", +["not_found"] = "network.mojom.NetworkContext.SetSplitAuthCacheByNetworkAnonymizationKey", +["not_found"] = "network.mojom.NetworkContext.SaveHttpAuthCacheProxyEntries", +["not_found"] = "network.mojom.NetworkContext.LoadHttpAuthCacheProxyEntries", +["not_found"] = "network.mojom.NetworkContext.AddAuthCacheEntry", +["not_found"] = "network.mojom.NetworkContext.SetCorsNonWildcardRequestHeadersSupport", +["not_found"] = "network.mojom.NetworkContext.EnableStaticKeyPinningForTesting", +["not_found"] = "network.mojom.NetworkContext.VerifyCertificateForTesting", +["not_found"] = "network.mojom.NetworkContext.GetTrustAnchorIDsForTesting", +["not_found"] = "network.mojom.NetworkContext.AddDomainReliabilityContextForTesting", +["not_found"] = "network.mojom.NetworkContext.ForceDomainReliabilityUploadsForTesting", +["not_found"] = "network.mojom.NetworkContext.SetSCTAuditingMode", +["not_found"] = "network.mojom.NetworkContext.AddReportingApiObserver", +["not_found"] = "network.mojom.NetworkContext.GetSharedDictionaryUsageInfo", +["not_found"] = "network.mojom.NetworkContext.GetSharedDictionaryInfo", +["not_found"] = "network.mojom.NetworkContext.GetSharedDictionaryOriginsBetween", +["not_found"] = "network.mojom.NetworkContext.SetSharedDictionaryCacheMaxSize", +["not_found"] = "network.mojom.NetworkContext.PreloadSharedDictionaryInfoForDocument", +["not_found"] = "network.mojom.NetworkContext.HasPreloadedSharedDictionaryInfoForTesting", +["not_found"] = "network.mojom.NetworkContext.FlushCachedClientCertIfNeeded", +["not_found"] = "network.mojom.NetworkContext.FlushMatchingCachedClientCert", +["not_found"] = "network.mojom.NetworkContext.SetCookieDeprecationLabel", +["not_found"] = "network.mojom.NetworkContext.RevokeNetworkForNonces", +["not_found"] = "network.mojom.NetworkContext.ClearNonces", +["not_found"] = "network.mojom.NetworkContext.ExemptUrlFromNetworkRevocationForNonce", +["not_found"] = "network.mojom.NetworkContext.Prefetch", +["not_found"] = "network.mojom.NetworkContext.GetBoundNetworkForTesting", +["not_found"] = "network.mojom.NetworkContext.GetDeviceBoundSessionManager", +["not_found"] = "network.mojom.NetworkContext.AddQuicHints", +["not_found"] = "network.mojom.NetworkContextClient.OnFileUploadRequested", +["not_found"] = "network.mojom.NetworkContextClient.OnCanSendReportingReports", +["not_found"] = "network.mojom.NetworkContextClient.OnCanSendDomainReliabilityUpload", +["not_found"] = "network.mojom.NetworkContextClient.OnCanSendSCTAuditingReport", +["not_found"] = "network.mojom.NetworkContextClient.OnNewSCTAuditingReportSent", +["not_found"] = "network.mojom.NetworkServiceTest.AddRules", +["not_found"] = "network.mojom.NetworkServiceTest.SimulateNetworkChange", +["not_found"] = "network.mojom.NetworkServiceTest.SimulateNetworkQualityChange", +["not_found"] = "network.mojom.NetworkServiceTest.ForceNetworkQualityEstimatorReportWifiAsSlow2G", +["not_found"] = "network.mojom.NetworkServiceTest.SimulateCrash", +["not_found"] = "network.mojom.NetworkServiceTest.MockCertVerifierSetDefaultResult", +["not_found"] = "network.mojom.NetworkServiceTest.MockCertVerifierAddResultForCertAndHost", +["not_found"] = "network.mojom.NetworkServiceTest.SetTransportSecurityStateTestSource", +["not_found"] = "network.mojom.NetworkServiceTest.SetAllowNetworkAccessToHostResolutions", +["not_found"] = "network.mojom.NetworkServiceTest.ReplaceSystemDnsConfig", +["not_found"] = "network.mojom.NetworkServiceTest.SetTestDohConfig", +["not_found"] = "network.mojom.NetworkServiceTest.CrashOnResolveHost", +["not_found"] = "network.mojom.NetworkServiceTest.CrashOnGetCookieList", +["not_found"] = "network.mojom.NetworkServiceTest.GetLatestMemoryPressureLevel", +["not_found"] = "network.mojom.NetworkServiceTest.GetPeerToPeerConnectionsCountChange", +["not_found"] = "network.mojom.NetworkServiceTest.GetEnvironmentVariableValue", +["not_found"] = "network.mojom.NetworkServiceTest.Log", +["not_found"] = "network.mojom.NetworkServiceTest.ActivateFieldTrial", +["not_found"] = "network.mojom.NetworkServiceTest.SetSCTAuditingRetryDelay", +["not_found"] = "network.mojom.NetworkServiceTest.OpenFile", +["not_found"] = "network.mojom.NetworkServiceTest.EnumerateFiles", +["not_found"] = "network.mojom.NetworkServiceTest.CreateSimpleCache", +["not_found"] = "network.mojom.NetworkServiceTest.MakeRequestToServer", +["not_found"] = "network.mojom.NetworkServiceTest.ResolveOwnHostnameWithSystemDns", +["not_found"] = "network.mojom.NetworkServiceTest.SetIPv6ProbeResult", +["not_found"] = "network.mojom.NetworkServiceTest.GetAddressMapCacheLinux", +["not_found"] = "network.mojom.NetworkServiceTest.AllowsGSSAPILibraryLoad", +["not_found"] = "network.mojom.NetworkServiceTest.DisableExclusiveCookieDatabaseLockingForTesting", +["not_found"] = "network.mojom.NetworkServiceTest.IsHappyEyeballsV3Enabled", +["not_found"] = "network.mojom.SocketBroker.CreateTcpSocket", +["not_found"] = "network.mojom.SocketBroker.CreateUdpSocket", +["not_found"] = "network.mojom.SocketObserver.OnReadError", +["not_found"] = "network.mojom.SocketObserver.OnWriteError", +["not_found"] = "network.mojom.URLLoaderFactory.CreateLoaderAndStart", +["not_found"] = "network.mojom.URLLoaderFactory.Clone", +["not_found"] = "network.mojom.P2PSocketClient.SocketCreated", +["not_found"] = "network.mojom.P2PSocketClient.SendComplete", +["not_found"] = "network.mojom.P2PSocketClient.SendBatchComplete", +["not_found"] = "network.mojom.P2PSocketClient.DataReceived", +["not_found"] = "network.mojom.P2PSocketManager.StartNetworkNotifications", +["not_found"] = "network.mojom.P2PSocketManager.GetHostAddress", +["not_found"] = "network.mojom.P2PSocketManager.CreateSocket", +["not_found"] = "network.mojom.P2PNetworkNotificationClient.NetworkListChanged", +["not_found"] = "network.mojom.MdnsListenClient.OnAddressResult", +["not_found"] = "network.mojom.MdnsListenClient.OnTextResult", +["not_found"] = "network.mojom.MdnsListenClient.OnHostnameResult", +["not_found"] = "network.mojom.MdnsListenClient.OnUnhandledResult", +["not_found"] = "network.mojom.HostResolver.ResolveHost", +["not_found"] = "network.mojom.HostResolver.MdnsListen", +["not_found"] = "network.mojom.DnsConfigChangeManager.RequestNotifications", +["not_found"] = "network.mojom.DnsConfigChangeManagerClient.OnDnsConfigChanged", +["not_found"] = "ip_protection.mojom.CoreControlTest.VerifyIpProtectionCoreHostForTesting", +["not_found"] = "ip_protection.mojom.CoreControlTest.IsIpProtectionEnabledForTesting", +["not_found"] = "ip_protection.mojom.CoreControlTest.GetAuthTokenForTesting", +["not_found"] = "ip_protection.mojom.CoreControlTest.HasTrackingProtectionExceptionForTesting", +["not_found"] = "media.mojom.AudioDecoder.GetSupportedConfigs", +["not_found"] = "media.mojom.AudioDecoder.Construct", +["not_found"] = "media.mojom.AudioDecoder.Initialize", +["not_found"] = "media.mojom.AudioDecoder.SetDataSource", +["not_found"] = "media.mojom.AudioDecoder.Decode", +["not_found"] = "media.mojom.AudioDecoder.Reset", +["not_found"] = "media.mojom.AudioLog.OnCreated", +["not_found"] = "media.mojom.AudioLog.OnStarted", +["not_found"] = "media.mojom.AudioLog.OnStopped", +["not_found"] = "media.mojom.AudioLog.OnClosed", +["not_found"] = "media.mojom.AudioLog.OnError", +["not_found"] = "media.mojom.AudioLog.OnSetVolume", +["not_found"] = "media.mojom.AudioLog.OnProcessingStateChanged", +["not_found"] = "media.mojom.AudioLog.OnLogMessage", +["not_found"] = "media.mojom.AudioOutputStreamProvider.Acquire", +["not_found"] = "media.mojom.AudioOutputStream.Play", +["not_found"] = "media.mojom.AudioOutputStream.Pause", +["not_found"] = "media.mojom.AudioOutputStream.Flush", +["not_found"] = "media.mojom.AudioOutputStream.SetVolume", +["not_found"] = "media.mojom.DeviceSwitchInterface.SwitchAudioOutputDeviceId", +["not_found"] = "media.mojom.AudioOutputStreamObserver.DidStartPlaying", +["not_found"] = "media.mojom.AudioOutputStreamObserver.DidStopPlaying", +["not_found"] = "media.mojom.AudioOutputStreamObserver.DidChangeAudibleState", +["not_found"] = "media.mojom.AudioProcessorControls.GetStats", +["not_found"] = "media.mojom.AudioProcessorControls.SetPreferredNumCaptureChannels", +["not_found"] = "media.mojom.InterfaceFactory.CreateAudioDecoder", +["not_found"] = "media.mojom.InterfaceFactory.CreateVideoDecoder", +["not_found"] = "media.mojom.InterfaceFactory.CreateVideoDecoderWithTracker", +["not_found"] = "media.mojom.InterfaceFactory.CreateAudioEncoder", +["not_found"] = "media.mojom.InterfaceFactory.CreateDefaultRenderer", +["not_found"] = "media.mojom.InterfaceFactory.CreateCastRenderer", +["not_found"] = "media.mojom.InterfaceFactory.CreateMediaFoundationRenderer", +["not_found"] = "media.mojom.InterfaceFactory.CreateFlingingRenderer", +["not_found"] = "media.mojom.InterfaceFactory.CreateCdm", +["not_found"] = "media.mojom.MediaMetricsProvider.Initialize", +["not_found"] = "media.mojom.MediaMetricsProvider.OnStarted", +["not_found"] = "media.mojom.MediaMetricsProvider.OnError", +["not_found"] = "media.mojom.MediaMetricsProvider.OnFallback", +["not_found"] = "media.mojom.MediaMetricsProvider.SetHasPlayed", +["not_found"] = "media.mojom.MediaMetricsProvider.SetHaveEnough", +["not_found"] = "media.mojom.MediaMetricsProvider.SetIsEME", +["not_found"] = "media.mojom.MediaMetricsProvider.SetTimeToMetadata", +["not_found"] = "media.mojom.MediaMetricsProvider.SetTimeToFirstFrame", +["not_found"] = "media.mojom.MediaMetricsProvider.SetTimeToPlayReady", +["not_found"] = "media.mojom.MediaMetricsProvider.SetRendererType", +["not_found"] = "media.mojom.MediaMetricsProvider.SetDemuxerType", +["not_found"] = "media.mojom.MediaMetricsProvider.SetKeySystem", +["not_found"] = "media.mojom.MediaMetricsProvider.SetHasWaitingForKey", +["not_found"] = "media.mojom.MediaMetricsProvider.SetIsHardwareSecure", +["not_found"] = "media.mojom.MediaMetricsProvider.SetContainerName", +["not_found"] = "media.mojom.MediaMetricsProvider.AcquireWatchTimeRecorder", +["not_found"] = "media.mojom.MediaMetricsProvider.AcquireVideoDecodeStatsRecorder", +["not_found"] = "media.mojom.MediaMetricsProvider.AcquirePlaybackEventsRecorder", +["not_found"] = "media.mojom.MediaMetricsProvider.SetHasAudio", +["not_found"] = "media.mojom.MediaMetricsProvider.SetHasVideo", +["not_found"] = "media.mojom.MediaMetricsProvider.SetVideoPipelineInfo", +["not_found"] = "media.mojom.MediaMetricsProvider.SetAudioPipelineInfo", +["not_found"] = "media.mojom.MediaPlayerObserverClient.GetHasPlayedBefore", +["not_found"] = "media.mojom.MediaPlayerHost.OnMediaPlayerAdded", +["not_found"] = "media.mojom.MediaPlayerObserver.OnMediaPlaying", +["not_found"] = "media.mojom.MediaPlayerObserver.OnMediaPaused", +["not_found"] = "media.mojom.MediaPlayerObserver.OnMutedStatusChanged", +["not_found"] = "media.mojom.MediaPlayerObserver.OnMediaMetadataChanged", +["not_found"] = "media.mojom.MediaPlayerObserver.OnMediaPositionStateChanged", +["not_found"] = "media.mojom.MediaPlayerObserver.OnMediaEffectivelyFullscreenChanged", +["not_found"] = "media.mojom.MediaPlayerObserver.OnMediaSizeChanged", +["not_found"] = "media.mojom.MediaPlayerObserver.OnPictureInPictureAvailabilityChanged", +["not_found"] = "media.mojom.MediaPlayerObserver.OnAudioOutputSinkChanged", +["not_found"] = "media.mojom.MediaPlayerObserver.OnUseAudioServiceChanged", +["not_found"] = "media.mojom.MediaPlayerObserver.OnAudioOutputSinkChangingDisabled", +["not_found"] = "media.mojom.MediaPlayerObserver.OnRemotePlaybackMetadataChange", +["not_found"] = "media.mojom.MediaPlayerObserver.OnVideoVisibilityChanged", +["not_found"] = "media.mojom.MediaPlayer.RequestPlay", +["not_found"] = "media.mojom.MediaPlayer.RequestPause", +["not_found"] = "media.mojom.MediaPlayer.RequestSeekForward", +["not_found"] = "media.mojom.MediaPlayer.RequestSeekBackward", +["not_found"] = "media.mojom.MediaPlayer.RequestSeekTo", +["not_found"] = "media.mojom.MediaPlayer.RequestEnterPictureInPicture", +["not_found"] = "media.mojom.MediaPlayer.RequestMute", +["not_found"] = "media.mojom.MediaPlayer.SetVolumeMultiplier", +["not_found"] = "media.mojom.MediaPlayer.SetPersistentState", +["not_found"] = "media.mojom.MediaPlayer.SetPowerExperimentState", +["not_found"] = "media.mojom.MediaPlayer.SetAudioSinkId", +["not_found"] = "media.mojom.MediaPlayer.SuspendForFrameClosed", +["not_found"] = "media.mojom.MediaPlayer.RequestMediaRemoting", +["not_found"] = "media.mojom.MediaPlayer.RequestVisibility", +["not_found"] = "media.mojom.MediaPlayer.RecordAutoPictureInPictureInfo ", +["not_found"] = "media.mojom.MediaService.CreateInterfaceFactory", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnPlaying", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnPaused", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnSeeking", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnEnded", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnError", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnBuffering", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnBufferingComplete", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnNaturalSizeChanged", +["not_found"] = "media.mojom.PlaybackEventsRecorder.OnPipelineStatistics", +["not_found"] = "media.mojom.VideoDecodePerfHistory.GetPerfInfo", +["not_found"] = "media.mojom.VideoDecodeStatsRecorder.StartNewRecord", +["not_found"] = "media.mojom.VideoDecodeStatsRecorder.UpdateRecord", +["not_found"] = "media.mojom.VideoDecoder.GetSupportedConfigs", +["not_found"] = "media.mojom.VideoDecoder.Construct", +["not_found"] = "media.mojom.VideoDecoder.Initialize", +["not_found"] = "media.mojom.VideoDecoder.Decode", +["not_found"] = "media.mojom.VideoDecoder.Reset", +["not_found"] = "media.mojom.VideoDecoder.OnOverlayInfoChanged", +["not_found"] = "media.mojom.VideoFrameHandleReleaser.ReleaseVideoFrame", +["not_found"] = "media.mojom.VideoDecoderClient.OnVideoFrameDecoded", +["not_found"] = "media.mojom.VideoDecoderClient.OnWaiting", +["not_found"] = "media.mojom.VideoDecoderClient.RequestOverlayInfo", +["not_found"] = "media.mojom.WebrtcVideoPerfHistory.GetPerfInfo", +["not_found"] = "media.mojom.SpeechRecognitionService.BindSpeechRecognitionContext", +["not_found"] = "media.mojom.SpeechRecognitionService.BindAudioSourceSpeechRecognitionContext", +["not_found"] = "media.mojom.SpeechRecognitionService.SetSodaPaths", +["not_found"] = "media.mojom.SpeechRecognitionService.SetSodaParams", +["not_found"] = "media.mojom.SpeechRecognitionService.SetSodaConfigPaths", +["not_found"] = "media.mojom.AudioSourceSpeechRecognitionContext.BindAudioSourceFetcher", +["not_found"] = "gpu.mojom.OverlayStateObserver.OnStateChanged", +["not_found"] = "gpu.mojom.GpuChannel.CrashForTesting", +["not_found"] = "gpu.mojom.GpuChannel.TerminateForTesting", +["not_found"] = "gpu.mojom.GpuChannel.GetChannelToken", +["not_found"] = "gpu.mojom.GpuChannel.Flush", +["not_found"] = "gpu.mojom.GpuChannel.GetSharedMemoryForFlushId", +["not_found"] = "gpu.mojom.GpuChannel.CreateCommandBuffer", +["not_found"] = "gpu.mojom.GpuChannel.DestroyCommandBuffer", +["not_found"] = "gpu.mojom.GpuChannel.FlushDeferredRequests", +["not_found"] = "gpu.mojom.GpuChannel.CreateGpuMemoryBuffer", +["not_found"] = "gpu.mojom.GpuChannel.CreateDCOMPTexture", +["not_found"] = "gpu.mojom.GpuChannel.RegisterOverlayStateObserver", +["not_found"] = "gpu.mojom.GpuChannel.WaitForTokenInRange", +["not_found"] = "gpu.mojom.GpuChannel.WaitForGetOffsetInRange", +["not_found"] = "gpu.mojom.GpuChannel.CopyToGpuMemoryBufferAsync", +["not_found"] = "gpu.mojom.GpuChannel.CopyNativeGmbToSharedMemoryAsync", +["unscrambled_0"] = "media.mojom.SpeechRecognitionContext.BindRecognizer@0", +["unscrambled_1"] = "media.mojom.SpeechRecognitionContext.BindWebSpeechRecognizer@1", +["unscrambled_0"] = "media.mojom.SpeechRecognitionRecognizer.SendAudioToSpeechRecognitionService@0", +["unscrambled_1"] = "media.mojom.SpeechRecognitionRecognizer.MarkDone@1", +["unscrambled_2"] = "media.mojom.SpeechRecognitionRecognizer.OnLanguageChanged@2", +["unscrambled_3"] = "media.mojom.SpeechRecognitionRecognizer.OnMaskOffensiveWordsChanged@3", +["unscrambled_4"] = "media.mojom.SpeechRecognitionRecognizer.UpdateRecognitionContext@4", +["unscrambled_0"] = "media.mojom.SpeechRecognitionRecognizerClient.OnSpeechRecognitionRecognitionEvent@0", +["unscrambled_1"] = "media.mojom.SpeechRecognitionRecognizerClient.OnSpeechRecognitionStopped@1", +["unscrambled_2"] = "media.mojom.SpeechRecognitionRecognizerClient.OnSpeechRecognitionError@2", +["unscrambled_3"] = "media.mojom.SpeechRecognitionRecognizerClient.OnLanguageIdentificationEvent@3", +["unscrambled_0"] = "media.mojom.SpeechRecognitionBrowserObserver.SpeechRecognitionAvailabilityChanged@0", +["unscrambled_1"] = "media.mojom.SpeechRecognitionBrowserObserver.SpeechRecognitionLanguageChanged@1", +["unscrambled_2"] = "media.mojom.SpeechRecognitionBrowserObserver.SpeechRecognitionMaskOffensiveWordsChanged@2", +["unscrambled_0"] = "media.mojom.SpeechRecognitionClientBrowserInterface.BindSpeechRecognitionBrowserObserver@0", +["unscrambled_1"] = "media.mojom.SpeechRecognitionClientBrowserInterface.REMOVED_1@1", +["unscrambled_0"] = "media.mojom.SpeechRecognitionAudioForwarder.AddAudioFromRenderer@1", +["unscrambled_0"] = "media.mojom.SpeechRecognitionSessionClient.ResultRetrieved@0", +["unscrambled_1"] = "media.mojom.SpeechRecognitionSessionClient.ErrorOccurred@1", +["unscrambled_2"] = "media.mojom.SpeechRecognitionSessionClient.Started@2", +["unscrambled_3"] = "media.mojom.SpeechRecognitionSessionClient.AudioStarted@3", +["unscrambled_4"] = "media.mojom.SpeechRecognitionSessionClient.SoundStarted@4", +["unscrambled_5"] = "media.mojom.SpeechRecognitionSessionClient.SoundEnded@5", +["unscrambled_6"] = "media.mojom.SpeechRecognitionSessionClient.AudioEnded@6", +["unscrambled_7"] = "media.mojom.SpeechRecognitionSessionClient.Ended@7", +["not_found"] = "media.mojom.OnDeviceSpeechRecognition.Available", +["not_found"] = "media.mojom.OnDeviceSpeechRecognition.Install", +["not_found"] = "media.mojom.SpeechRecognizer.Start", +["unscrambled_0"] = "media.mojom.SpeechRecognitionSession.Abort@0", +["unscrambled_1"] = "media.mojom.SpeechRecognitionSession.StopCapture@1", +["unscrambled_2"] = "media.mojom.SpeechRecognitionSession.UpdateRecognitionContext@2", +["not_found"] = "metrics.mojom.ChildHistogramFetcherFactory.CreateFetcher", +["not_found"] = "metrics.mojom.ChildHistogramFetcher.GetChildNonPersistentHistogramData", +["not_found"] = "metrics.mojom.ChildHistogramFetcher.Ping", +["not_found"] = "blink.mojom.BucketHost.Persist", +["not_found"] = "blink.mojom.BucketHost.Persisted", +["not_found"] = "blink.mojom.BucketHost.Estimate", +["not_found"] = "blink.mojom.BucketHost.Durability", +["not_found"] = "blink.mojom.BucketHost.SetExpires", +["not_found"] = "blink.mojom.BucketHost.Expires", +["not_found"] = "blink.mojom.BucketHost.GetIdbFactory", +["not_found"] = "blink.mojom.BucketHost.GetLockManager", +["not_found"] = "blink.mojom.BucketHost.GetCaches", +["not_found"] = "blink.mojom.BucketHost.GetDirectory", +["not_found"] = "blink.mojom.BucketHost.GetDirectoryForDevtools", +["not_found"] = "blink.mojom.BucketManagerHost.OpenBucket", +["not_found"] = "blink.mojom.BucketManagerHost.GetBucketForDevtools", +["not_found"] = "blink.mojom.BucketManagerHost.Keys", +["not_found"] = "blink.mojom.BucketManagerHost.DeleteBucket", +["not_found"] = "blink.mojom.IDBFactoryClient.Error", +["not_found"] = "blink.mojom.IDBFactoryClient.Blocked", +["not_found"] = "blink.mojom.IDBFactoryClient.UpgradeNeeded", +["not_found"] = "blink.mojom.IDBFactoryClient.OpenSuccess", +["not_found"] = "blink.mojom.IDBFactoryClient.DeleteSuccess", +["not_found"] = "blink.mojom.IDBDatabaseCallbacks.ForcedClose", +["not_found"] = "blink.mojom.IDBDatabaseCallbacks.VersionChange", +["not_found"] = "blink.mojom.IDBDatabaseCallbacks.Abort", +["not_found"] = "blink.mojom.IDBDatabaseCallbacks.Complete", +["not_found"] = "blink.mojom.IDBDatabase.RenameObjectStore", +["not_found"] = "blink.mojom.IDBDatabase.CreateTransaction", +["not_found"] = "blink.mojom.IDBDatabase.VersionChangeIgnored", +["not_found"] = "blink.mojom.IDBDatabase.Get", +["not_found"] = "blink.mojom.IDBDatabase.GetAll", +["not_found"] = "blink.mojom.IDBDatabase.OpenCursor", +["not_found"] = "blink.mojom.IDBDatabase.Count", +["not_found"] = "blink.mojom.IDBDatabase.DeleteRange", +["not_found"] = "blink.mojom.IDBDatabase.GetKeyGeneratorCurrentNumber", +["not_found"] = "blink.mojom.IDBDatabase.Clear", +["not_found"] = "blink.mojom.IDBDatabase.CreateIndex", +["not_found"] = "blink.mojom.IDBDatabase.DeleteIndex", +["not_found"] = "blink.mojom.IDBDatabase.RenameIndex", +["not_found"] = "blink.mojom.IDBDatabase.Abort", +["not_found"] = "blink.mojom.IDBDatabase.DidBecomeInactive", +["not_found"] = "blink.mojom.IDBDatabase.UpdatePriority", +["not_found"] = "blink.mojom.IDBDatabaseGetAllResultSink.ReceiveResults", +["not_found"] = "blink.mojom.IDBDatabaseGetAllResultSink.OnError", +["not_found"] = "blink.mojom.IDBCursor.Advance", +["not_found"] = "blink.mojom.IDBCursor.Continue", +["not_found"] = "blink.mojom.IDBCursor.Prefetch", +["not_found"] = "blink.mojom.IDBCursor.PrefetchReset", +["not_found"] = "blink.mojom.IDBTransaction.CreateObjectStore", +["not_found"] = "blink.mojom.IDBTransaction.DeleteObjectStore", +["not_found"] = "blink.mojom.IDBTransaction.Put", +["not_found"] = "blink.mojom.IDBTransaction.SetIndexKeys", +["not_found"] = "blink.mojom.IDBTransaction.SetIndexKeysDone", +["not_found"] = "blink.mojom.IDBTransaction.Commit", +["not_found"] = "blink.mojom.SharedStorageWorkletHost.SelectURL", +["not_found"] = "blink.mojom.SharedStorageWorkletHost.Run", +["not_found"] = "blink.mojom.SharedStorageDocumentService.CreateWorklet", +["not_found"] = "blink.mojom.SharedStorageDocumentService.SharedStorageGet", +["not_found"] = "blink.mojom.SharedStorageDocumentService.SharedStorageUpdate", +["not_found"] = "blink.mojom.SharedStorageDocumentService.SharedStorageBatchUpdate", +["not_found"] = "blink.mojom.SharedStorageEntriesListener.DidReadEntries", +["not_found"] = "blink.mojom.SharedStorageWorkletService.Initialize", +["not_found"] = "blink.mojom.SharedStorageWorkletService.AddModule", +["not_found"] = "blink.mojom.SharedStorageWorkletService.RunURLSelectionOperation", +["not_found"] = "blink.mojom.SharedStorageWorkletService.RunOperation", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageUpdate", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageBatchUpdate", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageGet", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageKeys", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageEntries", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageLength", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.SharedStorageRemainingBudget", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.GetInterestGroups", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.DidAddMessageToConsole", +["not_found"] = "blink.mojom.SharedStorageWorkletServiceClient.RecordUseCounters", +["not_found"] = "blink.mojom.Blob.Clone", +["not_found"] = "blink.mojom.Blob.AsDataPipeGetter", +["not_found"] = "blink.mojom.Blob.ReadAll", +["not_found"] = "blink.mojom.Blob.ReadRange", +["not_found"] = "blink.mojom.Blob.Load", +["not_found"] = "blink.mojom.Blob.ReadSideData", +["not_found"] = "blink.mojom.Blob.CaptureSnapshot", +["not_found"] = "blink.mojom.Blob.GetInternalUUID", +["not_found"] = "blink.mojom.BlobReaderClient.OnCalculatedSize", +["not_found"] = "blink.mojom.BlobReaderClient.OnComplete", +["not_found"] = "blink.mojom.ProgressClient.OnProgress", +["not_found"] = "blink.mojom.BlobRegistry.Register", +["not_found"] = "blink.mojom.BlobRegistry.RegisterFromStream", +["not_found"] = "blink.mojom.BlobURLStore.Register", +["not_found"] = "blink.mojom.BlobURLStore.Revoke", +["not_found"] = "blink.mojom.BlobURLStore.ResolveAsURLLoaderFactory", +["not_found"] = "blink.mojom.BlobURLStore.ResolveAsBlobURLToken", +["not_found"] = "blink.mojom.BlobURLToken.Clone", +["not_found"] = "blink.mojom.BlobURLToken.GetToken", +["not_found"] = "blink.mojom.BytesProvider.RequestAsReply", +["not_found"] = "blink.mojom.BytesProvider.RequestAsStream", +["not_found"] = "blink.mojom.BytesProvider.RequestAsFile", +["not_found"] = "blink.mojom.FileBackedBlobFactory.RegisterBlob", +["not_found"] = "blink.mojom.FileBackedBlobFactory.RegisterBlobSync", +["not_found"] = "blink.mojom.ContactsManager.Select", +["not_found"] = "blink.mojom.CredentialManager.Store", +["not_found"] = "blink.mojom.CredentialManager.PreventSilentAccess", +["not_found"] = "blink.mojom.CredentialManager.Get", +["not_found"] = "payments.mojom.DigitalGoods.GetDetails", +["not_found"] = "payments.mojom.DigitalGoods.ListPurchases", +["not_found"] = "payments.mojom.DigitalGoods.ListPurchaseHistory", +["not_found"] = "payments.mojom.DigitalGoods.Consume", +["not_found"] = "payments.mojom.DigitalGoodsFactory.CreateDigitalGoods", +["not_found"] = "blink.mojom.DocumentMetadata.GetEntities", +["not_found"] = "handwriting.mojom.HandwritingRecognizer.GetPrediction", +["not_found"] = "handwriting.mojom.HandwritingRecognitionService.CreateHandwritingRecognizer", +["not_found"] = "handwriting.mojom.HandwritingRecognitionService.QueryHandwritingRecognizer", +["not_found"] = "blink.mojom.TextSuggestionHost.StartSuggestionMenuTimer", +["not_found"] = "blink.mojom.TextSuggestionHost.ShowSpellCheckSuggestionMenu", +["not_found"] = "blink.mojom.TextSuggestionHost.ShowTextSuggestionMenu", +["not_found"] = "blink.mojom.TextSuggestionBackend.ApplySpellCheckSuggestion", +["not_found"] = "blink.mojom.TextSuggestionBackend.ApplyTextSuggestion", +["not_found"] = "blink.mojom.TextSuggestionBackend.DeleteActiveSuggestionRange", +["not_found"] = "blink.mojom.TextSuggestionBackend.OnNewWordAddedToDictionary", +["not_found"] = "blink.mojom.TextSuggestionBackend.OnSuggestionMenuClosed", +["not_found"] = "blink.mojom.TextSuggestionBackend.SuggestionMenuTimeoutCallback", +["not_found"] = "blink.mojom.InstallationService.OnInstall", +["not_found"] = "blink.mojom.InstalledAppProvider.FilterInstalledApps", +["not_found"] = "blink.mojom.MediaSessionService.SetClient", +["not_found"] = "blink.mojom.MediaSessionService.SetPlaybackState", +["not_found"] = "blink.mojom.MediaSessionService.SetPositionState", +["not_found"] = "blink.mojom.MediaSessionService.SetMetadata", +["not_found"] = "blink.mojom.MediaSessionService.SetMicrophoneState", +["not_found"] = "blink.mojom.MediaSessionService.SetCameraState", +["not_found"] = "blink.mojom.MediaSessionService.EnableAction", +["not_found"] = "blink.mojom.MediaSessionService.DisableAction", +["not_found"] = "blink.mojom.MediaSessionClient.DidReceiveAction", +["not_found"] = "payments.mojom.PaymentHandlerHost.ChangePaymentMethod", +["not_found"] = "payments.mojom.PaymentHandlerHost.ChangeShippingOption", +["not_found"] = "payments.mojom.PaymentHandlerHost.ChangeShippingAddress", +["not_found"] = "payments.mojom.PaymentRequestClient.OnPaymentMethodChange", +["not_found"] = "payments.mojom.PaymentRequestClient.OnShippingAddressChange", +["not_found"] = "payments.mojom.PaymentRequestClient.OnShippingOptionChange", +["not_found"] = "payments.mojom.PaymentRequestClient.OnPayerDetailChange", +["not_found"] = "payments.mojom.PaymentRequestClient.OnPaymentResponse", +["not_found"] = "payments.mojom.PaymentRequestClient.OnError", +["not_found"] = "payments.mojom.PaymentRequestClient.OnComplete", +["not_found"] = "payments.mojom.PaymentRequestClient.OnAbort", +["not_found"] = "payments.mojom.PaymentRequestClient.OnCanMakePayment", +["not_found"] = "payments.mojom.PaymentRequestClient.OnHasEnrolledInstrument", +["not_found"] = "payments.mojom.PaymentRequestClient.WarnNoFavicon", +["not_found"] = "payments.mojom.PaymentRequestClient.AllowConnectToSource", +["not_found"] = "payments.mojom.PaymentRequest.Init", +["not_found"] = "payments.mojom.PaymentRequest.Show", +["not_found"] = "payments.mojom.PaymentRequest.UpdateWith", +["not_found"] = "payments.mojom.PaymentRequest.OnPaymentDetailsNotUpdated", +["not_found"] = "payments.mojom.PaymentRequest.Abort", +["not_found"] = "payments.mojom.PaymentRequest.Complete", +["not_found"] = "payments.mojom.PaymentRequest.Retry", +["not_found"] = "payments.mojom.PaymentRequest.CanMakePayment", +["not_found"] = "payments.mojom.PaymentRequest.HasEnrolledInstrument", +["not_found"] = "payments.mojom.SecurePaymentConfirmationService.SecurePaymentConfirmationAvailability", +["not_found"] = "payments.mojom.SecurePaymentConfirmationService.StorePaymentCredential", +["not_found"] = "payments.mojom.SecurePaymentConfirmationService.MakePaymentCredential", +["not_found"] = "blink.mojom.Authenticator.MakeCredential", +["not_found"] = "blink.mojom.Authenticator.GetCredential", +["not_found"] = "blink.mojom.Authenticator.IsUserVerifyingPlatformAuthenticatorAvailable", +["not_found"] = "blink.mojom.Authenticator.IsConditionalMediationAvailable", +["not_found"] = "blink.mojom.Authenticator.Report", +["not_found"] = "blink.mojom.Authenticator.GetClientCapabilities", +["not_found"] = "blink.mojom.Authenticator.Cancel", +["not_found"] = "blink.mojom.ShareService.Share", +["unscrambled_0"] = "device.mojom.HidManagerClient.DeviceAdded@0", +["unscrambled_1"] = "device.mojom.HidManagerClient.DeviceRemoved@1", +["unscrambled_2"] = "device.mojom.HidManagerClient.DeviceChanged@2", +["unscrambled_0"] = "device.mojom.HidManager.GetDevicesAndSetClient@0", +["unscrambled_1"] = "device.mojom.HidManager.GetDevices@1", +["unscrambled_2"] = "device.mojom.HidManager.Connect@2", +["unscrambled_3"] = "device.mojom.HidManager.AddReceiver@3", +["unscrambled_0"] = "device.mojom.HidConnection.Read@0", +["unscrambled_1"] = "device.mojom.HidConnection.Write@1", +["unscrambled_2"] = "device.mojom.HidConnection.GetFeatureReport@2", +["unscrambled_3"] = "device.mojom.HidConnection.SendFeatureReport@3", +["unscrambled_0"] = "device.mojom.HidConnectionClient.OnInputReport@0", +["not_found"] = "device.mojom.NFC.SetClient", +["not_found"] = "device.mojom.NFC.Push", +["not_found"] = "device.mojom.NFC.CancelPush", +["not_found"] = "device.mojom.NFC.MakeReadOnly", +["not_found"] = "device.mojom.NFC.CancelMakeReadOnly", +["not_found"] = "device.mojom.NFC.Watch", +["not_found"] = "device.mojom.NFC.CancelWatch", +["not_found"] = "device.mojom.NFCClient.OnWatch", +["not_found"] = "device.mojom.NFCClient.OnError", +["not_found"] = "device.mojom.PowerMonitor.AddClient", +["not_found"] = "device.mojom.PowerMonitorClient.PowerStateChange", +["not_found"] = "device.mojom.PowerMonitorClient.Suspend", +["not_found"] = "device.mojom.PowerMonitorClient.Resume", +["not_found"] = "device.mojom.ScreenOrientationListener.IsAutoRotateEnabledByUser", +["not_found"] = "device.mojom.SmartCardTransaction.EndTransaction", +["not_found"] = "device.mojom.SmartCardConnection.Disconnect", +["not_found"] = "device.mojom.SmartCardConnection.Transmit", +["not_found"] = "device.mojom.SmartCardConnection.Control", +["not_found"] = "device.mojom.SmartCardConnection.GetAttrib", +["not_found"] = "device.mojom.SmartCardConnection.SetAttrib", +["not_found"] = "device.mojom.SmartCardConnection.Status", +["not_found"] = "device.mojom.SmartCardConnection.BeginTransaction", +["not_found"] = "device.mojom.SmartCardContext.ListReaders", +["not_found"] = "device.mojom.SmartCardContext.GetStatusChange", +["not_found"] = "device.mojom.SmartCardContext.Cancel", +["not_found"] = "device.mojom.SmartCardContext.Connect", +["not_found"] = "device.mojom.TimeZoneMonitor.AddClient", +["not_found"] = "device.mojom.TimeZoneMonitorClient.OnTimeZoneChange", +["not_found"] = "device.mojom.VibrationManagerListener.OnVibrate", +["not_found"] = "device.mojom.VibrationManager.Vibrate", +["not_found"] = "device.mojom.VibrationManager.Cancel", +["not_found"] = "device.mojom.WakeLock.RequestWakeLock", +["not_found"] = "device.mojom.WakeLock.CancelWakeLock", +["not_found"] = "device.mojom.WakeLock.AddClient", +["not_found"] = "device.mojom.WakeLock.ChangeType", +["not_found"] = "device.mojom.WakeLock.HasWakeLockForTests", +["not_found"] = "device.mojom.WakeLockObserver.OnWakeLockDeactivated", +["not_found"] = "payments.facilitated.mojom.PixCodeValidator.ValidatePixCode", +["not_found"] = "data_decoder.mojom.CborParser.Parse", +["not_found"] = "data_decoder.mojom.DataDecoderService.BindImageDecoder", +["not_found"] = "data_decoder.mojom.DataDecoderService.BindXmlParser", +["not_found"] = "data_decoder.mojom.DataDecoderService.BindWebBundleParserFactory", +["not_found"] = "data_decoder.mojom.DataDecoderService.BindGzipper", +["not_found"] = "data_decoder.mojom.DataDecoderService.BindStructuredHeadersParser", +["not_found"] = "data_decoder.mojom.DataDecoderService.BindCborParser", +["not_found"] = "data_decoder.mojom.DataDecoderService.BindPixCodeValidator", +["not_found"] = "data_decoder.mojom.Gzipper.Deflate", +["not_found"] = "data_decoder.mojom.Gzipper.Inflate", +["not_found"] = "data_decoder.mojom.Gzipper.Compress", +["not_found"] = "data_decoder.mojom.Gzipper.Uncompress", +["not_found"] = "data_decoder.mojom.StructuredHeadersParser.ParseItem", +["not_found"] = "data_decoder.mojom.StructuredHeadersParser.ParseList", +["not_found"] = "data_decoder.mojom.StructuredHeadersParser.ParseDictionary", +["not_found"] = "data_decoder.mojom.ImageDecoder.DecodeImage", +["not_found"] = "data_decoder.mojom.ImageDecoder.DecodeAnimation", +["not_found"] = "web_package.mojom.WebBundleParserFactory.GetParserForDataSource", +["not_found"] = "web_package.mojom.WebBundleParserFactory.BindFileDataSource", +["not_found"] = "web_package.mojom.WebBundleParser.ParseIntegrityBlock", +["not_found"] = "web_package.mojom.WebBundleParser.ParseMetadata", +["not_found"] = "web_package.mojom.WebBundleParser.ParseResponse", +["not_found"] = "web_package.mojom.WebBundleParser.Close", +["not_found"] = "device.mojom.GeolocationInternalsObserver.OnDiagnosticsChanged", +["not_found"] = "device.mojom.GeolocationInternalsObserver.OnNetworkLocationRequested", +["not_found"] = "device.mojom.GeolocationInternalsObserver.OnNetworkLocationReceived", +["not_found"] = "device.mojom.UsbDevice.Open", +["not_found"] = "device.mojom.UsbDevice.Close", +["not_found"] = "device.mojom.UsbDevice.SetConfiguration", +["not_found"] = "device.mojom.UsbDevice.ClaimInterface", +["not_found"] = "device.mojom.UsbDevice.ReleaseInterface", +["not_found"] = "device.mojom.UsbDevice.SetInterfaceAlternateSetting", +["not_found"] = "device.mojom.UsbDevice.Reset", +["not_found"] = "device.mojom.UsbDevice.ClearHalt", +["not_found"] = "device.mojom.UsbDevice.ControlTransferIn", +["not_found"] = "device.mojom.UsbDevice.ControlTransferOut", +["not_found"] = "device.mojom.UsbDevice.GenericTransferIn", +["not_found"] = "device.mojom.UsbDevice.GenericTransferOut", +["not_found"] = "device.mojom.UsbDevice.IsochronousTransferIn", +["not_found"] = "device.mojom.UsbDevice.IsochronousTransferOut", +["not_found"] = "device.mojom.UsbDeviceClient.OnDeviceOpened", +["not_found"] = "device.mojom.UsbDeviceClient.OnDeviceClosed", +["not_found"] = "device.mojom.UsbDeviceManager.EnumerateDevicesAndSetClient", +["not_found"] = "device.mojom.UsbDeviceManager.GetDevices", +["not_found"] = "device.mojom.UsbDeviceManager.GetDevice", +["not_found"] = "device.mojom.UsbDeviceManager.GetSecurityKeyDevice", +["not_found"] = "device.mojom.UsbDeviceManager.SetClient", +["not_found"] = "device.mojom.UsbDeviceManagerClient.OnDeviceAdded", +["not_found"] = "device.mojom.UsbDeviceManagerClient.OnDeviceRemoved", +["not_found"] = "blink.mojom.FindInPage.Find", +["not_found"] = "blink.mojom.FindInPage.StopFinding", +["not_found"] = "blink.mojom.FindInPage.ClearActiveFindMatch", +["not_found"] = "blink.mojom.FindInPage.SetClient", +["not_found"] = "blink.mojom.FindInPageClient.SetNumberOfMatches", +["not_found"] = "blink.mojom.FindInPageClient.SetActiveMatch", +["not_found"] = "blink.mojom.LocalFrame.GetTextSurroundingSelection", +["not_found"] = "blink.mojom.LocalFrame.SendInterventionReport", +["not_found"] = "blink.mojom.LocalFrame.SetFrameOwnerProperties", +["not_found"] = "blink.mojom.LocalFrame.NotifyUserActivation", +["not_found"] = "blink.mojom.LocalFrame.NotifyVirtualKeyboardOverlayRect", +["not_found"] = "blink.mojom.LocalFrame.ShowInterestInElement", +["not_found"] = "blink.mojom.LocalFrame.AddMessageToConsole", +["not_found"] = "blink.mojom.LocalFrame.SwapInImmediately", +["not_found"] = "blink.mojom.LocalFrame.CheckCompleted", +["not_found"] = "blink.mojom.LocalFrame.StopLoading", +["not_found"] = "blink.mojom.LocalFrame.Collapse", +["not_found"] = "blink.mojom.LocalFrame.EnableViewSourceMode", +["not_found"] = "blink.mojom.LocalFrame.Focus", +["not_found"] = "blink.mojom.LocalFrame.ClearFocusedElement", +["not_found"] = "blink.mojom.LocalFrame.CopyImageAt", +["not_found"] = "blink.mojom.LocalFrame.SaveImageAt", +["not_found"] = "blink.mojom.LocalFrame.ReportBlinkFeatureUsage", +["not_found"] = "blink.mojom.LocalFrame.RenderFallbackContent", +["not_found"] = "blink.mojom.LocalFrame.BeforeUnload", +["not_found"] = "blink.mojom.LocalFrame.MediaPlayerActionAt", +["not_found"] = "blink.mojom.LocalFrame.RequestVideoFrameAtWithBoundsHint", +["not_found"] = "blink.mojom.LocalFrame.PluginActionAt", +["not_found"] = "blink.mojom.LocalFrame.AdvanceFocusInFrame", +["not_found"] = "blink.mojom.LocalFrame.AdvanceFocusForIME", +["not_found"] = "blink.mojom.LocalFrame.ReportContentSecurityPolicyViolation", +["not_found"] = "blink.mojom.LocalFrame.DidUpdateFramePolicy", +["not_found"] = "blink.mojom.LocalFrame.OnFrameVisibilityChanged", +["not_found"] = "blink.mojom.LocalFrame.PostMessageEvent", +["not_found"] = "blink.mojom.LocalFrame.JavaScriptMethodExecuteRequest", +["not_found"] = "blink.mojom.LocalFrame.JavaScriptExecuteRequest", +["not_found"] = "blink.mojom.LocalFrame.JavaScriptExecuteRequestForTests", +["not_found"] = "blink.mojom.LocalFrame.JavaScriptExecuteRequestInIsolatedWorld", +["not_found"] = "blink.mojom.LocalFrame.BindReportingObserver", +["not_found"] = "blink.mojom.LocalFrame.UpdateOpener", +["not_found"] = "blink.mojom.LocalFrame.GetSavableResourceLinks", +["not_found"] = "blink.mojom.LocalFrame.MixedContentFound", +["not_found"] = "blink.mojom.LocalFrame.BindDevToolsAgent", +["not_found"] = "blink.mojom.LocalFrame.HandleRendererDebugURL", +["not_found"] = "blink.mojom.LocalFrame.GetCanonicalUrlForSharing", +["not_found"] = "blink.mojom.LocalFrame.GetOpenGraphMetadata", +["not_found"] = "blink.mojom.LocalFrame.SetNavigationApiHistoryEntriesForRestore", +["not_found"] = "blink.mojom.LocalFrame.UpdatePrerenderURL", +["not_found"] = "blink.mojom.LocalFrame.NotifyNavigationApiOfDisposedEntries", +["not_found"] = "blink.mojom.LocalFrame.TraverseCancelled", +["not_found"] = "blink.mojom.LocalFrame.DispatchNavigateEventForCrossDocumentTraversal", +["not_found"] = "blink.mojom.LocalFrame.SnapshotDocumentForViewTransition", +["not_found"] = "blink.mojom.LocalFrame.NotifyViewTransitionAbortedToOldDocument", +["not_found"] = "blink.mojom.LocalFrame.DispatchPageSwap", +["not_found"] = "blink.mojom.LocalFrame.AddResourceTimingEntryForFailedSubframeNavigation", +["not_found"] = "blink.mojom.LocalFrame.GetScrollPosition", +["not_found"] = "blink.mojom.LocalMainFrame.AnimateDoubleTapZoom", +["not_found"] = "blink.mojom.LocalMainFrame.SetScaleFactor", +["not_found"] = "blink.mojom.LocalMainFrame.ClosePage", +["not_found"] = "blink.mojom.LocalMainFrame.GetFullPageSize", +["not_found"] = "blink.mojom.LocalMainFrame.SetInitialFocus", +["not_found"] = "blink.mojom.LocalMainFrame.EnablePreferredSizeChangedMode", +["not_found"] = "blink.mojom.LocalMainFrame.ZoomToFindInPageRect", +["not_found"] = "blink.mojom.LocalMainFrame.InstallCoopAccessMonitor", +["not_found"] = "blink.mojom.LocalMainFrame.UpdateBrowserControlsState", +["not_found"] = "blink.mojom.LocalMainFrame.SetV8CompileHints", +["not_found"] = "blink.mojom.LocalMainFrame.Discard", +["not_found"] = "blink.mojom.LocalMainFrame.FinalizeNavigationConfidence", +["not_found"] = "blink.mojom.NonAssociatedLocalFrameHost.MaybeStartOutermostMainFrameNavigation", +["not_found"] = "blink.mojom.PolicyContainerHost.SetReferrerPolicy", +["not_found"] = "blink.mojom.PolicyContainerHost.AddContentSecurityPolicies", +["not_found"] = "blink.mojom.RemoteFrame.WillEnterFullscreen", +["not_found"] = "blink.mojom.RemoteFrame.EnforceInsecureNavigationsSet", +["not_found"] = "blink.mojom.RemoteFrame.SetFrameOwnerProperties", +["not_found"] = "blink.mojom.RemoteFrame.EnforceInsecureRequestPolicy", +["not_found"] = "blink.mojom.RemoteFrame.SetReplicatedOrigin", +["not_found"] = "blink.mojom.RemoteFrame.SetReplicatedIsAdFrame", +["not_found"] = "blink.mojom.RemoteFrame.SetReplicatedName", +["not_found"] = "blink.mojom.RemoteFrame.DispatchLoadEventForFrameOwner", +["not_found"] = "blink.mojom.RemoteFrame.SetNeedsOcclusionTracking", +["not_found"] = "blink.mojom.RemoteFrame.Collapse", +["not_found"] = "blink.mojom.RemoteFrame.Focus", +["not_found"] = "blink.mojom.RemoteFrame.SetHadStickyUserActivationBeforeNavigation", +["not_found"] = "blink.mojom.RemoteFrame.BubbleLogicalScroll", +["not_found"] = "blink.mojom.RemoteFrame.UpdateUserActivationState", +["not_found"] = "blink.mojom.RemoteFrame.SetEmbeddingToken", +["not_found"] = "blink.mojom.RemoteFrame.SetPageFocus", +["not_found"] = "blink.mojom.RemoteFrame.RenderFallbackContent", +["not_found"] = "blink.mojom.RemoteFrame.AddResourceTimingFromChild", +["not_found"] = "blink.mojom.RemoteFrame.ScrollRectToVisible", +["not_found"] = "blink.mojom.RemoteFrame.DidStartLoading", +["not_found"] = "blink.mojom.RemoteFrame.DidStopLoading", +["not_found"] = "blink.mojom.RemoteFrame.IntrinsicSizingInfoOfChildChanged", +["not_found"] = "blink.mojom.RemoteFrame.DidSetFramePolicyHeaders", +["not_found"] = "blink.mojom.RemoteFrame.DidUpdateFramePolicy", +["not_found"] = "blink.mojom.RemoteFrame.UpdateOpener", +["not_found"] = "blink.mojom.RemoteFrame.DetachAndDispose", +["not_found"] = "blink.mojom.RemoteFrame.EnableAutoResize", +["not_found"] = "blink.mojom.RemoteFrame.DisableAutoResize", +["not_found"] = "blink.mojom.RemoteFrame.DidUpdateVisualProperties", +["not_found"] = "blink.mojom.RemoteFrame.SetFrameSinkId", +["not_found"] = "blink.mojom.RemoteFrame.ChildProcessGone", +["not_found"] = "blink.mojom.RemoteFrame.CreateRemoteChild", +["not_found"] = "blink.mojom.RemoteFrame.CreateRemoteChildren", +["not_found"] = "blink.mojom.RemoteFrame.ForwardFencedFrameEventToEmbedder", +["not_found"] = "blink.mojom.RemoteFrameHost.SetInheritedEffectiveTouchAction", +["not_found"] = "blink.mojom.RemoteFrameHost.UpdateRenderThrottlingStatus", +["not_found"] = "blink.mojom.RemoteFrameHost.VisibilityChanged", +["not_found"] = "blink.mojom.RemoteFrameHost.DidFocusFrame", +["not_found"] = "blink.mojom.RemoteFrameHost.CheckCompleted", +["not_found"] = "blink.mojom.RemoteFrameHost.CapturePaintPreviewOfCrossProcessSubframe", +["not_found"] = "blink.mojom.RemoteFrameHost.SetIsInert", +["not_found"] = "blink.mojom.RemoteFrameHost.DidChangeOpener", +["not_found"] = "blink.mojom.RemoteFrameHost.AdvanceFocus", +["not_found"] = "blink.mojom.RemoteFrameHost.RouteMessageEvent", +["not_found"] = "blink.mojom.RemoteFrameHost.PrintCrossProcessSubframe", +["not_found"] = "blink.mojom.RemoteFrameHost.Detach", +["not_found"] = "blink.mojom.RemoteFrameHost.UpdateViewportIntersection", +["not_found"] = "blink.mojom.RemoteFrameHost.SynchronizeVisualProperties", +["not_found"] = "blink.mojom.RemoteFrameHost.OpenURL", +["not_found"] = "blink.mojom.RemoteMainFrame.UpdateTextAutosizerPageInfo", +["not_found"] = "blink.mojom.RemoteMainFrameHost.FocusPage", +["not_found"] = "blink.mojom.RemoteMainFrameHost.TakeFocus", +["not_found"] = "blink.mojom.RemoteMainFrameHost.UpdateTargetURL", +["not_found"] = "blink.mojom.RemoteMainFrameHost.RouteCloseEvent", +["not_found"] = "blink.mojom.ReportingObserver.Notify", +["not_found"] = "blink.mojom.DisplayCutoutClient.SetSafeArea", +["not_found"] = "blink.mojom.PopupWidgetHost.RequestClosePopup", +["not_found"] = "blink.mojom.PopupWidgetHost.ShowPopup", +["not_found"] = "blink.mojom.PopupWidgetHost.SetPopupBounds", +["not_found"] = "blink.mojom.FrameWidgetHost.AnimateDoubleTapZoomInMainFrame", +["not_found"] = "blink.mojom.FrameWidgetHost.ZoomToFindInPageRectInMainFrame", +["not_found"] = "blink.mojom.FrameWidgetHost.SetHasTouchEventConsumers", +["not_found"] = "blink.mojom.FrameWidgetHost.IntrinsicSizingInfoChanged", +["not_found"] = "blink.mojom.FrameWidgetHost.AutoscrollStart", +["not_found"] = "blink.mojom.FrameWidgetHost.AutoscrollFling", +["not_found"] = "blink.mojom.FrameWidgetHost.AutoscrollEnd", +["not_found"] = "blink.mojom.FrameWidget.DragTargetDragEnter", +["not_found"] = "blink.mojom.FrameWidget.DragTargetDragOver", +["not_found"] = "blink.mojom.FrameWidget.DragTargetDragLeave", +["not_found"] = "blink.mojom.FrameWidget.DragTargetDrop", +["not_found"] = "blink.mojom.FrameWidget.DragSourceEndedAt", +["not_found"] = "blink.mojom.FrameWidget.DragSourceSystemDragEnded", +["not_found"] = "blink.mojom.FrameWidget.OnStartStylusWriting", +["not_found"] = "blink.mojom.FrameWidget.SetBackgroundOpaque", +["not_found"] = "blink.mojom.FrameWidget.SetTextDirection", +["not_found"] = "blink.mojom.FrameWidget.SetActive", +["not_found"] = "blink.mojom.FrameWidget.SetInheritedEffectiveTouchActionForSubFrame", +["not_found"] = "blink.mojom.FrameWidget.UpdateRenderThrottlingStatusForSubFrame", +["not_found"] = "blink.mojom.FrameWidget.SetIsInertForSubFrame", +["not_found"] = "blink.mojom.FrameWidget.EnableDeviceEmulation", +["not_found"] = "blink.mojom.FrameWidget.DisableDeviceEmulation", +["not_found"] = "blink.mojom.FrameWidget.BindWidgetCompositor", +["not_found"] = "blink.mojom.FrameWidget.SetViewportIntersection", +["not_found"] = "blink.mojom.FrameWidget.NotifyClearedDisplayedGraphics", +["not_found"] = "blink.mojom.FencedFrameOwnerHost.Navigate", +["not_found"] = "blink.mojom.FencedFrameOwnerHost.DidChangeFramePolicy", +["not_found"] = "blink.mojom.ServiceWorker.InitializeGlobalScope", +["not_found"] = "blink.mojom.ServiceWorker.DispatchInstallEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchActivateEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchBackgroundFetchAbortEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchBackgroundFetchClickEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchBackgroundFetchFailEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchBackgroundFetchSuccessEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchCookieChangeEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchFetchEventForMainResource", +["not_found"] = "blink.mojom.ServiceWorker.DispatchNotificationClickEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchNotificationCloseEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchPushEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchPushEventRecordingNetworkRequests", +["not_found"] = "blink.mojom.ServiceWorker.DispatchPushSubscriptionChangeEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchSyncEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchPeriodicSyncEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchAbortPaymentEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchCanMakePaymentEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchPaymentRequestEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchExtendableMessageEvent", +["not_found"] = "blink.mojom.ServiceWorker.DispatchContentDeleteEvent", +["not_found"] = "blink.mojom.ServiceWorker.Ping", +["not_found"] = "blink.mojom.ServiceWorker.SetIdleDelay", +["not_found"] = "blink.mojom.ServiceWorker.AddKeepAlive", +["not_found"] = "blink.mojom.ServiceWorker.ClearKeepAlive", +["not_found"] = "blink.mojom.ServiceWorker.AddMessageToConsole", +["not_found"] = "blink.mojom.ServiceWorker.ExecuteScriptForTest", +["not_found"] = "blink.mojom.ServiceWorkerHost.SetCachedMetadata", +["not_found"] = "blink.mojom.ServiceWorkerHost.ClearCachedMetadata", +["not_found"] = "blink.mojom.ServiceWorkerHost.GetClients", +["not_found"] = "blink.mojom.ServiceWorkerHost.GetClient", +["not_found"] = "blink.mojom.ServiceWorkerHost.OpenNewTab", +["not_found"] = "blink.mojom.ServiceWorkerHost.OpenPaymentHandlerWindow", +["not_found"] = "blink.mojom.ServiceWorkerHost.PostMessageToClient", +["not_found"] = "blink.mojom.ServiceWorkerHost.FocusClient", +["not_found"] = "blink.mojom.ServiceWorkerHost.NavigateClient", +["not_found"] = "blink.mojom.ServiceWorkerHost.SkipWaiting", +["not_found"] = "blink.mojom.ServiceWorkerHost.ClaimClients", +["not_found"] = "blink.mojom.ServiceWorkerHost.AddRoutes", +["not_found"] = "blink.mojom.ServiceWorkerContainer.SetController", +["not_found"] = "blink.mojom.ServiceWorkerContainer.PostMessageToClient", +["not_found"] = "blink.mojom.ServiceWorkerContainer.CountFeature", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.Register", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.GetRegistration", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.GetRegistrations", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.GetRegistrationForReady", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.EnsureControllerServiceWorker", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.CloneContainerHost", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.HintToUpdateServiceWorker", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.EnsureFileAccess", +["not_found"] = "blink.mojom.ServiceWorkerContainerHost.OnExecutionReady", +["not_found"] = "blink.mojom.ServiceWorkerObjectHost.PostMessageToServiceWorker", +["not_found"] = "blink.mojom.ServiceWorkerObjectHost.TerminateForTesting", +["not_found"] = "blink.mojom.ServiceWorkerObject.StateChanged", +["not_found"] = "blink.mojom.ServiceWorkerRegistrationObjectHost.Update", +["not_found"] = "blink.mojom.ServiceWorkerRegistrationObjectHost.Unregister", +["not_found"] = "blink.mojom.ServiceWorkerRegistrationObjectHost.EnableNavigationPreload", +["not_found"] = "blink.mojom.ServiceWorkerRegistrationObjectHost.GetNavigationPreloadState", +["not_found"] = "blink.mojom.ServiceWorkerRegistrationObjectHost.SetNavigationPreloadHeader", +["not_found"] = "blink.mojom.ServiceWorkerRegistrationObject.SetServiceWorkerObjects", +["not_found"] = "blink.mojom.ServiceWorkerRegistrationObject.SetUpdateViaCache", +["not_found"] = "blink.mojom.ServiceWorkerRegistrationObject.UpdateFound", +["not_found"] = "blink.mojom.SharedWorker.Connect", +["not_found"] = "blink.mojom.SharedWorker.Terminate", +["not_found"] = "blink.mojom.SharedWorkerConnector.Connect", +["not_found"] = "blink.mojom.AIManagerCreateLanguageModelClient.OnResult", +["not_found"] = "blink.mojom.AIManagerCreateLanguageModelClient.OnError", +["not_found"] = "blink.mojom.AILanguageModel.Prompt", +["not_found"] = "blink.mojom.AILanguageModel.Append", +["not_found"] = "blink.mojom.AILanguageModel.Fork", +["not_found"] = "blink.mojom.AILanguageModel.Destroy", +["not_found"] = "blink.mojom.AILanguageModel.MeasureInputUsage", +["not_found"] = "blink.mojom.AIManagerCreateWriterClient.OnResult", +["not_found"] = "blink.mojom.AIManagerCreateWriterClient.OnError", +["not_found"] = "blink.mojom.AIManagerCreateRewriterClient.OnResult", +["not_found"] = "blink.mojom.AIManagerCreateRewriterClient.OnError", +["not_found"] = "blink.mojom.AIManagerCreateSummarizerClient.OnResult", +["not_found"] = "blink.mojom.AIManagerCreateSummarizerClient.OnError", +["not_found"] = "blink.mojom.AIManagerCreateProofreaderClient.OnResult", +["not_found"] = "blink.mojom.AIManagerCreateProofreaderClient.OnError", +["not_found"] = "blink.mojom.AIManager.CanCreateLanguageModel", +["not_found"] = "blink.mojom.AIManager.CreateLanguageModel", +["not_found"] = "blink.mojom.AIManager.CanCreateSummarizer", +["not_found"] = "blink.mojom.AIManager.CreateSummarizer", +["not_found"] = "blink.mojom.AIManager.GetLanguageModelParams", +["not_found"] = "blink.mojom.AIManager.CanCreateWriter", +["not_found"] = "blink.mojom.AIManager.CreateWriter", +["not_found"] = "blink.mojom.AIManager.CanCreateRewriter", +["not_found"] = "blink.mojom.AIManager.CreateRewriter", +["not_found"] = "blink.mojom.AIManager.CanCreateProofreader", +["not_found"] = "blink.mojom.AIManager.CreateProofreader", +["not_found"] = "blink.mojom.AIManager.AddModelDownloadProgressObserver", +["not_found"] = "blink.mojom.AIProofreader.Proofread", +["not_found"] = "blink.mojom.AIProofreader.GetCorrectionType", +["not_found"] = "blink.mojom.AIRewriter.Rewrite", +["not_found"] = "blink.mojom.AIRewriter.MeasureUsage", +["not_found"] = "blink.mojom.AISummarizer.Summarize", +["not_found"] = "blink.mojom.AISummarizer.MeasureUsage", +["not_found"] = "blink.mojom.AIWriter.Write", +["not_found"] = "blink.mojom.AIWriter.MeasureUsage", +["not_found"] = "blink.mojom.ModelDownloadProgressObserver.OnDownloadProgressUpdate", +["not_found"] = "blink.mojom.ModelStreamingResponder.OnCompletion", +["not_found"] = "blink.mojom.ModelStreamingResponder.OnError", +["not_found"] = "blink.mojom.ModelStreamingResponder.OnStreaming", +["not_found"] = "blink.mojom.ModelStreamingResponder.OnQuotaOverflow", +["not_found"] = "blink.mojom.AnnotationAgent.ScrollIntoView", +["not_found"] = "blink.mojom.AnnotationAgentHost.DidFinishAttachment", +["not_found"] = "blink.mojom.AnnotationAgentContainer.CreateAgent", +["not_found"] = "blink.mojom.AnnotationAgentContainer.CreateAgentFromSelection", +["not_found"] = "blink.mojom.AnnotationAgentContainer.RemoveAgentsOfType", +["not_found"] = "blink.mojom.AppBannerEvent.BannerAccepted", +["not_found"] = "blink.mojom.AppBannerEvent.BannerDismissed", +["not_found"] = "blink.mojom.AppBannerController.BannerPromptRequest", +["not_found"] = "blink.mojom.AppBannerService.DisplayAppBanner", +["not_found"] = "blink.mojom.AssociatedInterfaceProvider.GetAssociatedInterface", +["not_found"] = "blink.mojom.AutoplayConfigurationClient.AddAutoplayFlags", +["not_found"] = "blink.mojom.BackgroundFetchRegistrationObserver.OnProgress", +["not_found"] = "blink.mojom.BackgroundFetchRegistrationObserver.OnRecordsUnavailable", +["not_found"] = "blink.mojom.BackgroundFetchRegistrationObserver.OnRequestCompleted", +["not_found"] = "blink.mojom.BackgroundFetchRegistrationService.UpdateUI", +["not_found"] = "blink.mojom.BackgroundFetchRegistrationService.Abort", +["not_found"] = "blink.mojom.BackgroundFetchRegistrationService.MatchRequests", +["not_found"] = "blink.mojom.BackgroundFetchRegistrationService.AddRegistrationObserver", +["not_found"] = "blink.mojom.BackgroundFetchService.Fetch", +["not_found"] = "blink.mojom.BackgroundFetchService.GetRegistration", +["not_found"] = "blink.mojom.BackgroundFetchService.GetDeveloperIds", +["not_found"] = "blink.mojom.BackgroundFetchService.GetIconDisplaySize", +["not_found"] = "blink.mojom.OneShotBackgroundSyncService.Register", +["not_found"] = "blink.mojom.OneShotBackgroundSyncService.DidResolveRegistration", +["not_found"] = "blink.mojom.OneShotBackgroundSyncService.GetRegistrations", +["not_found"] = "blink.mojom.PeriodicBackgroundSyncService.Register", +["not_found"] = "blink.mojom.PeriodicBackgroundSyncService.Unregister", +["not_found"] = "blink.mojom.PeriodicBackgroundSyncService.GetRegistrations", +["not_found"] = "blink.mojom.BadgeService.SetBadge", +["not_found"] = "blink.mojom.BadgeService.ClearBadge", +["not_found"] = "blink.mojom.BrowserInterfaceBroker.GetInterface", +["not_found"] = "blink.mojom.CacheStorageCache.Match", +["not_found"] = "blink.mojom.CacheStorageCache.WriteSideData", +["not_found"] = "blink.mojom.CacheStorage.Has", +["not_found"] = "blink.mojom.CacheStorage.Delete", +["not_found"] = "blink.mojom.CacheStorage.Keys", +["not_found"] = "blink.mojom.CallStackGenerator.CollectJavaScriptCallStack", +["not_found"] = "blink.mojom.ColorChooser.SetSelectedColor", +["not_found"] = "blink.mojom.EyeDropperChooser.Choose", +["not_found"] = "blink.mojom.DateTimeChooser.OpenDateTimeDialog", +["not_found"] = "blink.mojom.DateTimeChooser.CloseDateTimeDialog", +["not_found"] = "blink.mojom.FileChooser.OpenFileChooser", +["not_found"] = "blink.mojom.FileChooser.EnumerateChosenDirectory", +["not_found"] = "blink.mojom.PopupMenuClient.DidAcceptIndices", +["not_found"] = "blink.mojom.PopupMenuClient.DidCancel", +["not_found"] = "blink.mojom.ClipboardListener.OnClipboardDataChanged", +["not_found"] = "blink.mojom.ClipboardHost.GetSequenceNumber", +["not_found"] = "blink.mojom.ClipboardHost.IsFormatAvailable", +["not_found"] = "blink.mojom.ClipboardHost.ReadAvailableTypes", +["not_found"] = "blink.mojom.ClipboardHost.ReadText", +["not_found"] = "blink.mojom.ClipboardHost.ReadHtml", +["not_found"] = "blink.mojom.ClipboardHost.ReadSvg", +["not_found"] = "blink.mojom.ClipboardHost.ReadRtf", +["not_found"] = "blink.mojom.ClipboardHost.ReadPng", +["not_found"] = "blink.mojom.ClipboardHost.ReadFiles", +["not_found"] = "blink.mojom.ClipboardHost.ReadDataTransferCustomData", +["not_found"] = "blink.mojom.ClipboardHost.ReadAvailableCustomAndStandardFormats", +["not_found"] = "blink.mojom.ClipboardHost.ReadUnsanitizedCustomFormat", +["not_found"] = "blink.mojom.ClipboardHost.WriteText", +["not_found"] = "blink.mojom.ClipboardHost.WriteHtml", +["not_found"] = "blink.mojom.ClipboardHost.WriteSvg", +["not_found"] = "blink.mojom.ClipboardHost.WriteSmartPasteMarker", +["not_found"] = "blink.mojom.ClipboardHost.WriteDataTransferCustomData", +["not_found"] = "blink.mojom.ClipboardHost.WriteBookmark", +["not_found"] = "blink.mojom.ClipboardHost.WriteImage", +["not_found"] = "blink.mojom.ClipboardHost.WriteUnsanitizedCustomFormat", +["not_found"] = "blink.mojom.ClipboardHost.CommitWrite", +["not_found"] = "blink.mojom.ClipboardHost.RegisterClipboardListener", +["not_found"] = "blink.mojom.CloseListener.Signal", +["not_found"] = "blink.mojom.WebPressureManager.AddClient", +["not_found"] = "blink.mojom.WebPressureClient.OnPressureUpdated", +["not_found"] = "blink.mojom.AIPageContentAgent.GetAIPageContent", +["not_found"] = "blink.mojom.PaidContentMetadataObserver.OnPaidContentMetadataChanged", +["not_found"] = "blink.mojom.FrameMetadataObserverRegistry.AddPaidContentMetadataObserver", +["not_found"] = "blink.mojom.FrameMetadataObserverRegistry.AddMetaTagsObserver", +["not_found"] = "blink.mojom.MetaTagsObserver.OnMetaTagsChanged", +["not_found"] = "blink.mojom.InnerHtmlAgent.GetInnerHtml", +["not_found"] = "blink.mojom.InnerTextAgent.GetInnerText", +["not_found"] = "blink.mojom.ContentIndexService.GetIconSizes", +["not_found"] = "blink.mojom.ContentIndexService.Add", +["not_found"] = "blink.mojom.ContentIndexService.Delete", +["not_found"] = "blink.mojom.ContentIndexService.GetDescriptions", +["not_found"] = "blink.mojom.ContextMenuClient.CustomContextMenuAction", +["not_found"] = "blink.mojom.ContextMenuClient.ContextMenuClosed", +["not_found"] = "blink.mojom.AttributionHost.RegisterDataHost", +["not_found"] = "blink.mojom.AttributionHost.RegisterNavigationDataHost", +["not_found"] = "blink.mojom.AttributionHost.NotifyNavigationWithBackgroundRegistrationsWillStart", +["not_found"] = "blink.mojom.CookieStore.AddSubscriptions", +["not_found"] = "blink.mojom.CookieStore.RemoveSubscriptions", +["not_found"] = "blink.mojom.CookieStore.GetSubscriptions", +["not_found"] = "blink.mojom.ManagedConfigurationObserver.OnConfigurationChanged", +["not_found"] = "blink.mojom.DeviceAPIService.GetDirectoryId", +["not_found"] = "blink.mojom.DeviceAPIService.GetHostname", +["not_found"] = "blink.mojom.DeviceAPIService.GetSerialNumber", +["not_found"] = "blink.mojom.DeviceAPIService.GetAnnotatedAssetId", +["not_found"] = "blink.mojom.DeviceAPIService.GetAnnotatedLocation", +["not_found"] = "blink.mojom.ManagedConfigurationService.GetManagedConfiguration", +["not_found"] = "blink.mojom.ManagedConfigurationService.SubscribeToManagedConfiguration", +["not_found"] = "blink.mojom.DevicePostureProvider.AddListenerAndGetCurrentPosture", +["not_found"] = "blink.mojom.DevicePostureProvider.OverrideDevicePostureForEmulation", +["not_found"] = "blink.mojom.DevicePostureProvider.DisableDevicePostureOverrideForEmulation", +["not_found"] = "blink.mojom.DevicePostureClient.OnPostureChanged", +["not_found"] = "blink.mojom.DevToolsSession.DispatchProtocolCommand", +["not_found"] = "blink.mojom.DevToolsSession.UnpauseAndTerminate", +["not_found"] = "blink.mojom.DevToolsSessionHost.DispatchProtocolResponse", +["not_found"] = "blink.mojom.DevToolsSessionHost.DispatchProtocolNotification", +["not_found"] = "blink.mojom.DevToolsAgent.AttachDevToolsSession", +["not_found"] = "blink.mojom.DevToolsAgent.InspectElement", +["not_found"] = "blink.mojom.DevToolsAgent.ReportChildTargets", +["not_found"] = "blink.mojom.DevToolsAgentHost.ChildTargetCreated", +["not_found"] = "blink.mojom.DevToolsAgentHost.MainThreadDebuggerPaused", +["not_found"] = "blink.mojom.DevToolsAgentHost.MainThreadDebuggerResumed", +["not_found"] = "blink.mojom.DevToolsAgentHost.BringToForeground", +["not_found"] = "blink.mojom.DevToolsFrontend.SetupDevToolsFrontend", +["not_found"] = "blink.mojom.DevToolsFrontend.SetupDevToolsExtensionAPI", +["not_found"] = "blink.mojom.DevToolsFrontendHost.DispatchEmbedderMessage", +["not_found"] = "blink.mojom.DiskAllocator.ProvideTemporaryFile", +["not_found"] = "blink.mojom.DomStorage.OpenLocalStorage", +["not_found"] = "blink.mojom.DomStorage.BindSessionStorageNamespace", +["not_found"] = "blink.mojom.DomStorage.BindSessionStorageArea", +["not_found"] = "blink.mojom.DomStorageClient.ResetSessionStorageConnections", +["not_found"] = "blink.mojom.DomStorageClient.ResetLocalStorageConnections", +["not_found"] = "blink.mojom.DomStorageProvider.BindDomStorage", +["not_found"] = "blink.mojom.SessionStorageNamespace.Clone", +["not_found"] = "blink.mojom.StorageAreaObserver.KeyChanged", +["not_found"] = "blink.mojom.StorageAreaObserver.KeyChangeFailed", +["not_found"] = "blink.mojom.StorageAreaObserver.KeyDeleted", +["not_found"] = "blink.mojom.StorageAreaObserver.AllDeleted", +["not_found"] = "blink.mojom.StorageAreaObserver.ShouldSendOldValueOnMutations", +["not_found"] = "blink.mojom.StorageArea.AddObserver", +["not_found"] = "blink.mojom.StorageArea.Put", +["not_found"] = "blink.mojom.StorageArea.Delete", +["not_found"] = "blink.mojom.StorageArea.DeleteAll", +["not_found"] = "blink.mojom.StorageArea.Get", +["not_found"] = "blink.mojom.StorageArea.GetAll", +["not_found"] = "blink.mojom.FeatureObserver.Register", +["not_found"] = "blink.mojom.FileUtilitiesHost.GetFileInfo", +["not_found"] = "blink.mojom.FileSystemAccessAccessHandleHost.Close", +["not_found"] = "blink.mojom.FileSystemAccessDataTransferToken.GetInternalId", +["not_found"] = "blink.mojom.FileSystemAccessDataTransferToken.Clone", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.GetPermissionStatus", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.RequestPermission", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.GetFile", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.GetDirectory", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.GetEntries", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.Rename", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.Move", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.Remove", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.RemoveEntry", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.Resolve", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.Transfer", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.GetUniqueId", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryHandle.GetCloudIdentifiers", +["not_found"] = "blink.mojom.FileSystemAccessDirectoryEntriesListener.DidReadDirectory", +["not_found"] = "blink.mojom.FileSystemAccessFileDelegateHost.Read", +["not_found"] = "blink.mojom.FileSystemAccessFileDelegateHost.Write", +["not_found"] = "blink.mojom.FileSystemAccessFileDelegateHost.GetLength", +["not_found"] = "blink.mojom.FileSystemAccessFileDelegateHost.SetLength", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.GetPermissionStatus", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.RequestPermission", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.AsBlob", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.CreateFileWriter", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.Rename", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.Move", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.Remove", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.OpenAccessHandle", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.IsSameEntry", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.Transfer", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.GetUniqueId", +["not_found"] = "blink.mojom.FileSystemAccessFileHandle.GetCloudIdentifiers", +["not_found"] = "blink.mojom.FileSystemAccessFileModificationHost.RequestCapacityChange", +["not_found"] = "blink.mojom.FileSystemAccessFileModificationHost.OnContentsModified", +["not_found"] = "blink.mojom.FileSystemAccessFileWriter.Write", +["not_found"] = "blink.mojom.FileSystemAccessFileWriter.Truncate", +["not_found"] = "blink.mojom.FileSystemAccessFileWriter.Close", +["not_found"] = "blink.mojom.FileSystemAccessFileWriter.Abort", +["not_found"] = "blink.mojom.FileSystemAccessManager.GetSandboxedFileSystem", +["not_found"] = "blink.mojom.FileSystemAccessManager.GetSandboxedFileSystemForDevtools", +["not_found"] = "blink.mojom.FileSystemAccessManager.ChooseEntries", +["not_found"] = "blink.mojom.FileSystemAccessManager.GetFileHandleFromToken", +["not_found"] = "blink.mojom.FileSystemAccessManager.GetDirectoryHandleFromToken", +["not_found"] = "blink.mojom.FileSystemAccessManager.GetEntryFromDataTransferToken", +["not_found"] = "blink.mojom.FileSystemAccessManager.BindObserverHost", +["not_found"] = "blink.mojom.FileSystemAccessObserver.OnFileChanges", +["not_found"] = "blink.mojom.FileSystemAccessObserverHost.Observe", +["not_found"] = "blink.mojom.FileSystemAccessObserverHost.Unobserve", +["not_found"] = "blink.mojom.FileSystemAccessTransferToken.GetInternalID", +["not_found"] = "blink.mojom.FileSystemAccessTransferToken.Clone", +["not_found"] = "blink.mojom.FileSystemManager.Open", +["not_found"] = "blink.mojom.FileSystemManager.ResolveURL", +["not_found"] = "blink.mojom.FileSystemManager.Move", +["not_found"] = "blink.mojom.FileSystemManager.Copy", +["not_found"] = "blink.mojom.FileSystemManager.Remove", +["not_found"] = "blink.mojom.FileSystemManager.ReadMetadata", +["not_found"] = "blink.mojom.FileSystemManager.Create", +["not_found"] = "blink.mojom.FileSystemManager.Exists", +["not_found"] = "blink.mojom.FileSystemManager.ReadDirectory", +["not_found"] = "blink.mojom.FileSystemManager.ReadDirectorySync", +["not_found"] = "blink.mojom.FileSystemManager.Write", +["not_found"] = "blink.mojom.FileSystemManager.WriteSync", +["not_found"] = "blink.mojom.FileSystemManager.Truncate", +["not_found"] = "blink.mojom.FileSystemManager.TruncateSync", +["not_found"] = "blink.mojom.FileSystemManager.CreateSnapshotFile", +["not_found"] = "blink.mojom.FileSystemManager.GetPlatformPath", +["not_found"] = "blink.mojom.FileSystemManager.RegisterBlob", +["not_found"] = "blink.mojom.FileSystemOperationListener.ResultsRetrieved", +["not_found"] = "blink.mojom.FileSystemOperationListener.DidWrite", +["not_found"] = "blink.mojom.FileSystemOperationListener.ErrorOccurred", +["not_found"] = "blink.mojom.FileSystemCancellableOperation.Cancel", +["not_found"] = "blink.mojom.ReceivedSnapshotListener.DidReceiveSnapshotFile", +["not_found"] = "blink.mojom.CanvasNoiseTokenUpdater.OnTokenReceived", +["not_found"] = "blink.mojom.FontAccessManager.EnumerateLocalFonts", +["not_found"] = "blink.mojom.GeolocationService.CreateGeolocation", +["not_found"] = "blink.mojom.HidService.RegisterClient", +["not_found"] = "blink.mojom.HidService.GetDevices", +["not_found"] = "blink.mojom.HidService.RequestDevice", +["not_found"] = "blink.mojom.HidService.Connect", +["not_found"] = "blink.mojom.HidService.Forget", +["not_found"] = "blink.mojom.Hyphenation.OpenDictionary", +["not_found"] = "blink.mojom.IdleMonitor.Update", +["not_found"] = "blink.mojom.IdleManager.AddMonitor", +["not_found"] = "blink.mojom.ImageDownloader.DownloadImage", +["not_found"] = "blink.mojom.ImageDownloader.DownloadImageFromAxNode", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.SetTouchActionFromMain", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.SetPanAction", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.DidOverscroll", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.DidStartScrollingViewport", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.ImeCancelComposition", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.ImeCompositionRangeChanged", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.SetMouseCapture", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.SetAutoscrollSelectionActiveInMainFrame", +["not_found"] = "blink.mojom.WidgetInputHandlerHost.RequestMouseLock", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.AddImeTextSpansToExistingText", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.ClearImeTextSpansByType", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.SetCompositionFromExistingText", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.ExtendSelectionAndDelete", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.ExtendSelectionAndReplace", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.DeleteSurroundingText", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.DeleteSurroundingTextInCodePoints", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.SetEditableSelectionOffsets", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.HandleStylusWritingGestureAction", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.ExecuteEditCommand", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.Undo", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.Redo", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.Cut", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.Copy", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.CopyToFindPboard", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.CenterSelection", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.Paste", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.PasteAndMatchStyle", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.Delete", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.SelectAll", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.CollapseSelection", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.Replace", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.ReplaceMisspelling", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.SelectRange", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.AdjustSelectionByCharacterOffset", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.SelectAroundCaret", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.MoveRangeSelectionExtent", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.ScrollFocusedEditableNodeIntoView", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.WaitForPageScaleAnimationForTesting", +["not_found"] = "blink.mojom.FrameWidgetInputHandler.MoveCaret", +["not_found"] = "blink.mojom.WidgetInputHandler.SetFocus", +["not_found"] = "blink.mojom.WidgetInputHandler.MouseCaptureLost", +["not_found"] = "blink.mojom.WidgetInputHandler.SetEditCommandsForNextKeyEvent", +["not_found"] = "blink.mojom.WidgetInputHandler.CursorVisibilityChanged", +["not_found"] = "blink.mojom.WidgetInputHandler.ImeSetComposition", +["not_found"] = "blink.mojom.WidgetInputHandler.ImeCommitText", +["not_found"] = "blink.mojom.WidgetInputHandler.ImeFinishComposingText", +["not_found"] = "blink.mojom.WidgetInputHandler.RequestTextInputStateUpdate", +["not_found"] = "blink.mojom.WidgetInputHandler.RequestCompositionUpdates", +["not_found"] = "blink.mojom.WidgetInputHandler.DispatchEvent", +["not_found"] = "blink.mojom.WidgetInputHandler.DispatchNonBlockingEvent", +["not_found"] = "blink.mojom.WidgetInputHandler.WaitForInputProcessed", +["not_found"] = "blink.mojom.WidgetInputHandler.GetFrameWidgetInputHandler", +["not_found"] = "blink.mojom.WidgetInputHandler.UpdateBrowserControlsState", +["not_found"] = "blink.mojom.PointerLockContext.RequestMouseLockChange", +["not_found"] = "blink.mojom.AdAuctionService.CreateAdRequest", +["not_found"] = "blink.mojom.AdAuctionService.FinalizeAd", +["not_found"] = "blink.mojom.AdAuctionService.RunAdAuction", +["not_found"] = "blink.mojom.AdAuctionService.JoinInterestGroup", +["not_found"] = "blink.mojom.AdAuctionService.LeaveInterestGroup", +["not_found"] = "blink.mojom.AdAuctionService.LeaveInterestGroupForDocument", +["not_found"] = "blink.mojom.AdAuctionService.ClearOriginJoinedInterestGroups", +["not_found"] = "blink.mojom.AdAuctionService.UpdateAdInterestGroups", +["not_found"] = "blink.mojom.AdAuctionService.DeprecatedGetURLFromURN", +["not_found"] = "blink.mojom.AdAuctionService.DeprecatedReplaceInURN", +["not_found"] = "blink.mojom.AdAuctionService.GetInterestGroupAdAuctionData", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedPromiseParam", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedPerBuyerSignalsPromise", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedBuyerTkvSignalsPromise", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedBuyerTimeoutsPromise", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedBuyerCurrenciesPromise", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedDirectFromSellerSignalsPromise", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedDirectFromSellerSignalsHeaderAdSlotPromise", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedDeprecatedRenderURLReplacementsPromise", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedAuctionAdResponsePromise", +["not_found"] = "blink.mojom.AbortableAdAuction.ResolvedAdditionalBids", +["not_found"] = "blink.mojom.AbortableAdAuction.Abort", +["not_found"] = "blink.mojom.KeyboardLockService.RequestKeyboardLock", +["not_found"] = "blink.mojom.KeyboardLockService.CancelKeyboardLock", +["not_found"] = "blink.mojom.KeyboardLockService.GetKeyboardLayoutMap", +["not_found"] = "blink.mojom.LCPCriticalPathPredictorHost.OnLcpUpdated", +["not_found"] = "blink.mojom.LCPCriticalPathPredictorHost.OnLcpTimingPredictedForTesting", +["not_found"] = "blink.mojom.LCPCriticalPathPredictorHost.SetLcpInfluencerScriptUrls", +["not_found"] = "blink.mojom.LCPCriticalPathPredictorHost.AddPreconnectOrigin", +["not_found"] = "blink.mojom.LCPCriticalPathPredictorHost.NotifyFetchedFont", +["not_found"] = "blink.mojom.LCPCriticalPathPredictorHost.NotifyFetchedSubresource", +["not_found"] = "blink.mojom.LCPCriticalPathPredictorHost.SetUnusedPreloads", +["not_found"] = "blink.mojom.LeakDetector.PerformLeakDetection", +["not_found"] = "blink.mojom.TextFragmentReceiver.Cancel", +["not_found"] = "blink.mojom.TextFragmentReceiver.RequestSelector", +["not_found"] = "blink.mojom.TextFragmentReceiver.RemoveFragments", +["not_found"] = "blink.mojom.TextFragmentReceiver.ExtractTextFragmentsMatches", +["not_found"] = "blink.mojom.TextFragmentReceiver.GetExistingSelectors", +["not_found"] = "blink.mojom.TextFragmentReceiver.ExtractFirstFragmentRect", +["not_found"] = "blink.mojom.CodeCacheHost.DidGenerateCacheableMetadata", +["not_found"] = "blink.mojom.CodeCacheHost.FetchCachedCode", +["not_found"] = "blink.mojom.CodeCacheHost.ClearCodeCacheEntry", +["not_found"] = "blink.mojom.CodeCacheHost.DidGenerateCacheableMetadataInCacheStorage", +["not_found"] = "blink.mojom.ContentSecurityNotifier.NotifyContentWithCertificateErrorsRan", +["not_found"] = "blink.mojom.ContentSecurityNotifier.NotifyContentWithCertificateErrorsDisplayed", +["not_found"] = "blink.mojom.ContentSecurityNotifier.NotifyInsecureContentRan", +["not_found"] = "blink.mojom.FetchLaterLoaderFactory.CreateLoader", +["not_found"] = "blink.mojom.FetchLaterLoaderFactory.Clone", +["not_found"] = "blink.mojom.FetchLaterLoader.SendNow", +["not_found"] = "blink.mojom.FetchLaterLoader.Cancel", +["not_found"] = "blink.mojom.KeepAliveHandleFactory.IssueKeepAliveHandle", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementClick", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportNewAnchorElements", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementsEnteredViewport", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementsLeftViewport", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementsPositionUpdate", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementPointerOver", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementPointerOut", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementPointerDown", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ReportAnchorElementPointerDataOnHoverTimerFired", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ProcessPointerEventUsingMLModel", +["not_found"] = "blink.mojom.AnchorElementMetricsHost.ShouldSkipUpdateDelays", +["not_found"] = "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceRedirectReceived", +["not_found"] = "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceResponseReceived", +["not_found"] = "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceTransferSizeUpdated", +["not_found"] = "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceLoadCompleted", +["not_found"] = "blink.mojom.ResourceLoadInfoNotifier.NotifyResourceLoadCanceled", +["not_found"] = "blink.mojom.ResourceLoadInfoNotifier.Clone", +["not_found"] = "blink.mojom.LockRequest.Granted", +["not_found"] = "blink.mojom.LockRequest.Failed", +["not_found"] = "blink.mojom.LockManager.RequestLock", +["not_found"] = "blink.mojom.LockManager.QueryState", +["not_found"] = "blink.mojom.ManifestManager.RequestManifest", +["not_found"] = "blink.mojom.ManifestManager.RequestManifestAndErrors", +["not_found"] = "blink.mojom.ManifestManager.ParseManifestFromString", +["not_found"] = "blink.mojom.ManifestUrlChangeObserver.ManifestUrlChanged", +["not_found"] = "blink.mojom.FullscreenVideoElementHandler.RequestFullscreenVideoElement", +["not_found"] = "blink.mojom.RendererAudioInputStreamFactory.CreateStream", +["not_found"] = "blink.mojom.RendererAudioInputStreamFactory.AssociateInputAndOutputForAec", +["not_found"] = "blink.mojom.RendererAudioInputStreamFactoryClient.StreamCreated", +["not_found"] = "blink.mojom.RendererAudioOutputStreamFactory.RequestDeviceAuthorization", +["not_found"] = "blink.mojom.AecDumpManager.Add", +["not_found"] = "blink.mojom.AecDumpAgent.Start", +["not_found"] = "blink.mojom.AecDumpAgent.Stop", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.EnumerateDevices", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.GetVideoInputCapabilities", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.GetAllVideoInputDeviceFormats", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.GetAvailableVideoInputDeviceFormats", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.GetAudioInputCapabilities", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.AddMediaDevicesListener", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.SetCaptureHandleConfig", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.CloseFocusWindowOfOpportunity", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.ProduceSubCaptureTargetId", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.SetPreferredSinkId", +["not_found"] = "blink.mojom.MediaDevicesDispatcherHost.SelectAudioOutput", +["not_found"] = "blink.mojom.MediaDevicesListener.OnDevicesChanged", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.GenerateStreams", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.FocusCapturedSurface", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.CancelRequest", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.StopStreamDevice", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.OpenDevice", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.CloseDevice", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.SetCapturingLinkSecured", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.ApplySubCaptureTarget", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.SendWheel", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.UpdateZoomLevel", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.RequestCapturedSurfaceControlPermission", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.GetOpenDevice", +["not_found"] = "blink.mojom.MediaStreamDispatcherHost.KeepDeviceAliveForTransfer", +["not_found"] = "blink.mojom.MediaStreamDeviceObserver.OnDeviceStopped", +["not_found"] = "blink.mojom.MediaStreamDeviceObserver.OnDeviceChanged", +["not_found"] = "blink.mojom.MediaStreamDeviceObserver.OnDeviceRequestStateChange", +["not_found"] = "blink.mojom.MediaStreamDeviceObserver.OnDeviceCaptureConfigurationChange", +["not_found"] = "blink.mojom.MediaStreamDeviceObserver.OnDeviceCaptureHandleChange", +["not_found"] = "blink.mojom.MediaStreamDeviceObserver.OnZoomLevelChange", +["not_found"] = "blink.mojom.MediaStreamTrackMetricsHost.AddTrack", +["not_found"] = "blink.mojom.MediaStreamTrackMetricsHost.RemoveTrack", +["not_found"] = "blink.mojom.MimeRegistry.GetMimeTypeFromExtension", +["not_found"] = "blink.mojom.NotificationService.GetPermissionStatus", +["not_found"] = "blink.mojom.NotificationService.DisplayNonPersistentNotification", +["not_found"] = "blink.mojom.NotificationService.CloseNonPersistentNotification", +["not_found"] = "blink.mojom.NotificationService.DisplayPersistentNotification", +["not_found"] = "blink.mojom.NotificationService.ClosePersistentNotification", +["not_found"] = "blink.mojom.NotificationService.GetNotifications", +["not_found"] = "blink.mojom.NonPersistentNotificationListener.OnShow", +["not_found"] = "blink.mojom.NonPersistentNotificationListener.OnClick", +["not_found"] = "blink.mojom.NonPersistentNotificationListener.OnClose", +["not_found"] = "blink.mojom.TranslationManagerCreateTranslatorClient.OnResult", +["not_found"] = "blink.mojom.TranslationManager.CreateTranslator", +["not_found"] = "blink.mojom.TranslationManager.TranslationAvailable", +["not_found"] = "blink.mojom.Translator.Translate", +["not_found"] = "blink.mojom.Translator.TranslateStreaming", +["not_found"] = "payments.mojom.PaymentHandlerResponseCallback.OnResponseForAbortPayment", +["not_found"] = "payments.mojom.PaymentHandlerResponseCallback.OnResponseForCanMakePayment", +["not_found"] = "payments.mojom.PaymentHandlerResponseCallback.OnResponseForPaymentRequest", +["not_found"] = "payments.mojom.PaymentManager.Init", +["not_found"] = "payments.mojom.PaymentManager.DeletePaymentInstrument", +["not_found"] = "payments.mojom.PaymentManager.GetPaymentInstrument", +["not_found"] = "payments.mojom.PaymentManager.KeysOfPaymentInstruments", +["not_found"] = "payments.mojom.PaymentManager.HasPaymentInstrument", +["not_found"] = "payments.mojom.PaymentManager.SetPaymentInstrument", +["not_found"] = "payments.mojom.PaymentManager.ClearPaymentInstruments", +["not_found"] = "payments.mojom.PaymentManager.SetUserHint", +["not_found"] = "payments.mojom.PaymentManager.EnableDelegations", +["not_found"] = "blink.mojom.PeerConnectionManager.OnSuspend", +["not_found"] = "blink.mojom.PeerConnectionManager.OnThermalStateChange", +["not_found"] = "blink.mojom.PeerConnectionManager.StartEventLog", +["not_found"] = "blink.mojom.PeerConnectionManager.StopEventLog", +["not_found"] = "blink.mojom.PeerConnectionManager.StartDataChannelLog", +["not_found"] = "blink.mojom.PeerConnectionManager.StopDataChannelLog", +["not_found"] = "blink.mojom.PeerConnectionManager.GetStandardStats", +["not_found"] = "blink.mojom.PeerConnectionManager.GetCurrentState", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.AddPeerConnection", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.RemovePeerConnection", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.UpdatePeerConnection", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.OnPeerConnectionSessionIdSet", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.GetUserMedia", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.GetUserMediaSuccess", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.GetUserMediaFailure", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.GetDisplayMedia", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.GetDisplayMediaSuccess", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.GetDisplayMediaFailure", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.WebRtcEventLogWrite", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.WebRtcDataChannelLogWrite", +["not_found"] = "blink.mojom.PeerConnectionTrackerHost.AddStandardStats", +["not_found"] = "blink.mojom.V8DetailedMemoryReporter.GetV8MemoryUsage", +["not_found"] = "blink.mojom.PermissionObserver.OnPermissionStatusChange", +["not_found"] = "blink.mojom.EmbeddedPermissionControlClient.OnEmbeddedPermissionControlRegistered", +["not_found"] = "blink.mojom.PermissionService.HasPermission", +["not_found"] = "blink.mojom.PermissionService.RegisterPageEmbeddedPermissionControl", +["not_found"] = "blink.mojom.PermissionService.RequestPageEmbeddedPermission", +["not_found"] = "blink.mojom.PermissionService.RequestPermission", +["not_found"] = "blink.mojom.PermissionService.RequestPermissions", +["not_found"] = "blink.mojom.PermissionService.RevokePermission", +["not_found"] = "blink.mojom.PermissionService.AddPermissionObserver", +["not_found"] = "blink.mojom.PermissionService.AddPageEmbeddedPermissionObserver", +["not_found"] = "blink.mojom.PermissionService.NotifyEventListener", +["not_found"] = "blink.mojom.PersistentRendererPrefsService.SetViewSourceLineWrapping", +["not_found"] = "blink.mojom.PictureInPictureService.StartSession", +["not_found"] = "blink.mojom.PictureInPictureSession.Update", +["not_found"] = "blink.mojom.PictureInPictureSession.Stop", +["not_found"] = "blink.mojom.PictureInPictureSession.UpdateMediaPosition", +["not_found"] = "blink.mojom.PictureInPictureSessionObserver.OnWindowSizeChanged", +["not_found"] = "blink.mojom.PictureInPictureSessionObserver.OnStopped", +["not_found"] = "blink.mojom.PluginRegistry.GetPlugins", +["not_found"] = "blink.mojom.AnchorElementInteractionHost.OnPointerDown", +["not_found"] = "blink.mojom.AnchorElementInteractionHost.OnPointerHoverEager", +["not_found"] = "blink.mojom.AnchorElementInteractionHost.OnPointerHoverModerate", +["not_found"] = "blink.mojom.AnchorElementInteractionHost.OnModerateViewportHeuristicTriggered", +["not_found"] = "blink.mojom.AnchorElementInteractionHost.OnEagerViewportHeuristicTriggered", +["not_found"] = "blink.mojom.NoStatePrefetchProcessor.Start", +["not_found"] = "blink.mojom.NoStatePrefetchProcessor.Cancel", +["not_found"] = "blink.mojom.PresentationConnection.OnMessage", +["not_found"] = "blink.mojom.PresentationConnection.DidChangeState", +["not_found"] = "blink.mojom.PresentationConnection.DidClose", +["not_found"] = "blink.mojom.PresentationService.SetController", +["not_found"] = "blink.mojom.PresentationService.SetReceiver", +["not_found"] = "blink.mojom.PresentationService.SetDefaultPresentationUrls", +["not_found"] = "blink.mojom.PresentationService.ListenForScreenAvailability", +["not_found"] = "blink.mojom.PresentationService.StopListeningForScreenAvailability", +["not_found"] = "blink.mojom.PresentationService.StartPresentation", +["not_found"] = "blink.mojom.PresentationService.ReconnectPresentation", +["not_found"] = "blink.mojom.PresentationService.CloseConnection", +["not_found"] = "blink.mojom.PresentationService.Terminate", +["not_found"] = "blink.mojom.PresentationController.OnScreenAvailabilityUpdated", +["not_found"] = "blink.mojom.PresentationController.OnDefaultPresentationStarted", +["not_found"] = "blink.mojom.PresentationController.OnConnectionStateChanged", +["not_found"] = "blink.mojom.PresentationController.OnConnectionClosed", +["not_found"] = "blink.mojom.PresentationReceiver.OnReceiverConnectionAvailable", +["not_found"] = "blink.mojom.PrivateAggregationHost.ContributeToHistogram", +["not_found"] = "blink.mojom.PrivateAggregationHost.ContributeToHistogramOnEvent", +["not_found"] = "blink.mojom.PrivateAggregationHost.EnableDebugMode", +["not_found"] = "blink.mojom.PushMessaging.Subscribe", +["not_found"] = "blink.mojom.PushMessaging.Unsubscribe", +["not_found"] = "blink.mojom.PushMessaging.GetSubscription", +["not_found"] = "blink.mojom.RenderAccessibilityHost.HandleAXEvents", +["not_found"] = "blink.mojom.RenderAccessibilityHost.HandleAXLocationChanges", +["not_found"] = "blink.mojom.RenderAccessibility.SetMode", +["not_found"] = "blink.mojom.RenderAccessibility.FatalError", +["not_found"] = "blink.mojom.RenderAccessibility.HitTest", +["not_found"] = "blink.mojom.RenderAccessibility.PerformAction", +["not_found"] = "blink.mojom.RenderAccessibility.Reset", +["not_found"] = "blink.mojom.RendererPreferenceWatcher.NotifyUpdate", +["not_found"] = "blink.mojom.ReportingServiceProxy.QueueInterventionReport", +["not_found"] = "blink.mojom.ReportingServiceProxy.QueueDeprecationReport", +["not_found"] = "blink.mojom.ReportingServiceProxy.QueueCspViolationReport", +["not_found"] = "blink.mojom.ReportingServiceProxy.QueueIntegrityViolationReport", +["not_found"] = "blink.mojom.ReportingServiceProxy.QueuePermissionsPolicyViolationReport", +["not_found"] = "blink.mojom.ReportingServiceProxy.QueuePotentialPermissionsPolicyViolationReport", +["not_found"] = "blink.mojom.ReportingServiceProxy.QueueDocumentPolicyViolationReport", +["not_found"] = "blink.mojom.ReportingServiceProxy.QueueCSPHashReport", +["not_found"] = "blink.mojom.WebSensorProvider.GetSensor", +["not_found"] = "blink.mojom.SerialService.SetClient", +["not_found"] = "blink.mojom.SerialService.GetPorts", +["not_found"] = "blink.mojom.SerialService.RequestPort", +["not_found"] = "blink.mojom.SerialService.OpenPort", +["not_found"] = "blink.mojom.SerialService.ForgetPort", +["not_found"] = "blink.mojom.SerialServiceClient.OnPortConnectedStateChanged", +["not_found"] = "blink.mojom.ServiceWorkerFetchResponseCallback.OnResponse", +["not_found"] = "blink.mojom.ServiceWorkerFetchResponseCallback.OnResponseStream", +["not_found"] = "blink.mojom.ServiceWorkerFetchResponseCallback.OnFallback", +["not_found"] = "blink.mojom.ServiceWorkerInstalledScriptsManager.TransferInstalledScript", +["not_found"] = "blink.mojom.ServiceWorkerInstalledScriptsManagerHost.RequestInstalledScript", +["not_found"] = "blink.mojom.ServiceWorkerRunningStatusCallback.OnStatusChanged", +["not_found"] = "blink.mojom.ServiceWorkerStreamCallback.OnCompleted", +["not_found"] = "blink.mojom.ServiceWorkerStreamCallback.OnAborted", +["not_found"] = "blink.mojom.ServiceWorkerWorkerClient.OnControllerChanged", +["not_found"] = "blink.mojom.ServiceWorkerWorkerClientRegistry.RegisterWorkerClient", +["not_found"] = "blink.mojom.ServiceWorkerWorkerClientRegistry.CloneWorkerClientRegistry", +["not_found"] = "blink.mojom.SmartCardService.CreateContext", +["not_found"] = "blink.mojom.WebOTPService.Receive", +["not_found"] = "blink.mojom.WebOTPService.Abort", +["not_found"] = "blink.mojom.SpeculationHost.UpdateSpeculationCandidates", +["not_found"] = "blink.mojom.SpeculationHost.OnLCPPredicted", +["not_found"] = "blink.mojom.SpeculationHost.InitiatePreview", +["not_found"] = "blink.mojom.SpeechSynthesisVoiceListObserver.OnSetVoiceList", +["not_found"] = "blink.mojom.SpeechSynthesisClient.OnStartedSpeaking", +["not_found"] = "blink.mojom.SpeechSynthesisClient.OnFinishedSpeaking", +["not_found"] = "blink.mojom.SpeechSynthesisClient.OnPausedSpeaking", +["not_found"] = "blink.mojom.SpeechSynthesisClient.OnResumedSpeaking", +["not_found"] = "blink.mojom.SpeechSynthesisClient.OnEncounteredWordBoundary", +["not_found"] = "blink.mojom.SpeechSynthesisClient.OnEncounteredSentenceBoundary", +["not_found"] = "blink.mojom.SpeechSynthesisClient.OnEncounteredSpeakingError", +["not_found"] = "blink.mojom.SpeechSynthesis.AddVoiceListObserver", +["not_found"] = "blink.mojom.SpeechSynthesis.Speak", +["not_found"] = "blink.mojom.SpeechSynthesis.Pause", +["not_found"] = "blink.mojom.SpeechSynthesis.Resume", +["not_found"] = "blink.mojom.SpeechSynthesis.Cancel", +["not_found"] = "blink.mojom.SubAppsService.Add", +["not_found"] = "blink.mojom.SubAppsService.List", +["not_found"] = "blink.mojom.SubAppsService.Remove", +["not_found"] = "blink.mojom.WebInstallService.Install", +["not_found"] = "blink.mojom.WebLaunchService.SetLaunchFiles", +["not_found"] = "blink.mojom.WebLaunchService.EnqueueLaunchParams", +["not_found"] = "blink.mojom.AudioContextManager.AudioContextAudiblePlaybackStarted", +["not_found"] = "blink.mojom.AudioContextManager.AudioContextAudiblePlaybackStopped", +["not_found"] = "blink.mojom.AudioContextManager.AudioContextCreated", +["not_found"] = "blink.mojom.AudioContextManager.AudioContextClosed", +["not_found"] = "blink.mojom.DigitalIdentityRequest.Get", +["not_found"] = "blink.mojom.DigitalIdentityRequest.Create", +["not_found"] = "blink.mojom.DigitalIdentityRequest.Abort", +["not_found"] = "blink.mojom.FederatedAuthRequest.RequestToken", +["not_found"] = "blink.mojom.FederatedAuthRequest.RequestUserInfo", +["not_found"] = "blink.mojom.FederatedAuthRequest.CancelTokenRequest", +["not_found"] = "blink.mojom.FederatedAuthRequest.ResolveTokenRequest", +["not_found"] = "blink.mojom.FederatedAuthRequest.SetIdpSigninStatus", +["not_found"] = "blink.mojom.FederatedAuthRequest.RegisterIdP", +["not_found"] = "blink.mojom.FederatedAuthRequest.UnregisterIdP", +["not_found"] = "blink.mojom.FederatedAuthRequest.CloseModalDialogView", +["not_found"] = "blink.mojom.FederatedAuthRequest.PreventSilentAccess", +["not_found"] = "blink.mojom.FederatedAuthRequest.Disconnect", +["not_found"] = "blink.mojom.WebSocketConnector.Connect", +["not_found"] = "blink.mojom.WebTransportConnector.Connect", +["not_found"] = "blink.mojom.RenderInputRouterClient.GetWidgetInputHandler", +["not_found"] = "blink.mojom.RenderInputRouterClient.ShowContextMenu", +["not_found"] = "blink.mojom.RenderInputRouterClient.BindInputTargetClient", +["not_found"] = "blink.mojom.WidgetHost.SetCursor", +["not_found"] = "blink.mojom.WidgetHost.UpdateTooltipUnderCursor", +["not_found"] = "blink.mojom.WidgetHost.UpdateTooltipFromKeyboard", +["not_found"] = "blink.mojom.WidgetHost.ClearKeyboardTriggeredTooltip", +["not_found"] = "blink.mojom.WidgetHost.TextInputStateChanged", +["not_found"] = "blink.mojom.WidgetHost.SelectionBoundsChanged", +["not_found"] = "blink.mojom.WidgetHost.CreateFrameSink", +["not_found"] = "blink.mojom.WidgetHost.RegisterRenderFrameMetadataObserver", +["not_found"] = "blink.mojom.Widget.ForceRedraw", +["not_found"] = "blink.mojom.Widget.UpdateVisualProperties", +["not_found"] = "blink.mojom.Widget.UpdateScreenRects", +["not_found"] = "blink.mojom.Widget.WasHidden", +["not_found"] = "blink.mojom.Widget.WasShown", +["not_found"] = "blink.mojom.Widget.RequestSuccessfulPresentationTimeForNextFrame", +["not_found"] = "blink.mojom.Widget.CancelSuccessfulPresentationTimeRequest", +["not_found"] = "blink.mojom.Widget.SetupBrowserRenderInputRouterConnections", +["not_found"] = "blink.mojom.WidgetCompositor.VisualStateRequest", +["not_found"] = "blink.mojom.SharedWorkerClient.OnCreated", +["not_found"] = "blink.mojom.SharedWorkerClient.OnConnected", +["not_found"] = "blink.mojom.SharedWorkerClient.OnScriptLoadFailed", +["not_found"] = "blink.mojom.SharedWorkerClient.OnReportException", +["not_found"] = "blink.mojom.SharedWorkerClient.OnFeatureUsed", +["not_found"] = "blink.mojom.SharedWorkerHost.OnConnected", +["not_found"] = "blink.mojom.SharedWorkerHost.OnContextClosed", +["not_found"] = "blink.mojom.SharedWorkerHost.OnReadyForInspection", +["not_found"] = "blink.mojom.SharedWorkerHost.OnScriptLoadFailed", +["not_found"] = "blink.mojom.SharedWorkerHost.OnReportException", +["not_found"] = "blink.mojom.SharedWorkerHost.OnFeatureUsed", +["not_found"] = "blink.mojom.SubresourceLoaderUpdater.UpdateSubresourceLoaderFactories", +["not_found"] = "blink.mojom.WorkerContentSettingsProxy.AllowIndexedDB", +["not_found"] = "blink.mojom.WorkerContentSettingsProxy.AllowCacheStorage", +["not_found"] = "blink.mojom.WorkerContentSettingsProxy.AllowWebLocks", +["not_found"] = "blink.mojom.WorkerContentSettingsProxy.RequestFileSystemAccessSync", +["not_found"] = "blink.mojom.WorkletDevToolsHost.OnReadyForInspection", +["not_found"] = "blink.mojom.DWriteFontProxy.FindFamily", +["not_found"] = "blink.mojom.DWriteFontProxy.GetFamilyCount", +["not_found"] = "blink.mojom.DWriteFontProxy.GetFamilyNames", +["not_found"] = "blink.mojom.DWriteFontProxy.GetFontFileHandles", +["not_found"] = "blink.mojom.DWriteFontProxy.MatchUniqueFont", +["not_found"] = "blink.mojom.DWriteFontProxy.MapCharacters", +["not_found"] = "blink.mojom.DirectSocketsService.OpenTCPSocket", +["not_found"] = "blink.mojom.DirectSocketsService.OpenConnectedUDPSocket", +["not_found"] = "blink.mojom.DirectSocketsService.OpenBoundUDPSocket", +["not_found"] = "blink.mojom.DirectSocketsService.OpenTCPServerSocket", +["not_found"] = "blink.mojom.WebPrintJobStateObserver.OnWebPrintJobUpdate", +["not_found"] = "blink.mojom.WebPrintJobController.Cancel", +["not_found"] = "blink.mojom.WebPrinter.FetchAttributes", +["not_found"] = "blink.mojom.WebPrinter.Print", +["not_found"] = "blink.mojom.WebPrintingService.GetPrinters", +["not_found"] = "cc.mojom.RenderFrameMetadataObserver.ReportAllFrameSubmissionsForTesting", +["not_found"] = "cc.mojom.RenderFrameMetadataObserverClient.OnRenderFrameMetadataChanged", +["not_found"] = "cc.mojom.RenderFrameMetadataObserverClient.OnFrameSubmissionForTesting", +["not_found"] = "viz.mojom.CompositorFrameSinkClient.DidReceiveCompositorFrameAck", +["not_found"] = "viz.mojom.CompositorFrameSinkClient.OnBeginFrame", +["not_found"] = "viz.mojom.CompositorFrameSinkClient.OnBeginFramePausedChanged", +["not_found"] = "viz.mojom.CompositorFrameSinkClient.ReclaimResources", +["not_found"] = "viz.mojom.CompositorFrameSinkClient.OnCompositorFrameTransitionDirectiveProcessed", +["not_found"] = "viz.mojom.CompositorFrameSinkClient.OnSurfaceEvicted", +["not_found"] = "viz.mojom.CompositorFrameSink.SetParams", +["not_found"] = "viz.mojom.CompositorFrameSink.SetNeedsBeginFrame", +["not_found"] = "viz.mojom.CompositorFrameSink.SubmitCompositorFrame", +["not_found"] = "viz.mojom.CompositorFrameSink.DidNotProduceFrame", +["not_found"] = "viz.mojom.CompositorFrameSink.NotifyNewLocalSurfaceIdExpectedWhilePaused", +["not_found"] = "viz.mojom.CompositorFrameSink.BindLayerContext", +["not_found"] = "viz.mojom.FrameSinkBundle.SetNeedsBeginFrame", +["not_found"] = "viz.mojom.FrameSinkBundle.Submit", +["not_found"] = "viz.mojom.FrameSinkBundleClient.FlushNotifications", +["not_found"] = "viz.mojom.FrameSinkBundleClient.OnBeginFramePausedChanged", +["not_found"] = "viz.mojom.FrameSinkBundleClient.OnCompositorFrameTransitionDirectiveProcessed", +["not_found"] = "viz.mojom.VideoDetectorObserver.OnVideoActivityStarted", +["not_found"] = "viz.mojom.VideoDetectorObserver.OnVideoActivityEnded", +["not_found"] = "viz.mojom.Gpu.EstablishGpuChannel", +["not_found"] = "viz.mojom.Gpu.CreateVideoEncodeAcceleratorProvider", +["not_found"] = "attribution_reporting.mojom.DataHost.SourceDataAvailable", +["not_found"] = "attribution_reporting.mojom.DataHost.TriggerDataAvailable", +["not_found"] = "attribution_reporting.mojom.DataHost.OsSourceDataAvailable", +["not_found"] = "attribution_reporting.mojom.DataHost.OsTriggerDataAvailable", +["not_found"] = "attribution_reporting.mojom.DataHost.ReportRegistrationHeaderError", +["not_found"] = "device.mojom.Sensor.GetDefaultConfiguration", +["not_found"] = "device.mojom.Sensor.AddConfiguration", +["not_found"] = "device.mojom.Sensor.RemoveConfiguration", +["not_found"] = "device.mojom.Sensor.Suspend", +["not_found"] = "device.mojom.Sensor.Resume", +["not_found"] = "device.mojom.Sensor.ConfigureReadingChangeNotifications", +["not_found"] = "device.mojom.SensorClient.RaiseError", +["not_found"] = "device.mojom.SensorClient.SensorReadingChanged", +["not_found"] = "device.mojom.SensorProvider.GetSensor", +["not_found"] = "device.mojom.SensorProvider.CreateVirtualSensor", +["not_found"] = "device.mojom.SensorProvider.UpdateVirtualSensor", +["not_found"] = "device.mojom.SensorProvider.RemoveVirtualSensor", +["not_found"] = "device.mojom.SensorProvider.GetVirtualSensorInformation", +["unscrambled_0"] = "on_device_model.mojom.StreamingResponder.OnResponse@0", +["unscrambled_1"] = "on_device_model.mojom.StreamingResponder.OnComplete@1", +["unscrambled_0"] = "on_device_model.mojom.ContextClient.OnComplete@0", +["unscrambled_0"] = "on_device_model.mojom.Session.Append@6", +["unscrambled_1"] = "on_device_model.mojom.Session.Generate@7", +["unscrambled_2"] = "on_device_model.mojom.Session.GetSizeInTokens@5", +["unscrambled_3"] = "on_device_model.mojom.Session.Score@3", +["unscrambled_4"] = "on_device_model.mojom.Session.Clone@4", +["unscrambled_5"] = "on_device_model.mojom.Session.GetProbabilitiesBlocking@8", +["unscrambled_6"] = "on_device_model.mojom.Session.SetPriority@9", +["unscrambled_7"] = "on_device_model.mojom.Session.AsrStream@10", +["unscrambled_0"] = "on_device_model.mojom.OnDeviceModel.StartSession@0", +["unscrambled_1"] = "on_device_model.mojom.OnDeviceModel.ClassifyTextSafety@1", +["unscrambled_2"] = "on_device_model.mojom.OnDeviceModel.DetectLanguage@2", +["unscrambled_3"] = "on_device_model.mojom.OnDeviceModel.LoadAdaptation@3", +["unscrambled_0"] = "on_device_model.mojom.TextSafetySession.ClassifyTextSafety@1", +["unscrambled_1"] = "on_device_model.mojom.TextSafetySession.DetectLanguage@2", +["unscrambled_2"] = "on_device_model.mojom.TextSafetySession.Clone@3", +["unscrambled_0"] = "on_device_model.mojom.TextSafetyModel.StartSession@0", +["unscrambled_0"] = "on_device_model.mojom.AsrStreamResponder.OnResponse@0", +["unscrambled_0"] = "on_device_model.mojom.AsrStreamInput.AddAudioChunk@0", +["not_found"] = "blink.mojom.QuotaManagerHost.QueryStorageUsageAndQuota", +["not_found"] = "blink.mojom.WebUsbService.GetDevices", +["not_found"] = "blink.mojom.WebUsbService.GetDevice", +["not_found"] = "blink.mojom.WebUsbService.GetPermission", +["not_found"] = "blink.mojom.WebUsbService.ForgetDevice", +["not_found"] = "blink.mojom.WebUsbService.SetClient", +["not_found"] = "blink.mojom.WebBluetoothServerClient.GATTServerDisconnected", +["not_found"] = "blink.mojom.WebBluetoothCharacteristicClient.RemoteCharacteristicValueChanged", +["not_found"] = "blink.mojom.WebBluetoothAdvertisementClient.AdvertisingEvent", +["not_found"] = "download.mojom.DownloadStreamClient.OnStreamCompleted", +["not_found"] = "storage.mojom.LocalStorageControl.BindStorageArea", +["not_found"] = "storage.mojom.LocalStorageControl.GetUsage", +["not_found"] = "storage.mojom.LocalStorageControl.DeleteStorage", +["not_found"] = "storage.mojom.LocalStorageControl.CleanUpStorage", +["not_found"] = "storage.mojom.LocalStorageControl.Flush", +["not_found"] = "storage.mojom.LocalStorageControl.PurgeMemory", +["not_found"] = "storage.mojom.LocalStorageControl.ApplyPolicyUpdates", +["not_found"] = "storage.mojom.LocalStorageControl.ForceKeepSessionState", +["not_found"] = "storage.mojom.QuotaClient.GetBucketUsage", +["not_found"] = "storage.mojom.QuotaClient.GetDefaultStorageKeys", +["not_found"] = "storage.mojom.QuotaClient.DeleteBucketData", +["not_found"] = "storage.mojom.QuotaClient.PerformStorageCleanup", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.Disable", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.Delete", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.Recover", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetRegisteredStorageKeys", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.FindRegistrationForClientUrl", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.FindRegistrationForScope", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.FindRegistrationForId", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetRegistrationsForStorageKey", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetUsageForStorageKey", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetAllRegistrationsDeprecated", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetFakeRegistrationForClientUrl", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.StoreRegistration", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.DeleteRegistration", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.UpdateToActiveState", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.UpdateLastUpdateCheckTime", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.UpdateNavigationPreloadEnabled", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.UpdateNavigationPreloadHeader", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.UpdateFetchHandlerType", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.UpdateResourceSha256Checksums", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetNewRegistrationId", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetNewVersionId", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetNewResourceId", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.CreateResourceReader", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.CreateResourceWriter", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.CreateResourceMetadataWriter", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.StoreUncommittedResourceId", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.DoomUncommittedResources", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetUserData", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.StoreUserData", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.ClearUserData", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetUserDataByKeyPrefix", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetUserKeysAndDataByKeyPrefix", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.ClearUserDataByKeyPrefixes", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetUserDataForAllRegistrations", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetUserDataForAllRegistrationsByKeyPrefix", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.ClearUserDataForAllRegistrationsByKeyPrefix", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.PerformStorageCleanup", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.ApplyPolicyUpdates", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetPurgingResourceIdsForTest", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetPurgingResourceIdsForLiveVersionForTest", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetPurgeableResourceIdsForTest", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.GetUncommittedResourceIdsForTest", +["not_found"] = "storage.mojom.ServiceWorkerStorageControl.SetPurgingCompleteCallbackForTest", +["not_found"] = "subresource_filter.mojom.SubresourceFilterRulesetObserver.SetRulesetForProcess", +["not_found"] = "storage.mojom.IndexedDBControlTest.GetBaseDataPathForTesting", +["not_found"] = "storage.mojom.IndexedDBControlTest.GetFilePathForTesting", +["not_found"] = "storage.mojom.IndexedDBControlTest.ResetCachesForTesting", +["not_found"] = "storage.mojom.IndexedDBControlTest.GetPathForBlobForTesting", +["not_found"] = "storage.mojom.IndexedDBControlTest.FlushBackingStoreForTesting", +["not_found"] = "storage.mojom.IndexedDBControlTest.FlushBucketSequenceForTesting", +["not_found"] = "storage.mojom.IndexedDBControlTest.GetUsageForTesting", +["not_found"] = "storage.mojom.IndexedDBControlTest.BindMockFailureSingletonForTesting", +["not_found"] = "storage.mojom.IndexedDBControlTest.ForceInitializeFromFilesForTesting", +["not_found"] = "storage.mojom.MockFailureInjector.FailOperation", +["not_found"] = "content.mojom.AgentSchedulingGroup.BindAssociatedInterfaces", +["not_found"] = "content.mojom.AgentSchedulingGroup.CreateView", +["not_found"] = "content.mojom.AgentSchedulingGroup.CreateFrame", +["not_found"] = "content.mojom.AgentSchedulingGroup.CreateSharedStorageWorkletService", +["not_found"] = "content.mojom.AgentSchedulingGroupHost.DidUnloadRenderFrame", +["not_found"] = "content.mojom.ChildProcess.ProcessShutdown", +["not_found"] = "content.mojom.ChildProcess.GetTaskPort", +["not_found"] = "content.mojom.ChildProcess.GetBackgroundTracingAgentProvider", +["not_found"] = "content.mojom.ChildProcess.CrashHungProcess", +["not_found"] = "content.mojom.ChildProcess.BindServiceInterface", +["not_found"] = "content.mojom.ChildProcess.BindReceiver", +["not_found"] = "content.mojom.ChildProcess.SetPseudonymizationSalt", +["not_found"] = "content.mojom.ChildProcess.SetBatterySaverMode", +["not_found"] = "content.mojom.ChildProcessHost.Ping", +["not_found"] = "content.mojom.ChildProcessHost.BindHostReceiver", +["not_found"] = "content.mojom.FieldTrialRecorder.FieldTrialActivated", +["not_found"] = "content.mojom.FrameHTMLSerializerHandler.DidReceiveData", +["not_found"] = "content.mojom.FrameHTMLSerializerHandler.Done", +["not_found"] = "content.mojom.NavigationRendererCancellationListener.RendererCancellationWindowEnded", +["not_found"] = "content.mojom.Frame.CommitSameDocumentNavigation", +["not_found"] = "content.mojom.Frame.UpdateSubresourceLoaderFactories", +["not_found"] = "content.mojom.Frame.SetWantErrorMessageStackTrace", +["not_found"] = "content.mojom.Frame.Unload", +["not_found"] = "content.mojom.Frame.Delete", +["not_found"] = "content.mojom.Frame.UndoCommitNavigation", +["not_found"] = "content.mojom.Frame.GetInterfaceProvider", +["not_found"] = "content.mojom.Frame.SnapshotAccessibilityTree", +["not_found"] = "content.mojom.Frame.GetSerializedHtmlWithLocalLinks", +["not_found"] = "content.mojom.FrameBindingsControl.AllowBindings", +["not_found"] = "content.mojom.FrameBindingsControl.EnableMojoJsBindings", +["not_found"] = "content.mojom.FrameBindingsControl.EnableMojoJsBindingsWithBroker", +["not_found"] = "content.mojom.FrameBindingsControl.BindWebUI", +["not_found"] = "content.mojom.MediaInternalLogRecords.Log", +["not_found"] = "content.mojom.NavigationClient.CommitNavigation", +["not_found"] = "content.mojom.NavigationClient.CommitFailedNavigation", +["not_found"] = "content.mojom.Renderer.CreateAgentSchedulingGroup", +["not_found"] = "content.mojom.Renderer.CreateAssociatedAgentSchedulingGroup", +["not_found"] = "content.mojom.Renderer.TransferSharedLastForegroundTime", +["not_found"] = "content.mojom.Renderer.OnNetworkConnectionChanged", +["not_found"] = "content.mojom.Renderer.OnNetworkQualityChanged", +["not_found"] = "content.mojom.Renderer.SetWebKitSharedTimersSuspended", +["not_found"] = "content.mojom.Renderer.UpdateScrollbarTheme", +["not_found"] = "content.mojom.Renderer.OnSystemColorsChanged", +["not_found"] = "content.mojom.Renderer.UpdateSystemColorInfo", +["not_found"] = "content.mojom.Renderer.PurgePluginListCache", +["not_found"] = "content.mojom.Renderer.PurgeResourceCache", +["not_found"] = "content.mojom.Renderer.SetProcessState", +["not_found"] = "content.mojom.Renderer.SetIsLockedToSite", +["not_found"] = "content.mojom.Renderer.SetIsCrossOriginIsolated", +["not_found"] = "content.mojom.Renderer.SetIsWebSecurityDisabled", +["not_found"] = "content.mojom.Renderer.SetIsIsolatedContext", +["not_found"] = "content.mojom.Renderer.SetWebUIResourceUrlToCodeCacheMap", +["not_found"] = "content.mojom.Renderer.InitializeRenderer", +["not_found"] = "content.mojom.RendererHost.GetBrowserHistogram", +["not_found"] = "content.mojom.RendererHost.SuddenTerminationAllowedChanged", +["not_found"] = "content.mojom.RendererHost.RecordUserMetricsAction", +["not_found"] = "content.mojom.RendererHost.HasGpuProcess", +["not_found"] = "content.mojom.RendererVariationsConfiguration.SetVariationsHeaders", +["not_found"] = "content.mojom.RendererVariationsConfiguration.SetFieldTrialGroup", +["not_found"] = "audio.mojom.SystemInfo.GetInputStreamParameters", +["not_found"] = "audio.mojom.SystemInfo.GetOutputStreamParameters", +["not_found"] = "audio.mojom.SystemInfo.HasInputDevices", +["not_found"] = "audio.mojom.SystemInfo.HasOutputDevices", +["not_found"] = "audio.mojom.SystemInfo.GetInputDeviceDescriptions", +["not_found"] = "audio.mojom.SystemInfo.GetOutputDeviceDescriptions", +["not_found"] = "audio.mojom.SystemInfo.GetAssociatedOutputDeviceID", +["not_found"] = "audio.mojom.SystemInfo.GetInputDeviceInfo", +["not_found"] = "viz.mojom.DisplayClient.OnDisplayReceivedCALayerParams", +["not_found"] = "viz.mojom.DisplayClient.CreateLayeredWindowUpdater", +["not_found"] = "viz.mojom.DisplayClient.AddChildWindowToBrowser", +["not_found"] = "viz.mojom.DisplayClient.DidCompleteSwapWithNewSize", +["not_found"] = "viz.mojom.DisplayClient.SetPreferredRefreshRate", +["not_found"] = "viz.mojom.DisplayPrivate.SetDisplayVisible", +["not_found"] = "viz.mojom.DisplayPrivate.DisableSwapUntilResize", +["not_found"] = "viz.mojom.DisplayPrivate.Resize", +["not_found"] = "viz.mojom.DisplayPrivate.SetDisplayColorMatrix", +["not_found"] = "viz.mojom.DisplayPrivate.SetDisplayColorSpaces", +["not_found"] = "viz.mojom.DisplayPrivate.SetOutputIsSecure", +["not_found"] = "viz.mojom.DisplayPrivate.SetDisplayVSyncParameters", +["not_found"] = "viz.mojom.DisplayPrivate.ForceImmediateDrawAndSwapIfPossible", +["not_found"] = "viz.mojom.DisplayPrivate.SetSupportedRefreshRates", +["not_found"] = "viz.mojom.DisplayPrivate.AddVSyncParameterObserver", +["not_found"] = "viz.mojom.DisplayPrivate.SetDelegatedInkPointRenderer", +["not_found"] = "viz.mojom.DisplayPrivate.SetStandaloneBeginFrameObserver", +["not_found"] = "viz.mojom.DisplayPrivate.SetMaxVSyncAndVrr", +["not_found"] = "viz.mojom.ExternalBeginFrameControllerClient.SetNeedsBeginFrame", +["not_found"] = "viz.mojom.ExternalBeginFrameControllerClient.SetPreferredInterval", +["not_found"] = "viz.mojom.FrameSinkManagerTestApi.HasUnclaimedViewTransitionResources", +["not_found"] = "viz.mojom.FrameSinkManagerTestApi.SetSameDocNavigationScreenshotSize", +["not_found"] = "viz.mojom.FrameSinkManagerTestApi.GetForceEnableZoomState", +["not_found"] = "viz.mojom.FrameSinkManagerTestApi.WaitForSurfaceAnimationManager", +["not_found"] = "viz.mojom.FrameSinksMetricsRecorder.StartFrameCounting", +["not_found"] = "viz.mojom.FrameSinksMetricsRecorder.StopFrameCounting", +["not_found"] = "viz.mojom.FrameSinksMetricsRecorder.StartOverdrawTracking", +["not_found"] = "viz.mojom.FrameSinksMetricsRecorder.StopOverdrawTracking", +["not_found"] = "viz.mojom.VSyncParameterObserver.OnUpdateVSyncParameters", +["not_found"] = "viz.mojom.VizMain.CreateFrameSinkManager", +["not_found"] = "viz.mojom.VizMain.CreateGpuService", +["not_found"] = "viz.mojom.VizMain.SetRenderParams", +["not_found"] = "viz.mojom.VizMain.CreateInfoCollectionGpuService", +["not_found"] = "viz.mojom.VizMain.StartDebugStream", +["not_found"] = "viz.mojom.VizMain.FilterDebugStream", +["not_found"] = "viz.mojom.VizMain.StopDebugStream", +["not_found"] = "viz.mojom.GpuHost.DidInitialize", +["not_found"] = "viz.mojom.GpuHost.DidFailInitialize", +["not_found"] = "viz.mojom.GpuHost.DidCreateContextSuccessfully", +["not_found"] = "viz.mojom.GpuHost.DidCreateOffscreenContext", +["not_found"] = "viz.mojom.GpuHost.DidDestroyOffscreenContext", +["not_found"] = "viz.mojom.GpuHost.DidDestroyChannel", +["not_found"] = "viz.mojom.GpuHost.DidDestroyAllChannels", +["not_found"] = "viz.mojom.GpuHost.DidLoseContext", +["not_found"] = "viz.mojom.GpuHost.DidUpdateGPUInfo", +["not_found"] = "viz.mojom.GpuHost.DidUpdateOverlayInfo", +["not_found"] = "viz.mojom.GpuHost.DidUpdateDXGIInfo", +["not_found"] = "viz.mojom.GpuHost.DisableGpuCompositing", +["not_found"] = "viz.mojom.GpuHost.GetIsolationKey", +["not_found"] = "viz.mojom.GpuHost.StoreBlobToDisk", +["not_found"] = "viz.mojom.GpuHost.ClearGrShaderDiskCache", +["not_found"] = "viz.mojom.GpuService.EstablishGpuChannel", +["not_found"] = "viz.mojom.GpuService.SetChannelClientPid", +["not_found"] = "viz.mojom.GpuService.SetChannelDiskCacheHandle", +["not_found"] = "viz.mojom.GpuService.SetChannelPersistentCacheParams", +["not_found"] = "viz.mojom.GpuService.OnDiskCacheHandleDestoyed", +["not_found"] = "viz.mojom.GpuService.CloseChannel", +["not_found"] = "viz.mojom.GpuService.RegisterDCOMPSurfaceHandle", +["not_found"] = "viz.mojom.GpuService.UnregisterDCOMPSurfaceHandle", +["not_found"] = "viz.mojom.GpuService.CreateVideoEncodeAcceleratorProvider", +["not_found"] = "viz.mojom.GpuService.BindWebNNContextProvider", +["not_found"] = "viz.mojom.GpuService.GetVideoMemoryUsageStats", +["not_found"] = "viz.mojom.GpuService.StartPeakMemoryMonitor", +["not_found"] = "viz.mojom.GpuService.GetPeakMemoryUsage", +["not_found"] = "viz.mojom.GpuService.RequestDXGIInfo", +["not_found"] = "viz.mojom.GpuService.LoadedBlob", +["not_found"] = "viz.mojom.GpuService.WakeUpGpu", +["not_found"] = "viz.mojom.GpuService.GpuSwitched", +["not_found"] = "viz.mojom.GpuService.DisplayAdded", +["not_found"] = "viz.mojom.GpuService.DisplayRemoved", +["not_found"] = "viz.mojom.GpuService.DisplayMetricsChanged", +["not_found"] = "viz.mojom.GpuService.DestroyAllChannels", +["not_found"] = "viz.mojom.GpuService.OnBackgroundCleanup", +["not_found"] = "viz.mojom.GpuService.OnBackgrounded", +["not_found"] = "viz.mojom.GpuService.OnForegrounded", +["not_found"] = "viz.mojom.GpuService.OnMemoryPressure", +["not_found"] = "viz.mojom.GpuService.BeginCATransaction", +["not_found"] = "viz.mojom.GpuService.CommitCATransaction", +["not_found"] = "viz.mojom.GpuService.WriteClangProfilingProfile", +["not_found"] = "viz.mojom.GpuService.GetDawnInfo", +["not_found"] = "viz.mojom.GpuService.Crash", +["not_found"] = "viz.mojom.GpuService.Hang", +["not_found"] = "viz.mojom.GpuService.ThrowJavaException", +["not_found"] = "midi.mojom.MidiSessionProvider.StartSession", +["not_found"] = "midi.mojom.MidiSession.SendData", +["not_found"] = "midi.mojom.MidiSessionClient.AddInputPort", +["not_found"] = "midi.mojom.MidiSessionClient.AddOutputPort", +["not_found"] = "midi.mojom.MidiSessionClient.SetInputPortState", +["not_found"] = "midi.mojom.MidiSessionClient.SetOutputPortState", +["not_found"] = "midi.mojom.MidiSessionClient.SessionStarted", +["not_found"] = "midi.mojom.MidiSessionClient.AcknowledgeSentData", +["not_found"] = "midi.mojom.MidiSessionClient.DataReceived", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.GetNewCertVerifier", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.UpdateCRLSet", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.UpdateCtLogList", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.DisableCtEnforcement", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.UpdateChromeRootStore", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.SetUseChromeRootStore", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.GetChromeRootStoreInfo", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.GetPlatformRootStoreInfo", +["not_found"] = "cert_verifier.mojom.CertVerifierServiceFactory.UpdateNetworkTime", +["not_found"] = "device.mojom.DeviceService.BindFingerprint", +["not_found"] = "device.mojom.DeviceService.BindGeolocationContext", +["not_found"] = "device.mojom.DeviceService.BindGeolocationControl", +["not_found"] = "device.mojom.DeviceService.BindGeolocationInternals", +["not_found"] = "device.mojom.DeviceService.BindInputDeviceManager", +["not_found"] = "device.mojom.DeviceService.BindBatteryMonitor", +["not_found"] = "device.mojom.DeviceService.BindPressureManager", +["not_found"] = "device.mojom.DeviceService.BindVibrationManager", +["not_found"] = "device.mojom.DeviceService.BindHidManager", +["not_found"] = "device.mojom.DeviceService.BindPowerMonitor", +["not_found"] = "device.mojom.DeviceService.BindPublicIpAddressGeolocationProvider", +["not_found"] = "device.mojom.DeviceService.BindScreenOrientationListener", +["not_found"] = "device.mojom.DeviceService.BindSensorProvider", +["not_found"] = "device.mojom.DeviceService.BindSerialPortManager", +["not_found"] = "device.mojom.DeviceService.BindTimeZoneMonitor", +["not_found"] = "device.mojom.DeviceService.BindWakeLockProvider", +["not_found"] = "device.mojom.DeviceService.BindUsbDeviceManager", +["not_found"] = "device.mojom.DeviceService.BindUsbDeviceManagerTest", +["not_found"] = "device.mojom.UsbDeviceManagerTest.AddDeviceForTesting", +["not_found"] = "device.mojom.UsbDeviceManagerTest.RemoveDeviceForTesting", +["not_found"] = "device.mojom.UsbDeviceManagerTest.GetTestDevices", +["not_found"] = "shape_detection.mojom.BarcodeDetectionProvider.CreateBarcodeDetection", +["not_found"] = "shape_detection.mojom.BarcodeDetectionProvider.EnumerateSupportedFormats", +["not_found"] = "shape_detection.mojom.TextDetection.Detect", +["not_found"] = "device_test.mojom.XRTestHook.OnFrameSubmitted", +["not_found"] = "device_test.mojom.XRTestHook.WaitGetDeviceConfig", +["not_found"] = "device_test.mojom.XRTestHook.WaitGetPresentingPose", +["not_found"] = "device_test.mojom.XRTestHook.WaitGetMagicWindowPose", +["not_found"] = "device_test.mojom.XRTestHook.WaitGetControllerRoleForTrackedDeviceIndex", +["not_found"] = "device_test.mojom.XRTestHook.WaitGetControllerData", +["not_found"] = "device_test.mojom.XRTestHook.WaitGetEventData", +["not_found"] = "device_test.mojom.XRTestHook.WaitGetCanCreateSession", +["not_found"] = "device_test.mojom.XRTestHook.WaitGetVisibilityMask", +["not_found"] = "language_detection.mojom.ContentLanguageDetectionDriver.GetLanguageDetectionModel", +["not_found"] = "language_detection.mojom.ContentLanguageDetectionDriver.GetLanguageDetectionModelStatus", +["not_found"] = "optimization_guide.mojom.ModelSolution.CreateSession", +["not_found"] = "optimization_guide.mojom.ModelSolution.CreateTextSafetySession", +["not_found"] = "optimization_guide.mojom.ModelSolution.ReportHealthyCompletion", +["not_found"] = "optimization_guide.mojom.ModelSubscriber.Unavailable", +["not_found"] = "optimization_guide.mojom.ModelSubscriber.Available", +["not_found"] = "optimization_guide.mojom.ModelBroker.Subscribe", +["not_found"] = "optimization_guide_internals.mojom.PageHandlerFactory.CreatePageHandler", +["not_found"] = "optimization_guide_internals.mojom.PageHandlerFactory.RequestDownloadedModelsInfo", +["not_found"] = "optimization_guide_internals.mojom.PageHandlerFactory.RequestLoggedModelQualityClientIds", +["not_found"] = "optimization_guide_internals.mojom.PageHandlerFactory.RequestMqlsLogs", +["not_found"] = "optimization_guide_internals.mojom.Page.OnLogMessageAdded", +["not_found"] = "storage.mojom.Directory.Clone", +["not_found"] = "storage.mojom.Directory.PathExists", +["not_found"] = "storage.mojom.Directory.GetEntries", +["not_found"] = "storage.mojom.Directory.OpenFile", +["not_found"] = "storage.mojom.Directory.CreateDirectory", +["not_found"] = "storage.mojom.Directory.DeleteFile", +["not_found"] = "storage.mojom.Directory.GetFileInfo", +["not_found"] = "storage.mojom.Directory.GetPathAccess", +["not_found"] = "storage.mojom.Directory.RenameFile", +["not_found"] = "storage.mojom.Directory.LockFile", +["not_found"] = "unzip.mojom.UnzipFilter.ShouldUnzipFile", +["not_found"] = "unzip.mojom.UnzipListener.OnProgress", +["not_found"] = "unzip.mojom.Unzipper.Unzip", +["not_found"] = "unzip.mojom.Unzipper.DetectEncoding", +["not_found"] = "unzip.mojom.Unzipper.GetExtractedInfo", +["not_found"] = "unzip.mojom.Unzipper.DecodeXz", +["not_found"] = "attribution_internals.mojom.Observer.OnSourcesChanged", +["not_found"] = "attribution_internals.mojom.Observer.OnReportsChanged", +["not_found"] = "attribution_internals.mojom.Observer.OnSourceHandled", +["not_found"] = "attribution_internals.mojom.Observer.OnReportHandled", +["not_found"] = "attribution_internals.mojom.Observer.OnDebugReportSent", +["not_found"] = "attribution_internals.mojom.Observer.OnAggregatableDebugReportSent", +["not_found"] = "attribution_internals.mojom.Observer.OnTriggerHandled", +["not_found"] = "attribution_internals.mojom.Observer.OnOsRegistration", +["not_found"] = "attribution_internals.mojom.Observer.OnDebugModeChanged", +["not_found"] = "attribution_internals.mojom.Handler.IsAttributionReportingEnabled", +["not_found"] = "attribution_internals.mojom.Handler.SendReport", +["not_found"] = "attribution_internals.mojom.Handler.ClearStorage", +["not_found"] = "attribution_internals.mojom.Factory.Create", +["not_found"] = "tracing.mojom.TracedProcess.ConnectToTracingService", +["not_found"] = "memory_instrumentation.mojom.CoordinatorConnector.RegisterCoordinatorClient", +["not_found"] = "device.mojom.GamepadHapticsManager.PlayVibrationEffectOnce", +["not_found"] = "device.mojom.GamepadHapticsManager.ResetVibrationActuator", +["not_found"] = "device.mojom.GamepadMonitor.GamepadStartPolling", +["not_found"] = "device.mojom.GamepadMonitor.GamepadStopPolling", +["not_found"] = "device.mojom.GamepadMonitor.SetObserver", +["not_found"] = "webnn.mojom.WebNNContextProvider.CreateWebNNContext", +["not_found"] = "device.mojom.VRService.SetClient", +["not_found"] = "device.mojom.VRService.RequestSession", +["not_found"] = "device.mojom.VRService.SupportsSession", +["not_found"] = "device.mojom.VRService.ExitPresent", +["not_found"] = "device.mojom.VRService.SetFramesThrottled", +["not_found"] = "device.mojom.VRService.MakeXrCompatible", +["not_found"] = "private_aggregation_internals.mojom.Factory.Create", +["not_found"] = "storage.mojom.IdbInternalsHandler.GetAllBucketsAcrossAllStorageKeys", +["not_found"] = "storage.mojom.IdbInternalsHandler.DownloadBucketData", +["not_found"] = "storage.mojom.IdbInternalsHandler.ForceClose", +["not_found"] = "storage.mojom.IdbInternalsHandler.StartMetadataRecording", +["not_found"] = "storage.mojom.IdbInternalsHandler.StopMetadataRecording", +["not_found"] = "storage.mojom.IdbInternalsHandler.InspectClient", +["not_found"] = "traces_internals.mojom.TracesInternalsHandlerFactory.CreatePageHandler", +["not_found"] = "webxr.mojom.WebXrInternalsHandler.GetDeviceInfo", +["not_found"] = "webxr.mojom.WebXrInternalsHandler.GetActiveRuntimes", +["not_found"] = "webxr.mojom.WebXrInternalsHandler.SubscribeToEvents", +["not_found"] = "blink.mojom.GpuDataManager.Are3DAPIsBlockedForUrl", +["not_found"] = "auction_worklet.mojom.AuctionWorkletService.SetTrustedSignalsCache", +["not_found"] = "auction_worklet.mojom.AuctionWorkletService.LoadBidderWorklet", +["not_found"] = "auction_worklet.mojom.AuctionWorkletService.LoadSellerWorklet", +["not_found"] = "auction_worklet.mojom.AuctionSharedStorageHost.SharedStorageUpdate", +["not_found"] = "auction_worklet.mojom.AuctionSharedStorageHost.SharedStorageBatchUpdate", +["not_found"] = "auction_worklet.mojom.AuctionNetworkEventsHandler.OnNetworkSendRequest", +["not_found"] = "auction_worklet.mojom.AuctionNetworkEventsHandler.OnNetworkResponseReceived", +["not_found"] = "auction_worklet.mojom.AuctionNetworkEventsHandler.OnNetworkRequestComplete", +["not_found"] = "auction_worklet.mojom.AuctionNetworkEventsHandler.Clone", +["not_found"] = "auction_worklet.mojom.LoadSellerWorkletClient.SellerWorkletLoaded", +["not_found"] = "auction_worklet.mojom.BidderWorklet.BeginGenerateBid", +["not_found"] = "auction_worklet.mojom.BidderWorklet.SendPendingSignalsRequests", +["not_found"] = "auction_worklet.mojom.BidderWorklet.ReportWin", +["not_found"] = "auction_worklet.mojom.BidderWorklet.ConnectDevToolsAgent", +["not_found"] = "auction_worklet.mojom.SellerWorklet.ScoreAd", +["not_found"] = "auction_worklet.mojom.SellerWorklet.SendPendingSignalsRequests", +["not_found"] = "auction_worklet.mojom.SellerWorklet.ReportResult", +["not_found"] = "auction_worklet.mojom.SellerWorklet.ConnectDevToolsAgent", +["not_found"] = "auction_worklet.mojom.ScoreAdClient.OnScoreAdComplete", +["not_found"] = "auction_worklet.mojom.GenerateBidClient.OnBiddingSignalsReceived", +["not_found"] = "auction_worklet.mojom.GenerateBidClient.OnGenerateBidComplete", +["not_found"] = "auction_worklet.mojom.GenerateBidFinalizer.FinishGenerateBid", +["not_found"] = "auction_worklet.mojom.TrustedSignalsCacheClient.OnSuccess", +["not_found"] = "auction_worklet.mojom.TrustedSignalsCacheClient.OnError", +["not_found"] = "auction_worklet.mojom.TrustedSignalsCache.GetTrustedSignals", +["not_found"] = "content.mojom.ChildMemoryConsumer.NotifyReleaseMemory", +["not_found"] = "content.mojom.ChildMemoryConsumer.NotifyUpdateMemoryLimit", +["not_found"] = "content.mojom.BrowserMemoryConsumerRegistry.RegisterChildMemoryConsumer", +["not_found"] = "private_aggregation_internals.mojom.Observer.OnRequestStorageModified", +["not_found"] = "private_aggregation_internals.mojom.Observer.OnReportHandled", +["not_found"] = "private_aggregation_internals.mojom.Handler.GetReports", +["not_found"] = "private_aggregation_internals.mojom.Handler.SendReports", +["not_found"] = "private_aggregation_internals.mojom.Handler.ClearStorage", +["not_found"] = "blink.mojom.EmbeddedFrameSinkClient.BindSurfaceEmbedder", +["not_found"] = "blink.mojom.EmbeddedFrameSinkProvider.RegisterEmbeddedFrameSink", +["not_found"] = "blink.mojom.EmbeddedFrameSinkProvider.RegisterEmbeddedFrameSinkBundle", +["not_found"] = "blink.mojom.EmbeddedFrameSinkProvider.CreateCompositorFrameSink", +["not_found"] = "blink.mojom.EmbeddedFrameSinkProvider.CreateBundledCompositorFrameSink", +["not_found"] = "blink.mojom.EmbeddedFrameSinkProvider.CreateSimpleCompositorFrameSink", +["not_found"] = "blink.mojom.EmbeddedFrameSinkProvider.ConnectToEmbedder", +["not_found"] = "blink.mojom.EmbeddedFrameSinkProvider.RegisterFrameSinkHierarchy", +["not_found"] = "blink.mojom.EmbeddedFrameSinkProvider.UnregisterFrameSinkHierarchy", +["not_found"] = "input.mojom.RenderInputRouterDelegate.StateOnTouchTransfer", +["not_found"] = "input.mojom.RenderInputRouterDelegate.ForceEnableZoomStateChanged", +["not_found"] = "input.mojom.RenderInputRouterDelegate.StopFlingingOnViz", +["not_found"] = "input.mojom.RenderInputRouterDelegate.RestartInputEventAckTimeoutIfNecessary", +["not_found"] = "input.mojom.RenderInputRouterDelegate.NotifyVisibilityChanged", +["not_found"] = "input.mojom.RenderInputRouterDelegate.ResetGestureDetection", +["not_found"] = "input.mojom.RenderInputRouterDelegateClient.NotifyObserversOfInputEvent", +["not_found"] = "input.mojom.RenderInputRouterDelegateClient.NotifyObserversOfInputEventAcks", +["not_found"] = "input.mojom.RenderInputRouterDelegateClient.OnInvalidInputEventSource", +["not_found"] = "input.mojom.RenderInputRouterDelegateClient.StateOnOverscrollTransfer", +["not_found"] = "input.mojom.RenderInputRouterDelegateClient.RendererInputResponsivenessChanged", +["not_found"] = "metrics.mojom.SingleSampleMetricsProvider.AcquireSingleSampleMetric", +["not_found"] = "font_data_service.mojom.FontDataService.MatchFamilyName", +["not_found"] = "font_data_service.mojom.FontDataService.MatchFamilyNameCharacter", +["not_found"] = "font_data_service.mojom.FontDataService.GetAllFamilyNames", +["not_found"] = "font_data_service.mojom.FontDataService.LegacyMakeTypeface", +["not_found"] = "tracing.mojom.BackgroundTracingAgentClient.OnInitialized", +["not_found"] = "tracing.mojom.BackgroundTracingAgentClient.OnTriggerBackgroundTrace", +["not_found"] = "tracing.mojom.BackgroundTracingAgent.SetUMACallback", +["not_found"] = "tracing.mojom.BackgroundTracingAgent.ClearUMACallback", +["not_found"] = "tracing.mojom.BackgroundTracingAgentProvider.Create", +["not_found"] = "traces_internals.mojom.PageHandler.StartTraceSession", +["not_found"] = "traces_internals.mojom.PageHandler.CloneTraceSession", +["not_found"] = "traces_internals.mojom.PageHandler.StopTraceSession", +["not_found"] = "traces_internals.mojom.PageHandler.GetTrackEventCategories", +["not_found"] = "traces_internals.mojom.PageHandler.GetBufferUsage", +["not_found"] = "traces_internals.mojom.PageHandler.GetAllTraceReports", +["not_found"] = "traces_internals.mojom.PageHandler.DeleteSingleTrace", +["not_found"] = "traces_internals.mojom.PageHandler.DeleteAllTraces", +["not_found"] = "traces_internals.mojom.PageHandler.UserUploadSingleTrace", +["not_found"] = "traces_internals.mojom.PageHandler.DownloadTrace", +["not_found"] = "traces_internals.mojom.PageHandler.GetAllScenarios", +["not_found"] = "traces_internals.mojom.PageHandler.SetEnabledScenarios", +["not_found"] = "traces_internals.mojom.PageHandler.SetScenariosConfigFromString", +["not_found"] = "traces_internals.mojom.PageHandler.SetScenariosConfigFromBuffer", +["not_found"] = "traces_internals.mojom.PageHandler.GetPrivacyFilterEnabled", +["not_found"] = "traces_internals.mojom.PageHandler.SetPrivacyFilterEnabled", +["not_found"] = "traces_internals.mojom.PageHandler.GetSystemTracingState", +["not_found"] = "traces_internals.mojom.PageHandler.GetSecurityShieldIconUrl", +["not_found"] = "traces_internals.mojom.PageHandler.EnableSystemTracing", +["not_found"] = "traces_internals.mojom.PageHandler.DisableSystemTracing", +["not_found"] = "traces_internals.mojom.Page.OnTraceComplete", +["not_found"] = "tracing.mojom.ConsumerHost.EnableTracing", +["not_found"] = "tracing.mojom.ConsumerHost.CloneSession", +["not_found"] = "tracing.mojom.TracingSessionHost.ChangeTraceConfig", +["not_found"] = "tracing.mojom.TracingSessionHost.DisableTracing", +["not_found"] = "tracing.mojom.TracingSessionHost.ReadBuffers", +["not_found"] = "tracing.mojom.TracingSessionHost.RequestBufferUsage", +["not_found"] = "tracing.mojom.TracingSessionHost.DisableTracingAndEmitJson", +["not_found"] = "tracing.mojom.TracingSessionClient.OnTracingEnabled", +["not_found"] = "tracing.mojom.TracingSessionClient.OnTracingDisabled", +["not_found"] = "tracing.mojom.TracingService.Initialize", +["not_found"] = "tracing.mojom.TracingService.AddClient", +["not_found"] = "tracing.mojom.TracingService.BindConsumerHost", +["not_found"] = "bluetooth.mojom.FakeCentral.SimulatePreconnectedPeripheral", +["not_found"] = "bluetooth.mojom.FakeCentral.SimulateAdvertisementReceived", +["not_found"] = "bluetooth.mojom.FakeCentral.SetState", +["not_found"] = "bluetooth.mojom.FakeCentral.SetNextGATTConnectionResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.SetNextGATTDiscoveryResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.SimulateGATTOperationResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.SimulateGATTDisconnection", +["not_found"] = "bluetooth.mojom.FakeCentral.SimulateGATTServicesChanged", +["not_found"] = "bluetooth.mojom.FakeCentral.SimulateCharacteristicOperationResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.SimulateDescriptorOperationResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.AddFakeService", +["not_found"] = "bluetooth.mojom.FakeCentral.RemoveFakeService", +["not_found"] = "bluetooth.mojom.FakeCentral.AddFakeCharacteristic", +["not_found"] = "bluetooth.mojom.FakeCentral.RemoveFakeCharacteristic", +["not_found"] = "bluetooth.mojom.FakeCentral.AddFakeDescriptor", +["not_found"] = "bluetooth.mojom.FakeCentral.RemoveFakeDescriptor", +["not_found"] = "bluetooth.mojom.FakeCentral.SetNextReadCharacteristicResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.SetNextWriteCharacteristicResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.SetNextSubscribeToNotificationsResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.SetNextUnsubscribeFromNotificationsResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.IsNotifying", +["not_found"] = "bluetooth.mojom.FakeCentral.GetLastWrittenCharacteristicValue", +["not_found"] = "bluetooth.mojom.FakeCentral.SetNextReadDescriptorResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.SetNextWriteDescriptorResponse", +["not_found"] = "bluetooth.mojom.FakeCentral.GetLastWrittenDescriptorValue", +["not_found"] = "bluetooth.mojom.FakeCentral.SetClient", +["not_found"] = "bluetooth.mojom.FakeCentralClient.DispatchGATTOperationEvent", +["not_found"] = "bluetooth.mojom.FakeCentralClient.DispatchCharacteristicOperationEvent", +["not_found"] = "bluetooth.mojom.FakeCentralClient.DispatchDescriptorOperationEvent", +["not_found"] = "device.mojom.IsolatedXRRuntimeProviderClient.OnDeviceAdded", +["not_found"] = "device.mojom.IsolatedXRRuntimeProviderClient.OnDeviceRemoved", +["not_found"] = "device.mojom.IsolatedXRRuntimeProviderClient.OnDevicesEnumerated", +["not_found"] = "device.mojom.IsolatedXRRuntimeProvider.RequestDevices", +["not_found"] = "device.mojom.XRDeviceService.BindRuntimeProvider", +["not_found"] = "device.mojom.XRDeviceService.BindTestHook", +["not_found"] = "device.mojom.XRSessionMetricsRecorder.ReportFeatureUsed", +["not_found"] = "device.mojom.XRRuntimeEventListener.OnVisibilityStateChanged", +["not_found"] = "device.mojom.XRRuntimeEventListener.OnExitPresent", +["not_found"] = "device.mojom.XRRuntime.RequestSession", +["not_found"] = "device.mojom.XRRuntime.ShutdownSession", +["not_found"] = "device.mojom.XRRuntime.ListenToDeviceChanges", +["not_found"] = "device.mojom.VRServiceClient.OnDeviceChanged", +["not_found"] = "device.mojom.XRSessionClient.OnExitPresent", +["not_found"] = "device.mojom.XRSessionClient.OnVisibilityStateChanged", +["not_found"] = "device.mojom.XRDeviceServiceHost.BindGpu", +["not_found"] = "device.mojom.WebXrInternalsRendererListener.OnFrameData", +["not_found"] = "device.mojom.WebXrInternalsRendererListener.OnConsoleLog", +["not_found"] = "webxr.mojom.XRInternalsSessionListener.LogXrSessionRequested", +["not_found"] = "webxr.mojom.XRInternalsSessionListener.LogXrSessionRejected", +["not_found"] = "webxr.mojom.XRInternalsSessionListener.LogXrSessionStarted", +["not_found"] = "webxr.mojom.XRInternalsSessionListener.LogXrSessionStopped", +["not_found"] = "webxr.mojom.XRInternalsSessionListener.LogXrRuntimeAdded", +["not_found"] = "webxr.mojom.XRInternalsSessionListener.LogXrRuntimeRemoved", +["not_found"] = "webxr.mojom.XRInternalsSessionListener.LogFrameData", +["not_found"] = "webxr.mojom.XRInternalsSessionListener.LogConsoleMessages", +["not_found"] = "blink.mojom.SurfaceEmbedder.SetLocalSurfaceId", +["not_found"] = "blink.mojom.SurfaceEmbedder.OnOpacityChanged", +["not_found"] = "memory_instrumentation.mojom.ClientProcess.RequestChromeMemoryDump", +["not_found"] = "memory_instrumentation.mojom.ClientProcess.RequestOSMemoryDump", +["not_found"] = "memory_instrumentation.mojom.HeapProfiler.DumpProcessesForTracing", +["not_found"] = "memory_instrumentation.mojom.HeapProfilerHelper.GetVmRegionsForHeapProfiler", +["not_found"] = "memory_instrumentation.mojom.Coordinator.RequestGlobalMemoryDump", +["not_found"] = "memory_instrumentation.mojom.Coordinator.RequestGlobalMemoryDumpForPid", +["not_found"] = "memory_instrumentation.mojom.Coordinator.RequestPrivateMemoryFootprint", +["not_found"] = "memory_instrumentation.mojom.Coordinator.RequestGlobalMemoryDumpAndAppendToTrace", +["not_found"] = "tracing.mojom.ProducerHost.CommitData", +["not_found"] = "tracing.mojom.ProducerHost.RegisterDataSource", +["not_found"] = "tracing.mojom.ProducerHost.UpdateDataSource", +["not_found"] = "tracing.mojom.ProducerHost.RegisterTraceWriter", +["not_found"] = "tracing.mojom.ProducerHost.UnregisterTraceWriter", +["not_found"] = "tracing.mojom.PerfettoService.ConnectToProducerHost", +["not_found"] = "tracing.mojom.ProducerClient.OnTracingStart", +["not_found"] = "tracing.mojom.ProducerClient.StartDataSource", +["not_found"] = "tracing.mojom.ProducerClient.StopDataSource", +["not_found"] = "tracing.mojom.ProducerClient.Flush", +["not_found"] = "tracing.mojom.ProducerClient.ClearIncrementalState", +["not_found"] = "guest_view.mojom.GuestViewHost.AttachToEmbedderFrame", +["not_found"] = "guest_view.mojom.GuestViewHost.ViewCreated", +["not_found"] = "content_settings.mojom.ContentSettingsAgent.SetAllowRunningInsecureContent", +["not_found"] = "content_settings.mojom.ContentSettingsAgent.SendRendererContentSettingRules", +["not_found"] = "prefs.mojom.ResetOnLoadObserver.OnResetOnLoad", +["not_found"] = "prefs.mojom.TrackedPreferenceValidationDelegate.OnAtomicPreferenceValidation", +["not_found"] = "prefs.mojom.TrackedPreferenceValidationDelegate.OnSplitPreferenceValidation", +["not_found"] = "autofill_ml_internals.mojom.Page.OnLogAdded", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositorCollection.SetDiscardableSharedMemoryManager", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositorCollection.CreateCompositor", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositorCollection.OnMemoryPressure", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositorCollection.ListCompositors", +["not_found"] = "paint_preview.mojom.PaintPreviewRecorder.CapturePaintPreview", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositor.BeginSeparatedFrameComposite", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositor.BitmapForSeparatedFrame", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositor.BeginMainFrameComposite", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositor.BitmapForMainFrame", +["not_found"] = "paint_preview.mojom.PaintPreviewCompositor.SetRootFrameUrl", +["not_found"] = "page_load_metrics.mojom.PageLoadMetrics.UpdateTiming", +["not_found"] = "page_load_metrics.mojom.PageLoadMetrics.SetUpSharedMemoryForDroppedFrames", +["not_found"] = "page_load_metrics.mojom.PageLoadMetrics.AddCustomUserTiming", +["not_found"] = "image_annotation.mojom.ImageProcessor.GetJpgImageData", +["not_found"] = "image_annotation.mojom.Annotator.AnnotateImage", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.SetNetworkAlmostIdle", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.SetLifecycleState", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.SetHasNonEmptyBeforeUnload", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.SetHadFormInteraction", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.SetHadUserEdits", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.OnStartedUsingWebRTC", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.OnStoppedUsingWebRTC", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.SetIsAdFrame", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.OnNonPersistentNotificationCreated", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.OnFirstContentfulPaint", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.OnWebMemoryMeasurementRequested", +["not_found"] = "performance_manager.mojom.DocumentCoordinationUnit.OnFreezingOriginTrialOptOut", +["not_found"] = "patch.mojom.FilePatcher.PatchFilePuffPatch", +["not_found"] = "patch.mojom.FilePatcher.PatchFileZucchini", +["not_found"] = "mirroring.mojom.MirroringService.Start", +["not_found"] = "mirroring.mojom.MirroringService.SwitchMirroringSourceTab", +["not_found"] = "mirroring.mojom.MirroringService.GetMirroringStats", +["not_found"] = "printing.mojom.PrintCompositor.NotifyUnavailableSubframe", +["not_found"] = "printing.mojom.PrintCompositor.AddSubframeContent", +["not_found"] = "printing.mojom.PrintCompositor.SetAccessibilityTree", +["not_found"] = "printing.mojom.PrintCompositor.CompositePage", +["not_found"] = "printing.mojom.PrintCompositor.CompositeDocument", +["not_found"] = "printing.mojom.PrintCompositor.PrepareToCompositeDocument", +["not_found"] = "printing.mojom.PrintCompositor.FinishDocumentComposition", +["not_found"] = "printing.mojom.PrintCompositor.SetWebContentsURL", +["not_found"] = "printing.mojom.PrintCompositor.SetUserAgent", +["not_found"] = "printing.mojom.PrintCompositor.SetGenerateDocumentOutline", +["not_found"] = "printing.mojom.PrintCompositor.SetTitle", +["not_found"] = "printing.mojom.PrintCompositor.SetWatermarkBlock", +["not_found"] = "on_device_translation.mojom.OnDeviceTranslationService.SetServiceConfig", +["not_found"] = "on_device_translation.mojom.OnDeviceTranslationService.CreateTranslator", +["not_found"] = "on_device_translation.mojom.OnDeviceTranslationService.CanTranslate", +["not_found"] = "on_device_translation.mojom.Translator.Translate", +["not_found"] = "on_device_translation.mojom.Translator.SplitSentences", +["not_found"] = "on_device_translation.mojom.FileOperationProxy.FileExists", +["not_found"] = "on_device_translation.mojom.FileOperationProxy.Open", +["not_found"] = "searchbox.mojom.Page.AutocompleteResultChanged", +["not_found"] = "searchbox.mojom.Page.UpdateSelection", +["not_found"] = "searchbox.mojom.Page.SetKeywordSelected", +["not_found"] = "searchbox.mojom.Page.SetInputText", +["not_found"] = "searchbox.mojom.Page.SetThumbnail", +["not_found"] = "searchbox.mojom.Page.OnContextualInputStatusChanged", +["not_found"] = "searchbox.mojom.Page.OnTabStripChanged", +["not_found"] = "searchbox.mojom.Page.AddFileContext", +["not_found"] = "optimization_guide.mojom.PageTextConsumer.OnTextDumpChunk", +["not_found"] = "optimization_guide.mojom.PageTextConsumer.OnChunksEnd", +["not_found"] = "data_sharing_internals.mojom.PageHandlerFactory.CreatePageHandler", +["not_found"] = "data_sharing_internals.mojom.PageHandler.IsEmptyService", +["not_found"] = "data_sharing_internals.mojom.PageHandler.GetAllGroups", +["not_found"] = "data_sharing_internals.mojom.Page.OnLogMessageAdded", +["not_found"] = "chrome_urls.mojom.PageHandler.GetUrls", +["not_found"] = "chrome_urls.mojom.PageHandler.SetDebugPagesEnabled", +["not_found"] = "lens.mojom.LensPage.ScreenshotDataReceived", +["not_found"] = "lens.mojom.LensPage.NotifyHandshakeComplete", +["not_found"] = "lens.mojom.LensPage.NotifyResultsPanelOpened", +["not_found"] = "lens.mojom.LensPage.NotifyOverlayClosing", +["not_found"] = "lens.mojom.LensPage.ObjectsReceived", +["not_found"] = "lens.mojom.LensPage.TextReceived", +["not_found"] = "lens.mojom.LensPage.RegionTextReceived", +["not_found"] = "lens.mojom.LensPage.ThemeReceived", +["not_found"] = "lens.mojom.LensPage.ShouldShowContextualSearchBox", +["not_found"] = "lens.mojom.LensPage.PageContentTypeChanged", +["not_found"] = "lens.mojom.LensPage.SetPostRegionSelection", +["not_found"] = "lens.mojom.LensPage.SetTextSelection", +["not_found"] = "lens.mojom.LensPage.SetTranslateMode", +["not_found"] = "lens.mojom.LensPage.ClearRegionSelection", +["not_found"] = "lens.mojom.LensPage.ClearTextSelection", +["not_found"] = "lens.mojom.LensPage.ClearAllSelections", +["not_found"] = "lens.mojom.LensPage.OnCopyCommand", +["not_found"] = "lens.mojom.LensPage.SuppressGhostLoader", +["not_found"] = "lens.mojom.LensPage.OnOverlayReshown", +["not_found"] = "lens.mojom.LensPageHandler.ActivityRequestedByOverlay", +["not_found"] = "lens.mojom.LensPageHandler.CloseRequestedByOverlayCloseButton", +["not_found"] = "lens.mojom.LensPageHandler.CloseRequestedByOverlayBackgroundClick", +["not_found"] = "lens.mojom.LensPageHandler.NotifyOverlayInitialized", +["not_found"] = "lens.mojom.LensPageHandler.AddBackgroundBlur", +["not_found"] = "lens.mojom.LensPageHandler.SetLiveBlur", +["not_found"] = "lens.mojom.LensPageHandler.FeedbackRequestedByOverlay", +["not_found"] = "lens.mojom.LensPageHandler.GetOverlayInvocationSource", +["not_found"] = "lens.mojom.LensPageHandler.InfoRequestedByOverlay", +["not_found"] = "lens.mojom.LensPageHandler.IssueLensRegionRequest", +["not_found"] = "lens.mojom.LensPageHandler.IssueLensObjectRequest", +["not_found"] = "lens.mojom.LensPageHandler.IssueTextSelectionRequest", +["not_found"] = "lens.mojom.LensPageHandler.IssueTranslateSelectionRequest", +["not_found"] = "lens.mojom.LensPageHandler.IssueMathSelectionRequest", +["not_found"] = "lens.mojom.LensPageHandler.IssueTranslateFullPageRequest", +["not_found"] = "lens.mojom.LensPageHandler.IssueEndTranslateModeRequest", +["not_found"] = "lens.mojom.LensPageHandler.CopyText", +["not_found"] = "lens.mojom.LensPageHandler.CopyImage", +["not_found"] = "lens.mojom.LensPageHandler.SaveAsImage", +["not_found"] = "lens.mojom.LensPageHandler.ClosePreselectionBubble", +["not_found"] = "lens.mojom.LensPageHandler.RecordUkmAndTaskCompletionForLensOverlayInteraction", +["not_found"] = "lens.mojom.LensPageHandler.RecordLensOverlaySemanticEvent", +["not_found"] = "lens.mojom.LensPageHandler.MaybeShowTranslateFeaturePromo", +["not_found"] = "lens.mojom.LensPageHandler.MaybeCloseTranslateFeaturePromo", +["not_found"] = "lens.mojom.LensPageHandler.FetchSupportedLanguages", +["not_found"] = "lens.mojom.LensPageHandler.FinishReshowOverlay", +["not_found"] = "lens.mojom.LensPageHandlerFactory.CreatePageHandler", +["not_found"] = "lens.mojom.LensSidePanelPage.LoadResultsInFrame", +["not_found"] = "lens.mojom.LensSidePanelPage.SetIsLoadingResults", +["not_found"] = "lens.mojom.LensSidePanelPage.SetPageContentUploadProgress", +["not_found"] = "lens.mojom.LensSidePanelPage.SetBackArrowVisible", +["not_found"] = "lens.mojom.LensSidePanelPage.SetShowErrorPage", +["not_found"] = "lens.mojom.LensSidePanelPage.SuppressGhostLoader", +["not_found"] = "lens.mojom.LensSidePanelPage.PageContentTypeChanged", +["not_found"] = "lens.mojom.LensSidePanelPage.ShowToast", +["not_found"] = "lens.mojom.LensSidePanelPage.SendClientMessageToAim", +["not_found"] = "lens.mojom.LensSidePanelPage.AimHandshakeReceived", +["not_found"] = "lens.mojom.LensSidePanelPage.AimResultsChanged", +["not_found"] = "lens.mojom.LensSidePanelPage.FocusResultsFrame", +["not_found"] = "lens.mojom.LensSidePanelPage.SetIsOverlayShowing", +["not_found"] = "lens.mojom.LensSidePanelPage.FocusSearchbox", +["not_found"] = "lens.mojom.LensSidePanelPageHandlerFactory.CreateSidePanelPageHandler", +["not_found"] = "ntp.calendar.mojom.OutlookCalendarPageHandler.GetEvents", +["not_found"] = "ntp.calendar.mojom.OutlookCalendarPageHandler.DismissModule", +["not_found"] = "ntp.calendar.mojom.OutlookCalendarPageHandler.RestoreModule", +["not_found"] = "ntp.most_relevant_tab_resumption.mojom.PageHandler.GetURLVisits", +["not_found"] = "ntp.most_relevant_tab_resumption.mojom.PageHandler.DismissModule", +["not_found"] = "ntp.most_relevant_tab_resumption.mojom.PageHandler.DismissURLVisit", +["not_found"] = "ntp.most_relevant_tab_resumption.mojom.PageHandler.RestoreModule", +["not_found"] = "ntp.most_relevant_tab_resumption.mojom.PageHandler.RestoreURLVisit", +["not_found"] = "ntp.most_relevant_tab_resumption.mojom.PageHandler.RecordAction", +["not_found"] = "ntp.tab_groups.mojom.PageHandler.CreateNewTabGroup", +["not_found"] = "ntp.tab_groups.mojom.PageHandler.GetTabGroups", +["not_found"] = "ntp.tab_groups.mojom.PageHandler.OpenTabGroup", +["not_found"] = "ntp.tab_groups.mojom.PageHandler.DismissModule", +["not_found"] = "ntp.tab_groups.mojom.PageHandler.RestoreModule", +["not_found"] = "color_change_listener.mojom.PageHandler.SetPage", +["not_found"] = "color_change_listener.mojom.Page.OnColorProviderChanged", +["not_found"] = "tabs_api.mojom.TabsObserver.OnTabEvents", +["not_found"] = "custom_help_bubble.mojom.CustomHelpBubbleHandlerFactory.CreateCustomHelpBubbleHandler", +["not_found"] = "custom_help_bubble.mojom.CustomHelpBubbleHandler.NotifyUserAction", +["not_found"] = "help_bubble.mojom.HelpBubbleClient.ShowHelpBubble", +["not_found"] = "help_bubble.mojom.HelpBubbleClient.ToggleFocusForAccessibility", +["not_found"] = "help_bubble.mojom.HelpBubbleClient.HideHelpBubble", +["not_found"] = "help_bubble.mojom.HelpBubbleClient.ExternalHelpBubbleUpdated", +["not_found"] = "help_bubble.mojom.HelpBubbleHandler.BindTrackedElementHandler", +["not_found"] = "help_bubble.mojom.HelpBubbleHandler.HelpBubbleButtonPressed", +["not_found"] = "help_bubble.mojom.HelpBubbleHandler.HelpBubbleClosed", +["not_found"] = "browser_command.mojom.CommandHandler.CanExecuteCommand", +["not_found"] = "browser_command.mojom.CommandHandler.ExecuteCommand", +["not_found"] = "metrics_reporter.mojom.PageMetrics.OnGetMark", +["not_found"] = "metrics_reporter.mojom.PageMetrics.OnClearMark", +["not_found"] = "metrics_reporter.mojom.PageMetricsHost.OnPageRemoteCreated", +["not_found"] = "metrics_reporter.mojom.PageMetricsHost.OnGetMark", +["not_found"] = "metrics_reporter.mojom.PageMetricsHost.OnClearMark", +["not_found"] = "metrics_reporter.mojom.PageMetricsHost.OnUmaReportTime", +["not_found"] = "customize_color_scheme_mode.mojom.CustomizeColorSchemeModeClient.SetColorSchemeMode", +["not_found"] = "history_clusters.mojom.Page.OnClustersQueryResult", +["not_found"] = "history_clusters.mojom.Page.OnClusterImageUpdated", +["not_found"] = "history_clusters.mojom.Page.OnVisitsHidden", +["not_found"] = "history_clusters.mojom.Page.OnVisitsRemoved", +["not_found"] = "history_clusters.mojom.Page.OnHistoryDeleted", +["not_found"] = "history_clusters.mojom.Page.OnQueryChangedByUser", +["not_found"] = "theme_color_picker.mojom.ThemeColorPickerClient.SetTheme", +["not_found"] = "history_embeddings.mojom.PageHandler.SetPage", +["not_found"] = "history_embeddings.mojom.PageHandler.Search", +["not_found"] = "history_embeddings.mojom.PageHandler.SendQualityLog", +["not_found"] = "history_embeddings.mojom.PageHandler.RecordSearchResultsMetrics", +["not_found"] = "history_embeddings.mojom.PageHandler.SetUserFeedback", +["not_found"] = "history_embeddings.mojom.PageHandler.MaybeShowFeaturePromo", +["not_found"] = "history_embeddings.mojom.PageHandler.OpenSettingsPage", +["not_found"] = "certificate_manager.mojom.CertificateManagerPage.AskForImportPassword", +["not_found"] = "certificate_manager.mojom.CertificateManagerPage.AskForConfirmation", +["not_found"] = "certificate_manager.mojom.CertificateManagerPage.TriggerReload", +["not_found"] = "certificate_manager.mojom.CertificateManagerPage.TriggerMetadataUpdate", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandler.GetCertificates", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandler.GetCertManagementMetadata", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandler.ViewCertificate", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandler.ExportCertificates", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandler.ImportCertificate", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandler.ImportAndBindCertificate", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandler.DeleteCertificate", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandler.SetIncludeSystemTrustStore", +["not_found"] = "certificate_manager.mojom.CertificateManagerPageHandlerFactory.CreateCertificateManagerPageHandler", +["not_found"] = "visitedlink.mojom.VisitedLinkNotificationSink.UpdateVisitedLinks", +["not_found"] = "visitedlink.mojom.VisitedLinkNotificationSink.AddVisitedLinks", +["not_found"] = "visitedlink.mojom.VisitedLinkNotificationSink.ResetVisitedLinks", +["not_found"] = "visitedlink.mojom.VisitedLinkNotificationSink.UpdateOriginSalts", +["not_found"] = "printing.mojom.PrintRenderFrame.PrintRequestedPages", +["not_found"] = "printing.mojom.PrintRenderFrame.PrintWithParams", +["not_found"] = "printing.mojom.PrintRenderFrame.SetPrintPreviewUI", +["not_found"] = "printing.mojom.PrintRenderFrame.PrintPreview", +["not_found"] = "printing.mojom.PrintRenderFrame.OnPrintPreviewDialogClosed", +["not_found"] = "printing.mojom.PrintRenderFrame.PrintFrameContent", +["not_found"] = "printing.mojom.PrintRenderFrame.ConnectToPdfRenderer", +["not_found"] = "printing.mojom.PrintRenderFrame.PrintingDone", +["not_found"] = "printing.mojom.PrintRenderFrame.PrintNodeUnderContextMenu", +["not_found"] = "heap_profiling.mojom.SnapshotController.TakeSnapshot", +["not_found"] = "heap_profiling.mojom.SnapshotController.LogMetricsWithoutSnapshot", +["not_found"] = "autofill.mojom.AutofillAgent.TriggerFormExtraction", +["not_found"] = "autofill.mojom.AutofillAgent.TriggerFormExtractionWithResponse", +["not_found"] = "autofill.mojom.AutofillAgent.ApplyFieldsAction", +["not_found"] = "autofill.mojom.AutofillAgent.ApplyFieldAction", +["not_found"] = "autofill.mojom.AutofillAgent.ExtractForm", +["not_found"] = "autofill.mojom.AutofillAgent.ExtractLabeledTextNodeValue", +["not_found"] = "autofill.mojom.AutofillAgent.FieldTypePredictionsAvailable", +["not_found"] = "autofill.mojom.AutofillAgent.ExposeDomNodeIds", +["not_found"] = "autofill.mojom.AutofillAgent.ClearPreviewedForm", +["not_found"] = "autofill.mojom.AutofillAgent.TriggerSuggestions", +["not_found"] = "autofill.mojom.AutofillAgent.SetSuggestionAvailability", +["not_found"] = "autofill.mojom.AutofillAgent.AcceptDataListSuggestion", +["not_found"] = "autofill.mojom.AutofillAgent.PreviewPasswordSuggestion", +["not_found"] = "autofill.mojom.AutofillAgent.PreviewPasswordGenerationSuggestion", +["not_found"] = "autofill.mojom.AutofillAgent.GetPotentialLastFourCombinationsForStandaloneCvc", +["not_found"] = "autofill.mojom.AutofillAgent.DispatchEmailVerifiedEvent", +["not_found"] = "page_image_service.mojom.PageImageServiceHandler.GetPageImageUrl", +["not_found"] = "fingerprinting_protection_filter.mojom.FingerprintingProtectionRulesetObserver.SetRulesetForProcess", +["not_found"] = "fingerprinting_protection_filter.mojom.FingerprintingProtectionAgent.ActivateForNextCommittedLoad", +["not_found"] = "fingerprinting_protection_filter.mojom.FingerprintingProtectionHost.DidDisallowFirstSubresource", +["not_found"] = "fingerprinting_protection_filter.mojom.FingerprintingProtectionHost.SetDocumentLoadStatistics", +["not_found"] = "site_engagement.mojom.SiteEngagementDetailsProvider.GetSiteEngagementDetails", +["not_found"] = "site_engagement.mojom.SiteEngagementDetailsProvider.SetSiteEngagementBaseScoreForUrl", +["not_found"] = "safe_browsing.mojom.PhishingDetector.StartPhishingDetection", +["not_found"] = "safe_browsing.mojom.PhishingModelSetter.SetImageEmbeddingAndPhishingFlatBufferModel", +["not_found"] = "safe_browsing.mojom.PhishingModelSetter.AttachImageEmbeddingModel", +["not_found"] = "safe_browsing.mojom.PhishingModelSetter.SetPhishingFlatBufferModel", +["not_found"] = "safe_browsing.mojom.PhishingModelSetter.ClearScorer", +["not_found"] = "safe_browsing.mojom.PhishingModelSetter.SetTestObserver", +["not_found"] = "safe_browsing.mojom.PhishingModelSetterTestObserver.PhishingModelUpdated", +["not_found"] = "commerce.price_insights.mojom.PriceInsightsHandler.ShowSidePanelUI", +["not_found"] = "commerce.price_insights.mojom.PriceInsightsHandler.ShowFeedback", +["not_found"] = "commerce.price_insights.mojom.PriceInsightsHandlerFactory.CreatePriceInsightsHandler", +["not_found"] = "commerce.price_tracking.mojom.Page.PriceTrackedForBookmark", +["not_found"] = "commerce.price_tracking.mojom.Page.PriceUntrackedForBookmark", +["not_found"] = "commerce.price_tracking.mojom.Page.OperationFailedForBookmark", +["not_found"] = "commerce.price_tracking.mojom.Page.OnProductBookmarkMoved", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandlerFactory.CreateProductSpecificationsHandler", +["not_found"] = "commerce.product_specifications.mojom.Page.OnProductSpecificationsSetAdded", +["not_found"] = "commerce.product_specifications.mojom.Page.OnProductSpecificationsSetUpdated", +["not_found"] = "commerce.product_specifications.mojom.Page.OnProductSpecificationsSetRemoved", +["not_found"] = "commerce.product_specifications.mojom.Page.OnSyncStateChanged", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.SetAcceptedDisclosureVersion", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.MaybeShowDisclosure", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.DeclineDisclosure", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.ShowSyncSetupFlow", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.GetPageTitleFromHistory", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.ShowProductSpecificationsSetForUuid", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.ShowProductSpecificationsSetsForUuids", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.ShowComparePage", +["not_found"] = "commerce.product_specifications.mojom.ProductSpecificationsHandler.GetComparisonTableUrlForUuid", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetProductInfoForCurrentUrl", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetProductInfoForUrl", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetProductInfoForUrls", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetPriceInsightsInfoForCurrentUrl", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetPriceInsightsInfoForUrl", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetProductSpecificationsForUrls", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetUrlInfosForProductTabs", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetUrlInfosForRecentlyViewedTabs", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.IsShoppingListEligible", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetPriceTrackingStatusForCurrentUrl", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.OpenUrlInNewTab", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.SwitchToOrOpenTab", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetAllProductSpecificationsSets", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetProductSpecificationsSetByUuid", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.AddProductSpecificationsSet", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.DeleteProductSpecificationsSet", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.SetNameForProductSpecificationsSet", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.SetUrlsForProductSpecificationsSet", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.SetProductSpecificationsUserFeedback", +["not_found"] = "shopping_service.mojom.ShoppingServiceHandler.GetProductSpecificationsFeatureState", +["not_found"] = "webapps.mojom.WebAppOriginAssociationParser.ParseWebAppOriginAssociation", +["not_found"] = "subresource_filter.mojom.SubresourceFilterHost.DidDisallowFirstSubresource", +["not_found"] = "subresource_filter.mojom.SubresourceFilterHost.FrameIsAd", +["not_found"] = "subresource_filter.mojom.SubresourceFilterHost.FrameWasCreatedByAdScript", +["not_found"] = "subresource_filter.mojom.SubresourceFilterHost.AdScriptDidCreateFencedFrame", +["not_found"] = "subresource_filter.mojom.SubresourceFilterHost.SetDocumentLoadStatistics", +["not_found"] = "subresource_filter.mojom.SubresourceFilterHost.OnAdsViolationTriggered", +["not_found"] = "subresource_filter.mojom.SubresourceFilterAgent.ActivateForNextCommittedLoad", +["not_found"] = "glic.mojom.PinCandidatesObserver.OnPinCandidatesChanged", +["not_found"] = "glic.mojom.CaptureRegionObserver.OnUpdate", +["not_found"] = "glic.mojom.WebClient.NotifyPanelWillOpen", +["not_found"] = "glic.mojom.WebClient.NotifyPanelWasClosed", +["not_found"] = "glic.mojom.WebClient.NotifyPanelStateChange", +["not_found"] = "glic.mojom.WebClient.NotifyPanelActiveChange", +["not_found"] = "glic.mojom.WebClient.NotifyPanelCanAttachChange", +["not_found"] = "glic.mojom.WebClient.NotifyMicrophonePermissionStateChanged", +["not_found"] = "glic.mojom.WebClient.NotifyLocationPermissionStateChanged", +["not_found"] = "glic.mojom.WebClient.NotifyTabContextPermissionStateChanged", +["not_found"] = "glic.mojom.WebClient.NotifyOsLocationPermissionStateChanged", +["not_found"] = "glic.mojom.WebClient.NotifyFocusedTabChanged", +["not_found"] = "glic.mojom.WebClient.NotifyManualResizeChanged", +["not_found"] = "glic.mojom.WebClient.NotifyOsHotkeyStateChanged", +["not_found"] = "glic.mojom.WebClient.NotifyBrowserIsOpenChanged", +["not_found"] = "glic.mojom.WebClient.NotifyInstanceActivationChanged", +["not_found"] = "glic.mojom.WebClient.NotifyClosedCaptioningSettingChanged", +["not_found"] = "glic.mojom.WebClient.NotifyPinnedTabsChanged", +["not_found"] = "glic.mojom.WebClient.NotifyPinnedTabDataChanged", +["not_found"] = "glic.mojom.WebClient.NotifyZeroStateSuggestionsChanged", +["not_found"] = "glic.mojom.WebClient.NotifyActorTaskStateChanged", +["not_found"] = "glic.mojom.WebClient.NotifyTabDataChanged", +["not_found"] = "glic.mojom.WebClient.RequestViewChange", +["not_found"] = "glic.mojom.WebClient.NotifyPageMetadataChanged", +["not_found"] = "glic.mojom.WebClient.NotifyDefaultTabContextPermissionStateChanged", +["not_found"] = "glic.mojom.WebClient.RequestToShowCredentialSelectionDialog", +["not_found"] = "glic.mojom.WebClient.RequestToShowAutofillSuggestionsDialog", +["not_found"] = "glic.mojom.WebClient.RequestToShowUserConfirmationDialog", +["not_found"] = "glic.mojom.WebClient.RequestToConfirmNavigation", +["not_found"] = "glic.mojom.WebClient.NotifyAdditionalContext", +["not_found"] = "glic.mojom.WebClient.NotifyActuationOnWebSettingChanged", +["not_found"] = "glic.mojom.WebClient.NotifyActOnWebCapabilityChanged", +["not_found"] = "glic.mojom.PageHandler.CreateWebClient", +["not_found"] = "glic.mojom.PageHandler.PrepareForClient", +["not_found"] = "glic.mojom.PageHandler.WebviewCommitted", +["not_found"] = "glic.mojom.PageHandler.ClosePanel", +["not_found"] = "glic.mojom.PageHandler.OpenProfilePickerAndClosePanel", +["not_found"] = "glic.mojom.PageHandler.OpenDisabledByAdminLinkAndClosePanel", +["not_found"] = "glic.mojom.PageHandler.SignInAndClosePanel", +["not_found"] = "glic.mojom.PageHandler.ResizeWidget", +["not_found"] = "glic.mojom.PageHandler.EnableDragResize", +["not_found"] = "glic.mojom.PageHandler.WebUiStateChanged", +["not_found"] = "glic.mojom.Page.IntentToShow", +["not_found"] = "glic.mojom.Page.SetProfileReadyState", +["not_found"] = "glic.mojom.Page.UpdatePageState", +["not_found"] = "glic.mojom.WebClientHandler.WebClientCreated", +["not_found"] = "glic.mojom.WebClientHandler.WebClientInitialized", +["not_found"] = "glic.mojom.WebClientHandler.WebClientInitializeFailed", +["not_found"] = "glic.mojom.WebClientHandler.CreateTab", +["not_found"] = "glic.mojom.WebClientHandler.OpenLinkInPopup", +["not_found"] = "glic.mojom.WebClientHandler.OpenGlicSettingsPage", +["not_found"] = "glic.mojom.WebClientHandler.OpenPasswordManagerSettingsPage", +["not_found"] = "glic.mojom.WebClientHandler.ClosePanel", +["not_found"] = "glic.mojom.WebClientHandler.ClosePanelAndShutdown", +["not_found"] = "glic.mojom.WebClientHandler.AttachPanel", +["not_found"] = "glic.mojom.WebClientHandler.DetachPanel", +["not_found"] = "glic.mojom.WebClientHandler.OnModeChange", +["not_found"] = "glic.mojom.WebClientHandler.ShowProfilePicker", +["not_found"] = "glic.mojom.WebClientHandler.GetModelQualityClientId", +["not_found"] = "glic.mojom.WebClientHandler.GetContextFromFocusedTab", +["not_found"] = "glic.mojom.WebClientHandler.GetContextFromTab", +["not_found"] = "glic.mojom.WebClientHandler.GetContextForActorFromTab", +["not_found"] = "glic.mojom.WebClientHandler.SetMaximumNumberOfPinnedTabs", +["not_found"] = "glic.mojom.WebClientHandler.PinTabs", +["not_found"] = "glic.mojom.WebClientHandler.UnpinTabs", +["not_found"] = "glic.mojom.WebClientHandler.UnpinAllTabs", +["not_found"] = "glic.mojom.WebClientHandler.SubscribeToPinCandidates", +["not_found"] = "glic.mojom.WebClientHandler.CreateTask", +["not_found"] = "glic.mojom.WebClientHandler.PauseActorTask", +["not_found"] = "glic.mojom.WebClientHandler.ResumeActorTask", +["not_found"] = "glic.mojom.WebClientHandler.InterruptActorTask", +["not_found"] = "glic.mojom.WebClientHandler.UninterruptActorTask", +["not_found"] = "glic.mojom.WebClientHandler.CreateActorTab", +["not_found"] = "glic.mojom.WebClientHandler.ActivateTab", +["not_found"] = "glic.mojom.WebClientHandler.ResizeWidget", +["not_found"] = "glic.mojom.WebClientHandler.CaptureScreenshot", +["not_found"] = "glic.mojom.WebClientHandler.CaptureRegion", +["not_found"] = "glic.mojom.WebClientHandler.SetAudioDucking", +["not_found"] = "glic.mojom.WebClientHandler.SetPanelDraggableAreas", +["not_found"] = "glic.mojom.WebClientHandler.SetMinimumPanelSize", +["not_found"] = "glic.mojom.WebClientHandler.SetMicrophonePermissionState", +["not_found"] = "glic.mojom.WebClientHandler.SetLocationPermissionState", +["not_found"] = "glic.mojom.WebClientHandler.SetTabContextPermissionState", +["not_found"] = "glic.mojom.WebClientHandler.SetClosedCaptioningSetting", +["not_found"] = "glic.mojom.WebClientHandler.SetActuationOnWebSetting", +["not_found"] = "glic.mojom.WebClientHandler.ShouldAllowMediaPermissionRequest", +["not_found"] = "glic.mojom.WebClientHandler.ShouldAllowGeolocationPermissionRequest", +["not_found"] = "glic.mojom.WebClientHandler.SetContextAccessIndicator", +["not_found"] = "glic.mojom.WebClientHandler.GetUserProfileInfo", +["not_found"] = "glic.mojom.WebClientHandler.SyncCookies", +["not_found"] = "glic.mojom.WebClientHandler.LogBeginAsyncEvent", +["not_found"] = "glic.mojom.WebClientHandler.LogEndAsyncEvent", +["not_found"] = "glic.mojom.WebClientHandler.LogInstantEvent", +["not_found"] = "glic.mojom.WebClientHandler.JournalClear", +["not_found"] = "glic.mojom.WebClientHandler.JournalSnapshot", +["not_found"] = "glic.mojom.WebClientHandler.JournalStart", +["not_found"] = "glic.mojom.WebClientHandler.JournalStop", +["not_found"] = "glic.mojom.WebClientHandler.JournalRecordFeedback", +["not_found"] = "glic.mojom.WebClientHandler.OnUserInputSubmitted", +["not_found"] = "glic.mojom.WebClientHandler.OnContextUploadStarted", +["not_found"] = "glic.mojom.WebClientHandler.OnContextUploadCompleted", +["not_found"] = "glic.mojom.WebClientHandler.OnReaction", +["not_found"] = "glic.mojom.WebClientHandler.OnResponseStarted", +["not_found"] = "glic.mojom.WebClientHandler.OnResponseStopped", +["not_found"] = "glic.mojom.WebClientHandler.OnSessionTerminated", +["not_found"] = "glic.mojom.WebClientHandler.OnTurnCompleted", +["not_found"] = "glic.mojom.WebClientHandler.OnModelChanged", +["not_found"] = "glic.mojom.WebClientHandler.OnRecordUseCounter", +["not_found"] = "glic.mojom.WebClientHandler.OnResponseRated", +["not_found"] = "glic.mojom.WebClientHandler.OnClosedCaptionsShown", +["not_found"] = "glic.mojom.WebClientHandler.ScrollTo", +["not_found"] = "glic.mojom.WebClientHandler.DropScrollToHighlight", +["not_found"] = "glic.mojom.WebClientHandler.SetSyntheticExperimentState", +["not_found"] = "glic.mojom.WebClientHandler.OpenOsPermissionSettingsMenu", +["not_found"] = "glic.mojom.WebClientHandler.GetOsMicrophonePermissionStatus", +["not_found"] = "glic.mojom.WebClientHandler.GetZeroStateSuggestionsAndSubscribe", +["not_found"] = "glic.mojom.WebClientHandler.GetZeroStateSuggestionsForFocusedTab", +["not_found"] = "glic.mojom.WebClientHandler.MaybeRefreshUserStatus", +["not_found"] = "glic.mojom.WebClientHandler.IsDebuggerAttached", +["not_found"] = "glic.mojom.WebClientHandler.OnViewChanged", +["not_found"] = "glic.mojom.WebClientHandler.SubscribeToPageMetadata", +["not_found"] = "glic.mojom.WebClientHandler.SwitchConversation", +["not_found"] = "glic.mojom.WebClientHandler.RegisterConversation", +["not_found"] = "glic.mojom.PageHandlerFactory.CreatePageHandler", +["not_found"] = "password_manager.mojom.CSVPasswordParser.ParseCSV", +["not_found"] = "media_router.mojom.Logger.LogInfo", +["not_found"] = "media_router.mojom.Logger.LogWarning", +["not_found"] = "media_router.mojom.Logger.LogError", +["not_found"] = "media_router.mojom.Logger.BindReceiver", +["not_found"] = "media_router.mojom.MediaRouteProvider.CreateRoute", +["not_found"] = "media_router.mojom.MediaRouteProvider.JoinRoute", +["not_found"] = "media_router.mojom.MediaRouteProvider.TerminateRoute", +["not_found"] = "media_router.mojom.MediaRouteProvider.SendRouteMessage", +["not_found"] = "media_router.mojom.MediaRouteProvider.SendRouteBinaryMessage", +["not_found"] = "media_router.mojom.MediaRouteProvider.StartObservingMediaSinks", +["not_found"] = "media_router.mojom.MediaRouteProvider.StopObservingMediaSinks", +["not_found"] = "media_router.mojom.MediaRouteProvider.StartObservingMediaRoutes", +["not_found"] = "media_router.mojom.MediaRouteProvider.DetachRoute", +["not_found"] = "media_router.mojom.MediaRouteProvider.DiscoverSinksNow", +["not_found"] = "media_router.mojom.MediaRouteProvider.BindMediaController", +["not_found"] = "media_router.mojom.MediaRouteProvider.GetState", +["not_found"] = "media_router.mojom.MediaRouter.RegisterMediaRouteProvider", +["not_found"] = "media_router.mojom.MediaRouter.OnSinksReceived", +["not_found"] = "media_router.mojom.MediaRouter.OnIssue", +["not_found"] = "media_router.mojom.MediaRouter.ClearTopIssueForSink", +["not_found"] = "media_router.mojom.MediaRouter.OnRoutesUpdated", +["not_found"] = "media_router.mojom.MediaRouter.OnPresentationConnectionStateChanged", +["not_found"] = "media_router.mojom.MediaRouter.OnPresentationConnectionClosed", +["not_found"] = "media_router.mojom.MediaRouter.OnRouteMessagesReceived", +["not_found"] = "media_router.mojom.MediaRouter.GetMediaSinkServiceStatus", +["not_found"] = "media_router.mojom.MediaRouter.GetLogger", +["not_found"] = "media_router.mojom.MediaRouter.GetDebugger", +["not_found"] = "media_router.mojom.MediaRouter.GetLogsAsString", +["not_found"] = "history.mojom.PageHandler.SetPage", +["not_found"] = "history.mojom.PageHandler.QueryHistory", +["not_found"] = "history.mojom.PageHandler.QueryHistoryContinuation", +["not_found"] = "history.mojom.PageHandler.RemoveVisits", +["not_found"] = "history.mojom.PageHandler.OpenClearBrowsingDataDialog", +["not_found"] = "history.mojom.PageHandler.RemoveBookmark", +["not_found"] = "history.mojom.PageHandler.SetLastSelectedTab", +["not_found"] = "history.mojom.PageHandler.ShowSidePanelUI", +["not_found"] = "history.mojom.PageHandler.RequestAccountInfo", +["not_found"] = "history.mojom.PageHandler.TurnOnHistorySync", +["not_found"] = "history.mojom.Page.OnHistoryDeleted", +["not_found"] = "history.mojom.Page.OnHasOtherFormsChanged", +["not_found"] = "history.mojom.Page.SendAccountInfo", +["not_found"] = "actor.ui.mojom.ActorOverlayPageHandler.OnHoverStatusChanged", +["not_found"] = "actor.ui.mojom.ActorOverlayPageHandler.GetCurrentBorderGlowVisibility", +["not_found"] = "actor.ui.mojom.ActorOverlayPage.SetScrimBackground", +["not_found"] = "actor.ui.mojom.ActorOverlayPage.SetBorderGlowVisibility", +["not_found"] = "actor.ui.mojom.ActorOverlayPageHandlerFactory.CreatePageHandler", +["not_found"] = "bluetooth.mojom.Adapter.ConnectToDevice", +["not_found"] = "bluetooth.mojom.Adapter.GetDevices", +["not_found"] = "bluetooth.mojom.Adapter.GetInfo", +["not_found"] = "bluetooth.mojom.Adapter.AddObserver", +["not_found"] = "bluetooth.mojom.Adapter.RegisterAdvertisement", +["not_found"] = "bluetooth.mojom.Adapter.SetDiscoverable", +["not_found"] = "bluetooth.mojom.Adapter.SetName", +["not_found"] = "bluetooth.mojom.Adapter.StartDiscoverySession", +["not_found"] = "bluetooth.mojom.Adapter.ConnectToServiceInsecurely", +["not_found"] = "bluetooth.mojom.Adapter.CreateRfcommServiceInsecurely", +["not_found"] = "bluetooth.mojom.Adapter.CreateLocalGattService", +["not_found"] = "bluetooth.mojom.Adapter.IsLeScatternetDualRoleSupported", +["not_found"] = "bluetooth.mojom.DiscoverySession.IsActive", +["not_found"] = "bluetooth.mojom.DiscoverySession.Stop", +["not_found"] = "bluetooth.mojom.Socket.Disconnect", +["not_found"] = "bluetooth.mojom.ServerSocket.Accept", +["not_found"] = "bluetooth.mojom.ServerSocket.Disconnect", +["not_found"] = "bluetooth.mojom.AdapterObserver.PresentChanged", +["not_found"] = "bluetooth.mojom.AdapterObserver.PoweredChanged", +["not_found"] = "bluetooth.mojom.AdapterObserver.DiscoverableChanged", +["not_found"] = "bluetooth.mojom.AdapterObserver.DiscoveringChanged", +["not_found"] = "bluetooth.mojom.AdapterObserver.DeviceAdded", +["not_found"] = "bluetooth.mojom.AdapterObserver.DeviceChanged", +["not_found"] = "bluetooth.mojom.AdapterObserver.DeviceRemoved", +["not_found"] = "bluetooth.mojom.Device.Disconnect", +["not_found"] = "bluetooth.mojom.Device.GetInfo", +["not_found"] = "bluetooth.mojom.Device.GetServices", +["not_found"] = "bluetooth.mojom.Device.GetCharacteristics", +["not_found"] = "bluetooth.mojom.Device.ReadValueForCharacteristic", +["not_found"] = "bluetooth.mojom.Device.WriteValueForCharacteristic", +["not_found"] = "bluetooth.mojom.Device.GetDescriptors", +["not_found"] = "bluetooth.mojom.Device.ReadValueForDescriptor", +["not_found"] = "bluetooth.mojom.Device.WriteValueForDescriptor", +["not_found"] = "bluetooth.mojom.GattServiceObserver.OnLocalCharacteristicRead", +["not_found"] = "browsing_topics.mojom.PageHandler.GetBrowsingTopicsConfiguration", +["not_found"] = "browsing_topics.mojom.PageHandler.GetBrowsingTopicsState", +["not_found"] = "browsing_topics.mojom.PageHandler.GetModelInfo", +["not_found"] = "browsing_topics.mojom.PageHandler.ClassifyHosts", +["not_found"] = "commerce.mojom.CommerceInternalsHandler.GetIsShoppingListEligible", +["not_found"] = "commerce.mojom.CommerceInternalsHandler.ResetPriceTrackingEmailPref", +["not_found"] = "commerce.mojom.CommerceInternalsHandler.GetProductInfoForUrl", +["not_found"] = "commerce.mojom.CommerceInternalsHandler.GetSubscriptionDetails", +["not_found"] = "commerce.mojom.CommerceInternalsHandler.GetProductSpecificationsDetails", +["not_found"] = "commerce.mojom.CommerceInternalsHandler.ResetProductSpecifications", +["not_found"] = "commerce.mojom.CommerceInternalsHandler.GetShoppingEligibilityDetails", +["not_found"] = "commerce.mojom.CommerceInternalsPage.OnShoppingListEligibilityChanged", +["not_found"] = "history_clusters_internals.mojom.Page.OnLogMessageAdded", +["not_found"] = "history_clusters_internals.mojom.PageHandler.GetContextClustersJson", +["not_found"] = "history_clusters_internals.mojom.PageHandler.PrintKeywordBagStateToLogMessages", +["not_found"] = "history_clusters_internals.mojom.PageHandlerFactory.CreatePageHandler", +["not_found"] = "contextual_tasks.mojom.PageHandler.GetThreadUrl", +["not_found"] = "contextual_tasks.mojom.PageHandler.GetUrlForTask", +["not_found"] = "contextual_tasks.mojom.PageHandler.SetTaskId", +["not_found"] = "contextual_tasks.mojom.PageHandler.SetThreadTitle", +["not_found"] = "contextual_tasks.mojom.PageHandler.ShowUi", +["not_found"] = "contextual_tasks.mojom.PageHandlerFactory.CreatePageHandler", +["not_found"] = "screen_ai.mojom.ScreenAIServiceShutdownHandler.ShuttingDownOnIdle", +["not_found"] = "screen_ai.mojom.ScreenAIServiceFactory.InitializeOCR", +["not_found"] = "screen_ai.mojom.ScreenAIServiceFactory.InitializeMainContentExtraction", +["not_found"] = "screen_ai.mojom.ScreenAIServiceFactory.BindShutdownHandler", +["unscrambled_0"] = "global_media_controls.mojom.DeviceListClient.OnDevicesUpdated@0", +["unscrambled_1"] = "global_media_controls.mojom.DeviceListClient.OnPermissionRejected@1", +["unscrambled_0"] = "global_media_controls.mojom.DeviceListHost.SelectDevice@0", +["unscrambled_0"] = "global_media_controls.mojom.DevicePickerObserver.OnMediaUIOpened@0", +["unscrambled_1"] = "global_media_controls.mojom.DevicePickerObserver.OnMediaUIClosed@1", +["unscrambled_2"] = "global_media_controls.mojom.DevicePickerObserver.OnMediaUIUpdated@2", +["unscrambled_3"] = "global_media_controls.mojom.DevicePickerObserver.OnPickerDismissed@3", +["unscrambled_0"] = "global_media_controls.mojom.DevicePickerProvider.CreateItem@0", +["unscrambled_1"] = "global_media_controls.mojom.DevicePickerProvider.DeleteItem@1", +["unscrambled_2"] = "global_media_controls.mojom.DevicePickerProvider.ShowItem@2", +["unscrambled_3"] = "global_media_controls.mojom.DevicePickerProvider.HideItem@3", +["unscrambled_4"] = "global_media_controls.mojom.DevicePickerProvider.OnMetadataChanged@4", +["unscrambled_5"] = "global_media_controls.mojom.DevicePickerProvider.OnArtworkImageChanged@5", +["unscrambled_6"] = "global_media_controls.mojom.DevicePickerProvider.OnFaviconImageChanged@6", +["unscrambled_7"] = "global_media_controls.mojom.DevicePickerProvider.AddObserver@7", +["unscrambled_8"] = "global_media_controls.mojom.DevicePickerProvider.HideMediaUI@8", +["not_found"] = "wallet.mojom.ImageExtractor.ExtractImages", +["not_found"] = "app_management.mojom.PageHandler.GetApps", +["not_found"] = "app_management.mojom.PageHandler.GetApp", +["not_found"] = "app_management.mojom.PageHandler.GetSubAppToParentMap", +["not_found"] = "app_management.mojom.PageHandler.GetExtensionAppPermissionMessages", +["not_found"] = "app_management.mojom.PageHandler.SetPinned", +["not_found"] = "app_management.mojom.PageHandler.SetPermission", +["not_found"] = "app_management.mojom.PageHandler.SetResizeLocked", +["not_found"] = "app_management.mojom.PageHandler.Uninstall", +["not_found"] = "app_management.mojom.PageHandler.OpenNativeSettings", +["not_found"] = "app_management.mojom.PageHandler.SetPreferredApp", +["not_found"] = "app_management.mojom.PageHandler.GetOverlappingPreferredApps", +["not_found"] = "app_management.mojom.PageHandler.UpdateAppSize", +["not_found"] = "app_management.mojom.PageHandler.SetWindowMode", +["not_found"] = "app_management.mojom.PageHandler.SetRunOnOsLoginMode", +["not_found"] = "app_management.mojom.PageHandler.SetFileHandlingEnabled", +["not_found"] = "app_management.mojom.PageHandler.ShowDefaultAppAssociationsUi", +["not_found"] = "app_management.mojom.PageHandler.OpenStorePage", +["not_found"] = "app_management.mojom.PageHandler.SetAppLocale", +["not_found"] = "app_management.mojom.Page.OnAppAdded", +["not_found"] = "app_management.mojom.Page.OnAppChanged", +["not_found"] = "app_management.mojom.Page.OnAppRemoved", +["not_found"] = "app_management.mojom.PageHandlerFactory.CreatePageHandler", +["not_found"] = "IPC.mojom.Channel.SetPeerPid", +["not_found"] = "IPC.mojom.Channel.GetAssociatedInterface", +["not_found"] = "storage.mojom.FileLock.Release", +["not_found"] = "service_manager.mojom.InterfaceProvider.GetInterface", +["not_found"] = "webnn.mojom.WebNNTensor.ReadTensor", +["not_found"] = "webnn.mojom.WebNNTensor.WriteTensor", +["not_found"] = "webnn.mojom.WebNNTensor.ExportTensor", +["not_found"] = "device.mojom.ImmersiveOverlay.RequestNextOverlayPose", +["not_found"] = "device.mojom.ImmersiveOverlay.SubmitOverlayTexture", +["not_found"] = "device.mojom.ImmersiveOverlay.SetOverlayAndWebXRVisibility", +["not_found"] = "device.mojom.ImmersiveOverlay.RequestNotificationOnWebXrSubmitted", +["not_found"] = "device.mojom.XRPresentationProvider.UpdateLayerBounds", +["not_found"] = "device.mojom.XRPresentationProvider.SubmitFrameMissing", +["not_found"] = "device.mojom.XRPresentationProvider.SubmitFrame", +["not_found"] = "device.mojom.XRPresentationProvider.SubmitFrameWithTextureHandle", +["not_found"] = "device.mojom.XRPresentationProvider.SubmitFrameDrawnIntoTexture", +["not_found"] = "device.mojom.XRPresentationClient.OnSubmitFrameTransferred", +["not_found"] = "device.mojom.XRPresentationClient.OnSubmitFrameRendered", +["not_found"] = "device.mojom.XRPresentationClient.OnSubmitFrameGpuFence", +["not_found"] = "device.mojom.XRFrameDataProvider.GetFrameData", +["not_found"] = "device.mojom.XRFrameDataProvider.GetEnvironmentIntegrationProvider", +["not_found"] = "device.mojom.XRLayerManager.CreateCompositionLayer", +["not_found"] = "device.mojom.XRLayerManager.DestroyCompositionLayer", +["not_found"] = "device.mojom.XRLayerManager.UpdateCompositionLayer", +["not_found"] = "device.mojom.XRLayerManager.SetEnabledCompositionLayers", +["not_found"] = "device.mojom.XREnvironmentIntegrationProvider.SubscribeToHitTest", +["not_found"] = "device.mojom.XREnvironmentIntegrationProvider.SubscribeToHitTestForTransientInput", +["not_found"] = "device.mojom.XREnvironmentIntegrationProvider.UnsubscribeFromHitTest", +["not_found"] = "device.mojom.XREnvironmentIntegrationProvider.CreateAnchor", +["not_found"] = "device.mojom.XREnvironmentIntegrationProvider.DetachAnchor", +["not_found"] = "device.mojom.GamepadObserver.GamepadConnected", +["not_found"] = "device.mojom.GamepadObserver.GamepadDisconnected", +["not_found"] = "performance_manager.mojom.ProcessCoordinationUnit.SetMainThreadTaskLoadIsLow", +["not_found"] = "performance_manager.mojom.ProcessCoordinationUnit.OnV8ContextCreated", +["not_found"] = "performance_manager.mojom.ProcessCoordinationUnit.OnV8ContextDetached", +["not_found"] = "performance_manager.mojom.ProcessCoordinationUnit.OnV8ContextDestroyed", +["not_found"] = "performance_manager.mojom.ProcessCoordinationUnit.OnRemoteIframeAttached", +["not_found"] = "performance_manager.mojom.ProcessCoordinationUnit.OnRemoteIframeDetached", +["not_found"] = "performance_manager.mojom.ChildProcessCoordinationUnit.InitializeChildProcessCoordination", +["not_found"] = "webnn.mojom.WebNNGraph.Dispatch", +["not_found"] = "webnn.mojom.WebNNGraphBuilder.CreatePendingConstant", +["not_found"] = "webnn.mojom.WebNNGraphBuilder.CreateGraph", +["nffffffff"] = "mojo.interface_control.Run", +["nfffffffe"] = "mojo.interface_control.RunOrClosePipe", +}; +return interfacesMap; diff --git a/dissectors/chromium-ipc/ipcz.lua b/dissectors/chromium-ipc/ipcz.lua new file mode 100644 index 0000000..48d1ddd --- /dev/null +++ b/dissectors/chromium-ipc/ipcz.lua @@ -0,0 +1,1231 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/ipcz.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +ipcz_protocol = Proto("IPCZ", "IPCZ Protocol") + +local get_chrome_name = require("helpers\\common").get_chrome_type_name + +-- +-- ipcz explained +-- https://docs.google.com/document/d/1i49DF2af4JDspE1fTXuPrUvChQcqDChdHH6nx4xiyoY/edit?resourcekey=0-t_viq9NAbGb5kr_ni9scTA# +-- + +-- IpczHeader fields +-- https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/libchrome/mojo/core/channel.h;l=135?q=IpczHeader +local header_size = ProtoField.int16 ("ipcz.headersize" , "Header Size" , base.DEC) +local num_handles = ProtoField.int32 ("ipcz.numhandles" , "Handles Count" , base.DEC) +local total_size = ProtoField.int32 ("ipcz.totalsize" , "Total Message Size" , base.DEC) +local creation_timeticks = ProtoField.uint64("ipcz.creationtimticks", "Header Creation Timeticks", base.DEC) + +-- IPCZ MessageHeader +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/message.h;l=32?q=MessageHeaderV0&ss=chromium%2Fchromium%2Fsrc +local message_header_size = ProtoField.uint8 ("ipcz.msgheadersize" , "Header Size" , base.DEC) +local version = ProtoField.uint8 ("ipcz.version" , "Header Version" , base.DEC) +local message_id = ProtoField.uint8 ("ipcz.messageid" , "Message ID" , base.DEC) +local reserved = ProtoField.new ("Reserved" , "ipcz.reserved" , ftypes.BYTES) +local sequence_number = ProtoField.uint64 ("ipcz.seqnum" , "Sequence Number" , base.HEX) +local driver_object_data_array = ProtoField.uint32 ("ipcz.driverobjectoffset" , "Driver Objects Array (pointer)" , base.DEC) +local reserved2 = ProtoField.new ("Reserved 2" , "ipcz.reserved2" , ftypes.BYTES) + +local raw_data = ProtoField.new("Raw Data", "ipcz.data", ftypes.BYTES) + +-- Struct Header +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/message.h;bpv=1;bpt=0;l=64 +local struct_size = ProtoField.uint32 ("ipcz.structsize" , "Struct Length" , base.DEC) +local struct_version = ProtoField.uint32 ("ipcz.structversion" , "Struct Version" , base.DEC) + +-- Array Header +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/message.h;l=75;bpv=1;bpt=0 +local array_size = ProtoField.uint32 ("ipcz.arraysize" , "Array Length" , base.DEC) +local array_numelements = ProtoField.uint32 ("ipcz.arraynumelems" , "Elements Count" , base.DEC) + +-- DriverObjectArrayData +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/message.h;l=108;bpv=1;bpt=1?q=kDataArray&ss=chromium%2Fchromium%2Fsrc +local first_object_index = ProtoField.uint32 ("ipcz.firstobjindex" , "First Object Index" , base.DEC) +local num_index = ProtoField.uint32 ("ipcz.numindex" , "Elements Count" , base.DEC) + +-- DriverObjectData +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/message.h;l=89 +local driver_data_array = ProtoField.uint32 ("ipcz.driver.dataarray" , "Driver Data Array (pointer)" , base.DEC) +local first_driver_handle = ProtoField.uint16 ("ipcz.driver.driverhandle" , "First Driver Handle" , base.DEC) +local num_driver_handles = ProtoField.uint16 ("ipcz.driver.numhandles" , "Driver Handles Count" , base.DEC) + +-- ConnectFromBrokerToNonBroker +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=15;bpv=0;bpt=0 +local cbnb_broker_node_name = ProtoField.new("Broker Node Name", "ipcz.cbnb.brokernodename", ftypes.BYTES) -- 16 bytes +local cbnb_receiver_node_name = ProtoField.new("Receiver Node Name", "ipcz.cbnb.receivernodename", ftypes.BYTES) -- 16 bytes +local cbnb_protocol_version = ProtoField.uint32 ("ipcz.cbnb.protocolversion" , "Protocol Version" , base.DEC) +local cbnb_num_initial_portals = ProtoField.uint32 ("ipcz.cbnb.numinitialportals" , "Initial Portals Count" , base.DEC) +local cbnb_buffer_driver = ProtoField.uint32 ("ipcz.cbnb.buffer" , "Buffer Driver Index" , base.DEC) +local cbnb_padding = ProtoField.new("Padding", "ipcz.cbnb.padding", ftypes.BYTES) -- 4 bytes + +-- ConnectFromNonBrokerToBroker +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=47;bpv=0;bpt=0 +local cnbb_protocol_version = ProtoField.uint32 ("ipcz.cnbb.protocolversion" , "Protocol Version" , base.DEC) +local cnbb_num_initial_portals = ProtoField.uint32 ("ipcz.cnbb.numinitialportals" , "Initial Portals Count" , base.DEC) + + +-- ReferNonBroker +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=75;bpv=0;bpt=0 +local rnb_referral_id = ProtoField.uint64 ("ipcz.rnb.referralid" , "Referral ID" , base.HEX) +local rnb_num_initial_portals = ProtoField.uint32 ("ipcz.rnb.numinitialportals" , "Initial Portals Count" , base.DEC) +local rnb_transport = ProtoField.uint32 ("ipcz.rnb.transport" , "Transport (driver object index)" , base.DEC) + +-- ConnectToReferredBroker +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=101;bpv=0;bpt=0 +local crb_version = ProtoField.uint32 ("ipcz.crb.protocolversion" , "Protocol Version" , base.DEC) +local crb_num_initial_portals = ProtoField.uint32 ("ipcz.crb.numinitialportals" , "Initial Portals Count" , base.DEC) + + +-- ConnectToReferredNonBroker +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=118;bpv=1;bpt=0 +local crnb_node_name = ProtoField.new("New Node Name", "ipcz.crnb.nodename", ftypes.BYTES) -- 16 bytes +local crnb_broker_name = ProtoField.new("Broker Name", "ipcz.crnb.brokername", ftypes.BYTES) -- 16 bytes +local crnb_referrer_name = ProtoField.new("Referrer Name", "ipcz.crnb.referrername", ftypes.BYTES) -- 16 bytes +local crnb_broker_protocol_version = ProtoField.uint32 ("ipcz.crnb.brokerprotocolversion" , "Broker Protocol Version" , base.DEC) +local crnb_referrer_protocol_version = ProtoField.uint32 ("ipcz.crnb.referrerprotocolversion" , "Referrer Protocol Version" , base.DEC) +local crnb_num_initial_portals = ProtoField.uint32 ("ipcz.crnb.numinitialportals" , "Initial Portals Count" , base.DEC) +local crnb_broker_link_buffer_driver = ProtoField.uint32 ("ipcz.crnb.brokerlinkbuffer" , "Broker Link Buffer (driver index)" , base.DEC) +local crnb_referrer_link_transport_driver = ProtoField.uint32 ("ipcz.crnb.referrerlinktransport" , "Referrer Link Transport (driver index)" , base.DEC) +local crnb_referrer_link_buffer_driver = ProtoField.uint32 ("ipcz.crnb.referrerlinkbuffer" , "Referrer Link Buffer (driver index)" , base.DEC) + +-- NonBrokerReferralAccepted +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=157;bpv=0;bpt=0 +local nbra_referral_id = ProtoField.uint64 ("ipcz.nbra.referralid" , "Referrer ID" , base.HEX) +local nbra_protocol_version = ProtoField.uint32 ("ipcz.nbra.protocolversion" , "Protocol Version" , base.DEC) +local nbra_num_initial_portals = ProtoField.uint32 ("ipcz.nbra.numinitialportals" , "Initial Portals Count" , base.DEC) +local nbra_node_name = ProtoField.new("Referred Node Name", "ipcz.nbra.nodename", ftypes.BYTES) -- 16 bytes +local nbra_transport_driver = ProtoField.uint32 ("ipcz.nbra.transport" , "Transport (driver index)" , base.DEC) +local nbra_buffer_driver = ProtoField.uint32 ("ipcz.nbra.buffer" , "Buffer (driver index)" , base.DEC) + +-- NonBrokerReferralRejected +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=183;bpv=0;bpt=0 +local nbrr_referral_id = ProtoField.uint64 ("ipcz.nbrr.referralid" , "Referrer ID" , base.HEX) + +-- ConnectFromBrokerToBroker +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=193;bpv=0;bpt=0 +local cfbb_node_name = ProtoField.new("Sending Node Name", "ipcz.cfbb.nodename", ftypes.BYTES) -- 16 bytes +local cfbb_protocol_version = ProtoField.uint32 ("ipcz.cfbb.protocolversion" , "Protocol Version" , base.DEC) +local cfbb_num_initial_portals = ProtoField.uint32 ("ipcz.cfbb.numinitialportals" , "Initial Portals Count" , base.DEC) +local cfbb_buffer_driver = ProtoField.uint32 ("ipcz.cfbb.buffer" , "Buffer (driver index)" , base.DEC) +local cfbb_padding = ProtoField.new("Padding", "ipcz.cfbb.padding", ftypes.BYTES) -- 4 bytes + +-- RequestIntroduction +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=226;bpv=0;bpt=0 +local ri_node_name = ProtoField.new("Node Name (to be introduced to the sender)", "ipcz.ri.nodename", ftypes.BYTES) -- 16 bytes + +-- AcceptIntroduction +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=232;bpv=1;bpt=1 +local ai_node_name = ProtoField.new("Introduced Node Name", "ipcz.ai.nodename", ftypes.BYTES) -- 16 bytes +local ai_link_side = ProtoField.uint8 ("ipcz.ai.linkside" , "Link Side" , base.DEC) +local ai_node_type = ProtoField.uint8 ("ipcz.ai.nodetype" , "Node Type" , base.DEC) +local ai_padding = ProtoField.new("Padding", "ipcz.ai.padding", ftypes.BYTES) -- 2 bytes +local ai_remote_protocol_version = ProtoField.uint32 ("ipcz.ai.protocolversion" , "Remote Protocol Version" , base.DEC) +local ai_transport_driver_index = ProtoField.uint32 ("ipcz.ai.transportindex" , "Transport Driver Index" , base.DEC) +local ai_memory_driver_index = ProtoField.uint32 ("ipcz.ai.memoryindex" , "Memory Driver Index" , base.DEC) + +-- RejectIntroduction +--- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=264;bpv=0;bpt=0 +local rji_node_name = ProtoField.new("Node Name", "ipcz.rji.nodename", ftypes.BYTES) -- 16 bytes + +-- RequestIndirectIntroduction +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=272;bpv=0;bpt=0 +local rii_source_node_name = ProtoField.new("Source Node Name", "ipcz.rii.sourcenodename", ftypes.BYTES) -- 16 bytes +local rii_target_node_name = ProtoField.new("Target Node Name", "ipcz.rii.targetnodename", ftypes.BYTES) -- 16 bytes + +-- AddBlockBuffer +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=285;bpv=1;bpt=1 +local abb_buffer_id = ProtoField.uint64 ("ipcz.abb.bufferid" , "Buffer ID" , base.HEX) +local abb_block_size = ProtoField.uint32 ("ipcz.abb.blocksize" , "Block Size" , base.HEX) +local abb_buffer_driver_index = ProtoField.uint32 ("ipcz.abb.bufferindex" , "Buffer Driver Index" , base.DEC) + +-- AcceptParcel +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=298; +local sublink_id = ProtoField.uint64 ("ipcz.ap.sublinkid" , "Sublink ID" , base.HEX) +local ap_seqnum = ProtoField.uint64 ("ipcz.ap.seqnum" , "Sequence Number" , base.HEX) +local ap_subpacel_index = ProtoField.uint32 ("ipcz.ap.subparcelindex" , "Sub-Parcel Index" , base.DEC) +local ap_num_subparcels = ProtoField.uint32 ("ipcz.ap.numsubpacels" , "Sub-parcels Count" , base.DEC) +local ap_pacel_fragment = ProtoField.new ("Shared Memory Fragment (Optional)", "ipcz.ap.parcelfragment" , ftypes.BYTES) +local parcel_data_array = ProtoField.uint32 ("ipcz.paceldata" , "Parcel Data Array (Pointer)" , base.DEC) +local handles_types_array = ProtoField.uint32 ("ipcz.handletypes" , "Handles Types Array (Pointer)" , base.DEC) +local routers_descriptors_array = ProtoField.uint32 ("ipcz.routers" , "New Routers Array (Pointer)" , base.DEC) +local padding = ProtoField.new ("Padding", "ipcz.padding" , ftypes.BYTES) +local driver_objects_array = ProtoField.new ("Driver Objects Range Info ", "ipcz.driverobjects" , ftypes.BYTES) +local handle_type = ProtoField.uint32("ipcz.handletype", "Handle Type", base.DEC) + +-- FragmentDescriptor +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/fragment_descriptor.h;l=21 +local fragment_buffer_id = ProtoField.uint64 ("ipcz.buffid" , "Fragment Buffer ID" , base.HEX) +local fragment_offset = ProtoField.uint32 ("ipcz.memoffset" , "Fragment Begin Offset (Inside Shared Buffer)" , base.HEX) +local fragment_size = ProtoField.uint32 ("ipcz.fragsize" , "Fragment Size" , base.HEX) + +-- Router Descriptor +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/router_descriptor.h;l=25 +local closed_peer_sequence_length = ProtoField.uint64("ipcz.router.peerseqlen", "Closed Peer Sequence Length", base.HEX) +local new_sublink = ProtoField.uint64("ipcz.router.newsublink", "New Sublink ID", base.HEX) +local new_link_state_fragment = ProtoField.new("New Link State Memory Fragment", "ipcz.router.newlinkstate", ftypes.BYTES) +local new_decaying_sublink = ProtoField.uint64("ipcz.router.newdecaysublink", "New Decaying Sublink ID", base.HEX) +local next_outgoing_seqnum = ProtoField.uint64("ipcz.router.nextseqnum", "Next Outgoing Sequence Number", base.HEX) +local num_bytes_produced = ProtoField.uint64("ipcz.router.bytesproduced", "Total Outgoing Bytes Produced", base.DEC) +local next_incoming_sequence_number = ProtoField.uint64("ipcz.router.nextinseqnum", "Next Incoming Sequence Number", base.HEX) +local decaying_incoming_sequence_length = ProtoField.uint64("ipcz.router.decayinseqnum", "Decaying Incoming Sequence Length", base.HEX) +local num_bytes_consumed = ProtoField.uint64("ipcz.router.bytesconsumed", "Total Incoming Bytes Consumed", base.DEC) +local router_flags = ProtoField.uint32 ("ipcz.router.flags" , "Flags" , base.HEX) +local flag_peer_closed = ProtoField.bool("ipcz.router.peerclosed", "peer_closed", 8, {"Other end of the route is closed", "Other end of the route is not known to be closed"}, 0x1) +local flag_proxy_already_bypassed = ProtoField.bool("ipcz.router.proxybypass", "proxy_already_bypassed", 8, {"Proxy was already bypassed", "Proxy was not bypassed"}, 0x2) +local router_reserved = ProtoField.new("Reserved", "ipcz.router.reserved", ftypes.BYTES) -- 7 bytes +local proxy_peer_node_name = ProtoField.new("Proxy Peer Node Name", "ipcz.router.proxypeernodename", ftypes.BYTES) +local proxy_peer_sublink = ProtoField.uint64("ipcz.router.proxypeersublink", "Proxy Peer Sublink ID", base.HEX) + +-- RouteClosed +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=371;drc=11ff9071e6112d0b830036e7c5bc2b00560649c0 +local rc_sublink_id = ProtoField.uint64 ("ipcz.rc.sublinkid" , "Sublink ID" , base.HEX) +local rc_seqnum = ProtoField.uint64 ("ipcz.rc.seqnum" , "Sequence Number" , base.HEX) + +-- RouteDisconnected +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=392;bpv=0;bpt=0 +local rd_sublink_id = ProtoField.uint64("ipcz.rd.sublinkid", "Sublink ID", base.HEX) + +-- BypassPeer +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=408;bpv=0;bpt=0 +local bp_sublink_id = ProtoField.uint64("ipcz.bp.sublinkid", "Sublink ID", base.HEX) +local bp_reserved0 = ProtoField.new("Reserved 0", "ipcz.bp.reserved0", ftypes.BYTES) -- 8 bytes +local bp_node_name = ProtoField.new("Bypass Target Node Name", "ipcz.bp.targetnode", ftypes.BYTES) -- 16 bytes +local bp_bypass_target_sublink = ProtoField.uint64("ipcz.bp.bypasssublink", "Bypass Target Sublink ID", base.HEX) + +-- AcceptBypassLink +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=444;bpv=0;bpt=0 +local abl_node_name = ProtoField.new("Current Peer Node Name", "ipcz.abl.peernode", ftypes.BYTES) -- 16 bytes +local abl_sublink_id = ProtoField.uint64("ipcz.abl.peersublink", "Current Peer Sublink ID", base.HEX) +local abl_seqnum = ProtoField.uint64 ("ipcz.abl.seqnum" , "Inbound Sequence Length From Bypassed Link" , base.HEX) +local abl_new_sublink_id = ProtoField.uint64("ipcz.abl.newsublink", "New Sublink ID", base.HEX) +local abl_fragment = ProtoField.new ("New Link State Memory Fragment (Optional)", "ipcz.abl.fragment" , ftypes.BYTES) + +-- StopProxying +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=479;bpv=0;bpt=0 +local sp_sublink_id = ProtoField.uint64("ipcz.sp.sublinkid", "Sublink ID", base.HEX) +local sp_inbound_seqnum = ProtoField.uint64 ("ipcz.sp.inboundseqnum" , "Inbound Sequence Length" , base.HEX) +local sp_outbound_seqnum = ProtoField.uint64 ("ipcz.sp.outboundseqnum" , "Outbound Sequence Length" , base.HEX) + +-- ProxyWillStop +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=505;bpv=0;bpt=0 +local pws_sublink_id = ProtoField.uint64("ipcz.pws.sublinkid", "Sublink ID", base.HEX) +local pws_inbound_seqnum = ProtoField.uint64 ("ipcz.pws.inboundseqnum" , "Inbound Sequence Length" , base.HEX) + +-- BypassPeerWithLink +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=531;bpv=0;bpt=0 +local bpwl_sublink_id = ProtoField.uint64("ipcz.bpwl.sublinkid", "Sublink ID", base.HEX) +local bpwl_new_sublink_id = ProtoField.uint64("ipcz.bpwl.newsublinkid", "New Sublink ID", base.HEX) +local bpwl_fragment = ProtoField.new ("New Link State Memory Fragment (Optional)", "ipcz.bpwl.fragment" , ftypes.BYTES) +local bpwl_inbound_seqnum = ProtoField.uint64 ("ipcz.bpwl.inboundseqnum" , "Inbound Sequence Length" , base.HEX) + +-- StopProxyingToLocalPeer +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=561;bpv=0;bpt=0 +local splp_sublink_id = ProtoField.uint64("ipcz.splp.sublinkid", "Sublink ID", base.HEX) +local splp_outbound_seqnum = ProtoField.uint64 ("ipcz.splp.outboundseqnum" , "Outbound Sequence Length" , base.HEX) + +-- FlushRouter +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=574;drc=11ff9071e6112d0b830036e7c5bc2b00560649c0 +local fr_sublink_id = ProtoField.uint64("ipcz.fr.sublinkid", "Sublink ID", base.HEX) + +-- RequestMemory +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=583;bpv=0;bpt=0 +local rmem_size = ProtoField.uint32("ipcz.rm.size", "Memory Size", base.HEX) +local rmem_padding = ProtoField.new ("Padding", "ipcz.rm.padding" , ftypes.BYTES) -- 4 bytes + +-- ProvideMemory +-- https://source.chromium.org/chromium/chromium/src/+/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=591;bpv=0;bpt=0 +local pm_size = ProtoField.uint32("ipcz.pm.size", "Memory Size", base.HEX) +local pm_buffer = ProtoField.uint32("ipcz.pm.buffer", "Provided Buffer Driver Index", base.DEC) + + +-- RelayMessage +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=599;drc=11ff9071e6112d0b830036e7c5bc2b00560649c0 +local rm_destination = ProtoField.new("Destination Node Name", "ipcz.rm.destination", ftypes.BYTES) +local rm_data = ProtoField.uint32("ipcz.rm.data", "Data (pointer)", base.DEC) +local rm_padding = ProtoField.new ("Padding", "ipcz.rm.padding" , ftypes.BYTES) -- 4 bytes +local rm_driver_object_array = ProtoField.new ("Driver Objects Range Info", "ipcz.rm.driverobject" , ftypes.BYTES) + +-- AcceptRelayedMessage +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=615 +local arm_node = ProtoField.new("Requesting Node Name", "ipcz.arm.destination", ftypes.BYTES) +local arm_data = ProtoField.uint32("ipcz.arm.data", "Data (pointer)", base.DEC) +local arm_padding = ProtoField.new ("Padding", "ipcz.arm.padding" , ftypes.BYTES) -- 4 bytes +local arm_driver_object_array = ProtoField.new ("Driver Objects Range Info", "ipcz.arm.driverobjects" , ftypes.BYTES) + +-- AcceptParcelDriverObjects +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h;l=354;drc=11ff9071e6112d0b830036e7c5bc2b00560649c0 +local apdo_sublink_id = ProtoField.uint64 ("ipcz.apdo.sublinkid" , "Sublink ID" , base.HEX) +local apdo_seqnum = ProtoField.uint64 ("ipcz.apdo.seqnum" , "Sequence Number" , base.HEX) +local apdo_driver_objects_array = ProtoField.new ("Driver Objects Range Info ", "ipcz.apdo.driverobjects" , ftypes.BYTES) + + +-- Serialized driver/transport objects +-- Object Header +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/transport.cc;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=83 +local driver_header_size = ProtoField.uint32("ipcz.driver.headersize", "Header Size", base.DEC) +local driver_type = ProtoField.uint32("ipcz.driver.type", "Driver Object Type", base.DEC) +local driver_num_handles = ProtoField.uint32("ipcz.driver.numhandles", "Handles Count", base.DEC) +local driver_handle_owner = ProtoField.uint8("ipcz.driver.handleowner", "Handle Owner", base.DEC) +local driver_padding = ProtoField.new ("Padding", "ipcz.driver.padding" , ftypes.BYTES) -- 3 bytes +local driver_object_body = ProtoField.new ("Driver Object Body", "ipcz.driver.body" , ftypes.BYTES) + +-- DataPipeHeader +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/data_pipe.cc;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=29 +local data_pipe_header_size = ProtoField.uint32("ipcz.datapipe.headersize", "Header Size", base.DEC) +local data_pipe_endpoint_type = ProtoField.uint32("ipcz.datapipe.endpointtype", "Endpoint Type", base.DEC) +local data_pipe_element_size = ProtoField.uint32("ipcz.datapipe.elementsize", "Element Size", base.DEC) +local data_pipe_padding = ProtoField.new("Padding", "ipcz.datapipe.padding", ftypes.BYTES) -- 4 bytes +local data_pipe_ring_buffer_state = ProtoField.new("Ring Buffer State", "ipcz.datapipe.ringbufferstate", ftypes.BYTES) -- 8 bytes + +-- RingBuffer::SerializedState +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/ring_buffer.h;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=151 +local ring_buffer_offset = ProtoField.uint32("ipcz.datapipe.offset", "Ring Buffer Offset", base.HEX) +local ring_buffer_size = ProtoField.uint32("ipcz.datapipe.size", "Ring Buffer Size", base.HEX) + +-- SharedBuffer's BufferHeader +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/shared_buffer.cc;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=29 +local shared_buffer_header_size = ProtoField.uint32("ipcz.sharedbuffer.headersize", "Header Size", base.DEC) +local shared_buffer_buffer_size = ProtoField.uint32("ipcz.sharedbuffer.buffersize", "Buffer Size", base.HEX) +local shared_buffer_buffer_mode = ProtoField.uint32("ipcz.sharedbuffer.mode", "Mode", base.DEC) +local shared_buffer_padding = ProtoField.new("Padding", "ipcz.sharedbuffer.padding", ftypes.BYTES) -- 4 bytes +local shared_buffer_guid = ProtoField.new("Identifying GUID", "ipcz.sharedbuffer.guid", ftypes.GUID) -- 8 bytes + +-- TransportHeader +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/transport.cc;l=105;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1 +local transport_destination_type = ProtoField.uint32("ipcz.transport.destinationtype", "Destination Type", base.DEC) +local transport_is_same_remote_process = ProtoField.uint8("ipcz.transport.issameremoteprocess", "Is same remote process", base.DEC) +local transport_is_peer_trusted = ProtoField.uint8("ipcz.transport.ispeertrusted", "Is peer trusted", base.DEC) +local transport_is_trusted_by_peer = ProtoField.uint8("ipcz.transport.istrustedbypeer", "Is trusted by peer", base.DEC) +local transport_padding = ProtoField.new("Padding", "ipcz.transport.padding", ftypes.BYTES) -- 1 bytes + +-- WrappedPlatformHandleHeader +-- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/wrapped_platform_handle.cc;l=56;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1 +local wrapped_handle_size = ProtoField.uint32("ipcz.wrappedhandle.headersize", "Header Size", base.DEC) +local wrapped_handle_type = ProtoField.uint32("ipcz.wrappedhandle.type", "Wrapped Handle Type", base.DEC) + + + +ipcz_protocol.fields = { + header_size, num_handles, total_size, creation_timeticks, -- IpczHeader + message_header_size, version, message_id, reserved, sequence_number, driver_object_data_array, reserved2, -- Message Header + cbnb_broker_node_name, cbnb_receiver_node_name, cbnb_protocol_version, cbnb_num_initial_portals, cbnb_buffer_driver, cbnb_padding, -- ConnectFromBrokerToBroker + cnbb_protocol_version, cnbb_num_initial_portals, -- ConnectFromNonBrokerToBroker + rnb_referral_id, rnb_num_initial_portals, rnb_transport, -- ReferNonBroker + crb_version, crb_num_initial_portals, -- ConnectToReferredBroker + nbra_referral_id, nbra_protocol_version, nbra_num_initial_portals, nbra_node_name, nbra_transport_driver, nbra_buffer_driver, -- NonBrokerReferralAccepted + nbrr_referral_id, -- NonBrokerReferralRejected + cfbb_node_name, cfbb_protocol_version, cfbb_num_initial_portals, cfbb_buffer_driver, cfbb_padding, -- ConnectFromBrokerToBroker + crnb_node_name, crnb_broker_name, crnb_referrer_name, crnb_broker_protocol_version, crnb_referrer_protocol_version, crnb_num_initial_portals, crnb_broker_link_buffer_driver, crnb_referrer_link_transport_driver, crnb_referrer_link_buffer_driver, -- ConnectToReferredNonBroker + sublink_id, ap_seqnum, ap_subpacel_index, ap_num_subparcels, ap_pacel_fragment, parcel_data_array, handles_types_array, routers_descriptors_array, padding, driver_objects_array, handle_type, -- AcceptParcel + fragment_buffer_id, fragment_offset, fragment_size, -- Fragment Descriptor + rc_sublink_id, rc_seqnum, -- RouteClosed + rd_sublink_id, -- RouteDisconnected + bp_sublink_id, bp_reserved0, bp_node_name, bp_bypass_target_sublink, -- BypassPeer + abl_node_name, abl_sublink_id, abl_seqnum, abl_new_sublink_id, abl_fragment, -- AcceptBypassLink + sp_sublink_id, sp_inbound_seqnum, sp_outbound_seqnum, -- StopProxying + pws_sublink_id, pws_inbound_seqnum, -- ProxyWillStop + bpwl_sublink_id, bpwl_new_sublink_id, bpwl_fragment, bpwl_inbound_seqnum, -- BypassPeerWithLink + splp_sublink_id, splp_outbound_seqnum, -- StopProxyingToLocalPeer + fr_sublink_id, -- FlushRouter + rmem_size, rmem_padding, -- RequestMemory + pm_size, pm_buffer, -- ProvideMemory + abb_buffer_id, abb_block_size, abb_buffer_driver_index, -- AddBlockBuffer + ri_node_name, -- RequestIntroduction + ai_node_name, ai_link_side, ai_node_type, ai_padding, ai_remote_protocol_version, ai_transport_driver_index, ai_memory_driver_index, -- AcceptIntroduction + rji_node_name, -- RejectIntroduction + rii_source_node_name, rii_target_node_name, -- RequestIndirectIntroduction + rm_destination, rm_data, rm_padding,rm_driver_object_array, -- RelayMessage + arm_node, arm_data, arm_padding, arm_driver_object_array, -- AcceptRelayedMessage + apdo_sublink_id, apdo_seqnum, apdo_driver_objects_array, -- AcceptParcelDriverObjects + struct_size, struct_version, array_size, array_numelements, -- Struct Header & Array Header + first_object_index, num_index, -- DriverObjectArrayData + driver_data_array, first_driver_handle, num_driver_handles, -- DriverObjectData + closed_peer_sequence_length, new_sublink, new_link_state_fragment, new_decaying_sublink, next_outgoing_seqnum, num_bytes_produced, next_incoming_sequence_number, decaying_incoming_sequence_length, num_bytes_consumed, router_flags, flag_peer_closed, flag_proxy_already_bypassed, router_reserved, proxy_peer_node_name, proxy_peer_sublink, -- Router Descriptor + driver_header_size, driver_type, driver_num_handles, driver_handle_owner, driver_padding, driver_object_body, -- Driver ObjectHeader + data_pipe_header_size, data_pipe_endpoint_type, data_pipe_element_size, data_pipe_padding, data_pipe_ring_buffer_state, -- DataPipeHeader + ring_buffer_offset, ring_buffer_size, -- RingBuffer::SerializedState + shared_buffer_header_size, shared_buffer_buffer_size, shared_buffer_buffer_mode, shared_buffer_padding, shared_buffer_guid, -- SharedBuffer's BufferHeader + transport_destination_type, transport_is_same_remote_process, transport_is_peer_trusted, transport_is_trusted_by_peer, transport_padding, -- TransportHeader + wrapped_handle_size, wrapped_handle_type, -- WrappedPlatformHandleHeader + raw_data, -- Extra Fields +} + +ipcz_protocol.experts = {expert_info_pipeerror} + +local _header_size = Field.new("ipcz.headersize") +local _num_handles = Field.new("ipcz.numhandles") +local _total_size = Field.new("ipcz.totalsize") +local _creation_timeticks = Field.new("ipcz.creationtimticks") +local _driverobjectsoffset = Field.new("ipcz.driverobjectoffset") + +local _msg_hdr_size = Field.new("ipcz.structsize") + +local _msg_header_size = Field.new("ipcz.msgheadersize") +local _version = Field.new("ipcz.version") +local _msg_id = Field.new("ipcz.messageid") +local _reserved1 = Field.new("ipcz.reserved") +local _driverobjectoffset = Field.new("ipcz.driverobjectoffset") +local _reserved2 = Field.new("ipcz.reserved2") + +-- Accept Parcel fields +local _bufferid = Field.new("ipcz.buffid") +local _parcel_data_offset = Field.new("ipcz.paceldata") +local _handle_types_offset = Field.new("ipcz.handletypes") +local _routers_offset = Field.new("ipcz.routers") + +-- Relay Message fields +local _rm_data_offset = Field.new("ipcz.rm.data") + +-- Accept Relayed Message fields +local _arm_data_offset = Field.new("ipcz.arm.data") + + + +function ipcz_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.src = Address.ip('127.0.0.1') + pinfo.dst = Address.ip('127.0.0.1') + pinfo.cols.protocol = ipcz_protocol.name + + local subtree = tree:add(ipcz_protocol, buffer(), "IPCZ Protocol Message") + + -- Generic Header + + local headerSubtree = subtree:add("IPCZ Generic Header") + + local offset = 0 + header_size_value = buffer(offset,2):le_uint() + headerSubtree:add_le(header_size, buffer(offset,2)) offset = offset + 2 + headerSubtree:add_le(num_handles, buffer(offset,2)); offset = offset + 2 + headerSubtree:add_le(total_size, buffer(offset,4)); offset = offset + 4 + if header_size_value > 8 then + headerSubtree:add_le(creation_timeticks, buffer(offset,8)); offset = offset + 8 + end + + headerSubtree:set_len(header_size_value) + + message_size = _total_size()() - header_size_value + + -- IPCZ message header + + local message_start_offset = offset + offset, message_name = read_ipcz_message_header(subtree, offset, buffer, message_size) + + + local eventDataSubstree = subtree:add(buffer(offset), "Message Data") + + eventDataSubstree:append_text(" (" .. message_name .. ")") + subtree:append_text(", Message ID: " .. _msg_id()() .. " [" .. message_name .. "]") + + -- TODO: move to a function called read_struct_header(subtree, initial_offset, buffer) + eventDataSubstree:add_le(struct_size, buffer(offset, 4)); offset = offset + 4 + eventDataSubstree:add_le(struct_version, buffer(offset, 4)); offset = offset + 4 + + local params_area_size = _msg_hdr_size()() - 8 + local params_area_offset = offset + local paramsTree = eventDataSubstree:add(buffer(params_area_offset, params_area_size), "Serialized Parameters") + local arraysAreaText = "Serialized Parameters (Arrays Area)" + local arraysParamsTree = nil + + -- Now message ID dispatching, based on + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h + if _msg_id()() == 0 then + -- ConnectFromBrokerToNonBroker + pinfo.cols.info = tostring(pinfo.cols.info) .. " ConnectFromBrokerToNonBroker" + + paramsTree:add(cbnb_broker_node_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add(cbnb_receiver_node_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add_le(cbnb_protocol_version, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(cbnb_num_initial_portals, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(cbnb_buffer_driver, buffer(offset,4)); offset = offset + 4 + paramsTree:add(cbnb_padding, buffer(offset,4)); offset = offset + 4 + elseif _msg_id()() == 1 then + -- ConnectFromNonBrokerToBroker + pinfo.cols.info = tostring(pinfo.cols.info) .. " ConnectFromNonBrokerToBroker" + + paramsTree:add_le(cnbb_protocol_version, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(cnbb_num_initial_portals, buffer(offset,4)); offset = offset + 4 + elseif _msg_id()() == 2 then + -- ReferNonBroker + pinfo.cols.info = tostring(pinfo.cols.info) .. " ReferNonBroker" + + paramsTree:add_le(rnb_referral_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(rnb_num_initial_portals, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(rnb_transport, buffer(offset,4)); offset = offset + 4 + elseif _msg_id()() == 3 then + -- ConnectToReferredBroker + pinfo.cols.info = tostring(pinfo.cols.info) .. " ConnectToReferredBroker" + + paramsTree:add_le(crb_version, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(crb_num_initial_portals, buffer(offset,4)); offset = offset + 4 + elseif _msg_id()() == 4 then + -- ConnectToReferredNonBroker + pinfo.cols.info = tostring(pinfo.cols.info) .. " ConnectToReferredNonBroker" + + paramsTree:add(crnb_node_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add(crnb_broker_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add(crnb_referrer_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add_le(crnb_broker_protocol_version, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(crnb_referrer_protocol_version, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(crnb_num_initial_portals, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(crnb_broker_link_buffer_driver, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(crnb_referrer_link_transport_driver, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(crnb_referrer_link_buffer_driver, buffer(offset,4)); offset = offset + 4 + + elseif _msg_id()() == 5 then + -- NonBrokerReferralAccepted + pinfo.cols.info = tostring(pinfo.cols.info) .. " NonBrokerReferralAccepted" + + paramsTree:add_le(nbra_referral_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(nbra_protocol_version, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(nbra_num_initial_portals, buffer(offset,4)); offset = offset + 4 + paramsTree:add(nbra_node_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add_le(nbra_transport_driver, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(nbra_buffer_driver, buffer(offset,4)); offset = offset + 4 + elseif _msg_id()() == 6 then + -- NonBrokerReferralRejected + pinfo.cols.info = tostring(pinfo.cols.info) .. " NonBrokerReferralRejected" + + paramsTree:add_le(nbrr_referral_id, buffer(offset,8)); offset = offset + 8 + elseif _msg_id()() == 7 then + -- ConnectFromBrokerToBroker + pinfo.cols.info = tostring(pinfo.cols.info) .. " ConnectFromBrokerToBroker" + + paramsTree:add(cfbb_node_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add_le(cfbb_protocol_version, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(cfbb_num_initial_portals, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(cfbb_buffer_driver, buffer(offset,4)); offset = offset + 4 + paramsTree:add(cfbb_padding, buffer(offset,4)); offset = offset + 4 + elseif _msg_id()() == 10 then + -- RequestIntroduction + pinfo.cols.info = tostring(pinfo.cols.info) .. " RequestIntroduction" + + paramsTree:add(ri_node_name, buffer(offset,16)); offset = offset + 16 + elseif _msg_id()() == 11 then + -- AcceptIntroduction + pinfo.cols.info = tostring(pinfo.cols.info) .. " AcceptIntroduction" + + paramsTree:add(ai_node_name, buffer(offset,16)); offset = offset + 16 + local linkSideTree = paramsTree:add_le(ai_link_side, buffer(offset,1)); + local link_side_value = buffer(offset, 1):le_uint(); offset = offset + 1 + local nodeTypeTree = paramsTree:add_le(ai_node_type, buffer(offset,1)); + local node_type_value = buffer(offset, 1):le_uint(); offset = offset + 1 + paramsTree:add(ai_padding, buffer(offset,2)); offset = offset + 2 + paramsTree:add_le(ai_remote_protocol_version, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(ai_transport_driver_index, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(ai_memory_driver_index, buffer(offset,4)); offset = offset + 4 + + linkSideTree:append_text(" [" .. get_link_side(link_side_value) .. "]") + nodeTypeTree:append_text(" [" .. get_transport_endpoint_type(node_type_value) .. "]") + + elseif _msg_id()() == 12 then + -- RejectIntroduction + pinfo.cols.info = tostring(pinfo.cols.info) .. " RejectIntroduction" + + paramsTree:add(rji_node_name, buffer(offset,16)); offset = offset + 16 + elseif _msg_id()() == 13 then + -- RequestIndirectIntroduction + pinfo.cols.info = tostring(pinfo.cols.info) .. " RequestIndirectIntroduction" + + paramsTree:add(rii_source_node_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add(rii_target_node_name, buffer(offset,16)); offset = offset + 16 + elseif _msg_id()() == 14 then + -- AddBlockBuffer + pinfo.cols.info = tostring(pinfo.cols.info) .. " AddBlockBuffer" + + offset = read_add_block_buffer_message(paramsTree, offset, buffer) + elseif _msg_id()() == 20 then + -- + -- AcceptParcel + -- + + paramsTree:add_le(sublink_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(ap_seqnum, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(ap_subpacel_index, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(ap_num_subparcels, buffer(offset,4)); offset = offset + 4 + + -- shared memory fragment + local sharedMemoryTree = paramsTree:add(buffer(offset,16), "Shared Memory Fragment"); + offset = read_fragment_descriptor(sharedMemoryTree, offset, buffer) + + parcelDataTree = paramsTree:add_le(parcel_data_array, buffer(offset,4)); offset = offset + 4 + handleTypesTree = paramsTree:add_le(handles_types_array, buffer(offset,4)); offset = offset + 4 + routersTree = paramsTree:add_le(routers_descriptors_array, buffer(offset,4)); offset = offset + 4 + paramsTree:add(padding, buffer(offset,4)); offset = offset + 4 + + driver_objects_tree = paramsTree:add(buffer(offset,8), "Driver Objects Range Info"); + offset = read_DriverObjectArrayData(driver_objects_tree, offset, buffer) + + local is_memory_fragment_null = _bufferid()() > 100000000 -- actually should be == 0xffffffffffffffff + if not is_memory_fragment_null then + pinfo.cols.info = tostring(pinfo.cols.info) .. " AcceptParcel (with shared memory fragment)" + else + sharedMemoryTree:append_text(" [NULL]") + end + + -- Now take care of the possible arrays in the arrays area + + arraysParamsTree = eventDataSubstree:add(buffer(offset), arraysAreaText) + + if _parcel_data_offset()() > 0 and is_memory_fragment_null then + local offset2 = message_start_offset + _parcel_data_offset()() + parcelDataArrayHeaderTree = arraysParamsTree:add(buffer(offset2, 8), "Parcel Data Array Header (pointer: " .. _parcel_data_offset()() .. ")") + + parcel_length = buffer(offset2+4,4):le_uint() + offset2 = read_array_header(parcelDataArrayHeaderTree, offset2, buffer) + + if parcel_length > 4 then + Dissector.get("mojouser"):call(buffer(offset2, parcel_length):tvb(), pinfo, tree) + else + -- I don't know what's this + pinfo.cols.info = tostring(pinfo.cols.info) .. " Data" + Dissector.get("data"):call(buffer(offset2, parcel_length):tvb(), pinfo, tree) + end + elseif _parcel_data_offset()() == 0 then + parcelDataTree:append_text(" [NULL]") + end + + if _handle_types_offset()() > 0 then + offset2 = message_start_offset + _handle_types_offset()() + + local array_length = buffer(offset2, 4):le_uint() + local num_elements = buffer(offset2+4,4):le_uint() + handleTypesArrayTree = arraysParamsTree:add(buffer(offset2, array_length), "Handle Types Array (pointer: " .. _handle_types_offset()() .. ")") + offset2 = read_array_header(handleTypesArrayTree, offset2, buffer) + + -- read the handle types array contents + local handle_index = 0 + while (handle_index < num_elements) do + handle_type_value = buffer(offset2, 4):le_uint() + handleTypesArrayTree:add_le(handle_type, buffer(offset2, 4)):append_text(" [" .. get_handle_type(handle_type_value) .. "]"); offset2 = offset2 + 4 + + handle_index = handle_index + 1 + end + else + handleTypesTree:append_text(" [NULL]") + end + + if _routers_offset()() > 0 then + offset2 = message_start_offset + _routers_offset()() + + local array_length = buffer(offset2, 4):le_uint() + local num_elements = buffer(offset2+4,4):le_uint() + routersArrayTree = arraysParamsTree:add(buffer(offset2, array_length), "New Routers Array (pointer: " .. _routers_offset()() .. ")") + offset2 = read_array_header(routersArrayTree, offset2, buffer) + + -- read the routers array contents + local router_descriptor_size = header_size_value > 8 and 96 or 112 -- TODO: this could be 112 in chrome versions < june 2023. need a better way to detect + local router_index = 0 + while (router_index < num_elements) do + local routerTree = routersArrayTree:add(buffer(offset2, router_descriptor_size), "Router #" .. (router_index+1)) + offset2 = read_router_descriptor(routerTree, offset2, buffer, router_descriptor_size) + router_index = router_index + 1 + end + else + routersTree:append_text(" [NULL]") + end + + + elseif _msg_id()() == 21 then + -- AcceptParcelDriverObjects + pinfo.cols.info = tostring(pinfo.cols.info) .. " AcceptParcelDriverObjects" + + offset = read_accept_parcel_driver_object_message(paramsTree, offset, buffer) + + elseif _msg_id()() == 22 then + -- RouteClosed + pinfo.cols.info = tostring(pinfo.cols.info) .. " RouteClosed" + + paramsTree:add_le(rc_sublink_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(rc_seqnum, buffer(offset,8)); offset = offset + 8 + + elseif _msg_id()() == 23 then + -- RouteDisconnected + pinfo.cols.info = tostring(pinfo.cols.info) .. " RouteDisconnected" + + paramsTree:add_le(rd_sublink_id, buffer(offset,8)); offset = offset + 8 + elseif _msg_id()() == 30 then + -- BypassPeer + pinfo.cols.info = tostring(pinfo.cols.info) .. " BypassPeer" + + paramsTree:add_le(bp_sublink_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add(bp_reserved0, buffer(offset,8)); offset = offset + 8 + paramsTree:add(bp_node_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add_le(bp_bypass_target_sublink, buffer(offset,8)); offset = offset + 8 + elseif _msg_id()() == 31 then + -- AcceptBypassLink + pinfo.cols.info = tostring(pinfo.cols.info) .. " AcceptBypassLink" + + paramsTree:add(abl_node_name, buffer(offset,16)); offset = offset + 16 + paramsTree:add_le(abl_sublink_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(abl_seqnum, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(abl_new_sublink_id, buffer(offset,8)); offset = offset + 8 + + -- shared memory fragment + local fragmentTree = paramsTree:add(buffer(offset, 16), "New Link State Memory Fragment"); + local buffer_id_value = buffer(offset, 8):le_uint64(); + offset = read_fragment_descriptor(fragmentTree, offset, buffer) + local is_memory_fragment_null = buffer_id_value > 100000000 -- actually should be == 0xffffffffffffffff + if is_memory_fragment_null then + fragmentTree:append_text(" [NULL]") + end + + elseif _msg_id()() == 32 then + -- StopProxying + pinfo.cols.info = tostring(pinfo.cols.info) .. " StopProxying" + + paramsTree:add_le(sp_sublink_id, buffer(offset, 8)); offset = offset + 8 + paramsTree:add_le(sp_inbound_seqnum, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(sp_outbound_seqnum, buffer(offset,8)); offset = offset + 8 + elseif _msg_id()() == 33 then + -- ProxyWillStop + pinfo.cols.info = tostring(pinfo.cols.info) .. " ProxyWillStop" + + paramsTree:add_le(pws_sublink_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(pws_inbound_seqnum, buffer(offset,8)); offset = offset + 8 + elseif _msg_id()() == 34 then + -- BypassPeerWithLink + pinfo.cols.info = tostring(pinfo.cols.info) .. " BypassPeerWithLink" + + paramsTree:add_le(bpwl_sublink_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(bpwl_new_sublink_id, buffer(offset,8)); offset = offset + 8 + + -- shared memory fragment + local fragmentTree = paramsTree:add(buffer(offset, 16), "New Link State Memory Fragment"); + local buffer_id_value = buffer(offset, 8):le_uint64(); + offset = read_fragment_descriptor(fragmentTree, offset, buffer) + local is_memory_fragment_null = buffer_id_value > 100000000 -- actually should be == 0xffffffffffffffff + if is_memory_fragment_null then + fragmentTree:append_text(" [NULL]") + end + + paramsTree:add_le(bpwl_inbound_seqnum, buffer(offset,8)); offset = offset + 8 + elseif _msg_id()() == 35 then + -- StopProxyingToLocalPeer + pinfo.cols.info = tostring(pinfo.cols.info) .. " StopProxyingToLocalPeer" + + paramsTree:add_le(splp_sublink_id, buffer(offset,8)); offset = offset + 8 + paramsTree:add_le(splp_outbound_seqnum, buffer(offset,8)); offset = offset + 8 + elseif _msg_id()() == 36 then + -- FlushRouter + pinfo.cols.info = tostring(pinfo.cols.info) .. " FlushRouter" + + paramsTree:add_le(fr_sublink_id, buffer(offset, 8)); offset = offset + 8 + elseif _msg_id()() == 64 then + -- RequestMemory + pinfo.cols.info = tostring(pinfo.cols.info) .. " RequestMemory" + + paramsTree:add_le(rmem_size, buffer(offset,4)); offset = offset + 4 + paramsTree:add(rmem_padding, buffer(offset,4)); offset = offset + 4 + elseif _msg_id()() == 65 then + -- ProvideMemory + pinfo.cols.info = tostring(pinfo.cols.info) .. " ProvideMemory" + + paramsTree:add_le(pm_size, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(pm_buffer, buffer(offset,4)); offset = offset + 4 + elseif _msg_id()() == 66 then + -- + -- RelayMessage + -- + pinfo.cols.info = tostring(pinfo.cols.info) .. " RelayMessage" + + paramsTree:add_le(rm_destination, buffer(offset, 16)); offset = offset + 16 + paramsTree:add_le(rm_data, buffer(offset,4)); offset = offset + 4 + paramsTree:add_le(rm_padding, buffer(offset, 4)); offset = offset + 4 + driver_objects_tree = paramsTree:add(buffer(offset,8), "Driver Objects Range Info"); + offset = read_DriverObjectArrayData(driver_objects_tree, offset, buffer) + + -- Now take care of the possible arrays in the arrays area + + arraysParamsTree = eventDataSubstree:add(buffer(offset), arraysAreaText) + + if _rm_data_offset()() > 0 then + local offset2 = message_start_offset + _rm_data_offset()() + + offset2, inner_message_name = read_relayed_message_inner_message(arraysParamsTree, offset2, buffer, _rm_data_offset()()) + + end + + elseif _msg_id()() == 67 then + -- AcceptRelayedMessage + pinfo.cols.info = tostring(pinfo.cols.info) .. " AcceptRelayedMessage" + + offset = read_accept_relayed_message(paramsTree, offset, buffer) + + -- Now take care of the possible arrays in the arrays area + + arraysParamsTree = eventDataSubstree:add(buffer(offset), arraysAreaText) + + if _arm_data_offset()() > 0 then + local offset2 = message_start_offset + _arm_data_offset()() + + offset2, inner_message_name = read_relayed_message_inner_message(arraysParamsTree, offset2, buffer, _arm_data_offset()()) + end + end + + local arrays_area_start = params_area_offset + params_area_size + if arraysParamsTree == nil and arrays_area_start < _total_size()() then + arraysParamsTree = eventDataSubstree:add(buffer(arrays_area_start), arraysAreaText) + end + + -- + -- Handle attached driver objects + -- + + local num_drivers = 0 + local driver_data_arrays = {} + if _driverobjectsoffset()() > 0 then + local offset2 = message_start_offset + _driverobjectsoffset()() + local array_length = buffer(offset2,4):le_uint() + num_drivers = buffer(offset2+4,4):le_uint() + + local driverObjectsTree = arraysParamsTree:add(buffer(offset2, array_length), "Driver Objects Array (pointer: " .. _driverobjectsoffset()() .. ")") + local driverObjectsArrayHeaderTree = driverObjectsTree:add(buffer(offset2, 8), "Array Header") + offset2 = read_array_header(driverObjectsArrayHeaderTree, offset2, buffer) + + -- read the driver objects array contents + local driver_descriptor_size = 8 + local driver_index = 0 + while (driver_index < num_drivers) do + local driverTree = driverObjectsTree:add(buffer(offset2, driver_descriptor_size), "Driver #" .. (driver_index)) + offset2, driver_data_offset = read_driver_object(driverTree, offset2, buffer) + table.insert(driver_data_arrays, driver_data_offset) + driver_index = driver_index + 1 + end + + for index, driver_data_array_offset in ipairs(driver_data_arrays) do + + local offset3 = message_start_offset + driver_data_array_offset + local array_length = buffer(offset3,4):le_uint() + local num_bytes = buffer(offset3+4,4):le_uint() + local driverDataArrayTree = arraysParamsTree:add(buffer(offset3, array_length), "Driver #" .. (index - 1) .. " Data Array") + local driverDataArrayHeaderTree = driverDataArrayTree:add(buffer(offset3, 8), "Array Header") + offset3 = read_array_header(driverDataArrayHeaderTree, offset3, buffer) + + -- we assume this is the Mojo IpzDriver + local driverArrayContetnsTree = driverDataArrayTree:add(buffer(offset3, num_bytes), "Array Contents (driver-specific serialization)") + offset3, drivers_num_handles, driver_object_type_name = read_mojo_driver_object_data(driverArrayContetnsTree, offset3, buffer, num_bytes) + driverDataArrayTree:append_text(" [" .. driver_object_type_name .. "] (pointer: " .. driver_data_array_offset .. ")") + end + + end + + subtree:append_text(", Attached Driver Objects: " .. num_drivers) + + if num_drivers > 0 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " [+" .. num_drivers .. " driver objects]" + end + +end + +function read_accept_relayed_message(subtree, offset, buffer) + subtree:add_le(arm_node, buffer(offset, 16)); offset = offset + 16 + subtree:add_le(arm_data, buffer(offset,4)); offset = offset + 4 + subtree:add_le(arm_padding, buffer(offset, 4)); offset = offset + 4 + local driver_objects_tree = subtree:add(buffer(offset,8), "Driver Objects Range Info"); + offset = read_DriverObjectArrayData(driver_objects_tree, offset, buffer) + + return offset +end + +function read_accept_parcel_driver_object_message(subtree, offset, buffer) + subtree:add_le(apdo_sublink_id, buffer(offset,8)); offset = offset + 8 + subtree:add_le(apdo_seqnum, buffer(offset,8)); offset = offset + 8 + + driver_objects_tree = subtree:add(buffer(offset,8), "Driver Objects Range Info"); + offset = read_DriverObjectArrayData(driver_objects_tree, offset, buffer) + + return offset +end + +function read_add_block_buffer_message(subtree, offset, buffer) + subtree:add_le(abb_buffer_id, buffer(offset,8)); offset = offset + 8 + subtree:add_le(abb_block_size, buffer(offset,4)); offset = offset + 4 + subtree:add_le(abb_buffer_driver_index, buffer(offset,4)); offset = offset + 4 + + return offset +end + +function read_relayed_message_inner_message(subtree, offset, buffer, pointer_value) + array_length = buffer(offset,4):le_uint() + data_length = buffer(offset+4,4):le_uint() + + local dataArrayTree = subtree:add(buffer(offset, array_length), "Data Array (pointer: " .. pointer_value .. ")") + + dataArrayHeaderTree = dataArrayTree:add(buffer(offset, 8), "Data Array Header") + offset = read_array_header(dataArrayHeaderTree, offset, buffer) + + local dataTree = dataArrayTree:add(buffer(offset, data_length), "IPCZ message to relay") + + local message_header_start_offset = offset + offset, message_name = read_ipcz_message_header(dataTree, offset, buffer, data_length) + local header_size = offset - message_header_start_offset + local messageDataTree = dataTree:add(buffer(offset, data_length - header_size), "Message Data Structure") + + -- TODO: move to read_struct_header function + -- TODO: is this really a structure header here that we should read? + messageDataTree:add_le(struct_size, buffer(offset, 4)); offset = offset + 4 + messageDataTree:add_le(struct_version, buffer(offset, 4)); offset = offset + 4 + + dataTree:append_text(" [" .. message_name .. "]") + + if message_name == "AcceptParcelDriverObjects" then + offset = read_accept_parcel_driver_object_message(messageDataTree, offset, buffer) + elseif message_name == "AddBlockBuffer" then + offset = read_add_block_buffer_message(messageDataTree, offset, buffer) + end + + return offset, message_name +end + +function read_DriverObjectArrayData( subtree, offset, buffer ) + subtree:add_le(first_object_index, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(num_index, buffer(offset, 4)); offset = offset + 4 + + return offset +end + +function read_fragment_descriptor(subtree, offset, buffer) + subtree:add_le(fragment_buffer_id, buffer(offset,8)); offset = offset + 8 + subtree:add_le(fragment_offset, buffer(offset,4)); offset = offset + 4 + subtree:add_le(fragment_size, buffer(offset,4)); offset = offset + 4 + + return offset +end + +function read_array_header( subtree, offset, buffer ) + subtree:add_le(array_size, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(array_numelements, buffer(offset, 4)); offset = offset + 4 + + return offset +end + + +function read_driver_object(subtree, offset, buffer) + subtree:add_le(driver_data_array, buffer(offset, 4)); local data_offset = buffer(offset, 4):le_uint(); offset = offset + 4 + subtree:add_le(first_driver_handle, buffer(offset, 2)); offset = offset + 2 + subtree:add_le(num_driver_handles, buffer(offset, 2)); offset = offset + 2 + + return offset, data_offset +end + + +function read_mojo_driver_object_data(subtree, offset, buffer, object_length) + -- + -- Transport::DeserializeObject + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/transport.cc;l=466;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1 + -- + local header_length = buffer(offset,4):le_uint() + + local headerTree = subtree:add(buffer(offset, header_length), "Driver Object Header") + + headerTree:add_le(driver_header_size, buffer(offset, 4)); offset = offset + 4 + local driverTypeTree = headerTree:add_le(driver_type, buffer(offset, 4)); local driver_type_value = buffer(offset, 4):le_uint(); offset = offset + 4 + headerTree:add_le(driver_num_handles, buffer(offset, 4)); local num_handles_value = buffer(offset, 4):le_uint(); offset = offset + 4 + local driverHandleOwnerTree = headerTree:add_le(driver_handle_owner, buffer(offset, 1)); local driver_handle_owner_value = buffer(offset, 1):le_uint(); offset = offset + 1 + headerTree:add(padding, buffer(offset, 3)); offset = offset + 3 + + driverTypeTree:append_text(" [" .. get_driver_object_type(driver_type_value) .. "]") + driverHandleOwnerTree:append_text(" [" .. get_driver_object_handle_owner(driver_handle_owner_value) .. "]") + + -- read handles list + local handle_size = 8 + local handle_index = 0 + while (handle_index < num_handles_value) do + local handle_value = buffer(offset, handle_size):le_uint64() + subtree:add(buffer(offset, handle_size), "Handle #" .. (handle_index+1) .. " Value: " .. handle_value); offset = offset + handle_size + handle_index = handle_index + 1 + end + local handles_area_size = handle_size * num_handles_value + + local driver_body_size = object_length - header_length - handles_area_size + local driver_object_type_name = get_driver_object_type(driver_type_value) + local driverObjectBodyTree = subtree:add(buffer(offset, driver_body_size), "Driver Object Body (" .. driver_object_type_name .. ")") + + -- Now read the driver object data according to its Type + if driver_type_value == 0 then + -- kTransport + offset = read_transport(driverObjectBodyTree, offset, buffer, driver_body_size) + elseif driver_type_value == 1 then + -- kSharedBuffer + offset = read_shared_buffer(driverObjectBodyTree, offset, buffer) + elseif driver_type_value == 3 then + -- kTransmissiblePlatformHandle + elseif driver_type_value == 4 then + -- kWrappedPlatformHandle + local wrapped_header_length_value = buffer(offset,4):le_uint() + local wrappedHandleTree = driverObjectBodyTree:add(buffer(offset, wrapped_header_length_value), "Wrapped Platform Handle Header") + wrappedHandleTree:add_le(wrapped_handle_size, buffer(offset, 4)); offset = offset + 4 + wrappedHandleTree:add_le(wrapped_handle_type, buffer(offset, 4)):append_text(" [kTransmissible]"); offset = offset + 4 -- should always be 0 on Windows + + + elseif driver_type_value == 5 then + -- DataPipe + offset = read_datapipe(driverObjectBodyTree, offset, buffer) + end + + return offset, num_handles_value, driver_object_type_name +end + +function read_datapipe(subtree, offset, buffer) + local header_length = buffer(offset,4):le_uint() + + local headerTree = subtree:add(buffer(offset, header_length), "Data Pipe Header") + + headerTree:add_le(data_pipe_header_size, buffer(offset, 4)); offset = offset + 4 + local endpointTypeTree = headerTree:add_le(data_pipe_endpoint_type, buffer(offset, 4)); + local endpoint_type_value = buffer(offset, 4):le_uint(); offset = offset + 4 + headerTree:add_le(data_pipe_element_size, buffer(offset, 4)); offset = offset + 4 + headerTree:add(data_pipe_padding, buffer(offset, 4)); offset = offset + 4 + local ringBufferTree = headerTree:add(data_pipe_ring_buffer_state, buffer(offset, 8)); + ringBufferTree:add_le(ring_buffer_offset, buffer(offset, 4)); offset = offset + 4 + ringBufferTree:add_le(ring_buffer_size, buffer(offset, 4)); offset = offset + 4 + + endpointTypeTree:append_text(" [" .. get_datapipe_endpoint_type(endpoint_type_value) .. "]") + + offset = read_shared_buffer(subtree, offset, buffer) + + return offset + +end + +function read_transport(subtree, offset, buffer, object_length) + local headerTree = subtree:add(buffer(offset, object_length), "Transport Header") + + local transportTypeTree = headerTree:add_le(transport_destination_type, buffer(offset, 4)); + local transport_type_value = buffer(offset, 4):le_uint(); offset = offset + 4 + headerTree:add_le(transport_is_same_remote_process, buffer(offset, 1)); offset = offset + 1 + headerTree:add_le(transport_is_peer_trusted, buffer(offset, 1)); offset = offset + 1 + headerTree:add_le(transport_is_trusted_by_peer, buffer(offset, 1)); offset = offset + 1 + headerTree:add(transport_padding, buffer(offset, 1)); offset = offset + 1 + + transportTypeTree:append_text(" [" .. get_transport_endpoint_type(transport_type_value) .. "]") + + return offset +end + +function read_shared_buffer(subtree, offset, buffer) + local shared_buffer_header_length = buffer(offset,4):le_uint() + local sharedBufferTree = subtree:add(buffer(offset, shared_buffer_header_length), "Shared Buffer Header") + sharedBufferTree:add_le(shared_buffer_header_size, buffer(offset, 4)); offset = offset + 4 + sharedBufferTree:add_le(shared_buffer_buffer_size, buffer(offset, 4)); offset = offset + 4 + local sharedBufferModeTree = sharedBufferTree:add_le(shared_buffer_buffer_mode, buffer(offset, 4)); + local shared_buffer_mode_value = buffer(offset, 4):le_uint(); offset = offset + 4 + sharedBufferTree:add(shared_buffer_padding, buffer(offset, 4)); offset = offset + 4 + sharedBufferTree:add_le(shared_buffer_guid, buffer(offset, 16)); offset = offset + 16 + + sharedBufferModeTree:append_text(" [" .. get_sharedbuffer_mode(shared_buffer_mode_value) .. "]") + + return offset +end + +function get_datapipe_endpoint_type(type_id) + -- + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/data_pipe.h;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=41 + -- + local handle_type = "Unknown" + + if type_id == 0 then handle_type = "kProducer" end + if type_id == 1 then handle_type = "kConsumer" end + + return handle_type +end + +function get_link_side(side_id) + -- + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/link_side.h;drc=2e268e0c5924e8b8cd2966e85d9e19a683913c91;bpv=1;bpt=1;l=19 + -- + local link_name = "Unknown" + + if side_id == 0 then link_name = "kA" end + if side_id == 1 then link_name = "kB" end + + return link_name +end + +function get_transport_endpoint_type(type_id) + -- + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/transport.h;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=34 + -- or + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_type.h;drc=2e268e0c5924e8b8cd2966e85d9e19a683913c91;bpv=1;bpt=1;l=15 + -- + local handle_type = "Unknown" + + if type_id == 0 then handle_type = "kBroker" end + if type_id == 1 then handle_type = "kNonBroker" end + + return handle_type +end + +function get_sharedbuffer_mode(type_id) + -- + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/shared_buffer.cc;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=22 + -- + local handle_type = "Unknown" + + if type_id == 0 then handle_type = "kReadOnly" end + if type_id == 1 then handle_type = "kWritable" end + if type_id == 2 then handle_type = "kUnsafe" end + + return handle_type +end + +function read_router_descriptor(subtree, offset, buffer, expected_size) + subtree:add_le(closed_peer_sequence_length, buffer(offset, 8)); offset = offset + 8 + subtree:add_le(new_sublink, buffer(offset, 8)); offset = offset + 8 + + local newFragmentTree = subtree:add(buffer(offset, 16), "New Link State Memory Fragment"); + local buffer_id_value = buffer(offset, 8):le_uint64(); + offset = read_fragment_descriptor(newFragmentTree, offset, buffer) + local is_memory_fragment_null = buffer_id_value > 100000000 -- actually should be == 0xffffffffffffffff + if is_memory_fragment_null then + newFragmentTree:append_text(" [NULL]") + end + + subtree:add_le(new_decaying_sublink, buffer(offset, 8)); offset = offset + 8 + subtree:add_le(next_outgoing_seqnum, buffer(offset, 8)); offset = offset + 8 + if expected_size == 112 then + -- pre june 2023 version + -- https://source.chromium.org/chromium/chromium/src/+/b4530aa7de95cf592269f2dcc1aeaef59c98d42a + subtree:add_le(num_bytes_produced, buffer(offset, 8)); offset = offset + 8 + end + subtree:add_le(next_incoming_sequence_number, buffer(offset, 8)); offset = offset + 8 + subtree:add_le(decaying_incoming_sequence_length, buffer(offset, 8)); offset = offset + 8 + if expected_size == 112 then + subtree:add_le(num_bytes_consumed, buffer(offset, 8)); offset = offset + 8 + end + + local flagsTree = subtree:add(router_flags, buffer(offset, 1)); + flagsTree:add_le(flag_peer_closed, buffer(offset, 1)) + flagsTree:add_le(flag_proxy_already_bypassed, buffer(offset, 1)) + offset = offset + 1 + + subtree:add(router_reserved, buffer(offset, 7)); offset = offset + 7 + local proxyPeerTree = subtree:add(proxy_peer_node_name, buffer(offset, 16)); + local proxy_peer_start_value = buffer(offset, 8):le_uint64(); offset = offset + 16 + local proxyPeerSublinkTree = subtree:add_le(proxy_peer_sublink, buffer(offset, 8)); + local proxy_peer_sublink_value = buffer(offset, 8):le_uint64(); offset = offset + 8 + + if proxy_peer_start_value < 100 then + proxyPeerTree:append_text(" [NULL]") + end + if proxy_peer_sublink_value < 100 then + proxyPeerSublinkTree:append_text(" [NULL]") + end + + return offset +end + + +function read_ipcz_message_header(subtree, offset, buffer, message_size) + local messageHeaderSubtree = subtree:add(buffer(offset, message_size), "Message Header") + messageHeaderSubtree:add_le(message_header_size, buffer(offset,1)); offset = offset + 1 + messageHeaderSubtree:add_le(version, buffer(offset,1)); offset = offset + 1 + local msg_id_tree = messageHeaderSubtree:add_le(message_id, buffer(offset,1)); local msg_id_value = buffer(offset,1):le_uint(); offset = offset + 1 + messageHeaderSubtree:add(reserved, buffer(offset,5)); offset = offset + 5 + messageHeaderSubtree:add_le(sequence_number, buffer(offset,8)); offset = offset + 8 + local driversPointersTree = messageHeaderSubtree:add_le(driver_object_data_array, buffer(offset,4)); local drivers_pointer = buffer(offset, 4):le_uint(); offset = offset + 4 + messageHeaderSubtree:add(reserved2, buffer(offset,4)); offset = offset + 4 + + local message_name = get_message_name(msg_id_value) + msg_id_tree:append_text(" [" .. message_name .. "]") + + if drivers_pointer == 0 then + driversPointersTree:append_text(" [NULL]") + end + + messageHeaderSubtree:set_len(_msg_header_size()()) + + return offset, message_name +end + +function get_handle_type(type_id) + -- + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/handle_type.h + -- + local handle_type = "Unknown" + + if type_id == 0 then handle_type = "kPortal" end + if type_id == 1 then handle_type = "kBoxedDriverObject" end + if type_id == 2 then handle_type = "kRelayedBoxedDriverObject" end + if type_id == 3 then handle_type = "kBoxedSubparcel" end + + return handle_type +end + +function get_driver_object_type(type_id) + -- + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/object.h;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1;l=31 + -- + local handle_type = "Unknown" + + if type_id == 0 then handle_type = "kTransport" end + if type_id == 1 then handle_type = "kSharedBuffer" end + if type_id == 2 then handle_type = "kSharedBufferMapping" end + if type_id == 3 then handle_type = "kTransmissiblePlatformHandle" end + if type_id == 4 then handle_type = "kWrappedPlatformHandle" end + if type_id == 5 then handle_type = "kDataPipe" end + if type_id == 6 then handle_type = "kMojoTrap" end + if type_id == 7 then handle_type = "kInvitation" end + + + return handle_type +end + +function get_driver_object_handle_owner(owner_id) + -- + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:mojo/core/ipcz_driver/transport.cc;l=58;drc=b18d59d36ac77ddf968b6e3452109e67471ee38f;bpv=1;bpt=1 + -- + local owner_type = "Unknown" + + if owner_id == 0 then owner_type = "kSender" end + if owner_id == 1 then owner_type = "kRecipient" end + + + return owner_type +end + + +function get_message_name(msg_id) + -- + -- https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:third_party/ipcz/src/ipcz/node_messages_generator.h + -- + + local msg_name = "Unknown" + + if msg_id == 0 then msg_name = "ConnectFromBrokerToNonBroker" end + if msg_id == 1 then msg_name = "ConnectFromNonBrokerToBroker" end + if msg_id == 2 then msg_name = "ReferNonBroker" end + if msg_id == 3 then msg_name = "ConnectToReferredBroker" end + if msg_id == 4 then msg_name = "ConnectToReferredNonBroker" end + if msg_id == 5 then msg_name = "NonBrokerReferralAccepted" end + if msg_id == 6 then msg_name = "NonBrokerReferralRejected" end + if msg_id == 7 then msg_name = "ConnectFromBrokerToBroker" end + if msg_id == 10 then msg_name = "RequestIntroduction" end + if msg_id == 11 then msg_name = "AcceptIntroduction" end + if msg_id == 12 then msg_name = "RejectIntroduction" end + if msg_id == 13 then msg_name = "RequestIndirectIntroduction" end + if msg_id == 14 then msg_name = "AddBlockBuffer" end + if msg_id == 20 then msg_name = "AcceptParcel" end + if msg_id == 21 then msg_name = "AcceptParcelDriverObjects" end + if msg_id == 22 then msg_name = "RouteClosed" end + if msg_id == 23 then msg_name = "RouteDisconnected" end + if msg_id == 30 then msg_name = "BypassPeer" end + if msg_id == 31 then msg_name = "AcceptBypassLink" end + if msg_id == 32 then msg_name = "StopProxying" end + if msg_id == 33 then msg_name = "ProxyWillStop" end + if msg_id == 34 then msg_name = "BypassPeerWithLink" end + if msg_id == 35 then msg_name = "StopProxyingToLocalPeer" end + if msg_id == 36 then msg_name = "FlushRouter" end + if msg_id == 64 then msg_name = "RequestMemory" end + if msg_id == 65 then msg_name = "ProvideMemory" end + if msg_id == 66 then msg_name = "RelayMessage" end + if msg_id == 67 then msg_name = "AcceptRelayedMessage" end + + return msg_name +end + diff --git a/dissectors/chromium-ipc/legacy_ipc.lua b/dissectors/chromium-ipc/legacy_ipc.lua new file mode 100644 index 0000000..76bca42 --- /dev/null +++ b/dissectors/chromium-ipc/legacy_ipc.lua @@ -0,0 +1,191 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/legacy_ipc.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +legacyipc_protocol = Proto("LEGACYIPC", "Legacy IPC Protocol") + +local common = require("helpers\\common") +local get_chrome_name = common.get_chrome_type_name + +local legacy_ipc_interface_json, err = io.open(common.script_path() .. "helpers\\legacy_ipc_interfaces.json", "rb"):read("*all") +local legacy_ipc_interfaces_info = common.json_to_table(legacy_ipc_interface_json) + +-- Header fields +-- https://source.chromium.org/chromium/chromium/src/+/master:ipc/ipc_message.h;l=248 +local payload_size = ProtoField.uint32 ("legacyipc.payload_size" , "Payload Size" , base.DEC) +local routing = ProtoField.uint32 ("legacyipc.routing" , "Destination View ID" , base.HEX) +local message_type = ProtoField.uint32 ("legacyipc.type" , "Message Type" , base.HEX) +local reference_number = ProtoField.uint32 ("legacyipc.refnum" , "Reference Number" , base.HEX) -- 10 bits of PID + 14 bit count +local pid = ProtoField.uint8("legacyipc.pid", "Process ID", base.DEC) +local count = ProtoField.uint32("legacyipc.count", "Count", base.DEC) +local flags = ProtoField.uint32 ("legacyipc.flags" , "Flags" , base.HEX) +local padding = ProtoField.new("Padding", "legacyipc.padding", ftypes.BYTES) + +-- Flags +-- https://source.chromium.org/chromium/chromium/src/+/master:ipc/ipc_message.h;l=49 +local flag_priority_mask = ProtoField.bool("legacyipc.haspriority", "PRIORITY_MASK", 8, {"This message has a priority in the low 2 bits", "This message has no priority info"}, 0x3) +local flag_sync = ProtoField.bool("legacyipc.issync", "SYNC_BIT", 8, {"This is a syncronous message", "This is an asyncronous message"}, 0x4) +local flag_replay = ProtoField.bool("legacyipc.isreplay", "REPLAY_BIT", 8, {"This is a replay", "This is NOT a replay"}, 0x8) +local flag_replay_error = ProtoField.bool("legacyipc.isreplayerror", "REPLAY_ERROR_BIT", 8, {"This is a replay error", "This is NOT a replay error"}, 0x10) +local flag_unlock = ProtoField.bool("legacyipc.isunlock", "UNBLOCK_BIT", 8, {"This is an unlock", "This is NOT an unlock"}, 0x20) +local flag_pumping_msgs = ProtoField.bool("legacyipc.ispumping", "PUMPING_MSGS_BIT", 8, {"This is pumping messages", "This is NOT pumping messages"}, 0x40) +local flag_has_sent_time = ProtoField.bool("legacyipc.hastime", "HAS_SENT_TIME_BIT", 8, {"This message has a sent time", "This message does not have a sent time"}, 0x80) + +-- Message type +-- https://source.chromium.org/chromium/chromium/src/+/master:ipc/ipc_message_macros.h;l=304 +local message_id_class = ProtoField.uint16("legacyipc.messageclass", "Message ID Class", base.DEC) +local message_id_line = ProtoField.uint16("legacyipc.line", "Message ID Line Number", base.DEC) + +local link_field = ProtoField.new("Definition Link", "legacyipc.definitionlink", ftypes.STRING) + +local payload = ProtoField.new("Payload", "legacyipc.payload", ftypes.BYTES) + + +legacyipc_protocol.fields = { + payload_size, routing, message_type, message_id_class, message_id_line, reference_number, pid, count, flags, payload, padding, -- Header + flag_priority_mask, flag_sync, flag_replay, flag_replay_error, flag_unlock, flag_pumping_msgs, flag_has_sent_time, -- Flags + link_field +} + +local _payloadsize = Field.new("legacyipc.payload_size") +local _routing = Field.new("legacyipc.routing") +local _messagetype = Field.new("legacyipc.type") +local _flags = Field.new("legacyipc.flags") +local _haspriority = Field.new("legacyipc.haspriority") +local _refnum = Field.new("legacyipc.refnum") + +local _messageclass = Field.new("legacyipc.messageclass") + + +function legacyipc_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = legacyipc_protocol.name + + local subtree = tree:add(legacyipc_protocol, buffer(), "Legacy IPC Protocol") + + -- Header + local offset = 0 + + subtree:add_le(payload_size, buffer(offset,4)); offset = offset + 4 + routingTree = subtree:add_le(routing, buffer(offset,4)); offset = offset + 4 + typeTree = subtree:add_le(message_type, buffer(offset,4)); + + typeTree:add_le(message_id_line, buffer(offset, 2)); offset = offset + 2 + typeTree:add_le(message_id_class, buffer(offset, 2)):append_text(" (" .. get_message_class_name(_messageclass()()) .. ")"); offset = offset + 2 + + controlFlagsTree = subtree:add_le(buffer(offset,4), "Control Flags"); + + flagsTree = controlFlagsTree:add_le(flags, buffer(offset, 1)); + priorityTree = flagsTree:add_le(flag_priority_mask, buffer(offset, 1)) + flagsTree:add_le(flag_sync, buffer(offset, 1)) + flagsTree:add_le(flag_replay, buffer(offset, 1)) + flagsTree:add_le(flag_replay_error, buffer(offset, 1)) + flagsTree:add_le(flag_unlock, buffer(offset, 1)) + flagsTree:add_le(flag_pumping_msgs, buffer(offset, 1)) + flagsTree:add_le(flag_has_sent_time, buffer(offset, 1)) offset = offset + 1 + + if _haspriority()() then + local priority_value = bit32.band(_flags()(), 0x2) + priorityTree:append_text(string.format(" (%s)", get_priority_name(priority_value))) + end + + refNumTree = controlFlagsTree:add_le(reference_number, buffer(offset, 3)); + refNumTree:add_le(pid, buffer(offset, 1), bit32.arshift(_refnum()(), 14)); + refNumTree:add_le(count, buffer(offset, 3), bit32.band(_refnum()(), 0x3fff)); offset = offset + 3 + + subtree:add(payload, buffer(offset, _payloadsize()())); offset = offset + _payloadsize()() + + local special_routing = get_special_routing(_routing()()) + local special_type = get_special_type(_messagetype()()) + + if special_routing ~= "" then + routingTree:append_text(string.format(" (%s)", special_routing)) + end + if special_type ~= "" then + typeTree:append_text(string.format(" (%s)", special_type)) + end + + subtree:append_text(string.format(", Routing: 0x%x, Type: 0x%x", _routing()(), _messagetype()())) + + -- Try to resolve the message name + local message_name = nil + local defintion_link = nil + local message_info = legacy_ipc_interfaces_info[string.format("%X", _messagetype()())] + if message_info ~= nil then + message_name = message_info["name"] + defintion_link = message_info["link"] + + typeTree:append_text(" [" .. message_name .. "]") + subtree:add(link_field, defintion_link):set_text("[" .. defintion_link .. "]") + end + + if offset % 8 ~= 0 then + local missingSize = 8 - offset % 8 + subtree:add(padding, buffer(offset, missingSize)); offset = offset + missingSize + end + + if get_special_type(_messagetype()()) == "IPC_REPLY_ID" then + pinfo.cols.info = tostring(pinfo.cols.info) .. " Legacy IPC: Replay Message" + elseif message_name ~= nil then + pinfo.cols.info = tostring(pinfo.cols.info) .. " Legacy IPC: Message " .. message_name + else + pinfo.cols.info = tostring(pinfo.cols.info) .. " Legacy IPC: Message " .. string.format("0x%x", _messagetype()()) + end + +end + +function get_special_routing(routing) + -- https://source.chromium.org/chromium/chromium/src/+/master:ipc/ipc_message.h;l=301 + local opcode_name = "" + + if routing == 0x7fffffff then opcode_name = "MSG_ROUTING_CONTROL" end + if routing == 0xfffffffe then opcode_name = "MSG_ROUTING_NONE" end + + return opcode_name +end + +function get_special_type(type) + -- https://source.chromium.org/chromium/chromium/src/+/master:ipc/ipc_message.h;l=309 + local opcode_name = "" + + if type == 0xFFFFFFF0 then opcode_name = "IPC_REPLY_ID" end + if type == 0xFFFFFFF1 then opcode_name = "IPC_LOGGING_ID" end + + return opcode_name +end + +function get_priority_name(priority) + -- https://source.chromium.org/chromium/chromium/src/+/master:ipc/ipc_message.h;l=40 + local opcode_name = "unknown" + + if priority == 1 then opcode_name = "PRIORITY_LOW" end + if priority == 2 then opcode_name = "PRIORITY_NORMAL" end + if priority == 3 then opcode_name = "PRIORITY_HIGH" end + + return opcode_name +end + +function get_message_class_name(class) + -- https://source.chromium.org/chromium/chromium/src/+/master:ipc/ipc_message_start.h;l=14 + local opcode_name = "Unknown" + + if class == 0 then opcode_name = "AutomationMsgStart" end + if class == 1 then opcode_name = "TestMsgStart" end + if class == 2 then opcode_name = "WorkerMsgStart" end + if class == 3 then opcode_name = "NaClMsgStart" end + if class == 4 then opcode_name = "PpapiMsgStart" end + if class == 5 then opcode_name = "ExtensionMsgStart" end + if class == 6 then opcode_name = "ChromotingMsgStart" end + if class == 7 then opcode_name = "NaClHostMsgStart" end + if class == 8 then opcode_name = "EncryptedMediaMsgStart" end + if class == 9 then opcode_name = "GinJavaBridgeMsgStart" end + if class == 10 then opcode_name = "GuestViewMsgStart" end + if class == 11 then opcode_name = "ExtensionWorkerMsgStart" end + + return opcode_name +end + + + diff --git a/dissectors/chromium-ipc/mojo_core.lua b/dissectors/chromium-ipc/mojo_core.lua new file mode 100644 index 0000000..e98f1d5 --- /dev/null +++ b/dissectors/chromium-ipc/mojo_core.lua @@ -0,0 +1,703 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/mojo_core.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +mojocore_protocol = Proto("mojo", "Mojo Core") + +local common = require("helpers\\common") + +-- Channel Header fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/channel.h;l=95 +local num_bytes = ProtoField.uint32 ("mojo.numbytes" , "Message Length" , base.DEC) +local num_header_bytes = ProtoField.uint16 ("mojo.numheaderbytes", "Generic Message Header Length" , base.DEC) +local message_type = ProtoField.uint16 ("mojo.type", "Message Type" , base.DEC) +local num_handles = ProtoField.uint16 ("mojo.numhandles", "Handles Count" , base.DEC) +local padding = ProtoField.new("Padding", "mojo.padding", ftypes.BYTES) +local platform_handle = ProtoField.uint32 ("mojo.platformhandle", "Platform Handle" , base.DEC) + +-- Normal Header fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=48 +local normal_header_type = ProtoField.uint32 ("mojo.messagetype" , "Normal Message Type" , base.DEC) +local normal_header_padding = ProtoField.new("Padding", "mojo.normalpadding", ftypes.BYTES) + +-- Event Header fields +-- https://source.chromium.org/chromium/chromium/src/+/main:mojo/core/ports/event.cc;l=24 +-- NodeController::OnEventMessage -> ports::Event::Deserialize +local event_type = ProtoField.uint32("mojo.event.type", "Event Type", base.DEC) +local event_padding = ProtoField.new("Padding", "mojo.event.padding", ftypes.BYTES) +local event_port_name = ProtoField.new("Destination Port Name", "mojo.event.port", ftypes.BYTES) +local event_src_port_name = ProtoField.new("Source Port Name", "mojo.event.src_port", ftypes.BYTES) +local event_seqnum = ProtoField.uint64("mojo.event.seqnum", "Control Sequence Number" , base.HEX) + +-- User Message Event Data fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/ports/event.cc;l=30 +local usermessage_seq_num = ProtoField.uint64 ("mojo.um.seqnum" , "Sequence Number" , base.HEX) +local usermessage_num_ports = ProtoField.uint32 ("mojo.um.numports" , "Ports Count" , base.DEC) +local usermessage_padding = ProtoField.new("Padding", "mojo.um.padding", ftypes.BYTES) + +-- Observe Proxy Event Data fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/ports/event.cc;l=36 +local observe_proxy_node_name = ProtoField.new("Proxy Node Name", "mojo.proxy.node", ftypes.BYTES) +local observe_proxy_port_name = ProtoField.new("Proxy Port Name", "mojo.proxy.port", ftypes.BYTES) +local observe_proxy_target_node_name = ProtoField.new("Proxy Target Node Name", "mojo.proxy.targetnode", ftypes.BYTES) +local observe_proxy_target_port_name = ProtoField.new("Proxy Target Port Name", "mojo.proxy.targetport", ftypes.BYTES) + +-- Observe Clousure Event Data fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/ports/event.cc;l=47 +local observe_closure_last_sequence_number = ProtoField.int64 ("mojo.closure.seqnum" , "Last Sequence Number" , base.DEC) + +-- Observe Proxy Ack Event Data fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/ports/event.cc;l=43 +local observe_proxy_ack_last_sequence_number = ProtoField.int64 ("mojo.proxyack.seqnum" , "Last Sequence Number" , base.DEC) + +-- Merge Port Event Data fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/ports/event.cc;l=51 +local merge_port_new_port_name = ProtoField.new("New Port Name", "mojo.mergeport.port", ftypes.BYTES) +local merge_port_new_port_descriptor = ProtoField.new("New Port Descriptor", "mojo.mergeport.portdescriptor", ftypes.BYTES) + +-- Relay Event Message fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=123 +local destination_node = ProtoField.new("Destination Node", "mojo.relay.dst", ftypes.BYTES) +local relay_message_payload = ProtoField.new("Relayed Event Message Payload", "mojo.relay.payload", ftypes.BYTES) + +-- Message From Replay fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=128 +local source_node = ProtoField.new("Source Node", "mojo.relayed.source", ftypes.BYTES) +local relayed_message_payload = ProtoField.new("Relayed Event Message Payload", "mojo.relayed.payload", ftypes.BYTES) + +-- Request Introduction fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=111 +local intruduction_node = ProtoField.new("Node Name", "mojo.introduction.node", ftypes.BYTES) + +-- Add Broker Client fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=73 +local add_broker_client_name = ProtoField.new("Client Node Name", "mojo.addclient.client", ftypes.BYTES) + +-- Accept Broker Client fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=95 +local accept_broker_client_broker = ProtoField.new("Broker Node Name", "mojo.acceptclient.broker", ftypes.BYTES) + +-- Accept Invitation fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=61 +local accept_invitation_token = ProtoField.new("Token", "mojo.acceptinvitation.token", ftypes.BYTES) +local accept_invitation_name = ProtoField.new("Invitee Node Name", "mojo.acceptinvitation.invitee_name", ftypes.BYTES) + +-- Accept Invitee fields +local inviter_name = ProtoField.new("Inviter Node Name", "mojo.invitee.inivtername", ftypes.BYTES) +local token = ProtoField.new("Token Node Name", "mojo.invitee.token", ftypes.BYTES) + +-- Request Port Merge fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=101 +local request_port_merge_connector = ProtoField.new("Connector Port Name", "mojo.portmerge.connector", ftypes.BYTES) +local request_port_merge_token = ProtoField.new("Token String", "mojo.portmerge.token", ftypes.BYTES) + +-- Update Previous Peer Fields +-- https://source.chromium.org/chromium/chromium/src/+/main:mojo/core/ports/event.cc;l=68 +local update_prev_peer_node = ProtoField.new("New Node Name", "mojo.updatepeer.node", ftypes.BYTES) +local update_prev_peer_port = ProtoField.new("New Port Name", "mojo.updatepeer.port", ftypes.BYTES) + + +-- Broker Message fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/broker_messages.h + +-- INIT +local broker_pipe_name_length = ProtoField.uint32 ("mojo.pipenamelen" , "Pipe Name Length" , base.DEC) +-- BUFFER_REQUEST +local broker_bufffer_size = ProtoField.uint32 ("mojo.broker_buffersize" , "Buffer Size" , base.DEC) +-- BUFFER_RESPONSE +local broker_guid = ProtoField.new("GUID", "mojo.broker_guid", ftypes.GUID) + +-- +-- User Message fields +-- + +-- User Message Header fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/user_message_impl.cc;l=47 +local usermessage_num_dispatchers = ProtoField.uint32 ("mojo.um.numdispatchers" , "Dispatchers Count" , base.DEC) +local usermessage_header_size = ProtoField.uint32 ("mojo.um.headersize" , "Header Size" , base.DEC) + +local usermessage_dispatchers_headers = ProtoField.new ("Dispatchers Headers", "mojo.um.dispatchersheaders" , ftypes.BYTES) +local usermessage_dispatchers_descriptors = ProtoField.new ("Dispatchers Descriptors", "mojo.um.dispatchersdescriptors" , ftypes.BYTES) + +-- Port Descriptor fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/ports/event.h;l=69 +local peer_node_name = ProtoField.new("Peer Node Name", "mojo.port.peernode", ftypes.BYTES) +local peer_port_name = ProtoField.new("Peer Port Name", "mojo.port.peerport", ftypes.BYTES) +local referring_node_name = ProtoField.new("Referring Node Name", "mojo.port.refnodename", ftypes.BYTES) +local referring_port_name = ProtoField.new("Referring Port Name", "mojo.port.refportname", ftypes.BYTES) +local next_sequence_num_to_send = ProtoField.int64 ("mojo.port.nextseqnum1" , "Next Sequence Number To Send" , base.DEC) +local next_sequence_num_to_recv = ProtoField.int64 ("mojo.port.nextseqnum2" , "Next Sequence Number To Receive" , base.DEC) +local last_sequence_num_to_recv = ProtoField.int64 ("mojo.port.lastseqnum" , "Last Sequence Number To Receive" , base.DEC) +local peer_closed = ProtoField.uint8 ("mojo.port.perrclosed" , "Peer Closed" , base.DEC) +local port_padding = ProtoField.new("Padding", "mojo.port.padding", ftypes.BYTES) +local port_name = ProtoField.new("Port Name", "mojo.port.portname", ftypes.BYTES) + +-- Dispatcher Header fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/user_message_impl.cc;l=57 +local dispatcher_type = ProtoField.int32 ("mojo.dispatcher.type" , "Dispatcher Type" , base.DEC) +local dispatcher_num_bytes = ProtoField.uint32 ("mojo.dispatcher.numbytes" , "Serialized Dispatcher Size" , base.DEC) +local dispatcher_num_ports = ProtoField.uint32 ("mojo.dispatcher.numports" , "Ports Count" , base.DEC) +local dispatcher_num_handles = ProtoField.uint32 ("mojo.dispatcher.numhandles" , "Platform Handles Count" , base.DEC) + +-- Message Pipe Dispatcher fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/message_pipe_dispatcher.cc;l=28 +local pipe_id = ProtoField.uint64 ("mojo.pipe.id" , "Pipe ID" , base.HEX) +local pipe_endpoint = ProtoField.uint8 ("mojo.pipe.endpoint" , "Endpoint" , base.DEC) +local pipe_padding = ProtoField.new("Padding", "mojo.pipe.padding", ftypes.BYTES) + +-- Data Pipe Consumer Dispatcher fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/data_pipe_consumer_dispatcher.cc;l=34 +local datapipe_struct_size = ProtoField.uint32 ("mojo.datapipe.options_size" , "Options Struct Size" , base.DEC) +local datapipe_create_flags = ProtoField.uint32 ("mojo.datapipe.createflags" , "Create Flags" , base.HEX) +local datapipe_element_size = ProtoField.uint32 ("mojo.datapipe.elementsize" , "Element Size" , base.DEC) +local datapipe_capacity = ProtoField.uint32 ("mojo.datapipe.capacity" , "Capacity (in bytes)" , base.DEC) +local datapipe_pipe_id = ProtoField.uint64 ("mojo.datapipe.id" , "Pipe ID" , base.HEX) +local datapipe_read_offset = ProtoField.uint32 ("mojo.datapipe.readoffset" , "Read Offset" , base.DEC) +local datapipe_bytes_available = ProtoField.uint32 ("mojo.datapipe.bytesavailable" , "Bytes Available" , base.DEC) +local datapipe_flags = ProtoField.uint8 ("mojo.datapipe.flags" , "Flags" , base.HEX) +local datapipe_buffer_guid = ProtoField.new("Buffer GUID", "mojo.datapipe.guid", ftypes.GUID) +local datapipe_padding = ProtoField.new("Padding", "mojo.datapipe.padding", ftypes.BYTES) + +-- Shared Buffer Dispatcher Fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/shared_buffer_dispatcher.cc;l=31 +local sharedbuffer_num_bytes = ProtoField.uint64 ("mojo.sharedbuffer.numbytes" , "Bytes Count" , base.DEC) +local sharedbuffer_acess_mode = ProtoField.uint32 ("mojo.sharedbuffer.accessmode" , "Access Mode" , base.HEX) +local sharedbuffer_guid = ProtoField.new("GUID", "mojo.sharedbuffer.guid", ftypes.GUID) +local sharedbuffer_padding = ProtoField.new("Padding", "mojo.sharedbuffer.padding", ftypes.BYTES) + + +local dispatcher_descriptor = ProtoField.new("Dispatcher Data", "mojo.dispatcher_descriptor", ftypes.BYTES) + +local data = ProtoField.new("Data", "mojo.payload", ftypes.BYTES) + +-- From other layers +local source_pid_type = ProtoField.int32 ("npfs.sourcetype" , "Source Process Type" , base.DEC) +local dest_pid_type = ProtoField.int32 ("npfs.desttype" , "Destination Process Type" , base.DEC) + + +mojocore_protocol.fields = { + source_pid_type, dest_pid_type, -- (From NPFS) + num_bytes, num_header_bytes, message_type, num_handles, padding, platform_handle, -- Channel Header + normal_header_type, normal_header_padding, -- Normal Header + broker_pipe_name_length, broker_bufffer_size, broker_guid, -- Broker Messages fields + event_type, event_padding, event_port_name, event_src_port_name, event_seqnum, -- Event Header + usermessage_seq_num, usermessage_num_ports, usermessage_padding, -- User Message Event Data + observe_proxy_node_name, observe_proxy_port_name, observe_proxy_target_node_name, observe_proxy_target_port_name, -- Observe Proxy Event Data + observe_closure_last_sequence_number, -- Observe Closure Event Data + observe_proxy_ack_last_sequence_number, -- Observe Proxy Ack Event Data + merge_port_new_port_name, merge_port_new_port_descriptor, -- Merge Port Event Data + usermessage_num_dispatchers, usermessage_header_size, usermessage_dispatchers_headers, usermessage_dispatchers_descriptors, -- User Message Header + peer_node_name, peer_port_name, referring_node_name, referring_port_name, next_sequence_num_to_send, -- Port Descriptor + next_sequence_num_to_recv, last_sequence_num_to_recv, peer_closed, port_padding, port_name, -- Port Descriptor (Contd.) + dispatcher_type, dispatcher_num_bytes, dispatcher_num_ports, dispatcher_num_handles, -- Dispatcher Header + pipe_id, pipe_endpoint, pipe_padding, -- Message Pipe Descriptor + datapipe_pipe_id, datapipe_read_offset, datapipe_bytes_available, -- Data Pipe Consumer Descriptor + datapipe_flags, datapipe_buffer_guid, datapipe_padding, datapipe_struct_size, datapipe_create_flags, -- Data Pipe Consumer Descriptor (Contd.) + datapipe_element_size, datapipe_capacity, -- Data Pipe Consumer Descriptor (Contd.) + sharedbuffer_num_bytes, sharedbuffer_acess_mode, sharedbuffer_guid, sharedbuffer_padding, -- Shared Buffer Descriptor + dispatcher_descriptor, -- Unknown Dispatcher Descriptor + intruduction_node, -- Request Intoduction + inviter_name, token, -- Accept Invitee + accept_invitation_token, accept_invitation_name, -- Accept Invitation + add_broker_client_name, -- Add Broker Client + accept_broker_client_broker, -- Accept Broker Client + destination_node, relay_message_payload, -- Replay Message + source_node, relayed_message_payload, -- Relayed Message + request_port_merge_connector, request_port_merge_token, -- Request Port Merge + update_prev_peer_node, update_prev_peer_port, -- Update Previous Peer + data, -- Unparsed Data +} + +-- Channel Header fields +local _numbytes = Field.new("mojo.numbytes") +local _numheaderbytes = Field.new("mojo.numheaderbytes") +local _numhandles = Field.new("mojo.numhandles") +local _type = Field.new("mojo.type") + +-- Normal Header fields +local _messagetype = Field.new("mojo.messagetype") + +-- Event Header fields +local _eventtype = Field.new("mojo.event.type") +local _eventport = Field.new("mojo.event.port") + +-- Observe Proxy fields +local _proxyport = Field.new("mojo.proxy.port") +local _targetport = Field.new("mojo.proxy.targetport") + +-- User Message Event fields +local _um_num_dispatchers = Field.new("mojo.um.numdispatchers") +local _um_num_ports = Field.new("mojo.um.numports") + +-- User Message Header fields +local _um_headersize = Field.new("mojo.um.headersize") + +-- Dispatcher Header fields +local _dispatcher_type = Field.new("mojo.dispatcher.type") +local _dispatcher_numbytes = Field.new("mojo.dispatcher.numbytes") + +-- Fields from other layers +local _sourcetype = Field.new("npfs.sourcetype") +local _desttype = Field.new("npfs.desttype") + +function mojocore_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = mojocore_protocol.name + + local subtree = tree:add(mojocore_protocol, buffer(), "Mojo Core Channel Message") + local headerSubtree = subtree:add("Generic Message Header") + + -- Generic Header + local offset = 0 + headerSubtree:add_le(num_bytes, buffer(offset,4)); offset = offset + 4 + headerSubtree:add_le(num_header_bytes, buffer(offset,2)); offset = offset + 2 + headerSubtree:add_le(message_type, buffer(offset,2)):append_text(" (" .. get_message_type(_type()()) .. ")"); offset = offset + 2 + headerSubtree:add_le(num_handles, buffer(offset,2)); offset = offset + 2 + headerSubtree:add_le(padding, buffer(offset,6)); offset = offset + 6 + + local extraHeaderSize = _numheaderbytes()() - 16 + if _numhandles()() > 0 then + local handlesSubtree = headerSubtree:add(buffer(offset, _numhandles()() * 4), "Platform Handles") + for i=1, _numhandles()() do + handle_node_text = "Windows Handle " .. i .. ": " .. buffer(offset, 4):le_uint() + handlesSubtree:add_le(platform_handle, buffer(offset, 4)):set_text(handle_node_text); offset = offset + 4 + end + + if extraHeaderSize > _numhandles()() * 4 then + local paddingSize = extraHeaderSize - _numhandles()() * 4 + handlesSubtree:add_le(padding, buffer(offset, paddingSize)); offset = offset + paddingSize + handlesSubtree:set_len(_numhandles()() * 4 + paddingSize) + end + end + + headerSubtree:set_len(_numheaderbytes()()) + + headerSubtree:append_text(", Type: " .. get_message_type(_type()()) .. ", Handles Count: " .. _numhandles()()) + + if _type()() == 1 then + -- Normal Header + + local normalSubtree = subtree:add(buffer(offset, 8), "Normal Message Header") + local normal_message_offset = offset + + headerTypeTree = normalSubtree:add_le(normal_header_type, buffer(offset,4)) offset = offset + 4 + normalSubtree:add_le(padding, buffer(offset,4)); offset = offset + 4 + + local message_type_string = get_normal_message_type(_messagetype()()) + + if _messagetype()() == 5 then + -- Event + + -- Event::Deserialize + -- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/ports/event.cc;l=104 + + local eventSubtree = subtree:add(buffer(offset), "Event") + local eventStartOffset = offset + + eventSubtree:add_le(event_type, buffer(offset,4)) :append_text(" (" .. get_event_type(_eventtype()()) .. ")"); offset = offset + 4 + eventSubtree:add_le(event_padding, buffer(offset,4)); offset = offset + 4 + eventSubtree:add_le(event_port_name, buffer(offset,16)); offset = offset + 16 + eventSubtree:add_le(event_src_port_name, buffer(offset,16)); offset = offset + 16 + eventSubtree:add_le(event_seqnum, buffer(offset,8)); offset = offset + 8 + + port_name_string = to_128bit_hex_string(buffer(offset-16 , 16)) + eventSubtree:append_text(", Type: " .. get_event_type(_eventtype()()) .. ", Port Name: " .. port_name_string) + subtree:append_text(", Event Type: " .. get_event_type(_eventtype()())) + subtree:append_text(" to port " .. string.lower(tostring(_eventport()()))) + + local eventDataSubstree = eventSubtree:add(buffer(offset), "Event Data") + local eventDataStartOffset = offset + + if _eventtype()() == 0 then + -- User Message + + eventDataSubstree:append_text(" (User Message)") + eventDataSubstree:add_le(usermessage_seq_num, buffer(offset,8)); offset = offset + 8 + eventDataSubstree:add_le(usermessage_num_ports, buffer(offset,4)); offset = offset + 4 + eventDataSubstree:add_le(usermessage_padding, buffer(offset,4)); offset = offset + 4 + + for i=1, _um_num_ports()() do + local portSubtree = eventDataSubstree:add(buffer(offset), "Port " .. i .. " Descriptor") + offset = read_port_descriptor(buffer(offset), portSubtree) + offset + end + for i=1, _um_num_ports()() do + port_name_tree_text = "Port " .. i .. " Name: " .. to_128bit_hex_string(buffer(offset, 16)) + eventDataSubstree:add_le(port_name, buffer(offset, 16)):set_text(port_name_tree_text); offset = offset + 16 + end + + local usermessageSubtree = eventDataSubstree:add(buffer(offset), "Serialized Mojo Dispatchers (User Message Header)") + usermessageSubtree:add_le(usermessage_num_dispatchers, buffer(offset,4)); offset = offset + 4 + usermessageSubtree:add_le(usermessage_header_size, buffer(offset,4)); offset = offset + 4 + + -- UserMessageImpl::ExtractSerializedHandles + dispatchers_types = {} + dispatchers_sizes = {} + for i=1, _um_num_dispatchers()() do + local dispatcherSubtree = usermessageSubtree:add(buffer(offset), "Dispatcher " .. i .. " Header") + dispatchers_types[i], dispatchers_sizes[i], size = read_dispatcher_header(buffer(offset), dispatcherSubtree) + offset = offset + size + end + for i=1, _um_num_dispatchers()() do + -- Dispatcher::Deserialize + if dispatchers_types[i] ~= -1 then + local dispatcherSubtree = usermessageSubtree:add(buffer(offset), "Serialized Dispatcher " .. i) + read_dispatcher_descriptor(buffer(offset), dispatcherSubtree, dispatchers_types[i], dispatchers_sizes[i]) + offset = offset + dispatchers_sizes[i] + end + end + + usermessageSubtree:set_len(_um_headersize()()) + + subtree:set_len(offset) + + -- Now call the next layer + local next_value = buffer(offset, 4):le_uint() + if next_value == 1 or next_value == 0 then + -- looks like a mojo data pipe control message + Dissector.get("mojodata"):call(buffer(offset):tvb(), pinfo, tree) + else + -- this is most likely a mojo message pipe with binded message + Dissector.get("mojouser"):call(buffer(offset):tvb(), pinfo, tree) + end + + elseif _eventtype()() == 2 then + -- Observe Proxy + + eventDataSubstree:append_text(" (Observe Proxy)") + + eventDataSubstree:add_le(observe_proxy_node_name, buffer(offset,16)); offset = offset + 16 + eventDataSubstree:add_le(observe_proxy_port_name, buffer(offset,16)); offset = offset + 16 + eventDataSubstree:add_le(observe_proxy_target_node_name, buffer(offset,16)); offset = offset + 16 + eventDataSubstree:add_le(observe_proxy_target_port_name, buffer(offset,16)); offset = offset + 16 + + local source_port = string.lower(string.sub(tostring(_proxyport()()), 0, 16)) .. ".." + local target_port = string.lower(string.sub(tostring(_targetport()()), 0, 16)) .. ".." + pinfo.cols.info = tostring(pinfo.cols.info) .. " Observe Proxying Port: " .. source_port .. " -> " .. target_port + + elseif _eventtype()() == 4 then + -- Observe Closure + + eventDataSubstree:append_text(" (Observe Closure)") + pinfo.cols.info = tostring(pinfo.cols.info) .. " Observe Port Closure: " .. string.lower(string.sub(tostring(_eventport()()), 0, 16)) .. "..." + + eventDataSubstree:add_le(observe_closure_last_sequence_number, buffer(offset,8)); offset = offset + 8 + elseif _eventtype()() == 3 then + -- Observe Proxy Ack + + eventDataSubstree:append_text(" (Observe Proxy Acknowledgement)") + pinfo.cols.info = tostring(pinfo.cols.info) .. " Observe Proxy Acknowledgement" + + eventDataSubstree:add_le(observe_proxy_ack_last_sequence_number, buffer(offset,8)); offset = offset + 8 + + elseif _eventtype()() == 5 then + -- Merge Port + + eventDataSubstree:append_text(" (Merge Port Request)") + pinfo.cols.info = tostring(pinfo.cols.info) .. " Merge Port Request" + + eventDataSubstree:add_le(merge_port_new_port_name, buffer(offset,16)); offset = offset + 16 + local portSubtree = eventDataSubstree:add(buffer(offset), "New Port Descriptor ") + offset = read_port_descriptor(buffer(offset), portSubtree) + offset + + elseif _eventtype()() == 8 then + -- Update Previous Peer + + eventDataSubstree:append_text(" (Update Previous Peer)") + pinfo.cols.info = tostring(pinfo.cols.info) .. " Update Previous Peer" + + eventDataSubstree:add_le(update_prev_peer_node, buffer(offset,16)); offset = offset + 16 + eventDataSubstree:add_le(update_prev_peer_port, buffer(offset,16)); offset = offset + 16 + + + elseif offset == _numbytes()() then + eventDataSubstree:append_text(" (Empty)") + end + + eventDataSubstree:set_len(offset - eventDataStartOffset) + eventSubtree:set_len(offset - eventStartOffset) + + if _eventtype()() == 6 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " User Message Read Acknowledgment Request" + elseif _eventtype()() == 1 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " Port Accepted" + elseif _eventtype()() == 7 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " User Message Read Acknowledgment" + end + + -- pinfo.cols.info = tostring(pinfo.cols.info) .. ", Port " .. port_name_string + elseif _messagetype()() == 0 and offset + 32 == length then + -- ACCEPT_INVITEE + local acceptInviteeSubtree = subtree:add(buffer(offset), "Accept Invitee") + + acceptInviteeSubtree:add(inviter_name, buffer(offset, 16)); offset = offset + 16 + acceptInviteeSubtree:add(token, buffer(offset, 16)); offset = offset + 16 + elseif _messagetype()() == 0 then + -- probably BrokerMessageHeader's INIT + message_type_string = get_broker_message_type(_messagetype()()) + + local initSubtree = subtree:add(buffer(offset), "Broker Message (INIT)") + initSubtree:add(broker_pipe_name_length, buffer(offset, 4)); offset = offset + 4 + elseif _messagetype()() == 1 and offset + 32 == length then + -- ACCEPT_INVITATION + local acceptInvitationSubtree = subtree:add(buffer(offset), "Accept Invitation") + + acceptInvitationSubtree:add(accept_invitation_token, buffer(offset, 16)); offset = offset + 16 + acceptInvitationSubtree:add(accept_invitation_name, buffer(offset, 16)); offset = offset + 16 + elseif _messagetype()() == 1 then + -- looks like BrokerMessageHeader's BUFFER_REQUEST + + message_type_string = get_broker_message_type(_messagetype()()) + + local bufferRequestSubtree = subtree:add(buffer(offset), "Broker Message (BUFFER_REQUEST)") + bufferRequestSubtree:add(broker_bufffer_size, buffer(offset, 4)); offset = offset + 4 + elseif _messagetype()() == 2 and _numhandles()() ~= 1 then + -- ADD_BROKER_CLIENT + -- NOTE: this can also be BUFFER_RESPONSE in rare cases + local addClientSubtree = subtree:add(buffer(offset), "Add Broker Client") + + addClientSubtree:add(add_broker_client_name, buffer(offset, 16)); offset = offset + 16 + elseif _messagetype()() == 2 then + -- looks like BrokerMessageHeader's BUFFER_RESPONSE + + message_type_string = get_broker_message_type(_messagetype()()) + + local bufferResponseSubtree = subtree:add(buffer(offset), "Broker Message (BUFFER_RESPONSE)") + bufferResponseSubtree:add(broker_guid, buffer(offset, 16)); offset = offset + 16 + elseif _messagetype()() == 4 then + -- ACCEPT_BROKER_CLIENT + local acceptClientSubtree = subtree:add(buffer(offset), "Accept Broker Client") + + acceptClientSubtree:add(accept_broker_client_broker, buffer(offset, 16)); offset = offset + 16 + elseif _messagetype()() == 6 then + -- REQUEST_PORT_MERGE + local portMergeSubtree = subtree:add(buffer(offset), "Request Port Merge") + + portMergeSubtree:add(request_port_merge_connector, buffer(offset, 16)); offset = offset + 16 + portMergeSubtree:add(request_port_merge_token, buffer(offset)) offset = length + elseif _messagetype()() == 7 then + -- REQUEST_INTRODUCTION + local introductionSubtree = subtree:add(buffer(offset), "Request Introduction") + + introductionSubtree:add(intruduction_node, buffer(offset, 16)); offset = offset + 16 + elseif _messagetype()() == 8 then + -- INTRODUCE + local introductionSubtree = subtree:add(buffer(offset), "Introduce") + + introductionSubtree:add(intruduction_node, buffer(offset, 16)); offset = offset + 16 + elseif _messagetype()() == 9 then + -- RELAY_EVENT_MESSAGE + -- TOOD: we can parse the wrapped EVENT_MESSAGE here too + local relayMessageSubtree = subtree:add(buffer(offset), "Relay Event Message") + + relayMessageSubtree:add(destination_node, buffer(offset, 16)); offset = offset + 16 + relayMessageSubtree:add(relay_message_payload, buffer(offset)); + elseif _messagetype()() == 11 then + -- EVENT_MESSAGE_FROM_RELAY + -- TOOD: we can parse the wrapped EVENT_MESSAGE here too + local relayedMessageSubtree = subtree:add(buffer(offset), "Message From Relay") + + relayedMessageSubtree:add(source_node, buffer(offset, 16)); offset = offset + 16 + relayedMessageSubtree:add(relayed_message_payload, buffer(offset)); + else + local payloadSubtree = subtree:add(buffer(offset), "Payload") + payloadSubtree:add_le(data, buffer(offset)) + end + + headerTypeTree:append_text(" (" .. message_type_string .. ")"); + + normalSubtree:append_text(", Type: " .. message_type_string) + subtree:append_text(", Type: " .. message_type_string) + subtree:append_text(", Handles Count: " .. _numhandles()()) + + if _messagetype()() ~= 5 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " Message " .. message_type_string + end + + if _numhandles()() > 0 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " [+" .. _numhandles()() .. " Native Handles]" + end + end + + -- tree:append_text(", Src PID: " .. _sourcepid()() .. ", Dst PID: " .. _dstpid()()) + +end + + +function read_dispatcher_descriptor(buffer, subtree, dispatcher_type, descriptor_size) + local offset = 0 + + subtree:append_text(" (" .. get_dispatcher_type(dispatcher_type) .. ")") + + if dispatcher_type == 1 then + -- MESSAGE_PIPE + pipe_id_value = buffer(offset, 8) + + subtree:add(pipe_id, buffer(offset,8)); offset = offset + 8 + subtree:add_le(pipe_endpoint, buffer(offset,1)); offset = offset + 1 + subtree:add(pipe_padding, buffer(offset,7)); offset = offset + 7 + + subtree:append_text(", Pipe ID: " .. to_64bit_hex_string(pipe_id_value)) + elseif dispatcher_type == 3 then + -- DATA_PIPE_CONSUMER + pipe_id_value = buffer(offset+16, 8) + + local optionsSubtree = subtree:add(buffer(offset, 16), "Create Data Pipe Options"); + optionsSubtree:add_le(datapipe_struct_size, buffer(offset, 4)); offset = offset + 4 + optionsSubtree:add(datapipe_flags, buffer(offset, 4)); offset = offset + 4 + optionsSubtree:add_le(datapipe_element_size, buffer(offset, 4)); offset = offset + 4 + optionsSubtree:add_le(datapipe_capacity, buffer(offset, 4)); offset = offset + 4 + + subtree:add(datapipe_pipe_id, buffer(offset, 8)); offset = offset + 8 + subtree:add_le(datapipe_read_offset, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(datapipe_bytes_available, buffer(offset, 4)); offset = offset + 4 + subtree:add(datapipe_flags, buffer(offset, 1)); offset = offset + 1 + subtree:add(datapipe_buffer_guid, buffer(offset, 16)); offset = offset + 16 + subtree:add(datapipe_padding, buffer(offset, 7)); offset = offset + 7 + + subtree:append_text(", Pipe ID: " .. to_64bit_hex_string(pipe_id_value)) + elseif dispatcher_type == 4 then + -- SHARED_BUFFER + + subtree:add_le(sharedbuffer_num_bytes, buffer(offset, 8)); offset = offset + 8 + subtree:add(sharedbuffer_acess_mode, buffer(offset, 4)); offset = offset + 4 + subtree:add(sharedbuffer_guid, buffer(offset, 16)); offset = offset + 16 + subtree:add(sharedbuffer_padding, buffer(offset, 4)); offset = offset + 4 + + else + subtree:add(dispatcher_descriptor, buffer(offset, descriptor_size)); offset = offset + descriptor_size + end + + subtree:set_len(descriptor_size) + + return offset +end + +function get_message_type(type) + -- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/channel.h;l=63 + local opcode_name = "Unknown" + + if type == 0 then + opcode_name = "NORMAL_LEGACY" + end + if type == 1 then + opcode_name = "NORMAL" + end + + return opcode_name +end + +function get_normal_message_type(type) + -- + -- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/node_channel.cc;l=27 + -- NodeChannel::OnChannelMessage + -- + + local opcode_name = "Unknown" + + if type == 0 then opcode_name = "ACCEPT_INVITEE" end + if type == 1 then opcode_name = "ACCEPT_INVITATION" end + if type == 2 then opcode_name = "ADD_BROKER_CLIENT" end + if type == 3 then opcode_name = "BROKER_CLIENT_ADDED" end + if type == 4 then opcode_name = "ACCEPT_BROKER_CLIENT" end + if type == 5 then opcode_name = "EVENT_MESSAGE" end + if type == 6 then opcode_name = "REQUEST_PORT_MERGE" end + if type == 7 then opcode_name = "REQUEST_INTRODUCTION" end + if type == 8 then opcode_name = "INTRODUCE" end + if type == 9 then opcode_name = "RELAY_EVENT_MESSAGE" end + if type == 10 then opcode_name = "BROADCAST_EVENT" end + if type == 11 then opcode_name = "EVENT_MESSAGE_FROM_RELAY" end + if type == 12 then opcode_name = "ACCEPT_PEER" end + + return opcode_name +end + +function get_broker_message_type(type) + local opcode_name = "Unknown" + + if type == 0 then opcode_name = "INIT" end + if type == 1 then opcode_name = "BUFFER_REQUEST" end + if type == 2 then opcode_name = "BUFFER_RESPONSE" end + return opcode_name +end +function get_event_type(type) + -- + -- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/ports/event.h;l=30 + -- + + local opcode_name = "Unknown" + + if type == 0 then opcode_name = "kUserMessage" end + if type == 1 then opcode_name = "kPortAccepted" end + if type == 2 then opcode_name = "kObserveProxy" end + if type == 3 then opcode_name = "kObserveProxyAck" end + if type == 4 then opcode_name = "kObserveClosure" end + if type == 5 then opcode_name = "kMergePort" end + if type == 6 then opcode_name = "kUserMessageReadAckRequest" end + if type == 7 then opcode_name = "kUserMessageReadAck" end + if type == 8 then opcode_name = "kUpdatePreviousPeer" end + + return opcode_name +end + +function get_dispatcher_type(type) + local type_name = "Unknown" + + if type == 0 then type_name = "UNKNOWN" end + if type == 1 then type_name = "MESSAGE_PIPE" end + if type == 2 then type_name = "DATA_PIPE_PRODUCER" end + if type == 3 then type_name = "DATA_PIPE_CONSUMER" end + if type == 4 then type_name = "SHARED_BUFFER" end + if type == 5 then type_name = "WATCHER" end + if type == 6 then type_name = "INVITATION" end + if type == -1 then type_name = "PLATFORM_HANDLE" end + + return type_name +end + +function read_port_descriptor(buffer, subtree) + local offset = 0 + subtree:add_le(peer_node_name, buffer(offset,16)); offset = offset + 16 + subtree:add_le(peer_port_name, buffer(offset,16)); offset = offset + 16 + subtree:add_le(referring_node_name, buffer(offset,16)); offset = offset + 16 + subtree:add_le(referring_port_name, buffer(offset,16)); offset = offset + 16 + subtree:add_le(next_sequence_num_to_send, buffer(offset,8)); offset = offset + 8 + subtree:add_le(next_sequence_num_to_recv, buffer(offset,8)); offset = offset + 8 + subtree:add_le(last_sequence_num_to_recv, buffer(offset,8)); offset = offset + 8 + subtree:add_le(peer_closed, buffer(offset,1)); offset = offset + 1 + subtree:add_le(port_padding, buffer(offset,7)); offset = offset + 7 + + subtree:set_len(offset) + + return offset +end + +function read_dispatcher_header(buffer, subtree) + local offset = 0 + dispatcher_type_value = buffer(offset, 4):le_int() + descriptor_size = buffer(offset + 4, 4):le_uint() + + subtree:add_le(dispatcher_type, buffer(offset,4)):append_text(" (" .. get_dispatcher_type(dispatcher_type_value) .. ")"); offset = offset + 4 + subtree:add_le(dispatcher_num_bytes, buffer(offset,4)); offset = offset + 4 + subtree:add_le(dispatcher_num_ports, buffer(offset,4)); offset = offset + 4 + subtree:add_le(dispatcher_num_handles, buffer(offset,4)); offset = offset + 4 + + subtree:set_len(offset) + subtree:append_text(", Type: " .. get_dispatcher_type(dispatcher_type_value)) + + return dispatcher_type_value, descriptor_size, offset +end + +function to_128bit_hex_string(buffer) + str = string.format('%x%x%x%x', buffer(0, 4):uint(), buffer(4, 4):uint(), + buffer(8, 4):uint(), buffer(12, 4):uint()) + + return str +end + +function to_64bit_hex_string(buffer) + str = string.format('%x%x', buffer(0, 4):uint(), buffer(4, 4):uint()) + + return str +end \ No newline at end of file diff --git a/dissectors/chromium-ipc/mojo_data_pipe.lua b/dissectors/chromium-ipc/mojo_data_pipe.lua new file mode 100644 index 0000000..70f375d --- /dev/null +++ b/dissectors/chromium-ipc/mojo_data_pipe.lua @@ -0,0 +1,51 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/mojo_data_pipe.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +mojodata_protocol = Proto("MOJODATA", "Mojo Data Pipe Control") + +-- Header fields +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/core/data_pipe_control_message.cc;l=14 +-- https://source.chromium.org/chromium/chromium/src/+/main:mojo/core/data_pipe_control_message.h;l=27 +local command = ProtoField.int32 ("mojodata.command" , "Control Command" , base.DEC) +local num_bytes = ProtoField.int32 ("mojodata.num_bytes" , "Number Of Bytes Passed" , base.DEC) + +mojodata_protocol.fields = { + command, num_bytes -- Hidden Fields +} + +local _command = Field.new("mojodata.command") +local _numbytes = Field.new("mojodata.num_bytes") + +function mojodata_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = mojodata_protocol.name + + local subtree = tree:add(mojodata_protocol, buffer(), "Mojo Data Pipe Control Message") + + -- Header + local offset = 0 + command_value = buffer(offset,4):le_uint() + subtree:add_le(command, buffer(offset,4)):append_text(" (" .. get_code_name(command_value) .. ")"); offset = offset + 4 + subtree:add_le(num_bytes, buffer(offset,4)); offset = offset + 4 + + subtree:append_text(", Command: " .. get_code_name(command_value) ..", Bytes Count: " .. _numbytes()()) + + if command_value == 0 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " Wrote " .. _numbytes()() .. " bytes to data pipe" + elseif command_value == 1 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " Read " .. _numbytes()() .. " bytes from data pipe" + end + +end + +function get_code_name(opcode) + local opcode_name = "Unknown" + + if opcode == 0 then opcode_name = "DATA_WAS_WRITTEN" end + if opcode == 1 then opcode_name = "DATA_WAS_READ" end + + return opcode_name +end diff --git a/dissectors/chromium-ipc/mojo_user.lua b/dissectors/chromium-ipc/mojo_user.lua new file mode 100644 index 0000000..5a86021 --- /dev/null +++ b/dissectors/chromium-ipc/mojo_user.lua @@ -0,0 +1,901 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/mojo_user.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +mojo_protocol = Proto("MojoUser", "Mojo C++ Binded Message") + +local common = require("helpers\\common") +local mojo_interfaces_map = require("helpers\\mojo_interfaces_map") + +local mojo_interface_json, err = io.open(common.script_path() .. "helpers\\mojo_interfaces.json", "rb"):read("*all") +local mojo_interfaces_info = common.json_to_table(mojo_interface_json) + +-- Mojo Message fields +-- https://docs.google.com/document/d/13pv9cFh5YKuBggDBQ1-AL8VReF-IYpFOFpRfvWFrwio/edit + +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/cpp/bindings/lib/bindings_internal.h;l=96 +local num_bytes = ProtoField.uint32 ("mojouser.numbytes" , "Header Length" , base.DEC) +local version = ProtoField.uint32 ("mojouser.version" , "Header Protocol Version" , base.DEC) + +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/cpp/bindings/lib/message_internal.h;l=28 +local interface_id = ProtoField.uint32 ("mojouser.interfaceid" , "Interface ID" , base.HEX) +local name = ProtoField.uint32 ("mojouser.name" , "Message Name (Method)" , base.HEX) +local flags = ProtoField.uint32 ("mojouser.flags" , "Flags" , base.HEX) +local trace_nonce = ProtoField.uint32 ("mojouser.tracenonce" , "Trace Nonce" , base.HEX) +local request_id = ProtoField.uint64 ("mojouser.requestid" , "Request ID" , base.HEX) +local payload_pointer = ProtoField.uint64 ("mojouser.payloadpointer" , "Payload (pointer)" , base.DEC) +local payload_interface_ids_pointer = ProtoField.uint64 ("mojouser.payloadinterfaceids" , "Payload Interface IDs (pointer)" , base.DEC) +local creation_timeticks_us = ProtoField.uint64 ("mojouser.creationtimeticks" , "Creation Timeticks (us units)" , base.HEX) +local serialized_data_struct_header = ProtoField.new("Struct Header", "mojouser.structheader", ftypes.BYTES) +local method_parameters = ProtoField.new("Nested Struct/Array Parameter", "mojouser.parameters", ftypes.BYTES) +local arguments_values = ProtoField.new("Arguments Values", "mojouser.argumentsvalues", ftypes.BYTES) + +-- Flags +local flag_expects_response = ProtoField.bool("mojouser.expectsresponse", "Expects response", 32, {"This message expects a response", "This message does not expect a response"}, 0x1) +local flag_is_reponse = ProtoField.bool("mojouser.isresponse", "Is response", 32, {"This is a response", "This is a request"}, 0x2) +local flag_is_sync = ProtoField.bool("mojouser.issync", "Is sync", 32, {"This is a blocking call", "This is an async call"}, 0x4) + +local request_in_frame_ = ProtoField.framenum("mojouser.request_in", "Request In Frame", base.NONE, frametype.REQUEST) +local response_in_frame_ = ProtoField.framenum("mojouser.response_in", "Response In Frame", base.NONE, frametype.RESPONSE) + +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/cpp/bindings/interface_id.h;l=20 +local flag_namespace_bit = ProtoField.bool("mojouser.namespace", "Namespace bit", 32, {"This ID was generated by the client-side of the master interface", "This ID was generated by the server-side of the master interface"}, 0x80000000) + +-- Structs / Arrays packing +local struct_num_bytes = ProtoField.uint32 ("mojouser.struct_numbytes" , "Struct Length" , base.DEC) +local struct_version = ProtoField.uint32 ("mojouser.struct_version" , "Struct Version" , base.DEC) +local struct_fields = ProtoField.new("Fields", "mojouser.struct_fields", ftypes.BYTES) +-- https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/cpp/bindings/lib/bindings_internal.h;l=103; +local array_num_bytes = ProtoField.uint32 ("mojouser.array_numbytes" , "Array Length" , base.DEC) +local array_elements_count = ProtoField.uint32 ("mojouser.array_elements_count" , "Elements Count" , base.DEC) + +-- From other layers +local source_pid_type = ProtoField.int32 ("npfs.sourcetype" , "Source Process Type" , base.DEC) +local dest_pid_type = ProtoField.int32 ("npfs.desttype" , "Destination Process Type" , base.DEC) + +-- Extra Fields +local definition_field = ProtoField.new("Definition", "mojouser.definition", ftypes.STRING) +local link_field = ProtoField.new("Definition Link", "mojouser.definitionlink", ftypes.STRING) +local method = ProtoField.new("Mathod Name", "mojouser.method", ftypes.STRING) + +-- +-- Expert Info +-- +local expert_info_legacyipc = ProtoExpert.new("mojouser.legacyipc", "Legacy IPC", expert.group.COMMENTS_GROUP, expert.severity.NOTE) +local expert_info_unresolved_interface = ProtoExpert.new("mojouser.unresolved_interface", "This method ID could not be resolved", expert.group.COMMENTS_GROUP, expert.severity.WARN) + + +-- Prefrences +mojo_protocol.prefs.enable_deep_inspection = Pref.bool( "Enable structs deep dissection", false, "Enable dissection of nested struct/array fields (slow!)" ) + +mojo_protocol.fields = { + source_pid_type, dest_pid_type, + num_bytes, version, + interface_id, name, flags, trace_nonce, request_id, payload_pointer, payload_interface_ids_pointer, creation_timeticks_us, request_in_frame_, response_in_frame_, + serialized_data_struct_header, method_parameters, arguments_values, struct_num_bytes, struct_version, struct_fields, array_num_bytes, array_elements_count, + flag_expects_response, flag_is_reponse, flag_is_sync, flag_namespace_bit, + definition_field, link_field, legacy_ipc_field, method, -- Meta fields +} + +mojo_protocol.experts = {expert_info_legacyipc, expert_info_unresolved_interface} + +-- Binded Message fields +local _numbytes = Field.new("mojouser.numbytes") +local _version = Field.new("mojouser.version") +local _interfaceid = Field.new("mojouser.interfaceid") +local _method_name = Field.new("mojouser.name") +local _request_id = Field.new("mojouser.requestid") +local _trace_nonce = Field.new("mojouser.tracenonce") +local _struct_num_bytes = Field.new("mojouser.struct_numbytes") +local _struct_version = Field.new("mojouser.struct_version") + +-- Flags fields +local _expects_response = Field.new("mojouser.expectsresponse") +local _is_response = Field.new("mojouser.isresponse") +local _is_sync = Field.new("mojouser.issync") + +-- Fields from other layers +local _sourcetype = Field.new("npfs.sourcetype") +local _desttype = Field.new("npfs.desttype") + +local msg_trace_ids_to_info = {} + +function mojo_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = mojo_protocol.name + + local subtree = tree:add(mojo_protocol, buffer(), "Mojo C++ Binded Message") + + -- Header + local offset = 0 + structHeaderTree = subtree:add(buffer(offset), "Message Header") + structHeaderTree:add_le(num_bytes, buffer(offset,4)); offset = offset + 4 + structHeaderTree:add_le(version, buffer(offset,4)); offset = offset + 4 + + structHeaderTree:set_len(_numbytes()()) + + interfaceIdTree = structHeaderTree:add(interface_id, buffer(offset,4)); + interfaceIdTree:add_le(flag_namespace_bit, buffer(offset, 4)) offset = offset + 4 + name_subtree = structHeaderTree:add_le(name, buffer(offset,4)); offset = offset + 4 + + if _interfaceid()() == 0x00000000 then + interfaceIdTree:append_text(" (Master Interface)") + end + + -- Flags + local flagsSubtree = structHeaderTree:add(flags, buffer(offset, 4)) + flagsSubtree:add_le(flag_expects_response, buffer(offset, 4)) + flagsSubtree:add_le(flag_is_reponse, buffer(offset, 4)) + flagsSubtree:add_le(flag_is_sync, buffer(offset, 4)) + flagsSubtree:set_len(4) offset = offset + 4 + structHeaderTree:add_le(trace_nonce, buffer(offset,4)); offset = offset + 4 + if _version()() >= 1 then + structHeaderTree:add_le(request_id, buffer(offset,8)); offset = offset + 8 + + add_request_response_fields(pinfo, structHeaderTree) + + end + if _version()() >= 2 then + local payload_pointer_value = buffer(offset, 8):le_int64():tonumber() + structHeaderTree:add_le(payload_pointer, buffer(offset,8)):set_text("Payload (pointer): +" .. payload_pointer_value); offset = offset + 8 + local interface_ids_pointer_value = buffer(offset, 8):le_int64():tonumber() + structHeaderTree:add_le(payload_interface_ids_pointer, buffer(offset,8)):set_text("Payload Interface IDs (pointer): +" .. interface_ids_pointer_value); offset = offset + 8 + end + if _version()() >= 3 then + structHeaderTree:add_le(creation_timeticks_us, buffer(offset,8)); offset = offset + 8 + end + + dataSubtree = subtree:add(buffer(offset), "Serialized Arguments (Payload)") + + -- Try to associate the name field with an actual interface name + local method_name_key = "n" .. string.format("%x", _method_name()()) + local method_name = mojo_interfaces_map[method_name_key] + local short_method_name = method_name + local interface_resolved = false + local definition = "" + + if method_name ~= nil then + -- Method name resolved + + interface_info = mojo_interfaces_info[method_name] + + if interface_info ~= nil then + definition = interface_info["definition"] + link = interface_info["link"] + interface_resolved = true + + dataSubtree:add(definition_field, definition):set_text("[" .. definition .. "]") + dataSubtree:add(link_field, link):set_text("[" .. link .. "]") + + if _is_response()() then + arrow_location = definition:find("=>") -- note that the method definition may not contain '=>' in case we got the method hash wrong + definition = definition:sub((arrow_location)) + end + + dataSubtree:add(method, method_name):set_hidden() + end + else + -- Can't resolve method name + + method_name = string.format("0x%x", _method_name()()) + short_method_name = method_name + end + + -- try to shorten the method name for display + local module_path = "" + if method_name:find('%.') then + + local separator_index = method_name:sub(1, method_name:match('.*()%.') - 1):match(".*()%.") + if separator_index ~= nil then + short_method_name = method_name:sub(separator_index + 1) + module_path = method_name:sub(1, separator_index - 1) + end + + -- is it a special message without a containing interface? + if method_name:find("interface_control") then + module_path = "mojo.interface_control" + end + end + + -- + -- Deserialize Mojo's archive format as much as feasible + -- https://docs.google.com/document/d/1jNcsxOdO3Al52s6lIrMOOgY7KXB7TJ8wGGWstAHiTd8 + -- + + -- Read the arguments struct. + local structs_layout_map = {} + parametersSubtree = dataSubtree:add(buffer(offset), "Main Arguments Struct") + parametersSubtree:add_le(struct_num_bytes, buffer(offset, 4)); offset = offset + 4 + parametersSubtree:add_le(struct_version, buffer(offset, 4)); offset = offset + 4 + if _struct_num_bytes()() > 8 then + local fields_size = _struct_num_bytes()() - 8 + local fields = parametersSubtree:add(arguments_values, buffer(offset, fields_size)); + + if interface_resolved then + structs_layout_map = read_struct_fields(fields, offset, buffer(offset), module_path, definition, _struct_num_bytes()(), true) + end + + offset = offset + fields_size + end + parametersSubtree:set_len(_struct_num_bytes()()) + + -- Read the nested structures/arrays + local unknown_fields_offset = 0 + local nestedParamsTree = dataSubtree:add(buffer(offset), "Nested structures and arrays") + while (offset < length and length - offset > 4) do + + local struct_header_length = buffer(offset, 4):le_uint() + local struct_version_or_array_length = buffer(offset + 4, 4):le_uint() + + if struct_header_length <= 0 then break end + if struct_header_length >= buffer:len() then break end + + -- align struct length to 8 + if struct_header_length % 8 ~= 0 then struct_header_length = struct_header_length + (8 - struct_header_length % 8) end + + struct_tree = nestedParamsTree:add(method_parameters, buffer(offset, struct_header_length)); + + local fields_data = buffer(offset + 8, struct_header_length - 8) + + structs_layout_map_2 = {} + if structs_layout_map[offset] ~= nil then + -- we know what the definition of this field is. + + local field_definition = structs_layout_map[offset] + local field_type = common.split(field_definition, " ")[1] + local field_name = common.split(field_definition, " ")[2] + + struct_tree:set_text(field_type .. " " .. field_name) + + if field_type == "string" or common.startswith(field_type, "array<") then + -- this is an array + local num_elements = buffer(offset+4, 4):le_uint() + + struct_tree:add_le(array_num_bytes, buffer(offset, 4)); offset = offset + 4 + struct_tree:add_le(array_elements_count, buffer(offset, 4)); offset = offset + 4 + fields_tree = struct_tree:add(fields_data, "Array Elements"); + + structs_layout_map_2 = read_array_memebers(fields_tree, offset, buffer(offset), module_path, field_definition, num_elements) + else + -- this is a struct + + struct_tree:add_le(struct_num_bytes, buffer(offset, 4)); offset = offset + 4 + struct_tree:add_le(struct_version, buffer(offset, 4)); offset = offset + 4 + fields_tree = struct_tree:add(fields_data, "Struct Fields"); + + structs_layout_map_2 = read_struct_fields(fields_tree, offset, buffer(offset), module_path, field_definition, struct_header_length) + end + + structs_layout_map = common.merge_tables(structs_layout_map, structs_layout_map_2); + else + -- this could be either a struct or an array + -- let's do best effort + local num_elements_or_version = buffer(offset+4, 4):le_uint() + if num_elements_or_version > 4 then + -- looks like an array\string + local num_elements = buffer(offset+4, 4):le_uint() + + struct_tree:add_le(array_num_bytes, buffer(offset, 4)); offset = offset + 4 + struct_tree:add_le(array_elements_count, buffer(offset, 4)); offset = offset + 4 + fields_tree = struct_tree:add(fields_data, "Array Elements"); + + fields_tree:set_text("Text: " .. truncate_text(buffer(offset, num_elements):string()) .. "") + + else + -- assume it's a struct + struct_tree:add_le(struct_num_bytes, buffer(offset, 4)); offset = offset + 4 + struct_tree:add_le(struct_version, buffer(offset, 4)); offset = offset + 4 + struct_tree:add(struct_fields, fields_data); + end + + if unknown_fields_offset == 0 then unknown_fields_offset = offset end + end + + offset = offset + struct_header_length - 8 + + end + if offset < length then + dataSubtree:add(method_parameters, buffer(offset)); + end + + -- + -- Preety-print the information + -- + + name_subtree:append_text(" [" .. method_name .. "]") + subtree:append_text(", Interface ID: " .. string.format("0x%x", _interfaceid()()) .. ", Name: " .. string.format("0x%x", _method_name()()) .. " [" .. short_method_name .. "]") + + if _is_response()() then + -- this is a reseponse + pinfo.cols.info = tostring(pinfo.cols.info) .. " Response to " .. short_method_name + else + -- this is a request + + if method_name == "IPC.mojom.Channel.Receive" then + -- legacy IPC + dataSubtree:add_proto_expert_info(expert_info_legacyipc) + Dissector.get("legacyipc"):call(buffer(unknown_fields_offset):tvb(), pinfo, tree) + return + end + + pinfo.cols.info = tostring(pinfo.cols.info) .. " Method " .. short_method_name + + if interface_resolved then + -- some parenthesis cosmetics + if string.sub(common.split(definition, "(")[2], 1, 1) ~= ")" then + pinfo.cols.info = tostring(pinfo.cols.info) .. "(...)" + else + pinfo.cols.info = tostring(pinfo.cols.info) .. "()" + end + end + end + + if not interface_resolved then + -- pinfo.cols.info = tostring(pinfo.cols.info) .. " [Unresolved Interface]" + subtree:add_proto_expert_info(expert_info_unresolved_interface ) + end + +end + +function add_request_response_fields(pinfo, header_tree) + local msg_trace_id = tostring(concat_u32_to_u64(_method_name()(), _trace_nonce()())) + if msg_trace_ids_to_info[msg_trace_id] == nil then + -- initialize the info about the message if needed + msg_trace_ids_to_info[msg_trace_id] = {} + msg_trace_ids_to_info[msg_trace_id].req_ids = {} + msg_trace_ids_to_info[msg_trace_id].req_ids[tostring(_request_id()())] = {} + end + + local req_res_info = msg_trace_ids_to_info[msg_trace_id].req_ids[tostring(_request_id()())] + + if _expects_response()() and not _is_response()() then + -- save the request, get the response + req_res_info.req_frame_num = pinfo.number + + local res_frame_number = req_res_info.res_frame_num + if res_frame_number ~= nil then + header_tree:add_le(response_in_frame_, res_frame_number):set_generated(true); + end + elseif _is_response()() then + -- save the response, get the request + req_res_info.res_frame_num = pinfo.number + + local req_frame_number = req_res_info.req_frame_num + if req_frame_number ~= nil then + header_tree:add_le(request_in_frame_, req_frame_number):set_generated(true); + end + end +end + +function read_struct_fields(tree, initial_offset, buffer, module_path, struct_field_definition, struct_size, is_method) + + local offset = 0 + local structs_layout_map = {} + + local struct_definition = "" + local struct_field_type = "" + local struct_field_name = "" + + if not is_method then + -- this is a regular struct + + struct_field_type = common.split(struct_field_definition, " ")[1] + struct_field_name = common.split(struct_field_definition, " ")[2] + + struct_info = get_struct_info(struct_field_type, module_path) + if struct_info ~= nil then + struct_definition = struct_info["definition"] + local struct_link = struct_info["link"] + + tree:add(link_field, struct_link):set_text("[" .. struct_link .. "]") + else + return structs_layout_map + end + + if not mojo_protocol.prefs.enable_deep_inspection then + -- don't really read the struct, just show the bytes + + if struct_size - 8 > 0 then + tree:append_text(": " .. truncate_text(buffer(offset, struct_size - 8):bytes():tohex())) + end + + return structs_layout_map + end + else + -- this is a method arguments struct + + struct_definition = struct_field_definition + end + + local field_definitions = reorder_fields(fields_from_struct_definition(struct_definition), module_path) + local fields_count = #field_definitions + + -- iterate the fields in this struct + local context = {} + for i, definition in ipairs(field_definitions) do + local field_type = common.split(definition, " ")[1] + local field_name = common.split(definition, " ")[2] + + if struct_field_name ~= "" then + field_name = struct_field_name .. "." .. field_name + end + + local next_field_type = i + 1 <= fields_count and common.split(field_definitions[i+1], " ")[1] or nil + + if struct_field_type:find("%.") then + -- the default module path of a field is the module path of the parent struct + module_path = struct_field_type:sub(1, common.find_last(struct_field_type, "%.") - 1) + end + + local field_offset = initial_offset + offset + field_size, referenced_type_offset, referenced_type_definition = read_field(tree, field_offset, buffer(offset), module_path, + field_type, field_name, next_field_type, context) + offset = offset + field_size + + if referenced_type_definition ~= "" then + -- we read a pointer, so update the map + structs_layout_map[referenced_type_offset] = referenced_type_definition + end + + if offset >= struct_size then return structs_layout_map end + end + + return structs_layout_map +end + +function read_array_memebers(tree, initial_offset, buffer, module_path, array_definition, num_elements) + + local offset = 0 + local structs_layout_map = {} + + local field_type = common.split(array_definition, " ")[1] + local field_name = common.split(array_definition, " ")[2] + + if field_type == "string" and num_elements > 0 then + tree:set_text("Text: " .. truncate_text(buffer(offset, num_elements):string()) .. "") + return structs_layout_map + end + + -- this is an array of some other type + + local element_type = field_type:sub(7, common.endswith(field_type, "?") and -3 or -2) + local type_size, type_alignment, is_pointer, is_basic_type = get_mojom_type_info(element_type, module_path) + + if element_type == "uint8" and num_elements > 0 then + -- this looks like a buffer + + tree:set_text("Buffer: " .. truncate_text(buffer(offset, num_elements):bytes():tohex()) .. "") + return structs_layout_map + end + + local array_size = num_elements * type_size + + tree:set_len(array_size) + + if not mojo_protocol.prefs.enable_deep_inspection then + -- don't really read the array, just show the bytes + + if array_size > 0 then + tree:append_text(": " .. truncate_text(buffer(offset, array_size):bytes():tohex())) + end + return structs_layout_map + end + + local context = {} + for i=1, num_elements do + local element_field_name = field_name .. "[" .. (i-1) .. "]" + local element_definition = element_type .. " " .. element_field_name + local next_field_type = element_type + + local field_offset = initial_offset + offset + field_size, referenced_type_offset, referenced_type_definition = read_field(tree, field_offset, buffer(offset), module_path, + element_type, element_field_name, next_field_type, context) + offset = offset + field_size + + if referenced_type_definition ~= "" then + -- we read a pointer, so update the map + structs_layout_map[referenced_type_offset] = referenced_type_definition + end + end + + return structs_layout_map +end + +function read_field(tree, initial_offset, buffer, module_path, field_type, field_name, next_field_type, context) + + local offset = 0 + local bool_bit = context["bool_bit"]; if bool_bit == nil then bool_bit = 0 end + local referenced_type_offset = 0 + local referenced_type_definition = "" + + local type_size, type_alignment, is_pointer, is_basic_type = get_mojom_type_info(field_type, module_path) + local missing_padding = (type_alignment - (initial_offset % type_alignment)) % type_alignment + + -- skip some missing papdding if needed + if type_size ~= 0 then + offset = missing_padding + end + + -- TODO: show unions data & enums if needed + -- TODO #2: handle maps (e.g in UkmRecorderInterface.AddEntry / OnBeginFrame) + + if is_pointer then + -- this is a pointer to a struct, array, map, string, etc. + + local pointer_value = buffer(offset, 8):le_int64():tonumber() + local struct_offset = tonumber(tostring(initial_offset + offset + pointer_value)) + local full_field_type = is_basic_type and field_type or fully_qualified_name(field_type, module_path) + + referenced_type_offset = struct_offset + referenced_type_definition = full_field_type .. " " .. field_name + + fieldTree = tree:add_le(buffer(offset, 8), field_type .. " " .. field_name .. " (pointer):"); offset = offset + 8 + + if common.endswith(field_type, "?") and pointer_value == 0 then + fieldTree:append_text(" NULL") + else + fieldTree:append_text(" +" .. pointer_value) + end + + elseif type_size ~= 0 then + -- this is some basic type + + fieldTree = tree:add(buffer(offset, type_size), field_type .. " " .. field_name) + + field_string = mojom_bytes_to_string(field_type, module_path, buffer(offset, type_size), bool_bit) + if field_string ~= nil then + fieldTree:append_text(": " .. field_string) + end + + -- special handling for booleans (since there are packed together) + if field_type == "bool" and next_field_type == "bool" and bool_bit < 7 then + type_size = 0 + end + + offset = offset + type_size + + if field_type == "bool" then + bool_bit = (bool_bit + 1) % 8 + end + end + + context["bool_bit"] = bool_bit + + return offset, referenced_type_offset, referenced_type_definition +end + +function reorder_fields(field_definitions, module_path) + -- pack the fields in the order they would appear on wire + -- https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/tools/mojom/mojom/generate/pack.py;l=136 + + local ordered_field_infos = {} + local ordered_field_defintions = {} + local fields_count = #field_definitions + local offset = 0 + local last_field_offset = 0 + local bool_bit = 0 + + -- iterate the fields in this struct + for i, definition in ipairs(field_definitions) do + local field_type = common.split(definition, " ")[1] + local field_name = common.split(definition, " ")[2] + local type_size, type_alignment, is_pointer, is_basic_type = get_mojom_type_info(field_type, module_path) + + -- by deafult, we will insert the field at the end + offset = last_field_offset + + local next_field_type = i + 1 <= fields_count and common.split(field_definitions[i+1], " ")[1] or nil + local prev_field_type = i -1 >= 1 and common.split(field_definitions[i-1], " ")[1] or nil + local prev_field_bit = bool_bit + + -- maybe there is a padding hole in which we can insert our field + local current_field_index = #ordered_field_infos + 1 + for j, field_info in ipairs(ordered_field_infos) do + if j + 1 > #ordered_field_infos then break end + + local next_field = ordered_field_infos[j+1] + + prev_field_type = field_info[1] + local prev_field_offset = field_info[2] + prev_field_bit = field_info[3] + local prev_field_size = field_info[4] + + local next_field_type_temp = next_field[1] + local next_field_offset = next_field[2] + + local hole_size = next_field_offset - (prev_field_offset + prev_field_size) + if hole_size >= type_size then + -- found a hole with a sufficient size + -- this is true for bools too as long as the packing is not finished + + current_field_index = j + 1 + offset = prev_field_offset + prev_field_size + next_field_type = next_field_type_temp + break + end + end + + local is_boolean_packed_mode = field_type == "bool" and (prev_field_type == "bool" or next_field_type == "bool") + + if is_boolean_packed_mode and bool_bit < 7 then + -- we want to insert a bool and we are in packing mode + type_size = 0 + end + + -- skip some missing papdding if needed + if type_size ~= 0 then + local missing_padding = (type_alignment - (offset % type_alignment)) % type_alignment + offset = offset + missing_padding + end + + if current_field_index == #ordered_field_infos + 1 then last_field_offset = offset + type_size end + + table.insert(ordered_field_infos, current_field_index, {field_type, offset, bool_bit, type_size}) + table.insert(ordered_field_defintions, current_field_index, definition) + + if is_boolean_packed_mode then + bool_bit = (bool_bit + 1) % 8 + end + end + + return ordered_field_defintions +end + +function get_mojom_type_info(field_type, module_path) + -- + -- https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/tools/mojom/mojom/generate/pack.py;l=19 + -- GetSizeForKind + -- + + local is_pointer = false + local is_basic_type = true + local type_size = 0 + local type_alignment = 0 + + if field_type == "uint8" or field_type == "int8" then + type_size = 1; type_alignment = 1 + elseif field_type == "uint16" or field_type == "int16" then + type_size = 2; type_alignment = 2 + elseif field_type == "uint32" or field_type == "int32" then + type_size = 4; type_alignment = 4 + elseif field_type == "uint64" or field_type == "int64" then + type_size = 8; type_alignment = 8 + elseif field_type == "float" then + type_size = 4; type_alignment = 4 + elseif field_type == "double" then + type_size = 8; type_alignment = 8 + elseif field_type =="bool" then + -- bools are tricky because they are packed together to a bit field, but by default they will be considered as 1-byte + type_size = 1; type_alignment = 1 + elseif field_type == "string" then + -- strings are considered as pointer to arrays + type_size = 8; type_alignment = 8 + is_pointer = true + elseif common.startswith(field_type, "array") then + -- a pointer + type_size = 8; type_alignment = 8 + is_pointer = true; is_basic_type = false + elseif common.startswith(field_type, "map") then + type_size = 8; type_alignment = 8 + is_pointer = true; is_basic_type = false + elseif common.startswith(field_type, "handle<") or field_type == "handle" then + type_size = 4; type_alignment = 4 + elseif common.startswith(field_type, "pending_receiver") or common.startswith(field_type, "pending_associated_receiver") then + type_size = 4; type_alignment = 4 + elseif common.startswith(field_type, "pending_") then + type_size = 8; type_alignment = 4 + else + -- this is likely a struct, enum, or a union + + struct_info = get_struct_info(field_type, module_path) + + if struct_info ~= nil then + is_basic_type = false + + local definition = struct_info["definition"] + if common.startswith(definition, "struct") then + type_size = 8; type_alignment = 8 + is_pointer = true + elseif common.startswith(definition, "union") then + type_size = 16; type_alignment = 8 + is_pointer = false + elseif common.startswith(definition, "enum") then + type_size = 4; type_alignment = 4 + is_pointer = false + end + end + end + + if type_size == 0 then + -- we don't know what it is, assume pointer + type_size = 8; type_alignment = 8; is_pointer = true; is_basic_type = false + end + + return type_size, type_alignment, is_pointer, is_basic_type +end + +function mojom_bytes_to_string(field_type, module_path, bytes, bool_bit) + + -- deal with nullable (e.g "SomeType? hi, ...") arguments + local is_nullable = common.endswith(field_type, "?") + if is_nullable then + field_type = field_type:sub(1, #field_type-1) + end + + local fieldString = nil + if field_type == "int32" then + fieldString = "" .. bytes:le_int() + elseif field_type == "uint32" then + fieldString = "" .. bytes:le_uint() + elseif field_type == "int64" then + fieldString = "" .. bytes:le_int64() + elseif field_type == "uint64" then + fieldString = "" .. bytes:le_uint64() + elseif field_type == "float" then + fieldString = "" .. bytes:le_float() + elseif field_type == "double" then + fieldString = "" .. bytes:le_float() + elseif field_type == "int16" then + fieldString = "" .. common.numLong(bytes:string()) + elseif field_type == "uint16" then + fieldString = "" .. common.numLong(bytes:string()) + elseif field_type == "int8" then + fieldString = "" .. common.numLong(bytes:string()) + elseif field_type == "uint8" then + fieldString = "" .. common.numLong(bytes:string()) + elseif field_type == "string" then + fieldString = "\"" .. bytes:string() .. "\"" + elseif field_type == "bool" then + local anded_value = bit.lshift(1, bool_bit) + local bool_value = bit.band(common.numLong(bytes:string()), anded_value) + + if bool_value == 0 then + fieldString = "false" + else + fieldString = "true" + end + + elseif common.startswith(field_type, "pending_receiver") or common.startswith(field_type, "handle<") then + fieldString = "Mojo handle #" .. bytes:le_int() + + if is_nullable and bytes:le_int() == -1 then + fieldString = "NULL" + end + elseif common.startswith(field_type, "pending_") then + fieldString = "Mojo handle #" .. bytes:le_int64() + + if is_nullable and bytes:le_int64() == -1 then + fieldString = "NULL" + end + else + -- maybe it is an enum or union + local struct_info = get_struct_info(field_type, module_path) + if struct_info ~= nil then + local definition = struct_info["definition"] + if common.startswith(definition, "enum") then + fieldString = bytes:le_int() .. " (?)" + elseif common.startswith(definition, "union") then + fieldString = "union data" + end + end + end + + return fieldString +end + +function fields_from_struct_definition(struct_definition) + + if string.find(struct_definition, "%(") then + -- these are actually method parameters, in the form of + -- MethodName(Type1 name1, Type2 name2, ...) => (ReturnType1 OtherName1, ...) + + struct_definition = struct_definition:match("%b()"):sub(2, -2) + + -- before splitting to fields by the commans, + -- there could be a comma in map or even things like map, S2> + -- so we need to first elimenate all false commas + while true do + local angled_string = struct_definition:match("%b<>") + if angled_string == nil then break end + + local new_angled_string = angled_string:gsub(",", "!comma!"):gsub("<", "!angle1!"):gsub(">", "!angle2!") + struct_definition = struct_definition:gsub(angled_string, new_angled_string) + end + + struct_definition = struct_definition:gsub(",", ";") + + -- restore the values we replaced if needed + struct_definition = struct_definition:gsub("!comma!", ","):gsub("!angle1!", "<"):gsub("!angle2!", ">") + + elseif struct_definition:find("{") ~= nil then + -- regular struct definition + + struct_definition = struct_definition:sub((struct_definition:find("{"))) + struct_definition = struct_definition:gsub("{", ""):gsub("}", "") + elseif struct_definition:find("struct ") ~= nil then + -- this might be a [Native] definition, which we don't currently fully support. + + return {"array native_struct_data", "array? handles"} + end + + -- clean it up + struct_definition = common.trim(struct_definition) + + -- split to fields by semicolom + field_definitions = common.split(struct_definition, ";") + + for i, definition in ipairs(field_definitions) do + field_definitions[i] = common.trim(field_definitions[i]) + end + + return field_definitions + +end + +function fully_qualified_name(struct_name, module_path) + + -- TODO: handle nested stuff and maps too (example: map>) + + if common.startswith(struct_name, "array<") then + local element_type = struct_name:sub(7, common.endswith(struct_name, "?") and -3 or -2) + + local type_size, type_alignment, is_pointer, is_basic_type = get_mojom_type_info(element_type, module_path) + + local new_element_type = element_type + if not is_basic_type and string.find(element_type, "%.") == nil then + new_element_type = module_path .. "." .. element_type + end + struct_name = struct_name:gsub(element_type, new_element_type) + elseif common.startswith(struct_name, "map<") then + -- TODO + return struct_name + + elseif string.find(struct_name, "%.") == nil then + struct_name = module_path .. "." .. struct_name + end + + return struct_name +end + +function get_struct_info(struct_name, module_path) + -- resolve shortned names to full names + struct_name = fully_qualified_name(struct_name, module_path) + + if common.endswith(struct_name, "?") then + -- nullable + struct_name = struct_name:sub(1, #struct_name-1) + end + + return mojo_interfaces_info[struct_name] +end + +function to_128bit_hex_string(buffer) + str = string.format('%x%x%x%x', buffer(0, 4):uint(), buffer(4, 4):uint(), + buffer(8, 4):uint(), buffer(12, 4):uint()) + + return str +end + +function to_64bit_hex_string(buffer) + str = string.format('%x%x', buffer(0, 4):uint(), buffer(4, 4):uint()) + + return str +end + +function concat_u32_to_u64(hi, lo) + local hi64 = UInt64(hi):lshift(32) + local lo64 = UInt64(lo) + return hi64 + lo64 +end + + +function truncate_text(text) + local max_len = 50 + if text:len() > max_len then + text = text:sub(1, max_len) .. "..." + end + + return text +end \ No newline at end of file diff --git a/dissectors/chromium-ipc/npfs.lua b/dissectors/chromium-ipc/npfs.lua new file mode 100644 index 0000000..dd676e2 --- /dev/null +++ b/dissectors/chromium-ipc/npfs.lua @@ -0,0 +1,139 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/tomer8007/chromium-ipc-sniffer (Chrome IPC Sniffer/Dissectors/npfs.lua), +-- commit f72c80b4eec42c0fb8956f1a941420c6f8835038 du 10/12/2025. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +npfs_protocol = Proto("NPFS", "NamedPipe Capture Protocol") + +local get_chrome_name = require("helpers\\common").get_chrome_type_name + +-- Header fields +local header_version = ProtoField.int32 ("npfs.headerver" , "Header version" , base.DEC) +local chrome_version_length = ProtoField.int8 ("npfs.chromverlen" , "Chromium Version Length" , base.DEC) +local chrome_version = ProtoField.string ("npfs.chromever" , "Chromium Version" , base.ASCII) +local code = ProtoField.int16 ("npfs.code" , "I/O Code" , base.DEC) +local source_pid = ProtoField.int32 ("npfs.sourcepid" , "Source PID" , base.DEC) +local source_pid_type = ProtoField.int32 ("npfs.sourcetype" , "Source Process Type" , base.DEC) +local dest_pid = ProtoField.int32 ("npfs.destpid" , "Destination PID" , base.DEC) +local dest_pid_type = ProtoField.int32 ("npfs.desttype" , "Destination Process Type", base.DEC) + +local thread_id = ProtoField.int32 ("npfs.threadid" , "Thread TID" , base.DEC) +local pipe_name_length = ProtoField.int8 ("npfs.pipenamelength" , "Pipe Name Length" , base.DEC) +local pipe_name = ProtoField.string ("npfs.pipename" , "Pipe Name" , base.ASCII) +local timestamp = ProtoField.int64 ("npfs.timestamp" , "Timestamp" , base.DEC) + +local raw_data = ProtoField.new("Raw Data", "npfs.data", ftypes.BYTES) + +local data_length = ProtoField.int32 ("npfs.datalen" , "Captured Raw Data Length" , base.DEC) + +-- Psauedo Fields for unioned filtering +local s_pid = ProtoField.int32 ("npfs.pid" , "Source PID" , base.DEC) +local d_pid = ProtoField.int32 ("npfs.pid" , "Dest PID" , base.DEC) +local s_type = ProtoField.new ("Source Process Type", "npfs.process_type" , ftypes.STRING) +local d_type = ProtoField.new ( "Dest Process Type" , "npfs.process_type" , ftypes.STRING) + +-- +-- Expert Info +-- +local expert_info_pipeerror = ProtoExpert.new("npfs.pipeerror", "Could not find destination PID", expert.group.COMMENTS_GROUP, expert.severity.WARN) + + +npfs_protocol.fields = { + header_version, chrome_version_length, chrome_version, code, source_pid, source_pid_type, dest_pid, dest_pid_type, thread_id, pipe_name_length, pipe_name, timestamp, data_length, -- Header + raw_data, -- Extra Fields + s_pid, d_pid, s_type, d_type, -- Hidden Fields +} + +npfs_protocol.experts = {expert_info_pipeerror} + +local _sourcepid = Field.new("npfs.sourcepid") +local _dstpid = Field.new("npfs.destpid") +local _pipename = Field.new("npfs.pipename") +local _data_len = Field.new("npfs.datalen") +local _sourcetype = Field.new("npfs.sourcetype") +local _desttype = Field.new("npfs.desttype") + + +function npfs_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.src = Address.ip('127.0.0.1') + pinfo.dst = Address.ip('127.0.0.1') + pinfo.cols.protocol = npfs_protocol.name + + local subtree = tree:add(npfs_protocol, buffer(), "Named Pipe Capture Metadata") + + -- Header + local offset = 0 + local code_value = buffer(offset,2):le_uint() + if code_value >= 0 and code_value < 8 then + -- this is not a code value, in fact it's a newer version of this header, with version field + subtree:add(header_version, buffer(offset,4)); offset = offset + 4 + local chrome_version_length_value = buffer(offset,1):le_uint() + subtree:add_le(chrome_version_length, buffer(offset,1)); offset = offset + 1 + subtree:add_le(chrome_version, buffer(offset, chrome_version_length_value)); offset = offset + chrome_version_length_value + code_value = buffer(offset,2):le_uint() + end + subtree:add_le(code, buffer(offset,2)):append_text(" (" .. get_code_name(code_value) .. ")"); offset = offset + 2 + subtree:add_le(source_pid, buffer(offset,4)); offset = offset + 4 + subtree:add_le(dest_pid, buffer(offset,4)); offset = offset + 4 + subtree:add_le(source_pid_type, buffer(offset,4)):append_text(" (" .. get_chrome_name(_sourcetype()()) .. ")");; offset = offset + 4 + subtree:add_le(dest_pid_type, buffer(offset,4)):append_text(" (" .. get_chrome_name(_desttype()()) .. ")");; offset = offset + 4 + subtree:add_le(thread_id, buffer(offset,4)); offset = offset + 4 + local pipe_name_length_value = buffer(offset,1):le_uint() + subtree:add_le(pipe_name_length, buffer(offset,1)); offset = offset + 1 + subtree:add_le(pipe_name, buffer(offset, pipe_name_length_value)); offset = offset + pipe_name_length_value + if string.match(_pipename()(), "Unknown") then + subtree:add_proto_expert_info(expert_info_pipeerror, "Could not find pipe name, most likely because it was closed") + elseif _dstpid()() == 0 then + subtree:add_proto_expert_info(expert_info_pipeerror, "Could not find destination PID, most likely because its pipe handle was closed") + end + subtree:add_le(timestamp, buffer(offset,8)):append_text(" (" .. "100-ns intervals since 1/1/1601, GMT" .. ")"); offset = offset + 8 + subtree:add_le(data_length, buffer(offset,4)); offset = offset + 4 + + subtree:set_len(offset) + + subtree:append_text(", Src PID: " .. _sourcepid()() .. " (" .. get_chrome_name(_sourcetype()()) .. ")" ..", Dst PID: " .. _dstpid()() .." (" .. get_chrome_name(_desttype()()) .. ")" .. ", Pipe: " .. _pipename()()) + + -- Add hidden fields + subtree:add_le(s_pid, _sourcepid()()):set_hidden() + subtree:add_le(d_pid, _dstpid()()):set_hidden() + subtree:add_le(s_type, get_chrome_name(_sourcetype()() )):set_hidden() + subtree:add_le(d_type, get_chrome_name(_desttype()() )):set_hidden() + + pinfo.cols.info = get_chrome_name(_sourcetype()()) .. " ➜ " .. get_chrome_name(_desttype()()) .. ":" + + mojo_data_len = buffer(offset, 4):le_uint() + ipcz_header_len = buffer(offset, 2):le_uint() + + -- Check the payload and decide if it should be interpreted as Mojo or not + if mojo_data_len == _data_len()() and mojo_data_len > 4 then + Dissector.get("mojo"):call(buffer(offset, length-offset):tvb(), pinfo, tree) + + if mojo_data_len > length - offset then + pinfo.cols.info = tostring(pinfo.cols.info) .. " [truncated]" + end + elseif ipcz_header_len == 8 or ipcz_header_len == 16 then + -- looks like the first version of IPCZ + Dissector.get("ipcz"):call(buffer(offset, _data_len()()):tvb(), pinfo, tree) + + elseif _pipename()():find("chrome%.sync%.") ~= nil then + Dissector.get("audiosync"):call(buffer(offset, _data_len()()):tvb(), pinfo, tree) + else + pinfo.cols.info = tostring(pinfo.cols.info) .. " Raw Pipe Data" + Dissector.get("data"):call(buffer(offset, _data_len()()):tvb(), pinfo, tree) + end + +end + +function get_code_name(opcode) + local opcode_name = "Unknown" + + if opcode == 9 then opcode_name = "IRP_MJ_WRITE" end + if opcode == 8 then opcode_name = "IRP_MJ_READ" end + + return opcode_name +end + +local tcp_port = DissectorTable.get("ethertype") +tcp_port:add(0x807, npfs_protocol) diff --git a/dissectors/citp-hossimo/LICENSE b/dissectors/citp-hossimo/LICENSE new file mode 100644 index 0000000..c75f920 --- /dev/null +++ b/dissectors/citp-hossimo/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Anthony Headley + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/citp-hossimo/README.md b/dissectors/citp-hossimo/README.md new file mode 100644 index 0000000..6f6b3a7 --- /dev/null +++ b/dissectors/citp-hossimo/README.md @@ -0,0 +1,77 @@ +# CITP — échanges entre consoles lumière et serveurs de médias + +Dissecteur Wireshark Lua du protocole CITP (Controller Interface Transport +Protocol), utilisé dans l'événementiel pour relier consoles lumière, +serveurs de médias et visualiseurs, écrit par Anthony Headley (hossimo). +Il décode la couche PINF (annonce des pairs sur UDP 4809, multicast +`224.0.0.180`) et la couche MSEX (serveurs de médias : informations, +bibliothèques, éléments, vignettes, état des couches) sur TCP (issue #37). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/hossimo/CITP-Dissector (`citp.lua`) | +| Commit importé | `f74005435e3bf6903248f29d866eb582ec1e69a1` du 01/11/2026 (dernier commit de la branche par défaut `master`, ajout de la licence) ; dernière modification du fichier : `24f5572782f64313f663c6857fb123fbf2647077` du 13/03/2020 | +| Licence amont | MIT, fichier `LICENSE` (« Copyright (c) 2026 Anthony Headley »), copié dans ce dossier | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur CITP dans `tshark -G protocols` | + +L'issue attendait une licence (label `ATTENTE LICENSE`) : l'auteur l'a +publiée le 01/11/2026. Le fichier est repris tel quel (aucune +modification) ; seule l'en-tête de provenance de cinq lignes est ajoutée +en tête de `citp.lua` (convention du dépôt, issue #563). La capture +d'exemple du dépôt amont (`Example Capture.pcapng`) et le script +`install.sh` ne sont pas importés. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/citp.lua` | Protocole `citp` (ligne 6) et tables de ports UDP et TCP (lignes 9 et 10) ; dissecteur (ligne 89) ; fonctions d'aide : chaînes UCS-2, identifiants de bibliothèque, dimensions, types (lignes 1195 à 1246) ; ajout d'un port TCP (`CITP_add_port`, ligne 1247) ; inscription sur UDP 4809 (ligne 1265) | + +## Utilisation + +Copier `src/citp.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`), ou le charger par +`-X lua_script:citp.lua`. Le port TCP du serveur de médias n'est pas +fixe : le script l'inscrit quand il lit le champ « Listening Port » d'un +message PINF/PLoc. Sans ce message, l'ajouter à la main dans +Wireshark (Outils > Lua > Évaluer) : `CITP_add_port(6436)`. Le seul +filtre disponible est `citp`. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, par `-X lua_script:` et dans le +dossier des plugins : chargement sans erreur, protocole `citp` présent +dans `tshark -G protocols`. Essais sur la capture d'exemple du dépôt +amont (20 trames, non commitée) : + +| Essai | Résultat | +|---|---| +| Sans le script | Trames UDP 4809 et TCP 6436 non décodées | +| Annonce PINF/PLoc du serveur (trame 1) | « CITP 1.0 >PINF >PLoc », « Listening Port: 6436 » ; port TCP 6436 inscrit, puis erreur Lua « TextWindow_new: GUI not available » (ligne 1254) | +| Trames TCP suivantes | 14 trames `citp` sur 20 : SInf (« Mbox Designer v3.10 », 6 couches), CInf, GELI, ELIn (63 bibliothèques), GEIn, LSta (6 couches détaillées), MEIn (33 éléments), GETh (« RGB8 64x64 »), ETHn | +| Annonce PINF/PLoc de la console (trame 2) | Type « LightingConsole » lu, puis erreur Lua « attempt to perform arithmetic on a nil value (global 'count') » (ligne 202) | +| Information serveur SInf (trame 3) | Produit, version et première couche DMX lus, puis la même erreur (ligne 355) | +| Segments TCP de suite d'un message (trames 14 à 19) | Non décodés (pas de réassemblage) | + +## Limites constatées + +- Les chaînes terminées par un octet nul sont mesurées par + `string.find(buffer(start):string(), "\0")` (par exemple ligne 198). + Avec Wireshark 4.6.4, `TvbRange:string()` s'arrête au premier octet + nul : la recherche échoue et provoque une erreur Lua dès qu'une chaîne + suit une autre (lignes 202 et 355). Le reste du message n'est alors + pas décodé. +- L'inscription d'un port TCP ouvre une fenêtre de journal + (`TextWindow`, ligne 1254) : sous tshark, il n'y a pas d'interface + graphique et cela provoque une erreur Lua. Le port est quand même + inscrit, car l'erreur survient après. +- Pas de réassemblage TCP : un message réparti sur plusieurs segments + n'est décodé que dans le premier. +- Les indicateurs d'état de couche 0x10 et 0x20 sont testés avec + `00000010` et `00000020` (lignes 677 et 680), lus en décimal par Lua + (10 et 20) : ces deux états sont mal interprétés. +- Aucun champ filtrable : tout est ajouté en texte sous `citp`. Toutes + les variables (`start`, `count`, `name`, `found_ports`…) et fonctions + sont globales, ce qui peut entrer en conflit avec d'autres scripts. diff --git a/dissectors/citp-hossimo/src/citp.lua b/dissectors/citp-hossimo/src/citp.lua new file mode 100644 index 0000000..d7b090a --- /dev/null +++ b/dissectors/citp-hossimo/src/citp.lua @@ -0,0 +1,1269 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/hossimo/CITP-Dissector (citp.lua), +-- commit f74005435e3bf6903248f29d866eb582ec1e69a1 du 01/11/2026 (dernière modification du fichier : +-- commit 24f5572782f64313f663c6857fb123fbf2647077 du 13/03/2020). +-- Licence amont : MIT — voir README.md et LICENSE. +citp_proto = Proto("citp","CITP") + +-- UDP and TCP Dissector Tables +udp_table = DissectorTable.get("udp.port") +tcp_table = DissectorTable.get("tcp.port") + +-- Globals +dissector_version = "1.6.1" +dissector_date = "2017-01-31" +listeningport = 0 +start = 0 +count = 0 +found_ports = {} +win = nil + +ct = { + -- CITP + MSEX = "Media Server Extensions", + PINF = "Peer Information layer", + PNam = "Peer Name message", + PLoc = "Peer Location message", + -- MSEX + CInf = "Client Information Message", + SInf = "Server Information Message", + Nack = "Negative Acknowledge Message", + LSta = "Layer Status Message", + StFr = "Stream Frame message", + RqSt = "Request Stream message", + GEIn = "Get Element Information message", + MEIn = "Media Element Information message", + GETh = "Get Element Thumbnail message", + EThn = "Element Thumbnail message", + ELIn = "Element Library Information message", + GELI = "Get Element Library Information message", + GELT = "Get Element Library Thumbnail message", + GVSr = "GetVideoSources", + VSrc = "Video Sources", + -- Other + CAEX = "Capture Extensions" +} + +-- Capture specific CITP extension content codes +caex_ct = {} +-- Live Views +caex_ct[0x00000100] = "Get Live View Status" +caex_ct[0x00000101] = "Live View Status" +caex_ct[0x00000200] = "Get Live View Image" +caex_ct[0x00000201] = "Live View Image" +-- Cue recording +caex_ct[0x00010100] = "Set Cue Recording Capabilities" +caex_ct[0x00010200] = "Record Cue" +caex_ct[0x00010300] = "Set Recorder Clearing Capabilities" +caex_ct[0x00010400] = "Clear Recorder" +-- Show Synchronization +caex_ct[0x00020100] = "Enter Show" +caex_ct[0x00020101] = "Leave Show" +caex_ct[0x00020200] = "Fixture List Request" +caex_ct[0x00020201] = "Fixture List" +caex_ct[0x00020204] = "Fixture Identify" +caex_ct[0x00020202] = "Fixture Modify" +caex_ct[0x00020203] = "Fixture Remove" +caex_ct[0x00020300] = "Fixture Selection" +caex_ct[0x00020400] = "Fixture Console Status" +-- Laser Feeds +caex_ct[0x00030100] = "Get Laser Feed List" +caex_ct[0x00030101] = "Laser Feed List" +caex_ct[0x00030102] = "Laser Feed Control" +caex_ct[0x00030200] = "Laser Feed Frame" + + + +lt = { + "Media (Images & Video)", + "Effects", + "Cues", + "Crossfades", + "Masks", + "Blend presets", + "Effect presets", + "Image presets", + "3D meshes" +} + +function citp_proto.dissector(buffer,pinfo,tree) + listeningport = 0 + start = 0 + + -- Check for buffer lengths less the CITP Header (20 Bytes) + if buffer:len() < 20 then -- We don't have enough to figure out message length + pinfo.desegment_len = 20 - buffer:len() -- get more data. + return + end + + count = 4 + + cookie = buffer (start,count):string() + pinfo.cols.protocol = cookie + subtree = tree:add(citp_proto,buffer(), string.format("Controller Interface Transport Protocol, Length: %d Header: 22",buffer:len())) + start = start + count + + count = 1 + citp_version = string.format("%d.%d",buffer (start,count):le_uint(),buffer (start+1,count):le_uint()) + subtree:add(buffer(start,count+1), "Version: " .. citp_version) + + subtree:add(buffer(6,2), "Request/Response ID: " .. buffer(6,2):le_uint()) + message_size = buffer(8,4):le_uint() + subtree:add(buffer(8,4), "Message Size: " .. message_size) + subtree:add(buffer(12,2), "Message Part Count: " .. buffer(12,2):le_uint()) + subtree:add(buffer(14,2), "Message Part: " .. buffer(14,2):le_uint()) + + str = ct[buffer(16,4):string()] or "(Unknown)" + subtree = subtree:add(buffer(16,4), string.format("Content Type: %s - %s, Length: %d",buffer(16,4):string(), + str, + string.len(buffer(20):string()))) + pinfo.cols.info = string.format("CITP %s >",citp_version) -- info + + -- Calculate message size and reassemble PDUs if needed. + if message_size > buffer:len() then + pinfo.desegment_len = message_size - buffer:len() + return + end + + -- CAEX ------------------------------------------------------------------------ + -- Capture CITP Extensions + if buffer(16,4):string() == "CAEX" then + pinfo.cols.info:append ("CAEX >") -- info + + caex_code = buffer(20,4):le_uint() + str = caex_ct[caex_code] or "(Unknown)" + + subtree:add(buffer(20,4), "Content Type: " .. string.format("%08x", caex_code) .. " - " ..str) + pinfo.cols.info:append (str) + + if str == "Laser Feed List" then + subtree:add( string.format("Source Key: 0x%08x", buffer(24,4):le_uint())) + nFeeds = buffer(28,1):le_uint() + subtree:add( "Feed Count: " .. (nFeeds)) + + feedNameStart = 29 + + for i=1,nFeeds do + str, l = ucs2ascii(feedNameStart, buffer) + subtree:add("Feed " .. (i) .. ": " .. str) + feedNameStart = feedNameStart + l + end + + elseif str == "Laser Feed Frame" then + pinfo.cols.info:append (" >Feed " .. buffer(28,1):le_uint()) + subtree:add( string.format("Source Key: 0x%08x", buffer(24,4):le_uint())) + subtree:add( "Feed Index: " .. buffer(28,1):le_uint()) + subtree:add( "Frame Seq Num: " .. buffer(29,4):le_uint()) + subtree:add( "Point Count: " .. buffer(33,2):le_uint()) + + elseif str == "Laser Feed Control" then + pinfo.cols.info:append (" >Feed " .. buffer(24,1):le_uint()) + subtree:add( "Feed Index: " .. buffer(24,1):le_uint()) + subtree:add( "Framerate: " .. buffer(25,1):le_uint()) + + end + + end + + -- PINF ------------------------------------------------------------------------ + -- Peer Information layer + if buffer(16,4):string() == "PINF" then + name="" + pinfo.cols.info:append ("PINF >") -- info + str = ct[buffer(20,4):string()] or "(Unknown)" + subtree:add(buffer(20,4), "Content Type: " .. buffer(20,4):string() .. " - " ..str) + + -- PNam + if buffer(20,4):string() == "PNam" then + start = 24 + name=buffer(start):string(); + pinfo.cols.info:append ("PNam >") -- info + count = string.find(buffer(start):string(),"\0",1) + subtree:add(buffer(start, count),"Name: ".. buffer(start):string()) + + --PLoc + elseif buffer(20,4):string() == "PLoc" then + pinfo.cols.info:append ("PLoc >") -- info + listeningport = buffer(24,2):le_uint() + subtree:add(buffer(24,2), "Listening Port: " .. (listeningport)) + + -- If we listening port is non zero then add to the dissector + if listeningport then + CITP_add_port(listeningport) + end + listeningport = 0 + + -- Read type + start = 26 + count = string.find(buffer(start):string(),"\0",1) + subtree:add(buffer(start, count),"Type: ".. buffer(start):string()) + + -- Read name (and store in name) + start = start+count + name = buffer(start):string() + count = string.find(buffer(start):string(),"\0",1) + subtree:add(buffer(start, count),"Name: ".. name) + + -- Read state + start = start+count + count = string.find(buffer(start):string(),"\0",1) + subtree:add(buffer(start, count),"State: ".. buffer(start):string()) + else + pinfo.cols.info:append ("Unknown format or content type") + end + pinfo.cols.info:append (name) -- info + end + + -- MSEX ------------------------------------------------------------------------ + if buffer (16,4):string() == "MSEX" then + local str = "" + + str = ct[buffer(22,4):string()] or "(Unknown)" + + subtree:add(buffer(20), string.format("Length: %s",buffer:len()-20)) + version = buffer (20,1):uint() .. "." .. buffer(21,1):uint() + subtree:add(buffer(20,2), "Version: " .. version) + subtree:add(buffer(22,4), "Content Type: " .. buffer(22,4):string().." - "..str) + + pinfo.cols.info:append ("MSEX ".. version .." >") -- info + -- MSEX/CInf -------------------------------------------------------------------- + -- Client Information message + if buffer(22,4):string() == "CInf" then + pinfo.cols.info:append ("CInf >") -- info + version_tree = subtree:add(buffer(26,1), "Supported Version Count: ".. buffer(26,1):uint()) + + start = 27 + for i=1,buffer(26,1):uint() do + local supportVersion = buffer(start+1,1):uint() .. "." .. buffer(start,1):uint() + version_tree:add(buffer(start,2), "Supports: ".. supportVersion) + start = start+2 + end + end + + -- MSEX/SInf ------------------------------------------------------------------- + -- Server Information message + if (buffer(22,4):string() == "SInf") then + pinfo.cols.info:append ("SInf >") -- info + start = 26 + + if version >= "1.2" then + count = 36 + subtree:add(buffer(start,count), "UUID: ".. buffer(start,count):string()) + start = start + count + end + + -- Product Name (ASCII) + count = 0 + str="" + while buffer(start+count,1):uint() ~= 0 do + str = str .. buffer(start+count,1):string() + count = count + 2 + end + count = count + 2 + + subtree:add(buffer(start, count),"Product Name (ASCII): ".. str) + start = start + count + + count = 2 + local productVersion = buffer (start,1):uint() .. "." .. buffer(start+1,1):uint() + + if version >= "1.2" then + count = 3 + productVersion = productVersion .. "." .. buffer(start+2,1) + end + + subtree:add(buffer(start,count), "Product Version: " .. productVersion) + start = start + count + + if version >= "1.2" then + subtree:add(buffer(start,1), "Supported Version Count: ".. buffer(start,1):uint()) + + start = start + 1 + for i=1,buffer(start-1,1):uint() do + local supportVersion = buffer(start+1,1):uint() .. "." .. buffer(start,1):uint() + subtree:add(buffer(start,2), "Supports: ".. supportVersion) + start = start+2 + end + + supported_types = buffer(start,2):le_uint() + + if bit.band(supported_types,00000001) > 0 then + str = str .. lt[1] .. ", " + end + if bit.band(supported_types,00000002) > 0 then + str = str .. lt[2] .. ", " + end + if bit.band(supported_types,00000004) > 0 then + str = str .. lt[3] .. ", " + end + if bit.band(supported_types,00000008) > 0 then + str = str .. lt[4] .. ", " + end + if bit.band(supported_types,00000016) > 0 then + str = str .. lt[5] .. ", " + end + if bit.band(supported_types,00000032) > 0 then + str = str .. lt[6] .. ", " + end + if bit.band(supported_types,00000064) > 0 then + str = str .. lt[7] .. ", " + end + if bit.band(supported_types,00000128) > 0 then + str = str .. lt[8] .. ", " + end + if bit.band(supported_types,00000256) > 0 then + str = str .. lt[9] .. ", " + end + if supported_types == "00000000" then + str = "None, " + end + + str = string.sub(str,1,-3) + + subtree:add(buffer(start,2), "Supported Library Types: " .. str) + + start = start + 2 + + count = buffer(start,1):uint() + subtree:add(buffer(start,1), "Thumbnail Format Count: ".. count) + + start = start + 1 + for i=0,count-1 do + subtree:add(buffer(start,4), "Thumbnail Format: ".. buffer(start,4):string()) + start = start+4 + end + + count = buffer(start,1):uint() + subtree:add(buffer(start,1), "Stream Format Count: ".. count) + + start = start + 1 + for i=0,count-1 do + subtree:add(buffer(start,4), "Stream Format: ".. buffer(start,4):string()) + start = start+4 + end + + end -- Version 1.2 + + count = 1 + layercount = buffer(start, count):uint() + dmx = subtree:add(buffer(start,count), "Number of Layers: " .. layercount) + start = start + count + + for i = 1, layercount do + count = string.find(buffer(start):string(),"\0",1) + dmx:add(buffer(start, count), "Layer ".. i .." DMX (proto/net/uni/chan.): " .. buffer(start):string()) + start = start + count + end + pinfo.cols.info:append (string.format("Server: %s Layers: %d", str, layercount)) + end + + -- MSEX/Nack ------------------------------------------------------------------ + -- Negative Acknowledge message + if buffer(22,4):string() == "Nack" then + pinfo.cols.info:append ("Nack >") -- info + subtree:add(buffer(22),"Received Content: " .. buffer(22):string()) + end + + -- MSEX/StFr ------------------------------------------------------------------ + -- Stream Frame message + if buffer(22,4):string() == "StFr" then + pinfo.cols.info:append ("StFr >") -- info + start = 26 + + if version >= "1.2" then + subtree:add(buffer(start,36), "Media Server UUID: " .. buffer(start,36):string()) + start = start + 36 + end + + -- Source ID + count = 2 + sourceIdentifier = buffer(start,count):le_uint() + subtree:add(buffer(start,count),"SourceIdentifier: " .. sourceIdentifier) + start = start + count + + -- Thumbs Format + count = 4 + frameFormat = buffer(start,count):string() + subtree:add(buffer(start,count),"FrameFormat: " .. frameFormat) + start = start + count + + -- Dimentions + dims, count = MSEX_Dims (buffer, start) + subtree:add(buffer(start,count), string.format("Dimensions: %s", dims)) + start = start + count + + -- Buffer Size + count = 2 + subtree:add(buffer(start,count),"BufferSize: " .. buffer(start,count):uint()) + bufferSize = buffer(start,count):le_uint() + start = start + count + + pinfo.cols.info:append (string.format("SOURCE:%d %s %s", + sourceIdentifier, + frameFormat, + dims + )) + end + + -- MSEX/RqSt ------------------------------------------------------------------ + -- Request Stream message + if buffer(22,4):string() == "RqSt" then + pinfo.cols.info:append ("RqSt >") -- info + + start = 26 + + -- Source ID + count = 2 + local sourceIdentifier = buffer(start,count):le_uint() + subtree:add(buffer(start,count),"SourceIdentifier: " .. sourceIdentifier) + start = start + count + + -- Frame Format + count = 4 + local frameFormat = buffer(start,count):string() + subtree:add(buffer(start,count),"FrameFormat: " .. frameFormat) + start = start + count + + -- Dimentions + dims, count = MSEX_Dims (buffer, start) + subtree:add(buffer(start,count), string.format("Dimensions: %s", dims)) + start = start + count + + -- FPS + count = 1 + local fps = buffer(start,count):le_uint() + subtree:add(buffer(start,count),"FPS: " .. fps) + start = start + count + + -- Timeout + count = 1 + local timeout = buffer(start,count):le_uint() + subtree:add(buffer(start,count),"Timeout: " .. timeout) + start = start + count + + --info + pinfo.cols.info:append (string.format("SOURCE:%d %s %s@%d %dSec", + sourceIdentifier, + frameFormat, + dims, + fps, + timeout)) + end + + -- MSEX 1.0 - 1.2/EThn ------------------------------------------------------------------ + -- Element Thumbnail message + if (buffer(22,4):string() == "EThn") and (version <= "1.1") then + start = 26 + + -- Library Type + str, count = MSEX_LibraryType (buffer, start) + subtree:add(buffer(start,count),string.format("Library Type: %s",str)) + start = start + count + + if version == "1.0" then + count = 1 + libraryNumber = buffer(start,count):le_uint() + subtree:add(buffer(start,count),"LibraryNumber: " .. libraryNumber) + start = start + count + elseif version <= "1.2" then -- There is no definition for 1.2 + -- LibraryID + libraryNumber, count = MSEX_LibraryID(buffer, start) + subtree:add(buffer(start,count),string.format("LibraryId: %s", libraryNumber)) + start = start + count + end + + -- Element + count = 1 + element = buffer(start,count):uint() + subtree:add(buffer(start,count),string.format("Element: %d", element)) + start = start + count + + -- Thumbnail Format + count = 4 + subtree:add(buffer(start,count),string.format("Thumbnail Format: %s", buffer(start,count):string())) + start = start + count + + -- Dimentions + dims, count = MSEX_Dims (buffer, start) + subtree:add(buffer(start,count), string.format("Dimensions: %s", dims)) + start = start + count + + --Thumb Buffer + count = 2 + subtree:add(buffer(start,count),string.format("Thumbs Buffer: %d", buffer(start,count):le_uint())) + start = start + count + + -- Remainder of packet is frame data, or part of frame data + subtree:add(buffer(start),"Data") + + --info + pinfo.cols.info:append (string.format("ETHn LibraryID:%s Element:%d", + libraryNumber, + element + ) + ) + + end -- end EThn 1.0 - 1.2 + + -- MSEX/ELIn ------------------------------------------------------------------ + -- Element Library Information message + if (buffer(22,4):string() == "ELIn") then + pinfo.cols.info:append ("ELIn >") -- info + start = 26 + + -- Library Type + str, count = MSEX_LibraryType (buffer, start) + subtree:add(buffer(start,count),string.format("Library Type: %s",str)) + start = start + count + + -- Element Count + + -- Size of count in bytes + count = 1 + if version >= "1.2" then + count = 2 + end + + library_count = buffer(start,count):le_uint() + element_tree = subtree:add(buffer(start,count),string.format("Library Count: %d", library_count)) + start = start + count + + for i = 1, library_count do + if version == "1.0" then + -- LibraryNumber + count = 1 + lib_tree = element_tree:add(buffer(start,count),"LibraryNumber: " .. buffer(start,count):uint()) + else + -- LibraryID + str, count = MSEX_LibraryID(buffer, start) + lib_tree = element_tree:add(buffer(start,count),string.format("LibraryId: %s", str)) + end + start = start + count + + if version >= "1.2" then + count = 4 + lib_tree:add(buffer(start,count), "SerialNumber: " .. buffer(start,count):uint()) + start = start + count + end + + -- DMX Min + count = 1 + lib_tree:add(buffer(start,count),string.format("DMX Min: %s", buffer(start,count):uint())) + start = start + count + + -- DMX Max + count = 1 + lib_tree:add(buffer(start,count),string.format("DMX Max: %s", buffer(start,count):uint())) + start = start + count + + count = 0 + str="" + + while buffer(start + count,1):uint() ~= 0 do + str = str .. buffer(start+count,1):string() + count = count + 2 + end + count = count + 2 + + lib_tree:add(buffer(start, count), string.format("Name: %s", str)) + start = start + count + + if version >= "1.1" then + count = 1 + + if version >= "1.2" then + count = 2 + end + + lib_tree:add(buffer(start,count),string.format("Sub Libraries %d", buffer(start,count):le_uint())) + start = start + count + end + + count = 1 + + if version >= "1.2" then + count = 2 + end + + lib_tree:add(buffer(start,count),string.format("Element Count: %d", buffer(start,count):le_uint())) + start = start + count + end + pinfo.cols.info:append (string.format("Libraries: %d",library_count)) + + end + + -- MSEX/LSta ------------------------------------------------------------------ + -- Layer Status message + if buffer(22,4):string() == "LSta" then + pinfo.cols.info:append ("LSta >") -- info + + + start = 26 + + count = 1 + layercount = buffer(start,count):uint() + subtree:add(buffer(start,count), "Layer Count: " .. layercount) + + LSta = {} + LSta_status = {} + + for i = 1, layercount do + if version == "1.2" then + -- As of version 1.2 there is a new format + start = start + count + + count = 1 + LSta[i] = subtree:add(buffer(start,count), "Layer Number:" .. buffer(start,count):uint()) + start = start + count + + count = 1 + LSta[i]:add(buffer(start,count), "Physical Output: " .. buffer(start,count):uint()) + start = start + count + + count = 1 + LSta[i]:add(buffer(start,count), "Media Library Type: " .. buffer(start,count):uint()) + start = start + count + + count = 4 + LSta[i]:add(buffer(start,count), "Media Library Id: " .. buffer(start,1):uint() .. "/" .. buffer(start + 1, 1):uint() .. "/" .. buffer(start + 2, 1):uint() .. "/" .. buffer(start + 3, 1):uint()) + start = start + count + + count = 1 + LSta[i]:add(buffer(start,count), "Media Number: " .. buffer(start,count):uint()) + start = start + count + + count = 0 + str="" + + while buffer(start+count,1):uint() ~= 0 do + str = str .. buffer(start+count,1):string() + count = count + 2 + end + count = count + 2 + + LSta[i]:add(buffer(start,count), "Media Name: " .. str) + start = start + count + + count = 4 + length = buffer(start,count):le_uint() + LSta[i]:add(buffer(start,count), "Media Position: " .. length) + start = start + count + + count = 4 + length = buffer(start,count):le_uint() + LSta[i]:add(buffer(start,count), "Media Length: " .. length) + start = start + count + + count = 1 + LSta[i]:add(buffer(start,count), "Media FPS: " .. buffer(start,count):uint()) + start = start + count + + count = 4 + str = "" + current_stat = buffer(start+3,1) .. buffer(start+2,1).. buffer(start+1,1).. buffer(start,1) + + if bit.band(current_stat,00000001) > 0 then + str = str .. "MediaPlaying, " + end + if bit.band(current_stat,00000002) > 0 then -- 1.2 Only + str = str .. "MediaPlaybackReverse, " + end + if bit.band(current_stat,00000004) > 0 then -- 1.2 Only + str = str .. "MediaPlaybackLooping, " + end + if bit.band(current_stat,00000008) > 0 then -- 1.2 Only + str = str .. "MediaPlaybackBouncing, " + end + if bit.band(current_stat,00000010) > 0 then -- 1.2 Only + str = str .. "MediaPlaybackRandom, " + end + if bit.band(current_stat,00000020) > 0 then -- 1.2 Only + str = str .. "MediaPaused, " + end + if current_stat == "00000000" then + str = "None, " + end + + str = string.sub(str,1,-3) + + LSta[i]:add(buffer(start,count), "Layer Status: ".."("..current_stat..") "..str) + else + -- pre 1.2 format (1.0 format) + start = start + count + + count = 1 + LSta[i] = subtree:add(buffer(start,count), "Layer Number:" .. buffer(start,count):uint() .." (".. buffer(start+2,1):uint().."/"..buffer(start+3,1):uint()..")") + start = start + count + + count = 1 + LSta[i]:add(buffer(start,count), "Physical Output: " .. buffer(start,count):uint()) + start = start + count + + count = 1 + LSta[i]:add(buffer(start,count), "Media Library: " .. buffer(start,count):uint()) + start = start + count + + count = 1 + LSta[i]:add(buffer(start,count), "Media Number: " .. buffer(start,count):uint()) + start = start + count + + count = 0 + str="" + + while buffer(start+count,1):uint() ~= 0 do + str = str .. buffer(start+count,1):string() + count = count + 2 + end + count = count + 2 + + LSta[i]:add(buffer(start,count), "Media Name: " .. str) + start = start + count + + count = 4 + length = buffer(start,count):le_uint() + LSta[i]:add(buffer(start,count), "Media Position: " .. length) + start = start + count + + count = 4 + length = buffer(start,count):le_uint() + LSta[i]:add(buffer(start,count), "Media Length: " .. length) + start = start + count + + count = 1 + LSta[i]:add(buffer(start,count), "Media FPS: " .. buffer(start,count):uint()) + start = start + count + + count = 4 + str = "" + current_stat = buffer(start+3,1) .. buffer(start+2,1).. buffer(start+1,1).. buffer(start,1) + + if bit.band(current_stat,00000001) > 0 then + str = str .. "MediaPlaying, " + end + if current_stat == "00000000" then + str = "None, " + end + + str = string.sub(str,1,-3) + + LSta[i]:add(buffer(start,count), "Layer Status: ".."("..current_stat..") "..str) + end + end -- end for : Layer Count + --info + pinfo.cols.info:append (string.format("LAYER COUNT: %d",layercount)) + end -- end if : MSEX/LSta + + -- MSEX/MEIn --------------------------------------------------------------------- + -- Media Element Information message + if (buffer(22,4):string() == "MEIn") then + start = 26 + + if verison == "1.0" then + -- LibraryNumber + count = 1 + libraryNumber = buffer(start,count):uint() + subtree:add(buffer(start,count),"LibraryNumber: " .. libraryNumber) + start = start + count + else + -- LibraryID + libraryId, count = MSEX_LibraryID(buffer, start) + subtree:add(buffer(start,count),string.format("LibraryId: %s", str)) + start = start + count + end + + count = 1 + + if version >= "1.2" then + count = 2 + end + + element_count = buffer(start,count):le_uint() + MEIn = subtree:add(buffer(start,count),string.format("Element Count: %d", element_count)) + start = start + count + + MEIn = {} + for i = 1, element_count do + count = 1 + MEIn[i] = subtree:add(buffer(start,count),string.format("Number: %d", buffer(start,count):uint())) + start = start + count + + if version >= "1.2" then + count = 4 + MEIn[i]:add(buffer(start,count),string.format("SerialNumber: %d", buffer(start,count):uint())) + start = start + count + end + + count = 1 + MEIn[i]:add(buffer(start,count),string.format("DMX Start: %d", buffer(start,count):uint())) + start = start + count + + count = 1 + MEIn[i]:add(buffer(start,count),string.format("DMX End: %d", buffer(start,count):uint())) + start = start + count + + count = 0 + str="" + while buffer(start + count,1):uint() ~= 0 do --THIS IS BROKEN!?!?! + str = str .. buffer(start+count,1):string() + count = count + 2 + end + count = count +2 + MEIn[i]:add(buffer(start,count),string.format("Name: %s", str)) + start = start + count --debug + + -- This is a hack because le_uint64() returns the bigendian result + count = 8 + epoch = 0 + mult = 1 + + for j=0, count - 1 do + epoch = epoch + (buffer(start+j, 1):uint() * mult) + --debug + --MEIn[i]:add(buffer(start,count),string.format("%02d: %sx%d=%s", j, buffer(start+j, 1):uint(), mult, buffer(start+j, 1):uint()*mult)) + mult = mult * 256 + end + + -- The time OSX displays and the epoch caluclation is off by a number of minues. + -- epoch and os.date seem to jive, but OSX time is wrong? + MEIn[i]:add(buffer(start,count),string.format("Time: %s (epoch:%d)", os.date("%c", epoch), epoch)) + + start = start + count + + -- Dimentions + dims, count = MSEX_Dims (buffer, start) + subtree:add(buffer(start,count), string.format("Dimensions: %s", dims)) + start = start + count + + count = 4 + MEIn[i]:add(buffer(start,count),string.format("Length (Frames): %d", buffer(start,count):le_uint())) + start = start + count + + count = 1 + MEIn[i]:add(buffer(start,count),string.format("FPS: %d", buffer(start,count):uint())) + start = start + count + + end + + + + -- info + if version == "1.0" then + pinfo.cols.info:append (string.format("MEIn LibraryNumber: %s Elements: %d",libraryNumber ,element_count)) + else + pinfo.cols.info:append (string.format("MEIn LibraryID: %s Elements: %d",libraryId ,element_count)) + end + end -- end if: MSEX/MEIn + + -- MSEX/GEIn --------------------------------------------------------------------- + -- Get Element Information message + if (buffer(22,4):string() == "GEIn") then + start = 26 + + -- Library Type + str, count = MSEX_LibraryType (buffer, start) + subtree:add(buffer(start,count),string.format("Library Type: %s",str)) + start = start + count + + if version == "1.0" then + count = 1 + libraryNumber = buffer(start,count):le_uint() + subtree:add(buffer(start,count),"LibraryNumber: " .. libraryNumber) + start = start + count + else + -- LibraryID + libraryId, count = MSEX_LibraryID(buffer, start) + subtree:add(buffer(start,count),string.format("LibraryId: %s", libraryId)) + start = start + count + end + + count = 1 + + if version >= "1.2" then + count = 2 + end + + elementCount = buffer(start,count):le_uint() + subtree:add(buffer(start,count),"ElementCount: " .. elementCount) + start = start + count + + if (elementCount > 0) then + txt = "" + count = 1 + for i = 1, elementCount do + elements:add(buffer(start,count),"Element Number: %d" .. buffer(start,count):le_uint()) + start = start + count + end + else + txt = "All" + end + + -- info + if version == "1.0" then + pinfo.cols.info:append (string.format("GEIn LibraryNumber: %s Count: %s (%d)", libraryNumber, txt, elementCount)) + else + pinfo.cols.info:append (string.format("GEIn LibraryID: %s Count: %s (%d)", libraryId, txt, elementCount)) + end + end -- end if: MSEX/GEIn + + -- MSEX/GELI --------------------------------------------------------------------- + -- Get Element Library Information message + if (buffer(22,4):string() == "GELI") then + start = 26 + + -- Library Type + str, count = MSEX_LibraryType (buffer, start) + subtree:add(buffer(start,count),string.format("Library Type: %s",str)) + start = start + count + + if version >= "1.1" then + -- LibraryID + parentLibraryId, count = MSEX_LibraryID(buffer, start) + subtree:add(buffer(start,count),string.format("ParentLibraryId: %s", parentLibraryId)) + start = start + count + end + + count = 1 + + if version >= "1.2" then + count = 2 + end + + libraryCount = buffer(start,count):le_uint() + if libraryCount == 0 then + txt = "All" + else + txt = "" + end + elements = subtree:add(buffer(start,count),string.format("Library Count: (%d) %s", libraryCount, txt)) + start = start + count + + if (libraryCount > 0) then + count = 1 + for i = 1, libraryCount do + elements:add(buffer(start,count),"Library Number: " .. buffer(start,count):le_uint()) + start = start + count + end + end + -- info + pinfo.cols.info:append (string.format("GELI Count: %s (%d)", txt, libraryCount)) + end -- end if: MSEX/GELI + + -- MSEX/GELT ------------------------------------------------------------------ + -- Get Element Library Thumbnail message + if (buffer(22,4):string() == "GELT") then + start = 26 + + -- Thumbnail Format + count = 4 + thumbnailFormat = buffer(start,count):string() + subtree:add(buffer(start,count),string.format("Thumbnail Format: %s", thumbnailFormat)) + start = start + count + + -- Dimentions + dims, count = MSEX_Dims (buffer, start) + subtree:add(buffer(start,count), string.format("Dimensions: %s", dims)) + start = start + count + + -- Thumbnail Flags + count = 1 + str = "" + current_stat = buffer(start,count):uint() + + if bit.band(current_stat,00000001) > 0 then + str = str .. "Preserve aspect ratio, " + end + if current_stat == "00000000" then + str = "None, " + end + str = string.sub(str,1,-3) -- strip off the final ", " + + subtree:add(buffer(start,count), "Thumbnail Flags: ".."("..current_stat..") "..str) + + -- Library Type + str, count = MSEX_LibraryType (buffer, start) + subtree:add(buffer(start,count),string.format("Library Type: %s",str)) + start = start + count + + -- LibraryCount + count = 1 + + if version == "1.2" then + count = 2 + end + + LibraryCount = buffer(start, count):le_uint() + elements = subtree:add(buffer(start, count), string.format("Library Count: %d", LibraryCount)) + start = start + count + + if (LibraryCount > 0) then + if (version == "1.0") then + -- Library Numbers + count = 1 + for i = 1, LibraryCount do + elements:add(buffer(start,count),"Library Numbers: %d" .. buffer(start,count):le_uint()) + start = start + count + end + else + -- LibraryID + count = 1 + for i = 1, LibraryCount do + str, count = MSEX_LibraryID (buffer, start) + elements:add(buffer(start,count),string.format("Library ID: %s", str)) + start = start + count + end + end + end + + -- info + pinfo.cols.info:append (string.format("GELT %s %s Count: %d", + thumbnailFormat, + dims, + LibraryCount) + ) + end -- end if: MSEX/GELT + + + -- MSEX/GETh ------------------------------------------------------------- + -- Get Element Get Element Thumbnail message + if (buffer(22,4):string() == "GETh") then + start = 26 + + -- Thumbnail Format + count = 4 + thumbnailFormat = buffer(start,count):string() + subtree:add(buffer(start,count), string.format("Thumbnail Format: %s", thumbnailFormat)) + start = start + count + + -- Width x Height + dims, count = MSEX_Dims (buffer, start) + subtree:add(buffer(start,count), string.format("Dimensions: %s", dims)) + start = start + count + + -- Thumbnail Flags + count = 1 + str = "" + current_stat = buffer(start,count):uint() + + if bit.band(current_stat,00000001) > 0 then + str = str .. "Preserve aspect ratio, " + end + if current_stat == "00000000" then + str = "None, " + end + str = string.sub(str,1,-3) -- strip off the final ", " + subtree:add(buffer(start,count), "Thumbnail Flags: ".."("..current_stat..") "..str) + start = start +1 + + -- Library Type + str, count = MSEX_LibraryType (buffer, start) + subtree:add(buffer(start,count),string.format("Library Type: %s",str)) + start = start + count + + if version == "1.0" then + -- Library Numbers + count = 1 + subtree:add(buffer(start,count),"Library Numbers: %d" .. buffer(start,count):le_uint()) + start = start + count + + else + -- LibraryID + LibraryID, count = MSEX_LibraryID (buffer, start) + subtree:add(buffer(start,count),string.format("Library ID: %s", LibraryID)) + start = start + count + end + + -- Element Count + count = 1 + + if version == "1.2" then + count = 2 + end + + element_count = buffer(start,count):le_uint() + element_tree = subtree:add(buffer(start,count),string.format("Element Count: %d", element_count)) + start = start + count + + -- Element Numbers + for i = 1, element_count do + -- LibraryID + + count = 1 -- Element Numbers are always 1 byte -- + element = buffer(start,count):uint() + element_tree:add(buffer(start,count),string.format("Element Number: %s", element)) + start = start + count + end + -- info + pinfo.cols.info:append (string.format("GETh %s %s Count: %d", + thumbnailFormat, + dims, + element_count) + ) + + end -- end if: MSEX/GEThT + + -- MSEX/GVSr ------------------------------------------------------------- + -- GetVideoSources + if (buffer(22,4):string() == "GVSr")then + pinfo.cols.info:append (string.format("GVSr")) + end -- end if: MSEX/GVSr + + -- MSEX/VSrc ------------------------------------------------------------- + -- Video Sources + if (buffer(22,4):string() == "VSrc")then + start = 26 + + -- Source Count + count = 2 + sourceCount = buffer(start,count):le_uint() + subtree:add(buffer(start,count), string.format("Source Count: %d", sourceCount)) + start = start + count + + -- Source Info + source = {} + for i = 1, sourceCount do + -- SourceID + count = 2 + sourceID = buffer(start,count):le_uint() + source[i] = subtree:add(buffer(start,count), string.format("SourceID: %d", sourceID)) + start = start + count + + -- Source Name + str, count = ucs2ascii(start, buffer) -- convert the usc2 to faux ASCII + source[i]:add(buffer(start,count), string.format("Name: %s", str)) + start = start + count + + -- Physical Output + count = 1 + if buffer(start,count):le_uint() < 255 then + str = buffer(start,count):le_uint() + else + str = "(NONE)" + end + source[i]:add(buffer(start,count), string.format("Physical Out: %s",str)) + start = start + count + + -- Layer Number + count = 1 + if buffer(start,count):le_uint() < 255 then + str = buffer(start,count):le_uint() + else + str = "(NONE)" + end + source[i]:add(buffer(start,count), string.format("Layer Number: %s",str)) + start = start + count + + -- Flags + count = 2 + str = "" + current_stat = buffer(start,count):le_uint() + + if bit.band(current_stat,00000001) > 0 then + str = str .. "Without effects, " + end + if current_stat == 0 then + str = "None, " + end + str = string.sub(str,1,-3) -- strip off the final ", " + + source[i]:add(buffer(start,count), string.format("Flags: %s",str)) + start = start + count + + -- Width x Height + dim, count = MSEX_Dims (buffer, start) + source[i]:add(buffer(start,count), string.format("Dimensions: %s",dim)) + start = start + count + + + end + + pinfo.cols.info:append (string.format("VSrc")) + end -- end if: MSEX/VSrc + + end -- end if : MSEX + +end -- end function citp_proto.dissector + + + + + +-- --------------------------------------------------------------------- +-- Formatters +-- --------------------------------------------------------------------- + +-- u2 to ascii +function ucs2ascii(start, buffer) + count = 0 + str="" + while buffer(start+count,1):uint() ~= 0 do + str = str .. buffer(start+count,1):string() + count = count + 2 + end + count = count + 2 + + return str, count +end + +-- MSEX_LibraryID formatter +function MSEX_LibraryID (buffer, start) + str = string.format("%d,%d,%d,%d", + buffer(start,1):uint(), + buffer(start+1,1):uint(), + buffer(start+2,1):uint(), + buffer(start+3,1):uint() + ) + return str, 4 --string, count +end + +-- MSEX_Dims formatter +function MSEX_Dims (buffer, start) + -- Width + count = 2 + width = buffer(start,count):le_uint() + + -- Height + height = buffer(start+2,count):le_uint() + + -- Width x Height + count = 4 + str = string.format("%dx%d", width, height) + start = start + count + return str, 4 --string, count +end + +-- MSEX_LibraryType formatter +function MSEX_LibraryType (buffer, start) + libraryType = buffer(start,1):le_uint() + if (libraryType == 1) then libraryType_name = "Media" + elseif (libraryType == 2) then libraryType_name = "Effects" + end + str = string.format("(%d) %s",libraryType,libraryType_name) + + return str, 1 -- string, count +end + +-- Add TCP Port +-- port is based in PINF listen port +function CITP_add_port (port) + if port > 0 then + if not found_ports [port] then + found_ports [port] = true + tcp_table:add (port,citp_proto) + win_log = string.format("Added CITP Port: %d\n", port) + if win == nil then + win = TextWindow.new("CITP dissector "..dissector_version.." ("..dissector_date..")") + end + + win:append(win_log) + win_log = "" + end + end +end + + +-- always using UDP 4809 +udp_table:add(4809,citp_proto) + +--Debug, Add Mbox +--CITP_add_port(6436) -- PRG Mbox +--CITP_add_port(4011) -- Arkaos Media Master \ No newline at end of file diff --git a/dissectors/civ7200-credible58/LICENSE b/dissectors/civ7200-credible58/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/civ7200-credible58/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/civ7200-credible58/README.md b/dissectors/civ7200-credible58/README.md new file mode 100644 index 0000000..bfb021e --- /dev/null +++ b/dissectors/civ7200-credible58/README.md @@ -0,0 +1,83 @@ +# CI-V IC-7200 — commande de l'émetteur-récepteur ICOM IC-7200 (USB) + +Postdissecteur Wireshark Lua du protocole CI-V d'ICOM, dans la variante +de l'émetteur-récepteur IC-7200, écrit par credible58 (« pjo »). Il lit +les messages CI-V (délimiteurs `FE FE` … `FD`) transportés dans les +transferts USB « bulk » entre l'ordinateur et le poste, et affiche +adresses, commande, sous-commande, fréquence, mode et filtre (issue #952). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/credible58/civ7200 (`civ7200.lua`) | +| Commit importé | `79c54199ce818e40cd18ff35ab72b2094f6355a8` du 16/02/2020 (dernier commit de la branche par défaut `master`) ; dernière modification du fichier : `135d49bdc838abda32c1b364cac9e9396b8aa3f8` du 26/12/2019 | +| Licence amont | GNU GPL v3, indiquée dans l'en-tête du fichier (« License - GNU GPL v3 », lignes 11 et 12), sans mention « ou ultérieure » : `GPL-3.0-only` ; pas de fichier de licence dans le dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur CI-V dans `tshark -G protocols` | + +Le dépôt amont ne fournit pas de fichier de licence : le fichier `LICENSE` +de ce dossier est le texte officiel de la GNU GPL v3 +(https://www.gnu.org/licenses/gpl-3.0.txt), ajouté pour accompagner le +fichier importé. Le fichier est repris tel quel (aucune modification ; +espaces en fin de ligne conservés) ; seule l'en-tête de provenance de +cinq lignes est ajoutée en tête de `civ7200.lua` (convention du dépôt, +issue #563). La capture d'exemple du dépôt amont +(`Icom IC-7200 Rig Control Error.zip`, 47 Mo décompressée) n'est pas +importée. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/civ7200.lua` | Tables de valeurs (lignes 25 à 127) ; champs USB lus (lignes 131 à 139) ; protocole `civ7200` (ligne 142) et ses champs (lignes 144 à 164) ; inscription comme postdissecteur (ligne 171) ; table des commandes (ligne 174) ; détection d'un message CI-V (ligne 208) ; décodage BCD de la fréquence (ligne 239) ; dissecteur (ligne 274) | + +## Utilisation + +Copier `src/civ7200.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`), ou le charger par +`-X lua_script:civ7200.lua`, puis ouvrir une capture USB (USBPcap ou +usbmon) du câble de commande du poste. Le décodage n'a lieu qu'au +second passage (`pinfo.visited`, ligne 295) : avec tshark, utiliser +l'option `-2` ; dans Wireshark, il apparaît une fois la capture chargée. +Filtres : `civ7200`, `civ7200.cmd`, `civ7200.frequency`, +`civ7200.opmode`, `civ7200.filtset`… + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, par `-X lua_script:` et dans le +dossier des plugins : chargement sans erreur, protocole `civ7200` +présent dans `tshark -G protocols`. Essais sur la capture d'exemple du +dépôt amont (196 059 trames USB, 430 s), non commitée, et sur une +capture synthétique non commitée : + +| Essai | Résultat | +|---|---| +| Capture amont, un seul passage | Aucune trame `civ7200` (décodage réservé au second passage) | +| Capture amont, `tshark -2`, par `-X lua_script:` et dans le dossier des plugins | 4 543 trames `civ7200`, aucune erreur Lua | +| Lecture de la fréquence (commande 0x03) | « CI-V Cmd: Read operating frequency », « CI-V Echo: … », « CI-V Rsp: Read operating frequency: 28078000 » ; `civ7200.frequency` vaut 28078000, 18104000 ou 14226450 | +| Lecture du mode (0x04) | « CI-V Rsp: Read operating mode: USB mode/Wide » | +| Sous-commandes (0x07, 0x1A, 0x1C) | « Select VFO mode:Select VFO A », « Send and read operations:Send/read DATA mode », « Send/read transceiver status:… » | +| Acquittement du poste | 25 trames « CI-V Ack » | +| Trame UDP synthétique (charge `FE FE 70 E0 03 FD`), `tshark -2` | Erreur Lua « attempt to index a nil value » (ligne 223), sur chaque trame non USB | + +## Limites constatées + +- Sur toute trame qui n'est pas un transfert USB, `usb.data_len` est + absent et le script provoque une erreur Lua (ligne 223) : chargé en + permanence, il ajoute une erreur à chaque trame des autres captures, + au second passage. +- Rien n'est décodé au premier passage (ligne 295) : tshark sans `-2` + n'affiche rien. +- Seul le CI-V sur USB est pris en charge, pas les liaisons série ni le + CI-V transporté sur le réseau. +- Pour les commandes qui ont une sous-commande mais pas de table + (0x08, 0x0E, 0x0F, 0x10, 0x13, 0x14, 0x15, 0x16), le champ et la + table valent 0 (lignes 350 à 355) : erreur Lua prévisible à la + lecture du code, non rencontrée dans la capture amont. +- Les trois champs de sous-commande portent le même nom + `civ7200.subcmd` (lignes 149 à 151) ; l'alerte `civ7200.invalid` + (ligne 167) n'est jamais émise. +- Toutes les variables et fonctions sont globales (`civ_length`, + `cmd_table`, `getCivLength`…), ce qui peut entrer en conflit avec + d'autres scripts. Le script utilise la bibliothèque `bit` fournie par + Wireshark (ligne 252). diff --git a/dissectors/civ7200-credible58/src/civ7200.lua b/dissectors/civ7200-credible58/src/civ7200.lua new file mode 100644 index 0000000..0490664 --- /dev/null +++ b/dissectors/civ7200-credible58/src/civ7200.lua @@ -0,0 +1,419 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/credible58/civ7200 (civ7200.lua), +-- commit 79c54199ce818e40cd18ff35ab72b2094f6355a8 du 16/02/2020 (dernière modification du fichier : +-- commit 135d49bdc838abda32c1b364cac9e9396b8aa3f8 du 26/12/2019). +-- Licence amont : GNU GPL v3 (en-tête du fichier) — voir README.md et LICENSE. +------------------------------------------------- +-- CI-V IC-7200 postdissector -- +------------------------------------------------- + +------------------------------------------------- +-- License - GNU GPL v3 +-- see http://www.gnu.org/licenses/gpl.html +------------------------------------------------- + +------------------------History-------------------------- +-- r1 - pjo - Initial release +-- +--------------------------------------------------------- + +-- Execution controls ------------------------------------- +debug_set = false +go_bang = {} +-- End of Execution Controls ------------------------------ + +VALS_NULL = { + [0] = "" +} + +VALS_OPMODE = { + [0] = "LSB mode", + [1] = "USB mode", + [2] = "AM mode", + [3] = "CW mode", + [4] = "RTTY mode", + [5] = "Unknown mode", + [6] = "Unknown mode", + [7] = "CW-R mode", + [8] = "RTTY-R mode" +} + +VALS_FILTSET = { + [0] = "unknown", + [1] = "Wide", + [2] = "Mid", + [3] = "Narrow" +} + +VALS_SROP = { + [0] = "Send/read memory contents", + [1] = "Send/read band stacking register contents", + [2] = "Send/read the selected filter width", + [3] = "Send/read various", + [4] = "Send/read DATA mode", + [5] = "Send/read Sharp/Soft selection", + [6] = "Send/read manual notch width" +} + +VALS_CMD = { + [0] = "Send frequency data", + [1] = "Select transceive mode", + [2] = "Read band edge frequency", + [3] = "Read operating frequency", + [4] = "Read operating mode", + [5] = "Set operating frequency", + [6] = "Select operating mode", + [7] = "Select VFO mode", + [8] = "Select memory mode / channel", + [9] = "Memory write", + [10] = "Memory to VFO", + [11] = "Memory clear", + [12] = "Unknown command", + [13] = "Unknown command", + [14] = "Scan control", + [15] = "Split function", + [16] = "Select tuning steps", + [17] = "Control attenuator", + [18] = "Unknown command", + [19] = "Voice synthesizer control", + [20] = "Set levels", + [21] = "Read squelch and meters", + [22] = "Control transceiver operations", + [23] = "Unknown command", + [24] = "Unknown command", + [25] = "Read transceiver ID", + [26] = "Send and read operations", + [27] = "Unknown command", + [28] = "Send/read transceiver status" +} + +-- format of entry: subcmd, has_subsub_cmd, reserved, description +subcmd_opmode_table= { + { 0x00, 0, 0, "LSB mode" }, + { 0x01, 0, 0, "USB mode" }, + { 0x02, 0, 0, "AM mode" }, + { 0x03, 0, 0, "CW mode" }, + { 0x04, 0, 0, "RTTY mode" }, + { 0x05, 0, 0, "Unknown mode" }, + { 0x06, 0, 0, "Unknown mode" }, + { 0x07, 0, 0, "CW-R mode" }, + { 0x08, 0, 0, "RTTY-R mode" }, + { 0xff, 0, 0, "end of table" } +} + +subcmd_vfomode_table= { + { 0x00, 0, 0, "Select VFO A" }, + { 0x01, 0, 0, "Select VFO B" }, + { 0xa0, 0, 0, "Equalize VFO A and VFO B" }, + { 0xb0, 0, 0, "Exchange VFO A and VFO B" }, + { 0xff, 0, 0, "end of table" } +} + +subcmd_srop_table = { + { 0x00, 0, 0, "Send/read memory contents" }, + { 0x01, 0, 0, "Send/read band stacking register contents" }, + { 0x02, 0, 0, "Send/read the selected filter width" }, + { 0x03, 1, 0, "Send/read various" }, + { 0x04, 0, 0, "Send/read DATA mode" }, + { 0x05, 0, 0, "Send/read Sharp/Soft selection" }, + { 0x06, 0, 0, "Send/read manual notch width" }, + { 0xff, 0, 0, "end of table" } +} + +subcmd_transtuner_table= { + { 0x00, 0, 0, "Send/read the transceiver’s status" }, + { 0x01, 0, 0, "Send/read antenna tuner" }, + { 0xff, 0, 0, "end of table" } +} + +-- declare the extractors for some Fields to be read +-- these work like getters +frame_number_f = Field.new("frame.number") +usb_src_f = Field.new("usb.src") +usb_dst_f = Field.new("usb.dst") +usb_direction_f = Field.new("usb.irp_info.direction") -- 0 = H->D and 1 = D->H +usb_transfer_type_f = Field.new("usb.transfer_type") +usb_data_len_f = Field.new("usb.data_len") +usbms_dCBWSignature_f = Field.new("usbms.dCBWSignature") +usbms_dCSWSignature_f = Field.new("usbms.dCSWSignature") +civ_msg_f = Field.new("usb.capdata") + +-- declare the civ7200 as a protocol +civ7200 = Proto("civ7200","CI-V 7200 Postdissector") + +civ_delim_start = ProtoField.uint16("civ7200.delim_start", "Start Delimiter", base.HEX) +civ_dst_addr = ProtoField.uint8("civ7200.dst_addr", "Destination Address", base.HEX) +civ_src_addr = ProtoField.uint8("civ7200.src_addr", "Source Address", base.HEX) +civ_cmd = ProtoField.uint8("civ7200.cmd", "Command", base.HEX, VALS_CMD) + +civ_subcmd01 = ProtoField.uint8("civ7200.subcmd", "Sub-command", base.HEX, VALS_OPMODE) +civ_subcmd06 = ProtoField.uint8("civ7200.subcmd", "Sub-command", base.HEX, VALS_OPMODE) +civ_subcmd26 = ProtoField.uint8("civ7200.subcmd", "Sub-command", base.HEX, VALS_SROP) + +civ_data = ProtoField.string("civ7200.data", "Data") +civ_opmode = ProtoField.uint8("civ7200.opmode", "Data", base.HEX, VALS_OPMODE) +civ_filtset = ProtoField.uint8("civ7200.filtset", "Data", base.HEX, VALS_FILTSET) + +civ_delim_end = ProtoField.uint8("civ7200.delim_end", "End Delimiter", base.HEX) +civ_freq = ProtoField.uint32("civ7200.frequency", "Frequency", base.DEC) +civ7200.fields = { + civ_delim_start, civ_dst_addr, civ_src_addr, civ_cmd, + civ_subcmd01, civ_subcmd06, civ_subcmd26, + civ_opmode, civ_filtset, + civ_data, civ_freq, civ_delim_end +} + + +civ7200_invalid = ProtoExpert.new("civ7200.invalid", "civ7200 Invalid CI-V message", expert.group.SEQUENCE, expert.severity.WARN) +civ7200.experts = {civ7200_invalid} + +-- register our postdissector +register_postdissector(civ7200) + +-- format of entry: cmd, has_subcmd, subcmd_table, description +cmd_table = { + { 0x00, 0, 0, "Send frequency data", 0 }, + { 0x01, 1, subcmd_opmode_table, "Select transceive mode", civ_subcmd01 }, + { 0x02, 0, 0, "Read band edge frequency", 0 }, + { 0x03, 0, 0, "Read operating frequency", 0 }, + { 0x04, 0, 0, "Read operating mode", 0 }, + { 0x05, 0, 0, "Set operating frequency", 0 }, + { 0x06, 1, subcmd_opmode_table, "Select operating mode", civ_subcmd06 }, + { 0x07, 1, subcmd_vfomode_table, "Select VFO mode", 0 }, + { 0x08, 1, 0, "Select memory mode / channel", 0 }, + { 0x09, 0, 0, "Memory write", 0 }, + { 0x0a, 0, 0, "Memory to VFO", 0 }, + { 0x0b, 0, 0, "Memory clear", 0 }, + { 0x0e, 1, 0, "Scan control", 0 }, + { 0x0f, 1, 0, "Split function", 0 }, + { 0x10, 1, 0, "Select tuning steps", 0 }, + { 0x11, 0, 0, "Control attenuator", 0 }, + { 0x13, 1, 0, "Voice synthesizer control", 0 }, + { 0x14, 1, 0, "Set levels", 0 }, + { 0x15, 1, 0, "Read squelch and meters", 0 }, + { 0x16, 1, 0, "Control transceiver operations", 0 }, + { 0x19, 0, 0, "Read transceiver ID", 0 }, + { 0x1a, 1, subcmd_srop_table, "Send and read operations", civ_subcmd26 }, + { 0x1c, 1, subcmd_transtuner_table, "Send/read transceiver status", 0 }, + { 0xff, 0, 0, "end of table", 0 } +} + +-- This function gets called when a new trace file is loaded +function civ7200.init() + if debug_set then print("Entering: civ7200.init()") end +end + +-- This function returns a non-zero length is this is a valid CI-V message + +function getCivLength(buffer) + if debug_set then print("Entering: civ7200.packet_check()") end + + local is_usbms = usbms_dCSWSignature_f() + + if is_usbms then + return 0 + end + + local is_usbms = usbms_dCBWSignature_f() + + if is_usbms then + return 0 + end + + civ_length = usb_data_len_f().value + + if civ_length >= 6 then + if tonumber(usb_transfer_type_f().value) == 3 then + local ptr = buffer:len() - civ_length + tvbr = buffer:range(ptr,2) -- set up a range + local delim = tvbr:uint() -- extract the bytes + if delim == 0xfefe then + return civ_length + end + end + end + + return 0 +end + +function get_freq_u32(buffer, ptr) + local freq_u32 = 0 + local tvbr + local byte_in_hex + + -- in case we enter here by mistake we need to make sure + -- we have enough bytes to consume + if (ptr + 4) > (buffer:len() - 1) then + return 0 + end + + tvbr = buffer:range(ptr+4,1) -- set up a range + byte_in_hex = tvbr:uint() -- extract the byte + freq_u32 = freq_u32 + (bit.rshift(byte_in_hex, 4) * 1000000000) + freq_u32 = freq_u32 + (bit.band(byte_in_hex,0x0f) * 100000000) + tvbr = buffer:range(ptr+3,1) -- set up a range + byte_in_hex = tvbr:uint() -- extract the byte + freq_u32 = freq_u32 + (bit.rshift(byte_in_hex, 4) * 10000000) + freq_u32 = freq_u32 + (bit.band(byte_in_hex,0x0f) * 1000000) + tvbr = buffer:range(ptr+2,1) -- set up a range + byte_in_hex = tvbr:uint() -- extract the byte + freq_u32 = freq_u32 + (bit.rshift(byte_in_hex, 4) * 100000) + freq_u32 = freq_u32 + (bit.band(byte_in_hex,0x0f) * 10000) + tvbr = buffer:range(ptr+1,1) -- set up a range + byte_in_hex = tvbr:uint() -- extract the byte + freq_u32 = freq_u32 + (bit.rshift(byte_in_hex, 4) * 1000) + freq_u32 = freq_u32 + (bit.band(byte_in_hex,0x0f) * 100) + tvbr = buffer:range(ptr+0,1) -- set up a range + byte_in_hex = tvbr:uint() -- extract the byte + freq_u32 = freq_u32 + (bit.rshift(byte_in_hex, 4) * 10) + freq_u32 = freq_u32 + (bit.band(byte_in_hex,0x0f) * 1) + + return freq_u32 +end + +function civ7200.dissector(buffer,pinfo,tree) + + local info_text + local civ_msg + local cmd + local civ_dstaddr + local civ_srcaddr + local ptr = 0 + local data_offset + local tvbr + local frequency -- string version of the fequency + local subcmd_table + local cmd_string + local subcmd_string + local subcmd_vals + local i -- cmd_table index + local j -- subcmd_table index + + local length = buffer:len() + if length == 0 then return end + + if pinfo.visited then + civ_length = getCivLength(buffer) + + if civ_length > 0 then + if debug_set then print("Processing CI-V message") end + pinfo.cols.protocol = civ7200.name + + vals = {} + ptr = length - civ_length + + local subtree = tree:add(civ7200, buffer(), "CI-V Protocol") + + ptr = length - civ_length + subtree:add(civ_delim_start, buffer(ptr,2)) + ptr = ptr + 2 + subtree:add(civ_dst_addr, buffer(ptr,1)) + tvbr = buffer:range(ptr,1) -- set up a range + civ_dstaddr = tvbr:uint() -- extract the bytes + ptr = ptr + 1 + subtree:add(civ_src_addr, buffer(ptr,1)) + tvbr = buffer:range(ptr,1) -- set up a range + civ_srcaddr = tvbr:uint() -- extract the bytes + ptr = ptr + 1 + + tvbr = buffer:range(ptr,1) -- set up a range + cmd = tvbr:uint() -- extract the bytes + subtree:add(civ_cmd, buffer(ptr,1)) + ptr = ptr + 1 + + local has_subcmd = false + i = 1 + j = 1 + cmd_string = "" + subcmd_string = "" + + -- look up command details + while(cmd_table[i][1] ~= 0xff) + do + if cmd_table[i][1] == cmd then + cmd_string = cmd_table[i][4] + if cmd_table[i][2] == 1 then + has_subcmd = true + subcmd_table = cmd_table[i][3] + subcmd_vals = cmd_table[i][5] + break; + end + end + i = i + 1 + end + + -- process sub cmd + if has_subcmd == true then + tvbr = buffer:range(ptr,1) -- set up a range + subcmd = tvbr:uint() -- extract the bytes + + proto_field = cmd_table[i][5] + subtree:add(proto_field, buffer(ptr,1)) + ptr = ptr + 1 + + if subcmd_table then + while(subcmd_table[j][1] ~= 0xff) + do + if subcmd_table[j][1] == subcmd then + subcmd_string = subcmd_table[j][4] + end + j = j + 1 + end + end + + cmd_string = cmd_string .. ":" .. subcmd_string + end + + data_offset = ptr + data_len = length - data_offset - 1 + if data_len > 0 then + tvbr = buffer:range(ptr,data_len) -- set up a range + local civ_payload = tvbr:bytes() -- extract the bytes + + if(cmd == 0x00 or cmd == 0x02 or cmd == 0x03 or cmd == 0x05) then + freq = get_freq_u32(buffer, ptr) + subtree:add(civ_freq, freq) + cmd_string = cmd_string .. ": " .. freq + else + subtree:add(civ_data, tostring(civ_payload)) + end + ptr = ptr + data_len + + if(cmd == 0x04 and civ_dstaddr == 0xE0) then + tvbr = buffer:range(data_offset,1) -- set up a range + subtree:add(civ_opmode, tvbr:uint()) + cmd_string = cmd_string .. ": " .. VALS_OPMODE[tvbr:uint()] + + tvbr = buffer:range(data_offset+1,1) -- set up a range + subtree:add(civ_filtset, tvbr:uint()) + cmd_string = cmd_string .. "/" .. VALS_FILTSET[tvbr:uint()] + end + end + + subtree:add(civ_delim_end, buffer(ptr,1)) + + -- Set the Info column text + if civ_srcaddr == 0xE0 then + if tonumber(usb_direction_f().value) == 1 then + info_text = "CI-V Echo: " .. cmd_string + else + info_text = "CI-V Cmd: " .. cmd_string + end + else + if cmd_string == "" then + info_text = "CI-V Ack" + else + info_text = "CI-V Rsp: " .. cmd_string + end + end + + pinfo.cols.info:set(info_text) + pinfo.cols.info:fence() + else + if debug_set then print("SNAP02") end + end + + if debug_set then print("SNAP03") end + end +end + diff --git a/dissectors/coap-dtls-heur/LICENSE b/dissectors/coap-dtls-heur/LICENSE new file mode 100644 index 0000000..6c60138 --- /dev/null +++ b/dissectors/coap-dtls-heur/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Manuel Sangoï + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/coap-dtls-heur/README.md b/dissectors/coap-dtls-heur/README.md new file mode 100644 index 0000000..5b6e9da --- /dev/null +++ b/dissectors/coap-dtls-heur/README.md @@ -0,0 +1,46 @@ +# CoAP sur DTLS (heuristique sur le trafic DTLS déchiffré) + +Petit dissecteur heuristique Wireshark Lua qui fait décoder **en CoAP toute +charge DTLS déchiffrée**, quel que soit le port : il s'enregistre comme +heuristique du protocole `dtls` et passe la charge au dissecteur CoAP natif +de Wireshark. Utile pour les objets connectés (LwM2M, OSCORE…) qui parlent +CoAPS sur un port non standard, une fois les clés DTLS (PSK ou fichier de +clés) fournies à Wireshark. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/msangoi/dtls-coap-dissector (fichier `dtls-coap-hdissector.lua`) | +| Commit importé | `f1d033f64251179629d5b35b052aa1fff60d5c00` du 03/11/2016 (branche `master`, dernier commit, qui modifie aussi le dissecteur) | +| Licence amont | MIT (`LICENSE` amont, © 2016 Manuel Sangoï) | +| Natif Wireshark 4.6.4 | En partie — le dissecteur CoAP natif (`packet-coap.c`) décode déjà CoAP sur DTLS, mais seulement sur le port 5684 (`dtls_dissector_add(5684, …)`) ; ce script étend cela à tous les ports | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `dtls-coap-hdissector.lua` | Protocole `coaps` : heuristique `dtls` → dissecteur `coap` natif (10 lignes) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `dtls-coap-hdissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer +`wireshark -X lua_script:dtls-coap-hdissector.lua -r capture.pcap`, +renseigner les clés DTLS (Préférences → Protocoles → DTLS), puis filtrer +avec `coap`. + +## Remarques + +- **Heuristique sans condition** : la fonction renvoie toujours `true`, donc + toute charge DTLS déchiffrée non attribuée est affichée en CoAP, même s'il + s'agit d'un autre protocole. Ne charger ce script que pour des captures + CoAPS. +- Globales `h_dissector` et `coaps_proto` comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/coap-dtls-heur/dtls-coap-hdissector.lua b/dissectors/coap-dtls-heur/dtls-coap-hdissector.lua new file mode 100644 index 0000000..9143fc9 --- /dev/null +++ b/dissectors/coap-dtls-heur/dtls-coap-hdissector.lua @@ -0,0 +1,15 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/msangoi/dtls-coap-dissector (dtls-coap-hdissector.lua), +-- commit f1d033f64251179629d5b35b052aa1fff60d5c00 du 03/11/2016. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +local original_coap_dissector = Dissector.get("coap") + +function h_dissector(buffer,pinfo,tree) + original_coap_dissector:call(buffer, pinfo, tree) + return true +end + +-- register an heuristic dissector in charge of decoding all decrypted payload as CoAP data +coaps_proto = Proto("coaps","CoAP over DTLS") +coaps_proto:register_heuristic("dtls", h_dissector) + diff --git a/dissectors/coap18-okleine/README.md b/dissectors/coap18-okleine/README.md new file mode 100644 index 0000000..247b25e --- /dev/null +++ b/dissectors/coap18-okleine/README.md @@ -0,0 +1,51 @@ +# CoAP « coap18 » (dissecteur Lua historique) + +Dissecteur Wireshark Lua **historique** (2014-2016) du protocole **CoAP** +(Constrained Application Protocol, RFC 7252 — alias draft 18) avec les +extensions **Observe** (RFC 7641) et **transfert par blocs** (draft 18) : +en-tête (version, type CON/NON/ACK/RST, longueur du jeton, code, ID de +message), jeton, options (Uri-Path, Uri-Query, Content-Format, Observe, +Block1/Block2, ETag, Max-Age…) et charge utile, sur UDP 5683. Il expose de +nombreux champs filtrables sous le préfixe `coap18.*` +(ex. `coap18.options.uripath == "test"`). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/okleine/coap-lua (fichier `coap18.lua`) | +| Commit importé | `f2869947cdd09f7b1f8a8fbbde37070ad5b4060c` du 12/04/2016 (branche `master`, dernier commit ; dernière modification du dissecteur : `9bfa872` du 12/04/2016) | +| Licence amont | BSD-3-Clause — texte de la licence BSD à 3 clauses en en-tête du fichier (« Copyright (c) 2014, Oliver Kleine, Institute of Telematics, University of Luebeck »), conservé ; pas de fichier LICENSE dans le dépôt | +| Natif Wireshark 4.6.4 | **Oui** — dissecteur natif `coap` (RFC 7252, Observe, Block, OSCORE, CoAP sur TCP/TLS/WebSocket…) ; ce script Lua est à considérer comme obsolète ou pédagogique | + +Le texte de la licence est celui de l'en-tête du fichier `coap18.lua` +(aucun fichier `LICENSE` séparé n'existe en amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `coap18.lua` | Protocole `coap18` (UDP 5683) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `coap18.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `coap18`. Dans la plupart des cas, le dissecteur natif `coap` +suffit. + +## Remarques + +- **Remplace le dissecteur CoAP natif sur UDP 5683** une fois chargé + (`udp.port` 5683 réattribué à `coap18`). +- **`bit32` absent des Wireshark récents** : le décodage de la longueur du + jeton et des options appelle `bit32.band` et `bit32.rshift`, bibliothèque + de Lua 5.2 absente par défaut de Lua 5.3 et 5.4, seules versions prises en + charge depuis Wireshark 4.4 (qui fournit `bit` à la place). Sans `bit32` + global, la dissection échoue dès le premier paquet ; contournement local : + ajouter `bit32 = bit` en tête du fichier (code amont non modifié ici). +- Variables globales `coapProto` et `udp_table` comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/coap18-okleine/coap18.lua b/dissectors/coap18-okleine/coap18.lua new file mode 100644 index 0000000..9faf17c --- /dev/null +++ b/dissectors/coap18-okleine/coap18.lua @@ -0,0 +1,463 @@ +-- SPDX-License-Identifier: BSD-3-Clause +-- Importé de https://github.com/okleine/coap-lua (coap18.lua), +-- commit f2869947cdd09f7b1f8a8fbbde37070ad5b4060c du 12/04/2016. +-- Licence amont : BSD-3-Clause — voir README.md. +--[[ +Copyright (c) 2014, Oliver Kleine, Institute of Telematics, University of Luebeck +All rights reserved + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following + disclaimer. + + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + + - Neither the name of the University of Luebeck nor the names of its contributors may be used to endorse or promote + products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +]] + +do + coapProto = Proto("coap18","CoAP (RFCs 7252, RFC 7641, and blockwise transfer)") + + --message types + local types = { + [0]="CON", + [1]="NON", + [2]="ACK", + [3]="RST" + } + + --message codes + local codes = { + [0]="EMPTY", + + --request codes + [1]="GET", + [2]="POST", + [3]="PUT", + [4]="DELETE", + + --response codes + [65]="2.01 Created", + [66]="2.02 Deleted", + [67]="2.03 Valid", + [68]="2.04 Changed", + [69]="2.05 Content", + [95]="2.31 Continue", + [128]="4.00 Bad Request", + [129]="4.01 Unauthorized", + [130]="4.02 Bad Option", + [131]="4.03 Forbidden", + [132]="4.04 Not Found", + [133]="4.05 Method Not Allowed", + [134]="4.06 Not Acceptable", + [136]="4.08 Request Entitiy Incomplete", + [140]="4.12 Precondition Failed", + [141]="4.13 Request Entity Too Large", + [143]="4.15 Unsupported Content-Format", + [160]="5.00 Internal Server Error", + [161]="5.01 Not Implemented", + [162]="5.02 Bad Gateway", + [163]="5.03 Service Unavailable", + [164]="5.04 Gateway Timeout", + [165]="5.05 Proxying Not Supported" + } + + -- human readable names for predefined content formats + local formatStrings = { + [0]="text/plain; charset=utf-8", + [40]="application/link-format", + [41]="application/xml", + [42]="application/octet-stream", + [47]="application/exi", + [50]="application/json" + } + + -- decoded blocksizes (from SZX) + local blocksize = { + [0] = "16 Byte", + [1] = "32 Byte", + [2] = "64 Byte", + [3] = "128 Byte", + [4] = "256 Byte", + [5] = "512 Byte", + [6] = "1024 Byte" + } + + -- more blocks expected + local moreblocks = { + [0] = "false", + [1] = "true" + } + + -- create fields + local f = coapProto.fields + + -- header fields + f.version = ProtoField.uint8 ("coap18.version", "Version", nil, nil, 0xC0) + f.type = ProtoField.uint8 ("coap18.type", "Type", nil, types, 0x30) + f.tkl = ProtoField.uint8 ("coap18.tkl", "Token Length", nil, nil, 0x0F) + f.code = ProtoField.uint8 ("coap18.code", "Code", nil, codes) + f.msgid = ProtoField.uint16 ("coap18.msgid", "Message ID (decimal)", base.DEC) + f.token = ProtoField.bytes ("coap18.token", "Token") + + -- core protocol option fields + f.options = ProtoField.string("coap18.options", "Options") + f.ifmatch = ProtoField.bytes("coap18.options.ifmatch", "If-Match (No. 1)") + f.urihost = ProtoField.string("coap18.options.urihost", "URI-Host (No. 3)") + f.etag = ProtoField.bytes("coap18.options.etag", "ETAG (No. 4)") + f.ifnonematch = ProtoField.string("coap18.options.ifnonematch", "If-None-Match (No. 5)") + f.uriport = ProtoField.uint16("coap18.options.uriport", "URI-Port (No. 7)") + f.locationpath = ProtoField.string("coap18.options.locationpath", "Location Path (No. 8)") + f.uripath = ProtoField.string("coap18.options.uripath", "URI-Path (No. 11)") + f.contentformat = ProtoField.uint16("coap18.options.contentformat", "Content-Format (No. 12)", nil, formatStrings) + f.maxage = ProtoField.uint32("coap18.options.maxage", "Max-Age (No. 14)") + f.uriquery = ProtoField.string("coap18.options.uriquery", "URI-Query (No. 15)") + f.accept = ProtoField.uint16("coap18.options.accept", "Accept (No. 17)", nil, formatStrings) + f.locationquery = ProtoField.string("coap18.options.locationquery", "Location-Query (No. 20)") + f.proxyuri = ProtoField.string("coap18.options.proxyuri", "Proxy-URI (No. 35)") + f.proxyscheme = ProtoField.string("coap18.options.proxyscheme", "Proxy-Scheme (No. 39)") + f.size1 = ProtoField.uint32("coap18.options.size1", "Size1 (No. 60)") + + -- observe extension fields + f.observe = ProtoField.uint24("coap18.options.observe", "Observe (No. 6)") + + -- blockwise transfer extension fields + f.block2 = ProtoField.bytes("coap18.options.block2", "Block2 (No. 23)") + f.block2num24 = ProtoField.uint24("coap18.options.block2.num", "NUM", nil, nil, 0xFFFFF0) + f.block2num16 = ProtoField.uint16("coap18.options.block2.num", "NUM", nil, nil, 0xFFF0) + f.block2num8 = ProtoField.uint8("coap18.options.block2.num", "NUM", nil, nil, 0xF0) + f.block2m = ProtoField.uint8("coap18.options.block2.m", "M", nil, moreblocks, 0x08) + f.block2szx = ProtoField.uint8("coap18.options.blok2.szx", "SZX", nil, blocksize, 0x07) + + f.block1 = ProtoField.bytes("coap18.options.block1", "Block1 (No. 27)") + f.block1num24 = ProtoField.uint24("coap18.options.block1.num", "NUM", nil, nil, 0xFFFFF0) + f.block1num16 = ProtoField.uint16("coap18.options.block1.num", "NUM", nil, nil, 0xFFF0) + f.block1num8 = ProtoField.uint8("coap18.options.block1.num", "NUM", nil, nil, 0xF0) + f.block1m = ProtoField.uint8("coap18.options.block1.m", "M", nil, moreblocks, 0x08) + f.block1szx = ProtoField.uint8("coap18.options.block1.szx", "SZX", nil, blocksize, 0x07) + + f.size2 = ProtoField.uint32("coap18.options.size2", "Size2 (No. 28)") + + -- the message payload field + f.payload = ProtoField.string("coap18.payload", "Content") + + + --function to dissect the bytes + function coapProto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "CoAP (RFC 7252)" + local protoTree = tree:add(coapProto, buffer(), "Constrained Application Protocol") + + local isRequest = not ((buffer(1, 1):uint() > 4)) + + protoTree:add(f.version, buffer(0, 1)) + protoTree:add(f.type, buffer(0, 1)) + protoTree:add(f.tkl, buffer(0, 1)) + protoTree:add(f.code, buffer(1, 1)) + protoTree:add(f.msgid, buffer(2, 2)) + + local tokenLength = bit32.band(buffer(0, 1):uint(), 0x0F) + local index = 4 + + -- read the token (if any) + if tokenLength > 0 and tokenLength <= 8 then + protoTree:add(f.token, buffer(index, tokenLength)) + end + index = index + tokenLength + + --dissect options + if(index < buffer:len()) then + local endOfOptions = buffer(index, 1):uint() == 0xFF + if (not endOfOptions) then + local optionsTree = protoTree:add(f.options) + local lastOption = 0 + + -- loop over options until buffer ends or end-of-options marker is reached + while (index < buffer:len()) and (not endOfOptions) do + + local optionHeader = buffer(index, 1):uint() + index = index + 1 + + local optionDelta = bit32.rshift(bit32.band(optionHeader, 0xF0), 4) + local optionLength = bit32.band(optionHeader, 0x0F) + + -- check for end-of-options marker, i.e. there are no more options + if (optionHeader == 0xFF) then + endOfOptions = true + optionLength = 0 + + -- there is another option + else + local optionHeaderLength = 1 + + -- check if extended option delta is used + if (optionDelta == 0x0D) then + optionDelta = buffer(index, 1):uint() + 13 + index = index + 1 + optionHeaderLength = optionHeaderLength + 1 + + elseif (optionDelta == 0x0E) then + optionDelta = buffer(index, 2):uint() + 269 + index = index + 2 + optionHeaderLength = optionHeaderLength + 2 + + end + + -- check if extended option length is used + if (optionLength == 0x0D) then + optionLength = buffer(index, 1):uint() + 13 + index = index + 1 + optionHeaderLength = optionHeaderLength + 1 + + elseif (optionLength == 0x0E) then + optionLength = buffer(index, 2):uint() + 269 + index = index + 2 + optionHeaderLength = optionHeaderLength + 2 + end + + local optionNumber = lastOption + optionDelta + local optionStart = index + + local minOptionLength + local maxOptionLength + local optionSubTree + + -- If-Match + if (optionNumber == 1) then + optionSubTree = optionsTree:add(f.ifmatch, buffer(optionStart, optionLength)) + + minOptionLength = 0 + maxOptionLength = 8 + + -- URI-Host + elseif (optionNumber == 3) then + optionSubTree = optionsTree:add(f.urihost, buffer(optionStart, optionLength)) + + minOptionLength = 1 + maxOptionLength = 255 + + -- ETAG + elseif (optionNumber == 4) then + optionSubTree = optionsTree:add(f.etag, buffer(optionStart, optionLength)) + + minOptionLength = 1 + maxOptionLength = 8 + + -- If-None-Match + elseif (optionNumber == 5) then + optionSubTree = optionsTree:add(f.ifnonematch, "") + + minOptionLength = 0 + maxOptionLength = 0 + + -- Observe + elseif (optionNumber == 6) then + print("Option No. 6") + if(optionLength == 0) then + optionSubTree = optionsTree:add(f.observe, 0) + else + optionSubTree = optionsTree:add(f.observe, buffer(optionStart, optionLength)) + end + + minOptionLength = 0 + maxOptionLength = 3 + + -- URI-Port + elseif (optionNumber == 7) then + if(optionLength == 0) then + optionSubTree = optionsTree:add(f.uriport, 0) + else + optionSubTree = optionsTree:add(f.uriport, buffer(optionStart, optionLength)) + end + + minOptionLength = 0 + maxOptionLength = 2 + + -- Location-Path + elseif (optionNumber == 8) then + optionSubTree = optionsTree:add(f.locationpath, buffer(optionStart, optionLength)) + + minOptionLength = 0 + maxOptionLength = 255 + + -- URI-Path + elseif (optionNumber == 11) then + optionSubTree = optionsTree:add(f.uripath, buffer(optionStart, optionLength)) + + minOptionLength = 0 + maxOptionLength = 255 + + -- Content-Format + elseif (optionNumber == 12) then + if(optionLength == 0) then + optionSubTree = optionsTree:add(f.contentformat, 0) + else + optionSubTree = optionsTree:add(f.contentformat, buffer(optionStart, optionLength)) + end + + minOptionLength = 0 + maxOptionLength = 2 + + -- Max-Age + elseif (optionNumber == 14) then + if(optionLength == 0) then + optionSubTree = optionsTree:add(f.maxage, 0) + else + optionSubTree = optionsTree:add(f.maxage, buffer(optionStart, optionLength)) + end + + minOptionLength = 0 + maxOptionLength = 4 + + -- URI-Query + elseif (optionNumber == 15) then + optionSubTree = optionsTree:add(f.uriquery, buffer(optionStart, optionLength)) + + minOptionLength = 0 + maxOptionLength = 255 + + -- Accept + elseif (optionNumber == 17) then + if(optionLength == 0) then + optionSubTree = optionsTree:add(f.accept, 0) + else + optionSubTree = optionsTree:add(f.accept, buffer(optionStart, optionLength)) + end + + minOptionLength = 0 + maxOptionLength = 2 + + -- Location-Query + elseif (optionNumber == 20) then + optionSubTree = optionsTree:add(f.locationquery, buffer(optionStart, optionLength)) + + minOptionLength = 0 + maxOptionLength = 255 + + -- Block2 + elseif (optionNumber == 23) then + optionSubTree = optionsTree:add(f.block2, buffer(optionStart, optionLength)) + if(optionLength == 0) then + optionSubTree:add(f.block2num8, 0) + optionSubTree:add(f.block2m, 0) + optionSubTree:add(f.block2szx, 0) + elseif(optionLength > 0 and (not (optionLength > 3))) then + if (optionLength == 1) then + optionSubTree:add(f.block2num8, buffer(optionStart, optionLength)) + elseif (optionLength == 2) then + optionSubTree:add(f.block2num16, buffer(optionStart, optionLength)) + elseif(optionLength == 3) then + optionSubTree:add(f.block2num24, buffer(optionStart, optionLength)) + end + + optionSubTree:add(f.block2m, buffer(optionStart, optionLength)) + optionSubTree:add(f.block2szx, buffer(optionStart, optionLength)) + end + + minOptionLength = 0 + maxOptionLength = 3 + + -- Block1 + elseif (optionNumber == 27) then + optionSubTree = optionsTree:add(f.block1, buffer(optionStart, optionLength)) + if(optionLength == 0) then + optionSubTree:add(f.block1num8, 0) + optionSubTree:add(f.block1m, 0) + optionSubTree:add(f.block1szx, 0) + + elseif(optionLength > 0 and (not (optionLength > 4))) then + if (optionLength == 1) then + optionSubTree:add(f.block1num8, buffer(optionStart, optionLength)) + elseif (optionLength == 2) then + optionSubTree:add(f.block1num16, buffer(optionStart, optionLength)) + elseif(optionLength == 1) then + optionSubTree:add(f.block2num24, buffer(optionStart, optionLength)) + end + + optionSubTree:add(f.block1m, buffer(optionStart, optionLength)) + optionSubTree:add(f.block1szx, buffer(optionStart, optionLength)) + end + + minOptionLength = 0 + maxOptionLength = 3 + + -- Size2 + elseif (optionNumber == 28) then + optionSubTree = optionsTree:add(f.size2, buffer(optionStart, optionLength)) + + minOptionLength = 0 + maxOptionLength = 4 + + -- Proxy-URI + elseif (optionNumber == 35) then + optionSubTree = optionsTree:add(f.proxyuri, buffer(optionStart, optionLength)) + + minOptionLength = 1 + maxOptionLength = 1034 + + -- Proxy-Scheme + elseif (optionNumber == 39) then + optionSubTree = optionsTree:add(f.proxyscheme, buffer(optionStart, optionLength)) + + minOptionLength = 1 + maxOptionLength = 255 + + -- Size1 + elseif (optionNumber == 60) then + if(optionLength == 0) then + optionSubTree = optionsTree:add(f.size1, 0) + else + optionSubTree = optionsTree:add(f.size1, buffer(optionStart, optionLength)) + end + + minOptionLength = 0 + maxOptionLength = 4 + + -- Unknown Option + else + optionsTree:add(buffer(optionStart, optionLength), "Unkown Option No. " .. optionNumber) + + minOptionLength = 0 + maxOptionLength = 65536 + end + + -- Check for option value length constraints + if (optionLength < minOptionLength or optionLength > maxOptionLength) then + optionSubTree:add_expert_info(PI_PROTOCOL, PI_ERROR, "Option value length (" .. optionLength .. ") out of allowed range (min: " .. minOptionLength .. ", max: " .. maxOptionLength ..")") + end + + + lastOption = optionNumber + end + + + index = index + optionLength + end + end + end + + -- if there is more data available, consider this the payload + if index < buffer:len() then + protoTree:add(f.payload, buffer(index, buffer:len() - index)) + end + + end + + -- load the udp.port table + udp_table = DissectorTable.get("udp.port") + + -- register CoAP protocol to handle udp port 5683 + udp_table:add(5683, coapProto) + +end \ No newline at end of file diff --git a/dissectors/crazyflie-cpx/LICENSE b/dissectors/crazyflie-cpx/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dissectors/crazyflie-cpx/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/crazyflie-cpx/README.md b/dissectors/crazyflie-cpx/README.md new file mode 100644 index 0000000..37e9d44 --- /dev/null +++ b/dissectors/crazyflie-cpx/README.md @@ -0,0 +1,74 @@ +# Crazyflie CPX — protocole de l'AI-deck (NanoCockpit) + +Dissecteurs Wireshark Lua du protocole CPX (Crazyflie Packet eXchange). +Ce protocole relie les processeurs du nano-drone Crazyflie et de son +AI-deck (STM32, ESP32, GAP8) à l'ordinateur hôte par Wi-Fi. Ils viennent +du cadriciel NanoCockpit de l'IDSIA. `cpx` décode le transport TCP : +longueur, en-tête de routage avec destination, source, dernier paquet, +fonction et version. `cpx_udp` décode le transport UDP (numéro de +séquence et même en-tête). `cpx_streamer` décode la fonction +`STREAMER` (`0x06`) : début et données d'un tampon d'image, +d'inférence ou de « fog buffer » (issue #529). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/idsia-robotics/nanocockpit (`tools/wireshark/cpx_tcp.lua`, `cpx_udp.lua`, `cpx_streamer.lua`) | +| Commit importé | `741f12b2c4fc7162c019b7932bb8d5b4ddde677b` du 05/05/2026 (dernier commit de `main`) ; dernière modification des trois scripts : commit `1d1487441d68baacfde7ebd099480716047fe2ea` du 05/03/2025 | +| Licence amont | Apache-2.0 : `LICENSE` du dépôt (les scripts portent « Copyright (c) 2023, Elia Cereda, All rights reserved » sans autre mention). `cpx_tcp.lua` et `cpx_udp.lua` reprennent la structure des exemples `dissectFPM.lua` et `dissector.lua` de Wireshark (Hadriel Kaplan, domaine public ou BSD-3-Clause). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur CPX dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Les scripts sont repris tels quels (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête de chacun (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/cpx_tcp.lua` | Protocole `cpx` (« CPX ») sur TCP 5000 (lignes 167 et 507), réassemblage et plusieurs messages par segment ; table `cpx.function` (ligne 289) | +| `src/cpx_udp.lua` | Protocole `cpx_udp` (« CPX UDP ») sur UDP 5000 (lignes 60 et 346), préférence `cpx_udp.port` ; table `cpx_udp.function` (ligne 249) | +| `src/cpx_streamer.lua` | Protocole `cpx_streamer` (ligne 61), inscrit sous la fonction `0x06` des deux tables (lignes 115 et 116) | + +## Utilisation + +Copier les trois fichiers de `src/` dans le dossier des plugins Lua +personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »). +Recharger ensuite avec Ctrl+Maj+L. L'ordre de chargement est sans +importance (l'inscription de `cpx_streamer` se fait à l'initialisation). +Filtres : `cpx`, `cpx_udp`, `cpx_streamer`, `cpx.function == 6`. Autre +port UDP : `-o cpx_udp.port:5001`. + +## Vérification à l'import + +`luac5.4 -p` : OK pour les trois scripts. tshark 4.6.4, chargés par +`-X lua_script:`, puis copiés dans le dossier des plugins : aucun +message au chargement. Captures synthétiques construites d'après le +client Python amont (`src/client/aideck_cpx_streamer/.../cpx/cpx.py`, +`transport/tcp.py`, `transport/udp.py`) : + +| Essai | Résultat | +|---|---| +| TCP 5000 : CRTP hôte → STM32 | « CPX: WIFI_HOST → STM32, Len=7, Func=0x03, Unknown » | +| TCP : deux messages dans un segment (`BUFFER_BEGIN` image de 4000 octets, `BUFFER_DATA`) | les deux décodés : en-tête de routage, `Command`, `Type: IMAGE`, `Size: 4000 bytes`, `Checksum: 0xdeadbeef`, données | +| TCP : message console réparti sur deux segments | réassemblé : « CPX: ESP32 → WIFI_HOST, Len=20, Func=0x02 » | +| UDP 5000 : les mêmes messages, numérotés | décodés de même (« CPX UDP ») | +| UDP de 3 octets | **erreur Lua** `cpx_udp.lua:276` (`attempt to index a nil value (global 'tree')`) | +| `BUFFER_BEGIN` tronqué (3 octets) | **erreur Lua** `cpx_streamer.lua:160` (`Range is out of bounds`) | + +## Limites constatées + +- Le champ `Length` affiche la longueur totale du message (en-tête de 4 + octets compris) à côté de la valeur brute : « 22 bytes (0x0012) » + (ligne 393 de `cpx_tcp.lua`). +- Paquet UDP trop court : le contrôle prévu échoue sur une variable + `tree` non définie (ligne 276 de `cpx_udp.lua`) ; `cpx_streamer` ne + contrôle pas la longueur. +- Seule la fonction `STREAMER` a un sous-dissecteur ; CRTP, console, + Wi-Fi, application, etc. restent en données brutes (« Unknown »). +- Le dossier d'origine reste un tutoriel adapté : commentaires de + l'exemple FPM/DNS de Wireshark conservés (`cpx_tcp.lua` parle encore + de « Quagga FPM Netlink »). +- Pas de capture réelle disponible. diff --git a/dissectors/crazyflie-cpx/src/cpx_streamer.lua b/dissectors/crazyflie-cpx/src/cpx_streamer.lua new file mode 100644 index 0000000..26f5cbe --- /dev/null +++ b/dissectors/crazyflie-cpx/src/cpx_streamer.lua @@ -0,0 +1,226 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/idsia-robotics/nanocockpit (tools/wireshark/cpx_streamer.lua), +-- commit 741f12b2c4fc7162c019b7932bb8d5b4ddde677b du 05/05/2026 (dernière modification du fichier : +-- commit 1d1487441d68baacfde7ebd099480716047fe2ea du 05/03/2025). +-- Licence amont : Apache-2.0, LICENSE du dépôt — voir README.md et LICENSE. +------------------------------------------------------------------------------- +-- +-- author: Elia Cereda +-- Copyright (c) 2023, Elia Cereda +-- All rights reserved +-- +-- Version: 1.0 +-- + +---------------------------------------- +-- do not modify this table +local debug_level = { + DISABLED = 0, + LEVEL_1 = 1, + LEVEL_2 = 2 +} + +---------------------------------------- +-- set this DEBUG to debug_level.LEVEL_1 to enable printing debug_level info +-- set it to debug_level.LEVEL_2 to enable really verbose printing +-- set it to debug_level.DISABLED to disable debug printing +-- note: this will be overridden by user's preference settings +local DEBUG = debug_level.LEVEL_1 + +-- a table of our default settings - these can be changed by changing +-- the preferences through the GUI or command-line; the Lua-side of that +-- preference handling is at the end of this script file +local default_settings = +{ + debug_level = DEBUG, + enabled = true, -- whether this dissector is enabled or not + cpx_function = 0x06, -- default TCP port number for CPX +} + +local dprint = function() end +local dprint2 = function() end +local function resetDebugLevel() + if default_settings.debug_level > debug_level.DISABLED then + dprint = function(...) + print(table.concat({"Lua: ", ...}," ")) + end + + if default_settings.debug_level > debug_level.LEVEL_1 then + dprint2 = dprint + end + else + dprint = function() end + dprint2 = dprint + end +end +-- call it now +resetDebugLevel() + +-------------------------------------------------------------------------------- +-- creates a Proto object, but doesn't register it yet +local cpx_streamer_proto = Proto("cpx_streamer", "CPX Streamer") + + +---------------------------------------- +-- a function to convert tables of enumerated types to value-string tables +-- i.e., from { "name" = number } to { number = "name" } +local function makeValString(enumTable) + local t = {} + for name,num in pairs(enumTable) do + t[num] = name + end + return t +end + +local streamer_command = { + BUFFER_BEGIN = 0x10, + BUFFER_DATA = 0x11, +} +local streamer_command_valstr = makeValString(streamer_command) + +local streamer_type = { + IMAGE = 0x01, + INFERENCE = 0xF0, + FOG_BUFFER = 0xF1, +} +local streamer_type_valstr = makeValString(streamer_type) + + +---------------------------------------- +-- a table of all of our Protocol's fields +local header_fields = { + command = ProtoField.uint8("cpx_streamer.command", "Command", base.HEX, streamer_command_valstr), + + type = ProtoField.uint8("cpx_streamer.begin.type", "Type", base.HEX, streamer_type_valstr), + size = ProtoField.uint32("cpx_streamer.begin.size", "Size", base.UNIT_STRING, {" byte", " bytes"}), + checksum = ProtoField.uint32("cpx_streamer.begin.checksum", "Checksum", base.HEX), + padding = ProtoField.uint16("cpx_streamer.begin.padding", "Padding", base.HEX), + + padding1 = ProtoField.uint16("cpx_streamer.data.padding1", "Padding", base.HEX), + padding2 = ProtoField.uint8("cpx_streamer.data.padding2", "Padding", base.HEX), +} + +-- register the ProtoFields +cpx_streamer_proto.fields = header_fields + +dprint2("cpx_streamer_proto ProtoFields registered") + +-------------------------------------------------------------------------------- +-- We want to have our protocol dissection invoked for a specific CPX function, +-- so get the CPX dissector table and add our protocol to it. +local function enableDissector() + -- using DissectorTable:set() removes existing dissector(s), whereas the + -- DissectorTable:add() one adds ours before any existing ones, but + -- leaves the other ones alone, which is better + DissectorTable.get("cpx.function"):add(default_settings.cpx_function, cpx_streamer_proto) + DissectorTable.get("cpx_udp.function"):add(default_settings.cpx_function, cpx_streamer_proto) +end + +local function disableDissector() + DissectorTable.get("cpx.function"):remove(default_settings.cpx_function, cpx_streamer_proto) + DissectorTable.get("cpx_udp.function"):remove(default_settings.cpx_function, cpx_streamer_proto) +end + +--------------------------------------- +-- This function will be invoked by Wireshark during initialization, such as +-- at program start and loading a new file +function cpx_streamer_proto.init() + enableDissector() +end + +-- this holds the plain "data" Dissector, in case we can't dissect it as Netlink +local data = Dissector.get("data") + +-------------------------------------------------------------------------------- +-- The following creates the callback function for the dissector. +-- It's the same as doing "cpx_streamer_proto.dissector = function (tvbuf,pkt,root)" +-- The 'tvbuf' is a Tvb object, 'pktinfo' is a Pinfo object, and 'root' is a TreeItem object. +-- Whenever Wireshark dissects a packet that our Proto is hooked into, it will call +-- this function and pass it these arguments for the packet it's dissecting. +function cpx_streamer_proto.dissector(tvbuf, pktinfo, root) + dprint2("cpx_streamer_proto.dissector called") + + -- get the length of the packet buffer (Tvb). + local pktlen = tvbuf:len() + + local tree = root:add(cpx_streamer_proto, tvbuf) + + local command_tvbr = tvbuf:range(0, 1) + tree:add_le(header_fields.command, command_tvbr) + + local command_value = command_tvbr:le_uint() + local command_label = streamer_command_valstr[command_value] + + pktinfo.cols.info:append(string.format(", Streamer %s", command_label)) + + local payload_tvbr + + if command_value == streamer_command.BUFFER_BEGIN then + local type_tvbr = tvbuf:range(1, 1) + local size_tvbr = tvbuf:range(2, 4) + local checksum_tvbr = tvbuf:range(6, 4) + local padding_tvbr = tvbuf:range(10, 2) + payload_tvbr = tvbuf:range(12, pktlen - 12) + + tree:add_le(header_fields.type, type_tvbr) + tree:add_le(header_fields.size, size_tvbr) + tree:add_le(header_fields.checksum, checksum_tvbr) + tree:add_le(header_fields.padding, padding_tvbr) + + local type_label = streamer_type_valstr[type_tvbr:le_uint()] + pktinfo.cols.info:append( + string.format(" [%s, Size=%d]", + type_label, + size_tvbr:le_uint() + )) + elseif command_value == streamer_command.BUFFER_DATA then + local padding1_tvbr = tvbuf:range(1, 2) + local padding2_tvbr = tvbuf:range(3, 1) + payload_tvbr = tvbuf:range(4, pktlen - 4) + + tree:add_le(header_fields.padding1, padding1_tvbr) + tree:add_le(header_fields.padding2, padding2_tvbr) + end + data:call(payload_tvbr:tvb(), pktinfo, root) +end + +-------------------------------------------------------------------------------- +-- preferences handling stuff +-------------------------------------------------------------------------------- + +local debug_pref_enum = { + { 1, "Disabled", debug_level.DISABLED }, + { 2, "Level 1", debug_level.LEVEL_1 }, + { 3, "Level 2", debug_level.LEVEL_2 }, +} + +---------------------------------------- +-- register our preferences +cpx_streamer_proto.prefs.enabled = Pref.bool("Dissector enabled", default_settings.enabled, + "Whether the CPX Streamer dissector is enabled or not") + +cpx_streamer_proto.prefs.debug = Pref.enum("Debug", default_settings.debug_level, + "The debug printing level", debug_pref_enum) + +---------------------------------------- +-- the function for handling preferences being changed +function cpx_streamer_proto.prefs_changed() + dprint2("prefs_changed called") + + default_settings.debug_level = cpx_streamer_proto.prefs.debug + resetDebugLevel() + + if default_settings.enabled ~= cpx_streamer_proto.prefs.enabled then + default_settings.enabled = cpx_streamer_proto.prefs.enabled + if default_settings.enabled then + enableDissector() + else + disableDissector() + end + -- have to reload the capture file for this type of change + reload() + end + +end + +dprint2("pcapfile Prefs registered") diff --git a/dissectors/crazyflie-cpx/src/cpx_tcp.lua b/dissectors/crazyflie-cpx/src/cpx_tcp.lua new file mode 100644 index 0000000..a40baf8 --- /dev/null +++ b/dissectors/crazyflie-cpx/src/cpx_tcp.lua @@ -0,0 +1,562 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/idsia-robotics/nanocockpit (tools/wireshark/cpx_tcp.lua), +-- commit 741f12b2c4fc7162c019b7932bb8d5b4ddde677b du 05/05/2026 (dernière modification du fichier : +-- commit 1d1487441d68baacfde7ebd099480716047fe2ea du 05/03/2025). +-- Licence amont : Apache-2.0, LICENSE du dépôt — voir README.md et LICENSE. +------------------------------------------------------------------------------- +-- +-- author: Elia Cereda +-- Copyright (c) 2023, Elia Cereda +-- All rights reserved +-- +-- Version: 1.0 +-- +------------------------------------------------------------------------------- +--[[ + + This code is a plugin for Wireshark, to dissect Quagga FPM Netlink + protocol messages over TCP. + + The purpose of this script is two-fold: + 1) To decode a protocol Wireshark does not (currently) decode natively. + 2) To provide a tutorial for TCP-based Lua dissection. + + Because of the second goal (a tutorial), this script has a lot more comments + than one would normally expect or want. + +---------------------------------------- + + OVERVIEW: + + This Lua plugin script dissects Quagga/zebra-style FPM messages carrying + Netlink messages, over TCP connections. + + Wireshark has a "Netlink" protocol dissector, but it currently expects + to be running on a Linux cooked-mode SLL header and link type. That's + because Netlink has traditionally been used between the Linux kernel + and user-space apps. But the open-source Quagga, zebra, and the + commercial ZebOS routing products also send Netlink messages over TCP + to other processes or even outside the box, to a "Forwarding Plane Manager" + (FPM) that controls forwarding-plane devices (typically hardware). + + The Netlink message is encapsulated within an FPM header, which identifies + an FPM message version (currently 1), the type of message it contains + (namely a Netlink message), and its length. + + So we have: + struct fpm_msg_hdr_t + { + uint8_t version; + uint8_t msg_type; + uint16_t msg_len; + } + followed by a Netlink message. + + Note that there is no Linux cooked-mode SLL header in this case. + Therefore, to be able to re-use Wireshark's built-in Netlink dissector, + this Lua script creates a fake SLL header, and invokes the built-in + Netlink dissector using that. + + +---------------------------------------- + + HOW TO RUN THIS SCRIPT: + + Wireshark and Tshark support multiple ways of loading Lua scripts: through + a dofile() call in init.lua, through the file being in either the global + or personal plugins directories, or via the command line. + + See the Wireshark Developer's Guide chapter on Lua + (https://www.wireshark.org/docs/wsdg_html_chunked/wsluarm_modules.html). + Once this script is loaded, it creates a new protocol named "FPM", as + described in the "Background" section. If you have a capture file with FPM + messages in it, simply select one in the Packet List pane, right-click on + it, and select "Decode As ...", and then in the dialog box that shows up + scroll down the list of protocols to one called "FPM", select that and + click the "ok" or "apply" button. Voila`, you're now decoding FPM packets + using the dissector in this script. Another way is to download the capture + file made for this script (called "segmented_fpm.pcap", and open that - + since the FPM packets in it use TCP port 2620, and since the FPM protocol + in this script has been set to automatically decode TCP port 2620, it will + automagically do it without doing "Decode As ...". + +---------------------------------------- + + Writing Lua Dissectors for TCP-based Protocols: + + A Lua-based protocol dissector for TCP works much the same as one for UDP, + which is described in the 'dissector.lua' tutorial script available on + https://wiki.wireshark.org/Lua/Examples. The main differences are + interfacing with Wireshark's Lua API for reassembly, and handling the + various conditions that can arise due to running on TCP. + + In particular, your dissector function needs to handle the following + conditions which can occur for TCP-based packet captures: + 1) The TCP packet segment might only have a portion of your message. + 2) The TCP packet segment might contain multiple of your messages. + 3) The TCP packet might be in the middle of your message, because + a previous segment was not captured. + 4) The TCP packet might be cut-off, because the user set Wireshark to + limit the size of the packets being captured. + 5) Any combination of the above. + + For case (4), the simplest thing to do is just not dissect packets that + are cut-off. Check the Tvb's len() vs. reported_len(), and if they're + different that means the packet was cut-off. + + For case (3), your dissector should try to perform some sanity checking of + an early field if possible. If the sanity check fails, then ignore this + packet and wait for the next one. "Ignoring" the packet means returning + the number 0 from your dissector. + + For case (2), currently this requires you to write your own while-loop, + dissecting your message within the while-loop, such that you can dissect + multiple of your messages each time Wireshark invokes your Proto's + dissector() function. + + For case (1), you have to dissect your message enough to figure out what + the full length will be - if you can figure that out, then set the Pinfo's + desegment_len to how many more bytes than are currently in the Tvb that + you need in order to decode the full message; or if you don't know exactly + how many more bytes you need, then set the Pinfo desegment_len to the pre- + defined value of "DESEGMENT_ONE_MORE_SEGMENT". You also need to set the + Pinfo's desegment_offset to the offset in the tvbuff at which you want the + dissector to continue processing when next invoked by Wireshark. The next + time a TCP packet segment is received by Wireshark, it will invoke your + Proto's dissector function with a Tvb buffer composed of the data bytes + starting at the desegment_offset of the previous Tvb buffer together with + desegment_len more bytes. + + For the return value of your Proto's dissector() function, you should + return one of the following: + 1) If the packet does not belong to your dissector, return 0. You must + *not* set the Pinfo.desegment_len nor the desegment_offset if you + return 0. + 2) If you need more bytes, set the Pinfo's + desegment_len/desegment_offset as described earlier, and return + either nothing, or return the length of the Tvb. Either way is fine. + 3) If you don't need more bytes, return either nothing, or return the + length of the Tvb. Either way is fine. + + See the code in this script for an example of the above. + +]]---------------------------------------- + +---------------------------------------- +-- do not modify this table +local debug_level = { + DISABLED = 0, + LEVEL_1 = 1, + LEVEL_2 = 2 +} + +---------------------------------------- +-- set this DEBUG to debug_level.LEVEL_1 to enable printing debug_level info +-- set it to debug_level.LEVEL_2 to enable really verbose printing +-- set it to debug_level.DISABLED to disable debug printing +-- note: this will be overridden by user's preference settings +local DEBUG = debug_level.LEVEL_1 + +-- a table of our default settings - these can be changed by changing +-- the preferences through the GUI or command-line; the Lua-side of that +-- preference handling is at the end of this script file +local default_settings = +{ + debug_level = DEBUG, + enabled = true, -- whether this dissector is enabled or not + port = 5000, -- default TCP port number for CPX + max_msg_len = 4092, -- max length of CPX message + subdissect = true, -- whether to call sub-dissector or not +} + +local dprint = function() end +local dprint2 = function() end +local function resetDebugLevel() + if default_settings.debug_level > debug_level.DISABLED then + dprint = function(...) + print(table.concat({"Lua: ", ...}," ")) + end + + if default_settings.debug_level > debug_level.LEVEL_1 then + dprint2 = dprint + end + else + dprint = function() end + dprint2 = dprint + end +end +-- call it now +resetDebugLevel() + +-------------------------------------------------------------------------------- +-- creates a Proto object, but doesn't register it yet +local cpx_proto = Proto("cpx", "CPX") + + +---------------------------------------- +-- a function to convert tables of enumerated types to value-string tables +-- i.e., from { "name" = number } to { number = "name" } +local function makeValString(enumTable) + local t = {} + for name,num in pairs(enumTable) do + t[num] = name + end + return t +end + +local cpx_target = { + STM32 = 0x1, + ESP32 = 0x2, + WIFI_HOST = 0x3, + GAP = 0x4, +} +local cpx_target_valstr = makeValString(cpx_target) + +local cpx_last_packet = { + YES = 0x1, + NO = 0x0, +} +local cpx_last_packet_valstr = makeValString(cpx_last_packet) + +local cpx_function = { + SYSTEM = 0x1, + CONSOLE = 0x2, + CRTP = 0x3, + WIFI_CTRL = 0x4, + APP = 0x5, + + STREAMER = 0x6, + + TEST = 0xE, + BOOTLOADER = 0xF, +} +local cpx_function_valstr = makeValString(cpx_function) + +local cpx_version = { + [0] = 0x0, + [1] = 0x1, + [2] = 0x2, + [3] = 0x3, +} +local cpx_version_valstr = makeValString(cpx_version) + +---------------------------------------- +-- a table of all of our Protocol's fields +local header_fields = { + length = ProtoField.uint16("cpx_tcp.length", "Length", base.UNIT_STRING, {" byte", " bytes"}), + + destination = ProtoField.uint16("cpx.destination", "Destination", base.HEX, cpx_target_valstr, 0x0007), + source = ProtoField.uint16("cpx.source", "Source", base.HEX, cpx_target_valstr, 0x0038), + last_packet = ProtoField.uint16("cpx.last_packet", "Last packet", base.DEC, cpx_last_packet_valstr, 0x0040), + reserved = ProtoField.uint16("cpx.reserved", "Reserved", base.DEC, {}, 0x0080), + function_ = ProtoField.uint16("cpx.function", "Function", base.HEX, cpx_function_valstr, 0x3F00), + version = ProtoField.uint16("cpx.version", "Version", base.DEC, cpx_version_valstr, 0xC000), +} + +-- register the ProtoFields +cpx_proto.fields = header_fields + +local destination_field = Field.new('cpx.destination') +local source_field = Field.new('cpx.source') +local function_field = Field.new('cpx.function') + +dprint2("cpx_proto ProtoFields registered") + +-- due to a bug in older (prior to 1.12) wireshark versions, we need to keep newly created +-- Tvb's for longer than the duration of the dissect function (see bug 10888) +-- this bug only affects dissectors that create new Tvb's, which is not that common +-- but this FPM dissector happens to do it in order to create the fake SLL header +-- to pass on to the Netlink dissector +local tvbs = {} + +--------------------------------------- +-- This function will be invoked by Wireshark during initialization, such as +-- at program start and loading a new file +function cpx_proto.init() + -- reset the save Tvbs + tvbs = {} +end + +-- this is the size of the CPX_TCP header (4 bytes) +local CPX_TCP_HDR_LEN = 4 + +-- some forward "declarations" of helper functions we use in the dissector +-- local createSllTvb, dissect_cpx, checkFpmLength +local dissect_cpx, check_cpx_length + +-- this holds the Dissector object for Netlink, which we invoke in +-- our FPM dissector to dissect the encapsulated Netlink protocol +local subdiss_table = DissectorTable.new("cpx.function", "CPX Function", ftypes.UINT8, base.HEX, cpx_proto) + +-- this holds the plain "data" Dissector, in case we can't dissect it as Netlink +local data = Dissector.get("data") + +-------------------------------------------------------------------------------- +-- The following creates the callback function for the dissector. +-- It's the same as doing "cpx_proto.dissector = function (tvbuf,pkt,root)" +-- The 'tvbuf' is a Tvb object, 'pktinfo' is a Pinfo object, and 'root' is a TreeItem object. +-- Whenever Wireshark dissects a packet that our Proto is hooked into, it will call +-- this function and pass it these arguments for the packet it's dissecting. +function cpx_proto.dissector(tvbuf, pktinfo, root) + dprint2("cpx_proto.dissector called") + -- reset the save Tvbs + tvbs = {} + + -- get the length of the packet buffer (Tvb). + local pktlen = tvbuf:len() + + local bytes_consumed = 0 + + -- we do this in a while loop, because there could be multiple CPX messages + -- inside a single TCP segment, and thus in the same tvbuf - but our + -- cpx_proto.dissector() will only be called once per TCP segment, so we + -- need to do this loop to dissect each CPX message in it + while bytes_consumed < pktlen do + + -- We're going to call our "dissect()" function, which is defined + -- later in this script file. The dissect() function returns the + -- length of the CPX message it dissected as a positive number, or if + -- it's a negative number then it's the number of additional bytes it + -- needs if the Tvb doesn't have them all. If it returns a 0, it's a + -- dissection error. + local result = dissect_cpx(tvbuf, pktinfo, root, bytes_consumed) + + if result > 0 then + -- we successfully processed an CPX message, of 'result' length + bytes_consumed = bytes_consumed + result + -- go again on another while loop + elseif result == 0 then + -- If the result is 0, then it means we hit an error of some kind, + -- so return 0. Returning 0 tells Wireshark this packet is not for + -- us, and it will try heuristic dissectors or the plain "data" + -- one, which is what should happen in this case. + return 0 + else + -- we need more bytes, so set the desegment_offset to what we + -- already consumed, and the desegment_len to how many more + -- are needed + pktinfo.desegment_offset = bytes_consumed + + -- invert the negative result so it's a positive number + result = -result + + pktinfo.desegment_len = result + + -- even though we need more bytes, this packet is for us, so we + -- tell wireshark all of its bytes are for us by returning the + -- number of Tvb bytes we "successfully processed", namely the + -- length of the Tvb + return pktlen + end + end + + -- In a TCP dissector, you can either return nothing, or return the number of + -- bytes of the tvbuf that belong to this protocol, which is what we do here. + -- Do NOT return the number 0, or else Wireshark will interpret that to mean + -- this packet did not belong to your protocol, and will try to dissect it + -- with other protocol dissectors (such as heuristic ones) + return bytes_consumed +end + +---------------------------------------- +-- The following is a local function used for dissecting our FPM messages +-- inside the TCP segment using the desegment_offset/desegment_len method. +-- It's a separate function because we run over TCP and thus might need to +-- parse multiple messages in a single segment/packet. So we invoke this +-- function only dissects one FPM message and we invoke it in a while loop +-- from the Proto's main disector function. +-- +-- This function is passed in the original Tvb, Pinfo, and TreeItem from the Proto's +-- dissector function, as well as the offset in the Tvb that this function should +-- start dissecting from. +-- +-- This function returns the length of the FPM message it dissected as a +-- positive number, or as a negative number the number of additional bytes it +-- needs if the Tvb doesn't have them all, or a 0 for error. +-- +dissect_cpx = function (tvbuf, pktinfo, root, offset) + dprint2("CPX dissect function called") + + local length_val, length_tvbr = check_cpx_length(tvbuf, offset) + + if length_val <= 0 then + return length_val + end + + -- if we got here, then we have a whole message in the Tvb buffer + -- so let's finish dissecting it... + + -- We start by adding our protocol to the dissection display tree. + local tree = root:add(cpx_proto, tvbuf:range(offset, length_val)) + + -- dissect the length field + local length_item = tree:add_le(header_fields.length, length_tvbr, length_val) + length_item:append_text(string.format(' (0x%04x)', length_tvbr:le_uint())) + + -- dissect the CPX header field + local cpx_header_tvbr = tvbuf:range(offset + 2, 2) + tree:add_le(header_fields.destination, cpx_header_tvbr) + tree:add_le(header_fields.source, cpx_header_tvbr) + tree:add_le(header_fields.last_packet, cpx_header_tvbr) + tree:add_le(header_fields.reserved, cpx_header_tvbr) + tree:add_le(header_fields.function_, cpx_header_tvbr) + tree:add_le(header_fields.version, cpx_header_tvbr) + + local src_label = cpx_target_valstr[source_field().value] + local dest_label = cpx_target_valstr[destination_field().value] + local function_val = function_field().value + + -- set the protocol column to show our protocol name + pktinfo.cols.protocol:set("CPX TCP") + + -- set the info column + if string.find(tostring(pktinfo.cols.info), "^CPX:") == nil then + pktinfo.cols.info:set("") + else + pktinfo.cols.info:append(", ") + end + pktinfo.cols.info:append(string.format("CPX: %s → %s, Len=%d, Func=0x%02x", src_label, dest_label, length_val, function_val)) + + dprint2("Invoking 'data' dissector") + + -- packet body + tvbs[#tvbs+1] = tvbuf(offset + CPX_TCP_HDR_LEN, length_val - CPX_TCP_HDR_LEN):tvb() + + local subdiss = subdiss_table:get_dissector(function_val) + if default_settings.subdissect and subdiss ~= nil then + dprint2("CPX trying sub-dissector for function:", default_settings.subdiss_type) + + subdiss:call(tvbs[#tvbs], pktinfo, root) + + dprint2("CPX finished with sub-dissector") + else + dprint2("CPX sub-dissection disabled or unknown CPX function, invoking 'data' dissector") + -- append the INFO column + if string.find(tostring(pktinfo.cols.info), "^CPX:") == nil then + pktinfo.cols.info:append(": Unknown") + else + pktinfo.cols.info:append(", Unknown") + end + + data:call(tvbs[#tvbs], pktinfo, root) + end + + return length_val +end + + +---------------------------------------- +-- The function to check the length field. +-- +-- This returns two things: (1) the length, and (2) the TvbRange object, which +-- might be nil if length <= 0. +check_cpx_length = function (tvbuf, offset) + + -- "msglen" is the number of bytes remaining in the Tvb buffer which we + -- have available to dissect in this run + local msglen = tvbuf:len() - offset + + -- check if capture was only capturing partial packet size + if msglen ~= tvbuf:reported_length_remaining(offset) then + -- captured packets are being sliced/cut-off, so don't try to desegment/reassemble + dprint2("Captured packet was shorter than original, can't reassemble") + return 0 + end + + if msglen < CPX_TCP_HDR_LEN then + -- we need more bytes, so tell the main dissector function that we + -- didn't dissect anything, and we need an unknown number of more + -- bytes (which is what "DESEGMENT_ONE_MORE_SEGMENT" is used for) + dprint2("Need more bytes to figure out CPX length field") + -- return as a negative number + return -DESEGMENT_ONE_MORE_SEGMENT + end + + -- if we got here, then we know we have enough bytes in the Tvb buffer + -- to at least figure out the full length of this CPX messsage (the length + -- is the 16-bit integer in first and second bytes) + + -- get the TvbRange of bytes 1+2 + local length_tvbr = tvbuf:range(offset, 2) + + -- get the length as a little-endian unsigned integer + local length_val = length_tvbr:le_uint() + CPX_TCP_HDR_LEN + + if length_val > default_settings.max_msg_len then + -- too many bytes, invalid message + dprint("CPX message length is too long: ", length_val) + return 0 + end + + if msglen < length_val then + -- we need more bytes to get the whole CPX message + dprint2("Need more bytes to desegment full CPX") + return -(length_val - msglen) + end + + return length_val, length_tvbr +end + +-------------------------------------------------------------------------------- +-- We want to have our protocol dissection invoked for a specific TCP port, +-- so get the TCP dissector table and add our protocol to it. +local function enableDissector() + -- using DissectorTable:set() removes existing dissector(s), whereas the + -- DissectorTable:add() one adds ours before any existing ones, but + -- leaves the other ones alone, which is better + DissectorTable.get("tcp.port"):add(default_settings.port, cpx_proto) +end +-- call it now, because we're enabled by default +enableDissector() + +local function disableDissector() + DissectorTable.get("tcp.port"):remove(default_settings.port, cpx_proto) +end + + +-------------------------------------------------------------------------------- +-- preferences handling stuff +-------------------------------------------------------------------------------- + +local debug_pref_enum = { + { 1, "Disabled", debug_level.DISABLED }, + { 2, "Level 1", debug_level.LEVEL_1 }, + { 3, "Level 2", debug_level.LEVEL_2 }, +} + +---------------------------------------- +-- register our preferences +cpx_proto.prefs.enabled = Pref.bool("Dissector enabled", default_settings.enabled, + "Whether the CPX dissector is enabled or not") + +cpx_proto.prefs.subdissect = Pref.bool("Enable sub-dissectors", default_settings.subdissect, + "Whether the CPX packet's content" .. + " should be dissected or not") + +cpx_proto.prefs.debug = Pref.enum("Debug", default_settings.debug_level, + "The debug printing level", debug_pref_enum) + +---------------------------------------- +-- the function for handling preferences being changed +function cpx_proto.prefs_changed() + dprint2("prefs_changed called") + + default_settings.subdissect = cpx_proto.prefs.subdissect + + default_settings.debug_level = cpx_proto.prefs.debug + resetDebugLevel() + + if default_settings.enabled ~= cpx_proto.prefs.enabled then + default_settings.enabled = cpx_proto.prefs.enabled + if default_settings.enabled then + enableDissector() + else + disableDissector() + end + -- have to reload the capture file for this type of change + reload() + end + +end + +dprint2("pcapfile Prefs registered") diff --git a/dissectors/crazyflie-cpx/src/cpx_udp.lua b/dissectors/crazyflie-cpx/src/cpx_udp.lua new file mode 100644 index 0000000..aac6d02 --- /dev/null +++ b/dissectors/crazyflie-cpx/src/cpx_udp.lua @@ -0,0 +1,438 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/idsia-robotics/nanocockpit (tools/wireshark/cpx_udp.lua), +-- commit 741f12b2c4fc7162c019b7932bb8d5b4ddde677b du 05/05/2026 (dernière modification du fichier : +-- commit 1d1487441d68baacfde7ebd099480716047fe2ea du 05/03/2025). +-- Licence amont : Apache-2.0, LICENSE du dépôt — voir README.md et LICENSE. +------------------------------------------------------------------------------- +-- +-- author: Elia Cereda +-- Copyright (c) 2023, Elia Cereda +-- All rights reserved +-- +-- Version: 1.0 +-- +-- BACKGROUND: +-- This is an example Lua script for a protocol dissector. The purpose of this script is two-fold: +-- * To provide a reference tutorial for others writing Wireshark dissectors in Lua +-- * To test various functions being called in various ways, so this script can be used in the test-suites +-- I've tried to meet both of those goals, but it wasn't easy. No doubt some folks will wonder why some +-- functions are called some way, or differently than previous invocations of the same function. I'm trying to +-- to show both that it can be done numerous ways, but also I'm trying to test those numerous ways, and my more +-- immediate need is for test coverage rather than tutorial guide. (the Lua API is sorely lacking in test scripts) +-- +-- OVERVIEW: +-- This script creates an elementary dissector for DNS. It's neither comprehensive nor error-free with regards +-- to the DNS protocol. That's OK. The goal isn't to fully dissect DNS properly - Wireshark already has a good +-- DNS dissector built-in. We don't need another one. We also have other example Lua scripts, but I don't think +-- they do a good job of explaining things, and the nice thing about this one is getting capture files to +-- run it against is trivial. (plus I uploaded one) +-- +-- HOW TO RUN THIS SCRIPT: +-- Wireshark and Tshark support multiple ways of loading Lua scripts: through a dofile() call in init.lua, +-- through the file being in either the global or personal plugins directories, or via the command line. +-- See the Wireshark USer's Guide chapter on Lua (https://www.wireshark.org/docs/wsdg_html_chunked/wsluarm.html#wsluarm_intro). +-- Once the script is loaded, it creates a new protocol named "MyDNS" (or "MYDNS" in some places). If you have +-- a capture file with DNS packets in it, simply select one in the Packet List pane, right-click on it, and +-- select "Decode As ...", and then in the dialog box that shows up scroll down the list of protocols to one +-- called "MYDNS", select that and click the "ok" or "apply" button. Voila`, you're now decoding DNS packets +-- using the simplistic dissector in this script. Another way is to download the capture file made for +-- this script, and open that - since the DNS packets in it use UDP port 65333 (instead of the default 53), +-- and since the MyDNS protocol in this script has been set to automatically decode UDP port 65333, it will +-- automagically do it without doing "Decode As ...". +-- +---------------------------------------- +-- do not modify this table +local debug_level = { + DISABLED = 0, + LEVEL_1 = 1, + LEVEL_2 = 2 +} + +-- set this DEBUG to debug_level.LEVEL_1 to enable printing debug_level info +-- set it to debug_level.LEVEL_2 to enable really verbose printing +-- note: this will be overridden by user's preference settings +local DEBUG = debug_level.LEVEL_1 + +local default_settings = +{ + debug_level = DEBUG, + enabled = true, -- whether this dissector is enabled or not + port = 5000, -- default UDP port number for CPX + max_msg_len = 4092, -- max length of CPX message + subdissect = true, -- whether to call sub-dissector or not +} + +local dprint = function() end +local dprint2 = function() end +local function reset_debug_level() + if default_settings.debug_level > debug_level.DISABLED then + dprint = function(...) + print(table.concat({"Lua:", ...}," ")) + end + + if default_settings.debug_level > debug_level.LEVEL_1 then + dprint2 = dprint + end + end +end +-- call it now +reset_debug_level() + +dprint2("Wireshark version = ", get_version()) +dprint2("Lua version = ", _VERSION) + +---------------------------------------- +-- Unfortunately, the older Wireshark/Tshark versions have bugs, and part of the point +-- of this script is to test those bugs are now fixed. So we need to check the version +-- end error out if it's too old. +local major, minor, micro = get_version():match("(%d+)%.(%d+)%.(%d+)") +if major and tonumber(major) <= 1 and ((tonumber(minor) <= 10) or (tonumber(minor) == 11 and tonumber(micro) < 3)) then + error( "Sorry, but your Wireshark/Tshark version ("..get_version()..") is too old for this script!\n".. + "This script needs Wireshark/Tshark version 1.11.3 or higher.\n" ) +end + +-- more sanity checking +-- verify we have the ProtoExpert class in wireshark, as that's the newest thing this file uses +assert(ProtoExpert.new, "Wireshark does not have the ProtoExpert class, so it's too old - get the latest 1.11.3 or higher") + +---------------------------------------- + +---------------------------------------- +-- creates a Proto object, but doesn't register it yet +local cpx_proto = Proto("cpx_udp","CPX UDP") + +---------------------------------------- +-- a function to convert tables of enumerated types to value-string tables +-- i.e., from { "name" = number } to { number = "name" } +local function makeValString(enumTable) + local t = {} + for name,num in pairs(enumTable) do + t[num] = name + end + return t +end + +local cpx_target = { + STM32 = 0x1, + ESP32 = 0x2, + WIFI_HOST = 0x3, + GAP = 0x4, +} +local cpx_target_valstr = makeValString(cpx_target) + +local cpx_last_packet = { + YES = 0x1, + NO = 0x0, +} +local cpx_last_packet_valstr = makeValString(cpx_last_packet) + +local cpx_function = { + SYSTEM = 0x1, + CONSOLE = 0x2, + CRTP = 0x3, + WIFI_CTRL = 0x4, + APP = 0x5, + + STREAMER = 0x6, + + TEST = 0xE, + BOOTLOADER = 0xF, +} +local cpx_function_valstr = makeValString(cpx_function) + +local cpx_version = { + [0] = 0x0, + [1] = 0x1, + [2] = 0x2, + [3] = 0x3, +} +local cpx_version_valstr = makeValString(cpx_version) + +local header_fields = { + sequence = ProtoField.uint16("cpx_udp.sequence", "Sequence number", base.DEC), + + destination = ProtoField.uint16("cpx_udp.destination", "Destination", base.HEX, cpx_target_valstr, 0x0007), + source = ProtoField.uint16("cpx_udp.source", "Source", base.HEX, cpx_target_valstr, 0x0038), + last_packet = ProtoField.uint16("cpx_udp.last_packet", "Last packet", base.DEC, cpx_last_packet_valstr, 0x0040), + reserved = ProtoField.uint16("cpx_udp.reserved", "Reserved", base.DEC, {}, 0x0080), + function_ = ProtoField.uint16("cpx_udp.function", "Function", base.HEX, cpx_function_valstr, 0x3F00), + version = ProtoField.uint16("cpx_udp.version", "Version", base.DEC, cpx_version_valstr, 0xC000), +} + +---------------------------------------- +-- this actually registers the ProtoFields above, into our new Protocol +-- in a real script I wouldn't do it this way; I'd build a table of fields programmatically +-- and then set dns.fields to it, so as to avoid forgetting a field +cpx_proto.fields = header_fields + +---------------------------------------- +-- we don't just want to display our protocol's fields, we want to access the value of some of them too! +-- There are several ways to do that. One is to just parse the buffer contents in Lua code to find +-- the values. But since ProtoFields actually do the parsing for us, and can be retrieved using Field +-- objects, it's kinda cool to do it that way. So let's create some Fields to extract the values. +-- The following creates the Field objects, but they're not 'registered' until after this script is loaded. +-- Also, these lines can't be before the 'dns.fields = ...' line above, because the Field.new() here is +-- referencing fields we're creating, and they're not "created" until that line above. +-- Furthermore, you cannot put these 'Field.new()' lines inside the dissector function. +-- Before Wireshark version 1.11, you couldn't even do this concept (of using fields you just created). +local destination_field = Field.new('cpx_udp.destination') +local source_field = Field.new('cpx_udp.source') +local function_field = Field.new('cpx_udp.function') + +---------------------------------------- +-- create some expert info fields (this is new functionality in 1.11.3) +-- Expert info fields are very similar to proto fields: they're tied to our protocol, +-- they're created in a similar way, and registered by setting a 'experts' field to +-- a table of them just as proto fields were put into the 'dns.fields' above +-- The old way of creating expert info was to just add it to the tree, but that +-- didn't let the expert info be filterable in wireshark, whereas this way does + +-- some error expert info's +local ef_too_short = ProtoExpert.new( + "cpx_udp.too_short.expert", "CPX UDP packet too short", + expert.group.MALFORMED, expert.severity.ERROR +) + +cpx_proto.experts = { ef_too_short } + +-------------------------------------------------------------------------------- +-- preferences handling stuff +-------------------------------------------------------------------------------- + +-- a "enum" table for our enum pref, as required by Pref.enum() +-- having the "index" number makes ZERO sense, and is completely illogical +-- but it's what the code has expected it to be for a long time. Ugh. +local debug_pref_enum = { + { 1, "Disabled", debug_level.DISABLED }, + { 2, "Level 1", debug_level.LEVEL_1 }, + { 3, "Level 2", debug_level.LEVEL_2 }, +} + +cpx_proto.prefs.debug = Pref.enum("Debug", default_settings.debug_level, + "The debug printing level", debug_pref_enum) + +cpx_proto.prefs.port = Pref.uint("Port number", default_settings.port, + "The UDP port number for CPX UDP") + +---------------------------------------- +-- a function for handling prefs being changed +function cpx_proto.prefs_changed() + dprint2("prefs_changed called") + + default_settings.debug_level = cpx_proto.prefs.debug + reset_debug_level() + + if default_settings.port ~= cpx_proto.prefs.port then + -- remove old one, if not 0 + if default_settings.port ~= 0 then + dprint2("removing CPX UDP from port",default_settings.port) + DissectorTable.get("udp.port"):remove(default_settings.port, cpx_proto) + end + -- set our new default + default_settings.port = cpx_proto.prefs.port + -- add new one, if not 0 + if default_settings.port ~= 0 then + dprint2("adding CPX UDP to port",default_settings.port) + DissectorTable.get("udp.port"):add(default_settings.port, cpx_proto) + end + end + +end + +dprint2("CPX UDP registered") + +-- this is the size of the CPX_UDP header (4 bytes) +local CPX_UDP_HDR_LEN = 4 + +-- this holds the Dissector object for Netlink, which we invoke in +-- our FPM dissector to dissect the encapsulated Netlink protocol +local subdiss_table = DissectorTable.new("cpx_udp.function", "CPX Function", ftypes.UINT8, base.HEX, cpx_proto) + +-- this holds the plain "data" Dissector, in case we can't dissect it as Netlink +local data = Dissector.get("data") + +---------------------------------------- +-- The following creates the callback function for the dissector. +-- It's the same as doing "dns.dissector = function (tvbuf,pkt,root)" +-- The 'tvbuf' is a Tvb object, 'pktinfo' is a Pinfo object, and 'root' is a TreeItem object. +-- Whenever Wireshark dissects a packet that our Proto is hooked into, it will call +-- this function and pass it these arguments for the packet it's dissecting. +function cpx_proto.dissector(tvbuf,pktinfo,root) + dprint2("cpx_proto.dissector called") + + -- We want to check that the packet size is rational during dissection, so let's get the length of the + -- packet buffer (Tvb). + -- Because DNS has no additional payload data other than itself, and it rides on UDP without padding, + -- we can use tvb:len() or tvb:reported_len() here; but I prefer tvb:reported_length_remaining() as it's safer. + local offset = 0 + local length_val = tvbuf:reported_length_remaining() + + -- now let's check it's not too short + if length_val < CPX_UDP_HDR_LEN then + -- since we're going to add this protocol to a specific UDP port, we're going to + -- assume packets in this port are our protocol, so the packet being too short is an error + -- the old way: tree:add_expert_info(PI_MALFORMED, PI_ERROR, "packet too short") + -- the correct way now: + tree:add_proto_expert_info(ef_too_short) + dprint("packet length ", length_val, " is too short") + return + end + + -- We start by adding our protocol to the dissection display tree. + -- A call to tree:add() returns the child created, so we can add more "under" it using that return value. + -- The second argument is how much of the buffer/packet this added tree item covers/represents - in this + -- case (DNS protocol) that's the remainder of the packet. + local tree = root:add(cpx_proto, tvbuf:range(0, length_val)) + + local seq_tvbr = tvbuf:range(offset + 0, 2) + local seq_val = seq_tvbr:le_uint() + local seq_item = tree:add_le(header_fields.sequence, seq_tvbr) + seq_item:append_text(string.format(' (0x%04x)', seq_val)) + + -- dissect the CPX header field + local cpx_header_tvbr = tvbuf:range(offset + 2, 2) + tree:add_le(header_fields.destination, cpx_header_tvbr) + tree:add_le(header_fields.source, cpx_header_tvbr) + tree:add_le(header_fields.last_packet, cpx_header_tvbr) + tree:add_le(header_fields.reserved, cpx_header_tvbr) + tree:add_le(header_fields.function_, cpx_header_tvbr) + tree:add_le(header_fields.version, cpx_header_tvbr) + + local src_label = cpx_target_valstr[source_field().value] + local dest_label = cpx_target_valstr[destination_field().value] + local function_val = function_field().value + + -- set the protocol column to show our protocol name + pktinfo.cols.protocol:set("CPX UDP") + + -- set the info column + if string.find(tostring(pktinfo.cols.info), "^CPX:") == nil then + pktinfo.cols.info:set("") + else + pktinfo.cols.info:append(", ") + end + pktinfo.cols.info:append(string.format("CPX: %s → %s, Len=%d, Func=0x%02x", src_label, dest_label, length_val, function_val)) + + dprint2("Invoking 'data' dissector") + + -- packet body + tvbs = tvbuf(offset + CPX_UDP_HDR_LEN, length_val - CPX_UDP_HDR_LEN):tvb() + + local subdiss = subdiss_table:get_dissector(function_val) + if default_settings.subdissect and subdiss ~= nil then + dprint2("CPX trying sub-dissector for function:", default_settings.subdiss_type) + + subdiss:call(tvbs, pktinfo, root) + + dprint2("CPX finished with sub-dissector") + else + dprint2("CPX sub-dissection disabled or unknown CPX function, invoking 'data' dissector") + -- append the INFO column + if string.find(tostring(pktinfo.cols.info), "^CPX:") == nil then + pktinfo.cols.info:append(": Unknown") + else + pktinfo.cols.info:append(", Unknown") + end + + data:call(tvbs, pktinfo, root) + end + + return pktlen +end + +---------------------------------------- +-- we want to have our protocol dissection invoked for a specific UDP port, +-- so get the udp dissector table and add our protocol to it +DissectorTable.get("udp.port"):add(default_settings.port, cpx_proto) + +---------------------------------------- +-- we also want to add the heuristic dissector, for any UDP protocol +-- first we need a heuristic dissection function +-- this is that function - when wireshark invokes this, it will pass in the same +-- things it passes in to the "dissector" function, but we only want to actually +-- dissect it if it's for us, and we need to return true if it's for us, or else false +-- figuring out if it's for us or not is not easy +-- we need to try as hard as possible, or else we'll think it's for us when it's +-- not and block other heuristic dissectors from getting their chance +-- +-- in practice, you'd never set a dissector like this to be heuristic, because there +-- just isn't enough information to safely detect if it's DNS or not +-- but I'm doing it to show how it would be done +-- +-- Note: this heuristic stuff is new in 1.11.3 +-- local function heur_dissect_dns(tvbuf,pktinfo,root) +-- dprint2("heur_dissect_dns called") + +-- -- if our preferences tell us not to do this, return false +-- if not default_settings.heur_enabled then +-- return false +-- end + +-- if tvbuf:len() < DNS_HDR_LEN then +-- dprint("heur_dissect_dns: tvb shorter than DNS_HDR_LEN of:",DNS_HDR_LEN) +-- return false +-- end + +-- local tvbr = tvbuf:range(0,DNS_HDR_LEN) + +-- -- the first 2 bytes are transaction id, which can be anything so no point in checking those +-- -- the next 2 bytes contain flags, a couple of which have some values we can check against + +-- -- the opcode has to be 0, 1, 2, 4 or 5 +-- -- the opcode field starts at bit offset 17 (in C-indexing), for 4 bits in length +-- local check = tvbr:bitfield(17,4) +-- if check == 3 or check > 5 then +-- dprint("heur_dissect_dns: invalid opcode:",check) +-- return false +-- end + +-- -- the rcode has to be 0-10, 16-22 (we're ignoring private use rcodes here) +-- -- the rcode field starts at bit offset 28 (in C-indexing), for 4 bits in length +-- check = tvbr:bitfield(28,4) +-- if check > 22 or (check > 10 and check < 16) then +-- dprint("heur_dissect_dns: invalid rcode:",check) +-- return false +-- end + +-- dprint2("heur_dissect_dns checking questions/answers") + +-- -- now let's verify the number of questions/answers are reasonable +-- check = tvbr:range(4,2):uint() -- num questions +-- if check > 100 then return false end +-- check = tvbr:range(6,2):uint() -- num answers +-- if check > 100 then return false end +-- check = tvbr:range(8,2):uint() -- num authority +-- if check > 100 then return false end +-- check = tvbr:range(10,2):uint() -- num additional +-- if check > 100 then return false end + +-- dprint2("heur_dissect_dns: everything looks good calling the real dissector") + +-- -- don't do this line in your script - I'm just doing it so our test-suite can +-- -- verify this script +-- root:add("Heuristic dissector used"):set_generated() + +-- -- ok, looks like it's ours, so go dissect it +-- -- note: calling the dissector directly like this is new in 1.11.3 +-- -- also note that calling a Dissector object, as this does, means we don't +-- -- get back the return value of the dissector function we created previously +-- -- so it might be better to just call the function directly instead of doing +-- -- this, but this script is used for testing and this tests the call() function +-- dns.dissector(tvbuf,pktinfo,root) + +-- -- since this is over a transport protocol, such as UDP, we can set the +-- -- conversation to make it sticky for our dissector, so that all future +-- -- packets to/from the same address:port pair will just call our dissector +-- -- function directly instead of this heuristic function +-- -- this is a new attribute of pinfo in 1.11.3 +-- pktinfo.conversation = dns + +-- return true +-- end + +-- now register that heuristic dissector into the udp heuristic list +-- dns:register_heuristic("udp", heur_dissect_dns) + +-- We're done! +-- our protocol (Proto) gets automatically registered after this script finishes loading +---------------------------------------- diff --git a/dissectors/crazyflie-crtp-evoggy/README.md b/dissectors/crazyflie-crtp-evoggy/README.md new file mode 100644 index 0000000..082b98e --- /dev/null +++ b/dissectors/crazyflie-crtp-evoggy/README.md @@ -0,0 +1,83 @@ +# Crazyflie CRTP — protocole des nano-drones Crazyflie (evoggy) + +Dissecteur Wireshark Lua du protocole CRTP (Crazy RealTime Protocol) des +nano-drones Crazyflie de Bitcraze. Il décode l'en-tête de capture ajouté +par l'extcap du même dépôt (type de liaison radio, USB ou UDP du +simulateur, sens, adresse radio, canal, numéro de série), puis l'octet +d'en-tête CRTP (port, canal, compteurs SafeLink) et la charge utile des +ports console, paramètres, commande, mémoire, journalisation, +localisation, consignes génériques et haut niveau, plateforme et +contrôle de liaison (issue #778). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/evoggy/wireshark-crazyflie (`dissector/crtp-dissector.lua`) | +| Commit importé | `c707ffa390ad77e69e8525ffc5fa804e4f29dd4b` du 21/10/2026 (dernier commit de la branche par défaut, seul commit du dépôt, auteur Marcus Eliasson) | +| Licence amont | MIT OR Apache-2.0, au choix : section « License » du `README.md` amont (ligne 89 : « MIT OR Apache-2.0 ») et champ `license` du `Cargo.toml` amont. Le dépôt ne contient **aucun fichier de licence** et le script aucune mention. Les deux licences sont compatibles avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non. Le filtre natif `crtp` de Wireshark désigne un autre protocole homonyme (« CRTP », variantes CNTCP, CS, CUDP 8 et 16), sans rapport avec Crazyflie ; aucun dissecteur Crazyflie dans `tshark -G protocols` | + +Aucun texte de licence n'est fourni par l'amont : il n'en est pas +inventé ici (pas de fichier `LICENSE` dans ce dossier, le validateur +l'accepte avec un avertissement). L'identifiant SPDX +`MIT OR Apache-2.0` reprend exactement la déclaration de l'auteur. Le +script est repris tel quel (aucune modification de code) ; seule +l'en-tête de provenance de cinq lignes est ajoutée en tête (convention +du dépôt, issue #563). L'extcap en Rust (`src/main.rs`, `Cargo.toml`) +n'est pas importé : ce dépôt ne regroupe que des dissecteurs Lua. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/crtp-dissector.lua` | Protocole `crazyrealtimetprotocol` (« Crazy Real Time Protocol », ligne 7) ; champs `crtp.*` (lignes 10 à 113, liste ligne 116) ; types de liaison (ligne 213) et ports CRTP (ligne 227) ; décodeurs par port (lignes 352 à 1252) ; dissecteur ligne 1253 ; inscription sur `wtap_encap` `USER15` (DLT 162, lignes 1362 et 1363) | + +## Utilisation + +Copier `src/crtp-dissector.lua` dans le dossier des plugins Lua +personnels (`~/.local/lib/wireshark/plugins/`). Le script décode les +captures de type de lien `USER15` (DLT 162) produites par l'extcap +amont `crazyflie-extcap`, alimenté par une application +`crazyflie-link` compilée avec la fonctionnalité `packet_capture`. +Filtres : `crazyrealtimetprotocol`, ou les champs `crtp.port`, +`crtp.console_text`, `crtp.commander_thrust`, etc. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : chargement sans erreur. Le +dépôt amont ne contient aucune capture. Essais sur des captures +synthétiques `USER15` construites selon le format écrit par l'extcap +(`src/main.rs`), non commitées : + +| Essai | Résultat | +|---|---| +| Radio, réception, port 0 (console) « Hello console\n » | colonnes `E7:E7:E7:E7:E7 (80) → Radio CF2-TEST`, Info « Console », `crtp.console_text` = « Hello console\n » | +| Radio, émission, port 3 (commande) roll 1,5, pitch −2, lacet 10, poussée 30000 | Roll 1.5 (deg), Pitch -2 (deg), Yaw Rate 10 (deg/s), Thrust 30000 ; filtre `crtp.port == 3` : 1 paquet | +| USB, port 2 (paramètres), canal 0 | Info « Parameters », canal « Table Of Contents », octet restant en `Undecoded: 03` | +| Radio, port 5 (journalisation), canal 0 | Info « Logging », `Undecoded: 010203` | +| UDP (simulateur), console « SIM ok\n » | colonnes `127.0.0.1:19950 → UDP`, texte décodé | +| Type de liaison inconnu (9) | colonne Protocole « CRTP », Info vide, aucun arbre : abandon silencieux | +| Filtres | `crazyrealtimetprotocol` : 4 paquets sur 5 ; `crtp` : 0 (filtre du protocole natif homonyme) | + +## Limites constatées + +- Nom du protocole : `CrazyRealTimeTProtocol` (ligne 7, avec un « T » + en trop), d'où le filtre `crazyrealtimetprotocol`, alors que les champs + sont nommés `crtp.*`, espace de noms du protocole natif homonyme de + Wireshark : `crtp` seul ne sélectionne pas ces paquets. +- Lié à `USER15` (DLT 162), type de lien réservé à l'usage privé : + conflit possible avec d'autres scripts qui l'utilisent ; aucune + préférence pour le changer. +- Le texte de console est affiché avec les échappements (`\n`). +- Pour un type de liaison inconnu, le dissecteur renvoie sans rien + ajouter (ligne 1263) mais a déjà écrit « CRTP » dans la colonne + Protocole. +- Nombreuses variables globales : `crtp`, `link`, `crtp_start`, + `undecoded`, `port_name`, `channel_name`, `wtap_encap`, `type`, + `num_type`… et toutes les fonctions `handle_*`, `format_*` et + `get_crtp_port_channel_names` ; conflits possibles avec d'autres + scripts. +- Utilise la bibliothèque `bit` (`bit.band`, `bit.rshift`), encore + fournie par Wireshark 4.6. diff --git a/dissectors/crazyflie-crtp-evoggy/src/crtp-dissector.lua b/dissectors/crazyflie-crtp-evoggy/src/crtp-dissector.lua new file mode 100644 index 0000000..cab6f76 --- /dev/null +++ b/dissectors/crazyflie-crtp-evoggy/src/crtp-dissector.lua @@ -0,0 +1,1363 @@ +-- SPDX-License-Identifier: MIT OR Apache-2.0 +-- Importé de https://github.com/evoggy/wireshark-crazyflie (dissector/crtp-dissector.lua), +-- commit c707ffa390ad77e69e8525ffc5fa804e4f29dd4b du 21/10/2026 (dernière modification du fichier : +-- commit c707ffa390ad77e69e8525ffc5fa804e4f29dd4b du 21/10/2026). +-- Licence amont : MIT OR Apache-2.0 (README et Cargo.toml amont) — voir README.md. +-- declare our protocol +crtp = Proto("CrazyRealTimeTProtocol", "Crazy Real Time Protocol") + +-- General CRTP packet fields +local f_crtp_port = ProtoField.uint8("crtp.port", "Port") +local f_crtp_channel = ProtoField.uint8("crtp.channel", "Channel") +local f_crtp_size = ProtoField.uint8("crtp.size", "Size") +local f_crtp_undecoded = ProtoField.string("crtp.undecoded", "Undecoded") +local f_crtp_safelink_up = ProtoField.uint8("crtp.safelink_up", "SafeLink Up Counter") +local f_crtp_safelink_down = ProtoField.uint8("crtp.safelink_down", "SafeLink Down Counter") + +-- Specialized CRTP service fields + +-- Console fields +local f_crtp_console_text = ProtoField.string("crtp.console_text", "Text", base.ASCII) + +-- Parameter fields +local f_crtp_parameter_varid = ProtoField.uint16("crtp.parameter_varid", "Variable Id") +local f_crtp_parameter_type = ProtoField.string("crtp.parameter_type", "Parameter Type") +local f_crtp_parameter_group = ProtoField.string("crtp.parameter_group", "Parameter Group") +local f_crtp_parameter_name = ProtoField.string("crtp.parameter_name", "Parameter Name") +local f_crtp_parameter_count = ProtoField.uint16("crtp.parameter_count", "Parameter Count") +local f_crtp_parameter_crc = ProtoField.string("crtp.parameter_crc", "Parameter CRC") +local f_crtp_parameter_val_uint = ProtoField.uint32("crtp.parameter_val_uint", "Value uint") +local f_crtp_parameter_val_int = ProtoField.int32("crtp.parameter_val_int", "Value int") +local f_crtp_parameter_val_float = ProtoField.float("crtp.parameter_val_float", "Value float") +local f_crtp_parameter_misc_cmd = ProtoField.string("crtp.parameter_misc_cmd", "Misc Command") + +-- Commander fields (Port 3) +local f_crtp_commander_roll = ProtoField.float("crtp.commander_roll", "Roll") +local f_crtp_commander_pitch = ProtoField.float("crtp.commander_pitch", "Pitch") +local f_crtp_commander_yaw = ProtoField.float("crtp.commander_yaw", "Yaw Rate") +local f_crtp_commander_thrust = ProtoField.uint16("crtp.commander_thrust", "Thrust") + +-- Memory fields (Port 4) +local f_crtp_memory_cmd = ProtoField.string("crtp.memory_cmd", "Command") +local f_crtp_memory_id = ProtoField.uint8("crtp.memory_id", "Memory ID") +local f_crtp_memory_type = ProtoField.string("crtp.memory_type", "Memory Type") +local f_crtp_memory_size = ProtoField.uint32("crtp.memory_size", "Memory Size") +local f_crtp_memory_addr = ProtoField.uint64("crtp.memory_addr", "Address") +local f_crtp_memory_count = ProtoField.uint8("crtp.memory_count", "Memory Count") + +-- Log fields +local f_crtp_log_varid = ProtoField.uint16("crtp.log_varid", "Variable Id") +local f_crtp_log_type = ProtoField.string("crtp.log_type", "Log Type") +local f_crtp_log_group = ProtoField.string("crtp.log_group", "Log Group") +local f_crtp_log_name = ProtoField.string("crtp.log_name", "Log Name") +local f_crtp_log_count = ProtoField.uint16("crtp.log_count", "Log Count") +local f_crtp_log_crc = ProtoField.string("crtp.log_crc", "Log CRC") +local f_crtp_log_block_id = ProtoField.uint8("crtp.log_block_id", "Block ID") +local f_crtp_log_timestamp = ProtoField.uint32("crtp.log_timestamp", "Timestamp") +local f_crtp_log_settings_cmd = ProtoField.string("crtp.log_settings_cmd", "Settings Command") + +-- Localization fields (Port 6) +local f_crtp_loc_cmd = ProtoField.string("crtp.loc_cmd", "Command") +local f_crtp_loc_x = ProtoField.float("crtp.loc_x", "X") +local f_crtp_loc_y = ProtoField.float("crtp.loc_y", "Y") +local f_crtp_loc_z = ProtoField.float("crtp.loc_z", "Z") +local f_crtp_loc_qx = ProtoField.float("crtp.loc_qx", "Quaternion X") +local f_crtp_loc_qy = ProtoField.float("crtp.loc_qy", "Quaternion Y") +local f_crtp_loc_qz = ProtoField.float("crtp.loc_qz", "Quaternion Z") +local f_crtp_loc_qw = ProtoField.float("crtp.loc_qw", "Quaternion W") +local f_crtp_loc_bs_id = ProtoField.uint8("crtp.loc_bs_id", "Base Station ID") + +-- Generic Setpoint fields (Port 7) +local f_crtp_generic_type = ProtoField.string("crtp.generic_type", "Setpoint Type") +local f_crtp_generic_vx = ProtoField.float("crtp.generic_vx", "Velocity X") +local f_crtp_generic_vy = ProtoField.float("crtp.generic_vy", "Velocity Y") +local f_crtp_generic_vz = ProtoField.float("crtp.generic_vz", "Velocity Z") +local f_crtp_generic_x = ProtoField.float("crtp.generic_x", "X") +local f_crtp_generic_y = ProtoField.float("crtp.generic_y", "Y") +local f_crtp_generic_z = ProtoField.float("crtp.generic_z", "Z") +local f_crtp_generic_yaw = ProtoField.float("crtp.generic_yaw", "Yaw") +local f_crtp_generic_yaw_rate = ProtoField.float("crtp.generic_yaw_rate", "Yaw Rate") +local f_crtp_generic_roll = ProtoField.float("crtp.generic_roll", "Roll") +local f_crtp_generic_pitch = ProtoField.float("crtp.generic_pitch", "Pitch") +local f_crtp_generic_thrust = ProtoField.uint16("crtp.generic_thrust", "Thrust") +local f_crtp_generic_rate_mode = ProtoField.bool("crtp.generic_rate_mode", "Rate Mode") +local f_crtp_generic_zdist = ProtoField.float("crtp.generic_zdist", "Z Distance") + +-- Platform fields (Port 13) +local f_crtp_platform_cmd = ProtoField.string("crtp.platform_cmd", "Platform Command") +local f_crtp_platform_version_cmd = ProtoField.string("crtp.platform_version_cmd", "Version Command") +local f_crtp_platform_protocol_version = ProtoField.uint8("crtp.platform_protocol_version", "Protocol Version") +local f_crtp_platform_firmware_version = ProtoField.string("crtp.platform_firmware_version", "Firmware Version") +local f_crtp_platform_device_type = ProtoField.string("crtp.platform_device_type", "Device Type") +local f_crtp_platform_arm_request = ProtoField.bool("crtp.platform_arm_request", "Arm Request") + +local f_crtp_setpoint_hl_command = ProtoField.string("crtp.setpoint_hl_command", "Command") +local f_crtp_setpoint_hl_retval = ProtoField.uint8("crtp.setpoint_hl_retval", "Return Value") + +local f_crtp_setpoint_hl_groupmask = ProtoField.uint8("crtp.setpoint_hl_groupmask", "Group Mask") +local f_crtp_setpoint_hl_id = ProtoField.uint8("crtp.setpoint_hl_id", "Trajectory Id") + +local f_crtp_setpoint_hl_height = ProtoField.float("crtp.setpoint_hl_height", "Height") +local f_crtp_setpoint_hl_yaw = ProtoField.float("crtp.setpoint_hl_yaw", "Yaw") +local f_crtp_setpoint_hl_use_yaw = ProtoField.bool("crtp.setpoint_hl_use_yaw", "Use Current Yaw") +local f_crtp_setpoint_hl_relative = ProtoField.bool("crtp.setpoint_hl_relative", "Relative") +local f_crtp_setpoint_hl_duration = ProtoField.float("crtp.setpoint_hl_duration", "Duration") +local f_crtp_setpoint_hl_timescale = ProtoField.float("crtp.setpoint_hl_timescale", "Timescale") + +local f_crtp_setpoint_hl_x = ProtoField.float("crtp.setpoint_hl_x", "X") +local f_crtp_setpoint_hl_y = ProtoField.float("crtp.setpoint_hl_y", "Y") +local f_crtp_setpoint_hl_z = ProtoField.float("crtp.setpoint_hl_z", "Z") + +-- Link control fields (Port 15) +local f_crtp_echo_data = ProtoField.uint32("crtp.echo_data", "Echo Data") +local f_crtp_safelink_type = ProtoField.string("crtp.safelink_type", "SafeLink") + +-- All possible fields registered +crtp.fields = { + -- General + f_crtp_port, + f_crtp_channel, + f_crtp_safelink_up, + f_crtp_safelink_down, + f_crtp_size, + f_crtp_undecoded, + -- Console + f_crtp_console_text, + -- Parameters + f_crtp_parameter_varid, + f_crtp_parameter_val_uint, + f_crtp_parameter_val_int, + f_crtp_parameter_val_float, + f_crtp_parameter_name, + f_crtp_parameter_group, + f_crtp_parameter_type, + f_crtp_parameter_count, + f_crtp_parameter_crc, + f_crtp_parameter_misc_cmd, + -- Commander + f_crtp_commander_roll, + f_crtp_commander_pitch, + f_crtp_commander_yaw, + f_crtp_commander_thrust, + -- Memory + f_crtp_memory_cmd, + f_crtp_memory_id, + f_crtp_memory_type, + f_crtp_memory_size, + f_crtp_memory_addr, + f_crtp_memory_count, + -- Logging + f_crtp_log_varid, + f_crtp_log_name, + f_crtp_log_group, + f_crtp_log_type, + f_crtp_log_count, + f_crtp_log_crc, + f_crtp_log_block_id, + f_crtp_log_timestamp, + f_crtp_log_settings_cmd, + -- Localization + f_crtp_loc_cmd, + f_crtp_loc_x, + f_crtp_loc_y, + f_crtp_loc_z, + f_crtp_loc_qx, + f_crtp_loc_qy, + f_crtp_loc_qz, + f_crtp_loc_qw, + f_crtp_loc_bs_id, + -- Generic Setpoint + f_crtp_generic_type, + f_crtp_generic_vx, + f_crtp_generic_vy, + f_crtp_generic_vz, + f_crtp_generic_x, + f_crtp_generic_y, + f_crtp_generic_z, + f_crtp_generic_yaw, + f_crtp_generic_yaw_rate, + f_crtp_generic_roll, + f_crtp_generic_pitch, + f_crtp_generic_thrust, + f_crtp_generic_rate_mode, + f_crtp_generic_zdist, + -- High-level Setpoint + f_crtp_setpoint_hl_command, + f_crtp_setpoint_hl_retval, + f_crtp_setpoint_hl_use_yaw, + f_crtp_setpoint_hl_yaw, + f_crtp_setpoint_hl_groupmask, + f_crtp_setpoint_hl_duration, + f_crtp_setpoint_hl_height, + f_crtp_setpoint_hl_relative, + f_crtp_setpoint_hl_x, + f_crtp_setpoint_hl_y, + f_crtp_setpoint_hl_z, + f_crtp_setpoint_hl_id, + f_crtp_setpoint_hl_timescale, + -- Platform + f_crtp_platform_cmd, + f_crtp_platform_version_cmd, + f_crtp_platform_protocol_version, + f_crtp_platform_firmware_version, + f_crtp_platform_device_type, + f_crtp_platform_arm_request, + -- Link Control + f_crtp_echo_data, + f_crtp_safelink_type, +} + +local param_toc = {} +local log_toc = {} + +local Links = { + UNKNOWN = 0, + RADIO = 1, + USB = 2, + UDP = 3, +} + +local link = Links.UNKNOWN +local undecoded = 0 +local crtp_start = 0 + +-- Analye port and channel and figure what service (port name / channel name) +-- we are dealing with + +local Ports = { + Console = 0x0, + Parameters = 0x2, + Commander = 0x3, + Memory = 0x4, + Logging = 0x5, + Localization = 0x6, + Commander_Generic = 0x7, + Setpoint_Highlevel = 0x8, + Platform = 0xD, + LinkControl = 0xF, + ALL = 0xFF +} + +function get_crtp_port_channel_names(port, channel) + local port_name = "Unknown" + local channel_name = nil + + if port == Ports.Console and channel == 0 then + port_name = "Console" + elseif port == 0x02 then + port_name = "Parameters" + if channel == 0 then + channel_name = "Table Of Contents" + elseif channel == 1 then + channel_name = "Read" + elseif channel == 2 then + channel_name = "Write" + elseif channel == 3 then + channel_name = "Misc" + end + elseif port == 0x03 then + port_name = "Commander" + elseif port == 0x04 then + port_name = "Memory" + if channel == 0 then + channel_name = "Information" + elseif channel == 1 then + channel_name = "Read" + elseif channel == 2 then + channel_name = "Write" + end + elseif port == 0x05 then + port_name = "Logging" + if channel == 0 then + channel_name = "Table Of Contents" + elseif channel == 1 then + channel_name = "Settings" + elseif channel == 2 then + channel_name = "Log data" + end + elseif port == 0x06 then + port_name = "Localization" + if channel == 0 then + channel_name = "Position" + elseif channel == 1 then + channel_name = "Generic" + end + elseif port == 0x07 then + port_name = "Commander Generic" + elseif port == 0x08 then + port_name = "Setpoint Highlevel" + elseif port == 0x0D then + port_name = "Platform" + if channel == 0 then + channel_name = "Platform Command" + elseif channel == 1 then + channel_name = "Version Command" + elseif channel == 2 then + channel_name = "App Layer" + end + elseif port == 0x0F then + port_name = "Link Control" + if channel == 0 then + channel_name = "Echo" + elseif channel == 1 then + channel_name = "Link Service Source" + elseif channel == 3 then + channel_name = "Null Packet" + end + elseif port == 0xFF then + port_name = "ALL" + end + + return port_name, channel_name +end + +function format_address(buffer) + if link == Links.RADIO then + addr = buffer(2, 5):bytes():tohex() + port = buffer(7, 1):uint() + + addr = addr:gsub("..", ":%0"):sub(2) + port = tostring(port) + + return addr .. " (" .. port .. ")" + elseif link == Links.USB then + -- Serial starts at byte 15 (after link_type + direction + address(12) + channel) + serial = buffer(15, 16):string():gsub("%z+$", "") -- trim trailing nulls + if serial == "" then + return "Crazyflie" + end + return serial + elseif link == Links.UDP then + -- Peer address (host:port) is in the serial field at byte 15, same layout as USB + serial = buffer(15, 16):string():gsub("%z+$", "") -- trim trailing nulls + return serial + end +end + +function format_device(buffer) + if link == Links.RADIO then + -- Serial starts at byte 8 (after link_type + direction + address(5) + channel) + serial = buffer(8, 16):string():gsub("%z+$", "") -- trim trailing nulls + if serial == "" then + return "Radio" + end + return "Radio " .. serial + elseif link == Links.USB then + return "USB" + elseif link == Links.UDP then + return "UDP" + end +end + +function handle_setpoint_highlevel(tree, receive, buffer, channel, size) + local Commands = { + COMMAND_SET_GROUP_MASK = 0, + COMMAND_TAKEOFF = 1, + COMMAND_LAND = 2, + COMMAND_STOP = 3, + COMMAND_GO_TO = 4, + COMMAND_START_TRAJECTORY = 5, + COMMAND_DEFINE_TRAJECTORY = 6, + COMMAND_TAKEOFF_2 = 7, + COMMAND_LAND_2 = 8, + COMMAND_TAKEOFF_WITH_VELOCITY = 9, + COMMAND_LAND_WITH_VELOCITY = 10, + COMMAND_SPIRAL = 11, + COMMAND_GO_TO_2 = 12, + COMMAND_START_TRAJECTORY_2 = 13, + } + + local height = nil + local duration = nil + local yaw = nil + local group_mask = nil + local use_yaw = nil + local relative = nil + local x = nil + local y = nil + local z = nil + local id = nil + local timescale = nil + + local port_tree = tree:add(crtp, port_name) + + local cmd = buffer(crtp_start + 1, 1):uint() + local cmd_str = "Unknown" + + if cmd == Commands.COMMAND_SET_GROUP_MASK then + cmd_str = "Set Group Mask" + + -- struct data_set_group_mask { + -- uint8_t groupMask; // mask for which CFs this should apply to + -- } __attribute__((packed)); + if receive == 0 then + group_mask = buffer(11, 1):uint() + end + elseif cmd == Commands.COMMAND_TAKEOFF then + cmd_str = "Take Off (deprecated)" + elseif cmd == Commands.COMMAND_LAND then + cmd_str = "Land (deprecated)" + elseif cmd == Commands.COMMAND_STOP then + cmd_str = "Stop" + + -- struct data_stop { + -- uint8_t groupMask; // mask for which CFs this should apply to + -- } __attribute__((packed)); + if receive == 0 then + group_mask = buffer(crtp_start + 2, 1):uint() + end + undecoded = undecoded - 1 + elseif cmd == Commands.COMMAND_GO_TO then + cmd_str = "Go To" + + -- struct data_go_to { + -- uint8_t groupMask; // mask for which CFs this should apply to + -- uint8_t relative; // set to true, if position/yaw are relative to current setpoint + -- float x; // m + -- float y; // m + -- float z; // m + -- float yaw; // rad + -- float duration; // sec + -- } __attribute__((packed)); + if receive == 0 then + group_mask = buffer(crtp_start + 2, 1):uint() + relative = buffer(crtp_start + 3, 1):uint() + x = buffer(crtp_start + 4, 4):le_float() + y = buffer(crtp_start + 8, 4):le_float() + z = buffer(crtp_start + 12, 4):le_float() + yaw = buffer(crtp_start + 16, 4):le_float() + duration = buffer(crtp_start + 20, 4):le_float() + undecoded = undecoded - 24 + end + elseif cmd == Commands.COMMAND_START_TRAJECTORY then + cmd_str = "Start Trajectory" + + -- struct data_start_trajectory { + -- uint8_t groupMask; // mask for which CFs this should apply to + -- uint8_t relative; // set to true, if trajectory should be shifted to current setpoint + -- uint8_t reversed; // set to true, if trajectory should be executed in reverse + -- uint8_t trajectoryId; // id of the trajectory (previously defined by COMMAND_DEFINE_TRAJECTORY) + -- float timescale; // time factor; 1 = original speed; >1: slower; <1: faster + -- } __attribute__((packed)); + if receive == 0 then + group_mask = buffer(crtp_start + 2, 1):uint() + relative = buffer(crtp_start + 3, 1):uint() + reversed = buffer(crtp_start + 4, 1):uint() + id = buffer(crtp_start + 5, 1):uint() + timescale = buffer(crtp_start + 6):float() + undecoded = undecoded - 10 + end + elseif cmd == Commands.COMMAND_DEFINE_TRAJECTORY then + cmd_str = "Define Trajectory" + + -- struct data_define_trajectory { + -- uint8_t trajectoryId; + -- struct trajectoryDescription description; + -- } __attribute__((packed)); + if receive == 0 then + id = buffer(crtp_start + 2, 1):uint() + undecoded = undecoded - 1 + end + elseif cmd == Commands.COMMAND_TAKEOFF_2 then + cmd_str = "Take Off" + + -- struct data_takeoff_2 { + -- uint8_t groupMask; // mask for which CFs this should apply to + -- float height; // m (absolute) + -- float yaw; // rad + -- bool useCurrentYaw; // If true, use the current yaw (ignore the yaw parameter) + -- float duration; // s (time it should take until target height is reached) + -- } __attribute__((packed)); + if receive == 0 then + group_mask = buffer(crtp_start + 2, 1):uint() + height = buffer(crtp_start + 3, 4):le_float() + yaw = buffer(crtp_start + 7, 4):le_float() + use_yaw = buffer(crtp_start + 11, 1):uint() + duration = buffer(crtp_start + 12, 4):le_float() + undecoded = undecoded - 16 + end + elseif cmd == Commands.COMMAND_LAND_2 then + cmd_str = "Land" + -- struct data_land_2 { + -- uint8_t groupMask; // mask for which CFs this should apply to + -- float height; // m (absolute) + -- float yaw; // rad + -- bool useCurrentYaw; // If true, use the current yaw (ignore the yaw parameter) + -- float duration; // s (time it should take until target height is reached) + -- } __attribute__((packed)); + if receive == 0 then + group_mask = buffer(crtp_start + 2, 1):uint() + height = buffer(crtp_start + 3, 4):le_float() + yaw = buffer(crtp_start + 7, 4):le_float() + use_yaw = buffer(crtp_start + 11, 1):uint() + duration = buffer(crtp_start + 12, 4):le_float() + undecoded = undecoded - 16 + end + elseif cmd == Commands.COMMAND_TAKEOFF_WITH_VELOCITY then + cmd_str = "Take Off With Velocity" + elseif cmd == Commands.COMMAND_LAND_WITH_VELOCITY then + cmd_str = "Land With Velocity" + elseif cmd == Commands.COMMAND_SPIRAL then + cmd_str = "Spiral" + -- struct data_spiral { + -- uint8_t groupMask; + -- bool sideways; + -- bool clockwise; + -- float phi; // rad + -- float r0; // m (start radius) + -- float rf; // m (final radius) + -- float dz; // m (altitude change) + -- float duration; // s + -- } __attribute__((packed)); + if receive == 0 and size >= 20 then + group_mask = buffer(crtp_start + 2, 1):uint() + -- sideways and clockwise are at +3 and +4 + -- phi at +5, r0 at +9, rf at +13, dz at +17, duration at +21 + undecoded = undecoded - 19 + end + elseif cmd == Commands.COMMAND_GO_TO_2 then + cmd_str = "Go To (v2)" + -- struct data_go_to_2 { + -- uint8_t groupMask; + -- uint8_t relative; + -- uint8_t linear; // 0 = smooth trajectory, 1 = straight line + -- float x; float y; float z; + -- float yaw; + -- float duration; + -- } __attribute__((packed)); + if receive == 0 and size >= 24 then + group_mask = buffer(crtp_start + 2, 1):uint() + relative = buffer(crtp_start + 3, 1):uint() + -- linear at +4 + x = buffer(crtp_start + 5, 4):le_float() + y = buffer(crtp_start + 9, 4):le_float() + z = buffer(crtp_start + 13, 4):le_float() + yaw = buffer(crtp_start + 17, 4):le_float() + duration = buffer(crtp_start + 21, 4):le_float() + undecoded = undecoded - 24 + end + elseif cmd == Commands.COMMAND_START_TRAJECTORY_2 then + cmd_str = "Start Trajectory (v2)" + -- struct data_start_trajectory_2 { + -- uint8_t groupMask; + -- uint8_t relative; + -- uint8_t reversed; + -- uint8_t trajectoryId; + -- float timescale; + -- float timeOffset; // s (added in v2) + -- } __attribute__((packed)); + if receive == 0 and size >= 13 then + group_mask = buffer(crtp_start + 2, 1):uint() + relative = buffer(crtp_start + 3, 1):uint() + -- reversed at +4 + id = buffer(crtp_start + 5, 1):uint() + timescale = buffer(crtp_start + 6, 4):le_float() + -- timeOffset at +10 + undecoded = undecoded - 13 + end + end + + port_tree:add_le(f_crtp_setpoint_hl_command, cmd_str) + local success = true + if receive == 1 then + retval = buffer(crtp_start + 4):uint() + local success = (retval == 0) and "Success" or "Failure" + port_tree:add_le(f_crtp_setpoint_hl_retval, retval):append_text(" (" .. success .. ")") + undecoded = undecoded - 4 + end + + if id then + port_tree:add_le(f_crtp_setpoint_hl_id, id) + end + if timescale then + port_tree:add_le(f_crtp_setpoint_hl_timescale, timescale) + end + if group_mask then + port_tree:add_le(f_crtp_setpoint_hl_groupmask, group_mask) + end + if relative then + port_tree:add_le(f_crtp_setpoint_hl_relative, relative) + end + if height then + port_tree:add_le(f_crtp_setpoint_hl_height, height):append_text(" (m)") + end + if x then + port_tree:add_le(f_crtp_setpoint_hl_x, x) + end + if y then + port_tree:add_le(f_crtp_setpoint_hl_y, y) + end + if z then + port_tree:add_le(f_crtp_setpoint_hl_z, z) + end + if yaw then + port_tree:add_le(f_crtp_setpoint_hl_yaw, yaw) + end + if use_yaw then + port_tree:add_le(f_crtp_setpoint_hl_use_yaw, use_yaw) + end + if duration then + port_tree:add_le(f_crtp_setpoint_hl_duration, duration):append_text(" (s)") + end +end + +function append_param_type(str, type) + if #str == 0 then + return type + else + return str .. " | " .. type + end +end + +function get_log_types(byte) + type = "" + + local core = 0x20 + local byfunc = 0x40 + local group = 0x80 + + num_types_map = { + "LOG_UINT8", + "LOG_UINT16", + "LOG_UINT32", + "LOG_INT8", + "LOG_INT16", + "LOG_INT32", + "LOG_FLOAT", + "LOG_FP16", + } + + num_type = bit.band(byte, 0x0F) + type = num_types_map[num_type] + + if bit.band(byte, core) ~= 0 then + type = append_param_type(type, "LOG_CORE") + end + + if bit.band(byte, byfunc) ~= 0 then + type = append_param_type(type, "LOG_BYFUNC") + end + + if bit.band(byte, group) ~= 0 then + type = append_param_type(type, "LOG_GROUP") + end + + return byte .. " (" .. type .. ")" +end + +function get_param_types(byte) + type = "" + + local ext = bit.lshift(1, 4) + local core = bit.lshift(1, 5) + local ronly = bit.lshift(1, 6) + local group = bit.lshift(1, 7) + + num_type = bit.band(byte, 0x0F) + if num_type == 0 then + type = "PARAM_INT8" + elseif num_type == bit.lshift(0x1, 3) then + type = "PARAM_UINT8" + elseif num_type == bit.bor(0x1, bit.lshift(0x1, 3)) then + type = "PARAM_UINT16" + elseif num_type == 0x1 then + type = "PARAM_INT16" + elseif num_type == 0x2 then + type = "PARAM_INT32" + elseif num_type == bit.bor(0x2, bit.lshift(0x1, 3)) then + type = "PARAM_UINT32" + elseif num_type == bit.bor(0x2, bit.lshift(0x1, 2)) then + type = "PARAM_FLOAT" + end + + if bit.band(byte, core) ~= 0 then + type = append_param_type(type, "PARAM_CORE") + end + + if bit.band(byte, ronly) ~= 0 then + type = append_param_type(type, "PARAM_RONLY") + end + + if bit.band(byte, group) ~= 0 then + type = append_param_type(type, "PARAM_GROUP") + end + + if bit.band(byte, ext) ~= 0 then + type = append_param_type(type, "PARAM_EXTENDED") + end + + return byte .. " (" .. type .. ")" +end + +function handle_logging_port(tree, receive, buffer, channel, size) + local port_tree = tree:add(crtp, port_name) + + local LogSettingsCommands = { + [0] = "Create Block (V1)", + [1] = "Append Block (V1)", + [2] = "Delete Block", + [3] = "Start Block", + [4] = "Stop Block", + [5] = "Reset", + [6] = "Create Block (V2)", + [7] = "Append Block (V2)", + } + + -- TOC (Channel 0) + if channel == 0 then + message_id = buffer(crtp_start + 1, 1):le_uint() + if message_id == 3 and receive == 1 then + port_tree:add_le(f_crtp_log_count, buffer(crtp_start + 2, 2):le_uint()) + port_tree:add_le(f_crtp_log_crc, buffer(crtp_start + 4):bytes():tohex()) + end + if message_id == 2 then + -- GET_ITEM + item = {} + item["varid"] = buffer(crtp_start + 2, 2):le_uint() + port_tree:add_le(f_crtp_log_varid, item["varid"]) + + if receive == 1 then + item["type"] = get_log_types(buffer(crtp_start + 4, 1):le_uint()) + item["group"] = "" + item["name"] = "" + full_name = buffer(crtp_start + 5):string() + + stored_group = false + for i = 1, #full_name do + local c = full_name:sub(i, i) + if string.byte(c) == 0 and not stored_group then + stored_group = true + else + if stored_group then + item["name"] = item["name"] .. c + else + item["group"] = item["group"] .. c + end + end + end + + log_toc[item["varid"]] = item + port_tree:add_le(f_crtp_log_type, item["type"]) + port_tree:add_le(f_crtp_log_group, item["group"]) + port_tree:add_le(f_crtp_log_name, item["name"]) + end + end + -- Settings (Channel 1) + elseif channel == 1 then + if size >= 2 then + local cmd = buffer(crtp_start + 1, 1):le_uint() + local cmd_name = LogSettingsCommands[cmd] or "Unknown" + port_tree:add_le(f_crtp_log_settings_cmd, cmd_name .. " (" .. cmd .. ")") + + if size >= 3 then + local block_id = buffer(crtp_start + 2, 1):le_uint() + port_tree:add_le(f_crtp_log_block_id, block_id) + undecoded = undecoded - 2 + + -- For Create Block V2 (cmd 6) and Append Block V2 (cmd 7) + if (cmd == 6 or cmd == 7) and size > 3 then + -- Contains variable IDs and types + -- Each variable entry is 3 bytes: type (1) + varid (2) + undecoded = undecoded - (size - 3) + -- For Start Block (cmd 3) + elseif cmd == 3 and size >= 4 then + -- Period in 10ms units + local period = buffer(crtp_start + 3, 1):le_uint() * 10 + undecoded = undecoded - 1 + end + else + undecoded = undecoded - 1 + end + end + -- Log data (Channel 2) + elseif channel == 2 then + if size >= 4 then + local block_id = buffer(crtp_start + 1, 1):le_uint() + -- Timestamp is 24-bit little-endian (3 bytes) + local ts_low = buffer(crtp_start + 2, 1):le_uint() + local ts_mid = buffer(crtp_start + 3, 1):le_uint() + local ts_high = buffer(crtp_start + 4, 1):le_uint() + local timestamp = ts_low + ts_mid * 256 + ts_high * 65536 + + port_tree:add_le(f_crtp_log_block_id, block_id) + port_tree:add_le(f_crtp_log_timestamp, timestamp):append_text(" ms") + undecoded = undecoded - 4 + -- Remaining bytes are packed log variable values + end + end +end + +function handle_parameter_port(tree, receive, buffer, channel, size) + local port_tree = tree:add(crtp, port_name) + + local ParamMiscCommands = { + [0] = "Set By Name", + [1] = "Value Updated", + [2] = "Get Extended Type", + [3] = "Persistent Store", + [4] = "Persistent Get State", + [5] = "Persistent Clear", + [6] = "Get Default Value", + } + + -- Read or Write + if (channel == 1 or channel == 2) and size > 2 then + if channel == 1 then + value_start = 4 + else + value_start = 3 + end + + -- Add variable id + local var_id = buffer(crtp_start + 1, 2):le_uint() + port_tree:add_le(f_crtp_parameter_varid, var_id) + + item = param_toc[var_id] + port_tree:add_le(f_crtp_parameter_group, item["group"]) + port_tree:add_le(f_crtp_parameter_name, item["name"]) + + -- Add value + if size > 3 then + port_tree:add_le(f_crtp_parameter_val_uint, buffer(crtp_start + value_start):le_uint()) + port_tree:add_le(f_crtp_parameter_val_int, buffer(crtp_start + value_start):le_int()) + end + if size >= 7 then + port_tree:add_le(f_crtp_parameter_val_float, buffer(crtp_start + value_start):le_float()) + end + undecoded = 0 + end + -- TOC + if channel == 0 then + message_id = buffer(crtp_start + 1, 1):le_uint() + if message_id == 3 and receive == 1 then + port_tree:add_le(f_crtp_parameter_count, buffer(crtp_start + 2, 2):le_uint()) + port_tree:add_le(f_crtp_parameter_crc, buffer(crtp_start + 4):bytes():tohex()) + end + if message_id == 2 then + -- GET_ITEM + item = {} + item["varid"] = buffer(crtp_start + 2, 2):le_uint() + port_tree:add_le(f_crtp_parameter_varid, item["varid"]) + + if receive == 1 then + item["type"] = get_param_types(buffer(crtp_start + 4, 1):le_uint()) + item["group"] = "" + item["name"] = "" + full_name = buffer(crtp_start + 5):string() + + stored_group = false + for i = 1, #full_name do + local c = full_name:sub(i, i) + if string.byte(c) == 0 and not stored_group then + stored_group = true + else + if stored_group then + item["name"] = item["name"] .. c + else + item["group"] = item["group"] .. c + end + end + end + + param_toc[item["varid"]] = item + port_tree:add_le(f_crtp_parameter_type, item["type"]) + port_tree:add_le(f_crtp_parameter_group, item["group"]) + port_tree:add_le(f_crtp_parameter_name, item["name"]) + end + end + end + -- Misc channel + if channel == 3 and size >= 2 then + local cmd = buffer(crtp_start + 1, 1):le_uint() + local cmd_name = ParamMiscCommands[cmd] or "Unknown" + port_tree:add_le(f_crtp_parameter_misc_cmd, cmd_name .. " (" .. cmd .. ")") + undecoded = undecoded - 1 + + -- For Set By Name (cmd 0), the rest is group\0name\0value + -- For Value Updated (cmd 1), contains varid + if cmd == 1 and size >= 4 then + local var_id = buffer(crtp_start + 2, 2):le_uint() + port_tree:add_le(f_crtp_parameter_varid, var_id) + undecoded = undecoded - 2 + end + end +end + +function handle_commander_port(tree, receive, buffer, channel, size) + -- Commander port sends RPYT (Roll, Pitch, Yaw-rate, Thrust) setpoints + -- Format: 4 floats (roll, pitch, yaw_rate) + 1 uint16 (thrust) = 14 bytes + local port_tree = tree:add(crtp, port_name) + + if size >= 14 then + local roll = buffer(crtp_start + 1, 4):le_float() + local pitch = buffer(crtp_start + 5, 4):le_float() + local yaw_rate = buffer(crtp_start + 9, 4):le_float() + local thrust = buffer(crtp_start + 13, 2):le_uint() + + port_tree:add_le(f_crtp_commander_roll, roll):append_text(" (deg)") + port_tree:add_le(f_crtp_commander_pitch, pitch):append_text(" (deg)") + port_tree:add_le(f_crtp_commander_yaw, yaw_rate):append_text(" (deg/s)") + port_tree:add_le(f_crtp_commander_thrust, thrust) + + undecoded = undecoded - 14 + end +end + +function handle_memory_port(tree, receive, buffer, channel, size) + local port_tree = tree:add(crtp, port_name) + + local MemoryTypes = { + [0x00] = "I2C", + [0x01] = "1-Wire", + [0x10] = "Driver LED", + [0x11] = "Loco", + [0x12] = "Trajectory", + [0x13] = "Loco2", + [0x14] = "Lighthouse", + [0x15] = "Memory Tester", + [0x17] = "Driver LED Timing", + [0x18] = "App", + [0x19] = "Deck Memory", + [0x1A] = "Deck Multiranger", + [0x1B] = "Deck PAA3905", + [0x20] = "DeckCtrl DFU", + [0x21] = "DeckCtrl", + } + + -- Channel 0: Info/TOC + if channel == 0 then + if size >= 2 then + local cmd = buffer(crtp_start + 1, 1):le_uint() + if cmd == 1 then + port_tree:add_le(f_crtp_memory_cmd, "Get Memory Count") + if receive == 1 and size >= 3 then + port_tree:add_le(f_crtp_memory_count, buffer(crtp_start + 2, 1):le_uint()) + undecoded = undecoded - 2 + else + undecoded = undecoded - 1 + end + elseif cmd == 2 then + port_tree:add_le(f_crtp_memory_cmd, "Get Memory Info") + if size >= 3 then + local mem_id = buffer(crtp_start + 2, 1):le_uint() + port_tree:add_le(f_crtp_memory_id, mem_id) + undecoded = undecoded - 2 + + if receive == 1 and size >= 12 then + local mem_type = buffer(crtp_start + 3, 1):le_uint() + local type_name = MemoryTypes[mem_type] or "Unknown" + port_tree:add_le(f_crtp_memory_type, mem_type .. " (" .. type_name .. ")") + local mem_size = buffer(crtp_start + 4, 4):le_uint() + port_tree:add_le(f_crtp_memory_size, mem_size):append_text(" bytes") + local mem_addr = buffer(crtp_start + 8, 8):le_uint64() + port_tree:add_le(f_crtp_memory_addr, mem_addr) + undecoded = undecoded - 10 + end + end + end + end + -- Channel 1: Read + elseif channel == 1 then + port_tree:add_le(f_crtp_memory_cmd, "Read") + if size >= 7 then + local mem_id = buffer(crtp_start + 1, 1):le_uint() + local addr = buffer(crtp_start + 2, 4):le_uint() + port_tree:add_le(f_crtp_memory_id, mem_id) + port_tree:add_le(f_crtp_memory_addr, addr) + undecoded = undecoded - 5 + end + -- Channel 2: Write + elseif channel == 2 then + port_tree:add_le(f_crtp_memory_cmd, "Write") + if size >= 7 then + local mem_id = buffer(crtp_start + 1, 1):le_uint() + local addr = buffer(crtp_start + 2, 4):le_uint() + port_tree:add_le(f_crtp_memory_id, mem_id) + port_tree:add_le(f_crtp_memory_addr, addr) + undecoded = undecoded - 5 + end + end +end + +function handle_localization_port(tree, receive, buffer, channel, size) + local port_tree = tree:add(crtp, port_name) + + local LocalizationTypes = { + [0] = "Range Stream Report", + [1] = "Range Stream Report FP16", + [2] = "LPS Short LPP Packet", + [3] = "Emergency Stop", + [4] = "Emergency Stop Watchdog", + [6] = "GNSS NMEA", + [7] = "GNSS Proprietary", + [8] = "External Pose", + [9] = "External Pose Packed", + [10] = "Lighthouse Angle Stream", + [11] = "Lighthouse Persist Data", + } + + -- Channel 0: External Position + if channel == 0 then + port_tree:add_le(f_crtp_loc_cmd, "External Position") + if size >= 13 then + local x = buffer(crtp_start + 1, 4):le_float() + local y = buffer(crtp_start + 5, 4):le_float() + local z = buffer(crtp_start + 9, 4):le_float() + + port_tree:add_le(f_crtp_loc_x, x):append_text(" (m)") + port_tree:add_le(f_crtp_loc_y, y):append_text(" (m)") + port_tree:add_le(f_crtp_loc_z, z):append_text(" (m)") + undecoded = undecoded - 12 + end + -- Channel 1: Generic localization + elseif channel == 1 then + if size >= 2 then + local cmd_type = buffer(crtp_start + 1, 1):le_uint() + local type_name = LocalizationTypes[cmd_type] or "Unknown" + port_tree:add_le(f_crtp_loc_cmd, type_name .. " (" .. cmd_type .. ")") + + if cmd_type == 3 then + -- Emergency Stop + undecoded = undecoded - 1 + elseif cmd_type == 4 then + -- Emergency Stop Watchdog + undecoded = undecoded - 1 + elseif cmd_type == 8 and size >= 29 then + -- External Pose: x, y, z, qx, qy, qz, qw (7 floats) + local x = buffer(crtp_start + 2, 4):le_float() + local y = buffer(crtp_start + 6, 4):le_float() + local z = buffer(crtp_start + 10, 4):le_float() + local qx = buffer(crtp_start + 14, 4):le_float() + local qy = buffer(crtp_start + 18, 4):le_float() + local qz = buffer(crtp_start + 22, 4):le_float() + local qw = buffer(crtp_start + 26, 4):le_float() + + port_tree:add_le(f_crtp_loc_x, x):append_text(" (m)") + port_tree:add_le(f_crtp_loc_y, y):append_text(" (m)") + port_tree:add_le(f_crtp_loc_z, z):append_text(" (m)") + port_tree:add_le(f_crtp_loc_qx, qx) + port_tree:add_le(f_crtp_loc_qy, qy) + port_tree:add_le(f_crtp_loc_qz, qz) + port_tree:add_le(f_crtp_loc_qw, qw) + undecoded = undecoded - 28 + elseif cmd_type == 10 and size >= 22 then + -- Lighthouse Angle Stream + local bs_id = buffer(crtp_start + 2, 1):le_uint() + port_tree:add_le(f_crtp_loc_bs_id, bs_id) + undecoded = undecoded - 2 + elseif cmd_type == 11 and size >= 5 then + -- Lighthouse Persist Data + undecoded = undecoded - 4 + end + end + end +end + +function handle_generic_setpoint_port(tree, receive, buffer, channel, size) + local port_tree = tree:add(crtp, port_name) + + local SetpointTypes = { + [0] = "Stop", + [1] = "Velocity World (Legacy)", + [2] = "Z Distance (Legacy)", + [3] = "CPPM Emulation", + [4] = "Alt Hold", + [5] = "Hover (Legacy)", + [6] = "Full State", + [7] = "Position", + [8] = "Velocity World", + [9] = "Z Distance", + [10] = "Hover", + [11] = "Manual", + } + + -- Channel 0: Setpoint data + if channel == 0 then + if size >= 2 then + local sp_type = buffer(crtp_start + 1, 1):le_uint() + local type_name = SetpointTypes[sp_type] or "Unknown" + port_tree:add_le(f_crtp_generic_type, type_name .. " (" .. sp_type .. ")") + + if sp_type == 0 then + -- Stop + undecoded = undecoded - 1 + elseif sp_type == 6 and size >= 30 then + -- Full State: x, y, z (i16 mm), vx, vy, vz (i16 mm/s), ax, ay, az (i16 mm/s^2), + -- quat (compressed), rollRate, pitchRate, yawRate (i16) + -- This is a complex compressed format + local x = buffer(crtp_start + 2, 2):le_int() / 1000.0 + local y = buffer(crtp_start + 4, 2):le_int() / 1000.0 + local z = buffer(crtp_start + 6, 2):le_int() / 1000.0 + + port_tree:add_le(f_crtp_generic_x, x):append_text(" (m)") + port_tree:add_le(f_crtp_generic_y, y):append_text(" (m)") + port_tree:add_le(f_crtp_generic_z, z):append_text(" (m)") + + local vx = buffer(crtp_start + 8, 2):le_int() / 1000.0 + local vy = buffer(crtp_start + 10, 2):le_int() / 1000.0 + local vz = buffer(crtp_start + 12, 2):le_int() / 1000.0 + + port_tree:add_le(f_crtp_generic_vx, vx):append_text(" (m/s)") + port_tree:add_le(f_crtp_generic_vy, vy):append_text(" (m/s)") + port_tree:add_le(f_crtp_generic_vz, vz):append_text(" (m/s)") + undecoded = undecoded - 29 + elseif sp_type == 7 and size >= 18 then + -- Position: x, y, z, yaw (4 floats) + local x = buffer(crtp_start + 2, 4):le_float() + local y = buffer(crtp_start + 6, 4):le_float() + local z = buffer(crtp_start + 10, 4):le_float() + local yaw = buffer(crtp_start + 14, 4):le_float() + + port_tree:add_le(f_crtp_generic_x, x):append_text(" (m)") + port_tree:add_le(f_crtp_generic_y, y):append_text(" (m)") + port_tree:add_le(f_crtp_generic_z, z):append_text(" (m)") + port_tree:add_le(f_crtp_generic_yaw, yaw):append_text(" (deg)") + undecoded = undecoded - 17 + elseif sp_type == 8 and size >= 18 then + -- Velocity World: vx, vy, vz, yaw_rate (4 floats) + local vx = buffer(crtp_start + 2, 4):le_float() + local vy = buffer(crtp_start + 6, 4):le_float() + local vz = buffer(crtp_start + 10, 4):le_float() + local yaw_rate = buffer(crtp_start + 14, 4):le_float() + + port_tree:add_le(f_crtp_generic_vx, vx):append_text(" (m/s)") + port_tree:add_le(f_crtp_generic_vy, vy):append_text(" (m/s)") + port_tree:add_le(f_crtp_generic_vz, vz):append_text(" (m/s)") + port_tree:add_le(f_crtp_generic_yaw_rate, yaw_rate):append_text(" (deg/s)") + undecoded = undecoded - 17 + elseif sp_type == 9 and size >= 18 then + -- Z Distance: roll, pitch, yaw_rate, z_distance (4 floats) + local roll = buffer(crtp_start + 2, 4):le_float() + local pitch = buffer(crtp_start + 6, 4):le_float() + local yaw_rate = buffer(crtp_start + 10, 4):le_float() + local zdist = buffer(crtp_start + 14, 4):le_float() + + port_tree:add_le(f_crtp_generic_roll, roll):append_text(" (deg)") + port_tree:add_le(f_crtp_generic_pitch, pitch):append_text(" (deg)") + port_tree:add_le(f_crtp_generic_yaw_rate, yaw_rate):append_text(" (deg/s)") + port_tree:add_le(f_crtp_generic_zdist, zdist):append_text(" (m)") + undecoded = undecoded - 17 + elseif sp_type == 10 and size >= 18 then + -- Hover: vx, vy, yaw_rate, z_distance (4 floats) + local vx = buffer(crtp_start + 2, 4):le_float() + local vy = buffer(crtp_start + 6, 4):le_float() + local yaw_rate = buffer(crtp_start + 10, 4):le_float() + local zdist = buffer(crtp_start + 14, 4):le_float() + + port_tree:add_le(f_crtp_generic_vx, vx):append_text(" (m/s, body)") + port_tree:add_le(f_crtp_generic_vy, vy):append_text(" (m/s, body)") + port_tree:add_le(f_crtp_generic_yaw_rate, yaw_rate):append_text(" (deg/s)") + port_tree:add_le(f_crtp_generic_zdist, zdist):append_text(" (m)") + undecoded = undecoded - 17 + elseif sp_type == 11 and size >= 18 then + -- Manual: roll, pitch, yaw_rate, thrust, rate_mode + local roll = buffer(crtp_start + 2, 4):le_float() + local pitch = buffer(crtp_start + 6, 4):le_float() + local yaw_rate = buffer(crtp_start + 10, 4):le_float() + local thrust = buffer(crtp_start + 14, 2):le_uint() + local rate_mode = buffer(crtp_start + 16, 1):le_uint() + + port_tree:add_le(f_crtp_generic_roll, roll):append_text(" (deg)") + port_tree:add_le(f_crtp_generic_pitch, pitch):append_text(" (deg)") + port_tree:add_le(f_crtp_generic_yaw_rate, yaw_rate):append_text(" (deg/s)") + port_tree:add_le(f_crtp_generic_thrust, thrust) + port_tree:add_le(f_crtp_generic_rate_mode, rate_mode) + undecoded = undecoded - 16 + end + end + -- Channel 1: Meta commands + elseif channel == 1 then + if size >= 2 then + local cmd_type = buffer(crtp_start + 1, 1):le_uint() + if cmd_type == 0 then + port_tree:add_le(f_crtp_generic_type, "Notify Setpoint Stop") + undecoded = undecoded - 1 + end + end + end +end + +function handle_platform_port(tree, receive, buffer, channel, size) + local port_tree = tree:add(crtp, port_name) + + -- Channel 0: Platform commands + if channel == 0 then + if size >= 2 then + local cmd = buffer(crtp_start + 1, 1):le_uint() + local PlatformCommands = { + [0] = "Set Continuous Wave", + [1] = "Request Arming", + [2] = "Request Crash Recovery", + [4] = "Set Crazyflie Name", + } + local cmd_name = PlatformCommands[cmd] or "Unknown" + port_tree:add_le(f_crtp_platform_cmd, cmd_name .. " (" .. cmd .. ")") + + if cmd == 1 and size >= 3 then + local arm = buffer(crtp_start + 2, 1):le_uint() + port_tree:add_le(f_crtp_platform_arm_request, arm ~= 0) + undecoded = undecoded - 2 + else + undecoded = undecoded - 1 + end + end + -- Channel 1: Version commands + elseif channel == 1 then + if size >= 2 then + local cmd = buffer(crtp_start + 1, 1):le_uint() + local VersionCommands = { + [0] = "Get Protocol Version", + [1] = "Get Firmware Version", + [2] = "Get Device Type", + } + local cmd_name = VersionCommands[cmd] or "Unknown" + port_tree:add_le(f_crtp_platform_version_cmd, cmd_name .. " (" .. cmd .. ")") + + if cmd == 0 and receive == 1 and size >= 3 then + local version = buffer(crtp_start + 2, 1):le_uint() + port_tree:add_le(f_crtp_platform_protocol_version, version) + undecoded = undecoded - 2 + elseif cmd == 1 and receive == 1 and size > 2 then + local fw_version = buffer(crtp_start + 2):string() + port_tree:add_le(f_crtp_platform_firmware_version, fw_version) + undecoded = 0 + elseif cmd == 2 and receive == 1 and size > 2 then + local device_type = buffer(crtp_start + 2):string() + port_tree:add_le(f_crtp_platform_device_type, device_type) + undecoded = 0 + else + undecoded = undecoded - 1 + end + end + -- Channel 2: App channel + elseif channel == 2 then + port_tree:add_le(f_crtp_platform_cmd, "App Channel Data") + end +end + +function handle_link_control_port(tree, receive, buffer, channel, size) + local port_tree = tree:add(crtp, port_name) + if channel == 0 then -- Echo + port_tree:add_le(f_crtp_echo_data, buffer(crtp_start + 1):le_uint()) + undecoded = 0 + elseif channel == 3 and size == 3 and buffer(crtp_start + 1, 1):uint() == 0x05 then -- Low level safelink packet + local safelink_type = (receive == 0) and "Request" or "Acknowledge" + port_tree:add_le(f_crtp_safelink_type, safelink_type) + undecoded = 0 + end +end + +-- create a function to dissect it, layout: +-- | link_type | receive| address | channel | serial | crtp header | crtp data | +-- | 1 byte | 1 byte | 5 or 12 bytes | 1 byte | 16 bytes | 1 byte | n bytes | +function crtp.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "CRTP" + + link = buffer(0, 1):uint() + if link == Links.RADIO then + crtp_start = 24 -- 1+1+5+1+16 + elseif link == Links.USB or link == Links.UDP then + crtp_start = 31 -- 1+1+12+1+16 + else + -- Unknown link type, layout unknown + return + end + + if buffer:len() <= crtp_start then + return + end + + local receive = buffer(1, 1):uint() + if receive == 1 then + pinfo.cols.dst = format_device(buffer) + pinfo.cols.src = format_address(buffer) + else + pinfo.cols.dst = format_address(buffer) + pinfo.cols.src = format_device(buffer) + end + + local subtree = tree:add(crtp, "CRTP Packet") + local raw_header = buffer(crtp_start, 1):uint() + local header = bit.band(raw_header, 0xF3) + local crtp_port = bit.rshift(bit.band(header, 0xF0), 4) + local crtp_channel = bit.band(header, 0x03) + local safelink_up = bit.rshift(bit.band(raw_header, 0x08), 3) + local safelink_down = bit.rshift(bit.band(raw_header, 0x04), 2) + subtree:add_le(f_crtp_safelink_up, safelink_up) + subtree:add_le(f_crtp_safelink_down, safelink_down) + + -- Add CRTP packet size: + -- link_type + receive + address + channel + serial = crtp_start + -- Rest is CRTP packet + local crtp_size = buffer:len() - crtp_start + subtree:add_le(f_crtp_size, crtp_size) + + undecoded = crtp_size - 1 + + -- Get port and channel name + port_name, channel_name = get_crtp_port_channel_names(crtp_port, crtp_channel) + + -- Display port in info column + pinfo.cols.info = port_name + + -- Add to CRTP tree + subtree:add_le(f_crtp_port, crtp_port):append_text(" (" .. port_name .. ")") + if channel_name then + subtree:add_le(f_crtp_channel, crtp_channel):append_text(" (" .. channel_name .. ")") + else + subtree:add_le(f_crtp_channel, crtp_channel) + end + + -- Check for special handling + + -- Console, we can add text + if crtp_port == Ports.Console then + local port_tree = tree:add(crtp, port_name) + port_tree:add_le(f_crtp_console_text, buffer(crtp_start + 1):string()) + undecoded = 0 + end + + if crtp_port == Ports.LinkControl then + handle_link_control_port(tree, receive, buffer, crtp_channel, crtp_size) + end + + if crtp_port == Ports.Parameters then + handle_parameter_port(tree, receive, buffer, crtp_channel, crtp_size) + end + + if crtp_port == Ports.Commander then + handle_commander_port(tree, receive, buffer, crtp_channel, crtp_size) + end + + if crtp_port == Ports.Memory then + handle_memory_port(tree, receive, buffer, crtp_channel, crtp_size) + end + + if crtp_port == Ports.Logging then + handle_logging_port(tree, receive, buffer, crtp_channel, crtp_size) + end + + if crtp_port == Ports.Localization then + handle_localization_port(tree, receive, buffer, crtp_channel, crtp_size) + end + + if crtp_port == Ports.Commander_Generic then + handle_generic_setpoint_port(tree, receive, buffer, crtp_channel, crtp_size) + end + + if crtp_port == Ports.Setpoint_Highlevel then + handle_setpoint_highlevel(tree, receive, buffer, crtp_channel, crtp_size) + end + + if crtp_port == Ports.Platform then + handle_platform_port(tree, receive, buffer, crtp_channel, crtp_size) + end + + if undecoded > 0 then + local from = crtp_start + (crtp_size - undecoded) + subtree:add_le(f_crtp_undecoded, buffer(from, undecoded):bytes():tohex()) + end +end + +wtap_encap = DissectorTable.get("wtap_encap") +wtap_encap:add(wtap.USER15, crtp) diff --git a/dissectors/csp-kantatamura/LICENSE b/dissectors/csp-kantatamura/LICENSE new file mode 100644 index 0000000..8f76c6b --- /dev/null +++ b/dissectors/csp-kantatamura/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Kanta Tamura + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/csp-kantatamura/README.md b/dissectors/csp-kantatamura/README.md new file mode 100644 index 0000000..fe787b1 --- /dev/null +++ b/dissectors/csp-kantatamura/README.md @@ -0,0 +1,76 @@ +# CubeSat Space Protocol sur CAN (KantaTamura) + +Deux post-dissecteurs Wireshark Lua du CubeSat Space Protocol (CSP), +l'un pour CSPv1 et l'autre pour CSPv2, transporté sur bus CAN en +trames étendues. Chacun décode les champs CSP de l'identifiant CAN +(source, destination, drapeaux, compteurs de fragments) et l'en-tête +CSP étendu (priorité, adresses, ports, drapeaux, longueur en v1). Il +réassemble ensuite les fragments et affiche les données du paquet CSP +(issue #536). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/KantaTamura/CSP-dissector (`cspv1_can.lua`, `cspv2_can.lua`, `sample/`) | +| Commit importé | `bf7df6454b0147f3949c8e5e492808f6e5316aee` du 10/01/2024 (dernier commit de `main`, dernière modification de `cspv1_can.lua`) ; dernière modification de `cspv2_can.lua` : commit `e6809cce249670d6154641e5bfb972408f53c79d` du 08/01/2024 ; captures : commit `da4b5792f4f6ecd418034fefc73b89376f4b214f` du 31/10/2023 | +| Licence amont | MIT (`LICENSE` amont, © 2023 Kanta Tamura ; aucune mention de licence dans les scripts). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur CSP / CubeSat dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Les scripts sont repris tels quels (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête de chacun (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/cspv1_can.lua` | Protocole `CSPv1` (« Cubusat Space Protocol version 1.0 », ligne 11) et sous-arbres en-tête CAN, en-tête étendu et données (lignes 12 à 14) ; post-dissecteur (ligne 166) | +| `src/cspv2_can.lua` | Protocole `CSPv2` (« Cubusat Space Protocol version 2.0 », ligne 11) et sous-arbres (lignes 12 à 14) ; post-dissecteur (ligne 180) | +| `captures/cspv1_can_ping.pcapng` | Capture amont `sample/cspv1_can_ping.pcapng` (4612 octets, 66 trames CAN étendues, Linux cooked v1) | +| `captures/cspv2_can_ping.pcapng` | Capture amont `sample/cspv2_can_ping.pcapng` (4356 octets, 62 trames CAN étendues, Linux cooked v1) | + +## Utilisation + +Copier dans le dossier des plugins Lua personnels de Wireshark (« Aide › +À propos de Wireshark › Dossiers ») le seul script de la version voulue, +puis recharger avec Ctrl+Maj+L. On peut aussi copier les deux et +désactiver l'un dans « Analyser › Protocoles activés ». Le README amont +le précise : la version ne se déduit pas des données, et l'identifiant +CAN faisant partie du protocole, « Décoder comme » est impossible. +Filtres : `cspv1`, `csp1.src`, `csp1.xtd.dport`, `cspv2`, +`csp.destination`, `csp.source_port`. + +## Vérification à l'import + +`luac5.4 -p` : OK pour les deux scripts. tshark 4.6.4, chargés par `-X +lua_script:`, puis copiés dans le dossier des plugins : aucun message au +chargement. + +| Essai | Résultat | +|---|---| +| `captures/cspv1_can_ping.pcapng` avec `cspv1_can.lua` | **erreur Lua** ligne 106 (`attempt to get length of a nil value`) sur 16 trames en une passe, sur les 66 avec `-2` ; aucune donnée CSP réassemblée | +| `captures/cspv2_can_ping.pcapng` avec `cspv2_can.lua` (une passe et `-2`) | **erreur Lua** ligne 106 sur les 62 trames ; aucune donnée CSP réassemblée | +| Capture synthétique SocketCAN (type de lien 227), CSPv1 en deux fragments (Begin, puis More avec Remain 0) | décodé : « Source: 1 », « Destination: 2 », « Flag: Begin (0) », « Remain: 1 », en-tête étendu (priorité 2, ports 10 et 20, « Data Length: 10 »), puis « Data: Hello, CSP » sur le dernier fragment | +| Capture synthétique SocketCAN, CSPv2 en deux fragments (Begin, puis End) | décodé : « Destination: 4360 », « Sender: 1 », « Fragment Counter », en-tête étendu (source 1, ports 10 et 20), « Data: pong, CSPv2 » | + +## Limites constatées + +- Les deux scripts lisent les 4 octets de l'identifiant CAN en ordre + réseau (gros-boutiste). Dans les captures amont (Linux cooked v1), + l'identifiant est stocké en petit-boutiste : Wireshark lit par exemple + `00 34 10 81` comme « Ext. ID: 0x01103400 ». Les champs CSP sont donc + faux, la reconstitution des paquets échoue et les trames provoquent + l'erreur ligne 106. Seules les captures où l'identifiant est en ordre + réseau (SocketCAN, type de lien 227) sont décodées. C'est ce que le + README amont sous-entend : libpcap 1.10.2 ou plus récent est requis. +- La position de l'identifiant est calculée depuis la fin de la trame + (`data.len`, `can.padding`) : il faut que Wireshark ait produit le + champ `data` (pas d'autre sous-dissecteur CAN actif). +- Les deux scripts s'appliquent à toutes les trames CAN étendues, sans + autre contrôle. Chargés ensemble, ils décodent chaque trame deux fois. +- Une trame sans début connu (capture prise en cours d'échange) + provoque la même erreur ligne 106. +- Les données sont affichées en chaîne (`base.UNICODE`), sans dissecteur + des services CSP (ping, etc.). diff --git a/dissectors/csp-kantatamura/captures/cspv1_can_ping.pcapng b/dissectors/csp-kantatamura/captures/cspv1_can_ping.pcapng new file mode 100644 index 0000000..9775699 Binary files /dev/null and b/dissectors/csp-kantatamura/captures/cspv1_can_ping.pcapng differ diff --git a/dissectors/csp-kantatamura/captures/cspv2_can_ping.pcapng b/dissectors/csp-kantatamura/captures/cspv2_can_ping.pcapng new file mode 100644 index 0000000..babc123 Binary files /dev/null and b/dissectors/csp-kantatamura/captures/cspv2_can_ping.pcapng differ diff --git a/dissectors/csp-kantatamura/src/cspv1_can.lua b/dissectors/csp-kantatamura/src/cspv1_can.lua new file mode 100644 index 0000000..6512276 --- /dev/null +++ b/dissectors/csp-kantatamura/src/cspv1_can.lua @@ -0,0 +1,166 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/KantaTamura/CSP-dissector (cspv1_can.lua), +-- commit bf7df6454b0147f3949c8e5e492808f6e5316aee du 10/01/2024 (dernière modification du fichier : +-- commit bf7df6454b0147f3949c8e5e492808f6e5316aee du 10/01/2024). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- Proto definition +-- "CSPv1" +-- ├── "CAN Frame Header" +-- ├── "Extended Header" +-- └── "Data" +local proto_csp1 = Proto("CSPv1", "Cubusat Space Protocol version 1.0") +local proto_csp1_can = Proto("CSPv1_CAN_Frame_Header", "CSPv1 - CAN Frame Header") +local proto_csp1_xtd = Proto("CSPv1_Extendnd_Header", "CSPv1 - Extended Header") +local proto_csp1_data = Proto("CSPv1_DATA", "CSPv1 - Data") + +-- Other Protocol Field +local can_xtd_f = Field.new("can.flags.xtd") +local data_len_f = Field.new("data.len") +local can_len_f = Field.new("can.len") +local can_pad_f = Field.new("can.padding") + +-- Constants +local SLL_TYPE_CAN = 0x000C +local CAN_FRAME_LEN = 8 +local CSP_EXTENDED_FRAME_LEN = 6 + +-- CSP CAN Fields +local f_can = proto_csp1_can.fields +f_can.src = ProtoField.uint32("csp1.src", "Source", base.DEC, nil, 0x1F000000) +f_can.dst = ProtoField.uint32("csp1.dst", "Destination", base.DEC, nil, 0x00F80000) +f_can.flag = ProtoField.uint32("csp1.flag", "Flag", base.DEC, { + [0] = "Begin", + [1] = "More"}, 0x00040000) +f_can.remain = ProtoField.uint32("csp1.remain", "Remain", base.DEC, nil, 0x0003FC00) +f_can.id = ProtoField.uint32("csp1.id", "ID", base.DEC, nil, 0x000003FF) + +-- CSP Extended Fields +local f_xtd = proto_csp1_xtd.fields +f_xtd.pri = ProtoField.uint32("csp1.xtd.pri", "Priority", base.DEC, nil, 0xC0000000) +f_xtd.src = ProtoField.uint32("csp1.xtd.src", "Source Address", base.DEC, nil, 0x3E000000) +f_xtd.dst = ProtoField.uint32("csp1.xtd.dst", "Destination Address", base.DEC, nil, 0x01F00000) +f_xtd.dport = ProtoField.uint32("csp1.xtd.dport", "Destination Port", base.DEC, nil, 0x000FC000) +f_xtd.sport = ProtoField.uint32("csp1.xtd.sport", "Source Port", base.DEC, nil, 0x00003F00) +f_xtd.flags = ProtoField.uint32("csp1.xtd.flags", "Flags", base.DEC, nil, 0x000000FF) +f_xtd.length = ProtoField.uint16("csp1.xtd.len", "Data Length", base.DEC) + +-- CSP Data Fields +local f_data = proto_csp1_data.fields +f_data.data = ProtoField.string("csp1.data", "Data", base.UNICODE) + +-- CSP CAN Dissector +function proto_csp1.dissector(buffer, pinfo, tree) + -- get fields + local can_xtd = can_xtd_f() + local data_len = data_len_f() + local can_len = can_len_f() + local can_pad = can_pad_f() + + -- only CSP packet (possibility) + if not(can_xtd and data_len) then return end + if buffer:len() == 0 or not(can_xtd.value) then return end + + local can_pad_len = 0 + if can_pad then + can_pad_len = can_pad.len + end + + local can_frame_start = buffer:len() - data_len.value - can_pad_len - CAN_FRAME_LEN + local csp_frame_start = buffer:len() - data_len.value - can_pad_len + + -- CSP + local subtree = tree:add(proto_csp1, buffer(can_frame_start)) + + -- CSP CAN Frame Header + local csp_can_header = buffer(can_frame_start, 4) + local can_frame_tree = subtree:add(proto_csp1_can, csp_can_header) + can_frame_tree:add(f_can.src, csp_can_header) + can_frame_tree:add(f_can.dst, csp_can_header) + can_frame_tree:add(f_can.flag, csp_can_header) + can_frame_tree:add(f_can.remain, csp_can_header) + can_frame_tree:add(f_can.id, csp_can_header) + + -- csp-frame fix endian + local csp_src = csp_can_header:bitfield(3, 5) + local csp_dst = csp_can_header:bitfield(8, 5) + local csp_flag = csp_can_header:bitfield(13, 1) + local csp_remain = csp_can_header:bitfield(14, 8) + local csp_id = csp_can_header:bitfield(22, 10) + + -- table key + local key + local base = tostring(csp_src) .. ":" .. tostring(csp_dst) .. ":" .. tostring(csp_id) + if pinfo.visited == false and csp_flag == 0 then + local buf = base + local id = csp_id + while DataTable[buf] and DataTable[buf].ended == true do + id = id + 1024 + buf = tostring(csp_src) .. ":" .. tostring(csp_dst) .. ":" .. tostring(id) + end + key = buf + if KeyTable[base] == nil then + KeyTable[base] = {} + end + table.insert(KeyTable[base], { start = pinfo.number, key = key }) + else + for i = 1, #KeyTable[base] do + if KeyTable[base][i].start > pinfo.number then + break + end + key = KeyTable[base][i].key + end + end + + -- CSP Extended Header + if ExtendedTable[key] == nil then + ExtendedTable[key] = { header=buffer:bytes(csp_frame_start, 6) } + end + + local xtd = ExtendedTable[key].header:tvb("csp1_xtd_header") + local xtd_frame_tree = subtree:add(proto_csp1_xtd, xtd()) + xtd_frame_tree:add(f_xtd.pri, xtd(0, 4)) + xtd_frame_tree:add(f_xtd.src, xtd(0, 4)) + xtd_frame_tree:add(f_xtd.dst, xtd(0, 4)) + xtd_frame_tree:add(f_xtd.dport, xtd(0, 4)) + xtd_frame_tree:add(f_xtd.sport, xtd(0, 4)) + xtd_frame_tree:add(f_xtd.flags, xtd(0, 4)) + xtd_frame_tree:add(f_xtd.length, xtd(4, 2)) + + -- CSP Data + local extended_header_len = 0 + if DataTable[key] == nil then + DataTable[key] = { ended=false, fragments={} } + extended_header_len = CSP_EXTENDED_FRAME_LEN + end + + if pinfo.visited == false then + DataTable[key].fragments[csp_remain] = { data=buffer:bytes(csp_frame_start + extended_header_len, can_len.value - extended_header_len) } + end + + if csp_remain == 0 then + DataTable[key].ended = true + end + + if DataTable[key].ended == true then + local buf = ByteArray.new() + for i = 0, #DataTable[key].fragments do + buf:prepend( DataTable[key].fragments[i].data ) + end + local d = buf:tvb("csp1_data") + local data_tree = subtree:add(proto_csp1_data, d()) + data_tree:add(f_data.data, d()) + end + + -- pinfo + pinfo.cols.protocol = proto_csp1.name + pinfo.cols.src = csp_src + pinfo.cols.dst = csp_dst +end + +function proto_csp1.init() + ExtendedTable = {} + DataTable = {} + KeyTable = {} +end + +register_postdissector(proto_csp1) diff --git a/dissectors/csp-kantatamura/src/cspv2_can.lua b/dissectors/csp-kantatamura/src/cspv2_can.lua new file mode 100644 index 0000000..9519686 --- /dev/null +++ b/dissectors/csp-kantatamura/src/cspv2_can.lua @@ -0,0 +1,180 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/KantaTamura/CSP-dissector (cspv2_can.lua), +-- commit bf7df6454b0147f3949c8e5e492808f6e5316aee du 10/01/2024 (dernière modification du fichier : +-- commit e6809cce249670d6154641e5bfb972408f53c79d du 08/01/2024). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- Proto definition +-- "CSP" +-- ├── "CAN Frame Header" +-- ├── "Extended Header" +-- └── "Data" +local proto_csp = Proto("CSPv2", "Cubusat Space Protocol version 2.0") +local proto_csp_can = Proto("CSPv2_CAN_Frame_Header", "CSP 2.0 - CAN Frame Header") +local proto_csp_xtd = Proto("CSPv2_Extendnd_Header", "CSP 2.0 - Extended Header") +local proto_csp_data = Proto("CSPv2_DATA", "CSP 2.0 - Data") + +-- Other Protocol Field +local can_xtd_f = Field.new("can.flags.xtd") +local data_len_f = Field.new("data.len") +local can_len_f = Field.new("can.len") +local can_pad_f = Field.new("can.padding") + +-- Constants +local SLL_TYPE_CAN = 0x000C +local CAN_FRAME_LEN = 8 +local CSP_EXTENDED_FRAME_LEN = 4 + +-- CSP CAN Fields +local f_can = proto_csp_can.fields +f_can.prio = ProtoField.uint32("csp.prio", "Prio", base.DEC, nil, 0x18000000) +f_can.destination = ProtoField.uint32("csp.destination", "Destination", base.DEC, nil, 0x07FFE000) +f_can.sender = ProtoField.uint32("csp.sender", "Sender", base.DEC, nil, 0x00001F80) +f_can.source_count = ProtoField.uint32("csp.source_count", "Source Count", base.DEC, nil, 0x00000060) +f_can.fragment_counter = ProtoField.uint32("csp.fragment_counter", "Fragment Counter", base.DEC, nil, 0x0000001C) +f_can.begin = ProtoField.uint32("csp.begin", "Begin", base.DEC, nil, 0x00000002) +f_can.end_ = ProtoField.uint32("csp.end", "End", base.DEC, nil, 0x00000001) + +-- CSP Extended Fields +local f_xtd = proto_csp_xtd.fields +f_xtd.source = ProtoField.uint32("csp.source", "Source", base.DEC, nil, 0xFFFC0000) +f_xtd.destination_port = ProtoField.uint32("csp.destination_port", "Destination Port", base.DEC, nil, 0x0003F000) +f_xtd.source_port = ProtoField.uint32("csp.source_port", "Source Port", base.DEC, nil, 0x00000FC0) +f_xtd.flags = ProtoField.uint32("csp.flags", "Flags", base.DEC, nil, 0x0000003F) + +-- CSP Data Fields +local f_data = proto_csp_data.fields +f_data.data = ProtoField.string("csp.data", "Data", base.UNICODE) + +-- CSP CAN Dissector +function proto_csp.dissector(buffer, pinfo, tree) + -- get fields + local can_xtd = can_xtd_f() + local data_len = data_len_f() + local can_len = can_len_f() + local can_pad = can_pad_f() + + -- only CSP packet (possibility) + if not(can_xtd and data_len) then return end + if buffer:len() == 0 or not(can_xtd.value) then return end + + local can_pad_len = 0 + if can_pad then + can_pad_len = can_pad.len + end + + local can_frame_start = buffer:len() - data_len.value - can_pad_len - CAN_FRAME_LEN + local csp_frame_start = buffer:len() - data_len.value - can_pad_len + + -- CSP + local subtree = tree:add(proto_csp, buffer(can_frame_start)) + + -- CSP CAN Frame Header + local csp_can_header = buffer(can_frame_start, 4) + local can_frame_tree = subtree:add(proto_csp_can, csp_can_header) + can_frame_tree:add(f_can.prio, csp_can_header) + can_frame_tree:add(f_can.destination, csp_can_header) + can_frame_tree:add(f_can.sender, csp_can_header) + can_frame_tree:add(f_can.source_count, csp_can_header) + can_frame_tree:add(f_can.fragment_counter, csp_can_header) + can_frame_tree:add(f_can.begin, csp_can_header) + can_frame_tree:add(f_can.end_, csp_can_header) + + -- csp-frame fix endian + local csp_dst = csp_can_header:bitfield(5, 14) + local csp_sender = csp_can_header:bitfield(19, 6) + local csp_src_cnt = csp_can_header:bitfield(25, 2) + local csp_frag_cnt = csp_can_header:bitfield(27, 3) + local csp_begin = csp_can_header:bitfield(30, 1) + local csp_end = csp_can_header:bitfield(31, 1) + + -- table key + local key + local base = tostring(csp_sender) .. ":" .. tostring(csp_dst) .. ":" .. tostring(csp_src_cnt) + if pinfo.visited == false and csp_begin == 1 then + local buf = base + local id = csp_src_cnt + while DataTable[buf] and DataTable[buf].ended == true do + id = id + 4 + buf = tostring(csp_sender) .. ":" .. tostring(csp_dst) .. ":" .. tostring(id) + end + key = buf + if KeyTable[base] == nil then + KeyTable[base] = {} + end + table.insert(KeyTable[base], { start = pinfo.number, key = key }) + else + for i = 1, #KeyTable[base] do + if KeyTable[base][i].start > pinfo.number then + break + end + key = KeyTable[base][i].key + end + end + + -- CSP Extended Header + if csp_begin == 1 then + local csp_xtd_header = buffer(csp_frame_start, 4) + local xtd_frame_tree = subtree:add(proto_csp_xtd, csp_xtd_header) + xtd_frame_tree:add(f_xtd.source, csp_xtd_header) + xtd_frame_tree:add(f_xtd.destination_port, csp_xtd_header) + xtd_frame_tree:add(f_xtd.source_port, csp_xtd_header) + xtd_frame_tree:add(f_xtd.flags, csp_xtd_header) + + if ExtendedTable[key] == nil then + ExtendedTable[key] = { header=buffer:bytes(csp_frame_start, 4) } + end + elseif not(ExtendedTable[key] == nil) then + local xtd = ExtendedTable[key].header:tvb("csp_xtd_header") + + local xtd_frame_tree = subtree:add(proto_csp_xtd, xtd()) + xtd_frame_tree:add(f_xtd.source, xtd()) + xtd_frame_tree:add(f_xtd.destination_port, xtd()) + xtd_frame_tree:add(f_xtd.source_port, xtd()) + xtd_frame_tree:add(f_xtd.flags, xtd()) + end + + -- CSP Data + if DataTable[key] == nil then + DataTable[key] = { ended=false, fragments={} } + end + + if pinfo.visited == false then + local extended_header_len = 0 + if csp_begin == 1 then + extended_header_len = CSP_EXTENDED_FRAME_LEN + end + + local id = csp_frag_cnt + while not(DataTable[key].fragments[id] == nil) do + id = id + 8 + end + DataTable[key].fragments[id] = { data=buffer:bytes(csp_frame_start + extended_header_len, can_len.value - extended_header_len) } + end + + if csp_end == 1 then + DataTable[key].ended = true + end + + if DataTable[key].ended == true then + local buf = ByteArray.new() + for i = 0, #DataTable[key].fragments do + buf:append( DataTable[key].fragments[i].data ) + end + local d = buf:tvb("merged data") + local data_tree = subtree:add(proto_csp_data, d()) + data_tree:add(f_data.data, d()) + end + + -- pinfo + pinfo.cols.protocol = proto_csp.name + pinfo.cols.src = csp_sender + pinfo.cols.dst = csp_dst +end + +function proto_csp.init() + ExtendedTable = {} + DataTable = {} + KeyTable = {} +end + +register_postdissector(proto_csp) diff --git a/dissectors/css-ccsds-cortex/LICENSE.txt b/dissectors/css-ccsds-cortex/LICENSE.txt new file mode 100644 index 0000000..6369b97 --- /dev/null +++ b/dissectors/css-ccsds-cortex/LICENSE.txt @@ -0,0 +1,288 @@ +****** +This software is released under the terms and conditions of the NASA OPEN SOURCE AGREEMENT VERSION 1.3. (included below) as it is derived from NASA NOS3 by ITC Team (NASA IV&V). +A LOG file is included with the provided software to identify the modifications and alterations with respect to NASA NOS3. + +****** +Copyright notice : + +/* Copyright (C) 2009 - 2022 National Aeronautics and Space Administration. All Foreign Rights are Reserved to the U.S. Government. + + This software is provided "as is" without any warranty of any kind, either expressed, implied, or statutory, including, but not + limited to, any warranty that the software will conform to specifications, any implied warranties of merchantability, fitness + for a particular purpose, and freedom from infringement, and any warranty that the documentation will conform to the program, or + any warranty that the software will be error free. + + In no event shall NASA be liable for any damages, including, but not limited to direct, indirect, special or consequential damages, + arising out of, resulting from, or in any way connected with the software or its documentation, whether or not based upon warranty, + contract, tort or otherwise, and whether or not loss was sustained from, or arose out of the results of, or use of, the software, + documentation or services provided hereunder. + + ITC Team + NASA IV&V + jstar-development-team@mail.nasa.gov +*/ + +****** +NASA OPEN SOURCE AGREEMENT VERSION 1.3 + +THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, +REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN +COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT +AS REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT +AGENCY"). THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT +AGENCY, IS AN INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT +DISTRIBUTIONS OR REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO +USES, REPRODUCES, DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT +SOFTWARE, AS DEFINED HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, +ACCEPTING IN FULL THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN +THIS AGREEMENT. + +Government Agency: NASA +Government Agency Original Software Designation: GSC-17737-1 +Government Agency Original Software Title: + NASA Operational Simulator for Small Satellites +User Registration Requested. Please Visit + https://github.com/nasa/nos3 +Government Agency Point of Contact for Original Software: + John.P.Lucas@nasa.gov + +1. DEFINITIONS + +A. "Contributor" means Government Agency, as the developer of the +Original Software, and any entity that makes a Modification. +B. "Covered Patents" mean patent claims licensable by a Contributor +that are necessarily infringed by the use or sale of its Modification +alone or when combined with the Subject Software. +C. "Display" means the showing of a copy of the Subject Software, +either directly or by means of an image, or any other device. +D. "Distribution" means conveyance or transfer of the Subject +Software, regardless of means, to another. +E. "Larger Work" means computer software that combines Subject +Software, or portions thereof, with software separate from the Subject +Software that is not governed by the terms of this Agreement. +F. "Modification" means any alteration of, including addition to or +deletion from, the substance or structure of either the Original +Software or Subject Software, and includes derivative works, as that +term is defined in the Copyright Statute, 17 USC 101. However, the +act of including Subject Software as part of a Larger Work does not in +and of itself constitute a Modification. +G. "Original Software" means the computer software first released +under this Agreement by Government Agency with Government Agency +designation GSC-17776-1 and entitled Core Flight System Cryptography +Library, including source code, object code and accompanying +documentation, if any. +H. "Recipient" means anyone who acquires the Subject Software under +this Agreement, including all Contributors. +I. "Redistribution" means Distribution of the Subject Software after a +Modification has been made. +J. "Reproduction" means the making of a counterpart, image or copy of +the Subject Software. +K. "Sale" means the exchange of the Subject Software for money or +equivalent value. +L. "Subject Software" means the Original Software, Modifications, or +any respective parts thereof. +M. "Use" means the application or employment of the Subject Software +for any purpose. + +2. GRANT OF RIGHTS + +A. Under Non-Patent Rights: Subject to the terms and conditions of +this Agreement, each Contributor, with respect to its own contribution +to the Subject Software, hereby grants to each Recipient a +non-exclusive, world-wide, royalty-free license to engage in the +following activities pertaining to the Subject Software: + +1. Use +2. Distribution +3. Reproduction +4. Modification +5. Redistribution +6. Display + +B. Under Patent Rights: Subject to the terms and conditions of this +Agreement, each Contributor, with respect to its own contribution to +the Subject Software, hereby grants to each Recipient under Covered +Patents a non-exclusive, world-wide, royalty-free license to engage in +the following activities pertaining to the Subject Software: + +1. Use +2. Distribution +3. Reproduction +4. Sale +5. Offer for Sale + +C. The rights granted under Paragraph B. also apply to the combination +of a Contributor's Modification and the Subject Software if, at the +time the Modification is added by the Contributor, the addition of +such Modification causes the combination to be covered by the Covered +Patents. It does not apply to any other combinations that include a +Modification. + +D. The rights granted in Paragraphs A. and B. allow the Recipient to +sublicense those same rights. Such sublicense must be under the same +terms and conditions of this Agreement. + +3. OBLIGATIONS OF RECIPIENT + +A. Distribution or Redistribution of the Subject Software must be made +under this Agreement except for additions covered under paragraph 3H. + +1. Whenever a Recipient distributes or redistributes the Subject + Software, a copy of this Agreement must be included with each copy + of the Subject Software; and +2. If Recipient distributes or redistributes the Subject Software in + any form other than source code, Recipient must also make the + source code freely available, and must provide with each copy of + the Subject Software information on how to obtain the source code + in a reasonable manner on or through a medium customarily used for + software exchange. + +B. Each Recipient must ensure that the following copyright notice +appears prominently in the Subject Software: + +/* Copyright (C) 2009 - 2022 National Aeronautics and Space Administration. All Foreign Rights are Reserved to the U.S. Government. + + This software is provided "as is" without any warranty of any kind, either expressed, implied, or statutory, including, but not + limited to, any warranty that the software will conform to specifications, any implied warranties of merchantability, fitness + for a particular purpose, and freedom from infringement, and any warranty that the documentation will conform to the program, or + any warranty that the software will be error free. + + In no event shall NASA be liable for any damages, including, but not limited to direct, indirect, special or consequential damages, + arising out of, resulting from, or in any way connected with the software or its documentation, whether or not based upon warranty, + contract, tort or otherwise, and whether or not loss was sustained from, or arose out of the results of, or use of, the software, + documentation or services provided hereunder. + + ITC Team + NASA IV&V + jstar-development-team@mail.nasa.gov +*/ + +C. Each Contributor must characterize its alteration of the Subject +Software as a Modification and must identify itself as the originator +of its Modification in a manner that reasonably allows subsequent +Recipients to identify the originator of the Modification. In +fulfillment of these requirements, Contributor must include a file +(e.g., a change log file) that describes the alterations made and the +date of the alterations, identifies Contributor as originator of the +alterations, and consents to characterization of the alterations as a +Modification, for example, by including a statement that the +Modification is derived, directly or indirectly, from Original +Software provided by Government Agency. Once consent is granted, it +may not thereafter be revoked. + +D. A Contributor may add its own copyright notice to the Subject +Software. Once a copyright notice has been added to the Subject +Software, a Recipient may not remove it without the express permission +of the Contributor who added the notice. + +E. A Recipient may not make any representation in the Subject Software +or in any promotional, advertising or other material that may be +construed as an endorsement by Government Agency or by any prior +Recipient of any product or service provided by Recipient, or that may +seek to obtain commercial advantage by the fact of Government Agency's +or a prior Recipient's participation in this Agreement. + +F. In an effort to track usage and maintain accurate records of the +Subject Software, each Recipient, upon receipt of the Subject +Software, is requested to register with Government Agency by visiting +the following website: https://github.com/nasa/CryptoLib. Recipient's +name and personal information shall be used for statistical purposes +only. Once a Recipient makes a Modification available, it is requested +that the Recipient inform Government Agency at the web site provided +above how to access the Modification. + +G. Each Contributor represents that that its Modification is believed +to be Contributor's original creation and does not violate any +existing agreements, regulations, statutes or rules, and further that +Contributor has sufficient rights to grant the rights conveyed by this +Agreement. + +H. A Recipient may choose to offer, and to charge a fee for, warranty, +support, indemnity and/or liability obligations to one or more other +Recipients of the Subject Software. A Recipient may do so, however, +only on its own behalf and not on behalf of Government Agency or any +other Recipient. Such a Recipient must make it absolutely clear that +any such warranty, support, indemnity and/or liability obligation is +offered by that Recipient alone. Further, such Recipient agrees to +indemnify Government Agency and every other Recipient for any +liability incurred by them as a result of warranty, support, indemnity +and/or liability offered by such Recipient. + +I. A Recipient may create a Larger Work by combining Subject Software +with separate software not governed by the terms of this agreement and +distribute the Larger Work as a single product. In such case, the +Recipient must make sure Subject Software, or portions thereof, +included in the Larger Work is subject to this Agreement. + +J. Notwithstanding any provisions contained herein, Recipient is +hereby put on notice that export of any goods or technical data from +the United States may require some form of export license from the +U.S. Government. Failure to obtain necessary export licenses may +result in criminal liability under U.S. laws. Government Agency +neither represents that a license shall not be required nor that, if +required, it shall be issued. Nothing granted herein provides any +such export license. + +4. DISCLAIMER OF WARRANTIES AND LIABILITIES; WAIVER AND INDEMNIFICATION + +A. No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY +WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, +INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE +WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM +INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR +FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO +THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, +CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT +OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY +OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE. +FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES +REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE, +AND DISTRIBUTES IT "AS IS." + +B. Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS +AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND +SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF +THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES, +EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM +PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT +SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED +STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY +PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE +REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL +TERMINATION OF THIS AGREEMENT. + + +5. GENERAL TERMS + +A. Termination: This Agreement and the rights granted hereunder will +terminate automatically if a Recipient fails to comply with these +terms and conditions, and fails to cure such noncompliance within +thirty (30) days of becoming aware of such noncompliance. Upon +termination, a Recipient agrees to immediately cease use and +distribution of the Subject Software. All sublicenses to the Subject +Software properly granted by the breaching Recipient shall survive any +such termination of this Agreement. + +B. Severability: If any provision of this Agreement is invalid or +unenforceable under applicable law, it shall not affect the validity +or enforceability of the remainder of the terms of this Agreement. + +C. Applicable Law: This Agreement shall be subject to United States +federal law only for all purposes, including, but not limited to, +determining the validity of this Agreement, the meaning of its +provisions and the rights, obligations and remedies of the parties. + +D. Entire Understanding: This Agreement constitutes the entire +understanding and agreement of the parties relating to release of the +Subject Software and may not be superseded, modified or amended except +by further written agreement duly executed by the parties. + +E. Binding Authority: By accepting and using the Subject Software +under this Agreement, a Recipient affirms its authority to bind the +Recipient to all terms and conditions of this Agreement and that that +Recipient hereby agrees to all terms and conditions herein. + +F. Point of Contact: Any Recipient contact with Government Agency is +to be directed to the designated representative as follows: + John.P.Lucas@nasa.gov diff --git a/dissectors/css-ccsds-cortex/README.md b/dissectors/css-ccsds-cortex/README.md new file mode 100644 index 0000000..b00f783 --- /dev/null +++ b/dissectors/css-ccsds-cortex/README.md @@ -0,0 +1,95 @@ +# CSS-Simulator — Cortex TC/TM et couches CCSDS + +Collection de dissecteurs Wireshark Lua du simulateur de systèmes +spatiaux CSS de l'IRT Saint-Exupéry, qui sert à la recherche en +cybersécurité. Au centre se trouve le protocole Cortex TC : les +télécommandes envoyées au modem Cortex (Safran) par TCP 3020. Il est +accompagné de Cortex TM (télémesure, TCP 3070) et des couches CCSDS +qu'il appelle : CLTU, trame TC, trame TM, Space Packet, Encapsulation +Packet, en-tête et queue SDLS, PUS TC/TM et réseau « CSS Constellation » +(issue #531). Les 17 scripts du dossier amont sont repris ensemble. +Cortex TC dépend en effet de `Cortex_common.lua` (`require`) et passe la +CLTU aux dissecteurs CCSDS. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/IRT-Saint-Exupery/CSS-Simulator (`CSS_Attacks/Dissectors/Dissecteurs_CCSDS/`, 17 fichiers `.lua`) | +| Commit importé | `82457a85ee4c27605836d8e973d19c68b953a8e2` du 15/09/2026 (dernier commit de `main`) ; dernière modification des 17 scripts : commit `348b2cb29ef4e537b4a97b1ad49db269576a5f77` du 25/02/2026 | +| Licence amont | NASA Open Source Agreement 1.3 (`LICENSE.txt` amont : « This software is released under the terms and conditions of the NASA OPEN SOURCE AGREEMENT VERSION 1.3 » ; README amont : « The CSS simulator is also distributed under the NOSA 1.3 License »). Les scripts ne portent aucune mention de licence, seulement « Written by Pierre Bacquet, Thales Alenia Space ». Licence propre au dossier, déclarée `NASA-1.3` (même démarche que `dissectors/sedona-sox` en AFL-3.0) | +| Natif Wireshark 4.6.4 | Non pour Cortex : aucun dissecteur Cortex dans `tshark -G protocols`. Wireshark a un dissecteur `ccsds` natif (Space Packet) sans équivalent Cortex, CLTU ou SDLS | + +Texte complet de la licence : fichier `LICENSE.txt` de ce dossier (copie +conforme du `LICENSE.txt` amont). Les scripts sont repris tels quels +(aucune modification de code, fins de ligne CRLF d'origine conservées) ; +seule l'en-tête de provenance de cinq lignes est ajoutée en tête de +chacun (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/Cortex_TC.lua` | Protocole `cortex_tc` (« Cortex TC Protocol », ligne 51) sur TCP 3020 (ligne 365) ; sous-dissecteur par défaut `tc_cltu_02` (ligne 36) | +| `src/Cortex_TM.lua` | Protocole `cortex_tm` (ligne 45) sur TCP 3070 (ligne 369) ; sous-dissecteur par défaut `tm_frame_02` (ligne 35) | +| `src/Cortex_common.lua` | Ports (lignes 20 et 21), conversion d'horodatage, classe de trace `debug` (ligne 52) ; chargé par `require` | +| `src/tc_cltu.lua` | `tc_cltu` (ligne 12), UDP 30002 et TCP 30020 (lignes 107 et 108) | +| `src/tc_frame.lua` | `tc_frame` (ligne 12), UDP 60001 et TCP 60010 (lignes 296 et 297), préférence de configuration SDLS (ligne 32) | +| `src/tm_frame.lua` | `tm_frame` (ligne 12), ports 70001 et 70010 (lignes 493 et 494) | +| `src/space_packet_protocol.lua` | `space_packet_protocol` (ligne 20), « Décoder comme » sur UDP, TCP et `ccsds.pvn` (lignes 183 à 185) | +| `src/encapsulation_packet_protocol.lua` | `encapsulation_packet_protocol` (ligne 12), UDP et TCP 7000 (lignes 99 et 100) | +| `src/sdls_header.lua`, `src/sdls_trailer.lua` | En-tête et queue SDLS (ligne 12 de chacun) | +| `src/tc_pus.lua`, `src/tm_pus.lua`, `src/tm_pus_cuc.lua` | PUS TC (port 50000, lignes 121 et 122), PUS TM (UDP 8001, TCP 8010, lignes 134 et 135), PUS TM CUC (sans port) | +| `src/pus_service_table.lua`, `src/crc16.lua` | Table des services PUS et CRC-16, chargés par `require` | +| `src/dissector_table.lua` | Crée la table `ccsds.pvn` (ligne 6) | +| `src/CSS_Constellation.lua` | `css_netw` (ligne 22), UDP 5011 et 5012 (lignes 107 et 108) | + +## Utilisation + +Copier les 17 fichiers de `src/` ensemble dans le dossier des plugins Lua +personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »), +puis recharger avec Ctrl+Maj+L. Les `require` y trouvent les modules +communs. Pour que Cortex TC décode la CLTU, régler le sous-dissecteur +sur un nom existant : `-o cortex_tc.subdissector:tc_cltu`. Pour garder +la CLTU en brut : `-o cortex_tc.subdissect:FALSE`. Filtres : +`cortex_tc`, `cortex_tm`, `tc_cltu`, `tc_frame`, `tm_frame`. + +## Vérification à l'import + +`luac5.4 -p` : OK pour les 17 scripts. tshark 4.6.4, dossier des +plugins : les 13 protocoles sont inscrits. Un seul message au +chargement : « Registering dissector space_packet_protocol … in +dissector table ccsds.pvn, which doesn't support Decode As ». Captures +synthétiques Cortex TC sur TCP 3020, construites d'après le code +(préambule 1234567890, postambule −1234567890, somme de contrôle à +somme nulle) : + +| Essai | Résultat | +|---|---| +| Accusé « Clear TC » de 40 octets | décodé : données de réponse, heure d'accusé, « Response status: 0 (Successful) », « TC checksum … (OK) », postambule OK | +| « NOP » (24 octets) | décodé, somme de contrôle OK | +| « Clear TC » avec CLTU, réglages par défaut | « tc_cltu_02 subdissector not found », puis **erreur Lua** ligne 229 de `Cortex_TC.lua` (`attempt to call a nil value (upvalue 'tc_subdissector')`) | +| Même message, `-o cortex_tc.subdissector:tc_cltu` | CLTU, puis trame TC (en-tête primaire, SCID, VCID, longueur) ; la configuration SDLS par défaut suppose un en-tête SDLS. Sur une trame courte : **erreur Lua** ligne 259 de `tc_frame.lua` (`negative length in tvb range`) | +| Même message, `-o cortex_tc.subdissect:FALSE` | décodé, CLTU en brut, somme de contrôle OK | +| Segment de 3 octets | **erreur Lua** ligne 315 de `Cortex_TC.lua` (`Range is out of bounds`) | + +Cortex TM, la télémesure CCSDS, PUS et CSS Constellation ont seulement +été vérifiés au chargement, sans capture. + +## Limites constatées + +- Les sous-dissecteurs par défaut `tc_cltu_02` et `tm_frame_02` (ligne + 36 de `Cortex_TC.lua`, ligne 35 de `Cortex_TM.lua`) n'existent pas + dans la collection. Il faut régler la préférence, sans quoi chaque + télécommande avec CLTU provoque une erreur Lua. +- `Cortex_common.lua` remplace la bibliothèque standard Lua `debug` par + sa propre classe de trace (ligne 52). Cela peut gêner d'autres scripts + Lua chargés dans la même instance de Wireshark. +- Les numéros 70001 et 70010 de `tm_frame.lua` (lignes 493 et 494) + dépassent 65535 : ce ne sont pas des ports valides. +- Un message Cortex doit tenir dans un segment TCP : il n'y a ni + réassemblage ni découpage (« To Do » de l'amont), ni contrôle de + longueur. +- Les en-têtes SDLS dépendent d'une préférence de `tc_frame` (et de + `tm_frame`). Il faut la régler selon la mission simulée. +- Pas de capture réelle dans le dépôt amont. diff --git a/dissectors/css-ccsds-cortex/src/CSS_Constellation.lua b/dissectors/css-ccsds-cortex/src/CSS_Constellation.lua new file mode 100644 index 0000000..7cbd394 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/CSS_Constellation.lua @@ -0,0 +1,134 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/CSS_Constellation.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +------------------------------------------------------------------ +-- +-- CSS project constellation network layer protocol dissector +-- +-- Written by Pierre Bacquet, Thales Alenia Space +-- +------------------------------------------------------------------ + + + +local default_settings = +{ + tc_dissector = "tc_frame", -- sub-dissector to be called for TC + tm_dissector = "tm_frame", -- sub-dissector to be called for TM +} + +css_netw_protocol = Proto("CSS_Netw", "CSS Constellation Network Protocol") + +-- a table of all of our Protocol's fields +local f = +{ + -- Header + ttl = ProtoField.int8("CSS_Netw.ttl", "Time to live", base.DEC), + -- Message + syncMarker = ProtoField.uint32("CSS_Netw.syncMarker", "TM Frame Synchronisation Marker", base.HEX), +} + +-- Register our fields +css_netw_protocol.fields = f + +local tc_subdissector = nil +local tm_subdissector = nil + +-------------------------------------------------------------------------- +-- Helper functions to get the dissectors to be used for CCSDS TC and TM +-- The code takes care of the fact that CCSDS TC and TM may not already be +-- loaded at the time the CSS network dissector is loaded. Hence, this code +-- is to be called each time a CSS network packet is to be sub-dissected. +-------------------------------------------------------------------------- + +local function getTC_SubDissector() + if tc_subdissector == nil then + local sub_dissector + + tc_subdissector = Dissector.get("data") + if default_settings.tc_dissector ~= '' then + sub_dissector = Dissector.get(default_settings.tc_dissector) + if sub_dissector ~= nil then + tc_subdissector = sub_dissector + end + end + end + + return tc_subdissector +end + +local function getTM_SubDissector() + if tm_subdissector == nil then + local sub_dissector + + tm_subdissector = Dissector.get("data") + if default_settings.tm_dissector ~= '' then + sub_dissector = Dissector.get(default_settings.tm_dissector) + if sub_dissector ~= nil then + tm_subdissector = sub_dissector + end + end + end + + return tm_subdissector +end + +function css_netw_protocol.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length <= 5 then return end + + local subtree = tree:add(css_netw_protocol, buffer(), "CSS Network layer") + local offset = 0 + local subDissector + + pinfo.cols.protocol = css_netw_protocol.name + subtree:add(f.ttl, buffer(offset, 1)) + offset = offset + 1 + -- Get 4 next bytes to infer type (TM or TC) + local tm_asm + tm_asm = buffer(offset,4):uint() + if tm_asm == 0x1acffc1d then + -- TM frame + subtree:add(f.syncMarker, buffer(offset,4)) + offset = offset + 4 + subDissector = getTM_SubDissector() + else + -- TC frame + subDissector = getTC_SubDissector() + end + local data_buffer = buffer:range(offset, length - offset):tvb() + subDissector(data_buffer, pinfo, subtree) + +end + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(5011, css_netw_protocol) +udp_port:add(5012, css_netw_protocol) + +-- Register our preferences + +css_netw_protocol.prefs.tc_dissector = Pref.string("CCSDS TC dissector", default_settings.tc_dissector, + "CCSDS dissector to call to dissect TC") +css_netw_protocol.prefs.tm_dissector = Pref.string("CCSDS TM dissector", default_settings.tm_dissector, + "CCSDS dissector to call to dissect TM") + +function css_netw_protocol.prefs_changed() + + if default_settings.tc_dissector ~= css_netw_protocol.prefs.tc_dissector then + default_settings.tc_dissector = css_netw_protocol.prefs.tc_dissector + -- Force recomputing dissector reference + tc_subdissector = nil + -- Have to reload the capture file for this type of change + reload() + end + + if default_settings.tm_dissector ~= css_netw_protocol.prefs.tm_dissector then + default_settings.tm_dissector = css_netw_protocol.prefs.tm_dissector + -- Force recomputing dissector reference + tm_subdissector = nil + -- Have to reload the capture file for this type of change + reload() + end +end diff --git a/dissectors/css-ccsds-cortex/src/Cortex_TC.lua b/dissectors/css-ccsds-cortex/src/Cortex_TC.lua new file mode 100644 index 0000000..0616d88 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/Cortex_TC.lua @@ -0,0 +1,442 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/Cortex_TC.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +------------------------------------------------------------------ +-- +-- Cortex modem (Safran) protocol dissector +-- TC protocol +-- +-- Written by Pierre Bacquet, Thales Alenia Space +-- +-- To Do: +-- * Handle the case of Cortex messag split over several TCP segments +-- or TCP segments containing several Cortex messages +-- +------------------------------------------------------------------ + +-- +-- Get common definitions and helper functions +-- +require("Cortex_common") + +local ifType = { + PHYSICAL = 0, + CODING = 1 +} + +local default_settings = +{ + enabled = true, -- whether this dissector is enabled or not + port = CORTEX_TC_PORT, -- default TCP port number for Cortex TC messages + max_msg_len = 1024, -- max length of Cortex TC message + if_type = ifType.PHYSICAL, -- Interface type : physical layer or coding layer + subdissect = true, -- whether to call sub-dissector or not + subdissector = "tc_cltu_02", -- sub-dissector to be called (TC_cltu_02 if randomisation in use) + debug_level = debugLevel.DISABLED, +} + +local scramblingModeValues = { + [0] = "Clear TC", + [1] = "Scrambled TC" + } + +local tc_debug = debug.new(default_settings.debug_level) + +-- +-- TC protocol +-- + +cortex_tc_protocol = Proto("Cortex_TC", "Cortex TC Protocol") + +-- a table of all of our Protocol's fields +local tc_fields = +{ + -- Header + preamble = ProtoField.int32("cortex.preamble", "Preamble", base.DEC), + messageLength = ProtoField.int32("cortex.msgLength", "Message length (bytes)", base.DEC), + flowId = ProtoField.int32("cortex.flowId", "Flow Id", base.DEC), + -- Message + reqCode = ProtoField.int32("cortex.requestCode", "Request code", base.DEC), + loggingWord = ProtoField.uint32("cortex.loggingWord", "Command tag", base.DEC), + TCmsgLength = ProtoField.int32("cortex.TCmsgLength", "TC message length (bits)", base.DEC), + radTime = ProtoField.absolute_time("cortex.tcRadTime", "TC latest radiation time", base.UTC), + scramblingEnable = ProtoField.uint32("cortex.scramblingEnable", "Scrambling enable", base.DEC, scramblingModeValues), + unused = ProtoField.none("cortex.unused", "Unused", base.NONE), + firstScrambledBit = ProtoField.uint32("cortex.1stScrambledBit", "Position of the 1st bit to scramble", base.DEC), + acquisitionSeq = ProtoField.none("cortex.acquisitionSequence", "Acquisition sequence", base.NONE), + theTC = ProtoField.none("cortex.TeleCommand", "CLTU", base.NONE), + idleSeq = ProtoField.none("cortex.idleSequence", "Idle sequence", base.NONE), + padding = ProtoField.none("cortex.TC_padding", "Cortext TC padding", base.NONE), + verificationTO = ProtoField.uint32("cortex.verifTimeOut", "Verification time-out (ms)", base.DEC), + maxRetries = ProtoField.uint32("cortex.maxRetries", "Maximum number of retries", base.DEC), + numTCWords = ProtoField.uint32("cortex.numTCWords", "Number of TM words to verify", base.DEC), + wordOffset = ProtoField.uint32("cortex.wordOffset", "Word offset (bytes)", base.DEC), + wordMask = ProtoField.uint32("cortex.wordMask", "Mask for word", base.HEX), + wordValue = ProtoField.uint32("cortex.wordValue", "Expected value for word", base.HEX), + numPulses = ProtoField.uint32("cortex.numPulses", "Number of pulses", base.DEC), + pulseWidth = ProtoField.uint32("cortex.pulseWidth", "Pulse width", base.DEC), + pulsePeriod = ProtoField.uint32("cortex.pulsePeriod", "Pulse period", base.DEC), + pausePeriod = ProtoField.uint32("cortex.pausePeriod", "Pause period", base.DEC), + waitUntil = ProtoField.absolute_time("cortex.tcWaitUntil", "Next operation time", base.UTC), + numTC = ProtoField.uint32("cortex.numTC", "Number of TCs", base.DEC), + dataField = ProtoField.uint32("cortex.dataField", "Data field ", base.HEX), + maskField = ProtoField.uint32("cortex.maskField", "Mask field ", base.HEX), + -- For acknowledgments + respData = ProtoField.uint32("cortex.tcRespData", "Response data", base.DEC), + respTime = ProtoField.absolute_time("cortex.tcRespTime", "Acknowledgement time", base.UTC), + respStatus = ProtoField.uint32("cortex.tcRespStatus", "Response status", base.DEC), + -- Common to TC messages and their acknowledgments + checkSum = ProtoField.uint32("cortex.TCcheckSum", "TC checksum", base.HEX), + -- Trailer + postamble = ProtoField.int32("cortex.postamble", "Postamble", base.DEC), +} + +-- Register our fields +cortex_tc_protocol.fields = tc_fields + +local tc_subdissector = nil + +local function enableTC_SubDissector() + tc_subdissector = Dissector.get(default_settings.subdissector) + + if tc_subdissector == nil then + tc_debug:show(debugLevel.LEVEL_1, default_settings.subdissector .. " subdissector not found") + end + +end + +local function get_TC_codeName(tc_code) + local opcode_name = "Unknown" + + if tc_code == 1 then opcode_name = "Clear TC" + elseif tc_code == 21 then opcode_name = "Clear TC with latest radiation time" + elseif tc_code == 14 then opcode_name = "Scrambled TC" + elseif tc_code == 3 then opcode_name = "Wait and verify" + elseif tc_code == 4 then opcode_name = "Execute" + elseif tc_code == 5 then opcode_name = "Pause" + elseif tc_code == 6 then opcode_name = "Wait for absolute time" + elseif tc_code == 7 then opcode_name = "TCU unlock" + elseif tc_code == 8 then opcode_name = "NOP" + elseif tc_code == 9 then opcode_name = "Stop idling" + elseif tc_code == 10 then opcode_name = "Group" + elseif tc_code == 18 then opcode_name = "Data+Execute" end + + return opcode_name +end + +local function get_RespStatus(code, status) + local retStatusName = "Unknown" + + -- To Do: "switchify" me if possible + if status == 0 then retStatusName = "Successful" + elseif status == 1 then retStatusName = "TC encoder locked out" + elseif status == 2 then retStatusName = "Invalid check-sum or invalid syntax" + elseif status == 3 then + if code == 10 then + retStatusName = "Corrupted data in the group of satellite TC requests" + else + retStatusName = "Verification failed after retries" + end + elseif status == 4 then + if code == 10 then + retStatusName = "New « Group » instruction received" + else + retStatusName = "TC Scrambler mounted & not responding or CMM1 checking failed (time-out)" + end + elseif status == 5 then retStatusName = "CMM2 checking failed" + elseif status == 6 then retStatusName = "Group rejected" + elseif status == 7 then retStatusName = "TCU failure" + elseif status == 8 then retStatusName = "Bad TC demodulation" + elseif status == 11 then retStatusName = "Bad TC chain configuration (TCU not selected on IFM)" + elseif status == 12 then retStatusName = "Latest radiation time reached" + end + + return retStatusName +end + +local function dissectTC_checksum(buffer, payloadSubtree, msgLength) + -- Display and verify checksum + local checkSum = 0 + local i = 0 + local buffOffset = 0 + local numWords = msgLength/4 + for i = 1,numWords,1 do + checkSum = checkSum + buffer(buffOffset, 4):uint() + buffOffset = buffOffset + 4 + end + checkSum = bit.band(checkSum, 0xFFFFFFFF) + local checkSumOK = "OK" + if checkSum ~= 0 then checkSumOK = "NOK" end + payloadSubtree:add(tc_fields.checkSum, buffer(msgLength - 8, 4)):append_text(" (" .. checkSumOK .. ")") +end + +local function dissectTC_response(buffer, payloadSubtree, tc_code_number) + + payloadSubtree:add(tc_fields.respData, buffer(16, 4)) + payloadSubtree:add(tc_fields.respTime, buffer(20, 8), UTC_with_msec(buffer(20, 8))) + + local code = buffer(12, 4):uint() + local status = buffer(28, 4):uint() + payloadSubtree:add(tc_fields.respStatus, buffer(28, 4)):append_text(" (" .. get_RespStatus(code, status) .. ")") + + -- Verify checksum + dissectTC_checksum(buffer, payloadSubtree, 40) +end + +local function dissectTC_request(buffer, payloadSubtree, tc_code_number, pinfo, msgLength) + local trailerOffset = 16 + + if tc_code_number == 1 or tc_code_number == 14 or tc_code_number == 21 then + -- Requests including TC data + payloadSubtree:add(tc_fields.loggingWord, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + -- Decode TC message lenght in bits + payloadSubtree:add(tc_fields.TCmsgLength, buffer(trailerOffset, 4)) + local TC_length = buffer(trailerOffset, 4):uint() -- Cortex uses bits + TC_length = TC_length / 8 -- Now we have bytes + trailerOffset = trailerOffset + 4 + if tc_code_number == 21 then + -- Clear TC with latest radiation time, just add the said radiation time to the tree + payloadSubtree:add(tc_fields.radTime, buffer(trailerOffset, 8), UTC_with_msec(buffer(trailerOffset, 8))) + trailerOffset = trailerOffset + 8 + elseif tc_code_number == 14 then + -- Scrambled TC + local tc_mode = buffer(trailerOffset, 4):uint() + payloadSubtree:add(tc_fields.scramblingEnable, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + payloadSubtree:add(tc_fields.unused, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + payloadSubtree:add(tc_fields.firstScrambledBit, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 end + -- Common dissection for TC whether they are scrambled or not + -- Take care of Cortex padding TC on 32 bytes words + local TC_paddedLength = msgLength - trailerOffset - 8 + if default_settings.if_type == ifType.PHYSICAL then + -- Display acquisition sequence (22 times 0x55) + payloadSubtree:add(tc_fields.acquisitionSeq, buffer(trailerOffset, 22)) + trailerOffset = trailerOffset + 22 + TC_length = TC_length - 24 -- 22 bytes of acquisition sequence and 2 bytes of idle sequence + end + -- Subdissect TC CLTU if enabled + if default_settings.subdissect then + if tc_subdissector == nil then + enableTC_SubDissector() + end + -- CCSDS dissector starts at coding layer with a start sequence = 0xeb90 + local tcFrameTree = payloadSubtree:add(cortex_tc_protocol, buffer(trailerOffset, TC_length), "CLTU") + tc_subdissector(buffer(trailerOffset, TC_length):tvb(), pinfo, tcFrameTree) + else + payloadSubtree:add(tc_fields.theTC, buffer(trailerOffset, TC_length)) + end + trailerOffset = trailerOffset + TC_length + if default_settings.if_type == ifType.PHYSICAL then + -- Display idle sequence (2 x 0x55) + payloadSubtree:add(tc_fields.idleSeq, buffer(trailerOffset, 2)) + trailerOffset = trailerOffset + 2 + end + elseif tc_code_number == 3 then + -- Wait and verify instruction + payloadSubtree:add(tc_fields.verificationTO, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + payloadSubtree:add(tc_fields.maxRetries, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + local numWords = buffer(trailerOffset, 4):uint() + local i + payloadSubtree:add(tc_fields.numTCWords, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + for i = 0,numWords-1,1 do + local wordName = "Word " .. tostring(i) + local groupSubtree = payloadSubtree:add(cortex_tc_protocol, buffer(trailerOffset,12), wordName) + groupSubtree:add(tc_fields.wordOffset, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + groupSubtree:add(tc_fields.wordMask, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + groupSubtree:add(tc_fields.wordValue, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + end + elseif tc_code_number == 4 then + -- Execute instruction + payloadSubtree:add(tc_fields.numPulses, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + payloadSubtree:add(tc_fields.pulseWidth, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + payloadSubtree:add(tc_fields.pulsePeriod, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + elseif tc_code_number == 5 then + -- Pause instruction + payloadSubtree:add(tc_fields.pausePeriod, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + elseif tc_code_number == 6 then + -- Wait for absolute time instruction + payloadSubtree:add(tc_fields.waitUntil, buffer(trailerOffset, 8), UTC_with_msec(buffer(trailerOffset, 8))) + trailerOffset = trailerOffset + 8 + elseif tc_code_number == 10 then + -- Group instruction + payloadSubtree:add(tc_fields.numTC, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + elseif tc_code_number == 18 then + -- Data+Exec instruction + payloadSubtree:add(tc_fields.loggingWord, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + payloadSubtree:add(tc_fields.TCmsgLength, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + payloadSubtree:add(tc_fields.pulseWidth, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + payloadSubtree:add(tc_fields.pulsePeriod, buffer(trailerOffset, 4)) + trailerOffset = trailerOffset + 4 + -- Determine number of words + local numWords = (buffer:len() - trailerOffset - 8)/8 + local dataFieldsSubtree = payloadSubtree:add(cortex_tc_protocol, buffer(trailerOffset,4 * numWords), "Data fields") + for i = 0,numWords-1,1 do + dataFieldsSubtree:add(tc_fields.dataField, buffer(trailerOffset, 4)):prepend_text("[" .. tostring(i) .. "] ") + trailerOffset = trailerOffset + 4 + end + + local maskFieldsSubtree = payloadSubtree:add(cortex_tc_protocol, buffer(trailerOffset,4 * numWords), "Mask fields") + for i = 0,numWords-1,1 do + maskFieldsSubtree:add(tc_fields.maskField, buffer(trailerOffset, 4)):prepend_text("[" .. tostring(i) .. "] ") + trailerOffset = trailerOffset + 4 + end + end + -- Display and verify checksum + dissectTC_checksum(buffer, payloadSubtree, msgLength) + +end + +function cortex_tc_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = cortex_tc_protocol.name + + local subtree = tree:add(cortex_tc_protocol, buffer(), "Cortex TC Protocol Data") + local headerSubtree = subtree:add(cortex_tc_protocol, buffer(0,12), "Header") + local payloadSubtree = subtree:add(cortex_tc_protocol, buffer(12,length-16), "Payload") + local trailerSubtree = subtree:add(cortex_tc_protocol, buffer(length-4,4), "Trailer") + + -- Display preamble information + local preambleCode = buffer(0,4):int() + local preambleOK + if preambleCode == 1234567890 then preambleOK = "OK" else preambleOK = "KO" end + + headerSubtree:add(tc_fields.preamble, buffer(0,4)):append_text(" (" .. preambleOK .. ")") + local msgLength = buffer(4,4):uint() + headerSubtree:add(tc_fields.messageLength, buffer(4,4)) + headerSubtree:add(tc_fields.flowId, buffer(8,4)) + + -- Decode and display TC code + local tc_code_number = buffer(12,4):uint() + local tc_code_name = get_TC_codeName(tc_code_number) + + -- Simple heuristic to determine if it is a request or response without considering + -- the source / destination port. Responses are always 40 bytes and any request doesn't have + -- this size + local isResponse + local xtraDescription = "" + if msgLength == 40 then + isResponse = 1 + xtraDescription = " acknowledgment" + else + isResponse = 0 + end + local fieldTitle = " (" .. tc_code_name .. xtraDescription + payloadSubtree:append_text(fieldTitle .. " message)") + payloadSubtree:add(tc_fields.reqCode, buffer(12,4)):append_text(fieldTitle ..")") + + if isResponse == 1 then + dissectTC_response(buffer, payloadSubtree, tc_code_number) + else + dissectTC_request(buffer, payloadSubtree, tc_code_number, pinfo, msgLength) + end + + -- Decode postamble + local postambleCode = buffer(length-4,4):int() + local postambleOK + if postambleCode == -1234567890 then postambleOK = "OK" else postambleOK = "KO" end + trailerSubtree:add(tc_fields.postamble, buffer(length-4,4)):append_text(" (" .. postambleOK .. ")") +end + +local function enableTC_Dissector() + -- Using DissectorTable:set() removes existing dissector(s), whereas the + -- DissectorTable:add() one adds ours before any existing ones, but + -- leaves the other ones alone, which is better + DissectorTable.get("tcp.port"):add(default_settings.port, cortex_tc_protocol) +end +-- Call it now, because we're enabled by default +enableTC_Dissector() + +local function disableTC_Dissector() + DissectorTable.get("tcp.port"):remove(default_settings.port, cortex_tc_protocol) +end + +local debug_pref_enum = { + { 1, "Disabled", debugLevel.DISABLED }, + { 2, "Level 1", debugLevel.LEVEL_1 }, + { 3, "Level 2", debugLevel.LEVEL_2 }, +} + +local if_type_enum = { + { 1, "Physical layer", ifType.PHYSICAL }, + { 2, "Coding layer", ifType.CODING } +} + +-- Register our preferences +cortex_tc_protocol.prefs.enabled = Pref.bool("Dissector enabled", default_settings.enabled, + "Whether the FPM dissector is enabled or not") + +cortex_tc_protocol.prefs.port = Pref.uint("TC port", default_settings.port, + "Define the TCP port used for TeleCommands") + +cortex_tc_protocol.prefs.if_type = Pref.enum("I/F type", default_settings.if_type, + "Define if TCs are sent at physical or coding layer", if_type_enum) + +cortex_tc_protocol.prefs.subdissect = Pref.bool("Enable sub-dissectors", default_settings.subdissect, + "Whether the Cortex TC packet's content" .. + " should be dissected or not using CCSDS dissector") + +cortex_tc_protocol.prefs.subdissector = Pref.string("CCSDS TC dissector", default_settings.subdissector, + "CCSDS dissector to call to dissect TC") + +cortex_tc_protocol.prefs.debug = Pref.enum("Debug", default_settings.debug_level, + "The debug printing level", debug_pref_enum) + +function cortex_tc_protocol.prefs_changed() + + default_settings.subdissect = cortex_tc_protocol.prefs.subdissect + default_settings.debug_level = cortex_tc_protocol.prefs.debug + default_settings.if_type = cortex_tc_protocol.prefs.if_type + tc_debug:setLevel(default_settings.debug_level) + + if default_settings.enabled ~= cortex_tc_protocol.prefs.enabled then + default_settings.enabled = cortex_tc_protocol.prefs.enabled + if default_settings.enabled then + enableTC_Dissector() + else + disableTC_Dissector() + end + -- have to reload the capture file for this type of change + reload() + end + + if default_settings.port ~= cortex_tc_protocol.prefs.port then + if default_settings.enabled then + disableTC_Dissector() + default_settings.port = cortex_tc_protocol.prefs.port + enableTC_Dissector() + -- have to reload the capture file for this type of change + reload() + else + default_settings.port = cortex_tc_protocol.prefs.port + end + end + + if default_settings.subdissector ~= cortex_tc_protocol.prefs.subdissector then + default_settings.subdissector = cortex_tc_protocol.prefs.subdissector + enableTC_SubDissector() + -- have to reload the capture file for this type of change + reload() + end + +end diff --git a/dissectors/css-ccsds-cortex/src/Cortex_TM.lua b/dissectors/css-ccsds-cortex/src/Cortex_TM.lua new file mode 100644 index 0000000..45c2ead --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/Cortex_TM.lua @@ -0,0 +1,438 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/Cortex_TM.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +------------------------------------------------------------------ +-- +-- Cortex modem (Safran) protocol dissector +-- TM protocol +-- +-- Written by Pierre Bacquet, Thales Alenia Space +-- +-- To Do: +-- * Handle the case of Cortex messag split over several TCP segments +-- or TCP segments containing several Cortex messages +-- +------------------------------------------------------------------ + +---------------------------------------------------------------------- +-- Uncomment next line if bit is not available in your LUA version +--local bit=bit32 +---------------------------------------------------------------------- + +-- +-- Get common definitions and helper functions +-- +require("Cortex_common") + +local default_settings = +{ + enabled = true, -- whether this dissector is enabled or not + port = CORTEX_TM_PORT, -- default TCP port number for Cortex TM messages + max_msg_len = 1024, -- max length of Cortex TM message (bytes) + subdissect = true, -- whether to call sub-dissector or not + subdissector = "tm_frame_02", -- sub-dissector to be called + debug_level = debugLevel.LEVEL_1, + } + +local tm_debug = debug.new(default_settings.debug_level) + +-- +-- TM protocol +-- + +cortex_tm_protocol = Proto("Cortex_TM", "Cortex TM Protocol") + +-- Various maps to decode bitfiels +local RS_Values = { + [1] = "data (SW & R-S code removed)", + [2] = "SW + data + R-S code" + } + +local LDPC_Values = { + [1] = "Information data + Parity", + [2] = "Information data only" + } + +local RS_CorrectionValues = { + [1] = "R-S Correction capacity exceeded", + [2] = "R-S Correction OK" + } + +local FrameCheckingValues = { + [1] = "Frame checking ON and frame check error", + [2] = "Frame checking OFF or no error" + } + +local retCodeValues = { + [0] = "OK", + [1] = "Invalid syntax", + [2] = "M chain not mounted" + } + +local ldpcStatusValues = { + [0] = "LDPC decoder correction OK", + [1] = "LDPC Correction capacity exceeded", + [2] = "Frame checking is ON and frame check error" + } + +-- a table of all of our Protocol's fields +local tm_fields = +{ + -- Header + preamble = ProtoField.int32("cortex.preamble", "Preamble", base.DEC), + messageLength = ProtoField.int32("cortex.msgLength", "Message length (bytes)", base.DEC), + flowId = ProtoField.int32("cortex.flowId", "Flow Id", base.DEC), + -- Message + retCode = ProtoField.int32("cortex.retCode", "Return code", base.DEC, retCodeValues), + channel = ProtoField.int32("cortex.tmChannel", "TM Channel", base.DEC), + number = ProtoField.int32("cortex.tmNumber", "Number of TM", base.DEC), + dataFlow = ProtoField.int32("cortex.tmDataFlow", "Data flow", base.DEC), + frameMask = ProtoField.uint64("cortex.tmFrameMask", "Frame mask", base.HEX), + expectedValue = ProtoField.uint64("cortex.tmExpectedValue", "Expected value", base.HEX), + startTimeTag = ProtoField.absolute_time("cortex.tmStartTimeTag", "TM start time tag", base.UTC), + endTimeTag = ProtoField.absolute_time("cortex.tmEndTimeTag", "TM end time tag", base.UTC), + firstFile = ProtoField.int16("cortex.tmFirstFile", "First file to read", base.DEC), + numFiles = ProtoField.int16("cortex.tmNumFiles", "Number of files to read", base.DEC), + timeTag = ProtoField.absolute_time("cortex.tmTimeTag", "Time tag", base.UTC), + seqCount = ProtoField.uint32("cortex.tmSequenceCounter", "Sequence counter", base.DEC), + frmCheckRes = ProtoField.uint32("cortex.tmFrameCheckResult", "Frame check result", base.DEC), + numRS_ErrorsCorrected = ProtoField.uint32("cortex.tmNumRS_ErrorsCorrected", "Number of R-S errors corrected", base.DEC, nil, 0xff00), + frmCheckStatus = ProtoField.bool("cortex.tmFrmCheckStatus", "Frame checking status", 32, FrameCheckingValues, 0x2), + rsCorrectionStatus = ProtoField.bool("cortex.tmRsCorrectionStatus", "R-S correction status", 32, RS_CorrectionValues, 0x1), + TC_DecoderStatus = ProtoField.uint32("cortex.tmTC_DecoderStatus", "Turbo-Code decoder status", base.DEC), + numLDPC_ErrorsCorrected = ProtoField.uint16("cortex.tmNumLDPC_ErrorsCorrected", "Number of LDPC errors corrected", base.DEC), + LDPC_DecoderStatus = ProtoField.uint8("cortex.tmLDPC_DecoderStatus", "LDPC decoder status", base.DEC, ldpcStatusValues), + frmCheckStatus1 = ProtoField.uint8("cortex.tmFrmCheckStatus", "Frame check status", base.DEC), + + frmSyncStatus = ProtoField.uint32("cortex.tmFrameSyncStatus", "Frame synchronizer status", base.DEC), + bitSlip = ProtoField.uint32("cortex.tmBitSlip", "Bit slip", base.DEC), + delay = ProtoField.uint32("cortex.tmDelay", "TM delay", base.DEC), + frmLength = ProtoField.uint32("cortex.tmFrameLength", "Frame length (bytes)", base.DEC), + syncWordLength = ProtoField.uint32("cortex.tmSyncWordLength", "Synchronization word length (bits)", base.DEC), + rsDecoderStatus = ProtoField.bool("cortex.tmRsStatus", "R-S decoder", 32, OnOffValues, 0x1), + CrcVerification = ProtoField.bool("cortex.tmCRCVerification", "CRC Verification", 32, OnOffValues, 0x2), + checksumVerification = ProtoField.bool("cortex.tmChecksumVerification", "Checksum Verification", 32, OnOffValues, 0x4), + turboDecoder = ProtoField.bool("cortex.tmTurboDecoder", "Turbo decoder", 32, OnOffValues, 0x8), + LDPCDecoder = ProtoField.bool("cortex.tmLDPCDecoder", "LDPC decoder", 32, OnOffValues, 0x10), + TxData = ProtoField.none("cortex.tmTxData", "Transmitted data", base.NONE), + dataRSContents = ProtoField.bool("cortex.tmRS_Data", "RS data", 32, RS_Values, 0x1), + numErrorsAvail = ProtoField.bool("cortex.tmNumErrorsAvail", "Number of corrected errors available", 32, OnOffValues, 0x2), + dataLDPCContents = ProtoField.bool("cortex.tmLDPC_Data", "LDPC data", 32, LDPC_Values, 0x1), + unused = ProtoField.none("cortex.tmUnused", "Unused", base.NONE), + tmFrame = ProtoField.none("cortex.TM_Frame", "CCSDS TeleMetry Frame", base.NONE), + syncMarker = ProtoField.uint32("cortex.syncMarker", "Frame Synchronisation Marker", base.HEX), + + -- Trailer + postamble = ProtoField.int32("cortex.postamble", "Postamble", base.DEC), +} + +-- Register our fields +cortex_tm_protocol.fields = tm_fields + +local tm_subdissector = nil + +-- Convert a channel code into a channel name +local function get_TM_channelName(tm_channel) + local retChannelName = "Unknown" + + if (tm_channel < 0 or tm_channel > 5) then + return retChannelNam + end + + local retChannelCode = string.char(string.byte('A')+tm_channel) + + retChannelName = "TM channel " .. retChannelCode + + return retChannelName +end + +local function get_TM_DataFlowName(dataFlow) + local retDataFlowName = "Reserved" + + if dataFlow == 0 then retDataFlowName = "Real-Time permanent flow" + elseif dataFlow == 1 then retDataFlowName = "Real-Time single block/frame Tx" + elseif dataFlow == 2 then retDataFlowName = "Real-Time permanent flow + dummy TM" + elseif dataFlow == 4 then retDataFlowName = "Offline permanent flow" + elseif dataFlow == 5 then retDataFlowName = "Offline single block/frame Tx" + elseif dataFlow == 6 then retDataFlowName = "Offline permanent flow + dummy TM" + elseif dataFlow == 80 then retDataFlowName = "Stop TM" + end + + return retDataFlowName +end + +local function get_TM_SyncStatusName(syncStatus) + local retSyncStatusName = "Unknown" + + if syncStatus == 0 then retSyncStatusName = "Frame sync. Off" + elseif syncStatus == 1 then retSyncStatusName = "Frame sync. On, Lock" + elseif syncStatus == 2 then retSyncStatusName = "Frame sync. On, FlyWheel" + elseif syncStatus == 4 then retSyncStatusName = "End of data (Offline TM)" + end + + return retSyncStatusName +end + +-- This function is made common to Turbo-code decoding or no decoder at all by ignoring the +-- unused case (1) for Frame check OK + +local function get_TurboCodeStatusName(turboStatus) + local retTurboCodeStatusName = "Unknown" + + if turboStatus == 0 or turboStatus == 1 then retTurboCodeStatusName = "Frame check OK" + elseif turboStatus == 2 then retTurboCodeStatusName = "Frame check error" + end + + return retTurboCodeStatusName +end + +local function enableTM_SubDissector() + tm_subdissector = Dissector.get(default_settings.subdissector) + + if tm_subdissector == nil then + tm_debug:show(debugLevel.LEVEL_1, default_settings.subdissector .. " subdissector not found") + end + +end + +function cortex_tm_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = cortex_tm_protocol.name + + local subtree = tree:add(cortex_tm_protocol, buffer(), "Cortex TM Protocol Data") + local headerSubtree = subtree:add(cortex_tm_protocol, buffer(0,12), "Header") + local payloadSubtree = subtree:add(cortex_tm_protocol, buffer(12,length-16), "Payload") + local trailerSubtree = subtree:add(cortex_tm_protocol, buffer(length-4,4), "Trailer") + + -- Display preamble information + local preambleCode = buffer(0,4):int() + local preambleOK + if preambleCode == 1234567890 then preambleOK = "OK" else preambleOK = "KO" end + + headerSubtree:add(tm_fields.preamble, buffer(0,4)):append_text(" (" .. preambleOK .. ")") + headerSubtree:add(tm_fields.messageLength, buffer(4,4)) + headerSubtree:add(tm_fields.flowId, buffer(8,4)) + + -- Decode payload + local msgLength = buffer(4,4):int() + tm_debug:show(debugLevel.LEVEL_2, "Message length: " .. tostring(msgLength)) + + local payloadType = "Unknown message" + -- Simple heuristics to determine message type + if (msgLength == 64) then + -- TM request message for sure + local channel = buffer(12,4):int() + local dataFlow = buffer(20,4):int() + + payloadType = "TM request message" + payloadSubtree:add(tm_fields.channel, buffer(12,4)):append_text(" (" .. get_TM_channelName(channel) .. ")") + payloadSubtree:add(tm_fields.number, buffer(16,4)) + payloadSubtree:add(tm_fields.dataFlow, buffer(20,4)):append_text(" (" .. get_TM_DataFlowName(dataFlow) .. ")") + payloadSubtree:add(tm_fields.frameMask, buffer(24,8)) + payloadSubtree:add(tm_fields.expectedValue, buffer(32,8)) + payloadSubtree:add(tm_fields.startTimeTag, buffer(40,8), UTC_with_msec(buffer(40,8))) + payloadSubtree:add(tm_fields.endTimeTag, buffer(48,8), UTC_with_msec(buffer(48,8))) + payloadSubtree:add(tm_fields.firstFile, buffer(56,2)) + payloadSubtree:add(tm_fields.numFiles, buffer(58,2)) + + elseif (msgLength == 20) then + -- TM Nack or STOP TM Ack + local retCode = buffer(12,4):int() + if retCode == 0 then + payloadType = "Telemetry Stop TM ACK message" + else + payloadType = "Telemetry NACK message" + end + payloadSubtree:add(tm_fields.retCode, buffer(12,4)) + elseif (msgLength > 64) then + -- Looks like a TM message whether real or dummy (dummy is only 68 bytes) + local RealTM = 1 + if msgLength == 68 then + payloadType = "Dummy Telemetry message" + RealTM = 0 + else + payloadType = "Telemetry message" + end + --Time is encoded as UTC on the 1st 32 bytes word and then msecs on the next 32 bytes word + payloadSubtree:add(tm_fields.timeTag, buffer(12,8), UTC_with_msec(buffer(12,8))) + payloadSubtree:add(tm_fields.seqCount, buffer(20,4)) + -- Frame check result is dependent on word #12, i.e. buffer(48,4) + -- Logic is not so simple + local frmStatus = buffer(48,4):uint() + if frmStatus == 0 then + payloadSubtree:add(tm_fields.frmCheckRes, buffer(24,4)):append_text(" (Not significant)") + else + local frmCheckSubtree = payloadSubtree:add(cortex_tm_protocol, buffer(24,4), "Frame check result") + if bit.band(frmStatus, 0x1) ~= 0 then + -- R-S decoder ON + local txData = buffer(52,4):uint() + if bit.band(txData, 0x2) ~= 0 then + frmCheckSubtree:add(tm_fields.numRS_ErrorsCorrected, buffer(24,4)) + end + frmCheckSubtree:add(tm_fields.frmCheckStatus, buffer(24,4)) + frmCheckSubtree:add(tm_fields.rsCorrectionStatus, buffer(24,4)) + elseif bit.band(frmStatus, 0x8) ~= 0 then + -- Turbocode decoder ON + local turboStatus = buffer(27,1):uint() + frmCheckSubtree:add(tm_fields.TC_DecoderStatus,buffer(24,4)):append_text(" (" .. get_TurboCodeStatusName(turboStatus) .. ")") + elseif bit.band(frmStatus, 0x10) ~= 0 then + -- LDPC decoder ON + local errorsCorrected = buffer(25,2):uint() + local LDPC_info = "" + if errorsCorrected == 0xffff then + LDPC_info = " (LDPC correction capacity exceeded)" + end + frmCheckSubtree:add(tm_fields.numLDPC_ErrorsCorrected, buffer(25,2)):append_text(LDPC_info) + local ldpcStatus = buffer(27,1):uint() + frmCheckSubtree:add(tm_fields.LDPC_DecoderStatus, buffer(27,1)) + else + -- No decoder + local frmChkStatus = buffer(27,1):uint() + frmCheckSubtree:add(tm_fields.frmCheckStatus1, buffer(27,1)):append_text(" (" .. get_TurboCodeStatusName(frmChkStatus) .. ")") + end + end + -- Decode synchronizer status + local syncStatus = buffer(28,4):int() + payloadSubtree:add(tm_fields.frmSyncStatus, buffer(28,4)):append_text(" (" .. get_TM_SyncStatusName(syncStatus) .. ")") + -- Decode bit slip status + local bitSlip = buffer(32,4):int() + local bitSlipStatus = "Unknown" + if bitSlip == 0 then + bitSlipStatus = "No bit slip" + elseif bitSlip == 1 then + bitSlipStatus = "Bit slip occured" + end + if RealTM == 1 then + payloadSubtree:add(tm_fields.bitSlip, buffer(32,4)):append_text(" (" .. bitSlipStatus .. ")") + payloadSubtree:add(tm_fields.delay, buffer(36,4)) + else + payloadSubtree:add(tm_fields.unused, buffer(32,8)) + end + payloadSubtree:add(tm_fields.frmLength, buffer(40,4)) + if RealTM == 1 then + local length = buffer:len() + payloadSubtree:add(tm_fields.syncWordLength, buffer(44,4)) + -- Frame check & decoding status display + local frmStatusSubtree = payloadSubtree:add(cortex_tm_protocol, buffer(48,4), "Frame check and decoder status") + frmStatusSubtree:add(tm_fields.LDPCDecoder, frmStatus) + frmStatusSubtree:add(tm_fields.turboDecoder, frmStatus) + frmStatusSubtree:add(tm_fields.checksumVerification, frmStatus) + frmStatusSubtree:add(tm_fields.CrcVerification, frmStatus) + frmStatusSubtree:add(tm_fields.rsDecoderStatus, frmStatus) + -- Tx Data display + if bit.band(frmStatus,0x11) ~= 0 then + local txDataSubtree = payloadSubtree:add(cortex_tm_protocol, buffer(52,4), "Transmitted data") + if bit.band(frmStatus,0x1) ~= 0 then + txDataSubtree:add(tm_fields.numErrorsAvail, buffer(52,4)) + txDataSubtree:add(tm_fields.dataRSContents, buffer(52,4)) + else + txDataSubtree:add(tm_fields.dataLDPCContents, buffer(52,4)) + end + else + payloadSubtree:add(tm_fields.TxData, buffer(52,4)):append_text(" (Unused)") + end + payloadSubtree:add(tm_fields.unused, buffer(56,8)) + payloadSubtree:add(tm_fields.tmFrame, buffer(64,length-68)) + -- Subdissect TM Frame if enabled + if default_settings.subdissect then + if tm_subdissector == nil then + enableTM_SubDissector() + end + local tmFrameTree = payloadSubtree:add(cortex_tm_protocol, buffer(64,length-68), "Transfer Frame") + tmFrameTree:add(tm_fields.syncMarker, buffer(64,4)) + -- Skip synchronisation marker + tm_subdissector(buffer(68, length-72):tvb(), pinfo, tmFrameTree) + end + else + -- Dummy TM + payloadSubtree:add(tm_fields.unused, buffer(44,20)) + end + end + payloadSubtree:append_text(" (" .. payloadType .. ")") + + -- Decode postamble + local postambleCode = buffer(length-4,4):int() + local postambleOK + if postambleCode == -1234567890 then postambleOK = "OK" else postambleOK = "KO" end + trailerSubtree:add(tm_fields.postamble, buffer(length-4,4)):append_text(" (" .. postambleOK .. ")") + +end + +local function enableTM_Dissector() + -- Using DissectorTable:set() removes existing dissector(s), whereas the + -- DissectorTable:add() one adds ours before any existing ones, but + -- leaves the other ones alone, which is better + DissectorTable.get("tcp.port"):add(default_settings.port, cortex_tm_protocol) +end +-- Call it now, because we're enabled by default +enableTM_Dissector() + +local function disableTM_Dissector() + DissectorTable.get("tcp.port"):remove(default_settings.port, cortex_tm_protocol) +end + +local debug_pref_enum = { + { 1, "Disabled", debugLevel.DISABLED }, + { 2, "Level 1", debugLevel.LEVEL_1 }, + { 3, "Level 2", debugLevel.LEVEL_2 }, +} + +-- Register our preferences + +cortex_tm_protocol.prefs.enabled = Pref.bool("Dissector enabled", default_settings.enabled, + "Whether the FPM dissector is enabled or not") + +cortex_tm_protocol.prefs.port = Pref.uint("TC port", default_settings.port, + "Define the TCP port used for TeleMetries") + +cortex_tm_protocol.prefs.subdissect = Pref.bool("Enable sub-dissectors", default_settings.subdissect, + "Whether the Cortex TM packet's content" .. + " should be dissected or not using CCSDS dissector") + +cortex_tm_protocol.prefs.subdissector = Pref.string("CCSDS TM dissector", default_settings.subdissector, + "CCSDS dissector to call to dissect TM") + +cortex_tm_protocol.prefs.debug = Pref.enum("Debug", default_settings.debug_level, + "The debug printing level", debug_pref_enum) + +function cortex_tm_protocol.prefs_changed() + + default_settings.subdissect = cortex_tm_protocol.prefs.subdissect + default_settings.debug_level = cortex_tm_protocol.prefs.debug + tm_debug:setLevel(default_settings.debug_level) + + if default_settings.enabled ~= cortex_tm_protocol.prefs.enabled then + default_settings.enabled = cortex_tm_protocol.prefs.enabled + if default_settings.enabled then + enableTM_Dissector() + else + disableTM_Dissector() + end + -- have to reload the capture file for this type of change + reload() + end + + if default_settings.port ~= cortex_tm_protocol.prefs.port then + if default_settings.enabled then + disableTM_Dissector() + default_settings.port = cortex_tm_protocol.prefs.port + enableTM_Dissector() + -- have to reload the capture file for this type of change + reload() + else + default_settings.port = cortex_tm_protocol.prefs.port + end + end + + if default_settings.subdissector ~= cortex_tm_protocol.prefs.subdissector then + default_settings.subdissector = cortex_tm_protocol.prefs.subdissector + enableTM_SubDissector() + -- have to reload the capture file for this type of change + reload() + end + +end diff --git a/dissectors/css-ccsds-cortex/src/Cortex_common.lua b/dissectors/css-ccsds-cortex/src/Cortex_common.lua new file mode 100644 index 0000000..9276bc9 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/Cortex_common.lua @@ -0,0 +1,76 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/Cortex_common.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +------------------------------------------------------------------ +-- +-- Cortex modem (Safran) protocol dissector +-- Common definitions +-- +-- Written by Pierre Bacquet, Thales Alenia Space +-- +------------------------------------------------------------------ + +-- +-- Comon definitions and helper functions +-- + +-- TCP PORTS per Safran's ICD "STI 100013_CRT (TC = 3020, TM=3070)" +CORTEX_TC_PORT = 3020 +CORTEX_TM_PORT = 3070 +-- TCP PORTS used by TAS DSS" +--CORTEX_TC_PORT = 18051 +--CORTEX_TM_PORT = 18050 + + +OnOffValues = { + [1] = "On", + [2] = "Off" + } + +-- Representation of UTC time with msec as a 2nd 32 bits word + +function UTC_with_msec(subBuffer) + --Time is encoded as UTC on the 1st 32 bits word and then msecs on the next 32 bits word + local secs = subBuffer(0,4):uint() + local nsecs = subBuffer(4,4):uint() + + nsecs = nsecs * 1000000 + + return NSTime.new(secs, nsecs) +end + +-- Debug print class + +debugLevel = { + DISABLED = 0, + LEVEL_1 = 1, + LEVEL_2 = 2 +} + +debug = {} + +debug.__index = debug + +function debug.new(level) + local myClass = setmetatable({}, debug) + + debug.level_ = level + + return myClass +end + +function debug:setLevel(level) + self.level_ = level +end + +function debug:getLevel() + return self.level +end + +function debug:show(level, text) + if level <= self.level_ then + print(text) + end +end diff --git a/dissectors/css-ccsds-cortex/src/crc16.lua b/dissectors/css-ccsds-cortex/src/crc16.lua new file mode 100644 index 0000000..0a9785d --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/crc16.lua @@ -0,0 +1,60 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/crc16.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +------------------------------------------------------------------ +-- +-- CRC16 fast computation using lookup table +-- +-- Written by Pierre Bacquet, Thales Alenia Space +-- +------------------------------------------------------------------ + +local XMODEMCRC16Lookup = { + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, + 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, + 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, + 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, + 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, + 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, + 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, + 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, + 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, + 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, + 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, + 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, + 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, + 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, + 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, + 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, + 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, + 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, + 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, + 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, + 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, + 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, + 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, + 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, + 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, + 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, + 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, + 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, + 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, + 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 +} + +function crc16(buffer) + local crc = 0xffff + local buffLen = buffer:len() - 1 + + for i = 0, buffLen do + local b = buffer(i, 1):uint() + crc = bit.bxor(bit.band(bit.lshift(crc, 8), 0xFFFF), + XMODEMCRC16Lookup[bit.band(bit.bxor(bit.rshift(crc, 8), b), 0xFF) + 1]) + end + + return crc +end diff --git a/dissectors/css-ccsds-cortex/src/dissector_table.lua b/dissectors/css-ccsds-cortex/src/dissector_table.lua new file mode 100644 index 0000000..66ab19b --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/dissector_table.lua @@ -0,0 +1,6 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/dissector_table.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +local table = DissectorTable.new("ccsds.pvn", "PVN", ftypes.UINT8) diff --git a/dissectors/css-ccsds-cortex/src/encapsulation_packet_protocol.lua b/dissectors/css-ccsds-cortex/src/encapsulation_packet_protocol.lua new file mode 100644 index 0000000..e3e24c9 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/encapsulation_packet_protocol.lua @@ -0,0 +1,100 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/encapsulation_packet_protocol.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENCE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENCE.md’. + +encapsulation_packet_protocol = Proto("encapsulation_packet_protocol", "Encapsulation Packet Protocol") + +local f = encapsulation_packet_protocol.fields +local enums = {} + +-- Block size +EPP_MIN_SIZE = 1 + + +-- Header +f.packet_version_number = ProtoField.uint8("encapsulation_packet_protocol.packet_version_number", "Version", base.DEC, + nil, 0xe0) +f.encapsulation_protocol_id = ProtoField.uint8("encapsulation_packet_protocol.encapsulation_protocol_id", + "Encapsulation Protocol ID", base.DEC, nil, 0x1C) +f.length_of_length = ProtoField.uint8("encapsulation_packet_protocol.length_of_length", "Length of Length", base.DEC, nil, + 0x03) +f.user_defined_field = ProtoField.uint8("encapsulation_packet_protocol.user_defined_field", "User Defined Field", + base.DEC, nil, 0xf0) +f.encapsulation_protocol_id_extension = ProtoField.uint8( +"encapsulation_packet_protocol.encapsulation_protocol_id_extension", "Encapsulation Protocl ID Extension", base.DEC, nil, + 0x0f) +f.ccsds_defined_field = ProtoField.uint16("encapsulation_packet_protocol.ccsds_defined_field", "CCSDS Defined Field", + base.DEC, nil, 0xffff) +f.packet_length1 = ProtoField.uint8("encapsulation_packet_protocol.packet_length", "Packet Length", base.DEC, nil, 0xff) +f.packet_length2 = ProtoField.uint16("encapsulation_packet_protocol.packet_length", "Packet Length", base.DEC, nil, + 0xffff) +f.packet_length3 = ProtoField.uint32("encapsulation_packet_protocol.packet_length", "Packet Length", base.DEC, nil, + 0xffffffff) + +--------------- +-- Dissector -- +--------------- + +function encapsulation_packet_protocol.dissector(buffer, pinfo, tree) + local length_buffer = buffer:len() + if length_buffer < 1 then return end + pinfo.cols.protocol = encapsulation_packet_protocol.name + pinfo.cols.info = "Data" + + -- add a tab SPP + local tab = ByteArray.tvb(buffer:bytes(), "EPP") + + local epp_tree = tree:add(encapsulation_packet_protocol, buffer(), "Encapsulation Packer Protocol") + + local offset = 0 + + local header_buffer = buffer:range(offset, EPP_MIN_SIZE):tvb() + local header_tree = epp_tree:add(encapsulation_packet_protocol, header_buffer(), "Encapsulation Packet Header") + + header_tree:add(f.packet_version_number, buffer(offset, 1)) + header_tree:add(f.encapsulation_protocol_id, buffer(offset, 1)) + local epi = buffer(offset, 1):bitfield(3, 3) + header_tree:add(f.length_of_length, buffer(offset, 1)) + local length_of_length = buffer(offset, 1):bitfield(6, 2) + offset = offset + 1 + if length_of_length == 1 then + header_tree:add(f.packet_length1, buffer(offset, 1)) + offset = offset + 1 + elseif length_of_length == 2 then + header_tree:add(f.user_defined_field, buffer(offset, 1)) + header_tree:add(f.encapsulation_protocol_id_extension, buffer(offset, 1)) + offset = offset + 1 + header_tree:add(f.packet_length2, buffer(offset, 2)) + offset = offset + 2 + elseif length_of_length == 3 then + header_tree:add(f.user_defined_field, buffer(offset, 1)) + header_tree:add(f.encapsulation_protocol_id_extension, buffer(offset, 1)) + offset = offset + 1 + header_tree:add(f.ccsds_defined_field, buffer(offset, 2)) + offset = offset + 2 + header_tree:add(f.packet_length3, buffer(offset, 4)) + offset = offset + 4 + end + + local data_buffer = buffer:range(offset, buffer:len() - offset):tvb() + -- Only Idle Data + if epi == 0 then + local oid_data_tree = epp_tree:add(encapsulation_packet_protocol, data_buffer(), "IDLE Data") + Dissector.get("data"):call(data_buffer, pinfo, oid_data_tree) + else + local user_data_tree = epp_tree:add(encapsulation_packet_protocol, data_buffer(), "User Data") + Dissector.get("data"):call(data_buffer, pinfo, user_data_tree) + end +end + +local udp_port = DissectorTable.get("udp.port") +local tcp_port = DissectorTable.get("tcp.port") +udp_port:add(7000, encapsulation_packet_protocol) +tcp_port:add(7000, encapsulation_packet_protocol) diff --git a/dissectors/css-ccsds-cortex/src/pus_service_table.lua b/dissectors/css-ccsds-cortex/src/pus_service_table.lua new file mode 100644 index 0000000..ea032c0 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/pus_service_table.lua @@ -0,0 +1,442 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/pus_service_table.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENCE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENCE.md’. + +local pus_table = { + st1 = { + name = "ST[01] request verification", + sub_services = { + sub1 = "successful acceptance verification report", + sub2 = "failed acceptance verification report", + sub3 = "successful start of execution verification report", + sub4 = "failed start of execution verification report", + sub5 = "successful progress of execution verification report", + sub6 = "failed progress of execution verification report", + sub7 = "successful completion of execution verification report", + sub8 = "failed completion of execution verification report", + sub10 = "failed routing verification report" + } + }, + st2 = { + name = "ST[02] device access", + sub_services = { + sub1 = "distribute on/off device commands", + sub2 = "distribute register load commands", + sub4 = "distribute CPDU commands", + sub5 = "distribute register dump commands", + sub6 = "register dump report", + sub7 = "distribute physical device commands", + sub8 = "acquire data from physical devices", + sub9 = "physical device data report", + sub10 = "distribute logical device commands", + sub11 = "acquire data from logical devices", + sub12 = "logical device data report" + } + }, + st3 = { + name = "ST[03] housekeeping", + sub_services = { + sub1 = "create a housekeeping parameter report structure", + sub2 = "create a diagnostic parameter report structure", + sub3 = "delete housekeeping parameter report structures", + sub4 = "delete diagnostic parameter report structures", + sub5 = "enable the periodic generation of housekeeping parameter reports", + sub6 = "disable the periodic generation of housekeeping parameter reports", + sub7 = "enable the periodic generation of diagnostic parameter reports", + sub8 = "disable the periodic generation of diagnostic parameter reports", + sub9 = "report housekeeping parameter report structures", + sub10 = "housekeeping parameter report structure report", + sub11 = "report diagnostic parameter report structures", + sub12 = "diagnostic parameter report structure report", + sub25 = "housekeeping parameter report", + sub26 = "diagnostic parameter report", + sub27 = "generate a one shot report for housekeeping parameter report structures", + sub28 = "generate a one shot report for diagnostic parameter report structures", + sub29 = "append parameters to a housekeeping parameter report structure", + sub30 = "append parameters to a diagnostic parameter report structure", + sub31 = "modify the collection interval of housekeeping parameter report structures", + sub32 = "modify the collection interval of diagnostic parameter report structures", + sub33 = "report the periodic generation properties of housekeeping parameter report structures", + sub34 = "report the periodic generation properties of diagnostic parameter report structures", + sub35 = "housekeeping parameter report periodic generation properties report", + sub36 = "diagnostic parameter report periodic generation properties report", + sub37 = "apply parameter functional reporting configurations", + sub38 = "create a parameter functional reporting definition", + sub39 = "delete parameter functional reporting definitions", + sub40 = "report parameter functional reporting definitions", + sub41 = "parameter functional reporting definition report", + sub42 = "add parameter report definitions to a parameter functional reporting definition", + sub43 = "remove parameter report definitions from a parameter functional reporting definition", + sub44 = "modify the periodic generation properties of parameter report definitions of a parameter functional reporting definition" + } + }, + st4 = { + name = "ST[04] parameter statistics reporting", + sub_services = { + sub1 = "report the parameter statistics", + sub2 = "parameter statistics report", + sub3 = "reset the parameter statistics", + sub4 = "enable the periodic parameter statistics reporting", + sub5 = "disable the periodic parameter statistics reporting", + sub6 = "add or update parameter statistics definitions", + sub7 = "delete parameter statistics definitions", + sub8 = "report the parameter statistics definitions", + sub9 = "parameter statistics definition report" + } + }, + st5 = { + name = "ST[05] event reporting", + sub_services = { + sub1 = "informative event report", + sub2 = "low severity anomaly report", + sub3 = "medium severity anomaly report", + sub4 = "High severity anomaly report", + sub5 = "enable the report generation of event definitions", + sub6 = "disable the report generation of event definitions", + sub7 = "report the list of disabled event definitions", + sub8 = "disabled event definitions list report" + } + }, + st6 = { + name = "ST[06] memory management", + sub_services = { + sub1 = "load object memory data", + sub2 = "load raw memory data areas", + sub3 = "dump object memory data", + sub4 = "dumped object memory data report", + sub5 = "dump raw memory data", + sub6 = "dumped raw memory data report", + sub7 = "check object memory data", + sub8 = "checked object memory data report", + sub9 = "check raw memory data", + sub10 = "checked raw memory data report", + sub11 = "load a raw memory atomic data area in a non-interruptible transaction", + sub12 = "abort all memory dumps", + sub13 = "enable the scrubbing of a memory", + sub14 = "disable the scrubbing of a memory", + sub15 = "enable the write protection of a memory", + sub16 = "disable the write protection of a memory", + sub17 = "check an object memory object", + sub18 = "checked object memory object report", + sub19 = "load raw memory data areas by reference", + sub20 = "dump raw memory data areas to file", + sub21 = "load object memory data areas by reference", + sub22 = "dump object memory data areas to file" + } + }, + st7 = { + name = "ST[07] (reserved)" + }, + st8 = { + name = "ST[08] function management", + sub_services = { + sub1 = "perform a function" + } + }, + st9 = { + name = "ST[09] time management", + sub_services = { + sub1 = "set the time report generation rate", + sub2 = "CUC time report", + sub3 = "CDS time report" + } + }, + st10 = { + name = "ST[10] (reserved)" + }, + st11 = { + name = "ST[11] time-based scheduling", + sub_services = { + sub1 = "enable the time-based schedule execution function", + sub2 = "disable the time-based schedule execution function", + sub3 = "reset the time-based schedule", + sub4 = "insert activities into the time-based schedule", + sub5 = "delete time-based scheduled activities identified by request identifier", + sub6 = "delete the time-based scheduled activities identified by a filter", + sub7 = "time-shift scheduled activities identified by request identifier", + sub8 = "time-shift the scheduled activities identified by a filter", + sub9 = "detail-report time-based scheduled activities identified by request identifier", + sub10 = "time-based schedule detail report", + sub11 = "detail-report the time-based scheduled activities identified by a filter", + sub12 = "summary-report time-based scheduled activities identified by request identifier", + sub13 = "time-based schedule summary report", + sub14 = "summary-report the time-based scheduled activities identified by a filter", + sub15 = "time-shift all scheduled activities", + sub16 = "detail-report all time-based scheduled activities", + sub17 = "summary-report all time-based scheduled activities", + sub18 = "report the status of each time-based sub-schedule", + sub19 = "time-based sub-schedule status report", + sub20 = "enable time-based sub-schedules", + sub21 = "disable time-based sub-schedules", + sub22 = "create time-based scheduling groups", + sub23 = "delete time-based scheduling groups", + sub24 = "enable time-based scheduling groups", + sub25 = "disable time-based scheduling groups", + sub26 = "report the status of each time-based scheduling group", + sub27 = " time-based scheduling group status report" + } + }, + st12 = { + name = "ST[12] on-board monitoring", + sub_services = { + sub1 = "enable parameter monitoring definitions", + sub2 = "disable parameter monitoring definitions", + sub3 = "change the maximum transition reporting delay", + sub4 = "delete all parameter monitoring definitions", + sub5 = "add parameter monitoring definitions", + sub6 = "delete parameter monitoring definitions", + sub7 = "modify parameter monitoring definitions", + sub8 = "report parameter monitoring definitions", + sub9 = "parameter monitoring definition report", + sub10 = "report the out-of-limits", + sub11 = "out-of-limits report", + sub12 = "check transition report", + sub13 = "report the status of each parameter monitoring definition", + sub14 = "parameter monitoring definition status report", + sub15 = "enable the parameter monitoring function", + sub16 = "disable the parameter monitoring function", + sub17 = "enable the functional monitoring function", + sub18 = "disable the functional monitoring function", + sub19 = "enable functional monitoring definitions", + sub20 = "disable functional monitoring definitions", + sub21 = "protect functional monitoring definitions", + sub22 = "unprotect functional monitoring definitions", + sub23 = "add functional monitoring definitions", + sub24 = "delete functional monitoring definitions", + sub25 = "report functional monitoring definitions", + sub26 = "functional monitoring definition report", + sub27 = "report the status of each functional monitoring definition", + sub28 = "functional monitoring definition status report" + } + }, + st13 = { + name = "ST[13] large packet transfer", + sub_services = { + sub1 = "first downlink part report", + sub2 = "intermediate downlink part report", + sub3 = "last downlink part report", + sub9 = "uplink the first part", + sub10 = "uplink an intermediate part", + sub11 = "uplink the last part", + sub16 = "large packet uplink abortion report" + } + }, + st14 = { + name = "ST[14] real-time forwarding control", + sub_services = { + sub1 = "add report types to the application process forward-control configuration", + sub2 = "delete report types from the application process forward-control configuration", + sub3 = "report the content of the application process forward-control configuration", + sub4 = "application process forward-control configuration content report", + sub5 = "add structure identifiers to the housekeeping parameter report forward-control configuration", + sub6 = "delete structure identifiers from the housekeeping parameter report forward-control configuration", + sub7 = "report the content of the housekeeping parameter report forward-control configuration", + sub8 = "housekeeping parameter report forward-control configuration content report", + sub9 = "add structure identifiers to the diagnostic parameter report forward-control configuration", + sub10 = "delete structure identifiers from the diagnostic parameter report forward-control configuration", + sub11 = "report the content of the diagnostic parameter report forward-control configuration", + sub12 = "diagnistic parameter report forward-control configuration content report", + sub13 = "delete event definition identifiers from the event report blocking forward-control configuration", + sub14 = "add event definition identifiers to the event report blocking forward-control configuration", + sub15 = "report the content of the event report blocking forward-control configuration", + sub16 = "event report blocking forward-control configuration content report" + } + }, + st15 = { + name = "ST[15] on-board storage and retrieval", + sub_services = { + sub1 = "enable the storage function of packet stores", + sub2 = "disable the storage function of packet stores", + sub3 = "add report types to the application process storage-control configuration", + sub4 = "delete report types from the application process storage-control configuration", + sub5 = "report the content of the application process storage-control configuration", + sub6 = "application process storage-control configuration content report", + sub9 = "start the by-time-range retrieval of packet stores", + sub11 = "delete the content of packet stores up to the specified time", + sub12 = "summary-report the content of packet stores", + sub13 = "packet store content summary report", + sub14 = "change the open retrieval start time tag of packet stores", + sub15 = "resume the open retrieval of packet stores", + sub16 = "suspend the open retrieval of packet stores", + sub17 = "abort the by-time-range retrieval of packet stores", + sub18 = "report the status of each packet store", + sub19 = "packet store status report", + sub20 = "create packet stores", + sub21 = "delete packet stores", + sub22 = "report the configuration of each packet store", + sub23 = "packet store configuration report", + sub24 = "copy the packets contained in a packet store selected by time window", + sub25 = "resize packet stores", + sub26 = "change a packet store type to circular", + sub27 = "change a packet store type to bounded", + sub28 = "change the virtual channel used by a packet store", + sub29 = "add structure identifiers to the housekeeping parameter report storage-control configuration", + sub30 = " delete structure identifiers from the housekeeping parameter report storage-control configuration", + sub31 = "add structure identifiers to the diagnostic parameter report storage-control configuration", + sub32 = " delete structure identifiers from the diagnostic parameter report storage-control configuration", + sub33 = "delete event definition identifiers from the event report blocking storage-control configuration", + sub34 = "add event definition identifiers to the event report blocking storage-control configuration", + sub35 = "report the content of the housekeeping parameter report storage-control configuration", + sub36 = "housekeeping parameter report storage-control configuration content report", + sub37 = "report the content of the diagnostic parameter report storage-control configuration", + sub38 = "diagnostic parameter report storage-control configuration content report", + sub39 = "report the content of the event report blocking storage-control configuration", + sub40 = "event report blocking storage-control configuration content report" + } + }, + st16 = { + name = "ST[16] (reserved)" + }, + st17 = { + name = "ST[17] test", + sub_services = { + sub1 = "perform an are-you-alive connection test", + sub2 = "are-you-alive connection test report", + sub3 = "perform an on-board connection test", + sub4 = "on-board connection test report" + } + }, + st18 = { + name = "ST[18] on-board control procedure", + sub_services = { + sub1 = "direct-load an OBCP", + sub2 = "unload an OBCP", + sub3 = "activate an OBCP", + sub4 = "stop an OBCP", + sub5 = "suspend an OBCP", + sub6 = "resume an OBCP", + sub7 = "communicate parameters to an OBCP", + sub8 = "report the execution status of each OBCP", + sub9 = "OBCP execution status report", + sub12 = "abort an OBCP", + sub13 = "load an OBCP by reference", + sub14 = "activate and execute one OBCP step", + sub15 = "resume and execute one OBCP step", + sub16 = "set the observability level of OBCPs", + sub17 = "abort all OBCPs and report", + sub18 = "aborted OBCP report", + sub19 = "load by reference and activate an OBCP", + sub20 = "stop and unload an OBCP", + sub21 = "start the OBCP engine", + sub22 = "stop the OBCP engine" + } + }, + st19 = { + name = "ST[19] event-action", + sub_services = { + sub1 = "add event-action definitions", + sub2 = "delete event-action definitions", + sub3 = "delete all event-action definitions", + sub4 = "enable event-action definitions", + sub5 = "disable event-action definitions", + sub6 = "report the status of each event-action definition", + sub7 = "event-action status report", + sub8 = "enable the event-action function", + sub9 = "disable the event-action function", + sub10 = "report event-action definitions", + sub11 = "event-action definition report" + } + }, + st20 = { + name = "ST[20] on-board parameter management", + sub_services = { + sub1 = "report parameter values", + sub2 = "parameter value report", + sub3 = "set parameter values", + sub4 = "change raw memory parameter definitions", + sub5 = "change object memory parameter definitions", + sub6 = "report parameter definitions", + sub7 = "parameter definition report" + } + }, + st21 = { + name = "ST[21] request sequencing", + sub_services = { + sub1 = "direct-load a request sequence", + sub2 = "load a request sequence by reference", + sub3 = "unload a request sequence", + sub4 = "activate a request sequence", + sub5 = "abort a request sequence", + sub6 = "report the execution status of each request sequence", + sub7 = "request sequence execution status report", + sub8 = "load by reference and activate a request sequence", + sub9 = "checksum a request sequence", + sub10 = "request sequence checksum report", + sub11 = "report the content of a request sequence", + sub12 = "request sequence content report", + sub13 = "abort all request sequences and report", + sub14 = "aborted request sequence report" + } + }, + st22 = { + name = "ST[22] position-based scheduling", + sub_services = { + sub1 = "enable the position-based schedule execution function", + sub2 = "disable the position-based schedule execution function", + sub3 = "reset the position-based schedule", + sub4 = "insert activities into the position-based schedule", + sub5 = "delete position-based scheduled activities identified by request identifier", + sub6 = "delete the position-based scheduled activities identified by a filter", + sub7 = "position-shift scheduled activities identified by request identifier", + sub8 = "position-shift the scheduled activities identified by a filter", + sub9 = "detail-report position-based scheduled activities identified by request identifier", + sub10 = "position-based schedule detail report", + sub11 = "detail-report the position-based scheduled activities identified by a filter", + sub12 = "summary-report position-based scheduled activities identified by request identifier", + sub13 = "position-based schedule summary report", + sub14 = "summary-report the position-based scheduled activities identified by a filter", + sub15 = "position-shift all scheduled activities", + sub16 = "detail-report all position-based scheduled activities", + sub17 = "summary-report all position-based scheduled activities", + sub18 = "report the status of each position-based sub-schedule", + sub19 = "position-based sub-schedule status report", + sub20 = "enable position-based sub-schedules", + sub21 = "disable position-based sub-schedules", + sub22 = "create position-based scheduling groups", + sub23 = "delete position-based scheduling groups", + sub24 = "enable position-based scheduling groups", + sub25 = "disable position-based scheduling groups", + sub26 = "report the status of each position-based scheduling group", + sub27 = "position-based scheduling group status report", + sub28 = "set the orbit number" + } + }, + st23 = { + name = "ST[23] file management", + sub_services = { + sub1 = "create a file", + sub2 = "delete a file", + sub3 = "report the attributes of a file", + sub4 = "file attribute report", + sub5 = "lock a file", + sub6 = "unlock a file", + sub7 = "find files", + sub8 = "found files report", + sub9 = "create a directory", + sub10 = "delete a directory", + sub11 = "rename a directory", + sub12 = "summary-report the content of a repository", + sub13 = "repository content summary report", + sub14 = "copy a file", + sub15 = "move a file", + sub16 = "suspend file copy operations", + sub17 = "resume file copy operations", + sub18 = "abort file copy operations", + sub19 = "suspend all file copy operations involving a repository path", + sub20 = "resume all file copy operations involving a repository path", + sub21 = "abort all file copy operations involving a repository path", + sub22 = "enable the periodic reporting of the file copy status", + sub23 = "file copy status report", + sub24 = "disable the periodic reporting of the file copy status" + } + } + } + +return pus_table \ No newline at end of file diff --git a/dissectors/css-ccsds-cortex/src/sdls_header.lua b/dissectors/css-ccsds-cortex/src/sdls_header.lua new file mode 100644 index 0000000..4f19cf8 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/sdls_header.lua @@ -0,0 +1,73 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/sdls_header.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENSE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENSE.md’. + +local sdls_header = Proto("sdls_header", "Space Data Link Security header") + +-- Preferences +sdls_header.prefs.spi_length = Pref.uint("SDLS SPI Length", 2, "Security Parameter Index size") +sdls_header.prefs.iv_length = Pref.uint("SDLS IV Length", 0, "Initialization Vector length") +sdls_header.prefs.sn_length = Pref.uint("SDLS SN Length", 0, "Sequence Number length") +sdls_header.prefs.pad_length = Pref.uint("SDLS Pad Length", 0, "Pad length") + +local prefs = sdls_header.prefs +local config = prefs + +-- Fields +local f = sdls_header.fields +f.spi = ProtoField.uint16("sdls.spi", "Security Parameter Index") +f.IV = ProtoField.bytes("sdls.iv", "Initialization Vector") +f.SN = ProtoField.bytes("sdls.sn", "Sequence Number") +f.pad = ProtoField.bytes("sdls.pad", "Pad") + +function sdls_header.dissector(buffer, pinfo, tree) + local subtree = tree:add(sdls_header, buffer(), "Space Data Link Security header") + local offset = 0 + + if SDLS_header_get_length(config) > 64 then + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, "Security header can be at most 64 bytes") + return + end + subtree:add(f.spi, buffer(offset, config.spi_length)) + local spi = buffer(offset, config.spi_length):uint() + offset = offset + config.spi_length + + subtree:add(f.IV, buffer(offset, config.iv_length)) + offset = offset + config.iv_length + + subtree:add(f.SN, buffer(offset, config.sn_length)) + offset = offset + config.sn_length + + subtree:add(f.pad, buffer(offset, config.pad_length)) + offset = offset + config.pad_length + + if spi == 0 or spi == 65535 then + -- Reserved, used for SDLS Extended Procedures + end +end + +function sdls_header.prefs_changed() + SDLS_header_set_config(nil) +end + +function SDLS_header_get_length(config) + if config ~= nil then + return config.spi_length + config.iv_length + config.sn_length + config.pad_length + end + return prefs.spi_length + prefs.iv_length + prefs.sn_length + prefs.pad_length +end + +function SDLS_header_set_config(c) + if c ~= nil then + config = c + else + config = prefs + end +end diff --git a/dissectors/css-ccsds-cortex/src/sdls_trailer.lua b/dissectors/css-ccsds-cortex/src/sdls_trailer.lua new file mode 100644 index 0000000..be5fd55 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/sdls_trailer.lua @@ -0,0 +1,49 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/sdls_trailer.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENSE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENSE.md’. + +local sdls_trailer = Proto("sdls_trailer", "Space Data Link Security trailer") + +-- Preferences +sdls_trailer.prefs.mac_length = Pref.uint("SDLS MAC Length", 16, "Message Authentication Code length") +local prefs = sdls_trailer.prefs +local config = prefs + +-- Fields +local f = sdls_trailer.fields +f.mac = ProtoField.bytes("sdls.mac", "Message Authentication Code") + +function sdls_trailer.dissector(buffer, pinfo, tree) + local subtree = tree:add(sdls_trailer, buffer(), "Space Data Link Security trailer") + local offset = 0 + + subtree:add(f.mac, buffer(offset, config.mac_length)) + offset = offset + config.mac_length +end + +function sdls_trailer.prefs_changed() + SDLS_trailer_set_config(nil) +end + +function SDLS_trailer_get_length(config) + if config ~= nil then + return config.mac_length + end + return prefs.mac_length +end + +function SDLS_trailer_set_config(c) + if c ~= nil then + config = c + else + config = prefs + end +end + diff --git a/dissectors/css-ccsds-cortex/src/space_packet_protocol.lua b/dissectors/css-ccsds-cortex/src/space_packet_protocol.lua new file mode 100644 index 0000000..478f470 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/space_packet_protocol.lua @@ -0,0 +1,213 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/space_packet_protocol.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENCE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENCE.md’. + +-- Our preferences + +local default_settings = +{ + tc_dissector = "tc_pus", -- sub-dissector to be called for TC (default PUS TC) + tm_dissector = "tm_pus", -- sub-dissector to be called for TM (default PUS TM) +} + +local space_packet_protocol = Proto("space_packet_protocol", "Space Packet Protocol") + +local f = space_packet_protocol.fields +local enums = {} +local tc_subdissector = nil +local tm_subdissector = nil + +------------------------------------------------------------------------ +-- Helper functions to get the dissectors to be used for PUS TC and TM +-- The code takes care of the fact that PUS TC and TM may not already be +-- loaded at the time the SPP dissector is loaded. Hence, this code is +-- to be called each time a SPP is to be sub-dissected. +------------------------------------------------------------------------ + +local function getTC_SubDissector() + if tc_subdissector == nil then + local sub_dissector + + tc_subdissector = Dissector.get("data") + if default_settings.tc_dissector ~= '' then + sub_dissector = Dissector.get(default_settings.tc_dissector) + if sub_dissector ~= nil then + tc_subdissector = sub_dissector + end + end + end + + return tc_subdissector +end + +local function getTM_SubDissector() + if tm_subdissector == nil then + local sub_dissector + + tm_subdissector = Dissector.get("data") + if default_settings.tm_dissector ~= '' then + sub_dissector = Dissector.get(default_settings.tm_dissector) + if sub_dissector ~= nil then + tm_subdissector = sub_dissector + end + end + end + + return tm_subdissector +end + +-- Block size +-- SPP header length is not made local since it will be used by PUS dissectors +SPP_HEADER_LENGTH = 6 + +enums.packet_type = { + [0] = "Telemetry", + [1] = "Telecommand", +} + +enums.sequence_flags = { + [0] = "Continuation segment", + [1] = "First segment", + [2] = "Last segment", + [3] = "Unsegmented data", +} + +-- Header +f.packet_version_number = ProtoField.uint16("space_packet_protocol.packet_version_number", "Version", base.DEC, nil, + 0xe000) +f.packet_type = ProtoField.uint16("space_packet_protocol.packet_type", "Type", base.DEC, enums.packet_type, 0x1000) +f.secondary_header_flag = ProtoField.uint16("space_packet_protocol.secondary_header_flag", "Secondary Header", base.DEC, + nil, 0x0800) +f.application_process_identifier = ProtoField.uint16("space_packet_protocol.application_process_identifier", "APID", + base.DEC, nil, 0x007ff) +f.sequence_flags = ProtoField.uint16("space_packet_protocol.sequence_flags", "Sequence Flags", base.DEC, + enums.sequence_flags, 0xc000) +f.packet_sequence_count = ProtoField.uint16("space_packet_protocol.packet_sequence_count", "Packet Sequence Count", + base.DEC, nil, 0x3fff) +f.packet_data_length = ProtoField.uint16("space_packet_protocol.packet_data_length", "Packet Data Length", base.DEC, nil, + 0xffff) + +------------------------- +-- Heuristic Dissector -- +------------------------- + +function space_packet_protocol_heuristic_dissector(buffer, pinfo, tree) + local length_buffer = buffer:len() + if length_buffer < 6 then return false end + local pvn = buffer(0, 1):bitfield(0, 3) + if pvn ~= 0 then return false end + + local length_spp = buffer(4, 2):uint() + if (length_spp + SPP_HEADER_LENGTH + 1) ~= length_buffer then return false end + + space_packet_protocol.dissector(buffer, pinfo, tree) + return true +end + +--------------- +-- Dissector -- +--------------- + +function space_packet_protocol.dissector(buffer, pinfo, tree) + local length_buffer = buffer:len() + if length_buffer < 6 then return end + pinfo.cols.protocol = space_packet_protocol.name + pinfo.cols.info = "Data" + + -- add a tab SPP + local tab = ByteArray.tvb(buffer:bytes(), "SPP") + + local spp_tree = tree:add(space_packet_protocol, buffer(), "Space Packet Protocol") + + local offset = 0 + + local header_buffer = buffer:range(offset, SPP_HEADER_LENGTH):tvb() + local header_tree = spp_tree:add(space_packet_protocol, header_buffer(), "Primary SPP Header") + + header_tree:add(f.packet_version_number, buffer(offset, 2)) + header_tree:add(f.packet_type, buffer(offset, 2)) + header_tree:add(f.secondary_header_flag, buffer(offset, 2)) + local secondary_header_flag = buffer(offset, 1):bitfield(4, 1) + header_tree:add(f.application_process_identifier, buffer(offset, 2)) + local apid = buffer(offset, 2):bitfield(5, 11) + offset = offset + 2 + header_tree:add(f.sequence_flags, buffer(offset, 2)) + header_tree:add(f.packet_sequence_count, buffer(offset, 2)) + offset = offset + 2 + header_tree:add(f.packet_data_length, buffer(offset, 2)) + offset = offset + 2 + + local data_buffer = buffer:range(offset, buffer:len() - offset):tvb() + -- Only Idle Data + if apid == 2047 then + local oid_data_tree = spp_tree:add(space_packet_protocol, data_buffer(), "IDLE Data") + Dissector.get("data"):call(data_buffer, pinfo, oid_data_tree) + else + if secondary_header_flag == 1 then + -- We suppose that a second header indicates a PUS frame + local subDissector + + local pus_data_tree = spp_tree:add(space_packet_protocol, data_buffer(), "Packet Utilisation Service") + type1 = buffer(0, 1):bitfield(3, 1) + if type1 == 1 then + subDissector = getTC_SubDissector() + else + subDissector = getTM_SubDissector() + end + -- Though checksum (PEC) is optional at PUS level, it is computed over the whole + -- Space Packet Protocol structure. Hence, we pass to PUS dissectors the whole SPP + subDissector(buffer, pinfo, pus_data_tree) + else + local user_data_tree = spp_tree:add(space_packet_protocol, data_buffer(), "User Data") + pinfo.private.packet_type = buffer(0, 1):bitfield(3, 1) + Dissector.get("data"):call(data_buffer, pinfo, user_data_tree) + end + end +end + +-- Defer loading custom dissector table stuff, as plugins are loaded later than built in stuff +function space_packet_protocol.init() + -- local table = DissectorTable.get("tc_frame.vc_id") + -- table:add_for_decode_as(space_packet_protocol) + -- table:add(0, space_packet_protocol) + -- DissectorTable.get("udp.port"):add_for_decode_as(table) +end + +DissectorTable.get("ccsds.pvn"):add_for_decode_as(space_packet_protocol) +DissectorTable.get("udp.port"):add_for_decode_as(space_packet_protocol) +DissectorTable.get("tcp.port"):add_for_decode_as(space_packet_protocol) +space_packet_protocol:register_heuristic("udp", space_packet_protocol_heuristic_dissector) +space_packet_protocol:register_heuristic("tcp", space_packet_protocol_heuristic_dissector) + +-- Register our preferences + +space_packet_protocol.prefs.tc_dissector = Pref.string("Space Packet TC dissector", default_settings.tc_dissector, + "Dissector to call to dissect Space Packets containing TC") + +space_packet_protocol.prefs.tm_dissector = Pref.string("Space Packet TM dissector", default_settings.tm_dissector, + "Dissector to call to dissect Space Packets containing TM") + +function space_packet_protocol.prefs_changed() + if default_settings.tc_dissector ~= space_packet_protocol.prefs.tc_dissector then + default_settings.tc_dissector = space_packet_protocol.prefs.tc_dissector + -- Force recomputing dissector reference + tc_subdissector = nil + -- Have to reload the capture file for this type of change + reload() + end + + if default_settings.tm_dissector ~= space_packet_protocol.prefs.tm_dissector then + default_settings.tm_dissector = space_packet_protocol.prefs.tm_dissector + -- Force recomputing dissector reference + tm_subdissector = nil + -- Have to reload the capture file for this type of change + reload() + end +end diff --git a/dissectors/css-ccsds-cortex/src/tc_cltu.lua b/dissectors/css-ccsds-cortex/src/tc_cltu.lua new file mode 100644 index 0000000..88dc31e --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/tc_cltu.lua @@ -0,0 +1,111 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/tc_cltu.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENCE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENCE.md’. + +local tc_cltu_protocol = Proto("TC_CLTU", "TC CLTU") + +local f = tc_cltu_protocol.fields +local enums = {} + +-- Physical Channel Name +PHYSICAL_CHANNEL_NAME = "TC" + +-- Block Size +TC_HEADER_LENGTH = 5 +SEGMENT_HEADER_LENGTH = 1 +TRAILOR_LENGTH2 = 2 +SPP_HEADER_LENGTH = 6 + +RANDOMIZE_SEQUENCE = ByteArray.new("ff399e5a68e906f56c892fa1315e08c052a8bbae4ec2c7ed66dc38d4f886503d") + +--------------- +-- Dissector -- +--------------- + +function tc_cltu_protocol.dissector(buffer, pinfo, tree) + local length = buffer:len() + print(length) + if length == 0 then return end + pinfo.cols.protocol = tc_cltu_protocol.name + + -- add a tab CLTU + local tab = ByteArray.tvb(buffer:bytes(), "TC CLTU") + + local tc_tree = tree:add(tc_cltu_protocol, buffer(), "TC SYNCHRONIZATION AND CHANNEL CODING") + + local offset = 0 + + -- Search for Start Sequence + local start_sequence = buffer(offset, 2):uint() + if start_sequence ~= 60304 then + error("Start Sequence not matching") + end + offset = offset + 2 + + -- BCH decoding + -- consider that the network is perfect + local buffer_tc_frame = ByteArray.new("", true) + local randomizer_sequence_index = 0 + local transfer_frame + + while (buffer:len() > offset) do + local bch_codeword + + -- Search for Tail Sequence + local tail_sequence = buffer(offset, 8):uint64() + if UInt64(tail_sequence) == UInt64(0xC5C5C579, 0xC5C5C5C5) then + break + end + + + transfer_frame = buffer(offset, 7) + offset = offset + 7 + + -- CHECK parity bytes + -- SKIPPED + local fec = buffer(offset, 1) + offset = offset + 1 + + buffer_tc_frame:append(transfer_frame:bytes()) + end + + if tc_cltu_protocol.prefs.randomization then + -- DeRandomization + local tc_frame_raw = buffer_tc_frame + local buffer_transfer_frame = ByteArray.new() + local byte_xored + + for i = 0, buffer_tc_frame:len() - 1 do + local byte = buffer_tc_frame:get_index(i) + + if byte == 85 then + byte_xored = 85 + else + local byte_random = RANDOMIZE_SEQUENCE:get_index(i % 254) + byte_xored = bit.bxor(byte, byte_random) + end + buffer_transfer_frame:append(ByteArray.new(string.format("%02X", byte_xored))) + end + + local transfer_frame_tvb = ByteArray.tvb(buffer_transfer_frame, "TC FRAME") + Dissector.get("tc_frame"):call(transfer_frame_tvb, pinfo, tree) + else + local tranfer_frame_tvb = ByteArray.tvb(buffer_tc_frame, "TC FRAME") + Dissector.get("tc_frame"):call(tranfer_frame_tvb, pinfo, tree) + end +end + +local udp_port = DissectorTable.get("udp.port") +local tcp_port = DissectorTable.get("tcp.port") +udp_port:add(30002, tc_cltu_protocol) +tcp_port:add(30020, tc_cltu_protocol) + +-- Register preferences +tc_cltu_protocol.prefs.randomization = Pref.bool("Randomization", false, "Whether we enable randomization or not") diff --git a/dissectors/css-ccsds-cortex/src/tc_frame.lua b/dissectors/css-ccsds-cortex/src/tc_frame.lua new file mode 100644 index 0000000..76ec2c2 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/tc_frame.lua @@ -0,0 +1,297 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/tc_frame.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENSE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENSE.md’. + +local tc_frame_protocol = Proto("TC_FRAME", "TC FRAME") + +-------------------------- +-- Register preferences -- +-------------------------- +tc_frame_protocol.prefs.encrypted = Pref.bool("Encrypted", false, "Whether the data is encrypted or not, do we continue dissecting or not") +tc_frame_protocol.prefs.segment_header = Pref.bool("Segment header", false) +tc_frame_protocol.prefs.crc = Pref.bool("CRC", false, "Cyclic Redundancy Check") + +-- Other preferences +tc_frame_protocol.prefs.check_crc = Pref.bool("Check Frame CRC", false, "Whether we check TC Frame CRC or not") + +local PREFERENCES = 0 +local DEFAULT_TC = 1 +local NO_SDLS = 2 +local sdls_config_table = { + {1, "Preferences", PREFERENCES}, + {2, "Default TC", DEFAULT_TC}, + {3, "No SDLS", NO_SDLS} +} +tc_frame_protocol.prefs.sdls_config = Pref.enum("SDLS configuration", nil, "SDLS configuration, overwrites preferences", sdls_config_table) +local sdls_configs = { + -- Based on Preferences + nil, + -- Default TC + { + spi_length = 2, + iv_length = 0, + sn_length = 4, + pad_length = 0, + mac_length = 16, + }, + -- No SDLS + { + spi_length = 0, + iv_length = 0, + sn_length = 0, + pad_length = 0, + mac_length = 0, + }, +} + +local prefs = tc_frame_protocol.prefs + +------------------- +-- Define fields -- +------------------- +local f = tc_frame_protocol.fields +local enums = {} + +-- Block Size +local TC_HEADER_LENGTH = 5 +local SEGMENT_HEADER_LENGTH = 1 +local SPP_HEADER_LENGTH = 6 +local FEFC_LENGTH = 2 + +enums.bypass_flag = { + [0] = "Type-A", + [1] = "Type-B", +} + +enums.control_command_flag = { + [0] = "Type-D", + [1] = "Type-C", +} + +enums.sequence_flags = { + [0] = "Continuation segment", + [1] = "First segment", + [2] = "Last segment", + [3] = "Unsegmented data", +} + +-- Header Fields +f.transfer_frame_version_number = ProtoField.uint16("tc_frame_protocol.transfer_frame_version_number", "Version", + base.DEC, nil, 0xc000) +f.bypass_flag = ProtoField.uint16("tc_frame_protocol.bypass_flag", "Bypass", base.DEC, enums.bypass_flag, 0x2000) +f.control_command_flag = ProtoField.uint16("tc_frame_protocol.control_command_flag", "Control Command", base.DEC, + enums.control_command_flag, 0x1000) +f.rsvp_space = ProtoField.uint16("tc_frame_protocol.rsvp_space", "Rsvp Space", base.DEC, nil, 0x0c00) +f.spacecraft_id = ProtoField.uint16("tc_frame_protocol.spacecraft_id", "Spacecraft ID", base.DEC, nil, 0x03ff) +f.vc_id = ProtoField.uint16("tc_frame_protocol.vc_id", "VC ID", base.DEC, nil, 0xfc00) +f.frame_length = ProtoField.uint16("tc_frame_protocol.frame_length", "Frame Length", base.DEC, nil, 0x03ff) +f.frame_sequence_number = ProtoField.uint8("tc_frame_protocol.frame_sequence_number", "Frame Sequence Number", base.DEC, + nil, 0xff) + +-- Control Command Fields +f.control_command = ProtoField.string("tc_frame_protocol.control_command", "Command") +f.receiver_frame_sequence_number = ProtoField.uint16("tc_frame_protocol.receiver_frame_sequence_number", + "Receiver Frame Sequence Number", base.DEC) + +-- Sequence Fields +f.sequence_flags = ProtoField.uint8("tc_frame_protocol.sequence_flags", "Sequence Flags", base.DEC, enums.sequence_flags, + 0xc0) +f.map_id = ProtoField.uint8("tc_frame_protocol.map_id", "Map ID", base.DEC, nil, 0x3f) + +-- Checksum TC Field +f.checksum = ProtoField.uint16("tc_frame_protocol.frame_error_control_field", "Checksum", base.HEX) + +------------ +-- Helper -- +------------ +local function parse_user_data(tree, pinfo, buffer) + if buffer:len() == 0 then return end + if buffer:len() < 6 then + Dissector.get("data"):call(buffer, pinfo, tree) + return + end + + -- Determine the type of packet based on the Packer Version number (PVN) + -- https://sanaregistry.org/r/packet_version_number/ + local packet_version_number = buffer(0, 1):bitfield(0, 3) + + if packet_version_number == 0 then + local user_data_length = buffer(4, 2):uint() + local frame_length = SPP_HEADER_LENGTH + user_data_length + -- More than one packet + if buffer:len() > frame_length then + local buffer_leftover = buffer:range(frame_length, buffer:len() - (frame_length + 1)):tvb() + local packet_buffer = buffer:range(0, frame_length + 1):tvb() + Dissector.get("space_packet_protocol"):call(packet_buffer, pinfo, tree) + parse_user_data(tree, pinfo, buffer_leftover) + elseif buffer:len() < frame_length then + -- TODO: reconstruct the packet + Dissector.get("space_packet_protocol"):call(buffer, pinfo, tree) + elseif buffer:len() == frame_length then + Dissector.get("space_packet_protocol"):call(buffer, pinfo, tree) + end + elseif packet_version_number == 7 then + Dissector.get("encapsulation_packet_protocol"):call(buffer, pinfo, tree) + else + -- Unknown packet + Dissector.get("data"):call(buffer, pinfo, tree) + end +end + +--------------- +-- Dissector -- +--------------- + +function tc_frame_protocol.dissector(buffer, pinfo, tree) + local subtree_name = "TC Space Data Link Frame" + + if prefs.crc then + subtree_name = subtree_name .. " + CRC" + end + if prefs.segment_header then + subtree_name = subtree_name .. " + Segment header" + end + + pinfo.cols.protocol = tc_frame_protocol.name + pinfo.private.channel_type = 1 + + local subtree = tree:add(tc_frame_protocol, buffer(), subtree_name) + + local offset = 0 + + local header_buffer = buffer:range(offset, TC_HEADER_LENGTH):tvb() + local header_tree = subtree:add(tc_frame_protocol, header_buffer(), "Transfer Primary Frame Header ") + + header_tree:add(f.transfer_frame_version_number, buffer(offset, 2)) + local tfvn = buffer(offset, 2):bitfield(0, 2) + header_tree:add(f.bypass_flag, buffer(offset, 2)) + header_tree:add(f.control_command_flag, buffer(offset, 2)) + header_tree:add(f.rsvp_space, buffer(offset, 2)) + header_tree:add(f.spacecraft_id, buffer(offset, 2)) + local sc_id = buffer(offset, 2):bitfield(6, 10) + offset = offset + 2 + header_tree:add(f.vc_id, buffer(offset, 2)) + local vc_id = buffer(offset, 2):bitfield(0, 6) + header_tree:add(f.frame_length, buffer(offset, 2)) + local frame_length = buffer(offset, 2):bitfield(6, 10) + offset = offset + 2 + header_tree:add(f.frame_sequence_number, buffer(4, 1)) + offset = offset + 1 + + local control_command_flag = buffer(0, 1):bitfield(3, 1) + local control_command_flag_type = enums.control_command_flag[control_command_flag] + + -- Search for fill bits (0x55) + -- The Synchronization and Channel Coding Sublayer could require the introduction + -- of these fill data in the encoding process; they are not removed by the decoding + -- process. Removal of fill is the responsibility of the sublayer above, which delimits + -- the end of the Transfer Frame(s) and discards extraneous bits (e.g., fill). + + if (frame_length + 1) < buffer:len() then + buffer = buffer:range(0, frame_length + 1):tvb() + end + + -- Control Command Information (Type-C) + if control_command_flag_type == "Type-C" then + local control_command_buffer = buffer:range(TC_HEADER_LENGTH):tvb() + local control_command_tree = subtree:add(tc_frame_protocol, control_command_buffer(), "Control Command") + + -- As there is no explicit header information on whether the command is unlock or set V(R), the dissector evaluate the size of the request + -- UNLOCK: 1 octet + -- SET V(R): 3 octets + + -- Unlock + if control_command_buffer:len() == 1 then + pinfo.cols.info = "Control Command: Unlock" + control_command_tree:add(f.control_command, "Unlock") + -- Set V(R) + elseif control_command_buffer:len() == 3 then + pinfo.cols.info = "Control Command: Set V(R)" + control_command_tree:add(f.control_command, "set V(R)") + offset = offset + 2 + control_command_tree:add(f.receiver_frame_sequence_number, buffer(offset, 1)) + offset = offset + 1 + else + error("Failed to parse Control Command") + end + + -- Frame Data Unit (Type-D) + elseif control_command_flag_type == "Type-D" then + pinfo.cols.info = "Data" + ------------------------------ + -- Process preferences here -- + ------------------------------ + if prefs.segment_header then + local segment_buffer = buffer:range(offset, SEGMENT_HEADER_LENGTH):tvb() + local segment_tree = subtree:add(tc_frame_protocol, segment_buffer(), "Segment Header") + segment_tree:add(f.sequence_flags, buffer(offset, 1)) + segment_tree:add(f.map_id, buffer(offset, 1)) + offset = offset + SEGMENT_HEADER_LENGTH + end + + -- SDLS, we set some stuff here because we need it early in the dissection process + local sdls_configuration = sdls_configs[prefs.sdls_config+1] + local sdls_header_length = SDLS_header_get_length(sdls_configuration) + local sdls_trailer_length = SDLS_trailer_get_length(sdls_configuration) + SDLS_header_set_config(sdls_configuration) + SDLS_trailer_set_config(sdls_configuration) + + -- SDLS header + if sdls_header_length > 0 then + Dissector.get("sdls_header"):call(buffer:range(offset, sdls_header_length):tvb(), pinfo, subtree) + offset = offset + sdls_header_length + end + + -- Data + local data_offset = 0 + if prefs.crc then + data_offset = data_offset + FEFC_LENGTH + end + data_offset = data_offset + sdls_trailer_length + + local data_frame_buffer = buffer:range(offset, buffer:len() - offset - data_offset):tvb() + + if prefs.encrypted then + local encrypted_payload_tree = subtree:add(tc_frame_protocol, data_frame_buffer(), "Encrypted Payload") + Dissector.get("data"):call(data_frame_buffer, pinfo, encrypted_payload_tree) + else + parse_user_data(subtree, pinfo, data_frame_buffer) + end + offset = buffer:len() - data_offset + + -- SDLS trailer -> authentication tag + if sdls_trailer_length > 0 then + Dissector.get("sdls_trailer"):call(buffer:range(offset, sdls_trailer_length):tvb(), pinfo, subtree) + offset = offset + sdls_trailer_length + end + + -- CRC / Frame error control + if prefs.crc then + local fecf_buffer = buffer:range(offset, FEFC_LENGTH):tvb() + offset = offset + FEFC_LENGTH + local frame_error_control_field_tree = subtree:add(tc_frame_protocol, fecf_buffer(), + "Frame Error Control Field") + local crcVerification = " [unverified]" + if prefs.check_crc == true then + local crc = crc16(buffer) + crcVerification = " [OK]" + if crc ~= 0 then + crcVerification = " [KO]" + end + end + frame_error_control_field_tree:add(f.checksum, fecf_buffer()):append_text(crcVerification) + end + end +end + +local udp_port = DissectorTable.get("udp.port") +local tcp_port = DissectorTable.get("tcp.port") +udp_port:add(60001, tc_frame_protocol) +tcp_port:add(60010, tc_frame_protocol) diff --git a/dissectors/css-ccsds-cortex/src/tc_pus.lua b/dissectors/css-ccsds-cortex/src/tc_pus.lua new file mode 100644 index 0000000..5ce681d --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/tc_pus.lua @@ -0,0 +1,130 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/tc_pus.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENCE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENCE.md’. + +-- Optional verification of PEC field + +require("crc16") + +local default_settings = +{ + check_pec = false, -- whether we check Space Packets PEC or not +} + +local pus_tc_frame_protocol = Proto("TC_PUS", "TC Packet utilization Service") + +local f = pus_tc_frame_protocol.fields +local enums = {} + +-- import services table +local services = require("pus_service_table") + +-- Block Size +local TC_PUS_HEADER_LENGTH = 5 +local PEC_LENGTH = 2 + +-- Header field +f.packet_version_number = ProtoField.uint8("pus_tc.packet_version_number", "PVN", base.DEC, nil, 0xf0) +f.acknowledgment_flag = ProtoField.uint8("pus_tc.acknowledgment_flag", "Acknowledgment Flag", base.DEC, nil, 0x0f) +f.service_type_id = ProtoField.uint8("pus_tc.service_type_id", "Service Type ID", base.DEC) +f.message_subtype_id = ProtoField.uint8("pus_tc.message_subtype_id", "Message Subtype ID", base.DEC) +f.message_type_counter = ProtoField.uint16("pus_tc.message_type_counter", "Message Type Counter", base.DEC) +f.source_id = ProtoField.uint16("pus_tc.source_id", "Source ID", base.DEC) +f.destination_id = ProtoField.uint16("pus_tc.destination_id", "Destination ID", base.DEC) +f.spacecraft_time_reference_number = ProtoField.uint8("pus_tm.spacecraft_time_reference_number", + "Spacecraft Time Reference Number", base.DEC, nil, 0x0f) +f.time = ProtoField.uint64("pus_tc.time", "Time", base.DEC) +-- PEC field +f.pec = ProtoField.uint16("pus_tc.packet_error_control", "Packet Error Control", base.HEX) + + +local function get_service_name(buffer) + local service = "st" .. buffer(1, 1):uint() + local service_name = "Unknown" + if services[service] ~= nil then + service_name = services[service].name + end + return service_name +end + +local function get_sub_service_name(buffer) + local service = "st" .. buffer(1, 1):uint() + local sub_service = "sub" .. buffer(2, 1):uint() + local sub_service_name = "Unknown" + if services[service] ~= nil and service ~= "st10" and services[service].sub_services[sub_service] ~= nil then + sub_service_name = services[service].sub_services[sub_service] + end + return sub_service_name +end + +--------------- +-- Dissector -- +--------------- + +function pus_tc_frame_protocol.dissector(buffer, pinfo, tree) + -- Skip SPP header (since we have passed the whole encapsulating SPP for PEC verification) + local offset = SPP_HEADER_LENGTH + local length = buffer:len() - SPP_HEADER_LENGTH + + if length == 0 then return end + + pinfo.cols.protocol = pus_tc_frame_protocol.name + + -- add a tab PUS + local tab = ByteArray.tvb(buffer:bytes(offset, length), "PUS") + + local user_data_buffer = nil + local header_length = TC_PUS_HEADER_LENGTH + local header_buffer = buffer:range(offset, header_length) + local header_tree = tree:add(pus_tc_frame_protocol, header_buffer(), "Header") + + header_tree:add(f.packet_version_number, buffer(offset, 1)) + header_tree:add(f.acknowledgment_flag, buffer(offset, 1)) + offset = offset + 1 + header_tree:add(f.service_type_id, buffer(offset, 1)):append_text(" (" .. get_service_name(header_buffer) .. ")") + offset = offset + 1 + header_tree:add(f.message_subtype_id, buffer(offset, 1)):append_text(" (" .. + get_sub_service_name(header_buffer) .. ")") + offset = offset + 1 + header_tree:add(f.source_id, buffer(offset, 1)) + offset = offset + 1 + + user_data_buffer = buffer:range(offset, length - header_length - PEC_LENGTH):tvb() + + local data_tree = tree:add(pus_tc_frame_protocol, user_data_buffer(), "Service data") + Dissector.get("data"):call(user_data_buffer, pinfo, data_tree) + + offset = offset + user_data_buffer:len() + + -- Optional PEC verification. Can be desactivated if needed for performance reasons. + local pecVerification = " [unverified]" + -- PEC is computed over the whole encapsulating SPP + local crc = crc16(buffer) + if default_settings.check_pec == true then + pecVerification = " [OK]" + if crc ~= 0 then + pecVerification = " [KO]" + end + end + tree:add(f.pec, buffer(offset, PEC_LENGTH)):append_text(pecVerification) +end + +local udp_port = DissectorTable.get("udp.port") +local tcp_port = DissectorTable.get("tcp.port") +udp_port:add(50000, pus_tc_frame_protocol) +tcp_port:add(50000, pus_tc_frame_protocol) + +-- Register our preferences +pus_tc_frame_protocol.prefs.check_pec = Pref.bool("Check Space Packet PEC", default_settings.check_pec, + "Whether we check Space Packet PEC or not") + +function pus_tc_frame_protocol.prefs_changed() + default_settings.check_pec = pus_tc_frame_protocol.prefs.check_pec +end diff --git a/dissectors/css-ccsds-cortex/src/tm_frame.lua b/dissectors/css-ccsds-cortex/src/tm_frame.lua new file mode 100644 index 0000000..2b53654 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/tm_frame.lua @@ -0,0 +1,502 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/tm_frame.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENSE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENSE.md’. + +local tm_frame_protocol = Proto("tm_frame", "TM FRAME") + +-------------------------- +-- Register preferences -- +-------------------------- +tm_frame_protocol.prefs.encrypted = Pref.bool("Encrypted", false, "Whether the data is encrypted or not, do we continue dissecting or not") +tm_frame_protocol.prefs.crc = Pref.bool("CRC", false, "Cyclic Redundancy Check") + +-- Other preferences +tm_frame_protocol.prefs.check_crc = Pref.bool("Check Frame CRC", false, "Whether we check TM Frame CRC or not") + +local PREFERENCES = 0 +local DEFAULT_TM = 1 +local NO_SDLS = 2 +local sdls_config_table = { + {1, "Preferences", PREFERENCES}, + {2, "Default TM", DEFAULT_TM}, + {3, "No SDLS", NO_SDLS} +} +tm_frame_protocol.prefs.sdls_config = Pref.enum("SDLS configuration", nil, "SDLS configuration, overwrites preferences", sdls_config_table) +local sdls_configs = { + -- Based on Preferences + nil, + -- DEFAULT TM + { + spi_length = 2, + iv_length = 12, + sn_length = 0, + pad_length = 0, + mac_length = 16, + }, + -- No SDLS + { + spi_length = 0, + iv_length = 0, + sn_length = 0, + pad_length = 0, + mac_length = 0, + }, +} + +local prefs = tm_frame_protocol.prefs + +------------------- +-- Define fields -- +------------------- +local f = tm_frame_protocol.fields + +-- Block Size +local HEADER_LENGTH = 6 +local OCF_LENGTH = 4 +local FECF_LENGTH = 2 +local FRAME_STATUS_LENGTH = 2 +local HEADER_SPP_LENGTH = 6 + +local ONLY_IDLE_DATA = 2046 +local CONTINUOUS_PACKET = 2047 +local VC_PACKET_SERVICE = 0 +local VC_ACCCESS_SERVICE = 1 + +-- Header Fields +f.transfer_frame_version_number = ProtoField.uint16("tm_frame_protocol.transfer_frame_version_number", + "Transfer Frame Version Number", base.DEC, nil, 0xc000) +f.spacecraft_id = ProtoField.uint16("tm_frame_protocol.spacecraft_id", "Spacecraft ID", base.DEC, nil, 0x3ff0) +f.vc_id = ProtoField.uint16("tm_frame_protocol.vc_id", "Virtual Channel ID", base.DEC, nil, 0x000e) +f.ocf_flag = ProtoField.uint16("tm_frame_protocol.ocf_flag", "OCF Flag", base.DEC, nil, 0x0001) +f.master_channel_frame_count = ProtoField.uint8("tm_frame_protocol.master_channel_frame_count", + "Master Channel Frame Count", base.DEC, nil, 0xff) +f.virtual_channel_frame_count = ProtoField.uint8("tm_frame_protocol.virtual_channel_frame_count", + "Virtual Channel Frame Count", base.DEC, nil, 0xff) +f.transfer_frame_data_field_status = ProtoField.uint16("tm_frame_protocol.transfer_frame_data_field_status", + "Transfer Frame Data Field Status", base.DEC, nil, 0xffff) + +-- Transfer Frame Data Field Status Fields +f.transfer_frame_secondary_header_flag = ProtoField.uint16("tm_frame_protocol.transfer_frame_secondary_header_flag", + "Transfer Frame Secondary Header Flag", base.DEC, nil, 0x8000) +f.synch_flag = ProtoField.uint16("tm_frame_protocol.synch_flag", "Synch Flag", base.DEC, nil, 0x4000) +f.packet_order_flag = ProtoField.uint16("tm_frame_protocol.packet_order_flag", "Packet Order Flag", base.DEC, nil, 0x2000) +f.segment_length_id = ProtoField.uint16("tm_frame_protocol.segment_length_id", "Segment Length ID", base.DEC, nil, 0x1800) +f.first_header_pointer = ProtoField.uint16("tm_frame_protocol.first_header_pointer", "First Header Pointer", base.DEC, + nil, 0x07ff) + +f.transfer_frame_secondary_header_version_number = ProtoField.uint8( + "tm_frame_protocol.transfer_frame_secondary_header_version_number", "Version Number", base.DEC, nil, 0xc0) +f.transfer_frame_secondary_header_length = ProtoField.uint8("tm_frame_protocol.transfer_frame_secondary_header_length", + "Length", base.DEC, nil, 0x2F) + +-- FECF field +f.checksum = ProtoField.uint16("tm_frame_protocol.frame_error_control_field", "Checksum", base.HEX) + +-- CLCW fields +f.control_world_type = ProtoField.uint8("tm_frame_protocol.control_world_type", "Control World Type", base.DEC, nil, 0x80) +f.clcw_version_number = ProtoField.uint8("tm_frame_protocol.clcw_version_number", "clcw Version Number", base.DEC, nil, + 0x60) +f.status_field = ProtoField.uint8("tm_frame_protocol.status_field", "Status Field", base.DEC, nil, 0x1c) +f.cop_in_effect = ProtoField.uint8("tm_frame_protocol.cop_in_effect", "COP In Effect", base.DEC, nil, 0x03) +f.vc_id_clcw = ProtoField.uint8("tm_frame_protocol.vc_id_clcw", "VC ID", base.DEC, nil, 0xfc) +f.reserved_space = ProtoField.uint8("tm_frame_protocol.reserved_space", "Reserved Space", base.DEC, nil, 0x03) +f.flags = ProtoField.uint8("tm_frame_protocol.flags", "Flags", base.DEC, nil, 0x3e) +f.farm_b_counter = ProtoField.uint8("tm_frame_protocol.farm_b_counter", "Farm-B Counter", base.DEC, nil, 0x06) +f.reserved_space2 = ProtoField.uint8("tm_frame_protocol.reserved_space2", "Reserved Space2", base.DEC, nil, 0x01) +f.report_value = ProtoField.uint8("tm_frame_protocol.report_value", "Report Value", base.DEC, nil, 0xff) + +-- Flags Fields in Communications Link Control Word +f.no_rf_available = ProtoField.uint8("tm_frame_protocol.no_rf_available", "No RF Available", base.DEC, nil, 0x80) +f.no_bit_lock = ProtoField.uint8("tm_frame_protocol.no_bit_lock", "No Bit Lock", base.DEC, nil, 0x40) +f.lock_out = ProtoField.uint8("tm_frame_protocol.lock_out", "Lock Out", base.DEC, nil, 0x20) +f.wait = ProtoField.uint8("tm_frame_protocol.wait", "Wait", base.DEC, nil, 0x10) +f.retransmit = ProtoField.uint8("tm_frame_protocol.retransmit", "retransmit", base.DEC, nil, 0x08) + +-- Frame Security Report Fields +f.fsr_version_number = ProtoField.uint8("tm_frame_protocol.fsr_version_number", "FSR Version Number", base.DEC, nil, 0x70) +f.alarm_field = ProtoField.uint8("tm_frame_protocol.alarm_field", "Alarm Field", base.DEC, nil, 0x08) +f.bad_sn_flag = ProtoField.uint8("tm_frame_protocol.bad_sn_flag", "Bad SN Flag", base.DEC, nil, 0x04) +f.bad_mac_flag = ProtoField.uint8("tm_frame_protocol.bad_mac_flag", "Bad MAC Flag", base.DEC, nil, 0x02) +f.bad_sa_flag = ProtoField.uint8("tm_frame_protocol.bad_sa_flag", "Bad SA Flag", base.DEC, nil, 0x01) +f.last_spi_used = ProtoField.uint16("tm_frame_protocol.last_spi_used", "Last SPI Used", base.DEC) +f.sn_value = ProtoField.uint8("tm_frame_protocol.sn_value", "SN Value", base.DEC) + +------------ +-- Helper -- +------------ + +require("crc16") + +-- Reassembly buffers for SP (one per VC except Idle) +local assemblyBuff = {} +local sp_assembly_buffs = {} +local assembled_sp_tvb +local fec_buffer_length = 0 + +-- Cache data dissector to avoid many Dissector.get() calls +local data_dis = Dissector.get("data") + +-- Empty reassembly buffer +local function clear_asm_buffer(vc_id) + assemblyBuff[vc_id]:set_size(0) +end + +-- Append bytes to an assembly buffer +local function add_to_asm_buff(vc_id, data_buffer) + -- Create reassembly buffer for this VC if not yet done + if assemblyBuff[vc_id] == nil then + assemblyBuff[vc_id] = data_buffer:bytes() + else + assemblyBuff[vc_id]:append(data_buffer:bytes()) + end +end + +-- Get number of bytes in reassembly buffer +local function get_bytes_in_asm_buffer(vc_id) + return assemblyBuff[vc_id]:len() +end + +local function parse_user_data(tree, pinfo, buffer, vc_id) + local length_buffer = buffer:len() + -- Use of a while loop to avoid recursion + local bytes_consumed = 0 + while bytes_consumed < length_buffer do + local remaining_length = length_buffer - bytes_consumed + -- Here, we are sure to have at least one byte and we can read the PVN + -- Packet Version number (PVN) and adapt our processing accordingly + -- https://sanaregistry.org/r/packet_version_number/ + local packet_version_number = buffer(bytes_consumed,1):bitfield(0,3) + -- Normally, according to 132.0-B-3, section 4.1.4.4, the same TM transfer frame + -- shall not mix SP with VCA_SDU, but our code is generic enough. + if packet_version_number == 0 then + -- Here we have a source packet for sure. + local sp_length + if remaining_length < HEADER_SPP_LENGTH then + -- Not enough space to contain SP length. The SP is thus obviously + -- fragmented over at least two frames including this one. Trick to make + -- sure that remaining length will never be greater than the sp_length + sp_length = HEADER_SPP_LENGTH + else + -- sp_length is more meaningfull than frame length and it is + -- better to add 1 in the logic below (the user data length is indeed one more). + local user_data_length = buffer(bytes_consumed+4,2):uint() + 1 + sp_length = HEADER_SPP_LENGTH + user_data_length + end + + if remaining_length >= sp_length then + -- One packet or more. Advance dissection by 1 SP + local packet_buffer = buffer:range(bytes_consumed,sp_length):tvb() + Dissector.get("space_packet_protocol"):call(packet_buffer,pinfo,tree) + bytes_consumed = bytes_consumed + sp_length + else + local packet_buffer = buffer:range(bytes_consumed,remaining_length):tvb() + data_dis:call(packet_buffer,pinfo,tree) + if sp_assembly_buffs[pinfo.number] == nil then + -- Start reconstructing the packet + add_to_asm_buff(vc_id, packet_buffer:range()) + end + return + end + elseif packet_version_number == 7 then + local packet_buffer = buffer:range(bytes_consumed,remaining_length):tvb() + Dissector.get("encapsulation_packet_protocol"):call(packet_buffer,pinfo,tree) + return + else + -- Unknown packet + local packet_buffer = buffer:range(bytes_consumed,remaining_length):tvb() + data_dis:call(packet_buffer,pinfo,tree) + return + end + end +end + +--------------- +-- Dissector -- +--------------- + +function tm_frame_protocol.init() + -- Create an assembly buffer for each VC but the idle one + for i=0,6 do + assemblyBuff[i] = ByteArray.new() + end + sp_assembly_buffs = {} + if tm_frame_protocol.prefs.crc then + fec_buffer_length = FECF_LENGTH + end +end + +function tm_frame_protocol.dissector(buffer, pinfo, tree) + local subtree_name = "TM Space Data Link Frame" + if tm_frame_protocol.prefs.crc then + subtree_name = subtree_name .. " + CRC" + end + pinfo.cols.protocol = tm_frame_protocol.name + + local subtree = tree:add(tm_frame_protocol, buffer(), subtree_name) + + local offset = 0 + + local header_buffer = buffer:range(offset, HEADER_LENGTH):tvb() + local header_tree = subtree:add(tm_frame_protocol, header_buffer(), "Transfer Frame Primary Header") + header_tree:add(f.transfer_frame_version_number, buffer(offset, 2)) + local tfvn = buffer(offset, 2):bitfield(0, 2) + header_tree:add(f.spacecraft_id, buffer(offset, 2)) + local sc_id = buffer(offset, 2):bitfield(2, 10) + header_tree:add(f.vc_id, buffer(offset, 2)) + local vc_id = buffer(offset, 2):bitfield(12, 3) + header_tree:add(f.ocf_flag, buffer(offset, 2)) + local ocf_flag = buffer(offset, 2):bitfield(15, 1) + offset = offset + 2 + header_tree:add(f.master_channel_frame_count, buffer(offset, 1)) + offset = offset + 1 + header_tree:add(f.virtual_channel_frame_count, buffer(offset, 1)) + offset = offset + 1 + + local frame_status_buffer = buffer:range(offset, FRAME_STATUS_LENGTH):tvb() + local frame_status_tree = header_tree:add(tm_frame_protocol, frame_status_buffer(), "Frame Data Fields Status") + + frame_status_tree:add(f.transfer_frame_secondary_header_flag, buffer(offset, 2)) + local secondary_header_flag = buffer(offset, 1):bitfield(0, 1) + frame_status_tree:add(f.synch_flag, buffer(offset, 2)) + local synch_flag = buffer(offset, 1):bitfield(1, 1) + frame_status_tree:add(f.packet_order_flag, buffer(offset, 2)) + frame_status_tree:add(f.segment_length_id, buffer(offset, 2)) + frame_status_tree:add(f.first_header_pointer, buffer(offset, 2)) + local first_header_pointer = buffer(offset, 2):bitfield(5, 11) + offset = offset + 2 + + local second_header_data_buffer = nil + + -- Transfer Frame Secondary Header + if secondary_header_flag == 1 then + local second_header_data_length = buffer(offset, 1):bitfield(2, 6) + local second_header_buffer = buffer:range(offset, 1 + second_header_data_length):tvb() + local second_header_tree = subtree:add(tm_frame_protocol, second_header_buffer(), + "Transfer Frame Secondary Header") + + second_header_tree:add(f.transfer_frame_secondary_header_version_number, buffer(offset, 1)) + second_header_tree:add(f.transfer_frame_secondary_header_length, buffer(offset, 1)) + local second_header_data_length = buffer(offset, 1):bitfield(2, 6) + offset = offset + 1 + + second_header_data_buffer = buffer:range(offset, second_header_data_length):tvb() + local second_header_tree = second_header_tree:add(tm_frame_protocol, second_header_data_buffer(), + "Transfer Frame Secondary Data") + Dissector.get("data"):call(second_header_data_buffer, pinfo, second_header_tree) + offset = offset + second_header_data_length + end + + local ocf_buffer_length = 0 + if ocf_flag == 1 then + ocf_buffer_length = OCF_LENGTH + end + + -- SDLS, we set some stuff here because we need it early in the dissection process + local sdls_configuration = sdls_configs[prefs.sdls_config + 1] + local sdls_header_length = SDLS_header_get_length(sdls_configuration) + local sdls_trailer_length = SDLS_trailer_get_length(sdls_configuration) + SDLS_header_set_config(sdls_configuration) + SDLS_trailer_set_config(sdls_configuration) + + -- SDLS header + if sdls_header_length > 0 then + Dissector.get("sdls_header"):call(buffer:range(offset, sdls_header_length):tvb(), pinfo, subtree) + offset = offset + sdls_header_length + end + ---------- + -- Data -- + ---------- + local data_offset = ocf_buffer_length + -- NOTE: old frame 03, was not consistent with the rest, it added FECF_LENGTH only, while the others only add it when CRC is enabled + -- It also means it was not adding MAC_LENGTH, even though it has a MAC, so I think a bug was fixed here + -- Otherwise this is an indicator of a change from the previous version, and it can be reversed + if tm_frame_protocol.prefs.crc then + data_offset = data_offset + FECF_LENGTH + end + data_offset = data_offset + sdls_trailer_length + + -- NOTE: only the old frame_01: moo = NONE and no CRC, adds first_header_pointer here, i don't know why, so i removed it for now + local data_frame_buffer = buffer:range(offset, buffer:len() - offset - data_offset):tvb() + if prefs.encrypted then + -------------------- + -- Encrypted data -- + -------------------- + local encrypted_payload_tree = subtree:add(tm_frame_protocol, data_frame_buffer(), "Encrypted Payload") + data_dis:call(data_frame_buffer, pinfo, encrypted_payload_tree) + offset = buffer:len() - data_offset + else + ------------------------------ + -- Plaintext data, parse it -- + ------------------------------ + -- Frame Data Field + -- Evaluate the type of channel: Packet or VCA_SDU + if synch_flag == VC_PACKET_SERVICE then + -- TO CHECK + -- 4.1.2.7.6.3 + -- If the last Packet in the Transfer Frame Data Field of Transfer Frame N spills over into Frame + -- M of the same Virtual Channel (N authentication tag + if sdls_trailer_length > 0 then + Dissector.get("sdls_trailer"):call(buffer:range(offset, sdls_trailer_length):tvb(), pinfo, subtree) + offset = offset + sdls_trailer_length + end + + -- Operational Control Field + if ocf_flag == 1 then + local ocf_buffer = buffer:range(offset, OCF_LENGTH) + local control_word_type = buffer(offset, 1):bitfield(0, 1) + + if control_word_type == 0 then + -- Type 1 OCF / CLCW + local ocf_tree = subtree:add(tm_frame_protocol, ocf_buffer(), "OCF CLCW") + ocf_tree:add(f.control_world_type, buffer(offset, 1)) + ocf_tree:add(f.clcw_version_number, buffer(offset, 1)) + ocf_tree:add(f.status_field, buffer(offset, 1)) + ocf_tree:add(f.cop_in_effect, buffer(offset, 1)) + offset = offset + 1 + ocf_tree:add(f.vc_id_clcw, buffer(offset, 1)) + ocf_tree:add(f.reserved_space, buffer(offset, 1)) + offset = offset + 1 + + local flag_tree = ocf_tree:add(tm_frame_protocol, buffer(offset, 1), "Flags") + flag_tree:add(f.no_rf_available, buffer(offset, 1)) + flag_tree:add(f.no_bit_lock, buffer(offset, 1)) + flag_tree:add(f.lock_out, buffer(offset, 1)) + flag_tree:add(f.wait, buffer(offset, 1)) + flag_tree:add(f.retransmit, buffer(offset, 1)) + + ocf_tree:add(f.farm_b_counter, buffer(offset, 1)) + ocf_tree:add(f.reserved_space2, buffer(offset, 1)) + offset = offset + 1 + ocf_tree:add(f.report_value, buffer(offset, 1)) + offset = offset + 1 + elseif control_word_type == 1 then + local bit1_version_number = buffer(offset, 1):bitfield(1, 1) + if bit1_version_number == 0 then + -- Project specific + local project_specific_tree = subtree:add(tm_frame_protocol, ocf_buffer(), + "Operational Control Field Project Specific") + data_dis:call(data_frame_buffer, pinfo, project_specific_tree) + elseif bit1_version_number == 1 then + -- Type 2 OCF + -- SDLS FSR + local fsr_tree = subtree:add(tm_frame_protocol, ocf_buffer(), "OCF: Frame Security Report") + fsr_tree:add(f.control_world_type, buffer(offset, 1)) + fsr_tree:add(f.fsr_version_number, buffer(offset, 1)) + fsr_tree:add(f.alarm_field, buffer(offset, 1)) + fsr_tree:add(f.bad_sn_flag, buffer(offset, 1)) + fsr_tree:add(f.bad_mac_flag, buffer(offset, 1)) + fsr_tree:add(f.bad_sa_flag, buffer(offset, 1)) + offset = offset + 1 + fsr_tree:add(f.last_spi_used, buffer(offset, 2)) + offset = offset + 2 + fsr_tree:add(f.sn_value, buffer(offset, 1)) + offset = offset + 1 + end + end + end + + -- CRC / Frame error control + if tm_frame_protocol.prefs.crc then + local fecf_buffer = buffer:range(offset, FECF_LENGTH):tvb() + offset = offset + FECF_LENGTH + local frame_error_control_field_tree = subtree:add(tm_frame_protocol, fecf_buffer(), + "Frame Error Control Field") + local crcVerification = " [unverified]" + if tm_frame_protocol.prefs.check_crc == true then + local crc = crc16(buffer) + crcVerification = " [OK]" + if crc ~= 0 then + crcVerification = " [KO]" + end + frame_error_control_field_tree:add(f.checksum, fecf_buffer()):append_text(crcVerification) + end + end +end + +local udp_port = DissectorTable.get("udp.port") +local tcp_port = DissectorTable.get("tcp.port") +udp_port:add(70001, tm_frame_protocol) +tcp_port:add(70010, tm_frame_protocol) + +function tm_frame_protocol.prefs_changed() + if tm_frame_protocol.prefs.crc then + fec_buffer_length = FECF_LENGTH + else + fec_buffer_length = 0 + end +end \ No newline at end of file diff --git a/dissectors/css-ccsds-cortex/src/tm_pus.lua b/dissectors/css-ccsds-cortex/src/tm_pus.lua new file mode 100644 index 0000000..df9e6bd --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/tm_pus.lua @@ -0,0 +1,147 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/tm_pus.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENCE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENCE.md’. +------------------------------------------------------------------ + +require("crc16") + +local default_settings = +{ + has_pec = true, -- whether Space Packets include PEC or not + check_pec = false, -- whether we check Space Packets PEC or not +} + +local pus_tm_frame_protocol = Proto("TM_PUS", "TM Packet utilization Service") + +local f = pus_tm_frame_protocol.fields +local enums = {} + +-- import services table +local services = require("pus_service_table") + +-- Block Size +local TM_HEADER_LENGTH_WHITHOUT_TIME = 7 +local PEC_LENGTH = 2 +local TIME_FIELD_SIZE = 0 + +-- Header field +f.packet_version_number = ProtoField.uint8("pus_tm.packet_version_number", "PVN", base.DEC, nil, 0xf0) +f.acknowledgment_flag = ProtoField.uint8("pus_tm.acknowledgment_flag", "Acknowledgment Flag", base.DEC, nil, 0x0f) +f.service_type_id = ProtoField.uint8("pus_tm.service_type_id", "Service Type ID", base.DEC) +f.message_subtype_id = ProtoField.uint8("pus_tm.message_subtype_id", "Message Subtype ID", base.DEC) +f.message_type_counter = ProtoField.uint16("pus_tm.message_type_counter", "Message Type Counter", base.DEC) +f.destination_id = ProtoField.uint16("pus_tm.destination_id", "Destination ID", base.DEC) +f.spacecraft_time_reference_number = ProtoField.uint8("pus_tm.spacecraft_time_reference_number", + "Spacecraft Time Reference Number", base.DEC, nil, 0x0f) +f.time = ProtoField.uint64("pus_tm.time", "Time", base.DEC) +-- PEC field +f.pec = ProtoField.uint16("pus_tm.packet_error_control", "Checksum", base.HEX) + +local function get_service_name(buffer) + local service = "st" .. buffer(1, 1):uint() + local service_name = "Unknown" + if services[service] ~= nil then + service_name = services[service].name + end + return service_name +end + +local function get_sub_service_name(buffer) + local service = "st" .. buffer(1, 1):uint() + local sub_service = "sub" .. buffer(2, 1):uint() + local sub_service_name = "Unknown" + if services[service] ~= nil and service ~= "st10" and services[service].sub_services[sub_service] ~= nil then + sub_service_name = services[service].sub_services[sub_service] + end + return sub_service_name +end + +--------------- +-- Dissector -- +--------------- + +function pus_tm_frame_protocol.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = pus_tm_frame_protocol.name + + -- add a tab PUS + local tab = ByteArray.tvb(buffer:bytes(), "PUS") + + local offset = 0 + local user_data_buffer = nil + local header_length = TM_HEADER_LENGTH_WHITHOUT_TIME + TIME_FIELD_SIZE + if header_length % 2 ~= 0 then + header_length = header_length + 1 + end + local header_buffer = buffer:range(offset, header_length) + local header_tree = tree:add(pus_tm_frame_protocol, header_buffer(), "Header") + + header_tree:add(f.packet_version_number, buffer(offset, 1)) + header_tree:add(f.spacecraft_time_reference_number, buffer(offset, 1)) + offset = offset + 1 + header_tree:add(f.service_type_id, buffer(offset, 1)):append_text(" (" .. get_service_name(header_buffer) .. ")") + offset = offset + 1 + header_tree:add(f.message_subtype_id, buffer(offset, 1)):append_text(" (" .. + get_sub_service_name(header_buffer) .. ")") + offset = offset + 1 + header_tree:add(f.message_type_counter, buffer(offset, 2)) + offset = offset + 2 + header_tree:add(f.destination_id, buffer(offset, 2)) + offset = offset + 2 + if TIME_FIELD_SIZE ~= 0 then + header_tree:add(f.time, buffer(offset, TIME_FIELD_SIZE)) + end + offset = offset + TIME_FIELD_SIZE + + if default_settings.has_pec == true then + user_data_buffer = buffer:range(offset, buffer:len() - offset - PEC_LENGTH):tvb() + else + user_data_buffer = buffer:range(offset, buffer:len() - offset):tvb() + end + + local data_tree = tree:add(pus_tm_frame_protocol, user_data_buffer(), "Service data") + Dissector.get("data"):call(user_data_buffer, pinfo, data_tree) + + offset = offset + user_data_buffer:len() + + -- Handle optional PEC + if default_settings.has_pec == true then + -- Optional PEC verification. Can be desactivated if needed for performance reasons. + local pecVerification = " [unverified]" + if default_settings.check_pec == true then + -- PEC is computed over the whole encapsulating SPP + local crc = crc16(buffer) + pecVerification = " [OK]" + if crc ~= 0 then + pecVerification = " [KO]" + end + end + tree:add(f.pec, buffer(offset, 2)):append_text(pecVerification) + end +end + +local udp_port = DissectorTable.get("udp.port") +local tcp_port = DissectorTable.get("tcp.port") +udp_port:add(8001, pus_tm_frame_protocol) +tcp_port:add(8010, pus_tm_frame_protocol) + +-- Register our preferences +pus_tm_frame_protocol.prefs.has_pec = Pref.bool("Space Packet includes PEC", default_settings.has_pec, + "Whether each Space Packet has a trailing PEC or not") + +pus_tm_frame_protocol.prefs.check_pec = Pref.bool("Check Space Packet PEC", default_settings.check_pec, + "Whether we check Space Packet PEC or not") + +function pus_tm_frame_protocol.prefs_changed() + default_settings.has_pec = pus_tm_frame_protocol.prefs.has_pec + default_settings.check_pec = pus_tm_frame_protocol.prefs.check_pec +end diff --git a/dissectors/css-ccsds-cortex/src/tm_pus_cuc.lua b/dissectors/css-ccsds-cortex/src/tm_pus_cuc.lua new file mode 100644 index 0000000..5207480 --- /dev/null +++ b/dissectors/css-ccsds-cortex/src/tm_pus_cuc.lua @@ -0,0 +1,173 @@ +-- SPDX-License-Identifier: NASA-1.3 +-- Importé de https://github.com/IRT-Saint-Exupery/CSS-Simulator (CSS_Attacks/Dissectors/Dissecteurs_CCSDS/tm_pus_cuc.lua), +-- commit 82457a85ee4c27605836d8e973d19c68b953a8e2 du 15/09/2026 (dernière modification du fichier : +-- commit 348b2cb29ef4e537b4a97b1ad49db269576a5f77 du 25/02/2026). +-- Licence amont : NASA Open Source Agreement 1.3 (LICENSE.txt amont) — voir README.md et LICENSE.txt. +------------------------------------------------------------------ +-- +-- SpaceBus Neo TM PUS packet with 7 bytes CUC time dissector +-- +-- Written by Pierre Bacquet, Thales Alenia Space +-- +-- Based on tm_pus dissector developed by European Space Agency (ESA) +-- for which copyright notice is given below: +-- +-- © Copyright European Space Agency, 2023 +-- This file is subject to the terms and conditions defined in file 'LICENCE.md', +-- which is part of this source code package. No part of the package, +-- including this file, may be copied, modified, propagated, or distributed except +-- according to the terms contained in the file ‘LICENCE.md’. +-- +------------------------------------------------------------------ + +require("crc16") + +local default_settings = +{ + has_pec = true, -- whether Space Packets include PEC or not + check_pec = false, -- whether we check Space Packets PEC or not +} + +-- Offset from ESA epoch (1/1/2000) to 'nix epoch (1/1/1970) in seconds +local OFFSET_TO_NIX_EPOCH = 946684800 + +local function CUC_to_UTC(subBuffer) + -- CUC time as coarse time (in sec) on the 1st 4 bytes word and then as fine time + -- (in fraction of a sec) on the last 3 bytes + local secs = subBuffer(0, 4):uint() + OFFSET_TO_NIX_EPOCH + local nsecs = subBuffer(4, 3):uint() + + nsecs = nsecs / 16777216 * 1000000000 + + return NSTime.new(secs, math.floor(nsecs)) +end + +local pus_tm_frame_protocol = Proto("TM_PUS_CUC", "TM Packet utilization Service CUC") + +local f = pus_tm_frame_protocol.fields + +-- import services table +local services = require("pus_service_table") + +-- Block Size +local TM_HEADER_LENGTH_WHITHOUT_TIME = 5 +local PEC_LENGTH = 2 +local TIME_FIELD_SIZE = 8 -- P. Bacquet: set to 8 for CUC (4 coarse and 3 fine) + 1 status (not usedà + +-- Header field +f.packet_version_number = ProtoField.uint8("pus_tm.packet_version_number", "PVN", base.DEC, nil, 0xf0) +f.acknowledgment_flag = ProtoField.uint8("pus_tm.acknowledgment_flag", "Acknowledgment Flag", base.DEC, nil, 0x0f) +f.service_type_id = ProtoField.uint8("pus_tm.service_type_id", "Service Type ID", base.DEC) +f.message_subtype_id = ProtoField.uint8("pus_tm.message_subtype_id", "Message Subtype ID", base.DEC) +f.message_type_counter = ProtoField.uint8("pus_tm.message_type_counter", "Message Type Counter", base.DEC) +f.destination_id = ProtoField.uint8("pus_tm.destination_id", "Destination ID", base.DEC) +f.spacecraft_time_reference_number = ProtoField.uint8("pus_tm.spacecraft_time_reference_number", + "Spacecraft Time Reference Number", base.DEC, nil, 0x0f) +f.time = ProtoField.absolute_time("pus_tm.time", "Time", base.UTC) +f.timeStatus = ProtoField.uint8("pus_tm.timeStatus", "Time Status", base.DEC) +-- PEC field +f.pec = ProtoField.uint16("pus_tm.packet_error_control", "Packet Error Control", base.HEX) + +local function get_service_name(buffer) + local service = "st" .. buffer(1, 1):uint() + local service_name = "Unknown" + if services[service] ~= nil then + service_name = services[service].name + end + return service_name +end + +local function get_sub_service_name(buffer) + local service = "st" .. buffer(1, 1):uint() + local sub_service = "sub" .. buffer(2, 1):uint() + local sub_service_name = "Unknown" + if services[service] ~= nil and service ~= "st10" and services[service].sub_services[sub_service] ~= nil then + sub_service_name = services[service].sub_services[sub_service] + end + return sub_service_name +end + +--------------- +-- Dissector -- +--------------- + +function pus_tm_frame_protocol.dissector(buffer, pinfo, tree) + -- Skip SPP header (since we have passed the whole encapsulating SPP for PEC verification) + local offset = SPP_HEADER_LENGTH + + local length = buffer:len() - SPP_HEADER_LENGTH + if length == 0 then return end + + pinfo.cols.protocol = pus_tm_frame_protocol.name + + -- add a PUS tab + local tab = ByteArray.tvb(buffer:bytes(offset, length), "PUS") + + local user_data_buffer = nil + local header_length = TM_HEADER_LENGTH_WHITHOUT_TIME + TIME_FIELD_SIZE + local header_buffer = buffer:range(offset, header_length) + local header_tree = tree:add(pus_tm_frame_protocol, header_buffer(), "Header") + + header_tree:add(f.packet_version_number, buffer(offset, 1)) + header_tree:add(f.spacecraft_time_reference_number, buffer(offset, 1)) + offset = offset + 1 + header_tree:add(f.service_type_id, buffer(offset, 1)):append_text(" (" .. get_service_name(header_buffer) .. ")") + offset = offset + 1 + header_tree:add(f.message_subtype_id, buffer(offset, 1)):append_text(" (" .. + get_sub_service_name(header_buffer) .. ")") + offset = offset + 1 + header_tree:add(f.message_type_counter, buffer(offset, 1)) + offset = offset + 1 + header_tree:add(f.destination_id, buffer(offset, 1)) + offset = offset + 1 + if TIME_FIELD_SIZE ~= 0 then + header_tree:add(f.time, buffer(offset, TIME_FIELD_SIZE - 1), CUC_to_UTC(buffer(offset, TIME_FIELD_SIZE - 1))) + end + offset = offset + TIME_FIELD_SIZE - 1 + header_tree:add(f.timeStatus, buffer(offset, 1)):append_text(" [Not used]") + offset = offset + 1 + + if default_settings.has_pec == true then + user_data_buffer = buffer:range(offset, buffer:len() - offset - PEC_LENGTH):tvb() + else + user_data_buffer = buffer:range(offset, buffer:len() - offset):tvb() + end + + local data_tree = tree:add(pus_tm_frame_protocol, user_data_buffer(), "Service data") + Dissector.get("data"):call(user_data_buffer, pinfo, data_tree) + + offset = offset + user_data_buffer:len() + + -- Handle optional PEC + if default_settings.has_pec == true then + -- Optional PEC verification. Can be desactivated if needed for performance reasons. + local pecVerification = " [unverified]" + if default_settings.check_pec == true then + -- PEC is computed over the whole encapsulating SPP + local crc = crc16(buffer) + pecVerification = " [OK]" + if crc ~= 0 then + pecVerification = " [KO]" + end + end + tree:add(f.pec, buffer(offset, 2)):append_text(pecVerification) + end +end + +-- P. Bacquet: PUS not registered since it will be dissected together with the encapsulating SPP +--local udp_port = DissectorTable.get("udp.port") +--local tcp_port = DissectorTable.get("tcp.port") +--udp_port:add(8001, pus_tm_frame_protocol) +--tcp_port:add(8010, pus_tm_frame_protocol) + +-- Register our preferences +pus_tm_frame_protocol.prefs.has_pec = Pref.bool("Space Packet includes PEC", default_settings.has_pec, + "Whether each Space Packet has a trailing PEC or not") + +pus_tm_frame_protocol.prefs.check_pec = Pref.bool("Check Space Packet PEC", default_settings.check_pec, + "Whether we check Space Packet PEC or not") + +function pus_tm_frame_protocol.prefs_changed() + default_settings.has_pec = pus_tm_frame_protocol.prefs.has_pec + default_settings.check_pec = pus_tm_frame_protocol.prefs.check_pec +end diff --git a/dissectors/cta852-lon/852LON.lua b/dissectors/cta852-lon/852LON.lua new file mode 100644 index 0000000..74a7a40 --- /dev/null +++ b/dissectors/cta852-lon/852LON.lua @@ -0,0 +1,1177 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/Gesytec/wireshark_852 (852LON.lua), +-- commit 81b4373255d62ab4f52114a905e3c0036d7967b2 du 25/06/2018. +-- Licence amont : GPL-3.0-or-later (LICENSE amont) — voir README.md. +-- ANSI/CTA-852, ISO/IEC 14908-4 protocol +-- Copyright: Richard T. Brown, Johnson Controls, Inc. +-- Volker Schober, Gesytec GmbH +-- Matthias Luerkens, Gesytec GmbH +-- +-- This work is licensed under the terms of GPLv3 (or any later version). +-- +-- initial version from 2008 +-- +-- V1.3, 22.10.2014 +-- adapted to new Wireshark version, getBits() +-- more LON message codes +-- transaction ID in info column +-- V1.4, 25.06.2018 +-- support NAT-extensions +-- +-- some more ideas: +-- color coding: port number mismatch for source port + +PACKETTYPE_DATA_PACKET = 0x01 +PACKETTYPE_DEVICE_REGISTRATION_REQUEST = 0x63 +PACKETTYPE_DEVICE_REGISTRATION_UNSOLICITED = 0x03 +PACKETTYPE_DEVICE_REGISTRATION_SOLICITED = 0x71 +PACKETTYPE_CHANNEL_MEMBERSHIP_REQUEST = 0x64 +PACKETTYPE_CHANNEL_MEMBERSHIP = 0x04 +PACKETTYPE_SEND_LIST_REQUEST = 0x66 +PACKETTYPE_SEND_LIST = 0x06 +PACKETTYPE_CHANNEL_ROUTING_REQUEST = 0x68 +PACKETTYPE_CHANNEL_ROUTING = 0x08 +PACKETTYPE_ACKNOWLEDGE = 0x07 +PACKETTYPE_SEGMENT = 0x7F +PACKETTYPE_STATUS_HEALTH_STATISTICS_REQUEST = 0x60 +PACKETTYPE_STATUS_HEALTH_STATISTICS_RESPONSE = 0x70 +PACKETTYPE_NAT_REQUEST = 0x91 +PACKETTYPE_NAT_RESPONSE = 0xD1 + +packetTypeTextTable = { [PACKETTYPE_DATA_PACKET] = "Data Packet", + [PACKETTYPE_DEVICE_REGISTRATION_REQUEST] = "Device Registration Request", + [PACKETTYPE_DEVICE_REGISTRATION_UNSOLICITED] = "Device Registration (unsolicited)", + [PACKETTYPE_DEVICE_REGISTRATION_SOLICITED] = "Device Registration (solicited)", + [PACKETTYPE_CHANNEL_MEMBERSHIP_REQUEST] = "Channel Membership Request", + [PACKETTYPE_CHANNEL_MEMBERSHIP] = "Channel Membership", + [PACKETTYPE_SEND_LIST_REQUEST] = "Send List Request", + [PACKETTYPE_SEND_LIST] = "Send List", + [PACKETTYPE_CHANNEL_ROUTING_REQUEST] = "Channel Routing Request", + [PACKETTYPE_CHANNEL_ROUTING] = "Channel Routing", + [PACKETTYPE_ACKNOWLEDGE] = "Acknowledge", + [PACKETTYPE_SEGMENT] = "Segment", + [PACKETTYPE_STATUS_HEALTH_STATISTICS_REQUEST] = "Status/Health/Statistics Request", + [PACKETTYPE_STATUS_HEALTH_STATISTICS_RESPONSE] = "Status/Health/Statistics Response", + [PACKETTYPE_NAT_REQUEST] = "NAT Request", + [PACKETTYPE_NAT_RESPONSE] = "NAT Response" } + +--------------------------------------------------------------------------------------------------------------------------------- +-- DATA DISSECTORS +--------------------------------------------------------------------------------------------------------------------------------- + +-- function to dissect a request packet +function requestDissector(buff, pinfo, dataPacket, packetType, packetTypeString) + + dataPacket:add(buff(0,4), "DateTime " .. getHexString(buff(0,4) :tvb(), 4)) +-- dataPacket:add(buff(0,4), "DateTime " .. buff(0,4):uint()) + +-- for count = 0, 15, 1 do +-- dataPacket:add(buff(position, 1), "count=" .. count .." getBits: (0,1)=" .. getBits(count, 0, 1) .." (1,2)=" .. getBits(count, 1, 2) .." (2,3)=" .. getBits(count, 2, 3) .." (3,4)=" .. getBits(count, 3, 4) .." (1,1)=" .. getBits(count, 1, 1) .." (2,1)=" .. getBits(count, 2, 1) .." (3,1)=" .. getBits(count, 3, 1) .." (4,1)=" .. getBits(count, 4, 1)) +-- end + + local reasonByte = buff(4,1):uint() + + local reason = "" --getBits(reasonByte, 1, 2) + + if (getBits(reasonByte, 1, 2) == 0) then + reason = reason .. "Normal request " + elseif (getBits(reasonByte, 1, 2) == 1) then + reason = reason .. "Verify " + packetTypeString = packetTypeString .. " Verify" + else + reason = reason .. "UNKNOWN REQUEST " + end + + local requestAll = "" + if (getBits(reasonByte, 2, 1) == 1) then + reason = reason .. "all, " + else + reason = reason .. "one, " + end + + local copyClear = "" + if (getBits(reasonByte, 3, 1) == 1) then + reason = reason .. "move " + else + reason = reason .. "copy " + end + + --local packetTypeString = packetTypeTextTable[packetType] + packetTypeString = packetTypeString .. " " .. buff(5,2):uint() .. ":" .. buff(7,1):uint() + pinfo.cols.info = packetTypeString + --reason = pinfo.cols.info + " test" + --pinfo.cols.info =reason; + dataPacket:add(buff(4,1), "Reason " .. getHexString(buff(4,1) :tvb(), 1).. reason) + dataPacket:add(buff(5,2), "Request ID " .. buff(5,2):uint()) + dataPacket:add(buff(7,1), "Segment ID " .. buff(7,1):uint()) + + dataPacket:add(buff(8,4), "Since DateTime " .. getHexString(buff(8,4) :tvb(), 4)) +-- dataPacket:add(buff(8,4), "Since DateTime " .. buff(8,4):uint()) + + if (packetType == PACKETTYPE_CHANNEL_ROUTING_REQUEST) then + dataPacket:add(buff(12,4), "IP Unicast Address " .. buff(12,1):uint() .. "." .. buff(13,1):uint() .. "." .. buff(14,1):uint() .. "." .. buff(15,1):uint()) + + if (dataLength > 16) then + dataPacket:add(buff(16,2), "IP Unicast Port " .. buff(16,2):uint()) + dataPacket:add(buff(18,2), "MBZ " .. buff(18,2):uint()) + end + else + dataPacket:add(buff(12,4), "MBZ " .. buff(12,4):uint()) + end +end + + + +-- function to dissect an acknowledge packet +function ackDissector(buff, pinfo, dataPacket, packetType) + ACK_OK = 0 + ACK_FIXED = 1 + ACK_BAD_MESSAGE = 2 + ACK_CANT_COMPLY = 3 + ACK_DEVICE_REFUSED = 4 + ACK_NOT_SUPPORTED = 5 + ackTypeText = { [0] = "OK", "Fixed", "Bad message", "Cannot comply", "Device Refused", "Not supported"} + + + dataPacket:add(buff(0,4), "DateTime " .. getHexString(buff(0,4) :tvb(), 4)) +-- dataPacket:add(buff(0,4), "DateTime " .. buff(0,4):uint()) + + local ackType = buff(4,1):uint() + local ackTypeString = "unknown" + + if ((ackType >= ACK_OK) and (ackType <= ACK_NOT_SUPPORTED)) then + ackTypeString = ackTypeText[ackType] + end + + dataPacket:add(buff(4,1), "ACK Type " .. ackTypeString .. " (" .. buff(4,1):uint() .. ")") + dataPacket:add(buff(5,2), "Request ID " .. buff(5,2):uint()) + dataPacket:add(buff(7,1), "Segment ID " .. buff(7,1):uint()) +end + + +-- function to dissect an segment packet +function segmentDissector(buff, pinfo, dataPacket, packetType, packetTypeString) + dataPacket:add(buff(0,4), "DateTime " .. getHexString(buff(0,4) :tvb(), 4)) + + packetTypeString = packetTypeString .. " " .. buff(5,2):uint() .. ":" .. buff(7,1):uint() + + local FlagsByte = buff(4,1):uint() + local Flags = "" + + if (getBits(FlagsByte, 7, 1) == 1) then + Flags = Flags .. "Valid " + end + if (getBits(FlagsByte, 6, 1) == 1) then + Flags = Flags .. "Last " + packetTypeString = packetTypeString .. " Last" + end + + pinfo.cols.info = packetTypeString + + dataPacket:add(buff(4,1), "Flags " .. Flags .. " (" .. buff(4,1):uint() .. ")") + dataPacket:add(buff(5,2), "Request ID " .. buff(5,2):uint()) + dataPacket:add(buff(7,1), "Segment ID " .. buff(7,1):uint()) +end + + +-- function to dissect a device registration packet +function deviceRegDissector(buff, pinfo, dataPacket, packetType) + dataPacket:add(buff(0,4), "DateTime " .. getHexString(buff(0,4) :tvb(), 4)) +-- dataPacket:add(buff(0,4), "DateTime " .. buff(0,4):uint()) + + local int ipFlags = buff(4,1):uint() + if (getBits(ipFlags, 0, 1) == 1) then + udpSupported = "UDP Supported " + else + udpSupported = "" + end + if (getBits(ipFlags, 1, 1) == 1) then + tcpSupported = "TCP Supported " + else + tcpSupported = "" + end + if (getBits(ipFlags, 2, 1) == 1) then + multicastSupported = "multi-cast supported " + else + multicastSupported = "" + end + + local RouterType = buff(5,1):uint() + if (RouterType == 0) then + CNRouterType = "Configured" + elseif (RouterType == 1) then + CNRouterType = "Learning" + elseif (RouterType == 2) then + CNRouterType = "Bridge" + elseif (RouterType == 3) then + CNRouterType = "Repeater" + else + CNRouterType = "" + end + + local cnFlags = buff(6,1):uint() + if (getBits(cnFlags, 0, 1) == 1) then + WantsAllBroadcasts = "Wants All Broadcasts " + else + WantsAllBroadcasts = "" + end + if (getBits(cnFlags, 1, 1) == 1) then + SecuritySupported = "Security Supported " + else + SecuritySupported = "" + end + + local NodeType = buff(7,1):uint() + if (NodeType == 1) then + CNNodeType = "Non-IP channel to IP channel Router" + elseif (NodeType == 2) then + CNNodeType = "IP channel Node" + elseif (NodeType == 3) then + CNNodeType = "IP channel Proxy" + elseif (NodeType == 4) then + CNNodeType = "IP channel to IP channel Router" + else + CNNodeType = "" + end + + +-- dataPacket:add(buff(4,1), "IP Flags " .. udpSupported .. tcpSupported .. multicastSupported .. "(" .. buff(4,1):uint() .. ")") + dataPacket:add(buff(4,1), "IP Flags " .. getHexString(buff(4,1):tvb(), 1) .. udpSupported .. tcpSupported .. multicastSupported) + dataPacket:add(buff(5,1), "CN Router Type " .. getHexString(buff(5,1):tvb(), 1) .. CNRouterType) + dataPacket:add(buff(6,1), "CN Flags " .. getHexString(buff(6,1):tvb(), 1) .. WantsAllBroadcasts .. SecuritySupported) + dataPacket:add(buff(7,1), "Node Type " .. getHexString(buff(7,1):tvb(), 1) .. CNNodeType) + + local mcAddressCount = buff(8,1):uint() + dataPacket:add(buff(8,1), "Mc_Address Count " .. buff(8,1):uint()) + dataPacket:add(buff(9,1), "MBZ " .. buff(9,1):uint()) + dataPacket:add(buff(10,2), "Channel Timeout " .. buff(10,2):uint()) + + local uniqueIdBytes = buff(12,2):uint() + dataPacket:add(buff(12,2), "Total Unique ID Bytes " .. buff(12,2):uint()) + dataPacket:add(buff(14,2), "IP Unicast Port " .. buff(14,2):uint()) + + dataPacket:add(buff(16,4), "IP Unicast Address " .. buff(16,1):uint() .. "." .. buff(17,1):uint() .. "." .. buff(18,1):uint() .. "." .. buff(19,1):uint()) + + dataPacket:add(buff(20,4), "Channel Membership DateTime " .. getHexString(buff(20,4) :tvb(), 4)) +-- dataPacket:add(buff(20,4), "Channel Membership DateTime " .. buff(20,4):uint()) + + dataPacket:add(buff(24,4), "Send List DateTime " .. getHexString(buff(24,4) :tvb(), 4)) +-- dataPacket:add(buff(24,4), "Send List DateTime " .. buff(24,4):uint()) + + dataPacket:add(buff(28,4), "Config Server IP Address " .. buff(28,1):uint() .. "." .. buff(29,1):uint() .. "." .. buff(30,1):uint() .. "." .. buff(31,1):uint()) + + dataPacket:add(buff(32,4), "Primary Time Server IP Address " .. buff(32,1):uint() .. "." .. buff(33,1):uint() .. "." .. buff(34,1):uint() .. "." .. buff(35,1):uint()) + + dataPacket:add(buff(36,4), "Secondary Time Server IP Address " .. buff(36,1):uint() .. "." .. buff(37,1):uint() .. "." .. buff(38,1):uint() .. "." .. buff(39,1):uint()) + + dataPacket:add(buff(40,2), "Config Server IP Port " .. buff(40,2):uint()) + dataPacket:add(buff(42,2), "Primary Time Server IP Port " .. buff(42,2):uint()) + + dataPacket:add(buff(44,2), "Secondary Time Server IP Port " .. buff(44,2):uint()) + dataPacket:add(buff(46,2), "MBZ " .. buff(46,2):uint()) + + local position = 48 + + if (mcAddressCount > 0) then + for count = 0, mcAddressCount-1, 1 do + dataPacket:add(buff(position,4), "MultiCast IP Address " .. buff(position,1):uint() .. "." .. buff(position + 1,1):uint() .. "." .. buff(position + 2,1):uint() .. "." .. buff(position + 3,1):uint()) + dataPacket:add(buff(position + 4,2), "Multicast IP Port " .. buff(position + 4,2):uint()) + --dataPacket:add(buff(position + 6,2), "MBZ " .. buff(position + 6,2):uint()) + position = position + 8 + end + end + + if (uniqueIdBytes > 0) then +-- dataPacket:add(buff(position, uniqueIdBytes), "Unique ID[] " .. getHexString(buff(position, uniqueIdBytes):tvb(), uniqueIdBytes)) + for count = 0, uniqueIdBytes-1, 6 do + dataPacket:add(buff(position, 6), "Unique ID[" .. count/6 .."] " .. getHexString(buff(position, 6):tvb(), 6)) + position = position + 6 + end +-- for count = 0, uniqueIdBytes-1, 1 do +-- dataPacket:add(buff(position + count, 1), "Unique ID[" .. count .."] " .. buff(position + count, 1):uint()) +-- end + end +end + + + +-- function to print an IP address +function printIpAddress(buff, dataPacket, name) + dataPacket:add(buff(0,4), name .. buff(0,1):uint() .. "." .. buff(1,1):uint() .. "." .. buff(2,1):uint() .. "." .. buff(3,1):uint()) +end + +function printIpAddressXor(buff, dataPacket, name) + dataPacket:add(buff(0,4), name .. bit.bxor(buff(0,1):uint(), 0xFF) .. "." .. bit.bxor(buff(1,1):uint(), 0xFF) .. "." .. bit.bxor(buff(2,1):uint(), 0xFF) .. "." .. bit.bxor(buff(3,1):uint(), 0xFF)) +end + + + +function NatResponseDissector(buff, pinfo, dataPacket, packetType) + dataPacket:add(buff(1,2), "Request ID " .. buff(1,2):uint()) + + dataPacket:add(buff(10,2), "IP Unicast Port " .. bit.bxor(buff(10,2):uint(), 0xFFFF)) + printIpAddressXor(buff(12,4):tvb(), dataPacket, "NAT Address ") + printIpAddressXor(buff(16,4):tvb(), dataPacket, "??? Address ") +end + + +-- function to dissect a channel routing packet +function channelRoutingDissector(buff, pinfo, dataPacket, packetType) + dataPacket:add(buff(0,4), "DateTime " .. getHexString(buff(0,4) :tvb(), 4)) +-- dataPacket:add(buff(0,4), "DateTime " .. buff(0,4):uint()) + + dataPacket:add(buff(4,2), "IP Multi-cast Port " .. buff(4,2):uint()) + dataPacket:add(buff(6,2), "IP Unicast Port " .. buff(6,2):uint()) + + printIpAddress(buff(8,4):tvb(), dataPacket, "IP Multi-cast Address ") + + printIpAddress(buff(12,4):tvb(), dataPacket, "IP Unicast Address ") + + + local int ipFlags = buff(16,1):uint() + if (getBits(ipFlags, 0, 1) == 1) then + udpSupported = "UDP Supported " + else + udpSupported = "" + end + if (getBits(ipFlags, 1, 1) == 1) then + tcpSupported = "TCP Supported " + else + tcpSupported = "" + end + if (getBits(ipFlags, 2, 1) == 1) then + multicastSupported = "multi-cast supported " + else + multicastSupported = "" + end + + local RouterType = buff(17,1):uint() + if (RouterType == 0) then + CNRouterType = "Configured" + elseif (RouterType == 1) then + CNRouterType = "Learning" + elseif (RouterType == 2) then + CNRouterType = "Bridge" + elseif (RouterType == 3) then + CNRouterType = "Repeater" + else + CNRouterType = "" + end + + local cnFlags = buff(18,1):uint() + if (getBits(cnFlags, 0, 1) == 1) then + WantsAllBroadcasts = "Wants All Broadcasts " + else + WantsAllBroadcasts = "" + end + if (getBits(cnFlags, 1, 1) == 1) then + SecuritySupported = "Security Supported " + else + SecuritySupported = "" + end + + local NodeType = buff(19,1):uint() + if (NodeType == 1) then + CNNodeType = "Non-IP channel to IP channel Router" + elseif (NodeType == 2) then + CNNodeType = "IP channel Node" + elseif (NodeType == 3) then + CNNodeType = "IP channel Proxy" + elseif (NodeType == 4) then + CNNodeType = "IP channel to IP channel Router" + else + CNNodeType = "" + end + + + dataPacket:add(buff(16,1), "IP Flags " .. getHexString(buff(16,1):tvb(), 1) .. udpSupported .. tcpSupported .. multicastSupported) + dataPacket:add(buff(17,1), "CN Router Type " .. getHexString(buff(17,1):tvb(), 1) .. CNRouterType) + dataPacket:add(buff(18,1), "CN Flags " .. getHexString(buff(18,1):tvb(), 1) .. WantsAllBroadcasts .. SecuritySupported) + dataPacket:add(buff(19,1), "Node Type " .. getHexString(buff(19,1):tvb(), 1) .. CNNodeType) +-- dataPacket:add(buff(16,1), "IP Flags " .. buff(16,1):uint()) +-- dataPacket:add(buff(17,1), "CN Router Type " .. buff(17,1):uint()) +-- dataPacket:add(buff(18,1), "CN Flags " .. buff(18,1):uint()) +-- dataPacket:add(buff(19,1), "Node Type " .. buff(19,1):uint()) + + local uniqueIdBytes = buff(20,2):uint() + dataPacket:add(buff(20,2), "Total Unique ID Bytes " .. buff(20,2):uint()) + dataPacket:add(buff(22,2), "MBZ " .. buff(22,2):uint()) + + local subnetNodes = buff(24,2):uint()/6 + dataPacket:add(buff(24,2), "Total SubnetNode Bytes " .. buff(24,2):uint() .. " (" .. subnetNodes .. " subnet/node addresses)") + local domains = buff(26,2):uint()/72 + dataPacket:add(buff(26,2), "Total Domain Bytes " .. buff(26,2):uint() .. " (" .. domains .. " domain addresses)") + + local position = 28 + + for count = 0, uniqueIdBytes-1, 6 do + dataPacket:add(buff(position, 6), "Unique ID[" .. count/6 .."] " .. getHexString(buff(position, 6):tvb(), 6)) + position = position + 6 + end +-- for count = 0, uniqueIdBytes-1, 1 do +-- dataPacket:add(buff(position + count, 1), "Unique ID[" .. count .."] " .. buff(position + count, 1):uint()) +-- end +-- position = position + uniqueIdBytes + + for count = 0, subnetNodes - 1, 1 do + dataPacket:add(buff(position ,1), "Subnet " .. buff(position,1):uint()) + dataPacket:add(buff(position+1,1), "Node " .. buff(position+1,1):uint()) + dataPacket:add(buff(position+2,2), "Domain Index " .. buff(position+2,2):uint()) + + dataPacket:add(buff(position+4,2), "Unique ID Index " .. buff(position+4,2):uint()) + + position = position + 6 + end + + for count = 0, domains - 1, 1 do + dataPacket:add(buff(position, 32), "Subnet Mask[] " .. getHexString(buff(position, 32):tvb(), 32)) +-- for count2 = 0, 31, 1 do +-- dataPacket:add(buff(position + count2, 1), "Subnet Mask[" .. count2 .."] " .. buff(position + count2, 1):uint()) +-- end + + position = position + 32 + + dataPacket:add(buff(position, 32), "Group Mask[] " .. getHexString(buff(position, 32):tvb(), 32)) +-- for count2 = 0, 31, 1 do +-- dataPacket:add(buff(position + count2, 1), "Group Mask[" .. count2 .."] " .. buff(position + count2, 1):uint()) +-- end + + position = position + 32 + + dataPacket:add(buff(position ,1), "Domain Length " .. buff(position,1):uint()) + dataPacket:add(buff(position+1,1), "MBZ " .. buff(position+1,1):uint()) + + position = position + 2 + + dataPacket:add(buff(position, 6), "Domain ID [] " .. getHexString(buff(position, 6):tvb(), 6)) +-- for count2 = 0, 5, 1 do +-- dataPacket:add(buff(position + count2, 1), "Domain ID [" .. count2 .."] " .. buff(position + count2, 1):uint()) +-- end + + position = position + 6 + end +end + + +-- function to dissect a send list packet +function sendListDissector(buff, pinfo, dataPacket, packetType) + dataPacket:add(buff(0,4), "DateTime " .. getHexString(buff(0,4) :tvb(), 4)) + local listSize = buff(4,1):uint() + dataPacket:add(buff(4,1), "List Size " .. buff(4,1):uint()) + dataPacket:add(buff(5,3), "MBZ " .. buff(5,3):uint()) + + local position = 8 + for count = 0, listSize-1, 1 do + local listMember = dataPacket:add(buff(position,8), "List Member " .. count .. ": " ..buff(position,1):uint() .. "." .. buff(position+1,1):uint() .. "." .. buff(position+2,1):uint() .. "." .. buff(position+3,1):uint() .. ":" .. buff(position + 4,2):uint()) + + printIpAddress(buff(position,4):tvb(), listMember, "IP Address ") + + listMember:add(buff(position + 4,2), "IP Port " .. buff(position + 4,2):uint()) + listMember:add(buff(position + 6,2), "MBZ " .. buff(position + 6,2):uint()) + + position = position + 8 + end +end + + +-- function to dissect a channel membership packet +function channelMembershipDissector(buff, pinfo, dataPacket, packetType) + dataPacket:add(buff(0,4), "DateTime " .. getHexString(buff(0,4) :tvb(), 4)) +-- dataPacket:add(buff(0,4), "DateTime " .. buff(0,4):uint()) + dataPacket:add(buff(4,4), "Send List DateTime " .. getHexString(buff(4,4) :tvb(), 4)) +-- dataPacket:add(buff(4,4), "Send List DateTime " .. buff(4,4):uint()) + dataPacket:add(buff(8,4), "MBZ " .. buff(8,4):uint()) + + local listSize = buff(12,2):uint() + dataPacket:add(buff(12,2), "List Size " .. buff(12,2):uint()) + dataPacket:add(buff(14,2), "MBZ " .. buff(14,2):uint()) + + local position = 16 + for count = 0, listSize-1, 1 do + local listMember = dataPacket:add(buff(position,12), "List Member " .. count .. ": " ..buff(position,1):uint() .. "." .. buff(position+1,1):uint() .. "." .. buff(position+2,1):uint() .. "." .. buff(position+3,1):uint() .. ":" .. buff(position + 4,2):uint()) + + printIpAddress(buff(position,4):tvb(), listMember, "IP Unicast Address ") + + listMember:add(buff(position + 4,2), "IP Unicast Port " .. buff(position + 4,2):uint()) + listMember:add(buff(position + 6,2), "MBZ " .. buff(position + 6,2):uint()) + + listMember:add(buff(position + 8,4), "DateTime of channel routing pkt " .. getHexString(buff(position + 8,4) :tvb(), 4)) +-- listMember:add(buff(position + 8,4), "DateTime of channel routing pkt " .. buff(position + 8,4):uint()) + + position = position + 12 + end +end + + + + +-- function to extract bits + +function getBits(data, firstBit, numBits) + local firstBitVal = math.pow(2, firstBit) + local lastBitVal = math.pow(2, firstBit + 1 - numBits); + +-- return (math.mod(data, firstBitVal * 2) - math.mod(data, lastBitVal))/lastBitVal; +-- 2014-08-19 Lue, correct name is math.fmod + return (math.fmod(data, firstBitVal * 2) - math.fmod(data, lastBitVal))/lastBitVal; +end + + +-- function to get hex data +hexDigitTable = { [0] = "0", + [1] = "1", + [2] = "2", + [3] = "3", + [4] = "4", + [5] = "5", + [6] = "6", + [7] = "7", + [8] = "8", + [9] = "9", + [10] = "A", + [11] = "B", + [12] = "C", + [13] = "D", + [14] = "E", + [15] = "F" + } + +function getHexString(buff, buffLen) + local hexString = "" + + for index = 0, buffLen-1, 1 do + local number = buff(index,1):uint() + + hexString = hexString .. hexDigitTable[getBits(number, 7, 4)] .. hexDigitTable[getBits(number, 3, 4)] .. " " + end + + return hexString +end + + +function getHexString0(buff, buffLen) + local hexString = "" + + for index = 0, buffLen-1, 1 do + local number = buff(index,1):uint() + + hexString = hexString .. hexDigitTable[getBits(number, 7, 4)] .. hexDigitTable[getBits(number, 3, 4)] + end + + return hexString +end + + +function getHexString0Low(buff, buffLen) + local hexString = "" + + for index = 0, buffLen-1, 1 do + local number = buff(index,1):uint() + + hexString = hexString .. hexDigitTable[getBits(number, 3, 4)] + end + + return hexString +end + + + + + + + + + +-- PDU dissectors +PDU_TYPE_TPDU = 0 +PDU_TYPE_SPDU = 1 +PDU_TYPE_AUTHPDU = 2 +PDU_TYPE_APDU = 3 + +pduStringTable = { [PDU_TYPE_TPDU] = "TPDU", + [PDU_TYPE_SPDU] = "SPDU", + [PDU_TYPE_AUTHPDU] = "AUTHPDU", + [PDU_TYPE_APDU] = "APDU" + } + + + + + + + +-- Functions to dissect an APDU +APDU_CODE_QUERY_STATUS_SUCC = 49 --0x31 +APDU_CODE_NV_FETCH_SUCC = 51 --0x33 + +APDU_CODE_QUERY_STATUS = 81 --0x51 +APDU_CODE_PROXY = 82 --0x52 +APDU_CODE_CLEAR_STATUS = 83 --0x53 +APDU_CODE_QUERY_XCVR_STATUS = 84 --0x54 + +APDU_CODE_QUERY_ID = 97 --0x61 +APDU_CODE_RESPOND_TO_QUERY = 98 --0x62 +APDU_CODE_JOIN_DOMAIN = 99 --0x63 +APDU_CODE_LEAVE_DOMAIN = 100 --0x64 +APDU_CODE_UPDATE_KEY = 101 --0x65 +APDU_CODE_UPDATE_ADDRESS = 102 --0x66 +APDU_CODE_QUERY_ADDRESS = 103 --0x67 +APDU_CODE_QUERY_NV_CONFIG = 104 --0x68 +APDU_CODE_UPDATE_GROUP_ADDRESS = 105 --0x69 +APDU_CODE_QUERY_DOMAIN = 106 --0x6A +APDU_CODE_UPDATE_NV_CONFIG = 107 --0x6B +APDU_CODE_SET_NODE_MODE = 108 --0x6C +APDU_CODE_READ_MEMORY = 109 --0x6D +APDU_CODE_WRITE_MEMORY = 110 --0x6E +APDU_CODE_CS_RECALCULATE = 111 --0x6F + +APDU_CODE_WINK = 112 --0x70 +APDU_CODE_MEMORY_REFRESH = 113 --0x71 +APDU_CODE_QUERY_SNVT = 114 --0x72 +APDU_CODE_NV_FETCH = 115 --0x73 +APDU_CODE_DEVICE_ESCAPE = 125 --0x7D + +APDU_CODE_RTR_FAR_SIDE_ESC = 126 --0x7E +APDU_CODE_SERVICE_PIN = 127 --0x7F + +apduCodeStringTable = { [APDU_CODE_QUERY_STATUS_SUCC] = "Query Status success", + [APDU_CODE_NV_FETCH_SUCC] = "NV Fetch success", + + [APDU_CODE_QUERY_STATUS] = "Query Status", + [APDU_CODE_PROXY] = "Proxy", + + [APDU_CODE_QUERY_ID] = "Query ID", + [APDU_CODE_RESPOND_TO_QUERY] = "Respond To Query", + [APDU_CODE_JOIN_DOMAIN] = "Join Domain", + + [APDU_CODE_LEAVE_DOMAIN] = "Leave Domain", + [APDU_CODE_UPDATE_KEY] = "Update Key", + [APDU_CODE_UPDATE_ADDRESS] = "Update Address", + [APDU_CODE_QUERY_ADDRESS] = "Query Address", + [APDU_CODE_QUERY_NV_CONFIG] = "Query NV Config", + [APDU_CODE_UPDATE_GROUP_ADDRESS] = "Update Group Address", + [APDU_CODE_QUERY_DOMAIN] = "Query Domain", + [APDU_CODE_UPDATE_NV_CONFIG ] = "Update NV Config", + + [APDU_CODE_SET_NODE_MODE] = "Set Node Mode", + [APDU_CODE_READ_MEMORY] = "Read Memory", + [APDU_CODE_WRITE_MEMORY] = "Write Memory", + [APDU_CODE_CS_RECALCULATE] = "Checksum Memory", + + [APDU_CODE_WINK] = "Wink", + [APDU_CODE_MEMORY_REFRESH] = "Memory Refresh", + [APDU_CODE_QUERY_SNVT] = "Query SNVT", + [APDU_CODE_NV_FETCH] = "NV Fetch", + + [APDU_CODE_DEVICE_ESCAPE] = "Device Escape", + [APDU_CODE_RTR_FAR_SIDE_ESC] = "Rtr Far Side Escape", + [APDU_CODE_SERVICE_PIN] = "Service Pin" + } + +function nvApduDissector(buff, pinfo, parentPdu, packetType, addressString) + local directionOut = getBits(buff(0,1):uint(), 6, 1) + local directionStringTable = { [0] = "input", [1] = "output" } + local selector = buff(0,2) + + selector[0] = selector[0] - 128 + + local apdu = parentPdu:add(buff(0, buff:len()), "APDU (NV) " .. directionStringTable[directionOut] .. " " .. getHexString(selector, 2)) +end + +function genericApduDissector(buff, pinfo, parentPdu, packetType, addressString) + local typeString = apduCodeStringTable[buff(0,1):uint()] + + if (typeString == nil) then + typeString = "UNKNOWN" + end + + local code = getBits(buff(0,1):uint(), 5, 6) + local apdu = parentPdu:add(buff(0, buff:len()), "APDU (generic) " .. "code " .. code) + +-- pinfo.cols.info = addressString .. " " .. getHexString(buff(0,1):tvb(), 1) .. " " .. typeString + pinfo.cols.info = addressString .. " " .. getHexString(buff(0,1):tvb(), 1) .. " " +end + +function nmApduDissector(buff, pinfo, parentPdu, packetType, addressString) + local typeString = apduCodeStringTable[buff(0,1):uint()] + + if (typeString == nil) then + typeString = "UNKNOWN" + end + + local apdu = parentPdu:add(buff(0, buff:len()), "APDU (NetMgt) " .. getHexString(buff(0,1):tvb(), 1) .. " " .. typeString) + pinfo.cols.info = addressString .. " " .. getHexString(buff(0,1):tvb(), 1) .. " " .. typeString +end + +function diagApduDissector(buff, pinfo, parentPdu, packetType, addressString) + local typeString = apduCodeStringTable[buff(0,1):uint()] + + if (typeString == nil) then + typeString = "UNKNOWN" + end + + local apdu = parentPdu:add(buff(0, buff:len()), "APDU (Diag) " .. getHexString(buff(0,1):tvb(), 1) .. " " .. typeString) + pinfo.cols.info = addressString .. " " .. getHexString(buff(0,1):tvb(), 1) .. " " .. typeString +end + +function foreignApduDissector(buff, pinfo, parentPdu, packetType, addressString) + local code = getBits(buff(0,1):uint(), 3, 4) + local apdu = parentPdu:add(buff(0, buff:len()), "APDU (foreign) " .. "code " .. code) +end + +function apduDissector(buff, pinfo, parentPdu, packetType, addressString) + local destType = buff(0,1):uint() + + if (getBits(destType, 7, 1) == 1) then + nvApduDissector(buff, pinfo, parentPdu, packetType, addressString) + else + if (getBits(destType, 6, 1) == 0) then + genericApduDissector(buff, pinfo, parentPdu, packetType, addressString) + else + if (getBits(destType, 5, 1) == 1) then + nmApduDissector(buff, pinfo, parentPdu, packetType, addressString) + else + if (getBits(destType, 4, 1) == 1) then + diagApduDissector(buff, pinfo, parentPdu, packetType, addressString) + else + foreignApduDissector(buff, pinfo, parentPdu, packetType, addressString) + end + end + end + end +end + + + + + +-- Functions to dissect a TPDU +TPDU_TYPE_ACKD = 0 +TPDU_TYPE_UNACK_RPT = 1 +TPDU_TYPE_ACK = 2 +TPDU_TYPE_REMINDER = 4 +TPDU_TYPE_REM_MSG = 5 + +tpduTypeStringTable = { [TPDU_TYPE_ACKD ] = "Ackd", + [TPDU_TYPE_UNACK_RPT] = "Unack-Rpt", + [TPDU_TYPE_ACK ] = "Ack", + [TPDU_TYPE_REMINDER ] = "Rem", + [TPDU_TYPE_REM_MSG ] = "Rem/Msg" + } +tpduDissectorTable = { [TPDU_TYPE_ACKD ] = apduDissector, + [TPDU_TYPE_UNACK_RPT] = apduDissector, + --[TPDU_TYPE_ACK ] = apduDissector, + --[TPDU_TYPE_REMINDER ] = , + --[TPDU_TYPE_REM_MSG ] = + } + +function tpduDissector(buff, pinfo, npdu, packetType, addressString) + local tpdu = npdu:add(buff(0, buff:len()), "TPDU"); + local header = buff(0,1):uint() + local tpduType = getBits(header, 6, 3) + local tpduTypeString = tpduTypeStringTable[tpduType]; + + tpdu:add(buff(0,1), "Auth " .. getBits(header, 7, 1)) + tpdu:add(buff(0,1), "TPDUtype " .. tpduTypeString) + tpdu:add(buff(0,1), "Transaction # " .. getBits(header, 3, 4)) + + local tpduContentDissector = tpduDissectorTable[tpduType] + + if (tpduContentDissector ~= nil) then + tpduContentDissector(buff(1, buff:len() - 1):tvb(), pinfo, tpdu, packetType, addressString .. " " .. tpduTypeString) + else + pinfo.cols.info = addressString .. " " .. tpduTypeString +-- pinfo.cols.info = addressString .. " " .. tpduTypeString .. " " .. getHexString(buff(0,1):tvb(), 1) + tpdu:add(buff(1, buff:len() -1), "NO DISSECTOR AVAILABLE 1") +-- tpdu:add(buff(1, buff:len() -1), "Data[] " .. getHexString(buff(1, buff:len() -1):tvb(), buff:len())) + end +end + + + + +-- Function to dissect an SPDU +SPDU_TYPE_REQUEST = 0 +SPDU_TYPE_RESPONSE = 2 +SPDU_TYPE_REMINDER = 4 +SPDU_TYPE_REM_MSG = 5 + +spduTypeStringTable = { [SPDU_TYPE_REQUEST ] = "Request", + [SPDU_TYPE_RESPONSE] = "Response", + [SPDU_TYPE_REMINDER] = "Reminder", + [SPDU_TYPE_REM_MSG ] = "Rem/Msg" + } + +function spduDissector(buff, pinfo, npdu, packetType, addressString) + local spdu = npdu:add(buff(0, buff:len()), "SPDU"); + local header = buff(0,1):uint() + local spduTypeString = spduTypeStringTable[getBits(header, 6, 3)] + + spdu:add(buff(0,1), "Auth " .. getBits(header, 7, 1)) + spdu:add(buff(0,1), "SPDUtype " .. spduTypeString) + spdu:add(buff(0,1), "Transaction # " .. getBits(header, 3, 4)) + + apduDissector(buff(1, buff:len() - 1):tvb(), pinfo, spdu, packetType, addressString .. " " .. spduTypeString) +end + + + + +pduDissectorTable = { [PDU_TYPE_TPDU] = tpduDissector, + [PDU_TYPE_SPDU] = spduDissector, + --[PDU_TYPE_AUTHPDU] = , + [PDU_TYPE_APDU] = apduDissector + } + + + + + +-- function to dissect the source address +function sourceAddressDissector(buff, pinfo, npdu) + local srcSubnet = buff(1,1):uint(); + local srcNode = buff(2,1):uint(); + local addressString = "[" .. srcSubnet .. "/" .. getBits(srcNode, 6, 7) .. "]" + local sourceAddress = npdu:add(buff(1,2), "Src Address ".. addressString) + + if (srcNode >= 128) then + srcNode = srcNode - 128 + end + + sourceAddress:add(buff(1,1), "Subnet " .. srcSubnet) + sourceAddress:add(buff(2,1), "Node " .. srcNode) + + return addressString +end + + + + +function enclosedPduDissector(buff, pinfo, npdu, packetType, domainLength, addressString, offset) + local pduDissector = pduDissectorTable[getBits(buff(0,1):uint(), 5, 2)] + + addressString = getHexString0Low(buff(offset + domainLength, 1):tvb(), 1) .. " '" .. getHexString0(buff(offset, domainLength):tvb(), domainLength) .. "' " .. addressString + if (pduDissector ~= nil) then + pduDissector(buff(offset + domainLength, buff:len() - (offset + domainLength)):tvb(), pinfo, npdu, packetType, addressString) + else + npdu:add(buff(offset + domainLength, buff:len() - (offset + domainLength)), "NO DISSECTOR AVAILABLE 2") + end +end + +-- function to dissect a subnet broadcast address +function subnetBroadcastDissector(buff, pinfo, npdu, packetType, domainLength) + npdu:add(buff(4, domainLength), "Domain " .. getHexString0(buff(4, domainLength):tvb(), domainLength)) + + local sourceAddressString = sourceAddressDissector(buff, pinfo, npdu) + local dstSubnet = buff(3,1):uint(); + local destAddressString + + if (dstSubnet ~= 0) then + destAddressString = "[" .. dstSubnet .. "]" + else + destAddressString = "[DOMAIN]" + end + + local destAddress = npdu:add(buff(3,1), "Dst Address DS bdcast " .. destAddressString) + + destAddress:add(buff(3,1), "Subnet " .. dstSubnet) + + enclosedPduDissector(buff, pinfo, npdu, packetType, domainLength, sourceAddressString .. "->" .. destAddressString, 4) +end + + +-- function to dissect a group broadcast address +function groupBroadcastDissector(buff, pinfo, npdu, packetType, domainLength) + npdu:add(buff(4, domainLength), "Domain " .. getHexString0(buff(4, domainLength):tvb(), domainLength)) + + local sourceAddressString = sourceAddressDissector(buff, pinfo, npdu) + local dstGroup = buff(3,1):uint(); + local destAddressString = "[" .. dstGroup .. "]" + local destAddress = npdu:add(buff(3,1), "Dst Address Grp bdcast " .. destAddressString) + + enclosedPduDissector(buff, pinfo, npdu, packetType, domainLength, sourceAddressString .. "->" .. destAddressString, 4) +end + + +-- function to dissect a single node address +function singleNodeDissector(buff, pinfo, npdu, packetType, domainLength) + local srcNode = buff(2,1):uint(); + local dstSubnet = buff(3,1):uint(); + local dstNode = buff(4,1):uint(); + local isGroup + local dstLength + + -- Mask off top bit (always 1) + dstNode = getBits(dstNode, 6, 7); + + if (srcNode >= 128) then + srcNode = srcNode - 128 + isGroup = 0 + dstLength = 2 + else + isGroup = 1 + dstLength = 4 + end + + npdu:add(buff(3+dstLength, domainLength), "Domain " .. getHexString0(buff(3+dstLength, domainLength):tvb(), domainLength)) + + local sourceAddressString = sourceAddressDissector(buff, pinfo, npdu) + local destAddressString = "[" .. dstSubnet .. "/" .. dstNode .. "]" + + if (isGroup == 1) then + destAddressString = destAddressString .. " Grp[" .. buff(5,1):uint() .. "/" .. buff(6,1):uint() .. "]" + end + + local destAddress = npdu:add(buff(3,dstLength), "Dst Address " .. destAddressString) + + destAddress:add(buff(3,1), "Subnet " .. dstSubnet) + destAddress:add(buff(4,1), "Node " .. dstNode) + + if (isGroup) then + destAddress:add(buff(5,1), "Group " .. buff(5,1):uint()) + destAddress:add(buff(6,1), "Group Member " .. buff(6,1):uint()) + end + + enclosedPduDissector(buff, pinfo, npdu, packetType, domainLength, sourceAddressString .. "->" .. destAddressString, dstLength + 3) +end + + +-- function to dissect a Neuron ID address +function neuronIdDissector(buff, pinfo, npdu, packetType, domainLength) + local dstSubnet = buff(3,1):uint(); + + npdu:add(buff(10, domainLength), "Domain " .. getHexString0(buff(10, domainLength):tvb(), domainLength)) + + local sourceAddressString = sourceAddressDissector(buff, pinfo, npdu) + + local hexNid = getHexString0(buff(4,6):tvb(), 6) + + local destAddressString = "[" .. dstSubnet .. "/" .. hexNid .. "]" + local destAddress = npdu:add(buff(3,7), "Dst Address NID " .. destAddressString) + destAddress:add(buff(3,1), "Subnet " .. dstSubnet) + destAddress:add(buff(4,6), "Neuron ID " .. hexNid) + + enclosedPduDissector(buff, pinfo, npdu, packetType, domainLength, sourceAddressString .. "->" .. destAddressString, 10) +end + + + + +-- function to dissect a data packet + +ADDR_FMT_SUBNET_BDCST = 0 +ADDR_FMT_GROUP_BDCST = 1 +ADDR_FMT_SINGLE_NODE = 2 +ADDR_FMT_NID = 3 + +addrFormatStringTable = { [ADDR_FMT_SUBNET_BDCST] = "Subnet Broadcast", + [ADDR_FMT_GROUP_BDCST] = "Group Broadcast", + [ADDR_FMT_SINGLE_NODE] = "Single Node", + [ADDR_FMT_NID] = "Neuron ID" + } + +addrFormatDissectorTable = { [ADDR_FMT_SUBNET_BDCST] = subnetBroadcastDissector, + --[ADDR_FMT_GROUP_BDCST] = groupBroadcastDissector, + [ADDR_FMT_SINGLE_NODE] = singleNodeDissector, + [ADDR_FMT_NID] = neuronIdDissector + } + +domainLengthDecodeTable = { [0] = 0, + [1] = 1, + [2] = 3, + [3] = 6 + } + +function dataPacketDissector(buff, pinfo, dataPacket, packetType) + local networkHeader = dataPacket:add(buff(0,1), "L2 Header"); + local l2Header = buff(0,1):uint() + + networkHeader:add(buff(0,1), "Priority " .. getBits(l2Header, 7, 1)) + networkHeader:add(buff(0,1), "Alternate Path " .. getBits(l2Header, 6, 1)) + networkHeader:add(buff(0,1), "Delta BL (backlog increment) " .. getBits(l2Header, 5, 6)) + + local offsetToCrc = buff:len() - 2 + + local npdu = dataPacket:add(buff(1, offsetToCrc - 1), "NPDU") + local header = npdu:add(buff(1,1), "Header") + local npduHeader1 = buff(1,1):uint(); + + header:add(buff(1, 1), "Version " .. getBits(npduHeader1, 7, 2)) + header:add(buff(1, 1), "PDU Format " .. pduStringTable[getBits(npduHeader1, 5, 2)]) + + local addrFormat = getBits(npduHeader1, 3, 2) + local addrFormatString = addrFormatStringTable[addrFormat] + + if (addrFormatString ~= nil) then + header:add(buff(1, 1), "Addr Format " .. addrFormatString) + else + header:add(buff(1, 1), "Unknown Addr Format ") + end + + local domainLength = domainLengthDecodeTable[getBits(npduHeader1, 1, 2)] + + header:add(buff(1,1), "Domain Length " .. domainLength) + + local addrFormatDissector = addrFormatDissectorTable[addrFormat] + + if (addrFormatDissector ~= nil) then + addrFormatDissector(buff(1, offsetToCrc - 1):tvb(), pinfo, npdu, packetType, domainLength) + else + npdu:add(buff(1, offsetToCrc - 1), "NO DISSECTOR AVAILABLE 3") + end + + dataPacket:add(buff(offsetToCrc,2), "CRC " .. getHexString0(buff(offsetToCrc,2) :tvb(), 2)) +-- dataPacket:add(buff(offsetToCrc,2), "CRC " .. buff(offsetToCrc,2):uint()) +end + +--------------------------------------------------------------------------------------------------------------------------------- +-- Dissector Function Table +--------------------------------------------------------------------------------------------------------------------------------- + +dataDissectorFunctionTable = { [PACKETTYPE_DATA_PACKET] = dataPacketDissector, + [PACKETTYPE_DEVICE_REGISTRATION_REQUEST] = requestDissector, + [PACKETTYPE_DEVICE_REGISTRATION_UNSOLICITED] = deviceRegDissector, + [PACKETTYPE_DEVICE_REGISTRATION_SOLICITED] = deviceRegDissector, + [PACKETTYPE_CHANNEL_MEMBERSHIP_REQUEST] = requestDissector, + [PACKETTYPE_CHANNEL_MEMBERSHIP] = channelMembershipDissector, + [PACKETTYPE_SEND_LIST_REQUEST] = requestDissector, + [PACKETTYPE_SEND_LIST] = sendListDissector, + [PACKETTYPE_CHANNEL_ROUTING_REQUEST] = requestDissector, + [PACKETTYPE_CHANNEL_ROUTING] = channelRoutingDissector, + [PACKETTYPE_ACKNOWLEDGE] = ackDissector, + [PACKETTYPE_SEGMENT] = segmentDissector, + [PACKETTYPE_STATUS_HEALTH_STATISTICS_REQUEST] = requestDissector, + [PACKETTYPE_NAT_REQUEST] = requestDissector, + [PACKETTYPE_NAT_RESPONSE] = NatResponseDissector + --[PACKETTYPE_STATUS_HEALTH_STATISTICS_RESPONSE] = + } + + +--------------------------------------------------------------------------------------------------------------------------------- +-- declare our protocol +--------------------------------------------------------------------------------------------------------------------------------- +-- (name, filter name,description) +CTA_852_A_proto = Proto("852A","ANSI/CTA-852A","ANSI/CTA-852-A Protocol (LON over IP)") + +-- create a function to dissect it +function CTA_852_A_proto.dissector(buffer, pinfo, tree) + + -- set name used in protocol column + pinfo.cols.protocol = "852" + --pinfo.cols.protocol = getHexString(buffer(22,4):tvb(), 4)) --buffer(22,2):tvb() + --pinfo.cols.protocol = buffer(-8,4):uint() + + local subtree = tree:add(buffer(), "ANSI/CTA-852-A Protocol Data") + packetLength = buffer:len() + --packetLength = buffer(0,2) + headerLength = 20 + local header = subtree:add(buffer(0,headerLength), "Common CN/IP Header") + + header:add(buffer(0,2), "Data Packet Length " .. buffer(0,2) :uint()) + + -- Want to signal that we have a bad packet length + if (packetLength ~= buffer(0,2)) then + --dplItem:set_expert_flags(PI_MALFORMED, PI_WARN) + end + + if (buffer(2,1) :uint() > 127) then + header:add(buffer(2,1), "Version (VENDOR-SPECIFIC) " .. buffer(2,1) :uint()) + else + header:add(buffer(2,1), "Version " .. buffer(2,1) :uint()) + end + + local packetType = buffer(3,1):uint() + local packetTypeString + + local vendorCode = buffer(6,2) :uint() + + if (vendorCode == 1 or vendorCode == 2) then + packetTypeString = packetTypeTextTable[packetType] + if (packetTypeString == nil) then + packetTypeString = "Vendor-specific " .. vendorCode + else + packetTypeString = "Vendor " .. vendorCode .. ": " .. packetTypeString + end + else + if (vendorCode == 0) then + packetTypeString = packetTypeTextTable[packetType] + else + packetTypeString = "Vendor-specific" + end + end + + -- Make sure we have something valid + if (packetTypeString == nil) then + packetTypeString = "unknown" + end + + packetTypeString = getHexString(buffer(3,1):tvb(), 1) .. packetTypeString + +-- Pref.uint(label, default, descr) +-- ProtoField.uint8(abbr, [name], [base], [valuestring], [mask], [desc]) +-- one of base.DEC, base.HEX or base.OCT + header:add(buffer(3,1), "Packet Type " .. packetTypeString) +-- header:add(buffer(3,1), "Packet Type " .. packetTypeString .. " (" .. getHexString(buffer(3,1):tvb(), 1) .. ")") +-- header:add(buffer(3,1), "Packet Type " .. packetTypeString .. " (" .. buffer(3,1) :uint() .. ")") + pinfo.cols.info = packetTypeString + header:add(buffer(4,1), "Ext. Header Size " .. buffer(4,1) :uint()) + + local extHeaderSize = buffer(4,1) :uint() * 4 + + local protoFlags = buffer(5,1) :uint() + local protoFlagsSecurity = (protoFlags / 32) %2 + local protoFlagsSecurityText = { [0] = "", "(authenticated) "} + local protoFlagsTunnelledProtocolText = { [0] = "LON", "CEBus"} + local protocol = protoFlagsTunnelledProtocolText[protoFlags % 32] + + if (protocol == nil) then + protocol = "UNKNOWN PROTOCOL (" .. (protoFlags % 32):string() .. ") " + end + + header:add(buffer(5,1), "Protocol Flags " .. protocol .. protoFlagsSecurityText[protoFlagsSecurity] .. "(" .. getHexString0(buffer(5,1):tvb(), 1) .. ")") + + header:add(buffer(6,2), "Vendor Code " .. vendorCode) + header:add(buffer(8,4), "Session ID " .. getHexString(buffer(8,4) :tvb(), 4)) +-- header:add(buffer(8,4), "Session ID " .. buffer(8,4) :uint()) + header:add(buffer(12,4), "Sequence Number " .. buffer(12,4):uint()) + header:add(buffer(16,4), "Time Stamp " .. getHexString(buffer(16,4) :tvb(), 4)) +-- header:add(buffer(16,4), "Time Stamp " .. buffer(16,4):uint()) + + if (extHeaderSize > 0) then + local extHeader = subtree:add(buffer(headerLength,extHeaderSize), "Extended Header") + headerLength = headerLength + extHeaderSize +-- if (extHeaderSize == 12) then + printIpAddress(buffer(20,4):tvb(), extHeader, "IP Address ") + printIpAddress(buffer(24,4):tvb(), extHeader, "NAT Address ") + extHeader:add(buffer(28,2), "Port " .. buffer(28,2):uint()) + extHeader:add(buffer(30,2), "MBZ " .. buffer(30,2):uint()) +-- end + end + + dataLength = packetLength - headerLength + if (protoFlagsSecurity > 0) then + dataLength = dataLength - 16 + end + --dataLength = buffer(0,2) - headerLength + + local dataPacket = subtree:add(buffer(headerLength, dataLength), "Data (" .. packetTypeString .. ")") + local dissectorFunction = dataDissectorFunctionTable[packetType] + + if (dissectorFunction == nil) then +-- dataPacket:add(buffer(headerLength, dataLength), "NO DISSECTOR AVAILABLE 4") + dataPacket:add(buffer(headerLength,4), "DateTime " .. getHexString(buffer(headerLength,4) :tvb(), 4)) + headerLength = headerLength + 4 + dataLength = dataLength - 4 + dataPacket:add(buffer(headerLength, dataLength), getHexString(buffer(headerLength, dataLength):tvb(), dataLength)) + else + dissectorFunction(buffer(headerLength, dataLength):tvb(), pinfo, dataPacket, packetType, packetTypeString) + end +end + + +-- load the udp.port table +udp_table = DissectorTable.get("udp.port") + +-- register our protocol to handle udp port 1628/1629 +udp_table:add(1628,CTA_852_A_proto) +udp_table:add(1629,CTA_852_A_proto) diff --git a/dissectors/cta852-lon/LICENSE b/dissectors/cta852-lon/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/dissectors/cta852-lon/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/cta852-lon/README.md b/dissectors/cta852-lon/README.md new file mode 100644 index 0000000..921bf28 --- /dev/null +++ b/dissectors/cta852-lon/README.md @@ -0,0 +1,50 @@ +# ANSI/CTA-852 (LonWorks / LON sur IP, ISO/IEC 14908-4) + +Dissecteur Wireshark Lua du protocole **ANSI/CTA-852-A** (ISO/IEC 14908-4, +alias EIA-852 ou CN/IP), qui transporte les trames du bus de terrain +**LonWorks (LON, ISO/IEC 14908-1)** sur IP, très utilisé en gestion +technique du bâtiment. Il décode l'en-tête 852 (version, type de paquet, +extensions, numéro de séquence, horodatage, session) et les paquets de +gestion (enregistrement d'appareil, appartenance au canal, liste d'envoi, +routage du canal, statistiques, accusés, segments, extensions NAT de la +version 1.4), puis la charge LON : PDU, adressage (diffusion de +sous-réseau, groupe, sous-réseau / nœud, Neuron ID), TPDU / SPDU / APDU et +codes de messages LON, avec l'identifiant de transaction dans la colonne +Info. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Gesytec/wireshark_852 (fichier `852LON.lua`, version 1.4) | +| Commit importé | `81b4373255d62ab4f52114a905e3c0036d7967b2` du 25/06/2018 (branche `master`, dernier commit, qui modifie aussi le dissecteur) | +| Licence amont | GPL-3.0-or-later (en-tête du fichier : « This work is licensed under the terms of GPLv3 (or any later version) » ; © Richard T. Brown (Johnson Controls), Volker Schober et Matthias Luerkens (Gesytec) ; `LICENSE` amont : texte de la GPL v3) | +| Natif Wireshark 4.6.4 | **Oui, en partie** — dissecteurs natifs `cnip` (`packet-cnip.c`, CN/IP = EIA-852 sur UDP 1628-1629) et `lon` (`packet-lon.c`) ; ce script Lua en est une alternative plus détaillée sur certains points (extensions NAT, codes de messages), qui remplace le natif sur ces ports une fois chargé | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `852LON.lua` | Protocole `852a` (UDP 1628 et 1629), ≈ 1 170 lignes, fins de ligne CRLF d'origine conservées | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `852LON.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `852a`. Pour revenir au dissecteur natif, désactiver le +protocole `852A` (Analyse → Protocoles activés) et filtrer avec `cnip`. + +## Remarques + +- **Prend la main sur UDP 1628/1629**, à la place du `cnip` natif. +- Nombreuses variables et fonctions globales (`PACKETTYPE_*`, + `packetTypeTextTable`, `udp_table`…) comme dans l'amont ; risque de + collision de noms avec d'autres plugins Lua chargés en même temps. +- Utilise la bibliothèque `bit` (fournie par Wireshark), pas `bit32`. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/cx10-thomasp11/LICENSE b/dissectors/cx10-thomasp11/LICENSE new file mode 100644 index 0000000..ed6641e --- /dev/null +++ b/dissectors/cx10-thomasp11/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Thomas Peterson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/cx10-thomasp11/README.md b/dissectors/cx10-thomasp11/README.md new file mode 100644 index 0000000..4b30454 --- /dev/null +++ b/dissectors/cx10-thomasp11/README.md @@ -0,0 +1,70 @@ +# Cheerson CX-10DS — commandes de vol du quadricoptère (thomasp11) + +Dissecteur Wireshark Lua du protocole de commande du mini-quadricoptère +Cheerson CX-10DS (version Wi-Fi du CX-10). L'application mobile envoie au +drone, en UDP sur le port 8033, des trames courtes qui contiennent le +roulis, le tangage, les gaz, le lacet, une commande (décollage, +atterrissage, looping, étalonnage) et une somme de contrôle (issue #546). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/thomasp11/CX-10-Wireshark (`CX-10.lua`) | +| Commit importé | `f76437a24836ac0b1a07b2cfaa9f2313dab642cb` du 08/08/2017 (dernier commit de la branche par défaut), qui est aussi la dernière modification du script | +| Licence amont | MIT (`LICENSE` amont, © 2017 Thomas Peterson) ; aucune mention de licence dans le script. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur CX-10 dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/CX-10.lua` | Protocole `cx-10ds` (« CX-10DS Drone Protocol », ligne 9), champs `cs10ds.roll`, `.pitch`, `.throttle`, `.yaw`, `.command` et `.checksum` (lignes 10 à 15), dissecteur ligne 18 ; inscrit sur le port UDP 8033 (ligne 47) | + +## Utilisation + +Copier `src/CX-10.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis recharger +avec Ctrl+Maj+L. Les trames sont reconnues sur le port UDP 8033 ; pour +un autre port, « Décoder comme » › CX-10DS. Filtres : `cx-10ds`, +`cs10ds.throttle`, `cs10ds.command == "takeoff"` (les champs sont en +`cs10ds.*`, pas en `cx10ds.*`). + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. Le +dépôt amont ne contient aucune capture. Essais sur une capture +synthétique de trames de 8 octets (octet `0x66`, quatre axes, +commande, somme de contrôle, octet `0x99`), non commitée : + +| Essai | Résultat | +|---|---| +| Axes au neutre, gaz à 0, commande 0 | « Roll: 128 », « Pitch: 128 », « Throttle: 0 », « Yaw: 128 », « Command: none » | +| Commandes 1, 2, 64 et 128 | « takeoff », « land », « flip », « calibrate » | +| Commande inconnue (3) | « none » | +| Axes variés (100, 150, 200, 90) | valeurs exactes | +| Filtre `cs10ds.command == "takeoff"` | une trame sélectionnée | +| Trame de 3 octets | **erreur Lua** ligne 26 (`Range is out of bounds`) | + +## Limites constatées + +- La longueur n'est pas vérifiée : une trame de moins de 7 octets + provoque une erreur Lua (ligne 26 dans l'essai). +- Seuls les octets 1 à 6 sont lus : l'octet 0 et les octets au-delà du + septième ne sont pas affichés. La somme de contrôle (octet 6) n'est pas + vérifiée. +- Le champ `cs10ds.command` est une chaîne ajoutée sans plage d'octets + (ligne 41) : il n'est pas relié à l'octet de commande, et une + combinaison de bits (par exemple décollage + étalonnage) s'affiche + « none ». +- Les noms de champs utilisent le préfixe `cs10ds` alors que le + protocole s'appelle `cx-10ds` ; `cx10ds_proto` et `udp_table` sont des + variables globales. +- Pas d'heuristique : seul le port UDP 8033 est reconnu, et le sens + drone → application (vidéo, télémétrie) n'est pas décodé. diff --git a/dissectors/cx10-thomasp11/src/CX-10.lua b/dissectors/cx10-thomasp11/src/CX-10.lua new file mode 100644 index 0000000..0990434 --- /dev/null +++ b/dissectors/cx10-thomasp11/src/CX-10.lua @@ -0,0 +1,47 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/thomasp11/CX-10-Wireshark (CX-10.lua), +-- commit f76437a24836ac0b1a07b2cfaa9f2313dab642cb du 08/08/2017 (dernière modification du fichier : +-- commit f76437a24836ac0b1a07b2cfaa9f2313dab642cb du 08/08/2017). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- CX-10DS Drone Protocol Lua Dissector +-- Roll, Pitch, Throttle, Yaw, Command +-- declare our protocol +cx10ds_proto = Proto("cx-10ds","CX-10DS Drone Protocol") +cx10ds_proto.fields.roll = ProtoField.new ("Roll", "cs10ds.roll", ftypes.UINT8) +cx10ds_proto.fields.pitch = ProtoField.new ("Pitch", "cs10ds.pitch", ftypes.UINT8) +cx10ds_proto.fields.throttle = ProtoField.new ("Throttle", "cs10ds.throttle", ftypes.UINT8) +cx10ds_proto.fields.yaw = ProtoField.new ("Yaw", "cs10ds.yaw", ftypes.UINT8) +cx10ds_proto.fields.command = ProtoField.new ("Command", "cs10ds.command", ftypes.STRING) +cx10ds_proto.fields.checksum = ProtoField.new ("Checksum", "cs10ds.checksum", ftypes.UINT8) + +-- create a function to dissect it +function cx10ds_proto.dissector(buffer,pinfo,tree) + --local pf_roll = ProtoField.new ("Roll", "cs10ds.roll", ftypes.UINT8) + + pinfo.cols.protocol = "CX-10DS Drone Protocol" + local subtree = tree:add(cx10ds_proto,buffer(),"CX-10DS Drone Protocol Data") + + subtree:add(cx10ds_proto.fields.roll, buffer(1,1)) + subtree:add(cx10ds_proto.fields.pitch, buffer(2,1)) + subtree:add(cx10ds_proto.fields.throttle, buffer(3,1)) + subtree:add(cx10ds_proto.fields.yaw, buffer(4,1)) + local cmd_val = buffer(5,1):uint() + local cmd_string = "" + if cmd_val == 1 then + cmd_string = "takeoff" + elseif cmd_val == 2 then + cmd_string = "land" + elseif cmd_val == 64 then + cmd_string = "flip" + elseif cmd_val == 128 then + cmd_string = "calibrate" + else + cmd_string = "none" + end + subtree:add(cx10ds_proto.fields.command, cmd_string) + subtree:add(cx10ds_proto.fields.checksum, buffer(6,1)) +end +-- load the udp.port table +udp_table = DissectorTable.get("udp.port") +-- register our protocol to handle udp port 8033 +udp_table:add(8033,cx10ds_proto) diff --git a/dissectors/cyphal-opencyphal/LICENSE b/dissectors/cyphal-opencyphal/LICENSE new file mode 100644 index 0000000..6b4c3a7 --- /dev/null +++ b/dissectors/cyphal-opencyphal/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 OpenCyphal Garage + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/cyphal-opencyphal/README.md b/dissectors/cyphal-opencyphal/README.md new file mode 100644 index 0000000..46e5268 --- /dev/null +++ b/dissectors/cyphal-opencyphal/README.md @@ -0,0 +1,84 @@ +# Cyphal — dissecteurs d'OpenCyphal (v1.0 et v1.1) + +Dissecteurs Wireshark Lua du protocole Cyphal (anciennement UAVCAN v1), +bus de données temps réel pour drones, robots et véhicules spatiaux. Le +dépôt officiel d'OpenCyphal fournit trois scripts : un dissecteur de +session Cyphal v1.1 avec ses transports Cyphal/CAN et Cyphal/UDP, et les +deux anciens dissecteurs v1.0, l'un pour Cyphal/CAN, l'autre pour +Cyphal/UDP (issue #540). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/OpenCyphal/wireshark_plugins (`cyphal_1v1.lua`, `cyphal_1v0_can.lua`, `cyphal_1v0_udp.lua`) | +| Commit importé | `aecadaf274cd03c25f802c9223aa4c301762c593` du 28/08/2026 (dernier commit de la branche par défaut), qui est aussi la dernière modification des trois scripts | +| Licence amont | MIT (`LICENSE` amont, © OpenCyphal) ; aucune mention de licence dans les scripts. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Partiel : `uavcan_can` (UAVCAN/CAN, en C) et `uavcan_dsdl` existent, mais ni Cyphal/UDP ni Cyphal v1.1 | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Les scripts sont repris tels quels (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/cyphal_1v1.lua` | Cyphal v1.1 : `set_plugin_info` (ligne 8), protocoles `cyphalcan11`, `cyphaludp11` et `cyphal11` (lignes 53 à 55), préférences de réassemblage (lignes 219 à 234), heuristiques `can` et `udp` (lignes 1710 et 1714), « Décoder comme » `can.subdissector` (lignes 1718 et 1719), port UDP 9382 et « Décoder comme » `udp.port` (lignes 1721 à 1724) | +| `src/cyphal_1v0_can.lua` | Cyphal/CAN v1.0 : protocole `cyphalcan` (ligne 28), « Décoder comme » `can.subdissector` seulement (lignes 245 et 246) ; décode Heartbeat et GetInfo | +| `src/cyphal_1v0_udp.lua` | Cyphal/UDP v1.0 : protocole `cyphaludp` (ligne 91), port UDP 9382 (lignes 87, 258 et 259) | + +## Utilisation + +Le README amont recommande `cyphal_1v1.lua` seul, avec Wireshark 4.6 ou +plus récent, et déconseille de le charger avec l'ancien dissecteur CAN. +Copier le ou les scripts voulus dans le dossier des plugins Lua +personnels (« Aide › À propos de Wireshark › Dossiers »), puis recharger +avec Ctrl+Maj+L. + +- v1.1 : reconnu par heuristique sur CAN et UDP, et sur le port UDP 9382. + Filtres : `cyphal11`, `cyphalcan11`, `cyphaludp11`. +- v1.0 CAN : « Décoder comme » › « CAN next level dissector » › + CYPHALCAN (`tshark -d can.subdissector,cyphalcan`). Filtre : + `cyphalcan`. +- v1.0 UDP : port 9382. Filtre : `cyphaludp`. + +## Vérification à l'import + +`luac5.4 -p` : OK pour les trois scripts. tshark 4.6.4, scripts chargés +par `-X lua_script:` puis copiés dans le dossier des plugins : aucun +message au chargement. Le projet amont ne fournit pas de capture : sa +suite `tests/run.sh` génère des vecteurs avec deux programmes C +(`tests/generate_*_vectors.c`) et compare la sortie de tshark à des +fichiers de référence. Ces vecteurs, synthétiques, ne sont pas copiés. + +| Essai | Résultat | +|---|---| +| Suite amont `tests/run.sh` (v1.1), avec les scripts importés de ce dossier | **OK** : sorties identiques aux fichiers de référence `expected-valid-can`, `expected-fragments-can`, `expected-invalid-can`, `expected-valid-udp` et `expected-invalid-udp` | +| v1.0 UDP, trame Heartbeat (sujet 7509) construite d'après la spécification | en-tête décodé, CRC16 et CRC32-C conformes aux valeurs calculées ; charge laissée en octets bruts | +| v1.0 UDP, requête et réponse de service 430 | `service_id: 430`, `request_not_response` correct | +| v1.0 UDP, trame de 2 octets | **erreur Lua** ligne 172 (`Range is out of bounds`) | +| v1.0 UDP sur les vecteurs v1.1 du port 9382 | décodés à tort en v1.0 (`version: 130`) ; une **erreur Lua** ligne 195 sur une trame invalide | +| v1.0 CAN, Heartbeat et requête GetInfo en SocketCAN, par « Décoder comme » | identifiants, sujet 7509, service 430, nœuds et octet de queue décodés ; Heartbeat détaillé (uptime, santé, mode) | +| v1.0 CAN, trame sans données | **erreur Lua** ligne 154 (`TreeItem_add: Malformed packet`) | +| v1.0 CAN sur les vecteurs CAN v1.1 | bits réservés signalés en avertissement ; erreurs Lua lignes 193 et 199 sur des trames GetInfo tronquées | +| Trois scripts ensemble dans le dossier des plugins | le port 9382 revient à `cyphal_1v1.lua` (chargé en dernier) : une trame v1.0 y est décodée à tort en « UDP1.1 » | + +## Limites constatées + +- Les scripts v1.0 et v1.1 réclament tous deux le port UDP 9382 : ne + charger que l'un des deux à la fois, comme le conseille l'amont. +- `cyphal_1v0_udp.lua`, ligne 209 : `if not captured_crc16 == + computed_crc16` est toujours faux (priorité de `not`), si bien qu'un + CRC16 d'en-tête faux n'est jamais signalé. +- `cyphal_1v0_udp.lua`, ligne 146 : faute de frappe + `crc32_mismatch_export` dans la liste des experts (variable `nil`) ; + le script déclare aussi de nombreuses variables globales. +- `cyphal_1v0_udp.lua` : la CRC32-C est vérifiée trame par trame, sans + réassemblage des transferts sur plusieurs trames ; aucune vérification + du numéro de version (des trames v1.1 sont décodées comme v1.0). +- Les scripts v1.0 ne vérifient pas la longueur des trames : erreurs Lua + sur des trames courtes (voir le tableau). +- Le dissecteur natif `uavcan_can` reste prioritaire pour l'ancien + UAVCAN ; `cyphal_1v0_can.lua` ne s'active que par « Décoder comme ». diff --git a/dissectors/cyphal-opencyphal/src/cyphal_1v0_can.lua b/dissectors/cyphal-opencyphal/src/cyphal_1v0_can.lua new file mode 100644 index 0000000..9d563a6 --- /dev/null +++ b/dissectors/cyphal-opencyphal/src/cyphal_1v0_can.lua @@ -0,0 +1,246 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/OpenCyphal/wireshark_plugins (cyphal_1v0_can.lua), +-- commit aecadaf274cd03c25f802c9223aa4c301762c593 du 28/08/2026 (dernière modification du fichier : +-- commit aecadaf274cd03c25f802c9223aa4c301762c593 du 28/08/2026). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- Cyphal/CAN Wireshark Plugin +local cyphal_can_info = +{ + version = "1.0 beta", + author = "Erik Rainey", + description = "Cyphal/CAN Dissector, to be used through Decode As" +} +set_plugin_info(cyphal_can_info) + +-- Get the Normal Dissector for CANFD +local can = Dissector.get("can") +local canfd = Dissector.get("canfd") + +-- CAN and CAN FD fields we could access, but we'll need to convert into +-- FieldInfo during Dissection. +can_id_field = Field.new("can.id") +can_len_field = Field.new("can.len") +can_rtr = Field.new("can.flags.rtr") +can_xtd = Field.new("can.flags.xtd") +can_fd_brs = Field.new("canfd.flags.brs") + +-- Custom protocol dissector +local cyphal_can = Proto("cyphalcan", "Cyphal/CAN Protocol 1.0 Beta") + +cyphal_can_id = ProtoField.uint32("cyphal_can.can_id", "can_id", base.HEX) +local priorityTable = { + [0] = "Exceptional", + [1] = "Immediate", + [2] = "Fast", + [3] = "High", + [4] = "Nominal", + [5] = "Low", + [6] = "Slow", + [7] = "Optional" +} +cyphal_can_priority = ProtoField.uint32("cyphal_can.priority", "Priority", base.DEC, priorityTable, 0x1C000000, "Priority of the Transfer") +cyphal_can_len = ProtoField.uint8("cyphal_can.payload_length", "Payload Length", base.DEC) +local service_or_messageTable = { + [0] = "Message Transfer", + [1] = "Service Transfer" +} +cyphal_can_service_not_message = ProtoField.uint32("cyphal_can.service_not_message", "Message Type", base.DEC, service_or_messageTable, 0x02000000) +local request_or_responseTable = { + [0] = "Response", + [1] = "Request" +} +cypahl_can_request_not_response = ProtoField.uint32("cyphal_can.request_not_response", "Service Type", base.DEC, request_or_responseTable, 0x01000000) +local anonymousTable = { + [0] = "Regular", + [1] = "Anonymous" +} +cyphal_can_anonymous = ProtoField.uint32("cyphal_can.anonymous", "Transfer Type", base.DEC, anonymousTable, 0x01000000) +cyphal_can_subject_id = ProtoField.uint32("cyphal_can.subject_id", "subject_id", base.DEC, nil, 0x001FFF00) +cyphal_can_service_id = ProtoField.uint32("cyphal_can.service_id", "service_id", base.DEC, nil, 0x007FC000) +cyphal_can_destination_node_id = ProtoField.uint32("cyphal_can.destination_node_id", "destination_node_id", base.DEC, nil, 0x0003F80) +cyphal_can_source_node_id = ProtoField.uint32("cyphal_can.source_node_id", "source_node_id", base.DEC, nil, 0x0000007F) +cyphal_can_start_of_transfer = ProtoField.uint8("cyphal_can.start_of_transfer", "start_of_transfer", base.DEC, nil, 0x80) +cyphal_can_end_of_transfer = ProtoField.uint8("cyphal_can.end_of_transfer", "end_of_transfer", base.DEC, nil, 0x40) +cyphal_can_toggle = ProtoField.uint8("cyphal_can.toggle", "toggle", base.DEC, nil, 0x20) +cyphal_can_transfer_id = ProtoField.uint8("cyphal_can.transfer_id", "transfer_id", base.DEC, nil, 0x1F) +cyphal_can_tail_byte = ProtoField.uint8("cyphal_can.tail_byte", "tail_byte", base.HEX) +cyphal_can_crc = ProtoField.uint16("cyphal_can.crc16", "CRC16/CCITT-FALSE", base.HEX) + +cyphal_heartbeat_uptime = ProtoField.uint32("cyphal.heartbeat.uptime", "heartbeat.uptime", base.DEC) +local healthTable = { + [0] = "Nominal", + [1] = "Advisory", + [2] = "Caution", + [3] = "Warning" +} +cyphal_heartbeat_health = ProtoField.uint8("cyphal.heartbeat.health", "heartbeat.health", base.DEC, healthTable) +local modeTable = { + [0] = "Operational", + [1] = "Initialization", + [2] = "Maintenance", + [3] = "SoftwareUpdate" +} +cyphal_heartbeat_mode = ProtoField.uint8("cyphal.heartbeat.mode", "heartbeat.mode", base.DEC, modeTable) +cyphal_heartbeat_vssc = ProtoField.uint8("cyphal.heartbeat.vssc", "heartbeat.vssc", base.HEX) + +-- GetInfo +cyphal_getinfo_protocol_version_major = ProtoField.uint8("cyphal.getinfo.response.protocol_version.major", "protocol_version.major", base.DEC) +cyphal_getinfo_protocol_version_minor = ProtoField.uint8("cyphal.getinfo.response.protocol_version.minor", "protocol_version.minor", base.DEC) +cyphal_getinfo_hardware_version_major = ProtoField.uint8("cyphal.getinfo.response.hardware_version.major", "hardware_version.major", base.DEC) +cyphal_getinfo_hardware_version_minor = ProtoField.uint8("cyphal.getinfo.response.hardware_version.minor", "hardware_version.minor", base.DEC) +cyphal_getinfo_software_version_major = ProtoField.uint8("cyphal.getinfo.response.software_version.major", "software_version.major", base.DEC) +cyphal_getinfo_software_version_minor = ProtoField.uint8("cyphal.getinfo.response.software_version.minor", "software_version.minor", base.DEC) +cyphal_getinfo_software_vcs_revision_id = ProtoField.uint64("cyphal.getinfo.response.cyphal_getinfo_software_vcs_revision_id", "SW VCS Revision ID", base.HEX) +cyphal_getinfo_unique_id = ProtoField.bytes("cyphal.getinfo.response.unique_id", "Node Unique ID") +cyphal_getinfo_name = ProtoField.string("cyphal.getinfo.response.name", "Node Name") +cyphal_getinfo_software_image_crc = ProtoField.uint64("cyphal.getinfo.response.crc", "CRC-64-WE", base.HEX) +cyphal_getinfo_certificate_of_authenticity = ProtoField.bytes("cyphal.getinfo.response.certificate_of_authenticity", "Certificate of Authenticity") + +cyphal_can.fields = { + cyphal_can_id, + cyphal_can_priority, + cyphal_can_len, + cyphal_can_service_not_message, + cypahl_can_request_not_response, + cyphal_can_anonymous, + cyphal_can_subject_id, + cyphal_can_service_id, + cyphal_can_destination_node_id, + cyphal_can_source_node_id, + cyphal_can_tail_byte, + cyphal_can_start_of_transfer, + cyphal_can_end_of_transfer, + cyphal_can_toggle, + cyphal_can_transfer_id, + cyphal_can_crc, + -- heartbeat + cyphal_heartbeat_uptime, + cyphal_heartbeat_health, + cyphal_heartbeat_mode, + cyphal_heartbeat_vssc, + -- GetInfo + cyphal_getinfo_protocol_version_major, + cyphal_getinfo_protocol_version_minor, + cyphal_getinfo_hardware_version_major, + cyphal_getinfo_hardware_version_minor, + cyphal_getinfo_software_version_major, + cyphal_getinfo_software_version_minor, + cyphal_getinfo_software_vcs_revision_id, + cyphal_getinfo_unique_id, + cyphal_getinfo_name, + cyphal_getinfo_software_image_crc, + cyphal_getinfo_certificate_of_authority, + -- Add more fields + +} + +-- Function to dissect the CYPHAL/CAN +function cyphal_can.dissector(buffer, pinfo, tree) + + -- Extract the alrady found CAN ID + local can_id_fieldinfo = can_id_field() + local can_id = can_id_fieldinfo() + -- SocketCAN converts the DLC to a Length for you + local can_len_fieldinfo = can_len_field() + local can_len = can_len_fieldinfo() + -- we'll dissect the rest too potentially + local payload_len = buffer:len() - 1 + local payload = buffer(0, payload_len) + local tail_buffer = buffer(payload_len, 1) + + -- Create a subtree for the custom protocol + local header_tree = tree:add(cyphal_can, "Cyphal/CAN Header") -- no buffer() since it's over the existing CAN ID + local payload_tree = tree:add(cyphal_can, payload, "Cyphal/CAN Payload") + local footer_tree = tree:add(cyphal_can, tail_buffer, "Cyphal/CAN Footer") + + -- common header parts + header_tree:add(cyphal_can_len, payload_len) + header_tree:add(cyphal_can_priority, can_id) + header_tree:add(cyphal_can_service_not_message, can_id) + -- Tail Byte Decode + local tail_byte = tail_buffer:uint() + footer_tree:add(cyphal_can_start_of_transfer, tail_buffer, tail_byte) + footer_tree:add(cyphal_can_end_of_transfer, tail_buffer, tail_byte) + footer_tree:add(cyphal_can_toggle, tail_buffer, tail_byte) + footer_tree:add(cyphal_can_transfer_id, tail_buffer, tail_byte) + local sot = bit.rshift(bit.band(tail_byte, 0x80), 7) + local eot = bit.rshift(bit.band(tail_byte, 0x40), 6) + if sot == 0 and eot == 1 then + payload_tree:add(cyphal_can_crc, payload(payload_len - 2, 2)) + end + local snm = bit.band(bit.rshift(can_id, 25), 0x1) + if (snm == 1) then -- Services + local rnr = bit.band(bit.rshift(can_id, 24), 0x1) + header_tree:add(cypahl_can_request_not_response, can_id) + local r23 = bit.band(bit.rshift(can_id, 23), 0x1) + if r23 ~= 0 then -- not equal to + header_tree:add_expert_info(PI_MALFORMED, PI_WARN, "Reserved (23) is incorrect") + end + header_tree:add(cyphal_can_service_id, can_id) + header_tree:add(cyphal_can_destination_node_id, can_id) + local service_id = bit.band(bit.rshift(can_id, 14), 0x1FF) + -- Service Decodes based on service_id + if service_id == 430 then -- GetInfo + if rnr == 1 then -- Request + else -- Response + local offset = 0 + payload_tree:add(cyphal_getinfo_protocol_version_major, payload(offset, 1)) + offset = offset + 1 + payload_tree:add(cyphal_getinfo_protocol_version_minor, payload(offset, 1)) + offset = offset + 1 + payload_tree:add(cyphal_getinfo_hardware_version_major, payload(offset, 1)) + offset = offset + 1 + payload_tree:add(cyphal_getinfo_hardware_version_minor, payload(offset, 1)) + offset = offset + 1 + payload_tree:add(cyphal_getinfo_software_version_major, payload(offset, 1)) + offset = offset + 1 + payload_tree:add(cyphal_getinfo_software_version_minor, payload(offset, 1)) + offset = offset + 1 + payload_tree:add(cyphal_getinfo_software_vcs_revision_id, payload(offset, 8)) + offset = offset + 8 + payload_tree:add(cyphal_getinfo_unique_id, payload(offset, 16)) + offset = offset + 16 + local len = payload(offset, 1):uint() + offset = offset + 1 + payload_tree:add(cyphal_getinfo_name, payload(offset, len)) + offset = offset + len + len = payload(offset, 1):uint() + offset = offset + 1 + if len > 0 then + payload_tree:add(cyphal_getinfo_software_image_crc, payload(offset, len)) + end + offset = offset + len + len = payload(offset, 1):uint() + offset = offset + 1 + if len > 0 then + payload_tree:add(cyphal_getinfo_certificate_of_authority, payload(offset, len)) + end + end + end + else -- Messages + header_tree:add(cyphal_can_anonymous, can_id) + local resv = bit.band(bit.rshift(can_id, 20), 0x3) + if resv ~= 3 then -- not equal to + header_tree:add_expert_info(PI_MALFORMED, PI_WARN, "Reserved fields(23,22,21) are incorrect") + end + header_tree:add(cyphal_can_subject_id, can_id) + local r4 = bit.band(bit.rshift(can_id, 7), 0x1) + if r4 ~= 0 then -- not equal to + header_tree:add_expert_info(PI_MALFORMED, PI_WARN, "Reserved (7) is incorrect") + end + local subject_id = bit.band(bit.rshift(can_id, 8), 0x1FFF) + if subject_id == 7509 then -- Heartbeat! + payload_tree:add_le(cyphal_heartbeat_uptime, payload(0, 4)) + payload_tree:add(cyphal_heartbeat_health, payload(4, 1)) + payload_tree:add(cyphal_heartbeat_mode, payload(5, 1)) + payload_tree:add(cyphal_heartbeat_vssc, payload(6, 1)) + end + end + header_tree:add(cyphal_can_source_node_id, can_id) +end + +-- To use this, right click on the CANFD message and select Decode As +-- Then subtract the TCP port entry and make a new one which uses the +-- "CAN Next Level Dissector" and set the "current" colums to CYPHALCAN +local can_table = DissectorTable.get("can.subdissector") +can_table:add_for_decode_as(cyphal_can) \ No newline at end of file diff --git a/dissectors/cyphal-opencyphal/src/cyphal_1v0_udp.lua b/dissectors/cyphal-opencyphal/src/cyphal_1v0_udp.lua new file mode 100644 index 0000000..6cc0641 --- /dev/null +++ b/dissectors/cyphal-opencyphal/src/cyphal_1v0_udp.lua @@ -0,0 +1,259 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/OpenCyphal/wireshark_plugins (cyphal_1v0_udp.lua), +-- commit aecadaf274cd03c25f802c9223aa4c301762c593 du 28/08/2026 (dernière modification du fichier : +-- commit aecadaf274cd03c25f802c9223aa4c301762c593 du 28/08/2026). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- Cyphal/UDP Wireshark Plugin which supports only the Cyphal/UDP Header +local cyphal_udp_info = +{ + version = "1.0 beta", + author = "Erik Rainey", + description = "Cyphal/UDP Dissector" +} +set_plugin_info(cyphal_udp_info) + +-- CRC32-C table lookup +local crc32c_table = { + 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb, + 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, + 0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384, + 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, 0x5d1d08bf, 0xaf768bbc, 0xbc267848, 0x4e4dfb4b, + 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a, 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, + 0xaa64d611, 0x580f5512, 0x4b5fa6e6, 0xb93425e5, 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa, + 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, 0xf779deae, 0x05125dad, 0x1642ae59, 0xe4292d5a, + 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a, 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, + 0x417b1dbc, 0xb3109ebf, 0xa0406d4b, 0x522bee48, 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957, + 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, 0x0c38d26c, 0xfe53516f, 0xed03a29b, 0x1f682198, + 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927, 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, + 0xdbfc821c, 0x2997011f, 0x3ac7f2eb, 0xc8ac71e8, 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7, + 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, 0xa65c047d, 0x5437877e, 0x4767748a, 0xb50cf789, + 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859, 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, + 0x7198540d, 0x83f3d70e, 0x90a324fa, 0x62c8a7f9, 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6, + 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, 0x3cdb9bdd, 0xceb018de, 0xdde0eb2a, 0x2f8b6829, + 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c, 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, + 0x082f63b7, 0xfa44e0b4, 0xe9141340, 0x1b7f9043, 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c, + 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, 0x55326b08, 0xa759e80b, 0xb4091bff, 0x466298fc, + 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c, 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, + 0xa24bb5a6, 0x502036a5, 0x4370c551, 0xb11b4652, 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d, + 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, 0xef087a76, 0x1d63f975, 0x0e330a81, 0xfc588982, + 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d, 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, + 0x38cc2a06, 0xcaa7a905, 0xd9f75af1, 0x2b9cd9f2, 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed, + 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, 0x0417b1db, 0xf67c32d8, 0xe52cc12c, 0x1747422f, + 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff, 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, + 0xd3d3e1ab, 0x21b862a8, 0x32e8915c, 0xc083125f, 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540, + 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, 0x9e902e7b, 0x6cfbad78, 0x7fab5e8c, 0x8dc0dd8f, + 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee, 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, + 0x69e9f0d5, 0x9b8273d6, 0x88d28022, 0x7ab90321, 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e, + 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, 0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e, + 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e, 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351 +} + +--- CRC32-C (Castagnoli) +--- @see https://users.ece.cmu.edu/~koopman/networks/dsn02/dsn02_koopman.pdf +--- @see https://crc32c.machinezoo.com/ +local function crc32c_calc(data) + local crc = 0xFFFFFFFF + local len = data:len() + for i = 1, len do + local index = bit.bxor(bit.band(crc, 0xFF), data:get_index(i - 1)) + crc = bit.bxor(bit.rshift(crc, 8), crc32c_table[index + 1]) + end + return bit.bnot(crc) +end + +--- CRC16-CCITT FALSE function +-- @param str The ByteArray to hash. +-- @return The CRC hash. +local function crc16_ccitt(array) + local crc = 0xffff -- initial + local len = array:len() + local poly = 0x1021 + local check = 0x8000 + for i = 0, len - 1 do + local c = bit.lshift(array:get_index(i), 8) + crc = bit.band(bit.bxor(crc, c), 0xFFFF) + for j = 1, 8 do + local k = bit.band(crc, check) + crc = bit.band(bit.lshift(crc, 1), 0xFFFF) + if k ~= 0 then + crc = bit.bxor(crc, poly) + end + end + end + return crc +end + +-- Protocol constants +local CYPHAL_UDP_PORT = 9382 -- The port number used by Cyphal/UDP +local CYPHAL_UDP_HEADER_SIZE = 24 -- The sizeof the Cyphal/UDP Header +local ANONYMOUS_UDP_NODE_ID = 65535 -- The Anonymous Node ID in Cyphal/UDP (not the same as in CAN!) +-- Custom protocol dissector +local cyphal_udp = Proto("cyphaludp", "Cyphal/UDP Protocol 1.0 beta") + +ipv4_src = ProtoField.ipv4("cyphal_udp.ip_src", "Source IPv4 Address") +ipv4_dst = ProtoField.ipv4("cyphal_udp.ip_dst", "Destination IPv4 Address") +ipv4_snm = ProtoField.bool("cyphal_udp.ip_service_not_message", "ip_service_not_message", base.NONE) +version = ProtoField.uint8("cyphal_udp.version", "version", base.DEC) +priority =ProtoField.uint8("cyphal_udp.priority", "priority", base.DEC) +source_node_id = ProtoField.uint16("cyphal_udp.source_node_id", "source_node_id", base.DEC) +destination_node_id = ProtoField.uint16("cyphal_udp.destination_node_id", "destination_node_id", base.DEC) +data_specifier = ProtoField.uint16("cyphal_udp.data_specifier", "data_specifier", base.DEC) +service_not_message = ProtoField.bool("cyphal_udp.service_not_message", "service_not_message", base.NONE) +subject_id = ProtoField.uint16("cyphal_udp.subject_id", "subject_id", base.DEC) +service_id = ProtoField.uint16("cyphal_udp.service_id", "service_id", base.DEC) +request_not_response = ProtoField.bool("cyphal_udp.request_not_response", "request_not_response", base.NONE) +transfer_id = ProtoField.uint64("cyphal_udp.transfer_id", "transfer_id", base.DEC) +frame_index_eot = ProtoField.uint32("cyphal_udp.frame_index_eot", "frame_index_eot", base.HEX) +frame_index = ProtoField.uint32("cyphal_udp.frame_index", "frame_index", base.DEC) +end_of_transfer = ProtoField.bool("cyphal_udp.end_of_transfer", "end_of_transfer", base.NONE) +user_data = ProtoField.uint16("cyphal_udp.user_data", "user_data", base.HEX) +crc16_ccitt_false = ProtoField.uint16("cyphal_udp.crc16_ccitt_false", "CRC16-CCITT-FALSE (BE)", base.HEX) +computed_crc16_ccitt_false = ProtoField.uint16("cyphal_udp.computed_crc16_ccitt_false", "CRC16-CCITT-FALSE [Computed]", base.HEX) +serialized_payload = ProtoField.bytes("cyphal_udp.serialized_payload", "serialized_payload", base.SPACE) +serialized_payload_size = ProtoField.uint32("cyphal_udp.serialized_payload_size", "serialized_payload_size", base.DEC) +computed_crc32 = ProtoField.uint32("cyphal_udp.computed_crc32", "CRC32-C [Computed]", base.HEX) +crc32 = ProtoField.uint32("cyphal_udp.crc32", "CRC32-C (LE)", base.HEX) + +-- Protocol fields +cyphal_udp.fields = { + ipv4_src, ipv4_dst, ipv4_snm, + version, priority, + source_node_id, + destination_node_id, + data_specifier, + service_not_message, + subject_id, + service_id, + request_not_response, + transfer_id, + frame_index_eot, + frame_index, + end_of_transfer, + user_data, + crc16_ccitt_false, + computed_crc16_ccitt_false, + serialized_payload, + serialized_payload_size, + computed_crc32, + crc32 + -- Add more fields as needed +} + +crc16_mismatch_expert = ProtoExpert.new("cyphal_udp.crc16_match", "crc16_match", expert.group.CHECKSUM, expert.severity.WARN) +crc32_mismatch_expert = ProtoExpert.new("cyphal_udp.crc32_match", "crc32_match", expert.group.CHECKSUM, expert.severity.WARN) + +cyphal_udp.experts = { + crc16_mismatch_expert, crc32_mismatch_export +} + +ipv4_source_address_field = Field.new("ip.src") +ipv4_destination_address_field = Field.new("ip.dst") + +-- Function to dissect the custom protocol +local function dissect_cyphal_udp(buffer, pinfo, tree) + -- Create a subtree for the custom protocol + local metadata_tree = tree:add(cyphal_udp, buffer(), "Cyphal/UDP Metadata") + local header_tree = tree:add(cyphal_udp, buffer(), "Cyphal/UDP Header") + local payload_tree = tree:add(cyphal_udp, buffer(), "Cyphal/UDP Payload") + local footer_tree = tree:add(cyphal_udp, buffer(), "Cyphal/UDP Footer") + + if (ipv4_source_address_field()) then + local ip_src = ipv4_source_address_field().value + metadata_tree:add(ipv4_src, ip_src) + end + if (ipv4_destination_address_field()) then + local ip_dst = ipv4_destination_address_field().value + metadata_tree:add(ipv4_dst, ip_dst) + end + + -- Add fields to the subtree + header_tree:add_le(version, buffer(0, 1)) + header_tree:add_le(priority, buffer(1, 1)) + header_tree:add_le(source_node_id, buffer(2, 2)) + local dst_node_id = buffer(4, 2):le_uint() + if dst_node_id == ANONYMOUS_UDP_NODE_ID then + header_tree:add_expert_info(PI_PROTOCOL, PI_NOTE, "Anonymous/Broadcast Destintation Node ID") + else + header_tree:add_le(destination_node_id, buffer(4, 2)) + end + local ds = buffer(6, 2):le_uint() + local port_id = bit.band(ds, 0x7FFF) + local snm = bit.rshift(bit.band(ds, 0x8000), 15) + local rnr = false + if snm == 1 then + if port_id > 16384 then + port_id = port_id - 16384 + rnr = true + end + header_tree:add_le(request_not_response, rnr) + header_tree:add_le(service_id, port_id) + else + header_tree:add_le(subject_id, port_id) + end + header_tree:add_le(service_not_message, snm) + header_tree:add_le(data_specifier, buffer(6, 2)) + header_tree:add_le(transfer_id, buffer(8, 8)) + header_tree:add_le(frame_index_eot, buffer(16, 4)) + local fi = buffer(16, 4):le_uint() + local fidx = bit.band(fi, 0x7FFFFFFF) + local eot = bit.rshift(bit.band(fi, 0x80000000), 31) + header_tree:add_le(frame_index, fidx) + header_tree:add_le(end_of_transfer, eot) + header_tree:add_le(user_data, buffer(20, 2)) + local header = buffer(0, CYPHAL_UDP_HEADER_SIZE-2):bytes() + local captured_crc16 = buffer(CYPHAL_UDP_HEADER_SIZE-2, 2) + header_tree:add(crc16_ccitt_false, captured_crc16) + local computed_crc16 = crc16_ccitt(header) + header_tree:add(computed_crc16_ccitt_false, computed_crc16) + -- process the number as BE + if not captured_crc16 == computed_crc16 then + header_tree:add_expert_info(PI_CHECKSUM, PI_WARN, "CRC16 Mismatch") + end + local len = buffer:len() + local crc_size = 0 + if eot == 1 then + crc_size = 4 + end + local rem = len - CYPHAL_UDP_HEADER_SIZE - crc_size -- the remaining bytes minus CRC32C (if EOT) + if rem > 0 then + payload_tree:add_le(serialized_payload_size, rem) + payload_tree:add_le(serialized_payload, buffer(CYPHAL_UDP_HEADER_SIZE, rem)) + end + if eot == 1 then + local captured_crc32 = buffer(len-crc_size, 4) + footer_tree:add_le(crc32, captured_crc32) + if fidx == 0 then -- We can only compute over 1 frame for now + local payload = buffer(CYPHAL_UDP_HEADER_SIZE, rem):bytes() + local crc32_local = crc32c_calc(payload) + footer_tree:add(computed_crc32, crc32_local) + if not crc32_local == captured_crc32 then + footer_tree:add_expert_info(PI_CHECKSUM, PI_WARN, "CRC32 Mismatch") + end + end + end + -- Add more field dissectors as needed +end + +-- UDP dissector +local udp_dissector = Dissector.get("udp") + +-- Register the custom protocol dissector +function cyphal_udp.dissector(buffer, pinfo, tree) + local src_port = pinfo.src_port + local dst_port = pinfo.dst_port + + -- Check if the UDP packet uses the custom protocol port + if src_port == CYPHAL_UDP_PORT or dst_port == CYPHAL_UDP_PORT then + local subtree = tree:add(cyphal_udp, buffer(), "Cyphal/UDP Protocol Data") + pinfo.cols.protocol = cyphal_udp.name + -- Call the custom protocol dissector + dissect_cyphal_udp(buffer, pinfo, subtree) + else + -- Call the default UDP dissector for other ports + udp_dissector:call(buffer, pinfo, tree) + end +end + +-- Register the custom protocol +local udp_port_table = DissectorTable.get("udp.port") +udp_port_table:add(CYPHAL_UDP_PORT, cyphal_udp) diff --git a/dissectors/cyphal-opencyphal/src/cyphal_1v1.lua b/dissectors/cyphal-opencyphal/src/cyphal_1v1.lua new file mode 100644 index 0000000..acdbea9 --- /dev/null +++ b/dissectors/cyphal-opencyphal/src/cyphal_1v1.lua @@ -0,0 +1,1725 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/OpenCyphal/wireshark_plugins (cyphal_1v1.lua), +-- commit aecadaf274cd03c25f802c9223aa4c301762c593 du 28/08/2026 (dernière modification du fichier : +-- commit aecadaf274cd03c25f802c9223aa4c301762c593 du 28/08/2026). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- Cyphal v1.1 session dissector with Cyphal/CAN and Cyphal/UDP transports. + +set_plugin_info({ + version = "1.1.0", + author = "OpenCyphal contributors", + description = "Cyphal v1.1 session dissector for Cyphal/CAN and Cyphal/UDP", +}) + +local SESSION_HEADER_SIZE = 24 +local TOPIC_NAME_MAX = 200 +local SUBJECT_ID_PINNED_MAX = 8191 +local CAN_SUBJECT_ID_MODULUS = 57203 +local CAN_SUBJECT_ID_NORMAL_MAX = SUBJECT_ID_PINNED_MAX + CAN_SUBJECT_ID_MODULUS -- 65394 +local CAN_SUBJECT_ID_GOSSIP_FIRST = CAN_SUBJECT_ID_NORMAL_MAX + 1 -- 65395 +local CAN_SUBJECT_ID_GOSSIP_COUNT = 140 +local CAN_SUBJECT_ID_BROADCAST = 65535 +local UDP_SUBJECT_ID_MODULUS = 8378431 +local UDP_SUBJECT_ID_NORMAL_MAX = SUBJECT_ID_PINNED_MAX + UDP_SUBJECT_ID_MODULUS -- 8386622 +local UDP_SUBJECT_ID_GOSSIP_FIRST = UDP_SUBJECT_ID_NORMAL_MAX + 1 -- 8386623 +local UDP_SUBJECT_ID_BROADCAST = 0x7FFFFF +local UDP_SUBJECT_ID_GOSSIP_COUNT = UDP_SUBJECT_ID_BROADCAST - UDP_SUBJECT_ID_GOSSIP_FIRST -- 1984 +local UDP_HEADER_SIZE = 32 +local UDP_HEADER_VERSION = 2 +local UDP_PORT = 9382 +local EVICTIONS_PINNED_MIN = 0xFFFFE000 +local UNICAST_SERVICE_ID = 511 +local REASSEMBLY_TIMEOUT_SECONDS = 30 + +local priority_names = { + [0] = "Exceptional", [1] = "Immediate", [2] = "Fast", [3] = "High", + [4] = "Nominal", [5] = "Low", [6] = "Slow", [7] = "Optional", +} + +local session_color_names = { + [1] = "Pink 1", [2] = "Pink 2", [3] = "Purple 1", [4] = "Purple 2", + [5] = "Green 1", [6] = "Green 2", [7] = "Green 3", [8] = "Yellow 1", + [9] = "Yellow 2", [10] = "Gray", +} + +local session_type_names = { + [0] = "Best-effort message", + [1] = "Reliable message", + [2] = "Message ACK", + [3] = "Message NACK", + [4] = "Best-effort response", + [5] = "Reliable response", + [6] = "Response ACK", + [7] = "Response NACK", + [8] = "Gossip", + [9] = "Scout", +} + +local cyphal_can = Proto("cyphalcan11", "Cyphal/CAN v1") +local cyphal_udp = Proto("cyphaludp11", "Cyphal/UDP v1.1") +local cyphal_session = Proto("cyphal11", "Cyphal v1.1 Session") + +local f_can_id = ProtoField.uint32("cyphalcan11.can_id", "Extended CAN ID", base.HEX) +local f_session_color = ProtoField.uint8( + "cyphalcan11.session_color", "Session color", base.DEC, session_color_names) +local f_version = ProtoField.string("cyphalcan11.version", "Protocol version") +local f_kind = ProtoField.string("cyphalcan11.kind", "Transfer kind") +local f_can_fd = ProtoField.bool("cyphalcan11.can_fd", "CAN FD frame") +local f_priority = ProtoField.uint8("cyphalcan11.priority", "Priority", base.DEC, priority_names) +local f_service = ProtoField.bool("cyphalcan11.service", "Service transfer") +local f_request = ProtoField.bool("cyphalcan11.request", "Request") +local f_reserved = ProtoField.uint8("cyphalcan11.reserved", "Reserved bits", base.HEX) +local f_v10_fixed = ProtoField.uint8("cyphalcan11.v10_fixed", "v1.0 fixed bits", base.BIN) +local f_subject_id = ProtoField.uint16("cyphalcan11.subject_id", "Subject-ID", base.DEC_HEX) +local f_service_id = ProtoField.uint16("cyphalcan11.service_id", "Service-ID", base.DEC) +local f_source = ProtoField.uint8("cyphalcan11.source_node_id", "Source node-ID", base.DEC) +local f_destination = ProtoField.uint8("cyphalcan11.destination_node_id", "Destination node-ID", base.DEC) +local f_anonymous = ProtoField.bool("cyphalcan11.anonymous", "Anonymous transfer") +local f_discriminator = ProtoField.uint8("cyphalcan11.anonymous_discriminator", "Anonymous discriminator", base.HEX) +local f_frame_payload = ProtoField.bytes("cyphalcan11.frame_payload", "Frame payload") +local f_tail = ProtoField.uint8("cyphalcan11.tail", "Tail byte", base.HEX) +local f_sot = ProtoField.bool("cyphalcan11.sot", "Start of transfer", 8, nil, 0x80) +local f_eot = ProtoField.bool("cyphalcan11.eot", "End of transfer", 8, nil, 0x40) +local f_toggle = ProtoField.bool("cyphalcan11.toggle", "Toggle", 8, nil, 0x20) +local f_transfer_id = ProtoField.uint8("cyphalcan11.transfer_id", "Transfer-ID", base.DEC, nil, 0x1F) +local f_fragment_index = ProtoField.uint32("cyphalcan11.fragment_index", "Fragment index", base.DEC) +local f_fragment_count = ProtoField.uint32("cyphalcan11.fragment_count", "Fragment count", base.DEC) +local f_reassembled_length = ProtoField.uint32("cyphalcan11.reassembled_length", "Reassembled length", base.DEC) +local f_reassembled_in = ProtoField.framenum("cyphalcan11.reassembled_in", "Reassembled in") +local f_crc = ProtoField.uint16("cyphalcan11.crc", "Transfer CRC", base.HEX) +local f_crc_calculated = ProtoField.uint16("cyphalcan11.crc_calculated", "Calculated transfer CRC", base.HEX) +local f_crc_good = ProtoField.bool("cyphalcan11.crc_good", "Transfer CRC good") +local f_payload = ProtoField.bytes("cyphalcan11.payload", "Opaque transfer payload") + +cyphal_can.fields = { + f_can_id, f_session_color, f_version, f_kind, f_can_fd, f_priority, f_service, f_request, f_reserved, f_v10_fixed, + f_subject_id, f_service_id, f_source, f_destination, f_anonymous, f_discriminator, + f_frame_payload, f_tail, f_sot, f_eot, f_toggle, f_transfer_id, f_fragment_index, + f_fragment_count, f_reassembled_length, f_reassembled_in, f_crc, f_crc_calculated, + f_crc_good, f_payload, +} + +local uf = {} +uf.version = ProtoField.uint8("cyphaludp11.version", "Header version", base.DEC, nil, 0x1F) +uf.priority = ProtoField.uint8("cyphaludp11.priority", "Priority", base.DEC, priority_names, 0xE0) +uf.void = ProtoField.uint8("cyphaludp11.void", "Void", base.HEX, nil, 0x1F) +uf.incompatibility = ProtoField.uint8("cyphaludp11.incompatibility", "Incompatibility", base.HEX, nil, 0xE0) +uf.transfer_id = ProtoField.uint64("cyphaludp11.transfer_id", "Transfer-ID", base.DEC) +uf.sender_uid = ProtoField.uint64("cyphaludp11.sender_uid", "Sender UID", base.HEX) +uf.frame_offset = ProtoField.uint32("cyphaludp11.frame_payload_offset", "Frame payload offset", base.DEC) +uf.transfer_size = ProtoField.uint32("cyphaludp11.transfer_payload_size", "Transfer payload size", base.DEC) +uf.prefix_crc = ProtoField.uint32("cyphaludp11.prefix_crc32c", "Payload prefix CRC-32C", base.HEX) +uf.prefix_crc_calculated = ProtoField.uint32( + "cyphaludp11.prefix_crc32c_calculated", "Calculated payload prefix CRC-32C", base.HEX) +uf.prefix_crc_good = ProtoField.bool("cyphaludp11.prefix_crc32c_good", "Payload prefix CRC-32C good") +uf.header_crc = ProtoField.uint32("cyphaludp11.header_crc32c", "Header CRC-32C", base.HEX) +uf.header_crc_calculated = ProtoField.uint32( + "cyphaludp11.header_crc32c_calculated", "Calculated header CRC-32C", base.HEX) +uf.header_crc_good = ProtoField.bool("cyphaludp11.header_crc32c_good", "Header CRC-32C good") +uf.subject_id = ProtoField.uint32("cyphaludp11.subject_id", "Subject-ID", base.DEC_HEX) +uf.scope = ProtoField.string("cyphaludp11.scope", "Delivery scope") +uf.source_endpoint = ProtoField.string("cyphaludp11.source_endpoint", "Source endpoint") +uf.destination_endpoint = ProtoField.string("cyphaludp11.destination_endpoint", "Destination endpoint") +uf.logical_source = ProtoField.string("cyphaludp11.logical_source", "Logical source") +uf.logical_destination = ProtoField.string("cyphaludp11.logical_destination", "Logical destination") +uf.sot = ProtoField.bool("cyphaludp11.sot", "Start of transfer") +uf.eot = ProtoField.bool("cyphaludp11.eot", "End of transfer") +uf.duplicate = ProtoField.bool("cyphaludp11.duplicate", "Duplicate frame") +uf.session_color = ProtoField.uint8( + "cyphaludp11.session_color", "Session color", base.DEC, session_color_names) +uf.frame_payload = ProtoField.bytes("cyphaludp11.frame_payload", "Frame payload") +uf.fragment_count = ProtoField.uint32("cyphaludp11.fragment_count", "Fragment count", base.DEC) +uf.reassembled_length = ProtoField.uint32("cyphaludp11.reassembled_length", "Reassembled length", base.DEC) +uf.reassembled_in = ProtoField.framenum("cyphaludp11.reassembled_in", "Reassembled in") +uf.payload = ProtoField.bytes("cyphaludp11.payload", "Opaque transfer payload") + +cyphal_udp.fields = { + uf.version, uf.priority, uf.void, uf.incompatibility, uf.transfer_id, uf.sender_uid, + uf.frame_offset, uf.transfer_size, uf.prefix_crc, uf.prefix_crc_calculated, uf.prefix_crc_good, + uf.header_crc, uf.header_crc_calculated, uf.header_crc_good, uf.subject_id, uf.scope, + uf.source_endpoint, uf.destination_endpoint, uf.logical_source, uf.logical_destination, + uf.sot, uf.eot, uf.duplicate, uf.session_color, + uf.frame_payload, uf.fragment_count, uf.reassembled_length, uf.reassembled_in, uf.payload, +} + +local sf_type = ProtoField.uint8("cyphal11.type", "Session type", base.DEC, session_type_names) +local sf_scope = ProtoField.string("cyphal11.scope", "Delivery scope") +local sf_void = ProtoField.bytes("cyphal11.void", "Void") +local sf_incompat8 = ProtoField.uint8("cyphal11.incompatibility8", "Incompatibility", base.HEX) +local sf_incompat32 = ProtoField.uint32("cyphal11.incompatibility32", "Incompatibility", base.HEX) +local sf_incompat64 = ProtoField.uint64("cyphal11.incompatibility64", "Incompatibility", base.HEX) +local sf_lage = ProtoField.int8("cyphal11.lage", "Log-age", base.DEC) +local sf_evictions = ProtoField.uint32("cyphal11.evictions", "Evictions", base.DEC) +local sf_topic_hash = ProtoField.uint64("cyphal11.topic_hash", "Topic hash", base.HEX) +local sf_message_tag = ProtoField.uint64("cyphal11.message_tag", "Message tag", base.HEX) +local sf_response_tag = ProtoField.uint8("cyphal11.response_tag", "Response correlation tag", base.HEX) +local sf_response_seqno = ProtoField.uint64("cyphal11.response_seqno", "Response sequence number", base.DEC) +local sf_name_length = ProtoField.uint8("cyphal11.name_length", "Name/pattern length", base.DEC) +local sf_topic_name = ProtoField.string("cyphal11.topic_name", "Topic name") +local sf_resolved_topic_name = ProtoField.string("cyphal11.resolved_topic_name", "Resolved topic name") +local sf_pattern = ProtoField.string("cyphal11.pattern", "Scout pattern") +local sf_expected_subject = ProtoField.uint32("cyphal11.expected_subject_id", "Calculated subject-ID", base.DEC_HEX) +local sf_expected_gossip = ProtoField.uint32("cyphal11.expected_gossip_subject_id", "Calculated gossip subject-ID", base.DEC_HEX) +local sf_pinned = ProtoField.bool("cyphal11.pinned", "Pinned topic") +local sf_name_hash_good = ProtoField.bool("cyphal11.name_hash_good", "Topic name hash good") +local sf_application_payload = ProtoField.bytes("cyphal11.application_payload", "Application payload") +local sf_padding = ProtoField.bytes("cyphal11.padding", "Transport padding") +local sf_trailing = ProtoField.bytes("cyphal11.trailing_data", "Trailing data") +local sf_raw_body = ProtoField.bytes("cyphal11.raw_body", "Undecoded session body") + +cyphal_session.fields = { + sf_type, sf_scope, sf_void, sf_incompat8, sf_incompat32, sf_incompat64, sf_lage, + sf_evictions, sf_topic_hash, sf_message_tag, sf_response_tag, sf_response_seqno, + sf_name_length, sf_topic_name, sf_resolved_topic_name, sf_pattern, sf_expected_subject, sf_expected_gossip, + sf_pinned, sf_name_hash_good, sf_application_payload, sf_padding, sf_trailing, sf_raw_body, +} + +local ex_can_malformed = ProtoExpert.new( + "cyphalcan11.expert.malformed", "Malformed Cyphal/CAN frame", expert.group.MALFORMED, expert.severity.ERROR) +local ex_can_sequence = ProtoExpert.new( + "cyphalcan11.expert.sequence", "Invalid transfer sequence", expert.group.SEQUENCE, expert.severity.ERROR) +local ex_can_crc = ProtoExpert.new( + "cyphalcan11.expert.crc", "Bad transfer CRC", expert.group.CHECKSUM, expert.severity.ERROR) +local ex_can_noncanonical = ProtoExpert.new( + "cyphalcan11.expert.noncanonical", "Non-canonical Cyphal/CAN identifier", expert.group.PROTOCOL, expert.severity.WARN) +local ex_can_reassembly = ProtoExpert.new( + "cyphalcan11.expert.reassembly", "Transfer reassembly failed", expert.group.REASSEMBLE, expert.severity.ERROR) + +cyphal_can.experts = { ex_can_malformed, ex_can_sequence, ex_can_crc, ex_can_noncanonical, ex_can_reassembly } + +local udp_ex = {} +udp_ex.malformed = ProtoExpert.new( + "cyphaludp11.expert.malformed", "Malformed Cyphal/UDP frame", expert.group.MALFORMED, expert.severity.ERROR) +udp_ex.header_crc = ProtoExpert.new( + "cyphaludp11.expert.header_crc", "Bad Cyphal/UDP header CRC", expert.group.CHECKSUM, expert.severity.ERROR) +udp_ex.prefix_crc = ProtoExpert.new( + "cyphaludp11.expert.prefix_crc", "Bad Cyphal/UDP payload CRC", expert.group.CHECKSUM, expert.severity.ERROR) +udp_ex.incompatible = ProtoExpert.new( + "cyphaludp11.expert.incompatible", "Unsupported Cyphal/UDP header", expert.group.PROTOCOL, expert.severity.ERROR) +udp_ex.noncanonical = ProtoExpert.new( + "cyphaludp11.expert.noncanonical", "Non-canonical Cyphal/UDP header", expert.group.PROTOCOL, expert.severity.WARN) +udp_ex.reassembly = ProtoExpert.new( + "cyphaludp11.expert.reassembly", "Cyphal/UDP reassembly failed", expert.group.REASSEMBLE, expert.severity.ERROR) + +cyphal_udp.experts = { + udp_ex.malformed, udp_ex.header_crc, udp_ex.prefix_crc, udp_ex.incompatible, + udp_ex.noncanonical, udp_ex.reassembly, +} + +local ex_session_malformed = ProtoExpert.new( + "cyphal11.expert.malformed", "Malformed session header", expert.group.MALFORMED, expert.severity.ERROR) +local ex_session_incompatible = ProtoExpert.new( + "cyphal11.expert.incompatible", "Unsupported incompatible session data", expert.group.PROTOCOL, expert.severity.ERROR) +local ex_session_scope = ProtoExpert.new( + "cyphal11.expert.scope", "Invalid delivery scope", expert.group.PROTOCOL, expert.severity.ERROR) +local ex_session_mismatch = ProtoExpert.new( + "cyphal11.expert.mismatch", "Inconsistent session metadata", expert.group.PROTOCOL, expert.severity.WARN) +local ex_session_unsupported = ProtoExpert.new( + "cyphal11.expert.unsupported", "Unsupported session type", expert.group.UNDECODED, expert.severity.WARN) + +cyphal_session.experts = { + ex_session_malformed, ex_session_incompatible, ex_session_scope, ex_session_mismatch, ex_session_unsupported, +} + +cyphal_can.prefs.max_reassembly_bytes = Pref.uint( + "Maximum reassembled transfer size", 16 * 1024 * 1024, + "Abort a malformed or hostile transfer when its buffered payload exceeds this many bytes") +cyphal_udp.prefs.max_reassembly_bytes = Pref.uint( + "Maximum reassembled transfer size", 16 * 1024 * 1024, + "Abort a malformed or hostile transfer when its advertised payload exceeds this many bytes") +cyphal_udp.prefs.max_buffered_bytes = Pref.uint( + "Maximum total UDP reassembly memory", 64 * 1024 * 1024, + "Abort a transfer rather than retaining more fragment payload bytes across all active UDP transfers") +cyphal_udp.prefs.max_active_transfers = Pref.uint( + "Maximum active UDP transfers", 1024, + "Reject new incomplete transfers once this many UDP transfers are being reassembled") +cyphal_udp.prefs.max_fragments = Pref.uint( + "Maximum UDP fragments per transfer", 65536, + "Abort a transfer that requires more datagrams than this limit") +cyphal_udp.prefs.max_cached_payload_bytes = Pref.uint( + "Maximum completed UDP payload cache", 64 * 1024 * 1024, + "Retain at most this many reassembled payload bytes for packet-detail redissection") + +local function optional_field(name) + local ok, value = pcall(function() return Field.new(name) end) + return ok and value or nil +end + +local can_id_field = optional_field("can.id") +local can_len_field = optional_field("can.len") +local can_xtd_field = optional_field("can.flags.xtd") +local can_rtr_field = optional_field("can.flags.rtr") +local can_err_field = optional_field("can.flags.err") +local can_fd_field = optional_field("canfd.flags.fdf") +local can_bus_field = optional_field("can.bus_id") +local interface_field = optional_field("frame.interface_id") + +local function field_value(extractor) + if extractor == nil then return nil end + local info = extractor() + if info == nil then return nil end + local ok, value = pcall(function() return info() end) + if ok then return value end + return info.value +end + +local function field_number(extractor) + local value = field_value(extractor) + if type(value) == "boolean" then return value and 1 or 0 end + return value ~= nil and tonumber(value) or nil +end + +local function add_generated(tree, field, value) + local item = tree:add(field, value) + item:set_generated() + return item +end + +local function add_expert(item, which, _range, message) + item:add_proto_expert_info(which, message) +end + +local function u32le(raw, offset) + local a, b, c, d = string.byte(raw, offset + 1, offset + 4) + if d == nil then return nil end + return a | (b << 8) | (c << 16) | (d << 24) +end + +local function u48le(raw, offset) + local out = 0 + for i = 5, 0, -1 do + local byte = string.byte(raw, offset + i + 1) + if byte == nil then return nil end + out = (out << 8) | byte + end + return out +end + +local function u64_new(lo, hi) + return { lo = lo & 0xFFFFFFFF, hi = hi & 0xFFFFFFFF } +end + +local function u64_from_le(raw, offset) + local lo = u32le(raw, offset) + local hi = u32le(raw, offset + 4) + return (lo ~= nil and hi ~= nil) and u64_new(lo, hi) or nil +end + +local function u64_xor(a, b) + return u64_new(a.lo ~ b.lo, a.hi ~ b.hi) +end + +local function u64_xor_small(a, value) + return u64_new(a.lo ~ value, a.hi) +end + +local function u64_equal(a, b) + return a.lo == b.lo and a.hi == b.hi +end + +local function u64_hex(value) + return string.format("%08x%08x", value.hi, value.lo) +end + +local function u64_mod(value, modulus) + local limbs = { + value.hi >> 16, value.hi & 0xFFFF, + value.lo >> 16, value.lo & 0xFFFF, + } + local out = 0 + for _, limb in ipairs(limbs) do out = ((out * 65536) + limb) % modulus end + return out +end + +local function u64_mul_128(a, b) + local aa = { a.lo & 0xFFFF, a.lo >> 16, a.hi & 0xFFFF, a.hi >> 16 } + local bb = { b.lo & 0xFFFF, b.lo >> 16, b.hi & 0xFFFF, b.hi >> 16 } + local product = { 0, 0, 0, 0, 0, 0, 0, 0 } + for i = 1, 4 do + for j = 1, 4 do product[i + j - 1] = product[i + j - 1] + aa[i] * bb[j] end + end + for i = 1, 7 do + local carry = product[i] // 65536 + product[i] = product[i] % 65536 + product[i + 1] = product[i + 1] + carry + end + product[8] = product[8] % 65536 + local lo = u64_new(product[1] | (product[2] << 16), product[3] | (product[4] << 16)) + local hi = u64_new(product[5] | (product[6] << 16), product[7] | (product[8] << 16)) + return lo, hi +end + +local function rapid_mix(a, b) + local lo, hi = u64_mul_128(a, b) + return u64_xor(lo, hi) +end + +local rapid_secret = { + u64_new(0xAA6C78A5, 0x2D358DCC), u64_new(0x962EACC9, 0x8BB84B93), + u64_new(0xD433D4A3, 0x4B33A62E), u64_new(0x1DE1AA47, 0x4D5A2DA5), + u64_new(0x78BD642F, 0xA0761D64), u64_new(0xA0B428DB, 0xE7037ED1), + u64_new(0x281C388C, 0x90ED1765), u64_new(0xAAAAAAAA, 0xAAAAAAAA), +} + +local function rapid_read64(raw, offset) + return u64_from_le(raw, offset) +end + +local function rapid_read32(raw, offset) + return u64_new(u32le(raw, offset), 0) +end + +local function rapidhash(raw) + local length = #raw + local seed = rapid_mix(rapid_secret[3], rapid_secret[2]) + local a, b = u64_new(0, 0), u64_new(0, 0) + local offset, remaining = 0, length + if length <= 16 then + if length >= 4 then + seed = u64_xor_small(seed, length) + if length >= 8 then + a = rapid_read64(raw, 0) + b = rapid_read64(raw, length - 8) + else + a = rapid_read32(raw, 0) + b = rapid_read32(raw, length - 4) + end + elseif length > 0 then + local first = string.byte(raw, 1) + local last = string.byte(raw, length) + local middle = string.byte(raw, (length >> 1) + 1) + a = u64_new(last, first << 13) -- first << 45 + b = u64_new(middle, 0) + end + else + if length > 112 then + local see1, see2, see3 = seed, seed, seed + local see4, see5, see6 = seed, seed, seed + repeat + seed = rapid_mix(u64_xor(rapid_read64(raw, offset), rapid_secret[1]), + u64_xor(rapid_read64(raw, offset + 8), seed)) + see1 = rapid_mix(u64_xor(rapid_read64(raw, offset + 16), rapid_secret[2]), + u64_xor(rapid_read64(raw, offset + 24), see1)) + see2 = rapid_mix(u64_xor(rapid_read64(raw, offset + 32), rapid_secret[3]), + u64_xor(rapid_read64(raw, offset + 40), see2)) + see3 = rapid_mix(u64_xor(rapid_read64(raw, offset + 48), rapid_secret[4]), + u64_xor(rapid_read64(raw, offset + 56), see3)) + see4 = rapid_mix(u64_xor(rapid_read64(raw, offset + 64), rapid_secret[5]), + u64_xor(rapid_read64(raw, offset + 72), see4)) + see5 = rapid_mix(u64_xor(rapid_read64(raw, offset + 80), rapid_secret[6]), + u64_xor(rapid_read64(raw, offset + 88), see5)) + see6 = rapid_mix(u64_xor(rapid_read64(raw, offset + 96), rapid_secret[7]), + u64_xor(rapid_read64(raw, offset + 104), see6)) + offset = offset + 112 + remaining = remaining - 112 + until remaining <= 112 + seed = u64_xor(seed, see1) + see2 = u64_xor(see2, see3) + see4 = u64_xor(see4, see5) + seed = u64_xor(seed, see6) + see2 = u64_xor(see2, see4) + seed = u64_xor(seed, see2) + end + if remaining > 16 then + seed = rapid_mix(u64_xor(rapid_read64(raw, offset), rapid_secret[3]), + u64_xor(rapid_read64(raw, offset + 8), seed)) + if remaining > 32 then + seed = rapid_mix(u64_xor(rapid_read64(raw, offset + 16), rapid_secret[3]), + u64_xor(rapid_read64(raw, offset + 24), seed)) + if remaining > 48 then + seed = rapid_mix(u64_xor(rapid_read64(raw, offset + 32), rapid_secret[2]), + u64_xor(rapid_read64(raw, offset + 40), seed)) + if remaining > 64 then + seed = rapid_mix(u64_xor(rapid_read64(raw, offset + 48), rapid_secret[2]), + u64_xor(rapid_read64(raw, offset + 56), seed)) + if remaining > 80 then + seed = rapid_mix(u64_xor(rapid_read64(raw, offset + 64), rapid_secret[3]), + u64_xor(rapid_read64(raw, offset + 72), seed)) + if remaining > 96 then + seed = rapid_mix(u64_xor(rapid_read64(raw, offset + 80), rapid_secret[2]), + u64_xor(rapid_read64(raw, offset + 88), seed)) + end + end + end + end + end + end + a = u64_xor_small(rapid_read64(raw, offset + remaining - 16), remaining) + b = rapid_read64(raw, offset + remaining - 8) + end + a = u64_xor(a, rapid_secret[2]) + b = u64_xor(b, seed) + a, b = u64_mul_128(a, b) + return rapid_mix(u64_xor(a, rapid_secret[8]), u64_xor_small(u64_xor(b, rapid_secret[2]), remaining)) +end + +local function crc16_ccitt(raw) + local crc = 0xFFFF + for i = 1, #raw do + crc = crc ~ (string.byte(raw, i) << 8) + for _ = 1, 8 do + crc = ((crc & 0x8000) ~= 0) and (((crc << 1) ~ 0x1021) & 0xFFFF) or ((crc << 1) & 0xFFFF) + end + end + return crc +end + +local crc32c_table = {} +for index = 0, 255 do + local crc = index + for _ = 1, 8 do crc = ((crc & 1) ~= 0) and ((crc >> 1) ~ 0x82F63B78) or (crc >> 1) end + crc32c_table[index] = crc & 0xFFFFFFFF +end + +local function crc32c_add(crc, raw) + for i = 1, #raw do + local index = (crc ~ string.byte(raw, i)) & 0xFF + crc = ((crc >> 8) ~ crc32c_table[index]) & 0xFFFFFFFF + end + return crc +end + +local function crc32c(raw) + local crc = crc32c_add(0xFFFFFFFF, raw) + return (crc ~ 0xFFFFFFFF) & 0xFFFFFFFF +end + +local function calculated_subject(hash, evictions, modulus) + if evictions >= EVICTIONS_PINNED_MIN then + return 0xFFFFFFFF - evictions, true + end + local h = u64_mod(hash, modulus) + local e = evictions % modulus + return SUBJECT_ID_PINNED_MAX + 1 + ((h + ((e * e) % modulus)) % modulus), false +end + +local function bytes_are_zero(raw) + for i = 1, #raw do if string.byte(raw, i) ~= 0 then return false end end + return true +end + +local function printable(raw) + return (raw:gsub("[^!-~]", ".")) +end + +local function normalized_name(raw) + for i = 1, #raw do + local b = string.byte(raw, i) + if b < 33 or b > 126 then return nil end + end + local parts = {} + for part in raw:gmatch("[^/]+") do parts[#parts + 1] = part end + return table.concat(parts, "/") +end + +-- Gossip maps topic hashes to names. A subject-ID alone is insufficient because +-- distributed allocation permits the same topic to move between subjects. +local topic_names = {} + +local function learn_topic_name(hash, name) + local key = u64_hex(hash) + local known = topic_names[key] + if known == nil then + topic_names[key] = { name = name, ambiguous = false } + elseif known.name ~= name then + known.ambiguous = true + end +end + +local function resolve_topic_name(hash) + if hash == nil then return nil end + local known = topic_names[u64_hex(hash)] + if known == nil or known.ambiguous then return nil end + return known.name +end + +local function scope_for(meta) + if meta.service then return "unicast" end + if meta.subject_id == meta.broadcast_subject_id then return "broadcast" end + if meta.subject_id >= meta.gossip_first then return "sharded" end + return "multicast" +end + +local function source_text(meta) + return meta.anonymous and "anon" or tostring(meta.source) +end + +local function destination_text(meta) + if meta.service then return string.format("N%d", meta.destination) end + if meta.subject_id == meta.broadcast_subject_id then return string.format("S%08x/BCAST", meta.subject_id) end + if meta.subject_id >= meta.gossip_first then + return string.format("S%08x/G%0" .. meta.gossip_digits .. "d", + meta.subject_id, meta.subject_id - meta.gossip_first) + end + return string.format("S%08x", meta.subject_id) +end + +local function named_topic_destination(meta, name) + return string.format("%s →S%08x", name, meta.subject_id) +end + +local function info_context(meta) + return string.format("prio=%d tid=%d", meta.priority, meta.transfer_id or 0) +end + +local function classify_identifier(can_id) + local meta = { + can_id = can_id & 0x1FFFFFFF, + priority = (can_id >> 26) & 7, + service = ((can_id >> 25) & 1) ~= 0, + errors = {}, + subject_id_modulus = CAN_SUBJECT_ID_MODULUS, + gossip_first = CAN_SUBJECT_ID_GOSSIP_FIRST, + gossip_count = CAN_SUBJECT_ID_GOSSIP_COUNT, + gossip_digits = 3, + broadcast_subject_id = CAN_SUBJECT_ID_BROADCAST, + } + if meta.service then + meta.request = ((can_id >> 24) & 1) ~= 0 + meta.reserved = (can_id >> 23) & 1 + meta.service_id = (can_id >> 14) & 0x1FF + meta.destination = (can_id >> 7) & 0x7F + meta.source = can_id & 0x7F + meta.kind = meta.request and "service request" or "service response" + meta.session = meta.request and meta.service_id == UNICAST_SERVICE_ID + meta.version = meta.session and "1.1" or "1.0" + if meta.reserved ~= 0 then meta.errors[#meta.errors + 1] = { "noncanonical", "Reserved service bit 23 is nonzero" } end + if meta.source == meta.destination then meta.errors[#meta.errors + 1] = { "malformed", "Self-addressed service transfer" } end + else + meta.source = can_id & 0x7F + if ((can_id >> 7) & 1) ~= 0 then + meta.version = "1.1" + meta.kind = "16-bit message" + meta.subject_id = (can_id >> 8) & 0xFFFF + meta.reserved = (can_id >> 24) & 1 + meta.session = true + if meta.reserved ~= 0 then meta.errors[#meta.errors + 1] = { "noncanonical", "Reserved v1.1 message bit 24 is nonzero" } end + else + meta.version = "1.0" + meta.kind = "13-bit message" + meta.anonymous = ((can_id >> 24) & 1) ~= 0 + meta.reserved = (can_id >> 23) & 1 + meta.v10_fixed = (can_id >> 21) & 3 + meta.subject_id = (can_id >> 8) & 0x1FFF + meta.discriminator = can_id & 0x7F + meta.session = false + if meta.reserved ~= 0 or meta.v10_fixed ~= 3 then + meta.errors[#meta.errors + 1] = { "noncanonical", "Non-canonical v1.0 message fixed/reserved bits" } + end + end + end + meta.scope = scope_for(meta) + return meta +end + +local reassembly_sessions = {} +local frame_results = {} +local udp_reassembly_sessions = {} +local udp_completed_transfers = {} +local udp_frame_results = {} +local udp_active_transfer_count = 0 +local udp_buffered_bytes = 0 +local udp_cached_payload_bytes = 0 +local udp_payload_cache = {} +local udp_payload_cache_head = 1 +local udp_payload_cache_tail = 0 +local session_colors_installed = false + +local function install_session_colors() + if session_colors_installed or not gui_enabled() then return end + -- Set the guard first because changing a color filter can initiate another + -- dissection pass, whose init callback must not reinstall the rules. + session_colors_installed = true + for slot = 1, 10 do + set_color_filter_slot(slot, string.format( + "cyphalcan11.session_color == %d || cyphaludp11.session_color == %d", slot, slot)) + end +end + +local function timestamp_number(pinfo) + return tonumber(tostring(pinfo.abs_ts)) or tonumber(tostring(pinfo.rel_ts)) or 0 +end + +local function interface_key() + return tostring(field_number(interface_field) or "-") .. ":" .. tostring(field_number(can_bus_field) or "-") +end + +local function session_color_slot(meta) + -- Include both capture-interface and CAN-bus metadata in the interface + -- identity. The fixed-width CAN-ID suffix keeps the serialized tuple + -- unambiguous, and rapidhash provides stable mixing across the ten slots. + local key = interface_key() .. "/" .. string.format("%08x", meta.can_id) + return 1 + u64_mod(rapidhash(key), 10) +end + +local function ipv4_number(address) + local a, b, c, d = tostring(address):match("^(%d+)%.(%d+)%.(%d+)%.(%d+)$") + a, b, c, d = tonumber(a), tonumber(b), tonumber(c), tonumber(d) + if a == nil or a > 255 or b > 255 or c > 255 or d > 255 then return nil end + return (a << 24) | (b << 16) | (c << 8) | d +end + +local function endpoint_text(address, port) + return string.format("%s:%d", tostring(address), tonumber(port) or 0) +end + +local function udp_port_key(meta) + -- A unicast receive port pools redundant interfaces. Its IP endpoints are + -- reverse-path metadata, not part of the transfer/session identity. + if meta.scope == "unicast" then return "U" end + return string.format("S%08x", meta.subject_id) +end + +local function udp_transfer_key(meta) + return string.format("%s/%s/%012x", udp_port_key(meta), u64_hex(meta.sender_uid), meta.transfer_id) +end + +local function udp_color_slot(meta) + local key = string.format("%s/%s", udp_port_key(meta), u64_hex(meta.sender_uid)) + return 1 + u64_mod(rapidhash(key), 10) +end + +local function transfer_key(meta) + local port = meta.service and ("V" .. meta.service_id .. ":" .. (meta.request and "Q" or "P") .. ":" .. meta.destination) + or ("S" .. meta.subject_id .. ":" .. (meta.anonymous and ("A" .. meta.discriminator) or "N")) + return table.concat({ interface_key(), meta.version, port, meta.source, meta.priority }, "/") +end + +local function expire_reassembly(now) + for key, state in pairs(reassembly_sessions) do + if (now - state.updated) > REASSEMBLY_TIMEOUT_SECONDS then reassembly_sessions[key] = nil end + end +end + +local function expire_udp_reassembly(now) + for key, state in pairs(udp_reassembly_sessions) do + if (now - state.updated) > REASSEMBLY_TIMEOUT_SECONDS then + udp_buffered_bytes = math.max(0, udp_buffered_bytes - state.buffered_bytes) + udp_active_transfer_count = math.max(0, udp_active_transfer_count - 1) + udp_reassembly_sessions[key] = nil + end + end + for key, state in pairs(udp_completed_transfers) do + if (now - state.updated) > REASSEMBLY_TIMEOUT_SECONDS then udp_completed_transfers[key] = nil end + end +end + +-- Active transfers retain an AVL tree of disjoint byte ranges. New fragments +-- are trimmed against existing ranges before insertion, so the stored payload +-- can never exceed the advertised transfer size and lookup remains logarithmic. +local udp_ranges = {} + +function udp_ranges.height(node) return node == nil and 0 or node.height end + +function udp_ranges.update(node) + node.height = 1 + math.max(udp_ranges.height(node.left), udp_ranges.height(node.right)) + return node +end + +function udp_ranges.rotate_left(root) + local pivot = root.right + root.right, pivot.left = pivot.left, root + udp_ranges.update(root) + return udp_ranges.update(pivot) +end + +function udp_ranges.rotate_right(root) + local pivot = root.left + root.left, pivot.right = pivot.right, root + udp_ranges.update(root) + return udp_ranges.update(pivot) +end + +function udp_ranges.insert(root, node) + if root == nil then return node end + if node.offset < root.offset then root.left = udp_ranges.insert(root.left, node) + else root.right = udp_ranges.insert(root.right, node) end + udp_ranges.update(root) + local balance = udp_ranges.height(root.left) - udp_ranges.height(root.right) + if balance > 1 then + if node.offset > root.left.offset then root.left = udp_ranges.rotate_left(root.left) end + return udp_ranges.rotate_right(root) + end + if balance < -1 then + if node.offset < root.right.offset then root.right = udp_ranges.rotate_right(root.right) end + return udp_ranges.rotate_left(root) + end + return root +end + +function udp_ranges.collect_overlaps(node, first, after, out) + if node == nil then return end + local node_after = node.offset + #node.data + if node.offset >= after then + udp_ranges.collect_overlaps(node.left, first, after, out) + elseif node_after <= first then + udp_ranges.collect_overlaps(node.right, first, after, out) + else + udp_ranges.collect_overlaps(node.left, first, after, out) + out[#out + 1] = node + udp_ranges.collect_overlaps(node.right, first, after, out) + end +end + +function udp_ranges.uncovered(root, offset, data) + local after = offset + #data + local overlaps = {} + udp_ranges.collect_overlaps(root, offset, after, overlaps) + local pieces, cursor, overlaps_good = {}, offset, true + for _, node in ipairs(overlaps) do + if node.offset > cursor then + local gap_after = math.min(node.offset, after) + pieces[#pieces + 1] = { + offset = cursor, + data = data:sub(cursor - offset + 1, gap_after - offset), + height = 1, + } + cursor = gap_after + end + local overlap_first = math.max(offset, node.offset) + local overlap_after = math.min(after, node.offset + #node.data) + if data:sub(overlap_first - offset + 1, overlap_after - offset) ~= + node.data:sub(overlap_first - node.offset + 1, overlap_after - node.offset) then + overlaps_good = false + end + cursor = math.max(cursor, node.offset + #node.data) + end + if cursor < after then + pieces[#pieces + 1] = { + offset = cursor, + data = data:sub(cursor - offset + 1), + height = 1, + } + end + return pieces, overlaps_good +end + +function udp_ranges.assemble(root, total_size) + local pieces, cursor, valid = {}, 0, true + local function visit(node) + if node == nil or not valid then return end + visit(node.left) + if node.offset ~= cursor then valid = false return end + pieces[#pieces + 1] = node.data + cursor = cursor + #node.data + visit(node.right) + end + visit(root) + if not valid or cursor ~= total_size then return nil end + return table.concat(pieces) +end + +local function release_udp_state(key) + local state = udp_reassembly_sessions[key] + if state ~= nil then + udp_buffered_bytes = math.max(0, udp_buffered_bytes - state.buffered_bytes) + udp_active_transfer_count = math.max(0, udp_active_transfer_count - 1) + udp_reassembly_sessions[key] = nil + end + return state +end + +local function populate_udp_prefix_results(state, payload) + local endpoints, seen = {}, {} + for _, frame_number in ipairs(state.frames) do + local frame_result = udp_frame_results[frame_number] + if frame_result ~= nil and not seen[frame_result.payload_end] then + seen[frame_result.payload_end] = true + endpoints[#endpoints + 1] = frame_result.payload_end + end + end + table.sort(endpoints) + local cursor, crc, values = 0, 0xFFFFFFFF, {} + for _, payload_end in ipairs(endpoints) do + crc = crc32c_add(crc, payload:sub(cursor + 1, payload_end)) + values[payload_end] = (crc ~ 0xFFFFFFFF) & 0xFFFFFFFF + cursor = payload_end + end + for _, frame_number in ipairs(state.frames) do + local frame_result = udp_frame_results[frame_number] + if frame_result ~= nil then + frame_result.prefix_crc_calculated = values[frame_result.payload_end] + frame_result.prefix_crc_good = frame_result.prefix_crc_calculated == frame_result.prefix_crc + if not frame_result.prefix_crc_good then + frame_result.errors[#frame_result.errors + 1] = { "prefix_crc", "Payload prefix CRC-32C mismatch" } + end + end + end + return values[state.total_size] +end + +local function cacheable_session_prefix(payload) + if #payload <= SESSION_HEADER_SIZE then return payload end + local session_type = string.byte(payload, 1) + local keep = SESSION_HEADER_SIZE + if session_type == 8 or session_type == 9 then + keep = math.min(#payload, SESSION_HEADER_SIZE + TOPIC_NAME_MAX) + end + return payload:sub(1, keep) +end + +local function retain_udp_result_payload(result) + if result.payload == nil or result.payload_cache_size ~= nil then return end + result.session_size = #result.payload + result.session_prefix = cacheable_session_prefix(result.payload) + result.payload_cache_size = #result.payload + udp_cached_payload_bytes = udp_cached_payload_bytes + result.payload_cache_size + udp_payload_cache_tail = udp_payload_cache_tail + 1 + udp_payload_cache[udp_payload_cache_tail] = result + local limit = cyphal_udp.prefs.max_cached_payload_bytes + while udp_cached_payload_bytes > limit and udp_payload_cache_head <= udp_payload_cache_tail do + local oldest = udp_payload_cache[udp_payload_cache_head] + udp_payload_cache[udp_payload_cache_head] = nil + udp_payload_cache_head = udp_payload_cache_head + 1 + if oldest ~= nil and oldest.payload ~= nil then + udp_cached_payload_bytes = math.max(0, udp_cached_payload_bytes - oldest.payload_cache_size) + oldest.payload = nil + end + end + if udp_payload_cache_head > udp_payload_cache_tail then + udp_payload_cache, udp_payload_cache_head, udp_payload_cache_tail = {}, 1, 0 + end +end + +local function process_udp_reassembly(meta, pinfo) + local cached = udp_frame_results[pinfo.number] + if cached ~= nil then return cached end + + local result = { + errors = {}, sot = meta.sot, eot = meta.eot, transfer_id = meta.transfer_id, + frame_offset = meta.frame_offset, payload_end = meta.frame_offset + #meta.frame_payload, + prefix_crc = meta.prefix_crc, fragment_count = 1, + } + udp_frame_results[pinfo.number] = result + local key = udp_transfer_key(meta) + result.transfer_key = key + + if meta.frame_offset == 0 then + result.prefix_crc_calculated = crc32c(meta.frame_payload) + result.prefix_crc_good = result.prefix_crc_calculated == result.prefix_crc + if not result.prefix_crc_good then + result.errors[#result.errors + 1] = { "prefix_crc", "First-frame payload prefix CRC-32C mismatch" } + return result + end + end + + local now = timestamp_number(pinfo) + expire_udp_reassembly(now) + local completed = udp_completed_transfers[key] + if completed ~= nil then + result.duplicate = true + result.fragment_count = completed.fragment_count + result.reassembled_in = completed.reassembled_in + result.reassembled_length = completed.size + result.topic_hash = completed.topic_hash + if meta.transfer_payload_size ~= completed.size or meta.priority ~= completed.priority then + result.errors[#result.errors + 1] = { "reassembly", "Duplicate frame is inconsistent with the completed transfer" } + elseif result.payload_end == completed.size then + result.prefix_crc_calculated = completed.final_crc + result.prefix_crc_good = result.prefix_crc_calculated == result.prefix_crc + if not result.prefix_crc_good then + result.errors[#result.errors + 1] = { "prefix_crc", "Duplicate frame payload prefix CRC-32C mismatch" } + end + end + return result + end + + local state = udp_reassembly_sessions[key] + if state == nil then + if udp_active_transfer_count >= cyphal_udp.prefs.max_active_transfers then + result.errors[#result.errors + 1] = { "reassembly", "Too many active UDP transfers" } + return result + end + state = { + total_size = meta.transfer_payload_size, priority = meta.priority, + frames = {}, range_root = nil, buffered_bytes = 0, frame_count = 0, updated = now, + } + udp_reassembly_sessions[key] = state + udp_active_transfer_count = udp_active_transfer_count + 1 + elseif state.total_size ~= meta.transfer_payload_size or state.priority ~= meta.priority then + result.errors[#result.errors + 1] = { "reassembly", "Inconsistent metadata within a UDP transfer" } + release_udp_state(key) + return result + end + state.updated = now + state.frame_count = state.frame_count + 1 + if state.frame_count > cyphal_udp.prefs.max_fragments then + result.errors[#result.errors + 1] = { "reassembly", "UDP transfer exceeds the fragment-count limit" } + release_udp_state(key) + return result + end + + local pieces, overlaps_good = udp_ranges.uncovered(state.range_root, meta.frame_offset, meta.frame_payload) + local added_bytes = 0 + for _, piece in ipairs(pieces) do added_bytes = added_bytes + #piece.data end + if not overlaps_good then + result.errors[#result.errors + 1] = { "reassembly", "Overlapping UDP fragment contains different bytes" } + end + local accept_empty = state.total_size == 0 and #state.frames == 0 + if added_bytes == 0 and not accept_empty then + result.duplicate = true + result.fragment_count = #state.frames + return result + end + if (udp_buffered_bytes + added_bytes) > cyphal_udp.prefs.max_buffered_bytes then + result.errors[#result.errors + 1] = { "reassembly", "UDP reassembly memory limit exceeded" } + release_udp_state(key) + return result + end + for _, piece in ipairs(pieces) do state.range_root = udp_ranges.insert(state.range_root, piece) end + state.buffered_bytes = state.buffered_bytes + added_bytes + udp_buffered_bytes = udp_buffered_bytes + added_bytes + state.frames[#state.frames + 1] = pinfo.number + result.fragment_count = #state.frames + if state.buffered_bytes < state.total_size then return result end + + local payload = udp_ranges.assemble(state.range_root, state.total_size) + if payload == nil then return result end + release_udp_state(key) + result.complete = true + result.payload = payload + result.frames = state.frames + result.reassembled_length = #payload + local full_crc_calculated = populate_udp_prefix_results(state, payload) + local full_crc_expected + for _, frame_number in ipairs(state.frames) do + local frame_result = udp_frame_results[frame_number] + if frame_result ~= nil and frame_result.eot then full_crc_expected = frame_result.prefix_crc end + end + result.transfer_crc_good = full_crc_expected ~= nil and full_crc_calculated == full_crc_expected + if not result.transfer_crc_good then + result.errors[#result.errors + 1] = { "prefix_crc", "Reassembled transfer CRC-32C mismatch" } + end + for _, frame_number in ipairs(state.frames) do + local frame_result = udp_frame_results[frame_number] + if frame_result ~= nil then + frame_result.fragment_count = #state.frames + frame_result.reassembled_in = pinfo.number + frame_result.reassembled_length = #payload + end + end + if result.transfer_crc_good then + udp_completed_transfers[key] = { + size = #payload, priority = state.priority, fragment_count = #state.frames, + final_crc = full_crc_calculated, + reassembled_in = pinfo.number, updated = now, + } + end + return result +end + +local function complete_multiframe(state, result) + local raw = state.data + if #raw < 2 then + result.errors[#result.errors + 1] = { "reassembly", "Multiframe transfer is shorter than its CRC" } + result.payload = "" + return + end + result.crc = (string.byte(raw, #raw - 1) << 8) | string.byte(raw, #raw) + result.payload = raw:sub(1, #raw - 2) + result.crc_calculated = crc16_ccitt(result.payload) + result.crc_good = result.crc == result.crc_calculated + if not result.crc_good then result.errors[#result.errors + 1] = { "crc", "Transfer CRC mismatch" } end +end + +local function process_reassembly(tvb, pinfo, meta) + local cached = frame_results[pinfo.number] + if cached ~= nil then return cached end + + local result = { errors = {}, fragment_count = 1, fragment_index = 0 } + frame_results[pinfo.number] = result + local length = tvb:len() + if length < 1 then + result.errors[#result.errors + 1] = { "malformed", "CAN data frame has no tail byte" } + return result + end + + local tail = tvb(length - 1, 1):uint() + local sot = (tail & 0x80) ~= 0 + local eot = (tail & 0x40) ~= 0 + local toggle = (tail & 0x20) ~= 0 + local transfer_id = tail & 0x1F + local fragment = tvb:raw(0, length - 1) + result.tail, result.sot, result.eot = tail, sot, eot + result.toggle, result.transfer_id = toggle, transfer_id + + if length > 64 or ({ [0] = true, [1] = true, [2] = true, [3] = true, [4] = true, [5] = true, + [6] = true, [7] = true, [8] = true, [12] = true, [16] = true, [20] = true, + [24] = true, [32] = true, [48] = true, [64] = true })[length] ~= true then + result.errors[#result.errors + 1] = { "malformed", "Illegal classic-CAN/CAN-FD data length" } + end + local full_mtu = meta.can_fd and 64 or 8 + if not eot and length ~= full_mtu then + result.errors[#result.errors + 1] = { "malformed", "Non-final frame does not use a full CAN MTU" } + end + if sot and not toggle then + result.errors[#result.errors + 1] = { "sequence", "Cyphal v1 transfers must start with toggle=1" } + end + if meta.anonymous and not (sot and eot) then + result.errors[#result.errors + 1] = { "sequence", "Anonymous transfers must be single-frame" } + return result + end + if sot and eot then + result.payload = fragment + result.complete = true + result.single = true + result.reassembled_length = #fragment + return result + end + + local now = timestamp_number(pinfo) + expire_reassembly(now) + local key = transfer_key(meta) + if sot then + local previous = reassembly_sessions[key] + if previous ~= nil then + local prior = frame_results[previous.frames[#previous.frames]] + if prior ~= nil then prior.errors[#prior.errors + 1] = { "sequence", "Transfer superseded by a new start frame" } end + end + local state = { + data = fragment, + transfer_id = transfer_id, + expected_toggle = not toggle, + updated = now, + frames = { pinfo.number }, + } + if #fragment > cyphal_can.prefs.max_reassembly_bytes then + result.errors[#result.errors + 1] = { "reassembly", "Transfer exceeds the configured reassembly limit" } + else + reassembly_sessions[key] = state + end + result.fragment = true + return result + end + + local state = reassembly_sessions[key] + if state == nil then + result.errors[#result.errors + 1] = { "sequence", "Orphan continuation/end frame" } + return result + end + if transfer_id ~= state.transfer_id then + result.errors[#result.errors + 1] = { "sequence", "Continuation transfer-ID mismatch" } + return result + end + if toggle ~= state.expected_toggle then + result.errors[#result.errors + 1] = { "sequence", "Continuation toggle mismatch" } + return result + end + if (#state.data + #fragment) > cyphal_can.prefs.max_reassembly_bytes then + reassembly_sessions[key] = nil + result.errors[#result.errors + 1] = { "reassembly", "Transfer exceeds the configured reassembly limit" } + return result + end + state.data = state.data .. fragment + state.expected_toggle = not state.expected_toggle + state.updated = now + state.frames[#state.frames + 1] = pinfo.number + result.fragment_index = #state.frames - 1 + result.fragment_count = #state.frames + if not eot then + result.fragment = true + return result + end + + reassembly_sessions[key] = nil + result.complete = true + result.frames = state.frames + complete_multiframe(state, result) + result.reassembled_length = #result.payload + for _, frame_number in ipairs(state.frames) do + local frame_result = frame_results[frame_number] + if frame_result ~= nil then + frame_result.fragment_count = #state.frames + frame_result.reassembled_in = pinfo.number + end + end + return result +end + +local function add_control_suffix(session_tree, tvb, offset) + if offset >= tvb:len() then return end + local range = tvb(offset, tvb:len() - offset) + if bytes_are_zero(range:raw()) then session_tree:add(sf_padding, range) + else session_tree:add(sf_trailing, range) end +end + +local function add_session_expert(item, which, tvb, text) + add_expert(item, which, tvb(), text) +end + +local function add_topic_fields(item, tvb, raw, hash_offset, evictions, meta) + item:add_le(sf_topic_hash, tvb(hash_offset, 8)) + local hash = u64_from_le(raw, hash_offset) + local expected, pinned = calculated_subject(hash, evictions, meta.subject_id_modulus) + add_generated(item, sf_expected_subject, expected) + add_generated(item, sf_pinned, pinned) + return hash, expected +end + +local function annotate_topic(item, pinfo, meta, hash) + meta.topic_hash = hash + local name = resolve_topic_name(hash) + if name ~= nil then + add_generated(item, sf_resolved_topic_name, name) + if meta.scope == "multicast" then pinfo.cols.dst = named_topic_destination(meta, name) end + end +end + +local function dissect_session(tvb, pinfo, tree, meta) + local item = tree:add(cyphal_session, tvb(), "Cyphal v1.1 Session") + local session_size = meta.session_payload_size or tvb:len() + add_generated(item, sf_scope, meta.scope) + if tvb:len() < SESSION_HEADER_SIZE then + if tvb:len() > 0 then item:add(sf_type, tvb(0, 1)) end + add_session_expert(item, ex_session_malformed, tvb, "Session header is shorter than 24 bytes") + if tvb:len() > 1 then item:add(sf_raw_body, tvb(1, tvb:len() - 1)) end + return string.format("⚠️ v1.1 %s short=%d B", info_context(meta), tvb:len()) + end + + local raw = tvb:raw() + local session_type = string.byte(raw, 1) + item:add(sf_type, tvb(0, 1)) + local type_name = session_type_names[session_type] + if type_name == nil then + add_session_expert(item, ex_session_unsupported, tvb, "Unsupported session type " .. session_type) + if tvb:len() > 1 then item:add(sf_raw_body, tvb(1, tvb:len() - 1)) end + return string.format("⚠️ TYPE-%d %s %d B", session_type, info_context(meta), session_size - 1) + end + + if session_type <= 1 then + item:add(sf_void, tvb(1, 1)) + item:add(sf_incompat8, tvb(2, 1)) + item:add(sf_lage, tvb(3, 1)) + item:add_le(sf_evictions, tvb(4, 4)) + local incompatibility = string.byte(raw, 3) + local lage = string.unpack("b", raw, 4) + local evictions = u32le(raw, 4) + local hash, expected = add_topic_fields(item, tvb, raw, 8, evictions, meta) + annotate_topic(item, pinfo, meta, hash) + item:add_le(sf_message_tag, tvb(16, 8)) + local tag = u64_from_le(raw, 16) + if incompatibility ~= 0 then add_session_expert(item, ex_session_incompatible, tvb, "Message incompatibility byte is nonzero") end + if lage < -1 or lage > 35 then add_session_expert(item, ex_session_malformed, tvb, "Log-age is outside [-1, 35]") end + if meta.scope ~= "unicast" and meta.scope ~= "multicast" then + add_session_expert(item, ex_session_scope, tvb, "Messages require unicast or a normal multicast subject") + end + if meta.scope == "multicast" and expected ~= meta.subject_id then + add_session_expert(item, ex_session_mismatch, tvb, "Calculated topic subject-ID does not match the transport subject-ID") + end + local app_size = session_size - SESSION_HEADER_SIZE + local available = tvb:len() - SESSION_HEADER_SIZE + if available > 0 then item:add(sf_application_payload, tvb(SESSION_HEADER_SIZE, available)) end + local icon = session_type == 0 and "📨 BE" or "⛓ REL" + return string.format("%s %s T%s@S%08x tag=%s %d B", icon, info_context(meta), + u64_hex(hash), expected, u64_hex(tag), app_size) + end + + if session_type == 2 or session_type == 3 then + item:add(sf_void, tvb(1, 3)) + item:add_le(sf_incompat32, tvb(4, 4)) + item:add_le(sf_topic_hash, tvb(8, 8)) + item:add_le(sf_message_tag, tvb(16, 8)) + local incompatibility = u32le(raw, 4) + local hash = u64_from_le(raw, 8) + annotate_topic(item, pinfo, meta, hash) + local tag = u64_from_le(raw, 16) + if incompatibility ~= 0 then add_session_expert(item, ex_session_incompatible, tvb, "ACK incompatibility field is nonzero") end + if meta.scope ~= "unicast" then add_session_expert(item, ex_session_scope, tvb, "Message ACK/NACK must be unicast") end + add_control_suffix(item, tvb, SESSION_HEADER_SIZE) + local label = session_type == 2 and "✅ MSG-ACK" or "❌ MSG-NACK" + return string.format("%s %s T%s tag=%s", label, info_context(meta), u64_hex(hash), u64_hex(tag)) + end + + if session_type >= 4 and session_type <= 7 then + item:add(sf_response_tag, tvb(1, 1)) + item:add_le(sf_response_seqno, tvb(2, 6)) + item:add_le(sf_topic_hash, tvb(8, 8)) + item:add_le(sf_message_tag, tvb(16, 8)) + local response_tag = string.byte(raw, 2) + local seqno = u48le(raw, 2) + local hash = u64_from_le(raw, 8) + annotate_topic(item, pinfo, meta, hash) + local message_tag = u64_from_le(raw, 16) + if meta.scope ~= "unicast" then add_session_expert(item, ex_session_scope, tvb, "Responses and response ACK/NACK must be unicast") end + local labels = { [4] = "↩️ RSP", [5] = "↩️ REL-RSP", [6] = "✅ RSP-ACK", [7] = "❌ RSP-NACK" } + local suffix = "" + if session_type == 4 or session_type == 5 then + local app_size = session_size - SESSION_HEADER_SIZE + local available = tvb:len() - SESSION_HEADER_SIZE + if available > 0 then item:add(sf_application_payload, tvb(SESSION_HEADER_SIZE, available)) end + suffix = string.format(" %d B", app_size) + else + add_control_suffix(item, tvb, SESSION_HEADER_SIZE) + end + return string.format("%s %s T%s seq=%d rtag=%02x msg=%s%s", labels[session_type], info_context(meta), + u64_hex(hash), seqno, response_tag, u64_hex(message_tag), suffix) + end + + if session_type == 8 then + item:add(sf_void, tvb(1, 2)) + item:add(sf_lage, tvb(3, 1)) + item:add_le(sf_incompat32, tvb(4, 4)) + item:add_le(sf_topic_hash, tvb(8, 8)) + item:add_le(sf_evictions, tvb(16, 4)) + item:add(sf_void, tvb(20, 3)) + item:add(sf_name_length, tvb(23, 1)) + local lage = string.unpack("b", raw, 4) + local incompatibility = u32le(raw, 4) + local hash = u64_from_le(raw, 8) + meta.topic_hash = hash + local evictions = u32le(raw, 16) + local name_length = string.byte(raw, 24) + local expected, pinned = calculated_subject(hash, evictions, meta.subject_id_modulus) + add_generated(item, sf_expected_subject, expected) + add_generated(item, sf_pinned, pinned) + if incompatibility ~= 0 then add_session_expert(item, ex_session_incompatible, tvb, "Gossip incompatibility field is nonzero") end + if lage < -1 or lage > 35 then add_session_expert(item, ex_session_malformed, tvb, "Log-age is outside [-1, 35]") end + if name_length > TOPIC_NAME_MAX or SESSION_HEADER_SIZE + name_length > tvb:len() then + add_session_expert(item, ex_session_malformed, tvb, "Gossip topic name is truncated or too long") + if tvb:len() > SESSION_HEADER_SIZE then item:add(sf_raw_body, tvb(SESSION_HEADER_SIZE, tvb:len() - SESSION_HEADER_SIZE)) end + return string.format("📢 GOSSIP %s T%s name=truncated", info_context(meta), u64_hex(hash)) + end + local name = tvb:raw(SESSION_HEADER_SIZE, name_length) + if name_length > 0 then item:add(sf_topic_name, tvb(SESSION_HEADER_SIZE, name_length), name) end + if meta.scope ~= "unicast" and meta.scope ~= "sharded" and meta.scope ~= "broadcast" then + add_session_expert(item, ex_session_scope, tvb, "Gossip requires unicast, a gossip shard, or broadcast") + end + local gossip_subject = meta.gossip_first + u64_mod(hash, meta.gossip_count) + add_generated(item, sf_expected_gossip, gossip_subject) + if meta.scope == "sharded" and gossip_subject ~= meta.subject_id then + add_session_expert(item, ex_session_mismatch, tvb, "Gossip hash maps to a different shard subject-ID") + end + if name_length > 0 then + local normalized = normalized_name(name) + if normalized == nil or normalized ~= name then + add_session_expert(item, ex_session_mismatch, tvb, "Gossip name is not printable normalized ASCII") + else + local hash_good = u64_equal(rapidhash(name), hash) + add_generated(item, sf_name_hash_good, hash_good) + if hash_good then + learn_topic_name(hash, name) + add_generated(item, sf_resolved_topic_name, name) + else + add_session_expert(item, ex_session_mismatch, tvb, "Gossip name does not match its topic hash") + end + end + end + add_control_suffix(item, tvb, SESSION_HEADER_SIZE + name_length) + return string.format("📢 GOSSIP %s T%s@S%08x e=%u lage=%+d '%s'", info_context(meta), + u64_hex(hash), expected, evictions, lage, printable(name):sub(1, 48)) + end + + item:add(sf_void, tvb(1, 3)) + item:add_le(sf_incompat32, tvb(4, 4)) + item:add_le(sf_incompat64, tvb(8, 8)) + item:add(sf_void, tvb(16, 7)) + item:add(sf_name_length, tvb(23, 1)) + local incompatibility0 = u32le(raw, 4) + local incompatibility1 = u64_from_le(raw, 8) + local pattern_length = string.byte(raw, 24) + if incompatibility0 ~= 0 or incompatibility1.lo ~= 0 or incompatibility1.hi ~= 0 then + add_session_expert(item, ex_session_incompatible, tvb, "Scout incompatibility fields are nonzero") + end + if pattern_length == 0 or pattern_length > TOPIC_NAME_MAX or SESSION_HEADER_SIZE + pattern_length > tvb:len() then + add_session_expert(item, ex_session_malformed, tvb, "Scout pattern is empty, truncated, or too long") + if tvb:len() > SESSION_HEADER_SIZE then item:add(sf_raw_body, tvb(SESSION_HEADER_SIZE, tvb:len() - SESSION_HEADER_SIZE)) end + return string.format("🔎 SCOUT %s pattern=invalid", info_context(meta)) + end + local pattern = tvb:raw(SESSION_HEADER_SIZE, pattern_length) + item:add(sf_pattern, tvb(SESSION_HEADER_SIZE, pattern_length), pattern) + if normalized_name(pattern) == nil then add_session_expert(item, ex_session_mismatch, tvb, "Scout pattern contains non-printable characters") end + if meta.scope ~= "broadcast" then add_session_expert(item, ex_session_mismatch, tvb, "Scouts are conventionally broadcast") end + add_control_suffix(item, tvb, SESSION_HEADER_SIZE + pattern_length) + return string.format("🔎 SCOUT %s '%s'", info_context(meta), printable(pattern):sub(1, 48)) +end + +local transport_experts = { + malformed = ex_can_malformed, + sequence = ex_can_sequence, + crc = ex_can_crc, + noncanonical = ex_can_noncanonical, + reassembly = ex_can_reassembly, +} + +local function render_identifier(root, meta, tvb) + add_generated(root, f_can_id, meta.can_id) + meta.session_color = session_color_slot(meta) + add_generated(root, f_session_color, meta.session_color) + add_generated(root, f_version, meta.version) + add_generated(root, f_kind, meta.kind) + add_generated(root, f_can_fd, meta.can_fd) + add_generated(root, f_priority, meta.priority) + add_generated(root, f_service, meta.service) + add_generated(root, f_reserved, meta.reserved or 0) + if meta.service then + add_generated(root, f_request, meta.request) + add_generated(root, f_service_id, meta.service_id) + add_generated(root, f_source, meta.source) + add_generated(root, f_destination, meta.destination) + else + add_generated(root, f_subject_id, meta.subject_id) + add_generated(root, f_anonymous, meta.anonymous or false) + if meta.version == "1.0" then add_generated(root, f_v10_fixed, meta.v10_fixed) end + if meta.anonymous then add_generated(root, f_discriminator, meta.discriminator) + else add_generated(root, f_source, meta.source) end + end + for _, issue in ipairs(meta.errors) do add_expert(root, transport_experts[issue[1]], tvb(), issue[2]) end +end + +local function generic_info(meta, result) + local port = meta.service and string.format(" svc=%d %s", meta.service_id, meta.request and "REQ" or "RSP") or "" + local size = result.payload and #result.payload or 0 + return string.format("CAN%s prio=%d tid=%d%s %d B", meta.version, meta.priority, result.transfer_id or 0, port, size) +end + +local function frame_info(result, text) + local prefix = result.sot and "🔹 " or "… " + local suffix = result.eot and "" or " …" + return prefix .. text .. suffix +end + +local function dissect_can(tvb, pinfo, tree, heuristic) + local can_id = field_number(can_id_field) + local extended = field_number(can_xtd_field) + local rtr = field_number(can_rtr_field) + local err = field_number(can_err_field) + if heuristic then + if can_id == nil or extended ~= 1 or rtr == 1 or err == 1 or tvb:len() == 0 then return false end + end + + pinfo.cols.protocol = "CYPHAL/CAN" + local root = tree:add(cyphal_can, tvb(), "Cyphal/CAN v1") + if can_id == nil then + add_expert(root, ex_can_malformed, tvb(), "CAN identifier metadata is unavailable") + pinfo.cols.info = "⚠️ Cyphal/CAN: missing CAN identifier" + return not heuristic + end + local meta = classify_identifier(can_id) + meta.can_fd = field_number(can_fd_field) == 1 + pinfo.cols.src = source_text(meta) + pinfo.cols.dst = destination_text(meta) + render_identifier(root, meta, tvb) + + local captured_length = tvb:len() + local declared_length = field_number(can_len_field) + if declared_length ~= nil and declared_length ~= captured_length then + add_expert(root, ex_can_malformed, tvb(), "Captured CAN payload length differs from can.len") + end + if captured_length < 1 then + add_expert(root, ex_can_malformed, tvb(), "CAN data frame has no tail byte") + pinfo.cols.info = "⚠️ Cyphal/CAN empty frame" + return true + end + if captured_length > 1 then root:add(f_frame_payload, tvb(0, captured_length - 1)) end + local tail_range = tvb(captured_length - 1, 1) + local tail_tree = root:add(cyphal_can, tail_range, "Cyphal/CAN Tail") + tail_tree:add(f_tail, tail_range) + tail_tree:add(f_sot, tail_range) + tail_tree:add(f_eot, tail_range) + tail_tree:add(f_toggle, tail_range) + tail_tree:add(f_transfer_id, tail_range) + + local result = process_reassembly(tvb, pinfo, meta) + add_generated(root, f_fragment_index, result.fragment_index or 0) + add_generated(root, f_fragment_count, result.fragment_count or 1) + if result.reassembled_in ~= nil then add_generated(root, f_reassembled_in, result.reassembled_in) end + if result.reassembled_length ~= nil then add_generated(root, f_reassembled_length, result.reassembled_length) end + if result.crc ~= nil then + add_generated(root, f_crc, result.crc) + add_generated(root, f_crc_calculated, result.crc_calculated) + add_generated(root, f_crc_good, result.crc_good) + end + for _, issue in ipairs(result.errors) do add_expert(root, transport_experts[issue[1]], tvb(), issue[2]) end + + if not result.complete then + local name = resolve_topic_name(result.topic_hash) + if meta.scope == "multicast" and name ~= nil then pinfo.cols.dst = named_topic_destination(meta, name) end + pinfo.cols.info = frame_info(result, string.format("CAN%s prio=%d tid=%d frag=%d", meta.version, + meta.priority, result.transfer_id or 0, result.fragment_index or 0)) + return true + end + + local reassembled = ByteArray.new(result.payload, true):tvb("Reassembled Cyphal/CAN transfer") + local summary + if meta.session then + meta.transfer_id = result.transfer_id + summary = dissect_session(reassembled, pinfo, root, meta) + if meta.topic_hash ~= nil then + result.topic_hash = meta.topic_hash + if result.frames ~= nil then + for _, frame_number in ipairs(result.frames) do + local frame_result = frame_results[frame_number] + if frame_result ~= nil then frame_result.topic_hash = meta.topic_hash end + end + end + end + pinfo.cols.protocol = "CYPHAL1.1" + else + if reassembled:len() > 0 then root:add(f_payload, reassembled()) end + summary = generic_info(meta, result) + end + pinfo.cols.info = frame_info(result, summary) + return true +end + +local udp_transport_experts = { + malformed = udp_ex.malformed, + header_crc = udp_ex.header_crc, + prefix_crc = udp_ex.prefix_crc, + incompatible = udp_ex.incompatible, + noncanonical = udp_ex.noncanonical, + reassembly = udp_ex.reassembly, +} + +local function parse_udp_header(tvb, pinfo) + local raw = tvb:raw() + local head, features = string.byte(raw, 1, 2) + local meta = { + version = head & 0x1F, + priority = (head >> 5) & 7, + void = features & 0x1F, + incompatibility = (features >> 5) & 7, + transfer_id = u48le(raw, 2), + sender_uid = u64_from_le(raw, 8), + frame_offset = u32le(raw, 16), + transfer_payload_size = u32le(raw, 20), + prefix_crc = u32le(raw, 24), + header_crc = u32le(raw, 28), + header_crc_calculated = crc32c(raw:sub(1, 28)), + frame_payload = raw:sub(UDP_HEADER_SIZE + 1), + source_endpoint = endpoint_text(pinfo.src, pinfo.src_port), + destination_endpoint = endpoint_text(pinfo.dst, pinfo.dst_port), + subject_id_modulus = UDP_SUBJECT_ID_MODULUS, + gossip_first = UDP_SUBJECT_ID_GOSSIP_FIRST, + gossip_count = UDP_SUBJECT_ID_GOSSIP_COUNT, + gossip_digits = 4, + broadcast_subject_id = UDP_SUBJECT_ID_BROADCAST, + service = false, + session = true, + errors = {}, + } + meta.header_crc_good = meta.header_crc == meta.header_crc_calculated + local destination_ip = ipv4_number(pinfo.dst) + if destination_ip ~= nil and (destination_ip & 0xFF800000) == 0xEF000000 then + meta.subject_id = destination_ip & UDP_SUBJECT_ID_BROADCAST + meta.scope = scope_for(meta) + else + meta.scope = "unicast" + end + local payload_end = meta.frame_offset + #meta.frame_payload + meta.sot = meta.frame_offset == 0 + meta.eot = payload_end == meta.transfer_payload_size + meta.valid = true + if meta.version ~= UDP_HEADER_VERSION then + meta.errors[#meta.errors + 1] = { "incompatible", "Unsupported Cyphal/UDP header version" } + meta.valid = false + end + if meta.incompatibility ~= 0 then + meta.errors[#meta.errors + 1] = { "incompatible", "Cyphal/UDP incompatibility bits are nonzero" } + meta.valid = false + end + if meta.void ~= 0 then + meta.errors[#meta.errors + 1] = { "noncanonical", "Cyphal/UDP void bits are nonzero" } + end + if not meta.header_crc_good then + meta.errors[#meta.errors + 1] = { "header_crc", "Cyphal/UDP header CRC-32C mismatch" } + meta.valid = false + end + if payload_end > meta.transfer_payload_size then + meta.errors[#meta.errors + 1] = { "malformed", "Frame payload extends beyond the advertised transfer size" } + meta.valid = false + end + if meta.transfer_payload_size > cyphal_udp.prefs.max_reassembly_bytes then + meta.errors[#meta.errors + 1] = { "reassembly", "Transfer exceeds the configured reassembly limit" } + meta.valid = false + end + if meta.scope ~= "unicast" and tonumber(pinfo.dst_port) ~= UDP_PORT then + meta.errors[#meta.errors + 1] = { "malformed", "Multicast Cyphal/UDP traffic must use destination port 9382" } + meta.valid = false + end + return meta +end + +local function render_udp_header(root, tvb, meta) + root:add(uf.version, tvb(0, 1)) + root:add(uf.priority, tvb(0, 1)) + root:add(uf.void, tvb(1, 1)) + root:add(uf.incompatibility, tvb(1, 1)) + root:add_le(uf.transfer_id, tvb(2, 6)) + root:add_le(uf.sender_uid, tvb(8, 8)) + root:add_le(uf.frame_offset, tvb(16, 4)) + root:add_le(uf.transfer_size, tvb(20, 4)) + root:add_le(uf.prefix_crc, tvb(24, 4)) + root:add_le(uf.header_crc, tvb(28, 4)) + add_generated(root, uf.header_crc_calculated, meta.header_crc_calculated) + add_generated(root, uf.header_crc_good, meta.header_crc_good) + add_generated(root, uf.scope, meta.scope) + add_generated(root, uf.source_endpoint, meta.source_endpoint) + add_generated(root, uf.destination_endpoint, meta.destination_endpoint) + add_generated(root, uf.logical_source, u64_hex(meta.sender_uid)) + add_generated(root, uf.sot, meta.sot) + add_generated(root, uf.eot, meta.eot) + meta.session_color = udp_color_slot(meta) + add_generated(root, uf.session_color, meta.session_color) + if meta.subject_id ~= nil then add_generated(root, uf.subject_id, meta.subject_id) end + if #meta.frame_payload > 0 then root:add(uf.frame_payload, tvb(UDP_HEADER_SIZE, #meta.frame_payload)) end + for _, issue in ipairs(meta.errors) do + add_expert(root, udp_transport_experts[issue[1]], tvb(), issue[2]) + end +end + +local function add_udp_logical_destination(root, meta, name) + local value = meta.destination_endpoint + if meta.scope ~= "unicast" then + value = (meta.scope == "multicast" and name ~= nil) and named_topic_destination(meta, name) + or destination_text(meta) + end + add_generated(root, uf.logical_destination, value) +end + +local function udp_generic_info(meta) + return string.format("UDP1.1 prio=%d tid=%d off=%d %d/%d B", meta.priority, meta.transfer_id, + meta.frame_offset, #meta.frame_payload, meta.transfer_payload_size) +end + +local function udp_heuristic_match(tvb) + if tvb:len() < UDP_HEADER_SIZE then return false end + local raw = tvb:raw() + if (string.byte(raw, 1) & 0x1F) ~= UDP_HEADER_VERSION then return false end + if ((string.byte(raw, 2) >> 5) & 7) ~= 0 then return false end + if crc32c(raw:sub(1, 28)) ~= u32le(raw, 28) then return false end + local frame_offset, transfer_size = u32le(raw, 16), u32le(raw, 20) + return frame_offset + (tvb:len() - UDP_HEADER_SIZE) <= transfer_size +end + +local function dissect_udp(tvb, pinfo, tree, heuristic) + if heuristic and not udp_heuristic_match(tvb) then return false end + pinfo.cols.protocol = "CYPHAL/UDP" + local root = tree:add(cyphal_udp, tvb(), "Cyphal/UDP v1.1") + if tvb:len() < UDP_HEADER_SIZE then + add_expert(root, udp_ex.malformed, tvb(), "Cyphal/UDP header is shorter than 32 bytes") + pinfo.cols.info = string.format("⚠️ UDP1.1 short=%d B", tvb:len()) + return not heuristic + end + + local meta = parse_udp_header(tvb, pinfo) + pinfo.cols.src = u64_hex(meta.sender_uid) + pinfo.cols.dst = (meta.scope == "unicast") and meta.destination_endpoint or destination_text(meta) + render_udp_header(root, tvb, meta) + if not meta.valid then + add_udp_logical_destination(root, meta, nil) + pinfo.cols.info = frame_info(meta, "⚠️ " .. udp_generic_info(meta)) + return true + end + + local result = process_udp_reassembly(meta, pinfo) + add_generated(root, uf.duplicate, result.duplicate or false) + add_generated(root, uf.fragment_count, result.fragment_count or 1) + if result.reassembled_in ~= nil then add_generated(root, uf.reassembled_in, result.reassembled_in) end + if result.reassembled_length ~= nil then add_generated(root, uf.reassembled_length, result.reassembled_length) end + if result.prefix_crc_calculated ~= nil then + add_generated(root, uf.prefix_crc_calculated, result.prefix_crc_calculated) + add_generated(root, uf.prefix_crc_good, result.prefix_crc_good) + end + for _, issue in ipairs(result.errors) do + add_expert(root, udp_transport_experts[issue[1]], tvb(), issue[2]) + end + + local name = resolve_topic_name(result.topic_hash) + add_udp_logical_destination(root, meta, name) + if meta.scope == "multicast" and name ~= nil then + pinfo.cols.dst = named_topic_destination(meta, name) + end + if result.duplicate then + pinfo.cols.info = frame_info(result, string.format("🍒 UDP1.1 prio=%d tid=%d off=%d duplicate", + meta.priority, meta.transfer_id, meta.frame_offset)) + return true + end + if not result.complete then + pinfo.cols.info = frame_info(result, udp_generic_info(meta)) + return true + end + if not result.transfer_crc_good then + if result.payload ~= nil then + local reassembled = ByteArray.new(result.payload, true):tvb("Invalid reassembled Cyphal/UDP transfer") + if reassembled:len() > 0 then root:add(uf.payload, reassembled()) end + retain_udp_result_payload(result) + end + pinfo.cols.info = frame_info(result, string.format("⚠️ UDP1.1 prio=%d tid=%d CRC %d B", + meta.priority, meta.transfer_id, result.reassembled_length or 0)) + return true + end + + local session_payload = result.payload or result.session_prefix + if session_payload == nil then + pinfo.cols.info = frame_info(result, string.format("⚠️ UDP1.1 prio=%d tid=%d cache-miss", + meta.priority, meta.transfer_id)) + return true + end + meta.session_payload_size = result.session_size + local reassembled = ByteArray.new(session_payload, true):tvb("Reassembled Cyphal/UDP transfer") + local summary = dissect_session(reassembled, pinfo, root, meta) + if meta.topic_hash ~= nil then + result.topic_hash = meta.topic_hash + for _, frame_number in ipairs(result.frames or {}) do + local frame_result = udp_frame_results[frame_number] + if frame_result ~= nil then frame_result.topic_hash = meta.topic_hash end + end + local completed = udp_completed_transfers[result.transfer_key] + if completed ~= nil then completed.topic_hash = meta.topic_hash end + end + if result.payload ~= nil then retain_udp_result_payload(result) end + result.frames = nil + pinfo.cols.protocol = "CYPHAL1.1" + pinfo.cols.info = frame_info(result, summary) + return true +end + +function cyphal_can.dissector(tvb, pinfo, tree) + dissect_can(tvb, pinfo, tree, false) +end + +function cyphal_udp.dissector(tvb, pinfo, tree) + dissect_udp(tvb, pinfo, tree, false) +end + +function cyphal_can.init() + reassembly_sessions = {} + frame_results = {} + topic_names = {} + -- Proto fields are not entered into Wireshark's display-filter registry + -- until after the Lua script finishes loading. Install the GUI filters here, + -- once protocol registration is complete, rather than at file scope. + install_session_colors() +end + +function cyphal_udp.init() + udp_reassembly_sessions = {} + udp_completed_transfers = {} + udp_frame_results = {} + udp_active_transfer_count = 0 + udp_buffered_bytes = 0 + udp_cached_payload_bytes = 0 + udp_payload_cache = {} + udp_payload_cache_head = 1 + udp_payload_cache_tail = 0 + topic_names = {} + install_session_colors() +end + +cyphal_can:register_heuristic("can", function(tvb, pinfo, tree) + return dissect_can(tvb, pinfo, tree, true) +end) + +cyphal_udp:register_heuristic("udp", function(tvb, pinfo, tree) + return dissect_udp(tvb, pinfo, tree, true) +end) + +local can_table = DissectorTable.get("can.subdissector") +if can_table ~= nil then can_table:add_for_decode_as(cyphal_can) end + +local udp_table = DissectorTable.get("udp.port") +if udp_table ~= nil then + udp_table:add(UDP_PORT, cyphal_udp) + udp_table:add_for_decode_as(cyphal_udp) +end diff --git a/dissectors/dds-xrce/LICENSE b/dissectors/dds-xrce/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dissectors/dds-xrce/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/dds-xrce/README.md b/dissectors/dds-xrce/README.md new file mode 100644 index 0000000..3aebfce --- /dev/null +++ b/dissectors/dds-xrce/README.md @@ -0,0 +1,58 @@ +# DDS-XRCE (DDS pour environnements très contraints, Micro-XRCE-DDS) + +Dissecteur Wireshark Lua du protocole **DDS-XRCE** (OMG « DDS for +eXtremely Resource Constrained Environments »), en particulier de son +implémentation eProsima **Micro-XRCE-DDS** utilisée par micro-ROS sur +microcontrôleurs : en-tête de message (session, flux, numéro de séquence, +clé client), sous-messages CREATE_CLIENT, CREATE, GET_INFO, DELETE, +STATUS_AGENT, STATUS, INFO, WRITE_DATA, READ_DATA, DATA, ACKNACK, +HEARTBEAT, RESET, FRAGMENT, TIMESTAMP…, avec suivi optionnel des objets +DDS (topics, datareaders, datawriters) et désérialisation XCDR des types +utilisateurs enregistrés. Transports UDP et TCP (port 2018 par défaut, +configurable dans les préférences), et découverte d'agent. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/jseldent/wireshark-dds-xrce | +| Commit importé | `b3d212522dddac1955cdd569d464049a36b8e309` du 15/02/2023 (branche `main`, dernier commit) | +| Licence amont | Apache-2.0 (`LICENSE` amont ; en-tête Apache 2.0 « Copyright 2022 Lely Industries N.V. » dans chaque fichier, conservée) | +| Natif Wireshark 4.6.4 | Non — Wireshark dissèque nativement RTPS (DDS « complet », `packet-rtps.c`), mais pas DDS-XRCE | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `dds-xrce-proto.lua` | Dissecteur `DDS-XRCE` (UDP/TCP, préférences de ports, découverte) ; fait `require "dds-xrce-types"` | +| `dds-xrce-types.lua` | Désérialisation des types DDS-XRCE ; fait `require "dds-xrce-idl"` | +| `dds-xrce-idl.lua` | Primitives IDL/XCDR et tables globales `types`, `topic_type_names`… pour les types utilisateurs | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête de chaque fichier. Non importée : la capture +d'écran `PublishHelloWorld.png` (pointeur Git LFS dans le dépôt amont). + +## Utilisation + +Copier les trois fichiers dans `~/.local/lib/wireshark/plugins/` (dossier +présent dans le `package.path` Lua de Wireshark, nécessaire aux `require`), +redémarrer Wireshark, puis filtrer avec `dds-xrce`. Le port 2018 se change +dans Préférences → Protocoles → DDS-XRCE. + +Pour décoder un type utilisateur, ajouter un fichier Lua qui fait +`require "dds-xrce-idl"` et enregistre une fonction dans `types["MonType"]` +(exemple `HelloWorld` détaillé dans le README amont). + +## Remarques + +- Requiert Wireshark ≥ 3.5 (`assert` sur `redissect_packets`). +- La désérialisation des types utilisateurs suppose qu'un seul client est + connecté à l'agent et que la création des entités DDS a été capturée + (README amont). +- Les modules `require`-és sont aussi chargés comme plugins par Wireshark ; + ils ne définissent que des fonctions et tables (pas de protocole), ce + double chargement est celui prévu par l'amont (non vérifié dans Wireshark). +- Pas de capture d'exemple amont. diff --git a/dissectors/dds-xrce/dds-xrce-idl.lua b/dissectors/dds-xrce/dds-xrce-idl.lua new file mode 100644 index 0000000..771a69c --- /dev/null +++ b/dissectors/dds-xrce/dds-xrce-idl.lua @@ -0,0 +1,230 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/jseldent/wireshark-dds-xrce (dds-xrce-idl.lua), +-- commit b3d212522dddac1955cdd569d464049a36b8e309 du 15/02/2023. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- DDS-XRCE IDL dissector for Wireshark +-- +-- Copyright 2022 Lely Industries N.V. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +types = {} +topic_type_names = {} + +topic_names = {} +data_reader_topic_names = {} +data_writer_topic_names = {} + +function align(x, a) + return bit.band(x + a - 1, bit.bnot(a - 1)) +end + +function tvb_int(tvb, encoding) + encoding = encoding or ENC_BIG_ENDIAN + local value = 0 + if encoding == ENC_BIG_ENDIAN then + if tvb:len() <= 4 then + value = tvb:int() + else + value = tvb:int64() + end + elseif encoding == ENC_LITTLE_ENDIAN then + if tvb:len() <= 4 then + value = tvb:le_int() + else + value = tvb:le_int64() + end + end + return value +end + +function tvb_uint(tvb, encoding) + encoding = encoding or ENC_BIG_ENDIAN + local value = 0 + if encoding == ENC_BIG_ENDIAN then + if tvb:len() <= 4 then + value = tvb:uint() + else + value = tvb:uint64() + end + elseif encoding == ENC_LITTLE_ENDIAN then + if tvb:len() <= 4 then + value = tvb:le_uint() + else + value = tvb:le_uint64() + end + end + return value +end + +function tvb_float(tvb, encoding) + encoding = encoding or ENC_BIG_ENDIAN + local value = 0.0 + if encoding == ENC_BIG_ENDIAN then + value = tvb:float() + elseif encoding == ENC_LITTLE_ENDIAN then + value = tvb:le_float() + end + return value +end + +function char_deserialize(tvb, offset, encoding, tree, label) + tree:add(tvb(offset, 1), label, string.char(tvb(offset, 1):uint())) + offset = offset + 1 + + return offset +end + +function octet_deserialize(tvb, offset, encoding, tree, label) + tree:add(tvb(offset, 1), label, tvb(offset, 1):uint()) + offset = offset + 1 + + return offset +end + +function short_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 2) + + tree:add(tvb(offset, 2), label, tvb_int(tvb(offset, 2), encoding)) + offset = offset + 2 + + return offset +end + +function unsigned_short_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 2) + + tree:add(tvb(offset, 2), label, tvb_uint(tvb(offset, 2), encoding)) + offset = offset + 2 + + return offset +end + +function long_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + tree:add(tvb(offset, 4), label, tvb_int(tvb(offset, 4), encoding)) + offset = offset + 4 + + return offset +end + +function unsigned_long_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + tree:add(tvb(offset, 4), label, tvb_uint(tvb(offset, 4), encoding)) + offset = offset + 4 + + return offset +end + +function long_long_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 8) + + tree:add(tvb(offset, 8), label, tvb_int(tvb(offset, 8), encoding)) + offset = offset + 8 + + return offset +end + +function unsigned_long_long_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 8) + + tree:add(tvb(offset, 8), label, tvb_uint(tvb(offset, 8), encoding)) + offset = offset + 8 + + return offset +end + +function float_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + tree:add(tvb(offset, 4), label, tvb_float(tvb(offset, 4), encoding)) + offset = offset + 4 + + return offset +end + +function double_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 8) + + tree:add(tvb(offset, 8), label, tvb_float(tvb(offset, 8), encoding)) + offset = offset + 8 + + return offset +end + +function boolean_deserialize(tvb, offset, encoding, tree, label) + local value = tvb(offset, 1):uint() + if value > 0 then + tree:add(tvb(offset, 1), label, "true") + else + tree:add(tvb(offset, 1), label, "false") + end + offset = offset + 1 + + return offset +end + +function string_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + tree:add(tvb(offset, size), label, string.format("\"%s\"", tvb(offset, size):stringz())) + offset = offset + size + + return offset +end + +function sequence_deserialize(tvb, offset, encoding, tree, label, deserialize) + offset = align(offset, 4) + + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + if size == 0 then + subtree:append_text(" [empty]") + else + for i = 1, size do + offset = deserialize(tvb, offset, encoding, subtree, "[" .. tostring(i - 1) .. "]") + end + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +function sequence_octet_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + tree:add(tvb(offset, size), label, tvb(offset, size):bytes():tohex(true, " ")) + offset = offset + size + + return offset +end + +function optional_deserialize(tvb, offset, encoding, tree, label, deserialize) + local has_value = tvb(offset, 1):uint() + offset = offset + 1 + if has_value > 0 then + offset = deserialize(tvb, offset, encoding, tree, label) + end + + return offset +end diff --git a/dissectors/dds-xrce/dds-xrce-proto.lua b/dissectors/dds-xrce/dds-xrce-proto.lua new file mode 100644 index 0000000..f25222a --- /dev/null +++ b/dissectors/dds-xrce/dds-xrce-proto.lua @@ -0,0 +1,454 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/jseldent/wireshark-dds-xrce (dds-xrce-proto.lua), +-- commit b3d212522dddac1955cdd569d464049a36b8e309 du 15/02/2023. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- DDS-XRCE Protocol dissector for Wireshark +-- +-- Copyright 2022 Lely Industries N.V. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +assert (redissect_packets, "This dissector (DDS-XRCE) requires Wireshark 3.5.0 or newer.") + +set_plugin_info({ + version = "1.0.0", + description = "DDS-XRCE Protocol dissector", + author = "J. S. Seldenthuis ", + repository = "https://github.com/jseldent/wireshark-dds-xrce" +}) + +require "dds-xrce-types" + +local p_dds_xrce = Proto("DDS-XRCE", "DDS for eXtremely Resource Constrained Environments") + +local f_tcp_length = ProtoField.uint16("dds-xrce.tcp.length", "length", base.DEC) +local f_canfd_length = ProtoField.uint8("dds-xrce.canfd.length", "length", base.DEC) + +local f_session_id = ProtoField.uint8("dds-xrce.session_id", "sessionId", base.HEX) +local f_stream_id = ProtoField.uint8("dds-xrce.stream_id", "streamId", base.HEX) +local f_sequence_nr = ProtoField.uint16("dds-xrce.sequence_nr", "sequenceNr", base.DEC) +local f_client_key = ProtoField.uint32("dds-xrce.client_key", "clientKey", base.HEX) + +local f_submessage = ProtoField.none("dds-xrce.submessage", "submessage") +local f_submessage_id = ProtoField.uint8("dds-xrce.submessage.id", "submessageId", base.DEC) +local f_flags = ProtoField.uint8("dds-xrce.submessage.flags", "flags", base.HEX) +local f_flags_endianness = + ProtoField.uint8( + "dds-xrce.submessage.flags.endianness", + "Endianness bit", + base.HEX, + {[0] = "Not set", [1] = "Set"}, + 0x01 +) +local f_flags_reuse = + ProtoField.uint8("dds-xrce.submessage.flags.reuse", "Reuse bit", base.HEX, {[0] = "Not set", [1] = "Set"}, 0x02) +local f_flags_replace = + ProtoField.uint8("dds-xrce.submessage.flags.replace", "Replace bit", base.HEX, {[0] = "Not set", [1] = "Set"}, 0x04) +local f_flags_data_format = + ProtoField.uint8( + "dds-xrce.submessage.flags.data_format", + "DataFormat", + base.HEX, + { + [0x0] = "FORMAT_DATA", + [0x2] = "FORMAT_SAMPLE", + [0x8] = "FORMAT_DATA_SEQ", + [0xA] = "FORMAT_SAMPLE_SEQ", + [0xE] = "FORMAT_PACKED_SAMPLES" + }, + 0x0E +) +local f_flags_last_fragment = + ProtoField.uint8( + "dds-xrce.submessage.flags.last_fragment", + "Last Fragment bit", + base.HEX, + {[0] = "Not set", [1] = "Set"}, + 0x02 +) +local f_submessage_length = ProtoField.uint16("dds-xrce.submessage.length", "submessageLength", base.DEC) + +p_dds_xrce.fields = { + f_tcp_length, + f_canfd_length, + f_session_id, + f_stream_id, + f_sequence_nr, + f_client_key, + f_submessage, + f_submessage_id, + f_flags, + f_flags_endianness, + f_flags_reuse, + f_flags_replace, + f_flags_data_format, + f_flags_last_fragment, + f_submessage_length +} + +p_dds_xrce.prefs.tcp_ports = Pref.range("TCP port(s)", "2018", "DDS-XRCE TCP port(s)", "65536") +p_dds_xrce.prefs.udp_ports = Pref.range("UDP port(s)", "2018", "DDS-XRCE UDP port(s)", "65536") +p_dds_xrce.prefs.discovery = + Pref.bool( + "Dissect XRCE Agent discovery", + false, + "Dissect the GET_INFO and INFO messages used for XRCE Agent Discovery. This is disabled by default, since it may conflict with the RTPS dissector." +) +p_dds_xrce.prefs.tcp_discovery_ports = + Pref.range("TCP discovery port(s)", "", "TCP/IP XRCE Agent discovery port", "65536") +p_dds_xrce.prefs.udp_discovery_ports = + Pref.range("UDP discovery port(s)", "7400", "UDP/IP XRCE Agent discovery port(s)", "65536") +p_dds_xrce.prefs.track_objects = + Pref.bool( + "Track DDS entities", + true, + "Track the creation and use of DDS entities to enable the dissection of topic and type names." +) +p_dds_xrce.prefs.deserialize_types = + Pref.bool( + "Deserialize user-defined data types", + true, + "Enable the deserialization of user-defined data types via custom deserialization functions." +) + +local info +local session_id +local stream_id +local sequence_nr +local fragments = {} +local submessages = {} + +local function dds_xrce_submessage(tvb, pinfo, tree, offset) + local subtree = tree:add(f_submessage, tvb(offset)) + + local submessage_id = tvb(offset, 1):uint() + subtree:add(f_submessage_id, tvb(offset, 1)) + offset = offset + 1 + + local flags = tvb(offset, 1):uint() + local t_flags = subtree:add(f_flags, tvb(offset, 1)) + if submessage_id == 1 then + -- CREATE + if bit.band(flags, 0x04) == 0x04 then + t_flags:append_text(", Replace bit") + end + t_flags:add(f_flags_replace, tvb(offset, 1)) + if bit.band(flags, 0x02) == 0x02 then + t_flags:append_text(", Reuse bit") + end + t_flags:add(f_flags_reuse, tvb(offset, 1)) + elseif submessage_id == 7 or submessage_id == 9 then + -- WRITE_DATA or DATA + if bit.band(flags, 0x0E) == 0x00 then + t_flags:append_text(", FORMAT_DATA") + elseif bit.band(flags, 0x0E) == 0x02 then + t_flags:append_text(", FORMAT_SAMPLE") + elseif bit.band(flags, 0x0E) == 0x08 then + t_flags:append_text(", FORMAT_DATA_SEQ") + elseif bit.band(flags, 0x0E) == 0x0A then + t_flags:append_text(", FORMAT_SAMPLE_SEQ") + elseif bit.band(flags, 0x0E) == 0x0E then + t_flags:append_text(", FORMAT_PACKED_SAMPLES") + end + t_flags:add(f_flags_data_format, tvb(offset, 1)) + elseif submessage_id == 13 then + -- FRAGMENT + if bit.band(flags, 0x02) == 0x02 then + t_flags:append_text(", Last Fragment bit") + end + t_flags:add(f_flags_last_fragment, tvb(offset, 1)) + end + local encoding = ENC_BIG_ENDIAN + if bit.band(flags, 0x01) == 0x01 then + t_flags:append_text(", Endianness bit") + encoding = ENC_LITTLE_ENDIAN + end + t_flags:add(f_flags_endianness, tvb(offset, 1)) + offset = offset + 1 + + local submessage_length = tvb(offset, 2):le_uint() + subtree:add_le(f_submessage_length, tvb(offset, 2)) + offset = offset + 2 + + subtree:set_len(4 + submessage_length) + + local type_name = nil + if submessage_id == 0 then + info = info .. ", CREATE_CLIENT" + subtree:set_text("CREATE_CLIENT") + type_name = "CREATE_CLIENT_Payload" + elseif submessage_id == 1 then + info = info .. ", CREATE" + subtree:set_text("CREATE") + type_name = "CREATE_Payload" + elseif submessage_id == 2 then + info = info .. ", GET_INFO" + subtree:set_text("GET_INFO") + type_name = "GET_INFO_Payload" + elseif submessage_id == 3 then + info = info .. ", DELETE" + subtree:set_text("DELETE") + type_name = "DELETE_Payload" + elseif submessage_id == 4 then + info = info .. ", STATUS_AGENT" + subtree:set_text("STATUS_AGENT") + type_name = "STATUS_AGENT_Payload" + elseif submessage_id == 5 then + info = info .. ", STATUS" + subtree:set_text("STATUS") + type_name = "STATUS_Payload" + elseif submessage_id == 6 then + info = info .. ", INFO" + subtree:set_text("INFO") + type_name = "INFO_Payload" + elseif submessage_id == 7 then + info = info .. ", WRITE_DATA" + subtree:set_text("WRITE_DATA") + if bit.band(flags, 0x0E) == 0x00 then + -- FORMAT_DATA + info = info .. " (FORMAT_DATA)" + type_name = "WRITE_DATA_Payload_Data" + elseif bit.band(flags, 0x0E) == 0x02 then + -- FORMAT_SAMPLE + info = info .. " (FORMAT_SAMPLE)" + type_name = "WRITE_DATA_Payload_Sample" + elseif bit.band(flags, 0x0E) == 0x08 then + -- FORMAT_DATA_SEQ + info = info .. " (FORMAT_DATA_SEQ)" + type_name = "WRITE_DATA_Payload_DataSeq" + elseif bit.band(flags, 0x0E) == 0x0A then + -- FORMAT_SAMPLE_SEQ + info = info .. " (FORMAT_SAMPLE_SEQ)" + type_name = "WRITE_DATA_Payload_SampleSeq" + elseif bit.band(flags, 0x0E) == 0x0E then + -- FORMAT_PACKED_SAMPLES + info = info .. " (FORMAT_PACKED_SAMPLES)" + type_name = "WRITE_DATA_Payload_PackedSamples" + end + elseif submessage_id == 8 then + info = info .. ", READ_DATA" + subtree:set_text("READ_DATA") + type_name = "READ_DATA_Payload" + elseif submessage_id == 9 then + info = info .. ", DATA" + subtree:set_text("DATA") + if bit.band(flags, 0x0E) == 0x00 then + -- FORMAT_DATA + info = info .. " (FORMAT_DATA)" + type_name = "DATA_Payload_Data" + elseif bit.band(flags, 0x0E) == 0x02 then + -- FORMAT_SAMPLE + info = info .. " (FORMAT_SAMPLE)" + type_name = "DATA_Payload_Sample" + elseif bit.band(flags, 0x0E) == 0x08 then + -- FORMAT_DATA_SEQ + info = info .. " (FORMAT_DATA_SEQ)" + type_name = "DATA_Payload_DataSeq" + elseif bit.band(flags, 0x0E) == 0x0A then + -- FORMAT_SAMPLE_SEQ + info = info .. " (FORMAT_SAMPLE_SEQ)" + type_name = "DATA_Payload_SampleSeq" + elseif bit.band(flags, 0x0E) == 0x0E then + -- FORMAT_PACKED_SAMPLES + info = info .. " (FORMAT_PACKED_SAMPLES)" + type_name = "DATA_Payload_PackedSamples" + end + elseif submessage_id == 10 then + info = info .. ", ACKNACK" + subtree:set_text("ACKNACK") + type_name = "ACKNACK_Payload" + info = info .. string.format(" (0x%02X, %u)", tvb(offset + 4, 1):uint(), tvb_uint(tvb(offset, 2), encoding) - 1) + elseif submessage_id == 11 then + info = info .. ", HEARTBEAT" + subtree:set_text("HEARTBEAT") + type_name = "HEARTBEAT_Payload" + info = info .. string.format(" (0x%02X, %u)", tvb(offset + 4, 1):uint(), tvb_uint(tvb(offset, 2), encoding) - 1) + elseif submessage_id == 12 then + info = info .. ", RESET" + subtree:set_text("RESET") + elseif submessage_id == 13 then + info = info .. ", FRAGMENT" + subtree:set_text("FRAGMENT") + if bit.band(flags, 0x02) == 0x02 then + info = info .. " (last)" + end + -- Store the fragment. + if not pinfo.visited then + -- Store the fragment. + if fragments[stream_id] == nil then + fragments[stream_id] = {} + end + fragments[stream_id][sequence_nr] = tvb(offset, submessage_length):bytes() + end + elseif submessage_id == 14 then + info = info .. ", TIMESTAMP" + subtree:set_text("TIMESTAMP") + type_name = "TIMESTAMP_Payload" + elseif submessage_id == 15 then + info = info .. ", TIMESTAMP_REPLY" + subtree:set_text("TIMESTAMP_REPLY") + type_name = "TIMESTAMP_REPLY_Payload" + end + + if type_name ~= nil and dds_xrce_types[type_name] ~= nil then + dds_xrce_types[type_name]( + tvb(offset, submessage_length):tvb(), + 0, + encoding, + subtree, + "payload (" .. type_name .. ")" + ) + elseif submessage_length > 0 then + subtree:add(tvb(offset, submessage_length), "payload:", tvb(offset, submessage_length):bytes():tohex(true, " ")) + end + + offset = offset + align(submessage_length, 4) + + -- If this is the last fragment, create a new submessage by reassembling the fragments. + if submessage_id == 13 and bit.band(flags, 0x02) == 0x02 then + -- Cache the reassembled submessage during the first visit. + if not pinfo.visited then + if fragments[stream_id] ~= nil then + local bytes = ByteArray.new() + -- Order the fragments by sequence number. + local sequence_nrs = {} + for i in pairs(fragments[stream_id]) do + table.insert(sequence_nrs, i) + end + table.sort(sequence_nrs) + for _, i in ipairs(sequence_nrs) do + bytes = bytes .. fragments[stream_id][i] + end + fragments[stream_id] = nil + if bytes:len() >= 4 then + submessages[pinfo.number] = bytes + end + end + end + -- Add the reassembled submessage to the packet containing the last FRAGMENT. + if submessages[pinfo.number] ~= nil then + dds_xrce_submessage( + ByteArray.tvb(submessages[pinfo.number], "Reassembled DDS-XRCE submessage"), + pinfo, + tree, + 0 + ) + end + end + + return offset +end + +local function dds_xrce_get_len(tvb, pinfo, offset) + return tvb(offset, 2):le_uint() + 2 +end + +local function dds_xrce_dissect(tvb, pinfo, tree) + pinfo.cols.protocol = "DDS-XRCE" + info = "" + + local subtree = tree:add(p_dds_xrce, tvb(), "DDS-XRCE Protocol") + local offset = 0 + + if pinfo.port_type == 2 then + -- TCP + subtree:add_le(f_tcp_length, tvb(offset, 2)) + offset = offset + 2 + elseif pinfo.port_type == 0 then + -- CANFD + subtree:add(f_canfd_length, tvb(offset, 1)) + offset = offset + 1 + end + + session_id = tvb(offset, 1):uint() + local t_session_id = subtree:add(f_session_id, tvb(offset, 1)) + if session_id == 0x00 then + t_session_id:append_text(" (SESSION_ID_NONE_WITH_CLIENT_KEY)") + elseif session_id == 0x80 then + t_session_id:append_text(" (SESSION_ID_NONE_WITHOUT_CLIENT_KEY)") + end + offset = offset + 1 + info = info .. string.format("0x%02X", session_id) + subtree:append_text(string.format(", sessionId: 0x%02X", session_id)) + + stream_id = tvb(offset, 1):uint() + local t_stream_id = subtree:add(f_stream_id, tvb(offset, 1)) + if stream_id == 0x00 then + t_stream_id:append_text(" (STREAMID_NONE)") + elseif stream_id == 0x01 then + t_stream_id:append_text(" (STREAMID_BUILTIN_BEST_EFFORTS)") + elseif stream_id == 0x80 then + t_stream_id:append_text(" (STREAMID_BUILTIN_RELIABLE)") + end + if stream_id >= 0x80 then + t_stream_id:add(tvb(offset, 1), "reliability:", "RELIABLE") + elseif stream_id >= 0x01 then + t_stream_id:add(tvb(offset, 1), "reliability:", "BEST_EFFORTS") + end + offset = offset + 1 + info = info .. string.format(":0x%02X", stream_id) + subtree:append_text(string.format(", streamId: 0x%02X", stream_id)) + + sequence_nr = tvb(offset, 2):le_uint() + subtree:add_le(f_sequence_nr, tvb(offset, 2)) + offset = offset + 2 + info = info .. string.format(" (%u)", sequence_nr) + + if session_id < 0x80 then + subtree:add_le(f_client_key, tvb(offset, 4)) + offset = offset + 4 + end + + while offset < tvb:len() do + offset = dds_xrce_submessage(tvb, pinfo, subtree, offset) + end + + pinfo.cols.info = info + + return offset +end + +function p_dds_xrce.init() + DissectorTable.get("tcp.port"):add(p_dds_xrce.prefs.tcp_ports, p_dds_xrce) + DissectorTable.get("udp.port"):add(p_dds_xrce.prefs.udp_ports, p_dds_xrce) + if p_dds_xrce.prefs.discovery then + DissectorTable.get("tcp.port"):add(p_dds_xrce.prefs.tcp_discovery_ports, p_dds_xrce) + DissectorTable.get("udp.port"):add(p_dds_xrce.prefs.udp_discovery_ports, p_dds_xrce) + end + + dds_xrce_types_init(p_dds_xrce.prefs.track_objects == true, p_dds_xrce.prefs.deserialize_types == true) + + fragments = {} + submessages = {} +end + +function p_dds_xrce.dissector(tvb, pinfo, tree) + if pinfo.port_type == 2 then + -- TCP + dissect_tcp_pdus(tvb, tree, 2, dds_xrce_get_len, dds_xrce_dissect) + elseif pinfo.port_type == 3 then + -- UDP + dds_xrce_dissect(tvb, pinfo, tree) + elseif pinfo.port_type == 0 then + -- CANFD + dds_xrce_dissect(tvb, pinfo, tree) + end +end + +DissectorTable.get("tcp.port"):add_for_decode_as(p_dds_xrce) +DissectorTable.get("udp.port"):add_for_decode_as(p_dds_xrce) +DissectorTable.get("can.subdissector"):add_for_decode_as(p_dds_xrce) + +if gui_enabled() then + dds_xrce_types_menu(MENU_TOOLS_UNSORTED) +end diff --git a/dissectors/dds-xrce/dds-xrce-types.lua b/dissectors/dds-xrce/dds-xrce-types.lua new file mode 100644 index 0000000..c2f5298 --- /dev/null +++ b/dissectors/dds-xrce/dds-xrce-types.lua @@ -0,0 +1,1568 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/jseldent/wireshark-dds-xrce (dds-xrce-types.lua), +-- commit b3d212522dddac1955cdd569d464049a36b8e309 du 15/02/2023. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- DDS-XRCE Types dissector for Wireshark +-- +-- Copyright 2022 Lely Industries N.V. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +require "dds-xrce-idl" + +dds_xrce_types = {} + +local track_objects = true +local deserialize_types = true + +local object_id = 0 +local object_profile_names = {} +local object_topic_names = {} +local object_type_names = {} + +function dds_xrce_types_init(track, deserialize) + track_objects = track + deserialize_types = deserialize +end + +function dds_xrce_types_menu(group) + local function reset_objects() + object_id = 0 + object_profile_names = {} + object_topic_names = {} + object_type_names = {} + + redissect_packets() + end + register_menu("DDS-XRCE/Reset objects", reset_objects, group) + + local function set_object() + local function action(id, profile_name, topic_name, type_name) + if profile_name ~= nil and profile_name ~= "" then + object_profile_names[tonumber(id)] = profile_name + end + if topic_name ~= nil and topic_name ~= "" then + object_topic_names[tonumber(id)] = topic_name + end + if type_name ~= nil and type_name ~= "" then + object_type_names[tonumber(id)] = type_name + end + redissect_packets() + end + local id = string.format("0x%04X", object_id) + local profile_name = object_profile_names[object_id] + local topic_name = object_topic_names[object_id] + local type_name = object_type_names[object_id] + if type_name == nil and topic_name ~= nil then + type_name = topic_type_names[topic_name] + end + new_dialog( + "Set object", + action, + {name = "ID", value = id}, + {name = "profile", value = profile_name}, + {name = "topic", value = topic_name}, + {name = "type", value = type_name} + ) + end + register_menu("DDS-XRCE/Set object...", set_object, group) +end + +local XML_PROFILE_NAME_PATTERN = "%s+profile_name%s*=%s*\"([^\"]*)\"" +local XML_NAME_PATTERN = "%s*([^%s<]*)%s*" +local XML_DATA_TYPE_PATTERN = "%s*([^%s<]*)%s*" + +local function ClientKey_deserialize(tvb, offset, encoding, tree, label) + tree:add(tvb(offset, 4), label, tvb(offset, 4):bytes():tohex(true)) + offset = offset + 4 + + return offset +end + +local function ObjectId_deserialize(tvb, offset, encoding, tree, label) + local object_id_0 = tvb(offset, 1):uint() + local object_id_1 = tvb(offset + 1, 1):uint() + local subtree = tree:add(tvb(offset, 2), label, tvb(offset, 2):bytes():tohex(true)) + if object_id_0 == 0xFF and object_id_1 == 0xFF then + subtree:append_text(" (SESSION)") + elseif bit.band(object_id_1, 0x0F) == 0x00 then + subtree:append_text(" (INVALID)") + elseif bit.band(object_id_1, 0x0F) == 0x01 then + subtree:append_text(" (PARTICIPANT)") + elseif bit.band(object_id_1, 0x0F) == 0x02 then + subtree:append_text(" (TOPIC)") + elseif bit.band(object_id_1, 0x0F) == 0x03 then + subtree:append_text(" (PUBLISHER)") + elseif bit.band(object_id_1, 0x0F) == 0x04 then + subtree:append_text(" (SUBSCRIBER)") + elseif bit.band(object_id_1, 0x0F) == 0x05 then + subtree:append_text(" (DATAWRITER)") + elseif bit.band(object_id_1, 0x0F) == 0x06 then + subtree:append_text(" (DATAREADER)") + elseif bit.band(object_id_1, 0x0F) == 0x0A then + subtree:append_text(" (TYPE)") + elseif bit.band(object_id_1, 0x0F) == 0x0B then + subtree:append_text(" (QOSPROFILE)") + elseif bit.band(object_id_1, 0x0F) == 0x0C then + subtree:append_text(" (APPLICATION)") + elseif bit.band(object_id_1, 0x0F) == 0x0D then + subtree:append_text(" (AGENT)") + elseif bit.band(object_id_1, 0x0F) == 0x0E then + subtree:append_text(" (CLIENT)") + end + if track_objects then + local id = tvb(offset, 2):uint() + local profile_name = object_profile_names[id] + if profile_name ~= nil then + subtree:add("profile:", profile_name):set_generated(true) + end + local topic_name = object_topic_names[id] + local type_name = object_type_names[id] + if topic_name ~= nil then + subtree:add("topic:", topic_name):set_generated(true) + if type_name == nil then + type_name = topic_type_names[topic_name] + end + end + if type_name ~= nil then + subtree:add("type:", type_name):set_generated(true) + end + end + offset = offset + 2 + + return offset +end + +local function XrceCookie_deserialize(tvb, offset, encoding, tree, label) + tree:add(tvb(offset, 4), label, tvb(offset, 4):string()) + offset = offset + 4 + + return offset +end + +local function XrceVersion_deserialize(tvb, offset, encoding, tree, label) + local xrce_version_major = tvb(offset, 1):uint() + local xrce_version_minor = tvb(offset + 1, 1):uint() + local xrce_version = tostring(xrce_version_major) .. "." .. tostring(xrce_version_minor) + local subtree = tree:add(tvb(offset, 2), label, xrce_version) + subtree:add(tvb(offset, 1), "major:", xrce_version_major) + subtree:add(tvb(offset + 1, 1), "minor:", xrce_version_minor) + offset = offset + 2 + + return offset +end + +local function XrceVendorId_deserialize(tvb, offset, encoding, tree, label) + local xrce_vendor_id_major = tvb(offset, 1):uint() + local xrce_vendor_id_minor = tvb(offset + 1, 1):uint() + local subtree = + tree:add(tvb(offset, 2), label, tostring(xrce_vendor_id_major) .. "." .. tostring(xrce_vendor_id_minor)) + if xrce_vendor_id_major == 0 and xrce_vendor_id_minor == 0 then + subtree:append_text(" (INVALID)") + elseif xrce_vendor_id_major == 1 and xrce_vendor_id_minor == 15 then + subtree:append_text(" (eProsima)") + end + offset = offset + 2 + + return offset +end + +local function Time_t_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + local nstime = "" + if encoding == ENC_BIG_ENDIAN then + nstime = tostring(tvb(offset, 8):nstime()) + elseif encoding == ENC_LITTLE_ENDIAN then + nstime = tostring(tvb(offset, 8):le_nstime()) + end + local subtree = tree:add(tvb(offset, 8), label, nstime) + subtree:add(tvb(offset, 4), "seconds:", tvb_int(tvb(offset, 4), encoding)) + offset = offset + 4 + subtree:add(tvb(offset, 4), "nanoseconds:", tvb_uint(tvb(offset, 4), encoding)) + offset = offset + 4 + + return offset +end + +local function SessionId_deserialize(tvb, offset, encoding, tree, label) + local session_id = tvb(offset, 1):uint() + local subtree = tree:add(tvb(offset, 1), label, string.format("0x%02X", session_id)) + if session_id == 0x00 then + subtree:append_text(" (SESSION_ID_NONE_WITH_CLIENT_KEY)") + elseif session_id == 0x80 then + subtree:append_text(" (SESSION_ID_NONE_WITHOUT_CLIENT_KEY)") + end + offset = offset + 1 + + return offset +end + +local function StreamId_deserialize(tvb, offset, encoding, tree, label) + local stream_id = tvb(offset, 1):uint() + local subtree = tree:add(tvb(offset, 1), label, string.format("0x%02X", stream_id)) + if stream_id == 0x00 then + subtree:append_text(" (STREAMID_NONE)") + elseif session_id == 0x01 then + subtree:append_text(" (STREAMID_BUILTIN_BEST_EFFORTS)") + elseif session_id == 0x80 then + subtree:append_text(" (STREAMID_BUILTIN_RELIABLE)") + end + if stream_id >= 0x80 then + subtree:add(tvb(offset, 1), "reliability:", "RELIABLE") + elseif stream_id >= 0x01 then + subtree:add(tvb(offset, 1), "reliability:", "BEST_EFFORTS") + end + offset = offset + 1 + + return offset +end + +local function TransportLocatorSmall_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset, 3), label) + + subtree:add(tvb(offset, 2), "address:", tvb(offset, 2):bytes():tohex(true, " ")) + offset = offset + 2 + offset = octet_deserialize(tvb, offset, encoding, subtree, "locator_port:") + + return offset +end + +local function TransportLocatorMedium_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + subtree:add(tvb(offset, 4), "address:", tostring(tvb(offset, 4):ipv4())) + offset = offset + 4 + + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "locator_port:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function TransportLocatorLarge_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + subtree:add(tvb(offset, 16), "address:", tostring(tvb(offset, 16):ipv6())) + offset = offset + 16 + + offset = unsigned_long_deserialize(tvb, offset, encoding, subtree, "locator_port:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function TransportLocatorString_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = string_deserialize(tvb, offset, encoding, subtree, "string_locator:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function TransportLocator_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local format = tvb(offset, 1):uint() + local t_format = subtree:add(tvb(offset, 1), "format:", string.format("0x%02X", format)) + offset = offset + 1 + + if format == 0x00 then + -- ADDRES_FORMAT_SMALL + t_format:append_text(" (ADDRES_FORMAT_SMALL)") + offset = TransportLocatorSmall_deserialize(tvb, offset, encoding, subtree, "small_locator") + elseif format == 0x01 then + -- ADDRES_FORMAT_MEDIUM + t_format:append_text(" (ADDRES_FORMAT_MEDIUM)") + offset = TransportLocatorMedium_deserialize(tvb, offset, encoding, subtree, "medium_locator") + elseif format == 0x02 then + -- ADDRES_FORMAT_LARGE + t_format:append_text(" (ADDRES_FORMAT_LARGE)") + offset = TransportLocatorLarge_deserialize(tvb, offset, encoding, subtree, "large_locator") + elseif format == 0x03 then + -- ADDRES_FORMAT_STRING + t_format:append_text(" (ADDRES_FORMAT_STRING)") + offset = TransportLocatorString_deserialize(tvb, offset, encoding, subtree, "string_locator") + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function TransportLocatorSeq_deserialize(tvb, offset, encoding, tree, label) + return sequence_deserialize(tvb, offset, encoding, tree, label, TransportLocator_deserialize) +end + +local function Property_deserialize(tvb, offset, encoding, tree) + offset = align(offset, 4) + local begin = offset + local name_size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + local name = tvb(offset, name_size):stringz() + offset = offset + name_size + + offset = align(offset, 4) + local value_size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + local value = tvb(offset, value_size):stringz() + offset = offset + value_size + + tree:add(tvb(begin, offset - begin), name .. ":", value) + + return offset +end + +local function PropertySeq_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + if size == 0 then + subtree:append_text(" [empty]") + else + for i = 1, size do + offset = Property_deserialize(tvb, offset, encoding, subtree) + end + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function CLIENT_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = XrceCookie_deserialize(tvb, offset, encoding, subtree, "xrce_cookie:") + offset = XrceVersion_deserialize(tvb, offset, encoding, subtree, "xrce_version:") + offset = XrceVendorId_deserialize(tvb, offset, encoding, subtree, "xrce_vendor_id:") + offset = ClientKey_deserialize(tvb, offset, encoding, subtree, "client_key:") + offset = SessionId_deserialize(tvb, offset, encoding, subtree, "session_id:") + offset = optional_deserialize(tvb, offset, encoding, subtree, "properties", PropertySeq_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function AGENT_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = XrceCookie_deserialize(tvb, offset, encoding, subtree, "xrce_cookie:") + offset = XrceVersion_deserialize(tvb, offset, encoding, subtree, "xrce_version:") + offset = XrceVendorId_deserialize(tvb, offset, encoding, subtree, "xrce_vendor_id:") + offset = optional_deserialize(tvb, offset, encoding, subtree, "properties", PropertySeq_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_DomainParticipant_Binary_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = optional_deserialize(tvb, offset, encoding, subtree, "domain_reference:", string_deserialize) + offset = optional_deserialize(tvb, offset, encoding, subtree, "qos_profile_reference:", string_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_Topic_Binary_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + local topic_name = tvb(offset, size):stringz() + subtree:add(tvb(offset, size), "topic_name:", topic_name) + offset = offset + size + if track_objects then + -- Register the topic name for this object. + object_topic_names[object_id] = topic_name + end + + offset = optional_deserialize(tvb, offset, encoding, subtree, "type_reference:", string_deserialize) + + -- WARNING: This is `@optional DDS:XTypes::TypeIdentifier type_identifier;` in the official dds_xrce_types.idl. + local has_type_name = tvb(offset, 1):uint() + offset = offset + 1 + if has_type_name > 0 then + offset = align(offset, 4) + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + local type_name = tvb(offset, size):stringz() + subtree:add(tvb(offset, size), "type_name:", type_name) + offset = offset + size + if track_objects then + -- Register the type name for this object. + topic_type_names[topic_name] = type_name + end + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_Publisher_Binary_Qos_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local has_partitions = tvb(offset, 1):uint() + offset = offset + 1 + if has_partitions > 0 then + offset = sequence_deserialize(tvb, offset, encoding, subtree, "partitions", string_deserialize) + end + + offset = optional_deserialize(tvb, offset, encoding, subtree, "group_data:", sequence_octet_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_Publisher_Binary_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = optional_deserialize(tvb, offset, encoding, subtree, "publisher_name:", string_deserialize) + offset = optional_deserialize(tvb, offset, encoding, subtree, "qos", OBJK_Publisher_Binary_Qos_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_Subscriber_Binary_Qos_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local has_partitions = tvb(offset, 1):uint() + offset = offset + 1 + if has_partitions > 0 then + offset = sequence_deserialize(tvb, offset, encoding, subtree, "partitions", string_deserialize) + end + + offset = optional_deserialize(tvb, offset, encoding, subtree, "group_data:", sequence_octet_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_Subscriber_Binary_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = optional_deserialize(tvb, offset, encoding, subtree, "subscriber_name:", string_deserialize) + offset = optional_deserialize(tvb, offset, encoding, subtree, "qos", OBJK_Subscriber_Binary_Qos_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function EndpointQosFlags_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 2) + + local flags = tvb_uint(tvb(offset, 2), encoding) + local subtree = tree:add(tvb(offset, 2), label, string.format("0x%04X", flags)) + if bit.band(flags, 0x20) == 0x20 then + subtree:append_text(", is_durability_persistent") + subtree:add(tvb(offset, 2), ".... .... .... 1... = is_durability_persistent:", "Set") + else + subtree:add(tvb(offset, 2), ".... .... .... 0... = is_durability_persistent:", "Not set") + end + if bit.band(flags, 0x10) == 0x10 then + subtree:append_text(", is_durability_transient") + subtree:add(tvb(offset, 2), ".... .... .... 1... = is_durability_transient:", "Set") + else + subtree:add(tvb(offset, 2), ".... .... .... 0... = is_durability_transient:", "Not set") + end + if bit.band(flags, 0x08) == 0x08 then + subtree:append_text(", is_durability_transient_local") + subtree:add(tvb(offset, 2), ".... .... .... 1... = is_durability_transient_local:", "Set") + else + subtree:add(tvb(offset, 2), ".... .... .... 0... = is_durability_transient_local:", "Not set") + end + if bit.band(flags, 0x04) == 0x04 then + subtree:append_text(", is_ownership_exclusive") + subtree:add(tvb(offset, 2), ".... .... .... .1.. = is_ownership_exclusive:", "Set") + else + subtree:add(tvb(offset, 2), ".... .... .... .0.. = is_ownership_exclusive:", "Not set") + end + if bit.band(flags, 0x02) == 0x02 then + subtree:append_text(", is_history_keep_all") + subtree:add(tvb(offset, 2), ".... .... .... ..1. = is_history_keep_all:", "Set") + else + subtree:add(tvb(offset, 2), ".... .... .... ..0. = is_history_keep_all:", "Not set") + end + if bit.band(flags, 0x01) == 0x01 then + subtree:append_text(", is_reliable") + subtree:add(tvb(offset, 2), ".... .... .... ...1 = is_reliable:", "Set") + else + subtree:add(tvb(offset, 2), ".... .... .... ...0 = is_reliable:", "Not set") + end + offset = offset + 2 + + return offset +end + +local function OBJK_Endpoint_Binary_Qos_deserialize(tvb, offset, encoding, tree) + offset = EndpointQosFlags_deserialize(tvb, offset, encoding, tree, "qos_flags:") + offset = optional_deserialize(tvb, offset, encoding, tree, "history_depth:", unsigned_short_deserialize) + offset = optional_deserialize(tvb, offset, encoding, tree, "deadline_msec:", unsigned_long_deserialize) + offset = optional_deserialize(tvb, offset, encoding, tree, "lifespan_msec:", unsigned_long_deserialize) + offset = optional_deserialize(tvb, offset, encoding, tree, "user_data:", sequence_octet_deserialize) + + return offset +end + +local function OBJK_DataWriter_Binary_Qos_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Endpoint_Binary_Qos_deserialize(tvb, offset, encoding, subtree) + -- WARNING: This is `@optional unsigned long ownership_strength;` in the official dds_xrce_types.idl. + offset = optional_deserialize(tvb, offset, encoding, tree, "ownership_strength:", unsigned_long_long_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_DataReader_Binary_Qos_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Endpoint_Binary_Qos_deserialize(tvb, offset, encoding, subtree) + -- WARNING: This is `@optional unsigned long timebasedfilter_msec;` in the official dds_xrce_types.idl. + offset = optional_deserialize(tvb, offset, encoding, tree, "timebasedfilter_msec:", unsigned_long_long_deserialize) + offset = optional_deserialize(tvb, offset, encoding, tree, "contentbased_filter:", string_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_DataReader_Binary_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + -- WARNING: This is `@optional string topic_nmne;` in the official dds_xrce_types.idl. + if track_objects then + -- Register the topic name for this object. + topic_id = tvb(offset, 2):uint() + if object_topic_names[topic_id] ~= nil then + object_topic_names[object_id] = object_topic_names[topic_id] + end + end + offset = ObjectId_deserialize(tvb, offset, encoding, subtree, "topic_id:") + + offset = optional_deserialize(tvb, offset, encoding, subtree, "qos", OBJK_DataReader_Binary_Qos_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_DataWriter_Binary_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + -- WARNING: This is `@optional string topic_name;` in the official dds_xrce_types.idl. + if track_objects then + -- Register the topic name for this object. + topic_id = tvb(offset, 2):uint() + if object_topic_names[topic_id] ~= nil then + object_topic_names[object_id] = object_topic_names[topic_id] + end + end + offset = ObjectId_deserialize(tvb, offset, encoding, subtree, "topic_id:") + + offset = optional_deserialize(tvb, offset, encoding, subtree, "qos", OBJK_DataWriter_Binary_Qos_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_Representation3Formats_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local format = tvb(offset, 1):uint() + local t_format = subtree:add(tvb(offset, 1), "format:", string.format("0x%02X", format)) + offset = offset + 1 + + if format == 0x01 then + --- REPRESENTATION_BY_REFERENCE + t_format:append_text(" (REPRESENTATION_BY_REFERENCE)") + offset = align(offset, 4) + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + local object_reference = tvb(offset, size):stringz() + subtree:add(tvb(offset, size), "object_reference:", object_reference) + offset = offset + size + if track_objects then + -- Register the profile and topic names for this object. + object_profile_names[object_id] = object_reference + local topic_name = nil + if bit.band(object_id, 0x0F) == 0x2 then + -- OBJK_TOPIC + topic_name = topic_names[object_reference] + elseif bit.band(object_id, 0x0F) == 0x5 then + -- OBJK_DATAWRITER + topic_name = data_writer_topic_names[object_reference] + elseif bit.band(object_id, 0x0F) == 0x6 then + -- OBJK_DATAREADER + topic_name = data_reader_topic_names[object_reference] + end + if topic_name ~= nil then + object_topic_names[object_id] = topic_name + end + end + elseif format == 0x02 then + --- REPRESENTATION_AS_XML_STRING + t_format:append_text(" (REPRESENTATION_AS_XML_STRING)") + offset = align(offset, 4) + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + local xml_string_representation = tvb(offset, size):stringz() + subtree:add(tvb(offset, size), "xml_string_representation:", xml_string_representation) + offset = offset + size + if track_objects then + -- Register the profile, topic and type names for this object. + local profile_name = string.match(xml_string_representation, XML_PROFILE_NAME_PATTERN) + if profile_name ~= nil then + object_profile_names[object_id] = profile_name + end + local topic_name = nil + if bit.band(object_id, 0x0F) == 0x2 then + -- OBJK_TOPIC + topic_name = string.match(xml_string_representation, XML_NAME_PATTERN) + local type_name = string.match(xml_string_representation, XML_DATA_TYPE_PATTERN) + if topic_name ~= nil and type_name ~= nil then + topic_type_names[topic_name] = type_name + end + elseif bit.band(object_id, 0x0F) == 0x5 then + -- OBJK_DATAWRITER + topic_name = string.match(xml_string_representation, XML_NAME_PATTERN) + elseif bit.band(object_id, 0x0F) == 0x6 then + -- OBJK_DATAREADER + topic_name = string.match(xml_string_representation, XML_NAME_PATTERN) + end + if topic_name ~= nil then + object_topic_names[object_id] = topic_name + end + end + elseif format == 0x03 then + --- REPRESENTATION_IN_BINARY + t_format:append_text(" (REPRESENTATION_IN_BINARY)") + + offset = align(offset, 4) + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + if bit.band(object_id, 0x0F) == 0x1 then + -- OBJK_PARTICIPANT + OBJK_DomainParticipant_Binary_deserialize( + tvb(offset, size):tvb(), + 0, + encoding, + subtree, + "binary_representation" + ) + elseif bit.band(object_id, 0x0F) == 0x2 then + -- OBJK_TOPIC + OBJK_Topic_Binary_deserialize(tvb(offset, size):tvb(), 0, encoding, subtree, "binary_representation") + elseif bit.band(object_id, 0x0F) == 0x3 then + -- OBJK_PUBLISHER + OBJK_Publisher_Binary_deserialize(tvb(offset, size):tvb(), 0, encoding, subtree, "binary_representation") + elseif bit.band(object_id, 0x0F) == 0x4 then + -- OBJK_SUBSCRIBER + OBJK_Subscriber_Binary_deserialize(tvb(offset, size):tvb(), 0, encoding, subtree, "binary_representation") + elseif bit.band(object_id, 0x0F) == 0x5 then + -- OBJK_DATAWRITER + OBJK_DataWriter_Binary_deserialize(tvb(offset, size):tvb(), 0, encoding, subtree, "binary_representation") + elseif bit.band(object_id, 0x0F) == 0x6 then + -- OBJK_DATAREADER + OBJK_DataReader_Binary_deserialize(tvb(offset, size):tvb(), 0, encoding, subtree, "binary_representation") + else + subtree:add(tvb(offset, size), "binary_representation:", tvb(offset, size):bytes():tohex(true, " ")) + end + offset = offset + size + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_Representation3_Base(tvb, offset, encoding, tree) + return OBJK_Representation3Formats_deserialize(tvb, offset, encoding, tree, "representation") +end + +local function OBJK_QOSPROFILE_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_TYPE_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_DOMAIN_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_APPLICATION_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_PUBLISHER_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + offset = ObjectId_deserialize(tvb, offset, encoding, subtree, "participant_id:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_SUBSCRIBER_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + offset = ObjectId_deserialize(tvb, offset, encoding, subtree, "participant_id:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function DATAWRITER_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + offset = ObjectId_deserialize(tvb, offset, encoding, subtree, "publisher_id:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function DATAREADER_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + offset = ObjectId_deserialize(tvb, offset, encoding, subtree, "subscriber_id:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_PARTICIPANT_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + offset = short_deserialize(tvb, offset, encoding, subtree, "domain_id:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function OBJK_TOPIC_Representation_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = OBJK_Representation3_Base(tvb, offset, encoding, subtree) + offset = ObjectId_deserialize(tvb, offset, encoding, subtree, "participant_id:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function ObjectVariant_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local kind = tvb(offset, 1):uint() + local t_kind = subtree:add(tvb(offset, 1), "kind:", string.format("0x%02X", kind)) + offset = offset + 1 + + if kind == 0x0D then + -- OBJK_AGENT + t_kind:append_text(" (OBJK_AGENT)") + offset = AGENT_Representation_deserialize(tvb, offset, encoding, subtree, "agent") + elseif kind == 0x0E then + -- OBJK_CLIENT + t_kind:append_text(" (OBJK_CLIENT)") + offset = CLIENT_Representation_deserialize(tvb, offset, encoding, subtree, "client") + elseif kind == 0x0C then + -- OBJK_APPLICATION + t_kind:append_text(" (OBJK_APPLICATION)") + offset = OBJK_APPLICATION_Representation_deserialize(tvb, offset, encoding, subtree, "application") + elseif kind == 0x01 then + -- OBJK_PARTICIPANT + t_kind:append_text(" (OBJK_PARTICIPANT)") + offset = OBJK_PARTICIPANT_Representation_deserialize(tvb, offset, encoding, subtree, "participant") + elseif kind == 0x0B then + -- OBJK_QOSPROFILE + t_kind:append_text(" (OBJK_QOSPROFILE)") + offset = OBJK_QOSPROFILE_Representation_deserialize(tvb, offset, encoding, subtree, "qos_profile") + elseif kind == 0x0A then + -- OBJK_TYPE + t_kind:append_text(" (OBJK_TYPE)") + offset = OBJK_TYPE_Representation_deserialize(tvb, offset, encoding, subtree, "type") + elseif kind == 0x02 then + -- OBJK_TOPIC + t_kind:append_text(" (OBJK_TOPIC)") + offset = OBJK_TOPIC_Representation_deserialize(tvb, offset, encoding, subtree, "topic") + elseif kind == 0x03 then + -- OBJK_PUBLISHER + t_kind:append_text(" (OBJK_PUBLISHER)") + offset = OBJK_PUBLISHER_Representation_deserialize(tvb, offset, encoding, subtree, "publisher") + elseif kind == 0x04 then + -- OBJK_SUBSCRIBER + t_kind:append_text(" (OBJK_SUBSCRIBER)") + offset = OBJK_SUBSCRIBER_Representation_deserialize(tvb, offset, encoding, subtree, "subscriber") + elseif kind == 0x05 then + -- OBJK_DATAWRITER + t_kind:append_text(" (OBJK_DATAWRITER)") + offset = DATAWRITER_Representation_deserialize(tvb, offset, encoding, subtree, "data_writer") + elseif kind == 0x06 then + -- OBJK_DATAREADER + t_kind:append_text(" (OBJK_DATAREADER)") + offset = DATAREADER_Representation_deserialize(tvb, offset, encoding, subtree, "data_reader") + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function RequestId_deserialize(tvb, offset, encoding, tree, label) + tree:add(tvb(offset, 2), label, tvb(offset, 2):bytes():tohex(true)) + offset = offset + 2 + + return offset +end + +local function StatusValue_deserialize(tvb, offset, encoding, tree, label) + local status = tvb(offset, 1):uint() + local subtree = tree:add(tvb(offset, 1), "status:", string.format("0x%02X", status)) + if status == 0x00 then + subtree:append_text(" (STATUS_OK)") + elseif status == 0x01 then + subtree:append_text(" (STATUS_OK_MATCHED)") + elseif status == 0x80 then + subtree:append_text(" (STATUS_ERR_DDS_ERROR)") + elseif status == 0x81 then + subtree:append_text(" (STATUS_ERR_MISMATCH)") + elseif status == 0x82 then + subtree:append_text(" (STATUS_ERR_ALREADY_EXISTS)") + elseif status == 0x83 then + subtree:append_text(" (STATUS_ERR_DENIED)") + elseif status == 0x84 then + subtree:append_text(" (STATUS_ERR_UNKNOWN_REFERENEC)") + elseif status == 0x85 then + subtree:append_text(" (STATUS_ERR_INVALID_DATA)") + elseif status == 0x86 then + subtree:append_text(" (STATUS_ERR_INCOMPATIBLE)") + elseif status == 0x87 then + subtree:append_text(" (STATUS_ERR_RESOURCES)") + end + offset = offset + 1 + + return offset +end + +local function ResultStatus_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = StatusValue_deserialize(tvb, offset, encoding, subtree, "status:") + offset = octet_deserialize(tvb, offset, encoding, subtree, "implementation_status:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function InfoMask_deserialize(tvb, offset, encoding, tree, label) + local info_mask = tvb_uint(tvb(offset, 4), encoding) + local subtree = tree:add(tvb(offset, 4), label, string.format("0x%08X", info_mask)) + if bit.band(info_mask, 0x2) == 0x2 then + subtree:append_text(", INFO_ACTIVITY") + subtree:add(tvb(offset, 4), ".... .... .... .... .... .... .... ..1. = INFO_ACTIVITY:", "Set") + else + subtree:add(tvb(offset, 4), ".... .... .... .... .... .... .... ..0. = INFO_ACTIVITY:", "Not set") + end + if bit.band(info_mask, 0x1) == 0x1 then + subtree:append_text(", INFO_CONFIGURATION") + subtree:add(tvb(offset, 4), ".... .... .... .... .... .... .... ...1 = INFO_CONFIGURATION:", "Set") + else + subtree:add(tvb(offset, 4), ".... .... .... .... .... .... .... ...0 = INFO_CONFIGURATION:", "Not set") + end + offset = offset + 4 + + return offset +end + +local function AGENT_ActivityInfo_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = short_deserialize(tvb, offset, encoding, subtree, "availability:") + offset = TransportLocatorSeq_deserialize(tvb, offset, encoding, subtree, "address_seq") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function DATAREADER_ActivityInfo_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 2) + + local subtree = tree:add(tvb(offset, 2), label) + + return short_deserialize(tvb, offset, encoding, subtree, "highest_acked_num:") +end + +local function DATAWRITER_ActivityInfo_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 8) + + local subtree = tree:add(tvb(offset, 10), label) + + offset = unsigned_long_long_deserialize(tvb, offset, encoding, subtree, "sample_seq_num:") + offset = short_deserialize(tvb, offset, encoding, subtree, "stream_seq_num:") + + return offset +end + +local function ActivityInfoVariant_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local kind = tvb(offset, 1):uint() + local t_kind = subtree:add(tvb(offset, 1), "kind:", string.format("0x%02X", kind)) + offset = offset + 1 + + if kind == 0x0D then + -- OBJK_AGENT + t_kind:append_text(" (OBJK_AGENT)") + offset = AGENT_ActivityInfo_deserialize(tvb, offset, encoding, subtree, "agent") + elseif kind == 0x05 then + -- OBJK_DATAWRITER + t_kind:append_text(" (OBJK_DATAWRITER)") + offset = DATAWRITER_ActivityInfo_deserialize(tvb, offset, encoding, subtree, "data_writer") + elseif kind == 0x06 then + -- OBJK_DATAREADER + t_kind:append_text(" (OBJK_DATAREADER)") + offset = DATAREADER_ActivityInfo_deserialize(tvb, offset, encoding, subtree, "data_reader") + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function ObjectInfo_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + -- WARNING: The config member comes after the activity member in the official dds_xrce_types.idl. + offset = optional_deserialize(tvb, offset, encoding, subtree, "config", ObjectVariant_deserialize) + offset = optional_deserialize(tvb, offset, encoding, subtree, "activity", ActivityInfoVariant_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function BaseObjectRequest_deserialize(tvb, offset, encoding, tree) + offset = RequestId_deserialize(tvb, offset, encoding, tree, "request_id:") + object_id = tvb(offset, 2):uint() + offset = ObjectId_deserialize(tvb, offset, encoding, tree, "object_id:") + + return offset +end + +local function RelatedObjectRequest_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function BaseObjectReply_deserialize(tvb, offset, encoding, tree) + offset = RelatedObjectRequest_deserialize(tvb, offset, encoding, tree, "related_request") + offset = ResultStatus_deserialize(tvb, offset, encoding, tree, "result") + + return offset +end + +local function DataFormat_deserialize(tvb, offset, encoding, tree, label) + local data_format = tvb(offset, 1):uint() + local subtree = tree:add(tvb(offset, 1), label, string.format("0x%02X", data_format)) + if data_format == 0x00 then + subtree:append_text(" (FORMAT_DATA)") + elseif data_format == 0x02 then + subtree:append_text(" (FORMAT_SAMPLE)") + elseif data_format == 0x08 then + subtree:append_text(" (FORMAT_DATA_SRQ)") + elseif data_format == 0x0A then + subtree:append_text(" (FORMAT_SAMPLE_SEQ)") + elseif data_format == 0x0E then + subtree:append_text(" (FORMAT_PACKED_SAMPLES)") + end + offset = offset + 1 + + return offset +end + +local function DataDeliveryControl_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 2) + + local subtree = tree:add(tvb(offset, 8), label) + + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "max_samples:") + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "max_elapsed_time:") + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "max_bytes_per_second:") + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "min_pace_period:") + + return offset +end + +local function ReadSpecification_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = StreamId_deserialize(tvb, offset, encoding, subtree, "preferred_stream_id:") + offset = DataFormat_deserialize(tvb, offset, encoding, subtree, "data_format:") + offset = optional_deserialize(tvb, offset, encoding, subtree, "content_filter_expression:", string_deserialize) + offset = optional_deserialize(tvb, offset, encoding, subtree, "delivery_control", DataDeliveryControl_deserialize) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function SampleInfoFlags_deserialize(tvb, offset, encoding, tree, label) + local flags = tvb(offset, 1):uint() + local subtree = tree:add(tvb(offset, 1), label, string.format("0x%02X", flags)) + if bit.band(flags, 0x8) == 0x8 then + subtree:append_text(", SAMPLE_STATE_READ") + subtree:add(tvb(offset, 1), ".... 1... = SAMPLE_STATE_READ:", "Set") + else + subtree:add(tvb(offset, 1), ".... 0... = SAMPLE_STATE_READ:", "Not set") + end + if bit.band(flags, 0x4) == 0x4 then + subtree:append_text(", VIEW_STATE_NEW") + subtree:add(tvb(offset, 1), ".... .1.. = VIEW_STATE_NEW:", "Set") + else + subtree:add(tvb(offset, 1), ".... .0.. = VIEW_STATE_NEW:", "Not set") + end + if bit.band(flags, 0x2) == 0x2 then + subtree:append_text(", INSTANCE_STATE_DISPOSED") + subtree:add(tvb(offset, 1), ".... ..1. = INSTANCE_STATE_DISPOSED:", "Set") + else + subtree:add(tvb(offset, 1), ".... ..0. = INSTANCE_STATE_DISPOSED:", "Not set") + end + if bit.band(flags, 0x1) == 0x1 then + subtree:append_text(", INSTANCE_STATE_UNREGISTERED") + subtree:add(tvb(offset, 1), ".... ...1 = INSTANCE_STATE_UNREGISTERED:", "Set") + else + subtree:add(tvb(offset, 1), ".... ...0 = INSTANCE_STATE_UNREGISTERED:", "Not set") + end + offset = offset + 1 + + return offset +end + +local function SeqNumberAndTimestamp_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + local subtree = tree:add(tvb(offset, 8), label) + + offset = unsigned_long_deserialize(tvb, offset, encoding, subtree, "sequence_number:") + offset = unsigned_long_deserialize(tvb, offset, encoding, subtree, "session_time_offset:") + + return offset +end + +local function SampleInfoDetail_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local format = tvb(offset, 1):uint() + local t_format = subtree:add(tvb(offset, 1), "format:", string.format("0x%02X", format)) + offset = offset + 1 + if format == 0x00 then + -- FORMAT_EMPTY + t_format:append_text(" (FORMAT_EMPTY)") + elseif format == 0x01 then + -- FORMAT_SEQNUM + t_format:append_text(" (FORMAT_SEQNUM)") + offset = unsigned_long_deserialize(tvb, offset, encoding, subtree, "sequence_number:") + elseif format == 0x02 then + -- FORMAT_TIMESTAMP + t_format:append_text(" (FORMAT_TIMESTAMP)") + offset = unsigned_long_deserialize(tvb, offset, encoding, subtree, "session_time_offset:") + elseif format == 0x03 then + -- FORMAT_SEQN_TIMS + t_format:append_text(" (FORMAT_SEQN_TIMS)") + offset = SeqNumberAndTimestamp_deserialize(tvb, offset, encoding, subtree, "seqnum_n_timestamp") + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function SampleInfo_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = SampleInfoFlags_deserialize(tvb, offset, encoding, subtree, "state:") + offset = SampleInfoDetail_deserialize(tvb, offset, encoding, subtree, "detail") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function SampleInfoDelta_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = SampleInfoFlags_deserialize(tvb, offset, encoding, subtree, "state:") + offset = octet_deserialize(tvb, offset, encoding, subtree, "seq_number_delta:") + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "timestamp_delta:") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function SampleData_deserialize(tvb, offset, encoding, tree, label) + local type_name = object_type_names[object_id] + if type_name == nil and track_objects then + local topic_name = object_topic_names[object_id] + if topic_name ~= nil then + type_name = topic_type_names[topic_name] + end + end + + local subtree = tree:add(tvb(offset), label) + if deserialize_types and type_name ~= nil and types[type_name] ~= nil then + types[type_name](tvb(offset):tvb(), 0, encoding, subtree, "serialized_data (" .. type_name .. ")") + else + subtree:add(tvb(offset), "serialized_data:", tvb(offset):bytes():tohex(true, " ")) + end + offset = tvb:len() + + return offset +end + +local function SampleDataSeq_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + if size == 0 then + subtree:append_text(" [empty]") + else + local sample_data_size = math.ceil((tvb:len() - offset) / size) + for i = 1, size do + offset = + SampleData_deserialize( + tvb(0, offset + sample_data_size), + offset, + encoding, + subtree, + "[" .. tostring(i - 1) .. "]" + ) + end + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function Sample_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = SampleInfo_deserialize(tvb, offset, encoding, subtree, "info") + offset = SampleData_deserialize(tvb, offset, encoding, subtree, "data") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function SampleSeq_deserialize(tvb, offset, encoding, tree, label) + offset = align(offset, 4) + + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + if size == 0 then + subtree:append_text(" [empty]") + else + local sample_size = math.ceil((tvb:len() - offset) / size) + for i = 1, size do + offset = + Sample_deserialize( + tvb(0, offset + sample_size), + offset, + encoding, + subtree, + "[" .. tostring(i - 1) .. "]" + ) + end + end + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function SampleDelta_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = SampleInfoDelta_deserialize(tvb, offset, encoding, subtree, "info_delta") + offset = SampleData_deserialize(tvb, offset, encoding, subtree, "data") + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function PackedSamples_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + local subtree_begin = offset + + offset = SampleInfo_deserialize(tvb, offset, encoding, subtree, "info") + + offset = align(offset, 4) + + local t_sample_delta_seq = tree:add(tvb(offset), "sample_delta_seq") + local sample_delta_seq_begin = offset + + local size = tvb_uint(tvb(offset, 4), encoding) + offset = offset + 4 + if size == 0 then + t_sample_delta_seq:append_text(" [empty]") + else + local sample_delta_size = math.ceil((tvb:len() - offset) / size) + for i = 1, size do + offset = + SampleDelta_deserialize( + tvb(0, offset + sample_delta_size), + offset, + encoding, + t_sample_delta_seq, + "[" .. tostring(i - 1) .. "]" + ) + end + end + + t_sample_delta_seq:set_len(offset - sample_delta_seq_begin) + + subtree:set_len(offset - subtree_begin) + + return offset +end + +local function CREATE_CLIENT_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + return CLIENT_Representation_deserialize(tvb, offset, encoding, subtree, "client_representation") +end +dds_xrce_types["CREATE_CLIENT_Payload"] = CREATE_CLIENT_Payload_deserialize + +local function CREATE_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = ObjectVariant_deserialize(tvb, offset, encoding, subtree, "object_representation") + + return offset +end +dds_xrce_types["CREATE_Payload"] = CREATE_Payload_deserialize + +local function GET_INFO_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = InfoMask_deserialize(tvb, offset, encoding, subtree, "info_mask:") + + return offset +end +dds_xrce_types["GET_INFO_Payload"] = GET_INFO_Payload_deserialize + +local function DELETE_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + return BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) +end +dds_xrce_types["DELETE_Payload"] = DELETE_Payload_deserialize + +local function STATUS_AGENT_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + -- WARNING: The result member is not present in the official dds_xrce_types.idl. + offset = ResultStatus_deserialize(tvb, offset, encoding, subtree, "result") + offset = AGENT_Representation_deserialize(tvb, offset, encoding, subtree, "agent_info") + + return offset +end +dds_xrce_types["STATUS_AGENT_Payload"] = STATUS_AGENT_Payload_deserialize + +local function STATUS_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + return BaseObjectReply_deserialize(tvb, offset, encoding, subtree) +end +dds_xrce_types["STATUS_Payload"] = STATUS_Payload_deserialize + +local function INFO_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectReply_deserialize(tvb, offset, encoding, subtree) + offset = ObjectInfo_deserialize(tvb, offset, encoding, subtree, "object_info") + + return offset +end +dds_xrce_types["INFO_Payload"] = INFO_Payload_deserialize + +local function READ_DATA_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = ReadSpecification_deserialize(tvb, offset, encoding, subtree, "read_specification") + + return offset +end +dds_xrce_types["READ_DATA_Payload"] = READ_DATA_Payload_deserialize + +local function WRITE_DATA_Payload_Data_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = SampleData_deserialize(tvb, offset, encoding, subtree, "data") + + return offset +end +dds_xrce_types["WRITE_DATA_Payload_Data"] = WRITE_DATA_Payload_Data_deserialize + +local function WRITE_DATA_Payload_Sample_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = Sample_deserialize(tvb, offset, encoding, subtree, "sample") + + return offset +end +dds_xrce_types["WRITE_DATA_Payload_Sample"] = WRITE_DATA_Payload_Sample_deserialize + +local function WRITE_DATA_Payload_DataSeq_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = SampleDataSeq_deserialize(tvb, offset, encoding, subtree, "data_seq") + + return offset +end +dds_xrce_types["WRITE_DATA_Payload_DataSeq"] = WRITE_DATA_Payload_DataSeq + +local function WRITE_DATA_Payload_SampleSeq_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = SampleSeq_deserialize(tvb, offset, encoding, subtree, "sample_seq") + + return offset +end +dds_xrce_types["WRITE_DATA_Payload_SampleSeq"] = WRITE_DATA_Payload_SampleSeq_deserialize + +local function WRITE_DATA_Payload_PackedSamples_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = PackedSamples_deserialize(tvb, offset, encoding, subtree, "packed_samples") + + return offset +end +dds_xrce_types["WRITE_DATA_Payload_PackedSamples"] = WRITE_DATA_Payload_PackedSamples_deserialize + +local function DATA_Payload_Data_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = SampleData_deserialize(tvb, offset, encoding, subtree, "data") + + return offset +end +dds_xrce_types["DATA_Payload_Data"] = DATA_Payload_Data_deserialize + +local function DATA_Payload_Sample_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = Sample_deserialize(tvb, offset, encoding, subtree, "sample") + + return offset +end +dds_xrce_types["DATA_Payload_Sample"] = DATA_Payload_Sample_deserialize + +local function DATA_Payload_DataSeq_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = SampleDataSeq_deserialize(tvb, offset, encoding, subtree, "data_seq") + + return offset +end +dds_xrce_types["DATA_Payload_DataSeq"] = DATA_Payload_DataSeq_deserialize + +local function DATA_Payload_SampleSeq_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = SampleSeq_deserialize(tvb, offset, encoding, subtree, "sample_seq") + + return offset +end +dds_xrce_types["DATA_Payload_SampleSeq"] = DATA_Payload_SampleSeq_deserialize + +local function DATA_Payload_PackedSamples_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = BaseObjectRequest_deserialize(tvb, offset, encoding, subtree) + offset = PackedSamples_deserialize(tvb, offset, encoding, subtree, "packed_samples") + + return offset +end +dds_xrce_types["DATA_Payload_PackedSamples"] = DATA_Payload_PackedSamples_deserialize + +local function ACKNACK_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "first_unacked_seq_num:") + subtree:add(tvb(offset, 2), "nack_bitmap:", string.format("0x%04X", tvb_uint(tvb(offset, 2), encoding))) + offset = offset + 2 + subtree:add(tvb(offset, 1), "stream_id:", string.format("0x%02X", tvb(offset, 1):uint())) + offset = offset + 1 + + return offset +end +dds_xrce_types["ACKNACK_Payload"] = ACKNACK_Payload_deserialize + +local function HEARTBEAT_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset, 5), label) + + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "first_unacked_seq_nr:") + offset = unsigned_short_deserialize(tvb, offset, encoding, subtree, "last_unacked_seq_nr:") + subtree:add(tvb(offset, 1), "stream_id:", string.format("0x%02X", tvb(offset, 1):uint())) + offset = offset + 1 + + return offset +end +dds_xrce_types["HEARTBEAT_Payload"] = HEARTBEAT_Payload_deserialize + +local function TIMESTAMP_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + return Time_t_deserialize(tvb, offset, encoding, subtree, "transmit_timestamp:") +end +dds_xrce_types["TIMESTAMP_Payload"] = TIMESTAMP_Payload_deserialize + +local function TIMESTAMP_REPLY_Payload_deserialize(tvb, offset, encoding, tree, label) + local subtree = tree:add(tvb(offset), label) + + offset = Time_t_deserialize(tvb, offset, encoding, subtree, "transmit_timestamp:") + offset = Time_t_deserialize(tvb, offset, encoding, subtree, "receive_timestamp:") + offset = Time_t_deserialize(tvb, offset, encoding, subtree, "originate_timestamp:") + + return offset +end +dds_xrce_types["TIMESTAMP_REPLY_Payload"] = TIMESTAMP_REPLY_Payload_deserialize diff --git a/dissectors/difi-consortium/LICENSE b/dissectors/difi-consortium/LICENSE new file mode 100644 index 0000000..a99ab57 --- /dev/null +++ b/dissectors/difi-consortium/LICENSE @@ -0,0 +1,25 @@ +MIT License + +Copyright (c) 2022 jo-rivera + +===================== + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Submission to DIFI Consortium for use under the MIT license. \ No newline at end of file diff --git a/dissectors/difi-consortium/README.md b/dissectors/difi-consortium/README.md new file mode 100644 index 0000000..fdc8ab6 --- /dev/null +++ b/dissectors/difi-consortium/README.md @@ -0,0 +1,52 @@ +# DIFI — Digital IF Interoperability (version du consortium DIFI) + +Dissecteur Wireshark Lua des paquets **DIFI** (Digital Intermediate +Frequency Interoperability, transport de signaux FI numérisés au format +VITA 49.2), dans la version maintenue +par le **DIFI Consortium** pour son dépôt de certification. Protocole +`difi` détecté par heuristique UDP (OUI 0x7C386C ou 0x6A621E, type de +paquet 1, 4, 5 ou 6, taille cohérente) : en-tête commun (type, taille, +numéro de séquence, TSI / TSF, Stream ID, OUI, classe, horodatage), puis +paquets de données, de contexte (Standard Flow Signal / Sample Count : +bande passante, fréquences, niveaux, gains, fréquence d'échantillonnage, +format de données…), de version et de commande (Real Time / Sample +Count, champs CAM, identifiants, état de tampon). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/DIFI-Consortium/DIFI-Certification (fichier `wireshark-dissector/difi-dissector.lua`) | +| Commit importé | `6ee49d1e83c89bc4c35da7b3dd1e52c2a2d0063b` du 31/07/2026 (branche `main`, dernier commit ; dernière modification du script : `b1152d9` du 16/09/2025) | +| Licence amont | MIT (`wireshark-dissector/LICENSE` amont, « Copyright (c) 2022 jo-rivera … Submission to DIFI Consortium for use under the MIT license. », copié ici) ; le script n'a pas d'en-tête de licence ; le reste du dépôt amont n'a pas de licence déclarée | +| Natif Wireshark 4.6.4 | Partiel — `packet-vrt.c` (VITA 49, port UDP 4991) décode le format VITA 49 générique, pas les champs propres au profil DIFI | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `difi-dissector.lua` | Protocole `difi`, heuristique UDP | +| `LICENSE` | Licence MIT amont | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Non importés : les captures +`example_pcaps/` (hors du dossier sous licence MIT) et +`wireshark-dissector/tests/difi-gnuradio-example.pcapng` (8 Mo, au-delà +de la limite de 1 Mo). + +## Utilisation + +Copier `difi-dissector.lua` dans le dossier `plugins` de Wireshark, puis +filtrer avec `difi`. Si le dissecteur natif `vrt` prend le trafic (port +4991), le désactiver ou utiliser « Décoder comme… ». + +## Remarques + +- C'est une évolution du dissecteur de jo-rivera + (https://github.com/jo-rivera/difi-wireshark-dissector, issue #509), + avec heuristique UDP, paquets de commande et classes Sample Count. +- Les quelque 50 `ProtoField` et quatre constantes (`DATA_PKT`, + `CMD_PKT`…) sont des variables globales aux noms parfois génériques + (`data`, `year`, `day`, `revision`…) : risque de collision avec d'autres + scripts Lua. +- Non vérifié dans Wireshark ici. diff --git a/dissectors/difi-consortium/difi-dissector.lua b/dissectors/difi-consortium/difi-dissector.lua new file mode 100644 index 0000000..a620782 --- /dev/null +++ b/dissectors/difi-consortium/difi-dissector.lua @@ -0,0 +1,330 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/DIFI-Consortium/DIFI-Certification (wireshark-dissector/difi-dissector.lua), +-- commit 6ee49d1e83c89bc4c35da7b3dd1e52c2a2d0063b du 31/07/2026. +-- Licence amont : MIT (wireshark-dissector/LICENSE amont) — voir README.md. +-- Constants +CONTEXT_PKT = "Standard Flow Signal Context Packet" +VERSION_PKT = "Version Flow Signal Context Packet" +DATA_PKT = "Standard Flow Signal Data Packet" +CMD_PKT = "Command Packet" + +local tsi_codes = { + [0] = "Not Allowed", -- (Some ICDs call this Not Specified) + [1] = "UTC", + [2] = "GPS", + [3] = "POSIX" +} + +local tsf_codes = { + [0] = "Undefined", + [1] = "Sample Count Time", + [2] = "Real (pico secs) Time", + [3] = "Free-Running Count Time" +} + +-- Common Header fields +packet_type = ProtoField.uint8 ("difi.packet_type", "Packet Type", base.HEX, nil) +tsi = ProtoField.uint8 ("difi.tsi", "TSI", base.DEC, tsi_codes) +tsf = ProtoField.uint8 ("difi.tsf", "TSF", base.DEC, tsf_codes) +seq_num = ProtoField.uint8 ("difi.seq_num", "Seq Num", base.DEC) +packet_size = ProtoField.uint16("difi.packet_size", "Packet Size (32-bit words)", base.DEC) +stream_id = ProtoField.uint32("difi.stream_id", "Stream ID", base.DEC) +padding_bits = ProtoField.uint8 ("difi.padding_bits", "Padding Bits", base.DEC) +oui = ProtoField.uint24("difi.oui", "OUI/CID", base.HEX) +packet_class_code = ProtoField.uint16("difi.packet_class_code", "Packet Class Code", base.HEX) +information_class = ProtoField.uint16("difi.information_class", "Information Class Code", base.HEX) +int_timestamp = ProtoField.uint32("difi.integer_timestamp", "Integer-Seconds Timestamp", base.DEC) +frac_timestamp = ProtoField.uint64("difi.fractional_timestamp", "Fractional-Seconds Timestamp (ps)", base.DEC) + +-- Data Header fields +data = ProtoField.bytes ("difi.data", "Payload") +data_len = ProtoField.uint64("difi.data_len", "Length", base.DEC) + +-- Context Packet Header fields +ctxt_cif = ProtoField.uint32("difi.ctxt_cif", "Context Indicator Field", base.HEX) +ref_point = ProtoField.uint32("difi.ref_point", "Reference Point", base.HEX) +bandwidth = ProtoField.uint64("difi.bandwidth", "Bandwidth (Hz)", base.DEC) +if_ref_freq = ProtoField.uint64("difi.if_ref_freq", "IF Reference Frequency (Hz)", base.DEC) +rf_ref_freq = ProtoField.uint64("difi.rf_ref_freq", "RF Reference Frequency (Hz)", base.DEC) +if_offset = ProtoField.int64 ("difi.if_offset", "IF Band Offset (Hz)", base.DEC) +ref_level = ProtoField.float ("difi.ref_level", "Reference Level (dB)", base.DEC) +scaling_level = ProtoField.float ("difi.scaling_level", "Scaling Level (dB)", base.DEC) +stage1_gain = ProtoField.float ("difi.stage1_gain", "Stage 1 Attenuation/Gain (dB)", base.DEC) +stage2_gain = ProtoField.float ("difi.stage2_gain", "Stage 2 Attenuation/Gain (dB)", base.DEC) +sample_rate = ProtoField.uint64("difi.sample_rate", "Sample Rate (Hz)", base.DEC) +timestamp_adj = ProtoField.uint64("difi.time_adj", "Timestamp Adjustment (fs)", base.DEC) +time_cal = ProtoField.uint32("difi.time_cal", "Timestamp Calibration Time", base.DEC) +se_indicator = ProtoField.uint32("difi.se_indicator", "State and Event Indicators", base.HEX) +data_format = ProtoField.uint64("difi.data_format", "Data Packet Payload Format", base.HEX) + +-- Version Header fields +ctxt_cif0 = ProtoField.uint32("difi.ctxt_cif0", "Context Indicator Field (CIF) 0", base.HEX) +ctxt_cif1 = ProtoField.uint32("difi.ctxt_cif1", "Context Indicator Field (CIF) 1", base.HEX) +v49spec = ProtoField.uint32("difi.v49spec", "V49 Spec Version", base.HEX) +year = ProtoField.uint32("difi.year","Year (Starting from 2000)", base.DEC, nil, 0xfe000000) +day = ProtoField.uint32("difi.day","Day", base.DEC, nil, 0x01ff0000) +revision = ProtoField.uint32("difi.revision","Revision", base.DEC, nil, 0x0000fc00) +user_type = ProtoField.uint32("difi.user_type","Type (user-defined)", base.DEC, nil, 0x000003c0) +icd_version = ProtoField.uint32("difi.icd_version","ICD Version", base.DEC, nil, 0x0000003f) + +-- Command header fields +cam_field = ProtoField.uint32("difi.cam_field", "CAM field", base.HEX) +message_id = ProtoField.uint32("difi.message_id", "Message ID", base.HEX) +controllee_id = ProtoField.uint32("difi.controllee_id", "Controllee ID", base.DEC) +controller_id = ProtoField.uint32("difi.controller_id", "Controller ID", base.DEC) +ctrl_cif0 = ProtoField.uint32("difi.ctrl_cif0", "Control Indicator Field (CIF) 0", base.HEX) +ctrl_cif1 = ProtoField.uint32("difi.ctrl_cif1", "Control Indicator Field (CIF) 1", base.HEX) +buffer_size = ProtoField.uint64("difi.buffer_size", "Buffer Size", base.DEC) +buffer_reserved = ProtoField.uint16("difi.buffer_reserved","RESERVED", base.HEX) +buffer_level = ProtoField.uint16("difi.buffer_level","Buffer Level", base.DEC, nil, 0xfff0) +buffer_overflow = ProtoField.uint16("difi.buffer_overflow","Buffer Overflow", base.DEC, nil, 0x0008) +near_full = ProtoField.uint16("difi.near_full","near_full", base.DEC, nil, 0x0004) +near_empty = ProtoField.uint16("difi.near_empty","near_empty", base.DEC, nil, 0x0002) +buffer_underflow = ProtoField.uint16("difi.buffer_underflow","Buffer Underflow", base.DEC, nil, 0x0001) + +difi_protocol = Proto("DIFI", "DIFI Protocol") + +-- Register all fields +difi_protocol.fields = { + -- common + packet_type, packet_size, seq_num, tsi, tsf, stream_id, padding_bits, oui, + packet_class_code, information_class, int_timestamp, frac_timestamp, + -- data + data, data_len, + -- context + ctxt_cif, ref_point, bandwidth, if_ref_freq, rf_ref_freq, if_offset, ref_level, scaling_level, + stage1_gain, stage2_gain, sample_rate, timestamp_adj, time_cal, se_indicator, data_format, + -- version + ctxt_cif0, ctxt_cif1, v49spec, year, day, revision, user_type, icd_version, + -- command + cam_field, message_id, controllee_id, controller_id, ctrl_cif0, ctrl_cif1, + buffer_size, buffer_reserved, buffer_level, buffer_overflow, near_full, near_empty, buffer_underflow +} + +-- Helpers ---------------------------------------------------- + +-- All frequency and sample rate fields are 64-bit 2's complement with radix point right of bit 20. +local function get_int_freq(word64) + return word64:rshift(20) +end + +-- Convert 16-bit signed fixed-point with radix at bit 7 into dB float. +local function get_dB(word16) + local db_val = 0.0 + if (bit.band(word16,0x8000) == 0x8000) then + local temp = (bit.bxor(word16, 0xffff)) + 1 + db_val = -temp/0x80 + else + db_val = word16/0x80 + end + return db_val +end + +-- Common header +local function difi_common_dissector(buffer, tree) + local word0 = buffer(0, 4):uint() + local word3 = buffer(12, 4):uint() + + tree:add(packet_type, bit.rshift(bit.band(word0, 0xF0000000), 28)) + tree:add(packet_size, bit.band(word0, 0xffff)) + tree:add(seq_num, bit.rshift(bit.band(word0, 0x000F0000), 16)) + tree:add(tsi, bit.rshift(bit.band(word0, 0x00C00000), 22)) + tree:add(tsf, bit.rshift(bit.band(word0, 0x00300000), 20)) + tree:add(stream_id, buffer(4, 4):uint()) + + -- padding bits (byte 8) + OUI/CID (bytes 9..11) + tree:add(padding_bits, buffer(8,1):uint()) + tree:add(oui, buffer(9,3):uint()) + + tree:add(packet_class_code, bit.band(word3, 0xffff)) + tree:add(information_class, bit.rshift(word3, 16)) + tree:add(int_timestamp, buffer(16, 4):uint()) + tree:add(frac_timestamp, buffer(20, 8):uint64()) +end + +-- Packet dissectors ------------------------------------------ + +local function context_pkt_dissector(buffer, tree, name) + if buffer:len() < 108 then return end + + local subtree = tree:add(difi_protocol, buffer(0, 108), "DIFI Protocol, " .. name) + + -- Header + difi_common_dissector(buffer, subtree) + + -- Additional header fields + subtree:add(ctxt_cif, buffer(28, 4):uint()) + subtree:add(ref_point, buffer(32, 4):uint()) + + -- 64-bit fixed-point -> integer Hz via shift + local bw_int = get_int_freq(buffer(36, 8):uint64()) + local if_ref_int = get_int_freq(buffer(44, 8):uint64()) + local rf_ref_int = get_int_freq(buffer(52, 8):uint64()) + local if_offset_i = get_int_freq(buffer(60, 8):int64()) + subtree:add(bandwidth, bw_int) + subtree:add(if_ref_freq, if_ref_int) + subtree:add(rf_ref_freq, rf_ref_int) + subtree:add(if_offset, if_offset_i) + + -- Levels/Gains (two 16-bit fixed-point values in each 32-bit word) + local level_word = buffer(68,4):int() + local ref_level_word16 = bit.band(level_word, 0xFFFF) + local scaling_level_word16 = bit.rshift(bit.band(level_word, 0xFFFF0000), 16) + subtree:add(ref_level, get_dB(ref_level_word16)) + subtree:add(scaling_level, get_dB(scaling_level_word16)) + + local gain_word = buffer(72,4):int() + local stage1_gain_word16 = bit.band(gain_word, 0xFFFF) + local stage2_gain_word16 = bit.rshift(bit.band(gain_word, 0xFFFF0000), 16) + subtree:add(stage1_gain, get_dB(stage1_gain_word16)) + subtree:add(stage2_gain, get_dB(stage2_gain_word16)) + + local sample_rate_int = get_int_freq(buffer(76,8):uint64()) + subtree:add(sample_rate, sample_rate_int) + + subtree:add(timestamp_adj, buffer(84, 8):uint64()) + subtree:add(time_cal, buffer(92, 4):uint()) + subtree:add(se_indicator, buffer(96, 4):uint()) + subtree:add(data_format, buffer(100, 8):uint64()) +end + +local function data_pkt_dissector(buffer, tree, name) + if buffer:len() < 28 then return end + + local length = buffer:len() + local subtree = tree:add(difi_protocol, buffer(0, 28), "DIFI Protocol, " .. name) + + -- Header + difi_common_dissector(buffer, subtree) + + -- Payload + local payload_len = length - 28 + if payload_len > 0 then + local data_subtree = subtree:add(difi_protocol, buffer(28, payload_len), "Data") + data_subtree:add(data, buffer(28, payload_len)) + end +end + +local function version_pkt_dissector(buffer, tree, name) + if buffer:len() < 44 then return end + + local subtree = tree:add(difi_protocol, buffer(0, 44), "DIFI Protocol, " .. name) + + -- Header + difi_common_dissector(buffer, subtree) + + -- Version fields + subtree:add(ctxt_cif0, buffer(28, 4):uint()) + subtree:add(ctxt_cif1, buffer(32, 4):uint()) + subtree:add(v49spec, buffer(36, 4):uint()) + + -- Packed bitfields in the last 32-bit word + subtree:add_packet_field(year, buffer(40,4), ENC_BIG_ENDIAN) + subtree:add_packet_field(day, buffer(40,4), ENC_BIG_ENDIAN) + subtree:add_packet_field(revision, buffer(40,4), ENC_BIG_ENDIAN) + subtree:add_packet_field(user_type, buffer(40,4), ENC_BIG_ENDIAN) + subtree:add_packet_field(icd_version, buffer(40,4), ENC_BIG_ENDIAN) +end + +local function control_pkt_dissector(buffer, tree, name) + if buffer:len() < 84 then return end + + local subtree = tree:add(difi_protocol, buffer(0, 84), "DIFI Protocol, " .. name) + + -- Header + difi_common_dissector(buffer, subtree) + + subtree:add_packet_field(cam_field, buffer(28, 4), ENC_BIG_ENDIAN) + subtree:add_packet_field(message_id, buffer(32, 4), ENC_BIG_ENDIAN) + subtree:add_packet_field(controllee_id, buffer(36, 4), ENC_BIG_ENDIAN) + subtree:add_packet_field(controller_id, buffer(40, 4), ENC_BIG_ENDIAN) + subtree:add_packet_field(ctrl_cif0, buffer(44, 4), ENC_BIG_ENDIAN) + subtree:add_packet_field(ctrl_cif1, buffer(48, 4), ENC_BIG_ENDIAN) + subtree:add_packet_field(ref_point, buffer(52, 4), ENC_BIG_ENDIAN) + + local sample_rate_int = get_int_freq(buffer(56,8):uint64()) + subtree:add(sample_rate, sample_rate_int) + + subtree:add_packet_field(timestamp_adj, buffer(64, 8), ENC_BIG_ENDIAN) + subtree:add_packet_field(buffer_size, buffer(72, 8), ENC_BIG_ENDIAN) + subtree:add_packet_field(buffer_reserved, buffer(80, 2), ENC_BIG_ENDIAN) + subtree:add_packet_field(buffer_level, buffer(82, 2), ENC_BIG_ENDIAN) + subtree:add_packet_field(buffer_overflow, buffer(82, 2), ENC_BIG_ENDIAN) + subtree:add_packet_field(near_full, buffer(82, 2), ENC_BIG_ENDIAN) + subtree:add_packet_field(near_empty, buffer(82, 2), ENC_BIG_ENDIAN) + subtree:add_packet_field(buffer_underflow,buffer(82, 2), ENC_BIG_ENDIAN) +end + +-- Heuristic -------------------------------------------------- + +local function heuristic_checker(buffer, pinfo, tree) + -- guard for minimal header: 7 * 32-bit words = 28 bytes + if buffer:len() < 28 then return false end + + -- OUI/CID is 24 bits at bytes 9..11 (pad at byte 8) + local potential_oui = buffer(9, 3):uint() + if (potential_oui ~= 0x7C386C and potential_oui ~= 0x6A621E) then + return false + end + + local word0 = buffer(0,4):uint() + local packet_type_int = bit.rshift(bit.band(word0,0xf0000000), 28) + local valid_ptype = (packet_type_int == 4 or packet_type_int == 5 or packet_type_int == 1 or packet_type_int == 6) + if not valid_ptype then return false end + + -- Optional: basic size sanity check (packet_size is in 32-bit words) + local size_words = bit.band(word0, 0xffff) + local size_bytes = size_words * 4 + if size_words > 0 and buffer:len() < size_bytes then + return false + end + + -- Looks like DIFI—hand over to the dissector + difi_protocol.dissector(buffer, pinfo, tree) + return true +end + +-- Main dissector -------------------------------------------- + +function difi_protocol.dissector(buffer, pinfo, tree) + if buffer:len() < 28 then return end + + local word0 = buffer(0,4):uint() + local word3 = buffer(12,4):uint() + local packet_type_int = bit.rshift(bit.band(word0,0xf0000000), 28) + local packet_class_int = bit.band(word3, 0x0000ffff) + + -- Optional: enforce size sanity here as well + local size_words = bit.band(word0, 0xffff) + local size_bytes = size_words * 4 + if size_words > 0 and buffer:len() < size_bytes then + return + end + + local name = "unknown type=" .. packet_type_int .. " , class=" .. packet_class_int + + if packet_type_int == 0x4 then + if packet_class_int == 1 then name = "Standard Flow Signal Context Packet" end + if packet_class_int == 3 then name = "Sample Count Context Packet" end + context_pkt_dissector(buffer, tree, name) + + elseif packet_type_int == 0x5 then + name = "Version Flow Signal Context Packet" + version_pkt_dissector(buffer, tree, name) + + elseif packet_type_int == 0x1 then + if packet_class_int == 0 then name = "Standard Flow Signal Data Packet" end + if packet_class_int == 2 then name = "Sample Count Data Packet" end + data_pkt_dissector(buffer, tree, name) + + elseif packet_type_int == 0x6 then + if packet_class_int == 6 then name = "Real Time Command Packet" end + if packet_class_int == 5 then name = "Sample Count Command Packet" end + control_pkt_dissector(buffer, tree, name) + end + + pinfo.cols.protocol = difi_protocol.name +end + +-- Register heuristic on UDP +difi_protocol:register_heuristic("udp", heuristic_checker) diff --git a/dissectors/difi-jo-rivera/LICENSE b/dissectors/difi-jo-rivera/LICENSE new file mode 100644 index 0000000..22490ac --- /dev/null +++ b/dissectors/difi-jo-rivera/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 jo-rivera + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/difi-jo-rivera/README.md b/dissectors/difi-jo-rivera/README.md new file mode 100644 index 0000000..9e85b9f --- /dev/null +++ b/dissectors/difi-jo-rivera/README.md @@ -0,0 +1,85 @@ +# DIFI — version d'origine de jo-rivera + +Dissecteur Wireshark Lua des paquets **DIFI** (Digital IF +Interoperability, profil de VITA 49.2) selon la spécification DIFI 1.0.0 : +paquets de contexte (Standard Flow Signal Context), de données (Standard +Flow Signal Data) et de version, reconnus en UDP par une heuristique sur +l'OUI DIFI `0x7C386C` (issue #509). + +C'est la **première version** du dissecteur que l'auteur a ensuite versée +au DIFI Consortium. La version suivie, plus complète, est déjà importée +dans `dissectors/difi-consortium/` (#502). Ce dossier conserve la version +d'origine archivée pour référence et comparaison. Les deux scripts **ne +peuvent pas être chargés ensemble** (voir Limites). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/jo-rivera/difi-wireshark-dissector (`difi-dissector.lua`), **dépôt archivé** (« This plugin has moved to the DIFI Certification project ») | +| Commit importé | `bfbbf268c0d6efbc130b259013f5f64db63a90e6` du 28/10/2022 (dernier commit de la branche par défaut `main`) ; dernière modification de `difi-dissector.lua` : commit `70a0c9cc12dfdf2d6e0cd13963cd998d2df6ab88` du 29/07/2022 | +| Licence amont | MIT, « Copyright (c) 2022 jo-rivera » (`LICENSE` du dépôt), compatible avec la licence de ce dépôt (GPL-3.0-or-later) | +| Natif Wireshark 4.6.4 | Partiel : `packet-vrt.c` (VITA 49, port UDP 4991) décode le VITA 49 générique, pas les champs DIFI ; rien n'est décodé sur les ports de la capture amont | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code, fins de ligne CRLF conservées) ; seule l'en-tête de +provenance de cinq lignes est ajoutée en tête (convention du dépôt, +issue #563). La capture d'exemple amont +(`tests/difi-gnuradio-example.pcapng`, 8,1 Mo) n'est pas copiée, car elle +est trop volumineuse. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/difi-dissector.lua` | Protocole `difi` (« DIFI Protocol »), dissecteur heuristique UDP (ligne 194) ; aucun port fixe | + +## Utilisation + +Copier `src/difi-dissector.lua` dans le dossier des plugins Lua personnels +de Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis +Ctrl+Maj+L. Ne pas installer en même temps +`dissectors/difi-consortium/difi-dissector.lua`. Filtres : `difi`, +`difi.stream_id`, `difi.seq_num`, `difi.tsi`, `difi.sample_rate`… + +## Vérification à l'import + +tshark 4.6.4 : le fichier se charge sans erreur (`luac5.4 -p` : OK). + +| Essai | Résultat | +|---|---| +| Capture amont `difi-gnuradio-example.pcapng` (22 624 trames, GNU Radio, UDP 50003) | 22 624 trames `DIFI` : 23 paquets de contexte (150 octets) et 22 601 paquets de données (326 octets) ; aucune erreur ni « Malformed » | +| Synthétique : paquet de version (44 octets) | `Version Flow Signal Context Packet`, CIF0 `0x80000002`, CIF1 `0x0000000c`, version V49 et ICD | +| Synthétique : paquet de contexte tronqué (40 octets) | colonne Protocole `DIFI`, mais aucun arbre ni erreur visible | +| Synthétique : OUI différent | laissé à UDP | +| Chargé avec `difi-consortium` | erreur au chargement : `Proto_new: there cannot be two protocols with the same description` | + +Comparaison sur la première trame de contexte de la capture amont : + +| Champ | Ce script | `difi-consortium` | +|---|---|---| +| Bandwidth | `83886080000` (valeur brute) | `Bandwidth (Hz): 80000` | +| Sample Rate | `100000` (octets 76 à 83) | `Sample Rate (Hz): 0` | +| State and Event Indicators | `2685009920` (décimal) | `0xa00a0000` | + +## Limites constatées + +- Valeurs à virgule fixe affichées brutes : fréquences, largeur de bande + et décalages (radix 20, soit des Hz × 2²⁰), niveau de référence et gain + (radix 7). `83886080000` correspond à 80 000 Hz. +- Disposition fixe du paquet de contexte (108 octets), sans lecture du + champ CIF0. Les deux scripts ne lisent pas la fréquence d'échantillonnage + au même endroit (voir le tableau) ; la capture ne permet pas de dire + lequel a raison. +- Paquet de contexte de moins de 108 octets : arbre vide, sans erreur + affichée (`buffer(0, 108)`, ligne 103). +- Colonne Info non renseignée ; pas de paquets de commande (gérés par la + version `difi-consortium`). +- Même nom de protocole (`DIFI`) et même description que `difi-consortium`, + d'où le conflit au chargement. +- Une trentaine de variables globales aux noms génériques (`data`, `info`, + `gain`, `oui`, `tsi`, `cif`, `difi_protocol`, `CONTEXT_PKT`…) : risque de + collision avec d'autres scripts. +- Le nom d'un paquet de version est affiché « Version Flow Signal Context + Packet », comme dans le script. diff --git a/dissectors/difi-jo-rivera/src/difi-dissector.lua b/dissectors/difi-jo-rivera/src/difi-dissector.lua new file mode 100644 index 0000000..5c3f773 --- /dev/null +++ b/dissectors/difi-jo-rivera/src/difi-dissector.lua @@ -0,0 +1,194 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/jo-rivera/difi-wireshark-dissector (difi-dissector.lua), +-- commit bfbbf268c0d6efbc130b259013f5f64db63a90e6 du 28/10/2022 (dernière modification du fichier : +-- commit 70a0c9cc12dfdf2d6e0cd13963cd998d2df6ab88 du 29/07/2022). +-- Licence amont : MIT, « Copyright (c) 2022 jo-rivera » (LICENSE du dépôt) — voir README.md et LICENSE. +-- Constants + +CONTEXT_PKT = "Standard Flow Signal Context Packet" +VERSION_PKT = "Version Flow Signal Context Packet" +DATA_PKT = "Standard Flow Signal Data Packet" + +local tsi_codes = { + [0] = "Not Allowed", + [1] = "UTC", + [2] = "GPS", + [3] = "POSIX" +} + +-- Common Header fields +packet_size = ProtoField.uint16("difi.packet_size", "Packet Size", base.DEC) +seq_num = ProtoField.uint8("difi.seq_num", "Seq Num", base.DEC) +tsi = ProtoField.uint8("difi.tsi", "TSI", base.DEC, tsi_codes) +stream_id = ProtoField.uint32("difi.stream_id", "Stream ID", base.DEC) +oui = ProtoField.uint32("difi.oui", "OUI", base.HEX) +class_code = ProtoField.uint16("difi.class_code", "Packet Class Code", base.HEX) +info_code = ProtoField.uint16("difi.info_code", "Information Class Code", base.HEX) +int_timestamp = ProtoField.uint32("difi.integer_timestamp", "Integer-Seconds Timestamp", base.DEC) +frac_timestamp = ProtoField.uint64("difi.fractional_timestamp", "Fractional-Seconds Timestamp", base.DEC) + +-- Data Header fields +data = ProtoField.bytes("difi.data", "Payload") +data_len = ProtoField.uint64("difi.data_len", "Length", base.DEC) + +-- Context Packet Header fields +cif = ProtoField.uint32("difi.cif", "Context Indicator Field", base.HEX) +ref_point = ProtoField.uint32("difi.ref_point", "Reference Point", base.HEX) +bandwidth = ProtoField.uint64("difi.bandwidth", "Bandwidth", base.DEC) +if_ref_freq = ProtoField.uint64("difi.if_ref_freq", "IF Reference Frequency", base.DEC) +rf_ref_freq = ProtoField.uint64("difi.rf_ref_freq", "RF Reference Frequency", base.DEC) +if_offset = ProtoField.int64("difi.if_offset", "IF Band Offset", base.DEC) +ref_level = ProtoField.uint32("difi.ref_level", "Reference Level", base.DEC) +gain = ProtoField.int32("difi.gain", "Attenuation/Gain", base.DEC) +sample_rate = ProtoField.uint64("difi.sample_rate", "Sample Rate", base.DEC) +timestamp_adj = ProtoField.uint64("difi.time_adj", "Timestamp Adjustment", base.DEC) +time_cal = ProtoField.uint32("difi.time_cal", "Timestamp Calibration Time", base.DEC) +se_indicator = ProtoField.uint32("difi.se_indicator", "State and Event Indicators", base.DEC) +data_format = ProtoField.uint64("difi.data_format", "Data Packet Payload Format", base.DEC) + +-- Version Header fields +cif0 = ProtoField.uint32("difi.cif0", "Context Indicator Field 0", base.HEX) +cif1 = ProtoField.uint32("difi.cif1", "Context Indicator Field 1", base.HEX) +v49spec = ProtoField.uint32("difi.v49spec", "V49 Spec Version", base.HEX) +info = ProtoField.uint32("difi.info", "Year, Day, Revision, Type, ICD Version", base.HEX) + + +difi_protocol = Proto("DIFI", "DIFI Protocol") + +-- Register all potential fields in the tree +difi_protocol.fields = { + -- common + packet_size, seq_num, tsi, stream_id, oui, class_code, info_code, int_timestamp, frac_timestamp, + -- data + data, data_len, + -- context + cif, ref_point, bandwidth, if_ref_freq, rf_ref_freq, if_offset, ref_level, gain, sample_rate, + timestamp_adj, time_cal, se_indicator, data_format, + -- version + cif0, cif1, v49spec, info +} + +-- Local functions + +local function get_packet_type(ptype) + local packet_type = "Unknown" + + if ptype == 0x4 then packet_type = CONTEXT_PKT + elseif ptype == 0x5 then packet_type = VERSION_PKT + elseif ptype == 0x1 then packet_type = DATA_PKT end + + return packet_type +end + +local function difi_common_dissector(buffer, tree) + + -- common header fields + local word0 = buffer(0, 4):uint() + local word3 = buffer(12, 4):uint() + tree:add(packet_size, bit.band(word0, 0xffff)) + tree:add(seq_num, bit.rshift(bit.band(word0, 0xf0000), 16)) + tree:add(tsi, bit.rshift(bit.band(word0, 0xC00000), 22)) + tree:add(stream_id, buffer(4, 4):uint()) + tree:add(oui, buffer(8, 4):uint()) + tree:add(class_code, bit.band(word3, 0xffff)) + tree:add(info_code, bit.rshift(word3, 16)) + tree:add(int_timestamp, buffer(16, 4):uint()) + tree:add(frac_timestamp, buffer(20, 8):uint64()) +end + +local function context_pkt_dissector(buffer, tree) + + if buffer:len() < 108 then return end + + local subtree = tree:add(difi_protocol, buffer(0, 108), "DIFI Protocol, " .. CONTEXT_PKT) + + -- Header + difi_common_dissector(buffer, subtree) + + -- Additional header fiels + subtree:add(cif, buffer(28, 4):uint()) + subtree:add(ref_point, buffer(32, 4):uint()) + subtree:add(bandwidth, buffer(36, 8):uint64()) + subtree:add(if_ref_freq, buffer(44, 8):uint64()) + subtree:add(rf_ref_freq, buffer(52, 8):uint64()) + subtree:add(if_offset, buffer(60, 8):int64()) + subtree:add(ref_level, buffer(68, 4):uint()) + subtree:add(gain, buffer(72, 4):int()) + subtree:add(sample_rate, buffer(76, 8):uint64()) + subtree:add(timestamp_adj, buffer(84, 8):uint64()) + subtree:add(time_cal, buffer(92, 4):uint()) + subtree:add(se_indicator, buffer(96, 4):uint()) + subtree:add(data_format, buffer(100, 8):uint64()) +end + +local function data_pkt_dissector(buffer, tree) + + if buffer:len() < 28 then return end + + local length = buffer:len() + local subtree = tree:add(difi_protocol, buffer(0, 27), "DIFI Protocol, " .. DATA_PKT) + + -- Header + difi_common_dissector(buffer, subtree) + + -- Add the rest of the data fields + local payload_len = length - 28 + local data_subtree = tree:add(difi_protocol, buffer(28, payload_len), "Data") + data_subtree:add(data, buffer(28, payload_len)) + +end + +local function version_pkt_dissector(buffer, tree) + + if buffer:len() < 44 then return end + + local subtree = tree:add(difi_protocol, buffer(0, 44), "DIFI Protocol, " .. VERSION_PKT) + + -- Header + difi_common_dissector(buffer, subtree) + + -- rest of the version header fields + subtree:add(cif0, buffer(28, 4):uint()) + subtree:add(cif1, buffer(32, 4):uint()) + subtree:add(v49spec, buffer(36, 4):uint()) + subtree:add(info, buffer(40, 4):uint()) + +end + +local function heuristic_checker(buffer, pinfo, tree) + -- guard for length, header for data packet is at least 7 32-bit words + if buffer:len() < 28 then return false end + + local potential_oui = buffer(8, 4):uint() + if potential_oui ~= 0x7C386C then return false end + + local word0 = buffer(0,4):uint() + local potential_packet_type = bit.rshift(bit.band(word0,0xf0000000), 28) + local packet_type = get_packet_type(potential_packet_type) + + if packet_type ~= "Unknown" + then + difi_protocol.dissector(buffer, pinfo, tree) + return true + else return false end +end + +function difi_protocol.dissector(buffer, pinfo, tree) + + local word0 = buffer(0,4):uint() + local potential_packet_type = bit.rshift(bit.band(word0,0xf0000000), 28) + local packet_type = get_packet_type(potential_packet_type) + + if packet_type == CONTEXT_PKT then + context_pkt_dissector(buffer, tree) + elseif packet_type == VERSION_PKT then + version_pkt_dissector(buffer, tree) + elseif packet_type == DATA_PKT then + + data_pkt_dissector(buffer, tree) + end + + pinfo.cols.protocol = difi_protocol.name +end + +difi_protocol:register_heuristic("udp", heuristic_checker) diff --git a/dissectors/dji-dumlv1/LICENSE b/dissectors/dji-dumlv1/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/dji-dumlv1/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/dji-dumlv1/README.md b/dissectors/dji-dumlv1/README.md new file mode 100644 index 0000000..c0f81fe --- /dev/null +++ b/dissectors/dji-dumlv1/README.md @@ -0,0 +1,96 @@ +# DJI DUML v1 — communications internes des drones DJI + +Dissecteurs Wireshark Lua du protocole DUML v1 (« DJI Universal Markup +Language ») utilisé entre les modules des drones DJI (contrôleur de vol, +caméra, nacelle, batterie, radiocommande, application). Ils décodent +l'en-tête (longueur, version, émetteur et destinataire, numéro de +séquence, type de paquet, jeu de commandes et commande). Plusieurs +centaines de commandes sont décodées : jeux général, caméra, contrôle de +vol, nacelle. S'y ajoutent les formats d'enregistrement de vol (DAT) des +Phantom 3, Mavic Pro et Spark, la batterie du Phantom 3 et un export KML +du vol (issue #524). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/o-gs/dji-firmware-tools (`comm_dissector/wireshark/`, les 14 scripts Lua) | +| Commit importé | `1db36ddf45d8018ea849f0c03c5e45d2f3068844` du 25/10/2026 (dernier commit de `master`) ; dernière modification du dossier : commit `886155087c08b571b79e57b9f6b096f4e72ac886` du 26/04/2025 (`init.lua`, « README for Wireshark 4.4, absolute paths in init.lua ») ; date propre à chaque fichier dans son en-tête | +| Licence amont | GPL-3.0 : `LICENSE` du dépôt (texte GNU GPL v3 ; aucune mention « ou ultérieure » ni en-tête de licence dans les scripts, d'où `GPL-3.0-only`). Compatible avec ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur DJI dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Les scripts sont repris tels quels (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête de chacun (convention du dépôt, issue #563). Les outils +Python amont (`comm_serial2pcap.py`, `comm_dat2pcap.py`, `comm_mkdupc.py`) +ne sont pas importés. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/init.lua` | Point d'entrée : charge les autres scripts par `dofile` depuis `dji_script_path` (ligne 18) | +| `src/dji-dumlv1-proto.lua` | Protocole `dji_dumlv1` (ligne 7) : en-tête DUML v1 et table des commandes ; heuristique sur `usb.bulk` et `tcp` (lignes 3322 et 3323), poignées Bluetooth ATT `0x0018`, `0x0010`, `0x0013` (lignes 3317 à 3319) | +| `src/dji-dumlv1-general.lua`, `-camera.lua`, `-flyc.lua`, `-gimbal.lua` | Charges utiles des jeux de commandes général, caméra, contrôle de vol et nacelle (chargés par `dji-dumlv1-proto.lua`, lignes 525 à 528) | +| `src/dji-p3.lua`, `dji-mavic.lua`, `dji-spark.lua` | Protocoles agrégés `dji_p3`, `dji_mavic`, `dji_spark` : choisissent DUML, enregistrement de vol ou batterie selon le premier octet | +| `src/dji-p3-flyrec-proto.lua`, `dji-mavic-flyrec-proto.lua`, `dji-spark-flyrec-proto.lua` | Enregistrements de vol DAT (`dji_p3_flyrec`, `dji_mavic_flyrec`, `dji_spark_flyrec`) | +| `src/dji-p3-batt-proto.lua` | Batterie du Phantom 3 (`dji_p3_batt`, paquets `0xAB`) | +| `src/dji-write-kml.lua` | Menu « Tools › Export KML from DJI drone flight » (ligne 1749) | + +## Utilisation + +Comme l'indique le README amont : copier tout `src/` **hors** du dossier +des plugins de Wireshark. Copier ensuite `init.lua` seul dans le dossier +des plugins Lua personnels (« Aide › À propos de Wireshark › Dossiers »). +Y remplacer `dji_script_path = ""` (ligne 18 du fichier importé) par le +chemin **absolu** du dossier, terminé par `/`. Puis redémarrer Wireshark. + +Les captures UART produites par `comm_serial2pcap.py` ou `comm_dat2pcap.py` +utilisent un type de lien `DLT_USER` : l'associer au protocole voulu +(« Préférences › Protocols › DLT_USER », par exemple `dji_p3`). En +ligne de commande : +`-o 'uat:user_dlts:"User 0 (DLT=147)","dji_p3","0","","0",""'`. Sur USB +ou TCP, l'heuristique `dji_dumlv1` s'applique seule. Filtres : +`dji_dumlv1`, `dji_p3`… + +## Vérification à l'import + +- `luac5.4 -p` : OK pour les 14 scripts. +- tshark 4.6.4 avec `init.lua` **tel quel** : échec au chargement + (`dji-dumlv1-proto.lua:525: attempt to concatenate a nil value (local + 'script_path')`). `script_path` est déduit du chemin du script et vaut + `nil` sans répertoire. Avec une copie hors dépôt de `init.lua` + pointant vers `src/` en chemin absolu, tout se charge sans erreur. Le + repli `bit32` de la ligne 11 de `dji-dumlv1-proto.lua` fonctionne sous + Lua 5.4. +- Paquets construits avec l'outil amont `comm_mkdupc.py` (CRC exacts) : + +| Essai | Résultat | +|---|---| +| TCP, `Version Inquiry` requête (PC → caméra) | heuristique `dji_dumlv1` : longueur, version 1, émetteur `PC (10)` index 1, destinataire `Camera (Ambarella)`, séquence 1234, `Request`, `General`, `Version Inquiry (0x01)`, CRC | +| TCP, réponse `Version Inquiry` de 31 octets | `Hardware Version: P3X_DM368_HW`, `Firmware Loader Version: 01.00.01.11`, `Firmware App Version: 01.04.05.08` | +| TCP, réponse `Version Inquiry` de 28 octets | **erreur Lua** `dji-dumlv1-general.lua:154` (`Range is out of bounds`) | +| TCP, deux paquets dans un segment (`OSD General Data Get` 60 octets, `Gimbal Params Get` 8 octets) | les deux reconnus (Info : « OSD General Data Get, Gimbal Params Get ») ; OSD détaillé (position, vitesses, attitude, états) ; nacelle : **erreur Lua** `dji-dumlv1-gimbal.lua:211` (charge plus courte qu'attendu) | +| TCP, CRC final mis à zéro | décodé sans avertissement (`CRC: 0x0000`) | +| `DLT_USER` 0 associé à `dji_p3`, mêmes paquets | décodés ; paquet tronqué à 6 octets : **erreur Lua** `dji-dumlv1-proto.lua:3211` | + +## Limites constatées + +- `init.lua` doit être édité (chemin absolu) : sans cela, rien ne se + charge. +- Ni le CRC d'en-tête ni le CRC final ne sont vérifiés, y compris par + l'heuristique TCP et USB : tout segment TCP commençant par `0x55` avec + une longueur plausible est revendiqué (faux positifs possibles). +- Charges utiles plus courtes que le format attendu ou paquets tronqués : + erreurs Lua au lieu d'avertissements. +- `dji-write-kml.lua` écrit `debug: Tools Menu Handler registered` sur la + sortie standard à chaque lancement (ligne 1751), ce qui pollue la + sortie de tshark. +- Variables globales nombreuses (tables de commandes, fonctions + `dji_*_main_dissector`) ; formats d'enregistrement de vol, batterie et + export KML non essayés ; pas de capture réelle disponible. +- L'issue #528 (honglan3/dji-sdk-dji-firmware-tools) vise une copie du + même dépôt datée d'avril 2019, non déclarée comme fork : 7 des 14 + scripts y sont identiques, les 7 autres sont des versions plus + anciennes. diff --git a/dissectors/dji-dumlv1/src/dji-dumlv1-camera.lua b/dissectors/dji-dumlv1/src/dji-dumlv1-camera.lua new file mode 100644 index 0000000..22fffd9 --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-dumlv1-camera.lua @@ -0,0 +1,1764 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-dumlv1-camera.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit ef11dab51f73653681a1f97d068beba002f5adfc du 14/08/2019). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- The definitions in this file are part of DJI DUMLv1 protocol dissector +-- Dissectors for command set 0x01 - Camera + +local f = DJI_DUMLv1_PROTO.fields +local enums = {} + +-- CMD name decode table + +CAMERA_UART_CMD_TEXT = { + [0x01] = 'Do Capture Photo', + [0x02] = 'Do Record', + [0x03] = 'HeartBeat', + [0x04] = 'Set Usb Switch', -- Usb Connect + [0x05] = 'Virtual Key Send', + [0x06] = 'Get Usb Switch', + [0x10] = 'Camera Work Mode Set', + [0x11] = 'Camera Work Mode Get', + [0x12] = 'Photo Format Set', + [0x13] = 'Photo Format Get', + [0x14] = 'Photo Quality Set', + [0x15] = 'Photo Quality Get', + [0x16] = 'Photo Storage Fmt Set', + [0x17] = 'Photo Storage Fmt Get', + [0x18] = 'Video Format Set', + [0x19] = 'Video Format Get', + [0x1A] = 'Video Quality Set', + [0x1B] = 'Video Quality Get', + [0x1C] = 'Video Storage Fmt Set', + [0x1D] = 'Video Storage Fmt Get', + [0x1E] = 'Exposure Mode Set', + [0x1F] = 'Exposure Mode Get', + [0x20] = 'Scene Mode Set', + [0x21] = 'Scene Mode Get', + [0x22] = 'AE Meter Set', + [0x23] = 'AE Meter Get', + [0x24] = 'Focus Mode Set', + [0x25] = 'Focus Mode Get', + [0x26] = 'Aperture Size Set', + [0x27] = 'Aperture Size Get', + [0x28] = 'Shutter Speed Set', + [0x29] = 'Shutter Speed Get', + [0x2A] = 'ISO Set', + [0x2B] = 'ISO Get', + [0x2C] = 'White Balance Env Set', + [0x2D] = 'White Balance Env Get', + [0x2E] = 'Exposition Bias Set', -- Ev Bias Set + [0x2F] = 'Exposition Bias Get', + [0x30] = 'Focus Region Set', + [0x31] = 'Focus Region Get', + [0x32] = 'AE Meter Region Set', -- Auto Exposition (Ev) Meter Region Set + [0x33] = 'AE Meter Region Get', + [0x34] = 'Zoom Param Set', + [0x35] = 'Zoom Param Get', + [0x36] = 'Flash Mode Set', + [0x37] = 'Flash Mode Get', + [0x38] = 'Sharpeness Set', + [0x39] = 'Sharpeness Get', + [0x3A] = 'Contrast Set', + [0x3B] = 'Contrast Get', + [0x3C] = 'Saturation Set', + [0x3D] = 'Saturation Get', + [0x3E] = 'Hue Set', -- Color Tonal Set + [0x3F] = 'Hue Get', + [0x40] = 'Face Detect Set', + [0x41] = 'Face Detect Get', + [0x42] = 'Digital Effect Set', -- Digital Filter Set + [0x43] = 'Digital Effect Get', + [0x44] = 'Digital Denoise Set', + [0x45] = 'Digital Denoise Get', + [0x46] = 'Anti Flicker Set', + [0x47] = 'Anti Flicker Get', + [0x48] = 'Multi Cap Param Set', -- Continuous Shoot Set + [0x49] = 'Multi Cap Param Get', + [0x4A] = 'Conti Cap Param Set', -- Continuous Shoot Time Options Set + [0x4B] = 'Conti Cap Param Get', + [0x4C] = 'Hdmi Output Param Set', -- LCD/HDMI video output (Vout) format set + [0x4D] = 'Hdmi Output Param Get', + [0x4E] = 'Quickview Param Set', -- Quick Playback Options Set + [0x4F] = 'Quickview Param Get', + [0x50] = 'OSD Param Set', + [0x51] = 'OSD Param Get', + [0x52] = 'Preview OSD Param Set', + [0x53] = 'Preview OSD Param Get', + [0x54] = 'Camera Date/Time Set', + [0x55] = 'Camera Date/Time Get', + [0x56] = 'Language Param Set', + [0x57] = 'Language Param Get', + [0x58] = 'Camera GPS Set', + [0x59] = 'Camera GPS Get', + [0x5A] = 'Discon State Set', + [0x5B] = 'Discon State Get', + [0x5C] = 'File Index Mode Set', + [0x5D] = 'File Index Mode Get', + [0x5E] = 'AE bCap Param Set', + [0x5F] = 'AE bCap Param Get', + [0x60] = 'Histogram Set', -- Push Chart Set + [0x61] = 'Histogram Get', + [0x62] = 'Video Subtitles Set', -- Video Caption Set + [0x63] = 'Video Subtitles Get', + [0x64] = 'Video Subtitles Log Set', + [0x65] = 'Mgear Shutter Speed Set', -- Shutter Speed Limit Set + [0x66] = 'Video Standard Set', + [0x67] = 'Video Standard Get', + [0x68] = 'AE Lock Status Set', -- Auto Exposure Preserve Set + [0x69] = 'AE Lock Status Get', + [0x6A] = 'Photo Capture Type Set', -- Photo Mode Set + [0x6B] = 'Photo Capture Type Get', + [0x6C] = 'Video Record Mode Set', + [0x6D] = 'Video Record Mode Get', + [0x6E] = 'Panorama Mode Set', + [0x6F] = 'Panorama Mode Get', + [0x70] = 'System State Get', + [0x71] = 'SDcard Info Get', + [0x72] = 'SDcard Do Format', + [0x73] = 'SDcard Format Progress Get', + [0x74] = 'Fw Upgrade Progress Get', + [0x75] = 'Photo Sync Progress Get', + [0x76] = 'Camera Power Info Get', + [0x77] = 'Settings Save', -- Save Preferences + [0x78] = 'Settings Load', + [0x79] = 'File Delete', -- Photo Erase + [0x7A] = 'Video Play Control', + [0x7B] = 'Thumbnail 2 Single Ctrl', -- Single Play Choice + [0x7c] = 'Camera Shutter Cmd', -- Telectrl Action + [0x7D] = 'PB Zoom Ctrl', -- Scale Gesture + [0x7E] = 'PB Pic Drag Ctrl', -- Drag Gesture + [0x80] = 'Camera State Info', -- Camera Status Push + [0x81] = 'Camera Shot Params', -- Cap Params Push + [0x82] = 'Camera PlayBack Params', + [0x83] = 'Camera Chart Info', -- Histogram Params Push + [0x84] = 'Camera Recording Name', -- Video Name Push + [0x85] = 'Camera Raw Params', -- Raw Camera Status Push + [0x86] = 'Camera Cur Pano Status', -- Panorama FileName Push + [0x87] = 'Camera Shot Info', -- Lens Info Push + [0x88] = 'Camera Timelapse Parms', -- TimeLapse Info Push + [0x89] = 'Camera Tracking Status', -- Camera Tracking Params Push + [0x8A] = 'Camera FOV Param', + [0x8B] = 'Racing Liveview Format Set', + [0x8C] = 'Racing Liveview Format Get', + [0x90] = 'Sensor Calibrate Test', -- Check Sensor Test + [0x91] = 'Sensor Calibrate Complete', -- If Cali + [0x92] = 'Video Clip Info Get', -- Video Params Get + [0x93] = 'TransCode Control', -- Xcode Ctrl + [0x94] = 'Focus Range Get', + [0x95] = 'Focus Stroke Set', -- VCM Pos Set + [0x96] = 'Focus Stroke Get', + [0x98] = 'FileSystem Info Get', -- File Params Get + [0x99] = 'Shot Info Get', + [0x9A] = 'Focus Aid Set', + [0x9B] = 'Video Adaptive Gamma Set', -- Video Contrast Enhance Set + [0x9C] = 'Video Adaptive Gamma Get', + [0x9D] = 'Awb Meter Region Set', -- White Balance Area Set + [0x9E] = 'Awb Meter Region Get', + [0x9F] = 'Audio Param Set', + [0xA0] = 'Audio Param Get', + [0xA1] = 'Format Raw SSD', + [0xA2] = 'Focus Distance Set', + [0xA3] = 'Calibration Control Set', + [0xA4] = 'Focus Window Set', + [0xA5] = 'Tracking Region Get', + [0xA6] = 'Tracking Region Set', + [0xA7] = 'Iris Set', + [0xA8] = 'AE Unlock Mode Set', + [0xA9] = 'AE Unlock Mode Get', + [0xAA] = 'Pano File Params Get', + [0xAB] = 'Video Encode Set', + [0xAC] = 'Video Encode Get', + [0xAD] = 'MCTF Set', + [0xAE] = 'MCTF Get', + [0xAF] = 'SSD Video Format Set', + [0xB0] = 'SSD Video Format Get', + [0xB1] = 'Record Fan Set', + [0xB2] = 'Record Fan Get', + [0xB3] = 'Request IFrame', -- Request key frame; useful if some video data was dropped + [0xB4] = 'Camera Prepare Open Fan', + [0xB5] = 'Camera Sensor Id Get', + [0xB6] = 'Forearm Lamp Config Set', -- ForeArm LED Set + [0xB7] = 'Forearm Lamp Config Get', + [0xB8] = 'Camera Optics Zoom Mode', + [0xB9] = 'Image Rotation Set', -- Set Camera Rotation Mode + [0xBA] = 'Image Rotation Get', + [0xBB] = 'Gimbal Lock Config Set', -- Lock Gimbal When Shot Set + [0xBC] = 'Gimbal Lock Config Get', + [0xBD] = 'Old Cam LCD Format Set', -- Raw Video Format Set + [0xBE] = 'Old Cam LCD Format Get', + [0xBF] = 'File Star Flag Set', + [0xC0] = 'MFDemarcate', + [0xC1] = 'Log Mode Set', + [0xC2] = 'Param Name Set', + [0xC3] = 'Param Name Get', + [0xC4] = 'Camera Tap Zoom Set', + [0xC5] = 'Camera Tap Zoom Get', + [0xC6] = 'Camera Tap Zoom Target Set', + [0xC7] = 'Camera Tap Zoom State Info', + [0xC8] = 'Defog Enabled Set', + [0xC9] = 'Defog Enabled Get', + [0xCA] = 'Raw Equip Info Set', + [0xCC] = 'SSD Raw Video Digital Filter Set', + [0xCE] = 'Calibration Control Get', + [0xCF] = 'Mechanical Shutter Set', + [0xD0] = 'Mechanical Shutter Get', + [0xD1] = 'Cam DCF Abstract Push', -- Push DFC Info Get + [0xD2] = 'Dust Reduction State Set', + [0xD3] = 'Camera UnknownD3', + [0xDD] = 'ND Filter Set', + [0xDE] = 'Raw New Param Set', + [0xDF] = 'Raw New Param Get', + [0xE0] = 'Capture Sound', -- Capability Range Get + [0xE1] = 'Capture Config Set', + [0xE2] = 'Capture Config Get', + [0xF0] = 'Camera TBD F0', -- Supported in P3X + [0xF1] = 'Camera Tau Param', + [0xF2] = 'Camera Tau Param Get', -- Push Tau Factor Get + [0xF9] = 'Focus Infinite Get', + [0xFA] = 'Focus Infinite Set', +} + +-- Camera - Camera Shutter Cmd - 0x7c + +f.camera_camera_shutter_cmd_shutter_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shutter_cmd_shutter_type", "Shutter Type", base.DEC) + +local function camera_camera_shutter_cmd_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_shutter_cmd_shutter_type, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Shutter Cmd: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Shutter Cmd: Payload size different than expected") end +end + +-- Camera - Camera State Info - 0x80 + +enums.CAMERA_STATE_INFO_FIRM_UPGRADE_ERROR_STATE_FIRM_ERROR_TYPE_ENUM = { + [0x00] = 'NO', + [0x01] = 'Nomatch', + [0x02] = 'UpgradeError', + [0x06] = 'OTHER', +} + +enums.CAMERA_STATE_INFO_PHOTO_STATE_ENUM = { + [0x00] = 'NO', + [0x01] = 'Single', + [0x02] = 'Multiple', + [0x03] = 'Hdr', + [0x04] = 'FullView', + [0x06] = 'OTHER', +} + +enums.CAMERA_STATE_INFO_SD_CARD_STATE_ENUM = { + [0x00] = 'Normal', + [0x01] = 'None', + [0x02] = 'Invalid', + [0x03] = 'WriteProtection', + [0x04] = 'Unformat', + [0x05] = 'Formating', + [0x06] = 'Illegal', + [0x07] = 'Busy', + [0x08] = 'Full', + [0x09] = 'Slow', + [0x0a] = 'Unknow', + [0x0b] = 'IndexMax', + [0x0c] = 'Initialzing', + [0x0d] = 'ToFormat', + [0x0e] = 'TryToRecoverFile', + [0x0f] = 'BecomeSlow', + [0x63] = 'USBConnected', + [0x64] = 'OTHER', +} + +enums.CAMERA_STATE_INFO_MODE_ENUM = { + [0x00] = 'TAKEPHOTO', + [0x01] = 'RECORD', + [0x02] = 'PLAYBACK', + [0x03] = 'TRANSCODE', + [0x04] = 'TUNING', + [0x05] = 'SAVEPOWER', + [0x06] = 'DOWNLOAD', + [0x07] = 'NEW_PLAYBACK', + [0x64] = 'OTHER', +} + +enums.CAMERA_STATE_INFO_FILE_INDEX_MODE_ENUM = { + [0x00] = 'Reset', + [0x01] = 'Sequence', +} + +enums.CAMERA_STATE_INFO_CAMERA_TYPE_ENUM = { + [0x00] = 'DJICameraTypeFC350', + [0x01] = 'DJICameraTypeFC550', + [0x02] = 'DJICameraTypeFC260', + [0x03] = 'DJICameraTypeFC300S', + [0x04] = 'DJICameraTypeFC300X', + [0x05] = 'DJICameraTypeFC550Raw', + [0x06] = 'DJICameraTypeFC330X', + [0x07] = 'DJICameraTypeTau640', + [0x08] = 'DJICameraTypeTau336', + [0x09] = 'DJICameraTypeFC220', + [0x0a] = 'DJICameraTypeFC300XW', + [0x0b] = 'DJICameraTypeCV600', + [0x0d] = 'DJICameraTypeFC6310', + [0x0e] = 'DJICameraTypeFC6510', + [0x0f] = 'DJICameraTypeFC6520', + [0x12] = 'DJICameraTypeFC220S', + [0x14] = 'DJICameraTypeGD600', + [0xff] = 'OTHER', +} + +f.camera_camera_state_info_masked00 = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_masked00", "Masked00", base.HEX) + f.camera_camera_state_info_connect_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_connect_state", "Connect State", base.HEX, nil, 0x0001, nil) + f.camera_camera_state_info_usb_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_usb_state", "Usb State", base.HEX, nil, 0x0002, nil) + f.camera_camera_state_info_time_sync_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_time_sync_state", "Time Sync State", base.HEX, nil, 0x0004, nil) + f.camera_camera_state_info_photo_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_photo_state", "Photo State", base.HEX, enums.CAMERA_STATE_INFO_PHOTO_STATE_ENUM, 0x0038, nil) + f.camera_camera_state_info_record_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_record_state", "Record State", base.HEX, nil, 0x00c0, "TODO values from enum P3.DataCameraGetPushStateInfo") + f.camera_camera_state_info_sensor_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_sensor_state", "Sensor State", base.HEX, nil, 0x0100, nil) + f.camera_camera_state_info_sd_card_insert_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_sd_card_insert_state", "Sd Card Insert State", base.HEX, nil, 0x0200, nil) + f.camera_camera_state_info_sd_card_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_sd_card_state", "Sd Card State", base.HEX, enums.CAMERA_STATE_INFO_SD_CARD_STATE_ENUM, 0x3c00, nil) + f.camera_camera_state_info_firm_upgrade_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_firm_upgrade_state", "Firm Upgrade State", base.HEX, nil, 0x4000, nil) + f.camera_camera_state_info_firm_upgrade_error_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_firm_upgrade_error_state", "Firm Upgrade Error State", base.HEX, enums.CAMERA_STATE_INFO_FIRM_UPGRADE_ERROR_STATE_FIRM_ERROR_TYPE_ENUM, 0x18000, nil) + f.camera_camera_state_info_hot_state = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_hot_state", "Hot State", base.HEX, nil, 0x020000, nil) + f.camera_camera_state_info_not_enabled_photo = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_not_enabled_photo", "Not Enabled Photo", base.HEX, nil, 0x040000, nil) + f.camera_camera_state_info_is_storing = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_is_storing", "Is Storing", base.HEX, nil, 0x080000, nil) + f.camera_camera_state_info_is_time_photoing = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_is_time_photoing", "Is Time Photoing", base.HEX, nil, 0x100000, nil) + f.camera_camera_state_info_encrypt_status = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_encrypt_status", "Encrypt Status", base.HEX, nil, 0xc00000, "TODO values from enum P3.DataCameraGetPushStateInfo") + f.camera_camera_state_info_is_gimbal_busy = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_is_gimbal_busy", "Is Gimbal Busy", base.HEX, nil, 0x08000000, nil) + f.camera_camera_state_info_in_tracking_mode = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_in_tracking_mode", "In Tracking Mode", base.HEX, nil, 0x10000000, nil) +f.camera_camera_state_info_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_mode", "Camera Mode", base.HEX, enums.CAMERA_STATE_INFO_MODE_ENUM, nil, nil) +f.camera_camera_state_info_sd_card_total_size = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_sd_card_total_size", "Sd Card Total Size", base.DEC) +f.camera_camera_state_info_sd_card_free_size = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_sd_card_free_size", "Sd Card Free Size", base.DEC) +f.camera_camera_state_info_remained_shots = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_remained_shots", "Remained Shots", base.DEC) +f.camera_camera_state_info_remained_time = ProtoField.uint32 ("dji_dumlv1.camera_camera_state_info_remained_time", "Remained Time", base.DEC) +f.camera_camera_state_info_file_index_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_file_index_mode", "File Index Mode", base.DEC, enums.CAMERA_STATE_INFO_FILE_INDEX_MODE_ENUM, nil, nil) +f.camera_camera_state_info_fast_play_back_info = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_fast_play_back_info", "Fast Play Back Info", base.HEX) + f.camera_camera_state_info_fast_play_back_enabled = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_fast_play_back_enabled", "Fast Play Back Enabled", base.HEX, nil, 0x80, nil) + f.camera_camera_state_info_fast_play_back_time = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_fast_play_back_time", "Fast Play Back Time", base.DEC, nil, 0x7f, nil) +f.camera_camera_state_info_photo_osd_info = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_info", "Photo Osd Info", base.HEX) + f.camera_camera_state_info_photo_osd_time_is_show = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_time_is_show", "Photo Osd Time Is Show", base.HEX, nil, 0x01, nil) + f.camera_camera_state_info_photo_osd_aperture_is_show = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_aperture_is_show", "Photo Osd Aperture Is Show", base.HEX, nil, 0x02, nil) + f.camera_camera_state_info_photo_osd_shutter_is_show = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_shutter_is_show", "Photo Osd Shutter Is Show", base.HEX, nil, 0x04, nil) + f.camera_camera_state_info_photo_osd_iso_is_show = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_iso_is_show", "Photo Osd Iso Is Show", base.HEX, nil, 0x08, nil) + f.camera_camera_state_info_photo_osd_exposure_is_show = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_exposure_is_show", "Photo Osd Exposure Is Show", base.HEX, nil, 0x10, nil) + f.camera_camera_state_info_photo_osd_sharpe_is_show = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_sharpe_is_show", "Photo Osd Sharpe Is Show", base.HEX, nil, 0x20, nil) + f.camera_camera_state_info_photo_osd_contrast_is_show = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_contrast_is_show", "Photo Osd Contrast Is Show", base.HEX, nil, 0x40, nil) + f.camera_camera_state_info_photo_osd_saturation_is_show = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_photo_osd_saturation_is_show", "Photo Osd Saturation Is Show", base.HEX, nil, 0x80, nil) +f.camera_camera_state_info_unknown19 = ProtoField.bytes ("dji_dumlv1.camera_camera_state_info_unknown19", "Unknown19", base.SPACE) +f.camera_camera_state_info_in_debug_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_in_debug_mode", "In Debug Mode", base.HEX) +f.camera_camera_state_info_unknown1c = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_unknown1c", "Unknown1C", base.HEX) +f.camera_camera_state_info_video_record_time = ProtoField.uint16 ("dji_dumlv1.camera_camera_state_info_video_record_time", "Video Record Time", base.DEC) +f.camera_camera_state_info_max_photo_num = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_max_photo_num", "Max Photo Num", base.DEC) +f.camera_camera_state_info_masked20 = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_masked20", "Masked20", base.HEX) + f.camera_camera_state_info_histogram_enable = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_histogram_enable", "Histogram Enable", base.HEX, nil, 0x01, nil) +f.camera_camera_state_info_camera_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_camera_type", "Camera Type", base.HEX, enums.CAMERA_STATE_INFO_CAMERA_TYPE_ENUM, nil, nil) +f.camera_camera_state_info_unknown22 = ProtoField.bytes ("dji_dumlv1.camera_camera_state_info_unknown22", "Unknown22", base.SPACE) +f.camera_camera_state_info_version = ProtoField.uint8 ("dji_dumlv1.camera_camera_state_info_version", "Version", base.DEC) +f.camera_camera_state_info_padding = ProtoField.bytes ("dji_dumlv1.camera_camera_state_info_padding", "Padding", base.SPACE) + +local function camera_camera_state_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_state_info_masked00, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_connect_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_usb_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_time_sync_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_photo_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_record_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_sensor_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_sd_card_insert_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_sd_card_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_firm_upgrade_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_firm_upgrade_error_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_hot_state, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_not_enabled_photo, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_is_storing, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_is_time_photoing, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_encrypt_status, payload(offset, 4)) + subtree:add_le (f.camera_camera_state_info_is_gimbal_busy, payload(offset, 4)) + + subtree:add_le (f.camera_camera_state_info_in_tracking_mode, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_state_info_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_state_info_sd_card_total_size, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_state_info_sd_card_free_size, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_state_info_remained_shots, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_state_info_remained_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_state_info_file_index_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_state_info_fast_play_back_info, payload(offset, 1)) + subtree:add_le (f.camera_camera_state_info_fast_play_back_enabled, payload(offset, 1)) + subtree:add_le (f.camera_camera_state_info_fast_play_back_time, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_state_info_photo_osd_info, payload(offset, 2)) + subtree:add_le (f.camera_camera_state_info_photo_osd_aperture_is_show, payload(offset, 2)) + subtree:add_le (f.camera_camera_state_info_photo_osd_shutter_is_show, payload(offset, 2)) + subtree:add_le (f.camera_camera_state_info_photo_osd_iso_is_show, payload(offset, 2)) + subtree:add_le (f.camera_camera_state_info_photo_osd_exposure_is_show, payload(offset, 2)) + subtree:add_le (f.camera_camera_state_info_photo_osd_sharpe_is_show, payload(offset, 2)) + subtree:add_le (f.camera_camera_state_info_photo_osd_contrast_is_show, payload(offset, 2)) + subtree:add_le (f.camera_camera_state_info_photo_osd_saturation_is_show, payload(offset, 2)) + subtree:add_le (f.camera_camera_state_info_photo_osd_time_is_show, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_state_info_unknown19, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_state_info_in_debug_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_state_info_unknown1c, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_state_info_video_record_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_state_info_max_photo_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_state_info_masked20, payload(offset, 1)) + subtree:add_le (f.camera_camera_state_info_histogram_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_state_info_camera_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_state_info_unknown22, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_state_info_version, payload(offset, 1)) + offset = offset + 1 + + if (payload:len() >= offset + 2) then -- On some platforms, packet ends with 2 byte padding + + subtree:add_le (f.camera_camera_state_info_padding, payload(offset, 2)) + offset = offset + 2 + + end + + if (offset ~= 37) and (offset ~= 39) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera State Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera State Info: Payload size different than expected") end +end + +-- Camera - Camera Shot Params - 0x81 + +enums.CAMERA_SHOT_PARAMS_ISO_TYPE_ENUM = { + [0x00] = 'AUTO', + [0x01] = 'AUTOHIGH', + [0x02] = 'ISO50', + [0x03] = 'ISO100', + [0x04] = 'ISO200', + [0x05] = 'ISO400', + [0x06] = 'ISO800', + [0x07] = 'ISO1600', + [0x08] = 'ISO3200', + [0x09] = 'ISO6400', + [0x0a] = 'ISO12800', + [0x0b] = 'ISO25600', +} + +enums.CAMERA_SHOT_PARAMS_IMAGE_SIZE_SIZE_TYPE_ENUM = { + [0x00] = 'DEFAULT', + [0x01] = 'SMALLEST', + [0x02] = 'SMALL', + [0x03] = 'MIDDLE', + [0x04] = 'LARGE', + [0x05] = 'LARGEST', + [0x06] = 'OTHER', +} + +enums.CAMERA_SHOT_PARAMS_IMAGE_RATIO_TYPE_ENUM = { + [0x00] = 'R 4:3', + [0x01] = 'R 16:9', + [0x02] = 'R 3:2', + [0x06] = 'R OTHER', +} + +enums.CAMERA_SHOT_PARAMS_EXPOSURE_MODE_ENUM = { + [0x00] = 'a', + [0x01] = 'Program', + [0x02] = 'ShutterPriority', + [0x03] = 'AperturePriority', + [0x04] = 'Manual', + [0x05] = 'f', + [0x06] = 'g', + [0x07] = 'Cine', + [0x64] = 'i', +} + +enums.CAMERA_SHOT_PARAMS_PHOTO_TYPE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x03] = 'd', + [0x04] = 'e', + [0x05] = 'f', + [0x06] = 'g', + [0x07] = 'h', + [0x0a] = 'i', +} + +enums.CAMERA_SHOT_PARAMS_VIDEO_ENCODE_TYPE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x64] = 'c', +} + +f.camera_camera_shot_params_aperture_size = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_aperture_size", "Aperture Size", base.HEX) +f.camera_camera_shot_params_user_shutter = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_user_shutter", "User Shutter", base.HEX) + f.camera_camera_shot_params_reciprocal = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_reciprocal", "Reciprocal", base.HEX, nil, 0x8000, nil) +f.camera_camera_shot_params_shutter_speed_decimal = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_shutter_speed_decimal", "Shutter Speed Decimal", base.DEC) +f.camera_camera_shot_params_iso = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_iso", "Iso", base.HEX, enums.CAMERA_SHOT_PARAMS_ISO_TYPE_ENUM, nil, nil) +f.camera_camera_shot_params_exposure_compensation = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_exposure_compensation", "Exposure Compensation", base.HEX) +f.camera_camera_shot_params_ctr_object_for_one = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_ctr_object_for_one", "Ctr Object For One", base.HEX) +f.camera_camera_shot_params_ctr_object_for_two = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_ctr_object_for_two", "Ctr Object For Two", base.HEX) +f.camera_camera_shot_params_image_size = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_image_size", "Image Size", base.HEX, enums.CAMERA_SHOT_PARAMS_IMAGE_SIZE_SIZE_TYPE_ENUM, nil, nil) +f.camera_camera_shot_params_image_ratio = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_image_ratio", "Image Ratio", base.HEX, enums.CAMERA_SHOT_PARAMS_IMAGE_RATIO_TYPE_ENUM, nil, nil) +f.camera_camera_shot_params_image_quality = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_image_quality", "Image Quality", base.HEX) +f.camera_camera_shot_params_image_format = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_image_format", "Image Format", base.HEX) +f.camera_camera_shot_params_video_format = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_format", "Video Format", base.HEX) +f.camera_camera_shot_params_video_fps = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_fps", "Video Fps", base.HEX) +f.camera_camera_shot_params_video_fov = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_fov", "Video Fov", base.HEX) +f.camera_camera_shot_params_video_second_open = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_second_open", "Video Second Open", base.HEX) +f.camera_camera_shot_params_video_second_ratio = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_second_ratio", "Video Second Ratio", base.HEX) +f.camera_camera_shot_params_video_quality = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_quality", "Video Quality", base.HEX) +f.camera_camera_shot_params_video_store_format = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_store_format", "Video Store Format", base.HEX) +f.camera_camera_shot_params_exposure_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_exposure_mode", "Exposure Mode", base.HEX, enums.CAMERA_SHOT_PARAMS_EXPOSURE_MODE_ENUM, nil, nil) +f.camera_camera_shot_params_scene_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_scene_mode", "Scene Mode", base.HEX) +f.camera_camera_shot_params_metering = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_metering", "Metering", base.HEX) +f.camera_camera_shot_params_white_balance = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_white_balance", "White Balance", base.HEX) +f.camera_camera_shot_params_color_temp = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_color_temp", "Color Temp", base.HEX) +f.camera_camera_shot_params_mctf_enable = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_mctf_enable", "Mctf Enable", base.HEX) +f.camera_camera_shot_params_mctf_strength = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_mctf_strength", "Mctf Strength", base.HEX) +f.camera_camera_shot_params_sharpe = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_sharpe", "Sharpe", base.HEX) +f.camera_camera_shot_params_contrast = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_contrast", "Contrast", base.HEX) +f.camera_camera_shot_params_saturation = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_saturation", "Saturation", base.HEX) +f.camera_camera_shot_params_tonal = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_tonal", "Tonal", base.HEX) +f.camera_camera_shot_params_digital_filter = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_digital_filter", "Digital Filter", base.HEX) +f.camera_camera_shot_params_anti_flicker = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_anti_flicker", "Anti Flicker", base.HEX) +f.camera_camera_shot_params_continuous = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_continuous", "Continuous", base.HEX) +f.camera_camera_shot_params_time_params_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_time_params_type", "Time Params Type", base.HEX) +f.camera_camera_shot_params_time_params_num = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_time_params_num", "Time Params Num", base.HEX) +f.camera_camera_shot_params_time_params_period = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_time_params_period", "Time Params Period", base.HEX) +f.camera_camera_shot_params_real_aperture_size = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_real_aperture_size", "Real Aperture Size", base.HEX) +f.camera_camera_shot_params_real_shutter = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_real_shutter", "Real Shutter", base.HEX) + f.camera_camera_shot_params_rel_reciprocal = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_rel_reciprocal", "Rel Reciprocal", base.HEX, nil, 0x8000, nil) +f.camera_camera_shot_params_rel_shutter_speed_decimal = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_rel_shutter_speed_decimal", "Real Shutter Speed Decimal", base.DEC) +f.camera_camera_shot_params_rel_iso = ProtoField.uint32 ("dji_dumlv1.camera_camera_shot_params_rel_iso", "Real Iso", base.HEX) +f.camera_camera_shot_params_rel_exposure_compensation = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_rel_exposure_compensation", "Real Exposure Compensation", base.HEX) +f.camera_camera_shot_params_time_countdown = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_time_countdown", "Time Countdown", base.HEX) +f.camera_camera_shot_params_cap_min_shutter = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_cap_min_shutter", "Cap Min Shutter", base.HEX) + f.camera_camera_shot_params_cap_min_shutter_reciprocal = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_cap_min_shutter_reciprocal", "Cap Min Shutter Reciprocal", base.HEX, nil, 0x8000, nil) +f.camera_camera_shot_params_cap_min_shutter_decimal = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_cap_min_shutter_decimal", "Cap Min Shutter Decimal", base.DEC) +f.camera_camera_shot_params_cap_max_shutter = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_cap_max_shutter", "Cap Max Shutter", base.HEX) + f.camera_camera_shot_params_cap_max_shutter_reciprocal = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_cap_max_shutter_reciprocal", "Cap Max Shutter Reciprocal", base.HEX, nil, 0x8000, nil) +f.camera_camera_shot_params_cap_max_shutter_decimal = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_cap_max_shutter_decimal", "Cap Max Shutter Decimal", base.DEC) +f.camera_camera_shot_params_video_standard = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_standard", "Video Standard", base.HEX) +f.camera_camera_shot_params_ae_lock = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_ae_lock", "Ae Lock", base.HEX) +f.camera_camera_shot_params_photo_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_photo_type", "Photo Type", base.HEX, enums.CAMERA_SHOT_PARAMS_PHOTO_TYPE_ENUM, nil, nil) +f.camera_camera_shot_params_spot_area_bottom_right_pos = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_spot_area_bottom_right_pos", "Spot Area Bottom Right Pos", base.HEX) +f.camera_camera_shot_params_unknown3b = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_unknown3b", "Unknown3B", base.HEX) +f.camera_camera_shot_params_aeb_number = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_aeb_number", "Aeb Number", base.HEX) +f.camera_camera_shot_params_pano_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_pano_mode", "Pano Mode", base.HEX, nil, nil, "TODO values from enum P3.DataCameraGetPushShotParams") +f.camera_camera_shot_params_cap_min_aperture = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_cap_min_aperture", "Cap Min Aperture", base.HEX) +f.camera_camera_shot_params_cap_max_aperture = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_cap_max_aperture", "Cap Max Aperture", base.HEX) +f.camera_camera_shot_params_masked42 = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_masked42", "Masked42", base.HEX) + f.camera_camera_shot_params_auto_turn_off_fore_led = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_auto_turn_off_fore_led", "Auto Turn Off Fore Led", base.HEX, nil, 0x01, nil) +f.camera_camera_shot_params_exposure_status = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_exposure_status", "Exposure Status", base.HEX) +f.camera_camera_shot_params_locked_gimbal_when_shot = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_locked_gimbal_when_shot", "Locked Gimbal When Shot", base.HEX) +f.camera_camera_shot_params_encode_types = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_encode_types", "Video Encode Types", base.HEX) + f.camera_camera_shot_params_primary_video_encode_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_primary_video_encode_type", "Primary Video Encode Type", base.HEX, enums.CAMERA_SHOT_PARAMS_VIDEO_ENCODE_TYPE_ENUM, 0x0f, nil) + f.camera_camera_shot_params_secondary_video_encode_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_secondary_video_encode_type", "Secondary Video Encode Type", base.HEX, enums.CAMERA_SHOT_PARAMS_VIDEO_ENCODE_TYPE_ENUM, 0xf0, nil) +f.camera_camera_shot_params_not_auto_ae_unlock = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_not_auto_ae_unlock", "Not Auto Ae Unlock", base.HEX) +f.camera_camera_shot_params_unknown47 = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_unknown47", "Unknown47", base.HEX) +f.camera_camera_shot_params_constrast_ehance = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_constrast_ehance", "Constrast Ehance", base.HEX) +f.camera_camera_shot_params_video_record_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_video_record_mode", "Video Record Mode", base.HEX) +f.camera_camera_shot_params_timelapse_save_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_params_timelapse_save_type", "Timelapse Save Type", base.HEX) +f.camera_camera_shot_params_video_record_interval_time = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_video_record_interval_time", "Video Record Interval Time", base.HEX) +f.camera_camera_shot_params_timelapse_duration = ProtoField.uint32 ("dji_dumlv1.camera_camera_shot_params_timelapse_duration", "Timelapse Duration", base.HEX) +f.camera_camera_shot_params_timelapse_time_count_down = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_timelapse_time_count_down", "Timelapse Time Count Down", base.HEX) +f.camera_camera_shot_params_timelapse_recorded_frame = ProtoField.uint32 ("dji_dumlv1.camera_camera_shot_params_timelapse_recorded_frame", "Timelapse Recorded Frame", base.HEX) +f.camera_camera_shot_params_optics_scale = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_optics_scale", "Optics Scale", base.HEX) +f.camera_camera_shot_params_digital_zoom_scale = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_params_digital_zoom_scale", "Digital Zoom Scale", base.HEX) + +local function camera_camera_shot_params_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_shot_params_aperture_size, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_user_shutter, payload(offset, 2)) + subtree:add_le (f.camera_camera_shot_params_reciprocal, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_shutter_speed_decimal, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_iso, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_exposure_compensation, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_ctr_object_for_one, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_ctr_object_for_two, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_image_size, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_image_ratio, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_image_quality, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_image_format, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_format, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_fps, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_fov, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_second_open, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_second_ratio, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_quality, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_store_format, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_exposure_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_scene_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_metering, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_white_balance, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_color_temp, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_mctf_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_mctf_strength, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_sharpe, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_contrast, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_saturation, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_tonal, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_digital_filter, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_anti_flicker, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_continuous, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_time_params_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_time_params_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_time_params_period, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_real_aperture_size, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_real_shutter, payload(offset, 2)) + subtree:add_le (f.camera_camera_shot_params_rel_reciprocal, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_rel_shutter_speed_decimal, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_rel_iso, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_shot_params_rel_exposure_compensation, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_time_countdown, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_cap_min_shutter, payload(offset, 2)) + subtree:add_le (f.camera_camera_shot_params_cap_min_shutter_reciprocal, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_cap_min_shutter_decimal, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_cap_max_shutter, payload(offset, 2)) + subtree:add_le (f.camera_camera_shot_params_cap_max_shutter_reciprocal, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_cap_max_shutter_decimal, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_standard, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_ae_lock, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_photo_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_spot_area_bottom_right_pos, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_unknown3b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_aeb_number, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_pano_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_cap_min_aperture, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_cap_max_aperture, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_masked42, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_params_auto_turn_off_fore_led, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_exposure_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_locked_gimbal_when_shot, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_encode_types, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_params_primary_video_encode_type, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_params_secondary_video_encode_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_not_auto_ae_unlock, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_unknown47, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_constrast_ehance, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_record_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_timelapse_save_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_params_video_record_interval_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_timelapse_duration, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_shot_params_timelapse_time_count_down, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_timelapse_recorded_frame, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_shot_params_optics_scale, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_params_digital_zoom_scale, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 91) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Shot Params: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Shot Params: Payload size different than expected") end +end + +-- Camera - Camera Play Back Params - 0x82 + +enums.CAMERA_PLAY_BACK_PARAMS_MODE_ENUM = { + [0x00] = 'Single', + [0x01] = 'SingleLarge', + [0x02] = 'SinglePlay', + [0x03] = 'SinglePause', + [0x04] = 'MultipleDel', + [0x05] = 'Multiple', + [0x06] = 'Download', + [0x07] = 'SingleOver', + [0x64] = 'OTHER', +} + +enums.CAMERA_PLAY_BACK_PARAMS_FILE_TYPE_ENUM = { + [0x00] = 'JPEG', + [0x01] = 'DNG', + [0x02] = 'VIDEO', + [0x64] = 'OTHER', +} + +enums.CAMERA_PLAY_BACK_PARAMS_DEL_FILE_STATUS_ENUM = { + [0x00] = 'NORMAL', + [0x02] = 'DELETING', + [0x03] = 'COMPLETED', +} + +f.camera_camera_play_back_params_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_play_back_params_mode", "Mode", base.HEX, enums.CAMERA_PLAY_BACK_PARAMS_MODE_ENUM, nil, nil) +f.camera_camera_play_back_params_file_type = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_file_type", "File Type", base.HEX, enums.CAMERA_PLAY_BACK_PARAMS_FILE_TYPE_ENUM, nil, nil) +f.camera_camera_play_back_params_file_num = ProtoField.uint8 ("dji_dumlv1.camera_camera_play_back_params_file_num", "File Num", base.DEC) +f.camera_camera_play_back_params_total_num = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_total_num", "Total Num", base.DEC) +f.camera_camera_play_back_params_index = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_index", "Index", base.DEC) +f.camera_camera_play_back_params_progress = ProtoField.uint8 ("dji_dumlv1.camera_camera_play_back_params_progress", "Progress", base.HEX) +f.camera_camera_play_back_params_total_time = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_total_time", "Total Time", base.HEX) +f.camera_camera_play_back_params_current = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_current", "Current", base.HEX) +f.camera_camera_play_back_params_delete_chioce_num = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_delete_chioce_num", "Delete Chioce Num", base.HEX) +f.camera_camera_play_back_params_zoom_size = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_zoom_size", "Zoom Size", base.HEX) +f.camera_camera_play_back_params_total_photo_num = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_total_photo_num", "Total Photo Num", base.HEX) +f.camera_camera_play_back_params_total_video_num = ProtoField.uint16 ("dji_dumlv1.camera_camera_play_back_params_total_video_num", "Total Video Num", base.HEX) +f.camera_camera_play_back_params_photo_width = ProtoField.uint32 ("dji_dumlv1.camera_camera_play_back_params_photo_width", "Photo Width", base.HEX) +f.camera_camera_play_back_params_photo_height = ProtoField.uint32 ("dji_dumlv1.camera_camera_play_back_params_photo_height", "Photo Height", base.HEX) +f.camera_camera_play_back_params_center_x = ProtoField.uint32 ("dji_dumlv1.camera_camera_play_back_params_center_x", "Center X", base.HEX) +f.camera_camera_play_back_params_center_y = ProtoField.uint32 ("dji_dumlv1.camera_camera_play_back_params_center_y", "Center Y", base.HEX) +f.camera_camera_play_back_params_cur_page_selected = ProtoField.uint8 ("dji_dumlv1.camera_camera_play_back_params_cur_page_selected", "Cur Page Selected", base.HEX) +f.camera_camera_play_back_params_del_file_status = ProtoField.uint8 ("dji_dumlv1.camera_camera_play_back_params_del_file_status", "Del File Status", base.HEX, enums.CAMERA_PLAY_BACK_PARAMS_DEL_FILE_STATUS_ENUM, nil, nil) +f.camera_camera_play_back_params_not_select_file_valid = ProtoField.uint8 ("dji_dumlv1.camera_camera_play_back_params_not_select_file_valid", "Not Select File Valid", base.HEX) +f.camera_camera_play_back_params_single_downloaded = ProtoField.uint8 ("dji_dumlv1.camera_camera_play_back_params_single_downloaded", "Single Downloaded", base.HEX) + +local function camera_camera_play_back_params_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_play_back_params_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_play_back_params_file_type, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_file_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_play_back_params_total_num, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_index, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_progress, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_play_back_params_total_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_delete_chioce_num, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_zoom_size, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_total_photo_num, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_total_video_num, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_play_back_params_photo_width, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_play_back_params_photo_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_play_back_params_center_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_play_back_params_center_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_play_back_params_cur_page_selected, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_play_back_params_del_file_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_play_back_params_not_select_file_valid, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_play_back_params_single_downloaded, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 41) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Play Back Params: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Play Back Params: Payload size different than expected") end +end + +-- Camera - Camera Chart Info - 0x83 + +f.camera_camera_chart_info_light_values = ProtoField.bytes ("dji_dumlv1.camera_camera_chart_info_light_values", "Light Values", base.NONE) + +local function camera_camera_chart_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_chart_info_light_values, payload(offset, 4)) -- size not known + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Chart Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Chart Info: Payload size different than expected") end +end + +-- Camera - Camera Recording Name - 0x84 + +enums.CAMERA_RECORDING_FILE_TYPE_ENUM = { + [0x00] = 'JPEG', + [0x01] = 'DNG', + [0x02] = 'VIDEO', + [0x64] = 'OTHER', +} + +f.camera_camera_recording_name_file_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_recording_name_file_type", "File Type", base.HEX, enums.CAMERA_RECORDING_FILE_TYPE_ENUM, nil, nil) +f.camera_camera_recording_name_index = ProtoField.uint32 ("dji_dumlv1.camera_camera_recording_name_index", "Index", base.HEX) +f.camera_camera_recording_name_size = ProtoField.uint64 ("dji_dumlv1.camera_camera_recording_name_size", "Size", base.HEX) +f.camera_camera_recording_name_time = ProtoField.uint32 ("dji_dumlv1.camera_camera_recording_name_time", "Time", base.HEX) + +local function camera_camera_recording_name_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_recording_name_file_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_recording_name_index, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_recording_name_size, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.camera_camera_recording_name_time, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 17) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Recording Name: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Recording Name: Payload size different than expected") end +end + +-- Camera - Camera Raw Params - 0x85 + +enums.CAMERA_RAW_PARAMS_DISK_STATUS_ENUM = { + [0x00] = 'NA', + [0x01] = 'WAITING', + [0x02] = 'STORING', + [0x03] = 'LOW_FORMATING', + [0x04] = 'FAST_FORMATING', + [0x05] = 'INITIALIZING', + [0x06] = 'DEVICE_ERROR', + [0x07] = 'VERIFY_ERROR', + [0x08] = 'FULL', + [0x09] = 'OTHER', +} + +f.camera_camera_raw_params_masked00 = ProtoField.uint8 ("dji_dumlv1.camera_camera_raw_params_masked00", "Masked00", base.HEX) + f.camera_camera_raw_params_disk_status = ProtoField.uint8 ("dji_dumlv1.camera_camera_raw_params_disk_status", "Disk Status", base.HEX, enums.CAMERA_RAW_PARAMS_DISK_STATUS_ENUM, 0x0f, nil) + f.camera_camera_raw_params_disk_connected = ProtoField.uint8 ("dji_dumlv1.camera_camera_raw_params_disk_connected", "Disk Connected", base.HEX, nil, 0x10, nil) + f.camera_camera_raw_params_disk_capacity = ProtoField.uint8 ("dji_dumlv1.camera_camera_raw_params_disk_capacity", "Disk Capacity", base.HEX, nil, 0x60, nil) +f.camera_camera_raw_params_disk_available_time = ProtoField.uint16 ("dji_dumlv1.camera_camera_raw_params_disk_available_time", "Disk Available Time", base.HEX) +f.camera_camera_raw_params_available_capacity = ProtoField.uint32 ("dji_dumlv1.camera_camera_raw_params_available_capacity", "Available Capacity", base.HEX) +f.camera_camera_raw_params_resolution = ProtoField.uint8 ("dji_dumlv1.camera_camera_raw_params_resolution", "Resolution", base.HEX) +f.camera_camera_raw_params_fps = ProtoField.uint8 ("dji_dumlv1.camera_camera_raw_params_fps", "Fps", base.HEX) +f.camera_camera_raw_params_ahci_status = ProtoField.uint8 ("dji_dumlv1.camera_camera_raw_params_ahci_status", "Ahci Status", base.HEX) + +local function camera_camera_raw_params_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_raw_params_masked00, payload(offset, 1)) + subtree:add_le (f.camera_camera_raw_params_disk_status, payload(offset, 1)) + subtree:add_le (f.camera_camera_raw_params_disk_connected, payload(offset, 1)) + subtree:add_le (f.camera_camera_raw_params_disk_capacity, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_raw_params_disk_available_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_raw_params_available_capacity, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_raw_params_resolution, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_raw_params_fps, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_raw_params_ahci_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Raw Params: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Raw Params: Payload size different than expected") end +end + +-- Camera - Camera Cur Pano File Name - 0x86 + +f.camera_camera_cur_pano_file_name_index = ProtoField.uint32 ("dji_dumlv1.camera_camera_cur_pano_file_name_index", "Index", base.HEX) +f.camera_camera_cur_pano_file_name_unknown04 = ProtoField.bytes ("dji_dumlv1.camera_camera_cur_pano_file_name_unknown04", "Unknown04", base.SPACE) +f.camera_camera_cur_pano_file_name_pano_create_time = ProtoField.uint32 ("dji_dumlv1.camera_camera_cur_pano_file_name_pano_create_time", "Pano Create Time", base.HEX) +f.camera_camera_cur_pano_file_name_cur_saved_number = ProtoField.uint8 ("dji_dumlv1.camera_camera_cur_pano_file_name_cur_saved_number", "Cur Saved Number", base.HEX) +f.camera_camera_cur_pano_file_name_cur_taken_number = ProtoField.uint8 ("dji_dumlv1.camera_camera_cur_pano_file_name_cur_taken_number", "Cur Taken Number", base.HEX) +f.camera_camera_cur_pano_file_name_total_number = ProtoField.uint8 ("dji_dumlv1.camera_camera_cur_pano_file_name_total_number", "Total Number", base.HEX) +f.camera_camera_cur_pano_file_name_unknown13 = ProtoField.uint8 ("dji_dumlv1.camera_camera_cur_pano_file_name_unknown13", "Unknown13", base.HEX) +f.camera_camera_cur_pano_file_name_file_size = ProtoField.uint64 ("dji_dumlv1.camera_camera_cur_pano_file_name_file_size", "File Size", base.HEX) +f.camera_camera_cur_pano_file_name_create_time = ProtoField.uint32 ("dji_dumlv1.camera_camera_cur_pano_file_name_create_time", "Create Time", base.HEX) + +local function camera_camera_cur_pano_file_name_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_cur_pano_file_name_index, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_cur_pano_file_name_unknown04, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.camera_camera_cur_pano_file_name_pano_create_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_cur_pano_file_name_cur_saved_number, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_cur_pano_file_name_cur_taken_number, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_cur_pano_file_name_total_number, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_cur_pano_file_name_unknown13, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_cur_pano_file_name_file_size, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.camera_camera_cur_pano_file_name_create_time, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Cur Pano File Name: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Cur Pano File Name: Payload size different than expected") end +end + +-- Camera - Camera Shot Info - 0x87 + + +enums.CAMERA_SHOT_INFO_FUSELAGE_FOCUS_MODE_ENUM = { + [0x00] = 'Manual', + [0x01] = 'OneAuto', + [0x02] = 'ContinuousAuto', + [0x03] = 'ManualFine', + [0x06] = 'OTHER', +} + +f.camera_camera_shot_info_masked00 = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_masked00", "Masked00", base.HEX) + f.camera_camera_shot_info_fuselage_focus_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_fuselage_focus_mode", "Fuselage Focus Mode", base.HEX, enums.CAMERA_SHOT_INFO_FUSELAGE_FOCUS_MODE_ENUM, 0x03, nil) + f.camera_camera_shot_info_shot_focus_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_shot_focus_mode", "Shot Focus Mode", base.HEX, nil, 0x0c, "TODO values from enum P3.DataCameraGetPushShotInfo") + f.camera_camera_shot_info_zoom_focus_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_zoom_focus_type", "Zoom Focus Type", base.HEX, nil, 0x10, nil) + f.camera_camera_shot_info_shot_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_shot_type", "Shot Type", base.HEX, nil, 0x20, "TODO values from enum P3.DataCameraGetPushShotInfo") + f.camera_camera_shot_info_shot_fd_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_shot_fd_type", "Shot Fd Type", base.HEX, nil, 0x40, "TODO values from enum P3.DataCameraGetPushShotInfo") + f.camera_camera_shot_info_shot_connected = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_shot_connected", "Shot Connected", base.HEX, nil, 0x80, nil) +f.camera_camera_shot_info_shot_focus_max_stroke = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_info_shot_focus_max_stroke", "Shot Focus Max Stroke", base.HEX) +f.camera_camera_shot_info_shot_focus_cur_stroke = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_info_shot_focus_cur_stroke", "Shot Focus Cur Stroke", base.HEX) +f.camera_camera_shot_info_obj_distance = ProtoField.float ("dji_dumlv1.camera_camera_shot_info_obj_distance", "Obj Distance", base.DEC) +f.camera_camera_shot_info_min_aperture = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_info_min_aperture", "Min Aperture", base.HEX) +f.camera_camera_shot_info_max_aperture = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_info_max_aperture", "Max Aperture", base.HEX) +f.camera_camera_shot_info_spot_af_axis_x = ProtoField.float ("dji_dumlv1.camera_camera_shot_info_spot_af_axis_x", "Spot Af Axis X", base.DEC) +f.camera_camera_shot_info_spot_af_axis_y = ProtoField.float ("dji_dumlv1.camera_camera_shot_info_spot_af_axis_y", "Spot Af Axis Y", base.DEC) +f.camera_camera_shot_info_masked15 = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_masked15", "Masked15", base.HEX) + f.camera_camera_shot_info_focus_status = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_focus_status", "Focus Status", base.HEX, nil, 0x03, nil) +f.camera_camera_shot_info_mf_focus_probability = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_mf_focus_probability", "Mf Focus Probability", base.HEX) +f.camera_camera_shot_info_min_focus_distance = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_info_min_focus_distance", "Min Focus Distance", base.HEX) +f.camera_camera_shot_info_max_focus_distance = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_info_max_focus_distance", "Max Focus Distance", base.HEX) +f.camera_camera_shot_info_cur_focus_distance = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_info_cur_focus_distance", "Cur Focus Distance", base.HEX) +f.camera_camera_shot_info_min_focus_distance_step = ProtoField.uint16 ("dji_dumlv1.camera_camera_shot_info_min_focus_distance_step", "Min Focus Distance Step", base.HEX) +f.camera_camera_shot_info_masked1f = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_masked1f", "Masked1F", base.HEX) + f.camera_camera_shot_info_digital_focus_m_enable = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_digital_focus_m_enable", "Digital Focus M Enable", base.HEX, nil, 0x01, nil) + f.camera_camera_shot_info_digital_focus_a_enable = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_digital_focus_a_enable", "Digital Focus A Enable", base.HEX, nil, 0x02, nil) +f.camera_camera_shot_info_x_axis_focus_window_num = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_x_axis_focus_window_num", "X Axis Focus Window Num", base.HEX) +f.camera_camera_shot_info_y_axis_focus_window_num = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_y_axis_focus_window_num", "Y Axis Focus Window Num", base.HEX) +f.camera_camera_shot_info_mf_focus_status = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_mf_focus_status", "Mf Focus Status", base.HEX) +f.camera_camera_shot_info_focus_window_start_x = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_focus_window_start_x", "Focus Window Start X", base.HEX) +f.camera_camera_shot_info_focus_window_real_num_x = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_focus_window_real_num_x", "Focus Window Real Num X", base.HEX) +f.camera_camera_shot_info_focus_window_start_y = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_focus_window_start_y", "Focus Window Start Y", base.HEX) +f.camera_camera_shot_info_focus_window_real_num_y = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_focus_window_real_num_y", "Focus Window Real Num Y", base.HEX) +f.camera_camera_shot_info_support_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_shot_info_support_type", "Support Type", base.HEX) + +local function camera_camera_shot_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_shot_info_masked00, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_fuselage_focus_mode, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_shot_focus_mode, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_zoom_focus_type, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_shot_type, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_shot_fd_type, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_shot_connected, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_shot_focus_max_stroke, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_info_shot_focus_cur_stroke, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_info_obj_distance, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_shot_info_min_aperture, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_info_max_aperture, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_info_spot_af_axis_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_shot_info_spot_af_axis_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_shot_info_masked15, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_focus_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_mf_focus_probability, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_min_focus_distance, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_info_max_focus_distance, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_info_cur_focus_distance, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_info_min_focus_distance_step, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_shot_info_masked1f, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_digital_focus_m_enable, payload(offset, 1)) + subtree:add_le (f.camera_camera_shot_info_digital_focus_a_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_x_axis_focus_window_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_y_axis_focus_window_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_mf_focus_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_focus_window_start_x, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_focus_window_real_num_x, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_focus_window_start_y, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_focus_window_real_num_y, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_shot_info_support_type, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Shot Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Shot Info: Payload size different than expected") end +end + +-- Camera - Camera Timelapse Parms - 0x88 + +f.camera_camera_timelapse_parms_masked00 = ProtoField.uint8 ("dji_dumlv1.camera_camera_timelapse_parms_masked00", "Masked00", base.HEX) + f.camera_camera_timelapse_parms_control_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_timelapse_parms_control_mode", "Control Mode", base.HEX, nil, 0x03, nil) + f.camera_camera_timelapse_parms_gimbal_point_count = ProtoField.uint8 ("dji_dumlv1.camera_camera_timelapse_parms_gimbal_point_count", "Gimbal Point Count", base.HEX, nil, 0xfc, nil) +-- for i=0..point_count, each entry 12 bytes +f.camera_camera_timelapse_parms_interval = ProtoField.uint16 ("dji_dumlv1.camera_camera_timelapse_parms_interval", "Point Interval", base.HEX) +f.camera_camera_timelapse_parms_duration = ProtoField.uint32 ("dji_dumlv1.camera_camera_timelapse_parms_duration", "Point Duration", base.HEX) +f.camera_camera_timelapse_parms_yaw = ProtoField.uint16 ("dji_dumlv1.camera_camera_timelapse_parms_yaw", "Point Yaw", base.HEX, nil, nil) +f.camera_camera_timelapse_parms_roll = ProtoField.uint16 ("dji_dumlv1.camera_camera_timelapse_parms_roll", "Point Roll", base.HEX, nil, nil) +f.camera_camera_timelapse_parms_pitch = ProtoField.uint16 ("dji_dumlv1.camera_camera_timelapse_parms_pitch", "Point Pitch", base.HEX, nil, nil) + +local function camera_camera_timelapse_parms_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_timelapse_parms_masked00, payload(offset, 1)) + subtree:add_le (f.camera_camera_timelapse_parms_control_mode, payload(offset, 1)) + local point_count = bit.band(payload(offset,1):le_uint(), 0xfc) + subtree:add_le (f.camera_camera_timelapse_parms_gimbal_point_count, payload(offset, 1)) + offset = offset + 1 + + local i = 0 + while i < point_count do + i = i + 1 + + subtree:add_le (f.camera_camera_timelapse_parms_interval, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_timelapse_parms_duration, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_timelapse_parms_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_timelapse_parms_roll, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_timelapse_parms_pitch, payload(offset, 2)) + offset = offset + 2 + + end + + if (offset ~= 1 + 12 * point_count) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Timelapse Parms: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Timelapse Parms: Payload size different than expected") end +end + +-- Camera - Camera Tracking Status - 0x89 + +f.camera_camera_tracking_status_masked00 = ProtoField.uint8 ("dji_dumlv1.camera_camera_tracking_status_masked00", "Masked00", base.HEX) + f.camera_camera_tracking_status_get_status = ProtoField.uint8 ("dji_dumlv1.camera_camera_tracking_status_status", "Status", base.HEX, nil, 0x01, nil) +f.camera_camera_tracking_status_x_coord = ProtoField.uint16 ("dji_dumlv1.camera_camera_tracking_status_x_coord", "X Coord", base.DEC) +f.camera_camera_tracking_status_y_coord = ProtoField.uint16 ("dji_dumlv1.camera_camera_tracking_status_y_coord", "Y Coord", base.DEC) + +local function camera_camera_tracking_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_tracking_status_masked00, payload(offset, 1)) + subtree:add_le (f.camera_camera_tracking_status_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tracking_status_x_coord, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tracking_status_y_coord, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Tracking Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Tracking Status: Payload size different than expected") end +end + +-- Camera - Camera Fov Param - 0x8a + +f.camera_camera_fov_param_image_width = ProtoField.uint32 ("dji_dumlv1.camera_camera_fov_param_image_width", "Image Width", base.DEC) +f.camera_camera_fov_param_image_height = ProtoField.uint32 ("dji_dumlv1.camera_camera_fov_param_image_height", "Image Height", base.DEC) +f.camera_camera_fov_param_image_ratio = ProtoField.uint32 ("dji_dumlv1.camera_camera_fov_param_image_ratio", "Image Ratio", base.HEX) +f.camera_camera_fov_param_lens_focal_length = ProtoField.uint32 ("dji_dumlv1.camera_camera_fov_param_lens_focal_length", "Lens Focal Length", base.DEC) + +local function camera_camera_fov_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_fov_param_image_width, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_fov_param_image_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_fov_param_image_ratio, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_fov_param_lens_focal_length, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Fov Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Fov Param: Payload size different than expected") end +end + +-- Camera - Camera Prepare Open Fan - 0xb4 + +f.camera_camera_prepare_open_fan_left_seconds = ProtoField.uint8 ("dji_dumlv1.camera_camera_prepare_open_fan_left_seconds", "Left Seconds", base.DEC) + +local function camera_camera_prepare_open_fan_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_prepare_open_fan_left_seconds, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Prepare Open Fan: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Prepare Open Fan: Payload size different than expected") end +end + +-- Camera - Camera Optics Zoom Mode - 0xb8 + +enums.CAMERA_OPTICS_ZOOM_MODE_ZOOM_MODE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', +} + +enums.CAMERA_OPTICS_ZOOM_MODE_ZOOM_SPEED_ENUM = { + [0x78] = 'a', + [0x79] = 'b', + [0x7a] = 'c', + [0x7b] = 'd', + [0x7c] = 'e', + [0x7d] = 'f', + [0x7e] = 'g', +} + +f.camera_camera_optics_zoom_mode_optics_zomm_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_optics_zoom_mode_optics_zomm_mode", "Optics Zomm Mode", base.HEX, enums.CAMERA_OPTICS_ZOOM_MODE_ZOOM_MODE_ENUM, nil, nil) +f.camera_camera_optics_zoom_mode_zoom_speed = ProtoField.uint8 ("dji_dumlv1.camera_camera_optics_zoom_mode_zoom_speed", "Zoom Speed", base.HEX, enums.CAMERA_OPTICS_ZOOM_MODE_ZOOM_SPEED_ENUM, nil, nil) +f.camera_camera_optics_zoom_mode_c = ProtoField.uint8 ("dji_dumlv1.camera_camera_optics_zoom_mode_c", "C", base.HEX) +f.camera_camera_optics_zoom_mode_d = ProtoField.uint8 ("dji_dumlv1.camera_camera_optics_zoom_mode_d", "D", base.HEX) + +local function camera_camera_optics_zoom_mode_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_optics_zoom_mode_optics_zomm_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_optics_zoom_mode_zoom_speed, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_optics_zoom_mode_c, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_optics_zoom_mode_d, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Optics Zoom Mode: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Optics Zoom Mode: Payload size different than expected") end +end + +-- Camera - Camera Tap Zoom State Info - 0xc7 + +enums.CAMERA_TAP_ZOOM_STATE_INFO_WORKING_STATE_ENUM = { + [0x00] = 'IDLE', + [0x01] = 'ZOOM_IN', + [0x02] = 'ZOOM_OUT', + [0xff] = 'Unknown', +} + +f.camera_camera_tap_zoom_state_info_working_state = ProtoField.uint8 ("dji_dumlv1.camera_camera_tap_zoom_state_info_working_state", "Working State", base.HEX, enums.CAMERA_TAP_ZOOM_STATE_INFO_WORKING_STATE_ENUM, nil, nil) +f.camera_camera_tap_zoom_state_info_gimbal_state = ProtoField.uint8 ("dji_dumlv1.camera_camera_tap_zoom_state_info_gimbal_state", "Gimbal State", base.HEX) +f.camera_camera_tap_zoom_state_info_multiplier = ProtoField.uint8 ("dji_dumlv1.camera_camera_tap_zoom_state_info_multiplier", "Multiplier", base.HEX) + +local function camera_camera_tap_zoom_state_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_tap_zoom_state_info_working_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tap_zoom_state_info_gimbal_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tap_zoom_state_info_multiplier, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 3) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Tap Zoom State Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Tap Zoom State Info: Payload size different than expected") end +end + +-- Camera - Camera UnknownD3 - 0xd3 + +f.camera_camera_camera_unknownD3_field0 = ProtoField.bytes ("dji_dumlv1.camera_camera_camera_unknownD3_field0", "Field0", base.SPACE) + +local function camera_camera_unknownD3_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera UnknownD3: Offset does not match - internal inconsistency") end + else -- Response + + subtree:add_le (f.camera_camera_camera_unknownD3_field0, payload(offset, 67)) + offset = offset + 67 + + if (offset ~= 67) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera UnknownD3: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera UnknownD3: Payload size different than expected") end +end + +-- Camera - Camera Tau Param - 0xf2 + +enums.CAMERA_TAU_PARAM_ZOOM_MODE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', +} + +enums.CAMERA_TAU_PARAM_AGC_AGC_TYPE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x03] = 'd', + [0x04] = 'e', + [0x05] = 'f', + [0x06] = 'g', + [0x07] = 'h', + [0x08] = 'i', + [0x64] = 'j', +} + +enums.CAMERA_TAU_PARAM_ROI_TYPE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x64] = 'd', +} + +enums.CAMERA_TAU_PARAM_THERMOMETRIC_TYPE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x63] = 'd', +} + +enums.CAMERA_TAU_PARAM_GAIN_MODE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x64] = 'd', +} + +enums.CAMERA_TAU_PARAM_VIDEO_RESOLUTION_ENUM = { + [0x00] = 'VR_640', + [0x01] = 'VR_336', + [0xff] = 'UNKNOWN', +} + +enums.CAMERA_TAU_PARAM_LEN_FOCUS_LENGTH_ENUM = { + [0x00] = 'LFL_68', + [0x01] = 'LFL_75', + [0x02] = 'LFL_90', + [0x03] = 'LFL_130', + [0x04] = 'LFL_190', + [0xff] = 'UNKNOWN', +} + +enums.CAMERA_TAU_PARAM_LEN_FPS_ENUM = { + [0x00] = 'FPS_LESS_9', + [0x04] = 'FPS_30', + [0xff] = 'UNKNOWN', +} + +enums.CAMERA_TAU_PARAM_FFC_MODE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x64] = 'c', +} + +enums.CAMERA_TAU_PARAM_EXTER_PARAM_TYPE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x63] = 'd', +} + +f.camera_camera_tau_param_image_format = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_image_format", "Image Format", base.HEX) +f.camera_camera_tau_param_video_format = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_video_format", "Video Format", base.HEX) +f.camera_camera_tau_param_video_fps = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_video_fps", "Video Fps", base.HEX) +f.camera_camera_tau_param_zoom_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_zoom_mode", "Zoom Mode", base.HEX, enums.CAMERA_TAU_PARAM_ZOOM_MODE_ENUM, nil, nil) +f.camera_camera_tau_param_zoom_scale = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_zoom_scale", "Zoom Scale", base.HEX) +f.camera_camera_tau_param_digital_filter = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_digital_filter", "Digital Filter", base.HEX) +f.camera_camera_tau_param_agc = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_agc", "Agc", base.HEX, enums.CAMERA_TAU_PARAM_AGC_AGC_TYPE_ENUM, nil, nil) +f.camera_camera_tau_param_dde = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_dde", "Dde", base.HEX) +f.camera_camera_tau_param_ace = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_ace", "Ace", base.HEX) +f.camera_camera_tau_param_sso = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_sso", "Sso", base.HEX) +f.camera_camera_tau_param_contrast = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_contrast", "Contrast", base.HEX) +f.camera_camera_tau_param_brightness = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_brightness", "Brightness", base.HEX) +f.camera_camera_tau_param_thermometric_x_axis = ProtoField.float ("dji_dumlv1.camera_camera_tau_param_thermometric_x_axis", "Thermometric X Axis", base.DEC) +f.camera_camera_tau_param_thermometric_y_axis = ProtoField.float ("dji_dumlv1.camera_camera_tau_param_thermometric_y_axis", "Thermometric Y Axis", base.DEC) +f.camera_camera_tau_param_thermometric_temp = ProtoField.float ("dji_dumlv1.camera_camera_tau_param_thermometric_temp", "Thermometric Temp", base.DEC) +f.camera_camera_tau_param_shot_count_down = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_shot_count_down", "Shot Count Down", base.HEX) +f.camera_camera_tau_param_roi_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_roi_type", "Roi Type", base.HEX, enums.CAMERA_TAU_PARAM_ROI_TYPE_ENUM, nil, nil) +f.camera_camera_tau_param_masked1f = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_masked1f", "Masked1F", base.HEX) + f.camera_camera_tau_param_isotherm_enable = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_isotherm_enable", "Isotherm Enable", base.HEX, nil, 0x01, nil) +f.camera_camera_tau_param_isotherm_unit = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_isotherm_unit", "Isotherm Unit", base.HEX) +f.camera_camera_tau_param_isotherm_lower = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_isotherm_lower", "Isotherm Lower", base.HEX) +f.camera_camera_tau_param_isotherm_middle = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_isotherm_middle", "Isotherm Middle", base.HEX) +f.camera_camera_tau_param_isotherm_upper = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_isotherm_upper", "Isotherm Upper", base.HEX) +f.camera_camera_tau_param_thermometric_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_thermometric_type", "Thermometric Type", base.HEX, enums.CAMERA_TAU_PARAM_THERMOMETRIC_TYPE_ENUM, nil, nil) +f.camera_camera_tau_param_object_control = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_object_control", "Object Control", base.HEX) +f.camera_camera_tau_param_gain_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_gain_mode", "Gain Mode", base.HEX, enums.CAMERA_TAU_PARAM_GAIN_MODE_ENUM, nil, nil) +f.camera_camera_tau_param_video_resolution = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_video_resolution", "Video Resolution", base.HEX, enums.CAMERA_TAU_PARAM_VIDEO_RESOLUTION_ENUM, nil, nil) +f.camera_camera_tau_param_len_focus_length = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_len_focus_length", "Len Focus Length", base.HEX, enums.CAMERA_TAU_PARAM_LEN_FOCUS_LENGTH_ENUM, nil, nil) +f.camera_camera_tau_param_len_fps = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_len_fps", "Len Fps", base.HEX, enums.CAMERA_TAU_PARAM_LEN_FPS_ENUM, nil, nil) +f.camera_camera_tau_param_photo_interval = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_photo_interval", "Photo Interval", base.HEX) +f.camera_camera_tau_param_unknown2e = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_unknown2e", "Unknown2E", base.HEX) +f.camera_camera_tau_param_ffc_mode = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_ffc_mode", "Ffc Mode", base.HEX, enums.CAMERA_TAU_PARAM_FFC_MODE_ENUM, nil, nil) +f.camera_camera_tau_param_masked30 = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_masked30", "Masked30", base.HEX) + f.camera_camera_tau_param_support_spot_thermometric = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_support_spot_thermometric", "Support Spot Thermometric", base.HEX, nil, 0x01, nil) + f.camera_camera_tau_param_thermometric_valid = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_thermometric_valid", "Thermometric Valid", base.HEX, nil, 0x80, nil) +f.camera_camera_tau_param_exter_param_type = ProtoField.uint8 ("dji_dumlv1.camera_camera_tau_param_exter_param_type", "Exter Param Type", base.HEX, enums.CAMERA_TAU_PARAM_EXTER_PARAM_TYPE_ENUM, nil, nil) +f.camera_camera_tau_param_target_emissivity = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_target_emissivity", "Target Emissivity", base.HEX) +f.camera_camera_tau_param_atmosphere_transmission = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_atmosphere_transmission", "Atmosphere Transmission", base.HEX) +f.camera_camera_tau_param_atmosphere_temperature = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_atmosphere_temperature", "Atmosphere Temperature", base.HEX) +f.camera_camera_tau_param_background_temperature = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_background_temperature", "Background Temperature", base.HEX) +f.camera_camera_tau_param_window_transmission = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_window_transmission", "Window Transmission", base.HEX) +f.camera_camera_tau_param_window_temperature = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_window_temperature", "Window Temperature", base.HEX) +f.camera_camera_tau_param_window_reflection = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_window_reflection", "Window Reflection", base.HEX) +f.camera_camera_tau_param_window_reflected_temperature = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_window_reflected_temperature", "Window Reflected Temperature", base.HEX) +f.camera_camera_tau_param_area_thermometric_left = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_area_thermometric_left", "Area Thermometric Left", base.HEX) +f.camera_camera_tau_param_area_thermometric_top = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_area_thermometric_top", "Area Thermometric Top", base.HEX) +f.camera_camera_tau_param_area_thermometric_right = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_area_thermometric_right", "Area Thermometric Right", base.HEX) +f.camera_camera_tau_param_area_thermometric_bottom = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_area_thermometric_bottom", "Area Thermometric Bottom", base.HEX) +f.camera_camera_tau_param_area_thermometric_average = ProtoField.float ("dji_dumlv1.camera_camera_tau_param_area_thermometric_average", "Area Thermometric Average", base.DEC) +f.camera_camera_tau_param_area_thermometric_min = ProtoField.float ("dji_dumlv1.camera_camera_tau_param_area_thermometric_min", "Area Thermometric Min", base.DEC) +f.camera_camera_tau_param_area_thermometric_max = ProtoField.float ("dji_dumlv1.camera_camera_tau_param_area_thermometric_max", "Area Thermometric Max", base.DEC) +f.camera_camera_tau_param_area_thermometric_min_x = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_area_thermometric_min_x", "Area Thermometric Min X", base.HEX) +f.camera_camera_tau_param_area_thermometric_min_y = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_area_thermometric_min_y", "Area Thermometric Min Y", base.HEX) +f.camera_camera_tau_param_area_thermometric_max_x = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_area_thermometric_max_x", "Area Thermometric Max X", base.HEX) +f.camera_camera_tau_param_area_thermometric_max_y = ProtoField.uint16 ("dji_dumlv1.camera_camera_tau_param_area_thermometric_max_y", "Area Thermometric Max Y", base.HEX) + +local function camera_camera_tau_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.camera_camera_tau_param_image_format, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_video_format, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_video_fps, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_zoom_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_zoom_scale, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_digital_filter, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_agc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_dde, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_ace, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_sso, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_contrast, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_brightness, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_thermometric_x_axis, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_tau_param_thermometric_y_axis, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_tau_param_thermometric_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_tau_param_shot_count_down, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_roi_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_masked1f, payload(offset, 1)) + subtree:add_le (f.camera_camera_tau_param_isotherm_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_isotherm_unit, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_isotherm_lower, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_isotherm_middle, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_isotherm_upper, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_thermometric_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_object_control, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_gain_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_video_resolution, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_len_focus_length, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_len_fps, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_photo_interval, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_unknown2e, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_ffc_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_masked30, payload(offset, 1)) + subtree:add_le (f.camera_camera_tau_param_support_spot_thermometric, payload(offset, 1)) + subtree:add_le (f.camera_camera_tau_param_thermometric_valid, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_exter_param_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.camera_camera_tau_param_target_emissivity, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_atmosphere_transmission, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_atmosphere_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_background_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_window_transmission, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_window_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_window_reflection, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_window_reflected_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_left, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_top, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_right, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_bottom, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_average, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_min_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_min_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_max_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.camera_camera_tau_param_area_thermometric_max_y, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 94) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera Tau Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera Tau Param: Payload size different than expected") end +end + +CAMERA_UART_CMD_DISSECT = { + [0x7c] = camera_camera_shutter_cmd_dissector, + [0x80] = camera_camera_state_info_dissector, + [0x81] = camera_camera_shot_params_dissector, + [0x82] = camera_camera_play_back_params_dissector, + [0x83] = camera_camera_chart_info_dissector, + [0x84] = camera_camera_recording_name_dissector, + [0x85] = camera_camera_raw_params_dissector, + [0x86] = camera_camera_cur_pano_file_name_dissector, + [0x87] = camera_camera_shot_info_dissector, + [0x88] = camera_camera_timelapse_parms_dissector, + [0x89] = camera_camera_tracking_status_dissector, + [0x8a] = camera_camera_fov_param_dissector, + [0xb4] = camera_camera_prepare_open_fan_dissector, + [0xb8] = camera_camera_optics_zoom_mode_dissector, + [0xc7] = camera_camera_tap_zoom_state_info_dissector, + [0xd3] = camera_camera_unknownD3_dissector, + [0xf2] = camera_camera_tau_param_dissector, +} diff --git a/dissectors/dji-dumlv1/src/dji-dumlv1-flyc.lua b/dissectors/dji-dumlv1/src/dji-dumlv1-flyc.lua new file mode 100644 index 0000000..25e4179 --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-dumlv1-flyc.lua @@ -0,0 +1,3475 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-dumlv1-flyc.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit e0c8e8594de30a75b2208d05b0765e45f2e76ccb du 11/11/2021). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- The definitions in this file are part of DJI DUMLv1 protocol dissector +-- Dissectors for command set 0x03 - Flight Control + +local f = DJI_DUMLv1_PROTO.fields +local enums = {} + +-- CMD name decode table + +FLYC_UART_CMD_TEXT = { + [0x00] = 'FlyC Scan/Test', + [0x01] = 'FlyC Status Get', + [0x02] = 'FlyC Params Get', + [0x03] = 'Origin GPS Set', + [0x04] = 'Origin GPS Get', + [0x05] = 'GPS Coordinate Get', -- Sim Command + [0x06] = 'Fly Limit Param Set', + [0x07] = 'Fly Limit Param Get', + [0x08] = 'Nofly Zone Set', -- Set Fly Forbid Area + [0x09] = 'Nofly Status Get', -- FlyC Forbid Status + [0x0A] = 'Battery Status Get', -- Nvt Battary Status + [0x0B] = 'Motor Work Status Set', + [0x0C] = 'Motor Work Status Get', + [0x0d] = 'Statistical Info Save', -- Have Checked Struct Set + [0x0e] = 'Emergency Stop', + [0x10] = 'A2 Push Commom', -- or FC Config Group Set? + [0x11] = 'Sim Rc', -- or FC Config Group Get? + --[0x10] = 'GPS Follow Mode Set', -- on newer platforms + --[0x11] = 'GPS Follow Mode Get', -- on newer platforms + --[0x12] = 'GPS Follow Coordinate Get', -- on newer platforms + [0x16] = 'Sim Status', + [0x1C] = 'Date and Time Set', + [0x1D] = 'Initialize Onboard FChannel', + [0x1E] = 'Get Onboard FChannel Output', -- Get Onboard FChannel Output Value + [0x1F] = 'Set Onboard FChannel Output', -- Set Onboard FChannel Output Value + [0x20] = 'Send GPS To Flyc', + --[0x20] = 'Groundstation On Set', -- on newer platforms + [0x21] = 'UAV Status Get', + [0x22] = 'Upload Air Route', + [0x23] = 'Download Air Route', + [0x24] = 'Upload Waypoint', + [0x25] = 'Download Waypoint', + [0x26] = 'Enable Waypoint', + [0x27] = 'Exec Fly', + --[0x27] = 'Suspend Resume Waypoint', -- on newer platforms + [0x28] = 'One Key Back', + [0x29] = 'Joystick', + [0x2A] = 'Function Control', -- sets g_real.wm610_app_command.function_command and function_command_state to 1 + [0x2B] = 'IOC Mode Type Set', -- Intelligent Orientation Control Mode + [0x2C] = 'IOC Mode Type Get', + [0x2D] = 'Limit Params Set', + [0x2E] = 'Limit Params Get', + [0x2F] = 'Battery Voltage Alarm Set', -- Set Voltage Warnning + [0x30] = 'Battery Voltage Alarm Get', -- Get Voltage Warnning + [0x31] = 'UAV Home Point Set', --AC/RC/APP + [0x32] = 'FlyC Deform Status Get', -- Push Foot Stool Status + [0x33] = 'UAV User String Set', -- Set Plane Name + [0x34] = 'UAV User String Get', -- Get Plane Name + [0x35] = 'Change Param Ping', + [0x36] = 'Request SN', + [0x37] = 'Device Info Get', + [0x38] = 'Device Info Set', + [0x39] = 'Enter Flight Data Mode', -- Switches the mode; response contains 1-byte payload - error code, 0 on success + [0x3a] = 'Ctrl Fly Data Recorder', -- ie Format the recorder + [0x3b] = 'RC Lost Action Set', -- Set Fs Action + [0x3c] = 'RC Lost Action Get', -- Get Fs Action + [0x3d] = 'Time Zone Set', -- for Recorder + [0x3e] = 'FlyC Request Limit Update', + [0x3f] = 'Set NoFly Zone Data', -- Set Fly Forbid Area Data + [0x41] = 'Upload Unlimit Areas', -- Set Whitelist Cmd + [0x42] = 'FlyC Unlimit State / UAV Posture', -- Push Unlimit Areas (WM220) / Push UAV Posture (P3X) + [0x43] = 'OSD General Data Get', + [0x44] = 'OSD Home Point Get', + [0x45] = 'FlyC GPS SNR Get', + [0x46] = 'FlyC GPS SNR Set', -- Enable GPS SNR + [0x47] = 'Enable Unlimit Areas', -- Toggle Whitelist + [0x49] = 'Push Encrypted Package', + [0x4A] = 'Push Att IMU Info', + [0x4B] = 'Push RC Stick Value', + [0x4C] = 'Push Fussed Pos Speed Data', + [0x50] = 'Imu Data Status', + [0x51] = 'FlyC Battery Status Get', -- Smart Battery Status + [0x52] = 'Smart Low Battery Actn Set', -- Set Battery Alarm Action / Low Bat Departure Cnf Cancel + [0x53] = 'FlyC Vis Avoidance Param Get', -- Push Visual Avoidance Info + [0x55] = 'FlyC Limit State Get', + [0x56] = 'FlyC LED Status Get', + [0x57] = 'GPS GLNS Info', + [0x58] = 'Push Att Stick Speed Pos Data', + [0x59] = 'Push Sdk Data', + [0x5A] = 'Push FC Data', + [0x60] = 'SVO API Transfer', + [0x61] = 'FlyC Activation Info', -- Sdk Activation Info or Request + [0x62] = 'FlyC Activation Exec', -- Sdk Activation or Activation Result + [0x63] = 'FlyC On Board Recv', + [0x64] = 'Send On Board Set', -- SDK Pure Transfer From App To MC + [0x67] = 'FlyC Power Param Get', -- Motive Power Info + [0x69] = 'RTK Switch', -- Handle App To Rtk Pack + [0x6a] = 'FlyC Avoid', -- or Battery Valid State Set? + [0x6b] = 'Recorder Data Cfg', + [0x6c] = 'FlyC RTK Location Data Get', + [0x6d] = 'Upload Hotpoint', + [0x6e] = 'Download Hotpoint', + [0x70] = 'Set Product SN', --Some licensing string check + [0x71] = 'Get Product SN', --Some licensing string check + [0x72] = 'Reset Product SN', + [0x73] = 'Set Product Id', + [0x74] = 'Get Product Id', + [0x75] = 'Write EEPROM FC0', + [0x76] = 'Read EEPROM FC0', + [0x80] = 'Navigation Mode Set', -- Mission On/Off + [0x81] = 'Mission IOC: Set Lock Yaw', + [0x82] = 'Miss. WP: Upload Mission Info', -- Set WayLine Mission Length, Upload WayPoint Mission Msg + [0x83] = 'Miss. WP: Download Mission Info', -- Download WayLine Mission Info, Download WayPoint Mission Msg + [0x84] = 'Upload Waypoint Info By Idx', -- Upload WayPoint Msg By Index + [0x85] = 'Download Waypoint Info By Idx', -- Download WayPoint Msg By Index + [0x86] = 'Mission WP: Go/Stop', -- Start Or Cancel WayLine Mission + [0x87] = 'Mission WP: Pasue/Resume', -- Pause Or Continue WayLine Mission + [0x88] = 'Push Navigation Status Info', -- FlyC WayPoint Mission Info + [0x89] = 'Push Navigation Event Info', -- FlyC WayPoint Mission Current Event + [0x8A] = 'Miss. HotPoint: Start With Info', -- Start HotPoint Mission With Info + [0x8B] = 'Miss. HotPoint: Cancel', -- Stop HotPoint Mission + [0x8C] = 'Miss. HotPoint: Pasue/Resume', -- HotPoint Mission Switch + [0x8D] = 'App Set API Sub Mode', + [0x8E] = 'App Joystick Data', + [0x8F] = 'Noe Mission pasue/resume', -- Noe Mission Pause Or Resume + [0x90] = 'Miss. Follow: Start With Info', -- Start Follow Me With Info + [0x91] = 'Miss. Follow: Cancel', -- or Stop Follow Me Mission + [0x92] = 'Miss. Follow: Pasue/Resume', -- Follow Me Mission Switch + [0x93] = 'Miss. Follow: Get Target Info', -- Send GPS Info on Target + [0x94] = 'Mission Noe: Start', + [0x95] = 'Mission Noe: Stop', + [0x96] = 'Mission HotPoint: Download', + [0x97] = 'Mission IOC: Start', + [0x98] = 'Mission IOC: Stop', + [0x99] = 'Miss. HotPoint: Set Params', -- Set Default Velocity / Speed and Direction + [0x9a] = 'Miss. HotPoint: Set Radius', + [0x9b] = 'Miss. HotPoint: Set Head', -- HotPoint Reset Camera + [0x9c] = 'Miss. WP: Set Idle Veloc', -- Set WayLine Flight Idle Value / Idle Speed + [0x9d] = 'Miss. WP: Get Idle Veloc', -- Get WayLine Flight Idle Value / Idle Speed + [0x9e] = 'App Ctrl Mission Yaw Rate', + [0x9f] = 'Miss. HotPoint: Auto Radius Ctrl', + [0xa0] = 'Send AGPS Data', + [0xa1] = 'FlyC AGPS Status Get', + [0xa2] = 'Race Drone OSD Push', + [0xa3] = 'Miss. WP: Get BreakPoint Info', + [0xa4] = 'Miss. WP: Return To Cur Line', + [0xa5] = 'App Ctrl Fly Sweep Ctrl', + [0xa6] = 'Set RKT Homepoint', + [0xaa] = 'Sbus Packet', + [0xab] = 'Ctrl Attitude Data Send', -- Set Attitude + [0xac] = 'Ctrl Taillock Data Send', -- Set Tail Lock + [0xad] = 'FlyC Install Error Get', + [0xae] = 'Cmd Handler RC App Chl Handler', + [0xaf] = 'Product Config', + [0xb0] = 'Get Battery Groups Single Info', + [0xb5] = 'FlyC Fault Inject Set', -- FIT Set Parameter / Fdi Input + [0xb6] = 'FlyC Fault Inject Get', -- Change Dev Colour + [0xb7] = 'Redundancy IMU Index Set and Get', -- RNS Set Parameter + [0xb8] = 'Redundancy Status', -- RNS Get State + [0xb9] = 'Push Redundancy Status', + [0xba] = 'Forearm LED Status Set', + [0xbb] = 'Open LED Info Get', + [0xbc] = 'Open Led Action Register', + [0xbd] = 'Open Led Action Logout', + [0xbe] = 'Open Led Action Status Set', + [0xbf] = 'Flight Push', -- Imu Cali Api Handler + [0xc6] = 'Shell Test', + [0xcd] = 'Update Nofly Area', -- Update Flyforbid Area + [0xce] = 'Push Forbid Data Infos', -- FMU Api Get Db Info + [0xcf] = 'New Nofly Area Get', -- Get New Flyforbid Area + [0xd4] = 'Additional Info Get', -- Get Moto Speed + [0xd7] = 'FlyC Flight Record Get', -- Record Log + [0xd9] = 'Process Sensor Api Data', + [0xda] = 'FlyC Detection', -- Handler Monitor Cmd Set + [0xdf] = 'Assistant Unlock Handler', + [0xe0] = 'Config Table: Get Tbl Attribute', + [0xe1] = 'Config Table: Get Item Attribute', -- returns parameter name and properties post-mavic + [0xe2] = 'Config Table: Get Item Value', + [0xe3] = 'Config Table: Set Item Value', + [0xe4] = 'Config Table: Reset Def. Item Value', + [0xe5] = 'Push Config Table: Get Tbl Attribute', + [0xe6] = 'Push Config Table: Get Item Attribute', + [0xe7] = 'Push Config Table: Set Item Param', + [0xe8] = 'Push Config Table: Clear', + [0xe9] = 'Config Command Table: Get or Exec', -- Cmd Handler/Get Attribute/Set Flyforbid Data? + [0xea] = 'Register Open Motor Error Action', + [0xeb] = 'Logout Open Motor Error Action', + [0xec] = 'Set Open Motor Error Action Status', + [0xed] = 'ESC Echo Set', + [0xee] = 'GoHome CountDown Get', -- Ost Sats Go Home Port + [0xf0] = 'Config Table: Get Param Info by Index', -- aka Update Param; returns parameter name and properties pre-mavic + [0xf1] = 'Config Table: Read Params By Index', -- aka Query Param + [0xf2] = 'Config Table: Write Params By Index', + [0xf3] = 'Config Table: Reset Default Param Val', -- Reset Params By Index/Reset Old Config Table Item Value? + [0xf4] = 'Config Table: Set Item By Index', + [0xf5] = 'Ver Phone Set', -- Set/Get Real Name Info + [0xf6] = 'Push Param PC Log', + [0xf7] = 'Config Table: Get Param Info By Hash', -- Get Old Config Table Item Info By Hash Value + [0xf8] = 'Config Table: Read Param By Hash', -- Get Single Param Value By Hash + [0xf9] = 'Config Table: Write Param By Hash', -- Set Single Param Value By Hash + [0xfa] = 'Config Table: Reset Params By Hash', -- Reset Old Config Table Item Value By Hash Value + [0xfb] = 'Config Table: Read Params By Hash', + [0xfc] = 'Config Table: Write Params By Hash', -- Request Fixed Send Old Config Table Item By Hash Value + [0xfd] = 'Product Type Get', + [0xfe] = 'Motor Force Disable Set', -- Motor Force Disable Flag By App Set + [0xff] = 'Motor Force Disable Get', +} + +-- Flight Controller - FlyC Forbid Status - 0x09 + +enums.FLYC_FORBID_STATUS_FLIGHT_LIMIT_AREA_STATE_DJI_FLIGHT_LIMIT_AREA_STATE_ENUM = { + [0x00] = 'None', + [0x01] = 'NearLimit', + [0x02] = 'InHalfLimit', + [0x03] = 'InSlowDownArea', + [0x04] = 'InnerLimit', + [0x05] = 'InnerUnLimit', + [0x64] = 'OTHER', +} + +enums.FLYC_FORBID_STATUS_DJI_FLIGHT_LIMIT_ACTION_EVENT_ENUM = { + [0x00] = 'None', + [0x01] = 'ExitLanding', + [0x02] = 'Collision', + [0x03] = 'StartLanding', + [0x04] = 'StopMotor', + [0x64] = 'OTHER', +} + +f.flyc_flyc_forbid_status_flight_limit_area_state = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_forbid_status_flight_limit_area_state", "Flight Limit Area State", base.HEX, enums.FLYC_FORBID_STATUS_FLIGHT_LIMIT_AREA_STATE_DJI_FLIGHT_LIMIT_AREA_STATE_ENUM, nil, nil) +f.flyc_flyc_forbid_status_dji_flight_limit_action_event = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_forbid_status_dji_flight_limit_action_event", "Dji Flight Limit Action Event", base.HEX, enums.FLYC_FORBID_STATUS_DJI_FLIGHT_LIMIT_ACTION_EVENT_ENUM, nil, nil) +f.flyc_flyc_forbid_status_limit_space_num = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_forbid_status_limit_space_num", "Limit Space Num", base.HEX) +f.flyc_flyc_forbid_status_unknown3 = ProtoField.bytes ("dji_dumlv1.flyc_flyc_forbid_status_unknown3", "Unknown3", base.SPACE) + +local function flyc_flyc_forbid_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_forbid_status_flight_limit_area_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_forbid_status_dji_flight_limit_action_event, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_forbid_status_limit_space_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_forbid_status_unknown3, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Forbid Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Forbid Status: Payload size different than expected") end +end + +-- Flight Controller - A2 Commom - 0x10 + +enums.FLYC_A2_COMMOM_E_DJIA2_CTRL_MODE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x06] = 'd', + [0x07] = 'e', + [0x08] = 'f', + [0x12] = 'g', +} + +f.flyc_a2_commom_a = ProtoField.uint8 ("dji_dumlv1.flyc_a2_commom_a", "A", base.HEX) +f.flyc_a2_commom_b = ProtoField.uint8 ("dji_dumlv1.flyc_a2_commom_b", "B", base.HEX) +f.flyc_a2_commom_c = ProtoField.uint32 ("dji_dumlv1.flyc_a2_commom_c", "C", base.HEX) +f.flyc_a2_commom_d = ProtoField.uint32 ("dji_dumlv1.flyc_a2_commom_d", "D", base.HEX) +f.flyc_a2_commom_control_mode = ProtoField.uint8 ("dji_dumlv1.flyc_a2_commom_control_mode", "Control Mode", base.HEX, enums.FLYC_A2_COMMOM_E_DJIA2_CTRL_MODE_ENUM, nil, nil) +f.flyc_a2_commom_f = ProtoField.uint8 ("dji_dumlv1.flyc_a2_commom_f", "F", base.HEX) + +local function flyc_a2_commom_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_a2_commom_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_a2_commom_b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_a2_commom_c, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_a2_commom_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_a2_commom_control_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_a2_commom_f, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"A2 Commom: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"A2 Commom: Payload size different than expected") end +end + +-- Flight Controller - Function Control - 0x2a +-- sets g_real.wm610_app_command.function_command to value from payload, and function_command_state to 1; does nothing if function_command_state was already non-zero +-- Checked in Ph3 FC firmware 1.08.0080 + +f.flyc_function_control_function_command = ProtoField.uint8 ("dji_dumlv1.flyc_function_control_function_command", "Function/Command", base.HEX, nil, nil, "New value of g_real.wm610_app_command.function_command") + +local function flyc_function_control_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_function_control_function_command, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Function Control: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Function Control: Payload size different than expected") end +end + +-- Flight Controller - FlyC Deform Status - 0x32 + +enums.FLYC_DEFORM_STATUS_DEFORM_STATUS_TRIPOD_STATUS_ENUM = { + [0x00] = 'UNKNOWN', + [0x01] = 'FOLD_COMPELTE', + [0x02] = 'FOLOING', + [0x03] = 'STRETCH_COMPLETE', + [0x04] = 'STRETCHING', + [0x05] = 'STOP_DEFORMATION', +} + +enums.FLYC_DEFORM_STATUS_DEFORM_MODE_ENUM = { + [0x00] = 'Pack', + [0x01] = 'Protect', + [0x02] = 'Normal', + [0x03] = 'OTHER', +} + +f.flyc_flyc_deform_status_masked00 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_deform_status_masked00", "Masked00", base.HEX) + f.flyc_flyc_deform_status_deform_protected = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_deform_status_deform_protected", "Deform Protected", base.HEX, nil, 0x01, nil) + f.flyc_flyc_deform_status_deform_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_deform_status_deform_status", "Deform Status", base.HEX, enums.FLYC_DEFORM_STATUS_DEFORM_STATUS_TRIPOD_STATUS_ENUM, 0x0e, nil) + f.flyc_flyc_deform_status_deform_mode = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_deform_status_deform_mode", "Deform Mode", base.HEX, enums.FLYC_DEFORM_STATUS_DEFORM_MODE_ENUM, 0x30, nil) + +local function flyc_flyc_deform_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_deform_status_masked00, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_deform_status_deform_protected, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_deform_status_deform_status, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_deform_status_deform_mode, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Deform Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Deform Status: Payload size different than expected") end +end + +-- Flight Controller - FlyC Request Limit Update - 0x3e + +--f.flyc_flyc_request_limit_update_unknown0 = ProtoField.none ("dji_dumlv1.flyc_flyc_request_limit_update_unknown0", "Unknown0", base.NONE) + +local function flyc_flyc_request_limit_update_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Request Limit Update: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Request Limit Update: Payload size different than expected") end +end + +-- Flight Controller - Set NoFly Zone Data - 0x3f + +-- Single transfer should include 100 entries. These entries can be divieded to up to 20 packets(fragments), in any way, as long as the total is correct. +-- First fragment should have index of 0, last one should have num_entries = 0. +-- Recognized by: P3X_FW_V01.07.0060_m0306 + +f.flyc_set_nofly_zone_data_num_entries = ProtoField.uint8 ("dji_dumlv1.flyc_set_nofly_zone_data_num_entries", "Number of entries", base.DEC, nil, nil, "Amount of entries transfeered it this packet; value of 0 means end of transfer.") +f.flyc_set_nofly_zone_data_frag_num = ProtoField.uint8 ("dji_dumlv1.flyc_set_nofly_zone_data_frag_num", "Transfer fragment index", base.DEC, nil, nil, "Fragment index, incrementing during transfer; proper values are 0-19, where 0 starts a new transfer.") +f.flyc_set_nofly_zone_data_reserved2 = ProtoField.uint8 ("dji_dumlv1.flyc_set_nofly_zone_data_reserved2", "Reserved2", base.HEX, nil, nil, "Should be zeros") + +f.flyc_nofly_zone_entry_latitude = ProtoField.uint8 ("dji_dumlv1.flyc_nofly_zone_entry_latitude", "Latitude", base.HEX) +f.flyc_nofly_zone_entry_longitude = ProtoField.uint8 ("dji_dumlv1.flyc_nofly_zone_entry_longitude", "Longitude", base.HEX) +f.flyc_nofly_zone_entry_radius = ProtoField.uint8 ("dji_dumlv1.flyc_nofly_zone_entry_radius", "Radius", base.HEX) +f.flyc_nofly_zone_entry_contry_code = ProtoField.uint8 ("dji_dumlv1.flyc_nofly_zone_entry_contry_code", "Contry Code", base.HEX) +f.flyc_nofly_zone_entry_type = ProtoField.uint8 ("dji_dumlv1.flyc_nofly_zone_entry_type", "Type", base.HEX) +f.flyc_nofly_zone_entry_id = ProtoField.uint8 ("dji_dumlv1.flyc_nofly_zone_entry_id", "Id", base.HEX) + +local function flyc_set_nofly_zone_data_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local num_entries = payload(offset,1):le_uint() + subtree:add_le (f.flyc_set_nofly_zone_data_num_entries, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_set_nofly_zone_data_frag_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_set_nofly_zone_data_reserved2, payload(offset, 3)) + offset = offset + 3 + + local num_entries = math.floor((payload:len() - 5) / 17) + + local i = 0 + while i < num_entries do + i = i + 1 + + subtree:add_le (f.flyc_nofly_zone_entry_latitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_nofly_zone_entry_longitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_nofly_zone_entry_radius, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_nofly_zone_entry_contry_code, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_nofly_zone_entry_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_nofly_zone_entry_id, payload(offset, 4)) + offset = offset + 4 + + end + + if (offset ~= 5 + 17 * num_entries) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Set NoFly Zone Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Set NoFly Zone Data: Payload size different than expected") end +end + +-- Flight Controller - FlyC Unlimit State / UAV Posture - 0x42 +-- On P3X, sent periodically by Flight Controller, contains aircraft posture. +-- Supported in: P3X_FW_V01.11.0030_m0400 (UAV Posture) + +f.flyc_flyc_unlimit_state_is_in_unlimit_area = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_unlimit_state_is_in_unlimit_area", "Is In Unlimit Area", base.HEX) +f.flyc_flyc_unlimit_state_unlimit_areas_action = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_unlimit_state_unlimit_areas_action", "Unlimit Areas Action", base.HEX) +f.flyc_flyc_unlimit_state_unlimit_areas_size = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_unlimit_state_unlimit_areas_size", "Unlimit Areas Size", base.HEX) +f.flyc_flyc_unlimit_state_unlimit_areas_enabled = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_unlimit_state_unlimit_areas_enabled", "Unlimit Areas Enabled", base.HEX) + +f.flyc_uav_posture_param0 = ProtoField.float ("dji_dumlv1.flyc_uav_posture_param0", "Param0", base.DEC, nil, nil, "Sum of squares of params 0..3 must give 1.0 for the values to be accepted") +f.flyc_uav_posture_param1 = ProtoField.float ("dji_dumlv1.flyc_uav_posture_param1", "Param1", base.DEC) +f.flyc_uav_posture_param2 = ProtoField.float ("dji_dumlv1.flyc_uav_posture_param2", "Param2", base.DEC) +f.flyc_uav_posture_param3 = ProtoField.float ("dji_dumlv1.flyc_uav_posture_param3", "Param3", base.DEC) +f.flyc_uav_posture_param4 = ProtoField.float ("dji_dumlv1.flyc_uav_posture_param4", "Param4", base.DEC) +f.flyc_uav_posture_param5 = ProtoField.float ("dji_dumlv1.flyc_uav_posture_param5", "Param5", base.DEC) +f.flyc_uav_posture_param6 = ProtoField.float ("dji_dumlv1.flyc_uav_posture_param6", "Param6", base.DEC) +f.flyc_uav_posture_param7 = ProtoField.float ("dji_dumlv1.flyc_uav_posture_param7", "Param7", base.DEC) +f.flyc_uav_posture_has8 = ProtoField.uint8 ("dji_dumlv1.flyc_uav_posture_has8", "Has8-unknown", base.HEX) +f.flyc_uav_posture_unkn21 = ProtoField.uint16 ("dji_dumlv1.flyc_uav_posture_unkn21", "Unknown21", base.HEX) + +local function flyc_flyc_unlimit_state_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (payload:len() >= 35) then -- UAV Posture + + subtree:add_le (f.flyc_uav_posture_param0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_uav_posture_param1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_uav_posture_param2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_uav_posture_param3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_uav_posture_param4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_uav_posture_param5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_uav_posture_param6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_uav_posture_param7, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_uav_posture_has8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_uav_posture_unkn21, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 35) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"UAV Posture: Offset does not match - internal inconsistency") end + else -- FlyC Unlimit State + + subtree:add_le (f.flyc_flyc_unlimit_state_is_in_unlimit_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_unlimit_state_unlimit_areas_action, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_unlimit_state_unlimit_areas_size, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_unlimit_state_unlimit_areas_enabled, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Unlimit State: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Unlimit/Posture: Payload size different than expected") end +end + +-- Flight Controller - OSD General Data - 0x43, identical to flight recorder packet 0x000c +-- HD Link - OSD General Data - 0x01 is a second use of the same packet +-- Description: TODO. +-- Supported in: WM620_FW_01.02.0300 + +enums.FLYC_OSD_GENERAL_FLYC_STATE_ENUM = { + [0x00] = 'Manual', + [0x01] = 'Atti', + [0x02] = 'Atti_CL', + [0x03] = 'Atti_Hover', + [0x04] = 'Hover', + [0x05] = 'GPS_Blake', + [0x06] = 'GPS_Atti', + [0x07] = 'GPS_CL', + [0x08] = 'GPS_HomeLock', + [0x09] = 'GPS_HotPoint', + [0x0a] = 'AssitedTakeoff', + [0x0b] = 'AutoTakeoff', + [0x0c] = 'AutoLanding', + [0x0d] = 'AttiLangding', + [0x0e] = 'NaviGo', + [0x0f] = 'GoHome', + [0x10] = 'ClickGo', + [0x11] = 'Joystick', + [0x17] = 'Atti_Limited', + [0x18] = 'GPS_Atti_Limited', + [0x19] = 'NaviMissionFollow', + [0x1a] = 'NaviSubMode_Tracking', + [0x1b] = 'NaviSubMode_Pointing', + [0x1c] = 'PANO', + [0x1d] = 'Farming', + [0x1e] = 'FPV', + [0x1f] = 'SPORT', + [0x20] = 'NOVICE', + [0x21] = 'FORCE_LANDING', + [0x23] = 'TERRAIN_TRACKING', + [0x24] = 'NAVI_ADV_GOHOME', + [0x25] = 'NAVI_ADV_LANDING', + [0x26] = 'TRIPOD_GPS', + [0x27] = 'TRACK_HEADLOCK', + [0x29] = 'ENGINE_START', + [0x2b] = 'GENTLE_GPS', + [0x64] = 'OTHER', +} + +enums.FLYC_OSD_GENERAL_COMMAND_ENUM = { + [0x01] = 'AUTO_FLY', + [0x02] = 'AUTO_LANDING', + [0x03] = 'HOMEPOINT_NOW', + [0x04] = 'HOMEPOINT_HOT', + [0x05] = 'HOMEPOINT_LOC', + [0x06] = 'GOHOME', + [0x07] = 'START_MOTOR', + [0x08] = 'STOP_MOTOR', + [0x09] = 'Calibration', + [0x0a] = 'DeformProtecClose', + [0x0b] = 'DeformProtecOpen', + [0x0c] = 'DropGohome', + [0x0d] = 'DropTakeOff', + [0x0e] = 'DropLanding', + [0x0f] = 'DynamicHomePointOpen', + [0x10] = 'DynamicHomePointClose', + [0x11] = 'FollowFunctioonOpen', + [0x12] = 'FollowFunctionClose', + [0x13] = 'IOCOpen', + [0x14] = 'IOCClose', + [0x15] = 'DropCalibration', + [0x16] = 'PackMode', + [0x17] = 'UnPackMode', + [0x18] = 'EnterManaualMode', + [0x19] = 'StopDeform', + [0x1c] = 'DownDeform', + [0x1d] = 'UpDeform', + [0x1e] = 'ForceLanding', + [0x1f] = 'ForceLanding2', + [0x64] = 'OTHER', +} + +enums.FLYC_OSD_GENERAL_GOHOME_STATE_ENUM = { + [0x00] = 'STANDBY', + [0x01] = 'PREASCENDING', + [0x02] = 'ALIGN', + [0x03] = 'ASCENDING', + [0x04] = 'CRUISE', + [0x05] = 'BRAKING', + [0x06] = 'BYPASSING', + [0x07] = 'OTHER', +} + +enums.FLYC_OSD_GENERAL_MODE_CHANNEL_RC_MODE_CHANNEL_ENUM = { + [0x00] = 'CHANNEL_MANUAL', + [0x01] = 'CHANNEL_A', + [0x02] = 'CHANNEL_P', + [0x03] = 'CHANNEL_NAV', + [0x04] = 'CHANNEL_FPV', + [0x05] = 'CHANNEL_FARM', + [0x06] = 'CHANNEL_S', + [0x07] = 'CHANNEL_F', + [0xff] = 'CHANNEL_UNKNOWN', +} + +enums.FLYC_OSD_GENERAL_BATT_TYPE_ENUM = { + [0x00] = 'Unknown', + [0x01] = 'NonSmart', + [0x02] = 'Smart', +} + +enums.FLYC_OSD_GENERAL_GOHOME_REASON_ENUM = { + [0x00] = 'NONE', + [0x01] = 'WARNING_POWER_GOHOME', + [0x02] = 'WARNING_POWER_LANDING', + [0x03] = 'SMART_POWER_GOHOME', + [0x04] = 'SMART_POWER_LANDING', + [0x05] = 'LOW_VOLTAGE_LANDING', + [0x06] = 'LOW_VOLTAGE_GOHOME', + [0x07] = 'SERIOUS_LOW_VOLTAGE_LANDING', + [0x08] = 'RC_ONEKEY_GOHOME', + [0x09] = 'RC_ASSISTANT_TAKEOFF', + [0x0a] = 'RC_AUTO_TAKEOFF', + [0x0b] = 'RC_AUTO_LANDING', + [0x0c] = 'APP_AUTO_GOHOME', + [0x0d] = 'APP_AUTO_LANDING', + [0x0e] = 'APP_AUTO_TAKEOFF', + [0x0f] = 'OUTOF_CONTROL_GOHOME', + [0x10] = 'API_AUTO_TAKEOFF', + [0x11] = 'API_AUTO_LANDING', + [0x12] = 'API_AUTO_GOHOME', + [0x13] = 'AVOID_GROUND_LANDING', + [0x14] = 'AIRPORT_AVOID_LANDING', + [0x15] = 'TOO_CLOSE_GOHOME_LANDING', + [0x16] = 'TOO_FAR_GOHOME_LANDING', + [0x17] = 'APP_WP_MISSION', + [0x18] = 'WP_AUTO_TAKEOFF', + [0x19] = 'GOHOME_AVOID', + [0x1a] = 'GOHOME_FINISH', + [0x1b] = 'VERT_LOW_LIMIT_LANDING', + [0x1c] = 'BATTERY_FORCE_LANDING', + [0x1d] = 'MC_PROTECT_GOHOME', +} + +enums.FLYC_OSD_GENERAL_GPS_STATE_ENUM = { + [0x00] = 'ALREADY', + [0x01] = 'FORBIN', + [0x02] = 'GPSNUM_NONENOUGH', + [0x03] = 'GPS_HDOP_LARGE', + [0x04] = 'GPS_POSITION_NONMATCH', + [0x05] = 'SPEED_ERROR_LARGE', + [0x06] = 'YAW_ERROR_LARGE', + [0x07] = 'COMPASS_ERROR_LARGE', + [0x08] = 'UNKNOWN', +} + +enums.FLYC_OSD_GENERAL_PRODUCT_TYPE_ENUM = { + [0x00] = 'Unknown', + [0x01] = 'Inspire', + [0x02] = 'P3S/P3X', + [0x03] = 'P3X', + [0x04] = 'P3C', + [0x05] = 'OpenFrame', + [0x06] = 'ACEONE', + [0x07] = 'WKM', + [0x08] = 'NAZA', + [0x09] = 'A2', + [0x0a] = 'A3', + [0x0b] = 'P4', + [0x0e] = 'PM820', + [0x0f] = 'P34K', + [0x10] = 'wm220', + [0x11] = 'Orange2', + [0x12] = 'Pomato', + [0x14] = 'N3', + [0x17] = 'PM820PRO', + [0xff] = 'NoFlyc', + [0x64] = 'None', +} + +enums.FLYC_OSD_GENERAL_IMU_INIT_FAIL_RESON_ENUM = { + [0x00] = 'None/MonitorError', + [0x01] = 'ColletingData', + [0x02] = 'GyroDead', + [0x03] = 'AcceDead', + [0x04] = 'CompassDead', + [0x05] = 'BarometerDead', + [0x06] = 'BarometerNegative', + [0x07] = 'CompassModTooLarge', + [0x08] = 'GyroBiasTooLarge', + [0x09] = 'AcceBiasTooLarge', + [0x0a] = 'CompassNoiseTooLarge', + [0x0b] = 'BarometerNoiseTooLarge', + [0x0c] = 'WaitingMcStationary', + [0x0d] = 'AcceMoveTooLarge', + [0x0e] = 'McHeaderMoved', + [0x0f] = 'McVirbrated', + [0x64] = 'None', +} + +enums.FLYC_OSD_GENERAL_START_FAIL_REASON_ENUM = { + [0x00] = 'None/Allow start', + [0x01] = 'Compass error', + [0x02] = 'Assistant protected', + [0x03] = 'Device lock protect', + [0x04] = 'Off radius limit landed', + [0x05] = 'IMU need adv-calib', + [0x06] = 'IMU SN error', + [0x07] = 'Temperature cal not ready', + [0x08] = 'Compass calibration in progress', + [0x09] = 'Attitude error', + [0x0a] = 'Novice mode without gps', + [0x0b] = 'Battery cell error stop motor', + [0x0c] = 'Battery communite error stop motor', + [0x0d] = 'Battery voltage very low stop motor', + [0x0e] = 'Battery below user low land level stop motor', + [0x0f] = 'Battery main vol low stop motor', + [0x10] = 'Battery temp and vol low stop motor', + [0x11] = 'Battery smart low land stop motor', + [0x12] = 'Battery not ready stop motor', + [0x13] = 'May run simulator', + [0x14] = 'Gear pack mode', + [0x15] = 'Atti limit', + [0x16] = 'Product not activation, stop motor', + [0x17] = 'In fly limit area, need stop motor', + [0x18] = 'Bias limit', + [0x19] = 'ESC error', + [0x1a] = 'IMU is initing', + [0x1b] = 'System upgrade, stop motor', + [0x1c] = 'Have run simulator, please restart', + [0x1d] = 'IMU cali in progress', + [0x1e] = 'Too large tilt angle when auto take off, stop motor', + [0x1f] = 'Gyroscope is stuck', + [0x20] = 'Accel is stuck', + [0x21] = 'Compass is stuck', + [0x22] = 'Pressure sensor is stuck', + [0x23] = 'Pressure read is negative', + [0x24] = 'Compass mod is huge', + [0x25] = 'Gyro bias is large', + [0x26] = 'Accel bias is large', + [0x27] = 'Compass noise is large', + [0x28] = 'Pressure noise is large', + [0x29] = 'SN invalid', + [0x2a] = 'Pressure slope is large', + [0x2b] = 'Ahrs error is large', + [0x2c] = 'Flash operating', + [0x2d] = 'GPS disconnect', + [0x2e] = 'Out of whitelist area', + [0x2f] = 'SD Card Exception', + [0x3d] = 'IMU No connection', + [0x3e] = 'RC Calibration', + [0x3f] = 'RC Calibration Exception', + [0x40] = 'RC Calibration Unfinished', + [0x41] = 'RC Calibration Exception2', + [0x42] = 'RC Calibration Exception3', + [0x43] = 'Aircraft Type Mismatch', + [0x44] = 'Found Unfinished Module', + [0x46] = 'Cyro Abnormal', + [0x47] = 'Baro Abnormal', + [0x48] = 'Compass Abnormal', + [0x49] = 'GPS Abnormal', + [0x4a] = 'NS Abnormal', + [0x4b] = 'Topology Abnormal', + [0x4c] = 'RC Need Cali', + [0x4d] = 'Invalid Float', + [0x4e] = 'M600 Bat Too Little', + [0x4f] = 'M600 Bat Auth Err', + [0x50] = 'M600 Bat Comm Err', + [0x51] = 'M600 Bat Dif Volt Large 1', + [0x52] = 'M600 Bat Dif Volt Large 2', + [0x53] = 'Invalid Version', + [0x54] = 'Gimbal Gyro Abnormal', + [0x55] = 'Gimbal ESC Pitch Non Data', + [0x56] = 'Gimbal ESC Roll No Data', + [0x57] = 'Gimbal ESC Yaw No Data', + [0x58] = 'Gimbal Firm Is Updating', + [0x59] = 'Gimbal Disorder', + [0x5a] = 'Gimbal Pitch Shock', + [0x5b] = 'Gimbal Roll Shock', + [0x5c] = 'Gimbal Yaw Shock', + [0x5d] = 'IMU Calibration Finished', + [0x5e] = 'Takeoff Exception', + [0x5f] = 'Esc Stall Near Ground', + [0x60] = 'Esc Unbalance On Grd', + [0x61] = 'Esc Part Empty On Grd', + [0x62] = 'Engine Start Failed', + [0x63] = 'Auto Takeoff Lanch Failed', + [0x64] = 'Roll Over On Grd', + [0x65] = 'Bat Version Error', + [0x66] = 'RTK Bad Signal', + [0x67] = 'RTK Deviation Error', + [0x70] = 'Esc Calibrating', + [0x71] = 'Gps Sign_invalid', + [0x72] = 'Gimbal Is Calibrating', + [0x73] = 'Lock By App', + [0x74] = 'Start Fly Height Error', + [0x75] = 'Esc Version Not Match', + [0x76] = 'Imu Ori Not Match', + [0x77] = 'Stop By App', + [0x78] = 'Compass Imu Ori Not Match', + [0x100]= 'Other', +} + +enums.FLYC_OSD_GENERAL_SDK_CTRL_DEVICE_ENUM = { + [0x00] = 'RC', + [0x01] = 'APP', + [0x02] = 'ONBOARD_DEVICE', + [0x03] = 'CAMERA', + [0x80] = 'OTHER', +} + +f.flyc_osd_general_longtitude = ProtoField.double ("dji_dumlv1.flyc_osd_general_longtitude", "Longtitude", base.DEC) +f.flyc_osd_general_latitude = ProtoField.double ("dji_dumlv1.flyc_osd_general_latitude", "Latitude", base.DEC) +f.flyc_osd_general_relative_height = ProtoField.int16 ("dji_dumlv1.flyc_osd_general_relative_height", "Relative Height", base.DEC, nil, nil, "0.1m, altitude to ground") +f.flyc_osd_general_vgx = ProtoField.int16 ("dji_dumlv1.flyc_osd_general_vgx", "Vgx speed", base.DEC, nil, nil, "0.1m/s, to ground") +f.flyc_osd_general_vgy = ProtoField.int16 ("dji_dumlv1.flyc_osd_general_vgy", "Vgy speed", base.DEC, nil, nil, "0.1m/s, to ground") +f.flyc_osd_general_vgz = ProtoField.int16 ("dji_dumlv1.flyc_osd_general_vgz", "Vgz speed", base.DEC, nil, nil, "0.1m/s, to ground") +f.flyc_osd_general_pitch = ProtoField.int16 ("dji_dumlv1.flyc_osd_general_pitch", "Pitch", base.DEC, nil, nil, "0.1") +f.flyc_osd_general_roll = ProtoField.int16 ("dji_dumlv1.flyc_osd_general_roll", "Roll", base.DEC) +f.flyc_osd_general_yaw = ProtoField.int16 ("dji_dumlv1.flyc_osd_general_yaw", "Yaw", base.DEC) +f.flyc_osd_general_ctrl_info = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_ctrl_info", "Control Info", base.HEX) + f.flyc_osd_general_flyc_state = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_flyc_state", "FC State", base.HEX, enums.FLYC_OSD_GENERAL_FLYC_STATE_ENUM, 0x7F, "Flight Controller state1") + f.flyc_osd_general_no_rc_state = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_no_rc_state", "No RC State Received", base.HEX, nil, 0x80, nil) +f.flyc_osd_general_latest_cmd = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_latest_cmd", "Latest App Cmd", base.HEX, enums.FLYC_OSD_GENERAL_COMMAND_ENUM, nil, "controller exccute lastest cmd") +f.flyc_osd_general_controller_state = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_controller_state", "Controller State", base.HEX, nil, nil, "Flight Controller state flags") + f.flyc_osd_general_e_can_ioc_work = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_can_ioc_work", "E Can IOC Work", base.HEX, nil, 0x01, nil) + f.flyc_osd_general_e_on_ground = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_on_ground", "E On Ground", base.HEX, nil, 0x02, nil) + f.flyc_osd_general_e_in_air = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_in_air", "E In Air", base.HEX, nil, 0x04, nil) + f.flyc_osd_general_e_motor_on = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_motor_on", "E Motor On", base.HEX, nil, 0x08, "Force allow start motors ignoring errors") + f.flyc_osd_general_e_usonic_on = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_usonic_on", "E Usonic On", base.HEX, nil, 0x10, "Ultrasonic wave sonar in use") + f.flyc_osd_general_e_gohome_state = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_gohome_state", "E Gohome State", base.HEX, enums.FLYC_OSD_GENERAL_GOHOME_STATE_ENUM, 0xe0, nil) + f.flyc_osd_general_e_mvo_used = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_mvo_used", "E MVO Used", base.HEX, nil, 0x100, "Monocular Visual Odometry is used as horizonal velocity sensor") + f.flyc_osd_general_e_battery_req_gohome = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_battery_req_gohome", "E Battery Req Gohome", base.HEX, nil, 0x200, nil) + f.flyc_osd_general_e_battery_req_land = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_battery_req_land", "E Battery Req Land", base.HEX, nil, 0x400, "Landing required due to battery voltage low") + f.flyc_osd_general_e_still_heating = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_still_heating", "E Still Heating", base.HEX, nil, 0x1000, "IMU Preheating") + f.flyc_osd_general_e_rc_state = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_rc_state", "E RC Mode Channel", base.HEX, enums.FLYC_OSD_GENERAL_MODE_CHANNEL_RC_MODE_CHANNEL_ENUM, 0x6000, nil) + f.flyc_osd_general_e_gps_used = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_gps_used", "E GPS Used", base.HEX, nil, 0x8000, "Satellite Positioning System is used as horizonal velocity sensor") + f.flyc_osd_general_e_compass_over_range = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_compass_over_range", "E Compass Over Range", base.HEX, nil, 0x10000, nil) + f.flyc_osd_general_e_wave_err = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_wave_err", "E Wave Error", base.HEX, nil, 0x20000, "Ultrasonic sensor error") + f.flyc_osd_general_e_gps_level = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_gps_level", "E GPS Level", base.HEX, nil, 0x3C0000, "Satellite Positioning System signal level") + f.flyc_osd_general_e_battery_type = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_battery_type", "E Battery Type", base.HEX, enums.FLYC_OSD_GENERAL_BATT_TYPE_ENUM, 0xC00000, nil) + f.flyc_osd_general_e_accel_over_range = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_accel_over_range", "E Acceletor Over Range", base.HEX, nil, 0x1000000, nil) + f.flyc_osd_general_e_is_vibrating = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_is_vibrating", "E Is Vibrating", base.HEX, nil, 0x2000000, nil) + f.flyc_osd_general_e_press_err = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_press_err", "E Press Err", base.HEX, nil, 0x4000000, "Barometer error") + f.flyc_osd_general_e_esc_stall = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_esc_stall", "E ESC is stall", base.HEX, nil, 0x8000000, "ESC reports motor blocked") + f.flyc_osd_general_e_esc_empty = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_esc_empty", "E ESC is empty", base.HEX, nil, 0x10000000, "ESC reports not enough force") + f.flyc_osd_general_e_propeller_catapult = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_propeller_catapult", "E Propeller Catapult", base.HEX, nil, 0x20000000, nil) + f.flyc_osd_general_e_gohome_height_mod = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_gohome_height_mod", "E GoHome Height Mod", base.HEX, nil, 0x40000000, "Go Home Height is Modified") + f.flyc_osd_general_e_out_of_limit = ProtoField.uint32 ("dji_dumlv1.flyc_osd_general_e_out_of_limit", "E Is Out Of Limit", base.HEX, nil, 0x80000000, nil) +f.flyc_osd_general_gps_nums = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_gps_nums", "Gps Nums", base.DEC, nil, nil, "Number of Global Nav System positioning satellites") +f.flyc_osd_general_gohome_landing_reason = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_gohome_landing_reason", "Gohome or Landing Reason", base.HEX, enums.FLYC_OSD_GENERAL_GOHOME_REASON_ENUM, nil, "Reason for automatic GoHome or Landing") +f.flyc_osd_general_start_fail_state = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_start_fail_state", "Motor Start Failure State", base.HEX) + f.flyc_osd_general_start_fail_reason = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_start_fail_reason", "Motor Start Fail Reason", base.HEX, enums.FLYC_OSD_GENERAL_START_FAIL_REASON_ENUM, 0x7f, "Reason for failure to start motors") + f.flyc_osd_common_start_fail_happened = ProtoField.uint8 ("dji_dumlv1.flyc_osd_common_start_fail_happened", "Motor Start Fail Happened", base.HEX, nil, 0x80, nil) +f.flyc_osd_general_controller_state_ext = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_controller_state_ext", "Controller State Ext", base.HEX) + f.flyc_osd_general_e_gps_state = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_e_gps_state", "E Gps State", base.HEX, enums.FLYC_OSD_GENERAL_GPS_STATE_ENUM, 0x0f, "Cause of not being able to switch to GPS mode") + f.flyc_osd_general_e_wp_limit_md = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_e_wp_limit_md", "E Wp Limit Mode", base.HEX, nil, 0x10, "Waypoint Limit Mode") +f.flyc_osd_general_batt_remain = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_batt_remain", "Battery Remain", base.DEC, nil, nil, "Battery Remaining Capacity") +f.flyc_osd_general_ultrasonic_height = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_ultrasonic_height", "Ultrasonic Height", base.DEC, nil, nil, "Height as reported by ultrasonic wave sensor") +f.flyc_osd_general_motor_startup_time = ProtoField.uint16 ("dji_dumlv1.flyc_osd_general_motor_startup_time", "Motor Started Time", base.DEC, nil, nil, "aka Fly Time") +f.flyc_osd_general_motor_startup_times = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_motor_startup_times", "Motor Starts Count", base.DEC, nil, nil, "aka Motor Revolution") +f.flyc_osd_general_bat_alarm1 = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_bat_alarm1", "Bat Alarm1", base.HEX) + f.flyc_osd_general_bat_alarm1_ve = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_bat_alarm1_ve", "Alarm Level 1 Voltage", base.DEC, nil, 0x7F) + f.flyc_osd_general_bat_alarm1_fn = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_bat_alarm1_fn", "Alarm Level 1 Function", base.DEC, nil, 0x80) +f.flyc_osd_general_bat_alarm2 = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_bat_alarm2", "Bat Alarm2", base.HEX) + f.flyc_osd_general_bat_alarm2_ve = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_bat_alarm2_ve", "Alarm Level 2 Voltage", base.DEC, nil, 0x7F) + f.flyc_osd_general_bat_alarm2_fn = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_bat_alarm2_fn", "Alarm Level 2 Function", base.DEC, nil, 0x80) +f.flyc_osd_general_version_match = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_version_match", "Version Match", base.HEX, nil, nil, "Flight Controller version") +f.flyc_osd_general_product_type = ProtoField.uint8 ("dji_dumlv1.flyc_osd_general_product_type", "Product Type", base.HEX, enums.FLYC_OSD_GENERAL_PRODUCT_TYPE_ENUM) +f.flyc_osd_general_imu_init_fail_reson = ProtoField.int8 ("dji_dumlv1.flyc_osd_general_imu_init_fail_reson", "IMU init Fail Reason", base.DEC, enums.FLYC_OSD_GENERAL_IMU_INIT_FAIL_RESON_ENUM) +-- Non existing in P3 packets, exist in WM620_FW_01.02.0300 +f.flyc_osd_common_motor_fail_reason = ProtoField.uint8 ("dji_dumlv1.flyc_osd_common_motor_fail_reason", "Motor Fail Reason", base.HEX, enums.FLYC_OSD_GENERAL_START_FAIL_REASON_ENUM, nil, nil) +f.flyc_osd_common_motor_start_cause_no_start_action = ProtoField.uint8 ("dji_dumlv1.flyc_osd_common_motor_start_cause_no_start_action", "Motor Start Cause No Start Action", base.HEX, enums.FLYC_OSD_GENERAL_START_FAIL_REASON_ENUM) +f.flyc_osd_common_sdk_ctrl_device = ProtoField.uint8 ("dji_dumlv1.flyc_osd_common_sdk_ctrl_device", "Sdk Ctrl Device", base.HEX, enums.FLYC_OSD_GENERAL_SDK_CTRL_DEVICE_ENUM, nil, nil) +f.flyc_osd_common_unknown35 = ProtoField.uint16 ("dji_dumlv1.flyc_osd_common_unknown35", "Unknown35", base.HEX, nil, nil, nil) + +local function flyc_osd_general_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_osd_general_longtitude, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.flyc_osd_general_latitude, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.flyc_osd_general_relative_height, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_general_vgx, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_general_vgy, payload(offset, 2)) -- offset = 20 + offset = offset + 2 + + subtree:add_le (f.flyc_osd_general_vgz, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_general_pitch, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_general_roll, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_general_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_general_ctrl_info, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_flyc_state, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_no_rc_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_latest_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_controller_state, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_can_ioc_work, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_on_ground, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_in_air, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_motor_on, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_usonic_on, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_gohome_state, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_mvo_used, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_battery_req_gohome, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_battery_req_land, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_still_heating, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_rc_state, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_gps_used, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_compass_over_range, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_wave_err, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_gps_level, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_battery_type, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_accel_over_range, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_is_vibrating, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_press_err, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_esc_stall, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_esc_empty, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_propeller_catapult, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_gohome_height_mod, payload(offset, 4)) + subtree:add_le (f.flyc_osd_general_e_out_of_limit, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_osd_general_gps_nums, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_gohome_landing_reason, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_start_fail_state, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_start_fail_reason, payload(offset, 1)) + subtree:add_le (f.flyc_osd_common_start_fail_happened, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_controller_state_ext, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_e_gps_state, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_e_wp_limit_md, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_batt_remain, payload(offset, 1)) -- offset = 40 + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_ultrasonic_height, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_motor_startup_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_general_motor_startup_times, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_bat_alarm1, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_bat_alarm1_ve, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_bat_alarm1_fn, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_bat_alarm2, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_bat_alarm2_ve, payload(offset, 1)) + subtree:add_le (f.flyc_osd_general_bat_alarm2_fn, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_version_match, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_product_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_general_imu_init_fail_reson, payload(offset, 1)) + offset = offset + 1 + + -- On P3X, packet ends here + -- On WM620, there are additional 5 bytes + if (payload:len() >= offset + 5) then + + subtree:add_le (f.flyc_osd_common_motor_fail_reason, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_common_motor_start_cause_no_start_action, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_common_sdk_ctrl_device, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_common_unknown35, payload(offset, 2)) + offset = offset + 2 + + end + + if (offset ~= 50) and (offset ~= 55) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"OSD General Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"OSD General Data: Payload size different than expected") end +end + +-- Flight Controller - OSD Home Point - 0x44, identical to flight recorder packet 0x000d +-- HD Link - HDLnk Push OSD Home Point - 0x02 is a second use of the same packet + +enums.FLYC_OSD_HOME_IOC_MODE_ENUM = { + [0x01] = 'CourseLock', + [0x02] = 'HomeLock', + [0x03] = 'HotspotSurround', + [0x64] = 'OTHER', +} + +enums.FLYC_OSD_HOME_HEIGHT_LIMIT_STATUS_ENUM = { + [0x00] = 'NON_LIMIT', + [0x01] = 'NON_GPS', + [0x02] = 'ORIENTATION_NEED_CALI', + [0x03] = 'ORIENTATION_GO', + [0x04] = 'AVOID_GROUND', + [0x05] = 'NORMAL_LIMIT', +} + +f.flyc_osd_home_point_osd_lon = ProtoField.double ("dji_dumlv1.flyc_osd_home_point_osd_lon", "OSD Longitude", base.DEC) -- home point coords? +f.flyc_osd_home_point_osd_lat = ProtoField.double ("dji_dumlv1.flyc_osd_home_point_osd_lat", "OSD Latitude", base.DEC) -- home point coords? +f.flyc_osd_home_point_osd_alt = ProtoField.float ("dji_dumlv1.flyc_osd_home_point_osd_alt", "OSD Altitude", base.DEC, nil, nil, "0.1m, altitude") +f.flyc_osd_home_point_osd_home_state = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_osd_home_state", "OSD Home State", base.HEX) + f.flyc_osd_home_point_e_homepoint_set = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_homepoint_set", "E Homepoint Set", base.HEX, nil, 0x01, "Is Home Point Recorded") + f.flyc_osd_home_point_e_go_home_mode = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_go_home_mode", "E Go Home Mode", base.HEX, nil, 0x02, nil) + f.flyc_osd_home_point_e_heading = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_heading", "E Heading", base.HEX, nil, 0x04, "Aircraft Head Direction") + f.flyc_osd_home_point_e_is_dyn_homepoint = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_is_dyn_homepoint", "E Is Dyn Homepoint", base.HEX, nil, 0x08, "Dynamic Home Piont Enable") + f.flyc_osd_home_point_e_reach_limit_distance = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_reach_limit_distance", "E Reach Limit Distance", base.HEX, nil, 0x10, nil) + f.flyc_osd_home_point_e_reach_limit_height = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_reach_limit_height", "E Reach Limit Height", base.HEX, nil, 0x20, nil) + f.flyc_osd_home_point_e_multiple_mode_open = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_multiple_mode_open", "E Multiple Mode Open", base.HEX, nil, 0x40, nil) + f.flyc_osd_home_point_e_has_go_home = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_has_go_home", "E Has Go Home", base.HEX, nil, 0x80, nil) + f.flyc_osd_home_point_e_compass_cele_status = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_compass_cele_status", "E Compass Cele Status", base.HEX, nil, 0x300, nil) + f.flyc_osd_home_point_e_compass_celeing = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_compass_celeing", "E Compass Celeing", base.HEX, nil, 0x400, nil) + f.flyc_osd_home_point_e_beginner_mode = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_beginner_mode", "E Beginner Mode", base.HEX, nil, 0x800, nil) + f.flyc_osd_home_point_e_ioc_enable = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_ioc_enable", "E Ioc Enable", base.HEX, nil, 0x1000, nil) + f.flyc_osd_home_point_e_ioc_mode = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_e_ioc_mode", "E Ioc Mode", base.HEX, enums.FLYC_OSD_HOME_IOC_MODE_ENUM, 0xe000, nil) +f.flyc_osd_home_point_go_home_height = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_go_home_height", "Go Home Height", base.DEC, nil, nil, "aka Fixed Altitude") +f.flyc_osd_home_point_course_lock_angle = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_course_lock_angle", "Course Lock Angle", base.DEC, nil, nil, "Course Lock Torsion") +f.flyc_osd_home_point_data_recorder_status = ProtoField.uint8 ("dji_dumlv1.flyc_osd_home_point_data_recorder_status", "Data Recorder Status", base.HEX) +f.flyc_osd_home_point_data_recorder_remain_capacity = ProtoField.uint8 ("dji_dumlv1.flyc_osd_home_point_data_recorder_remain_capacity", "Data Recorder Remain Capacity", base.HEX) +f.flyc_osd_home_point_data_recorder_remain_time = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_data_recorder_remain_time", "Data Recorder Remain Time", base.HEX) +f.flyc_osd_home_point_cur_data_recorder_file_index = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_cur_data_recorder_file_index", "Cur Data Recorder File Index", base.HEX) +-- Version of the packet from newer firmwares, 34 bytes long +f.flyc_osd_home_point_ver1_masked20 = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_ver1_masked20", "Masked20", base.HEX) + f.flyc_osd_home_point_ver1_flyc_in_simulation_mode = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_ver1_flyc_in_simulation_mode", "FlyC In Simulation Mode", base.HEX, nil, 0x01, nil) + f.flyc_osd_home_point_ver1_flyc_in_navigation_mode = ProtoField.uint16 ("dji_dumlv1.flyc_osd_home_point_ver1_flyc_in_navigation_mode", "FlyC In Navigation Mode", base.HEX, nil, 0x02, nil) +-- Version of the packet from older firmwares, 68 bytes long +f.flyc_osd_home_point_masked20 = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_masked20", "Masked20", base.HEX) + f.flyc_osd_home_point_flyc_in_simulation_mode = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_flyc_in_simulation_mode", "FlyC In Simulation Mode", base.HEX, nil, 0x01, nil) + f.flyc_osd_home_point_flyc_in_navigation_mode = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_flyc_in_navigation_mode", "FlyC In Navigation Mode", base.HEX, nil, 0x02, nil) + f.flyc_osd_home_point_wing_broken = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_wing_broken", "Wing Broken", base.HEX, nil, 0x1000, nil) + f.flyc_osd_home_point_big_gale = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_big_gale", "Big Gale", base.HEX, nil, 0x4000, nil) + f.flyc_osd_home_point_big_gale_warning = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_big_gale_warning", "Big Gale Warning", base.HEX, nil, 0x100000, nil) + f.flyc_osd_home_point_compass_install_err = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_compass_install_err", "Compass Install Err", base.HEX, nil, 0x800000, nil) + f.flyc_osd_home_point_height_limit_status = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_height_limit_status", "Height Limit Status", base.HEX, enums.FLYC_OSD_HOME_HEIGHT_LIMIT_STATUS_ENUM, 0x1f000000, nil) + f.flyc_osd_home_point_use_absolute_height = ProtoField.uint32 ("dji_dumlv1.flyc_osd_home_point_use_absolute_height", "Use Absolute Height", base.HEX, nil, 0x20000000, nil) +f.flyc_osd_home_point_height_limit_value = ProtoField.float ("dji_dumlv1.flyc_osd_home_point_height_limit_value", "Height Limit Value", base.DEC) +f.flyc_osd_home_point_unknown28 = ProtoField.bytes ("dji_dumlv1.flyc_osd_home_point_unknown28", "Unknown28", base.SPACE) +f.flyc_osd_home_point_force_landing_height = ProtoField.uint8 ("dji_dumlv1.flyc_osd_home_point_force_landing_height", "Force Landing Height", base.DEC) +f.flyc_osd_home_point_unknown2E = ProtoField.bytes ("dji_dumlv1.flyc_osd_home_point_unknown2E", "Unknown2E", base.SPACE) + +local function flyc_osd_home_point_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_osd_home_point_osd_lon, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.flyc_osd_home_point_osd_lat, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.flyc_osd_home_point_osd_alt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_osd_home_point_osd_home_state, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_homepoint_set, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_go_home_mode, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_heading, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_is_dyn_homepoint, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_reach_limit_distance, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_reach_limit_height, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_multiple_mode_open, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_has_go_home, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_compass_cele_status, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_compass_celeing, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_beginner_mode, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_ioc_enable, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_e_ioc_mode, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_home_point_go_home_height, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_home_point_course_lock_angle, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_home_point_data_recorder_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_home_point_data_recorder_remain_capacity, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_home_point_data_recorder_remain_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_osd_home_point_cur_data_recorder_file_index, payload(offset, 2)) + offset = offset + 2 + + -- Before firmware P3X_FW_V01.07.0060, the packet was 68 bytes long + if (payload:len() < 68) then + + subtree:add_le (f.flyc_osd_home_point_ver1_masked20, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_ver1_flyc_in_simulation_mode, payload(offset, 2)) + subtree:add_le (f.flyc_osd_home_point_ver1_flyc_in_navigation_mode, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 34) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"OSD Home Point: Offset does not match - internal inconsistency") end + + else + + subtree:add_le (f.flyc_osd_home_point_masked20, payload(offset, 4)) + subtree:add_le (f.flyc_osd_home_point_flyc_in_simulation_mode, payload(offset, 4)) + subtree:add_le (f.flyc_osd_home_point_flyc_in_navigation_mode, payload(offset, 4)) + subtree:add_le (f.flyc_osd_home_point_wing_broken, payload(offset, 4)) + subtree:add_le (f.flyc_osd_home_point_big_gale, payload(offset, 4)) + subtree:add_le (f.flyc_osd_home_point_big_gale_warning, payload(offset, 4)) + subtree:add_le (f.flyc_osd_home_point_compass_install_err, payload(offset, 4)) + subtree:add_le (f.flyc_osd_home_point_height_limit_status, payload(offset, 4)) + subtree:add_le (f.flyc_osd_home_point_use_absolute_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_osd_home_point_height_limit_value, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_osd_home_point_unknown28, payload(offset, 5)) + offset = offset + 5 + + subtree:add_le (f.flyc_osd_home_point_force_landing_height, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_osd_home_point_unknown2E, payload(offset, 22)) + offset = offset + 22 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"OSD Home Point: Offset does not match - internal inconsistency") end + + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"OSD Home Point: Payload size different than expected") end +end + +-- Flight Controller - FlyC Gps Snr - 0x45 + +--f.flyc_flyc_gps_snr_unknown0 = ProtoField.none ("dji_dumlv1.flyc_flyc_gps_snr_unknown0", "Unknown0", base.NONE) + +local function flyc_flyc_gps_snr_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Gps Snr: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Gps Snr: Payload size different than expected") end +end + +-- Flight Controller - Imu Data Status - 0x50, identical to flight recorder packet 0x0013 + +f.flyc_imu_data_status_start_fan = ProtoField.uint8 ("dji_dumlv1.flyc_imu_data_status_start_fan", "Start Fan", base.HEX, nil, nil, "On P3, always 1") +f.flyc_imu_data_status_led_status = ProtoField.uint8 ("dji_dumlv1.flyc_imu_data_status_led_status", "Led Status", base.HEX, nil, nil, "On P3, always 0") + +local function flyc_imu_data_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_imu_data_status_start_fan, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_imu_data_status_led_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Data Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Data Status: Payload size different than expected") end +end + +-- Flight Controller - FlyC Battery Status - 0x51 + +enums.FLYC_SMART_BATTERY_GO_HOME_STATUS_SMART_GO_HOME_STATUS_ENUM = { + [0x00] = 'NON_GOHOME', + [0x01] = 'GOHOME', + [0x02] = 'GOHOME_ALREADY', +} + +f.flyc_flyc_battery_status_useful_time = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_battery_status_useful_time", "Useful Time", base.DEC) +f.flyc_flyc_battery_status_go_home_time = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_battery_status_go_home_time", "Go Home Time", base.DEC) +f.flyc_flyc_battery_status_land_time = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_battery_status_land_time", "Land Time", base.DEC) +f.flyc_flyc_battery_status_go_home_battery = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_battery_status_go_home_battery", "Go Home Battery", base.DEC) +f.flyc_flyc_battery_status_land_battery = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_battery_status_land_battery", "Land Battery", base.DEC) +f.flyc_flyc_battery_status_safe_fly_radius = ProtoField.float ("dji_dumlv1.flyc_flyc_battery_status_safe_fly_radius", "Safe Fly Radius", base.DEC) +f.flyc_flyc_battery_status_volume_comsume = ProtoField.float ("dji_dumlv1.flyc_flyc_battery_status_volume_comsume", "Volume Comsume", base.DEC) +f.flyc_flyc_battery_status_status = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_battery_status_status", "Status", base.HEX) +f.flyc_flyc_battery_status_go_home_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_go_home_status", "Go Home Status", base.HEX, enums.FLYC_SMART_BATTERY_GO_HOME_STATUS_SMART_GO_HOME_STATUS_ENUM, nil, nil) +f.flyc_flyc_battery_status_go_home_count_down = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_go_home_count_down", "Go Home Count Down", base.HEX) +f.flyc_flyc_battery_status_voltage = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_battery_status_voltage", "Voltage", base.DEC) +f.flyc_flyc_battery_status_battery_percent = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_battery_percent", "Battery Percent", base.DEC) +f.flyc_flyc_battery_status_masked1b = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_masked1b", "Masked1B", base.HEX) + f.flyc_flyc_battery_status_low_warning = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_low_warning", "Low Warning", base.HEX, nil, 0x7f, nil) + f.flyc_flyc_battery_status_low_warning_go_home = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_low_warning_go_home", "Low Warning Go Home", base.HEX, nil, 0x80, nil) +f.flyc_flyc_battery_status_masked1c = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_masked1c", "Masked1C", base.HEX) + f.flyc_flyc_battery_status_serious_low_warning = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_serious_low_warning", "Serious Low Warning", base.HEX, nil, 0x7f, nil) + f.flyc_flyc_battery_status_serious_low_warning_landing = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_serious_low_warning_landing", "Serious Low Warning Landing", base.HEX, nil, 0x80, nil) +f.flyc_flyc_battery_status_voltage_percent = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_battery_status_voltage_percent", "Voltage Percent", base.DEC) + +local function flyc_flyc_battery_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_battery_status_useful_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_battery_status_go_home_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_battery_status_land_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_battery_status_go_home_battery, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_battery_status_land_battery, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_battery_status_safe_fly_radius, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_battery_status_volume_comsume, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_battery_status_status, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_battery_status_go_home_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_battery_status_go_home_count_down, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_battery_status_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_battery_status_battery_percent, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_battery_status_masked1b, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_battery_status_low_warning, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_battery_status_low_warning_go_home, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_battery_status_masked1c, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_battery_status_serious_low_warning, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_battery_status_serious_low_warning_landing, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_battery_status_voltage_percent, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Battery Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Battery Status: Payload size different than expected") end +end + +-- Flight Controller - FlyC Vis Avoidance Param - 0x53 + +f.flyc_flyc_vis_avoid_param_masked00 = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_masked00", "Masked00", base.HEX) + f.flyc_flyc_vis_avoid_param_avoid_obstacle_enable = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_avoid_obstacle_enable", "Avoid Obstacle Enable", base.HEX, nil, 0x01, nil) + f.flyc_flyc_vis_avoid_param_user_avoid_enable = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_user_avoid_enable", "User Avoid Enable", base.HEX, nil, 0x02, nil) + f.flyc_flyc_vis_avoid_param_get_avoid_obstacle_work_flag = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_get_avoid_obstacle_work_flag", "Get Avoid Obstacle Work Flag", base.HEX, nil, 0x04, nil) + f.flyc_flyc_vis_avoid_param_get_emergency_brake_work_flag = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_get_emergency_brake_work_flag", "Get Emergency Brake Work Flag", base.HEX, nil, 0x08, nil) + f.flyc_flyc_vis_avoid_param_gohome_avoid_enable = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_gohome_avoid_enable", "Gohome Avoid Enable", base.HEX, nil, 0x10, nil) + f.flyc_flyc_vis_avoid_param_avoid_ground_force_landing = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_avoid_ground_force_landing", "Avoid Ground Force Landing", base.HEX, nil, 0x20, nil) + f.flyc_flyc_vis_avoid_param_radius_limit_working = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_radius_limit_working", "Radius Limit Working", base.HEX, nil, 0x40, nil) + f.flyc_flyc_vis_avoid_param_airport_limit_working = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_airport_limit_working", "Airport Limit Working", base.HEX, nil, 0x80, nil) + f.flyc_flyc_vis_avoid_param_avoid_obstacle_working = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_avoid_obstacle_working", "Avoid Obstacle Working", base.HEX, nil, 0x100, nil) + f.flyc_flyc_vis_avoid_param_horiz_near_boundary = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_horiz_near_boundary", "Horiz Near Boundary", base.HEX, nil, 0x200, nil) + f.flyc_flyc_vis_avoid_param_avoid_overshot_act = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_avoid_overshot_act", "Avoid Overshot Act", base.HEX, nil, 0x400, nil) + f.flyc_flyc_vis_avoid_param_vert_low_limit_work_flag = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_vis_avoid_param_vert_low_limit_work_flag", "Vert Low Limit Work Flag", base.HEX, nil, 0x800, nil) + +local function flyc_flyc_vis_avoid_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_vis_avoid_param_masked00, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_avoid_obstacle_enable, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_user_avoid_enable, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_get_avoid_obstacle_work_flag, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_get_emergency_brake_work_flag, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_gohome_avoid_enable, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_avoid_ground_force_landing, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_radius_limit_working, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_airport_limit_working, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_avoid_obstacle_working, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_horiz_near_boundary, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_avoid_overshot_act, payload(offset, 2)) + subtree:add_le (f.flyc_flyc_vis_avoid_param_vert_low_limit_work_flag, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Vis Avoidance Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Vis Avoidance Param: Payload size different than expected") end +end + +-- Flight Controller - FlyC Limit State - 0x55 + +f.flyc_flyc_limit_state_latitude = ProtoField.double ("dji_dumlv1.flyc_flyc_limit_state_latitude", "Latitude", base.DEC) +f.flyc_flyc_limit_state_longitude = ProtoField.double ("dji_dumlv1.flyc_flyc_limit_state_longitude", "Longitude", base.DEC) +f.flyc_flyc_limit_state_inner_radius = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_limit_state_inner_radius", "Inner Radius", base.HEX) +f.flyc_flyc_limit_state_outer_radius = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_limit_state_outer_radius", "Outer Radius", base.HEX) +f.flyc_flyc_limit_state_type = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_limit_state_type", "Type", base.HEX) +f.flyc_flyc_limit_state_area_state = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_limit_state_area_state", "Area State", base.HEX) +f.flyc_flyc_limit_state_action_state = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_limit_state_action_state", "Action State", base.HEX) +f.flyc_flyc_limit_state_enable = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_limit_state_enable", "Enable", base.HEX) + +local function flyc_flyc_limit_state_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_limit_state_latitude, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.flyc_flyc_limit_state_longitude, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.flyc_flyc_limit_state_inner_radius, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_limit_state_outer_radius, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_limit_state_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_limit_state_area_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_limit_state_action_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_limit_state_enable, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Limit State: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Limit State: Payload size different than expected") end +end + +-- Flight Controller - FlyC Led Status - 0x56 + +enums.FLYC_LED_STATUS_LED_REASON_ENUM = { + [0x00] = 'SET_HOME', + [0x01] = 'SET_HOT_POINT', + [0x02] = 'SET_COURSE_LOCK', + [0x03] = 'TEST_LED', + [0x04] = 'USB_IS_VALID', + [0x05] = 'PACKING_FAIL', + [0x06] = 'PACKING_NORMAL', + [0x07] = 'NO_ATTI', + [0x08] = 'COMPASS_CALI_STEP0', + [0x09] = 'COMPASS_CALI_STEP1', + [0x0a] = 'COMPASS_CALI_ERROR', + [0x0b] = 'SENSOR_TEMP_NOT_READY', + [0x0c] = 'IMU_OR_GYRO_LOST', + [0x0d] = 'IMU_BAD_ATTI', + [0x0e] = 'SYSTEM_ERROR', + [0x0f] = 'IMU_ERROR', + [0x10] = 'IMU_NEED_CALI', + [0x11] = 'COMPASS_OUT_RANGE', + [0x12] = 'RC_COMPLETELY_LOST', + [0x13] = 'BATTERY_WARNING', + [0x14] = 'BATTERY_ERROR', + [0x15] = 'IMU_WARNING', + [0x16] = 'SET_FLY_LIMIT', + [0x17] = 'NORMAL_LED', + [0x18] = 'FDI_VIBRATE', + [0x19] = 'CODE_ERROR', + [0x1a] = 'SYSTEM_RECONSTRUCTION', + [0x1b] = 'RECORDER_ERROR', +} + +f.flyc_flyc_led_status_led_reason = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_led_status_led_reason", "Led Reason", base.HEX, enums.FLYC_LED_STATUS_LED_REASON_ENUM, nil, nil) + +local function flyc_flyc_led_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_led_status_led_reason, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Led Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Led Status: Payload size different than expected") end +end + +-- Flight Controller - Gps Glns - 0x57, similar to flight recorder packet 0x0005 + +f.flyc_gps_glns_gps_lon = ProtoField.int32 ("dji_dumlv1.flyc_gps_glns_gps_lon", "Gps Lon", base.DEC) +f.flyc_gps_glns_gps_lat = ProtoField.int32 ("dji_dumlv1.flyc_gps_glns_gps_lat", "Gps Lat", base.DEC) +f.flyc_gps_glns_hmsl = ProtoField.int32 ("dji_dumlv1.flyc_gps_glns_hmsl", "Hmsl", base.DEC) +f.flyc_gps_glns_vel_n = ProtoField.float ("dji_dumlv1.flyc_gps_glns_vel_n", "Vel N", base.DEC) +f.flyc_gps_glns_vel_e = ProtoField.float ("dji_dumlv1.flyc_gps_glns_vel_e", "Vel E", base.DEC) +f.flyc_gps_glns_vel_d = ProtoField.float ("dji_dumlv1.flyc_gps_glns_vel_d", "Vel D", base.DEC) +f.flyc_gps_glns_hdop = ProtoField.float ("dji_dumlv1.flyc_gps_glns_hdop", "Hdop", base.DEC) +f.flyc_gps_glns_numsv = ProtoField.uint16 ("dji_dumlv1.flyc_gps_glns_numsv", "NumSV", base.DEC, nil, nil, "Number of Global Nav System positioning satellites") +f.flyc_gps_glns_gpsglns_cnt = ProtoField.uint16 ("dji_dumlv1.flyc_gps_glns_gpsglns_cnt", "Gps Glns Count", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") +f.flyc_gps_glns_unkn20 = ProtoField.uint8 ("dji_dumlv1.flyc_gps_glns_unkn20", "Unknown 20", base.DEC) +f.flyc_gps_glns_homepoint_set = ProtoField.uint8 ("dji_dumlv1.flyc_gps_glns_homepoint_set", "Homepoint Set", base.DEC) + +local function flyc_gps_glns_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_gps_glns_gps_lon, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_gps_glns_gps_lat, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_gps_glns_hmsl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_gps_glns_vel_n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_gps_glns_vel_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_gps_glns_vel_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_gps_glns_hdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_gps_glns_numsv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_gps_glns_gpsglns_cnt, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_gps_glns_unkn20, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_gps_glns_homepoint_set, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 22) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Glns: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Glns: Payload size different than expected") end +end + +-- Flight Controller - FlyC Activation Info - 0x61 + +f.flyc_flyc_active_request_app_id = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_active_request_app_id", "App Id", base.HEX) +f.flyc_flyc_active_request_app_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_active_request_app_level", "App Level", base.HEX) +f.flyc_flyc_active_request_app_version = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_active_request_app_version", "App Version", base.HEX) + +local function flyc_flyc_active_request_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_active_request_app_id, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_active_request_app_level, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_active_request_app_version, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Activation Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Activation Info: Payload size different than expected") end +end + +-- Flight Controller - FlyC Board Recv - 0x63 + +--f.flyc_flyc_board_recv_unknown0 = ProtoField.none ("dji_dumlv1.flyc_flyc_board_recv_unknown0", "Unknown0", base.NONE) + +local function flyc_flyc_board_recv_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Board Recv: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Board Recv: Payload size different than expected") end +end + +-- Flight Controller - FlyC Power Param - 0x67 + +f.flyc_flyc_power_param_esc_average_speed = ProtoField.float ("dji_dumlv1.flyc_flyc_power_param_esc_average_speed", "Esc Average Speed", base.DEC) +f.flyc_flyc_power_param_lift = ProtoField.float ("dji_dumlv1.flyc_flyc_power_param_lift", "Lift", base.DEC) + +local function flyc_flyc_power_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_power_param_esc_average_speed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_power_param_lift, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Power Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Power Param: Payload size different than expected") end +end + +-- Flight Controller - FlyC Avoid - 0x6a + +f.flyc_flyc_avoid_masked00 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_avoid_masked00", "Masked00", base.HEX) + f.flyc_flyc_avoid_visual_sensor_enable = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_avoid_visual_sensor_enable", "Visual Sensor Enable", base.HEX, nil, 0x01, nil) + f.flyc_flyc_avoid_visual_sensor_work = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_avoid_visual_sensor_work", "Visual Sensor Work", base.HEX, nil, 0x02, nil) + f.flyc_flyc_avoid_in_stop = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_avoid_in_stop", "In Stop", base.HEX, nil, 0x04, nil) + +local function flyc_flyc_avoid_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_avoid_masked00, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_avoid_visual_sensor_enable, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_avoid_visual_sensor_work, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_avoid_in_stop, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Avoid: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Avoid: Payload size different than expected") end +end + +-- Flight Controller - FlyC Rtk Location Data - 0x6c + +f.flyc_flyc_rtk_location_data_longitude = ProtoField.double ("dji_dumlv1.flyc_flyc_rtk_location_data_longitude", "Longitude", base.DEC) +f.flyc_flyc_rtk_location_data_latitude = ProtoField.double ("dji_dumlv1.flyc_flyc_rtk_location_data_latitude", "Latitude", base.DEC) +f.flyc_flyc_rtk_location_data_height = ProtoField.float ("dji_dumlv1.flyc_flyc_rtk_location_data_height", "Height", base.DEC) +f.flyc_flyc_rtk_location_data_heading = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_rtk_location_data_heading", "Heading", base.HEX) +f.flyc_flyc_rtk_location_data_rtk_connected = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_rtk_location_data_rtk_connected", "Rtk Connected", base.HEX) +f.flyc_flyc_rtk_location_data_rtk_canbe_used = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_rtk_location_data_rtk_canbe_used", "Rtk Can be Used", base.HEX) +f.flyc_flyc_rtk_location_data_unknown18 = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_rtk_location_data_unknown18", "Unknown18", base.HEX) +f.flyc_flyc_rtk_location_data_unknown1C = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_rtk_location_data_unknown1C", "Unknown1C", base.HEX) + +local function flyc_flyc_rtk_location_data_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_rtk_location_data_longitude, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.flyc_flyc_rtk_location_data_latitude, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.flyc_flyc_rtk_location_data_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_rtk_location_data_heading, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_rtk_location_data_rtk_connected, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_rtk_location_data_rtk_canbe_used, payload(offset, 1)) + offset = offset + 1 + + if (payload:len() >= offset + 8) then -- Not sure if packets in all platforms have these additional 8 bytes + + subtree:add_le (f.flyc_flyc_rtk_location_data_unknown18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_rtk_location_data_unknown1C, payload(offset, 4)) + offset = offset + 4 + + end + + if (offset ~= 24) and (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Rtk Location Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Rtk Location Data: Payload size different than expected") end +end + +-- Flight Controller - FlyC Way Point Mission Info - 0x88 + +enums.FLYC_WAY_POINT_MISSION_INFO_MISSION_TYPE_ENUM = { + [0x01] = 'Way Point', + [0x02] = 'Hot Point', + [0x03] = 'Follow Me', + [0x04] = 'Course Lock/Home Lock', + [0x05] = 'TBD', +} + +enums.FLYC_WAY_POINT_MISSION_INFO_RUNNING_STATUS_ENUM = { + [0x00] = 'NotRunning', + [0x01] = 'Running', + [0x02] = 'Paused', +} + +f.flyc_flyc_way_point_mission_info_mission_type = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_mission_type", "Mission Type", base.HEX, enums.FLYC_WAY_POINT_MISSION_INFO_MISSION_TYPE_ENUM) +-- Way Point mission (unverified) +f.flyc_flyc_way_point_mission_info_target_way_point = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_target_way_point", "Target Way Point", base.DEC) +f.flyc_flyc_way_point_mission_info_limited_height = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_way_point_mission_info_limited_height", "Limited Height", base.HEX) +f.flyc_flyc_way_point_mission_info_running_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_running_status", "Way Point Running Status", base.HEX, enums.FLYC_WAY_POINT_MISSION_INFO_RUNNING_STATUS_ENUM) +f.flyc_flyc_way_point_mission_info_wp_unknown5 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_wp_unknown5", "Way Point Unknown5", base.HEX) +-- Hot Point mission +f.flyc_flyc_way_point_mission_info_hot_point_mission_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_hot_point_mission_status", "Hot Point Mission Status", base.HEX) +f.flyc_flyc_way_point_mission_info_hot_point_radius = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_way_point_mission_info_hot_point_radius", "Hot Point Radius", base.DEC) +f.flyc_flyc_way_point_mission_info_hot_point_reason = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_hot_point_reason", "Hot Point Reason", base.HEX) +f.flyc_flyc_way_point_mission_info_hot_point_speed = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_hot_point_speed", "Hot Point Speed", base.DEC) +-- Follow Me mission +f.flyc_flyc_way_point_mission_info_follow_me_flags = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_follow_me_flags", "Follow Me Flags", base.HEX) + f.flyc_flyc_way_point_mission_info_follow_me_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_follow_me_status", "Follow Me Status", base.HEX, nil, 0x0f, nil) + f.flyc_flyc_way_point_mission_info_follow_me_gps_level = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_follow_me_gps_level", "Follow Me Gps Level", base.HEX, nil, 0xf0, nil) +f.flyc_flyc_way_point_mission_info_follow_me_distance = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_way_point_mission_info_follow_me_distance", "Follow Me Distance", base.Dec) +f.flyc_flyc_way_point_mission_info_follow_me_reason = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_follow_me_reason", "Follow Me Reason", base.HEX) +f.flyc_flyc_way_point_mission_info_follow_me_unknown6 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_follow_me_unknown6", "Follow Me Unknown6", base.HEX) +-- Any other mission (unverified) +f.flyc_flyc_way_point_mission_info_mission_flags = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_mission_flags", "Mission Flags", base.HEX) + f.flyc_flyc_way_point_mission_info_mission_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_mission_status", "Mission Status", base.HEX, nil, 0x03, nil) + f.flyc_flyc_way_point_mission_info_position_valid = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_position_valid", "Position Valid", base.HEX, nil, 0x04, nil) +f.flyc_flyc_way_point_mission_info_current_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_current_status", "Current Status", base.HEX) +f.flyc_flyc_way_point_mission_info_error_notification = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_error_notification", "Error Notification", base.HEX) +f.flyc_flyc_way_point_mission_info_current_height = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_way_point_mission_info_current_height", "Current Height", base.HEX) +-- All types +f.flyc_flyc_way_point_mission_info_is_tracking_enabled = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_info_is_tracking_enabled", "Is Tracking Enabled", base.HEX) + +local function flyc_flyc_way_point_mission_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local mission_type = payload(offset,1):le_uint() + subtree:add_le (f.flyc_flyc_way_point_mission_info_mission_type, payload(offset, 1)) + offset = offset + 1 + + if (mission_type == 0x01) then + + subtree:add_le (f.flyc_flyc_way_point_mission_info_target_way_point, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_limited_height, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_running_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_wp_unknown5, payload(offset, 1)) + offset = offset + 1 + + elseif (mission_type == 0x02) then + + subtree:add_le (f.flyc_flyc_way_point_mission_info_hot_point_mission_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_hot_point_radius, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_hot_point_reason, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_hot_point_speed, payload(offset, 1)) + offset = offset + 1 + + elseif (mission_type == 0x03) then + + subtree:add_le (f.flyc_flyc_way_point_mission_info_follow_me_flags, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_way_point_mission_info_follow_me_status, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_way_point_mission_info_follow_me_gps_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_follow_me_distance, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_follow_me_reason, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_follow_me_unknown6, payload(offset, 1)) + offset = offset + 1 + + else + + subtree:add_le (f.flyc_flyc_way_point_mission_info_mission_flags, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_way_point_mission_info_mission_status, payload(offset, 1)) + subtree:add_le (f.flyc_flyc_way_point_mission_info_position_valid, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_current_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_error_notification, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_info_current_height, payload(offset, 2)) + offset = offset + 2 + + end + + subtree:add_le (f.flyc_flyc_way_point_mission_info_is_tracking_enabled, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Way Point Mission Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Way Point Mission Info: Payload size different than expected") end +end + +-- Flight Controller - Push Navigation Event Info - 0x89 + +enums.FLYC_WAY_POINT_MISSION_CURRENT_EVENT_EVENT_TYPE_ENUM = { + [0x01] = 'Finish Incident', + [0x02] = 'Reach Incident', + [0x03] = 'Upload Incident', +} + +f.flyc_flyc_way_point_mission_current_event_event_type = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_event_type", "Event Type", base.HEX, enums.FLYC_WAY_POINT_MISSION_CURRENT_EVENT_EVENT_TYPE_ENUM) +-- Finish Incident +f.flyc_flyc_way_point_mission_current_event_finish_incident_is_repeat = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_finish_incident_is_repeat", "Finish Incident Is Repeat", base.HEX) +f.flyc_flyc_way_point_mission_current_event_finish_incident_resrved = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_finish_incident_resrved", "Finish Incident Resrved", base.HEX) +-- Reach Incident +f.flyc_flyc_way_point_mission_current_event_reach_incident_way_point_index = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_reach_incident_way_point_index", "Reach Incident Way Point Index", base.HEX, nil, 0xff, nil) +f.flyc_flyc_way_point_mission_current_event_reach_incident_current_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_reach_incident_current_status", "Reach Incident Current Status", base.HEX, nil, 0xff, nil) +f.flyc_flyc_way_point_mission_current_event_reach_incident_reserved = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_reach_incident_reserved", "Reach Incident Reserved", base.HEX, nil, 0xff, nil) +-- Upload Incident +f.flyc_flyc_way_point_mission_current_event_upload_incident_is_valid = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_upload_incident_is_valid", "Upload Incident Is Valid", base.HEX, nil, 0xff, nil) +f.flyc_flyc_way_point_mission_current_event_upload_incident_estimated_time = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_upload_incident_estimated_time", "Upload Incident Estimated Time", base.HEX, nil, 0xffff, nil) +--f.flyc_flyc_way_point_mission_current_event_upload_incident_reserved = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_way_point_mission_current_event_upload_incident_reserved", "Upload Incident Reserved", base.HEX) + +local function flyc_flyc_way_point_mission_current_event_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local event_type = payload(offset,1):le_uint() + subtree:add_le (f.flyc_flyc_way_point_mission_current_event_event_type, payload(offset, 1)) + offset = offset + 1 + + if (event_type == 0x02) then + + subtree:add_le (f.flyc_flyc_way_point_mission_current_event_reach_incident_way_point_index, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_current_event_reach_incident_current_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_current_event_reach_incident_reserved, payload(offset, 1)) + offset = offset + 1 + + elseif (event_type == 0x03) then + + subtree:add_le (f.flyc_flyc_way_point_mission_current_event_upload_incident_is_valid, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_current_event_upload_incident_estimated_time, payload(offset, 2)) + offset = offset + 2 + + --subtree:add_le (f.flyc_flyc_way_point_mission_current_event_upload_incident_reserved, payload(offset, 2)) + --offset = offset + 2 + + else + + subtree:add_le (f.flyc_flyc_way_point_mission_current_event_finish_incident_is_repeat, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_way_point_mission_current_event_finish_incident_resrved, payload(offset, 2)) + offset = offset + 2 + + end + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Push Navigation Event Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Push Navigation Event Info: Payload size different than expected") end +end + +-- Flight Controller - FlyC Agps Status - 0xa1 + +f.flyc_flyc_agps_status_time_stamp = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_agps_status_time_stamp", "Time Stamp", base.HEX) +f.flyc_flyc_agps_status_data_length = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_agps_status_data_length", "Data Length", base.HEX) +f.flyc_flyc_agps_status_crc16_hash = ProtoField.uint16 ("dji_dumlv1.flyc_flyc_agps_status_crc16_hash", "Crc16 Hash", base.HEX) + +local function flyc_flyc_agps_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_agps_status_time_stamp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_agps_status_data_length, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_flyc_agps_status_crc16_hash, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Agps Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Agps Status: Payload size different than expected") end +end + +-- Flight Controller - FlyC Flyc Install Error - 0xad + +f.flyc_flyc_flyc_install_error_masked00 = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_masked00", "Masked00", base.HEX) + f.flyc_flyc_flyc_install_error_yaw_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_yaw_install_error_level", "Yaw Install Error Level", base.HEX, nil, 0x03, nil) + f.flyc_flyc_flyc_install_error_roll_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_roll_install_error_level", "Roll Install Error Level", base.HEX, nil, 0x0c, nil) + f.flyc_flyc_flyc_install_error_pitch_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_pitch_install_error_level", "Pitch Install Error Level", base.HEX, nil, 0x30, nil) + f.flyc_flyc_flyc_install_error_gyro_x_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_gyro_x_install_error_level", "Gyro X Install Error Level", base.HEX, nil, 0xc0, nil) + f.flyc_flyc_flyc_install_error_gyro_y_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_gyro_y_install_error_level", "Gyro Y Install Error Level", base.HEX, nil, 0x300, nil) + f.flyc_flyc_flyc_install_error_gyro_z_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_gyro_z_install_error_level", "Gyro Z Install Error Level", base.HEX, nil, 0xc00, nil) + f.flyc_flyc_flyc_install_error_acc_x_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_acc_x_install_error_level", "Acc X Install Error Level", base.HEX, nil, 0x3000, nil) + f.flyc_flyc_flyc_install_error_acc_y_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_acc_y_install_error_level", "Acc Y Install Error Level", base.HEX, nil, 0xc000, nil) + f.flyc_flyc_flyc_install_error_acc_z_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_acc_z_install_error_level", "Acc Z Install Error Level", base.HEX, nil, 0x30000, nil) + f.flyc_flyc_flyc_install_error_thrust_install_error_level = ProtoField.uint32 ("dji_dumlv1.flyc_flyc_flyc_install_error_thrust_install_error_level", "Thrust Install Error Level", base.HEX, nil, 0xc0000, nil) + +local function flyc_flyc_flyc_install_error_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_flyc_install_error_masked00, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_yaw_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_roll_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_pitch_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_gyro_x_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_gyro_y_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_gyro_z_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_acc_x_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_acc_y_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_acc_z_install_error_level, payload(offset, 4)) + subtree:add_le (f.flyc_flyc_flyc_install_error_thrust_install_error_level, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Flyc Install Error: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Flyc Install Error: Payload size different than expected") end +end + +-- Flight Controller - FlyC Fault Inject - 0xb6 + +enums.FLYC_FAULT_INJECT_STATUS_ENUM = { + [0x01] = 'FIT_VERSION_UNMATCH', + [0x02] = 'FIT_OPEN_FAILED', + [0x03] = 'FIT_OPEN_SUCCESS', + [0x04] = 'FIT_CLOSE_SUCCESS', + [0x05] = 'FIT_INJECT_SUCCESS', + [0x06] = 'FIT_INJECT_FAILED', + [0x07] = 'FIT_FDI_DETECT_SUCCESS', + [0x08] = 'FIT_FDI_DETECT_FAILED', + [0x09] = 'FIT_AUTO_STOP_FOR_SAFE', + [0x0a] = 'FIT_TIME_PARA_INVALID', + [0x0b] = 'FIT_DENY_FOR_UNSAFE', + [0x0c] = 'FIT_DENY_FOR_FAULT', + [0x0d] = 'FIT_DENY_FOR_DISCONNECT', + [0x0e] = 'FIT_UNKNOWN_FAULT_TYPE', + [0x0f] = 'FIT_INVALID_SYSTEM_ID', + [0x10] = 'FIT_UNKNOWN_MODULE_TYPE', + [0x11] = 'FIT_MODULE_CANNOT_FOUND', + [0x12] = 'FIT_UNKNOWN_CMD_ID', + [0x13] = 'FIT_UNSUPPORT_NOW', + [0x14] = 'FIT_DENY_FOR_UNOPEN', + [0x15] = 'FIT_DENY_FOR_FUNC_CLOSED', + [0x16] = 'FIT_MSG_LEN_ERR', + [0x17] = 'FIT_ROUTE_FAILED', +} + +f.flyc_flyc_fault_inject_status = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_fault_inject_status", "Status", base.HEX, enums.FLYC_FAULT_INJECT_STATUS_ENUM, nil, nil) + +local function flyc_flyc_fault_inject_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_fault_inject_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Fault Inject: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Fault Inject: Payload size different than expected") end +end + +-- Flight Controller - FlyC Redundancy Status - 0xb9 + +enums.FLYC_REDUNDANCY_STATUS_CMD_TYPE_ENUM = { + [0x01] = 'a', + [0x02] = 'b', + [0x03] = 'c', + [0x04] = 'd', +} + +f.flyc_flyc_redundancy_status_cmd_type = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_cmd_type", "Command Type", base.HEX, enums.FLYC_REDUNDANCY_STATUS_CMD_TYPE_ENUM) +f.flyc_flyc_redundancy_status_unknown1 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown1", "Unknown1", base.HEX) +f.flyc_flyc_redundancy_status_unknown2 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown2", "Unknown2", base.HEX) +f.flyc_flyc_redundancy_status_unknown3 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown3", "Unknown3", base.HEX) +f.flyc_flyc_redundancy_status_unknown4 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown4", "Unknown4", base.HEX) +f.flyc_flyc_redundancy_status_unknown5 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown5", "Unknown5", base.HEX) +f.flyc_flyc_redundancy_status_unknown6 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown6", "Unknown6", base.HEX) +f.flyc_flyc_redundancy_status_unknown7 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown7", "Unknown7", base.HEX) +f.flyc_flyc_redundancy_status_unknown8 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown8", "Unknown8", base.HEX) +f.flyc_flyc_redundancy_status_unknown9 = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknown9", "Unknown9", base.HEX) +f.flyc_flyc_redundancy_status_unknownA = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknownA", "UnknownA", base.HEX) +f.flyc_flyc_redundancy_status_unknownB = ProtoField.uint8 ("dji_dumlv1.flyc_flyc_redundancy_status_unknownB", "UnknownB", base.HEX) + +local function flyc_flyc_redundancy_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_flyc_redundancy_status_cmd_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknown9, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknownA, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_flyc_redundancy_status_unknownB, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FlyC Redundancy Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FlyC Redundancy Status: Payload size different than expected") end +end + +-- Flight Controller - Assistant Unlock Handler - 0xdf + +f.flyc_assistant_unlock_lock_state = ProtoField.uint32 ("dji_dumlv1.flyc_assistant_unlock_lock_state", "Lock State", base.DEC, nil, nil) +f.flyc_assistant_unlock_status = ProtoField.uint8 ("dji_dumlv1.flyc_assistant_unlock_status", "Status", base.DEC, nil, nil) + +local function flyc_assistant_unlock_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_assistant_unlock_lock_state, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Assistant Unlock: Offset does not match - internal inconsistency") end + else -- Response + subtree:add_le (f.flyc_assistant_unlock_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Assistant Unlock: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Assistant Unlock: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Get Tbl Attribute - 0xe0 + +f.flyc_config_table_get_tbl_attribute_status = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_tbl_attribute_status", "Status", base.DEC, nil, nil) +f.flyc_config_table_get_tbl_attribute_table_no = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_tbl_attribute_table_no", "Table No", base.DEC, nil, nil) +f.flyc_config_table_get_tbl_attribute_entries_crc = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_tbl_attribute_entries_crc", "Table Entries Checksum", base.HEX, nil, nil) +f.flyc_config_table_get_tbl_attribute_entries_num = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_tbl_attribute_entries_num", "Table Entries Number", base.DEC, nil, nil) + +local function flyc_config_table_get_tbl_attribute_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_config_table_get_tbl_attribute_table_no, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Tbl Attribute: Offset does not match - internal inconsistency") end + else -- Response + subtree:add_le (f.flyc_config_table_get_tbl_attribute_status, payload(offset, 2)) + offset = offset + 2 + + if (payload:len() - offset >= 6) then + subtree:add_le (f.flyc_config_table_get_tbl_attribute_table_no, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_tbl_attribute_entries_crc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_tbl_attribute_entries_num, payload(offset, 4)) + offset = offset + 4 + end + + if (offset ~= 2) and (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Tbl Attribute: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Get Tbl Attribute: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Get Item Attribute - 0xe1 + +f.flyc_config_table_get_item_attribute_status = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_item_attribute_status", "Status", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_table_no = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_item_attribute_table_no", "Table No", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_index = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_item_attribute_index", "Param Index", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_type_id = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_item_attribute_type_id", "TypeID", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_size = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_item_attribute_size", "Size", base.DEC, nil, nil) +--f.flyc_config_table_get_item_attribute_attribute = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_item_attribute_attribute", "Attribute", base.HEX, nil, nil) +f.flyc_config_table_get_item_attribute_limit_i_def = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_i_def", "LimitI defaultValue", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_limit_i_min = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_i_min", "LimitI minValue", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_limit_i_max = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_i_max", "LimitI maxValue", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_limit_u_def = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_u_def", "LimitU defaultValue", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_limit_u_min = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_u_min", "LimitU minValue", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_limit_u_max = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_u_max", "LimitU maxValue", base.DEC, nil, nil) +f.flyc_config_table_get_item_attribute_limit_f_def = ProtoField.float ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_f_def", "LimitF defaultValue", nil, nil) +f.flyc_config_table_get_item_attribute_limit_f_min = ProtoField.float ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_f_min", "LimitF minValue", nil, nil) +f.flyc_config_table_get_item_attribute_limit_f_max = ProtoField.float ("dji_dumlv1.flyc_config_table_get_item_attribute_limit_f_max", "LimitF maxValue", nil, nil) +f.flyc_config_table_get_item_attribute_name = ProtoField.stringz ("dji_dumlv1.flyc_config_table_get_item_attribute_name", "Name", base.ASCII, nil, nil) + +local function flyc_config_table_get_item_attribute_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_config_table_get_item_attribute_table_no, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_item_attribute_index, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Item Attribute: Offset does not match - internal inconsistency") end + else -- Response + subtree:add_le (f.flyc_config_table_get_item_attribute_status, payload(offset, 2)) + offset = offset + 2 + + -- It is possible that the packet ends here, if there was an issue retrieving the item + if (payload:len() >= 10) then + subtree:add_le (f.flyc_config_table_get_item_attribute_table_no, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_item_attribute_index, payload(offset, 2)) + offset = offset + 2 + + local type_id = payload(offset,2):le_uint() + subtree:add_le (f.flyc_config_table_get_item_attribute_type_id, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_item_attribute_size, payload(offset, 2)) + offset = offset + 2 + + --subtree:add_le (f.flyc_config_table_get_item_attribute_attribute, payload(offset, 2)) + --offset = offset + 2 + + if (type_id <= 3) or (type_id == 10) then + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_u_def, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_u_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_u_max, payload(offset, 4)) + offset = offset + 4 + elseif (type_id >= 4) and (type_id <= 7) then + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_i_def, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_i_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_i_max, payload(offset, 4)) + offset = offset + 4 + elseif (type_id == 8) or (type_id == 9) then + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_f_def, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_f_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_item_attribute_limit_f_max, payload(offset, 4)) + offset = offset + 4 + end + + local name_text = payload(offset, payload:len() - offset) + subtree:add_le (f.flyc_config_table_get_item_attribute_name, name_text) + offset = payload:len() + end + + if (offset ~= 2) and (offset < 22) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Item Attribute: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Get Item Attribute: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Get Item Value - 0xe2 + +f.flyc_config_table_get_item_value_status = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_item_value_status", "Status", base.DEC, nil, nil) +f.flyc_config_table_get_item_value_table_no = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_item_value_table_no", "Table No", base.DEC, nil, nil) +f.flyc_config_table_get_item_value_unknown1 = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_item_value_unknown1", "Unknown1", base.DEC, nil, nil) +f.flyc_config_table_get_item_value_index = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_item_value_index", "Param Index", base.DEC, nil, nil) +f.flyc_config_table_get_item_value_value = ProtoField.bytes ("dji_dumlv1.flyc_config_table_get_item_value_value", "Param Value", base.SPACE, nil, nil, "Flight controller parameter value; size and type depends on parameter") + +local function flyc_config_table_get_item_value_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_config_table_get_item_value_table_no, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_item_value_unknown1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_item_value_index, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Item Value: Offset does not match - internal inconsistency") end + else -- Response + subtree:add_le (f.flyc_config_table_get_item_value_status, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_item_value_unknown1, payload(offset, 2)) + offset = offset + 2 + + -- It is possible that the packet ends here, if there was an issue retrieving the item + if (payload:len() >= 7) then + subtree:add_le (f.flyc_config_table_get_item_value_index, payload(offset, 2)) + offset = offset + 2 + + if (payload:len() - offset >= 1) then + local varsize_val = payload(offset, payload:len() - offset) + subtree:add (f.flyc_config_table_get_item_value_value, varsize_val) + offset = payload:len() + end + end + + --if (offset ~= 2) and (offset < 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Item Value: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Get Item Value: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Set Item Value - 0xe3 + +f.flyc_config_table_set_item_value_status = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_set_item_value_status", "Status", base.DEC, nil, nil) +f.flyc_config_table_set_item_value_table_no = ProtoField.int16 ("dji_dumlv1.flyc_config_table_set_item_value_table_no", "Table No", base.DEC, nil, nil) +f.flyc_config_table_set_item_value_unknown1 = ProtoField.int16 ("dji_dumlv1.flyc_config_table_set_item_value_unknown1", "Unknown1", base.DEC, nil, nil) +f.flyc_config_table_set_item_value_index = ProtoField.int16 ("dji_dumlv1.flyc_config_table_set_item_value_index", "Param Index", base.DEC, nil, nil) +f.flyc_config_table_set_item_value_value = ProtoField.bytes ("dji_dumlv1.flyc_config_table_set_item_value_value", "Param Value", base.SPACE, nil, nil, "Flight controller parameter value; size and type depends on parameter") + +local function flyc_config_table_set_item_value_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_config_table_set_item_value_table_no, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_set_item_value_unknown1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_set_item_value_index, payload(offset, 2)) + offset = offset + 2 + + if (payload:len() - offset >= 1) then + local varsize_val = payload(offset, payload:len() - offset) + subtree:add (f.flyc_config_table_set_item_value_value, varsize_val) + offset = payload:len() + end + + if (offset ~= 2) and (offset < 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Set Item Value: Offset does not match - internal inconsistency") end + else -- Response + subtree:add_le (f.flyc_config_table_set_item_value_status, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_set_item_value_table_no, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_set_item_value_index, payload(offset, 2)) + offset = offset + 2 + + if (payload:len() - offset >= 1) then + local varsize_val = payload(offset, payload:len() - offset) + subtree:add (f.flyc_config_table_set_item_value_value, varsize_val) + offset = payload:len() + end + + if (offset ~= 2) and (offset < 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Set Item Value: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Set Item Value: Payload size different than expected") end +end + +-- Flight Controller - Config Command Table: Get or Exec - 0xe9 + +f.flyc_config_command_table_get_or_exec_cmd_type = ProtoField.int16 ("dji_dumlv1.flyc_flyc_redundancy_status_cmd_type", "Command Type", base.DEC, nil, nil, "Positive values - exec, negative - get name, -1 - get count") + +local function flyc_config_command_table_get_or_exec_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local cmd = payload(offset,2):le_int() + local cmd_uint = payload(offset,2):le_uint() + local valuestring + if cmd == -1 then + valuestring = "Get command count" + elseif cmd < 0 then + valuestring = string.format("Get command %d name", 1 - cmd) + else -- cmd > 0 + valuestring = string.format("Exec command %d", cmd) + end + subtree:add_le (f.flyc_config_command_table_get_or_exec_cmd_type, payload(offset, 2), cmd, string.format("%s: %s (0x%02X)", "Command Type", valuestring, cmd_uint)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Command Table Get or Exec: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Command Table Get or Exec: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Get Param Info by Index - 0xf0 +-- returns parameter name and properties + +f.flyc_config_table_get_param_info_by_index_index = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_index", "Param Index", base.DEC, nil, nil) + +f.flyc_config_table_get_param_info_by_index_status = ProtoField.uint8 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_status", "Status", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_type_id = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_type_id", "TypeID", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_size = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_size", "Size", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_attribute = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_attribute", "Attribute", base.HEX, nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_i_min = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_i_min", "LimitI minValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_i_max = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_i_max", "LimitI maxValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_i_def = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_i_def", "LimitI defaultValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_u_min = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_u_min", "LimitU minValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_u_max = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_u_max", "LimitU maxValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_u_def = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_u_def", "LimitU defaultValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_f_min = ProtoField.float ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_f_min", "LimitF minValue", nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_f_max = ProtoField.float ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_f_max", "LimitF maxValue", nil, nil) +f.flyc_config_table_get_param_info_by_index_limit_f_def = ProtoField.float ("dji_dumlv1.flyc_config_table_get_param_info_by_index_limit_f_def", "LimitF defaultValue", nil, nil) +f.flyc_config_table_get_param_info_by_index_name = ProtoField.stringz ("dji_dumlv1.flyc_config_table_get_param_info_by_index_name", "Name", base.ASCII, nil, nil) + +local function flyc_config_table_get_param_info_by_index_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_config_table_get_param_info_by_index_index, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Param Info by Index: Offset does not match - internal inconsistency") end + else -- Response + -- Payload has 19 bytes + null-terminated name on P3X_FW_V01.07.0060 + subtree:add_le (f.flyc_config_table_get_param_info_by_index_status, payload(offset, 1)) + offset = offset + 1 + + -- It is possible that the packet ends here, if there was an issue retrieving the item + if (payload:len() >= 8) then + local type_id = payload(offset,2):le_uint() + subtree:add_le (f.flyc_config_table_get_param_info_by_index_type_id, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_param_info_by_index_size, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_param_info_by_index_attribute, payload(offset, 2)) + offset = offset + 2 + + if (type_id <= 3) or (type_id == 10) then + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_u_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_u_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_u_def, payload(offset, 4)) + offset = offset + 4 + elseif (type_id >= 4) and (type_id <= 7) then + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_i_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_i_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_i_def, payload(offset, 4)) + offset = offset + 4 + elseif (type_id == 8) or (type_id == 9) then + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_f_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_f_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_index_limit_f_def, payload(offset, 4)) + offset = offset + 4 + end + + local name_text = payload(offset, payload:len() - offset) + subtree:add_le (f.flyc_config_table_get_param_info_by_index_name, name_text) + offset = payload:len() + end + + --if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Param Info by Index: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Get Param Info by Index: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Read Params By Index - 0xf1 + +f.flyc_config_table_read_param_by_index_index = ProtoField.int16 ("dji_dumlv1.flyc_config_table_read_param_by_index_index", "Param Index", base.DEC, nil, nil) + +local function flyc_config_table_read_param_by_index_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_config_table_read_param_by_index_index, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Read Params By Index: Offset does not match - internal inconsistency") end + else -- Response + -- Payload unfinished + subtree:add_le (f.flyc_config_table_read_param_by_index_index, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 19) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Read Params By Index: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Read Params By Index: Payload size different than expected") end +end + + +-- Flight Controller - Config Table: Get Param Info By Hash - 0xf7 + +enums.FLYC_PARAMETER_BY_HASH_ENUM = { + [0x4d5c7a3d] = 'cfg_var_table_size_0', + [0x153d84bc] = 'global.status', + [0xdd08bb88] = 'fix_send_index[ 0]_0', + [0xde08bb88] = 'fix_send_index[ 1]_0', + [0xdf08bb88] = 'fix_send_index[ 2]_0', + [0xe008bb88] = 'fix_send_index[ 3]_0', + [0xe108bb88] = 'fix_send_index[ 4]_0', + [0xe208bb88] = 'fix_send_index[ 5]_0', + [0xe308bb88] = 'fix_send_index[ 6]_0', + [0xe408bb88] = 'fix_send_index[ 7]_0', + [0xe508bb88] = 'fix_send_index[ 8]_0', + [0xe608bb88] = 'fix_send_index[ 9]_0', + [0xdd08bbdd] = 'fix_send_index[10]_0', + [0xde08bbdd] = 'fix_send_index[11]_0', + [0xdf08bbdd] = 'fix_send_index[12]_0', + [0xe008bbdd] = 'fix_send_index[13]_0', + [0xe108bbdd] = 'fix_send_index[14]_0', + [0xe208bbdd] = 'fix_send_index[15]_0', + [0xe308bbdd] = 'fix_send_index[16]_0', + [0xe408bbdd] = 'fix_send_index[17]_0', + [0xe508bbdd] = 'fix_send_index[18]_0', + [0xe608bbdd] = 'fix_send_index[19]_0', + [0xdd08bbe2] = 'fix_send_index[20]_0', + [0xde08bbe2] = 'fix_send_index[21]_0', + [0xdf08bbe2] = 'fix_send_index[22]_0', + [0xe008bbe2] = 'fix_send_index[23]_0', + [0xe108bbe2] = 'fix_send_index[24]_0', + [0xe208bbe2] = 'fix_send_index[25]_0', + [0xe308bbe2] = 'fix_send_index[26]_0', + [0xe408bbe2] = 'fix_send_index[27]_0', + [0xe508bbe2] = 'fix_send_index[28]_0', + [0xe608bbe2] = 'fix_send_index[29]_0', + [0xdd08bbe7] = 'fix_send_index[30]_0', + [0xde08bbe7] = 'fix_send_index[31]_0', + [0xdf08bbe7] = 'fix_send_index[32]_0', + [0xe008bbe7] = 'fix_send_index[33]_0', + [0xe108bbe7] = 'fix_send_index[34]_0', + [0xe208bbe7] = 'fix_send_index[35]_0', + [0xe308bbe7] = 'fix_send_index[36]_0', + [0xe408bbe7] = 'fix_send_index[37]_0', + [0xe508bbe7] = 'fix_send_index[38]_0', + [0xe608bbe7] = 'fix_send_index[39]_0', + [0xdd08bbec] = 'fix_send_index[40]_0', + [0xde08bbec] = 'fix_send_index[41]_0', + [0xdf08bbec] = 'fix_send_index[42]_0', + [0xe008bbec] = 'fix_send_index[43]_0', + [0xe108bbec] = 'fix_send_index[44]_0', + [0xe208bbec] = 'fix_send_index[45]_0', + [0xe308bbec] = 'fix_send_index[46]_0', + [0xe408bbec] = 'fix_send_index[47]_0', + [0x45f0eea6] = 'fix_send[0].send_frequency_0', + [0x087312bc] = 'fix_send[0].send_start_index_0', + [0xe4ee4283] = 'fix_send[0].send_size_0', + [0x4861eea6] = 'fix_send[1].send_frequency_0', + [0x08731ef1] = 'fix_send[1].send_start_index_0', + [0xe4eebf83] = 'fix_send[1].send_size_0', + [0x4ad2eea6] = 'fix_send[2].send_frequency_0', + [0x08732b26] = 'fix_send[2].send_start_index_0', + [0xe4ef3c83] = 'fix_send[2].send_size_0', + [0x4d43eea6] = 'fix_send[3].send_frequency_0', + [0x0873375b] = 'fix_send[3].send_start_index_0', + [0xe4efb983] = 'fix_send[3].send_size_0', + [0xa34b7f1f] = 'standard_range_min_0', + [0x9b557f1f] = 'standard_range_max_0', + [0x0cda8e11] = 'config_parameter.assistant_timeout_0', + [0x2a02a5df] = 'config_parameter.motor_stop_lock_0', + [0xa99b69e5] = 'g_config.device.is_locked_0', + [0x92003629] = 'g_config.system_command.mapper[COMMAND_AILERON]_0', + [0x4a43be60] = 'g_config.system_command.mapper[COMMAND_ELEVATOR]_0', + [0x1c195b96] = 'g_config.system_command.mapper[COMMAND_THROTTLE]_0', + [0xa478fe6d] = 'g_config.system_command.mapper[COMMAND_RUDDER]_0', + [0x20d8934b] = 'g_config.system_command.mapper[COMMAND_MODE]_0', + [0x9e38c661] = 'g_config.system_command.mapper[COMMAND_IOC]_0', + [0xe80fbdb5] = 'g_config.system_command.mapper[COMMAND_GO_HOME]_0', + [0x1f80d3b8] = 'g_config.system_command.mapper[COMMAND_AUTO_TAKE_OFF]_0', + [0x83f271d3] = 'g_config.system_command.mapper[COMMAND_KNOB_X1]_0', + [0x84f271d3] = 'g_config.system_command.mapper[COMMAND_KNOB_X2]_0', + [0x85f271d3] = 'g_config.system_command.mapper[COMMAND_KNOB_X3]_0', + [0x86f271d3] = 'g_config.system_command.mapper[COMMAND_KNOB_X4]_0', + [0x87f271d3] = 'g_config.system_command.mapper[COMMAND_KNOB_X5]_0', + [0x88f271d3] = 'g_config.system_command.mapper[COMMAND_KNOB_X6]_0', + [0x7a85de27] = 'g_config.system_command.mapper[COMMAND_PANTILT_PITCH]_0', + [0xd499a583] = 'g_config.system_command.mapper[COMMAND_PANTILT_ROLL]_0', + [0x82e5be2e] = 'g_config.system_command.mapper[COMMAND_PANTILT_YAW]_0', + [0x7c2e22e2] = 'g_config.system_command.mapper[COMMAND_H3_2D_TILT]_0', + [0x1fb83a7d] = 'g_config.system_command.mapper[COMMAND_D1]_0', + [0x20b83a7d] = 'g_config.system_command.mapper[COMMAND_D2]_0', + [0x21b83a7d] = 'g_config.system_command.mapper[COMMAND_D3]_0', + [0x22b83a7d] = 'g_config.system_command.mapper[COMMAND_D4]_0', + [0x2dba613c] = 'g_config.system_command.mapper[COMMAND_GEAR]_0', + [0xf8c3b05a] = 'g_config.system_command.reverse_input_0', + [0x63eb115b] = 'g_config.aircraft.aircraft_type_0', + [0x9bb356f8] = 'g_config.aircraft.custom_mix[0][0]_0', + [0x9cb356f8] = 'g_config.aircraft.custom_mix[0][1]_0', + [0x9db356f8] = 'g_config.aircraft.custom_mix[0][2]_0', + [0x9eb356f8] = 'g_config.aircraft.custom_mix[0][3]_0', + [0x9bb856f8] = 'g_config.aircraft.custom_mix[1][0]_0', + [0x9cb856f8] = 'g_config.aircraft.custom_mix[1][1]_0', + [0x9db856f8] = 'g_config.aircraft.custom_mix[1][2]_0', + [0x9eb856f8] = 'g_config.aircraft.custom_mix[1][3]_0', + [0x9bbd56f8] = 'g_config.aircraft.custom_mix[2][0]_0', + [0x9cbd56f8] = 'g_config.aircraft.custom_mix[2][1]_0', + [0x9dbd56f8] = 'g_config.aircraft.custom_mix[2][2]_0', + [0x9ebd56f8] = 'g_config.aircraft.custom_mix[2][3]_0', + [0x9bc256f8] = 'g_config.aircraft.custom_mix[3][0]_0', + [0x9cc256f8] = 'g_config.aircraft.custom_mix[3][1]_0', + [0x9dc256f8] = 'g_config.aircraft.custom_mix[3][2]_0', + [0x9ec256f8] = 'g_config.aircraft.custom_mix[3][3]_0', + [0x9bc756f8] = 'g_config.aircraft.custom_mix[4][0]_0', + [0x9cc756f8] = 'g_config.aircraft.custom_mix[4][1]_0', + [0x9dc756f8] = 'g_config.aircraft.custom_mix[4][2]_0', + [0x9ec756f8] = 'g_config.aircraft.custom_mix[4][3]_0', + [0x9bcc56f8] = 'g_config.aircraft.custom_mix[5][0]_0', + [0x9ccc56f8] = 'g_config.aircraft.custom_mix[5][1]_0', + [0x9dcc56f8] = 'g_config.aircraft.custom_mix[5][2]_0', + [0x9ecc56f8] = 'g_config.aircraft.custom_mix[5][3]_0', + [0x9bd156f8] = 'g_config.aircraft.custom_mix[6][0]_0', + [0x9cd156f8] = 'g_config.aircraft.custom_mix[6][1]_0', + [0x9dd156f8] = 'g_config.aircraft.custom_mix[6][2]_0', + [0x9ed156f8] = 'g_config.aircraft.custom_mix[6][3]_0', + [0x9bd656f8] = 'g_config.aircraft.custom_mix[7][0]_0', + [0x9cd656f8] = 'g_config.aircraft.custom_mix[7][1]_0', + [0x9dd656f8] = 'g_config.aircraft.custom_mix[7][2]_0', + [0x9ed656f8] = 'g_config.aircraft.custom_mix[7][3]_0', + [0x3d18e504] = 'g_config.aircraft.custom_num_of_motor_0', + [0x9f472a88] = 'g_config.imu_gps.imu_offset_x_0', + [0x9f482a88] = 'g_config.imu_gps.imu_offset_y_0', + [0x9f492a88] = 'g_config.imu_gps.imu_offset_z_0', + [0x6d4631ff] = 'g_config.imu_gps.gps_offset_x_0', + [0x6d4731ff] = 'g_config.imu_gps.gps_offset_y_0', + [0x6d4831ff] = 'g_config.imu_gps.gps_offset_z_0', + [0x094922ed] = 'g_config.imu_gps.mvo_offset_x_0', + [0x094a22ed] = 'g_config.imu_gps.mvo_offset_y_0', + [0x094b22ed] = 'g_config.imu_gps.mvo_offset_z_0', + [0x3718ae88] = 'g_config.imu_gps.imu_dir_0', + [0x5a082d3d] = 'g_config.imu_dir[0][0]_0', + [0x5b082d3d] = 'g_config.imu_dir[0][1]_0', + [0x5c082d3d] = 'g_config.imu_dir[0][2]_0', + [0x5a0d2d3d] = 'g_config.imu_dir[1][0]_0', + [0x5b0d2d3d] = 'g_config.imu_dir[1][1]_0', + [0x5c0d2d3d] = 'g_config.imu_dir[1][2]_0', + [0x5a122d3d] = 'g_config.imu_dir[2][0]_0', + [0x5b122d3d] = 'g_config.imu_dir[2][1]_0', + [0x5c122d3d] = 'g_config.imu_dir[2][2]_0', + [0xa7e5f3c9] = 'g_config.receiver.type_0', + [0x25b4d7f7] = 'g_config.receiver.calibration_type_0', + [0xa6eb2915] = 'g_config.receiver.travel_min[ 0]_0', + [0xa7eb2915] = 'g_config.receiver.travel_min[ 1]_0', + [0xa8eb2915] = 'g_config.receiver.travel_min[ 2]_0', + [0xa9eb2915] = 'g_config.receiver.travel_min[ 3]_0', + [0xaaeb2915] = 'g_config.receiver.travel_min[ 4]_0', + [0xabeb2915] = 'g_config.receiver.travel_min[ 5]_0', + [0xaceb2915] = 'g_config.receiver.travel_min[ 6]_0', + [0xadeb2915] = 'g_config.receiver.travel_min[ 7]_0', + [0xaeeb2915] = 'g_config.receiver.travel_min[ 8]_0', + [0xafeb2915] = 'g_config.receiver.travel_min[ 9]_0', + [0xa6eb296a] = 'g_config.receiver.travel_min[10]_0', + [0xa7eb296a] = 'g_config.receiver.travel_min[11]_0', + [0xa8eb296a] = 'g_config.receiver.travel_min[12]_0', + [0xa9eb296a] = 'g_config.receiver.travel_min[13]_0', + [0xaaeb296a] = 'g_config.receiver.travel_min[14]_0', + [0xabeb296a] = 'g_config.receiver.travel_min[15]_0', + [0x7f1d2915] = 'g_config.receiver.travel_max[ 0]_0', + [0x801d2915] = 'g_config.receiver.travel_max[ 1]_0', + [0x811d2915] = 'g_config.receiver.travel_max[ 2]_0', + [0x821d2915] = 'g_config.receiver.travel_max[ 3]_0', + [0x831d2915] = 'g_config.receiver.travel_max[ 4]_0', + [0x841d2915] = 'g_config.receiver.travel_max[ 5]_0', + [0x851d2915] = 'g_config.receiver.travel_max[ 6]_0', + [0x861d2915] = 'g_config.receiver.travel_max[ 7]_0', + [0x871d2915] = 'g_config.receiver.travel_max[ 8]_0', + [0x881d2915] = 'g_config.receiver.travel_max[ 9]_0', + [0x7f1d296a] = 'g_config.receiver.travel_max[10]_0', + [0x801d296a] = 'g_config.receiver.travel_max[11]_0', + [0x811d296a] = 'g_config.receiver.travel_max[12]_0', + [0x821d296a] = 'g_config.receiver.travel_max[13]_0', + [0x831d296a] = 'g_config.receiver.travel_max[14]_0', + [0x841d296a] = 'g_config.receiver.travel_max[15]_0', + [0x21599b36] = 'g_config.device.dbus_adapter_0', + [0x267697ec] = 'g_config.control.basic_craft_roll_0', + [0x6d96fe16] = 'g_config.control.basic_craft_pitch_0', + [0x7e316989] = 'g_config.control.basic_craft_yaw_0', + [0xb60e3dab] = 'g_config.control.basic_craft_thrust_0', + [0xcd725af3] = 'g_config.control.basic_roll_0', + [0x695a0859] = 'g_config.control.basic_pitch_0', + [0x19d8654e] = 'g_config.control.basic_yaw_0', + [0x79188097] = 'g_config.control.basic_thrust_0', + [0xc7801bfc] = 'g_config.control.tilt_atti_gain_0', + [0xe61698ca] = 'g_config.control.tilt_gyro_gain_0', + [0xc993ee5d] = 'g_config.control.tilt_gyro_acc_gain_0', + [0xdb5352b4] = 'g_config.control.torsion_atti_gain_0', + [0xf9e9cf82] = 'g_config.control.torsion_gyro_gain_0', + [0x2cb3fffa] = 'g_config.control.torsion_gyro_acc_gain_0', + [0xc33ea011] = 'g_config.control.horiz_pos_gain_0', + [0xa03f3517] = 'g_config.control.horiz_vel_gain_0', + [0x78a91cbc] = 'g_config.control.horiz_vel_damping_gain_0', + [0x2e22b2d4] = 'g_config.control.horiz_atti_damping_gain_0', + [0x1eea7d09] = 'g_config.control.horiz_i_gain_0', + [0x60941e3e] = 'g_config.control.vert_pos_gain_0', + [0x3d94b344] = 'g_config.control.vert_vel_gain_0', + [0x1092a612] = 'g_config.control.vert_acc_gain_0', + [0x04f31a5f] = 'g_config.control.vert_i_gain_0', + [0x16330043] = 'g_config.control.multi_control_mode_enable_0', + [0xde3b160b] = 'g_config.control.control_mode[0]_0', + [0xdf3b160b] = 'g_config.control.control_mode[1]_0', + [0xe03b160b] = 'g_config.control.control_mode[2]_0', + [0x89d49b2a] = 'g_config.advanced_function.fail_safe_protection_enabled_0', + [0xe5155514] = 'g_config.advanced_function.one_key_go_home_enabled_0', + [0xee98369f] = 'g_config.advanced_function.voltage_protection_enabled_0', + [0x80f73ae7] = 'g_config.advanced_function.intelligence_orientation_enabled_0', + [0xcb5f61b5] = 'g_config.advanced_function.pantilt_enabled_0', + [0xae52d19a] = 'g_config.advanced_function.height_limit_enabled_0', + [0xbf372921] = 'g_config.advanced_function.avoid_ground_enabled_0', + [0x7ece6d19] = 'g_config.advanced_function.radius_limit_enabled_0', + [0xaaf942e2] = 'g_config.advanced_function.intelligence_gear_enabled_0', + [0xcb653d71] = 'g_config.fail_safe.protect_action_0', + [0x97fbc173] = 'g_config.go_home.go_home_method_0', + [0x38cc63dc] = 'g_config.go_home.fixed_go_home_altitude_0', + [0x6e280d61] = 'g_config.go_home.go_home_heading_option_0', + [0xdc5c00af] = 'g_config.go_home.go_home_when_running_gs_0', + [0xb502df25] = 'g_config.pantilt.output_frequency_0', + [0xef56a152] = 'g_config.pantilt.roll_travel.travel_min_0', + [0xe760a152] = 'g_config.pantilt.roll_travel.travel_max_0', + [0x5a0b10be] = 'g_config.pantilt.roll_travel.travel_center_0', + [0x8f90baac] = 'g_config.pantilt.pitch_travel.travel_min_0', + [0x879abaac] = 'g_config.pantilt.pitch_travel.travel_max_0', + [0xb22c333b] = 'g_config.pantilt.pitch_travel.travel_center_0', + [0xbba240f9] = 'g_config.pantilt.yaw_travel.travel_min_0', + [0xb3ac40f9] = 'g_config.pantilt.yaw_travel.travel_max_0', + [0x00088ade] = 'g_config.pantilt.yaw_travel.travel_center_0', + [0x4d81490f] = 'g_config.pantilt.roll_gain_0', + [0x769b24a8] = 'g_config.pantilt.pitch_gain_0', + [0xd212479b] = 'g_config.pantilt.yaw_gain_0', + [0xd8a04994] = 'g_config.pantilt.reverse_output_0', + [0x788a8a9d] = 'g_config.pantilt.roll_speed_0', + [0x9266246a] = 'g_config.pantilt.pitch_speed_0', + [0x09891936] = 'g_config.pantilt.yaw_speed_0', + [0xa2a389c2] = 'g_config.intelligence_orientation.app_ioc_type_0', + [0x163fda61] = 'g_config.intelligence_orientation.control_mode[0]_0', + [0x173fda61] = 'g_config.intelligence_orientation.control_mode[1]_0', + [0x183fda61] = 'g_config.intelligence_orientation.control_mode[2]_0', + [0x425c0a94] = 'g_config.flying_limit.max_radius_0', + [0x0371238a] = 'g_config.flying_limit.max_height_0', + [0x0438298a] = 'g_config.flying_limit.min_height_0', + [0x0000e114] = 'g_config.flying_limit.auto_landing_enabled_0', + [0xaf4431b1] = 'g_config.knob.control_channel[KNOB_BASIC_ROLL]_0', + [0x25120b6e] = 'g_config.knob.control_channel[KNOB_BASIC_PITCH]_0', + [0x58c068bb] = 'g_config.knob.control_channel[KNOB_BASIC_YAW]_0', + [0x03fff884] = 'g_config.knob.control_channel[KNOB_BASIC_THRUST]_0', + [0xc42309e3] = 'g_config.knob.control_channel[KNOB_ATTI_GAIN]_0', + [0x5a9fd87e] = 'g_config.knob.control_channel[KNOB_GYRO_GAIN]_0', + [0x370e35f7] = 'g_config.knob.enabled_bits_0', + [0xfb29d937] = 'g_config.voltage.level_1_protect_0', + [0xfb42d937] = 'g_config.voltage.level_2_protect_0', + [0x3ecd7d52] = 'g_config.voltage.line_loss_0', + [0x8c006935] = 'g_config.voltage.calibrate_scale_0', + [0x41a4e115] = 'g_config.voltage.level_1_protect_type_0', + [0xbea4e115] = 'g_config.voltage.level_2_protect_type_0', + [0x58b4c372] = 'g_config.voltage.battery_cell_0', + [0x5aae5bcd] = 'g_config.voltage2.level_1_voltage_0', + [0xc214cd92] = 'g_config.voltage2.level_1_function_0', + [0x5ac75bcd] = 'g_config.voltage2.level_2_voltage_0', + [0xdb14cd92] = 'g_config.voltage2.level_2_function_0', + [0xe2c0cd6f] = 'g_config.voltage2.user_set_smart_bat_0', + [0xbc18a2a4] = 'g_config.voltage2.level1_smart_battert_gohome_0', + [0x79e5fb9b] = 'g_config.voltage2.level2_smart_battert_land_0', + [0xd2184d1f] = 'g_config.voltage2.judge_smart_battery_communite_0', + [0xbbb39539] = 'g_config.voltage2.vol_ceof_0', + [0x800de80e] = 'g_config.output_servo.reverse_bits_0', + [0x3615bc7b] = 'g_config.output_servo.center_offset[0]_0', + [0x3715bc7b] = 'g_config.output_servo.center_offset[1]_0', + [0x3815bc7b] = 'g_config.output_servo.center_offset[2]_0', + [0x3915bc7b] = 'g_config.output_servo.center_offset[3]_0', + [0x3a15bc7b] = 'g_config.output_servo.center_offset[4]_0', + [0x3b15bc7b] = 'g_config.output_servo.center_offset[5]_0', + [0x3c15bc7b] = 'g_config.output_servo.center_offset[6]_0', + [0x3d15bc7b] = 'g_config.output_servo.center_offset[7]_0', + [0x9b913bbd] = 'g_config.output_servo.min_limit[0]_0', + [0x9c913bbd] = 'g_config.output_servo.min_limit[1]_0', + [0x9d913bbd] = 'g_config.output_servo.min_limit[2]_0', + [0x9e913bbd] = 'g_config.output_servo.min_limit[3]_0', + [0x9f913bbd] = 'g_config.output_servo.min_limit[4]_0', + [0xa0913bbd] = 'g_config.output_servo.min_limit[5]_0', + [0xa1913bbd] = 'g_config.output_servo.min_limit[6]_0', + [0xa2913bbd] = 'g_config.output_servo.min_limit[7]_0', + [0x959137da] = 'g_config.output_servo.max_limit[0]_0', + [0x969137da] = 'g_config.output_servo.max_limit[1]_0', + [0x979137da] = 'g_config.output_servo.max_limit[2]_0', + [0x989137da] = 'g_config.output_servo.max_limit[3]_0', + [0x999137da] = 'g_config.output_servo.max_limit[4]_0', + [0x9a9137da] = 'g_config.output_servo.max_limit[5]_0', + [0x9b9137da] = 'g_config.output_servo.max_limit[6]_0', + [0x9c9137da] = 'g_config.output_servo.max_limit[7]_0', + [0x2f449a05] = 'g_config.output_servo.pwm_min_0', + [0x274e9a05] = 'g_config.output_servo.pwm_max_0', + [0xe91b9571] = 'g_config.engine.lower_bound_0', + [0x016c99db] = 'g_config.engine.upper_bound_0', + [0x53141284] = 'g_config.engine.idle_level_0', + [0x3b532ef6] = 'g_config.engine.idle_time_0', + [0x4c5635f5] = 'g_config.engine.stand_by_level_0', + [0x88a90e16] = 'g_config.engine.prop_auto_preload_0', + [0xb36410a7] = 'g_config.engine.motor_fc_0', + [0x482bd8e2] = 'g_config.craft_model.volt_max_0', + [0xbdd98742] = 'g_config.craft_model.kv_0', + [0xa4d08742] = 'g_config.craft_model.Rm_0', + [0x76832c19] = 'g_config.craft_model.I_max_0', + [0x7e792c19] = 'g_config.craft_model.I_min_0', + [0x88092911] = 'g_config.craft_model.Inertia_motor_0', + [0x95cf8742] = 'g_config.craft_model.Cl_0', + [0x95d48742] = 'g_config.craft_model.Cq_0', + [0x28890508] = 'g_config.craft_model.Inertia_prop_0', + [0x14a1485e] = 'g_config.craft_model.motor_tilt_angle_0', + [0xe372dfc7] = 'g_config.control.vel_smooth_time_0', + [0xbbf0287c] = 'g_config.control.vel_braking_threshold_0', + [0xde0fff00] = 'g_config.control.horiz_vel_atti_range_0', + [0x3d833d3a] = 'g_config.control.horiz_emergency_brake_tilt_max_0', + [0x9f9646e9] = 'g_config.control.atti_limit_0', + [0x9da51eee] = 'g_config.control.atti_range_0', + [0x93005d68] = 'g_config.control.avoid_atti_range_0', + [0x4fd745a0] = 'g_config.control.atti_tilt_w_rate_0', + [0x4fb63745] = 'g_config.control.atti_torsion_w_rate_0', + [0x75b33314] = 'g_config.control.manual_tilt_w_rate_0', + [0xc47382e6] = 'g_config.control.manual_torsion_w_rate_0', + [0x3d45f2c8] = 'g_config.control.vert_up_vel_0', + [0x70dbcaa7] = 'g_config.control.vert_down_vel_0', + [0xe9d8b514] = 'g_config.control.thr_exp_mid_point_0', + [0xf5fcaa49] = 'g_config.control.yaw_exp_mid_point_0', + [0x2b53609f] = 'g_config.control.tilt_exp_mid_point_0', + [0xbdc6ae31] = 'g_config.control.dyn_safe_thrust_0', + [0xc956d11c] = 'g_config.control.dyn_tilt_min_0', + [0x34f043ac] = 'g_config.control.rotor_fault_test_type_0', + [0xdfb7fbd6] = 'g_config.control.rotor_fault_detection_time_0', + [0x9eeedfaa] = 'g_config.control.brake_sensitivity_0', + [0x43224470] = 'g_config.control.rc_tilt_sensitivity_0', + [0x424799b9] = 'g_config.control.rc_yaw_sensitivity_0', + [0x4de15af5] = 'g_config.control.rc_throttle_sensitivity_0', + [0xe6e339fa] = 'g_config.control.torsion_ang_vel_cmd_slope_0', + [0xdca13b95] = 'g_config.control.torsion_ang_acc_cmd_slope_0', + [0x7778ce09] = 'g_config.control.throttle_output_max_0', + [0xfb0448a7] = 'g_config.control.yaw_output_max_0', + [0x54412dac] = 'g_config.control.atti_bat_limit_0', + [0xbfa51130] = 'g_config.control.torsion_w_rate_bat_limit_0', + [0x4ef3060f] = 'g_config.control.vert_vel_up_bat_limit_0', + [0x5d1cda43] = 'g_config.control.vert_vel_down_bat_limit_0', + [0x41478a8a] = 'g_config.imu_para_cfg.baro_cfg.pos_baro_gain_0', + [0x4430a51f] = 'g_config.imu_para_cfg.baro_cfg.vel_baro_gain_0', + [0x39eea6ba] = 'g_config.imu_para_cfg.baro_cfg.acc_baro_gain_0', + [0x08c8dc53] = 'g_config.imu_para_cfg.baro_cfg.acc_bias_baro_p_gain_0', + [0xe5c8dc4e] = 'g_config.imu_para_cfg.baro_cfg.acc_bias_baro_i_gain_0', + [0x30acd64b] = 'g_config.imu_para_cfg.imu_para_filter.w_fc_0', + [0x30ac684b] = 'g_config.imu_para_cfg.imu_para_filter.a_fc_0', + [0x7f0bab81] = 'g_config.imu_para_cfg.imu_para_filter.w_a_fc1_0', + [0x7f0cab81] = 'g_config.imu_para_cfg.imu_para_filter.w_a_fc2_0', + [0xd89d7078] = 'g_config.imu_para_cfg.imu_para_filter.vel_fc_0', + [0x6f934378] = 'g_config.imu_para_cfg.imu_para_filter.acc_fc_0', + [0x8b525fe9] = 'g_config.imu_para_cfg.imu_adv_func.fuse_with_usonic_0', + [0xf0318606] = 'g_config.imu_para_cfg.imu_adv_func.fuse_with_vo_z_0', + [0x4ef39e97] = 'g_config.imu_para_cfg.imu_adv_func.vo_source_type_0', + [0x74b5b183] = 'g_config.imu_para_cfg.imu_adv_func.vo_vel_with_large_tilt_deny_0', + [0x7a8e3c44] = 'g_config.imu_para_cfg.imu_adv_func.vo_vel_strong_outlier_deny_0', + [0xf62ed066] = 'g_config.imu_para_cfg.imu_adv_func.vo_vel_with_3m_deny_0', + [0xb64b78e5] = 'g_config.imu_para_cfg.imu_adv_func.vo_vel_pg_flag_couple_0', + [0x5b317388] = 'g_config.imu_para_cfg.imu_adv_func.vo_delay_tick_0', + [0x63fc1641] = 'g_config.imu_para_cfg.imu_adv_func.fuse_with_rtk_0', + [0xde9b1b7b] = 'g_config.novice_cfg.novice_func_enabled_0', + [0xd9ab9f79] = 'g_config.novice_cfg.max_height_0', + [0x18968688] = 'g_config.novice_cfg.max_radius_0', + [0x81b81491] = 'g_config.novice_cfg.atti_range_0', + [0x1c038b7b] = 'g_config.novice_cfg.atti_tilt_w_rate_0', + [0x29b314a3] = 'g_config.novice_cfg.atti_torsion_w_rate_0', + [0x503b953c] = 'g_config.novice_cfg.vert_up_vel_0', + [0x13502975] = 'g_config.novice_cfg.vert_down_vel_0', + [0xb9a37abd] = 'g_config.led_cfg.new_led_enable_0', + [0xc5429582] = 'g_config.gps_cfg.gps_enable_0', + [0xde346e72] = 'g_config.gps_cfg.super_svn_0', + [0xaafda7b2] = 'g_config.gps_cfg.fix_svn_0', + [0xd8cf9a09] = 'g_config.gps_cfg.good_svn_0', + [0x357f6e2c] = 'g_config.gps_cfg.super_hdop_0', + [0xfeb8ad28] = 'g_config.gps_cfg.fix_hdop_0', + [0xd0ab050e] = 'g_config.gps_cfg.good_hdop_0', + [0x97723ffc] = 'g_config.gear_cfg.gear_speed_0', + [0xa67353e8] = 'g_config.gear_cfg.gear_state_0', + [0x3679c82d] = 'g_config.gear_cfg.pack_flag_0', + [0x45780e6e] = 'g_config.gear_cfg.pack_type_0', + [0xd6b8ed23] = 'g_config.gear_cfg.pack_height_up_0', + [0x05653bc8] = 'g_config.gear_cfg.pack_height_down_0', + [0x5d45e217] = 'g_config.gear_cfg.auto_control_enable_0', + [0x60393030] = 'g_config.esc_cfg.communicate_check_0', + [0x97be0658] = 'g_config.mvo_cfg.mvo_func_en_0', + [0xe79ce1ec] = 'g_config.serial_api_cfg.advance_function_enable_0', + [0xf644897d] = 'g_config.serial_api_cfg.input_pitch_limit_0', + [0xabd7594c] = 'g_config.serial_api_cfg.input_roll_limit_0', + [0xd09ebbe4] = 'g_config.serial_api_cfg.input_yaw_rate_limit_0', + [0x4a9c9a1a] = 'g_config.serial_api_cfg.input_vertical_velocity_limit_0', + [0x80b4731b] = 'g_config.api_entry_cfg.channel_0', + [0x8511d8d1] = 'g_config.api_entry_cfg.comp_sign_0', + [0x02261c5a] = 'g_config.api_entry_cfg.value_sign_0', + [0x7da9bac9] = 'g_config.api_entry_cfg.enable_mode_0', + [0x3e483a76] = 'g_config.api_entry_cfg.abs_value_0', + [0x55ee7671] = 'g_config.api_entry_cfg.baud_rate_0', + [0x8682a34d] = 'g_config.api_entry_cfg.enable_api_0', + [0xc325cbaa] = 'g_config.api_entry_cfg.enable_time_stamp_0', + [0x41ef63e8] = 'g_config.api_entry_cfg.acc_data_type_0', + [0x800f815c] = 'g_config.api_entry_cfg.gyro_data_type_0', + [0x8bb7785f] = 'g_config.api_entry_cfg.alti_data_type_0', + [0x96a0a2cf] = 'g_config.api_entry_cfg.height_data_type_0', + [0x9266280c] = 'g_config.api_entry_cfg.std_msg_frq[0]_0', + [0x9366280c] = 'g_config.api_entry_cfg.std_msg_frq[1]_0', + [0x9466280c] = 'g_config.api_entry_cfg.std_msg_frq[2]_0', + [0x9566280c] = 'g_config.api_entry_cfg.std_msg_frq[3]_0', + [0x9666280c] = 'g_config.api_entry_cfg.std_msg_frq[4]_0', + [0x9766280c] = 'g_config.api_entry_cfg.std_msg_frq[5]_0', + [0x9866280c] = 'g_config.api_entry_cfg.std_msg_frq[6]_0', + [0x9966280c] = 'g_config.api_entry_cfg.std_msg_frq[7]_0', + [0x9a66280c] = 'g_config.api_entry_cfg.std_msg_frq[8]_0', + [0x9b66280c] = 'g_config.api_entry_cfg.std_msg_frq[9]_0', + [0x39263e0f] = 'g_config.api_entry_cfg.std_msg_frq[10]_0', + [0x3a263e0f] = 'g_config.api_entry_cfg.std_msg_frq[11]_0', + [0x3b263e0f] = 'g_config.api_entry_cfg.std_msg_frq[12]_0', + [0x3c263e0f] = 'g_config.api_entry_cfg.std_msg_frq[13]_0', + [0x3d263e0f] = 'g_config.api_entry_cfg.std_msg_frq[14]_0', + [0x3e263e0f] = 'g_config.api_entry_cfg.std_msg_frq[15]_0', + [0x7b24ba4b] = 'g_config.api_entry_cfg.authority_level_0', + [0x9987e879] = 'g_config.api_entry_cfg.cheat_backdoor_0', + [0xfe3c446d] = 'g_config.api_entry_cfg.api_authority_group[0]_0', + [0xff3c446d] = 'g_config.api_entry_cfg.api_authority_group[1]_0', + [0x003c4472] = 'g_config.api_entry_cfg.api_authority_group[2]_0', + [0x013c4472] = 'g_config.api_entry_cfg.api_authority_group[3]_0', + [0x3b46ca92] = 'g_config.airport_limit_cfg.cfg_search_radius_0', + [0x8fb32a2d] = 'g_config.airport_limit_cfg.cfg_disable_airport_fly_limit_0', + [0x5a552edf] = 'g_config.airport_limit_cfg.cfg_debug_airport_enable_0', + [0xb04ab3bb] = 'g_config.airport_limit_cfg.cfg_limit_data_0', + [0x3454b6b5] = 'g_config.airport_limit_cfg.cfg_sim_disable_limit_0', + [0x5eedfa54] = 'g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_AIRPORT]_0', + [0x15ae9eae] = 'g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_SPECIAL]_0', + [0xc2fc569a] = 'g_config.airport_limit_cfg.cfg_r1[FLY_LIMIT_TYPE_AIRPORT]_0', + [0x79bcfaf4] = 'g_config.airport_limit_cfg.cfg_r1[FLY_LIMIT_TYPE_SPECIAL]_0', + [0x68fc4ab0] = 'g_config.airport_limit_cfg.cfg_h1[FLY_LIMIT_TYPE_AIRPORT]_0', + [0x1fbcef0a] = 'g_config.airport_limit_cfg.cfg_h1[FLY_LIMIT_TYPE_SPECIAL]_0', + [0xc7e8efa5] = 'g_config.airport_limit_cfg.cfg_angle[FLY_LIMIT_TYPE_AIRPORT]_0', + [0x7ea993ff] = 'g_config.airport_limit_cfg.cfg_angle[FLY_LIMIT_TYPE_SPECIAL]_0', + [0x60fd01df] = 'g_config.avoid_obstacle_limit_cfg.avoid_obstacle_enable_0', + [0x74bfebe1] = 'g_config.avoid_obstacle_limit_cfg.a_dec_max_0', + [0xd0d1ec13] = 'g_config.avoid_obstacle_limit_cfg.v_fwd_max_0', + [0x6cf4ebaf] = 'g_config.avoid_obstacle_limit_cfg.v_bck_max_0', + [0x3bc09f07] = 'g_config.avoid_obstacle_limit_cfg.gain_dv2acc_0', + [0xc3885504] = 'g_config.avoid_obstacle_limit_cfg.safe_dis_0', + [0x73eab199] = 'g_config.avoid_obstacle_limit_cfg.damping_dis_0', + [0x55d30cfc] = 'g_config.misc_cfg.imu_temp_ctrl_slope_0', + [0xedce59a2] = 'g_config.misc_cfg.forearm_lamp_ctrl_0', + [0x7813de1c] = 'g_config.misc_cfg.auto_takeoff_height_0', + [0x249a7c63] = 'g_config.misc_cfg.auto_landing_vel_L1_0', + [0x249b7c63] = 'g_config.misc_cfg.auto_landing_vel_L2_0', + [0x78eac90c] = 'g_config.hotpoint_cfg.battery_low_go_home_enable_0', + [0x25c9b281] = 'g_config.hotpoint_cfg.enable_mode_0', + [0x5d5ca5b8] = 'g_config.hotpoint_cfg.free_yaw_0', + [0xc3d57cfd] = 'g_config.hotpoint_cfg.auto_recover_0', + [0x2652c2fb] = 'g_config.hotpoint_cfg.limit_height_0', + [0x290f6811] = 'g_config.hotpoint_cfg.yaw_change_range_0', + [0x8f2ce62c] = 'g_config.hotpoint_cfg.max_yaw_rate_0', + [0x639d9233] = 'g_config.hotpoint_cfg.max_angle_rate_0', + [0xa457e66b] = 'g_config.hotpoint_cfg.max_tangent_vel_0', + [0xc8a52125] = 'g_config.hotpoint_cfg.min_radius_0', + [0xc7de1b25] = 'g_config.hotpoint_cfg.max_radius_0', + [0x679c3cf9] = 'g_config.hotpoint_cfg.max_vert_vel_0', + [0x4cc2e85b] = 'g_config.hotpoint_cfg.max_radius_vel_0', + [0x89ba3a1b] = 'g_config.hotpoint_cfg.min_height_0', + [0x7dbe272b] = 'g_config.hotpoint_cfg.max_acc_0', + [0x6a938535] = 'g_config.hotpoint_cfg.max_distance_0', + [0xab36c6f5] = 'g_config.hotpoint_cfg.pos_gain_0', + [0x88375bfb] = 'g_config.hotpoint_cfg.vel_gain_0', + [0x86ec719e] = 'g_config.hotpoint_cfg.centripetal_gain_0', + [0x37c42b2e] = 'g_config.hotpoint_cfg.cmd_slope_0', + [0xb13a6a0c] = 'g_config.hotpoint_cfg.output_slope_0', + [0xaa95c15e] = 'g_config.home_lock_cfg.max_horiz_vel_0', + [0x3ae9db81] = 'g_config.home_lock_cfg.min_fence_0', + [0x85ad69b4] = 'g_config.home_lock_cfg.max_angle_rate_0', + [0xb42f6815] = 'g_config.home_lock_cfg.max_tangent_vel_0', + [0x6ed2bfdc] = 'g_config.home_lock_cfg.max_radius_vel_0', + [0x7c536f10] = 'g_config.home_lock_cfg.fence_buffer_0', + [0xb6dd496e] = 'g_config.followme_cfg.enable_mode_0', + [0xd76c6cd2] = 'g_config.followme_cfg.auto_recover_0', + [0x9236d151] = 'g_config.followme_cfg.enable_change_homepoint_0', + [0x1b924425] = 'g_config.followme_cfg.auto_gimbal_pitch_0', + [0x52f2b315] = 'g_config.followme_cfg.enter_gps_level_0', + [0xd478b274] = 'g_config.followme_cfg.horiz_vel_limit_0', + [0x861949f4] = 'g_config.followme_cfg.min_init_height_0', + [0xf0275086] = 'g_config.followme_cfg.min_us_limit_height_0', + [0xc9f98b88] = 'g_config.followme_cfg.min_press_limit_height_0', + [0xfaf5edda] = 'g_config.followme_cfg.p_horiz_vel_ctrl_0', + [0x19c60181] = 'g_config.followme_cfg.slop_horiz_vel_0', + [0x69983853] = 'g_config.followme_cfg.max_drone_to_drone_dist_0', + [0x2a9eca5c] = 'g_config.followme_cfg.max_phone_to_phone_dist_0', + [0xd3ed109f] = 'g_config.followme_cfg.set_circle_0', + [0xbe269781] = 'g_config.followme_cfg.min_limit_radius_0', + [0xa0268412] = 'g_config.followme_cfg.max_limit_radius_0', + [0xce187431] = 'g_config.followme_cfg.cmd_yaw_factor_0', + [0x43326f8e] = 'g_config.followme_cfg.follow_me_wait_0', + [0x4ef6fd0f] = 'g_config.followme_cfg.follow_me_with_rc_cmd_0', + [0x4862b6b9] = 'g_config.followme_cfg.test_yaw_mode_0', + [0x42d36fc1] = 'g_config.followme_cfg.estimate_vel_filter_fc_0', + [0x3fea552c] = 'g_config.followme_cfg.estimate_pos_filter_fc_0', + [0xca79f23d] = 'g_config.followme_cfg.brakes_pos_filter_fc_0', + [0x49994564] = 'g_config.followme_cfg.vel_front_feed_para_0', + [0x3259e434] = 'g_config.waypoint_cfg.enable_mode_0', + [0xf7cdf035] = 'g_config.waypoint_cfg.max_vert_vel_0', + [0x8f26f058] = 'g_config.waypoint_cfg.max_horiz_vel_0', + [0x29dee7de] = 'g_config.waypoint_cfg.max_auto_yaw_rate_0', + [0xe178f630] = 'g_config.waypoint_cfg.max_line_acc_0', + [0xcd3885ef] = 'g_config.waypoint_cfg.max_curve_acc_0', + [0xaca9d874] = 'g_config.fdi.min_compass_mod_value_0', + [0xac48aa86] = 'g_config.fdi.max_compass_mod_value_0', + [0x974a7e91] = 'g_config.fdi.min_compass_mod_stdvar_0', + [0x361c9091] = 'g_config.fdi.max_compass_mod_stdvar_0', + [0x0eea9bff] = 'g_config.fdi.max_compass_mod_over_count_0', + [0x38dee89b] = 'g_config.fdi.max_acc_compass_angle_over_count_0', + [0x9d559c75] = 'g_config.fdi.max_acc_mod_deviate_for_detect_0', + [0xacc07101] = 'g_config.fdi.max_acc_mod_deviate_for_calibration_0', + [0xd1996aec] = 'g_config.fdi.max_acc_compass_angle_deviate_0', + [0xb41780a7] = 'g_config.fdi.min_acc_compass_angle_time_0', + [0x40056ccd] = 'g_config.fdi.max_mag_stdvar_for_angle_detection_0', + [0xd21e6aeb] = 'g_config.fdi.gps_intergrate_predict_time_0', + [0x8e6aefb4] = 'g_config.fdi.gps_max_pos_predict_error_0', + [0x9cf8749d] = 'g_config.fdi.gps_max_vel_predict_error_0', + [0xf9409015] = 'g_config.fdi.gps_max_horizontal_vel_mod_0', + [0x6b4f8819] = 'g_config.fdi.gps_min_horizontal_vel_stdvar_0', + [0x42971bef] = 'g_config.fdi.gps_max_horizontal_vel_diff_0', + [0x0f6bf56e] = 'g_config.fdi.gps_max_horizontal_vel_over_count_0', + [0x2b638f84] = 'g_config.fdi.gps_max_horizontal_pos_mod_0', + [0xd64a3714] = 'g_config.fdi.gps_min_horizontal_pos_stdvar_0', + [0x659686e9] = 'g_config.fdi.gps_max_horizontal_pos_diff_0', + [0x2651605f] = 'g_config.fdi.gps_max_horizontal_pos_over_count_0', + [0x1350cfaf] = 'g_config.fdi.max_gyro_mod_value_0', + [0xadd7b6f3] = 'g_config.fdi.min_gyro_mod_stdvar_0', + [0x3e41b694] = 'g_config.fdi.max_gyro_mod_stdvar_0', + [0xad03f0c5] = 'g_config.fdi.max_gyro_mod_diff_0', + [0x37a45a0e] = 'g_config.fdi.max_gyro_mod_over_count_0', + [0x11eebcff] = 'g_config.fdi.min_acc_mod_value_0', + [0x11db4d69] = 'g_config.fdi.max_acc_mod_value_0', + [0xdc2f068a] = 'g_config.fdi.min_acc_mod_stdvar_0', + [0xc8bf708a] = 'g_config.fdi.max_acc_mod_stdvar_0', + [0x9f027b43] = 'g_config.fdi.max_acc_mod_diff_0', + [0xec18fbe6] = 'g_config.fdi.max_acc_mod_over_count_0', + [0x87091f9a] = 'g_config.fdi.min_baro_value_0', + [0x8326019a] = 'g_config.fdi.max_baro_value_0', + [0xf691a3d3] = 'g_config.fdi.min_baro_stdvar_0', + [0xdc73c5f6] = 'g_config.fdi.max_baro_diff_0', + [0x619dfbf9] = 'g_config.fdi.max_baro_over_count_0', + [0xaf7a5241] = 'g_config.fdi.history_tick_k_0', + [0xa6d56a37] = 'g_config.fdi.pwm_delay_tick_0', + [0x069ac154] = 'g_config.fdi.max_horizontal_vel_fusion_error_0', + [0x495356c8] = 'g_config.fdi.max_ctrl_frequency_power_0', + [0xa3d90924] = 'g_config.fdi.min_ctrl_frequency_interesting_0', + [0x73a901f4] = 'g_config.fdi.max_ahrs_init_gyro_bias_0', + [0xa1350bcb] = 'g_config.fdi.max_ahrs_init_acc_bias_0', + [0xf4d27cd0] = 'g_config.fdi.max_ahrs_init_magn_x_noise_0', + [0x957e3d65] = 'g_config.fdi.max_ahrs_init_magn_yz_noise_0', + [0x72414223] = 'g_config.fdi.max_ahrs_init_trans_acc_0', + [0x754332bf] = 'g_config.fdi.max_ahrs_init_wz_integral_0', + [0x0c3b3b4d] = 'g_config.fdi.max_ahrs_init_wxy_integral_0', + [0x4c4ccb3a] = 'g_config.fdi.max_static_acc_stdvar_0', + [0x5ea6a219] = 'g_config.fdi.max_static_gyro_stdvar_0', + [0xac683df4] = 'g_config.fdi_open.compass_fdi_open_0', + [0x06341ff8] = 'g_config.fdi_open.gps_fdi_open_0', + [0xec34b890] = 'g_config.fdi_open.gyro_fdi_open_0', + [0x76312b95] = 'g_config.fdi_open.acc_fdi_open_0', + [0xe9b80090] = 'g_config.fdi_open.baro_fdi_open_0', + [0x20e7ea9f] = 'g_config.fdi_open.motor_fdi_open_0', + [0xe2fb9c75] = 'g_config.fdi_open.motor_kf_fdi_open_0', + [0x17b04351] = 'g_config.fdi_open.motor_rls_fdi_open_0', + [0x87a9edb2] = 'g_config.fdi_open.motor_esc_fdi_open_0', + [0x160494ea] = 'g_config.fdi_open.motor_ctrl_fdi_open_0', + [0x4d3e6b95] = 'g_config.fdi_open.ahrs_fdi_open_0', + [0x7506fff3] = 'g_config.fdi_open.ahrs_bias_fdi_open_0', + [0x4662b8b4] = 'g_config.fdi_open.ahrs_vel_fdi_open_0', + [0x917474db] = 'g_config.fdi_open.ahrs_init_fdi_open_0', + [0x6c079662] = 'g_config.fdi_open.ahrs_motor_fdi_open_0', + [0x9f3e4790] = 'g_config.fdi_open.ctrl_fdi_open_0', + [0x2fadd570] = 'g_config.fdi_open.ctrl_impact_fdi_open_0', + [0x9e5185f3] = 'g_config.fdi_open.ctrl_vibrate_fdi_open_0', + [0x19c6eb09] = 'g_config.fdi_inject.imu_0', + [0xfe2e4bbc] = 'g_config.fdi_inject.compass_0', + [0x25789feb] = 'g_raw.input.channel[ 0]_0', + [0x26789feb] = 'g_raw.input.channel[ 1]_0', + [0x27789feb] = 'g_raw.input.channel[ 2]_0', + [0x28789feb] = 'g_raw.input.channel[ 3]_0', + [0x29789feb] = 'g_raw.input.channel[ 4]_0', + [0x2a789feb] = 'g_raw.input.channel[ 5]_0', + [0x2b789feb] = 'g_raw.input.channel[ 6]_0', + [0x2c789feb] = 'g_raw.input.channel[ 7]_0', + [0x2d789feb] = 'g_raw.input.channel[ 8]_0', + [0x2e789feb] = 'g_raw.input.channel[ 9]_0', + [0x2578a040] = 'g_raw.input.channel[10]_0', + [0x2678a040] = 'g_raw.input.channel[11]_0', + [0x2778a040] = 'g_raw.input.channel[12]_0', + [0x2878a040] = 'g_raw.input.channel[13]_0', + [0x2978a040] = 'g_raw.input.channel[14]_0', + [0x2a78a040] = 'g_raw.input.channel[15]_0', + [0x8f8bcb1c] = 'g_real.input.channel[COMMAND_AILERON]_0', + [0xd5d8b151] = 'g_real.input.channel[COMMAND_ELEVATOR]_0', + [0xa7ae4e87] = 'g_real.input.channel[COMMAND_THROTTLE]_0', + [0x3b768a04] = 'g_real.input.channel[COMMAND_RUDDER]_0', + [0x3cc32a48] = 'g_real.input.channel[COMMAND_MODE]_0', + [0x3754b0fa] = 'g_real.input.channel[COMMAND_IOC]_0', + [0xe59b52a8] = 'g_real.input.channel[COMMAND_GO_HOME]_0', + [0x083f965a] = 'g_real.input.channel[COMMAND_AUTO_TAKE_OFF]_0', + [0x817e06c6] = 'g_real.input.channel[COMMAND_KNOB_X1]_0', + [0x827e06c6] = 'g_real.input.channel[COMMAND_KNOB_X2]_0', + [0x837e06c6] = 'g_real.input.channel[COMMAND_KNOB_X3]_0', + [0x847e06c6] = 'g_real.input.channel[COMMAND_KNOB_X4]_0', + [0x857e06c6] = 'g_real.input.channel[COMMAND_KNOB_X5]_0', + [0x867e06c6] = 'g_real.input.channel[COMMAND_KNOB_X6]_0', + [0x6344a0c9] = 'g_real.input.channel[COMMAND_PANTILT_PITCH]_0', + [0x8e826447] = 'g_real.input.channel[COMMAND_PANTILT_ROLL]_0', + [0x769fa6ed] = 'g_real.input.channel[COMMAND_PANTILT_YAW]_0', + [0x6f21dccb] = 'g_real.input.channel[COMMAND_H3_2D_TILT]_0', + [0xa4515665] = 'g_real.input.channel[COMMAND_D1]_0', + [0xa5515665] = 'g_real.input.channel[COMMAND_D2]_0', + [0xa6515665] = 'g_real.input.channel[COMMAND_D3]_0', + [0xa7515665] = 'g_real.input.channel[COMMAND_D4]_0', + [0x49a4f839] = 'g_real.input.channel[COMMAND_GEAR]_0', + [0x8998d47a] = 'g_real.imu.ax_0', + [0x8999d47a] = 'g_real.imu.ay_0', + [0x899ad47a] = 'g_real.imu.az_0', + [0x9f98d47a] = 'g_real.imu.wx_0', + [0x9f99d47a] = 'g_real.imu.wy_0', + [0x9f9ad47a] = 'g_real.imu.wz_0', + [0x9598d47a] = 'g_real.imu.mx_0', + [0x9599d47a] = 'g_real.imu.my_0', + [0x959ad47a] = 'g_real.imu.mz_0', + [0x9950d47a] = 'g_real.imu.q0_0', + [0x9951d47a] = 'g_real.imu.q1_0', + [0x9952d47a] = 'g_real.imu.q2_0', + [0x9953d47a] = 'g_real.imu.q3_0', + [0x7e18ef84] = 'g_raw.gps_snr.snr[0]_0', + [0x7f18ef84] = 'g_raw.gps_snr.snr[1]_0', + [0x8018ef84] = 'g_raw.gps_snr.snr[2]_0', + [0x8118ef84] = 'g_raw.gps_snr.snr[3]_0', + [0x8218ef84] = 'g_raw.gps_snr.snr[4]_0', + [0x8318ef84] = 'g_raw.gps_snr.snr[5]_0', + [0x8418ef84] = 'g_raw.gps_snr.snr[6]_0', + [0x8518ef84] = 'g_raw.gps_snr.snr[7]_0', + [0x8618ef84] = 'g_raw.gps_snr.snr[8]_0', + [0x8718ef84] = 'g_raw.gps_snr.snr[9]_0', + [0xebedb5a6] = 'g_raw.gps_snr.snr[10]_0', + [0xecedb5a6] = 'g_raw.gps_snr.snr[11]_0', + [0xededb5a6] = 'g_raw.gps_snr.snr[12]_0', + [0xeeedb5a6] = 'g_raw.gps_snr.snr[13]_0', + [0xefedb5a6] = 'g_raw.gps_snr.snr[14]_0', + [0xf0edb5a6] = 'g_raw.gps_snr.snr[15]_0', + [0xf1edb5a6] = 'g_raw.gps_snr.snr[16]_0', + [0xf2edb5a6] = 'g_raw.gps_snr.snr[17]_0', + [0xf3edb5a6] = 'g_raw.gps_snr.snr[18]_0', + [0xf4edb5a6] = 'g_raw.gps_snr.snr[19]_0', + [0xebedb5ab] = 'g_raw.gps_snr.snr[20]_0', + [0xecedb5ab] = 'g_raw.gps_snr.snr[21]_0', + [0xededb5ab] = 'g_raw.gps_snr.snr[22]_0', + [0xeeedb5ab] = 'g_raw.gps_snr.snr[23]_0', + [0xefedb5ab] = 'g_raw.gps_snr.snr[24]_0', + [0xf0edb5ab] = 'g_raw.gps_snr.snr[25]_0', + [0xf1edb5ab] = 'g_raw.gps_snr.snr[26]_0', + [0xf2edb5ab] = 'g_raw.gps_snr.snr[27]_0', + [0xf3edb5ab] = 'g_raw.gps_snr.snr[28]_0', + [0xf4edb5ab] = 'g_raw.gps_snr.snr[29]_0', + [0xebedb5b0] = 'g_raw.gps_snr.snr[30]_0', + [0xecedb5b0] = 'g_raw.gps_snr.snr[31]_0', + [0xededb5b0] = 'g_raw.gps_snr.snr[32]_0', + [0xeeedb5b0] = 'g_raw.gps_snr.snr[33]_0', + [0xefedb5b0] = 'g_raw.gps_snr.snr[34]_0', + [0xf0edb5b0] = 'g_raw.gps_snr.snr[35]_0', + [0xf1edb5b0] = 'g_raw.gps_snr.snr[36]_0', + [0xf2edb5b0] = 'g_raw.gps_snr.snr[37]_0', + [0xf3edb5b0] = 'g_raw.gps_snr.snr[38]_0', + [0xf4edb5b0] = 'g_raw.gps_snr.snr[39]_0', + [0xebedb5b5] = 'g_raw.gps_snr.snr[40]_0', + [0xecedb5b5] = 'g_raw.gps_snr.snr[41]_0', + [0xededb5b5] = 'g_raw.gps_snr.snr[42]_0', + [0xeeedb5b5] = 'g_raw.gps_snr.snr[43]_0', + [0xefedb5b5] = 'g_raw.gps_snr.snr[44]_0', + [0xf0edb5b5] = 'g_raw.gps_snr.snr[45]_0', + [0xf1edb5b5] = 'g_raw.gps_snr.snr[46]_0', + [0xf2edb5b5] = 'g_raw.gps_snr.snr[47]_0', + [0xf3edb5b5] = 'g_raw.gps_snr.snr[48]_0', + [0xf4edb5b5] = 'g_raw.gps_snr.snr[49]_0', + [0xebedb5ba] = 'g_raw.gps_snr.snr[50]_0', + [0xecedb5ba] = 'g_raw.gps_snr.snr[51]_0', + [0xededb5ba] = 'g_raw.gps_snr.snr[52]_0', + [0xeeedb5ba] = 'g_raw.gps_snr.snr[53]_0', + [0xefedb5ba] = 'g_raw.gps_snr.snr[54]_0', + [0xf0edb5ba] = 'g_raw.gps_snr.snr[55]_0', + [0xf1edb5ba] = 'g_raw.gps_snr.snr[56]_0', + [0xf2edb5ba] = 'g_raw.gps_snr.snr[57]_0', + [0xf3edb5ba] = 'g_raw.gps_snr.snr[58]_0', + [0xf4edb5ba] = 'g_raw.gps_snr.snr[59]_0', + [0xebedb5bf] = 'g_raw.gps_snr.snr[60]_0', + [0xecedb5bf] = 'g_raw.gps_snr.snr[61]_0', + [0xededb5bf] = 'g_raw.gps_snr.snr[62]_0', + [0xeeedb5bf] = 'g_raw.gps_snr.snr[63]_0', + [0x1c071f19] = 'AttiData_200Hz.press_0', + [0x201d2a3b] = 'g_raw.battery_info.design_capacity_0', + [0x9159c556] = 'g_raw.battery_info.full_charge_capacity_0', + [0x5f07e38d] = 'g_raw.battery_info.remaining_capacity_0', + [0x80c2365c] = 'g_raw.battery_info.pack_voltage_0', + [0x8821f3f2] = 'g_raw.battery_info.current_0', + [0xfc8711ea] = 'g_raw.battery_info.life_percentage_0', + [0x8b0b3187] = 'g_raw.battery_info.capacity_percentage_0', + [0x9e336395] = 'g_raw.battery_info.temperature_0', + [0x2e51de52] = 'g_raw.battery_info.cycle_count_0', + [0x9bf8c95a] = 'g_raw.battery_info.serial_number_0', + [0x57468777] = 'g_raw.battery_info.cell_voltage[0]_0', + [0x58468777] = 'g_raw.battery_info.cell_voltage[1]_0', + [0x59468777] = 'g_raw.battery_info.cell_voltage[2]_0', + [0x5a468777] = 'g_raw.battery_info.cell_voltage[3]_0', + [0x5b468777] = 'g_raw.battery_info.cell_voltage[4]_0', + [0x5c468777] = 'g_raw.battery_info.cell_voltage[5]_0', + [0xcb316c3b] = 'g_raw.battery_info.average_current_0', + [0xadb43ca3] = 'g_raw.battery_info.right_0', + [0x80c92b8c] = 'g_raw.battery_info.error_count_0', + [0x0a8fc2af] = 'g_raw.battery_info.n_discharge_times_0', + [0x875d3035] = 'g_real.status.main_battery_voltage_0', + [0xe593b02e] = 'g_real.config_status.voltage_temp_for_calibrate_0', + [0x3db22c00] = 'g_real.config_status.voltage_calibrate_state_0', + [0xcbbf0f97] = 'IMU_Data.gyro_tempX_0', + [0xcbc00f97] = 'IMU_Data.gyro_tempY_0', + [0xcbc10f97] = 'IMU_Data.gyro_tempZ_0', + [0x14468f84] = 'imu_temp.dst_value_0', + [0x6bf1a5d0] = 'imu_temp.ctl_out_value_0', + [0x73f19d57] = 'imu_temp.real_ctl_out_value_0', + [0xdd415d9a] = 'imu_temp.real_ctl_out_per_0', + [0x6702128d] = 'g_real.status.control_command_mode_0', + [0x8721693b] = 'g_real.status.control_real_mode_0', + [0xe163241e] = 'g_real.status.last_control_real_mode_0', + [0x1e029e37] = 'g_real.status.rc_state_0', + [0x1364e450] = 'g_real.status.motor_status_0', + [0xf3eace45] = 'g_real.config_status.need_check_stick_channel_mapping_0', + [0xec170d5f] = 'g_real.config_status.need_send_imu_start_flag_0', + [0xac1efd58] = 'g_real.config_status.stick_calibrate_state_0', + [0x3b7da88e] = 'g_real.config_status.config_debug_0', + [0xbb4cf13c] = 'imu_type_0', + [0xce6d445d] = 'g_real.force_on.ignore_compass_error_0', + [0x10782937] = 'g_navi_data.horiz_vel_sensor_id_0', + [0x0ad46d4c] = 'g_real.knob.scales[KNOB_BASIC_ROLL]_0', + [0xb54da335] = 'g_real.knob.scales[KNOB_BASIC_PITCH]_0', + [0x771bf8f6] = 'g_real.knob.scales[KNOB_BASIC_YAW]_0', + [0x3f97c254] = 'g_real.knob.scales[KNOB_BASIC_THRUST]_0', + [0xe27e9a1e] = 'g_real.knob.scales[KNOB_ATTI_GAIN]_0', + [0x78fb68b9] = 'g_real.knob.scales[KNOB_GYRO_GAIN]_0', + [0xc46223b9] = 'imu_app_temp_cali.start_flag_0', + [0x43d19856] = 'imu_app_temp_cali.state_0', + [0xcc8ec761] = 'imu_app_temp_cali.cali_cnt_0', + [0x765d4a50] = 'imu_app_temp_cali.temp_ready_0', + [0x723fcb67] = 'imu_app_temp_cali.step_0', + [0x074049d5] = 'imu_app_temp_cali.dst_cali_temp_0', + [0x7139b60b] = 'imu_app_temp_cali.bias_flag.temp_min_0', + [0x6943b60b] = 'imu_app_temp_cali.bias_flag.temp_max_0', + [0xfd2b0778] = 'imu_app_temp_cali.bias_flag.temp_cali_status_0', + [0xe5a00bc3] = 'imu_app_temp_cali.bias_flag.base_cali_status_0', + [0x2477f435] = 'imu_app_temp_cali.bias_flag.cfg_temp_cali_fw_version_0', + [0x6b7b8a5a] = 'imu_app_temp_cali.bias_flag.cur_temp_cali_fw_version_0', + [0xb765ced5] = 'imu_temp.cur_dst_temp_0', + [0x44adfb9a] = 'imu_check_status.check_flag_0', + [0xbaf79df9] = 'imu_check_status.status_0', + [0xd1339a5c] = 'g_real.config_status.motor_test_output_bit_0', + [0xa0fc750c] = 'g_real.config_status.motor_test_output_timer_0', + [0x93cdfcff] = 'g_real.config_status.motor_test_request_bit_0', + [0x039e4213] = 'g_real.config_status.motor_test_request_timer_0', + [0xc9a5ad5e] = 'g_real.config_status.factory_output_test_request_0', + [0x2ca6d420] = 'g_real.config_status.fill_from_simulator_0', + [0xa7d83fdb] = 'g_real.config_status.simulator_gps_svn_0', + [0x705d2ccb] = 'local_simulator_0', + [0x8c4dafd2] = 'run_mode_0', + [0xc30b18f9] = 'default_gps_svn_0', + [0xded84280] = 'initial_lati_0', + [0x58039b5e] = 'initial_longti_0', + [0x7f393ec9] = 'g_cfg_debug.simulator_initial_lati_0', + [0x544abd43] = 'g_cfg_debug.simulator_initial_longti_0', + [0x7b2f4251] = 'g_cfg_debug.simulator_mvo_flag_0', + [0x9d37b593] = 'g_cfg_debug.simulator_gps_hdop_0', + [0xf31cd374] = 'g_cfg_debug.simulator_check_motor_0', + [0x32f915d9] = 'wind_speed[0]_0', + [0x33f915d9] = 'wind_speed[1]_0', + [0x34f915d9] = 'wind_speed[2]_0', + [0xe6d4d9ab] = 'wall_dis_front_0', + [0xe110ac83] = 'wall_dis_right_0', + [0x73e3ab53] = 'wall_dis_back_0', + [0x76ecdd67] = 'wall_dis_left_0', + [0xda45471c] = 'test_deformation_0', + [0x821bb377] = 'g_cfg_debug.force_flash_led_0', + [0xd149173b] = 'g_real.wm610_app_command.function_command_state_0', + [0x23494583] = 'g_real.wm610_app_command.function_command_0', + [0xd174d68f] = 'g_debug.sim_flag[0]_0', + [0xd274d68f] = 'g_debug.sim_flag[1]_0', + [0xd374d68f] = 'g_debug.sim_flag[2]_0', + [0xd474d68f] = 'g_debug.sim_flag[3]_0', + [0x38c7cb6b] = 'g_debug.sim_var[0]_0', + [0x39c7cb6b] = 'g_debug.sim_var[1]_0', + [0x3ac7cb6b] = 'g_debug.sim_var[2]_0', + [0x3bc7cb6b] = 'g_debug.sim_var[3]_0', + [0x4cf19f15] = 'ioc_type__0', + [0x5a4ed0a2] = 'wp_setting.length_0', + [0xc2ac7538] = 'wp_setting.vel_cmd_range_0', + [0xccd56ee3] = 'wp_setting.idle_vel_0', + [0xc8841923] = 'wp_setting.action_on_finish_0', + [0xc2d65cd5] = 'wp_setting.mission_exec_num_0', + [0x02b2447a] = 'wp_setting.yaw_mode_0', + [0xa606743b] = 'wp_setting.trace_mode_0', + [0x70e36630] = 'wp_setting.action_on_rc_lost_0', + [0x93770711] = 'range.control.control_mode[0]', + [0x93770811] = 'range.control.control_mode[1]', + [0x93770911] = 'range.control.control_mode[2]', + [0x10989b1d] = 'range.go_home.standby', + [0x0b5414a8] = 'range.go_home.start', + [0x68b3d1a8] = 'range.ioc.mode[0]', + [0x68b3d2a8] = 'range.ioc.mode[1]', + [0x68b3d3a8] = 'range.ioc.mode[2]', + [0xd73e5289] = 'g_config.bat_limit.limit_delt_vol.min_0', + [0xcf485289] = 'g_config.bat_limit.limit_delt_vol.max_0', + [0xf7947df2] = 'g_config.bat_limit.limit_delt_vol.weight_0', + [0x8379f3d2] = 'g_config.bat_limit.limit_vol.min_0', + [0x7b83f3d2] = 'g_config.bat_limit.limit_vol.max_0', + [0x3ef1a81c] = 'g_config.bat_limit.limit_vol.weight_0', + [0x10bfe511] = 'g_config.bat_limit.limit_max_power.min_0', + [0x08c9e511] = 'g_config.bat_limit.limit_max_power.max_0', + [0x7bb405d1] = 'g_config.bat_limit.limit_max_power.weight_0', + [0x7b4b95d9] = 'g_config.bat_limit.limit_temp.min_0', + [0x735595d9] = 'g_config.bat_limit.limit_temp.max_0', + [0x45c8c046] = 'g_config.bat_limit.limit_temp.weight_0', + [0x339d9c7f] = 'g_config.bat_limit.limit_scale.min_0', + [0x2ba79c7f] = 'g_config.bat_limit.limit_scale.max_0', + [0xea625a64] = 'g_config.bat_limit.limit_scale.weight_0', + [0x4e4d8780] = 'g_config.bat_limit.limit_power_rate_capacity.min_0', + [0x46578780] = 'g_config.bat_limit.limit_power_rate_capacity.max_0', + [0xebe7c9fb] = 'g_config.bat_limit.limit_power_rate_capacity.weight_0', + [0xe0d3d946] = 'g_config.bat_limit.limit_power_rate_temp.min_0', + [0xd8ddd946] = 'g_config.bat_limit.limit_power_rate_temp.max_0', + [0xb4c46995] = 'g_config.bat_limit.limit_power_rate_temp.weight_0', + [0x06c97ca2] = 'g_config.bat_limit.limit_bat_current_after_overflow_0', + [0x9331477d] = 'g_config.bat_limit.limit_up_rate_0', + [0x47021e69] = 'g_config.bat_limit.limit_down_rate_0', + -- Now old hashes, mapped to new names in Phantom 3 + [0x0ADE273D] = 'g_real.knob.scales[KNOB_BASIC_YAW]_0', + [0x13F1189B] = 'g_config.control.horiz_i_gain_0', + [0x36C21143] = 'g_config.control.basic_thrust_0', + [0x3B304CCD] = 'g_config.knob.control_channel[KNOB_ATTI_GAIN]_0', + [0x401F69E9] = 'g_config.knob.control_channel[KNOB_BASIC_THRUST]_0', + [0x96C08863] = 'g_real.knob.scales[KNOB_ATTI_GAIN]_0', + [0xAF4DEBA2] = 'g_config.knob.control_channel[KNOB_BASIC_YAW]_0', + [0xC25A4FF2] = 'g_config.knob.control_channel[KNOB_GYRO_GAIN]_0', + [0xCA7264AD] = 'g_config.control.basic_yaw_0', + [0xD2E6EE01] = 'g_config.control.vert_i_gain_0', + [0xD2EDEE01] = 'g_config.control.vert_pos_gain_0', + [0xD2F3EE01] = 'g_config.control.vert_vel_gain_0', + [0xD7E93B10] = 'g_real.knob.scales[KNOB_BASIC_THRUST]_0', + [0xE0B5E02D] = 'g_real.knob.scales[KNOB_GYRO_GAIN]_0', + [0xE22D1DE2] = 'g_config.control.torsion_gyro_gain_0', +} + +f.flyc_config_table_get_param_info_by_hash_name_hash = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_name_hash", "Param Name Hash", base.HEX, enums.FLYC_PARAMETER_BY_HASH_ENUM, nil, "Hash of a flight controller parameter name string") + +f.flyc_config_table_get_param_info_by_hash_status = ProtoField.uint8 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_status", "Status", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_type_id = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_type_id", "TypeID", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_size = ProtoField.int16 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_size", "Size", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_attribute = ProtoField.uint16 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_attribute", "Attribute", base.HEX, nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_i_min = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_i_min", "LimitI minValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_i_max = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_i_max", "LimitI maxValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_i_def = ProtoField.int32 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_i_def", "LimitI defaultValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_u_min = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_u_min", "LimitU minValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_u_max = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_u_max", "LimitU maxValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_u_def = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_u_def", "LimitU defaultValue", base.DEC, nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_f_min = ProtoField.float ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_f_min", "LimitF minValue", nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_f_max = ProtoField.float ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_f_max", "LimitF maxValue", nil, nil) +f.flyc_config_table_get_param_info_by_hash_limit_f_def = ProtoField.float ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_limit_f_def", "LimitF defaultValue", nil, nil) +f.flyc_config_table_get_param_info_by_hash_name = ProtoField.stringz ("dji_dumlv1.flyc_config_table_get_param_info_by_hash_name", "Name", base.ASCII, nil, nil) + +local function flyc_config_table_get_param_info_by_hash_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_name_hash, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Param Info By Hash: Offset does not match - internal inconsistency") end + else -- Response is identical to getting param info by index + -- Payload has 19 bytes + null-terminated name on P3X_FW_V01.07.0060 + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_status, payload(offset, 1)) + offset = offset + 1 + + -- It is possible that the packet ends here, if there was an issue retrieving the item + if (payload:len() >= 8) then + local type_id = payload(offset,2):le_uint() + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_type_id, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_size, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_attribute, payload(offset, 2)) + offset = offset + 2 + + if (type_id <= 3) or (type_id == 10) then + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_u_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_u_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_u_def, payload(offset, 4)) + offset = offset + 4 + elseif (type_id >= 4) and (type_id <= 7) then + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_i_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_i_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_i_def, payload(offset, 4)) + offset = offset + 4 + elseif (type_id == 8) or (type_id == 9) then + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_f_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_f_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_limit_f_def, payload(offset, 4)) + offset = offset + 4 + end + + local name_text = payload(offset, payload:len() - offset) + subtree:add_le (f.flyc_config_table_get_param_info_by_hash_name, name_text) + offset = payload:len() + end + + --if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Get Param Info By Hash: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Get Param Info By Hash: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Read Param By Hash - 0xf8 + +f.flyc_config_table_read_param_by_hash_status = ProtoField.uint8 ("dji_dumlv1.flyc_config_table_read_param_by_hash_status", "Status", base.DEC, nil, nil) +f.flyc_config_table_read_param_by_hash_name_hash = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_read_param_by_hash_name_hash", "Param Name Hash", base.HEX, enums.FLYC_PARAMETER_BY_HASH_ENUM, nil, "Hash of a flight controller parameter name string") +f.flyc_config_table_read_param_by_hash_value = ProtoField.bytes ("dji_dumlv1.flyc_config_table_read_param_by_hash_value", "Param Value", base.SPACE, nil, nil, "Flight controller parameter value; size and type depends on parameter") + +f.flyc_config_table_read_param_by_hash_rq_num = ProtoField.uint8 ("dji_dumlv1.flyc_config_table_read_param_by_hash_rq_num", "Request Number", base.DEC, nil, nil) + +local function flyc_config_table_read_param_by_hash_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + local num_entries = math.floor((payload:len() - offset) / 4) + + local i = 0 + while i < num_entries do + i = i + 1 + + subtree:add_le (f.flyc_config_table_read_param_by_hash_rq_num, i) -- Add request number detached, without related byte within packet (it is just index of the value) + + subtree:add_le (f.flyc_config_table_read_param_by_hash_name_hash, payload(offset, 4)) + offset = offset + 4 + end + + if (offset ~= 4 * i) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Read Param By Hash: Offset does not match - internal inconsistency") end + else -- Response + + subtree:add_le (f.flyc_config_table_read_param_by_hash_status, payload(offset, 1)) + offset = offset + 1 + + -- There can be multiple values in the packet; but without knowing size for each hash, we have no way of knowing where first value ends + -- This is why everything beyond the first hash is thrown to one value + if (payload:len() >= offset + 5) then + + subtree:add_le (f.flyc_config_table_read_param_by_hash_name_hash, payload(offset, 4)) + offset = offset + 4 + + local varsize_val = payload(offset, payload:len() - offset) + subtree:add (f.flyc_config_table_read_param_by_hash_value, varsize_val) + offset = payload:len() + end + + --if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Read Param By Hash: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Read Param By Hash: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Write Param By Hash - 0xf9 + +f.flyc_config_table_write_param_by_hash_status = ProtoField.uint8 ("dji_dumlv1.flyc_config_table_write_param_by_hash_status", "Status", base.DEC, nil, nil) +f.flyc_config_table_write_param_by_hash_name_hash = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_write_param_by_hash_name_hash", "Param Name Hash", base.HEX, enums.FLYC_PARAMETER_BY_HASH_ENUM, nil, "Hash of a flight controller parameter name string") +f.flyc_config_table_write_param_by_hash_value = ProtoField.bytes ("dji_dumlv1.flyc_config_table_write_param_by_hash_value", "Param Value", base.SPACE, nil, nil, "Flight controller parameter value; size and type depends on parameter") + +local function flyc_config_table_write_param_by_hash_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + subtree:add_le (f.flyc_config_table_write_param_by_hash_name_hash, payload(offset, 4)) + offset = offset + 4 + + local varsize_val = payload(offset, payload:len() - offset) + subtree:add (f.flyc_config_table_write_param_by_hash_value, varsize_val) + offset = payload:len() + + --if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Write Param By Hash: Offset does not match - internal inconsistency") end + else -- Response + subtree:add_le (f.flyc_config_table_write_param_by_hash_status, payload(offset, 1)) + offset = offset + 1 + + if (payload:len() - offset >= 5) then + subtree:add_le (f.flyc_config_table_write_param_by_hash_name_hash, payload(offset, 4)) + offset = offset + 4 + + local varsize_val = payload(offset, payload:len() - offset) + subtree:add (f.flyc_config_table_write_param_by_hash_value, varsize_val) + offset = payload:len() + end + + --if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table Write Param By Hash: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table Write Param By Hash: Payload size different than expected") end +end + +-- Flight Controller - Config Table: Read Params By Hash - 0xfb + +f.flyc_config_table_read_params_by_hash_unknown00 = ProtoField.uint8 ("dji_dumlv1.flyc_config_table_read_params_by_hash_unknown00", "Unknown00", base.HEX) +f.flyc_config_table_read_params_by_hash_first_name_hash = ProtoField.uint32 ("dji_dumlv1.flyc_config_table_read_params_by_hash_first_name_hash", "Param Name Hash", base.HEX, enums.FLYC_PARAMETER_BY_HASH_ENUM, nil, "Hash of a flight controller parameter name string") + +local function flyc_config_table_read_params_by_hash_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.flyc_config_table_read_params_by_hash_unknown00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.flyc_config_table_read_params_by_hash_first_name_hash, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Config Table: Read Params By Hash: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Config Table: Read Params By Hash: Payload size different than expected") end +end + +FLYC_UART_CMD_DISSECT = { + [0x09] = flyc_flyc_forbid_status_dissector, + [0x10] = flyc_a2_commom_dissector, + [0x32] = flyc_flyc_deform_status_dissector, + [0x2a] = flyc_function_control_dissector, + [0x3e] = flyc_flyc_request_limit_update_dissector, + [0x3f] = flyc_set_nofly_zone_data_dissector, + [0x42] = flyc_flyc_unlimit_state_dissector, + [0x43] = flyc_osd_general_dissector, + [0x44] = flyc_osd_home_point_dissector, + [0x45] = flyc_flyc_gps_snr_dissector, + [0x51] = flyc_flyc_battery_status_dissector, + [0x53] = flyc_flyc_vis_avoid_param_dissector, + [0x55] = flyc_flyc_limit_state_dissector, + [0x56] = flyc_flyc_led_status_dissector, + [0x50] = flyc_imu_data_status_dissector, + [0x57] = flyc_gps_glns_dissector, + [0x61] = flyc_flyc_active_request_dissector, + [0x63] = flyc_flyc_board_recv_dissector, + [0x67] = flyc_flyc_power_param_dissector, + [0x6a] = flyc_flyc_avoid_dissector, + [0x6c] = flyc_flyc_rtk_location_data_dissector, + [0x88] = flyc_flyc_way_point_mission_info_dissector, + [0x89] = flyc_flyc_way_point_mission_current_event_dissector, + [0xa1] = flyc_flyc_agps_status_dissector, + [0xad] = flyc_flyc_flyc_install_error_dissector, + [0xb6] = flyc_flyc_fault_inject_dissector, + [0xb9] = flyc_flyc_redundancy_status_dissector, + [0xdf] = flyc_assistant_unlock_dissector, + [0xe0] = flyc_config_table_get_tbl_attribute_dissector, + [0xe1] = flyc_config_table_get_item_attribute_dissector, + [0xe2] = flyc_config_table_get_item_value_dissector, + [0xe3] = flyc_config_table_set_item_value_dissector, + [0xe9] = flyc_config_command_table_get_or_exec_dissector, + [0xf0] = flyc_config_table_get_param_info_by_index_dissector, + [0xf1] = flyc_config_table_read_param_by_index_dissector, + [0xf7] = flyc_config_table_get_param_info_by_hash_dissector, + [0xf8] = flyc_config_table_read_param_by_hash_dissector, + [0xf9] = flyc_config_table_write_param_by_hash_dissector, + [0xfb] = flyc_config_table_read_params_by_hash_dissector, +} diff --git a/dissectors/dji-dumlv1/src/dji-dumlv1-general.lua b/dissectors/dji-dumlv1/src/dji-dumlv1-general.lua new file mode 100644 index 0000000..f65079a --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-dumlv1-general.lua @@ -0,0 +1,1020 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-dumlv1-general.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit ef11dab51f73653681a1f97d068beba002f5adfc du 14/08/2019). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- The definitions in this file are part of DJI DUMLv1 protocol dissector +-- Dissectors for command set 0x00 - General + +local f = DJI_DUMLv1_PROTO.fields +local enums = {} + +-- CMD name decode table + +GENERAL_UART_CMD_TEXT = { + [0x00] = 'Ping', + [0x01] = 'Version Inquiry', + [0x02] = 'Push Param Set', + [0x03] = 'Push Param Get', + [0x04] = 'Push Param Start', + [0x05] = 'Multi Param Set', -- Multiple prarams set at once + [0x06] = 'Multi Param Get', -- Multiple prarams get at once + [0x07] = 'Enter Loader', -- Enter Upgrade Mode / Firmware Upgrade Entry + [0x08] = 'Update Confirm', -- Upgrade Prepare / Firmware Upgrade Procedure Start + [0x09] = 'Update Transmit', -- Firmware Upgrade Data Transmission + [0x0a] = 'Update Finish', -- Firmware Upgrade Verify + [0x0b] = 'Reboot Chip', + [0x0c] = 'Get Device State', -- get run status(loader, app) + [0x0d] = 'Set Device Version', -- HardwareId + [0x0e] = 'Heartbeat/Log Message', -- It can transmit text messages from FC, but is usually empty + [0x0f] = 'Upgrade Self Request', -- Upgrade Consistency / Check Upgrade Compatibile + [0x10] = 'Set SDK Std Msgs Frequency', + [0x20] = 'File List', + [0x21] = 'File Info', + [0x22] = 'File Send', + [0x23] = 'File Receive', -- See m0101 sys partiton for payload info + [0x24] = 'File Sending', + [0x25] = 'File Segment Err', -- File Receive Segment Fail + [0x26] = 'FileTrans App 2 Camera', -- See m0101 sys partiton for payload info + [0x27] = 'FileTrans Camera 2 App', + [0x28] = 'FileTrans Delete', + [0x2a] = 'FileTrans General Trans', + [0x30] = 'Encrypt Config', + [0x32] = 'Activate Config', -- Activation Action + [0x33] = 'MFi Cert', + [0x34] = 'Safe Communication', + [0x40] = 'Fw Update Desc Push', + [0x41] = 'Fw Update Push Control', + [0x42] = 'Fw Upgrade Push Status', + [0x43] = 'Fw Upgrade Finish', + [0x45] = 'Sleep Control', + [0x46] = 'Shutdown Notification', -- aka Disconnect Notifiation + [0x47] = 'Power State', -- aka Reboot Status + [0x48] = 'LED Control', + [0x4a] = 'Set Date/Time', + [0x4b] = 'Get Date/Time', + [0x4c] = 'Get Module Sys Status', -- Get Aging Test Status + [0x4d] = 'Set RT', + [0x4e] = 'Get RT', + [0x4f] = 'Get Cfg File', + [0x50] = 'Set Serial Number', + [0x51] = 'Get Serial Number', + [0x52] = 'Set Gps Push Config', + [0x53] = 'Push Gps Info', + [0x54] = 'Get Temperature Info', + [0x55] = 'Get Alive Time', + [0x56] = 'Over Temperature', -- Push Temperature Warning + [0x57] = 'Send Network Info', + [0x58] = 'Time Sync', -- Get Ack Of Timestamp + [0x59] = 'Test Mode', + [0x5a] = 'Play Sound', + [0x5c] = 'UAV Fly Info', + [0x60] = 'Auto Test Info', + [0x61] = 'Set Product Newest Ver', + [0x62] = 'Get Product Newest Ver', + [0xef] = 'Send Reserved Key', + [0xf0] = 'Log Push', + [0xf1] = 'Component Self Test State', -- The component is identified by sender field + [0xf2] = 'Log Control Global', + [0xf3] = 'Log Control Module', + [0xf4] = 'Test Start', + [0xf5] = 'Test Stop', + [0xf6] = 'Test Query Result', + [0xf7] = 'Push Test Result', + [0xf8] = 'Get Metadata', + [0xfa] = 'Log Control', + [0xfb] = 'Selftest State', + [0xfc] = 'Selftest State Count', + [0xfd] = 'Dump Frame Buffer', -- or Autotest Error Inject? + [0xfe] = 'Self Define', -- Pure Transfer From Mc To App + [0xff] = 'Query Device Info', -- Asks a component for identification string / Build Info(Date, Time, Type) +} + +-- General - Version Inquiry - 0x01 +-- When a component receives this request, it responds with a packet containing hardware and software versions. +-- Supported in: P3X_FW_V01.11.0030_m0400, WM620_FW_01.02.0300_m0800 + +f.general_version_inquiry_rq_unknown0 = ProtoField.uint8 ("dji_dumlv1.general_version_inquiry_rq_unknown0", "RqUnknown0", base.HEX, nil, nil, "Some kind of request type/flags?") + +f.general_version_inquiry_unknown0 = ProtoField.uint8 ("dji_dumlv1.general_version_inquiry_unknown0", "Unknown0", base.HEX, nil, nil, "On Ph3 DM36x, hard coded to 0") +f.general_version_inquiry_unknown1 = ProtoField.uint8 ("dji_dumlv1.general_version_inquiry_unknown1", "Unknown1", base.HEX, nil, nil, "On Ph3 DM36x, hard coded to 0") +f.general_version_inquiry_hw_version = ProtoField.string ("dji_dumlv1.general_version_inquiry_hw_version", "Hardware Version", base.NONE, nil, nil) +f.general_version_inquiry_ldr_version = ProtoField.string ("dji_dumlv1.general_version_inquiry_ldr_version", "Firmware Loader Version", base.NONE, nil, nil, "On Ph3 DM36x, hard coded to 0x2000000") +f.general_version_inquiry_app_version = ProtoField.string ("dji_dumlv1.general_version_inquiry_app_version", "Firmware App Version", base.NONE, nil, nil, "Standard 4-byte version number") +f.general_version_inquiry_unknown1A = ProtoField.uint32 ("dji_dumlv1.general_version_inquiry_unknown1A", "Unknown1A", base.HEX, nil, nil, "On Ph3 DM36x, hard coded to 0x3FF; bit 31=isProduction, 30=isSupportSafeUpgrade") +f.general_version_inquiry_unknown1E_bt = ProtoField.uint8 ("dji_dumlv1.general_version_inquiry_unknown1E", "Unknown1E", base.HEX, nil, nil, "On Ph3 DM36x, hard coded to 1") +f.general_version_inquiry_unknown1E_dw = ProtoField.uint32 ("dji_dumlv1.general_version_inquiry_unknown1E", "Unknown1E", base.HEX, nil, nil, "On Ph3 DM36x, hard coded to 1") + +local function general_version_inquiry_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + if (payload:len() >= 1) then + + subtree:add_le (f.general_version_inquiry_rq_unknown0, payload(offset, 1)) + offset = offset + 1 + + end + + if (offset ~= 0) and (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Version Inquiry: Offset does not match - internal inconsistency") end + else -- Response + + -- Written based on DM36x module and its Update_Fill_Version() function used by `usbclient` binary + + subtree:add_le (f.general_version_inquiry_unknown0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_version_inquiry_unknown1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_version_inquiry_hw_version, payload(offset, 16)) + offset = offset + 16 + + -- using string ProtoField instead of uint32 to allow easier formatting of the value + local ldr_ver_1 = payload(offset+0, 1):le_uint() + local ldr_ver_2 = payload(offset+1, 1):le_uint() + local ldr_ver_3 = payload(offset+2, 1):le_uint() + local ldr_ver_4 = payload(offset+3, 1):le_uint() + subtree:add_le (f.general_version_inquiry_ldr_version, payload(offset, 4), string.format("%02d.%02d.%02d.%02d",ldr_ver_4,ldr_ver_3,ldr_ver_2,ldr_ver_1)) + offset = offset + 4 + + -- using string ProtoField instead of uint32 to allow easier formatting of the value + local app_ver_1 = payload(offset+0, 1):le_uint() + local app_ver_2 = payload(offset+1, 1):le_uint() + local app_ver_3 = payload(offset+2, 1):le_uint() + local app_ver_4 = payload(offset+3, 1):le_uint() + subtree:add_le (f.general_version_inquiry_app_version, payload(offset, 4), string.format("%02d.%02d.%02d.%02d",app_ver_4,app_ver_3,app_ver_2,app_ver_1)) + offset = offset + 4 + + subtree:add_le (f.general_version_inquiry_unknown1A, payload(offset, 4)) + offset = offset + 4 + + if (payload:len() >= 34) then -- 34-byte packet spotted on P3X_FW_V01.11 + subtree:add_le (f.general_version_inquiry_unknown1E_dw, payload(offset, 4)) + offset = offset + 4 + elseif (payload:len() >= 31) then -- 31-byte packet exists on P3X_FW_V01.08 and all older versions + subtree:add_le (f.general_version_inquiry_unknown1E_bt, payload(offset, 1)) + offset = offset + 1 + end -- 30-byte version exists on WM620_FW_01.02 + + if (offset ~= 30) and (offset ~= 31) and (offset ~= 34) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Version Inquiry: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Version Inquiry: Payload size different than expected") end +end + +-- General - Enter Loader - 0x07 +-- When a component receives this request, it sets startup parameters to boot into bootloader mode, and reboots the chip. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +--f.general_enter_loader_unknown0 = ProtoField.none ("dji_dumlv1.general_enter_loader_unknown0", "Unknown0", base.NONE) + +local function general_enter_loader_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- Details from DM36x could be decoded using func Dec_Serial_Enter_Loader from `usbclient` binary + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Enter Loader: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Enter Loader: Payload size different than expected") end +end + +-- General - Update Confirm / Upgrade Prepare / Firmware Upgrade Procedure Start - 0x08 +-- Supported in: P3X_FW_V01.11.0030_m0400 + +--f.general_update_confirm_unknown0 = ProtoField.none ("dji_dumlv1.general_update_confirm_unknown0", "Unknown0", base.NONE) + +local function general_update_confirm_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- TODO + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Update Confirm: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Update Confirm: Payload size different than expected") end +end + +-- General - Update Transmit / Firmware Upgrade Data Transmission - 0x09 +-- Supported in: P3X_FW_V01.11.0030_m0400 + +--f.general_update_transmit_unknown0 = ProtoField.none ("dji_dumlv1.general_update_transmit_unknown0", "Unknown0", base.NONE) + +local function general_update_transmit_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- TODO + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Update Transmit: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Update Transmit: Payload size different than expected") end +end + +-- General - Update Finish / Firmware Upgrade Verify - 0x0a +-- Supported in: P3X_FW_V01.11.0030_m0400 + +--f.general_update_finish_unknown0 = ProtoField.none ("dji_dumlv1.general_update_finish_unknown0", "Unknown0", base.NONE) + +local function general_update_finish_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- TODO + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Update Finish: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Update Finish: Payload size different than expected") end +end + +-- General - Reboot Chip - 0x0b +-- When a component receives this request, it reboots itself. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.general_reboot_chip_response = ProtoField.uint8 ("dji_dumlv1.general_reboot_chip_response", "Response", base.HEX, nil, nil, "Non-zero if request was rejected") + +f.general_reboot_chip_unknown0 = ProtoField.uint16 ("dji_dumlv1.general_reboot_chip_unknown0", "Unknown0", base.HEX) +f.general_reboot_chip_sleep_time = ProtoField.uint32 ("dji_dumlv1.general_reboot_chip_sleep_time", "Reboot Sleep Time", base.DEC) + +local function general_reboot_chip_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (payload:len() >= 6) then + -- Details from DM36x could be decoded using func Dec_Serial_Reboot from `usbclient` binary + subtree:add_le (f.general_reboot_chip_unknown0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.general_reboot_chip_sleep_time, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Reboot Chip: Offset does not match - internal inconsistency") end + elseif (payload:len() >= 1) then + -- Details from P3 Flight controller firmware binary + subtree:add_le (f.general_reboot_chip_response, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Reboot Chip: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Reboot Chip: Payload size different than expected") end +end + +-- General - Get Device State - 0x0c +-- When a component receives this request, it responds with two integer values representing device state. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.general_get_device_state_status = ProtoField.uint8 ("dji_dumlv1.general_get_device_state_status", "Status", base.HEX) +f.general_get_device_state_unknown1 = ProtoField.uint8 ("dji_dumlv1.general_get_device_state_unknown1", "Unknown1", base.HEX) +f.general_get_device_state_state = ProtoField.uint32 ("dji_dumlv1.general_get_device_state_state", "Device State", base.HEX) + +local function general_get_device_state_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Get Device State: Offset does not match - internal inconsistency") end + + else -- Response + + -- Checked with P3X DM36x func Dec_Serial_Get_Device_State from `usbclient` binary + -- Checked with P3X_FW_V01.11.0030_m0400 + + subtree:add_le (f.general_get_device_state_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_get_device_state_unknown1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_get_device_state_state, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Get Device State: Offset does not match - internal inconsistency") end + + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Get Device State: Payload size different than expected") end +end + +-- General - Set Device Version - 0x0d +-- Sets version numbers which the component should report. Not all values are really used in most components. +-- P3X Gimbal firmware contains additional functionality, triggered when specific magic values are used instead of firmware versions to set. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.general_set_device_version_unknown0 = ProtoField.uint8 ("dji_dumlv1.general_set_device_version_unknown0", "Unknown0", base.HEX) +f.general_set_device_version_hw_ver = ProtoField.bytes ("dji_dumlv1.general_set_device_version_hw_ver", "HW Version", base.SPACE) +f.general_set_device_version_ldr_ver = ProtoField.bytes ("dji_dumlv1.general_set_device_version_ldr_ver", "Loader Version", base.SPACE) +f.general_set_device_version_app_ver = ProtoField.bytes ("dji_dumlv1.general_set_device_version_app_ver", "App Version", base.SPACE) +f.general_set_device_version_unk4_ver = ProtoField.bytes ("dji_dumlv1.general_set_device_version_unk4_ver", "Unk4 Version", base.SPACE) + +f.general_set_device_version_status = ProtoField.uint8 ("dji_dumlv1.general_set_device_version_status", "Status", base.HEX) +f.general_set_device_version_flags1 = ProtoField.uint8 ("dji_dumlv1.general_set_device_version_flags1", "Flags1", base.HEX) +f.general_set_device_version_unknown2 = ProtoField.bytes ("dji_dumlv1.general_set_device_version_unknown2", "Unknown2", base.SPACE) + +local function general_set_device_version_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + -- Details from DM36x could be decoded using func Dec_Serial_Set_Device_Version from `usbclient` binary + -- Checked with P3X_FW_V01.11.0030_m0400 + + subtree:add_le (f.general_set_device_version_unknown0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_set_device_version_hw_ver, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.general_set_device_version_ldr_ver, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.general_set_device_version_app_ver, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.general_set_device_version_unk4_ver, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 17) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Set Device Version: Offset does not match - internal inconsistency") end + else -- Response + + -- Details from DM36x could be decoded using func Dec_Serial_Set_Device_Version from `usbclient` binary + -- Checked with P3X_FW_V01.11.0030_m0400 + + subtree:add_le (f.general_set_device_version_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_set_device_version_flags1, payload(offset, 1)) + offset = offset + 1 + + -- This may be either chip state (10 bytes) or 4 versions (16 bytes).. strange - maybe a mistake in m0400 firmware + subtree:add_le (f.general_set_device_version_unknown2, payload(offset, 16)) + offset = offset + 16 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Set Device Version: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Set Device Version: Payload size different than expected") end +end + +-- General - Heartbeat/Log Message - 0x0e +-- Description: It can transmit text messages from FC (when sent as Request by FC), but is usually empty (when Requested by PC, or answering to such request). +-- Text message seen on P3X_FW_V01.07.0060 when trying to read non-existing flyc_param (cmd=0xf8). +-- Text message also seen on WM620_FW_01.02.0300 when capturing FC startup. +-- Supported in: P3X, WM620 + +f.general_heartbeat_log_message_group = ProtoField.uint8 ("dji_dumlv1.general_heartbeat_log_message_group", "Group", base.DEC, nil, nil) +f.general_heartbeat_log_message_text = ProtoField.string ("dji_dumlv1.general_heartbeat_log_message_text", "Text", base.ASCII) + +local function general_heartbeat_log_message_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- Group is not present in Heartbeat requests + if (payload:len() > 0) then + + subtree:add_le (f.general_heartbeat_log_message_group, payload(offset, 1)) + offset = offset + 1 + + end + + -- Log message is not present in responses to Heartbeat requests + if (payload:len() > 1) then + + local log_text = payload(offset, payload:len() - offset) + subtree:add (f.general_heartbeat_log_message_text, log_text) + offset = payload:len() + + end + + --if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Heartbeat Log Message: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Heartbeat Log Message: Payload size different than expected") end +end + +-- General - Upgrade Self Request - 0x0f + +f.general_upgrade_self_request_unknown0 = ProtoField.uint8 ("dji_dumlv1.general_upgrade_self_request_unknown0", "Unknown0", base.HEX) +f.general_upgrade_self_request_unknown1 = ProtoField.uint8 ("dji_dumlv1.general_upgrade_self_request_unknown1", "Unknown1", base.HEX) + +local function general_upgrade_self_request_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.general_upgrade_self_request_unknown0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_upgrade_self_request_unknown1, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Upgrade Self Request: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Upgrade Self Request: Payload size different than expected") end +end + +-- General - File Sending - 0x24 + +f.general_file_sending_index = ProtoField.int32 ("dji_dumlv1.general_file_sending_index", "Index", base.DEC) +f.general_file_sending_data = ProtoField.bytes ("dji_dumlv1.general_file_sending_data", "Data", base.SPACE) + +local function general_file_sending_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.general_file_sending_index, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.general_file_sending_data, payload(offset, 495)) + offset = offset + 495 + + + if (offset ~= 499) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"File Sending: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"File Sending: Payload size different than expected") end +end + +-- General - Camera File - 0x27 + +--f.general_camera_file_unknown0 = ProtoField.none ("dji_dumlv1.general_camera_file_unknown0", "Unknown0", base.NONE) + +local function general_camera_file_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Camera File: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Camera File: Payload size different than expected") end +end + +-- General - FileTrans General Trans - 0x2a +-- Description: Used to transfer files from PC to m0801, ie. Inspire software licenses. +-- Supported in: WM620_FW_01.02.0300_m0800 + +enums.COMMON_FILETRANS_GENERAL_TRANS_PHASE_ENUM = { + [1]="Begin transfer", + [2]="Data part", + [3]="Finish transfer", +} + +f.general_filetrans_general_trans_phase = ProtoField.uint8 ("dji_dumlv1.general_filetrans_general_trans_phase", "Transfer Phase", base.DEC, enums.COMMON_FILETRANS_GENERAL_TRANS_PHASE_ENUM, nil, nil) +f.general_filetrans_general_trans_datalen = ProtoField.uint32 ("dji_dumlv1.general_filetrans_general_trans_datalen", "Total Length", base.DEC, nil, nil, "File size in bytes") +f.general_filetrans_general_trans_partno = ProtoField.uint32 ("dji_dumlv1.general_filetrans_general_trans_partno", "Part No", base.DEC) +f.general_filetrans_general_trans_unknown1 = ProtoField.bytes ("dji_dumlv1.general_filetrans_general_trans_unknown1", "Unknown1", base.SPACE, nil, nil, "After file transfer, 16 bytes? MD5?") +f.general_filetrans_general_trans_data = ProtoField.bytes ("dji_dumlv1.general_filetrans_general_trans_data", "Data", base.SPACE) +f.general_filetrans_general_trans_fname_len = ProtoField.uint8 ("dji_dumlv1.general_filetrans_general_trans_fname", "File Name Length", base.DEC) +f.general_filetrans_general_trans_fname = ProtoField.string ("dji_dumlv1.general_filetrans_general_trans_fname", "File Name", base.NONE, nil, nil) + +f.general_filetrans_general_trans_resp_phase = ProtoField.uint8 ("dji_dumlv1.general_filetrans_general_trans_resp_phase", "Response for Transfer Phase", base.DEC, enums.COMMON_FILETRANS_GENERAL_TRANS_PHASE_ENUM, nil, nil) +f.general_filetrans_general_trans_status = ProtoField.uint8 ("dji_dumlv1.general_filetrans_general_trans_status", "Status", base.HEX) +f.general_filetrans_general_trans_res_unknown0 = ProtoField.bytes ("dji_dumlv1.general_filetrans_general_trans_res_unknown0", "RespUnknown0", base.SPACE) + +local function general_filetrans_general_trans_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + local phase = payload(offset,1):le_uint() + subtree:add_le (f.general_filetrans_general_trans_phase, payload(offset, 1)) + offset = offset + 1 + + if phase == 1 then + + subtree:add_le (f.general_filetrans_general_trans_datalen, payload(offset, 4)) + offset = offset + 4 + + local fname_len = payload(offset,1):le_uint() + subtree:add_le (f.general_filetrans_general_trans_fname_len, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_filetrans_general_trans_fname, payload(offset, fname_len)) + offset = offset + fname_len + + elseif phase == 2 then + + subtree:add_le (f.general_filetrans_general_trans_partno, payload(offset, 4)) + offset = offset + 4 + + local data_len = payload:len() - offset + subtree:add_le (f.general_filetrans_general_trans_data, payload(offset, data_len)) + offset = offset + data_len + + elseif phase == 3 then + + subtree:add_le (f.general_filetrans_general_trans_unknown1, payload(offset, 16)) + offset = offset + 16 + + end + + --if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FileTrans General Trans: Offset does not match - internal inconsistency") end + else -- Response + + if (payload:len() >= 6) then + + subtree:add_le (f.general_filetrans_general_trans_resp_phase, 1) -- Add response type detached, without related byte within packet (type is recognized by size, not by field) + + subtree:add_le (f.general_filetrans_general_trans_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_filetrans_general_trans_res_unknown0, payload(offset, 5)) + offset = offset + 5 + + elseif (payload:len() >= 5) then + + subtree:add_le (f.general_filetrans_general_trans_resp_phase, 2) + + subtree:add_le (f.general_filetrans_general_trans_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_filetrans_general_trans_partno, payload(offset, 4)) + offset = offset + 4 + + else + + subtree:add_le (f.general_filetrans_general_trans_resp_phase, 3) + + subtree:add_le (f.general_filetrans_general_trans_status, payload(offset, 1)) + offset = offset + 1 + + end + + if (offset ~= 1) and (offset ~= 5) and (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"FileTrans General Trans: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"FileTrans General Trans: Payload size different than expected") end +end + +-- General - Encrypt Config - 0x30 +-- Used for factory encryption pairing, and for encryption verification at startup. +-- Failing encryption verification in some components sets Authority Level to 0, which makes the device ignore most commands. +-- Supported in: P3X_FW_V01.11.0030_m0400 (without DoEncrypt) + +enums.COMMON_ENCRYPT_CONFIG_CMD_TYPE_ENUM = { + [1]="GetChipState", -- Returns At88 chip state flags and factory info + [2]="GetModuleState", -- Returns At88 module state flags + [3]="Config", -- Configures the decryption, storing new key.txt and factory info + [4]="DoEncrypt", -- Encrypts and returns data buffer given in the packet +} + +enums.COMMON_ENCRYPT_CONFIG_OPER_TYPE_ENUM = { + [0]="Write to target chip", + [1]="Write to SH204 storage", + [2]="Write both target and SH204", +} + +f.general_encrypt_config_cmd_type = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_cmd_type", "Cmd Type", base.DEC, enums.COMMON_ENCRYPT_CONFIG_CMD_TYPE_ENUM, nil, nil) + +f.general_encrypt_config_oper_type = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_oper_type", "Oper Type", base.DEC, enums.COMMON_ENCRYPT_CONFIG_OPER_TYPE_ENUM, nil, nil) +f.general_encrypt_config_magic = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_magic", "Magic value", base.SPACE, nil, nil, "Should be `F0 BD E3 06 81 3E 85 CB`") +f.general_encrypt_config_mod_type = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_mod_type", "Module Type", base.DEC, nil, nil, "Type of the module; selects encryption key to use; Camera supports keys 1, 4 and 8; gimbal accepts only 4 and DM3xx only 8.") +f.general_encrypt_config_board_sn = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_board_sn", "Board SN", base.SPACE, nil, nil, "Factory Serial Number of the Board") +f.general_encrypt_config_key = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_key", "Encrypt Key", base.SPACE, nil, nil, "New AES encryption key") +f.general_encrypt_config_secure_num = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_secure_num", "Security Num", base.SPACE, nil, nil, "MD5 of Board SN and Encrypt Key") + +f.general_encrypt_config_buf_data = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_buf_data", "Buffer data", base.SPACE, nil, nil) + +f.general_encrypt_config_resp_type = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_resp_type", "Response To Cmd Type", base.DEC, enums.COMMON_ENCRYPT_CONFIG_CMD_TYPE_ENUM, nil, nil) + +f.general_encrypt_config_resp_status = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_resp_status", "Status", base.HEX, nil, nil, "Packet processing status; non-zero value means error. On error, packet content may be meaningless.") +f.general_encrypt_config_resp_chip_state_flags = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_resp_chip_state_flags", "Chip State Flags", base.HEX, nil, nil) + f.general_encrypt_config_resp_chip_state_conf_zone_unlock = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_resp_chip_state_conf_zone_unlock", "Config Zone Unlocked", base.DEC, nil, 0x01) + f.general_encrypt_config_resp_chip_state_data_zone_unlock = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_resp_chip_state_data_zone_unlock", "Data and&otp Zone Unlocked", base.DEC, nil, 0x06) +f.general_encrypt_config_resp_modl_state_flags = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_resp_modl_state_flags", "Module State Flags", base.HEX, nil, nil) + f.general_encrypt_config_resp_modl_state_module_ready = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_resp_modl_state_module_ready", "Module reports ready / Key file exists", base.DEC, nil, 0x01, "On P3X: When sent to Camera, returns SH204 status; when sent to DM3xx, returns if key.bin exists") + f.general_encrypt_config_resp_modl_state_verify_pass = ProtoField.uint8 ("dji_dumlv1.general_encrypt_config_resp_modl_state_verify_pass", "Module/KeyFile verification passed", base.DEC, nil, 0x02, "On P3X: When sent to Camera, returns SH204 verification status; when sent to DM3xx, it returns whrther DoEncrypt sent to Camera gives same result as encryption using local key.bin") +f.general_encrypt_config_resp_m01_boardsn = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_resp_m01_boardsn", "Module 01 Board SN", base.SPACE, nil, nil, "Board number for camera module") +f.general_encrypt_config_resp_m04_boardsn = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_resp_m04_boardsn", "Module 04 Board SN", base.SPACE, nil, nil, "Board number for gimbal module") +f.general_encrypt_config_resp_m08_boardsn = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_resp_m08_boardsn", "Module 08 Board SN", base.SPACE, nil, nil, "Board number for dm3xx module") + +f.general_encrypt_config_resp_mac = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_resp_mac", "MAC", base.SPACE, nil, nil) +f.general_encrypt_config_resp_brdnum = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_resp_brdnum", "Board Num", base.SPACE, nil, nil) +f.general_encrypt_config_resp_sn = ProtoField.bytes ("dji_dumlv1.general_encrypt_config_resp_sn", "SN", base.SPACE, nil, nil) + +local function general_encrypt_config_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + local cmd_type = payload(offset,1):le_uint() + subtree:add_le (f.general_encrypt_config_cmd_type, payload(offset, 1)) + offset = offset + 1 + + if cmd_type == 1 then + -- Answer could be decoded using func Dec_Serial_Encrypt_GetChipState from `usbclient` binary + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Encrypt type 1: Offset does not match - internal inconsistency") end + elseif cmd_type == 2 then + -- Answer could be decoded using func Dec_Serial_Encrypt_GetModuleState from `usbclient` binary + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Encrypt type 2: Offset does not match - internal inconsistency") end + elseif cmd_type == 3 then + -- Decoded using func Dec_Serial_Encrypt_Config from `usbclient` binary + subtree:add_le (f.general_encrypt_config_oper_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_encrypt_config_magic, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.general_encrypt_config_mod_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_encrypt_config_board_sn, payload(offset, 10)) + offset = offset + 10 + + subtree:add_le (f.general_encrypt_config_key, payload(offset, 32)) + offset = offset + 32 + + subtree:add_le (f.general_encrypt_config_secure_num, payload(offset, 16)) + offset = offset + 16 + + if (offset ~= 69) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Encrypt type 3: Offset does not match - internal inconsistency") end + elseif cmd_type == 4 then + -- Answer could be decoded using func Encrypt_Request from `encode_usb` binary + local buf_len = payload(offset,1):le_uint() + subtree:add_le (f.general_encrypt_config_mod_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_encrypt_config_buf_data, payload(offset, 32)) + offset = offset + 32 + + if (offset ~= 33) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Encrypt type 4: Offset does not match - internal inconsistency") end + end + else -- Response + subtree:add_le (f.general_encrypt_config_resp_status, payload(offset, 1)) + offset = offset + 1 + + if (payload:len() >= 59) then + subtree:add_le (f.general_encrypt_config_resp_type, 4) -- Add response type detached, without related byte within packet (type is recognized by size, not by field) + + subtree:add_le (f.general_encrypt_config_resp_mac, payload(offset, 32)) + offset = offset + 32 + + subtree:add_le (f.general_encrypt_config_resp_brdnum, payload(offset, 10)) + offset = offset + 10 + + subtree:add_le (f.general_encrypt_config_resp_sn, payload(offset, 16)) + offset = offset + 16 + + if (offset ~= 59) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Encrypt reply: Offset does not match - internal inconsistency") end + elseif (payload:len() >= 32) then + subtree:add_le (f.general_encrypt_config_resp_type, 1) + + subtree:add_le (f.general_encrypt_config_resp_chip_state_flags, payload(offset, 1)) + subtree:add_le (f.general_encrypt_config_resp_chip_state_conf_zone_unlock, payload(offset, 1)) + subtree:add_le (f.general_encrypt_config_resp_chip_state_data_zone_unlock, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_encrypt_config_resp_m01_boardsn, payload(offset, 10)) + offset = offset + 10 + + subtree:add_le (f.general_encrypt_config_resp_m04_boardsn, payload(offset, 10)) + offset = offset + 10 + + subtree:add_le (f.general_encrypt_config_resp_m08_boardsn, payload(offset, 10)) + offset = offset + 10 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Encrypt reply: Offset does not match - internal inconsistency") end + elseif (payload:len() >= 2) then + subtree:add_le (f.general_encrypt_config_resp_type, 2) + + subtree:add_le (f.general_encrypt_config_resp_modl_state_flags, payload(offset, 1)) + subtree:add_le (f.general_encrypt_config_resp_modl_state_module_ready, payload(offset, 1)) + subtree:add_le (f.general_encrypt_config_resp_modl_state_verify_pass, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Encrypt reply: Offset does not match - internal inconsistency") end + elseif (payload:len() >= 1) then + subtree:add_le (f.general_encrypt_config_resp_type, 3) + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Encrypt reply: Offset does not match - internal inconsistency") end + end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Encrypt: Payload size different than expected") end +end + +-- General - Activate Config / Activation Action - 0x32 + +f.general_activation_actn_action = ProtoField.uint8 ("dji_dumlv1.general_activation_actn_action", "Action", base.HEX) +f.general_activation_actn_state = ProtoField.uint8 ("dji_dumlv1.general_activation_actn_state", "State", base.HEX) +f.general_activation_actn_year = ProtoField.uint16 ("dji_dumlv1.general_activation_actn_year", "Year", base.DEC) +f.general_activation_actn_month = ProtoField.uint8 ("dji_dumlv1.general_activation_actn_month", "Month", base.DEC) +f.general_activation_actn_day = ProtoField.uint8 ("dji_dumlv1.general_activation_actn_day", "Day", base.DEC) +f.general_activation_actn_hour = ProtoField.uint8 ("dji_dumlv1.general_activation_actn_hour", "Hour", base.DEC) +f.general_activation_actn_min = ProtoField.uint8 ("dji_dumlv1.general_activation_actn_min", "Minute", base.DEC) +f.general_activation_actn_sec = ProtoField.uint8 ("dji_dumlv1.general_activation_actn_sec", "Second", base.DEC) +f.general_activation_actn_ts = ProtoField.bytes ("dji_dumlv1.general_activation_actn_ts", "Timestamp", base.NONE) +f.general_activation_actn_mc_serial_len = ProtoField.uint8 ("dji_dumlv1.general_activation_actn_mc_serial_len", "MC Serial length", base.DEC) +f.general_activation_actn_mc_serial = ProtoField.string ("dji_dumlv1.general_activation_actn_mc_serial", "MC Serial", base.ASCII) + +local function general_activation_actn_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + -- TODO + + else -- Response + subtree:add_le (f.general_activation_actn_action, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_activation_actn_state, payload(offset, 1)) + offset = offset + 1 + + local mc_serial_len = 0 + + if (payload:len() >= 10) then + + -- Instead of a series of ints, let's use a single timestamp field + + local ts_year = payload(offset, 2):le_uint() + --subtree:add_le (f.general_activation_actn_year, payload(offset, 2)) + offset = offset + 2 + + local ts_month = payload(offset, 1):le_uint() + --subtree:add_le (f.general_activation_actn_month, payload(offset, 1)) + offset = offset + 1 + + local ts_day = payload(offset, 1):le_uint() + --subtree:add_le (f.general_activation_actn_day, payload(offset, 1)) + offset = offset + 1 + + local ts_hour = payload(offset, 1):le_uint() + --subtree:add_le (f.general_activation_actn_hour, payload(offset, 1)) + offset = offset + 1 + + local ts_min = payload(offset, 1):le_uint() + --subtree:add_le (f.general_activation_actn_min, payload(offset, 1)) + offset = offset + 1 + + local ts_sec = payload(offset, 1):le_uint() + --subtree:add_le (f.general_activation_actn_sec, payload(offset, 1)) + offset = offset + 1 + + local timestamp_str = string.format("Timestamp: %d-%02d-%02d %02d:%02d:%02d", ts_year, ts_month, ts_day, ts_hour, ts_min, ts_sec) + subtree:add (f.general_activation_actn_ts, payload(offset-7, 7), 0, timestamp_str) + + mc_serial_len = payload(offset,1):uint() + subtree:add_le (f.general_activation_actn_mc_serial_len, payload(offset, 1)) + offset = offset + 1 + + if (offset + mc_serial_len > payload:len()) then -- the sn length seem to sometimes be wrong? + subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Activation Action: SN length exceeds payload size") + mc_serial_len = payload:len() - offset + end + + subtree:add (f.general_activation_actn_mc_serial, payload(offset, mc_serial_len)) + offset = offset + mc_serial_len + end + + if (offset ~= 2) and (offset ~= 10 + mc_serial_len) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Activation Action: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Activation Action: Payload size different than expected") end +end + +-- General - MFi Cert - 0x33 +-- In case of DM36x, the certificate is handled by IOCTL operations on "/dev/applecp". + +enums.COMMON_MFI_CERT_CMD_TYPE_ENUM = { + [1]="Get_Cert", + [2]="Challenge_Response", +} + +f.general_mfi_cert_cmd_type = ProtoField.uint8 ("dji_dumlv1.general_mfi_cert_cmd_type", "Cmd Type", base.DEC, enums.COMMON_MFI_CERT_CMD_TYPE_ENUM, nil, "'Made For iPod' concerns Apple devices only.") +f.general_mfi_cert_part_sn = ProtoField.uint8 ("dji_dumlv1.general_mfi_cert_part_sn", "Part SN", base.DEC, nil, nil, "Selects which 128-byte part of certificate to return") +--f.general_mfi_cert_unknown0 = ProtoField.none ("dji_dumlv1.general_mfi_cert_unknown0", "Unknown0", base.NONE) + +local function general_mfi_cert_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local cmd_type = payload(offset,1):le_uint() + subtree:add_le (f.general_mfi_cert_cmd_type, payload(offset, 1)) + offset = offset + 1 + + if cmd_type == 1 then + -- Decoded using func Dec_Serial_MFI_Cert_Get_Cert from `usbclient` binary + subtree:add_le (f.general_mfi_cert_part_sn, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"MFI Cert Get: Offset does not match - internal inconsistency") end + elseif cmd_type == 2 then + -- Decoded using func Dec_Serial_MFI_Cert_Challenge_Response from `usbclient` binary + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"MFI Cert Challenge: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"MFI Cert: Payload size different than expected") end +end + +-- General - Common Upgrade Status - 0x42 + +enums.COMMON_UPGRADE_STATUS_UPGRADE_STATE_ENUM = { + [1]="Verify", + [2]="UserConfirm", + [3]="Upgrading", + [4]="Complete", +} + +enums.COMMON_UPGRADE_STATUS_UPGRADE_COMPLETE_REASON_ENUM = { + [1]="Success", + [2]="Failure", + [3]="FirmwareError", + [4]="SameVersion", + [5]="UserCancel", + [6]="TimeOut", + [7]="MotorWorking", + [8]="FirmNotMatch", + [9]="IllegalDegrade", + [10]="NoConnectRC", +} + +f.general_common_upgrade_status_upgrade_state = ProtoField.uint8 ("dji_dumlv1.general_common_upgrade_status_upgrade_state", "Upgrade State", base.DEC, enums.COMMON_UPGRADE_STATUS_UPGRADE_STATE_ENUM, nil, nil) +f.general_common_upgrade_status_user_time = ProtoField.uint8 ("dji_dumlv1.general_common_upgrade_status_user_time", "User Time", base.DEC, nil, nil, "For upgrade_state==2") +f.general_common_upgrade_status_user_reserve = ProtoField.uint8 ("dji_dumlv1.general_common_upgrade_status_user_reserve", "User Reserve", base.HEX, nil, nil, "For upgrade_state==2") +f.general_common_upgrade_status_upgrade_process = ProtoField.uint8 ("dji_dumlv1.general_common_upgrade_status_upgrade_process", "Upgrade Process", base.DEC, nil, nil, "For upgrade_state==3") +f.general_common_upgrade_status_cur_upgrade_index = ProtoField.uint8 ("dji_dumlv1.general_common_upgrade_status_cur_upgrade_index", "Cur Upgrade Index", base.DEC, nil, 0xe0, "For upgrade_state==3") +f.general_common_upgrade_status_upgrade_times_3 = ProtoField.uint8 ("dji_dumlv1.general_common_upgrade_status_upgrade_times", "Upgrade Times", base.DEC, nil, 0x1f, "For upgrade_state==3") +f.general_common_upgrade_status_upgrade_result = ProtoField.uint8 ("dji_dumlv1.general_common_upgrade_status_upgrade_result", "Upgrade Result", base.HEX, enums.COMMON_UPGRADE_STATUS_UPGRADE_COMPLETE_REASON_ENUM, nil, "For upgrade_state==4") +f.general_common_upgrade_status_upgrade_times_4 = ProtoField.uint8 ("dji_dumlv1.general_common_upgrade_status_upgrade_times", "Upgrade Times", base.HEX, nil, nil, "For upgrade_state==4") + +local function general_common_upgrade_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local upgrade_state = payload(offset,1):le_uint() + subtree:add_le (f.general_common_upgrade_status_upgrade_state, payload(offset, 1)) + offset = offset + 1 + + if upgrade_state == 2 then + + subtree:add_le (f.general_common_upgrade_status_user_time, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_common_upgrade_status_user_reserve, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 3) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Common Upgrade Status: Offset does not match - internal inconsistency") end + + elseif upgrade_state == 3 then + + subtree:add_le (f.general_common_upgrade_status_upgrade_process, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_common_upgrade_status_cur_upgrade_index, payload(offset, 1)) + subtree:add_le (f.general_common_upgrade_status_upgrade_times_3, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 3) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Common Upgrade Status: Offset does not match - internal inconsistency") end + + elseif upgrade_state == 4 then + + subtree:add_le (f.general_common_upgrade_status_upgrade_result, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_common_upgrade_status_upgrade_times_4, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 3) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Common Upgrade Status: Offset does not match - internal inconsistency") end + + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Common Upgrade Status: Payload size different than expected") end +end + +-- General - Power State - 0x47 + +f.general_power_state_a = ProtoField.uint8 ("dji_dumlv1.general_power_state_a", "A", base.DEC, nil, nil, "TODO values from enum P3.DataNotifyDisconnect") +f.general_power_state_b = ProtoField.uint16 ("dji_dumlv1.general_power_state_b", "B", base.DEC) + +local function general_power_state_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.general_power_state_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_power_state_b, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 3) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Power State: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Power State: Payload size different than expected") end +end + +-- General - Set Gps Push Config - 0x52 + +f.general_set_gps_push_config_is_start = ProtoField.uint8 ("dji_dumlv1.general_set_gps_push_config_is_start", "Is Start", base.DEC) +f.general_set_gps_push_config_get_push_interval = ProtoField.uint32 ("dji_dumlv1.general_set_gps_push_config_get_push_interval", "Get Push Interval", base.DEC) + +local function general_set_gps_push_config_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.general_set_gps_push_config_is_start, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.general_set_gps_push_config_get_push_interval, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Set Gps Push Config: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Set Gps Push Config: Payload size different than expected") end +end + +-- General - Component Self Test State - 0xf1 + +f.general_compn_state_current_state = ProtoField.uint32 ("dji_dumlv1.general_compn_state_current_state", "Current state", base.HEX) + -- Component state packet flags for OFDM + f.general_compn_state_ofdm_curr_state_fpga_boot = ProtoField.uint32 ("dji_dumlv1.general_compn_state_ofdm_curr_state_fpga_boot", "E FPGA Boot error", base.HEX, nil, 0x01, "Error in FPGA boot state, final state not reached") + f.general_compn_state_ofdm_curr_state_fpga_conf = ProtoField.uint32 ("dji_dumlv1.general_compn_state_ofdm_curr_state_fpga_conf", "E FPGA Config error", base.HEX, nil, 0x02, nil) + f.general_compn_state_ofdm_curr_state_exec_fail1 = ProtoField.uint32 ("dji_dumlv1.general_compn_state_ofdm_curr_state_exec_fail1", "E Exec fail 1", base.HEX, nil, 0x04, "Meaning uncertain") + f.general_compn_state_ofdm_curr_state_exec_fail2 = ProtoField.uint32 ("dji_dumlv1.general_compn_state_ofdm_curr_state_exec_fail2", "E Exec fail 2", base.HEX, nil, 0x08, "Meaning uncertain") + f.general_compn_state_ofdm_curr_state_ver_match = ProtoField.uint32 ("dji_dumlv1.general_compn_state_ofdm_curr_state_ver_match", "E RC vs OFDM version mismatch?", base.HEX, nil, 0x20, "Meaning uncertain") + f.general_compn_state_ofdm_curr_state_tcx_reg = ProtoField.uint32 ("dji_dumlv1.general_compn_state_ofdm_curr_state_tcx_reg", "E Transciever Register error", base.HEX, nil, 0x40, "Error in either ad9363 reg 0x17 or ar8003 reg 0x7C") + f.general_compn_state_ofdm_curr_state_rx_bad_crc = ProtoField.uint32 ("dji_dumlv1.general_compn_state_ofdm_curr_state_rx_bad_crc", "E Received data CRC fail", base.HEX, nil, 0x400, "Meaning uncertain") + f.general_compn_state_ofdm_curr_state_rx_bad_seq = ProtoField.uint32 ("dji_dumlv1.general_compn_state_ofdm_curr_state_rx_bad_seq", "E Received data sequence fail", base.HEX, nil, 0x800, "Meaning uncertain") + +local function general_compn_state_dissector(pkt_length, buffer, pinfo, subtree) + local sender = buffer(4,1):uint() + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.general_compn_state_current_state, payload(offset, 4)) + if sender == 0x09 then + subtree:add_le (f.general_compn_state_ofdm_curr_state_fpga_boot, payload(offset, 4)) + subtree:add_le (f.general_compn_state_ofdm_curr_state_fpga_conf, payload(offset, 4)) + subtree:add_le (f.general_compn_state_ofdm_curr_state_exec_fail1, payload(offset, 4)) + subtree:add_le (f.general_compn_state_ofdm_curr_state_exec_fail2, payload(offset, 4)) + subtree:add_le (f.general_compn_state_ofdm_curr_state_ver_match, payload(offset, 4)) + subtree:add_le (f.general_compn_state_ofdm_curr_state_tcx_reg, payload(offset, 4)) + subtree:add_le (f.general_compn_state_ofdm_curr_state_rx_bad_crc, payload(offset, 4)) + subtree:add_le (f.general_compn_state_ofdm_curr_state_rx_bad_seq, payload(offset, 4)) + else + end + offset = offset + 4 + +end + +-- General - Query Device Info - 0xff + +--f.general_query_device_info_unknown0 = ProtoField.none ("dji_dumlv1.general_query_device_info_unknown0", "Unknown0", base.NONE) + +local function general_query_device_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Query Device Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Query Device Info: Payload size different than expected") end +end + +GENERAL_UART_CMD_DISSECT = { + [0x01] = general_version_inquiry_dissector, + [0x07] = general_enter_loader_dissector, + [0x08] = general_update_confirm_dissector, + [0x09] = general_update_transmit_dissector, + [0x0a] = general_update_finish_dissector, + [0x0b] = general_reboot_chip_dissector, + [0x0c] = general_get_device_state_dissector, + [0x0d] = general_set_device_version_dissector, + [0x0e] = general_heartbeat_log_message_dissector, + [0x0f] = general_upgrade_self_request_dissector, + [0x24] = general_file_sending_dissector, + [0x27] = general_camera_file_dissector, + [0x2a] = general_filetrans_general_trans_dissector, + [0x30] = general_encrypt_config_dissector, + [0x32] = general_activation_actn_dissector, + [0x33] = general_mfi_cert_dissector, + [0x42] = general_common_upgrade_status_dissector, + [0x47] = general_power_state_dissector, + [0x52] = general_set_gps_push_config_dissector, + [0xf1] = general_compn_state_dissector, + [0xff] = general_query_device_info_dissector, +} diff --git a/dissectors/dji-dumlv1/src/dji-dumlv1-gimbal.lua b/dissectors/dji-dumlv1/src/dji-dumlv1-gimbal.lua new file mode 100644 index 0000000..fbe4a1a --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-dumlv1-gimbal.lua @@ -0,0 +1,1574 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-dumlv1-gimbal.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit ef11dab51f73653681a1f97d068beba002f5adfc du 14/08/2019). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- The definitions in this file are part of DJI DUMLv1 protocol dissector +-- Dissectors for command set 0x04 - Gimbal + +local f = DJI_DUMLv1_PROTO.fields +local enums = {} + +-- CMD name decode table + +GIMBAL_UART_CMD_TEXT = { + [0x00] = 'Gimbal Reserved', + [0x01] = 'Gimbal Control', + [0x02] = 'Gimbal Get Position', + [0x03] = 'Gimbal Set Param', + [0x04] = 'Gimbal Get Param', + [0x05] = 'Gimbal Params Get', -- Push Position + [0x06] = 'Gimbal Push AETR', + [0x07] = 'Gimbal Adjust Roll', -- Roll Finetune + [0x08] = 'Gimbal Calibration', -- AutoCalibration + [0x09] = 'Gimbal Reserved2', + [0x0A] = 'Gimbal Ext Ctrl Degree', -- Rotate/Angle Set + [0x0B] = 'Gimbal Get Ext Ctrl Status', -- Get State + [0x0C] = 'Gimbal Ext Ctrl Accel', -- Speed Control + [0x0D] = 'Gimbal Suspend/Resume', -- Set On Or Off + [0x0E] = 'Gimbal Thirdp Magn', + [0x0F] = 'Gimbal User Params Set', + [0x10] = 'Gimbal User Params Get', + [0x11] = 'Gimbal User Params Save', + [0x13] = 'Gimbal User Params Reset Default', -- Resume Default Param + [0x14] = 'Gimbal Abs Angle Control', + [0x15] = 'Gimbal Movement', + [0x1C] = 'Gimbal Type Get', + [0x1E] = 'Gimbal Degree Info Subscription', + [0x20] = 'Gimbal TBD 20', + [0x21] = 'Gimbal TBD 21', + [0x24] = 'Gimbal User Params Get', + [0x27] = 'Gimbal Abnormal Status Get', + [0x2b] = 'Gimbal Tutorial Status Get', + [0x2c] = 'Gimbal Tutorial Step Set', + [0x30] = 'Gimbal Auto Calibration Status', + [0x31] = 'Robin Params Set', + [0x32] = 'Robin Params Get', + [0x33] = 'Robin Battery Info Push', -- Gimbal Battery Info + [0x34] = 'Gimbal Handle Params Set', + [0x36] = 'Gimbal Handle Params Get', + [0x37] = 'Gimbal Timelapse Params Set', + [0x38] = 'Gimbal Timelapse Status', + [0x39] = 'Gimbal Lock', + [0x3A] = 'Gimbal Rotate Camera X Axis', + [0x45] = 'Gimbal Get Temp', + [0x47] = 'Gimbal TBD 47', + [0x4c] = 'Gimbal Reset And Set Mode', + [0x56] = 'Gimbal NotiFy Camera Id', + [0x57] = 'Handheld Stick State Get/Push', + [0x58] = 'Handheld Stick Control Set', -- Handheld Stick Control Enable +} + +-- Gimbal - Gimbal Control - 0x01 +-- Description: Sets 3 values from packet within gimbal RAM, each in range 363..1685. On P3X, no ACK possible. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_control_unkn0 = ProtoField.uint16 ("dji_dumlv1.gimbal_control_unkn0", "Unknown0", base.DEC, nil, nil, "Accepted values 363..1685") +f.gimbal_control_unkn1 = ProtoField.uint16 ("dji_dumlv1.gimbal_control_unkn1", "Unknown1", base.DEC, nil, nil, "Accepted values 363..1685") +f.gimbal_control_unkn2 = ProtoField.uint16 ("dji_dumlv1.gimbal_control_unkn2", "Unknown2", base.DEC, nil, nil, "Accepted values 363..1685") +f.gimbal_control_padding = ProtoField.bytes ("dji_dumlv1.gimbal_control_padding", "Padding", base.SPACE, nil, nil, "Unused") + +local function gimbal_control_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_control_unkn0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_control_unkn1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_control_unkn2, payload(offset, 2)) + offset = offset + 2 + + -- Padding will be used in encrypted payloads + if (payload:len() >= 8) then + subtree:add_le (f.gimbal_control_padding, payload(offset, 2)) + offset = offset + 2 + end + + if (offset ~= 6) and (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Control: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Control: Payload size different than expected") end +end + +-- Gimbal - Gimbal Get Position - 0x02 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_get_position_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_get_position_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_get_position_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_get_position_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Get Position: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Get Position: Payload size different than expected") end +end + +-- Gimbal - Gimbal Set Param - 0x03 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_set_param_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_set_param_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_set_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_set_param_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Set Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Set Param: Payload size different than expected") end +end + +-- Gimbal - Gimbal Get Param - 0x04 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_get_param_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_get_param_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_get_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_get_param_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Get Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Get Param: Payload size different than expected") end +end + +-- Gimbal - Gimbal Params Get / Push Position - 0x05 +-- Description: TODO. +-- Supported in: WM620_FW_01.02.0300 + +enums.GIMBAL_PARAMS_MODE_ENUM = { + [0x00] = 'YawNoFollow', + [0x01] = 'FPV', + [0x02] = 'YawFollow', + [0x03] = 'AutoCalibrate', + -- In P3X, higher modes are not visible due to mask applied to the value + [0x64] = 'OTHER', +} + +f.gimbal_params_pitch = ProtoField.int16 ("dji_dumlv1.gimbal_params_pitch", "Gimbal Pitch", base.DEC, nil, nil, "0.1 degree, gimbal angular position, zero is forward, max down..up is about -900..470") +f.gimbal_params_roll = ProtoField.int16 ("dji_dumlv1.gimbal_params_roll", "Gimbal Roll", base.DEC, nil, nil, "0.1 degree, gimbal angular position, zero is parallel to earth, max right..left is about -410..410") +f.gimbal_params_yaw = ProtoField.int16 ("dji_dumlv1.gimbal_params_yaw", "Gimbal Yaw", base.DEC, nil, nil, "0.1 degree, gimbal angular position, -1000 is forward, max right..left is about -1460..-540") -- TODO verify +f.gimbal_params_masked06 = ProtoField.uint8 ("dji_dumlv1.gimbal_params_masked06", "Masked06", base.HEX) + f.gimbal_params_sub_mode = ProtoField.uint8 ("dji_dumlv1.gimbal_params_sub_mode", "Sub Mode", base.HEX, nil, 0x20, nil) + f.gimbal_params_mode = ProtoField.uint8 ("dji_dumlv1.gimbal_params_mode", "Mode", base.HEX, enums.GIMBAL_PARAMS_MODE_ENUM, 0xc0, nil) +f.gimbal_params_roll_adjust = ProtoField.int8 ("dji_dumlv1.gimbal_params_roll_adjust", "Roll Adjust", base.DEC) +f.gimbal_params_yaw_angle = ProtoField.uint16 ("dji_dumlv1.gimbal_params_yaw_angle", "Yaw Angle", base.HEX, nil, nil, "Not sure whether Yaw angle or Joytick Direction") + f.gimbal_params_joystick_ver_direction = ProtoField.uint16 ("dji_dumlv1.gimbal_params_joystick_ver_direction", "Joystick Ver Direction", base.HEX, nil, 0x03, nil) + f.gimbal_params_joystick_hor_direction = ProtoField.uint16 ("dji_dumlv1.gimbal_params_joystick_hor_direction", "Joystick Hor Direction", base.HEX, nil, 0x0c, nil) +f.gimbal_params_masked0a = ProtoField.uint8 ("dji_dumlv1.gimbal_params_masked0a", "Masked0A", base.HEX) + f.gimbal_params_pitch_in_limit = ProtoField.uint8 ("dji_dumlv1.gimbal_params_pitch_in_limit", "Pitch In Limit", base.HEX, nil, 0x01, "Pitch arm is beyond its limit positions") + f.gimbal_params_roll_in_limit = ProtoField.uint8 ("dji_dumlv1.gimbal_params_roll_in_limit", "Roll In Limit", base.HEX, nil, 0x02, "Roll arm is beyond its limit positions") + f.gimbal_params_yaw_in_limit = ProtoField.uint8 ("dji_dumlv1.gimbal_params_yaw_in_limit", "Yaw In Limit", base.HEX, nil, 0x04, "Yaw arm is beyond its limit positions") + f.gimbal_params_auto_calibration = ProtoField.uint8 ("dji_dumlv1.gimbal_params_auto_calibration", "Auto Calibration", base.HEX, nil, 0x08, "Auto calibration in progress") + f.gimbal_params_auto_calibration_result = ProtoField.uint8 ("dji_dumlv1.gimbal_params_auto_calibration_result", "Auto Calibration Result", base.HEX, nil, 0x10, nil) + f.gimbal_params_stuck = ProtoField.uint8 ("dji_dumlv1.gimbal_params_stuck", "Stuck", base.HEX, nil, 0x40, nil) +f.gimbal_params_masked0b = ProtoField.uint8 ("dji_dumlv1.gimbal_params_masked0b", "Masked0B", base.HEX) + f.gimbal_params_version = ProtoField.uint8 ("dji_dumlv1.gimbal_params_version", "Version", base.HEX, nil, 0x0f, nil) + f.gimbal_params_double_click = ProtoField.uint8 ("dji_dumlv1.gimbal_params_double_click", "Double Click", base.HEX, nil, 0x20, nil) + f.gimbal_params_triple_click = ProtoField.uint8 ("dji_dumlv1.gimbal_params_triple_click", "Triple Click", base.HEX, nil, 0x40, nil) + f.gimbal_params_single_click = ProtoField.uint8 ("dji_dumlv1.gimbal_params_single_click", "Single Click", base.HEX, nil, 0x80, nil) +f.gimbal_params_unkn0c = ProtoField.uint32 ("dji_dumlv1.gimbal_params_unkn0c", "Unknown0c", base.HEX) +f.gimbal_params_unkn10 = ProtoField.uint32 ("dji_dumlv1.gimbal_params_unkn10", "Unknown10-i32", base.HEX) +f.gimbal_params_unkn10b = ProtoField.bytes ("dji_dumlv1.gimbal_params_unkn10", "Unknown10-bt", base.SPACE) +f.gimbal_params_unkn14 = ProtoField.uint32 ("dji_dumlv1.gimbal_params_unkn14", "Unknown14", base.HEX) + +local function gimbal_params_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_params_pitch, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_params_roll, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_params_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_params_masked06, payload(offset, 1)) + subtree:add_le (f.gimbal_params_sub_mode, payload(offset, 1)) + subtree:add_le (f.gimbal_params_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_params_roll_adjust, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_params_yaw_angle, payload(offset, 2)) + subtree:add_le (f.gimbal_params_joystick_ver_direction, payload(offset, 2)) + subtree:add_le (f.gimbal_params_joystick_hor_direction, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_params_masked0a, payload(offset, 1)) + subtree:add_le (f.gimbal_params_pitch_in_limit, payload(offset, 1)) + subtree:add_le (f.gimbal_params_roll_in_limit, payload(offset, 1)) + subtree:add_le (f.gimbal_params_yaw_in_limit, payload(offset, 1)) + subtree:add_le (f.gimbal_params_auto_calibration, payload(offset, 1)) + subtree:add_le (f.gimbal_params_auto_calibration_result, payload(offset, 1)) + subtree:add_le (f.gimbal_params_stuck, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_params_masked0b, payload(offset, 1)) + subtree:add_le (f.gimbal_params_version, payload(offset, 1)) + subtree:add_le (f.gimbal_params_double_click, payload(offset, 1)) + subtree:add_le (f.gimbal_params_triple_click, payload(offset, 1)) + subtree:add_le (f.gimbal_params_single_click, payload(offset, 1)) + offset = offset + 1 + + -- Found additional 12 bytes in packet from WM620 + if (payload:len() >= offset + 12) then + + subtree:add_le (f.gimbal_params_unkn0c, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gimbal_params_unkn10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gimbal_params_unkn14, payload(offset, 4)) + offset = offset + 4 + + elseif (payload:len() >= offset + 7) then + + subtree:add_le (f.gimbal_params_unkn0c, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gimbal_params_unkn10b, payload(offset, 3)) + offset = offset + 3 + + end + + if (offset ~= 12) and (offset ~= 19) and (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Params: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Params: Payload size different than expected") end +end + +-- Gimbal - Gimbal Push AETR - 0x06 +-- Description: Sets Aileron, Elevator, Throttle and Rudder, each in range 364..1684. On P3X, no ACK possible. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_push_aetr_unkn0 = ProtoField.uint16 ("dji_dumlv1.gimbal_push_aetr_unkn0", "Unknown0", base.DEC, nil, nil, "Accepted values are 364..1684") +f.gimbal_push_aetr_unkn1 = ProtoField.uint16 ("dji_dumlv1.gimbal_push_aetr_unkn1", "Unknown1", base.DEC, nil, nil, "Accepted values are 364..1684") +f.gimbal_push_aetr_unkn2 = ProtoField.uint16 ("dji_dumlv1.gimbal_push_aetr_unkn2", "Unknown2", base.DEC, nil, nil, "Accepted values are 364..1684") +f.gimbal_push_aetr_unkn3 = ProtoField.uint16 ("dji_dumlv1.gimbal_push_aetr_unkn3", "Unknown3", base.DEC, nil, nil, "Accepted values are 364..1684") + +local function gimbal_push_aetr_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_push_aetr_unkn0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_push_aetr_unkn1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_push_aetr_unkn2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_push_aetr_unkn3, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Push AETR: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Push AETR: Payload size different than expected") end +end + +-- Gimbal - Gimbal Adjust Roll / Roll Finetune - 0x07 +-- Description: Receives a value from packet and shifts internal roll adjustment by it. The adjustment is not saved into persistent storage. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_adjust_roll_adjustment_val = ProtoField.int8 ("dji_dumlv1.gimbal_adjust_roll_adjustment_val", "Adjustment Value", base.DEC, nil, nil) + +local function gimbal_adjust_roll_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_adjust_roll_adjustment_val, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Adjust Roll: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Adjust Roll: Payload size different than expected") end +end + +-- Gimbal - Gimbal Calibration - 0x08 +-- Description: On Ph3 starts auto-calibration, the same which can be triggered by mobile app; calibrates only 2 axes. +-- On Spark starts one of given calibration routines. +-- Supported in: P3X_FW_V01.11.0030_m0400 (with no cmd selection) + +enums.GIMBAL_CALIBRATE_CMD_ENUM = { + [0x00] = 'JointCoarse', + [0x01] = 'LinearHall', +} + +f.gimbal_calibrate_cmd = ProtoField.uint8 ("dji_dumlv1.gimbal_calibrate_cmd", "Calib. Command", base.DEC, enums.GIMBAL_CALIBRATE_CMD_ENUM, nil) +f.gimbal_calibrate_status1 = ProtoField.uint8 ("dji_dumlv1.gimbal_calibrate_status1", "Calib. Status1", base.DEC, nil, nil) +f.gimbal_calibrate_status2 = ProtoField.uint8 ("dji_dumlv1.gimbal_calibrate_status2", "Calib. Status2", base.DEC, nil, nil) + +local function gimbal_calibrate_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- Usually we use pack_type to differentiate between request and respone; on WM100_FW_V01.00.0900 it does not work + if (payload:len() <= 1) then -- Request + subtree:add_le (f.gimbal_calibrate_cmd, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Calibration: Offset does not match - internal inconsistency") end + else -- Response (but response bit not set) + subtree:add_le (f.gimbal_calibrate_status1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_calibrate_status2, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Calibration: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Calibration: Payload size different than expected") end +end + +-- Gimbal - Gimbal Reserved2 - 0x09 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_reserved2_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_reserved2_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_reserved2_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_reserved2_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Reserved2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Reserved2: Payload size different than expected") end +end + +-- Gimbal - Gimbal Ext Ctrl Degree / Rotate/Angle Set - 0x0a +-- Description: Sets 3 angular values and 3 additional values from packet within gimbal RAM. In P3X, resets values from packet 0x20 to 1 if ACK was requested. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_ext_ctrl_degree_unknown0 = ProtoField.int16 ("dji_dumlv1.gimbal_ext_ctrl_degree_unknown0", "Unknown0", base.DEC, nil, nil, "angle in degrees * 10, range -1800..1800") +f.gimbal_ext_ctrl_degree_unknown2 = ProtoField.int16 ("dji_dumlv1.gimbal_ext_ctrl_degree_unknown2", "Unknown2", base.DEC, nil, nil, "angle in degrees * 10, range -1800..1800") +f.gimbal_ext_ctrl_degree_unknown4 = ProtoField.int16 ("dji_dumlv1.gimbal_ext_ctrl_degree_unknown4", "Unknown4", base.DEC, nil, nil, "angle in degrees * 10, range -1800..1800") +f.gimbal_ext_ctrl_degree_unknown6 = ProtoField.int16 ("dji_dumlv1.gimbal_ext_ctrl_degree_unknown6", "Unknown6", base.DEC, nil, nil, "unknown unit * 100") +f.gimbal_ext_ctrl_degree_unknown8 = ProtoField.uint8 ("dji_dumlv1.gimbal_ext_ctrl_degree_unknown8", "Unknown8", base.HEX, nil, nil, "flag fields") +f.gimbal_ext_ctrl_degree_unknown9 = ProtoField.uint8 ("dji_dumlv1.gimbal_ext_ctrl_degree_unknown9", "Unknown9", base.HEX, nil, nil, "unknown unit / 2000, range 1..10") + +local function gimbal_ext_ctrl_degree_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_ext_ctrl_degree_unknown0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_ext_ctrl_degree_unknown2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_ext_ctrl_degree_unknown4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_ext_ctrl_degree_unknown6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_ext_ctrl_degree_unknown8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_ext_ctrl_degree_unknown9, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Ext Ctrl Degree: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Ext Ctrl Degree: Payload size different than expected") end +end + +-- Gimbal - Gimbal Ext Ctrl Status - 0x0b +-- Description: In response to this request, gimbal returns a flag field and int value representing current ctrl status. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_ext_ctrl_status_status = ProtoField.uint8 ("dji_dumlv1.gimbal_ext_ctrl_status_status", "Status", base.HEX, nil, nil, "Request processing status; always 0.") +f.gimbal_ext_ctrl_status_flags = ProtoField.uint8 ("dji_dumlv1.gimbal_ext_ctrl_status_flags", "Flags", base.HEX, nil, nil, "Only the top bit is meaningful, the rest is garbage") +f.gimbal_ext_ctrl_status_unknown2 = ProtoField.int16 ("dji_dumlv1.gimbal_ext_ctrl_status_unknown2", "Unknown2", base.DEC, nil, nil) + +local function gimbal_ext_ctrl_status_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + -- No payload needed + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Ext Ctrl Status: Offset does not match - internal inconsistency") end + else -- Response + + subtree:add_le (f.gimbal_ext_ctrl_status_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_ext_ctrl_status_flags, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_ext_ctrl_status_unknown2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Ext Ctrl Status: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Ext Ctrl Status: Payload size different than expected") end +end + +-- Gimbal - Gimbal Ext Ctrl Accel / Speed Control - 0x0c +-- Description: Sets angular accelerations of each gimbal axis. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_ext_ctrl_accel_unknown0 = ProtoField.int16 ("dji_dumlv1.gimbal_ext_ctrl_accel_unknown0", "Unknown0", base.DEC, nil, nil, "angle in degrees * 10, range -1800..1800") +f.gimbal_ext_ctrl_accel_unknown2 = ProtoField.int16 ("dji_dumlv1.gimbal_ext_ctrl_accel_unknown2", "Unknown2", base.DEC, nil, nil, "angle in degrees * 10, range -1800..1800") +f.gimbal_ext_ctrl_accel_unknown4 = ProtoField.int16 ("dji_dumlv1.gimbal_ext_ctrl_accel_unknown4", "Unknown4", base.DEC, nil, nil, "angle in degrees * 10, range -1800..1800") +f.gimbal_ext_ctrl_accel_unknown6 = ProtoField.uint8 ("dji_dumlv1.gimbal_ext_ctrl_accel_unknown6", "Unknown6", base.HEX, nil, nil, "flag fields") + +local function gimbal_ext_ctrl_accel_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_ext_ctrl_accel_unknown0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_ext_ctrl_accel_unknown2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_ext_ctrl_accel_unknown4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_ext_ctrl_accel_unknown6, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Ext Ctrl Accel: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Ext Ctrl Accel: Payload size different than expected") end +end + +-- Gimbal - Gimbal Suspend/Resume / Set On Or Off - 0x0d +-- Description: Allows to suspend or resume gimbal motion when correct magic value is provided as payload. Sets a single flag in RAM. No ACK possible. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +enums.GIMBAL_SUSPEND_RESUME_CMD_ENUM = { + [0x2AB5]="Resume", + [0x7EF2]="Suspend", +} + +f.gimbal_suspend_resume_cmd = ProtoField.uint16 ("dji_dumlv1.gimbal_suspend_resume_cmd", "Command", base.HEX, enums.GIMBAL_SUSPEND_RESUME_CMD_ENUM, nil) + +local function gimbal_suspend_resume_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_suspend_resume_cmd, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Suspend/Resume: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Suspend/Resume: Payload size different than expected") end +end + +-- Gimbal - Gimbal Thirdp Magn - 0x0e +-- Description: Sets 3 values from packet; does some processing on the values, influences many values stored in RAM. +-- Maybe calibrates the gimbal for work with third party magnetometer? +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_thirdp_magn_unknown0 = ProtoField.int16 ("dji_dumlv1.gimbal_thirdp_magn_unknown0", "Unknown0", base.DEC, nil, nil) +f.gimbal_thirdp_magn_unknown2 = ProtoField.int16 ("dji_dumlv1.gimbal_thirdp_magn_unknown2", "Unknown2", base.DEC, nil, nil) +f.gimbal_thirdp_magn_unknown4 = ProtoField.int16 ("dji_dumlv1.gimbal_thirdp_magn_unknown4", "Unknown4", base.DEC, nil, nil) + +local function gimbal_thirdp_magn_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_thirdp_magn_unknown0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_thirdp_magn_unknown2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_thirdp_magn_unknown4, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Thirdp Magn: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Thirdp Magn: Payload size different than expected") end +end + +-- Gimbal - Gimbal User Params Set - 0x0f +-- Description: Allows to set new values of gimbal user params. Index and size of each param must be provided. On Ph3, also resets values from packet 0x20 to 1. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_user_params_set_resp_status = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_set_resp_status", "Status", base.DEC, nil, nil, "Request processing status; non-zero value means error.") +f.gimbal_user_params_set_param_idx = ProtoField.int8 ("dji_dumlv1.gimbal_user_params_set_param_idx", "Param Idx", base.DEC, nil, nil) +f.gimbal_user_params_set_param_size = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_set_param_size", "Param Size", base.DEC, nil, nil) +f.gimbal_user_params_set_param_value = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_set_param_value", "Param Value", base.SPACE, nil, nil) + +local function gimbal_user_params_set_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + local i = 0 + while offset < payload:len() do + i = i + 1 + + subtree:add_le (f.gimbal_user_params_set_param_idx, payload(offset, 1)) + offset = offset + 1 + + local param_size = payload(offset, 1):uint() + subtree:add_le (f.gimbal_user_params_set_param_size, payload(offset, 1)) + offset = offset + 1 + + if param_size == 8 then + subtree:add_le (f.gimbal_user_params_set_param_value, payload(offset, 8)) + offset = offset + 8 + elseif param_size == 4 then + subtree:add_le (f.gimbal_user_params_set_param_value, payload(offset, 4)) + offset = offset + 4 + elseif param_size == 2 then + subtree:add_le (f.gimbal_user_params_set_param_value, payload(offset, 2)) + offset = offset + 2 + else + subtree:add_le (f.gimbal_user_params_set_param_value, payload(offset, 1)) + offset = offset + 1 + end + + end + + else -- Response + + subtree:add_le (f.gimbal_user_params_set_resp_status, payload(offset, 1)) + offset = offset + 1 + + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal User Params Set: Payload size different than expected") end +end + +-- Gimbal - Gimbal User Params Get - 0x10 +-- Description: Given indexes of gimbal user params, returns a list of their values. Values have different size depending on their type. +-- On Ph3, there are 12 gimbal user params defined in firmware. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_user_params_get_param_idx = ProtoField.int8 ("dji_dumlv1.gimbal_user_params_get_param_idx", "Param Idx", base.DEC, nil, nil) +f.gimbal_user_params_get_resp_status = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_get_resp_status", "Status", base.DEC, nil, nil, "Request processing status; non-zero value means error.") +f.gimbal_user_params_get_param_size = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_get_param_size", "Param Size", base.DEC, nil, nil) +f.gimbal_user_params_get_param_value = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_get_param_value", "Param Value", base.SPACE, nil, nil) +f.gimbal_user_params_get_param_err = ProtoField.int8 ("dji_dumlv1.gimbal_user_params_get_param_err", "Param Retrieval Error", base.DEC, nil, nil) + +local function gimbal_user_params_get_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + local i = 0 + while offset < payload:len() do + i = i + 1 + + subtree:add_le (f.gimbal_user_params_get_param_idx, payload(offset, 1)) + offset = offset + 1 + + end + + else -- Response + + subtree:add_le (f.gimbal_user_params_get_resp_status, payload(offset, 1)) + offset = offset + 1 + + local i = 0 + while offset < payload:len() do + i = i + 1 + + local param_idx = payload(offset, 1):int() + if param_idx >= 0 then -- Proper index means parameter retrieved successfully + + subtree:add_le (f.gimbal_user_params_get_param_idx, payload(offset, 1)) + offset = offset + 1 + + local param_size = payload(offset, 1):uint() + subtree:add_le (f.gimbal_user_params_get_param_size, payload(offset, 1)) + offset = offset + 1 + + if param_size == 8 then + subtree:add_le (f.gimbal_user_params_get_param_value, payload(offset, 8)) + offset = offset + 8 + elseif param_size == 4 then + subtree:add_le (f.gimbal_user_params_get_param_value, payload(offset, 4)) + offset = offset + 4 + elseif param_size == 2 then + subtree:add_le (f.gimbal_user_params_get_param_value, payload(offset, 2)) + offset = offset + 2 + else + subtree:add_le (f.gimbal_user_params_get_param_value, payload(offset, 1)) + offset = offset + 1 + end + + else -- If index below 0, then it means error code and skip to next param + + subtree:add_le (f.gimbal_user_params_get_param_err, payload(offset, 1)) + offset = offset + 1 + + end + + end + + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal User Params Get: Payload size different than expected") end +end + +-- Gimbal - Gimbal User Params Save - 0x11 +-- Description: Stores values from user_param list, and additional values like the roll adjustment, to persistent storage. +-- On Ph3, requires one byte payload to send an ACK. Also on Ph3, besides returning status code, sets values from packet 0x20 to different numbers on success and on failure. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_user_params_save_reserved = ProtoField.int8 ("dji_dumlv1.gimbal_user_params_save_reserved", "Reserved", base.DEC, nil, nil, "Unused value, but must exist in order for gimbal to send back ACK.") +f.gimbal_user_params_save_resp_status = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_save_resp_status", "Status", base.DEC, nil, nil, "Request processing status; non-zero value means error.") + +local function gimbal_user_params_save_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + subtree:add_le (f.gimbal_user_params_save_reserved, payload(offset, 1)) + offset = offset + 1 + + else -- Response + + subtree:add_le (f.gimbal_user_params_save_resp_status, payload(offset, 1)) + offset = offset + 1 + + end + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal User Params Save: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal User Params Save: Payload size different than expected") end +end + +-- Gimbal - Gimbal User Params Reset Default / Resume Default Param - 0x13 +-- Description: Restores values of all user params to defaults from persistent storage. On Ph3, resets values from packet 0x20 to 1. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_user_params_reset_def_resp_status = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_reset_def_resp_status", "Status", base.DEC, nil, nil, "Request processing status; non-zero value means error.") + +local function gimbal_user_params_reset_def_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal User Params Reset Default: Offset does not match - internal inconsistency") end + else -- Response + + subtree:add_le (f.gimbal_user_params_reset_def_resp_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal User Params Reset Default: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal User Params Reset Default: Payload size different than expected") end +end + +-- Gimbal - Gimbal Abs Angle Control - 0x14 +-- Description: Sets 3 angular values and 1 additional value from packet within gimbal RAM. Also contains flags field which influences which fields are set. No ACK possible. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_abs_angle_control_angle1 = ProtoField.int16 ("dji_dumlv1.gimbal_abs_angle_control_angle1", "Angle1", base.DEC, nil, nil, "in degrees * 10") +f.gimbal_abs_angle_control_angle2 = ProtoField.int16 ("dji_dumlv1.gimbal_abs_angle_control_angle2", "Angle2", base.DEC, nil, nil, "in degrees * 10") +f.gimbal_abs_angle_control_angle3 = ProtoField.int16 ("dji_dumlv1.gimbal_abs_angle_control_angle3", "Angle3", base.DEC, nil, nil, "in degrees * 10") +f.gimbal_abs_angle_control_flags = ProtoField.uint8 ("dji_dumlv1.gimbal_abs_angle_control_flags", "Flags", base.HEX, nil, nil) +f.gimbal_abs_angle_control_field7 = ProtoField.uint8 ("dji_dumlv1.gimbal_abs_angle_control_field6", "Field6", base.DEC, nil, nil) + +local function gimbal_abs_angle_control_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_abs_angle_control_angle1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_abs_angle_control_angle2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_abs_angle_control_angle3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_abs_angle_control_flags, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_abs_angle_control_field7, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Abs Angle Control: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Abs Angle Control: Payload size different than expected") end +end + +-- Gimbal - Gimbal Movement - 0x15 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_move_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_move_unknown0", "Unknown0", base.DEC, nil, nil, "0.04 degree") +f.gimbal_move_unknown1 = ProtoField.int8 ("dji_dumlv1.gimbal_move_unknown1", "Unknown1", base.DEC, nil, nil, "0.04 degree") +f.gimbal_move_unknown2 = ProtoField.int8 ("dji_dumlv1.gimbal_move_unknown2", "Unknown2", base.DEC, nil, nil, "0.04 degree") +f.gimbal_move_unknown3 = ProtoField.int8 ("dji_dumlv1.gimbal_move_unknown3", "Unknown3", base.DEC, nil, nil, "0.1 degree") +f.gimbal_move_unknown4 = ProtoField.int8 ("dji_dumlv1.gimbal_move_unknown4", "Unknown4", base.DEC, nil, nil, "0.1 degree") +f.gimbal_move_unknown5 = ProtoField.int8 ("dji_dumlv1.gimbal_move_unknown5", "Unknown5", base.DEC, nil, nil, "0.1 degree") +f.gimbal_move_unknown6 = ProtoField.uint8 ("dji_dumlv1.gimbal_move_unknown6", "Unknown6", base.DEC, nil, nil, "percent") +f.gimbal_move_unknown7 = ProtoField.uint8 ("dji_dumlv1.gimbal_move_unknown7", "Unknown7", base.DEC, nil, nil, "percent") +f.gimbal_move_roll_adjust = ProtoField.uint8 ("dji_dumlv1.gimbal_move_roll_adjust", "Roll Adjust", base.DEC) +f.gimbal_move_reserved = ProtoField.bytes ("dji_dumlv1.gimbal_move_reserved", "Reserved", base.SPACE, nil, nil, "should be zero-filled") + +local function gimbal_move_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_move_unknown0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_unknown1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_unknown2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_unknown3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_unknown4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_unknown5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_unknown6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_unknown7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_roll_adjust, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_move_reserved, payload(offset, 11)) + offset = offset + 11 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Move: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Move: Payload size different than expected") end +end + +-- Gimbal - Gimbal Type - 0x1c +-- Description: TODO. +-- Supported in: UNKNOWN + +enums.GIMBAL_TYPE_TYPE_DJI_GIMBAL_TYPE_ENUM = { + [0x00] = 'TIMEOUT', + [0x01] = 'FAULT', + [0x02] = 'FC550', + [0x03] = 'FC300SX', + [0x04] = 'FC260', + [0x05] = 'FC350', + [0x06] = 'FC350Z', + [0x07] = 'Z15', + [0x08] = 'P4', + [0x0b] = 'D5', + [0x0c] = 'GH4', + [0x0d] = 'A7', + [0x0e] = 'BMPCC', + [0x14] = 'WM220', + [0x0a] = 'Ronin', + [0x64] = 'OTHER', +} + +f.gimbal_type_type = ProtoField.uint8 ("dji_dumlv1.gimbal_type_type", "Type", base.HEX, enums.GIMBAL_TYPE_TYPE_DJI_GIMBAL_TYPE_ENUM, nil, nil) + +local function gimbal_type_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_type_type, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Type: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Type: Payload size different than expected") end +end + +-- Gimbal - Gimbal Degree Info Subscription - 0x1e +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_degree_info_subscription_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_degree_info_subscription_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_degree_info_subscription_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_degree_info_subscription_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Degree Info Subscription: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Degree Info Subscription: Payload size different than expected") end +end + +-- Gimbal - Gimbal TBD 20 - 0x20 +-- Description: Sets 3 values from packet within gimbal RAM. No ACK possible. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_tbd_20_unknown0 = ProtoField.int32 ("dji_dumlv1gimbal_tbd_20_unknown0", "Unknown0", base.DEC, nil, nil) +f.gimbal_tbd_20_unknown4 = ProtoField.uint8 ("dji_dumlv1gimbal_tbd_20_unknown0", "Unknown4", base.DEC, nil, nil) +f.gimbal_tbd_20_unknown5 = ProtoField.uint8 ("dji_dumlv1gimbal_tbd_20_unknown0", "Unknown5", base.DEC, nil, nil) + +local function gimbal_tbd_20_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_tbd_20_unknown0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gimbal_tbd_20_unknown4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tbd_20_unknown5, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal TBD 20: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal TBD 20: Payload size different than expected") end +end + +-- Gimbal - Gimbal TBD 21 - 0x21 +-- Description: Sets values of unknown 3-element list within RAM. Each list entry consists of 3 integers. No ACK possible. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_tbd_21_dry_run = ProtoField.int8 ("dji_dumlv1.gimbal_tbd_21_dry_run", "Dry Run", base.DEC, nil, nil, "When not zero, the packet will have no effect") +f.gimbal_tbd_21_unknown1 = ProtoField.int8 ("dji_dumlv1.gimbal_tbd_21_unknown1", "Unknown1", base.DEC, nil, nil) +f.gimbal_tbd_21_arr0_field0 = ProtoField.uint32 ("dji_dumlv1.gimbal_tbd_21_arr0_field0", "Array el0 Field0", base.DEC, nil, nil) +f.gimbal_tbd_21_arr0_field4 = ProtoField.uint8 ("dji_dumlv1.gimbal_tbd_21_arr0_field4", "Array el0 Field4", base.DEC, nil, nil) +f.gimbal_tbd_21_arr0_field5 = ProtoField.uint8 ("dji_dumlv1.gimbal_tbd_21_arr0_field5", "Array el0 Field5", base.DEC, nil, nil) +f.gimbal_tbd_21_arr1_field0 = ProtoField.uint32 ("dji_dumlv1.gimbal_tbd_21_arr1_field0", "Array el1 Field0", base.DEC, nil, nil) +f.gimbal_tbd_21_arr1_field4 = ProtoField.uint8 ("dji_dumlv1.gimbal_tbd_21_arr1_field4", "Array el1 Field4", base.DEC, nil, nil) +f.gimbal_tbd_21_arr1_field5 = ProtoField.uint8 ("dji_dumlv1.gimbal_tbd_21_arr1_field5", "Array el1 Field5", base.DEC, nil, nil) +f.gimbal_tbd_21_arr2_field0 = ProtoField.uint32 ("dji_dumlv1.gimbal_tbd_21_arr2_field0", "Array el2 Field0", base.DEC, nil, nil) +f.gimbal_tbd_21_arr2_field4 = ProtoField.uint8 ("dji_dumlv1.gimbal_tbd_21_arr2_field4", "Array el2 Field4", base.DEC, nil, nil) +f.gimbal_tbd_21_arr2_field5 = ProtoField.uint8 ("dji_dumlv1.gimbal_tbd_21_arr2_field5", "Array el2 Field5", base.DEC, nil, nil) + +local function gimbal_tbd_21_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_tbd_21_dry_run, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tbd_21_unknown1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tbd_21_arr0_field0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gimbal_tbd_21_arr0_field4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tbd_21_arr0_field5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tbd_21_arr1_field0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gimbal_tbd_21_arr1_field4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tbd_21_arr1_field5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tbd_21_arr2_field0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gimbal_tbd_21_arr2_field4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tbd_21_arr2_field5, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal TBD 21: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal TBD 21: Payload size different than expected") end +end + +-- Gimbal - Gimbal User Params - 0x24 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_user_params_unknown00 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown00", "Unknown00", base.SPACE) +f.gimbal_user_params_preset_id = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_preset_id", "Preset Id", base.HEX) +f.gimbal_user_params_unknown03 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown03", "Unknown03", base.SPACE) +f.gimbal_user_params_yaw_speed = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_yaw_speed", "Yaw Speed", base.HEX) +f.gimbal_user_params_unknown0b = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown0b", "Unknown0B", base.SPACE) +f.gimbal_user_params_pitch_speed = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_pitch_speed", "Pitch Speed", base.HEX) +f.gimbal_user_params_unknown0f = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown0f", "Unknown0F", base.SPACE) +f.gimbal_user_params_yaw_deadband = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_yaw_deadband", "Yaw Deadband", base.HEX) +f.gimbal_user_params_unknown13 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown13", "Unknown13", base.SPACE) +f.gimbal_user_params_pitch_deadband = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_pitch_deadband", "Pitch Deadband", base.HEX) +f.gimbal_user_params_unknown17 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown17", "Unknown17", base.SPACE) +f.gimbal_user_params_stick_yaw_speed = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_stick_yaw_speed", "Stick Yaw Speed", base.HEX) +f.gimbal_user_params_unknown1b = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown1b", "Unknown1B", base.SPACE) +f.gimbal_user_params_stick_pitch_speed = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_stick_pitch_speed", "Stick Pitch Speed", base.HEX) +f.gimbal_user_params_unknown1f = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown1f", "Unknown1F", base.SPACE) +f.gimbal_user_params_stick_yaw_smooth = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_stick_yaw_smooth", "Stick Yaw Smooth", base.HEX) +f.gimbal_user_params_unknown23 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown23", "Unknown23", base.SPACE) +f.gimbal_user_params_stick_pitch_smooth = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_stick_pitch_smooth", "Stick Pitch Smooth", base.HEX) +f.gimbal_user_params_unknown27 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown27", "Unknown27", base.SPACE) +f.gimbal_user_params_roll_speed = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_roll_speed", "Roll Speed", base.HEX) +f.gimbal_user_params_unknown31 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown31", "Unknown31", base.SPACE) +f.gimbal_user_params_roll_deadband = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_roll_deadband", "Roll Deadband", base.HEX) +f.gimbal_user_params_unknown35 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown35", "Unknown35", base.SPACE) +f.gimbal_user_params_yaw_accel = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_yaw_accel", "Yaw Accel", base.HEX) +f.gimbal_user_params_unknown39 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown39", "Unknown39", base.SPACE) +f.gimbal_user_params_pitch_accel = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_pitch_accel", "Pitch Accel", base.HEX) +f.gimbal_user_params_unknown3d = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown3d", "Unknown3D", base.SPACE) +f.gimbal_user_params_roll_accel = ProtoField.uint16 ("dji_dumlv1.gimbal_user_params_roll_accel", "Roll Accel", base.HEX) +f.gimbal_user_params_unknown41 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown41", "Unknown41", base.SPACE) +f.gimbal_user_params_yaw_smooth_track = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_yaw_smooth_track", "Yaw Smooth Track", base.HEX) +f.gimbal_user_params_unknown44 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown44", "Unknown44", base.SPACE) +f.gimbal_user_params_pitch_smooth_track = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_pitch_smooth_track", "Pitch Smooth Track", base.HEX) +f.gimbal_user_params_unknown47 = ProtoField.bytes ("dji_dumlv1.gimbal_user_params_unknown47", "Unknown47", base.SPACE) +f.gimbal_user_params_roll_smooth_track = ProtoField.uint8 ("dji_dumlv1.gimbal_user_params_roll_smooth_track", "Roll Smooth Track", base.HEX) + +local function gimbal_user_params_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_user_params_unknown00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_preset_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_user_params_unknown03, payload(offset, 6)) + offset = offset + 6 + + subtree:add_le (f.gimbal_user_params_yaw_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown0b, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_pitch_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown0f, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_yaw_deadband, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown13, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_pitch_deadband, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown17, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_stick_yaw_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown1b, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_stick_pitch_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown1f, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_stick_yaw_smooth, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown23, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_stick_pitch_smooth, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown27, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gimbal_user_params_roll_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown31, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_roll_deadband, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown35, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_yaw_accel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown39, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_pitch_accel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown3d, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_roll_accel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_unknown41, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_yaw_smooth_track, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_user_params_unknown44, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_pitch_smooth_track, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_user_params_unknown47, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gimbal_user_params_roll_smooth_track, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 74) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal User Params: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal User Params: Payload size different than expected") end +end + +-- Gimbal - Gimbal Abnormal Status - 0x27 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_abnormal_status_masked00 = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_masked00", "Masked00", base.HEX) + f.gimbal_abnormal_status_roll_locked = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_roll_locked", "Roll Locked", base.HEX, nil, 0x01, nil) + f.gimbal_abnormal_status_pitch_locked = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_pitch_locked", "Pitch Locked", base.HEX, nil, 0x02, nil) + f.gimbal_abnormal_status_yaw_locked = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_yaw_locked", "Yaw Locked", base.HEX, nil, 0x04, nil) +f.gimbal_abnormal_status_masked01 = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_masked01", "Masked01", base.HEX) + f.gimbal_abnormal_status_joint_lock_after_startup = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_joint_lock_after_startup", "Joint Lock After Startup", base.HEX, nil, 0x01, nil) + f.gimbal_abnormal_status_joint_lock_when_startup = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_joint_lock_when_startup", "Joint Lock When Startup", base.HEX, nil, 0x02, nil) + f.gimbal_abnormal_status_motor_protected = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_motor_protected", "Motor Protected", base.HEX, nil, 0x04, nil) + f.gimbal_abnormal_status_error_recent_when_start_up = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_error_recent_when_start_up", "Error Recent When Start Up", base.HEX, nil, 0x08, nil) + f.gimbal_abnormal_status_upgrading = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_upgrading", "Upgrading", base.HEX, nil, 0x10, nil) + f.gimbal_abnormal_status_yaw_limit = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_yaw_limit", "Yaw Limit", base.HEX, nil, 0x20, nil) + f.gimbal_abnormal_status_error_recent_or_selfie = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_error_recent_or_selfie", "Error Recent Or Selfie", base.HEX, nil, 0x40, nil) + f.gimbal_abnormal_status_pano_ready = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_pano_ready", "Pano Ready", base.HEX, nil, 0x80, nil) +f.gimbal_abnormal_status_masked02 = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_masked02", "Masked02", base.HEX) + f.gimbal_abnormal_status_fan_direction = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_fan_direction", "Fan Direction", base.HEX, nil, 0x02, nil) + f.gimbal_abnormal_status_vertical_direction = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_vertical_direction", "Vertical Direction", base.HEX, nil, 0x04, nil) + f.gimbal_abnormal_status_in_flashlight = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_in_flashlight", "In Flashlight", base.HEX, nil, 0x08, nil) + f.gimbal_abnormal_status_portrait = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_portrait", "Portrait", base.HEX, nil, 0x10, nil) + f.gimbal_abnormal_status_gimbal_direction_when_vertical = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_gimbal_direction_when_vertical", "Gimbal Direction When Vertical", base.HEX, nil, 0x20, nil) +f.gimbal_abnormal_status_masked03 = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_masked03", "Masked03", base.HEX) + f.gimbal_abnormal_status_phone_out_gimbal = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_phone_out_gimbal", "Phone Out Gimbal", base.HEX, nil, 0x01, nil) + f.gimbal_abnormal_status_gimbal_gravity = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_gimbal_gravity", "Gimbal Gravity", base.HEX, nil, 0x06, nil) + f.gimbal_abnormal_status_yaw_limited_in_tracking = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_yaw_limited_in_tracking", "Yaw Limited In Tracking", base.HEX, nil, 0x20, nil) + f.gimbal_abnormal_status_pitch_limited_in_tracking = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_pitch_limited_in_tracking", "Pitch Limited In Tracking", base.HEX, nil, 0x40, nil) +f.gimbal_abnormal_status_masked04 = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_masked04", "Masked04", base.HEX) + f.gimbal_abnormal_status_sleep_mode = ProtoField.uint8 ("dji_dumlv1.gimbal_abnormal_status_sleep_mode", "Sleep Mode", base.HEX, nil, 0x01, nil) + +local function gimbal_abnormal_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_abnormal_status_masked00, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_roll_locked, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_pitch_locked, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_yaw_locked, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_abnormal_status_masked01, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_joint_lock_after_startup, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_joint_lock_when_startup, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_motor_protected, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_error_recent_when_start_up, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_upgrading, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_yaw_limit, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_error_recent_or_selfie, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_pano_ready, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_abnormal_status_masked02, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_fan_direction, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_vertical_direction, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_in_flashlight, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_portrait, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_gimbal_direction_when_vertical, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_abnormal_status_masked03, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_phone_out_gimbal, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_gimbal_gravity, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_yaw_limited_in_tracking, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_pitch_limited_in_tracking, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_abnormal_status_masked04, payload(offset, 1)) + subtree:add_le (f.gimbal_abnormal_status_sleep_mode, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Abnormal Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Abnormal Status: Payload size different than expected") end +end + +-- Gimbal - Gimbal Tutorial Status - 0x2b +-- Description: TODO. +-- Supported in: UNKNOWN + +enums.GIMBAL_TUTORIAL_STATUS_CUR_STEP_TUTORIAL_STATUS_ENUM = { + [0x00] = 'STEP_FINISH', + [0x01] = 'STEP_START', + [0x02] = 'STEP_UNLOCK_GIMBAL', + [0x03] = 'STEP_HOLD_GIMBAL_UPRIGHT', + [0x04] = 'STEP_FOLLOW', + [0x05] = 'STEP_STICK', + [0x06] = 'STEP_LOCK_DIRECTION', + [0x07] = 'STEP_RECENTER', + [0x08] = 'STEP_SELFIE', + [0x09] = 'STEP_PUSH', + [0x0a] = 'STEP_APP_CONTROL', +} + +f.gimbal_tutorial_status_cur_step = ProtoField.uint8 ("dji_dumlv1.gimbal_tutorial_status_cur_step", "Cur Step", base.HEX, enums.GIMBAL_TUTORIAL_STATUS_CUR_STEP_TUTORIAL_STATUS_ENUM, nil, nil) +f.gimbal_tutorial_status_step_status = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_step_status", "Step Status", base.HEX) + f.gimbal_tutorial_status_is_unlock = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_unlock", "Is Unlock", base.HEX, nil, 0x01, nil) + f.gimbal_tutorial_status_is_upright = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_upright", "Is Upright", base.HEX, nil, 0x02, nil) + f.gimbal_tutorial_status_is_follow_finish = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_follow_finish", "Is Follow Finish", base.HEX, nil, 0x04, nil) + f.gimbal_tutorial_status_is_stick_finish = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_stick_finish", "Is Stick Finish", base.HEX, nil, 0x08, nil) + f.gimbal_tutorial_status_is_lock_direction_finish = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_lock_direction_finish", "Is Lock Direction Finish", base.HEX, nil, 0x10, nil) + f.gimbal_tutorial_status_is_recent_finish = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_recent_finish", "Is Recent Finish", base.HEX, nil, 0x20, nil) + f.gimbal_tutorial_status_is_selfie_finish = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_selfie_finish", "Is Selfie Finish", base.HEX, nil, 0x40, nil) + f.gimbal_tutorial_status_is_handle_push_finish = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_handle_push_finish", "Is Handle Push Finish", base.HEX, nil, 0x80, nil) + f.gimbal_tutorial_status_is_app_control_finish = ProtoField.uint32 ("dji_dumlv1.gimbal_tutorial_status_is_app_control_finish", "Is App Control Finish", base.HEX, nil, 0x100, nil) + +local function gimbal_tutorial_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_tutorial_status_cur_step, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_tutorial_status_step_status, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_unlock, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_upright, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_follow_finish, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_stick_finish, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_lock_direction_finish, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_recent_finish, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_selfie_finish, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_handle_push_finish, payload(offset, 4)) + subtree:add_le (f.gimbal_tutorial_status_is_app_control_finish, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Tutorial Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Tutorial Status: Payload size different than expected") end +end + +-- Gimbal - Gimbal Tutorial Step Set - 0x2c +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_tutorial_step_set_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_tutorial_step_set_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_tutorial_step_set_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_tutorial_step_set_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Tutorial Step Set: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Tutorial Step Set: Payload size different than expected") end +end + +-- Gimbal - Gimbal Auto Calibration Status - 0x30 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_auto_calibration_status_progress = ProtoField.uint8 ("dji_dumlv1.gimbal_auto_calibration_status_progress", "Progress", base.HEX) +f.gimbal_auto_calibration_status_status = ProtoField.uint8 ("dji_dumlv1.gimbal_auto_calibration_status_status", "Status", base.HEX) + +local function gimbal_auto_calibration_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_auto_calibration_status_progress, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_auto_calibration_status_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Auto Calibration Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Auto Calibration Status: Payload size different than expected") end +end + +-- Gimbal - Robin Params Set - 0x31 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_robin_params_set_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_robin_params_set_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_robin_params_set_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_robin_params_set_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Robin Params Set: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Robin Params Set: Payload size different than expected") end +end + +-- Gimbal - Robin Params Get - 0x32 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_robin_params_get_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_robin_params_get_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_robin_params_get_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_robin_params_get_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Robin Params Get: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Robin Params Get: Payload size different than expected") end +end + +-- Gimbal - Robin Battery Info Push / Gimbal Battery Info - 0x33 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_battery_info_a = ProtoField.uint8 ("dji_dumlv1.gimbal_battery_info_a", "A", base.HEX) + +local function gimbal_battery_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_battery_info_a, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Battery Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Battery Info: Payload size different than expected") end +end + +-- Gimbal - Gimbal Handle Params Set - 0x34 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_handle_params_set_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_handle_params_set_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_handle_params_set_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_handle_params_set_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Handle Params Set: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Handle Params Set: Payload size different than expected") end +end + +-- Gimbal - Gimbal Handle Params Get - 0x36 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_handle_params_get_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_handle_params_get_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_handle_params_get_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_handle_params_get_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Handle Params Get: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Handle Params Get: Payload size different than expected") end +end + +-- Gimbal - Gimbal Timelapse Params Set - 0x37 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_timelapse_params_set_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_timelapse_params_set_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_timelapse_params_set_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_timelapse_params_set_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Timelapse Params Set: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Timelapse Params Set: Payload size different than expected") end +end + +-- Gimbal - Gimbal Timelapse Status - 0x38 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_timelapse_status_masked00 = ProtoField.uint8 ("dji_dumlv1.gimbal_timelapse_status_masked00", "Masked00", base.HEX) + f.gimbal_timelapse_status_timelapse_status = ProtoField.uint8 ("dji_dumlv1.gimbal_timelapse_status_timelapse_status", "Timelapse Status", base.HEX, nil, 0x03, nil) + +local function gimbal_timelapse_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_timelapse_status_masked00, payload(offset, 1)) + subtree:add_le (f.gimbal_timelapse_status_timelapse_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Timelapse Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Timelapse Status: Payload size different than expected") end +end + +-- Gimbal - Gimbal Lock - 0x39 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_lock_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_lock_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_lock_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_lock_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Lock: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Lock: Payload size different than expected") end +end + +-- Gimbal - Gimbal Rotate Camera X Axis - 0x3a +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_rotate_camera_x_axis_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_rotate_camera_x_axis_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_rotate_camera_x_axis_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_rotate_camera_x_axis_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Rotate Camera X Axis: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Rotate Camera X Axis: Payload size different than expected") end +end + +-- Gimbal - Gimbal Get Temp - 0x45 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_get_temp_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_get_temp_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_get_temp_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_get_temp_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Get Temp: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Get Temp: Payload size different than expected") end +end + +-- Gimbal - Gimbal TBD 47 - 0x47 +-- Description: TODO. +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.gimbal_tbd_47_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_tbd_47_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_tbd_47_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_tbd_47_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal TBD 47: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal TBD 47: Payload size different than expected") end +end + +-- Gimbal - Gimbal Reset And Set Mode - 0x4c +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_set_mode_mode = ProtoField.uint8 ("dji_dumlv1.gimbal_set_mode_mode", "Mode", base.HEX) +f.gimbal_set_mode_cmd = ProtoField.uint8 ("dji_dumlv1.gimbal_set_mode_cmd", "Cmd", base.HEX) + +local function gimbal_set_mode_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.gimbal_set_mode_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gimbal_set_mode_cmd, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal Set Mode: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal Set Mode: Payload size different than expected") end +end + +-- Gimbal - Gimbal NotiFy Camera Id - 0x56 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_notify_camera_id_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_notify_camera_id_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_notify_camera_id_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_notify_camera_id_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gimbal NotiFy Camera Id: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gimbal NotiFy Camera Id: Payload size different than expected") end +end + +-- Gimbal - Handheld Stick State Get/Push - 0x57 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_handheld_stick_state_get_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_handheld_stick_state_get_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_handheld_stick_state_get_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_handheld_stick_state_get_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Handheld Stick State Get/Push: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Handheld Stick State Get/Push: Payload size different than expected") end +end + +-- Gimbal - Handheld Stick Control Set / Handheld Stick Control Enable - 0x58 +-- Description: TODO. +-- Supported in: UNKNOWN + +f.gimbal_handheld_stick_control_set_unknown0 = ProtoField.int8 ("dji_dumlv1.gimbal_handheld_stick_control_set_unknown0", "Unknown0", base.DEC, nil, nil) + +local function gimbal_handheld_stick_control_set_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + --subtree:add_le (f.gimbal_handheld_stick_control_set_unknown0, payload(offset, 1)) + --offset = offset + 1 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Handheld Stick Control Set: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Handheld Stick Control Set: Payload size different than expected") end +end + +GIMBAL_UART_CMD_DISSECT = { + [0x01] = gimbal_control_dissector, + [0x02] = gimbal_get_position_dissector, + [0x03] = gimbal_set_param_dissector, + [0x04] = gimbal_get_param_dissector, + [0x05] = gimbal_params_dissector, + [0x06] = gimbal_push_aetr_dissector, + [0x07] = gimbal_adjust_roll_dissector, + [0x08] = gimbal_calibrate_dissector, + [0x09] = gimbal_reserved2_dissector, + [0x0a] = gimbal_ext_ctrl_degree_dissector, + [0x0b] = gimbal_ext_ctrl_status_dissector, + [0x0c] = gimbal_ext_ctrl_accel_dissector, + [0x0d] = gimbal_suspend_resume_dissector, + [0x0e] = gimbal_thirdp_magn_dissector, + [0x0f] = gimbal_user_params_set_dissector, + [0x10] = gimbal_user_params_get_dissector, + [0x11] = gimbal_user_params_save_dissector, + [0x13] = gimbal_user_params_reset_def_dissector, + [0x14] = gimbal_abs_angle_control_dissector, + [0x15] = gimbal_move_dissector, + [0x1c] = gimbal_type_dissector, + [0x1e] = gimbal_degree_info_subscription_dissector, + [0x20] = gimbal_tbd_20_dissector, + [0x21] = gimbal_tbd_21_dissector, + [0x24] = gimbal_user_params_dissector, + [0x27] = gimbal_abnormal_status_dissector, + [0x2b] = gimbal_tutorial_status_dissector, + [0x2c] = gimbal_tutorial_step_set_dissector, + [0x30] = gimbal_auto_calibration_status_dissector, + [0x31] = gimbal_robin_params_set_dissector, + [0x32] = gimbal_robin_params_get_dissector, + [0x33] = gimbal_battery_info_dissector, + [0x34] = gimbal_handle_params_set_dissector, + [0x36] = gimbal_handle_params_get_dissector, + [0x37] = gimbal_timelapse_params_set_dissector, + [0x38] = gimbal_timelapse_status_dissector, + [0x39] = gimbal_lock_dissector, + [0x3a] = gimbal_rotate_camera_x_axis_dissector, + [0x45] = gimbal_get_temp_dissector, + [0x47] = gimbal_tbd_47_dissector, + [0x4c] = gimbal_set_mode_dissector, + [0x56] = gimbal_notify_camera_id_dissector, + [0x57] = gimbal_handheld_stick_state_get_dissector, + [0x58] = gimbal_handheld_stick_control_set_dissector, +} diff --git a/dissectors/dji-dumlv1/src/dji-dumlv1-proto.lua b/dissectors/dji-dumlv1/src/dji-dumlv1-proto.lua new file mode 100644 index 0000000..02f7081 --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-dumlv1-proto.lua @@ -0,0 +1,3323 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-dumlv1-proto.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit 983d6ae2045c08d3273ca003734a3ec816849d3c du 26/04/2025). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- Create a new dissector +DJI_DUMLv1_PROTO = Proto ("dji_dumlv1", "DJI_DUMLv1", "Dji DUML v1 communication protocol") + +-- Quick bit32 compatibility shim for Lua 5.3+ +if not bit32 then + bit32 = bit32 or load([[return { + band = function(a, b) return a & b end, + bor = function(a, b) return a | b end, + bxor = function(a, b) return a ~ b end, + bnot = function(a) return ~a end, + rshift = function(a, n) return a >> n end, + lshift = function(a, n) return a << n end, + }]])() +end + +-- Capture the current path and use it in dofile below +local script_path; +do + local sep = package.config:sub(1,1); + script_path = debug.getinfo(1, "S").source:sub(2):match("(.*"..sep..")") +end + +local f = DJI_DUMLv1_PROTO.fields +local enums = {} + +DJI_DUMLv1_SRC_DEST_TEXT = { + [0] = 'Invalid/Any', + [1] = 'Camera (Ambarella)', + [2] = 'App', + [3] = 'Flight Controller', + [4] = 'Gimbal', + [5] = 'Center Board', + [6] = 'Remote Control', + [7] = 'Wi-Fi air side', + [8] = 'DM36x transcoder air side', + [9] = 'HD transmission MCU air side', + [10] = 'PC', + [11] = 'Battery', + [12] = 'ESC', + [13] = 'DM36x transcoder gnd side', + [14] = 'HD transmission MCU gnd side', + [15] = 'Serial-to-parallel (USB ctrl.) air side', + [16] = 'Serial-to-parallel (USB ctrl.) gnd side', + [17] = 'Monocular', + [18] = 'Binocular', + [19] = 'HD transmission FPGA air side', + [20] = 'HD transmission FPGA gnd side', + [21] = 'Simulator', + [22] = 'Base Station', + [23] = 'Airborne computing platform', + [24] = 'RC battery', + [25] = 'IMU', + [26] = 'GPS/RTK', + [27] = 'Wi-Fi gnd side', + [28] = 'Sig_cvt', + [29] = 'PMU', + [30] = 'Unknown', + [31] = 'Last', +} + +DJI_DUMLv1_ACK_TYPE_TEXT = { + [0] = 'No ACK Needed', -- No returning packet requested + [1] = 'ACK Before Exec', -- also called PUSH + [2] = 'ACK After Exec', -- Acknowledge and return result code +} + +DJI_DUMLv1_ENCRYPT_TYPE_TEXT = { + [0] = 'None', + [1] = 'AES 128', + [2] = 'Self Def', + [3] = 'Xor', + [4] = 'DES 56', + [5] = 'DES 112', + [6] = 'AES 192', + [7] = 'AES 256', +} + +DJI_DUMLv1_PACKET_TYPE_TEXT = { + [0] = 'Request', + [1] = 'Response', +} + +DJI_DUMLv1_CMD_SET_TEXT = { + [0] = 'General', + [1] = 'Special', + [2] = 'Camera', + [3] = 'Flight Control', + [4] = 'Gimbal', + [5] = 'Center Board', + [6] = 'Remote Control', + [7] = 'Wi-Fi', + [8] = 'DM36x', + [9] = 'HD Link', + [10] = 'Mono/Binocular', -- aka Vision + [11] = 'Simulator', + [12] = 'ESC', + [13] = 'Battery', + [14] = 'Data Logger', -- aka HD Link Ground 1765 + [15] = 'RTK', -- S-to-P Air + [16] = 'Automation', -- S-to-P Ground + [17] = 'ADSB', + [18] = 'BVision', + [19] = 'FPGA Air', + [20] = 'FPGA Ground', + [21] = 'Glass', + [22] = 'MavLink', + [23] = 'Watch', + [28] = 'RM', + [33] = 'MAX', +} + +-- CMD name decode tables + +local SPECIAL_UART_CMD_TEXT = { + [0x00] = 'Sdk Ctrl Mode Open/Close Nav', + [0x01] = 'Old Special App Control', -- Try To Exec V1 Special Function + [0x02] = 'Old Special Remote Control', + [0x03] = 'New Special App Control', -- Try To Exec V2 Special Function + [0x04] = 'New Special Remote Control', -- ie. Ctrl Mode Emergency Brake + [0x05] = 'SDK Ctrl Mode Arm/Disarm', + [0x1a] = 'SDK Ctrl Gimbal Speed Ctrl', + [0x1b] = 'SDK Ctrl Gimbal Angle Ctrl', + [0x20] = 'SDK Ctrl Camera Shot Ctrl', + [0x21] = 'SDK Ctrl Camera Start Video Ctrl', + [0x22] = 'SDK Ctrl Camera Stop Video Ctrl', + [0xff] = 'UAV Loopback', +} + +local CENTER_BRD_UART_CMD_TEXT = { + [0x00] = 'Center Open/Close Virtual RC', + [0x01] = 'Center Virtual RC Data', + --[0x01] = 'Center Req Batt Info Confirm', -- on newer platforms + [0x02] = 'Center Push Batt Dynamic Info', + [0x03] = 'Center Control Uav Status Led', + [0x04] = 'Center Transform Control', + [0x05] = 'Center Req Push Bat Normal Data', + [0x06] = 'Center Battery Common', -- Center Push Bat Normal Data + [0x07] = 'Center Query Bat Status', + [0x08] = 'Center Query Bat Hisoty Status', + [0x09] = 'Center Bat SelfDischarge Days', + [0x0a] = 'Center Bat Storage Info', + [0x21] = 'Center Req Bat Static Data', + [0x22] = 'Center Req Bat Dynamic Data', + [0x23] = 'Center Req Bat Auth Data', + [0x24] = 'Center Req Bat Auth Result', + [0x31] = 'Center Req Bat SelfDischarge Time', + [0x32] = 'Center Set Bat SelfDischarge Time', + [0x33] = 'Center Req Bat Barcode', +} + +local RC_UART_CMD_TEXT = { + [0x01] = 'RC Channel Params Get', -- includes Logic Channel Mapping + [0x02] = 'RC Channel Params Set', + [0x03] = 'RC Calibiration Set', + [0x04] = 'RC Physical Channel Parameter Get', + [0x05] = 'RC Parameter Get/Push', + [0x06] = 'RC Master/Slave Mode Set', + [0x07] = 'RC Master/Slave Mode Get', + [0x08] = 'RC Name Set', + [0x09] = 'RC Name Get', + [0x0a] = 'RC Password Set', + [0x0b] = 'RC Password Get', + [0x0c] = 'RC Connected Master Id Set', + [0x0d] = 'RC Connected Master Id Get', + [0x0e] = 'RC Available Master Id Get', + [0x0f] = 'RC Search Mode Set', + [0x10] = 'RC Search Mode Get', + [0x11] = 'RC Master/Slave Switch Set', + [0x12] = 'RC Master/Slave Switch Conf Get', + [0x13] = 'RC Request Join By Slave', + [0x14] = 'RC List Request Join Slave', + [0x15] = 'RC Delete Slave', + [0x16] = 'RC Delete Master', + [0x17] = 'RC Slave Control Right Set', + [0x18] = 'RC Slave Control Right Get', + [0x19] = 'RC Control Mode Set', + [0x1a] = 'RC Control Mode Get', + [0x1b] = 'RC GPS Info Get/Push', + [0x1c] = 'RC RTC Info Get/Push', + [0x1d] = 'RC Temperature Info Get/Push', + [0x1e] = 'RC Battery Info Get/Push', + [0x1f] = 'RC Master/Slave Conn Info Get/Push', + [0x20] = 'RC Power Mode CE/FCC Set', + [0x21] = 'RC Power Mode CE/FCC Get', + [0x22] = 'RC Gimbal Ctr Permission Request', + [0x23] = 'RC Gimbal Ctr Permission Ack', + [0x24] = 'RC Simulate Flight Mode Set', + [0x25] = 'RC Simulate Flight Mode Get', + [0x26] = 'RC AETR Value Push', -- Get Sim Push Params + [0x27] = 'RC Detection Info Get', + [0x28] = 'RC Gimbal Control Access Right Get', + [0x29] = 'RC Slave Control Mode Set', + [0x2a] = 'RC Slave Control Mode Get', + [0x2b] = 'RC Gimbal Control Speed Set', + [0x2c] = 'RC Gimbal Control Speed Get', + [0x2d] = 'RC Self Defined Key Func Set', -- Custom Fuction Set + [0x2e] = 'RC Self Defined Key Func Get', + [0x2f] = 'RC Pairing', -- Frequency Set + [0x30] = 'RC Test GPS', + [0x31] = 'RC RTC Clock Set', + [0x32] = 'RC RTC Clock Get', -- See m0101 sys partiton for payload info + [0x33] = 'RC Gimbal Control Sensitivity Set', -- Wheel Gain Set + [0x34] = 'RC Gimbal Control Sensitivity Get', + [0x35] = 'RC Gimbal Control Mode Set', + [0x36] = 'RC Gimbal Control Mode Get', + [0x37] = 'RC Enter App Mode Request', + [0x38] = 'RC Calibration Value Get', + [0x39] = 'RC Master Slave Connect Status Push', + [0x3a] = 'RC 2014 Usb Mode Set', + [0x3b] = 'RC Id Set', + [0x3c] = 'RC Coach Mode', + [0x3f] = 'RC Mater/Slave Id', + [0x42] = 'RC Follow Focus Get/Push', + [0x47] = 'RC App Special Control', + [0x48] = 'RC Freq Mode Info Get', -- RC Param Get + [0x4c] = 'RC Pro Custom Buttons Status Get/Push', + [0x50] = 'RC Push Rmc Key Info', -- MCU407 Set + [0x51] = 'RC Push To Glass', -- RC Custom Buttons Status Get/Push + [0x52] = 'RC Push LCD To MCU', + [0x53] = 'RC Unit Language Get', + [0x54] = 'RC Unit Language Set', + [0x55] = 'RC Test Mode Set', + [0x56] = 'RC Quiry Role', -- RC Role Get + [0x57] = 'RC Quiry Ms Link Status', -- FD Push Connect Status Get + [0x58] = 'RC Work Function Set', -- New Control Function Set + [0x59] = 'RC Work Function Get', + [0x98] = 'Follow Focus2 Get/Push', + [0x99] = 'Follow Focus Info Set', + [0xf0] = 'RC RF Cert Config Set', -- Set Transciever Pwr Mode + [0xf5] = 'RC Test Stick Value', + [0xf6] = 'RC Factory Get Board Id', + [0xf7] = 'RC Push Buzzer To MCU', + [0xf8] = 'RC Stick Verification Data Get', -- FD Rc Calibration Statue Get + [0xf9] = 'RC Post Calibiration Set', + [0xfa] = 'RC Stick Middle Value Get', +} + +local WIFI_UART_CMD_TEXT = { + [0x00] = 'WiFi Reserved', + [0x01] = 'WiFi Ap Scan Results Push', + [0x02] = 'WiFi Ap Channel SNR Get', + [0x03] = 'WiFi Ap Channel Set', + [0x04] = 'WiFi Ap Channel Get', + [0x05] = 'WiFi Ap Tx Pwr Set', + [0x06] = 'WiFi Ap Tx Pwr Get', + [0x07] = 'WiFi Ap SSID Get', + [0x08] = 'WiFi Ap SSID Set', + [0x09] = 'WiFi Ap RSSI Push', + [0x0a] = 'WiFi Ap Ant RSSI Get', + [0x0b] = 'WiFi Ap Mac Addr Set', + [0x0c] = 'WiFi Ap Mac Addr Get', + [0x0d] = 'WiFi Ap Passphrase Set', + [0x0e] = 'WiFi Ap Passphrase Get', -- Get PSK/Password + [0x0f] = 'WiFi Ap Factory Reset', + [0x10] = 'WiFi Ap Band Set', -- Wifi Frequency Set + [0x11] = 'WiFi Ap Sta MAC Push', -- First App Mac Get/Push + [0x12] = 'WiFi Ap Phy Param Get', -- Electric Signal Get/Push + [0x13] = 'WiFi Ap Power Mode Set', + [0x14] = 'WiFi Ap Calibrate', + [0x15] = 'WiFi Ap Wifi Restart', + [0x16] = 'WiFi Ap Selection Mode Set', + [0x17] = 'WiFi Ap Selection Mode Get', + [0x18] = 'WiFi Ap 18', + [0x19] = 'WiFi Ap 19', + [0x1a] = 'WiFi Ap 1A', + [0x1b] = 'WiFi Ap 1B', + [0x1c] = 'WiFi Ap 1C', + [0x1d] = 'WiFi Ap 1D', + [0x1e] = 'WiFi SSID Get', -- older variant? + [0x1f] = 'WiFi Ap 1F', + [0x20] = 'WiFi Ap Wifi Frequency Get', + [0x21] = 'WiFi Ap Set Bw', + [0x22] = 'WiFi Ap 22', + [0x23] = 'WiFi Ap 23', + [0x24] = 'WiFi Ap 24', + [0x25] = 'WiFi Ap 25', + [0x26] = 'WiFi Ap Realtime Acs', -- Noise Check Adapt Set + [0x27] = 'WiFi Ap Manual Switch SDR', + [0x28] = 'WiFi Ap Channel List Get/Push', + [0x29] = 'WiFi Ap Channel Noise/SNR Req', + [0x2a] = 'WiFi Ap Channel Noise/SNR Push', -- Wifi Sweep Frequency Get + [0x2b] = 'WiFi Ap Set Hw Mode', -- Wifi Mode Channel Set + [0x2c] = 'Wifi Ap Code Rate Set', + [0x2d] = 'Wifi Ap Cur Code Rate Get', + [0x2e] = 'WiFi Ap Set Usr Pref', -- Wifi Freq 5G Mode Set + [0x2f] = 'WiFi Ap Get Usr Pref', -- Wifi Freq Mode Get + [0x30] = 'WiFi Ap Set Country Code', -- Set Region + [0x31] = 'WiFi Ap Reset Freq', + [0x32] = 'WiFi Ap Del Country Code', + [0x33] = 'WiFi Ap Verify Cc', -- Is Country Code Supported + [0x39] = 'WiFi Get Work Mode', + [0x3a] = 'WiFi Set Work Mode', + [0x3b] = 'WiFi Config By Qrcode', + [0x80] = 'WiFi Push Mac Stat', -- Log Get/Push + [0x82] = 'WiFi Master/Slave Status Get/Push', + [0x83] = 'WiFi Master/Slave AuthCode Set', + [0x84] = 'WiFi Scan Master List', + [0x85] = 'WiFi Connect Master With Id AuthCode', + [0x89] = 'WiFi AuthCode Get', + [0x8B] = 'WiFi MS Error Info Get/Push', + [0x91] = 'WiFi Rc Info Set', + [0x92] = 'WiFi Update Sw State', +} + +local DM36X_UART_CMD_TEXT = { + [0x00] = 'DM36x Reserved', + [0x01] = 'DM36x Gnd Ctrl Info Send', + [0x02] = 'DM36x Gnd Ctrl Info Recv', + [0x03] = 'DM36x UAV Ctrl Info Send', + [0x04] = 'DM36x UAV Ctrl Info Recv', + [0x05] = 'DM36x Gnd Stat Info Send', + [0x06] = 'DM36x UAV Stat Info Send', + [0x07] = 'DM36x Gnd Stat Info Recv', + [0x0e] = 'DM36x App Connect Stat Get', + [0x0f] = 'DM36x Recycle Vision Frame Info', + [0x20] = 'DM36x Bitrate Set', -- Wifi Code Rate Set + [0x21] = 'DM36x Bitrate Get', + [0x30] = 'DM36x Foresight Showed Set', -- Status Push + [0x31] = 'DM36x Foresight Showed Get', -- Send Vmem Fd To Vision + [0x60] = 'Active Track Camera Set', +} + +local HD_LINK_UART_CMD_TEXT = { + [0x01] = 'HDLnk OSD General Data Get/Push', + [0x02] = 'HDLnk OSD Home Point Get/Push', + [0x03] = 'HDLnk Baseband State Get/Push', + [0x04] = 'HDLnk FPGA Write', + [0x05] = 'HDLnk FPGA Read', + [0x06] = 'HDLnk TCX Hardware Reg Write', -- Set register in AD9363 + [0x07] = 'HDLnk TCX Hardware Reg Read', -- Get register from AD9363 + [0x08] = 'HDLnk VT Signal Quality Push', -- Video transmission signal strength + [0x09] = 'HDLnk Sweep Frequency Set', -- Req Freq Energy + [0x0a] = 'HDLnk Sweep Frequency Get/Push', + [0x0b] = 'HDLnk Device Status Get/Push', + [0x0c] = 'HDLnk VT Config Info Get/Push', -- Video transmission config info + [0x0d] = 'HDLnk VT Config Info Set', + [0x0e] = 'HDLnk USB Iface Change', -- Usb Transform Set; See m0101 sys partiton for payload info + [0x0f] = 'HDLnk Reset Cy68013', -- See m0101 sys partiton for payload info + [0x10] = 'HDLnk Upgrade Tip Set', + [0x11] = 'HDLnk Wl Env Quality Get/Push', + [0x12] = 'HDLnk Factory Test Set', -- Set Transciever Config to test + [0x13] = 'HDLnk Factory Test Get', + [0x14] = 'HDLnk Max Video Bandwidth Set', -- Set Max Mcs + [0x15] = 'HDLnk Max Video Bandwidth Get/Push', + [0x16] = 'HDLnk Debug Info Push', + [0x20] = 'HDLnk SDR Downward Sweep Frequency', -- SDR Dl Freq Energy Get/Push + [0x21] = 'HDLnk SDR Vt Config Info Get', + [0x22] = 'HDLnk SDR Dl Auto Vt Info Get/Push', + [0x23] = 'HDLnk SDR Rt Status Set', + [0x24] = 'HDLnk SDR UAV Rt Status Get/Push', + [0x25] = 'HDLnk SDR Gnd Rt Status Get/Push', -- SDR Status Ground Info + [0x26] = 'HDLnk SDR Debug/Assitant Read', + [0x27] = 'HDLnk SDR Debug/Assitant Write', + [0x28] = 'HDLnk SDR Start Log Set', + [0x29] = 'HDLnk SDR Upward Sweep Frequency', -- SDR Ul Freq Energy Push + [0x2a] = 'HDLnk SDR Upward Select Channel', -- SDR Ul Auto Vt Info Push + [0x2b] = 'HDLnk SDR Revert Role', + [0x2c] = 'HDLnk SDR Amt Process', + [0x2d] = 'HDLnk SDR LBT Status Get', + [0x2e] = 'HDLnk SDR LBT Status Set', + [0x2f] = 'HDLnk SDR Link Test', + [0x30] = 'HDLnk SDR Wireless Env State', -- Wireless Status Get/Push + [0x31] = 'HDLnk SDR Scan Freq Cfg', + [0x32] = 'HDLnk SDR Factory Mode Set', + [0x33] = 'HDLnk Tracking State Ind', + [0x34] = 'HDLnk SDR Liveview Mode Set', -- SDR Image Transmission Mode Set + [0x35] = 'HDLnk SDR Liveview Mode Get', + [0x36] = 'HDLnk SDR Liveview Rate Ind', -- SDR Push Custom Code Rate + [0x37] = 'HDLnk Abnormal Event Ind', -- aka HDTV Exception + [0x38] = 'HDLnk SDR Set Rate', + [0x39] = 'HDLnk Liveview Config Set', -- SDR Config Info Set + [0x3a] = 'HDLnk Dl Freq Energy Push', -- SDR Nf Params + [0x3b] = 'HDLnk SDR Tip Interference', -- SDR Bar Disturb Get/Push + [0x3c] = 'HDLnk SDR Upgrade Rf Power', -- SDR Force Boost Set + [0x3e] = 'HDLnk Slave RT Status Push', + [0x3f] = 'HDLnk RC Conn Status Push', + [0x41] = 'HDLnk Racing Set Modem Info', + [0x42] = 'HDLnk Racing Get Modem Info', + [0x50] = 'HDLnk LED Set', + [0x51] = 'HDLnk Power Set', -- Robomaster Cnfg Set + --[0x51] = 'HDLnk Robomaster Cnfg Set', -- only for robomaster, or only newer platforms + [0x52] = 'HDLnk Power Status Get/Push', + --[0x52] = 'HDLnk Robomaster Info Get', -- only for robomaster, or only newer platforms + [0x53] = 'HDLnk SDR Cp Status Get', + --[0x53] = 'Osmo Calibration Set', -- on osmo + [0x54] = 'Osmo Calibration Push', + [0x57] = 'HDLnk Mic Gain Set', + [0x58] = 'HDLnk Mic Gain Get', + [0x59] = 'HDLnk Mic Info Get/Push', + [0x62] = 'HDLnk Mic Enable Get', + [0x63] = 'HDLnk Mic Enable Set', + [0x71] = 'HDLnk Main Camera Bandwidth Percent Set', + [0x72] = 'HDLnk Main Camera Bandwidth Percent Get', +} + +local MBINO_UART_CMD_TEXT = { + [0x01] = 'Eye Bino Info', -- log + [0x02] = 'Eye Mono Info', + [0x03] = 'Eye Ultrasonic Info', + [0x04] = 'Eye Oa Info', + [0x05] = 'Eye Relitive Pos', + [0x06] = 'Eye Avoidance Param', -- Avoidance Warn Parameters + [0x07] = 'Eye Obstacle Info', -- Front Obstacle Avoidance + [0x08] = 'Eye TapGo Obst Avo Info', -- Obstacle Avoidance during Go To Point / Point To Fly + [0x0a] = 'Eye Push Vision Debug Info', + [0x0b] = 'Eye Push Control Debug Info', + [0x0d] = 'Eye Track Log', + [0x0e] = 'Eye Point Log', + [0x0f] = 'Eye Push SDK Control Cmd', + [0x10] = 'Eye Enable Tracking Taptogo', + [0x11] = 'Eye Push Target Speed Pos Info', + [0x12] = 'Eye Push Target Pos Info', + [0x13] = 'Eye Push Trajectory', + [0x14] = 'Eye Push Expected Speed Angle', + [0x15] = 'Eye Receive Frame Info', + [0x19] = 'Eye Flat Check', + [0x1d] = 'Eye Fixed Wing Ctrl', + [0x1e] = 'Eye Fixed Wing Status Push', + [0x20] = 'Eye Marquee Push', + [0x21] = 'Eye Tracking Cnf Cancel', + [0x22] = 'Eye Move Marquee Push', + [0x23] = 'Eye Tracking Status Push', + [0x24] = 'Eye Position Push', + [0x25] = 'Eye Fly Ctl Push', + [0x26] = 'Eye TapGo Status Push', -- Status of Go To Point / Point To Fly + [0x27] = 'Eye Common Ctl Cmd', + [0x28] = 'Eye Get Para Cmd', + [0x29] = 'Eye Set Para Cmd', + [0x2a] = 'Eye Com Status Update', -- The update basically means Exception + [0x2c] = 'Eye Ta Lock Update', + [0x2d] = 'Eye Smart Landing', + [0x2e] = 'Eye Function List Push', + [0x2f] = 'Eye Sensor Status Push', -- Informs of Sensor Exceptions + [0x30] = 'Eye Self Calibration', + [0x32] = 'Eye Easy Self Calib State', + [0x37] = 'Eye QRCode Mode', + [0x39] = 'Eye Vision Tip', + [0x3a] = 'Eye Precise Landing Energy', + [0x46] = 'Eye RC Packet', + [0x47] = 'Eye Set Buffer Config', + [0x48] = 'Eye Get Buffer Config', + [0xa3] = 'Eye Enable SDK Func', + [0xa4] = 'Eye Detection Msg Push', + [0xa5] = 'Eye Get SDK Func', +} + +local SIM_UART_CMD_TEXT = { + [0x01] = 'Simu Connect Heart Packet', + [0x02] = 'Simu IMU Status Push', -- Main Controller Params Request + [0x03] = 'Simu SDR Status Push', -- Main Controller Return Params Get/Push + [0x04] = 'Simu Get Headbelt SN', -- Simulate Flight Commend + [0x06] = 'Simu Flight Status Params', + [0x07] = 'Simu GetWind Set', + [0x08] = 'Simu GetArea Set', + [0x09] = 'Simu GetAirParams Set', + [0x0a] = 'Simu Force Moment', + [0x0b] = 'Simu GetTemperature Set', + [0x0c] = 'Simu GetGravity Set', + [0x0d] = 'Simu Crash ShutDown', + [0x0e] = 'Simu Ctrl Motor', + [0x0f] = 'Simu Momentum', + [0x10] = 'Simu GetArmLength Set', + [0x11] = 'Simu GetMassInertia Set', + [0x12] = 'Simu GetMotorSetting Set', + [0x13] = 'Simu GetBatterySetting Set', + [0x14] = 'Simu Frequency Get', + [0x1a] = 'Simu Set Sim Vision Mode', + [0x1b] = 'Simu Get Sim Vision Mode', +} + +local ESC_UART_CMD_TEXT = { +} + +local BATTERY_UART_CMD_TEXT = { + [0x01] = 'Battery Static Data Get', + [0x02] = 'Battery Dynamic Data Get/Push', + [0x03] = 'Battery Cell Voltage Get/Push', -- Get Single Core Volt + [0x04] = 'Battery BarCode Data Get', + [0x05] = 'Battery History Get', + [0x06] = 'Battery Push Common Info', + [0x11] = 'Battery SetSelfDischargeDays Get', + [0x12] = 'Battery ShutDown', + [0x13] = 'Battery Force ShutDown', + [0x14] = 'Battery StartUp', + [0x15] = 'Battery Pair Get', + [0x16] = 'Battery Pair Set', + [0x22] = 'Battery Data Record Control', + [0x23] = 'Battery Authentication', + [0x31] = 'Battery Re-Arrangement Get/Push', + [0x32] = 'Battery Mult Battery Info Get', +} + +local DATA_LOG_UART_CMD_TEXT = { + [0x22] = 'DLog Battery Data', + [0x23] = 'DLog Battery Message', +} + +local RTK_UART_CMD_TEXT = { + [0x09] = 'Rtk Status', +} + +local AUTO_UART_CMD_TEXT = { +} + +local ADSB_UART_CMD_TEXT = { + [0x02] = 'Push Data Get', + [0x08] = 'Push Warning Get', + [0x09] = 'Push Original Get', + [0x10] = 'Send Whitelist', + [0x11] = 'Request License', + [0x12] = 'License Enabled Set', + [0x13] = 'License Id Get', + [0x14] = 'Push Unlock Info Get', + [0x15] = 'User Id Set', + [0x16] = 'Key Version Get', + [0x17] = 'Push Avoidance Action Get ', +} + +-- NOTE: These were not found in CWD +dofile(script_path .. 'dji-dumlv1-general.lua') +dofile(script_path .. 'dji-dumlv1-camera.lua') +dofile(script_path .. 'dji-dumlv1-flyc.lua') +dofile(script_path .. 'dji-dumlv1-gimbal.lua') + +DJI_DUMLv1_CMD_TEXT = { + [0x00] = GENERAL_UART_CMD_TEXT, + [0x01] = SPECIAL_UART_CMD_TEXT, + [0x02] = CAMERA_UART_CMD_TEXT, + [0x03] = FLYC_UART_CMD_TEXT, + [0x04] = GIMBAL_UART_CMD_TEXT, + [0x05] = CENTER_BRD_UART_CMD_TEXT, + [0x06] = RC_UART_CMD_TEXT, + [0x07] = WIFI_UART_CMD_TEXT, + [0x08] = DM36X_UART_CMD_TEXT, + [0x09] = HD_LINK_UART_CMD_TEXT, + [0x0a] = MBINO_UART_CMD_TEXT, + [0x0b] = SIM_UART_CMD_TEXT, + [0x0c] = ESC_UART_CMD_TEXT, + [0x0d] = BATTERY_UART_CMD_TEXT, + [0x0e] = DATA_LOG_UART_CMD_TEXT, + [0x0f] = RTK_UART_CMD_TEXT, + [0x10] = AUTO_UART_CMD_TEXT, + [0x11] = ADSB_UART_CMD_TEXT, +} + +local function set_info(cmd, pinfo, valuestring) + if tostring(pinfo.cols.info) ~= "" then + pinfo.cols.info:append(", ") + end + if valuestring[cmd] == nil then + pinfo.cols.info:append(string.format("%s (0x%02X)", "Unknown", cmd)) + else + pinfo.cols.info:append(valuestring[cmd]) + end +end + +-- Special - Old Special App Control - 0x01 +-- Supported in: P3X_FW_V01.11.0030_m0400 + +f.special_old_special_app_control_unknown0 = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_unknown0", "Unknown0", base.HEX) +f.special_old_special_app_control_unknown1 = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_unknown1", "Unknown1", base.HEX) +f.special_old_special_app_control_unknown2 = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_unknown2", "Unknown2", base.HEX) +f.special_old_special_app_control_unknown4 = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_unknown4", "Unknown4", base.HEX) +f.special_old_special_app_control_unknown5 = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_unknown5", "Unknown5", base.HEX) +f.special_old_special_app_control_unknown6 = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_unknown6", "Unknown6", base.HEX) +f.special_old_special_app_control_unknown7 = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_unknown7", "Unknown7", base.HEX) +f.special_old_special_app_control_checksum = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_checksum", "Checksum", base.HEX, nil, nil, "Previous payload bytes xor'ed together with initial seed 0.") + +f.special_old_special_app_control_status = ProtoField.uint8 ("dji_dumlv1.special_old_special_app_control_status", "Status", base.HEX) + +local function special_old_special_app_control_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + subtree:add_le (f.special_old_special_app_control_unknown0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_old_special_app_control_unknown1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_old_special_app_control_unknown2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.special_old_special_app_control_unknown4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_old_special_app_control_unknown5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_old_special_app_control_unknown6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_old_special_app_control_unknown7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.special_old_special_app_control_checksum, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Old Special App Control: Offset does not match - internal inconsistency") end + else -- Response + + subtree:add_le (f.special_old_special_app_control_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Old Special App Control: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Old Special App Control: Payload size different than expected") end +end + +-- Special - New Special App Control - 0x03 + +f.special_new_special_app_control_unknown0 = ProtoField.bytes ("dji_dumlv1.special_new_special_app_control_unknown0", "Unknown0", base.SPACE) + +local function special_new_special_app_control_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.special_new_special_app_control_unknown0, payload(offset, 24)) + offset = offset + 24 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"New Special App Control: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"New Special App Control: Payload size different than expected") end +end + +local SPECIAL_UART_CMD_DISSECT = { + [0x01] = special_old_special_app_control_dissector, + [0x03] = special_new_special_app_control_dissector, +} + +-- Center Board - Center Battery Common - 0x06 + +enums.CENTER_BRD_CENTER_BATTERY_COMMON_CONN_STATUS_ENUM = { + [0x00] = 'NORMAL', + [0x01] = 'INVALID', + [0x02] = 'EXCEPTION', + [0x64] = 'OTHER', +} + +f.center_brd_center_battery_common_relative_capacity = ProtoField.uint8 ("dji_dumlv1.center_brd_center_battery_common_relative_capacity", "Relative Capacity", base.DEC, nil, nil, "Remaining Capacity percentage") +f.center_brd_center_battery_common_current_pv = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_current_pv", "Current Pv", base.DEC, nil, nil, "Current Pack Voltage") +f.center_brd_center_battery_common_current_capacity = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_current_capacity", "Current Capacity", base.DEC, nil, nil, "Current Remaining Capacity") +f.center_brd_center_battery_common_full_capacity = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_full_capacity", "Full Capacity", base.DEC, nil, nil, "Full Charge Capacity") +f.center_brd_center_battery_common_life = ProtoField.uint8 ("dji_dumlv1.center_brd_center_battery_common_life", "Life", base.DEC, nil, nil, "Life Percentage") +f.center_brd_center_battery_common_loop_num = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_loop_num", "Loop Num", base.DEC, nil, nil, "Cycle Count") +f.center_brd_center_battery_common_error_type = ProtoField.uint32 ("dji_dumlv1.center_brd_center_battery_common_error_type", "Error Type", base.HEX) +f.center_brd_center_battery_common_current = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_current", "Current", base.DEC) +f.center_brd_center_battery_common_cell_voltage_0 = ProtoField.uint32 ("dji_dumlv1.center_brd_center_battery_common_cell_voltage_0", "Cell Voltage 0", base.DEC) +f.center_brd_center_battery_common_cell_voltage_1 = ProtoField.uint32 ("dji_dumlv1.center_brd_center_battery_common_cell_voltage_1", "Cell Voltage 1", base.DEC) +f.center_brd_center_battery_common_cell_voltage_2 = ProtoField.uint32 ("dji_dumlv1.center_brd_center_battery_common_cell_voltage_2", "Cell Voltage 2", base.DEC) +f.center_brd_center_battery_common_serial_no = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_serial_no", "Serial No", base.HEX, nil, nil, "Battery Serial Number") +f.center_brd_center_battery_common_unknown1e = ProtoField.bytes ("dji_dumlv1.center_brd_center_battery_common_unknown1e", "Unknown1E", base.SPACE) +f.center_brd_center_battery_common_temperature = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_temperature", "Temperature", base.DEC, nil, nil, "In Degrees Celcius x100?") +f.center_brd_center_battery_common_conn_status = ProtoField.uint8 ("dji_dumlv1.center_brd_center_battery_common_conn_status", "Conn Status", base.HEX, enums.CENTER_BRD_CENTER_BATTERY_COMMON_CONN_STATUS_ENUM, nil, nil) +f.center_brd_center_battery_common_total_study_cycle = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_total_study_cycle", "Total Study Cycle", base.HEX) +f.center_brd_center_battery_common_last_study_cycle = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_last_study_cycle", "Last Study Cycle", base.HEX) +f.center_brd_center_battery_common_battery_on_charge = ProtoField.uint16 ("dji_dumlv1.center_brd_center_battery_common_battery_on_charge", "Battery On Charge", base.HEX) + +local function center_brd_center_battery_common_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.center_brd_center_battery_common_relative_capacity, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.center_brd_center_battery_common_current_pv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_current_capacity, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_full_capacity, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_life, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.center_brd_center_battery_common_loop_num, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_error_type, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.center_brd_center_battery_common_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_cell_voltage_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.center_brd_center_battery_common_cell_voltage_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.center_brd_center_battery_common_cell_voltage_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.center_brd_center_battery_common_serial_no, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_unknown1e, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_conn_status, payload(offset, 1)) + offset = offset + 1 + + -- This is where packets from FW v1.07.0060 end; newer battery packets are longer + if (payload:len() >= offset+6) then + subtree:add_le (f.center_brd_center_battery_common_total_study_cycle, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_last_study_cycle, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.center_brd_center_battery_common_battery_on_charge, payload(offset, 2)) + offset = offset + 2 + end + + if (offset ~= 35) and (offset ~= 41) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Center Battery Common: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Center Battery Common: Payload size different than expected") end +end + +local CENTER_BRD_UART_CMD_DISSECT = { + [0x06] = center_brd_center_battery_common_dissector, +} + +-- Remote Control - Generic fields used in many packets + +f.rc_opertation_status_byte = ProtoField.uint8 ("dji_dumlv1.rc_opertation_status_byte", "Operation status", base.HEX, nil, nil, "Returned error code of the operation; 0 means success") + +-- Remote Control - RC Push Parameter - 0x05 + +f.rc_push_param_aileron = ProtoField.uint16 ("dji_dumlv1.rc_push_param_aileron", "Aileron", base.HEX) +f.rc_push_param_elevator = ProtoField.uint16 ("dji_dumlv1.rc_push_param_elevator", "Elevator", base.HEX) +f.rc_push_param_throttle = ProtoField.uint16 ("dji_dumlv1.rc_push_param_throttle", "Throttle", base.HEX) +f.rc_push_param_rudder = ProtoField.uint16 ("dji_dumlv1.rc_push_param_rudder", "Rudder", base.HEX) +f.rc_push_param_gyro_value = ProtoField.uint16 ("dji_dumlv1.rc_push_param_gyro_value", "Gyro Value", base.HEX) +f.rc_push_param_wheel_info = ProtoField.uint8 ("dji_dumlv1.rc_push_param_wheel_info", "Wheel Info", base.HEX) + f.rc_push_param_wheel_click_status = ProtoField.uint8 ("dji_dumlv1.rc_push_param_wheel_click_status", "Wheel Click Status", base.HEX, nil, 0x01, nil) + f.rc_push_param_wheel_offset = ProtoField.uint8 ("dji_dumlv1.rc_push_param_wheel_offset", "Wheel Offset", base.HEX, nil, 0x3e, nil) + f.rc_push_param_not_wheel_positive = ProtoField.uint8 ("dji_dumlv1.rc_push_param_not_wheel_positive", "Not Wheel Positive", base.HEX, nil, 0x40, nil) + f.rc_push_param_wheel_changed = ProtoField.uint8 ("dji_dumlv1.rc_push_param_wheel_changed", "Wheel Changed", base.HEX, nil, 0x80, nil) +f.rc_push_param_masked0b = ProtoField.uint8 ("dji_dumlv1.rc_push_param_masked0b", "Masked0B", base.HEX) + f.rc_push_param_go_home_button_pressed = ProtoField.uint8 ("dji_dumlv1.rc_push_param_go_home_button_pressed", "Go Home Button Pressed", base.HEX, nil, 0x08, nil) + f.rc_push_param_mode = ProtoField.uint8 ("dji_dumlv1.rc_push_param_mode", "Mode", base.HEX, nil, 0x30, nil) + f.rc_push_param_get_foot_stool = ProtoField.uint8 ("dji_dumlv1.rc_push_param_get_foot_stool", "Get Foot Stool", base.HEX, nil, 0xc0, nil) +f.rc_push_param_masked0c = ProtoField.uint8 ("dji_dumlv1.rc_push_param_masked0c", "Masked0C", base.HEX) + f.rc_push_param_custom2 = ProtoField.uint8 ("dji_dumlv1.rc_push_param_custom2", "Custom2", base.HEX, nil, 0x08, nil) + f.rc_push_param_custom1 = ProtoField.uint8 ("dji_dumlv1.rc_push_param_custom1", "Custom1", base.HEX, nil, 0x10, nil) + f.rc_push_param_playback_status = ProtoField.uint8 ("dji_dumlv1.rc_push_param_playback_status", "PlayBack Status", base.HEX, nil, 0x20, nil) + f.rc_push_param_shutter_status = ProtoField.uint8 ("dji_dumlv1.rc_push_param_shutter_status", "Shutter Status", base.HEX, nil, 0x40, nil) + f.rc_push_param_record_status = ProtoField.uint8 ("dji_dumlv1.rc_push_param_record_status", "Record Status", base.HEX, nil, 0x80, nil) +f.rc_push_param_band_width = ProtoField.uint8 ("dji_dumlv1.rc_push_param_band_width", "Band Width", base.HEX) + +local function rc_push_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.rc_push_param_aileron, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_push_param_elevator, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_push_param_throttle, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_push_param_rudder, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_push_param_gyro_value, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_push_param_wheel_info, payload(offset, 1)) + subtree:add_le (f.rc_push_param_wheel_click_status, payload(offset, 1)) + subtree:add_le (f.rc_push_param_wheel_offset, payload(offset, 1)) + subtree:add_le (f.rc_push_param_not_wheel_positive, payload(offset, 1)) + subtree:add_le (f.rc_push_param_wheel_changed, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_push_param_masked0b, payload(offset, 1)) + subtree:add_le (f.rc_push_param_go_home_button_pressed, payload(offset, 1)) + subtree:add_le (f.rc_push_param_mode, payload(offset, 1)) + subtree:add_le (f.rc_push_param_get_foot_stool, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_push_param_masked0c, payload(offset, 1)) + subtree:add_le (f.rc_push_param_custom2, payload(offset, 1)) + subtree:add_le (f.rc_push_param_custom1, payload(offset, 1)) + subtree:add_le (f.rc_push_param_playback_status, payload(offset, 1)) + subtree:add_le (f.rc_push_param_shutter_status, payload(offset, 1)) + subtree:add_le (f.rc_push_param_record_status, payload(offset, 1)) + offset = offset + 1 + + if (payload:len() >= offset+1) then -- only exists on some platforms + + subtree:add_le (f.rc_push_param_band_width, payload(offset, 1)) + offset = offset + 1 + + end + + if (offset ~= 13) and (offset ~= 14) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"RC Push Parameter: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"RC Push Parameter: Payload size different than expected") end +end + +-- Remote Control - RC Set RF Cert Config - 0xF0 + +f.rc_set_rf_cert_config_field0 = ProtoField.uint8 ("dji_dumlv1.rc_set_rf_cert_config_field0", "Field 0", base.HEX) +f.rc_set_rf_cert_config_field1 = ProtoField.uint8 ("dji_dumlv1.rc_set_rf_cert_config_field1", "Field 1", base.HEX) +f.rc_set_rf_cert_config_field2 = ProtoField.uint8 ("dji_dumlv1.rc_set_rf_cert_config_field2", "Field 2", base.HEX) +f.rc_set_rf_cert_config_field3 = ProtoField.uint16 ("dji_dumlv1.rc_set_rf_cert_config_field3", "Field 3", base.HEX) +f.rc_set_rf_cert_config_field5 = ProtoField.uint8 ("dji_dumlv1.rc_set_rf_cert_config_field5", "Field 5", base.HEX) +f.rc_set_rf_cert_config_field6 = ProtoField.uint8 ("dji_dumlv1.rc_set_rf_cert_config_field6", "Field 6", base.HEX) +f.rc_set_rf_cert_config_field7 = ProtoField.uint8 ("dji_dumlv1.rc_set_rf_cert_config_field7", "Field 7", base.HEX) + +local function rc_set_rf_cert_config_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.rc_set_rf_cert_config_field0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_set_rf_cert_config_field1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_set_rf_cert_config_field2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_set_rf_cert_config_field3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_set_rf_cert_config_field5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_set_rf_cert_config_field6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_set_rf_cert_config_field7, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"RC Set RF Cert Config: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"RC Set RF Cert Config: Payload size different than expected") end +end + +local RC_UART_CMD_DISSECT = { + [0x05] = rc_push_param_dissector, + [0xF0] = rc_set_rf_cert_config_dissector, +} + +-- Wi-Fi - WiFi Ap Push RSSI - 0x09 + +f.wifi_ap_push_rssi_signal = ProtoField.uint8 ("dji_dumlv1.wifi_ap_push_rssi_signal", "Signal", base.HEX) + +local function wifi_ap_push_rssi_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.wifi_ap_push_rssi_signal, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"WiFi Ap Push RSSI: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"WiFi Ap Push RSSI: Payload size different than expected") end +end + +-- Wi-Fi - WiFi Ap Push Sta MAC - 0x11 + +f.wifi_ap_push_sta_mac_mac = ProtoField.ether ("dji_dumlv1.wifi_ap_push_sta_mac_mac", "Mac") + +local function wifi_ap_push_sta_mac_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.wifi_ap_push_sta_mac_mac, payload(offset, 6)) + offset = offset + 6 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"WiFi Ap Push Sta MAC: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"WiFi Ap Push Sta MAC: Payload size different than expected") end +end + +-- Wi-Fi - WiFi Ap Get Phy Param - 0x12 + +enums.WIFI_ELEC_SIGNAL_SIGNAL_STATUS_ENUM = { + [0x00] = 'Good', + [0x01] = 'Medium', + [0x02] = 'Poor', + [0x64] = 'OTHER', +} + +f.wifi_ap_get_phy_param_signal_status = ProtoField.uint8 ("dji_dumlv1.wifi_ap_get_phy_param_signal_status", "Signal Status", base.HEX, enums.WIFI_ELEC_SIGNAL_SIGNAL_STATUS_ENUM, nil, nil) + +local function wifi_ap_get_phy_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.wifi_ap_get_phy_param_signal_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"WiFi Ap Get Phy Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"WiFi Ap Get Phy Param: Payload size different than expected") end +end + +-- Wi-Fi - WiFi Ap Push Chan Noise - 0x2a + +f.wifi_ap_push_chan_noise_total = ProtoField.uint32 ("dji_dumlv1.wifi_ap_push_chan_noise_total", "Total", base.HEX) + +local function wifi_ap_push_chan_noise_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.wifi_ap_push_chan_noise_total, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"WiFi Ap Push Chan Noise: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"WiFi Ap Push Chan Noise: Payload size different than expected") end +end + +-- Wi-Fi - WiFi Ap Set Country Code - 0x30 +-- Used by Mobile App to set country code on RC; for country "US", RC then enters FCC mode and asks the AC to change mode as well. + +f.wifi_set_country_code_str1 = ProtoField.string ("dji_spark.wifi_set_country_code_str1", "Region Str1", base.NONE) +f.wifi_set_country_code_str2 = ProtoField.string ("dji_spark.wifi_set_country_code_str2", "Region Str2", base.NONE) +f.wifi_set_country_code_unkn8 = ProtoField.uint16 ("dji_spark.wifi_set_country_code_unkn8", "Unknown8", base.HEX) + +local function wifi_ap_set_country_code_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.wifi_set_country_code_str1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wifi_set_country_code_str2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wifi_set_country_code_unkn8, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Set Country Code: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Set Country Code: Payload size different than expected") end +end + + +local WIFI_UART_CMD_DISSECT = { + [0x09] = wifi_ap_push_rssi_dissector, + [0x11] = wifi_ap_push_sta_mac_dissector, + [0x12] = wifi_ap_get_phy_param_dissector, + [0x2a] = wifi_ap_push_chan_noise_dissector, + [0x30] = wifi_ap_set_country_code_dissector, +} + +-- DM36x proc. - DM36x Send Gnd Ctrl Info - 0x01 + +f.dm36x_gnd_ctrl_info_param_id = ProtoField.uint8 ("dji_dumlv1.dm36x_gnd_ctrl_info_param_id", "Param ID", base.DEC) +f.dm36x_gnd_ctrl_info_param_len = ProtoField.uint8 ("dji_dumlv1.dm36x_gnd_ctrl_info_param_len", "Param Len", base.DEC) +f.dm36x_gnd_ctrl_info_param_val8 = ProtoField.uint8 ("dji_dumlv1.dm36x_gnd_ctrl_info_param_val8", "Param 8-bit Val", base.DEC) + +local function dm36x_send_gnd_ctrl_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- Decoded using func Dec_Serial_Set_GS_Ctrl from `usbclient` binary + local num_entries = math.floor(payload:len() / 3) + + local i = 0 + while i < num_entries do + i = i + 1 + + subtree:add_le (f.dm36x_gnd_ctrl_info_param_id, payload(offset, 1)) + offset = offset + 1 + + local param_len = payload(offset,1):le_uint() + subtree:add_le (f.dm36x_gnd_ctrl_info_param_len, payload(offset, 1)) + offset = offset + 1 + + --if (param_len == 1) then -- only support one param_len + subtree:add_le (f.dm36x_gnd_ctrl_info_param_val8, payload(offset, 1)) + offset = offset + param_len + + end + + if (offset ~= 3 * num_entries) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"DM36x Send Gnd Ctrl Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"DM36x Send Gnd Ctrl Info: Payload size different than expected") end +end + +-- DM36x proc. - DM36x Recv Gnd Ctrl Info - 0x02 + +local function dm36x_recv_gnd_ctrl_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- Decoded using func Dec_Serial_Get_GS_Ctrl from `usbclient` binary + local num_entries = math.floor(payload:len() / 1) + + local i = 0 + while i < num_entries do + i = i + 1 + + subtree:add_le (f.dm36x_gnd_ctrl_info_param_id, payload(offset, 1)) + offset = offset + 1 + + end + + if (offset ~= 1 * num_entries) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"DM36x Recv Gnd Ctrl Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"DM36x Recv Gnd Ctrl Info: Payload size different than expected") end +end + +-- DM36x proc. - DM36x Send Gnd Stat Info - 0x05 + +local function dm36x_send_gnd_stat_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- Answer could be decoded using func Dec_Serial_Get_GS_Config from `usbclient` binary + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"DM36x Send Gnd Stat Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"DM36x Send Gnd Stat Info: Payload size different than expected") end +end + +-- DM36x proc. - DM36x Send UAV Stat Info - 0x06 + +f.dm36x_uav_stat_info_unknown00 = ProtoField.bytes ("dji_dumlv1.dm36x_uav_stat_info_unknown00", "Unknown00", base.SPACE) +f.dm36x_uav_stat_info_disable_liveview = ProtoField.uint8 ("dji_dumlv1.dm36x_uav_stat_info_disable_liveview", "Disable Liveview", base.HEX) +f.dm36x_uav_stat_info_encode_mode = ProtoField.uint8 ("dji_dumlv1.dm36x_uav_stat_info_encode_mode", "Encode Mode", base.HEX) +f.dm36x_uav_stat_info_dual_encode_mode_percentage = ProtoField.uint8 ("dji_dumlv1.dm36x_uav_stat_info_dual_encode_mode_percentage", "Dual Encode Mode Percentage", base.HEX) + +local function dm36x_send_uav_stat_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.dm36x_uav_stat_info_unknown00, payload(offset, 3)) + offset = offset + 3 + + subtree:add_le (f.dm36x_uav_stat_info_disable_liveview, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.dm36x_uav_stat_info_encode_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.dm36x_uav_stat_info_dual_encode_mode_percentage, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"DM36x Send UAV Stat Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"DM36x Send UAV Stat Info: Payload size different than expected") end +end + +-- DM36x proc. - DM36x Recv Gnd Stat Info - 0x07 + +local function dm36x_recv_gnd_stat_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + -- Answer could be decoded using func Dec_Serial_Get_GS_Config from `usbclient` binary + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"DM36x Recv Gnd Stat Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"DM36x Recv Gnd Stat Info: Payload size different than expected") end +end + +-- DM36x proc. - DM36x Get App Connect Stat - 0x0e + +--f.dm36x_get_app_conn_stat_unknown0 = ProtoField.none ("dji_dumlv1.dm36x_get_app_conn_stat_unknown0", "Unknown0", base.NONE) + +local function dm36x_get_app_conn_stat_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"DM36x Get App Connect Stat: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"DM36x Get App Connect Stat: Payload size different than expected") end +end + +local DM36X_UART_CMD_DISSECT = { + [0x01] = dm36x_send_gnd_ctrl_info_dissector, + [0x02] = dm36x_recv_gnd_ctrl_info_dissector, + [0x05] = dm36x_send_gnd_stat_info_dissector, + [0x06] = dm36x_send_uav_stat_info_dissector, + [0x07] = dm36x_recv_gnd_stat_info_dissector, + [0x0e] = dm36x_get_app_conn_stat_dissector, +} + +-- HD Link - Generic fields used in many packets + +f.hd_link_opertation_status_byte = ProtoField.uint8 ("dji_dumlv1.hd_link_opertation_status_byte", "Operation status", base.HEX, nil, nil, "Returned error code of the operation; 0 means success") + +-- HD Link - HDLnk Write Hardware Register packet - 0x06 + +f.hd_link_hardware_reg_addr = ProtoField.uint16 ("dji_dumlv1.hd_link_hardware_reg_set", "Register addr", base.HEX, nil, nil, "Address within AD9363, FPGA or special value recognized by Lightbridge MCU") +f.hd_link_hardware_reg_val = ProtoField.uint8 ("dji_dumlv1.hd_link_hardware_reg_val", "Register value", base.HEX, nil, nil, "Value of the hardware register") + +local function hd_link_write_hardware_reg_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + subtree:add_le (f.hd_link_hardware_reg_addr, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.hd_link_hardware_reg_val, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 3) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Write Hardware Reg: Offset does not match - internal inconsistency") end + + else -- Response + + subtree:add_le (f.hd_link_opertation_status_byte, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Read Hardware Reg: Offset does not match - internal inconsistency") end + + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Write Hardware Reg: Payload size different than expected") end +end + +-- HD Link - HDLnk Read Hardware Register packet - 0x07 + +local function hd_link_read_hardware_reg_dissector(pkt_length, buffer, pinfo, subtree) + local pack_type = bit32.rshift(bit32.band(buffer(8,1):uint(), 0x80), 7) + + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if pack_type == 0 then -- Request + + subtree:add_le (f.hd_link_hardware_reg_addr, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Read Hardware Reg: Offset does not match - internal inconsistency") end + + else -- Response + + subtree:add_le (f.hd_link_hardware_reg_val, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Read Hardware Reg: Offset does not match - internal inconsistency") end + + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Read Hardware Reg: Payload size different than expected") end +end + +-- HD Link - HDLnk Push VT Signal Quality - 0x08 + +f.hd_link_push_vt_signal_quality_masked00 = ProtoField.uint8 ("dji_dumlv1.hd_link_push_vt_signal_quality_masked00", "Masked00", base.HEX) + f.hd_link_push_vt_signal_quality_up_signal_quality = ProtoField.uint8 ("dji_dumlv1.hd_link_push_vt_signal_quality_up_signal_quality", "Up Signal Quality", base.HEX, nil, 0x7f, nil) + +local function hd_link_push_vt_signal_quality_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_push_vt_signal_quality_masked00, payload(offset, 1)) + subtree:add_le (f.hd_link_push_vt_signal_quality_up_signal_quality, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push VT Signal Quality: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push VT Signal Quality: Payload size different than expected") end +end + +-- HD Link - HDLnk Push Freq Energy - 0x0a + +f.hd_link_push_freq_energy_unknown0 = ProtoField.bytes ("dji_dumlv1.hd_link_push_freq_energy_unknown0", "Unknown0", base.SPACE) + +local function hd_link_push_freq_energy_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_push_freq_energy_unknown0, payload(offset, 32)) + offset = offset + 32 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push Freq Energy: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push Freq Energy: Payload size different than expected") end +end + +-- HD Link - HDLnk Push Device Status - 0x0b + +f.hd_link_push_device_status_unknown0 = ProtoField.uint8 ("dji_dumlv1.hd_link_push_device_status_unknown0", "Unknown0", base.HEX) +f.hd_link_push_device_status_unknown1 = ProtoField.uint32 ("dji_dumlv1.hd_link_push_device_status_unknown1", "Unknown1", base.DEC) + +local function hd_link_push_device_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local num_entries = math.floor(payload:len() / 5) + + local i = 0 + while i < num_entries do + i = i + 1 + + subtree:add_le (f.hd_link_push_device_status_unknown0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_device_status_unknown1, payload(offset, 4)) + offset = offset + 4 + + end + + if (offset ~= 5 * num_entries) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push Device Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push Device Status: Payload size different than expected") end +end + +-- HD Link - HDLnk Get VT Config Info - 0x0c + +f.hd_link_get_vt_config_info_channel = ProtoField.uint8 ("dji_dumlv1.hd_link_get_vt_config_info_channel", "Channel", base.HEX) +f.hd_link_get_vt_config_info_unknown01 = ProtoField.uint8 ("dji_dumlv1.hd_link_get_vt_config_info_unknown01", "Unknown01", base.HEX) +f.hd_link_get_vt_config_info_get_is_auto = ProtoField.uint8 ("dji_dumlv1.hd_link_get_vt_config_info_get_is_auto", "Get Is Auto", base.HEX) +f.hd_link_get_vt_config_info_get_is_master = ProtoField.uint8 ("dji_dumlv1.hd_link_get_vt_config_info_get_is_master", "Get Is Master", base.HEX) +f.hd_link_get_vt_config_info_unknown04 = ProtoField.bytes ("dji_dumlv1.hd_link_get_vt_config_info_unknown04", "Unknown04", base.SPACE) +f.hd_link_get_vt_config_info_mcs = ProtoField.uint8 ("dji_dumlv1.hd_link_get_vt_config_info_mcs", "Mcs", base.HEX) +f.hd_link_get_vt_config_info_single_or_double = ProtoField.uint8 ("dji_dumlv1.hd_link_get_vt_config_info_single_or_double", "Single Or Double", base.HEX, nil, nil) +f.hd_link_get_vt_config_info_band_width_percent = ProtoField.uint8 ("dji_dumlv1.hd_link_get_vt_config_info_band_width_percent", "Band Width Percent", base.DEC) +f.hd_link_get_vt_config_info_unknown0c = ProtoField.bytes ("dji_dumlv1.hd_link_get_vt_config_info_unknown0c", "Unknown0C", base.SPACE) +f.hd_link_get_vt_config_info_working_freq = ProtoField.uint8 ("dji_dumlv1.hd_link_get_vt_config_info_working_freq", "Working Freq", base.HEX) + +local function hd_link_get_vt_config_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_get_vt_config_info_channel, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_get_vt_config_info_unknown01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_get_vt_config_info_get_is_auto, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_get_vt_config_info_get_is_master, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_get_vt_config_info_unknown04, payload(offset, 5)) + offset = offset + 5 + + subtree:add_le (f.hd_link_get_vt_config_info_mcs, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_get_vt_config_info_single_or_double, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_get_vt_config_info_band_width_percent, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_get_vt_config_info_unknown0c, payload(offset, 3)) + offset = offset + 3 + + subtree:add_le (f.hd_link_get_vt_config_info_working_freq, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Get VT Config Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Get VT Config Info: Payload size different than expected") end +end + +-- HD Link - HDLnk Push Wl Env Quality - 0x11 + +enums.HD_LINK_WL_ENV_QUALITY_CHANNEL_STATUS_ENUM = { + [0x00] = 'Excellent', + [0x01] = 'Good', + [0x02] = 'Medium', + [0x03] = 'Poor', + [0x64] = 'OTHER', +} + +f.hd_link_push_wl_env_quality_channel_status = ProtoField.uint8 ("dji_dumlv1.hd_link_push_wl_env_quality_channel_status", "Channel Status", base.HEX, enums.HD_LINK_WL_ENV_QUALITY_CHANNEL_STATUS_ENUM, nil, nil) + +local function hd_link_push_wl_env_quality_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_push_wl_env_quality_channel_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push Wl Env Quality: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push Wl Env Quality: Payload size different than expected") end +end + +-- HD Link - HDLnk Set Factory Test - 0x12 + +f.hd_link_set_factory_test_flag_20001A28_D_E = ProtoField.uint8 ("dji_dumlv1.hd_link_set_factory_test_flag_20001A28_D_E", "flag 20001A28 D and E", base.HEX, nil, nil, nil) +f.hd_link_set_factory_test_flag_20001A28_A_B = ProtoField.uint8 ("dji_dumlv1.hd_link_set_factory_test_flag_20001A28_A_B", "flag 20001A28 A and B", base.HEX, nil, nil, nil) +f.hd_link_set_factory_test_attenuation = ProtoField.uint8 ("dji_dumlv1.hd_link_set_factory_test_attenuation", "Tcx Attenuation", base.HEX, nil, nil, "dB; attenuation set to REG_TXn_ATTEN_0 register of AD9363") +f.hd_link_set_factory_test_flag_20001A28_C = ProtoField.uint8 ("dji_dumlv1.hd_link_set_factory_test_flag_20001A28_C", "flag 20001A28 C", base.HEX, nil, nil, nil) + +local function hd_link_set_factory_test_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_set_factory_test_flag_20001A28_D_E, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_set_factory_test_flag_20001A28_A_B, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_set_factory_test_attenuation, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_set_factory_test_flag_20001A28_C, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Set Factory Test: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Set Factory Test: Payload size different than expected") end +end + +-- HD Link - HDLnk Push Max Video Bandwidth - 0x15 + +f.hd_link_push_max_video_bandwidth_max_mcs = ProtoField.uint8 ("dji_dumlv1.hd_link_push_max_video_bandwidth_max_mcs", "Max Mcs", base.HEX) + +local function hd_link_push_max_video_bandwidth_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_push_max_video_bandwidth_max_mcs, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push Max Video Bandwidth: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push Max Video Bandwidth: Payload size different than expected") end +end + +-- HD Link - HDLnk Push Debug Info - 0x16 + +f.hd_link_push_debug_info_type = ProtoField.uint8 ("dji_dumlv1.hd_link_push_debug_info_type", "Type", base.HEX, nil, nil, "TODO values from enum P3.DataOsdGetPushDebugInfo") + +local function hd_link_push_debug_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_push_debug_info_type, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push Debug Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push Debug Info: Payload size different than expected") end +end + +-- HD Link - HDLnk Push SDR Dl Freq Energy - 0x20 + +--f.hd_link_push_sdr_dl_freq_energy_unknown0 = ProtoField.none ("dji_dumlv1.hd_link_push_sdr_dl_freq_energy_unknown0", "Unknown0", base.NONE) + +local function hd_link_push_sdr_dl_freq_energy_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push SDR Dl Freq Energy: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push SDR Dl Freq Energy: Payload size different than expected") end +end + +-- HD Link - HDLnk Push SDR Dl Auto Vt Info - 0x22 + +f.hd_link_push_sdr_dl_auto_vt_info_nf = ProtoField.uint16 ("dji_dumlv1.hd_link_push_sdr_dl_auto_vt_info_nf", "NF", base.DEC) +f.hd_link_push_sdr_dl_auto_vt_info_band = ProtoField.uint8 ("dji_dumlv1.hd_link_push_sdr_dl_auto_vt_info_band", "Band", base.DEC) +f.hd_link_push_sdr_dl_auto_vt_info_unknown3 = ProtoField.uint8 ("dji_dumlv1.hd_link_push_sdr_dl_auto_vt_info_unknown3", "Unknown3", base.HEX) +f.hd_link_push_sdr_dl_auto_vt_info_auto_mcs = ProtoField.float ("dji_dumlv1.hd_link_push_sdr_dl_auto_vt_info_auto_mcs", "Auto Mcs", base.DEC) +f.hd_link_push_sdr_dl_auto_vt_info_mcs_type = ProtoField.uint8 ("dji_dumlv1.hd_link_push_sdr_dl_auto_vt_info_mcs_type", "Mcs Type", base.HEX) + +local function hd_link_push_sdr_dl_auto_vt_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_push_sdr_dl_auto_vt_info_nf, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.hd_link_push_sdr_dl_auto_vt_info_band, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_sdr_dl_auto_vt_info_unknown3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_sdr_dl_auto_vt_info_auto_mcs, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hd_link_push_sdr_dl_auto_vt_info_mcs_type, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 9) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push SDR Dl Auto Vt Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push SDR Dl Auto Vt Info: Payload size different than expected") end +end + +-- HD Link - HDLnk Push SDR UAV Rt Status - 0x24 +-- HD Link - HDLnk Push SDR Gnd Rt Status - 0x25 + +f.hd_link_push_sdr_rt_status_name = ProtoField.string ("dji_dumlv1.hd_link_push_sdr_rt_status_name", "Name", base.NONE) +f.hd_link_push_sdr_rt_status_value = ProtoField.float ("dji_dumlv1.hd_link_push_sdr_rt_status_value", "Value", base.DEC) + +local function hd_link_push_sdr_rt_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local num_entries = math.floor(payload:len() / 12) + + local i = 0 + while i < num_entries do + i = i + 1 + + subtree:add_le (f.hd_link_push_sdr_rt_status_name, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.hd_link_push_sdr_rt_status_value, payload(offset, 4)) + offset = offset + 4 + + end + + if (offset ~= 12 * num_entries) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push SDR Rt Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push SDR Rt Status: Payload size different than expected") end +end + +-- HD Link - HDLnk Push SDR Ul Freq Energy - 0x29 + +--f.hd_link_push_sdr_ul_freq_energy_unknown0 = ProtoField.none ("dji_dumlv1.hd_link_push_sdr_ul_freq_energy_unknown0", "Unknown0", base.NONE) + +local function hd_link_push_sdr_ul_freq_energy_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push SDR Ul Freq Energy: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push SDR Ul Freq Energy: Payload size different than expected") end +end + +-- HD Link - HDLnk Push SDR Ul Auto Vt Info - 0x2a + +f.hd_link_push_sdr_ul_auto_vt_info_channel_type = ProtoField.float ("dji_dumlv1.hd_link_push_sdr_ul_auto_vt_info_channel_type", "Select Channel Type", base.DEC) +f.hd_link_push_sdr_ul_auto_vt_info_get_select_channel_count = ProtoField.uint32 ("dji_dumlv1.hd_link_push_sdr_ul_auto_vt_info_get_select_channel_count", "Get Select Channel Count", base.HEX) + +local function hd_link_push_sdr_ul_auto_vt_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_push_sdr_ul_auto_vt_info_channel_type, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hd_link_push_sdr_ul_auto_vt_info_get_select_channel_count, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push SDR Ul Auto Vt Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push SDR Ul Auto Vt Info: Payload size different than expected") end +end + +-- HD Link - HDLnk SDR Wireless Env - 0x30 + +enums.HD_LINK_SDR_WIRELESS_ENV_EVENT_CODE_SDR_WIRELESS_STATE_ENUM = { + [0x00] = 'STRONG_DISTURBANCE', + [0x01] = 'VIDEO_DISTURBANCE', + [0x02] = 'RC_DISTURBANCE', + [0x03] = 'LOW_SIGNAL_POWER', + [0x04] = 'CUSTOM_SIGNAL_DISTURBANCE', + [0x05] = 'RC_TO_GLASS_DIST', + [0x06] = 'UAV_HAL_RESTART', + [0x07] = 'GLASS_DIST_RC_ANTENNA', + [0x08] = 'DISCONNECT_RC_DISTURB', + [0x09] = 'DISCONNECT_UAV_DISTURB', + [0x0a] = 'DISCONNECT_WEEK_SIGNAL', + [0xff] = 'INTERNAL_EVENT', + [0x100] = 'NONE', +} + +f.hd_link_sdr_wireless_env_event_code = ProtoField.uint16 ("dji_dumlv1.hd_link_sdr_wireless_env_event_code", "Event Code", base.HEX, enums.HD_LINK_SDR_WIRELESS_ENV_EVENT_CODE_SDR_WIRELESS_STATE_ENUM, nil, nil) + +local function hd_link_sdr_wireless_env_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_sdr_wireless_env_event_code, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk SDR Wireless Env: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk SDR Wireless Env: Payload size different than expected") end +end + +-- HD Link - HDLnk SDR Liveview Rate Ind - 0x36 + +f.hd_link_sdr_liveview_rate_ind_code_rate = ProtoField.float ("dji_dumlv1.hd_link_sdr_liveview_rate_ind_code_rate", "Code Rate", base.DEC) + +local function hd_link_sdr_liveview_rate_ind_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_sdr_liveview_rate_ind_code_rate, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk SDR Liveview Rate Ind: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk SDR Liveview Rate Ind: Payload size different than expected") end +end + +-- HD Link - HDLnk Abnormal Event Ind - 0x37 + +f.hd_link_abnormal_event_ind_masked00 = ProtoField.uint8 ("dji_dumlv1.hd_link_abnormal_event_ind_masked00", "Masked00", base.HEX) + f.hd_link_abnormal_event_ind_post = ProtoField.uint8 ("dji_dumlv1.hd_link_abnormal_event_ind_post", "Post", base.HEX, nil, 0x01, nil) + +local function hd_link_abnormal_event_ind_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_abnormal_event_ind_masked00, payload(offset, 1)) + subtree:add_le (f.hd_link_abnormal_event_ind_post, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Abnormal Event Ind: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Abnormal Event Ind: Payload size different than expected") end +end + +-- HD Link - HDLnk Push Dl Freq Energy - 0x3a + +enums.HD_LINK_PUSH_DL_FREQ_ENERGY_DIS_LOSS_EVENT_ENUM = { + [0x00] = 'NONE', + [0x01] = 'GROUND_INTERFERED', + [0x02] = 'UAV_INTERFERED', + [0x03] = 'SIGNAL_BLOCK', +} + +f.hd_link_push_dl_freq_energy_1_km_offset = ProtoField.uint8 ("dji_dumlv1.hd_link_push_dl_freq_energy_1_km_offset", "1 Km Offset", base.HEX, nil, nil, "value bias - 256") +f.hd_link_push_dl_freq_energy_path_loss_offset = ProtoField.uint8 ("dji_dumlv1.hd_link_push_dl_freq_energy_path_loss_offset", "Path Loss Offset", base.HEX) +f.hd_link_push_dl_freq_energy_rc_link_offset = ProtoField.uint8 ("dji_dumlv1.hd_link_push_dl_freq_energy_rc_link_offset", "Rc Link Offset", base.HEX) +f.hd_link_push_dl_freq_energy_tx_power_offset = ProtoField.uint8 ("dji_dumlv1.hd_link_push_dl_freq_energy_tx_power_offset", "Tx Power Offset", base.HEX) +f.hd_link_push_dl_freq_energy_dis_loss_ind = ProtoField.uint8 ("dji_dumlv1.hd_link_push_dl_freq_energy_dis_loss_ind", "Dis Loss Ind", base.HEX, enums.HD_LINK_PUSH_DL_FREQ_ENERGY_DIS_LOSS_EVENT_ENUM, nil, nil) +f.hd_link_push_dl_freq_energy_sig_bar_ind = ProtoField.uint8 ("dji_dumlv1.hd_link_push_dl_freq_energy_sig_bar_ind", "Sig Bar Ind", base.HEX) +f.hd_link_push_dl_freq_energy_dl_pwr_accu = ProtoField.uint8 ("dji_dumlv1.hd_link_push_dl_freq_energy_dl_pwr_accu", "Dl Pwr Accu", base.HEX) +f.hd_link_push_dl_freq_energy_max_nf20_m = ProtoField.uint16 ("dji_dumlv1.hd_link_push_dl_freq_energy_max_nf20_m", "Max Nf20 M", base.HEX) +f.hd_link_push_dl_freq_energy_min_nf20_m = ProtoField.uint16 ("dji_dumlv1.hd_link_push_dl_freq_energy_min_nf20_m", "Min Nf20 M", base.HEX) +f.hd_link_push_dl_freq_energy_max_nf10_m = ProtoField.uint16 ("dji_dumlv1.hd_link_push_dl_freq_energy_max_nf10_m", "Max Nf10 M", base.HEX) +f.hd_link_push_dl_freq_energy_min_nf10_m = ProtoField.uint16 ("dji_dumlv1.hd_link_push_dl_freq_energy_min_nf10_m", "Min Nf10 M", base.HEX) + +local function hd_link_push_dl_freq_energy_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_push_dl_freq_energy_1_km_offset, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_dl_freq_energy_path_loss_offset, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_dl_freq_energy_rc_link_offset, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_dl_freq_energy_tx_power_offset, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_dl_freq_energy_dis_loss_ind, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_dl_freq_energy_sig_bar_ind, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_dl_freq_energy_dl_pwr_accu, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_push_dl_freq_energy_max_nf20_m, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.hd_link_push_dl_freq_energy_min_nf20_m, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.hd_link_push_dl_freq_energy_max_nf10_m, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.hd_link_push_dl_freq_energy_min_nf10_m, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 15) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Push Dl Freq Energy: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Push Dl Freq Energy: Payload size different than expected") end +end + +-- HD Link - HDLnk SDR Tip Interference - 0x3b + +f.hd_link_sdr_tip_interference_be_interfered = ProtoField.uint8 ("dji_dumlv1.hd_link_sdr_tip_interference_be_interfered", "Be Interfered", base.HEX) + +local function hd_link_sdr_tip_interference_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_sdr_tip_interference_be_interfered, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk SDR Tip Interference: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk SDR Tip Interference: Payload size different than expected") end +end + +-- HD Link - HDLnk Power Status - 0x52 + +f.hd_link_power_status_info_power_status = ProtoField.uint8 ("dji_dumlv1.hd_link_power_status_info_power_status", "Power Status", base.HEX) +f.hd_link_power_status_info_get_is_power_off = ProtoField.uint8 ("dji_dumlv1.hd_link_power_status_info_get_is_power_off", "Get Is Power Off", base.HEX) + +local function hd_link_power_status_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_power_status_info_power_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_power_status_info_get_is_power_off, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Power Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Power Status: Payload size different than expected") end +end + +-- HD Link - HDLnk Osmo Calibration - 0x54 + +f.hd_link_osmo_calibration_a = ProtoField.uint8 ("dji_dumlv1.hd_link_osmo_calibration_a", "A", base.HEX) +f.hd_link_osmo_calibration_b = ProtoField.uint8 ("dji_dumlv1.hd_link_osmo_calibration_b", "B", base.HEX) + +local function hd_link_osmo_calibration_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_osmo_calibration_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.hd_link_osmo_calibration_b, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Osmo Calibration: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Osmo Calibration: Payload size different than expected") end +end + +-- HD Link - HDLnk Mic Info - 0x59 + +enums.HD_LINK_OSD_MIC_INFO_MIC_TYPE_ENUM = { + [0x00] = 'IN', + [0x01] = 'OUT', + [0x02] = 'OTHER', +} + +f.hd_link_mic_info_masked00 = ProtoField.uint8 ("dji_dumlv1.hd_link_mic_info_masked00", "Masked00", base.HEX) + f.hd_link_mic_info_mic_type = ProtoField.uint8 ("dji_dumlv1.hd_link_mic_info_mic_type", "Mic Type", base.HEX, enums.HD_LINK_OSD_MIC_INFO_MIC_TYPE_ENUM, 0x01, nil) + f.hd_link_mic_info_mic_volume = ProtoField.uint8 ("dji_dumlv1.hd_link_mic_info_mic_volume", "Mic Volume", base.HEX, nil, 0xfe, nil) + +local function hd_link_mic_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.hd_link_mic_info_masked00, payload(offset, 1)) + subtree:add_le (f.hd_link_mic_info_mic_type, payload(offset, 1)) + subtree:add_le (f.hd_link_mic_info_mic_volume, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"HDLnk Mic Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"HDLnk Mic Info: Payload size different than expected") end +end + +local HD_LINK_UART_CMD_DISSECT = { + [0x01] = flyc_osd_general_dissector, + [0x02] = flyc_osd_home_point_dissector, + [0x06] = hd_link_write_hardware_reg_dissector, + [0x07] = hd_link_read_hardware_reg_dissector, + [0x08] = hd_link_push_vt_signal_quality_dissector, + [0x0a] = hd_link_push_freq_energy_dissector, + [0x0b] = hd_link_push_device_status_dissector, + [0x0c] = hd_link_get_vt_config_info_dissector, + [0x11] = hd_link_push_wl_env_quality_dissector, + [0x12] = hd_link_set_factory_test_dissector, + [0x15] = hd_link_push_max_video_bandwidth_dissector, + [0x16] = hd_link_push_debug_info_dissector, + [0x20] = hd_link_push_sdr_dl_freq_energy_dissector, + [0x22] = hd_link_push_sdr_dl_auto_vt_info_dissector, + [0x24] = hd_link_push_sdr_rt_status_dissector, + [0x25] = hd_link_push_sdr_rt_status_dissector, -- Ground version is the same as air version + [0x29] = hd_link_push_sdr_ul_freq_energy_dissector, + [0x2a] = hd_link_push_sdr_ul_auto_vt_info_dissector, + [0x30] = hd_link_sdr_wireless_env_dissector, + [0x36] = hd_link_sdr_liveview_rate_ind_dissector, + [0x37] = hd_link_abnormal_event_ind_dissector, + [0x3a] = hd_link_push_dl_freq_energy_dissector, + [0x3b] = hd_link_sdr_tip_interference_dissector, + [0x52] = hd_link_power_status_info_dissector, + [0x54] = hd_link_osmo_calibration_dissector, + [0x59] = hd_link_mic_info_dissector, +} + +-- Mono/Binocular - Eye Bino Info - 0x01 + +--f.mbino_bino_info_unknown0 = ProtoField.none ("dji_dumlv1.mbino_bino_info_unknown0", "Unknown0", base.NONE) + +local function mbino_bino_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Bino Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Bino Info: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Avoidance Param - 0x06 + +f.mbino_avoidance_param_masked00 = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_masked00", "Masked00", base.HEX) + f.mbino_avoidance_param_braking = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_braking", "Braking", base.HEX, nil, 0x01, nil) + f.mbino_avoidance_param_visual_sensor_working = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_visual_sensor_working", "Visual Sensor Working", base.HEX, nil, 0x02, nil) + f.mbino_avoidance_param_avoid_open = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_open", "Avoid Open", base.HEX, nil, 0x04, nil) + f.mbino_avoidance_param_be_shuttle_mode = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_be_shuttle_mode", "Be Shuttle Mode", base.HEX, nil, 0x08, nil) + f.mbino_avoidance_param_avoid_front_work = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_front_work", "Avoid Front Work", base.HEX, nil, 0x10, nil) + f.mbino_avoidance_param_avoid_right_work = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_right_work", "Avoid Right Work", base.HEX, nil, 0x20, nil) + f.mbino_avoidance_param_avoid_behind_work = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_behind_work", "Avoid Behind Work", base.HEX, nil, 0x40, nil) + f.mbino_avoidance_param_avoid_left_work = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_left_work", "Avoid Left Work", base.HEX, nil, 0x80, nil) +f.mbino_avoidance_param_masked01 = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_masked01", "Masked01", base.HEX) + f.mbino_avoidance_param_avoid_front_distance_level = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_front_distance_level", "Avoid Front Distance Level", base.HEX, nil, 0x0f, nil) + f.mbino_avoidance_param_avoid_front_alert_level = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_front_alert_level", "Avoid Front Alert Level", base.HEX, nil, 0xf0, nil) +f.mbino_avoidance_param_masked02 = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_masked02", "Masked02", base.HEX) + f.mbino_avoidance_param_avoid_right_distance_level = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_right_distance_level", "Avoid Right Distance Level", base.HEX, nil, 0x0f, nil) + f.mbino_avoidance_param_avoid_right_alert_level = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_right_alert_level", "Avoid Right Alert Level", base.HEX, nil, 0xf0, nil) +f.mbino_avoidance_param_masked03 = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_masked03", "Masked03", base.HEX) + f.mbino_avoidance_param_avoid_behind_distance_level = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_behind_distance_level", "Avoid Behind Distance Level", base.HEX, nil, 0x0f, nil) + f.mbino_avoidance_param_avoid_behind_alert_level = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_behind_alert_level", "Avoid Behind Alert Level", base.HEX, nil, 0xf0, nil) +f.mbino_avoidance_param_masked04 = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_masked04", "Masked04", base.HEX) + f.mbino_avoidance_param_avoid_left_distance_level = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_left_distance_level", "Avoid Left Distance Level", base.HEX, nil, 0x0f, nil) + f.mbino_avoidance_param_avoid_left_alert_level = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_avoid_left_alert_level", "Avoid Left Alert Level", base.HEX, nil, 0xf0, nil) +f.mbino_avoidance_param_masked05 = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_masked05", "Masked05", base.HEX) + f.mbino_avoidance_param_allow_front = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_allow_front", "Allow Front", base.HEX, nil, 0x01, nil) + f.mbino_avoidance_param_allow_right = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_allow_right", "Allow Right", base.HEX, nil, 0x02, nil) + f.mbino_avoidance_param_allow_back = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_allow_back", "Allow Back", base.HEX, nil, 0x04, nil) + f.mbino_avoidance_param_allow_left = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_allow_left", "Allow Left", base.HEX, nil, 0x08, nil) +f.mbino_avoidance_param_index = ProtoField.uint8 ("dji_dumlv1.mbino_avoidance_param_index", "Index", base.HEX) + +local function mbino_avoidance_param_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_avoidance_param_masked00, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_braking, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_visual_sensor_working, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_open, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_be_shuttle_mode, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_front_work, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_right_work, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_behind_work, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_left_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_avoidance_param_masked01, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_front_distance_level, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_front_alert_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_avoidance_param_masked02, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_right_distance_level, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_right_alert_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_avoidance_param_masked03, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_behind_distance_level, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_behind_alert_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_avoidance_param_masked04, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_left_distance_level, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_avoid_left_alert_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_avoidance_param_masked05, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_allow_front, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_allow_right, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_allow_back, payload(offset, 1)) + subtree:add_le (f.mbino_avoidance_param_allow_left, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_avoidance_param_index, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Avoidance Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Avoidance Param: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Obstacle Info - 0x07 + +enums.MBINO_OBSTACLE_INFO_SENSOR_TYPE_ENUM = { + [0x00] = 'Front', + [0x01] = 'Back', + [0x02] = 'Right', + [0x03] = 'Left', + [0x04] = 'Top', + [0x05] = 'Bottom', + [0x64] = 'OTHER', +} + +f.mbino_obstacle_info_masked00 = ProtoField.uint8 ("dji_dumlv1.mbino_obstacle_info_masked00", "Masked00", base.HEX) + f.mbino_obstacle_info_observe_count = ProtoField.uint8 ("dji_dumlv1.mbino_obstacle_info_observe_count", "Observe Count", base.HEX, nil, 0x1f, nil) + f.mbino_obstacle_info_sensor_type = ProtoField.uint8 ("dji_dumlv1.mbino_obstacle_info_sensor_type", "Sensor Type", base.HEX, enums.MBINO_OBSTACLE_INFO_SENSOR_TYPE_ENUM, 0xe0, nil) + +local function mbino_obstacle_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_obstacle_info_masked00, payload(offset, 1)) + subtree:add_le (f.mbino_obstacle_info_observe_count, payload(offset, 1)) + subtree:add_le (f.mbino_obstacle_info_sensor_type, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Obstacle Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Obstacle Info: Payload size different than expected") end +end + +-- Mono/Binocular - Eye TapGo Obst Avo Info - 0x08 + +f.mbino_tapgo_obst_avo_info_alert_level = ProtoField.uint8 ("dji_dumlv1.mbino_tapgo_obst_avo_info_alert_level", "Alert Level", base.HEX) +f.mbino_tapgo_obst_avo_info_observe_count = ProtoField.uint8 ("dji_dumlv1.mbino_tapgo_obst_avo_info_observe_count", "Observe Count", base.DEC) + +local function mbino_tapgo_obst_avo_info_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_tapgo_obst_avo_info_alert_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_tapgo_obst_avo_info_observe_count, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye TapGo Obst Avo Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye TapGo Obst Avo Info: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Track Log - 0x0d + +f.mbino_track_log_text = ProtoField.string ("dji_dumlv1.mbino_track_log_text", "Track Log", base.ASCII) + +local function mbino_track_log_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local log_text = payload(offset, payload:len() - offset) + subtree:add (f.mbino_track_log_text, log_text) + offset = payload:len() + + --if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Track Log: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Track Log: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Point Log - 0x0e + +f.mbino_point_log_text = ProtoField.string ("dji_dumlv1.mbino_point_log_text", "Point Log", base.ASCII) + +local function mbino_point_log_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + local log_text = payload(offset, payload:len() - offset) + subtree:add (f.mbino_point_log_text, log_text) + offset = payload:len() + + --if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Point Log: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Point Log: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Flat Check - 0x19 + +f.mbino_flat_check_tink_count = ProtoField.uint8 ("dji_dumlv1.mbino_flat_check_tink_count", "Tink Count", base.HEX) + +local function mbino_flat_check_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_flat_check_tink_count, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Flat Check: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Flat Check: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Tracking Status Push - 0x23 + +enums.MBINO_TRACK_STATUS_RECT_MODE_TRACK_MODE_ENUM = { + [0x00] = 'LOST', + [0x01] = 'NORMAL', + [0x02] = 'WEAK', + [0x03] = 'DETECT_AFTER_LOST', + [0x04] = 'TRACKING', + [0x05] = 'CONFIRM', + [0x06] = 'PERSON', + [0x64] = 'OTHER', +} + +enums.MBINO_TRACK_STATUS_TRACKING_MODE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x03] = 'd', + [0x04] = 'e', + [0x05] = 'f', + [0xff] = 'g', +} + +enums.MBINO_TRACK_STATUS_TARGET_TYPE_TARGET_OBJ_TYPE_ENUM = { + [0x00] = 'UNKNOWN', + [0x01] = 'PERSON', + [0x02] = 'CAR', + [0x03] = 'VAN', + [0x04] = 'BIKE', + [0x05] = 'ANIMAL', + [0x06] = 'BOAT', + [0x64] = 'OTHER', +} + +enums.MBINO_TRACK_STATUS_TARGET_ACTION_ENUM = { + [0x00] = 'Non', + [0x01] = 'JUMP', + [0x64] = 'OTHER', +} + +f.mbino_tracking_status_push_rect_mode = ProtoField.uint8 ("dji_dumlv1.mbino_tracking_status_push_rect_mode", "Rect Mode", base.HEX, enums.MBINO_TRACK_STATUS_RECT_MODE_TRACK_MODE_ENUM, nil, nil) +f.mbino_tracking_status_push_center_x = ProtoField.float ("dji_dumlv1.mbino_tracking_status_push_center_x", "Center X", base.DEC) +f.mbino_tracking_status_push_center_y = ProtoField.float ("dji_dumlv1.mbino_tracking_status_push_center_y", "Center Y", base.DEC) +f.mbino_tracking_status_push_width = ProtoField.float ("dji_dumlv1.mbino_tracking_status_push_width", "Width", base.DEC) +f.mbino_tracking_status_push_height = ProtoField.float ("dji_dumlv1.mbino_tracking_status_push_height", "Height", base.DEC) +f.mbino_tracking_status_push_unknown11 = ProtoField.uint8 ("dji_dumlv1.mbino_tracking_status_push_unknown11", "Unknown11", base.HEX) +f.mbino_tracking_status_push_session_id = ProtoField.uint16 ("dji_dumlv1.mbino_tracking_status_push_session_id", "Session Id", base.HEX) +f.mbino_tracking_status_push_masked14 = ProtoField.uint8 ("dji_dumlv1.mbino_tracking_status_push_masked14", "Masked14", base.HEX) + f.mbino_tracking_status_push_human_target = ProtoField.uint8 ("dji_dumlv1.mbino_tracking_status_push_human_target", "Human Target", base.HEX, nil, 0x01, nil) + f.mbino_tracking_status_push_head_lock = ProtoField.uint8 ("dji_dumlv1.mbino_tracking_status_push_head_lock", "Head Lock", base.HEX, nil, 0x02, nil) +f.mbino_tracking_status_push_tracking_mode = ProtoField.uint8 ("dji_dumlv1.mbino_tracking_status_push_tracking_mode", "Tracking Mode", base.HEX, enums.MBINO_TRACK_STATUS_TRACKING_MODE_ENUM, nil, nil) +f.mbino_tracking_status_push_target_type = ProtoField.uint8 ("dji_dumlv1.mbino_tracking_status_push_target_type", "Target Type", base.HEX, enums.MBINO_TRACK_STATUS_TARGET_TYPE_TARGET_OBJ_TYPE_ENUM, nil, nil) +f.mbino_tracking_status_push_target_action = ProtoField.uint8 ("dji_dumlv1.mbino_tracking_status_push_target_action", "Target Action", base.HEX, enums.MBINO_TRACK_STATUS_TARGET_ACTION_ENUM, nil, nil) + +local function mbino_tracking_status_push_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_tracking_status_push_rect_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_tracking_status_push_center_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mbino_tracking_status_push_center_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mbino_tracking_status_push_width, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mbino_tracking_status_push_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mbino_tracking_status_push_unknown11, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_tracking_status_push_session_id, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_tracking_status_push_masked14, payload(offset, 1)) + subtree:add_le (f.mbino_tracking_status_push_human_target, payload(offset, 1)) + subtree:add_le (f.mbino_tracking_status_push_head_lock, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_tracking_status_push_tracking_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_tracking_status_push_target_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_tracking_status_push_target_action, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Tracking Status Push: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Tracking Status Push: Payload size different than expected") end +end + +-- Mono/Binocular - Eye TapGo Status Push - 0x26 + +enums.MBINO_TAPGO_STATUS_PUSH_TRAGET_MODE_POINT_MODE_ENUM = { + [0x00] = 'HIDE', + [0x01] = 'CANT_FLY', + [0x02] = 'FLYING', + [0x64] = 'OTHER', +} + +enums.MBINO_TAPGO_STATUS_PUSH_TAP_MODE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x03] = 'd', + [0x64] = 'e', +} + +f.mbino_tapgo_status_push_traget_mode = ProtoField.uint8 ("dji_dumlv1.mbino_tapgo_status_push_traget_mode", "Traget Mode", base.HEX, enums.MBINO_TAPGO_STATUS_PUSH_TRAGET_MODE_POINT_MODE_ENUM, nil, nil) +f.mbino_tapgo_status_push_masked01 = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_masked01", "Masked01", base.HEX) + f.mbino_tapgo_status_push_rc_not_in_f_mode = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_rc_not_in_f_mode", "Rc Not In F Mode", base.HEX, nil, 0x01, nil) + f.mbino_tapgo_status_push_cant_detour = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_cant_detour", "Cant Detour", base.HEX, nil, 0x02, nil) + f.mbino_tapgo_status_push_braked_by_collision = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_braked_by_collision", "Braked By Collision", base.HEX, nil, 0x04, nil) + f.mbino_tapgo_status_push_detour_up = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_detour_up", "Detour Up", base.HEX, nil, 0x08, nil) + f.mbino_tapgo_status_push_detour_left = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_detour_left", "Detour Left", base.HEX, nil, 0x10, nil) + f.mbino_tapgo_status_push_detour_right = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_detour_right", "Detour Right", base.HEX, nil, 0x20, nil) + f.mbino_tapgo_status_push_stick_add = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_stick_add", "Stick Add", base.HEX, nil, 0x40, nil) + f.mbino_tapgo_status_push_out_of_range = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_out_of_range", "Out Of Range", base.HEX, nil, 0x80, nil) + f.mbino_tapgo_status_push_user_quick_pull_pitch = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_user_quick_pull_pitch", "User Quick Pull Pitch", base.HEX, nil, 0x100, nil) + f.mbino_tapgo_status_push_in_low_flying = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_in_low_flying", "In Low Flying", base.HEX, nil, 0x200, nil) + f.mbino_tapgo_status_push_running_delay = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_running_delay", "Running Delay", base.HEX, nil, 0x400, nil) + f.mbino_tapgo_status_push_in_pointing = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_in_pointing", "In Pointing", base.HEX, nil, 0x800, nil) + f.mbino_tapgo_status_push_terrian_follow = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_terrian_follow", "Terrian Follow", base.HEX, nil, 0x1000, nil) + f.mbino_tapgo_status_push_paused = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_paused", "Paused", base.HEX, nil, 0x2000, nil) + f.mbino_tapgo_status_push_front_image_over_exposure = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_front_image_over_exposure", "Front Image Over Exposure", base.HEX, nil, 0x10000, nil) + f.mbino_tapgo_status_push_front_image_under_exposure = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_front_image_under_exposure", "Front Image Under Exposure", base.HEX, nil, 0x20000, nil) + f.mbino_tapgo_status_push_front_image_diff = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_front_image_diff", "Front Image Diff", base.HEX, nil, 0x40000, nil) + f.mbino_tapgo_status_push_front_demark_error = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_front_demark_error", "Front Demark Error", base.HEX, nil, 0x80000, nil) + f.mbino_tapgo_status_push_non_in_flying = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_non_in_flying", "Non In Flying", base.HEX, nil, 0x100000, nil) + f.mbino_tapgo_status_push_had_tap_stop = ProtoField.uint24 ("dji_dumlv1.mbino_tapgo_status_push_had_tap_stop", "Had Tap Stop", base.HEX, nil, 0x200000, nil) +f.mbino_tapgo_status_push_axis_x = ProtoField.float ("dji_dumlv1.mbino_tapgo_status_push_axis_x", "Axis X", base.DEC) +f.mbino_tapgo_status_push_axis_y = ProtoField.float ("dji_dumlv1.mbino_tapgo_status_push_axis_y", "Axis Y", base.DEC) +f.mbino_tapgo_status_push_axis_z = ProtoField.float ("dji_dumlv1.mbino_tapgo_status_push_axis_z", "Axis Z", base.DEC) +f.mbino_tapgo_status_push_max_speed = ProtoField.uint16 ("dji_dumlv1.mbino_tapgo_status_push_max_speed", "Max Speed", base.HEX) +f.mbino_tapgo_status_push_session_id = ProtoField.uint16 ("dji_dumlv1.mbino_tapgo_status_push_session_id", "Session Id", base.HEX) +f.mbino_tapgo_status_push_tap_mode = ProtoField.uint8 ("dji_dumlv1.mbino_tapgo_status_push_tap_mode", "Tap Mode", base.HEX, enums.MBINO_TAPGO_STATUS_PUSH_TAP_MODE_ENUM, nil, nil) + +local function mbino_tapgo_status_push_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_tapgo_status_push_traget_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_tapgo_status_push_masked01, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_rc_not_in_f_mode, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_cant_detour, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_braked_by_collision, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_detour_up, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_detour_left, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_detour_right, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_stick_add, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_out_of_range, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_user_quick_pull_pitch, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_in_low_flying, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_running_delay, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_in_pointing, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_terrian_follow, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_paused, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_front_image_over_exposure, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_front_image_under_exposure, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_front_image_diff, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_front_demark_error, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_non_in_flying, payload(offset, 3)) + subtree:add_le (f.mbino_tapgo_status_push_had_tap_stop, payload(offset, 3)) + offset = offset + 3 + + subtree:add_le (f.mbino_tapgo_status_push_axis_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mbino_tapgo_status_push_axis_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mbino_tapgo_status_push_axis_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mbino_tapgo_status_push_max_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_tapgo_status_push_session_id, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_tapgo_status_push_tap_mode, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 21) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye TapGo Status Push: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye TapGo Status Push: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Com Status Update - 0x2a + +enums.MBINO_COM_STATUS_UPDATE_TRACK_EXCEPTION_STATUS_ENUM = { + [0x00] = 'NORMAL', + [0x01] = 'LOST_TIMEOUT', + [0x02] = 'INVALID_SPEED', + [0x03] = 'NONE_IMAGE', + [0x04] = 'LOW_FRAME', + [0x05] = 'NFZ', + [0x06] = 'RCCONN_TIMEOUT', + [0x07] = 'APPCONN_TIMEOUT', + [0x09] = 'LOST_CONTROL', + [0x64] = 'OTHER', +} + +enums.MBINO_COM_STATUS_UPDATE_ADVANCE_GO_HOME_STATE_ENUM = { + [0x00] = 'NO_ACTION', + [0x01] = 'TURNING_YAW', + [0x02] = 'EXECUTING_GO_HOME', + [0x03] = 'HOVERING_AT_SAFE_POINT', + [0x04] = 'PLANING', + [0x64] = 'OTHER', +} + +enums.MBINO_COM_STATUS_UPDATE_ADVANCE_GO_HOME_STRATEGY_ENUM = { + [0x00] = 'NO_STRATEGY', + [0x01] = 'SAFE_STRATEGY', + [0x02] = 'EXPLORE_STRATEGY', + [0x64] = 'OTHER', +} + +enums.MBINO_COM_STATUS_UPDATE_PRECISE_LANDING_STATE_ENUM = { + [0x00] = 'NO_ACTION', + [0x01] = 'TURNING_YAW', + [0x02] = 'LANDING', + [0x64] = 'OTHER', +} + +f.mbino_com_status_update_masked00 = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_masked00", "Masked00", base.HEX) + f.mbino_com_status_update_track_system_abnormal = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_track_system_abnormal", "Track System Abnormal", base.HEX, nil, 0x01, nil) + f.mbino_com_status_update_point_system_abnormal = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_point_system_abnormal", "Point System Abnormal", base.HEX, nil, 0x02, nil) + f.mbino_com_status_update_disparity_pack_lost = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_disparity_pack_lost", "Disparity Pack Lost", base.HEX, nil, 0x04, nil) + f.mbino_com_status_update_imu_pack_lost = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_imu_pack_lost", "Imu Pack Lost", base.HEX, nil, 0x08, nil) + f.mbino_com_status_update_gimbal_pack_lost = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_gimbal_pack_lost", "Gimbal Pack Lost", base.HEX, nil, 0x10, nil) + f.mbino_com_status_update_rc_pack_lost = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_rc_pack_lost", "Rc Pack Lost", base.HEX, nil, 0x20, nil) + f.mbino_com_status_update_visual_data_abnormal = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_visual_data_abnormal", "Visual Data Abnormal", base.HEX, nil, 0x40, nil) + f.mbino_com_status_update_fron_image_over_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_fron_image_over_exposure", "Fron Image Over Exposure", base.HEX, nil, 0x100, nil) + f.mbino_com_status_update_fron_image_under_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_fron_image_under_exposure", "Fron Image Under Exposure", base.HEX, nil, 0x200, nil) + f.mbino_com_status_update_front_image_diff = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_front_image_diff", "Front Image Diff", base.HEX, nil, 0x400, nil) + f.mbino_com_status_update_front_sensor_demark_abnormal = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_front_sensor_demark_abnormal", "Front Sensor Demark Abnormal", base.HEX, nil, 0x800, nil) + f.mbino_com_status_update_non_flying = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_non_flying", "Non Flying", base.HEX, nil, 0x1000, nil) + f.mbino_com_status_update_user_tap_stop = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_user_tap_stop", "User Tap Stop", base.HEX, nil, 0x2000, nil) + f.mbino_com_status_update_tripod_folded = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_tripod_folded", "Tripod Folded", base.HEX, nil, 0x4000, nil) +f.mbino_com_status_update_masked02 = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_masked02", "Masked02", base.HEX) + f.mbino_com_status_update_rc_disconnect = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_rc_disconnect", "Rc Disconnect", base.HEX, nil, 0x1, nil) + f.mbino_com_status_update_app_disconnect = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_app_disconnect", "App Disconnect", base.HEX, nil, 0x2, nil) + f.mbino_com_status_update_out_of_control = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_out_of_control", "Out Of Control", base.HEX, nil, 0x4, nil) + f.mbino_com_status_update_in_non_fly_zone = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_in_non_fly_zone", "In Non Fly Zone", base.HEX, nil, 0x8, nil) + f.mbino_com_status_update_fusion_data_abnormal = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_fusion_data_abnormal", "Fusion Data Abnormal", base.HEX, nil, 0x10, nil) +f.mbino_com_status_update_masked03 = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_masked03", "Masked03", base.HEX) + f.mbino_com_status_update_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_in_tracking", "In Tracking", base.HEX, nil, 0x01, nil) + f.mbino_com_status_update_in_tap_fly = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_in_tap_fly", "In Tap Fly", base.HEX, nil, 0x02, nil) + f.mbino_com_status_update_in_advance_homing = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_in_advance_homing", "In Advance Homing", base.HEX, nil, 0x04, nil) + f.mbino_com_status_update_in_precise_landing = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_in_precise_landing", "In Precise Landing", base.HEX, nil, 0x08, nil) + f.mbino_com_status_update_face_detect_enable = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_face_detect_enable", "Face Detect Enable", base.HEX, nil, 0x10, nil) + f.mbino_com_status_update_moving_object_detect_enable = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_moving_object_detect_enable", "Moving Object Detect Enable", base.HEX, nil, 0x20, nil) + f.mbino_com_status_update_gps_tracking_enable = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_gps_tracking_enable", "Gps Tracking Enable", base.HEX, nil, 0x40, nil) +f.mbino_com_status_update_masked04 = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_masked04", "Masked04", base.HEX) + -- Not sure how to choose between this and alternate content + f.mbino_com_status_update_gps_error = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_gps_error", "Gps Error", base.HEX, nil, 0x01, nil) + f.mbino_com_status_update_front_visoin_error = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_front_visoin_error", "Front Visoin Error", base.HEX, nil, 0x02, nil) + f.mbino_com_status_update_advance_go_home_state = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_advance_go_home_state", "Advance Go Home State", base.HEX, enums.MBINO_COM_STATUS_UPDATE_ADVANCE_GO_HOME_STATE_ENUM, 0x1c, nil) + f.mbino_com_status_update_advance_go_home_strategy = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_advance_go_home_strategy", "Advance Go Home Strategy", base.HEX, enums.MBINO_COM_STATUS_UPDATE_ADVANCE_GO_HOME_STRATEGY_ENUM, 0x60, nil) + -- Alternate content of the masked04 field + f.mbino_com_status_update_track_status = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_track_status", "Track Status", base.HEX, enums.MBINO_COM_STATUS_UPDATE_TRACK_EXCEPTION_STATUS_ENUM, 0x0f, nil) + f.mbino_com_status_update_aircraft_gps_abnormal = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_aircraft_gps_abnormal", "Aircraft Gps Abnormal", base.HEX, nil, 0x10, nil) + f.mbino_com_status_update_phone_gps_abnormal = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_phone_gps_abnormal", "Phone Gps Abnormal", base.HEX, nil, 0x20, nil) + f.mbino_com_status_update_gps_tracking_flusion_abnormal = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_gps_tracking_flusion_abnormal", "Gps Tracking Flusion Abnormal", base.HEX, nil, 0x40, nil) +f.mbino_com_status_update_masked05 = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_masked05", "Masked05", base.HEX) + f.mbino_com_status_update_avoid_ok_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_avoid_ok_in_tracking", "Avoid Ok In Tracking", base.HEX, nil, 0x01, nil) + f.mbino_com_status_update_cant_detour_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_cant_detour_in_tracking", "Cant Detour In Tracking", base.HEX, nil, 0x02, nil) + f.mbino_com_status_update_decelerating_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_decelerating_in_tracking", "Decelerating In Tracking", base.HEX, nil, 0x04, nil) + f.mbino_com_status_update_braked_by_collision_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_braked_by_collision_in_tracking", "Braked By Collision In Tracking", base.HEX, nil, 0x08, nil) + f.mbino_com_status_update_detour_up_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_detour_up_in_tracking", "Detour Up In Tracking", base.HEX, nil, 0x10, nil) + f.mbino_com_status_update_detour_down_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_detour_down_in_tracking", "Detour Down In Tracking", base.HEX, nil, 0x20, nil) + f.mbino_com_status_update_detour_left_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_detour_left_in_tracking", "Detour Left In Tracking", base.HEX, nil, 0x40, nil) + f.mbino_com_status_update_detour_right_in_tracking = ProtoField.uint8 ("dji_dumlv1.mbino_com_status_update_detour_right_in_tracking", "Detour Right In Tracking", base.HEX, nil, 0x80, nil) +f.mbino_com_status_update_masked06 = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_masked06", "Masked06", base.HEX) + -- Not sure how to choose between this and alternate content (again) + f.mbino_com_status_update_effected_by_obstacle = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_effected_by_obstacle", "Effected By Obstacle", base.HEX, nil, 0x01, nil) + f.mbino_com_status_update_cant_detour = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_cant_detour", "Cant Detour", base.HEX, nil, 0x02, nil) + f.mbino_com_status_update_braked_by_collision = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_braked_by_collision", "Braked By Collision", base.HEX, nil, 0x04, nil) + f.mbino_com_status_update_detour_up = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_detour_up", "Detour Up", base.HEX, nil, 0x08, nil) + f.mbino_com_status_update_detour_left = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_detour_left", "Detour Left", base.HEX, nil, 0x10, nil) + f.mbino_com_status_update_detour_right = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_detour_right", "Detour Right", base.HEX, nil, 0x20, nil) + f.mbino_com_status_update_stick_add = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_stick_add", "Stick Add", base.HEX, nil, 0x40, nil) + f.mbino_com_status_update_out_of_range = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_out_of_range", "Out Of Range", base.HEX, nil, 0x80, nil) + -- Alternate content of the masked04 field + f.mbino_com_status_update_rc_not_in_f_mode = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_rc_not_in_f_mode", "Rc Not In F Mode", base.HEX, nil, 0x01, nil) + f.mbino_com_status_update_precise_landing_state = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_precise_landing_state", "Precise Landing State", base.HEX, enums.MBINO_COM_STATUS_UPDATE_PRECISE_LANDING_STATE_ENUM, 0x06, nil) + f.mbino_com_status_update_adjusting_precise_landing = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_adjusting_precise_landing", "Adjusting Precise Landing", base.HEX, nil, 0x08, nil) + f.mbino_com_status_update_executing_precise_landing = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_executing_precise_landing", "Executing Precise Landing", base.HEX, nil, 0x10, nil) + -- Back to one path + f.mbino_com_status_update_user_quick_pull_pitch = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_user_quick_pull_pitch", "User Quick Pull Pitch", base.HEX, nil, 0x100, nil) + f.mbino_com_status_update_in_low_flying = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_in_low_flying", "In Low Flying", base.HEX, nil, 0x200, nil) + f.mbino_com_status_update_running_delay = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_running_delay", "Running Delay", base.HEX, nil, 0x400, nil) + f.mbino_com_status_update_in_pointing = ProtoField.uint16 ("dji_dumlv1.mbino_com_status_update_in_pointing", "In Pointing", base.HEX, nil, 0x800, nil) +f.mbino_com_status_update_vision_version = ProtoField.uint32 ("dji_dumlv1.mbino_com_status_update_vision_version", "Vision Version", base.HEX) + +local function mbino_com_status_update_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_com_status_update_masked00, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_track_system_abnormal, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_point_system_abnormal, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_disparity_pack_lost, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_imu_pack_lost, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_gimbal_pack_lost, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_rc_pack_lost, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_visual_data_abnormal, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_fron_image_over_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_fron_image_under_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_front_image_diff, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_front_sensor_demark_abnormal, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_non_flying, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_user_tap_stop, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_tripod_folded, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_com_status_update_masked02, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_rc_disconnect, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_app_disconnect, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_out_of_control, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_in_non_fly_zone, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_fusion_data_abnormal, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_com_status_update_masked03, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_in_tracking, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_in_tap_fly, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_in_advance_homing, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_in_precise_landing, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_face_detect_enable, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_moving_object_detect_enable, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_gps_tracking_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_com_status_update_masked04, payload(offset, 1)) + if (true) then -- it is not known what the condition should be + subtree:add_le (f.mbino_com_status_update_gps_error, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_front_visoin_error, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_advance_go_home_state, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_advance_go_home_strategy, payload(offset, 1)) + else + subtree:add_le (f.mbino_com_status_update_track_status, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_aircraft_gps_abnormal, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_phone_gps_abnormal, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_gps_tracking_flusion_abnormal, payload(offset, 1)) + end + offset = offset + 1 + + subtree:add_le (f.mbino_com_status_update_masked05, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_avoid_ok_in_tracking, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_cant_detour_in_tracking, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_decelerating_in_tracking, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_braked_by_collision_in_tracking, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_detour_up_in_tracking, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_detour_down_in_tracking, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_detour_left_in_tracking, payload(offset, 1)) + subtree:add_le (f.mbino_com_status_update_detour_right_in_tracking, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_com_status_update_masked06, payload(offset, 2)) + if (true) then -- it is not known what the condition should be + subtree:add_le (f.mbino_com_status_update_effected_by_obstacle, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_cant_detour, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_braked_by_collision, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_detour_up, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_detour_left, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_detour_right, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_stick_add, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_out_of_range, payload(offset, 2)) + else + subtree:add_le (f.mbino_com_status_update_rc_not_in_f_mode, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_precise_landing_state, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_adjusting_precise_landing, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_executing_precise_landing, payload(offset, 2)) + end + subtree:add_le (f.mbino_com_status_update_user_quick_pull_pitch, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_in_low_flying, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_running_delay, payload(offset, 2)) + subtree:add_le (f.mbino_com_status_update_in_pointing, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_com_status_update_vision_version, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Com Status Update: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Com Status Update: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Function List Push - 0x2e + +f.mbino_function_list_tink_count = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_tink_count", "Tink Count", base.HEX) +f.mbino_function_list_masked01 = ProtoField.uint32 ("dji_dumlv1.mbino_function_list_masked01", "Masked01", base.HEX) + f.mbino_function_list_support_self_cal = ProtoField.uint32 ("dji_dumlv1.mbino_function_list_support_self_cal", "Support Self Cal", base.HEX, nil, 0x01, nil) + f.mbino_function_list_sensor_status_source = ProtoField.uint32 ("dji_dumlv1.mbino_function_list_sensor_status_source", "Sensor Status Source", base.HEX, nil, 0x02, nil) +f.mbino_function_list_front_disable = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_front_disable", "Front Disable", base.HEX) + f.mbino_function_list_front_disable_when_auto_landing = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_front_disable_when_auto_landing", "Front Disable When Auto Landing", base.HEX, nil, 0x01, nil) + f.mbino_function_list_front_disable_by_tripod = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_front_disable_by_tripod", "Front Disable By Tripod", base.HEX, nil, 0x02, nil) + f.mbino_function_list_front_disable_by_switch_sensor = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_front_disable_by_switch_sensor", "Front Disable By Switch Sensor", base.HEX, nil, 0x04, nil) + f.mbino_function_list_front_atti_too_large = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_front_atti_too_large", "Front Atti Too Large", base.HEX, nil, 0x08, nil) +f.mbino_function_list_back_disable = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_back_disable", "Back Disable", base.HEX) + f.mbino_function_list_back_disable_when_auto_landing = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_back_disable_when_auto_landing", "Back Disable When Auto Landing", base.HEX, nil, 0x01, nil) + f.mbino_function_list_back_disable_by_tripod = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_back_disable_by_tripod", "Back Disable By Tripod", base.HEX, nil, 0x02, nil) + f.mbino_function_list_back_disable_by_switch_sensor = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_back_disable_by_switch_sensor", "Back Disable By Switch Sensor", base.HEX, nil, 0x04, nil) + f.mbino_function_list_back_atti_too_large = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_back_atti_too_large", "Back Atti Too Large", base.HEX, nil, 0x08, nil) +f.mbino_function_list_right_disable = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_right_disable", "Right Disable", base.HEX) + f.mbino_function_list_right_disable_when_auto_landing = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_right_disable_when_auto_landing", "Right Disable When Auto Landing", base.HEX, nil, 0x01, nil) + f.mbino_function_list_right_disable_by_tripod = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_right_disable_by_tripod", "Right Disable By Tripod", base.HEX, nil, 0x02, nil) + f.mbino_function_list_right_atti_too_large = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_right_atti_too_large", "Right Atti Too Large", base.HEX, nil, 0x08, nil) +f.mbino_function_list_left_disable = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_left_disable", "Left Disable", base.HEX) + f.mbino_function_list_left_disable_when_auto_landing = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_left_disable_when_auto_landing", "Left Disable When Auto Landing", base.HEX, nil, 0x01, nil) + f.mbino_function_list_left_disable_by_tripod = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_left_disable_by_tripod", "Left Disable By Tripod", base.HEX, nil, 0x02, nil) + f.mbino_function_list_left_atti_too_large = ProtoField.uint8 ("dji_dumlv1.mbino_function_list_left_atti_too_large", "Left Atti Too Large", base.HEX, nil, 0x08, nil) + +local function mbino_function_list_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_function_list_tink_count, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_function_list_masked01, payload(offset, 4)) + subtree:add_le (f.mbino_function_list_support_self_cal, payload(offset, 4)) + subtree:add_le (f.mbino_function_list_sensor_status_source, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mbino_function_list_front_disable, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_front_disable_when_auto_landing, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_front_disable_by_tripod, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_front_disable_by_switch_sensor, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_front_atti_too_large, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_function_list_back_disable, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_back_disable_when_auto_landing, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_back_disable_by_tripod, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_back_disable_by_switch_sensor, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_back_atti_too_large, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_function_list_right_disable, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_right_disable_when_auto_landing, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_right_disable_by_tripod, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_right_atti_too_large, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_function_list_left_disable, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_left_disable_when_auto_landing, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_left_disable_by_tripod, payload(offset, 1)) + subtree:add_le (f.mbino_function_list_left_atti_too_large, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 9) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Function List Push: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Function List Push: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Sensor Status Push - 0x2f + +f.mbino_sensor_status_push_cnt_index = ProtoField.uint8 ("dji_dumlv1.mbino_sensor_status_push_cnt_index", "Cnt Index", base.HEX) +f.mbino_sensor_status_push_masked01 = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_masked01", "Masked01", base.HEX) + f.mbino_sensor_status_push_bottom_image_exposure_too_long = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_bottom_image_exposure_too_long", "Bottom Image Exposure Too Long", base.HEX, nil, 0x08, nil) + f.mbino_sensor_status_push_bottom_image_diff = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_bottom_image_diff", "Bottom Image Diff", base.HEX, nil, 0x10, nil) + f.mbino_sensor_status_push_bottom_under_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_bottom_under_exposure", "Bottom Under Exposure", base.HEX, nil, 0x20, nil) + f.mbino_sensor_status_push_bottom_over_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_bottom_over_exposure", "Bottom Over Exposure", base.HEX, nil, 0x40, nil) + f.mbino_sensor_status_push_bottom_image_exception = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_bottom_image_exception", "Bottom Image Exception", base.HEX, nil, 0x80, nil) +f.mbino_sensor_status_push_masked03 = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_masked03", "Masked03", base.HEX) + f.mbino_sensor_status_push_front_image_exposure_too_long = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_front_image_exposure_too_long", "Front Image Exposure Too Long", base.HEX, nil, 0x08, nil) + f.mbino_sensor_status_push_front_image_diff = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_front_image_diff", "Front Image Diff", base.HEX, nil, 0x10, nil) + f.mbino_sensor_status_push_front_under_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_front_under_exposure", "Front Under Exposure", base.HEX, nil, 0x20, nil) + f.mbino_sensor_status_push_front_over_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_front_over_exposure", "Front Over Exposure", base.HEX, nil, 0x40, nil) + f.mbino_sensor_status_push_front_image_exception = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_front_image_exception", "Front Image Exception", base.HEX, nil, 0x80, nil) +f.mbino_sensor_status_push_masked05 = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_masked05", "Masked05", base.HEX) + f.mbino_sensor_status_push_back_image_exposure_too_long = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_back_image_exposure_too_long", "Back Image Exposure Too Long", base.HEX, nil, 0x08, nil) + f.mbino_sensor_status_push_back_image_diff = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_back_image_diff", "Back Image Diff", base.HEX, nil, 0x10, nil) + f.mbino_sensor_status_push_back_under_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_back_under_exposure", "Back Under Exposure", base.HEX, nil, 0x20, nil) + f.mbino_sensor_status_push_back_over_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_back_over_exposure", "Back Over Exposure", base.HEX, nil, 0x40, nil) + f.mbino_sensor_status_push_back_image_exception = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_back_image_exception", "Back Image Exception", base.HEX, nil, 0x80, nil) +f.mbino_sensor_status_push_masked07 = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_masked07", "Masked07", base.HEX) + f.mbino_sensor_status_push_right3_dtof_abnormal = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_right3_dtof_abnormal", "Right3 Dtof Abnormal", base.HEX, nil, 0x01, nil) + f.mbino_sensor_status_push_right_image_exposure_too_long = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_right_image_exposure_too_long", "Right Image Exposure Too Long", base.HEX, nil, 0x08, nil) + f.mbino_sensor_status_push_right_image_diff = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_right_image_diff", "Right Image Diff", base.HEX, nil, 0x10, nil) + f.mbino_sensor_status_push_right_under_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_right_under_exposure", "Right Under Exposure", base.HEX, nil, 0x20, nil) + f.mbino_sensor_status_push_right_over_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_right_over_exposure", "Right Over Exposure", base.HEX, nil, 0x40, nil) + f.mbino_sensor_status_push_right_image_exception = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_right_image_exception", "Right Image Exception", base.HEX, nil, 0x80, nil) +f.mbino_sensor_status_push_masked09 = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_masked09", "Masked09", base.HEX) + f.mbino_sensor_status_push_left3_dtof_abnormal = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_left3_dtof_abnormal", "Left3 Dtof Abnormal", base.HEX, nil, 0x01, nil) + f.mbino_sensor_status_push_left_image_exposure_too_long = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_left_image_exposure_too_long", "Left Image Exposure Too Long", base.HEX, nil, 0x08, nil) + f.mbino_sensor_status_push_left_image_diff = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_left_image_diff", "Left Image Diff", base.HEX, nil, 0x10, nil) + f.mbino_sensor_status_push_left_under_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_left_under_exposure", "Left Under Exposure", base.HEX, nil, 0x20, nil) + f.mbino_sensor_status_push_left_over_exposure = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_left_over_exposure", "Left Over Exposure", base.HEX, nil, 0x40, nil) + f.mbino_sensor_status_push_left_image_exception = ProtoField.uint16 ("dji_dumlv1.mbino_sensor_status_push_left_image_exception", "Left Image Exception", base.HEX, nil, 0x80, nil) + +local function mbino_sensor_status_push_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_sensor_status_push_cnt_index, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_sensor_status_push_masked01, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_bottom_image_exposure_too_long, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_bottom_image_diff, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_bottom_under_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_bottom_over_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_bottom_image_exception, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_sensor_status_push_masked03, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_front_image_exposure_too_long, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_front_image_diff, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_front_under_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_front_over_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_front_image_exception, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_sensor_status_push_masked05, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_back_image_exposure_too_long, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_back_image_diff, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_back_under_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_back_over_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_back_image_exception, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_sensor_status_push_masked07, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_right3_dtof_abnormal, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_right_image_exposure_too_long, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_right_image_diff, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_right_under_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_right_over_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_right_image_exception, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mbino_sensor_status_push_masked09, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_left3_dtof_abnormal, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_left_image_exposure_too_long, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_left_image_diff, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_left_under_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_left_over_exposure, payload(offset, 2)) + subtree:add_le (f.mbino_sensor_status_push_left_image_exception, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 11) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Sensor Status Push: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Sensor Status Push: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Easy Self Calib State - 0x32 + +enums.MBINO_EASY_SELF_CALIB_STATE_VISION_SENSOR_TYPE_ENUM = { + [0x00] = 'None', + [0x01] = 'Bottom', + [0x02] = 'Forward', + [0x03] = 'Right', + [0x04] = 'Backward', + [0x05] = 'Left', + [0x06] = 'Top', + [0x64] = 'OTHER', +} + +f.mbino_easy_self_calib_state_tink_count = ProtoField.uint8 ("dji_dumlv1.mbino_easy_self_calib_state_tink_count", "Tink Count", base.HEX) +f.mbino_easy_self_calib_state_unknown01 = ProtoField.uint8 ("dji_dumlv1.mbino_easy_self_calib_state_unknown01", "Unknown01", base.HEX) +f.mbino_easy_self_calib_state_sensor_type = ProtoField.uint8 ("dji_dumlv1.mbino_easy_self_calib_state_sensor_type", "Sensor Type", base.HEX, enums.MBINO_EASY_SELF_CALIB_STATE_VISION_SENSOR_TYPE_ENUM, nil, nil) + +local function mbino_easy_self_calib_state_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_easy_self_calib_state_tink_count, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_easy_self_calib_state_unknown01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_easy_self_calib_state_sensor_type, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 3) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Easy Self Calib State: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Easy Self Calib State: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Vision Tip - 0x39 + +enums.MBINO_VISION_TIP_B_TRACKING_TIP_TYPE_ENUM = { + [0x00] = 'a', + [0x01] = 'b', + [0x02] = 'c', + [0x03] = 'd', + [0x04] = 'e', + [0x05] = 'f', + [0x06] = 'g', +} + +f.mbino_vision_tip_a = ProtoField.uint8 ("dji_dumlv1.mbino_vision_tip_a", "A", base.HEX) +f.mbino_vision_tip_b = ProtoField.uint8 ("dji_dumlv1.mbino_vision_tip_b", "B", base.HEX, enums.MBINO_VISION_TIP_B_TRACKING_TIP_TYPE_ENUM, nil, nil) +f.mbino_vision_tip_c = ProtoField.uint8 ("dji_dumlv1.mbino_vision_tip_c", "C", base.HEX) +f.mbino_vision_tip_d = ProtoField.uint8 ("dji_dumlv1.mbino_vision_tip_d", "D", base.HEX) + +local function mbino_vision_tip_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_vision_tip_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_vision_tip_b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_vision_tip_c, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mbino_vision_tip_d, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Vision Tip: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Vision Tip: Payload size different than expected") end +end + +-- Mono/Binocular - Eye Precise Landing Energy - 0x3a + +f.mbino_precise_landing_energy_enery = ProtoField.uint8 ("dji_dumlv1.mbino_precise_landing_energy_enery", "Enery", base.HEX) + +local function mbino_precise_landing_energy_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.mbino_precise_landing_energy_enery, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Eye Precise Landing Energy: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Eye Precise Landing Energy: Payload size different than expected") end +end + +local MBINO_UART_CMD_DISSECT = { + [0x01] = mbino_bino_info_dissector, + [0x06] = mbino_avoidance_param_dissector, + [0x07] = mbino_obstacle_info_dissector, + [0x08] = mbino_tapgo_obst_avo_info_dissector, + [0x0d] = mbino_track_log_dissector, + [0x0e] = mbino_point_log_dissector, + [0x19] = mbino_flat_check_dissector, + [0x23] = mbino_tracking_status_push_dissector, + [0x26] = mbino_tapgo_status_push_dissector, + [0x2a] = mbino_com_status_update_dissector, + [0x2e] = mbino_function_list_dissector, + [0x2f] = mbino_sensor_status_push_dissector, + [0x32] = mbino_easy_self_calib_state_dissector, + [0x39] = mbino_vision_tip_dissector, + [0x3a] = mbino_precise_landing_energy_dissector, +} + +-- Simulation - Simu Connect Heart Packet - 0x01 + +f.sim_connect_heart_packet_unknown00 = ProtoField.uint8 ("dji_dumlv1.sim_connect_heart_packet_unknown00", "Unknown00", base.HEX) +f.sim_connect_heart_packet_result = ProtoField.uint8 ("dji_dumlv1.sim_connect_heart_packet_result", "Result", base.HEX) + +local function sim_connect_heart_packet_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.sim_connect_heart_packet_unknown00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sim_connect_heart_packet_result, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simu Connect Heart Packet: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simu Connect Heart Packet: Payload size different than expected") end +end + +-- Simulation - Simu SDR Status Push - 0x03 + +f.sim_sdr_status_push_drone_type = ProtoField.uint8 ("dji_dumlv1.sim_sdr_status_push_drone_type", "Drone Type", base.HEX) + +local function sim_sdr_status_push_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.sim_sdr_status_push_drone_type, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 1) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simu SDR Status Push: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simu SDR Status Push: Payload size different than expected") end +end + +-- Simulation - Simu Flight Status Params - 0x06 + +f.sim_flight_status_params_length = ProtoField.uint8 ("dji_dumlv1.sim_flight_status_params_length", "Length", base.HEX) +f.sim_flight_status_params_masked01 = ProtoField.uint8 ("dji_dumlv1.sim_flight_status_params_masked01", "Masked01", base.HEX) + f.sim_flight_status_params_has_motor_turned_on = ProtoField.uint8 ("dji_dumlv1.sim_flight_status_params_has_motor_turned_on", "Has Motor Turned On", base.HEX, nil, 0x01, nil) + f.sim_flight_status_params_in_the_air = ProtoField.uint8 ("dji_dumlv1.sim_flight_status_params_in_the_air", "In The Air", base.HEX, nil, 0x02, nil) + +local function sim_flight_status_params_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.sim_flight_status_params_length, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sim_flight_status_params_masked01, payload(offset, 1)) + subtree:add_le (f.sim_flight_status_params_has_motor_turned_on, payload(offset, 1)) + subtree:add_le (f.sim_flight_status_params_in_the_air, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simu Flight Status Params: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simu Flight Status Params: Payload size different than expected") end +end + +-- Simulation - Simu Wind - 0x07 + +f.sim_wind_wind_speed_x = ProtoField.uint16 ("dji_dumlv1.sim_wind_wind_speed_x", "Wind Speed X", base.HEX) +f.sim_wind_wind_speed_y = ProtoField.uint16 ("dji_dumlv1.sim_wind_wind_speed_y", "Wind Speed Y", base.HEX) + +local function sim_wind_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.sim_wind_wind_speed_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.sim_wind_wind_speed_y, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simu Wind: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simu Wind: Payload size different than expected") end +end + +local SIM_UART_CMD_DISSECT = { + [0x01] = sim_connect_heart_packet_dissector, + [0x03] = sim_sdr_status_push_dissector, + [0x06] = sim_flight_status_params_dissector, + [0x07] = sim_wind_dissector, +} + +local ESC_UART_CMD_DISSECT = { +} + +-- Battery - Battery Static Data - 0x01 + +f.battery_static_data_unk1 = ProtoField.bytes ("dji_dumlv1.battery_static_data_unknown1", "Unknown", base.SPACE) +f.battery_static_data_design_capacity = ProtoField.uint32 ("dji_dumlv1.battery_static_data_design_capacity", "Design Capacity [mAh]", base.DEC) +f.battery_static_data_discharge_count = ProtoField.uint16 ("dji_dumlv1.battery_static_data_discharge_count", "Discharge Count", base.DEC) +f.battery_static_data_design_voltage = ProtoField.uint32 ("dji_dumlv1.battery_static_data_design_voltage", "Design Voltage [mV]", base.DEC) +f.battery_static_data_manufacture_date = ProtoField.uint16 ("dji_dumlv1.battery_static_data_manufacture_date", "Manufacture Date (packed)", base.BIN) +f.battery_static_data_serial_number = ProtoField.uint16 ("dji_dumlv1.battery_static_data_serial_number", "Serial Number", base.DEC) +f.battery_static_data_manufacturer_name = ProtoField.string ("dji_dumlv1.battery_static_data_manufacturer_name", "Manufacturer Name", base.ASCII) +f.battery_static_data_unk2 = ProtoField.bytes ("dji_dumlv1.battery_static_data_unknown2", "Unknown", base.SPACE) +f.battery_static_data_device_name = ProtoField.string ("dji_dumlv1.battery_static_data_device_name", "Device Name", base.ASCII) +f.battery_static_data_loader_version = ProtoField.string ("dji_dumlv1.battery_static_data_loader_version", "Loader Version", base.ASCII) +f.battery_static_data_app_version = ProtoField.string ("dji_dumlv1.battery_static_data_firmware_version", "App Version", base.ASCII) +f.battery_static_data_state_of_health = ProtoField.uint8 ("dji_dumlv1.battery_static_data_state_of_health", "State of Health (%)", base.DEC) + +local function battery_static_data_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (payload:len() >= 40) then -- full packet + subtree:add (f.battery_static_data_unk1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_static_data_design_capacity, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_static_data_discharge_count, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_static_data_design_voltage, payload(offset, 4)) + offset = offset + 4 + + local manufacture_date = payload(offset, 2):le_uint() + offset = offset + 2 + + local manufacture_date_day = bit.band(manufacture_date, 0x001F) + manufacture_date = bit.rshift(manufacture_date, 5) + local manufacture_date_month = bit.band(manufacture_date, 0x000F) + manufacture_date = bit.rshift(manufacture_date, 4) + local manufacture_date_year = bit.band(manufacture_date, 0x007F) + 1980 + + local manufacture_date_str = string.format("Manufacture Date: %d-%02d-%02d", manufacture_date_year, manufacture_date_month, manufacture_date_day) + subtree:add (f.battery_static_data_manufacture_date, payload(offset-2, 2), 0, manufacture_date_str) + + subtree:add_le (f.battery_static_data_serial_number, payload(offset, 2)) + offset = offset + 2 + + subtree:add (f.battery_static_data_manufacturer_name, payload(offset, 8)) + offset = offset + 8 + + subtree:add (f.battery_static_data_unk2, payload(offset, 2)) + offset = offset + 2 + + subtree:add (f.battery_static_data_device_name, payload(offset, 5)) + offset = offset + 5 + + local loader_version = string.format("%02d.%02d.%02d.%02d", payload(offset+3,1):uint(), payload(offset+2,1):uint(), payload(offset+1,1):uint(), payload(offset,1):uint()) + subtree:add(f.battery_static_data_loader_version, loader_version) + offset = offset + 4 + + local app_version = string.format("%02d.%02d.%02d.%02d", payload(offset+3,1):uint(), payload(offset+2,1):uint(), payload(offset+1,1):uint(), payload(offset,1):uint()) + subtree:add(f.battery_static_data_app_version, app_version) + offset = offset + 4 + + subtree:add_le (f.battery_static_data_state_of_health, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Static Data: Offset does not match - internal inconsistency") end + else -- status only + + + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Static Data: Payload size different than expected") end +end + +-- Battery - Battery Dynamic Data - 0x02 + +f.battery_dynamic_data_index = ProtoField.uint8 ("dji_dumlv1.battery_dynamic_data_index", "Index", base.HEX, nil, nil, "Offset shifted by unknown value this.dataOffset") + f.battery_dynamic_data_result = ProtoField.uint8 ("dji_dumlv1.battery_dynamic_data_result", "Result", base.HEX, nil, 0xff, nil) +f.battery_dynamic_data_unk1 = ProtoField.bytes ("dji_dumlv1.battery_dynamic_data_unknown1", "Unknown", base.SPACE) +f.battery_dynamic_data_voltage = ProtoField.uint32 ("dji_dumlv1.battery_dynamic_data_voltage", "Pack Voltage [mV]", base.DEC, nil, nil, "Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_current = ProtoField.int32 ("dji_dumlv1.battery_dynamic_data_current", "Current [mA]", base.DEC, nil, nil, "Signed; Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_full_capacity = ProtoField.uint32 ("dji_dumlv1.battery_dynamic_data_full_capacity", "Full Charge Capacity [mAh]", base.DEC, nil, nil, "Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_remain_capacity = ProtoField.uint32 ("dji_dumlv1.battery_dynamic_data_remain_capacity", "Current Remain Capacity [mAh]", base.DEC, nil, nil, "Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_temperature = ProtoField.uint16 ("dji_dumlv1.battery_dynamic_data_temperature", "Temperature", base.DEC, nil, nil, "Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_cell_size = ProtoField.uint8 ("dji_dumlv1.battery_dynamic_data_cell_size", "Cell Size", base.DEC, nil, nil, "Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_state_of_charge = ProtoField.uint8 ("dji_dumlv1.battery_dynamic_data_state_of_charge", "Relative Capacity / State of Charge [%]", base.DEC, nil, nil, "Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_status = ProtoField.uint64 ("dji_dumlv1.battery_dynamic_data_status", "Status", base.HEX, nil, nil, "Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_version = ProtoField.uint8 ("dji_dumlv1.battery_dynamic_data_version", "Version", base.HEX, nil, nil, "Offset shifted by unknown value this.dataOffset") +f.battery_dynamic_data_unk2 = ProtoField.bytes ("dji_dumlv1.battery_dynamic_data_unknown2", "Unknown", base.SPACE) + +local function battery_dynamic_data_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (payload:len() >= 30) then -- full packet + + if (payload:len() == 32) then -- Two bytes before voltage; is this real? on which platform? this shifts all later fields. + subtree:add (f.battery_dynamic_data_unk1, payload(offset, 2)) + offset = offset + 2 + else -- One byte before voltage; seen in the capture "Startup-FCCswitch" where payload len is 38, origin unknown + subtree:add_le (f.battery_dynamic_data_index, payload(offset, 1)) + subtree:add_le (f.battery_dynamic_data_result, payload(offset, 1)) + offset = offset + 1 + end + + subtree:add_le (f.battery_dynamic_data_voltage, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_dynamic_data_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_dynamic_data_full_capacity, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_dynamic_data_remain_capacity, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_dynamic_data_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_dynamic_data_cell_size, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_dynamic_data_state_of_charge, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_dynamic_data_status, payload(offset, 8)) + offset = offset + 8 + + if (payload:len() >= 37) then -- seen in the capture "Startup-FCCswitch" + subtree:add (f.battery_dynamic_data_unk2, payload(offset, 9)) + offset = offset + 9 + elseif (payload:len() >= 31) then + subtree:add (f.battery_dynamic_data_unk2, payload(offset, 2)) + offset = offset + 2 + else + subtree:add_le (f.battery_dynamic_data_version, payload(offset, 1)) + offset = offset + 1 + end + + if (offset ~= 30) and (offset ~= 31) and (offset ~= 32) and (offset ~= 38) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Dynamic Data: Offset does not match - internal inconsistency") end + else -- status only + + if (payload:len() >= 2) then + subtree:add (f.battery_dynamic_data_unk1, payload(offset, 2)) + offset = offset + 2 + else + subtree:add_le (f.battery_dynamic_data_index, payload(offset, 1)) + subtree:add_le (f.battery_dynamic_data_result, payload(offset, 1)) + offset = offset + 1 + end + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Dynamic Data: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Dynamic Data: Payload size different than expected") end +end + +-- Battery - Battery Cell Voltage - 0x03 + +f.battery_cell_voltage_index = ProtoField.uint8 ("dji_dumlv1.battery_cell_voltage_index", "Index", base.HEX, nil, nil, "Offset shifted by unknown value this.dataOffset") + f.battery_cell_voltage_result = ProtoField.uint8 ("dji_dumlv1.battery_cell_voltage_result", "Result", base.HEX, nil, 0xff, nil) +f.battery_cell_voltage_unk1 = ProtoField.bytes ("dji_dumlv1.battery_cell_voltage_unknown1", "Unknown", base.SPACE) +f.battery_cell_voltage_cell_count = ProtoField.uint8 ("dji_dumlv1.battery_cell_voltage_cell_count", "Number of Cells", base.DEC) +f.battery_cell_voltage_cell1_voltage = ProtoField.uint16 ("dji_dumlv1.battery_cell_voltage_cell1_voltage", "Cell 1 Voltage [mV]", base.DEC) +f.battery_cell_voltage_cell2_voltage = ProtoField.uint16 ("dji_dumlv1.battery_cell_voltage_cell2_voltage", "Cell 2 Voltage [mV]", base.DEC) +f.battery_cell_voltage_cell3_voltage = ProtoField.uint16 ("dji_dumlv1.battery_cell_voltage_cell3_voltage", "Cell 3 Voltage [mV]", base.DEC) + +local function battery_cell_voltage_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (payload:len() >= 8) then -- full packet + + if (payload:len() >= 9) then + subtree:add (f.battery_cell_voltage_unk1, payload(offset, 2)) + offset = offset + 2 + else + subtree:add_le (f.battery_cell_voltage_index, payload(offset, 1)) + subtree:add_le (f.battery_cell_voltage_result, payload(offset, 1)) + offset = offset + 1 + end + + subtree:add_le (f.battery_cell_voltage_cell_count, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_cell_voltage_cell1_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_cell_voltage_cell2_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_cell_voltage_cell3_voltage, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) and (offset ~= 9) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Cell Voltage: Offset does not match - internal inconsistency") end + else -- status only + + subtree:add (f.battery_dynamic_data_unk1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Cell Voltage: Offset does not match - internal inconsistency") end + end + + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Cell Voltage: Payload size different than expected") end +end + +-- Battery - Barcode Data - 0x31 + +f.battery_barcode_data_unk1 = ProtoField.bytes ("dji_dumlv1.battery_barcode_data_unknown1", "Unknown", base.SPACE) +f.battery_barcode_data_length = ProtoField.uint8 ("dji_dumlv1.battery_barcode_data_length", "Data Length", base.DEC) +f.battery_barcode_data_string = ProtoField.string ("dji_dumlv1.battery_barcode_data_string", "Barcode String", base.ASCII) + +local function battery_barcode_data_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (payload:len() > 9) then + subtree:add (f.battery_barcode_data_unk1, payload(offset, 2)) + offset = offset + 2 + + local data_length = payload(offset, 1):uint() + subtree:add (f.battery_barcode_data_length, payload(offset, 1)) + offset = offset + 1 + + if ((payload:len() - offset) == data_length) then + subtree:add_le (f.battery_barcode_data_string, payload(offset, data_length)) + offset = offset + data_length + end + end +end + +-- Battery - Battery Re-Arrangement - 0x31 + +--f.battery_re_arrangement_unknown0 = ProtoField.none ("dji_dumlv1.battery_re_arrangement_unknown0", "Unknown0", base.NONE) + +local function battery_re_arrangement_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (offset ~= 0) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Re-Arrangement: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Re-Arrangement: Payload size different than expected") end +end + +local BATTERY_UART_CMD_DISSECT = { + [0x01] = battery_static_data_dissector, + [0x02] = battery_dynamic_data_dissector, + [0x03] = battery_cell_voltage_dissector, + [0x04] = battery_barcode_data_dissector, + [0x31] = battery_re_arrangement_dissector, +} + +-- Data Logger - Battery Data packet - 0x22 + +f.datlog_battery_data_block_id = ProtoField.uint16 ("dji_dumlv1.datlog_battery_data_block_id", "Block ID", base.DEC) +f.datlog_battery_data_length = ProtoField.uint8 ("dji_dumlv1.datlog_battery_data_length", "Data Length", base.DEC) +f.datlog_battery_data_voltage = ProtoField.uint16 ("dji_dumlv1.datlog_battery_data_voltage", "Pack Voltage [mV]", base.DEC) +f.datlog_battery_data_current = ProtoField.int32 ("dji_dumlv1.datlog_battery_data_current", "Current [mA]", base.DEC) +f.datlog_battery_data_full_charge_capacity = ProtoField.uint16 ("dji_dumlv1.datlog_battery_data_full_charge_capacity", "Full Charge Capacity [mAh]", base.DEC) +f.datlog_battery_data_current_capacity = ProtoField.uint16 ("dji_dumlv1.datlog_battery_data_current_capacity", "Current Capacity [mAh]", base.DEC) +f.datlog_battery_data_temperature = ProtoField.int16 ("dji_dumlv1.datlog_battery_data_temperature", "Temperature [deg C]", base.DEC) +f.datlog_battery_data_state_of_charge = ProtoField.uint16 ("dji_dumlv1.datlog_battery_data_state_of_charge", "State of Charge [%]", base.DEC) +f.datlog_battery_data_status1 = ProtoField.uint8 ("dji_dumlv1.datlog_battery_data_status1", "Status 1", base.HEX) +f.datlog_battery_data_status2 = ProtoField.uint8 ("dji_dumlv1.datlog_battery_data_status1", "Status 2", base.HEX) +f.datlog_battery_data_status3 = ProtoField.uint8 ("dji_dumlv1.datlog_battery_data_status1", "Status 3", base.HEX) +f.datlog_battery_data_status4 = ProtoField.uint8 ("dji_dumlv1.datlog_battery_data_status1", "Status 4", base.HEX) +f.datlog_battery_data_cell1_voltage = ProtoField.uint16 ("dji_dumlv1.datlog_battery_data_cell1_voltage", "Cell 1 Voltage [mV]", base.DEC) +f.datlog_battery_data_cell2_voltage = ProtoField.uint16 ("dji_dumlv1.datlog_battery_data_cell2_voltage", "Cell 2 Voltage [mV]", base.DEC) +f.datlog_battery_data_cell3_voltage = ProtoField.uint16 ("dji_dumlv1.datlog_battery_data_cell3_voltage", "Cell 2 Voltage [mV]", base.DEC) + +local function datlog_battery_data_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (payload:len() > 4) then + subtree:add_le (f.datlog_battery_data_block_id, payload(offset, 2)) + offset = offset + 2 + + local data_length = payload(offset, 1): uint() + subtree:add (f.datlog_battery_data_length, payload(offset, 1)) + offset = offset + 1 + + if(payload:len() - offset == data_length) then + subtree:add_le (f.datlog_battery_data_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.datlog_battery_data_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.datlog_battery_data_full_charge_capacity, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.datlog_battery_data_current_capacity, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.datlog_battery_data_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.datlog_battery_data_state_of_charge, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.datlog_battery_data_status1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.datlog_battery_data_status2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.datlog_battery_data_status3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.datlog_battery_data_status4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.datlog_battery_data_cell1_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.datlog_battery_data_cell2_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.datlog_battery_data_cell2_voltage, payload(offset, 2)) + offset = offset + 2 + end + end +end + +-- Data Logger - Battery Message packet - 0x23 + +f.datlog_battery_msg_message = ProtoField.string ("dji_dumlv1.datlog_battery_msg_message", "Message", base.ASCII) + +local function datlog_battery_msg_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + if (payload:len() > 2) then + local message_len = payload:len() - offset + subtree:add_le (f.datlog_battery_msg_message, payload(offset, message_len)) + end +end + +local DATA_LOG_UART_CMD_DISSECT = { + [0x22] = datlog_battery_data_dissector, + [0x23] = datlog_battery_msg_dissector, +} + +-- RTK - Rtk Status - 0x09 + +f.rtk_rtk_status_a = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_a", "A", base.HEX) +f.rtk_rtk_status_b = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_b", "B", base.HEX) +f.rtk_rtk_status_c = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_c", "C", base.HEX) +f.rtk_rtk_status_d = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_d", "D", base.HEX) +f.rtk_rtk_status_e = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_e", "E", base.HEX) +f.rtk_rtk_status_f = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_f", "F", base.HEX) +f.rtk_rtk_status_g = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_g", "G", base.HEX) +f.rtk_rtk_status_h = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_h", "H", base.HEX) +f.rtk_rtk_status_i = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_i", "I", base.HEX) +f.rtk_rtk_status_j = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_j", "J", base.HEX) +f.rtk_rtk_status_k = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_k", "K", base.HEX) +f.rtk_rtk_status_l = ProtoField.double ("dji_dumlv1.rtk_rtk_status_l", "L", base.DEC) +f.rtk_rtk_status_m = ProtoField.double ("dji_dumlv1.rtk_rtk_status_m", "M", base.DEC) +f.rtk_rtk_status_n = ProtoField.float ("dji_dumlv1.rtk_rtk_status_n", "N", base.DEC) +f.rtk_rtk_status_o = ProtoField.double ("dji_dumlv1.rtk_rtk_status_o", "O", base.DEC) +f.rtk_rtk_status_p = ProtoField.double ("dji_dumlv1.rtk_rtk_status_p", "P", base.DEC) +f.rtk_rtk_status_q = ProtoField.float ("dji_dumlv1.rtk_rtk_status_q", "Q", base.DEC) +f.rtk_rtk_status_r = ProtoField.float ("dji_dumlv1.rtk_rtk_status_r", "R", base.DEC) +f.rtk_rtk_status_s = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_s", "S", base.HEX) +f.rtk_rtk_status_t = ProtoField.uint8 ("dji_dumlv1.rtk_rtk_status_t", "T", base.HEX) + +local function rtk_rtk_status_dissector(pkt_length, buffer, pinfo, subtree) + local offset = 11 + local payload = buffer(offset, pkt_length - offset - 2) + offset = 0 + + subtree:add_le (f.rtk_rtk_status_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_c, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_d, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_e, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_g, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_h, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_i, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_j, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_k, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_l, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.rtk_rtk_status_m, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.rtk_rtk_status_n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtk_rtk_status_o, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.rtk_rtk_status_p, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.rtk_rtk_status_q, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtk_rtk_status_r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtk_rtk_status_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtk_rtk_status_t, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 57) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rtk Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rtk Status: Payload size different than expected") end +end + +local RTK_UART_CMD_DISSECT = { + [0x09] = rtk_rtk_status_dissector, +} + +local AUTO_UART_CMD_DISSECT = { +} + +local ADSB_UART_CMD_DISSECT = { + +} + +DJI_DUMLv1_CMD_DISSECT = { + [0x00] = GENERAL_UART_CMD_DISSECT, + [0x01] = SPECIAL_UART_CMD_DISSECT, + [0x02] = CAMERA_UART_CMD_DISSECT, + [0x03] = FLYC_UART_CMD_DISSECT, + [0x04] = GIMBAL_UART_CMD_DISSECT, + [0x05] = CENTER_BRD_UART_CMD_DISSECT, + [0x06] = RC_UART_CMD_DISSECT, + [0x07] = WIFI_UART_CMD_DISSECT, + [0x08] = DM36X_UART_CMD_DISSECT, + [0x09] = HD_LINK_UART_CMD_DISSECT, + [0x0a] = MBINO_UART_CMD_DISSECT, + [0x0b] = SIM_UART_CMD_DISSECT, + [0x0c] = ESC_UART_CMD_DISSECT, + [0x0d] = BATTERY_UART_CMD_DISSECT, + [0x0e] = DATA_LOG_UART_CMD_DISSECT, + [0x0f] = RTK_UART_CMD_DISSECT, + [0x10] = AUTO_UART_CMD_DISSECT, + [0x11] = ADSB_UART_CMD_DISSECT, +} + +-- Top level packet fields + +-- [0] Start of Pkt, always 0x55 +f.delimiter = ProtoField.uint8 ("dji_dumlv1.delimiter", "Delimiter", base.HEX) +-- [1] Length of Pkt +f.length = ProtoField.uint16 ("dji_dumlv1.length", "Length", base.HEX, nil, 0x3FF) +-- [2] Protocol version +f.protocol_version = ProtoField.uint16 ("dji_dumlv1.protover", "Protocol Version", base.HEX, nil, 0xFC00) +-- [3] Data Type +f.datatype = ProtoField.uint8 ("dji_dumlv1.hdr_crc", "Header CRC", base.HEX) + +-- Fields for ProtoVer = 1 (DUML v1) + +-- [4] Sender +f.sender_idx = ProtoField.uint8 ("dji_dumlv1.sender_idx", "Sender Index", base.DEC, nil, 0xE0) +f.sender = ProtoField.uint8 ("dji_dumlv1.sender", "Sender Type", base.DEC, DJI_DUMLv1_SRC_DEST_TEXT, 0x1F) +-- [5] Receiver +f.receiver_idx = ProtoField.uint8 ("dji_dumlv1.receiver_idx", "Receiver Index", base.DEC, nil, 0xE0) +f.receiver = ProtoField.uint8 ("dji_dumlv1.receiver", "Receiver Type", base.DEC, DJI_DUMLv1_SRC_DEST_TEXT, 0x1F) +-- [6-7] Sequence Ctr +f.seqctr = ProtoField.uint16 ("dji_dumlv1.seqctr", "Seq Counter", base.DEC, nil, nil, "Used for re-transmission - if known seqctr is detected, cached answer may be re-transmitted") +-- [8] Encryption +f.encrypt = ProtoField.uint8 ("dji_dumlv1.encrypt", "Encryption Type", base.DEC, DJI_DUMLv1_ENCRYPT_TYPE_TEXT, 0x07) +-- [8] Ack +f.ack = ProtoField.uint8 ("dji_dumlv1.ack", "Ack", base.HEX, DJI_DUMLv1_ACK_TYPE_TEXT, 0x60) +-- [8] Packet type +f.pack_type = ProtoField.uint8 ('dji_dumlv1.pack_type', "Packet Type", base.DEC, DJI_DUMLv1_PACKET_TYPE_TEXT, 0x80) +-- [9] Cmd Set +f.cmdset = ProtoField.uint8 ('dji_dumlv1.cmdset', "Cmd Set", base.DEC, DJI_DUMLv1_CMD_SET_TEXT, 0xFF) +-- [A] Cmd +f.cmd = ProtoField.uint8 ('dji_dumlv1.cmd', "Cmd", base.HEX) +-- [B] Payload (optional) +f.payload = ProtoField.bytes ("dji_dumlv1.payload", "Payload", base.SPACE) + +-- [B+Payload] CRC +f.crc = ProtoField.uint16 ("dji_dumlv1.crc", "CRC", base.HEX) + +-- Dissector top level function; is called within this dissector, but can also be called from outsude +function dji_dumlv1_main_dissector(buffer, pinfo, subtree) + local offset = 1 + + -- [1-2] The Pkt length | protocol version + local pkt_length = buffer(offset,2):le_uint() + local pkt_protover = pkt_length + -- bit32 lib requires LUA 5.2 + pkt_length = bit32.band(pkt_length, 0x03FF) + pkt_protover = bit32.rshift(bit32.band(pkt_protover, 0xFC00), 10) + + subtree:add_le (f.length, buffer(offset, 2)) + subtree:add_le (f.protocol_version, buffer(offset, 2)) + offset = offset + 2 + + -- [3] Header Checksum + subtree:add (f.datatype, buffer(offset, 1)) + offset = offset + 1 + + if pkt_protover == 1 then + + -- [4] Sender + subtree:add (f.sender, buffer(offset, 1)) + subtree:add (f.sender_idx, buffer(offset, 1)) + offset = offset + 1 + + -- [5] Receiver + subtree:add (f.receiver, buffer(offset, 1)) + subtree:add (f.receiver_idx, buffer(offset, 1)) + offset = offset + 1 + + -- [6] Sequence Counter + subtree:add_le (f.seqctr, buffer(offset, 2)) + offset = offset + 2 + + -- [8] Encrypt | Ack | Pack_Type + subtree:add (f.encrypt, buffer(offset, 1)) + subtree:add (f.ack, buffer(offset, 1)) + subtree:add (f.pack_type, buffer(offset, 1)) + offset = offset + 1 + + -- [9] Cmd Set + local cmdset = buffer(offset,1):uint() + subtree:add (f.cmdset, buffer(offset, 1)) + offset = offset + 1 + + -- [A] Cmd (has variable valuestring) + local cmd = buffer(offset,1):uint() + local valuestring = DJI_DUMLv1_CMD_TEXT[cmdset] or {} + subtree:add (f.cmd, buffer(offset, 1), cmd, string.format("%s: %s (0x%02X)", "Cmd", valuestring[cmd] or "Unknown", cmd)) + offset = offset + 1 + + set_info(cmd, pinfo, DJI_DUMLv1_CMD_TEXT[cmdset]) + + assert(offset == 11, "Offset shifted - dissector internal inconsistency") + + -- [B] Payload + if pkt_length > offset+2 then + payload_tree = subtree:add(f.payload, buffer(offset, pkt_length - offset - 2)) + + -- If we have a dissector for this kind of command, run it + local dissector_group = DJI_DUMLv1_CMD_DISSECT[cmdset] or {} + local dissector = dissector_group[cmd] + + if dissector ~= nil then + dissector(pkt_length, buffer, pinfo, payload_tree) + end + + end + + end + + -- CRC + subtree:add_le(f.crc, buffer(pkt_length - 2, 2)) + offset = offset + 2 +end + +-- The protocol dissector itself +function DJI_DUMLv1_PROTO.dissector (buffer, pinfo, tree) + + local subtree = tree:add (DJI_DUMLv1_PROTO, buffer()) + + -- The Pkt start byte + local offset = 0 + + local pkt_type = buffer(offset,1):uint() + subtree:add (f.delimiter, buffer(offset, 1)) + offset = offset + 1 + + if pkt_type == 0x55 then + dji_dumlv1_main_dissector(buffer, pinfo, subtree) + end + +end + +-- Heuritstic version, checks if packet is correct +local function heuristic_dissector(buffer, pinfo, tree) + + -- The Pkt start byte + local num_packets = 0 + local offset = 0 + + local i = 0 + while (buffer:len() > offset) do + + if (buffer:len() < 0xa) then break end + + local pkt_type = buffer(offset,1):uint() + if (pkt_type ~= 0x55) then break end + + -- [1-2] The Pkt length | protocol version + local pkt_length = buffer(offset+1,2):le_uint() + local pkt_protover = pkt_length + -- bit32 lib requires LUA 5.2 + pkt_length = bit32.band(pkt_length, 0x03FF) + pkt_protover = bit32.rshift(bit32.band(pkt_protover, 0xFC00), 10) + + if (pkt_length > buffer:len()) then break end + if (pkt_protover > 2) then break end + + num_packets = num_packets + 1 + local subtree = tree:add (DJI_DUMLv1_PROTO, buffer()) + subtree:add (f.delimiter, buffer(offset, 1)) + + dji_dumlv1_main_dissector(buffer(offset,pkt_length), pinfo, subtree) + offset = offset + pkt_length + + end + + return (num_packets > 0) +end + + +-- An initialization routine +function DJI_DUMLv1_PROTO.init () + -- Non-heuristic USB dissector registration would look like this + --DissectorTable.get("usb.bulk"):add(0xffff, DJI_DUMLv1_PROTO) + -- Bluetooth dissector, used for DJI Osmo and Ronin devices + DissectorTable.get("btatt.handle"):add(0x0018, DJI_DUMLv1_PROTO) -- Osmo + DissectorTable.get("btatt.handle"):add(0x0010, DJI_DUMLv1_PROTO) -- Ronin (value notification) + DissectorTable.get("btatt.handle"):add(0x0013, DJI_DUMLv1_PROTO) -- Ronin (write) +end + +DJI_DUMLv1_PROTO:register_heuristic("usb.bulk", heuristic_dissector) +DJI_DUMLv1_PROTO:register_heuristic("tcp", heuristic_dissector) diff --git a/dissectors/dji-dumlv1/src/dji-mavic-flyrec-proto.lua b/dissectors/dji-dumlv1/src/dji-mavic-flyrec-proto.lua new file mode 100644 index 0000000..aba140b --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-mavic-flyrec-proto.lua @@ -0,0 +1,10788 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-mavic-flyrec-proto.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit b1f7f54daf9510ee47374e84216a1d767297b60b du 24/12/2018). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- Create a new dissector +DJI_MAVIC_FLYREC_PROTO = Proto ("dji_mavic_flyrec", "DJI_MAVIC_FLYREC", "Dji Mavic Pro Flight Record file format") + +local f = DJI_MAVIC_FLYREC_PROTO.fields +local enums = {} + +DJI_MAVIC_FLIGHT_RECORD_ENTRY_TYPE = { + [0x03e8] = 'Controller', + [0x03e9] = 'Aircraft Condition', + [0x03ea] = 'Serial Api Inputs', + [0x03ec] = 'Go Home Info', + [0x03ed] = 'Fmu Devices Run Time', + [0x03f0] = 'Fmu Sa Run Time', + [0x03f1] = 'Fmu Write Run Time', + [0x03f3] = 'Fmu Api Run Time', + [0x03f4] = 'Cfg Errs', + [0x03f5] = 'New Api Err Time', + [0x03ee] = 'Poi Debug Data', + [0x03f6] = 'Adv Gh Debug Data', + [0x03f7] = 'Ahrs Data', + [0x0070] = 'Err Code', + [0x0800] = 'Imu Atti 0', + [0x0801] = 'Imu Atti 1', + [0x0802] = 'Imu Atti 2', + [0x0810] = 'Imu Ex 0', + [0x0811] = 'Imu Ex 1', + [0x0812] = 'Imu Ex 2', + [0x08a0] = 'Atti Mini0', + [0x08a1] = 'Atti Mini1', + [0x08a2] = 'Atti Mini2', + [0x0860] = 'Imu Fdi 0', + [0x0861] = 'Imu Fdi 1', + [0x0862] = 'Imu Fdi 2', + [0x03ef] = 'Hl Debug Data', + [0x03f2] = 'Farm Db Data', + [0x4ef7] = 'Spray Sys Ctrl Cmd', + [0x4ef8] = 'Spray Sys State', + [0x04b0] = 'Ctrl Vert Debug', + [0x04b1] = 'Ctrl Pos Vert Debug', + [0x04b2] = 'Ctrl Vel Vert Debug', + [0x04b3] = 'Ctrl Acc Vert Debug', + [0x0514] = 'Ctrl Horiz Debug', + [0x0515] = 'Ctrl Horiz Pos Debug', + [0x0516] = 'Ctrl Horiz Vel Debug', + [0x0518] = 'Ctrl Horiz Atti Debug', + [0x0519] = 'Ctrl Horiz Ang Vel Debug', + [0x051a] = 'Ctrl Horiz Ccpm Debug', + [0x051b] = 'Ctrl Horiz Motor Debug', + [0x051c] = 'Ctrl Sweep Test', + [0x0460] = 'Way Debug Info', + [0x0461] = 'Svo Avoid', + [0x0578] = 'Simulator Debug Data', + [0x0579] = 'Simulator Gyro Acc Data 400Hz', + [0x057c] = 'Simulator Press Data 200Hz', + [0x057a] = 'Simulator Mag Data 50Hz', + [0x057b] = 'Simulator Gps Data 5Hz', + [0x057e] = 'Simulator Motor Data', + [0x057d] = 'Device Change Times', + [0x0582] = 'Simulator Config Aircraft Param', + [0x0583] = 'Simulator Config Battery Param', + [0x0584] = 'Simulator Config Environment Param', + [0x0585] = 'Simulator Config Motor Param 1', + [0x0587] = 'Simulator Config Sensor Param', + [0xcff2] = 'Rtkdata', + [0x0640] = 'Genral Debug Data', + [0x06a4] = 'Rc Debug Info', + [0x08d0] = 'Cali Mag 00', + [0x08d1] = 'Cali Mag 01', + [0x08d2] = 'Cali Mag 02', + [0x0828] = 'Lpf Gyr Acc0', + [0x0829] = 'Lpf Gyr Acc1', + [0x082a] = 'Lpf Gyr Acc2', + [0x08e6] = 'App Temp Bias0', + [0x08e7] = 'App Temp Bias1', + [0x08e8] = 'App Temp Bias2', + [0x08e4] = 'Inner Temp Bias0', + [0x08e5] = 'Inner Temp Bias1', + [0x08e6] = 'Inner Temp Bias2', + [0x06ae] = 'Battery Info', + [0x06af] = 'Battery Status', + [0x06b0] = 'Smart Battery Info', + [0x0708] = 'Statistical Info', + [0x2764] = 'Ns Sensor Quality', + [0x2765] = 'Ns Data Debug', + [0x2766] = 'Ns Data Component', + [0x2767] = 'Ns Data Residuals', + [0x2768] = 'Ns Data Posi Ofst', + [0x2769] = 'Ns Sensor Connect', + [0x276a] = 'Esc Data', + [0x276b] = 'High Freq Gyro Data 0', + [0x276c] = 'High Freq Gyro Data 1', + [0x276d] = 'High Freq Gyro Data 2', + [0x276e] = 'Rc Gps Data', + [0x2770] = 'Cb Gps', + [0x2771] = 'Cb Temp', + [0x2772] = 'Cb Press', + [0x2774] = 'Air Compensate Data', + [0x2775] = 'Vision Tof', + [0x2776] = 'Gs Rtk Data', + [0x2777] = 'Ex Raw Baro1', + [0x2778] = 'Ex Raw Baro2', + [0x2779] = 'Ex Raw Compass', + [0x27d8] = 'Gear Status', + [0x4ef2] = 'Radar Bottom', + [0x4ef3] = 'Radar Avoid Front', + [0x4ef4] = 'Radar Avoid Back', + [0x4ef5] = 'Radar Predict Front', + [0x4ef6] = 'Radar Predict Back', + [0x4f4c] = 'Gyro Raw0 0', + [0x4f4d] = 'Gyro Raw0 1', + [0x4f4e] = 'Gyro Raw0 2', + [0x4f50] = 'Gyro Raw1 0', + [0x4f51] = 'Gyro Raw1 1', + [0x4f54] = 'Gyro Raw2 0', + [0x4f55] = 'Gyro Raw2 1', + [0x4f58] = 'Acc Raw0 0', + [0x4f59] = 'Acc Raw0 1', + [0x4f5a] = 'Acc Raw0 2', + [0x4f5c] = 'Acc Raw1 0', + [0x4f5d] = 'Acc Raw1 1', + [0x4f60] = 'Acc Raw2 0', + [0x4f61] = 'Acc Raw2 1', + [0x4f64] = 'Sensor Push0 0', + [0x4f65] = 'Sensor Push0 1', + [0x4f6a] = 'Baro Raw0', + [0x4f6b] = 'Baro Raw1', + [0x4f6c] = 'Baro Raw2', + [0x4f6d] = 'Baro Raw3', + [0x4f74] = 'Compass Raw0', + [0x4f75] = 'Compass Raw1', + [0x4f76] = 'Compass Raw2', + [0x4f7e] = 'Compass Filter0', + [0x4f7f] = 'Compass Filter1', + [0x4f80] = 'Compass Filter2', + [0x4f88] = 'Imu Rotated Data', + [0x5014] = 'Raw Wristband Data', + [0x5015] = 'Wristband', + [0x501e] = 'Ctrl Device', + [0x4e20] = 'Battery Info 2', + [0x4e21] = 'Pwm Output', + [0x0880] = 'Temp Ctl Recorde0', + [0x0881] = 'Temp Ctl Recorde1', + [0x0882] = 'Temp Ctl Recorde2', + [0x4e22] = 'Airport Limit Debug Info', + [0x4e23] = 'Battery Raw Data 1', + [0x4e24] = 'Battery Raw Data 2', + [0x4e25] = 'Sys Err', + [0x4e27] = 'Quick Circle Debug', + [0x4e28] = 'Battery Info 3', + [0x4e29] = 'Rc Func Data', + [0x4e2a] = 'Rc Func State', + [0x4e2b] = 'Gps Monitor 1', + [0x4e2c] = 'Gps Monitor 2', + [0x4e2d] = 'Gps Monitor 3', + [0x0883] = 'Adaptive Roll', + [0x0884] = 'Adaptive Pitch', + [0x0885] = 'Fw G Api', + [0x0887] = 'Fw Param Ekf', + [0x27e2] = 'Ex Raw Airspeed', + [0x5000] = 'Vibrate Detect Gyro', + [0x500a] = 'Airprot Limit Data', + [0x500b] = 'Adv Fl Limit Data', + [0x0888] = 'Db Subscription', + [0x504b] = 'Lost Sats Go Home Send Package', + [0x504c] = 'Lost Sats Go Home Recv Package', + [0x504d] = 'Adsb Osd Info', + [0x092a] = 'Link Host', + [0x092b] = 'Link Pc', + [0x092c] = 'Link Vo', + [0x092d] = 'Link Sdk', + [0x092e] = 'Link Ofdm', + [0x092f] = 'Link Bat', + [0x0930] = 'Link Auto Cali', + [0x0931] = 'Link Cali Led', + [0x0932] = 'Link Manual Cali', + [0x0933] = 'Ipc0', + [0xcde0] = 'System Monitor', + [0xcddf] = 'Uart Monitor', + [0xcdde] = 'Can Monitor', + [0x8000] = 'Fly Log', + [0xff00] = 'Sd Logs', + [0xffff] = 'Sys Cfg', + [0xfffe] = 'Uno Log', + [0xfffd] = 'Cfg Log', + [0xfffc] = 'Module Name', +} + +local function bytearray_to_hexstr(bytes) + s = {} + for i = 0, bytes:len() - 1 do + s[i+1] = string.format("%02X",bytes:get_index(i)) + end + return table.concat(s," ") +end + +-- Flight log - Controller - 0x03e8 + +f.controller_ctrl_tick = ProtoField.uint32 ("dji_mavic_flyrec.controller_ctrl_tick", "Ctrl Tick", base.HEX) +f.controller_ctrl_pitch = ProtoField.int16 ("dji_mavic_flyrec.controller_ctrl_pitch", "Ctrl Pitch", base.DEC) +f.controller_ctrl_roll = ProtoField.int16 ("dji_mavic_flyrec.controller_ctrl_roll", "Ctrl Roll", base.DEC) +f.controller_ctrl_yaw = ProtoField.int16 ("dji_mavic_flyrec.controller_ctrl_yaw", "Ctrl Yaw", base.DEC) +f.controller_ctrl_thr = ProtoField.int16 ("dji_mavic_flyrec.controller_ctrl_thr", "Ctrl Thr", base.DEC) +f.controller_ctrl_mode = ProtoField.uint8 ("dji_mavic_flyrec.controller_ctrl_mode", "Ctrl Mode", base.HEX) +f.controller_mode_switch = ProtoField.uint8 ("dji_mavic_flyrec.controller_mode_switch", "Mode Switch", base.HEX) +f.controller_motor_state = ProtoField.uint8 ("dji_mavic_flyrec.controller_motor_state", "Motor State", base.HEX) +f.controller_sig_level = ProtoField.uint8 ("dji_mavic_flyrec.controller_sig_level", "Sig Level", base.HEX) +f.controller_ctrl_level = ProtoField.uint8 ("dji_mavic_flyrec.controller_ctrl_level", "Ctrl Level", base.HEX) +f.controller_sim_model = ProtoField.uint8 ("dji_mavic_flyrec.controller_sim_model", "Sim Model", base.HEX) +f.controller_max_height = ProtoField.uint16 ("dji_mavic_flyrec.controller_max_height", "Max Height", base.HEX) +f.controller_max_radius = ProtoField.uint16 ("dji_mavic_flyrec.controller_max_radius", "Max Radius", base.HEX) +f.controller_d2h_x = ProtoField.float ("dji_mavic_flyrec.controller_d2h_x", "D2H X", base.DEC) +f.controller_d2h_y = ProtoField.float ("dji_mavic_flyrec.controller_d2h_y", "D2H Y", base.DEC) +f.controller_act_req_id = ProtoField.uint8 ("dji_mavic_flyrec.controller_act_req_id", "Act Req Id", base.HEX) +f.controller_act_act_id = ProtoField.uint8 ("dji_mavic_flyrec.controller_act_act_id", "Act Act Id", base.HEX) +f.controller_cmd_mod = ProtoField.uint8 ("dji_mavic_flyrec.controller_cmd_mod", "Cmd Mod", base.HEX) +f.controller_mod_req_id = ProtoField.uint8 ("dji_mavic_flyrec.controller_mod_req_id", "Mod Req Id", base.HEX) +f.controller_fw_flag = ProtoField.uint8 ("dji_mavic_flyrec.controller_fw_flag", "Fw Flag", base.HEX) +f.controller_mot_sta = ProtoField.uint8 ("dji_mavic_flyrec.controller_mot_sta", "Mot Sta", base.HEX) +f.controller_oh_take = ProtoField.uint8 ("dji_mavic_flyrec.controller_oh_take", "Oh Take", base.HEX) + +local function flightrec_controller_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.controller_ctrl_tick, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_ctrl_pitch, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_ctrl_roll, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_ctrl_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_ctrl_thr, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_ctrl_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_mode_switch, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_motor_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_sig_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_ctrl_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_sim_model, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_max_height, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_max_radius, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_d2h_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_d2h_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_act_req_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_act_act_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_cmd_mod, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_mod_req_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_fw_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_mot_sta, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_oh_take, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 37) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Controller: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Controller: Payload size different than expected") end +end + +-- Flight log - Aircraft Condition - 0x03e9 + +f.aircraft_condition_int_fsm = ProtoField.uint8 ("dji_mavic_flyrec.aircraft_condition_int_fsm", "Int Fsm", base.HEX) +f.aircraft_condition_fsm_state = ProtoField.uint8 ("dji_mavic_flyrec.aircraft_condition_fsm_state", "Fsm State", base.HEX) +f.aircraft_condition_last_fsm = ProtoField.uint8 ("dji_mavic_flyrec.aircraft_condition_last_fsm", "Last Fsm", base.HEX) +f.aircraft_condition_near_gnd = ProtoField.uint8 ("dji_mavic_flyrec.aircraft_condition_near_gnd", "Near Gnd", base.HEX) +f.aircraft_condition_up_state = ProtoField.uint8 ("dji_mavic_flyrec.aircraft_condition_up_state", "Up State", base.HEX) +f.aircraft_condition_land_state = ProtoField.uint8 ("dji_mavic_flyrec.aircraft_condition_land_state", "Land State", base.HEX) +f.aircraft_condition_safe_fltr = ProtoField.int16 ("dji_mavic_flyrec.aircraft_condition_safe_fltr", "Safe Fltr", base.DEC) + +local function flightrec_aircraft_condition_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.aircraft_condition_int_fsm, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_fsm_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_last_fsm, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_near_gnd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_up_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_land_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_safe_fltr, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Aircraft Condition: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Aircraft Condition: Payload size different than expected") end +end + +-- Flight log - Serial Api Inputs - 0x03ea + +f.serial_api_inputs_sdk_ctrl_f = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_sdk_ctrl_f", "Sdk Ctrl F", base.HEX) +f.serial_api_inputs_sdk_roll_x = ProtoField.int16 ("dji_mavic_flyrec.serial_api_inputs_sdk_roll_x", "Sdk Roll X", base.DEC) +f.serial_api_inputs_sdk_pitch_y = ProtoField.int16 ("dji_mavic_flyrec.serial_api_inputs_sdk_pitch_y", "Sdk Pitch Y", base.DEC) +f.serial_api_inputs_sdk_thr_z = ProtoField.int16 ("dji_mavic_flyrec.serial_api_inputs_sdk_thr_z", "Sdk Thr Z", base.DEC) +f.serial_api_inputs_sdk_yaw = ProtoField.int16 ("dji_mavic_flyrec.serial_api_inputs_sdk_yaw", "Sdk Yaw", base.DEC) +f.serial_api_inputs_sdk_fdfd_x = ProtoField.int16 ("dji_mavic_flyrec.serial_api_inputs_sdk_fdfd_x", "Sdk Fdfd X", base.DEC) +f.serial_api_inputs_sdk_fdfd_y = ProtoField.int16 ("dji_mavic_flyrec.serial_api_inputs_sdk_fdfd_y", "Sdk Fdfd Y", base.DEC) +f.serial_api_inputs_ctrl_dev = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_ctrl_dev", "Ctrl Dev", base.HEX) +f.serial_api_inputs_sub_mode = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_sub_mode", "Sub Mode", base.HEX) +f.serial_api_inputs_open_req = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_open_req", "Open Req", base.HEX) +f.serial_api_inputs_open_ack = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_open_ack", "Open Ack", base.HEX) +f.serial_api_inputs_cmd_req = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_cmd_req", "Cmd Req", base.HEX) +f.serial_api_inputs_cmd_ack = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_cmd_ack", "Cmd Ack", base.HEX) +f.serial_api_inputs_avoid_e = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_avoid_e", "Avoid E", base.HEX) +f.serial_api_inputs_bit_s = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_bit_s", "Bit S", base.HEX) +f.serial_api_inputs_rc_cnt = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_rc_cnt", "Rc Cnt", base.HEX) +f.serial_api_inputs_sup_rc = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_sup_rc", "Sup Rc", base.HEX) +f.serial_api_inputs_fact_cnt = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_fact_cnt", "Fact Cnt", base.HEX) +f.serial_api_inputs_f_test = ProtoField.uint8 ("dji_mavic_flyrec.serial_api_inputs_f_test", "F Test", base.HEX) + +local function flightrec_serial_api_inputs_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.serial_api_inputs_sdk_ctrl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_sdk_roll_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_pitch_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_thr_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_fdfd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_fdfd_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_ctrl_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_sub_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_open_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_open_ack, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_cmd_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_cmd_ack, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_avoid_e, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_bit_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_rc_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_sup_rc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_fact_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_f_test, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 25) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Serial Api Inputs: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Serial Api Inputs: Payload size different than expected") end +end + +-- Flight log - Go Home Info - 0x03ec + +f.go_home_info_gh_sta = ProtoField.uint8 ("dji_mavic_flyrec.go_home_info_gh_sta", "Gh Sta", base.HEX) +f.go_home_info_gh_t = ProtoField.uint16 ("dji_mavic_flyrec.go_home_info_gh_t", "Gh T", base.HEX) +f.go_home_info_gh_line_t = ProtoField.uint16 ("dji_mavic_flyrec.go_home_info_gh_line_t", "Gh Line T", base.HEX) +f.go_home_info_gh_tgt_p0 = ProtoField.int16 ("dji_mavic_flyrec.go_home_info_gh_tgt_p0", "Gh Tgt P0", base.DEC) +f.go_home_info_gh_tgt_p1 = ProtoField.int16 ("dji_mavic_flyrec.go_home_info_gh_tgt_p1", "Gh Tgt P1", base.DEC) +f.go_home_info_gh_tgt_v0 = ProtoField.int16 ("dji_mavic_flyrec.go_home_info_gh_tgt_v0", "Gh Tgt V0", base.DEC) +f.go_home_info_gh_tgt_v1 = ProtoField.int16 ("dji_mavic_flyrec.go_home_info_gh_tgt_v1", "Gh Tgt V1", base.DEC) +f.go_home_info_gh_fdk_p0 = ProtoField.int16 ("dji_mavic_flyrec.go_home_info_gh_fdk_p0", "Gh Fdk P0", base.DEC) +f.go_home_info_gh_fdk_p1 = ProtoField.int16 ("dji_mavic_flyrec.go_home_info_gh_fdk_p1", "Gh Fdk P1", base.DEC) +f.go_home_info_gh_pud = ProtoField.uint8 ("dji_mavic_flyrec.go_home_info_gh_pud", "Gh Pud", base.HEX) +f.go_home_info_gh_idl_vel = ProtoField.uint16 ("dji_mavic_flyrec.go_home_info_gh_idl_vel", "Gh Idl Vel", base.HEX) +f.go_home_info_asd_tgt_h = ProtoField.uint16 ("dji_mavic_flyrec.go_home_info_asd_tgt_h", "Asd Tgt H", base.HEX) +f.go_home_info_fasd_tgt_h = ProtoField.uint16 ("dji_mavic_flyrec.go_home_info_fasd_tgt_h", "Fasd Tgt H", base.HEX) +f.go_home_info_asd_to = ProtoField.uint16 ("dji_mavic_flyrec.go_home_info_asd_to", "Asd To", base.HEX) +f.go_home_info_fasd_to = ProtoField.uint16 ("dji_mavic_flyrec.go_home_info_fasd_to", "Fasd To", base.HEX) +f.go_home_info_fasd_err = ProtoField.int16 ("dji_mavic_flyrec.go_home_info_fasd_err", "Fasd Err", base.DEC) +f.go_home_info_asd_err = ProtoField.int16 ("dji_mavic_flyrec.go_home_info_asd_err", "Asd Err", base.DEC) +f.go_home_info_220clogh_f = ProtoField.uint8 ("dji_mavic_flyrec.go_home_info_220clogh_f", "220Clogh F", base.HEX) +f.go_home_info_advghsw2fc = ProtoField.uint8 ("dji_mavic_flyrec.go_home_info_advghsw2fc", "Advghsw2Fc", base.HEX) +f.go_home_info_dyh_chd = ProtoField.uint8 ("dji_mavic_flyrec.go_home_info_dyh_chd", "Dyh Chd", base.HEX) +f.go_home_info_head_ref = ProtoField.float ("dji_mavic_flyrec.go_home_info_head_ref", "Head Ref", base.DEC) +f.go_home_info_head_err = ProtoField.float ("dji_mavic_flyrec.go_home_info_head_err", "Head Err", base.DEC) +f.go_home_info_head_rate = ProtoField.float ("dji_mavic_flyrec.go_home_info_head_rate", "Head Rate", base.DEC) + +local function flightrec_go_home_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.go_home_info_gh_sta, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_gh_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_line_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_tgt_p0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_tgt_p1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_tgt_v0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_tgt_v1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_fdk_p0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_fdk_p1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_pud, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_gh_idl_vel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_asd_tgt_h, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_fasd_tgt_h, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_asd_to, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_fasd_to, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_fasd_err, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_asd_err, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_220clogh_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_advghsw2fc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_dyh_chd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_head_ref, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.go_home_info_head_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.go_home_info_head_rate, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 47) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Go Home Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Go Home Info: Payload size different than expected") end +end + +-- Flight log - Fmu Devices Run Time - 0x03ed + +f.fmu_devices_run_time_all = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_all", "All", base.DEC) +f.fmu_devices_run_time_battery = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_battery", "Battery", base.DEC) +f.fmu_devices_run_time_led = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_led", "Led", base.DEC) +f.fmu_devices_run_time_baromter = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_baromter", "Baromter", base.DEC) +f.fmu_devices_run_time_gyro_acc = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_gyro_acc", "Gyro Acc", base.DEC) +f.fmu_devices_run_time_imu = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_imu", "Imu", base.DEC) +f.fmu_devices_run_time_vo = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_vo", "Vo", base.DEC) +f.fmu_devices_run_time_ultrasonic = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_ultrasonic", "Ultrasonic", base.DEC) +f.fmu_devices_run_time_esc = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_esc", "Esc", base.DEC) +f.fmu_devices_run_time_mc = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_mc", "Mc", base.DEC) +f.fmu_devices_run_time_camera = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_camera", "Camera", base.DEC) +f.fmu_devices_run_time_gps = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_gps", "Gps", base.DEC) +f.fmu_devices_run_time_compass = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_compass", "Compass", base.DEC) +f.fmu_devices_run_time_gimbal = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_gimbal", "Gimbal", base.DEC) +f.fmu_devices_run_time_rc = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_rc", "Rc", base.DEC) +f.fmu_devices_run_time_gear = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_gear", "Gear", base.DEC) +f.fmu_devices_run_time_sdk = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_sdk", "Sdk", base.DEC) +f.fmu_devices_run_time_rtk = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_rtk", "Rtk", base.DEC) +f.fmu_devices_run_time_dropsafe = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_dropsafe", "Dropsafe", base.DEC) +f.fmu_devices_run_time_radar = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_radar", "Radar", base.DEC) +f.fmu_devices_run_time_spray_sys = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_spray_sys", "Spray Sys", base.DEC) +f.fmu_devices_run_time_tof = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_tof", "Tof", base.DEC) +f.fmu_devices_run_time_wristband = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_wristband", "Wristband", base.DEC) +f.fmu_devices_run_time_headset = ProtoField.float ("dji_mavic_flyrec.fmu_devices_run_time_headset", "Headset", base.DEC) + +local function flightrec_fmu_devices_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_devices_run_time_all, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_battery, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_led, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_baromter, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_gyro_acc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_imu, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_vo, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_ultrasonic, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_esc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_mc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_camera, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_gps, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_compass, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_gimbal, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_rc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_gear, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_sdk, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_rtk, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_dropsafe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_radar, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_spray_sys, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_tof, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_wristband, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_headset, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 96) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Devices Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Devices Run Time: Payload size different than expected") end +end + +-- Flight log - Fmu Sa Run Time - 0x03f0 + +f.fmu_sa_run_time_all = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_all", "All", base.DEC) +f.fmu_sa_run_time_assistant = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_assistant", "Assistant", base.DEC) +f.fmu_sa_run_time_data = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_data", "Data", base.DEC) +f.fmu_sa_run_time_simulator = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_simulator", "Simulator", base.DEC) +f.fmu_sa_run_time_fsm = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_fsm", "Fsm", base.DEC) +f.fmu_sa_run_time_home = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_home", "Home", base.DEC) +f.fmu_sa_run_time_battery = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_battery", "Battery", base.DEC) +f.fmu_sa_run_time_motor = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_motor", "Motor", base.DEC) +f.fmu_sa_run_time_led = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_led", "Led", base.DEC) +f.fmu_sa_run_time_gear = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_gear", "Gear", base.DEC) +f.fmu_sa_run_time_airlimit = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_airlimit", "Airlimit", base.DEC) +f.fmu_sa_run_time_power_satu = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_power_satu", "Power Satu", base.DEC) +f.fmu_sa_run_time_user_info = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_user_info", "User Info", base.DEC) +f.fmu_sa_run_time_code_check = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_code_check", "Code Check", base.DEC) +f.fmu_sa_run_time_topo_check = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_topo_check", "Topo Check", base.DEC) +f.fmu_sa_run_time_vers_check = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_vers_check", "Vers Check", base.DEC) +f.fmu_sa_run_time_gps_level = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_gps_level", "Gps Level", base.DEC) +f.fmu_sa_run_time_link = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_link", "Link", base.DEC) +f.fmu_sa_run_time_navi_data = ProtoField.float ("dji_mavic_flyrec.fmu_sa_run_time_navi_data", "Navi Data", base.DEC) + +local function flightrec_fmu_sa_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_sa_run_time_all, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_assistant, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_data, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_simulator, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_fsm, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_home, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_battery, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_motor, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_led, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_gear, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_airlimit, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_power_satu, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_user_info, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_code_check, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_topo_check, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_vers_check, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_gps_level, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_link, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_navi_data, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 76) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Sa Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Sa Run Time: Payload size different than expected") end +end + +-- Flight log - Fmu Write Run Time - 0x03f1 + +f.fmu_write_run_time_all = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_all", "All", base.DEC) +f.fmu_write_run_time_battery = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_battery", "Battery", base.DEC) +f.fmu_write_run_time_led = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_led", "Led", base.DEC) +f.fmu_write_run_time_baromter = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_baromter", "Baromter", base.DEC) +f.fmu_write_run_time_gyro_acc = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_gyro_acc", "Gyro Acc", base.DEC) +f.fmu_write_run_time_imu = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_imu", "Imu", base.DEC) +f.fmu_write_run_time_vo = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_vo", "Vo", base.DEC) +f.fmu_write_run_time_ultrasonic = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_ultrasonic", "Ultrasonic", base.DEC) +f.fmu_write_run_time_esc = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_esc", "Esc", base.DEC) +f.fmu_write_run_time_mc = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_mc", "Mc", base.DEC) +f.fmu_write_run_time_camera = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_camera", "Camera", base.DEC) +f.fmu_write_run_time_gps = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_gps", "Gps", base.DEC) +f.fmu_write_run_time_compass = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_compass", "Compass", base.DEC) +f.fmu_write_run_time_gimbal = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_gimbal", "Gimbal", base.DEC) +f.fmu_write_run_time_rc = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_rc", "Rc", base.DEC) +f.fmu_write_run_time_gear = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_gear", "Gear", base.DEC) +f.fmu_write_run_time_sdk = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_sdk", "Sdk", base.DEC) +f.fmu_write_run_time_rtk = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_rtk", "Rtk", base.DEC) +f.fmu_write_run_time_dropsafe = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_dropsafe", "Dropsafe", base.DEC) +f.fmu_write_run_time_radar = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_radar", "Radar", base.DEC) +f.fmu_write_run_time_spray = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_spray", "Spray", base.DEC) +f.fmu_write_run_time_tof = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_tof", "Tof", base.DEC) +f.fmu_write_run_time_wristband = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_wristband", "Wristband", base.DEC) +f.fmu_write_run_time_headset = ProtoField.float ("dji_mavic_flyrec.fmu_write_run_time_headset", "Headset", base.DEC) + +local function flightrec_fmu_write_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_write_run_time_all, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_battery, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_led, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_baromter, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_gyro_acc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_imu, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_vo, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_ultrasonic, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_esc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_mc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_camera, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_gps, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_compass, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_gimbal, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_rc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_gear, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_sdk, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_rtk, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_dropsafe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_radar, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_spray, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_tof, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_wristband, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_headset, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 96) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Write Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Write Run Time: Payload size different than expected") end +end + +-- Flight log - Fmu Api Run Time - 0x03f3 + +f.fmu_api_run_time_all = ProtoField.float ("dji_mavic_flyrec.fmu_api_run_time_all", "All", base.DEC) + +local function flightrec_fmu_api_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_api_run_time_all, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Api Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Api Run Time: Payload size different than expected") end +end + +-- Flight log - Cfg Errs - 0x03f4 + +f.cfg_errs_errs = ProtoField.uint32 ("dji_mavic_flyrec.cfg_errs_errs", "Errs", base.HEX) + +local function flightrec_cfg_errs_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cfg_errs_errs, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cfg Errs: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cfg Errs: Payload size different than expected") end +end + +-- Flight log - New Api Err Time - 0x03f5 + +f.new_api_err_time_errs = ProtoField.uint32 ("dji_mavic_flyrec.new_api_err_time_errs", "Errs", base.HEX) + +local function flightrec_new_api_err_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.new_api_err_time_errs, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"New Api Err Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"New Api Err Time: Payload size different than expected") end +end + +-- Flight log - Poi Debug Data - 0x03ee + +f.poi_debug_data_t_alti = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_t_alti", "T Alti", base.DEC) +f.poi_debug_data_t_ang_rate = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_t_ang_rate", "T Ang Rate", base.DEC) +f.poi_debug_data_t_radius = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_t_radius", "T Radius", base.DEC) +f.poi_debug_data_r_dis_hp = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_r_dis_hp", "R Dis Hp", base.DEC) +f.poi_debug_data_r_ang = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_r_ang", "R Ang", base.DEC) +f.poi_debug_data_r_ang_rate = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_r_ang_rate", "R Ang Rate", base.DEC) +f.poi_debug_data_r_radius = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_r_radius", "R Radius", base.DEC) +f.poi_debug_data_p_err_x = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_p_err_x", "P Err X", base.DEC) +f.poi_debug_data_p_err_y = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_p_err_y", "P Err Y", base.DEC) +f.poi_debug_data_p_err_z = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_p_err_z", "P Err Z", base.DEC) +f.poi_debug_data_v_err_x = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_v_err_x", "V Err X", base.DEC) +f.poi_debug_data_v_err_y = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_v_err_y", "V Err Y", base.DEC) +f.poi_debug_data_v_err_z = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_v_err_z", "V Err Z", base.DEC) +f.poi_debug_data_head_err = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_head_err", "Head Err", base.DEC) +f.poi_debug_data_c_head_err = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_c_head_err", "C Head Err", base.DEC) +f.poi_debug_data_cmd_vel_x = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_cmd_vel_x", "Cmd Vel X", base.DEC) +f.poi_debug_data_cmd_vel_y = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_cmd_vel_y", "Cmd Vel Y", base.DEC) +f.poi_debug_data_cmd_vel_z = ProtoField.float ("dji_mavic_flyrec.poi_debug_data_cmd_vel_z", "Cmd Vel Z", base.DEC) +f.poi_debug_data_is_pud = ProtoField.uint8 ("dji_mavic_flyrec.poi_debug_data_is_pud", "Is Pud", base.HEX) + +local function flightrec_poi_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.poi_debug_data_t_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_t_ang_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_t_radius, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_r_dis_hp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_r_ang, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_r_ang_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_r_radius, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_p_err_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_p_err_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_p_err_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_v_err_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_v_err_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_v_err_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_head_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_c_head_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_cmd_vel_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_cmd_vel_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_cmd_vel_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_is_pud, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 73) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Poi Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Poi Debug Data: Payload size different than expected") end +end + +-- Flight log - Adv Gh Debug Data - 0x03f6 + +f.adv_gh_debug_data_sl_req = ProtoField.int8 ("dji_mavic_flyrec.adv_gh_debug_data_sl_req", "Sl Req", base.DEC) +f.adv_gh_debug_data_sl_f = ProtoField.int8 ("dji_mavic_flyrec.adv_gh_debug_data_sl_f", "Sl F", base.DEC) +f.adv_gh_debug_data_sl_last_f = ProtoField.int8 ("dji_mavic_flyrec.adv_gh_debug_data_sl_last_f", "Sl Last F", base.DEC) +f.adv_gh_debug_data_home_type = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_home_type", "Home Type", base.HEX) +f.adv_gh_debug_data_home_cnt = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_home_cnt", "Home Cnt", base.HEX) +f.adv_gh_debug_data_start_set = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_start_set", "Start Set", base.HEX) +f.adv_gh_debug_data_in_al = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_in_al", "In Al", base.HEX) +f.adv_gh_debug_data_gh_req = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_gh_req", "Gh Req", base.HEX) +f.adv_gh_debug_data_gh_s = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_gh_s", "Gh S", base.HEX) +f.adv_gh_debug_data_gh_t = ProtoField.int16 ("dji_mavic_flyrec.adv_gh_debug_data_gh_t", "Gh T", base.DEC) +f.adv_gh_debug_data_gh_cnt = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_gh_cnt", "Gh Cnt", base.HEX) +f.adv_gh_debug_data_gh_ok = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_gh_ok", "Gh Ok", base.HEX) +f.adv_gh_debug_data_al_need = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_al_need", "Al Need", base.HEX) +f.adv_gh_debug_data_al_in = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_al_in", "Al In", base.HEX) +f.adv_gh_debug_data_al_req = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_al_req", "Al Req", base.HEX) +f.adv_gh_debug_data_al_status = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_al_status", "Al Status", base.HEX) +f.adv_gh_debug_data_al_need_t = ProtoField.int16 ("dji_mavic_flyrec.adv_gh_debug_data_al_need_t", "Al Need T", base.DEC) +f.adv_gh_debug_data_al_is_ok = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_al_is_ok", "Al Is Ok", base.HEX) +f.adv_gh_debug_data_al__cnt = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_al__cnt", "Al Cnt", base.HEX) +f.adv_gh_debug_data_al_gnd = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_al_gnd", "Al Gnd", base.HEX) +f.adv_gh_debug_data_al_ok = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_al_ok", "Al Ok", base.HEX) +f.adv_gh_debug_data_chg_ht_f = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_chg_ht_f", "Chg Ht F", base.HEX) +f.adv_gh_debug_data_adv_ctrl_f = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_adv_ctrl_f", "Adv Ctrl F", base.HEX) +f.adv_gh_debug_data_adv_brake_f = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_adv_brake_f", "Adv Brake F", base.HEX) +f.adv_gh_debug_data_adv_roll_x = ProtoField.int16 ("dji_mavic_flyrec.adv_gh_debug_data_adv_roll_x", "Adv Roll X", base.DEC) +f.adv_gh_debug_data_adv_pitch_y = ProtoField.int16 ("dji_mavic_flyrec.adv_gh_debug_data_adv_pitch_y", "Adv Pitch Y", base.DEC) +f.adv_gh_debug_data_adv_thr_z = ProtoField.int16 ("dji_mavic_flyrec.adv_gh_debug_data_adv_thr_z", "Adv Thr Z", base.DEC) +f.adv_gh_debug_data_adv_yaw = ProtoField.int16 ("dji_mavic_flyrec.adv_gh_debug_data_adv_yaw", "Adv Yaw", base.DEC) +f.adv_gh_debug_data_adv_fdfd_x = ProtoField.int16 ("dji_mavic_flyrec.adv_gh_debug_data_adv_fdfd_x", "Adv Fdfd X", base.DEC) +f.adv_gh_debug_data_adv_fdfd_y = ProtoField.int16 ("dji_mavic_flyrec.adv_gh_debug_data_adv_fdfd_y", "Adv Fdfd Y", base.DEC) +f.adv_gh_debug_data_ctrl_cnt = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_ctrl_cnt", "Ctrl Cnt", base.HEX) +f.adv_gh_debug_data_ctrl_ok = ProtoField.uint8 ("dji_mavic_flyrec.adv_gh_debug_data_ctrl_ok", "Ctrl Ok", base.HEX) + +local function flightrec_adv_gh_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adv_gh_debug_data_sl_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_sl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_sl_last_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_home_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_home_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_start_set, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_in_al, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_gh_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_ok, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_need, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_in, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_need_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_al_is_ok, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al__cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_gnd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_ok, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_chg_ht_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_adv_ctrl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_adv_brake_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_adv_roll_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_pitch_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_thr_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_fdfd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_fdfd_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_ctrl_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_ctrl_ok, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adv Gh Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adv Gh Debug Data: Payload size different than expected") end +end + +-- Flight log - Ahrs Data - 0x03f7 + +f.ahrs_data_ns_longti = ProtoField.double ("dji_mavic_flyrec.ahrs_data_ns_longti", "Ns Longti", base.DEC) +f.ahrs_data_ns_lati = ProtoField.double ("dji_mavic_flyrec.ahrs_data_ns_lati", "Ns Lati", base.DEC) +f.ahrs_data_ns_height = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_height", "Ns Height", base.DEC) +f.ahrs_data_ns_q0 = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_q0", "Ns Q0", base.DEC) +f.ahrs_data_ns_q1 = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_q1", "Ns Q1", base.DEC) +f.ahrs_data_ns_q2 = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_q2", "Ns Q2", base.DEC) +f.ahrs_data_ns_q3 = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_q3", "Ns Q3", base.DEC) +f.ahrs_data_ns_agx = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_agx", "Ns Agx", base.DEC) +f.ahrs_data_ns_agy = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_agy", "Ns Agy", base.DEC) +f.ahrs_data_ns_agz = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_agz", "Ns Agz", base.DEC) +f.ahrs_data_ns_vgx = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_vgx", "Ns Vgx", base.DEC) +f.ahrs_data_ns_vgy = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_vgy", "Ns Vgy", base.DEC) +f.ahrs_data_ns_vgz = ProtoField.float ("dji_mavic_flyrec.ahrs_data_ns_vgz", "Ns Vgz", base.DEC) + +local function flightrec_ahrs_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ahrs_data_ns_longti, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.ahrs_data_ns_lati, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.ahrs_data_ns_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_q0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_q1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_q2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_q3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_agx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_agy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_agz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_vgx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_vgy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_vgz, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ahrs Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ahrs Data: Payload size different than expected") end +end + +-- Flight log - Err Code - 0x0070 + +f.err_code_imu1_break = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu1_break", "Imu1 Break", base.HEX) +f.err_code_imu2_break = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu2_break", "Imu2 Break", base.HEX) +f.err_code_gcm0_break = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm0_break", "Gcm0 Break", base.HEX) +f.err_code_gcm1_break = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm1_break", "Gcm1 Break", base.HEX) +f.err_code_gcm2_break = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm2_break", "Gcm2 Break", base.HEX) +f.err_code_imu0_fault = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu0_fault", "Imu0 Fault", base.HEX) +f.err_code_imu1_fault = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu1_fault", "Imu1 Fault", base.HEX) +f.err_code_imu2_fault = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu2_fault", "Imu2 Fault", base.HEX) +f.err_code_gcm0_fault = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm0_fault", "Gcm0 Fault", base.HEX) +f.err_code_gcm1_fault = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm1_fault", "Gcm1 Fault", base.HEX) +f.err_code_gcm2_fault = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm2_fault", "Gcm2 Fault", base.HEX) +f.err_code_mc_fault = ProtoField.uint8 ("dji_mavic_flyrec.err_code_mc_fault", "Mc Fault", base.HEX) +f.err_code_mc_dev = ProtoField.uint8 ("dji_mavic_flyrec.err_code_mc_dev", "Mc Dev", base.HEX) +f.err_code_mc_err = ProtoField.uint8 ("dji_mavic_flyrec.err_code_mc_err", "Mc Err", base.HEX) +f.err_code_mc_act = ProtoField.uint8 ("dji_mavic_flyrec.err_code_mc_act", "Mc Act", base.HEX) +f.err_code_imu_stat = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu_stat", "Imu Stat", base.HEX) +f.err_code_mag_stat = ProtoField.uint8 ("dji_mavic_flyrec.err_code_mag_stat", "Mag Stat", base.HEX) +f.err_code_imu0_dev = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu0_dev", "Imu0 Dev", base.HEX) +f.err_code_imu0_err = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu0_err", "Imu0 Err", base.HEX) +f.err_code_imu0_act = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu0_act", "Imu0 Act", base.HEX) +f.err_code_imu1_dev = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu1_dev", "Imu1 Dev", base.HEX) +f.err_code_imu1_err = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu1_err", "Imu1 Err", base.HEX) +f.err_code_imu1_act = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu1_act", "Imu1 Act", base.HEX) +f.err_code_imu2_dev = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu2_dev", "Imu2 Dev", base.HEX) +f.err_code_imu2_err = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu2_err", "Imu2 Err", base.HEX) +f.err_code_imu2_act = ProtoField.uint8 ("dji_mavic_flyrec.err_code_imu2_act", "Imu2 Act", base.HEX) +f.err_code_gcm0_dev = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm0_dev", "Gcm0 Dev", base.HEX) +f.err_code_gcm0_err = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm0_err", "Gcm0 Err", base.HEX) +f.err_code_gcm0_act = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm0_act", "Gcm0 Act", base.HEX) +f.err_code_gcm1_dev = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm1_dev", "Gcm1 Dev", base.HEX) +f.err_code_gcm1_err = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm1_err", "Gcm1 Err", base.HEX) +f.err_code_gcm1_act = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm1_act", "Gcm1 Act", base.HEX) +f.err_code_gcm2_dev = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm2_dev", "Gcm2 Dev", base.HEX) +f.err_code_gcm2_err = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm2_err", "Gcm2 Err", base.HEX) +f.err_code_gcm2_act = ProtoField.uint8 ("dji_mavic_flyrec.err_code_gcm2_act", "Gcm2 Act", base.HEX) + +local function flightrec_err_code_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.err_code_imu1_break, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu2_break, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm0_break, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm1_break, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm2_break, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu0_fault, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu1_fault, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu2_fault, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm0_fault, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm1_fault, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm2_fault, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_mc_fault, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_mc_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_mc_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_mc_act, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu_stat, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_mag_stat, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu0_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu0_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu0_act, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu1_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu1_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu1_act, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu2_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu2_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_imu2_act, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm0_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm0_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm0_act, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm1_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm1_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm1_act, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm2_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm2_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.err_code_gcm2_act, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 35) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Err Code: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Err Code: Payload size different than expected") end +end + +-- Flight log - Imu Atti 0 - 0x0800 + +f.imu_atti_0_long0 = ProtoField.double ("dji_mavic_flyrec.imu_atti_0_long0", "Long0", base.DEC) +f.imu_atti_0_lati0 = ProtoField.double ("dji_mavic_flyrec.imu_atti_0_lati0", "Lati0", base.DEC) +f.imu_atti_0_press0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_press0", "Press0", base.DEC) +f.imu_atti_0_ax0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_ax0", "Ax0", base.DEC) +f.imu_atti_0_ay0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_ay0", "Ay0", base.DEC) +f.imu_atti_0_az0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_az0", "Az0", base.DEC) +f.imu_atti_0_wx0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_wx0", "Wx0", base.DEC) +f.imu_atti_0_wy0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_wy0", "Wy0", base.DEC) +f.imu_atti_0_wz0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_wz0", "Wz0", base.DEC) +f.imu_atti_0_alti0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_alti0", "Alti0", base.DEC) +f.imu_atti_0_qw0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_qw0", "Qw0", base.DEC) +f.imu_atti_0_qx0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_qx0", "Qx0", base.DEC) +f.imu_atti_0_qy0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_qy0", "Qy0", base.DEC) +f.imu_atti_0_qz0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_qz0", "Qz0", base.DEC) +f.imu_atti_0_agx0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_agx0", "Agx0", base.DEC) +f.imu_atti_0_agy0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_agy0", "Agy0", base.DEC) +f.imu_atti_0_agz0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_agz0", "Agz0", base.DEC) +f.imu_atti_0_vgx0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_vgx0", "Vgx0", base.DEC) +f.imu_atti_0_vgy0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_vgy0", "Vgy0", base.DEC) +f.imu_atti_0_vgz0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_vgz0", "Vgz0", base.DEC) +f.imu_atti_0_gbx0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_gbx0", "Gbx0", base.DEC) +f.imu_atti_0_gby0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_gby0", "Gby0", base.DEC) +f.imu_atti_0_gbz0 = ProtoField.float ("dji_mavic_flyrec.imu_atti_0_gbz0", "Gbz0", base.DEC) +f.imu_atti_0_mx0 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_0_mx0", "Mx0", base.DEC) +f.imu_atti_0_my0 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_0_my0", "My0", base.DEC) +f.imu_atti_0_mz0 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_0_mz0", "Mz0", base.DEC) +f.imu_atti_0_tx0 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_0_tx0", "Tx0", base.DEC) +f.imu_atti_0_ty0 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_0_ty0", "Ty0", base.DEC) +f.imu_atti_0_tz0 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_0_tz0", "Tz0", base.DEC) +f.imu_atti_0_sensor_stat0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_0_sensor_stat0", "Sensor Stat0", base.HEX) +f.imu_atti_0_filter_stat0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_0_filter_stat0", "Filter Stat0", base.HEX) +f.imu_atti_0_svn0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_0_svn0", "Svn0", base.HEX) +f.imu_atti_0_atti_cnt0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_0_atti_cnt0", "Atti Cnt0", base.HEX) + +local function flightrec_imu_atti_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_0_long0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_0_lati0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_0_press0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_ax0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_ay0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_az0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_wx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_wy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_wz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_alti0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_qw0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_qx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_qy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_qz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_agx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_agy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_agz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_vgx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_vgy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_vgz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_gbx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_gby0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_gbz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_mx0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_my0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_mz0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_tx0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_ty0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_tz0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_sensor_stat0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_filter_stat0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_svn0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_atti_cnt0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 0: Payload size different than expected") end +end + +-- Flight log - Imu Atti 1 - 0x0801 + +f.imu_atti_1_long1 = ProtoField.double ("dji_mavic_flyrec.imu_atti_1_long1", "Long1", base.DEC) +f.imu_atti_1_lati1 = ProtoField.double ("dji_mavic_flyrec.imu_atti_1_lati1", "Lati1", base.DEC) +f.imu_atti_1_press1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_press1", "Press1", base.DEC) +f.imu_atti_1_ax1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_ax1", "Ax1", base.DEC) +f.imu_atti_1_ay1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_ay1", "Ay1", base.DEC) +f.imu_atti_1_az1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_az1", "Az1", base.DEC) +f.imu_atti_1_wx1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_wx1", "Wx1", base.DEC) +f.imu_atti_1_wy1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_wy1", "Wy1", base.DEC) +f.imu_atti_1_wz1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_wz1", "Wz1", base.DEC) +f.imu_atti_1_alti1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_alti1", "Alti1", base.DEC) +f.imu_atti_1_qw1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_qw1", "Qw1", base.DEC) +f.imu_atti_1_qx1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_qx1", "Qx1", base.DEC) +f.imu_atti_1_qy1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_qy1", "Qy1", base.DEC) +f.imu_atti_1_qz1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_qz1", "Qz1", base.DEC) +f.imu_atti_1_agx1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_agx1", "Agx1", base.DEC) +f.imu_atti_1_agy1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_agy1", "Agy1", base.DEC) +f.imu_atti_1_agz1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_agz1", "Agz1", base.DEC) +f.imu_atti_1_vgx1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_vgx1", "Vgx1", base.DEC) +f.imu_atti_1_vgy1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_vgy1", "Vgy1", base.DEC) +f.imu_atti_1_vgz1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_vgz1", "Vgz1", base.DEC) +f.imu_atti_1_gbx1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_gbx1", "Gbx1", base.DEC) +f.imu_atti_1_gby1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_gby1", "Gby1", base.DEC) +f.imu_atti_1_gbz1 = ProtoField.float ("dji_mavic_flyrec.imu_atti_1_gbz1", "Gbz1", base.DEC) +f.imu_atti_1_mx1 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_1_mx1", "Mx1", base.DEC) +f.imu_atti_1_my1 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_1_my1", "My1", base.DEC) +f.imu_atti_1_mz1 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_1_mz1", "Mz1", base.DEC) +f.imu_atti_1_tx1 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_1_tx1", "Tx1", base.DEC) +f.imu_atti_1_ty1 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_1_ty1", "Ty1", base.DEC) +f.imu_atti_1_tz1 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_1_tz1", "Tz1", base.DEC) +f.imu_atti_1_sensor_stat1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_1_sensor_stat1", "Sensor Stat1", base.HEX) +f.imu_atti_1_filter_stat1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_1_filter_stat1", "Filter Stat1", base.HEX) +f.imu_atti_1_svn1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_1_svn1", "Svn1", base.HEX) +f.imu_atti_1_atti_cnt1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_1_atti_cnt1", "Atti Cnt1", base.HEX) + +local function flightrec_imu_atti_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_1_long1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_1_lati1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_1_press1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_ax1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_ay1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_az1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_wx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_wy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_wz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_alti1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_qw1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_qx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_qy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_qz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_agx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_agy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_agz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_vgx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_vgy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_vgz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_gbx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_gby1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_gbz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_mx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_my1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_mz1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_tx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_ty1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_tz1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_sensor_stat1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_filter_stat1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_svn1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_atti_cnt1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 1: Payload size different than expected") end +end + +-- Flight log - Imu Atti 2 - 0x0802 + +f.imu_atti_2_long2 = ProtoField.double ("dji_mavic_flyrec.imu_atti_2_long2", "Long2", base.DEC) +f.imu_atti_2_lati2 = ProtoField.double ("dji_mavic_flyrec.imu_atti_2_lati2", "Lati2", base.DEC) +f.imu_atti_2_press2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_press2", "Press2", base.DEC) +f.imu_atti_2_ax2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_ax2", "Ax2", base.DEC) +f.imu_atti_2_ay2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_ay2", "Ay2", base.DEC) +f.imu_atti_2_az2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_az2", "Az2", base.DEC) +f.imu_atti_2_wx2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_wx2", "Wx2", base.DEC) +f.imu_atti_2_wy2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_wy2", "Wy2", base.DEC) +f.imu_atti_2_wz2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_wz2", "Wz2", base.DEC) +f.imu_atti_2_alti2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_alti2", "Alti2", base.DEC) +f.imu_atti_2_qw2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_qw2", "Qw2", base.DEC) +f.imu_atti_2_qx2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_qx2", "Qx2", base.DEC) +f.imu_atti_2_qy2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_qy2", "Qy2", base.DEC) +f.imu_atti_2_qz2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_qz2", "Qz2", base.DEC) +f.imu_atti_2_agx2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_agx2", "Agx2", base.DEC) +f.imu_atti_2_agy2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_agy2", "Agy2", base.DEC) +f.imu_atti_2_agz2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_agz2", "Agz2", base.DEC) +f.imu_atti_2_vgx2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_vgx2", "Vgx2", base.DEC) +f.imu_atti_2_vgy2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_vgy2", "Vgy2", base.DEC) +f.imu_atti_2_vgz2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_vgz2", "Vgz2", base.DEC) +f.imu_atti_2_gbx2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_gbx2", "Gbx2", base.DEC) +f.imu_atti_2_gby2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_gby2", "Gby2", base.DEC) +f.imu_atti_2_gbz2 = ProtoField.float ("dji_mavic_flyrec.imu_atti_2_gbz2", "Gbz2", base.DEC) +f.imu_atti_2_mx2 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_2_mx2", "Mx2", base.DEC) +f.imu_atti_2_my2 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_2_my2", "My2", base.DEC) +f.imu_atti_2_mz2 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_2_mz2", "Mz2", base.DEC) +f.imu_atti_2_tx2 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_2_tx2", "Tx2", base.DEC) +f.imu_atti_2_ty2 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_2_ty2", "Ty2", base.DEC) +f.imu_atti_2_tz2 = ProtoField.int16 ("dji_mavic_flyrec.imu_atti_2_tz2", "Tz2", base.DEC) +f.imu_atti_2_sensor_stat2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_2_sensor_stat2", "Sensor Stat2", base.HEX) +f.imu_atti_2_filter_stat2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_2_filter_stat2", "Filter Stat2", base.HEX) +f.imu_atti_2_svn2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_2_svn2", "Svn2", base.HEX) +f.imu_atti_2_atti_cnt2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_atti_2_atti_cnt2", "Atti Cnt2", base.HEX) + +local function flightrec_imu_atti_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_2_long2, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_2_lati2, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_2_press2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_ax2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_ay2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_az2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_wx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_wy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_wz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_alti2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_qw2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_qx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_qy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_qz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_agx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_agy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_agz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_vgx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_vgy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_vgz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_gbx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_gby2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_gbz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_mx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_my2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_mz2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_tx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_ty2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_tz2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_sensor_stat2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_filter_stat2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_svn2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_atti_cnt2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 2: Payload size different than expected") end +end + +-- Flight log - Imu Ex 0 - 0x0810 + +f.imu_ex_0_vo_vx0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_vo_vx0", "Vo Vx0", base.DEC) +f.imu_ex_0_vo_vy0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_vo_vy0", "Vo Vy0", base.DEC) +f.imu_ex_0_vo_vz0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_vo_vz0", "Vo Vz0", base.DEC) +f.imu_ex_0_vo_px0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_vo_px0", "Vo Px0", base.DEC) +f.imu_ex_0_vo_py0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_vo_py0", "Vo Py0", base.DEC) +f.imu_ex_0_vo_pz0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_vo_pz0", "Vo Pz0", base.DEC) +f.imu_ex_0_us_v0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_us_v0", "Us V0", base.DEC) +f.imu_ex_0_us_p0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_us_p0", "Us P0", base.DEC) +f.imu_ex_0_rtk_long0 = ProtoField.double ("dji_mavic_flyrec.imu_ex_0_rtk_long0", "Rtk Long0", base.DEC) +f.imu_ex_0_rtk_lati0 = ProtoField.double ("dji_mavic_flyrec.imu_ex_0_rtk_lati0", "Rtk Lati0", base.DEC) +f.imu_ex_0_rtk_alti0 = ProtoField.float ("dji_mavic_flyrec.imu_ex_0_rtk_alti0", "Rtk Alti0", base.DEC) +f.imu_ex_0_flag_navi0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_0_flag_navi0", "Flag Navi0", base.HEX) +f.imu_ex_0_flag_err0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_0_flag_err0", "Flag Err0", base.HEX) +f.imu_ex_0_flag_rsv0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_0_flag_rsv0", "Flag Rsv0", base.HEX) +f.imu_ex_0_ex_cnt0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_0_ex_cnt0", "Ex Cnt0", base.HEX) + +local function flightrec_imu_ex_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_0_vo_vx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_vy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_vz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_px0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_py0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_pz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_us_v0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_us_p0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_rtk_long0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_0_rtk_lati0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_0_rtk_alti0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_flag_navi0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_0_flag_err0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_0_flag_rsv0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_0_ex_cnt0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 0: Payload size different than expected") end +end + +-- Flight log - Imu Ex 1 - 0x0811 + +f.imu_ex_1_vo_vx1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_vo_vx1", "Vo Vx1", base.DEC) +f.imu_ex_1_vo_vy1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_vo_vy1", "Vo Vy1", base.DEC) +f.imu_ex_1_vo_vz1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_vo_vz1", "Vo Vz1", base.DEC) +f.imu_ex_1_vo_px1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_vo_px1", "Vo Px1", base.DEC) +f.imu_ex_1_vo_py1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_vo_py1", "Vo Py1", base.DEC) +f.imu_ex_1_vo_pz1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_vo_pz1", "Vo Pz1", base.DEC) +f.imu_ex_1_us_v1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_us_v1", "Us V1", base.DEC) +f.imu_ex_1_us_p1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_us_p1", "Us P1", base.DEC) +f.imu_ex_1_rtk_long1 = ProtoField.double ("dji_mavic_flyrec.imu_ex_1_rtk_long1", "Rtk Long1", base.DEC) +f.imu_ex_1_rtk_lati1 = ProtoField.double ("dji_mavic_flyrec.imu_ex_1_rtk_lati1", "Rtk Lati1", base.DEC) +f.imu_ex_1_rtk_alti1 = ProtoField.float ("dji_mavic_flyrec.imu_ex_1_rtk_alti1", "Rtk Alti1", base.DEC) +f.imu_ex_1_flag_navi1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_1_flag_navi1", "Flag Navi1", base.HEX) +f.imu_ex_1_flag_err1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_1_flag_err1", "Flag Err1", base.HEX) +f.imu_ex_1_flag_rsv1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_1_flag_rsv1", "Flag Rsv1", base.HEX) +f.imu_ex_1_ex_cnt1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_1_ex_cnt1", "Ex Cnt1", base.HEX) + +local function flightrec_imu_ex_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_1_vo_vx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_vy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_vz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_px1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_py1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_pz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_us_v1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_us_p1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_rtk_long1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_1_rtk_lati1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_1_rtk_alti1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_flag_navi1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_1_flag_err1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_1_flag_rsv1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_1_ex_cnt1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 1: Payload size different than expected") end +end + +-- Flight log - Imu Ex 2 - 0x0812 + +f.imu_ex_2_vo_vx2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_vo_vx2", "Vo Vx2", base.DEC) +f.imu_ex_2_vo_vy2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_vo_vy2", "Vo Vy2", base.DEC) +f.imu_ex_2_vo_vz2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_vo_vz2", "Vo Vz2", base.DEC) +f.imu_ex_2_vo_px2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_vo_px2", "Vo Px2", base.DEC) +f.imu_ex_2_vo_py2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_vo_py2", "Vo Py2", base.DEC) +f.imu_ex_2_vo_pz2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_vo_pz2", "Vo Pz2", base.DEC) +f.imu_ex_2_us_v2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_us_v2", "Us V2", base.DEC) +f.imu_ex_2_us_p2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_us_p2", "Us P2", base.DEC) +f.imu_ex_2_rtk_long2 = ProtoField.double ("dji_mavic_flyrec.imu_ex_2_rtk_long2", "Rtk Long2", base.DEC) +f.imu_ex_2_rtk_lati2 = ProtoField.double ("dji_mavic_flyrec.imu_ex_2_rtk_lati2", "Rtk Lati2", base.DEC) +f.imu_ex_2_rtk_alti2 = ProtoField.float ("dji_mavic_flyrec.imu_ex_2_rtk_alti2", "Rtk Alti2", base.DEC) +f.imu_ex_2_flag_navi2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_2_flag_navi2", "Flag Navi2", base.HEX) +f.imu_ex_2_flag_err2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_2_flag_err2", "Flag Err2", base.HEX) +f.imu_ex_2_flag_rsv2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_2_flag_rsv2", "Flag Rsv2", base.HEX) +f.imu_ex_2_ex_cnt2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_ex_2_ex_cnt2", "Ex Cnt2", base.HEX) + +local function flightrec_imu_ex_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_2_vo_vx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_vy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_vz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_px2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_py2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_pz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_us_v2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_us_p2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_rtk_long2, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_2_rtk_lati2, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_2_rtk_alti2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_flag_navi2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_2_flag_err2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_2_flag_rsv2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_2_ex_cnt2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 2: Payload size different than expected") end +end + +-- Flight log - Atti Mini0 - 0x08a0 + +f.atti_mini0_s_qw0 = ProtoField.float ("dji_mavic_flyrec.atti_mini0_s_qw0", "S Qw0", base.DEC) +f.atti_mini0_s_qx0 = ProtoField.float ("dji_mavic_flyrec.atti_mini0_s_qx0", "S Qx0", base.DEC) +f.atti_mini0_s_qy0 = ProtoField.float ("dji_mavic_flyrec.atti_mini0_s_qy0", "S Qy0", base.DEC) +f.atti_mini0_s_qz0 = ProtoField.float ("dji_mavic_flyrec.atti_mini0_s_qz0", "S Qz0", base.DEC) +f.atti_mini0_s_pgz0 = ProtoField.float ("dji_mavic_flyrec.atti_mini0_s_pgz0", "S Pgz0", base.DEC) +f.atti_mini0_s_vgz0 = ProtoField.float ("dji_mavic_flyrec.atti_mini0_s_vgz0", "S Vgz0", base.DEC) +f.atti_mini0_s_agz0 = ProtoField.float ("dji_mavic_flyrec.atti_mini0_s_agz0", "S Agz0", base.DEC) +f.atti_mini0_s_rsv00 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini0_s_rsv00", "S Rsv00", base.HEX) +f.atti_mini0_s_rsv10 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini0_s_rsv10", "S Rsv10", base.HEX) +f.atti_mini0_s_cnt0 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini0_s_cnt0", "S Cnt0", base.HEX) + +local function flightrec_atti_mini0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.atti_mini0_s_qw0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_qx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_qy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_qz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_pgz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_vgz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_agz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_rsv00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_rsv10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_cnt0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Atti Mini0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Atti Mini0: Payload size different than expected") end +end + +-- Flight log - Atti Mini1 - 0x08a1 + +f.atti_mini1_s_qw1 = ProtoField.float ("dji_mavic_flyrec.atti_mini1_s_qw1", "S Qw1", base.DEC) +f.atti_mini1_s_qx1 = ProtoField.float ("dji_mavic_flyrec.atti_mini1_s_qx1", "S Qx1", base.DEC) +f.atti_mini1_s_qy1 = ProtoField.float ("dji_mavic_flyrec.atti_mini1_s_qy1", "S Qy1", base.DEC) +f.atti_mini1_s_qz1 = ProtoField.float ("dji_mavic_flyrec.atti_mini1_s_qz1", "S Qz1", base.DEC) +f.atti_mini1_s_pgz1 = ProtoField.float ("dji_mavic_flyrec.atti_mini1_s_pgz1", "S Pgz1", base.DEC) +f.atti_mini1_s_vgz1 = ProtoField.float ("dji_mavic_flyrec.atti_mini1_s_vgz1", "S Vgz1", base.DEC) +f.atti_mini1_s_agz1 = ProtoField.float ("dji_mavic_flyrec.atti_mini1_s_agz1", "S Agz1", base.DEC) +f.atti_mini1_s_rsv01 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini1_s_rsv01", "S Rsv01", base.HEX) +f.atti_mini1_s_rsv11 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini1_s_rsv11", "S Rsv11", base.HEX) +f.atti_mini1_s_cnt1 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini1_s_cnt1", "S Cnt1", base.HEX) + +local function flightrec_atti_mini1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.atti_mini1_s_qw1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_qx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_qy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_qz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_pgz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_vgz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_agz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_rsv01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_rsv11, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_cnt1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Atti Mini1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Atti Mini1: Payload size different than expected") end +end + +-- Flight log - Atti Mini2 - 0x08a2 + +f.atti_mini2_s_qw2 = ProtoField.float ("dji_mavic_flyrec.atti_mini2_s_qw2", "S Qw2", base.DEC) +f.atti_mini2_s_qx2 = ProtoField.float ("dji_mavic_flyrec.atti_mini2_s_qx2", "S Qx2", base.DEC) +f.atti_mini2_s_qy2 = ProtoField.float ("dji_mavic_flyrec.atti_mini2_s_qy2", "S Qy2", base.DEC) +f.atti_mini2_s_qz2 = ProtoField.float ("dji_mavic_flyrec.atti_mini2_s_qz2", "S Qz2", base.DEC) +f.atti_mini2_s_pgz2 = ProtoField.float ("dji_mavic_flyrec.atti_mini2_s_pgz2", "S Pgz2", base.DEC) +f.atti_mini2_s_vgz2 = ProtoField.float ("dji_mavic_flyrec.atti_mini2_s_vgz2", "S Vgz2", base.DEC) +f.atti_mini2_s_agz2 = ProtoField.float ("dji_mavic_flyrec.atti_mini2_s_agz2", "S Agz2", base.DEC) +f.atti_mini2_s_rsv02 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini2_s_rsv02", "S Rsv02", base.HEX) +f.atti_mini2_s_rsv12 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini2_s_rsv12", "S Rsv12", base.HEX) +f.atti_mini2_s_cnt2 = ProtoField.uint32 ("dji_mavic_flyrec.atti_mini2_s_cnt2", "S Cnt2", base.HEX) + +local function flightrec_atti_mini2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.atti_mini2_s_qw2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_qx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_qy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_qz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_pgz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_vgz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_agz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_rsv02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_rsv12, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_cnt2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Atti Mini2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Atti Mini2: Payload size different than expected") end +end + +-- Flight log - Imu Fdi 0 - 0x0860 + +f.imu_fdi_0_fdi_gyr0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_0_fdi_gyr0", "Fdi Gyr0", base.HEX) +f.imu_fdi_0_fdi_acc0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_0_fdi_acc0", "Fdi Acc0", base.HEX) +f.imu_fdi_0_fdi_bar0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_0_fdi_bar0", "Fdi Bar0", base.HEX) +f.imu_fdi_0_fdi_mag0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_0_fdi_mag0", "Fdi Mag0", base.HEX) +f.imu_fdi_0_fdi_gps0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_0_fdi_gps0", "Fdi Gps0", base.HEX) +f.imu_fdi_0_fdi_ns0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_0_fdi_ns0", "Fdi Ns0", base.HEX) +f.imu_fdi_0_fdi_multi0 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_0_fdi_multi0", "Fdi Multi0", base.HEX) +f.imu_fdi_0_fdi_cnt0 = ProtoField.uint32 ("dji_mavic_flyrec.imu_fdi_0_fdi_cnt0", "Fdi Cnt0", base.HEX) + +local function flightrec_imu_fdi_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_fdi_0_fdi_gyr0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_acc0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_bar0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_mag0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_gps0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_ns0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_multi0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_cnt0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Fdi 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Fdi 0: Payload size different than expected") end +end + +-- Flight log - Imu Fdi 1 - 0x0861 + +f.imu_fdi_1_fdi_gyr1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_1_fdi_gyr1", "Fdi Gyr1", base.HEX) +f.imu_fdi_1_fdi_acc1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_1_fdi_acc1", "Fdi Acc1", base.HEX) +f.imu_fdi_1_fdi_bar1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_1_fdi_bar1", "Fdi Bar1", base.HEX) +f.imu_fdi_1_fdi_mag1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_1_fdi_mag1", "Fdi Mag1", base.HEX) +f.imu_fdi_1_fdi_gps1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_1_fdi_gps1", "Fdi Gps1", base.HEX) +f.imu_fdi_1_fdi_ns1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_1_fdi_ns1", "Fdi Ns1", base.HEX) +f.imu_fdi_1_fdi_multi1 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_1_fdi_multi1", "Fdi Multi1", base.HEX) +f.imu_fdi_1_fdi_cnt1 = ProtoField.uint32 ("dji_mavic_flyrec.imu_fdi_1_fdi_cnt1", "Fdi Cnt1", base.HEX) + +local function flightrec_imu_fdi_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_fdi_1_fdi_gyr1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_acc1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_bar1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_mag1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_gps1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_ns1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_multi1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_cnt1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Fdi 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Fdi 1: Payload size different than expected") end +end + +-- Flight log - Imu Fdi 2 - 0x0862 + +f.imu_fdi_2_fdi_gyr2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_2_fdi_gyr2", "Fdi Gyr2", base.HEX) +f.imu_fdi_2_fdi_acc2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_2_fdi_acc2", "Fdi Acc2", base.HEX) +f.imu_fdi_2_fdi_bar2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_2_fdi_bar2", "Fdi Bar2", base.HEX) +f.imu_fdi_2_fdi_mag2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_2_fdi_mag2", "Fdi Mag2", base.HEX) +f.imu_fdi_2_fdi_gps2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_2_fdi_gps2", "Fdi Gps2", base.HEX) +f.imu_fdi_2_fdi_ns2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_2_fdi_ns2", "Fdi Ns2", base.HEX) +f.imu_fdi_2_fdi_multi2 = ProtoField.uint16 ("dji_mavic_flyrec.imu_fdi_2_fdi_multi2", "Fdi Multi2", base.HEX) +f.imu_fdi_2_fdi_cnt2 = ProtoField.uint32 ("dji_mavic_flyrec.imu_fdi_2_fdi_cnt2", "Fdi Cnt2", base.HEX) + +local function flightrec_imu_fdi_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_fdi_2_fdi_gyr2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_acc2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_bar2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_mag2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_gps2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_ns2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_multi2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_cnt2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Fdi 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Fdi 2: Payload size different than expected") end +end + +-- Flight log - Hl Debug Data - 0x03ef + +f.hl_debug_data_t_rad_v = ProtoField.float ("dji_mavic_flyrec.hl_debug_data_t_rad_v", "T Rad V", base.DEC) +f.hl_debug_data_t_tan_v = ProtoField.float ("dji_mavic_flyrec.hl_debug_data_t_tan_v", "T Tan V", base.DEC) +f.hl_debug_data_r_rad_v = ProtoField.float ("dji_mavic_flyrec.hl_debug_data_r_rad_v", "R Rad V", base.DEC) +f.hl_debug_data_r_tan_v = ProtoField.float ("dji_mavic_flyrec.hl_debug_data_r_tan_v", "R Tan V", base.DEC) + +local function flightrec_hl_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.hl_debug_data_t_rad_v, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hl_debug_data_t_tan_v, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hl_debug_data_r_rad_v, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hl_debug_data_r_tan_v, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Hl Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Hl Debug Data: Payload size different than expected") end +end + +-- Flight log - Farm Db Data - 0x03f2 + +f.farm_db_data_farm_mode = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_farm_mode", "Farm Mode", base.HEX) +f.farm_db_data_dir_req = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_dir_req", "Dir Req", base.HEX) +f.farm_db_data_cur_dir = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_cur_dir", "Cur Dir", base.HEX) +f.farm_db_data_has_cap = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_has_cap", "Has Cap", base.HEX) +f.farm_db_data_set_pt_a = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_set_pt_a", "Set Pt A", base.HEX) +f.farm_db_data_set_pt_b = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_set_pt_b", "Set Pt B", base.HEX) +f.farm_db_data_next_step = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_next_step", "Next Step", base.HEX) +f.farm_db_data_continue = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_continue", "Continue", base.HEX) +f.farm_db_data_resume = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_resume", "Resume", base.HEX) +f.farm_db_data_r_dir = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_r_dir", "R Dir", base.HEX) +f.farm_db_data_l_dir = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_l_dir", "L Dir", base.HEX) +f.farm_db_data_rc_velx = ProtoField.float ("dji_mavic_flyrec.farm_db_data_rc_velx", "Rc Velx", base.DEC) +f.farm_db_data_rc_vely = ProtoField.float ("dji_mavic_flyrec.farm_db_data_rc_vely", "Rc Vely", base.DEC) +f.farm_db_data_rc_velz = ProtoField.float ("dji_mavic_flyrec.farm_db_data_rc_velz", "Rc Velz", base.DEC) +f.farm_db_data_rc_yaw = ProtoField.float ("dji_mavic_flyrec.farm_db_data_rc_yaw", "Rc Yaw", base.DEC) +f.farm_db_data_vel_limit = ProtoField.float ("dji_mavic_flyrec.farm_db_data_vel_limit", "Vel Limit", base.DEC) +f.farm_db_data_ref_yaw = ProtoField.float ("dji_mavic_flyrec.farm_db_data_ref_yaw", "Ref Yaw", base.DEC) +f.farm_db_data_idx_x = ProtoField.float ("dji_mavic_flyrec.farm_db_data_idx_x", "Idx X", base.DEC) +f.farm_db_data_idx_y = ProtoField.float ("dji_mavic_flyrec.farm_db_data_idx_y", "Idx Y", base.DEC) +f.farm_db_data_d_dis_x = ProtoField.float ("dji_mavic_flyrec.farm_db_data_d_dis_x", "D Dis X", base.DEC) +f.farm_db_data_d_dis_y = ProtoField.float ("dji_mavic_flyrec.farm_db_data_d_dis_y", "D Dis Y", base.DEC) +f.farm_db_data_tgt_ref_h = ProtoField.float ("dji_mavic_flyrec.farm_db_data_tgt_ref_h", "Tgt Ref H", base.DEC) +f.farm_db_data_tgt_ref_h_f = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_tgt_ref_h_f", "Tgt Ref H F", base.HEX) +f.farm_db_data_vel_x_out = ProtoField.float ("dji_mavic_flyrec.farm_db_data_vel_x_out", "Vel X Out", base.DEC) +f.farm_db_data_vel_y_out = ProtoField.float ("dji_mavic_flyrec.farm_db_data_vel_y_out", "Vel Y Out", base.DEC) +f.farm_db_data_vel_z_out = ProtoField.float ("dji_mavic_flyrec.farm_db_data_vel_z_out", "Vel Z Out", base.DEC) +f.farm_db_data_ref_h_work = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_ref_h_work", "Ref H Work", base.HEX) +f.farm_db_data_radar_type = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_radar_type", "Radar Type", base.HEX) +f.farm_db_data_cur_ref_h = ProtoField.float ("dji_mavic_flyrec.farm_db_data_cur_ref_h", "Cur Ref H", base.DEC) +f.farm_db_data_ref_vz_cmd = ProtoField.float ("dji_mavic_flyrec.farm_db_data_ref_vz_cmd", "Ref Vz Cmd", base.DEC) +f.farm_db_data_ref_pz = ProtoField.float ("dji_mavic_flyrec.farm_db_data_ref_pz", "Ref Pz", base.DEC) +f.farm_db_data_app_resume_mode = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_app_resume_mode", "App Resume Mode", base.HEX) +f.farm_db_data_resume_interaction = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_resume_interaction", "Resume Interaction", base.HEX) +f.farm_db_data_auto_line_init_ready = ProtoField.uint8 ("dji_mavic_flyrec.farm_db_data_auto_line_init_ready", "Auto Line Init Ready", base.HEX) + +local function flightrec_farm_db_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.farm_db_data_farm_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_dir_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_cur_dir, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_has_cap, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_set_pt_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_set_pt_b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_next_step, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_continue, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_resume, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_r_dir, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_l_dir, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_rc_velx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_rc_vely, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_rc_velz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_rc_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_vel_limit, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_ref_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_idx_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_idx_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_d_dis_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_d_dis_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_tgt_ref_h, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_tgt_ref_h_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_vel_x_out, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_vel_y_out, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_vel_z_out, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_ref_h_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_radar_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_cur_ref_h, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_ref_vz_cmd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_ref_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_app_resume_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_resume_interaction, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_auto_line_init_ready, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 85) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Farm Db Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Farm Db Data: Payload size different than expected") end +end + +-- Flight log - Spray Sys Ctrl Cmd - 0x4ef7 + +f.spray_sys_ctrl_cmd_enable_flag_0 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_enable_flag_0", "Enable Flag 0", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_0 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_flow_speed_0", "Flow Speed 0", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_1 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_enable_flag_1", "Enable Flag 1", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_1 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_flow_speed_1", "Flow Speed 1", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_2 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_enable_flag_2", "Enable Flag 2", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_2 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_flow_speed_2", "Flow Speed 2", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_3 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_enable_flag_3", "Enable Flag 3", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_3 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_flow_speed_3", "Flow Speed 3", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_4 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_enable_flag_4", "Enable Flag 4", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_4 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_flow_speed_4", "Flow Speed 4", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_5 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_enable_flag_5", "Enable Flag 5", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_5 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_flow_speed_5", "Flow Speed 5", base.HEX) +f.spray_sys_ctrl_cmd_valid_spray = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_ctrl_cmd_valid_spray", "Valid Spray", base.HEX) + +local function flightrec_spray_sys_ctrl_cmd_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_valid_spray, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 13) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Spray Sys Ctrl Cmd: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Spray Sys Ctrl Cmd: Payload size different than expected") end +end + +-- Flight log - Spray Sys State - 0x4ef8 + +f.spray_sys_state_cap_percentage = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_cap_percentage", "Cap Percentage", base.HEX) +f.spray_sys_state_flow_speed_0 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_flow_speed_0", "Flow Speed 0", base.HEX) +f.spray_sys_state_flow_speed_1 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_flow_speed_1", "Flow Speed 1", base.HEX) +f.spray_sys_state_pump_press_1 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_pump_press_1", "Pump Press 1", base.HEX) +f.spray_sys_state_pump_press_2 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_pump_press_2", "Pump Press 2", base.HEX) +f.spray_sys_state_plug_xt90 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_plug_xt90", "Plug Xt90", base.HEX) +f.spray_sys_state_plug_xt100 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_plug_xt100", "Plug Xt100", base.HEX) +f.spray_sys_state_esc_flag_0 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_esc_flag_0", "Esc Flag 0", base.HEX) +f.spray_sys_state_reserved_0 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_reserved_0", "Reserved 0", base.HEX) +f.spray_sys_state_esc_flag_1 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_esc_flag_1", "Esc Flag 1", base.HEX) +f.spray_sys_state_reserved_1 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_reserved_1", "Reserved 1", base.HEX) +f.spray_sys_state_esc_flag_2 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_esc_flag_2", "Esc Flag 2", base.HEX) +f.spray_sys_state_reserved_2 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_reserved_2", "Reserved 2", base.HEX) +f.spray_sys_state_esc_flag_3 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_esc_flag_3", "Esc Flag 3", base.HEX) +f.spray_sys_state_reserved_3 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_reserved_3", "Reserved 3", base.HEX) +f.spray_sys_state_esc_flag_4 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_esc_flag_4", "Esc Flag 4", base.HEX) +f.spray_sys_state_reserved_4 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_reserved_4", "Reserved 4", base.HEX) +f.spray_sys_state_esc_flag_5 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_esc_flag_5", "Esc Flag 5", base.HEX) +f.spray_sys_state_reserved_5 = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_reserved_5", "Reserved 5", base.HEX) +f.spray_sys_state_cnt = ProtoField.uint8 ("dji_mavic_flyrec.spray_sys_state_cnt", "Cnt", base.HEX) + +local function flightrec_spray_sys_state_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.spray_sys_state_cap_percentage, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_flow_speed_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_flow_speed_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_pump_press_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_pump_press_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_plug_xt90, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_plug_xt100, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Spray Sys State: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Spray Sys State: Payload size different than expected") end +end + +-- Flight log - Ctrl Vert Debug - 0x04b0 + +f.ctrl_vert_debug_vert_mode = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_vert_mode", "Vert Mode", base.HEX) +f.ctrl_vert_debug_vert_state = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_vert_state", "Vert State", base.HEX) +f.ctrl_vert_debug_vert_flag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_vert_flag", "Vert Flag", base.HEX) +f.ctrl_vert_debug_vert_pos = ProtoField.float ("dji_mavic_flyrec.ctrl_vert_debug_vert_pos", "Vert Pos", base.DEC) +f.ctrl_vert_debug_vert_brk_t = ProtoField.float ("dji_mavic_flyrec.ctrl_vert_debug_vert_brk_t", "Vert Brk T", base.DEC) +f.ctrl_vert_debug_near_bound = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_near_bound", "Near Bound", base.HEX) +f.ctrl_vert_debug_true_h_lmt = ProtoField.float ("dji_mavic_flyrec.ctrl_vert_debug_true_h_lmt", "True H Lmt", base.DEC) +f.ctrl_vert_debug_takeoff_t = ProtoField.float ("dji_mavic_flyrec.ctrl_vert_debug_takeoff_t", "Takeoff T", base.DEC) +f.ctrl_vert_debug_hit_gnd = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_hit_gnd", "Hit Gnd", base.HEX) +f.ctrl_vert_debug_high_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_high_os_f", "High Os F", base.HEX) +f.ctrl_vert_debug_low_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_low_os_f", "Low Os F", base.HEX) +f.ctrl_vert_debug_ap_high_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_ap_high_os_f", "Ap High Os F", base.HEX) +f.ctrl_vert_debug_gnd_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_gnd_os_f", "Gnd Os F", base.HEX) +f.ctrl_vert_debug_rf_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_rf_os_f", "Rf Os F", base.HEX) +f.ctrl_vert_debug_v_lmt_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_v_lmt_os_f", "V Lmt Os F", base.HEX) +f.ctrl_vert_debug_landing_tyoe = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vert_debug_landing_tyoe", "Landing Tyoe", base.HEX) + +local function flightrec_ctrl_vert_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_vert_debug_vert_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_vert_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_vert_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_vert_pos, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_debug_vert_brk_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_debug_near_bound, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_true_h_lmt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_debug_takeoff_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_debug_hit_gnd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_high_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_low_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_ap_high_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_gnd_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_rf_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_v_lmt_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_landing_tyoe, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Vert Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Vert Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Pos Vert Debug - 0x04b1 + +f.ctrl_pos_vert_debug_pos_tag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_pos_vert_debug_pos_tag", "Pos Tag", base.HEX) +f.ctrl_pos_vert_debug_pos_cmd = ProtoField.int16 ("dji_mavic_flyrec.ctrl_pos_vert_debug_pos_cmd", "Pos Cmd", base.DEC) +f.ctrl_pos_vert_debug_pos_fdbk = ProtoField.int16 ("dji_mavic_flyrec.ctrl_pos_vert_debug_pos_fdbk", "Pos Fdbk", base.DEC) + +local function flightrec_ctrl_pos_vert_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_pos_vert_debug_pos_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_pos_vert_debug_pos_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_pos_vert_debug_pos_fdbk, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Pos Vert Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Pos Vert Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Vel Vert Debug - 0x04b2 + +f.ctrl_vel_vert_debug_vel_tag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_vel_tag", "Vel Tag", base.HEX) +f.ctrl_vel_vert_debug_vel_cmd = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_vel_cmd", "Vel Cmd", base.DEC) +f.ctrl_vel_vert_debug_vel_before = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_vel_before", "Vel Before", base.DEC) +f.ctrl_vel_vert_debug_vel_after = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_vel_after", "Vel After", base.DEC) +f.ctrl_vel_vert_debug_vel_fdbk = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_vel_fdbk", "Vel Fdbk", base.DEC) +f.ctrl_vel_vert_debug_gnd_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_gnd_en", "Gnd En", base.HEX) +f.ctrl_vel_vert_debug_gnd_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_gnd_work", "Gnd Work", base.HEX) +f.ctrl_vel_vert_debug_gnd_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_gnd_norm", "Gnd Norm", base.DEC) +f.ctrl_vel_vert_debug_gnd_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_gnd_damp", "Gnd Damp", base.DEC) +f.ctrl_vel_vert_debug_roof_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_roof_en", "Roof En", base.HEX) +f.ctrl_vel_vert_debug_roof_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_roof_work", "Roof Work", base.HEX) +f.ctrl_vel_vert_debug_roof_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_roof_norm", "Roof Norm", base.DEC) +f.ctrl_vel_vert_debug_roof_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_roof_damp", "Roof Damp", base.DEC) +f.ctrl_vel_vert_debug_low_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_low_en", "Low En", base.HEX) +f.ctrl_vel_vert_debug_low_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_low_work", "Low Work", base.HEX) +f.ctrl_vel_vert_debug_low_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_low_norm", "Low Norm", base.DEC) +f.ctrl_vel_vert_debug_low_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_low_damp", "Low Damp", base.DEC) +f.ctrl_vel_vert_debug_high_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_high_en", "High En", base.HEX) +f.ctrl_vel_vert_debug_high_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_high_work", "High Work", base.HEX) +f.ctrl_vel_vert_debug_high_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_high_norm", "High Norm", base.DEC) +f.ctrl_vel_vert_debug_high_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_high_damp", "High Damp", base.DEC) +f.ctrl_vel_vert_debug_ap_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_work", "Ap Work", base.HEX) +f.ctrl_vel_vert_debug_ap_en0 = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_en0", "Ap En0", base.HEX) +f.ctrl_vel_vert_debug_ap_norm0 = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_norm0", "Ap Norm0", base.DEC) +f.ctrl_vel_vert_debug_ap_damp0 = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_damp0", "Ap Damp0", base.DEC) +f.ctrl_vel_vert_debug_ap_en1 = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_en1", "Ap En1", base.HEX) +f.ctrl_vel_vert_debug_ap_norm1 = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_norm1", "Ap Norm1", base.DEC) +f.ctrl_vel_vert_debug_ap_damp1 = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_damp1", "Ap Damp1", base.DEC) +f.ctrl_vel_vert_debug_ap_en2 = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_en2", "Ap En2", base.HEX) +f.ctrl_vel_vert_debug_ap_norm2 = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_norm2", "Ap Norm2", base.DEC) +f.ctrl_vel_vert_debug_ap_damp2 = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_ap_damp2", "Ap Damp2", base.DEC) +f.ctrl_vel_vert_debug_hit_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_hit_en", "Hit En", base.HEX) +f.ctrl_vel_vert_debug_hit_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_vel_vert_debug_hit_work", "Hit Work", base.HEX) +f.ctrl_vel_vert_debug_hit_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_hit_norm", "Hit Norm", base.DEC) +f.ctrl_vel_vert_debug_hit_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_vel_vert_debug_hit_damp", "Hit Damp", base.DEC) + +local function flightrec_ctrl_vel_vert_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_before, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_after, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_fdbk, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_gnd_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_gnd_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_gnd_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_gnd_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_roof_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_roof_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_roof_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_roof_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_low_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_low_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_low_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_low_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_high_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_high_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_high_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_high_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_en0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_norm0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_damp0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_en1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_norm1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_damp1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_en2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_norm2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_damp2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_hit_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_hit_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_hit_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_hit_damp, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 55) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Vel Vert Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Vel Vert Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Acc Vert Debug - 0x04b3 + +f.ctrl_acc_vert_debug_acc_tag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_acc_vert_debug_acc_tag", "Acc Tag", base.HEX) +f.ctrl_acc_vert_debug_acc_cmd = ProtoField.int16 ("dji_mavic_flyrec.ctrl_acc_vert_debug_acc_cmd", "Acc Cmd", base.DEC) +f.ctrl_acc_vert_debug_acc_fdbk = ProtoField.int16 ("dji_mavic_flyrec.ctrl_acc_vert_debug_acc_fdbk", "Acc Fdbk", base.DEC) +f.ctrl_acc_vert_debug_thr_cmd = ProtoField.int16 ("dji_mavic_flyrec.ctrl_acc_vert_debug_thr_cmd", "Thr Cmd", base.DEC) + +local function flightrec_ctrl_acc_vert_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_acc_vert_debug_acc_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_acc_vert_debug_acc_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_acc_vert_debug_acc_fdbk, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_acc_vert_debug_thr_cmd, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Acc Vert Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Acc Vert Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Debug - 0x0514 + +f.ctrl_horiz_debug_horiz_mode = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_horiz_mode", "Horiz Mode", base.HEX) +f.ctrl_horiz_debug_hov_state = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_hov_state", "Hov State", base.HEX) +f.ctrl_horiz_debug_hov_flag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_hov_flag", "Hov Flag", base.HEX) +f.ctrl_horiz_debug_hov_px = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_hov_px", "Hov Px", base.DEC) +f.ctrl_horiz_debug_hov_py = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_hov_py", "Hov Py", base.DEC) +f.ctrl_horiz_debug_hov_brk_t = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_hov_brk_t", "Hov Brk T", base.DEC) +f.ctrl_horiz_debug_hov_cfrm_t = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_hov_cfrm_t", "Hov Cfrm T", base.DEC) +f.ctrl_horiz_debug_pos_cmdx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_pos_cmdx", "Pos Cmdx", base.DEC) +f.ctrl_horiz_debug_pos_cmdy = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_pos_cmdy", "Pos Cmdy", base.DEC) +f.ctrl_horiz_debug_vel_cmdx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_vel_cmdx", "Vel Cmdx", base.DEC) +f.ctrl_horiz_debug_vel_cmdy = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_vel_cmdy", "Vel Cmdy", base.DEC) +f.ctrl_horiz_debug_h_api_mode = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_h_api_mode", "H Api Mode", base.HEX) +f.ctrl_horiz_debug_h_api_frm = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_h_api_frm", "H Api Frm", base.HEX) +f.ctrl_horiz_debug_tilt_cmd_x = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_tilt_cmd_x", "Tilt Cmd X", base.DEC) +f.ctrl_horiz_debug_tilt_cmd_y = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_tilt_cmd_y", "Tilt Cmd Y", base.DEC) +f.ctrl_horiz_debug_v_ctrl_mod = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_v_ctrl_mod", "V Ctrl Mod", base.HEX) +f.ctrl_horiz_debug_trs_f_req = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_trs_f_req", "Trs F Req", base.HEX) +f.ctrl_horiz_debug_trs_f_flg = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_trs_f_flg", "Trs F Flg", base.HEX) +f.ctrl_horiz_debug_trs_mod = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_trs_mod", "Trs Mod", base.HEX) +f.ctrl_horiz_debug_trs_lck_st = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_trs_lck_st", "Trs Lck St", base.HEX) +f.ctrl_horiz_debug_trs_p_cmd = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_trs_p_cmd", "Trs P Cmd", base.DEC) +f.ctrl_horiz_debug_trs_v_cmd = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_trs_v_cmd", "Trs V Cmd", base.DEC) +f.ctrl_horiz_debug_trs_p_lck = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_trs_p_lck", "Trs P Lck", base.DEC) +f.ctrl_horiz_debug_trs_lck_t = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_trs_lck_t", "Trs Lck T", base.DEC) +f.ctrl_horiz_debug_emg_brk_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_emg_brk_f", "Emg Brk F", base.HEX) +f.ctrl_horiz_debug_near_bnd = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_near_bnd", "Near Bnd", base.HEX) +f.ctrl_horiz_debug_al_avoid = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_al_avoid", "Al Avoid", base.DEC) +f.ctrl_horiz_debug_al_gmb_typ = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_al_gmb_typ", "Al Gmb Typ", base.DEC) +f.ctrl_horiz_debug_al_bat = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_al_bat", "Al Bat", base.DEC) +f.ctrl_horiz_debug_al_gmb_pri = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_al_gmb_pri", "Al Gmb Pri", base.DEC) +f.ctrl_horiz_debug_al_final = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_al_final", "Al Final", base.DEC) +f.ctrl_horiz_debug_avoid_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_avoid_en", "Avoid En", base.HEX) +f.ctrl_horiz_debug_flw_gmb_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_flw_gmb_f", "Flw Gmb F", base.HEX) +f.ctrl_horiz_debug_in_flw_gmb = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_in_flw_gmb", "In Flw Gmb", base.HEX) +f.ctrl_horiz_debug_gf_tgt_yaw = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_gf_tgt_yaw", "Gf Tgt Yaw", base.DEC) +f.ctrl_horiz_debug_gf_cur_yaw = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_gf_cur_yaw", "Gf Cur Yaw", base.DEC) +f.ctrl_horiz_debug_g_tgt_gyro = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_debug_g_tgt_gyro", "G Tgt Gyro", base.DEC) +f.ctrl_horiz_debug_track_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_track_en", "Track En", base.HEX) +f.ctrl_horiz_debug_watch_mode = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_watch_mode", "Watch Mode", base.HEX) +f.ctrl_horiz_debug_trck_yaw_v = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_trck_yaw_v", "Trck Yaw V", base.DEC) +f.ctrl_horiz_debug_cl_tors = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_debug_cl_tors", "Cl Tors", base.DEC) +f.ctrl_horiz_debug_ap_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_ap_os_f", "Ap Os F", base.HEX) +f.ctrl_horiz_debug_avd_ob_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_avd_ob_os_f", "Avd Ob Os F", base.HEX) +f.ctrl_horiz_debug_h_fence_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_h_fence_os_f", "H Fence Os F", base.HEX) +f.ctrl_horiz_debug_r_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_r_os_f", "R Os F", base.HEX) +f.ctrl_horiz_debug_h_lmt_os_f = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_debug_h_lmt_os_f", "H Lmt Os F", base.HEX) +f.ctrl_horiz_debug_true_rad_lmt = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_debug_true_rad_lmt", "True Rad Lmt", base.HEX) + +local function flightrec_ctrl_horiz_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_debug_horiz_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_hov_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_hov_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_hov_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_hov_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_hov_brk_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_hov_cfrm_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_pos_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_pos_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_vel_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_vel_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_h_api_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_h_api_frm, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_tilt_cmd_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_tilt_cmd_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_v_ctrl_mod, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_f_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_f_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_mod, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_lck_st, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_p_cmd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_trs_v_cmd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_trs_p_lck, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_trs_lck_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_emg_brk_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_near_bnd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_al_avoid, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_al_gmb_typ, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_al_bat, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_al_gmb_pri, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_al_final, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_avoid_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_flw_gmb_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_in_flw_gmb, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_gf_tgt_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_gf_cur_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_g_tgt_gyro, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_track_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_watch_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trck_yaw_v, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_cl_tors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_ap_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_avd_ob_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_h_fence_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_r_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_h_lmt_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_true_rad_lmt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 102) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Pos Debug - 0x0515 + +f.ctrl_horiz_pos_debug_pos_tag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_pos_debug_pos_tag", "Pos Tag", base.HEX) +f.ctrl_horiz_pos_debug_pos_cmdx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_pos_debug_pos_cmdx", "Pos Cmdx", base.DEC) +f.ctrl_horiz_pos_debug_pos_cmdy = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_pos_debug_pos_cmdy", "Pos Cmdy", base.DEC) + +local function flightrec_ctrl_horiz_pos_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_pos_debug_pos_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_pos_debug_pos_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_pos_debug_pos_cmdy, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 9) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Pos Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Pos Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Vel Debug - 0x0516 + +f.ctrl_horiz_vel_debug_vel_tag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_vel_tag", "Vel Tag", base.HEX) +f.ctrl_horiz_vel_debug_vel_cmdx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_vel_cmdx", "Vel Cmdx", base.DEC) +f.ctrl_horiz_vel_debug_vel_cmdy = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_vel_cmdy", "Vel Cmdy", base.DEC) +f.ctrl_horiz_vel_debug_befor_cmdx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_befor_cmdx", "Befor Cmdx", base.DEC) +f.ctrl_horiz_vel_debug_befor_cmdy = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_befor_cmdy", "Befor Cmdy", base.DEC) +f.ctrl_horiz_vel_debug_fltr_cmdx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_fltr_cmdx", "Fltr Cmdx", base.DEC) +f.ctrl_horiz_vel_debug_fltr_cmdy = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_fltr_cmdy", "Fltr Cmdy", base.DEC) +f.ctrl_horiz_vel_debug_dyn_gain = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_dyn_gain", "Dyn Gain", base.DEC) +f.ctrl_horiz_vel_debug_dyn_p_gain = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_dyn_p_gain", "Dyn P Gain", base.DEC) +f.ctrl_horiz_vel_debug_vel_fdbkx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_vel_fdbkx", "Vel Fdbkx", base.DEC) +f.ctrl_horiz_vel_debug_vel_fdbky = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_vel_debug_vel_fdbky", "Vel Fdbky", base.DEC) +f.ctrl_horiz_vel_debug_rad_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_rad_en", "Rad En", base.HEX) +f.ctrl_horiz_vel_debug_rad_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_rad_work", "Rad Work", base.HEX) +f.ctrl_horiz_vel_debug_rad_dir_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_rad_dir_x", "Rad Dir X", base.DEC) +f.ctrl_horiz_vel_debug_rad_dir_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_rad_dir_y", "Rad Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_rad_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_rad_norm", "Rad Norm", base.DEC) +f.ctrl_horiz_vel_debug_rad_direct = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_rad_direct", "Rad Direct", base.DEC) +f.ctrl_horiz_vel_debug_rad_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_rad_damp", "Rad Damp", base.DEC) +f.ctrl_horiz_vel_debug_ap0_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap0_en", "Ap0 En", base.HEX) +f.ctrl_horiz_vel_debug_ap0_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap0_work", "Ap0 Work", base.HEX) +f.ctrl_horiz_vel_debug_ap0_dir_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap0_dir_x", "Ap0 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ap0_dir_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap0_dir_y", "Ap0 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ap0_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap0_norm", "Ap0 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ap0_direct = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap0_direct", "Ap0 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ap0_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap0_damp", "Ap0 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ap0_dis = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap0_dis", "Ap0 Dis", base.DEC) +f.ctrl_horiz_vel_debug_ap1_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap1_en", "Ap1 En", base.HEX) +f.ctrl_horiz_vel_debug_ap1_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap1_work", "Ap1 Work", base.HEX) +f.ctrl_horiz_vel_debug_ap1_dir_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap1_dir_x", "Ap1 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ap1_dir_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap1_dir_y", "Ap1 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ap1_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap1_norm", "Ap1 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ap1_direct = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap1_direct", "Ap1 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ap1_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap1_damp", "Ap1 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ap1_dis = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap1_dis", "Ap1 Dis", base.DEC) +f.ctrl_horiz_vel_debug_ap2_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap2_en", "Ap2 En", base.HEX) +f.ctrl_horiz_vel_debug_ap2_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap2_work", "Ap2 Work", base.HEX) +f.ctrl_horiz_vel_debug_ap2_dir_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap2_dir_x", "Ap2 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ap2_dir_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap2_dir_y", "Ap2 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ap2_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap2_norm", "Ap2 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ap2_direct = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap2_direct", "Ap2 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ap2_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap2_damp", "Ap2 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ap2_dis = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ap2_dis", "Ap2 Dis", base.DEC) +f.ctrl_horiz_vel_debug_ao0_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao0_en", "Ao0 En", base.HEX) +f.ctrl_horiz_vel_debug_ao0_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao0_work", "Ao0 Work", base.HEX) +f.ctrl_horiz_vel_debug_ao0_dir_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao0_dir_x", "Ao0 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ao0_dir_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao0_dir_y", "Ao0 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ao0_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao0_norm", "Ao0 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ao0_direct = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao0_direct", "Ao0 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ao0_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao0_damp", "Ao0 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ao1_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao1_en", "Ao1 En", base.HEX) +f.ctrl_horiz_vel_debug_ao1_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao1_work", "Ao1 Work", base.HEX) +f.ctrl_horiz_vel_debug_ao1_dir_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao1_dir_x", "Ao1 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ao1_dir_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao1_dir_y", "Ao1 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ao1_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao1_norm", "Ao1 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ao1_direct = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao1_direct", "Ao1 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ao1_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao1_damp", "Ao1 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ao2_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao2_en", "Ao2 En", base.HEX) +f.ctrl_horiz_vel_debug_ao2_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao2_work", "Ao2 Work", base.HEX) +f.ctrl_horiz_vel_debug_ao2_dir_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao2_dir_x", "Ao2 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ao2_dir_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao2_dir_y", "Ao2 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ao2_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao2_norm", "Ao2 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ao2_direct = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao2_direct", "Ao2 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ao2_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao2_damp", "Ao2 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ao3_en = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao3_en", "Ao3 En", base.HEX) +f.ctrl_horiz_vel_debug_ao3_work = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao3_work", "Ao3 Work", base.HEX) +f.ctrl_horiz_vel_debug_ao3_dir_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao3_dir_x", "Ao3 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ao3_dir_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao3_dir_y", "Ao3 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ao3_norm = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao3_norm", "Ao3 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ao3_direct = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao3_direct", "Ao3 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ao3_damp = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_vel_debug_ao3_damp", "Ao3 Damp", base.DEC) + +local function flightrec_ctrl_horiz_vel_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_befor_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_befor_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_fltr_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_fltr_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_dyn_gain, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_dyn_p_gain, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_fdbkx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_fdbky, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_damp, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 143) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Vel Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Vel Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Atti Debug - 0x0518 + +f.ctrl_horiz_atti_debug_atti_tag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_atti_debug_atti_tag", "Atti Tag", base.HEX) +f.ctrl_horiz_atti_debug_tors_type = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_horiz_atti_debug_tors_type", "Tors Type", base.HEX) +f.ctrl_horiz_atti_debug_tgt_tors = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_atti_debug_tgt_tors", "Tgt Tors", base.DEC) +f.ctrl_horiz_atti_debug_tgt_tilt_x = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_atti_debug_tgt_tilt_x", "Tgt Tilt X", base.DEC) +f.ctrl_horiz_atti_debug_tgt_tilt_y = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_atti_debug_tgt_tilt_y", "Tgt Tilt Y", base.DEC) +f.ctrl_horiz_atti_debug_tgt_body_x = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_atti_debug_tgt_body_x", "Tgt Body X", base.DEC) +f.ctrl_horiz_atti_debug_tgt_body_y = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_atti_debug_tgt_body_y", "Tgt Body Y", base.DEC) +f.ctrl_horiz_atti_debug_cur_tors = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_atti_debug_cur_tors", "Cur Tors", base.DEC) +f.ctrl_horiz_atti_debug_cur_tilt_x = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_atti_debug_cur_tilt_x", "Cur Tilt X", base.DEC) +f.ctrl_horiz_atti_debug_cur_tilt_y = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_atti_debug_cur_tilt_y", "Cur Tilt Y", base.DEC) + +local function flightrec_ctrl_horiz_atti_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_atti_debug_atti_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_atti_debug_tors_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_tors, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_tilt_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_body_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_body_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_cur_tors, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_cur_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_cur_tilt_y, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 34) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Atti Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Atti Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Ang Vel Debug - 0x0519 + +f.ctrl_horiz_ang_vel_debug_gyro_cmdx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_ang_vel_debug_gyro_cmdx", "Gyro Cmdx", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_cmdy = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_ang_vel_debug_gyro_cmdy", "Gyro Cmdy", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_cmdz = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_ang_vel_debug_gyro_cmdz", "Gyro Cmdz", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_fbkx = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_ang_vel_debug_gyro_fbkx", "Gyro Fbkx", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_fbky = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_ang_vel_debug_gyro_fbky", "Gyro Fbky", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_fbkz = ProtoField.float ("dji_mavic_flyrec.ctrl_horiz_ang_vel_debug_gyro_fbkz", "Gyro Fbkz", base.DEC) + +local function flightrec_ctrl_horiz_ang_vel_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_cmdz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_fbkx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_fbky, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_fbkz, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Ang Vel Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Ang Vel Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Ccpm Debug - 0x051a + +f.ctrl_horiz_ccpm_debug_raw_tilt_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_raw_tilt_x", "Raw Tilt X", base.DEC) +f.ctrl_horiz_ccpm_debug_raw_tilt_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_raw_tilt_y", "Raw Tilt Y", base.DEC) +f.ctrl_horiz_ccpm_debug_raw_tors = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_raw_tors", "Raw Tors", base.DEC) +f.ctrl_horiz_ccpm_debug_raw_lift = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_raw_lift", "Raw Lift", base.DEC) +f.ctrl_horiz_ccpm_debug_fix_tilt_x = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_fix_tilt_x", "Fix Tilt X", base.DEC) +f.ctrl_horiz_ccpm_debug_fix_tilt_y = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_fix_tilt_y", "Fix Tilt Y", base.DEC) +f.ctrl_horiz_ccpm_debug_fix_tor = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_fix_tor", "Fix Tor", base.DEC) +f.ctrl_horiz_ccpm_debug_fix_lift = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_fix_lift", "Fix Lift", base.DEC) +f.ctrl_horiz_ccpm_debug_thr_max = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_thr_max", "Thr Max", base.DEC) +f.ctrl_horiz_ccpm_debug_thr_min = ProtoField.int16 ("dji_mavic_flyrec.ctrl_horiz_ccpm_debug_thr_min", "Thr Min", base.DEC) + +local function flightrec_ctrl_horiz_ccpm_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_raw_tilt_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_raw_tilt_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_raw_tors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_raw_lift, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_fix_tilt_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_fix_tilt_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_fix_tor, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_fix_lift, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_thr_max, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_thr_min, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Ccpm Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Ccpm Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Motor Debug - 0x051b + +f.ctrl_horiz_motor_debug_pwm1 = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_motor_debug_pwm1", "Pwm1", base.HEX) +f.ctrl_horiz_motor_debug_pwm2 = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_motor_debug_pwm2", "Pwm2", base.HEX) +f.ctrl_horiz_motor_debug_pwm3 = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_motor_debug_pwm3", "Pwm3", base.HEX) +f.ctrl_horiz_motor_debug_pwm4 = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_motor_debug_pwm4", "Pwm4", base.HEX) +f.ctrl_horiz_motor_debug_pwm5 = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_motor_debug_pwm5", "Pwm5", base.HEX) +f.ctrl_horiz_motor_debug_pwm6 = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_motor_debug_pwm6", "Pwm6", base.HEX) +f.ctrl_horiz_motor_debug_pwm7 = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_motor_debug_pwm7", "Pwm7", base.HEX) +f.ctrl_horiz_motor_debug_pwm8 = ProtoField.uint16 ("dji_mavic_flyrec.ctrl_horiz_motor_debug_pwm8", "Pwm8", base.HEX) + +local function flightrec_ctrl_horiz_motor_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm8, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Motor Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Motor Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Sweep Test - 0x051c + +f.ctrl_sweep_test_inj_a = ProtoField.float ("dji_mavic_flyrec.ctrl_sweep_test_inj_a", "Inj A", base.DEC) +f.ctrl_sweep_test_inj_b = ProtoField.float ("dji_mavic_flyrec.ctrl_sweep_test_inj_b", "Inj B", base.DEC) +f.ctrl_sweep_test_r = ProtoField.float ("dji_mavic_flyrec.ctrl_sweep_test_r", "R", base.DEC) +f.ctrl_sweep_test_e = ProtoField.float ("dji_mavic_flyrec.ctrl_sweep_test_e", "E", base.DEC) +f.ctrl_sweep_test_u = ProtoField.float ("dji_mavic_flyrec.ctrl_sweep_test_u", "U", base.DEC) +f.ctrl_sweep_test_y = ProtoField.float ("dji_mavic_flyrec.ctrl_sweep_test_y", "Y", base.DEC) + +local function flightrec_ctrl_sweep_test_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_sweep_test_inj_a, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_inj_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_u, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_y, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Sweep Test: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Sweep Test: Payload size different than expected") end +end + +-- Flight log - Way Debug Info - 0x0460 + +f.way_debug_info_mis_stus = ProtoField.uint8 ("dji_mavic_flyrec.way_debug_info_mis_stus", "Mis Stus", base.HEX) +f.way_debug_info_wp_num = ProtoField.uint8 ("dji_mavic_flyrec.way_debug_info_wp_num", "Wp Num", base.HEX) +f.way_debug_info_t_vel = ProtoField.int16 ("dji_mavic_flyrec.way_debug_info_t_vel", "T Vel", base.DEC) +f.way_debug_info_traj_type = ProtoField.uint8 ("dji_mavic_flyrec.way_debug_info_traj_type", "Traj Type", base.HEX) +f.way_debug_info_wp_t = ProtoField.uint16 ("dji_mavic_flyrec.way_debug_info_wp_t", "Wp T", base.HEX) +f.way_debug_info_t_p_x = ProtoField.float ("dji_mavic_flyrec.way_debug_info_t_p_x", "T P X", base.DEC) +f.way_debug_info_t_p_y = ProtoField.float ("dji_mavic_flyrec.way_debug_info_t_p_y", "T P Y", base.DEC) +f.way_debug_info_t_p_z = ProtoField.float ("dji_mavic_flyrec.way_debug_info_t_p_z", "T P Z", base.DEC) +f.way_debug_info_t_v_x = ProtoField.float ("dji_mavic_flyrec.way_debug_info_t_v_x", "T V X", base.DEC) +f.way_debug_info_t_v_y = ProtoField.float ("dji_mavic_flyrec.way_debug_info_t_v_y", "T V Y", base.DEC) +f.way_debug_info_t_v_z = ProtoField.float ("dji_mavic_flyrec.way_debug_info_t_v_z", "T V Z", base.DEC) +f.way_debug_info_f_p_x = ProtoField.float ("dji_mavic_flyrec.way_debug_info_f_p_x", "F P X", base.DEC) +f.way_debug_info_f_p_y = ProtoField.float ("dji_mavic_flyrec.way_debug_info_f_p_y", "F P Y", base.DEC) +f.way_debug_info_f_p_z = ProtoField.float ("dji_mavic_flyrec.way_debug_info_f_p_z", "F P Z", base.DEC) +f.way_debug_info_v_x = ProtoField.float ("dji_mavic_flyrec.way_debug_info_v_x", "V X", base.DEC) +f.way_debug_info_v_y = ProtoField.float ("dji_mavic_flyrec.way_debug_info_v_y", "V Y", base.DEC) +f.way_debug_info_v_z = ProtoField.float ("dji_mavic_flyrec.way_debug_info_v_z", "V Z", base.DEC) +f.way_debug_info_dv_x = ProtoField.float ("dji_mavic_flyrec.way_debug_info_dv_x", "Dv X", base.DEC) +f.way_debug_info_dv_y = ProtoField.float ("dji_mavic_flyrec.way_debug_info_dv_y", "Dv Y", base.DEC) +f.way_debug_info_ddv_z = ProtoField.float ("dji_mavic_flyrec.way_debug_info_ddv_z", "Ddv Z", base.DEC) +f.way_debug_info_dmp_scl = ProtoField.uint8 ("dji_mavic_flyrec.way_debug_info_dmp_scl", "Dmp Scl", base.HEX) +f.way_debug_info_v_dyn_g = ProtoField.float ("dji_mavic_flyrec.way_debug_info_v_dyn_g", "V Dyn G", base.DEC) +f.way_debug_info_p_dyn_g = ProtoField.float ("dji_mavic_flyrec.way_debug_info_p_dyn_g", "P Dyn G", base.DEC) +f.way_debug_info_is_pud = ProtoField.uint8 ("dji_mavic_flyrec.way_debug_info_is_pud", "Is Pud", base.HEX) +f.way_debug_info_debug_ref_flag = ProtoField.uint8 ("dji_mavic_flyrec.way_debug_info_debug_ref_flag", "Debug Ref Flag", base.HEX) +f.way_debug_info_debug_ref_h = ProtoField.float ("dji_mavic_flyrec.way_debug_info_debug_ref_h", "Debug Ref H", base.DEC) +f.way_debug_info_debug_ref_cmd = ProtoField.uint8 ("dji_mavic_flyrec.way_debug_info_debug_ref_cmd", "Debug Ref Cmd", base.HEX) +f.way_debug_info_debug_resume_mode = ProtoField.uint8 ("dji_mavic_flyrec.way_debug_info_debug_resume_mode", "Debug Resume Mode", base.HEX) + +local function flightrec_way_debug_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.way_debug_info_mis_stus, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_wp_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_t_vel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.way_debug_info_traj_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_wp_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.way_debug_info_t_p_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_p_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_p_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_v_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_v_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_v_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_f_p_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_f_p_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_f_p_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_v_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_v_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_v_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_dv_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_dv_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_ddv_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_dmp_scl, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_v_dyn_g, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_p_dyn_g, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_is_pud, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_debug_ref_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_debug_ref_h, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_debug_ref_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_debug_resume_mode, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 84) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Way Debug Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Way Debug Info: Payload size different than expected") end +end + +-- Flight log - Svo Avoid - 0x0461 + +f.svo_avoid_ao_en = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_ao_en", "Ao En", base.HEX) +f.svo_avoid_ua_en = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_ua_en", "Ua En", base.HEX) +f.svo_avoid_ao_wf = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_ao_wf", "Ao Wf", base.HEX) +f.svo_avoid_brake_wf = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_brake_wf", "Brake Wf", base.HEX) +f.svo_avoid_gha_en = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_gha_en", "Gha En", base.HEX) +f.svo_avoid_fl_f = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_fl_f", "Fl F", base.HEX) +f.svo_avoid_rl_wf = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_rl_wf", "Rl Wf", base.HEX) +f.svo_avoid_al_wf = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_al_wf", "Al Wf", base.HEX) +f.svo_avoid_ao_wf = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_ao_wf", "Ao Wf", base.HEX) +f.svo_avoid_boundary_f = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_boundary_f", "Boundary F", base.HEX) +f.svo_avoid_overshoot_f = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_overshoot_f", "Overshoot F", base.HEX) +f.svo_avoid_v_ll_wf = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_v_ll_wf", "V Ll Wf", base.HEX) +f.svo_avoid_v_al_wf = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_v_al_wf", "V Al Wf", base.HEX) +f.svo_avoid_rl_f = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_rl_f", "Rl F", base.HEX) +f.svo_avoid_hgl_wf = ProtoField.uint8 ("dji_mavic_flyrec.svo_avoid_hgl_wf", "Hgl Wf", base.HEX) + +local function flightrec_svo_avoid_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.svo_avoid_ao_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_ua_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_ao_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_brake_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_gha_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_fl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_rl_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_al_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_ao_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_boundary_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_overshoot_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_v_ll_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_v_al_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_rl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_hgl_wf, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 15) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Svo Avoid: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Svo Avoid: Payload size different than expected") end +end + +-- Flight log - Simulator Debug Data - 0x0578 + +f.simulator_debug_data_thrust = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_thrust", "Thrust", base.DEC) +f.simulator_debug_data_r_moment = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_r_moment", "R Moment", base.DEC) +f.simulator_debug_data_p_moment = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_p_moment", "P Moment", base.DEC) +f.simulator_debug_data_y_moment = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_y_moment", "Y Moment", base.DEC) +f.simulator_debug_data_drag_x = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_drag_x", "Drag X", base.DEC) +f.simulator_debug_data_drag_y = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_drag_y", "Drag Y", base.DEC) +f.simulator_debug_data_drag_z = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_drag_z", "Drag Z", base.DEC) +f.simulator_debug_data_e_force_x = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_force_x", "E Force X", base.DEC) +f.simulator_debug_data_e_force_y = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_force_y", "E Force Y", base.DEC) +f.simulator_debug_data_e_force_z = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_force_z", "E Force Z", base.DEC) +f.simulator_debug_data_e_moment_x = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_moment_x", "E Moment X", base.DEC) +f.simulator_debug_data_e_moment_y = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_moment_y", "E Moment Y", base.DEC) +f.simulator_debug_data_e_moment_z = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_moment_z", "E Moment Z", base.DEC) +f.simulator_debug_data_e_mome_f_x = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_mome_f_x", "E Mome F X", base.DEC) +f.simulator_debug_data_e_mome_f_y = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_mome_f_y", "E Mome F Y", base.DEC) +f.simulator_debug_data_e_mome_f_z = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_e_mome_f_z", "E Mome F Z", base.DEC) +f.simulator_debug_data_dura_time = ProtoField.uint32 ("dji_mavic_flyrec.simulator_debug_data_dura_time", "Dura Time", base.HEX) +f.simulator_debug_data_longti = ProtoField.double ("dji_mavic_flyrec.simulator_debug_data_longti", "Longti", base.DEC) +f.simulator_debug_data_lati = ProtoField.double ("dji_mavic_flyrec.simulator_debug_data_lati", "Lati", base.DEC) +f.simulator_debug_data_pos_x_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_pos_x_w", "Pos X W", base.DEC) +f.simulator_debug_data_pos_y_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_pos_y_w", "Pos Y W", base.DEC) +f.simulator_debug_data_pos_z_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_pos_z_w", "Pos Z W", base.DEC) +f.simulator_debug_data_height_ = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_height_", "Height ", base.DEC) +f.simulator_debug_data_vel_x_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_vel_x_w", "Vel X W", base.DEC) +f.simulator_debug_data_vel_y_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_vel_y_w", "Vel Y W", base.DEC) +f.simulator_debug_data_vel_z_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_vel_z_w", "Vel Z W", base.DEC) +f.simulator_debug_data_acc_x_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_acc_x_w", "Acc X W", base.DEC) +f.simulator_debug_data_acc_y_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_acc_y_w", "Acc Y W", base.DEC) +f.simulator_debug_data_acc_z_w = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_acc_z_w", "Acc Z W", base.DEC) +f.simulator_debug_data_roll = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_roll", "Roll", base.DEC) +f.simulator_debug_data_pitch = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_pitch", "Pitch", base.DEC) +f.simulator_debug_data_yaw = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_yaw", "Yaw", base.DEC) +f.simulator_debug_data_q0 = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_q0", "Q0", base.DEC) +f.simulator_debug_data_q1 = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_q1", "Q1", base.DEC) +f.simulator_debug_data_q2 = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_q2", "Q2", base.DEC) +f.simulator_debug_data_q3 = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_q3", "Q3", base.DEC) +f.simulator_debug_data_p = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_p", "P", base.DEC) +f.simulator_debug_data_q = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_q", "Q", base.DEC) +f.simulator_debug_data_r = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_r", "R", base.DEC) +f.simulator_debug_data_p_dot = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_p_dot", "P Dot", base.DEC) +f.simulator_debug_data_q_dot = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_q_dot", "Q Dot", base.DEC) +f.simulator_debug_data_r_dot = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_r_dot", "R Dot", base.DEC) +f.simulator_debug_data_comp_mx = ProtoField.int16 ("dji_mavic_flyrec.simulator_debug_data_comp_mx", "Comp.Mx", base.DEC) +f.simulator_debug_data_comp_my = ProtoField.int16 ("dji_mavic_flyrec.simulator_debug_data_comp_my", "Comp.My", base.DEC) +f.simulator_debug_data_comp_mz = ProtoField.int16 ("dji_mavic_flyrec.simulator_debug_data_comp_mz", "Comp.Mz", base.DEC) +f.simulator_debug_data_acc_x_b = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_acc_x_b", "Acc X B", base.DEC) +f.simulator_debug_data_acc_y_b = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_acc_y_b", "Acc Y B", base.DEC) +f.simulator_debug_data_acc_z_b = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_acc_z_b", "Acc Z B", base.DEC) +f.simulator_debug_data_flag = ProtoField.uint8 ("dji_mavic_flyrec.simulator_debug_data_flag", "Flag", base.HEX) +f.simulator_debug_data_sys_time = ProtoField.float ("dji_mavic_flyrec.simulator_debug_data_sys_time", "Sys Time", base.DEC) +f.simulator_debug_data_crash_flag = ProtoField.uint8 ("dji_mavic_flyrec.simulator_debug_data_crash_flag", "Crash Flag", base.HEX) + +local function flightrec_simulator_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_debug_data_thrust, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_r_moment, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_p_moment, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_y_moment, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_drag_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_drag_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_drag_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_force_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_force_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_force_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_moment_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_moment_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_moment_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_mome_f_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_mome_f_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_mome_f_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_dura_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_longti, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.simulator_debug_data_lati, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.simulator_debug_data_pos_x_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_pos_y_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_pos_z_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_height_, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_vel_x_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_vel_y_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_vel_z_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_x_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_y_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_z_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_p_dot, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q_dot, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_r_dot, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_comp_mx, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_debug_data_comp_my, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_debug_data_comp_mz, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_debug_data_acc_x_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_y_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_z_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_debug_data_sys_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_crash_flag, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 200) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Debug Data: Payload size different than expected") end +end + +-- Flight log - Simulator Gyro Acc Data 400Hz - 0x0579 + +f.simulator_gyro_acc_data_400hz_acc_temp = ProtoField.float ("dji_mavic_flyrec.simulator_gyro_acc_data_400hz_acc_temp", "Acc Temp", base.DEC) +f.simulator_gyro_acc_data_400hz_acc_x = ProtoField.float ("dji_mavic_flyrec.simulator_gyro_acc_data_400hz_acc_x", "Acc X", base.DEC) +f.simulator_gyro_acc_data_400hz_acc_y = ProtoField.float ("dji_mavic_flyrec.simulator_gyro_acc_data_400hz_acc_y", "Acc Y", base.DEC) +f.simulator_gyro_acc_data_400hz_acc_z = ProtoField.float ("dji_mavic_flyrec.simulator_gyro_acc_data_400hz_acc_z", "Acc Z", base.DEC) +f.simulator_gyro_acc_data_400hz_gyro_temp = ProtoField.float ("dji_mavic_flyrec.simulator_gyro_acc_data_400hz_gyro_temp", "Gyro Temp", base.DEC) +f.simulator_gyro_acc_data_400hz_gyro_x = ProtoField.float ("dji_mavic_flyrec.simulator_gyro_acc_data_400hz_gyro_x", "Gyro X", base.DEC) +f.simulator_gyro_acc_data_400hz_gyro_y = ProtoField.float ("dji_mavic_flyrec.simulator_gyro_acc_data_400hz_gyro_y", "Gyro Y", base.DEC) +f.simulator_gyro_acc_data_400hz_gyro_z = ProtoField.float ("dji_mavic_flyrec.simulator_gyro_acc_data_400hz_gyro_z", "Gyro Z", base.DEC) + +local function flightrec_simulator_gyro_acc_data_400hz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_acc_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_acc_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_acc_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_acc_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_gyro_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_gyro_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_gyro_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_gyro_z, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Gyro Acc Data 400Hz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Gyro Acc Data 400Hz: Payload size different than expected") end +end + +-- Flight log - Simulator Press Data 200Hz - 0x057c + +f.simulator_press_data_200hz_press = ProtoField.float ("dji_mavic_flyrec.simulator_press_data_200hz_press", "Press", base.DEC) +f.simulator_press_data_200hz_temp = ProtoField.float ("dji_mavic_flyrec.simulator_press_data_200hz_temp", "Temp", base.DEC) + +local function flightrec_simulator_press_data_200hz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_press_data_200hz_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_press_data_200hz_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Press Data 200Hz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Press Data 200Hz: Payload size different than expected") end +end + +-- Flight log - Simulator Mag Data 50Hz - 0x057a + +f.simulator_mag_data_50hz_data = ProtoField.int16 ("dji_mavic_flyrec.simulator_mag_data_50hz_data", "Data", base.DEC) +f.simulator_mag_data_50hz_data = ProtoField.int16 ("dji_mavic_flyrec.simulator_mag_data_50hz_data", "Data", base.DEC) +f.simulator_mag_data_50hz_data = ProtoField.int16 ("dji_mavic_flyrec.simulator_mag_data_50hz_data", "Data", base.DEC) +f.simulator_mag_data_50hz_cnt = ProtoField.uint16 ("dji_mavic_flyrec.simulator_mag_data_50hz_cnt", "Cnt", base.HEX) + +local function flightrec_simulator_mag_data_50hz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_mag_data_50hz_data, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_mag_data_50hz_data, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_mag_data_50hz_data, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_mag_data_50hz_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Mag Data 50Hz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Mag Data 50Hz: Payload size different than expected") end +end + +-- Flight log - Simulator Gps Data 5Hz - 0x057b + +f.simulator_gps_data_5hz_date = ProtoField.uint32 ("dji_mavic_flyrec.simulator_gps_data_5hz_date", "Date", base.HEX) +f.simulator_gps_data_5hz_time = ProtoField.uint32 ("dji_mavic_flyrec.simulator_gps_data_5hz_time", "Time", base.HEX) +f.simulator_gps_data_5hz_lon = ProtoField.int32 ("dji_mavic_flyrec.simulator_gps_data_5hz_lon", "Lon", base.DEC) +f.simulator_gps_data_5hz_lat = ProtoField.int32 ("dji_mavic_flyrec.simulator_gps_data_5hz_lat", "Lat", base.DEC) +f.simulator_gps_data_5hz_hmsl = ProtoField.int32 ("dji_mavic_flyrec.simulator_gps_data_5hz_hmsl", "Hmsl", base.DEC) +f.simulator_gps_data_5hz_vel_n = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_vel_n", "Vel N", base.DEC) +f.simulator_gps_data_5hz_vel_e = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_vel_e", "Vel E", base.DEC) +f.simulator_gps_data_5hz_vel_d = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_vel_d", "Vel D", base.DEC) +f.simulator_gps_data_5hz_hdop = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_hdop", "Hdop", base.DEC) +f.simulator_gps_data_5hz_pdop = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_pdop", "Pdop", base.DEC) +f.simulator_gps_data_5hz_gnss_flag = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_gnss_flag", "Gnss Flag", base.DEC) +f.simulator_gps_data_5hz_hacc = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_hacc", "Hacc", base.DEC) +f.simulator_gps_data_5hz_sacc = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_sacc", "Sacc", base.DEC) +f.simulator_gps_data_5hz_gps_fix = ProtoField.float ("dji_mavic_flyrec.simulator_gps_data_5hz_gps_fix", "Gps Fix", base.DEC) +f.simulator_gps_data_5hz_gps_used = ProtoField.uint32 ("dji_mavic_flyrec.simulator_gps_data_5hz_gps_used", "Gps Used", base.HEX) +f.simulator_gps_data_5hz_gln_used = ProtoField.uint32 ("dji_mavic_flyrec.simulator_gps_data_5hz_gln_used", "Gln Used", base.HEX) +f.simulator_gps_data_5hz_numsv = ProtoField.uint16 ("dji_mavic_flyrec.simulator_gps_data_5hz_numsv", "Numsv", base.HEX) +f.simulator_gps_data_5hz_gpsstate = ProtoField.uint16 ("dji_mavic_flyrec.simulator_gps_data_5hz_gpsstate", "Gpsstate", base.HEX) + +local function flightrec_simulator_gps_data_5hz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_gps_data_5hz_date, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_lon, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_lat, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_hmsl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_vel_n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_vel_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_vel_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_hdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_pdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_gnss_flag, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_hacc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_sacc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_gps_fix, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_gps_used, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_gln_used, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_numsv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_gps_data_5hz_gpsstate, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Gps Data 5Hz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Gps Data 5Hz: Payload size different than expected") end +end + +-- Flight log - Simulator Motor Data - 0x057e + +f.simulator_motor_data_m1_current = ProtoField.int16 ("dji_mavic_flyrec.simulator_motor_data_m1_current", "M1 Current", base.DEC) +f.simulator_motor_data_m1_speed = ProtoField.uint16 ("dji_mavic_flyrec.simulator_motor_data_m1_speed", "M1 Speed", base.HEX) +f.simulator_motor_data_m2_current = ProtoField.int16 ("dji_mavic_flyrec.simulator_motor_data_m2_current", "M2 Current", base.DEC) +f.simulator_motor_data_m2_speed = ProtoField.uint16 ("dji_mavic_flyrec.simulator_motor_data_m2_speed", "M2 Speed", base.HEX) +f.simulator_motor_data_m3_current = ProtoField.int16 ("dji_mavic_flyrec.simulator_motor_data_m3_current", "M3 Current", base.DEC) +f.simulator_motor_data_m3_speed = ProtoField.uint16 ("dji_mavic_flyrec.simulator_motor_data_m3_speed", "M3 Speed", base.HEX) +f.simulator_motor_data_m4_current = ProtoField.int16 ("dji_mavic_flyrec.simulator_motor_data_m4_current", "M4 Current", base.DEC) +f.simulator_motor_data_m4_speed = ProtoField.uint16 ("dji_mavic_flyrec.simulator_motor_data_m4_speed", "M4 Speed", base.HEX) +f.simulator_motor_data_m5_current = ProtoField.int16 ("dji_mavic_flyrec.simulator_motor_data_m5_current", "M5 Current", base.DEC) +f.simulator_motor_data_m5_speed = ProtoField.uint16 ("dji_mavic_flyrec.simulator_motor_data_m5_speed", "M5 Speed", base.HEX) +f.simulator_motor_data_m6_current = ProtoField.int16 ("dji_mavic_flyrec.simulator_motor_data_m6_current", "M6 Current", base.DEC) +f.simulator_motor_data_m6_speed = ProtoField.uint16 ("dji_mavic_flyrec.simulator_motor_data_m6_speed", "M6 Speed", base.HEX) +f.simulator_motor_data_m7_current = ProtoField.int16 ("dji_mavic_flyrec.simulator_motor_data_m7_current", "M7 Current", base.DEC) +f.simulator_motor_data_m7_speed = ProtoField.uint16 ("dji_mavic_flyrec.simulator_motor_data_m7_speed", "M7 Speed", base.HEX) +f.simulator_motor_data_m8_current = ProtoField.int16 ("dji_mavic_flyrec.simulator_motor_data_m8_current", "M8 Current", base.DEC) +f.simulator_motor_data_m8_speed = ProtoField.uint16 ("dji_mavic_flyrec.simulator_motor_data_m8_speed", "M8 Speed", base.HEX) + +local function flightrec_simulator_motor_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_motor_data_m1_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m1_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m2_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m2_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m3_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m3_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m4_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m4_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m5_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m5_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m6_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m6_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m7_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m7_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m8_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m8_speed, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Motor Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Motor Data: Payload size different than expected") end +end + +-- Flight log - Device Change Times - 0x057d + +f.device_change_times_bat = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_bat", "Bat", base.HEX) +f.device_change_times_esc = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_esc", "Esc", base.HEX) +f.device_change_times_sys = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_sys", "Sys", base.HEX) +f.device_change_times_fmu = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_fmu", "Fmu", base.HEX) +f.device_change_times_mc = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_mc", "Mc", base.HEX) +f.device_change_times_imu = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_imu", "Imu", base.HEX) +f.device_change_times_gps = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_gps", "Gps", base.HEX) +f.device_change_times_gyro = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_gyro", "Gyro", base.HEX) +f.device_change_times_acc = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_acc", "Acc", base.HEX) +f.device_change_times_gyro_acc = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_gyro_acc", "Gyro Acc", base.HEX) +f.device_change_times_baro = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_baro", "Baro", base.HEX) +f.device_change_times_compass = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_compass", "Compass", base.HEX) +f.device_change_times_ultr = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_ultr", "Ultr", base.HEX) +f.device_change_times_vo = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_vo", "Vo", base.HEX) +f.device_change_times_radar = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_radar", "Radar", base.HEX) +f.device_change_times_camera = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_camera", "Camera", base.HEX) +f.device_change_times_gimbal = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_gimbal", "Gimbal", base.HEX) +f.device_change_times_trans = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_trans", "Trans", base.HEX) +f.device_change_times_led = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_led", "Led", base.HEX) +f.device_change_times_pc = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_pc", "Pc", base.HEX) +f.device_change_times_rc = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_rc", "Rc", base.HEX) +f.device_change_times_bs = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_bs", "Bs", base.HEX) +f.device_change_times_sdk = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_sdk", "Sdk", base.HEX) +f.device_change_times_spray = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_spray", "Spray", base.HEX) +f.device_change_times_tof = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_tof", "Tof", base.HEX) +f.device_change_times_wristband = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_wristband", "Wristband", base.HEX) +f.device_change_times_headset = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_headset", "Headset", base.HEX) +f.device_change_times_all = ProtoField.uint16 ("dji_mavic_flyrec.device_change_times_all", "All", base.HEX) + +local function flightrec_device_change_times_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.device_change_times_bat, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_esc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_sys, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_fmu, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_mc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_imu, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_gps, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_gyro, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_acc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_gyro_acc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_baro, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_compass, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_ultr, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_vo, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_radar, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_camera, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_gimbal, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_trans, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_led, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_pc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_rc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_bs, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_sdk, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_spray, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_tof, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_wristband, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_headset, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_all, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 56) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Device Change Times: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Device Change Times: Payload size different than expected") end +end + +-- Flight log - Simulator Config Aircraft Param - 0x0582 + +f.simulator_config_aircraft_param_arm_len = ProtoField.float ("dji_mavic_flyrec.simulator_config_aircraft_param_arm_len", "Arm Len", base.DEC) +f.simulator_config_aircraft_param_b_area = ProtoField.float ("dji_mavic_flyrec.simulator_config_aircraft_param_b_area", "B Area", base.DEC) +f.simulator_config_aircraft_param_b_area = ProtoField.float ("dji_mavic_flyrec.simulator_config_aircraft_param_b_area", "B Area", base.DEC) +f.simulator_config_aircraft_param_b_area = ProtoField.float ("dji_mavic_flyrec.simulator_config_aircraft_param_b_area", "B Area", base.DEC) +f.simulator_config_aircraft_param_inertia = ProtoField.float ("dji_mavic_flyrec.simulator_config_aircraft_param_inertia", "Inertia", base.DEC) +f.simulator_config_aircraft_param_inertia = ProtoField.float ("dji_mavic_flyrec.simulator_config_aircraft_param_inertia", "Inertia", base.DEC) +f.simulator_config_aircraft_param_inertia = ProtoField.float ("dji_mavic_flyrec.simulator_config_aircraft_param_inertia", "Inertia", base.DEC) +f.simulator_config_aircraft_param_mass = ProtoField.float ("dji_mavic_flyrec.simulator_config_aircraft_param_mass", "Mass", base.DEC) + +local function flightrec_simulator_config_aircraft_param_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_aircraft_param_arm_len, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_b_area, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_b_area, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_b_area, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_inertia, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_inertia, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_inertia, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_mass, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Aircraft Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Aircraft Param: Payload size different than expected") end +end + +-- Flight log - Simulator Config Battery Param - 0x0583 + +f.simulator_config_battery_param_cell_num = ProtoField.uint8 ("dji_mavic_flyrec.simulator_config_battery_param_cell_num", "Cell Num", base.HEX) +f.simulator_config_battery_param_cell_v = ProtoField.uint16 ("dji_mavic_flyrec.simulator_config_battery_param_cell_v", "Cell V", base.HEX) +f.simulator_config_battery_param_cycle_cnt = ProtoField.uint8 ("dji_mavic_flyrec.simulator_config_battery_param_cycle_cnt", "Cycle Cnt", base.HEX) +f.simulator_config_battery_param_design_cap = ProtoField.uint16 ("dji_mavic_flyrec.simulator_config_battery_param_design_cap", "Design Cap", base.HEX) +f.simulator_config_battery_param_error_cnt = ProtoField.uint16 ("dji_mavic_flyrec.simulator_config_battery_param_error_cnt", "Error Cnt", base.HEX) +f.simulator_config_battery_param_i_cap_per = ProtoField.uint8 ("dji_mavic_flyrec.simulator_config_battery_param_i_cap_per", "I Cap Per", base.HEX) +f.simulator_config_battery_param_i_temp = ProtoField.float ("dji_mavic_flyrec.simulator_config_battery_param_i_temp", "I Temp", base.DEC) +f.simulator_config_battery_param_internal_r = ProtoField.float ("dji_mavic_flyrec.simulator_config_battery_param_internal_r", "Internal R", base.DEC) +f.simulator_config_battery_param_mdate = ProtoField.uint16 ("dji_mavic_flyrec.simulator_config_battery_param_mdate", "Mdate", base.HEX) +f.simulator_config_battery_param_seq_num = ProtoField.uint16 ("dji_mavic_flyrec.simulator_config_battery_param_seq_num", "Seq Num", base.HEX) +f.simulator_config_battery_param_standby_i = ProtoField.float ("dji_mavic_flyrec.simulator_config_battery_param_standby_i", "Standby I", base.DEC) + +local function flightrec_simulator_config_battery_param_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_battery_param_cell_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_config_battery_param_cell_v, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_cycle_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_config_battery_param_design_cap, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_error_cnt, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_i_cap_per, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_config_battery_param_i_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_battery_param_internal_r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_battery_param_mdate, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_seq_num, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_standby_i, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 25) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Battery Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Battery Param: Payload size different than expected") end +end + +-- Flight log - Simulator Config Environment Param - 0x0584 + +f.simulator_config_environment_param_density = ProtoField.float ("dji_mavic_flyrec.simulator_config_environment_param_density", "Density", base.DEC) +f.simulator_config_environment_param_drag_coef = ProtoField.float ("dji_mavic_flyrec.simulator_config_environment_param_drag_coef", "Drag Coef", base.DEC) +f.simulator_config_environment_param_wind_s = ProtoField.float ("dji_mavic_flyrec.simulator_config_environment_param_wind_s", "Wind S", base.DEC) +f.simulator_config_environment_param_wind_s = ProtoField.float ("dji_mavic_flyrec.simulator_config_environment_param_wind_s", "Wind S", base.DEC) +f.simulator_config_environment_param_wind_s = ProtoField.float ("dji_mavic_flyrec.simulator_config_environment_param_wind_s", "Wind S", base.DEC) +f.simulator_config_environment_param_gra_acc = ProtoField.float ("dji_mavic_flyrec.simulator_config_environment_param_gra_acc", "Gra Acc", base.DEC) +f.simulator_config_environment_param_temp = ProtoField.float ("dji_mavic_flyrec.simulator_config_environment_param_temp", "Temp", base.DEC) + +local function flightrec_simulator_config_environment_param_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_environment_param_density, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_drag_coef, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_wind_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_wind_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_wind_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_gra_acc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Environment Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Environment Param: Payload size different than expected") end +end + +-- Flight log - Simulator Config Motor Param 1 - 0x0585 + +f.simulator_config_motor_param_1_cl = ProtoField.float ("dji_mavic_flyrec.simulator_config_motor_param_1_cl", "Cl", base.DEC) +f.simulator_config_motor_param_1_cq = ProtoField.float ("dji_mavic_flyrec.simulator_config_motor_param_1_cq", "Cq", base.DEC) +f.simulator_config_motor_param_1_i_max = ProtoField.int16 ("dji_mavic_flyrec.simulator_config_motor_param_1_i_max", "I Max", base.DEC) +f.simulator_config_motor_param_1_i_min = ProtoField.int16 ("dji_mavic_flyrec.simulator_config_motor_param_1_i_min", "I Min", base.DEC) +f.simulator_config_motor_param_1_in_motor = ProtoField.float ("dji_mavic_flyrec.simulator_config_motor_param_1_in_motor", "In Motor", base.DEC) +f.simulator_config_motor_param_1_in_prop = ProtoField.float ("dji_mavic_flyrec.simulator_config_motor_param_1_in_prop", "In Prop", base.DEC) +f.simulator_config_motor_param_1_rm = ProtoField.uint16 ("dji_mavic_flyrec.simulator_config_motor_param_1_rm", "Rm", base.HEX) +f.simulator_config_motor_param_1_kv = ProtoField.uint16 ("dji_mavic_flyrec.simulator_config_motor_param_1_kv", "Kv", base.HEX) +f.simulator_config_motor_param_1_mta = ProtoField.int16 ("dji_mavic_flyrec.simulator_config_motor_param_1_mta", "Mta", base.DEC) +f.simulator_config_motor_param_1_volt_max = ProtoField.uint16 ("dji_mavic_flyrec.simulator_config_motor_param_1_volt_max", "Volt Max", base.HEX) + +local function flightrec_simulator_config_motor_param_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_motor_param_1_cl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_motor_param_1_cq, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_motor_param_1_i_max, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_i_min, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_in_motor, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_motor_param_1_in_prop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_motor_param_1_rm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_kv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_mta, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_volt_max, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Motor Param 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Motor Param 1: Payload size different than expected") end +end + +-- Flight log - Simulator Config Sensor Param - 0x0587 + +f.simulator_config_sensor_param_gyro_delay = ProtoField.uint8 ("dji_mavic_flyrec.simulator_config_sensor_param_gyro_delay", "Gyro Delay", base.HEX) +f.simulator_config_sensor_param_imu_delay = ProtoField.uint8 ("dji_mavic_flyrec.simulator_config_sensor_param_imu_delay", "Imu Delay", base.HEX) + +local function flightrec_simulator_config_sensor_param_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_sensor_param_gyro_delay, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_config_sensor_param_imu_delay, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Sensor Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Sensor Param: Payload size different than expected") end +end + +-- Flight log - Rtkdata - 0xcff2 + +f.rtkdata_date = ProtoField.uint32 ("dji_mavic_flyrec.rtkdata_date", "Date", base.HEX) +f.rtkdata_time = ProtoField.uint32 ("dji_mavic_flyrec.rtkdata_time", "Time", base.HEX) +f.rtkdata_lon_p = ProtoField.double ("dji_mavic_flyrec.rtkdata_lon_p", "Lon P", base.DEC) +f.rtkdata_lat_p = ProtoField.double ("dji_mavic_flyrec.rtkdata_lat_p", "Lat P", base.DEC) +f.rtkdata_hmsl_p = ProtoField.float ("dji_mavic_flyrec.rtkdata_hmsl_p", "Hmsl P", base.DEC) +f.rtkdata_lon_s = ProtoField.int32 ("dji_mavic_flyrec.rtkdata_lon_s", "Lon S", base.DEC) +f.rtkdata_lat_s = ProtoField.int32 ("dji_mavic_flyrec.rtkdata_lat_s", "Lat S", base.DEC) +f.rtkdata_hmsl_s = ProtoField.int32 ("dji_mavic_flyrec.rtkdata_hmsl_s", "Hmsl S", base.DEC) +f.rtkdata_vel_n = ProtoField.float ("dji_mavic_flyrec.rtkdata_vel_n", "Vel N", base.DEC) +f.rtkdata_vel_e = ProtoField.float ("dji_mavic_flyrec.rtkdata_vel_e", "Vel E", base.DEC) +f.rtkdata_vel_d = ProtoField.float ("dji_mavic_flyrec.rtkdata_vel_d", "Vel D", base.DEC) +f.rtkdata_yaw = ProtoField.int16 ("dji_mavic_flyrec.rtkdata_yaw", "Yaw", base.DEC) +f.rtkdata_svn_s = ProtoField.uint8 ("dji_mavic_flyrec.rtkdata_svn_s", "Svn S", base.HEX) +f.rtkdata_svn_p = ProtoField.uint8 ("dji_mavic_flyrec.rtkdata_svn_p", "Svn P", base.HEX) +f.rtkdata_hdop = ProtoField.float ("dji_mavic_flyrec.rtkdata_hdop", "Hdop", base.DEC) +f.rtkdata_pitch = ProtoField.float ("dji_mavic_flyrec.rtkdata_pitch", "Pitch", base.DEC) +f.rtkdata_posflg = ProtoField.uint8 ("dji_mavic_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_mavic_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_mavic_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_mavic_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_mavic_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_mavic_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_gpsstate = ProtoField.uint16 ("dji_mavic_flyrec.rtkdata_gpsstate", "Gpsstate", base.HEX) + +local function flightrec_rtkdata_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rtkdata_date, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_lon_p, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.rtkdata_lat_p, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.rtkdata_hmsl_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_lon_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_lat_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_hmsl_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_vel_n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_vel_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_vel_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rtkdata_svn_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_svn_p, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_hdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_gpsstate, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 72) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rtkdata: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rtkdata: Payload size different than expected") end +end + +-- Flight log - Genral Debug Data - 0x0640 + +f.genral_debug_data_db00 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db00", "Db00", base.DEC) +f.genral_debug_data_db01 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db01", "Db01", base.DEC) +f.genral_debug_data_db02 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db02", "Db02", base.DEC) +f.genral_debug_data_db03 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db03", "Db03", base.DEC) +f.genral_debug_data_db04 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db04", "Db04", base.DEC) +f.genral_debug_data_db05 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db05", "Db05", base.DEC) +f.genral_debug_data_db06 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db06", "Db06", base.DEC) +f.genral_debug_data_db07 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db07", "Db07", base.DEC) +f.genral_debug_data_db08 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db08", "Db08", base.DEC) +f.genral_debug_data_db09 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db09", "Db09", base.DEC) +f.genral_debug_data_db10 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db10", "Db10", base.DEC) +f.genral_debug_data_db11 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db11", "Db11", base.DEC) +f.genral_debug_data_db12 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db12", "Db12", base.DEC) +f.genral_debug_data_db13 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db13", "Db13", base.DEC) +f.genral_debug_data_db14 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db14", "Db14", base.DEC) +f.genral_debug_data_db15 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db15", "Db15", base.DEC) +f.genral_debug_data_db16 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db16", "Db16", base.DEC) +f.genral_debug_data_db17 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db17", "Db17", base.DEC) +f.genral_debug_data_db18 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db18", "Db18", base.DEC) +f.genral_debug_data_db19 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db19", "Db19", base.DEC) +f.genral_debug_data_db20 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db20", "Db20", base.DEC) +f.genral_debug_data_db21 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db21", "Db21", base.DEC) +f.genral_debug_data_db22 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db22", "Db22", base.DEC) +f.genral_debug_data_db23 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db23", "Db23", base.DEC) +f.genral_debug_data_db24 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db24", "Db24", base.DEC) +f.genral_debug_data_db25 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db25", "Db25", base.DEC) +f.genral_debug_data_db26 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db26", "Db26", base.DEC) +f.genral_debug_data_db27 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db27", "Db27", base.DEC) +f.genral_debug_data_db28 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db28", "Db28", base.DEC) +f.genral_debug_data_db29 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db29", "Db29", base.DEC) +f.genral_debug_data_db30 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db30", "Db30", base.DEC) +f.genral_debug_data_db31 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db31", "Db31", base.DEC) +f.genral_debug_data_db32 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db32", "Db32", base.DEC) +f.genral_debug_data_db33 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db33", "Db33", base.DEC) +f.genral_debug_data_db34 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db34", "Db34", base.DEC) +f.genral_debug_data_db35 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db35", "Db35", base.DEC) +f.genral_debug_data_db36 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db36", "Db36", base.DEC) +f.genral_debug_data_db37 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db37", "Db37", base.DEC) +f.genral_debug_data_db38 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db38", "Db38", base.DEC) +f.genral_debug_data_db39 = ProtoField.float ("dji_mavic_flyrec.genral_debug_data_db39", "Db39", base.DEC) + +local function flightrec_genral_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.genral_debug_data_db00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db03, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db04, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db05, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db06, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db07, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db08, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db09, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db11, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db12, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db13, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db14, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db15, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db16, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db17, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db19, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db20, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db21, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db22, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db23, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db24, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db25, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db26, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db27, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db28, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db29, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db30, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db31, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db32, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db33, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db34, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db35, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db36, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db37, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db38, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db39, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 160) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Genral Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Genral Debug Data: Payload size different than expected") end +end + +-- Flight log - Rc Debug Info - 0x06a4 + +f.rc_debug_info_cur_cmd = ProtoField.uint16 ("dji_mavic_flyrec.rc_debug_info_cur_cmd", "Cur Cmd", base.HEX) +f.rc_debug_info_fail_safe = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_fail_safe", "Fail Safe", base.HEX) +f.rc_debug_info_vedio_lost = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_vedio_lost", "Vedio Lost", base.HEX) +f.rc_debug_info_data_lost = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_data_lost", "Data Lost", base.HEX) +f.rc_debug_info_app_lost = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_app_lost", "App Lost", base.HEX) +f.rc_debug_info_frame_lost = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_frame_lost", "Frame Lost", base.HEX) +f.rc_debug_info_rec_cnt = ProtoField.uint32 ("dji_mavic_flyrec.rc_debug_info_rec_cnt", "Rec Cnt", base.HEX) +f.rc_debug_info_sky_con = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_sky_con", "Sky Con", base.HEX) +f.rc_debug_info_gnd_con = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_gnd_con", "Gnd Con", base.HEX) +f.rc_debug_info_connected = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_connected", "Connected", base.HEX) +f.rc_debug_info_m_changed = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_m_changed", "M Changed", base.HEX) +f.rc_debug_info_arm_status = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_arm_status", "Arm Status", base.HEX) +f.rc_debug_info_wifi_en = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_wifi_en", "Wifi En", base.HEX) +f.rc_debug_info_in_wifi = ProtoField.uint8 ("dji_mavic_flyrec.rc_debug_info_in_wifi", "In Wifi", base.HEX) + +local function flightrec_rc_debug_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_debug_info_cur_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_debug_info_fail_safe, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_vedio_lost, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_data_lost, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_app_lost, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_frame_lost, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_rec_cnt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_debug_info_sky_con, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_gnd_con, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_connected, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_m_changed, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_arm_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_wifi_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_in_wifi, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Debug Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Debug Info: Payload size different than expected") end +end + +-- Flight log - Cali Mag 00 - 0x08d0 + +f.cali_mag_00_c_mx_0 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_00_c_mx_0", "C Mx 0", base.DEC) +f.cali_mag_00_c_my_0 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_00_c_my_0", "C My 0", base.DEC) +f.cali_mag_00_c_mz_0 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_00_c_mz_0", "C Mz 0", base.DEC) +f.cali_mag_00_c_m_cnt_0 = ProtoField.uint16 ("dji_mavic_flyrec.cali_mag_00_c_m_cnt_0", "C M Cnt 0", base.HEX) + +local function flightrec_cali_mag_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cali_mag_00_c_mx_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_00_c_my_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_00_c_mz_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_00_c_m_cnt_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cali Mag 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cali Mag 00: Payload size different than expected") end +end + +-- Flight log - Cali Mag 01 - 0x08d1 + +f.cali_mag_01_c_mx_1 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_01_c_mx_1", "C Mx 1", base.DEC) +f.cali_mag_01_c_my_1 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_01_c_my_1", "C My 1", base.DEC) +f.cali_mag_01_c_mz_1 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_01_c_mz_1", "C Mz 1", base.DEC) +f.cali_mag_01_c_m_cnt_1 = ProtoField.uint16 ("dji_mavic_flyrec.cali_mag_01_c_m_cnt_1", "C M Cnt 1", base.HEX) + +local function flightrec_cali_mag_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cali_mag_01_c_mx_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_01_c_my_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_01_c_mz_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_01_c_m_cnt_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cali Mag 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cali Mag 01: Payload size different than expected") end +end + +-- Flight log - Cali Mag 02 - 0x08d2 + +f.cali_mag_02_c_mx_2 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_02_c_mx_2", "C Mx 2", base.DEC) +f.cali_mag_02_c_my_2 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_02_c_my_2", "C My 2", base.DEC) +f.cali_mag_02_c_mz_2 = ProtoField.int16 ("dji_mavic_flyrec.cali_mag_02_c_mz_2", "C Mz 2", base.DEC) +f.cali_mag_02_c_m_cnt_2 = ProtoField.uint16 ("dji_mavic_flyrec.cali_mag_02_c_m_cnt_2", "C M Cnt 2", base.HEX) + +local function flightrec_cali_mag_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cali_mag_02_c_mx_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_02_c_my_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_02_c_mz_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_02_c_m_cnt_2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cali Mag 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cali Mag 02: Payload size different than expected") end +end + +-- Flight log - Lpf Gyr Acc0 - 0x0828 + +f.lpf_gyr_acc0_lpf_wx_0 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc0_lpf_wx_0", "Lpf Wx 0", base.DEC) +f.lpf_gyr_acc0_lpf_wy_0 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc0_lpf_wy_0", "Lpf Wy 0", base.DEC) +f.lpf_gyr_acc0_lpf_wz_0 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc0_lpf_wz_0", "Lpf Wz 0", base.DEC) +f.lpf_gyr_acc0_lpf_ax_0 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc0_lpf_ax_0", "Lpf Ax 0", base.DEC) +f.lpf_gyr_acc0_lpf_ay_0 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc0_lpf_ay_0", "Lpf Ay 0", base.DEC) +f.lpf_gyr_acc0_lpf_az_0 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc0_lpf_az_0", "Lpf Az 0", base.DEC) + +local function flightrec_lpf_gyr_acc0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lpf_gyr_acc0_lpf_wx_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_wy_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_wz_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_ax_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_ay_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_az_0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lpf Gyr Acc0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lpf Gyr Acc0: Payload size different than expected") end +end + +-- Flight log - Lpf Gyr Acc1 - 0x0829 + +f.lpf_gyr_acc1_lpf_wx_1 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc1_lpf_wx_1", "Lpf Wx 1", base.DEC) +f.lpf_gyr_acc1_lpf_wy_1 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc1_lpf_wy_1", "Lpf Wy 1", base.DEC) +f.lpf_gyr_acc1_lpf_wz_1 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc1_lpf_wz_1", "Lpf Wz 1", base.DEC) +f.lpf_gyr_acc1_lpf_ax_1 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc1_lpf_ax_1", "Lpf Ax 1", base.DEC) +f.lpf_gyr_acc1_lpf_ay_1 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc1_lpf_ay_1", "Lpf Ay 1", base.DEC) +f.lpf_gyr_acc1_lpf_az_1 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc1_lpf_az_1", "Lpf Az 1", base.DEC) + +local function flightrec_lpf_gyr_acc1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lpf_gyr_acc1_lpf_wx_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_wy_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_wz_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_ax_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_ay_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_az_1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lpf Gyr Acc1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lpf Gyr Acc1: Payload size different than expected") end +end + +-- Flight log - Lpf Gyr Acc2 - 0x082a + +f.lpf_gyr_acc2_lpf_wx_2 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc2_lpf_wx_2", "Lpf Wx 2", base.DEC) +f.lpf_gyr_acc2_lpf_wy_2 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc2_lpf_wy_2", "Lpf Wy 2", base.DEC) +f.lpf_gyr_acc2_lpf_wz_2 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc2_lpf_wz_2", "Lpf Wz 2", base.DEC) +f.lpf_gyr_acc2_lpf_ax_2 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc2_lpf_ax_2", "Lpf Ax 2", base.DEC) +f.lpf_gyr_acc2_lpf_ay_2 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc2_lpf_ay_2", "Lpf Ay 2", base.DEC) +f.lpf_gyr_acc2_lpf_az_2 = ProtoField.float ("dji_mavic_flyrec.lpf_gyr_acc2_lpf_az_2", "Lpf Az 2", base.DEC) + +local function flightrec_lpf_gyr_acc2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lpf_gyr_acc2_lpf_wx_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_wy_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_wz_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_ax_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_ay_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_az_2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lpf Gyr Acc2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lpf Gyr Acc2: Payload size different than expected") end +end + +-- Flight log - App Temp Bias0 - 0x08e6 + +f.app_temp_bias0_bwx0 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias0_bwx0", "Bwx0", base.DEC) +f.app_temp_bias0_bwy0 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias0_bwy0", "Bwy0", base.DEC) +f.app_temp_bias0_bwz0 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias0_bwz0", "Bwz0", base.DEC) +f.app_temp_bias0_bax0 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias0_bax0", "Bax0", base.DEC) +f.app_temp_bias0_bay0 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias0_bay0", "Bay0", base.DEC) +f.app_temp_bias0_baz0 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias0_baz0", "Baz0", base.DEC) +f.app_temp_bias0_temp0 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias0_temp0", "Temp0", base.DEC) +f.app_temp_bias0_level2_flag0 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias0_level2_flag0", "Level2 Flag0", base.DEC) + +local function flightrec_app_temp_bias0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_bias0_bwx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_bwy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_bwz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_bax0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_bay0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_baz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_temp0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_level2_flag0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Bias0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Bias0: Payload size different than expected") end +end + +-- Flight log - App Temp Bias1 - 0x08e7 + +f.app_temp_bias1_bwx1 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias1_bwx1", "Bwx1", base.DEC) +f.app_temp_bias1_bwy1 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias1_bwy1", "Bwy1", base.DEC) +f.app_temp_bias1_bwz1 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias1_bwz1", "Bwz1", base.DEC) +f.app_temp_bias1_bax1 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias1_bax1", "Bax1", base.DEC) +f.app_temp_bias1_bay1 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias1_bay1", "Bay1", base.DEC) +f.app_temp_bias1_baz1 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias1_baz1", "Baz1", base.DEC) +f.app_temp_bias1_temp1 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias1_temp1", "Temp1", base.DEC) +f.app_temp_bias1_level2_flag1 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias1_level2_flag1", "Level2 Flag1", base.DEC) + +local function flightrec_app_temp_bias1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_bias1_bwx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_bwy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_bwz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_bax1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_bay1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_baz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_temp1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_level2_flag1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Bias1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Bias1: Payload size different than expected") end +end + +-- Flight log - App Temp Bias2 - 0x08e8 + +f.app_temp_bias2_bwx2 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias2_bwx2", "Bwx2", base.DEC) +f.app_temp_bias2_bwy2 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias2_bwy2", "Bwy2", base.DEC) +f.app_temp_bias2_bwz2 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias2_bwz2", "Bwz2", base.DEC) +f.app_temp_bias2_bax2 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias2_bax2", "Bax2", base.DEC) +f.app_temp_bias2_bay2 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias2_bay2", "Bay2", base.DEC) +f.app_temp_bias2_baz2 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias2_baz2", "Baz2", base.DEC) +f.app_temp_bias2_temp2 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias2_temp2", "Temp2", base.DEC) +f.app_temp_bias2_level2_flag2 = ProtoField.float ("dji_mavic_flyrec.app_temp_bias2_level2_flag2", "Level2 Flag2", base.DEC) + +local function flightrec_app_temp_bias2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_bias2_bwx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_bwy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_bwz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_bax2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_bay2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_baz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_temp2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_level2_flag2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Bias2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Bias2: Payload size different than expected") end +end + +-- Flight log - Inner Temp Bias0 - 0x08e4 + +f.inner_temp_bias0__bwx0 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias0__bwx0", " Bwx0", base.DEC) +f.inner_temp_bias0__bwy0 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias0__bwy0", " Bwy0", base.DEC) +f.inner_temp_bias0__bwz0 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias0__bwz0", " Bwz0", base.DEC) +f.inner_temp_bias0__bax0 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias0__bax0", " Bax0", base.DEC) +f.inner_temp_bias0__bay0 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias0__bay0", " Bay0", base.DEC) +f.inner_temp_bias0__baz0 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias0__baz0", " Baz0", base.DEC) +f.inner_temp_bias0__temp0 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias0__temp0", " Temp0", base.DEC) +f.inner_temp_bias0_level1_flag0 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias0_level1_flag0", "Level1 Flag0", base.DEC) + +local function flightrec_inner_temp_bias0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.inner_temp_bias0__bwx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__bwy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__bwz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__bax0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__bay0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__baz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__temp0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0_level1_flag0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Inner Temp Bias0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Inner Temp Bias0: Payload size different than expected") end +end + +-- Flight log - Inner Temp Bias1 - 0x08e5 + +f.inner_temp_bias1__bwx1 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias1__bwx1", " Bwx1", base.DEC) +f.inner_temp_bias1__bwy1 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias1__bwy1", " Bwy1", base.DEC) +f.inner_temp_bias1__bwz1 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias1__bwz1", " Bwz1", base.DEC) +f.inner_temp_bias1__bax1 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias1__bax1", " Bax1", base.DEC) +f.inner_temp_bias1__bay1 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias1__bay1", " Bay1", base.DEC) +f.inner_temp_bias1__baz1 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias1__baz1", " Baz1", base.DEC) +f.inner_temp_bias1__temp1 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias1__temp1", " Temp1", base.DEC) +f.inner_temp_bias1_level1_flag1 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias1_level1_flag1", "Level1 Flag1", base.DEC) + +local function flightrec_inner_temp_bias1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.inner_temp_bias1__bwx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__bwy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__bwz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__bax1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__bay1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__baz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__temp1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1_level1_flag1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Inner Temp Bias1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Inner Temp Bias1: Payload size different than expected") end +end + +-- Flight log - Inner Temp Bias2 - 0x08e6 + +f.inner_temp_bias2__bwx2 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias2__bwx2", " Bwx2", base.DEC) +f.inner_temp_bias2__bwy2 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias2__bwy2", " Bwy2", base.DEC) +f.inner_temp_bias2__bwz2 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias2__bwz2", " Bwz2", base.DEC) +f.inner_temp_bias2__bax2 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias2__bax2", " Bax2", base.DEC) +f.inner_temp_bias2__bay2 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias2__bay2", " Bay2", base.DEC) +f.inner_temp_bias2__baz2 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias2__baz2", " Baz2", base.DEC) +f.inner_temp_bias2__temp2 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias2__temp2", " Temp2", base.DEC) +f.inner_temp_bias2_level1_flag2 = ProtoField.float ("dji_mavic_flyrec.inner_temp_bias2_level1_flag2", "Level1 Flag2", base.DEC) + +local function flightrec_inner_temp_bias2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.inner_temp_bias2__bwx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__bwy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__bwz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__bax2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__bay2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__baz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__temp2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2_level1_flag2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Inner Temp Bias2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Inner Temp Bias2: Payload size different than expected") end +end + +-- Flight log - Battery Info - 0x06ae + +f.battery_info_ad_v = ProtoField.uint16 ("dji_mavic_flyrec.battery_info_ad_v", "Ad V", base.HEX) +f.battery_info_r_time = ProtoField.uint16 ("dji_mavic_flyrec.battery_info_r_time", "R Time", base.HEX) +f.battery_info_ave_i = ProtoField.float ("dji_mavic_flyrec.battery_info_ave_i", "Ave I", base.DEC) +f.battery_info_vol_t = ProtoField.float ("dji_mavic_flyrec.battery_info_vol_t", "Vol T", base.DEC) +f.battery_info_pack_ve = ProtoField.int32 ("dji_mavic_flyrec.battery_info_pack_ve", "Pack Ve", base.DEC) +f.battery_info_i = ProtoField.int32 ("dji_mavic_flyrec.battery_info_i", "I", base.DEC) +f.battery_info_r_cap = ProtoField.uint16 ("dji_mavic_flyrec.battery_info_r_cap", "R Cap", base.HEX) +f.battery_info_cap_per = ProtoField.uint8 ("dji_mavic_flyrec.battery_info_cap_per", "Cap Per", base.HEX) +f.battery_info_temp = ProtoField.int16 ("dji_mavic_flyrec.battery_info_temp", "Temp", base.DEC) +f.battery_info_right = ProtoField.uint8 ("dji_mavic_flyrec.battery_info_right", "Right", base.HEX) +f.battery_info_l_cell = ProtoField.uint16 ("dji_mavic_flyrec.battery_info_l_cell", "L Cell", base.HEX) +f.battery_info_dyna_cnt = ProtoField.uint32 ("dji_mavic_flyrec.battery_info_dyna_cnt", "Dyna Cnt", base.HEX) +f.battery_info_f_cap = ProtoField.uint32 ("dji_mavic_flyrec.battery_info_f_cap", "F Cap", base.HEX) +f.battery_info_out_ctl = ProtoField.float ("dji_mavic_flyrec.battery_info_out_ctl", "Out Ctl", base.DEC) +f.battery_info_out_ctl_f = ProtoField.float ("dji_mavic_flyrec.battery_info_out_ctl_f", "Out Ctl F", base.DEC) + +local function flightrec_battery_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_info_ad_v, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_r_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_ave_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_vol_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_pack_ve, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_r_cap, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cap_per, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_temp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_right, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_l_cell, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_dyna_cnt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_f_cap, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_out_ctl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_out_ctl_f, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 44) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Info: Payload size different than expected") end +end + +-- Flight log - Battery Status - 0x06af + +f.battery_status_not_ready = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_not_ready", "Not Ready", base.HEX) +f.battery_status_comm_err = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_comm_err", "Comm Err", base.HEX) +f.battery_status_first_auth = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_first_auth", "First Auth", base.HEX) +f.battery_status_auth_fail = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_auth_fail", "Auth Fail", base.HEX) +f.battery_status_need_re = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_need_re", "Need Re", base.HEX) +f.battery_status_volverylow = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_volverylow", "Volverylow", base.HEX) +f.battery_status_volnotsafe = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_volnotsafe", "Volnotsafe", base.HEX) +f.battery_status_vollevel1 = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_vollevel1", "Vollevel1", base.HEX) +f.battery_status_vollevel2 = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_vollevel2", "Vollevel2", base.HEX) +f.battery_status_caplevel1 = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_caplevel1", "Caplevel1", base.HEX) +f.battery_status_caplevel2 = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_caplevel2", "Caplevel2", base.HEX) +f.battery_status_smartcap1 = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_smartcap1", "Smartcap1", base.HEX) +f.battery_status_smartcap2 = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_smartcap2", "Smartcap2", base.HEX) +f.battery_status_d_flg = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_d_flg", "D Flg", base.HEX) +f.battery_status_ccsc = ProtoField.uint8 ("dji_mavic_flyrec.battery_status_ccsc", "Ccsc", base.HEX) +f.battery_status_all = ProtoField.uint32 ("dji_mavic_flyrec.battery_status_all", "All", base.HEX) + +local function flightrec_battery_status_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_status_not_ready, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_comm_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_first_auth, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_auth_fail, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_need_re, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_volverylow, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_volnotsafe, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_vollevel1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_vollevel2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_caplevel1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_caplevel2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_smartcap1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_smartcap2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_d_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_ccsc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_all, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 19) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Status: Payload size different than expected") end +end + +-- Flight log - Smart Battery Info - 0x06b0 + +f.smart_battery_info_go_home_cnt = ProtoField.uint8 ("dji_mavic_flyrec.smart_battery_info_go_home_cnt", "Go Home Cnt", base.HEX) +f.smart_battery_info_go_home_cmd = ProtoField.uint8 ("dji_mavic_flyrec.smart_battery_info_go_home_cmd", "Go Home Cmd", base.HEX) +f.smart_battery_info_gh_level = ProtoField.uint16 ("dji_mavic_flyrec.smart_battery_info_gh_level", "Gh Level", base.HEX) +f.smart_battery_info_land_level = ProtoField.uint16 ("dji_mavic_flyrec.smart_battery_info_land_level", "Land Level", base.HEX) +f.smart_battery_info_fly_t_for_gh = ProtoField.uint16 ("dji_mavic_flyrec.smart_battery_info_fly_t_for_gh", "Fly T For Gh", base.HEX) +f.smart_battery_info_fly_t_for_land = ProtoField.uint16 ("dji_mavic_flyrec.smart_battery_info_fly_t_for_land", "Fly T For Land", base.HEX) + +local function flightrec_smart_battery_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.smart_battery_info_go_home_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_go_home_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_gh_level, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_land_level, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_fly_t_for_gh, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_fly_t_for_land, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Smart Battery Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Smart Battery Info: Payload size different than expected") end +end + +-- Flight log - Statistical Info - 0x0708 + +f.statistical_info_distance = ProtoField.float ("dji_mavic_flyrec.statistical_info_distance", "Distance", base.DEC) +f.statistical_info_m_starts = ProtoField.float ("dji_mavic_flyrec.statistical_info_m_starts", "M Starts", base.DEC) + +local function flightrec_statistical_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.statistical_info_distance, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.statistical_info_m_starts, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Statistical Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Statistical Info: Payload size different than expected") end +end + +-- Flight log - Ns Sensor Quality - 0x2764 + +f.ns_sensor_quality_ns_mag_gain = ProtoField.uint16 ("dji_mavic_flyrec.ns_sensor_quality_ns_mag_gain", "Ns Mag Gain", base.HEX) + +local function flightrec_ns_sensor_quality_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_sensor_quality_ns_mag_gain, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Sensor Quality: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Sensor Quality: Payload size different than expected") end +end + +-- Flight log - Ns Data Debug - 0x2765 + +f.ns_data_debug_d00 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d00", "D00", base.DEC) +f.ns_data_debug_d01 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d01", "D01", base.DEC) +f.ns_data_debug_d02 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d02", "D02", base.DEC) +f.ns_data_debug_d03 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d03", "D03", base.DEC) +f.ns_data_debug_d04 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d04", "D04", base.DEC) +f.ns_data_debug_d05 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d05", "D05", base.DEC) +f.ns_data_debug_d06 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d06", "D06", base.DEC) +f.ns_data_debug_d07 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d07", "D07", base.DEC) +f.ns_data_debug_d08 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d08", "D08", base.DEC) +f.ns_data_debug_d09 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d09", "D09", base.DEC) +f.ns_data_debug_d10 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d10", "D10", base.DEC) +f.ns_data_debug_d11 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d11", "D11", base.DEC) +f.ns_data_debug_d12 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d12", "D12", base.DEC) +f.ns_data_debug_d13 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d13", "D13", base.DEC) +f.ns_data_debug_d14 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d14", "D14", base.DEC) +f.ns_data_debug_d15 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d15", "D15", base.DEC) +f.ns_data_debug_d16 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d16", "D16", base.DEC) +f.ns_data_debug_d17 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d17", "D17", base.DEC) +f.ns_data_debug_d18 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d18", "D18", base.DEC) +f.ns_data_debug_d19 = ProtoField.float ("dji_mavic_flyrec.ns_data_debug_d19", "D19", base.DEC) + +local function flightrec_ns_data_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_data_debug_d00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d03, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d04, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d05, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d06, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d07, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d08, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d09, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d11, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d12, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d13, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d14, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d15, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d16, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d17, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d19, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Data Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Data Debug: Payload size different than expected") end +end + +-- Flight log - Ns Data Component - 0x2766 + +f.ns_data_component_ns_cmpnt = ProtoField.uint32 ("dji_mavic_flyrec.ns_data_component_ns_cmpnt", "Ns Cmpnt", base.HEX) + +local function flightrec_ns_data_component_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_data_component_ns_cmpnt, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Data Component: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Data Component: Payload size different than expected") end +end + +-- Flight log - Ns Data Residuals - 0x2767 + +f.ns_data_residuals_gns_px = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_gns_px", "Gns Px", base.DEC) +f.ns_data_residuals_gns_py = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_gns_py", "Gns Py", base.DEC) +f.ns_data_residuals_gns_vx = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_gns_vx", "Gns Vx", base.DEC) +f.ns_data_residuals_gns_vy = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_gns_vy", "Gns Vy", base.DEC) +f.ns_data_residuals_gns_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_gns_pz", "Gns Pz", base.DEC) +f.ns_data_residuals_gns_vz = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_gns_vz", "Gns Vz", base.DEC) +f.ns_data_residuals_vod_px = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_vod_px", "Vod Px", base.DEC) +f.ns_data_residuals_vod_py = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_vod_py", "Vod Py", base.DEC) +f.ns_data_residuals_vod_vx = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_vod_vx", "Vod Vx", base.DEC) +f.ns_data_residuals_vod_vy = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_vod_vy", "Vod Vy", base.DEC) +f.ns_data_residuals_vod_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_vod_pz", "Vod Pz", base.DEC) +f.ns_data_residuals_vod_vz = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_vod_vz", "Vod Vz", base.DEC) +f.ns_data_residuals_rtk_px_p = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_px_p", "Rtk Px P", base.DEC) +f.ns_data_residuals_rtk_py_p = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_py_p", "Rtk Py P", base.DEC) +f.ns_data_residuals_rtk_px_s = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_px_s", "Rtk Px S", base.DEC) +f.ns_data_residuals_rtk_py_s = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_py_s", "Rtk Py S", base.DEC) +f.ns_data_residuals_rtk_vx = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_vx", "Rtk Vx", base.DEC) +f.ns_data_residuals_rtk_vy = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_vy", "Rtk Vy", base.DEC) +f.ns_data_residuals_rtk_pz_p = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_pz_p", "Rtk Pz P", base.DEC) +f.ns_data_residuals_rtk_pz_s = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_pz_s", "Rtk Pz S", base.DEC) +f.ns_data_residuals_rtk_vz = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_vz", "Rtk Vz", base.DEC) +f.ns_data_residuals_rtk_yaw = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_rtk_yaw", "Rtk Yaw", base.DEC) +f.ns_data_residuals_usn_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_usn_pz", "Usn Pz", base.DEC) +f.ns_data_residuals_bar_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_bar_pz", "Bar Pz", base.DEC) +f.ns_data_residuals_mag_yaw = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_mag_yaw", "Mag Yaw", base.DEC) +f.ns_data_residuals_vod_h = ProtoField.float ("dji_mavic_flyrec.ns_data_residuals_vod_h", "Vod H", base.DEC) + +local function flightrec_ns_data_residuals_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_data_residuals_gns_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_vx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_vy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_vz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_vx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_vy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_vz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_px_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_py_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_px_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_py_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_vx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_vy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_pz_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_pz_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_vz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_usn_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_bar_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_mag_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_h, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 104) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Data Residuals: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Data Residuals: Payload size different than expected") end +end + +-- Flight log - Ns Data Posi Ofst - 0x2768 + +f.ns_data_posi_ofst_gns_px = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_gns_px", "Gns Px", base.DEC) +f.ns_data_posi_ofst_gns_py = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_gns_py", "Gns Py", base.DEC) +f.ns_data_posi_ofst_gns_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_gns_pz", "Gns Pz", base.DEC) +f.ns_data_posi_ofst_vod_px = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_vod_px", "Vod Px", base.DEC) +f.ns_data_posi_ofst_vod_py = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_vod_py", "Vod Py", base.DEC) +f.ns_data_posi_ofst_vod_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_vod_pz", "Vod Pz", base.DEC) +f.ns_data_posi_ofst_rtk_px_p = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_rtk_px_p", "Rtk Px P", base.DEC) +f.ns_data_posi_ofst_rtk_py_p = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_rtk_py_p", "Rtk Py P", base.DEC) +f.ns_data_posi_ofst_rtk_px = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_rtk_px", "Rtk Px", base.DEC) +f.ns_data_posi_ofst_rtk_py = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_rtk_py", "Rtk Py", base.DEC) +f.ns_data_posi_ofst_rtk_pz_p = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_rtk_pz_p", "Rtk Pz P", base.DEC) +f.ns_data_posi_ofst_rtk_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_rtk_pz", "Rtk Pz", base.DEC) +f.ns_data_posi_ofst_rtk_y = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_rtk_y", "Rtk Y", base.DEC) +f.ns_data_posi_ofst_usn_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_usn_pz", "Usn Pz", base.DEC) +f.ns_data_posi_ofst_bar_pz = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_bar_pz", "Bar Pz", base.DEC) +f.ns_data_posi_ofst_mag_y = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_mag_y", "Mag Y", base.DEC) +f.ns_data_posi_ofst_vod_h = ProtoField.float ("dji_mavic_flyrec.ns_data_posi_ofst_vod_h", "Vod H", base.DEC) + +local function flightrec_ns_data_posi_ofst_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_data_posi_ofst_gns_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_gns_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_gns_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_vod_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_vod_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_vod_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_px_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_py_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_pz_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_usn_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_bar_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_mag_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_vod_h, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Data Posi Ofst: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Data Posi Ofst: Payload size different than expected") end +end + +-- Flight log - Ns Sensor Connect - 0x2769 + +f.ns_sensor_connect_ns_ss_cnnct = ProtoField.uint32 ("dji_mavic_flyrec.ns_sensor_connect_ns_ss_cnnct", "Ns Ss Cnnct", base.HEX) + +local function flightrec_ns_sensor_connect_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_sensor_connect_ns_ss_cnnct, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Sensor Connect: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Sensor Connect: Payload size different than expected") end +end + +-- Flight log - Esc Data - 0x276a + +f.esc_data_status1 = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_status1", "Status1", base.HEX) +f.esc_data_i_1 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_i_1", "I 1", base.DEC) +f.esc_data_speed_1 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_speed_1", "Speed 1", base.DEC) +f.esc_data_v_1 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_1", "V 1", base.HEX) +f.esc_data_temp_1 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_temp_1", "Temp 1", base.DEC) +f.esc_data_ppm_recv_1 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_recv_1", "Ppm Recv 1", base.HEX) +f.esc_data_v_out_1 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_out_1", "V Out 1", base.HEX) +f.esc_data_debug0_1 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_debug0_1", "Debug0 1", base.HEX) +f.esc_data_debug1_1 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug1_1", "Debug1 1", base.DEC) +f.esc_data_debug2_1 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug2_1", "Debug2 1", base.DEC) +f.esc_data_ppm_send_1 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_send_1", "Ppm Send 1", base.HEX) +f.esc_data_cnt_1 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_cnt_1", "Cnt 1", base.DEC) +f.esc_data_status_2 = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_status_2", "Status 2", base.HEX) +f.esc_data_i_2 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_i_2", "I 2", base.DEC) +f.esc_data_speed_2 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_speed_2", "Speed 2", base.DEC) +f.esc_data_v_2 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_2", "V 2", base.HEX) +f.esc_data_temp_2 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_temp_2", "Temp 2", base.DEC) +f.esc_data_ppm_recv_2 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_recv_2", "Ppm Recv 2", base.HEX) +f.esc_data_v_out_2 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_out_2", "V Out 2", base.HEX) +f.esc_data_debug0_2 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_debug0_2", "Debug0 2", base.HEX) +f.esc_data_debug1_2 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug1_2", "Debug1 2", base.DEC) +f.esc_data_debug2_2 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug2_2", "Debug2 2", base.DEC) +f.esc_data_ppm_send_2 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_send_2", "Ppm Send 2", base.HEX) +f.esc_data_cnt_2 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_cnt_2", "Cnt 2", base.DEC) +f.esc_data_status_3 = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_status_3", "Status 3", base.HEX) +f.esc_data_i_3 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_i_3", "I 3", base.DEC) +f.esc_data_speed_3 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_speed_3", "Speed 3", base.DEC) +f.esc_data_v_3 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_3", "V 3", base.HEX) +f.esc_data_temp_3 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_temp_3", "Temp 3", base.DEC) +f.esc_data_ppm_recv_3 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_recv_3", "Ppm Recv 3", base.HEX) +f.esc_data_v_out_3 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_out_3", "V Out 3", base.HEX) +f.esc_data_debug0_3 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_debug0_3", "Debug0 3", base.HEX) +f.esc_data_debug1_3 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug1_3", "Debug1 3", base.DEC) +f.esc_data_debug2_3 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug2_3", "Debug2 3", base.DEC) +f.esc_data_ppm_send_3 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_send_3", "Ppm Send 3", base.HEX) +f.esc_data_cnt_3 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_cnt_3", "Cnt 3", base.DEC) +f.esc_data_status_4 = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_status_4", "Status 4", base.HEX) +f.esc_data_i_4 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_i_4", "I 4", base.DEC) +f.esc_data_speed_4 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_speed_4", "Speed 4", base.DEC) +f.esc_data_v_4 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_4", "V 4", base.HEX) +f.esc_data_temp_4 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_temp_4", "Temp 4", base.DEC) +f.esc_data_ppm_recv_4 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_recv_4", "Ppm Recv 4", base.HEX) +f.esc_data_v_out_4 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_out_4", "V Out 4", base.HEX) +f.esc_data_debug0_4 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_debug0_4", "Debug0 4", base.HEX) +f.esc_data_debug1_4 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug1_4", "Debug1 4", base.DEC) +f.esc_data_debug2_4 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug2_4", "Debug2 4", base.DEC) +f.esc_data_ppm_send_4 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_send_4", "Ppm Send 4", base.HEX) +f.esc_data_cnt_4 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_cnt_4", "Cnt 4", base.DEC) +f.esc_data_status_5 = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_status_5", "Status 5", base.HEX) +f.esc_data_i_5 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_i_5", "I 5", base.DEC) +f.esc_data_speed_5 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_speed_5", "Speed 5", base.DEC) +f.esc_data_v_5 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_5", "V 5", base.HEX) +f.esc_data_temp_5 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_temp_5", "Temp 5", base.DEC) +f.esc_data_ppm_recv_5 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_recv_5", "Ppm Recv 5", base.HEX) +f.esc_data_v_out_5 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_out_5", "V Out 5", base.HEX) +f.esc_data_debug0_5 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_debug0_5", "Debug0 5", base.HEX) +f.esc_data_debug1_5 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug1_5", "Debug1 5", base.DEC) +f.esc_data_debug2_5 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug2_5", "Debug2 5", base.DEC) +f.esc_data_ppm_send = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_send", "Ppm Send", base.HEX) +f.esc_data_cnt_5 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_cnt_5", "Cnt 5", base.DEC) +f.esc_data_status_6 = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_status_6", "Status 6", base.HEX) +f.esc_data_i_6 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_i_6", "I 6", base.DEC) +f.esc_data_speed_6 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_speed_6", "Speed 6", base.DEC) +f.esc_data_v_6 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_6", "V 6", base.HEX) +f.esc_data_temp_6 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_temp_6", "Temp 6", base.DEC) +f.esc_data_ppm_recv_6 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_recv_6", "Ppm Recv 6", base.HEX) +f.esc_data_v_out_6 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_out_6", "V Out 6", base.HEX) +f.esc_data_debug0_6 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_debug0_6", "Debug0 6", base.HEX) +f.esc_data_debug1_6 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug1_6", "Debug1 6", base.DEC) +f.esc_data_debug2_6 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug2_6", "Debug2 6", base.DEC) +f.esc_data_ppm_send_6 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_send_6", "Ppm Send 6", base.HEX) +f.esc_data_cnt_6 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_cnt_6", "Cnt 6", base.DEC) +f.esc_data_status_7 = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_status_7", "Status 7", base.HEX) +f.esc_data_i_7 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_i_7", "I 7", base.DEC) +f.esc_data_speed_7 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_speed_7", "Speed 7", base.DEC) +f.esc_data_v_7 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_7", "V 7", base.HEX) +f.esc_data_temp_7 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_temp_7", "Temp 7", base.DEC) +f.esc_data_ppm_recv_7 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_recv_7", "Ppm Recv 7", base.HEX) +f.esc_data_v_out_7 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_out_7", "V Out 7", base.HEX) +f.esc_data_debug0_7 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_debug0_7", "Debug0 7", base.HEX) +f.esc_data_debug1_7 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug1_7", "Debug1 7", base.DEC) +f.esc_data_debug2_7 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug2_7", "Debug2 7", base.DEC) +f.esc_data_ppm_send_7 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_send_7", "Ppm Send 7", base.HEX) +f.esc_data_cnt_7 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_cnt_7", "Cnt 7", base.DEC) +f.esc_data_status_8 = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_status_8", "Status 8", base.HEX) +f.esc_data_i_8 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_i_8", "I 8", base.DEC) +f.esc_data_speed_8 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_speed_8", "Speed 8", base.DEC) +f.esc_data_v_8 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_8", "V 8", base.HEX) +f.esc_data_temp_8 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_temp_8", "Temp 8", base.DEC) +f.esc_data_ppm_recv_8 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_recv_8", "Ppm Recv 8", base.HEX) +f.esc_data_v_out_8 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_v_out_8", "V Out 8", base.HEX) +f.esc_data_debug0_8 = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_debug0_8", "Debug0 8", base.HEX) +f.esc_data_debug1_8 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug1_8", "Debug1 8", base.DEC) +f.esc_data_debug2_8 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_debug2_8", "Debug2 8", base.DEC) +f.esc_data_ppm_send = ProtoField.uint16 ("dji_mavic_flyrec.esc_data_ppm_send", "Ppm Send", base.HEX) +f.esc_data_cnt_8 = ProtoField.int16 ("dji_mavic_flyrec.esc_data_cnt_8", "Cnt 8", base.DEC) +f.esc_data_ppm_mode = ProtoField.uint8 ("dji_mavic_flyrec.esc_data_ppm_mode", "Ppm Mode", base.HEX) + +local function flightrec_esc_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.esc_data_status1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_mode, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 185) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Esc Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Esc Data: Payload size different than expected") end +end + +-- Flight log - High Freq Gyro Data 0 - 0x276b + +f.high_freq_gyro_data_0_w_x0 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_0_w_x0", "W X0", base.DEC) +f.high_freq_gyro_data_0_w_y0 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_0_w_y0", "W Y0", base.DEC) +f.high_freq_gyro_data_0_w_z0 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_0_w_z0", "W Z0", base.DEC) +f.high_freq_gyro_data_0_cnt0 = ProtoField.uint16 ("dji_mavic_flyrec.high_freq_gyro_data_0_cnt0", "Cnt0", base.HEX) + +local function flightrec_high_freq_gyro_data_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.high_freq_gyro_data_0_w_x0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_0_w_y0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_0_w_z0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_0_cnt0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"High Freq Gyro Data 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"High Freq Gyro Data 0: Payload size different than expected") end +end + +-- Flight log - High Freq Gyro Data 1 - 0x276c + +f.high_freq_gyro_data_1_w_x1 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_1_w_x1", "W X1", base.DEC) +f.high_freq_gyro_data_1_w_y1 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_1_w_y1", "W Y1", base.DEC) +f.high_freq_gyro_data_1_w_z1 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_1_w_z1", "W Z1", base.DEC) +f.high_freq_gyro_data_1_cnt1 = ProtoField.uint16 ("dji_mavic_flyrec.high_freq_gyro_data_1_cnt1", "Cnt1", base.HEX) + +local function flightrec_high_freq_gyro_data_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.high_freq_gyro_data_1_w_x1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_1_w_y1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_1_w_z1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_1_cnt1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"High Freq Gyro Data 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"High Freq Gyro Data 1: Payload size different than expected") end +end + +-- Flight log - High Freq Gyro Data 2 - 0x276d + +f.high_freq_gyro_data_2_w_x2 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_2_w_x2", "W X2", base.DEC) +f.high_freq_gyro_data_2_w_y2 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_2_w_y2", "W Y2", base.DEC) +f.high_freq_gyro_data_2_w_z2 = ProtoField.int16 ("dji_mavic_flyrec.high_freq_gyro_data_2_w_z2", "W Z2", base.DEC) +f.high_freq_gyro_data_2_cnt2 = ProtoField.uint16 ("dji_mavic_flyrec.high_freq_gyro_data_2_cnt2", "Cnt2", base.HEX) + +local function flightrec_high_freq_gyro_data_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.high_freq_gyro_data_2_w_x2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_2_w_y2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_2_w_z2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_2_cnt2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"High Freq Gyro Data 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"High Freq Gyro Data 2: Payload size different than expected") end +end + +-- Flight log - Rc Gps Data - 0x276e + +f.rc_gps_data_hour = ProtoField.uint8 ("dji_mavic_flyrec.rc_gps_data_hour", "Hour", base.HEX) +f.rc_gps_data_min = ProtoField.uint8 ("dji_mavic_flyrec.rc_gps_data_min", "Min", base.HEX) +f.rc_gps_data_sec = ProtoField.uint8 ("dji_mavic_flyrec.rc_gps_data_sec", "Sec", base.HEX) +f.rc_gps_data_year = ProtoField.uint16 ("dji_mavic_flyrec.rc_gps_data_year", "Year", base.HEX) +f.rc_gps_data_month = ProtoField.uint8 ("dji_mavic_flyrec.rc_gps_data_month", "Month", base.HEX) +f.rc_gps_data_day = ProtoField.uint8 ("dji_mavic_flyrec.rc_gps_data_day", "Day", base.HEX) +f.rc_gps_data_longtitude = ProtoField.int32 ("dji_mavic_flyrec.rc_gps_data_longtitude", "Longtitude", base.DEC) +f.rc_gps_data_latitude = ProtoField.int32 ("dji_mavic_flyrec.rc_gps_data_latitude", "Latitude", base.DEC) +f.rc_gps_data_xv = ProtoField.uint32 ("dji_mavic_flyrec.rc_gps_data_xv", "Xv", base.HEX) +f.rc_gps_data_yv = ProtoField.uint32 ("dji_mavic_flyrec.rc_gps_data_yv", "Yv", base.HEX) +f.rc_gps_data_gps_num = ProtoField.uint8 ("dji_mavic_flyrec.rc_gps_data_gps_num", "Gps Num", base.HEX) +f.rc_gps_data_f_scale = ProtoField.float ("dji_mavic_flyrec.rc_gps_data_f_scale", "F Scale", base.DEC) +f.rc_gps_data_gps_state = ProtoField.int16 ("dji_mavic_flyrec.rc_gps_data_gps_state", "Gps State", base.DEC) + +local function flightrec_rc_gps_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_gps_data_hour, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_min, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_sec, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_year, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_gps_data_month, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_day, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_longtitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_latitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_xv, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_yv, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_gps_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_f_scale, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_gps_state, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Gps Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Gps Data: Payload size different than expected") end +end + +-- Flight log - Cb Gps - 0x2770 + +f.cb_gps_date = ProtoField.uint32 ("dji_mavic_flyrec.cb_gps_date", "Date", base.HEX) +f.cb_gps_time = ProtoField.uint32 ("dji_mavic_flyrec.cb_gps_time", "Time", base.HEX) +f.cb_gps_lon = ProtoField.int32 ("dji_mavic_flyrec.cb_gps_lon", "Lon", base.DEC) +f.cb_gps_lat = ProtoField.int32 ("dji_mavic_flyrec.cb_gps_lat", "Lat", base.DEC) +f.cb_gps_hmsl = ProtoField.int32 ("dji_mavic_flyrec.cb_gps_hmsl", "Hmsl", base.DEC) +f.cb_gps_vel_n = ProtoField.float ("dji_mavic_flyrec.cb_gps_vel_n", "Vel N", base.DEC) +f.cb_gps_vel_e = ProtoField.float ("dji_mavic_flyrec.cb_gps_vel_e", "Vel E", base.DEC) +f.cb_gps_vel_d = ProtoField.float ("dji_mavic_flyrec.cb_gps_vel_d", "Vel D", base.DEC) +f.cb_gps_hdop = ProtoField.float ("dji_mavic_flyrec.cb_gps_hdop", "Hdop", base.DEC) +f.cb_gps_pdop = ProtoField.float ("dji_mavic_flyrec.cb_gps_pdop", "Pdop", base.DEC) +f.cb_gps_gps_fix = ProtoField.float ("dji_mavic_flyrec.cb_gps_gps_fix", "Gps Fix", base.DEC) +f.cb_gps_gnss_f = ProtoField.float ("dji_mavic_flyrec.cb_gps_gnss_f", "Gnss F", base.DEC) +f.cb_gps_hacc = ProtoField.float ("dji_mavic_flyrec.cb_gps_hacc", "Hacc", base.DEC) +f.cb_gps_sacc = ProtoField.float ("dji_mavic_flyrec.cb_gps_sacc", "Sacc", base.DEC) +f.cb_gps_gps_used = ProtoField.uint32 ("dji_mavic_flyrec.cb_gps_gps_used", "Gps Used", base.HEX) +f.cb_gps_gln_used = ProtoField.uint32 ("dji_mavic_flyrec.cb_gps_gln_used", "Gln Used", base.HEX) +f.cb_gps_numsv = ProtoField.uint16 ("dji_mavic_flyrec.cb_gps_numsv", "Numsv", base.HEX) +f.cb_gps_gpsstate = ProtoField.uint16 ("dji_mavic_flyrec.cb_gps_gpsstate", "Gpsstate", base.HEX) + +local function flightrec_cb_gps_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cb_gps_date, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_lon, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_lat, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_hmsl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_vel_n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_vel_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_vel_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_hdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_pdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_gps_fix, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_gnss_f, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_hacc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_sacc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_gps_used, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_gln_used, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_gps_numsv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cb_gps_gpsstate, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cb Gps: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cb Gps: Payload size different than expected") end +end + +-- Flight log - Cb Temp - 0x2771 + +f.cb_temp_data = ProtoField.int32 ("dji_mavic_flyrec.cb_temp_data", "Data", base.DEC) +f.cb_temp_cnt = ProtoField.uint16 ("dji_mavic_flyrec.cb_temp_cnt", "Cnt", base.HEX) + +local function flightrec_cb_temp_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cb_temp_data, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_temp_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cb Temp: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cb Temp: Payload size different than expected") end +end + +-- Flight log - Cb Press - 0x2772 + +f.cb_press_press = ProtoField.double ("dji_mavic_flyrec.cb_press_press", "Press", base.DEC) +f.cb_press_temp = ProtoField.double ("dji_mavic_flyrec.cb_press_temp", "Temp", base.DEC) + +local function flightrec_cb_press_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cb_press_press, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.cb_press_temp, payload(offset, 8)) + offset = offset + 8 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cb Press: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cb Press: Payload size different than expected") end +end + +-- Flight log - Air Compensate Data - 0x2774 + +f.air_compensate_data_air_vbx = ProtoField.float ("dji_mavic_flyrec.air_compensate_data_air_vbx", "Air Vbx", base.DEC) +f.air_compensate_data_air_vby = ProtoField.float ("dji_mavic_flyrec.air_compensate_data_air_vby", "Air Vby", base.DEC) +f.air_compensate_data_comp_alti = ProtoField.float ("dji_mavic_flyrec.air_compensate_data_comp_alti", "Comp Alti", base.DEC) +f.air_compensate_data_wind_spd = ProtoField.float ("dji_mavic_flyrec.air_compensate_data_wind_spd", "Wind Spd", base.DEC) +f.air_compensate_data_wind_x = ProtoField.float ("dji_mavic_flyrec.air_compensate_data_wind_x", "Wind X", base.DEC) +f.air_compensate_data_wind_y = ProtoField.float ("dji_mavic_flyrec.air_compensate_data_wind_y", "Wind Y", base.DEC) +f.air_compensate_data_motorspd = ProtoField.float ("dji_mavic_flyrec.air_compensate_data_motorspd", "Motorspd", base.DEC) +f.air_compensate_data_vel_level = ProtoField.uint8 ("dji_mavic_flyrec.air_compensate_data_vel_level", "Vel Level", base.HEX) + +local function flightrec_air_compensate_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.air_compensate_data_air_vbx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_air_vby, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_comp_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_wind_spd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_wind_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_wind_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_motorspd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_vel_level, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 29) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Air Compensate Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Air Compensate Data: Payload size different than expected") end +end + +-- Flight log - Vision Tof - 0x2775 + +f.vision_tof_s_f = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s_f", "S F", base.HEX) +f.vision_tof_s00_dis = ProtoField.uint16 ("dji_mavic_flyrec.vision_tof_s00_dis", "S00 Dis", base.HEX) +f.vision_tof_s00_t = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s00_t", "S00 T", base.HEX) +f.vision_tof_s00_f = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s00_f", "S00 F", base.HEX) +f.vision_tof_s00_cnt = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s00_cnt", "S00 Cnt", base.HEX) +f.vision_tof_s01_dis = ProtoField.uint16 ("dji_mavic_flyrec.vision_tof_s01_dis", "S01 Dis", base.HEX) +f.vision_tof_s01_t = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s01_t", "S01 T", base.HEX) +f.vision_tof_s01_f = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s01_f", "S01 F", base.HEX) +f.vision_tof_s01_cnt = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s01_cnt", "S01 Cnt", base.HEX) +f.vision_tof_s02_dis = ProtoField.uint16 ("dji_mavic_flyrec.vision_tof_s02_dis", "S02 Dis", base.HEX) +f.vision_tof_s02_t = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s02_t", "S02 T", base.HEX) +f.vision_tof_s02_f = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s02_f", "S02 F", base.HEX) +f.vision_tof_s02_cnt = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s02_cnt", "S02 Cnt", base.HEX) +f.vision_tof_s03_dis = ProtoField.uint16 ("dji_mavic_flyrec.vision_tof_s03_dis", "S03 Dis", base.HEX) +f.vision_tof_s03_t = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s03_t", "S03 T", base.HEX) +f.vision_tof_s03_f = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s03_f", "S03 F", base.HEX) +f.vision_tof_s03_cnt = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s03_cnt", "S03 Cnt", base.HEX) +f.vision_tof_s04_dis = ProtoField.uint16 ("dji_mavic_flyrec.vision_tof_s04_dis", "S04 Dis", base.HEX) +f.vision_tof_s04_t = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s04_t", "S04 T", base.HEX) +f.vision_tof_s04_f = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s04_f", "S04 F", base.HEX) +f.vision_tof_s04_cnt = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s04_cnt", "S04 Cnt", base.HEX) +f.vision_tof_s05_dis = ProtoField.uint16 ("dji_mavic_flyrec.vision_tof_s05_dis", "S05 Dis", base.HEX) +f.vision_tof_s05_t = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s05_t", "S05 T", base.HEX) +f.vision_tof_s05_f = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s05_f", "S05 F", base.HEX) +f.vision_tof_s05_cnt = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_s05_cnt", "S05 Cnt", base.HEX) +f.vision_tof_cnt = ProtoField.uint8 ("dji_mavic_flyrec.vision_tof_cnt", "Cnt", base.HEX) + +local function flightrec_vision_tof_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.vision_tof_s_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s00_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s00_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s00_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s00_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s01_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s01_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s01_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s01_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s02_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s02_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s02_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s02_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s03_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s03_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s03_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s03_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s04_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s04_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s04_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s04_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s05_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s05_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s05_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s05_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Vision Tof: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Vision Tof: Payload size different than expected") end +end + +-- Flight log - Gs Rtk Data - 0x2776 + +f.gs_rtk_data_hrz_lati = ProtoField.double ("dji_mavic_flyrec.gs_rtk_data_hrz_lati", "Hrz Lati", base.DEC) +f.gs_rtk_data_hrz_long = ProtoField.double ("dji_mavic_flyrec.gs_rtk_data_hrz_long", "Hrz Long", base.DEC) +f.gs_rtk_data_vert_pos = ProtoField.float ("dji_mavic_flyrec.gs_rtk_data_vert_pos", "Vert Pos", base.DEC) +f.gs_rtk_data_hrz_f = ProtoField.uint8 ("dji_mavic_flyrec.gs_rtk_data_hrz_f", "Hrz F", base.HEX) +f.gs_rtk_data_vert_f = ProtoField.uint8 ("dji_mavic_flyrec.gs_rtk_data_vert_f", "Vert F", base.HEX) +f.gs_rtk_data_gs_hrz_la = ProtoField.double ("dji_mavic_flyrec.gs_rtk_data_gs_hrz_la", "Gs Hrz La", base.DEC) +f.gs_rtk_data_gs_hrz_lo = ProtoField.double ("dji_mavic_flyrec.gs_rtk_data_gs_hrz_lo", "Gs Hrz Lo", base.DEC) +f.gs_rtk_data_gs_vert_p = ProtoField.float ("dji_mavic_flyrec.gs_rtk_data_gs_vert_p", "Gs Vert P", base.DEC) +f.gs_rtk_data_hrz_off0 = ProtoField.float ("dji_mavic_flyrec.gs_rtk_data_hrz_off0", "Hrz Off0", base.DEC) +f.gs_rtk_data_hrz_off1 = ProtoField.float ("dji_mavic_flyrec.gs_rtk_data_hrz_off1", "Hrz Off1", base.DEC) +f.gs_rtk_data_vert_off = ProtoField.float ("dji_mavic_flyrec.gs_rtk_data_vert_off", "Vert Off", base.DEC) +f.gs_rtk_data_to_alti = ProtoField.float ("dji_mavic_flyrec.gs_rtk_data_to_alti", "To Alti", base.DEC) +f.gs_rtk_data_r_to_al = ProtoField.float ("dji_mavic_flyrec.gs_rtk_data_r_to_al", "R To Al", base.DEC) +f.gs_rtk_data_r_to_al_f = ProtoField.uint8 ("dji_mavic_flyrec.gs_rtk_data_r_to_al_f", "R To Al F", base.HEX) +f.gs_rtk_data_r_cnct = ProtoField.uint8 ("dji_mavic_flyrec.gs_rtk_data_r_cnct", "R Cnct", base.HEX) +f.gs_rtk_data_gs_rtk_f = ProtoField.uint8 ("dji_mavic_flyrec.gs_rtk_data_gs_rtk_f", "Gs Rtk F", base.HEX) +f.gs_rtk_data_sim_mvo_f = ProtoField.uint16 ("dji_mavic_flyrec.gs_rtk_data_sim_mvo_f", "Sim Mvo F", base.HEX) + +local function flightrec_gs_rtk_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gs_rtk_data_hrz_lati, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gs_rtk_data_hrz_long, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gs_rtk_data_vert_pos, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_hrz_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_vert_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_gs_hrz_la, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gs_rtk_data_gs_hrz_lo, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gs_rtk_data_gs_vert_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_hrz_off0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_hrz_off1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_vert_off, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_to_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_r_to_al, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_r_to_al_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_r_cnct, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_gs_rtk_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_sim_mvo_f, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 67) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gs Rtk Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gs Rtk Data: Payload size different than expected") end +end + +-- Flight log - Ex Raw Baro1 - 0x2777 + +f.ex_raw_baro1_press = ProtoField.float ("dji_mavic_flyrec.ex_raw_baro1_press", "Press", base.DEC) +f.ex_raw_baro1_temp = ProtoField.float ("dji_mavic_flyrec.ex_raw_baro1_temp", "Temp", base.DEC) + +local function flightrec_ex_raw_baro1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ex_raw_baro1_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ex_raw_baro1_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ex Raw Baro1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ex Raw Baro1: Payload size different than expected") end +end + +-- Flight log - Ex Raw Baro2 - 0x2778 + +f.ex_raw_baro2_press = ProtoField.float ("dji_mavic_flyrec.ex_raw_baro2_press", "Press", base.DEC) +f.ex_raw_baro2_temp = ProtoField.float ("dji_mavic_flyrec.ex_raw_baro2_temp", "Temp", base.DEC) + +local function flightrec_ex_raw_baro2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ex_raw_baro2_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ex_raw_baro2_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ex Raw Baro2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ex Raw Baro2: Payload size different than expected") end +end + +-- Flight log - Ex Raw Compass - 0x2779 + +f.ex_raw_compass_x = ProtoField.int16 ("dji_mavic_flyrec.ex_raw_compass_x", "X", base.DEC) +f.ex_raw_compass_y = ProtoField.int16 ("dji_mavic_flyrec.ex_raw_compass_y", "Y", base.DEC) +f.ex_raw_compass_z = ProtoField.int16 ("dji_mavic_flyrec.ex_raw_compass_z", "Z", base.DEC) +f.ex_raw_compass_cnt = ProtoField.uint16 ("dji_mavic_flyrec.ex_raw_compass_cnt", "Cnt", base.HEX) + +local function flightrec_ex_raw_compass_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ex_raw_compass_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ex_raw_compass_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ex_raw_compass_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ex_raw_compass_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ex Raw Compass: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ex Raw Compass: Payload size different than expected") end +end + +-- Flight log - Gear Status - 0x27d8 + +f.gear_status_gr_mode = ProtoField.uint8 ("dji_mavic_flyrec.gear_status_gr_mode", "Gr Mode", base.HEX) +f.gear_status_gr_sta = ProtoField.uint8 ("dji_mavic_flyrec.gear_status_gr_sta", "Gr Sta", base.HEX) +f.gear_status_gr_cmd = ProtoField.uint8 ("dji_mavic_flyrec.gear_status_gr_cmd", "Gr Cmd", base.HEX) +f.gear_status_gr_wk_f = ProtoField.uint8 ("dji_mavic_flyrec.gear_status_gr_wk_f", "Gr Wk F", base.HEX) +f.gear_status_nt_safe2ld = ProtoField.uint8 ("dji_mavic_flyrec.gear_status_nt_safe2ld", "Nt Safe2Ld", base.HEX) +f.gear_status_gr_sh_unab = ProtoField.uint32 ("dji_mavic_flyrec.gear_status_gr_sh_unab", "Gr Sh Unab", base.HEX) +f.gear_status_gr_sh_t = ProtoField.float ("dji_mavic_flyrec.gear_status_gr_sh_t", "Gr Sh T", base.DEC) +f.gear_status_gr_sh_req = ProtoField.uint8 ("dji_mavic_flyrec.gear_status_gr_sh_req", "Gr Sh Req", base.HEX) + +local function flightrec_gear_status_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gear_status_gr_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_gr_sta, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_gr_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_gr_wk_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_nt_safe2ld, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_gr_sh_unab, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gear_status_gr_sh_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gear_status_gr_sh_req, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 14) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gear Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gear Status: Payload size different than expected") end +end + +-- Flight log - Radar Bottom - 0x4ef2 + +f.radar_bottom_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_bottom_dis", "Dis", base.HEX) +f.radar_bottom_fix_agl = ProtoField.uint16 ("dji_mavic_flyrec.radar_bottom_fix_agl", "Fix Agl", base.HEX) +f.radar_bottom_raw_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_bottom_raw_dis", "Raw Dis", base.HEX) +f.radar_bottom_valid_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_bottom_valid_flg", "Valid Flg", base.HEX) +f.radar_bottom_type = ProtoField.uint8 ("dji_mavic_flyrec.radar_bottom_type", "Type", base.HEX) +f.radar_bottom_health_flag = ProtoField.uint8 ("dji_mavic_flyrec.radar_bottom_health_flag", "Health Flag", base.HEX) +f.radar_bottom_cnt = ProtoField.uint8 ("dji_mavic_flyrec.radar_bottom_cnt", "Cnt", base.HEX) + +local function flightrec_radar_bottom_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_bottom_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_bottom_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_bottom_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_bottom_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_bottom_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_bottom_health_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_bottom_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Bottom: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Bottom: Payload size different than expected") end +end + +-- Flight log - Radar Avoid Front - 0x4ef3 + +f.radar_avoid_front_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_avoid_front_dis", "Dis", base.HEX) +f.radar_avoid_front_fix_agl = ProtoField.uint16 ("dji_mavic_flyrec.radar_avoid_front_fix_agl", "Fix Agl", base.HEX) +f.radar_avoid_front_raw_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_avoid_front_raw_dis", "Raw Dis", base.HEX) +f.radar_avoid_front_valid_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_valid_flg", "Valid Flg", base.HEX) +f.radar_avoid_front_type = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_type", "Type", base.HEX) +f.radar_avoid_front_stop_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_stop_flg", "Stop Flg", base.HEX) +f.radar_avoid_front_near_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_near_flg", "Near Flg", base.HEX) +f.radar_avoid_front_pm_flag = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_pm_flag", "Pm Flag", base.HEX) +f.radar_avoid_front_near_px = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_near_px", "Near Px", base.HEX) +f.radar_avoid_front_near_py = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_near_py", "Near Py", base.HEX) +f.radar_avoid_front_pm_px = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_pm_px", "Pm Px", base.HEX) +f.radar_avoid_front_pm_py = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_pm_py", "Pm Py", base.HEX) +f.radar_avoid_front_cur_direciton = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_cur_direciton", "Cur Direciton", base.HEX) +f.radar_avoid_front_cnt = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_front_cnt", "Cnt", base.HEX) + +local function flightrec_radar_avoid_front_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_avoid_front_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_front_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_front_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_front_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_stop_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_near_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_pm_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_near_px, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_near_py, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_pm_px, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_pm_py, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_cur_direciton, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 17) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Avoid Front: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Avoid Front: Payload size different than expected") end +end + +-- Flight log - Radar Avoid Back - 0x4ef4 + +f.radar_avoid_back_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_avoid_back_dis", "Dis", base.HEX) +f.radar_avoid_back_fix_agl = ProtoField.uint16 ("dji_mavic_flyrec.radar_avoid_back_fix_agl", "Fix Agl", base.HEX) +f.radar_avoid_back_raw_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_avoid_back_raw_dis", "Raw Dis", base.HEX) +f.radar_avoid_back_valid_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_valid_flg", "Valid Flg", base.HEX) +f.radar_avoid_back_type = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_type", "Type", base.HEX) +f.radar_avoid_back_stop_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_stop_flg", "Stop Flg", base.HEX) +f.radar_avoid_back_near_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_near_flg", "Near Flg", base.HEX) +f.radar_avoid_back_max_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_max_flg", "Max Flg", base.HEX) +f.radar_avoid_back_near_px = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_near_px", "Near Px", base.HEX) +f.radar_avoid_back_near_py = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_near_py", "Near Py", base.HEX) +f.radar_avoid_back_pm_px = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_pm_px", "Pm Px", base.HEX) +f.radar_avoid_back_pm_py = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_pm_py", "Pm Py", base.HEX) +f.radar_avoid_back_cnt = ProtoField.uint8 ("dji_mavic_flyrec.radar_avoid_back_cnt", "Cnt", base.HEX) + +local function flightrec_radar_avoid_back_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_avoid_back_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_back_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_back_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_back_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_stop_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_near_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_max_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_near_px, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_near_py, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_pm_px, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_pm_py, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Avoid Back: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Avoid Back: Payload size different than expected") end +end + +-- Flight log - Radar Predict Front - 0x4ef5 + +f.radar_predict_front_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_predict_front_dis", "Dis", base.HEX) +f.radar_predict_front_fix_agl = ProtoField.uint16 ("dji_mavic_flyrec.radar_predict_front_fix_agl", "Fix Agl", base.HEX) +f.radar_predict_front_raw_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_predict_front_raw_dis", "Raw Dis", base.HEX) +f.radar_predict_front_valid_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_predict_front_valid_flg", "Valid Flg", base.HEX) +f.radar_predict_front_type = ProtoField.uint8 ("dji_mavic_flyrec.radar_predict_front_type", "Type", base.HEX) +f.radar_predict_front_raw_ok_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_predict_front_raw_ok_flg", "Raw Ok Flg", base.HEX) +f.radar_predict_front_cnt = ProtoField.uint8 ("dji_mavic_flyrec.radar_predict_front_cnt", "Cnt", base.HEX) + +local function flightrec_radar_predict_front_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_predict_front_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_front_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_front_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_front_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_front_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_front_raw_ok_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_front_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Predict Front: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Predict Front: Payload size different than expected") end +end + +-- Flight log - Radar Predict Back - 0x4ef6 + +f.radar_predict_back_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_predict_back_dis", "Dis", base.HEX) +f.radar_predict_back_fix_agl = ProtoField.uint16 ("dji_mavic_flyrec.radar_predict_back_fix_agl", "Fix Agl", base.HEX) +f.radar_predict_back_raw_dis = ProtoField.uint16 ("dji_mavic_flyrec.radar_predict_back_raw_dis", "Raw Dis", base.HEX) +f.radar_predict_back_valid_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_predict_back_valid_flg", "Valid Flg", base.HEX) +f.radar_predict_back_type = ProtoField.uint8 ("dji_mavic_flyrec.radar_predict_back_type", "Type", base.HEX) +f.radar_predict_back_raw_ok_flg = ProtoField.uint8 ("dji_mavic_flyrec.radar_predict_back_raw_ok_flg", "Raw Ok Flg", base.HEX) +f.radar_predict_back_cnt = ProtoField.uint8 ("dji_mavic_flyrec.radar_predict_back_cnt", "Cnt", base.HEX) + +local function flightrec_radar_predict_back_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_predict_back_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_back_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_back_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_back_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_back_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_back_raw_ok_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_back_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Predict Back: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Predict Back: Payload size different than expected") end +end + +-- Flight log - Gyro Raw0 0 - 0x4f4c + +f.gyro_raw0_0_gyro_x0_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_0_gyro_x0_0", "Gyro X0 0", base.DEC) +f.gyro_raw0_0_gyro_y0_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_0_gyro_y0_0", "Gyro Y0 0", base.DEC) +f.gyro_raw0_0_gyro_z0_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_0_gyro_z0_0", "Gyro Z0 0", base.DEC) +f.gyro_raw0_0_gyro_temp0_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_0_gyro_temp0_0", "Gyro Temp0 0", base.DEC) + +local function flightrec_gyro_raw0_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw0_0_gyro_x0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_0_gyro_y0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_0_gyro_z0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_0_gyro_temp0_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw0 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw0 0: Payload size different than expected") end +end + +-- Flight log - Gyro Raw0 1 - 0x4f4d + +f.gyro_raw0_1_gyro_x0_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_1_gyro_x0_1", "Gyro X0 1", base.DEC) +f.gyro_raw0_1_gyro_y0_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_1_gyro_y0_1", "Gyro Y0 1", base.DEC) +f.gyro_raw0_1_gyro_z0_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_1_gyro_z0_1", "Gyro Z0 1", base.DEC) +f.gyro_raw0_1_gyro_temp0_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_1_gyro_temp0_1", "Gyro Temp0 1", base.DEC) + +local function flightrec_gyro_raw0_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw0_1_gyro_x0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_1_gyro_y0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_1_gyro_z0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_1_gyro_temp0_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw0 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw0 1: Payload size different than expected") end +end + +-- Flight log - Gyro Raw0 2 - 0x4f4e + +f.gyro_raw0_2_gyro_x0_2 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_2_gyro_x0_2", "Gyro X0 2", base.DEC) +f.gyro_raw0_2_gyro_y0_2 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_2_gyro_y0_2", "Gyro Y0 2", base.DEC) +f.gyro_raw0_2_gyro_z0_2 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_2_gyro_z0_2", "Gyro Z0 2", base.DEC) +f.gyro_raw0_2_gyro_temp0_2 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw0_2_gyro_temp0_2", "Gyro Temp0 2", base.DEC) + +local function flightrec_gyro_raw0_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw0_2_gyro_x0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_2_gyro_y0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_2_gyro_z0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_2_gyro_temp0_2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw0 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw0 2: Payload size different than expected") end +end + +-- Flight log - Gyro Raw1 0 - 0x4f50 + +f.gyro_raw1_0_gyro_x1_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw1_0_gyro_x1_0", "Gyro X1 0", base.DEC) +f.gyro_raw1_0_gyro_y1_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw1_0_gyro_y1_0", "Gyro Y1 0", base.DEC) +f.gyro_raw1_0_gyro_z1_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw1_0_gyro_z1_0", "Gyro Z1 0", base.DEC) +f.gyro_raw1_0_gyro_temp1_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw1_0_gyro_temp1_0", "Gyro Temp1 0", base.DEC) + +local function flightrec_gyro_raw1_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw1_0_gyro_x1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_0_gyro_y1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_0_gyro_z1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_0_gyro_temp1_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw1 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw1 0: Payload size different than expected") end +end + +-- Flight log - Gyro Raw1 1 - 0x4f51 + +f.gyro_raw1_1_gyro_x1_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw1_1_gyro_x1_1", "Gyro X1 1", base.DEC) +f.gyro_raw1_1_gyro_y1_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw1_1_gyro_y1_1", "Gyro Y1 1", base.DEC) +f.gyro_raw1_1_gyro_z1_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw1_1_gyro_z1_1", "Gyro Z1 1", base.DEC) +f.gyro_raw1_1_gyro_temp1_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw1_1_gyro_temp1_1", "Gyro Temp1 1", base.DEC) + +local function flightrec_gyro_raw1_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw1_1_gyro_x1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_1_gyro_y1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_1_gyro_z1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_1_gyro_temp1_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw1 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw1 1: Payload size different than expected") end +end + +-- Flight log - Gyro Raw2 0 - 0x4f54 + +f.gyro_raw2_0_gyro_x2_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw2_0_gyro_x2_0", "Gyro X2 0", base.DEC) +f.gyro_raw2_0_gyro_y2_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw2_0_gyro_y2_0", "Gyro Y2 0", base.DEC) +f.gyro_raw2_0_gyro_z2_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw2_0_gyro_z2_0", "Gyro Z2 0", base.DEC) +f.gyro_raw2_0_gyro_temp2_0 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw2_0_gyro_temp2_0", "Gyro Temp2 0", base.DEC) + +local function flightrec_gyro_raw2_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw2_0_gyro_x2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_0_gyro_y2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_0_gyro_z2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_0_gyro_temp2_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw2 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw2 0: Payload size different than expected") end +end + +-- Flight log - Gyro Raw2 1 - 0x4f55 + +f.gyro_raw2_1_gyro_x2_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw2_1_gyro_x2_1", "Gyro X2 1", base.DEC) +f.gyro_raw2_1_gyro_y2_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw2_1_gyro_y2_1", "Gyro Y2 1", base.DEC) +f.gyro_raw2_1_gyro_z2_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw2_1_gyro_z2_1", "Gyro Z2 1", base.DEC) +f.gyro_raw2_1_gyro_temp2_1 = ProtoField.int16 ("dji_mavic_flyrec.gyro_raw2_1_gyro_temp2_1", "Gyro Temp2 1", base.DEC) + +local function flightrec_gyro_raw2_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw2_1_gyro_x2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_1_gyro_y2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_1_gyro_z2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_1_gyro_temp2_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw2 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw2 1: Payload size different than expected") end +end + +-- Flight log - Acc Raw0 0 - 0x4f58 + +f.acc_raw0_0_acc_x0_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_0_acc_x0_0", "Acc X0 0", base.DEC) +f.acc_raw0_0_acc_y0_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_0_acc_y0_0", "Acc Y0 0", base.DEC) +f.acc_raw0_0_acc_z0_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_0_acc_z0_0", "Acc Z0 0", base.DEC) +f.acc_raw0_0_acc_temp0_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_0_acc_temp0_0", "Acc Temp0 0", base.DEC) + +local function flightrec_acc_raw0_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw0_0_acc_x0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_0_acc_y0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_0_acc_z0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_0_acc_temp0_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw0 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw0 0: Payload size different than expected") end +end + +-- Flight log - Acc Raw0 1 - 0x4f59 + +f.acc_raw0_1_acc_x0_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_1_acc_x0_1", "Acc X0 1", base.DEC) +f.acc_raw0_1_acc_y0_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_1_acc_y0_1", "Acc Y0 1", base.DEC) +f.acc_raw0_1_acc_z0_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_1_acc_z0_1", "Acc Z0 1", base.DEC) +f.acc_raw0_1_acc_temp0_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_1_acc_temp0_1", "Acc Temp0 1", base.DEC) + +local function flightrec_acc_raw0_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw0_1_acc_x0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_1_acc_y0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_1_acc_z0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_1_acc_temp0_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw0 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw0 1: Payload size different than expected") end +end + +-- Flight log - Acc Raw0 2 - 0x4f5a + +f.acc_raw0_2_acc_x0_2 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_2_acc_x0_2", "Acc X0 2", base.DEC) +f.acc_raw0_2_acc_y0_2 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_2_acc_y0_2", "Acc Y0 2", base.DEC) +f.acc_raw0_2_acc_z0_2 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_2_acc_z0_2", "Acc Z0 2", base.DEC) +f.acc_raw0_2_acc_temp0_2 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw0_2_acc_temp0_2", "Acc Temp0 2", base.DEC) + +local function flightrec_acc_raw0_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw0_2_acc_x0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_2_acc_y0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_2_acc_z0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_2_acc_temp0_2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw0 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw0 2: Payload size different than expected") end +end + +-- Flight log - Acc Raw1 0 - 0x4f5c + +f.acc_raw1_0_acc_x1_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw1_0_acc_x1_0", "Acc X1 0", base.DEC) +f.acc_raw1_0_acc_y1_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw1_0_acc_y1_0", "Acc Y1 0", base.DEC) +f.acc_raw1_0_acc_z1_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw1_0_acc_z1_0", "Acc Z1 0", base.DEC) +f.acc_raw1_0_acc_temp1_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw1_0_acc_temp1_0", "Acc Temp1 0", base.DEC) + +local function flightrec_acc_raw1_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw1_0_acc_x1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_0_acc_y1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_0_acc_z1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_0_acc_temp1_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw1 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw1 0: Payload size different than expected") end +end + +-- Flight log - Acc Raw1 1 - 0x4f5d + +f.acc_raw1_1_acc_x1_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw1_1_acc_x1_1", "Acc X1 1", base.DEC) +f.acc_raw1_1_acc_y1_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw1_1_acc_y1_1", "Acc Y1 1", base.DEC) +f.acc_raw1_1_acc_z1_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw1_1_acc_z1_1", "Acc Z1 1", base.DEC) +f.acc_raw1_1_acc_temp1_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw1_1_acc_temp1_1", "Acc Temp1 1", base.DEC) + +local function flightrec_acc_raw1_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw1_1_acc_x1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_1_acc_y1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_1_acc_z1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_1_acc_temp1_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw1 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw1 1: Payload size different than expected") end +end + +-- Flight log - Acc Raw2 0 - 0x4f60 + +f.acc_raw2_0_acc_x2_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw2_0_acc_x2_0", "Acc X2 0", base.DEC) +f.acc_raw2_0_acc_y2_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw2_0_acc_y2_0", "Acc Y2 0", base.DEC) +f.acc_raw2_0_acc_z2_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw2_0_acc_z2_0", "Acc Z2 0", base.DEC) +f.acc_raw2_0_acc_temp2_0 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw2_0_acc_temp2_0", "Acc Temp2 0", base.DEC) + +local function flightrec_acc_raw2_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw2_0_acc_x2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_0_acc_y2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_0_acc_z2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_0_acc_temp2_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw2 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw2 0: Payload size different than expected") end +end + +-- Flight log - Acc Raw2 1 - 0x4f61 + +f.acc_raw2_1_acc_x2_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw2_1_acc_x2_1", "Acc X2 1", base.DEC) +f.acc_raw2_1_acc_y2_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw2_1_acc_y2_1", "Acc Y2 1", base.DEC) +f.acc_raw2_1_acc_z2_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw2_1_acc_z2_1", "Acc Z2 1", base.DEC) +f.acc_raw2_1_acc_temp2_1 = ProtoField.int16 ("dji_mavic_flyrec.acc_raw2_1_acc_temp2_1", "Acc Temp2 1", base.DEC) + +local function flightrec_acc_raw2_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw2_1_acc_x2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_1_acc_y2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_1_acc_z2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_1_acc_temp2_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw2 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw2 1: Payload size different than expected") end +end + +-- Flight log - Sensor Push0 0 - 0x4f64 + +f.sensor_push0_0_gyro0_0 = ProtoField.int8 ("dji_mavic_flyrec.sensor_push0_0_gyro0_0", "Gyro0 0", base.DEC) +f.sensor_push0_0_acc0_0 = ProtoField.int8 ("dji_mavic_flyrec.sensor_push0_0_acc0_0", "Acc0 0", base.DEC) +f.sensor_push0_0_baro0_0 = ProtoField.int8 ("dji_mavic_flyrec.sensor_push0_0_baro0_0", "Baro0 0", base.DEC) +f.sensor_push0_0_compass0_0 = ProtoField.int8 ("dji_mavic_flyrec.sensor_push0_0_compass0_0", "Compass0 0", base.DEC) + +local function flightrec_sensor_push0_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.sensor_push0_0_gyro0_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_0_acc0_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_0_baro0_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_0_compass0_0, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Sensor Push0 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Sensor Push0 0: Payload size different than expected") end +end + +-- Flight log - Sensor Push0 1 - 0x4f65 + +f.sensor_push0_1_gyro0_1 = ProtoField.int8 ("dji_mavic_flyrec.sensor_push0_1_gyro0_1", "Gyro0 1", base.DEC) +f.sensor_push0_1_acc0_1 = ProtoField.int8 ("dji_mavic_flyrec.sensor_push0_1_acc0_1", "Acc0 1", base.DEC) +f.sensor_push0_1_baro0_1 = ProtoField.int8 ("dji_mavic_flyrec.sensor_push0_1_baro0_1", "Baro0 1", base.DEC) +f.sensor_push0_1_compass0_1 = ProtoField.int8 ("dji_mavic_flyrec.sensor_push0_1_compass0_1", "Compass0 1", base.DEC) + +local function flightrec_sensor_push0_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.sensor_push0_1_gyro0_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_1_acc0_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_1_baro0_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_1_compass0_1, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Sensor Push0 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Sensor Push0 1: Payload size different than expected") end +end + +-- Flight log - Baro Raw0 - 0x4f6a + +f.baro_raw0_baro0 = ProtoField.float ("dji_mavic_flyrec.baro_raw0_baro0", "Baro0", base.DEC) +f.baro_raw0_baro_temp0 = ProtoField.int16 ("dji_mavic_flyrec.baro_raw0_baro_temp0", "Baro Temp0", base.DEC) + +local function flightrec_baro_raw0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.baro_raw0_baro0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.baro_raw0_baro_temp0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Baro Raw0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Baro Raw0: Payload size different than expected") end +end + +-- Flight log - Baro Raw1 - 0x4f6b + +f.baro_raw1_baro1 = ProtoField.float ("dji_mavic_flyrec.baro_raw1_baro1", "Baro1", base.DEC) +f.baro_raw1_baro_temp1 = ProtoField.int16 ("dji_mavic_flyrec.baro_raw1_baro_temp1", "Baro Temp1", base.DEC) + +local function flightrec_baro_raw1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.baro_raw1_baro1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.baro_raw1_baro_temp1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Baro Raw1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Baro Raw1: Payload size different than expected") end +end + +-- Flight log - Baro Raw2 - 0x4f6c + +f.baro_raw2_baro2 = ProtoField.float ("dji_mavic_flyrec.baro_raw2_baro2", "Baro2", base.DEC) +f.baro_raw2_baro_temp2 = ProtoField.int16 ("dji_mavic_flyrec.baro_raw2_baro_temp2", "Baro Temp2", base.DEC) + +local function flightrec_baro_raw2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.baro_raw2_baro2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.baro_raw2_baro_temp2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Baro Raw2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Baro Raw2: Payload size different than expected") end +end + +-- Flight log - Baro Raw3 - 0x4f6d + +f.baro_raw3_baro3 = ProtoField.float ("dji_mavic_flyrec.baro_raw3_baro3", "Baro3", base.DEC) +f.baro_raw3_baro_temp3 = ProtoField.int16 ("dji_mavic_flyrec.baro_raw3_baro_temp3", "Baro Temp3", base.DEC) + +local function flightrec_baro_raw3_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.baro_raw3_baro3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.baro_raw3_baro_temp3, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Baro Raw3: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Baro Raw3: Payload size different than expected") end +end + +-- Flight log - Compass Raw0 - 0x4f74 + +f.compass_raw0_r_mx0 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw0_r_mx0", "R Mx0", base.DEC) +f.compass_raw0_r_my0 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw0_r_my0", "R My0", base.DEC) +f.compass_raw0_r_mz0 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw0_r_mz0", "R Mz0", base.DEC) +f.compass_raw0_r_m_cnt0 = ProtoField.uint16 ("dji_mavic_flyrec.compass_raw0_r_m_cnt0", "R M Cnt0", base.HEX) + +local function flightrec_compass_raw0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_raw0_r_mx0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw0_r_my0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw0_r_mz0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw0_r_m_cnt0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Raw0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Raw0: Payload size different than expected") end +end + +-- Flight log - Compass Raw1 - 0x4f75 + +f.compass_raw1_r_mx1 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw1_r_mx1", "R Mx1", base.DEC) +f.compass_raw1_r_my1 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw1_r_my1", "R My1", base.DEC) +f.compass_raw1_r_mz1 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw1_r_mz1", "R Mz1", base.DEC) +f.compass_raw1_r_m_cnt1 = ProtoField.uint16 ("dji_mavic_flyrec.compass_raw1_r_m_cnt1", "R M Cnt1", base.HEX) + +local function flightrec_compass_raw1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_raw1_r_mx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw1_r_my1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw1_r_mz1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw1_r_m_cnt1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Raw1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Raw1: Payload size different than expected") end +end + +-- Flight log - Compass Raw2 - 0x4f76 + +f.compass_raw2_r_mx2 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw2_r_mx2", "R Mx2", base.DEC) +f.compass_raw2_r_my2 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw2_r_my2", "R My2", base.DEC) +f.compass_raw2_r_mz2 = ProtoField.int16 ("dji_mavic_flyrec.compass_raw2_r_mz2", "R Mz2", base.DEC) +f.compass_raw2_r_m_cnt2 = ProtoField.uint16 ("dji_mavic_flyrec.compass_raw2_r_m_cnt2", "R M Cnt2", base.HEX) + +local function flightrec_compass_raw2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_raw2_r_mx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw2_r_my2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw2_r_mz2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw2_r_m_cnt2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Raw2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Raw2: Payload size different than expected") end +end + +-- Flight log - Compass Filter0 - 0x4f7e + +f.compass_filter0_f_mx0 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter0_f_mx0", "F Mx0", base.DEC) +f.compass_filter0_f_my0 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter0_f_my0", "F My0", base.DEC) +f.compass_filter0_f_mz0 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter0_f_mz0", "F Mz0", base.DEC) + +local function flightrec_compass_filter0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_filter0_f_mx0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter0_f_my0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter0_f_mz0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Filter0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Filter0: Payload size different than expected") end +end + +-- Flight log - Compass Filter1 - 0x4f7f + +f.compass_filter1_f_mx1 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter1_f_mx1", "F Mx1", base.DEC) +f.compass_filter1_f_my1 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter1_f_my1", "F My1", base.DEC) +f.compass_filter1_f_mz1 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter1_f_mz1", "F Mz1", base.DEC) + +local function flightrec_compass_filter1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_filter1_f_mx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter1_f_my1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter1_f_mz1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Filter1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Filter1: Payload size different than expected") end +end + +-- Flight log - Compass Filter2 - 0x4f80 + +f.compass_filter2_f_mx2 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter2_f_mx2", "F Mx2", base.DEC) +f.compass_filter2_f_my2 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter2_f_my2", "F My2", base.DEC) +f.compass_filter2_f_mz2 = ProtoField.int16 ("dji_mavic_flyrec.compass_filter2_f_mz2", "F Mz2", base.DEC) + +local function flightrec_compass_filter2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_filter2_f_mx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter2_f_my2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter2_f_mz2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Filter2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Filter2: Payload size different than expected") end +end + +-- Flight log - Imu Rotated Data - 0x4f88 + +f.imu_rotated_data_rotated_x = ProtoField.float ("dji_mavic_flyrec.imu_rotated_data_rotated_x", "Rotated X", base.DEC) +f.imu_rotated_data_rotated_y = ProtoField.float ("dji_mavic_flyrec.imu_rotated_data_rotated_y", "Rotated Y", base.DEC) +f.imu_rotated_data_rotated_z = ProtoField.float ("dji_mavic_flyrec.imu_rotated_data_rotated_z", "Rotated Z", base.DEC) + +local function flightrec_imu_rotated_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_rotated_data_rotated_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_rotated_data_rotated_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_rotated_data_rotated_z, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Rotated Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Rotated Data: Payload size different than expected") end +end + +-- Flight log - Raw Wristband Data - 0x5014 + +f.raw_wristband_data_longti = ProtoField.int32 ("dji_mavic_flyrec.raw_wristband_data_longti", "Longti", base.DEC) +f.raw_wristband_data_lati = ProtoField.int32 ("dji_mavic_flyrec.raw_wristband_data_lati", "Lati", base.DEC) +f.raw_wristband_data_height = ProtoField.float ("dji_mavic_flyrec.raw_wristband_data_height", "Height", base.DEC) +f.raw_wristband_data_vel_n = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_vel_n", "Vel N", base.DEC) +f.raw_wristband_data_vel_e = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_vel_e", "Vel E", base.DEC) +f.raw_wristband_data_vel_d = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_vel_d", "Vel D", base.DEC) +f.raw_wristband_data_acc_n = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_acc_n", "Acc N", base.DEC) +f.raw_wristband_data_acc_e = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_acc_e", "Acc E", base.DEC) +f.raw_wristband_data_acc_d = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_acc_d", "Acc D", base.DEC) +f.raw_wristband_data_tilt_x = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_tilt_x", "Tilt X", base.DEC) +f.raw_wristband_data_tilt_y = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_tilt_y", "Tilt Y", base.DEC) +f.raw_wristband_data_torsion = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_torsion", "Torsion", base.DEC) +f.raw_wristband_data_gyro_x = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_gyro_x", "Gyro X", base.DEC) +f.raw_wristband_data_gyro_y = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_gyro_y", "Gyro Y", base.DEC) +f.raw_wristband_data_gyro_z = ProtoField.int16 ("dji_mavic_flyrec.raw_wristband_data_gyro_z", "Gyro Z", base.DEC) +f.raw_wristband_data_flag = ProtoField.uint8 ("dji_mavic_flyrec.raw_wristband_data_flag", "Flag", base.HEX) +f.raw_wristband_data_channel = ProtoField.uint16 ("dji_mavic_flyrec.raw_wristband_data_channel", "Channel", base.HEX) +f.raw_wristband_data_cmd = ProtoField.uint8 ("dji_mavic_flyrec.raw_wristband_data_cmd", "Cmd", base.HEX) +f.raw_wristband_data_cnt = ProtoField.uint8 ("dji_mavic_flyrec.raw_wristband_data_cnt", "Cnt", base.HEX) + +local function flightrec_raw_wristband_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.raw_wristband_data_longti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.raw_wristband_data_lati, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.raw_wristband_data_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.raw_wristband_data_vel_n, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_vel_e, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_vel_d, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_acc_n, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_acc_e, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_acc_d, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_tilt_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_tilt_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_torsion, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_gyro_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_gyro_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_gyro_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.raw_wristband_data_channel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.raw_wristband_data_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 41) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Raw Wristband Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Raw Wristband Data: Payload size different than expected") end +end + +-- Flight log - Wristband - 0x5015 + +f.wristband_ctrl_pitch = ProtoField.float ("dji_mavic_flyrec.wristband_ctrl_pitch", "Ctrl Pitch", base.DEC) +f.wristband_ctrl_roll = ProtoField.float ("dji_mavic_flyrec.wristband_ctrl_roll", "Ctrl Roll", base.DEC) +f.wristband_ctrl_yaw = ProtoField.float ("dji_mavic_flyrec.wristband_ctrl_yaw", "Ctrl Yaw", base.DEC) +f.wristband_ctrl_thr_wb = ProtoField.float ("dji_mavic_flyrec.wristband_ctrl_thr_wb", "Ctrl Thr Wb", base.DEC) +f.wristband_cmd = ProtoField.uint8 ("dji_mavic_flyrec.wristband_cmd", "Cmd", base.HEX) +f.wristband_disconnect_flag = ProtoField.uint8 ("dji_mavic_flyrec.wristband_disconnect_flag", "Disconnect Flag", base.HEX) +f.wristband_is_hp_set = ProtoField.uint8 ("dji_mavic_flyrec.wristband_is_hp_set", "Is Hp Set", base.HEX) + +local function flightrec_wristband_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.wristband_ctrl_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wristband_ctrl_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wristband_ctrl_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wristband_ctrl_thr_wb, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wristband_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.wristband_disconnect_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.wristband_is_hp_set, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 19) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Wristband: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Wristband: Payload size different than expected") end +end + +-- Flight log - Ctrl Device - 0x501e + +f.ctrl_device_raw_pitch = ProtoField.float ("dji_mavic_flyrec.ctrl_device_raw_pitch", "Raw Pitch", base.DEC) +f.ctrl_device_raw_roll = ProtoField.float ("dji_mavic_flyrec.ctrl_device_raw_roll", "Raw Roll", base.DEC) +f.ctrl_device_raw_yaw = ProtoField.float ("dji_mavic_flyrec.ctrl_device_raw_yaw", "Raw Yaw", base.DEC) +f.ctrl_device_raw_throttle = ProtoField.float ("dji_mavic_flyrec.ctrl_device_raw_throttle", "Raw Throttle", base.DEC) +f.ctrl_device_ctrl_pitch = ProtoField.float ("dji_mavic_flyrec.ctrl_device_ctrl_pitch", "Ctrl Pitch", base.DEC) +f.ctrl_device_ctrl_roll = ProtoField.float ("dji_mavic_flyrec.ctrl_device_ctrl_roll", "Ctrl Roll", base.DEC) +f.ctrl_device_ctrl_yaw = ProtoField.float ("dji_mavic_flyrec.ctrl_device_ctrl_yaw", "Ctrl Yaw", base.DEC) +f.ctrl_device_ctrl_throttle = ProtoField.float ("dji_mavic_flyrec.ctrl_device_ctrl_throttle", "Ctrl Throttle", base.DEC) +f.ctrl_device_cmd = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_device_cmd", "Cmd", base.HEX) +f.ctrl_device_flight_mode = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_device_flight_mode", "Flight Mode", base.HEX) +f.ctrl_device_connected_flag = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_device_connected_flag", "Connected Flag", base.HEX) +f.ctrl_device_is_lost_gh = ProtoField.uint8 ("dji_mavic_flyrec.ctrl_device_is_lost_gh", "Is Lost Gh", base.HEX) + +local function flightrec_ctrl_device_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_device_raw_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_raw_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_raw_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_raw_throttle, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_ctrl_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_ctrl_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_ctrl_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_ctrl_throttle, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_device_flight_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_device_connected_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_device_is_lost_gh, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 36) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Device: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Device: Payload size different than expected") end +end + +-- Flight log - Battery Info 2 - 0x4e20 + +f.battery_info_2_batsop = ProtoField.float ("dji_mavic_flyrec.battery_info_2_batsop", "Batsop", base.DEC) +f.battery_info_2_ad_f = ProtoField.uint16 ("dji_mavic_flyrec.battery_info_2_ad_f", "Ad F", base.HEX) +f.battery_info_2_ad_v = ProtoField.uint16 ("dji_mavic_flyrec.battery_info_2_ad_v", "Ad V", base.HEX) +f.battery_info_2_sop_en = ProtoField.uint8 ("dji_mavic_flyrec.battery_info_2_sop_en", "Sop En", base.HEX) +f.battery_info_2_ilowlimit = ProtoField.int32 ("dji_mavic_flyrec.battery_info_2_ilowlimit", "Ilowlimit", base.DEC) +f.battery_info_2_power = ProtoField.float ("dji_mavic_flyrec.battery_info_2_power", "Power", base.DEC) +f.battery_info_2_current = ProtoField.float ("dji_mavic_flyrec.battery_info_2_current", "Current", base.DEC) +f.battery_info_2_esc_i = ProtoField.float ("dji_mavic_flyrec.battery_info_2_esc_i", "Esc I", base.DEC) +f.battery_info_2_power_err = ProtoField.float ("dji_mavic_flyrec.battery_info_2_power_err", "Power Err", base.DEC) +f.battery_info_2_sop_p = ProtoField.float ("dji_mavic_flyrec.battery_info_2_sop_p", "Sop P", base.DEC) +f.battery_info_2_sop_i = ProtoField.float ("dji_mavic_flyrec.battery_info_2_sop_i", "Sop I", base.DEC) +f.battery_info_2_rawpe = ProtoField.float ("dji_mavic_flyrec.battery_info_2_rawpe", "Rawpe", base.DEC) + +local function flightrec_battery_info_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_info_2_batsop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_ad_f, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_2_ad_v, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_2_sop_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_2_ilowlimit, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_power, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_esc_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_power_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_sop_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_sop_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_rawpe, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 41) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Info 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Info 2: Payload size different than expected") end +end + +-- Flight log - Pwm Output - 0x4e21 + +f.pwm_output_m1 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_m1", "M1", base.HEX) +f.pwm_output_m2 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_m2", "M2", base.HEX) +f.pwm_output_m3 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_m3", "M3", base.HEX) +f.pwm_output_m4 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_m4", "M4", base.HEX) +f.pwm_output_m5 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_m5", "M5", base.HEX) +f.pwm_output_m6 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_m6", "M6", base.HEX) +f.pwm_output_m7 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_m7", "M7", base.HEX) +f.pwm_output_m8 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_m8", "M8", base.HEX) +f.pwm_output_f1 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_f1", "F1", base.HEX) +f.pwm_output_f2 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_f2", "F2", base.HEX) +f.pwm_output_f3 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_f3", "F3", base.HEX) +f.pwm_output_f4 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_f4", "F4", base.HEX) +f.pwm_output_f5 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_f5", "F5", base.HEX) +f.pwm_output_f6 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_f6", "F6", base.HEX) +f.pwm_output_f7 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_f7", "F7", base.HEX) +f.pwm_output_f8 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_f8", "F8", base.HEX) +f.pwm_output_temp_ctrl0 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_temp_ctrl0", "Temp Ctrl0", base.HEX) +f.pwm_output_temp_ctrl1 = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_temp_ctrl1", "Temp Ctrl1", base.HEX) +f.pwm_output_temp_ctrl = ProtoField.uint32 ("dji_mavic_flyrec.pwm_output_temp_ctrl", "Temp Ctrl", base.HEX) + +local function flightrec_pwm_output_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.pwm_output_m1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m7, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m8, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f7, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f8, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_temp_ctrl0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_temp_ctrl1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_temp_ctrl, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 76) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Pwm Output: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Pwm Output: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Recorde0 - 0x0880 + +f.temp_ctl_recorde0_struck_t_0 = ProtoField.uint16 ("dji_mavic_flyrec.temp_ctl_recorde0_struck_t_0", "Struck T 0", base.HEX) +f.temp_ctl_recorde0_err_cnt_0 = ProtoField.uint16 ("dji_mavic_flyrec.temp_ctl_recorde0_err_cnt_0", "Err Cnt 0", base.HEX) +f.temp_ctl_recorde0_cmd_tgt_0 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde0_cmd_tgt_0", "Cmd Tgt 0", base.DEC) +f.temp_ctl_recorde0_pwm_per_0 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde0_pwm_per_0", "Pwm Per 0", base.DEC) +f.temp_ctl_recorde0_cmd_0 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde0_cmd_0", "Cmd 0", base.DEC) +f.temp_ctl_recorde0_err_0 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde0_err_0", "Err 0", base.DEC) +f.temp_ctl_recorde0_fdbk_0 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde0_fdbk_0", "Fdbk 0", base.DEC) +f.temp_ctl_recorde0_p_0 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde0_p_0", "P 0", base.DEC) +f.temp_ctl_recorde0_i_0 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde0_i_0", "I 0", base.DEC) +f.temp_ctl_recorde0_out_0 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde0_out_0", "Out 0", base.DEC) +f.temp_ctl_recorde0_err_lev_0 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde0_err_lev_0", "Err Lev 0", base.HEX) +f.temp_ctl_recorde0_state_0 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde0_state_0", "State 0", base.HEX) +f.temp_ctl_recorde0_status_0 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde0_status_0", "Status 0", base.HEX) +f.temp_ctl_recorde0_reset_0 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde0_reset_0", "Reset 0", base.HEX) + +local function flightrec_temp_ctl_recorde0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_recorde0_struck_t_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_err_cnt_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_cmd_tgt_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_pwm_per_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde0_cmd_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde0_err_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_fdbk_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde0_p_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_i_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_out_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_err_lev_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde0_state_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde0_status_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde0_reset_0, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Recorde0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Recorde0: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Recorde1 - 0x0881 + +f.temp_ctl_recorde1_struck_t_1 = ProtoField.uint16 ("dji_mavic_flyrec.temp_ctl_recorde1_struck_t_1", "Struck T 1", base.HEX) +f.temp_ctl_recorde1_err_cnt_1 = ProtoField.uint16 ("dji_mavic_flyrec.temp_ctl_recorde1_err_cnt_1", "Err Cnt 1", base.HEX) +f.temp_ctl_recorde1_cmd_tgt_1 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde1_cmd_tgt_1", "Cmd Tgt 1", base.DEC) +f.temp_ctl_recorde1_pwm_per_1 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde1_pwm_per_1", "Pwm Per 1", base.DEC) +f.temp_ctl_recorde1_cmd_1 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde1_cmd_1", "Cmd 1", base.DEC) +f.temp_ctl_recorde1_err_1 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde1_err_1", "Err 1", base.DEC) +f.temp_ctl_recorde1_fdbk_1 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde1_fdbk_1", "Fdbk 1", base.DEC) +f.temp_ctl_recorde1_p_1 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde1_p_1", "P 1", base.DEC) +f.temp_ctl_recorde1_i_1 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde1_i_1", "I 1", base.DEC) +f.temp_ctl_recorde1_out_1 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde1_out_1", "Out 1", base.DEC) +f.temp_ctl_recorde1_err_lev_1 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde1_err_lev_1", "Err Lev 1", base.HEX) +f.temp_ctl_recorde1_state_1 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde1_state_1", "State 1", base.HEX) +f.temp_ctl_recorde1_status_1 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde1_status_1", "Status 1", base.HEX) +f.temp_ctl_recorde1_reset_1 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde1_reset_1", "Reset 1", base.HEX) + +local function flightrec_temp_ctl_recorde1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_recorde1_struck_t_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_err_cnt_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_cmd_tgt_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_pwm_per_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde1_cmd_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde1_err_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_fdbk_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde1_p_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_i_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_out_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_err_lev_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde1_state_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde1_status_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde1_reset_1, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Recorde1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Recorde1: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Recorde2 - 0x0882 + +f.temp_ctl_recorde2_struck_t_2 = ProtoField.uint16 ("dji_mavic_flyrec.temp_ctl_recorde2_struck_t_2", "Struck T 2", base.HEX) +f.temp_ctl_recorde2_err_cnt_2 = ProtoField.uint16 ("dji_mavic_flyrec.temp_ctl_recorde2_err_cnt_2", "Err Cnt 2", base.HEX) +f.temp_ctl_recorde2_cmd_tgt_2 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde2_cmd_tgt_2", "Cmd Tgt 2", base.DEC) +f.temp_ctl_recorde2_pwm_per_2 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde2_pwm_per_2", "Pwm Per 2", base.DEC) +f.temp_ctl_recorde2_cmd_2 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde2_cmd_2", "Cmd 2", base.DEC) +f.temp_ctl_recorde2_err_2 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde2_err_2", "Err 2", base.DEC) +f.temp_ctl_recorde2_fdbk_2 = ProtoField.float ("dji_mavic_flyrec.temp_ctl_recorde2_fdbk_2", "Fdbk 2", base.DEC) +f.temp_ctl_recorde2_p_2 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde2_p_2", "P 2", base.DEC) +f.temp_ctl_recorde2_i_2 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde2_i_2", "I 2", base.DEC) +f.temp_ctl_recorde2_out_2 = ProtoField.int16 ("dji_mavic_flyrec.temp_ctl_recorde2_out_2", "Out 2", base.DEC) +f.temp_ctl_recorde2_err_lev_2 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde2_err_lev_2", "Err Lev 2", base.HEX) +f.temp_ctl_recorde2_state_2 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde2_state_2", "State 2", base.HEX) +f.temp_ctl_recorde2_status_2 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde2_status_2", "Status 2", base.HEX) +f.temp_ctl_recorde2_reset_2 = ProtoField.uint8 ("dji_mavic_flyrec.temp_ctl_recorde2_reset_2", "Reset 2", base.HEX) + +local function flightrec_temp_ctl_recorde2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_recorde2_struck_t_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_err_cnt_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_cmd_tgt_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_pwm_per_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde2_cmd_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde2_err_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_fdbk_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde2_p_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_i_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_out_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_err_lev_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde2_state_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde2_status_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde2_reset_2, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Recorde2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Recorde2: Payload size different than expected") end +end + +-- Flight log - Airport Limit Debug Info - 0x4e22 + +f.airport_limit_debug_info_flg = ProtoField.uint8 ("dji_mavic_flyrec.airport_limit_debug_info_flg", "Flg", base.HEX) +f.airport_limit_debug_info_uid = ProtoField.uint32 ("dji_mavic_flyrec.airport_limit_debug_info_uid", "Uid", base.HEX) +f.airport_limit_debug_info_v_n = ProtoField.int8 ("dji_mavic_flyrec.airport_limit_debug_info_v_n", "V N", base.DEC) +f.airport_limit_debug_info_v_e = ProtoField.int8 ("dji_mavic_flyrec.airport_limit_debug_info_v_e", "V E", base.DEC) +f.airport_limit_debug_info_v_d = ProtoField.int8 ("dji_mavic_flyrec.airport_limit_debug_info_v_d", "V D", base.DEC) +f.airport_limit_debug_info_norm = ProtoField.uint8 ("dji_mavic_flyrec.airport_limit_debug_info_norm", "Norm", base.HEX) + +local function flightrec_airport_limit_debug_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.airport_limit_debug_info_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_debug_info_uid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_debug_info_v_n, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_debug_info_v_e, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_debug_info_v_d, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_debug_info_norm, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 9) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Airport Limit Debug Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Airport Limit Debug Info: Payload size different than expected") end +end + +-- Flight log - Battery Raw Data 1 - 0x4e23 + +f.battery_raw_data_1_0 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_1_0", "0", base.HEX) +f.battery_raw_data_1_1 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_1_1", "1", base.HEX) +f.battery_raw_data_1_2 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_1_2", "2", base.HEX) +f.battery_raw_data_1_3 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_1_3", "3", base.HEX) +f.battery_raw_data_1_4 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_1_4", "4", base.HEX) +f.battery_raw_data_1_5 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_1_5", "5", base.HEX) +f.battery_raw_data_1_lowest = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_1_lowest", "Lowest", base.HEX) + +local function flightrec_battery_raw_data_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_raw_data_1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_lowest, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 14) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Raw Data 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Raw Data 1: Payload size different than expected") end +end + +-- Flight log - Battery Raw Data 2 - 0x4e24 + +f.battery_raw_data_2_0 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_2_0", "0", base.HEX) +f.battery_raw_data_2_1 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_2_1", "1", base.HEX) +f.battery_raw_data_2_2 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_2_2", "2", base.HEX) +f.battery_raw_data_2_3 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_2_3", "3", base.HEX) +f.battery_raw_data_2_4 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_2_4", "4", base.HEX) +f.battery_raw_data_2_5 = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_2_5", "5", base.HEX) +f.battery_raw_data_2_lowest = ProtoField.uint16 ("dji_mavic_flyrec.battery_raw_data_2_lowest", "Lowest", base.HEX) + +local function flightrec_battery_raw_data_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_raw_data_2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_lowest, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 14) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Raw Data 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Raw Data 2: Payload size different than expected") end +end + +-- Flight log - Sys Err - 0x4e25 + +f.sys_err_code_err = ProtoField.uint8 ("dji_mavic_flyrec.sys_err_code_err", "Code Err", base.HEX) +f.sys_err_sn_err1 = ProtoField.uint8 ("dji_mavic_flyrec.sys_err_sn_err1", "Sn Err1", base.HEX) +f.sys_err_sn_err2 = ProtoField.uint8 ("dji_mavic_flyrec.sys_err_sn_err2", "Sn Err2", base.HEX) +f.sys_err_sd_fail = ProtoField.uint8 ("dji_mavic_flyrec.sys_err_sd_fail", "Sd Fail", base.HEX) +f.sys_err_ifv = ProtoField.uint8 ("dji_mavic_flyrec.sys_err_ifv", "Ifv", base.HEX) + +local function flightrec_sys_err_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.sys_err_code_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sys_err_sn_err1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sys_err_sn_err2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sys_err_sd_fail, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sys_err_ifv, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Sys Err: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Sys Err: Payload size different than expected") end +end + +-- Flight log - Quick Circle Debug - 0x4e27 + +f.quick_circle_debug_qc_trg_a = ProtoField.uint8 ("dji_mavic_flyrec.quick_circle_debug_qc_trg_a", "Qc Trg A", base.HEX) +f.quick_circle_debug_qc_trg_m = ProtoField.uint8 ("dji_mavic_flyrec.quick_circle_debug_qc_trg_m", "Qc Trg M", base.HEX) +f.quick_circle_debug_qc_trg_f = ProtoField.uint8 ("dji_mavic_flyrec.quick_circle_debug_qc_trg_f", "Qc Trg F", base.HEX) +f.quick_circle_debug_qc_pre_trs = ProtoField.float ("dji_mavic_flyrec.quick_circle_debug_qc_pre_trs", "Qc Pre Trs", base.DEC) +f.quick_circle_debug_qc_cur_trs = ProtoField.float ("dji_mavic_flyrec.quick_circle_debug_qc_cur_trs", "Qc Cur Trs", base.DEC) +f.quick_circle_debug_qc_tgt_trs = ProtoField.float ("dji_mavic_flyrec.quick_circle_debug_qc_tgt_trs", "Qc Tgt Trs", base.DEC) +f.quick_circle_debug_qc_t = ProtoField.float ("dji_mavic_flyrec.quick_circle_debug_qc_t", "Qc T", base.DEC) +f.quick_circle_debug_gmb_mode = ProtoField.uint8 ("dji_mavic_flyrec.quick_circle_debug_gmb_mode", "Gmb Mode", base.HEX) +f.quick_circle_debug_gmb_refyaw = ProtoField.float ("dji_mavic_flyrec.quick_circle_debug_gmb_refyaw", "Gmb Refyaw", base.DEC) + +local function flightrec_quick_circle_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.quick_circle_debug_qc_trg_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.quick_circle_debug_qc_trg_m, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.quick_circle_debug_qc_trg_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.quick_circle_debug_qc_pre_trs, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.quick_circle_debug_qc_cur_trs, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.quick_circle_debug_qc_tgt_trs, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.quick_circle_debug_qc_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.quick_circle_debug_gmb_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.quick_circle_debug_gmb_refyaw, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Quick Circle Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Quick Circle Debug: Payload size different than expected") end +end + +-- Flight log - Battery Info 3 - 0x4e28 + +f.battery_info_3_avg_i = ProtoField.float ("dji_mavic_flyrec.battery_info_3_avg_i", "Avg I", base.DEC) +f.battery_info_3_fake_sbat = ProtoField.uint8 ("dji_mavic_flyrec.battery_info_3_fake_sbat", "Fake Sbat", base.HEX) +f.battery_info_3_esc_power = ProtoField.float ("dji_mavic_flyrec.battery_info_3_esc_power", "Esc Power", base.DEC) +f.battery_info_3_power_err = ProtoField.float ("dji_mavic_flyrec.battery_info_3_power_err", "Power Err", base.DEC) +f.battery_info_3_is_true = ProtoField.uint8 ("dji_mavic_flyrec.battery_info_3_is_true", "Is True", base.HEX) +f.battery_info_3_m_s_d = ProtoField.uint8 ("dji_mavic_flyrec.battery_info_3_m_s_d", "M S D", base.HEX) +f.battery_info_3_p_r_max = ProtoField.float ("dji_mavic_flyrec.battery_info_3_p_r_max", "P R Max", base.DEC) +f.battery_info_3_p_ave = ProtoField.float ("dji_mavic_flyrec.battery_info_3_p_ave", "P Ave", base.DEC) +f.battery_info_3_p_r_min = ProtoField.float ("dji_mavic_flyrec.battery_info_3_p_r_min", "P R Min", base.DEC) + +local function flightrec_battery_info_3_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_info_3_avg_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_fake_sbat, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_3_esc_power, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_power_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_is_true, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_3_m_s_d, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_3_p_r_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_p_ave, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_p_r_min, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 27) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Info 3: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Info 3: Payload size different than expected") end +end + +-- Flight log - Rc Func Data - 0x4e29 + +f.rc_func_data_a = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_a", "A", base.DEC) +f.rc_func_data_e = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_e", "E", base.DEC) +f.rc_func_data_t = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_t", "T", base.DEC) +f.rc_func_data_r = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_r", "R", base.DEC) +f.rc_func_data_u = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_u", "U", base.DEC) +f.rc_func_data_u_f = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_u_f", "U F", base.DEC) +f.rc_func_data_gear = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_gear", "Gear", base.DEC) +f.rc_func_data_gh_sq = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_gh_sq", "Gh Sq", base.DEC) +f.rc_func_data_gh_sw = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_gh_sw", "Gh Sw", base.DEC) +f.rc_func_data_em_mode = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_em_mode", "Em Mode", base.DEC) +f.rc_func_data_em_stop = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_em_stop", "Em Stop", base.DEC) +f.rc_func_data_p_stop = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_p_stop", "P Stop", base.DEC) +f.rc_func_data_ioc = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_ioc", "Ioc", base.DEC) +f.rc_func_data_k1 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_k1", "K1", base.DEC) +f.rc_func_data_k2 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_k2", "K2", base.DEC) +f.rc_func_data_k3 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_k3", "K3", base.DEC) +f.rc_func_data_k4 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_k4", "K4", base.DEC) +f.rc_func_data_k5 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_k5", "K5", base.DEC) +f.rc_func_data_k6 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_k6", "K6", base.DEC) +f.rc_func_data_d1 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_d1", "D1", base.DEC) +f.rc_func_data_d2 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_d2", "D2", base.DEC) +f.rc_func_data_d3 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_d3", "D3", base.DEC) +f.rc_func_data_d4 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_d4", "D4", base.DEC) +f.rc_func_data_d5 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_d5", "D5", base.DEC) +f.rc_func_data_d6 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_d6", "D6", base.DEC) +f.rc_func_data_d7 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_d7", "D7", base.DEC) +f.rc_func_data_d8 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_d8", "D8", base.DEC) +f.rc_func_data_f_left = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_f_left", "F Left", base.DEC) +f.rc_func_data_f_right = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_f_right", "F Right", base.DEC) +f.rc_func_data_f_set_a = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_f_set_a", "F Set A", base.DEC) +f.rc_func_data_f_set_b = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_f_set_b", "F Set B", base.DEC) +f.rc_func_data_f_set_ab = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_f_set_ab", "F Set Ab", base.DEC) +f.rc_func_data_f_m_s = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_f_m_s", "F M S", base.DEC) +f.rc_func_data_f_f_s = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_f_f_s", "F F S", base.DEC) +f.rc_func_data_f_mode = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_f_mode", "F Mode", base.DEC) +f.rc_func_data_rc_c1 = ProtoField.int16 ("dji_mavic_flyrec.rc_func_data_rc_c1", "Rc C1", base.DEC) + +local function flightrec_rc_func_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_func_data_a, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_e, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_r, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_u, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_u_f, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_gear, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_gh_sq, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_gh_sw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_em_mode, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_em_stop, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_p_stop, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_ioc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_left, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_right, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_set_a, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_set_b, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_set_ab, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_m_s, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_f_s, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_mode, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_rc_c1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 72) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Func Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Func Data: Payload size different than expected") end +end + +-- Flight log - Rc Func State - 0x4e2a + +f.rc_func_state_a = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_a", "A", base.HEX) +f.rc_func_state_e = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_e", "E", base.HEX) +f.rc_func_state_t = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_t", "T", base.HEX) +f.rc_func_state_r = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_r", "R", base.HEX) +f.rc_func_state_u = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_u", "U", base.HEX) +f.rc_func_state_u_f = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_u_f", "U F", base.HEX) +f.rc_func_state_gear = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_gear", "Gear", base.HEX) +f.rc_func_state_gh_sq = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_gh_sq", "Gh Sq", base.HEX) +f.rc_func_state_gh_sw = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_gh_sw", "Gh Sw", base.HEX) +f.rc_func_state_em_mode = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_em_mode", "Em Mode", base.HEX) +f.rc_func_state_em_stop = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_em_stop", "Em Stop", base.HEX) +f.rc_func_state_p_stop = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_p_stop", "P Stop", base.HEX) +f.rc_func_state__ioc = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state__ioc", " Ioc", base.HEX) +f.rc_func_state_k1 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_k1", "K1", base.HEX) +f.rc_func_state_k2 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_k2", "K2", base.HEX) +f.rc_func_state_k3 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_k3", "K3", base.HEX) +f.rc_func_state_k4 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_k4", "K4", base.HEX) +f.rc_func_state_k5 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_k5", "K5", base.HEX) +f.rc_func_state_k6 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_k6", "K6", base.HEX) +f.rc_func_state_d1 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_d1", "D1", base.HEX) +f.rc_func_state_d2 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_d2", "D2", base.HEX) +f.rc_func_state_d3 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_d3", "D3", base.HEX) +f.rc_func_state_d4 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_d4", "D4", base.HEX) +f.rc_func_state_d5 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_d5", "D5", base.HEX) +f.rc_func_state_d6 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_d6", "D6", base.HEX) +f.rc_func_state_d7 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_d7", "D7", base.HEX) +f.rc_func_state_d8 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_d8", "D8", base.HEX) +f.rc_func_state_f_left = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_f_left", "F Left", base.HEX) +f.rc_func_state_f_right = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_f_right", "F Right", base.HEX) +f.rc_func_state_f_set_a = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_f_set_a", "F Set A", base.HEX) +f.rc_func_state_f_set_b = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_f_set_b", "F Set B", base.HEX) +f.rc_func_state_f_set_ab = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_f_set_ab", "F Set Ab", base.HEX) +f.rc_func_state_f_m_s = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_f_m_s", "F M S", base.HEX) +f.rc_func_state_f_flow_speed = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_f_flow_speed", "F Flow Speed", base.HEX) +f.rc_func_state_f_mode = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_f_mode", "F Mode", base.HEX) +f.rc_func_state_s_rc_c1 = ProtoField.uint8 ("dji_mavic_flyrec.rc_func_state_s_rc_c1", "S Rc C1", base.HEX) + +local function flightrec_rc_func_state_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_func_state_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_e, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_r, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_u, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_u_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_gear, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_gh_sq, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_gh_sw, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_em_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_em_stop, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_p_stop, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state__ioc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_left, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_right, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_set_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_set_b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_set_ab, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_m_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_flow_speed, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_s_rc_c1, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 36) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Func State: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Func State: Payload size different than expected") end +end + +-- Flight log - Gps Monitor 1 - 0x4e2b + +f.gps_monitor_1_le = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_1_le", "Le", base.HEX) +f.gps_monitor_1_dysed = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_1_dysed", "Dysed", base.HEX) +f.gps_monitor_1_sfe = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_1_sfe", "Sfe", base.HEX) +f.gps_monitor_1_dft = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_1_dft", "Dft", base.HEX) +f.gps_monitor_1_smc = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_1_smc", "Smc", base.HEX) + +local function flightrec_gps_monitor_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gps_monitor_1_le, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_1_dysed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_1_sfe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_1_dft, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_1_smc, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Monitor 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Monitor 1: Payload size different than expected") end +end + +-- Flight log - Gps Monitor 2 - 0x4e2c + +f.gps_monitor_2_le = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_2_le", "Le", base.HEX) +f.gps_monitor_2_dysed = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_2_dysed", "Dysed", base.HEX) +f.gps_monitor_2_sfe = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_2_sfe", "Sfe", base.HEX) +f.gps_monitor_2_dft = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_2_dft", "Dft", base.HEX) +f.gps_monitor_2_smc = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_2_smc", "Smc", base.HEX) + +local function flightrec_gps_monitor_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gps_monitor_2_le, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_2_dysed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_2_sfe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_2_dft, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_2_smc, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Monitor 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Monitor 2: Payload size different than expected") end +end + +-- Flight log - Gps Monitor 3 - 0x4e2d + +f.gps_monitor_3_le = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_3_le", "Le", base.HEX) +f.gps_monitor_3_dysed = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_3_dysed", "Dysed", base.HEX) +f.gps_monitor_3_sfe = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_3_sfe", "Sfe", base.HEX) +f.gps_monitor_3_dft = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_3_dft", "Dft", base.HEX) +f.gps_monitor_3_smc = ProtoField.uint32 ("dji_mavic_flyrec.gps_monitor_3_smc", "Smc", base.HEX) + +local function flightrec_gps_monitor_3_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gps_monitor_3_le, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_3_dysed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_3_sfe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_3_dft, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_3_smc, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Monitor 3: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Monitor 3: Payload size different than expected") end +end + +-- Flight log - Adaptive Roll - 0x0883 + +f.adaptive_roll_omega = ProtoField.float ("dji_mavic_flyrec.adaptive_roll_omega", "Omega", base.DEC) +f.adaptive_roll_sigma = ProtoField.float ("dji_mavic_flyrec.adaptive_roll_sigma", "Sigma", base.DEC) +f.adaptive_roll_theta0 = ProtoField.float ("dji_mavic_flyrec.adaptive_roll_theta0", "Theta0", base.DEC) +f.adaptive_roll_theta1 = ProtoField.float ("dji_mavic_flyrec.adaptive_roll_theta1", "Theta1", base.DEC) +f.adaptive_roll_xref0 = ProtoField.float ("dji_mavic_flyrec.adaptive_roll_xref0", "Xref0", base.DEC) +f.adaptive_roll_xref1 = ProtoField.float ("dji_mavic_flyrec.adaptive_roll_xref1", "Xref1", base.DEC) +f.adaptive_roll_u = ProtoField.float ("dji_mavic_flyrec.adaptive_roll_u", "U", base.DEC) + +local function flightrec_adaptive_roll_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adaptive_roll_omega, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_roll_sigma, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_roll_theta0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_roll_theta1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_roll_xref0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_roll_xref1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_roll_u, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adaptive Roll: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adaptive Roll: Payload size different than expected") end +end + +-- Flight log - Adaptive Pitch - 0x0884 + +f.adaptive_pitch_omega = ProtoField.float ("dji_mavic_flyrec.adaptive_pitch_omega", "Omega", base.DEC) +f.adaptive_pitch_sigma = ProtoField.float ("dji_mavic_flyrec.adaptive_pitch_sigma", "Sigma", base.DEC) +f.adaptive_pitch_theta0 = ProtoField.float ("dji_mavic_flyrec.adaptive_pitch_theta0", "Theta0", base.DEC) +f.adaptive_pitch_theta1 = ProtoField.float ("dji_mavic_flyrec.adaptive_pitch_theta1", "Theta1", base.DEC) +f.adaptive_pitch_xref0 = ProtoField.float ("dji_mavic_flyrec.adaptive_pitch_xref0", "Xref0", base.DEC) +f.adaptive_pitch_xref1 = ProtoField.float ("dji_mavic_flyrec.adaptive_pitch_xref1", "Xref1", base.DEC) +f.adaptive_pitch_u = ProtoField.float ("dji_mavic_flyrec.adaptive_pitch_u", "U", base.DEC) + +local function flightrec_adaptive_pitch_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adaptive_pitch_omega, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_pitch_sigma, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_pitch_theta0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_pitch_theta1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_pitch_xref0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_pitch_xref1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adaptive_pitch_u, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adaptive Pitch: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adaptive Pitch: Payload size different than expected") end +end + +-- Flight log - Fw G Api - 0x0885 + +f.fw_g_api_tgt_w0 = ProtoField.float ("dji_mavic_flyrec.fw_g_api_tgt_w0", "Tgt W0", base.DEC) +f.fw_g_api_tgt_w1 = ProtoField.float ("dji_mavic_flyrec.fw_g_api_tgt_w1", "Tgt W1", base.DEC) +f.fw_g_api_tgt_w2 = ProtoField.float ("dji_mavic_flyrec.fw_g_api_tgt_w2", "Tgt W2", base.DEC) +f.fw_g_api_yaw_type = ProtoField.uint8 ("dji_mavic_flyrec.fw_g_api_yaw_type", "Yaw Type", base.HEX) +f.fw_g_api_ctrl_mode = ProtoField.uint8 ("dji_mavic_flyrec.fw_g_api_ctrl_mode", "Ctrl Mode", base.HEX) +f.fw_g_api_atti_mode = ProtoField.uint8 ("dji_mavic_flyrec.fw_g_api_atti_mode", "Atti Mode", base.HEX) +f.fw_g_api_cmd_roll = ProtoField.float ("dji_mavic_flyrec.fw_g_api_cmd_roll", "Cmd Roll", base.DEC) +f.fw_g_api_cmd_pitch = ProtoField.float ("dji_mavic_flyrec.fw_g_api_cmd_pitch", "Cmd Pitch", base.DEC) +f.fw_g_api_cmd_yaw = ProtoField.float ("dji_mavic_flyrec.fw_g_api_cmd_yaw", "Cmd Yaw", base.DEC) + +local function flightrec_fw_g_api_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fw_g_api_tgt_w0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_tgt_w1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_tgt_w2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_yaw_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.fw_g_api_ctrl_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.fw_g_api_atti_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.fw_g_api_cmd_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_cmd_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_cmd_yaw, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 27) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fw G Api: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fw G Api: Payload size different than expected") end +end + +-- Flight log - Fw Param Ekf - 0x0887 + +f.fw_param_ekf_energyest = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_energyest", "Energyest", base.DEC) +f.fw_param_ekf_cd0est = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_cd0est", "Cd0Est", base.DEC) +f.fw_param_ekf_clest = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_clest", "Clest", base.DEC) +f.fw_param_ekf_aest = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_aest", "Aest", base.DEC) +f.fw_param_ekf_best = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_best", "Best", base.DEC) +f.fw_param_ekf_nest = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_nest", "Nest", base.DEC) +f.fw_param_ekf_yacc0 = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_yacc0", "Yacc0", base.DEC) +f.fw_param_ekf_yacc1 = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_yacc1", "Yacc1", base.DEC) +f.fw_param_ekf_yacc2 = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_yacc2", "Yacc2", base.DEC) +f.fw_param_ekf_yenergy = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_yenergy", "Yenergy", base.DEC) +f.fw_param_ekf_yu = ProtoField.float ("dji_mavic_flyrec.fw_param_ekf_yu", "Yu", base.DEC) + +local function flightrec_fw_param_ekf_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fw_param_ekf_energyest, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_cd0est, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_clest, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_aest, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_best, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_nest, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yacc0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yacc1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yacc2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yenergy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yu, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 44) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fw Param Ekf: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fw Param Ekf: Payload size different than expected") end +end + +-- Flight log - Ex Raw Airspeed - 0x27e2 + +f.ex_raw_airspeed_diff_press = ProtoField.float ("dji_mavic_flyrec.ex_raw_airspeed_diff_press", "Diff Press", base.DEC) +f.ex_raw_airspeed_temp = ProtoField.float ("dji_mavic_flyrec.ex_raw_airspeed_temp", "Temp", base.DEC) +f.ex_raw_airspeed_cnt = ProtoField.uint32 ("dji_mavic_flyrec.ex_raw_airspeed_cnt", "Cnt", base.HEX) + +local function flightrec_ex_raw_airspeed_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ex_raw_airspeed_diff_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ex_raw_airspeed_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ex_raw_airspeed_cnt, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ex Raw Airspeed: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ex Raw Airspeed: Payload size different than expected") end +end + +-- Flight log - Vibrate Detect Gyro - 0x5000 + +f.vibrate_detect_gyro_x_amp = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_x_amp", "X Amp", base.DEC) +f.vibrate_detect_gyro_y_amp = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_y_amp", "Y Amp", base.DEC) +f.vibrate_detect_gyro_freq = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_freq", "Freq", base.DEC) +f.vibrate_detect_gyro_len = ProtoField.uint16 ("dji_mavic_flyrec.vibrate_detect_gyro_len", "Len", base.HEX) +f.vibrate_detect_gyro_fs = ProtoField.uint16 ("dji_mavic_flyrec.vibrate_detect_gyro_fs", "Fs", base.HEX) +f.vibrate_detect_gyro_enable = ProtoField.uint8 ("dji_mavic_flyrec.vibrate_detect_gyro_enable", "Enable", base.HEX) +f.vibrate_detect_gyro_flag = ProtoField.uint8 ("dji_mavic_flyrec.vibrate_detect_gyro_flag", "Flag", base.HEX) +f.vibrate_detect_gyro_x0 = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_x0", "X0", base.DEC) +f.vibrate_detect_gyro_x1 = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_x1", "X1", base.DEC) +f.vibrate_detect_gyro_x2 = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_x2", "X2", base.DEC) +f.vibrate_detect_gyro_y0 = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_y0", "Y0", base.DEC) +f.vibrate_detect_gyro_y1 = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_y1", "Y1", base.DEC) +f.vibrate_detect_gyro_y2 = ProtoField.float ("dji_mavic_flyrec.vibrate_detect_gyro_y2", "Y2", base.DEC) + +local function flightrec_vibrate_detect_gyro_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.vibrate_detect_gyro_x_amp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_y_amp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_freq, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_len, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vibrate_detect_gyro_fs, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vibrate_detect_gyro_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vibrate_detect_gyro_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vibrate_detect_gyro_x0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_x1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_x2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_y0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_y1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_y2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 42) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Vibrate Detect Gyro: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Vibrate Detect Gyro: Payload size different than expected") end +end + +-- Flight log - Airprot Limit Data - 0x500a + +f.airprot_limit_data_ap_disable = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_ap_disable", "Ap Disable", base.HEX) +f.airprot_limit_data_pos_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_pos_en", "Pos En", base.HEX) +f.airprot_limit_data_wl_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_wl_en", "Wl En", base.HEX) +f.airprot_limit_data_wl_s = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_wl_s", "Wl S", base.HEX) +f.airprot_limit_data_g_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_g_en", "G En", base.HEX) +f.airprot_limit_data_g_s = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_g_s", "G S", base.HEX) +f.airprot_limit_data_t_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_t_en", "T En", base.HEX) +f.airprot_limit_data_t_s = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_t_s", "T S", base.HEX) +f.airprot_limit_data_f_s = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_f_s", "F S", base.HEX) +f.airprot_limit_data_1f_dir = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_1f_dir", "1F Dir", base.DEC) +f.airprot_limit_data_1f_dir = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_1f_dir", "1F Dir", base.DEC) +f.airprot_limit_data_1f_hi_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_1f_hi_en", "1F Hi En", base.HEX) +f.airprot_limit_data_1f_d2hi = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_1f_d2hi", "1F D2Hi", base.DEC) +f.airprot_limit_data_1f_r_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_1f_r_en", "1F R En", base.HEX) +f.airprot_limit_data_1f_d2r = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_1f_d2r", "1F D2R", base.DEC) +f.airprot_limit_data_2f_dir = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_2f_dir", "2F Dir", base.DEC) +f.airprot_limit_data_2f_dir = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_2f_dir", "2F Dir", base.DEC) +f.airprot_limit_data_2f_hi_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_2f_hi_en", "2F Hi En", base.HEX) +f.airprot_limit_data_2f_d2hi = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_2f_d2hi", "2F D2Hi", base.DEC) +f.airprot_limit_data_2f_r_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_2f_r_en", "2F R En", base.HEX) +f.airprot_limit_data_2f_d2r = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_2f_d2r", "2F D2R", base.DEC) +f.airprot_limit_data_3f_dir = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_3f_dir", "3F Dir", base.DEC) +f.airprot_limit_data_3f_dir = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_3f_dir", "3F Dir", base.DEC) +f.airprot_limit_data_3f_hi_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_3f_hi_en", "3F Hi En", base.HEX) +f.airprot_limit_data_3f_d2hi = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_3f_d2hi", "3F D2Hi", base.DEC) +f.airprot_limit_data_3f_r_en = ProtoField.uint8 ("dji_mavic_flyrec.airprot_limit_data_3f_r_en", "3F R En", base.HEX) +f.airprot_limit_data_3f_d2r = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_3f_d2r", "3F D2R", base.DEC) +f.airprot_limit_data_height_limit = ProtoField.float ("dji_mavic_flyrec.airprot_limit_data_height_limit", "Height Limit", base.DEC) + +local function flightrec_airprot_limit_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.airprot_limit_data_ap_disable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_pos_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_wl_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_wl_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_g_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_g_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_t_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_t_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_f_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_1f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_1f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_1f_hi_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_1f_d2hi, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_1f_r_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_1f_d2r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_2f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_2f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_2f_hi_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_2f_d2hi, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_2f_r_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_2f_d2r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_3f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_3f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_3f_hi_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_3f_d2hi, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_3f_r_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_3f_d2r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_height_limit, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 67) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Airprot Limit Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Airprot Limit Data: Payload size different than expected") end +end + +-- Flight log - Adv Fl Limit Data - 0x500b + +f.adv_fl_limit_data_rec_cnt = ProtoField.uint32 ("dji_mavic_flyrec.adv_fl_limit_data_rec_cnt", "Rec Cnt", base.HEX) +f.adv_fl_limit_data_num = ProtoField.uint8 ("dji_mavic_flyrec.adv_fl_limit_data_num", "Num", base.HEX) +f.adv_fl_limit_data_in_warn_zone = ProtoField.uint8 ("dji_mavic_flyrec.adv_fl_limit_data_in_warn_zone", "In Warn Zone", base.HEX) +f.adv_fl_limit_data_nearest_nfz_dis = ProtoField.uint16 ("dji_mavic_flyrec.adv_fl_limit_data_nearest_nfz_dis", "Nearest Nfz Dis", base.HEX) +f.adv_fl_limit_data_rsv = ProtoField.uint32 ("dji_mavic_flyrec.adv_fl_limit_data_rsv", "Rsv", base.HEX) +f.adv_fl_limit_data_0uuid = ProtoField.uint32 ("dji_mavic_flyrec.adv_fl_limit_data_0uuid", "0Uuid", base.HEX) +f.adv_fl_limit_data_0in_limt_area = ProtoField.uint8 ("dji_mavic_flyrec.adv_fl_limit_data_0in_limt_area", "0In Limt Area", base.HEX) +f.adv_fl_limit_data_0n = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_0n", "0N", base.DEC) +f.adv_fl_limit_data_0e = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_0e", "0E", base.DEC) +f.adv_fl_limit_data_0hight_limit = ProtoField.uint16 ("dji_mavic_flyrec.adv_fl_limit_data_0hight_limit", "0Hight Limit", base.HEX) +f.adv_fl_limit_data_1uuid = ProtoField.uint32 ("dji_mavic_flyrec.adv_fl_limit_data_1uuid", "1Uuid", base.HEX) +f.adv_fl_limit_data_1in_limt_area = ProtoField.uint8 ("dji_mavic_flyrec.adv_fl_limit_data_1in_limt_area", "1In Limt Area", base.HEX) +f.adv_fl_limit_data_1n = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_1n", "1N", base.DEC) +f.adv_fl_limit_data_1e = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_1e", "1E", base.DEC) +f.adv_fl_limit_data_1hight_limit = ProtoField.uint16 ("dji_mavic_flyrec.adv_fl_limit_data_1hight_limit", "1Hight Limit", base.HEX) +f.adv_fl_limit_data_2uuid = ProtoField.uint32 ("dji_mavic_flyrec.adv_fl_limit_data_2uuid", "2Uuid", base.HEX) +f.adv_fl_limit_data_2in_limt_area = ProtoField.uint8 ("dji_mavic_flyrec.adv_fl_limit_data_2in_limt_area", "2In Limt Area", base.HEX) +f.adv_fl_limit_data_2n = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_2n", "2N", base.DEC) +f.adv_fl_limit_data_2e = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_2e", "2E", base.DEC) +f.adv_fl_limit_data_2hight_limit = ProtoField.uint16 ("dji_mavic_flyrec.adv_fl_limit_data_2hight_limit", "2Hight Limit", base.HEX) +f.adv_fl_limit_data_3uuid = ProtoField.uint32 ("dji_mavic_flyrec.adv_fl_limit_data_3uuid", "3Uuid", base.HEX) +f.adv_fl_limit_data_3in_limt_area = ProtoField.uint8 ("dji_mavic_flyrec.adv_fl_limit_data_3in_limt_area", "3In Limt Area", base.HEX) +f.adv_fl_limit_data_3n = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_3n", "3N", base.DEC) +f.adv_fl_limit_data_3e = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_3e", "3E", base.DEC) +f.adv_fl_limit_data_3hight_limit = ProtoField.uint16 ("dji_mavic_flyrec.adv_fl_limit_data_3hight_limit", "3Hight Limit", base.HEX) +f.adv_fl_limit_data_4uuid = ProtoField.uint32 ("dji_mavic_flyrec.adv_fl_limit_data_4uuid", "4Uuid", base.HEX) +f.adv_fl_limit_data_4in_limt_area = ProtoField.uint8 ("dji_mavic_flyrec.adv_fl_limit_data_4in_limt_area", "4In Limt Area", base.HEX) +f.adv_fl_limit_data_4n = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_4n", "4N", base.DEC) +f.adv_fl_limit_data_4e = ProtoField.float ("dji_mavic_flyrec.adv_fl_limit_data_4e", "4E", base.DEC) +f.adv_fl_limit_data_4hight_limit = ProtoField.uint16 ("dji_mavic_flyrec.adv_fl_limit_data_4hight_limit", "4Hight Limit", base.HEX) + +local function flightrec_adv_fl_limit_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adv_fl_limit_data_rec_cnt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_in_warn_zone, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_nearest_nfz_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_rsv, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_0uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_0in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_0n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_0e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_0hight_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_1uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_1in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_1n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_1e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_1hight_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_2uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_2in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_2n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_2e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_2hight_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_3uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_3in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_3n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_3e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_3hight_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_4uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_4in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_4n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_4e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_4hight_limit, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 87) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adv Fl Limit Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adv Fl Limit Data: Payload size different than expected") end +end + +-- Flight log - Db Subscription - 0x0888 + +f.db_subscription_tick_b = ProtoField.uint32 ("dji_mavic_flyrec.db_subscription_tick_b", "Tick B", base.HEX) +f.db_subscription_sent_gps_lv = ProtoField.uint8 ("dji_mavic_flyrec.db_subscription_sent_gps_lv", "Sent Gps Lv", base.HEX) + +local function flightrec_db_subscription_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.db_subscription_tick_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.db_subscription_sent_gps_lv, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Db Subscription: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Db Subscription: Payload size different than expected") end +end + +-- Flight log - Lost Sats Go Home Send Package - 0x504b + +f.lost_sats_go_home_send_package_cmd_type = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_send_package_cmd_type", "Cmd Type", base.HEX) +f.lost_sats_go_home_send_package_act_type = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_send_package_act_type", "Act Type", base.HEX) +f.lost_sats_go_home_send_package_cnt_down = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_send_package_cnt_down", "Cnt Down", base.HEX) +f.lost_sats_go_home_send_package_cmd = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_send_package_cmd", "Cmd", base.HEX) +f.lost_sats_go_home_send_package_asap = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_send_package_asap", "Asap", base.HEX) +f.lost_sats_go_home_send_package_cancel = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_send_package_cancel", "Cancel", base.HEX) +f.lost_sats_go_home_send_package_lost_in_gh = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_send_package_lost_in_gh", "Lost In Gh", base.HEX) +f.lost_sats_go_home_send_package_has_req_gh = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_send_package_has_req_gh", "Has Req Gh", base.HEX) + +local function flightrec_lost_sats_go_home_send_package_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lost_sats_go_home_send_package_cmd_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_act_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_cnt_down, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_asap, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_cancel, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_lost_in_gh, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_has_req_gh, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lost Sats Go Home Send Package: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lost Sats Go Home Send Package: Payload size different than expected") end +end + +-- Flight log - Lost Sats Go Home Recv Package - 0x504c + +f.lost_sats_go_home_recv_package_cmd_type = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_recv_package_cmd_type", "Cmd Type", base.HEX) +f.lost_sats_go_home_recv_package_act_type = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_recv_package_act_type", "Act Type", base.HEX) +f.lost_sats_go_home_recv_package_cnt_down = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_recv_package_cnt_down", "Cnt Down", base.HEX) +f.lost_sats_go_home_recv_package_cmd = ProtoField.uint8 ("dji_mavic_flyrec.lost_sats_go_home_recv_package_cmd", "Cmd", base.HEX) + +local function flightrec_lost_sats_go_home_recv_package_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lost_sats_go_home_recv_package_cmd_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_recv_package_act_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_recv_package_cnt_down, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_recv_package_cmd, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lost Sats Go Home Recv Package: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lost Sats Go Home Recv Package: Payload size different than expected") end +end + +-- Flight log - Adsb Osd Info - 0x504d + +f.adsb_osd_info_valid_flg = ProtoField.uint8 ("dji_mavic_flyrec.adsb_osd_info_valid_flg", "Valid Flg", base.HEX) +f.adsb_osd_info_latitude = ProtoField.int32 ("dji_mavic_flyrec.adsb_osd_info_latitude", "Latitude", base.DEC) +f.adsb_osd_info_longitude = ProtoField.int32 ("dji_mavic_flyrec.adsb_osd_info_longitude", "Longitude", base.DEC) +f.adsb_osd_info_alititude = ProtoField.int32 ("dji_mavic_flyrec.adsb_osd_info_alititude", "Alititude", base.DEC) + +local function flightrec_adsb_osd_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adsb_osd_info_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adsb_osd_info_latitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adsb_osd_info_longitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adsb_osd_info_alititude, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 13) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adsb Osd Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adsb Osd Info: Payload size different than expected") end +end + +-- Flight log - Link Host - 0x092a + +f.link_host_link_host_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_host_link_host_tx_bytes", "Link Host Tx Bytes", base.HEX) +f.link_host_link_host_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_host_link_host_rx_bytes", "Link Host Rx Bytes", base.HEX) +f.link_host_link_host_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_host_link_host_tx_packets", "Link Host Tx Packets", base.HEX) +f.link_host_link_host_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_host_link_host_rx_packets", "Link Host Rx Packets", base.HEX) +f.link_host_link_host_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_host_link_host_tx_errors", "Link Host Tx Errors", base.HEX) +f.link_host_link_host_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_host_link_host_rx_erros", "Link Host Rx Erros", base.HEX) +f.link_host_link_host_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_host_link_host_recv_route", "Link Host Recv Route", base.HEX) +f.link_host_link_host_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_host_link_host_send_route", "Link Host Send Route", base.HEX) + +local function flightrec_link_host_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_host_link_host_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_host_link_host_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_host_link_host_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Host: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Host: Payload size different than expected") end +end + +-- Flight log - Link Pc - 0x092b + +f.link_pc_link_pc_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_pc_link_pc_tx_bytes", "Link Pc Tx Bytes", base.HEX) +f.link_pc_link_pc_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_pc_link_pc_rx_bytes", "Link Pc Rx Bytes", base.HEX) +f.link_pc_link_pc_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_pc_link_pc_tx_packets", "Link Pc Tx Packets", base.HEX) +f.link_pc_link_pc_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_pc_link_pc_rx_packets", "Link Pc Rx Packets", base.HEX) +f.link_pc_link_pc_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_pc_link_pc_tx_errors", "Link Pc Tx Errors", base.HEX) +f.link_pc_link_pc_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_pc_link_pc_rx_erros", "Link Pc Rx Erros", base.HEX) +f.link_pc_link_pc_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_pc_link_pc_recv_route", "Link Pc Recv Route", base.HEX) +f.link_pc_link_pc_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_pc_link_pc_send_route", "Link Pc Send Route", base.HEX) + +local function flightrec_link_pc_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_pc_link_pc_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_pc_link_pc_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_pc_link_pc_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Pc: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Pc: Payload size different than expected") end +end + +-- Flight log - Link Vo - 0x092c + +f.link_vo_link_vo_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_vo_link_vo_tx_bytes", "Link Vo Tx Bytes", base.HEX) +f.link_vo_link_vo_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_vo_link_vo_rx_bytes", "Link Vo Rx Bytes", base.HEX) +f.link_vo_link_vo_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_vo_link_vo_tx_packets", "Link Vo Tx Packets", base.HEX) +f.link_vo_link_vo_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_vo_link_vo_rx_packets", "Link Vo Rx Packets", base.HEX) +f.link_vo_link_vo_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_vo_link_vo_tx_errors", "Link Vo Tx Errors", base.HEX) +f.link_vo_link_vo_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_vo_link_vo_rx_erros", "Link Vo Rx Erros", base.HEX) +f.link_vo_link_vo_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_vo_link_vo_recv_route", "Link Vo Recv Route", base.HEX) +f.link_vo_link_vo_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_vo_link_vo_send_route", "Link Vo Send Route", base.HEX) + +local function flightrec_link_vo_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_vo_link_vo_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_vo_link_vo_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_vo_link_vo_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Vo: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Vo: Payload size different than expected") end +end + +-- Flight log - Link Sdk - 0x092d + +f.link_sdk_link_sdk_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_sdk_link_sdk_tx_bytes", "Link Sdk Tx Bytes", base.HEX) +f.link_sdk_link_sdk_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_sdk_link_sdk_rx_bytes", "Link Sdk Rx Bytes", base.HEX) +f.link_sdk_link_sdk_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_sdk_link_sdk_tx_packets", "Link Sdk Tx Packets", base.HEX) +f.link_sdk_link_sdk_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_sdk_link_sdk_rx_packets", "Link Sdk Rx Packets", base.HEX) +f.link_sdk_link_sdk_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_sdk_link_sdk_tx_errors", "Link Sdk Tx Errors", base.HEX) +f.link_sdk_link_sdk_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_sdk_link_sdk_rx_erros", "Link Sdk Rx Erros", base.HEX) +f.link_sdk_link_sdk_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_sdk_link_sdk_recv_route", "Link Sdk Recv Route", base.HEX) +f.link_sdk_link_sdk_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_sdk_link_sdk_send_route", "Link Sdk Send Route", base.HEX) + +local function flightrec_link_sdk_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_sdk_link_sdk_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_sdk_link_sdk_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_sdk_link_sdk_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Sdk: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Sdk: Payload size different than expected") end +end + +-- Flight log - Link Ofdm - 0x092e + +f.link_ofdm_link_ofdm_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_ofdm_link_ofdm_tx_bytes", "Link Ofdm Tx Bytes", base.HEX) +f.link_ofdm_link_ofdm_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_ofdm_link_ofdm_rx_bytes", "Link Ofdm Rx Bytes", base.HEX) +f.link_ofdm_link_ofdm_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_ofdm_link_ofdm_tx_packets", "Link Ofdm Tx Packets", base.HEX) +f.link_ofdm_link_ofdm_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_ofdm_link_ofdm_rx_packets", "Link Ofdm Rx Packets", base.HEX) +f.link_ofdm_link_ofdm_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_ofdm_link_ofdm_tx_errors", "Link Ofdm Tx Errors", base.HEX) +f.link_ofdm_link_ofdm_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_ofdm_link_ofdm_rx_erros", "Link Ofdm Rx Erros", base.HEX) +f.link_ofdm_link_ofdm_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_ofdm_link_ofdm_recv_route", "Link Ofdm Recv Route", base.HEX) +f.link_ofdm_link_ofdm_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_ofdm_link_ofdm_send_route", "Link Ofdm Send Route", base.HEX) + +local function flightrec_link_ofdm_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_ofdm_link_ofdm_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_ofdm_link_ofdm_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_ofdm_link_ofdm_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_ofdm_link_ofdm_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_ofdm_link_ofdm_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_ofdm_link_ofdm_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_ofdm_link_ofdm_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_ofdm_link_ofdm_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Ofdm: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Ofdm: Payload size different than expected") end +end + +-- Flight log - Link Bat - 0x092f + +f.link_bat_link_bat_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_bat_link_bat_tx_bytes", "Link Bat Tx Bytes", base.HEX) +f.link_bat_link_bat_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_bat_link_bat_rx_bytes", "Link Bat Rx Bytes", base.HEX) +f.link_bat_link_bat_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_bat_link_bat_tx_packets", "Link Bat Tx Packets", base.HEX) +f.link_bat_link_bat_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_bat_link_bat_rx_packets", "Link Bat Rx Packets", base.HEX) +f.link_bat_link_bat_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_bat_link_bat_tx_errors", "Link Bat Tx Errors", base.HEX) +f.link_bat_link_bat_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_bat_link_bat_rx_erros", "Link Bat Rx Erros", base.HEX) +f.link_bat_link_bat_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_bat_link_bat_recv_route", "Link Bat Recv Route", base.HEX) +f.link_bat_link_bat_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_bat_link_bat_send_route", "Link Bat Send Route", base.HEX) + +local function flightrec_link_bat_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_bat_link_bat_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_bat_link_bat_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_bat_link_bat_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_bat_link_bat_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_bat_link_bat_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_bat_link_bat_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_bat_link_bat_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_bat_link_bat_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Bat: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Bat: Payload size different than expected") end +end + +-- Flight log - Link Auto Cali - 0x0930 + +f.link_auto_cali_link_auto_cali_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_auto_cali_link_auto_cali_tx_bytes", "Link Auto Cali Tx Bytes", base.HEX) +f.link_auto_cali_link_auto_cali_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_auto_cali_link_auto_cali_rx_bytes", "Link Auto Cali Rx Bytes", base.HEX) +f.link_auto_cali_link_auto_cali_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_auto_cali_link_auto_cali_tx_packets", "Link Auto Cali Tx Packets", base.HEX) +f.link_auto_cali_link_auto_cali_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_auto_cali_link_auto_cali_rx_packets", "Link Auto Cali Rx Packets", base.HEX) +f.link_auto_cali_link_auto_cali_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_auto_cali_link_auto_cali_tx_errors", "Link Auto Cali Tx Errors", base.HEX) +f.link_auto_cali_link_auto_cali_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_auto_cali_link_auto_cali_rx_erros", "Link Auto Cali Rx Erros", base.HEX) +f.link_auto_cali_link_auto_cali_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_auto_cali_link_auto_cali_recv_route", "Link Auto Cali Recv Route", base.HEX) +f.link_auto_cali_link_auto_cali_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_auto_cali_link_auto_cali_send_route", "Link Auto Cali Send Route", base.HEX) + +local function flightrec_link_auto_cali_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_auto_cali_link_auto_cali_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_auto_cali_link_auto_cali_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_auto_cali_link_auto_cali_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Auto Cali: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Auto Cali: Payload size different than expected") end +end + +-- Flight log - Link Cali Led - 0x0931 + +f.link_cali_led_link_cali_led_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_cali_led_link_cali_led_tx_bytes", "Link Cali Led Tx Bytes", base.HEX) +f.link_cali_led_link_cali_led_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_cali_led_link_cali_led_rx_bytes", "Link Cali Led Rx Bytes", base.HEX) +f.link_cali_led_link_cali_led_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_cali_led_link_cali_led_tx_packets", "Link Cali Led Tx Packets", base.HEX) +f.link_cali_led_link_cali_led_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_cali_led_link_cali_led_rx_packets", "Link Cali Led Rx Packets", base.HEX) +f.link_cali_led_link_cali_led_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_cali_led_link_cali_led_tx_errors", "Link Cali Led Tx Errors", base.HEX) +f.link_cali_led_link_cali_led_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_cali_led_link_cali_led_rx_erros", "Link Cali Led Rx Erros", base.HEX) +f.link_cali_led_link_cali_led_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_cali_led_link_cali_led_recv_route", "Link Cali Led Recv Route", base.HEX) +f.link_cali_led_link_cali_led_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_cali_led_link_cali_led_send_route", "Link Cali Led Send Route", base.HEX) + +local function flightrec_link_cali_led_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_cali_led_link_cali_led_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_cali_led_link_cali_led_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_cali_led_link_cali_led_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Cali Led: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Cali Led: Payload size different than expected") end +end + +-- Flight log - Link Manual Cali - 0x0932 + +f.link_manual_cali_link_manual_cali_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_manual_cali_link_manual_cali_tx_bytes", "Link Manual Cali Tx Bytes", base.HEX) +f.link_manual_cali_link_manual_cali_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.link_manual_cali_link_manual_cali_rx_bytes", "Link Manual Cali Rx Bytes", base.HEX) +f.link_manual_cali_link_manual_cali_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_manual_cali_link_manual_cali_tx_packets", "Link Manual Cali Tx Packets", base.HEX) +f.link_manual_cali_link_manual_cali_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.link_manual_cali_link_manual_cali_rx_packets", "Link Manual Cali Rx Packets", base.HEX) +f.link_manual_cali_link_manual_cali_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.link_manual_cali_link_manual_cali_tx_errors", "Link Manual Cali Tx Errors", base.HEX) +f.link_manual_cali_link_manual_cali_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.link_manual_cali_link_manual_cali_rx_erros", "Link Manual Cali Rx Erros", base.HEX) +f.link_manual_cali_link_manual_cali_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.link_manual_cali_link_manual_cali_recv_route", "Link Manual Cali Recv Route", base.HEX) +f.link_manual_cali_link_manual_cali_send_route = ProtoField.uint16 ("dji_mavic_flyrec.link_manual_cali_link_manual_cali_send_route", "Link Manual Cali Send Route", base.HEX) + +local function flightrec_link_manual_cali_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_manual_cali_link_manual_cali_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_manual_cali_link_manual_cali_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_manual_cali_link_manual_cali_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Manual Cali: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Manual Cali: Payload size different than expected") end +end + +-- Flight log - Ipc0 - 0x0933 + +f.ipc0_ipc0_tx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.ipc0_ipc0_tx_bytes", "Ipc0 Tx Bytes", base.HEX) +f.ipc0_ipc0_rx_bytes = ProtoField.uint32 ("dji_mavic_flyrec.ipc0_ipc0_rx_bytes", "Ipc0 Rx Bytes", base.HEX) +f.ipc0_ipc0_tx_packets = ProtoField.uint16 ("dji_mavic_flyrec.ipc0_ipc0_tx_packets", "Ipc0 Tx Packets", base.HEX) +f.ipc0_ipc0_rx_packets = ProtoField.uint16 ("dji_mavic_flyrec.ipc0_ipc0_rx_packets", "Ipc0 Rx Packets", base.HEX) +f.ipc0_ipc0_tx_errors = ProtoField.uint16 ("dji_mavic_flyrec.ipc0_ipc0_tx_errors", "Ipc0 Tx Errors", base.HEX) +f.ipc0_ipc0_rx_erros = ProtoField.uint16 ("dji_mavic_flyrec.ipc0_ipc0_rx_erros", "Ipc0 Rx Erros", base.HEX) +f.ipc0_ipc0_recv_route = ProtoField.uint16 ("dji_mavic_flyrec.ipc0_ipc0_recv_route", "Ipc0 Recv Route", base.HEX) +f.ipc0_ipc0_send_route = ProtoField.uint16 ("dji_mavic_flyrec.ipc0_ipc0_send_route", "Ipc0 Send Route", base.HEX) + +local function flightrec_ipc0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ipc0_ipc0_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ipc0_ipc0_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ipc0_ipc0_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ipc0_ipc0_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ipc0_ipc0_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ipc0_ipc0_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ipc0_ipc0_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ipc0_ipc0_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ipc0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ipc0: Payload size different than expected") end +end + +-- Flight log - System Monitor - 0xcde0 + +f.system_monitor_root_max_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_root_max_time", "Root Max Time", base.HEX) +f.system_monitor_root_average_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_root_average_time", "Root Average Time", base.HEX) +f.system_monitor_root_warn = ProtoField.int16 ("dji_mavic_flyrec.system_monitor_root_warn", "Root Warn", base.DEC) +f.system_monitor_root_pend = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_root_pend", "Root Pend", base.HEX) +f.system_monitor_root_stack = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_root_stack", "Root Stack", base.HEX) +f.system_monitor_root_reserv = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_root_reserv", "Root Reserv", base.HEX) +f.system_monitor_wq_max_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_wq_max_time", "Wq Max Time", base.HEX) +f.system_monitor_wq_average_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_wq_average_time", "Wq Average Time", base.HEX) +f.system_monitor_wq_warn = ProtoField.int16 ("dji_mavic_flyrec.system_monitor_wq_warn", "Wq Warn", base.DEC) +f.system_monitor_wq_pend = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_wq_pend", "Wq Pend", base.HEX) +f.system_monitor_wq_stack = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_wq_stack", "Wq Stack", base.HEX) +f.system_monitor_wq_reserv = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_wq_reserv", "Wq Reserv", base.HEX) +f.system_monitor_task_c_max_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_c_max_time", "Task C Max Time", base.HEX) +f.system_monitor_task_c_average_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_c_average_time", "Task C Average Time", base.HEX) +f.system_monitor_task_c_warn = ProtoField.int16 ("dji_mavic_flyrec.system_monitor_task_c_warn", "Task C Warn", base.DEC) +f.system_monitor_task_c_pend = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_c_pend", "Task C Pend", base.HEX) +f.system_monitor_task_c_stack = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_c_stack", "Task C Stack", base.HEX) +f.system_monitor_task_c_reserv = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_c_reserv", "Task C Reserv", base.HEX) +f.system_monitor_task_d_max_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_d_max_time", "Task D Max Time", base.HEX) +f.system_monitor_task_d_average_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_d_average_time", "Task D Average Time", base.HEX) +f.system_monitor_task_d_warn = ProtoField.int16 ("dji_mavic_flyrec.system_monitor_task_d_warn", "Task D Warn", base.DEC) +f.system_monitor_task_d_pend = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_d_pend", "Task D Pend", base.HEX) +f.system_monitor_task_d_stack = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_d_stack", "Task D Stack", base.HEX) +f.system_monitor_task_d_reserv = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_d_reserv", "Task D Reserv", base.HEX) +f.system_monitor_task_ctrl_max_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_ctrl_max_time", "Task Ctrl Max Time", base.HEX) +f.system_monitor_task_ctrl_average_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_ctrl_average_time", "Task Ctrl Average Time", base.HEX) +f.system_monitor_task_ctrl_warn = ProtoField.int16 ("dji_mavic_flyrec.system_monitor_task_ctrl_warn", "Task Ctrl Warn", base.DEC) +f.system_monitor_task_ctrl_pend = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_ctrl_pend", "Task Ctrl Pend", base.HEX) +f.system_monitor_task_ctrl_stack = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_ctrl_stack", "Task Ctrl Stack", base.HEX) +f.system_monitor_task_ctrl_reserv = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_ctrl_reserv", "Task Ctrl Reserv", base.HEX) +f.system_monitor_task_a_max_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_a_max_time", "Task A Max Time", base.HEX) +f.system_monitor_task_a_average_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_a_average_time", "Task A Average Time", base.HEX) +f.system_monitor_task_a_warn = ProtoField.int16 ("dji_mavic_flyrec.system_monitor_task_a_warn", "Task A Warn", base.DEC) +f.system_monitor_task_a_pend = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_a_pend", "Task A Pend", base.HEX) +f.system_monitor_task_a_stack = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_a_stack", "Task A Stack", base.HEX) +f.system_monitor_task_a_reserv = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_a_reserv", "Task A Reserv", base.HEX) +f.system_monitor_task_imu_max_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_imu_max_time", "Task Imu Max Time", base.HEX) +f.system_monitor_task_imu_average_time = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_imu_average_time", "Task Imu Average Time", base.HEX) +f.system_monitor_task_imu_warn = ProtoField.int16 ("dji_mavic_flyrec.system_monitor_task_imu_warn", "Task Imu Warn", base.DEC) +f.system_monitor_task_imu_pend = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_imu_pend", "Task Imu Pend", base.HEX) +f.system_monitor_task_imu_stack = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_imu_stack", "Task Imu Stack", base.HEX) +f.system_monitor_task_imu_reserv = ProtoField.uint16 ("dji_mavic_flyrec.system_monitor_task_imu_reserv", "Task Imu Reserv", base.HEX) + +local function flightrec_system_monitor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.system_monitor_root_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_d_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_d_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_d_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_d_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_d_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_d_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_reserv, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 84) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"System Monitor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"System Monitor: Payload size different than expected") end +end + +-- Flight log - Uart Monitor - 0xcddf + +f.uart_monitor_uart0_tx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart0_tx", "Uart0 Tx", base.HEX) +f.uart_monitor_uart0_txlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart0_txlost", "Uart0 Txlost", base.HEX) +f.uart_monitor_uart0_rx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart0_rx", "Uart0 Rx", base.HEX) +f.uart_monitor_uart0_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart0_rxlost", "Uart0 Rxlost", base.HEX) +f.uart_monitor_uart0_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart0_dbg0", "Uart0 Dbg0", base.DEC) +f.uart_monitor_uart0_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart0_dbg1", "Uart0 Dbg1", base.DEC) +f.uart_monitor_uart0_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart0_dbg2", "Uart0 Dbg2", base.DEC) +f.uart_monitor_uart0_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart0_dbg3", "Uart0 Dbg3", base.DEC) +f.uart_monitor_uart0_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart0_dbg4", "Uart0 Dbg4", base.DEC) +f.uart_monitor_uart0_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart0_dbg5", "Uart0 Dbg5", base.DEC) +f.uart_monitor_uart2_tx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart2_tx", "Uart2 Tx", base.HEX) +f.uart_monitor_uart2_txlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart2_txlost", "Uart2 Txlost", base.HEX) +f.uart_monitor_uart2_rx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart2_rx", "Uart2 Rx", base.HEX) +f.uart_monitor_uart2_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart2_rxlost", "Uart2 Rxlost", base.HEX) +f.uart_monitor_uart2_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart2_dbg0", "Uart2 Dbg0", base.DEC) +f.uart_monitor_uart2_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart2_dbg1", "Uart2 Dbg1", base.DEC) +f.uart_monitor_uart2_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart2_dbg2", "Uart2 Dbg2", base.DEC) +f.uart_monitor_uart2_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart2_dbg3", "Uart2 Dbg3", base.DEC) +f.uart_monitor_uart2_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart2_dbg4", "Uart2 Dbg4", base.DEC) +f.uart_monitor_uart2_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart2_dbg5", "Uart2 Dbg5", base.DEC) +f.uart_monitor_uart4_tx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart4_tx", "Uart4 Tx", base.HEX) +f.uart_monitor_uart4_txlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart4_txlost", "Uart4 Txlost", base.HEX) +f.uart_monitor_uart4_rx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart4_rx", "Uart4 Rx", base.HEX) +f.uart_monitor_uart4_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart4_rxlost", "Uart4 Rxlost", base.HEX) +f.uart_monitor_uart4_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart4_dbg0", "Uart4 Dbg0", base.DEC) +f.uart_monitor_uart4_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart4_dbg1", "Uart4 Dbg1", base.DEC) +f.uart_monitor_uart4_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart4_dbg2", "Uart4 Dbg2", base.DEC) +f.uart_monitor_uart4_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart4_dbg3", "Uart4 Dbg3", base.DEC) +f.uart_monitor_uart4_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart4_dbg4", "Uart4 Dbg4", base.DEC) +f.uart_monitor_uart4_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart4_dbg5", "Uart4 Dbg5", base.DEC) +f.uart_monitor_uart5_tx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart5_tx", "Uart5 Tx", base.HEX) +f.uart_monitor_uart5_txlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart5_txlost", "Uart5 Txlost", base.HEX) +f.uart_monitor_uart5_rx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart5_rx", "Uart5 Rx", base.HEX) +f.uart_monitor_uart5_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart5_rxlost", "Uart5 Rxlost", base.HEX) +f.uart_monitor_uart5_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart5_dbg0", "Uart5 Dbg0", base.DEC) +f.uart_monitor_uart5_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart5_dbg1", "Uart5 Dbg1", base.DEC) +f.uart_monitor_uart5_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart5_dbg2", "Uart5 Dbg2", base.DEC) +f.uart_monitor_uart5_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart5_dbg3", "Uart5 Dbg3", base.DEC) +f.uart_monitor_uart5_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart5_dbg4", "Uart5 Dbg4", base.DEC) +f.uart_monitor_uart5_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart5_dbg5", "Uart5 Dbg5", base.DEC) +f.uart_monitor_uart7_tx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart7_tx", "Uart7 Tx", base.HEX) +f.uart_monitor_uart7_txlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart7_txlost", "Uart7 Txlost", base.HEX) +f.uart_monitor_uart7_rx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart7_rx", "Uart7 Rx", base.HEX) +f.uart_monitor_uart7_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart7_rxlost", "Uart7 Rxlost", base.HEX) +f.uart_monitor_uart7_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart7_dbg0", "Uart7 Dbg0", base.DEC) +f.uart_monitor_uart7_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart7_dbg1", "Uart7 Dbg1", base.DEC) +f.uart_monitor_uart7_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart7_dbg2", "Uart7 Dbg2", base.DEC) +f.uart_monitor_uart7_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart7_dbg3", "Uart7 Dbg3", base.DEC) +f.uart_monitor_uart7_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart7_dbg4", "Uart7 Dbg4", base.DEC) +f.uart_monitor_uart7_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart7_dbg5", "Uart7 Dbg5", base.DEC) +f.uart_monitor_uart100_tx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart100_tx", "Uart100 Tx", base.HEX) +f.uart_monitor_uart100_txlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart100_txlost", "Uart100 Txlost", base.HEX) +f.uart_monitor_uart100_rx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart100_rx", "Uart100 Rx", base.HEX) +f.uart_monitor_uart100_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart100_rxlost", "Uart100 Rxlost", base.HEX) +f.uart_monitor_uart100_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart100_dbg0", "Uart100 Dbg0", base.DEC) +f.uart_monitor_uart100_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart100_dbg1", "Uart100 Dbg1", base.DEC) +f.uart_monitor_uart100_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart100_dbg2", "Uart100 Dbg2", base.DEC) +f.uart_monitor_uart100_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart100_dbg3", "Uart100 Dbg3", base.DEC) +f.uart_monitor_uart100_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart100_dbg4", "Uart100 Dbg4", base.DEC) +f.uart_monitor_uart100_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart100_dbg5", "Uart100 Dbg5", base.DEC) +f.uart_monitor_uart179_tx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart179_tx", "Uart179 Tx", base.HEX) +f.uart_monitor_uart179_txlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart179_txlost", "Uart179 Txlost", base.HEX) +f.uart_monitor_uart179_rx = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart179_rx", "Uart179 Rx", base.HEX) +f.uart_monitor_uart179_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.uart_monitor_uart179_rxlost", "Uart179 Rxlost", base.HEX) +f.uart_monitor_uart179_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart179_dbg0", "Uart179 Dbg0", base.DEC) +f.uart_monitor_uart179_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart179_dbg1", "Uart179 Dbg1", base.DEC) +f.uart_monitor_uart179_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart179_dbg2", "Uart179 Dbg2", base.DEC) +f.uart_monitor_uart179_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart179_dbg3", "Uart179 Dbg3", base.DEC) +f.uart_monitor_uart179_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart179_dbg4", "Uart179 Dbg4", base.DEC) +f.uart_monitor_uart179_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.uart_monitor_uart179_dbg5", "Uart179 Dbg5", base.DEC) + +local function flightrec_uart_monitor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.uart_monitor_uart0_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart0_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart0_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart0_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart0_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart2_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart2_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart2_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart2_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart4_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart4_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart4_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart4_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart5_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart5_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart5_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart5_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart7_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart7_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart7_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart7_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart100_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart100_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart100_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart100_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart179_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart179_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart179_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart179_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg5, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 196) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Uart Monitor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Uart Monitor: Payload size different than expected") end +end + +-- Flight log - Can Monitor - 0xcdde + +f.can_monitor_can0_tx = ProtoField.uint32 ("dji_mavic_flyrec.can_monitor_can0_tx", "Can0 Tx", base.HEX) +f.can_monitor_can0_txlost = ProtoField.uint32 ("dji_mavic_flyrec.can_monitor_can0_txlost", "Can0 Txlost", base.HEX) +f.can_monitor_can0_rx = ProtoField.uint32 ("dji_mavic_flyrec.can_monitor_can0_rx", "Can0 Rx", base.HEX) +f.can_monitor_can0_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.can_monitor_can0_rxlost", "Can0 Rxlost", base.HEX) +f.can_monitor_can0_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can0_dbg0", "Can0 Dbg0", base.DEC) +f.can_monitor_can0_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can0_dbg1", "Can0 Dbg1", base.DEC) +f.can_monitor_can0_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can0_dbg2", "Can0 Dbg2", base.DEC) +f.can_monitor_can0_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can0_dbg3", "Can0 Dbg3", base.DEC) +f.can_monitor_can0_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can0_dbg4", "Can0 Dbg4", base.DEC) +f.can_monitor_can0_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can0_dbg5", "Can0 Dbg5", base.DEC) +f.can_monitor_can1_tx = ProtoField.uint32 ("dji_mavic_flyrec.can_monitor_can1_tx", "Can1 Tx", base.HEX) +f.can_monitor_can1_txlost = ProtoField.uint32 ("dji_mavic_flyrec.can_monitor_can1_txlost", "Can1 Txlost", base.HEX) +f.can_monitor_can1_rx = ProtoField.uint32 ("dji_mavic_flyrec.can_monitor_can1_rx", "Can1 Rx", base.HEX) +f.can_monitor_can1_rxlost = ProtoField.uint32 ("dji_mavic_flyrec.can_monitor_can1_rxlost", "Can1 Rxlost", base.HEX) +f.can_monitor_can1_dbg0 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can1_dbg0", "Can1 Dbg0", base.DEC) +f.can_monitor_can1_dbg1 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can1_dbg1", "Can1 Dbg1", base.DEC) +f.can_monitor_can1_dbg2 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can1_dbg2", "Can1 Dbg2", base.DEC) +f.can_monitor_can1_dbg3 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can1_dbg3", "Can1 Dbg3", base.DEC) +f.can_monitor_can1_dbg4 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can1_dbg4", "Can1 Dbg4", base.DEC) +f.can_monitor_can1_dbg5 = ProtoField.int16 ("dji_mavic_flyrec.can_monitor_can1_dbg5", "Can1 Dbg5", base.DEC) + +local function flightrec_can_monitor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.can_monitor_can0_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can0_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can0_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can0_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can0_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can1_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can1_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can1_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can1_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg5, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 56) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Can Monitor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Can Monitor: Payload size different than expected") end +end + +-- Flight log - Fly Log - 0x8000 + +f.fly_log_text = ProtoField.string ("dji_mavic_flyrec.fly_log_text", "Fly Log", base.ASCII) + +local function flightrec_fly_log_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.fly_log_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Sd Logs - 0xff00 + +f.sd_logs_text = ProtoField.string ("dji_mavic_flyrec.sd_logs_text", "Sd Logs", base.ASCII) + +local function flightrec_sd_logs_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.sd_logs_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Sys Cfg - 0xffff + +f.sys_cfg_text = ProtoField.string ("dji_mavic_flyrec.sys_cfg_text", "Sys Cfg", base.ASCII) + +local function flightrec_sys_cfg_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.sys_cfg_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Uno Log - 0xfffe + +f.uno_log_text = ProtoField.string ("dji_mavic_flyrec.uno_log_text", "Uno Log", base.ASCII) + +local function flightrec_uno_log_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.uno_log_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Cfg Log - 0xfffd + +f.cfg_log_text = ProtoField.string ("dji_mavic_flyrec.cfg_log_text", "Cfg Log", base.ASCII) + +local function flightrec_cfg_log_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.cfg_log_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Module Name - 0xfffc + +f.module_name_text = ProtoField.string ("dji_mavic_flyrec.module_name_text", "Module Name", base.ASCII) + +local function flightrec_module_name_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.module_name_text, payload(offset, payload:len() - offset)) +end + +DJI_MAVIC_FLIGHT_RECORD_DISSECT = { + [0x03e8] = flightrec_controller_dissector, + [0x03e9] = flightrec_aircraft_condition_dissector, + [0x03ea] = flightrec_serial_api_inputs_dissector, + [0x03ec] = flightrec_go_home_info_dissector, + [0x03ed] = flightrec_fmu_devices_run_time_dissector, + [0x03f0] = flightrec_fmu_sa_run_time_dissector, + [0x03f1] = flightrec_fmu_write_run_time_dissector, + [0x03f3] = flightrec_fmu_api_run_time_dissector, + [0x03f4] = flightrec_cfg_errs_dissector, + [0x03f5] = flightrec_new_api_err_time_dissector, + [0x03ee] = flightrec_poi_debug_data_dissector, + [0x03f6] = flightrec_adv_gh_debug_data_dissector, + [0x03f7] = flightrec_ahrs_data_dissector, + [0x0070] = flightrec_err_code_dissector, + [0x0800] = flightrec_imu_atti_0_dissector, + [0x0801] = flightrec_imu_atti_1_dissector, + [0x0802] = flightrec_imu_atti_2_dissector, + [0x0810] = flightrec_imu_ex_0_dissector, + [0x0811] = flightrec_imu_ex_1_dissector, + [0x0812] = flightrec_imu_ex_2_dissector, + [0x08a0] = flightrec_atti_mini0_dissector, + [0x08a1] = flightrec_atti_mini1_dissector, + [0x08a2] = flightrec_atti_mini2_dissector, + [0x0860] = flightrec_imu_fdi_0_dissector, + [0x0861] = flightrec_imu_fdi_1_dissector, + [0x0862] = flightrec_imu_fdi_2_dissector, + [0x03ef] = flightrec_hl_debug_data_dissector, + [0x03f2] = flightrec_farm_db_data_dissector, + [0x4ef7] = flightrec_spray_sys_ctrl_cmd_dissector, + [0x4ef8] = flightrec_spray_sys_state_dissector, + [0x04b0] = flightrec_ctrl_vert_debug_dissector, + [0x04b1] = flightrec_ctrl_pos_vert_debug_dissector, + [0x04b2] = flightrec_ctrl_vel_vert_debug_dissector, + [0x04b3] = flightrec_ctrl_acc_vert_debug_dissector, + [0x0514] = flightrec_ctrl_horiz_debug_dissector, + [0x0515] = flightrec_ctrl_horiz_pos_debug_dissector, + [0x0516] = flightrec_ctrl_horiz_vel_debug_dissector, + [0x0518] = flightrec_ctrl_horiz_atti_debug_dissector, + [0x0519] = flightrec_ctrl_horiz_ang_vel_debug_dissector, + [0x051a] = flightrec_ctrl_horiz_ccpm_debug_dissector, + [0x051b] = flightrec_ctrl_horiz_motor_debug_dissector, + [0x051c] = flightrec_ctrl_sweep_test_dissector, + [0x0460] = flightrec_way_debug_info_dissector, + [0x0461] = flightrec_svo_avoid_dissector, + [0x0578] = flightrec_simulator_debug_data_dissector, + [0x0579] = flightrec_simulator_gyro_acc_data_400hz_dissector, + [0x057c] = flightrec_simulator_press_data_200hz_dissector, + [0x057a] = flightrec_simulator_mag_data_50hz_dissector, + [0x057b] = flightrec_simulator_gps_data_5hz_dissector, + [0x057e] = flightrec_simulator_motor_data_dissector, + [0x057d] = flightrec_device_change_times_dissector, + [0x0582] = flightrec_simulator_config_aircraft_param_dissector, + [0x0583] = flightrec_simulator_config_battery_param_dissector, + [0x0584] = flightrec_simulator_config_environment_param_dissector, + [0x0585] = flightrec_simulator_config_motor_param_1_dissector, + [0x0587] = flightrec_simulator_config_sensor_param_dissector, + [0xcff2] = flightrec_rtkdata_dissector, + [0x0640] = flightrec_genral_debug_data_dissector, + [0x06a4] = flightrec_rc_debug_info_dissector, + [0x08d0] = flightrec_cali_mag_00_dissector, + [0x08d1] = flightrec_cali_mag_01_dissector, + [0x08d2] = flightrec_cali_mag_02_dissector, + [0x0828] = flightrec_lpf_gyr_acc0_dissector, + [0x0829] = flightrec_lpf_gyr_acc1_dissector, + [0x082a] = flightrec_lpf_gyr_acc2_dissector, + [0x08e6] = flightrec_app_temp_bias0_dissector, + [0x08e7] = flightrec_app_temp_bias1_dissector, + [0x08e8] = flightrec_app_temp_bias2_dissector, + [0x08e4] = flightrec_inner_temp_bias0_dissector, + [0x08e5] = flightrec_inner_temp_bias1_dissector, + [0x08e6] = flightrec_inner_temp_bias2_dissector, + [0x06ae] = flightrec_battery_info_dissector, + [0x06af] = flightrec_battery_status_dissector, + [0x06b0] = flightrec_smart_battery_info_dissector, + [0x0708] = flightrec_statistical_info_dissector, + [0x2764] = flightrec_ns_sensor_quality_dissector, + [0x2765] = flightrec_ns_data_debug_dissector, + [0x2766] = flightrec_ns_data_component_dissector, + [0x2767] = flightrec_ns_data_residuals_dissector, + [0x2768] = flightrec_ns_data_posi_ofst_dissector, + [0x2769] = flightrec_ns_sensor_connect_dissector, + [0x276a] = flightrec_esc_data_dissector, + [0x276b] = flightrec_high_freq_gyro_data_0_dissector, + [0x276c] = flightrec_high_freq_gyro_data_1_dissector, + [0x276d] = flightrec_high_freq_gyro_data_2_dissector, + [0x276e] = flightrec_rc_gps_data_dissector, + [0x2770] = flightrec_cb_gps_dissector, + [0x2771] = flightrec_cb_temp_dissector, + [0x2772] = flightrec_cb_press_dissector, + [0x2774] = flightrec_air_compensate_data_dissector, + [0x2775] = flightrec_vision_tof_dissector, + [0x2776] = flightrec_gs_rtk_data_dissector, + [0x2777] = flightrec_ex_raw_baro1_dissector, + [0x2778] = flightrec_ex_raw_baro2_dissector, + [0x2779] = flightrec_ex_raw_compass_dissector, + [0x27d8] = flightrec_gear_status_dissector, + [0x4ef2] = flightrec_radar_bottom_dissector, + [0x4ef3] = flightrec_radar_avoid_front_dissector, + [0x4ef4] = flightrec_radar_avoid_back_dissector, + [0x4ef5] = flightrec_radar_predict_front_dissector, + [0x4ef6] = flightrec_radar_predict_back_dissector, + [0x4f4c] = flightrec_gyro_raw0_0_dissector, + [0x4f4d] = flightrec_gyro_raw0_1_dissector, + [0x4f4e] = flightrec_gyro_raw0_2_dissector, + [0x4f50] = flightrec_gyro_raw1_0_dissector, + [0x4f51] = flightrec_gyro_raw1_1_dissector, + [0x4f54] = flightrec_gyro_raw2_0_dissector, + [0x4f55] = flightrec_gyro_raw2_1_dissector, + [0x4f58] = flightrec_acc_raw0_0_dissector, + [0x4f59] = flightrec_acc_raw0_1_dissector, + [0x4f5a] = flightrec_acc_raw0_2_dissector, + [0x4f5c] = flightrec_acc_raw1_0_dissector, + [0x4f5d] = flightrec_acc_raw1_1_dissector, + [0x4f60] = flightrec_acc_raw2_0_dissector, + [0x4f61] = flightrec_acc_raw2_1_dissector, + [0x4f64] = flightrec_sensor_push0_0_dissector, + [0x4f65] = flightrec_sensor_push0_1_dissector, + [0x4f6a] = flightrec_baro_raw0_dissector, + [0x4f6b] = flightrec_baro_raw1_dissector, + [0x4f6c] = flightrec_baro_raw2_dissector, + [0x4f6d] = flightrec_baro_raw3_dissector, + [0x4f74] = flightrec_compass_raw0_dissector, + [0x4f75] = flightrec_compass_raw1_dissector, + [0x4f76] = flightrec_compass_raw2_dissector, + [0x4f7e] = flightrec_compass_filter0_dissector, + [0x4f7f] = flightrec_compass_filter1_dissector, + [0x4f80] = flightrec_compass_filter2_dissector, + [0x4f88] = flightrec_imu_rotated_data_dissector, + [0x5014] = flightrec_raw_wristband_data_dissector, + [0x5015] = flightrec_wristband_dissector, + [0x501e] = flightrec_ctrl_device_dissector, + [0x4e20] = flightrec_battery_info_2_dissector, + [0x4e21] = flightrec_pwm_output_dissector, + [0x0880] = flightrec_temp_ctl_recorde0_dissector, + [0x0881] = flightrec_temp_ctl_recorde1_dissector, + [0x0882] = flightrec_temp_ctl_recorde2_dissector, + [0x4e22] = flightrec_airport_limit_debug_info_dissector, + [0x4e23] = flightrec_battery_raw_data_1_dissector, + [0x4e24] = flightrec_battery_raw_data_2_dissector, + [0x4e25] = flightrec_sys_err_dissector, + [0x4e27] = flightrec_quick_circle_debug_dissector, + [0x4e28] = flightrec_battery_info_3_dissector, + [0x4e29] = flightrec_rc_func_data_dissector, + [0x4e2a] = flightrec_rc_func_state_dissector, + [0x4e2b] = flightrec_gps_monitor_1_dissector, + [0x4e2c] = flightrec_gps_monitor_2_dissector, + [0x4e2d] = flightrec_gps_monitor_3_dissector, + [0x0883] = flightrec_adaptive_roll_dissector, + [0x0884] = flightrec_adaptive_pitch_dissector, + [0x0885] = flightrec_fw_g_api_dissector, + [0x0887] = flightrec_fw_param_ekf_dissector, + [0x27e2] = flightrec_ex_raw_airspeed_dissector, + [0x5000] = flightrec_vibrate_detect_gyro_dissector, + [0x500a] = flightrec_airprot_limit_data_dissector, + [0x500b] = flightrec_adv_fl_limit_data_dissector, + [0x0888] = flightrec_db_subscription_dissector, + [0x504b] = flightrec_lost_sats_go_home_send_package_dissector, + [0x504c] = flightrec_lost_sats_go_home_recv_package_dissector, + [0x504d] = flightrec_adsb_osd_info_dissector, + [0x092a] = flightrec_link_host_dissector, + [0x092b] = flightrec_link_pc_dissector, + [0x092c] = flightrec_link_vo_dissector, + [0x092d] = flightrec_link_sdk_dissector, + [0x092e] = flightrec_link_ofdm_dissector, + [0x092f] = flightrec_link_bat_dissector, + [0x0930] = flightrec_link_auto_cali_dissector, + [0x0931] = flightrec_link_cali_led_dissector, + [0x0932] = flightrec_link_manual_cali_dissector, + [0x0933] = flightrec_ipc0_dissector, + [0xcde0] = flightrec_system_monitor_dissector, + [0xcddf] = flightrec_uart_monitor_dissector, + [0xcdde] = flightrec_can_monitor_dissector, + [0x8000] = flightrec_fly_log_dissector, + [0xff00] = flightrec_sd_logs_dissector, + [0xffff] = flightrec_sys_cfg_dissector, + [0xfffe] = flightrec_uno_log_dissector, + [0xfffd] = flightrec_cfg_log_dissector, + [0xfffc] = flightrec_module_name_dissector, +} + +-- [0] Start of Pkt, always 0x55 +f.delimiter = ProtoField.uint8 ("dji_mavic_flyrec.delimiter", "Delimiter", base.HEX) +-- [1] Length of Pkt +f.length = ProtoField.uint16 ("dji_mavic_flyrec.length", "Length", base.HEX, nil, 0x3FF) +-- [2] Protocol version +f.protocol_version = ProtoField.uint16 ("dji_mavic_flyrec.protover", "Protocol Version", base.HEX, nil, 0xFC00) +-- [3] Data Type +f.datatype = ProtoField.uint8 ("dji_mavic_flyrec.hdr_crc", "Header CRC", base.HEX) + +-- Fields for ProtoVer = 0 (Flight Record) + +-- [4-5] Log Entry Type +f.etype = ProtoField.uint16 ("dji_mavic_flyrec.etype", "Log Entry Type", base.HEX, DJI_MAVIC_FLIGHT_RECORD_ENTRY_TYPE) +-- [6-9] Sequence Ctr +f.seqctr = ProtoField.uint16 ("dji_mavic_flyrec.seqctr", "Seq Counter", base.DEC) +-- [B] Payload (optional) +f.payload = ProtoField.bytes ("dji_mavic_flyrec.payload", "Payload", base.SPACE) + +-- [B+Payload] CRC +f.crc = ProtoField.uint16 ("dji_mavic_flyrec.crc", "CRC", base.HEX) + +local function flightrec_decrypt_payload(pkt_length, buffer) + local offset = 6 + local seqctr = buffer(offset,4):le_uint() + + offset = 10 + local payload = buffer(offset, pkt_length - offset - 2):bytes() + + for i = 0, (payload:len() - 1) do + payload:set_index( i, bit.bxor(payload:get_index(i), bit32.band(seqctr, 0xFF) ) ) + end + + return payload +end + +-- Dissector top level function; is called within this dissector, but can also be called from outsude +function dji_mavic_flyrec_main_dissector(buffer, pinfo, subtree) + local offset = 1 + + -- [1-2] The Pkt length | protocol version + local pkt_length = buffer(offset,2):le_uint() + local pkt_protover = pkt_length + -- bit32 lib requires LUA 5.2 + pkt_length = bit32.band(pkt_length, 0x03FF) + pkt_protover = bit32.rshift(bit32.band(pkt_protover, 0xFC00), 10) + + subtree:add_le (f.length, buffer(offset, 2)) + subtree:add_le (f.protocol_version, buffer(offset, 2)) + offset = offset + 2 + + -- [3] Header Checksum + subtree:add (f.datatype, buffer(offset, 1)) + offset = offset + 1 + + if pkt_protover == 0 then + + -- [4] Log entry type + local etype = buffer(offset,2):le_uint() + subtree:add_le (f.etype, buffer(offset, 2)) + offset = offset + 2 + + -- [6] Sequence Counter + subtree:add_le (f.seqctr, buffer(offset, 4)) + offset = offset + 4 + + assert(offset == 10, "Offset shifted - dissector internal inconsistency") + + -- [A] Payload + if pkt_length > offset+2 then + local payload_buf = flightrec_decrypt_payload(pkt_length, buffer) + local payload_tree = subtree:add(f.payload, buffer(offset, pkt_length - offset - 2)) + payload_tree:set_text("Payload: " .. bytearray_to_hexstr(payload_buf)); + local payload_tvb = ByteArray.tvb(payload_buf, "Payload") + + -- If we have a dissector for this kind of command, run it + local dissector = DJI_MAVIC_FLIGHT_RECORD_DISSECT[etype] + + if dissector ~= nil then + dissector(payload_tvb, pinfo, payload_tree) + end + + end + + end + + -- CRC + subtree:add_le(f.crc, buffer(pkt_length - 2, 2)) + offset = offset + 2 +end + +-- The protocol dissector itself +function DJI_MAVIC_FLYREC_PROTO.dissector (buffer, pinfo, tree) + + local subtree = tree:add (DJI_MAVIC_FLYREC_PROTO, buffer()) + + -- The Pkt start byte + local offset = 0 + + local pkt_type = buffer(offset,1):uint() + subtree:add (f.delimiter, buffer(offset, 1)) + offset = offset + 1 + + if pkt_type == 0x55 then + dji_mavic_flyrec_main_dissector(buffer, pinfo, subtree) + end + +end + +-- A initialization routine +function DJI_MAVIC_FLYREC_PROTO.init () +end diff --git a/dissectors/dji-dumlv1/src/dji-mavic.lua b/dissectors/dji-dumlv1/src/dji-mavic.lua new file mode 100644 index 0000000..89c992f --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-mavic.lua @@ -0,0 +1,41 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-mavic.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit 1865b36e0bc9c1f10ab6fff64554f332acb5e5ec du 24/12/2018). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- Create the aggeregate dissector +DJI_MAVIC_PROTO = Proto ("dji_mavic", "DJI_MAVIC", "Dji Mavic protocols aggregate") + +local f = DJI_MAVIC_PROTO.fields + +-- [0] Start of Pkt, always 0x55 +f.delimiter = ProtoField.uint8 ("dji_mavic.delimiter", "Delimiter", base.HEX) + +-- The protocol dissector itself +function DJI_MAVIC_PROTO.dissector (buffer, pinfo, tree) + + local subtree = tree:add (DJI_MAVIC_PROTO, buffer()) + + -- The Pkt start byte determines the pkt type + local offset = 0 + + local pkt_type = buffer(offset,1):uint() + subtree:add (f.delimiter, buffer(offset, 1)) + offset = offset + 1 + + if pkt_type == 0x55 then + local pkt_protover = buffer(offset,2):le_uint() + pkt_protover = bit32.rshift(bit32.band(pkt_protover, 0xFC00), 10) + if pkt_protover == 0 then + dji_mavic_flyrec_main_dissector(buffer, pinfo, subtree) + else + dji_dumlv1_main_dissector(buffer, pinfo, subtree) + end + end + +end + +-- A initialization routine +function DJI_MAVIC_PROTO.init () +end + diff --git a/dissectors/dji-dumlv1/src/dji-p3-batt-proto.lua b/dissectors/dji-dumlv1/src/dji-p3-batt-proto.lua new file mode 100644 index 0000000..2026fe3 --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-p3-batt-proto.lua @@ -0,0 +1,212 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-p3-batt-proto.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit cf464006cf301b216137a01ee878f3795448914b du 24/12/2018). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- Create a new dissector +DJI_P3_BATT_PROTO = Proto ("dji_p3_batt", "DJI_P3_BATT", "Dji Ph3 battery communication protocol") + +local f = DJI_P3_BATT_PROTO.fields +local enums = {} + +DJI_P3_BATTERY_UART_CMDS = { + [0x21] = 'Get Battery Type', + [0x22] = 'Get Battery Status', + [0x23] = 'DRM ?', + [0x24] = 'DRM ?', + [0x25] = 'Get Battery Warning Flags', + [0x31] = 'Get Battery Settings', + [0x34] = 'Unknown', + [0x38] = 'Get Battery Barcode', +} + + +--Battery barcode +f.batt_barcode = ProtoField.bytes("dji_p3_batt.barcode", "Barcode", base.SPACE) + +local function battery_barcode_dissector(batt_length, buffer, pinfo, subtree) + local offset = 5 + if batt_length ~= 14 then + subtree:add(f.batt_barcode, buffer(offset, (batt_length - offset - 1))) + + end +end + +-- Battery Status +f.status_temp = ProtoField.uint16 ("dji_p3_batt.status_temp", "Temp", base.DEC) +f.status_total_v = ProtoField.uint16 ("dji_p3_batt.status_total_v", "Total mV", base.DEC) +f.status_current = ProtoField.int32 ("dji_p3_batt.status_current", "Current", base.DEC) +f.status_ave_current = ProtoField.int32 ("dji_p3_batt.status_ave_current", "Average Current", base.DEC) +f.status_state_of_charge = ProtoField.uint16 ("dji_p3_batt.status_charge", "Charge (%)", base.DEC) +f.status_cell_v = ProtoField.uint16 ("dji_p3_batt.status_cell_v", "Cell mV", base.DEC) +f.status_cell_eol = ProtoField.uint16 ("dji_p3_batt.status_cell_eol", "EOL", base.HEX) +f.status_power_status = ProtoField.string("dji_p3_batt.status_status", "Power Status") + +local function battery_status_dissector(batt_length, buffer, pinfo, subtree) + local offset = 5 +-- local cell + if batt_length ~= 14 then + subtree:add_le (f.status_temp, buffer(offset, 2)) + offset = offset + 2 + subtree:add_le (f.status_total_v, buffer(offset, 2)) + offset = offset + 2 + subtree:add_le (f.status_current, buffer(offset, 2)) + offset = offset + 4 + subtree:add_le (f.status_ave_current, buffer(offset, 2)) + offset = offset + 4 + subtree:add_le (f.status_state_of_charge, buffer(offset, 2)) + offset = offset + 2 + + for cell = 1, 5 do + subtree:add_le (f.status_cell_v, buffer(offset, 2)) + offset = offset + 2 + end + + subtree:add_le (f.status_cell_eol, buffer(offset, 2)) + offset = offset + 2 + + local pstatus = buffer(offset,1):uint() + if pstatus == 0x00 then + subtree:add(f.status_power_status, "On") + elseif pstatus == 0xFF then + subtree:add(f.status_power_status, "Powering Off") + else + subtree:add(f.status_power_status, "Unknown") + end + + end + +end + +-- Battery Info +f.info_total_capacity = ProtoField.uint16 ("dji_p3_batt.info_total_capacity", "Total Cap", base.DEC) +f.info_discharge_count = ProtoField.uint16 ("dji_p3_batt.info_discharge_count", "Discharge Count", base.DEC) +f.info_nominal_capacity = ProtoField.uint16 ("dji_p3_batt.info_nominal_capacity", "Nominal Cap", base.DEC) +f.info_nominal_voltage = ProtoField.uint16 ("dji_p3_batt.info_nominal_voltage", "Nominal V", base.DEC) +f.info_battery_spec = ProtoField.uint16 ("dji_p3_batt.info_battery_spec", "Battery Spec", base.DEC) +f.info_mfr_date = ProtoField.string ("dji_p3_batt.info_mfr_date", "Mfr Date") +f.info_serial_number = ProtoField.uint16 ("dji_p3_batt.info_serial_number", "Serial Number", base.HEX) +f.info_name = ProtoField.string("dji_p3_batt.info_name", "Name") +f.info_unk1 = ProtoField.uint16 ("dji_p3_batt.info_unknown1", "Unknown", base.HEX) +f.info_unk2 = ProtoField.uint16 ("dji_p3_batt.info_unknown2", "Unknown", base.HEX) +f.info_fw_version = ProtoField.string ("dji_p3_batt.info_fw_version", "FW Version", base.ASCII) +f.info_life = ProtoField.uint16 ("dji_p3_batt.info_life", "Battery Life", base.DEC) + +local function battery_type_dissector(batt_length, buffer, pinfo, subtree) + local offset = 5 + + if batt_length ~= 14 then + subtree:add_le (f.info_total_capacity, buffer(offset, 2)) + offset = offset + 2 + subtree:add_le (f.info_discharge_count, buffer(offset, 2)) + offset = offset + 2 + subtree:add_le (f.info_nominal_capacity, buffer(offset, 2)) + offset = offset + 2 + subtree:add_le (f.info_nominal_voltage, buffer(offset, 2)) + offset = offset + 2 + subtree:add_le (f.info_battery_spec, buffer(offset, 2)) + offset = offset + 2 + + local md = buffer(offset, 2):le_uint() + local year = bit32.arshift(md,9) + 1980 + local month = bit32.band(bit32.arshift(md,5), 0x0F) + local day = bit32.band(md, 0x01F) + local date = string.format("%02d/%02d/%04d", day, month, year) + subtree:add(f.info_mfr_date, date) + offset = offset + 2 + + subtree:add_le (f.info_serial_number, buffer(offset, 2)) + offset = offset + 2 + + subtree:add(f.info_name, buffer(offset, 15)) + offset = offset + 15 + + subtree:add_le (f.info_unk1, buffer(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.info_unk2, buffer(offset, 2)) + offset = offset + 2 + + local version = string.format("%02d.%02d.%02d.%02d", buffer(offset,1):uint(), buffer(offset+1,1):uint(), buffer(offset+2,1):uint(), buffer(offset+3,1):uint()) + subtree:add(f.info_fw_version, version) + offset = offset + 4 + + subtree:add_le (f.info_life, buffer(offset, 2)) + offset = offset + 2 + + end +end + +DJI_P3_BATTERY_UART_DISSECT = { + [0x21] = battery_type_dissector, + [0x22] = battery_status_dissector, + [0x38] = battery_barcode_dissector, +} + +-- Top level packet fields + +-- [0] Start of Pkt, always 0xAB +f.delimiter = ProtoField.uint8 ("dji_p3_batt.delimiter", "Delimiter", base.HEX) +-- [1] Length of Pkt +f.length = ProtoField.uint16 ("dji_p3_batt.length", "Length", base.HEX, nil, 0x3FF) +-- [2] +f.protocol_version = ProtoField.uint16 ("dji_p3_batt.protover", "Protocol Version", base.HEX, nil, 0xFC00) +-- [3] Cmd ID +f.cmd = ProtoField.uint8('dji_p3_batt.cmd', 'Battery Cmd', base.HEX, DJI_P3_BATTERY_UART_CMDS) + +f.payload = ProtoField.bytes ("dji_p3_batt.payload", "Payload", base.NONE) + +f.crc = ProtoField.uint8 ("dji_p3_batt.crc", "CRC", base.HEX) + +-- Dissector top level function; is called within this dissector, but can also be called from outsude +function dji_p3_batt_main_dissector(buffer, pinfo, subtree) + local offset = 1 + + local batt_length = buffer(offset,2):le_uint() + -- bit32 lib requires LUA 5.2 + batt_length = bit32.band(batt_length, 0x03FF) + + subtree:add_le (f.length, buffer(offset, 2)) + subtree:add_le (f.protocol_version, buffer(offset, 2)) + offset = offset + 2 + + batt_cmd = buffer(offset, 1):uint() + subtree:add (f.cmd, buffer(offset, 1)) + offset = offset + 1 + + if batt_length > offset+1 then + payload_tree = subtree:add(f.payload, buffer(offset, batt_length - offset - 1)) + + -- If we have a dissector for this kind of command, run it + local dissector = DJI_P3_BATTERY_UART_DISSECT[batt_cmd] + + if dissector ~= nil then + dissector(batt_length, buffer, pinfo, payload_tree) + end + + end + + subtree:add(f.crc, buffer(batt_length - 1, 1)) +end + +-- The protocol dissector itself +function DJI_P3_BATT_PROTO.dissector (buffer, pinfo, tree) + + local subtree = tree:add (DJI_P3_BATT_PROTO, buffer()) + + -- The Pkt start byte + local offset = 0 + + local pkt_type = buffer(offset,1):uint() + subtree:add (f.delimiter, buffer(offset, 1)) + offset = offset + 1 + + if pkt_type == 0xAB then + dji_p3_batt_main_dissector(buffer, pinfo, subtree) + end + +end + +-- A initialization routine +function DJI_P3_BATT_PROTO.init () +end diff --git a/dissectors/dji-dumlv1/src/dji-p3-flyrec-proto.lua b/dissectors/dji-dumlv1/src/dji-p3-flyrec-proto.lua new file mode 100644 index 0000000..a9914c3 --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-p3-flyrec-proto.lua @@ -0,0 +1,8716 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-p3-flyrec-proto.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit 1865b36e0bc9c1f10ab6fff64554f332acb5e5ec du 24/12/2018). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- Create a new dissector +DJI_P3_FLYREC_PROTO = Proto ("dji_p3_flyrec", "DJI_P3_FLYREC", "Dji Ph3 Flight Record file format") + +local f = DJI_P3_FLYREC_PROTO.fields +local enums = {} + +DJI_P3_FLIGHT_RECORD_ENTRY_TYPE = { + [0x0000] = 'Controller', + [0x07cf] = 'Ofdm Cnt', + [0x07d0] = 'Uart Cnt', + [0x0002] = 'Imu Tail', + [0xfffa] = 'Drv Log', + [0x0073] = 'Asr', + [0x0001] = 'Imu Atti', + [0x0003] = 'Imu Ex', + [0x0820] = 'Imu Tail 00', + [0x0800] = 'Imu Atti 00', + [0x0810] = 'Imu Ex 00', + [0x0821] = 'Imu Tail 01', + [0x0801] = 'Imu Atti 01', + [0x0811] = 'Imu Ex 01', + [0x0822] = 'Imu Tail 02', + [0x0802] = 'Imu Atti 02', + [0x0812] = 'Imu Ex 02', + [0x0004] = 'Compass', + [0x0005] = 'Gps Glns', + [0x000b] = 'Gps Snr', + [0x0061] = 'Pt3 Gps Snr', + [0x005b] = 'Imu 21100', + [0x005c] = 'Imu Raw', + [0x0062] = 'Imu Raw 01', + [0x0006] = 'Imu Init', + [0x000c] = 'Osd General', + [0x000d] = 'Osd Home', + [0x001a] = 'Fdi', + [0x8003] = 'Vincent Debug', + [0x8000] = 'Fly Log', + [0xff00] = 'Sd Logs', + [0xfffe] = 'Svn Info', + [0x0007] = 'Imu Data', + [0x0870] = 'Imu Data 00', + [0x0871] = 'Imu Data 01', + [0x0872] = 'Imu Data 02', + [0x0008] = 'Imu Cali Data', + [0x0009] = 'Sensor Cfg Temp', + [0x000a] = 'Temp Ctl Data', + [0x0880] = 'Temp Ctl Data 00', + [0x0881] = 'Temp Ctl Data 01', + [0x0882] = 'Temp Ctl Data 02', + [0x0014] = 'Pwm Output', + [0x0015] = 'Temp Bias Data', + [0x0016] = 'Temp Cali Data', + [0x0018] = 'App Temp Bias Data', + [0x0019] = 'App Temp Cali Data', + [0x0893] = 'Temp Cali Data 00', + [0x0896] = 'App Temp Cali Data 00', + [0x0894] = 'Temp Cali Data 01', + [0x0897] = 'App Temp Cali Data 01', + [0x0895] = 'Temp Cali Data 02', + [0x0898] = 'App Temp Cali Data 02', + [0x0023] = 'Mpu6500 Raw Data', + [0x0024] = 'Adxl278 Raw Data', + [0x0065] = 'Svo Debug', + [0xcdf0] = 'Uc Monitor', + [0xcdff] = 'Rc Delay', + [0xce02] = 'Taskb Info', + [0xce06] = 'Taska Info', + [0xce08] = 'Taskc Info', + [0xce09] = 'Taskd Info', + [0xcdf6] = 'Rc Replay', + [0xcdf1] = 'Escm', + [0xcdf2] = 'Sweep', + [0x000e] = 'Mvo', + [0x0010] = 'Usonic', + [0xcdef] = 'Console', + [0xffff] = 'Syscfg', + [0x0011] = 'Battery Info', + [0x0017] = 'Special Cmd', + [0x003c] = 'Serial Api Inputs', + [0x0032] = 'Ctrl Vert', + [0x0033] = 'Ctrl Horiz', + [0x0034] = 'Ctrl Atti', + [0x0035] = 'Ctrl Ccpm', + [0x0036] = 'Ctrl Motor', + [0x0096] = 'Wp Curve', + [0x0012] = 'Smart Battery Info', + [0x0028] = 'Airport Limit Data', + [0x0029] = 'Fmu Device Run Time', + [0x002a] = 'Hp Data', + [0x002b] = 'Follow Me Data', + [0x002c] = 'Home Lock', + [0x0013] = 'Imu Data Status', + [0x0046] = 'Aircraft Condition Monitor', + [0x0050] = 'Aircraft Model', + [0x005a] = 'Go Home Info', + [0x001d] = 'New Mvo Feedback', + [0x0064] = 'Svo Avoid Obstacle', + [0xcff1] = 'Rtkdata', + [0x006e] = 'Gear Debug Info', + [0x0066] = 'Svo Ctrl Debug', + [0x00a0] = 'Waypoint Debug', + [0xa000] = 'Battery Unknown', +} + +local function bytearray_to_hexstr(bytes) + s = {} + for i = 0, bytes:len() - 1 do + s[i+1] = string.format("%02X",bytes:get_index(i)) + end + return table.concat(s," ") +end + +-- Flight log - Controller - 0x0000 + +f.controller_g_real_clock = ProtoField.uint32 ("dji_p3_flyrec.controller_g_real_clock", "G Real Clock", base.HEX) +f.controller_g_real_input_channel_command_aileron = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_channel_command_aileron", "G Real Input Channel Command Aileron", base.DEC, nil, nil, "Aileron stick value, -10000..10000") +f.controller_g_real_input_channel_command_elevator = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_channel_command_elevator", "G Real Input Channel Command Elevator", base.DEC, nil, nil, "Elevator stick value, -10000..10000") +f.controller_g_real_input_channel_command_throttle = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_channel_command_throttle", "G Real Input Channel Command Throttle", base.DEC, nil, nil, "Throttle stick value, -10000..10000") +f.controller_g_real_input_channel_command_rudder = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_channel_command_rudder", "G Real Input Channel Command Rudder", base.DEC, nil, nil, "Rudder stick value, -10000..10000") +f.controller_g_real_input_channel_command_mode = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_channel_command_mode", "G Real Input Channel Command Mode", base.DEC) +f.controller_g_real_input_channel_command_ioc = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_channel_command_ioc", "G Real Input Channel Command Ioc", base.DEC) +f.controller_g_real_input_channel_command_go_home = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_channel_command_go_home", "G Real Input Channel Command Go Home", base.DEC) +f.controller_g_real_input_channel_command_d4 = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_channel_command_d4", "G Real Input Channel Command D4", base.DEC) +f.controller_g_real_input_control_core_pitch = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_control_core_pitch", "G Real Input Control Core Pitch", base.DEC, nil, nil, "Pitch stick value, -10000..10000") +f.controller_g_real_input_control_core_roll = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_control_core_roll", "G Real Input Control Core Roll", base.DEC, nil, nil, "Roll stick value, -10000..10000") +f.controller_g_real_input_control_core_alti = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_control_core_alti", "G Real Input Control Core Alti", base.DEC, nil, nil, "Altitude stick value, -10000..10000") +f.controller_g_real_input_control_core_tail = ProtoField.int16 ("dji_p3_flyrec.controller_g_real_input_control_core_tail", "G Real Input Control Core Tail", base.DEC, nil, nil, "Tail/Yaw stick value, -10000..10000") +f.controller_g_real_status_cotrol_command_mode = ProtoField.uint8 ("dji_p3_flyrec.controller_g_real_status_cotrol_command_mode", "G Real Status Cotrol Command Mode", base.HEX) +f.controller_g_real_status_control_real_mode = ProtoField.uint8 ("dji_p3_flyrec.controller_g_real_status_control_real_mode", "G Real Status Control Real Mode", base.HEX) +f.controller_g_real_status_ioc_control_command_mode = ProtoField.uint8 ("dji_p3_flyrec.controller_g_real_status_ioc_control_command_mode", "G Real Status Ioc Control Command Mode", base.HEX) +f.controller_g_real_status_rc_state = ProtoField.uint8 ("dji_p3_flyrec.controller_g_real_status_rc_state", "G Real Status Rc State", base.HEX) +f.controller_g_real_status_motor_status = ProtoField.uint8 ("dji_p3_flyrec.controller_g_real_status_motor_status", "G Real Status Motor Status", base.HEX, nil, nil, "Zero if motors off, 1 if motors running") +f.controller_imu_package_lost_count = ProtoField.uint32 ("dji_p3_flyrec.controller_imu_package_lost_count", "Imu Package Lost Count", base.HEX) +f.controller_g_real_status_main_batery_voltage = ProtoField.uint16 ("dji_p3_flyrec.controller_g_real_status_main_batery_voltage", "G Real Status Main Batery Voltage", base.HEX) +f.controller_imu_temp_real_ctl_out_per = ProtoField.uint8 ("dji_p3_flyrec.controller_imu_temp_real_ctl_out_per", "Imu Temp Real Ctl Out Per", base.HEX) +f.controller_us_fail_flag = ProtoField.uint8 ("dji_p3_flyrec.controller_us_fail_flag", "Us Fail Flag", base.HEX) +f.controller_gps_signal_levels = ProtoField.uint8 ("dji_p3_flyrec.controller_gps_signal_levels", "Gps Signal Levels", base.HEX) +f.controller_gps_ctrl_levels = ProtoField.uint8 ("dji_p3_flyrec.controller_gps_ctrl_levels", "Gps Ctrl Levels", base.HEX) + +local function flightrec_controller_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.controller_g_real_clock, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_g_real_input_channel_command_aileron, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_channel_command_elevator, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_channel_command_throttle, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_channel_command_rudder, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_channel_command_mode, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_channel_command_ioc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_channel_command_go_home, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_channel_command_d4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_control_core_pitch, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_control_core_roll, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_control_core_alti, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_input_control_core_tail, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_g_real_status_cotrol_command_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_g_real_status_control_real_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_g_real_status_ioc_control_command_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_g_real_status_rc_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_g_real_status_motor_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_imu_package_lost_count, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_g_real_status_main_batery_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_imu_temp_real_ctl_out_per, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_us_fail_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_gps_signal_levels, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_gps_ctrl_levels, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 43) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Controller: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Controller: Payload size different than expected") end +end + +-- Flight log - Ofdm Cnt - 0x07cf + +f.ofdm_cnt_recv_total = ProtoField.uint16 ("dji_p3_flyrec.ofdm_cnt_recv_total", "Recv Total", base.HEX) +f.ofdm_cnt_header_error = ProtoField.uint16 ("dji_p3_flyrec.ofdm_cnt_header_error", "Header Error", base.HEX) +f.ofdm_cnt_v1_error = ProtoField.uint16 ("dji_p3_flyrec.ofdm_cnt_v1_error", "V1 Error", base.HEX) +f.ofdm_cnt_v0_error = ProtoField.uint16 ("dji_p3_flyrec.ofdm_cnt_v0_error", "V0 Error", base.HEX) +f.ofdm_cnt_seccuss = ProtoField.uint16 ("dji_p3_flyrec.ofdm_cnt_seccuss", "Seccuss", base.HEX) + +local function flightrec_ofdm_cnt_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ofdm_cnt_recv_total, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ofdm_cnt_header_error, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ofdm_cnt_v1_error, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ofdm_cnt_v0_error, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ofdm_cnt_seccuss, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ofdm Cnt: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ofdm Cnt: Payload size different than expected") end +end + +-- Flight log - Uart Cnt - 0x07d0 + +f.uart_cnt_uart_tx1 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_tx1", "Uart Tx1", base.HEX) +f.uart_cnt_uart_rx1 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_rx1", "Uart Rx1", base.HEX) +f.uart_cnt_uart_tx2 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_tx2", "Uart Tx2", base.HEX) +f.uart_cnt_uart_rx2 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_rx2", "Uart Rx2", base.HEX) +f.uart_cnt_uart_tx3 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_tx3", "Uart Tx3", base.HEX) +f.uart_cnt_uart_rx3 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_rx3", "Uart Rx3", base.HEX) +f.uart_cnt_uart_tx4 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_tx4", "Uart Tx4", base.HEX) +f.uart_cnt_uart_rx4 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_rx4", "Uart Rx4", base.HEX) +f.uart_cnt_uart_tx5 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_tx5", "Uart Tx5", base.HEX) +f.uart_cnt_uart_rx5 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_rx5", "Uart Rx5", base.HEX) +f.uart_cnt_uart_tx6 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_tx6", "Uart Tx6", base.HEX) +f.uart_cnt_uart_rx6 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_rx6", "Uart Rx6", base.HEX) +f.uart_cnt_uart_tx7 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_tx7", "Uart Tx7", base.HEX) +f.uart_cnt_uart_rx7 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_rx7", "Uart Rx7", base.HEX) +f.uart_cnt_uart_tx8 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_tx8", "Uart Tx8", base.HEX) +f.uart_cnt_uart_rx8 = ProtoField.uint16 ("dji_p3_flyrec.uart_cnt_uart_rx8", "Uart Rx8", base.HEX) + +local function flightrec_uart_cnt_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.uart_cnt_uart_tx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_rx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_tx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_rx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_tx3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_rx3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_tx4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_rx4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_tx5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_rx5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_tx6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_rx6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_tx7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_rx7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_tx8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_cnt_uart_rx8, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Uart Cnt: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Uart Cnt: Payload size different than expected") end +end + +-- Flight log - Imu Tail - 0x0002 + +f.imu_tail_raw_w_x = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_w_x", "Raw W X", base.DEC) +f.imu_tail_raw_w_y = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_w_y", "Raw W Y", base.DEC) +f.imu_tail_raw_w_z = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_w_z", "Raw W Z", base.DEC) +f.imu_tail_raw_a_x = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_a_x", "Raw A X", base.DEC) +f.imu_tail_raw_a_y = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_a_y", "Raw A Y", base.DEC) +f.imu_tail_raw_a_z = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_a_z", "Raw A Z", base.DEC) +f.imu_tail_raw_wa_x = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_wa_x", "Raw Wa X", base.DEC) +f.imu_tail_raw_wa_y = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_wa_y", "Raw Wa Y", base.DEC) +f.imu_tail_raw_wa_z = ProtoField.int16 ("dji_p3_flyrec.imu_tail_raw_wa_z", "Raw Wa Z", base.DEC) +f.imu_tail_iir_w_x = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_w_x", "Iir W X", base.DEC) +f.imu_tail_iir_w_y = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_w_y", "Iir W Y", base.DEC) +f.imu_tail_iir_w_z = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_w_z", "Iir W Z", base.DEC) +f.imu_tail_iir_a_x = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_a_x", "Iir A X", base.DEC) +f.imu_tail_iir_a_y = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_a_y", "Iir A Y", base.DEC) +f.imu_tail_iir_a_z = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_a_z", "Iir A Z", base.DEC) +f.imu_tail_iir_wa_x = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_wa_x", "Iir Wa X", base.DEC) +f.imu_tail_iir_wa_y = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_wa_y", "Iir Wa Y", base.DEC) +f.imu_tail_iir_wa_z = ProtoField.int16 ("dji_p3_flyrec.imu_tail_iir_wa_z", "Iir Wa Z", base.DEC) +f.imu_tail_gyro_hf_cnt = ProtoField.uint32 ("dji_p3_flyrec.imu_tail_gyro_hf_cnt", "Gyro Hf Cnt", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") +--f.imu_tail_e_raw_w_x = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_w_x", "E Raw W X", base.NONE, nil, nil, "raw_w_x/1000") +--f.imu_tail_e_raw_w_y = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_w_y", "E Raw W Y", base.NONE, nil, nil, "raw_w_y/1000") +--f.imu_tail_e_raw_w_z = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_w_z", "E Raw W Z", base.NONE, nil, nil, "raw_w_z/1000") +--f.imu_tail_e_raw_a_x = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_a_x", "E Raw A X", base.NONE, nil, nil, "raw_a_x/500") +--f.imu_tail_e_raw_a_y = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_a_y", "E Raw A Y", base.NONE, nil, nil, "raw_a_y/500") +--f.imu_tail_e_raw_a_z = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_a_z", "E Raw A Z", base.NONE, nil, nil, "raw_a_z/500") +--f.imu_tail_e_raw_wa_x = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_wa_x", "E Raw Wa X", base.NONE, nil, nil, "raw_wa_x/100") +--f.imu_tail_e_raw_wa_y = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_wa_y", "E Raw Wa Y", base.NONE, nil, nil, "raw_wa_y/100") +--f.imu_tail_e_raw_wa_z = ProtoField.none ("dji_p3_flyrec.imu_tail_e_raw_wa_z", "E Raw Wa Z", base.NONE, nil, nil, "raw_wa_z/100") +--f.imu_tail_e_iir_w_x = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_w_x", "E Iir W X", base.NONE, nil, nil, "iir_w_x/1000") +--f.imu_tail_e_iir_w_y = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_w_y", "E Iir W Y", base.NONE, nil, nil, "iir_w_y/1000") +--f.imu_tail_e_iir_w_z = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_w_z", "E Iir W Z", base.NONE, nil, nil, "iir_w_z/1000") +--f.imu_tail_e_iir_a_x = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_a_x", "E Iir A X", base.NONE, nil, nil, "iir_a_x/500") +--f.imu_tail_e_iir_a_y = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_a_y", "E Iir A Y", base.NONE, nil, nil, "iir_a_y/500") +--f.imu_tail_e_iir_a_z = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_a_z", "E Iir A Z", base.NONE, nil, nil, "iir_a_z/500") +--f.imu_tail_e_iir_wa_x = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_wa_x", "E Iir Wa X", base.NONE, nil, nil, "iir_wa_x/100") +--f.imu_tail_e_iir_wa_y = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_wa_y", "E Iir Wa Y", base.NONE, nil, nil, "iir_wa_y/100") +--f.imu_tail_e_iir_wa_z = ProtoField.none ("dji_p3_flyrec.imu_tail_e_iir_wa_z", "E Iir Wa Z", base.NONE, nil, nil, "iir_wa_z/100") + +local function flightrec_imu_tail_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_tail_raw_w_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_raw_w_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_raw_w_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_raw_a_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_raw_a_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_raw_a_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_raw_wa_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_raw_wa_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_raw_wa_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_w_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_w_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_w_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_a_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_a_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_a_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_wa_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_wa_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_iir_wa_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_tail_gyro_hf_cnt, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Tail: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Tail: Payload size different than expected") end +end + +-- Flight log - Drv Log - 0xfffa + +f.drv_log_text = ProtoField.string ("dji_p3_flyrec.drv_log_text", "Drv Log", base.ASCII) + +local function flightrec_drv_log_dissector(payload, pinfo, subtree) + local offset = 0 + + local rec_drv_log_text = payload(offset, payload:len() - offset) + subtree:add (f.drv_log_text, rec_drv_log_text) + + pinfo.cols.info = rec_drv_log_text:string():gsub('[^a-zA-Z0-9_:,.[[]]/\\ \t-]','') + +end + +-- Flight log - Asr - 0x0073 + +f.asr_lead = ProtoField.uint32 ("dji_p3_flyrec.asr_lead", "Lead", base.HEX) + +local function flightrec_asr_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.asr_lead, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Asr: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Asr: Payload size different than expected") end +end + +-- Flight log - Imu Atti - 0x0001 + +f.imu_atti_longti = ProtoField.double ("dji_p3_flyrec.imu_atti_longti", "Longti", base.DEC) +f.imu_atti_lati = ProtoField.double ("dji_p3_flyrec.imu_atti_lati", "Lati", base.DEC) +f.imu_atti_alti = ProtoField.float ("dji_p3_flyrec.imu_atti_alti", "Alti", base.DEC) +f.imu_atti_acc_x = ProtoField.float ("dji_p3_flyrec.imu_atti_acc_x", "Acc X", base.DEC) +f.imu_atti_acc_y = ProtoField.float ("dji_p3_flyrec.imu_atti_acc_y", "Acc Y", base.DEC) +f.imu_atti_acc_z = ProtoField.float ("dji_p3_flyrec.imu_atti_acc_z", "Acc Z", base.DEC) +f.imu_atti_gyro_x = ProtoField.float ("dji_p3_flyrec.imu_atti_gyro_x", "Gyro X", base.DEC) +f.imu_atti_gyro_y = ProtoField.float ("dji_p3_flyrec.imu_atti_gyro_y", "Gyro Y", base.DEC) +f.imu_atti_gyro_z = ProtoField.float ("dji_p3_flyrec.imu_atti_gyro_z", "Gyro Z", base.DEC) +f.imu_atti_press = ProtoField.float ("dji_p3_flyrec.imu_atti_press", "Press", base.DEC) +f.imu_atti_q0 = ProtoField.float ("dji_p3_flyrec.imu_atti_q0", "Q0", base.DEC) +f.imu_atti_q1 = ProtoField.float ("dji_p3_flyrec.imu_atti_q1", "Q1", base.DEC) +f.imu_atti_q2 = ProtoField.float ("dji_p3_flyrec.imu_atti_q2", "Q2", base.DEC) +f.imu_atti_q3 = ProtoField.float ("dji_p3_flyrec.imu_atti_q3", "Q3", base.DEC) +f.imu_atti_ag_x = ProtoField.float ("dji_p3_flyrec.imu_atti_ag_x", "Ag X", base.DEC) +f.imu_atti_ag_y = ProtoField.float ("dji_p3_flyrec.imu_atti_ag_y", "Ag Y", base.DEC) +f.imu_atti_ag_z = ProtoField.float ("dji_p3_flyrec.imu_atti_ag_z", "Ag Z", base.DEC) +f.imu_atti_vg_x = ProtoField.float ("dji_p3_flyrec.imu_atti_vg_x", "Vg X", base.DEC) +f.imu_atti_vg_y = ProtoField.float ("dji_p3_flyrec.imu_atti_vg_y", "Vg Y", base.DEC) +f.imu_atti_vg_z = ProtoField.float ("dji_p3_flyrec.imu_atti_vg_z", "Vg Z", base.DEC) +f.imu_atti_gb_x = ProtoField.float ("dji_p3_flyrec.imu_atti_gb_x", "Gb X", base.DEC) +f.imu_atti_gb_y = ProtoField.float ("dji_p3_flyrec.imu_atti_gb_y", "Gb Y", base.DEC) +f.imu_atti_gb_z = ProtoField.float ("dji_p3_flyrec.imu_atti_gb_z", "Gb Z", base.DEC) +f.imu_atti_m_x = ProtoField.int16 ("dji_p3_flyrec.imu_atti_m_x", "M X", base.DEC) +f.imu_atti_m_y = ProtoField.int16 ("dji_p3_flyrec.imu_atti_m_y", "M Y", base.DEC) +f.imu_atti_m_z = ProtoField.int16 ("dji_p3_flyrec.imu_atti_m_z", "M Z", base.DEC) +f.imu_atti_temp_x = ProtoField.int16 ("dji_p3_flyrec.imu_atti_temp_x", "Temp X", base.DEC) +f.imu_atti_temp_y = ProtoField.int16 ("dji_p3_flyrec.imu_atti_temp_y", "Temp Y", base.DEC) +f.imu_atti_temp_z = ProtoField.int16 ("dji_p3_flyrec.imu_atti_temp_z", "Temp Z", base.DEC) +f.imu_atti_sensor_monitor = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_sensor_monitor", "Sensor Monitor", base.HEX) +f.imu_atti_filter_status = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_filter_status", "Filter Status", base.HEX) +f.imu_atti_svn = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_svn", "Svn", base.DEC, nil, nil, "Number of Global Nav System positioning satellites") +f.imu_atti_cnt_atti = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_cnt_atti", "Cnt Atti", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") + +local function flightrec_imu_atti_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_longti, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_lati, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_acc_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_acc_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_acc_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_gyro_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_gyro_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_gyro_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_q0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_q1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_q2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_q3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_ag_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_ag_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_ag_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_vg_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_vg_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_vg_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_gb_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_gb_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_gb_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_m_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_m_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_m_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_temp_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_temp_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_temp_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_sensor_monitor, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_filter_status, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_svn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_cnt_atti, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti: Payload size different than expected") end +end + +-- Flight log - Imu Ex - 0x0003 + +f.imu_ex_vo_vx = ProtoField.float ("dji_p3_flyrec.imu_ex_vo_vx", "Vo Vx", base.DEC) +f.imu_ex_vo_vy = ProtoField.float ("dji_p3_flyrec.imu_ex_vo_vy", "Vo Vy", base.DEC) +f.imu_ex_vo_vz = ProtoField.float ("dji_p3_flyrec.imu_ex_vo_vz", "Vo Vz", base.DEC) +f.imu_ex_vo_px = ProtoField.float ("dji_p3_flyrec.imu_ex_vo_px", "Vo Px", base.DEC) +f.imu_ex_vo_py = ProtoField.float ("dji_p3_flyrec.imu_ex_vo_py", "Vo Py", base.DEC) +f.imu_ex_vo_pz = ProtoField.float ("dji_p3_flyrec.imu_ex_vo_pz", "Vo Pz", base.DEC) +f.imu_ex_us_v = ProtoField.float ("dji_p3_flyrec.imu_ex_us_v", "Us V", base.DEC) +f.imu_ex_us_p = ProtoField.float ("dji_p3_flyrec.imu_ex_us_p", "Us P", base.DEC) +--f.imu_ex_rtk_longti = ProtoField.double ("dji_p3_flyrec.imu_ex_rtk_longti", "Rtk Longti", base.DEC) +--f.imu_ex_rtk_lati = ProtoField.double ("dji_p3_flyrec.imu_ex_rtk_lati", "Rtk Lati", base.DEC) +--f.imu_ex_rtk_alti = ProtoField.float ("dji_p3_flyrec.imu_ex_rtk_alti", "Rtk Alti", base.DEC) +f.imu_ex_vo_flag_navi = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_vo_flag_navi", "Vo Flag Navi", base.HEX) + f.imu_ex_e_vo_flag_navi_vo_vx = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_vo_flag_navi_vo_vx", "E Vo Flag Navi Vo Vx", base.HEX, nil, 0x01, nil) + f.imu_ex_e_vo_flag_navi_vo_vy = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_vo_flag_navi_vo_vy", "E Vo Flag Navi Vo Vy", base.HEX, nil, 0x02, nil) + f.imu_ex_e_vo_flag_navi_vo_vz = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_vo_flag_navi_vo_vz", "E Vo Flag Navi Vo Vz", base.HEX, nil, 0x04, nil) + f.imu_ex_e_vo_flag_navi_vo_px = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_vo_flag_navi_vo_px", "E Vo Flag Navi Vo Px", base.HEX, nil, 0x08, nil) + f.imu_ex_e_vo_flag_navi_vo_py = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_vo_flag_navi_vo_py", "E Vo Flag Navi Vo Py", base.HEX, nil, 0x10, nil) + f.imu_ex_e_vo_flag_navi_vo_pz = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_vo_flag_navi_vo_pz", "E Vo Flag Navi Vo Pz", base.HEX, nil, 0x20, nil) + f.imu_ex_e_vo_flag_navi_us_vz = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_vo_flag_navi_us_vz", "E Vo Flag Navi Us Vz", base.HEX, nil, 0x40, nil) + f.imu_ex_e_vo_flag_navi_us_pz = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_vo_flag_navi_us_pz", "E Vo Flag Navi Us Pz", base.HEX, nil, 0x80, "Relative height flag; 0=Unavailable, 1=Available") +f.imu_ex_imu_err_flag = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_imu_err_flag", "Imu Err Flag", base.HEX) + f.imu_ex_e_imu_err_vg_large = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_imu_err_vg_large", "E Imu Err Vg Large", base.HEX, nil, 0x01, nil) + f.imu_ex_e_imu_err_gps_yaw = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_imu_err_gps_yaw", "E Imu Err Gps Yaw", base.HEX, nil, 0x02, nil) + f.imu_ex_e_imu_err_mag_yaw = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_imu_err_mag_yaw", "E Imu Err Mag Yaw", base.HEX, nil, 0x04, nil) + f.imu_ex_e_imu_err_gps_consist = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_imu_err_gps_consist", "E Imu Err Gps Consist", base.HEX, nil, 0x08, nil) + f.imu_ex_e_imu_err_us_fail = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_imu_err_us_fail", "E Imu Err Us Fail", base.HEX, nil, 0x10, nil) + f.imu_ex_e_imu_init_ok_flag = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_e_imu_init_ok_flag", "E Imu Init Ok Flag", base.HEX, nil, 0x20, nil) +f.imu_ex_vo_flag_rsv = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_vo_flag_rsv", "Vo Flag Rsv", base.HEX) +f.imu_ex_imu_ex_cnt = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_imu_ex_cnt", "Imu Ex Cnt", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") +f.imu_ex_imu_ex_fld28 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_imu_ex_fld28", "Field28", base.HEX) + +local function flightrec_imu_ex_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_vo_vx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_vo_vy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_vo_vz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_vo_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_vo_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_vo_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_us_v, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_us_p, payload(offset, 4)) + offset = offset + 4 + + --subtree:add_le (f.imu_ex_rtk_longti, payload(offset, 8)) + --offset = offset + 8 + + --subtree:add_le (f.imu_ex_rtk_lati, payload(offset, 8)) + --offset = offset + 8 + + --subtree:add_le (f.imu_ex_rtk_alti, payload(offset, 4)) + --offset = offset + 4 + + subtree:add_le (f.imu_ex_vo_flag_navi, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_vo_flag_navi_vo_vx, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_vo_flag_navi_vo_vy, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_vo_flag_navi_vo_vz, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_vo_flag_navi_vo_px, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_vo_flag_navi_vo_py, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_vo_flag_navi_vo_pz, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_vo_flag_navi_us_vz, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_vo_flag_navi_us_pz, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_imu_err_flag, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_imu_err_vg_large, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_imu_err_gps_yaw, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_imu_err_mag_yaw, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_imu_err_gps_consist, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_imu_err_us_fail, payload(offset, 2)) + subtree:add_le (f.imu_ex_e_imu_init_ok_flag, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_vo_flag_rsv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_imu_ex_cnt, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_imu_ex_fld28, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 42) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex: Payload size different than expected") end +end + +-- Flight log - Imu Tail 00 - 0x0820 + +f.imu_tail_00_wa_x_00 = ProtoField.float ("dji_p3_flyrec.imu_tail_00_wa_x_00", "Wa X 00", base.DEC) +f.imu_tail_00_wa_y_00 = ProtoField.float ("dji_p3_flyrec.imu_tail_00_wa_y_00", "Wa Y 00", base.DEC) +f.imu_tail_00_wa_z_00 = ProtoField.float ("dji_p3_flyrec.imu_tail_00_wa_z_00", "Wa Z 00", base.DEC) +f.imu_tail_00_w_x_00 = ProtoField.float ("dji_p3_flyrec.imu_tail_00_w_x_00", "W X 00", base.DEC) +f.imu_tail_00_w_y_00 = ProtoField.float ("dji_p3_flyrec.imu_tail_00_w_y_00", "W Y 00", base.DEC) +f.imu_tail_00_w_z_00 = ProtoField.float ("dji_p3_flyrec.imu_tail_00_w_z_00", "W Z 00", base.DEC) + +local function flightrec_imu_tail_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_tail_00_wa_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_00_wa_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_00_wa_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_00_w_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_00_w_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_00_w_z_00, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Tail 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Tail 00: Payload size different than expected") end +end + +-- Flight log - Imu Atti 00 - 0x0800 + +f.imu_atti_00_longti_00 = ProtoField.double ("dji_p3_flyrec.imu_atti_00_longti_00", "Longti 00", base.DEC) +f.imu_atti_00_lati_00 = ProtoField.double ("dji_p3_flyrec.imu_atti_00_lati_00", "Lati 00", base.DEC) +f.imu_atti_00_alti_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_alti_00", "Alti 00", base.DEC) +f.imu_atti_00_acc_x_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_acc_x_00", "Acc X 00", base.DEC) +f.imu_atti_00_acc_y_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_acc_y_00", "Acc Y 00", base.DEC) +f.imu_atti_00_acc_z_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_acc_z_00", "Acc Z 00", base.DEC) +f.imu_atti_00_gyro_x_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_gyro_x_00", "Gyro X 00", base.DEC) +f.imu_atti_00_gyro_y_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_gyro_y_00", "Gyro Y 00", base.DEC) +f.imu_atti_00_gyro_z_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_gyro_z_00", "Gyro Z 00", base.DEC) +f.imu_atti_00_press_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_press_00", "Press 00", base.DEC) +f.imu_atti_00_q0_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_q0_00", "Q0 00", base.DEC) +f.imu_atti_00_q1_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_q1_00", "Q1 00", base.DEC) +f.imu_atti_00_q2_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_q2_00", "Q2 00", base.DEC) +f.imu_atti_00_q3_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_q3_00", "Q3 00", base.DEC) +f.imu_atti_00_ag_x_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_ag_x_00", "Ag X 00", base.DEC) +f.imu_atti_00_ag_y_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_ag_y_00", "Ag Y 00", base.DEC) +f.imu_atti_00_ag_z_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_ag_z_00", "Ag Z 00", base.DEC) +f.imu_atti_00_vg_x_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_vg_x_00", "Vg X 00", base.DEC) +f.imu_atti_00_vg_y_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_vg_y_00", "Vg Y 00", base.DEC) +f.imu_atti_00_vg_z_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_vg_z_00", "Vg Z 00", base.DEC) +f.imu_atti_00_gb_x_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_gb_x_00", "Gb X 00", base.DEC) +f.imu_atti_00_gb_y_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_gb_y_00", "Gb Y 00", base.DEC) +f.imu_atti_00_gb_z_00 = ProtoField.float ("dji_p3_flyrec.imu_atti_00_gb_z_00", "Gb Z 00", base.DEC) +f.imu_atti_00_m_x_00 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_00_m_x_00", "M X 00", base.DEC) +f.imu_atti_00_m_y_00 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_00_m_y_00", "M Y 00", base.DEC) +f.imu_atti_00_m_z_00 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_00_m_z_00", "M Z 00", base.DEC) +f.imu_atti_00_temp_x_00 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_00_temp_x_00", "Temp X 00", base.DEC) +f.imu_atti_00_temp_y_00 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_00_temp_y_00", "Temp Y 00", base.DEC) +f.imu_atti_00_temp_z_00 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_00_temp_z_00", "Temp Z 00", base.DEC) +f.imu_atti_00_sensor_monitor_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_00_sensor_monitor_00", "Sensor Monitor 00", base.HEX) +f.imu_atti_00_filter_status_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_00_filter_status_00", "Filter Status 00", base.HEX) +f.imu_atti_00_svn_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_00_svn_00", "Svn 00", base.DEC, nil, nil, "Number of Global Nav System positioning satellites") +f.imu_atti_00_cnt_atti_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_00_cnt_atti_00", "Cnt Atti 00", base.HEX) +--f.imu_atti_00_e_mod_m_00 = ProtoField.none ("dji_p3_flyrec.imu_atti_00_e_mod_m_00", "E Mod M 00", base.NONE, nil, nil, "sqrt(m_x_00*m_x_00+m_y_00*m_y_00+m_z_00*m_z_00)") +--f.imu_atti_00_e_pitch_00 = ProtoField.none ("dji_p3_flyrec.imu_atti_00_e_pitch_00", "E Pitch 00", base.NONE, nil, nil, "-asin_x(2*(q1_00*q3_00-q0_00*q2_00))/3.1415926*180") +--f.imu_atti_00_e_roll_00 = ProtoField.none ("dji_p3_flyrec.imu_atti_00_e_roll_00", "E Roll 00", base.NONE, nil, nil, "atan2(2*(q2_00*q3_00+q0_00*q1_00),1-2*(q1_00*q1_00+q2_00*q2_00))/3.1415926*180") +--f.imu_atti_00_e_yaw_00 = ProtoField.none ("dji_p3_flyrec.imu_atti_00_e_yaw_00", "E Yaw 00", base.NONE, nil, nil, "atan2(2*(q1_00*q2_00+q0_00*q3_00),1-2*(q2_00*q2_00+q3_00*q3_00))/3.1415926*180") +--f.imu_atti_00_e_yaw_from_m_00 = ProtoField.none ("dji_p3_flyrec.imu_atti_00_e_yaw_from_m_00", "E Yaw From M 00", base.NONE, nil, nil, "atan2(-(m_y_00*cos(E_roll_00/57.29578)-m_z_00*sin(E_roll_00/57.29578)),m_x_00*cos(E_pitch_00/57.29578)+m_y_00*sin(E_pitch_00/57.29578)*sin(E_roll_00/57.29578)+m_z_00*sin(E_pitch_00/57.29578)*cos(E_roll_00/57.29578))*180/3.14159265") + +local function flightrec_imu_atti_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_00_longti_00, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_00_lati_00, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_00_alti_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_acc_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_acc_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_acc_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_gyro_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_gyro_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_gyro_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_press_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_q0_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_q1_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_q2_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_q3_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_ag_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_ag_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_ag_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_vg_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_vg_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_vg_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_gb_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_gb_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_gb_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_00_m_x_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_m_y_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_m_z_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_temp_x_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_temp_y_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_temp_z_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_sensor_monitor_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_filter_status_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_svn_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_00_cnt_atti_00, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 00: Payload size different than expected") end +end + +-- Flight log - Imu Ex 00 - 0x0810 + +f.imu_ex_00_vo_vx_00 = ProtoField.float ("dji_p3_flyrec.imu_ex_00_vo_vx_00", "Vo Vx 00", base.DEC) +f.imu_ex_00_vo_vy_00 = ProtoField.float ("dji_p3_flyrec.imu_ex_00_vo_vy_00", "Vo Vy 00", base.DEC) +f.imu_ex_00_vo_vz_00 = ProtoField.float ("dji_p3_flyrec.imu_ex_00_vo_vz_00", "Vo Vz 00", base.DEC) +f.imu_ex_00_vo_px_00 = ProtoField.float ("dji_p3_flyrec.imu_ex_00_vo_px_00", "Vo Px 00", base.DEC) +f.imu_ex_00_vo_py_00 = ProtoField.float ("dji_p3_flyrec.imu_ex_00_vo_py_00", "Vo Py 00", base.DEC) +f.imu_ex_00_vo_pz_00 = ProtoField.float ("dji_p3_flyrec.imu_ex_00_vo_pz_00", "Vo Pz 00", base.DEC) +f.imu_ex_00_us_v_00 = ProtoField.float ("dji_p3_flyrec.imu_ex_00_us_v_00", "Us V 00", base.DEC) +f.imu_ex_00_us_p_00 = ProtoField.float ("dji_p3_flyrec.imu_ex_00_us_p_00", "Us P 00", base.DEC, nil, nil, "Relative height; unit:m") +f.imu_ex_00_vo_flag_navi_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_vo_flag_navi_00", "Vo Flag Navi 00", base.HEX) + f.imu_ex_00_e_vo_flag_navi_vo_vx_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_vo_flag_navi_vo_vx_00", "E Vo Flag Navi Vo Vx 00", base.HEX, nil, 0x01, nil) + f.imu_ex_00_e_vo_flag_navi_vo_vy_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_vo_flag_navi_vo_vy_00", "E Vo Flag Navi Vo Vy 00", base.HEX, nil, 0x02, nil) + f.imu_ex_00_e_vo_flag_navi_vo_vz_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_vo_flag_navi_vo_vz_00", "E Vo Flag Navi Vo Vz 00", base.HEX, nil, 0x04, nil) + f.imu_ex_00_e_vo_flag_navi_vo_px_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_vo_flag_navi_vo_px_00", "E Vo Flag Navi Vo Px 00", base.HEX, nil, 0x08, nil) + f.imu_ex_00_e_vo_flag_navi_vo_py_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_vo_flag_navi_vo_py_00", "E Vo Flag Navi Vo Py 00", base.HEX, nil, 0x10, nil) + f.imu_ex_00_e_vo_flag_navi_vo_pz_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_vo_flag_navi_vo_pz_00", "E Vo Flag Navi Vo Pz 00", base.HEX, nil, 0x20, nil) + f.imu_ex_00_e_vo_flag_navi_us_vz_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_vo_flag_navi_us_vz_00", "E Vo Flag Navi Us Vz 00", base.HEX, nil, 0x40, nil) + f.imu_ex_00_e_vo_flag_navi_us_pz_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_vo_flag_navi_us_pz_00", "E Vo Flag Navi Us Pz 00", base.HEX, nil, 0x80, "Relative height flag; 0=Unavailable, 1=Available") +f.imu_ex_00_imu_err_flag_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_imu_err_flag_00", "Imu Err Flag 00", base.HEX) + f.imu_ex_00_e_imu_err_vg_large_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_imu_err_vg_large_00", "E Imu Err Vg Large 00", base.HEX, nil, 0x01, nil) + f.imu_ex_00_e_imu_err_gps_yaw_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_imu_err_gps_yaw_00", "E Imu Err Gps Yaw 00", base.HEX, nil, 0x02, nil) + f.imu_ex_00_e_imu_err_mag_yaw_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_imu_err_mag_yaw_00", "E Imu Err Mag Yaw 00", base.HEX, nil, 0x04, nil) + f.imu_ex_00_e_imu_err_gps_consist_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_imu_err_gps_consist_00", "E Imu Err Gps Consist 00", base.HEX, nil, 0x08, nil) + f.imu_ex_00_e_imu_err_us_fail_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_imu_err_us_fail_00", "E Imu Err Us Fail 00", base.HEX, nil, 0x10, nil) + f.imu_ex_00_e_imu_err_init_ok_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_e_imu_err_init_ok_00", "E Imu Err Init Ok 00", base.HEX, nil, 0x20, nil) +f.imu_ex_00_vo_flag_rsv_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_vo_flag_rsv_00", "Vo Flag Rsv 00", base.HEX) +f.imu_ex_00_imu_ex_cnt_00 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_00_imu_ex_cnt_00", "Imu Ex Cnt 00", base.HEX) + +local function flightrec_imu_ex_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_00_vo_vx_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_00_vo_vy_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_00_vo_vz_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_00_vo_px_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_00_vo_py_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_00_vo_pz_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_00_us_v_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_00_us_p_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_00_vo_flag_navi_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_vo_flag_navi_vo_vx_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_vo_flag_navi_vo_vy_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_vo_flag_navi_vo_vz_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_vo_flag_navi_vo_px_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_vo_flag_navi_vo_py_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_vo_flag_navi_vo_pz_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_vo_flag_navi_us_vz_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_vo_flag_navi_us_pz_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_00_imu_err_flag_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_imu_err_vg_large_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_imu_err_gps_yaw_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_imu_err_mag_yaw_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_imu_err_gps_consist_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_imu_err_us_fail_00, payload(offset, 2)) + subtree:add_le (f.imu_ex_00_e_imu_err_init_ok_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_00_vo_flag_rsv_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_00_imu_ex_cnt_00, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 00: Payload size different than expected") end +end + +-- Flight log - Imu Tail 01 - 0x0821 + +f.imu_tail_01_wa_x_01 = ProtoField.float ("dji_p3_flyrec.imu_tail_01_wa_x_01", "Wa X 01", base.DEC) +f.imu_tail_01_wa_y_01 = ProtoField.float ("dji_p3_flyrec.imu_tail_01_wa_y_01", "Wa Y 01", base.DEC) +f.imu_tail_01_wa_z_01 = ProtoField.float ("dji_p3_flyrec.imu_tail_01_wa_z_01", "Wa Z 01", base.DEC) +f.imu_tail_01_w_x_01 = ProtoField.float ("dji_p3_flyrec.imu_tail_01_w_x_01", "W X 01", base.DEC) +f.imu_tail_01_w_y_01 = ProtoField.float ("dji_p3_flyrec.imu_tail_01_w_y_01", "W Y 01", base.DEC) +f.imu_tail_01_w_z_01 = ProtoField.float ("dji_p3_flyrec.imu_tail_01_w_z_01", "W Z 01", base.DEC) + +local function flightrec_imu_tail_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_tail_01_wa_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_01_wa_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_01_wa_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_01_w_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_01_w_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_01_w_z_01, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Tail 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Tail 01: Payload size different than expected") end +end + +-- Flight log - Imu Atti 01 - 0x0801 + +f.imu_atti_01_longti_01 = ProtoField.double ("dji_p3_flyrec.imu_atti_01_longti_01", "Longti 01", base.DEC) +f.imu_atti_01_lati_01 = ProtoField.double ("dji_p3_flyrec.imu_atti_01_lati_01", "Lati 01", base.DEC) +f.imu_atti_01_alti_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_alti_01", "Alti 01", base.DEC) +f.imu_atti_01_acc_x_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_acc_x_01", "Acc X 01", base.DEC) +f.imu_atti_01_acc_y_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_acc_y_01", "Acc Y 01", base.DEC) +f.imu_atti_01_acc_z_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_acc_z_01", "Acc Z 01", base.DEC) +f.imu_atti_01_gyro_x_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_gyro_x_01", "Gyro X 01", base.DEC) +f.imu_atti_01_gyro_y_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_gyro_y_01", "Gyro Y 01", base.DEC) +f.imu_atti_01_gyro_z_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_gyro_z_01", "Gyro Z 01", base.DEC) +f.imu_atti_01_press_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_press_01", "Press 01", base.DEC) +f.imu_atti_01_q0_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_q0_01", "Q0 01", base.DEC) +f.imu_atti_01_q1_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_q1_01", "Q1 01", base.DEC) +f.imu_atti_01_q2_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_q2_01", "Q2 01", base.DEC) +f.imu_atti_01_q3_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_q3_01", "Q3 01", base.DEC) +f.imu_atti_01_ag_x_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_ag_x_01", "Ag X 01", base.DEC) +f.imu_atti_01_ag_y_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_ag_y_01", "Ag Y 01", base.DEC) +f.imu_atti_01_ag_z_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_ag_z_01", "Ag Z 01", base.DEC) +f.imu_atti_01_vg_x_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_vg_x_01", "Vg X 01", base.DEC) +f.imu_atti_01_vg_y_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_vg_y_01", "Vg Y 01", base.DEC) +f.imu_atti_01_vg_z_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_vg_z_01", "Vg Z 01", base.DEC) +f.imu_atti_01_gb_x_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_gb_x_01", "Gb X 01", base.DEC) +f.imu_atti_01_gb_y_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_gb_y_01", "Gb Y 01", base.DEC) +f.imu_atti_01_gb_z_01 = ProtoField.float ("dji_p3_flyrec.imu_atti_01_gb_z_01", "Gb Z 01", base.DEC) +f.imu_atti_01_m_x_01 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_01_m_x_01", "M X 01", base.DEC) +f.imu_atti_01_m_y_01 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_01_m_y_01", "M Y 01", base.DEC) +f.imu_atti_01_m_z_01 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_01_m_z_01", "M Z 01", base.DEC) +f.imu_atti_01_temp_x_01 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_01_temp_x_01", "Temp X 01", base.DEC) +f.imu_atti_01_temp_y_01 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_01_temp_y_01", "Temp Y 01", base.DEC) +f.imu_atti_01_temp_z_01 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_01_temp_z_01", "Temp Z 01", base.DEC) +f.imu_atti_01_sensor_monitor_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_01_sensor_monitor_01", "Sensor Monitor 01", base.HEX) +f.imu_atti_01_filter_status_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_01_filter_status_01", "Filter Status 01", base.HEX) +f.imu_atti_01_svn_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_01_svn_01", "Svn 01", base.DEC, nil, nil, "Number of Global Nav System positioning satellites") +f.imu_atti_01_cnt_atti_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_01_cnt_atti_01", "Cnt Atti 01", base.HEX) +--f.imu_atti_01_e_pitch_01 = ProtoField.none ("dji_p3_flyrec.imu_atti_01_e_pitch_01", "E Pitch 01", base.NONE, nil, nil, "-asin_x(2*(q1_01*q3_01-q0_01*q2_01))/3.1415926*180") +--f.imu_atti_01_e_roll_01 = ProtoField.none ("dji_p3_flyrec.imu_atti_01_e_roll_01", "E Roll 01", base.NONE, nil, nil, "atan2(2*(q2_01*q3_01+q0_01*q1_01),1-2*(q1_01*q1_01+q2_01*q2_01))/3.1415926*180") +--f.imu_atti_01_e_yaw_01 = ProtoField.none ("dji_p3_flyrec.imu_atti_01_e_yaw_01", "E Yaw 01", base.NONE, nil, nil, "atan2(2*(q1_01*q2_01+q0_01*q3_01),1-2*(q2_01*q2_01+q3_01*q3_01))/3.1415926*180") +--f.imu_atti_01_e_yaw_from_m_01 = ProtoField.none ("dji_p3_flyrec.imu_atti_01_e_yaw_from_m_01", "E Yaw From M 01", base.NONE, nil, nil, "atan2(-(m_y_01*cos(E_roll_01/57.29578)-m_z_01*sin(E_roll_01/57.29578)),m_x_01*cos(E_pitch_01/57.29578)+m_y_01*sin(E_pitch_01/57.29578)*sin(E_roll_01/57.29578)+m_z_01*sin(E_pitch_01/57.29578)*cos(E_roll_01/57.29578))*180/3.14159265") + +local function flightrec_imu_atti_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_01_longti_01, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_01_lati_01, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_01_alti_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_acc_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_acc_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_acc_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_gyro_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_gyro_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_gyro_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_press_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_q0_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_q1_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_q2_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_q3_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_ag_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_ag_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_ag_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_vg_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_vg_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_vg_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_gb_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_gb_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_gb_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_01_m_x_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_m_y_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_m_z_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_temp_x_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_temp_y_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_temp_z_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_sensor_monitor_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_filter_status_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_svn_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_01_cnt_atti_01, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 01: Payload size different than expected") end +end + +-- Flight log - Imu Ex 01 - 0x0811 + +f.imu_ex_01_vo_vx_01 = ProtoField.float ("dji_p3_flyrec.imu_ex_01_vo_vx_01", "Vo Vx 01", base.DEC) +f.imu_ex_01_vo_vy_01 = ProtoField.float ("dji_p3_flyrec.imu_ex_01_vo_vy_01", "Vo Vy 01", base.DEC) +f.imu_ex_01_vo_vz_01 = ProtoField.float ("dji_p3_flyrec.imu_ex_01_vo_vz_01", "Vo Vz 01", base.DEC) +f.imu_ex_01_vo_px_01 = ProtoField.float ("dji_p3_flyrec.imu_ex_01_vo_px_01", "Vo Px 01", base.DEC) +f.imu_ex_01_vo_py_01 = ProtoField.float ("dji_p3_flyrec.imu_ex_01_vo_py_01", "Vo Py 01", base.DEC) +f.imu_ex_01_vo_pz_01 = ProtoField.float ("dji_p3_flyrec.imu_ex_01_vo_pz_01", "Vo Pz 01", base.DEC) +f.imu_ex_01_us_v_01 = ProtoField.float ("dji_p3_flyrec.imu_ex_01_us_v_01", "Us V 01", base.DEC) +f.imu_ex_01_us_p_01 = ProtoField.float ("dji_p3_flyrec.imu_ex_01_us_p_01", "Us P 01", base.DEC) +f.imu_ex_01_vo_flag_navi_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_vo_flag_navi_01", "Vo Flag Navi 01", base.HEX) + f.imu_ex_01_e_vo_flag_navi_vo_vx_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_vo_flag_navi_vo_vx_01", "E Vo Flag Navi Vo Vx 01", base.HEX, nil, 0x01, nil) + f.imu_ex_01_e_vo_flag_navi_vo_vy_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_vo_flag_navi_vo_vy_01", "E Vo Flag Navi Vo Vy 01", base.HEX, nil, 0x02, nil) + f.imu_ex_01_e_vo_flag_navi_vo_vz_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_vo_flag_navi_vo_vz_01", "E Vo Flag Navi Vo Vz 01", base.HEX, nil, 0x04, nil) + f.imu_ex_01_e_vo_flag_navi_vo_px_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_vo_flag_navi_vo_px_01", "E Vo Flag Navi Vo Px 01", base.HEX, nil, 0x08, nil) + f.imu_ex_01_e_vo_flag_navi_vo_py_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_vo_flag_navi_vo_py_01", "E Vo Flag Navi Vo Py 01", base.HEX, nil, 0x10, nil) + f.imu_ex_01_e_vo_flag_navi_vo_pz_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_vo_flag_navi_vo_pz_01", "E Vo Flag Navi Vo Pz 01", base.HEX, nil, 0x20, nil) + f.imu_ex_01_e_vo_flag_navi_us_vz_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_vo_flag_navi_us_vz_01", "E Vo Flag Navi Us Vz 01", base.HEX, nil, 0x40, nil) + f.imu_ex_01_e_vo_flag_navi_us_pz_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_vo_flag_navi_us_pz_01", "E Vo Flag Navi Us Pz 01", base.HEX, nil, 0x80, nil) +f.imu_ex_01_imu_err_flag_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_imu_err_flag_01", "Imu Err Flag 01", base.HEX) + f.imu_ex_01_e_imu_err_vg_large_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_imu_err_vg_large_01", "E Imu Err Vg Large 01", base.HEX, nil, 0x01, nil) + f.imu_ex_01_e_imu_err_gps_yaw_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_imu_err_gps_yaw_01", "E Imu Err Gps Yaw 01", base.HEX, nil, 0x02, nil) + f.imu_ex_01_e_imu_err_mag_yaw_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_imu_err_mag_yaw_01", "E Imu Err Mag Yaw 01", base.HEX, nil, 0x04, nil) + f.imu_ex_01_e_imu_err_gps_consist_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_imu_err_gps_consist_01", "E Imu Err Gps Consist 01", base.HEX, nil, 0x08, nil) + f.imu_ex_01_e_imu_err_us_fail_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_imu_err_us_fail_01", "E Imu Err Us Fail 01", base.HEX, nil, 0x10, nil) + f.imu_ex_01_e_imu_err_init_ok_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_e_imu_err_init_ok_01", "E Imu Err Init Ok 01", base.HEX, nil, 0x20, nil) +f.imu_ex_01_vo_flag_rsv_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_vo_flag_rsv_01", "Vo Flag Rsv 01", base.HEX) +f.imu_ex_01_imu_ex_cnt_01 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_01_imu_ex_cnt_01", "Imu Ex Cnt 01", base.HEX) + +local function flightrec_imu_ex_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_01_vo_vx_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_01_vo_vy_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_01_vo_vz_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_01_vo_px_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_01_vo_py_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_01_vo_pz_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_01_us_v_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_01_us_p_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_01_vo_flag_navi_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_vo_flag_navi_vo_vx_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_vo_flag_navi_vo_vy_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_vo_flag_navi_vo_vz_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_vo_flag_navi_vo_px_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_vo_flag_navi_vo_py_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_vo_flag_navi_vo_pz_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_vo_flag_navi_us_vz_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_vo_flag_navi_us_pz_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_01_imu_err_flag_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_imu_err_vg_large_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_imu_err_gps_yaw_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_imu_err_mag_yaw_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_imu_err_gps_consist_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_imu_err_us_fail_01, payload(offset, 2)) + subtree:add_le (f.imu_ex_01_e_imu_err_init_ok_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_01_vo_flag_rsv_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_01_imu_ex_cnt_01, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 01: Payload size different than expected") end +end + +-- Flight log - Imu Tail 02 - 0x0822 + +f.imu_tail_02_wa_x_02 = ProtoField.float ("dji_p3_flyrec.imu_tail_02_wa_x_02", "Wa X 02", base.DEC) +f.imu_tail_02_wa_y_02 = ProtoField.float ("dji_p3_flyrec.imu_tail_02_wa_y_02", "Wa Y 02", base.DEC) +f.imu_tail_02_wa_z_02 = ProtoField.float ("dji_p3_flyrec.imu_tail_02_wa_z_02", "Wa Z 02", base.DEC) +f.imu_tail_02_w_x_02 = ProtoField.float ("dji_p3_flyrec.imu_tail_02_w_x_02", "W X 02", base.DEC) +f.imu_tail_02_w_y_02 = ProtoField.float ("dji_p3_flyrec.imu_tail_02_w_y_02", "W Y 02", base.DEC) +f.imu_tail_02_w_z_02 = ProtoField.float ("dji_p3_flyrec.imu_tail_02_w_z_02", "W Z 02", base.DEC) + +local function flightrec_imu_tail_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_tail_02_wa_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_02_wa_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_02_wa_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_02_w_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_02_w_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_tail_02_w_z_02, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Tail 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Tail 02: Payload size different than expected") end +end + +-- Flight log - Imu Atti 02 - 0x0802 + +f.imu_atti_02_longtii_02 = ProtoField.double ("dji_p3_flyrec.imu_atti_02_longtii_02", "Longtii 02", base.DEC) +f.imu_atti_02_latii_02 = ProtoField.double ("dji_p3_flyrec.imu_atti_02_latii_02", "Latii 02", base.DEC) +f.imu_atti_02_altii_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_altii_02", "Altii 02", base.DEC) +f.imu_atti_02_acc_x_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_acc_x_02", "Acc X 02", base.DEC) +f.imu_atti_02_acc_y_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_acc_y_02", "Acc Y 02", base.DEC) +f.imu_atti_02_acc_z_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_acc_z_02", "Acc Z 02", base.DEC) +f.imu_atti_02_gyro_x_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_gyro_x_02", "Gyro X 02", base.DEC) +f.imu_atti_02_gyro_y_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_gyro_y_02", "Gyro Y 02", base.DEC) +f.imu_atti_02_gyro_z_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_gyro_z_02", "Gyro Z 02", base.DEC) +f.imu_atti_02_press_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_press_02", "Press 02", base.DEC) +f.imu_atti_02_q0_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_q0_02", "Q0 02", base.DEC) +f.imu_atti_02_q1_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_q1_02", "Q1 02", base.DEC) +f.imu_atti_02_q2_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_q2_02", "Q2 02", base.DEC) +f.imu_atti_02_q3_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_q3_02", "Q3 02", base.DEC) +f.imu_atti_02_ag_x_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_ag_x_02", "Ag X 02", base.DEC) +f.imu_atti_02_ag_y_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_ag_y_02", "Ag Y 02", base.DEC) +f.imu_atti_02_ag_z_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_ag_z_02", "Ag Z 02", base.DEC) +f.imu_atti_02_vg_x_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_vg_x_02", "Vg X 02", base.DEC) +f.imu_atti_02_vg_y_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_vg_y_02", "Vg Y 02", base.DEC) +f.imu_atti_02_vg_z_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_vg_z_02", "Vg Z 02", base.DEC) +f.imu_atti_02_gb_x_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_gb_x_02", "Gb X 02", base.DEC) +f.imu_atti_02_gb_y_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_gb_y_02", "Gb Y 02", base.DEC) +f.imu_atti_02_gb_z_02 = ProtoField.float ("dji_p3_flyrec.imu_atti_02_gb_z_02", "Gb Z 02", base.DEC) +f.imu_atti_02_m_x_02 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_02_m_x_02", "M X 02", base.DEC) +f.imu_atti_02_m_y_02 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_02_m_y_02", "M Y 02", base.DEC) +f.imu_atti_02_m_z_02 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_02_m_z_02", "M Z 02", base.DEC) +f.imu_atti_02_temp_x_02 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_02_temp_x_02", "Temp X 02", base.DEC) +f.imu_atti_02_temp_y_02 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_02_temp_y_02", "Temp Y 02", base.DEC) +f.imu_atti_02_temp_z_02 = ProtoField.int16 ("dji_p3_flyrec.imu_atti_02_temp_z_02", "Temp Z 02", base.DEC) +f.imu_atti_02_sensor_monitor_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_02_sensor_monitor_02", "Sensor Monitor 02", base.HEX) +f.imu_atti_02_filter_status_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_02_filter_status_02", "Filter Status 02", base.HEX) +f.imu_atti_02_svn_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_02_svn_02", "Svn 02", base.DEC, nil, nil, "Number of Global Nav System positioning satellites") +f.imu_atti_02_cnt_atti_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_atti_02_cnt_atti_02", "Cnt Atti 02", base.HEX) +--f.imu_atti_02_e_pitch_02 = ProtoField.none ("dji_p3_flyrec.imu_atti_02_e_pitch_02", "E Pitch 02", base.NONE, nil, nil, "-asin_x(2*(q1_02*q3_02-q0_02*q2_02))/3.1415926*180") +--f.imu_atti_02_e_roll_02 = ProtoField.none ("dji_p3_flyrec.imu_atti_02_e_roll_02", "E Roll 02", base.NONE, nil, nil, "atan2(2*(q2_02*q3_02+q0_02*q1_02),1-2*(q1_02*q1_02+q2_02*q2_02))/3.1415926*180") +--f.imu_atti_02_e_yaw_02 = ProtoField.none ("dji_p3_flyrec.imu_atti_02_e_yaw_02", "E Yaw 02", base.NONE, nil, nil, "atan2(2*(q1_02*q2_02+q0_02*q3_02),1-2*(q2_02*q2_02+q3_02*q3_02))/3.1415926*180") +--f.imu_atti_02_e_yaw_from_m_02 = ProtoField.none ("dji_p3_flyrec.imu_atti_02_e_yaw_from_m_02", "E Yaw From M 02", base.NONE, nil, nil, "atan2(-(m_y_02*cos(E_roll_02/57.29578)-m_z_02*sin(E_roll_02/57.29578)),m_x_02*cos(E_pitch_02/57.29578)+m_y_02*sin(E_pitch_02/57.29578)*sin(E_roll_02/57.29578)+m_z_02*sin(E_pitch_02/57.29578)*cos(E_roll_02/57.29578))*180/3.14159265") + +local function flightrec_imu_atti_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_02_longtii_02, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_02_latii_02, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_02_altii_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_acc_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_acc_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_acc_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_gyro_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_gyro_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_gyro_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_press_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_q0_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_q1_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_q2_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_q3_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_ag_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_ag_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_ag_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_vg_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_vg_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_vg_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_gb_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_gb_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_gb_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_02_m_x_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_m_y_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_m_z_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_temp_x_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_temp_y_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_temp_z_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_sensor_monitor_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_filter_status_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_svn_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_02_cnt_atti_02, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 02: Payload size different than expected") end +end + +-- Flight log - Imu Ex 02 - 0x0812 + +f.imu_ex_02_vo_vx_02 = ProtoField.float ("dji_p3_flyrec.imu_ex_02_vo_vx_02", "Vo Vx 02", base.DEC) +f.imu_ex_02_vo_vy_02 = ProtoField.float ("dji_p3_flyrec.imu_ex_02_vo_vy_02", "Vo Vy 02", base.DEC) +f.imu_ex_02_vo_vz_02 = ProtoField.float ("dji_p3_flyrec.imu_ex_02_vo_vz_02", "Vo Vz 02", base.DEC) +f.imu_ex_02_vo_px_02 = ProtoField.float ("dji_p3_flyrec.imu_ex_02_vo_px_02", "Vo Px 02", base.DEC) +f.imu_ex_02_vo_py_02 = ProtoField.float ("dji_p3_flyrec.imu_ex_02_vo_py_02", "Vo Py 02", base.DEC) +f.imu_ex_02_vo_pz_02 = ProtoField.float ("dji_p3_flyrec.imu_ex_02_vo_pz_02", "Vo Pz 02", base.DEC) +f.imu_ex_02_us_v_02 = ProtoField.float ("dji_p3_flyrec.imu_ex_02_us_v_02", "Us V 02", base.DEC) +f.imu_ex_02_us_p_02 = ProtoField.float ("dji_p3_flyrec.imu_ex_02_us_p_02", "Us P 02", base.DEC) +f.imu_ex_02_vo_flag_navi_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_vo_flag_navi_02", "Vo Flag Navi 02", base.HEX) + f.imu_ex_02_e_vo_flag_navi_vo_vx_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_vo_flag_navi_vo_vx_02", "E Vo Flag Navi Vo Vx 02", base.HEX, nil, 0x01, nil) + f.imu_ex_02_e_vo_flag_navi_vo_vy_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_vo_flag_navi_vo_vy_02", "E Vo Flag Navi Vo Vy 02", base.HEX, nil, 0x02, nil) + f.imu_ex_02_e_vo_flag_navi_vo_vz_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_vo_flag_navi_vo_vz_02", "E Vo Flag Navi Vo Vz 02", base.HEX, nil, 0x04, nil) + f.imu_ex_02_e_vo_flag_navi_vo_px_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_vo_flag_navi_vo_px_02", "E Vo Flag Navi Vo Px 02", base.HEX, nil, 0x08, nil) + f.imu_ex_02_e_vo_flag_navi_vo_py_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_vo_flag_navi_vo_py_02", "E Vo Flag Navi Vo Py 02", base.HEX, nil, 0x10, nil) + f.imu_ex_02_e_vo_flag_navi_vo_pz_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_vo_flag_navi_vo_pz_02", "E Vo Flag Navi Vo Pz 02", base.HEX, nil, 0x20, nil) + f.imu_ex_02_e_vo_flag_navi_us_vz_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_vo_flag_navi_us_vz_02", "E Vo Flag Navi Us Vz 02", base.HEX, nil, 0x40, nil) + f.imu_ex_02_e_vo_flag_navi_us_pz_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_vo_flag_navi_us_pz_02", "E Vo Flag Navi Us Pz 02", base.HEX, nil, 0x80, nil) +f.imu_ex_02_imu_err_flag_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_imu_err_flag_02", "Imu Err Flag 02", base.HEX) + f.imu_ex_02_e_imu_err_vg_large_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_imu_err_vg_large_02", "E Imu Err Vg Large 02", base.HEX, nil, 0x01, nil) + f.imu_ex_02_e_imu_err_gps_yaw_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_imu_err_gps_yaw_02", "E Imu Err Gps Yaw 02", base.HEX, nil, 0x02, nil) + f.imu_ex_02_e_imu_err_mag_yaw_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_imu_err_mag_yaw_02", "E Imu Err Mag Yaw 02", base.HEX, nil, 0x04, nil) + f.imu_ex_02_e_imu_err_gps_consist_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_imu_err_gps_consist_02", "E Imu Err Gps Consist 02", base.HEX, nil, 0x08, nil) + f.imu_ex_02_e_imu_err_us_fail_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_imu_err_us_fail_02", "E Imu Err Us Fail 02", base.HEX, nil, 0x10, nil) + f.imu_ex_02_e_imu_err_init_ok_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_e_imu_err_init_ok_02", "E Imu Err Init Ok 02", base.HEX, nil, 0x20, nil) +f.imu_ex_02_vo_flag_rsv_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_vo_flag_rsv_02", "Vo Flag Rsv 02", base.HEX) +f.imu_ex_02_imu_ex_cnt_02 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_imu_ex_cnt_02", "Imu Ex Cnt 02", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") +f.imu_ex_02_imu_ex_fld28 = ProtoField.uint16 ("dji_p3_flyrec.imu_ex_02_imu_ex_fld28", "Field28", base.HEX) + + +local function flightrec_imu_ex_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_02_vo_vx_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_02_vo_vy_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_02_vo_vz_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_02_vo_px_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_02_vo_py_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_02_vo_pz_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_02_us_v_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_02_us_p_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_02_vo_flag_navi_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_vo_flag_navi_vo_vx_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_vo_flag_navi_vo_vy_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_vo_flag_navi_vo_vz_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_vo_flag_navi_vo_px_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_vo_flag_navi_vo_py_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_vo_flag_navi_vo_pz_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_vo_flag_navi_us_vz_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_vo_flag_navi_us_pz_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_02_imu_err_flag_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_imu_err_vg_large_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_imu_err_gps_yaw_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_imu_err_mag_yaw_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_imu_err_gps_consist_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_imu_err_us_fail_02, payload(offset, 2)) + subtree:add_le (f.imu_ex_02_e_imu_err_init_ok_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_02_vo_flag_rsv_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_02_imu_ex_cnt_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_02_imu_ex_fld28, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 42) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 02: Payload size different than expected") end +end + +-- Flight log - Compass - 0x0004 + +f.compass_magx = ProtoField.int16 ("dji_p3_flyrec.compass_magx", "Mag X", base.DEC) +f.compass_magy = ProtoField.int16 ("dji_p3_flyrec.compass_magy", "Mag Y", base.DEC) +f.compass_magz = ProtoField.int16 ("dji_p3_flyrec.compass_magz", "Mag Z", base.DEC) +f.compass_mag_cnt = ProtoField.uint16 ("dji_p3_flyrec.compass_mag_cnt", "Mag Cnt", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") + +local function flightrec_compass_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_magx, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_magy, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_magz, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_mag_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass: Payload size different than expected") end +end + +-- Flight log - Gps Glns - 0x0005 + +f.gps_glns_gps_date = ProtoField.uint32 ("dji_p3_flyrec.gps_glns_gps_date", "Gps Date", base.DEC) +f.gps_glns_gps_time = ProtoField.uint32 ("dji_p3_flyrec.gps_glns_gps_time", "Gps Time", base.DEC) +f.gps_glns_gps_lon = ProtoField.int32 ("dji_p3_flyrec.gps_glns_gps_lon", "Gps Lon", base.DEC, nil, nil, "degrees; coordinate with 7 digits accuracy after decimal point") +f.gps_glns_gps_lat = ProtoField.int32 ("dji_p3_flyrec.gps_glns_gps_lat", "Gps Lat", base.DEC, nil, nil, "degrees; coordinate with 7 digits accuracy after decimal point") +f.gps_glns_hmsl = ProtoField.int32 ("dji_p3_flyrec.gps_glns_hmsl", "hMSL", base.DEC, nil, nil, "mm; height above mean sea level (height above geoid)") +f.gps_glns_vel_n = ProtoField.float ("dji_p3_flyrec.gps_glns_vel_n", "Vel N", base.DEC) +f.gps_glns_vel_e = ProtoField.float ("dji_p3_flyrec.gps_glns_vel_e", "Vel E", base.DEC) +f.gps_glns_vel_d = ProtoField.float ("dji_p3_flyrec.gps_glns_vel_d", "Vel D", base.DEC) +f.gps_glns_hdop = ProtoField.float ("dji_p3_flyrec.gps_glns_hdop", "HDoP", base.DEC, nil, nil, "horizontal dilution of precision") +f.gps_glns_pdop = ProtoField.float ("dji_p3_flyrec.gps_glns_pdop", "PDoP", base.DEC, nil, nil, "position dilution of precision") +f.gps_glns_gps_fix = ProtoField.float ("dji_p3_flyrec.gps_glns_gps_fix", "GPS Fix", base.DEC) +f.gps_glns_gnss_flag = ProtoField.float ("dji_p3_flyrec.gps_glns_gnss_flag", "GNSS Flag", base.DEC) +f.gps_glns_hacc = ProtoField.float ("dji_p3_flyrec.gps_glns_hacc", "Hacc", base.DEC) +f.gps_glns_sacc = ProtoField.float ("dji_p3_flyrec.gps_glns_sacc", "Sacc", base.DEC) +f.gps_glns_gps_used = ProtoField.uint32 ("dji_p3_flyrec.gps_glns_gps_used", "GPS Used", base.DEC, nil, nil, "Number of GPS satellites") +f.gps_glns_gln_used = ProtoField.uint32 ("dji_p3_flyrec.gps_glns_gln_used", "GLN Used", base.DEC, nil, nil, "Number of GLNS satellites") +f.gps_glns_numsv = ProtoField.uint16 ("dji_p3_flyrec.gps_glns_numsv", "NumSV", base.DEC, nil, nil, "Total number of Global Nav System positioning satellites") +--f.gps_glns_gpsstate = ProtoField.uint16 ("dji_p3_flyrec.gps_glns_gpsstate", "GPS State", base.HEX) +f.gps_glns_gpsglns_cnt = ProtoField.uint16 ("dji_p3_flyrec.gps_glns_gpsglns_cnt", "Gps Glns Count", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") + + +local function flightrec_gps_glns_dissector(payload, pinfo, subtree) + local offset = 0 + + + local gps_date = payload(offset, 4):le_uint() + local ts_year = (gps_date / 10000) + local ts_month = (gps_date / 100) % 100 + local ts_day = (gps_date) % 100 + local gps_date_str = string.format("GPS Date: %d-%02d-%02d", ts_year, ts_month, ts_day) + subtree:add_le (f.gps_glns_gps_date, payload(offset, 4), gps_date, gps_date_str) + offset = offset + 4 + + local gps_time = payload(offset, 4):le_uint() + local ts_hour = (gps_time / 10000) + local ts_min = (gps_time / 100) % 100 + local ts_sec = (gps_time) % 100 + local gps_time_str = string.format("GPS Time: %02d:%02d:%02d", ts_hour, ts_min, ts_sec) + subtree:add_le (f.gps_glns_gps_time, payload(offset, 4), gps_time, gps_time_str) + offset = offset + 4 + + local gps_lon = payload(offset, 4):le_uint() + local gps_lon_str = string.format("GPS Longitude: %.7f", gps_lon / 10000000) + subtree:add_le (f.gps_glns_gps_lon, payload(offset, 4), gps_lon, gps_lon_str) + offset = offset + 4 + + local gps_lat = payload(offset, 4):le_uint() + local gps_lat_str = string.format("GPS Latitude: %.7f", gps_lat / 10000000) + subtree:add_le (f.gps_glns_gps_lat, payload(offset, 4), gps_lat, gps_lat_str) + offset = offset + 4 + + subtree:add_le (f.gps_glns_hmsl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_vel_n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_vel_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_vel_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_hdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_pdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_gps_fix, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_gnss_flag, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_hacc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_sacc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_gps_used, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_gln_used, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_glns_numsv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gps_glns_gpsglns_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Glns: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Glns: Payload size different than expected") end +end + +-- Flight log - Gps Snr - 0x000b + +f.gps_snr_gps_snr1 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr1", "Gps Snr1", base.HEX) +f.gps_snr_gps_snr2 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr2", "Gps Snr2", base.HEX) +f.gps_snr_gps_snr3 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr3", "Gps Snr3", base.HEX) +f.gps_snr_gps_snr4 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr4", "Gps Snr4", base.HEX) +f.gps_snr_gps_snr5 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr5", "Gps Snr5", base.HEX) +f.gps_snr_gps_snr6 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr6", "Gps Snr6", base.HEX) +f.gps_snr_gps_snr7 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr7", "Gps Snr7", base.HEX) +f.gps_snr_gps_snr8 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr8", "Gps Snr8", base.HEX) +f.gps_snr_gps_snr9 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr9", "Gps Snr9", base.HEX) +f.gps_snr_gps_snr10 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr10", "Gps Snr10", base.HEX) +f.gps_snr_gps_snr11 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr11", "Gps Snr11", base.HEX) +f.gps_snr_gps_snr12 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr12", "Gps Snr12", base.HEX) +f.gps_snr_gps_snr13 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr13", "Gps Snr13", base.HEX) +f.gps_snr_gps_snr14 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr14", "Gps Snr14", base.HEX) +f.gps_snr_gps_snr15 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr15", "Gps Snr15", base.HEX) +f.gps_snr_gps_snr16 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr16", "Gps Snr16", base.HEX) +f.gps_snr_gps_snr17 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr17", "Gps Snr17", base.HEX) +f.gps_snr_gps_snr18 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr18", "Gps Snr18", base.HEX) +f.gps_snr_gps_snr19 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr19", "Gps Snr19", base.HEX) +f.gps_snr_gps_snr20 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr20", "Gps Snr20", base.HEX) +f.gps_snr_gps_snr21 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr21", "Gps Snr21", base.HEX) +f.gps_snr_gps_snr22 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr22", "Gps Snr22", base.HEX) +f.gps_snr_gps_snr23 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr23", "Gps Snr23", base.HEX) +f.gps_snr_gps_snr24 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr24", "Gps Snr24", base.HEX) +f.gps_snr_gps_snr25 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr25", "Gps Snr25", base.HEX) +f.gps_snr_gps_snr26 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr26", "Gps Snr26", base.HEX) +f.gps_snr_gps_snr27 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr27", "Gps Snr27", base.HEX) +f.gps_snr_gps_snr28 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr28", "Gps Snr28", base.HEX) +f.gps_snr_gps_snr29 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr29", "Gps Snr29", base.HEX) +f.gps_snr_gps_snr30 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr30", "Gps Snr30", base.HEX) +f.gps_snr_gps_snr31 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr31", "Gps Snr31", base.HEX) +f.gps_snr_gps_snr32 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gps_snr32", "Gps Snr32", base.HEX) +f.gps_snr_gln_snr1 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr1", "Gln Snr1", base.HEX) +f.gps_snr_gln_snr2 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr2", "Gln Snr2", base.HEX) +f.gps_snr_gln_snr3 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr3", "Gln Snr3", base.HEX) +f.gps_snr_gln_snr4 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr4", "Gln Snr4", base.HEX) +f.gps_snr_gln_snr5 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr5", "Gln Snr5", base.HEX) +f.gps_snr_gln_snr6 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr6", "Gln Snr6", base.HEX) +f.gps_snr_gln_snr7 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr7", "Gln Snr7", base.HEX) +f.gps_snr_gln_snr8 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr8", "Gln Snr8", base.HEX) +f.gps_snr_gln_snr9 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr9", "Gln Snr9", base.HEX) +f.gps_snr_gln_snr10 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr10", "Gln Snr10", base.HEX) +f.gps_snr_gln_snr11 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr11", "Gln Snr11", base.HEX) +f.gps_snr_gln_snr12 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr12", "Gln Snr12", base.HEX) +f.gps_snr_gln_snr13 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr13", "Gln Snr13", base.HEX) +f.gps_snr_gln_snr14 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr14", "Gln Snr14", base.HEX) +f.gps_snr_gln_snr15 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr15", "Gln Snr15", base.HEX) +f.gps_snr_gln_snr16 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr16", "Gln Snr16", base.HEX) +f.gps_snr_gln_snr17 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr17", "Gln Snr17", base.HEX) +f.gps_snr_gln_snr18 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr18", "Gln Snr18", base.HEX) +f.gps_snr_gln_snr19 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr19", "Gln Snr19", base.HEX) +f.gps_snr_gln_snr20 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr20", "Gln Snr20", base.HEX) +f.gps_snr_gln_snr21 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr21", "Gln Snr21", base.HEX) +f.gps_snr_gln_snr22 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr22", "Gln Snr22", base.HEX) +f.gps_snr_gln_snr23 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr23", "Gln Snr23", base.HEX) +f.gps_snr_gln_snr24 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr24", "Gln Snr24", base.HEX) +f.gps_snr_gln_snr25 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr25", "Gln Snr25", base.HEX) +f.gps_snr_gln_snr26 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr26", "Gln Snr26", base.HEX) +f.gps_snr_gln_snr27 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr27", "Gln Snr27", base.HEX) +f.gps_snr_gln_snr28 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr28", "Gln Snr28", base.HEX) +f.gps_snr_gln_snr29 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr29", "Gln Snr29", base.HEX) +f.gps_snr_gln_snr30 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr30", "Gln Snr30", base.HEX) +f.gps_snr_gln_snr31 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr31", "Gln Snr31", base.HEX) +f.gps_snr_gln_snr32 = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_snr32", "Gln Snr32", base.HEX) +f.gps_snr_gln_cnt = ProtoField.uint8 ("dji_p3_flyrec.gps_snr_gln_cnt", "Gln Cnt", base.HEX) + +local function flightrec_gps_snr_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gps_snr_gps_snr1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr9, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr10, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr11, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr12, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr13, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr14, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr15, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr16, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr17, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr18, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr19, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr20, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr21, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr22, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr23, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr24, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr25, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr26, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr27, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr28, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr29, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr30, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr31, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gps_snr32, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr9, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr10, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr11, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr12, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr13, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr14, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr15, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr16, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr17, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr18, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr19, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr20, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr21, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr22, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr23, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr24, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr25, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr26, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr27, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr28, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr29, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr30, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr31, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_snr32, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gps_snr_gln_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 65) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Snr: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Snr: Payload size different than expected") end +end + +-- Flight log - Pt3 Gps Snr - 0x0061 + +f.pt3_gps_snr_pt3_gps_snr1 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr1", "Pt3 Gps Snr1", base.HEX) +f.pt3_gps_snr_pt3_gps_snr2 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr2", "Pt3 Gps Snr2", base.HEX) +f.pt3_gps_snr_pt3_gps_snr3 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr3", "Pt3 Gps Snr3", base.HEX) +f.pt3_gps_snr_pt3_gps_snr4 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr4", "Pt3 Gps Snr4", base.HEX) +f.pt3_gps_snr_pt3_gps_snr5 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr5", "Pt3 Gps Snr5", base.HEX) +f.pt3_gps_snr_pt3_gps_snr6 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr6", "Pt3 Gps Snr6", base.HEX) +f.pt3_gps_snr_pt3_gps_snr7 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr7", "Pt3 Gps Snr7", base.HEX) +f.pt3_gps_snr_pt3_gps_snr8 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr8", "Pt3 Gps Snr8", base.HEX) +f.pt3_gps_snr_pt3_gps_snr9 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr9", "Pt3 Gps Snr9", base.HEX) +f.pt3_gps_snr_pt3_gps_snr10 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr10", "Pt3 Gps Snr10", base.HEX) +f.pt3_gps_snr_pt3_gps_snr11 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr11", "Pt3 Gps Snr11", base.HEX) +f.pt3_gps_snr_pt3_gps_snr12 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr12", "Pt3 Gps Snr12", base.HEX) +f.pt3_gps_snr_pt3_gps_snr13 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr13", "Pt3 Gps Snr13", base.HEX) +f.pt3_gps_snr_pt3_gps_snr14 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr14", "Pt3 Gps Snr14", base.HEX) +f.pt3_gps_snr_pt3_gps_snr15 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr15", "Pt3 Gps Snr15", base.HEX) +f.pt3_gps_snr_pt3_gps_snr16 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr16", "Pt3 Gps Snr16", base.HEX) +f.pt3_gps_snr_pt3_gps_snr17 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr17", "Pt3 Gps Snr17", base.HEX) +f.pt3_gps_snr_pt3_gps_snr18 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr18", "Pt3 Gps Snr18", base.HEX) +f.pt3_gps_snr_pt3_gps_snr19 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr19", "Pt3 Gps Snr19", base.HEX) +f.pt3_gps_snr_pt3_gps_snr20 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr20", "Pt3 Gps Snr20", base.HEX) +f.pt3_gps_snr_pt3_gps_snr21 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr21", "Pt3 Gps Snr21", base.HEX) +f.pt3_gps_snr_pt3_gps_snr22 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr22", "Pt3 Gps Snr22", base.HEX) +f.pt3_gps_snr_pt3_gps_snr23 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr23", "Pt3 Gps Snr23", base.HEX) +f.pt3_gps_snr_pt3_gps_snr24 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr24", "Pt3 Gps Snr24", base.HEX) +f.pt3_gps_snr_pt3_gps_snr25 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr25", "Pt3 Gps Snr25", base.HEX) +f.pt3_gps_snr_pt3_gps_snr26 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr26", "Pt3 Gps Snr26", base.HEX) +f.pt3_gps_snr_pt3_gps_snr27 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr27", "Pt3 Gps Snr27", base.HEX) +f.pt3_gps_snr_pt3_gps_snr28 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr28", "Pt3 Gps Snr28", base.HEX) +f.pt3_gps_snr_pt3_gps_snr29 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr29", "Pt3 Gps Snr29", base.HEX) +f.pt3_gps_snr_pt3_gps_snr30 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr30", "Pt3 Gps Snr30", base.HEX) +f.pt3_gps_snr_pt3_gps_snr31 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr31", "Pt3 Gps Snr31", base.HEX) +f.pt3_gps_snr_pt3_gps_snr32 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gps_snr32", "Pt3 Gps Snr32", base.HEX) +f.pt3_gps_snr_pt3_gln_snr1 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr1", "Pt3 Gln Snr1", base.HEX) +f.pt3_gps_snr_pt3_gln_snr2 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr2", "Pt3 Gln Snr2", base.HEX) +f.pt3_gps_snr_pt3_gln_snr3 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr3", "Pt3 Gln Snr3", base.HEX) +f.pt3_gps_snr_pt3_gln_snr4 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr4", "Pt3 Gln Snr4", base.HEX) +f.pt3_gps_snr_pt3_gln_snr5 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr5", "Pt3 Gln Snr5", base.HEX) +f.pt3_gps_snr_pt3_gln_snr6 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr6", "Pt3 Gln Snr6", base.HEX) +f.pt3_gps_snr_pt3_gln_snr7 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr7", "Pt3 Gln Snr7", base.HEX) +f.pt3_gps_snr_pt3_gln_snr8 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr8", "Pt3 Gln Snr8", base.HEX) +f.pt3_gps_snr_pt3_gln_snr9 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr9", "Pt3 Gln Snr9", base.HEX) +f.pt3_gps_snr_pt3_gln_snr10 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr10", "Pt3 Gln Snr10", base.HEX) +f.pt3_gps_snr_pt3_gln_snr11 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr11", "Pt3 Gln Snr11", base.HEX) +f.pt3_gps_snr_pt3_gln_snr12 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr12", "Pt3 Gln Snr12", base.HEX) +f.pt3_gps_snr_pt3_gln_snr13 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr13", "Pt3 Gln Snr13", base.HEX) +f.pt3_gps_snr_pt3_gln_snr14 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr14", "Pt3 Gln Snr14", base.HEX) +f.pt3_gps_snr_pt3_gln_snr15 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr15", "Pt3 Gln Snr15", base.HEX) +f.pt3_gps_snr_pt3_gln_snr16 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr16", "Pt3 Gln Snr16", base.HEX) +f.pt3_gps_snr_pt3_gln_snr17 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr17", "Pt3 Gln Snr17", base.HEX) +f.pt3_gps_snr_pt3_gln_snr18 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr18", "Pt3 Gln Snr18", base.HEX) +f.pt3_gps_snr_pt3_gln_snr19 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr19", "Pt3 Gln Snr19", base.HEX) +f.pt3_gps_snr_pt3_gln_snr20 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr20", "Pt3 Gln Snr20", base.HEX) +f.pt3_gps_snr_pt3_gln_snr21 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr21", "Pt3 Gln Snr21", base.HEX) +f.pt3_gps_snr_pt3_gln_snr22 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr22", "Pt3 Gln Snr22", base.HEX) +f.pt3_gps_snr_pt3_gln_snr23 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr23", "Pt3 Gln Snr23", base.HEX) +f.pt3_gps_snr_pt3_gln_snr24 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr24", "Pt3 Gln Snr24", base.HEX) +f.pt3_gps_snr_pt3_gln_snr25 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr25", "Pt3 Gln Snr25", base.HEX) +f.pt3_gps_snr_pt3_gln_snr26 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr26", "Pt3 Gln Snr26", base.HEX) +f.pt3_gps_snr_pt3_gln_snr27 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr27", "Pt3 Gln Snr27", base.HEX) +f.pt3_gps_snr_pt3_gln_snr28 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr28", "Pt3 Gln Snr28", base.HEX) +f.pt3_gps_snr_pt3_gln_snr29 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr29", "Pt3 Gln Snr29", base.HEX) +f.pt3_gps_snr_pt3_gln_snr30 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr30", "Pt3 Gln Snr30", base.HEX) +f.pt3_gps_snr_pt3_gln_snr31 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr31", "Pt3 Gln Snr31", base.HEX) +f.pt3_gps_snr_pt3_gln_snr32 = ProtoField.uint8 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_snr32", "Pt3 Gln Snr32", base.HEX) +f.pt3_gps_snr_pt3_gln_cnt = ProtoField.uint16 ("dji_p3_flyrec.pt3_gps_snr_pt3_gln_cnt", "Pt3 Gln Cnt", base.HEX, nil, nil, "Sequence counter increased each time the packet of this type is prepared") + +local function flightrec_pt3_gps_snr_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr9, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr10, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr11, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr12, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr13, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr14, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr15, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr16, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr17, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr18, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr19, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr20, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr21, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr22, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr23, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr24, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr25, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr26, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr27, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr28, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr29, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr30, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr31, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gps_snr32, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr9, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr10, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr11, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr12, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr13, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr14, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr15, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr16, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr17, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr18, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr19, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr20, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr21, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr22, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr23, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr24, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr25, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr26, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr27, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr28, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr29, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr30, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr31, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_snr32, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.pt3_gps_snr_pt3_gln_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 66) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Pt3 Gps Snr: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Pt3 Gps Snr: Payload size different than expected") end +end + +-- Flight log - Imu 21100 - 0x005b + +f.imu_21100_gyro_x_21100 = ProtoField.int16 ("dji_p3_flyrec.imu_21100_gyro_x_21100", "Gyro X 21100", base.DEC) +f.imu_21100_gyro_y_21100 = ProtoField.int16 ("dji_p3_flyrec.imu_21100_gyro_y_21100", "Gyro Y 21100", base.DEC) +f.imu_21100_gyro_z_21100 = ProtoField.int16 ("dji_p3_flyrec.imu_21100_gyro_z_21100", "Gyro Z 21100", base.DEC) +f.imu_21100_acc_x_21100 = ProtoField.int16 ("dji_p3_flyrec.imu_21100_acc_x_21100", "Acc X 21100", base.DEC) +f.imu_21100_acc_y_21100 = ProtoField.int16 ("dji_p3_flyrec.imu_21100_acc_y_21100", "Acc Y 21100", base.DEC) +f.imu_21100_acc_z_21100 = ProtoField.int16 ("dji_p3_flyrec.imu_21100_acc_z_21100", "Acc Z 21100", base.DEC) +f.imu_21100_cnt_21100 = ProtoField.uint32 ("dji_p3_flyrec.imu_21100_cnt_21100", "Cnt 21100", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") + +local function flightrec_imu_21100_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_21100_gyro_x_21100, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_21100_gyro_y_21100, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_21100_gyro_z_21100, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_21100_acc_x_21100, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_21100_acc_y_21100, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_21100_acc_z_21100, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_21100_cnt_21100, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu 21100: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu 21100: Payload size different than expected") end +end + +-- Flight log - Imu Raw - 0x005c + +f.imu_raw_gyro_x_used = ProtoField.int16 ("dji_p3_flyrec.imu_raw_gyro_x_used", "Gyro X Used", base.DEC) +f.imu_raw_gyro_y_used = ProtoField.int16 ("dji_p3_flyrec.imu_raw_gyro_y_used", "Gyro Y Used", base.DEC) +f.imu_raw_gyro_z_used = ProtoField.int16 ("dji_p3_flyrec.imu_raw_gyro_z_used", "Gyro Z Used", base.DEC) +f.imu_raw_acc_x_used = ProtoField.int16 ("dji_p3_flyrec.imu_raw_acc_x_used", "Acc X Used", base.DEC) +f.imu_raw_acc_y_used = ProtoField.int16 ("dji_p3_flyrec.imu_raw_acc_y_used", "Acc Y Used", base.DEC) +f.imu_raw_acc_z_used = ProtoField.int16 ("dji_p3_flyrec.imu_raw_acc_z_used", "Acc Z Used", base.DEC) +f.imu_raw_gyro_x_unused = ProtoField.int16 ("dji_p3_flyrec.imu_raw_gyro_x_unused", "Gyro X Unused", base.DEC) +f.imu_raw_gyro_y_unused = ProtoField.int16 ("dji_p3_flyrec.imu_raw_gyro_y_unused", "Gyro Y Unused", base.DEC) +f.imu_raw_gyro_z_unused = ProtoField.int16 ("dji_p3_flyrec.imu_raw_gyro_z_unused", "Gyro Z Unused", base.DEC) +f.imu_raw_acc_x_unused = ProtoField.int16 ("dji_p3_flyrec.imu_raw_acc_x_unused", "Acc X Unused", base.DEC) +f.imu_raw_acc_y_unused = ProtoField.int16 ("dji_p3_flyrec.imu_raw_acc_y_unused", "Acc Y Unused", base.DEC) +f.imu_raw_acc_z_unused = ProtoField.int16 ("dji_p3_flyrec.imu_raw_acc_z_unused", "Acc Z Unused", base.DEC) +f.imu_raw_xxxxcnt = ProtoField.int32 ("dji_p3_flyrec.imu_raw_xxxxcnt", "Xxxxcnt", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") +--f.imu_raw_xxxxcnt = ProtoField.int16 ("dji_p3_flyrec.imu_raw_xxxxcnt", "Xxxxcnt", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") +--f.imu_raw_xxbaro = ProtoField.int16 ("dji_p3_flyrec.imu_raw_xxbaro", "Xxbaro", base.DEC) +--f.imu_raw_xxbaro_temp = ProtoField.int16 ("dji_p3_flyrec.imu_raw_xxbaro_temp", "Xxbaro Temp", base.DEC) + +local function flightrec_imu_raw_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_raw_gyro_x_used, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_gyro_y_used, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_gyro_z_used, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_acc_x_used, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_acc_y_used, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_acc_z_used, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_gyro_x_unused, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_gyro_y_unused, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_gyro_z_unused, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_acc_x_unused, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_acc_y_unused, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_acc_z_unused, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_raw_xxxxcnt, payload(offset, 4)) + offset = offset + 4 + + --subtree:add_le (f.imu_raw_xxbaro, payload(offset, 2)) + --offset = offset + 2 + + --subtree:add_le (f.imu_raw_xxbaro_temp, payload(offset, 2)) + --offset = offset + 2 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Raw: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Raw: Payload size different than expected") end +end + +-- Flight log - Imu Init - 0x0006 + +f.imu_init_imu_offset_x = ProtoField.float ("dji_p3_flyrec.imu_init_imu_offset_x", "Imu Offset X", base.DEC) +f.imu_init_imu_offset_y = ProtoField.float ("dji_p3_flyrec.imu_init_imu_offset_y", "Imu Offset Y", base.DEC) +f.imu_init_imu_offset_z = ProtoField.float ("dji_p3_flyrec.imu_init_imu_offset_z", "Imu Offset Z", base.DEC) +f.imu_init_gps_offset_x = ProtoField.float ("dji_p3_flyrec.imu_init_gps_offset_x", "Gps Offset X", base.DEC) +f.imu_init_gps_offset_y = ProtoField.float ("dji_p3_flyrec.imu_init_gps_offset_y", "Gps Offset Y", base.DEC) +f.imu_init_gps_offset_z = ProtoField.float ("dji_p3_flyrec.imu_init_gps_offset_z", "Gps Offset Z", base.DEC) +f.imu_init_imu_dir = ProtoField.uint16 ("dji_p3_flyrec.imu_init_imu_dir", "Imu Dir", base.HEX, nil, nil, "equal to flyc param g_real.config.imu_gps.imu_dir") +f.imu_init_imu_key = ProtoField.uint8 ("dji_p3_flyrec.imu_init_imu_key", "Imu Key", base.HEX, nil, nil, "on P3, always zero; key for encrypted Imu packets") +f.imu_init_o_sw = ProtoField.uint8 ("dji_p3_flyrec.imu_init_o_sw", "O Sw", base.HEX, nil, nil, "on P3, always zero") +f.imu_init_mag_bias_x = ProtoField.float ("dji_p3_flyrec.imu_init_mag_bias_x", "Mag Bias X", base.DEC) +f.imu_init_mag_bias_y = ProtoField.float ("dji_p3_flyrec.imu_init_mag_bias_y", "Mag Bias Y", base.DEC) +f.imu_init_mag_bias_z = ProtoField.float ("dji_p3_flyrec.imu_init_mag_bias_z", "Mag Bias Z", base.DEC) +f.imu_init_mag_scale_x = ProtoField.float ("dji_p3_flyrec.imu_init_mag_scale_x", "Mag Scale X", base.DEC) +f.imu_init_mag_scale_y = ProtoField.float ("dji_p3_flyrec.imu_init_mag_scale_y", "Mag Scale Y", base.DEC) +f.imu_init_mag_scale_z = ProtoField.float ("dji_p3_flyrec.imu_init_mag_scale_z", "Mag Scale Z", base.DEC) +f.imu_init_init_counter = ProtoField.uint16 ("dji_p3_flyrec.imu_init_init_counter", "Init Counter", base.HEX) + +local function flightrec_imu_init_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_init_imu_offset_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_imu_offset_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_imu_offset_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_gps_offset_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_gps_offset_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_gps_offset_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_imu_dir, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_init_imu_key, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.imu_init_o_sw, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.imu_init_mag_bias_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_mag_bias_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_mag_bias_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_mag_scale_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_mag_scale_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_mag_scale_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_init_init_counter, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 54) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Init: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Init: Payload size different than expected") end +end + +-- Flight log - Osd General - 0x000c, identical to UART packet set=0x03 cmd=0x43 + +local REC_OSD_GENERAL_MODE1_ENUM = { + [0]="Manual", + [1]="Atti", + [2]="Atti_CL", + [3]="Atti_Hover", + [4]="Hover", + [5]="GPS_Blake", + [6]="GPS_Atti", + [7]="GPS_CL", + [8]="GPS_HomeLock", + [9]="GPS_HotPoint", + [10]="AssitedTakeoff", + [11]="AutoTakeoff", + [12]="AutoLanding", + [13]="AttiLangding", + [14]="NaviGo", + [15]="GoHome", + [16]="ClickGo", + [17]="Joystick", + [23]="Atti_Limited", + [24]="GPS_Atti_Limited", + [25]="NaviMissionFollow", + [26]="NaviSubMode_Tracking", + [27]="NaviSubMode_Pointing", + [28]="PANO", + [29]="Farming", + [30]="FPV", + [31]="SPORT", + [32]="NOVICE", + [33]="FORCE_LANDING", + [35]="TERRAIN_TRACKING", + [36]="NAVI_ADV_GOHOME", + [37]="NAVI_ADV_LANDING", + [38]="TRIPOD_GPS", + [39]="TRACK_HEADLOCK", + [43]="GENTLE_GPS", + [100]="OTHER", +} + +local REC_OSD_GENERAL_COMMAND_ENUM = { + [1]="AUTO_FLY", + [2]="AUTO_LANDING", + [3]="HOMEPOINT_NOW", + [4]="HOMEPOINT_HOT", + [5]="HOMEPOINT_LOC", + [6]="GOHOME", + [7]="START_MOTOR", + [8]="STOP_MOTOR", + [9]="Calibration", + [10]="DeformProtecClose", + [11]="DeformProtecOpen", + [12]="DropGohome", + [13]="DropTakeOff", + [14]="DropLanding", + [15]="DynamicHomePointOpen", + [16]="DynamicHomePointClose", + [17]="FollowFunctioonOpen", + [18]="FollowFunctionClose", + [19]="IOCOpen", + [20]="IOCClose", + [21]="DropCalibration", + [22]="PackMode", + [23]="UnPackMode", + [24]="EnterManaualMode", + [25]="StopDeform", + [28]="DownDeform", + [29]="UpDeform", + [30]="ForceLanding", + [31]="ForceLanding2", + [100]="OTHER", +} + +local REC_OSD_GENERAL_BATT_TYPE_ENUM = { + [0]="Unknown", + [1]="NonSmart", + [2]="Smart", +} + +local REC_OSD_GENERAL_GOHOME_STATE_ENUM = { + [0]="STANDBY", + [1]="PREASCENDING", + [2]="ALIGN", + [3]="ASCENDING", + [4]="CRUISE", + [5]="BRAKING", + [6]="BYPASSING", + [7]="OTHER", +} + +local REC_OSD_GENERAL_GOHOME_REASON_ENUM = { + [0]="NONE", + [1]="WARNING_POWER_GOHOME", + [2]="WARNING_POWER_LANDING", + [3]="SMART_POWER_GOHOME", + [4]="SMART_POWER_LANDING", + [5]="LOW_VOLTAGE_LANDING", + [6]="LOW_VOLTAGE_GOHOME", + [7]="SERIOUS_LOW_VOLTAGE_LANDING", + [8]="RC_ONEKEY_GOHOME", + [9]="RC_ASSISTANT_TAKEOFF", + [10]="RC_AUTO_TAKEOFF", + [11]="RC_AUTO_LANDING", + [12]="APP_AUTO_GOHOME", + [13]="APP_AUTO_LANDING", + [14]="APP_AUTO_TAKEOFF", + [15]="OUTOF_CONTROL_GOHOME", + [16]="API_AUTO_TAKEOFF", + [17]="API_AUTO_LANDING", + [18]="API_AUTO_GOHOME", + [19]="AVOID_GROUND_LANDING", + [20]="AIRPORT_AVOID_LANDING", + [21]="TOO_CLOSE_GOHOME_LANDING", + [22]="TOO_FAR_GOHOME_LANDING", + [23]="APP_WP_MISSION", + [24]="WP_AUTO_TAKEOFF", + [25]="GOHOME_AVOID", + [26]="GOHOME_FINISH", + [27]="VERT_LOW_LIMIT_LANDING", + [28]="BATTERY_FORCE_LANDING", + [29]="MC_PROTECT_GOHOME", +} + +local REC_OSD_GENERAL_START_FAIL_REASON_ENUM = { + [0x00] = 'Allow start', + [0x01] = 'Compass error', + [0x02] = 'Assistant protected', + [0x03] = 'Device lock protect', + [0x04] = 'Off radius limit landed', -- aka Distance Limit + [0x05] = 'IMU need adv-calib', + [0x06] = 'IMU SN error', + [0x07] = 'Temperature cal not ready', -- aka IMU Warning + [0x08] = 'Compass calibration in progress', + [0x09] = 'Attitude error', + [0x0a] = 'Novice mode without gps', -- aka Novice Protected + [0x0b] = 'Battery cell error stop motor', + [0x0c] = 'Battery communite error stop motor', + [0x0d] = 'Battery voltage very low stop motor', + [0x0e] = 'Battery below user low land level stop motor', -- aka Serious Low Power + [0x0f] = 'Battery main vol low stop motor', + [0x10] = 'Battery temp and vol low stop motor', + [0x11] = 'Battery smart low land stop motor', + [0x12] = 'Battery not ready stop motor', + [0x13] = 'May run simulator', -- aka Simulator Mode + [0x14] = 'Gear pack mode', + [0x15] = 'Atti limit', -- aka Attitude Abnormal + [0x16] = 'Product not activation, stop motor', + [0x17] = 'In fly limit area, need stop motor', -- aka Fly Forbidden Error + [0x18] = 'Bias limit', + [0x19] = 'ESC error', + [0x1a] = 'IMU is initing', + [0x1b] = 'System upgrade, stop motor', + [0x1c] = 'Have run simulator, please restart', -- aka Simulator Started + [0x1d] = 'IMU cali in progress', + [0x1e] = 'Too large tilt angle when auto take off, stop motor', -- aka Atti Angle Over + [0x1f] = 'Gyroscope is stuck', + [0x20] = 'Accel is stuck', + [0x21] = 'Compass is stuck', + [0x22] = 'Pressure sensor is stuck', + [0x23] = 'Pressure read is negative', + [0x24] = 'Compass mod is huge', + [0x25] = 'Gyro bias is large', + [0x26] = 'Accel bias is large', + [0x27] = 'Compass noise is large', + [0x28] = 'Pressure noise is large', -- aka Barometer Noise Big + [0x29] = 'SN invalid', + [0x2a] = 'Pressure slope is large', + [0x2b] = 'Ahrs error is large', + [0x2c] = 'Flash operating', + [0x2d] = 'GPS disconnect', + [0x2e] = 'Out of whitelist area', + [0x2f] = 'SD Card Exception', + [0x3d] = 'IMU No connection', + [0x3e] = 'RC Calibration', + [0x3f] = 'RC Calibration Exception', + [0x40] = 'RC Calibration Unfinished', + [0x41] = 'RC Calibration Exception2', + [0x42] = 'RC Calibration Exception3', + [0x43] = 'Aircraft Type Mismatch', + [0x44] = 'Found Unfinished Module', + [0x46] = 'Cyro Abnormal', + [0x47] = 'Baro Abnormal', + [0x48] = 'Compass Abnormal', + [0x49] = 'GPS Abnormal', + [0x4a] = 'NS Abnormal', + [0x4b] = 'Topology Abnormal', + [0x4c] = 'RC Need Cali', + [0x4d] = 'Invalid Float', + [0x4e] = 'M600 Bat Too Little', + [0x4f] = 'M600 Bat Auth Err', + [0x50] = 'M600 Bat Comm Err', + [0x51] = 'M600 Bat Dif Volt Large 1', + [0x52] = 'M600 Bat Dif Volt Large 2', + [0x53] = 'Invalid Version', + [0x54] = 'Gimbal Gyro Abnormal', + [0x55] = 'Gimbal ESC Pitch Non Data', + [0x56] = 'Gimbal ESC Roll No Data', + [0x57] = 'Gimbal ESC Yaw No Data', + [0x58] = 'Gimbal Firm Is Updating', + [0x59] = 'Gimbal Disorder', + [0x5a] = 'Gimbal Pitch Shock', + [0x5b] = 'Gimbal Roll Shock', + [0x5c] = 'Gimbal Yaw Shock', + [0x5d] = 'IMU Calibration Finished', + [0x5e] = 'Takeoff Rollover', + [0x5f] = 'Motor Stuck', + [0x60] = 'Motor Unbalanced', + [0x61] = 'Motor Less Paddle', + [0x62] = 'Motor Start Error', + [0x63] = 'Motor Auto Takeoff Fail', + [0x65] = 'Bat Version Error', + [0x66] = 'RTK Bad Signal', + [0x67] = 'RTK Deviation Error', + [0x70] = 'ESC Calibrating', + [0x71] = 'GPS Sign Invalid', + [0x72] = 'Gimbal Is Calibrating', + [0x73] = 'Lock By App', + [0x74] = 'Start Fly Height Error', + [0x75] = 'Esc Version Not Match', + [0x76] = 'Imu Ori Not Match', + [0x77] = 'Stop By App', + [0x78] = 'Compass Imu Ori Not Match', + [0x7a] = 'Esc Echoing', + [0x7b] = 'Battery Over Temperature', + [0x7c] = 'Battery Install Error', + [0x7d] = 'Be Impact', + [0x7f] = 'Crash', + [0x81] = 'Low Version Of Battery', + [0x82] = 'Voltage Of Battery Is Too High', + [0x83] = 'Battery Embed Error', + [0x84] = 'Cooling Fan Exception', + [0x88] = 'RC Throttle Is Not In Middle', + [0xff] = 'Remote Usb Connected', -- Would be bad to take off when a cable is plugged into AC + [0x100]= 'Other', +} + +local REC_OSD_GENERAL_GPS_STATE_ENUM = { + [0]="ALREADY", + [1]="FORBIN", + [2]="GPSNUM_NONENOUGH", + [3]="GPS_HDOP_LARGE", + [4]="GPS_POSITION_NONMATCH", + [5]="SPEED_ERROR_LARGE", + [6]="YAW_ERROR_LARGE", + [7]="COMPASS_ERROR_LARGE", + [8]="UNKNOWN", +} + +local REC_OSD_GENERAL_PRODUCT_TYPE_ENUM = { + [0]="Unknown", + [1]="Inspire", + [2]="P3S/P3X", + [3]="P3X", + [4]="P3C", + [5]="OpenFrame", + [6]="ACEONE", + [7]="WKM", + [8]="NAZA", + [9]="A2", + [10]="A3", + [11]="P4", + [14]="PM820", + [15]="P34K", + [16]="wm220", + [17]="Orange2", + [18]="Pomato", + [20]="N3", + [255]="NoFlyc", + [100]="None", +} + +local REC_OSD_GENERAL_IMU_INIT_FAIL_RESON_ENUM = { + [0]="None/MonitorError", + [1]="ColletingData", + [2]="GyroDead", + [3]="AcceDead", + [4]="CompassDead", + [5]="BarometerDead", + [6]="BarometerNegative", + [7]="CompassModTooLarge", + [8]="GyroBiasTooLarge", + [9]="AcceBiasTooLarge", + [10]="CompassNoiseTooLarge", + [11]="BarometerNoiseTooLarge", + [12]="WaitingMcStationary", + [13]="AcceMoveTooLarge", + [14]="McHeaderMoved", + [15]="McVirbrated", + [100]="None", +} + +f.osd_general_longtitude = ProtoField.double ("dji_p3_flyrec.osd_general_longtitude", "Longtitude", base.DEC) +f.osd_general_latitude = ProtoField.double ("dji_p3_flyrec.osd_general_latitude", "Latitude", base.DEC) +f.osd_general_relative_height = ProtoField.int16 ("dji_p3_flyrec.osd_general_relative_height", "Relative Height", base.DEC, nil, nil, "0.1m, altitude to ground") +f.osd_general_vgx = ProtoField.int16 ("dji_p3_flyrec.osd_general_vgx", "Vgx", base.DEC, nil, nil, "0.1m/s, to ground") +f.osd_general_vgy = ProtoField.int16 ("dji_p3_flyrec.osd_general_vgy", "Vgy", base.DEC, nil, nil, "0.1m/s, to ground") +f.osd_general_vgz = ProtoField.int16 ("dji_p3_flyrec.osd_general_vgz", "Vgz", base.DEC, nil, nil, "0.1m/s, to ground") +f.osd_general_pitch = ProtoField.int16 ("dji_p3_flyrec.osd_general_pitch", "Pitch", base.DEC, nil, nil, "0.1") +f.osd_general_roll = ProtoField.int16 ("dji_p3_flyrec.osd_general_roll", "Roll", base.DEC) +f.osd_general_yaw = ProtoField.int16 ("dji_p3_flyrec.osd_general_yaw", "Yaw", base.DEC) +f.osd_general_mode1 = ProtoField.uint8 ("dji_p3_flyrec.osd_general_mode1", "Mode1", base.HEX, REC_OSD_GENERAL_MODE1_ENUM, 0x7F, "Flight Controller state1") +f.osd_general_rc_state = ProtoField.uint8 ("dji_p3_flyrec.osd_general_rc_state", "RC State", base.HEX, nil, 0x80, nil) +f.osd_general_latest_cmd = ProtoField.uint8 ("dji_p3_flyrec.osd_general_latest_cmd", "Latest Cmd", base.HEX, REC_OSD_GENERAL_COMMAND_ENUM, nil, "controller exccute lastest cmd") +f.osd_general_controller_state = ProtoField.uint32 ("dji_p3_flyrec.osd_general_controller_state", "Controller State", base.HEX, nil, nil, "Flight Controller state flags") + f.osd_general_e_can_ioc_work = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_can_ioc_work", "E Can IOC Work", base.HEX, nil, 0x01, nil) + f.osd_general_e_on_ground = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_on_ground", "E On Ground", base.HEX, nil, 0x02, nil) + f.osd_general_e_in_air = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_in_air", "E In Air", base.HEX, nil, 0x04, nil) + f.osd_general_e_motor_on = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_motor_on", "E Motor On", base.HEX, nil, 0x08, "Force allow start motors ignoring errors") + f.osd_general_e_usonic_on = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_usonic_on", "E Usonic On", base.HEX, nil, 0x10, nil) + f.osd_general_e_gohome_state = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_gohome_state", "E Gohome State", base.HEX, REC_OSD_GENERAL_GOHOME_STATE_ENUM, 0xe0, nil) + f.osd_general_e_mvo_used = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_mvo_used", "E MVO Used", base.HEX, nil, 0x100, "Monocular Visual Odometry is used as horizonal velocity sensor") + f.osd_general_e_battery_req_gohome = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_battery_req_gohome", "E Battery Req Gohome", base.HEX, nil, 0x200, nil) + f.osd_general_e_battery_req_land = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_battery_req_land", "E Battery Req Land", base.HEX, nil, 0x400, "Landing required due to battery voltage low") + f.osd_general_e_still_heating = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_still_heating", "E Still Heating", base.HEX, nil, 0x1000, nil) + f.osd_general_e_rc_state = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_rc_state", "E RC State", base.HEX, nil, 0x6000, nil) + f.osd_general_e_gps_used = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_gps_used", "E GPS Used", base.HEX, nil, 0x8000, "Satellite Positioning System is used as horizonal velocity sensor") + f.osd_general_e_compass_over_range = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_compass_over_range", "E Compass Over Range", base.HEX, nil, 0x10000, nil) + f.osd_general_e_wave_err = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_wave_err", "E Wave Error", base.HEX, nil, 0x20000, nil) + f.osd_general_e_gps_level = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_gps_level", "E GPS Level", base.HEX, nil, 0x3C0000, "Satellite Positioning System signal level") + f.osd_general_e_battery_type = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_battery_type", "E Battery Type", base.HEX, REC_OSD_GENERAL_BATT_TYPE_ENUM, 0xC00000, nil) + f.osd_general_e_accel_over_range = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_accel_over_range", "E Acceletor Over Range", base.HEX, nil, 0x1000000, nil) + f.osd_general_e_is_vibrating = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_is_vibrating", "E Is Vibrating", base.HEX, nil, 0x2000000, nil) + f.osd_general_e_press_err = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_press_err", "E Press Err", base.HEX, nil, 0x4000000, "Barometer error") + f.osd_general_e_esc_stall = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_esc_stall", "E ESC is stall", base.HEX, nil, 0x8000000, "ESC reports motor blocked") + f.osd_general_e_esc_empty = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_esc_empty", "E ESC is empty", base.HEX, nil, 0x10000000, "ESC reports not enough force") + f.osd_general_e_propeller_catapult = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_propeller_catapult", "E Is Propeller Catapult", base.HEX, nil, 0x20000000, nil) + f.osd_general_e_gohome_height_mod = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_gohome_height_mod", "E GoHome Height Mod", base.HEX, nil, 0x40000000, "Go Home Height is Modified") + f.osd_general_e_out_of_limit = ProtoField.uint32 ("dji_p3_flyrec.osd_general_e_out_of_limit", "E Is Out Of Limit", base.HEX, nil, 0x80000000, nil) +f.osd_general_gps_nums = ProtoField.uint8 ("dji_p3_flyrec.osd_general_gps_nums", "Gps Nums", base.DEC, nil, nil, "Number of Global Nav System positioning satellites") +f.osd_general_gohome_landing_reason = ProtoField.uint8 ("dji_p3_flyrec.osd_general_gohome_landing_reason", "Gohome or Landing Reason", base.HEX, REC_OSD_GENERAL_GOHOME_REASON_ENUM, nil, "Reason for automatic GoHome or Landing") +f.osd_general_start_fail_reason = ProtoField.uint8 ("dji_p3_flyrec.osd_general_start_fail_reason", "Start Fail Reason", base.HEX, REC_OSD_GENERAL_START_FAIL_REASON_ENUM, nil, "Reason for failure to start motors") +f.osd_general_controller_state_ext = ProtoField.uint8 ("dji_p3_flyrec.osd_general_controller_state_ext", "Controller State Ext", base.HEX) + f.osd_general_e_gps_state = ProtoField.uint8 ("dji_p3_flyrec.osd_general_e_gps_state", "E Gps State", base.HEX, REC_OSD_GENERAL_GPS_STATE_ENUM, 0x0f, nil) + f.osd_general_e_wp_limit_md = ProtoField.uint8 ("dji_p3_flyrec.osd_general_e_wp_limit_md", "E Wp Limit Mode", base.HEX, nil, 0x10, "Waypoint Limit Mode") +f.osd_general_batt_remain = ProtoField.uint8 ("dji_p3_flyrec.osd_general_batt_remain", "Battery Remain", base.DEC, nil, nil, "Battery Remaining Capacity") +f.osd_general_ultrasonic_height = ProtoField.uint8 ("dji_p3_flyrec.osd_general_ultrasonic_height", "Ultrasonic Height", base.DEC) +f.osd_general_motor_startup_time = ProtoField.uint16 ("dji_p3_flyrec.osd_general_motor_startup_time", "Motor Startup Time", base.DEC) +f.osd_general_motor_startup_times = ProtoField.uint8 ("dji_p3_flyrec.osd_general_motor_startup_times", "Motor Startup Times", base.DEC, nil, nil, "aka Motor Revolution") +f.osd_general_bat_alarm1 = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm1", "Bat Alarm1", base.HEX) + f.osd_general_bat_alarm1_ve = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm1_ve", "Alarm Level 1 Voltage", base.DEC, nil, 0x7F) + f.osd_general_bat_alarm1_fn = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm1_fn", "Alarm Level 1 Function", base.DEC, nil, 0x80) +f.osd_general_bat_alarm2 = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm2", "Bat Alarm2", base.HEX) + f.osd_general_bat_alarm2_ve = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm2_ve", "Alarm Level 2 Voltage", base.DEC, nil, 0x7F) + f.osd_general_bat_alarm2_fn = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm2_fn", "Alarm Level 2 Function", base.DEC, nil, 0x80) +f.osd_general_version_match = ProtoField.uint8 ("dji_p3_flyrec.osd_general_version_match", "Version Match", base.HEX, nil, nil, "Flight Controller version") +f.osd_general_product_type = ProtoField.uint8 ("dji_p3_flyrec.osd_general_product_type", "Product Type", base.HEX, REC_OSD_GENERAL_PRODUCT_TYPE_ENUM) +f.osd_general_imu_init_fail_reson = ProtoField.int8 ("dji_p3_flyrec.osd_general_imu_init_fail_reson", "IMU init Fail Reason", base.DEC, REC_OSD_GENERAL_IMU_INIT_FAIL_RESON_ENUM) + +local function flightrec_osd_general_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.osd_general_longtitude, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.osd_general_latitude, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.osd_general_relative_height, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_general_vgx, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_general_vgy, payload(offset, 2)) -- offset = 20 + offset = offset + 2 + + subtree:add_le (f.osd_general_vgz, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_general_pitch, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_general_roll, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_general_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_general_mode1, payload(offset, 1)) + subtree:add_le (f.osd_general_rc_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_latest_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_controller_state, payload(offset, 4)) + subtree:add_le (f.osd_general_e_can_ioc_work, payload(offset, 4)) + subtree:add_le (f.osd_general_e_on_ground, payload(offset, 4)) + subtree:add_le (f.osd_general_e_in_air, payload(offset, 4)) + subtree:add_le (f.osd_general_e_motor_on, payload(offset, 4)) + subtree:add_le (f.osd_general_e_usonic_on, payload(offset, 4)) + subtree:add_le (f.osd_general_e_gohome_state, payload(offset, 4)) + subtree:add_le (f.osd_general_e_mvo_used, payload(offset, 4)) + subtree:add_le (f.osd_general_e_battery_req_gohome, payload(offset, 4)) + subtree:add_le (f.osd_general_e_battery_req_land, payload(offset, 4)) + subtree:add_le (f.osd_general_e_still_heating, payload(offset, 4)) + subtree:add_le (f.osd_general_e_rc_state, payload(offset, 4)) + subtree:add_le (f.osd_general_e_gps_used, payload(offset, 4)) + subtree:add_le (f.osd_general_e_compass_over_range, payload(offset, 4)) + subtree:add_le (f.osd_general_e_wave_err, payload(offset, 4)) + subtree:add_le (f.osd_general_e_gps_level, payload(offset, 4)) + subtree:add_le (f.osd_general_e_battery_type, payload(offset, 4)) + subtree:add_le (f.osd_general_e_accel_over_range, payload(offset, 4)) + subtree:add_le (f.osd_general_e_is_vibrating, payload(offset, 4)) + subtree:add_le (f.osd_general_e_press_err, payload(offset, 4)) + subtree:add_le (f.osd_general_e_esc_stall, payload(offset, 4)) + subtree:add_le (f.osd_general_e_esc_empty, payload(offset, 4)) + subtree:add_le (f.osd_general_e_propeller_catapult, payload(offset, 4)) + subtree:add_le (f.osd_general_e_gohome_height_mod, payload(offset, 4)) + subtree:add_le (f.osd_general_e_out_of_limit, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.osd_general_gps_nums, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_gohome_landing_reason, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_start_fail_reason, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_controller_state_ext, payload(offset, 1)) + subtree:add_le (f.osd_general_e_gps_state, payload(offset, 1)) + subtree:add_le (f.osd_general_e_wp_limit_md, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_batt_remain, payload(offset, 1)) -- offset = 40 + offset = offset + 1 + + subtree:add_le (f.osd_general_ultrasonic_height, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_motor_startup_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_general_motor_startup_times, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_bat_alarm1, payload(offset, 1)) + subtree:add_le (f.osd_general_bat_alarm1_ve, payload(offset, 1)) + subtree:add_le (f.osd_general_bat_alarm1_fn, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_bat_alarm2, payload(offset, 1)) + subtree:add_le (f.osd_general_bat_alarm2_ve, payload(offset, 1)) + subtree:add_le (f.osd_general_bat_alarm2_fn, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_version_match, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_product_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_general_imu_init_fail_reson, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 50) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Osd General: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Osd General: Payload size different than expected") end +end + +-- Flight log - Osd Home - 0x000d + +f.osd_home_osd_lon = ProtoField.double ("dji_p3_flyrec.osd_home_osd_lon", "Osd Longitude", base.DEC) -- home point coords? +f.osd_home_osd_lat = ProtoField.double ("dji_p3_flyrec.osd_home_osd_lat", "Osd Latitude", base.DEC) -- home point coords? +f.osd_home_osd_alt = ProtoField.float ("dji_p3_flyrec.osd_home_osd_alt", "Osd Altitude", base.DEC, nil, nil, "0.1m, altitude") +f.osd_home_osd_home_state = ProtoField.uint16 ("dji_p3_flyrec.osd_home_osd_home_state", "Osd Home State", base.HEX) + f.osd_home_e_homepoint_set = ProtoField.uint16 ("dji_p3_flyrec.osd_home_e_homepoint_set", "E Homepoint Set", base.HEX, nil, 0x01, nil) + f.osd_home_e_method = ProtoField.uint16 ("dji_p3_flyrec.osd_home_e_method", "E Method", base.HEX, nil, 0x02, nil) + f.osd_home_e_heading = ProtoField.uint16 ("dji_p3_flyrec.osd_home_e_heading", "E Heading", base.HEX, nil, 0x04, nil) + f.osd_home_e_is_dyn_homepoint = ProtoField.uint16 ("dji_p3_flyrec.osd_home_e_is_dyn_homepoint", "E Is Dyn Homepoint", base.HEX, nil, 0x08, nil) + f.osd_home_e_multiple = ProtoField.uint16 ("dji_p3_flyrec.osd_home_e_multiple", "E Multiple", base.HEX, nil, 0x40, nil) + f.osd_home_e_ioc_enable = ProtoField.uint16 ("dji_p3_flyrec.osd_home_e_ioc_enable", "E Ioc Enable", base.HEX, nil, 0x1000, nil) +f.osd_home_fixed_altitude = ProtoField.uint16 ("dji_p3_flyrec.osd_home_fixed_altitude", "Fixed Altitude", base.HEX) +f.osd_home_course_lock_torsion = ProtoField.int16 ("dji_p3_flyrec.osd_home_course_lock_torsion", "Course Lock Torsion", base.DEC) +f.osd_home_fld1a = ProtoField.int8 ("dji_p3_flyrec.osd_home_fld1a", "field1A", base.DEC) +f.osd_home_fld1b = ProtoField.int8 ("dji_p3_flyrec.osd_home_fld1b", "field1B", base.DEC) +f.osd_home_fld1c = ProtoField.int16 ("dji_p3_flyrec.osd_home_fld1c", "field1C", base.DEC) +f.osd_home_fld1e = ProtoField.int16 ("dji_p3_flyrec.osd_home_fld1e", "field1E", base.DEC) +f.osd_home_fld20 = ProtoField.int8 ("dji_p3_flyrec.osd_home_fld20", "field20", base.DEC) +f.osd_home_fld21 = ProtoField.int8 ("dji_p3_flyrec.osd_home_fld21", "field21", base.DEC) -- seem to not be filled +f.osd_home_fld22 = ProtoField.bytes ("dji_p3_flyrec.osd_home_fld22", "field22", base.SPACE) +f.osd_home_fld33 = ProtoField.bytes ("dji_p3_flyrec.osd_home_fld33", "field33", base.SPACE) + +local function flightrec_osd_home_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.osd_home_osd_lon, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.osd_home_osd_lat, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.osd_home_osd_alt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.osd_home_osd_home_state, payload(offset, 2)) + subtree:add_le (f.osd_home_e_homepoint_set, payload(offset, 2)) + subtree:add_le (f.osd_home_e_method, payload(offset, 2)) + subtree:add_le (f.osd_home_e_heading, payload(offset, 2)) + subtree:add_le (f.osd_home_e_is_dyn_homepoint, payload(offset, 2)) + subtree:add_le (f.osd_home_e_multiple, payload(offset, 2)) + subtree:add_le (f.osd_home_e_ioc_enable, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_home_fixed_altitude, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_home_course_lock_torsion, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_home_fld1a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_home_fld1b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_home_fld1c, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_home_fld1e, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.osd_home_fld20, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.osd_home_fld21, payload(offset, 1)) + offset = offset + 1 + + if (payload:len() >= 68) then + subtree:add_le (f.osd_home_fld22, payload(offset, 18)) + offset = offset + 18 + subtree:add_le (f.osd_home_fld33, payload(offset, 16)) + offset = offset + 16 + end + + if (offset ~= 34) and (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Osd Home: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Osd Home: Payload size different than expected") end +end + +-- Flight log - Fdi - 0x001a +-- fault detection isolation + +f.fdi_ns_abnormal_all = ProtoField.uint32 ("dji_p3_flyrec.fdi_ns_abnormal_all", "Ns Abnormal All", base.HEX) +f.fdi_history_ns_abnormal_all = ProtoField.uint32 ("dji_p3_flyrec.fdi_history_ns_abnormal_all", "History Ns Abnormal All", base.HEX) +f.fdi_gyro_bias_raw_flag = ProtoField.uint8 ("dji_p3_flyrec.fdi_gyro_bias_raw_flag", "Gyro Bias Raw Flag", base.HEX) +f.fdi_gyrox_bias_raw = ProtoField.float ("dji_p3_flyrec.fdi_gyrox_bias_raw", "Gyrox Bias Raw", base.DEC) +f.fdi_gyroy_bias_raw = ProtoField.float ("dji_p3_flyrec.fdi_gyroy_bias_raw", "Gyroy Bias Raw", base.DEC) +f.fdi_gyroz_bias_raw = ProtoField.float ("dji_p3_flyrec.fdi_gyroz_bias_raw", "Gyroz Bias Raw", base.DEC) + +local function flightrec_fdi_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fdi_ns_abnormal_all, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fdi_history_ns_abnormal_all, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fdi_gyro_bias_raw_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.fdi_gyrox_bias_raw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fdi_gyroy_bias_raw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fdi_gyroz_bias_raw, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 21) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fdi: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fdi: Payload size different than expected") end +end + +-- Flight log - Vincent Debug - 0x8003 + +f.vincent_debug_data0 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data0", "Data0", base.DEC) +f.vincent_debug_data1 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data1", "Data1", base.DEC) +f.vincent_debug_data2 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data2", "Data2", base.DEC) +f.vincent_debug_data3 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data3", "Data3", base.DEC) +f.vincent_debug_data4 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data4", "Data4", base.DEC) +f.vincent_debug_data5 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data5", "Data5", base.DEC) +f.vincent_debug_data6 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data6", "Data6", base.DEC) +f.vincent_debug_data7 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data7", "Data7", base.DEC) +f.vincent_debug_data8 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data8", "Data8", base.DEC) +f.vincent_debug_data9 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data9", "Data9", base.DEC) +f.vincent_debug_data10 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data10", "Data10", base.DEC) +f.vincent_debug_data11 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data11", "Data11", base.DEC) +f.vincent_debug_data12 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data12", "Data12", base.DEC) +f.vincent_debug_data13 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data13", "Data13", base.DEC) +f.vincent_debug_data14 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data14", "Data14", base.DEC) +f.vincent_debug_data15 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data15", "Data15", base.DEC) +f.vincent_debug_data16 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data16", "Data16", base.DEC) +f.vincent_debug_data17 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data17", "Data17", base.DEC) +f.vincent_debug_data18 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data18", "Data18", base.DEC) +f.vincent_debug_data19 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data19", "Data19", base.DEC) +f.vincent_debug_data20 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data20", "Data20", base.DEC) +f.vincent_debug_data21 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data21", "Data21", base.DEC) +f.vincent_debug_data22 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data22", "Data22", base.DEC) +f.vincent_debug_data23 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data23", "Data23", base.DEC) +f.vincent_debug_data24 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data24", "Data24", base.DEC) +f.vincent_debug_data25 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data25", "Data25", base.DEC) +f.vincent_debug_data26 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data26", "Data26", base.DEC) +f.vincent_debug_data27 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data27", "Data27", base.DEC) +f.vincent_debug_data28 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data28", "Data28", base.DEC) +f.vincent_debug_data29 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data29", "Data29", base.DEC) +f.vincent_debug_data30 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data30", "Data30", base.DEC) +f.vincent_debug_data31 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data31", "Data31", base.DEC) +f.vincent_debug_data32 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data32", "Data32", base.DEC) +f.vincent_debug_data33 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data33", "Data33", base.DEC) +f.vincent_debug_data34 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data34", "Data34", base.DEC) +f.vincent_debug_data35 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data35", "Data35", base.DEC) +f.vincent_debug_data36 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data36", "Data36", base.DEC) +f.vincent_debug_data37 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data37", "Data37", base.DEC) +f.vincent_debug_data38 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data38", "Data38", base.DEC) +f.vincent_debug_data39 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data39", "Data39", base.DEC) +f.vincent_debug_data40 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data40", "Data40", base.DEC) +f.vincent_debug_data41 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data41", "Data41", base.DEC) +f.vincent_debug_data42 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data42", "Data42", base.DEC) +f.vincent_debug_data43 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data43", "Data43", base.DEC) +f.vincent_debug_data44 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data44", "Data44", base.DEC) +f.vincent_debug_data45 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data45", "Data45", base.DEC) +f.vincent_debug_data46 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data46", "Data46", base.DEC) +f.vincent_debug_data47 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data47", "Data47", base.DEC) +f.vincent_debug_data48 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data48", "Data48", base.DEC) +f.vincent_debug_data49 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data49", "Data49", base.DEC) +f.vincent_debug_data50 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data50", "Data50", base.DEC) +f.vincent_debug_data51 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data51", "Data51", base.DEC) +f.vincent_debug_data52 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data52", "Data52", base.DEC) +f.vincent_debug_data53 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data53", "Data53", base.DEC) +f.vincent_debug_data54 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data54", "Data54", base.DEC) +f.vincent_debug_data55 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data55", "Data55", base.DEC) +f.vincent_debug_data56 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data56", "Data56", base.DEC) +f.vincent_debug_data57 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data57", "Data57", base.DEC) +f.vincent_debug_data58 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data58", "Data58", base.DEC) +f.vincent_debug_data59 = ProtoField.float ("dji_p3_flyrec.vincent_debug_data59", "Data59", base.DEC) + +local function flightrec_vincent_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.vincent_debug_data0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data7, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data8, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data9, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data11, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data12, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data13, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data14, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data15, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data16, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data17, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data19, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data20, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data21, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data22, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data23, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data24, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data25, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data26, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data27, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data28, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data29, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data30, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data31, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data32, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data33, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data34, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data35, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data36, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data37, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data38, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data39, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data40, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data41, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data42, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data43, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data44, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data45, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data46, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data47, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data48, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data49, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data50, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data51, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data52, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data53, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data54, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data55, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data56, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data57, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data58, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vincent_debug_data59, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 240) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Vincent Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Vincent Debug: Payload size different than expected") end +end + +-- Flight log - Fly Log - 0x8000 + +f.fly_log_text = ProtoField.string ("dji_p3_flyrec.fly_log_text", "Fly Log", base.ASCII) + +local function flightrec_fly_log_dissector(payload, pinfo, subtree) + local offset = 0 + + local rec_fly_log_text = payload(offset, payload:len() - offset) + subtree:add (f.fly_log_text, rec_fly_log_text) + + pinfo.cols.info = rec_fly_log_text:string():gsub('[^a-zA-Z0-9_:,.[[]]/\\ \t-]','') +end + +-- Flight log - Sd Logs - 0xff00 + +f.sd_logs_text = ProtoField.string ("dji_p3_flyrec.sd_logs_text", "Sd Logs", base.ASCII) + +local function flightrec_sd_logs_dissector(payload, pinfo, subtree) + local offset = 0 + + local rec_sd_logs_text = payload(offset, payload:len() - offset) + subtree:add (f.sd_logs_text, rec_sd_logs_text) + + pinfo.cols.info = rec_sd_logs_text:string():gsub('[^a-zA-Z0-9_:,.[[]]/\\ \t-]','') +end + +-- Flight log - Svn Info - 0xfffe + +f.svn_info_text = ProtoField.string ("dji_p3_flyrec.svn_info_text", "Svn Info", base.ASCII) + +local function flightrec_svn_info_dissector(payload, pinfo, subtree) + local offset = 0 + + local rec_svn_info_text = payload(offset, payload:len() - offset) + subtree:add (f.svn_info_text, rec_svn_info_text) + + pinfo.cols.info = rec_svn_info_text:string():gsub('[^a-zA-Z0-9_:,.[[]]/\\ \t-]','') +end + +-- Flight log - Imu Data - 0x0007 + +f.imu_data_imu_gyro_tempx = ProtoField.float ("dji_p3_flyrec.imu_data_imu_gyro_tempx", "Imu Gyro TempX", base.DEC) +f.imu_data_imu_gyro_tempy = ProtoField.float ("dji_p3_flyrec.imu_data_imu_gyro_tempy", "Imu Gyro TempY", base.DEC) +f.imu_data_imu_gyro_tempz = ProtoField.float ("dji_p3_flyrec.imu_data_imu_gyro_tempz", "Imu Gyro TempZ", base.DEC) +f.imu_data_imu_gyro_x = ProtoField.float ("dji_p3_flyrec.imu_data_imu_gyro_x", "Imu Gyro X", base.DEC) +f.imu_data_imu_gyro_y = ProtoField.float ("dji_p3_flyrec.imu_data_imu_gyro_y", "Imu Gyro Y", base.DEC) +f.imu_data_imu_gyro_z = ProtoField.float ("dji_p3_flyrec.imu_data_imu_gyro_z", "Imu Gyro Z", base.DEC) +f.imu_data_imu_acc_x = ProtoField.float ("dji_p3_flyrec.imu_data_imu_acc_x", "Imu Acc X", base.DEC) +f.imu_data_imu_acc_y = ProtoField.float ("dji_p3_flyrec.imu_data_imu_acc_y", "Imu Acc Y", base.DEC) +f.imu_data_imu_acc_z = ProtoField.float ("dji_p3_flyrec.imu_data_imu_acc_z", "Imu Acc Z", base.DEC) +f.imu_data_imu_airpress = ProtoField.float ("dji_p3_flyrec.imu_data_imu_airpress", "Imu Airpress", base.DEC) +f.imu_data_imu_vin = ProtoField.float ("dji_p3_flyrec.imu_data_imu_vin", "Imu Vin", base.DEC) +f.imu_data_imu_ref = ProtoField.float ("dji_p3_flyrec.imu_data_imu_ref", "Imu Ref", base.DEC) + +local function flightrec_imu_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_data_imu_gyro_tempx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_gyro_tempy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_gyro_tempz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_gyro_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_gyro_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_gyro_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_acc_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_acc_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_acc_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_airpress, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_vin, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_imu_ref, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 48) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Data: Payload size different than expected") end +end + +-- Flight log - Imu Data 00 - 0x0870 + +f.imu_data_00_imu_gyro_tempx_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_gyro_tempx_00", "Imu Gyro Tempx 00", base.DEC) +f.imu_data_00_imu_gyro_tempy_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_gyro_tempy_00", "Imu Gyro Tempy 00", base.DEC) +f.imu_data_00_imu_gyro_tempz_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_gyro_tempz_00", "Imu Gyro Tempz 00", base.DEC) +f.imu_data_00_imu_gyro_x_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_gyro_x_00", "Imu Gyro X 00", base.DEC) +f.imu_data_00_imu_gyro_y_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_gyro_y_00", "Imu Gyro Y 00", base.DEC) +f.imu_data_00_imu_gyro_z_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_gyro_z_00", "Imu Gyro Z 00", base.DEC) +f.imu_data_00_imu_acc_x_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_acc_x_00", "Imu Acc X 00", base.DEC) +f.imu_data_00_imu_acc_y_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_acc_y_00", "Imu Acc Y 00", base.DEC) +f.imu_data_00_imu_acc_z_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_acc_z_00", "Imu Acc Z 00", base.DEC) +f.imu_data_00_imu_airpress_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_airpress_00", "Imu Airpress 00", base.DEC) +f.imu_data_00_imu_vin_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_vin_00", "Imu Vin 00", base.DEC) +f.imu_data_00_imu_ref_00 = ProtoField.float ("dji_p3_flyrec.imu_data_00_imu_ref_00", "Imu Ref 00", base.DEC) + +local function flightrec_imu_data_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_data_00_imu_gyro_tempx_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_gyro_tempy_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_gyro_tempz_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_gyro_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_gyro_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_gyro_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_acc_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_acc_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_acc_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_airpress_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_vin_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_00_imu_ref_00, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 48) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Data 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Data 00: Payload size different than expected") end +end + +-- Flight log - Imu Data 01 - 0x0871 + +f.imu_data_01_imu_gyro_tempx_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_gyro_tempx_01", "Imu Gyro Tempx 01", base.DEC) +f.imu_data_01_imu_gyro_tempy_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_gyro_tempy_01", "Imu Gyro Tempy 01", base.DEC) +f.imu_data_01_imu_gyro_tempz_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_gyro_tempz_01", "Imu Gyro Tempz 01", base.DEC) +f.imu_data_01_imu_gyro_x_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_gyro_x_01", "Imu Gyro X 01", base.DEC) +f.imu_data_01_imu_gyro_y_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_gyro_y_01", "Imu Gyro Y 01", base.DEC) +f.imu_data_01_imu_gyro_z_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_gyro_z_01", "Imu Gyro Z 01", base.DEC) +f.imu_data_01_imu_acc_x_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_acc_x_01", "Imu Acc X 01", base.DEC) +f.imu_data_01_imu_acc_y_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_acc_y_01", "Imu Acc Y 01", base.DEC) +f.imu_data_01_imu_acc_z_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_acc_z_01", "Imu Acc Z 01", base.DEC) +f.imu_data_01_imu_airpress_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_airpress_01", "Imu Airpress 01", base.DEC) +f.imu_data_01_imu_vin_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_vin_01", "Imu Vin 01", base.DEC) +f.imu_data_01_imu_ref_01 = ProtoField.float ("dji_p3_flyrec.imu_data_01_imu_ref_01", "Imu Ref 01", base.DEC) + +local function flightrec_imu_data_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_data_01_imu_gyro_tempx_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_gyro_tempy_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_gyro_tempz_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_gyro_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_gyro_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_gyro_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_acc_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_acc_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_acc_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_airpress_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_vin_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_01_imu_ref_01, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 48) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Data 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Data 01: Payload size different than expected") end +end + +-- Flight log - Imu Data 02 - 0x0872 + +f.imu_data_02_imu_gyro_tempx_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_gyro_tempx_02", "Imu Gyro Tempx 02", base.DEC) +f.imu_data_02_imu_gyro_tempy_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_gyro_tempy_02", "Imu Gyro Tempy 02", base.DEC) +f.imu_data_02_imu_gyro_tempz_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_gyro_tempz_02", "Imu Gyro Tempz 02", base.DEC) +f.imu_data_02_imu_gyro_x_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_gyro_x_02", "Imu Gyro X 02", base.DEC) +f.imu_data_02_imu_gyro_y_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_gyro_y_02", "Imu Gyro Y 02", base.DEC) +f.imu_data_02_imu_gyro_z_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_gyro_z_02", "Imu Gyro Z 02", base.DEC) +f.imu_data_02_imu_acc_x_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_acc_x_02", "Imu Acc X 02", base.DEC) +f.imu_data_02_imu_acc_y_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_acc_y_02", "Imu Acc Y 02", base.DEC) +f.imu_data_02_imu_acc_z_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_acc_z_02", "Imu Acc Z 02", base.DEC) +f.imu_data_02_imu_airpress_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_airpress_02", "Imu Airpress 02", base.DEC) +f.imu_data_02_imu_vin_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_vin_02", "Imu Vin 02", base.DEC) +f.imu_data_02_imu_ref_02 = ProtoField.float ("dji_p3_flyrec.imu_data_02_imu_ref_02", "Imu Ref 02", base.DEC) + +local function flightrec_imu_data_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_data_02_imu_gyro_tempx_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_gyro_tempy_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_gyro_tempz_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_gyro_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_gyro_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_gyro_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_acc_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_acc_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_acc_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_airpress_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_vin_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_data_02_imu_ref_02, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 48) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Data 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Data 02: Payload size different than expected") end +end + +-- Flight log - Imu Cali Data - 0x0008 + +f.imu_cali_data_gyrox_temp = ProtoField.float ("dji_p3_flyrec.imu_cali_data_gyrox_temp", "Gyrox Temp", base.DEC) +f.imu_cali_data_g_cfg_temper_bias_bias_bw = ProtoField.float ("dji_p3_flyrec.imu_cali_data_g_cfg_temper_bias_bias_bw", "G Cfg Temper Bias.Bias.Bw", base.DEC) +f.imu_cali_data_g_cfg_temper_bias_bias_bw = ProtoField.float ("dji_p3_flyrec.imu_cali_data_g_cfg_temper_bias_bias_bw", "G Cfg Temper Bias.Bias.Bw", base.DEC) +f.imu_cali_data_g_cfg_temper_bias_bias_bw = ProtoField.float ("dji_p3_flyrec.imu_cali_data_g_cfg_temper_bias_bias_bw", "G Cfg Temper Bias.Bias.Bw", base.DEC) +f.imu_cali_data_g_cfg_temper_bias_bias_ba = ProtoField.float ("dji_p3_flyrec.imu_cali_data_g_cfg_temper_bias_bias_ba", "G Cfg Temper Bias.Bias.Ba", base.DEC) +f.imu_cali_data_g_cfg_temper_bias_bias_ba = ProtoField.float ("dji_p3_flyrec.imu_cali_data_g_cfg_temper_bias_bias_ba", "G Cfg Temper Bias.Bias.Ba", base.DEC) +f.imu_cali_data_g_cfg_temper_bias_bias_ba = ProtoField.float ("dji_p3_flyrec.imu_cali_data_g_cfg_temper_bias_bias_ba", "G Cfg Temper Bias.Bias.Ba", base.DEC) +f.imu_cali_data_g_cfg_temper_bias_flag = ProtoField.uint16 ("dji_p3_flyrec.imu_cali_data_g_cfg_temper_bias_flag", "G Cfg Temper Bias Flag", base.HEX) +f.imu_cali_data_g_cfg_temper_bias_cali = ProtoField.uint16 ("dji_p3_flyrec.imu_cali_data_g_cfg_temper_bias_cali", "G Cfg Temper Bias Cali", base.HEX) +f.imu_cali_data_g_cfg_gyro_bias_flag = ProtoField.uint16 ("dji_p3_flyrec.imu_cali_data_g_cfg_gyro_bias_flag", "G Cfg Gyro Bias Flag", base.HEX) +f.imu_cali_data_g_cfg_gyro_bias_cali = ProtoField.uint16 ("dji_p3_flyrec.imu_cali_data_g_cfg_gyro_bias_cali", "G Cfg Gyro Bias Cali", base.HEX) +f.imu_cali_data_imu_cali_bias_sta_flag = ProtoField.uint8 ("dji_p3_flyrec.imu_cali_data_imu_cali_bias_sta_flag", "Imu Cali Bias Sta Flag", base.HEX) +f.imu_cali_data_imu_cali_bias_sta_cnt = ProtoField.uint8 ("dji_p3_flyrec.imu_cali_data_imu_cali_bias_sta_cnt", "Imu Cali Bias Sta Cnt", base.HEX) +f.imu_cali_data_g_cali_state = ProtoField.uint8 ("dji_p3_flyrec.imu_cali_data_g_cali_state", "G Cali State", base.HEX) +f.imu_cali_data_clock = ProtoField.uint16 ("dji_p3_flyrec.imu_cali_data_clock", "Clock", base.HEX) +f.imu_cali_data_time = ProtoField.int16 ("dji_p3_flyrec.imu_cali_data_time", "Time", base.DEC) + +local function flightrec_imu_cali_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_cali_data_gyrox_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_cali_data_g_cfg_temper_bias_bias_bw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_cali_data_g_cfg_temper_bias_bias_bw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_cali_data_g_cfg_temper_bias_bias_bw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_cali_data_g_cfg_temper_bias_bias_ba, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_cali_data_g_cfg_temper_bias_bias_ba, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_cali_data_g_cfg_temper_bias_bias_ba, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_cali_data_g_cfg_temper_bias_flag, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_cali_data_g_cfg_temper_bias_cali, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_cali_data_g_cfg_gyro_bias_flag, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_cali_data_g_cfg_gyro_bias_cali, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_cali_data_imu_cali_bias_sta_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.imu_cali_data_imu_cali_bias_sta_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.imu_cali_data_g_cali_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.imu_cali_data_clock, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_cali_data_time, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 43) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Cali Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Cali Data: Payload size different than expected") end +end + +-- Flight log - Sensor Cfg Temp - 0x0009 + +f.sensor_cfg_temp_bias_gyrox = ProtoField.float ("dji_p3_flyrec.sensor_cfg_temp_bias_gyrox", "Bias Gyro X", base.DEC) +f.sensor_cfg_temp_bias_gyroy = ProtoField.float ("dji_p3_flyrec.sensor_cfg_temp_bias_gyroy", "Bias Gyro Y", base.DEC) +f.sensor_cfg_temp_bias_gyroz = ProtoField.float ("dji_p3_flyrec.sensor_cfg_temp_bias_gyroz", "Bias Gyro Z", base.DEC) +f.sensor_cfg_temp_bias_accx = ProtoField.float ("dji_p3_flyrec.sensor_cfg_temp_bias_accx", "Bias Acc X", base.DEC) +f.sensor_cfg_temp_bias_accy = ProtoField.float ("dji_p3_flyrec.sensor_cfg_temp_bias_accy", "Bias Acc Y", base.DEC) +f.sensor_cfg_temp_bias_accz = ProtoField.float ("dji_p3_flyrec.sensor_cfg_temp_bias_accz", "Bias Acc Z", base.DEC) +f.sensor_cfg_temp_tw = ProtoField.float ("dji_p3_flyrec.sensor_cfg_temp_tw", "Tw", base.DEC) +f.sensor_cfg_temp_ta = ProtoField.float ("dji_p3_flyrec.sensor_cfg_temp_ta", "Ta", base.DEC) +f.sensor_cfg_temp_fw = ProtoField.uint16 ("dji_p3_flyrec.sensor_cfg_temp_fw", "Fw", base.HEX) +f.sensor_cfg_temp_fa = ProtoField.uint16 ("dji_p3_flyrec.sensor_cfg_temp_fa", "Fa", base.HEX) + +local function flightrec_sensor_cfg_temp_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.sensor_cfg_temp_bias_gyrox, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.sensor_cfg_temp_bias_gyroy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.sensor_cfg_temp_bias_gyroz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.sensor_cfg_temp_bias_accx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.sensor_cfg_temp_bias_accy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.sensor_cfg_temp_bias_accz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.sensor_cfg_temp_tw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.sensor_cfg_temp_ta, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.sensor_cfg_temp_fw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.sensor_cfg_temp_fa, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 36) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Sensor Cfg Temp: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Sensor Cfg Temp: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Data - 0x000a + +f.temp_ctl_data_p = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_p", "P", base.DEC) +f.temp_ctl_data_i = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_i", "I", base.DEC) +f.temp_ctl_data_i_small = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_i_small", "I Small", base.DEC) +f.temp_ctl_data_d = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_d", "D", base.DEC) +f.temp_ctl_data_dl_err = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_dl_err", "Dl Err", base.DEC, nil, nil, "difference in cur_dst_temp") +f.temp_ctl_data_err_last = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_err_last", "Err Last", base.DEC) +f.temp_ctl_data_out = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_out", "Out", base.DEC) +f.temp_ctl_data_kp = ProtoField.float ("dji_p3_flyrec.temp_ctl_data_kp", "Kp", base.DEC) +f.temp_ctl_data_ki = ProtoField.float ("dji_p3_flyrec.temp_ctl_data_ki", "Ki", base.DEC) +f.temp_ctl_data_kd = ProtoField.float ("dji_p3_flyrec.temp_ctl_data_kd", "Kd", base.DEC) +f.temp_ctl_data_ctl_out_value = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_ctl_out_value", "Ctl Out Value", base.DEC, nil, nil, "2000000 means 100%") +f.temp_ctl_data_real_ctl_out_value = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_real_ctl_out_value", "Real Ctl Out Value", base.DEC) +f.temp_ctl_data_dst_value = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_dst_value", "Dst Value", base.DEC) +f.temp_ctl_data_cur_dst_temp = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_cur_dst_temp", "Cur Dst Temp", base.DEC) +-- The fields below do not match the implementation in m0306 firmware +--f.temp_ctl_data_cnt = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_cnt", "Cnt", base.DEC) +--f.temp_ctl_data_real_ctl_out_per = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_real_ctl_out_per", "Real Ctl Out Per", base.DEC, nil, nil, "real_ctl_out_value in percent") +--f.temp_ctl_data_slope_type = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_slope_type", "Slope Type", base.HEX) +--f.temp_ctl_data_temp_ctl_slope = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_temp_ctl_slope", "Temp Ctl Slope", base.HEX) +--f.temp_ctl_data_t_finish = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_t_finish", "T Finish", base.HEX) +-- This is what flyc_param suggests here +f.temp_ctl_data_imu_fldc = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_imu_fldc", "imu_temp fldC", base.DEC, nil, nil, "Looks like this supposed to be a counter but never increases beyond 0") +f.temp_ctl_data_temp_ctl_slope = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_temp_ctl_slope", "Temp Ctl Slope", base.DEC, nil, nil, "Cummulative value of real_ctl_out_per over time") +f.temp_ctl_data_imu_fld14 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_imu_fld14", "imu_temp fld14", base.DEC, nil, nil, "Cummulative change in value of fld1c over time") +f.temp_ctl_data_imu_fld18 = ProtoField.float ("dji_p3_flyrec.temp_ctl_data_imu_fld18", "imu_temp fld18", base.DEC, nil, nil, "equal to temp_ctl_slope / fld14") +f.temp_ctl_data_imu_fld1c = ProtoField.uint16 ("dji_p3_flyrec.temp_ctl_data_imu_fld1c", "imu_temp fld1C", base.DEC, nil, nil, "unknown param * 100") +f.temp_ctl_data_real_ctl_out_per = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_real_ctl_out_per", "Real Ctl Out Per", base.DEC, nil, nil, "real_ctl_out_value in percent") +f.temp_ctl_data_imu_fld1f = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_imu_fld1f", "imu_temp fld1F", base.HEX) + +local function flightrec_temp_ctl_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_data_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_i_small, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_dl_err, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_err_last, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_out, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_kp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_ki, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_kd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_ctl_out_value, payload(offset, 4)) -- offset 36 + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_real_ctl_out_value, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_dst_value, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_cur_dst_temp, payload(offset, 2)) + offset = offset + 2 + + --subtree:add_le (f.temp_ctl_data_cnt, payload(offset, 4)) + subtree:add_le (f.temp_ctl_data_imu_fldc, payload(offset, 4)) -- offset 48 + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_temp_ctl_slope, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_imu_fld14, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_imu_fld18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_imu_fld1c, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_real_ctl_out_per, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_imu_fld1f, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Data: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Data 00 - 0x0880 + +f.temp_ctl_data_00_dst_value_00 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_00_dst_value_00", "Dst Value 00", base.DEC) +f.temp_ctl_data_00_cur_dst_temp_00 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_00_cur_dst_temp_00", "Cur Dst Temp 00", base.DEC) +f.temp_ctl_data_00_p_00 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_00_p_00", "P 00", base.DEC) +f.temp_ctl_data_00_i_00 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_00_i_00", "I 00", base.DEC) +f.temp_ctl_data_00_d_00 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_00_d_00", "D 00", base.DEC) +f.temp_ctl_data_00_dl_err_00 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_00_dl_err_00", "Dl Err 00", base.DEC) +f.temp_ctl_data_00_real_ctl_out_per_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_00_real_ctl_out_per_00", "Real Ctl Out Per 00", base.HEX) +f.temp_ctl_data_00_slope_type_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_00_slope_type_00", "Slope Type 00", base.HEX) +f.temp_ctl_data_00_temp_ctl_slope_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_00_temp_ctl_slope_00", "Temp Ctl Slope 00", base.HEX) +f.temp_ctl_data_00_t_finish_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_00_t_finish_00", "T Finish 00", base.HEX) +f.temp_ctl_data_00_err_last_00 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_00_err_last_00", "Err Last 00", base.DEC) +f.temp_ctl_data_00_ctl_out_value_00 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_00_ctl_out_value_00", "Ctl Out Value 00", base.HEX) +f.temp_ctl_data_00_real_ctl_out_value_00 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_00_real_ctl_out_value_00", "Real Ctl Out Value 00", base.HEX) +f.temp_ctl_data_00_i_small_00 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_00_i_small_00", "I Small 00", base.DEC) +f.temp_ctl_data_00_out_00 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_00_out_00", "Out 00", base.DEC) +f.temp_ctl_data_00_cnt_00 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_00_cnt_00", "Cnt 00", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") + +local function flightrec_temp_ctl_data_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_data_00_dst_value_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_00_cur_dst_temp_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_00_p_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_00_i_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_00_d_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_00_dl_err_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_00_real_ctl_out_per_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_00_slope_type_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_00_temp_ctl_slope_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_00_t_finish_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_00_err_last_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_00_ctl_out_value_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_00_real_ctl_out_value_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_00_i_small_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_00_out_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_00_cnt_00, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 44) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Data 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Data 00: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Data 01 - 0x0881 + +f.temp_ctl_data_01_dst_value_01 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_01_dst_value_01", "Dst Value 01", base.DEC) +f.temp_ctl_data_01_cur_dst_temp_01 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_01_cur_dst_temp_01", "Cur Dst Temp 01", base.DEC) +f.temp_ctl_data_01_p_01 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_01_p_01", "P 01", base.DEC) +f.temp_ctl_data_01_i_01 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_01_i_01", "I 01", base.DEC) +f.temp_ctl_data_01_d_01 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_01_d_01", "D 01", base.DEC) +f.temp_ctl_data_01_dl_err_01 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_01_dl_err_01", "Dl Err 01", base.DEC) +f.temp_ctl_data_01_real_ctl_out_per_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_01_real_ctl_out_per_01", "Real Ctl Out Per 01", base.HEX) +f.temp_ctl_data_01_slope_type_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_01_slope_type_01", "Slope Type 01", base.HEX) +f.temp_ctl_data_01_temp_ctl_slope_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_01_temp_ctl_slope_01", "Temp Ctl Slope 01", base.HEX) +f.temp_ctl_data_01_t_finish_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_01_t_finish_01", "T Finish 01", base.HEX) +f.temp_ctl_data_01_err_last_01 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_01_err_last_01", "Err Last 01", base.DEC) +f.temp_ctl_data_01_ctl_out_value_01 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_01_ctl_out_value_01", "Ctl Out Value 01", base.HEX) +f.temp_ctl_data_01_real_ctl_out_value_01 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_01_real_ctl_out_value_01", "Real Ctl Out Value 01", base.HEX) +f.temp_ctl_data_01_i_small_01 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_01_i_small_01", "I Small 01", base.DEC) +f.temp_ctl_data_01_out_01 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_01_out_01", "Out 01", base.DEC) +f.temp_ctl_data_01_cnt_01 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_01_cnt_01", "Cnt 01", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") + +local function flightrec_temp_ctl_data_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_data_01_dst_value_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_01_cur_dst_temp_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_01_p_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_01_i_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_01_d_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_01_dl_err_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_01_real_ctl_out_per_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_01_slope_type_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_01_temp_ctl_slope_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_01_t_finish_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_01_err_last_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_01_ctl_out_value_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_01_real_ctl_out_value_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_01_i_small_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_01_out_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_01_cnt_01, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 44) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Data 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Data 01: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Data 02 - 0x0882 + +f.temp_ctl_data_02_dst_value_02 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_02_dst_value_02", "Dst Value 02", base.DEC) +f.temp_ctl_data_02_cur_dst_temp_02 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_02_cur_dst_temp_02", "Cur Dst Temp 02", base.DEC) +f.temp_ctl_data_02_p_02 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_02_p_02", "P 02", base.DEC) +f.temp_ctl_data_02_i_02 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_02_i_02", "I 02", base.DEC) +f.temp_ctl_data_02_d_02 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_02_d_02", "D 02", base.DEC) +f.temp_ctl_data_02_dl_err_02 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_02_dl_err_02", "Dl Err 02", base.DEC) +f.temp_ctl_data_02_real_ctl_out_per_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_02_real_ctl_out_per_02", "Real Ctl Out Per 02", base.HEX) +f.temp_ctl_data_02_slope_type_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_02_slope_type_02", "Slope Type 02", base.HEX) +f.temp_ctl_data_02_temp_ctl_slope_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_02_temp_ctl_slope_02", "Temp Ctl Slope 02", base.HEX) +f.temp_ctl_data_02_t_finish_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_ctl_data_02_t_finish_02", "T Finish 02", base.HEX) +f.temp_ctl_data_02_err_last_02 = ProtoField.int16 ("dji_p3_flyrec.temp_ctl_data_02_err_last_02", "Err Last 02", base.DEC) +f.temp_ctl_data_02_ctl_out_value_02 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_02_ctl_out_value_02", "Ctl Out Value 02", base.HEX) +f.temp_ctl_data_02_real_ctl_out_value_02 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_02_real_ctl_out_value_02", "Real Ctl Out Value 02", base.HEX) +f.temp_ctl_data_02_i_small_02 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_02_i_small_02", "I Small 02", base.DEC) +f.temp_ctl_data_02_out_02 = ProtoField.int32 ("dji_p3_flyrec.temp_ctl_data_02_out_02", "Out 02", base.DEC) +f.temp_ctl_data_02_cnt_02 = ProtoField.uint32 ("dji_p3_flyrec.temp_ctl_data_02_cnt_02", "Cnt 02", base.DEC, nil, nil, "Sequence counter increased each time the packet of this type is prepared") + +local function flightrec_temp_ctl_data_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_data_02_dst_value_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_02_cur_dst_temp_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_02_p_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_02_i_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_02_d_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_02_dl_err_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_02_real_ctl_out_per_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_02_slope_type_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_02_temp_ctl_slope_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_02_t_finish_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_data_02_err_last_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_data_02_ctl_out_value_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_02_real_ctl_out_value_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_02_i_small_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_02_out_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_data_02_cnt_02, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 44) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Data 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Data 02: Payload size different than expected") end +end + +-- Flight log - Pwm Output - 0x0014 + +f.pwm_output_m1 = ProtoField.uint16 ("dji_p3_flyrec.pwm_output_m1", "Motor 1", base.HEX) +f.pwm_output_m2 = ProtoField.uint16 ("dji_p3_flyrec.pwm_output_m2", "Motor 2", base.HEX) +f.pwm_output_m3 = ProtoField.uint16 ("dji_p3_flyrec.pwm_output_m3", "Motor 3", base.HEX) +f.pwm_output_m4 = ProtoField.uint16 ("dji_p3_flyrec.pwm_output_m4", "Motor 4", base.HEX) +f.pwm_output_m5 = ProtoField.uint16 ("dji_p3_flyrec.pwm_output_m5", "Motor 5", base.HEX) +f.pwm_output_m6 = ProtoField.uint16 ("dji_p3_flyrec.pwm_output_m6", "Motor 6", base.HEX) +f.pwm_output_m7 = ProtoField.uint16 ("dji_p3_flyrec.pwm_output_m7", "Motor 7", base.HEX) +f.pwm_output_m8 = ProtoField.uint16 ("dji_p3_flyrec.pwm_output_m8", "Motor 8", base.HEX) + +local function flightrec_pwm_output_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.pwm_output_m1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.pwm_output_m2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.pwm_output_m3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.pwm_output_m4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.pwm_output_m5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.pwm_output_m6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.pwm_output_m7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.pwm_output_m8, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Pwm Output: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Pwm Output: Payload size different than expected") end +end + +-- Flight log - Temp Bias Data - 0x0015 + +f.temp_bias_data__bw_x = ProtoField.float ("dji_p3_flyrec.temp_bias_data__bw_x", " Bw X", base.DEC) +f.temp_bias_data__bw_y = ProtoField.float ("dji_p3_flyrec.temp_bias_data__bw_y", " Bw Y", base.DEC) +f.temp_bias_data__bw_z = ProtoField.float ("dji_p3_flyrec.temp_bias_data__bw_z", " Bw Z", base.DEC) +f.temp_bias_data__ba_x = ProtoField.float ("dji_p3_flyrec.temp_bias_data__ba_x", " Ba X", base.DEC) +f.temp_bias_data__ba_y = ProtoField.float ("dji_p3_flyrec.temp_bias_data__ba_y", " Ba Y", base.DEC) +f.temp_bias_data__ba_z = ProtoField.float ("dji_p3_flyrec.temp_bias_data__ba_z", " Ba Z", base.DEC) +f.temp_bias_data__temp = ProtoField.float ("dji_p3_flyrec.temp_bias_data__temp", " Temp", base.DEC) +f.temp_bias_data__flag = ProtoField.uint8 ("dji_p3_flyrec.temp_bias_data__flag", " Flag", base.HEX) + +local function flightrec_temp_bias_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_bias_data__bw_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_bias_data__bw_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_bias_data__bw_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_bias_data__ba_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_bias_data__ba_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_bias_data__ba_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_bias_data__temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_bias_data__flag, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 29) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Bias Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Bias Data: Payload size different than expected") end +end + +-- Flight log - Temp Cali Data - 0x0016 + +f.temp_cali_data__start_flag = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__start_flag", " Start Flag", base.HEX) +f.temp_cali_data__state = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data__state", " State", base.DEC) +f.temp_cali_data__cali_cnt = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__cali_cnt", " Cali Cnt", base.HEX) +f.temp_cali_data__temp_ready = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__temp_ready", " Temp Ready", base.HEX) +f.temp_cali_data__step = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__step", " Step", base.HEX) +f.temp_cali_data__cali_type = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__cali_type", " Cali Type", base.HEX) +f.temp_cali_data__tick = ProtoField.uint16 ("dji_p3_flyrec.temp_cali_data__tick", " Tick", base.HEX) +f.temp_cali_data__grav_acc_x = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data__grav_acc_x", " Grav Acc X", base.DEC) +f.temp_cali_data__grav_acc_y = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data__grav_acc_y", " Grav Acc Y", base.DEC) +f.temp_cali_data__grav_acc_z = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data__grav_acc_z", " Grav Acc Z", base.DEC) +f.temp_cali_data__dst_cali_temp = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data__dst_cali_temp", " Dst Cali Temp", base.DEC) +f.temp_cali_data__temp_min = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_min", " Temp Min", base.DEC) +f.temp_cali_data__temp_max = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_max", " Temp Max", base.DEC) +f.temp_cali_data__temp_cali_status = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__temp_cali_status", " Temp Cali Status", base.HEX) +f.temp_cali_data__base_cali_status = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__base_cali_status", " Base Cali Status", base.HEX) +f.temp_cali_data__cfg_temp_cali_fw_version = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__cfg_temp_cali_fw_version", " Cfg Temp Cali Fw Version", base.HEX) +f.temp_cali_data__cur_temp_cali_fw_version = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data__cur_temp_cali_fw_version", " Cur Temp Cali Fw Version", base.HEX) +f.temp_cali_data__temp_bw_x = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_bw_x", " Temp Bw X", base.DEC) +f.temp_cali_data__temp_bw_y = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_bw_y", " Temp Bw Y", base.DEC) +f.temp_cali_data__temp_bw_z = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_bw_z", " Temp Bw Z", base.DEC) +f.temp_cali_data__temp_ba_x = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_ba_x", " Temp Ba X", base.DEC) +f.temp_cali_data__temp_ba_y = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_ba_y", " Temp Ba Y", base.DEC) +f.temp_cali_data__temp_ba_z = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_ba_z", " Temp Ba Z", base.DEC) +f.temp_cali_data__temp_temp = ProtoField.float ("dji_p3_flyrec.temp_cali_data__temp_temp", " Temp Temp", base.DEC) +f.temp_cali_data__base_bw_x = ProtoField.float ("dji_p3_flyrec.temp_cali_data__base_bw_x", " Base Bw X", base.DEC) +f.temp_cali_data__base_bw_y = ProtoField.float ("dji_p3_flyrec.temp_cali_data__base_bw_y", " Base Bw Y", base.DEC) +f.temp_cali_data__base_bw_z = ProtoField.float ("dji_p3_flyrec.temp_cali_data__base_bw_z", " Base Bw Z", base.DEC) +f.temp_cali_data__base_ba_x = ProtoField.float ("dji_p3_flyrec.temp_cali_data__base_ba_x", " Base Ba X", base.DEC) +f.temp_cali_data__base_ba_y = ProtoField.float ("dji_p3_flyrec.temp_cali_data__base_ba_y", " Base Ba Y", base.DEC) +f.temp_cali_data__base_ba_z = ProtoField.float ("dji_p3_flyrec.temp_cali_data__base_ba_z", " Base Ba Z", base.DEC) +f.temp_cali_data__base_temp = ProtoField.float ("dji_p3_flyrec.temp_cali_data__base_temp", " Base Temp", base.DEC) + +local function flightrec_temp_cali_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_cali_data__start_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__cali_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__temp_ready, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__step, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__cali_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__tick, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_cali_data__grav_acc_x, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__grav_acc_y, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__grav_acc_z, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__dst_cali_temp, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__temp_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__temp_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__temp_cali_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__base_cali_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__cfg_temp_cali_fw_version, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__cur_temp_cali_fw_version, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data__temp_bw_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__temp_bw_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__temp_bw_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__temp_ba_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__temp_ba_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__temp_ba_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__temp_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__base_bw_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__base_bw_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__base_bw_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__base_ba_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__base_ba_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__base_ba_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data__base_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Cali Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Cali Data: Payload size different than expected") end +end + +-- Flight log - App Temp Bias Data - 0x0018 + +f.app_temp_bias_data_bw_x = ProtoField.float ("dji_p3_flyrec.app_temp_bias_data_bw_x", "Bw X", base.DEC) +f.app_temp_bias_data_bw_y = ProtoField.float ("dji_p3_flyrec.app_temp_bias_data_bw_y", "Bw Y", base.DEC) +f.app_temp_bias_data_bw_z = ProtoField.float ("dji_p3_flyrec.app_temp_bias_data_bw_z", "Bw Z", base.DEC) +f.app_temp_bias_data_ba_x = ProtoField.float ("dji_p3_flyrec.app_temp_bias_data_ba_x", "Ba X", base.DEC) +f.app_temp_bias_data_ba_y = ProtoField.float ("dji_p3_flyrec.app_temp_bias_data_ba_y", "Ba Y", base.DEC) +f.app_temp_bias_data_ba_z = ProtoField.float ("dji_p3_flyrec.app_temp_bias_data_ba_z", "Ba Z", base.DEC) +f.app_temp_bias_data_temp = ProtoField.float ("dji_p3_flyrec.app_temp_bias_data_temp", "Temp", base.DEC) +f.app_temp_bias_data_flag = ProtoField.uint8 ("dji_p3_flyrec.app_temp_bias_data_flag", "Flag", base.HEX) + +local function flightrec_app_temp_bias_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_bias_data_bw_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias_data_bw_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias_data_bw_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias_data_ba_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias_data_ba_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias_data_ba_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias_data_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias_data_flag, payload(offset, 1)) + offset = offset + 1 + + -- The size might be padded to multiplication of 4 bytes + if (offset ~= 29) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Bias Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) and (payload:len() ~= offset+4-(offset%4)) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Bias Data: Payload size different than expected") end +end + +-- Flight log - App Temp Cali Data - 0x0019 + +f.app_temp_cali_data_start_flag = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_start_flag", "Start Flag", base.HEX) +f.app_temp_cali_data_state = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_state", "State", base.DEC) +f.app_temp_cali_data_cali_cnt = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_cali_cnt", "Cali Cnt", base.HEX) +f.app_temp_cali_data_temp_ready = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_temp_ready", "Temp Ready", base.HEX) +f.app_temp_cali_data_step = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_step", "Step", base.HEX) +f.app_temp_cali_data_cali_type = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_cali_type", "Cali Type", base.HEX) +f.app_temp_cali_data_tick = ProtoField.uint16 ("dji_p3_flyrec.app_temp_cali_data_tick", "Tick", base.HEX) +f.app_temp_cali_data_grav_acc_x = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_grav_acc_x", "Grav Acc X", base.DEC) +f.app_temp_cali_data_grav_acc_y = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_grav_acc_y", "Grav Acc Y", base.DEC) +f.app_temp_cali_data_grav_acc_z = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_grav_acc_z", "Grav Acc Z", base.DEC) +f.app_temp_cali_data_dst_cali_temp = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_dst_cali_temp", "Dst Cali Temp", base.DEC) +f.app_temp_cali_data_temp_min = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_min", "Temp Min", base.DEC) +f.app_temp_cali_data_temp_max = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_max", "Temp Max", base.DEC) +f.app_temp_cali_data_temp_cali_status = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_temp_cali_status", "Temp Cali Status", base.HEX) +f.app_temp_cali_data_base_cali_status = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_base_cali_status", "Base Cali Status", base.HEX) +f.app_temp_cali_data_cfg_temp_cali_fw_version = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_cfg_temp_cali_fw_version", "Cfg Temp Cali Fw Version", base.HEX) +f.app_temp_cali_data_cur_temp_cali_fw_version = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_cur_temp_cali_fw_version", "Cur Temp Cali Fw Version", base.HEX) +f.app_temp_cali_data_temp_bw_x = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_bw_x", "Temp Bw X", base.DEC) +f.app_temp_cali_data_temp_bw_y = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_bw_y", "Temp Bw Y", base.DEC) +f.app_temp_cali_data_temp_bw_z = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_bw_z", "Temp Bw Z", base.DEC) +f.app_temp_cali_data_temp_ba_x = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_ba_x", "Temp Ba X", base.DEC) +f.app_temp_cali_data_temp_ba_y = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_ba_y", "Temp Ba Y", base.DEC) +f.app_temp_cali_data_temp_ba_z = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_ba_z", "Temp Ba Z", base.DEC) +f.app_temp_cali_data_temp_temp = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_temp_temp", "Temp Temp", base.DEC) +f.app_temp_cali_data_base_bw_x = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_base_bw_x", "Base Bw X", base.DEC) +f.app_temp_cali_data_base_bw_y = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_base_bw_y", "Base Bw Y", base.DEC) +f.app_temp_cali_data_base_bw_z = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_base_bw_z", "Base Bw Z", base.DEC) +f.app_temp_cali_data_base_ba_x = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_base_ba_x", "Base Ba X", base.DEC) +f.app_temp_cali_data_base_ba_y = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_base_ba_y", "Base Ba Y", base.DEC) +f.app_temp_cali_data_base_ba_z = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_base_ba_z", "Base Ba Z", base.DEC) +f.app_temp_cali_data_base_temp = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_base_temp", "Base Temp", base.DEC) + +local function flightrec_app_temp_cali_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_cali_data_start_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_cali_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_temp_ready, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_step, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_cali_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_tick, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.app_temp_cali_data_grav_acc_x, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_grav_acc_y, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_grav_acc_z, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_dst_cali_temp, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_temp_min, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_temp_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_temp_cali_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_base_cali_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_cfg_temp_cali_fw_version, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_cur_temp_cali_fw_version, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_temp_bw_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_temp_bw_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_temp_bw_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_temp_ba_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_temp_ba_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_temp_ba_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_temp_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_base_bw_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_base_bw_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_base_bw_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_base_ba_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_base_ba_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_base_ba_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_base_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Cali Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Cali Data: Payload size different than expected") end +end + +-- Flight log - Temp Cali Data 00 - 0x0893 + +f.temp_cali_data_00__start_flag_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__start_flag_00", " Start Flag 00", base.HEX) +f.temp_cali_data_00__state_00 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_00__state_00", " State 00", base.DEC) +f.temp_cali_data_00__cali_cnt_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__cali_cnt_00", " Cali Cnt 00", base.HEX) +f.temp_cali_data_00__temp_ready_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__temp_ready_00", " Temp Ready 00", base.HEX) +f.temp_cali_data_00__step_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__step_00", " Step 00", base.HEX) +f.temp_cali_data_00__cali_type_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__cali_type_00", " Cali Type 00", base.HEX) +f.temp_cali_data_00__tick_00 = ProtoField.uint16 ("dji_p3_flyrec.temp_cali_data_00__tick_00", " Tick 00", base.HEX) +f.temp_cali_data_00__grav_acc_x_00 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_00__grav_acc_x_00", " Grav Acc X 00", base.DEC) +f.temp_cali_data_00__grav_acc_y_00 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_00__grav_acc_y_00", " Grav Acc Y 00", base.DEC) +f.temp_cali_data_00__grav_acc_z_00 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_00__grav_acc_z_00", " Grav Acc Z 00", base.DEC) +f.temp_cali_data_00__dst_cali_temp_00 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_00__dst_cali_temp_00", " Dst Cali Temp 00", base.DEC) +f.temp_cali_data_00__temp_min_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_min_00", " Temp Min 00", base.DEC) +f.temp_cali_data_00__temp_max_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_max_00", " Temp Max 00", base.DEC) +f.temp_cali_data_00__temp_cali_status_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__temp_cali_status_00", " Temp Cali Status 00", base.HEX) +f.temp_cali_data_00__base_cali_status_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__base_cali_status_00", " Base Cali Status 00", base.HEX) +f.temp_cali_data_00__cfg_temp_cali_fw_version_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__cfg_temp_cali_fw_version_00", " Cfg Temp Cali Fw Version 00", base.HEX) +f.temp_cali_data_00__cur_temp_cali_fw_version_00 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_00__cur_temp_cali_fw_version_00", " Cur Temp Cali Fw Version 00", base.HEX) +f.temp_cali_data_00__temp_bw_x_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_bw_x_00", " Temp Bw X 00", base.DEC) +f.temp_cali_data_00__temp_bw_y_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_bw_y_00", " Temp Bw Y 00", base.DEC) +f.temp_cali_data_00__temp_bw_z_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_bw_z_00", " Temp Bw Z 00", base.DEC) +f.temp_cali_data_00__temp_ba_x_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_ba_x_00", " Temp Ba X 00", base.DEC) +f.temp_cali_data_00__temp_ba_y_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_ba_y_00", " Temp Ba Y 00", base.DEC) +f.temp_cali_data_00__temp_ba_z_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_ba_z_00", " Temp Ba Z 00", base.DEC) +f.temp_cali_data_00__temp_temp_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__temp_temp_00", " Temp Temp 00", base.DEC) +f.temp_cali_data_00__base_bw_x_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__base_bw_x_00", " Base Bw X 00", base.DEC) +f.temp_cali_data_00__base_bw_y_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__base_bw_y_00", " Base Bw Y 00", base.DEC) +f.temp_cali_data_00__base_bw_z_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__base_bw_z_00", " Base Bw Z 00", base.DEC) +f.temp_cali_data_00__base_ba_x_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__base_ba_x_00", " Base Ba X 00", base.DEC) +f.temp_cali_data_00__base_ba_y_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__base_ba_y_00", " Base Ba Y 00", base.DEC) +f.temp_cali_data_00__base_ba_z_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__base_ba_z_00", " Base Ba Z 00", base.DEC) +f.temp_cali_data_00__base_temp_00 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_00__base_temp_00", " Base Temp 00", base.DEC) + +local function flightrec_temp_cali_data_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_cali_data_00__start_flag_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__state_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__cali_cnt_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__temp_ready_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__step_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__cali_type_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__tick_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_cali_data_00__grav_acc_x_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__grav_acc_y_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__grav_acc_z_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__dst_cali_temp_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__temp_min_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__temp_max_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__temp_cali_status_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__base_cali_status_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__cfg_temp_cali_fw_version_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__cur_temp_cali_fw_version_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_00__temp_bw_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__temp_bw_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__temp_bw_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__temp_ba_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__temp_ba_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__temp_ba_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__temp_temp_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__base_bw_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__base_bw_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__base_bw_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__base_ba_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__base_ba_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__base_ba_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_00__base_temp_00, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Cali Data 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Cali Data 00: Payload size different than expected") end +end + +-- Flight log - App Temp Cali Data 00 - 0x0896 + +f.app_temp_cali_data_00_start_flag_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_start_flag_00", "Start Flag 00", base.HEX) +f.app_temp_cali_data_00_state_00 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_00_state_00", "State 00", base.DEC) +f.app_temp_cali_data_00_cali_cnt_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_cali_cnt_00", "Cali Cnt 00", base.HEX) +f.app_temp_cali_data_00_temp_ready_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_temp_ready_00", "Temp Ready 00", base.HEX) +f.app_temp_cali_data_00_step_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_step_00", "Step 00", base.HEX) +f.app_temp_cali_data_00_cali_type_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_cali_type_00", "Cali Type 00", base.HEX) +f.app_temp_cali_data_00_tick_00 = ProtoField.uint16 ("dji_p3_flyrec.app_temp_cali_data_00_tick_00", "Tick 00", base.HEX) +f.app_temp_cali_data_00_grav_acc_x_00 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_00_grav_acc_x_00", "Grav Acc X 00", base.DEC) +f.app_temp_cali_data_00_grav_acc_y_00 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_00_grav_acc_y_00", "Grav Acc Y 00", base.DEC) +f.app_temp_cali_data_00_grav_acc_z_00 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_00_grav_acc_z_00", "Grav Acc Z 00", base.DEC) +f.app_temp_cali_data_00_dst_cali_temp_00 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_00_dst_cali_temp_00", "Dst Cali Temp 00", base.DEC) +f.app_temp_cali_data_00_temp_min_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_min_00", "Temp Min 00", base.DEC) +f.app_temp_cali_data_00_temp_max_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_max_00", "Temp Max 00", base.DEC) +f.app_temp_cali_data_00_temp_cali_status_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_temp_cali_status_00", "Temp Cali Status 00", base.HEX) +f.app_temp_cali_data_00_base_cali_status_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_base_cali_status_00", "Base Cali Status 00", base.HEX) +f.app_temp_cali_data_00_cfg_temp_cali_fw_version_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_cfg_temp_cali_fw_version_00", "Cfg Temp Cali Fw Version 00", base.HEX) +f.app_temp_cali_data_00_cur_temp_cali_fw_version_00 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_00_cur_temp_cali_fw_version_00", "Cur Temp Cali Fw Version 00", base.HEX) +f.app_temp_cali_data_00_temp_bw_x_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_bw_x_00", "Temp Bw X 00", base.DEC) +f.app_temp_cali_data_00_temp_bw_y_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_bw_y_00", "Temp Bw Y 00", base.DEC) +f.app_temp_cali_data_00_temp_bw_z_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_bw_z_00", "Temp Bw Z 00", base.DEC) +f.app_temp_cali_data_00_temp_ba_x_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_ba_x_00", "Temp Ba X 00", base.DEC) +f.app_temp_cali_data_00_temp_ba_y_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_ba_y_00", "Temp Ba Y 00", base.DEC) +f.app_temp_cali_data_00_temp_ba_z_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_ba_z_00", "Temp Ba Z 00", base.DEC) +f.app_temp_cali_data_00_temp_temp_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_temp_temp_00", "Temp Temp 00", base.DEC) +f.app_temp_cali_data_00_base_bw_x_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_base_bw_x_00", "Base Bw X 00", base.DEC) +f.app_temp_cali_data_00_base_bw_y_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_base_bw_y_00", "Base Bw Y 00", base.DEC) +f.app_temp_cali_data_00_base_bw_z_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_base_bw_z_00", "Base Bw Z 00", base.DEC) +f.app_temp_cali_data_00_base_ba_x_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_base_ba_x_00", "Base Ba X 00", base.DEC) +f.app_temp_cali_data_00_base_ba_y_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_base_ba_y_00", "Base Ba Y 00", base.DEC) +f.app_temp_cali_data_00_base_ba_z_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_base_ba_z_00", "Base Ba Z 00", base.DEC) +f.app_temp_cali_data_00_base_temp_00 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_00_base_temp_00", "Base Temp 00", base.DEC) + +local function flightrec_app_temp_cali_data_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_cali_data_00_start_flag_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_state_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_cali_cnt_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_temp_ready_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_step_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_cali_type_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_tick_00, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.app_temp_cali_data_00_grav_acc_x_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_grav_acc_y_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_grav_acc_z_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_dst_cali_temp_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_temp_min_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_temp_max_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_temp_cali_status_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_base_cali_status_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_cfg_temp_cali_fw_version_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_cur_temp_cali_fw_version_00, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_00_temp_bw_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_temp_bw_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_temp_bw_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_temp_ba_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_temp_ba_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_temp_ba_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_temp_temp_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_base_bw_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_base_bw_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_base_bw_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_base_ba_x_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_base_ba_y_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_base_ba_z_00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_00_base_temp_00, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Cali Data 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Cali Data 00: Payload size different than expected") end +end + +-- Flight log - Temp Cali Data 01 - 0x0894 + +f.temp_cali_data_01__start_flag_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__start_flag_01", " Start Flag 01", base.HEX) +f.temp_cali_data_01__state_01 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_01__state_01", " State 01", base.DEC) +f.temp_cali_data_01__cali_cnt_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__cali_cnt_01", " Cali Cnt 01", base.HEX) +f.temp_cali_data_01__temp_ready_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__temp_ready_01", " Temp Ready 01", base.HEX) +f.temp_cali_data_01__step_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__step_01", " Step 01", base.HEX) +f.temp_cali_data_01__cali_type_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__cali_type_01", " Cali Type 01", base.HEX) +f.temp_cali_data_01__tick_01 = ProtoField.uint16 ("dji_p3_flyrec.temp_cali_data_01__tick_01", " Tick 01", base.HEX) +f.temp_cali_data_01__grav_acc_x_01 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_01__grav_acc_x_01", " Grav Acc X 01", base.DEC) +f.temp_cali_data_01__grav_acc_y_01 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_01__grav_acc_y_01", " Grav Acc Y 01", base.DEC) +f.temp_cali_data_01__grav_acc_z_01 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_01__grav_acc_z_01", " Grav Acc Z 01", base.DEC) +f.temp_cali_data_01__dst_cali_temp_01 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_01__dst_cali_temp_01", " Dst Cali Temp 01", base.DEC) +f.temp_cali_data_01__temp_min_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_min_01", " Temp Min 01", base.DEC) +f.temp_cali_data_01__temp_max_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_max_01", " Temp Max 01", base.DEC) +f.temp_cali_data_01__temp_cali_status_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__temp_cali_status_01", " Temp Cali Status 01", base.HEX) +f.temp_cali_data_01__base_cali_status_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__base_cali_status_01", " Base Cali Status 01", base.HEX) +f.temp_cali_data_01__cfg_temp_cali_fw_version_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__cfg_temp_cali_fw_version_01", " Cfg Temp Cali Fw Version 01", base.HEX) +f.temp_cali_data_01__cur_temp_cali_fw_version_01 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_01__cur_temp_cali_fw_version_01", " Cur Temp Cali Fw Version 01", base.HEX) +f.temp_cali_data_01__temp_bw_x_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_bw_x_01", " Temp Bw X 01", base.DEC) +f.temp_cali_data_01__temp_bw_y_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_bw_y_01", " Temp Bw Y 01", base.DEC) +f.temp_cali_data_01__temp_bw_z_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_bw_z_01", " Temp Bw Z 01", base.DEC) +f.temp_cali_data_01__temp_ba_x_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_ba_x_01", " Temp Ba X 01", base.DEC) +f.temp_cali_data_01__temp_ba_y_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_ba_y_01", " Temp Ba Y 01", base.DEC) +f.temp_cali_data_01__temp_ba_z_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_ba_z_01", " Temp Ba Z 01", base.DEC) +f.temp_cali_data_01__temp_temp_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__temp_temp_01", " Temp Temp 01", base.DEC) +f.temp_cali_data_01__base_bw_x_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__base_bw_x_01", " Base Bw X 01", base.DEC) +f.temp_cali_data_01__base_bw_y_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__base_bw_y_01", " Base Bw Y 01", base.DEC) +f.temp_cali_data_01__base_bw_z_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__base_bw_z_01", " Base Bw Z 01", base.DEC) +f.temp_cali_data_01__base_ba_x_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__base_ba_x_01", " Base Ba X 01", base.DEC) +f.temp_cali_data_01__base_ba_y_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__base_ba_y_01", " Base Ba Y 01", base.DEC) +f.temp_cali_data_01__base_ba_z_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__base_ba_z_01", " Base Ba Z 01", base.DEC) +f.temp_cali_data_01__base_temp_01 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_01__base_temp_01", " Base Temp 01", base.DEC) + +local function flightrec_temp_cali_data_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_cali_data_01__start_flag_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__state_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__cali_cnt_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__temp_ready_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__step_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__cali_type_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__tick_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_cali_data_01__grav_acc_x_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__grav_acc_y_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__grav_acc_z_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__dst_cali_temp_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__temp_min_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__temp_max_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__temp_cali_status_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__base_cali_status_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__cfg_temp_cali_fw_version_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__cur_temp_cali_fw_version_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_01__temp_bw_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__temp_bw_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__temp_bw_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__temp_ba_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__temp_ba_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__temp_ba_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__temp_temp_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__base_bw_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__base_bw_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__base_bw_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__base_ba_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__base_ba_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__base_ba_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_01__base_temp_01, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Cali Data 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Cali Data 01: Payload size different than expected") end +end + +-- Flight log - App Temp Cali Data 01 - 0x0897 + +f.app_temp_cali_data_01_start_flag_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_start_flag_01", "Start Flag 01", base.HEX) +f.app_temp_cali_data_01_state_01 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_01_state_01", "State 01", base.DEC) +f.app_temp_cali_data_01_cali_cnt_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_cali_cnt_01", "Cali Cnt 01", base.HEX) +f.app_temp_cali_data_01_temp_ready_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_temp_ready_01", "Temp Ready 01", base.HEX) +f.app_temp_cali_data_01_step_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_step_01", "Step 01", base.HEX) +f.app_temp_cali_data_01_cali_type_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_cali_type_01", "Cali Type 01", base.HEX) +f.app_temp_cali_data_01_tick_01 = ProtoField.uint16 ("dji_p3_flyrec.app_temp_cali_data_01_tick_01", "Tick 01", base.HEX) +f.app_temp_cali_data_01_grav_acc_x_01 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_01_grav_acc_x_01", "Grav Acc X 01", base.DEC) +f.app_temp_cali_data_01_grav_acc_y_01 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_01_grav_acc_y_01", "Grav Acc Y 01", base.DEC) +f.app_temp_cali_data_01_grav_acc_z_01 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_01_grav_acc_z_01", "Grav Acc Z 01", base.DEC) +f.app_temp_cali_data_01_dst_cali_temp_01 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_01_dst_cali_temp_01", "Dst Cali Temp 01", base.DEC) +f.app_temp_cali_data_01_temp_min_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_min_01", "Temp Min 01", base.DEC) +f.app_temp_cali_data_01_temp_max_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_max_01", "Temp Max 01", base.DEC) +f.app_temp_cali_data_01_temp_cali_status_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_temp_cali_status_01", "Temp Cali Status 01", base.HEX) +f.app_temp_cali_data_01_base_cali_status_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_base_cali_status_01", "Base Cali Status 01", base.HEX) +f.app_temp_cali_data_01_cfg_temp_cali_fw_version_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_cfg_temp_cali_fw_version_01", "Cfg Temp Cali Fw Version 01", base.HEX) +f.app_temp_cali_data_01_cur_temp_cali_fw_version_01 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_01_cur_temp_cali_fw_version_01", "Cur Temp Cali Fw Version 01", base.HEX) +f.app_temp_cali_data_01_temp_bw_x_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_bw_x_01", "Temp Bw X 01", base.DEC) +f.app_temp_cali_data_01_temp_bw_y_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_bw_y_01", "Temp Bw Y 01", base.DEC) +f.app_temp_cali_data_01_temp_bw_z_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_bw_z_01", "Temp Bw Z 01", base.DEC) +f.app_temp_cali_data_01_temp_ba_x_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_ba_x_01", "Temp Ba X 01", base.DEC) +f.app_temp_cali_data_01_temp_ba_y_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_ba_y_01", "Temp Ba Y 01", base.DEC) +f.app_temp_cali_data_01_temp_ba_z_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_ba_z_01", "Temp Ba Z 01", base.DEC) +f.app_temp_cali_data_01_temp_temp_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_temp_temp_01", "Temp Temp 01", base.DEC) +f.app_temp_cali_data_01_base_bw_x_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_base_bw_x_01", "Base Bw X 01", base.DEC) +f.app_temp_cali_data_01_base_bw_y_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_base_bw_y_01", "Base Bw Y 01", base.DEC) +f.app_temp_cali_data_01_base_bw_z_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_base_bw_z_01", "Base Bw Z 01", base.DEC) +f.app_temp_cali_data_01_base_ba_x_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_base_ba_x_01", "Base Ba X 01", base.DEC) +f.app_temp_cali_data_01_base_ba_y_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_base_ba_y_01", "Base Ba Y 01", base.DEC) +f.app_temp_cali_data_01_base_ba_z_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_base_ba_z_01", "Base Ba Z 01", base.DEC) +f.app_temp_cali_data_01_base_temp_01 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_01_base_temp_01", "Base Temp 01", base.DEC) + +local function flightrec_app_temp_cali_data_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_cali_data_01_start_flag_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_state_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_cali_cnt_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_temp_ready_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_step_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_cali_type_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_tick_01, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.app_temp_cali_data_01_grav_acc_x_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_grav_acc_y_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_grav_acc_z_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_dst_cali_temp_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_temp_min_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_temp_max_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_temp_cali_status_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_base_cali_status_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_cfg_temp_cali_fw_version_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_cur_temp_cali_fw_version_01, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_01_temp_bw_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_temp_bw_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_temp_bw_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_temp_ba_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_temp_ba_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_temp_ba_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_temp_temp_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_base_bw_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_base_bw_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_base_bw_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_base_ba_x_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_base_ba_y_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_base_ba_z_01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_01_base_temp_01, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Cali Data 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Cali Data 01: Payload size different than expected") end +end + +-- Flight log - Temp Cali Data 02 - 0x0895 + +f.temp_cali_data_02__start_flag_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__start_flag_02", " Start Flag 02", base.HEX) +f.temp_cali_data_02__state_02 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_02__state_02", " State 02", base.DEC) +f.temp_cali_data_02__cali_cnt_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__cali_cnt_02", " Cali Cnt 02", base.HEX) +f.temp_cali_data_02__temp_ready_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__temp_ready_02", " Temp Ready 02", base.HEX) +f.temp_cali_data_02__step_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__step_02", " Step 02", base.HEX) +f.temp_cali_data_02__cali_type_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__cali_type_02", " Cali Type 02", base.HEX) +f.temp_cali_data_02__tick_02 = ProtoField.uint16 ("dji_p3_flyrec.temp_cali_data_02__tick_02", " Tick 02", base.HEX) +f.temp_cali_data_02__grav_acc_x_02 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_02__grav_acc_x_02", " Grav Acc X 02", base.DEC) +f.temp_cali_data_02__grav_acc_y_02 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_02__grav_acc_y_02", " Grav Acc Y 02", base.DEC) +f.temp_cali_data_02__grav_acc_z_02 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_02__grav_acc_z_02", " Grav Acc Z 02", base.DEC) +f.temp_cali_data_02__dst_cali_temp_02 = ProtoField.int8 ("dji_p3_flyrec.temp_cali_data_02__dst_cali_temp_02", " Dst Cali Temp 02", base.DEC) +f.temp_cali_data_02__temp_min_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_min_02", " Temp Min 02", base.DEC) +f.temp_cali_data_02__temp_max_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_max_02", " Temp Max 02", base.DEC) +f.temp_cali_data_02__temp_cali_status_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__temp_cali_status_02", " Temp Cali Status 02", base.HEX) +f.temp_cali_data_02__base_cali_status_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__base_cali_status_02", " Base Cali Status 02", base.HEX) +f.temp_cali_data_02__cfg_temp_cali_fw_version_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__cfg_temp_cali_fw_version_02", " Cfg Temp Cali Fw Version 02", base.HEX) +f.temp_cali_data_02__cur_temp_cali_fw_version_02 = ProtoField.uint8 ("dji_p3_flyrec.temp_cali_data_02__cur_temp_cali_fw_version_02", " Cur Temp Cali Fw Version 02", base.HEX) +f.temp_cali_data_02__temp_bw_x_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_bw_x_02", " Temp Bw X 02", base.DEC) +f.temp_cali_data_02__temp_bw_y_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_bw_y_02", " Temp Bw Y 02", base.DEC) +f.temp_cali_data_02__temp_bw_z_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_bw_z_02", " Temp Bw Z 02", base.DEC) +f.temp_cali_data_02__temp_ba_x_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_ba_x_02", " Temp Ba X 02", base.DEC) +f.temp_cali_data_02__temp_ba_y_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_ba_y_02", " Temp Ba Y 02", base.DEC) +f.temp_cali_data_02__temp_ba_z_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_ba_z_02", " Temp Ba Z 02", base.DEC) +f.temp_cali_data_02__temp_temp_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__temp_temp_02", " Temp Temp 02", base.DEC) +f.temp_cali_data_02__base_bw_x_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__base_bw_x_02", " Base Bw X 02", base.DEC) +f.temp_cali_data_02__base_bw_y_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__base_bw_y_02", " Base Bw Y 02", base.DEC) +f.temp_cali_data_02__base_bw_z_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__base_bw_z_02", " Base Bw Z 02", base.DEC) +f.temp_cali_data_02__base_ba_x_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__base_ba_x_02", " Base Ba X 02", base.DEC) +f.temp_cali_data_02__base_ba_y_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__base_ba_y_02", " Base Ba Y 02", base.DEC) +f.temp_cali_data_02__base_ba_z_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__base_ba_z_02", " Base Ba Z 02", base.DEC) +f.temp_cali_data_02__base_temp_02 = ProtoField.float ("dji_p3_flyrec.temp_cali_data_02__base_temp_02", " Base Temp 02", base.DEC) + +local function flightrec_temp_cali_data_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_cali_data_02__start_flag_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__state_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__cali_cnt_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__temp_ready_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__step_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__cali_type_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__tick_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_cali_data_02__grav_acc_x_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__grav_acc_y_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__grav_acc_z_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__dst_cali_temp_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__temp_min_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__temp_max_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__temp_cali_status_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__base_cali_status_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__cfg_temp_cali_fw_version_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__cur_temp_cali_fw_version_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_cali_data_02__temp_bw_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__temp_bw_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__temp_bw_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__temp_ba_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__temp_ba_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__temp_ba_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__temp_temp_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__base_bw_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__base_bw_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__base_bw_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__base_ba_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__base_ba_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__base_ba_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_cali_data_02__base_temp_02, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Cali Data 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Cali Data 02: Payload size different than expected") end +end + +-- Flight log - App Temp Cali Data 02 - 0x0898 + +f.app_temp_cali_data_02_start_flag_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_start_flag_02", "Start Flag 02", base.HEX) +f.app_temp_cali_data_02_state_02 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_02_state_02", "State 02", base.DEC) +f.app_temp_cali_data_02_cali_cnt_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_cali_cnt_02", "Cali Cnt 02", base.HEX) +f.app_temp_cali_data_02_temp_ready_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_temp_ready_02", "Temp Ready 02", base.HEX) +f.app_temp_cali_data_02_step_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_step_02", "Step 02", base.HEX) +f.app_temp_cali_data_02_cali_type_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_cali_type_02", "Cali Type 02", base.HEX) +f.app_temp_cali_data_02_tick_02 = ProtoField.uint16 ("dji_p3_flyrec.app_temp_cali_data_02_tick_02", "Tick 02", base.HEX) +f.app_temp_cali_data_02_grav_acc_x_02 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_02_grav_acc_x_02", "Grav Acc X 02", base.DEC) +f.app_temp_cali_data_02_grav_acc_y_02 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_02_grav_acc_y_02", "Grav Acc Y 02", base.DEC) +f.app_temp_cali_data_02_grav_acc_z_02 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_02_grav_acc_z_02", "Grav Acc Z 02", base.DEC) +f.app_temp_cali_data_02_dst_cali_temp_02 = ProtoField.int8 ("dji_p3_flyrec.app_temp_cali_data_02_dst_cali_temp_02", "Dst Cali Temp 02", base.DEC) +f.app_temp_cali_data_02_temp_min_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_min_02", "Temp Min 02", base.DEC) +f.app_temp_cali_data_02_temp_max_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_max_02", "Temp Max 02", base.DEC) +f.app_temp_cali_data_02_temp_cali_status_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_temp_cali_status_02", "Temp Cali Status 02", base.HEX) +f.app_temp_cali_data_02_base_cali_status_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_base_cali_status_02", "Base Cali Status 02", base.HEX) +f.app_temp_cali_data_02_cfg_temp_cali_fw_version_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_cfg_temp_cali_fw_version_02", "Cfg Temp Cali Fw Version 02", base.HEX) +f.app_temp_cali_data_02_cur_temp_cali_fw_version_02 = ProtoField.uint8 ("dji_p3_flyrec.app_temp_cali_data_02_cur_temp_cali_fw_version_02", "Cur Temp Cali Fw Version 02", base.HEX) +f.app_temp_cali_data_02_temp_bw_x_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_bw_x_02", "Temp Bw X 02", base.DEC) +f.app_temp_cali_data_02_temp_bw_y_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_bw_y_02", "Temp Bw Y 02", base.DEC) +f.app_temp_cali_data_02_temp_bw_z_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_bw_z_02", "Temp Bw Z 02", base.DEC) +f.app_temp_cali_data_02_temp_ba_x_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_ba_x_02", "Temp Ba X 02", base.DEC) +f.app_temp_cali_data_02_temp_ba_y_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_ba_y_02", "Temp Ba Y 02", base.DEC) +f.app_temp_cali_data_02_temp_ba_z_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_ba_z_02", "Temp Ba Z 02", base.DEC) +f.app_temp_cali_data_02_temp_temp_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_temp_temp_02", "Temp Temp 02", base.DEC) +f.app_temp_cali_data_02_base_bw_x_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_base_bw_x_02", "Base Bw X 02", base.DEC) +f.app_temp_cali_data_02_base_bw_y_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_base_bw_y_02", "Base Bw Y 02", base.DEC) +f.app_temp_cali_data_02_base_bw_z_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_base_bw_z_02", "Base Bw Z 02", base.DEC) +f.app_temp_cali_data_02_base_ba_x_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_base_ba_x_02", "Base Ba X 02", base.DEC) +f.app_temp_cali_data_02_base_ba_y_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_base_ba_y_02", "Base Ba Y 02", base.DEC) +f.app_temp_cali_data_02_base_ba_z_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_base_ba_z_02", "Base Ba Z 02", base.DEC) +f.app_temp_cali_data_02_base_temp_02 = ProtoField.float ("dji_p3_flyrec.app_temp_cali_data_02_base_temp_02", "Base Temp 02", base.DEC) + +local function flightrec_app_temp_cali_data_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_cali_data_02_start_flag_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_state_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_cali_cnt_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_temp_ready_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_step_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_cali_type_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_tick_02, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.app_temp_cali_data_02_grav_acc_x_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_grav_acc_y_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_grav_acc_z_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_dst_cali_temp_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_temp_min_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_temp_max_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_temp_cali_status_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_base_cali_status_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_cfg_temp_cali_fw_version_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_cur_temp_cali_fw_version_02, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.app_temp_cali_data_02_temp_bw_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_temp_bw_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_temp_bw_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_temp_ba_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_temp_ba_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_temp_ba_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_temp_temp_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_base_bw_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_base_bw_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_base_bw_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_base_ba_x_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_base_ba_y_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_base_ba_z_02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_cali_data_02_base_temp_02, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Cali Data 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Cali Data 02: Payload size different than expected") end +end + +-- Flight log - Mpu6500 Raw Data - 0x0023 + +f.mpu6500_raw_data_mpu6500_ax = ProtoField.float ("dji_p3_flyrec.mpu6500_raw_data_mpu6500_ax", "Mpu6500 Ax", base.DEC) +f.mpu6500_raw_data_mpu6500_ay = ProtoField.float ("dji_p3_flyrec.mpu6500_raw_data_mpu6500_ay", "Mpu6500 Ay", base.DEC) +f.mpu6500_raw_data_mpu6500_az = ProtoField.float ("dji_p3_flyrec.mpu6500_raw_data_mpu6500_az", "Mpu6500 Az", base.DEC) +f.mpu6500_raw_data_mpu6500_wx = ProtoField.float ("dji_p3_flyrec.mpu6500_raw_data_mpu6500_wx", "Mpu6500 Wx", base.DEC) +f.mpu6500_raw_data_mpu6500_wy = ProtoField.float ("dji_p3_flyrec.mpu6500_raw_data_mpu6500_wy", "Mpu6500 Wy", base.DEC) +f.mpu6500_raw_data_mpu6500_wz = ProtoField.float ("dji_p3_flyrec.mpu6500_raw_data_mpu6500_wz", "Mpu6500 Wz", base.DEC) + +local function flightrec_mpu6500_raw_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.mpu6500_raw_data_mpu6500_ax, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mpu6500_raw_data_mpu6500_ay, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mpu6500_raw_data_mpu6500_az, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mpu6500_raw_data_mpu6500_wx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mpu6500_raw_data_mpu6500_wy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mpu6500_raw_data_mpu6500_wz, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Mpu6500 Raw Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Mpu6500 Raw Data: Payload size different than expected") end +end + +-- Flight log - Adxl278 Raw Data - 0x0024 + +f.adxl278_raw_data_adxl278_ax = ProtoField.float ("dji_p3_flyrec.adxl278_raw_data_adxl278_ax", "Adxl278 Ax", base.DEC) +f.adxl278_raw_data_adxl278_ay = ProtoField.float ("dji_p3_flyrec.adxl278_raw_data_adxl278_ay", "Adxl278 Ay", base.DEC) +f.adxl278_raw_data_adxl278_az = ProtoField.float ("dji_p3_flyrec.adxl278_raw_data_adxl278_az", "Adxl278 Az", base.DEC) + +local function flightrec_adxl278_raw_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adxl278_raw_data_adxl278_ax, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adxl278_raw_data_adxl278_ay, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adxl278_raw_data_adxl278_az, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adxl278 Raw Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adxl278 Raw Data: Payload size different than expected") end +end + +-- Flight log - Svo Debug - 0x0065 + +f.svo_debug_visiondebug1 = ProtoField.float ("dji_p3_flyrec.svo_debug_visiondebug1", "Vision Debug 1", base.DEC) +f.svo_debug_visiondebug2 = ProtoField.float ("dji_p3_flyrec.svo_debug_visiondebug2", "Vision Debug 2", base.DEC) +f.svo_debug_visiondebug3 = ProtoField.float ("dji_p3_flyrec.svo_debug_visiondebug3", "Vision Debug 3", base.DEC) +f.svo_debug_visiondebug4 = ProtoField.float ("dji_p3_flyrec.svo_debug_visiondebug4", "Vision Debug 4", base.DEC) +f.svo_debug_visiondebug5 = ProtoField.float ("dji_p3_flyrec.svo_debug_visiondebug5", "Vision Debug 5", base.DEC) +f.svo_debug_visiondebug6 = ProtoField.float ("dji_p3_flyrec.svo_debug_visiondebug6", "Vision Debug 6", base.DEC) +f.svo_debug_visiondebug7 = ProtoField.float ("dji_p3_flyrec.svo_debug_visiondebug7", "Vision Debug 7", base.DEC) +f.svo_debug_visiondebug8 = ProtoField.float ("dji_p3_flyrec.svo_debug_visiondebug8", "Vision Debug 8", base.DEC) +--f.svo_debug_e_led_atti = ProtoField.none ("dji_p3_flyrec.svo_debug_e_led_atti", "E Led Atti", base.NONE, nil, 0x03, "bitand(filter_status,3)") +--f.svo_debug_e_led_hori = ProtoField.none ("dji_p3_flyrec.svo_debug_e_led_hori", "E Led Hori", base.NONE, nil, 0x0c, "bitand(shift_r(filter_status,2),3)") +--f.svo_debug_e_led_vert = ProtoField.none ("dji_p3_flyrec.svo_debug_e_led_vert", "E Led Vert", base.NONE, nil, 0x30, "bitand(shift_r(filter_status,4),3)") +--f.svo_debug_e_led_gps_new = ProtoField.none ("dji_p3_flyrec.svo_debug_e_led_gps_new", "E Led Gps New", base.NONE, nil, 0xc0, "bitand(shift_r(filter_status,6),3)") +--f.svo_debug_e_long_gps = ProtoField.none ("dji_p3_flyrec.svo_debug_e_long_gps", "E Long Gps", base.NONE, nil, nil, "if(long_gps/10000000<113.93,113.93,long_gps/10000000)") +--f.svo_debug_e_lat_gps = ProtoField.none ("dji_p3_flyrec.svo_debug_e_lat_gps", "E Lat Gps", base.NONE, nil, nil, "if(lat_gps/10000000<22.53,22.53,lat_gps/10000000)") +--f.svo_debug_e_longti = ProtoField.none ("dji_p3_flyrec.svo_debug_e_longti", "E Longti", base.NONE, nil, nil, "if(longti/3.14159265*180<113.93,113.93,longti/3.14159265*180)") +--f.svo_debug_e_lati = ProtoField.none ("dji_p3_flyrec.svo_debug_e_lati", "E Lati", base.NONE, nil, nil, "if(lati/3.14159265*180<22.53,22.53,lati/3.14159265*180)") +--f.svo_debug_e_longti_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_longti_sim", "E Longti Sim", base.NONE, nil, nil, "if(longti_sim/3.14159265*180<113.93,113.93,longti_sim/3.14159265*180)") +--f.svo_debug_e_lati_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_lati_sim", "E Lati Sim", base.NONE, nil, nil, "if(lati_sim/3.14159265*180<22.53,22.53,lati_sim/3.14159265*180)") +--f.svo_debug_e_x = ProtoField.none ("dji_p3_flyrec.svo_debug_e_x", "E X", base.NONE, nil, nil, "if(absf(x)>50,50,x)") +--f.svo_debug_e_x_m = ProtoField.none ("dji_p3_flyrec.svo_debug_e_x_m", "E X M", base.NONE, nil, nil, "if(absf(x_m)>50,50,x_m)") +--f.svo_debug_e_y = ProtoField.none ("dji_p3_flyrec.svo_debug_e_y", "E Y", base.NONE, nil, nil, "if(absf(y)>50,50,y)") +--f.svo_debug_e_y_m = ProtoField.none ("dji_p3_flyrec.svo_debug_e_y_m", "E Y M", base.NONE, nil, nil, "if(absf(y_m)<50,50,y_m)") +--f.svo_debug_e_pitch = ProtoField.none ("dji_p3_flyrec.svo_debug_e_pitch", "E Pitch", base.NONE, nil, nil, "-asin_x(2*(q1*q3-q0*q2))/3.1415926*180") +--f.svo_debug_e_roll = ProtoField.none ("dji_p3_flyrec.svo_debug_e_roll", "E Roll", base.NONE, nil, nil, "atan2(2*(q2*q3+q0*q1),1-2*(q1*q1+q2*q2))/3.1415926*180") +--f.svo_debug_e_yaw = ProtoField.none ("dji_p3_flyrec.svo_debug_e_yaw", "E Yaw", base.NONE, nil, nil, "atan2(2*(q1*q2+q0*q3),1-2*(q2*q2+q3*q3))/3.1415926*180") +--f.svo_debug_e_yaw_from_m = ProtoField.none ("dji_p3_flyrec.svo_debug_e_yaw_from_m", "E Yaw From M", base.NONE, nil, nil, "atan2(-(m_y*cos(E_roll/57.29578)-m_z*sin(E_roll/57.29578)),m_x*cos(E_pitch/57.29578)+m_y*sin(E_pitch/57.29578)*sin(E_roll/57.29578)+m_z*sin(E_pitch/57.29578)*cos(E_roll/57.29578))*180/3.14159265") +--f.svo_debug_lon = ProtoField.none ("dji_p3_flyrec.svo_debug_lon", "Lon", base.NONE, nil, nil, "if(longti<1.9886,1.9886,longti)") +--f.svo_debug_lat = ProtoField.none ("dji_p3_flyrec.svo_debug_lat", "Lat", base.NONE, nil, nil, "if(lati<0.3933,0.3933,lati)") +--f.svo_debug_nedx = ProtoField.none ("dji_p3_flyrec.svo_debug_nedx", "Nedx", base.NONE, nil, nil, "(lat-0.3933)*6378137.0") +--f.svo_debug_nedy = ProtoField.none ("dji_p3_flyrec.svo_debug_nedy", "Nedy", base.NONE, nil, nil, "(lon-1.9886)*6378137.0*cos(lat)") +--f.svo_debug_e_mod_m = ProtoField.none ("dji_p3_flyrec.svo_debug_e_mod_m", "E Mod M", base.NONE, nil, nil, "sqrt(m_x^2+m_y^2+m_z^2)") +--f.svo_debug_e_mod_acc = ProtoField.none ("dji_p3_flyrec.svo_debug_e_mod_acc", "E Mod Acc", base.NONE, nil, nil, "sqrt(acc_x^2+acc_y^2+acc_z^2)") +--f.svo_debug_e_mod_acc_xy = ProtoField.none ("dji_p3_flyrec.svo_debug_e_mod_acc_xy", "E Mod Acc Xy", base.NONE, nil, nil, "sqrt(acc_x^2+acc_y^2)") +--f.svo_debug_e_vel_n = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vel_n", "E Vel N", base.NONE, nil, nil, "vel_n/100.0") +--f.svo_debug_e_vel_e = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vel_e", "E Vel E", base.NONE, nil, nil, "vel_e/100.0") +--f.svo_debug_e_vel_d = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vel_d", "E Vel D", base.NONE, nil, nil, "vel_d/100.0") +--f.svo_debug_e_gps_err = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_err", "E Gps Err", base.NONE, nil, 0xff000000, "bitand(shift_r(gpstime,24),255)") +--f.svo_debug_e_svn_gln = ProtoField.none ("dji_p3_flyrec.svo_debug_e_svn_gln", "E Svn Gln", base.NONE, nil, 0x0f, "bitand(shift_r(gpsalt,0),15)") +--f.svo_debug_e_svn_gps = ProtoField.none ("dji_p3_flyrec.svo_debug_e_svn_gps", "E Svn Gps", base.NONE, nil, 0xf0, "bitand(shift_r(gpsalt,4),15)") +--f.svo_debug_e_svn_check = ProtoField.none ("dji_p3_flyrec.svo_debug_e_svn_check", "E Svn Check", base.NONE, nil, nil, "E_svn_gln+E_svn_gps-numsv") +--f.svo_debug_e_pitch_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_pitch_sim", "E Pitch Sim", base.NONE, nil, nil, "-asin_x(2*(q1_sim*q3_sim-q0_sim*q2_sim))/3.1415926*180") +--f.svo_debug_e_roll_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_roll_sim", "E Roll Sim", base.NONE, nil, nil, "atan2(2*(q2_sim*q3_sim+q0_sim*q1_sim),1-2*(q1_sim*q1_sim+q2_sim*q2_sim))/3.1415926*180") +--f.svo_debug_e_yaw_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_yaw_sim", "E Yaw Sim", base.NONE, nil, nil, "atan2(2*(q1_sim*q2_sim+q0_sim*q3_sim),1-2*(q2_sim*q2_sim+q3_sim*q3_sim))/3.1415926*180") +--f.svo_debug_e_pitch_rad_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_pitch_rad_sim", "E Pitch Rad Sim", base.NONE, nil, nil, "-asin_x(2*(q1_sim*q3_sim-q0_sim*q2_sim))") +--f.svo_debug_e_roll_rad_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_roll_rad_sim", "E Roll Rad Sim", base.NONE, nil, nil, "atan2(2*(q2_sim*q3_sim+q0_sim*q1_sim),1-2*(q1_sim*q1_sim+q2_sim*q2_sim))") +--f.svo_debug_e_yaw_rad_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_yaw_rad_sim", "E Yaw Rad Sim", base.NONE, nil, nil, "atan2(2*(q1_sim*q2_sim+q0_sim*q3_sim),1-2*(q2_sim*q2_sim+q3_sim*q3_sim))") +--f.svo_debug_e_vb_x = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_x", "E Vb X", base.NONE, nil, nil, "(1-2*q2*q2-2*q3*q3)*vg_x+(2*q1*q2+2*q3*q0)*vg_y+(2*q1*q3-2*q2*q0)*vg_z") +--f.svo_debug_e_vb_y = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_y", "E Vb Y", base.NONE, nil, nil, "(2*q1*q2-2*q3*q0)*vg_x+(1-2*q1*q1-2*q3*q3)*vg_y+(2*q2*q3+2*q1*q0)*vg_z") +--f.svo_debug_e_vb_z = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_z", "E Vb Z", base.NONE, nil, nil, "(2*q1*q3+2*q2*q0)*vg_x+(2*q2*q3-2*q1*q0)*vg_y+(1-2*q1*q1-2*q2*q2)*vg_z") +--f.svo_debug_e_vb_norm_acc = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_norm_acc", "E Vb Norm Acc", base.NONE, nil, nil, "sqrt(acc_x*acc_x*9.8*9.8+acc_y*acc_y*9.8*9.8)") +--f.svo_debug_e_vb_norm_vb = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_norm_vb", "E Vb Norm Vb", base.NONE, nil, nil, "sqrt(E_vb_x^2+E_vb_y^2)") +--f.svo_debug_e_vb_x_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_x_sim", "E Vb X Sim", base.NONE, nil, nil, "(1-2*q2*q2-2*q3*q3)*vg_x_sim+(2*q1*q2+2*q3*q0)*vg_y_sim+(2*q1*q3-2*q2*q0)*vg_z_sim") +--f.svo_debug_e_vb_y_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_y_sim", "E Vb Y Sim", base.NONE, nil, nil, "(2*q1*q2-2*q3*q0)*vg_x_sim+(1-2*q1*q1-2*q3*q3)*vg_y_sim+(2*q2*q3+2*q1*q0)*vg_z_sim") +--f.svo_debug_e_vb_z_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_z_sim", "E Vb Z Sim", base.NONE, nil, nil, "(2*q1*q3+2*q2*q0)*vg_x_sim+(2*q2*q3-2*q1*q0)*vg_y_sim+(1-2*q1*q1-2*q2*q2)*vg_z_sim") +--f.svo_debug_e_vb_x_yaw_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_x_yaw_sim", "E Vb X Yaw Sim", base.NONE, nil, nil, "cos(E_yaw_rad_sim)*vg_x_sim+sin(E_yaw_rad_sim)*vg_y_sim") +--f.svo_debug_e_vb_y_yaw_sim = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vb_y_yaw_sim", "E Vb Y Yaw Sim", base.NONE, nil, nil, "-sin(E_yaw_rad_sim)*vg_x_sim+cos(E_yaw_rad_sim)*vg_y_sim") +--f.svo_debug_e_ab_x = ProtoField.none ("dji_p3_flyrec.svo_debug_e_ab_x", "E Ab X", base.NONE, nil, nil, "(1-2*q2*q2-2*q3*q3)*ag_x+(2*q1*q2+2*q3*q0)*ag_y+(2*q1*q3-2*q2*q0)*ag_z") +--f.svo_debug_e_ab_y = ProtoField.none ("dji_p3_flyrec.svo_debug_e_ab_y", "E Ab Y", base.NONE, nil, nil, "(2*q1*q2-2*q3*q0)*ag_x+(1-2*q1*q1-2*q3*q3)*ag_y+(2*q2*q3+2*q1*q0)*ag_z") +--f.svo_debug_e_ab_z = ProtoField.none ("dji_p3_flyrec.svo_debug_e_ab_z", "E Ab Z", base.NONE, nil, nil, "(2*q1*q3+2*q2*q0)*ag_x+(2*q2*q3-2*q1*q0)*ag_y+(1-2*q1*q1-2*q2*q2)*ag_z") +--f.svo_debug_e_mvo_vx = ProtoField.none ("dji_p3_flyrec.svo_debug_e_mvo_vx", "E Mvo Vx", base.NONE, nil, nil, "-mvo_vx/1000") +--f.svo_debug_e_mvo_vy = ProtoField.none ("dji_p3_flyrec.svo_debug_e_mvo_vy", "E Mvo Vy", base.NONE, nil, nil, "-mvo_vy/1000") +--f.svo_debug_e_us_h_grnd = ProtoField.none ("dji_p3_flyrec.svo_debug_e_us_h_grnd", "E Us H Grnd", base.NONE, nil, nil, "us_h_grnd/1000") +--f.svo_debug_e_us_h_flag = ProtoField.none ("dji_p3_flyrec.svo_debug_e_us_h_flag", "E Us H Flag", base.NONE, nil, 0x01, "bitand(vo_flag,1)") +--f.svo_debug_e_us_v_flag = ProtoField.none ("dji_p3_flyrec.svo_debug_e_us_v_flag", "E Us V Flag", base.NONE, nil, 0x02, "bitand(shift_r(vo_flag,1),1)") +--f.svo_debug_e_vo_pos_flag = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vo_pos_flag", "E Vo Pos Flag", base.NONE, nil, 0x04, "bitand(shift_r(vo_flag,2),1)") +--f.svo_debug_e_vo_vel_flag = ProtoField.none ("dji_p3_flyrec.svo_debug_e_vo_vel_flag", "E Vo Vel Flag", base.NONE, nil, 0x08, "bitand(shift_r(vo_flag,3),1)") +--f.svo_debug_e_gln_snr1 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr1", "E Gln Snr1", base.NONE, nil, 0x7f, "bitand(gln_snr1,127)") +--f.svo_debug_e_gln_snr2 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr2", "E Gln Snr2", base.NONE, nil, 0x7f, "bitand(gln_snr2,127)") +--f.svo_debug_e_gln_snr3 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr3", "E Gln Snr3", base.NONE, nil, 0x7f, "bitand(gln_snr3,127)") +--f.svo_debug_e_gln_snr4 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr4", "E Gln Snr4", base.NONE, nil, 0x7f, "bitand(gln_snr4,127)") +--f.svo_debug_e_gln_snr5 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr5", "E Gln Snr5", base.NONE, nil, 0x7f, "bitand(gln_snr5,127)") +--f.svo_debug_e_gln_snr6 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr6", "E Gln Snr6", base.NONE, nil, 0x7f, "bitand(gln_snr6,127)") +--f.svo_debug_e_gln_snr7 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr7", "E Gln Snr7", base.NONE, nil, 0x7f, "bitand(gln_snr7,127)") +--f.svo_debug_e_gln_snr8 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr8", "E Gln Snr8", base.NONE, nil, 0x7f, "bitand(gln_snr8,127)") +--f.svo_debug_e_gln_snr9 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr9", "E Gln Snr9", base.NONE, nil, 0x7f, "bitand(gln_snr9,127)") +--f.svo_debug_e_gln_snr10 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr10", "E Gln Snr10", base.NONE, nil, 0x7f, "bitand(gln_snr10,127)") +--f.svo_debug_e_gln_snr11 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr11", "E Gln Snr11", base.NONE, nil, 0x7f, "bitand(gln_snr11,127)") +--f.svo_debug_e_gln_snr12 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr12", "E Gln Snr12", base.NONE, nil, 0x7f, "bitand(gln_snr12,127)") +--f.svo_debug_e_gln_snr13 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr13", "E Gln Snr13", base.NONE, nil, 0x7f, "bitand(gln_snr13,127)") +--f.svo_debug_e_gln_snr14 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr14", "E Gln Snr14", base.NONE, nil, 0x7f, "bitand(gln_snr14,127)") +--f.svo_debug_e_gln_snr15 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr15", "E Gln Snr15", base.NONE, nil, 0x7f, "bitand(gln_snr15,127)") +--f.svo_debug_e_gln_snr16 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr16", "E Gln Snr16", base.NONE, nil, 0x7f, "bitand(gln_snr16,127)") +--f.svo_debug_e_gln_snr17 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr17", "E Gln Snr17", base.NONE, nil, 0x7f, "bitand(gln_snr17,127)") +--f.svo_debug_e_gln_snr18 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr18", "E Gln Snr18", base.NONE, nil, 0x7f, "bitand(gln_snr18,127)") +--f.svo_debug_e_gln_snr19 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr19", "E Gln Snr19", base.NONE, nil, 0x7f, "bitand(gln_snr19,127)") +--f.svo_debug_e_gln_snr20 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr20", "E Gln Snr20", base.NONE, nil, 0x7f, "bitand(gln_snr20,127)") +--f.svo_debug_e_gln_snr21 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr21", "E Gln Snr21", base.NONE, nil, 0x7f, "bitand(gln_snr21,127)") +--f.svo_debug_e_gln_snr22 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr22", "E Gln Snr22", base.NONE, nil, 0x7f, "bitand(gln_snr22,127)") +--f.svo_debug_e_gln_snr23 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr23", "E Gln Snr23", base.NONE, nil, 0x7f, "bitand(gln_snr23,127)") +--f.svo_debug_e_gln_snr24 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr24", "E Gln Snr24", base.NONE, nil, 0x7f, "bitand(gln_snr24,127)") +--f.svo_debug_e_gln_snr25 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr25", "E Gln Snr25", base.NONE, nil, 0x7f, "bitand(gln_snr25,127)") +--f.svo_debug_e_gln_snr26 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr26", "E Gln Snr26", base.NONE, nil, 0x7f, "bitand(gln_snr26,127)") +--f.svo_debug_e_gln_snr27 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr27", "E Gln Snr27", base.NONE, nil, 0x7f, "bitand(gln_snr27,127)") +--f.svo_debug_e_gln_snr28 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr28", "E Gln Snr28", base.NONE, nil, 0x7f, "bitand(gln_snr28,127)") +--f.svo_debug_e_gln_snr29 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr29", "E Gln Snr29", base.NONE, nil, 0x7f, "bitand(gln_snr29,127)") +--f.svo_debug_e_gln_snr30 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr30", "E Gln Snr30", base.NONE, nil, 0x7f, "bitand(gln_snr30,127)") +--f.svo_debug_e_gln_snr31 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr31", "E Gln Snr31", base.NONE, nil, 0x7f, "bitand(gln_snr31,127)") +--f.svo_debug_e_gln_snr32 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gln_snr32", "E Gln Snr32", base.NONE, nil, 0x7f, "bitand(gln_snr32,127)") +--f.svo_debug_e_gps_snr1 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr1", "E Gps Snr1", base.NONE, nil, 0x7f, "bitand(gps_snr1,127)") +--f.svo_debug_e_gps_snr2 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr2", "E Gps Snr2", base.NONE, nil, 0x7f, "bitand(gps_snr2,127)") +--f.svo_debug_e_gps_snr3 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr3", "E Gps Snr3", base.NONE, nil, 0x7f, "bitand(gps_snr3,127)") +--f.svo_debug_e_gps_snr4 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr4", "E Gps Snr4", base.NONE, nil, 0x7f, "bitand(gps_snr4,127)") +--f.svo_debug_e_gps_snr5 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr5", "E Gps Snr5", base.NONE, nil, 0x7f, "bitand(gps_snr5,127)") +--f.svo_debug_e_gps_snr6 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr6", "E Gps Snr6", base.NONE, nil, 0x7f, "bitand(gps_snr6,127)") +--f.svo_debug_e_gps_snr7 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr7", "E Gps Snr7", base.NONE, nil, 0x7f, "bitand(gps_snr7,127)") +--f.svo_debug_e_gps_snr8 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr8", "E Gps Snr8", base.NONE, nil, 0x7f, "bitand(gps_snr8,127)") +--f.svo_debug_e_gps_snr9 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr9", "E Gps Snr9", base.NONE, nil, 0x7f, "bitand(gps_snr9,127)") +--f.svo_debug_e_gps_snr10 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr10", "E Gps Snr10", base.NONE, nil, 0x7f, "bitand(gps_snr10,127)") +--f.svo_debug_e_gps_snr11 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr11", "E Gps Snr11", base.NONE, nil, 0x7f, "bitand(gps_snr11,127)") +--f.svo_debug_e_gps_snr12 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr12", "E Gps Snr12", base.NONE, nil, 0x7f, "bitand(gps_snr12,127)") +--f.svo_debug_e_gps_snr13 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr13", "E Gps Snr13", base.NONE, nil, 0x7f, "bitand(gps_snr13,127)") +--f.svo_debug_e_gps_snr14 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr14", "E Gps Snr14", base.NONE, nil, 0x7f, "bitand(gps_snr14,127)") +--f.svo_debug_e_gps_snr15 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr15", "E Gps Snr15", base.NONE, nil, 0x7f, "bitand(gps_snr15,127)") +--f.svo_debug_e_gps_snr16 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr16", "E Gps Snr16", base.NONE, nil, 0x7f, "bitand(gps_snr16,127)") +--f.svo_debug_e_gps_snr17 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr17", "E Gps Snr17", base.NONE, nil, 0x7f, "bitand(gps_snr17,127)") +--f.svo_debug_e_gps_snr18 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr18", "E Gps Snr18", base.NONE, nil, 0x7f, "bitand(gps_snr18,127)") +--f.svo_debug_e_gps_snr19 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr19", "E Gps Snr19", base.NONE, nil, 0x7f, "bitand(gps_snr19,127)") +--f.svo_debug_e_gps_snr20 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr20", "E Gps Snr20", base.NONE, nil, 0x7f, "bitand(gps_snr20,127)") +--f.svo_debug_e_gps_snr21 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr21", "E Gps Snr21", base.NONE, nil, 0x7f, "bitand(gps_snr21,127)") +--f.svo_debug_e_gps_snr22 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr22", "E Gps Snr22", base.NONE, nil, 0x7f, "bitand(gps_snr22,127)") +--f.svo_debug_e_gps_snr23 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr23", "E Gps Snr23", base.NONE, nil, 0x7f, "bitand(gps_snr23,127)") +--f.svo_debug_e_gps_snr24 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr24", "E Gps Snr24", base.NONE, nil, 0x7f, "bitand(gps_snr24,127)") +--f.svo_debug_e_gps_snr25 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr25", "E Gps Snr25", base.NONE, nil, 0x7f, "bitand(gps_snr25,127)") +--f.svo_debug_e_gps_snr26 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr26", "E Gps Snr26", base.NONE, nil, 0x7f, "bitand(gps_snr26,127)") +--f.svo_debug_e_gps_snr27 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr27", "E Gps Snr27", base.NONE, nil, 0x7f, "bitand(gps_snr27,127)") +--f.svo_debug_e_gps_snr28 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr28", "E Gps Snr28", base.NONE, nil, 0x7f, "bitand(gps_snr28,127)") +--f.svo_debug_e_gps_snr29 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr29", "E Gps Snr29", base.NONE, nil, 0x7f, "bitand(gps_snr29,127)") +--f.svo_debug_e_gps_snr30 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr30", "E Gps Snr30", base.NONE, nil, 0x7f, "bitand(gps_snr30,127)") +--f.svo_debug_e_gps_snr31 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr31", "E Gps Snr31", base.NONE, nil, 0x7f, "bitand(gps_snr31,127)") +--f.svo_debug_e_gps_snr32 = ProtoField.none ("dji_p3_flyrec.svo_debug_e_gps_snr32", "E Gps Snr32", base.NONE, nil, 0x7f, "bitand(gps_snr32,127)") + +local function flightrec_svo_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.svo_debug_visiondebug1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_debug_visiondebug2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_debug_visiondebug3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_debug_visiondebug4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_debug_visiondebug5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_debug_visiondebug6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_debug_visiondebug7, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_debug_visiondebug8, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Svo Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Svo Debug: Payload size different than expected") end +end + +-- Flight log - Uc Monitor - 0xcdf0 + +f.uc_monitor_cpu_usage = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_cpu_usage", "Cpu Usage", base.HEX) +f.uc_monitor_cpu_usage_task_b = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_cpu_usage_task_b", "Cpu Usage Task B", base.HEX) +f.uc_monitor_cpu_usage_task_a = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_cpu_usage_task_a", "Cpu Usage Task A", base.HEX) +f.uc_monitor_uc_resv0 = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_uc_resv0", "Uc Resv0", base.HEX) +f.uc_monitor_max_time_workqueue = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_max_time_workqueue", "Max Time Workqueue", base.HEX) +f.uc_monitor_max_time_task_b = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_max_time_task_b", "Max Time Task B", base.HEX) +f.uc_monitor_max_time_task_a = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_max_time_task_a", "Max Time Task A", base.HEX) +f.uc_monitor_max_time_task_c = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_max_time_task_c", "Max Time Task C", base.HEX) +f.uc_monitor_max_time_task_d = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_max_time_task_d", "Max Time Task D", base.HEX) +f.uc_monitor_uc_resv1 = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_uc_resv1", "Uc Resv1", base.HEX) +f.uc_monitor_stack_usage_irq = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_stack_usage_irq", "Stack Usage Irq", base.HEX) +f.uc_monitor_stack_usage_workqueue = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_stack_usage_workqueue", "Stack Usage Workqueue", base.HEX) +f.uc_monitor_stack_usage_b = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_stack_usage_b", "Stack Usage B", base.HEX) +f.uc_monitor_stack_usage_a = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_stack_usage_a", "Stack Usage A", base.HEX) +f.uc_monitor_stack_usage_c = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_stack_usage_c", "Stack Usage C", base.HEX) +f.uc_monitor_stack_usage_d = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_stack_usage_d", "Stack Usage D", base.HEX) +f.uc_monitor_uc_resv2 = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_uc_resv2", "Uc Resv2", base.HEX) +f.uc_monitor_pend_cnt_a = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_pend_cnt_a", "Pend Cnt A", base.HEX) +f.uc_monitor_pend_cnt_b = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_pend_cnt_b", "Pend Cnt B", base.HEX) +f.uc_monitor_pend_cnt_c = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_pend_cnt_c", "Pend Cnt C", base.HEX) +f.uc_monitor_pend_cnt_d = ProtoField.uint16 ("dji_p3_flyrec.uc_monitor_pend_cnt_d", "Pend Cnt D", base.HEX) + +local function flightrec_uc_monitor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.uc_monitor_cpu_usage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_cpu_usage_task_b, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_cpu_usage_task_a, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_uc_resv0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_max_time_workqueue, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_max_time_task_b, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_max_time_task_a, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_max_time_task_c, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_max_time_task_d, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_uc_resv1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_stack_usage_irq, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_stack_usage_workqueue, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_stack_usage_b, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_stack_usage_a, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_stack_usage_c, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_stack_usage_d, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_uc_resv2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_pend_cnt_a, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_pend_cnt_b, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_pend_cnt_c, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uc_monitor_pend_cnt_d, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 42) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Uc Monitor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Uc Monitor: Payload size different than expected") end +end + +-- Flight log - Rc Delay - 0xcdff + +f.rc_delay_dly_ns = ProtoField.uint32 ("dji_p3_flyrec.rc_delay_dly_ns", "Dly Ns", base.HEX) + +local function flightrec_rc_delay_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_delay_dly_ns, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Delay: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Delay: Payload size different than expected") end +end + +-- Flight log - Taskb Info - 0xce02 + +f.taskb_info_period_jitter0 = ProtoField.int32 ("dji_p3_flyrec.taskb_info_period_jitter0", "Period Jitter0", base.DEC) +f.taskb_info_exec_time0 = ProtoField.uint16 ("dji_p3_flyrec.taskb_info_exec_time0", "Exec Time0", base.HEX) +f.taskb_info_pending0 = ProtoField.uint16 ("dji_p3_flyrec.taskb_info_pending0", "Pending0", base.HEX) + +local function flightrec_taskb_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.taskb_info_period_jitter0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.taskb_info_exec_time0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.taskb_info_pending0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Taskb Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Taskb Info: Payload size different than expected") end +end + +-- Flight log - Taska Info - 0xce06 + +f.taska_info_period_jitter1 = ProtoField.int32 ("dji_p3_flyrec.taska_info_period_jitter1", "Period Jitter1", base.DEC) +f.taska_info_exec_time1 = ProtoField.uint16 ("dji_p3_flyrec.taska_info_exec_time1", "Exec Time1", base.HEX) +f.taska_info_pending1 = ProtoField.uint16 ("dji_p3_flyrec.taska_info_pending1", "Pending1", base.HEX) + +local function flightrec_taska_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.taska_info_period_jitter1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.taska_info_exec_time1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.taska_info_pending1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Taska Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Taska Info: Payload size different than expected") end +end + +-- Flight log - Taskc Info - 0xce08 + +f.taskc_info_period_jitter2 = ProtoField.int32 ("dji_p3_flyrec.taskc_info_period_jitter2", "Period Jitter2", base.DEC) +f.taskc_info_exec_time2 = ProtoField.uint16 ("dji_p3_flyrec.taskc_info_exec_time2", "Exec Time2", base.HEX) +f.taskc_info_pending2 = ProtoField.uint16 ("dji_p3_flyrec.taskc_info_pending2", "Pending2", base.HEX) + +local function flightrec_taskc_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.taskc_info_period_jitter2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.taskc_info_exec_time2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.taskc_info_pending2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Taskc Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Taskc Info: Payload size different than expected") end +end + +-- Flight log - Taskd Info - 0xce09 + +f.taskd_info_period_jitter3 = ProtoField.int32 ("dji_p3_flyrec.taskd_info_period_jitter3", "Period Jitter3", base.DEC) +f.taskd_info_exec_time3 = ProtoField.uint16 ("dji_p3_flyrec.taskd_info_exec_time3", "Exec Time3", base.HEX) +f.taskd_info_pending3 = ProtoField.uint16 ("dji_p3_flyrec.taskd_info_pending3", "Pending3", base.HEX) + +local function flightrec_taskd_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.taskd_info_period_jitter3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.taskd_info_exec_time3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.taskd_info_pending3, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Taskd Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Taskd Info: Payload size different than expected") end +end + +-- Flight log - Rc Replay - 0xcdf6 + +f.rc_replay_cmd_alieron = ProtoField.int16 ("dji_p3_flyrec.rc_replay_cmd_alieron", "Cmd Alieron", base.DEC) +f.rc_replay_cmd_elevator = ProtoField.int16 ("dji_p3_flyrec.rc_replay_cmd_elevator", "Cmd Elevator", base.DEC) +f.rc_replay_cmd_throttle = ProtoField.int16 ("dji_p3_flyrec.rc_replay_cmd_throttle", "Cmd Throttle", base.DEC) +f.rc_replay_cmd_rudder = ProtoField.int16 ("dji_p3_flyrec.rc_replay_cmd_rudder", "Cmd Rudder", base.DEC) +f.rc_replay_cmd_mode = ProtoField.int16 ("dji_p3_flyrec.rc_replay_cmd_mode", "Cmd Mode", base.DEC) +f.rc_replay_cmd_ioc = ProtoField.int16 ("dji_p3_flyrec.rc_replay_cmd_ioc", "Cmd Ioc", base.DEC) +f.rc_replay_cmd_go_home = ProtoField.int16 ("dji_p3_flyrec.rc_replay_cmd_go_home", "Cmd Go Home", base.DEC) +f.rc_replay_cmd_d4 = ProtoField.int16 ("dji_p3_flyrec.rc_replay_cmd_d4", "Cmd D4", base.DEC) + +local function flightrec_rc_replay_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_replay_cmd_alieron, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_replay_cmd_elevator, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_replay_cmd_throttle, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_replay_cmd_rudder, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_replay_cmd_mode, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_replay_cmd_ioc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_replay_cmd_go_home, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_replay_cmd_d4, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Replay: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Replay: Payload size different than expected") end +end + +-- Flight log - Escm - 0xcdf1 + +f.escm_esc1_status = ProtoField.uint8 ("dji_p3_flyrec.escm_esc1_status", "Esc1 Status", base.HEX) +f.escm_esc1_current = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_current", "Esc1 Current", base.DEC) +f.escm_esc1_speed = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_speed", "Esc1 Speed", base.DEC) +f.escm_esc1_voltage = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_voltage", "Esc1 Voltage", base.DEC) +f.escm_esc1_temperature = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_temperature", "Esc1 Temperature", base.DEC) +f.escm_esc1_ppm_recv = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_ppm_recv", "Esc1 Ppm Recv", base.DEC) +f.escm_esc1_v_out = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_v_out", "Esc1 V Out", base.DEC) +f.escm_esc1_debug0 = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_debug0", "Esc1 Debug0", base.DEC) +f.escm_esc1_debug1 = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_debug1", "Esc1 Debug1", base.DEC) +f.escm_esc1_debug2 = ProtoField.int16 ("dji_p3_flyrec.escm_esc1_debug2", "Esc1 Debug2", base.DEC) +f.escm_esc2_status = ProtoField.uint8 ("dji_p3_flyrec.escm_esc2_status", "Esc2 Status", base.HEX) +f.escm_esc2_current = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_current", "Esc2 Current", base.DEC) +f.escm_esc2_speed = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_speed", "Esc2 Speed", base.DEC) +f.escm_esc2_voltage = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_voltage", "Esc2 Voltage", base.DEC) +f.escm_esc2_temperature = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_temperature", "Esc2 Temperature", base.DEC) +f.escm_esc2_ppm_recv = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_ppm_recv", "Esc2 Ppm Recv", base.DEC) +f.escm_esc2_v_out = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_v_out", "Esc2 V Out", base.DEC) +f.escm_esc2_debug0 = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_debug0", "Esc2 Debug0", base.DEC) +f.escm_esc2_debug1 = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_debug1", "Esc2 Debug1", base.DEC) +f.escm_esc2_debug2 = ProtoField.int16 ("dji_p3_flyrec.escm_esc2_debug2", "Esc2 Debug2", base.DEC) +f.escm_esc3_status = ProtoField.uint8 ("dji_p3_flyrec.escm_esc3_status", "Esc3 Status", base.HEX) +f.escm_esc3_current = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_current", "Esc3 Current", base.DEC) +f.escm_esc3_speed = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_speed", "Esc3 Speed", base.DEC) +f.escm_esc3_voltage = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_voltage", "Esc3 Voltage", base.DEC) +f.escm_esc3_temperature = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_temperature", "Esc3 Temperature", base.DEC) +f.escm_esc3_ppm_recv = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_ppm_recv", "Esc3 Ppm Recv", base.DEC) +f.escm_esc3_v_out = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_v_out", "Esc3 V Out", base.DEC) +f.escm_esc3_debug0 = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_debug0", "Esc3 Debug0", base.DEC) +f.escm_esc3_debug1 = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_debug1", "Esc3 Debug1", base.DEC) +f.escm_esc3_debug2 = ProtoField.int16 ("dji_p3_flyrec.escm_esc3_debug2", "Esc3 Debug2", base.DEC) +f.escm_esc4_status = ProtoField.uint8 ("dji_p3_flyrec.escm_esc4_status", "Esc4 Status", base.HEX) +f.escm_esc4_current = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_current", "Esc4 Current", base.DEC) +f.escm_esc4_speed = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_speed", "Esc4 Speed", base.DEC) +f.escm_esc4_voltage = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_voltage", "Esc4 Voltage", base.DEC) +f.escm_esc4_temperature = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_temperature", "Esc4 Temperature", base.DEC) +f.escm_esc4_ppm_recv = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_ppm_recv", "Esc4 Ppm Recv", base.DEC) +f.escm_esc4_v_out = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_v_out", "Esc4 V Out", base.DEC) +f.escm_esc4_debug0 = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_debug0", "Esc4 Debug0", base.DEC) +f.escm_esc4_debug1 = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_debug1", "Esc4 Debug1", base.DEC) +f.escm_esc4_debug2 = ProtoField.int16 ("dji_p3_flyrec.escm_esc4_debug2", "Esc4 Debug2", base.DEC) + +local function flightrec_escm_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.escm_esc1_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.escm_esc1_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc1_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc1_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc1_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc1_ppm_recv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc1_v_out, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc1_debug0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc1_debug1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc1_debug2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.escm_esc2_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_ppm_recv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_v_out, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_debug0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_debug1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc2_debug2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.escm_esc3_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_ppm_recv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_v_out, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_debug0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_debug1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc3_debug2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.escm_esc4_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_ppm_recv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_v_out, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_debug0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_debug1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.escm_esc4_debug2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 76) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Escm: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Escm: Payload size different than expected") end +end + +-- Flight log - Sweep - 0xcdf2 + +f.sweep_ppm = ProtoField.uint16 ("dji_p3_flyrec.sweep_ppm", "Ppm", base.HEX) + +local function flightrec_sweep_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.sweep_ppm, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Sweep: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Sweep: Payload size different than expected") end +end + +-- Flight log - Mvo - 0x000e + +f.mvo_mvo_px = ProtoField.float ("dji_p3_flyrec.mvo_mvo_px", "Mvo Px", base.DEC) +f.mvo_mvo_py = ProtoField.float ("dji_p3_flyrec.mvo_mvo_py", "Mvo Py", base.DEC) +f.mvo_mvo_pz = ProtoField.float ("dji_p3_flyrec.mvo_mvo_pz", "Mvo Pz", base.DEC) +f.mvo_mvo_vx = ProtoField.int16 ("dji_p3_flyrec.mvo_mvo_vx", "Mvo Vx", base.DEC) +f.mvo_mvo_vy = ProtoField.int16 ("dji_p3_flyrec.mvo_mvo_vy", "Mvo Vy", base.DEC) +f.mvo_mvo_vz = ProtoField.int16 ("dji_p3_flyrec.mvo_mvo_vz", "Mvo Vz", base.DEC) +f.mvo_mvo_cnt = ProtoField.uint8 ("dji_p3_flyrec.mvo_mvo_cnt", "Mvo Cnt", base.HEX) +f.mvo_mvo_flag = ProtoField.uint8 ("dji_p3_flyrec.mvo_mvo_flag", "Mvo Flag", base.HEX) + f.mvo_e_mvo_px_flag = ProtoField.uint8 ("dji_p3_flyrec.mvo_e_mvo_px_flag", "E Mvo Px Flag", base.HEX, nil, 0x10, nil) + f.mvo_e_mvo_py_flag = ProtoField.uint8 ("dji_p3_flyrec.mvo_e_mvo_py_flag", "E Mvo Py Flag", base.HEX, nil, 0x20, nil) + f.mvo_e_mvo_pz_flag = ProtoField.uint8 ("dji_p3_flyrec.mvo_e_mvo_pz_flag", "E Mvo Pz Flag", base.HEX, nil, 0x40, "Vision height valid flag; 0=not valid, 1=valid") + f.mvo_e_mvo_vx_flag = ProtoField.uint8 ("dji_p3_flyrec.mvo_e_mvo_vx_flag", "E Mvo Vx Flag", base.HEX, nil, 0x01, nil) + f.mvo_e_mvo_vy_flag = ProtoField.uint8 ("dji_p3_flyrec.mvo_e_mvo_vy_flag", "E Mvo Vy Flag", base.HEX, nil, 0x02, nil) + f.mvo_e_mvo_vz_flag = ProtoField.uint8 ("dji_p3_flyrec.mvo_e_mvo_vz_flag", "E Mvo Vz Flag", base.HEX, nil, 0x04, nil) + +local function flightrec_mvo_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.mvo_mvo_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mvo_mvo_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mvo_mvo_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mvo_mvo_vx, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mvo_mvo_vy, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mvo_mvo_vz, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.mvo_mvo_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mvo_mvo_flag, payload(offset, 1)) + subtree:add_le (f.mvo_e_mvo_px_flag, payload(offset, 1)) + subtree:add_le (f.mvo_e_mvo_py_flag, payload(offset, 1)) + subtree:add_le (f.mvo_e_mvo_pz_flag, payload(offset, 1)) + subtree:add_le (f.mvo_e_mvo_vx_flag, payload(offset, 1)) + subtree:add_le (f.mvo_e_mvo_vy_flag, payload(offset, 1)) + subtree:add_le (f.mvo_e_mvo_vz_flag, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Mvo: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Mvo: Payload size different than expected") end +end + +-- Flight log - Usonic - 0x0010 + +f.usonic_usonic_h = ProtoField.int16 ("dji_p3_flyrec.usonic_usonic_h", "Usonic H", base.DEC, nil, nil, "Ultrasonic sensor measurement; unit:mm") +f.usonic_usonic_flag = ProtoField.uint8 ("dji_p3_flyrec.usonic_usonic_flag", "Usonic Flag", base.HEX) + f.usonic_e_us_flag_old = ProtoField.uint8 ("dji_p3_flyrec.usonic_e_us_flag_old", "E Us Flag Old", base.HEX, nil, 0x01, "Ultrasonic sensor valid flag; 0=not valid, 1=valid") +f.usonic_usonic_cnt = ProtoField.uint8 ("dji_p3_flyrec.usonic_usonic_cnt", "Usonic Cnt", base.HEX) + +local function flightrec_usonic_dissector(payload, pinfo, subtree) + local offset = 0 + local info_str = "" + + subtree:add_le (f.usonic_usonic_h, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.usonic_usonic_flag, payload(offset, 1)) + subtree:add_le (f.usonic_e_us_flag_old, payload(offset, 1)) + offset = offset + 1 + + local rec_usonic_usonic_cnt = payload(offset, 1) + subtree:add_le (f.usonic_usonic_cnt, rec_usonic_usonic_cnt) + offset = offset + 1 + + --pinfo.cols.info = info_str + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Usonic: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Usonic: Payload size different than expected") end +end + +-- Flight log - Console - 0xcdef + +f.console_text = ProtoField.string ("dji_p3_flyrec.console_text", "Console", base.ASCII) + +local function flightrec_console_dissector(payload, pinfo, subtree) + local offset = 0 + + local rec_console_text = payload(offset, payload:len() - offset) + subtree:add (f.console_text, rec_console_text) + + pinfo.cols.info = rec_console_text:string():gsub('[^a-zA-Z0-9_:,.[[]]/\\ \t-]','') +end + +-- Flight log - Syscfg - 0xffff + +f.syscfg_text = ProtoField.string ("dji_p3_flyrec.syscfg_text", "Syscfg", base.ASCII) + +local function flightrec_syscfg_dissector(payload, pinfo, subtree) + local offset = 0 + + local rec_syscfg_text = payload(offset, payload:len() - offset) + subtree:add (f.syscfg_text, rec_syscfg_text) + + pinfo.cols.info = rec_syscfg_text:string():gsub('[^a-zA-Z0-9_:,.[[]]/\\ \t-]','') +end + +-- Flight log - Battery Info - 0x0011 + +f.battery_info_design_capacity = ProtoField.uint16 ("dji_p3_flyrec.battery_info_design_capacity", "Design Capacity", base.DEC) +f.battery_info_full_charge_capacity = ProtoField.uint16 ("dji_p3_flyrec.battery_info_full_charge_capacity", "Full Charge Capacity", base.DEC) +f.battery_info_remaining_capacity = ProtoField.uint16 ("dji_p3_flyrec.battery_info_remaining_capacity", "Remaining Capacity", base.DEC) +f.battery_info_pack_voltage = ProtoField.uint16 ("dji_p3_flyrec.battery_info_pack_voltage", "Pack Voltage", base.DEC) +f.battery_info_current = ProtoField.int16 ("dji_p3_flyrec.battery_info_current", "Current", base.DEC) +f.battery_info_life_percentage = ProtoField.uint8 ("dji_p3_flyrec.battery_info_life_percentage", "Life Percentage", base.DEC) +f.battery_info_capacity_percentage = ProtoField.uint8 ("dji_p3_flyrec.battery_info_capacity_percentage", "Capacity Percentage", base.DEC) +f.battery_info_temperature = ProtoField.int16 ("dji_p3_flyrec.battery_info_temperature", "Temperature", base.DEC) +f.battery_info_cycle_count = ProtoField.uint16 ("dji_p3_flyrec.battery_info_cycle_count", "Cycle Count", base.DEC) +f.battery_info_serial_number = ProtoField.uint16 ("dji_p3_flyrec.battery_info_serial_number", "Serial Number", base.HEX) +f.battery_info_cell1 = ProtoField.uint16 ("dji_p3_flyrec.battery_info_cell1", "Cell1 Voltage", base.DEC) +f.battery_info_cell2 = ProtoField.uint16 ("dji_p3_flyrec.battery_info_cell2", "Cell2 Voltage", base.DEC) +f.battery_info_cell3 = ProtoField.uint16 ("dji_p3_flyrec.battery_info_cell3", "Cell3 Voltage", base.DEC) +f.battery_info_cell4 = ProtoField.uint16 ("dji_p3_flyrec.battery_info_cell4", "Cell4 Voltage", base.DEC) +f.battery_info_cell5 = ProtoField.uint16 ("dji_p3_flyrec.battery_info_cell5", "Cell5 Voltage", base.DEC) +f.battery_info_cell6 = ProtoField.uint16 ("dji_p3_flyrec.battery_info_cell6", "Cell6 Voltage", base.DEC) +f.battery_info_average_current = ProtoField.int16 ("dji_p3_flyrec.battery_info_average_current", "Average Current", base.DEC) +f.battery_info_right = ProtoField.uint8 ("dji_p3_flyrec.battery_info_right", "Right", base.HEX) +f.battery_info_error_count = ProtoField.uint32 ("dji_p3_flyrec.battery_info_error_count", "Error Count", base.DEC) -- possible that only lower 8 bits store error count +f.battery_info_n_discharge_times = ProtoField.uint32 ("dji_p3_flyrec.battery_info_n_discharge_times", "N Discharge Times", base.DEC) +f.battery_info_current_status = ProtoField.uint32 ("dji_p3_flyrec.battery_info_current_status", "Current Status", base.HEX) +--f.battery_info_vol_main = ProtoField.uint16 ("dji_p3_flyrec.battery_info_vol_main", "Vol Main", base.HEX) + +local function flightrec_battery_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_info_design_capacity, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_full_charge_capacity, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_remaining_capacity, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_pack_voltage, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_life_percentage, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_capacity_percentage, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_temperature, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cycle_count, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_serial_number, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cell1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cell2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cell3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cell4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cell5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cell6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_average_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_right, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_error_count, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_n_discharge_times, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_current_status, payload(offset, 4)) + offset = offset + 4 + + --subtree:add_le (f.battery_info_vol_main, payload(offset, 2)) + --offset = offset + 2 + + if (offset ~= 45) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Info: Payload size different than expected") end +end + +-- Flight log - Special Cmd - 0x0017 + +f.special_cmd_byte1 = ProtoField.uint8 ("dji_p3_flyrec.special_cmd_byte1", "Byte1", base.HEX) +f.special_cmd_byte2 = ProtoField.uint8 ("dji_p3_flyrec.special_cmd_byte2", "Byte2", base.HEX) +f.special_cmd_word1 = ProtoField.uint16 ("dji_p3_flyrec.special_cmd_word1", "Word1", base.HEX) +f.special_cmd_byte3 = ProtoField.uint8 ("dji_p3_flyrec.special_cmd_byte3", "Byte3", base.HEX) +f.special_cmd_ctrl_action = ProtoField.uint8 ("dji_p3_flyrec.special_cmd_ctrl_action", "Ctrl Action", base.HEX) +f.special_cmd_byte4 = ProtoField.uint8 ("dji_p3_flyrec.special_cmd_byte4", "Byte4", base.HEX) +f.special_cmd_byte5 = ProtoField.uint8 ("dji_p3_flyrec.special_cmd_byte5", "Byte5", base.HEX) +f.special_cmd_byte6 = ProtoField.uint8 ("dji_p3_flyrec.special_cmd_byte6", "Byte6", base.HEX) +f.special_cmd_byte7 = ProtoField.uint8 ("dji_p3_flyrec.special_cmd_byte7", "Byte7", base.HEX) + +local function flightrec_special_cmd_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.special_cmd_byte1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_cmd_byte2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_cmd_word1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.special_cmd_byte3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_cmd_ctrl_action, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_cmd_byte4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_cmd_byte5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_cmd_byte6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.special_cmd_byte7, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Special Cmd: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Special Cmd: Payload size different than expected") end +end + +-- Flight log - Serial Api Inputs - 0x003c + +f.serial_api_inputs_user_req_ctrl_flag = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_user_req_ctrl_flag", "User Req Ctrl Flag", base.HEX) +f.serial_api_inputs_user_req_roll_or_x = ProtoField.float ("dji_p3_flyrec.serial_api_inputs_user_req_roll_or_x", "User Req Roll Or X", base.DEC) +f.serial_api_inputs_user_req_pitch_or_y = ProtoField.float ("dji_p3_flyrec.serial_api_inputs_user_req_pitch_or_y", "User Req Pitch Or Y", base.DEC) +f.serial_api_inputs_user_req_thr_z = ProtoField.float ("dji_p3_flyrec.serial_api_inputs_user_req_thr_z", "User Req Thr Z", base.DEC) +f.serial_api_inputs_user_req_yaw = ProtoField.float ("dji_p3_flyrec.serial_api_inputs_user_req_yaw", "User Req Yaw", base.DEC) +f.serial_api_inputs_nav_cur_dev = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_nav_cur_dev", "Nav Cur Dev", base.HEX) +f.serial_api_inputs_api_cur_sub_mode = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_api_cur_sub_mode", "Api Cur Sub Mode", base.HEX) +f.serial_api_inputs_api_user_ctrl_data_health = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_api_user_ctrl_data_health", "Api User Ctrl Data Health", base.HEX) +f.serial_api_inputs_api_app_ctrl_data_health = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_api_app_ctrl_data_health", "Api App Ctrl Data Health", base.HEX) +f.serial_api_inputs_user_open_close_req = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_user_open_close_req", "User Open Close Req", base.HEX) +f.serial_api_inputs_user_open_close_ack = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_user_open_close_ack", "User Open Close Ack", base.HEX) +f.serial_api_inputs_user_flight_cmd_req = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_user_flight_cmd_req", "User Flight Cmd Req", base.HEX) +f.serial_api_inputs_user_flight_cmd_ack = ProtoField.uint8 ("dji_p3_flyrec.serial_api_inputs_user_flight_cmd_ack", "User Flight Cmd Ack", base.HEX) + +local function flightrec_serial_api_inputs_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.serial_api_inputs_user_req_ctrl_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_user_req_roll_or_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.serial_api_inputs_user_req_pitch_or_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.serial_api_inputs_user_req_thr_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.serial_api_inputs_user_req_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.serial_api_inputs_nav_cur_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_api_cur_sub_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_api_user_ctrl_data_health, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_api_app_ctrl_data_health, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_user_open_close_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_user_open_close_ack, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_user_flight_cmd_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_user_flight_cmd_ack, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 25) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Serial Api Inputs: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Serial Api Inputs: Payload size different than expected") end +end + +-- Flight log - Ctrl Vert - 0x0032 + +f.ctrl_vert_vert_module_module_mode = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_module_module_mode", "Vert Module Module Mode", base.HEX) +f.ctrl_vert_vert_module_vert_hover_state = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_module_vert_hover_state", "Vert Module Vert Hover State", base.HEX) +f.ctrl_vert_vert_module_vert_hover_enable = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_module_vert_hover_enable", "Vert Module Vert Hover Enable", base.HEX) +f.ctrl_vert_vert_module_vert_hover_pos = ProtoField.float ("dji_p3_flyrec.ctrl_vert_vert_module_vert_hover_pos", "Vert Module Vert Hover Pos", base.DEC) +f.ctrl_vert_vert_module_vert_hover_brake_timer = ProtoField.float ("dji_p3_flyrec.ctrl_vert_vert_module_vert_hover_brake_timer", "Vert Module Vert Hover Brake Timer", base.DEC) +f.ctrl_vert_vert_module_take_off_thrust = ProtoField.float ("dji_p3_flyrec.ctrl_vert_vert_module_take_off_thrust", "Vert Module Take Off Thrust", base.DEC) +f.ctrl_vert_vert_module_auto_take_off_state = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_module_auto_take_off_state", "Vert Module Auto Take Off State", base.HEX) +f.ctrl_vert_vert_module_auto_take_off_height = ProtoField.float ("dji_p3_flyrec.ctrl_vert_vert_module_auto_take_off_height", "Vert Module Auto Take Off Height", base.DEC) +f.ctrl_vert_api_vert_ctrl_mode = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_api_vert_ctrl_mode", "Api Vert Ctrl Mode", base.HEX) +f.ctrl_vert_api_vert_ctrl_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_api_vert_ctrl_cmd_id", "Api Vert Ctrl Cmd Id", base.HEX) +f.ctrl_vert_vert_pos_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_pos_status", "Vert Pos Status", base.HEX) +f.ctrl_vert_vert_pos_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_pos_cmd_id", "Vert Pos Cmd Id", base.HEX) +f.ctrl_vert_vert_pos_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_pos_feedback_id", "Vert Pos Feedback Id", base.HEX) +f.ctrl_vert_vert_pos_cmd = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_pos_cmd", "Vert Pos Cmd", base.DEC) +f.ctrl_vert_vert_pos_feedback = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_pos_feedback", "Vert Pos Feedback", base.DEC) +f.ctrl_vert_vert_pos_p_ctrl = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_pos_p_ctrl", "Vert Pos P Ctrl", base.DEC) +f.ctrl_vert_vert_pos_output = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_pos_output", "Vert Pos Output", base.DEC) +f.ctrl_vert_vert_vel_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_vel_status", "Vert Vel Status", base.HEX) +f.ctrl_vert_vert_vel_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_vel_cmd_id", "Vert Vel Cmd Id", base.HEX) +f.ctrl_vert_vert_vel_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_vel_feedback_id", "Vert Vel Feedback Id", base.HEX) +f.ctrl_vert_vert_vel_cmd = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_vel_cmd", "Vert Vel Cmd", base.DEC) +f.ctrl_vert_vert_vel_cmd_before_limit = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_vel_cmd_before_limit", "Vert Vel Cmd Before Limit", base.DEC) +f.ctrl_vert_vert_vel_cmd_after_limit = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_vel_cmd_after_limit", "Vert Vel Cmd After Limit", base.DEC) +f.ctrl_vert_vert_vel_feedback = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_vel_feedback", "Vert Vel Feedback", base.DEC) +f.ctrl_vert_vert_vel_p_ctrl = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_vel_p_ctrl", "Vert Vel P Ctrl", base.DEC) +f.ctrl_vert_vert_vel_output = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_vel_output", "Vert Vel Output", base.DEC) +f.ctrl_vert_vert_acc_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_acc_status", "Vert Acc Status", base.HEX) +f.ctrl_vert_vert_acc_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_acc_cmd_id", "Vert Acc Cmd Id", base.HEX) +f.ctrl_vert_vert_acc_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_acc_feedback_id", "Vert Acc Feedback Id", base.HEX) +f.ctrl_vert_vert_acc_cmd = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_acc_cmd", "Vert Acc Cmd", base.DEC) +f.ctrl_vert_vert_acc_feedback = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_acc_feedback", "Vert Acc Feedback", base.DEC) +f.ctrl_vert_vert_acc_p_ctrl = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_acc_p_ctrl", "Vert Acc P Ctrl", base.DEC) +f.ctrl_vert_vert_acc_i_ctrl = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_acc_i_ctrl", "Vert Acc I Ctrl", base.DEC) +f.ctrl_vert_vert_acc_feedforward = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_acc_feedforward", "Vert Acc Feedforward", base.DEC) +f.ctrl_vert_vert_acc_output = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_acc_output", "Vert Acc Output", base.DEC) +f.ctrl_vert_vert_thrust_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_thrust_status", "Vert Thrust Status", base.HEX) +f.ctrl_vert_vert_thrust_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_thrust_cmd_id", "Vert Thrust Cmd Id", base.HEX) +f.ctrl_vert_vert_thrust_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_vert_vert_thrust_feedback_id", "Vert Thrust Feedback Id", base.HEX) +f.ctrl_vert_vert_thrust_cmd_data = ProtoField.int16 ("dji_p3_flyrec.ctrl_vert_vert_thrust_cmd_data", "Vert Thrust Cmd Data", base.DEC) + +local function flightrec_ctrl_vert_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_vert_vert_module_module_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_module_vert_hover_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_module_vert_hover_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_module_vert_hover_pos, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_vert_module_vert_hover_brake_timer, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_vert_module_take_off_thrust, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_vert_module_auto_take_off_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_module_auto_take_off_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_api_vert_ctrl_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_api_vert_ctrl_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_pos_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_pos_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_pos_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_pos_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_pos_feedback, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_pos_p_ctrl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_pos_output, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_vel_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_vel_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_vel_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_vel_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_vel_cmd_before_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_vel_cmd_after_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_vel_feedback, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_vel_p_ctrl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_vel_output, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_acc_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_acc_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_acc_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_acc_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_acc_feedback, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_acc_p_ctrl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_acc_i_ctrl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_acc_feedforward, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_acc_output, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vert_vert_thrust_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_thrust_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_thrust_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_vert_thrust_cmd_data, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Vert: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Vert: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz - 0x0033 + +f.ctrl_horiz_horiz_module_module_mode = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_module_module_mode", "Horiz Module Module Mode", base.HEX) +f.ctrl_horiz_horiz_module_horiz_hover_state = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_hover_state", "Horiz Module Horiz Hover State", base.HEX) +f.ctrl_horiz_horiz_module_horiz_hover_enable = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_hover_enable", "Horiz Module Horiz Hover Enable", base.HEX) +f.ctrl_horiz_horiz_module_horiz_hover_abs_pos_0 = ProtoField.double ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_hover_abs_pos_0", "Horiz Module Horiz Hover Abs Pos 0", base.DEC) +f.ctrl_horiz_horiz_module_horiz_hover_abs_pos_1 = ProtoField.double ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_hover_abs_pos_1", "Horiz Module Horiz Hover Abs Pos 1", base.DEC) +f.ctrl_horiz_horiz_module_horiz_hover_rel_pos_0 = ProtoField.float ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_hover_rel_pos_0", "Horiz Module Horiz Hover Rel Pos 0", base.DEC) +f.ctrl_horiz_horiz_module_horiz_hover_rel_pos_1 = ProtoField.float ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_hover_rel_pos_1", "Horiz Module Horiz Hover Rel Pos 1", base.DEC) +f.ctrl_horiz_horiz_module_horiz_hover_brake_timer = ProtoField.float ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_hover_brake_timer", "Horiz Module Horiz Hover Brake Timer", base.DEC) +f.ctrl_horiz_horiz_module_horiz_pos_offset_0 = ProtoField.float ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_pos_offset_0", "Horiz Module Horiz Pos Offset 0", base.DEC) +f.ctrl_horiz_horiz_module_horiz_pos_offset_1 = ProtoField.float ("dji_p3_flyrec.ctrl_horiz_horiz_module_horiz_pos_offset_1", "Horiz Module Horiz Pos Offset 1", base.DEC) +f.ctrl_horiz_api_horiz_ctrl_mode = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_api_horiz_ctrl_mode", "Api Horiz Ctrl Mode", base.HEX) +f.ctrl_horiz_api_horiz_ctrl_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_api_horiz_ctrl_cmd_id", "Api Horiz Ctrl Cmd Id", base.HEX) +f.ctrl_horiz_api_torsion_ctrl_mode = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_api_torsion_ctrl_mode", "Api Torsion Ctrl Mode", base.HEX) +f.ctrl_horiz_api_torsion_ctrl_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_api_torsion_ctrl_cmd_id", "Api Torsion Ctrl Cmd Id", base.HEX) +f.ctrl_horiz_api_atti_cmd_type = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_api_atti_cmd_type", "Api Atti Cmd Type", base.HEX) +f.ctrl_horiz_api_atti_unkn2C = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_api_atti_unkn2C", "Api Atti Unknown 2C", base.HEX) +f.ctrl_horiz_horiz_pos_tag_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_tag_status", "Horiz Pos Tag Status", base.HEX) +f.ctrl_horiz_horiz_pos_tag_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_tag_cmd_id", "Horiz Pos Tag Cmd Id", base.HEX) +f.ctrl_horiz_horiz_pos_tag_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_tag_feedback_id", "Horiz Pos Tag Feedback Id", base.HEX) +f.ctrl_horiz_horiz_pos_cmd_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_cmd_x", "Horiz Pos Cmd X", base.DEC) +f.ctrl_horiz_horiz_pos_cmd_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_cmd_y", "Horiz Pos Cmd Y", base.DEC) +f.ctrl_horiz_horiz_pos_feedback_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_feedback_x", "Horiz Pos Feedback X", base.DEC) +f.ctrl_horiz_horiz_pos_feedback_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_feedback_y", "Horiz Pos Feedback Y", base.DEC) +f.ctrl_horiz_horiz_pos_p_ctrl_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_p_ctrl_x", "Horiz Pos P Ctrl X", base.DEC) +f.ctrl_horiz_horiz_pos_p_ctrl_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_p_ctrl_y", "Horiz Pos P Ctrl Y", base.DEC) +f.ctrl_horiz_horiz_pos_d_ctrl_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_d_ctrl_x", "Horiz Pos D Ctrl X", base.DEC) +f.ctrl_horiz_horiz_pos_d_ctrl_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_d_ctrl_y", "Horiz Pos D Ctrl Y", base.DEC) +f.ctrl_horiz_horiz_pos_output_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_output_x", "Horiz Pos Output X", base.DEC) +f.ctrl_horiz_horiz_pos_output_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_pos_output_y", "Horiz Pos Output Y", base.DEC) +f.ctrl_horiz_horiz_vel_tag_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_tag_status", "Horiz Vel Tag Status", base.HEX) +f.ctrl_horiz_horiz_vel_tag_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_tag_cmd_id", "Horiz Vel Tag Cmd Id", base.HEX) +f.ctrl_horiz_horiz_vel_tag_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_tag_feedback_id", "Horiz Vel Tag Feedback Id", base.HEX) +f.ctrl_horiz_horiz_vel_cmd_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_cmd_x", "Horiz Vel Cmd X", base.DEC) +f.ctrl_horiz_horiz_vel_cmd_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_cmd_y", "Horiz Vel Cmd Y", base.DEC) +f.ctrl_horiz_horiz_vel_feedback_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_feedback_x", "Horiz Vel Feedback X", base.DEC) +f.ctrl_horiz_horiz_vel_feedback_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_feedback_y", "Horiz Vel Feedback Y", base.DEC) +f.ctrl_horiz_horiz_vel_p_ctrl_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_p_ctrl_x", "Horiz Vel P Ctrl X", base.DEC) +f.ctrl_horiz_horiz_vel_p_ctrl_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_p_ctrl_y", "Horiz Vel P Ctrl Y", base.DEC) +f.ctrl_horiz_horiz_vel_d_ctrl_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_d_ctrl_x", "Horiz Vel D Ctrl X", base.DEC) +f.ctrl_horiz_horiz_vel_d_ctrl_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_d_ctrl_y", "Horiz Vel D Ctrl Y", base.DEC) +f.ctrl_horiz_horiz_vel_i_ctrl_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_i_ctrl_x", "Horiz Vel I Ctrl X", base.DEC) +f.ctrl_horiz_horiz_vel_i_ctrl_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_i_ctrl_y", "Horiz Vel I Ctrl Y", base.DEC) +f.ctrl_horiz_horiz_vel_feedforward_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_feedforward_x", "Horiz Vel Feedforward X", base.DEC) +f.ctrl_horiz_horiz_vel_feedforward_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_feedforward_y", "Horiz Vel Feedforward Y", base.DEC) +f.ctrl_horiz_horiz_vel_output_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_output_x", "Horiz Vel Output X", base.DEC) +f.ctrl_horiz_horiz_vel_output_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_vel_output_y", "Horiz Vel Output Y", base.DEC) +f.ctrl_horiz_horiz_acc_tag_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_tag_status", "Horiz Acc Tag Status", base.HEX) +f.ctrl_horiz_horiz_acc_tag_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_tag_cmd_id", "Horiz Acc Tag Cmd Id", base.HEX) +f.ctrl_horiz_horiz_acc_tag_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_tag_feedback_id", "Horiz Acc Tag Feedback Id", base.HEX) +f.ctrl_horiz_horiz_acc_cmd_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_cmd_x", "Horiz Acc Cmd X", base.DEC) +f.ctrl_horiz_horiz_acc_cmd_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_cmd_y", "Horiz Acc Cmd Y", base.DEC) +f.ctrl_horiz_horiz_acc_feedback_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_feedback_x", "Horiz Acc Feedback X", base.DEC) +f.ctrl_horiz_horiz_acc_feedback_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_feedback_y", "Horiz Acc Feedback Y", base.DEC) +f.ctrl_horiz_horiz_acc_feedback_i_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_feedback_i_x", "Horiz Acc Feedback I X", base.DEC) +f.ctrl_horiz_horiz_acc_feedback_i_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_feedback_i_y", "Horiz Acc Feedback I Y", base.DEC) +f.ctrl_horiz_horiz_acc_feedforward_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_feedforward_x", "Horiz Acc Feedforward X", base.DEC) +f.ctrl_horiz_horiz_acc_feedforward_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_feedforward_y", "Horiz Acc Feedforward Y", base.DEC) +f.ctrl_horiz_horiz_acc_output_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_output_x", "Horiz Acc Output X", base.DEC) +f.ctrl_horiz_horiz_acc_output_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_horiz_horiz_acc_output_y", "Horiz Acc Output Y", base.DEC) + +local function flightrec_ctrl_horiz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_horiz_module_module_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_hover_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_hover_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_hover_abs_pos_0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_hover_abs_pos_1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_hover_rel_pos_0, payload(offset, 4)) -- offset = 19 + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_hover_rel_pos_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_hover_brake_timer, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_pos_offset_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_horiz_module_horiz_pos_offset_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_api_horiz_ctrl_mode, payload(offset, 1)) -- offset = 39 + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_api_horiz_ctrl_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_api_torsion_ctrl_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_api_torsion_ctrl_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_api_atti_cmd_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_api_atti_unkn2C, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_pos_tag_status, payload(offset, 1)) -- offset = 45 + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_pos_tag_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_pos_tag_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_pos_cmd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_cmd_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_feedback_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_feedback_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_p_ctrl_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_p_ctrl_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_d_ctrl_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_d_ctrl_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_output_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_pos_output_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_tag_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_vel_tag_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_vel_tag_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_vel_cmd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_cmd_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_feedback_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_feedback_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_p_ctrl_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_p_ctrl_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_d_ctrl_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_d_ctrl_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_i_ctrl_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_i_ctrl_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_feedforward_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_feedforward_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_output_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_vel_output_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_tag_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_acc_tag_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_acc_tag_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_horiz_acc_cmd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_cmd_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_feedback_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_feedback_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_feedback_i_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_feedback_i_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_feedforward_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_feedforward_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_output_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_horiz_acc_output_y, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 122) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz: Payload size different than expected") end +end + +-- Flight log - Ctrl Motor - 0x0036 + +f.ctrl_motor_horiz_motor_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_motor_horiz_motor_status", "Horiz Motor Status", base.HEX) +f.ctrl_motor_horiz_motor_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_motor_horiz_motor_cmd_id", "Horiz Motor Cmd Id", base.HEX) +f.ctrl_motor_horiz_motor_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_motor_horiz_motor_feedback_id", "Horiz Motor Feedback Id", base.HEX) +f.ctrl_motor_thrust_1 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_thrust_1", "Thrust 1", base.DEC, nil, nil, "0.01; thrust value for motor 1 (r.f. in quads)") +f.ctrl_motor_thrust_2 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_thrust_2", "Thrust 2", base.DEC, nil, nil, "0.01; thrust value for motor 2 (l.f. in quads)") +f.ctrl_motor_thrust_3 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_thrust_3", "Thrust 3", base.DEC, nil, nil, "0.01; thrust value for motor 3 (l.b. in quads)") +f.ctrl_motor_thrust_4 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_thrust_4", "Thrust 4", base.DEC, nil, nil, "0.01; thrust value for motor 4 (r.b. in quads)") +f.ctrl_motor_thrust_5 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_thrust_5", "Thrust 5", base.DEC, nil, nil, "0.01; thrust value for motor 5 (if exists)") +f.ctrl_motor_thrust_6 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_thrust_6", "Thrust 6", base.DEC, nil, nil, "0.01; thrust value for motor 6 (if exists)") +f.ctrl_motor_thrust_7 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_thrust_7", "Thrust 7", base.DEC, nil, nil, "0.01; thrust value for motor 7 (if exists)") +f.ctrl_motor_thrust_8 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_thrust_8", "Thrust 8", base.DEC, nil, nil, "0.01; thrust value for motor 8 (if exists)") +f.ctrl_motor_pwm_1 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_pwm_1", "Pwm 1", base.DEC, nil, nil, "0.01; PWM value for motor 1 (r.f. in quads)") +f.ctrl_motor_pwm_2 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_pwm_2", "Pwm 2", base.DEC, nil, nil, "0.01; PWM value for motor 2 (l.f. in quads)") +f.ctrl_motor_pwm_3 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_pwm_3", "Pwm 3", base.DEC, nil, nil, "0.01; PWM value for motor 3 (l.b. in quads)") +f.ctrl_motor_pwm_4 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_pwm_4", "Pwm 4", base.DEC, nil, nil, "0.01; PWM value for motor 4 (r.b. in quads)") +f.ctrl_motor_pwm_5 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_pwm_5", "Pwm 5", base.DEC, nil, nil, "0.01; PWM value for motor 5 (if exists)") +f.ctrl_motor_pwm_6 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_pwm_6", "Pwm 6", base.DEC, nil, nil, "0.01; PWM value for motor 6 (if exists)") +f.ctrl_motor_pwm_7 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_pwm_7", "Pwm 7", base.DEC, nil, nil, "0.01; PWM value for motor 7 (if exists)") +f.ctrl_motor_pwm_8 = ProtoField.uint16 ("dji_p3_flyrec.ctrl_motor_pwm_8", "Pwm 8", base.DEC, nil, nil, "0.01; PWM value for motor 8 (if exists)") + +local function flightrec_ctrl_motor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_motor_horiz_motor_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_motor_horiz_motor_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_motor_horiz_motor_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_motor_thrust_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_8, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 35) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Motor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Motor: Payload size different than expected") end +end + +-- Flight log - Ctrl Atti - 0x0034 + +f.ctrl_atti_horiz_atti_tilt_tag_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_atti_tilt_tag_status", "Horiz Atti Tilt Tag Status", base.HEX) +f.ctrl_atti_horiz_atti_tilt_tag_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_atti_tilt_tag_cmd_id", "Horiz Atti Tilt Tag Cmd Id", base.HEX) +f.ctrl_atti_horiz_atti_tilt_tag_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_atti_tilt_tag_feedback_id", "Horiz Atti Tilt Tag Feedback Id", base.HEX) +f.ctrl_atti_horiz_atti_torsion_tag_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_atti_torsion_tag_status", "Horiz Atti Torsion Tag Status", base.HEX) +f.ctrl_atti_horiz_atti_torsion_tag_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_atti_torsion_tag_cmd_id", "Horiz Atti Torsion Tag Cmd Id", base.HEX) +f.ctrl_atti_horiz_atti_torsion_tag_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_atti_torsion_tag_feedback_id", "Horiz Atti Torsion Tag Feedback Id", base.HEX) +f.ctrl_atti_horiz_atti_tgt_acc_x = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_acc_x", "Horiz Atti Tgt Acc X", base.DEC) +f.ctrl_atti_horiz_atti_tgt_acc_y = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_acc_y", "Horiz Atti Tgt Acc Y", base.DEC) +f.ctrl_atti_horiz_atti_tgt_tilt_x = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_tilt_x", "Horiz Atti Tgt Tilt X", base.DEC) +f.ctrl_atti_horiz_atti_tgt_tilt_y = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_tilt_y", "Horiz Atti Tgt Tilt Y", base.DEC) +f.ctrl_atti_horiz_atti_tgt_body_tilt_x = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_body_tilt_x", "Horiz Atti Tgt Body Tilt X", base.DEC) +f.ctrl_atti_horiz_atti_tgt_body_tilt_y = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_body_tilt_y", "Horiz Atti Tgt Body Tilt Y", base.DEC) +f.ctrl_atti_horiz_atti_tgt_ground_tilt_x = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_ground_tilt_x", "Horiz Atti Tgt Ground Tilt X", base.DEC) +f.ctrl_atti_horiz_atti_tgt_ground_tilt_y = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_ground_tilt_y", "Horiz Atti Tgt Ground Tilt Y", base.DEC) +f.ctrl_atti_horiz_atti_tgt_tilt_before_limit_x = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_tilt_before_limit_x", "Horiz Atti Tgt Tilt Before Limit X", base.DEC) +f.ctrl_atti_horiz_atti_tgt_tilt_before_limit_y = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_tilt_before_limit_y", "Horiz Atti Tgt Tilt Before Limit Y", base.DEC) +f.ctrl_atti_horiz_atti_tgt_tilt_after_limit_x = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_tilt_after_limit_x", "Horiz Atti Tgt Tilt After Limit X", base.DEC) +f.ctrl_atti_horiz_atti_tgt_tilt_after_limit_y = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_tilt_after_limit_y", "Horiz Atti Tgt Tilt After Limit Y", base.DEC) +f.ctrl_atti_horiz_atti_tgt_quat_0 = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_quat_0", "Horiz Atti Tgt Quaternion 0", base.DEC) +f.ctrl_atti_horiz_atti_tgt_quat_1 = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_quat_1", "Horiz Atti Tgt Quaternion 1", base.DEC) +f.ctrl_atti_horiz_atti_tgt_quat_2 = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_quat_2", "Horiz Atti Tgt Quaternion 2", base.DEC) +f.ctrl_atti_horiz_atti_tgt_quat_3 = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_quat_3", "Horiz Atti Tgt Quaternion 3", base.DEC) +f.ctrl_atti_horiz_atti_tgt_torsion = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_torsion", "Horiz Atti Tgt Torsion", base.DEC) +f.ctrl_atti_horiz_atti_tgt_torsion_rate = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_tgt_torsion_rate", "Horiz Atti Tgt Torsion Rate", base.DEC) +f.ctrl_atti_horiz_atti_feedback_quat_0 = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_feedback_quat_0", "Horiz Atti Feedback Quaternion 0", base.DEC) +f.ctrl_atti_horiz_atti_feedback_quat_1 = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_feedback_quat_1", "Horiz Atti Feedback Quaternion 1", base.DEC) +f.ctrl_atti_horiz_atti_feedback_quat_2 = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_feedback_quat_2", "Horiz Atti Feedback Quaternion 2", base.DEC) +f.ctrl_atti_horiz_atti_feedback_quat_3 = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_feedback_quat_3", "Horiz Atti Feedback Quaternion 3", base.DEC) +f.ctrl_atti_horiz_atti_locked_torsion = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_locked_torsion", "Horiz Atti Locked Torsion", base.DEC) +f.ctrl_atti_horiz_atti_err_tilt_x = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_err_tilt_x", "Horiz Atti Err Tilt X", base.DEC) +f.ctrl_atti_horiz_atti_err_tilt_y = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_err_tilt_y", "Horiz Atti Err Tilt Y", base.DEC) +f.ctrl_atti_horiz_atti_err_torsion = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_err_torsion", "Horiz Atti Err Torsion", base.DEC) +f.ctrl_atti_horiz_atti_output_x = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_output_x", "Horiz Atti Output X", base.DEC) +f.ctrl_atti_horiz_atti_output_y = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_output_y", "Horiz Atti Output Y", base.DEC) +f.ctrl_atti_horiz_atti_output_z = ProtoField.float ("dji_p3_flyrec.ctrl_atti_horiz_atti_output_z", "Horiz Atti Output Z", base.DEC) +f.ctrl_atti_horiz_ang_vel_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_status", "Horiz Ang Vel Status", base.HEX) +f.ctrl_atti_horiz_ang_vel_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_cmd_id", "Horiz Ang Vel Cmd Id", base.HEX) +f.ctrl_atti_horiz_ang_vel_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_id", "Horiz Ang Vel Feedback Id", base.HEX) +f.ctrl_atti_horiz_ang_vel_cmd_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_cmd_x", "Horiz Ang Vel Cmd X", base.DEC) +f.ctrl_atti_horiz_ang_vel_cmd_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_cmd_y", "Horiz Ang Vel Cmd Y", base.DEC) +f.ctrl_atti_horiz_ang_vel_cmd_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_cmd_z", "Horiz Ang Vel Cmd Z", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_x", "Horiz Ang Vel Feedback X", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_y", "Horiz Ang Vel Feedback Y", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_z", "Horiz Ang Vel Feedback Z", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_p_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_p_x", "Horiz Ang Vel Feedback P X", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_p_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_p_y", "Horiz Ang Vel Feedback P Y", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_p_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_p_z", "Horiz Ang Vel Feedback P Z", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_d_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_d_x", "Horiz Ang Vel Feedback D X", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_d_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_d_y", "Horiz Ang Vel Feedback D Y", base.DEC) +f.ctrl_atti_horiz_ang_vel_feedback_d_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_feedback_d_z", "Horiz Ang Vel Feedback D Z", base.DEC) +f.ctrl_atti_horiz_ang_vel_output_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_output_x", "Horiz Ang Vel Output X", base.DEC) +f.ctrl_atti_horiz_ang_vel_output_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_output_y", "Horiz Ang Vel Output Y", base.DEC) +f.ctrl_atti_horiz_ang_vel_output_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_vel_output_z", "Horiz Ang Vel Output Z", base.DEC) +f.ctrl_atti_horiz_ang_acc_status = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_status", "Horiz Ang Acc Status", base.HEX) +f.ctrl_atti_horiz_ang_acc_cmd_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_cmd_id", "Horiz Ang Acc Cmd Id", base.HEX) +f.ctrl_atti_horiz_ang_acc_feedback_id = ProtoField.uint8 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedback_id", "Horiz Ang Acc Feedback Id", base.HEX) +f.ctrl_atti_horiz_ang_acc_cmd_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_cmd_x", "Horiz Ang Acc Cmd X", base.DEC) +f.ctrl_atti_horiz_ang_acc_cmd_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_cmd_y", "Horiz Ang Acc Cmd Y", base.DEC) +f.ctrl_atti_horiz_ang_acc_cmd_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_cmd_z", "Horiz Ang Acc Cmd Z", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedback_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedback_x", "Horiz Ang Acc Feedback X", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedback_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedback_y", "Horiz Ang Acc Feedback Y", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedback_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedback_z", "Horiz Ang Acc Feedback Z", base.DEC) +f.ctrl_atti_horiz_ang_acc_p_ctrl_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_p_ctrl_x", "Horiz Ang Acc P Ctrl X", base.DEC) +f.ctrl_atti_horiz_ang_acc_p_ctrl_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_p_ctrl_y", "Horiz Ang Acc P Ctrl Y", base.DEC) +f.ctrl_atti_horiz_ang_acc_p_ctrl_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_p_ctrl_z", "Horiz Ang Acc P Ctrl Z", base.DEC) +f.ctrl_atti_horiz_ang_acc_i_ctrl_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_i_ctrl_x", "Horiz Ang Acc I Ctrl X", base.DEC) +f.ctrl_atti_horiz_ang_acc_i_ctrl_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_i_ctrl_y", "Horiz Ang Acc I Ctrl Y", base.DEC) +f.ctrl_atti_horiz_ang_acc_i_ctrl_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_i_ctrl_z", "Horiz Ang Acc I Ctrl Z", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedforward_direct_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedforward_direct_x", "Horiz Ang Acc Feedforward Direct X", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedforward_direct_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedforward_direct_y", "Horiz Ang Acc Feedforward Direct Y", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedforward_direct_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedforward_direct_z", "Horiz Ang Acc Feedforward Direct Z", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedforward_compen_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedforward_compen_x", "Horiz Ang Acc Feedforward Compen X", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedforward_compen_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedforward_compen_y", "Horiz Ang Acc Feedforward Compen Y", base.DEC) +f.ctrl_atti_horiz_ang_acc_feedforward_compen_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_feedforward_compen_z", "Horiz Ang Acc Feedforward Compen Z", base.DEC) +f.ctrl_atti_horiz_ang_acc_output_x = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_output_x", "Horiz Ang Acc Output X", base.DEC) +f.ctrl_atti_horiz_ang_acc_output_y = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_output_y", "Horiz Ang Acc Output Y", base.DEC) +f.ctrl_atti_horiz_ang_acc_output_z = ProtoField.int16 ("dji_p3_flyrec.ctrl_atti_horiz_ang_acc_output_z", "Horiz Ang Acc Output Z", base.DEC) +--f.ctrl_atti_e_cmd_pitch = ProtoField.none ("dji_p3_flyrec.ctrl_atti_e_cmd_pitch", "E Cmd Pitch", base.NONE, nil, nil, "-asin_x(2*(horiz_atti_tgt_quat_1*horiz_atti_tgt_quat_3-horiz_atti_tgt_quat_0*horiz_atti_tgt_quat_2))/3.1415926*180") +--f.ctrl_atti_e_cmd_roll = ProtoField.none ("dji_p3_flyrec.ctrl_atti_e_cmd_roll", "E Cmd Roll", base.NONE, nil, nil, "atan2(2*(horiz_atti_tgt_quat_2*horiz_atti_tgt_quat_3+horiz_atti_tgt_quat_0*horiz_atti_tgt_quat_1),1-2*(horiz_atti_tgt_quat_1*horiz_atti_tgt_quat_1+horiz_atti_tgt_quat_2*horiz_atti_tgt_quat_2))/3.1415926*180") +--f.ctrl_atti_e_cmd_yaw = ProtoField.none ("dji_p3_flyrec.ctrl_atti_e_cmd_yaw", "E Cmd Yaw", base.NONE, nil, nil, "atan2(2*(horiz_atti_tgt_quat_1*horiz_atti_tgt_quat_2+horiz_atti_tgt_quat_0*horiz_atti_tgt_quat_3),1-2*(horiz_atti_tgt_quat_2*horiz_atti_tgt_quat_2+horiz_atti_tgt_quat_3*horiz_atti_tgt_quat_3))/3.1415926*180") +--f.ctrl_atti_e_feedback_pitch = ProtoField.none ("dji_p3_flyrec.ctrl_atti_e_feedback_pitch", "E Feedback Pitch", base.NONE, nil, nil, "-asin_x(2*(horiz_atti_feedback_quat_1*horiz_atti_feedback_quat_3-horiz_atti_feedback_quat_0*horiz_atti_feedback_quat_2))/3.1415926*180") +--f.ctrl_atti_e_feedback_roll = ProtoField.none ("dji_p3_flyrec.ctrl_atti_e_feedback_roll", "E Feedback Roll", base.NONE, nil, nil, "atan2(2*(horiz_atti_feedback_quat_2*horiz_atti_feedback_quat_3+horiz_atti_feedback_quat_0*horiz_atti_feedback_quat_1),1-2*(horiz_atti_feedback_quat_1*horiz_atti_feedback_quat_1+horiz_atti_feedback_quat_2*horiz_atti_feedback_quat_2))/3.1415926*180") +--f.ctrl_atti_e_feedback_yaw = ProtoField.none ("dji_p3_flyrec.ctrl_atti_e_feedback_yaw", "E Feedback Yaw", base.NONE, nil, nil, "atan2(2*(horiz_atti_feedback_quat_1*horiz_atti_feedback_quat_2+horiz_atti_feedback_quat_0*horiz_atti_feedback_quat_3),1-2*(horiz_atti_feedback_quat_2*horiz_atti_feedback_quat_2+horiz_atti_feedback_quat_3*horiz_atti_feedback_quat_3))/3.1415926*180") + +local function flightrec_ctrl_atti_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_atti_horiz_atti_tilt_tag_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_atti_tilt_tag_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_atti_tilt_tag_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_atti_torsion_tag_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_atti_torsion_tag_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_atti_torsion_tag_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_acc_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_acc_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_tilt_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_body_tilt_x, payload(offset, 4)) -- offset = 22 + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_body_tilt_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_ground_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_ground_tilt_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_tilt_before_limit_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_tilt_before_limit_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_tilt_after_limit_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_tilt_after_limit_y, payload(offset, 4)) -- offset = 50 + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_quat_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_quat_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_quat_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_quat_3, payload(offset, 4)) -- offset = 66 + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_torsion, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_tgt_torsion_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_feedback_quat_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_feedback_quat_1, payload(offset, 4)) -- offset = 82 + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_feedback_quat_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_feedback_quat_3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_locked_torsion, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_err_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_err_tilt_y, payload(offset, 4)) -- offset = 102 + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_err_torsion, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_output_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_output_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_atti_output_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_status, payload(offset, 1)) -- offset = 122 + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_cmd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_cmd_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_cmd_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_x, payload(offset, 2)) -- offset = 131 + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_p_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_p_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_p_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_d_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_d_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_feedback_d_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_output_x, payload(offset, 2)) -- offset = 149 + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_output_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_vel_output_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_status, payload(offset, 1)) -- offset = 155 + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_cmd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_cmd_y, payload(offset, 2)) -- offset = 160 + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_cmd_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedback_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedback_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedback_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_p_ctrl_x, payload(offset, 2)) -- offset = 170 + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_p_ctrl_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_p_ctrl_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_i_ctrl_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_i_ctrl_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_i_ctrl_z, payload(offset, 2)) -- offset = 180 + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedforward_direct_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedforward_direct_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedforward_direct_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedforward_compen_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedforward_compen_y, payload(offset, 2)) -- offset = 190 + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_feedforward_compen_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_output_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_output_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_atti_horiz_ang_acc_output_z, payload(offset, 2)) + offset = offset + 2 + + -- The "Ctrl Atti" record contains "Ctrl Motor" record appended at offset = 200 + + subtree:add_le (f.ctrl_motor_horiz_motor_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_motor_horiz_motor_cmd_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_motor_horiz_motor_feedback_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_motor_thrust_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_thrust_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_motor_pwm_8, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 235) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Atti: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Atti: Payload size different than expected") end +end + +-- Flight log - Ctrl Ccpm - 0x0035 +-- Cyclic Collective Pitch Mixing Control + +f.ctrl_ccpm_dyn_ccpm_raw_lift = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_raw_lift", "Dyn Ccpm Raw Lift", base.DEC) +f.ctrl_ccpm_dyn_ccpm_raw_tilt_x = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_raw_tilt_x", "Dyn Ccpm Raw Tilt X", base.DEC) +f.ctrl_ccpm_dyn_ccpm_raw_tilt_y = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_raw_tilt_y", "Dyn Ccpm Raw Tilt Y", base.DEC) +f.ctrl_ccpm_dyn_ccpm_raw_torsion = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_raw_torsion", "Dyn Ccpm Raw Torsion", base.DEC) +f.ctrl_ccpm_dyn_ccpm_fix_lift = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_fix_lift", "Dyn Ccpm Fix Lift", base.DEC) +f.ctrl_ccpm_dyn_ccpm_fix_tilt_x = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_fix_tilt_x", "Dyn Ccpm Fix Tilt X", base.DEC) +f.ctrl_ccpm_dyn_ccpm_fix_tilt_y = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_fix_tilt_y", "Dyn Ccpm Fix Tilt Y", base.DEC) +f.ctrl_ccpm_dyn_ccpm_fix_torsion = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_fix_torsion", "Dyn Ccpm Fix Torsion", base.DEC) +f.ctrl_ccpm_dyn_ccpm_fix_lift_scale = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_fix_lift_scale", "Dyn Ccpm Fix Lift Scale", base.DEC) +f.ctrl_ccpm_dyn_ccpm_fix_tilt_scale = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_fix_tilt_scale", "Dyn Ccpm Fix Tilt Scale", base.DEC) +f.ctrl_ccpm_dyn_ccpm_fix_torsion_scale = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_fix_torsion_scale", "Dyn Ccpm Fix Torsion Scale", base.DEC) +f.ctrl_ccpm_dyn_ccpm_saturation_value = ProtoField.float ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_saturation_value", "Dyn Ccpm Saturation Value", base.DEC) +f.ctrl_ccpm_dyn_ccpm_saturation_flag = ProtoField.uint8 ("dji_p3_flyrec.ctrl_ccpm_dyn_ccpm_saturation_flag", "Dyn Ccpm Saturation Flag", base.HEX) + +local function flightrec_ctrl_ccpm_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_raw_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_raw_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_raw_tilt_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_raw_torsion, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_fix_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_fix_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_fix_tilt_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_fix_torsion, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_fix_lift_scale, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_fix_tilt_scale, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_fix_torsion_scale, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_saturation_value, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_ccpm_dyn_ccpm_saturation_flag, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 49) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Ccpm: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Ccpm: Payload size different than expected") end +end + +-- Flight log - Wp Curve - 0x0096 + +f.wp_curve_px = ProtoField.float ("dji_p3_flyrec.wp_curve_px", "Px", base.DEC) +f.wp_curve_py = ProtoField.float ("dji_p3_flyrec.wp_curve_py", "Py", base.DEC) +f.wp_curve_pz = ProtoField.float ("dji_p3_flyrec.wp_curve_pz", "Pz", base.DEC) +f.wp_curve_vx = ProtoField.float ("dji_p3_flyrec.wp_curve_vx", "Vx", base.DEC) +f.wp_curve_vy = ProtoField.float ("dji_p3_flyrec.wp_curve_vy", "Vy", base.DEC) +f.wp_curve_vz = ProtoField.float ("dji_p3_flyrec.wp_curve_vz", "Vz", base.DEC) +f.wp_curve_v_norm = ProtoField.float ("dji_p3_flyrec.wp_curve_v_norm", "V Norm", base.DEC) +f.wp_curve_t = ProtoField.float ("dji_p3_flyrec.wp_curve_t", "T", base.DEC) +f.wp_curve_wp_state = ProtoField.uint8 ("dji_p3_flyrec.wp_curve_wp_state", "Wp State", base.HEX) + +local function flightrec_wp_curve_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.wp_curve_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wp_curve_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wp_curve_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wp_curve_vx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wp_curve_vy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wp_curve_vz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wp_curve_v_norm, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wp_curve_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wp_curve_wp_state, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 33) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Wp Curve: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Wp Curve: Payload size different than expected") end +end + +-- Flight log - Smart Battery Info - 0x0012 + +f.smart_battery_info_rest_time = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_rest_time", "Rest Time", base.DEC) +f.smart_battery_info_need_time_for_gohome = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_need_time_for_gohome", "Need Time For Gohome", base.DEC) +f.smart_battery_info_need_time_for_land = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_need_time_for_land", "Need Time For Land", base.DEC) +f.smart_battery_info_gohome_battery_level = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_gohome_battery_level", "Gohome Battery Level", base.DEC) +f.smart_battery_info_land_battery_level = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_land_battery_level", "Land Battery Level", base.DEC) +f.smart_battery_info_radius_for_gohome = ProtoField.float ("dji_p3_flyrec.smart_battery_info_radius_for_gohome", "Radius For Gohome", base.DEC) +f.smart_battery_info_request_gohome = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_request_gohome", "Request Gohome", base.HEX) +f.smart_battery_info_bat_dec_speed = ProtoField.float ("dji_p3_flyrec.smart_battery_info_bat_dec_speed", "Bat Dec Speed", base.DEC) +f.smart_battery_info_smart_battery_state = ProtoField.uint32 ("dji_p3_flyrec.smart_battery_info_smart_battery_state", "Smart Battery State", base.HEX) +f.smart_battery_info_level1_over_current = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_level1_over_current", "Level1 Over Current", base.DEC) +f.smart_battery_info_level2_over_current = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_level2_over_current", "Level2 Over Current", base.DEC) +f.smart_battery_info_level1_over_temp = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_level1_over_temp", "Level1 Over Temp", base.DEC) +f.smart_battery_info_level2_under_temp = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_level2_under_temp", "Level2 Under Temp", base.DEC) +f.smart_battery_info_level1_low_temp = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_level1_low_temp", "Level1 Low Temp", base.DEC) +f.smart_battery_info_level2_low_temp = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_level2_low_temp", "Level2 Low Temp", base.DEC) +f.smart_battery_info_short_cir = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_short_cir", "Short Cir", base.HEX) +f.smart_battery_info_low_vol_cells = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_low_vol_cells", "Low Vol Cells", base.HEX) +f.smart_battery_info_damage_cells = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_damage_cells", "Damage Cells", base.HEX) +f.smart_battery_info_exchange_cells = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_exchange_cells", "Exchange Cells", base.HEX) +f.smart_battery_info_user_gohome_level = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_user_gohome_level", "User Gohome Level", base.DEC) +f.smart_battery_info_user_land_level = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_user_land_level", "User Land Level", base.DEC) +f.smart_battery_info_user_action_for_gohome = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_user_action_for_gohome", "User Action For Gohome", base.HEX) +f.smart_battery_info_user_action_for_land = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_user_action_for_land", "User Action For Land", base.HEX) +f.smart_battery_info_user_use_smart_bat = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_user_use_smart_bat", "User Use Smart Bat", base.HEX) +f.smart_battery_info_flag_main_vol_low_gohome = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_main_vol_low_gohome", "Flag Main Vol Low Gohome", base.HEX) +f.smart_battery_info_flag_main_vol_low_land = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_main_vol_low_land", "Flag Main Vol Low Land", base.HEX) +f.smart_battery_info_flag_user_gohome = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_user_gohome", "Flag User Gohome", base.HEX) +f.smart_battery_info_flag_user_land = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_user_land", "Flag User Land", base.HEX) +f.smart_battery_info_flag_smart_bat_gohome = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_smart_bat_gohome", "Flag Smart Bat Gohome", base.HEX) +f.smart_battery_info_flag_smart_bat_land = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_smart_bat_land", "Flag Smart Bat Land", base.HEX) +f.smart_battery_info_flag_cell_err = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_cell_err", "Flag Cell Err", base.HEX) +f.smart_battery_info_flag_communite_err = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_communite_err", "Flag Communite Err", base.HEX) +f.smart_battery_info_real_desc_speed = ProtoField.float ("dji_p3_flyrec.smart_battery_info_real_desc_speed", "Real Desc Speed", base.DEC) +f.smart_battery_info_flag_vol_very_low = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_vol_very_low", "Flag Vol Very Low", base.HEX) +f.smart_battery_info_flag_temp_and_vol_low = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_temp_and_vol_low", "Flag Temp And Vol Low", base.HEX) +f.smart_battery_info_flag_first_charge_not_full = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_flag_first_charge_not_full", "Flag First Charge Not Full", base.HEX) +f.smart_battery_info_g_filter_vol = ProtoField.float ("dji_p3_flyrec.smart_battery_info_g_filter_vol", "G Filter Vol", base.DEC) +f.smart_battery_info_g_filter_i = ProtoField.float ("dji_p3_flyrec.smart_battery_info_g_filter_i", "G Filter I", base.DEC) +f.smart_battery_info_g_evl_vol = ProtoField.float ("dji_p3_flyrec.smart_battery_info_g_evl_vol", "G Evl Vol", base.DEC) +f.smart_battery_info_g_delt_i = ProtoField.float ("dji_p3_flyrec.smart_battery_info_g_delt_i", "G Delt I", base.DEC) +f.smart_battery_info_fld70 = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_fld70", "Field70", base.HEX) +f.smart_battery_info_fld72 = ProtoField.uint8 ("dji_p3_flyrec.smart_battery_info_fld72", "Field72", base.HEX) +f.smart_battery_info_vol_lv1_prot = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_vol_lv1_prot", "Voltage Level 1 Protect, flyc param g_real.config.voltage.level_1_protect", base.DEC) +f.smart_battery_info_vol_lv2_prot = ProtoField.uint16 ("dji_p3_flyrec.smart_battery_info_vol_lv2_prot", "Voltage Level 2 Protect, flyc param g_real.config.voltage.level_2_protect", base.DEC) + +local function flightrec_smart_battery_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.smart_battery_info_rest_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_need_time_for_gohome, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_need_time_for_land, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_gohome_battery_level, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_land_battery_level, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_radius_for_gohome, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.smart_battery_info_request_gohome, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_bat_dec_speed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.smart_battery_info_smart_battery_state, payload(offset, 4)) -- offset 20 + offset = offset + 4 + + subtree:add_le (f.smart_battery_info_level1_over_current, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_level2_over_current, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_level1_over_temp, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_level2_under_temp, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_level1_low_temp, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_level2_low_temp, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_short_cir, payload(offset, 1)) -- offset 30 + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_low_vol_cells, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_damage_cells, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_exchange_cells, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_user_gohome_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_user_land_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_user_action_for_gohome, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_user_action_for_land, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_user_use_smart_bat, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_main_vol_low_gohome, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_main_vol_low_land, payload(offset, 1)) -- offset 40 + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_user_gohome, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_user_land, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_smart_bat_gohome, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_smart_bat_land, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_cell_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_communite_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_real_desc_speed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.smart_battery_info_flag_vol_very_low, payload(offset, 1)) -- offset 51 + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_temp_and_vol_low, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_flag_first_charge_not_full, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_g_filter_vol, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.smart_battery_info_g_filter_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.smart_battery_info_g_evl_vol, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.smart_battery_info_g_delt_i, payload(offset, 4)) -- offset 66 + offset = offset + 4 + + subtree:add_le (f.smart_battery_info_fld70, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_fld72, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_vol_lv1_prot, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_vol_lv2_prot, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 77) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Smart Battery Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Smart Battery Info: Payload size different than expected") end +end + +-- Flight log - Airport Limit Data - 0x0028 + +f.airport_limit_data_area_state = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_area_state", "Area State", base.HEX) +f.airport_limit_data_action_state = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_action_state", "Action State", base.HEX) +f.airport_limit_data_work_point_num = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_work_point_num", "Work Point Num", base.HEX) +f.airport_limit_data_lat_int_0 = ProtoField.int32 ("dji_p3_flyrec.airport_limit_data_lat_int_0", "Lat Int 0", base.DEC) +f.airport_limit_data_lon_int_0 = ProtoField.int32 ("dji_p3_flyrec.airport_limit_data_lon_int_0", "Lon Int 0", base.DEC) +f.airport_limit_data_point_from_where_0 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_point_from_where_0", "Point From Where 0", base.HEX) +f.airport_limit_data_flag_limit_radius_0 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_flag_limit_radius_0", "Flag Limit Radius 0", base.HEX) +f.airport_limit_data_flag_limit_hi_0 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_flag_limit_hi_0", "Flag Limit Hi 0", base.HEX) +f.airport_limit_data_d2limit_edge_0 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_d2limit_edge_0", "D2Limit Edge 0", base.DEC) +f.airport_limit_data_d2limit_hi_0 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_d2limit_hi_0", "D2Limit Hi 0", base.DEC) +f.airport_limit_data_directx_0 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_directx_0", "Directx 0", base.DEC) +f.airport_limit_data_directy_0 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_directy_0", "Directy 0", base.DEC) +f.airport_limit_data_lat_int_1 = ProtoField.int32 ("dji_p3_flyrec.airport_limit_data_lat_int_1", "Lat Int 1", base.DEC) +f.airport_limit_data_lon_int_1 = ProtoField.int32 ("dji_p3_flyrec.airport_limit_data_lon_int_1", "Lon Int 1", base.DEC) +f.airport_limit_data_point_from_where_1 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_point_from_where_1", "Point From Where 1", base.HEX) +f.airport_limit_data_flag_limit_radius_1 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_flag_limit_radius_1", "Flag Limit Radius 1", base.HEX) +f.airport_limit_data_flag_limit_hi_1 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_flag_limit_hi_1", "Flag Limit Hi 1", base.HEX) +f.airport_limit_data_d2limit_edge_1 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_d2limit_edge_1", "D2Limit Edge 1", base.DEC) +f.airport_limit_data_d2limit_hi_1 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_d2limit_hi_1", "D2Limit Hi 1", base.DEC) +f.airport_limit_data_directx_1 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_directx_1", "Directx 1", base.DEC) +f.airport_limit_data_directy_1 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_directy_1", "Directy 1", base.DEC) +f.airport_limit_data_lat_int_2 = ProtoField.int32 ("dji_p3_flyrec.airport_limit_data_lat_int_2", "Lat Int 2", base.DEC) +f.airport_limit_data_lon_int_2 = ProtoField.int32 ("dji_p3_flyrec.airport_limit_data_lon_int_2", "Lon Int 2", base.DEC) +f.airport_limit_data_point_from_where_2 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_point_from_where_2", "Point From Where 2", base.HEX) +f.airport_limit_data_flag_limit_radius_2 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_flag_limit_radius_2", "Flag Limit Radius 2", base.HEX) +f.airport_limit_data_flag_limit_hi_2 = ProtoField.uint8 ("dji_p3_flyrec.airport_limit_data_flag_limit_hi_2", "Flag Limit Hi 2", base.HEX) +f.airport_limit_data_d2limit_edge_2 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_d2limit_edge_2", "D2Limit Edge 2", base.DEC) +f.airport_limit_data_d2limit_hi_2 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_d2limit_hi_2", "D2Limit Hi 2", base.DEC) +f.airport_limit_data_directx_2 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_directx_2", "Directx 2", base.DEC) +f.airport_limit_data_directy_2 = ProtoField.float ("dji_p3_flyrec.airport_limit_data_directy_2", "Directy 2", base.DEC) + +local function flightrec_airport_limit_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.airport_limit_data_area_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_action_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_work_point_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_lat_int_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_lon_int_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_point_from_where_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_flag_limit_radius_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_flag_limit_hi_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_d2limit_edge_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_d2limit_hi_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_directx_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_directy_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_lat_int_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_lon_int_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_point_from_where_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_flag_limit_radius_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_flag_limit_hi_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_d2limit_edge_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_d2limit_hi_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_directx_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_directy_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_lat_int_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_lon_int_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_point_from_where_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_flag_limit_radius_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_flag_limit_hi_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_data_d2limit_edge_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_d2limit_hi_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_directx_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_data_directy_2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 84) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Airport Limit Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Airport Limit Data: Payload size different than expected") end +end + +-- Flight log - Fmu Device Run Time - 0x0029 + +f.fmu_device_run_time_battery = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_battery", "Battery", base.HEX) +f.fmu_device_run_time_led = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_led", "Led", base.HEX) +f.fmu_device_run_time_baromter = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_baromter", "Baromter", base.HEX) +f.fmu_device_run_time_gyro_acc = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_gyro_acc", "Gyro Acc", base.HEX) +f.fmu_device_run_time_imu = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_imu", "Imu", base.HEX) +f.fmu_device_run_time_vo = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_vo", "Vo", base.HEX) +f.fmu_device_run_time_ultrasonic = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_ultrasonic", "Ultrasonic", base.HEX) +f.fmu_device_run_time_pmu = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_pmu", "Pmu", base.HEX) +f.fmu_device_run_time_esc = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_esc", "Esc", base.HEX) +f.fmu_device_run_time_mc = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_mc", "Mc", base.HEX) +f.fmu_device_run_time_camera = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_camera", "Camera", base.HEX) +f.fmu_device_run_time_gps = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_gps", "Gps", base.HEX) +f.fmu_device_run_time_compass = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_compass", "Compass", base.HEX) +f.fmu_device_run_time_gimbal = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_gimbal", "Gimbal", base.HEX) +f.fmu_device_run_time_rc = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_rc", "Rc", base.HEX) +f.fmu_device_run_time_gear = ProtoField.uint32 ("dji_p3_flyrec.fmu_device_run_time_gear", "Gear", base.HEX) + +local function flightrec_fmu_device_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_device_run_time_battery, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_led, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_baromter, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_gyro_acc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_imu, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_vo, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_ultrasonic, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_pmu, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_esc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_mc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_camera, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_gps, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_compass, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_gimbal, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_rc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_device_run_time_gear, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 64) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Device Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Device Run Time: Payload size different than expected") end +end + +-- Flight log - Hp Data - 0x002a + +f.hp_data_tgt_hp_alti = ProtoField.float ("dji_p3_flyrec.hp_data_tgt_hp_alti", "Tgt Hp Alti", base.DEC) +f.hp_data_tgt_ang_rate = ProtoField.float ("dji_p3_flyrec.hp_data_tgt_ang_rate", "Tgt Ang Rate", base.DEC, nil, nil, "in degrees") +f.hp_data_tgt_radius = ProtoField.float ("dji_p3_flyrec.hp_data_tgt_radius", "Tgt Radius", base.DEC) +f.hp_data_distance_to_hp = ProtoField.float ("dji_p3_flyrec.hp_data_distance_to_hp", "Distance To Hp", base.DEC) +f.hp_data_cosine_angle = ProtoField.float ("dji_p3_flyrec.hp_data_cosine_angle", "Cosine Angle", base.DEC) +f.hp_data_angle_rate = ProtoField.float ("dji_p3_flyrec.hp_data_angle_rate", "Angle Rate", base.DEC, nil, nil, "in degrees") +f.hp_data_radius = ProtoField.float ("dji_p3_flyrec.hp_data_radius", "Radius", base.DEC) +f.hp_data_pos_error_x = ProtoField.float ("dji_p3_flyrec.hp_data_pos_error_x", "Pos Error X", base.DEC) +f.hp_data_pos_error_y = ProtoField.float ("dji_p3_flyrec.hp_data_pos_error_y", "Pos Error Y", base.DEC) +f.hp_data_pos_error_z = ProtoField.float ("dji_p3_flyrec.hp_data_pos_error_z", "Pos Error Z", base.DEC) +f.hp_data_vel_error_x = ProtoField.float ("dji_p3_flyrec.hp_data_vel_error_x", "Vel Error X", base.DEC) +f.hp_data_vel_error_y = ProtoField.float ("dji_p3_flyrec.hp_data_vel_error_y", "Vel Error Y", base.DEC) +f.hp_data_vel_error_z = ProtoField.float ("dji_p3_flyrec.hp_data_vel_error_z", "Vel Error Z", base.DEC) +f.hp_data_head_error = ProtoField.float ("dji_p3_flyrec.hp_data_head_error", "Head Error", base.DEC, nil, nil, "in degrees") + +local function flightrec_hp_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.hp_data_tgt_hp_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_tgt_ang_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_tgt_radius, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_distance_to_hp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_cosine_angle, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_angle_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_radius, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_pos_error_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_pos_error_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_pos_error_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_vel_error_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_vel_error_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_vel_error_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hp_data_head_error, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 56) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Hp Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Hp Data: Payload size different than expected") end +end + +-- Flight log - Follow Me Data - 0x002b + +f.follow_me_data_heading_ref = ProtoField.float ("dji_p3_flyrec.follow_me_data_heading_ref", "Heading Ref", base.DEC) +f.follow_me_data_heading_error = ProtoField.float ("dji_p3_flyrec.follow_me_data_heading_error", "Heading Error", base.DEC) +f.follow_me_data_heading_rate = ProtoField.float ("dji_p3_flyrec.follow_me_data_heading_rate", "Heading Rate", base.DEC) +f.follow_me_data_ascending_tgt_height = ProtoField.float ("dji_p3_flyrec.follow_me_data_ascending_tgt_height", "Ascending Tgt Height", base.DEC) +f.follow_me_data_ascending_error = ProtoField.float ("dji_p3_flyrec.follow_me_data_ascending_error", "Ascending Error", base.DEC) +f.follow_me_data_ascending_vel = ProtoField.float ("dji_p3_flyrec.follow_me_data_ascending_vel", "Ascending Vel", base.DEC) +f.follow_me_data_phone_tagt_x = ProtoField.double ("dji_p3_flyrec.follow_me_data_phone_tagt_x", "Phone Tagt X", base.DEC) +f.follow_me_data_phone_tagt_y = ProtoField.double ("dji_p3_flyrec.follow_me_data_phone_tagt_y", "Phone Tagt Y", base.DEC) +f.follow_me_data_quadrotor_cur_x = ProtoField.double ("dji_p3_flyrec.follow_me_data_quadrotor_cur_x", "Quadrotor Cur X", base.DEC) +f.follow_me_data_quadrotor_cur_y = ProtoField.double ("dji_p3_flyrec.follow_me_data_quadrotor_cur_y", "Quadrotor Cur Y", base.DEC) +f.follow_me_data_quadrotor2phone_offset_x = ProtoField.float ("dji_p3_flyrec.follow_me_data_quadrotor2phone_offset_x", "Quadrotor2Phone Offset X", base.DEC) +f.follow_me_data_quadrotor2phone_offset_y = ProtoField.float ("dji_p3_flyrec.follow_me_data_quadrotor2phone_offset_y", "Quadrotor2Phone Offset Y", base.DEC) +f.follow_me_data_quadrotor2phone_distance = ProtoField.float ("dji_p3_flyrec.follow_me_data_quadrotor2phone_distance", "Quadrotor2Phone Distance", base.DEC) +f.follow_me_data_quadrotor2targetpoint_offset_x = ProtoField.float ("dji_p3_flyrec.follow_me_data_quadrotor2targetpoint_offset_x", "Quadrotor2Targetpoint Offset X", base.DEC) +f.follow_me_data_quadrotor2targetpoint_offset_y = ProtoField.float ("dji_p3_flyrec.follow_me_data_quadrotor2targetpoint_offset_y", "Quadrotor2Targetpoint Offset Y", base.DEC) +f.follow_me_data_quadrotor2targetpoint_distance = ProtoField.float ("dji_p3_flyrec.follow_me_data_quadrotor2targetpoint_distance", "Quadrotor2Targetpoint Distance", base.DEC) +f.follow_me_data_tagt_vel_x = ProtoField.float ("dji_p3_flyrec.follow_me_data_tagt_vel_x", "Tagt Vel X", base.DEC) +f.follow_me_data_tagt_vel_y = ProtoField.float ("dji_p3_flyrec.follow_me_data_tagt_vel_y", "Tagt Vel Y", base.DEC) +f.follow_me_data_cur_vel_x = ProtoField.float ("dji_p3_flyrec.follow_me_data_cur_vel_x", "Cur Vel X", base.DEC) +f.follow_me_data_cur_vel_y = ProtoField.float ("dji_p3_flyrec.follow_me_data_cur_vel_y", "Cur Vel Y", base.DEC) +f.follow_me_data_cruise_vel_x = ProtoField.float ("dji_p3_flyrec.follow_me_data_cruise_vel_x", "Cruise Vel X", base.DEC) +f.follow_me_data_cruise_vel_y = ProtoField.float ("dji_p3_flyrec.follow_me_data_cruise_vel_y", "Cruise Vel Y", base.DEC) +f.follow_me_data_fixed_offset_x = ProtoField.float ("dji_p3_flyrec.follow_me_data_fixed_offset_x", "Fixed Offset X", base.DEC) +f.follow_me_data_fixed_offset_y = ProtoField.float ("dji_p3_flyrec.follow_me_data_fixed_offset_y", "Fixed Offset Y", base.DEC) +f.follow_me_data_fixed_distance_offset = ProtoField.float ("dji_p3_flyrec.follow_me_data_fixed_distance_offset", "Fixed Distance Offset", base.DEC) +f.follow_me_data_dist_drone2drone = ProtoField.float ("dji_p3_flyrec.follow_me_data_dist_drone2drone", "Dist Drone2Drone", base.DEC) +f.follow_me_data_dist_phone2phone = ProtoField.float ("dji_p3_flyrec.follow_me_data_dist_phone2phone", "Dist Phone2Phone", base.DEC) +f.follow_me_data_gimbal_ptich_tgt = ProtoField.float ("dji_p3_flyrec.follow_me_data_gimbal_ptich_tgt", "Gimbal Ptich Tgt", base.DEC) +f.follow_me_data_gimbal_pitch_error = ProtoField.float ("dji_p3_flyrec.follow_me_data_gimbal_pitch_error", "Gimbal Pitch Error", base.DEC) +f.follow_me_data_gimbal_pitch_rate = ProtoField.float ("dji_p3_flyrec.follow_me_data_gimbal_pitch_rate", "Gimbal Pitch Rate", base.DEC) +f.follow_me_data_in_height_limit = ProtoField.uint8 ("dji_p3_flyrec.follow_me_data_in_height_limit", "In Height Limit", base.HEX) +f.follow_me_data_target_loss_count = ProtoField.uint8 ("dji_p3_flyrec.follow_me_data_target_loss_count", "Target Loss Count", base.HEX) +f.follow_me_data_mission_status = ProtoField.uint8 ("dji_p3_flyrec.follow_me_data_mission_status", "Mission Status", base.HEX) + +f.follow_me_data_fld8B = ProtoField.uint32 ("dji_p3_flyrec.follow_me_data_fld8B", "Unknown 8B", base.HEX) +f.follow_me_data_fld8F = ProtoField.uint32 ("dji_p3_flyrec.follow_me_data_fld8F", "Unknown 8F", base.HEX) +f.follow_me_data_fld93 = ProtoField.uint32 ("dji_p3_flyrec.follow_me_data_fld93", "Unknown 93", base.HEX) +f.follow_me_data_fld97 = ProtoField.uint32 ("dji_p3_flyrec.follow_me_data_fld97", "Unknown 97", base.HEX) +f.follow_me_data_fld9B = ProtoField.double ("dji_p3_flyrec.follow_me_data_fld9B", "Unknown 9B", base.DEC) +f.follow_me_data_fldA3 = ProtoField.double ("dji_p3_flyrec.follow_me_data_fldA3", "Unknown A3", base.DEC) +f.follow_me_data_fldAB = ProtoField.uint32 ("dji_p3_flyrec.follow_me_data_fldAB", "Unknown AB", base.HEX) +f.follow_me_data_fldAf = ProtoField.uint32 ("dji_p3_flyrec.follow_me_data_fldAF", "Unknown AF", base.HEX) + +local function flightrec_follow_me_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.follow_me_data_heading_ref, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_heading_error, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_heading_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_ascending_tgt_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_ascending_error, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_ascending_vel, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_phone_tagt_x, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.follow_me_data_phone_tagt_y, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.follow_me_data_quadrotor_cur_x, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.follow_me_data_quadrotor_cur_y, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.follow_me_data_quadrotor2phone_offset_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_quadrotor2phone_offset_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_quadrotor2phone_distance, payload(offset, 4)) -- offset = 64 + offset = offset + 4 + + subtree:add_le (f.follow_me_data_quadrotor2targetpoint_offset_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_quadrotor2targetpoint_offset_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_quadrotor2targetpoint_distance, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_tagt_vel_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_tagt_vel_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_cur_vel_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_cur_vel_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_cruise_vel_x, payload(offset, 4)) -- offset = 96 + offset = offset + 4 + + subtree:add_le (f.follow_me_data_cruise_vel_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_fixed_offset_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_fixed_offset_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_fixed_distance_offset, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_dist_drone2drone, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_dist_phone2phone, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_gimbal_ptich_tgt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_gimbal_pitch_error, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_gimbal_pitch_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_in_height_limit, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.follow_me_data_target_loss_count, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.follow_me_data_mission_status, payload(offset, 1)) + offset = offset + 1 + + -- Some old packets may stop at offset = 139 + + if (payload:len() >= 179) then + + subtree:add_le (f.follow_me_data_fld8B, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_fld8F, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_fld93, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_fld97, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_fld9B, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.follow_me_data_fldA3, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.follow_me_data_fldAB, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.follow_me_data_fldAF, payload(offset, 4)) + offset = offset + 4 + + end + + if (offset ~= 139) and (offset ~= 179) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Follow Me Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Follow Me Data: Payload size different than expected") end +end + +-- Flight log - Home Lock - 0x002c + +f.home_lock_unkn0 = ProtoField.float ("dji_p3_flyrec.home_lock_unkn0", "Unknown 0", base.DEC) +f.home_lock_unkn4 = ProtoField.float ("dji_p3_flyrec.home_lock_unkn4", "Unknown 4", base.DEC) +f.home_lock_unkn8 = ProtoField.float ("dji_p3_flyrec.home_lock_unkn8", "Unknown 8", base.DEC) +f.home_lock_unknC = ProtoField.float ("dji_p3_flyrec.home_lock_unknC", "Unknown C", base.DEC) + +local function flightrec_home_lock_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.home_lock_unkn0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.home_lock_unkn4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.home_lock_unkn8, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.home_lock_unknC, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Home Lock: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Home Lock: Payload size different than expected") end +end + +-- Flight log - Imu Data Status - 0x0013 + +f.imu_data_status_start_fan = ProtoField.uint8 ("dji_p3_flyrec.imu_data_status_start_fan", "Start Fan", base.HEX, nil, nil, "On Ph3, always 1") +f.imu_data_status_led_status = ProtoField.uint8 ("dji_p3_flyrec.imu_data_status_led_status", "Led Status", base.HEX, nil, nil, "On Ph3, always 0") + +local function flightrec_imu_data_status_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_data_status_start_fan, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.imu_data_status_led_status, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Data Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Data Status: Payload size different than expected") end +end + +-- Flight log - Aircraft Condition Monitor - 0x0046 + +f.aircraft_condition_monitor_craft_flight_mode = ProtoField.uint8 ("dji_p3_flyrec.aircraft_condition_monitor_craft_flight_mode", "Craft Flight Mode", base.HEX) +f.aircraft_condition_monitor_near_gnd_state = ProtoField.uint8 ("dji_p3_flyrec.aircraft_condition_monitor_near_gnd_state", "Near Gnd State", base.HEX) +f.aircraft_condition_monitor_launch_acc_duration = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_launch_acc_duration", "Launch Acc Duration", base.DEC) +f.aircraft_condition_monitor_launch_delta_v = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_launch_delta_v", "Launch Delta V", base.DEC) +f.aircraft_condition_monitor_launch_state = ProtoField.uint8 ("dji_p3_flyrec.aircraft_condition_monitor_launch_state", "Launch State", base.HEX) +f.aircraft_condition_monitor_thrust_proj_gnd = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_thrust_proj_gnd", "Thrust Proj Gnd", base.DEC) +f.aircraft_condition_monitor_thrust_proj_gnd_compen = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_thrust_proj_gnd_compen", "Thrust Proj Gnd Compen", base.DEC) +f.aircraft_condition_monitor_thrust_compensator = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_thrust_compensator", "Thrust Compensator", base.DEC) +f.aircraft_condition_monitor_hover_thrust = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_hover_thrust", "Hover Thrust", base.DEC) +f.aircraft_condition_monitor_dynamic_thrust = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_dynamic_thrust", "Dynamic Thrust", base.DEC) +f.aircraft_condition_monitor_cos_safe_tilt = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_cos_safe_tilt", "Cos Safe Tilt", base.DEC) +f.aircraft_condition_monitor_safe_tilt = ProtoField.float ("dji_p3_flyrec.aircraft_condition_monitor_safe_tilt", "Safe Tilt", base.DEC) + +local function flightrec_aircraft_condition_monitor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.aircraft_condition_monitor_craft_flight_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_monitor_near_gnd_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_monitor_launch_acc_duration, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_condition_monitor_launch_delta_v, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_condition_monitor_launch_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_monitor_thrust_proj_gnd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_condition_monitor_thrust_proj_gnd_compen, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_condition_monitor_thrust_compensator, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_condition_monitor_hover_thrust, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_condition_monitor_dynamic_thrust, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_condition_monitor_cos_safe_tilt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_condition_monitor_safe_tilt, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 39) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Aircraft Condition Monitor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Aircraft Condition Monitor: Payload size different than expected") end +end + +-- Flight log - Aircraft Model - 0x0050 + +f.aircraft_model_m1_current = ProtoField.float ("dji_p3_flyrec.aircraft_model_m1_current", "M1 Current", base.DEC) +f.aircraft_model_m1_w = ProtoField.float ("dji_p3_flyrec.aircraft_model_m1_w", "M1 W", base.DEC) +f.aircraft_model_m1_lift = ProtoField.float ("dji_p3_flyrec.aircraft_model_m1_lift", "M1 Lift", base.DEC) +f.aircraft_model_m1_torque = ProtoField.float ("dji_p3_flyrec.aircraft_model_m1_torque", "M1 Torque", base.DEC) +f.aircraft_model_m2_current = ProtoField.float ("dji_p3_flyrec.aircraft_model_m2_current", "M2 Current", base.DEC) +f.aircraft_model_m2_w = ProtoField.float ("dji_p3_flyrec.aircraft_model_m2_w", "M2 W", base.DEC) +f.aircraft_model_m2_lift = ProtoField.float ("dji_p3_flyrec.aircraft_model_m2_lift", "M2 Lift", base.DEC) +f.aircraft_model_m2_torque = ProtoField.float ("dji_p3_flyrec.aircraft_model_m2_torque", "M2 Torque", base.DEC) +f.aircraft_model_m3_current = ProtoField.float ("dji_p3_flyrec.aircraft_model_m3_current", "M3 Current", base.DEC) +f.aircraft_model_m3_w = ProtoField.float ("dji_p3_flyrec.aircraft_model_m3_w", "M3 W", base.DEC) +f.aircraft_model_m3_lift = ProtoField.float ("dji_p3_flyrec.aircraft_model_m3_lift", "M3 Lift", base.DEC) +f.aircraft_model_m3_torque = ProtoField.float ("dji_p3_flyrec.aircraft_model_m3_torque", "M3 Torque", base.DEC) +f.aircraft_model_m4_current = ProtoField.float ("dji_p3_flyrec.aircraft_model_m4_current", "M4 Current", base.DEC) +f.aircraft_model_m4_w = ProtoField.float ("dji_p3_flyrec.aircraft_model_m4_w", "M4 W", base.DEC) +f.aircraft_model_m4_lift = ProtoField.float ("dji_p3_flyrec.aircraft_model_m4_lift", "M4 Lift", base.DEC) +f.aircraft_model_m4_torque = ProtoField.float ("dji_p3_flyrec.aircraft_model_m4_torque", "M4 Torque", base.DEC) +f.aircraft_model_m5_current = ProtoField.float ("dji_p3_flyrec.aircraft_model_m5_current", "M5 Current", base.DEC) +f.aircraft_model_m5_w = ProtoField.float ("dji_p3_flyrec.aircraft_model_m5_w", "M5 W", base.DEC) +f.aircraft_model_m5_lift = ProtoField.float ("dji_p3_flyrec.aircraft_model_m5_lift", "M5 Lift", base.DEC) +f.aircraft_model_m5_torque = ProtoField.float ("dji_p3_flyrec.aircraft_model_m5_torque", "M5 Torque", base.DEC) +f.aircraft_model_m6_current = ProtoField.float ("dji_p3_flyrec.aircraft_model_m6_current", "M6 Current", base.DEC) +f.aircraft_model_m6_w = ProtoField.float ("dji_p3_flyrec.aircraft_model_m6_w", "M6 W", base.DEC) +f.aircraft_model_m6_lift = ProtoField.float ("dji_p3_flyrec.aircraft_model_m6_lift", "M6 Lift", base.DEC) +f.aircraft_model_m6_torque = ProtoField.float ("dji_p3_flyrec.aircraft_model_m6_torque", "M6 Torque", base.DEC) +f.aircraft_model_m7_current = ProtoField.float ("dji_p3_flyrec.aircraft_model_m7_current", "M7 Current", base.DEC) +f.aircraft_model_m7_w = ProtoField.float ("dji_p3_flyrec.aircraft_model_m7_w", "M7 W", base.DEC) +f.aircraft_model_m7_lift = ProtoField.float ("dji_p3_flyrec.aircraft_model_m7_lift", "M7 Lift", base.DEC) +f.aircraft_model_m7_torque = ProtoField.float ("dji_p3_flyrec.aircraft_model_m7_torque", "M7 Torque", base.DEC) +f.aircraft_model_m8_current = ProtoField.float ("dji_p3_flyrec.aircraft_model_m8_current", "M8 Current", base.DEC) +f.aircraft_model_m8_w = ProtoField.float ("dji_p3_flyrec.aircraft_model_m8_w", "M8 W", base.DEC) +f.aircraft_model_m8_lift = ProtoField.float ("dji_p3_flyrec.aircraft_model_m8_lift", "M8 Lift", base.DEC) +f.aircraft_model_m8_torque = ProtoField.float ("dji_p3_flyrec.aircraft_model_m8_torque", "M8 Torque", base.DEC) + +local function flightrec_aircraft_model_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.aircraft_model_m1_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m1_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m1_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m1_torque, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m2_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m2_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m2_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m2_torque, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m3_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m3_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m3_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m3_torque, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m4_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m4_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m4_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m4_torque, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m5_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m5_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m5_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m5_torque, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m6_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m6_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m6_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m6_torque, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m7_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m7_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m7_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m7_torque, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m8_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m8_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m8_lift, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.aircraft_model_m8_torque, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 128) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Aircraft Model: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Aircraft Model: Payload size different than expected") end +end + +-- Flight log - Go Home Info - 0x005a + +f.go_home_info_go_home_stage = ProtoField.uint8 ("dji_p3_flyrec.go_home_info_go_home_stage", "Go Home Stage", base.HEX) +f.go_home_info_go_home_timer = ProtoField.float ("dji_p3_flyrec.go_home_info_go_home_timer", "Go Home Timer", base.DEC) +f.go_home_info_dis_to_home_x = ProtoField.float ("dji_p3_flyrec.go_home_info_dis_to_home_x", "Dis To Home X", base.DEC) +f.go_home_info_dis_to_home_y = ProtoField.float ("dji_p3_flyrec.go_home_info_dis_to_home_y", "Dis To Home Y", base.DEC) +--f.go_home_info_e_dis_to_home = ProtoField.none ("dji_p3_flyrec.go_home_info_e_dis_to_home", "E Dis To Home", base.NONE, nil, nil, "sqrt(dis_to_home_x*dis_to_home_x+dis_to_home_y*dis_to_home_y)") + +local function flightrec_go_home_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.go_home_info_go_home_stage, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_go_home_timer, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.go_home_info_dis_to_home_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.go_home_info_dis_to_home_y, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 13) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Go Home Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Go Home Info: Payload size different than expected") end +end + +-- Flight log - New Mvo Feedback - 0x001d + +f.new_mvo_feedback_visionobservationcount = ProtoField.uint16 ("dji_p3_flyrec.new_mvo_feedback_visionobservationcount", "Vision Observation Count", base.HEX) +f.new_mvo_feedback_vel_x = ProtoField.int16 ("dji_p3_flyrec.new_mvo_feedback_vel_x", "Vel X", base.DEC) +f.new_mvo_feedback_vel_y = ProtoField.int16 ("dji_p3_flyrec.new_mvo_feedback_vel_y", "Vel Y", base.DEC) +f.new_mvo_feedback_vel_z = ProtoField.int16 ("dji_p3_flyrec.new_mvo_feedback_vel_z", "Vel Z", base.DEC) +f.new_mvo_feedback_pos_x = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_pos_x", "Pos X", base.DEC) +f.new_mvo_feedback_pos_y = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_pos_y", "Pos Y", base.DEC) +f.new_mvo_feedback_pos_z = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_pos_z", "Pos Z", base.DEC) +f.new_mvo_feedback_hoverpointuncertainty1 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_hoverpointuncertainty1", "Hover Point Uncertainty 1", base.DEC) +f.new_mvo_feedback_hoverpointuncertainty2 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_hoverpointuncertainty2", "Hover Point Uncertainty 2", base.DEC) +f.new_mvo_feedback_hoverpointuncertainty3 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_hoverpointuncertainty3", "Hover Point Uncertainty 3", base.DEC) +f.new_mvo_feedback_hoverpointuncertainty4 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_hoverpointuncertainty4", "Hover Point Uncertainty 4", base.DEC) +f.new_mvo_feedback_hoverpointuncertainty5 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_hoverpointuncertainty5", "Hover Point Uncertainty 5", base.DEC) +f.new_mvo_feedback_hoverpointuncertainty6 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_hoverpointuncertainty6", "Hover Point Uncertainty 6", base.DEC) +f.new_mvo_feedback_velocityuncertainty1 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_velocityuncertainty1", "Velocity Uncertainty 1", base.DEC) +f.new_mvo_feedback_velocityuncertainty2 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_velocityuncertainty2", "Velocity Uncertainty 2", base.DEC) +f.new_mvo_feedback_velocityuncertainty3 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_velocityuncertainty3", "Velocity Uncertainty 3", base.DEC) +f.new_mvo_feedback_velocityuncertainty4 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_velocityuncertainty4", "Velocity Uncertainty 4", base.DEC) +f.new_mvo_feedback_velocityuncertainty5 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_velocityuncertainty5", "Velocity Uncertainty 5", base.DEC) +f.new_mvo_feedback_velocityuncertainty6 = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_velocityuncertainty6", "Velocity Uncertainty 6", base.DEC) +f.new_mvo_feedback_height = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_height", "Height", base.DEC) +f.new_mvo_feedback_heightuncertainty = ProtoField.float ("dji_p3_flyrec.new_mvo_feedback_heightuncertainty", "Height Uncertainty", base.DEC) +f.new_mvo_feedback_reserved1 = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_reserved1", "Reserved1", base.HEX) + f.new_mvo_feedback_e_new_mvo_px_flag = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_e_new_mvo_px_flag", "E New Mvo Px Flag", base.HEX, nil, 0x10, nil) + f.new_mvo_feedback_e_new_mvo_py_flag = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_e_new_mvo_py_flag", "E New Mvo Py Flag", base.HEX, nil, 0x20, nil) + f.new_mvo_feedback_e_new_mvo_pz_flag = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_e_new_mvo_pz_flag", "E New Mvo Pz Flag", base.HEX, nil, 0x40, nil) + f.new_mvo_feedback_e_new_mvo_vx_flag = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_e_new_mvo_vx_flag", "E New Mvo Vx Flag", base.HEX, nil, 0x01, nil) + f.new_mvo_feedback_e_new_mvo_vy_flag = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_e_new_mvo_vy_flag", "E New Mvo Vy Flag", base.HEX, nil, 0x02, nil) + f.new_mvo_feedback_e_new_mvo_vz_flag = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_e_new_mvo_vz_flag", "E New Mvo Vz Flag", base.HEX, nil, 0x04, nil) +f.new_mvo_feedback_reserved2 = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_reserved2", "Reserved2", base.HEX) +f.new_mvo_feedback_reserved3 = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_reserved3", "Reserved3", base.HEX) +f.new_mvo_feedback_reserved4 = ProtoField.uint8 ("dji_p3_flyrec.new_mvo_feedback_reserved4", "Reserved4", base.HEX) + +local function flightrec_new_mvo_feedback_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.new_mvo_feedback_visionobservationcount, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.new_mvo_feedback_vel_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.new_mvo_feedback_vel_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.new_mvo_feedback_vel_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.new_mvo_feedback_pos_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_pos_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_pos_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_hoverpointuncertainty1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_hoverpointuncertainty2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_hoverpointuncertainty3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_hoverpointuncertainty4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_hoverpointuncertainty5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_hoverpointuncertainty6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_velocityuncertainty1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_velocityuncertainty2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_velocityuncertainty3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_velocityuncertainty4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_velocityuncertainty5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_velocityuncertainty6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_heightuncertainty, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.new_mvo_feedback_reserved1, payload(offset, 1)) + subtree:add_le (f.new_mvo_feedback_e_new_mvo_px_flag, payload(offset, 1)) + subtree:add_le (f.new_mvo_feedback_e_new_mvo_py_flag, payload(offset, 1)) + subtree:add_le (f.new_mvo_feedback_e_new_mvo_pz_flag, payload(offset, 1)) + subtree:add_le (f.new_mvo_feedback_e_new_mvo_vx_flag, payload(offset, 1)) + subtree:add_le (f.new_mvo_feedback_e_new_mvo_vy_flag, payload(offset, 1)) + subtree:add_le (f.new_mvo_feedback_e_new_mvo_vz_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.new_mvo_feedback_reserved2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.new_mvo_feedback_reserved3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.new_mvo_feedback_reserved4, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"New Mvo Feedback: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"New Mvo Feedback: Payload size different than expected") end +end + +-- Flight log - Svo Avoid Obstacle - 0x0064 + +f.svo_avoid_obstacle_svo_stop_flag = ProtoField.uint8 ("dji_p3_flyrec.svo_avoid_obstacle_svo_stop_flag", "Svo Stop Flag", base.HEX) + f.svo_avoid_obstacle_svo_stop_flag = ProtoField.uint8 ("dji_p3_flyrec.svo_avoid_obstacle_svo_stop_flag", "Svo Stop Flag", base.HEX, nil, 0x01, nil) + f.svo_avoid_obstacle_svo_work_flag = ProtoField.uint8 ("dji_p3_flyrec.svo_avoid_obstacle_svo_work_flag", "Svo Work Flag", base.HEX, nil, 0x02, nil) + f.svo_avoid_obstacle_svo_en_flag = ProtoField.uint8 ("dji_p3_flyrec.svo_avoid_obstacle_svo_en_flag", "Svo En Flag", base.HEX, nil, 0x04, nil) +f.svo_avoid_obstacle_svo_p_front = ProtoField.uint16 ("dji_p3_flyrec.svo_avoid_obstacle_svo_p_front", "Svo P Front", base.HEX, nil, nil, "Obstacle distance detected by front camera; unit:cm") +f.svo_avoid_obstacle_svo_p_right = ProtoField.uint16 ("dji_p3_flyrec.svo_avoid_obstacle_svo_p_right", "Svo P Right", base.HEX, nil, nil, "Obstacle distance detected by right camera; unit:cm") +f.svo_avoid_obstacle_svo_p_back = ProtoField.uint16 ("dji_p3_flyrec.svo_avoid_obstacle_svo_p_back", "Svo P Back", base.HEX, nil, nil, "Obstacle distance detected by back camera; unit:cm") +f.svo_avoid_obstacle_svo_p_left = ProtoField.uint16 ("dji_p3_flyrec.svo_avoid_obstacle_svo_p_left", "Svo P Left", base.HEX, nil, nil, "Obstacle distance detected by left camera; unit:cm") +f.svo_avoid_obstacle_svo_v_limit = ProtoField.uint8 ("dji_p3_flyrec.svo_avoid_obstacle_svo_v_limit", "Svo V Limit", base.HEX) +f.svo_avoid_obstacle_svo_cnt = ProtoField.uint8 ("dji_p3_flyrec.svo_avoid_obstacle_svo_cnt", "Svo Cnt", base.HEX) + +local function flightrec_svo_avoid_obstacle_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.svo_avoid_obstacle_svo_stop_flag, payload(offset, 1)) + subtree:add_le (f.svo_avoid_obstacle_svo_stop_flag, payload(offset, 1)) + subtree:add_le (f.svo_avoid_obstacle_svo_work_flag, payload(offset, 1)) + subtree:add_le (f.svo_avoid_obstacle_svo_en_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_obstacle_svo_p_front, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.svo_avoid_obstacle_svo_p_right, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.svo_avoid_obstacle_svo_p_back, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.svo_avoid_obstacle_svo_p_left, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.svo_avoid_obstacle_svo_v_limit, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_obstacle_svo_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 11) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Svo Avoid Obstacle: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Svo Avoid Obstacle: Payload size different than expected") end +end + +-- Flight log - Rtkdata - 0xcff1 + +f.rtkdata_lat = ProtoField.int32 ("dji_p3_flyrec.rtkdata_lat", "Lat", base.DEC) +f.rtkdata_lon = ProtoField.int32 ("dji_p3_flyrec.rtkdata_lon", "Lon", base.DEC) +f.rtkdata_height = ProtoField.int32 ("dji_p3_flyrec.rtkdata_height", "Height", base.DEC) +f.rtkdata_satnum = ProtoField.uint16 ("dji_p3_flyrec.rtkdata_satnum", "Satnum", base.HEX) +f.rtkdata_postype = ProtoField.uint16 ("dji_p3_flyrec.rtkdata_postype", "Postype", base.HEX) +f.rtkdata_reserve1 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve1", "Reserve1", base.DEC) +f.rtkdata_reserve2 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve2", "Reserve2", base.DEC) +f.rtkdata_reserve3 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve3", "Reserve3", base.DEC) +f.rtkdata_reserve4 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve4", "Reserve4", base.DEC) +f.rtkdata_reserve5 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve5", "Reserve5", base.DEC) +f.rtkdata_reserve6 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve6", "Reserve6", base.DEC) +f.rtkdata_reserve7 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve7", "Reserve7", base.DEC) +f.rtkdata_reserve8 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve8", "Reserve8", base.DEC) +f.rtkdata_reserve9 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve9", "Reserve9", base.DEC) +f.rtkdata_reserve10 = ProtoField.int32 ("dji_p3_flyrec.rtkdata_reserve10", "Reserve10", base.DEC) +f.rtkdata_cntrtk = ProtoField.uint32 ("dji_p3_flyrec.rtkdata_cntrtk", "Cntrtk", base.HEX) + +local function flightrec_rtkdata_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rtkdata_lat, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_lon, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_satnum, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rtkdata_postype, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rtkdata_reserve1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve7, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve8, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve9, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_reserve10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_cntrtk, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rtkdata: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rtkdata: Payload size different than expected") end +end + +-- Flight log - Gear Debug Info - 0x006e + +f.gear_debug_info_gear_mode = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_mode", "Gear Mode", base.HEX) +f.gear_debug_info_gear_state = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_state", "Gear State", base.HEX) +f.gear_debug_info_gear_cmd = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_cmd", "Gear Cmd", base.HEX) +f.gear_debug_info_gear_speed = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_speed", "Gear Speed", base.HEX) +f.gear_debug_info_gear_counter = ProtoField.uint32 ("dji_p3_flyrec.gear_debug_info_gear_counter", "Gear Counter", base.HEX) +f.gear_debug_info_gear_pack_flag = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_pack_flag", "Gear Pack Flag", base.HEX) +f.gear_debug_info_gear_pack_req = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_pack_req", "Gear Pack Req", base.HEX) +f.gear_debug_info_gear_pack_type = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_pack_type", "Gear Pack Type", base.HEX) +f.gear_debug_info_gear_pack_state = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_pack_state", "Gear Pack State", base.HEX) +f.gear_debug_info_gear_pack_manual_cmd = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_pack_manual_cmd", "Gear Pack Manual Cmd", base.HEX) +f.gear_debug_info_gear_rc_cmd = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_rc_cmd", "Gear Rc Cmd", base.HEX) +f.gear_debug_info_gear_app_req = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_app_req", "Gear App Req", base.HEX) +f.gear_debug_info_gear_app_cmd = ProtoField.uint8 ("dji_p3_flyrec.gear_debug_info_gear_app_cmd", "Gear App Cmd", base.HEX) +f.gear_debug_info_gear_rc_raw_input = ProtoField.int16 ("dji_p3_flyrec.gear_debug_info_gear_rc_raw_input", "Gear Rc Raw Input", base.DEC) + +local function flightrec_gear_debug_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gear_debug_info_gear_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_speed, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_counter, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gear_debug_info_gear_pack_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_pack_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_pack_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_pack_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_pack_manual_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_rc_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_app_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_app_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_debug_info_gear_rc_raw_input, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gear Debug Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gear Debug Info: Payload size different than expected") end +end + +-- Flight log - Svo Ctrl Debug - 0x0066 + +f.svo_ctrl_debug_svo_avoid_debug0_limit_en = ProtoField.uint8 ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug0_limit_en", "Svo Avoid Debug0 Limit En", base.HEX) +f.svo_ctrl_debug_svo_avoid_debug0_d_craft2edge = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug0_d_craft2edge", "Svo Avoid Debug0 D Craft2Edge", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug0_limit_direct_0 = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug0_limit_direct_0", "Svo Avoid Debug0 Limit Direct 0", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug0_limit_direct_1 = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug0_limit_direct_1", "Svo Avoid Debug0 Limit Direct 1", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug0_limit_norm = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug0_limit_norm", "Svo Avoid Debug0 Limit Norm", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug0_damping_scale = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug0_damping_scale", "Svo Avoid Debug0 Damping Scale", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug1_limit_en = ProtoField.uint8 ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug1_limit_en", "Svo Avoid Debug1 Limit En", base.HEX) +f.svo_ctrl_debug_svo_avoid_debug1_d_craft2edge = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug1_d_craft2edge", "Svo Avoid Debug1 D Craft2Edge", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug1_limit_direct_0 = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug1_limit_direct_0", "Svo Avoid Debug1 Limit Direct 0", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug1_limit_direct_1 = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug1_limit_direct_1", "Svo Avoid Debug1 Limit Direct 1", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug1_limit_norm = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug1_limit_norm", "Svo Avoid Debug1 Limit Norm", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug1_damping_scale = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug1_damping_scale", "Svo Avoid Debug1 Damping Scale", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug2_limit_en = ProtoField.uint8 ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug2_limit_en", "Svo Avoid Debug2 Limit En", base.HEX) +f.svo_ctrl_debug_svo_avoid_debug2_d_craft2edge = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug2_d_craft2edge", "Svo Avoid Debug2 D Craft2Edge", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug2_limit_direct_0 = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug2_limit_direct_0", "Svo Avoid Debug2 Limit Direct 0", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug2_limit_direct_1 = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug2_limit_direct_1", "Svo Avoid Debug2 Limit Direct 1", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug2_limit_norm = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug2_limit_norm", "Svo Avoid Debug2 Limit Norm", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug2_damping_scale = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug2_damping_scale", "Svo Avoid Debug2 Damping Scale", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug3_limit_en = ProtoField.uint8 ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug3_limit_en", "Svo Avoid Debug3 Limit En", base.HEX) +f.svo_ctrl_debug_svo_avoid_debug3_d_craft2edge = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug3_d_craft2edge", "Svo Avoid Debug3 D Craft2Edge", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug3_limit_direct_0 = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug3_limit_direct_0", "Svo Avoid Debug3 Limit Direct 0", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug3_limit_direct_1 = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug3_limit_direct_1", "Svo Avoid Debug3 Limit Direct 1", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug3_limit_norm = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug3_limit_norm", "Svo Avoid Debug3 Limit Norm", base.DEC) +f.svo_ctrl_debug_svo_avoid_debug3_damping_scale = ProtoField.float ("dji_p3_flyrec.svo_ctrl_debug_svo_avoid_debug3_damping_scale", "Svo Avoid Debug3 Damping Scale", base.DEC) + +local function flightrec_svo_ctrl_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug0_limit_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug0_d_craft2edge, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug0_limit_direct_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug0_limit_direct_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug0_limit_norm, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug0_damping_scale, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug1_limit_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug1_d_craft2edge, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug1_limit_direct_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug1_limit_direct_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug1_limit_norm, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug1_damping_scale, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug2_limit_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug2_d_craft2edge, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug2_limit_direct_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug2_limit_direct_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug2_limit_norm, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug2_damping_scale, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug3_limit_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug3_d_craft2edge, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug3_limit_direct_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug3_limit_direct_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug3_limit_norm, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.svo_ctrl_debug_svo_avoid_debug3_damping_scale, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 84) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Svo Ctrl Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Svo Ctrl Debug: Payload size different than expected") end +end + +-- Flight log - Waypoint Debug - 0x00a0 + +f.waypoint_debug_wp_mission_status = ProtoField.uint8 ("dji_p3_flyrec.waypoint_debug_wp_mission_status", "Wp Mission Status", base.HEX) +f.waypoint_debug_wp_cur_num = ProtoField.uint8 ("dji_p3_flyrec.waypoint_debug_wp_cur_num", "Wp Cur Num", base.HEX) +f.waypoint_debug_wp_tgt_vel = ProtoField.uint16 ("dji_p3_flyrec.waypoint_debug_wp_tgt_vel", "Wp Tgt Vel", base.HEX) +f.waypoint_debug_wp_fld04 = ProtoField.uint16 ("dji_p3_flyrec.waypoint_debug_wp_fld04", "Wp Field 04", base.HEX) +f.waypoint_debug_wp_fld06 = ProtoField.uint8 ("dji_p3_flyrec.waypoint_debug_wp_fld06", "Wp Field 06", base.HEX) +f.waypoint_debug_wp_fld08 = ProtoField.uint16 ("dji_p3_flyrec.waypoint_debug_wp_fld08", "Wp Field 08", base.HEX) +f.waypoint_debug_wp_fld0A = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld0A", "Wp Field 0A", base.HEX) +f.waypoint_debug_wp_fld0E = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld0E", "Wp Field 0E", base.HEX) +f.waypoint_debug_wp_fld14 = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld14", "Wp Field 14", base.HEX) +f.waypoint_debug_wp_fld18 = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld18", "Wp Field 18", base.HEX) +f.waypoint_debug_wp_fld1C = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld1C", "Wp Field 1C", base.HEX) +f.waypoint_debug_wp_fld20 = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld20", "Wp Field 20", base.HEX) +f.waypoint_debug_wp_fld24 = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld24", "Wp Field 24", base.HEX) +f.waypoint_debug_wp_fld28 = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld28", "Wp Field 28", base.HEX) +f.waypoint_debug_wp_fld2C = ProtoField.uint32 ("dji_p3_flyrec.waypoint_debug_wp_fld2C", "Wp Field 2C", base.HEX) +f.waypoint_debug_wp_fld30 = ProtoField.uint8 ("dji_p3_flyrec.waypoint_debug_wp_fld30", "Wp Field 30", base.HEX) +--f.waypoint_debug_e_gps_lat = ProtoField.none ("dji_p3_flyrec.waypoint_debug_e_gps_lat", "E Gps Lat", base.NONE, nil, nil, "(gps_lat-225400000)/10000000*3.1415926/180*6370000") +--f.waypoint_debug_e_gps_lon = ProtoField.none ("dji_p3_flyrec.waypoint_debug_e_gps_lon", "E Gps Lon", base.NONE, nil, nil, "(gps_lon-1139468000)/10000000*3.1415926/180*6370000*cos(0.3933972)") +--f.waypoint_debug_e_atti_lat = ProtoField.none ("dji_p3_flyrec.waypoint_debug_e_atti_lat", "E Atti Lat", base.NONE, nil, nil, "(lati-0.3933972)*6370000") +--f.waypoint_debug_e_atti_lon = ProtoField.none ("dji_p3_flyrec.waypoint_debug_e_atti_lon", "E Atti Lon", base.NONE, nil, nil, "(longti-1.9887468)*6370000*cos(0.3933972)") +--f.waypoint_debug_neg_mvo_vx = ProtoField.none ("dji_p3_flyrec.waypoint_debug_neg_mvo_vx", "Neg Mvo Vx", base.NONE, nil, nil, "(Vel_X/1000*cos(E_yaw*3.1415926/180)+Vel_Y/1000*sin(-E_yaw*3.1415926/180))") +--f.waypoint_debug_neg_mvo_vy = ProtoField.none ("dji_p3_flyrec.waypoint_debug_neg_mvo_vy", "Neg Mvo Vy", base.NONE, nil, nil, "(Vel_X/1000*sin(E_yaw*3.1415926/180)+Vel_Y/1000*cos(E_yaw*3.1415926/180))") +--f.waypoint_debug_neg_mvo_vz = ProtoField.none ("dji_p3_flyrec.waypoint_debug_neg_mvo_vz", "Neg Mvo Vz", base.NONE, nil, nil, "Vel_Z/1000") +--f.waypoint_debug_e_acc_norm = ProtoField.none ("dji_p3_flyrec.waypoint_debug_e_acc_norm", "E Acc Norm", base.NONE, nil, nil, "sqrt(acc_x^2+acc_y^2+acc_z^2)") +--f.waypoint_debug_e_horizon_speed = ProtoField.none ("dji_p3_flyrec.waypoint_debug_e_horizon_speed", "E Horizon Speed", base.NONE, nil, nil, "sqrt(vg_x^2+vg_y^2)") + +local function flightrec_waypoint_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.waypoint_debug_wp_mission_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.waypoint_debug_wp_cur_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.waypoint_debug_wp_tgt_vel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.waypoint_debug_wp_fld04, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.waypoint_debug_wp_fld06, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.waypoint_debug_wp_fld08, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.waypoint_debug_wp_fld0A, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld0E, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld14, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld1C, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld20, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld24, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld28, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld2C, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.waypoint_debug_wp_fld30, payload(offset, 1)) + offset = offset + 1 + + -- This struct is sometimes seen as size=44; needs checking what is that version + if (offset ~= 46) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Waypoint Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Waypoint Debug: Payload size different than expected") end +end + +-- Flight log - Unknown - 0xa000 + +f.unkn_a000_field0 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field0", "Field 0", base.HEX) +f.unkn_a000_field4 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field4", "Field 4", base.HEX) +f.unkn_a000_field8 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field8", "Field 8", base.HEX) +f.unkn_a000_fieldC = ProtoField.float ("dji_p3_flyrec.unkn_a000_fieldC", "Field C", base.HEX) +f.unkn_a000_field10 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field10", "Field 10", base.HEX) +f.unkn_a000_field14 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field14", "Field 14", base.HEX) +f.unkn_a000_field18 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field18", "Field 18", base.HEX) +f.unkn_a000_field1C = ProtoField.float ("dji_p3_flyrec.unkn_a000_field1C", "Field 1C", base.HEX) +f.unkn_a000_field20 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field20", "Field 20", base.HEX) +f.unkn_a000_field24 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field24", "Field 24", base.HEX) +f.unkn_a000_field28 = ProtoField.float ("dji_p3_flyrec.unkn_a000_field28", "Field 28", base.HEX) +f.unkn_a000_field2C = ProtoField.float ("dji_p3_flyrec.unkn_a000_field2C", "Field 2C", base.HEX) +f.unkn_a000_field30 = ProtoField.uint8 ("dji_p3_flyrec.unkn_a000_field30", "Field 30", base.HEX) + +local function flightrec_unkn_a000_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.unkn_a000_field0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field8, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_fieldC, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field14, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field1C, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field20, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field24, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field28, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field2C, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.unkn_a000_field30, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 49) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Unknown a000: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Unknown a000: Payload size different than expected") end +end + +DJI_P3_FLIGHT_RECORD_DISSECT = { + [0x0000] = flightrec_controller_dissector, + [0x07cf] = flightrec_ofdm_cnt_dissector, + [0x07d0] = flightrec_uart_cnt_dissector, + [0x0002] = flightrec_imu_tail_dissector, + [0xfffa] = flightrec_drv_log_dissector, + [0x0073] = flightrec_asr_dissector, + [0x0001] = flightrec_imu_atti_dissector, + [0x0003] = flightrec_imu_ex_dissector, + [0x0820] = flightrec_imu_tail_00_dissector, + [0x0800] = flightrec_imu_atti_00_dissector, + [0x0810] = flightrec_imu_ex_00_dissector, + [0x0821] = flightrec_imu_tail_01_dissector, + [0x0801] = flightrec_imu_atti_01_dissector, + [0x0811] = flightrec_imu_ex_01_dissector, + [0x0822] = flightrec_imu_tail_02_dissector, + [0x0802] = flightrec_imu_atti_02_dissector, + [0x0812] = flightrec_imu_ex_02_dissector, + [0x0004] = flightrec_compass_dissector, + [0x0005] = flightrec_gps_glns_dissector, + [0x000b] = flightrec_gps_snr_dissector, + [0x0061] = flightrec_pt3_gps_snr_dissector, + [0x005b] = flightrec_imu_21100_dissector, + [0x005c] = flightrec_imu_raw_dissector, + [0x0062] = flightrec_imu_raw_dissector, -- second type containing the same data + [0x0006] = flightrec_imu_init_dissector, + [0x000c] = flightrec_osd_general_dissector, + [0x000d] = flightrec_osd_home_dissector, + [0x001a] = flightrec_fdi_dissector, + [0x8003] = flightrec_vincent_debug_dissector, + [0x8000] = flightrec_fly_log_dissector, + [0xff00] = flightrec_sd_logs_dissector, + [0xfffe] = flightrec_svn_info_dissector, + [0x0007] = flightrec_imu_data_dissector, + [0x0870] = flightrec_imu_data_00_dissector, + [0x0871] = flightrec_imu_data_01_dissector, + [0x0872] = flightrec_imu_data_02_dissector, + [0x0008] = flightrec_imu_cali_data_dissector, + [0x0009] = flightrec_sensor_cfg_temp_dissector, + [0x000a] = flightrec_temp_ctl_data_dissector, + [0x0880] = flightrec_temp_ctl_data_00_dissector, + [0x0881] = flightrec_temp_ctl_data_01_dissector, + [0x0882] = flightrec_temp_ctl_data_02_dissector, + [0x0014] = flightrec_pwm_output_dissector, + [0x0015] = flightrec_temp_bias_data_dissector, + [0x0016] = flightrec_temp_cali_data_dissector, + [0x0018] = flightrec_app_temp_bias_data_dissector, + [0x0019] = flightrec_app_temp_cali_data_dissector, + [0x0893] = flightrec_temp_cali_data_00_dissector, + [0x0896] = flightrec_app_temp_cali_data_00_dissector, + [0x0894] = flightrec_temp_cali_data_01_dissector, + [0x0897] = flightrec_app_temp_cali_data_01_dissector, + [0x0895] = flightrec_temp_cali_data_02_dissector, + [0x0898] = flightrec_app_temp_cali_data_02_dissector, + [0x0023] = flightrec_mpu6500_raw_data_dissector, + [0x0024] = flightrec_adxl278_raw_data_dissector, + [0x0065] = flightrec_svo_debug_dissector, + [0xcdf0] = flightrec_uc_monitor_dissector, + [0xcdff] = flightrec_rc_delay_dissector, + [0xce02] = flightrec_taskb_info_dissector, + [0xce06] = flightrec_taska_info_dissector, + [0xce08] = flightrec_taskc_info_dissector, + [0xce09] = flightrec_taskd_info_dissector, + [0xcdf6] = flightrec_rc_replay_dissector, + [0xcdf1] = flightrec_escm_dissector, + [0xcdf2] = flightrec_sweep_dissector, + [0x000e] = flightrec_mvo_dissector, + [0x0010] = flightrec_usonic_dissector, + [0xcdef] = flightrec_console_dissector, + [0xffff] = flightrec_syscfg_dissector, + [0x0011] = flightrec_battery_info_dissector, + [0x0017] = flightrec_special_cmd_dissector, + [0x003c] = flightrec_serial_api_inputs_dissector, + [0x0032] = flightrec_ctrl_vert_dissector, + [0x0033] = flightrec_ctrl_horiz_dissector, + [0x0034] = flightrec_ctrl_atti_dissector, + [0x0035] = flightrec_ctrl_ccpm_dissector, + [0x0036] = flightrec_ctrl_motor_dissector, + [0x0096] = flightrec_wp_curve_dissector, + [0x0012] = flightrec_smart_battery_info_dissector, + [0x0028] = flightrec_airport_limit_data_dissector, + [0x0029] = flightrec_fmu_device_run_time_dissector, + [0x002a] = flightrec_hp_data_dissector, + [0x002b] = flightrec_follow_me_data_dissector, + [0x002c] = flightrec_home_lock_dissector, + [0x0013] = flightrec_imu_data_status_dissector, + [0x0046] = flightrec_aircraft_condition_monitor_dissector, + [0x0050] = flightrec_aircraft_model_dissector, + [0x005a] = flightrec_go_home_info_dissector, + [0x001d] = flightrec_new_mvo_feedback_dissector, + [0x0064] = flightrec_svo_avoid_obstacle_dissector, + [0xcff1] = flightrec_rtkdata_dissector, + [0x006e] = flightrec_gear_debug_info_dissector, + [0x0066] = flightrec_svo_ctrl_debug_dissector, + [0x00a0] = flightrec_waypoint_debug_dissector, + [0xa000] = flightrec_unkn_a000_dissector, +} + +-- [0] Start of Pkt, always 0x55 +f.delimiter = ProtoField.uint8 ("dji_p3_flyrec.delimiter", "Delimiter", base.HEX) +-- [1] Length of Pkt +f.length = ProtoField.uint16 ("dji_p3_flyrec.length", "Length", base.HEX, nil, 0x3FF) +-- [2] Protocol version +f.protocol_version = ProtoField.uint16 ("dji_p3_flyrec.protover", "Protocol Version", base.HEX, nil, 0xFC00) +-- [3] Data Type +f.datatype = ProtoField.uint8 ("dji_p3_flyrec.hdr_crc", "Header CRC", base.HEX) + +-- Fields for ProtoVer = 0 (Flight Record) + +-- [4-5] Log Entry Type +f.etype = ProtoField.uint16 ("dji_p3_flyrec.etype", "Log Entry Type", base.HEX, DJI_P3_FLIGHT_RECORD_ENTRY_TYPE) +-- [6-9] Sequence Ctr +f.seqctr = ProtoField.uint16 ("dji_p3_flyrec.seqctr", "Seq Counter", base.DEC) +-- [B] Payload (optional) +f.payload = ProtoField.bytes ("dji_p3_flyrec.payload", "Payload", base.SPACE) + +-- [B+Payload] CRC +f.crc = ProtoField.uint16 ("dji_p3_flyrec.crc", "CRC", base.HEX) + +local function flightrec_decrypt_payload(pkt_length, buffer) + local offset = 6 + local seqctr = buffer(offset,4):le_uint() + + offset = 10 + local payload = buffer(offset, pkt_length - offset - 2):bytes() + + for i = 0, (payload:len() - 1) do + payload:set_index( i, bit.bxor(payload:get_index(i), bit32.band(seqctr, 0xFF) ) ) + end + + return payload +end + +-- Dissector top level function; is called within this dissector, but can also be called from outsude +function dji_p3_flyrec_main_dissector(buffer, pinfo, subtree) + local offset = 1 + + -- [1-2] The Pkt length | protocol version + local pkt_length = buffer(offset,2):le_uint() + local pkt_protover = pkt_length + -- bit32 lib requires LUA 5.2 + pkt_length = bit32.band(pkt_length, 0x03FF) + pkt_protover = bit32.rshift(bit32.band(pkt_protover, 0xFC00), 10) + + subtree:add_le (f.length, buffer(offset, 2)) + subtree:add_le (f.protocol_version, buffer(offset, 2)) + offset = offset + 2 + + -- [3] Header Checksum + subtree:add (f.datatype, buffer(offset, 1)) + offset = offset + 1 + + if pkt_protover == 0 then + + -- [4] Log entry type + local etype = buffer(offset,2):le_uint() + subtree:add_le (f.etype, buffer(offset, 2)) + offset = offset + 2 + + -- [6] Sequence Counter + subtree:add_le (f.seqctr, buffer(offset, 4)) + offset = offset + 4 + + assert(offset == 10, "Offset shifted - dissector internal inconsistency") + + -- [A] Payload + if pkt_length > offset+2 then + local payload_buf = flightrec_decrypt_payload(pkt_length, buffer) + local payload_tree = subtree:add(f.payload, buffer(offset, pkt_length - offset - 2)) + payload_tree:set_text("Payload: " .. bytearray_to_hexstr(payload_buf)); + local payload_tvb = ByteArray.tvb(payload_buf, "Payload") + + -- If we have a dissector for this kind of command, run it + local dissector = DJI_P3_FLIGHT_RECORD_DISSECT[etype] + + if dissector ~= nil then + dissector(payload_tvb, pinfo, payload_tree) + end + + end + + end + + -- CRC + subtree:add_le(f.crc, buffer(pkt_length - 2, 2)) + offset = offset + 2 +end + +-- The protocol dissector itself +function DJI_P3_FLYREC_PROTO.dissector (buffer, pinfo, tree) + + local subtree = tree:add (DJI_P3_FLYREC_PROTO, buffer()) + + -- The Pkt start byte + local offset = 0 + + local pkt_type = buffer(offset,1):uint() + subtree:add (f.delimiter, buffer(offset, 1)) + offset = offset + 1 + + if pkt_type == 0x55 then + dji_p3_flyrec_main_dissector(buffer, pinfo, subtree) + end + +end + +-- A initialization routine +function DJI_P3_FLYREC_PROTO.init () +end diff --git a/dissectors/dji-dumlv1/src/dji-p3.lua b/dissectors/dji-dumlv1/src/dji-p3.lua new file mode 100644 index 0000000..64de1c4 --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-p3.lua @@ -0,0 +1,43 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-p3.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit 1865b36e0bc9c1f10ab6fff64554f332acb5e5ec du 24/12/2018). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- Create the aggeregate dissector +DJI_P3_PROTO = Proto ("dji_p3", "DJI_P3", "Dji Ph3 protocols aggregate") + +local f = DJI_P3_PROTO.fields + +-- [0] Start of Pkt, always 0x55 +f.delimiter = ProtoField.uint8 ("dji_p3.delimiter", "Delimiter", base.HEX) + +-- The protocol dissector itself +function DJI_P3_PROTO.dissector (buffer, pinfo, tree) + + local subtree = tree:add (DJI_P3_PROTO, buffer()) + + -- The Pkt start byte (0x55 or 0xAB determines the pkt type) + local offset = 0 + + local pkt_type = buffer(offset,1):uint() + subtree:add (f.delimiter, buffer(offset, 1)) + offset = offset + 1 + + if pkt_type == 0xAB then + dji_p3_batt_main_dissector(buffer, pinfo, subtree) + elseif pkt_type == 0x55 then + local pkt_protover = buffer(offset,2):le_uint() + pkt_protover = bit32.rshift(bit32.band(pkt_protover, 0xFC00), 10) + if pkt_protover == 0 then + dji_p3_flyrec_main_dissector(buffer, pinfo, subtree) + else + dji_dumlv1_main_dissector(buffer, pinfo, subtree) + end + end + +end + +-- A initialization routine +function DJI_P3_PROTO.init () +end + diff --git a/dissectors/dji-dumlv1/src/dji-spark-flyrec-proto.lua b/dissectors/dji-dumlv1/src/dji-spark-flyrec-proto.lua new file mode 100644 index 0000000..69c788c --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-spark-flyrec-proto.lua @@ -0,0 +1,10632 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-spark-flyrec-proto.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit b1f7f54daf9510ee47374e84216a1d767297b60b du 24/12/2018). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- Create a new dissector +DJI_SPARK_FLYREC_PROTO = Proto ("dji_spark_flyrec", "DJI_SPARK_FLYREC", "Dji Spark Flight Record file format") + +local f = DJI_SPARK_FLYREC_PROTO.fields +local enums = {} + +DJI_SPARK_FLIGHT_RECORD_ENTRY_TYPE = { + [0x03e8] = 'Controller', + [0x03e9] = 'Aircraft Condition', + [0x03ea] = 'Serial Api Inputs', + [0x03ec] = 'Go Home Info', + [0x03ed] = 'Fmu Devices Run Time', + [0x03f0] = 'Fmu Sa Run Time', + [0x03f1] = 'Fmu Write Run Time', + [0x03f3] = 'Fmu Api Run Time', + [0x03f4] = 'Cfg Errs', + [0x03f5] = 'New Api Err Time', + [0x03ee] = 'Poi Debug Data', + [0x03f6] = 'Adv Gh Debug Data', + [0x03f7] = 'Ahrs Data', + [0x0800] = 'Imu Atti 0', + [0x0801] = 'Imu Atti 1', + [0x0802] = 'Imu Atti 2', + [0x0810] = 'Imu Ex 0', + [0x0811] = 'Imu Ex 1', + [0x0812] = 'Imu Ex 2', + [0x08a0] = 'Atti Mini0', + [0x08a1] = 'Atti Mini1', + [0x08a2] = 'Atti Mini2', + [0x0860] = 'Imu Fdi 0', + [0x0861] = 'Imu Fdi 1', + [0x0862] = 'Imu Fdi 2', + [0x03ef] = 'Hl Debug Data', + [0x03f2] = 'Farm Db Data', + [0x4ef7] = 'Spray Sys Ctrl Cmd', + [0x4ef8] = 'Spray Sys State', + [0x04b0] = 'Ctrl Vert Debug', + [0x04b1] = 'Ctrl Pos Vert Debug', + [0x04b2] = 'Ctrl Vel Vert Debug', + [0x04b3] = 'Ctrl Acc Vert Debug', + [0x0514] = 'Ctrl Horiz Debug', + [0x0515] = 'Ctrl Horiz Pos Debug', + [0x0516] = 'Ctrl Horiz Vel Debug', + [0x0518] = 'Ctrl Horiz Atti Debug', + [0x0519] = 'Ctrl Horiz Ang Vel Debug', + [0x051a] = 'Ctrl Horiz Ccpm Debug', + [0x051b] = 'Ctrl Horiz Motor Debug', + [0x051c] = 'Ctrl Sweep Test', + [0x0460] = 'Way Debug Info', + [0x0461] = 'Svo Avoid', + [0x0578] = 'Simulator Debug Data', + [0x0579] = 'Simulator Gyro Acc Data 400Hz', + [0x057c] = 'Simulator Press Data 200Hz', + [0x057a] = 'Simulator Mag Data 50Hz', + [0x057b] = 'Simulator Gps Data 5Hz', + [0x057e] = 'Simulator Motor Data', + [0x057d] = 'Device Change Times', + [0x0582] = 'Simulator Config Aircraft Param', + [0x0583] = 'Simulator Config Battery Param', + [0x0584] = 'Simulator Config Environment Param', + [0x0585] = 'Simulator Config Motor Param 1', + [0x0587] = 'Simulator Config Sensor Param', + [0xcff2] = 'Rtkdata', + [0x0640] = 'Genral Debug Data', + [0x06a4] = 'Rc Debug Info', + [0x08d0] = 'Cali Mag 00', + [0x08d1] = 'Cali Mag 01', + [0x08d2] = 'Cali Mag 02', + [0x0828] = 'Lpf Gyr Acc0', + [0x0829] = 'Lpf Gyr Acc1', + [0x082a] = 'Lpf Gyr Acc2', + [0x08e6] = 'App Temp Bias0', + [0x08e7] = 'App Temp Bias1', + [0x08e8] = 'App Temp Bias2', + [0x08e4] = 'Inner Temp Bias0', + [0x08e5] = 'Inner Temp Bias1', + [0x08e6] = 'Inner Temp Bias2', + [0x06ae] = 'Battery Info', + [0x06af] = 'Battery Status', + [0x06b0] = 'Smart Battery Info', + [0x0708] = 'Statistical Info', + [0x2764] = 'Ns Sensor Quality', + [0x2765] = 'Ns Data Debug', + [0x2766] = 'Ns Data Component', + [0x2767] = 'Ns Data Residuals', + [0x2768] = 'Ns Data Posi Ofst', + [0x2769] = 'Ns Sensor Connect', + [0x276a] = 'Esc Data', + [0x276b] = 'High Freq Gyro Data 0', + [0x276c] = 'High Freq Gyro Data 1', + [0x276d] = 'High Freq Gyro Data 2', + [0x276e] = 'Rc Gps Data', + [0x2771] = 'Cb Temp', + [0x2772] = 'Cb Press', + [0x2774] = 'Air Compensate Data', + [0x2775] = 'Vision Tof', + [0x2776] = 'Gs Rtk Data', + [0x2777] = 'Ex Raw Baro1', + [0x2778] = 'Ex Raw Baro2', + [0x2779] = 'Ex Raw Compass', + [0x27d8] = 'Gear Status', + [0x4ef2] = 'Radar Bottom', + [0x4ef3] = 'Radar Avoid Front', + [0x4ef4] = 'Radar Avoid Back', + [0x4ef5] = 'Radar Predict Front', + [0x4ef6] = 'Radar Predict Back', + [0x4f4c] = 'Gyro Raw0 0', + [0x4f4d] = 'Gyro Raw0 1', + [0x4f4e] = 'Gyro Raw0 2', + [0x4f50] = 'Gyro Raw1 0', + [0x4f51] = 'Gyro Raw1 1', + [0x4f54] = 'Gyro Raw2 0', + [0x4f55] = 'Gyro Raw2 1', + [0x4f58] = 'Acc Raw0 0', + [0x4f59] = 'Acc Raw0 1', + [0x4f5a] = 'Acc Raw0 2', + [0x4f5c] = 'Acc Raw1 0', + [0x4f5d] = 'Acc Raw1 1', + [0x4f60] = 'Acc Raw2 0', + [0x4f61] = 'Acc Raw2 1', + [0x4f64] = 'Sensor Push0 0', + [0x4f65] = 'Sensor Push0 1', + [0x4f6a] = 'Baro Raw0', + [0x4f6b] = 'Baro Raw1', + [0x4f6c] = 'Baro Raw2', + [0x4f6d] = 'Baro Raw3', + [0x4f74] = 'Compass Raw0', + [0x4f75] = 'Compass Raw1', + [0x4f76] = 'Compass Raw2', + [0x4f7e] = 'Compass Filter0', + [0x4f7f] = 'Compass Filter1', + [0x4f80] = 'Compass Filter2', + [0x4f88] = 'Imu Rotated Data', + [0x5014] = 'Raw Wristband Data', + [0x5015] = 'Wristband', + [0x501e] = 'Ctrl Device', + [0x4e20] = 'Battery Info 2', + [0x4e21] = 'Pwm Output', + [0x0880] = 'Temp Ctl Recorde0', + [0x0881] = 'Temp Ctl Recorde1', + [0x0882] = 'Temp Ctl Recorde2', + [0x4e22] = 'Airport Limit Debug Info', + [0x4e23] = 'Battery Raw Data 1', + [0x4e24] = 'Battery Raw Data 2', + [0x4e25] = 'Sys Err', + [0x4e27] = 'Quick Circle Debug', + [0x4e28] = 'Battery Info 3', + [0x4e29] = 'Rc Func Data', + [0x4e2a] = 'Rc Func State', + [0x4e2b] = 'Gps Monitor 1', + [0x4e2c] = 'Gps Monitor 2', + [0x4e2d] = 'Gps Monitor 3', + [0x0885] = 'Fw G Api', + [0x0887] = 'Fw Param Ekf', + [0x27e2] = 'Ex Raw Airspeed', + [0x5000] = 'Vibrate Detect Gyro', + [0x500a] = 'Airprot Limit Data', + [0x500b] = 'Adv Fl Limit Data', + [0x0888] = 'Db Subscription', + [0x50dc] = 'Mass Est', + [0x504b] = 'Lost Sats Go Home Send Package', + [0x504c] = 'Lost Sats Go Home Recv Package', + [0x504d] = 'Adsb Record Data', + [0x8000] = 'Fly Log', + [0xff00] = 'Sd Logs', + [0xffff] = 'Sys Cfg', + [0xfffe] = 'Uno Log', + [0xfffd] = 'Cfg Log', + [0xfffc] = 'Module Name', + [0x092a] = 'Link Host', + [0x092b] = 'Link Pc', + [0x092c] = 'Link Vo', + [0x092d] = 'Link Sdk', + [0x092e] = 'Link', + [0x092f] = 'Link', + [0x0930] = 'Link Auto Cali', + [0x0931] = 'Link Manual Cali', + [0x0932] = 'Link Cali Led', + [0xcde0] = 'System Monitor', + [0xcddf] = 'Uart Monitor', + [0xcdde] = 'Can Monitor', +} + +local function bytearray_to_hexstr(bytes) + s = {} + for i = 0, bytes:len() - 1 do + s[i+1] = string.format("%02X",bytes:get_index(i)) + end + return table.concat(s," ") +end + +-- Flight log - Controller - 0x03e8 + +f.controller_ctrl_tick = ProtoField.uint32 ("dji_spark_flyrec.controller_ctrl_tick", "Ctrl Tick", base.HEX) +f.controller_ctrl_pitch = ProtoField.int16 ("dji_spark_flyrec.controller_ctrl_pitch", "Ctrl Pitch", base.DEC) +f.controller_ctrl_roll = ProtoField.int16 ("dji_spark_flyrec.controller_ctrl_roll", "Ctrl Roll", base.DEC) +f.controller_ctrl_yaw = ProtoField.int16 ("dji_spark_flyrec.controller_ctrl_yaw", "Ctrl Yaw", base.DEC) +f.controller_ctrl_thr = ProtoField.int16 ("dji_spark_flyrec.controller_ctrl_thr", "Ctrl Thr", base.DEC) +f.controller_ctrl_mode = ProtoField.uint8 ("dji_spark_flyrec.controller_ctrl_mode", "Ctrl Mode", base.HEX) +f.controller_mode_switch = ProtoField.uint8 ("dji_spark_flyrec.controller_mode_switch", "Mode Switch", base.HEX) +f.controller_motor_state = ProtoField.uint8 ("dji_spark_flyrec.controller_motor_state", "Motor State", base.HEX) +f.controller_sig_level = ProtoField.uint8 ("dji_spark_flyrec.controller_sig_level", "Sig Level", base.HEX) +f.controller_ctrl_level = ProtoField.uint8 ("dji_spark_flyrec.controller_ctrl_level", "Ctrl Level", base.HEX) +f.controller_sim_model = ProtoField.uint8 ("dji_spark_flyrec.controller_sim_model", "Sim Model", base.HEX) +f.controller_max_height = ProtoField.uint16 ("dji_spark_flyrec.controller_max_height", "Max Height", base.HEX) +f.controller_max_radius = ProtoField.uint16 ("dji_spark_flyrec.controller_max_radius", "Max Radius", base.HEX) +f.controller_d2h_x = ProtoField.float ("dji_spark_flyrec.controller_d2h_x", "D2H X", base.DEC) +f.controller_d2h_y = ProtoField.float ("dji_spark_flyrec.controller_d2h_y", "D2H Y", base.DEC) +f.controller_act_req_id = ProtoField.uint8 ("dji_spark_flyrec.controller_act_req_id", "Act Req Id", base.HEX) +f.controller_act_act_id = ProtoField.uint8 ("dji_spark_flyrec.controller_act_act_id", "Act Act Id", base.HEX) +f.controller_cmd_mod = ProtoField.uint8 ("dji_spark_flyrec.controller_cmd_mod", "Cmd Mod", base.HEX) +f.controller_mod_req_id = ProtoField.uint8 ("dji_spark_flyrec.controller_mod_req_id", "Mod Req Id", base.HEX) +f.controller_fw_flag = ProtoField.uint8 ("dji_spark_flyrec.controller_fw_flag", "Fw Flag", base.HEX) +f.controller_mot_sta = ProtoField.uint8 ("dji_spark_flyrec.controller_mot_sta", "Mot Sta", base.HEX) +f.controller_oh_take = ProtoField.uint8 ("dji_spark_flyrec.controller_oh_take", "Oh Take", base.HEX) +f.controller_rc_cnt = ProtoField.uint8 ("dji_spark_flyrec.controller_rc_cnt", "Rc Cnt", base.HEX) +f.controller_sup_rc = ProtoField.uint8 ("dji_spark_flyrec.controller_sup_rc", "Sup Rc", base.HEX) +f.controller_is_soaring_up = ProtoField.uint8 ("dji_spark_flyrec.controller_is_soaring_up", "Is Soaring Up", base.HEX) +f.controller_soar_up_timer = ProtoField.float ("dji_spark_flyrec.controller_soar_up_timer", "Soar Up Timer", base.DEC) +f.controller_vert_vel_err = ProtoField.float ("dji_spark_flyrec.controller_vert_vel_err", "Vert Vel Err", base.DEC) +f.controller_vert_vel_err_fltr = ProtoField.float ("dji_spark_flyrec.controller_vert_vel_err_fltr", "Vert Vel Err Fltr", base.DEC) + +local function flightrec_controller_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.controller_ctrl_tick, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_ctrl_pitch, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_ctrl_roll, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_ctrl_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_ctrl_thr, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_ctrl_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_mode_switch, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_motor_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_sig_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_ctrl_level, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_sim_model, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_max_height, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_max_radius, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.controller_d2h_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_d2h_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_act_req_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_act_act_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_cmd_mod, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_mod_req_id, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_fw_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_mot_sta, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_oh_take, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_rc_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_sup_rc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_is_soaring_up, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.controller_soar_up_timer, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_vert_vel_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.controller_vert_vel_err_fltr, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 52) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Controller: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Controller: Payload size different than expected") end +end + +-- Flight log - Aircraft Condition - 0x03e9 + +f.aircraft_condition_int_fsm = ProtoField.uint8 ("dji_spark_flyrec.aircraft_condition_int_fsm", "Int Fsm", base.HEX) +f.aircraft_condition_fsm_state = ProtoField.uint8 ("dji_spark_flyrec.aircraft_condition_fsm_state", "Fsm State", base.HEX) +f.aircraft_condition_last_fsm = ProtoField.uint8 ("dji_spark_flyrec.aircraft_condition_last_fsm", "Last Fsm", base.HEX) +f.aircraft_condition_near_gnd = ProtoField.uint8 ("dji_spark_flyrec.aircraft_condition_near_gnd", "Near Gnd", base.HEX) +f.aircraft_condition_up_state = ProtoField.uint8 ("dji_spark_flyrec.aircraft_condition_up_state", "Up State", base.HEX) +f.aircraft_condition_land_state = ProtoField.uint8 ("dji_spark_flyrec.aircraft_condition_land_state", "Land State", base.HEX) +f.aircraft_condition_safe_fltr = ProtoField.int16 ("dji_spark_flyrec.aircraft_condition_safe_fltr", "Safe Fltr", base.DEC) + +local function flightrec_aircraft_condition_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.aircraft_condition_int_fsm, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_fsm_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_last_fsm, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_near_gnd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_up_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_land_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.aircraft_condition_safe_fltr, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Aircraft Condition: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Aircraft Condition: Payload size different than expected") end +end + +-- Flight log - Serial Api Inputs - 0x03ea + +f.serial_api_inputs_sdk_ctrl_f = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_sdk_ctrl_f", "Sdk Ctrl F", base.HEX) +f.serial_api_inputs_sdk_roll_x = ProtoField.int16 ("dji_spark_flyrec.serial_api_inputs_sdk_roll_x", "Sdk Roll X", base.DEC) +f.serial_api_inputs_sdk_pitch_y = ProtoField.int16 ("dji_spark_flyrec.serial_api_inputs_sdk_pitch_y", "Sdk Pitch Y", base.DEC) +f.serial_api_inputs_sdk_thr_z = ProtoField.int16 ("dji_spark_flyrec.serial_api_inputs_sdk_thr_z", "Sdk Thr Z", base.DEC) +f.serial_api_inputs_sdk_yaw = ProtoField.int16 ("dji_spark_flyrec.serial_api_inputs_sdk_yaw", "Sdk Yaw", base.DEC) +f.serial_api_inputs_sdk_fdfd_x = ProtoField.int16 ("dji_spark_flyrec.serial_api_inputs_sdk_fdfd_x", "Sdk Fdfd X", base.DEC) +f.serial_api_inputs_sdk_fdfd_y = ProtoField.int16 ("dji_spark_flyrec.serial_api_inputs_sdk_fdfd_y", "Sdk Fdfd Y", base.DEC) +f.serial_api_inputs_ctrl_dev = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_ctrl_dev", "Ctrl Dev", base.HEX) +f.serial_api_inputs_sub_mode = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_sub_mode", "Sub Mode", base.HEX) +f.serial_api_inputs_open_req = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_open_req", "Open Req", base.HEX) +f.serial_api_inputs_open_ack = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_open_ack", "Open Ack", base.HEX) +f.serial_api_inputs_cmd_req = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_cmd_req", "Cmd Req", base.HEX) +f.serial_api_inputs_cmd_ack = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_cmd_ack", "Cmd Ack", base.HEX) +f.serial_api_inputs_avoid_e = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_avoid_e", "Avoid E", base.HEX) +f.serial_api_inputs_bit_s = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_bit_s", "Bit S", base.HEX) +f.serial_api_inputs_fact_cnt = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_fact_cnt", "Fact Cnt", base.HEX) +f.serial_api_inputs_f_test = ProtoField.uint8 ("dji_spark_flyrec.serial_api_inputs_f_test", "F Test", base.HEX) + +local function flightrec_serial_api_inputs_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.serial_api_inputs_sdk_ctrl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_sdk_roll_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_pitch_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_thr_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_fdfd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_sdk_fdfd_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.serial_api_inputs_ctrl_dev, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_sub_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_open_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_open_ack, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_cmd_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_cmd_ack, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_avoid_e, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_bit_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_fact_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.serial_api_inputs_f_test, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 23) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Serial Api Inputs: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Serial Api Inputs: Payload size different than expected") end +end + +-- Flight log - Go Home Info - 0x03ec + +f.go_home_info_gh_sta = ProtoField.uint8 ("dji_spark_flyrec.go_home_info_gh_sta", "Gh Sta", base.HEX) +f.go_home_info_gh_t = ProtoField.uint16 ("dji_spark_flyrec.go_home_info_gh_t", "Gh T", base.HEX) +f.go_home_info_gh_line_t = ProtoField.uint16 ("dji_spark_flyrec.go_home_info_gh_line_t", "Gh Line T", base.HEX) +f.go_home_info_gh_tgt_p0 = ProtoField.int16 ("dji_spark_flyrec.go_home_info_gh_tgt_p0", "Gh Tgt P0", base.DEC) +f.go_home_info_gh_tgt_p1 = ProtoField.int16 ("dji_spark_flyrec.go_home_info_gh_tgt_p1", "Gh Tgt P1", base.DEC) +f.go_home_info_gh_tgt_v0 = ProtoField.int16 ("dji_spark_flyrec.go_home_info_gh_tgt_v0", "Gh Tgt V0", base.DEC) +f.go_home_info_gh_tgt_v1 = ProtoField.int16 ("dji_spark_flyrec.go_home_info_gh_tgt_v1", "Gh Tgt V1", base.DEC) +f.go_home_info_gh_fdk_p0 = ProtoField.int16 ("dji_spark_flyrec.go_home_info_gh_fdk_p0", "Gh Fdk P0", base.DEC) +f.go_home_info_gh_fdk_p1 = ProtoField.int16 ("dji_spark_flyrec.go_home_info_gh_fdk_p1", "Gh Fdk P1", base.DEC) +f.go_home_info_gh_pud = ProtoField.uint8 ("dji_spark_flyrec.go_home_info_gh_pud", "Gh Pud", base.HEX) +f.go_home_info_gh_idl_vel = ProtoField.uint16 ("dji_spark_flyrec.go_home_info_gh_idl_vel", "Gh Idl Vel", base.HEX) +f.go_home_info_asd_tgt_h = ProtoField.uint16 ("dji_spark_flyrec.go_home_info_asd_tgt_h", "Asd Tgt H", base.HEX) +f.go_home_info_fasd_tgt_h = ProtoField.uint16 ("dji_spark_flyrec.go_home_info_fasd_tgt_h", "Fasd Tgt H", base.HEX) +f.go_home_info_asd_to = ProtoField.uint16 ("dji_spark_flyrec.go_home_info_asd_to", "Asd To", base.HEX) +f.go_home_info_fasd_to = ProtoField.uint16 ("dji_spark_flyrec.go_home_info_fasd_to", "Fasd To", base.HEX) +f.go_home_info_fasd_err = ProtoField.int16 ("dji_spark_flyrec.go_home_info_fasd_err", "Fasd Err", base.DEC) +f.go_home_info_asd_err = ProtoField.int16 ("dji_spark_flyrec.go_home_info_asd_err", "Asd Err", base.DEC) +f.go_home_info_220clogh_f = ProtoField.uint8 ("dji_spark_flyrec.go_home_info_220clogh_f", "220Clogh F", base.HEX) +f.go_home_info_advghsw2fc = ProtoField.uint8 ("dji_spark_flyrec.go_home_info_advghsw2fc", "Advghsw2Fc", base.HEX) +f.go_home_info_dyh_chd = ProtoField.uint8 ("dji_spark_flyrec.go_home_info_dyh_chd", "Dyh Chd", base.HEX) +f.go_home_info_head_ref = ProtoField.float ("dji_spark_flyrec.go_home_info_head_ref", "Head Ref", base.DEC) +f.go_home_info_head_err = ProtoField.float ("dji_spark_flyrec.go_home_info_head_err", "Head Err", base.DEC) +f.go_home_info_head_rate = ProtoField.float ("dji_spark_flyrec.go_home_info_head_rate", "Head Rate", base.DEC) +f.go_home_info_use_rtk_enable = ProtoField.uint8 ("dji_spark_flyrec.go_home_info_use_rtk_enable", "Use Rtk Enable", base.HEX) +f.go_home_info_rtk_hp_change = ProtoField.uint8 ("dji_spark_flyrec.go_home_info_rtk_hp_change", "Rtk Hp Change", base.HEX) +f.go_home_info_use_rtk_hp = ProtoField.uint8 ("dji_spark_flyrec.go_home_info_use_rtk_hp", "Use Rtk Hp", base.HEX) +f.go_home_info_hp_lat = ProtoField.double ("dji_spark_flyrec.go_home_info_hp_lat", "Hp Lat", base.DEC) +f.go_home_info_hp_lon = ProtoField.double ("dji_spark_flyrec.go_home_info_hp_lon", "Hp Lon", base.DEC) +f.go_home_info_hp_alti = ProtoField.float ("dji_spark_flyrec.go_home_info_hp_alti", "Hp Alti", base.DEC) +f.go_home_info_gh_lat = ProtoField.double ("dji_spark_flyrec.go_home_info_gh_lat", "Gh Lat", base.DEC) +f.go_home_info_gh_lon = ProtoField.double ("dji_spark_flyrec.go_home_info_gh_lon", "Gh Lon", base.DEC) +f.go_home_info_gh_alti = ProtoField.float ("dji_spark_flyrec.go_home_info_gh_alti", "Gh Alti", base.DEC) + +local function flightrec_go_home_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.go_home_info_gh_sta, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_gh_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_line_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_tgt_p0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_tgt_p1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_tgt_v0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_tgt_v1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_fdk_p0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_fdk_p1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_gh_pud, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_gh_idl_vel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_asd_tgt_h, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_fasd_tgt_h, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_asd_to, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_fasd_to, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_fasd_err, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_asd_err, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.go_home_info_220clogh_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_advghsw2fc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_dyh_chd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_head_ref, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.go_home_info_head_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.go_home_info_head_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.go_home_info_use_rtk_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_rtk_hp_change, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_use_rtk_hp, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.go_home_info_hp_lat, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.go_home_info_hp_lon, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.go_home_info_hp_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.go_home_info_gh_lat, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.go_home_info_gh_lon, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.go_home_info_gh_alti, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 90) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Go Home Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Go Home Info: Payload size different than expected") end +end + +-- Flight log - Fmu Devices Run Time - 0x03ed + +f.fmu_devices_run_time_all = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_all", "All", base.DEC) +f.fmu_devices_run_time_battery = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_battery", "Battery", base.DEC) +f.fmu_devices_run_time_led = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_led", "Led", base.DEC) +f.fmu_devices_run_time_baromter = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_baromter", "Baromter", base.DEC) +f.fmu_devices_run_time_gyro_acc = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_gyro_acc", "Gyro Acc", base.DEC) +f.fmu_devices_run_time_imu = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_imu", "Imu", base.DEC) +f.fmu_devices_run_time_vo = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_vo", "Vo", base.DEC) +f.fmu_devices_run_time_ultrasonic = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_ultrasonic", "Ultrasonic", base.DEC) +f.fmu_devices_run_time_esc = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_esc", "Esc", base.DEC) +f.fmu_devices_run_time_mc = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_mc", "Mc", base.DEC) +f.fmu_devices_run_time_camera = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_camera", "Camera", base.DEC) +f.fmu_devices_run_time_gps = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_gps", "Gps", base.DEC) +f.fmu_devices_run_time_compass = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_compass", "Compass", base.DEC) +f.fmu_devices_run_time_gimbal = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_gimbal", "Gimbal", base.DEC) +f.fmu_devices_run_time_rc = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_rc", "Rc", base.DEC) +f.fmu_devices_run_time_gear = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_gear", "Gear", base.DEC) +f.fmu_devices_run_time_sdk = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_sdk", "Sdk", base.DEC) +f.fmu_devices_run_time_rtk = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_rtk", "Rtk", base.DEC) +f.fmu_devices_run_time_dropsafe = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_dropsafe", "Dropsafe", base.DEC) +f.fmu_devices_run_time_radar = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_radar", "Radar", base.DEC) +f.fmu_devices_run_time_spray_sys = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_spray_sys", "Spray Sys", base.DEC) +f.fmu_devices_run_time_tof = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_tof", "Tof", base.DEC) +f.fmu_devices_run_time_wristband = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_wristband", "Wristband", base.DEC) +f.fmu_devices_run_time_headset = ProtoField.float ("dji_spark_flyrec.fmu_devices_run_time_headset", "Headset", base.DEC) + +local function flightrec_fmu_devices_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_devices_run_time_all, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_battery, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_led, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_baromter, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_gyro_acc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_imu, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_vo, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_ultrasonic, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_esc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_mc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_camera, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_gps, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_compass, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_gimbal, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_rc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_gear, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_sdk, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_rtk, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_dropsafe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_radar, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_spray_sys, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_tof, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_wristband, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_devices_run_time_headset, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 96) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Devices Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Devices Run Time: Payload size different than expected") end +end + +-- Flight log - Fmu Sa Run Time - 0x03f0 + +f.fmu_sa_run_time_all = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_all", "All", base.DEC) +f.fmu_sa_run_time_assistant = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_assistant", "Assistant", base.DEC) +f.fmu_sa_run_time_data = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_data", "Data", base.DEC) +f.fmu_sa_run_time_simulator = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_simulator", "Simulator", base.DEC) +f.fmu_sa_run_time_fsm = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_fsm", "Fsm", base.DEC) +f.fmu_sa_run_time_home = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_home", "Home", base.DEC) +f.fmu_sa_run_time_battery = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_battery", "Battery", base.DEC) +f.fmu_sa_run_time_motor = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_motor", "Motor", base.DEC) +f.fmu_sa_run_time_led = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_led", "Led", base.DEC) +f.fmu_sa_run_time_gear = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_gear", "Gear", base.DEC) +f.fmu_sa_run_time_airlimit = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_airlimit", "Airlimit", base.DEC) +f.fmu_sa_run_time_power_satu = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_power_satu", "Power Satu", base.DEC) +f.fmu_sa_run_time_user_info = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_user_info", "User Info", base.DEC) +f.fmu_sa_run_time_code_check = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_code_check", "Code Check", base.DEC) +f.fmu_sa_run_time_topo_check = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_topo_check", "Topo Check", base.DEC) +f.fmu_sa_run_time_vers_check = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_vers_check", "Vers Check", base.DEC) +f.fmu_sa_run_time_gps_level = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_gps_level", "Gps Level", base.DEC) +f.fmu_sa_run_time_link = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_link", "Link", base.DEC) +f.fmu_sa_run_time_navi_data = ProtoField.float ("dji_spark_flyrec.fmu_sa_run_time_navi_data", "Navi Data", base.DEC) + +local function flightrec_fmu_sa_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_sa_run_time_all, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_assistant, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_data, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_simulator, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_fsm, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_home, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_battery, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_motor, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_led, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_gear, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_airlimit, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_power_satu, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_user_info, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_code_check, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_topo_check, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_vers_check, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_gps_level, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_link, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_sa_run_time_navi_data, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 76) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Sa Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Sa Run Time: Payload size different than expected") end +end + +-- Flight log - Fmu Write Run Time - 0x03f1 + +f.fmu_write_run_time_all = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_all", "All", base.DEC) +f.fmu_write_run_time_battery = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_battery", "Battery", base.DEC) +f.fmu_write_run_time_led = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_led", "Led", base.DEC) +f.fmu_write_run_time_baromter = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_baromter", "Baromter", base.DEC) +f.fmu_write_run_time_gyro_acc = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_gyro_acc", "Gyro Acc", base.DEC) +f.fmu_write_run_time_imu = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_imu", "Imu", base.DEC) +f.fmu_write_run_time_vo = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_vo", "Vo", base.DEC) +f.fmu_write_run_time_ultrasonic = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_ultrasonic", "Ultrasonic", base.DEC) +f.fmu_write_run_time_esc = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_esc", "Esc", base.DEC) +f.fmu_write_run_time_mc = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_mc", "Mc", base.DEC) +f.fmu_write_run_time_camera = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_camera", "Camera", base.DEC) +f.fmu_write_run_time_gps = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_gps", "Gps", base.DEC) +f.fmu_write_run_time_compass = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_compass", "Compass", base.DEC) +f.fmu_write_run_time_gimbal = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_gimbal", "Gimbal", base.DEC) +f.fmu_write_run_time_rc = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_rc", "Rc", base.DEC) +f.fmu_write_run_time_gear = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_gear", "Gear", base.DEC) +f.fmu_write_run_time_sdk = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_sdk", "Sdk", base.DEC) +f.fmu_write_run_time_rtk = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_rtk", "Rtk", base.DEC) +f.fmu_write_run_time_dropsafe = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_dropsafe", "Dropsafe", base.DEC) +f.fmu_write_run_time_radar = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_radar", "Radar", base.DEC) +f.fmu_write_run_time_spray = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_spray", "Spray", base.DEC) +f.fmu_write_run_time_tof = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_tof", "Tof", base.DEC) +f.fmu_write_run_time_wristband = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_wristband", "Wristband", base.DEC) +f.fmu_write_run_time_headset = ProtoField.float ("dji_spark_flyrec.fmu_write_run_time_headset", "Headset", base.DEC) + +local function flightrec_fmu_write_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_write_run_time_all, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_battery, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_led, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_baromter, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_gyro_acc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_imu, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_vo, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_ultrasonic, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_esc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_mc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_camera, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_gps, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_compass, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_gimbal, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_rc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_gear, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_sdk, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_rtk, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_dropsafe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_radar, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_spray, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_tof, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_wristband, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fmu_write_run_time_headset, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 96) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Write Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Write Run Time: Payload size different than expected") end +end + +-- Flight log - Fmu Api Run Time - 0x03f3 + +f.fmu_api_run_time_all = ProtoField.float ("dji_spark_flyrec.fmu_api_run_time_all", "All", base.DEC) + +local function flightrec_fmu_api_run_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fmu_api_run_time_all, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fmu Api Run Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fmu Api Run Time: Payload size different than expected") end +end + +-- Flight log - Cfg Errs - 0x03f4 + +f.cfg_errs_errs = ProtoField.uint32 ("dji_spark_flyrec.cfg_errs_errs", "Errs", base.HEX) + +local function flightrec_cfg_errs_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cfg_errs_errs, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cfg Errs: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cfg Errs: Payload size different than expected") end +end + +-- Flight log - New Api Err Time - 0x03f5 + +f.new_api_err_time_errs = ProtoField.uint32 ("dji_spark_flyrec.new_api_err_time_errs", "Errs", base.HEX) + +local function flightrec_new_api_err_time_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.new_api_err_time_errs, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"New Api Err Time: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"New Api Err Time: Payload size different than expected") end +end + +-- Flight log - Poi Debug Data - 0x03ee + +f.poi_debug_data_t_alti = ProtoField.float ("dji_spark_flyrec.poi_debug_data_t_alti", "T Alti", base.DEC) +f.poi_debug_data_t_ang_rate = ProtoField.float ("dji_spark_flyrec.poi_debug_data_t_ang_rate", "T Ang Rate", base.DEC) +f.poi_debug_data_t_radius = ProtoField.float ("dji_spark_flyrec.poi_debug_data_t_radius", "T Radius", base.DEC) +f.poi_debug_data_r_dis_hp = ProtoField.float ("dji_spark_flyrec.poi_debug_data_r_dis_hp", "R Dis Hp", base.DEC) +f.poi_debug_data_r_ang = ProtoField.float ("dji_spark_flyrec.poi_debug_data_r_ang", "R Ang", base.DEC) +f.poi_debug_data_r_ang_rate = ProtoField.float ("dji_spark_flyrec.poi_debug_data_r_ang_rate", "R Ang Rate", base.DEC) +f.poi_debug_data_r_radius = ProtoField.float ("dji_spark_flyrec.poi_debug_data_r_radius", "R Radius", base.DEC) +f.poi_debug_data_p_err_x = ProtoField.float ("dji_spark_flyrec.poi_debug_data_p_err_x", "P Err X", base.DEC) +f.poi_debug_data_p_err_y = ProtoField.float ("dji_spark_flyrec.poi_debug_data_p_err_y", "P Err Y", base.DEC) +f.poi_debug_data_p_err_z = ProtoField.float ("dji_spark_flyrec.poi_debug_data_p_err_z", "P Err Z", base.DEC) +f.poi_debug_data_v_err_x = ProtoField.float ("dji_spark_flyrec.poi_debug_data_v_err_x", "V Err X", base.DEC) +f.poi_debug_data_v_err_y = ProtoField.float ("dji_spark_flyrec.poi_debug_data_v_err_y", "V Err Y", base.DEC) +f.poi_debug_data_v_err_z = ProtoField.float ("dji_spark_flyrec.poi_debug_data_v_err_z", "V Err Z", base.DEC) +f.poi_debug_data_head_err = ProtoField.float ("dji_spark_flyrec.poi_debug_data_head_err", "Head Err", base.DEC) +f.poi_debug_data_c_head_err = ProtoField.float ("dji_spark_flyrec.poi_debug_data_c_head_err", "C Head Err", base.DEC) +f.poi_debug_data_cmd_vel_x = ProtoField.float ("dji_spark_flyrec.poi_debug_data_cmd_vel_x", "Cmd Vel X", base.DEC) +f.poi_debug_data_cmd_vel_y = ProtoField.float ("dji_spark_flyrec.poi_debug_data_cmd_vel_y", "Cmd Vel Y", base.DEC) +f.poi_debug_data_cmd_vel_z = ProtoField.float ("dji_spark_flyrec.poi_debug_data_cmd_vel_z", "Cmd Vel Z", base.DEC) +f.poi_debug_data_is_pud = ProtoField.uint8 ("dji_spark_flyrec.poi_debug_data_is_pud", "Is Pud", base.HEX) + +local function flightrec_poi_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.poi_debug_data_t_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_t_ang_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_t_radius, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_r_dis_hp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_r_ang, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_r_ang_rate, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_r_radius, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_p_err_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_p_err_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_p_err_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_v_err_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_v_err_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_v_err_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_head_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_c_head_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_cmd_vel_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_cmd_vel_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_cmd_vel_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.poi_debug_data_is_pud, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 73) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Poi Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Poi Debug Data: Payload size different than expected") end +end + +-- Flight log - Adv Gh Debug Data - 0x03f6 + +f.adv_gh_debug_data_sl_req = ProtoField.int8 ("dji_spark_flyrec.adv_gh_debug_data_sl_req", "Sl Req", base.DEC) +f.adv_gh_debug_data_sl_f = ProtoField.int8 ("dji_spark_flyrec.adv_gh_debug_data_sl_f", "Sl F", base.DEC) +f.adv_gh_debug_data_sl_last_f = ProtoField.int8 ("dji_spark_flyrec.adv_gh_debug_data_sl_last_f", "Sl Last F", base.DEC) +f.adv_gh_debug_data_home_type = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_home_type", "Home Type", base.HEX) +f.adv_gh_debug_data_home_cnt = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_home_cnt", "Home Cnt", base.HEX) +f.adv_gh_debug_data_start_set = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_start_set", "Start Set", base.HEX) +f.adv_gh_debug_data_in_al = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_in_al", "In Al", base.HEX) +f.adv_gh_debug_data_gh_req = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_gh_req", "Gh Req", base.HEX) +f.adv_gh_debug_data_gh_s = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_gh_s", "Gh S", base.HEX) +f.adv_gh_debug_data_gh_t = ProtoField.int16 ("dji_spark_flyrec.adv_gh_debug_data_gh_t", "Gh T", base.DEC) +f.adv_gh_debug_data_gh_cnt = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_gh_cnt", "Gh Cnt", base.HEX) +f.adv_gh_debug_data_gh_ok = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_gh_ok", "Gh Ok", base.HEX) +f.adv_gh_debug_data_gh_cur_h = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_gh_cur_h", "Gh Cur H", base.HEX) +f.adv_gh_debug_data_al_need = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al_need", "Al Need", base.HEX) +f.adv_gh_debug_data_al_in = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al_in", "Al In", base.HEX) +f.adv_gh_debug_data_al_req = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al_req", "Al Req", base.HEX) +f.adv_gh_debug_data_al_status = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al_status", "Al Status", base.HEX) +f.adv_gh_debug_data_al_need_t = ProtoField.int16 ("dji_spark_flyrec.adv_gh_debug_data_al_need_t", "Al Need T", base.DEC) +f.adv_gh_debug_data_al_is_ok = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al_is_ok", "Al Is Ok", base.HEX) +f.adv_gh_debug_data_al__cnt = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al__cnt", "Al Cnt", base.HEX) +f.adv_gh_debug_data_al_gnd = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al_gnd", "Al Gnd", base.HEX) +f.adv_gh_debug_data_al_suc = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al_suc", "Al Suc", base.HEX) +f.adv_gh_debug_data_al_ok = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_al_ok", "Al Ok", base.HEX) +f.adv_gh_debug_data_chg_ht_f = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_chg_ht_f", "Chg Ht F", base.HEX) +f.adv_gh_debug_data_adv_ctrl_f = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_adv_ctrl_f", "Adv Ctrl F", base.HEX) +f.adv_gh_debug_data_adv_brake_f = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_adv_brake_f", "Adv Brake F", base.HEX) +f.adv_gh_debug_data_adv_roll_x = ProtoField.int16 ("dji_spark_flyrec.adv_gh_debug_data_adv_roll_x", "Adv Roll X", base.DEC) +f.adv_gh_debug_data_adv_pitch_y = ProtoField.int16 ("dji_spark_flyrec.adv_gh_debug_data_adv_pitch_y", "Adv Pitch Y", base.DEC) +f.adv_gh_debug_data_adv_thr_z = ProtoField.int16 ("dji_spark_flyrec.adv_gh_debug_data_adv_thr_z", "Adv Thr Z", base.DEC) +f.adv_gh_debug_data_adv_yaw = ProtoField.int16 ("dji_spark_flyrec.adv_gh_debug_data_adv_yaw", "Adv Yaw", base.DEC) +f.adv_gh_debug_data_adv_fdfd_x = ProtoField.int16 ("dji_spark_flyrec.adv_gh_debug_data_adv_fdfd_x", "Adv Fdfd X", base.DEC) +f.adv_gh_debug_data_adv_fdfd_y = ProtoField.int16 ("dji_spark_flyrec.adv_gh_debug_data_adv_fdfd_y", "Adv Fdfd Y", base.DEC) +f.adv_gh_debug_data_ctrl_cnt = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_ctrl_cnt", "Ctrl Cnt", base.HEX) +f.adv_gh_debug_data_ctrl_ok = ProtoField.uint8 ("dji_spark_flyrec.adv_gh_debug_data_ctrl_ok", "Ctrl Ok", base.HEX) + +local function flightrec_adv_gh_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adv_gh_debug_data_sl_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_sl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_sl_last_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_home_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_home_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_start_set, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_in_al, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_gh_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_ok, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_gh_cur_h, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_need, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_in, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_need_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_al_is_ok, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al__cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_gnd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_suc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_al_ok, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_chg_ht_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_adv_ctrl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_adv_brake_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_adv_roll_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_pitch_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_thr_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_fdfd_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_adv_fdfd_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_gh_debug_data_ctrl_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_gh_debug_data_ctrl_ok, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 42) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adv Gh Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adv Gh Debug Data: Payload size different than expected") end +end + +-- Flight log - Ahrs Data - 0x03f7 + +f.ahrs_data_ns_longti = ProtoField.double ("dji_spark_flyrec.ahrs_data_ns_longti", "Ns Longti", base.DEC) +f.ahrs_data_ns_lati = ProtoField.double ("dji_spark_flyrec.ahrs_data_ns_lati", "Ns Lati", base.DEC) +f.ahrs_data_ns_height = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_height", "Ns Height", base.DEC) +f.ahrs_data_ns_q0 = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_q0", "Ns Q0", base.DEC) +f.ahrs_data_ns_q1 = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_q1", "Ns Q1", base.DEC) +f.ahrs_data_ns_q2 = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_q2", "Ns Q2", base.DEC) +f.ahrs_data_ns_q3 = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_q3", "Ns Q3", base.DEC) +f.ahrs_data_ns_agx = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_agx", "Ns Agx", base.DEC) +f.ahrs_data_ns_agy = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_agy", "Ns Agy", base.DEC) +f.ahrs_data_ns_agz = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_agz", "Ns Agz", base.DEC) +f.ahrs_data_ns_vgx = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_vgx", "Ns Vgx", base.DEC) +f.ahrs_data_ns_vgy = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_vgy", "Ns Vgy", base.DEC) +f.ahrs_data_ns_vgz = ProtoField.float ("dji_spark_flyrec.ahrs_data_ns_vgz", "Ns Vgz", base.DEC) + +local function flightrec_ahrs_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ahrs_data_ns_longti, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.ahrs_data_ns_lati, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.ahrs_data_ns_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_q0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_q1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_q2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_q3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_agx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_agy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_agz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_vgx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_vgy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ahrs_data_ns_vgz, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ahrs Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ahrs Data: Payload size different than expected") end +end + +-- Flight log - Imu Atti 0 - 0x0800 + +f.imu_atti_0_long0 = ProtoField.double ("dji_spark_flyrec.imu_atti_0_long0", "Long0", base.DEC) +f.imu_atti_0_lati0 = ProtoField.double ("dji_spark_flyrec.imu_atti_0_lati0", "Lati0", base.DEC) +f.imu_atti_0_press0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_press0", "Press0", base.DEC) +f.imu_atti_0_ax0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_ax0", "Ax0", base.DEC) +f.imu_atti_0_ay0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_ay0", "Ay0", base.DEC) +f.imu_atti_0_az0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_az0", "Az0", base.DEC) +f.imu_atti_0_wx0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_wx0", "Wx0", base.DEC) +f.imu_atti_0_wy0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_wy0", "Wy0", base.DEC) +f.imu_atti_0_wz0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_wz0", "Wz0", base.DEC) +f.imu_atti_0_alti0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_alti0", "Alti0", base.DEC) +f.imu_atti_0_qw0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_qw0", "Qw0", base.DEC) +f.imu_atti_0_qx0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_qx0", "Qx0", base.DEC) +f.imu_atti_0_qy0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_qy0", "Qy0", base.DEC) +f.imu_atti_0_qz0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_qz0", "Qz0", base.DEC) +f.imu_atti_0_agx0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_agx0", "Agx0", base.DEC) +f.imu_atti_0_agy0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_agy0", "Agy0", base.DEC) +f.imu_atti_0_agz0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_agz0", "Agz0", base.DEC) +f.imu_atti_0_vgx0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_vgx0", "Vgx0", base.DEC) +f.imu_atti_0_vgy0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_vgy0", "Vgy0", base.DEC) +f.imu_atti_0_vgz0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_vgz0", "Vgz0", base.DEC) +f.imu_atti_0_gbx0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_gbx0", "Gbx0", base.DEC) +f.imu_atti_0_gby0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_gby0", "Gby0", base.DEC) +f.imu_atti_0_gbz0 = ProtoField.float ("dji_spark_flyrec.imu_atti_0_gbz0", "Gbz0", base.DEC) +f.imu_atti_0_mx0 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_0_mx0", "Mx0", base.DEC) +f.imu_atti_0_my0 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_0_my0", "My0", base.DEC) +f.imu_atti_0_mz0 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_0_mz0", "Mz0", base.DEC) +f.imu_atti_0_tx0 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_0_tx0", "Tx0", base.DEC) +f.imu_atti_0_ty0 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_0_ty0", "Ty0", base.DEC) +f.imu_atti_0_tz0 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_0_tz0", "Tz0", base.DEC) +f.imu_atti_0_sensor_stat0 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_0_sensor_stat0", "Sensor Stat0", base.HEX) +f.imu_atti_0_filter_stat0 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_0_filter_stat0", "Filter Stat0", base.HEX) +f.imu_atti_0_svn0 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_0_svn0", "Svn0", base.HEX) +f.imu_atti_0_atti_cnt0 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_0_atti_cnt0", "Atti Cnt0", base.HEX) + +local function flightrec_imu_atti_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_0_long0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_0_lati0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_0_press0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_ax0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_ay0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_az0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_wx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_wy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_wz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_alti0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_qw0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_qx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_qy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_qz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_agx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_agy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_agz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_vgx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_vgy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_vgz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_gbx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_gby0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_gbz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_0_mx0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_my0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_mz0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_tx0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_ty0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_tz0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_sensor_stat0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_filter_stat0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_svn0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_0_atti_cnt0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 0: Payload size different than expected") end +end + +-- Flight log - Imu Atti 1 - 0x0801 + +f.imu_atti_1_long1 = ProtoField.double ("dji_spark_flyrec.imu_atti_1_long1", "Long1", base.DEC) +f.imu_atti_1_lati1 = ProtoField.double ("dji_spark_flyrec.imu_atti_1_lati1", "Lati1", base.DEC) +f.imu_atti_1_press1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_press1", "Press1", base.DEC) +f.imu_atti_1_ax1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_ax1", "Ax1", base.DEC) +f.imu_atti_1_ay1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_ay1", "Ay1", base.DEC) +f.imu_atti_1_az1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_az1", "Az1", base.DEC) +f.imu_atti_1_wx1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_wx1", "Wx1", base.DEC) +f.imu_atti_1_wy1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_wy1", "Wy1", base.DEC) +f.imu_atti_1_wz1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_wz1", "Wz1", base.DEC) +f.imu_atti_1_alti1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_alti1", "Alti1", base.DEC) +f.imu_atti_1_qw1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_qw1", "Qw1", base.DEC) +f.imu_atti_1_qx1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_qx1", "Qx1", base.DEC) +f.imu_atti_1_qy1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_qy1", "Qy1", base.DEC) +f.imu_atti_1_qz1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_qz1", "Qz1", base.DEC) +f.imu_atti_1_agx1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_agx1", "Agx1", base.DEC) +f.imu_atti_1_agy1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_agy1", "Agy1", base.DEC) +f.imu_atti_1_agz1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_agz1", "Agz1", base.DEC) +f.imu_atti_1_vgx1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_vgx1", "Vgx1", base.DEC) +f.imu_atti_1_vgy1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_vgy1", "Vgy1", base.DEC) +f.imu_atti_1_vgz1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_vgz1", "Vgz1", base.DEC) +f.imu_atti_1_gbx1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_gbx1", "Gbx1", base.DEC) +f.imu_atti_1_gby1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_gby1", "Gby1", base.DEC) +f.imu_atti_1_gbz1 = ProtoField.float ("dji_spark_flyrec.imu_atti_1_gbz1", "Gbz1", base.DEC) +f.imu_atti_1_mx1 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_1_mx1", "Mx1", base.DEC) +f.imu_atti_1_my1 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_1_my1", "My1", base.DEC) +f.imu_atti_1_mz1 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_1_mz1", "Mz1", base.DEC) +f.imu_atti_1_tx1 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_1_tx1", "Tx1", base.DEC) +f.imu_atti_1_ty1 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_1_ty1", "Ty1", base.DEC) +f.imu_atti_1_tz1 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_1_tz1", "Tz1", base.DEC) +f.imu_atti_1_sensor_stat1 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_1_sensor_stat1", "Sensor Stat1", base.HEX) +f.imu_atti_1_filter_stat1 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_1_filter_stat1", "Filter Stat1", base.HEX) +f.imu_atti_1_svn1 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_1_svn1", "Svn1", base.HEX) +f.imu_atti_1_atti_cnt1 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_1_atti_cnt1", "Atti Cnt1", base.HEX) + +local function flightrec_imu_atti_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_1_long1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_1_lati1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_1_press1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_ax1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_ay1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_az1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_wx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_wy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_wz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_alti1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_qw1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_qx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_qy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_qz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_agx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_agy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_agz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_vgx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_vgy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_vgz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_gbx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_gby1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_gbz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_1_mx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_my1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_mz1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_tx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_ty1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_tz1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_sensor_stat1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_filter_stat1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_svn1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_1_atti_cnt1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 1: Payload size different than expected") end +end + +-- Flight log - Imu Atti 2 - 0x0802 + +f.imu_atti_2_long2 = ProtoField.double ("dji_spark_flyrec.imu_atti_2_long2", "Long2", base.DEC) +f.imu_atti_2_lati2 = ProtoField.double ("dji_spark_flyrec.imu_atti_2_lati2", "Lati2", base.DEC) +f.imu_atti_2_press2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_press2", "Press2", base.DEC) +f.imu_atti_2_ax2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_ax2", "Ax2", base.DEC) +f.imu_atti_2_ay2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_ay2", "Ay2", base.DEC) +f.imu_atti_2_az2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_az2", "Az2", base.DEC) +f.imu_atti_2_wx2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_wx2", "Wx2", base.DEC) +f.imu_atti_2_wy2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_wy2", "Wy2", base.DEC) +f.imu_atti_2_wz2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_wz2", "Wz2", base.DEC) +f.imu_atti_2_alti2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_alti2", "Alti2", base.DEC) +f.imu_atti_2_qw2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_qw2", "Qw2", base.DEC) +f.imu_atti_2_qx2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_qx2", "Qx2", base.DEC) +f.imu_atti_2_qy2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_qy2", "Qy2", base.DEC) +f.imu_atti_2_qz2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_qz2", "Qz2", base.DEC) +f.imu_atti_2_agx2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_agx2", "Agx2", base.DEC) +f.imu_atti_2_agy2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_agy2", "Agy2", base.DEC) +f.imu_atti_2_agz2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_agz2", "Agz2", base.DEC) +f.imu_atti_2_vgx2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_vgx2", "Vgx2", base.DEC) +f.imu_atti_2_vgy2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_vgy2", "Vgy2", base.DEC) +f.imu_atti_2_vgz2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_vgz2", "Vgz2", base.DEC) +f.imu_atti_2_gbx2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_gbx2", "Gbx2", base.DEC) +f.imu_atti_2_gby2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_gby2", "Gby2", base.DEC) +f.imu_atti_2_gbz2 = ProtoField.float ("dji_spark_flyrec.imu_atti_2_gbz2", "Gbz2", base.DEC) +f.imu_atti_2_mx2 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_2_mx2", "Mx2", base.DEC) +f.imu_atti_2_my2 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_2_my2", "My2", base.DEC) +f.imu_atti_2_mz2 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_2_mz2", "Mz2", base.DEC) +f.imu_atti_2_tx2 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_2_tx2", "Tx2", base.DEC) +f.imu_atti_2_ty2 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_2_ty2", "Ty2", base.DEC) +f.imu_atti_2_tz2 = ProtoField.int16 ("dji_spark_flyrec.imu_atti_2_tz2", "Tz2", base.DEC) +f.imu_atti_2_sensor_stat2 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_2_sensor_stat2", "Sensor Stat2", base.HEX) +f.imu_atti_2_filter_stat2 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_2_filter_stat2", "Filter Stat2", base.HEX) +f.imu_atti_2_svn2 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_2_svn2", "Svn2", base.HEX) +f.imu_atti_2_atti_cnt2 = ProtoField.uint16 ("dji_spark_flyrec.imu_atti_2_atti_cnt2", "Atti Cnt2", base.HEX) + +local function flightrec_imu_atti_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_atti_2_long2, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_2_lati2, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_atti_2_press2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_ax2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_ay2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_az2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_wx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_wy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_wz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_alti2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_qw2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_qx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_qy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_qz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_agx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_agy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_agz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_vgx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_vgy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_vgz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_gbx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_gby2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_gbz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_atti_2_mx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_my2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_mz2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_tx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_ty2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_tz2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_sensor_stat2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_filter_stat2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_svn2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_atti_2_atti_cnt2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 120) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Atti 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Atti 2: Payload size different than expected") end +end + +-- Flight log - Imu Ex 0 - 0x0810 + +f.imu_ex_0_vo_vx0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_vo_vx0", "Vo Vx0", base.DEC) +f.imu_ex_0_vo_vy0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_vo_vy0", "Vo Vy0", base.DEC) +f.imu_ex_0_vo_vz0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_vo_vz0", "Vo Vz0", base.DEC) +f.imu_ex_0_vo_px0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_vo_px0", "Vo Px0", base.DEC) +f.imu_ex_0_vo_py0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_vo_py0", "Vo Py0", base.DEC) +f.imu_ex_0_vo_pz0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_vo_pz0", "Vo Pz0", base.DEC) +f.imu_ex_0_us_v0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_us_v0", "Us V0", base.DEC) +f.imu_ex_0_us_p0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_us_p0", "Us P0", base.DEC) +f.imu_ex_0_rtk_long0 = ProtoField.double ("dji_spark_flyrec.imu_ex_0_rtk_long0", "Rtk Long0", base.DEC) +f.imu_ex_0_rtk_lati0 = ProtoField.double ("dji_spark_flyrec.imu_ex_0_rtk_lati0", "Rtk Lati0", base.DEC) +f.imu_ex_0_rtk_alti0 = ProtoField.float ("dji_spark_flyrec.imu_ex_0_rtk_alti0", "Rtk Alti0", base.DEC) +f.imu_ex_0_flag_navi0 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_0_flag_navi0", "Flag Navi0", base.HEX) +f.imu_ex_0_flag_err0 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_0_flag_err0", "Flag Err0", base.HEX) +f.imu_ex_0_flag_rsv0 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_0_flag_rsv0", "Flag Rsv0", base.HEX) +f.imu_ex_0_ex_cnt0 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_0_ex_cnt0", "Ex Cnt0", base.HEX) + +local function flightrec_imu_ex_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_0_vo_vx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_vy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_vz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_px0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_py0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_vo_pz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_us_v0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_us_p0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_rtk_long0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_0_rtk_lati0, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_0_rtk_alti0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_0_flag_navi0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_0_flag_err0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_0_flag_rsv0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_0_ex_cnt0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 0: Payload size different than expected") end +end + +-- Flight log - Imu Ex 1 - 0x0811 + +f.imu_ex_1_vo_vx1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_vo_vx1", "Vo Vx1", base.DEC) +f.imu_ex_1_vo_vy1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_vo_vy1", "Vo Vy1", base.DEC) +f.imu_ex_1_vo_vz1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_vo_vz1", "Vo Vz1", base.DEC) +f.imu_ex_1_vo_px1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_vo_px1", "Vo Px1", base.DEC) +f.imu_ex_1_vo_py1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_vo_py1", "Vo Py1", base.DEC) +f.imu_ex_1_vo_pz1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_vo_pz1", "Vo Pz1", base.DEC) +f.imu_ex_1_us_v1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_us_v1", "Us V1", base.DEC) +f.imu_ex_1_us_p1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_us_p1", "Us P1", base.DEC) +f.imu_ex_1_rtk_long1 = ProtoField.double ("dji_spark_flyrec.imu_ex_1_rtk_long1", "Rtk Long1", base.DEC) +f.imu_ex_1_rtk_lati1 = ProtoField.double ("dji_spark_flyrec.imu_ex_1_rtk_lati1", "Rtk Lati1", base.DEC) +f.imu_ex_1_rtk_alti1 = ProtoField.float ("dji_spark_flyrec.imu_ex_1_rtk_alti1", "Rtk Alti1", base.DEC) +f.imu_ex_1_flag_navi1 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_1_flag_navi1", "Flag Navi1", base.HEX) +f.imu_ex_1_flag_err1 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_1_flag_err1", "Flag Err1", base.HEX) +f.imu_ex_1_flag_rsv1 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_1_flag_rsv1", "Flag Rsv1", base.HEX) +f.imu_ex_1_ex_cnt1 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_1_ex_cnt1", "Ex Cnt1", base.HEX) + +local function flightrec_imu_ex_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_1_vo_vx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_vy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_vz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_px1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_py1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_vo_pz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_us_v1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_us_p1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_rtk_long1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_1_rtk_lati1, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_1_rtk_alti1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_1_flag_navi1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_1_flag_err1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_1_flag_rsv1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_1_ex_cnt1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 1: Payload size different than expected") end +end + +-- Flight log - Imu Ex 2 - 0x0812 + +f.imu_ex_2_vo_vx2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_vo_vx2", "Vo Vx2", base.DEC) +f.imu_ex_2_vo_vy2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_vo_vy2", "Vo Vy2", base.DEC) +f.imu_ex_2_vo_vz2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_vo_vz2", "Vo Vz2", base.DEC) +f.imu_ex_2_vo_px2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_vo_px2", "Vo Px2", base.DEC) +f.imu_ex_2_vo_py2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_vo_py2", "Vo Py2", base.DEC) +f.imu_ex_2_vo_pz2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_vo_pz2", "Vo Pz2", base.DEC) +f.imu_ex_2_us_v2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_us_v2", "Us V2", base.DEC) +f.imu_ex_2_us_p2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_us_p2", "Us P2", base.DEC) +f.imu_ex_2_rtk_long2 = ProtoField.double ("dji_spark_flyrec.imu_ex_2_rtk_long2", "Rtk Long2", base.DEC) +f.imu_ex_2_rtk_lati2 = ProtoField.double ("dji_spark_flyrec.imu_ex_2_rtk_lati2", "Rtk Lati2", base.DEC) +f.imu_ex_2_rtk_alti2 = ProtoField.float ("dji_spark_flyrec.imu_ex_2_rtk_alti2", "Rtk Alti2", base.DEC) +f.imu_ex_2_flag_navi2 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_2_flag_navi2", "Flag Navi2", base.HEX) +f.imu_ex_2_flag_err2 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_2_flag_err2", "Flag Err2", base.HEX) +f.imu_ex_2_flag_rsv2 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_2_flag_rsv2", "Flag Rsv2", base.HEX) +f.imu_ex_2_ex_cnt2 = ProtoField.uint16 ("dji_spark_flyrec.imu_ex_2_ex_cnt2", "Ex Cnt2", base.HEX) + +local function flightrec_imu_ex_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_ex_2_vo_vx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_vy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_vz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_px2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_py2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_vo_pz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_us_v2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_us_p2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_rtk_long2, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_2_rtk_lati2, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.imu_ex_2_rtk_alti2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_ex_2_flag_navi2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_2_flag_err2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_2_flag_rsv2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_ex_2_ex_cnt2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 60) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Ex 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Ex 2: Payload size different than expected") end +end + +-- Flight log - Atti Mini0 - 0x08a0 + +f.atti_mini0_s_qw0 = ProtoField.float ("dji_spark_flyrec.atti_mini0_s_qw0", "S Qw0", base.DEC) +f.atti_mini0_s_qx0 = ProtoField.float ("dji_spark_flyrec.atti_mini0_s_qx0", "S Qx0", base.DEC) +f.atti_mini0_s_qy0 = ProtoField.float ("dji_spark_flyrec.atti_mini0_s_qy0", "S Qy0", base.DEC) +f.atti_mini0_s_qz0 = ProtoField.float ("dji_spark_flyrec.atti_mini0_s_qz0", "S Qz0", base.DEC) +f.atti_mini0_s_pgz0 = ProtoField.float ("dji_spark_flyrec.atti_mini0_s_pgz0", "S Pgz0", base.DEC) +f.atti_mini0_s_vgz0 = ProtoField.float ("dji_spark_flyrec.atti_mini0_s_vgz0", "S Vgz0", base.DEC) +f.atti_mini0_s_agz0 = ProtoField.float ("dji_spark_flyrec.atti_mini0_s_agz0", "S Agz0", base.DEC) +f.atti_mini0_s_rsv00 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini0_s_rsv00", "S Rsv00", base.HEX) +f.atti_mini0_s_rsv10 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini0_s_rsv10", "S Rsv10", base.HEX) +f.atti_mini0_s_cnt0 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini0_s_cnt0", "S Cnt0", base.HEX) + +local function flightrec_atti_mini0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.atti_mini0_s_qw0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_qx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_qy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_qz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_pgz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_vgz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_agz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_rsv00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_rsv10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini0_s_cnt0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Atti Mini0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Atti Mini0: Payload size different than expected") end +end + +-- Flight log - Atti Mini1 - 0x08a1 + +f.atti_mini1_s_qw1 = ProtoField.float ("dji_spark_flyrec.atti_mini1_s_qw1", "S Qw1", base.DEC) +f.atti_mini1_s_qx1 = ProtoField.float ("dji_spark_flyrec.atti_mini1_s_qx1", "S Qx1", base.DEC) +f.atti_mini1_s_qy1 = ProtoField.float ("dji_spark_flyrec.atti_mini1_s_qy1", "S Qy1", base.DEC) +f.atti_mini1_s_qz1 = ProtoField.float ("dji_spark_flyrec.atti_mini1_s_qz1", "S Qz1", base.DEC) +f.atti_mini1_s_pgz1 = ProtoField.float ("dji_spark_flyrec.atti_mini1_s_pgz1", "S Pgz1", base.DEC) +f.atti_mini1_s_vgz1 = ProtoField.float ("dji_spark_flyrec.atti_mini1_s_vgz1", "S Vgz1", base.DEC) +f.atti_mini1_s_agz1 = ProtoField.float ("dji_spark_flyrec.atti_mini1_s_agz1", "S Agz1", base.DEC) +f.atti_mini1_s_rsv01 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini1_s_rsv01", "S Rsv01", base.HEX) +f.atti_mini1_s_rsv11 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini1_s_rsv11", "S Rsv11", base.HEX) +f.atti_mini1_s_cnt1 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini1_s_cnt1", "S Cnt1", base.HEX) + +local function flightrec_atti_mini1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.atti_mini1_s_qw1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_qx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_qy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_qz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_pgz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_vgz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_agz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_rsv01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_rsv11, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini1_s_cnt1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Atti Mini1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Atti Mini1: Payload size different than expected") end +end + +-- Flight log - Atti Mini2 - 0x08a2 + +f.atti_mini2_s_qw2 = ProtoField.float ("dji_spark_flyrec.atti_mini2_s_qw2", "S Qw2", base.DEC) +f.atti_mini2_s_qx2 = ProtoField.float ("dji_spark_flyrec.atti_mini2_s_qx2", "S Qx2", base.DEC) +f.atti_mini2_s_qy2 = ProtoField.float ("dji_spark_flyrec.atti_mini2_s_qy2", "S Qy2", base.DEC) +f.atti_mini2_s_qz2 = ProtoField.float ("dji_spark_flyrec.atti_mini2_s_qz2", "S Qz2", base.DEC) +f.atti_mini2_s_pgz2 = ProtoField.float ("dji_spark_flyrec.atti_mini2_s_pgz2", "S Pgz2", base.DEC) +f.atti_mini2_s_vgz2 = ProtoField.float ("dji_spark_flyrec.atti_mini2_s_vgz2", "S Vgz2", base.DEC) +f.atti_mini2_s_agz2 = ProtoField.float ("dji_spark_flyrec.atti_mini2_s_agz2", "S Agz2", base.DEC) +f.atti_mini2_s_rsv02 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini2_s_rsv02", "S Rsv02", base.HEX) +f.atti_mini2_s_rsv12 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini2_s_rsv12", "S Rsv12", base.HEX) +f.atti_mini2_s_cnt2 = ProtoField.uint32 ("dji_spark_flyrec.atti_mini2_s_cnt2", "S Cnt2", base.HEX) + +local function flightrec_atti_mini2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.atti_mini2_s_qw2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_qx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_qy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_qz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_pgz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_vgz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_agz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_rsv02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_rsv12, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.atti_mini2_s_cnt2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 40) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Atti Mini2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Atti Mini2: Payload size different than expected") end +end + +-- Flight log - Imu Fdi 0 - 0x0860 + +f.imu_fdi_0_fdi_gyr0 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_0_fdi_gyr0", "Fdi Gyr0", base.HEX) +f.imu_fdi_0_fdi_acc0 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_0_fdi_acc0", "Fdi Acc0", base.HEX) +f.imu_fdi_0_fdi_bar0 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_0_fdi_bar0", "Fdi Bar0", base.HEX) +f.imu_fdi_0_fdi_mag0 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_0_fdi_mag0", "Fdi Mag0", base.HEX) +f.imu_fdi_0_fdi_gps0 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_0_fdi_gps0", "Fdi Gps0", base.HEX) +f.imu_fdi_0_fdi_ns0 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_0_fdi_ns0", "Fdi Ns0", base.HEX) +f.imu_fdi_0_fdi_multi0 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_0_fdi_multi0", "Fdi Multi0", base.HEX) +f.imu_fdi_0_fdi_cnt0 = ProtoField.uint32 ("dji_spark_flyrec.imu_fdi_0_fdi_cnt0", "Fdi Cnt0", base.HEX) + +local function flightrec_imu_fdi_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_fdi_0_fdi_gyr0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_acc0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_bar0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_mag0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_gps0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_ns0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_multi0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_0_fdi_cnt0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Fdi 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Fdi 0: Payload size different than expected") end +end + +-- Flight log - Imu Fdi 1 - 0x0861 + +f.imu_fdi_1_fdi_gyr1 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_1_fdi_gyr1", "Fdi Gyr1", base.HEX) +f.imu_fdi_1_fdi_acc1 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_1_fdi_acc1", "Fdi Acc1", base.HEX) +f.imu_fdi_1_fdi_bar1 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_1_fdi_bar1", "Fdi Bar1", base.HEX) +f.imu_fdi_1_fdi_mag1 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_1_fdi_mag1", "Fdi Mag1", base.HEX) +f.imu_fdi_1_fdi_gps1 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_1_fdi_gps1", "Fdi Gps1", base.HEX) +f.imu_fdi_1_fdi_ns1 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_1_fdi_ns1", "Fdi Ns1", base.HEX) +f.imu_fdi_1_fdi_multi1 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_1_fdi_multi1", "Fdi Multi1", base.HEX) +f.imu_fdi_1_fdi_cnt1 = ProtoField.uint32 ("dji_spark_flyrec.imu_fdi_1_fdi_cnt1", "Fdi Cnt1", base.HEX) + +local function flightrec_imu_fdi_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_fdi_1_fdi_gyr1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_acc1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_bar1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_mag1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_gps1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_ns1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_multi1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_1_fdi_cnt1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Fdi 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Fdi 1: Payload size different than expected") end +end + +-- Flight log - Imu Fdi 2 - 0x0862 + +f.imu_fdi_2_fdi_gyr2 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_2_fdi_gyr2", "Fdi Gyr2", base.HEX) +f.imu_fdi_2_fdi_acc2 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_2_fdi_acc2", "Fdi Acc2", base.HEX) +f.imu_fdi_2_fdi_bar2 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_2_fdi_bar2", "Fdi Bar2", base.HEX) +f.imu_fdi_2_fdi_mag2 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_2_fdi_mag2", "Fdi Mag2", base.HEX) +f.imu_fdi_2_fdi_gps2 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_2_fdi_gps2", "Fdi Gps2", base.HEX) +f.imu_fdi_2_fdi_ns2 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_2_fdi_ns2", "Fdi Ns2", base.HEX) +f.imu_fdi_2_fdi_multi2 = ProtoField.uint16 ("dji_spark_flyrec.imu_fdi_2_fdi_multi2", "Fdi Multi2", base.HEX) +f.imu_fdi_2_fdi_cnt2 = ProtoField.uint32 ("dji_spark_flyrec.imu_fdi_2_fdi_cnt2", "Fdi Cnt2", base.HEX) + +local function flightrec_imu_fdi_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_fdi_2_fdi_gyr2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_acc2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_bar2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_mag2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_gps2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_ns2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_multi2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.imu_fdi_2_fdi_cnt2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Fdi 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Fdi 2: Payload size different than expected") end +end + +-- Flight log - Hl Debug Data - 0x03ef + +f.hl_debug_data_t_rad_v = ProtoField.float ("dji_spark_flyrec.hl_debug_data_t_rad_v", "T Rad V", base.DEC) +f.hl_debug_data_t_tan_v = ProtoField.float ("dji_spark_flyrec.hl_debug_data_t_tan_v", "T Tan V", base.DEC) +f.hl_debug_data_r_rad_v = ProtoField.float ("dji_spark_flyrec.hl_debug_data_r_rad_v", "R Rad V", base.DEC) +f.hl_debug_data_r_tan_v = ProtoField.float ("dji_spark_flyrec.hl_debug_data_r_tan_v", "R Tan V", base.DEC) + +local function flightrec_hl_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.hl_debug_data_t_rad_v, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hl_debug_data_t_tan_v, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hl_debug_data_r_rad_v, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.hl_debug_data_r_tan_v, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Hl Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Hl Debug Data: Payload size different than expected") end +end + +-- Flight log - Farm Db Data - 0x03f2 + +f.farm_db_data_farm_mode = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_farm_mode", "Farm Mode", base.HEX) +f.farm_db_data_dir_req = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_dir_req", "Dir Req", base.HEX) +f.farm_db_data_cur_dir = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_cur_dir", "Cur Dir", base.HEX) +f.farm_db_data_has_cap = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_has_cap", "Has Cap", base.HEX) +f.farm_db_data_set_pt_a = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_set_pt_a", "Set Pt A", base.HEX) +f.farm_db_data_set_pt_b = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_set_pt_b", "Set Pt B", base.HEX) +f.farm_db_data_next_step = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_next_step", "Next Step", base.HEX) +f.farm_db_data_continue = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_continue", "Continue", base.HEX) +f.farm_db_data_resume = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_resume", "Resume", base.HEX) +f.farm_db_data_r_dir = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_r_dir", "R Dir", base.HEX) +f.farm_db_data_l_dir = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_l_dir", "L Dir", base.HEX) +f.farm_db_data_rc_velx = ProtoField.float ("dji_spark_flyrec.farm_db_data_rc_velx", "Rc Velx", base.DEC) +f.farm_db_data_rc_vely = ProtoField.float ("dji_spark_flyrec.farm_db_data_rc_vely", "Rc Vely", base.DEC) +f.farm_db_data_rc_velz = ProtoField.float ("dji_spark_flyrec.farm_db_data_rc_velz", "Rc Velz", base.DEC) +f.farm_db_data_rc_yaw = ProtoField.float ("dji_spark_flyrec.farm_db_data_rc_yaw", "Rc Yaw", base.DEC) +f.farm_db_data_vel_limit = ProtoField.float ("dji_spark_flyrec.farm_db_data_vel_limit", "Vel Limit", base.DEC) +f.farm_db_data_ref_yaw = ProtoField.float ("dji_spark_flyrec.farm_db_data_ref_yaw", "Ref Yaw", base.DEC) +f.farm_db_data_idx_x = ProtoField.float ("dji_spark_flyrec.farm_db_data_idx_x", "Idx X", base.DEC) +f.farm_db_data_idx_y = ProtoField.float ("dji_spark_flyrec.farm_db_data_idx_y", "Idx Y", base.DEC) +f.farm_db_data_d_dis_x = ProtoField.float ("dji_spark_flyrec.farm_db_data_d_dis_x", "D Dis X", base.DEC) +f.farm_db_data_d_dis_y = ProtoField.float ("dji_spark_flyrec.farm_db_data_d_dis_y", "D Dis Y", base.DEC) +f.farm_db_data_tgt_ref_h = ProtoField.float ("dji_spark_flyrec.farm_db_data_tgt_ref_h", "Tgt Ref H", base.DEC) +f.farm_db_data_tgt_ref_h_f = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_tgt_ref_h_f", "Tgt Ref H F", base.HEX) +f.farm_db_data_vel_x_out = ProtoField.float ("dji_spark_flyrec.farm_db_data_vel_x_out", "Vel X Out", base.DEC) +f.farm_db_data_vel_y_out = ProtoField.float ("dji_spark_flyrec.farm_db_data_vel_y_out", "Vel Y Out", base.DEC) +f.farm_db_data_vel_z_out = ProtoField.float ("dji_spark_flyrec.farm_db_data_vel_z_out", "Vel Z Out", base.DEC) +f.farm_db_data_ref_h_work = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_ref_h_work", "Ref H Work", base.HEX) +f.farm_db_data_radar_type = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_radar_type", "Radar Type", base.HEX) +f.farm_db_data_cur_ref_h = ProtoField.float ("dji_spark_flyrec.farm_db_data_cur_ref_h", "Cur Ref H", base.DEC) +f.farm_db_data_ref_vz_cmd = ProtoField.float ("dji_spark_flyrec.farm_db_data_ref_vz_cmd", "Ref Vz Cmd", base.DEC) +f.farm_db_data_ref_pz = ProtoField.float ("dji_spark_flyrec.farm_db_data_ref_pz", "Ref Pz", base.DEC) +f.farm_db_data_app_resume_mode = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_app_resume_mode", "App Resume Mode", base.HEX) +f.farm_db_data_resume_interaction = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_resume_interaction", "Resume Interaction", base.HEX) +f.farm_db_data_auto_line_init_ready = ProtoField.uint8 ("dji_spark_flyrec.farm_db_data_auto_line_init_ready", "Auto Line Init Ready", base.HEX) + +local function flightrec_farm_db_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.farm_db_data_farm_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_dir_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_cur_dir, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_has_cap, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_set_pt_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_set_pt_b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_next_step, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_continue, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_resume, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_r_dir, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_l_dir, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_rc_velx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_rc_vely, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_rc_velz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_rc_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_vel_limit, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_ref_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_idx_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_idx_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_d_dis_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_d_dis_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_tgt_ref_h, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_tgt_ref_h_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_vel_x_out, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_vel_y_out, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_vel_z_out, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_ref_h_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_radar_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_cur_ref_h, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_ref_vz_cmd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_ref_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.farm_db_data_app_resume_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_resume_interaction, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.farm_db_data_auto_line_init_ready, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 85) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Farm Db Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Farm Db Data: Payload size different than expected") end +end + +-- Flight log - Spray Sys Ctrl Cmd - 0x4ef7 + +f.spray_sys_ctrl_cmd_enable_flag_0 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_enable_flag_0", "Enable Flag 0", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_0 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_flow_speed_0", "Flow Speed 0", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_1 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_enable_flag_1", "Enable Flag 1", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_1 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_flow_speed_1", "Flow Speed 1", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_2 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_enable_flag_2", "Enable Flag 2", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_2 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_flow_speed_2", "Flow Speed 2", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_3 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_enable_flag_3", "Enable Flag 3", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_3 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_flow_speed_3", "Flow Speed 3", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_4 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_enable_flag_4", "Enable Flag 4", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_4 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_flow_speed_4", "Flow Speed 4", base.HEX) +f.spray_sys_ctrl_cmd_enable_flag_5 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_enable_flag_5", "Enable Flag 5", base.HEX) +f.spray_sys_ctrl_cmd_flow_speed_5 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_flow_speed_5", "Flow Speed 5", base.HEX) +f.spray_sys_ctrl_cmd_valid_spray = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_valid_spray", "Valid Spray", base.HEX) +f.spray_sys_ctrl_cmd_version_unmatch = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_version_unmatch", "Version Unmatch", base.HEX) +f.spray_sys_ctrl_cmd_disconnected = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_ctrl_cmd_disconnected", "Disconnected", base.HEX) + +local function flightrec_spray_sys_ctrl_cmd_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_enable_flag_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_flow_speed_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_valid_spray, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_version_unmatch, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_ctrl_cmd_disconnected, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 15) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Spray Sys Ctrl Cmd: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Spray Sys Ctrl Cmd: Payload size different than expected") end +end + +-- Flight log - Spray Sys State - 0x4ef8 + +f.spray_sys_state_cap_percentage = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_cap_percentage", "Cap Percentage", base.HEX) +f.spray_sys_state_flow_speed_0 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_flow_speed_0", "Flow Speed 0", base.HEX) +f.spray_sys_state_flow_speed_1 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_flow_speed_1", "Flow Speed 1", base.HEX) +f.spray_sys_state_pump_press_1 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_pump_press_1", "Pump Press 1", base.HEX) +f.spray_sys_state_pump_press_2 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_pump_press_2", "Pump Press 2", base.HEX) +f.spray_sys_state_plug_xt90 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_plug_xt90", "Plug Xt90", base.HEX) +f.spray_sys_state_plug_xt100 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_plug_xt100", "Plug Xt100", base.HEX) +f.spray_sys_state_esc_flag_0 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_esc_flag_0", "Esc Flag 0", base.HEX) +f.spray_sys_state_reserved_0 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_reserved_0", "Reserved 0", base.HEX) +f.spray_sys_state_esc_flag_1 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_esc_flag_1", "Esc Flag 1", base.HEX) +f.spray_sys_state_reserved_1 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_reserved_1", "Reserved 1", base.HEX) +f.spray_sys_state_esc_flag_2 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_esc_flag_2", "Esc Flag 2", base.HEX) +f.spray_sys_state_reserved_2 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_reserved_2", "Reserved 2", base.HEX) +f.spray_sys_state_esc_flag_3 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_esc_flag_3", "Esc Flag 3", base.HEX) +f.spray_sys_state_reserved_3 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_reserved_3", "Reserved 3", base.HEX) +f.spray_sys_state_esc_flag_4 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_esc_flag_4", "Esc Flag 4", base.HEX) +f.spray_sys_state_reserved_4 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_reserved_4", "Reserved 4", base.HEX) +f.spray_sys_state_esc_flag_5 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_esc_flag_5", "Esc Flag 5", base.HEX) +f.spray_sys_state_reserved_5 = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_reserved_5", "Reserved 5", base.HEX) +f.spray_sys_state_cnt = ProtoField.uint8 ("dji_spark_flyrec.spray_sys_state_cnt", "Cnt", base.HEX) + +local function flightrec_spray_sys_state_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.spray_sys_state_cap_percentage, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_flow_speed_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_flow_speed_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_pump_press_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_pump_press_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_plug_xt90, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_plug_xt100, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_esc_flag_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_reserved_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.spray_sys_state_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Spray Sys State: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Spray Sys State: Payload size different than expected") end +end + +-- Flight log - Ctrl Vert Debug - 0x04b0 + +f.ctrl_vert_debug_vert_mode = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_vert_mode", "Vert Mode", base.HEX) +f.ctrl_vert_debug_vert_state = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_vert_state", "Vert State", base.HEX) +f.ctrl_vert_debug_vert_flag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_vert_flag", "Vert Flag", base.HEX) +f.ctrl_vert_debug_vert_pos = ProtoField.float ("dji_spark_flyrec.ctrl_vert_debug_vert_pos", "Vert Pos", base.DEC) +f.ctrl_vert_debug_vert_brk_t = ProtoField.float ("dji_spark_flyrec.ctrl_vert_debug_vert_brk_t", "Vert Brk T", base.DEC) +f.ctrl_vert_debug_near_bound = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_near_bound", "Near Bound", base.HEX) +f.ctrl_vert_debug_true_h_lmt = ProtoField.float ("dji_spark_flyrec.ctrl_vert_debug_true_h_lmt", "True H Lmt", base.DEC) +f.ctrl_vert_debug_takeoff_t = ProtoField.float ("dji_spark_flyrec.ctrl_vert_debug_takeoff_t", "Takeoff T", base.DEC) +f.ctrl_vert_debug_hit_gnd = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_hit_gnd", "Hit Gnd", base.HEX) +f.ctrl_vert_debug_high_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_high_os_f", "High Os F", base.HEX) +f.ctrl_vert_debug_low_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_low_os_f", "Low Os F", base.HEX) +f.ctrl_vert_debug_ap_high_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_ap_high_os_f", "Ap High Os F", base.HEX) +f.ctrl_vert_debug_gnd_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_gnd_os_f", "Gnd Os F", base.HEX) +f.ctrl_vert_debug_rf_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_rf_os_f", "Rf Os F", base.HEX) +f.ctrl_vert_debug_v_lmt_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_v_lmt_os_f", "V Lmt Os F", base.HEX) +f.ctrl_vert_debug_landing_tyoe = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vert_debug_landing_tyoe", "Landing Tyoe", base.HEX) + +local function flightrec_ctrl_vert_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_vert_debug_vert_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_vert_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_vert_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_vert_pos, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_debug_vert_brk_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_debug_near_bound, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_true_h_lmt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_debug_takeoff_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_vert_debug_hit_gnd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_high_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_low_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_ap_high_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_gnd_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_rf_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_v_lmt_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vert_debug_landing_tyoe, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Vert Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Vert Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Pos Vert Debug - 0x04b1 + +f.ctrl_pos_vert_debug_pos_tag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_pos_vert_debug_pos_tag", "Pos Tag", base.HEX) +f.ctrl_pos_vert_debug_pos_cmd = ProtoField.int16 ("dji_spark_flyrec.ctrl_pos_vert_debug_pos_cmd", "Pos Cmd", base.DEC) +f.ctrl_pos_vert_debug_pos_fdbk = ProtoField.int16 ("dji_spark_flyrec.ctrl_pos_vert_debug_pos_fdbk", "Pos Fdbk", base.DEC) + +local function flightrec_ctrl_pos_vert_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_pos_vert_debug_pos_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_pos_vert_debug_pos_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_pos_vert_debug_pos_fdbk, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Pos Vert Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Pos Vert Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Vel Vert Debug - 0x04b2 + +f.ctrl_vel_vert_debug_vel_tag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_vel_tag", "Vel Tag", base.HEX) +f.ctrl_vel_vert_debug_vel_cmd = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_vel_cmd", "Vel Cmd", base.DEC) +f.ctrl_vel_vert_debug_vel_before = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_vel_before", "Vel Before", base.DEC) +f.ctrl_vel_vert_debug_vel_after = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_vel_after", "Vel After", base.DEC) +f.ctrl_vel_vert_debug_vel_fdbk = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_vel_fdbk", "Vel Fdbk", base.DEC) +f.ctrl_vel_vert_debug_gnd_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_gnd_en", "Gnd En", base.HEX) +f.ctrl_vel_vert_debug_gnd_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_gnd_work", "Gnd Work", base.HEX) +f.ctrl_vel_vert_debug_gnd_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_gnd_norm", "Gnd Norm", base.DEC) +f.ctrl_vel_vert_debug_gnd_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_gnd_damp", "Gnd Damp", base.DEC) +f.ctrl_vel_vert_debug_roof_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_roof_en", "Roof En", base.HEX) +f.ctrl_vel_vert_debug_roof_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_roof_work", "Roof Work", base.HEX) +f.ctrl_vel_vert_debug_roof_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_roof_norm", "Roof Norm", base.DEC) +f.ctrl_vel_vert_debug_roof_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_roof_damp", "Roof Damp", base.DEC) +f.ctrl_vel_vert_debug_low_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_low_en", "Low En", base.HEX) +f.ctrl_vel_vert_debug_low_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_low_work", "Low Work", base.HEX) +f.ctrl_vel_vert_debug_low_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_low_norm", "Low Norm", base.DEC) +f.ctrl_vel_vert_debug_low_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_low_damp", "Low Damp", base.DEC) +f.ctrl_vel_vert_debug_high_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_high_en", "High En", base.HEX) +f.ctrl_vel_vert_debug_high_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_high_work", "High Work", base.HEX) +f.ctrl_vel_vert_debug_high_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_high_norm", "High Norm", base.DEC) +f.ctrl_vel_vert_debug_high_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_high_damp", "High Damp", base.DEC) +f.ctrl_vel_vert_debug_ap_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_work", "Ap Work", base.HEX) +f.ctrl_vel_vert_debug_ap_en0 = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_en0", "Ap En0", base.HEX) +f.ctrl_vel_vert_debug_ap_norm0 = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_norm0", "Ap Norm0", base.DEC) +f.ctrl_vel_vert_debug_ap_damp0 = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_damp0", "Ap Damp0", base.DEC) +f.ctrl_vel_vert_debug_ap_en1 = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_en1", "Ap En1", base.HEX) +f.ctrl_vel_vert_debug_ap_norm1 = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_norm1", "Ap Norm1", base.DEC) +f.ctrl_vel_vert_debug_ap_damp1 = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_damp1", "Ap Damp1", base.DEC) +f.ctrl_vel_vert_debug_ap_en2 = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_en2", "Ap En2", base.HEX) +f.ctrl_vel_vert_debug_ap_norm2 = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_norm2", "Ap Norm2", base.DEC) +f.ctrl_vel_vert_debug_ap_damp2 = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_ap_damp2", "Ap Damp2", base.DEC) +f.ctrl_vel_vert_debug_hit_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_hit_en", "Hit En", base.HEX) +f.ctrl_vel_vert_debug_hit_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_vel_vert_debug_hit_work", "Hit Work", base.HEX) +f.ctrl_vel_vert_debug_hit_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_hit_norm", "Hit Norm", base.DEC) +f.ctrl_vel_vert_debug_hit_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_vel_vert_debug_hit_damp", "Hit Damp", base.DEC) + +local function flightrec_ctrl_vel_vert_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_before, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_after, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_vel_fdbk, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_gnd_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_gnd_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_gnd_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_gnd_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_roof_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_roof_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_roof_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_roof_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_low_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_low_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_low_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_low_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_high_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_high_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_high_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_high_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_en0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_norm0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_damp0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_en1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_norm1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_damp1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_en2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_norm2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_ap_damp2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_hit_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_hit_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_vel_vert_debug_hit_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_vel_vert_debug_hit_damp, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 55) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Vel Vert Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Vel Vert Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Acc Vert Debug - 0x04b3 + +f.ctrl_acc_vert_debug_acc_tag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_acc_vert_debug_acc_tag", "Acc Tag", base.HEX) +f.ctrl_acc_vert_debug_acc_cmd = ProtoField.int16 ("dji_spark_flyrec.ctrl_acc_vert_debug_acc_cmd", "Acc Cmd", base.DEC) +f.ctrl_acc_vert_debug_acc_fdbk = ProtoField.int16 ("dji_spark_flyrec.ctrl_acc_vert_debug_acc_fdbk", "Acc Fdbk", base.DEC) +f.ctrl_acc_vert_debug_thr_cmd = ProtoField.int16 ("dji_spark_flyrec.ctrl_acc_vert_debug_thr_cmd", "Thr Cmd", base.DEC) + +local function flightrec_ctrl_acc_vert_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_acc_vert_debug_acc_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_acc_vert_debug_acc_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_acc_vert_debug_acc_fdbk, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_acc_vert_debug_thr_cmd, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 7) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Acc Vert Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Acc Vert Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Debug - 0x0514 + +f.ctrl_horiz_debug_horiz_mode = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_horiz_mode", "Horiz Mode", base.HEX) +f.ctrl_horiz_debug_hov_state = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_hov_state", "Hov State", base.HEX) +f.ctrl_horiz_debug_hov_flag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_hov_flag", "Hov Flag", base.HEX) +f.ctrl_horiz_debug_hov_px = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_hov_px", "Hov Px", base.DEC) +f.ctrl_horiz_debug_hov_py = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_hov_py", "Hov Py", base.DEC) +f.ctrl_horiz_debug_hov_brk_t = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_hov_brk_t", "Hov Brk T", base.DEC) +f.ctrl_horiz_debug_hov_cfrm_t = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_hov_cfrm_t", "Hov Cfrm T", base.DEC) +f.ctrl_horiz_debug_pos_cmdx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_pos_cmdx", "Pos Cmdx", base.DEC) +f.ctrl_horiz_debug_pos_cmdy = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_pos_cmdy", "Pos Cmdy", base.DEC) +f.ctrl_horiz_debug_vel_cmdx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_vel_cmdx", "Vel Cmdx", base.DEC) +f.ctrl_horiz_debug_vel_cmdy = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_vel_cmdy", "Vel Cmdy", base.DEC) +f.ctrl_horiz_debug_h_api_mode = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_h_api_mode", "H Api Mode", base.HEX) +f.ctrl_horiz_debug_h_api_frm = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_h_api_frm", "H Api Frm", base.HEX) +f.ctrl_horiz_debug_tilt_cmd_x = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_tilt_cmd_x", "Tilt Cmd X", base.DEC) +f.ctrl_horiz_debug_tilt_cmd_y = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_tilt_cmd_y", "Tilt Cmd Y", base.DEC) +f.ctrl_horiz_debug_v_ctrl_mod = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_v_ctrl_mod", "V Ctrl Mod", base.HEX) +f.ctrl_horiz_debug_trs_f_req = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_trs_f_req", "Trs F Req", base.HEX) +f.ctrl_horiz_debug_trs_f_flg = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_trs_f_flg", "Trs F Flg", base.HEX) +f.ctrl_horiz_debug_trs_mod = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_trs_mod", "Trs Mod", base.HEX) +f.ctrl_horiz_debug_trs_lck_st = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_trs_lck_st", "Trs Lck St", base.HEX) +f.ctrl_horiz_debug_trs_p_cmd = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_trs_p_cmd", "Trs P Cmd", base.DEC) +f.ctrl_horiz_debug_trs_v_cmd = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_trs_v_cmd", "Trs V Cmd", base.DEC) +f.ctrl_horiz_debug_trs_p_lck = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_trs_p_lck", "Trs P Lck", base.DEC) +f.ctrl_horiz_debug_trs_lck_t = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_trs_lck_t", "Trs Lck T", base.DEC) +f.ctrl_horiz_debug_emg_brk_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_emg_brk_f", "Emg Brk F", base.HEX) +f.ctrl_horiz_debug_near_bnd = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_near_bnd", "Near Bnd", base.HEX) +f.ctrl_horiz_debug_al_avoid = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_al_avoid", "Al Avoid", base.DEC) +f.ctrl_horiz_debug_al_gmb_typ = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_al_gmb_typ", "Al Gmb Typ", base.DEC) +f.ctrl_horiz_debug_al_bat = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_al_bat", "Al Bat", base.DEC) +f.ctrl_horiz_debug_al_gmb_pri = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_al_gmb_pri", "Al Gmb Pri", base.DEC) +f.ctrl_horiz_debug_al_final = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_al_final", "Al Final", base.DEC) +f.ctrl_horiz_debug_avoid_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_avoid_en", "Avoid En", base.HEX) +f.ctrl_horiz_debug_flw_gmb_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_flw_gmb_f", "Flw Gmb F", base.HEX) +f.ctrl_horiz_debug_in_flw_gmb = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_in_flw_gmb", "In Flw Gmb", base.HEX) +f.ctrl_horiz_debug_gf_tgt_yaw = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_gf_tgt_yaw", "Gf Tgt Yaw", base.DEC) +f.ctrl_horiz_debug_gf_cur_yaw = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_gf_cur_yaw", "Gf Cur Yaw", base.DEC) +f.ctrl_horiz_debug_g_tgt_gyro = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_g_tgt_gyro", "G Tgt Gyro", base.DEC) +f.ctrl_horiz_debug_gmb_mode = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_gmb_mode", "Gmb Mode", base.HEX) +f.ctrl_horiz_debug_gmb_refyaw = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_gmb_refyaw", "Gmb Refyaw", base.DEC) +f.ctrl_horiz_debug_gmb_on = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_debug_gmb_on", "Gmb On", base.DEC) +f.ctrl_horiz_debug_track_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_track_en", "Track En", base.HEX) +f.ctrl_horiz_debug_watch_mode = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_watch_mode", "Watch Mode", base.HEX) +f.ctrl_horiz_debug_trck_yaw_v = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_trck_yaw_v", "Trck Yaw V", base.DEC) +f.ctrl_horiz_debug_cl_tors = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_debug_cl_tors", "Cl Tors", base.DEC) +f.ctrl_horiz_debug_ap_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_ap_os_f", "Ap Os F", base.HEX) +f.ctrl_horiz_debug_avd_ob_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_avd_ob_os_f", "Avd Ob Os F", base.HEX) +f.ctrl_horiz_debug_h_fence_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_h_fence_os_f", "H Fence Os F", base.HEX) +f.ctrl_horiz_debug_r_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_r_os_f", "R Os F", base.HEX) +f.ctrl_horiz_debug_h_lmt_os_f = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_debug_h_lmt_os_f", "H Lmt Os F", base.HEX) +f.ctrl_horiz_debug_true_rad_lmt = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_debug_true_rad_lmt", "True Rad Lmt", base.HEX) + +local function flightrec_ctrl_horiz_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_debug_horiz_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_hov_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_hov_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_hov_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_hov_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_hov_brk_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_hov_cfrm_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_pos_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_pos_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_vel_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_vel_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_h_api_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_h_api_frm, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_tilt_cmd_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_tilt_cmd_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_v_ctrl_mod, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_f_req, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_f_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_mod, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_lck_st, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trs_p_cmd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_trs_v_cmd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_trs_p_lck, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_trs_lck_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_emg_brk_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_near_bnd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_al_avoid, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_al_gmb_typ, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_al_bat, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_al_gmb_pri, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_al_final, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_avoid_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_flw_gmb_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_in_flw_gmb, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_gf_tgt_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_gf_cur_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_g_tgt_gyro, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_gmb_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_gmb_refyaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_gmb_on, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_debug_track_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_watch_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_trck_yaw_v, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_cl_tors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_debug_ap_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_avd_ob_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_h_fence_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_r_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_h_lmt_os_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_debug_true_rad_lmt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 111) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Pos Debug - 0x0515 + +f.ctrl_horiz_pos_debug_pos_tag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_pos_debug_pos_tag", "Pos Tag", base.HEX) +f.ctrl_horiz_pos_debug_pos_cmdx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_pos_debug_pos_cmdx", "Pos Cmdx", base.DEC) +f.ctrl_horiz_pos_debug_pos_cmdy = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_pos_debug_pos_cmdy", "Pos Cmdy", base.DEC) + +local function flightrec_ctrl_horiz_pos_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_pos_debug_pos_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_pos_debug_pos_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_pos_debug_pos_cmdy, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 9) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Pos Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Pos Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Vel Debug - 0x0516 + +f.ctrl_horiz_vel_debug_vel_tag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_vel_tag", "Vel Tag", base.HEX) +f.ctrl_horiz_vel_debug_vel_cmdx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_vel_cmdx", "Vel Cmdx", base.DEC) +f.ctrl_horiz_vel_debug_vel_cmdy = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_vel_cmdy", "Vel Cmdy", base.DEC) +f.ctrl_horiz_vel_debug_befor_cmdx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_befor_cmdx", "Befor Cmdx", base.DEC) +f.ctrl_horiz_vel_debug_befor_cmdy = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_befor_cmdy", "Befor Cmdy", base.DEC) +f.ctrl_horiz_vel_debug_fltr_cmdx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_fltr_cmdx", "Fltr Cmdx", base.DEC) +f.ctrl_horiz_vel_debug_fltr_cmdy = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_fltr_cmdy", "Fltr Cmdy", base.DEC) +f.ctrl_horiz_vel_debug_dyn_gain = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_dyn_gain", "Dyn Gain", base.DEC) +f.ctrl_horiz_vel_debug_dyn_p_gain = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_dyn_p_gain", "Dyn P Gain", base.DEC) +f.ctrl_horiz_vel_debug_vel_fdbkx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_vel_fdbkx", "Vel Fdbkx", base.DEC) +f.ctrl_horiz_vel_debug_vel_fdbky = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_vel_debug_vel_fdbky", "Vel Fdbky", base.DEC) +f.ctrl_horiz_vel_debug_rad_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_rad_en", "Rad En", base.HEX) +f.ctrl_horiz_vel_debug_rad_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_rad_work", "Rad Work", base.HEX) +f.ctrl_horiz_vel_debug_rad_dir_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_rad_dir_x", "Rad Dir X", base.DEC) +f.ctrl_horiz_vel_debug_rad_dir_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_rad_dir_y", "Rad Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_rad_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_rad_norm", "Rad Norm", base.DEC) +f.ctrl_horiz_vel_debug_rad_direct = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_rad_direct", "Rad Direct", base.DEC) +f.ctrl_horiz_vel_debug_rad_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_rad_damp", "Rad Damp", base.DEC) +f.ctrl_horiz_vel_debug_ap0_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap0_en", "Ap0 En", base.HEX) +f.ctrl_horiz_vel_debug_ap0_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap0_work", "Ap0 Work", base.HEX) +f.ctrl_horiz_vel_debug_ap0_dir_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap0_dir_x", "Ap0 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ap0_dir_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap0_dir_y", "Ap0 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ap0_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap0_norm", "Ap0 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ap0_direct = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap0_direct", "Ap0 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ap0_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap0_damp", "Ap0 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ap0_dis = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap0_dis", "Ap0 Dis", base.DEC) +f.ctrl_horiz_vel_debug_ap1_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap1_en", "Ap1 En", base.HEX) +f.ctrl_horiz_vel_debug_ap1_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap1_work", "Ap1 Work", base.HEX) +f.ctrl_horiz_vel_debug_ap1_dir_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap1_dir_x", "Ap1 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ap1_dir_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap1_dir_y", "Ap1 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ap1_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap1_norm", "Ap1 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ap1_direct = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap1_direct", "Ap1 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ap1_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap1_damp", "Ap1 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ap1_dis = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap1_dis", "Ap1 Dis", base.DEC) +f.ctrl_horiz_vel_debug_ap2_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap2_en", "Ap2 En", base.HEX) +f.ctrl_horiz_vel_debug_ap2_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap2_work", "Ap2 Work", base.HEX) +f.ctrl_horiz_vel_debug_ap2_dir_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap2_dir_x", "Ap2 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ap2_dir_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap2_dir_y", "Ap2 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ap2_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap2_norm", "Ap2 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ap2_direct = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap2_direct", "Ap2 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ap2_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap2_damp", "Ap2 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ap2_dis = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ap2_dis", "Ap2 Dis", base.DEC) +f.ctrl_horiz_vel_debug_ao0_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao0_en", "Ao0 En", base.HEX) +f.ctrl_horiz_vel_debug_ao0_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao0_work", "Ao0 Work", base.HEX) +f.ctrl_horiz_vel_debug_ao0_dir_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao0_dir_x", "Ao0 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ao0_dir_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao0_dir_y", "Ao0 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ao0_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao0_norm", "Ao0 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ao0_direct = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao0_direct", "Ao0 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ao0_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao0_damp", "Ao0 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ao1_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao1_en", "Ao1 En", base.HEX) +f.ctrl_horiz_vel_debug_ao1_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao1_work", "Ao1 Work", base.HEX) +f.ctrl_horiz_vel_debug_ao1_dir_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao1_dir_x", "Ao1 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ao1_dir_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao1_dir_y", "Ao1 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ao1_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao1_norm", "Ao1 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ao1_direct = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao1_direct", "Ao1 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ao1_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao1_damp", "Ao1 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ao2_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao2_en", "Ao2 En", base.HEX) +f.ctrl_horiz_vel_debug_ao2_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao2_work", "Ao2 Work", base.HEX) +f.ctrl_horiz_vel_debug_ao2_dir_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao2_dir_x", "Ao2 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ao2_dir_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao2_dir_y", "Ao2 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ao2_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao2_norm", "Ao2 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ao2_direct = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao2_direct", "Ao2 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ao2_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao2_damp", "Ao2 Damp", base.DEC) +f.ctrl_horiz_vel_debug_ao3_en = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao3_en", "Ao3 En", base.HEX) +f.ctrl_horiz_vel_debug_ao3_work = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao3_work", "Ao3 Work", base.HEX) +f.ctrl_horiz_vel_debug_ao3_dir_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao3_dir_x", "Ao3 Dir X", base.DEC) +f.ctrl_horiz_vel_debug_ao3_dir_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao3_dir_y", "Ao3 Dir Y", base.DEC) +f.ctrl_horiz_vel_debug_ao3_norm = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao3_norm", "Ao3 Norm", base.DEC) +f.ctrl_horiz_vel_debug_ao3_direct = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao3_direct", "Ao3 Direct", base.DEC) +f.ctrl_horiz_vel_debug_ao3_damp = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_vel_debug_ao3_damp", "Ao3 Damp", base.DEC) + +local function flightrec_ctrl_horiz_vel_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_befor_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_befor_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_fltr_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_fltr_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_dyn_gain, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_dyn_p_gain, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_fdbkx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_vel_fdbky, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_rad_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap0_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap1_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ap2_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao0_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao1_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao2_damp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_work, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_dir_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_dir_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_norm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_direct, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_vel_debug_ao3_damp, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 143) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Vel Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Vel Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Atti Debug - 0x0518 + +f.ctrl_horiz_atti_debug_atti_tag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_atti_debug_atti_tag", "Atti Tag", base.HEX) +f.ctrl_horiz_atti_debug_tors_type = ProtoField.uint8 ("dji_spark_flyrec.ctrl_horiz_atti_debug_tors_type", "Tors Type", base.HEX) +f.ctrl_horiz_atti_debug_tgt_tors = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_atti_debug_tgt_tors", "Tgt Tors", base.DEC) +f.ctrl_horiz_atti_debug_tgt_tilt_x = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_atti_debug_tgt_tilt_x", "Tgt Tilt X", base.DEC) +f.ctrl_horiz_atti_debug_tgt_tilt_y = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_atti_debug_tgt_tilt_y", "Tgt Tilt Y", base.DEC) +f.ctrl_horiz_atti_debug_tgt_body_x = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_atti_debug_tgt_body_x", "Tgt Body X", base.DEC) +f.ctrl_horiz_atti_debug_tgt_body_y = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_atti_debug_tgt_body_y", "Tgt Body Y", base.DEC) +f.ctrl_horiz_atti_debug_cur_tors = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_atti_debug_cur_tors", "Cur Tors", base.DEC) +f.ctrl_horiz_atti_debug_cur_tilt_x = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_atti_debug_cur_tilt_x", "Cur Tilt X", base.DEC) +f.ctrl_horiz_atti_debug_cur_tilt_y = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_atti_debug_cur_tilt_y", "Cur Tilt Y", base.DEC) + +local function flightrec_ctrl_horiz_atti_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_atti_debug_atti_tag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_atti_debug_tors_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_tors, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_tilt_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_body_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_tgt_body_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_cur_tors, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_cur_tilt_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_atti_debug_cur_tilt_y, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 34) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Atti Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Atti Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Ang Vel Debug - 0x0519 + +f.ctrl_horiz_ang_vel_debug_gyro_cmdx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_ang_vel_debug_gyro_cmdx", "Gyro Cmdx", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_cmdy = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_ang_vel_debug_gyro_cmdy", "Gyro Cmdy", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_cmdz = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_ang_vel_debug_gyro_cmdz", "Gyro Cmdz", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_fbkx = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_ang_vel_debug_gyro_fbkx", "Gyro Fbkx", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_fbky = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_ang_vel_debug_gyro_fbky", "Gyro Fbky", base.DEC) +f.ctrl_horiz_ang_vel_debug_gyro_fbkz = ProtoField.float ("dji_spark_flyrec.ctrl_horiz_ang_vel_debug_gyro_fbkz", "Gyro Fbkz", base.DEC) + +local function flightrec_ctrl_horiz_ang_vel_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_cmdx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_cmdy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_cmdz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_fbkx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_fbky, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_horiz_ang_vel_debug_gyro_fbkz, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Ang Vel Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Ang Vel Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Ccpm Debug - 0x051a + +f.ctrl_horiz_ccpm_debug_raw_tilt_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_raw_tilt_x", "Raw Tilt X", base.DEC) +f.ctrl_horiz_ccpm_debug_raw_tilt_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_raw_tilt_y", "Raw Tilt Y", base.DEC) +f.ctrl_horiz_ccpm_debug_raw_tors = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_raw_tors", "Raw Tors", base.DEC) +f.ctrl_horiz_ccpm_debug_raw_lift = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_raw_lift", "Raw Lift", base.DEC) +f.ctrl_horiz_ccpm_debug_fix_tilt_x = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_fix_tilt_x", "Fix Tilt X", base.DEC) +f.ctrl_horiz_ccpm_debug_fix_tilt_y = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_fix_tilt_y", "Fix Tilt Y", base.DEC) +f.ctrl_horiz_ccpm_debug_fix_tor = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_fix_tor", "Fix Tor", base.DEC) +f.ctrl_horiz_ccpm_debug_fix_lift = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_fix_lift", "Fix Lift", base.DEC) +f.ctrl_horiz_ccpm_debug_thr_max = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_thr_max", "Thr Max", base.DEC) +f.ctrl_horiz_ccpm_debug_thr_min = ProtoField.int16 ("dji_spark_flyrec.ctrl_horiz_ccpm_debug_thr_min", "Thr Min", base.DEC) + +local function flightrec_ctrl_horiz_ccpm_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_raw_tilt_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_raw_tilt_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_raw_tors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_raw_lift, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_fix_tilt_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_fix_tilt_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_fix_tor, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_fix_lift, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_thr_max, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_ccpm_debug_thr_min, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Ccpm Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Ccpm Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Horiz Motor Debug - 0x051b + +f.ctrl_horiz_motor_debug_pwm1 = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_motor_debug_pwm1", "Pwm1", base.HEX) +f.ctrl_horiz_motor_debug_pwm2 = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_motor_debug_pwm2", "Pwm2", base.HEX) +f.ctrl_horiz_motor_debug_pwm3 = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_motor_debug_pwm3", "Pwm3", base.HEX) +f.ctrl_horiz_motor_debug_pwm4 = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_motor_debug_pwm4", "Pwm4", base.HEX) +f.ctrl_horiz_motor_debug_pwm5 = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_motor_debug_pwm5", "Pwm5", base.HEX) +f.ctrl_horiz_motor_debug_pwm6 = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_motor_debug_pwm6", "Pwm6", base.HEX) +f.ctrl_horiz_motor_debug_pwm7 = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_motor_debug_pwm7", "Pwm7", base.HEX) +f.ctrl_horiz_motor_debug_pwm8 = ProtoField.uint16 ("dji_spark_flyrec.ctrl_horiz_motor_debug_pwm8", "Pwm8", base.HEX) + +local function flightrec_ctrl_horiz_motor_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ctrl_horiz_motor_debug_pwm8, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Horiz Motor Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Horiz Motor Debug: Payload size different than expected") end +end + +-- Flight log - Ctrl Sweep Test - 0x051c + +f.ctrl_sweep_test_inj_a = ProtoField.float ("dji_spark_flyrec.ctrl_sweep_test_inj_a", "Inj A", base.DEC) +f.ctrl_sweep_test_inj_b = ProtoField.float ("dji_spark_flyrec.ctrl_sweep_test_inj_b", "Inj B", base.DEC) +f.ctrl_sweep_test_r = ProtoField.float ("dji_spark_flyrec.ctrl_sweep_test_r", "R", base.DEC) +f.ctrl_sweep_test_e = ProtoField.float ("dji_spark_flyrec.ctrl_sweep_test_e", "E", base.DEC) +f.ctrl_sweep_test_u = ProtoField.float ("dji_spark_flyrec.ctrl_sweep_test_u", "U", base.DEC) +f.ctrl_sweep_test_y = ProtoField.float ("dji_spark_flyrec.ctrl_sweep_test_y", "Y", base.DEC) + +local function flightrec_ctrl_sweep_test_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_sweep_test_inj_a, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_inj_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_u, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_sweep_test_y, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Sweep Test: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Sweep Test: Payload size different than expected") end +end + +-- Flight log - Way Debug Info - 0x0460 + +f.way_debug_info_mis_stus = ProtoField.uint8 ("dji_spark_flyrec.way_debug_info_mis_stus", "Mis Stus", base.HEX) +f.way_debug_info_wp_num = ProtoField.uint8 ("dji_spark_flyrec.way_debug_info_wp_num", "Wp Num", base.HEX) +f.way_debug_info_t_vel = ProtoField.int16 ("dji_spark_flyrec.way_debug_info_t_vel", "T Vel", base.DEC) +f.way_debug_info_traj_type = ProtoField.uint8 ("dji_spark_flyrec.way_debug_info_traj_type", "Traj Type", base.HEX) +f.way_debug_info_wp_t = ProtoField.uint16 ("dji_spark_flyrec.way_debug_info_wp_t", "Wp T", base.HEX) +f.way_debug_info_t_p_x = ProtoField.float ("dji_spark_flyrec.way_debug_info_t_p_x", "T P X", base.DEC) +f.way_debug_info_t_p_y = ProtoField.float ("dji_spark_flyrec.way_debug_info_t_p_y", "T P Y", base.DEC) +f.way_debug_info_t_p_z = ProtoField.float ("dji_spark_flyrec.way_debug_info_t_p_z", "T P Z", base.DEC) +f.way_debug_info_t_v_x = ProtoField.float ("dji_spark_flyrec.way_debug_info_t_v_x", "T V X", base.DEC) +f.way_debug_info_t_v_y = ProtoField.float ("dji_spark_flyrec.way_debug_info_t_v_y", "T V Y", base.DEC) +f.way_debug_info_t_v_z = ProtoField.float ("dji_spark_flyrec.way_debug_info_t_v_z", "T V Z", base.DEC) +f.way_debug_info_f_p_x = ProtoField.float ("dji_spark_flyrec.way_debug_info_f_p_x", "F P X", base.DEC) +f.way_debug_info_f_p_y = ProtoField.float ("dji_spark_flyrec.way_debug_info_f_p_y", "F P Y", base.DEC) +f.way_debug_info_f_p_z = ProtoField.float ("dji_spark_flyrec.way_debug_info_f_p_z", "F P Z", base.DEC) +f.way_debug_info_v_x = ProtoField.float ("dji_spark_flyrec.way_debug_info_v_x", "V X", base.DEC) +f.way_debug_info_v_y = ProtoField.float ("dji_spark_flyrec.way_debug_info_v_y", "V Y", base.DEC) +f.way_debug_info_v_z = ProtoField.float ("dji_spark_flyrec.way_debug_info_v_z", "V Z", base.DEC) +f.way_debug_info_dv_x = ProtoField.float ("dji_spark_flyrec.way_debug_info_dv_x", "Dv X", base.DEC) +f.way_debug_info_dv_y = ProtoField.float ("dji_spark_flyrec.way_debug_info_dv_y", "Dv Y", base.DEC) +f.way_debug_info_ddv_z = ProtoField.float ("dji_spark_flyrec.way_debug_info_ddv_z", "Ddv Z", base.DEC) +f.way_debug_info_dmp_scl = ProtoField.uint8 ("dji_spark_flyrec.way_debug_info_dmp_scl", "Dmp Scl", base.HEX) +f.way_debug_info_v_dyn_g = ProtoField.float ("dji_spark_flyrec.way_debug_info_v_dyn_g", "V Dyn G", base.DEC) +f.way_debug_info_p_dyn_g = ProtoField.float ("dji_spark_flyrec.way_debug_info_p_dyn_g", "P Dyn G", base.DEC) +f.way_debug_info_is_pud = ProtoField.uint8 ("dji_spark_flyrec.way_debug_info_is_pud", "Is Pud", base.HEX) +f.way_debug_info_debug_ref_flag = ProtoField.uint8 ("dji_spark_flyrec.way_debug_info_debug_ref_flag", "Debug Ref Flag", base.HEX) +f.way_debug_info_debug_ref_h = ProtoField.float ("dji_spark_flyrec.way_debug_info_debug_ref_h", "Debug Ref H", base.DEC) +f.way_debug_info_debug_ref_cmd = ProtoField.uint8 ("dji_spark_flyrec.way_debug_info_debug_ref_cmd", "Debug Ref Cmd", base.HEX) +f.way_debug_info_debug_resume_mode = ProtoField.uint8 ("dji_spark_flyrec.way_debug_info_debug_resume_mode", "Debug Resume Mode", base.HEX) + +local function flightrec_way_debug_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.way_debug_info_mis_stus, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_wp_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_t_vel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.way_debug_info_traj_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_wp_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.way_debug_info_t_p_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_p_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_p_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_v_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_v_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_t_v_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_f_p_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_f_p_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_f_p_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_v_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_v_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_v_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_dv_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_dv_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_ddv_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_dmp_scl, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_v_dyn_g, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_p_dyn_g, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_is_pud, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_debug_ref_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_debug_ref_h, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.way_debug_info_debug_ref_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.way_debug_info_debug_resume_mode, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 84) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Way Debug Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Way Debug Info: Payload size different than expected") end +end + +-- Flight log - Svo Avoid - 0x0461 + +f.svo_avoid_ao_en = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_ao_en", "Ao En", base.HEX) +f.svo_avoid_ua_en = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_ua_en", "Ua En", base.HEX) +f.svo_avoid_ao_wf = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_ao_wf", "Ao Wf", base.HEX) +f.svo_avoid_brake_wf = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_brake_wf", "Brake Wf", base.HEX) +f.svo_avoid_gha_en = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_gha_en", "Gha En", base.HEX) +f.svo_avoid_fl_f = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_fl_f", "Fl F", base.HEX) +f.svo_avoid_rl_wf = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_rl_wf", "Rl Wf", base.HEX) +f.svo_avoid_al_wf = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_al_wf", "Al Wf", base.HEX) +f.svo_avoid_ao_wf = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_ao_wf", "Ao Wf", base.HEX) +f.svo_avoid_boundary_f = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_boundary_f", "Boundary F", base.HEX) +f.svo_avoid_overshoot_f = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_overshoot_f", "Overshoot F", base.HEX) +f.svo_avoid_v_ll_wf = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_v_ll_wf", "V Ll Wf", base.HEX) +f.svo_avoid_v_al_wf = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_v_al_wf", "V Al Wf", base.HEX) +f.svo_avoid_rl_f = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_rl_f", "Rl F", base.HEX) +f.svo_avoid_hgl_wf = ProtoField.uint8 ("dji_spark_flyrec.svo_avoid_hgl_wf", "Hgl Wf", base.HEX) + +local function flightrec_svo_avoid_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.svo_avoid_ao_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_ua_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_ao_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_brake_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_gha_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_fl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_rl_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_al_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_ao_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_boundary_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_overshoot_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_v_ll_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_v_al_wf, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_rl_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.svo_avoid_hgl_wf, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 15) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Svo Avoid: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Svo Avoid: Payload size different than expected") end +end + +-- Flight log - Simulator Debug Data - 0x0578 + +f.simulator_debug_data_thrust = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_thrust", "Thrust", base.DEC) +f.simulator_debug_data_r_moment = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_r_moment", "R Moment", base.DEC) +f.simulator_debug_data_p_moment = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_p_moment", "P Moment", base.DEC) +f.simulator_debug_data_y_moment = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_y_moment", "Y Moment", base.DEC) +f.simulator_debug_data_drag_x = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_drag_x", "Drag X", base.DEC) +f.simulator_debug_data_drag_y = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_drag_y", "Drag Y", base.DEC) +f.simulator_debug_data_drag_z = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_drag_z", "Drag Z", base.DEC) +f.simulator_debug_data_e_force_x = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_force_x", "E Force X", base.DEC) +f.simulator_debug_data_e_force_y = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_force_y", "E Force Y", base.DEC) +f.simulator_debug_data_e_force_z = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_force_z", "E Force Z", base.DEC) +f.simulator_debug_data_e_moment_x = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_moment_x", "E Moment X", base.DEC) +f.simulator_debug_data_e_moment_y = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_moment_y", "E Moment Y", base.DEC) +f.simulator_debug_data_e_moment_z = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_moment_z", "E Moment Z", base.DEC) +f.simulator_debug_data_e_mome_f_x = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_mome_f_x", "E Mome F X", base.DEC) +f.simulator_debug_data_e_mome_f_y = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_mome_f_y", "E Mome F Y", base.DEC) +f.simulator_debug_data_e_mome_f_z = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_e_mome_f_z", "E Mome F Z", base.DEC) +f.simulator_debug_data_dura_time = ProtoField.uint32 ("dji_spark_flyrec.simulator_debug_data_dura_time", "Dura Time", base.HEX) +f.simulator_debug_data_longti = ProtoField.double ("dji_spark_flyrec.simulator_debug_data_longti", "Longti", base.DEC) +f.simulator_debug_data_lati = ProtoField.double ("dji_spark_flyrec.simulator_debug_data_lati", "Lati", base.DEC) +f.simulator_debug_data_pos_x_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_pos_x_w", "Pos X W", base.DEC) +f.simulator_debug_data_pos_y_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_pos_y_w", "Pos Y W", base.DEC) +f.simulator_debug_data_pos_z_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_pos_z_w", "Pos Z W", base.DEC) +f.simulator_debug_data_height_ = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_height_", "Height ", base.DEC) +f.simulator_debug_data_vel_x_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_vel_x_w", "Vel X W", base.DEC) +f.simulator_debug_data_vel_y_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_vel_y_w", "Vel Y W", base.DEC) +f.simulator_debug_data_vel_z_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_vel_z_w", "Vel Z W", base.DEC) +f.simulator_debug_data_acc_x_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_acc_x_w", "Acc X W", base.DEC) +f.simulator_debug_data_acc_y_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_acc_y_w", "Acc Y W", base.DEC) +f.simulator_debug_data_acc_z_w = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_acc_z_w", "Acc Z W", base.DEC) +f.simulator_debug_data_roll = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_roll", "Roll", base.DEC) +f.simulator_debug_data_pitch = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_pitch", "Pitch", base.DEC) +f.simulator_debug_data_yaw = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_yaw", "Yaw", base.DEC) +f.simulator_debug_data_q0 = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_q0", "Q0", base.DEC) +f.simulator_debug_data_q1 = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_q1", "Q1", base.DEC) +f.simulator_debug_data_q2 = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_q2", "Q2", base.DEC) +f.simulator_debug_data_q3 = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_q3", "Q3", base.DEC) +f.simulator_debug_data_p = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_p", "P", base.DEC) +f.simulator_debug_data_q = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_q", "Q", base.DEC) +f.simulator_debug_data_r = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_r", "R", base.DEC) +f.simulator_debug_data_p_dot = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_p_dot", "P Dot", base.DEC) +f.simulator_debug_data_q_dot = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_q_dot", "Q Dot", base.DEC) +f.simulator_debug_data_r_dot = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_r_dot", "R Dot", base.DEC) +f.simulator_debug_data_comp_mx = ProtoField.int16 ("dji_spark_flyrec.simulator_debug_data_comp_mx", "Comp.Mx", base.DEC) +f.simulator_debug_data_comp_my = ProtoField.int16 ("dji_spark_flyrec.simulator_debug_data_comp_my", "Comp.My", base.DEC) +f.simulator_debug_data_comp_mz = ProtoField.int16 ("dji_spark_flyrec.simulator_debug_data_comp_mz", "Comp.Mz", base.DEC) +f.simulator_debug_data_acc_x_b = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_acc_x_b", "Acc X B", base.DEC) +f.simulator_debug_data_acc_y_b = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_acc_y_b", "Acc Y B", base.DEC) +f.simulator_debug_data_acc_z_b = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_acc_z_b", "Acc Z B", base.DEC) +f.simulator_debug_data_flag = ProtoField.uint8 ("dji_spark_flyrec.simulator_debug_data_flag", "Flag", base.HEX) +f.simulator_debug_data_sys_time = ProtoField.float ("dji_spark_flyrec.simulator_debug_data_sys_time", "Sys Time", base.DEC) +f.simulator_debug_data_crash_flag = ProtoField.uint8 ("dji_spark_flyrec.simulator_debug_data_crash_flag", "Crash Flag", base.HEX) + +local function flightrec_simulator_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_debug_data_thrust, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_r_moment, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_p_moment, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_y_moment, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_drag_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_drag_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_drag_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_force_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_force_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_force_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_moment_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_moment_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_moment_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_mome_f_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_mome_f_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_e_mome_f_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_dura_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_longti, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.simulator_debug_data_lati, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.simulator_debug_data_pos_x_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_pos_y_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_pos_z_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_height_, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_vel_x_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_vel_y_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_vel_z_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_x_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_y_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_z_w, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_p_dot, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_q_dot, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_r_dot, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_comp_mx, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_debug_data_comp_my, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_debug_data_comp_mz, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_debug_data_acc_x_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_y_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_acc_z_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_debug_data_sys_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_debug_data_crash_flag, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 200) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Debug Data: Payload size different than expected") end +end + +-- Flight log - Simulator Gyro Acc Data 400Hz - 0x0579 + +f.simulator_gyro_acc_data_400hz_acc_temp = ProtoField.float ("dji_spark_flyrec.simulator_gyro_acc_data_400hz_acc_temp", "Acc Temp", base.DEC) +f.simulator_gyro_acc_data_400hz_acc_x = ProtoField.float ("dji_spark_flyrec.simulator_gyro_acc_data_400hz_acc_x", "Acc X", base.DEC) +f.simulator_gyro_acc_data_400hz_acc_y = ProtoField.float ("dji_spark_flyrec.simulator_gyro_acc_data_400hz_acc_y", "Acc Y", base.DEC) +f.simulator_gyro_acc_data_400hz_acc_z = ProtoField.float ("dji_spark_flyrec.simulator_gyro_acc_data_400hz_acc_z", "Acc Z", base.DEC) +f.simulator_gyro_acc_data_400hz_gyro_temp = ProtoField.float ("dji_spark_flyrec.simulator_gyro_acc_data_400hz_gyro_temp", "Gyro Temp", base.DEC) +f.simulator_gyro_acc_data_400hz_gyro_x = ProtoField.float ("dji_spark_flyrec.simulator_gyro_acc_data_400hz_gyro_x", "Gyro X", base.DEC) +f.simulator_gyro_acc_data_400hz_gyro_y = ProtoField.float ("dji_spark_flyrec.simulator_gyro_acc_data_400hz_gyro_y", "Gyro Y", base.DEC) +f.simulator_gyro_acc_data_400hz_gyro_z = ProtoField.float ("dji_spark_flyrec.simulator_gyro_acc_data_400hz_gyro_z", "Gyro Z", base.DEC) + +local function flightrec_simulator_gyro_acc_data_400hz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_acc_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_acc_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_acc_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_acc_z, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_gyro_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_gyro_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_gyro_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gyro_acc_data_400hz_gyro_z, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Gyro Acc Data 400Hz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Gyro Acc Data 400Hz: Payload size different than expected") end +end + +-- Flight log - Simulator Press Data 200Hz - 0x057c + +f.simulator_press_data_200hz_press = ProtoField.float ("dji_spark_flyrec.simulator_press_data_200hz_press", "Press", base.DEC) +f.simulator_press_data_200hz_temp = ProtoField.float ("dji_spark_flyrec.simulator_press_data_200hz_temp", "Temp", base.DEC) + +local function flightrec_simulator_press_data_200hz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_press_data_200hz_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_press_data_200hz_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Press Data 200Hz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Press Data 200Hz: Payload size different than expected") end +end + +-- Flight log - Simulator Mag Data 50Hz - 0x057a + +f.simulator_mag_data_50hz_data = ProtoField.int16 ("dji_spark_flyrec.simulator_mag_data_50hz_data", "Data", base.DEC) +f.simulator_mag_data_50hz_data = ProtoField.int16 ("dji_spark_flyrec.simulator_mag_data_50hz_data", "Data", base.DEC) +f.simulator_mag_data_50hz_data = ProtoField.int16 ("dji_spark_flyrec.simulator_mag_data_50hz_data", "Data", base.DEC) +f.simulator_mag_data_50hz_cnt = ProtoField.uint16 ("dji_spark_flyrec.simulator_mag_data_50hz_cnt", "Cnt", base.HEX) + +local function flightrec_simulator_mag_data_50hz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_mag_data_50hz_data, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_mag_data_50hz_data, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_mag_data_50hz_data, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_mag_data_50hz_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Mag Data 50Hz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Mag Data 50Hz: Payload size different than expected") end +end + +-- Flight log - Simulator Gps Data 5Hz - 0x057b + +f.simulator_gps_data_5hz_date = ProtoField.uint32 ("dji_spark_flyrec.simulator_gps_data_5hz_date", "Date", base.HEX) +f.simulator_gps_data_5hz_time = ProtoField.uint32 ("dji_spark_flyrec.simulator_gps_data_5hz_time", "Time", base.HEX) +f.simulator_gps_data_5hz_lon = ProtoField.int32 ("dji_spark_flyrec.simulator_gps_data_5hz_lon", "Lon", base.DEC) +f.simulator_gps_data_5hz_lat = ProtoField.int32 ("dji_spark_flyrec.simulator_gps_data_5hz_lat", "Lat", base.DEC) +f.simulator_gps_data_5hz_hmsl = ProtoField.int32 ("dji_spark_flyrec.simulator_gps_data_5hz_hmsl", "Hmsl", base.DEC) +f.simulator_gps_data_5hz_vel_n = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_vel_n", "Vel N", base.DEC) +f.simulator_gps_data_5hz_vel_e = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_vel_e", "Vel E", base.DEC) +f.simulator_gps_data_5hz_vel_d = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_vel_d", "Vel D", base.DEC) +f.simulator_gps_data_5hz_hdop = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_hdop", "Hdop", base.DEC) +f.simulator_gps_data_5hz_pdop = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_pdop", "Pdop", base.DEC) +f.simulator_gps_data_5hz_gnss_flag = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_gnss_flag", "Gnss Flag", base.DEC) +f.simulator_gps_data_5hz_hacc = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_hacc", "Hacc", base.DEC) +f.simulator_gps_data_5hz_sacc = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_sacc", "Sacc", base.DEC) +f.simulator_gps_data_5hz_gps_fix = ProtoField.float ("dji_spark_flyrec.simulator_gps_data_5hz_gps_fix", "Gps Fix", base.DEC) +f.simulator_gps_data_5hz_gps_used = ProtoField.uint32 ("dji_spark_flyrec.simulator_gps_data_5hz_gps_used", "Gps Used", base.HEX) +f.simulator_gps_data_5hz_gln_used = ProtoField.uint32 ("dji_spark_flyrec.simulator_gps_data_5hz_gln_used", "Gln Used", base.HEX) +f.simulator_gps_data_5hz_numsv = ProtoField.uint16 ("dji_spark_flyrec.simulator_gps_data_5hz_numsv", "Numsv", base.HEX) +f.simulator_gps_data_5hz_gpsstate = ProtoField.uint16 ("dji_spark_flyrec.simulator_gps_data_5hz_gpsstate", "Gpsstate", base.HEX) + +local function flightrec_simulator_gps_data_5hz_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_gps_data_5hz_date, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_lon, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_lat, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_hmsl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_vel_n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_vel_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_vel_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_hdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_pdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_gnss_flag, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_hacc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_sacc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_gps_fix, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_gps_used, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_gln_used, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_gps_data_5hz_numsv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_gps_data_5hz_gpsstate, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Gps Data 5Hz: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Gps Data 5Hz: Payload size different than expected") end +end + +-- Flight log - Simulator Motor Data - 0x057e + +f.simulator_motor_data_m1_current = ProtoField.int16 ("dji_spark_flyrec.simulator_motor_data_m1_current", "M1 Current", base.DEC) +f.simulator_motor_data_m1_speed = ProtoField.uint16 ("dji_spark_flyrec.simulator_motor_data_m1_speed", "M1 Speed", base.HEX) +f.simulator_motor_data_m2_current = ProtoField.int16 ("dji_spark_flyrec.simulator_motor_data_m2_current", "M2 Current", base.DEC) +f.simulator_motor_data_m2_speed = ProtoField.uint16 ("dji_spark_flyrec.simulator_motor_data_m2_speed", "M2 Speed", base.HEX) +f.simulator_motor_data_m3_current = ProtoField.int16 ("dji_spark_flyrec.simulator_motor_data_m3_current", "M3 Current", base.DEC) +f.simulator_motor_data_m3_speed = ProtoField.uint16 ("dji_spark_flyrec.simulator_motor_data_m3_speed", "M3 Speed", base.HEX) +f.simulator_motor_data_m4_current = ProtoField.int16 ("dji_spark_flyrec.simulator_motor_data_m4_current", "M4 Current", base.DEC) +f.simulator_motor_data_m4_speed = ProtoField.uint16 ("dji_spark_flyrec.simulator_motor_data_m4_speed", "M4 Speed", base.HEX) +f.simulator_motor_data_m5_current = ProtoField.int16 ("dji_spark_flyrec.simulator_motor_data_m5_current", "M5 Current", base.DEC) +f.simulator_motor_data_m5_speed = ProtoField.uint16 ("dji_spark_flyrec.simulator_motor_data_m5_speed", "M5 Speed", base.HEX) +f.simulator_motor_data_m6_current = ProtoField.int16 ("dji_spark_flyrec.simulator_motor_data_m6_current", "M6 Current", base.DEC) +f.simulator_motor_data_m6_speed = ProtoField.uint16 ("dji_spark_flyrec.simulator_motor_data_m6_speed", "M6 Speed", base.HEX) +f.simulator_motor_data_m7_current = ProtoField.int16 ("dji_spark_flyrec.simulator_motor_data_m7_current", "M7 Current", base.DEC) +f.simulator_motor_data_m7_speed = ProtoField.uint16 ("dji_spark_flyrec.simulator_motor_data_m7_speed", "M7 Speed", base.HEX) +f.simulator_motor_data_m8_current = ProtoField.int16 ("dji_spark_flyrec.simulator_motor_data_m8_current", "M8 Current", base.DEC) +f.simulator_motor_data_m8_speed = ProtoField.uint16 ("dji_spark_flyrec.simulator_motor_data_m8_speed", "M8 Speed", base.HEX) + +local function flightrec_simulator_motor_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_motor_data_m1_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m1_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m2_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m2_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m3_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m3_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m4_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m4_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m5_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m5_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m6_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m6_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m7_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m7_speed, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m8_current, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_motor_data_m8_speed, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Motor Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Motor Data: Payload size different than expected") end +end + +-- Flight log - Device Change Times - 0x057d + +f.device_change_times_bat = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_bat", "Bat", base.HEX) +f.device_change_times_esc = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_esc", "Esc", base.HEX) +f.device_change_times_sys = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_sys", "Sys", base.HEX) +f.device_change_times_fmu = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_fmu", "Fmu", base.HEX) +f.device_change_times_mc = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_mc", "Mc", base.HEX) +f.device_change_times_imu = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_imu", "Imu", base.HEX) +f.device_change_times_gps = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_gps", "Gps", base.HEX) +f.device_change_times_gyro = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_gyro", "Gyro", base.HEX) +f.device_change_times_acc = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_acc", "Acc", base.HEX) +f.device_change_times_gyro_acc = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_gyro_acc", "Gyro Acc", base.HEX) +f.device_change_times_baro = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_baro", "Baro", base.HEX) +f.device_change_times_compass = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_compass", "Compass", base.HEX) +f.device_change_times_ultr = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_ultr", "Ultr", base.HEX) +f.device_change_times_vo = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_vo", "Vo", base.HEX) +f.device_change_times_radar = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_radar", "Radar", base.HEX) +f.device_change_times_camera = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_camera", "Camera", base.HEX) +f.device_change_times_gimbal = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_gimbal", "Gimbal", base.HEX) +f.device_change_times_trans = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_trans", "Trans", base.HEX) +f.device_change_times_led = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_led", "Led", base.HEX) +f.device_change_times_pc = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_pc", "Pc", base.HEX) +f.device_change_times_rc = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_rc", "Rc", base.HEX) +f.device_change_times_bs = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_bs", "Bs", base.HEX) +f.device_change_times_sdk = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_sdk", "Sdk", base.HEX) +f.device_change_times_spray = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_spray", "Spray", base.HEX) +f.device_change_times_tof = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_tof", "Tof", base.HEX) +f.device_change_times_wristband = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_wristband", "Wristband", base.HEX) +f.device_change_times_headset = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_headset", "Headset", base.HEX) +f.device_change_times_all = ProtoField.uint16 ("dji_spark_flyrec.device_change_times_all", "All", base.HEX) + +local function flightrec_device_change_times_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.device_change_times_bat, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_esc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_sys, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_fmu, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_mc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_imu, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_gps, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_gyro, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_acc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_gyro_acc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_baro, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_compass, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_ultr, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_vo, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_radar, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_camera, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_gimbal, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_trans, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_led, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_pc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_rc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_bs, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_sdk, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_spray, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_tof, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_wristband, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_headset, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.device_change_times_all, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 56) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Device Change Times: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Device Change Times: Payload size different than expected") end +end + +-- Flight log - Simulator Config Aircraft Param - 0x0582 + +f.simulator_config_aircraft_param_arm_len = ProtoField.float ("dji_spark_flyrec.simulator_config_aircraft_param_arm_len", "Arm Len", base.DEC) +f.simulator_config_aircraft_param_b_area = ProtoField.float ("dji_spark_flyrec.simulator_config_aircraft_param_b_area", "B Area", base.DEC) +f.simulator_config_aircraft_param_b_area = ProtoField.float ("dji_spark_flyrec.simulator_config_aircraft_param_b_area", "B Area", base.DEC) +f.simulator_config_aircraft_param_b_area = ProtoField.float ("dji_spark_flyrec.simulator_config_aircraft_param_b_area", "B Area", base.DEC) +f.simulator_config_aircraft_param_inertia = ProtoField.float ("dji_spark_flyrec.simulator_config_aircraft_param_inertia", "Inertia", base.DEC) +f.simulator_config_aircraft_param_inertia = ProtoField.float ("dji_spark_flyrec.simulator_config_aircraft_param_inertia", "Inertia", base.DEC) +f.simulator_config_aircraft_param_inertia = ProtoField.float ("dji_spark_flyrec.simulator_config_aircraft_param_inertia", "Inertia", base.DEC) +f.simulator_config_aircraft_param_mass = ProtoField.float ("dji_spark_flyrec.simulator_config_aircraft_param_mass", "Mass", base.DEC) + +local function flightrec_simulator_config_aircraft_param_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_aircraft_param_arm_len, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_b_area, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_b_area, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_b_area, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_inertia, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_inertia, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_inertia, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_aircraft_param_mass, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Aircraft Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Aircraft Param: Payload size different than expected") end +end + +-- Flight log - Simulator Config Battery Param - 0x0583 + +f.simulator_config_battery_param_cell_num = ProtoField.uint8 ("dji_spark_flyrec.simulator_config_battery_param_cell_num", "Cell Num", base.HEX) +f.simulator_config_battery_param_cell_v = ProtoField.uint16 ("dji_spark_flyrec.simulator_config_battery_param_cell_v", "Cell V", base.HEX) +f.simulator_config_battery_param_cycle_cnt = ProtoField.uint8 ("dji_spark_flyrec.simulator_config_battery_param_cycle_cnt", "Cycle Cnt", base.HEX) +f.simulator_config_battery_param_design_cap = ProtoField.uint16 ("dji_spark_flyrec.simulator_config_battery_param_design_cap", "Design Cap", base.HEX) +f.simulator_config_battery_param_error_cnt = ProtoField.uint16 ("dji_spark_flyrec.simulator_config_battery_param_error_cnt", "Error Cnt", base.HEX) +f.simulator_config_battery_param_i_cap_per = ProtoField.uint8 ("dji_spark_flyrec.simulator_config_battery_param_i_cap_per", "I Cap Per", base.HEX) +f.simulator_config_battery_param_i_temp = ProtoField.float ("dji_spark_flyrec.simulator_config_battery_param_i_temp", "I Temp", base.DEC) +f.simulator_config_battery_param_internal_r = ProtoField.float ("dji_spark_flyrec.simulator_config_battery_param_internal_r", "Internal R", base.DEC) +f.simulator_config_battery_param_mdate = ProtoField.uint16 ("dji_spark_flyrec.simulator_config_battery_param_mdate", "Mdate", base.HEX) +f.simulator_config_battery_param_seq_num = ProtoField.uint16 ("dji_spark_flyrec.simulator_config_battery_param_seq_num", "Seq Num", base.HEX) +f.simulator_config_battery_param_standby_i = ProtoField.float ("dji_spark_flyrec.simulator_config_battery_param_standby_i", "Standby I", base.DEC) + +local function flightrec_simulator_config_battery_param_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_battery_param_cell_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_config_battery_param_cell_v, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_cycle_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_config_battery_param_design_cap, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_error_cnt, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_i_cap_per, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_config_battery_param_i_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_battery_param_internal_r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_battery_param_mdate, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_seq_num, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_battery_param_standby_i, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 25) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Battery Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Battery Param: Payload size different than expected") end +end + +-- Flight log - Simulator Config Environment Param - 0x0584 + +f.simulator_config_environment_param_density = ProtoField.float ("dji_spark_flyrec.simulator_config_environment_param_density", "Density", base.DEC) +f.simulator_config_environment_param_drag_coef = ProtoField.float ("dji_spark_flyrec.simulator_config_environment_param_drag_coef", "Drag Coef", base.DEC) +f.simulator_config_environment_param_wind_s = ProtoField.float ("dji_spark_flyrec.simulator_config_environment_param_wind_s", "Wind S", base.DEC) +f.simulator_config_environment_param_wind_s = ProtoField.float ("dji_spark_flyrec.simulator_config_environment_param_wind_s", "Wind S", base.DEC) +f.simulator_config_environment_param_wind_s = ProtoField.float ("dji_spark_flyrec.simulator_config_environment_param_wind_s", "Wind S", base.DEC) +f.simulator_config_environment_param_gra_acc = ProtoField.float ("dji_spark_flyrec.simulator_config_environment_param_gra_acc", "Gra Acc", base.DEC) +f.simulator_config_environment_param_temp = ProtoField.float ("dji_spark_flyrec.simulator_config_environment_param_temp", "Temp", base.DEC) + +local function flightrec_simulator_config_environment_param_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_environment_param_density, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_drag_coef, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_wind_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_wind_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_wind_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_gra_acc, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_environment_param_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Environment Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Environment Param: Payload size different than expected") end +end + +-- Flight log - Simulator Config Motor Param 1 - 0x0585 + +f.simulator_config_motor_param_1_cl = ProtoField.float ("dji_spark_flyrec.simulator_config_motor_param_1_cl", "Cl", base.DEC) +f.simulator_config_motor_param_1_cq = ProtoField.float ("dji_spark_flyrec.simulator_config_motor_param_1_cq", "Cq", base.DEC) +f.simulator_config_motor_param_1_i_max = ProtoField.int16 ("dji_spark_flyrec.simulator_config_motor_param_1_i_max", "I Max", base.DEC) +f.simulator_config_motor_param_1_i_min = ProtoField.int16 ("dji_spark_flyrec.simulator_config_motor_param_1_i_min", "I Min", base.DEC) +f.simulator_config_motor_param_1_in_motor = ProtoField.float ("dji_spark_flyrec.simulator_config_motor_param_1_in_motor", "In Motor", base.DEC) +f.simulator_config_motor_param_1_in_prop = ProtoField.float ("dji_spark_flyrec.simulator_config_motor_param_1_in_prop", "In Prop", base.DEC) +f.simulator_config_motor_param_1_rm = ProtoField.uint16 ("dji_spark_flyrec.simulator_config_motor_param_1_rm", "Rm", base.HEX) +f.simulator_config_motor_param_1_kv = ProtoField.uint16 ("dji_spark_flyrec.simulator_config_motor_param_1_kv", "Kv", base.HEX) +f.simulator_config_motor_param_1_mta = ProtoField.int16 ("dji_spark_flyrec.simulator_config_motor_param_1_mta", "Mta", base.DEC) +f.simulator_config_motor_param_1_volt_max = ProtoField.uint16 ("dji_spark_flyrec.simulator_config_motor_param_1_volt_max", "Volt Max", base.HEX) + +local function flightrec_simulator_config_motor_param_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_motor_param_1_cl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_motor_param_1_cq, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_motor_param_1_i_max, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_i_min, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_in_motor, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_motor_param_1_in_prop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.simulator_config_motor_param_1_rm, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_kv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_mta, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.simulator_config_motor_param_1_volt_max, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 28) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Motor Param 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Motor Param 1: Payload size different than expected") end +end + +-- Flight log - Simulator Config Sensor Param - 0x0587 + +f.simulator_config_sensor_param_gyro_delay = ProtoField.uint8 ("dji_spark_flyrec.simulator_config_sensor_param_gyro_delay", "Gyro Delay", base.HEX) +f.simulator_config_sensor_param_imu_delay = ProtoField.uint8 ("dji_spark_flyrec.simulator_config_sensor_param_imu_delay", "Imu Delay", base.HEX) + +local function flightrec_simulator_config_sensor_param_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.simulator_config_sensor_param_gyro_delay, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.simulator_config_sensor_param_imu_delay, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Simulator Config Sensor Param: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Simulator Config Sensor Param: Payload size different than expected") end +end + +-- Flight log - Rtkdata - 0xcff2 + +f.rtkdata_date = ProtoField.uint32 ("dji_spark_flyrec.rtkdata_date", "Date", base.HEX) +f.rtkdata_time = ProtoField.uint32 ("dji_spark_flyrec.rtkdata_time", "Time", base.HEX) +f.rtkdata_lon_p = ProtoField.double ("dji_spark_flyrec.rtkdata_lon_p", "Lon P", base.DEC) +f.rtkdata_lat_p = ProtoField.double ("dji_spark_flyrec.rtkdata_lat_p", "Lat P", base.DEC) +f.rtkdata_hmsl_p = ProtoField.float ("dji_spark_flyrec.rtkdata_hmsl_p", "Hmsl P", base.DEC) +f.rtkdata_lon_s = ProtoField.int32 ("dji_spark_flyrec.rtkdata_lon_s", "Lon S", base.DEC) +f.rtkdata_lat_s = ProtoField.int32 ("dji_spark_flyrec.rtkdata_lat_s", "Lat S", base.DEC) +f.rtkdata_hmsl_s = ProtoField.int32 ("dji_spark_flyrec.rtkdata_hmsl_s", "Hmsl S", base.DEC) +f.rtkdata_vel_n = ProtoField.float ("dji_spark_flyrec.rtkdata_vel_n", "Vel N", base.DEC) +f.rtkdata_vel_e = ProtoField.float ("dji_spark_flyrec.rtkdata_vel_e", "Vel E", base.DEC) +f.rtkdata_vel_d = ProtoField.float ("dji_spark_flyrec.rtkdata_vel_d", "Vel D", base.DEC) +f.rtkdata_yaw = ProtoField.int16 ("dji_spark_flyrec.rtkdata_yaw", "Yaw", base.DEC) +f.rtkdata_svn_s = ProtoField.uint8 ("dji_spark_flyrec.rtkdata_svn_s", "Svn S", base.HEX) +f.rtkdata_svn_p = ProtoField.uint8 ("dji_spark_flyrec.rtkdata_svn_p", "Svn P", base.HEX) +f.rtkdata_hdop = ProtoField.float ("dji_spark_flyrec.rtkdata_hdop", "Hdop", base.DEC) +f.rtkdata_pitch = ProtoField.float ("dji_spark_flyrec.rtkdata_pitch", "Pitch", base.DEC) +f.rtkdata_posflg = ProtoField.uint8 ("dji_spark_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_spark_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_spark_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_spark_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_spark_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_posflg = ProtoField.uint8 ("dji_spark_flyrec.rtkdata_posflg", "Posflg", base.HEX) +f.rtkdata_gpsstate = ProtoField.uint16 ("dji_spark_flyrec.rtkdata_gpsstate", "Gpsstate", base.HEX) + +local function flightrec_rtkdata_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rtkdata_date, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_time, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_lon_p, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.rtkdata_lat_p, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.rtkdata_hmsl_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_lon_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_lat_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_hmsl_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_vel_n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_vel_e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_vel_d, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_yaw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rtkdata_svn_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_svn_p, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_hdop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_posflg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rtkdata_gpsstate, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 72) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rtkdata: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rtkdata: Payload size different than expected") end +end + +-- Flight log - Genral Debug Data - 0x0640 + +f.genral_debug_data_db00 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db00", "Db00", base.DEC) +f.genral_debug_data_db01 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db01", "Db01", base.DEC) +f.genral_debug_data_db02 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db02", "Db02", base.DEC) +f.genral_debug_data_db03 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db03", "Db03", base.DEC) +f.genral_debug_data_db04 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db04", "Db04", base.DEC) +f.genral_debug_data_db05 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db05", "Db05", base.DEC) +f.genral_debug_data_db06 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db06", "Db06", base.DEC) +f.genral_debug_data_db07 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db07", "Db07", base.DEC) +f.genral_debug_data_db08 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db08", "Db08", base.DEC) +f.genral_debug_data_db09 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db09", "Db09", base.DEC) +f.genral_debug_data_db10 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db10", "Db10", base.DEC) +f.genral_debug_data_db11 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db11", "Db11", base.DEC) +f.genral_debug_data_db12 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db12", "Db12", base.DEC) +f.genral_debug_data_db13 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db13", "Db13", base.DEC) +f.genral_debug_data_db14 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db14", "Db14", base.DEC) +f.genral_debug_data_db15 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db15", "Db15", base.DEC) +f.genral_debug_data_db16 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db16", "Db16", base.DEC) +f.genral_debug_data_db17 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db17", "Db17", base.DEC) +f.genral_debug_data_db18 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db18", "Db18", base.DEC) +f.genral_debug_data_db19 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db19", "Db19", base.DEC) +f.genral_debug_data_db20 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db20", "Db20", base.DEC) +f.genral_debug_data_db21 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db21", "Db21", base.DEC) +f.genral_debug_data_db22 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db22", "Db22", base.DEC) +f.genral_debug_data_db23 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db23", "Db23", base.DEC) +f.genral_debug_data_db24 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db24", "Db24", base.DEC) +f.genral_debug_data_db25 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db25", "Db25", base.DEC) +f.genral_debug_data_db26 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db26", "Db26", base.DEC) +f.genral_debug_data_db27 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db27", "Db27", base.DEC) +f.genral_debug_data_db28 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db28", "Db28", base.DEC) +f.genral_debug_data_db29 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db29", "Db29", base.DEC) +f.genral_debug_data_db30 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db30", "Db30", base.DEC) +f.genral_debug_data_db31 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db31", "Db31", base.DEC) +f.genral_debug_data_db32 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db32", "Db32", base.DEC) +f.genral_debug_data_db33 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db33", "Db33", base.DEC) +f.genral_debug_data_db34 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db34", "Db34", base.DEC) +f.genral_debug_data_db35 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db35", "Db35", base.DEC) +f.genral_debug_data_db36 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db36", "Db36", base.DEC) +f.genral_debug_data_db37 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db37", "Db37", base.DEC) +f.genral_debug_data_db38 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db38", "Db38", base.DEC) +f.genral_debug_data_db39 = ProtoField.float ("dji_spark_flyrec.genral_debug_data_db39", "Db39", base.DEC) + +local function flightrec_genral_debug_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.genral_debug_data_db00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db03, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db04, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db05, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db06, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db07, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db08, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db09, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db11, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db12, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db13, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db14, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db15, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db16, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db17, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db19, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db20, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db21, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db22, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db23, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db24, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db25, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db26, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db27, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db28, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db29, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db30, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db31, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db32, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db33, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db34, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db35, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db36, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db37, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db38, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.genral_debug_data_db39, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 160) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Genral Debug Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Genral Debug Data: Payload size different than expected") end +end + +-- Flight log - Rc Debug Info - 0x06a4 + +f.rc_debug_info_cur_cmd = ProtoField.uint16 ("dji_spark_flyrec.rc_debug_info_cur_cmd", "Cur Cmd", base.HEX) +f.rc_debug_info_fail_safe = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_fail_safe", "Fail Safe", base.HEX) +f.rc_debug_info_vedio_lost = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_vedio_lost", "Vedio Lost", base.HEX) +f.rc_debug_info_data_lost = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_data_lost", "Data Lost", base.HEX) +f.rc_debug_info_app_lost = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_app_lost", "App Lost", base.HEX) +f.rc_debug_info_frame_lost = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_frame_lost", "Frame Lost", base.HEX) +f.rc_debug_info_rec_cnt = ProtoField.uint32 ("dji_spark_flyrec.rc_debug_info_rec_cnt", "Rec Cnt", base.HEX) +f.rc_debug_info_sky_con = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_sky_con", "Sky Con", base.HEX) +f.rc_debug_info_gnd_con = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_gnd_con", "Gnd Con", base.HEX) +f.rc_debug_info_connected = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_connected", "Connected", base.HEX) +f.rc_debug_info_m_changed = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_m_changed", "M Changed", base.HEX) +f.rc_debug_info_arm_status = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_arm_status", "Arm Status", base.HEX) +f.rc_debug_info_wifi_en = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_wifi_en", "Wifi En", base.HEX) +f.rc_debug_info_in_wifi = ProtoField.uint8 ("dji_spark_flyrec.rc_debug_info_in_wifi", "In Wifi", base.HEX) + +local function flightrec_rc_debug_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_debug_info_cur_cmd, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_debug_info_fail_safe, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_vedio_lost, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_data_lost, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_app_lost, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_frame_lost, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_rec_cnt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_debug_info_sky_con, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_gnd_con, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_connected, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_m_changed, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_arm_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_wifi_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_debug_info_in_wifi, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 18) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Debug Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Debug Info: Payload size different than expected") end +end + +-- Flight log - Cali Mag 00 - 0x08d0 + +f.cali_mag_00_c_mx_0 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_00_c_mx_0", "C Mx 0", base.DEC) +f.cali_mag_00_c_my_0 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_00_c_my_0", "C My 0", base.DEC) +f.cali_mag_00_c_mz_0 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_00_c_mz_0", "C Mz 0", base.DEC) +f.cali_mag_00_c_m_cnt_0 = ProtoField.uint16 ("dji_spark_flyrec.cali_mag_00_c_m_cnt_0", "C M Cnt 0", base.HEX) + +local function flightrec_cali_mag_00_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cali_mag_00_c_mx_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_00_c_my_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_00_c_mz_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_00_c_m_cnt_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cali Mag 00: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cali Mag 00: Payload size different than expected") end +end + +-- Flight log - Cali Mag 01 - 0x08d1 + +f.cali_mag_01_c_mx_1 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_01_c_mx_1", "C Mx 1", base.DEC) +f.cali_mag_01_c_my_1 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_01_c_my_1", "C My 1", base.DEC) +f.cali_mag_01_c_mz_1 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_01_c_mz_1", "C Mz 1", base.DEC) +f.cali_mag_01_c_m_cnt_1 = ProtoField.uint16 ("dji_spark_flyrec.cali_mag_01_c_m_cnt_1", "C M Cnt 1", base.HEX) + +local function flightrec_cali_mag_01_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cali_mag_01_c_mx_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_01_c_my_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_01_c_mz_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_01_c_m_cnt_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cali Mag 01: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cali Mag 01: Payload size different than expected") end +end + +-- Flight log - Cali Mag 02 - 0x08d2 + +f.cali_mag_02_c_mx_2 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_02_c_mx_2", "C Mx 2", base.DEC) +f.cali_mag_02_c_my_2 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_02_c_my_2", "C My 2", base.DEC) +f.cali_mag_02_c_mz_2 = ProtoField.int16 ("dji_spark_flyrec.cali_mag_02_c_mz_2", "C Mz 2", base.DEC) +f.cali_mag_02_c_m_cnt_2 = ProtoField.uint16 ("dji_spark_flyrec.cali_mag_02_c_m_cnt_2", "C M Cnt 2", base.HEX) + +local function flightrec_cali_mag_02_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cali_mag_02_c_mx_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_02_c_my_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_02_c_mz_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.cali_mag_02_c_m_cnt_2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cali Mag 02: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cali Mag 02: Payload size different than expected") end +end + +-- Flight log - Lpf Gyr Acc0 - 0x0828 + +f.lpf_gyr_acc0_lpf_wx_0 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc0_lpf_wx_0", "Lpf Wx 0", base.DEC) +f.lpf_gyr_acc0_lpf_wy_0 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc0_lpf_wy_0", "Lpf Wy 0", base.DEC) +f.lpf_gyr_acc0_lpf_wz_0 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc0_lpf_wz_0", "Lpf Wz 0", base.DEC) +f.lpf_gyr_acc0_lpf_ax_0 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc0_lpf_ax_0", "Lpf Ax 0", base.DEC) +f.lpf_gyr_acc0_lpf_ay_0 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc0_lpf_ay_0", "Lpf Ay 0", base.DEC) +f.lpf_gyr_acc0_lpf_az_0 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc0_lpf_az_0", "Lpf Az 0", base.DEC) + +local function flightrec_lpf_gyr_acc0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lpf_gyr_acc0_lpf_wx_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_wy_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_wz_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_ax_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_ay_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc0_lpf_az_0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lpf Gyr Acc0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lpf Gyr Acc0: Payload size different than expected") end +end + +-- Flight log - Lpf Gyr Acc1 - 0x0829 + +f.lpf_gyr_acc1_lpf_wx_1 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc1_lpf_wx_1", "Lpf Wx 1", base.DEC) +f.lpf_gyr_acc1_lpf_wy_1 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc1_lpf_wy_1", "Lpf Wy 1", base.DEC) +f.lpf_gyr_acc1_lpf_wz_1 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc1_lpf_wz_1", "Lpf Wz 1", base.DEC) +f.lpf_gyr_acc1_lpf_ax_1 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc1_lpf_ax_1", "Lpf Ax 1", base.DEC) +f.lpf_gyr_acc1_lpf_ay_1 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc1_lpf_ay_1", "Lpf Ay 1", base.DEC) +f.lpf_gyr_acc1_lpf_az_1 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc1_lpf_az_1", "Lpf Az 1", base.DEC) + +local function flightrec_lpf_gyr_acc1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lpf_gyr_acc1_lpf_wx_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_wy_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_wz_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_ax_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_ay_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc1_lpf_az_1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lpf Gyr Acc1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lpf Gyr Acc1: Payload size different than expected") end +end + +-- Flight log - Lpf Gyr Acc2 - 0x082a + +f.lpf_gyr_acc2_lpf_wx_2 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc2_lpf_wx_2", "Lpf Wx 2", base.DEC) +f.lpf_gyr_acc2_lpf_wy_2 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc2_lpf_wy_2", "Lpf Wy 2", base.DEC) +f.lpf_gyr_acc2_lpf_wz_2 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc2_lpf_wz_2", "Lpf Wz 2", base.DEC) +f.lpf_gyr_acc2_lpf_ax_2 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc2_lpf_ax_2", "Lpf Ax 2", base.DEC) +f.lpf_gyr_acc2_lpf_ay_2 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc2_lpf_ay_2", "Lpf Ay 2", base.DEC) +f.lpf_gyr_acc2_lpf_az_2 = ProtoField.float ("dji_spark_flyrec.lpf_gyr_acc2_lpf_az_2", "Lpf Az 2", base.DEC) + +local function flightrec_lpf_gyr_acc2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lpf_gyr_acc2_lpf_wx_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_wy_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_wz_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_ax_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_ay_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.lpf_gyr_acc2_lpf_az_2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 24) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lpf Gyr Acc2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lpf Gyr Acc2: Payload size different than expected") end +end + +-- Flight log - App Temp Bias0 - 0x08e6 + +f.app_temp_bias0_bwx0 = ProtoField.float ("dji_spark_flyrec.app_temp_bias0_bwx0", "Bwx0", base.DEC) +f.app_temp_bias0_bwy0 = ProtoField.float ("dji_spark_flyrec.app_temp_bias0_bwy0", "Bwy0", base.DEC) +f.app_temp_bias0_bwz0 = ProtoField.float ("dji_spark_flyrec.app_temp_bias0_bwz0", "Bwz0", base.DEC) +f.app_temp_bias0_bax0 = ProtoField.float ("dji_spark_flyrec.app_temp_bias0_bax0", "Bax0", base.DEC) +f.app_temp_bias0_bay0 = ProtoField.float ("dji_spark_flyrec.app_temp_bias0_bay0", "Bay0", base.DEC) +f.app_temp_bias0_baz0 = ProtoField.float ("dji_spark_flyrec.app_temp_bias0_baz0", "Baz0", base.DEC) +f.app_temp_bias0_temp0 = ProtoField.float ("dji_spark_flyrec.app_temp_bias0_temp0", "Temp0", base.DEC) +f.app_temp_bias0_level2_flag0 = ProtoField.float ("dji_spark_flyrec.app_temp_bias0_level2_flag0", "Level2 Flag0", base.DEC) + +local function flightrec_app_temp_bias0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_bias0_bwx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_bwy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_bwz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_bax0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_bay0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_baz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_temp0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias0_level2_flag0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Bias0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Bias0: Payload size different than expected") end +end + +-- Flight log - App Temp Bias1 - 0x08e7 + +f.app_temp_bias1_bwx1 = ProtoField.float ("dji_spark_flyrec.app_temp_bias1_bwx1", "Bwx1", base.DEC) +f.app_temp_bias1_bwy1 = ProtoField.float ("dji_spark_flyrec.app_temp_bias1_bwy1", "Bwy1", base.DEC) +f.app_temp_bias1_bwz1 = ProtoField.float ("dji_spark_flyrec.app_temp_bias1_bwz1", "Bwz1", base.DEC) +f.app_temp_bias1_bax1 = ProtoField.float ("dji_spark_flyrec.app_temp_bias1_bax1", "Bax1", base.DEC) +f.app_temp_bias1_bay1 = ProtoField.float ("dji_spark_flyrec.app_temp_bias1_bay1", "Bay1", base.DEC) +f.app_temp_bias1_baz1 = ProtoField.float ("dji_spark_flyrec.app_temp_bias1_baz1", "Baz1", base.DEC) +f.app_temp_bias1_temp1 = ProtoField.float ("dji_spark_flyrec.app_temp_bias1_temp1", "Temp1", base.DEC) +f.app_temp_bias1_level2_flag1 = ProtoField.float ("dji_spark_flyrec.app_temp_bias1_level2_flag1", "Level2 Flag1", base.DEC) + +local function flightrec_app_temp_bias1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_bias1_bwx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_bwy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_bwz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_bax1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_bay1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_baz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_temp1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias1_level2_flag1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Bias1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Bias1: Payload size different than expected") end +end + +-- Flight log - App Temp Bias2 - 0x08e8 + +f.app_temp_bias2_bwx2 = ProtoField.float ("dji_spark_flyrec.app_temp_bias2_bwx2", "Bwx2", base.DEC) +f.app_temp_bias2_bwy2 = ProtoField.float ("dji_spark_flyrec.app_temp_bias2_bwy2", "Bwy2", base.DEC) +f.app_temp_bias2_bwz2 = ProtoField.float ("dji_spark_flyrec.app_temp_bias2_bwz2", "Bwz2", base.DEC) +f.app_temp_bias2_bax2 = ProtoField.float ("dji_spark_flyrec.app_temp_bias2_bax2", "Bax2", base.DEC) +f.app_temp_bias2_bay2 = ProtoField.float ("dji_spark_flyrec.app_temp_bias2_bay2", "Bay2", base.DEC) +f.app_temp_bias2_baz2 = ProtoField.float ("dji_spark_flyrec.app_temp_bias2_baz2", "Baz2", base.DEC) +f.app_temp_bias2_temp2 = ProtoField.float ("dji_spark_flyrec.app_temp_bias2_temp2", "Temp2", base.DEC) +f.app_temp_bias2_level2_flag2 = ProtoField.float ("dji_spark_flyrec.app_temp_bias2_level2_flag2", "Level2 Flag2", base.DEC) + +local function flightrec_app_temp_bias2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.app_temp_bias2_bwx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_bwy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_bwz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_bax2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_bay2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_baz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_temp2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.app_temp_bias2_level2_flag2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"App Temp Bias2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"App Temp Bias2: Payload size different than expected") end +end + +-- Flight log - Inner Temp Bias0 - 0x08e4 + +f.inner_temp_bias0__bwx0 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias0__bwx0", " Bwx0", base.DEC) +f.inner_temp_bias0__bwy0 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias0__bwy0", " Bwy0", base.DEC) +f.inner_temp_bias0__bwz0 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias0__bwz0", " Bwz0", base.DEC) +f.inner_temp_bias0__bax0 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias0__bax0", " Bax0", base.DEC) +f.inner_temp_bias0__bay0 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias0__bay0", " Bay0", base.DEC) +f.inner_temp_bias0__baz0 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias0__baz0", " Baz0", base.DEC) +f.inner_temp_bias0__temp0 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias0__temp0", " Temp0", base.DEC) +f.inner_temp_bias0_level1_flag0 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias0_level1_flag0", "Level1 Flag0", base.DEC) + +local function flightrec_inner_temp_bias0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.inner_temp_bias0__bwx0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__bwy0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__bwz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__bax0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__bay0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__baz0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0__temp0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias0_level1_flag0, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Inner Temp Bias0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Inner Temp Bias0: Payload size different than expected") end +end + +-- Flight log - Inner Temp Bias1 - 0x08e5 + +f.inner_temp_bias1__bwx1 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias1__bwx1", " Bwx1", base.DEC) +f.inner_temp_bias1__bwy1 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias1__bwy1", " Bwy1", base.DEC) +f.inner_temp_bias1__bwz1 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias1__bwz1", " Bwz1", base.DEC) +f.inner_temp_bias1__bax1 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias1__bax1", " Bax1", base.DEC) +f.inner_temp_bias1__bay1 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias1__bay1", " Bay1", base.DEC) +f.inner_temp_bias1__baz1 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias1__baz1", " Baz1", base.DEC) +f.inner_temp_bias1__temp1 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias1__temp1", " Temp1", base.DEC) +f.inner_temp_bias1_level1_flag1 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias1_level1_flag1", "Level1 Flag1", base.DEC) + +local function flightrec_inner_temp_bias1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.inner_temp_bias1__bwx1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__bwy1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__bwz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__bax1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__bay1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__baz1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1__temp1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias1_level1_flag1, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Inner Temp Bias1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Inner Temp Bias1: Payload size different than expected") end +end + +-- Flight log - Inner Temp Bias2 - 0x08e6 + +f.inner_temp_bias2__bwx2 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias2__bwx2", " Bwx2", base.DEC) +f.inner_temp_bias2__bwy2 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias2__bwy2", " Bwy2", base.DEC) +f.inner_temp_bias2__bwz2 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias2__bwz2", " Bwz2", base.DEC) +f.inner_temp_bias2__bax2 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias2__bax2", " Bax2", base.DEC) +f.inner_temp_bias2__bay2 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias2__bay2", " Bay2", base.DEC) +f.inner_temp_bias2__baz2 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias2__baz2", " Baz2", base.DEC) +f.inner_temp_bias2__temp2 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias2__temp2", " Temp2", base.DEC) +f.inner_temp_bias2_level1_flag2 = ProtoField.float ("dji_spark_flyrec.inner_temp_bias2_level1_flag2", "Level1 Flag2", base.DEC) + +local function flightrec_inner_temp_bias2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.inner_temp_bias2__bwx2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__bwy2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__bwz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__bax2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__bay2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__baz2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2__temp2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.inner_temp_bias2_level1_flag2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Inner Temp Bias2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Inner Temp Bias2: Payload size different than expected") end +end + +-- Flight log - Battery Info - 0x06ae + +f.battery_info_ad_v = ProtoField.uint16 ("dji_spark_flyrec.battery_info_ad_v", "Ad V", base.HEX) +f.battery_info_r_time = ProtoField.uint16 ("dji_spark_flyrec.battery_info_r_time", "R Time", base.HEX) +f.battery_info_ave_i = ProtoField.float ("dji_spark_flyrec.battery_info_ave_i", "Ave I", base.DEC) +f.battery_info_vol_t = ProtoField.float ("dji_spark_flyrec.battery_info_vol_t", "Vol T", base.DEC) +f.battery_info_pack_ve = ProtoField.int32 ("dji_spark_flyrec.battery_info_pack_ve", "Pack Ve", base.DEC) +f.battery_info_i = ProtoField.int32 ("dji_spark_flyrec.battery_info_i", "I", base.DEC) +f.battery_info_r_cap = ProtoField.uint16 ("dji_spark_flyrec.battery_info_r_cap", "R Cap", base.HEX) +f.battery_info_cap_per = ProtoField.uint8 ("dji_spark_flyrec.battery_info_cap_per", "Cap Per", base.HEX) +f.battery_info_temp = ProtoField.int16 ("dji_spark_flyrec.battery_info_temp", "Temp", base.DEC) +f.battery_info_right = ProtoField.uint8 ("dji_spark_flyrec.battery_info_right", "Right", base.HEX) +f.battery_info_l_cell = ProtoField.uint16 ("dji_spark_flyrec.battery_info_l_cell", "L Cell", base.HEX) +f.battery_info_dyna_cnt = ProtoField.uint32 ("dji_spark_flyrec.battery_info_dyna_cnt", "Dyna Cnt", base.HEX) +f.battery_info_f_cap = ProtoField.uint32 ("dji_spark_flyrec.battery_info_f_cap", "F Cap", base.HEX) +f.battery_info_out_ctl = ProtoField.float ("dji_spark_flyrec.battery_info_out_ctl", "Out Ctl", base.DEC) +f.battery_info_out_ctl_f = ProtoField.float ("dji_spark_flyrec.battery_info_out_ctl_f", "Out Ctl F", base.DEC) + +local function flightrec_battery_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_info_ad_v, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_r_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_ave_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_vol_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_pack_ve, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_r_cap, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_cap_per, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_temp, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_right, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_l_cell, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_dyna_cnt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_f_cap, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_out_ctl, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_out_ctl_f, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 44) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Info: Payload size different than expected") end +end + +-- Flight log - Battery Status - 0x06af + +f.battery_status_not_ready = ProtoField.uint8 ("dji_spark_flyrec.battery_status_not_ready", "Not Ready", base.HEX) +f.battery_status_comm_err = ProtoField.uint8 ("dji_spark_flyrec.battery_status_comm_err", "Comm Err", base.HEX) +f.battery_status_first_auth = ProtoField.uint8 ("dji_spark_flyrec.battery_status_first_auth", "First Auth", base.HEX) +f.battery_status_auth_fail = ProtoField.uint8 ("dji_spark_flyrec.battery_status_auth_fail", "Auth Fail", base.HEX) +f.battery_status_need_re = ProtoField.uint8 ("dji_spark_flyrec.battery_status_need_re", "Need Re", base.HEX) +f.battery_status_volverylow = ProtoField.uint8 ("dji_spark_flyrec.battery_status_volverylow", "Volverylow", base.HEX) +f.battery_status_volnotsafe = ProtoField.uint8 ("dji_spark_flyrec.battery_status_volnotsafe", "Volnotsafe", base.HEX) +f.battery_status_vollevel1 = ProtoField.uint8 ("dji_spark_flyrec.battery_status_vollevel1", "Vollevel1", base.HEX) +f.battery_status_vollevel2 = ProtoField.uint8 ("dji_spark_flyrec.battery_status_vollevel2", "Vollevel2", base.HEX) +f.battery_status_caplevel1 = ProtoField.uint8 ("dji_spark_flyrec.battery_status_caplevel1", "Caplevel1", base.HEX) +f.battery_status_caplevel2 = ProtoField.uint8 ("dji_spark_flyrec.battery_status_caplevel2", "Caplevel2", base.HEX) +f.battery_status_smartcap1 = ProtoField.uint8 ("dji_spark_flyrec.battery_status_smartcap1", "Smartcap1", base.HEX) +f.battery_status_smartcap2 = ProtoField.uint8 ("dji_spark_flyrec.battery_status_smartcap2", "Smartcap2", base.HEX) +f.battery_status_d_flg = ProtoField.uint8 ("dji_spark_flyrec.battery_status_d_flg", "D Flg", base.HEX) +f.battery_status_ccsc = ProtoField.uint8 ("dji_spark_flyrec.battery_status_ccsc", "Ccsc", base.HEX) +f.battery_status_all = ProtoField.uint32 ("dji_spark_flyrec.battery_status_all", "All", base.HEX) + +local function flightrec_battery_status_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_status_not_ready, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_comm_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_first_auth, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_auth_fail, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_need_re, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_volverylow, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_volnotsafe, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_vollevel1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_vollevel2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_caplevel1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_caplevel2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_smartcap1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_smartcap2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_d_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_ccsc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_status_all, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 19) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Status: Payload size different than expected") end +end + +-- Flight log - Smart Battery Info - 0x06b0 + +f.smart_battery_info_go_home_cnt = ProtoField.uint8 ("dji_spark_flyrec.smart_battery_info_go_home_cnt", "Go Home Cnt", base.HEX) +f.smart_battery_info_go_home_cmd = ProtoField.uint8 ("dji_spark_flyrec.smart_battery_info_go_home_cmd", "Go Home Cmd", base.HEX) +f.smart_battery_info_gh_level = ProtoField.uint16 ("dji_spark_flyrec.smart_battery_info_gh_level", "Gh Level", base.HEX) +f.smart_battery_info_land_level = ProtoField.uint16 ("dji_spark_flyrec.smart_battery_info_land_level", "Land Level", base.HEX) +f.smart_battery_info_fly_t_for_gh = ProtoField.uint16 ("dji_spark_flyrec.smart_battery_info_fly_t_for_gh", "Fly T For Gh", base.HEX) +f.smart_battery_info_fly_t_for_land = ProtoField.uint16 ("dji_spark_flyrec.smart_battery_info_fly_t_for_land", "Fly T For Land", base.HEX) + +local function flightrec_smart_battery_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.smart_battery_info_go_home_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_go_home_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.smart_battery_info_gh_level, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_land_level, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_fly_t_for_gh, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.smart_battery_info_fly_t_for_land, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Smart Battery Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Smart Battery Info: Payload size different than expected") end +end + +-- Flight log - Statistical Info - 0x0708 + +f.statistical_info_distance = ProtoField.float ("dji_spark_flyrec.statistical_info_distance", "Distance", base.DEC) +f.statistical_info_m_starts = ProtoField.float ("dji_spark_flyrec.statistical_info_m_starts", "M Starts", base.DEC) + +local function flightrec_statistical_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.statistical_info_distance, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.statistical_info_m_starts, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Statistical Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Statistical Info: Payload size different than expected") end +end + +-- Flight log - Ns Sensor Quality - 0x2764 + +f.ns_sensor_quality_ns_mag_gain = ProtoField.uint16 ("dji_spark_flyrec.ns_sensor_quality_ns_mag_gain", "Ns Mag Gain", base.HEX) + +local function flightrec_ns_sensor_quality_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_sensor_quality_ns_mag_gain, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 2) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Sensor Quality: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Sensor Quality: Payload size different than expected") end +end + +-- Flight log - Ns Data Debug - 0x2765 + +f.ns_data_debug_d00 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d00", "D00", base.DEC) +f.ns_data_debug_d01 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d01", "D01", base.DEC) +f.ns_data_debug_d02 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d02", "D02", base.DEC) +f.ns_data_debug_d03 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d03", "D03", base.DEC) +f.ns_data_debug_d04 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d04", "D04", base.DEC) +f.ns_data_debug_d05 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d05", "D05", base.DEC) +f.ns_data_debug_d06 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d06", "D06", base.DEC) +f.ns_data_debug_d07 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d07", "D07", base.DEC) +f.ns_data_debug_d08 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d08", "D08", base.DEC) +f.ns_data_debug_d09 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d09", "D09", base.DEC) +f.ns_data_debug_d10 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d10", "D10", base.DEC) +f.ns_data_debug_d11 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d11", "D11", base.DEC) +f.ns_data_debug_d12 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d12", "D12", base.DEC) +f.ns_data_debug_d13 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d13", "D13", base.DEC) +f.ns_data_debug_d14 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d14", "D14", base.DEC) +f.ns_data_debug_d15 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d15", "D15", base.DEC) +f.ns_data_debug_d16 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d16", "D16", base.DEC) +f.ns_data_debug_d17 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d17", "D17", base.DEC) +f.ns_data_debug_d18 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d18", "D18", base.DEC) +f.ns_data_debug_d19 = ProtoField.float ("dji_spark_flyrec.ns_data_debug_d19", "D19", base.DEC) + +local function flightrec_ns_data_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_data_debug_d00, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d01, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d02, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d03, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d04, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d05, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d06, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d07, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d08, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d09, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d10, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d11, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d12, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d13, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d14, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d15, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d16, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d17, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d18, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_debug_d19, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 80) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Data Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Data Debug: Payload size different than expected") end +end + +-- Flight log - Ns Data Component - 0x2766 + +f.ns_data_component_ns_cmpnt = ProtoField.uint32 ("dji_spark_flyrec.ns_data_component_ns_cmpnt", "Ns Cmpnt", base.HEX) + +local function flightrec_ns_data_component_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_data_component_ns_cmpnt, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Data Component: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Data Component: Payload size different than expected") end +end + +-- Flight log - Ns Data Residuals - 0x2767 + +f.ns_data_residuals_gns_px = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_gns_px", "Gns Px", base.DEC) +f.ns_data_residuals_gns_py = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_gns_py", "Gns Py", base.DEC) +f.ns_data_residuals_gns_vx = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_gns_vx", "Gns Vx", base.DEC) +f.ns_data_residuals_gns_vy = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_gns_vy", "Gns Vy", base.DEC) +f.ns_data_residuals_gns_pz = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_gns_pz", "Gns Pz", base.DEC) +f.ns_data_residuals_gns_vz = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_gns_vz", "Gns Vz", base.DEC) +f.ns_data_residuals_vod_px = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_vod_px", "Vod Px", base.DEC) +f.ns_data_residuals_vod_py = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_vod_py", "Vod Py", base.DEC) +f.ns_data_residuals_vod_vx = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_vod_vx", "Vod Vx", base.DEC) +f.ns_data_residuals_vod_vy = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_vod_vy", "Vod Vy", base.DEC) +f.ns_data_residuals_vod_pz = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_vod_pz", "Vod Pz", base.DEC) +f.ns_data_residuals_vod_vz = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_vod_vz", "Vod Vz", base.DEC) +f.ns_data_residuals_rtk_px_p = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_px_p", "Rtk Px P", base.DEC) +f.ns_data_residuals_rtk_py_p = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_py_p", "Rtk Py P", base.DEC) +f.ns_data_residuals_rtk_px_s = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_px_s", "Rtk Px S", base.DEC) +f.ns_data_residuals_rtk_py_s = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_py_s", "Rtk Py S", base.DEC) +f.ns_data_residuals_rtk_vx = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_vx", "Rtk Vx", base.DEC) +f.ns_data_residuals_rtk_vy = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_vy", "Rtk Vy", base.DEC) +f.ns_data_residuals_rtk_pz_p = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_pz_p", "Rtk Pz P", base.DEC) +f.ns_data_residuals_rtk_pz_s = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_pz_s", "Rtk Pz S", base.DEC) +f.ns_data_residuals_rtk_vz = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_vz", "Rtk Vz", base.DEC) +f.ns_data_residuals_rtk_yaw = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_rtk_yaw", "Rtk Yaw", base.DEC) +f.ns_data_residuals_usn_pz = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_usn_pz", "Usn Pz", base.DEC) +f.ns_data_residuals_bar_pz = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_bar_pz", "Bar Pz", base.DEC) +f.ns_data_residuals_mag_yaw = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_mag_yaw", "Mag Yaw", base.DEC) +f.ns_data_residuals_vod_h = ProtoField.float ("dji_spark_flyrec.ns_data_residuals_vod_h", "Vod H", base.DEC) + +local function flightrec_ns_data_residuals_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_data_residuals_gns_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_vx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_vy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_gns_vz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_vx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_vy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_vz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_px_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_py_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_px_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_py_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_vx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_vy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_pz_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_pz_s, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_vz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_rtk_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_usn_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_bar_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_mag_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_residuals_vod_h, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 104) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Data Residuals: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Data Residuals: Payload size different than expected") end +end + +-- Flight log - Ns Data Posi Ofst - 0x2768 + +f.ns_data_posi_ofst_gns_px = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_gns_px", "Gns Px", base.DEC) +f.ns_data_posi_ofst_gns_py = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_gns_py", "Gns Py", base.DEC) +f.ns_data_posi_ofst_gns_pz = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_gns_pz", "Gns Pz", base.DEC) +f.ns_data_posi_ofst_vod_px = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_vod_px", "Vod Px", base.DEC) +f.ns_data_posi_ofst_vod_py = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_vod_py", "Vod Py", base.DEC) +f.ns_data_posi_ofst_vod_pz = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_vod_pz", "Vod Pz", base.DEC) +f.ns_data_posi_ofst_rtk_px_p = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_rtk_px_p", "Rtk Px P", base.DEC) +f.ns_data_posi_ofst_rtk_py_p = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_rtk_py_p", "Rtk Py P", base.DEC) +f.ns_data_posi_ofst_rtk_px = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_rtk_px", "Rtk Px", base.DEC) +f.ns_data_posi_ofst_rtk_py = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_rtk_py", "Rtk Py", base.DEC) +f.ns_data_posi_ofst_rtk_pz_p = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_rtk_pz_p", "Rtk Pz P", base.DEC) +f.ns_data_posi_ofst_rtk_pz = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_rtk_pz", "Rtk Pz", base.DEC) +f.ns_data_posi_ofst_rtk_y = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_rtk_y", "Rtk Y", base.DEC) +f.ns_data_posi_ofst_usn_pz = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_usn_pz", "Usn Pz", base.DEC) +f.ns_data_posi_ofst_bar_pz = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_bar_pz", "Bar Pz", base.DEC) +f.ns_data_posi_ofst_mag_y = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_mag_y", "Mag Y", base.DEC) +f.ns_data_posi_ofst_vod_h = ProtoField.float ("dji_spark_flyrec.ns_data_posi_ofst_vod_h", "Vod H", base.DEC) + +local function flightrec_ns_data_posi_ofst_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_data_posi_ofst_gns_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_gns_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_gns_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_vod_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_vod_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_vod_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_px_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_py_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_px, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_py, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_pz_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_rtk_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_usn_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_bar_pz, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_mag_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ns_data_posi_ofst_vod_h, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 68) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Data Posi Ofst: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Data Posi Ofst: Payload size different than expected") end +end + +-- Flight log - Ns Sensor Connect - 0x2769 + +f.ns_sensor_connect_ns_ss_cnnct = ProtoField.uint32 ("dji_spark_flyrec.ns_sensor_connect_ns_ss_cnnct", "Ns Ss Cnnct", base.HEX) + +local function flightrec_ns_sensor_connect_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ns_sensor_connect_ns_ss_cnnct, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ns Sensor Connect: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ns Sensor Connect: Payload size different than expected") end +end + +-- Flight log - Esc Data - 0x276a + +f.esc_data_status1 = ProtoField.uint8 ("dji_spark_flyrec.esc_data_status1", "Status1", base.HEX) +f.esc_data_i_1 = ProtoField.int16 ("dji_spark_flyrec.esc_data_i_1", "I 1", base.DEC) +f.esc_data_speed_1 = ProtoField.int16 ("dji_spark_flyrec.esc_data_speed_1", "Speed 1", base.DEC) +f.esc_data_v_1 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_1", "V 1", base.HEX) +f.esc_data_temp_1 = ProtoField.int16 ("dji_spark_flyrec.esc_data_temp_1", "Temp 1", base.DEC) +f.esc_data_ppm_recv_1 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_recv_1", "Ppm Recv 1", base.HEX) +f.esc_data_v_out_1 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_out_1", "V Out 1", base.HEX) +f.esc_data_debug0_1 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_debug0_1", "Debug0 1", base.HEX) +f.esc_data_debug1_1 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug1_1", "Debug1 1", base.DEC) +f.esc_data_debug2_1 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug2_1", "Debug2 1", base.DEC) +f.esc_data_ppm_send_1 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_send_1", "Ppm Send 1", base.HEX) +f.esc_data_cnt_1 = ProtoField.int16 ("dji_spark_flyrec.esc_data_cnt_1", "Cnt 1", base.DEC) +f.esc_data_status_2 = ProtoField.uint8 ("dji_spark_flyrec.esc_data_status_2", "Status 2", base.HEX) +f.esc_data_i_2 = ProtoField.int16 ("dji_spark_flyrec.esc_data_i_2", "I 2", base.DEC) +f.esc_data_speed_2 = ProtoField.int16 ("dji_spark_flyrec.esc_data_speed_2", "Speed 2", base.DEC) +f.esc_data_v_2 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_2", "V 2", base.HEX) +f.esc_data_temp_2 = ProtoField.int16 ("dji_spark_flyrec.esc_data_temp_2", "Temp 2", base.DEC) +f.esc_data_ppm_recv_2 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_recv_2", "Ppm Recv 2", base.HEX) +f.esc_data_v_out_2 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_out_2", "V Out 2", base.HEX) +f.esc_data_debug0_2 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_debug0_2", "Debug0 2", base.HEX) +f.esc_data_debug1_2 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug1_2", "Debug1 2", base.DEC) +f.esc_data_debug2_2 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug2_2", "Debug2 2", base.DEC) +f.esc_data_ppm_send_2 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_send_2", "Ppm Send 2", base.HEX) +f.esc_data_cnt_2 = ProtoField.int16 ("dji_spark_flyrec.esc_data_cnt_2", "Cnt 2", base.DEC) +f.esc_data_status_3 = ProtoField.uint8 ("dji_spark_flyrec.esc_data_status_3", "Status 3", base.HEX) +f.esc_data_i_3 = ProtoField.int16 ("dji_spark_flyrec.esc_data_i_3", "I 3", base.DEC) +f.esc_data_speed_3 = ProtoField.int16 ("dji_spark_flyrec.esc_data_speed_3", "Speed 3", base.DEC) +f.esc_data_v_3 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_3", "V 3", base.HEX) +f.esc_data_temp_3 = ProtoField.int16 ("dji_spark_flyrec.esc_data_temp_3", "Temp 3", base.DEC) +f.esc_data_ppm_recv_3 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_recv_3", "Ppm Recv 3", base.HEX) +f.esc_data_v_out_3 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_out_3", "V Out 3", base.HEX) +f.esc_data_debug0_3 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_debug0_3", "Debug0 3", base.HEX) +f.esc_data_debug1_3 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug1_3", "Debug1 3", base.DEC) +f.esc_data_debug2_3 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug2_3", "Debug2 3", base.DEC) +f.esc_data_ppm_send_3 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_send_3", "Ppm Send 3", base.HEX) +f.esc_data_cnt_3 = ProtoField.int16 ("dji_spark_flyrec.esc_data_cnt_3", "Cnt 3", base.DEC) +f.esc_data_status_4 = ProtoField.uint8 ("dji_spark_flyrec.esc_data_status_4", "Status 4", base.HEX) +f.esc_data_i_4 = ProtoField.int16 ("dji_spark_flyrec.esc_data_i_4", "I 4", base.DEC) +f.esc_data_speed_4 = ProtoField.int16 ("dji_spark_flyrec.esc_data_speed_4", "Speed 4", base.DEC) +f.esc_data_v_4 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_4", "V 4", base.HEX) +f.esc_data_temp_4 = ProtoField.int16 ("dji_spark_flyrec.esc_data_temp_4", "Temp 4", base.DEC) +f.esc_data_ppm_recv_4 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_recv_4", "Ppm Recv 4", base.HEX) +f.esc_data_v_out_4 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_out_4", "V Out 4", base.HEX) +f.esc_data_debug0_4 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_debug0_4", "Debug0 4", base.HEX) +f.esc_data_debug1_4 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug1_4", "Debug1 4", base.DEC) +f.esc_data_debug2_4 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug2_4", "Debug2 4", base.DEC) +f.esc_data_ppm_send_4 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_send_4", "Ppm Send 4", base.HEX) +f.esc_data_cnt_4 = ProtoField.int16 ("dji_spark_flyrec.esc_data_cnt_4", "Cnt 4", base.DEC) +f.esc_data_status_5 = ProtoField.uint8 ("dji_spark_flyrec.esc_data_status_5", "Status 5", base.HEX) +f.esc_data_i_5 = ProtoField.int16 ("dji_spark_flyrec.esc_data_i_5", "I 5", base.DEC) +f.esc_data_speed_5 = ProtoField.int16 ("dji_spark_flyrec.esc_data_speed_5", "Speed 5", base.DEC) +f.esc_data_v_5 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_5", "V 5", base.HEX) +f.esc_data_temp_5 = ProtoField.int16 ("dji_spark_flyrec.esc_data_temp_5", "Temp 5", base.DEC) +f.esc_data_ppm_recv_5 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_recv_5", "Ppm Recv 5", base.HEX) +f.esc_data_v_out_5 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_out_5", "V Out 5", base.HEX) +f.esc_data_debug0_5 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_debug0_5", "Debug0 5", base.HEX) +f.esc_data_debug1_5 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug1_5", "Debug1 5", base.DEC) +f.esc_data_debug2_5 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug2_5", "Debug2 5", base.DEC) +f.esc_data_ppm_send = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_send", "Ppm Send", base.HEX) +f.esc_data_cnt_5 = ProtoField.int16 ("dji_spark_flyrec.esc_data_cnt_5", "Cnt 5", base.DEC) +f.esc_data_status_6 = ProtoField.uint8 ("dji_spark_flyrec.esc_data_status_6", "Status 6", base.HEX) +f.esc_data_i_6 = ProtoField.int16 ("dji_spark_flyrec.esc_data_i_6", "I 6", base.DEC) +f.esc_data_speed_6 = ProtoField.int16 ("dji_spark_flyrec.esc_data_speed_6", "Speed 6", base.DEC) +f.esc_data_v_6 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_6", "V 6", base.HEX) +f.esc_data_temp_6 = ProtoField.int16 ("dji_spark_flyrec.esc_data_temp_6", "Temp 6", base.DEC) +f.esc_data_ppm_recv_6 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_recv_6", "Ppm Recv 6", base.HEX) +f.esc_data_v_out_6 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_out_6", "V Out 6", base.HEX) +f.esc_data_debug0_6 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_debug0_6", "Debug0 6", base.HEX) +f.esc_data_debug1_6 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug1_6", "Debug1 6", base.DEC) +f.esc_data_debug2_6 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug2_6", "Debug2 6", base.DEC) +f.esc_data_ppm_send_6 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_send_6", "Ppm Send 6", base.HEX) +f.esc_data_cnt_6 = ProtoField.int16 ("dji_spark_flyrec.esc_data_cnt_6", "Cnt 6", base.DEC) +f.esc_data_status_7 = ProtoField.uint8 ("dji_spark_flyrec.esc_data_status_7", "Status 7", base.HEX) +f.esc_data_i_7 = ProtoField.int16 ("dji_spark_flyrec.esc_data_i_7", "I 7", base.DEC) +f.esc_data_speed_7 = ProtoField.int16 ("dji_spark_flyrec.esc_data_speed_7", "Speed 7", base.DEC) +f.esc_data_v_7 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_7", "V 7", base.HEX) +f.esc_data_temp_7 = ProtoField.int16 ("dji_spark_flyrec.esc_data_temp_7", "Temp 7", base.DEC) +f.esc_data_ppm_recv_7 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_recv_7", "Ppm Recv 7", base.HEX) +f.esc_data_v_out_7 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_out_7", "V Out 7", base.HEX) +f.esc_data_debug0_7 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_debug0_7", "Debug0 7", base.HEX) +f.esc_data_debug1_7 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug1_7", "Debug1 7", base.DEC) +f.esc_data_debug2_7 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug2_7", "Debug2 7", base.DEC) +f.esc_data_ppm_send_7 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_send_7", "Ppm Send 7", base.HEX) +f.esc_data_cnt_7 = ProtoField.int16 ("dji_spark_flyrec.esc_data_cnt_7", "Cnt 7", base.DEC) +f.esc_data_status_8 = ProtoField.uint8 ("dji_spark_flyrec.esc_data_status_8", "Status 8", base.HEX) +f.esc_data_i_8 = ProtoField.int16 ("dji_spark_flyrec.esc_data_i_8", "I 8", base.DEC) +f.esc_data_speed_8 = ProtoField.int16 ("dji_spark_flyrec.esc_data_speed_8", "Speed 8", base.DEC) +f.esc_data_v_8 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_8", "V 8", base.HEX) +f.esc_data_temp_8 = ProtoField.int16 ("dji_spark_flyrec.esc_data_temp_8", "Temp 8", base.DEC) +f.esc_data_ppm_recv_8 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_recv_8", "Ppm Recv 8", base.HEX) +f.esc_data_v_out_8 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_v_out_8", "V Out 8", base.HEX) +f.esc_data_debug0_8 = ProtoField.uint16 ("dji_spark_flyrec.esc_data_debug0_8", "Debug0 8", base.HEX) +f.esc_data_debug1_8 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug1_8", "Debug1 8", base.DEC) +f.esc_data_debug2_8 = ProtoField.int16 ("dji_spark_flyrec.esc_data_debug2_8", "Debug2 8", base.DEC) +f.esc_data_ppm_send = ProtoField.uint16 ("dji_spark_flyrec.esc_data_ppm_send", "Ppm Send", base.HEX) +f.esc_data_cnt_8 = ProtoField.int16 ("dji_spark_flyrec.esc_data_cnt_8", "Cnt 8", base.DEC) +f.esc_data_ppm_mode = ProtoField.uint8 ("dji_spark_flyrec.esc_data_ppm_mode", "Ppm Mode", base.HEX) + +local function flightrec_esc_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.esc_data_status1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_status_8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.esc_data_i_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_speed_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_temp_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_recv_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_v_out_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug0_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug1_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_debug2_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_send, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_cnt_8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.esc_data_ppm_mode, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 185) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Esc Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Esc Data: Payload size different than expected") end +end + +-- Flight log - High Freq Gyro Data 0 - 0x276b + +f.high_freq_gyro_data_0_w_x0 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_0_w_x0", "W X0", base.DEC) +f.high_freq_gyro_data_0_w_y0 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_0_w_y0", "W Y0", base.DEC) +f.high_freq_gyro_data_0_w_z0 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_0_w_z0", "W Z0", base.DEC) +f.high_freq_gyro_data_0_cnt0 = ProtoField.uint16 ("dji_spark_flyrec.high_freq_gyro_data_0_cnt0", "Cnt0", base.HEX) + +local function flightrec_high_freq_gyro_data_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.high_freq_gyro_data_0_w_x0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_0_w_y0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_0_w_z0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_0_cnt0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"High Freq Gyro Data 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"High Freq Gyro Data 0: Payload size different than expected") end +end + +-- Flight log - High Freq Gyro Data 1 - 0x276c + +f.high_freq_gyro_data_1_w_x1 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_1_w_x1", "W X1", base.DEC) +f.high_freq_gyro_data_1_w_y1 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_1_w_y1", "W Y1", base.DEC) +f.high_freq_gyro_data_1_w_z1 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_1_w_z1", "W Z1", base.DEC) +f.high_freq_gyro_data_1_cnt1 = ProtoField.uint16 ("dji_spark_flyrec.high_freq_gyro_data_1_cnt1", "Cnt1", base.HEX) + +local function flightrec_high_freq_gyro_data_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.high_freq_gyro_data_1_w_x1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_1_w_y1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_1_w_z1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_1_cnt1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"High Freq Gyro Data 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"High Freq Gyro Data 1: Payload size different than expected") end +end + +-- Flight log - High Freq Gyro Data 2 - 0x276d + +f.high_freq_gyro_data_2_w_x2 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_2_w_x2", "W X2", base.DEC) +f.high_freq_gyro_data_2_w_y2 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_2_w_y2", "W Y2", base.DEC) +f.high_freq_gyro_data_2_w_z2 = ProtoField.int16 ("dji_spark_flyrec.high_freq_gyro_data_2_w_z2", "W Z2", base.DEC) +f.high_freq_gyro_data_2_cnt2 = ProtoField.uint16 ("dji_spark_flyrec.high_freq_gyro_data_2_cnt2", "Cnt2", base.HEX) + +local function flightrec_high_freq_gyro_data_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.high_freq_gyro_data_2_w_x2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_2_w_y2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_2_w_z2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.high_freq_gyro_data_2_cnt2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"High Freq Gyro Data 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"High Freq Gyro Data 2: Payload size different than expected") end +end + +-- Flight log - Rc Gps Data - 0x276e + +f.rc_gps_data_hour = ProtoField.uint8 ("dji_spark_flyrec.rc_gps_data_hour", "Hour", base.HEX) +f.rc_gps_data_min = ProtoField.uint8 ("dji_spark_flyrec.rc_gps_data_min", "Min", base.HEX) +f.rc_gps_data_sec = ProtoField.uint8 ("dji_spark_flyrec.rc_gps_data_sec", "Sec", base.HEX) +f.rc_gps_data_year = ProtoField.uint16 ("dji_spark_flyrec.rc_gps_data_year", "Year", base.HEX) +f.rc_gps_data_month = ProtoField.uint8 ("dji_spark_flyrec.rc_gps_data_month", "Month", base.HEX) +f.rc_gps_data_day = ProtoField.uint8 ("dji_spark_flyrec.rc_gps_data_day", "Day", base.HEX) +f.rc_gps_data_longtitude = ProtoField.int32 ("dji_spark_flyrec.rc_gps_data_longtitude", "Longtitude", base.DEC) +f.rc_gps_data_latitude = ProtoField.int32 ("dji_spark_flyrec.rc_gps_data_latitude", "Latitude", base.DEC) +f.rc_gps_data_xv = ProtoField.uint32 ("dji_spark_flyrec.rc_gps_data_xv", "Xv", base.HEX) +f.rc_gps_data_yv = ProtoField.uint32 ("dji_spark_flyrec.rc_gps_data_yv", "Yv", base.HEX) +f.rc_gps_data_gps_num = ProtoField.uint8 ("dji_spark_flyrec.rc_gps_data_gps_num", "Gps Num", base.HEX) +f.rc_gps_data_f_scale = ProtoField.float ("dji_spark_flyrec.rc_gps_data_f_scale", "F Scale", base.DEC) +f.rc_gps_data_gps_state = ProtoField.int16 ("dji_spark_flyrec.rc_gps_data_gps_state", "Gps State", base.DEC) + +local function flightrec_rc_gps_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_gps_data_hour, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_min, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_sec, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_year, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_gps_data_month, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_day, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_longtitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_latitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_xv, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_yv, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_gps_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_gps_data_f_scale, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.rc_gps_data_gps_state, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Gps Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Gps Data: Payload size different than expected") end +end + +-- Flight log - Cb Temp - 0x2771 + +f.cb_temp_data = ProtoField.int32 ("dji_spark_flyrec.cb_temp_data", "Data", base.DEC) +f.cb_temp_cnt = ProtoField.uint16 ("dji_spark_flyrec.cb_temp_cnt", "Cnt", base.HEX) + +local function flightrec_cb_temp_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cb_temp_data, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.cb_temp_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cb Temp: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cb Temp: Payload size different than expected") end +end + +-- Flight log - Cb Press - 0x2772 + +f.cb_press_press = ProtoField.double ("dji_spark_flyrec.cb_press_press", "Press", base.DEC) +f.cb_press_temp = ProtoField.double ("dji_spark_flyrec.cb_press_temp", "Temp", base.DEC) + +local function flightrec_cb_press_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.cb_press_press, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.cb_press_temp, payload(offset, 8)) + offset = offset + 8 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Cb Press: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Cb Press: Payload size different than expected") end +end + +-- Flight log - Air Compensate Data - 0x2774 + +f.air_compensate_data_air_vbx = ProtoField.float ("dji_spark_flyrec.air_compensate_data_air_vbx", "Air Vbx", base.DEC) +f.air_compensate_data_air_vby = ProtoField.float ("dji_spark_flyrec.air_compensate_data_air_vby", "Air Vby", base.DEC) +f.air_compensate_data_comp_alti = ProtoField.float ("dji_spark_flyrec.air_compensate_data_comp_alti", "Comp Alti", base.DEC) +f.air_compensate_data_wind_spd = ProtoField.float ("dji_spark_flyrec.air_compensate_data_wind_spd", "Wind Spd", base.DEC) +f.air_compensate_data_wind_x = ProtoField.float ("dji_spark_flyrec.air_compensate_data_wind_x", "Wind X", base.DEC) +f.air_compensate_data_wind_y = ProtoField.float ("dji_spark_flyrec.air_compensate_data_wind_y", "Wind Y", base.DEC) +f.air_compensate_data_motorspd = ProtoField.float ("dji_spark_flyrec.air_compensate_data_motorspd", "Motorspd", base.DEC) +f.air_compensate_data_vel_level = ProtoField.uint8 ("dji_spark_flyrec.air_compensate_data_vel_level", "Vel Level", base.HEX) + +local function flightrec_air_compensate_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.air_compensate_data_air_vbx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_air_vby, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_comp_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_wind_spd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_wind_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_wind_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_motorspd, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.air_compensate_data_vel_level, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 29) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Air Compensate Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Air Compensate Data: Payload size different than expected") end +end + +-- Flight log - Vision Tof - 0x2775 + +f.vision_tof_s_f = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s_f", "S F", base.HEX) +f.vision_tof_s00_dis = ProtoField.uint16 ("dji_spark_flyrec.vision_tof_s00_dis", "S00 Dis", base.HEX) +f.vision_tof_s00_t = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s00_t", "S00 T", base.HEX) +f.vision_tof_s00_f = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s00_f", "S00 F", base.HEX) +f.vision_tof_s00_cnt = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s00_cnt", "S00 Cnt", base.HEX) +f.vision_tof_s01_dis = ProtoField.uint16 ("dji_spark_flyrec.vision_tof_s01_dis", "S01 Dis", base.HEX) +f.vision_tof_s01_t = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s01_t", "S01 T", base.HEX) +f.vision_tof_s01_f = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s01_f", "S01 F", base.HEX) +f.vision_tof_s01_cnt = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s01_cnt", "S01 Cnt", base.HEX) +f.vision_tof_s02_dis = ProtoField.uint16 ("dji_spark_flyrec.vision_tof_s02_dis", "S02 Dis", base.HEX) +f.vision_tof_s02_t = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s02_t", "S02 T", base.HEX) +f.vision_tof_s02_f = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s02_f", "S02 F", base.HEX) +f.vision_tof_s02_cnt = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s02_cnt", "S02 Cnt", base.HEX) +f.vision_tof_s03_dis = ProtoField.uint16 ("dji_spark_flyrec.vision_tof_s03_dis", "S03 Dis", base.HEX) +f.vision_tof_s03_t = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s03_t", "S03 T", base.HEX) +f.vision_tof_s03_f = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s03_f", "S03 F", base.HEX) +f.vision_tof_s03_cnt = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s03_cnt", "S03 Cnt", base.HEX) +f.vision_tof_s04_dis = ProtoField.uint16 ("dji_spark_flyrec.vision_tof_s04_dis", "S04 Dis", base.HEX) +f.vision_tof_s04_t = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s04_t", "S04 T", base.HEX) +f.vision_tof_s04_f = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s04_f", "S04 F", base.HEX) +f.vision_tof_s04_cnt = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s04_cnt", "S04 Cnt", base.HEX) +f.vision_tof_s05_dis = ProtoField.uint16 ("dji_spark_flyrec.vision_tof_s05_dis", "S05 Dis", base.HEX) +f.vision_tof_s05_t = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s05_t", "S05 T", base.HEX) +f.vision_tof_s05_f = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s05_f", "S05 F", base.HEX) +f.vision_tof_s05_cnt = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_s05_cnt", "S05 Cnt", base.HEX) +f.vision_tof_cnt = ProtoField.uint8 ("dji_spark_flyrec.vision_tof_cnt", "Cnt", base.HEX) + +local function flightrec_vision_tof_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.vision_tof_s_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s00_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s00_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s00_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s00_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s01_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s01_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s01_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s01_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s02_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s02_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s02_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s02_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s03_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s03_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s03_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s03_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s04_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s04_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s04_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s04_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s05_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vision_tof_s05_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s05_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_s05_cnt, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vision_tof_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 32) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Vision Tof: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Vision Tof: Payload size different than expected") end +end + +-- Flight log - Gs Rtk Data - 0x2776 + +f.gs_rtk_data_hrz_lati = ProtoField.double ("dji_spark_flyrec.gs_rtk_data_hrz_lati", "Hrz Lati", base.DEC) +f.gs_rtk_data_hrz_long = ProtoField.double ("dji_spark_flyrec.gs_rtk_data_hrz_long", "Hrz Long", base.DEC) +f.gs_rtk_data_vert_pos = ProtoField.float ("dji_spark_flyrec.gs_rtk_data_vert_pos", "Vert Pos", base.DEC) +f.gs_rtk_data_hrz_f = ProtoField.uint8 ("dji_spark_flyrec.gs_rtk_data_hrz_f", "Hrz F", base.HEX) +f.gs_rtk_data_vert_f = ProtoField.uint8 ("dji_spark_flyrec.gs_rtk_data_vert_f", "Vert F", base.HEX) +f.gs_rtk_data_miss_hrz_la = ProtoField.double ("dji_spark_flyrec.gs_rtk_data_miss_hrz_la", "Miss Hrz La", base.DEC) +f.gs_rtk_data_miss_hrz_lo = ProtoField.double ("dji_spark_flyrec.gs_rtk_data_miss_hrz_lo", "Miss Hrz Lo", base.DEC) +f.gs_rtk_data_miss_vert_p = ProtoField.float ("dji_spark_flyrec.gs_rtk_data_miss_vert_p", "Miss Vert P", base.DEC) +f.gs_rtk_data_miss_use_rtk = ProtoField.uint8 ("dji_spark_flyrec.gs_rtk_data_miss_use_rtk", "Miss Use Rtk", base.HEX) +f.gs_rtk_data_hrz_off0 = ProtoField.float ("dji_spark_flyrec.gs_rtk_data_hrz_off0", "Hrz Off0", base.DEC) +f.gs_rtk_data_hrz_off1 = ProtoField.float ("dji_spark_flyrec.gs_rtk_data_hrz_off1", "Hrz Off1", base.DEC) +f.gs_rtk_data_vert_off = ProtoField.float ("dji_spark_flyrec.gs_rtk_data_vert_off", "Vert Off", base.DEC) +f.gs_rtk_data_to_alti = ProtoField.float ("dji_spark_flyrec.gs_rtk_data_to_alti", "To Alti", base.DEC) +f.gs_rtk_data_r_to_al = ProtoField.float ("dji_spark_flyrec.gs_rtk_data_r_to_al", "R To Al", base.DEC) +f.gs_rtk_data_r_to_al_f = ProtoField.uint8 ("dji_spark_flyrec.gs_rtk_data_r_to_al_f", "R To Al F", base.HEX) +f.gs_rtk_data_r_cnct = ProtoField.uint8 ("dji_spark_flyrec.gs_rtk_data_r_cnct", "R Cnct", base.HEX) +f.gs_rtk_data_sim_mvo_f = ProtoField.uint16 ("dji_spark_flyrec.gs_rtk_data_sim_mvo_f", "Sim Mvo F", base.HEX) + +local function flightrec_gs_rtk_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gs_rtk_data_hrz_lati, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gs_rtk_data_hrz_long, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gs_rtk_data_vert_pos, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_hrz_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_vert_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_miss_hrz_la, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gs_rtk_data_miss_hrz_lo, payload(offset, 8)) + offset = offset + 8 + + subtree:add_le (f.gs_rtk_data_miss_vert_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_miss_use_rtk, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_hrz_off0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_hrz_off1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_vert_off, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_to_alti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_r_to_al, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gs_rtk_data_r_to_al_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_r_cnct, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gs_rtk_data_sim_mvo_f, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 67) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gs Rtk Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gs Rtk Data: Payload size different than expected") end +end + +-- Flight log - Ex Raw Baro1 - 0x2777 + +f.ex_raw_baro1_press = ProtoField.float ("dji_spark_flyrec.ex_raw_baro1_press", "Press", base.DEC) +f.ex_raw_baro1_temp = ProtoField.float ("dji_spark_flyrec.ex_raw_baro1_temp", "Temp", base.DEC) + +local function flightrec_ex_raw_baro1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ex_raw_baro1_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ex_raw_baro1_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ex Raw Baro1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ex Raw Baro1: Payload size different than expected") end +end + +-- Flight log - Ex Raw Baro2 - 0x2778 + +f.ex_raw_baro2_press = ProtoField.float ("dji_spark_flyrec.ex_raw_baro2_press", "Press", base.DEC) +f.ex_raw_baro2_temp = ProtoField.float ("dji_spark_flyrec.ex_raw_baro2_temp", "Temp", base.DEC) + +local function flightrec_ex_raw_baro2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ex_raw_baro2_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ex_raw_baro2_temp, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ex Raw Baro2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ex Raw Baro2: Payload size different than expected") end +end + +-- Flight log - Ex Raw Compass - 0x2779 + +f.ex_raw_compass_x = ProtoField.int16 ("dji_spark_flyrec.ex_raw_compass_x", "X", base.DEC) +f.ex_raw_compass_y = ProtoField.int16 ("dji_spark_flyrec.ex_raw_compass_y", "Y", base.DEC) +f.ex_raw_compass_z = ProtoField.int16 ("dji_spark_flyrec.ex_raw_compass_z", "Z", base.DEC) +f.ex_raw_compass_cnt = ProtoField.uint16 ("dji_spark_flyrec.ex_raw_compass_cnt", "Cnt", base.HEX) + +local function flightrec_ex_raw_compass_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ex_raw_compass_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ex_raw_compass_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ex_raw_compass_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.ex_raw_compass_cnt, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ex Raw Compass: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ex Raw Compass: Payload size different than expected") end +end + +-- Flight log - Gear Status - 0x27d8 + +f.gear_status_gr_mode = ProtoField.uint8 ("dji_spark_flyrec.gear_status_gr_mode", "Gr Mode", base.HEX) +f.gear_status_gr_sta = ProtoField.uint8 ("dji_spark_flyrec.gear_status_gr_sta", "Gr Sta", base.HEX) +f.gear_status_gr_cmd = ProtoField.uint8 ("dji_spark_flyrec.gear_status_gr_cmd", "Gr Cmd", base.HEX) +f.gear_status_gr_wk_f = ProtoField.uint8 ("dji_spark_flyrec.gear_status_gr_wk_f", "Gr Wk F", base.HEX) +f.gear_status_nt_safe2ld = ProtoField.uint8 ("dji_spark_flyrec.gear_status_nt_safe2ld", "Nt Safe2Ld", base.HEX) +f.gear_status_gr_sh_unab = ProtoField.uint32 ("dji_spark_flyrec.gear_status_gr_sh_unab", "Gr Sh Unab", base.HEX) +f.gear_status_gr_sh_t = ProtoField.float ("dji_spark_flyrec.gear_status_gr_sh_t", "Gr Sh T", base.DEC) +f.gear_status_gr_sh_req = ProtoField.uint8 ("dji_spark_flyrec.gear_status_gr_sh_req", "Gr Sh Req", base.HEX) + +local function flightrec_gear_status_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gear_status_gr_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_gr_sta, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_gr_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_gr_wk_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_nt_safe2ld, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.gear_status_gr_sh_unab, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gear_status_gr_sh_t, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gear_status_gr_sh_req, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 14) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gear Status: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gear Status: Payload size different than expected") end +end + +-- Flight log - Radar Bottom - 0x4ef2 + +f.radar_bottom_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_bottom_dis", "Dis", base.HEX) +f.radar_bottom_fix_agl = ProtoField.uint16 ("dji_spark_flyrec.radar_bottom_fix_agl", "Fix Agl", base.HEX) +f.radar_bottom_raw_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_bottom_raw_dis", "Raw Dis", base.HEX) +f.radar_bottom_valid_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_bottom_valid_flg", "Valid Flg", base.HEX) +f.radar_bottom_type = ProtoField.uint8 ("dji_spark_flyrec.radar_bottom_type", "Type", base.HEX) +f.radar_bottom_health_flag = ProtoField.uint8 ("dji_spark_flyrec.radar_bottom_health_flag", "Health Flag", base.HEX) +f.radar_bottom_cnt = ProtoField.uint8 ("dji_spark_flyrec.radar_bottom_cnt", "Cnt", base.HEX) + +local function flightrec_radar_bottom_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_bottom_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_bottom_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_bottom_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_bottom_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_bottom_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_bottom_health_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_bottom_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Bottom: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Bottom: Payload size different than expected") end +end + +-- Flight log - Radar Avoid Front - 0x4ef3 + +f.radar_avoid_front_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_avoid_front_dis", "Dis", base.HEX) +f.radar_avoid_front_fix_agl = ProtoField.uint16 ("dji_spark_flyrec.radar_avoid_front_fix_agl", "Fix Agl", base.HEX) +f.radar_avoid_front_raw_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_avoid_front_raw_dis", "Raw Dis", base.HEX) +f.radar_avoid_front_valid_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_valid_flg", "Valid Flg", base.HEX) +f.radar_avoid_front_stop_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_stop_flg", "Stop Flg", base.HEX) +f.radar_avoid_front_work_flag = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_work_flag", "Work Flag", base.HEX) +f.radar_avoid_front_near_px = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_near_px", "Near Px", base.HEX) +f.radar_avoid_front_near_py = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_near_py", "Near Py", base.HEX) +f.radar_avoid_front_pm_px = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_pm_px", "Pm Px", base.HEX) +f.radar_avoid_front_pm_py = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_pm_py", "Pm Py", base.HEX) +f.radar_avoid_front_cur_direciton = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_cur_direciton", "Cur Direciton", base.HEX) +f.radar_avoid_front_gimbal_status = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_gimbal_status", "Gimbal Status", base.HEX) +f.radar_avoid_front_not_connet_flag = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_not_connet_flag", "Not Connet Flag", base.HEX) +f.radar_avoid_front_func_en = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_func_en", "Func En", base.HEX) +f.radar_avoid_front_f_stop_flag = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_f_stop_flag", "F Stop Flag", base.HEX) +f.radar_avoid_front_cnt = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_front_cnt", "Cnt", base.HEX) + +local function flightrec_radar_avoid_front_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_avoid_front_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_front_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_front_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_front_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_stop_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_work_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_near_px, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_near_py, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_pm_px, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_pm_py, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_cur_direciton, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_gimbal_status, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_not_connet_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_func_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_f_stop_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_front_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 19) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Avoid Front: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Avoid Front: Payload size different than expected") end +end + +-- Flight log - Radar Avoid Back - 0x4ef4 + +f.radar_avoid_back_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_avoid_back_dis", "Dis", base.HEX) +f.radar_avoid_back_fix_agl = ProtoField.uint16 ("dji_spark_flyrec.radar_avoid_back_fix_agl", "Fix Agl", base.HEX) +f.radar_avoid_back_raw_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_avoid_back_raw_dis", "Raw Dis", base.HEX) +f.radar_avoid_back_valid_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_valid_flg", "Valid Flg", base.HEX) +f.radar_avoid_back_type = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_type", "Type", base.HEX) +f.radar_avoid_back_stop_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_stop_flg", "Stop Flg", base.HEX) +f.radar_avoid_back_near_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_near_flg", "Near Flg", base.HEX) +f.radar_avoid_back_max_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_max_flg", "Max Flg", base.HEX) +f.radar_avoid_back_near_px = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_near_px", "Near Px", base.HEX) +f.radar_avoid_back_near_py = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_near_py", "Near Py", base.HEX) +f.radar_avoid_back_pm_px = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_pm_px", "Pm Px", base.HEX) +f.radar_avoid_back_pm_py = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_pm_py", "Pm Py", base.HEX) +f.radar_avoid_back_cnt = ProtoField.uint8 ("dji_spark_flyrec.radar_avoid_back_cnt", "Cnt", base.HEX) + +local function flightrec_radar_avoid_back_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_avoid_back_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_back_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_back_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_avoid_back_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_stop_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_near_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_max_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_near_px, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_near_py, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_pm_px, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_pm_py, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_avoid_back_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 16) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Avoid Back: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Avoid Back: Payload size different than expected") end +end + +-- Flight log - Radar Predict Front - 0x4ef5 + +f.radar_predict_front_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_predict_front_dis", "Dis", base.HEX) +f.radar_predict_front_fix_agl = ProtoField.uint16 ("dji_spark_flyrec.radar_predict_front_fix_agl", "Fix Agl", base.HEX) +f.radar_predict_front_raw_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_predict_front_raw_dis", "Raw Dis", base.HEX) +f.radar_predict_front_valid_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_predict_front_valid_flg", "Valid Flg", base.HEX) +f.radar_predict_front_type = ProtoField.uint8 ("dji_spark_flyrec.radar_predict_front_type", "Type", base.HEX) +f.radar_predict_front_raw_ok_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_predict_front_raw_ok_flg", "Raw Ok Flg", base.HEX) +f.radar_predict_front_cnt = ProtoField.uint8 ("dji_spark_flyrec.radar_predict_front_cnt", "Cnt", base.HEX) + +local function flightrec_radar_predict_front_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_predict_front_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_front_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_front_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_front_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_front_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_front_raw_ok_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_front_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Predict Front: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Predict Front: Payload size different than expected") end +end + +-- Flight log - Radar Predict Back - 0x4ef6 + +f.radar_predict_back_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_predict_back_dis", "Dis", base.HEX) +f.radar_predict_back_fix_agl = ProtoField.uint16 ("dji_spark_flyrec.radar_predict_back_fix_agl", "Fix Agl", base.HEX) +f.radar_predict_back_raw_dis = ProtoField.uint16 ("dji_spark_flyrec.radar_predict_back_raw_dis", "Raw Dis", base.HEX) +f.radar_predict_back_valid_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_predict_back_valid_flg", "Valid Flg", base.HEX) +f.radar_predict_back_type = ProtoField.uint8 ("dji_spark_flyrec.radar_predict_back_type", "Type", base.HEX) +f.radar_predict_back_raw_ok_flg = ProtoField.uint8 ("dji_spark_flyrec.radar_predict_back_raw_ok_flg", "Raw Ok Flg", base.HEX) +f.radar_predict_back_cnt = ProtoField.uint8 ("dji_spark_flyrec.radar_predict_back_cnt", "Cnt", base.HEX) + +local function flightrec_radar_predict_back_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.radar_predict_back_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_back_fix_agl, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_back_raw_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.radar_predict_back_valid_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_back_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_back_raw_ok_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.radar_predict_back_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 10) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Radar Predict Back: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Radar Predict Back: Payload size different than expected") end +end + +-- Flight log - Gyro Raw0 0 - 0x4f4c + +f.gyro_raw0_0_gyro_x0_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_0_gyro_x0_0", "Gyro X0 0", base.DEC) +f.gyro_raw0_0_gyro_y0_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_0_gyro_y0_0", "Gyro Y0 0", base.DEC) +f.gyro_raw0_0_gyro_z0_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_0_gyro_z0_0", "Gyro Z0 0", base.DEC) +f.gyro_raw0_0_gyro_temp0_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_0_gyro_temp0_0", "Gyro Temp0 0", base.DEC) + +local function flightrec_gyro_raw0_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw0_0_gyro_x0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_0_gyro_y0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_0_gyro_z0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_0_gyro_temp0_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw0 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw0 0: Payload size different than expected") end +end + +-- Flight log - Gyro Raw0 1 - 0x4f4d + +f.gyro_raw0_1_gyro_x0_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_1_gyro_x0_1", "Gyro X0 1", base.DEC) +f.gyro_raw0_1_gyro_y0_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_1_gyro_y0_1", "Gyro Y0 1", base.DEC) +f.gyro_raw0_1_gyro_z0_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_1_gyro_z0_1", "Gyro Z0 1", base.DEC) +f.gyro_raw0_1_gyro_temp0_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_1_gyro_temp0_1", "Gyro Temp0 1", base.DEC) + +local function flightrec_gyro_raw0_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw0_1_gyro_x0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_1_gyro_y0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_1_gyro_z0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_1_gyro_temp0_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw0 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw0 1: Payload size different than expected") end +end + +-- Flight log - Gyro Raw0 2 - 0x4f4e + +f.gyro_raw0_2_gyro_x0_2 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_2_gyro_x0_2", "Gyro X0 2", base.DEC) +f.gyro_raw0_2_gyro_y0_2 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_2_gyro_y0_2", "Gyro Y0 2", base.DEC) +f.gyro_raw0_2_gyro_z0_2 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_2_gyro_z0_2", "Gyro Z0 2", base.DEC) +f.gyro_raw0_2_gyro_temp0_2 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw0_2_gyro_temp0_2", "Gyro Temp0 2", base.DEC) + +local function flightrec_gyro_raw0_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw0_2_gyro_x0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_2_gyro_y0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_2_gyro_z0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw0_2_gyro_temp0_2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw0 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw0 2: Payload size different than expected") end +end + +-- Flight log - Gyro Raw1 0 - 0x4f50 + +f.gyro_raw1_0_gyro_x1_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw1_0_gyro_x1_0", "Gyro X1 0", base.DEC) +f.gyro_raw1_0_gyro_y1_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw1_0_gyro_y1_0", "Gyro Y1 0", base.DEC) +f.gyro_raw1_0_gyro_z1_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw1_0_gyro_z1_0", "Gyro Z1 0", base.DEC) +f.gyro_raw1_0_gyro_temp1_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw1_0_gyro_temp1_0", "Gyro Temp1 0", base.DEC) + +local function flightrec_gyro_raw1_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw1_0_gyro_x1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_0_gyro_y1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_0_gyro_z1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_0_gyro_temp1_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw1 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw1 0: Payload size different than expected") end +end + +-- Flight log - Gyro Raw1 1 - 0x4f51 + +f.gyro_raw1_1_gyro_x1_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw1_1_gyro_x1_1", "Gyro X1 1", base.DEC) +f.gyro_raw1_1_gyro_y1_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw1_1_gyro_y1_1", "Gyro Y1 1", base.DEC) +f.gyro_raw1_1_gyro_z1_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw1_1_gyro_z1_1", "Gyro Z1 1", base.DEC) +f.gyro_raw1_1_gyro_temp1_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw1_1_gyro_temp1_1", "Gyro Temp1 1", base.DEC) + +local function flightrec_gyro_raw1_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw1_1_gyro_x1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_1_gyro_y1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_1_gyro_z1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw1_1_gyro_temp1_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw1 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw1 1: Payload size different than expected") end +end + +-- Flight log - Gyro Raw2 0 - 0x4f54 + +f.gyro_raw2_0_gyro_x2_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw2_0_gyro_x2_0", "Gyro X2 0", base.DEC) +f.gyro_raw2_0_gyro_y2_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw2_0_gyro_y2_0", "Gyro Y2 0", base.DEC) +f.gyro_raw2_0_gyro_z2_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw2_0_gyro_z2_0", "Gyro Z2 0", base.DEC) +f.gyro_raw2_0_gyro_temp2_0 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw2_0_gyro_temp2_0", "Gyro Temp2 0", base.DEC) + +local function flightrec_gyro_raw2_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw2_0_gyro_x2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_0_gyro_y2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_0_gyro_z2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_0_gyro_temp2_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw2 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw2 0: Payload size different than expected") end +end + +-- Flight log - Gyro Raw2 1 - 0x4f55 + +f.gyro_raw2_1_gyro_x2_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw2_1_gyro_x2_1", "Gyro X2 1", base.DEC) +f.gyro_raw2_1_gyro_y2_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw2_1_gyro_y2_1", "Gyro Y2 1", base.DEC) +f.gyro_raw2_1_gyro_z2_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw2_1_gyro_z2_1", "Gyro Z2 1", base.DEC) +f.gyro_raw2_1_gyro_temp2_1 = ProtoField.int16 ("dji_spark_flyrec.gyro_raw2_1_gyro_temp2_1", "Gyro Temp2 1", base.DEC) + +local function flightrec_gyro_raw2_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gyro_raw2_1_gyro_x2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_1_gyro_y2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_1_gyro_z2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.gyro_raw2_1_gyro_temp2_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gyro Raw2 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gyro Raw2 1: Payload size different than expected") end +end + +-- Flight log - Acc Raw0 0 - 0x4f58 + +f.acc_raw0_0_acc_x0_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_0_acc_x0_0", "Acc X0 0", base.DEC) +f.acc_raw0_0_acc_y0_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_0_acc_y0_0", "Acc Y0 0", base.DEC) +f.acc_raw0_0_acc_z0_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_0_acc_z0_0", "Acc Z0 0", base.DEC) +f.acc_raw0_0_acc_temp0_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_0_acc_temp0_0", "Acc Temp0 0", base.DEC) + +local function flightrec_acc_raw0_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw0_0_acc_x0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_0_acc_y0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_0_acc_z0_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_0_acc_temp0_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw0 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw0 0: Payload size different than expected") end +end + +-- Flight log - Acc Raw0 1 - 0x4f59 + +f.acc_raw0_1_acc_x0_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_1_acc_x0_1", "Acc X0 1", base.DEC) +f.acc_raw0_1_acc_y0_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_1_acc_y0_1", "Acc Y0 1", base.DEC) +f.acc_raw0_1_acc_z0_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_1_acc_z0_1", "Acc Z0 1", base.DEC) +f.acc_raw0_1_acc_temp0_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_1_acc_temp0_1", "Acc Temp0 1", base.DEC) + +local function flightrec_acc_raw0_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw0_1_acc_x0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_1_acc_y0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_1_acc_z0_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_1_acc_temp0_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw0 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw0 1: Payload size different than expected") end +end + +-- Flight log - Acc Raw0 2 - 0x4f5a + +f.acc_raw0_2_acc_x0_2 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_2_acc_x0_2", "Acc X0 2", base.DEC) +f.acc_raw0_2_acc_y0_2 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_2_acc_y0_2", "Acc Y0 2", base.DEC) +f.acc_raw0_2_acc_z0_2 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_2_acc_z0_2", "Acc Z0 2", base.DEC) +f.acc_raw0_2_acc_temp0_2 = ProtoField.int16 ("dji_spark_flyrec.acc_raw0_2_acc_temp0_2", "Acc Temp0 2", base.DEC) + +local function flightrec_acc_raw0_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw0_2_acc_x0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_2_acc_y0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_2_acc_z0_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw0_2_acc_temp0_2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw0 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw0 2: Payload size different than expected") end +end + +-- Flight log - Acc Raw1 0 - 0x4f5c + +f.acc_raw1_0_acc_x1_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw1_0_acc_x1_0", "Acc X1 0", base.DEC) +f.acc_raw1_0_acc_y1_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw1_0_acc_y1_0", "Acc Y1 0", base.DEC) +f.acc_raw1_0_acc_z1_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw1_0_acc_z1_0", "Acc Z1 0", base.DEC) +f.acc_raw1_0_acc_temp1_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw1_0_acc_temp1_0", "Acc Temp1 0", base.DEC) + +local function flightrec_acc_raw1_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw1_0_acc_x1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_0_acc_y1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_0_acc_z1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_0_acc_temp1_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw1 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw1 0: Payload size different than expected") end +end + +-- Flight log - Acc Raw1 1 - 0x4f5d + +f.acc_raw1_1_acc_x1_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw1_1_acc_x1_1", "Acc X1 1", base.DEC) +f.acc_raw1_1_acc_y1_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw1_1_acc_y1_1", "Acc Y1 1", base.DEC) +f.acc_raw1_1_acc_z1_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw1_1_acc_z1_1", "Acc Z1 1", base.DEC) +f.acc_raw1_1_acc_temp1_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw1_1_acc_temp1_1", "Acc Temp1 1", base.DEC) + +local function flightrec_acc_raw1_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw1_1_acc_x1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_1_acc_y1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_1_acc_z1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw1_1_acc_temp1_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw1 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw1 1: Payload size different than expected") end +end + +-- Flight log - Acc Raw2 0 - 0x4f60 + +f.acc_raw2_0_acc_x2_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw2_0_acc_x2_0", "Acc X2 0", base.DEC) +f.acc_raw2_0_acc_y2_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw2_0_acc_y2_0", "Acc Y2 0", base.DEC) +f.acc_raw2_0_acc_z2_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw2_0_acc_z2_0", "Acc Z2 0", base.DEC) +f.acc_raw2_0_acc_temp2_0 = ProtoField.int16 ("dji_spark_flyrec.acc_raw2_0_acc_temp2_0", "Acc Temp2 0", base.DEC) + +local function flightrec_acc_raw2_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw2_0_acc_x2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_0_acc_y2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_0_acc_z2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_0_acc_temp2_0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw2 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw2 0: Payload size different than expected") end +end + +-- Flight log - Acc Raw2 1 - 0x4f61 + +f.acc_raw2_1_acc_x2_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw2_1_acc_x2_1", "Acc X2 1", base.DEC) +f.acc_raw2_1_acc_y2_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw2_1_acc_y2_1", "Acc Y2 1", base.DEC) +f.acc_raw2_1_acc_z2_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw2_1_acc_z2_1", "Acc Z2 1", base.DEC) +f.acc_raw2_1_acc_temp2_1 = ProtoField.int16 ("dji_spark_flyrec.acc_raw2_1_acc_temp2_1", "Acc Temp2 1", base.DEC) + +local function flightrec_acc_raw2_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.acc_raw2_1_acc_x2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_1_acc_y2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_1_acc_z2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.acc_raw2_1_acc_temp2_1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Acc Raw2 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Acc Raw2 1: Payload size different than expected") end +end + +-- Flight log - Sensor Push0 0 - 0x4f64 + +f.sensor_push0_0_gyro0_0 = ProtoField.int8 ("dji_spark_flyrec.sensor_push0_0_gyro0_0", "Gyro0 0", base.DEC) +f.sensor_push0_0_acc0_0 = ProtoField.int8 ("dji_spark_flyrec.sensor_push0_0_acc0_0", "Acc0 0", base.DEC) +f.sensor_push0_0_baro0_0 = ProtoField.int8 ("dji_spark_flyrec.sensor_push0_0_baro0_0", "Baro0 0", base.DEC) +f.sensor_push0_0_compass0_0 = ProtoField.int8 ("dji_spark_flyrec.sensor_push0_0_compass0_0", "Compass0 0", base.DEC) + +local function flightrec_sensor_push0_0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.sensor_push0_0_gyro0_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_0_acc0_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_0_baro0_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_0_compass0_0, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Sensor Push0 0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Sensor Push0 0: Payload size different than expected") end +end + +-- Flight log - Sensor Push0 1 - 0x4f65 + +f.sensor_push0_1_gyro0_1 = ProtoField.int8 ("dji_spark_flyrec.sensor_push0_1_gyro0_1", "Gyro0 1", base.DEC) +f.sensor_push0_1_acc0_1 = ProtoField.int8 ("dji_spark_flyrec.sensor_push0_1_acc0_1", "Acc0 1", base.DEC) +f.sensor_push0_1_baro0_1 = ProtoField.int8 ("dji_spark_flyrec.sensor_push0_1_baro0_1", "Baro0 1", base.DEC) +f.sensor_push0_1_compass0_1 = ProtoField.int8 ("dji_spark_flyrec.sensor_push0_1_compass0_1", "Compass0 1", base.DEC) + +local function flightrec_sensor_push0_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.sensor_push0_1_gyro0_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_1_acc0_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_1_baro0_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sensor_push0_1_compass0_1, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Sensor Push0 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Sensor Push0 1: Payload size different than expected") end +end + +-- Flight log - Baro Raw0 - 0x4f6a + +f.baro_raw0_baro0 = ProtoField.float ("dji_spark_flyrec.baro_raw0_baro0", "Baro0", base.DEC) +f.baro_raw0_baro_temp0 = ProtoField.int16 ("dji_spark_flyrec.baro_raw0_baro_temp0", "Baro Temp0", base.DEC) + +local function flightrec_baro_raw0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.baro_raw0_baro0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.baro_raw0_baro_temp0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Baro Raw0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Baro Raw0: Payload size different than expected") end +end + +-- Flight log - Baro Raw1 - 0x4f6b + +f.baro_raw1_baro1 = ProtoField.float ("dji_spark_flyrec.baro_raw1_baro1", "Baro1", base.DEC) +f.baro_raw1_baro_temp1 = ProtoField.int16 ("dji_spark_flyrec.baro_raw1_baro_temp1", "Baro Temp1", base.DEC) + +local function flightrec_baro_raw1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.baro_raw1_baro1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.baro_raw1_baro_temp1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Baro Raw1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Baro Raw1: Payload size different than expected") end +end + +-- Flight log - Baro Raw2 - 0x4f6c + +f.baro_raw2_baro2 = ProtoField.float ("dji_spark_flyrec.baro_raw2_baro2", "Baro2", base.DEC) +f.baro_raw2_baro_temp2 = ProtoField.int16 ("dji_spark_flyrec.baro_raw2_baro_temp2", "Baro Temp2", base.DEC) + +local function flightrec_baro_raw2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.baro_raw2_baro2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.baro_raw2_baro_temp2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Baro Raw2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Baro Raw2: Payload size different than expected") end +end + +-- Flight log - Baro Raw3 - 0x4f6d + +f.baro_raw3_baro3 = ProtoField.float ("dji_spark_flyrec.baro_raw3_baro3", "Baro3", base.DEC) +f.baro_raw3_baro_temp3 = ProtoField.int16 ("dji_spark_flyrec.baro_raw3_baro_temp3", "Baro Temp3", base.DEC) + +local function flightrec_baro_raw3_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.baro_raw3_baro3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.baro_raw3_baro_temp3, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Baro Raw3: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Baro Raw3: Payload size different than expected") end +end + +-- Flight log - Compass Raw0 - 0x4f74 + +f.compass_raw0_r_mx0 = ProtoField.int16 ("dji_spark_flyrec.compass_raw0_r_mx0", "R Mx0", base.DEC) +f.compass_raw0_r_my0 = ProtoField.int16 ("dji_spark_flyrec.compass_raw0_r_my0", "R My0", base.DEC) +f.compass_raw0_r_mz0 = ProtoField.int16 ("dji_spark_flyrec.compass_raw0_r_mz0", "R Mz0", base.DEC) +f.compass_raw0_r_m_cnt0 = ProtoField.uint16 ("dji_spark_flyrec.compass_raw0_r_m_cnt0", "R M Cnt0", base.HEX) + +local function flightrec_compass_raw0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_raw0_r_mx0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw0_r_my0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw0_r_mz0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw0_r_m_cnt0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Raw0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Raw0: Payload size different than expected") end +end + +-- Flight log - Compass Raw1 - 0x4f75 + +f.compass_raw1_r_mx1 = ProtoField.int16 ("dji_spark_flyrec.compass_raw1_r_mx1", "R Mx1", base.DEC) +f.compass_raw1_r_my1 = ProtoField.int16 ("dji_spark_flyrec.compass_raw1_r_my1", "R My1", base.DEC) +f.compass_raw1_r_mz1 = ProtoField.int16 ("dji_spark_flyrec.compass_raw1_r_mz1", "R Mz1", base.DEC) +f.compass_raw1_r_m_cnt1 = ProtoField.uint16 ("dji_spark_flyrec.compass_raw1_r_m_cnt1", "R M Cnt1", base.HEX) + +local function flightrec_compass_raw1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_raw1_r_mx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw1_r_my1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw1_r_mz1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw1_r_m_cnt1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Raw1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Raw1: Payload size different than expected") end +end + +-- Flight log - Compass Raw2 - 0x4f76 + +f.compass_raw2_r_mx2 = ProtoField.int16 ("dji_spark_flyrec.compass_raw2_r_mx2", "R Mx2", base.DEC) +f.compass_raw2_r_my2 = ProtoField.int16 ("dji_spark_flyrec.compass_raw2_r_my2", "R My2", base.DEC) +f.compass_raw2_r_mz2 = ProtoField.int16 ("dji_spark_flyrec.compass_raw2_r_mz2", "R Mz2", base.DEC) +f.compass_raw2_r_m_cnt2 = ProtoField.uint16 ("dji_spark_flyrec.compass_raw2_r_m_cnt2", "R M Cnt2", base.HEX) + +local function flightrec_compass_raw2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_raw2_r_mx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw2_r_my2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw2_r_mz2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_raw2_r_m_cnt2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Raw2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Raw2: Payload size different than expected") end +end + +-- Flight log - Compass Filter0 - 0x4f7e + +f.compass_filter0_f_mx0 = ProtoField.int16 ("dji_spark_flyrec.compass_filter0_f_mx0", "F Mx0", base.DEC) +f.compass_filter0_f_my0 = ProtoField.int16 ("dji_spark_flyrec.compass_filter0_f_my0", "F My0", base.DEC) +f.compass_filter0_f_mz0 = ProtoField.int16 ("dji_spark_flyrec.compass_filter0_f_mz0", "F Mz0", base.DEC) + +local function flightrec_compass_filter0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_filter0_f_mx0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter0_f_my0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter0_f_mz0, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Filter0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Filter0: Payload size different than expected") end +end + +-- Flight log - Compass Filter1 - 0x4f7f + +f.compass_filter1_f_mx1 = ProtoField.int16 ("dji_spark_flyrec.compass_filter1_f_mx1", "F Mx1", base.DEC) +f.compass_filter1_f_my1 = ProtoField.int16 ("dji_spark_flyrec.compass_filter1_f_my1", "F My1", base.DEC) +f.compass_filter1_f_mz1 = ProtoField.int16 ("dji_spark_flyrec.compass_filter1_f_mz1", "F Mz1", base.DEC) + +local function flightrec_compass_filter1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_filter1_f_mx1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter1_f_my1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter1_f_mz1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Filter1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Filter1: Payload size different than expected") end +end + +-- Flight log - Compass Filter2 - 0x4f80 + +f.compass_filter2_f_mx2 = ProtoField.int16 ("dji_spark_flyrec.compass_filter2_f_mx2", "F Mx2", base.DEC) +f.compass_filter2_f_my2 = ProtoField.int16 ("dji_spark_flyrec.compass_filter2_f_my2", "F My2", base.DEC) +f.compass_filter2_f_mz2 = ProtoField.int16 ("dji_spark_flyrec.compass_filter2_f_mz2", "F Mz2", base.DEC) + +local function flightrec_compass_filter2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.compass_filter2_f_mx2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter2_f_my2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.compass_filter2_f_mz2, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 6) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Compass Filter2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Compass Filter2: Payload size different than expected") end +end + +-- Flight log - Imu Rotated Data - 0x4f88 + +f.imu_rotated_data_rotated_x = ProtoField.float ("dji_spark_flyrec.imu_rotated_data_rotated_x", "Rotated X", base.DEC) +f.imu_rotated_data_rotated_y = ProtoField.float ("dji_spark_flyrec.imu_rotated_data_rotated_y", "Rotated Y", base.DEC) +f.imu_rotated_data_rotated_z = ProtoField.float ("dji_spark_flyrec.imu_rotated_data_rotated_z", "Rotated Z", base.DEC) + +local function flightrec_imu_rotated_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.imu_rotated_data_rotated_x, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_rotated_data_rotated_y, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.imu_rotated_data_rotated_z, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Imu Rotated Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Imu Rotated Data: Payload size different than expected") end +end + +-- Flight log - Raw Wristband Data - 0x5014 + +f.raw_wristband_data_longti = ProtoField.int32 ("dji_spark_flyrec.raw_wristband_data_longti", "Longti", base.DEC) +f.raw_wristband_data_lati = ProtoField.int32 ("dji_spark_flyrec.raw_wristband_data_lati", "Lati", base.DEC) +f.raw_wristband_data_height = ProtoField.float ("dji_spark_flyrec.raw_wristband_data_height", "Height", base.DEC) +f.raw_wristband_data_vel_n = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_vel_n", "Vel N", base.DEC) +f.raw_wristband_data_vel_e = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_vel_e", "Vel E", base.DEC) +f.raw_wristband_data_vel_d = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_vel_d", "Vel D", base.DEC) +f.raw_wristband_data_acc_n = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_acc_n", "Acc N", base.DEC) +f.raw_wristband_data_acc_e = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_acc_e", "Acc E", base.DEC) +f.raw_wristband_data_acc_d = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_acc_d", "Acc D", base.DEC) +f.raw_wristband_data_tilt_x = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_tilt_x", "Tilt X", base.DEC) +f.raw_wristband_data_tilt_y = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_tilt_y", "Tilt Y", base.DEC) +f.raw_wristband_data_torsion = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_torsion", "Torsion", base.DEC) +f.raw_wristband_data_gyro_x = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_gyro_x", "Gyro X", base.DEC) +f.raw_wristband_data_gyro_y = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_gyro_y", "Gyro Y", base.DEC) +f.raw_wristband_data_gyro_z = ProtoField.int16 ("dji_spark_flyrec.raw_wristband_data_gyro_z", "Gyro Z", base.DEC) +f.raw_wristband_data_flag = ProtoField.uint8 ("dji_spark_flyrec.raw_wristband_data_flag", "Flag", base.HEX) +f.raw_wristband_data_channel = ProtoField.uint16 ("dji_spark_flyrec.raw_wristband_data_channel", "Channel", base.HEX) +f.raw_wristband_data_cmd = ProtoField.uint8 ("dji_spark_flyrec.raw_wristband_data_cmd", "Cmd", base.HEX) +f.raw_wristband_data_cnt = ProtoField.uint8 ("dji_spark_flyrec.raw_wristband_data_cnt", "Cnt", base.HEX) + +local function flightrec_raw_wristband_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.raw_wristband_data_longti, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.raw_wristband_data_lati, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.raw_wristband_data_height, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.raw_wristband_data_vel_n, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_vel_e, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_vel_d, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_acc_n, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_acc_e, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_acc_d, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_tilt_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_tilt_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_torsion, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_gyro_x, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_gyro_y, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_gyro_z, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.raw_wristband_data_channel, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.raw_wristband_data_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.raw_wristband_data_cnt, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 41) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Raw Wristband Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Raw Wristband Data: Payload size different than expected") end +end + +-- Flight log - Wristband - 0x5015 + +f.wristband_ctrl_pitch = ProtoField.float ("dji_spark_flyrec.wristband_ctrl_pitch", "Ctrl Pitch", base.DEC) +f.wristband_ctrl_roll = ProtoField.float ("dji_spark_flyrec.wristband_ctrl_roll", "Ctrl Roll", base.DEC) +f.wristband_ctrl_yaw = ProtoField.float ("dji_spark_flyrec.wristband_ctrl_yaw", "Ctrl Yaw", base.DEC) +f.wristband_ctrl_thr_wb = ProtoField.float ("dji_spark_flyrec.wristband_ctrl_thr_wb", "Ctrl Thr Wb", base.DEC) +f.wristband_cmd = ProtoField.uint8 ("dji_spark_flyrec.wristband_cmd", "Cmd", base.HEX) +f.wristband_disconnect_flag = ProtoField.uint8 ("dji_spark_flyrec.wristband_disconnect_flag", "Disconnect Flag", base.HEX) +f.wristband_is_hp_set = ProtoField.uint8 ("dji_spark_flyrec.wristband_is_hp_set", "Is Hp Set", base.HEX) + +local function flightrec_wristband_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.wristband_ctrl_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wristband_ctrl_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wristband_ctrl_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wristband_ctrl_thr_wb, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.wristband_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.wristband_disconnect_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.wristband_is_hp_set, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 19) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Wristband: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Wristband: Payload size different than expected") end +end + +-- Flight log - Ctrl Device - 0x501e + +f.ctrl_device_raw_pitch = ProtoField.float ("dji_spark_flyrec.ctrl_device_raw_pitch", "Raw Pitch", base.DEC) +f.ctrl_device_raw_roll = ProtoField.float ("dji_spark_flyrec.ctrl_device_raw_roll", "Raw Roll", base.DEC) +f.ctrl_device_raw_yaw = ProtoField.float ("dji_spark_flyrec.ctrl_device_raw_yaw", "Raw Yaw", base.DEC) +f.ctrl_device_raw_throttle = ProtoField.float ("dji_spark_flyrec.ctrl_device_raw_throttle", "Raw Throttle", base.DEC) +f.ctrl_device_ctrl_pitch = ProtoField.float ("dji_spark_flyrec.ctrl_device_ctrl_pitch", "Ctrl Pitch", base.DEC) +f.ctrl_device_ctrl_roll = ProtoField.float ("dji_spark_flyrec.ctrl_device_ctrl_roll", "Ctrl Roll", base.DEC) +f.ctrl_device_ctrl_yaw = ProtoField.float ("dji_spark_flyrec.ctrl_device_ctrl_yaw", "Ctrl Yaw", base.DEC) +f.ctrl_device_ctrl_throttle = ProtoField.float ("dji_spark_flyrec.ctrl_device_ctrl_throttle", "Ctrl Throttle", base.DEC) +f.ctrl_device_cmd = ProtoField.uint8 ("dji_spark_flyrec.ctrl_device_cmd", "Cmd", base.HEX) +f.ctrl_device_flight_mode = ProtoField.uint8 ("dji_spark_flyrec.ctrl_device_flight_mode", "Flight Mode", base.HEX) +f.ctrl_device_connected_flag = ProtoField.uint8 ("dji_spark_flyrec.ctrl_device_connected_flag", "Connected Flag", base.HEX) +f.ctrl_device_is_lost_gh = ProtoField.uint8 ("dji_spark_flyrec.ctrl_device_is_lost_gh", "Is Lost Gh", base.HEX) + +local function flightrec_ctrl_device_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ctrl_device_raw_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_raw_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_raw_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_raw_throttle, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_ctrl_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_ctrl_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_ctrl_yaw, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_ctrl_throttle, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ctrl_device_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_device_flight_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_device_connected_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.ctrl_device_is_lost_gh, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 36) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ctrl Device: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ctrl Device: Payload size different than expected") end +end + +-- Flight log - Battery Info 2 - 0x4e20 + +f.battery_info_2_batsop = ProtoField.float ("dji_spark_flyrec.battery_info_2_batsop", "Batsop", base.DEC) +f.battery_info_2_ad_f = ProtoField.uint16 ("dji_spark_flyrec.battery_info_2_ad_f", "Ad F", base.HEX) +f.battery_info_2_ad_v = ProtoField.uint16 ("dji_spark_flyrec.battery_info_2_ad_v", "Ad V", base.HEX) +f.battery_info_2_sop_en = ProtoField.uint8 ("dji_spark_flyrec.battery_info_2_sop_en", "Sop En", base.HEX) +f.battery_info_2_ilowlimit = ProtoField.int32 ("dji_spark_flyrec.battery_info_2_ilowlimit", "Ilowlimit", base.DEC) +f.battery_info_2_power = ProtoField.float ("dji_spark_flyrec.battery_info_2_power", "Power", base.DEC) +f.battery_info_2_current = ProtoField.float ("dji_spark_flyrec.battery_info_2_current", "Current", base.DEC) +f.battery_info_2_esc_i = ProtoField.float ("dji_spark_flyrec.battery_info_2_esc_i", "Esc I", base.DEC) +f.battery_info_2_power_err = ProtoField.float ("dji_spark_flyrec.battery_info_2_power_err", "Power Err", base.DEC) +f.battery_info_2_sop_p = ProtoField.float ("dji_spark_flyrec.battery_info_2_sop_p", "Sop P", base.DEC) +f.battery_info_2_sop_i = ProtoField.float ("dji_spark_flyrec.battery_info_2_sop_i", "Sop I", base.DEC) +f.battery_info_2_rawpe = ProtoField.float ("dji_spark_flyrec.battery_info_2_rawpe", "Rawpe", base.DEC) + +local function flightrec_battery_info_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_info_2_batsop, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_ad_f, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_2_ad_v, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_info_2_sop_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_2_ilowlimit, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_power, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_current, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_esc_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_power_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_sop_p, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_sop_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_2_rawpe, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 41) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Info 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Info 2: Payload size different than expected") end +end + +-- Flight log - Pwm Output - 0x4e21 + +f.pwm_output_m1 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_m1", "M1", base.HEX) +f.pwm_output_m2 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_m2", "M2", base.HEX) +f.pwm_output_m3 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_m3", "M3", base.HEX) +f.pwm_output_m4 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_m4", "M4", base.HEX) +f.pwm_output_m5 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_m5", "M5", base.HEX) +f.pwm_output_m6 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_m6", "M6", base.HEX) +f.pwm_output_m7 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_m7", "M7", base.HEX) +f.pwm_output_m8 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_m8", "M8", base.HEX) +f.pwm_output_f1 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_f1", "F1", base.HEX) +f.pwm_output_f2 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_f2", "F2", base.HEX) +f.pwm_output_f3 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_f3", "F3", base.HEX) +f.pwm_output_f4 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_f4", "F4", base.HEX) +f.pwm_output_f5 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_f5", "F5", base.HEX) +f.pwm_output_f6 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_f6", "F6", base.HEX) +f.pwm_output_f7 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_f7", "F7", base.HEX) +f.pwm_output_f8 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_f8", "F8", base.HEX) +f.pwm_output_temp_ctrl0 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_temp_ctrl0", "Temp Ctrl0", base.HEX) +f.pwm_output_temp_ctrl1 = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_temp_ctrl1", "Temp Ctrl1", base.HEX) +f.pwm_output_temp_ctrl = ProtoField.uint32 ("dji_spark_flyrec.pwm_output_temp_ctrl", "Temp Ctrl", base.HEX) + +local function flightrec_pwm_output_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.pwm_output_m1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m7, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_m8, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f3, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f4, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f5, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f6, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f7, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_f8, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_temp_ctrl0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_temp_ctrl1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.pwm_output_temp_ctrl, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 76) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Pwm Output: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Pwm Output: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Recorde0 - 0x0880 + +f.temp_ctl_recorde0_struck_t_0 = ProtoField.uint16 ("dji_spark_flyrec.temp_ctl_recorde0_struck_t_0", "Struck T 0", base.HEX) +f.temp_ctl_recorde0_err_cnt_0 = ProtoField.uint16 ("dji_spark_flyrec.temp_ctl_recorde0_err_cnt_0", "Err Cnt 0", base.HEX) +f.temp_ctl_recorde0_cmd_tgt_0 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde0_cmd_tgt_0", "Cmd Tgt 0", base.DEC) +f.temp_ctl_recorde0_pwm_per_0 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde0_pwm_per_0", "Pwm Per 0", base.DEC) +f.temp_ctl_recorde0_cmd_0 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde0_cmd_0", "Cmd 0", base.DEC) +f.temp_ctl_recorde0_err_0 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde0_err_0", "Err 0", base.DEC) +f.temp_ctl_recorde0_fdbk_0 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde0_fdbk_0", "Fdbk 0", base.DEC) +f.temp_ctl_recorde0_p_0 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde0_p_0", "P 0", base.DEC) +f.temp_ctl_recorde0_i_0 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde0_i_0", "I 0", base.DEC) +f.temp_ctl_recorde0_out_0 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde0_out_0", "Out 0", base.DEC) +f.temp_ctl_recorde0_err_lev_0 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde0_err_lev_0", "Err Lev 0", base.HEX) +f.temp_ctl_recorde0_state_0 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde0_state_0", "State 0", base.HEX) +f.temp_ctl_recorde0_status_0 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde0_status_0", "Status 0", base.HEX) +f.temp_ctl_recorde0_reset_0 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde0_reset_0", "Reset 0", base.HEX) + +local function flightrec_temp_ctl_recorde0_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_recorde0_struck_t_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_err_cnt_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_cmd_tgt_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_pwm_per_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde0_cmd_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde0_err_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_fdbk_0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde0_p_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_i_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_out_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde0_err_lev_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde0_state_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde0_status_0, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde0_reset_0, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Recorde0: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Recorde0: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Recorde1 - 0x0881 + +f.temp_ctl_recorde1_struck_t_1 = ProtoField.uint16 ("dji_spark_flyrec.temp_ctl_recorde1_struck_t_1", "Struck T 1", base.HEX) +f.temp_ctl_recorde1_err_cnt_1 = ProtoField.uint16 ("dji_spark_flyrec.temp_ctl_recorde1_err_cnt_1", "Err Cnt 1", base.HEX) +f.temp_ctl_recorde1_cmd_tgt_1 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde1_cmd_tgt_1", "Cmd Tgt 1", base.DEC) +f.temp_ctl_recorde1_pwm_per_1 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde1_pwm_per_1", "Pwm Per 1", base.DEC) +f.temp_ctl_recorde1_cmd_1 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde1_cmd_1", "Cmd 1", base.DEC) +f.temp_ctl_recorde1_err_1 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde1_err_1", "Err 1", base.DEC) +f.temp_ctl_recorde1_fdbk_1 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde1_fdbk_1", "Fdbk 1", base.DEC) +f.temp_ctl_recorde1_p_1 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde1_p_1", "P 1", base.DEC) +f.temp_ctl_recorde1_i_1 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde1_i_1", "I 1", base.DEC) +f.temp_ctl_recorde1_out_1 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde1_out_1", "Out 1", base.DEC) +f.temp_ctl_recorde1_err_lev_1 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde1_err_lev_1", "Err Lev 1", base.HEX) +f.temp_ctl_recorde1_state_1 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde1_state_1", "State 1", base.HEX) +f.temp_ctl_recorde1_status_1 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde1_status_1", "Status 1", base.HEX) +f.temp_ctl_recorde1_reset_1 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde1_reset_1", "Reset 1", base.HEX) + +local function flightrec_temp_ctl_recorde1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_recorde1_struck_t_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_err_cnt_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_cmd_tgt_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_pwm_per_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde1_cmd_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde1_err_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_fdbk_1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde1_p_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_i_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_out_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde1_err_lev_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde1_state_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde1_status_1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde1_reset_1, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Recorde1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Recorde1: Payload size different than expected") end +end + +-- Flight log - Temp Ctl Recorde2 - 0x0882 + +f.temp_ctl_recorde2_struck_t_2 = ProtoField.uint16 ("dji_spark_flyrec.temp_ctl_recorde2_struck_t_2", "Struck T 2", base.HEX) +f.temp_ctl_recorde2_err_cnt_2 = ProtoField.uint16 ("dji_spark_flyrec.temp_ctl_recorde2_err_cnt_2", "Err Cnt 2", base.HEX) +f.temp_ctl_recorde2_cmd_tgt_2 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde2_cmd_tgt_2", "Cmd Tgt 2", base.DEC) +f.temp_ctl_recorde2_pwm_per_2 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde2_pwm_per_2", "Pwm Per 2", base.DEC) +f.temp_ctl_recorde2_cmd_2 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde2_cmd_2", "Cmd 2", base.DEC) +f.temp_ctl_recorde2_err_2 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde2_err_2", "Err 2", base.DEC) +f.temp_ctl_recorde2_fdbk_2 = ProtoField.float ("dji_spark_flyrec.temp_ctl_recorde2_fdbk_2", "Fdbk 2", base.DEC) +f.temp_ctl_recorde2_p_2 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde2_p_2", "P 2", base.DEC) +f.temp_ctl_recorde2_i_2 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde2_i_2", "I 2", base.DEC) +f.temp_ctl_recorde2_out_2 = ProtoField.int16 ("dji_spark_flyrec.temp_ctl_recorde2_out_2", "Out 2", base.DEC) +f.temp_ctl_recorde2_err_lev_2 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde2_err_lev_2", "Err Lev 2", base.HEX) +f.temp_ctl_recorde2_state_2 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde2_state_2", "State 2", base.HEX) +f.temp_ctl_recorde2_status_2 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde2_status_2", "Status 2", base.HEX) +f.temp_ctl_recorde2_reset_2 = ProtoField.uint8 ("dji_spark_flyrec.temp_ctl_recorde2_reset_2", "Reset 2", base.HEX) + +local function flightrec_temp_ctl_recorde2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.temp_ctl_recorde2_struck_t_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_err_cnt_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_cmd_tgt_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_pwm_per_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde2_cmd_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde2_err_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_fdbk_2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.temp_ctl_recorde2_p_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_i_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_out_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.temp_ctl_recorde2_err_lev_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde2_state_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde2_status_2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.temp_ctl_recorde2_reset_2, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 30) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Temp Ctl Recorde2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Temp Ctl Recorde2: Payload size different than expected") end +end + +-- Flight log - Airport Limit Debug Info - 0x4e22 + +f.airport_limit_debug_info_flg = ProtoField.uint8 ("dji_spark_flyrec.airport_limit_debug_info_flg", "Flg", base.HEX) +f.airport_limit_debug_info_uid = ProtoField.uint32 ("dji_spark_flyrec.airport_limit_debug_info_uid", "Uid", base.HEX) +f.airport_limit_debug_info_v_n = ProtoField.int8 ("dji_spark_flyrec.airport_limit_debug_info_v_n", "V N", base.DEC) +f.airport_limit_debug_info_v_e = ProtoField.int8 ("dji_spark_flyrec.airport_limit_debug_info_v_e", "V E", base.DEC) +f.airport_limit_debug_info_v_d = ProtoField.int8 ("dji_spark_flyrec.airport_limit_debug_info_v_d", "V D", base.DEC) +f.airport_limit_debug_info_norm = ProtoField.uint8 ("dji_spark_flyrec.airport_limit_debug_info_norm", "Norm", base.HEX) + +local function flightrec_airport_limit_debug_info_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.airport_limit_debug_info_flg, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_debug_info_uid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airport_limit_debug_info_v_n, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_debug_info_v_e, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_debug_info_v_d, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airport_limit_debug_info_norm, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 9) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Airport Limit Debug Info: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Airport Limit Debug Info: Payload size different than expected") end +end + +-- Flight log - Battery Raw Data 1 - 0x4e23 + +f.battery_raw_data_1_0 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_1_0", "0", base.HEX) +f.battery_raw_data_1_1 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_1_1", "1", base.HEX) +f.battery_raw_data_1_2 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_1_2", "2", base.HEX) +f.battery_raw_data_1_3 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_1_3", "3", base.HEX) +f.battery_raw_data_1_4 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_1_4", "4", base.HEX) +f.battery_raw_data_1_5 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_1_5", "5", base.HEX) +f.battery_raw_data_1_lowest = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_1_lowest", "Lowest", base.HEX) + +local function flightrec_battery_raw_data_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_raw_data_1_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_1_lowest, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 14) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Raw Data 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Raw Data 1: Payload size different than expected") end +end + +-- Flight log - Battery Raw Data 2 - 0x4e24 + +f.battery_raw_data_2_0 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_2_0", "0", base.HEX) +f.battery_raw_data_2_1 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_2_1", "1", base.HEX) +f.battery_raw_data_2_2 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_2_2", "2", base.HEX) +f.battery_raw_data_2_3 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_2_3", "3", base.HEX) +f.battery_raw_data_2_4 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_2_4", "4", base.HEX) +f.battery_raw_data_2_5 = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_2_5", "5", base.HEX) +f.battery_raw_data_2_lowest = ProtoField.uint16 ("dji_spark_flyrec.battery_raw_data_2_lowest", "Lowest", base.HEX) + +local function flightrec_battery_raw_data_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_raw_data_2_0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.battery_raw_data_2_lowest, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 14) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Raw Data 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Raw Data 2: Payload size different than expected") end +end + +-- Flight log - Sys Err - 0x4e25 + +f.sys_err_code_err = ProtoField.uint8 ("dji_spark_flyrec.sys_err_code_err", "Code Err", base.HEX) +f.sys_err_sn_err1 = ProtoField.uint8 ("dji_spark_flyrec.sys_err_sn_err1", "Sn Err1", base.HEX) +f.sys_err_sn_err2 = ProtoField.uint8 ("dji_spark_flyrec.sys_err_sn_err2", "Sn Err2", base.HEX) +f.sys_err_sd_fail = ProtoField.uint8 ("dji_spark_flyrec.sys_err_sd_fail", "Sd Fail", base.HEX) +f.sys_err_ifv = ProtoField.uint8 ("dji_spark_flyrec.sys_err_ifv", "Ifv", base.HEX) + +local function flightrec_sys_err_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.sys_err_code_err, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sys_err_sn_err1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sys_err_sn_err2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sys_err_sd_fail, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.sys_err_ifv, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Sys Err: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Sys Err: Payload size different than expected") end +end + +-- Flight log - Quick Circle Debug - 0x4e27 + +f.quick_circle_debug_qc_trg_a = ProtoField.uint8 ("dji_spark_flyrec.quick_circle_debug_qc_trg_a", "Qc Trg A", base.HEX) +f.quick_circle_debug_qc_trg_m = ProtoField.uint8 ("dji_spark_flyrec.quick_circle_debug_qc_trg_m", "Qc Trg M", base.HEX) +f.quick_circle_debug_qc_trg_f = ProtoField.uint8 ("dji_spark_flyrec.quick_circle_debug_qc_trg_f", "Qc Trg F", base.HEX) +f.quick_circle_debug_qc_pre_trs = ProtoField.float ("dji_spark_flyrec.quick_circle_debug_qc_pre_trs", "Qc Pre Trs", base.DEC) +f.quick_circle_debug_qc_cur_trs = ProtoField.float ("dji_spark_flyrec.quick_circle_debug_qc_cur_trs", "Qc Cur Trs", base.DEC) +f.quick_circle_debug_qc_tgt_trs = ProtoField.float ("dji_spark_flyrec.quick_circle_debug_qc_tgt_trs", "Qc Tgt Trs", base.DEC) +f.quick_circle_debug_qc_t = ProtoField.float ("dji_spark_flyrec.quick_circle_debug_qc_t", "Qc T", base.DEC) + +local function flightrec_quick_circle_debug_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.quick_circle_debug_qc_trg_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.quick_circle_debug_qc_trg_m, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.quick_circle_debug_qc_trg_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.quick_circle_debug_qc_pre_trs, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.quick_circle_debug_qc_cur_trs, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.quick_circle_debug_qc_tgt_trs, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.quick_circle_debug_qc_t, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 19) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Quick Circle Debug: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Quick Circle Debug: Payload size different than expected") end +end + +-- Flight log - Battery Info 3 - 0x4e28 + +f.battery_info_3_avg_i = ProtoField.float ("dji_spark_flyrec.battery_info_3_avg_i", "Avg I", base.DEC) +f.battery_info_3_fake_sbat = ProtoField.uint8 ("dji_spark_flyrec.battery_info_3_fake_sbat", "Fake Sbat", base.HEX) +f.battery_info_3_esc_power = ProtoField.float ("dji_spark_flyrec.battery_info_3_esc_power", "Esc Power", base.DEC) +f.battery_info_3_power_err = ProtoField.float ("dji_spark_flyrec.battery_info_3_power_err", "Power Err", base.DEC) +f.battery_info_3_is_true = ProtoField.uint8 ("dji_spark_flyrec.battery_info_3_is_true", "Is True", base.HEX) +f.battery_info_3_m_s_d = ProtoField.uint8 ("dji_spark_flyrec.battery_info_3_m_s_d", "M S D", base.HEX) +f.battery_info_3_p_r_max = ProtoField.float ("dji_spark_flyrec.battery_info_3_p_r_max", "P R Max", base.DEC) +f.battery_info_3_p_ave = ProtoField.float ("dji_spark_flyrec.battery_info_3_p_ave", "P Ave", base.DEC) +f.battery_info_3_p_r_min = ProtoField.float ("dji_spark_flyrec.battery_info_3_p_r_min", "P R Min", base.DEC) + +local function flightrec_battery_info_3_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.battery_info_3_avg_i, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_fake_sbat, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_3_esc_power, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_power_err, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_is_true, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_3_m_s_d, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.battery_info_3_p_r_max, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_p_ave, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.battery_info_3_p_r_min, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 27) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Battery Info 3: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Battery Info 3: Payload size different than expected") end +end + +-- Flight log - Rc Func Data - 0x4e29 + +f.rc_func_data_a = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_a", "A", base.DEC) +f.rc_func_data_e = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_e", "E", base.DEC) +f.rc_func_data_t = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_t", "T", base.DEC) +f.rc_func_data_r = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_r", "R", base.DEC) +f.rc_func_data_u = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_u", "U", base.DEC) +f.rc_func_data_u_f = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_u_f", "U F", base.DEC) +f.rc_func_data_gear = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_gear", "Gear", base.DEC) +f.rc_func_data_gh_sq = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_gh_sq", "Gh Sq", base.DEC) +f.rc_func_data_gh_sw = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_gh_sw", "Gh Sw", base.DEC) +f.rc_func_data_em_mode = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_em_mode", "Em Mode", base.DEC) +f.rc_func_data_em_stop = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_em_stop", "Em Stop", base.DEC) +f.rc_func_data_p_stop = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_p_stop", "P Stop", base.DEC) +f.rc_func_data_ioc = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_ioc", "Ioc", base.DEC) +f.rc_func_data_k1 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_k1", "K1", base.DEC) +f.rc_func_data_k2 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_k2", "K2", base.DEC) +f.rc_func_data_k3 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_k3", "K3", base.DEC) +f.rc_func_data_k4 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_k4", "K4", base.DEC) +f.rc_func_data_k5 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_k5", "K5", base.DEC) +f.rc_func_data_k6 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_k6", "K6", base.DEC) +f.rc_func_data_d1 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_d1", "D1", base.DEC) +f.rc_func_data_d2 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_d2", "D2", base.DEC) +f.rc_func_data_d3 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_d3", "D3", base.DEC) +f.rc_func_data_d4 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_d4", "D4", base.DEC) +f.rc_func_data_d5 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_d5", "D5", base.DEC) +f.rc_func_data_d6 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_d6", "D6", base.DEC) +f.rc_func_data_d7 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_d7", "D7", base.DEC) +f.rc_func_data_d8 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_d8", "D8", base.DEC) +f.rc_func_data_f_left = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_f_left", "F Left", base.DEC) +f.rc_func_data_f_right = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_f_right", "F Right", base.DEC) +f.rc_func_data_f_set_a = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_f_set_a", "F Set A", base.DEC) +f.rc_func_data_f_set_b = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_f_set_b", "F Set B", base.DEC) +f.rc_func_data_f_set_ab = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_f_set_ab", "F Set Ab", base.DEC) +f.rc_func_data_f_m_s = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_f_m_s", "F M S", base.DEC) +f.rc_func_data_f_f_s = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_f_f_s", "F F S", base.DEC) +f.rc_func_data_f_mode = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_f_mode", "F Mode", base.DEC) +f.rc_func_data_rc_c1 = ProtoField.int16 ("dji_spark_flyrec.rc_func_data_rc_c1", "Rc C1", base.DEC) + +local function flightrec_rc_func_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_func_data_a, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_e, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_t, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_r, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_u, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_u_f, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_gear, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_gh_sq, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_gh_sw, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_em_mode, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_em_stop, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_p_stop, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_ioc, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_k6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d6, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d7, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_d8, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_left, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_right, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_set_a, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_set_b, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_set_ab, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_m_s, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_f_s, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_f_mode, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.rc_func_data_rc_c1, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 72) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Func Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Func Data: Payload size different than expected") end +end + +-- Flight log - Rc Func State - 0x4e2a + +f.rc_func_state_a = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_a", "A", base.HEX) +f.rc_func_state_e = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_e", "E", base.HEX) +f.rc_func_state_t = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_t", "T", base.HEX) +f.rc_func_state_r = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_r", "R", base.HEX) +f.rc_func_state_u = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_u", "U", base.HEX) +f.rc_func_state_u_f = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_u_f", "U F", base.HEX) +f.rc_func_state_gear = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_gear", "Gear", base.HEX) +f.rc_func_state_gh_sq = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_gh_sq", "Gh Sq", base.HEX) +f.rc_func_state_gh_sw = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_gh_sw", "Gh Sw", base.HEX) +f.rc_func_state_em_mode = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_em_mode", "Em Mode", base.HEX) +f.rc_func_state_em_stop = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_em_stop", "Em Stop", base.HEX) +f.rc_func_state_p_stop = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_p_stop", "P Stop", base.HEX) +f.rc_func_state__ioc = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state__ioc", " Ioc", base.HEX) +f.rc_func_state_k1 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_k1", "K1", base.HEX) +f.rc_func_state_k2 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_k2", "K2", base.HEX) +f.rc_func_state_k3 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_k3", "K3", base.HEX) +f.rc_func_state_k4 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_k4", "K4", base.HEX) +f.rc_func_state_k5 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_k5", "K5", base.HEX) +f.rc_func_state_k6 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_k6", "K6", base.HEX) +f.rc_func_state_d1 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_d1", "D1", base.HEX) +f.rc_func_state_d2 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_d2", "D2", base.HEX) +f.rc_func_state_d3 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_d3", "D3", base.HEX) +f.rc_func_state_d4 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_d4", "D4", base.HEX) +f.rc_func_state_d5 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_d5", "D5", base.HEX) +f.rc_func_state_d6 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_d6", "D6", base.HEX) +f.rc_func_state_d7 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_d7", "D7", base.HEX) +f.rc_func_state_d8 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_d8", "D8", base.HEX) +f.rc_func_state_f_left = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_f_left", "F Left", base.HEX) +f.rc_func_state_f_right = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_f_right", "F Right", base.HEX) +f.rc_func_state_f_set_a = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_f_set_a", "F Set A", base.HEX) +f.rc_func_state_f_set_b = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_f_set_b", "F Set B", base.HEX) +f.rc_func_state_f_set_ab = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_f_set_ab", "F Set Ab", base.HEX) +f.rc_func_state_f_m_s = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_f_m_s", "F M S", base.HEX) +f.rc_func_state_f_flow_speed = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_f_flow_speed", "F Flow Speed", base.HEX) +f.rc_func_state_f_mode = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_f_mode", "F Mode", base.HEX) +f.rc_func_state_s_rc_c1 = ProtoField.uint8 ("dji_spark_flyrec.rc_func_state_s_rc_c1", "S Rc C1", base.HEX) + +local function flightrec_rc_func_state_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.rc_func_state_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_e, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_t, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_r, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_u, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_u_f, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_gear, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_gh_sq, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_gh_sw, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_em_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_em_stop, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_p_stop, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state__ioc, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_k6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d1, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d2, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d3, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d4, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d5, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d6, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d7, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_d8, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_left, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_right, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_set_a, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_set_b, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_set_ab, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_m_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_flow_speed, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_f_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.rc_func_state_s_rc_c1, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 36) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Rc Func State: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Rc Func State: Payload size different than expected") end +end + +-- Flight log - Gps Monitor 1 - 0x4e2b + +f.gps_monitor_1_le = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_1_le", "Le", base.HEX) +f.gps_monitor_1_dysed = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_1_dysed", "Dysed", base.HEX) +f.gps_monitor_1_sfe = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_1_sfe", "Sfe", base.HEX) +f.gps_monitor_1_dft = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_1_dft", "Dft", base.HEX) +f.gps_monitor_1_smc = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_1_smc", "Smc", base.HEX) + +local function flightrec_gps_monitor_1_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gps_monitor_1_le, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_1_dysed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_1_sfe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_1_dft, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_1_smc, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Monitor 1: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Monitor 1: Payload size different than expected") end +end + +-- Flight log - Gps Monitor 2 - 0x4e2c + +f.gps_monitor_2_le = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_2_le", "Le", base.HEX) +f.gps_monitor_2_dysed = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_2_dysed", "Dysed", base.HEX) +f.gps_monitor_2_sfe = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_2_sfe", "Sfe", base.HEX) +f.gps_monitor_2_dft = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_2_dft", "Dft", base.HEX) +f.gps_monitor_2_smc = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_2_smc", "Smc", base.HEX) + +local function flightrec_gps_monitor_2_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gps_monitor_2_le, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_2_dysed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_2_sfe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_2_dft, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_2_smc, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Monitor 2: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Monitor 2: Payload size different than expected") end +end + +-- Flight log - Gps Monitor 3 - 0x4e2d + +f.gps_monitor_3_le = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_3_le", "Le", base.HEX) +f.gps_monitor_3_dysed = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_3_dysed", "Dysed", base.HEX) +f.gps_monitor_3_sfe = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_3_sfe", "Sfe", base.HEX) +f.gps_monitor_3_dft = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_3_dft", "Dft", base.HEX) +f.gps_monitor_3_smc = ProtoField.uint32 ("dji_spark_flyrec.gps_monitor_3_smc", "Smc", base.HEX) + +local function flightrec_gps_monitor_3_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.gps_monitor_3_le, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_3_dysed, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_3_sfe, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_3_dft, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.gps_monitor_3_smc, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Gps Monitor 3: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Gps Monitor 3: Payload size different than expected") end +end + +-- Flight log - Fw G Api - 0x0885 + +f.fw_g_api_tgt_w0 = ProtoField.float ("dji_spark_flyrec.fw_g_api_tgt_w0", "Tgt W0", base.DEC) +f.fw_g_api_tgt_w1 = ProtoField.float ("dji_spark_flyrec.fw_g_api_tgt_w1", "Tgt W1", base.DEC) +f.fw_g_api_tgt_w2 = ProtoField.float ("dji_spark_flyrec.fw_g_api_tgt_w2", "Tgt W2", base.DEC) +f.fw_g_api_yaw_type = ProtoField.uint8 ("dji_spark_flyrec.fw_g_api_yaw_type", "Yaw Type", base.HEX) +f.fw_g_api_ctrl_mode = ProtoField.uint8 ("dji_spark_flyrec.fw_g_api_ctrl_mode", "Ctrl Mode", base.HEX) +f.fw_g_api_atti_mode = ProtoField.uint8 ("dji_spark_flyrec.fw_g_api_atti_mode", "Atti Mode", base.HEX) +f.fw_g_api_cmd_roll = ProtoField.float ("dji_spark_flyrec.fw_g_api_cmd_roll", "Cmd Roll", base.DEC) +f.fw_g_api_cmd_pitch = ProtoField.float ("dji_spark_flyrec.fw_g_api_cmd_pitch", "Cmd Pitch", base.DEC) +f.fw_g_api_cmd_yaw = ProtoField.float ("dji_spark_flyrec.fw_g_api_cmd_yaw", "Cmd Yaw", base.DEC) + +local function flightrec_fw_g_api_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fw_g_api_tgt_w0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_tgt_w1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_tgt_w2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_yaw_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.fw_g_api_ctrl_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.fw_g_api_atti_mode, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.fw_g_api_cmd_roll, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_cmd_pitch, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_g_api_cmd_yaw, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 27) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fw G Api: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fw G Api: Payload size different than expected") end +end + +-- Flight log - Fw Param Ekf - 0x0887 + +f.fw_param_ekf_energyest = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_energyest", "Energyest", base.DEC) +f.fw_param_ekf_cd0est = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_cd0est", "Cd0Est", base.DEC) +f.fw_param_ekf_clest = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_clest", "Clest", base.DEC) +f.fw_param_ekf_aest = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_aest", "Aest", base.DEC) +f.fw_param_ekf_best = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_best", "Best", base.DEC) +f.fw_param_ekf_nest = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_nest", "Nest", base.DEC) +f.fw_param_ekf_yacc0 = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_yacc0", "Yacc0", base.DEC) +f.fw_param_ekf_yacc1 = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_yacc1", "Yacc1", base.DEC) +f.fw_param_ekf_yacc2 = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_yacc2", "Yacc2", base.DEC) +f.fw_param_ekf_yenergy = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_yenergy", "Yenergy", base.DEC) +f.fw_param_ekf_yu = ProtoField.float ("dji_spark_flyrec.fw_param_ekf_yu", "Yu", base.DEC) + +local function flightrec_fw_param_ekf_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.fw_param_ekf_energyest, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_cd0est, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_clest, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_aest, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_best, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_nest, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yacc0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yacc1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yacc2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yenergy, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.fw_param_ekf_yu, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 44) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Fw Param Ekf: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Fw Param Ekf: Payload size different than expected") end +end + +-- Flight log - Ex Raw Airspeed - 0x27e2 + +f.ex_raw_airspeed_diff_press = ProtoField.float ("dji_spark_flyrec.ex_raw_airspeed_diff_press", "Diff Press", base.DEC) +f.ex_raw_airspeed_temp = ProtoField.float ("dji_spark_flyrec.ex_raw_airspeed_temp", "Temp", base.DEC) +f.ex_raw_airspeed_cnt = ProtoField.uint32 ("dji_spark_flyrec.ex_raw_airspeed_cnt", "Cnt", base.HEX) + +local function flightrec_ex_raw_airspeed_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.ex_raw_airspeed_diff_press, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ex_raw_airspeed_temp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.ex_raw_airspeed_cnt, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 12) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Ex Raw Airspeed: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Ex Raw Airspeed: Payload size different than expected") end +end + +-- Flight log - Vibrate Detect Gyro - 0x5000 + +f.vibrate_detect_gyro_x_amp = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_x_amp", "X Amp", base.DEC) +f.vibrate_detect_gyro_y_amp = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_y_amp", "Y Amp", base.DEC) +f.vibrate_detect_gyro_freq = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_freq", "Freq", base.DEC) +f.vibrate_detect_gyro_len = ProtoField.uint16 ("dji_spark_flyrec.vibrate_detect_gyro_len", "Len", base.HEX) +f.vibrate_detect_gyro_fs = ProtoField.uint16 ("dji_spark_flyrec.vibrate_detect_gyro_fs", "Fs", base.HEX) +f.vibrate_detect_gyro_enable = ProtoField.uint8 ("dji_spark_flyrec.vibrate_detect_gyro_enable", "Enable", base.HEX) +f.vibrate_detect_gyro_flag = ProtoField.uint8 ("dji_spark_flyrec.vibrate_detect_gyro_flag", "Flag", base.HEX) +f.vibrate_detect_gyro_x0 = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_x0", "X0", base.DEC) +f.vibrate_detect_gyro_x1 = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_x1", "X1", base.DEC) +f.vibrate_detect_gyro_x2 = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_x2", "X2", base.DEC) +f.vibrate_detect_gyro_y0 = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_y0", "Y0", base.DEC) +f.vibrate_detect_gyro_y1 = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_y1", "Y1", base.DEC) +f.vibrate_detect_gyro_y2 = ProtoField.float ("dji_spark_flyrec.vibrate_detect_gyro_y2", "Y2", base.DEC) + +local function flightrec_vibrate_detect_gyro_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.vibrate_detect_gyro_x_amp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_y_amp, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_freq, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_len, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vibrate_detect_gyro_fs, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.vibrate_detect_gyro_enable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vibrate_detect_gyro_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.vibrate_detect_gyro_x0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_x1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_x2, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_y0, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_y1, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.vibrate_detect_gyro_y2, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 42) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Vibrate Detect Gyro: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Vibrate Detect Gyro: Payload size different than expected") end +end + +-- Flight log - Airprot Limit Data - 0x500a + +f.airprot_limit_data_ap_disable = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_ap_disable", "Ap Disable", base.HEX) +f.airprot_limit_data_pos_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_pos_en", "Pos En", base.HEX) +f.airprot_limit_data_wl_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_wl_en", "Wl En", base.HEX) +f.airprot_limit_data_wl_s = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_wl_s", "Wl S", base.HEX) +f.airprot_limit_data_g_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_g_en", "G En", base.HEX) +f.airprot_limit_data_g_s = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_g_s", "G S", base.HEX) +f.airprot_limit_data_t_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_t_en", "T En", base.HEX) +f.airprot_limit_data_t_s = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_t_s", "T S", base.HEX) +f.airprot_limit_data_f_s = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_f_s", "F S", base.HEX) +f.airprot_limit_data_1f_dir = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_1f_dir", "1F Dir", base.DEC) +f.airprot_limit_data_1f_dir = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_1f_dir", "1F Dir", base.DEC) +f.airprot_limit_data_1f_hi_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_1f_hi_en", "1F Hi En", base.HEX) +f.airprot_limit_data_1f_d2hi = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_1f_d2hi", "1F D2Hi", base.DEC) +f.airprot_limit_data_1f_r_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_1f_r_en", "1F R En", base.HEX) +f.airprot_limit_data_1f_d2r = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_1f_d2r", "1F D2R", base.DEC) +f.airprot_limit_data_2f_dir = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_2f_dir", "2F Dir", base.DEC) +f.airprot_limit_data_2f_dir = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_2f_dir", "2F Dir", base.DEC) +f.airprot_limit_data_2f_hi_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_2f_hi_en", "2F Hi En", base.HEX) +f.airprot_limit_data_2f_d2hi = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_2f_d2hi", "2F D2Hi", base.DEC) +f.airprot_limit_data_2f_r_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_2f_r_en", "2F R En", base.HEX) +f.airprot_limit_data_2f_d2r = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_2f_d2r", "2F D2R", base.DEC) +f.airprot_limit_data_3f_dir = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_3f_dir", "3F Dir", base.DEC) +f.airprot_limit_data_3f_dir = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_3f_dir", "3F Dir", base.DEC) +f.airprot_limit_data_3f_hi_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_3f_hi_en", "3F Hi En", base.HEX) +f.airprot_limit_data_3f_d2hi = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_3f_d2hi", "3F D2Hi", base.DEC) +f.airprot_limit_data_3f_r_en = ProtoField.uint8 ("dji_spark_flyrec.airprot_limit_data_3f_r_en", "3F R En", base.HEX) +f.airprot_limit_data_3f_d2r = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_3f_d2r", "3F D2R", base.DEC) +f.airprot_limit_data_height_limit = ProtoField.float ("dji_spark_flyrec.airprot_limit_data_height_limit", "Height Limit", base.DEC) + +local function flightrec_airprot_limit_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.airprot_limit_data_ap_disable, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_pos_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_wl_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_wl_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_g_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_g_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_t_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_t_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_f_s, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_1f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_1f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_1f_hi_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_1f_d2hi, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_1f_r_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_1f_d2r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_2f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_2f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_2f_hi_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_2f_d2hi, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_2f_r_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_2f_d2r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_3f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_3f_dir, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_3f_hi_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_3f_d2hi, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_3f_r_en, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.airprot_limit_data_3f_d2r, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.airprot_limit_data_height_limit, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 67) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Airprot Limit Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Airprot Limit Data: Payload size different than expected") end +end + +-- Flight log - Adv Fl Limit Data - 0x500b + +f.adv_fl_limit_data_rec_cnt = ProtoField.uint32 ("dji_spark_flyrec.adv_fl_limit_data_rec_cnt", "Rec Cnt", base.HEX) +f.adv_fl_limit_data_num = ProtoField.uint8 ("dji_spark_flyrec.adv_fl_limit_data_num", "Num", base.HEX) +f.adv_fl_limit_data_in_warn_zone = ProtoField.uint8 ("dji_spark_flyrec.adv_fl_limit_data_in_warn_zone", "In Warn Zone", base.HEX) +f.adv_fl_limit_data_nearest_nfz_dis = ProtoField.uint16 ("dji_spark_flyrec.adv_fl_limit_data_nearest_nfz_dis", "Nearest Nfz Dis", base.HEX) +f.adv_fl_limit_data_rsv = ProtoField.uint32 ("dji_spark_flyrec.adv_fl_limit_data_rsv", "Rsv", base.HEX) +f.adv_fl_limit_data_0uuid = ProtoField.uint32 ("dji_spark_flyrec.adv_fl_limit_data_0uuid", "0Uuid", base.HEX) +f.adv_fl_limit_data_0in_limt_area = ProtoField.uint8 ("dji_spark_flyrec.adv_fl_limit_data_0in_limt_area", "0In Limt Area", base.HEX) +f.adv_fl_limit_data_0n = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_0n", "0N", base.DEC) +f.adv_fl_limit_data_0e = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_0e", "0E", base.DEC) +f.adv_fl_limit_data_0hight_limit = ProtoField.uint16 ("dji_spark_flyrec.adv_fl_limit_data_0hight_limit", "0Hight Limit", base.HEX) +f.adv_fl_limit_data_1uuid = ProtoField.uint32 ("dji_spark_flyrec.adv_fl_limit_data_1uuid", "1Uuid", base.HEX) +f.adv_fl_limit_data_1in_limt_area = ProtoField.uint8 ("dji_spark_flyrec.adv_fl_limit_data_1in_limt_area", "1In Limt Area", base.HEX) +f.adv_fl_limit_data_1n = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_1n", "1N", base.DEC) +f.adv_fl_limit_data_1e = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_1e", "1E", base.DEC) +f.adv_fl_limit_data_1hight_limit = ProtoField.uint16 ("dji_spark_flyrec.adv_fl_limit_data_1hight_limit", "1Hight Limit", base.HEX) +f.adv_fl_limit_data_2uuid = ProtoField.uint32 ("dji_spark_flyrec.adv_fl_limit_data_2uuid", "2Uuid", base.HEX) +f.adv_fl_limit_data_2in_limt_area = ProtoField.uint8 ("dji_spark_flyrec.adv_fl_limit_data_2in_limt_area", "2In Limt Area", base.HEX) +f.adv_fl_limit_data_2n = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_2n", "2N", base.DEC) +f.adv_fl_limit_data_2e = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_2e", "2E", base.DEC) +f.adv_fl_limit_data_2hight_limit = ProtoField.uint16 ("dji_spark_flyrec.adv_fl_limit_data_2hight_limit", "2Hight Limit", base.HEX) +f.adv_fl_limit_data_3uuid = ProtoField.uint32 ("dji_spark_flyrec.adv_fl_limit_data_3uuid", "3Uuid", base.HEX) +f.adv_fl_limit_data_3in_limt_area = ProtoField.uint8 ("dji_spark_flyrec.adv_fl_limit_data_3in_limt_area", "3In Limt Area", base.HEX) +f.adv_fl_limit_data_3n = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_3n", "3N", base.DEC) +f.adv_fl_limit_data_3e = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_3e", "3E", base.DEC) +f.adv_fl_limit_data_3hight_limit = ProtoField.uint16 ("dji_spark_flyrec.adv_fl_limit_data_3hight_limit", "3Hight Limit", base.HEX) +f.adv_fl_limit_data_4uuid = ProtoField.uint32 ("dji_spark_flyrec.adv_fl_limit_data_4uuid", "4Uuid", base.HEX) +f.adv_fl_limit_data_4in_limt_area = ProtoField.uint8 ("dji_spark_flyrec.adv_fl_limit_data_4in_limt_area", "4In Limt Area", base.HEX) +f.adv_fl_limit_data_4n = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_4n", "4N", base.DEC) +f.adv_fl_limit_data_4e = ProtoField.float ("dji_spark_flyrec.adv_fl_limit_data_4e", "4E", base.DEC) +f.adv_fl_limit_data_4hight_limit = ProtoField.uint16 ("dji_spark_flyrec.adv_fl_limit_data_4hight_limit", "4Hight Limit", base.HEX) + +local function flightrec_adv_fl_limit_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adv_fl_limit_data_rec_cnt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_num, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_in_warn_zone, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_nearest_nfz_dis, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_rsv, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_0uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_0in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_0n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_0e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_0hight_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_1uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_1in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_1n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_1e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_1hight_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_2uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_2in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_2n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_2e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_2hight_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_3uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_3in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_3n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_3e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_3hight_limit, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.adv_fl_limit_data_4uuid, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_4in_limt_area, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adv_fl_limit_data_4n, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_4e, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adv_fl_limit_data_4hight_limit, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 87) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adv Fl Limit Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adv Fl Limit Data: Payload size different than expected") end +end + +-- Flight log - Db Subscription - 0x0888 + +f.db_subscription_tick_b = ProtoField.uint32 ("dji_spark_flyrec.db_subscription_tick_b", "Tick B", base.HEX) +f.db_subscription_sent_gps_lv = ProtoField.uint8 ("dji_spark_flyrec.db_subscription_sent_gps_lv", "Sent Gps Lv", base.HEX) + +local function flightrec_db_subscription_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.db_subscription_tick_b, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.db_subscription_sent_gps_lv, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 5) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Db Subscription: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Db Subscription: Payload size different than expected") end +end + +-- Flight log - Mass Est - 0x50dc + +f.mass_est_err_code = ProtoField.uint8 ("dji_spark_flyrec.mass_est_err_code", "Err Code", base.HEX) +f.mass_est_state = ProtoField.uint8 ("dji_spark_flyrec.mass_est_state", "State", base.HEX) +f.mass_est_cali_coef = ProtoField.float ("dji_spark_flyrec.mass_est_cali_coef", "Cali Coef", base.DEC) +f.mass_est_work_flag = ProtoField.uint8 ("dji_spark_flyrec.mass_est_work_flag", "Work Flag", base.HEX) +f.mass_est_mass_orig = ProtoField.float ("dji_spark_flyrec.mass_est_mass_orig", "Mass Orig", base.DEC) +f.mass_est_mass_before_filter = ProtoField.float ("dji_spark_flyrec.mass_est_mass_before_filter", "Mass Before Filter", base.DEC) +f.mass_est_mass_output = ProtoField.float ("dji_spark_flyrec.mass_est_mass_output", "Mass Output", base.DEC) +f.mass_est_vert_acc_cur_norm = ProtoField.float ("dji_spark_flyrec.mass_est_vert_acc_cur_norm", "Vert Acc Cur Norm", base.DEC) +f.mass_est_cali_hover_timer = ProtoField.float ("dji_spark_flyrec.mass_est_cali_hover_timer", "Cali Hover Timer", base.DEC) +f.mass_est_cali_sample_cnt = ProtoField.float ("dji_spark_flyrec.mass_est_cali_sample_cnt", "Cali Sample Cnt", base.DEC) +f.mass_est_cali_total_timer = ProtoField.float ("dji_spark_flyrec.mass_est_cali_total_timer", "Cali Total Timer", base.DEC) +f.mass_est_cali_speed2_mean = ProtoField.float ("dji_spark_flyrec.mass_est_cali_speed2_mean", "Cali Speed2 Mean", base.DEC) + +local function flightrec_mass_est_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.mass_est_err_code, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mass_est_state, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mass_est_cali_coef, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mass_est_work_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.mass_est_mass_orig, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mass_est_mass_before_filter, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mass_est_mass_output, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mass_est_vert_acc_cur_norm, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mass_est_cali_hover_timer, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mass_est_cali_sample_cnt, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mass_est_cali_total_timer, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.mass_est_cali_speed2_mean, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 39) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Mass Est: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Mass Est: Payload size different than expected") end +end + +-- Flight log - Lost Sats Go Home Send Package - 0x504b + +f.lost_sats_go_home_send_package_cmd_type = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_send_package_cmd_type", "Cmd Type", base.HEX) +f.lost_sats_go_home_send_package_act_type = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_send_package_act_type", "Act Type", base.HEX) +f.lost_sats_go_home_send_package_cnt_down = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_send_package_cnt_down", "Cnt Down", base.HEX) +f.lost_sats_go_home_send_package_cmd = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_send_package_cmd", "Cmd", base.HEX) +f.lost_sats_go_home_send_package_asap = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_send_package_asap", "Asap", base.HEX) +f.lost_sats_go_home_send_package_cancel = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_send_package_cancel", "Cancel", base.HEX) +f.lost_sats_go_home_send_package_lost_in_gh = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_send_package_lost_in_gh", "Lost In Gh", base.HEX) +f.lost_sats_go_home_send_package_has_req_gh = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_send_package_has_req_gh", "Has Req Gh", base.HEX) + +local function flightrec_lost_sats_go_home_send_package_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lost_sats_go_home_send_package_cmd_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_act_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_cnt_down, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_cmd, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_asap, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_cancel, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_lost_in_gh, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_send_package_has_req_gh, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 8) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lost Sats Go Home Send Package: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lost Sats Go Home Send Package: Payload size different than expected") end +end + +-- Flight log - Lost Sats Go Home Recv Package - 0x504c + +f.lost_sats_go_home_recv_package_cmd_type = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_recv_package_cmd_type", "Cmd Type", base.HEX) +f.lost_sats_go_home_recv_package_act_type = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_recv_package_act_type", "Act Type", base.HEX) +f.lost_sats_go_home_recv_package_cnt_down = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_recv_package_cnt_down", "Cnt Down", base.HEX) +f.lost_sats_go_home_recv_package_cmd = ProtoField.uint8 ("dji_spark_flyrec.lost_sats_go_home_recv_package_cmd", "Cmd", base.HEX) + +local function flightrec_lost_sats_go_home_recv_package_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.lost_sats_go_home_recv_package_cmd_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_recv_package_act_type, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_recv_package_cnt_down, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.lost_sats_go_home_recv_package_cmd, payload(offset, 1)) + offset = offset + 1 + + if (offset ~= 4) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Lost Sats Go Home Recv Package: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Lost Sats Go Home Recv Package: Payload size different than expected") end +end + +-- Flight log - Adsb Record Data - 0x504d + +f.adsb_record_data_flag = ProtoField.uint8 ("dji_spark_flyrec.adsb_record_data_flag", "Flag", base.HEX) +f.adsb_record_data_latitude = ProtoField.int32 ("dji_spark_flyrec.adsb_record_data_latitude", "Latitude", base.DEC) +f.adsb_record_data_longitude = ProtoField.int32 ("dji_spark_flyrec.adsb_record_data_longitude", "Longitude", base.DEC) +f.adsb_record_data_alititude = ProtoField.int32 ("dji_spark_flyrec.adsb_record_data_alititude", "Alititude", base.DEC) + +local function flightrec_adsb_record_data_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.adsb_record_data_flag, payload(offset, 1)) + offset = offset + 1 + + subtree:add_le (f.adsb_record_data_latitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adsb_record_data_longitude, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.adsb_record_data_alititude, payload(offset, 4)) + offset = offset + 4 + + if (offset ~= 13) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Adsb Record Data: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Adsb Record Data: Payload size different than expected") end +end + +-- Flight log - Fly Log - 0x8000 + +f.fly_log_text = ProtoField.string ("dji_spark_flyrec.fly_log_text", "Fly Log", base.ASCII) + +local function flightrec_fly_log_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.fly_log_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Sd Logs - 0xff00 + +f.sd_logs_text = ProtoField.string ("dji_spark_flyrec.sd_logs_text", "Sd Logs", base.ASCII) + +local function flightrec_sd_logs_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.sd_logs_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Sys Cfg - 0xffff + +f.sys_cfg_text = ProtoField.string ("dji_spark_flyrec.sys_cfg_text", "Sys Cfg", base.ASCII) + +local function flightrec_sys_cfg_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.sys_cfg_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Uno Log - 0xfffe + +f.uno_log_text = ProtoField.string ("dji_spark_flyrec.uno_log_text", "Uno Log", base.ASCII) + +local function flightrec_uno_log_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.uno_log_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Cfg Log - 0xfffd + +f.cfg_log_text = ProtoField.string ("dji_spark_flyrec.cfg_log_text", "Cfg Log", base.ASCII) + +local function flightrec_cfg_log_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.cfg_log_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Module Name - 0xfffc + +f.module_name_text = ProtoField.string ("dji_spark_flyrec.module_name_text", "Module Name", base.ASCII) + +local function flightrec_module_name_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add (f.module_name_text, payload(offset, payload:len() - offset)) +end + +-- Flight log - Link Host - 0x092a + +f.link_host_link_host_tx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_host_link_host_tx_bytes", "Link Host Tx Bytes", base.HEX) +f.link_host_link_host_rx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_host_link_host_rx_bytes", "Link Host Rx Bytes", base.HEX) +f.link_host_link_host_tx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_host_link_host_tx_packets", "Link Host Tx Packets", base.HEX) +f.link_host_link_host_rx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_host_link_host_rx_packets", "Link Host Rx Packets", base.HEX) +f.link_host_link_host_tx_errors = ProtoField.uint16 ("dji_spark_flyrec.link_host_link_host_tx_errors", "Link Host Tx Errors", base.HEX) +f.link_host_link_host_rx_erros = ProtoField.uint16 ("dji_spark_flyrec.link_host_link_host_rx_erros", "Link Host Rx Erros", base.HEX) +f.link_host_link_host_recv_route = ProtoField.uint16 ("dji_spark_flyrec.link_host_link_host_recv_route", "Link Host Recv Route", base.HEX) +f.link_host_link_host_send_route = ProtoField.uint16 ("dji_spark_flyrec.link_host_link_host_send_route", "Link Host Send Route", base.HEX) + +local function flightrec_link_host_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_host_link_host_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_host_link_host_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_host_link_host_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_host_link_host_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Host: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Host: Payload size different than expected") end +end + +-- Flight log - Link Pc - 0x092b + +f.link_pc_link_pc_tx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_pc_link_pc_tx_bytes", "Link Pc Tx Bytes", base.HEX) +f.link_pc_link_pc_rx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_pc_link_pc_rx_bytes", "Link Pc Rx Bytes", base.HEX) +f.link_pc_link_pc_tx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_pc_link_pc_tx_packets", "Link Pc Tx Packets", base.HEX) +f.link_pc_link_pc_rx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_pc_link_pc_rx_packets", "Link Pc Rx Packets", base.HEX) +f.link_pc_link_pc_tx_errors = ProtoField.uint16 ("dji_spark_flyrec.link_pc_link_pc_tx_errors", "Link Pc Tx Errors", base.HEX) +f.link_pc_link_pc_rx_erros = ProtoField.uint16 ("dji_spark_flyrec.link_pc_link_pc_rx_erros", "Link Pc Rx Erros", base.HEX) +f.link_pc_link_pc_recv_route = ProtoField.uint16 ("dji_spark_flyrec.link_pc_link_pc_recv_route", "Link Pc Recv Route", base.HEX) +f.link_pc_link_pc_send_route = ProtoField.uint16 ("dji_spark_flyrec.link_pc_link_pc_send_route", "Link Pc Send Route", base.HEX) + +local function flightrec_link_pc_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_pc_link_pc_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_pc_link_pc_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_pc_link_pc_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_pc_link_pc_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Pc: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Pc: Payload size different than expected") end +end + +-- Flight log - Link Vo - 0x092c + +f.link_vo_link_vo_tx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_vo_link_vo_tx_bytes", "Link Vo Tx Bytes", base.HEX) +f.link_vo_link_vo_rx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_vo_link_vo_rx_bytes", "Link Vo Rx Bytes", base.HEX) +f.link_vo_link_vo_tx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_vo_link_vo_tx_packets", "Link Vo Tx Packets", base.HEX) +f.link_vo_link_vo_rx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_vo_link_vo_rx_packets", "Link Vo Rx Packets", base.HEX) +f.link_vo_link_vo_tx_errors = ProtoField.uint16 ("dji_spark_flyrec.link_vo_link_vo_tx_errors", "Link Vo Tx Errors", base.HEX) +f.link_vo_link_vo_rx_erros = ProtoField.uint16 ("dji_spark_flyrec.link_vo_link_vo_rx_erros", "Link Vo Rx Erros", base.HEX) +f.link_vo_link_vo_recv_route = ProtoField.uint16 ("dji_spark_flyrec.link_vo_link_vo_recv_route", "Link Vo Recv Route", base.HEX) +f.link_vo_link_vo_send_route = ProtoField.uint16 ("dji_spark_flyrec.link_vo_link_vo_send_route", "Link Vo Send Route", base.HEX) + +local function flightrec_link_vo_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_vo_link_vo_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_vo_link_vo_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_vo_link_vo_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_vo_link_vo_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Vo: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Vo: Payload size different than expected") end +end + +-- Flight log - Link Sdk - 0x092d + +f.link_sdk_link_sdk_tx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_sdk_link_sdk_tx_bytes", "Link Sdk Tx Bytes", base.HEX) +f.link_sdk_link_sdk_rx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_sdk_link_sdk_rx_bytes", "Link Sdk Rx Bytes", base.HEX) +f.link_sdk_link_sdk_tx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_sdk_link_sdk_tx_packets", "Link Sdk Tx Packets", base.HEX) +f.link_sdk_link_sdk_rx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_sdk_link_sdk_rx_packets", "Link Sdk Rx Packets", base.HEX) +f.link_sdk_link_sdk_tx_errors = ProtoField.uint16 ("dji_spark_flyrec.link_sdk_link_sdk_tx_errors", "Link Sdk Tx Errors", base.HEX) +f.link_sdk_link_sdk_rx_erros = ProtoField.uint16 ("dji_spark_flyrec.link_sdk_link_sdk_rx_erros", "Link Sdk Rx Erros", base.HEX) +f.link_sdk_link_sdk_recv_route = ProtoField.uint16 ("dji_spark_flyrec.link_sdk_link_sdk_recv_route", "Link Sdk Recv Route", base.HEX) +f.link_sdk_link_sdk_send_route = ProtoField.uint16 ("dji_spark_flyrec.link_sdk_link_sdk_send_route", "Link Sdk Send Route", base.HEX) + +local function flightrec_link_sdk_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_sdk_link_sdk_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_sdk_link_sdk_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_sdk_link_sdk_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_sdk_link_sdk_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Sdk: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Sdk: Payload size different than expected") end +end + +-- Flight log - Link - 0x092e + +f.link_link = ProtoField.uint32 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint32 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) + +local function flightrec_link_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_link, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_link, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link: Payload size different than expected") end +end + +-- Flight log - Link - 0x092f + +f.link_link = ProtoField.uint32 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint32 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) +f.link_link = ProtoField.uint16 ("dji_spark_flyrec.link_link", "Link", base.HEX) + +local function flightrec_link_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_link, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_link, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_link, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link: Payload size different than expected") end +end + +-- Flight log - Link Auto Cali - 0x0930 + +f.link_auto_cali_link_auto_cali_tx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_auto_cali_link_auto_cali_tx_bytes", "Link Auto Cali Tx Bytes", base.HEX) +f.link_auto_cali_link_auto_cali_rx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_auto_cali_link_auto_cali_rx_bytes", "Link Auto Cali Rx Bytes", base.HEX) +f.link_auto_cali_link_auto_cali_tx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_auto_cali_link_auto_cali_tx_packets", "Link Auto Cali Tx Packets", base.HEX) +f.link_auto_cali_link_auto_cali_rx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_auto_cali_link_auto_cali_rx_packets", "Link Auto Cali Rx Packets", base.HEX) +f.link_auto_cali_link_auto_cali_tx_errors = ProtoField.uint16 ("dji_spark_flyrec.link_auto_cali_link_auto_cali_tx_errors", "Link Auto Cali Tx Errors", base.HEX) +f.link_auto_cali_link_auto_cali_rx_erros = ProtoField.uint16 ("dji_spark_flyrec.link_auto_cali_link_auto_cali_rx_erros", "Link Auto Cali Rx Erros", base.HEX) +f.link_auto_cali_link_auto_cali_recv_route = ProtoField.uint16 ("dji_spark_flyrec.link_auto_cali_link_auto_cali_recv_route", "Link Auto Cali Recv Route", base.HEX) +f.link_auto_cali_link_auto_cali_send_route = ProtoField.uint16 ("dji_spark_flyrec.link_auto_cali_link_auto_cali_send_route", "Link Auto Cali Send Route", base.HEX) + +local function flightrec_link_auto_cali_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_auto_cali_link_auto_cali_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_auto_cali_link_auto_cali_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_auto_cali_link_auto_cali_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_auto_cali_link_auto_cali_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Auto Cali: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Auto Cali: Payload size different than expected") end +end + +-- Flight log - Link Manual Cali - 0x0931 + +f.link_manual_cali_link_manual_cali_tx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_manual_cali_link_manual_cali_tx_bytes", "Link Manual Cali Tx Bytes", base.HEX) +f.link_manual_cali_link_manual_cali_rx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_manual_cali_link_manual_cali_rx_bytes", "Link Manual Cali Rx Bytes", base.HEX) +f.link_manual_cali_link_manual_cali_tx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_manual_cali_link_manual_cali_tx_packets", "Link Manual Cali Tx Packets", base.HEX) +f.link_manual_cali_link_manual_cali_rx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_manual_cali_link_manual_cali_rx_packets", "Link Manual Cali Rx Packets", base.HEX) +f.link_manual_cali_link_manual_cali_tx_errors = ProtoField.uint16 ("dji_spark_flyrec.link_manual_cali_link_manual_cali_tx_errors", "Link Manual Cali Tx Errors", base.HEX) +f.link_manual_cali_link_manual_cali_rx_erros = ProtoField.uint16 ("dji_spark_flyrec.link_manual_cali_link_manual_cali_rx_erros", "Link Manual Cali Rx Erros", base.HEX) +f.link_manual_cali_link_manual_cali_recv_route = ProtoField.uint16 ("dji_spark_flyrec.link_manual_cali_link_manual_cali_recv_route", "Link Manual Cali Recv Route", base.HEX) +f.link_manual_cali_link_manual_cali_send_route = ProtoField.uint16 ("dji_spark_flyrec.link_manual_cali_link_manual_cali_send_route", "Link Manual Cali Send Route", base.HEX) + +local function flightrec_link_manual_cali_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_manual_cali_link_manual_cali_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_manual_cali_link_manual_cali_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_manual_cali_link_manual_cali_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_manual_cali_link_manual_cali_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Manual Cali: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Manual Cali: Payload size different than expected") end +end + +-- Flight log - Link Cali Led - 0x0932 + +f.link_cali_led_link_cali_led_tx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_cali_led_link_cali_led_tx_bytes", "Link Cali Led Tx Bytes", base.HEX) +f.link_cali_led_link_cali_led_rx_bytes = ProtoField.uint32 ("dji_spark_flyrec.link_cali_led_link_cali_led_rx_bytes", "Link Cali Led Rx Bytes", base.HEX) +f.link_cali_led_link_cali_led_tx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_cali_led_link_cali_led_tx_packets", "Link Cali Led Tx Packets", base.HEX) +f.link_cali_led_link_cali_led_rx_packets = ProtoField.uint16 ("dji_spark_flyrec.link_cali_led_link_cali_led_rx_packets", "Link Cali Led Rx Packets", base.HEX) +f.link_cali_led_link_cali_led_tx_errors = ProtoField.uint16 ("dji_spark_flyrec.link_cali_led_link_cali_led_tx_errors", "Link Cali Led Tx Errors", base.HEX) +f.link_cali_led_link_cali_led_rx_erros = ProtoField.uint16 ("dji_spark_flyrec.link_cali_led_link_cali_led_rx_erros", "Link Cali Led Rx Erros", base.HEX) +f.link_cali_led_link_cali_led_recv_route = ProtoField.uint16 ("dji_spark_flyrec.link_cali_led_link_cali_led_recv_route", "Link Cali Led Recv Route", base.HEX) +f.link_cali_led_link_cali_led_send_route = ProtoField.uint16 ("dji_spark_flyrec.link_cali_led_link_cali_led_send_route", "Link Cali Led Send Route", base.HEX) + +local function flightrec_link_cali_led_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.link_cali_led_link_cali_led_tx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_cali_led_link_cali_led_rx_bytes, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.link_cali_led_link_cali_led_tx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_rx_packets, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_tx_errors, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_rx_erros, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_recv_route, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.link_cali_led_link_cali_led_send_route, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 20) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Link Cali Led: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Link Cali Led: Payload size different than expected") end +end + +-- Flight log - System Monitor - 0xcde0 + +f.system_monitor_root_max_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_root_max_time", "Root Max Time", base.HEX) +f.system_monitor_root_average_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_root_average_time", "Root Average Time", base.HEX) +f.system_monitor_root_warn = ProtoField.int16 ("dji_spark_flyrec.system_monitor_root_warn", "Root Warn", base.DEC) +f.system_monitor_root_pend = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_root_pend", "Root Pend", base.HEX) +f.system_monitor_root_stack = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_root_stack", "Root Stack", base.HEX) +f.system_monitor_root_reserv = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_root_reserv", "Root Reserv", base.HEX) +f.system_monitor_wq_max_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_wq_max_time", "Wq Max Time", base.HEX) +f.system_monitor_wq_average_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_wq_average_time", "Wq Average Time", base.HEX) +f.system_monitor_wq_warn = ProtoField.int16 ("dji_spark_flyrec.system_monitor_wq_warn", "Wq Warn", base.DEC) +f.system_monitor_wq_pend = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_wq_pend", "Wq Pend", base.HEX) +f.system_monitor_wq_stack = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_wq_stack", "Wq Stack", base.HEX) +f.system_monitor_wq_reserv = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_wq_reserv", "Wq Reserv", base.HEX) +f.system_monitor_task_sd_max_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_sd_max_time", "Task Sd Max Time", base.HEX) +f.system_monitor_task_sd_average_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_sd_average_time", "Task Sd Average Time", base.HEX) +f.system_monitor_task_sd_warn = ProtoField.int16 ("dji_spark_flyrec.system_monitor_task_sd_warn", "Task Sd Warn", base.DEC) +f.system_monitor_task_sd_pend = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_sd_pend", "Task Sd Pend", base.HEX) +f.system_monitor_task_sd_stack = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_sd_stack", "Task Sd Stack", base.HEX) +f.system_monitor_task_sd_reserv = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_sd_reserv", "Task Sd Reserv", base.HEX) +f.system_monitor_task_c_max_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_c_max_time", "Task C Max Time", base.HEX) +f.system_monitor_task_c_average_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_c_average_time", "Task C Average Time", base.HEX) +f.system_monitor_task_c_warn = ProtoField.int16 ("dji_spark_flyrec.system_monitor_task_c_warn", "Task C Warn", base.DEC) +f.system_monitor_task_c_pend = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_c_pend", "Task C Pend", base.HEX) +f.system_monitor_task_c_stack = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_c_stack", "Task C Stack", base.HEX) +f.system_monitor_task_c_reserv = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_c_reserv", "Task C Reserv", base.HEX) +f.system_monitor_task_ctrl_max_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_ctrl_max_time", "Task Ctrl Max Time", base.HEX) +f.system_monitor_task_ctrl_average_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_ctrl_average_time", "Task Ctrl Average Time", base.HEX) +f.system_monitor_task_ctrl_warn = ProtoField.int16 ("dji_spark_flyrec.system_monitor_task_ctrl_warn", "Task Ctrl Warn", base.DEC) +f.system_monitor_task_ctrl_pend = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_ctrl_pend", "Task Ctrl Pend", base.HEX) +f.system_monitor_task_ctrl_stack = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_ctrl_stack", "Task Ctrl Stack", base.HEX) +f.system_monitor_task_ctrl_reserv = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_ctrl_reserv", "Task Ctrl Reserv", base.HEX) +f.system_monitor_task_a_max_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_a_max_time", "Task A Max Time", base.HEX) +f.system_monitor_task_a_average_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_a_average_time", "Task A Average Time", base.HEX) +f.system_monitor_task_a_warn = ProtoField.int16 ("dji_spark_flyrec.system_monitor_task_a_warn", "Task A Warn", base.DEC) +f.system_monitor_task_a_pend = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_a_pend", "Task A Pend", base.HEX) +f.system_monitor_task_a_stack = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_a_stack", "Task A Stack", base.HEX) +f.system_monitor_task_a_reserv = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_a_reserv", "Task A Reserv", base.HEX) +f.system_monitor_task_imu_max_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_imu_max_time", "Task Imu Max Time", base.HEX) +f.system_monitor_task_imu_average_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_imu_average_time", "Task Imu Average Time", base.HEX) +f.system_monitor_task_imu_warn = ProtoField.int16 ("dji_spark_flyrec.system_monitor_task_imu_warn", "Task Imu Warn", base.DEC) +f.system_monitor_task_imu_pend = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_imu_pend", "Task Imu Pend", base.HEX) +f.system_monitor_task_imu_stack = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_imu_stack", "Task Imu Stack", base.HEX) +f.system_monitor_task_imu_reserv = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_imu_reserv", "Task Imu Reserv", base.HEX) +f.system_monitor_task_e_max_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_e_max_time", "Task E Max Time", base.HEX) +f.system_monitor_task_e_average_time = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_e_average_time", "Task E Average Time", base.HEX) +f.system_monitor_task_e_warn = ProtoField.int16 ("dji_spark_flyrec.system_monitor_task_e_warn", "Task E Warn", base.DEC) +f.system_monitor_task_e_pend = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_e_pend", "Task E Pend", base.HEX) +f.system_monitor_task_e_stack = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_e_stack", "Task E Stack", base.HEX) +f.system_monitor_task_e_reserv = ProtoField.uint16 ("dji_spark_flyrec.system_monitor_task_e_reserv", "Task E Reserv", base.HEX) + +local function flightrec_system_monitor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.system_monitor_root_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_root_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_wq_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_sd_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_sd_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_sd_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_sd_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_sd_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_sd_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_c_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_ctrl_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_a_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_imu_reserv, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_e_max_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_e_average_time, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_e_warn, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_e_pend, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_e_stack, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.system_monitor_task_e_reserv, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 96) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"System Monitor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"System Monitor: Payload size different than expected") end +end + +-- Flight log - UART Monitor - 0xcddf + +f.uart_monitor_uart0_tx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart0_tx", "Uart0 Tx", base.HEX) +f.uart_monitor_uart0_txlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart0_txlost", "Uart0 Txlost", base.HEX) +f.uart_monitor_uart0_rx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart0_rx", "Uart0 Rx", base.HEX) +f.uart_monitor_uart0_rxlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart0_rxlost", "Uart0 Rxlost", base.HEX) +f.uart_monitor_uart0_dbg0 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart0_dbg0", "Uart0 Dbg0", base.DEC) +f.uart_monitor_uart0_dbg1 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart0_dbg1", "Uart0 Dbg1", base.DEC) +f.uart_monitor_uart0_dbg2 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart0_dbg2", "Uart0 Dbg2", base.DEC) +f.uart_monitor_uart0_dbg3 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart0_dbg3", "Uart0 Dbg3", base.DEC) +f.uart_monitor_uart0_dbg4 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart0_dbg4", "Uart0 Dbg4", base.DEC) +f.uart_monitor_uart0_dbg5 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart0_dbg5", "Uart0 Dbg5", base.DEC) +f.uart_monitor_uart1_tx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart1_tx", "Uart1 Tx", base.HEX) +f.uart_monitor_uart1_txlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart1_txlost", "Uart1 Txlost", base.HEX) +f.uart_monitor_uart1_rx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart1_rx", "Uart1 Rx", base.HEX) +f.uart_monitor_uart1_rxlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart1_rxlost", "Uart1 Rxlost", base.HEX) +f.uart_monitor_uart1_dbg0 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart1_dbg0", "Uart1 Dbg0", base.DEC) +f.uart_monitor_uart1_dbg1 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart1_dbg1", "Uart1 Dbg1", base.DEC) +f.uart_monitor_uart1_dbg2 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart1_dbg2", "Uart1 Dbg2", base.DEC) +f.uart_monitor_uart1_dbg3 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart1_dbg3", "Uart1 Dbg3", base.DEC) +f.uart_monitor_uart1_dbg4 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart1_dbg4", "Uart1 Dbg4", base.DEC) +f.uart_monitor_uart1_dbg5 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart1_dbg5", "Uart1 Dbg5", base.DEC) +f.uart_monitor_uart2_tx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart2_tx", "Uart2 Tx", base.HEX) +f.uart_monitor_uart2_txlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart2_txlost", "Uart2 Txlost", base.HEX) +f.uart_monitor_uart2_rx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart2_rx", "Uart2 Rx", base.HEX) +f.uart_monitor_uart2_rxlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart2_rxlost", "Uart2 Rxlost", base.HEX) +f.uart_monitor_uart2_dbg0 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart2_dbg0", "Uart2 Dbg0", base.DEC) +f.uart_monitor_uart2_dbg1 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart2_dbg1", "Uart2 Dbg1", base.DEC) +f.uart_monitor_uart2_dbg2 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart2_dbg2", "Uart2 Dbg2", base.DEC) +f.uart_monitor_uart2_dbg3 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart2_dbg3", "Uart2 Dbg3", base.DEC) +f.uart_monitor_uart2_dbg4 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart2_dbg4", "Uart2 Dbg4", base.DEC) +f.uart_monitor_uart2_dbg5 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart2_dbg5", "Uart2 Dbg5", base.DEC) +f.uart_monitor_uart4_tx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart4_tx", "Uart4 Tx", base.HEX) +f.uart_monitor_uart4_txlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart4_txlost", "Uart4 Txlost", base.HEX) +f.uart_monitor_uart4_rx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart4_rx", "Uart4 Rx", base.HEX) +f.uart_monitor_uart4_rxlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart4_rxlost", "Uart4 Rxlost", base.HEX) +f.uart_monitor_uart4_dbg0 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart4_dbg0", "Uart4 Dbg0", base.DEC) +f.uart_monitor_uart4_dbg1 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart4_dbg1", "Uart4 Dbg1", base.DEC) +f.uart_monitor_uart4_dbg2 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart4_dbg2", "Uart4 Dbg2", base.DEC) +f.uart_monitor_uart4_dbg3 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart4_dbg3", "Uart4 Dbg3", base.DEC) +f.uart_monitor_uart4_dbg4 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart4_dbg4", "Uart4 Dbg4", base.DEC) +f.uart_monitor_uart4_dbg5 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart4_dbg5", "Uart4 Dbg5", base.DEC) +f.uart_monitor_uart5_tx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart5_tx", "Uart5 Tx", base.HEX) +f.uart_monitor_uart5_txlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart5_txlost", "Uart5 Txlost", base.HEX) +f.uart_monitor_uart5_rx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart5_rx", "Uart5 Rx", base.HEX) +f.uart_monitor_uart5_rxlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart5_rxlost", "Uart5 Rxlost", base.HEX) +f.uart_monitor_uart5_dbg0 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart5_dbg0", "Uart5 Dbg0", base.DEC) +f.uart_monitor_uart5_dbg1 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart5_dbg1", "Uart5 Dbg1", base.DEC) +f.uart_monitor_uart5_dbg2 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart5_dbg2", "Uart5 Dbg2", base.DEC) +f.uart_monitor_uart5_dbg3 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart5_dbg3", "Uart5 Dbg3", base.DEC) +f.uart_monitor_uart5_dbg4 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart5_dbg4", "Uart5 Dbg4", base.DEC) +f.uart_monitor_uart5_dbg5 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart5_dbg5", "Uart5 Dbg5", base.DEC) +f.uart_monitor_uart7_tx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart7_tx", "Uart7 Tx", base.HEX) +f.uart_monitor_uart7_txlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart7_txlost", "Uart7 Txlost", base.HEX) +f.uart_monitor_uart7_rx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart7_rx", "Uart7 Rx", base.HEX) +f.uart_monitor_uart7_rxlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart7_rxlost", "Uart7 Rxlost", base.HEX) +f.uart_monitor_uart7_dbg0 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart7_dbg0", "Uart7 Dbg0", base.DEC) +f.uart_monitor_uart7_dbg1 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart7_dbg1", "Uart7 Dbg1", base.DEC) +f.uart_monitor_uart7_dbg2 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart7_dbg2", "Uart7 Dbg2", base.DEC) +f.uart_monitor_uart7_dbg3 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart7_dbg3", "Uart7 Dbg3", base.DEC) +f.uart_monitor_uart7_dbg4 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart7_dbg4", "Uart7 Dbg4", base.DEC) +f.uart_monitor_uart7_dbg5 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart7_dbg5", "Uart7 Dbg5", base.DEC) +f.uart_monitor_uart100_tx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart100_tx", "Uart100 Tx", base.HEX) +f.uart_monitor_uart100_txlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart100_txlost", "Uart100 Txlost", base.HEX) +f.uart_monitor_uart100_rx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart100_rx", "Uart100 Rx", base.HEX) +f.uart_monitor_uart100_rxlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart100_rxlost", "Uart100 Rxlost", base.HEX) +f.uart_monitor_uart100_dbg0 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart100_dbg0", "Uart100 Dbg0", base.DEC) +f.uart_monitor_uart100_dbg1 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart100_dbg1", "Uart100 Dbg1", base.DEC) +f.uart_monitor_uart100_dbg2 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart100_dbg2", "Uart100 Dbg2", base.DEC) +f.uart_monitor_uart100_dbg3 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart100_dbg3", "Uart100 Dbg3", base.DEC) +f.uart_monitor_uart100_dbg4 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart100_dbg4", "Uart100 Dbg4", base.DEC) +f.uart_monitor_uart100_dbg5 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart100_dbg5", "Uart100 Dbg5", base.DEC) +f.uart_monitor_uart179_tx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart179_tx", "Uart179 Tx", base.HEX) +f.uart_monitor_uart179_txlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart179_txlost", "Uart179 Txlost", base.HEX) +f.uart_monitor_uart179_rx = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart179_rx", "Uart179 Rx", base.HEX) +f.uart_monitor_uart179_rxlost = ProtoField.uint32 ("dji_spark_flyrec.uart_monitor_uart179_rxlost", "Uart179 Rxlost", base.HEX) +f.uart_monitor_uart179_dbg0 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart179_dbg0", "Uart179 Dbg0", base.DEC) +f.uart_monitor_uart179_dbg1 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart179_dbg1", "Uart179 Dbg1", base.DEC) +f.uart_monitor_uart179_dbg2 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart179_dbg2", "Uart179 Dbg2", base.DEC) +f.uart_monitor_uart179_dbg3 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart179_dbg3", "Uart179 Dbg3", base.DEC) +f.uart_monitor_uart179_dbg4 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart179_dbg4", "Uart179 Dbg4", base.DEC) +f.uart_monitor_uart179_dbg5 = ProtoField.int16 ("dji_spark_flyrec.uart_monitor_uart179_dbg5", "Uart179 Dbg5", base.DEC) + +local function flightrec_uart_monitor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.uart_monitor_uart0_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart0_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart0_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart0_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart0_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart0_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart1_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart1_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart1_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart1_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart1_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart1_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart1_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart1_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart1_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart1_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart2_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart2_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart2_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart2_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart2_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart4_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart4_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart4_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart4_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart4_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart5_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart5_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart5_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart5_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart5_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart7_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart7_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart7_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart7_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart7_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart100_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart100_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart100_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart100_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart100_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart179_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart179_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart179_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.uart_monitor_uart179_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.uart_monitor_uart179_dbg5, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 224) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"UART Monitor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"UART Monitor: Payload size different than expected") end +end + +-- Flight log - Can Monitor - 0xcdde + +f.can_monitor_can0_tx = ProtoField.uint32 ("dji_spark_flyrec.can_monitor_can0_tx", "Can0 Tx", base.HEX) +f.can_monitor_can0_txlost = ProtoField.uint32 ("dji_spark_flyrec.can_monitor_can0_txlost", "Can0 Txlost", base.HEX) +f.can_monitor_can0_rx = ProtoField.uint32 ("dji_spark_flyrec.can_monitor_can0_rx", "Can0 Rx", base.HEX) +f.can_monitor_can0_rxlost = ProtoField.uint32 ("dji_spark_flyrec.can_monitor_can0_rxlost", "Can0 Rxlost", base.HEX) +f.can_monitor_can0_dbg0 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can0_dbg0", "Can0 Dbg0", base.DEC) +f.can_monitor_can0_dbg1 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can0_dbg1", "Can0 Dbg1", base.DEC) +f.can_monitor_can0_dbg2 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can0_dbg2", "Can0 Dbg2", base.DEC) +f.can_monitor_can0_dbg3 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can0_dbg3", "Can0 Dbg3", base.DEC) +f.can_monitor_can0_dbg4 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can0_dbg4", "Can0 Dbg4", base.DEC) +f.can_monitor_can0_dbg5 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can0_dbg5", "Can0 Dbg5", base.DEC) +f.can_monitor_can1_tx = ProtoField.uint32 ("dji_spark_flyrec.can_monitor_can1_tx", "Can1 Tx", base.HEX) +f.can_monitor_can1_txlost = ProtoField.uint32 ("dji_spark_flyrec.can_monitor_can1_txlost", "Can1 Txlost", base.HEX) +f.can_monitor_can1_rx = ProtoField.uint32 ("dji_spark_flyrec.can_monitor_can1_rx", "Can1 Rx", base.HEX) +f.can_monitor_can1_rxlost = ProtoField.uint32 ("dji_spark_flyrec.can_monitor_can1_rxlost", "Can1 Rxlost", base.HEX) +f.can_monitor_can1_dbg0 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can1_dbg0", "Can1 Dbg0", base.DEC) +f.can_monitor_can1_dbg1 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can1_dbg1", "Can1 Dbg1", base.DEC) +f.can_monitor_can1_dbg2 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can1_dbg2", "Can1 Dbg2", base.DEC) +f.can_monitor_can1_dbg3 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can1_dbg3", "Can1 Dbg3", base.DEC) +f.can_monitor_can1_dbg4 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can1_dbg4", "Can1 Dbg4", base.DEC) +f.can_monitor_can1_dbg5 = ProtoField.int16 ("dji_spark_flyrec.can_monitor_can1_dbg5", "Can1 Dbg5", base.DEC) + +local function flightrec_can_monitor_dissector(payload, pinfo, subtree) + local offset = 0 + + subtree:add_le (f.can_monitor_can0_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can0_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can0_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can0_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can0_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can0_dbg5, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_tx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can1_txlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can1_rx, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can1_rxlost, payload(offset, 4)) + offset = offset + 4 + + subtree:add_le (f.can_monitor_can1_dbg0, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg1, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg2, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg3, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg4, payload(offset, 2)) + offset = offset + 2 + + subtree:add_le (f.can_monitor_can1_dbg5, payload(offset, 2)) + offset = offset + 2 + + if (offset ~= 56) then subtree:add_expert_info(PI_MALFORMED,PI_ERROR,"Can Monitor: Offset does not match - internal inconsistency") end + if (payload:len() ~= offset) then subtree:add_expert_info(PI_PROTOCOL,PI_WARN,"Can Monitor: Payload size different than expected") end +end + +DJI_SPARK_FLIGHT_RECORD_DISSECT = { + [0x03e8] = flightrec_controller_dissector, + [0x03e9] = flightrec_aircraft_condition_dissector, + [0x03ea] = flightrec_serial_api_inputs_dissector, + [0x03ec] = flightrec_go_home_info_dissector, + [0x03ed] = flightrec_fmu_devices_run_time_dissector, + [0x03f0] = flightrec_fmu_sa_run_time_dissector, + [0x03f1] = flightrec_fmu_write_run_time_dissector, + [0x03f3] = flightrec_fmu_api_run_time_dissector, + [0x03f4] = flightrec_cfg_errs_dissector, + [0x03f5] = flightrec_new_api_err_time_dissector, + [0x03ee] = flightrec_poi_debug_data_dissector, + [0x03f6] = flightrec_adv_gh_debug_data_dissector, + [0x03f7] = flightrec_ahrs_data_dissector, + [0x0800] = flightrec_imu_atti_0_dissector, + [0x0801] = flightrec_imu_atti_1_dissector, + [0x0802] = flightrec_imu_atti_2_dissector, + [0x0810] = flightrec_imu_ex_0_dissector, + [0x0811] = flightrec_imu_ex_1_dissector, + [0x0812] = flightrec_imu_ex_2_dissector, + [0x08a0] = flightrec_atti_mini0_dissector, + [0x08a1] = flightrec_atti_mini1_dissector, + [0x08a2] = flightrec_atti_mini2_dissector, + [0x0860] = flightrec_imu_fdi_0_dissector, + [0x0861] = flightrec_imu_fdi_1_dissector, + [0x0862] = flightrec_imu_fdi_2_dissector, + [0x03ef] = flightrec_hl_debug_data_dissector, + [0x03f2] = flightrec_farm_db_data_dissector, + [0x4ef7] = flightrec_spray_sys_ctrl_cmd_dissector, + [0x4ef8] = flightrec_spray_sys_state_dissector, + [0x04b0] = flightrec_ctrl_vert_debug_dissector, + [0x04b1] = flightrec_ctrl_pos_vert_debug_dissector, + [0x04b2] = flightrec_ctrl_vel_vert_debug_dissector, + [0x04b3] = flightrec_ctrl_acc_vert_debug_dissector, + [0x0514] = flightrec_ctrl_horiz_debug_dissector, + [0x0515] = flightrec_ctrl_horiz_pos_debug_dissector, + [0x0516] = flightrec_ctrl_horiz_vel_debug_dissector, + [0x0518] = flightrec_ctrl_horiz_atti_debug_dissector, + [0x0519] = flightrec_ctrl_horiz_ang_vel_debug_dissector, + [0x051a] = flightrec_ctrl_horiz_ccpm_debug_dissector, + [0x051b] = flightrec_ctrl_horiz_motor_debug_dissector, + [0x051c] = flightrec_ctrl_sweep_test_dissector, + [0x0460] = flightrec_way_debug_info_dissector, + [0x0461] = flightrec_svo_avoid_dissector, + [0x0578] = flightrec_simulator_debug_data_dissector, + [0x0579] = flightrec_simulator_gyro_acc_data_400hz_dissector, + [0x057c] = flightrec_simulator_press_data_200hz_dissector, + [0x057a] = flightrec_simulator_mag_data_50hz_dissector, + [0x057b] = flightrec_simulator_gps_data_5hz_dissector, + [0x057e] = flightrec_simulator_motor_data_dissector, + [0x057d] = flightrec_device_change_times_dissector, + [0x0582] = flightrec_simulator_config_aircraft_param_dissector, + [0x0583] = flightrec_simulator_config_battery_param_dissector, + [0x0584] = flightrec_simulator_config_environment_param_dissector, + [0x0585] = flightrec_simulator_config_motor_param_1_dissector, + [0x0587] = flightrec_simulator_config_sensor_param_dissector, + [0xcff2] = flightrec_rtkdata_dissector, + [0x0640] = flightrec_genral_debug_data_dissector, + [0x06a4] = flightrec_rc_debug_info_dissector, + [0x08d0] = flightrec_cali_mag_00_dissector, + [0x08d1] = flightrec_cali_mag_01_dissector, + [0x08d2] = flightrec_cali_mag_02_dissector, + [0x0828] = flightrec_lpf_gyr_acc0_dissector, + [0x0829] = flightrec_lpf_gyr_acc1_dissector, + [0x082a] = flightrec_lpf_gyr_acc2_dissector, + [0x08e6] = flightrec_app_temp_bias0_dissector, + [0x08e7] = flightrec_app_temp_bias1_dissector, + [0x08e8] = flightrec_app_temp_bias2_dissector, + [0x08e4] = flightrec_inner_temp_bias0_dissector, + [0x08e5] = flightrec_inner_temp_bias1_dissector, + [0x08e6] = flightrec_inner_temp_bias2_dissector, + [0x06ae] = flightrec_battery_info_dissector, + [0x06af] = flightrec_battery_status_dissector, + [0x06b0] = flightrec_smart_battery_info_dissector, + [0x0708] = flightrec_statistical_info_dissector, + [0x2764] = flightrec_ns_sensor_quality_dissector, + [0x2765] = flightrec_ns_data_debug_dissector, + [0x2766] = flightrec_ns_data_component_dissector, + [0x2767] = flightrec_ns_data_residuals_dissector, + [0x2768] = flightrec_ns_data_posi_ofst_dissector, + [0x2769] = flightrec_ns_sensor_connect_dissector, + [0x276a] = flightrec_esc_data_dissector, + [0x276b] = flightrec_high_freq_gyro_data_0_dissector, + [0x276c] = flightrec_high_freq_gyro_data_1_dissector, + [0x276d] = flightrec_high_freq_gyro_data_2_dissector, + [0x276e] = flightrec_rc_gps_data_dissector, + [0x2771] = flightrec_cb_temp_dissector, + [0x2772] = flightrec_cb_press_dissector, + [0x2774] = flightrec_air_compensate_data_dissector, + [0x2775] = flightrec_vision_tof_dissector, + [0x2776] = flightrec_gs_rtk_data_dissector, + [0x2777] = flightrec_ex_raw_baro1_dissector, + [0x2778] = flightrec_ex_raw_baro2_dissector, + [0x2779] = flightrec_ex_raw_compass_dissector, + [0x27d8] = flightrec_gear_status_dissector, + [0x4ef2] = flightrec_radar_bottom_dissector, + [0x4ef3] = flightrec_radar_avoid_front_dissector, + [0x4ef4] = flightrec_radar_avoid_back_dissector, + [0x4ef5] = flightrec_radar_predict_front_dissector, + [0x4ef6] = flightrec_radar_predict_back_dissector, + [0x4f4c] = flightrec_gyro_raw0_0_dissector, + [0x4f4d] = flightrec_gyro_raw0_1_dissector, + [0x4f4e] = flightrec_gyro_raw0_2_dissector, + [0x4f50] = flightrec_gyro_raw1_0_dissector, + [0x4f51] = flightrec_gyro_raw1_1_dissector, + [0x4f54] = flightrec_gyro_raw2_0_dissector, + [0x4f55] = flightrec_gyro_raw2_1_dissector, + [0x4f58] = flightrec_acc_raw0_0_dissector, + [0x4f59] = flightrec_acc_raw0_1_dissector, + [0x4f5a] = flightrec_acc_raw0_2_dissector, + [0x4f5c] = flightrec_acc_raw1_0_dissector, + [0x4f5d] = flightrec_acc_raw1_1_dissector, + [0x4f60] = flightrec_acc_raw2_0_dissector, + [0x4f61] = flightrec_acc_raw2_1_dissector, + [0x4f64] = flightrec_sensor_push0_0_dissector, + [0x4f65] = flightrec_sensor_push0_1_dissector, + [0x4f6a] = flightrec_baro_raw0_dissector, + [0x4f6b] = flightrec_baro_raw1_dissector, + [0x4f6c] = flightrec_baro_raw2_dissector, + [0x4f6d] = flightrec_baro_raw3_dissector, + [0x4f74] = flightrec_compass_raw0_dissector, + [0x4f75] = flightrec_compass_raw1_dissector, + [0x4f76] = flightrec_compass_raw2_dissector, + [0x4f7e] = flightrec_compass_filter0_dissector, + [0x4f7f] = flightrec_compass_filter1_dissector, + [0x4f80] = flightrec_compass_filter2_dissector, + [0x4f88] = flightrec_imu_rotated_data_dissector, + [0x5014] = flightrec_raw_wristband_data_dissector, + [0x5015] = flightrec_wristband_dissector, + [0x501e] = flightrec_ctrl_device_dissector, + [0x4e20] = flightrec_battery_info_2_dissector, + [0x4e21] = flightrec_pwm_output_dissector, + [0x0880] = flightrec_temp_ctl_recorde0_dissector, + [0x0881] = flightrec_temp_ctl_recorde1_dissector, + [0x0882] = flightrec_temp_ctl_recorde2_dissector, + [0x4e22] = flightrec_airport_limit_debug_info_dissector, + [0x4e23] = flightrec_battery_raw_data_1_dissector, + [0x4e24] = flightrec_battery_raw_data_2_dissector, + [0x4e25] = flightrec_sys_err_dissector, + [0x4e27] = flightrec_quick_circle_debug_dissector, + [0x4e28] = flightrec_battery_info_3_dissector, + [0x4e29] = flightrec_rc_func_data_dissector, + [0x4e2a] = flightrec_rc_func_state_dissector, + [0x4e2b] = flightrec_gps_monitor_1_dissector, + [0x4e2c] = flightrec_gps_monitor_2_dissector, + [0x4e2d] = flightrec_gps_monitor_3_dissector, + [0x0885] = flightrec_fw_g_api_dissector, + [0x0887] = flightrec_fw_param_ekf_dissector, + [0x27e2] = flightrec_ex_raw_airspeed_dissector, + [0x5000] = flightrec_vibrate_detect_gyro_dissector, + [0x500a] = flightrec_airprot_limit_data_dissector, + [0x500b] = flightrec_adv_fl_limit_data_dissector, + [0x0888] = flightrec_db_subscription_dissector, + [0x50dc] = flightrec_mass_est_dissector, + [0x504b] = flightrec_lost_sats_go_home_send_package_dissector, + [0x504c] = flightrec_lost_sats_go_home_recv_package_dissector, + [0x504d] = flightrec_adsb_record_data_dissector, + [0x8000] = flightrec_fly_log_dissector, + [0xff00] = flightrec_sd_logs_dissector, + [0xffff] = flightrec_sys_cfg_dissector, + [0xfffe] = flightrec_uno_log_dissector, + [0xfffd] = flightrec_cfg_log_dissector, + [0xfffc] = flightrec_module_name_dissector, + [0x092a] = flightrec_link_host_dissector, + [0x092b] = flightrec_link_pc_dissector, + [0x092c] = flightrec_link_vo_dissector, + [0x092d] = flightrec_link_sdk_dissector, + [0x092e] = flightrec_link_dissector, + [0x092f] = flightrec_link_dissector, + [0x0930] = flightrec_link_auto_cali_dissector, + [0x0931] = flightrec_link_manual_cali_dissector, + [0x0932] = flightrec_link_cali_led_dissector, + [0xcde0] = flightrec_system_monitor_dissector, + [0xcddf] = flightrec_uart_monitor_dissector, + [0xcdde] = flightrec_can_monitor_dissector, +} + +-- [0] Start of Pkt, always 0x55 +f.delimiter = ProtoField.uint8 ("dji_spark_flyrec.delimiter", "Delimiter", base.HEX) +-- [1] Length of Pkt +f.length = ProtoField.uint16 ("dji_spark_flyrec.length", "Length", base.HEX, nil, 0x3FF) +-- [2] Protocol version +f.protocol_version = ProtoField.uint16 ("dji_spark_flyrec.protover", "Protocol Version", base.HEX, nil, 0xFC00) +-- [3] Data Type +f.datatype = ProtoField.uint8 ("dji_spark_flyrec.hdr_crc", "Header CRC", base.HEX) + +-- Fields for ProtoVer = 0 (Flight Record) + +-- [4-5] Log Entry Type +f.etype = ProtoField.uint16 ("dji_spark_flyrec.etype", "Log Entry Type", base.HEX, DJI_SPARK_FLIGHT_RECORD_ENTRY_TYPE) +-- [6-9] Sequence Ctr +f.seqctr = ProtoField.uint16 ("dji_spark_flyrec.seqctr", "Seq Counter", base.DEC) +-- [B] Payload (optional) +f.payload = ProtoField.bytes ("dji_spark_flyrec.payload", "Payload", base.SPACE) + +-- [B+Payload] CRC +f.crc = ProtoField.uint16 ("dji_spark_flyrec.crc", "CRC", base.HEX) + +local function flightrec_decrypt_payload(pkt_length, buffer) + local offset = 6 + local seqctr = buffer(offset,4):le_uint() + + offset = 10 + local payload = buffer(offset, pkt_length - offset - 2):bytes() + + for i = 0, (payload:len() - 1) do + payload:set_index( i, bit.bxor(payload:get_index(i), bit32.band(seqctr, 0xFF) ) ) + end + + return payload +end + +-- Dissector top level function; is called within this dissector, but can also be called from outsude +function dji_spark_flyrec_main_dissector(buffer, pinfo, subtree) + local offset = 1 + + -- [1-2] The Pkt length | protocol version + local pkt_length = buffer(offset,2):le_uint() + local pkt_protover = pkt_length + -- bit32 lib requires LUA 5.2 + pkt_length = bit32.band(pkt_length, 0x03FF) + pkt_protover = bit32.rshift(bit32.band(pkt_protover, 0xFC00), 10) + + subtree:add_le (f.length, buffer(offset, 2)) + subtree:add_le (f.protocol_version, buffer(offset, 2)) + offset = offset + 2 + + -- [3] Header Checksum + subtree:add (f.datatype, buffer(offset, 1)) + offset = offset + 1 + + if pkt_protover == 0 then + + -- [4] Log entry type + local etype = buffer(offset,2):le_uint() + subtree:add_le (f.etype, buffer(offset, 2)) + offset = offset + 2 + + -- [6] Sequence Counter + subtree:add_le (f.seqctr, buffer(offset, 4)) + offset = offset + 4 + + assert(offset == 10, "Offset shifted - dissector internal inconsistency") + + -- [A] Payload + if pkt_length > offset+2 then + local payload_buf = flightrec_decrypt_payload(pkt_length, buffer) + local payload_tree = subtree:add(f.payload, buffer(offset, pkt_length - offset - 2)) + payload_tree:set_text("Payload: " .. bytearray_to_hexstr(payload_buf)); + local payload_tvb = ByteArray.tvb(payload_buf, "Payload") + + -- If we have a dissector for this kind of command, run it + local dissector = DJI_SPARK_FLIGHT_RECORD_DISSECT[etype] + + if dissector ~= nil then + dissector(payload_tvb, pinfo, payload_tree) + end + + end + + end + + -- CRC + subtree:add_le(f.crc, buffer(pkt_length - 2, 2)) + offset = offset + 2 +end + +-- The protocol dissector itself +function DJI_SPARK_FLYREC_PROTO.dissector (buffer, pinfo, tree) + + local subtree = tree:add (DJI_SPARK_FLYREC_PROTO, buffer()) + + -- The Pkt start byte + local offset = 0 + + local pkt_type = buffer(offset,1):uint() + subtree:add (f.delimiter, buffer(offset, 1)) + offset = offset + 1 + + if pkt_type == 0x55 then + dji_spark_flyrec_main_dissector(buffer, pinfo, subtree) + end + +end + +-- A initialization routine +function DJI_SPARK_FLYREC_PROTO.init () +end diff --git a/dissectors/dji-dumlv1/src/dji-spark.lua b/dissectors/dji-dumlv1/src/dji-spark.lua new file mode 100644 index 0000000..8180d1e --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-spark.lua @@ -0,0 +1,36 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-spark.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit 1865b36e0bc9c1f10ab6fff64554f332acb5e5ec du 24/12/2018). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- Create the aggeregate dissector +DJI_SPARK_PROTO = Proto ("dji_spark", "DJI_SPARK", "Dji Spark protocols aggregate") + +local f = DJI_SPARK_PROTO.fields + +-- [0] Start of Pkt, always 0x55 +f.delimiter = ProtoField.uint8 ("dji_spark.delimiter", "Delimiter", base.HEX) + +-- The protocol dissector itself +function DJI_SPARK_PROTO.dissector (buffer, pinfo, tree) + + local subtree = tree:add (DJI_SPARK_PROTO, buffer()) + + -- The Pkt start byte determines the pkt type + local offset = 0 + + local pkt_type = buffer(offset,1):uint() + subtree:add (f.delimiter, buffer(offset, 1)) + offset = offset + 1 + + if pkt_type == 0x55 then + local pkt_protover = buffer(offset,2):le_uint() + pkt_protover = bit32.rshift(bit32.band(pkt_protover, 0xFC00), 10) + if pkt_protover == 0 then + dji_spark_flyrec_main_dissector(buffer, pinfo, subtree) + else + dji_dumlv1_main_dissector(buffer, pinfo, subtree) + end + end + +end diff --git a/dissectors/dji-dumlv1/src/dji-write-kml.lua b/dissectors/dji-dumlv1/src/dji-write-kml.lua new file mode 100644 index 0000000..f2fdfd4 --- /dev/null +++ b/dissectors/dji-dumlv1/src/dji-write-kml.lua @@ -0,0 +1,1751 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/dji-write-kml.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit 6d2d5c37de3954d9f83aad3a1cb56fbb93ffdd4d du 15/07/2019). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +-- dji-write-kml.lua +-------------------------------------------------------------------------------- +--[[ + This is a Wireshark Lua-based KML file exporter for DJI packets. + + To enable debug output in LUA console, set `console.log.level: 252` in + Wireshark `preferences` file. +--]] +-------------------------------------------------------------------------------- + +local wireshark_name = "Wireshark" +if not GUI_ENABLED then + wireshark_name = "Tshark" +end + +-- verify Wireshark is new enough +local major, minor, micro = get_version():match("(%d+)%.(%d+)%.(%d+)") +if major and tonumber(major) <= 1 and ((tonumber(minor) <= 10) or (tonumber(minor) == 11 and tonumber(micro) < 3)) then + error( "Sorry, but your " .. wireshark_name .. " version (" .. get_version() .. ") is too old for this script!\n" .. + "This script needs " .. wireshark_name .. "version 1.11.3 or higher.\n" ) +end + +-- verify we have the FileHandler class in wireshark +assert(register_menu, wireshark_name .. " does not have the register_menu func!") + +-- Enums +local TYP_NULL, -- no packet + TYP_AIR_POS_GPS, -- raw position data from GPS, with absolute altitude included + TYP_AIR_POS_ACC, -- position data extended and averaged from all data sources + TYP_AIR_ROTAT, -- aircraft rotation angles + TYP_RC_STAT, -- Remote Controller status + TYP_FLYC_STAT, -- Flight Controller status + TYP_MOTOR_STAT -- ESCs and motors status + = 0, 1, 2, 3, 4, 5, 6 + +local CONDTN_NONE, -- unconditional + CONDTN_MOTOR_ON, -- show only when motors on + CONDTN_MOTOR_OFF -- show only when motors not running + = 0, 1, 2 + +-- Default settings to be stored within private_table +local default_settings = +{ + packets = {}, + lookat = { lon = 0.0, lat = 0.0, rel_alt = 0.0, abs_alt = 0.0, rng = 1.0, }, + path_type = 0, + min_dist_shift = 0.012, + ground_altitude = nil, + model_detail_lv = 2, + air_pos_pkt_typ = TYP_AIR_POS_ACC, +} + +---------------------------------------- +-- in Lua, we have access to encapsulation types in the 'wtap_encaps' table, +-- but those numbers don't actually necessarily match the numbers in pcap files +-- for the encapsulation type. We'll use this table to map selected encaps; +-- these are taken from wiretap/pcap-common.c +local pcap2wtap = { + [0] = wtap_encaps.NULL, + [1] = wtap_encaps.ETHERNET, + [6] = wtap_encaps.TOKEN_RING, + [8] = wtap_encaps.SLIP, + [9] = wtap_encaps.PPP, + [101] = wtap_encaps.RAW_IP, + [105] = wtap_encaps.IEEE_802_11, + [127] = wtap_encaps.IEEE_802_11_RADIOTAP, + [140] = wtap_encaps.MTP2, + [141] = wtap_encaps.MTP3, + [143] = wtap_encaps.DOCSIS, + [147] = wtap_encaps.USER0, + [148] = wtap_encaps.USER1, + [149] = wtap_encaps.USER2, + [150] = wtap_encaps.USER3, + [151] = wtap_encaps.USER4, + [152] = wtap_encaps.USER5, + [153] = wtap_encaps.USER6, + [154] = wtap_encaps.USER7, + [155] = wtap_encaps.USER8, + [156] = wtap_encaps.USER9, + [157] = wtap_encaps.USER10, + [158] = wtap_encaps.USER11, + [159] = wtap_encaps.USER12, + [160] = wtap_encaps.USER13, + [161] = wtap_encaps.USER14, + [162] = wtap_encaps.USER15, + [186] = wtap_encaps.USB, + [187] = wtap_encaps.BLUETOOTH_H4, + [189] = wtap_encaps.USB_LINUX, + [195] = wtap_encaps.IEEE802_15_4, +} + +-- Multiply two matrices; m1 columns must be equal to m2 rows +-- e.g. #m1[1] == #m2 +function matrix_mul( m1, m2 ) + -- multiply rows with columns + local mtx = {} + for i = 1,#m1 do + mtx[i] = {} + for j = 1,#m2[1] do + local num = m1[i][1] * m2[1][j] + for n = 2,#m1[1] do + num = num + m1[i][n] * m2[n][j] + end + mtx[i][j] = num + end + end + return mtx +end + +-- Makes a copy of the default settings per file +local function new_settings() + print("debug: creating new file_settings") + local file_settings = {} + for k,v in pairs(default_settings) do + file_settings[k] = v + end + return file_settings +end + +-- A simple function for backward mapping of the pcap2wtap array. +local function wtap2pcap(encap) + for k,v in pairs(pcap2wtap) do + if v == encap then + return k + end + end + return 0 +end + +-- Create our ExportCaptureInfo class which will behave like CaptureInfo +local ExportCaptureInfo = {} +ExportCaptureInfo.__index = ExportCaptureInfo + +function ExportCaptureInfo:create() + local acnt = {} -- our new object + setmetatable(acnt,ExportCaptureInfo) -- make ExportCaptureInfo handle lookup + -- initialize attribs + acnt.user_app = wireshark_name + acnt.private_table = {} + acnt.user_options = {} + return acnt +end + +-- Shifts given WGS84+Z coordinates by (x,y,z) shift given in meters +local function geom_wgs84_coords_shift_xyz(ocoord, icoord, shift_meters_x, shift_meters_y, shift_meters_z) + -- one degree of longitude on the Earth surface equals 111320 meters (at the equator) + local angular_lat = math.rad(icoord.lat) + local delta_longitude = shift_meters_x / (111320.0 * math.cos(angular_lat)) + -- one degree of latitude on the Earth surface equals 110540 meters + local delta_latitude = shift_meters_y / 110540.0 + ocoord.lon = icoord.lon + delta_longitude + ocoord.lat = icoord.lat + delta_latitude + ocoord.abs_alt = icoord.abs_alt + shift_meters_z + ocoord.rel_alt = icoord.rel_alt + shift_meters_z +end + +local function geom_wgs84_coords_distance_meters(icoord1, icoord2) + local R = 6378137.0 -- Radius of earth in meters + local lon_dt = math.rad(icoord2.lon) - math.rad(icoord1.lon) + local lat_dt = math.rad(icoord2.lat) - math.rad(icoord1.lat) + + local a = math.sin(lat_dt/2) * math.sin(lat_dt/2) + + math.cos(math.rad(icoord1.lat)) * math.cos(math.rad(icoord2.lat)) * + math.sin(lon_dt/2) * math.sin(lon_dt/2) + + local c = 2 * math.atan2(math.sqrt(a), math.sqrt(1-a)) + return (R * c) +end + +-- Creates rotation matrix from Euler angles in order: yaw,pitch,roll +local function geom_make_transform_matrix_from_yaw_pitch_roll(rot_vec) + local y = rot_vec.yaw + local p = rot_vec.pitch + local r = rot_vec.roll + -- Matrix created by multiplying yaw x pitch x roll single rotation matrices + local Row1 = { math.cos(y)*math.cos(p), math.cos(y)*math.sin(p)*math.sin(r) - math.sin(y)*math.cos(r), math.cos(y)*math.sin(p)*math.cos(r) + math.sin(y)*math.sin(r) } + local Row2 = { math.sin(y)*math.cos(p), math.sin(y)*math.sin(p)*math.sin(r) + math.cos(y)*math.cos(r), math.sin(y)*math.sin(p)*math.cos(r) - math.cos(y)*math.sin(r) } + local Row3 = { -math.sin(p), math.cos(p)*math.sin(r), math.cos(p)*math.cos(r) } + return {Row1, Row2, Row3} +end + +-- Creates Euler angles with given order from a rotation matrix +local function geom_make_euler_from_transform_matrix(mx, rorder) + local thetaX, thetaY, thetaZ = nil, nil, nil + local thetaX0, thetaY0, thetaZ0 = nil, nil, nil + local thetaX1, thetaY1, thetaZ1 = nil, nil, nil + + if (rorder == "XYZ") then + + thetaY = math.asin(mx[1][3]) + if (0.99999 > math.abs(mx[1][3])) then + thetaX = math.atan2(-mx[2][3], mx[3][3]) + thetaZ = math.atan2(-mx[1][2], mx[1][1]) + else + thetaX = math.atan2(mx[3][2], mx[2][2]) + thetaZ = 0 + end + + elseif (rorder == "YXZ") then + + thetaX = math.asin(-mx[2][3]) + if (0.99999 > math.abs(mx[2][3])) then + thetaY = math.atan2(mx[1][3], mx[3][3]) + thetaZ = math.atan2(mx[2][1], mx[2][2]) + else + thetaY = math.atan2(-mx[3][1], mx[1][1]) + thetaZ = 0 + end + + elseif (rorder == "ZXY") then + + thetaX = math.asin(mx[3][2]) + if (0.99999 > math.abs(mx[3][2])) then + thetaY = math.atan2(-mx[3][1], mx[3][3]) + thetaZ = math.atan2(-mx[1][2], mx[2][2]) + else + thetaY = 0 + thetaZ = math.atan2(mx[2][1], mx[1][1]) + end + + elseif (rorder == "ZYX") then + + thetaY = math.asin(-mx[3][1]) + if (0.99999 > math.abs(mx[3][1])) then + thetaX = math.atan2(mx[3][2], mx[3][3]) + thetaZ = math.atan2(mx[2][1], mx[1][1]) + else + thetaX = 0 + thetaZ = math.atan2(-mx[1][2], mx[2][2]) + end + + elseif (rorder == "YZX") then + + thetaZ = math.asin(mx[2][1]) + if (0.99999 > math.abs(mx[2][1])) then + thetaX = math.atan2(-mx[2][3], mx[2][2]) + thetaY = math.atan2(-mx[3][1], mx[1][1]) + else + thetaX = 0 + thetaY = math.atan2(mx[1][3], mx[3][3]) + end + + elseif (rorder == "XZY") then + + thetaZ = math.asin(-mx[1][2]) + if (0.99999 > math.abs(mx[1][2])) then + thetaX = math.atan2(mx[3][2], mx[2][2]) + thetaY = math.atan2(mx[1][3], mx[1][1]) + else + thetaX = math.atan2(-mx[2][3], mx[3][3]) + thetaY = 0 + end + + elseif (rorder == "XYX") then + + if (0.99999 < mx[1][1]) then + -- Not a unique solution: thetaX1 + thetaX0 = atan2(-mx[2][3] , mx[2][2] ) + thetaY = 0 + thetaX0 = math.atan2(-mx[2][3], mx[2][2]) + thetaX1 = 0 + elseif (-0.99999 > mx[1][1]) then + -- Not a unique solution: thetaX1 - thetaX0 = atan2(-mx[2][3] , mx[2][2] ) + thetaY = math.pi + thetaX0 = -math.atan2(-mx[2][3], mx[2][2]) + thetaX1 = 0 + else + thetaY = math.acos(mx[1][1]) + thetaX0 = math.atan2(mx[2][1], -mx[3][1]) + thetaX1 = math.atan2(mx[1][2], mx[1][3]) + end + + elseif (rorder == "XZX") then + + if (0.99999 < mx[1][1]) then + -- Not a unique solution: thetaX1 + thetaX0 = math.atan2(mx[3][2], mx[3][3]) + thetaZ = 0 + thetaX0 = math.atan2(mx[3][2], mx[3][3]) + thetaX1 = 0 + elseif (-0.99999 > mx[1][1]) then + -- Not a unique solution: thetaX1 - thetaX0 = math.atan2(mx[3][2], mx[3][3]) + thetaZ = math.pi + thetaX0 = -math.atan2(mx[3][2], mx[3][3]) + thetaX1 = 0 + else + thetaZ = math.acos(mx[1][1]) + thetaX0 = math.atan2(mx[3][1], mx[2][1]) + thetaX1 = math.atan2(mx[1][3], -mx[1][2]) + end + + elseif (rorder == "YXY") then + + if (0.99999 < mx[2][2]) then + -- Not a unique solution: thetaY1 + thetaY0 = math.atan2(mx[1][3], mx[1][1]) + thetaX = 0 + thetaY0 = math.atan2(mx[1][3], mx[1][1]) + thetaY1 = 0 + elseif (-0.99999 > mx[2][2]) then + -- Not a unique solution: thetaY1 - thetaY0 = math.atan2(mx[1][3], mx[1][1]) + thetaX = math.pi + thetaY0 = -math.atan2(mx[1][3], mx[1][1]) + thetaY1 = 0 + else + thetaX = math.acos(mx[2][2]) + thetaY0 = math.atan2(mx[1][2], mx[3][2]) + thetaY1 = math.atan2(mx[2][1], -mx[2][3]) + end + + elseif (rorder == "YZY") then + + if (0.99999 < mx[2][2]) then + -- Not a unique solution: thetaY1 + thetaY0 = atan2(-mx[3][1], mx[3][3]) + thetaZ = 0 + thetaY0 = math.atan2(-mx[3][1], mx[3][3]) + thetaY1 = 0 + elseif (-0.99999 > mx[2][2]) then + -- Not a unique solution: thetaY1 - thetaY0 = atan2(-mx[3][1], mx[3][3]) + thetaZ = math.pi + thetaY0 = -math.atan2(-mx[3][1], mx[3][3]) + thetaY1 = 0 + else + thetaZ = math.acos(mx[2][2]) + thetaY0 = math.atan2(mx[3][2], -mx[1][2]) + thetaY1 = math.atan2(mx[2][3], mx[2][1]) + end + + elseif (rorder == "ZXZ") then + + if (0.99999 < mx[3][3]) then + -- Not a unique solution: thetaZ1 + thetaZ0 = atan2(-mx[1][2], mx[1][1]) + thetaX = 0 + thetaZ0 = atan2(-mx[1][2], mx[1][1]) + thetaZ1 = 0 + elseif (-0.99999 > mx[3][3]) then + -- Not a unique solution: thetaZ1 - thetaZ0 = atan2(-mx[1][2], mx[1][1]) + thetaX = math.pi + thetaZ0 = -atan2(-mx[1][2], mx[1][1]) + thetaZ1 = 0 + else + thetaX = math.acos(mx[3][3] ) + thetaZ0 = math.atan2(mx[1][3], -mx[2][3]) + thetaZ1 = math.atan2(mx[3][1], mx[3][2]) + end + + elseif (rorder == "ZYZ") then + + if (0.99999 < mx[3][3]) then + -- Not a unique solution: thetaZ1 + thetaZ0 = math.atan2(mx[2][1], mx[2][2]) + thetaY = 0 + thetaZ0 = math.atan2(mx[2][1], mx[2][2]) + thetaZ1 = 0 + elseif (-0.99999 > mx[3][3]) then + -- Not a unique solution: thetaZ1 - thetaZ0 = math.atan2(mx[2][1], mx[2][2]) + thetaY = math.pi + thetaZ0 = -math.atan2(mx[2][1], mx[2][2]) + thetaZ1 = 0 + else + thetaY = math.acos(mx[3][3] ) + thetaZ0 = math.atan2(mx[2][3], mx[1][3]) + thetaZ1 = math.atan2(mx[3][2], -mx[3][1]) + end + + else + thetaZ = 0 + thetaY = 0 + thetaX = 0 + end + + return {x=thetaX, y=thetaY, z=thetaZ, x0=thetaX0, y0=thetaY0, z0=thetaZ0, x1=thetaX1, y1=thetaY1, z1=thetaZ1} +end + +-- Creates Euler angles with order: yaw,pitch,roll from a rotation matrix +local function geom_make_yaw_pitch_roll_from_transform_matrix(mx) + rot = geom_make_euler_from_transform_matrix(mx, "ZYX") + rot.yaw = rot.z + rot.pitch = rot.y + rot.roll = rot.x + return rot +end + +-- Adjusts rotation angles so that crappy Google Earth rotation implementation won't glitch +local function geom_google_earth_incompetent_rotation_fix(model_info, rot) + -- Google Earth does crazy things if angle is around 90/-90, and even crazier at exact value + if (math.abs(model_info.roll + rot.roll - math.rad(90)) < math.rad(3.7)) then + if (model_info.roll + rot.roll - math.rad(90)) > 0 then + rot.roll = math.rad(90.0001) - model_info.roll + else + rot.roll = math.rad(89.9999) - model_info.roll + end + end + if (math.abs(model_info.roll + rot.roll + math.rad(90)) < math.rad(3.7)) then + if (model_info.roll + rot.roll + math.rad(90)) < 0 then + rot.roll = -math.rad(90.0001) - model_info.roll + else + rot.roll = -math.rad(89.9999) - model_info.roll + end + end + return rot +end + +-- Go though packets and interpolate missing values +local function process_packets(file_settings, packets, til_end) + print("debug: process_packets() called") + + -- Timestamp precision increase + -- Find groups with the same timestamp, and make it increasing miliseconds + local last_pkt_pos = 0 -- Total number of packets - we will need it sometimes + local start_tmstamp = -1 -- Position of the packet which starts the group being currently updated + local count_tmstamp = 0 -- Amount of same timestamps in thr group + for pos,pkt in pairs(packets) do + if (pkt.tmstamp ~= nil) then + local spkt = {} + if (start_tmstamp >= 0) then + spkt = packets[start_tmstamp] + else + spkt = {tmstamp=pkt.tmstamp-1.0} + end + -- When the timestamp has changed, go through all from last change, and make them increasing + if (pkt.tmstamp > spkt.tmstamp) then + if (start_tmstamp < 0) then + start_tmstamp = 0 + end + local tmstamp_dt = pkt.tmstamp - spkt.tmstamp + local count_cpkt = 1 + if (count_tmstamp > 1) then + for cpos = start_tmstamp+1, pos-1, 1 do + local cpkt = packets[cpos] + -- Only update packets which already have a timestamp set; other we will set in next pass + -- Since packets with timestamps are periodic, this should increase accuracy + if (cpkt.tmstamp ~= nil) then + cpkt.tmstamp = spkt.tmstamp + tmstamp_dt * count_cpkt / count_tmstamp + count_cpkt = count_cpkt+1 + end + end + end + start_tmstamp = pos + count_tmstamp = 0 + end + count_tmstamp = count_tmstamp+1 + end + last_pkt_pos = pos + end + -- For packets with same timestamps at end, make the spacing of 250ms + if (start_tmstamp >= 0) and (last_pkt_pos > start_tmstamp+1) then + if (count_tmstamp > 1) then + local spkt = packets[start_tmstamp] + local count_cpkt = 1 + for cpos = start_tmstamp+1, last_pkt_pos, 1 do + local cpkt = packets[cpos] + if (cpkt.tmstamp ~= nil) then + cpkt.tmstamp = spkt.tmstamp + 0.25 * count_cpkt + count_cpkt = count_cpkt+1 + end + end + end + end + -- Replace starting timestamps which are older that 12 hours than last timestamp - drone can't run that long + -- This will remove any bad timestamps recorded before we get proper one from GPS + if (start_tmstamp >= 0) then + local spkt = packets[start_tmstamp] + local limit_tmstamp = math.max(spkt.tmstamp - 12*60*60, 1.0) + local min_tmstamp = spkt.tmstamp + local count_cpkt = 1 + for cpos = start_tmstamp, 1, -1 do + local cpkt = packets[cpos] + if (cpkt.tmstamp ~= nil) then + if (cpkt.tmstamp < limit_tmstamp) then + cpkt.tmstamp = min_tmstamp - 0.25 * count_cpkt + count_cpkt = count_cpkt+1 + else + min_tmstamp = cpkt.tmstamp + count_cpkt = 1 + end + end + end + end + + -- Interpolate timestamp for entries without it + local start_tmstamp = -1 -- Position of the packet which starts the group being currently updated + for pos,pkt in pairs(packets) do + if (pkt.tmstamp ~= nil) then + local spkt = {} + if (start_tmstamp >= 0) then + spkt = packets[start_tmstamp] + else + spkt = {tmstamp=pkt.tmstamp-1.0} + start_tmstamp = 0 + end + local tmstamp_dt = pkt.tmstamp - spkt.tmstamp + -- make sure we have enough milisecs to make each packet separated by no less than 2ms + tmstamp_dt = math.max(tmstamp_dt, (pos - start_tmstamp) / 500) + -- set timestamps in a rage of packets which don't have them + for cpos = start_tmstamp+1, pos-1, 1 do + local cpkt = packets[cpos] + cpkt.tmstamp = spkt.tmstamp + tmstamp_dt * (cpos - start_tmstamp) / (pos - start_tmstamp) + end + start_tmstamp = pos + end + end + -- For packets with same timestamps at end, make the spacing of 10ms + if (start_tmstamp >= 0) and (last_pkt_pos > start_tmstamp+1) then + if true then + spkt = packets[start_tmstamp] + for cpos = start_tmstamp+1, last_pkt_pos, 1 do + local cpkt = packets[cpos] + cpkt.tmstamp = spkt.tmstamp + 0.01 * (cpos - start_tmstamp) + end + end + else + --TODO support no timestamps situation + error("No timestamps defined in the input packets. Aborting due to lack of time reference.") + end + + -- Final updates for the timestamp - first and last packet must be on a full second + if (last_pkt_pos > 3) then + pkt = packets[1] + pkt.tmstamp = math.floor(pkt.tmstamp) + pkt = packets[last_pkt_pos] + pkt.tmstamp = math.ceil(pkt.tmstamp) + end + + -- Compute height above ground levels, by averaging all the measurements + -- (difference between GPS altitude and baro altitude) + if (file_settings.ground_altitude == nil) then + local gnd_alt_sum = 0 + local gnd_alt_num = 0 + local curr_rel_alt = 0 + for pos,pkt in pairs(packets) do + if (pkt.typ == TYP_AIR_POS_GPS) or (pkt.typ == TYP_AIR_POS_ACC) then + if (pkt.rel_alt ~= nil) then + curr_rel_alt = pkt.rel_alt + elseif (pkt.abs_alt ~= nil) then + gnd_alt_sum = gnd_alt_sum + (pkt.abs_alt - curr_rel_alt) + gnd_alt_num = gnd_alt_num + 1 + end + end + end + average_gnd_alt = 0 + if (gnd_alt_num > 0) then + -- Automatically compute altitude as 105% of average ground level + file_settings.ground_altitude = (gnd_alt_sum / gnd_alt_num) * 1.05 + else + file_settings.ground_altitude = 0.0 + end + print("info: Ground height at start point computed: " .. file_settings.ground_altitude) + end + + -- Compute missing relative heights (in abssolute-only packets) and absolute heights (in relative-only packets) + local prev_rel_pkt = { rel_alt=0.0, tmstamp=1.0 } + local start_abs_pos = -1 + for pos,pkt in pairs(packets) do + if (pkt.typ == TYP_AIR_POS_GPS) or (pkt.typ == TYP_AIR_POS_ACC) then + -- The packet has either only relative or only absolute altitude set + if (pkt.rel_alt ~= nil) then + -- if we've seen absolute packets before this one, update them + if (start_abs_pos >= 0) then + -- We have two relative alts, and one or more absolute alt between; replace with linear change + for cpos = start_abs_pos, pos-1, 1 do + local cpkt = packets[cpos] + if (cpkt.typ == TYP_AIR_POS_GPS) or (cpkt.typ == TYP_AIR_POS_ACC) then + if (cpkt.rel_alt == nil) then + local tmstamp_dt1 = cpkt.tmstamp - prev_rel_pkt.tmstamp + local tmstamp_dt2 = pkt.tmstamp - cpkt.tmstamp + cpkt.rel_alt = (prev_rel_pkt.rel_alt * tmstamp_dt1 + pkt.rel_alt * tmstamp_dt2) / (tmstamp_dt1 + tmstamp_dt2) + -- absolute alt from GPS is inaccurate, but we will not mix + -- GPS and ACC coords in one path anyway, so set only if empty + if (cpkt.abs_alt == nil) then + cpkt.abs_alt = cpkt.rel_alt + file_settings.ground_altitude + end + end + end + end + start_abs_pos = -1 + end + pkt.abs_alt = pkt.rel_alt + file_settings.ground_altitude + prev_rel_pkt = pkt + elseif (pkt.abs_alt ~= nil) then + -- store position of first absolute packet encoured + if (start_abs_pos < 0) then + start_abs_pos = pos + end + else + error("Impossible condition reached in relative alt computation") + end + end + end + -- If we have remaining absolute alt at end, set last known good relative there + if (start_abs_pos >= 0) then + for cpos = start_abs_pos, last_pkt_pos, 1 do + local cpkt = packets[cpos] + if (cpkt.typ == TYP_AIR_POS_GPS) or (cpkt.typ == TYP_AIR_POS_ACC) then + if (cpkt.rel_alt == nil) then + cpkt.rel_alt = prev_rel_pkt.rel_alt + -- absolute alt from GPS is inaccurate, but we will not mix + -- GPS and ACC coords in one path anyway, so set only if empty + if (cpkt.abs_alt == nil) then + cpkt.abs_alt = cpkt.rel_alt + file_settings.ground_altitude + end + else + error("Impossible condition reached in relative alt finisher") + end + end + end + end + + -- Now we can use timestamps as spacers for interpolating other params + local start_air_pos = -1 + min_lon = 180.0 + max_lon = -180.0 + min_lat = 180.0 + max_lat = -180.0 + min_rel_alt = 999999999.0 + max_rel_alt = -999999999.0 + min_abs_alt = 999999999.0 + max_abs_alt = -999999999.0 + for pos,pkt in pairs(packets) do + if (pkt.typ == TYP_AIR_POS_GPS) or (pkt.typ == TYP_AIR_POS_ACC) then + if (pkt.lon ~= 0.0) or (pkt.lat ~= 0.0) then + -- Add the value to limits + if (pkt.lon < min_lon) then + min_lon = pkt.lon + end + if (pkt.lon > max_lon) then + max_lon = pkt.lon + end + if (pkt.lat < min_lat) then + min_lat = pkt.lat + end + if (pkt.lat > max_lat) then + max_lat = pkt.lat + end + if (pkt.rel_alt ~= nil) then + if (pkt.rel_alt < min_rel_alt) then + min_rel_alt = pkt.rel_alt + end + if (pkt.rel_alt > max_rel_alt) then + max_rel_alt = pkt.rel_alt + end + else + if (pkt.abs_alt < min_abs_alt) then + min_abs_alt = pkt.abs_alt + end + if (pkt.abs_alt > max_abs_alt) then + max_abs_alt = pkt.abs_alt + end + end + if (pos - start_air_pos > 1) then + -- We've reached the end of a block with unset air_pos inside + local spkt = {} + if (start_air_pos >= 0) then + spkt = packets[start_air_pos] + else + spkt = packets[pos] + start_air_pos = 0 + end + -- set coords in a rage of packets which don't have them + local tmstamp_span = math.max(pkt.tmstamp - spkt.tmstamp, 0.002) + for cpos = start_air_pos+1, pos-1, 1 do + local cpkt = packets[cpos] + local tmstamp_dt = pkt.tmstamp - spkt.tmstamp + cpkt.lon = spkt.lon + (pkt.lon - spkt.lon) * tmstamp_dt / tmstamp_span + cpkt.lat = spkt.lat + (pkt.lat - spkt.lat) * tmstamp_dt / tmstamp_span + -- mark the packet as fixed in postprocessing, not from real measurement + cpkt.fixd = true + -- mark the packet as processed + cpkt.proc = true + end + end + start_air_pos = pos + -- mark the packet as processed + pkt.proc = true + end + end + end + if (file_settings.lookat.lon == 0.0) or (file_settings.lookat.lat == 0.0) then + if (min_lon < 0) and (max_lon > 0) then + local max_tmp = max_lon + max_lon = 180.0 - min_lon + min_lon = max_tmp + end + if (min_lat < 0) and (max_lat > 0) then + local max_tmp = max_lat + max_lat = 180.0 - min_lat + min_lat = max_tmp + end + file_settings.lookat.lon = min_lon + (max_lon - min_lon)/2 + file_settings.lookat.lat = min_lat + (max_lat - min_lat)/2 + file_settings.lookat.rel_alt = min_rel_alt + (max_rel_alt - min_rel_alt)/2 + file_settings.lookat.abs_alt = min_abs_alt + (max_abs_alt - min_abs_alt)/2 + + local lonlat_dist = geom_wgs84_coords_distance_meters({lon=min_lon, lat=min_lat}, {lon=max_lon, lat=max_lat}) + -- Compute range as path dimensions but not lower than 10 m + file_settings.lookat.rng = math.max(lonlat_dist, 10.0) + end +end + +-------------------------------------------------------------------------------- +-- high-level file writer handling functions for Wireshark to use +-------------------------------------------------------------------------------- + +-- file encaps we can handle writing +local canwrite = { + [ wtap_encaps.USER0 ] = true, + [ wtap_encaps.USER1 ] = true, + [ wtap_encaps.USER2 ] = true, + [ wtap_encaps.USER3 ] = true, + [ wtap_encaps.USER4 ] = true, + [ wtap_encaps.USER5 ] = true, + [ wtap_encaps.USER6 ] = true, + [ wtap_encaps.USER7 ] = true, + [ wtap_encaps.USER8 ] = true, + [ wtap_encaps.USER9 ] = true, + [ wtap_encaps.USER10 ] = true, + [ wtap_encaps.USER11 ] = true, + [ wtap_encaps.USER12 ] = true, + [ wtap_encaps.USER13 ] = true, + [ wtap_encaps.USER14 ] = true, + [ wtap_encaps.USER15 ] = true, + -- etc., etc. +} + +-- we can't reuse the variables we used in the reader, because this script might be used to both +-- open a file for reading and write it out, at the same time, so we cerate another file_settings +-- instance. +local function create_writer_file_settings() + print("debug: create_writer_file_settings() called") + + local file_settings = new_settings() + + return file_settings +end + +---------------------------------------- +-- The can_write_encap() function is called by Wireshark when it wants to write out a file, +-- and needs to see if this file writer can handle the packet types in the window. +-- We need to return true if we can handle it, else false +local function can_write_encap(encap) + print("debug: can_write_encap() called with encap=" .. encap) + return canwrite[encap] or false +end + +local function write_open(fh, capture) + print("debug: write_open() called") + + local file_settings = create_writer_file_settings() + + -- It would be nice to keep altitude relative to ground. Unfortunately, one + -- of KML restrictions is that there is no way to make a path relative to + -- one specific point on the ground. Relative path is relative in every point. + -- Obviously this is not what we want, so the only solution is to use absolute + -- positions. Without that, even parts of the drone model would have different + -- positions on different coordinates. + local tmp_val = tonumber(capture.user_options.ground_alt, 10) + if (tmp_val ~= nil) then + file_settings.ground_altitude = tmp_val + end + + local tmp_val = tonumber(capture.user_options.dist_shift, 10) + if (tmp_val ~= nil) then + file_settings.min_dist_shift = tmp_val/1000 + end + + local tmp_val = tonumber(capture.user_options.model_detail, 10) + if (tmp_val ~= nil) then + file_settings.model_detail_lv = math.floor(tmp_val) + end + + local tmp_val = capture.user_options.path_style + if (tmp_val ~= nil and tmp_val ~= '') then + file_settings.path_style = tmp_val + end + + local tmp_val = capture.user_options.pos_typ + if (tmp_val ~= nil and tmp_val ~= '') then + if (tmp_val == 'g') or (tmp_val == 'G') then + file_settings.air_pos_pkt_typ = TYP_AIR_POS_GPS + else + -- This is default, so no need to set + --file_settings.air_pos_pkt_typ = TYP_AIR_POS_ACC + end + end + + -- write out file header + local hdr = [[ + + + Dji Flight Log - FILENAME + 1 + + + + +]] + if not hdr then + print("info: write_open: error generating file header") + return false + end + + if not fh:write(hdr) then + print("info: write_open: error writing file header to file") + return false + end + + -- save settings + capture.private_table = file_settings + + return true +end + +-- declare some field extractors +local dji_p3_rec_etype = Field.new("dji_p3_flyrec.etype") +-- P3 flight record packet 0x000c +local dji_p3_rec_osd_general_longtitude = Field.new("dji_p3_flyrec.osd_general_longtitude") +local dji_p3_rec_osd_general_latitude = Field.new("dji_p3_flyrec.osd_general_latitude") +local dji_p3_rec_osd_general_relative_height = Field.new("dji_p3_flyrec.osd_general_relative_height") +local dji_p3_rec_osd_general_gps_nums = Field.new("dji_p3_flyrec.osd_general_gps_nums") +local dji_p3_rec_osd_general_pitch = Field.new("dji_p3_flyrec.osd_general_pitch") +local dji_p3_rec_osd_general_roll = Field.new("dji_p3_flyrec.osd_general_roll") +local dji_p3_rec_osd_general_yaw = Field.new("dji_p3_flyrec.osd_general_yaw") +local dji_p3_rec_osd_general_mode1 = Field.new("dji_p3_flyrec.osd_general_mode1") + +local dji_p3_rec_osd_general_e_motor_on = Field.new("dji_p3_flyrec.osd_general_e_motor_on") +local dji_p3_rec_osd_general_e_usonic_on = Field.new("dji_p3_flyrec.osd_general_e_usonic_on") +local dji_p3_rec_osd_general_e_gohome_state = Field.new("dji_p3_flyrec.osd_general_e_gohome_state") +local dji_p3_rec_osd_general_e_mvo_used = Field.new("dji_p3_flyrec.osd_general_e_mvo_used") +local dji_p3_rec_osd_general_e_battery_req_gohome = Field.new("dji_p3_flyrec.osd_general_e_battery_req_gohome") +local dji_p3_rec_osd_general_e_battery_req_land = Field.new("dji_p3_flyrec.osd_general_e_battery_req_land") +local dji_p3_rec_osd_general_e_rc_state = Field.new("dji_p3_flyrec.osd_general_e_rc_state") +local dji_p3_rec_osd_general_e_compass_over_range = Field.new("dji_p3_flyrec.osd_general_e_compass_over_range") +local dji_p3_rec_osd_general_e_wave_err = Field.new("dji_p3_flyrec.osd_general_e_wave_err") +local dji_p3_rec_osd_general_e_gps_level = Field.new("dji_p3_flyrec.osd_general_e_gps_level") +local dji_p3_rec_osd_general_e_battery_type = Field.new("dji_p3_flyrec.osd_general_e_battery_type") +local dji_p3_rec_osd_general_e_accel_over_range = Field.new("dji_p3_flyrec.osd_general_e_accel_over_range") +local dji_p3_rec_osd_general_e_is_vibrating = Field.new("dji_p3_flyrec.osd_general_e_is_vibrating") +local dji_p3_rec_osd_general_e_press_err = Field.new("dji_p3_flyrec.osd_general_e_press_err") +local dji_p3_rec_osd_general_e_esc_stall = Field.new("dji_p3_flyrec.osd_general_e_esc_stall") +local dji_p3_rec_osd_general_e_esc_empty = Field.new("dji_p3_flyrec.osd_general_e_esc_empty") +local dji_p3_rec_osd_general_e_propeller_catapult = Field.new("dji_p3_flyrec.osd_general_e_propeller_catapult") +local dji_p3_rec_osd_general_e_gohome_height_mod = Field.new("dji_p3_flyrec.osd_general_e_gohome_height_mod") +local dji_p3_rec_osd_general_e_out_of_limit = Field.new("dji_p3_flyrec.osd_general_e_out_of_limit") +local dji_p3_rec_osd_general_gohome_landing_reason = Field.new("dji_p3_flyrec.osd_general_gohome_landing_reason") +local dji_p3_rec_osd_general_start_fail_reason = Field.new("dji_p3_flyrec.osd_general_start_fail_reason") +-- P3 flight record packet 0x0000 +local dji_p3_rec_controller_g_real_input_channel_command_aileron = Field.new("dji_p3_flyrec.controller_g_real_input_channel_command_aileron") +local dji_p3_rec_controller_g_real_input_channel_command_elevator = Field.new("dji_p3_flyrec.controller_g_real_input_channel_command_elevator") +local dji_p3_rec_controller_g_real_input_channel_command_throttle = Field.new("dji_p3_flyrec.controller_g_real_input_channel_command_throttle") +local dji_p3_rec_controller_g_real_input_channel_command_rudder = Field.new("dji_p3_flyrec.controller_g_real_input_channel_command_rudder") +local dji_p3_rec_controller_g_real_input_channel_command_mode = Field.new("dji_p3_flyrec.controller_g_real_input_channel_command_mode") +local dji_p3_rec_controller_g_real_status_control_real_mode = Field.new("dji_p3_flyrec.controller_g_real_status_control_real_mode") +local dji_p3_rec_controller_g_real_status_ioc_control_command_mode = Field.new("dji_p3_flyrec.controller_g_real_status_ioc_control_command_mode") +local dji_p3_rec_controller_g_real_status_rc_state = Field.new("dji_p3_flyrec.controller_g_real_status_rc_state") +local dji_p3_rec_controller_g_real_status_motor_status = Field.new("dji_p3_flyrec.controller_g_real_status_motor_status") +local dji_p3_rec_controller_g_real_status_main_batery_voltage = Field.new("dji_p3_flyrec.controller_g_real_status_main_batery_voltage") +-- P3 flight record packet 0x0005 +local dji_p3_rec_gps_glns_gps_date = Field.new("dji_p3_flyrec.gps_glns_gps_date") +local dji_p3_rec_gps_glns_gps_time = Field.new("dji_p3_flyrec.gps_glns_gps_time") +local dji_p3_rec_gps_glns_gps_lon = Field.new("dji_p3_flyrec.gps_glns_gps_lon") +local dji_p3_rec_gps_glns_gps_lat = Field.new("dji_p3_flyrec.gps_glns_gps_lat") +local dji_p3_rec_gps_glns_hmsl = Field.new("dji_p3_flyrec.gps_glns_hmsl") +local dji_p3_rec_gps_glns_hdop = Field.new("dji_p3_flyrec.gps_glns_hdop") +local dji_p3_rec_gps_glns_pdop = Field.new("dji_p3_flyrec.gps_glns_pdop") +local dji_p3_rec_gps_glns_numsv = Field.new("dji_p3_flyrec.gps_glns_numsv") + +local function write(fh, capture, pinfo) + print("debug: write() called") + + -- get file settings + local file_settings = capture.private_table + if not file_settings then + print("info: write() failed to get private table file settings") + return false + end + + --local tvbrange = fldinfo.range + --fh:write( tobinary( tostring( tvbrange:bytes() ) ) ) + --fh:flush() + + -- Get fields from new packet + local curr_pkt = { + typ = TYP_NULL, + tmstamp = nil, + proc = false, + fixd = false, + } + + local pkt_rec_etype = { dji_p3_rec_etype() } + + if (pkt_rec_etype[1].value == 0x000c) then + -- TODO fill FC mode packet + local new_fc_mode1 = { dji_p3_rec_osd_general_mode1() } + curr_pkt.mode1 = new_fc_mode1[1].value + curr_pkt.mode1_text = new_fc_mode1[1].display + curr_pkt.typ = TYP_FLYC_STAT + table.insert(file_settings.packets, curr_pkt) + + curr_pkt = { + typ = TYP_NULL, + tmstamp = nil, + proc = false, + fixd = false, + } + + local new_air_pitch = { dji_p3_rec_osd_general_pitch() } + local new_air_roll = { dji_p3_rec_osd_general_roll() } + local new_air_yaw = { dji_p3_rec_osd_general_yaw() } + curr_pkt.pitch = new_air_pitch[1].value * 0.1 + curr_pkt.roll = new_air_roll[1].value * 0.1 + curr_pkt.yaw = new_air_yaw[1].value * 0.1 + curr_pkt.typ = TYP_AIR_ROTAT + table.insert(file_settings.packets, curr_pkt) + + curr_pkt = { + typ = TYP_NULL, + tmstamp = nil, + proc = false, + fixd = false, + } + local new_air_longtitude = { dji_p3_rec_osd_general_longtitude() } + local new_air_latitude = { dji_p3_rec_osd_general_latitude() } + local new_air_rel_altitude = { dji_p3_rec_osd_general_relative_height() } + local new_gps_nums = { dji_p3_rec_osd_general_gps_nums() } + + curr_pkt.lon = (new_air_longtitude[1].value * 180.0 / math.pi) + curr_pkt.lat = (new_air_latitude[1].value * 180.0 / math.pi) + curr_pkt.rel_alt = new_air_rel_altitude[1].value * 0.1 + curr_pkt.numsv = new_gps_nums[1].value + curr_pkt.typ = TYP_AIR_POS_ACC + + elseif (pkt_rec_etype[1].value == 0x0000) then + local new_motor_status = { dji_p3_rec_controller_g_real_status_motor_status() } + curr_pkt.motor_status = new_motor_status[1].value + curr_pkt.typ = TYP_MOTOR_STAT + table.insert(file_settings.packets, curr_pkt) + + --local new_batery_voltage = { dji_p3_rec_controller_g_real_status_main_batery_voltage() } + + curr_pkt = { + typ = TYP_NULL, + tmstamp = nil, + proc = false, + fixd = false, + } + local new_input_aileron = { dji_p3_rec_controller_g_real_input_channel_command_aileron() } + local new_input_elevator = { dji_p3_rec_controller_g_real_input_channel_command_elevator() } + local new_input_throttle = { dji_p3_rec_controller_g_real_input_channel_command_throttle() } + local new_input_rudder = { dji_p3_rec_controller_g_real_input_channel_command_rudder() } + local new_input_mode = { dji_p3_rec_controller_g_real_input_channel_command_mode() } + local new_control_real_mode = { dji_p3_rec_controller_g_real_status_control_real_mode() } + local new_ioc_control_mode = { dji_p3_rec_controller_g_real_status_ioc_control_command_mode() } + local new_rc_state = { dji_p3_rec_controller_g_real_status_rc_state() } + curr_pkt.aileron = new_input_aileron[1].value + curr_pkt.elevator = new_input_elevator[1].value + curr_pkt.throttle = new_input_throttle[1].value + curr_pkt.rudder = new_input_rudder[1].value + curr_pkt.input_mode = new_input_mode[1].value + curr_pkt.real_mode = new_control_real_mode[1].value + curr_pkt.control_mode = new_ioc_control_mode[1].value + curr_pkt.rc_state = new_rc_state[1].value + curr_pkt.typ = TYP_RC_STAT + elseif (pkt_rec_etype[1].value == 0x0005) then + local new_gps_date = { dji_p3_rec_gps_glns_gps_date() } + local new_gps_time = { dji_p3_rec_gps_glns_gps_time() } + local gps_date_int = new_gps_date[1].value + local gps_time_int = new_gps_time[1].value + local tm = os.time{ + year=math.floor(gps_date_int/10000), + month=math.floor(gps_date_int/100)%100, + day=math.floor(gps_date_int)%100, + hour=math.floor(gps_time_int/10000), + min=math.floor(gps_time_int/100)%100, + sec=math.floor(gps_time_int)%100 } + -- Accept only valid timestamps + if (tm ~= nil) and (tm > 1.0) then + curr_pkt.tmstamp = tm + end + + local new_gps_lon = { dji_p3_rec_gps_glns_gps_lon() } + local new_gps_lat = { dji_p3_rec_gps_glns_gps_lat() } + local new_hmsl = { dji_p3_rec_gps_glns_hmsl() } + --local new_hdop = { dji_p3_rec_gps_glns_hdop() } + --local new_pdop = { dji_p3_rec_gps_glns_pdop() } + local new_numsv = { dji_p3_rec_gps_glns_numsv() } + + curr_pkt.lon = (new_gps_lon[1].value / 10000000) + curr_pkt.lat = (new_gps_lat[1].value / 10000000) + curr_pkt.abs_alt = new_hmsl[1].value * 0.001 + curr_pkt.numsv = new_numsv[1].value + curr_pkt.typ = TYP_AIR_POS_GPS + end + + if (curr_pkt.typ ~= TYP_NULL) then + table.insert(file_settings.packets, curr_pkt) + end + + -- It would be nice to store packets when we're starting to keep too much of them; + -- but with all the features we have, that probably won't be possible + --if table.getn(file_settings.packets) > 1024 then + -- process_packets(file_settings, file_settings.packets, false) + -- ... + --end + + return true +end + +-- Writes LookAt block with given data +local function write_lookat(fh, indent, file_settings, lookat, head, tilt, altmode) + local altval = 0 + -- Use either GPS data or ACC data to set the altitude + if (file_settings.air_pos_pkt_typ == TYP_AIR_POS_ACC) then + if (altmode == "absolute") then + altval = lookat.rel_alt + file_settings.ground_altitude + else + altval = lookat.rel_alt + end + else + if (altmode == "absolute") then + altval = lookat.abs_alt + else + altval = lookat.abs_alt - file_settings.ground_altitude + end + end + local blk = indent .. [[ +]] .. indent .. [[ ]] .. lookat.lon .. [[ +]] .. indent .. [[ ]] .. lookat.lat .. [[ +]] .. indent .. [[ ]] .. altval .. [[ +]] .. indent .. [[ ]] .. head .. [[ +]] .. indent .. [[ ]] .. tilt .. [[ +]] .. indent .. [[ ]] .. lookat.rng .. [[ +]] .. indent .. [[ ]] .. altmode .. [[ +]] .. indent .. [[ +]] + return fh:write(blk) +end + +-- Writes informational comments with given data +local function write_info(fh, indent, file_settings) + local pos_type_str = "Accurate" + if (file_settings.pos_typ == TYP_AIR_POS_GPS) then + pos_type_str = "Gps only" + end + + local blk = indent .. [[Path configuration: + Ground level altitude at start point: ]] .. file_settings.ground_altitude .. [[ m + Positioning type: ]] .. pos_type_str .. [[ + Minimal position difference: ]] .. file_settings.min_dist_shift .. [[ m +]] + return fh:write(blk) +end + + +local function write_static_paths_folder(fh, file_settings) + print("debug: write_static_paths_folder() called") + local blk = [[ + Static paths + 1 + Flight path. + + Whole path + 1 + Flight path line + #purpleLineGreenPoly +]] + + if not fh:write(blk) then + print("info: write: error writing path block head to file") + return false + end + + -- Write folder LookAt block + if not write_lookat(fh, " ", file_settings, file_settings.lookat, -45.0, 30.0, "relativeToGround") then + print("info: write: error writing lookat block to file") + return false + end + + local blk = [[ + 0 + 0 + + + clampToGround + +]] + if not fh:write(blk) then + print("info: write: error writing path block head to file") + return false + end + + local min_shift = {} + geom_wgs84_coords_shift_xyz(min_shift, file_settings.lookat, file_settings.min_dist_shift/2, file_settings.min_dist_shift/2, file_settings.min_dist_shift/2) + min_shift.lat = math.abs(min_shift.lat - file_settings.lookat.lat) + min_shift.lon = math.abs(min_shift.lon - file_settings.lookat.lon) + min_shift.rel_alt = math.abs(min_shift.rel_alt - file_settings.lookat.rel_alt) + local prev_pkt = {lat=0, lon=0, rel_alt=-999999} + for pos,pkt in pairs(file_settings.packets) do + if (pkt.typ == file_settings.air_pos_pkt_typ) then + -- only add points which have coordinates changed + if (math.abs(pkt.lat - prev_pkt.lat) > min_shift.lat) or + (math.abs(pkt.lon - prev_pkt.lon) > min_shift.lon) or + (math.abs(pkt.rel_alt - prev_pkt.rel_alt) > min_shift.rel_alt) then + -- For angular coords, 8 digits after dot is enough fo achieve 1.1mm accuracy + local blk_line = string.format(" %.8f,%.8f,%.3f\n", pkt.lon, pkt.lat, pkt.rel_alt) + if not fh:write(blk_line) then + print("info: write: error writing path block line to file") + return false + end + prev_pkt = pkt + end + end + end + + local blk = [[ + + + +]] + if not fh:write(blk) then + print("info: write: error writing path block tail to file") + return false + end +end + +local function write_dynamic_path_element(fh, model_info, tmstamp, pkt, curr_rot_pkt) + + local rot_len = math.sqrt(model_info.shift_x * model_info.shift_x + model_info.shift_y * model_info.shift_y + model_info.shift_z * model_info.shift_z) + if (rot_len == 0) then + rot_len = 1e-30 -- small enough to not get into formatting accuracy + end + -- Create rotation matrix + local rad_yaw = math.atan2(model_info.shift_y,model_info.shift_x) + local rad_pitch = math.asin(-model_info.shift_z / rot_len) + local rot_mx1 = geom_make_transform_matrix_from_yaw_pitch_roll({yaw=rad_yaw, pitch=rad_pitch, roll=0}) + local rot_mx2 = geom_make_transform_matrix_from_yaw_pitch_roll({yaw=math.rad(curr_rot_pkt.yaw+180), pitch=math.rad(curr_rot_pkt.pitch), roll=math.rad(curr_rot_pkt.roll)}) + rot_mx1 = matrix_mul(rot_mx2, rot_mx1) + -- To shift world coordinates, we will use the standard yaw-pitch-roll angles + local rot_qt1 = geom_make_yaw_pitch_roll_from_transform_matrix(rot_mx1) + -- Rotation angles for inserting into KML have different apply order + local rot_qt2 = geom_make_yaw_pitch_roll_from_transform_matrix(rot_mx2) + rot_qt2 = geom_google_earth_incompetent_rotation_fix(model_info, rot_qt2) + -- Prepare shifted world coordinates + local rot_shift_x = rot_len * math.sin(rot_qt1.yaw) * math.cos(rot_qt1.pitch) + local rot_shift_y = rot_len * math.cos(rot_qt1.yaw) * math.cos(rot_qt1.pitch) + local rot_shift_z = -rot_len * math.sin(rot_qt1.pitch) + local coord = {} + geom_wgs84_coords_shift_xyz(coord, pkt, rot_shift_x, rot_shift_y, rot_shift_z) + + local blk_line = " " .. os.date('!%Y-%m-%dT%H:%M:%S', tmstamp) .. string.format(".%03dZ", (tmstamp * 1000) % 1000) .. "" + -- Precision of our angular coords is up to "%.12f", but 8 digits after dot is enough fo achieve 1.1mm accuracy + blk_line = blk_line .. "" .. string.format("%.8f %.8f %.3f", coord.lon, coord.lat, coord.abs_alt + model_info.shift_up) .. "" + blk_line = blk_line .. "" .. string.format("%.1f %.1f %.1f", math.deg(rot_qt2.yaw), math.deg(rot_qt2.pitch), math.deg(rot_qt2.roll)) .. "\n" + if not fh:write(blk_line) then + print("info: write: error writing path block line to file") + return false + end + return true +end + +-- Check if the condition to make model visible is met (or is just switching from met to unmet) +local function is_model_condition_met(model_info, pos_pkt, rot_pkt, mot_pkt, visible_switch) + + return ((model_info.condtn == CONDTN_MOTOR_ON) and ((mot_pkt.motor_status ~= 0) or + (mot_pkt.motor_status == 0) and (visible_switch))) or + ((model_info.condtn == CONDTN_MOTOR_OFF) and ((mot_pkt.motor_status == 0) or + (mot_pkt.motor_status ~= 0) and (visible_switch))) or + (model_info.condtn == CONDTN_NONE) +end + +-- Checks if the condition to make model visible was met for the last time (visibility is switching and previous was visible). +local function is_model_condition_last_met(model_info, pos_pkt, rot_pkt, mot_pkt, visible_switch) + + return ((model_info.condtn == CONDTN_MOTOR_ON) and (mot_pkt.motor_status == 0) and (visible_switch)) or + ((model_info.condtn == CONDTN_MOTOR_OFF) and (mot_pkt.motor_status ~= 0) and (visible_switch)) +end + +local function write_dynamic_paths_placemark(fh, file_settings, model_info) + print("debug: write_dynamic_paths_placemark() called") + local packets = file_settings.packets + + local full_fname = string.format("res/%s_det%d.dae",model_info.fname,file_settings.model_detail_lv) + + local blk_head = [[ + Aircraft ]] .. model_info.part_name .. [[ path + 1 + #]] .. model_info.line_style .. [[ + + 0 + absolute + + + + ]] .. model_info.head .. [[ + ]] .. model_info.tilt .. [[ + ]] .. model_info.roll .. [[ + + + ]] .. model_info.scale .. [[ + ]] .. model_info.scale .. [[ + ]] .. model_info.scale .. [[ + + + ]] .. full_fname .. [[ + once + + +]] + local blk_tail = [[ + +]] + + local min_shift = {} + geom_wgs84_coords_shift_xyz(min_shift, file_settings.lookat, file_settings.min_dist_shift/2, file_settings.min_dist_shift/2, file_settings.min_dist_shift/2) + min_shift.lat = math.abs(min_shift.lat - file_settings.lookat.lat) + min_shift.lon = math.abs(min_shift.lon - file_settings.lookat.lon) + min_shift.rel_alt = math.abs(min_shift.rel_alt - file_settings.lookat.rel_alt) + min_shift.rot = 2.0 -- Two degrees rotation is not much for the small drone + min_shift.tmstamp = 0.99 -- if there was no packet in last second, leave it even if no coords change + local pkt_num_total = 0 + local pkt_num_pos = 0 + local pkt_num_add = 0 + local curr_rot_pkt = { pitch=0, roll=0, yaw=0 } -- current (not necessarily added) rotation packet + local prev_rot_pkt = curr_rot_pkt -- previous added rotation packet + local curr_mot_pkt = { motor_status=0 } + local visible_switch = false -- set to true when visibility of the model is to be changed + local block_is_open = false -- set to true if a block is open in the file + local prev_pkt = {lat=0, lon=0, rel_alt=-999999, tmstamp=1.0} -- previous added pos packet + local curr_pkt = prev_pkt -- current (not necessarily added) pos packet + for pos,pkt in pairs(packets) do + if (pkt.typ == file_settings.air_pos_pkt_typ) then + -- only add points which have coordinates changed + if (math.abs(pkt.lat - prev_pkt.lat) > min_shift.lat) or + (math.abs(pkt.lon - prev_pkt.lon) > min_shift.lon) or + (math.abs(pkt.rel_alt - prev_pkt.rel_alt) > min_shift.rel_alt) or + (math.abs(curr_rot_pkt.yaw - prev_rot_pkt.yaw) > min_shift.rot) or + (math.abs(curr_rot_pkt.pitch - prev_rot_pkt.pitch) > min_shift.rot) or + (math.abs(curr_rot_pkt.roll - prev_rot_pkt.roll) > min_shift.rot) or + (math.abs(pkt.tmstamp - prev_pkt.tmstamp) > min_shift.tmstamp) or + (visible_switch) then + + if (is_model_condition_met(model_info, pkt, curr_rot_pkt, curr_mot_pkt, visible_switch)) then + + local tmstamp + if (pkt_num_add == 0) then + local fpkt = packets[1] + tmstamp = fpkt.tmstamp + else + tmstamp = pkt.tmstamp + end + + if not block_is_open then + if not fh:write(blk_head) then + print("info: write: error writing path block head to file") + return false + end + block_is_open = true + end + + write_dynamic_path_element(fh, model_info, tmstamp, pkt, curr_rot_pkt) + + if is_model_condition_last_met(model_info, pkt, curr_rot_pkt, curr_mot_pkt, visible_switch) and (block_is_open) then + if not fh:write(blk_tail) then + print("info: write: error writing path block tail to file") + return false + end + block_is_open = false + end + + end + + prev_pkt = pkt + prev_rot_pkt = curr_rot_pkt + visible_switch = false + pkt_num_add = pkt_num_add + 1 + end + curr_pkt = pkt + pkt_num_pos = pkt_num_pos + 1 + elseif (pkt.typ == TYP_AIR_ROTAT) then + curr_rot_pkt = pkt + elseif (pkt.typ == TYP_MOTOR_STAT) then + if (curr_mot_pkt.motor_status ~= 0) ~= (pkt.motor_status ~= 0) then + visible_switch = true + end + curr_mot_pkt = pkt + end + pkt_num_total = pkt_num_total + 1 + end + -- Make sure the track does not end before timestamp of last packet + if (prev_pkt.tmstamp > 1.0) then + local lpkt = packets[#packets] + if (lpkt.tmstamp > prev_pkt.tmstamp) and (block_is_open) then + -- write previous match packet one more time, but with timestamp from very last packet + write_dynamic_path_element(fh, model_info, lpkt.tmstamp, curr_pkt, curr_rot_pkt) + end + end + + if (block_is_open) then + if not fh:write(blk_tail) then + print("info: write: error writing path block tail to file") + return false + end + block_is_open = false + end + + debug(string.format("processed %d packets, %d stored path data, added to track %d of them",pkt_num_total,pkt_num_pos,pkt_num_add)) + return true +end + +local function write_dynamic_paths_folder(fh, file_settings) + print("debug: write_dynamic_paths_folder() called") + local blk = [[ + Dynamic paths + 1 + Flight path over time. +]] + if not fh:write(blk) then + print("info: write: error writing path block head to file") + return false + end + + -- Write folder LookAt block + if not write_lookat(fh, " ", file_settings, file_settings.lookat, -45.0, 60.0, "absolute") then + print("info: write: error writing lookat block to file") + return false + end + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "yellowLineGreenPoly", + part_name="Body", fname="phantom_3_pro_body", condtn=CONDTN_NONE, + shift_up=0.1, shift_x=0.0, shift_y=0.0, shift_z=0.0 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="Prop1Stat", fname="phantom_3_pro_prop_stat", condtn=CONDTN_MOTOR_OFF, + shift_up=0.1, shift_x=0.624, shift_y=0.624, shift_z=0.1 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="Prop1Spin", fname="phantom_3_pro_prop_spin", condtn=CONDTN_MOTOR_ON, + shift_up=0.1, shift_x=0.624, shift_y=0.624, shift_z=0.1 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="Prop2Stat", fname="phantom_3_pro_prop_stat", condtn=CONDTN_MOTOR_OFF, + shift_up=0.1, shift_x=0.624, shift_y=-0.624, shift_z=0.1 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="Prop2Spin", fname="phantom_3_pro_prop_spin", condtn=CONDTN_MOTOR_ON, + shift_up=0.1, shift_x=0.624, shift_y=-0.624, shift_z=0.1 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="Prop3Stat", fname="phantom_3_pro_prop_stat", condtn=CONDTN_MOTOR_OFF, + shift_up=0.1, shift_x=-0.624, shift_y=-0.624, shift_z=0.1 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="Prop3Spin", fname="phantom_3_pro_prop_spin", condtn=CONDTN_MOTOR_ON, + shift_up=0.1, shift_x=-0.624, shift_y=-0.624, shift_z=0.1 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="Prop4Stat", fname="phantom_3_pro_prop_stat", condtn=CONDTN_MOTOR_OFF, + shift_up=0.1, shift_x=-0.624, shift_y=0.624, shift_z=0.1 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="Prop4Spin", fname="phantom_3_pro_prop_spin", condtn=CONDTN_MOTOR_ON, + shift_up=0.1, shift_x=-0.624, shift_y=0.624, shift_z=0.1 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + -- TODO make support of independent gimbal arm movement + -- while there's no support, we can keep all gimbal arms as one + local model_info = { head=0.0, tilt=0.0, roll=0.0, scale=0.005, line_style = "noLineNoPoly", + part_name="GimbalYaw", fname="phantom_3_pro_gimbal_arms", condtn=CONDTN_NONE, + shift_up=0.1, shift_x=-0.109, shift_y=0.0, shift_z=-0.442 } + write_dynamic_paths_placemark(fh, file_settings, model_info) + + local blk = [[ +]] + if not fh:write(blk) then + print("info: write: error writing path block tail to file") + return false + end + return true +end + +local function write_screen_overlay_left_stick(fh, beg_tmstamp, end_tmstamp, pkt) + local throttle = -4.5 - pkt.throttle * 4.5/10000 + local rudder = -4.5 - pkt.rudder * 4.5/10000 + local blk = [[ + Controller left knob + 1 + ]] .. os.date('!%Y-%m-%dT%H:%M:%S', beg_tmstamp) .. string.format(".%03dZ", (beg_tmstamp * 1000) % 1000) .. [[]] .. os.date('!%Y-%m-%dT%H:%M:%S', end_tmstamp) .. string.format(".%03dZ", (end_tmstamp * 1000) % 1000) .. [[ + res/virtual_control_stick_knob.png + + + + + +]] + if not fh:write(blk) then + print("info: write: error writing screen overlays to file") + return false + end + return true +end + +local function write_screen_overlay_right_stick(fh, beg_tmstamp, end_tmstamp, pkt) + local aileron = 5.5 + pkt.aileron * 4.5/10000 + local elevator = -4.5 - pkt.elevator * 4.5/10000 + local blk = [[ + Controller right knob + 1 + ]] .. os.date('!%Y-%m-%dT%H:%M:%S', beg_tmstamp) .. string.format(".%03dZ", (beg_tmstamp * 1000) % 1000) .. [[]] .. os.date('!%Y-%m-%dT%H:%M:%S', end_tmstamp) .. string.format(".%03dZ", (end_tmstamp * 1000) % 1000) .. [[ + res/virtual_control_stick_knob.png + + + + + +]] + if not fh:write(blk) then + print("info: write: error writing screen overlays to file") + return false + end + return true +end + +local function write_screen_overlay_flyc_mode1(fh, beg_tmstamp, end_tmstamp, pkt) + local blk = [[ + FlyC mode1 + 1 + ]] .. os.date('!%Y-%m-%dT%H:%M:%S', beg_tmstamp) .. string.format(".%03dZ", (beg_tmstamp * 1000) % 1000) .. [[]] .. os.date('!%Y-%m-%dT%H:%M:%S', end_tmstamp) .. string.format(".%03dZ", (end_tmstamp * 1000) % 1000) .. [[ + ]] .. string.format("",pkt.mode1_text) .. [[ + + + + +]] + if not fh:write(blk) then + print("info: write: error writing screen overlays to file") + return false + end + return true +end + +local function overlay_stick_needs_refersh(file_settings, val, prev_val, tmstamp, prev_tmstamp) + local min_delta_time = 0.05 + local min_delta_stick = 50 + + if (tmstamp - prev_tmstamp) <= min_delta_time then + return false + end + + if (math.abs(val - prev_val) > min_delta_stick) then + return true + end + + if (tmstamp - prev_tmstamp) <= 4*min_delta_time then + return false + end + + if (math.abs(val - prev_val) > min_delta_stick/4) then + return true + end + + if (tmstamp - prev_tmstamp) <= 8*min_delta_time then + return false + end + + -- Register even smallest changes near central position + if (math.abs(val - prev_val) > 1) and (val < min_delta_stick) then + return true + end + + return false +end + +local function overlay_int_switch_needs_refersh(file_settings, val, prev_val, tmstamp, prev_tmstamp) + local min_delta_time = 0.02 + + if (tmstamp - prev_tmstamp) <= min_delta_time then + return false + end + + if (val ~= prev_val) then + return true + end + + return false +end + +local function write_screen_overlays_folder(fh, file_settings) + print("debug: write_dynamic_paths_folder() called") + local packets = file_settings.packets + + if (packets[1] == nil) then + print("info: no packets, skipping") + return false + end + local blk = [[ + Screen Overlays + 1 + Overlays showing controller state. + + Controller left scale + 1 + + res/virtual_control_stick_back.png + + + + + + + + Controller right scale + 1 + + res/virtual_control_stick_back.png + + + + + + +]] + if not fh:write(blk) then + print("info: write: error writing screen overlays to file") + return false + end + + local pkt_num_total = 0 + local pkt_num_ctrl = 0 + local pkt_num_flyc = 0 + local prev_left_pkt = { elevator = 0, rudder = 0, aileron = 0, throttle = 0, tmstamp=packets[1].tmstamp } + local prev_right_pkt = prev_left_pkt + local curr_rc_pkt = prev_left_pkt + local prev_mode1_pkt = { mode1 = 0, mode1_text = "Startup", tmstamp=packets[1].tmstamp } + for pos,pkt in pairs(packets) do + + if (pkt.typ == TYP_RC_STAT) then + + if (overlay_stick_needs_refersh(file_settings, pkt.throttle, prev_left_pkt.throttle, pkt.tmstamp, prev_left_pkt.tmstamp)) or + (overlay_stick_needs_refersh(file_settings, pkt.rudder, prev_left_pkt.rudder, pkt.tmstamp, prev_left_pkt.tmstamp)) then + + write_screen_overlay_left_stick(fh, prev_left_pkt.tmstamp, pkt.tmstamp, prev_left_pkt) + prev_left_pkt = pkt + end + + if (overlay_stick_needs_refersh(file_settings, pkt.aileron, prev_right_pkt.aileron, pkt.tmstamp, prev_right_pkt.tmstamp)) or + (overlay_stick_needs_refersh(file_settings, pkt.elevator, prev_right_pkt.elevator, pkt.tmstamp, prev_right_pkt.tmstamp)) then + + write_screen_overlay_right_stick(fh, prev_right_pkt.tmstamp, pkt.tmstamp, prev_right_pkt) + prev_right_pkt = pkt + end + curr_rc_pkt = pkt + pkt_num_ctrl = pkt_num_ctrl + 1 + + elseif (pkt.typ == TYP_FLYC_STAT) then + + if (overlay_int_switch_needs_refersh(file_settings, pkt.mode1, prev_mode1_pkt.mode1, pkt.tmstamp, prev_mode1_pkt.tmstamp)) then + write_screen_overlay_flyc_mode1(fh, prev_mode1_pkt.tmstamp, pkt.tmstamp, prev_mode1_pkt) + prev_mode1_pkt = pkt + end + pkt_num_flyc = pkt_num_flyc + 1 + + end + pkt_num_total = pkt_num_total + 1 + end + -- Make sure the track does not end before timestamp of last packet + if (true) then + local lpkt = packets[#packets] + -- write previous match packets one more time, but with timestamp from very last packet + if (lpkt.tmstamp > prev_left_pkt.tmstamp) then + write_screen_overlay_left_stick(fh, prev_left_pkt.tmstamp, lpkt.tmstamp, curr_rc_pkt) + end + if (lpkt.tmstamp > prev_right_pkt.tmstamp) then + write_screen_overlay_right_stick(fh, prev_right_pkt.tmstamp, lpkt.tmstamp, curr_rc_pkt) + end + if (lpkt.tmstamp > prev_mode1_pkt.tmstamp) then + write_screen_overlay_flyc_mode1(fh, prev_mode1_pkt.tmstamp, lpkt.tmstamp, prev_mode1_pkt) + end + end + debug(string.format("processed %d packets, %d radio controller data, %d flight controller data",pkt_num_total,pkt_num_ctrl,pkt_num_flyc)) + + local blk = [[ +]] + if not fh:write(blk) then + print("info: write: error writing screen overlays to file") + return false + end + return true +end + + +local function write_close(fh, capture) + print("debug: write_close() called") + + -- get file settings + local file_settings = capture.private_table + if not file_settings then + print("info: write() failed to get private table file settings") + return false + end + + process_packets(file_settings, file_settings.packets, true) + + if not write_info(fh, " ", file_settings) then + print("info: write: error writing info block to file") + return false + end + + -- Write global LookAt block + if not write_lookat(fh, " ", file_settings, file_settings.lookat, -45.0, 45.0, "absolute") then + print("info: write: error writing lookat block to file") + return false + end + + -- Write static paths (without time dependencies) + write_static_paths_folder(fh, file_settings) + + -- Write the more interesting, dynamic paths + write_dynamic_paths_folder(fh, file_settings) + + -- Write screen overlays + write_screen_overlays_folder(fh, file_settings) + + local footer = [[ + +]] + if not fh:write(footer) then + print("info: write: error writing file footer") + return false + end + + print("debug: Good night, and good luck") + return true +end + +-- do a payload dump when prompted by the user +local function init_payload_dump(filename, ground_alt_val, pos_typ_val, min_dist_shift_val, model_detail_val, path_style_val) + + local packet_count = 0 + os.setlocale("C") -- this is to avoid country-specific number conventions + -- Osd General + local filter = "dji_p3_flyrec.etype == 0x0000 or dji_p3_flyrec.etype == 0x0005 or dji_p3_flyrec.etype == 0x000c" + local tap = Listener.new(nil,filter) + local fh = assert(io.open(filename, "w+")) + + capture = ExportCaptureInfo:create() + capture.user_options = { ground_alt=ground_alt_val, pos_typ=pos_typ_val, dist_shift=min_dist_shift_val, model_detail=model_detail_val, path_style=path_style_val } + write_open(fh, capture) + + -- this function is going to be called once each time our filter matches + function tap.packet(pinfo,tvb) + + if ( true ) then + packet_count = packet_count + 1 + + -- there can be multiple packets in a given frame, so get them all into a table + --local contents = { dji_p3_pkt() } + + --for i,fldinfo in ipairs(contents) do + write(fh, capture, pinfo) + --end + end + end + + -- re-inspect all the packets that are in the current capture, thereby + -- triggering the above tap.packet function + retap_packets() + + -- prepare for cleanup + write_close(fh, capture) + -- cleanup + fh:close() + tap:remove() + print("info: Dumped packets: " .. packet_count ) +end + +-- show this dialog when the user select "Export" from the Tools menu +local function begin_dialog_menu() + new_dialog("KML path of DJI drone flight writer", init_payload_dump, + "Output file\n(type KML file name)", + "Ground level altitude\n(altitude above sea at the starting point, in meters;\nif empty, measurements average will be used)", + "Positioning type\n('a' for accurate, using combined data from all sensors\n'g' for GNSS, using data only from satellites;\nif empty, 'a' will be used)", + "Minimal registered position difference\n(distance in milimeters below which\na path point will be optimized out;\nif empty, 12 will be used)", + "3D Model detail level\n(controls amount of faces in aircraft model:\n0 - max complexity,\n1 - up to 20k faces,\n2 - up to 2k faces, default)", + "Path style\n(flat, line, wall) UNUSED") +end + +register_menu("Export KML from DJI drone flight", begin_dialog_menu, MENU_TOOLS_UNSORTED) + +print("debug: Tools Menu Handler registered") diff --git a/dissectors/dji-dumlv1/src/init.lua b/dissectors/dji-dumlv1/src/init.lua new file mode 100644 index 0000000..7e8286b --- /dev/null +++ b/dissectors/dji-dumlv1/src/init.lua @@ -0,0 +1,35 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/o-gs/dji-firmware-tools (comm_dissector/wireshark/init.lua), +-- commit 1db36ddf45d8018ea849f0c03c5e45d2f3068844 du 25/10/2026 (dernière modification du fichier : +-- commit 886155087c08b571b79e57b9f6b096f4e72ac886 du 26/04/2025). +-- Licence amont : GPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +disable_lua = false + +-- Change dji_script_path to point to the directory where you have copied +-- the Lua scripts. Do not place them in the Wireshark Lua directory. +-- Please see the README file for more information. +-- This path should be an absolute path and end with a "/" +-- +-- Linux/MacOS example: +-- local dji_script_path = "/path/to/scripts/" +-- Windows example: +-- local dji_script_path = "C:\\path\\to\\scripts\\" + +local dji_script_path = "" + +-- If you have not changed the line above, Lua will look for the scripts +-- in the current working directory and probably not find them. + +dofile(dji_script_path .. 'dji-dumlv1-proto.lua') + +dofile(dji_script_path .. 'dji-p3-flyrec-proto.lua') +dofile(dji_script_path .. 'dji-p3-batt-proto.lua') +dofile(dji_script_path .. 'dji-p3.lua') + +dofile(dji_script_path .. 'dji-mavic-flyrec-proto.lua') +dofile(dji_script_path .. 'dji-mavic.lua') + +dofile(dji_script_path .. 'dji-spark-flyrec-proto.lua') +dofile(dji_script_path .. 'dji-spark.lua') + +dofile(dji_script_path .. 'dji-write-kml.lua') diff --git a/dissectors/drager-infinity/LICENSE b/dissectors/drager-infinity/LICENSE new file mode 100644 index 0000000..0ad25db --- /dev/null +++ b/dissectors/drager-infinity/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + 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 +them 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/dissectors/drager-infinity/README.md b/dissectors/drager-infinity/README.md new file mode 100644 index 0000000..4043281 --- /dev/null +++ b/dissectors/drager-infinity/README.md @@ -0,0 +1,82 @@ +# Dräger Infinity — diffusions UDP du réseau de surveillance + +Dissecteur Wireshark Lua expérimental des diffusions UDP (port 2050) du +réseau de moniteurs patient Dräger Infinity, obtenu par rétro-ingénierie. +Il traite deux formes de trames, reconnues uniquement à leur longueur. +Les trames de 660 octets sont des messages d'alarme ou d'état : appareil, +alerte, nom du patient. Les trames de plus de 1000 octets portent les +mesures : fréquences respiratoire et cardiaque (ECG), SpO2 et pouls, +pression non invasive systolique, diastolique et moyenne, température +(issue #520). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/cbluoss/InfinityDissector (`Infinity.lua`, seul fichier du dépôt avec `LICENSE`) | +| Commit importé | `c60fdfa5fafd32c0ff6136e4c923edad985305f2` du 11/04/2021 (« fixed spo2 address », dernier commit de `main`, qui modifie aussi `Infinity.lua`) | +| Licence amont | AGPL-3.0 : `LICENSE` du dépôt (texte GNU AGPL v3 sans mention « ou ultérieure » de l'auteur, d'où `AGPL-3.0-only`). Combinaison avec la GPL-3.0 de ce dépôt permise par l'article 13 de la GPL v3 ; l'AGPL est déjà présente dans le dépôt (`dissectors/aerospike`) | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur Dräger Infinity dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/Infinity.lua` | Protocole `Infinity` (« Infinity Network Protocol ») sur UDP 2050 (ligne 102) ; champs `infinity.packet.*`, `infinity.message.*`, `infinity.patient.name`, `infinity.data.*` | + +## Utilisation + +**Le script ne se charge pas avec Wireshark 4.6.4.** Le nom de filtre +`infinity`, dérivé du nom de protocole déclaré ligne 6, est un mot +réservé des filtres d'affichage. tshark s'arrête dès le chargement +(« Dissector bug: Protocol filter name "infinity" is invalid because it +is a reserved keyword », code de sortie 8). Wireshark, qui partage ce contrôle, n'a pas été +essayé ; il faut s'attendre au même échec et retirer le greffon du +dossier des plugins. + +Il ne peut servir qu'avec un Wireshark plus ancien qui accepte ce nom : +copier `src/Infinity.lua` dans le dossier des plugins Lua personnels, +puis Ctrl+Maj+L. Filtre : `infinity`. Autre port : `Decode As…`. + +## Vérification à l'import + +- `luac5.4 -p` : OK ; chargement dans tshark 4.6.4 : échec (voir + ci-dessus). +- Pour comparer, une **copie hors dépôt** dont seul le nom du protocole a + été changé (`InfinityLua`) a été chargée sur des captures UDP + synthétiques construites d'après les décalages du script : + +| Essai | Résultat | +|---|---| +| Trame de 660 octets (horodatage, appareil `Bed 12A`, alerte, nom `DUPONT^JEAN`) | `Packet timestamp`, `Packet length: 660`, `Is Message` exacts ; **`Device`, `Alert` et `Patient Name` illisibles** (caractères CJK : octets ASCII apparemment lus par paires, comme de l'UTF-16) | +| Trame de 1200 octets avec mesures (FR 16, FC 72, SpO2 98, pouls 71, PNI 120/80/93, 37,2 °C) | toutes les valeurs exactes (température `372`) | +| Même trame avec FC 150 | `Heart Rate (ECG): -106` (champ signé sur un octet) | +| Trame de 10 octets | **erreur Lua** ligne 71 (`Range is out of bounds`) | + +## Limites constatées + +- Nom de protocole réservé : inutilisable tel quel avec Wireshark 4.6.4. +- Ligne 60, `infinity_protocol.fields` est remplacé par une table de + variables jamais définies (`RRsys`, `sPO2`…). La déclaration des + lignes 7 à 56 est donc perdue ; dans la copie d'essai, les champs + s'affichent malgré tout. +- Chaînes (lignes 76 à 78) passées comme valeurs Lua plutôt que comme + plages du tampon : affichage illisible, pas de lien vers les octets. +- Mesures en entiers signés sur un octet (`ProtoField.int8`) : toute + valeur au-delà de 127 (fréquence cardiaque, pression systolique) est + négative. +- Type de trame déduit de la seule longueur (660 ou plus de 1000 + octets) ; aucun contrôle de longueur minimale (erreur Lua sur trame + courte) ; tout trafic UDP 2050 est revendiqué. +- Décalages issus de la rétro-ingénierie d'une seule configuration + d'appareils ; le commentaire de la ligne 43 indique `0x01FF` pour la + SpO2, le code lit `0x00FF` (ligne 87, correction du dernier commit). +- Variables globales (`packet_length`, `spo2`, `length`…) ; colonne + Info laissée à UDP ; pas de capture réelle disponible. +- Données de santé nominatives (nom du patient) en clair dans les + trames : à manier avec précaution. diff --git a/dissectors/drager-infinity/src/Infinity.lua b/dissectors/drager-infinity/src/Infinity.lua new file mode 100644 index 0000000..4f874b5 --- /dev/null +++ b/dissectors/drager-infinity/src/Infinity.lua @@ -0,0 +1,102 @@ +-- SPDX-License-Identifier: AGPL-3.0-only +-- Importé de https://github.com/cbluoss/InfinityDissector (Infinity.lua), +-- commit c60fdfa5fafd32c0ff6136e4c923edad985305f2 du 11/04/2021 (dernière modification du fichier : +-- commit c60fdfa5fafd32c0ff6136e4c923edad985305f2 du 11/04/2021). +-- Licence amont : AGPL-3.0, LICENSE du dépôt — voir README.md et LICENSE. +infinity_protocol = Proto("Infinity", "Infinity Network Protocol") +infinity_protocol.fields = {} + +-- What we know about the protocol so far: +-- * a 18(?) Byte header with a message_timestamp followed for +-- * 660 Byte broadcasts used for alarm and status messages e.g. "ECG electrodes removed" +-- * >1000 Byte broadcast depending on the current device configuration send every second with all current datapoints +-- * 36 Bytes for each of most datapoints (including lower/upper alarm thresholds, the measured value) + + +-- Common packet fields: +packet_length = ProtoField.int16("infinity.packet.length", "Packet length", base.DEC) +infinity_protocol.fields[#infinity_protocol.fields+1]=packet_length +packet_timestamp = ProtoField.int32("infinity.packet.timestamp", "Packet timestamp", base.DEC) -- 0x14,4 +infinity_protocol.fields[#infinity_protocol.fields+1]=packet_timestamp + +-- Message packet fields: +is_message = ProtoField.bool("infinity.packet.message", "Is Message") +infinity_protocol.fields[#infinity_protocol.fields+1]=is_message +message_device = ProtoField.string("infinity.message.device", "Device", base.ASCII) -- 0x60,16 +infinity_protocol.fields[#infinity_protocol.fields+1]=message_device +message_alert = ProtoField.string("infinity.message.alert", "Alert", base.ASCII) -- 0xAE,32 +infinity_protocol.fields[#infinity_protocol.fields+1]=message_alert + +patient_name = ProtoField.string("infinity.patient.name", "Patient Name", base.ASCII) -- 0x24,48 +infinity_protocol.fields[#infinity_protocol.fields+1]=patient_name + +-- Data packet fields: +-- (basic) Alarm tresholds are usually -2/+2 bytes relative to the measured value +is_data = ProtoField.bool("infinity.packet.data", "Is Data") +infinity_protocol.fields[#infinity_protocol.fields+1]=is_data + +ecg_respiratory_rate = ProtoField.int8("infinity.data.ecg.respiratory_rate", "Respiratory Rate (ECG)", base.DEC) -- 0x00DB +infinity_protocol.fields[#infinity_protocol.fields+1]=ecg_respiratory_rate +ecg_heart_rate = ProtoField.int8("infinity.data.ecg.heart_rate", "Heart Rate (ECG)", base.DEC) -- 0x0027 +infinity_protocol.fields[#infinity_protocol.fields+1]=ecg_heart_rate + +spo2 = ProtoField.int8("infinity.data.spo2", "sPO2", base.DEC) -- 0x01FF +infinity_protocol.fields[#infinity_protocol.fields+1]=spo2 +spo2_pulse = ProtoField.int8("infinity.data.spo2.pulse", "sPO2 Pulse", base.DEC) -- 0x0123 +infinity_protocol.fields[#infinity_protocol.fields+1]=spo2_pulse + +nibp_sys = ProtoField.int8("infinity.data.nibp.sys", "NIBP (Systolic)", base.DEC) -- 0x0147 +infinity_protocol.fields[#infinity_protocol.fields+1]=nibp_sys +nibp_dia = ProtoField.int8("infinity.data.nibp.dia", "NIBP (Diastolic)", base.DEC) -- 0x016B +infinity_protocol.fields[#infinity_protocol.fields+1]=nibp_dia +nibp_map = ProtoField.int8("infinity.data.nibp.map", "NIBP (MAP)", base.DEC) -- 0x018F +infinity_protocol.fields[#infinity_protocol.fields+1]=nibp_map + +temperature = ProtoField.int16("infinity.data.temperature", "Temperature (in Celsius *10)", base.DEC) -- 0x00B6,2 +infinity_protocol.fields[#infinity_protocol.fields+1]=temperature + + + +infinity_protocol.fields = {RRsys, RRdia, RRmad, sPO2, sPO2_P, NIBPsys } + +function infinity_protocol.dissector(buffer, pinfo, tree) + + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = infinity_protocol.name + + local subtree = tree:add(infinity_protocol, buffer(), "infinity Protocol Data") + + subtree:add(packet_timestamp, buffer(0x14,4)) + subtree:add(packet_length, length) + + if length == 660 then + subtree:add(is_message, true) + subtree:add(message_device, buffer:range(0x60,16):ustring()) + subtree:add(message_alert, buffer:range(0xAE,32):ustring()) + subtree:add(patient_name, buffer:range(0x24,48):ustring()) + + end + + + if length > 1000 then + subtree:add(is_data, true) + subtree:add(ecg_respiratory_rate, buffer(0x00DB,1)) + subtree:add(ecg_heart_rate, buffer(0x0027,1)) + subtree:add(spo2, buffer(0x00FF,1)) + subtree:add(spo2_pulse, buffer(0x0123,1)) + subtree:add(nibp_sys, buffer(0x0147,1)) + subtree:add(nibp_dia, buffer(0x016B,1)) + subtree:add(nibp_map, buffer(0x018F,1)) + subtree:add(temperature, buffer(0x00B6,2)) + + + + end + + +end + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(2050, infinity_protocol) diff --git a/dissectors/ecash-avalanche/LICENSE b/dissectors/ecash-avalanche/LICENSE new file mode 100644 index 0000000..d412e7e --- /dev/null +++ b/dissectors/ecash-avalanche/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2009-2026 The Bitcoin developers +Copyright (c) 2009-2017 The Bitcoin Core developers + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dissectors/ecash-avalanche/README.md b/dissectors/ecash-avalanche/README.md new file mode 100644 index 0000000..bf03bab --- /dev/null +++ b/dissectors/ecash-avalanche/README.md @@ -0,0 +1,47 @@ +# eCash Avalanche — post-dissecteur (Bitcoin ABC) + +Post-dissecteur Wireshark Lua des messages **Avalanche** du réseau +pair-à-pair **eCash (XEC)**, nœud Bitcoin ABC. Il cherche dans chaque +paquet les en-têtes de message (magiques mainnet, testnet, regtest) et +décode : + +- `avapoll` : numéro de tour, inventaires (type — transaction, bloc, + preuve Avalanche, *stake contender*… — et hachage) ; +- `avaresponse` : tour, délai de refroidissement, compteur de rafale, + votes (code d'erreur et hachage). + +Filtre : `ecash`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Bitcoin-ABC/bitcoin-abc (fichier `contrib/wireshark/ecash_postdissector.lua`) | +| Commit importé | `67a6f6201e2d08e0e401ae4daea2fdd297e12f94` du 01/11/2026 (branche `master`, dernier commit ; dernière modification du script : `3f85d01` du 20/03/2026) | +| Licence amont | MIT (fichier `COPYING` : « Copyright (c) 2009-2026 The Bitcoin developers », « 2009-2017 The Bitcoin Core developers », copié ici sous le nom `LICENSE`) ; le script n'a pas d'en-tête | +| Natif Wireshark 4.6.4 | En partie — le dissecteur natif `bitcoin` décode l'en-tête et les messages classiques, pas les messages Avalanche d'eCash | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `ecash_postdissector.lua` | Post-dissecteur `ecash` | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `ecash_postdissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), redémarrer Wireshark, puis +filtrer avec `ecash`. (Note amont : en exécutant Wireshark en root, il +faut utiliser le dossier de plugins global.) + +## Remarques + +- Post-dissecteur : il parcourt octet par octet chaque paquet capturé à la + recherche d'un magique, ce qui peut ralentir les grosses captures. Pas + de réassemblage TCP : un message coupé sur plusieurs segments n'est pas + décodé. +- Seuls `avapoll` et `avaresponse` sont pris en charge. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/ecash-avalanche/ecash_postdissector.lua b/dissectors/ecash-avalanche/ecash_postdissector.lua new file mode 100644 index 0000000..c203c0f --- /dev/null +++ b/dissectors/ecash-avalanche/ecash_postdissector.lua @@ -0,0 +1,175 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Bitcoin-ABC/bitcoin-abc (contrib/wireshark/ecash_postdissector.lua), +-- commit 67a6f6201e2d08e0e401ae4daea2fdd297e12f94 du 01/11/2026. +-- Licence amont : MIT (COPYING amont) — voir README.md. +--[[ + eCash Avalanche — Wireshark Lua post-dissector + Display filter: ecash + + Supported messages: + - avapoll + - avaresponse +]] + +local proto_ecash = Proto("ecash", "eCash") + +local f_round_poll = ProtoField.uint64("ecash.avapoll.round", "Round", base.DEC) +local inv_type_strings = { + [0] = "Error", + [1] = "TX", + [2] = "Block", + [3] = "filtered Block", + [4] = "CompactBlock", + [0x1f000001] = "avalanche proof", + [0x1f000002] = "avalanche stake contender", +} +local f_inv_type = ProtoField.uint32("ecash.avapoll.inv_type", "Inv type", base.DEC, inv_type_strings) +local f_inv_hash = ProtoField.bytes("ecash.avapoll.inv_hash", "Hash") + +local f_round_resp = ProtoField.uint64("ecash.avaresponse.round", "Round", base.DEC) +local f_cooldown = ProtoField.uint32("ecash.avaresponse.cooldown", "Cooldown", base.DEC) +local f_burst = ProtoField.int32("ecash.avaresponse.burst_counter", "Burst counter", base.DEC) +local f_vote_error = ProtoField.int32("ecash.avaresponse.vote_error", "Vote error", base.DEC) +local f_vote_hash = ProtoField.bytes("ecash.avaresponse.vote_hash", "Vote hash") + +proto_ecash.fields = { + f_round_poll, f_inv_type, f_inv_hash, + f_round_resp, f_cooldown, f_burst, f_vote_error, f_vote_hash, +} + +local HEADER_LEN = 24 +local CMD_AVAPOLL = "avapoll" +local CMD_AVARESPONSE = "avaresponse" + +local MAGICS = { + { "mainnet", { 0xd9, 0xb4, 0xbe, 0xf9 } }, + { "testnet", { 0x0b, 0x11, 0x09, 0x07 } }, + { "regtest", { 0xda, 0xb5, 0xbf, 0xfa } }, +} + +local function byte_at(tvb, off) + return tvb:bytes(off, 1):get_index(0) +end + +local function is_magic_at(tvb, off, magic) + return byte_at(tvb, off) == magic[1] + and byte_at(tvb, off + 1) == magic[2] + and byte_at(tvb, off + 2) == magic[3] + and byte_at(tvb, off + 3) == magic[4] +end + +local function find_magic(tvb, start_pos) + local len = tvb:len() + if start_pos + 4 > len then + return nil + end + local pos = start_pos + while pos <= len - 4 do + for _, entry in ipairs(MAGICS) do + if is_magic_at(tvb, pos, entry[2]) then + return pos + end + end + pos = pos + 1 + end + return nil +end + +local function read_compact_size(tvb, abs_off) + local b = byte_at(tvb, abs_off) + local off = abs_off + 1 + local n + if b < 253 then + n = b + elseif b == 253 then + n = tvb(off, 2):le_uint() + off = off + 2 + elseif b == 254 then + n = tvb(off, 4):le_uint() + off = off + 4 + else + local lo = tvb(off, 4):le_uint() + local hi = tvb(off + 4, 4):le_uint() + n = lo + hi * 4294967296 + off = off + 8 + end + return n, off +end + +local function hex32(tvb, off) + local t = {} + for i = 0, 31 do + t[#t + 1] = string.format("%02x", byte_at(tvb, off + i)) + end + return table.concat(t) +end + +local function cmd12(tvb, off) + local parts = {} + for i = 0, 11 do + local byte = byte_at(tvb, off + i) + if byte == 0 then + break + end + parts[#parts + 1] = string.char(byte) + end + return table.concat(parts) +end + +function proto_ecash.dissector(tvb, pinfo, tree) + local len = tvb:len() + if len < HEADER_LEN then + return + end + + local pos = 0 + while pos <= len - HEADER_LEN do + pos = find_magic(tvb, pos) + if pos == nil then + break + end + + local cmd = cmd12(tvb, pos + 4) + local payload_len = tvb(pos + 16, 4):le_uint() + local payload_start = pos + HEADER_LEN + local total_len = HEADER_LEN + payload_len + + if payload_len > 0x02000000 or payload_start + payload_len > len then + pos = pos + 1 + elseif cmd == CMD_AVAPOLL then + local st = tree:add(proto_ecash, tvb(pos, total_len), "eCash Avalanche: avapoll") + st:add_le(f_round_poll, tvb(payload_start, 8)) + local n, off = read_compact_size(tvb, payload_start + 8) + st:add(tvb(payload_start + 8, off - payload_start - 8), "Inventory count: " .. tostring(n)) + for i = 1, n do + if off + 36 > payload_start + payload_len then break end + local inv = st:add(tvb(off, 36), "Inventory[" .. i .. "]") + inv:add_le(f_inv_type, tvb(off, 4)) + inv:add(f_inv_hash, tvb(off + 4, 32)):append_text(" (" .. hex32(tvb, off + 4) .. ")") + off = off + 36 + end + pinfo.cols.info:set("eCash: avapoll") + pos = pos + total_len + elseif cmd == CMD_AVARESPONSE and payload_len >= 16 then + local st = tree:add(proto_ecash, tvb(pos, total_len), "eCash Avalanche: avaresponse") + st:add_le(f_round_resp, tvb(payload_start, 8)) + st:add_le(f_cooldown, tvb(payload_start + 8, 4)) + st:add_le(f_burst, tvb(payload_start + 12, 4)) + local n, off = read_compact_size(tvb, payload_start + 16) + st:add(tvb(payload_start + 16, off - payload_start - 16), "Vote count: " .. tostring(n)) + for i = 1, n do + if off + 36 > payload_start + payload_len then break end + local v = st:add(tvb(off, 36), "Vote[" .. i .. "]") + v:add_le(f_vote_error, tvb(off, 4)) + v:add(f_vote_hash, tvb(off + 4, 32)):append_text(" (" .. hex32(tvb, off + 4) .. ")") + off = off + 36 + end + pinfo.cols.info:set("eCash: avaresponse") + pos = pos + total_len + else + pos = pos + 1 + end + end +end + +register_postdissector(proto_ecash) diff --git a/dissectors/echonet-lite/LICENSE b/dissectors/echonet-lite/LICENSE new file mode 100644 index 0000000..ddc8c5f --- /dev/null +++ b/dissectors/echonet-lite/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Yuki MIZUNO + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/echonet-lite/README.md b/dissectors/echonet-lite/README.md new file mode 100644 index 0000000..eab71da --- /dev/null +++ b/dissectors/echonet-lite/README.md @@ -0,0 +1,56 @@ +# ECHONET Lite (domotique japonaise) + +Dissecteur Wireshark Lua du protocole **ECHONET Lite** (version 1.12 de la +spécification du middleware de communication), standard japonais de +domotique et de gestion de l'énergie (HEMS, compteurs intelligents, +climatiseurs, capteurs…) sur UDP 3610 : en-têtes EHD1 / EHD2, identifiant +de transaction, objets source / destination (groupe et classe nommés), +service ESV (symbole), propriétés EPC / PDC / EDT ; noms et décodage des +propriétés pour le profil de nœud (`0x0EF0`) et le capteur +d'ouverture / fermeture (`0x0029`). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/mzyy94/ECHONET-Lite-dissector | +| Commit importé | `609a1256e983f48b049dc203b6aee33f135fdd78` du 31/07/2017 (branche `master`, dernier commit ; version 1.2.1 d'après `ChangeLog.txt`) | +| Licence amont | MIT (`LICENSE` amont, © 2016 Yuki MIZUNO ; même mention dans l'en-tête de chaque fichier Lua) | +| Natif Wireshark 4.6.4 | Non — pas de dissecteur ECHONET Lite dans la branche `release-4.6` des sources Wireshark | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `echonet-lite.lua` | Point d'entrée : protocole `echonetlite`, UDP 3610 | +| `echonet-lite-data.lua` | Décodage d'EDATA (objets, ESV, propriétés) | +| `echonet-lite-epcparser.lua` | Aiguillage vers le décodage des propriétés par classe | +| `echonet-lite-codelist.lua` | Tables de codes (groupes, classes, ESV) | +| `device-superclass.lua` | Propriétés communes de la super-classe des équipements | +| `group-0x0e-node-profile.lua` | Profil de nœud | +| `group-0x00-open-close.lua` | Capteur d'ouverture / fermeture | + +Fichiers importés tels quels (fins de ligne CRLF d'origine conservées) ; +seule une en-tête SPDX + provenance de quatre lignes a été ajoutée en tête +de chaque fichier. + +## Utilisation + +Copier les sept fichiers `.lua` (ou le dossier entier) dans le dossier +`plugins` de Wireshark (ex. `~/.config/wireshark/plugins/` ou +`~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `echonetlite` (par exemple `echonetlite.edata.esv == 0x73`). + +## Remarques + +- Les modules se chargent entre eux par `require` (même dossier du chemin + de recherche Lua) et le point d'entrée utilise des fonctions globales + définies par `echonet-lite-data.lua` ; l'ordre de chargement par + Wireshark n'est pas vérifié. +- Seules deux classes ont des propriétés nommées ; la signification des + EDT n'est pas interprétée (TODO amont). +- Documentation amont en japonais ; capture d'écran non reprise. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/echonet-lite/device-superclass.lua b/dissectors/echonet-lite/device-superclass.lua new file mode 100644 index 0000000..d311913 --- /dev/null +++ b/dissectors/echonet-lite/device-superclass.lua @@ -0,0 +1,180 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/mzyy94/ECHONET-Lite-dissector (device-superclass.lua), +-- commit 609a1256e983f48b049dc203b6aee33f135fdd78 du 31/07/2017. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- ######################################################## +-- ECHONET Lite Wireshark dissector +-- ######################################################## +-- +-- Author : Yuki MIZUNO +-- Version: 1.2.1 +-- License: MIT +-- +-- ######################################################## +-- +-- Copyright (c) 2016 Yuki MIZUNO +-- This software is released under the MIT License. +-- http://opensource.org/licenses/MIT +-- +local list = require("echonet-lite-codelist") +local properties = { + [0x80] = "Operating status", + [0x81] = "Installation location", + [0x82] = "Standard version information", + [0x83] = "Identification number", + [0x84] = "Measured instantaneous power consumption", + [0x85] = "Measured cumulative power consumption", + [0x86] = "Manufacturer's fault code", + [0x87] = "Current limit setting", + [0x88] = "Fault status", + [0x89] = "Fault description", + [0x8a] = "Manufacturer code", + [0x8b] = "Business facility code", + [0x8c] = "Product code", + [0x8d] = "Production number", + [0x8e] = "Production date", + [0x8f] = "Power-saving operation setting", + [0x93] = "Remote control setting", + [0x97] = "Current time setting", + [0x98] = "Current date setting", + [0x99] = "Power limit setting", + [0x9a] = "Cumulative operating time", + [0x9d] = "Status change announcement property map", + [0x9e] = "Set property map", + [0x9f] = "Get property map", +} + +-- ======================================================== +-- ECHONET Lite epc parser +-- ======================================================== + +local function devicesuperclass(classgroup, class, epc, pdc, edt, tree, edata, propmap) + local propmap = propmap or {} + local label = propmap[epc:uint()] or properties[epc:uint()] + tree:add(edata.fields.epc, epc, epc:uint(), nil, string.format("(%s)", label)) + tree:add(edata.fields.pdc, pdc) + tree:append_text(string.format(": %s", label)) + if pdc:uint() == 0 or edt:len() == 0 then + do return end + end + + local edttree = tree:add(edata.fields.edt, edt) + if epc:uint() == 0x80 then + local state = { + [0x30] = "ON", + [0x31] = "OFF" + } + edttree:append_text(string.format(" (%s)", state[edt:uint()])) + tree:append_text(string.format(" = %s", state[edt:uint()])) + -- elseif epc:uint() == 0x81 then -- TODO: Parse location + elseif epc:uint() == 0x82 then + if pdc:uint() ~= 4 then + do return end + end + local release = edt:range(2, 1):string() + + edttree:append_text(string.format(" (Appendix. %s)", release)) + tree:append_text(string.format(" = Appendix. %s", release)) + elseif epc:uint() == 0x83 then + if (not (edt:range(0, 1):uint() == 0xff and pdc:uint() == 9)) and (not (edt:range(0, 1):uint() == 0xfe and pdc:uint() == 17)) and (not edt:range(0, 1) == 0x00) then + do return end + end + edttree:add(edt:range(0, 1), "Communication ID:", string.format("0x%02x", edt:range(0, 1):uint())) + if edt:range(0, 1):uint() == 0x00 then + edttree:add(edt:range(1, pdc:uint()), "Unique number:", tostring(edt:range(1):bytes())) + elseif edt:range(0, 1):uint() == 0xfe then + edttree:add(edt:range(1, 3), "Manufacturer code:", tostring(edt:range(1, 3):bytes())) + edttree:add(edt:range(4, 13), "Unique ID:", tostring(edt:range(4, 13):bytes())) + else + edttree:add(edt:range(1, pdc:uint()), "Randomly generated protocol:", tostring(edt:range(1):bytes())) + end + elseif epc:uint() == 0x84 or epc:uint() == 0x99 then + edttree:append_text(string.format(" (%d W)", edt:uint())) + tree:append_text(string.format(" = %d W", edt:uint())) + elseif epc:uint() == 0x85 then + edttree:append_text(string.format(" (%d.%03d kWh)", edt:uint() / 1000, edt:uint() % 1000)) + tree:append_text(string.format(" = %d.%03d kWh", edt:uint() / 1000, edt:uint() % 1000)) + elseif epc:uint() == 0x86 then + if pdc:uint() < 4 then + do return end + end + edttree:add(edt:range(0, 1), "Fault code size:", tostring(edt:range(0, 1):uint())) + edttree:add(edt:range(1, 3), "Manufacturer code:", tostring(edt:range(1, 3):bytes())) + edttree:add(edt:range(4, edt:range(0, 1):uint()), "Manufacturer-defined fault code:", tostring(edt:range(4, edt:range(0, 1):uint()):bytes())) + elseif epc:uint() == 0x87 then + edttree:append_text(string.format(" (%d %)", edt:uint())) + tree:append_text(string.format(" = %d %", edt:uint())) + elseif epc:uint() == 0x88 then + local state = { + [0x41] = "Fault occurred", + [0x42] = "No fault has occurred" + } + edttree:append_text(string.format(" (%s)", state[edt:uint()])) + tree:append_text(string.format(" = %s", state[edt:uint()])) + -- elseif epc:uint() == 0x89 then -- TODO: Parse fault description + elseif epc:uint() == 0x8a then + if pdc:uint() ~= 3 then + do return end + end + edttree:add(edt:range(0, 3), "Manufacturer code:", tostring(edt:range(0, 3):bytes())) + -- elseif epc:uint() == 0x8b then -- nothing to parse + elseif epc:uint() == 0x8c or epc:uint() == 0x8d then + if pdc:uint() ~= 12 then + do return end + end + edttree:append_text(string.format(" [%s]", edt:range(0, 12):string())) + elseif epc:uint() == 0x8e or epc:uint() == 0x98 then + if pdc:uint() ~= 4 then + do return end + end + edttree:append_text(string.format(" [%d/%d/%d]", edt:range(0, 2):uint(), edt:range(2,1):uint(), edt:range(3,1):uint())) + elseif epc:uint() == 0x8f then + local state = { + [0x41] = "Power-saving mode", + [0x42] = "Normal operation mode" + } + edttree:append_text(string.format(" (%s)", state[edt:uint()])) + tree:append_text(string.format(" = %s", state[edt:uint()])) + elseif epc:uint() == 0x93 then + local state = { + [0x41] = "Not through a public network", + [0x42] = "Through a public network", + [0x61] = "Bad communication network state", + [0x62] = "Good communication network state", + } + edttree:append_text(string.format(" (%s)", state[edt:uint()])) + tree:append_text(string.format(" = %s", state[edt:uint()])) + elseif epc:uint() == 0x97 then + if pdc:uint() ~= 2 then + do return end + end + edttree:append_text(string.format(" [%02d:%02d]", edt:range(0, 1):uint(), edt:range(1, 1):uint())) + -- elseif epc:uint() == 0x98 then -- Already defined. See above. + -- elseif epc:uint() == 0x99 then -- Already defined. See above. + elseif epc:uint() == 0x9a then + if pdc:uint() ~= 5 then + do return end + end + local state = { + [0x41] = "Second", + [0x42] = "Minute", + [0x43] = "Hour", + [0x44] = "Day", + } + edttree:add(edt:range(0, 1), "Unit:", state[edt:range(0, 1):uint()]) + edttree:add(edt:range(1, 4), "Time:", tostring(edt:range(1, 4):uint())) + edttree:append_text(string.format(" (%d %ss)", edt:range(1, 4):uint(), state[edt:range(0,1):uint()])) + tree:append_text(string.format(" = %d %ss", edt:range(1, 4):uint(), state[edt:range(0,1):uint()])) + elseif epc:uint() == 0x9d or epc:uint() == 0x9e or epc:uint() == 0x9f then + edttree:add(edt:range(0, 1), "Property count:", edt:range(0, 1):uint()) + for i=1,edt:range(0, 1):uint() do + local property = propmap[edt:range(i, 1):uint()] or properties[edt:range(i, 1):uint()] + edttree:add(edt:range(i, 1), "-", property) + if i >= 16 then + do return end + end + end + end +end + +return devicesuperclass diff --git a/dissectors/echonet-lite/echonet-lite-codelist.lua b/dissectors/echonet-lite/echonet-lite-codelist.lua new file mode 100644 index 0000000..0cff7f8 --- /dev/null +++ b/dissectors/echonet-lite/echonet-lite-codelist.lua @@ -0,0 +1,256 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/mzyy94/ECHONET-Lite-dissector (echonet-lite-codelist.lua), +-- commit 609a1256e983f48b049dc203b6aee33f135fdd78 du 31/07/2017. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- ######################################################## +-- ECHONET Lite Wireshark dissector +-- ######################################################## +-- +-- Author : Yuki MIZUNO +-- Version: 1.2.1 +-- License: MIT +-- +-- ######################################################## +-- +-- Copyright (c) 2016 Yuki MIZUNO +-- This software is released under the MIT License. +-- http://opensource.org/licenses/MIT +-- + +local list = {} + +-- ======================================================== +-- ECHONET Lite code list +-- ======================================================== + +list.esv = { + [0x60] = "SetI", + [0x61] = "SetC", + [0x62] = "Get", + [0x63] = "INF_REQ", + [0x6E] = "SetGet", + [0x71] = "Set_Res", + [0x72] = "Get_Res", + [0x73] = "INF", + [0x74] = "INFC", + [0x7A] = "INFC_Res", + [0x7E] = "SetGet_Res", + [0x50] = "SetI_SNA", + [0x51] = "SetC_SNA", + [0x52] = "Get_SNA", + [0x53] = "INF_SNA", + [0x5E] = "SetGet_SNA" +} + +list.group = { + [0x00] = "Sensor-related device", + [0x01] = "Air Conditioner-related device", + [0x02] = "Housing/Facilities-related device", + [0x03] = "Cooking/Household-related device", + [0x04] = "Health-related device", + [0x05] = "Management/Operation-related device", + [0x06] = "Audiovisual-related device", + [0x0E] = "Profile object" +} + + +list.class = { + [0x00] = { + [0x01] = "Gas leak sensor", + [0x02] = "Crime prevention sensor", + [0x03] = "Emergency button", + [0x04] = "First-aid sensor", + [0x05] = "Earthquake sensor", + [0x06] = "Electric leak sensor", + [0x07] = "Human detection sensor", + [0x08] = "Visitor sensor", + [0x09] = "Call sensor", + [0x0A] = "Condensation sensor", + [0x0B] = "Air pollution sensor", + [0x0C] = "Oxygen sensor", + [0x0D] = "Illuminance sensor", + [0x0E] = "Sound sensor", + [0x0F] = "Mailing sensor", + [0x10] = "Weight sensor", + [0x11] = "Temperature sensor", + [0x12] = "Humidity sensor", + [0x13] = "Rain sensor", + [0x14] = "Water level sensor", + [0x15] = "Bath water level sensor", + [0x16] = "Bath heating status sensor", + [0x17] = "Water leak sensor", + [0x18] = "Water overflow sensor", + [0x19] = "Fire sensor", + [0x1A] = "Cigarette smoke sensor", + [0x1B] = "CO2 sensor", + [0x1C] = "Gas sensor", + [0x1D] = "VOC sensor", + [0x1E] = "Differential pressure sensor", + [0x1F] = "Air speed sensor", + [0x20] = "Odor sensor", + [0x21] = "Flame sensor", + [0x22] = "Electric energy sensor", + [0x23] = "Current value sensor", + [0x24] = "Daylight sensor", + [0x25] = "Water flow rate sensor", + [0x26] = "Micromotion sensor", + [0x27] = "Passage sensor", + [0x28] = "Bed presence sensor", + [0x29] = "Open/close sensor", + [0x2A] = "Activity amount sensor", + [0x2B] = "Human body location sensor", + [0x2C] = "Snow sensor", + [0x2D] = "Air pressure sensor" + }, + [0x01] = { + [0x30] = "Home air conditioner", + [0x31] = "Cold blaster", + [0x32] = "Electric fan", + [0x33] = "Ventilation fan", + [0x34] = "Air conditioner ventilation fan", + [0x35] = "Air cleaner", + [0x36] = "Cold blast fan", + [0x37] = "Circulator", + [0x38] = "Dehumidifier", + [0x39] = "Humidifier", + [0x3A] = "Ceiling fan", + [0x3B] = "Electric Kotatsu", + [0x3C] = "Electric heating pad", + [0x3D] = "Electric blanket", + [0x3E] = "Space heater", + [0x3F] = "Panel heater", + [0x40] = "Electric carpet", + [0x41] = "Floor heater", + [0x42] = "Electric heater", + [0x43] = "Fan heater", + [0x44] = "Battery charger", + [0x45] = "Package-type commercial air conditioner (indoor unit)", + [0x46] = "Package-type commercial air conditioner (outdoor unit)", + [0x47] = "Package-type commercial air conditioner thermal storage unit", + [0x48] = "Commercial fan coil unit", + [0x49] = "Commercial air conditioning cold source (chiller)", + [0x50] = "Commercial air conditioning hot source (boiler)", + [0x51] = "Air-conditioning VAV for commercial applications", + [0x52] = "Air handling unit (air-conditioning) for commercial applications", + [0x53] = "Unit-cooler", + [0x54] = "Condensing unit for commercial applications", + [0x55] = "Electric storage heater" + }, + [0x02] = { + [0x60] = "Electrically operated blind/shade", + [0x61] = "Electrically operated shutter", + [0x62] = "Electrically operated curtain", + [0x63] = "Electrically operated rain sliding door/shutter", + [0x64] = "Electrically operated gate", + [0x65] = "Electrically operated window", + [0x66] = "Automatically operated entrance door/sliding door", + [0x67] = "Garden sprinkler", + [0x68] = "Fire sprinkler", + [0x69] = "Fountain", + [0x6A] = "Instantaneous water heater", + [0x6B] = "Electric water heater", + [0x6C] = "Solar water heater", + [0x6D] = "Circulation pump", + [0x6E] = "Bidet-equipped toilet (with electrically warmed seat)", + [0x6F] = "Electric lock", + [0x70] = "Gas line valve", + [0x71] = "Home sauna", + [0x72] = "Hot water generator", + [0x73] = "Bathroom dryer", + [0x74] = "Home elevator", + [0x75] = "Electrically operated room divider", + [0x76] = "Horizontal transfer", + [0x77] = "Electrically operated clothes-drying pole", + [0x78] = "Septic tank", + [0x79] = "Home solar power generation ", + [0x7A] = "Cold/hot water heat source equipment", + [0x7B] = "Floor heater", + [0x7C] = "Fuel cell", + [0x7D] = "Storage battery", + [0x7E] = "Electric vehicle charger/discharger", + [0x7F] = "Engine cogeneration", + [0x80] = "Electric energy meter", + [0x81] = "Water flow meter", + [0x82] = "Gas meter", + [0x83] = "LP gas meter", + [0x84] = "Clock", + [0x85] = "Automatic door", + [0x86] = "Commercial elevator", + [0x87] = "Distribution panel metering", + [0x88] = "Low voltage smart electric energy meter", + [0x89] = "Smart gas meter", + [0x8A] = "High voltage smart electric energy meter", + [0x8B] = "Kerosene oil meter", + [0x8C] = "Smart kerosene oil meter", + [0x90] = "General lighting class", + [0x91] = "Single function lighting", + [0x99] = "Emergency lighting", + [0x9D] = "Equipment light", + [0xA0] = "Buzzer", + [0xA2] = "Household small wind turbine power generation class" + }, + [0x03] = { + [0xB0] = "Coffee machine", + [0xB1] = "Coffee mill", + [0xB2] = "Electric hot water pot (Electric thermos)", + [0xB3] = "Electric stove", + [0xB4] = "Toaster", + [0xB5] = "Juicer, food mixer", + [0xB6] = "Food processor", + [0xB7] = "Refrigerator", + [0xB8] = "Combination microwave oven(Electronic oven)", + [0xB9] = "Cooking heater", + [0xBA] = "Oven", + [0xBB] = "Rice cooker", + [0xBC] = "Electronic jar", + [0xBD] = "Dish washer", + [0xBE] = "Dish dryer", + [0xBF] = "Electric rice card cooker", + [0xC0] = "Keep-warm machine", + [0xC1] = "Rice mill", + [0xC2] = "Automatic bread cooker", + [0xC3] = "Slow cooker", + [0xC4] = "Electric pickles cooker", + [0xC5] = "Washing machine", + [0xC6] = "Clothes dryer", + [0xC7] = "Electric iron", + [0xC8] = "Trouser press", + [0xC9] = "Futon dryer", + [0xCA] = "Small article, shoes dryer", + [0xCB] = "Electric vacuum cleaner (including central vacuum cleaner)", + [0xCC] = "Disposer", + [0xCD] = "Electric mosquito catcher", + [0xCE] = "Commercial show case", + [0xCF] = "Commercial refrigerator", + [0xD0] = "Commercial hot case", + [0xD1] = "Commercial fryer", + [0xD2] = "Commercial microwave oven", + [0xD3] = "Washer and dryer", + [0xD4] = "Commercial show case outdoor unit" + }, + [0x04] = { + [0x01] = "Weighing machine", + [0x02] = "Clinical thermometer", + [0x03] = "Blood pressure meter", + [0x04] = "Blood sugar meter", + [0x05] = "Body fat meter" + }, + [0x05] = { + [0xFC] = "Secure communication shared key setup node", + [0xFD] = "Switch (supporting JEM-A/HA terminals)", + [0xFE] = "Portable (mobile) terminal", + [0xFF] = "Controller" + }, + [0x06] = { + [0x01] = "Display", + [0x02] = "Television", + [0x03] = "Audio", + [0x04] = "Network camera" + }, + [0x0E] = { + [0xF0] = "Node profile" + } +} + + +return list diff --git a/dissectors/echonet-lite/echonet-lite-data.lua b/dissectors/echonet-lite/echonet-lite-data.lua new file mode 100644 index 0000000..78595c0 --- /dev/null +++ b/dissectors/echonet-lite/echonet-lite-data.lua @@ -0,0 +1,99 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/mzyy94/ECHONET-Lite-dissector (echonet-lite-data.lua), +-- commit 609a1256e983f48b049dc203b6aee33f135fdd78 du 31/07/2017. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- ######################################################## +-- ECHONET Lite Wireshark dissector +-- ######################################################## +-- +-- Author : Yuki MIZUNO +-- Version: 1.2.1 +-- License: MIT +-- +-- ######################################################## +-- +-- Copyright (c) 2016 Yuki MIZUNO +-- This software is released under the MIT License. +-- http://opensource.org/licenses/MIT +-- +local list = require("echonet-lite-codelist") +local epcparser = require("echonet-lite-epcparser") + +edata = Proto("echonetlite.edata", "ECHONET Lite Data (EDATA)") + +-- ======================================================== +-- ECHONET Lite Data fields definition. +-- ======================================================== + +edata.fields.seoj = ProtoField.uint24("echonetlite.edata.seoj", "Source ECHONET Lite object (SEOJ)", base.HEX) +edata.fields.seojgroup = ProtoField.uint8("echonetlite.edata.seoj.classgroup", "Class group code", base.HEX, list.group) +edata.fields.seojclass = ProtoField.uint8("echonetlite.edata.seoj.class", "Class code", base.HEX) +edata.fields.seojinstance = ProtoField.uint8("echonetlite.edata.seoj.instance", "Instance code", base.HEX) +edata.fields.deoj = ProtoField.uint24("echonetlite.edata.deoj", "Destination ECHONET Lite object (DEOJ)", base.HEX) +edata.fields.deojgroup = ProtoField.uint8("echonetlite.edata.deoj.classgroup", "Class group code", base.HEX, list.group) +edata.fields.deojclass = ProtoField.uint8("echonetlite.edata.deoj.class", "Class code", base.HEX) +edata.fields.deojinstance = ProtoField.uint8("echonetlite.edata.deoj.instance", "Instance code", base.HEX) +edata.fields.esv = ProtoField.uint8("echonetlite.edata.esv", "ECHONET Lite service (ESV)", base.HEX, list.esv) +edata.fields.opc = ProtoField.uint8("echonetlite.edata.opc", "Property size (OPC)", base.DEC) +edata.fields.property = ProtoField.none("echonetlite.edata.property", "Property") +edata.fields.epc = ProtoField.uint8("echonetlite.edata.epc", "ECHONET Property (EPC)", base.HEX) +edata.fields.pdc = ProtoField.uint8("echonetlite.edata.pdc", "Property Data Counter (PDC)", base.DEC) +edata.fields.edt = ProtoField.bytes("echonetlite.edata.edt", "ECHONET Property Value Data (EDT)", base.SPACE) + +-- ======================================================== +-- Parse ECHONET Lite Data fields. +-- ======================================================== + +function edata.dissector(buffer, pinfo, tree) + local data_len = buffer:len() + + local subtree = tree:add(edata, buffer(0, data_len)) + + local sobj = "Unknown" + if list.class[buffer(0,1):uint()] ~= nil and list.class[buffer(0,1):uint()][buffer(1,1):uint()] ~= nil then + sobj = list.class[buffer(0,1):uint()][buffer(1,1):uint()] + end + + local seojtree = subtree:add(edata.fields.seoj, buffer(0, 3)) + seojtree:append_text(string.format(" (%s)", sobj)) + seojtree:add(edata.fields.seojgroup, buffer(0, 1)) + seojtree:add(edata.fields.seojclass, buffer(1, 1), buffer(1,1):uint(), "Class code:", sobj, string.format("(0x%02x)", buffer(1,1):uint())) + seojtree:add(edata.fields.seojinstance, buffer(2, 1)) + + local dobj = "Unknown" + if list.class[buffer(3,1):uint()] ~= nil and list.class[buffer(3,1):uint()][buffer(4,1):uint()] ~= nil then + dobj = list.class[buffer(3,1):uint()][buffer(4,1):uint()] + end + + local deojtree = subtree:add(edata.fields.deoj, buffer(3, 3)) + deojtree:append_text(string.format(" (%s)", dobj)) + deojtree:add(edata.fields.deojgroup, buffer(3, 1)) + deojtree:add(edata.fields.deojclass, buffer(4, 1), buffer(4,1):uint(), "Class code:", dobj, string.format("(0x%02x)", buffer(4,1):uint())) + deojtree:add(edata.fields.deojinstance, buffer(5, 1)) + + subtree:add(edata.fields.esv, buffer(6, 1)) + subtree:add(edata.fields.opc, buffer(7, 1)) + + local esv = list.esv[buffer(6, 1):uint()] + if esv == nil then + esv = "Unknown" + end + + local props = "" + begin = 8 + for i=1,buffer(7, 1):uint() do + local pdc = buffer(begin + 1, 1):uint() + local proptree = subtree:add(edata.fields.property, buffer(begin, pdc + 2)) + proptree:append_text(string.format(" %d", i)) + if 0 <= buffer(6, 1):uint() and buffer(6, 1):uint() <= 0x6F then -- Request service code + epcparser(buffer(3, 1), buffer(4, 1), buffer(begin, 1), buffer(begin + 1, 1), buffer(begin + 2, pdc), proptree, edata) + else + epcparser(buffer(0, 1), buffer(1, 1), buffer(begin, 1), buffer(begin + 1, 1), buffer(begin + 2, pdc), proptree, edata) + end + props = string.format("%s,0x%02x", props, buffer(begin, 1):uint()) + begin = begin + 2 + pdc + end + props = string.gsub(props, "^,", ", EPC=") + + pinfo.cols.info = string.format("%s → %s, %s%s", sobj, dobj, esv, props) +end diff --git a/dissectors/echonet-lite/echonet-lite-epcparser.lua b/dissectors/echonet-lite/echonet-lite-epcparser.lua new file mode 100644 index 0000000..1edd5e1 --- /dev/null +++ b/dissectors/echonet-lite/echonet-lite-epcparser.lua @@ -0,0 +1,44 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/mzyy94/ECHONET-Lite-dissector (echonet-lite-epcparser.lua), +-- commit 609a1256e983f48b049dc203b6aee33f135fdd78 du 31/07/2017. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- ######################################################## +-- ECHONET Lite Wireshark dissector +-- ######################################################## +-- +-- Author : Yuki MIZUNO +-- Version: 1.2.1 +-- License: MIT +-- +-- ######################################################## +-- +-- Copyright (c) 2016 Yuki MIZUNO +-- This software is released under the MIT License. +-- http://opensource.org/licenses/MIT +-- +local nodeprofile = require("group-0x0e-node-profile") +local openclosesensor = require("group-0x00-open-close") + +-- ======================================================== +-- ECHONET Lite epc parser +-- ======================================================== + +local function epcparser(classgroup, class, epc, pdc, edt, tree, edata) + if classgroup:uint() == 0x0e and class:uint() == 0xf0 then -- Node profile + nodeprofile(classgroup, class, epc, pdc, edt, tree, edata) + do return end + end + if classgroup:uint() == 0x00 then -- sensor class + if class:uint() == 0x29 then -- open/close sensor + openclosesensor(classgroup, class, epc, pdc, edt, tree, edata) + do return end + end + end + tree:add(edata.fields.epc, epc) + tree:add(edata.fields.pdc, pdc) + if edt:len() > 0 then + tree:add(edata.fields.edt, edt) + end +end + +return epcparser diff --git a/dissectors/echonet-lite/echonet-lite.lua b/dissectors/echonet-lite/echonet-lite.lua new file mode 100644 index 0000000..aedf7a5 --- /dev/null +++ b/dissectors/echonet-lite/echonet-lite.lua @@ -0,0 +1,106 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/mzyy94/ECHONET-Lite-dissector (echonet-lite.lua), +-- commit 609a1256e983f48b049dc203b6aee33f135fdd78 du 31/07/2017. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- ######################################################## +-- ECHONET Lite Wireshark dissector +-- ######################################################## +-- +-- Author : Yuki MIZUNO +-- Version: 1.2.1 +-- License: MIT +-- +-- ######################################################## +-- +-- Copyright (c) 2016 Yuki MIZUNO +-- This software is released under the MIT License. +-- http://opensource.org/licenses/MIT +-- + +echonetlite = Proto("echonetlite", "ECHONET Lite") + +-- ======================================================== +-- ECHONET Lite Header value table +-- ======================================================== + +ehd1 = { + [0x10] = "ECHONET Lite Protocol" +} + +ehd2 = { + [0x81] = "Format 1", + [0x82] = "Format 2" +} + +-- ======================================================== +-- ECHONET Lite UDP payload fields definition. +-- ======================================================== + +echonetlite.fields.ehd = ProtoField.protocol("echonetlite.ehd", "ECHONET Lite Header (EHD)") +echonetlite.fields.ehd1 = ProtoField.uint8("echonetlite.ehd1", "EHD1", base.HEX, ehd1) +echonetlite.fields.ehd2 = ProtoField.uint8("echonetlite.ehd2", "EHD2", base.HEX, ehd2) +echonetlite.fields.tid = ProtoField.uint16("echonetlite.tid", "Transaction ID (TID)", base.HEX) +echonetlite.fields.reqin = ProtoField.framenum("echonetlite.request_in", "Request In") +echonetlite.fields.resin = ProtoField.framenum("echonetlite.response_in", "Response In") + +-- ======================================================== +-- Local state variable +-- ======================================================== + +reqlist = {} +reslist = {} + +-- ======================================================== +-- Parse ECHONET Lite UDP payload fields. +-- ======================================================== + +function echonetlite.dissector(buffer, pinfo, tree) + local data_len = buffer:len() + if data_len < 4 or buffer(0,1):uint() ~= 0x10 or (data_len < 12 and buffer(1,1):uint() == 0x81) then + local data_dissector = Dissector.get("data") + data_dissector:call(buffer(0):tvb(), pinfo, tree) + do return end + end + + pinfo.cols.protocol = "ECHONET Lite" + pinfo.cols.info = "" + + local subtree = tree:add(echonetlite, buffer(0, data_len)) + local ehdtree = subtree:add(echonetlite.fields.ehd, buffer(0, 2)) + ehdtree:add(echonetlite.fields.ehd1, buffer(0, 1)) + ehdtree:add(echonetlite.fields.ehd2, buffer(1, 1)) + + local tidtree = subtree:add(echonetlite.fields.tid, buffer(2, 2)) + local tid = buffer(2, 2):uint() + local src, dst = tostring(pinfo.src), tostring(pinfo.dst) + if reqlist[dst] == nil or reqlist[dst][tid] == nil then + if not reqlist[src] then + reqlist[src] = {} + end + reqlist[src][tid] = pinfo.number + if reslist[dst] ~= nil and reslist[dst][tid] ~= nil then + tidtree:add(echonetlite.fields.resin, buffer(2, 2), reslist[dst][tid]) + end + else + if not reslist[src] then + reslist[src] = {} + end + reslist[src][tid] = pinfo.number + tidtree:add(echonetlite.fields.reqin, buffer(2, 2), reqlist[dst][tid]) + end + + if buffer(1, 1):uint() == 0x81 then + local edata_dissector = Dissector.get("echonetlite.edata") + edata_dissector:call(buffer(4):tvb(), pinfo, subtree) + else + local data_dissector = Dissector.get("data") + data_dissector:call(buffer(4):tvb(), pinfo, subtree) + end +end + +-- ======================================================== +-- Register ECHONET Lite protocol to UDP port 3610 +-- ======================================================== + +udp_table = DissectorTable.get("udp.port") +udp_table:add("3610", echonetlite) diff --git a/dissectors/echonet-lite/group-0x00-open-close.lua b/dissectors/echonet-lite/group-0x00-open-close.lua new file mode 100644 index 0000000..47fc194 --- /dev/null +++ b/dissectors/echonet-lite/group-0x00-open-close.lua @@ -0,0 +1,84 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/mzyy94/ECHONET-Lite-dissector (group-0x00-open-close.lua), +-- commit 609a1256e983f48b049dc203b6aee33f135fdd78 du 31/07/2017. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- ######################################################## +-- ECHONET Lite Wireshark dissector +-- ######################################################## +-- +-- Author : Yuki MIZUNO +-- Version: 1.2.1 +-- License: MIT +-- +-- ######################################################## +-- +-- Copyright (c) 2016 Yuki MIZUNO +-- This software is released under the MIT License. +-- http://opensource.org/licenses/MIT +-- +local devicesuperclass = require("device-superclass") +local list = require("echonet-lite-codelist") +local properties = { + [0xe0] = "Degree-of-opening detection status 1", + [0xb0] = "Detection threshold level", + [0xb1] = "Degree-of-opening detection status 2", +} + +-- ======================================================== +-- ECHONET Lite epc parser +-- ======================================================== + +local function openclosesensor(classgroup, class, epc, pdc, edt, tree, edata) + if classgroup:uint() == 0x00 and class:uint() == 0x29 then + local label = properties[epc:uint()] + if not label then + devicesuperclass(classgroup, class, epc, pdc, edt, tree, edata, properties) + do return end + end + tree:add(edata.fields.epc, epc, epc:uint(), nil, string.format("(%s)", label)) + tree:add(edata.fields.pdc, pdc) + tree:append_text(string.format(": %s", label)) + if pdc:uint() == 0 or edt:len() == 0 then + do return end + end + + local edttree = tree:add(edata.fields.edt, edt) + + if epc:uint() == 0xe0 then + if pdc:uint() ~= 1 then + do return end + end + local state = { + [0x30] = "Close detected", + [0x39] = "Open deceted, level: unknown" + } + if edt:uint() == 0x30 or edt:uint() == 0x39 then + edttree:append_text(string.format(" (%s)", state[edt:uint()])) + tree:append_text(string.format(" = %s", state[edt:uint()])) + elseif edt:uint() > 0x30 and edt:uint() < 0x39 then + edttree:append_text(string.format(" (Open detected, level: 0x%02x)", edt:uint())) + tree:append_text(string.format(" = Open detected, level: 0x%02x", edt:uint())) + end + elseif epc:uint() == 0xb0 then + if pdc:uint() ~= 1 then + do return end + end + if edt:uint() > 0x30 and edt:uint() < 0x39 then + edttree:append_text(string.format(" (Detection threshold level: 0x%02x)", edt:uint())) + tree:append_text(string.format(" = Detection threshold level: 0x%02x", edt:uint())) + end + elseif epc:uint() == 0xb1 then + if pdc:uint() ~= 1 then + do return end + end + local state = { + [0x41] = "Open detected", + [0x42] = "Close deceted" + } + edttree:append_text(string.format(" (%s)", state[edt:uint()])) + tree:append_text(string.format(" = %s", state[edt:uint()])) + end + end +end + +return openclosesensor diff --git a/dissectors/echonet-lite/group-0x0e-node-profile.lua b/dissectors/echonet-lite/group-0x0e-node-profile.lua new file mode 100644 index 0000000..3e6c273 --- /dev/null +++ b/dissectors/echonet-lite/group-0x0e-node-profile.lua @@ -0,0 +1,163 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/mzyy94/ECHONET-Lite-dissector (group-0x0e-node-profile.lua), +-- commit 609a1256e983f48b049dc203b6aee33f135fdd78 du 31/07/2017. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- ######################################################## +-- ECHONET Lite Wireshark dissector +-- ######################################################## +-- +-- Author : Yuki MIZUNO +-- Version: 1.2.1 +-- License: MIT +-- +-- ######################################################## +-- +-- Copyright (c) 2016 Yuki MIZUNO +-- This software is released under the MIT License. +-- http://opensource.org/licenses/MIT +-- +local list = require("echonet-lite-codelist") +local properties = { + [0x80] = "Operating status", + [0x82] = "Version information", + [0x83] = "Identification number", + [0x88] = "Fault status", + [0x89] = "Fault content", + [0x8a] = "Manufacturer code", + [0x8b] = "Business facility code", + [0x8c] = "Product code", + [0x8d] = "Production number", + [0x8e] = "Production date", + [0x9d] = "Status change announcement property map", + [0x9e] = "Set property map", + [0x9f] = "Get property map", + [0xbf] = "Unique identifier data", + [0xd3] = "Number of self-node instances", + [0xd4] = "Number of self-node classes", + [0xd5] = "Instance list notification", + [0xd6] = "Self-node instance list S", + [0xd7] = "Self-node class list S", +} + +-- ======================================================== +-- ECHONET Lite epc parser +-- ======================================================== + +local function nodeprofile(classgroup, class, epc, pdc, edt, tree, edata) + if classgroup:uint() == 0x0e and class:uint() == 0xf0 then -- Node profile + local label = properties[epc:uint()] + tree:add(edata.fields.epc, epc, epc:uint(), nil, string.format("(%s)", label)) + tree:add(edata.fields.pdc, pdc) + tree:append_text(string.format(": %s", label)) + if pdc:uint() == 0 or edt:len() == 0 then + do return end + end + + local edttree = tree:add(edata.fields.edt, edt) + if epc:uint() == 0x80 then + local state = { + [0x30] = "Booting", + [0x31] = "Not Booting" + } + edttree:append_text(string.format(" (%s)", state[edt:uint()])) + tree:append_text(string.format(" = %s", state[edt:uint()])) + elseif epc:uint() == 0x82 then + if pdc:uint() ~= 4 then + do return end + end + local major = edt:range(0, 1):uint() + local minor = edt:range(1, 1):uint() + local version = string.format("Version %d.%d", major, minor) + local type = "" + if edt:range(2, 1):uint() == 0x03 then + type = "Format 1 and Format 2" + elseif edt:range(2, 1):uint() == 0x02 then + type = "Format 2 [Arbitrary message format]" + elseif edt:range(2, 1):uint() == 0x01 then + type = "Format 1 [Specified message format]" + end + + edttree:append_text(string.format(" (%s, %s)", version, type)) + tree:append_text(string.format(" = %s, %s", version, type)) + elseif epc:uint() == 0x83 then + if pdc:uint() ~= 17 then + do return end + end + edttree:add(edt:range(0, 1), "Communication ID:", string.format("0x%02x", edt:range(0, 1):uint())) + edttree:add(edt:range(1, 3), "Manufacturer code:", tostring(edt:range(1, 3):bytes())) + edttree:add(edt:range(4, 13), "Unique ID:", tostring(edt:range(4, 13):bytes())) + elseif epc:uint() == 0x88 then + local state = { + [0x41] = "Fault encountered", + [0x42] = "No fault encountered" + } + edttree:append_text(string.format(" (%s)", state[edt:uint()])) + tree:append_text(string.format(" = %s", state[edt:uint()])) + -- elseif epc:uint() == 0x89 then -- nothing to parse + elseif epc:uint() == 0x8a then + if pdc:uint() ~= 3 then + do return end + end + edttree:add(edt:range(0, 3), "Manufacturer code:", tostring(edt:range(0, 3):bytes())) + -- elseif epc:uint() == 0x8b then -- nothing to parse + elseif epc:uint() == 0x8c or epc:uint() == 0x8d then + if pdc:uint() ~= 12 then + do return end + end + edttree:append_text(string.format(" [%s]", edt:range(0, 12):string())) + elseif epc:uint() == 0x8e then + if pdc:uint() ~= 4 then + do return end + end + edttree:append_text(string.format(" [%d/%d/%d]", edt:range(0, 2):uint(), edt:range(2,1):uint(), edt:range(3,1):uint())) + elseif epc:uint() == 0x9d or epc:uint() == 0x9e or epc:uint() == 0x9f then + edttree:add(edt:range(0, 1), "Property count:", edt:range(0, 1):uint()) + for i=1,edt:range(0, 1):uint() do + local property = properties[edt:range(i, 1):uint()] + edttree:add(edt:range(i, 1), "-", property) + if i >= 16 then + do return end + end + end + -- elseif epc:uint() == 0xbf then -- nothing to parse + elseif epc:uint() == 0xd3 then + if pdc:uint() ~= 3 then + do return end + end + edttree:add(edt:range(0, 3), "Instance count:", tostring(edt:range(0, 3):uint())) + elseif epc:uint() == 0xd4 then + if pdc:uint() ~= 2 then + do return end + end + edttree:add(edt:range(0, 2), "Instance count:", tostring(edt:range(0, 2):uint())) + elseif epc:uint() == 0xd5 or epc:uint() == 0xd6 then + edttree:add(edt:range(0, 1), "Instance count:", edt:range(0, 1):uint()) + for i=1,edt:range(0, 1):uint() do + local index = i * 3 - 2 + local obj = "Unknown" + if list.class[edt:range(index, 1):uint()] ~= nil and list.class[edt:range(index, 1):uint()][edt:range(index + 1, 1):uint()] ~= nil then + obj = list.class[edt:range(index, 1):uint()][edt:range(index + 1, 1):uint()] + end + edttree:add(edt:range(index, 3), "-", obj, string.format("(ID: %d)", edt:range(index + 2, 1):uint())) + if i >= 84 then + do return end + end + end + elseif epc:uint() == 0xd7 then + edttree:add(edt:range(0, 1), "Class count:", edt:range(0, 1):uint()) + for i=1,edt:range(0, 1):uint() do + local index = i * 2 - 1 + local obj = "Unknown" + if list.class[edt:range(index, 1):uint()] ~= nil and list.class[edt:range(index, 1):uint()][edt:range(index + 1, 1):uint()] ~= nil then + obj = list.class[edt:range(index, 1):uint()][edt:range(index + 1, 1):uint()] + end + edttree:add(edt:range(index, 2), "-", obj) + if i >= 8 then + do return end + end + end + end + end +end + +return nodeprofile diff --git a/dissectors/enocean-esp3/LICENSE b/dissectors/enocean-esp3/LICENSE new file mode 100644 index 0000000..9041071 --- /dev/null +++ b/dissectors/enocean-esp3/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 gisaki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/enocean-esp3/README.md b/dissectors/enocean-esp3/README.md new file mode 100644 index 0000000..47fd17d --- /dev/null +++ b/dissectors/enocean-esp3/README.md @@ -0,0 +1,61 @@ +# EnOcean ESP3 (EnOcean Serial Protocol 3 sur TCP/UDP) + +Post-dissecteur Wireshark Lua de l'**EnOcean Serial Protocol 3 (ESP3)**, +format série des passerelles et clés USB EnOcean (capteurs et interrupteurs +domotiques sans pile, 868/902/928 MHz), lorsqu'il est relayé sur TCP ou +UDP : octet de synchronisation 0x55, longueur des données, longueur +optionnelle, type de paquet, CRC8 d'en-tête, puis décodage des types +**RADIO_ERP1** (1) et **RADIO_ERP2** (10) — contrôle d'adresse, en-tête +étendu, type de télégramme (R-ORG), identifiants source / destination, +données, statut, nombre de sous-télégrammes, RSSI (dBm), niveau de +sécurité. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/gisaki/ESP3_Wireshark_Dissector (fichier `esp3.lua`) | +| Commit importé | `c02d96bfd896c712989ec0a1a666d7520e32a164` du 16/10/2017 (branche `master`, dernier commit, qui modifie aussi le dissecteur) | +| Licence amont | MIT (`LICENSE` amont, © 2017 gisaki) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur EnOcean / ESP3 natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `esp3.lua` | Post-dissecteur `esp3` | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `esp3.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `esp3`. Si la passerelle ajoute un en-tête propre avant les +données ESP3, régler la variable `YOUR_EXTRA_HEADER_SIZE` en tête du +fichier (modification locale). + +## Remarques + +- **Hypothèses fortes sur la trame** : le décalage est calculé en dur pour + Ethernet (14 octets) + IPv4 + TCP sans options (20 octets) ou UDP ; + IPv6, VLAN, options TCP ou captures Wi-Fi / « Linux cooked » décalent + l'analyse. Le post-dissecteur examine tous les paquets TCP/UDP et ne + retient que ceux qui commencent par 0x55 avec un type 1 ou 10. +- Les fonctions `analyze_esp3`, `decode_esp3`… sont définies (en + globales) **à l'intérieur** de la fonction de dissection, après leur + premier appel : le tout premier paquet TCP/UDP peut provoquer une erreur + Lua (« attempt to call a nil value »), les suivants étant décodés + normalement (non vérifié). +- **`bit32` absent des Wireshark récents** : le décodage des bits d'en-tête + appelle `bit32.band` / `bit32.rshift`, bibliothèque de Lua 5.2 absente par + défaut de Lua 5.3 et 5.4, seules versions prises en charge depuis + Wireshark 4.4 (qui fournit `bit` à la place). Contournement local : + ajouter `bit32 = bit` en tête du fichier (code amont non modifié ici). +- Le CRC8 n'est pas vérifié ; les profils EEP (signification des données + selon le capteur) ne sont pas décodés. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/enocean-esp3/esp3.lua b/dissectors/enocean-esp3/esp3.lua new file mode 100644 index 0000000..054b037 --- /dev/null +++ b/dissectors/enocean-esp3/esp3.lua @@ -0,0 +1,345 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/gisaki/ESP3_Wireshark_Dissector (esp3.lua), +-- commit c02d96bfd896c712989ec0a1a666d7520e32a164 du 16/10/2017. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- +-- Wireshark Plugin for EnOcean sensor data packet +-- +-- EnOcean Serial Protocol 3 (ESP3) +-- Packet Type 1: RADIO_ERP1 +-- Packet Type 10: RADIO_ERP2 +-- + +-- declare some Fields to be read +ip_src_f = Field.new("ip.src") +ip_dst_f = Field.new("ip.dst") +tcp_src_f = Field.new("tcp.srcport") +tcp_dst_f = Field.new("tcp.dstport") +udp_src_f = Field.new("udp.srcport") +udp_dst_f = Field.new("udp.dstport") + +-- declare our (pseudo) protocol +esp3_proto = Proto("esp3","EnOcean Serial Protocol 3 (ESP3)") + +-- create the fields for our "protocol" +F_esp3_decoded = ProtoField.string("esp3.decoded", "EnOcean sensor packet") + +-- for bit field +F_esp3_flag_size1_bit_0123 = ProtoField.uint8("esp3.flag_bit","b0123", base.HEX, None, 0x0F) +F_esp3_flag_size1_bit_4567 = ProtoField.uint8("esp3.flag_bit","b4567", base.HEX, None, 0xF0) +F_esp3_flag_size1_bit0 = ProtoField.uint8("esp3.flag_bit","b0", base.HEX, None, 0x01) +F_esp3_flag_size1_bit1 = ProtoField.uint8("esp3.flag_bit","b1", base.HEX, None, 0x02) +F_esp3_flag_size1_bit2 = ProtoField.uint8("esp3.flag_bit","b2", base.HEX, None, 0x04) +F_esp3_flag_size1_bit3 = ProtoField.uint8("esp3.flag_bit","b3", base.HEX, None, 0x08) +F_esp3_flag_size1_bit4 = ProtoField.uint8("esp3.flag_bit","b4", base.HEX, None, 0x10) +F_esp3_flag_size1_bit5 = ProtoField.uint8("esp3.flag_bit","b5", base.HEX, None, 0x20) +F_esp3_flag_size1_bit6 = ProtoField.uint8("esp3.flag_bit","b6", base.HEX, None, 0x40) +F_esp3_flag_size1_bit7 = ProtoField.uint8("esp3.flag_bit","b7", base.HEX, None, 0x80) + +F_esp3_flag_size1_bit_567 = ProtoField.uint8("esp3.flag_bit","b567", base.HEX, None, 0xE0) + +-- add the field to the protocol +esp3_proto.fields = { + F_esp3_decoded, + F_esp3_flag_size1_bit_0123, F_esp3_flag_size1_bit_4567, + F_esp3_flag_size1_bit0, F_esp3_flag_size1_bit1, F_esp3_flag_size1_bit2, F_esp3_flag_size1_bit3, F_esp3_flag_size1_bit4, F_esp3_flag_size1_bit5, F_esp3_flag_size1_bit6, F_esp3_flag_size1_bit7, + F_esp3_flag_size1_bit_567 +} + +YOUR_EXTRA_HEADER_SIZE = 0 + +-- create a function to "postdissect" each frame +function esp3_proto.dissector(buf, pinfo, tree) + -- obtain the current values the protocol fields + local tcp_src = tcp_src_f() + local tcp_dst = tcp_dst_f() + local udp_src = udp_src_f() + local udp_dst = udp_dst_f() + + -- start position of analysis (ignore Ethernet frame, IP frame and TCP/UDP header) + -- If ESP3 data starts at the beginning of UDP / TCP data, + -- parsing is started after the UDP / TCP header. + -- Or, if there are some extra header data in addition to the original ESP3 data, + -- the parsing needs to skip the extra header size. + local ip_header_length = (buf(14,1):uint() - 0x40) * 4 + local skip_len = 0 + if tcp_src then + skip_len = 14 + ip_header_length + 20 -- eth, ip, tcp(header) + end + if udp_src then + skip_len = 14 + ip_header_length + 8 -- eth, ip, udp(header) + end + + -- check if the packet is a target + if tcp_src or udp_src then + analyze_esp3(esp3_proto, buf, skip_len + YOUR_EXTRA_HEADER_SIZE, pinfo, tree) + end + + ------------------------------------ + -- analyze + ------------------------------------ + + function analyze_esp3(field, buf, offcet, pinfo, tree) + if buf:len() > offcet then + decode_esp3(field, buf(offcet, buf:len()-offcet), pinfo, tree) + end + end + + ------------------------------------ + -- build trees + ------------------------------------ + + function decode_esp3(field, buf, pinfo, tree) + -- never match when the packet size is too small + if buf:len() < 4 then + return + end + + local subtree + + local sync_byte = buf(0, 1):uint() + local data_length = buf(1, 2):uint() + local optional_length = buf(3, 1):uint() + local packet_type = buf(4, 1):uint() + + if sync_byte == 0x55 and packet_type == 0x01 then + subtree = tree:add(field, "EnOcean Serial Protocol 3 (ESP3)") + :add_expert_info(PI_DEBUG, PI_NOTE, "EnOcean Serial Protocol 3 (ESP3) - Packet Type 1: RADIO_ERP1, ver.0.1") + end + if sync_byte == 0x55 and packet_type == 0x0A then + subtree = tree:add(field, "EnOcean Serial Protocol 3 (ESP3)") + :add_expert_info(PI_DEBUG, PI_NOTE, "EnOcean Serial Protocol 3 (ESP3) - Packet Type 10: RADIO_ERP2, ver.0.1") + end + + -- ESP3 Type1 ? + if sync_byte == 0x55 and packet_type == 0x01 then + local subtree_add + local pos = 0 + subtree_add, pos = wrap_tree_add_str(subtree, buf(0, data_length+7+optional_length), "EnOcean Serial Protocol 3 (ESP3) - Packet Type 1", 0, data_length+7+optional_length) + decode_esp3_type1(subtree_add, buf, pinfo, tree) + end + -- ESP3 Type10 ? + if sync_byte == 0x55 and packet_type == 0x0A then + local subtree_add + local pos = 0 + subtree_add, pos = wrap_tree_add_str(subtree, buf(0, data_length+7+optional_length), "EnOcean Serial Protocol 3 (ESP3) - Packet Type 10", 0, data_length+7+optional_length) + decode_esp3_type10(subtree_add, buf, pinfo, tree) + end + end + + -- ESP3 Type1 + function decode_esp3_type1(subtree, buf, pinfo, tree) + local sync_byte = buf(0, 1):uint() + local data_length = buf(1, 2):uint() + local optional_length = buf(3, 1):uint() + local packet_type = buf(4, 1):uint() + if sync_byte == 0x55 and packet_type == 0x01 then + + local subtree_add + local pos = 0 + local tmp + + -- header + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Sync. Byte", pos, 1); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Data Length", pos, 2); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Optional Length", pos, 1); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Packet Type", pos, 1); + + -- CRC + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "CRC8H", pos, 1); + + -- data + if data_length > 0 then + subtree_add, tmp = wrap_tree_add_str(subtree, buf, "ERP1 radio telegram (Raw data)", pos, data_length); + decode_erp1_radio(subtree_add, buf(pos, data_length), pinfo, tree) + pos = tmp + else + wrap_tree_add_empty(subtree, "(no ERP1 radio telegram)"); + end + + -- Optional Data + if optional_length > 0 then + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "SubTelNum", pos, 1); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Destination ID", pos, 4); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "dBm", pos, 1); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "SecurityLevel", pos, 1); + else + wrap_tree_add_empty(subtree, "(no Optional Data)"); + end + + -- CRC + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "CRC8D", pos, 1); + + end + end + + -- ERP2 radio protocol (Data contents for Length > 6 Bytes) + function decode_erp1_radio(subtree, buf, pinfo, tree) + local subtree_add + local pos = 0 + local tmp + + -- RORG + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "RORG", pos, 1); + + -- DATA + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "DATA", pos, buf:len()-pos-5); + + -- TXID + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "TXID", pos, 4); + + -- STATUS + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "STATUS", pos, 1); + + end + + -- ESP3 Type10 + function decode_esp3_type10(subtree, buf, pinfo, tree) + local sync_byte = buf(0, 1):uint() + local data_length = buf(1, 2):uint() + local packet_type = buf(4, 1):uint() + if sync_byte == 0x55 and packet_type == 0x0A then + + local subtree_add + local pos = 0 + local tmp + + -- header + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Sync. Byte", pos, 1); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Data Length", pos, 2); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Optional Length", pos, 1); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Packet Type", pos, 1); + + -- CRC + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "CRC8H", pos, 1); + + -- data + subtree_add, tmp = wrap_tree_add_str(subtree, buf, "ERP2 radio protocol telegram (Raw data)", pos, data_length); + decode_erp2_radio_6(subtree_add, buf(pos, data_length), pinfo, tree) + pos = tmp + + -- Optional Data + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "SubTelNum", pos, 1); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "dBm", pos, 1); + + -- CRC + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "CRC8D", pos, 1); + + end + end + + -- ERP2 radio protocol (Data contents for Length > 6 Bytes) + function decode_erp2_radio_6(subtree, buf, pinfo, tree) + local header = buf(0, 1):uint() + local opt_data_len = 0 + local subtree_add + local subtree_bit + local pos = 0 + local tmp + + -- header + subtree_add, tmp = wrap_tree_add_uint(subtree, buf, "Header", pos, 1); + subtree_bit = wrap_tree_add_bit(F_esp3_flag_size1_bit_567, subtree_add, buf, ": Address Control", pos, 1) + subtree_bit = wrap_tree_add_bit(F_esp3_flag_size1_bit4, subtree_add, buf, ": Extended header availablel", pos, 1) + subtree_bit = wrap_tree_add_bit(F_esp3_flag_size1_bit_0123, subtree_add, buf, ": Telegram type (R-ORG)", pos, 1) + pos = tmp + + -- Extended Header + if bit32.band(header, 0x10) == 0x10 then + subtree_add, tmp = wrap_tree_add_uint(subtree, buf, "Extended Header", pos, 1); + subtree_bit, tmp = wrap_tree_add_bit(F_esp3_flag_size1_bit_4567, subtree_add, buf, ": Repeater count", pos, 1) + subtree_bit, tmp = wrap_tree_add_bit(F_esp3_flag_size1_bit_0123, subtree_add, buf, ": Length of Optional data", pos, 1) + opt_data_len = bit32.band(buf(pos, 1):uint(), 0x0F) + pos = tmp + else + wrap_tree_add_empty(subtree, "(no Extended Header)"); + end + + -- Extended Telegram type + if bit32.band(header, 0x0F) == 0x0F then + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Extended Telegram type", pos, 1); + else + wrap_tree_add_empty(subtree, "(no Extended Telegram type)"); + end + + -- Originator-ID + -- Destination-ID + if bit32.band(header, 0xE0) == 0x00 then + -- 000: Originator-ID 24 bit; no Destination-ID + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Originator-ID 24 bit", pos, 3); + wrap_tree_add_empty(subtree, "(no Destination-ID)"); + elseif bit32.band(header, 0xE0) == 0x20 then + -- 001: Originator-ID 32 bit; no Destination-ID + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Originator-ID 32 bit", pos, 4); + wrap_tree_add_empty(subtree, "(no Destination-ID)"); + elseif bit32.band(header, 0xE0) == 0x40 then + -- 010: Originator-ID 32 bit, Destination-ID 32 bit + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Originator-ID 32 bit", pos, 4); + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "Destination-ID 32 bit", pos, 4); + elseif bit32.band(header, 0xE0) == 0x60 then + -- 011: Originator-ID 48 bit, no Destination-ID + subtree_add, pos = wrap_tree_add_str(subtree, buf, "Originator-ID 48 bit", pos, 6); + wrap_tree_add_empty(subtree, "(no Destination-ID)"); + end + + -- Data_DL + if bit32.band(header, 0x0F) == 0x00 then + -- 0000: RPS telegram (0xF6) + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "RPS telegram (0xF6)", pos, 1); + elseif bit32.band(header, 0x0F) == 0x01 then + -- 0001: 1BS telegram (0xD5) + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "1BS telegram (0xD5)", pos, 1); + elseif bit32.band(header, 0x0F) == 0x02 then + -- 0010: 4BS telegram (0xA5) + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "4BS telegram (0xA5)", pos, 4); + elseif bit32.band(header, 0x0F) == 0x04 then + -- 0100: Variable length data telegram (0xD2) + subtree_add, pos = wrap_tree_add_str(subtree, buf, "0100: Variable length data telegram (0xD2)", pos, buf:len()-pos-1); + else + wrap_tree_add_empty(subtree, "TBD"); + end + + -- Optional Data + if opt_data_len > 0 then + -- TBD + else + wrap_tree_add_empty(subtree, "(no Optional Data)"); + end + + -- CRC + subtree_add, pos = wrap_tree_add_uint(subtree, buf, "CRC", pos, 1); + + end + + ------------------------------------ + -- Helper + ------------------------------------ + + function wrap_tree_add_bit(field, tree, buf, title, pos, len) + local subtree_add = tree:add(field, buf(pos,len), buf(pos,len):uint()):append_text(title) + return subtree_add, (pos + len) + end + + function wrap_tree_add_empty(tree, title) + tree:add(F_esp3_decoded):set_text(title) + end + + function wrap_tree_add_uint(tree, buf, title, pos, len) + local val = buf(pos,len):uint() + return wrap_tree_add_com(tree, buf(pos,len), title, pos, len, tostring(val)) + end + + function wrap_tree_add_str(tree, buf, title, pos, len) + return wrap_tree_add_com(tree, buf(pos,len), title, pos, len, buf(pos,len):string()) + end + + function wrap_tree_add_com(tree, buf, title, pos, len, decoded) + local text = string.format("%s: 0x%s (%s)", title, tostring(buf), decoded) + local subtree_add = tree:add(F_esp3_decoded, buf):set_text(text) + return subtree_add, (pos + len) + end + +end + +-- register our protocol as a postdissector +register_postdissector(esp3_proto) diff --git a/dissectors/erlang-trace/LICENSE b/dissectors/erlang-trace/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dissectors/erlang-trace/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/erlang-trace/README.md b/dissectors/erlang-trace/README.md new file mode 100644 index 0000000..25eb116 --- /dev/null +++ b/dissectors/erlang-trace/README.md @@ -0,0 +1,54 @@ +# Erlang trace — lecture des fichiers de trace Erlang + +Plugin Wireshark Lua qui ouvre directement les **fichiers de trace +Erlang** produits par `dbg:trace_port(file, …)` et décode leur contenu : + +- `erlang-trace.lua` : lecteur de fichiers (`FileHandler` « Erlang trace + file ») — une entrée de trace par paquet, avec horodatage — et + dissecteur `erlang_trace` : type d'entrée (terme binaire / messages de + trace perdus), processus, type d'événement, module, fonction, arité ; +- `erlterm.lua` : dissecteur `erlterm` du **format binaire externe des + termes Erlang** (version 131 : atomes, entiers, flottants, références, + ports, pids, tuples, listes, binaires, maps…), réutilisable par d'autres + dissecteurs. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/legoscia/cautious-rotary-phone (fichiers `erlang-trace.lua` et `erlterm.lua`) | +| Commit importé | `e58354fd4cdd46bb17f88a8f870755bd67286ac2` du 13/06/2018 (branche `master`, dernier commit) | +| Licence amont | Apache-2.0 (fichier `LICENSE`, copié ici ; en-tête des deux fichiers : « Copyright 2017 Magnus Henoch », Apache 2.0) | +| Natif Wireshark 4.6.4 | Non pour les fichiers de trace ; le dissecteur natif `erldp` (protocole de distribution Erlang) décode aussi des termes, mais pas ces fichiers | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `erlang-trace.lua` | Lecteur de fichiers « Erlang trace file » + protocole `erlang_trace` (heuristique `wtap_file`) | +| `erlterm.lua` | Protocole `erlterm` (format binaire externe des termes Erlang) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête. + +## Utilisation + +Copier les **deux** fichiers dans le dossier `plugins` du dossier de +configuration personnel de Wireshark (`USER_DIR`, ex. +`~/.config/wireshark/plugins/`) : `erlang-trace.lua` charge +`erlterm.lua` par `dofile(USER_DIR .. "plugins/erlterm.lua")`. + +Côté Erlang, tracer vers un fichier avec horodatage : + + dbg:tracer(port, dbg:trace_port(file, "foo.trace")). + dbg:p(all, [call, timestamp]). + +puis ouvrir `foo.trace` dans Wireshark. + +## Remarques + +- Le chemin `dofile` est fixe : installé ailleurs (ex. + `~/.local/lib/wireshark/plugins/`), `erlang-trace.lua` ne trouve pas + `erlterm.lua`. `erlterm.lua` déclare la variable globale + `erlang_term_proto` et ne se charge qu'une fois. +- Pas de fichier de trace d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/erlang-trace/erlang-trace.lua b/dissectors/erlang-trace/erlang-trace.lua new file mode 100644 index 0000000..62e77a7 --- /dev/null +++ b/dissectors/erlang-trace/erlang-trace.lua @@ -0,0 +1,253 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/legoscia/cautious-rotary-phone (erlang-trace.lua), +-- commit e58354fd4cdd46bb17f88a8f870755bd67286ac2 du 13/06/2018. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- Copyright 2017 Magnus Henoch +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +-- Need to ensure that erlterm.lua is loaded first +dofile(USER_DIR .. "plugins/erlterm.lua") + +-- Protocol dissector +local erlang_trace_proto = Proto("erlang_trace", "Erlang trace entry") + +local types = { + [0] = "Binary term", + [1] = "Dropped trace messages", +} +local pf_entry_type = ProtoField.uint8("erlang_trace.entry_type", "Entry type", + base.DEC, types) +local pf_binary_size = ProtoField.uint32("erlang_trace.binary_size", "Binary size") +local pf_dropped_messages = ProtoField.uint32("erlang_trace.dropped_messages", "Number of dropped messages") + +local pf_pid = ProtoField.string("erlang_trace.pid", "Process id") +local pf_event_type = ProtoField.string("erlang_trace.event_type", "Event type") +local pf_module = ProtoField.string("erlang_trace.module", "Module") +local pf_function = ProtoField.string("erlang_trace.function", "Function name") +local pf_arity = ProtoField.uint8("erlang_trace.arity", "Arity") + +erlang_trace_proto.fields = + { pf_entry_type, pf_dropped_messages, pf_binary_size, + pf_pid, pf_event_type, pf_module, pf_function, pf_arity } + +local ef_unexpected = ProtoExpert.new("erlang_trace.unexpected", "Unexpected data", + expert.group.UNDECODED, expert.severity.WARN) + +erlang_trace_proto.experts = + { ef_unexpected } + +local term_dissector = Dissector.get("erlterm") + +local function handle_mfa(mfa, pktinfo, tree) + tree:add(pf_module, mfa[1]) + tree:add(pf_function, mfa[2]) + + local arity + if type(mfa[3]) == "number" then + arity = mfa[3] + elseif type(mfa[3]) == "table" then + -- it's an argument list + arity = #mfa[3] + else + -- it's something we failed to decode + arity = "?" + end + if type(arity) == "number" then tree:add(pf_arity, arity) end + pktinfo.cols.info:append(" " .. mfa[1] .. ":" .. mfa[2] .. "/" .. arity) +end + +local function decode_trace_data(value, pktinfo, tree) + if type(value) ~= "table" then + tree:add_proto_expert_info(ef_unexpected, "Not a tuple") + return + elseif value[1] ~= "trace_ts" then + tree:add_proto_expert_info(ef_unexpected, "Expected 'trace_ts', got '" .. value[1] .. "'") + return + end + + tree:add(pf_pid, value[2]) + + local entry_type = value[3] + pktinfo.cols.info:set(entry_type) + tree:add(pf_event_type, entry_type) + + if entry_type == "call" or entry_type == "return_to" then + -- Just one more element, M:F/A + handle_mfa(value[4], pktinfo, tree) + elseif entry_type == "return_from" then + -- M:F/A and return value + handle_mfa(value[4], pktinfo, tree) + -- TODO: how to deal with return value? + end +end + +function erlang_trace_proto.dissector(tvbuf, pktinfo, root) + pktinfo.cols.protocol:set("Erlang trace") + local tree = root:add(erlang_trace_proto, tvbuf:range(0)) + + local t = tvbuf:range(0,1):uint() + tree:add(pf_entry_type, tvbuf:range(0, 1)) + if t == 0 then + tree:add(pf_binary_size, tvbuf:range(1, 4)) + --data_dissector(tvbuf:range(5):tvb(), pktinfo, root) + --term_dissector(tvbuf:range(5):tvb(), pktinfo, root) + -- + -- Call the Erlang term dissector function directly instead of + -- going through the Wireshark dissector machinery, in order to + -- get access to the multiple return values. + local _, _, value = erlang_term_dissector(tvbuf:range(5):tvb(), pktinfo, root) + if value then + decode_trace_data(value, pktinfo, tree) + else + tree:add_proto_expert_info(ef_unexpected, "No value?") + end + elseif t == 1 then + tree:add(pf_dropped_messages, tvbuf:range(1, 4)) + end +end + +local function heur_dissect_erlang_trace(tvbuf, pktinfo, root) + local len = tvbuf:len() + local t = tvbuf:range(0, 1):uint() + local size = tvbuf:range(1, 4):uint() + if t == 0 and len ~= (size + 5) then + return false + elseif t == 1 and len ~= 5 then + return false + end + + erlang_trace_proto.dissector(tvbuf, pktinfo, root) + return true +end + +erlang_trace_proto:register_heuristic("wtap_file", heur_dissect_erlang_trace) + +-- File handler +local erlang_trace_fh = FileHandler.new("Erlang trace file", "erlang trace", + "Erlang trace file as generated by trace_file_drv", + "r") + +function erlang_trace_fh.read_open(file, cinfo) + -- There is no file header. Check that the file starts with a + -- binary block. That is, first a 0 byte... + if file:read(1) ~= "\0" then + return false + end + -- ...followed by a four byte length... + file:read(4) + -- ...followed by a term in external term format, i.e. starting with 131. + if file:read(1) ~= "\131" then + return false + end + + -- XXX: what's a good value to put here? + cinfo.encap = wtap_encaps.MIME + cinfo.time_precision = wtap_tsprecs.USEC + + file:seek("set", 0) + return true +end + +local timestamp_regexp = GRegex.new( + -- We're parsing a binary, so "newlines" are not newlines. Let "." + -- match them as well: use the ?s flag. + "(?s)" .. + -- Five byte header, starting with 0. Ignore the length. + "^\\0...." .. + -- Erlang binary term, starting with 131 / hex 83 + "\\x83" .. + -- It's a small tuple, type byte 104 / hex 68. Ignore the length. + "\\x68." .. + -- It's an ATOM_EXT, with a length of 8, stored as two bytes. + -- TODO: other atom formats? + "\\x64\\x00\\x08" .. + -- The atom name is "trace_ts" (8 bytes) + "trace_ts" .. + -- Skip to the end + ".*" .. + -- The last element in the tuple is a small tuple with three elements. + "\\x68\\x03" .. + -- The three elements are either INTEGER_EXT or SMALL_INTEGER_EXT. + "(\\x62....|\\x61.)" .. + "(\\x62....|\\x61.)" .. + "(\\x62....|\\x61.)" .. + -- And that's the end. + "$") + +local function erlang_trace_fh_read(file, cinfo, finfo) + local pos = file:seek("cur") + local op = file:read(1) + if not op then return false end + local size_s = file:read(4) + if not size_s then return false end + local size = Struct.unpack(">I4", size_s) + -- Seek back to beginning of frame, as we want to include the + -- entire thing in the frame data. + file:seek("set", pos) + local len + if op == "\0" then + -- It's a binary. + len = size + 5 + elseif op == "\1" then + -- Dropped messages. The "size" is the number of messages + -- dropped. Shouldn't be written by the trace file driver, but + -- let's include it for completeness... + len = 5 + end + finfo.original_length = len + finfo.captured_length = len + local data = file:read(len) + finfo.data = data + -- If the trace message starts with the trace_ts atom, then the + -- last element is a tuple of three integers. Probably need to be + -- flexible enough to accept either 8-bit or 32-bit integers. + -- + -- That is if we use 'timestamp' as the trace option. But what + -- about 'strict_monotonic_timestamp' or + -- 'monotonic_timestamp'.... are those using integers? + + local tsb1, tsb2, tsb3 = timestamp_regexp:match(data) + if tsb1 and tsb2 and tsb3 then + local megaseconds = decode_integer(tsb1) + local seconds = decode_integer(tsb2) + local microseconds = decode_integer(tsb3) + -- NSTime expects seconds and nanoseconds + finfo.time = NSTime(megaseconds * 1000000 + seconds, microseconds * 1000) + finfo.flags = wtap_presence_flags.TS + else + debug("No timestamp match") + end + return pos +end +erlang_trace_fh.read = erlang_trace_fh_read + +decode_integer = function(bin) + if string.byte(bin, 1) == 97 then + -- Unsigned 8-bit integer + return Struct.unpack("I1", bin, 2) + elseif string.byte(bin, 1) == 98 then + -- Signed 32-bit integer, big-endian + return Struct.unpack(">i4", bin, 2) + else + error("unknown type " .. string.byte(bin, 1)) + end +end + +function erlang_trace_fh.seek_read(file, cinfo, finfo, offset) + file:seek("set", offset) + return erlang_trace_fh_read(file, cinfo, finfo) ~= false +end + +erlang_trace_fh.extensions = "trace" +register_filehandler(erlang_trace_fh) diff --git a/dissectors/erlang-trace/erlterm.lua b/dissectors/erlang-trace/erlterm.lua new file mode 100644 index 0000000..42dde33 --- /dev/null +++ b/dissectors/erlang-trace/erlterm.lua @@ -0,0 +1,440 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/legoscia/cautious-rotary-phone (erlterm.lua), +-- commit e58354fd4cdd46bb17f88a8f870755bd67286ac2 du 13/06/2018. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- Copyright 2017 Magnus Henoch +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +-- Don't load this file twice: +if _G['erlang_term_proto'] then return end + +erlang_term_proto = Proto("erlterm", "Erlang binary term format") + +-- The "version number" should always be 131. It is omitted in the +-- distribution protocol, and in nested terms. +local pf_version_number = ProtoField.uint8("erlterm.version", "Version number") + +-- See erl_ext_dist.xml +local ATOM_CACHE_REF = 82 +local SMALL_INTEGER_EXT = 97 +local INTEGER_EXT = 98 +local FLOAT_EXT = 99 +local REFERENCE_EXT = 101 +local PORT_EXT = 102 +local PID_EXT = 103 +local SMALL_TUPLE_EXT = 104 +local LARGE_TUPLE_EXT = 105 +local MAP_EXT = 116 +local NIL_EXT = 106 +local STRING_EXT = 107 +local LIST_EXT = 108 +local BINARY_EXT = 109 +local SMALL_BIG_EXT = 110 +local LARGE_BIG_EXT = 111 +local NEW_REFERENCE_EXT = 114 +local FUN_EXT = 117 +local NEW_FUN_EXT = 112 +local EXPORT_EXT = 113 +local BIT_BINARY_EXT = 77 +local NEW_FLOAT_EXT = 70 +local ATOM_UTF8_EXT = 118 +local SMALL_ATOM_UTF8_EXT = 119 +local ATOM_EXT = 100 +local SMALL_ATOM_EXT = 115 + +local types = { + [ATOM_CACHE_REF] = "Atom cache reference", + [SMALL_INTEGER_EXT] = "Small integer", + [INTEGER_EXT] = "Integer", + [FLOAT_EXT] = "Float (old)", + [REFERENCE_EXT] = "Reference (old)", + [PORT_EXT] = "Port", + [PID_EXT] = "Process id", + [SMALL_TUPLE_EXT] = "Small tuple", + [LARGE_TUPLE_EXT] = "Large tuple", + [MAP_EXT] = "Map", + [NIL_EXT] = "Empty list", + [STRING_EXT] = "String", + [LIST_EXT] = "List", + [BINARY_EXT] = "Binary", + [SMALL_BIG_EXT] = "Small bignum", + [LARGE_BIG_EXT] = "Large bignum", + [NEW_REFERENCE_EXT] = "Reference (new)", + [FUN_EXT] = "Fun (old)", + [NEW_FUN_EXT] = "Fun (new)", + [EXPORT_EXT] = "External fun", + [BIT_BINARY_EXT] = "Bitstring", + [NEW_FLOAT_EXT] = "Float (new)", + [ATOM_UTF8_EXT] = "Atom (UTF-8)", + [SMALL_ATOM_UTF8_EXT] = "Small atom (UTF-8)", + [ATOM_EXT] = "Atom (Latin-1)", + [SMALL_ATOM_EXT] = "Small atom (Latin-1)" +} + +local pf_type = ProtoField.uint8("erlterm.type", "Term type", + base.DEC, types) + +local pf_arity_8 = ProtoField.uint8("erlterm.arity", "Arity") + +local pf_atom = ProtoField.string("erlterm.atom", "Atom") +local pf_atom_len_16 = ProtoField.uint16("erlterm.atom_length", "Atom length") +local pf_pid = ProtoField.string("erlterm.pid", "Process identifier") +local pf_port = ProtoField.string("erlterm.port", "Port identifier") +local pf_ref = ProtoField.string("erlterm.reference", "Reference") +local pf_id = ProtoField.uint32("erlterm.id", "ID number") +local pf_serial = ProtoField.uint32("erlterm.serial", "Serial number") +local pf_creation = ProtoField.uint8("erlterm.creation", "Creation number") +local pf_list_len = ProtoField.uint32("erlterm.list_length", "List length") +local pf_uint_8 = ProtoField.uint8("erlterm.integer", "Integer") +local pf_int_32 = ProtoField.int32("erlterm.integer", "Integer") +local pf_bignum_len_8 = ProtoField.uint8("erlterm.bignum_length", "Bignum length") +local pf_bignum_len_32 = ProtoField.uint32("erlterm.bignum_length", "Bignum length") +local pf_bignum = ProtoField.string("erlterm.bignum", "Bignum") +local pf_string_len = ProtoField.uint16("erlterm.string_length", "String length") +local pf_string = ProtoField.string("erlterm.string", "String") +local pf_binary_len = ProtoField.uint32("erlterm.binary_length", "Binary length") +local pf_binary = ProtoField.string("erlterm.binary", "Binary") + +erlang_term_proto.fields = + { pf_version_number, pf_type, pf_arity_8, pf_arity_32, pf_atom, pf_atom_len_16, + pf_pid, pf_port, pf_ref, pf_id, pf_serial, pf_creation, + pf_list_len, pf_uint_8, pf_int_32, + pf_bignum_len_8, pf_bignum_len_32, pf_bignum, + pf_string_len, pf_string, pf_binary_len, pf_binary } + +local ef_unhandled_type = ProtoExpert.new("erlterm.unhandled", "Unhandled type", + expert.group.UNDECODED, expert.severity.NOTE) +local ef_truncated = ProtoExpert.new("erlterm.truncated", "Not enough data", + expert.group.UNDECODED, expert.severity.WARN) + +erlang_term_proto.experts = { ef_unhandled_type, ef_truncated } + +-- At a certain length, we stop trying to display list and tuple +-- elements in the "display" string, and instead just say "N elements" +local max_subterm_display_length = 100 + +local dissect_term + +-- All dissect_* functions return three values: the position where the +-- term ends, a human-readable form of the term as a string, and +-- the term itself represented in some Lua-appropriate type. + +local function dissect_small_tuple(tvbuf, tree) + tree:add(pf_arity_8, tvbuf:range(0, 1)) + + local arity = tvbuf:range(0, 1):uint() + local display_elements = {} + local display_total_length = 0 + local elided_elements = 0 + local pos = 1 + local elements = {} + for i = 1, arity do + if pos >= tvbuf:len() then + tree:add_proto_expert_info(ef_truncated) + break + end + + local subtree = tree:add(erlang_term_proto, tvbuf:range(pos)) + subtree.text = "Tuple element" + local len, element_display, element = dissect_term(tvbuf:range(pos), subtree) + + pos = pos + len + table.insert(elements, element) + + -- Are we still trying to build a detailed display form of the tuple? + display_total_length = display_total_length + string.len(element_display or "") + if element_display and display_total_length < max_subterm_display_length then + table.insert(display_elements, element_display) + else + elided_elements = elided_elements + 1 + end + end + + if elided_elements > 0 then + table.insert(display_elements, elided_elements .. " more elements") + end + local display = "{" .. table.concat(display_elements, ", ") .. "}" + -- The third return value is the tuple elements as an array + return pos, display, elements +end + +local function dissect_atom(tvbuf, tree) + tree:add(pf_atom_len_16, tvbuf:range(0, 2)) + + local len = tvbuf:range(0, 2):uint() + tree:add(pf_atom, tvbuf:range(2, len)) + local atom_name = tvbuf:range(2, len):string() + -- The third return value is the atom name as a string + return len + 2, atom_name, atom_name +end + +local function dissect_pid(tvbuf, tree) + -- First, the node name, encoded as some kind of atom + local node_tree = tree:add(erlang_term_proto, tvbuf) + node_tree.text = "Node name" + local pos, node_name = dissect_term(tvbuf, node_tree) + + if pos >= tvbuf:len() then + tree:add_proto_expert_info(ef_truncated) + return pos + end + + -- Then, some numbers + tree:add(pf_id, tvbuf:range(pos, 4)) + tree:add(pf_serial, tvbuf:range(pos + 4, 4)) + tree:add(pf_creation, tvbuf:range(pos + 8, 1)) + + local pid_display + if node_name then + -- This is similar to how pids are displayed within Erlang, + -- but with an explicit node name instead of a number. + pid_display = "<" .. node_name .. "." .. tvbuf:range(pos, 4):uint() + .. "." .. tvbuf:range(pos + 4, 4):uint() .. ">" + end + tree:add(pf_pid, tvbuf:range(0, pos + 9), pid_display):set_generated(true) + -- The third return value is the display form of the pid + return pos + 9, pid_display, pid_display +end + +local function dissect_port(tvbuf, tree) + -- First, the node name, encoded as some kind of atom + local node_tree = tree:add(erlang_term_proto, tvbuf) + node_tree.text = "Node name" + local pos, node_name = dissect_term(tvbuf, node_tree) + + if pos >= tvbuf:len() then + tree:add_proto_expert_info(ef_truncated) + return pos + end + + -- Then, some numbers + tree:add(pf_id, tvbuf:range(pos, 4)) + tree:add(pf_creation, tvbuf:range(pos + 4, 1)) + + local port_display + if node_name then + -- This is similar to how ports are displayed within Erlang, + -- but with an explicit node name instead of a number. + port_display = "#Port<" .. node_name .. "." .. tvbuf:range(pos, 4):uint() .. ">" + end + tree:add(pf_port, tvbuf:range(0, pos + 5), port_display):set_generated(true) + -- The third return value is the display form of the port + return pos + 5, port_display, port_display +end + +local function dissect_new_reference(tvbuf, tree) + -- First, the number of "ID" integers + local len = tvbuf:range(0, 2):uint() + local pos = 2 + + -- Then, the node name, encoded as some kind of atom + local node_tree = tree:add(erlang_term_proto, tvbuf:range(pos)) + node_tree.text = "Node name" + local atom_len, node_name = dissect_term(tvbuf:range(pos), node_tree) + pos = pos + atom_len + + local display = "#Ref<" .. node_name + + -- Then, some numbers. A 1-byte creation integer: + tree:add(pf_creation, tvbuf:range(pos, 1)) + pos = pos + 1 + -- And a variable number of 4-byte "ID" integers: + for i = 1, len do + tree:add(pf_id, tvbuf:range(pos, 4)) + display = display .. "." .. tvbuf:range(pos, 4):uint() + pos = pos + 4 + end + display = display .. ">" + tree:add(pf_ref, tvbuf:range(0, pos), display):set_generated(true) + return pos, display, display +end + +local function dissect_list(tvbuf, tree) + tree:add(pf_list_len, tvbuf:range(0, 4)) + + local list_len = tvbuf:range(0, 4):uint() + local display_elements = {} + local display_total_length = 0 + local pos = 4 + local elements = {} + for i = 1, list_len do + if pos >= tvbuf:len() then + tree:add_proto_expert_info(ef_truncated) + break + end + + local subtree = tree:add(erlang_term_proto, tvbuf:range(pos)) + subtree.text = "List element" + local len, element_display, element = dissect_term(tvbuf:range(pos), subtree) + pos = pos + len + table.insert(elements, element) + + -- Are we still trying to build a detailed display form of the list? + display_total_length = display_total_length + string.len(element_display) + if element_display and display_total_length < max_subterm_display_length then + table.insert(display_elements, element_display) + end + end + + -- Finally the "tail" + if pos >= tvbuf:len() then + tree:add_proto_expert_info(ef_truncated) + return pos, display + end + local subtree = tree:add(erlang_term_proto, tvbuf:range(pos)) + subtree.text = "Tail" + local len = dissect_term(tvbuf:range(pos), subtree) + + local display + if display_total_length < max_subterm_display_length then + display = "[" .. table.concat(display_elements, ", ") .. "]" + else + display = "[ " .. list_len .. " elements ]" + end + + -- The third return value is the list elements as an array + return pos + len, display, elements +end + +local function dissect_nil(tvbuf, tree) + return 0, "[]", {} +end + +local function dissect_small_integer(tvbuf, tree) + tree:add(pf_uint_8, tvbuf:range(0, 1)) + local value = tvbuf:range(0, 1):uint() + return 1, "" .. value, value +end + +local function dissect_integer(tvbuf, tree) + tree:add(pf_int_32, tvbuf:range(0, 4)) + local value = tvbuf:range(0, 4):int() + return 4, "" .. value, value +end + +local function dissect_bignum(tvbuf, tree, nbytes) + -- We can't deal with bignums without including external libraries, + -- so let's just display them as hexadecimal numbers. + local sign = tvbuf:range(0, 1):uint() + local s = "" + -- Least significant bytes go first, so we prepend each new byte + for i = 1, nbytes do + s = string.format("%02x", tvbuf:range(i, 1):uint()) .. s + end + -- Finally base specifier and sign + if sign == 1 then + s = "-16#" .. s + else + s = "16#" .. s + end + tree:add(pf_bignum, tvbuf:range(0, nbytes + 1), s) + return nbytes + 1, s, s +end + +local function dissect_small_bignum(tvbuf, tree) + local nbytes = tvbuf:range(0, 1):uint() + tree:add(pf_bignum_len_8, tvbuf:range(0, 1)) + local pos, display, value = dissect_bignum(tvbuf:range(1), tree, nbytes) + return pos + 1, display, value +end + +local function dissect_large_bignum(tvbuf, tree) + local nbytes = tvbuf:range(0, 4):uint() + tree:add(pf_bignum_len_32, tvbuf:range(0, 4)) + local pos, display, value = dissect_bignum(tvbuf:range(4), tree, nbytes) + return pos + 4, display, value +end + +local function dissect_string(tvbuf, tree) + tree:add(pf_string_len, tvbuf:range(0, 2)) + + local len = tvbuf:range(0, 2):uint() + tree:add(pf_string, tvbuf:range(2, len)) + local str = tvbuf:range(2, len):string() + -- format "%q" escapes most things, but leaves newlines as + -- backslash + newline. let's change that to backslash + "n". + return len + 2, string.format("%q", str):gsub("\n", "n"), str +end + +local function dissect_binary(tvbuf, tree) + tree:add(pf_binary_len, tvbuf:range(0, 4)) + + local len = tvbuf:range(0, 4):uint() + tree:add(pf_binary, tvbuf:range(4, len)) + local str = tvbuf:range(4, len):string() + -- This will work fine as long as the binary looks like a string. + -- Let's see what happens if it's "just" binary data... + return len + 4, string.format("<<%q>>", str):gsub("\n", "n"), str +end + +local term_functions = { + [SMALL_TUPLE_EXT] = dissect_small_tuple, + [ATOM_EXT] = dissect_atom, + [PID_EXT] = dissect_pid, + [PORT_EXT] = dissect_port, + [LIST_EXT] = dissect_list, + [NIL_EXT] = dissect_nil, + [SMALL_INTEGER_EXT] = dissect_small_integer, + [INTEGER_EXT] = dissect_integer, + [SMALL_BIG_EXT] = dissect_small_bignum, + [LARGE_BIG_EXT] = dissect_large_bignum, + [STRING_EXT] = dissect_string, + [BINARY_EXT] = dissect_binary, + [NEW_REFERENCE_EXT] = dissect_new_reference, +} + +dissect_term = function(tvbuf, tree) + tree:add(pf_type, tvbuf:range(0,1)) + local type_byte = tvbuf:range(0,1):uint() + + local term_function = term_functions[type_byte] + if term_function then + local pos, display, value = term_function(tvbuf:range(1), tree) + if display then + tree:append_text(": " .. display) + end + -- Explicitly set the length of the "tree", so that it spans + -- over the correct set of bytes in the UI. + tree.len = pos + return 1 + pos, display, value + else + local unhandled_text + if types[type_byte] then + unhandled_text = "Unhandled type: " .. types[type_byte] + else + unhandled_text = "Unhandled type: " .. type_byte + end + tree:add_proto_expert_info(ef_unhandled_type, unhandled_text) + return tvbuf:len(), unhandled_text + end +end + +-- This function is global, so that it can be called directly from +-- other modules, without going through Wireshark's dissector +-- framework - which would lose return values beyond the first. +function erlang_term_dissector(tvbuf, pktinfo, root) + local tree = root:add(erlang_term_proto, tvbuf:range(0)) + + local first_byte = tvbuf:range(0,1):uint() + if first_byte == 131 then + tree:add(pf_version_number, tvbuf:range(0,1)) + return dissect_term(tvbuf:range(1), tree) + else + -- No version number - let's just assume we're on the right track. + return dissect_term(tvbuf, tree) + end +end + +erlang_term_proto.dissector = erlang_term_dissector + diff --git a/dissectors/espnow-soupysoups/LICENSE b/dissectors/espnow-soupysoups/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/dissectors/espnow-soupysoups/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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) + + 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. + +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) year 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 Lesser General +Public License instead of this License. diff --git a/dissectors/espnow-soupysoups/README.md b/dissectors/espnow-soupysoups/README.md new file mode 100644 index 0000000..8b91b15 --- /dev/null +++ b/dissectors/espnow-soupysoups/README.md @@ -0,0 +1,52 @@ +# ESP-NOW (post-dissecteur, trames Wi-Fi Espressif) + +Post-dissecteur Wireshark Lua de **ESP-NOW**, protocole sans connexion +d'Espressif (ESP8266 / ESP32) transporté dans des trames d'action 802.11 +« vendor specific » : à partir du champ `data` laissé par Wireshark, il +décode les 4 octets aléatoires (anti-rejeu), l'élément vendeur (ID, +longueur, OUI Espressif 18:FE:34, type, version) et les données utiles. +Une préférence permet d'ignorer les paquets dont l'OUI n'est pas celui +d'Espressif. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/SoupySoups/ESPNOW-Wireshark-Dissector (fichier `espnow.lua`) | +| Commit importé | `142e7a7197f151102b0d275f08d68f40714f33b2` du 27/03/2025 (branche `main`, dernier commit ; dernière modification du dissecteur : `2d4eff5` du 27/03/2025) | +| Licence amont | GPL-2.0-only (README amont : « released under GNUv2 », sans « or later » ; `LICENSE` amont : texte de la GPL v2) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur ESP-NOW natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `espnow.lua` | Post-dissecteur `espnow`, préférence « Drop packets not signed Espressif OUI » ; fins de ligne CRLF d'origine conservées | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `espnow.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, ouvrir +une capture Wi-Fi en mode moniteur sur le canal des appareils, puis filtrer +avec `espnow`. + +## Remarques + +- **Colonnes écrasées sur tous les paquets** : la fonction affecte + « ESP-NOW » aux colonnes Protocole et Info avant de vérifier la présence + d'un champ `data` ; une fois le plugin chargé, toutes les trames de la + capture peuvent afficher « ESP-NOW » dans la liste (le filtre `espnow` + reste fiable). À ne charger que pour des captures ESP-NOW. +- **`bit32` absent des Wireshark récents** : la séparation version / + réservé appelle `bit32.band` et `bit32.rshift`, bibliothèque de Lua 5.2 + absente par défaut de Lua 5.3 et 5.4, seules versions prises en charge + depuis Wireshark 4.4 (qui fournit `bit` à la place). Contournement local : + ajouter `bit32 = bit` en tête du fichier (code amont non modifié ici). +- Variable globale `espnow_postdissector` comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/espnow-soupysoups/espnow.lua b/dissectors/espnow-soupysoups/espnow.lua new file mode 100644 index 0000000..e6d7c70 --- /dev/null +++ b/dissectors/espnow-soupysoups/espnow.lua @@ -0,0 +1,89 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/SoupySoups/ESPNOW-Wireshark-Dissector (espnow.lua), +-- commit 142e7a7197f151102b0d275f08d68f40714f33b2 du 27/03/2025. +-- Licence amont : GPL-2.0-only (LICENSE amont) — voir README.md. +-- Define ESP-NOW Post-Dissector +espnow_postdissector = Proto("ESPNow", "ESP-NOW Post-Dissector") + +-- Add preferences +espnow_postdissector.prefs.check_oui = Pref.bool("Drop packets not signed Espressif OUI", true, "This option will cause packets to not process if they have an incorrect OUI.") + + +-- Define fields +local f_random_bytes = ProtoField.bytes("espnow.random", "Random Bytes (Anti-Relay)") + +local f_element_id = ProtoField.uint8("espnow.vs.element_id", "Element ID", base.DEC) +local f_length = ProtoField.uint8("espnow.vs.length", "Length", base.DEC) +local f_oui = ProtoField.uint24("espnow.vs.oui", "OUI", base.HEX) +local f_type = ProtoField.uint8("espnow.vs.type", "Type", base.HEX) + +local f_reserved = ProtoField.uint8("espnow.vs.reserved", "Reserved", base.HEX, nil, 0xF0) -- Bits 7-4 +local f_version = ProtoField.uint8("espnow.vs.version", "Version", base.DEC, nil, 0x0F) -- Bits 3-0 + +local f_data = ProtoField.bytes("espnow.vs.data", "Data") + +espnow_postdissector.fields = { f_random_bytes, f_element_id, f_length, f_oui, f_type, f_reserved, f_version, f_data } + +local data = Field.new("data") + +-- Post-dissector function +function espnow_postdissector.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "ESP-NOW" + pinfo.cols.info = "ESP-NOW Data" + + -- Extract Wireshark's "tagged parameters" field + local data_field = data() + if not data_field then return end -- No tagged parameters, skip + + -- Get the offset where tagged parameters start + local data_offset = data_field.range():offset() + local data_length = data_field.range():len() + + if data_length < 11 then return end -- Too short for ESP-NOW + + -- Extract the ESP-NOW vendor-specific element + local esp_data = buffer(data_offset, data_length) + local random_bytes = esp_data(0,4) + local element_id = esp_data(4,1) + local length = esp_data(5,1) + local oui = esp_data(6,3) + local ptype = esp_data(9,1) + + local resver = esp_data(10,1):le_uint() -- Read as little-endian 16-bit integer + + -- Extract fields using bitwise operations + local reserved = bit32.rshift(bit32.band(resver, 0x00F0), 4) -- Bits 7-4 + local version = bit32.band(resver, 0x000F) -- Bits 3-0 + + -- Check if it's a vendor-specific element (221) + if element_id:uint() ~= 221 then return end + + -- Check if the OUI is the expected value (0x18fe34) + if oui:uint() ~= 0x18fe34 and espnow_postdissector.prefs.check_oui then return end + + -- Check if the type is 0x04 (ESP-NOW) + if ptype:uint() ~= 0x04 then return end + + -- Add ESP-NOW subtree to the Wireshark packet tree + local esp_tree = tree:add(espnow_postdissector, esp_data, "ESP-NOW Data") + esp_tree:add(f_random_bytes, random_bytes) + + local vs_tree = esp_tree:add(esp_data(4, data_length-4), "Vendor Specific Data") + + vs_tree:add(f_element_id, element_id) + vs_tree:add(f_length, length) + vs_tree:add(f_oui, oui) + vs_tree:add(f_type, ptype) + + local resver_tree = vs_tree:add(esp_data(10, 1), "Reserved/Version Byte"):append_text(" (" .. resver .. ")") + + resver_tree:add(f_reserved, esp_data(10,1), reserved):append_text(" (" .. reserved .. ")") + resver_tree:add(f_version, esp_data(10,1), version):append_text(" (" .. version .. ")") + + if data_length > 10 then -- Too short for ESP-NOW + vs_tree:add(f_data, esp_data(11, data_length-11), "Data"):append_text(" (" .. (data_length-11) .. " bytes)") + end +end + +-- Register as a post-dissector +register_postdissector(espnow_postdissector) diff --git a/dissectors/ethp2p-libp2p/CAPTURE.md b/dissectors/ethp2p-libp2p/CAPTURE.md new file mode 100644 index 0000000..9a0c6b8 --- /dev/null +++ b/dissectors/ethp2p-libp2p/CAPTURE.md @@ -0,0 +1,119 @@ +# Capturing Decryptable QUIC Traffic from Ethereum Consensus Clients + +## Overview + +Ethereum consensus clients (Prysm, Lighthouse, etc.) use libp2p over QUIC for +peer-to-peer networking. QUIC encrypts all traffic with TLS 1.3, making packet +inspection impossible without the session keys. + +This document describes how to patch a client to export TLS keys via the +standard `SSLKEYLOGFILE` mechanism, then capture and decrypt the traffic. + +## Required go-libp2p Patch + +go-libp2p's TLS security module already supports `KeyLogWriter` via +`WithKeyLogWriter()`, but the QUIC transport constructor doesn't pass this +option through. A two-line patch is needed in +`p2p/transport/quic/transport.go`: + +```diff +-func NewTransport(key ic.PrivKey, connManager *quicreuse.ConnManager, +- psk pnet.PSK, gater connmgr.ConnectionGater, +- rcmgr network.ResourceManager) (tpt.Transport, error) { ++func NewTransport(key ic.PrivKey, connManager *quicreuse.ConnManager, ++ psk pnet.PSK, gater connmgr.ConnectionGater, ++ rcmgr network.ResourceManager, ++ opts ...p2ptls.IdentityOption) (tpt.Transport, error) { + ... +- identity, err := p2ptls.NewIdentity(key) ++ identity, err := p2ptls.NewIdentity(key, opts...) +``` + +This patch has been tested on go-libp2p v0.39.1, v0.47.0, and v0.48.0. Apply +it via a local copy and a `replace` directive in `go.mod`: + +``` +replace github.com/libp2p/go-libp2p => ./go-libp2p-local +``` + +## Client-Side Changes + +### Prysm + +In `beacon-chain/p2p/options.go`, add the key log option to the QUIC transport: + +```go +import p2ptls "github.com/libp2p/go-libp2p/p2p/security/tls" + +func keyLogOption() p2ptls.IdentityOption { + path := os.Getenv("SSLKEYLOGFILE") + if path == "" { + return func(*p2ptls.IdentityConfig) {} + } + f, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600) + if err != nil { + return func(*p2ptls.IdentityConfig) {} + } + return p2ptls.WithKeyLogWriter(f) +} +``` + +Then change the transport registration: + +```diff +-options = append(options, libp2p.Transport(libp2pquic.NewTransport)) ++options = append(options, libp2p.Transport(libp2pquic.NewTransport, keyLogOption())) +``` + +### Other go-libp2p Clients + +The same pattern applies to any Go program using go-libp2p with QUIC: apply +the go-libp2p patch, then pass `keyLogOption()` as an extra argument to +`libp2p.Transport(libp2pquic.NewTransport, ...)`. + +## Capture Procedure + +The order matters: **start tcpdump before the client** so that all QUIC +handshakes are captured. Without the Initial packets, tshark cannot associate +short-header packets with their TLS keys. + +```bash +# 1. Start packet capture on the QUIC port FIRST +tcpdump -i eth0 -w capture.pcap "udp port 13001" & + +# 2. Start the client with SSLKEYLOGFILE +SSLKEYLOGFILE=keys.log ./beacon-chain \ + --mainnet \ + --p2p-quic-port=13001 \ + ... + +# 3. Wait for traffic, then stop client before tcpdump +kill $CLIENT_PID +sleep 2 +kill $TCPDUMP_PID +``` + +## Decryption with tshark + +```bash +tshark -r capture.pcap \ + -o tls.keylog_file:keys.log \ + -d udp.port==13001,quic +``` + +## Decryption with Wireshark GUI + +1. Edit > Preferences > Protocols > TLS +2. Set "(Pre)-Master-Secret log filename" to the `keys.log` path +3. Open the pcap file + +## Limitations + +- Only connections where **our node participates in the TLS handshake** can be + decrypted. Traffic between other peers passing through the same network + segment cannot be decrypted. +- tshark must see the QUIC Initial (handshake) packets to map connection IDs + to TLS keys. Captures started after connections are established will have + undecryptable traffic. +- Noise-secured connections (TCP transport) do not produce SSLKEYLOGFILE + output. Only QUIC connections (which use TLS 1.3) are decryptable. diff --git a/dissectors/ethp2p-libp2p/LICENSE b/dissectors/ethp2p-libp2p/LICENSE new file mode 100644 index 0000000..be3f7b2 --- /dev/null +++ b/dissectors/ethp2p-libp2p/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + 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 +them 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/dissectors/ethp2p-libp2p/README.md b/dissectors/ethp2p-libp2p/README.md new file mode 100644 index 0000000..4f8433d --- /dev/null +++ b/dissectors/ethp2p-libp2p/README.md @@ -0,0 +1,73 @@ +# libp2p (Identify, GossipSub) et Ethereum Consensus sur QUIC + +Dissecteurs Wireshark Lua du projet **ethp2p** pour analyser le trafic +pair-à-pair des clients de consensus Ethereum (Prysm, Lighthouse…), qui +utilisent **libp2p sur QUIC**. Ce sont des post-dissecteurs qui lisent les +champs QUIC natifs (`quic.stream_data`, `quic.stream.stream_id`, +`quic.stream.offset`, `quic.connection.number`) : le trafic doit donc être +déchiffré (fichier de clés TLS). + +- `libp2p-common.lua` : bibliothèque partagée (table globale `libp2p`) — + varints, protobuf minimal, négociation multistream-select, réassemblage + par flux QUIC, formatage des multiaddr ; +- `libp2p-identify.lua` : protocole `libp2p_identify` (`/ipfs/id/1.0.0`) ; +- `libp2p-gossipsub.lua` : protocole `libp2p_gossipsub` + (`/meshsub/1.0.0` à `/meshsub/1.3.0`, `/floodsub/1.0.0`) ; +- `eth-consensus.lua` : protocole `eth_consensus` — décompression Snappy + (en Lua) et décodage SSZ des messages GossipSub PUBLISH de la couche de + consensus (fork Fulu) pour les sujets `beacon_block`, + `beacon_aggregate_and_proof`, `beacon_attestation`, + `sync_committee_contribution_and_proof` et `data_column_sidecar`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ethp2p/wireshark-dissectors | +| Commit importé | `08356b26fc48506e3ac84fea017ad83e83449409` du 23/03/2026 (branche `main`, dernier commit ; dernières modifications : `eth-consensus.lua` `b5887ad`, `libp2p-common.lua` `0659cc6`, `libp2p-gossipsub.lua` et `libp2p-identify.lua` `96da6b8`, tous du 23/03/2026) | +| Licence amont | AGPL-3.0 (fichier `LICENSE` amont, copié ici) ; aucune mention « or later » dans le dépôt, d'où `AGPL-3.0-only` ; les scripts n'ont pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non — ni libp2p, ni GossipSub, ni SSZ Ethereum (QUIC et Snappy sont natifs, mais le Snappy natif n'est pas utilisé ici) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `libp2p-common.lua` | Bibliothèque partagée, à installer avec les autres | +| `libp2p-identify.lua` | Post-dissecteur `libp2p_identify` | +| `libp2p-gossipsub.lua` | Post-dissecteur `libp2p_gossipsub` | +| `eth-consensus.lua` | Post-dissecteur `eth_consensus` | +| `CAPTURE.md` | Documentation amont : capturer du trafic QUIC déchiffrable (correctif go-libp2p pour `SSLKEYLOGFILE`, Prysm) | +| `test2.pcap`, `test2-keys.log` | Capture d'exemple amont (≈ 600 Ko) et son fichier de clés TLS de test | +| `LICENSE` | Licence AGPL-3.0 amont | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête des `.lua`. Non importés : `test-data/test.pcap` +(1,7 Mo, au-delà de la limite de 1 Mo) avec ses clés, `test.sh`, +`Makefile`, `CLAUDE.md` et la capture d'écran. + +## Utilisation + +Copier les quatre `.lua` ensemble dans le dossier `plugins` de Wireshark +(le `Makefile` amont visait `~/.local/lib/wireshark/plugins`). Indiquer le +fichier de clés dans Préférences → Protocols → TLS → « (Pre)-Master-Secret +log filename », puis filtrer avec `libp2p_identify`, `libp2p_gossipsub` ou +`eth_consensus`. Exemple : + +``` +tshark -r test2.pcap -o tls.keylog_file:test2-keys.log -Y eth_consensus +``` + +## Remarques + +- Chaque script charge `libp2p-common.lua` par `dofile()` depuis son + propre dossier si la table globale `libp2p` n'est pas encore prête : les + quatre fichiers doivent rester dans le même dossier. +- Les opérations binaires utilisent la bibliothèque globale `bit`. +- Le décodage SSZ suit les structures du fork Fulu ; d'autres forks + peuvent être mal décodés. +- Le README amont indique que seules les connexions QUIC sont prises en + charge (pas TCP/Noise/Yamux). +- `test2-keys.log` ne contient que des secrets TLS de session de la + capture de test amont. +- Non vérifié dans Wireshark ici (l'amont fournit des tests `tshark`, + non repris). diff --git a/dissectors/ethp2p-libp2p/eth-consensus.lua b/dissectors/ethp2p-libp2p/eth-consensus.lua new file mode 100644 index 0000000..5d4aef5 --- /dev/null +++ b/dissectors/ethp2p-libp2p/eth-consensus.lua @@ -0,0 +1,399 @@ +-- SPDX-License-Identifier: AGPL-3.0-only +-- Importé de https://github.com/ethp2p/wireshark-dissectors (eth-consensus.lua), +-- commit 08356b26fc48506e3ac84fea017ad83e83449409 du 23/03/2026. +-- Licence amont : AGPL-3.0-only (LICENSE amont) — voir README.md. +-- Wireshark Lua dissector for Ethereum Fulu consensus layer gossipsub messages. +-- Decodes snappy-compressed SSZ payloads from GossipSub PUBLISH messages. + +if not libp2p or not libp2p._loaded then + local script_dir = debug.getinfo(1, "S").source:match("@?(.*/)") or "" + dofile(script_dir .. "libp2p-common.lua") + libp2p._loaded = true +end + +local proto_eth = Proto("eth_consensus", "Ethereum Consensus") +proto_eth.fields = {} + +--------------------------------------------------------------------------- +-- Snappy decompression (block format, not framed) +--------------------------------------------------------------------------- + +local function snappy_decompress(s) + if not s or #s == 0 then return nil, "empty input" end + + local ulen, vc = libp2p.decode_varint_str(s, 1) + if vc == 0 or ulen == 0 then return nil, "bad varint" end + + local out = {} + local out_len = 0 + local pos = 1 + vc + + while pos <= #s and out_len < ulen do + local tag = s:byte(pos) + pos = pos + 1 + local etype = bit.band(tag, 0x03) + + if etype == 0 then + local lit_len_m1 = bit.rshift(tag, 2) + local lit_len + if lit_len_m1 < 60 then + lit_len = lit_len_m1 + 1 + elseif lit_len_m1 == 60 then + lit_len = s:byte(pos) + 1; pos = pos + 1 + elseif lit_len_m1 == 61 then + lit_len = s:byte(pos) + s:byte(pos+1) * 256 + 1; pos = pos + 2 + elseif lit_len_m1 == 62 then + lit_len = s:byte(pos) + s:byte(pos+1)*256 + s:byte(pos+2)*65536 + 1; pos = pos + 3 + else + lit_len = s:byte(pos) + s:byte(pos+1)*256 + s:byte(pos+2)*65536 + s:byte(pos+3)*16777216 + 1; pos = pos + 4 + end + if pos + lit_len - 1 > #s then return nil, "literal overrun" end + table.insert(out, s:sub(pos, pos + lit_len - 1)) + out_len = out_len + lit_len + pos = pos + lit_len + + elseif etype == 1 then + local length = bit.band(bit.rshift(tag, 2), 0x07) + 4 + local offset = bit.lshift(bit.band(tag, 0xe0), 3) + s:byte(pos) + pos = pos + 1 + if offset == 0 then return nil, "zero offset" end + local full = table.concat(out) + local src_start = #full - offset + 1 + if src_start < 1 then return nil, "offset underrun" end + local copied = {} + for j = 1, length do + copied[j] = full:sub(src_start + ((j-1) % offset), src_start + ((j-1) % offset)) + end + table.insert(out, table.concat(copied)) + out_len = out_len + length + + elseif etype == 2 then + local length = bit.rshift(tag, 2) + 1 + local offset = s:byte(pos) + s:byte(pos+1) * 256 + pos = pos + 2 + if offset == 0 then return nil, "zero offset" end + local full = table.concat(out) + local src_start = #full - offset + 1 + if src_start < 1 then return nil, "offset underrun" end + local copied = {} + for j = 1, length do + copied[j] = full:sub(src_start + ((j-1) % offset), src_start + ((j-1) % offset)) + end + table.insert(out, table.concat(copied)) + out_len = out_len + length + + elseif etype == 3 then + local length = bit.rshift(tag, 2) + 1 + local offset = s:byte(pos) + s:byte(pos+1)*256 + s:byte(pos+2)*65536 + s:byte(pos+3)*16777216 + pos = pos + 4 + if offset == 0 then return nil, "zero offset" end + local full = table.concat(out) + local src_start = #full - offset + 1 + if src_start < 1 then return nil, "offset underrun" end + local copied = {} + for j = 1, length do + copied[j] = full:sub(src_start + ((j-1) % offset), src_start + ((j-1) % offset)) + end + table.insert(out, table.concat(copied)) + out_len = out_len + length + end + end + + local result = table.concat(out) + if #result < ulen then return nil, string.format("short: got %d want %d", #result, ulen) end + return result:sub(1, ulen), nil +end + +--------------------------------------------------------------------------- +-- SSZ helpers (little-endian, 0-based offsets, 1-based strings) +--------------------------------------------------------------------------- + +local function ssz_uint64(s, offset) + local i = offset + 1 + if i + 7 > #s then return 0 end + local lo = s:byte(i) + s:byte(i+1)*256 + s:byte(i+2)*65536 + s:byte(i+3)*16777216 + local hi = s:byte(i+4) + s:byte(i+5)*256 + s:byte(i+6)*65536 + s:byte(i+7)*16777216 + return lo + hi * 4294967296 +end + +local function ssz_uint32(s, offset) + local i = offset + 1 + if i + 3 > #s then return 0 end + return s:byte(i) + s:byte(i+1)*256 + s:byte(i+2)*65536 + s:byte(i+3)*16777216 +end + +local function ssz_bytes_hex(s, offset, len) + local i = offset + 1 + if i + len - 1 > #s then return "?" end + return libp2p.bytes_to_hex(s:sub(i, i + len - 1)) +end + +local function short_hex(hex_str) + if #hex_str <= 16 then return hex_str end + return hex_str:sub(1, 8) .. "..." .. hex_str:sub(-8) +end + +-- Count set bits in a raw string (for aggregation_bits / committee_bits). +local popcount_table = {} +for i = 0, 255 do + local c = 0; local v = i + while v > 0 do c = c + bit.band(v, 1); v = bit.rshift(v, 1) end + popcount_table[i] = c +end + +local function count_bits(s, offset, len) + local count = 0 + for j = offset + 1, offset + len do + if j > #s then break end + count = count + popcount_table[s:byte(j)] + end + return count +end + +-- For a Bitlist, the highest set bit is the length delimiter and shouldn't be counted. +-- Returns (bits_set, total_bits) for a Bitlist. +local function count_bitlist(s, offset, len) + if len == 0 then return 0, 0 end + -- Find the delimiter bit (highest set bit in the last byte) + local last_byte = s:byte(offset + len) + if not last_byte or last_byte == 0 then return count_bits(s, offset, len), len * 8 end + -- Find position of highest bit + local high = 7 + while high > 0 and bit.band(last_byte, bit.lshift(1, high)) == 0 do high = high - 1 end + -- Total bits = (len-1)*8 + high (exclude the delimiter bit itself) + local total = (len - 1) * 8 + high + -- Count all set bits, subtract 1 for the delimiter + local set = count_bits(s, offset, len) - 1 + return set, total +end + +--------------------------------------------------------------------------- +-- Checkpoint: epoch(8) + root(32) = 40 bytes +--------------------------------------------------------------------------- + +local function decode_checkpoint(s, offset, tree, label) + local epoch = ssz_uint64(s, offset) + local root = ssz_bytes_hex(s, offset + 8, 32) + tree:add(string.format("%s: epoch=%d root=0x%s", label, epoch, short_hex(root))) +end + +--------------------------------------------------------------------------- +-- AttestationData: 128 bytes +-- slot(8) + committee_index(8) + beacon_block_root(32) + source(40) + target(40) +--------------------------------------------------------------------------- + +local function decode_attestation_data(s, offset, tree) + tree:add(string.format("Slot: %d", ssz_uint64(s, offset))) + tree:add(string.format("Committee Index: %d", ssz_uint64(s, offset + 8))) + tree:add(string.format("Beacon Block Root: 0x%s", short_hex(ssz_bytes_hex(s, offset + 16, 32)))) + decode_checkpoint(s, offset + 48, tree, "Source") + decode_checkpoint(s, offset + 88, tree, "Target") +end + +--------------------------------------------------------------------------- +-- BeaconBlockHeader: 112 bytes +-- slot(8) + proposer_index(8) + parent_root(32) + state_root(32) + body_root(32) +--------------------------------------------------------------------------- + +local function decode_beacon_block_header(s, offset, tree) + tree:add(string.format("Slot: %d", ssz_uint64(s, offset))) + tree:add(string.format("Proposer Index: %d", ssz_uint64(s, offset + 8))) + tree:add(string.format("Parent Root: 0x%s", short_hex(ssz_bytes_hex(s, offset + 16, 32)))) + tree:add(string.format("State Root: 0x%s", short_hex(ssz_bytes_hex(s, offset + 48, 32)))) + tree:add(string.format("Body Root: 0x%s", short_hex(ssz_bytes_hex(s, offset + 80, 32)))) +end + +--------------------------------------------------------------------------- +-- SignedBeaconBlockFulu +-- SSZ: message_offset(4) + signature(96) = 100 bytes fixed +-- BeaconBlockFulu: slot(8) + proposer_index(8) + parent_root(32) + state_root(32) + body_offset(4) +--------------------------------------------------------------------------- + +local function decode_signed_beacon_block(s, tree) + if #s < 100 then tree:add("(too short)"); return end + local msg_offset = ssz_uint32(s, 0) + local st = tree:add("SignedBeaconBlock") + st:add(string.format("Signature: 0x%s", short_hex(ssz_bytes_hex(s, 4, 96)))) + + if msg_offset + 84 > #s then st:add("(message too short)"); return end + local bt = st:add("BeaconBlock") + bt:add(string.format("Slot: %d", ssz_uint64(s, msg_offset))) + bt:add(string.format("Proposer Index: %d", ssz_uint64(s, msg_offset + 8))) + bt:add(string.format("Parent Root: 0x%s", short_hex(ssz_bytes_hex(s, msg_offset + 16, 32)))) + bt:add(string.format("State Root: 0x%s", short_hex(ssz_bytes_hex(s, msg_offset + 48, 32)))) + bt:add(string.format("Block Size: %d bytes (uncompressed)", #s)) +end + +--------------------------------------------------------------------------- +-- SignedAggregateAttestationAndProofElectra +-- SSZ: message_offset(4) + signature(96) = 100 fixed +-- AggregateAttestationAndProofElectra: +-- aggregator_index(8) + aggregate_offset(4) + selection_proof(96) = 108 fixed +-- Aggregate (Attestation Electra): +-- aggregation_bits_offset(4) + data(128) + signature(96) + committee_bits_offset(4) = 232 fixed +--------------------------------------------------------------------------- + +local function decode_signed_aggregate(s, tree) + if #s < 100 then tree:add("(too short)"); return end + local msg_offset = ssz_uint32(s, 0) + local st = tree:add("SignedAggregateAttestationAndProof") + + if msg_offset + 108 > #s then st:add("(message too short)"); return end + st:add(string.format("Aggregator Index: %d", ssz_uint64(s, msg_offset))) + st:add(string.format("Selection Proof: 0x%s", short_hex(ssz_bytes_hex(s, msg_offset + 12, 96)))) + + local agg_offset_rel = ssz_uint32(s, msg_offset + 8) + local att_abs = msg_offset + agg_offset_rel + -- AttestationElectra fixed: agg_bits_offset(4) + data(128) + signature(96) + committee_bits(8) = 236 + if att_abs + 236 > #s then st:add("(attestation too short)"); return end + + local at = st:add("Aggregate Attestation") + decode_attestation_data(s, att_abs + 4, at) + at:add(string.format("Signature: 0x%s", short_hex(ssz_bytes_hex(s, att_abs + 132, 96)))) + + -- committee_bits: Bitvector[64] = 8 bytes at att_abs + 228 + local cb_set = count_bits(s, att_abs + 228, 8) + at:add(string.format("Committee Bits: %d committees, 0x%s", cb_set, ssz_bytes_hex(s, att_abs + 228, 8))) + + -- aggregation_bits: Bitlist at att_abs + agg_bits_offset_rel + local agg_bits_off_rel = ssz_uint32(s, att_abs) + local agg_bits_abs = att_abs + agg_bits_off_rel + local agg_bits_len = #s - agg_bits_abs + if agg_bits_len > 0 then + local set, total = count_bitlist(s, agg_bits_abs, agg_bits_len) + at:add(string.format("Aggregation Bits: %d/%d validators (%.0f%%), 0x%s", + set, total, total > 0 and set/total*100 or 0, + ssz_bytes_hex(s, agg_bits_abs, agg_bits_len))) + end +end + +--------------------------------------------------------------------------- +-- SingleAttestation (Electra/Fulu): 240 bytes fixed +-- committee_index(8) + attester_index(8) + data(128) + signature(96) +--------------------------------------------------------------------------- + +local function decode_attestation(s, tree) + if #s < 240 then tree:add(string.format("(too short: %d bytes)", #s)); return end + local st = tree:add("SingleAttestation") + st:add(string.format("Committee Index: %d", ssz_uint64(s, 0))) + st:add(string.format("Attester Index: %d", ssz_uint64(s, 8))) + decode_attestation_data(s, 16, st) + st:add(string.format("Signature: 0x%s", short_hex(ssz_bytes_hex(s, 144, 96)))) +end + +--------------------------------------------------------------------------- +-- SignedContributionAndProof: 360 bytes fixed (all fixed-size, no offsets) +-- ContributionAndProof(264) + signature(96) +-- aggregator_index(8) + SyncCommitteeContribution(160) + selection_proof(96) +-- slot(8) + block_root(32) + subcommittee_index(8) + aggregation_bits(16) + signature(96) +--------------------------------------------------------------------------- + +local function decode_signed_contribution(s, tree) + if #s < 360 then tree:add(string.format("(too short: %d bytes)", #s)); return end + local st = tree:add("SignedContributionAndProof") + st:add(string.format("Aggregator Index: %d", ssz_uint64(s, 0))) + + local ct = st:add("SyncCommitteeContribution") + ct:add(string.format("Slot: %d", ssz_uint64(s, 8))) + ct:add(string.format("Block Root: 0x%s", short_hex(ssz_bytes_hex(s, 16, 32)))) + ct:add(string.format("Subcommittee Index: %d", ssz_uint64(s, 48))) + + -- aggregation_bits: Bitvector[128] = 16 bytes at offset 56 + local ab_set = count_bits(s, 56, 16) + ct:add(string.format("Aggregation Bits: %d/128 validators (%.0f%%), 0x%s", + ab_set, ab_set/128*100, ssz_bytes_hex(s, 56, 16))) + + st:add(string.format("Selection Proof: 0x%s", short_hex(ssz_bytes_hex(s, 168, 96)))) + st:add(string.format("Signature: 0x%s", short_hex(ssz_bytes_hex(s, 264, 96)))) +end + +--------------------------------------------------------------------------- +-- DataColumnSidecar: 232 bytes fixed part +-- index(8) + column_offset(4) + kzg_commitments_offset(4) + kzg_proofs_offset(4) + +-- signed_block_header(208) + kzg_commitments_inclusion_proof_offset(4) +--------------------------------------------------------------------------- + +local function decode_data_column_sidecar(s, tree) + if #s < 232 then tree:add("(too short)"); return end + local st = tree:add("DataColumnSidecar") + st:add(string.format("Column Index: %d", ssz_uint64(s, 0))) + st:add(string.format("Sidecar Size: %d bytes (uncompressed)", #s)) + + local hdr_tree = st:add("Signed Block Header") + decode_beacon_block_header(s, 20, hdr_tree) -- after index(8) + 3 offsets(12) + hdr_tree:add(string.format("Signature: 0x%s", short_hex(ssz_bytes_hex(s, 132, 96)))) +end + +--------------------------------------------------------------------------- +-- Topic to decoder mapping +--------------------------------------------------------------------------- + +local topic_decoders = { + ["beacon_block"] = decode_signed_beacon_block, + ["beacon_aggregate_and_proof"] = decode_signed_aggregate, + ["beacon_attestation"] = decode_attestation, + ["sync_committee_contribution_and_proof"] = decode_signed_contribution, + ["data_column_sidecar"] = decode_data_column_sidecar, +} + +local function get_decoder(topic) + if not topic then return nil end + for prefix, decoder in pairs(topic_decoders) do + if topic:find(prefix, 1, true) then return decoder end + end + return nil +end + +--------------------------------------------------------------------------- +-- Post-dissector +--------------------------------------------------------------------------- + +function proto_eth.dissector(tvb, pinfo, tree) + local streams = libp2p.process_streams(pinfo) + for _, st in ipairs(streams) do + if not st.payload or not st.protocol or not st.protocol:find("meshsub") then goto next end + + local payload = st.payload + local prev = st.prev_payload_len + local pos = 1 + + while pos <= #payload do + local rpc_len, consumed = libp2p.decode_varint_str(payload, pos) + if consumed == 0 or rpc_len == 0 or pos + consumed + rpc_len - 1 > #payload then break end + local rpc_start = pos + consumed + local rpc_end = rpc_start + rpc_len - 1 + + if rpc_end > prev then + libp2p.pb_each_str(payload, rpc_start, rpc_end, function(fnum, wtype, dstart, dlen, val) + if fnum ~= 2 or wtype ~= 2 then return end + + local topic, data_str = nil, nil + libp2p.pb_each_str(payload, dstart, dstart + dlen - 1, function(fn2, wt2, ds2, dl2, v2) + if fn2 == 2 and wt2 == 2 then data_str = payload:sub(ds2, ds2 + dl2 - 1) end + if fn2 == 4 and wt2 == 2 then topic = payload:sub(ds2, ds2 + dl2 - 1) end + end) + + if not data_str or not topic then return end + local decoder = get_decoder(topic) + if not decoder then return end + + local ssz_data, err = snappy_decompress(data_str) + if not ssz_data then + local et = tree:add(proto_eth, tvb(), "Ethereum Consensus [" .. topic .. "]") + et:add("Snappy decompress error: " .. (err or "unknown")) + return + end + + local et = tree:add(proto_eth, tvb(), "Ethereum Consensus [" .. topic .. "]") + et:add(string.format("Compressed: %d bytes, Uncompressed: %d bytes", #data_str, #ssz_data)) + decoder(ssz_data, et) + end) + end + + pos = rpc_end + 1 + end + ::next:: + end +end + +register_postdissector(proto_eth) diff --git a/dissectors/ethp2p-libp2p/libp2p-common.lua b/dissectors/ethp2p-libp2p/libp2p-common.lua new file mode 100644 index 0000000..e71d011 --- /dev/null +++ b/dissectors/ethp2p-libp2p/libp2p-common.lua @@ -0,0 +1,321 @@ +-- SPDX-License-Identifier: AGPL-3.0-only +-- Importé de https://github.com/ethp2p/wireshark-dissectors (libp2p-common.lua), +-- commit 08356b26fc48506e3ac84fea017ad83e83449409 du 23/03/2026. +-- Licence amont : AGPL-3.0-only (LICENSE amont) — voir README.md. +-- Shared utilities for libp2p Wireshark dissectors. +-- Provides varint decoding, multistream-select parsing, per-stream reassembly, +-- and multiaddr formatting. + +libp2p = libp2p or {} + +--------------------------------------------------------------------------- +-- Varint (operates on raw Lua strings, 1-based indexing) +--------------------------------------------------------------------------- + +function libp2p.decode_varint_str(s, idx) + if not s or idx < 1 or idx > #s then return 0, 0 end + local value = 0 + local shift = 0 + local pos = idx + while pos <= #s do + local b = s:byte(pos) + if not b then return 0, pos - idx end + value = bit.bor(value, bit.lshift(bit.band(b, 0x7F), shift)) + pos = pos + 1 + shift = shift + 7 + if bit.band(b, 0x80) == 0 then + return value, pos - idx + end + if shift >= 35 then break end -- varint too long (>5 bytes for 32-bit) + end + return value, pos - idx +end + +--------------------------------------------------------------------------- +-- Protobuf helper (1-based string indexing) +--------------------------------------------------------------------------- + +function libp2p.pb_each_str(s, from, to, visitor) + if not s or from < 1 or to > #s or from > to then return end + local pos = from + while pos <= to do + local tag, tc = libp2p.decode_varint_str(s, pos) + if tc == 0 then break end + pos = pos + tc + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + if wire_type == 0 then + local val, vc = libp2p.decode_varint_str(s, pos) + if vc == 0 then break end + visitor(field_number, 0, pos, vc, val) + pos = pos + vc + elseif wire_type == 2 then + local dlen, dc = libp2p.decode_varint_str(s, pos) + if dc == 0 then break end + pos = pos + dc + if pos + dlen - 1 > to then break end + visitor(field_number, 2, pos, dlen, nil) + pos = pos + dlen + else + break + end + end +end + +--------------------------------------------------------------------------- +-- Hex formatting +--------------------------------------------------------------------------- + +function libp2p.bytes_to_hex(s) + local hex = {} + for i = 1, #s do hex[i] = string.format("%02x", s:byte(i)) end + return table.concat(hex) +end + +--------------------------------------------------------------------------- +-- Multiaddr formatting +--------------------------------------------------------------------------- + +local multiaddr_codecs = { + [4] = { name = "ip4", size = 4, fmt = function(s, i) return string.format("%d.%d.%d.%d", s:byte(i), s:byte(i+1), s:byte(i+2), s:byte(i+3)) end }, + [6] = { name = "tcp", size = 2, fmt = function(s, i) return tostring(s:byte(i)*256 + s:byte(i+1)) end }, + [273] = { name = "udp", size = 2, fmt = function(s, i) return tostring(s:byte(i)*256 + s:byte(i+1)) end }, + [461] = { name = "quic-v1", size = 0 }, +} + +function libp2p.format_multiaddr(s) + local parts = {} + local pos = 1 + while pos <= #s do + local code, consumed = libp2p.decode_varint_str(s, pos) + pos = pos + consumed + local codec = multiaddr_codecs[code] + if codec then + if codec.size > 0 and pos + codec.size - 1 <= #s then + table.insert(parts, "/" .. codec.name .. "/" .. codec.fmt(s, pos)) + pos = pos + codec.size + elseif codec.size == 0 then + table.insert(parts, "/" .. codec.name) + else break end + else + table.insert(parts, string.format("/0x%x/...", code)) + break + end + end + return table.concat(parts, "") +end + +--------------------------------------------------------------------------- +-- Stream reassembly (post-dissector compatible, multi-pass safe) +-- +-- We pair quic.stream.stream_id with quic.stream_data by index. Both are +-- emitted once per STREAM frame in the packet, so they align 1:1. +-- +-- We do NOT use quic.stream.offset because it is only emitted when the +-- QUIC STREAM frame's O(ffset) bit is set (i.e. offset > 0). When a +-- packet contains multiple STREAM frames and some have offset=0, the +-- offset array is shorter than the id/data arrays and the pairing breaks. +-- Instead we simply append each chunk to the stream buffer in wire order. +-- This is correct as long as Wireshark feeds us frames in order, which +-- it does for post-dissectors. +--------------------------------------------------------------------------- + +-- Per-stream state: { buf, protocol, payload_offset } +libp2p._streams = {} + +-- Per-frame cached stable data (survives across passes): +-- frame_number -> list of { stream_id, protocol, payload, prev_payload_len, buf_hex } +-- buf_hex is the hex string for recreating a Tvb (Tvbs expire between passes). +libp2p._frame_results = {} + +-- Track the highest frame number seen to detect pass resets. +libp2p._max_frame = 0 + +-- Field extractors. +-- quic.stream.offset is only emitted when the QUIC STREAM frame's O bit is set +-- (offset > 0). When a packet has multiple STREAM frames with mixed offset +-- presence, the offset array is shorter than id/data arrays. We handle this +-- by tracking expected offset per stream and using the offset field only for +-- dedup/placement when available. +libp2p._f_sid = Field.new("quic.stream.stream_id") +libp2p._f_soff = Field.new("quic.stream.offset") +libp2p._f_sdata = Field.new("quic.stream_data") +libp2p._f_conn = Field.new("quic.connection.number") + +local function parse_multistream(buf) + if not buf or #buf == 0 then return nil, 1 end + local pos = 1 + local found_ms = false + while pos <= #buf do + local msg_len, consumed = libp2p.decode_varint_str(buf, pos) + if consumed == 0 or msg_len == 0 or pos + consumed + msg_len - 1 > #buf then + return nil, pos + end + local msg = buf:sub(pos + consumed, pos + consumed + msg_len - 1):gsub("\n$", "") + if msg == "/multistream/1.0.0" then + found_ms = true + elseif found_ms and msg:match("^/") then + return msg, pos + consumed + msg_len + else + return nil, pos + end + pos = pos + consumed + msg_len + end + return nil, pos +end + + +function libp2p.process_streams(pinfo) + local frame_num = pinfo.number + + -- Detect pass reset. + if frame_num <= libp2p._max_frame and frame_num == 1 then + libp2p._streams = {} + end + if frame_num > libp2p._max_frame then + libp2p._max_frame = frame_num + end + + -- Return cached results from a prior pass. + local cached = libp2p._frame_results[frame_num] + if cached then return cached end + + -- First pass: read fields and accumulate stream data. + local ids = { libp2p._f_sid() } + local offs = { libp2p._f_soff() } + local datas = { libp2p._f_sdata() } + local conns = { libp2p._f_conn() } + + if #ids == 0 then + libp2p._frame_results[frame_num] = {} + return {} + end + + -- Connection number is per-packet (same for all STREAM frames in one packet). + local conn_num = conns[1] and tostring(conns[1].value) or "?" + + local results = {} + local stable = {} + + for i, id_fld in ipairs(ids) do + local sid = id_fld.value + local data_fld = datas[i] + if not data_fld or not data_fld.range then goto next end + + local key = conn_num .. ":" .. tostring(sid) + local state = libp2p._streams[key] + if not state then + -- buf: the reassembled stream bytes (1-based string) + -- high_water: highest byte offset + 1 we've seen + -- contiguous: highest offset from 0 with no gaps (all bytes received) + -- segments: sorted list of {start, end} (0-based, exclusive end) + -- used to compute contiguous after each insertion + state = { buf = "", protocol = nil, payload_offset = 0, + high_water = 0, contiguous = 0, segments = {} } + libp2p._streams[key] = state + end + + -- Record previous payload length before placing new data. + local prev_pl = 0 + if state.protocol and state.payload_offset > 0 and state.contiguous >= state.payload_offset then + prev_pl = state.contiguous - state.payload_offset + 1 + end + + local new_data = data_fld.range:raw() + local data_len = #new_data + + -- Determine the 0-based stream offset for this data. + -- When #offs == #ids, they're 1:1 aligned. + -- When #offs < #ids, offsets are missing for streams with offset=0. + local data_offset + if #offs == #ids and offs[i] then + data_offset = tonumber(tostring(offs[i].value)) + elseif #offs == 0 then + -- No offsets at all → all are implicit 0, but if we've already + -- received data, this must be the next chunk. + data_offset = state.high_water + else + -- Mixed: fall back to placing at high_water. + if state.high_water == 0 then + data_offset = 0 + else + data_offset = state.high_water + end + end + + local data_end = data_offset + data_len -- exclusive, 0-based + + -- Extend buffer if this data goes beyond current size. + if data_end > #state.buf then + state.buf = state.buf .. string.rep("\0", data_end - #state.buf) + end + + -- Place data at the correct position (overwriting zeros or retransmit data). + -- 0-based data_offset → 1-based string index = data_offset + 1 + state.buf = state.buf:sub(1, data_offset) + .. new_data + .. state.buf:sub(data_end + 1) + + if data_end > state.high_water then + state.high_water = data_end + end + + -- Merge this segment into the sorted segment list to track contiguous range. + local seg = state.segments + local new_seg = {data_offset, data_end} + -- Insert and merge overlapping/adjacent segments. + local merged = {} + local inserted = false + for _, s2 in ipairs(seg) do + if new_seg[1] <= s2[2] and new_seg[2] >= s2[1] then + -- Overlapping or adjacent — merge. + new_seg[1] = math.min(new_seg[1], s2[1]) + new_seg[2] = math.max(new_seg[2], s2[2]) + else + if not inserted and new_seg[2] < s2[1] then + table.insert(merged, new_seg) + inserted = true + end + table.insert(merged, s2) + end + end + if not inserted then + table.insert(merged, new_seg) + end + state.segments = merged + + -- Update contiguous: the end of the first segment if it starts at 0. + if #merged > 0 and merged[1][1] == 0 then + state.contiguous = merged[1][2] + end + + -- Parse multistream-select if not yet done (only from contiguous data). + if not state.protocol and state.contiguous > 0 then + local proto, after = parse_multistream(state.buf:sub(1, state.contiguous)) + if proto then + state.protocol = proto + state.payload_offset = after + end + end + + -- Extract application payload — only up to the contiguous range. + local payload = nil + if state.protocol and state.payload_offset > 0 and state.contiguous >= state.payload_offset then + payload = state.buf:sub(state.payload_offset, state.contiguous) + end + + local entry = { + stream_id = sid, + protocol = state.protocol, + payload = payload, + prev_payload_len = prev_pl, + } + table.insert(stable, entry) + table.insert(results, entry) + + ::next:: + end + + libp2p._frame_results[frame_num] = stable + return results +end diff --git a/dissectors/ethp2p-libp2p/libp2p-gossipsub.lua b/dissectors/ethp2p-libp2p/libp2p-gossipsub.lua new file mode 100644 index 0000000..46b2d79 --- /dev/null +++ b/dissectors/ethp2p-libp2p/libp2p-gossipsub.lua @@ -0,0 +1,188 @@ +-- SPDX-License-Identifier: AGPL-3.0-only +-- Importé de https://github.com/ethp2p/wireshark-dissectors (libp2p-gossipsub.lua), +-- commit 08356b26fc48506e3ac84fea017ad83e83449409 du 23/03/2026. +-- Licence amont : AGPL-3.0-only (LICENSE amont) — voir README.md. +-- Wireshark Lua dissector for libp2p GossipSub (/meshsub/1.x.0, /floodsub/1.0.0) +-- Uses stream reassembly from libp2p-common.lua. + +if not libp2p or not libp2p._loaded then + local script_dir = debug.getinfo(1, "S").source:match("@?(.*/)") or "" + dofile(script_dir .. "libp2p-common.lua") + libp2p._loaded = true +end + +local proto_gs = Proto("libp2p_gossipsub", "libp2p GossipSub") + +proto_gs.fields = {} + +local gossipsub_protocols = {} +for _, p in ipairs({ + "/meshsub/1.0.0", "/meshsub/1.1.0", "/meshsub/1.2.0", "/meshsub/1.3.0", + "/floodsub/1.0.0", +}) do gossipsub_protocols[p] = true end + +local function dissect_subopts(s, from, to, tree) + local subtree = tree:add("Subscription") + local subscribe_val, topic_val = nil, nil + libp2p.pb_each_str(s, from, to, function(fnum, wtype, dstart, dlen, val) + if fnum == 1 and wtype == 0 then + subscribe_val = (val ~= 0) + subtree:add("Subscribe: " .. tostring(subscribe_val)) + elseif fnum == 2 and wtype == 2 then + topic_val = s:sub(dstart, dstart + dlen - 1) + subtree:add("Topic ID: " .. topic_val) + end + end) + local action = subscribe_val and "SUBSCRIBE" or "UNSUBSCRIBE" + subtree:set_text(string.format("Subscription: %s %s", action, topic_val or "")) + return action, topic_val +end + +local function dissect_message(s, from, to, tree) + local subtree = tree:add("Message") + local topic_val = nil + local data_len = nil + libp2p.pb_each_str(s, from, to, function(fnum, wtype, dstart, dlen, val) + if wtype ~= 2 then return end + local raw = s:sub(dstart, dstart + dlen - 1) + if fnum == 1 then + subtree:add("From: " .. libp2p.bytes_to_hex(raw)) + elseif fnum == 2 then + data_len = dlen + subtree:add("Data Length: " .. dlen .. " bytes") + subtree:add("Data: " .. libp2p.bytes_to_hex(raw)) + if raw:match("^[%g%s]+$") then + subtree:add("Data (string): " .. raw) + end + elseif fnum == 3 then + subtree:add("Sequence Number: " .. libp2p.bytes_to_hex(raw)) + elseif fnum == 4 then + topic_val = raw + subtree:add("Topic: " .. raw) + elseif fnum == 5 then + subtree:add("Signature: " .. libp2p.bytes_to_hex(raw)) + elseif fnum == 6 then + subtree:add("Key: " .. libp2p.bytes_to_hex(raw)) + end + end) + local label = string.format("Message [%s]", topic_val or "?") + if data_len then label = label .. string.format(" (%d bytes)", data_len) end + subtree:set_text(label) + return topic_val +end + +local function dissect_control(s, from, to, tree) + local subtree = tree:add("Control") + local parts = {} + libp2p.pb_each_str(s, from, to, function(fnum, wtype, dstart, dlen, val) + if wtype ~= 2 then return end + local inner_from, inner_to = dstart, dstart + dlen - 1 + if fnum == 1 then + local ih_tree = subtree:add("IHAVE") + local topic = nil + libp2p.pb_each_str(s, inner_from, inner_to, function(fn2, wt2, ds2, dl2, v2) + if wt2 ~= 2 then return end + if fn2 == 1 then topic = s:sub(ds2, ds2+dl2-1); ih_tree:add("Topic: " .. topic) + elseif fn2 == 2 then ih_tree:add("Message ID: " .. libp2p.bytes_to_hex(s:sub(ds2, ds2+dl2-1))) + end + end) + table.insert(parts, string.format("IHAVE(%s)", topic or "")) + elseif fnum == 2 then + local iw_tree = subtree:add("IWANT") + libp2p.pb_each_str(s, inner_from, inner_to, function(fn2, wt2, ds2, dl2, v2) + if fn2 == 1 and wt2 == 2 then iw_tree:add("Message ID: " .. libp2p.bytes_to_hex(s:sub(ds2, ds2+dl2-1))) end + end) + table.insert(parts, "IWANT") + elseif fnum == 3 then + local g_tree = subtree:add("GRAFT") + local topic = nil + libp2p.pb_each_str(s, inner_from, inner_to, function(fn2, wt2, ds2, dl2, v2) + if fn2 == 1 and wt2 == 2 then topic = s:sub(ds2, ds2+dl2-1); g_tree:add("Topic: " .. topic) end + end) + table.insert(parts, string.format("GRAFT(%s)", topic or "")) + elseif fnum == 4 then + local p_tree = subtree:add("PRUNE") + local topic = nil + libp2p.pb_each_str(s, inner_from, inner_to, function(fn2, wt2, ds2, dl2, v2) + if fn2 == 1 and wt2 == 2 then topic = s:sub(ds2, ds2+dl2-1); p_tree:add("Topic: " .. topic) + elseif fn2 == 3 and wt2 == 0 then p_tree:add("Backoff: " .. tostring(v2)) + end + end) + table.insert(parts, string.format("PRUNE(%s)", topic or "")) + elseif fnum == 5 then + local idw_tree = subtree:add("IDONTWANT") + libp2p.pb_each_str(s, inner_from, inner_to, function(fn2, wt2, ds2, dl2, v2) + if fn2 == 1 and wt2 == 2 then idw_tree:add("Message ID: " .. libp2p.bytes_to_hex(s:sub(ds2, ds2+dl2-1))) end + end) + table.insert(parts, "IDONTWANT") + end + end) + subtree:set_text("Control: " .. table.concat(parts, ", ")) + return parts +end + +local function dissect_rpc(s, from, to, tree) + local rpc_tree = tree:add("RPC") + local summary_parts = {} + libp2p.pb_each_str(s, from, to, function(fnum, wtype, dstart, dlen, val) + if wtype ~= 2 then return end + local inner_to = dstart + dlen - 1 + if fnum == 1 then + local action, topic = dissect_subopts(s, dstart, inner_to, rpc_tree) + table.insert(summary_parts, string.format("%s(%s)", action or "SUB", topic or "?")) + elseif fnum == 2 then + local topic = dissect_message(s, dstart, inner_to, rpc_tree) + table.insert(summary_parts, string.format("PUBLISH(%s)", topic or "?")) + elseif fnum == 3 then + local ctrl_parts = dissect_control(s, dstart, inner_to, rpc_tree) + for _, p in ipairs(ctrl_parts) do table.insert(summary_parts, p) end + end + end) + local summary = table.concat(summary_parts, ", ") + rpc_tree:set_text("RPC: " .. summary) + return summary +end + +function proto_gs.dissector(tvb, pinfo, tree) + local streams = libp2p.process_streams(pinfo) + for _, st in ipairs(streams) do + if not gossipsub_protocols[st.protocol] then goto next end + + if not st.payload or #st.payload == 0 then + local subtree = tree:add(proto_gs, tvb(), "libp2p GossipSub [" .. st.protocol .. "]") + pinfo.cols.protocol:set("GOSSIPSUB") + pinfo.cols.info:set("GossipSub (negotiation)") + goto next + end + + local payload = st.payload + local prev = st.prev_payload_len + local pos = 1 + local last_summary = nil + + while pos <= #payload do + local rpc_len, consumed = libp2p.decode_varint_str(payload, pos) + if consumed == 0 or rpc_len == 0 or pos + consumed + rpc_len - 1 > #payload then + break + end + local rpc_start = pos + consumed + local rpc_end = rpc_start + rpc_len - 1 + + if rpc_end > prev then + local subtree = tree:add(proto_gs, tvb(), "libp2p GossipSub [" .. st.protocol .. "]") + last_summary = dissect_rpc(payload, rpc_start, rpc_end, subtree) + end + + pos = rpc_end + 1 + end + + if last_summary then + pinfo.cols.protocol:set("GOSSIPSUB") + pinfo.cols.info:set("GossipSub " .. last_summary) + end + + ::next:: + end +end + +register_postdissector(proto_gs) diff --git a/dissectors/ethp2p-libp2p/libp2p-identify.lua b/dissectors/ethp2p-libp2p/libp2p-identify.lua new file mode 100644 index 0000000..a885f09 --- /dev/null +++ b/dissectors/ethp2p-libp2p/libp2p-identify.lua @@ -0,0 +1,81 @@ +-- SPDX-License-Identifier: AGPL-3.0-only +-- Importé de https://github.com/ethp2p/wireshark-dissectors (libp2p-identify.lua), +-- commit 08356b26fc48506e3ac84fea017ad83e83449409 du 23/03/2026. +-- Licence amont : AGPL-3.0-only (LICENSE amont) — voir README.md. +-- Wireshark Lua dissector for libp2p Identify protocol (/ipfs/id/1.0.0) +-- Uses stream reassembly from libp2p-common.lua. + +if not libp2p or not libp2p._loaded then + local script_dir = debug.getinfo(1, "S").source:match("@?(.*/)") or "" + dofile(script_dir .. "libp2p-common.lua") + libp2p._loaded = true +end + +local proto_id = Proto("libp2p_identify", "libp2p Identify") + +proto_id.fields = {} + +local identify_protocols = { + ["/ipfs/id/1.0.0"] = true, + ["/ipfs/id/push/1.0.0"] = true, +} + +local function dissect_identify_pb(s, from, to, tree) + libp2p.pb_each_str(s, from, to, function(fnum, wtype, dstart, dlen, val) + if wtype ~= 2 then return end + local raw = s:sub(dstart, dstart + dlen - 1) + if fnum == 1 then + tree:add("Public Key: " .. libp2p.bytes_to_hex(raw)) + elseif fnum == 2 then + tree:add("Listen Address: " .. libp2p.format_multiaddr(raw)) + elseif fnum == 3 then + tree:add("Protocol: " .. raw) + elseif fnum == 4 then + tree:add("Observed Address: " .. libp2p.format_multiaddr(raw)) + elseif fnum == 5 then + tree:add("Protocol Version: " .. raw) + elseif fnum == 6 then + tree:add("Agent Version: " .. raw) + elseif fnum == 8 then + tree:add("Signed Peer Record: " .. libp2p.bytes_to_hex(raw)) + end + end) +end + +function proto_id.dissector(tvb, pinfo, tree) + local streams = libp2p.process_streams(pinfo) + for _, s in ipairs(streams) do + if not identify_protocols[s.protocol] then goto next end + + if not s.payload or #s.payload == 0 then + local subtree = tree:add(proto_id, tvb(), "libp2p Identify [" .. s.protocol .. "]") + pinfo.cols.protocol:set("LIBP2P-ID") + pinfo.cols.info:set("Identify (negotiation)") + goto next + end + + local payload = s.payload + local pos = 1 + while pos <= #payload do + local pb_len, consumed = libp2p.decode_varint_str(payload, pos) + if consumed == 0 or pb_len == 0 or pos + consumed + pb_len - 1 > #payload then + break + end + local pb_start = pos + consumed + local pb_end = pb_start + pb_len - 1 + + local subtree = tree:add(proto_id, tvb(), "libp2p Identify [" .. s.protocol .. "]") + local id_tree = subtree:add("Identify Message") + dissect_identify_pb(payload, pb_start, pb_end, id_tree) + + pinfo.cols.protocol:set("LIBP2P-ID") + pinfo.cols.info:set("Identify") + + pos = pb_end + 1 + end + + ::next:: + end +end + +register_postdissector(proto_id) diff --git a/dissectors/ethp2p-libp2p/test2-keys.log b/dissectors/ethp2p-libp2p/test2-keys.log new file mode 100644 index 0000000..48d00b2 --- /dev/null +++ b/dissectors/ethp2p-libp2p/test2-keys.log @@ -0,0 +1,4 @@ +CLIENT_HANDSHAKE_TRAFFIC_SECRET 93026378f2caeae0c2ad37a85437c0544487a7a8cd0b1fbd7d20114329f5ac98 93f7d79992cad12e6d995a3c3a6f057afd39a1e097c1bb552e12583389b4c31f +SERVER_HANDSHAKE_TRAFFIC_SECRET 93026378f2caeae0c2ad37a85437c0544487a7a8cd0b1fbd7d20114329f5ac98 575d8f8f2e93c22dd0e098d71f8ecc1a352a41c4ed3b6789de33e56f7d45e274 +CLIENT_TRAFFIC_SECRET_0 93026378f2caeae0c2ad37a85437c0544487a7a8cd0b1fbd7d20114329f5ac98 40e18d5fca8d665f4018982e6894a7ec7863d494873d9cebb5cbf42a1e90fed0 +SERVER_TRAFFIC_SECRET_0 93026378f2caeae0c2ad37a85437c0544487a7a8cd0b1fbd7d20114329f5ac98 10993ac76dcc298e250c6cf5b88ee3ebbe5e03ff40a8079a0e56bb919d47e541 diff --git a/dissectors/ethp2p-libp2p/test2.pcap b/dissectors/ethp2p-libp2p/test2.pcap new file mode 100644 index 0000000..a6b0df1 Binary files /dev/null and b/dissectors/ethp2p-libp2p/test2.pcap differ diff --git a/dissectors/eufy-security/README.md b/dissectors/eufy-security/README.md new file mode 100644 index 0000000..324490f --- /dev/null +++ b/dissectors/eufy-security/README.md @@ -0,0 +1,49 @@ +# Eufy Security (caméras, protocole P2P local) + +Dissecteur Wireshark Lua du **protocole P2P UDP des équipements Eufy +Security** (caméras et HomeBase d'Anker), dérivé de PPPP : types de +messages (requêtes / réponses STUN, LOOKUP, LOCAL_LOOKUP, CHECK_CAM, +DATA, ACK, PING / PONG, fin de session), types de données et codes +d'erreur PPCS, contenu des messages DATA (commandes connues de +l'application). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/JanLoebel/eufy-node-client (fichier `wireshark/eufy_dissector.lua`) | +| Commit importé | `041375a1aca695353cb7d887d99c75184a7805ce` du 06/04/2021 (branche `master`, dernier commit ; dernière modification du dissecteur : `acda734` du 19/12/2020) | +| Licence amont | MIT — déclarée par l'auteur (Jan Löbel) dans `package.json` (`"license": "MIT"`) ; pas de fichier LICENSE ni d'en-tête de licence dans le fichier Lua | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Eufy natif | + +Le paquet npm `eufy-node-client` ne restreint pas les fichiers publiés +(pas de champ `files`) : la déclaration MIT couvre l'ensemble du dépôt, y +compris `wireshark/`. L'amont ne fournit pas de texte de licence : texte de +référence de la licence MIT : https://spdx.org/licenses/MIT.html — à +reproduire avec la mention « Copyright (c) Jan Löbel » en cas de +redistribution. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `eufy_dissector.lua` | Dissecteur `eufySecurity` (UDP), fins de ligne CRLF d'origine conservées | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `eufy_dissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `eufysecurity`. + +## Remarques + +- Le script s'enregistre sur la plage UDP `20000-69999` : elle dépasse le + port maximal (65535) et capte tout le trafic UDP de 20000 à 65535, avec + de nombreux faux positifs possibles ; à restreindre localement si besoin + (fichier conservé tel quel ; comportement non vérifié). +- Variables globales (`messages`, `dataTypes`, `udp_table`…) comme dans + l'amont, susceptibles d'entrer en collision avec d'autres scripts. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/eufy-security/eufy_dissector.lua b/dissectors/eufy-security/eufy_dissector.lua new file mode 100644 index 0000000..896070e --- /dev/null +++ b/dissectors/eufy-security/eufy_dissector.lua @@ -0,0 +1,668 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/JanLoebel/eufy-node-client (wireshark/eufy_dissector.lua), +-- commit 041375a1aca695353cb7d887d99c75184a7805ce du 06/04/2021. +-- Licence amont : MIT — voir README.md. +messages = { + [0xf100] = "STUN request", + [0xf101] = "STUN response", + [0xf1d0] = "DATA", + [0xf1d1] = "ACK", + [0xf1e0] = "PING", + [0xf1e1] = "PONG", + [0xf1f0] = "Session END", + + -- Eufy specific ones + [0xf126] = "LOOKUP_WITH_DSK request", + [0xf130] = "LOCAL_LOOKUP request", + [0xf121] = "LOOKUP response", + [0xf140] = "LOOKUP_ADDR response", + [0xf141] = "CHECK_CAM request / LOCAL_LOOKUP_RESP response", + [0xf142] = "CAM_ID response", +} + +dataTypes = { + [0xd100] = "DATA", + [0xd101] = "VIDEO", + [0xd102] = "CONTROL", + [0xd103] = "BINARY", +} + +commandIds = { + [1158] = "ARM_DELAY_AWAY", + [1159] = "ARM_DELAY_CUS1", + [1160] = "ARM_DELAY_CUS2", + [1161] = "ARM_DELAY_CUS3", + [1157] = "ARM_DELAY_HOME", + [1278] = "AUTOMATION_DATA", + [1165] = "AUTOMATION_ID_LIST", + [1167] = "CMD_ALARM_DELAY_AWAY", + [1168] = "CMD_ALARM_DELAY_CUSTOM1", + [1169] = "CMD_ALARM_DELAY_CUSTOM2", + [1170] = "CMD_ALARM_DELAY_CUSTOM3", + [1166] = "CMD_ALARM_DELAY_HOME", + [1017] = "CMD_AUDDEC_SWITCH", + [1301] = "CMD_AUDIO_FRAME", + [1049] = "CMD_BATCH_RECORD", + [1702] = "CMD_BAT_DOORBELL_CHIME_SWITCH", + [1703] = "CMD_BAT_DOORBELL_MECHANICAL_CHIME_SWITCH", + [1706] = "CMD_BAT_DOORBELL_QUICK_RESPONSE", + [1709] = "CMD_BAT_DOORBELL_SET_ELECTRONIC_RINGTONE_TIME", + [1716] = "CMD_BAT_DOORBELL_SET_LED_ENABLE", + [1710] = "CMD_BAT_DOORBELL_SET_NOTIFICATION_MODE", + [1708] = "CMD_BAT_DOORBELL_SET_RINGTONE_VOLUME", + [1707] = "CMD_BAT_DOORBELL_UPDATE_QUICK_RESPONSE", + [1705] = "CMD_BAT_DOORBELL_VIDEO_QUALITY", + [1704] = "CMD_BAT_DOORBELL_WDR_SWITCH", + [1000] = "CMD_BIND_BROADCAST", + [1001] = "CMD_BIND_SYNC_ACCOUNT_INFO", + [1054] = "CMD_BIND_SYNC_ACCOUNT_INFO_EX", + [1103] = "CMD_CAMERA_INFO", + [1030] = "CMD_CHANGE_PWD", + [1031] = "CMD_CHANGE_WIFI_PWD", + [1018] = "CMD_CLOSE_AUDDEC", + [1046] = "CMD_CLOSE_DEV_LED", + [1016] = "CMD_CLOSE_EAS", + [1014] = "CMD_CLOSE_IRCUT", + [1012] = "CMD_CLOSE_PIR", + [1047] = "CMD_COLLECT_RECORD", + [1303] = "CMD_CONVERT_MP4_OK", + [1048] = "CMD_DECOLLECT_RECORD", + [1027] = "CMD_DELLETE_RECORD", + [1234] = "CMD_DEL_FACE_PHOTO", + [1232] = "CMD_DEL_USER_PHOTO", + [1038] = "CMD_DEVS_BIND_BROADCASE", + [1039] = "CMD_DEVS_BIND_NOTIFY", + [1019] = "CMD_DEVS_LOCK", + [1035] = "CMD_DEVS_SWITCH", + [1037] = "CMD_DEVS_TO_FACTORY", + [1040] = "CMD_DEVS_UNBIND", + [1020] = "CMD_DEVS_UNLOCK", + [1045] = "CMD_DEV_LED_SWITCH", + [1252] = "CMD_DEV_PUSHMSG_MODE", + [1251] = "CMD_DEV_RECORD_AUTOSTOP", + [1250] = "CMD_DEV_RECORD_INTERVAL", + [1249] = "CMD_DEV_RECORD_TIMEOUT", + [1304] = "CMD_DOENLOAD_FINISH", + [1701] = "CMD_DOORBELL_NOTIFY_PAYLOAD", + [1700] = "CMD_DOORBELL_SET_PAYLOAD", + [1506] = "CMD_DOOR_SENSOR_ALARM_ENABLE", + [1503] = "CMD_DOOR_SENSOR_DOOR_EVT", + [1505] = "CMD_DOOR_SENSOR_ENABLE_LED", + [1502] = "CMD_DOOR_SENSOR_GET_DOOR_STATE", + [1501] = "CMD_DOOR_SENSOR_GET_INFO", + [1500] = "CMD_DOOR_SENSOR_INFO_REPORT", + [1504] = "CMD_DOOR_SENSOR_LOW_POWER_REPORT", + [1051] = "CMD_DOWNLOAD_CANCEL", + [1024] = "CMD_DOWNLOAD_VIDEO", + [1015] = "CMD_EAS_SWITCH", + [1552] = "CMD_ENTRY_SENSOR_BAT_STATE", + [1551] = "CMD_ENTRY_SENSOR_CHANGE_TIME", + [1550] = "CMD_ENTRY_SENSOR_STATUS", + [902] = "CMD_FLOODLIGHT_BROADCAST", + [1029] = "CMD_FORMAT_SD", + [1053] = "CMD_FORMAT_SD_PROGRESS", + [1100] = "CMD_GATEWAYINFO", + [1259] = "CMD_GEO_ADD_USER_INFO", + [1261] = "CMD_GEO_DEL_USER_INFO", + [1258] = "CMD_GEO_SET_USER_STATUS", + [1262] = "CMD_GEO_UPDATE_LOC_SETTING", + [1260] = "CMD_GEO_UPDATE_USER_INFO", + [1122] = "CMD_GET_ADMIN_PWD", + [1151] = "CMD_GET_ALARM_MODE", + [1107] = "CMD_GET_ARMING_INFO", + [1108] = "CMD_GET_ARMING_STATUS", + [1109] = "CMD_GET_AUDDEC_INFO", + [1110] = "CMD_GET_AUDDEC_SENSITIVITY", + [1111] = "CMD_GET_AUDDE_CSTATUS", + [1239] = "CMD_GET_AWAY_ACTION", + [1101] = "CMD_GET_BATTERY", + [1138] = "CMD_GET_BATTERY_TEMP", + [1119] = "CMD_GET_CAMERA_LOCK", + [1136] = "CMD_GET_CHARGE_STATUS", + [1148] = "CMD_GET_CUSTOM1_ACTION", + [1149] = "CMD_GET_CUSTOM2_ACTION", + [1150] = "CMD_GET_CUSTOM3_ACTION", + [1164] = "CMD_GET_DELAY_ALARM", + [1152] = "CMD_GET_DEVICE_PING", + [1129] = "CMD_GET_DEVS_NAME", + [1274] = "CMD_GET_DEVS_RSSI_LIST", + [1131] = "CMD_GET_DEV_STATUS", + [1127] = "CMD_GET_DEV_TONE_INFO", + [1134] = "CMD_GET_DEV_UPGRADE", + [1118] = "CMD_GET_EAS_STATUS", + [1124] = "CMD_GET_EXCEPTION_LOG", + [1405] = "CMD_GET_FLOODLIGHT_WIFI_LIST", + [1120] = "CMD_GET_GATEWAY_LOCK", + [1225] = "CMD_GET_HOME_ACTION", + [1176] = "CMD_GET_HUB_LAN_IP", + [1132] = "CMD_GET_HUB_LOG", + [1140] = "CMD_GET_HUB_LOGIG", + [1128] = "CMD_GET_HUB_NAME", + [1137] = "CMD_GET_HUB_POWWER_SUPPLY", + [1126] = "CMD_GET_HUB_TONE_INFO", + [1133] = "CMD_GET_HUB_UPGRADE", + [1114] = "CMD_GET_IRCUTSENSITIVITY", + [1113] = "CMD_GET_IRMODE", + [1105] = "CMD_GET_MDETECT_PARAM", + [1112] = "CMD_GET_MIRRORMODE", + [1125] = "CMD_GET_NEWVESION", + [1177] = "CMD_GET_OFF_ACTION", + [1130] = "CMD_GET_P2P_CONN_STATUS", + [1116] = "CMD_GET_PIRCTRL", + [1115] = "CMD_GET_PIRINFO", + [1117] = "CMD_GET_PIRSENSITIVITY", + [1104] = "CMD_GET_RECORD_TIME", + [1270] = "CMD_GET_REPEATER_CONN_TEST_RESULT", + [1266] = "CMD_GET_REPEATER_RSSI", + [1263] = "CMD_GET_REPEATER_SITE_LIST", + [1163] = "CMD_GET_START_HOMEKIT", + [1141] = "CMD_GET_SUB1G_RSSI", + [1143] = "CMD_GET_TFCARD_FORMAT_STATUS", + [1153] = "CMD_GET_TFCARD_REPAIR_STATUS", + [1135] = "CMD_GET_TFCARD_STATUS", + [1121] = "CMD_GET_UPDATE_STATUS", + [1043] = "CMD_GET_UPGRADE_RESULT", + [1268] = "CMD_GET_WAN_LINK_STATUS", + [1265] = "CMD_GET_WAN_MODE", + [1123] = "CMD_GET_WIFI_PWD", + [1142] = "CMD_GET_WIFI_RSSI", + [1281] = "CMD_HUB_ALARM_TONE", + [1800] = "CMD_HUB_CLEAR_EMMC_VOLUME", + [1282] = "CMD_HUB_NOTIFY_ALARM", + [1283] = "CMD_HUB_NOTIFY_MODE", + [1034] = "CMD_HUB_REBOOT", + [1036] = "CMD_HUB_TO_FACTORY", + [1013] = "CMD_IRCUT_SWITCH", + [1653] = "CMD_KEYPAD_BATTERY_CAP_STATE", + [1655] = "CMD_KEYPAD_BATTERY_CHARGER_STATE", + [1654] = "CMD_KEYPAD_BATTERY_TEMP_STATE", + [1657] = "CMD_KEYPAD_GET_PASSWORD", + [1662] = "CMD_KEYPAD_GET_PASSWORD_LIST", + [1670] = "CMD_KEYPAD_IS_PSW_SET", + [1664] = "CMD_KEYPAD_PSW_OPEN", + [1660] = "CMD_KEYPAD_SET_CUSTOM_MAP", + [1650] = "CMD_KEYPAD_SET_PASSWORD", + [1172] = "CMD_LEAVING_DELAY_AWAY", + [1173] = "CMD_LEAVING_DELAY_CUSTOM1", + [1174] = "CMD_LEAVING_DELAY_CUSTOM2", + [1175] = "CMD_LEAVING_DELAY_CUSTOM3", + [1171] = "CMD_LEAVING_DELAY_HOME", + [1056] = "CMD_LIVEVIEW_LED_SWITCH", + [1106] = "CMD_MDETECTINFO", + [1601] = "CMD_MOTION_SENSOR_BAT_STATE", + [1607] = "CMD_MOTION_SENSOR_ENABLE_LED", + [1613] = "CMD_MOTION_SENSOR_ENTER_USER_TEST_MODE", + [1610] = "CMD_MOTION_SENSOR_EXIT_USER_TEST_MODE", + [1605] = "CMD_MOTION_SENSOR_PIR_EVT", + [1611] = "CMD_MOTION_SENSOR_SET_CHIRP_TONE", + [1609] = "CMD_MOTION_SENSOR_SET_PIR_SENSITIVITY", + [1612] = "CMD_MOTION_SENSOR_WORK_MODE", + [1145] = "CMD_NAS_SWITCH", + [1146] = "CMD_NAS_TEST", + [1351] = "CMD_NOTIFY_PAYLOAD", + [1044] = "CMD_P2P_DISCONNECT", + [1139] = "CMD_PING", + [1011] = "CMD_PIR_SWITCH", + [1041] = "CMD_RECORDDATE_SEARCH", + [1042] = "CMD_RECORDLIST_SEARCH", + [1366] = "CMD_RECORD_AUDIO_SWITCH", + [1021] = "CMD_RECORD_IMG", + [1022] = "CMD_RECORD_IMG_STOP", + [1026] = "CMD_RECORD_PLAY_CTRL", + [1025] = "CMD_RECORD_VIEW", + [1058] = "CMD_REPAIR_PROGRESS", + [1057] = "CMD_REPAIR_SD", + [1269] = "CMD_REPEATER_RSSI_TEST", + [1102] = "CMD_SDINFO", + [1144] = "CMD_SDINFO_EX", + [1507] = "CMD_SENSOR_SET_CHIRP_TONE", + [1508] = "CMD_SENSOR_SET_CHIRP_VOLUME", + [1242] = "CMD_SET_AI_NICKNAME", + [1231] = "CMD_SET_AI_PHOTO", + [1236] = "CMD_SET_AI_SWITCH", + [1255] = "CMD_SET_ALL_ACTION", + [1224] = "CMD_SET_ARMING", + [1211] = "CMD_SET_ARMING_SCHEDULE", + [1237] = "CMD_SET_AS_SERVER", + [1212] = "CMD_SET_AUDDEC_INFO", + [1213] = "CMD_SET_AUDDEC_SENSITIVITY", + [1227] = "CMD_SET_AUDIOSENSITIVITY", + [1367] = "CMD_SET_AUTO_DELETE_RECORD", + [1206] = "CMD_SET_BITRATE", + [1256] = "CMD_SET_CUSTOM_MODE", + [1217] = "CMD_SET_DEVS_NAME", + [1214] = "CMD_SET_DEVS_OSD", + [1202] = "CMD_SET_DEVS_TONE_FILE", + [1273] = "CMD_SET_DEV_MD_RECORD", + [1240] = "CMD_SET_DEV_MIC_MUTE", + [1229] = "CMD_SET_DEV_MIC_VOLUME", + [1241] = "CMD_SET_DEV_SPEAKER_MUTE", + [1230] = "CMD_SET_DEV_SPEAKER_VOLUME", + [1228] = "CMD_SET_DEV_STORAGE_TYPE", + [1401] = "CMD_SET_FLOODLIGHT_BRIGHT_VALUE", + [1407] = "CMD_SET_FLOODLIGHT_DETECTION_AREA", + [1404] = "CMD_SET_FLOODLIGHT_LIGHT_SCHEDULE", + [1400] = "CMD_SET_FLOODLIGHT_MANUAL_SWITCH", + [1402] = "CMD_SET_FLOODLIGHT_STREET_LAMP", + [1403] = "CMD_SET_FLOODLIGHT_TOTAL_SWITCH", + [1406] = "CMD_SET_FLOODLIGHT_WIFI_CONNECT", + [1226] = "CMD_SET_GSSENSITIVITY", + [1280] = "CMD_SET_HUB_ALARM_AUTO_END", + [1279] = "CMD_SET_HUB_ALARM_CLOSE", + [1222] = "CMD_SET_HUB_AUDEC_STATUS", + [1220] = "CMD_SET_HUB_GS_STATUS", + [1219] = "CMD_SET_HUB_IRCUT_STATUS", + [1221] = "CMD_SET_HUB_MVDEC_STATUS", + [1216] = "CMD_SET_HUB_NAME", + [1253] = "CMD_SET_HUB_OSD", + [1218] = "CMD_SET_HUB_PIR_STATUS", + [1235] = "CMD_SET_HUB_SPK_VOLUME", + [1208] = "CMD_SET_IRMODE", + [1254] = "CMD_SET_JSON_SCHEDULE", + [1200] = "CMD_SET_LANGUAGE", + [1412] = "CMD_SET_LIGHT_CTRL_BRIGHT_PIR", + [1413] = "CMD_SET_LIGHT_CTRL_BRIGHT_SCH", + [1410] = "CMD_SET_LIGHT_CTRL_LAMP_VALUE", + [1408] = "CMD_SET_LIGHT_CTRL_PIR_SWITCH", + [1409] = "CMD_SET_LIGHT_CTRL_PIR_TIME", + [1415] = "CMD_SET_LIGHT_CTRL_SUNRISE_INFO", + [1414] = "CMD_SET_LIGHT_CTRL_SUNRISE_SWITCH", + [1411] = "CMD_SET_LIGHT_CTRL_TRIGGER", + [1204] = "CMD_SET_MDETECTPARAM", + [1272] = "CMD_SET_MDSENSITIVITY", + [1207] = "CMD_SET_MIRRORMODE", + [1276] = "CMD_SET_MOTION_SENSITIVITY", + [1277] = "CMD_SET_NIGHT_VISION_TYPE", + [1248] = "CMD_SET_NOTFACE_PUSHMSG", + [1350] = "CMD_SET_PAYLOAD", + [1210] = "CMD_SET_PIRSENSITIVITY", + [1209] = "CMD_SET_PIR_INFO", + [1246] = "CMD_SET_PIR_POWERMODE", + [1243] = "CMD_SET_PIR_TEST_MODE", + [1233] = "CMD_SET_PRI_ACTION", + [1203] = "CMD_SET_RECORDTIME", + [1264] = "CMD_SET_REPEATER_PARAMS", + [1205] = "CMD_SET_RESOLUTION", + [1257] = "CMD_SET_SCHEDULE_DEFAULT", + [1271] = "CMD_SET_SNOOZE_MODE", + [1223] = "CMD_SET_STORGE_TYPE", + [1247] = "CMD_SET_TELNET", + [1215] = "CMD_SET_TIMEZONE", + [1201] = "CMD_SET_TONE_FILE", + [1238] = "CMD_SET_UPGRADE", + [1028] = "CMD_SNAPSHOT", + [1003] = "CMD_START_REALTIME_MEDIA", + [1009] = "CMD_START_RECORD", + [900] = "CMD_START_REC_BROADCASE", + [1005] = "CMD_START_TALKBACK", + [1007] = "CMD_START_VOICECALL", + [1004] = "CMD_STOP_REALTIME_MEDIA", + [1010] = "CMD_STOP_RECORD", + [901] = "CMD_STOP_REC_BROADCASE", + [1023] = "CMD_STOP_SHARE", + [1006] = "CMD_STOP_TALKBACK", + [1008] = "CMD_STOP_VOICECALL", + [1302] = "CMD_STREAM_MSG", + [1050] = "CMD_STRESS_TEST_OPER", + [1033] = "CMD_TIME_SYCN", + [1002] = "CMD_UNBIND_ACCOUNT", + [1300] = "CMD_VIDEO_FRAME", + [1032] = "CMD_WIFI_CONFIG", + [1162] = "CMD_SWITCH_TIME", + [6056] = "CMD_BATTERY_FALSE_EVENT_COUNT", + [6024] = "CMD_INDOOR_AI_CRYING_ENABLE", + [6023] = "CMD_INDOOR_AI_MOTION_ENABLE", + [6022] = "CMD_INDOOR_AI_PERSON_ENABLE", + [6026] = "CMD_INDOOR_AI_PET_ENABLE", + [6025] = "CMD_INDOOR_AI_SOUND_ENABLE", + [6013] = "CMD_INDOOR_CONTINUE_RECORD_SCHEDULE", + [6042] = "CMD_INDOOR_DET_SET_ACTIVE_ZONE", + [6040] = "CMD_INDOOR_DET_SET_MOTION_DETECT_ENABLE", + [6045] = "CMD_INDOOR_DET_SET_MOTION_DETECT_TYPE", + [6041] = "CMD_INDOOR_DET_SET_MOTION_SENSITIVITY_IDX", + [6047] = "CMD_INDOOR_DET_SET_PET_ENABLE", + [6048] = "CMD_INDOOR_DET_SET_PET_EXPEL_RESPONSOR", + [6049] = "CMD_INDOOR_DET_SET_PET_EXPEL_RESP_IDX", + [6043] = "CMD_INDOOR_DET_SET_SOUND_DETECT_ENABLE", + [6046] = "CMD_INDOOR_DET_SET_SOUND_DETECT_TYPE", + [6044] = "CMD_INDOOR_DET_SET_SOUND_SENSITIVITY_IDX", + [6053] = "CMD_INDOOR_EVENT_COUNT", + [6061] = "CMD_INDOOR_HK_ACTIVE_HOMEKIT", + [6062] = "CMD_INDOOR_HK_GET_HK_BIND_STATUS", + [6014] = "CMD_INDOOR_LED_SWITCH", + [6050] = "CMD_INDOOR_NAS_STORAGE_TYPE", + [6052] = "CMD_INDOOR_OWNER_STREAM_TYPE", + [6017] = "CMD_INDOOR_PAN_CALIBRATION", + [6016] = "CMD_INDOOR_PAN_MOTION_TRACK", + [6015] = "CMD_INDOOR_PAN_SPEED", + [6021] = "CMD_INDOOR_PUSH_JUMP_TYPE", + [6020] = "CMD_INDOOR_PUSH_NOTIFY_TYPE", + [6010] = "CMD_INDOOR_SET_CONTINUE_ENABLE", + [6011] = "CMD_INDOOR_SET_CONTINUE_TYPE", + [6012] = "CMD_INDOOR_SET_RECORD_AUDIO_ENABLE", + [6054] = "CMD_INDOOR_SHOW_SDCARD", + [6051] = "CMD_INDOOR_TFCARD_NAS_STATUS", + [6072] = "CMD_IN_TEST_MODE", + [1055] = "CMD_PLAY_BACK_EVENT_STOP", + [6071] = "CMD_SET_DETECT_TYPE", + [6070] = "CMD_SET_PIR_SENSITIVITY", + [6001] = "CMD_SMARTLOCK_QUERY_BATTERY_LEVEL", + [6000] = "CMD_SMARTLOCK_QUERY_STATUS", + [2109] = "CMD_SUB1G_REP_BIND_FAILED", + [2108] = "CMD_SUB1G_REP_CHARGE_STATE", + [2110] = "CMD_SUB1G_REP_POWER_OFF", + [2107] = "CMD_SUB1G_REP_RUNTIME_STATE", + [2111] = "CMD_SUB1G_REP_UNPLUG_POWER_LINE", +} + +errorCodes = { + [-304] = "ERROR_BIND_CLIENT_SOCKET_CREATE_FAIL", + [-307] = "ERROR_BIND_CLIENT_SOCKET_RECEIVE_LEN_ERROR", + [-306] = "ERROR_BIND_CLIENT_SOCKET_RECEIVE_TIMEOUT", + [-305] = "ERROR_BIND_CLIENT_SOCKET_SEND_FAIL", + [-309] = "ERROR_BIND_COMMAND_ERROR", + [-308] = "ERROR_BIND_PARAM_NULL", + [-303] = "ERROR_BROADCAST_RECEIVE_SN_NULL", + [-302] = "ERROR_BROADCAST_RECEIVE_TIME_OUT", + [-300] = "ERROR_BROADCAST_START_ALREADY_RUNNING", + [-301] = "ERROR_BROADCAST_STOP_SOCKET_FD_ERROR", + [-143] = "ERROR_CLOSE_HOMEKIT", + [-133] = "ERROR_COMMAND_TIMEOUT", + [-134] = "ERROR_CONNECT_TIMEOUT", + [-114] = "ERROR_DEV_BUSY", + [-128] = "ERROR_DEV_CLOSE", + [-109] = "ERROR_DEV_OFFLINE", + [-113] = "ERROR_DEV_UPDATEING", + [-120] = "ERROR_GET_EXEC_RESULT", + [-101] = "ERROR_HAVE_CONNECT", + [-121] = "ERROR_HIGHT_TEMPERATURE", + [-125] = "ERROR_HUB_NON_ADMIN", + [-112] = "ERROR_HUB_UPDATEING", + [-104] = "ERROR_INVALID_ACCOUNT", + [-103] = "ERROR_INVALID_COMMAND", + [-110] = "ERROR_INVALID_PARAM", + [-107] = "ERROR_INVALID_PARAM_LEN", + [-123] = "ERROR_MAX_DEV_CONNECT_NUM", + [-102] = "ERROR_MAX_HUB_CONNECT_NUM", + [-130] = "ERROR_MAX_NAS_CONNECT_NUM", + [-129] = "ERROR_MODE_DISABLE", + [998] = "ERROR_NETWORK_NOT_AVAILABLE", + [-115] = "ERROR_NOT_FACE", + [-106] = "ERROR_NOT_FIND_DEV", + [-118] = "ERROR_NOT_TFCARD", + [-100] = "ERROR_NULL_POINT", + [-111] = "ERROR_OPEN_FILE_FAIL", + [-116] = "ERROR_PARAM_NO_CHANGE", + [-124] = "ERROR_PIPE_FAIL", + [-127] = "ERROR_PLAY_STOP", + [-117] = "ERROR_POWER_LOW", + [-2] = "ERROR_PPCS_ALREADY_INITIALIZED", + [-126] = "ERROR_PPCS_CONNECTING", + [-6] = "ERROR_PPCS_DEVICE_NOT_ONLINE", + [-22] = "ERROR_PPCS_FAIL_TO_CREATE_THREAD", + [-7] = "ERROR_PPCS_FAIL_TO_RESOLVE_NAME", + [-9] = "ERROR_PPCS_ID_OUT_OF_DATE", + [-21] = "ERROR_PPCS_INVALID_APILICENSE", + [-23] = "ERROR_PPCS_INVALID_DSK", + [-4] = "ERROR_PPCS_INVALID_ID", + [-5] = "ERROR_PPCS_INVALID_PARAMETER", + [-8] = "ERROR_PPCS_INVALID_PREFIX", + [-11] = "ERROR_PPCS_INVALID_SESSION_HANDLE", + [-17] = "ERROR_PPCS_MAX_SESSION", + [-1] = "ERROR_PPCS_NOT_INITIALIZED", + [-10] = "ERROR_PPCS_NO_RELAY_SERVER_AVAILABLE", + [1] = "ERROR_PPCS_RELAY", + [-15] = "ERROR_PPCS_REMOTE_SITE_BUFFER_FULL", + [-14] = "ERROR_PPCS_SESSION_CLOSED_CALLED", + [-20] = "ERROR_PPCS_SESSION_CLOSED_INSUFFICIENT_MEMORY", + [-12] = "ERROR_PPCS_SESSION_CLOSED_REMOTE", + [-13] = "ERROR_PPCS_SESSION_CLOSED_TIMEOUT", + [0] = "ERROR_PPCS_SUCCESSFUL", + [-3] = "ERROR_PPCS_TIME_OUT", + [-18] = "ERROR_PPCS_UDP_PORT_BIND_FAILED", + [-19] = "ERROR_PPCS_USER_CONNECT_BREAK", + [-16] = "ERROR_PPCS_USER_LISTEN_BREAK", + [-122] = "ERROR_SET_P2P_INFO", + [20020] = "ERROR_STATION_HAS_BIND", + [-119] = "ERROR_TFCARD_FORMATING", + [-135] = "ERROR_TFCARD_REPAIRING", + [-132] = "ERROR_TFCARD_VOLUME_OVERFLOW", + [-108] = "ERROR_WAIT_TIMEOUT", + [-131] = "ERROR_WAKEUP_CAMRA_TYPE", + [-105] = "ERROR_WRITE_FLASH", + [-200] = "ERROR_XM_BASE", + [-203] = "ERROR_XM_WIFI_DISCONNECT", + [-205] = "ERROR_XM_WIFI_TIMEOUT", + [-204] = "ERROR_XM_WIFI_WAKEUP_FAIL", +} + +-- helper method +local function has_value (tab, val) + for index, value in ipairs(tab) do + if value == val then + return true + end + end + return false +end + +-- declare our protocol +eufySecurity_proto = Proto("eufySecurity", "Eufy Security") + +-- declare fields +local F_fullnumtype = ProtoField.new("Full Numeric Type", "eufySecurity.fulltype", ftypes.UINT16, nil, base.DEC_HEX, nil, "Full Message Type (DEC_HEX)") +local F_numtype = ProtoField.new("Numeric Type", "eufySecurity.type", ftypes.UINT8, nil, base.DEC_HEX, nil, "Short Message Type (DEC_HEX)") +local F_strtype = ProtoField.new("Description", "eufySecurity.description", ftypes.STRING, nil, nil, nil, "Message Type Description (STRING)") +local F_known = ProtoField.new("Known type", "eufySecurity.known", ftypes.BOOLEAN, nil, nil, nil, "Message type is known (BOOLEAN)") +local F_paylen = ProtoField.new("Payload length", "eufySecurity.paylen", ftypes.UINT16, nil, base.DEC, nil, "Payload Length (DEC)") + +-- extended fields for specific requests +local F_p2pDid = ProtoField.new("P2P DID", "eufySecurity.p2pdid", ftypes.STRING, nil, nil, nil, "TODO") +local F_p2pDsk = ProtoField.new("P2P DSK", "eufySecurity.p2pdsk", ftypes.STRING, nil, nil, nil, "TODO") +local F_p2pConInfo = ProtoField.new("P2P Conn Info", "eufySecurity.p2pConInfo", ftypes.STRING, nil, nil, nil, "TODO") +local F_p2pAddrPort = ProtoField.new("P2P Addr Port", "eufySecurity.p2pAddrPort", ftypes.UINT8, nil, nil, nil, "TODO") +local F_p2pAddrIp = ProtoField.new("P2P Addr Ip", "eufySecurity.p2pAddrIp", ftypes.STRING, nil, nil, nil, "TODO") +local F_p2pSeqNo = ProtoField.new("P2P SeqNo", "eufySecurity.p2pSeqNo", ftypes.UINT8, nil, nil, nil, "TODO") +local F_p2pDataType = ProtoField.new("P2P DataType", "eufySecurity.p2pDataType", ftypes.STRING, nil, nil, nil, "TODO") +local F_p2pDataCommandId = ProtoField.new("P2P Data Command Id", "eufySecurity.p2pCommandId", ftypes.UINT16, nil, nil, nil, "TODO") +local F_p2pDataCommandIdDesc = ProtoField.new("P2P Data Command Id Description", "eufySecurity.p2pCommandIdDesc", ftypes.STRING, nil, nil, nil, "TODO") +local F_p2pAckSeqNo = ProtoField.new("P2P Ack SeqNumbers", "eufySecurity.p2pAckSeqNos", ftypes.STRING, nil, nil, nil, "TODO") +local F_p2pAckSeqNoCount = ProtoField.new("P2P Ack SeqNumbers Count", "eufySecurity.p2pAckSeqNosCount", ftypes.UINT16, nil, nil, nil, "TODO") +local F_p2pDataCommandReturnCode = ProtoField.new("P2P Data Command Return Code", "eufySecurity.p2pCommandReturnCode", ftypes.STRING, nil, nil, nil, "TODO") +local F_p2pDataChannel = ProtoField.new("P2P Data Channel", "eufySecurity.p2pChannel", ftypes.UINT8, nil, nil, nil, "TODO") +local F_p2pDataToRead = ProtoField.new("P2P Data to read", "eufySecurity.p2pDataToRead", ftypes.UINT16, nil, nil, nil, "TODO") + +local F_p2pVideoSeqNo = ProtoField.new("Video SeqNo", "eufySecurity.p2pVideoSeqNo", ftypes.UINT16, nil, nil, nil, "TODO") +local F_p2pVideoHeight = ProtoField.new("Video Height", "eufySecurity.p2pVideoHeight", ftypes.UINT16, nil, nil, nil, "TODO") +local F_p2pVideoWidth = ProtoField.new("Video Width", "eufySecurity.p2pVideoWidth", ftypes.UINT16, nil, nil, nil, "TODO") +local F_p2pVideoFPS = ProtoField.new("Video FPS", "eufySecurity.p2pVideoFPS", ftypes.UINT16, nil, nil, nil, "TODO") +local F_p2pVideoTimestamp = ProtoField.new("Video Timestamp", "eufySecurity.p2pVideoTimestamp", ftypes.UINT64, nil, nil, nil, "TODO") + +local F_p2pAudioSeqNo = ProtoField.new("Audio SeqNo", "eufySecurity.p2pAudioSeqNo", ftypes.UINT16, nil, nil, nil, "TODO") +local F_p2pAudioTimestamp = ProtoField.new("Audio Timestamp", "eufySecurity.p2pAudioTimestamp", ftypes.UINT64, nil, nil, nil, "TODO") + +-- add the fields to the protocol +-- (to confirm this worked, check that these fields appeared in the "Filter Expression" dialog) +eufySecurity_proto.fields = { + F_fullnumtype, + F_numtype, + F_strtype, + F_known, + F_paylen, + F_p2pDid, + F_p2pDsk, + F_p2pConInfo, + F_p2pAddrPort, + F_p2pAddrIp, + F_p2pSeqNo, + F_p2pDataType, + F_p2pDataCommandId, + F_p2pDataCommandIdDesc, + F_p2pDataChannel, + F_p2pDataToRead, + F_p2pAckSeqNo, + F_p2pAckSeqNoCount, + F_p2pDataCommandReturnCode, + F_p2pVideoSeqNo, + F_p2pVideoHeight, + F_p2pVideoWidth, + F_p2pVideoFPS, + F_p2pVideoTimestamp, + F_p2pAudioSeqNo, + F_p2pAudioTimestamp, +} + +-- Cloud ips of eufy security +local cloudIps = {"54.223.148.206", "18.197.212.165", "13.251.222.7"} + +function eufySecurity_proto.dissector(buffer, pinfo, tree) + local srcIsCloud = has_value(cloudIps, tostring(pinfo.src)) + local dstIsCloud = has_value(cloudIps, tostring(pinfo.dst)) + -- local packets always start with "0xf1" + if (buffer(0,1):uint() ~= 0xf1 and srcIsCloud == false and dstIsCloud == false) then + -- lets wireshark know nothing was dissected + return 0; + end + + pinfo.cols.protocol = "eufySecurity" + local full_type = buffer(0,2):uint() + local num_type = buffer(1,1):uint() + local known = false + local str_type = "Unknown - " .. string.format("0x%x", full_type) + + if (messages[full_type]) then + known = true + str_type = messages[full_type] + end + pinfo.cols.info = str_type + + local payload_len = buffer(2,2):uint() + local payload = buffer(4,payload_len) + + local subtree = tree:add(eufySecurity_proto,buffer(), "eufySecurity Protocol") + + subtree:add(F_fullnumtype, buffer(0,2), full_type) + subtree:add(F_numtype, buffer(1,1), num_type) + subtree:add(F_strtype, buffer(0,2), str_type) + subtree:add(F_known, buffer(0,2), known) + subtree:add(F_paylen, buffer(2,2), payload_len) + + -- specifc attributes depending on the message type + -- TODO replace with bytes not strings! + if (str_type == "CAM_ID response" or str_type == "LOOKUP_WITH_DSK request" or str_type == "CHECK_CAM request / LOCAL_LOOKUP_RESP response") then + local p2pdid = buffer(4, 7):string() .. "-" .. buffer(14, 2):uint() .. "-" .. buffer(16, 6):string() + subtree:add(F_p2pDid, buffer(4, 20), p2pdid) + end + + if (str_type == "LOOKUP_WITH_DSK request") then + local p2pConInfo = "Port: " .. buffer(26, 2):le_uint() .. " - IP: " .. buffer(28, 1):uint() .. "." .. buffer(29, 1):uint() .. "." .. buffer(30, 1):uint() .. "." .. buffer(31, 1):uint() + subtree:add(F_p2pConInfo, buffer(28, 4), p2pConInfo) + + local p2pdsk = buffer(44, 20):string() + subtree:add(F_p2pDsk, buffer(44, 20), p2pdsk) + end + + if (str_type == "LOOKUP_ADDR response") then + local p2pAddrPort = buffer(7, 1):uint() * 256 + buffer(6, 1):uint() + subtree:add(F_p2pAddrPort, buffer(6, 2), p2pAddrPort) + + local p2pAddrIp = "" .. buffer(11, 1):uint() .. "." .. buffer(10, 1):uint() .. "." .. buffer(9, 1):uint() .. "." .. buffer(8, 1):uint() + subtree:add(F_p2pAddrIp, buffer(8, 4), p2pAddrIp) + end + + if (str_type == "ACK") then + local seqNumbers = "" + local p2pNumAcks = buffer(6, 2):uint() + subtree:add(F_p2pAckSeqNoCount, buffer(6, 2), p2pNumAcks) + for i=1,p2pNumAcks do + local idx = 6 + (i * 2) + local seq = buffer(idx, 2):uint() + seqNumbers = seqNumbers .. seq .. "; " + end + subtree:add(F_p2pAckSeqNo, buffer(6, (2 * p2pNumAcks) + 2), seqNumbers) + + -- Data Type + local p2pDataType = buffer(4, 2):uint() + if (dataTypes[p2pDataType]) then + subtree:add(F_p2pDataType, buffer(4, 2), dataTypes[p2pDataType]) + pinfo.cols.info:append(" - " .. dataTypes[p2pDataType]) + else + subtree:add(F_p2pDataType, buffer(4, 2), "Unknown DataType") + end + end + + if (str_type == "DATA") then + -- Seq No + local p2pSeqNo = buffer(6, 1):uint() * 256 + buffer(7, 1):uint() + subtree:add(F_p2pSeqNo, buffer(6, 2), p2pSeqNo) + + -- Data Type + local p2pDataType = buffer(4, 2):uint() + if (dataTypes[p2pDataType]) then + subtree:add(F_p2pDataType, buffer(4, 2), dataTypes[p2pDataType]) + pinfo.cols.info:append(" - " .. dataTypes[p2pDataType]) + + local p2pMagicWord = buffer(8, 4):string() + -- DATA information + if (p2pMagicWord == "XZYH") then + -- Command Id + local p2pDataCommandId = buffer(12, 2):le_uint() + + if (commandIds[p2pDataCommandId]) then + subtree:add(F_p2pDataCommandId, buffer(12, 2), p2pDataCommandId) + subtree:add(F_p2pDataCommandIdDesc, buffer(12, 2), commandIds[p2pDataCommandId]) + pinfo.cols.info:append(" - " .. commandIds[p2pDataCommandId]) + else + subtree:add(F_p2pDataCommandId, buffer(12, 2), p2pDataCommandId) + subtree:add(F_p2pDataCommandIdDesc, buffer(12, 2), "Unknown") + end + local p2pDataPacketIdent = buffer(14, 1):le_uint() + if (dataTypes[p2pDataType] == "DATA" and p2pDataPacketIdent == 132) then + local p2pDataCommantReturnCode = buffer(24, 4):le_int() + if (errorCodes[p2pDataCommantReturnCode]) then + subtree:add(F_p2pDataCommandReturnCode, buffer(24, 4), "" .. errorCodes[p2pDataCommantReturnCode] .. " (" .. p2pDataCommantReturnCode .. ")") + pinfo.cols.info:append(" - RC: " .. errorCodes[p2pDataCommantReturnCode]) + else + subtree:add(F_p2pDataCommandReturnCode, buffer(24, 4), "" .. p2pDataCommantReturnCode) + pinfo.cols.info:append(" - RC: " .. p2pDataCommantReturnCode) + end + else + local p2pDataChannel = buffer(20, 1):uint() + subtree:add(F_p2pDataChannel, buffer(20, 1), p2pDataChannel) + + local p2pDataToRead = buffer(14, 2):le_uint() + subtree:add(F_p2pDataToRead, buffer(14, 2), p2pDataToRead) + + end + if (p2pDataCommandId == 1300) then + -- VIDEO FRAME + local p2pVideoSeqNo = buffer(30, 2):le_uint() + local p2pVideoFPS = buffer(32, 2):le_uint() + local p2pVideoWidth = buffer(34, 2):le_uint() + local p2pVideoHeight = buffer(36, 2):le_uint() + local p2pVideoTimestamp = buffer(38, 6):le_uint64() + + subtree:add(F_p2pVideoSeqNo, buffer(30, 2), p2pVideoSeqNo) + subtree:add(F_p2pVideoFPS, buffer(32, 2), p2pVideoFPS) + subtree:add(F_p2pVideoWidth, buffer(34, 2), p2pVideoWidth) + subtree:add(F_p2pVideoHeight, buffer(36, 2), p2pVideoHeight) + subtree:add(F_p2pVideoTimestamp, buffer(38, 6), p2pVideoTimestamp) + + elseif (p2pDataCommandId == 1301) then + -- AUDIO FRAME + local p2pAudioSeqNo = buffer(30, 2):le_uint() + local p2pAudioTimestamp = buffer(32, 6):le_uint64() + + subtree:add(F_p2pAudioSeqNo, buffer(30, 2), p2pAudioSeqNo) + subtree:add(F_p2pAudioTimestamp, buffer(32, 6), p2pAudioTimestamp) + end + end + else + subtree:add(F_p2pDataType, buffer(4, 2), "Unknown DataType") + end + end +end + +-- load the udp.port table +udp_table = DissectorTable.get("udp.port") +udp_table:add("20000-69999", eufySecurity_proto) diff --git a/dissectors/firedancer-tango/LICENSE b/dissectors/firedancer-tango/LICENSE new file mode 100644 index 0000000..d5b6518 --- /dev/null +++ b/dissectors/firedancer-tango/LICENSE @@ -0,0 +1,195 @@ +The below applies to all contents of this repository unless explicitly +noted. See NOTICE for additional information. + +======================================================================= + + Copyright 2022 Firedancer Contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/dissectors/firedancer-tango/README.md b/dissectors/firedancer-tango/README.md new file mode 100644 index 0000000..c4d2099 --- /dev/null +++ b/dissectors/firedancer-tango/README.md @@ -0,0 +1,57 @@ +# Firedancer Tango — messages internes du validateur Solana + +Dissecteur Wireshark Lua des **fragments Tango** de +[Firedancer](https://github.com/firedancer-io/firedancer) (validateur +Solana) : Tango est la couche de messagerie entre les « tuiles » du +validateur (files `mcache` / `dcache`). Le script décode les +métadonnées d'un fragment (numéro de séquence, signature, chunk, taille, +contrôle début / fin de message, horodatages d'origine et de publication, +hachage du lien avec son nom : `net_quic`, `quic_verify`, `verify_dedup`, +`resolv_pack`, `poh_shred`…), puis la charge utile selon le lien : +transactions `fd_txn_t` / `fd_txn_m_t`, messages PoH → shred, remises de +CU (`fd_pack_rebate_t`), « became leader », « done packing », trames +Ethernet ou paquets TPU Solana. + +Prévu pour des captures en DLT utilisateur (User 0, 147) ; enregistre +aussi le dissecteur TPU Solana sur le port UDP 9001. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/firedancer-io/firedancer (fichier `contrib/tango.lua`) | +| Commit importé | `300acc6fdcce505957d828bdcf9bc070b78cd9ce` du 01/11/2026 (branche `main`, dernier commit ; dernière modification de `tango.lua` : `d44b459` du 23/10/2026) | +| Licence amont | Apache-2.0 (fichier `LICENSE` : « Copyright 2022 Firedancer Contributors », Apache 2.0, suivi des licences des bibliothèques tierces du dépôt, copié ici tel quel ; `set_plugin_info` du script : `license = "Apache-2.0"`, auteur Philip Taffet) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Firedancer / Tango natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `tango.lua` | Protocole `fd_tango` (« Tango Frag ») et sous-protocoles `fd_txn_t`, `fd_txn_m_t`, `fd_poh_shred`, `fd_pack_rebate_t`, `fd_became_leader_t`, `fd_done_packing_t` | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +1. Installer aussi le dissecteur Solana, déjà présent dans ce dépôt : + `dissectors/solana/src/solana.lua` (import de + firedancer-io/solana_dissector, **GPL-2.0-only**), dans le même dossier + `plugins` que `tango.lua`. +2. Copier `tango.lua` dans le dossier `plugins` de Wireshark. +3. Préférences → Protocols → DLT_USER → Edit… : ajouter une ligne + « User 0 (147) » avec le dissecteur de charge utile `fd_tango`. +4. Ouvrir une capture des fragments Tango (format produit par les outils + Firedancer), puis filtrer avec `fd_tango`. + +## Remarques + +- **Dépendance obligatoire** : en fin de script, + `Dissector.get("solana.tpu.udp")` est appelé au chargement ; sans le + dissecteur Solana chargé avant (ordre alphabétique `solana.lua` < + `tango.lua` dans un même dossier), le chargement de `tango.lua` échoue. +- Les structures suivent l'état du code Firedancer au commit importé ; + elles peuvent changer avec les versions suivantes. +- Utilise `bit.rshift` (bibliothèque `bit` fournie par Wireshark 4.4 et + plus). Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/firedancer-tango/tango.lua b/dissectors/firedancer-tango/tango.lua new file mode 100644 index 0000000..13d107a --- /dev/null +++ b/dissectors/firedancer-tango/tango.lua @@ -0,0 +1,605 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/firedancer-io/firedancer (contrib/tango.lua), +-- commit 300acc6fdcce505957d828bdcf9bc070b78cd9ce du 01/11/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +if set_plugin_info then + local my_info = { + version = "0.1", + author = "Philip Taffet", + license = "Apache-2.0", + details = "Wireshark plugin for Firedancer Tango messages", + } + set_plugin_info(my_info) +end + +-- Installation instructions: +-- Add this file and the contents of +-- https://github.com/firedancer-io/solana_dissector to the Wireshark Lua +-- dissectors director, e.g. %APPDATA%\Wireshark\plugins on Windows. In +-- Wireshark, go to Edit -> Preferences -> Protocols -> DLT_USER -> Edit... . +-- Add a row with the +, and set the DLT to User 0 (147) and the Payload +-- dissector to fd_tango. + +--------------------------------------- +-- Protocols -- +--------------------------------------- + +local tango = Proto("fd_tango", "Tango Frag") + +--------------------------------------- +-- Data Types -- +--------------------------------------- + +local tango_seq = ProtoField.uint64("fd_tango.seq", "Sequence Number", base.DEC) +local tango_sig = ProtoField.uint64("fd_tango.sig", "Sig", base.HEX) +local tango_chunk = ProtoField.uint32("fd_tango.chunk", "Chunk", base.HEX) +local tango_sz = ProtoField.uint16("fd_tango.sz", "Size", base.DEC) +local tango_ctl = ProtoField.uint16("fd_tango.ctl", "Control", base.HEX) +local tango_ctl_som = ProtoField.uint16("fd_tango.ctl.som", "Start-of-message", base.DEC, NULL, 1) +local tango_ctl_eom = ProtoField.uint16("fd_tango.ctl.eom", "End-of-message", base.DEC, NULL, 2) +local tango_ctl_err = ProtoField.uint16("fd_tango.ctl.err", "Err", base.DEC, NULL, 4) +local tango_ctl_orig = ProtoField.uint16("fd_tango.ctl.orig", "Origin", base.DEC, NULL, 0xFFF8) +local tango_tsorig = ProtoField.uint32("fd_tango.tsorig", "Origin Timestamp", base.DEC) +local tango_tspub = ProtoField.uint32("fd_tango.tspub", "Publish Timestamp", base.DEC) +local tango_link = ProtoField.uint32("fd_tango.link", "Link Hash", base.HEX) +local tango_link_name = ProtoField.string("fd_tango.linkname", "Link Name") +local tango_contents = ProtoField.bytes("fd_tango.contents", "DCache Contents") + +local tpu_payload_sz = ProtoField.uint16("fd_tpu.payload_sz", "Payload Size") +local tpu_txn = ProtoField.bytes("fd_tpu.txn_t", "Packed Transaction") +local tpu_non_execution_cus = ProtoField.uint32("fd_tpu.non_execution_cus", "Non-execution CUs") +local tpu_requested_cus = ProtoField.uint32("fd_tpu.requested_cus", "Requested CUs") +local tpu_rebated_cus = ProtoField.uint32("fd_tpu.rebated_cus", "Rebated CUs") +local tpu_executed_cus = ProtoField.uint32("fd_tpu.executed_cus", "Executed CUs") +local sched_arrival_ns = ProtoField.int64("fd_tpu.sched_arrival_ns", "Arrival Time (ns)") +local tpu_first_seen_nanos = ProtoField.int64("fd_tpu.first_seen_nanos", "First Seen (ns)") +local tpu_flags = ProtoField.uint32("fd_tpu.flags", "Flags") + +local yesno_types = { + [0] = "No", + [1] = "Yes" +} +local status_codes = { + [0] = "Success", + [1] = "AccountInUse", + [2] = "AccountLoadedTwice", + [3] = "AccountNotFound", + [4] = "ProgramAccountNotFound", + [5] = "InsufficientFundsForFee", + [6] = "InvalidAccountForFee", + [7] = "AlreadyProcessed", + [8] = "BlockhashNotFound", + [9] = "InstructionError", + [10] = "CallChainTooDeep", + [11] = "MissingSignatureForFee", + [12] = "InvalidAccountIndex", + [13] = "SignatureFailure", + [14] = "InvalidProgramForExecution", + [15] = "SanitizeFailure", + [16] = "ClusterMaintenance", + [17] = "AccountBorrowOutstanding", + [18] = "WouldExceedMaxBlockCostLimit", + [19] = "UnsupportedVersion", + [20] = "InvalidWritableAccount", + [21] = "WouldExceedMaxAccountCostLimit", + [22] = "WouldExceedAccountDataBlockLimit", + [23] = "TooManyAccountLocks", + [24] = "AddressLookupTableNotFound", + [25] = "InvalidAddressLookupTableOwner", + [26] = "InvalidAddressLookupTableData", + [27] = "InvalidAddressLookupTableIndex", + [28] = "InvalidRentPayingAccount", + [29] = "WouldExceedMaxVoteCostLimit", + [30] = "WouldExceedAccountDataTotalLimit", + [31] = "DuplicateInstruction", + [32] = "InsufficientFundsForRent", + [33] = "MaxLoadedAccountsDataSizeExceeded", + [34] = "InvalidLoadedAccountsDataSizeLimit", + [35] = "ResanitizationNeeded", + [36] = "ProgramExecutionTemporarilyRestricted", + [37] = "UnbalancedTransaction", + [38] = "ProgramCacheHitMaxLimit" +} + +local tpu_bundle = ProtoField.uint32("fd_tpu.flags.bundle", "Bundle", base.DEC, yesno_types, 0x2) +local tpu_initializer = ProtoField.uint32("fd_tpu.flags.initializer_bundle", "Initializer Bundle", base.DEC, yesno_types, 0x4) +local tpu_sanitized = ProtoField.uint32("fd_tpu.flags.sanitized", "Sanitize Success", base.DEC, yesno_types, 0x8) +local tpu_executed = ProtoField.uint32("fd_tpu.flags.executed", "Execute Success", base.DEC, yesno_types, 0x10) +local tpu_fees_only = ProtoField.uint32("fd_tpu.flags.fees_only", "Fees Only", base.DEC, yesno_types, 0x20) +local tpu_nonce = ProtoField.uint32("fd_tpu.flags.is_nonce", "Durable Nonce", base.DEC, yesno_types, 0x40) +local tpu_status = ProtoField.uint32("fd_tpu.flags.status", "Status", base.DEC, status_codes, 0xFF000000) + +tango.fields = { + tango_link, + tango_link_name, + tango_seq, + tango_sig, + tango_chunk, + tango_sz, + tango_ctl, + tango_tsorig, + tango_tspub, + tango_ctl_som, + tango_ctl_eom, + tango_ctl_err, + tango_ctl_orig, + tango_contents, + + tpu_payload_sz, + tpu_txn, + tpu_non_execution_cus, + tpu_requested_cus, + tpu_rebated_cus, + tpu_executed_cus, + sched_arrival_ns, + tpu_first_seen_nanos, + tpu_flags, + + tpu_bundle, + tpu_initializer, + tpu_sanitized, + tpu_executed, + tpu_fees_only, + tpu_nonce, + tpu_status +} + +local link_hashes = { + [0x18a945] = "shred_net", + [0x2aabab] = "quic_verify", + [0x1efba0] = "verify_dedup", + [0x59bd91] = "resolv_pack", + [0xe959ef] = "pack_execle", + [0x458b11] = "execle_poh", + [0xdb6a44] = "poh_shred", + [0x1eb6fd] = "shred_out", + [0xc650c9] = "shred_sign", + [0xd408b5] = "sign_shred", + [0x0d274e] = "quic_net", + [0xf680c5] = "net_quic", + [0x6f928b] = "net_shred", + [0x409d3f] = "dedup_resolv", + [0x01a062] = "replay_out", + [0xbfa307] = "replay_epoch", + [0x8b0b77] = "poh_replay", + [0x1f1be9] = "txsend_out", + [0x76c6b3] = "gossip_ciaddr", + [0x4d1d66] = "gossip_ciseen", + [0xb343e8] = "gossip_misc", + [0x02a21a] = "tower_out", + [0x9e4bf4] = "bundle_verif", + [0xc7e9e7] = "bundle_sign" , + [0x81114e] = "sign_bundle" , + [0x2259d5] = "bundle_status", + [0x06c577] = "pack_sign", + [0x6a974e] = "sign_pack", + [0x257632] = "execle_pack", + [0x534f91] = "pack_poh", + [0xd5cc48] = "net_repair", + [0xf005bb] = "repair_net", + [0x629712] = "repair_out", + [0xfb0d59] = "net_gossvf", + [0x287af8] = "net_txsend", + [0x6a2cc7] = "net_rserve", + [0xc52ff4] = "net_votor", + [0x3c9510] = "gossip_net", + [0xf7b150] = "txsend_net", + [0x6a67d3] = "rserve_net", + [0xd607e8] = "votor_net" +} + +function tango.dissector (tvb, pinfo, tree) + local subtree = tree:add(tango, tvb()) + local packet_len = tvb:len() + + if packet_len < 36 then + return + end + + local link_hash = tvb(packet_len-4, 4):le_uint() + local link_name = link_hashes[bit.rshift(link_hash, 8)] or "unknown" + local sig = tvb(8, 8):le_uint64() + + subtree:add_le(tango_link, tvb(packet_len-4, 4)):append_text( " (" .. link_name .. ")" ) + subtree:add(tango_link_name, tvb(packet_len-4, 4), link_name) + + subtree:add_le(tango_seq, tvb(0, 8)) + subtree:add_le(tango_sig, tvb(8, 8)) + subtree:add_le(tango_chunk, tvb(16, 4)) + subtree:add_le(tango_sz, tvb(20, 2)) + local ctl_node = subtree:add_le(tango_ctl, tvb(22, 2)) + ctl_node:add_le(tango_ctl_som, tvb(22,2)) + ctl_node:add_le(tango_ctl_eom, tvb(22,2)) + ctl_node:add_le(tango_ctl_err, tvb(22,2)) + ctl_node:add_le(tango_ctl_orig, tvb(22,2)) + + subtree:add_le(tango_tsorig, tvb(24, 4)) + subtree:add_le(tango_tspub, tvb(28, 4)) + + + local dcache_contents = tvb:range(32, packet_len-36):tvb() + local dcache_tree = subtree:add(tango_contents, tvb(32, packet_len-36)) + if dcache_contents:len() == 0 then + return + end + + if link_name:match("^net_") or link_name:match("_net$") then + local dissector = Dissector.get("eth_withoutfcs") + dissector:call(dcache_contents, pinfo, dcache_tree) + elseif link_name == "verify_dedup" or link_name == "dedup_resolv" or link_name == "resolv_pack" or link_name == "bundle_verif" or link_name == "quic_verify" or link_name == "txsend_out" then + local dissector = Dissector.get("fd_txn_m_t") + dissector:call(dcache_contents, pinfo, dcache_tree) + elseif link_name == "poh_shred" then + local dissector = Dissector.get("fd_poh_shred") + dissector:call(dcache_contents, pinfo, dcache_tree) + elseif link_name == "execle_pack" then + local dissector = Dissector.get("fd_pack_rebate_t") + dissector:call(dcache_contents, pinfo, dcache_tree) + elseif link_name == "pack_execle" or link_name == "execle_poh" then + local dissector = Dissector.get("solana.tpu.udp") + local dissector2 = Dissector.get("fd_txn_t") + local stride = link_name == "pack_execle" and 7040 or 4992 + local trailer_sz = link_name == "pack_execle" and 48 or 96 + + for offset=0,dcache_contents:len()-trailer_sz-stride,stride do + local txn = dcache_contents(offset, stride):tvb() + local txn_tree = dcache_tree:add(tpu_txn, txn()) + local payload_sz = txn(4096, 2):le_uint() + if payload_sz > 4096 then return end + dissector:call(txn(0, payload_sz):tvb(), pinfo, txn_tree) + txn_tree:add_le(tpu_payload_sz, txn(4096, 2)) + if link_name == "pack_execle" then + txn_tree:add_le(tpu_non_execution_cus, txn(4104, 4)) + txn_tree:add_le(tpu_requested_cus, txn(4108, 4)) + else + txn_tree:add_le(tpu_rebated_cus, txn(4104, 4)) + txn_tree:add_le(tpu_executed_cus, txn(4108, 4)) + end + txn_tree:add_le(sched_arrival_ns, txn(4112, 8)) + txn_tree:add_le(tpu_first_seen_nanos, txn(4120, 8)) + local flag_tvb = txn(4132,4) + local flag_node = txn_tree:add_le(tpu_flags, flag_tvb) + flag_node:add_le(tpu_bundle,flag_tvb) + flag_node:add_le(tpu_initializer,flag_tvb) + flag_node:add_le(tpu_sanitized, flag_tvb) + flag_node:add_le(tpu_executed, flag_tvb) + flag_node:add_le(tpu_fees_only, flag_tvb) + flag_node:add_le(tpu_nonce, flag_tvb) + flag_node:add_le(tpu_status, flag_tvb) + + local txn_t_tvb = txn(4136, 854):tvb() + dissector2:call(txn_t_tvb, pinfo, txn_tree) + end + elseif link_name == "replay_out" and sig == UInt64(4) then + local dissector = Dissector.get("fd_became_leader_t") + dissector:call(dcache_contents, pinfo, dcache_tree) + elseif link_name == "pack_poh" then + if sig == UInt64(0xfffffffe, 0xffffffff) then + dcache_tree:append_text(" (Reduced Microblock Bound)") + elseif sig ~= UInt64(0xffffffff, 0xffffffff) then + local dissector = Dissector.get("fd_done_packing_t") + dissector:call(dcache_contents, pinfo, dcache_tree) + end + end +end + + + + + +local p_fd_txn = Proto("fd_txn_t", "FD Transaction Struct") +local f = p_fd_txn.fields +f.transaction_version = ProtoField.uint8("fd_txn.transaction_version", "Transaction Version", base.DEC) +f.signature_cnt = ProtoField.uint8("fd_txn.signature_cnt", "Signature Count", base.DEC) +f.signature_off = ProtoField.uint16("fd_txn.signature_off", "Signature Offset", base.DEC) +f.message_off = ProtoField.uint16("fd_txn.message_off", "Message Offset", base.DEC) +f.readonly_signed_cnt = ProtoField.uint8("fd_txn.readonly_signed_cnt", "Readonly Signed Count", base.DEC) +f.readonly_unsigned_cnt = ProtoField.uint8("fd_txn.readonly_unsigned_cnt", "Readonly Unsigned Count", base.DEC) +f.acct_addr_cnt = ProtoField.uint16("fd_txn.acct_addr_cnt", "Account Address Count", base.DEC) +f.acct_addr_off = ProtoField.uint16("fd_txn.acct_addr_off", "Account Address Offset", base.DEC) +f.recent_blockhash_off = ProtoField.uint16("fd_txn.recent_blockhash_off", "Recent Blockhash Offset", base.DEC) +f.addr_table_lookup_cnt = ProtoField.uint8("fd_txn.addr_table_lookup_cnt", "Address Table Lookup Count", base.DEC) +f.addr_table_adtl_writable_cnt = ProtoField.uint8("fd_txn.addr_table_adtl_writable_cnt", "Additional Writable Count", base.DEC) +f.addr_table_adtl_cnt = ProtoField.uint8("fd_txn.addr_table_adtl_cnt", "Additional Address Count", base.DEC) +f.v1_txn_config_values_off = ProtoField.uint16("fd_txn.v1_txn_config_values_off", "V1 Config Values Offset", base.DEC) +f.instr_cnt = ProtoField.uint16("fd_txn.instr_cnt", "Instruction Count", base.DEC) + +f.instrs = ProtoField.none("fd_txn.instr", "Instructions") +f.instr = ProtoField.none("fd_txn_instr", "Instruction") +f.program_id = ProtoField.uint8("fd_txn_instr.program_id", "Program ID Index", base.DEC) +f.acct_cnt = ProtoField.uint16("fd_txn_instr.acct_cnt", "Account Count", base.DEC) +f.data_sz = ProtoField.uint16("fd_txn_instr.data_sz", "Data Size", base.DEC) +f.acct_off = ProtoField.uint16("fd_txn_instr.acct_off", "Account Offset", base.DEC) +f.data_off = ProtoField.uint16("fd_txn_instr.data_off", "Data Offset", base.DEC) + +f.alts = ProtoField.none("fd_txn.address_tables", "Address Tables") +f.alt = ProtoField.none("fd_txn_acct_addr_lut", "Table") +f.addr_off = ProtoField.uint16("fd_txn_acct_addr_lut.addr_off", "Address Offset", base.DEC) +f.writable_cnt = ProtoField.uint8("fd_txn_acct_addr_lut.writable_cnt", "Writable Count", base.DEC) +f.readonly_cnt = ProtoField.uint8("fd_txn_acct_addr_lut.readonly_cnt", "Readonly Count", base.DEC) +f.writable_off = ProtoField.uint16("fd_txn_acct_addr_lut.writable_off", "Writable Offset", base.DEC) +f.readonly_off = ProtoField.uint16("fd_txn_acct_addr_lut.readonly_off", "Readonly Offset", base.DEC) + +-- Dissector function +function p_fd_txn.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = p_fd_txn.name + + -- Create subtree for FD Transaction Protocol + local subtree = tree:add(p_fd_txn, buffer(), "FD Transaction Struct Data") + + -- Add fields to subtree + local offset = 0 + subtree:add_le(f.transaction_version, buffer(offset, 1)); offset = offset + 1 + subtree:add_le(f.signature_cnt, buffer(offset, 1)); offset = offset + 1 + subtree:add_le(f.signature_off, buffer(offset, 2)); offset = offset + 2 + subtree:add_le(f.message_off, buffer(offset, 2)); offset = offset + 2 + subtree:add_le(f.readonly_signed_cnt, buffer(offset, 1)); offset = offset + 1 + subtree:add_le(f.readonly_unsigned_cnt, buffer(offset, 1)); offset = offset + 1 + subtree:add_le(f.acct_addr_cnt, buffer(offset, 2)); offset = offset + 2 + subtree:add_le(f.acct_addr_off, buffer(offset, 2)); offset = offset + 2 + subtree:add_le(f.recent_blockhash_off, buffer(offset, 2)); offset = offset + 2 + local addr_table_cnt = buffer(offset,1):le_uint() + subtree:add_le(f.addr_table_lookup_cnt, buffer(offset, 1)); offset = offset + 1 + subtree:add_le(f.addr_table_adtl_writable_cnt, buffer(offset, 1)); offset = offset + 1 + subtree:add_le(f.addr_table_adtl_cnt, buffer(offset, 1)); offset = offset + 2 + subtree:add_le(f.v1_txn_config_values_off, buffer(offset, 2)); offset = offset + 2 + local instr_cnt = buffer(offset,2):le_uint() + subtree:add_le(f.instr_cnt, buffer(offset, 2)); offset = offset + 2 + + if instr_cnt > 0 then + local instr_tree = subtree:add(f.instrs, buffer(offset, 10*instr_cnt)) + for i=1,instr_cnt,1 do + local instr = instr_tree:add(f.instr, buffer(offset, 10)):append_text(" #" .. i-1 ) + parse_instr( buffer(offset, 10), instr ) + offset = offset+10; + end + end + if addr_table_cnt > 0 then + local alt_tree = subtree:add(f.alts, buffer(offset, 8*addr_table_cnt)) + for i=1,addr_table_cnt,1 do + local alt = alt_tree:add(f.alt, buffer(offset, 8)):append_text(" #".. i-1 ) + parse_alt( buffer(offset, 8), alt ) + offset = offset+8; + end + end +end + +function parse_instr(buffer,instr_tree) + local offset=0 + instr_tree:add_le(f.program_id, buffer(offset, 1)); offset = offset + 2 -- includes padding + instr_tree:add_le(f.acct_cnt, buffer(offset, 2)); offset = offset + 2 + instr_tree:add_le(f.data_sz, buffer(offset, 2)); offset = offset + 2 + instr_tree:add_le(f.acct_off, buffer(offset, 2)); offset = offset + 2 + instr_tree:add_le(f.data_off, buffer(offset, 2)); offset = offset + 2 +end + +function parse_alt(buffer,alt_tree) + local offset=0 + alt_tree:add_le(f.addr_off, buffer(offset, 2)); offset = offset + 2 + alt_tree:add_le(f.writable_cnt, buffer(offset, 1)); offset = offset + 1 + alt_tree:add_le(f.readonly_cnt, buffer(offset, 1)); offset = offset + 1 + alt_tree:add_le(f.writable_off, buffer(offset, 2)); offset = offset + 2 + alt_tree:add_le(f.readonly_off, buffer(offset, 2)); offset = offset + 2 +end + + + + + + +-- Define a new protocol +local poh_shred = Proto("fd_poh_shred", "FD PoH to Shred Messages") + +-- Define fields +local f_parent_offset = ProtoField.uint64("fd_poh_shred.parent_offset", "Parent Offset") +local f_reference_tick = ProtoField.uint64("fd_poh_shred.reference_tick", "Reference Tick") +local f_block_complete = ProtoField.int32("fd_poh_shred.block_complete", "Block Complete") +local f_parent_block_id = ProtoField.bytes("fd_poh_shred.parent_block_id", "Parent Block ID") +local f_parent_block_id_valid = ProtoField.bool("fd_poh_shred.parent_block_id_valid", "Parent Block ID Valid") +local f_hashcnt_delta = ProtoField.uint64("fd_poh_shred.hashcnt_delta", "Hash Count Delta") +local f_hash = ProtoField.bytes("fd_poh_shred.hash", "Hash") +local f_txn_cnt = ProtoField.uint64("fd_poh_shred.txn_cnt", "Transaction Count") +local f_txns = ProtoField.none("fd_poh_shred.txns", "Transactions") + +-- Add the fields to the protocol +poh_shred.fields = { f_parent_offset, f_reference_tick, f_block_complete, f_parent_block_id, f_parent_block_id_valid, f_hashcnt_delta, f_hash, f_txn_cnt, f_txns } + +function poh_shred.dissector(buffer, pinfo, tree) + if buffer:len() < 104 then return end + local txn_cnt = buffer(96, 8):le_uint64():tonumber() + tree:add_le(f_parent_offset, buffer(0, 8)) + tree:add_le(f_reference_tick, buffer(8, 8)) + tree:add_le(f_block_complete, buffer(16, 4)) + tree:add_le(f_parent_block_id, buffer(20, 32)) + tree:add_le(f_parent_block_id_valid, buffer(52, 1)) + tree:add_le(f_hashcnt_delta, buffer(56, 8)) + tree:add_le(f_hash, buffer(64, 32)) + tree:add_le(f_txn_cnt, buffer(96, 8)) + + if txn_cnt>0 then + local tvb = buffer(104) + local subtree = tree:add(f_txns, tvb) + local dissector = Dissector.get("solana.tpu.udp") + for i=1,txn_cnt,1 do + if tvb:len() == 0 then return end + pinfo.private.bytes_consumed = nil + dissector:call(tvb:tvb(), pinfo, subtree) + local consumed = tonumber(pinfo.private.bytes_consumed) + if not consumed or consumed <= 0 or consumed > tvb:len() then return end + tvb = tvb(consumed) + end + end +end + + +-- Define a new protocol +local rebate = Proto("fd_pack_rebate_t", "FD CU Rebate Message") + +-- Define fields +local f_total_cost_rebate = ProtoField.uint64("fd_pack_rebate_t.total_cost_rebate", "Total Cost Rebate") +local f_data_bytes_rebate= ProtoField.uint64("fd_pack_rebate_t.data_bytes_rebate", "Data Bytes Rebate") +local f_microblock_cnt_rebate= ProtoField.uint64("fd_pack_rebate_t.microblock_cnt_rebate", "Microblock Count Rebate") +local f_alloc_rebate = ProtoField.uint64("fd_pack_rebate_t.alloc_rebate", "Allocation Rebate") + +local f_ib_result= ProtoField.int32("fd_pack_rebate_t.ib_result", "IB Result") +local f_writer_cnt= ProtoField.uint32("fd_pack_rebate_t.writer_cnt", "Writer Count") +local f_writers = ProtoField.none("fd_pack_rebate_t.writers", "Written Pubkeys") + +local f_writer = ProtoField.none("fd_pack_rebate_t.writer", "Written Pubkey") +local f_pubkey= ProtoField.bytes("fd_pack_rebate_t.pubkey", "Writer Pubkey") +local f_rebate_cus= ProtoField.uint64("fd_pack_rebate_t.rebate_cus", "Rebate CUs") + + +-- Add the fields to the protocol +rebate.fields = { f_total_cost_rebate, f_data_bytes_rebate, f_microblock_cnt_rebate, f_alloc_rebate, f_ib_result, f_writer_cnt, f_pubkey, f_rebate_cus, f_writers, f_writer } + +function rebate.dissector(buffer, pinfo, tree) + if buffer:len() < 40 then return end + local writer_cnt = buffer(36, 4):le_uint() + -- Add fields to the tree + tree:add_le(f_total_cost_rebate, buffer(0, 8)) + tree:add_le(f_data_bytes_rebate, buffer(8, 8)) + tree:add_le(f_microblock_cnt_rebate, buffer(16, 8)) + tree:add_le(f_alloc_rebate, buffer(24, 8)) + tree:add_le(f_ib_result, buffer(32, 4)) + tree:add_le(f_writer_cnt, buffer(36, 4)) + + if writer_cnt>0 then + local tvb = buffer(40) + local subtree = tree:add(f_writers, tvb) + for i=1,writer_cnt,1 do + local s2 = subtree:add(f_writer, tvb(i*40-40, 40)) + s2:add_le(f_pubkey, tvb(i*40-40, 32)) + s2:add_le(f_rebate_cus, tvb(i*40-8, 8)) + end + end +end +-- Define a new protocol +local fd_became_leader = Proto("fd_became_leader_t", "FD Replay Became Leader Message") + +-- Define fields +local f_slot = ProtoField.uint64("fd_became_leader_t.slot", "Slot") +local f_slot_start = ProtoField.absolute_time("fd_became_leader_t.slot_start", "Slot start time", base.UTC) +local f_slot_end = ProtoField.absolute_time("fd_became_leader_t.slot_end", "Slot end time", base.UTC) +local f_bank_idx = ProtoField.uint64("fd_became_leader_t.bank_idx", "Bank Index") +local f_bank_seq = ProtoField.uint64("fd_became_leader_t.bank_seq", "Bank Sequence") +local f_max_microblocks_in_slot = ProtoField.uint64("fd_became_leader_t.max_microblocks_in_slot", "Maximum allowed microblocks in slot") +local f_ticks_per_slot = ProtoField.uint64("fd_became_leader_t.ticks_per_slot", "Ticks per slot") + +-- Add the fields to the protocol +fd_became_leader.fields = { f_slot, f_slot_start, f_slot_end, f_bank_idx, f_bank_seq, f_max_microblocks_in_slot, f_ticks_per_slot } + +function fd_became_leader.dissector(buffer, pinfo, tree) + if buffer:len() < 56 then return end + local subtree = tree:add(fd_became_leader, buffer(), "fd_became_leader_t") + + -- Extract fields from buffer + local slot_start = buffer(8, 8):le_int64() + local slot_end = buffer(16, 8):le_int64() + + -- Add fields to the tree + subtree:add_le(f_slot, buffer(0, 8)) + subtree:add(f_slot_start, buffer(8, 8), NSTime.new( (slot_start/1000000000):tonumber(), (slot_start%1000000000):lower()) ) + subtree:add(f_slot_end, buffer(16, 8), NSTime.new( (slot_end /1000000000):tonumber(), (slot_end %1000000000):lower()) ) + subtree:add_le(f_bank_idx, buffer(24, 8)) + subtree:add_le(f_bank_seq, buffer(32, 8)) + subtree:add_le(f_max_microblocks_in_slot, buffer(40, 8)) + subtree:add_le(f_ticks_per_slot, buffer(48, 8)) +end + + +-- Define a new protocol +local fd_done_packing = Proto("fd_done_packing_t", "FD Pack to PoH Done Packing Message") + +local f_microblocks_in_slot = ProtoField.uint64("fd_done_packing_t.microblocks_in_slot", "Microblocks in slot") + +fd_done_packing.fields = { f_microblocks_in_slot } + +function fd_done_packing.dissector(buffer, pinfo, tree) + local subtree = tree:add(fd_done_packing, buffer(), "fd_done_packing_t") + subtree:add_le(f_microblocks_in_slot, buffer(0, 8)) +end + + +-- Define a new protocol +local fd_txnm = Proto("fd_txn_m_t", "FD Transaction with Payload and Metadata") + +-- Define fields +local f_ref_slot = ProtoField.uint64("fd_txn_m_t.reference_slot", "Reference Slot" ) +local f_txn_t_sz = ProtoField.uint16("fd_txn_m_t.txn_t_sz", "Size of fd_txn_t") +local f_source_ipv4 = ProtoField.ipv4("fd_txn_m_t.source_ipv4", "IP Address") + +local source_tpu_enum = { + [1] = "QUIC", + [2] = "UDP", + [3] = "GOSSIP", + [4] = "BUNDLE", + [5] = "TXSEND" +} +local f_source_tpu = ProtoField.uint8("fd_txn_m_t.source_tpu", "Source TPU", base.DEC, source_tpu_enum) +local f_payload_sz = ProtoField.uint16("fd_txn_m_t.payload_sz", "Size of payload") +local f_first_seen_nanos = ProtoField.int64("fd_txn_m_t.first_seen_nanos", "First Seen (ns)") +local f_bundle_id = ProtoField.uint64("fd_txn_m_t.bundle_id", "Bundle ID") +local f_bundle_txn_cnt = ProtoField.uint64("fd_txn_m_t.bundle_txn_cnt", "Bundle Transaction Count") +local f_bundle_commission = ProtoField.uint8("fd_txn_m_t.bundle_commission", "Bundle Commission") +local f_bundle_pubkey = ProtoField.bytes("fd_txn_m_t.bundle_commission_pubkey", "Bundle Commission Pubkey") +local f_alt_entry = ProtoField.bytes("fd_txn_m_t.alt_entry", "Address Lookup Table Account Address") + +-- Add the fields to the protocol +fd_txnm.fields = { f_ref_slot, f_txn_t_sz, f_source_ipv4, f_source_tpu, f_payload_sz, f_first_seen_nanos, f_bundle_id, f_bundle_txn_cnt, f_bundle_commission, f_bundle_pubkey, f_alt_entry } + +function fd_txnm.dissector(buffer, pinfo, tree) + local payload_start = 88 -- sizeof(fd_txn_m_t) + if buffer:len() < payload_start then return end + local subtree = tree:add(fd_txnm, buffer(), "fd_txn_m_t") + + local payload_sz = buffer(8,2):le_uint() + local txn_t_sz = buffer(10,2):le_uint() + -- Add fields to the tree + subtree:add_le(f_ref_slot, buffer(0, 8)) + subtree:add_le(f_payload_sz, buffer(8, 2)) + subtree:add_le(f_txn_t_sz, buffer(10, 2)) + subtree:add(f_source_ipv4, buffer(12, 4)) + subtree:add_le(f_source_tpu, buffer(16, 1)) + + subtree:add_le(f_first_seen_nanos, buffer(24, 8)) + subtree:add_le(f_bundle_id, buffer(32, 8)) + subtree:add_le(f_bundle_txn_cnt, buffer(40, 8)) + subtree:add_le(f_bundle_commission, buffer(48, 1)) + subtree:add(f_bundle_pubkey, buffer(49, 32)) + if payload_start + payload_sz > buffer:len() then return end + + local payload_tree = tree:add(buffer(payload_start,payload_sz), "Solana Transaction") + local udp_dissector = Dissector.get("solana.tpu.udp") + udp_dissector:call(buffer(payload_start,payload_sz):tvb(), pinfo, payload_tree) + + local offset = payload_start + payload_sz + + -- Pre-verify frags don't have fields after the payload. + if offset == buffer:len() or txn_t_sz == 0 then + return + end + + -- Align to 2 + if offset % 2 == 1 then + offset = offset+1 + end + if txn_t_sz < 22 or offset + txn_t_sz > buffer:len() then return end + + local txn_dissector = Dissector.get("fd_txn_t") + local parsed_tree = tree:add(buffer(offset,txn_t_sz), "fd_txn_t") + txn_dissector:call(buffer(offset,txn_t_sz):tvb(), pinfo, parsed_tree) + + offset = offset + txn_t_sz + local alt_addr = math.floor((buffer:len() - offset) / 32) + if alt_addr > 0 then + local alt_subtree = tree:add(buffer(offset, alt_addr*32), "Expanded Address Lookup Tables") + for i=0, alt_addr-1 do + alt_subtree:add(f_alt_entry, buffer(offset + 32*i, 32)) + end + end +end + + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(9001, Dissector.get("solana.tpu.udp")) diff --git a/dissectors/fkie-iop/LICENSE b/dissectors/fkie-iop/LICENSE new file mode 100644 index 0000000..2a2e876 --- /dev/null +++ b/dissectors/fkie-iop/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2024 Fraunhofer FKIE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/dissectors/fkie-iop/README.md b/dissectors/fkie-iop/README.md new file mode 100644 index 0000000..cbd94d7 --- /dev/null +++ b/dissectors/fkie-iop/README.md @@ -0,0 +1,80 @@ +# IOP / JAUS — Fraunhofer FKIE + +Dissecteur Wireshark Lua des messages **JAUS** (SAE AS5669 et AS5669A) +selon les profils d'interopérabilité **IOP** (robots terrestres), généré +par Fraunhofer FKIE à partir des définitions JSIDL : en-tête de transport +(version 1 AS5669 ou version 2 AS5669A, adresses +sous-système.nœud.composant, priorité, accusés, numéro de séquence) +et corps de 660 messages JAUS (services `urn.jaus.jss.core`, `mobility`, +`manipulator`, `ugv`, `environmentSensing`…) (issue #507). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/fkie/iop_wireshark_plugin (`fkie_iop.lua`, script déjà généré, à la racine du dépôt) | +| Commit importé | `6113ea4228d2a8f02f55669d8292582536576828` du 05/08/2026 (dernier commit de la branche par défaut `master`, et dernière modification de `fkie_iop.lua`) | +| Licence amont | MIT, « Copyright (c) 2014-2024 Fraunhofer FKIE » (`LICENSE` du dépôt), compatible avec la licence de ce dépôt (GPL-3.0-or-later) | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur JAUS/IOP dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). Le générateur Python +amont (`fkie_iop_wireshark_plugin/`, schémas XSD, paquet ROS) n'est pas +importé. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/fkie_iop.lua` (≈ 26 700 lignes, 2,7 Mo) | Protocole `iop` sur UDP 3794 et 55555 et TCP 3794 (lignes 345 à 349) ; table `messagetable` des 660 dissecteurs de message, indexée par identifiant JAUS | + +## Utilisation + +Copier `src/fkie_iop.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis Ctrl+Maj+L. +Filtres : `iop`, `iop.message_id`, `iop.src.subsystem`, `iop.dst.node`, +`iop.v1.message_code`, `iop.flags.priority`… Chaque message a aussi son +propre protocole (par exemple `reportidentification_4b00`). + +## Vérification à l'import + +tshark 4.6.4 (Lua 5.4.8) : le fichier se charge sans erreur +(`luac5.4 -p` : OK) et ajoute 661 protocoles. Captures synthétiques +construites d'après la disposition décrite en tête du dissecteur +(lignes 136 à 160) : + +| Essai | Résultat | +|---|---| +| AS5669 (v1), TCP 3794 : commande de transport `CONNECT` (0x0001) | `[CONNECT] 150.64.1->1.1.1, SeqNr: 1` | +| AS5669 (v1) : `QueryIdentification` (0x2B00) | en-tête complet décodé, corps `QueryType: 2 [Subsystem Identification]` | +| AS5669 (v1) : `SetTime` (0x0011) avec horodatage | **erreur Lua** ligne 1633 : `bad argument #3 to 'format' (number expected, got nil)` | +| AS5669A (v2), UDP 3794 : `QueryIdentification`, `ReportIdentification`, `RequestControl`, identifiant inconnu, paquets « first »/« middle » | **non décodé** : seuls la version et l'octet `message_type`/`hc_flags` s'affichent ; colonne Info laissée à UDP | + +## Limites constatées + +- **Incompatibilité avec Lua 5.4 (Wireshark 4.6)** : `bitVal` (ligne 120) + assemble des restes de division devenus des nombres flottants + (`"0.00.0"`) puis appelle `tonumber(…, 2)`, qui renvoie `nil`. Deux + conséquences : + - en AS5669A (version 2, cas courant des systèmes IOP), le test + `hc_flag == 0` (ligne 267) échoue toujours : ni adresses, ni + identifiant, ni corps de message ne sont décodés ; + - les 95 dissecteurs de message qui utilisent `bitVal` (champs de bits : + `SetTime`, `ReportTime`…) lèvent une erreur Lua dès que le champ est + présent. + Le script ne décode correctement qu'en AS5669 (version 1), pour les + messages sans champ de bits. Correction non faite ici (import verbatim). +- Pour la même raison, les vecteurs de présence (`bitstr`, 223 messages) + s'affichent sous la forme `0.00.00.0…` au lieu de `0000 0001`. +- En AS5669 (version 1), le corps transmis au dissecteur de message + commence à l'octet 21 et doit répéter l'identifiant du message (lecture + de `messageid` en tête de chaque dissecteur) ; à vérifier sur une + capture réelle. +- Pas de réassemblage TCP ; la compression d'en-tête (`hc_flags` non nul) + n'est pas traitée (branche vide). +- Environ 690 variables globales (`proto`, champs `pf_*`, `bitVal`, + `bitAND`, `messageid`, `src_id`, `dst_id`, et un protocole global par + message). +- Pas de capture réelle disponible ; captures synthétiques seulement. diff --git a/dissectors/fkie-iop/src/fkie_iop.lua b/dissectors/fkie-iop/src/fkie_iop.lua new file mode 100644 index 0000000..e8727b9 --- /dev/null +++ b/dissectors/fkie-iop/src/fkie_iop.lua @@ -0,0 +1,26248 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/fkie/iop_wireshark_plugin (fkie_iop.lua), +-- commit 6113ea4228d2a8f02f55669d8292582536576828 du 05/08/2026 (dernière modification du fichier : +-- même commit). +-- Licence amont : MIT, « Copyright (c) 2014-2024 Fraunhofer FKIE » (LICENSE du dépôt) — voir README.md et LICENSE. +proto = Proto("IOP", "Interoperability Profiles"); + +pf_messageid = ProtoField.uint16("iop.message_id", "Message ID", base.HEX) +pf_message_name = ProtoField.string("iop.message_name", "Message Name", base.STRING) +pf_sub_messageid = ProtoField.uint16("iop.event.message_id", "Event Message ID", base.HEX) +pf_msg_type = ProtoField.uint8("iop.message_type", "message_type", base.HEX, nil, 0x3F) +pf_hc_flags = ProtoField.uint8("iop.hc_flags", "hc_flags", base.HEX, nil, 0xC0) +pf_flags = ProtoField.uint8("iop.flags", "flags", base.HEX, nil, 0xFF) +pf_f_priority = ProtoField.uint8("iop.flags.priority", "Priority", base.HEX, + {[0]="Low",[1]="Standard",[2]="High",[3]="Safety Critical"}, 0x03) +pf_f_bcast = ProtoField.uint8("iop.flags.bcast", "Broadcast", base.HEX, + {[0]="No Broadcast",[1]="Local Broadcast",[2]="Global Broadcast"}, 0x0C) +pf_f_acknak = ProtoField.uint8("iop.flags.acknack", "Acknak", base.HEX, + {[0]="No response required",[1]="Response required", + [2]="Message negative acknowledge",[3]="Message acknowledged OK"}, 0x30) +pf_f_data_flags = ProtoField.uint8("iop.flags.data_flags", "Data Flags", base.HEX, + {[0]="Only data packet in single-packet stream",[1]="First data packet in multi-packet stream", + [2]="Normal (middle) data packet",[3]="Last data packet in stream"}, 0xC0) + +-- Shared address fields (subsystem is uint16!) +pf_src_subsystem_id = ProtoField.uint16("iop.src.subsystem", "Subsystem", base.DEC) +pf_src_node_id = ProtoField.uint8 ("iop.src.node", "Node", base.DEC) +pf_src_component_id = ProtoField.uint8 ("iop.src.component", "Component", base.DEC) +pf_dst_subsystem_id = ProtoField.uint16("iop.dst.subsystem", "Subsystem", base.DEC) +pf_dst_node_id = ProtoField.uint8 ("iop.dst.node", "Node", base.DEC) +pf_dst_component_id = ProtoField.uint8 ("iop.dst.component", "Component", base.DEC) + +-- AS5669 (v1) specific fields +pf_v1_props = ProtoField.uint8 ("iop.v1.properties", "Properties", base.HEX, nil, 0xFF) +pf_v1_priority = ProtoField.uint8 ("iop.v1.priority", "Priority", base.DEC, nil, 0x0F) +pf_v1_acknak = ProtoField.uint8 ("iop.v1.acknak", "AckNak", base.HEX, + {[0]="No response required",[1]="Response required", + [2]="Negative acknowledge",[3]="Acknowledged OK"}, 0x30) +pf_v1_svc_conn = ProtoField.uint8 ("iop.v1.svc_conn", "Service Connection", base.HEX, + {[0]="Not a service connection",[1]="Service connection"}, 0x40) +pf_v1_exp = ProtoField.uint8 ("iop.v1.experimental", "Experimental", base.HEX, + {[0]="Not experimental",[1]="Experimental"}, 0x80) +pf_v1_msg_code = ProtoField.uint16("iop.v1.message_code", "Message Code", base.HEX) +pf_v1_data_ctrl = ProtoField.uint16("iop.v1.data_ctrl", "Data Control", base.HEX, nil, 0xFFFF) +pf_v1_data_len = ProtoField.uint16("iop.v1.data_len", "Data Length", base.DEC, nil, 0x0FFF) +pf_v1_data_flags = ProtoField.uint16("iop.v1.data_flags", "Data Flags", base.HEX, + {[0]="Single packet",[1]="First packet",[2]="Middle packet",[3]="Last packet"}, 0xF000) +pf_v1_seq_nr = ProtoField.uint16("iop.v1.seq_nr", "Sequence Number", base.DEC) + +proto.fields = { + pf_messageid, pf_message_name, pf_sub_messageid, + pf_msg_type, pf_hc_flags, pf_flags, + pf_f_priority, pf_f_bcast, pf_f_acknak, pf_f_data_flags, + pf_src_subsystem_id, pf_src_node_id, pf_src_component_id, + pf_dst_subsystem_id, pf_dst_node_id, pf_dst_component_id, + pf_v1_props, pf_v1_priority, pf_v1_acknak, pf_v1_svc_conn, pf_v1_exp, + pf_v1_msg_code, pf_v1_data_ctrl, pf_v1_data_len, pf_v1_data_flags, pf_v1_seq_nr, +} + +messagetable = DissectorTable.new("iop.message_id", "IOP Message ID's", ftypes.UINT16, base.HEX) + +local my_info = { version = "2.1.0", author = "Lukas Boes" } +set_plugin_info(my_info) + +-- AS5669 transport control command codes (cmd_code 0x0001-0x0007) +local AS5669_CTRL_CMDS = { + [0x0001] = "CONNECT", + [0x0002] = "ACCEPT", + [0x0003] = "CANCEL", + [0x0004] = "DISCONNECT", + [0x0005] = "CONNECTED", + [0x0006] = "HOLDING_RESPONSE", + [0x0007] = "NOT_AUTHORIZED", +} + +function bitstr(value, bits_count) + local t = {} + local idx = 0 + for i = 1, bits_count do + local rest = value % 2 + table.insert(t, 1, rest) + idx = idx + 1 + if idx == 4 then + idx = 0 + table.insert(t, 1, ' ') + end + value = (value - rest) / 2 + end + return table.concat(t) +end + +function bitstr_part(value, bits_count, start_pos, end_pos) + local t = {} + local idx = 0 + for i = 1, bits_count do + local rest = value % 2 + if start_pos <= idx and idx <= end_pos then + table.insert(t, 1, rest) + else + table.insert(t, 1, '.') + end + idx = idx + 1 + if idx % 4 == 0 then + table.insert(t, 1, ' ') + end + value = (value - rest) / 2 + end + return table.concat(t) +end + +function bitAND(value, bit_pos) + local rest = 0 + for i = 0, bit_pos do + rest = value % 2 + value = (value - rest) / 2 + end + return rest +end + +function bitVal(value, bit_start_pos, bit_end_pos) + local t = {} + for i = 1, bit_start_pos do + local rest = value % 2 + value = (value - rest) / 2 + end + for i = bit_start_pos, bit_end_pos do + local rest = value % 2 + table.insert(t, 1, rest) + value = (value - rest) / 2 + end + return tonumber(table.concat(t), 2) +end + + +-- Dissector entry point +-- ───────────────────────────────────────────────────────────────────────────── +-- AS5669 (v1) full packet layout (offsets from byte 0 incl. transport version): +-- +-- byte 0 : transport version (= 1) +-- bytes 1-2 : header compression flags (LE uint16, always 0x0000) +-- bytes 3-4 : total packet size in bytes (BIG-ENDIAN uint16, min. 20) +-- byte 5 : properties = priority[3:0] | acknak[5:4] | svc_conn[6] | experimental[7] +-- byte 6 : JAUS protocol version (always 2) +-- bytes 7-8 : command code / message ID (LE uint16) +-- bytes 9-12 : destination ID (LE uint32): component[7:0]|node[15:8]|subsystem[31:16] +-- bytes 13-16 : source ID (LE uint32): same layout +-- bytes 17-18 : data control = data_len[11:0] | data_flags[15:12] (LE uint16) +-- bytes 19-20 : sequence number (LE uint16) +-- bytes 21+ : payload +-- +-- AS5669A (v2) full packet layout (offsets from byte 0): +-- byte 0 : transport version (= 2) +-- byte 1 : msg_type[5:0] | hc_flags[7:6] +-- bytes 2-3 : data size (LE uint16, min. 14) +-- byte 4 : flags = priority[1:0] | bcast[3:2] | acknak[5:4] | data_flags[7:6] +-- bytes 5-8 : destination ID (LE uint32): same layout as v1 +-- bytes 9-12 : source ID (LE uint32): same layout as v1 +-- bytes 13-14 : JAUS message ID + start of payload +-- last 2 bytes: sequence number (footer) +-- ───────────────────────────────────────────────────────────────────────────── +function proto.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = proto.name + + local subtree = tree:add(proto, buffer(), "IOP") + local version = buffer(0, 1):le_uint() + + if version == 1 then + -- ── AS5669 (version 1) ────────────────────────────────────────────── + subtree:add_le(buffer(0, 1), "Version: 1 (AS5669)") + + -- minimum size: 1(ver)+2(hdr_compress)+2(total_size)+16(jaus_header) = 21 bytes + if length < 21 then + subtree:add_le(buffer(0, length), "[Packet too short for AS5669 header, need 21 bytes]") + return + end + + -- bytes 1-2: header compression (LE uint16, always 0) + subtree:add_le(buffer(1, 2), + string.format("Header Compression: 0x%04X", buffer(1, 2):le_uint())) + + -- bytes 3-4: total packet size (BIG-ENDIAN uint16) + subtree:add(buffer(3, 2), + string.format("Total Packet Size: %d", buffer(3, 2):uint())) + + -- byte 5: properties flags + local v1_props_tree = subtree:add(pf_v1_props, buffer(5, 1)) + v1_props_tree:add(pf_v1_priority, buffer(5, 1)) + v1_props_tree:add(pf_v1_acknak, buffer(5, 1)) + v1_props_tree:add(pf_v1_svc_conn, buffer(5, 1)) + v1_props_tree:add(pf_v1_exp, buffer(5, 1)) + + -- byte 6: JAUS protocol version (always 2) + subtree:add(buffer(6, 1), + string.format("JAUS Protocol Version: %d", buffer(6, 1):uint())) + + -- bytes 7-8: command code / message ID (LE uint16) + local msg_code = buffer(7, 2):le_uint() + + -- bytes 9-12: destination ID (LE uint32) + local dst_comp = buffer(9, 1):uint() + local dst_node = buffer(10, 1):uint() + local dst_sub = buffer(11, 2):le_uint() + dst_id = string.format("%d.%d.%d", dst_sub, dst_node, dst_comp) + + -- bytes 13-16: source ID (LE uint32) + local src_comp = buffer(13, 1):uint() + local src_node = buffer(14, 1):uint() + local src_sub = buffer(15, 2):le_uint() + src_id = string.format("%d.%d.%d", src_sub, src_node, src_comp) + + subtree:append_text(string.format(", Src: %s, Dst: %s", src_id, dst_id)) + + local dst_tree = subtree:add(buffer(9, 4), + string.format("Destination ID: %s-%d", dst_id, buffer(9, 4):le_uint())) + dst_tree:add_le(pf_dst_subsystem_id, buffer(11, 2)) + dst_tree:add(pf_dst_node_id, buffer(10, 1)) + dst_tree:add(pf_dst_component_id, buffer(9, 1)) + + local src_tree = subtree:add(buffer(13, 4), + string.format("Source ID: %s-%d", src_id, buffer(13, 4):le_uint())) + src_tree:add_le(pf_src_subsystem_id, buffer(15, 2)) + src_tree:add(pf_src_node_id, buffer(14, 1)) + src_tree:add(pf_src_component_id, buffer(13, 1)) + + -- bytes 17-18: data control (LE uint16) + local data_ctrl_tree = subtree:add_le(pf_v1_data_ctrl, buffer(17, 2)) + data_ctrl_tree:add_le(pf_v1_data_len, buffer(17, 2)) + data_ctrl_tree:add_le(pf_v1_data_flags, buffer(17, 2)) + + -- bytes 19-20: sequence number (LE uint16) + local seq_nr = buffer(19, 2):le_uint() + subtree:add_le(pf_v1_seq_nr, buffer(19, 2)) + + -- check for transport control commands (cmd_code 0x0001-0x0007) + local cmd_name = AS5669_CTRL_CMDS[msg_code] + if cmd_name ~= nil then + subtree:add_le(buffer(7, 2), + string.format("Command Code: 0x%04X (%s)", msg_code, cmd_name)) + subtree:append_text(string.format(", [%s]", cmd_name)) + pinfo.cols.info:set(string.format( + "[%s] %s->%s, SeqNr: %d", cmd_name, src_id, dst_id, seq_nr)) + else + -- regular JAUS application message; payload starts at byte 21 + subtree:add_le(pf_v1_msg_code, buffer(7, 2)) + pinfo.cols.info:set(string.format( + "0x%04X, %s->%s, SeqNr: %d", msg_code, src_id, dst_id, seq_nr)) + + if length > 21 then + local packet_dissector = messagetable:get_dissector(msg_code) + if packet_dissector ~= nil then + packet_dissector(buffer(21, length - 21):tvb(), pinfo, tree) + pinfo.cols.info:set(string.format( + "%s, %s->%s, SeqNr: %d", + tostring(pinfo.cols.info), src_id, dst_id, seq_nr)) + end + end + end + + else + -- ── AS5669A (version 2 or unknown) ────────────────────────────────── + subtree:add_le(buffer(0, 1), + string.format("Version: %d (AS5669A)", version)) + + local hc_flag = bitVal(buffer(1, 1):le_uint(), 6, 7) + subtree:add(pf_msg_type, buffer(1, 1)) + subtree:add(pf_hc_flags, buffer(1, 1)) + + if hc_flag == 0 then + local payloadsize = buffer(2, 2):le_uint() + subtree:add_le(buffer(2, 2), "Data Size: " .. payloadsize) + + local PDFlagsSubtree = subtree:add(pf_flags, buffer(4, 1)) + PDFlagsSubtree:add(pf_f_priority, buffer(4, 1)) + PDFlagsSubtree:add(pf_f_bcast, buffer(4, 1)) + PDFlagsSubtree:add(pf_f_acknak, buffer(4, 1)) + PDFlagsSubtree:add(pf_f_data_flags, buffer(4, 1)) + + src_id = string.format("%d.%d.%d", + buffer(11, 2):le_uint(), buffer(10, 1):uint(), buffer(9, 1):uint()) + dst_id = string.format("%d.%d.%d", + buffer(7, 2):le_uint(), buffer(6, 1):uint(), buffer(5, 1):uint()) + subtree:append_text(string.format(", Src: %s, Dst: %s", src_id, dst_id)) + + local dst_id_subtree = subtree:add(buffer(5, 4), + string.format("Destination ID: %s-%d", dst_id, buffer(5, 4):le_uint())) + dst_id_subtree:add_le(pf_dst_subsystem_id, buffer(7, 2)) + dst_id_subtree:add(pf_dst_node_id, buffer(6, 1)) + dst_id_subtree:add(pf_dst_component_id, buffer(5, 1)) + + local src_id_subtree = subtree:add(buffer(9, 4), + string.format("Source ID: %s-%d", src_id, buffer(9, 4):le_uint())) + src_id_subtree:add_le(pf_src_subsystem_id, buffer(11, 2)) + src_id_subtree:add(pf_src_node_id, buffer(10, 1)) + src_id_subtree:add(pf_src_component_id, buffer(9, 1)) + + local seq_nr = buffer(length - 2, 2):le_uint() + subtree:add_le(buffer(length - 2, 2), "Sequence Number: " .. seq_nr) + + local flags_val = buffer(4, 1):le_uint() + local messageid = 0 + + if bitAND(flags_val, 7) == 1 and bitAND(flags_val, 6) == 0 then + local id_str = "Middle Data Packet" + subtree:append_text(string.format(", %s", id_str)) + pinfo.cols.info:set(string.format( + "[middle] %s->%s, SeqNr: %d", src_id, dst_id, seq_nr)) + + elseif bitAND(flags_val, 7) == 1 and bitAND(flags_val, 6) == 1 then + local id_str = "Last Data Packet" + subtree:append_text(string.format(", %s", id_str)) + pinfo.cols.info:set(string.format( + "[last] %s->%s, SeqNr: %d", src_id, dst_id, seq_nr)) + + else + if length - 1 >= 16 then + messageid = buffer(13, 2):le_uint() + end + subtree:add(pf_messageid, buffer(13, 2), messageid, + string.format("Message ID: 0x%04X", messageid)) + + if bitAND(flags_val, 7) == 0 and bitAND(flags_val, 6) == 1 then + pinfo.cols.info:set(string.format("0x%04X [first]", messageid)) + else + pinfo.cols.info:set(string.format("0x%04X", messageid)) + end + + local packet_dissector = messagetable:get_dissector(messageid) + if packet_dissector ~= nil then + packet_dissector(buffer(13, length - 15):tvb(), pinfo, tree) + end + pinfo.cols.info:set(string.format( + "%s, %s->%s, SeqNr: %d", + tostring(pinfo.cols.info), src_id, dst_id, seq_nr)) + end + else + -- handle compression + end + end +end + + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(3794, proto) +udp_port:add(55555, proto) +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(3794, proto) + +-- ############################ +-- Generated Message Dissectors +-- ############################ +requestcontrol_000d = Proto("requestcontrol_000d", "RequestControl 0x000d") +function requestcontrol_000d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestControl", string.format("RequestControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RequestControlRec_tree = body_tree:add("RequestControlRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestControlRec_tree:add(buffer(bufidx, 1), string.format("AuthorityCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x000D, requestcontrol_000d) + +releasecontrol_000e = Proto("releasecontrol_000e", "ReleaseControl 0x000e") +function releasecontrol_000e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReleaseControl", string.format("ReleaseControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReleaseControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x000E, releasecontrol_000e) + +querycontrol_200d = Proto("querycontrol_200d", "QueryControl 0x200d") +function querycontrol_200d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryControl", string.format("QueryControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x200D, querycontrol_200d) + +queryauthority_2001 = Proto("queryauthority_2001", "QueryAuthority 0x2001") +function queryauthority_2001.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAuthority", string.format("QueryAuthority, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAuthority")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2001, queryauthority_2001) + +setauthority_0001 = Proto("setauthority_0001", "SetAuthority 0x0001") +function setauthority_0001.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetAuthority", string.format("SetAuthority, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetAuthority")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_authorityRec_tree = body_tree:add("authorityRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_authorityRec_tree:add(buffer(bufidx, 1), string.format("AuthorityCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x0001, setauthority_0001) + +querytimeout_2003 = Proto("querytimeout_2003", "QueryTimeout 0x2003") +function querytimeout_2003.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTimeout", string.format("QueryTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2003, querytimeout_2003) + +reportcontrol_400d = Proto("reportcontrol_400d", "ReportControl 0x400d") +function reportcontrol_400d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportControl", string.format("ReportControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportControlRec_tree = body_tree:add("ReportControlRec") + body_ReportControlRec_tree:add(buffer(bufidx, 2), string.format("SubsystemID: %d -- (unsigned short integer) Subsystem ID", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_ReportControlRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) Node ID", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ReportControlRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d -- (unsigned byte) Component ID", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportControlRec_tree:add(buffer(bufidx, 1), string.format("AuthorityCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x400D, reportcontrol_400d) + +rejectcontrol_0010 = Proto("rejectcontrol_0010", "RejectControl 0x0010") +function rejectcontrol_0010.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RejectControl", string.format("RejectControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RejectControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RejectControlRec_tree = body_tree:add("RejectControlRec") + local value_set = {[0] = "CONTROL_RELEASED", [1] = "NOT_AVAILABLE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RejectControlRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x0010, rejectcontrol_0010) + +confirmcontrol_000f = Proto("confirmcontrol_000f", "ConfirmControl 0x000f") +function confirmcontrol_000f.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmControl", string.format("ConfirmControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmControlRec_tree = body_tree:add("ConfirmControlRec") + local value_set = {[0] = "CONTROL_ACCEPTED", [1] = "NOT_AVAILABLE", [2] = "INSUFFICIENT_AUTHORITY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmControlRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x000F, confirmcontrol_000f) + +reportauthority_4001 = Proto("reportauthority_4001", "ReportAuthority 0x4001") +function reportauthority_4001.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAuthority", string.format("ReportAuthority, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAuthority")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportAuthorityRec_tree = body_tree:add("ReportAuthorityRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportAuthorityRec_tree:add(buffer(bufidx, 1), string.format("AuthorityCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x4001, reportauthority_4001) + +reporttimeout_4003 = Proto("reporttimeout_4003", "ReportTimeout 0x4003") +function reporttimeout_4003.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_AccessControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTimeout", string.format("ReportTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportTimoutRec_tree = body_tree:add("ReportTimoutRec") + local value_set = {[0] = "TIMEOUT_FEATURE _DISABLED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportTimoutRec_tree:add(buffer(bufidx, 1), string.format("Timeout: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x4003, reporttimeout_4003) + +queryidentification_2b00 = Proto("queryidentification_2b00", "QueryIdentification 0x2b00") +function queryidentification_2b00.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryIdentification", string.format("QueryIdentification, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryIdentification")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryIdentificationRec_tree = body_tree:add("QueryIdentificationRec") + local value_set = {[0] = "Reserved", [1] = "System Identification", [2] = "Subsystem Identification", [3] = "Node Identification", [4] = "Component Identification"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryIdentificationRec_tree:add(buffer(bufidx, 1), string.format("QueryType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x2B00, queryidentification_2b00) + +queryconfiguration_2b01 = Proto("queryconfiguration_2b01", "QueryConfiguration 0x2b01") +function queryconfiguration_2b01.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryConfiguration", string.format("QueryConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryConfigurationRec_tree = body_tree:add("QueryConfigurationRec") + local value_set = {[0] = "Reserved", [1] = "Reserved", [2] = "Subsystem Identification", [3] = "Node Identification"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryConfigurationRec_tree:add(buffer(bufidx, 1), string.format("QueryType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x2B01, queryconfiguration_2b01) + +querysubsystemlist_2b02 = Proto("querysubsystemlist_2b02", "QuerySubsystemList 0x2b02") +function querysubsystemlist_2b02.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySubsystemList", string.format("QuerySubsystemList, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySubsystemList")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2B02, querysubsystemlist_2b02) + +queryservices_2b03 = Proto("queryservices_2b03", "QueryServices 0x2b03") +function queryservices_2b03.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryServices", string.format("QueryServices, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryServices")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_NodeList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "NodeList -- # of Nodes reported. For a single Node Report this field shall be 1") + body_NodeList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 1, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NodeList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_NodeList_count do + local body_NodeList_NodeSeq_tree = body_NodeList_tree:add(string.format("NodeSeq_%d", body_counter - 1)) + local body_NodeList_NodeSeq_NodeRec_tree = body_NodeList_NodeSeq_tree:add("NodeRec") + local value_set = {[0] = "Reserved", [255] = "All nodes in the subsystem"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_NodeList_NodeSeq_NodeRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local bufidx_start_body_NodeList_NodeSeq = bufidx + local body_NodeList_NodeSeq_ComponentList_tree = body_NodeList_NodeSeq_tree:add(buffer(bufidx_start_body_NodeList_NodeSeq, buffer:len() - bufidx_start_body_NodeList_NodeSeq), "ComponentList ") + body_NodeList_NodeSeq_ComponentList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 1, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NodeList_NodeSeq_ComponentList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_NodeList_NodeSeq_counter=1,body_NodeList_NodeSeq_ComponentList_count do + local body_NodeList_NodeSeq_ComponentList_ComponentRec_tree = body_NodeList_NodeSeq_ComponentList_tree:add(string.format("ComponentRec_%d", body_NodeList_NodeSeq_counter - 1)) + local value_set = {[0] = "Reserved", [255] = "All components in the subsystem"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_NodeList_NodeSeq_ComponentList_ComponentRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0x2B03, queryservices_2b03) + +queryservicelist_2b04 = Proto("queryservicelist_2b04", "QueryServiceList 0x2b04") +function queryservicelist_2b04.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryServiceList", string.format("QueryServiceList, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryServiceList")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SubsystemList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SubsystemList -- Number of subsystems reported. For a single subsystem report this field shall be 1") + body_SubsystemList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 1, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_SubsystemList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_SubsystemList_count do + local body_SubsystemList_SubsystemSeq_tree = body_SubsystemList_tree:add(string.format("SubsystemSeq_%d", body_counter - 1)) + local body_SubsystemList_SubsystemSeq_SubsystemRec_tree = body_SubsystemList_SubsystemSeq_tree:add("SubsystemRec") + local value_set = {[0] = "Reserved", [65535] = "All subsystems in the system"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_SubsystemList_SubsystemSeq_SubsystemRec_tree:add(buffer(bufidx, 2), string.format("SubsystemID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local bufidx_start_body_SubsystemList_SubsystemSeq = bufidx + local body_SubsystemList_SubsystemSeq_NodeList_tree = body_SubsystemList_SubsystemSeq_tree:add(buffer(bufidx_start_body_SubsystemList_SubsystemSeq, buffer:len() - bufidx_start_body_SubsystemList_SubsystemSeq), "NodeList -- # of Nodes reported. For a single Node Report this field shall be 1") + body_SubsystemList_SubsystemSeq_NodeList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 1, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SubsystemList_SubsystemSeq_NodeList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_SubsystemList_SubsystemSeq_counter=1,body_SubsystemList_SubsystemSeq_NodeList_count do + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_tree = body_SubsystemList_SubsystemSeq_NodeList_tree:add(string.format("NodeSeq_%d", body_SubsystemList_SubsystemSeq_counter - 1)) + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_NodeRec_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_tree:add("NodeRec") + local value_set = {[0] = "Reserved", [255] = "All nodes in the subsystem"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_NodeRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq = bufidx + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_tree:add(buffer(bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq, buffer:len() - bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq), "ComponentList ") + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 1, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_counter=1,body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_count do + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_tree:add(string.format("ComponentRec_%d", body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_counter - 1)) + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_pv = buffer(bufidx, 1):le_uint() + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_pv_count = 0 + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "Reserved", [255] = "All components in the subsystem"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_pv, body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_pv_count) > 0) then + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_SearchFilter_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("SearchFilter[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_SearchFilter_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_pv_count = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentRec_pv_count + 1 + end + end + end +end +messagetable:add(0x2B04, queryservicelist_2b04) + +registerservices_0b00 = Proto("registerservices_0b00", "RegisterServices 0x0b00") +function registerservices_0b00.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RegisterServices", string.format("RegisterServices, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RegisterServices")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ServiceList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ServiceList ") + body_ServiceList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ServiceList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ServiceList_count do + local body_ServiceList_ServiceRec_tree = body_ServiceList_tree:add(string.format("ServiceRec_%d", body_counter - 1)) + local body_ServiceList_ServiceRec_URI_tree = body_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("URI[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ServiceList_ServiceRec_URI_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + body_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1), string.format("MajorVersionNumber: %d -- (unsigned byte) Major version number of the service", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1), string.format("MinorVersionNumber: %d -- (unsigned byte) Minor version number of the service", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x0B00, registerservices_0b00) + +reportidentification_4b00 = Proto("reportidentification_4b00", "ReportIdentification 0x4b00") +function reportidentification_4b00.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportIdentification", string.format("ReportIdentification, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportIdentification")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportIdentificationRec_tree = body_tree:add("ReportIdentificationRec") + local value_set = {[0] = "Reserved", [1] = "System Identification", [2] = "Subsystem Identification", [3] = "Node Identification", [4] = "Component Identification"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportIdentificationRec_tree:add(buffer(bufidx, 1), string.format("QueryType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "RESERVED", [10001] = "VEHICLE", [20001] = "OCU", [30001] = "OTHER_SUBSYSTEM", [40001] = "NODE", [50001] = "PAYLOAD", [60001] = "COMPONENT"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ReportIdentificationRec_tree:add(buffer(bufidx, 2), string.format("Type: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_ReportIdentificationRec_Identification_tree = body_ReportIdentificationRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Identification[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ReportIdentificationRec_Identification_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() +end +messagetable:add(0x4B00, reportidentification_4b00) + +reportconfiguration_4b01 = Proto("reportconfiguration_4b01", "ReportConfiguration 0x4b01") +function reportconfiguration_4b01.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportConfiguration", string.format("ReportConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_NodeList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "NodeList -- # of Nodes reported. For a single Node Report this field shall be 1") + body_NodeList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NodeList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_NodeList_count do + local body_NodeList_NodeSeq_tree = body_NodeList_tree:add(string.format("NodeSeq_%d", body_counter - 1)) + local body_NodeList_NodeSeq_NodeRec_tree = body_NodeList_NodeSeq_tree:add("NodeRec") + body_NodeList_NodeSeq_NodeRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) Node ID. For single Node or Component reporting this field shall contain the Node ID as specified in the Destination Address of the Query Configuration message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_NodeList_NodeSeq = bufidx + local body_NodeList_NodeSeq_ComponentList_tree = body_NodeList_NodeSeq_tree:add(buffer(bufidx_start_body_NodeList_NodeSeq, buffer:len() - bufidx_start_body_NodeList_NodeSeq), "ComponentList ") + body_NodeList_NodeSeq_ComponentList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NodeList_NodeSeq_ComponentList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_NodeList_NodeSeq_counter=1,body_NodeList_NodeSeq_ComponentList_count do + local body_NodeList_NodeSeq_ComponentList_ComponentRec_tree = body_NodeList_NodeSeq_ComponentList_tree:add(string.format("ComponentRec_%d", body_NodeList_NodeSeq_counter - 1)) + body_NodeList_NodeSeq_ComponentList_ComponentRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d -- (unsigned byte) Component ID. For Single Component reporting this field shall contain the Component ID as specified in the Destination Address of the Query Configuration message and shall be the only Component reported", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_NodeList_NodeSeq_ComponentList_ComponentRec_tree:add(buffer(bufidx, 1), string.format("InstanceID: %d -- (unsigned byte) Inst ID when legacy Components are reported; a value of zero (0) shall be used for non-legacy components.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0x4B01, reportconfiguration_4b01) + +reportsubsystemlist_4b02 = Proto("reportsubsystemlist_4b02", "ReportSubsystemList 0x4b02") +function reportsubsystemlist_4b02.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSubsystemList", string.format("ReportSubsystemList, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSubsystemList")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SubsystemList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SubsystemList ") + body_SubsystemList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SubsystemList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_SubsystemList_count do + local body_SubsystemList_SubsystemRec_tree = body_SubsystemList_tree:add(string.format("SubsystemRec_%d", body_counter - 1)) + body_SubsystemList_SubsystemRec_tree:add(buffer(bufidx, 2), string.format("SubsystemID: %d -- (unsigned short integer) Subsystem ID", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_SubsystemList_SubsystemRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) Node ID used for Query Configuration.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_SubsystemList_SubsystemRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d -- (unsigned byte) Component ID used for Query Configuration.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x4B02, reportsubsystemlist_4b02) + +reportservices_4b03 = Proto("reportservices_4b03", "ReportServices 0x4b03") +function reportservices_4b03.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportServices", string.format("ReportServices, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportServices")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_NodeList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "NodeList -- # of Nodes reported. For a single Node Report this field shall be 1") + body_NodeList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NodeList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_NodeList_count do + local body_NodeList_NodeSeq_tree = body_NodeList_tree:add(string.format("NodeSeq_%d", body_counter - 1)) + local body_NodeList_NodeSeq_NodeRec_tree = body_NodeList_NodeSeq_tree:add("NodeRec") + body_NodeList_NodeSeq_NodeRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) Node ID. For single Node or Component reporting this field shall contain the Node ID as specified in the Destination Address of the Query Configuration message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_NodeList_NodeSeq = bufidx + local body_NodeList_NodeSeq_ComponentList_tree = body_NodeList_NodeSeq_tree:add(buffer(bufidx_start_body_NodeList_NodeSeq, buffer:len() - bufidx_start_body_NodeList_NodeSeq), "ComponentList ") + body_NodeList_NodeSeq_ComponentList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NodeList_NodeSeq_ComponentList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_NodeList_NodeSeq_counter=1,body_NodeList_NodeSeq_ComponentList_count do + local body_NodeList_NodeSeq_ComponentList_ComponentSeq_tree = body_NodeList_NodeSeq_ComponentList_tree:add(string.format("ComponentSeq_%d", body_NodeList_NodeSeq_counter - 1)) + local body_NodeList_NodeSeq_ComponentList_ComponentSeq_ComponentRec_tree = body_NodeList_NodeSeq_ComponentList_ComponentSeq_tree:add("ComponentRec") + body_NodeList_NodeSeq_ComponentList_ComponentSeq_ComponentRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d -- (unsigned byte) Component ID. For Single Component reporting this field shall contain the Component ID as specified in the Destination Address of the Query Configuration message and shall be the only Component reported", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_NodeList_NodeSeq_ComponentList_ComponentSeq_ComponentRec_tree:add(buffer(bufidx, 1), string.format("InstanceID: %d -- (unsigned byte) Inst ID when legacy Components are reported; a value of zero (0) shall be used for non-legacy components.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_NodeList_NodeSeq_ComponentList_ComponentSeq = bufidx + local body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_tree = body_NodeList_NodeSeq_ComponentList_ComponentSeq_tree:add(buffer(bufidx_start_body_NodeList_NodeSeq_ComponentList_ComponentSeq, buffer:len() - bufidx_start_body_NodeList_NodeSeq_ComponentList_ComponentSeq), "ServiceList ") + body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_NodeList_NodeSeq_ComponentList_ComponentSeq_counter=1,body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_count do + local body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_tree = body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_tree:add(string.format("ServiceRec_%d", body_NodeList_NodeSeq_ComponentList_ComponentSeq_counter - 1)) + local body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_URI_tree = body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("URI[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_URI_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1), string.format("MajorVersionNumber: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1), string.format("MinorVersionNumber: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end + end +end +messagetable:add(0x4B03, reportservices_4b03) + +reportservicelist_4b04 = Proto("reportservicelist_4b04", "ReportServiceList 0x4b04") +function reportservicelist_4b04.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Discovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportServiceList", string.format("ReportServiceList, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportServiceList")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SubsystemList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SubsystemList ") + body_SubsystemList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_SubsystemList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_SubsystemList_count do + local body_SubsystemList_SubsystemSeq_tree = body_SubsystemList_tree:add(string.format("SubsystemSeq_%d", body_counter - 1)) + local body_SubsystemList_SubsystemSeq_SubsystemRec_tree = body_SubsystemList_SubsystemSeq_tree:add("SubsystemRec") + body_SubsystemList_SubsystemSeq_SubsystemRec_tree:add(buffer(bufidx, 2), string.format("SubsystemID: %d -- (unsigned short integer) Subsystem ID", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local bufidx_start_body_SubsystemList_SubsystemSeq = bufidx + local body_SubsystemList_SubsystemSeq_NodeList_tree = body_SubsystemList_SubsystemSeq_tree:add(buffer(bufidx_start_body_SubsystemList_SubsystemSeq, buffer:len() - bufidx_start_body_SubsystemList_SubsystemSeq), "NodeList -- # of Nodes reported. For a single Node Report this field shall be 1") + body_SubsystemList_SubsystemSeq_NodeList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SubsystemList_SubsystemSeq_NodeList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_SubsystemList_SubsystemSeq_counter=1,body_SubsystemList_SubsystemSeq_NodeList_count do + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_tree = body_SubsystemList_SubsystemSeq_NodeList_tree:add(string.format("NodeSeq_%d", body_SubsystemList_SubsystemSeq_counter - 1)) + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_NodeRec_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_tree:add("NodeRec") + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_NodeRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) Node ID. For single Node or Component reporting this field shall contain the Node ID as specified in the Destination Address of the Query Configuration message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq = bufidx + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_tree:add(buffer(bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq, buffer:len() - bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq), "ComponentList ") + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_counter=1,body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_count do + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_tree:add(string.format("ComponentSeq_%d", body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_counter - 1)) + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ComponentRec_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_tree:add("ComponentRec") + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ComponentRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d -- (unsigned byte) Component ID. For Single Component reporting this field shall contain the Component ID as specified in the Destination Address of the Query Configuration message and shall be the only Component reported", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ComponentRec_tree:add(buffer(bufidx, 1), string.format("InstanceID: %d -- (unsigned byte) Inst ID when legacy Components are reported; a value of zero (0) shall be used for non-legacy components.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq = bufidx + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_tree:add(buffer(bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq, buffer:len() - bufidx_start_body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq), "ServiceList ") + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_counter=1,body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_count do + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_tree:add(string.format("ServiceRec_%d", body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_counter - 1)) + local body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_URI_tree = body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("URI[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_URI_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1), string.format("MajorVersionNumber: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_SubsystemList_SubsystemSeq_NodeList_NodeSeq_ComponentList_ComponentSeq_ServiceList_ServiceRec_tree:add(buffer(bufidx, 1), string.format("MinorVersionNumber: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end + end + end +end +messagetable:add(0x4B04, reportservicelist_4b04) + +createevent_01f0 = Proto("createevent_01f0", "CreateEvent 0x01f0") +function createevent_01f0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "CreateEvent", string.format("CreateEvent, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "CreateEvent")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_CreateEventRec_tree = body_tree:add("CreateEventRec") + body_CreateEventRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Local request ID for use in confirm event", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "Periodic (SC)", [1] = "Every change"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_CreateEventRec_tree:add(buffer(bufidx, 1), string.format("EventType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_CreateEventRec_tree:add(buffer(bufidx, 2), string.format("RequestedPeriodicRate: %.4f (scaled) -- (unsigned short integer) Must be specified for periodic event, and set to 0 for every change", buffer(bufidx, 2):le_uint() * 0.016662851911 + (0.000000000000))) + bufidx = bufidx + 2 + body_CreateEventRec_tree:add(buffer(bufidx, 4), string.format("Count: %d, min_count: 2, max_count: 2147483647", buffer(bufidx, 4):le_uint())) + local body_CreateEventRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + if body_CreateEventRec_count > buffer:len() - bufidx then + body_CreateEventRec_count = buffer:len() - bufidx + end + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_CreateEventRec_count):tvb(), pinfo, tree) + else + local body_CreateEventRec_QueryMessage_tree = body_CreateEventRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_CreateEventRec_count)) + body_CreateEventRec_QueryMessage_tree:append_text(", unknown message") + end + bufidx = bufidx + body_CreateEventRec_count +end +messagetable:add(0x01F0, createevent_01f0) + +createcommandevent_01f6 = Proto("createcommandevent_01f6", "CreateCommandEvent 0x01f6") +function createcommandevent_01f6.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "CreateCommandEvent", string.format("CreateCommandEvent, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "CreateCommandEvent")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_CreateEventRec_tree = body_tree:add("CreateEventRec") + body_CreateEventRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Local request ID for use in confirm event", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_CreateEventRec_tree:add(buffer(bufidx, 4), string.format("MaximumAllowedDuration: %d -- (unsigned integer) Any commands not executed within the maximum allowed time are considered a failure.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_CreateEventRec_tree:add(buffer(bufidx, 4), string.format("Count: %d, min_count: 2, max_count: 2147483647", buffer(bufidx, 4):le_uint())) + local body_CreateEventRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + if body_CreateEventRec_count > buffer:len() - bufidx then + body_CreateEventRec_count = buffer:len() - bufidx + end + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_CreateEventRec_count):tvb(), pinfo, tree) + else + local body_CreateEventRec_CommandMessage_tree = body_CreateEventRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_CreateEventRec_count)) + body_CreateEventRec_CommandMessage_tree:append_text(", unknown message") + end + bufidx = bufidx + body_CreateEventRec_count +end +messagetable:add(0x01F6, createcommandevent_01f6) + +updateevent_01f1 = Proto("updateevent_01f1", "UpdateEvent 0x01f1") +function updateevent_01f1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "UpdateEvent", string.format("UpdateEvent, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "UpdateEvent")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_UpdateEventRec_tree = body_tree:add("UpdateEventRec") + body_UpdateEventRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Local request ID for use in confirm event", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "Periodic (SC)", [1] = "Every change"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_UpdateEventRec_tree:add(buffer(bufidx, 1), string.format("EventType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_UpdateEventRec_tree:add(buffer(bufidx, 2), string.format("RequestedPeriodicRate: %.4f (scaled) -- (unsigned short integer) Must be specified for periodic event, and set to 0 for every change", buffer(bufidx, 2):le_uint() * 0.016662851911 + (0.000000000000))) + bufidx = bufidx + 2 + body_UpdateEventRec_tree:add(buffer(bufidx, 1), string.format("EventID: %d -- (unsigned byte) Unique identifier of existing event to update", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_UpdateEventRec_tree:add(buffer(bufidx, 4), string.format("Count: %d, min_count: 2, max_count: 2147483647", buffer(bufidx, 4):le_uint())) + local body_UpdateEventRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + if body_UpdateEventRec_count > buffer:len() - bufidx then + body_UpdateEventRec_count = buffer:len() - bufidx + end + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_UpdateEventRec_count):tvb(), pinfo, tree) + else + local body_UpdateEventRec_QueryMessage_tree = body_UpdateEventRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_UpdateEventRec_count)) + body_UpdateEventRec_QueryMessage_tree:append_text(", unknown message") + end + bufidx = bufidx + body_UpdateEventRec_count +end +messagetable:add(0x01F1, updateevent_01f1) + +cancelevent_01f2 = Proto("cancelevent_01f2", "CancelEvent 0x01f2") +function cancelevent_01f2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "CancelEvent", string.format("CancelEvent, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "CancelEvent")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_CancelEventRec_tree = body_tree:add("CancelEventRec") + body_CancelEventRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Local request id for use in confirm/reject message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_CancelEventRec_tree:add(buffer(bufidx, 1), string.format("EventID: %d -- (unsigned byte) unique id of the event to be removed", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x01F2, cancelevent_01f2) + +queryevents_21f0 = Proto("queryevents_21f0", "QueryEvents 0x21f0") +function queryevents_21f0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEvents", string.format("QueryEvents, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEvents")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryEventsVar_tree = body_tree:add("QueryEventsVar") + body_QueryEventsVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 3", buffer(bufidx, 1):le_uint())) + local body_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_index == 0) then + local body_QueryEventsVar_MessageIDRec_tree = body_QueryEventsVar_tree:add("MessageIDRec") + body_QueryEventsVar_MessageIDRec_tree:add(buffer(bufidx, 2), string.format("MessageCode: %d -- (unsigned short integer) Query Message ID of the Event message that the receiving component is inquiring about.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + if (body_index == 1) then + local body_QueryEventsVar_EventTypeRec_tree = body_QueryEventsVar_tree:add("EventTypeRec") + local value_set = {[0] = "Periodic (SC)", [1] = "Every change"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryEventsVar_EventTypeRec_tree:add(buffer(bufidx, 1), string.format("EventType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_index == 2) then + local body_QueryEventsVar_EventIDRec_tree = body_QueryEventsVar_tree:add("EventIDRec") + body_QueryEventsVar_EventIDRec_tree:add(buffer(bufidx, 1), string.format("EventID: %d -- (unsigned byte) Event ID returned by Confirm Event for details on specific event.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + if (body_index == 3) then + local body_QueryEventsVar_AllEventsRec_tree = body_QueryEventsVar_tree:add("AllEventsRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryEventsVar_AllEventsRec_tree:add(buffer(bufidx, 1), string.format("AllEvents: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x21F0, queryevents_21f0) + +queryeventtimeout_21f2 = Proto("queryeventtimeout_21f2", "QueryEventTimeout 0x21f2") +function queryeventtimeout_21f2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEventTimeout", string.format("QueryEventTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEventTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x21F2, queryeventtimeout_21f2) + +confirmeventrequest_01f3 = Proto("confirmeventrequest_01f3", "ConfirmEventRequest 0x01f3") +function confirmeventrequest_01f3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmEventRequest", string.format("ConfirmEventRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmEventRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmEventRequestRec_tree = body_tree:add("ConfirmEventRequestRec") + body_ConfirmEventRequestRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID of the event maintenance request (Create, Update, or Cancel)", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ConfirmEventRequestRec_tree:add(buffer(bufidx, 1), string.format("EventID: %d -- (unsigned byte) The identifier of the specific event", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ConfirmEventRequestRec_tree:add(buffer(bufidx, 2), string.format("ConfirmedPeriodicRate: %.4f (scaled) -- (unsigned short integer) Requested rate or closest to requested rate", buffer(bufidx, 2):le_uint() * 0.016662851911 + (0.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x01F3, confirmeventrequest_01f3) + +rejecteventrequest_01f4 = Proto("rejecteventrequest_01f4", "RejectEventRequest 0x01f4") +function rejecteventrequest_01f4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RejectEventRequest", string.format("RejectEventRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RejectEventRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RejectEventRequestRec_tree = body_tree:add("RejectEventRequestRec") + local body_RejectEventRequestRec_pv = buffer(bufidx, 1):le_uint() + local body_RejectEventRequestRec_pv_count = 0 + body_RejectEventRequestRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_RejectEventRequestRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID of the event maintenance request (create, update, or cancel)", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_RejectEventRequestRec_pv, body_RejectEventRequestRec_pv_count) > 0) then + local value_set = {[1] = "periodic events not supported", [2] = "change based events not supported", [3] = "connection refused", [4] = "invalid event setup", [5] = "message not supported", [6] = "error, invalid event ID for update event request"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RejectEventRequestRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_RejectEventRequestRec_pv_count = body_RejectEventRequestRec_pv_count + 1 + if (bitAND(body_RejectEventRequestRec_pv, body_RejectEventRequestRec_pv_count) > 0) then + body_RejectEventRequestRec_tree:add(buffer(bufidx, 80), string.format("ErrorMessage [80]: %s", buffer(bufidx, 80):string())) + bufidx = bufidx + 80 + end + body_RejectEventRequestRec_pv_count = body_RejectEventRequestRec_pv_count + 1 +end +messagetable:add(0x01F4, rejecteventrequest_01f4) + +reportevents_41f0 = Proto("reportevents_41f0", "ReportEvents 0x41f0") +function reportevents_41f0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEvents", string.format("ReportEvents, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEvents")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_EventList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "EventList -- List of reported events") + body_EventList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_EventList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_EventList_count do + local body_EventList_ReportEventRec_tree = body_EventList_tree:add(string.format("ReportEventRec_%d", body_counter - 1)) + local value_set = {[0] = "Periodic (SC)", [1] = "Every change"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_EventList_ReportEventRec_tree:add(buffer(bufidx, 1), string.format("EventType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_EventList_ReportEventRec_tree:add(buffer(bufidx, 1), string.format("EventID: %d -- (unsigned byte) Unique identifier of event", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_EventList_ReportEventRec_tree:add(buffer(bufidx, 4), string.format("Count: %d, min_count: 2, max_count: 2147483647", buffer(bufidx, 4):le_uint())) + local body_EventList_ReportEventRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + if body_EventList_ReportEventRec_count > buffer:len() - bufidx then + body_EventList_ReportEventRec_count = buffer:len() - bufidx + end + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_EventList_ReportEventRec_count):tvb(), pinfo, tree) + else + local body_EventList_ReportEventRec_QueryMessage_tree = body_EventList_ReportEventRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_EventList_ReportEventRec_count)) + body_EventList_ReportEventRec_QueryMessage_tree:append_text(", unknown message") + end + bufidx = bufidx + body_EventList_ReportEventRec_count + end +end +messagetable:add(0x41F0, reportevents_41f0) + +event_41f1 = Proto("event_41f1", "Event 0x41f1") +function event_41f1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "Event", string.format("Event, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "Event")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EventRec_tree = body_tree:add("EventRec") + body_EventRec_tree:add(buffer(bufidx, 1), string.format("EventID: %d -- (unsigned byte) Unique identifier of the enclosed event", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_EventRec_tree:add(buffer(bufidx, 1), string.format("SequenceNumber: %d -- (unsigned byte) Sequential count of the number of times this event has been issued", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_EventRec_tree:add(buffer(bufidx, 4), string.format("Count: %d, min_count: 2, max_count: 2147483647", buffer(bufidx, 4):le_uint())) + local body_EventRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + if body_EventRec_count > buffer:len() - bufidx then + body_EventRec_count = buffer:len() - bufidx + end + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_EventRec_count):tvb(), pinfo, tree) + else + local body_EventRec_ReportMessage_tree = body_EventRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_EventRec_count)) + body_EventRec_ReportMessage_tree:append_text(", unknown message") + end + bufidx = bufidx + body_EventRec_count +end +messagetable:add(0x41F1, event_41f1) + +commandevent_41f6 = Proto("commandevent_41f6", "CommandEvent 0x41f6") +function commandevent_41f6.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "CommandEvent", string.format("CommandEvent, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "CommandEvent")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EventRec_tree = body_tree:add("EventRec") + body_EventRec_tree:add(buffer(bufidx, 1), string.format("EventID: %d -- (unsigned byte) Unique identifier of the enclosed event", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESSFUL", [1] = "UNSUCCESSFUL"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_EventRec_tree:add(buffer(bufidx, 1), string.format("CommandResult: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x41F6, commandevent_41f6) + +reporteventtimeout_41f2 = Proto("reporteventtimeout_41f2", "ReportEventTimeout 0x41f2") +function reporteventtimeout_41f2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Events.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEventTimeout", string.format("ReportEventTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEventTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportTimoutRec_tree = body_tree:add("ReportTimoutRec") + local value_set = {[0] = "TIMEOUT_FEATURE _DISABLED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportTimoutRec_tree:add(buffer(bufidx, 1), string.format("Timeout: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x41F2, reporteventtimeout_41f2) + +setelement_041a = Proto("setelement_041a", "SetElement 0x041a") +function setelement_041a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetElement", string.format("SetElement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetElement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetElementSeq_tree = body_tree:add("SetElementSeq") + local body_SetElementSeq_RequestIDRec_tree = body_SetElementSeq_tree:add("RequestIDRec") + body_SetElementSeq_RequestIDRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID of the request. This ID will be returned in the response message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_SetElementSeq = bufidx + local body_SetElementSeq_ElementList_tree = body_SetElementSeq_tree:add(buffer(bufidx_start_body_SetElementSeq, buffer:len() - bufidx_start_body_SetElementSeq), "ElementList ") + body_SetElementSeq_ElementList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SetElementSeq_ElementList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_SetElementSeq_counter=1,body_SetElementSeq_ElementList_count do + local body_SetElementSeq_ElementList_ElementRec_tree = body_SetElementSeq_ElementList_tree:add(string.format("ElementRec_%d", body_SetElementSeq_counter - 1)) + body_SetElementSeq_ElementList_ElementRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Values zero (0) and 65535 are invalid (reserved).", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_SetElementSeq_ElementList_ElementRec_tree:add(buffer(bufidx, 2), string.format("PreviousUID: %d -- (unsigned short integer) UID of the previous (parent) element in the list. The value is zero (0) if this is the first (head) element.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_SetElementSeq_ElementList_ElementRec_tree:add(buffer(bufidx, 2), string.format("NextUID: %d -- (unsigned short integer) UID of the next (child) element in the list. The value is zero (0) if this is the last (tail) element.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local format_field_set = {[0] = "JAUS MESSAGE", [1] = "User defined"} + local format_field_value = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + body_SetElementSeq_ElementList_ElementRec_tree:add(buffer(bufidx, 2), string.format("ElementData: %s [%s] -- (%d)",format_field_value, format_field_set[format_field_value], buffer(bufidx, 2):le_uint())) + local body_SetElementSeq_ElementList_ElementRec_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_SetElementSeq_ElementList_ElementRec_count):tvb(), pinfo, tree) + else + local body_SetElementSeq_ElementList_ElementRec_ElementData_tree = body_SetElementSeq_ElementList_ElementRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_SetElementSeq_ElementList_ElementRec_count)) + body_SetElementSeq_ElementList_ElementRec_ElementData_tree:append_text(", unknown message") + end + bufidx = bufidx + body_SetElementSeq_ElementList_ElementRec_count + end +end +messagetable:add(0x041A, setelement_041a) + +deleteelement_041b = Proto("deleteelement_041b", "DeleteElement 0x041b") +function deleteelement_041b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "DeleteElement", string.format("DeleteElement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "DeleteElement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DeleteElementSeq_tree = body_tree:add("DeleteElementSeq") + local body_DeleteElementSeq_RequestIDRec_tree = body_DeleteElementSeq_tree:add("RequestIDRec") + body_DeleteElementSeq_RequestIDRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID of the request. This ID will be returned in the response message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_DeleteElementSeq = bufidx + local body_DeleteElementSeq_DeleteElementList_tree = body_DeleteElementSeq_tree:add(buffer(bufidx_start_body_DeleteElementSeq, buffer:len() - bufidx_start_body_DeleteElementSeq), "DeleteElementList ") + body_DeleteElementSeq_DeleteElementList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_DeleteElementSeq_DeleteElementList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_DeleteElementSeq_counter=1,body_DeleteElementSeq_DeleteElementList_count do + local body_DeleteElementSeq_DeleteElementList_DeleteElementRec_tree = body_DeleteElementSeq_DeleteElementList_tree:add(string.format("DeleteElementRec_%d", body_DeleteElementSeq_counter - 1)) + body_DeleteElementSeq_DeleteElementList_DeleteElementRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) UID of the element to be deleted, where a value of 65535 represents all element in the list.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x041B, deleteelement_041b) + +queryelement_241a = Proto("queryelement_241a", "QueryElement 0x241a") +function queryelement_241a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryElement", string.format("QueryElement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryElement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryElementRec_tree = body_tree:add("QueryElementRec") + body_QueryElementRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) UID of the queried element. A value of zero (0) represents the first (head) element in the list.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x241A, queryelement_241a) + +queryelementlist_241b = Proto("queryelementlist_241b", "QueryElementList 0x241b") +function queryelementlist_241b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryElementList", string.format("QueryElementList, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryElementList")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x241B, queryelementlist_241b) + +queryelementcount_241c = Proto("queryelementcount_241c", "QueryElementCount 0x241c") +function queryelementcount_241c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryElementCount", string.format("QueryElementCount, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryElementCount")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x241C, queryelementcount_241c) + +confirmelementrequest_041c = Proto("confirmelementrequest_041c", "ConfirmElementRequest 0x041c") +function confirmelementrequest_041c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmElementRequest", string.format("ConfirmElementRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmElementRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RequestIDRec_tree = body_tree:add("RequestIDRec") + body_RequestIDRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID of the request that generated this confirmation message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x041C, confirmelementrequest_041c) + +rejectelementrequest_041d = Proto("rejectelementrequest_041d", "RejectElementRequest 0x041d") +function rejectelementrequest_041d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RejectElementRequest", string.format("RejectElementRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RejectElementRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RejectElementRec_tree = body_tree:add("RejectElementRec") + body_RejectElementRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID of the request that generated this confirmation message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[1] = "Invalid element ID", [2] = "Invalid previous element", [3] = "Invalid next element", [4] = "Unsupported element type", [5] = "Element ID not found", [6] = "Out of memory", [7] = "Unspecified error"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RejectElementRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x041D, rejectelementrequest_041d) + +reportelement_441a = Proto("reportelement_441a", "ReportElement 0x441a") +function reportelement_441a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportElement", string.format("ReportElement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportElement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ElementRec_tree = body_tree:add("ElementRec") + body_ElementRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Values zero (0) and 65535 are invalid (reserved).", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_ElementRec_tree:add(buffer(bufidx, 2), string.format("PreviousUID: %d -- (unsigned short integer) UID of the previous (parent) element in the list. The value is zero (0) if this is the first (head) element.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_ElementRec_tree:add(buffer(bufidx, 2), string.format("NextUID: %d -- (unsigned short integer) UID of the next (child) element in the list. The value is zero (0) if this is the last (tail) element.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local format_field_set = {[0] = "JAUS MESSAGE", [1] = "User defined"} + local format_field_value = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + body_ElementRec_tree:add(buffer(bufidx, 2), string.format("ElementData: %s [%s] -- (%d)",format_field_value, format_field_set[format_field_value], buffer(bufidx, 2):le_uint())) + local body_ElementRec_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_ElementRec_count):tvb(), pinfo, tree) + else + local body_ElementRec_ElementData_tree = body_ElementRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_ElementRec_count)) + body_ElementRec_ElementData_tree:append_text(", unknown message") + end + bufidx = bufidx + body_ElementRec_count +end +messagetable:add(0x441A, reportelement_441a) + +reportelementlist_441b = Proto("reportelementlist_441b", "ReportElementList 0x441b") +function reportelementlist_441b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportElementList", string.format("ReportElementList, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportElementList")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ElementList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ElementList ") + body_ElementList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_ElementList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_ElementList_count do + local body_ElementList_ElementListRec_tree = body_ElementList_tree:add(string.format("ElementListRec_%d", body_counter - 1)) + body_ElementList_ElementListRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) UID of the elements in the list.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x441B, reportelementlist_441b) + +reportelementcount_441c = Proto("reportelementcount_441c", "ReportElementCount 0x441c") +function reportelementcount_441c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_ListManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportElementCount", string.format("ReportElementCount, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportElementCount")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ElementCountRec_tree = body_tree:add("ElementCountRec") + body_ElementCountRec_tree:add(buffer(bufidx, 2), string.format("ElementCount: %d -- (unsigned short integer) Number of elements currently in the list", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x441C, reportelementcount_441c) + +queryheartbeatpulse_2202 = Proto("queryheartbeatpulse_2202", "QueryHeartbeatPulse 0x2202") +function queryheartbeatpulse_2202.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Liveness.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHeartbeatPulse", string.format("QueryHeartbeatPulse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHeartbeatPulse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2202, queryheartbeatpulse_2202) + +reportheartbeatpulse_4202 = Proto("reportheartbeatpulse_4202", "ReportHeartbeatPulse 0x4202") +function reportheartbeatpulse_4202.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Liveness.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportHeartbeatPulse", string.format("ReportHeartbeatPulse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportHeartbeatPulse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x4202, reportheartbeatpulse_4202) + +shutdown_0002 = Proto("shutdown_0002", "Shutdown 0x0002") +function shutdown_0002.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Management.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "Shutdown", string.format("Shutdown, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "Shutdown")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x0002, shutdown_0002) + +standby_0003 = Proto("standby_0003", "Standby 0x0003") +function standby_0003.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Management.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "Standby", string.format("Standby, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "Standby")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x0003, standby_0003) + +resume_0004 = Proto("resume_0004", "Resume 0x0004") +function resume_0004.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Management.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "Resume", string.format("Resume, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "Resume")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x0004, resume_0004) + +reset_0005 = Proto("reset_0005", "Reset 0x0005") +function reset_0005.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Management.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "Reset", string.format("Reset, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "Reset")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x0005, reset_0005) + +setemergency_0006 = Proto("setemergency_0006", "SetEmergency 0x0006") +function setemergency_0006.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Management.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetEmergency", string.format("SetEmergency, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetEmergency")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetEmergencyRec_tree = body_tree:add("SetEmergencyRec") + local value_set = {[1] = "STOP"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_SetEmergencyRec_tree:add(buffer(bufidx, 2), string.format("EmergencyCode: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x0006, setemergency_0006) + +clearemergency_0007 = Proto("clearemergency_0007", "ClearEmergency 0x0007") +function clearemergency_0007.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Management.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ClearEmergency", string.format("ClearEmergency, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ClearEmergency")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ClearEmergencyRec_tree = body_tree:add("ClearEmergencyRec") + local value_set = {[1] = "STOP"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ClearEmergencyRec_tree:add(buffer(bufidx, 2), string.format("EmergencyCode: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x0007, clearemergency_0007) + +querystatus_2002 = Proto("querystatus_2002", "QueryStatus 0x2002") +function querystatus_2002.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Management.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryStatus", string.format("QueryStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2002, querystatus_2002) + +reportstatus_4002 = Proto("reportstatus_4002", "ReportStatus 0x4002") +function reportstatus_4002.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Management.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportStatus", string.format("ReportStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportStatusRec_tree = body_tree:add("ReportStatusRec") + local value_set = {[0] = "INITIALIZE", [1] = "READY", [2] = "STANDBY", [3] = "SHUTDOWN", [4] = "FAILURE", [5] = "EMERGENCY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportStatusRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_ReportStatusRec_tree:add(buffer(bufidx, 4), string.format("Reserved: %d -- (unsigned integer) This field is reserved for compatibility with previous versions of the Standard.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 +end +messagetable:add(0x4002, reportstatus_4002) + +settime_0011 = Proto("settime_0011", "SetTime 0x0011") +function settime_0011.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Time.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetTime", string.format("SetTime, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetTime")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TimeRec_tree = body_tree:add("TimeRec") + local body_TimeRec_pv = buffer(bufidx, 1):le_uint() + local body_TimeRec_pv_count = 0 + body_TimeRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_TimeRec_pv, body_TimeRec_pv_count) > 0) then + local body_TimeRec_TimeStamp_buf = buffer(bufidx, 4) + local body_TimeRec_TimeStamp_tree = body_TimeRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_TimeRec_TimeStamp_buf:le_uint(), 32), body_TimeRec_TimeStamp_buf:le_uint())) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 0, 9))) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 10, 15))) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 16, 21))) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 22, 26))) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_TimeRec_pv_count = body_TimeRec_pv_count + 1 + if (bitAND(body_TimeRec_pv, body_TimeRec_pv_count) > 0) then + local body_TimeRec_DateStamp_buf = buffer(bufidx, 2) + local body_TimeRec_DateStamp_tree = body_TimeRec_tree:add(buffer(bufidx, 2), string.format("%s = DateStamp: 0x%X ", bitstr(body_TimeRec_DateStamp_buf:le_uint(), 16), body_TimeRec_DateStamp_buf:le_uint())) + body_TimeRec_DateStamp_tree:add(buffer(bufidx, 2), string.format("%s = Day: %d", bitstr_part(body_TimeRec_DateStamp_buf:le_uint(), 16, 0, 4), bitVal(body_TimeRec_DateStamp_buf:le_uint(), 0, 4))) + body_TimeRec_DateStamp_tree:add(buffer(bufidx, 2), string.format("%s = Month: %d", bitstr_part(body_TimeRec_DateStamp_buf:le_uint(), 16, 5, 8), bitVal(body_TimeRec_DateStamp_buf:le_uint(), 5, 8))) + body_TimeRec_DateStamp_tree:add(buffer(bufidx, 2), string.format("%s = Year: %d", bitstr_part(body_TimeRec_DateStamp_buf:le_uint(), 16, 9, 15), bitVal(body_TimeRec_DateStamp_buf:le_uint(), 9, 15))) + bufidx = bufidx + 2 + end + body_TimeRec_pv_count = body_TimeRec_pv_count + 1 +end +messagetable:add(0x0011, settime_0011) + +querytime_2011 = Proto("querytime_2011", "QueryTime 0x2011") +function querytime_2011.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Time.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTime", string.format("QueryTime, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTime")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryTimeRec_tree = body_tree:add("QueryTimeRec") + body_QueryTimeRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See corresponding report time message for presence vector mapping", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2011, querytime_2011) + +reporttime_4011 = Proto("reporttime_4011", "ReportTime 0x4011") +function reporttime_4011.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.core/urn_jaus_jss_core_Time.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTime", string.format("ReportTime, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTime")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TimeRec_tree = body_tree:add("TimeRec") + local body_TimeRec_pv = buffer(bufidx, 1):le_uint() + local body_TimeRec_pv_count = 0 + body_TimeRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_TimeRec_pv, body_TimeRec_pv_count) > 0) then + local body_TimeRec_TimeStamp_buf = buffer(bufidx, 4) + local body_TimeRec_TimeStamp_tree = body_TimeRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_TimeRec_TimeStamp_buf:le_uint(), 32), body_TimeRec_TimeStamp_buf:le_uint())) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 0, 9))) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 10, 15))) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 16, 21))) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 22, 26))) + body_TimeRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_TimeRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_TimeRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_TimeRec_pv_count = body_TimeRec_pv_count + 1 + if (bitAND(body_TimeRec_pv, body_TimeRec_pv_count) > 0) then + local body_TimeRec_DateStamp_buf = buffer(bufidx, 2) + local body_TimeRec_DateStamp_tree = body_TimeRec_tree:add(buffer(bufidx, 2), string.format("%s = DateStamp: 0x%X ", bitstr(body_TimeRec_DateStamp_buf:le_uint(), 16), body_TimeRec_DateStamp_buf:le_uint())) + body_TimeRec_DateStamp_tree:add(buffer(bufidx, 2), string.format("%s = Day: %d", bitstr_part(body_TimeRec_DateStamp_buf:le_uint(), 16, 0, 4), bitVal(body_TimeRec_DateStamp_buf:le_uint(), 0, 4))) + body_TimeRec_DateStamp_tree:add(buffer(bufidx, 2), string.format("%s = Month: %d", bitstr_part(body_TimeRec_DateStamp_buf:le_uint(), 16, 5, 8), bitVal(body_TimeRec_DateStamp_buf:le_uint(), 5, 8))) + body_TimeRec_DateStamp_tree:add(buffer(bufidx, 2), string.format("%s = Year: %d", bitstr_part(body_TimeRec_DateStamp_buf:le_uint(), 16, 9, 15), bitVal(body_TimeRec_DateStamp_buf:le_uint(), 9, 15))) + bufidx = bufidx + 2 + end + body_TimeRec_pv_count = body_TimeRec_pv_count + 1 +end +messagetable:add(0x4011, reporttime_4011) + +setanalogvideosensorconfiguration_0806 = Proto("setanalogvideosensorconfiguration_0806", "SetAnalogVideoSensorConfiguration 0x0806") +function setanalogvideosensorconfiguration_0806.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_AnalogVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetAnalogVideoSensorConfiguration", string.format("SetAnalogVideoSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetAnalogVideoSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_AnalogVideoSensorConfigurationSequence_tree = body_tree:add("AnalogVideoSensorConfigurationSequence") + local body_AnalogVideoSensorConfigurationSequence_RequestIdRec_tree = body_AnalogVideoSensorConfigurationSequence_tree:add("RequestIdRec") + body_AnalogVideoSensorConfigurationSequence_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_AnalogVideoSensorConfigurationSequence = bufidx + local body_AnalogVideoSensorConfigurationSequence_AnalogVideoSensorList_tree = body_AnalogVideoSensorConfigurationSequence_tree:add(buffer(bufidx_start_body_AnalogVideoSensorConfigurationSequence, buffer:len() - bufidx_start_body_AnalogVideoSensorConfigurationSequence), "AnalogVideoSensorList ") + body_AnalogVideoSensorConfigurationSequence_AnalogVideoSensorList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_AnalogVideoSensorConfigurationSequence_AnalogVideoSensorList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_AnalogVideoSensorConfigurationSequence_counter=1,body_AnalogVideoSensorConfigurationSequence_AnalogVideoSensorList_count do + local body_AnalogVideoSensorConfigurationSequence_AnalogVideoSensorList_AnalogVideoSensorConfigurationRec_tree = body_AnalogVideoSensorConfigurationSequence_AnalogVideoSensorList_tree:add(string.format("AnalogVideoSensorConfigurationRec_%d", body_AnalogVideoSensorConfigurationSequence_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_AnalogVideoSensorConfigurationSequence_AnalogVideoSensorList_AnalogVideoSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "NTSC-M", [1] = "NTSC-J", [2] = "PAL-N", [3] = "PAL-M", [4] = "SECAM-L", [5] = "SECAM-B/G"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_AnalogVideoSensorConfigurationSequence_AnalogVideoSensorList_AnalogVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("AnalogFormat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x0806, setanalogvideosensorconfiguration_0806) + +queryanalogvideosensorconfiguration_2811 = Proto("queryanalogvideosensorconfiguration_2811", "QueryAnalogVideoSensorConfiguration 0x2811") +function queryanalogvideosensorconfiguration_2811.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_AnalogVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAnalogVideoSensorConfiguration", string.format("QueryAnalogVideoSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAnalogVideoSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SensorIdList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SensorIdList ") + body_SensorIdList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_SensorIdList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_SensorIdList_count do + local body_SensorIdList_SensorIDQueryRec_tree = body_SensorIdList_tree:add(string.format("SensorIDQueryRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_SensorIdList_SensorIDQueryRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2811, queryanalogvideosensorconfiguration_2811) + +queryanalogvideosensorcapabilities_2810 = Proto("queryanalogvideosensorcapabilities_2810", "QueryAnalogVideoSensorCapabilities 0x2810") +function queryanalogvideosensorcapabilities_2810.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_AnalogVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAnalogVideoSensorCapabilities", string.format("QueryAnalogVideoSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAnalogVideoSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SensorIdList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SensorIdList ") + body_SensorIdList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_SensorIdList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_SensorIdList_count do + local body_SensorIdList_SensorIDQueryRec_tree = body_SensorIdList_tree:add(string.format("SensorIDQueryRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_SensorIdList_SensorIDQueryRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2810, queryanalogvideosensorcapabilities_2810) + +reportanalogvideosensorconfiguration_4811 = Proto("reportanalogvideosensorconfiguration_4811", "ReportAnalogVideoSensorConfiguration 0x4811") +function reportanalogvideosensorconfiguration_4811.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_AnalogVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAnalogVideoSensorConfiguration", string.format("ReportAnalogVideoSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAnalogVideoSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_AnalogVideoSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "AnalogVideoSensorConfigurationList ") + body_AnalogVideoSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_AnalogVideoSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_AnalogVideoSensorConfigurationList_count do + local body_AnalogVideoSensorConfigurationList_AnalogVideoSensorConfigurationRec_tree = body_AnalogVideoSensorConfigurationList_tree:add(string.format("AnalogVideoSensorConfigurationRec_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_AnalogVideoSensorConfigurationList_AnalogVideoSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "NTSC-M", [1] = "NTSC-J", [2] = "PAL-N", [3] = "PAL-M", [4] = "SECAM-L", [5] = "SECAM-B/G"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_AnalogVideoSensorConfigurationList_AnalogVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("AnalogFormat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x4811, reportanalogvideosensorconfiguration_4811) + +reportanalogvideosensorcapabilities_4810 = Proto("reportanalogvideosensorcapabilities_4810", "ReportAnalogVideoSensorCapabilities 0x4810") +function reportanalogvideosensorcapabilities_4810.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_AnalogVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAnalogVideoSensorCapabilities", string.format("ReportAnalogVideoSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAnalogVideoSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_AnalogVideoSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "AnalogVideoSensorCapabilitiesList ") + body_AnalogVideoSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_AnalogVideoSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_AnalogVideoSensorCapabilitiesList_count do + local body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_tree = body_AnalogVideoSensorCapabilitiesList_tree:add(string.format("AnalogVideoSensorCapabilitiesRec_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf = buffer(bufidx, 1) + local body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_tree = body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedAnalogFormats: 0x%X ", bitstr(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 8), body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint())) + body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_tree:add(buffer(bufidx, 1), string.format("%s = NTSCM: %d", bitstr_part(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 8, 0, 0), bitVal(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 0, 0))) + body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_tree:add(buffer(bufidx, 1), string.format("%s = NTSCJ: %d", bitstr_part(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 8, 1, 1), bitVal(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 1, 1))) + body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_tree:add(buffer(bufidx, 1), string.format("%s = PALN: %d", bitstr_part(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 8, 2, 2), bitVal(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 2, 2))) + body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_tree:add(buffer(bufidx, 1), string.format("%s = PALM: %d", bitstr_part(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 8, 3, 3), bitVal(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 3, 3))) + body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_tree:add(buffer(bufidx, 1), string.format("%s = SECAML: %d", bitstr_part(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 8, 4, 4), bitVal(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 4, 4))) + body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_tree:add(buffer(bufidx, 1), string.format("%s = SECAMBG: %d", bitstr_part(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 8, 5, 5), bitVal(body_AnalogVideoSensorCapabilitiesList_AnalogVideoSensorCapabilitiesRec_SupportedAnalogFormats_buf:le_uint(), 5, 5))) + bufidx = bufidx + 1 + end +end +messagetable:add(0x4810, reportanalogvideosensorcapabilities_4810) + +setdigitalaudiooutputsource_0818 = Proto("setdigitalaudiooutputsource_0818", "SetDigitalAudioOutputSource 0x0818") +function setdigitalaudiooutputsource_0818.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioOutput.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetDigitalAudioOutputSource", string.format("SetDigitalAudioOutputSource, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetDigitalAudioOutputSource")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DigitalAudioOutputSeq_tree = body_tree:add("DigitalAudioOutputSeq") + local body_DigitalAudioOutputSeq_RequestIdRec_tree = body_DigitalAudioOutputSeq_tree:add("RequestIdRec") + body_DigitalAudioOutputSeq_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_DigitalAudioOutputSeq = bufidx + local body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_tree = body_DigitalAudioOutputSeq_tree:add(buffer(bufidx_start_body_DigitalAudioOutputSeq, buffer:len() - bufidx_start_body_DigitalAudioOutputSeq), "DigitalAudioOutputSourceList ") + body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_DigitalAudioOutputSeq_counter=1,body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_count do + local body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree = body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_tree:add(string.format("DigitalAudioOutputSourceRec_%d", body_DigitalAudioOutputSeq_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_StreamURL_tree = body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("StreamURL[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_StreamURL_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local value_set = {[0] = "PlayOnce", [1] = "RepeatUntilNewStreamSpecified"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree:add(buffer(bufidx, 1), string.format("Repeat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_DigitalAudioOutputSeq_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree:add(buffer(bufidx, 2), string.format("Volume: %.4f (scaled) -- (unsigned short integer) The gain or volume applied to the input as a percent. A value of 0% indicates that no output signal is generated, while a value of 100% indicates that maximum amplification is applied to the input.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x0818, setdigitalaudiooutputsource_0818) + +querydigitalaudiooutputsource_2818 = Proto("querydigitalaudiooutputsource_2818", "QueryDigitalAudioOutputSource 0x2818") +function querydigitalaudiooutputsource_2818.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioOutput.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalAudioOutputSource", string.format("QueryDigitalAudioOutputSource, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalAudioOutputSource")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryDigitalAudioRec_tree = body_tree:add("QueryDigitalAudioRec") + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryDigitalAudioRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x2818, querydigitalaudiooutputsource_2818) + +querydigitalaudiooutputcapabilities_2819 = Proto("querydigitalaudiooutputcapabilities_2819", "QueryDigitalAudioOutputCapabilities 0x2819") +function querydigitalaudiooutputcapabilities_2819.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioOutput.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalAudioOutputCapabilities", string.format("QueryDigitalAudioOutputCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalAudioOutputCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryDigitalAudioRec_tree = body_tree:add("QueryDigitalAudioRec") + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryDigitalAudioRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x2819, querydigitalaudiooutputcapabilities_2819) + +confirmsensorconfiguration_0801 = Proto("confirmsensorconfiguration_0801", "ConfirmSensorConfiguration 0x0801") +function confirmsensorconfiguration_0801.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioOutput.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmSensorConfiguration", string.format("ConfirmSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmSensorConfigurationSequence_tree = body_tree:add("ConfirmSensorConfigurationSequence") + local body_ConfirmSensorConfigurationSequence_RequestIdRec_tree = body_ConfirmSensorConfigurationSequence_tree:add("RequestIdRec") + body_ConfirmSensorConfigurationSequence_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_ConfirmSensorConfigurationSequence = bufidx + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_tree = body_ConfirmSensorConfigurationSequence_tree:add(buffer(bufidx_start_body_ConfirmSensorConfigurationSequence, buffer:len() - bufidx_start_body_ConfirmSensorConfigurationSequence), "ConfirmSensorList ") + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_ConfirmSensorConfigurationSequence_counter=1,body_ConfirmSensorConfigurationSequence_ConfirmSensorList_count do + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_tree:add(string.format("ConfirmSensorConfigurationVariant_%d", body_ConfirmSensorConfigurationSequence_counter - 1)) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 9", buffer(bufidx, 1):le_uint())) + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 0) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_SensorIdRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("SensorIdRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_SensorIdRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 1) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_RangeSensorErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("RangeSensorErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_RangeSensorErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Invalid Horizontal Field of View", [2] = "Invalid Vertical Field of View", [3] = "Invalid Update Rate", [4] = "Invalid Sensor Range", [5] = "Invalid Sensor State", [6] = "Multiple Invalid Parameters", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_RangeSensorErrorRec_tree:add(buffer(bufidx, 1), string.format("RangeSensorErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_RangeSensorErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_RangeSensorErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_RangeSensorErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 2) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VisualSensorErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("VisualSensorErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VisualSensorErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Invalid Sensor State", [2] = "Invalid Zoom Mode", [3] = "Invalid Zoom Value", [4] = "Invalid Focus Mode", [5] = "Invalid Focus Value", [6] = "Invalid White Balance", [7] = "Invalid Imaging Mode", [8] = "Invalid Exposure Mode", [9] = "Invalid Metering Mode", [10] = "Invalid Shutter Speed", [11] = "Invalid Aperture Value", [12] = "Invalid Light Sensitivity", [13] = "Invalid Image Stabilization", [14] = "Invalid Horizontal FOV", [15] = "Invalid Vertical FOV", [16] = "Multiple Invalid Parameters", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VisualSensorErrorRec_tree:add(buffer(bufidx, 1), string.format("VisualSensorErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VisualSensorErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VisualSensorErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VisualSensorErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 3) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalVideoSensorErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("DigitalVideoSensorErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalVideoSensorErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Invalid Minimum Bit Rate", [2] = "Invalid Maximum Bit Rate", [3] = "Requested Frame Rate Too Low", [4] = "Requested Frame Rate Too High", [5] = "Invalid Frame Size", [6] = "Invalid Format", [7] = "Multiple Invalid Parameters", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalVideoSensorErrorRec_tree:add(buffer(bufidx, 1), string.format("DigitalVideoErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalVideoSensorErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalVideoSensorErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalVideoSensorErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 4) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_AnalogVideoSensorErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("AnalogVideoSensorErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_AnalogVideoSensorErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Invalid Format", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_AnalogVideoSensorErrorRec_tree:add(buffer(bufidx, 1), string.format("AnalogVideoErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_AnalogVideoSensorErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_AnalogVideoSensorErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_AnalogVideoSensorErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 5) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_StillImageSensorErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("StillImageSensorErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_StillImageSensorErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Invalid Frame Size", [2] = "Invalid Format", [3] = "Multiple Invalid Parameters", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_StillImageSensorErrorRec_tree:add(buffer(bufidx, 1), string.format("StillImageErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_StillImageSensorErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_StillImageSensorErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_StillImageSensorErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 6) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_H264VideoEncodingErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("H264VideoEncodingErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_H264VideoEncodingErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Invalid Profile", [2] = "Invalid Preset", [3] = "Invalid GroupOfPictures", [4] = "Invalid GDR", [5] = "Invalid RegionOfInterest", [6] = "Invalid IntraMacroRefresh", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_H264VideoEncodingErrorRec_tree:add(buffer(bufidx, 1), string.format("H264VideoEncodingErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_H264VideoEncodingErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_H264VideoEncodingErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_H264VideoEncodingErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 7) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioSensorErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("DigitalAudioSensorErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioSensorErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Invalid BitRate", [2] = "Invalid Format", [3] = "Invalid SampleRate", [4] = "Invalid BitDepth", [5] = "Invalid EncodingQuality", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioSensorErrorRec_tree:add(buffer(bufidx, 1), string.format("DigitalAudioSensorErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioSensorErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioSensorErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioSensorErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 8) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioOutputErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("DigitalAudioOutputErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioOutputErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Stream Not Found", [2] = "Stream Not Supported", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioOutputErrorRec_tree:add(buffer(bufidx, 1), string.format("DigitalAudioOutputErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioOutputErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioOutputErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_DigitalAudioOutputErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_ConfirmSensorConfigurationSequence_ConfirmSensorList_index == 9) then + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VideoIlluminatorErrorRec_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_tree:add("VideoIlluminatorErrorRec") + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VideoIlluminatorErrorRec_tree:add(buffer(bufidx, 2), string.format("IlluminatorID: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local value_set = {[0] = "Unknown Sensor ID", [1] = "Unsupported Mode", [2] = "Unsupported Beam Width", [3] = "Unsupported Beam Height", [255] = "Unknown Error / Fault"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VideoIlluminatorErrorRec_tree:add(buffer(bufidx, 1), string.format("VideoIlluminatorErrorRecCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VideoIlluminatorErrorRec_ErrorMessage_tree = body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VideoIlluminatorErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmSensorConfigurationSequence_ConfirmSensorList_ConfirmSensorConfigurationVariant_VideoIlluminatorErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + end +end +messagetable:add(0x0801, confirmsensorconfiguration_0801) + +reportdigitalaudiooutputsource_4818 = Proto("reportdigitalaudiooutputsource_4818", "ReportDigitalAudioOutputSource 0x4818") +function reportdigitalaudiooutputsource_4818.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioOutput.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalAudioOutputSource", string.format("ReportDigitalAudioOutputSource, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalAudioOutputSource")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalAudioOutputSourceList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalAudioOutputSourceList ") + body_DigitalAudioOutputSourceList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalAudioOutputSourceList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_DigitalAudioOutputSourceList_count do + local body_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree = body_DigitalAudioOutputSourceList_tree:add(string.format("DigitalAudioOutputSourceRec_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_StreamURL_tree = body_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("StreamURL[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_StreamURL_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local value_set = {[0] = "PlayOnce", [1] = "RepeatUntilNewStreamSpecified"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree:add(buffer(bufidx, 1), string.format("Repeat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_DigitalAudioOutputSourceList_DigitalAudioOutputSourceRec_tree:add(buffer(bufidx, 2), string.format("Volume: %.4f (scaled) -- (unsigned short integer) The gain or volume applied to the input as a percent. A value of 0% indicates that no output signal is generated, while a value of 100% indicates that maximum amplification is applied to the input.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x4818, reportdigitalaudiooutputsource_4818) + +reportdigitalaudiooutputcapabilities_4819 = Proto("reportdigitalaudiooutputcapabilities_4819", "ReportDigitalAudioOutputCapabilities 0x4819") +function reportdigitalaudiooutputcapabilities_4819.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioOutput.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalAudioOutputCapabilities", string.format("ReportDigitalAudioOutputCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalAudioOutputCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalAudioOutputCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalAudioOutputCapabilitiesList ") + body_DigitalAudioOutputCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalAudioOutputCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_DigitalAudioOutputCapabilitiesList_count do + local body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree = body_DigitalAudioOutputCapabilitiesList_tree:add(string.format("DigitalAudioOutputCapabilitiesRec_%d", body_counter - 1)) + local body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count = 0 + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv, body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count) > 0) then + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumAllowedBitRate: %d -- (unsigned short integer) kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count = body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv, body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count) > 0) then + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumAllowedBitRate: %d -- (unsigned short integer) kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count = body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv, body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count) > 0) then + local body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf = buffer(bufidx, 4) + local body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree = body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedDigitalFormats: 0x%X ", bitstr(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32), body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint())) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = LPCM_PCM: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 0, 0), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 0, 0))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = AIFF: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 1, 1), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 1, 1))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = WAV: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 2, 2), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 2, 2))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = ALAC: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 3, 3), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 3, 3))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = FLAC: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 4, 4), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 4, 4))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = RealAudio: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 5, 5), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 5, 5))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = WMA9_Lossless: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 6, 6), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 6, 6))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = TrueAudio: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 7, 7), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 7, 7))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = DolbyDigital: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 8, 8), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 8))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = DTS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 9, 9), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 9, 9))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = MP2: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 10, 10), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 10, 10))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = MP3: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 11, 11), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 11, 11))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = AAC_MPEG2: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 12, 12), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 12, 12))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = AAC_MPEG4: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 13, 13), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 13, 13))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = VORBIS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 14, 14), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 14, 14))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = WMA: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 15, 15), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 15, 15))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = Speex: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 16, 16), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 16, 16))) + bufidx = bufidx + 4 + end + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count = body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv, body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count) > 0) then + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinSampleRate: %d -- (unsigned integer) Samples per second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count = body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv, body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count) > 0) then + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaxSampleRate: %d -- (unsigned integer) Samples per second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count = body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv, body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count) > 0) then + local body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf = buffer(bufidx, 2) + local body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree = body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("%s = SupportedBitDepths: 0x%X ", bitstr(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16), body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint())) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = EIGHT_BITS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 0, 0), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 0, 0))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = TEN_BITS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 1, 1), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 1, 1))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = TWELVE_BITS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 2, 2), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 2, 2))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = FOURTEEN_BITS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 3, 3), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 3, 3))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = SIXTEEN_BITS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 4, 4), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 4, 4))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = TWENTY_BITS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 5, 5), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 5, 5))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = TWENTY_FOUR_BITS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 6, 6), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 6, 6))) + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = THIRTY_TWO_BITS: %d", bitstr_part(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 7, 7), bitVal(body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 7, 7))) + bufidx = bufidx + 2 + end + body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count = body_DigitalAudioOutputCapabilitiesList_DigitalAudioOutputCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x4819, reportdigitalaudiooutputcapabilities_4819) + +setdigitalaudiosensorconfiguration_080f = Proto("setdigitalaudiosensorconfiguration_080f", "SetDigitalAudioSensorConfiguration 0x080f") +function setdigitalaudiosensorconfiguration_080f.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetDigitalAudioSensorConfiguration", string.format("SetDigitalAudioSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetDigitalAudioSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DigitalAudioSensorConfigurationSeq_tree = body_tree:add("DigitalAudioSensorConfigurationSeq") + local body_DigitalAudioSensorConfigurationSeq_RequestIdRec_tree = body_DigitalAudioSensorConfigurationSeq_tree:add("RequestIdRec") + body_DigitalAudioSensorConfigurationSeq_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_DigitalAudioSensorConfigurationSeq = bufidx + local body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_tree = body_DigitalAudioSensorConfigurationSeq_tree:add(buffer(bufidx_start_body_DigitalAudioSensorConfigurationSeq, buffer:len() - bufidx_start_body_DigitalAudioSensorConfigurationSeq), "DigitalAudioSensorConfigurationList ") + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_DigitalAudioSensorConfigurationSeq_counter=1,body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_count do + local body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree = body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_tree:add(string.format("DigitalAudioSensorConfigurationRec_%d", body_DigitalAudioSensorConfigurationSeq_counter - 1)) + local body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = 0 + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Sensitivity: %.4f (scaled) -- (unsigned short integer) The gain or volume applied to the input as a percent. A value of 0% indicates that no output signal is generated, while a value of 100% indicates that maximum amplification is applied to the input.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MinimumBitRate: %d -- (unsigned short integer) kilobits per second. Different min and max bitrates may result in a Variable Bit Rate (VBR) stream, if supported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MaximumBitRate: %d -- (unsigned short integer) kilobits per second. Different min and max bitrates may result in a Variable Bit Rate (VBR) stream, if supported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "LPCM_PCM", [1] = "AIFF", [2] = "WAV", [3] = "ALAC", [4] = "FLAC", [5] = "RealAudio", [6] = "WMA9_LOSSLESS", [7] = "TrueAudio", [8] = "DolbyDigital", [9] = "DTS", [10] = "MP2", [11] = "MP3", [12] = "AAC_MPEG2", [13] = "AAC_MPEG4", [14] = "VORBIS", [15] = "WMA", [16] = "Speex"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("DigitalFormat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("SampleRate: %d -- (unsigned integer) Samples per second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "EIGHT_BITS", [1] = "TEN_BITS", [2] = "TWELVE_BITS", [3] = "FOURTEEN_BITS", [4] = "SIXTEEN_BITS", [5] = "TWENTY_BITS", [6] = "TWENTY_FOUR_BITS", [7] = "THIRTY_TWO_BITS"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("BitDepth: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Best", [1] = "Better", [2] = "Good", [3] = "Average", [4] = "Adequate", [5] = "Poor", [6] = "Worst"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("EncodingQuality: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationSeq_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x080F, setdigitalaudiosensorconfiguration_080f) + +querydigitalaudiosensorcapabilities_2817 = Proto("querydigitalaudiosensorcapabilities_2817", "QueryDigitalAudioSensorCapabilities 0x2817") +function querydigitalaudiosensorcapabilities_2817.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalAudioSensorCapabilities", string.format("QueryDigitalAudioSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalAudioSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryDigitalAudioSensorRec_tree = body_tree:add("QueryDigitalAudioSensorRec") + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryDigitalAudioSensorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x2817, querydigitalaudiosensorcapabilities_2817) + +querydigitalaudiosensorconfiguration_280f = Proto("querydigitalaudiosensorconfiguration_280f", "QueryDigitalAudioSensorConfiguration 0x280f") +function querydigitalaudiosensorconfiguration_280f.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalAudioSensorConfiguration", string.format("QueryDigitalAudioSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalAudioSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryDigitalAudioSensorRec_tree = body_tree:add("QueryDigitalAudioSensorRec") + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryDigitalAudioSensorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x280F, querydigitalaudiosensorconfiguration_280f) + +reportdigitalaudiosensorcapabilities_4817 = Proto("reportdigitalaudiosensorcapabilities_4817", "ReportDigitalAudioSensorCapabilities 0x4817") +function reportdigitalaudiosensorcapabilities_4817.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalAudioSensorCapabilities", string.format("ReportDigitalAudioSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalAudioSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalAudioSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalAudioSensorCapabilitiesList ") + body_DigitalAudioSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalAudioSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_DigitalAudioSensorCapabilitiesList_count do + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree = body_DigitalAudioSensorCapabilitiesList_tree:add(string.format("DigitalAudioSensorCapabilitiesRec_%d", body_counter - 1)) + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count = 0 + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv, body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count) > 0) then + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumAllowedBitRate: %d -- (unsigned short integer) kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv, body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count) > 0) then + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumAllowedBitRate: %d -- (unsigned short integer) kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv, body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count) > 0) then + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf = buffer(bufidx, 4) + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedDigitalFormats: 0x%X ", bitstr(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32), body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint())) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = LPCM_PCM: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 0, 0), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 0, 0))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = AIFF: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 1, 1), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 1, 1))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = WAV: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 2, 2), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 2, 2))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = ALAC: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 3, 3), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 3, 3))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = FLAC: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 4, 4), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 4, 4))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = RealAudio: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 5, 5), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 5, 5))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = WMA9_Lossless: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 6, 6), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 6, 6))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = TrueAudio: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 7, 7), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 7, 7))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = DolbyDigital: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 8, 8), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 8))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = DTS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 9, 9), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 9, 9))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = MP2: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 10, 10), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 10, 10))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = MP3: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 11, 11), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 11, 11))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = AAC_MPEG2: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 12, 12), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 12, 12))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = AAC_MPEG4: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 13, 13), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 13, 13))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = VORBIS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 14, 14), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 14, 14))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = WMA: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 15, 15), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 15, 15))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 4), string.format("%s = Speex: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 32, 16, 16), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 16, 16))) + bufidx = bufidx + 4 + end + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv, body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count) > 0) then + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinSampleRate: %d -- (unsigned integer) Samples per second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv, body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count) > 0) then + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaxSampleRate: %d -- (unsigned integer) Samples per second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv, body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count) > 0) then + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf = buffer(bufidx, 2) + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("%s = SupportedBitDepths: 0x%X ", bitstr(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16), body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint())) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = EIGHT_BITS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 0, 0), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 0, 0))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = TEN_BITS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 1, 1), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 1, 1))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = TWELVE_BITS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 2, 2), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 2, 2))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = FOURTEEN_BITS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 3, 3), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 3, 3))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = SIXTEEN_BITS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 4, 4), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 4, 4))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = TWENTY_BITS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 5, 5), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 5, 5))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = TWENTY_FOUR_BITS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 6, 6), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 6, 6))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_tree:add(buffer(bufidx, 2), string.format("%s = THIRTY_TWO_BITS: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 16, 7, 7), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedBitDepths_buf:le_uint(), 7, 7))) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv, body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count) > 0) then + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf = buffer(bufidx, 1) + local body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_tree = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedQualityLevels: 0x%X ", bitstr(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 8), body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint())) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Best: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 8, 0, 0), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 0, 0))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Better: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 8, 1, 1), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 1, 1))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Good: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 8, 2, 2), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 2, 2))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Average: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 8, 3, 3), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 3, 3))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Adequate: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 8, 4, 4), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 4, 4))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Poor: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 8, 5, 5), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 5, 5))) + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Worst: %d", bitstr_part(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 8, 6, 6), bitVal(body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_SupportedQualityLevels_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + end + body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count = body_DigitalAudioSensorCapabilitiesList_DigitalAudioSensorCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x4817, reportdigitalaudiosensorcapabilities_4817) + +reportdigitalaudiosensorconfiguration_480f = Proto("reportdigitalaudiosensorconfiguration_480f", "ReportDigitalAudioSensorConfiguration 0x480f") +function reportdigitalaudiosensorconfiguration_480f.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalAudioSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalAudioSensorConfiguration", string.format("ReportDigitalAudioSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalAudioSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalAudioSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalAudioSensorConfigurationList ") + body_DigitalAudioSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalAudioSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_DigitalAudioSensorConfigurationList_count do + local body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree = body_DigitalAudioSensorConfigurationList_tree:add(string.format("DigitalAudioSensorConfigurationRec_%d", body_counter - 1)) + local body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = 0 + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Sensitivity: %.4f (scaled) -- (unsigned short integer) The gain or volume applied to the input as a percent. A value of 0% indicates that no output signal is generated, while a value of 100% indicates that maximum amplification is applied to the input.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MinimumBitRate: %d -- (unsigned short integer) kilobits per second. Different min and max bitrates may result in a Variable Bit Rate (VBR) stream, if supported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MaximumBitRate: %d -- (unsigned short integer) kilobits per second. Different min and max bitrates may result in a Variable Bit Rate (VBR) stream, if supported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "LPCM_PCM", [1] = "AIFF", [2] = "WAV", [3] = "ALAC", [4] = "FLAC", [5] = "RealAudio", [6] = "WMA9_LOSSLESS", [7] = "TrueAudio", [8] = "DolbyDigital", [9] = "DTS", [10] = "MP2", [11] = "MP3", [12] = "AAC_MPEG2", [13] = "AAC_MPEG4", [14] = "VORBIS", [15] = "WMA", [16] = "Speex"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("DigitalFormat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("SampleRate: %d -- (unsigned integer) Samples per second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "EIGHT_BITS", [1] = "TEN_BITS", [2] = "TWELVE_BITS", [3] = "FOURTEEN_BITS", [4] = "SIXTEEN_BITS", [5] = "TWENTY_BITS", [6] = "TWENTY_FOUR_BITS", [7] = "THIRTY_TWO_BITS"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("BitDepth: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv, body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Best", [1] = "Better", [2] = "Good", [3] = "Average", [4] = "Adequate", [5] = "Poor", [6] = "Worst"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("EncodingQuality: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count = body_DigitalAudioSensorConfigurationList_DigitalAudioSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x480F, reportdigitalaudiosensorconfiguration_480f) + +querydigitalresourceendpoint_2816 = Proto("querydigitalresourceendpoint_2816", "QueryDigitalResourceEndpoint 0x2816") +function querydigitalresourceendpoint_2816.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalResourceDiscovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalResourceEndpoint", string.format("QueryDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2816, querydigitalresourceendpoint_2816) + +registerdigitalresourceendpoint_0808 = Proto("registerdigitalresourceendpoint_0808", "RegisterDigitalResourceEndpoint 0x0808") +function registerdigitalresourceendpoint_0808.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalResourceDiscovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RegisterDigitalResourceEndpoint", string.format("RegisterDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RegisterDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RegisterDigitalResourceSeq_tree = body_tree:add("RegisterDigitalResourceSeq") + local body_RegisterDigitalResourceSeq_RequestIDRec_tree = body_RegisterDigitalResourceSeq_tree:add("RequestIDRec") + body_RegisterDigitalResourceSeq_RequestIDRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Client provided ID to link the response to the request", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree = body_RegisterDigitalResourceSeq_tree:add("DigitalResourceEndpointRec") + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv = buffer(bufidx, 1):le_uint() + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count = 0 + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "RTSP", [1] = "MPEG2_TS", [2] = "FTP", [3] = "SFTP", [4] = "FTP_over_SSH", [5] = "HTTP", [6] = "HTTPS", [7] = "SCP", [8] = "CCSI"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("ServerType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_ServerURL_tree = body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ServerURL[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_ServerURL_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv, body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count) > 0) then + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_tree = body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X ", bitstr(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32), body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint())) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count = body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count + 1 + if (bitAND(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv, body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count) > 0) then + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 2), string.format("ResourceID: %d -- (unsigned short integer) The ID used by the configuration and control service to identify this source. This is the SensorID for visual sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count = body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count + 1 +end +messagetable:add(0x0808, registerdigitalresourceendpoint_0808) + +removedigitalresourceendpoint_0809 = Proto("removedigitalresourceendpoint_0809", "RemoveDigitalResourceEndpoint 0x0809") +function removedigitalresourceendpoint_0809.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalResourceDiscovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RemoveDigitalResourceEndpoint", string.format("RemoveDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RemoveDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RemoveDigitalResourceEndpointRec_tree = body_tree:add("RemoveDigitalResourceEndpointRec") + body_RemoveDigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Unique ID that was returned in the confirm message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_RemoveDigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Client provided ID to link the response to the request", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x0809, removedigitalresourceendpoint_0809) + +reportdigitalresourceendpoint_4816 = Proto("reportdigitalresourceendpoint_4816", "ReportDigitalResourceEndpoint 0x4816") +function reportdigitalresourceendpoint_4816.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalResourceDiscovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalResourceEndpoint", string.format("ReportDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalResourceEndpointList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalResourceEndpointList ") + body_DigitalResourceEndpointList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_DigitalResourceEndpointList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_DigitalResourceEndpointList_count do + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree = body_DigitalResourceEndpointList_tree:add(string.format("DigitalResourceEndpointRec_%d", body_counter - 1)) + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count = 0 + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "RTSP", [1] = "MPEG2_TS", [2] = "FTP", [3] = "SFTP", [4] = "FTP_over_SSH", [5] = "HTTP", [6] = "HTTPS", [7] = "SCP", [8] = "CCSI"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("ServerType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_ServerURL_tree = body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ServerURL[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_ServerURL_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv, body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count) > 0) then + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_tree = body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X ", bitstr(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32), body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint())) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count = body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count + 1 + if (bitAND(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv, body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count) > 0) then + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 2), string.format("ResourceID: %d -- (unsigned short integer) The ID used by the configuration and control service to identify this source. This is the SensorID for visual sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count = body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count + 1 + end +end +messagetable:add(0x4816, reportdigitalresourceendpoint_4816) + +confirmdigitalresourceendpoint_080a = Proto("confirmdigitalresourceendpoint_080a", "ConfirmDigitalResourceEndpoint 0x080a") +function confirmdigitalresourceendpoint_080a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalResourceDiscovery.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmDigitalResourceEndpoint", string.format("ConfirmDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmDigitalResourceEndpointRec_tree = body_tree:add("ConfirmDigitalResourceEndpointRec") + body_ConfirmDigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Unique ID identifying this resource endpoint", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ConfirmDigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Client provided ID to link the response to the request", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x080A, confirmdigitalresourceendpoint_080a) + +controldigitalvideosensorstream_0805 = Proto("controldigitalvideosensorstream_0805", "ControlDigitalVideoSensorStream 0x0805") +function controldigitalvideosensorstream_0805.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ControlDigitalVideoSensorStream", string.format("ControlDigitalVideoSensorStream, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ControlDigitalVideoSensorStream")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ControlDigitalVideoSensorStreamRec_tree = body_tree:add("ControlDigitalVideoSensorStreamRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ControlDigitalVideoSensorStreamRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Play", [1] = "Pause", [2] = "Stop"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ControlDigitalVideoSensorStreamRec_tree:add(buffer(bufidx, 1), string.format("StreamState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x0805, controldigitalvideosensorstream_0805) + +controldigitalvideosensorrecording_0810 = Proto("controldigitalvideosensorrecording_0810", "ControlDigitalVideoSensorRecording 0x0810") +function controldigitalvideosensorrecording_0810.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ControlDigitalVideoSensorRecording", string.format("ControlDigitalVideoSensorRecording, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ControlDigitalVideoSensorRecording")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ControlDigitalVideoSensorRecordingRec_tree = body_tree:add("ControlDigitalVideoSensorRecordingRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ControlDigitalVideoSensorRecordingRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "NotRecording", [1] = "Recording"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ControlDigitalVideoSensorRecordingRec_tree:add(buffer(bufidx, 1), string.format("RequestedRecordingState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x0810, controldigitalvideosensorrecording_0810) + +setdigitalvideosensorconfiguration_0804 = Proto("setdigitalvideosensorconfiguration_0804", "SetDigitalVideoSensorConfiguration 0x0804") +function setdigitalvideosensorconfiguration_0804.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetDigitalVideoSensorConfiguration", string.format("SetDigitalVideoSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetDigitalVideoSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DigitalVideoSensorConfigurationSequence_tree = body_tree:add("DigitalVideoSensorConfigurationSequence") + local body_DigitalVideoSensorConfigurationSequence_RequestIdRec_tree = body_DigitalVideoSensorConfigurationSequence_tree:add("RequestIdRec") + body_DigitalVideoSensorConfigurationSequence_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_DigitalVideoSensorConfigurationSequence = bufidx + local body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_tree = body_DigitalVideoSensorConfigurationSequence_tree:add(buffer(bufidx_start_body_DigitalVideoSensorConfigurationSequence, buffer:len() - bufidx_start_body_DigitalVideoSensorConfigurationSequence), "DigitalVideoSensorList ") + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_DigitalVideoSensorConfigurationSequence_counter=1,body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_count do + local body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_tree = body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_tree:add(string.format("DigitalVideoSensorConfigurationRec_%d", body_DigitalVideoSensorConfigurationSequence_counter - 1)) + local body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count = 0 + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MinimumBitRate: %d -- (unsigned short integer) measured kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MaximumBitRate: %d -- (unsigned short integer) measured kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FrameRate: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "128x96 (sqcif)", [1] = "176x144 (qcif)", [2] = "352x288 (cif)", [3] = "704x576 (4cif)", [4] = "1408x1152 (16cif)", [5] = "160x120 (qqvga)", [6] = "320x240 (qvga)", [7] = "640x480 (vga)", [8] = "800x600 (svga)", [9] = "1024x768 (xga)", [10] = "1600x1200 (uxga)", [11] = "2048x1536 (qxga)", [12] = "1280x1024 (sxga)", [13] = "2560x2048 (qsxga)", [14] = "5120x4096 (hsxga)", [15] = "852x480 (wvga)", [16] = "1366x768 (wxga)", [17] = "1600x1024 (wsxga)", [18] = "1920x1200 (wuxga)", [19] = "2560x1600 (woxga)", [20] = "3200x2048 (wqsxga)", [21] = "3840x2400 (wquxga)", [22] = "6400x4096 (whsxga)", [23] = "7680x4800 (whuxga)", [24] = "320x200 (cga)", [25] = "640x350 (ega)", [26] = "852x480 (hd480)", [27] = "1280x720 (hd720)", [28] = "1920x1080 (hd1080)"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FrameSize: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "AVI", [1] = "MJPEG", [2] = "MPEG-2", [3] = "H.263", [4] = "H.263+", [5] = "MPEG-4 Visual (MPEG-4 Part 2)", [6] = "MPEG-4 AVC"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("DigitalFormat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationSequence_DigitalVideoSensorList_DigitalVideoSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x0804, setdigitalvideosensorconfiguration_0804) + +querydigitalvideosensorconfiguration_2809 = Proto("querydigitalvideosensorconfiguration_2809", "QueryDigitalVideoSensorConfiguration 0x2809") +function querydigitalvideosensorconfiguration_2809.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalVideoSensorConfiguration", string.format("QueryDigitalVideoSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalVideoSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryDigitalVideoConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryDigitalVideoConfigurationList ") + body_QueryDigitalVideoConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryDigitalVideoConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryDigitalVideoConfigurationList_count do + local body_QueryDigitalVideoConfigurationList_QueryDigitalVideoConfigurationRec_tree = body_QueryDigitalVideoConfigurationList_tree:add(string.format("QueryDigitalVideoConfigurationRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryDigitalVideoConfigurationList_QueryDigitalVideoConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_QueryDigitalVideoConfigurationList_QueryDigitalVideoConfigurationRec_tree:add(buffer(bufidx, 1), string.format("QueryPresenceVector: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x2809, querydigitalvideosensorconfiguration_2809) + +querydigitalvideosensorcapabilitiesext_281d = Proto("querydigitalvideosensorcapabilitiesext_281d", "QueryDigitalVideoSensorCapabilitiesExt 0x281d") +function querydigitalvideosensorcapabilitiesext_281d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalVideoSensorCapabilitiesExt", string.format("QueryDigitalVideoSensorCapabilitiesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalVideoSensorCapabilitiesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryDigitalVideoSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryDigitalVideoSensorCapabilitiesList ") + body_QueryDigitalVideoSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryDigitalVideoSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryDigitalVideoSensorCapabilitiesList_count do + local body_QueryDigitalVideoSensorCapabilitiesList_QueryDigitalVideoSensorCapabilitiesRec_tree = body_QueryDigitalVideoSensorCapabilitiesList_tree:add(string.format("QueryDigitalVideoSensorCapabilitiesRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryDigitalVideoSensorCapabilitiesList_QueryDigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_QueryDigitalVideoSensorCapabilitiesList_QueryDigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("QueryPresenceVector: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x281D, querydigitalvideosensorcapabilitiesext_281d) + +querydigitalvideosensorstatus_281e = Proto("querydigitalvideosensorstatus_281e", "QueryDigitalVideoSensorStatus 0x281e") +function querydigitalvideosensorstatus_281e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalVideoSensorStatus", string.format("QueryDigitalVideoSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalVideoSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SensorIdList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SensorIdList ") + body_SensorIdList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_SensorIdList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_SensorIdList_count do + local body_SensorIdList_SensorIDQueryRec_tree = body_SensorIdList_tree:add(string.format("SensorIDQueryRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_SensorIdList_SensorIDQueryRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + end +end +messagetable:add(0x281E, querydigitalvideosensorstatus_281e) + +reportdigitalvideosensorcapabilitiesext_481d = Proto("reportdigitalvideosensorcapabilitiesext_481d", "ReportDigitalVideoSensorCapabilitiesExt 0x481d") +function reportdigitalvideosensorcapabilitiesext_481d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalVideoSensorCapabilitiesExt", string.format("ReportDigitalVideoSensorCapabilitiesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalVideoSensorCapabilitiesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalVideoSensorList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalVideoSensorList ") + body_DigitalVideoSensorList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalVideoSensorList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_DigitalVideoSensorList_count do + local body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree = body_DigitalVideoSensorList_tree:add(string.format("DigitalVideoSensorCapabilitiesRec_%d", body_counter - 1)) + local body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count = 0 + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv, body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count) > 0) then + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumBitRate: %d -- (unsigned short integer) measured kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv, body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count) > 0) then + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumBitRate: %d -- (unsigned short integer) measured kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv, body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count) > 0) then + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("MinimumFrameRate: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv, body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count) > 0) then + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("MaximumFrameRate: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv, body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count) > 0) then + local body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf = buffer(bufidx, 4) + local body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedFrameSizes: 0x%X ", bitstr(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32), body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint())) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = sqcif_128x96: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 0, 0), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 0, 0))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qcif_176x144: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 1, 1), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 1, 1))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = cif_352x288: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 2, 2), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 2, 2))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = cif4_704x576: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 3, 3), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 3, 3))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = cif16_1408x1152: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 4, 4), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 4, 4))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qqvga_160x120: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 5, 5), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 5, 5))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qvga_320x240: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 6, 6), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 6, 6))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = vga_640x480: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 7, 7), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 7, 7))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = svga_800x600: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 8, 8), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 8, 8))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = xga_1024x768: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 9, 9), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 9, 9))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = uxga_1600x1200: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 10, 10), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 10, 10))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qxga_2048x1536: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 11, 11), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 11, 11))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = sxga_1280x1024: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 12, 12), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 12, 12))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qsxga_2560x2048: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 13, 13), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 13, 13))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = hsxga_5120x4096: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 14, 14), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 14, 14))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wvga_852x480: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 15, 15), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 15, 15))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wxga_1366x768: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 16, 16), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 16, 16))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wsxga_1600x1024: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 17, 17), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 17, 17))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wuxga_1920x1200: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 18, 18), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 18, 18))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = woxga_2560x1600: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 19, 19), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 19, 19))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wqsxga_3200x2048: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 20, 20), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 20, 20))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wquxga_3840x2400: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 21, 21), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 21, 21))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = whsxga_6400x4096: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 22, 22), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 22, 22))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = whuxga_7680x4800: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 23, 23), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 23, 23))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = cga_320x200: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 24, 24), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 24, 24))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = ega_640x350: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 25, 25), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 25, 25))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = hd480_852x480: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 26, 26), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 26, 26))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = hd720_1280x720: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 27, 27), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 27, 27))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = hd1080_1920x1080: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 28, 28), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 28, 28))) + bufidx = bufidx + 4 + end + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv, body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count) > 0) then + local body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf = buffer(bufidx, 1) + local body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_tree = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedDigitalFormats: 0x%X ", bitstr(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8), body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint())) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 1), string.format("%s = AVI: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 0, 0), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 0, 0))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 1), string.format("%s = MJPEG: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 1, 1), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 1, 1))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 1), string.format("%s = MPEG2: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 2, 2), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 2, 2))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 1), string.format("%s = h263: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 3, 3), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 3, 3))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 1), string.format("%s = h263plus: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 4, 4), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 4, 4))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 1), string.format("%s = MPEG4_Visual: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 5, 5), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 5, 5))) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_tree:add(buffer(bufidx, 1), string.format("%s = MPEG4_AVC_h264: %d", bitstr_part(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 8, 6, 6), bitVal(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_SupportedDigitalFormats_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv, body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "Unsupported", [1] = "Supported"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("RecordingSupported: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count = body_DigitalVideoSensorList_DigitalVideoSensorCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x481D, reportdigitalvideosensorcapabilitiesext_481d) + +reportdigitalvideosensorconfiguration_4809 = Proto("reportdigitalvideosensorconfiguration_4809", "ReportDigitalVideoSensorConfiguration 0x4809") +function reportdigitalvideosensorconfiguration_4809.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalVideoSensorConfiguration", string.format("ReportDigitalVideoSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalVideoSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalVideoSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalVideoSensorConfigurationList ") + body_DigitalVideoSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalVideoSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_DigitalVideoSensorConfigurationList_count do + local body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_tree = body_DigitalVideoSensorConfigurationList_tree:add(string.format("DigitalVideoSensorConfigurationRec_%d", body_counter - 1)) + local body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count = 0 + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MinimumBitRate: %d -- (unsigned short integer) measured kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MaximumBitRate: %d -- (unsigned short integer) measured kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FrameRate: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "128x96 (sqcif)", [1] = "176x144 (qcif)", [2] = "352x288 (cif)", [3] = "704x576 (4cif)", [4] = "1408x1152 (16cif)", [5] = "160x120 (qqvga)", [6] = "320x240 (qvga)", [7] = "640x480 (vga)", [8] = "800x600 (svga)", [9] = "1024x768 (xga)", [10] = "1600x1200 (uxga)", [11] = "2048x1536 (qxga)", [12] = "1280x1024 (sxga)", [13] = "2560x2048 (qsxga)", [14] = "5120x4096 (hsxga)", [15] = "852x480 (wvga)", [16] = "1366x768 (wxga)", [17] = "1600x1024 (wsxga)", [18] = "1920x1200 (wuxga)", [19] = "2560x1600 (woxga)", [20] = "3200x2048 (wqsxga)", [21] = "3840x2400 (wquxga)", [22] = "6400x4096 (whsxga)", [23] = "7680x4800 (whuxga)", [24] = "320x200 (cga)", [25] = "640x350 (ega)", [26] = "852x480 (hd480)", [27] = "1280x720 (hd720)", [28] = "1920x1080 (hd1080)"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FrameSize: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count + 1 + if (bitAND(body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv, body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "AVI", [1] = "MJPEG", [2] = "MPEG-2", [3] = "H.263", [4] = "H.263+", [5] = "MPEG-4 Visual (MPEG-4 Part 2)", [6] = "MPEG-4 AVC"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("DigitalFormat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count = body_DigitalVideoSensorConfigurationList_DigitalVideoSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x4809, reportdigitalvideosensorconfiguration_4809) + +reportdigitalvideosensorstatus_481e = Proto("reportdigitalvideosensorstatus_481e", "ReportDigitalVideoSensorStatus 0x481e") +function reportdigitalvideosensorstatus_481e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_DigitalVideo.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalVideoSensorStatus", string.format("ReportDigitalVideoSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalVideoSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalVideoSensorStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalVideoSensorStatusList ") + body_DigitalVideoSensorStatusList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalVideoSensorStatusList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_DigitalVideoSensorStatusList_count do + local body_DigitalVideoSensorStatusList_DigitalVideoSensorStatusRec_tree = body_DigitalVideoSensorStatusList_tree:add(string.format("DigitalVideoSensorStatusRec_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_DigitalVideoSensorStatusList_DigitalVideoSensorStatusRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Play", [1] = "Pause", [2] = "Stop"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalVideoSensorStatusList_DigitalVideoSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("StreamingState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "NotRecording", [1] = "Recording"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalVideoSensorStatusList_DigitalVideoSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("RecordingState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x481E, reportdigitalvideosensorstatus_481e) + +queryforcetorquecapabilities_280b = Proto("queryforcetorquecapabilities_280b", "QueryForceTorqueCapabilities 0x280b") +function queryforcetorquecapabilities_280b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_ForceTorqueSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryForceTorqueCapabilities", string.format("QueryForceTorqueCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryForceTorqueCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryForceTorqueCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryForceTorqueCapabilitiesList ") + body_QueryForceTorqueCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryForceTorqueCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryForceTorqueCapabilitiesList_count do + local body_QueryForceTorqueCapabilitiesList_QueryForceTorqueCapabilitiesRec_tree = body_QueryForceTorqueCapabilitiesList_tree:add(string.format("QueryForceTorqueCapabilitiesRec_%d", body_counter - 1)) + body_QueryForceTorqueCapabilitiesList_QueryForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) The ID of the sensor. A value of zero (0) means all sensors", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_QueryForceTorqueCapabilitiesList_QueryForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("QueryPresenceVector: %d -- (unsigned short integer) See ReportForceTorqueCapabilites", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x280B, queryforcetorquecapabilities_280b) + +queryforcetorque_280c = Proto("queryforcetorque_280c", "QueryForceTorque 0x280c") +function queryforcetorque_280c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_ForceTorqueSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryForceTorque", string.format("QueryForceTorque, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryForceTorque")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryForceTorqueList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryForceTorqueList ") + body_QueryForceTorqueList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryForceTorqueList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryForceTorqueList_count do + local body_QueryForceTorqueList_QueryForceTorqueRec_tree = body_QueryForceTorqueList_tree:add(string.format("QueryForceTorqueRec_%d", body_counter - 1)) + body_QueryForceTorqueList_QueryForceTorqueRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) The ID of the sensor. A value of zero (0) means all sensors", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local value_set = {[0] = "NativeCoordinateSystems", [1] = "VehicleCoordinateSystems"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryForceTorqueList_QueryForceTorqueRec_tree:add(buffer(bufidx, 1), string.format("CoordinateSystem: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_QueryForceTorqueList_QueryForceTorqueRec_tree:add(buffer(bufidx, 1), string.format("QueryPresenceVector: %d -- (unsigned byte) See ReportForceTorqueRec", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x280C, queryforcetorque_280c) + +reportforcetorquecapabilities_480b = Proto("reportforcetorquecapabilities_480b", "ReportForceTorqueCapabilities 0x480b") +function reportforcetorquecapabilities_480b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_ForceTorqueSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportForceTorqueCapabilities", string.format("ReportForceTorqueCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportForceTorqueCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ReportForceTorqueCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ReportForceTorqueCapabilitiesList ") + body_ReportForceTorqueCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_ReportForceTorqueCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_ReportForceTorqueCapabilitiesList_count do + local body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree = body_ReportForceTorqueCapabilitiesList_tree:add(string.format("ReportForceTorqueCapabilitiesRec_%d", body_counter - 1)) + local body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = 0 + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) The ID of the sensor. A value of zero (0) means all sensors", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_SensorName_tree = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("SensorName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_SensorName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("CoordinateTransformSupported: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinForceX: %.4f (scaled) -- (unsigned short integer) Most negative force measurable in the X-direction.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaxForceX: %.4f (scaled) -- (unsigned short integer) Most positive force measurable in the X-direction.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinForceY: %.4f (scaled) -- (unsigned short integer) Most negative force measurable in the Y-direction.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaxForceY: %.4f (scaled) -- (unsigned short integer) Most positive force measurable in the Y-direction.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinForceZ: %.4f (scaled) -- (unsigned short integer) Most negative force measurable in the Z-direction.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaxForceZ: %.4f (scaled) -- (unsigned short integer) Most positive force measurable in the Z-direction.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinTorqueX: %.4f (scaled) -- (unsigned short integer) Most negative torque measurable around the X-axis.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaxTorqueX: %.4f (scaled) -- (unsigned short integer) Most positive torque measurable around the X-axis.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinTorqueY: %.4f (scaled) -- (unsigned short integer) Most negative torque measurable around the Y-axis.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaxTorqueY: %.4f (scaled) -- (unsigned short integer) Most positive torque measurable around the Y-axis.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinTorqueZ: %.4f (scaled) -- (unsigned short integer) Most negative torque measurable around the Z-axis.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv, body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count) > 0) then + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaxTorqueZ: %.4f (scaled) -- (unsigned short integer) Most positive torque measurable around the Z-axis.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count = body_ReportForceTorqueCapabilitiesList_ReportForceTorqueCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x480B, reportforcetorquecapabilities_480b) + +reportforcetorque_480c = Proto("reportforcetorque_480c", "ReportForceTorque 0x480c") +function reportforcetorque_480c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_ForceTorqueSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportForceTorque", string.format("ReportForceTorque, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportForceTorque")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ReportForceTorqueList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ReportForceTorqueList ") + body_ReportForceTorqueList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_ReportForceTorqueList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_ReportForceTorqueList_count do + local body_ReportForceTorqueList_ReportForceTorqueRec_tree = body_ReportForceTorqueList_tree:add(string.format("ReportForceTorqueRec_%d", body_counter - 1)) + local body_ReportForceTorqueList_ReportForceTorqueRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportForceTorqueList_ReportForceTorqueRec_pv_count = 0 + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) The ID of the sensor. A value of zero (0) is not allowed", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local value_set = {[0] = "NativeCoordinateSystems", [1] = "VehicleCoordinateSystems"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 1), string.format("CoordinateSystem: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_ReportForceTorqueList_ReportForceTorqueRec_pv, body_ReportForceTorqueList_ReportForceTorqueRec_pv_count) > 0) then + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 2), string.format("ForceX: %.4f (scaled) -- (unsigned short integer) Current force measured in the X-direction", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueList_ReportForceTorqueRec_pv_count = body_ReportForceTorqueList_ReportForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueList_ReportForceTorqueRec_pv, body_ReportForceTorqueList_ReportForceTorqueRec_pv_count) > 0) then + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 2), string.format("ForceY: %.4f (scaled) -- (unsigned short integer) Current force measured in the Y-direction", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueList_ReportForceTorqueRec_pv_count = body_ReportForceTorqueList_ReportForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueList_ReportForceTorqueRec_pv, body_ReportForceTorqueList_ReportForceTorqueRec_pv_count) > 0) then + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 2), string.format("ForceZ: %.4f (scaled) -- (unsigned short integer) Current force measured in the Z-direction", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueList_ReportForceTorqueRec_pv_count = body_ReportForceTorqueList_ReportForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueList_ReportForceTorqueRec_pv, body_ReportForceTorqueList_ReportForceTorqueRec_pv_count) > 0) then + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 2), string.format("TorqueX: %.4f (scaled) -- (unsigned short integer) Current torque measured around the X-axis", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueList_ReportForceTorqueRec_pv_count = body_ReportForceTorqueList_ReportForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueList_ReportForceTorqueRec_pv, body_ReportForceTorqueList_ReportForceTorqueRec_pv_count) > 0) then + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 2), string.format("TorqueY: %.4f (scaled) -- (unsigned short integer) Current torque measured around the Y-axis", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueList_ReportForceTorqueRec_pv_count = body_ReportForceTorqueList_ReportForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportForceTorqueList_ReportForceTorqueRec_pv, body_ReportForceTorqueList_ReportForceTorqueRec_pv_count) > 0) then + body_ReportForceTorqueList_ReportForceTorqueRec_tree:add(buffer(bufidx, 2), string.format("TorqueZ: %.4f (scaled) -- (unsigned short integer) Current torque measured around the Z-axis", buffer(bufidx, 2):le_uint() * 0.152590218967 + (-5000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportForceTorqueList_ReportForceTorqueRec_pv_count = body_ReportForceTorqueList_ReportForceTorqueRec_pv_count + 1 + end +end +messagetable:add(0x480C, reportforcetorque_480c) + +seth264videoencodingconfiguration_080d = Proto("seth264videoencodingconfiguration_080d", "SetH264VideoEncodingConfiguration 0x080d") +function seth264videoencodingconfiguration_080d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_H264VideoEncoding.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetH264VideoEncodingConfiguration", string.format("SetH264VideoEncodingConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetH264VideoEncodingConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_H264ConfigurationListSequence_tree = body_tree:add("H264ConfigurationListSequence") + local body_H264ConfigurationListSequence_RequestIdRec_tree = body_H264ConfigurationListSequence_tree:add("RequestIdRec") + body_H264ConfigurationListSequence_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_H264ConfigurationListSequence = bufidx + local body_H264ConfigurationListSequence_H264ConfigurationList_tree = body_H264ConfigurationListSequence_tree:add(buffer(bufidx_start_body_H264ConfigurationListSequence, buffer:len() - bufidx_start_body_H264ConfigurationListSequence), "H264ConfigurationList ") + body_H264ConfigurationListSequence_H264ConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_H264ConfigurationListSequence_H264ConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_H264ConfigurationListSequence_counter=1,body_H264ConfigurationListSequence_H264ConfigurationList_count do + local body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_tree = body_H264ConfigurationListSequence_H264ConfigurationList_tree:add(string.format("H264ConfigurationSequence_%d", body_H264ConfigurationListSequence_counter - 1)) + local body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv = buffer(bufidx, 1):le_uint() + local body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv_count = 0 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_tree:add("H264ConfigurationRec") + local body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = 0 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) Note: 0 is not a valid VisualSensorID value", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Baseline", [1] = "ConstrainedBaseline", [2] = "Main", [3] = "Extended", [4] = "High", [5] = "ProgressiveHigh", [6] = "ConstrainedHigh", [7] = "High10", [8] = "High422", [9] = "High444Predictive", [10] = "High10Intra", [11] = "High422Intra", [12] = "High444Intra", [13] = "CAVLC444", [14] = "ScalableBaseline", [15] = "ScalableConstrainedBaseline", [16] = "ScalableHigh", [17] = "ScalableConstrainedHigh", [18] = "ScalableHighIntra", [19] = "StereoHigh", [20] = "MultiviewHigh"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Profile: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Level_1", [1] = "Level_1B", [2] = "Level_11", [3] = "Level_12", [4] = "Level_13", [5] = "Level_2", [6] = "Level_21", [7] = "Level_22", [8] = "Level_3", [9] = "Level_31", [10] = "Level_32", [11] = "Level_4", [12] = "Level_41", [13] = "Level_42", [14] = "Level_5", [15] = "Level_51", [16] = "Level_52", [17] = "Level_6", [18] = "Level_61", [19] = "Level_62"} + local value_id, value_name = (value_set[buffer(bufidx, 4):le_uint()]) + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 4), string.format("Level: %d [%s] -- (unsigned integer)", buffer(bufidx, 4):le_uint(), value_id)) + bufidx = bufidx + 4 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "LowLatency", [1] = "SlowComms", [2] = "PersistentStare", [3] = "DriveVision", [4] = "Manipulation", [5] = "BestQuality", [12] = "ProgramSpecific_1", [13] = "ProgramSpecific_2", [14] = "ProgramSpecific_3", [15] = "ProgramSpecific_4"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Preset: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("GroupOfPictures: %d -- (unsigned byte) Number of interim frames before sending a key frame", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "OFF", [1] = "ON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("GradualDecoderRefreshOnOff: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "OFF", [1] = "ON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("RegionOfInterestOnOff: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 2), string.format("IntraMacroRefresh: %.4f (scaled) -- (unsigned short integer) This parameter is the random intra macroblock refresh; it provides the refresh rate in Macroblocks per picture.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv_count) > 0) then + local body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_tree:add("RegionOfInterestParams") + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("X_Start: %.4f (scaled) -- (unsigned short integer) Horizontal start location of high bitrate window, measured as percent of total image width from the left", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("Y_Start: %.4f (scaled) -- (unsigned short integer) Vertical start location of high bitrate window, measured as percent of total image height from the top", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("Width: %.4f (scaled) -- (unsigned short integer) Width of high bitrate window, measured as percent of total image width", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("Height: %.4f (scaled) -- (unsigned short integer) Height of high bitrate window , measured as percent of total image height", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("HighBitRate: %d -- (unsigned short integer) Bitrate of ROI window, measured in kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("LowBitRate: %d -- (unsigned short integer) Bitrate of ROI window, measured in kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv_count + 1 + if (bitAND(body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv, body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv_count) > 0) then + local body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_GradualDecoderRefreshParams_tree = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_tree:add("GradualDecoderRefreshParams") + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_GradualDecoderRefreshParams_tree:add(buffer(bufidx, 2), string.format("GDR_Duration: %d -- (unsigned short integer) The number of frames needed to completely refresh the image", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_GradualDecoderRefreshParams_tree:add(buffer(bufidx, 2), string.format("GDR_Interval: %d -- (unsigned short integer) The number of frames that need to be transmitted before starting a new GDR cycle. Note that the interval must be greater than or equal to the duration", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv_count = body_H264ConfigurationListSequence_H264ConfigurationList_H264ConfigurationSequence_pv_count + 1 + end +end +messagetable:add(0x080D, seth264videoencodingconfiguration_080d) + +queryh264videoencodingcapabilities_280e = Proto("queryh264videoencodingcapabilities_280e", "QueryH264VideoEncodingCapabilities 0x280e") +function queryh264videoencodingcapabilities_280e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_H264VideoEncoding.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryH264VideoEncodingCapabilities", string.format("QueryH264VideoEncodingCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryH264VideoEncodingCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryH264VideoEncodingCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryH264VideoEncodingCapabilitiesList ") + body_QueryH264VideoEncodingCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryH264VideoEncodingCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryH264VideoEncodingCapabilitiesList_count do + local body_QueryH264VideoEncodingCapabilitiesList_QueryH264VideoEncodingRec_tree = body_QueryH264VideoEncodingCapabilitiesList_tree:add(string.format("QueryH264VideoEncodingRec_%d", body_counter - 1)) + body_QueryH264VideoEncodingCapabilitiesList_QueryH264VideoEncodingRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) The ID of the sensor for which the capabilities are being queried.Note: A value of 0 shall be interpreted as all associated sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x280E, queryh264videoencodingcapabilities_280e) + +queryh264videoencodingconfiguration_280d = Proto("queryh264videoencodingconfiguration_280d", "QueryH264VideoEncodingConfiguration 0x280d") +function queryh264videoencodingconfiguration_280d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_H264VideoEncoding.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryH264VideoEncodingConfiguration", string.format("QueryH264VideoEncodingConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryH264VideoEncodingConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryH264VideoEncodingConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryH264VideoEncodingConfigurationList ") + body_QueryH264VideoEncodingConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryH264VideoEncodingConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryH264VideoEncodingConfigurationList_count do + local body_QueryH264VideoEncodingConfigurationList_QueryH264VideoEncodingRec_tree = body_QueryH264VideoEncodingConfigurationList_tree:add(string.format("QueryH264VideoEncodingRec_%d", body_counter - 1)) + body_QueryH264VideoEncodingConfigurationList_QueryH264VideoEncodingRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) The ID of the sensor for which the capabilities are being queried.Note: A value of 0 shall be interpreted as all associated sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x280D, queryh264videoencodingconfiguration_280d) + +reporth264videoencodingcapabilities_480e = Proto("reporth264videoencodingcapabilities_480e", "ReportH264VideoEncodingCapabilities 0x480e") +function reporth264videoencodingcapabilities_480e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_H264VideoEncoding.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportH264VideoEncodingCapabilities", string.format("ReportH264VideoEncodingCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportH264VideoEncodingCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_H264CapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "H264CapabilitiesList ") + body_H264CapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_H264CapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_H264CapabilitiesList_count do + local body_H264CapabilitiesList_H264CapabilitiesRec_tree = body_H264CapabilitiesList_tree:add(string.format("H264CapabilitiesRec_%d", body_counter - 1)) + local body_H264CapabilitiesList_H264CapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_H264CapabilitiesList_H264CapabilitiesRec_pv_count = 0 + body_H264CapabilitiesList_H264CapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_H264CapabilitiesList_H264CapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) Note: 0 is not a valid VisualSensorID value", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_H264CapabilitiesList_H264CapabilitiesRec_pv, body_H264CapabilitiesList_H264CapabilitiesRec_pv_count) > 0) then + local body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf = buffer(bufidx, 4) + local body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree = body_H264CapabilitiesList_H264CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedProfiles: 0x%X -- (unsigned integer) A high value (1) for a bit means the profile is supported.", bitstr(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32), body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint())) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = Baseline: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 0, 0), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 0, 0))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = ConstrainedBaseline: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 1, 1), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 1, 1))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = Main: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 2, 2), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 2, 2))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = Extended: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 3, 3), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 3, 3))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = High: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 4, 4), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 4, 4))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = ProgressiveHigh: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 5, 5), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 5, 5))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = ConstrainedHigh: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 6, 6), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 6, 6))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = High10: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 7, 7), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 7, 7))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = High422: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 8, 8), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 8, 8))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = High444Predictive: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 9, 9), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 9, 9))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = High10Intra: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 10, 10), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 10, 10))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = High422Intra: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 11, 11), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 11, 11))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = High444Intra: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 12, 12), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 12, 12))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = CAVLC444: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 13, 13), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 13, 13))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = ScalableBaseline: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 14, 14), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 14, 14))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = ScalableConstrainedBaseline: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 15, 15), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 15, 15))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = ScalableHigh: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 16, 16), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 16, 16))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = ScalableConstrainedHigh: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 17, 17), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 17, 17))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = ScalableHighIntra: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 18, 18), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 18, 18))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = StereoHigh: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 19, 19), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 19, 19))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_tree:add(buffer(bufidx, 4), string.format("%s = MultiviewHigh: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 32, 20, 20), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedProfiles_buf:le_uint(), 20, 20))) + bufidx = bufidx + 4 + end + body_H264CapabilitiesList_H264CapabilitiesRec_pv_count = body_H264CapabilitiesList_H264CapabilitiesRec_pv_count + 1 + if (bitAND(body_H264CapabilitiesList_H264CapabilitiesRec_pv, body_H264CapabilitiesList_H264CapabilitiesRec_pv_count) > 0) then + local body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf = buffer(bufidx, 4) + local body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree = body_H264CapabilitiesList_H264CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedLevels: 0x%X -- (unsigned integer) A high value (1) for a bit means the level is supported.", bitstr(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32), body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint())) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_1: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 0, 0), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 0, 0))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_1B: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 1, 1), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 1, 1))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_11: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 2, 2), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 2, 2))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_12: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 3, 3), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 3, 3))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_13: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 4, 4), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 4, 4))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_2: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 5, 5), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 5, 5))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_21: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 6, 6), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 6, 6))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_22: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 7, 7), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 7, 7))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_3: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 8, 8), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 8, 8))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_31: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 9, 9), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 9, 9))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_32: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 10, 10), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 10, 10))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_4: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 11, 11), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 11, 11))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_41: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 12, 12), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 12, 12))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_42: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 13, 13), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 13, 13))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_5: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 14, 14), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 14, 14))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_51: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 15, 15), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 15, 15))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_52: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 16, 16), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 16, 16))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_6: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 17, 17), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 17, 17))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_61: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 18, 18), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 18, 18))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_tree:add(buffer(bufidx, 4), string.format("%s = Level_62: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 32, 19, 19), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedLevels_buf:le_uint(), 19, 19))) + bufidx = bufidx + 4 + end + body_H264CapabilitiesList_H264CapabilitiesRec_pv_count = body_H264CapabilitiesList_H264CapabilitiesRec_pv_count + 1 + if (bitAND(body_H264CapabilitiesList_H264CapabilitiesRec_pv, body_H264CapabilitiesList_H264CapabilitiesRec_pv_count) > 0) then + local body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf = buffer(bufidx, 2) + local body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree = body_H264CapabilitiesList_H264CapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("%s = SupportedPresets: 0x%X -- (unsigned short integer) A high value (1) for a bit means the preset is supported.", bitstr(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16), body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint())) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree:add(buffer(bufidx, 2), string.format("%s = LowLatency: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16, 0, 0), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 0, 0))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree:add(buffer(bufidx, 2), string.format("%s = SlowComms: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16, 1, 1), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 1, 1))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree:add(buffer(bufidx, 2), string.format("%s = PersistentStare: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16, 2, 2), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 2, 2))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree:add(buffer(bufidx, 2), string.format("%s = DriveVision: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16, 3, 3), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 3, 3))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree:add(buffer(bufidx, 2), string.format("%s = Manipulation: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16, 4, 4), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 4, 4))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree:add(buffer(bufidx, 2), string.format("%s = BestQuality: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16, 5, 5), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 5, 5))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree:add(buffer(bufidx, 2), string.format("%s = Reserved: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16, 6, 11), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 6, 11))) + body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_tree:add(buffer(bufidx, 2), string.format("%s = ProgramSpecific: %d", bitstr_part(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 16, 12, 15), bitVal(body_H264CapabilitiesList_H264CapabilitiesRec_SupportedPresets_buf:le_uint(), 12, 15))) + bufidx = bufidx + 2 + end + body_H264CapabilitiesList_H264CapabilitiesRec_pv_count = body_H264CapabilitiesList_H264CapabilitiesRec_pv_count + 1 + if (bitAND(body_H264CapabilitiesList_H264CapabilitiesRec_pv, body_H264CapabilitiesList_H264CapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "FALSE", [1] = "TRUE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264CapabilitiesList_H264CapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("GroupOfPicturesSupported: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264CapabilitiesList_H264CapabilitiesRec_pv_count = body_H264CapabilitiesList_H264CapabilitiesRec_pv_count + 1 + if (bitAND(body_H264CapabilitiesList_H264CapabilitiesRec_pv, body_H264CapabilitiesList_H264CapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "FALSE", [1] = "TRUE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264CapabilitiesList_H264CapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("GradualDecoderRefreshSupported: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264CapabilitiesList_H264CapabilitiesRec_pv_count = body_H264CapabilitiesList_H264CapabilitiesRec_pv_count + 1 + if (bitAND(body_H264CapabilitiesList_H264CapabilitiesRec_pv, body_H264CapabilitiesList_H264CapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "FALSE", [1] = "TRUE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264CapabilitiesList_H264CapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("RegionOfInterestSupported: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264CapabilitiesList_H264CapabilitiesRec_pv_count = body_H264CapabilitiesList_H264CapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x480E, reporth264videoencodingcapabilities_480e) + +reporth264videoencodingconfiguration_480d = Proto("reporth264videoencodingconfiguration_480d", "ReportH264VideoEncodingConfiguration 0x480d") +function reporth264videoencodingconfiguration_480d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_H264VideoEncoding.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportH264VideoEncodingConfiguration", string.format("ReportH264VideoEncodingConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportH264VideoEncodingConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_H264ConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "H264ConfigurationList ") + body_H264ConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_H264ConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_H264ConfigurationList_count do + local body_H264ConfigurationList_H264ConfigurationSequence_tree = body_H264ConfigurationList_tree:add(string.format("H264ConfigurationSequence_%d", body_counter - 1)) + local body_H264ConfigurationList_H264ConfigurationSequence_pv = buffer(bufidx, 1):le_uint() + local body_H264ConfigurationList_H264ConfigurationSequence_pv_count = 0 + body_H264ConfigurationList_H264ConfigurationSequence_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree = body_H264ConfigurationList_H264ConfigurationSequence_tree:add("H264ConfigurationRec") + local body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = 0 + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) Note: 0 is not a valid VisualSensorID value", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Baseline", [1] = "ConstrainedBaseline", [2] = "Main", [3] = "Extended", [4] = "High", [5] = "ProgressiveHigh", [6] = "ConstrainedHigh", [7] = "High10", [8] = "High422", [9] = "High444Predictive", [10] = "High10Intra", [11] = "High422Intra", [12] = "High444Intra", [13] = "CAVLC444", [14] = "ScalableBaseline", [15] = "ScalableConstrainedBaseline", [16] = "ScalableHigh", [17] = "ScalableConstrainedHigh", [18] = "ScalableHighIntra", [19] = "StereoHigh", [20] = "MultiviewHigh"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Profile: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Level_1", [1] = "Level_1B", [2] = "Level_11", [3] = "Level_12", [4] = "Level_13", [5] = "Level_2", [6] = "Level_21", [7] = "Level_22", [8] = "Level_3", [9] = "Level_31", [10] = "Level_32", [11] = "Level_4", [12] = "Level_41", [13] = "Level_42", [14] = "Level_5", [15] = "Level_51", [16] = "Level_52", [17] = "Level_6", [18] = "Level_61", [19] = "Level_62"} + local value_id, value_name = (value_set[buffer(bufidx, 4):le_uint()]) + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 4), string.format("Level: %d [%s] -- (unsigned integer)", buffer(bufidx, 4):le_uint(), value_id)) + bufidx = bufidx + 4 + end + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "LowLatency", [1] = "SlowComms", [2] = "PersistentStare", [3] = "DriveVision", [4] = "Manipulation", [5] = "BestQuality", [12] = "ProgramSpecific_1", [13] = "ProgramSpecific_2", [14] = "ProgramSpecific_3", [15] = "ProgramSpecific_4"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Preset: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("GroupOfPictures: %d -- (unsigned byte) Number of interim frames before sending a key frame", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "OFF", [1] = "ON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("GradualDecoderRefreshOnOff: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "OFF", [1] = "ON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 1), string.format("RegionOfInterestOnOff: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv, body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count) > 0) then + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_tree:add(buffer(bufidx, 2), string.format("IntraMacroRefresh: %.4f (scaled) -- (unsigned short integer) This parameter is the random intra macroblock refresh; it provides the refresh rate in Macroblocks per picture.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_H264ConfigurationRec_pv_count + 1 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_pv, body_H264ConfigurationList_H264ConfigurationSequence_pv_count) > 0) then + local body_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree = body_H264ConfigurationList_H264ConfigurationSequence_tree:add("RegionOfInterestParams") + body_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("X_Start: %.4f (scaled) -- (unsigned short integer) Horizontal start location of high bitrate window, measured as percent of total image width from the left", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("Y_Start: %.4f (scaled) -- (unsigned short integer) Vertical start location of high bitrate window, measured as percent of total image height from the top", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("Width: %.4f (scaled) -- (unsigned short integer) Width of high bitrate window, measured as percent of total image width", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("Height: %.4f (scaled) -- (unsigned short integer) Height of high bitrate window , measured as percent of total image height", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("HighBitRate: %d -- (unsigned short integer) Bitrate of ROI window, measured in kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_H264ConfigurationList_H264ConfigurationSequence_RegionOfInterestParams_tree:add(buffer(bufidx, 2), string.format("LowBitRate: %d -- (unsigned short integer) Bitrate of ROI window, measured in kilobits per second", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_H264ConfigurationList_H264ConfigurationSequence_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_pv_count + 1 + if (bitAND(body_H264ConfigurationList_H264ConfigurationSequence_pv, body_H264ConfigurationList_H264ConfigurationSequence_pv_count) > 0) then + local body_H264ConfigurationList_H264ConfigurationSequence_GradualDecoderRefreshParams_tree = body_H264ConfigurationList_H264ConfigurationSequence_tree:add("GradualDecoderRefreshParams") + body_H264ConfigurationList_H264ConfigurationSequence_GradualDecoderRefreshParams_tree:add(buffer(bufidx, 2), string.format("GDR_Duration: %d -- (unsigned short integer) The number of frames needed to completely refresh the image", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_H264ConfigurationList_H264ConfigurationSequence_GradualDecoderRefreshParams_tree:add(buffer(bufidx, 2), string.format("GDR_Interval: %d -- (unsigned short integer) The number of frames that need to be transmitted before starting a new GDR cycle. Note that the interval must be greater than or equal to the duration", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_H264ConfigurationList_H264ConfigurationSequence_pv_count = body_H264ConfigurationList_H264ConfigurationSequence_pv_count + 1 + end +end +messagetable:add(0x480D, reporth264videoencodingconfiguration_480d) + +cancelportmapping_080b = Proto("cancelportmapping_080b", "CancelPortMapping 0x080b") +function cancelportmapping_080b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_PortMapper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "CancelPortMapping", string.format("CancelPortMapping, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "CancelPortMapping")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RequestPortMappingRec_tree = body_tree:add("RequestPortMappingRec") + local value_set = {[0] = "UDP", [1] = "TCP"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestPortMappingRec_tree:add(buffer(bufidx, 1), string.format("SocketType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_RequestPortMappingRec_tree:add(buffer(bufidx, 4), string.format("IPAddr: %d -- (unsigned integer) IPv4 address of endpoint port to which PortMapper will map, in network byte order", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_RequestPortMappingRec_tree:add(buffer(bufidx, 2), string.format("Port: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x080B, cancelportmapping_080b) + +requestportmapping_080c = Proto("requestportmapping_080c", "RequestPortMapping 0x080c") +function requestportmapping_080c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_PortMapper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestPortMapping", string.format("RequestPortMapping, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestPortMapping")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RequestPortMappingRec_tree = body_tree:add("RequestPortMappingRec") + local value_set = {[0] = "UDP", [1] = "TCP"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestPortMappingRec_tree:add(buffer(bufidx, 1), string.format("SocketType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_RequestPortMappingRec_tree:add(buffer(bufidx, 4), string.format("IPAddr: %d -- (unsigned integer) IPv4 address of endpoint port to which PortMapper will map, in network byte order", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_RequestPortMappingRec_tree:add(buffer(bufidx, 2), string.format("Port: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x080C, requestportmapping_080c) + +queryportmappings_2815 = Proto("queryportmappings_2815", "QueryPortMappings 0x2815") +function queryportmappings_2815.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_PortMapper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPortMappings", string.format("QueryPortMappings, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPortMappings")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2815, queryportmappings_2815) + +grantportmapping_080e = Proto("grantportmapping_080e", "GrantPortMapping 0x080e") +function grantportmapping_080e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_PortMapper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "GrantPortMapping", string.format("GrantPortMapping, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "GrantPortMapping")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GrantPortMappingSeq_tree = body_tree:add("GrantPortMappingSeq") + local body_GrantPortMappingSeq_RequestPortMappingRec_tree = body_GrantPortMappingSeq_tree:add("RequestPortMappingRec") + local value_set = {[0] = "UDP", [1] = "TCP"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GrantPortMappingSeq_RequestPortMappingRec_tree:add(buffer(bufidx, 1), string.format("SocketType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GrantPortMappingSeq_RequestPortMappingRec_tree:add(buffer(bufidx, 4), string.format("IPAddr: %d -- (unsigned integer) IPv4 address of endpoint port to which PortMapper will map, in network byte order", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_GrantPortMappingSeq_RequestPortMappingRec_tree:add(buffer(bufidx, 2), string.format("Port: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_GrantPortMappingSeq_GrantPortMappingRec_tree = body_GrantPortMappingSeq_tree:add("GrantPortMappingRec") + body_GrantPortMappingSeq_GrantPortMappingRec_tree:add(buffer(bufidx, 4), string.format("IPAddr: %d -- (unsigned integer) IPv4 address of client side mapping of endpoint, in network byte order", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_GrantPortMappingSeq_GrantPortMappingRec_tree:add(buffer(bufidx, 2), string.format("Port: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x080E, grantportmapping_080e) + +reportportmappings_4815 = Proto("reportportmappings_4815", "ReportPortMappings 0x4815") +function reportportmappings_4815.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_PortMapper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPortMappings", string.format("ReportPortMappings, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPortMappings")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_MappingSeq_tree = body_tree:add("MappingSeq") + local body_MappingSeq_RequestPortMappingRec_tree = body_MappingSeq_tree:add("RequestPortMappingRec") + local value_set = {[0] = "UDP", [1] = "TCP"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_MappingSeq_RequestPortMappingRec_tree:add(buffer(bufidx, 1), string.format("SocketType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_MappingSeq_RequestPortMappingRec_tree:add(buffer(bufidx, 4), string.format("IPAddr: %d -- (unsigned integer) IPv4 address of endpoint port to which PortMapper will map, in network byte order", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_MappingSeq_RequestPortMappingRec_tree:add(buffer(bufidx, 2), string.format("Port: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_MappingSeq_GrantPortMappingRec_tree = body_MappingSeq_tree:add("GrantPortMappingRec") + body_MappingSeq_GrantPortMappingRec_tree:add(buffer(bufidx, 4), string.format("IPAddr: %d -- (unsigned integer) IPv4 address of client side mapping of endpoint, in network byte order", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_MappingSeq_GrantPortMappingRec_tree:add(buffer(bufidx, 2), string.format("Port: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x4815, reportportmappings_4815) + +setrangesensorconfiguration_0802 = Proto("setrangesensorconfiguration_0802", "SetRangeSensorConfiguration 0x0802") +function setrangesensorconfiguration_0802.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetRangeSensorConfiguration", string.format("SetRangeSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetRangeSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RangeSensorConfigurationSequence_tree = body_tree:add("RangeSensorConfigurationSequence") + local body_RangeSensorConfigurationSequence_RequestIdRec_tree = body_RangeSensorConfigurationSequence_tree:add("RequestIdRec") + body_RangeSensorConfigurationSequence_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_RangeSensorConfigurationSequence = bufidx + local body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_tree = body_RangeSensorConfigurationSequence_tree:add(buffer(bufidx_start_body_RangeSensorConfigurationSequence, buffer:len() - bufidx_start_body_RangeSensorConfigurationSequence), "RangeSensorConfigurationList ") + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_RangeSensorConfigurationSequence_counter=1,body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_count do + local body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_tree:add(string.format("RangeSensorConfigurationRec_%d", body_RangeSensorConfigurationSequence_counter - 1)) + local body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = 0 + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("HorizontalFieldOfViewStartAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("HorizontalFieldOfViewStopAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("VerticalFieldOfViewStartAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("VerticalFieldOfViewStopAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("UpdateRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("MinimumRange: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("MaximumRange: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Active", [1] = "Standby", [2] = "Off"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("SensorState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationSequence_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x0802, setrangesensorconfiguration_0802) + +querysensorgeometricproperties_2805 = Proto("querysensorgeometricproperties_2805", "QuerySensorGeometricProperties 0x2805") +function querysensorgeometricproperties_2805.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySensorGeometricProperties", string.format("QuerySensorGeometricProperties, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySensorGeometricProperties")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SensorIdList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SensorIdList ") + body_SensorIdList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_SensorIdList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_SensorIdList_count do + local body_SensorIdList_SensorIDQueryRec_tree = body_SensorIdList_tree:add(string.format("SensorIDQueryRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_SensorIdList_SensorIDQueryRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2805, querysensorgeometricproperties_2805) + +queryrangesensorcompresseddata_2804 = Proto("queryrangesensorcompresseddata_2804", "QueryRangeSensorCompressedData 0x2804") +function queryrangesensorcompresseddata_2804.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRangeSensorCompressedData", string.format("QueryRangeSensorCompressedData, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRangeSensorCompressedData")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryRangeSensorCompressedDataList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryRangeSensorCompressedDataList ") + body_QueryRangeSensorCompressedDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryRangeSensorCompressedDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryRangeSensorCompressedDataList_count do + local body_QueryRangeSensorCompressedDataList_QueryRangeSensorCompressedDataRec_tree = body_QueryRangeSensorCompressedDataList_tree:add(string.format("QueryRangeSensorCompressedDataRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryRangeSensorCompressedDataList_QueryRangeSensorCompressedDataRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Native Coordinate System", [1] = "Vehicle Coordinate System"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryRangeSensorCompressedDataList_QueryRangeSensorCompressedDataRec_tree:add(buffer(bufidx, 1), string.format("ReportCoordinateSystem: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "None", [1] = "DEFLATE", [2] = "bzip2", [3] = "LZMA"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryRangeSensorCompressedDataList_QueryRangeSensorCompressedDataRec_tree:add(buffer(bufidx, 1), string.format("DataCompression: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_QueryRangeSensorCompressedDataList_QueryRangeSensorCompressedDataRec_tree:add(buffer(bufidx, 2), string.format("QueryPresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2804, queryrangesensorcompresseddata_2804) + +queryrangesensordata_2803 = Proto("queryrangesensordata_2803", "QueryRangeSensorData 0x2803") +function queryrangesensordata_2803.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRangeSensorData", string.format("QueryRangeSensorData, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRangeSensorData")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryRangeSensorDataList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryRangeSensorDataList ") + body_QueryRangeSensorDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryRangeSensorDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryRangeSensorDataList_count do + local body_QueryRangeSensorDataList_QueryRangeSensorDataRec_tree = body_QueryRangeSensorDataList_tree:add(string.format("QueryRangeSensorDataRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryRangeSensorDataList_QueryRangeSensorDataRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Native Coordinate System", [1] = "Vehicle Coordinate System"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryRangeSensorDataList_QueryRangeSensorDataRec_tree:add(buffer(bufidx, 1), string.format("ReportCoordinateSystem: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_QueryRangeSensorDataList_QueryRangeSensorDataRec_tree:add(buffer(bufidx, 2), string.format("QueryPresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2803, queryrangesensordata_2803) + +queryrangesensorcapabilities_2801 = Proto("queryrangesensorcapabilities_2801", "QueryRangeSensorCapabilities 0x2801") +function queryrangesensorcapabilities_2801.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRangeSensorCapabilities", string.format("QueryRangeSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRangeSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_RangeSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "RangeSensorCapabilitiesList ") + body_RangeSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_RangeSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_RangeSensorCapabilitiesList_count do + local body_RangeSensorCapabilitiesList_QueryRangeSensorCapabilitiesRec_tree = body_RangeSensorCapabilitiesList_tree:add(string.format("QueryRangeSensorCapabilitiesRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorCapabilitiesList_QueryRangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_RangeSensorCapabilitiesList_QueryRangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("QueryPresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2801, queryrangesensorcapabilities_2801) + +queryrangesensorconfiguration_2802 = Proto("queryrangesensorconfiguration_2802", "QueryRangeSensorConfiguration 0x2802") +function queryrangesensorconfiguration_2802.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRangeSensorConfiguration", string.format("QueryRangeSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRangeSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_RangeSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "RangeSensorConfigurationList ") + body_RangeSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_RangeSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_RangeSensorConfigurationList_count do + local body_RangeSensorConfigurationList_QueryRangeSensorConfigurationRec_tree = body_RangeSensorConfigurationList_tree:add(string.format("QueryRangeSensorConfigurationRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorConfigurationList_QueryRangeSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_RangeSensorConfigurationList_QueryRangeSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("QueryPresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2802, queryrangesensorconfiguration_2802) + +reportrangesensorcapabilities_4801 = Proto("reportrangesensorcapabilities_4801", "ReportRangeSensorCapabilities 0x4801") +function reportrangesensorcapabilities_4801.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRangeSensorCapabilities", string.format("ReportRangeSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRangeSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_RangeSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "RangeSensorCapabilitiesList ") + body_RangeSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_RangeSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_RangeSensorCapabilitiesList_count do + local body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree = body_RangeSensorCapabilitiesList_tree:add(string.format("RangeSensorCapabilitiesRec_%d", body_counter - 1)) + local body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv = buffer(bufidx, 2):le_uint() + local body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = 0 + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SensorName_tree = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("SensorName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SensorName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + local body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf = buffer(bufidx, 1) + local body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_tree = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedStates: 0x%X ", bitstr(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8), body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf:le_uint())) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Active: %d", bitstr_part(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 0, 0), bitVal(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 0, 0))) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Standby: %d", bitstr_part(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 1, 1), bitVal(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 1, 1))) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Off: %d", bitstr_part(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 2, 2), bitVal(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinimumHorizontalFieldOfViewStartAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumHorizontalFieldOfViewStopAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinimumVerticalFieldOfViewStartAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumVerticalFieldOfViewStopAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MiniumumUpdateRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumUpdateRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinimumRange: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumRange: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + local body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf = buffer(bufidx, 1) + local body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_tree = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedCompression: 0x%X ", bitstr(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 8), body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint())) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_tree:add(buffer(bufidx, 1), string.format("%s = NoCompression: %d", bitstr_part(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 8, 0, 0), bitVal(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 0, 0))) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_tree:add(buffer(bufidx, 1), string.format("%s = DEFLATE: %d", bitstr_part(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 8, 1, 1), bitVal(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 1, 1))) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_tree:add(buffer(bufidx, 1), string.format("%s = bzip2: %d", bitstr_part(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 8, 2, 2), bitVal(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 2, 2))) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_tree:add(buffer(bufidx, 1), string.format("%s = LZMA: %d", bitstr_part(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 8, 3, 3), bitVal(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_SupportedCompression_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv, body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("CoordinateTransformationSupported: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count = body_RangeSensorCapabilitiesList_RangeSensorCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x4801, reportrangesensorcapabilities_4801) + +reportrangesensorconfiguration_4802 = Proto("reportrangesensorconfiguration_4802", "ReportRangeSensorConfiguration 0x4802") +function reportrangesensorconfiguration_4802.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRangeSensorConfiguration", string.format("ReportRangeSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRangeSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_RangeSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "RangeSensorConfigurationList ") + body_RangeSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_RangeSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_RangeSensorConfigurationList_count do + local body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree = body_RangeSensorConfigurationList_tree:add(string.format("RangeSensorConfigurationRec_%d", body_counter - 1)) + local body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = 0 + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("HorizontalFieldOfViewStartAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("HorizontalFieldOfViewStopAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("VerticalFieldOfViewStartAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("VerticalFieldOfViewStopAngle: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("UpdateRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("MinimumRange: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("MaximumRange: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + if (bitAND(body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv, body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Active", [1] = "Standby", [2] = "Off"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("SensorState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count = body_RangeSensorConfigurationList_RangeSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x4802, reportrangesensorconfiguration_4802) + +reportrangesensordata_4803 = Proto("reportrangesensordata_4803", "ReportRangeSensorData 0x4803") +function reportrangesensordata_4803.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRangeSensorData", string.format("ReportRangeSensorData, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRangeSensorData")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_RangeSensorDataList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "RangeSensorDataList ") + body_RangeSensorDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_RangeSensorDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_RangeSensorDataList_count do + local body_RangeSensorDataList_RangeSensorDataVariant_tree = body_RangeSensorDataList_tree:add(string.format("RangeSensorDataVariant_%d", body_counter - 1)) + body_RangeSensorDataList_RangeSensorDataVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_RangeSensorDataList_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_RangeSensorDataList_index == 0) then + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataErrorRec_tree = body_RangeSensorDataList_RangeSensorDataVariant_tree:add("RangeSensorDataErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Sensor is not Active", [1] = "Invalid compression format", [255] = "Unknown Error / Failure"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataErrorRec_tree:add(buffer(bufidx, 1), string.format("DataErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataErrorRec_ErrorMessage_tree = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_RangeSensorDataList_index == 1) then + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_tree = body_RangeSensorDataList_RangeSensorDataVariant_tree:add("RangeSensorDataSeq") + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_tree = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_tree:add("RangeSensorDataRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Native Coordinate System", [1] = "Vehicle Coordinate System"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_tree:add(buffer(bufidx, 1), string.format("ReportCoordinateSystem: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf = buffer(bufidx, 4) + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_tree = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 32), body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint())) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 0, 9))) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 10, 15))) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 16, 21))) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 22, 26))) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + local bufidx_start_body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq = bufidx + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_tree = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_tree:add(buffer(bufidx_start_body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq, buffer:len() - bufidx_start_body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq), "RangeSensorDataPointList ") + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_counter=1,body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_count do + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_tree:add(string.format("RangeSensorDataPointRec_%d", body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_counter - 1)) + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv = buffer(bufidx, 1):le_uint() + local body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count = 0 + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv, body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count) > 0) then + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 4), string.format("PointID: %d ", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count + 1 + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 4), string.format("Range: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv, body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count) > 0) then + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 1), string.format("RangeValidity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count + 1 + if (bitAND(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv, body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count) > 0) then + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 4), string.format("RangeErrorRMS: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count + 1 + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 4), string.format("Bearing: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + if (bitAND(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv, body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count) > 0) then + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 1), string.format("BearingValidity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count + 1 + if (bitAND(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv, body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count) > 0) then + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 4), string.format("BearingErrorRMS: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000731 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count + 1 + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 4), string.format("Inclination: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + if (bitAND(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv, body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count) > 0) then + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 1), string.format("InclinationValidity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count + 1 + if (bitAND(body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv, body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count) > 0) then + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_tree:add(buffer(bufidx, 4), string.format("InclinationErrorRMS: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000731 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count = body_RangeSensorDataList_RangeSensorDataVariant_RangeSensorDataSeq_RangeSensorDataPointList_RangeSensorDataPointRec_pv_count + 1 + end + end + end +end +messagetable:add(0x4803, reportrangesensordata_4803) + +reportrangesensorcompresseddata_4804 = Proto("reportrangesensorcompresseddata_4804", "ReportRangeSensorCompressedData 0x4804") +function reportrangesensorcompresseddata_4804.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRangeSensorCompressedData", string.format("ReportRangeSensorCompressedData, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRangeSensorCompressedData")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_RangeSensorCompressedDataList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "RangeSensorCompressedDataList ") + body_RangeSensorCompressedDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_RangeSensorCompressedDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_RangeSensorCompressedDataList_count do + local body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_tree = body_RangeSensorCompressedDataList_tree:add(string.format("RangeSensorCompressedDataVariant_%d", body_counter - 1)) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_RangeSensorCompressedDataList_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_RangeSensorCompressedDataList_index == 0) then + local body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorDataErrorRec_tree = body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_tree:add("RangeSensorDataErrorRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorDataErrorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Sensor is not Active", [1] = "Invalid compression format", [255] = "Unknown Error / Failure"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorDataErrorRec_tree:add(buffer(bufidx, 1), string.format("DataErrorCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorDataErrorRec_ErrorMessage_tree = body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorDataErrorRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorDataErrorRec_ErrorMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + if (body_RangeSensorCompressedDataList_index == 1) then + local body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_tree = body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_tree:add("RangeSensorCompressedDataRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Native Coordinate System", [1] = "Vehicle Coordinate System"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_tree:add(buffer(bufidx, 1), string.format("ReportCoordinateSystem: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf = buffer(bufidx, 4) + local body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_tree = body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 32), body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint())) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 0, 9))) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 10, 15))) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 16, 21))) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 22, 26))) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + local value_set = {[0] = "None", [1] = "DEFLATE", [2] = "bzip2", [3] = "LZMA"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RangeSensorCompressedDataList_RangeSensorCompressedDataVariant_RangeSensorCompressedDataRec_tree:add(buffer(bufidx, 1), string.format("DataCompression: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0x4804, reportrangesensorcompresseddata_4804) + +reportsensorgeometricproperties_4805 = Proto("reportsensorgeometricproperties_4805", "ReportSensorGeometricProperties 0x4805") +function reportsensorgeometricproperties_4805.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_RangeSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSensorGeometricProperties", string.format("ReportSensorGeometricProperties, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSensorGeometricProperties")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_GeometricPropertiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "GeometricPropertiesList ") + body_GeometricPropertiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_GeometricPropertiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_GeometricPropertiesList_count do + local body_GeometricPropertiesList_GeometricPropertiesSequence_tree = body_GeometricPropertiesList_tree:add(string.format("GeometricPropertiesSequence_%d", body_counter - 1)) + local body_GeometricPropertiesList_GeometricPropertiesSequence_SensorIdRec_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_tree:add("SensorIdRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_GeometricPropertiesList_GeometricPropertiesSequence_SensorIdRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_tree:add("GeometricPropertiesVariant") + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_GeometricPropertiesList_GeometricPropertiesSequence_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_GeometricPropertiesList_GeometricPropertiesSequence_index == 0) then + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_NoGeometricPropertiesVariant_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_tree:add("NoGeometricPropertiesVariant") + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_NoGeometricPropertiesVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 0", buffer(bufidx, 1):le_uint())) + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + if (body_GeometricPropertiesList_GeometricPropertiesSequence_index == 1) then + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_tree:add("StaticGeometricPropertiesRec") + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_SensorPosition_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_tree:add("SensorPosition") + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_SensorPosition_PositionVectorDimension_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_SensorPosition_tree:add("PositionVectorDimension [3]") + for body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_SensorPosition_PositionVectorDimension_i = 1, 3 do + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_SensorPosition_PositionVectorDimension_tree:add(buffer(bufidx, 4), string.format("PositionVectorElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_tree:add("UnitQuaternion") + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_tree:add("UnitQuaternionDimension [4]") + for body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_i = 1, 4 do + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_tree:add(buffer(bufidx, 4), string.format("UnitQuaternionElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + end + if (body_GeometricPropertiesList_GeometricPropertiesSequence_index == 2) then + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_tree:add("ManipulatorGeometricPropertiesRec") + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add(buffer(bufidx, 2), string.format("SubsystemID: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add(buffer(bufidx, 1), string.format("JointNumber: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_SensorPosition_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add("SensorPosition") + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_SensorPosition_PositionVectorDimension_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_SensorPosition_tree:add("PositionVectorDimension [3]") + for body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_SensorPosition_PositionVectorDimension_i = 1, 3 do + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_SensorPosition_PositionVectorDimension_tree:add(buffer(bufidx, 4), string.format("PositionVectorElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add("UnitQuaternion") + local body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_tree = body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_tree:add("UnitQuaternionDimension [4]") + for body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_i = 1, 4 do + body_GeometricPropertiesList_GeometricPropertiesSequence_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_tree:add(buffer(bufidx, 4), string.format("UnitQuaternionElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + end + end +end +messagetable:add(0x4805, reportsensorgeometricproperties_4805) + +setstillimagesensorconfiguration_0807 = Proto("setstillimagesensorconfiguration_0807", "SetStillImageSensorConfiguration 0x0807") +function setstillimagesensorconfiguration_0807.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_StillImage.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetStillImageSensorConfiguration", string.format("SetStillImageSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetStillImageSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_StillImageSensorConfigurationSequence_tree = body_tree:add("StillImageSensorConfigurationSequence") + local body_StillImageSensorConfigurationSequence_RequestIdRec_tree = body_StillImageSensorConfigurationSequence_tree:add("RequestIdRec") + body_StillImageSensorConfigurationSequence_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_StillImageSensorConfigurationSequence = bufidx + local body_StillImageSensorConfigurationSequence_StillImageSensorList_tree = body_StillImageSensorConfigurationSequence_tree:add(buffer(bufidx_start_body_StillImageSensorConfigurationSequence, buffer:len() - bufidx_start_body_StillImageSensorConfigurationSequence), "StillImageSensorList ") + body_StillImageSensorConfigurationSequence_StillImageSensorList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_StillImageSensorConfigurationSequence_StillImageSensorList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_StillImageSensorConfigurationSequence_counter=1,body_StillImageSensorConfigurationSequence_StillImageSensorList_count do + local body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_tree = body_StillImageSensorConfigurationSequence_StillImageSensorList_tree:add(string.format("StillImageSensorConfigurationRec_%d", body_StillImageSensorConfigurationSequence_counter - 1)) + local body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv_count = 0 + body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv, body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "128x96 (sqcif)", [1] = "176x144 (qcif)", [2] = "352x288 (cif)", [3] = "704x576 (4cif)", [4] = "1408x1152 (16cif)", [5] = "160x120 (qqvga)", [6] = "320x240 (qvga)", [7] = "640x480 (vga)", [8] = "800x600 (svga)", [9] = "1024x768 (xga)", [10] = "1600x1200 (uxga)", [11] = "2048x1536 (qxga)", [12] = "1280x1024 (sxga)", [13] = "2560x2048 (qsxga)", [14] = "5120x4096 (hsxga)", [15] = "852x480 (wvga)", [16] = "1366x768 (wxga)", [17] = "1600x1024 (wsxga)", [18] = "1920x1200 (wuxga)", [19] = "2560x1600 (woxga)", [20] = "3200x2048 (wqsxga)", [21] = "3840x2400 (wquxga)", [22] = "6400x4096 (whsxga)", [23] = "7680x4800 (whuxga)", [24] = "320x200 (cga)", [25] = "640x350 (ega)", [26] = "852x480 (hd480)", [27] = "1280x720 (hd720)", [28] = "1920x1080 (hd1080)"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FrameSize: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv_count = body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv_count + 1 + if (bitAND(body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv, body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "JPEG", [1] = "GIF", [2] = "PNG", [3] = "BMP", [4] = "TIFF", [5] = "PPM", [6] = "PGM", [7] = "PNM", [8] = "NEF", [9] = "CR2", [10] = "DNG"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("StillImageFormat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv_count = body_StillImageSensorConfigurationSequence_StillImageSensorList_StillImageSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x0807, setstillimagesensorconfiguration_0807) + +querystillimagedataext_281c = Proto("querystillimagedataext_281c", "QueryStillImageDataExt 0x281c") +function querystillimagedataext_281c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_StillImage.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryStillImageDataExt", string.format("QueryStillImageDataExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryStillImageDataExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryStillImageDataList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryStillImageDataList ") + body_QueryStillImageDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryStillImageDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryStillImageDataList_count do + local body_QueryStillImageDataList_QueryStillImageDataRec_tree = body_QueryStillImageDataList_tree:add(string.format("QueryStillImageDataRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryStillImageDataList_QueryStillImageDataRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Native Coordinate System", [1] = "Vehicle Coordinate System"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryStillImageDataList_QueryStillImageDataRec_tree:add(buffer(bufidx, 1), string.format("ReportCoordinateSystem: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_QueryStillImageDataList_QueryStillImageDataRec_tree:add(buffer(bufidx, 1), string.format("QueryPresenceVector: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x281C, querystillimagedataext_281c) + +querystillimagesensorconfiguration_2813 = Proto("querystillimagesensorconfiguration_2813", "QueryStillImageSensorConfiguration 0x2813") +function querystillimagesensorconfiguration_2813.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_StillImage.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryStillImageSensorConfiguration", string.format("QueryStillImageSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryStillImageSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryStillImageSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryStillImageSensorConfigurationList ") + body_QueryStillImageSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryStillImageSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryStillImageSensorConfigurationList_count do + local body_QueryStillImageSensorConfigurationList_QueryStillImageSensorConfigurationRec_tree = body_QueryStillImageSensorConfigurationList_tree:add(string.format("QueryStillImageSensorConfigurationRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryStillImageSensorConfigurationList_QueryStillImageSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_QueryStillImageSensorConfigurationList_QueryStillImageSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("QueryPresenceVector: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x2813, querystillimagesensorconfiguration_2813) + +querystillimagesensorcapabilities_2812 = Proto("querystillimagesensorcapabilities_2812", "QueryStillImageSensorCapabilities 0x2812") +function querystillimagesensorcapabilities_2812.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_StillImage.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryStillImageSensorCapabilities", string.format("QueryStillImageSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryStillImageSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryStillImageSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryStillImageSensorCapabilitiesList ") + body_QueryStillImageSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryStillImageSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryStillImageSensorCapabilitiesList_count do + local body_QueryStillImageSensorCapabilitiesList_QueryStillImageSensorCapabilitiesRec_tree = body_QueryStillImageSensorCapabilitiesList_tree:add(string.format("QueryStillImageSensorCapabilitiesRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryStillImageSensorCapabilitiesList_QueryStillImageSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_QueryStillImageSensorCapabilitiesList_QueryStillImageSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("QueryPresenceVector: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x2812, querystillimagesensorcapabilities_2812) + +reportstillimagedataext_481c = Proto("reportstillimagedataext_481c", "ReportStillImageDataExt 0x481c") +function reportstillimagedataext_481c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_StillImage.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportStillImageDataExt", string.format("ReportStillImageDataExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportStillImageDataExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_StillImageDataList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "StillImageDataList ") + body_StillImageDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_StillImageDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_StillImageDataList_count do + local body_StillImageDataList_StillImageDataRec_tree = body_StillImageDataList_tree:add(string.format("StillImageDataRec_%d", body_counter - 1)) + local body_StillImageDataList_StillImageDataRec_pv = buffer(bufidx, 1):le_uint() + local body_StillImageDataList_StillImageDataRec_pv_count = 0 + body_StillImageDataList_StillImageDataRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_StillImageDataList_StillImageDataRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Native Coordinate System", [1] = "Vehicle Coordinate System"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_StillImageDataList_StillImageDataRec_tree:add(buffer(bufidx, 1), string.format("ReportCoordinateSystem: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_StillImageDataList_StillImageDataRec_pv, body_StillImageDataList_StillImageDataRec_pv_count) > 0) then + local body_StillImageDataList_StillImageDataRec_TimeStamp_buf = buffer(bufidx, 4) + local body_StillImageDataList_StillImageDataRec_TimeStamp_tree = body_StillImageDataList_StillImageDataRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 32), body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint())) + body_StillImageDataList_StillImageDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 0, 9))) + body_StillImageDataList_StillImageDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 10, 15))) + body_StillImageDataList_StillImageDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 16, 21))) + body_StillImageDataList_StillImageDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 22, 26))) + body_StillImageDataList_StillImageDataRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_StillImageDataList_StillImageDataRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_StillImageDataList_StillImageDataRec_pv_count = body_StillImageDataList_StillImageDataRec_pv_count + 1 + if (bitAND(body_StillImageDataList_StillImageDataRec_pv, body_StillImageDataList_StillImageDataRec_pv_count) > 0) then + local format_field_set = {[0] = "JPEG", [1] = "GIF", [2] = "PNG", [3] = "BMP", [4] = "TIFF", [5] = "PPM", [6] = "PGM", [7] = "PNM", [8] = "NEF", [9] = "CR2", [10] = "DNG"} + local format_field_value = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + body_StillImageDataList_StillImageDataRec_tree:add(buffer(bufidx, 4), string.format("ImageFrame: %s [%s] -- (%d)",format_field_value, format_field_set[format_field_value], buffer(bufidx, 2):le_uint())) + local body_StillImageDataList_StillImageDataRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_StillImageDataList_StillImageDataRec_count):tvb(), pinfo, tree) + else + local body_StillImageDataList_StillImageDataRec_ImageFrame_tree = body_StillImageDataList_StillImageDataRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_StillImageDataList_StillImageDataRec_count)) + body_StillImageDataList_StillImageDataRec_ImageFrame_tree:append_text(", unknown message") + end + bufidx = bufidx + body_StillImageDataList_StillImageDataRec_count + end + body_StillImageDataList_StillImageDataRec_pv_count = body_StillImageDataList_StillImageDataRec_pv_count + 1 + if (bitAND(body_StillImageDataList_StillImageDataRec_pv, body_StillImageDataList_StillImageDataRec_pv_count) > 0) then + local body_StillImageDataList_StillImageDataRec_StillImageURI_tree = body_StillImageDataList_StillImageDataRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("StillImageURI[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_StillImageDataList_StillImageDataRec_StillImageURI_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_StillImageDataList_StillImageDataRec_pv_count = body_StillImageDataList_StillImageDataRec_pv_count + 1 + end +end +messagetable:add(0x481C, reportstillimagedataext_481c) + +reportstillimagesensorconfiguration_4813 = Proto("reportstillimagesensorconfiguration_4813", "ReportStillImageSensorConfiguration 0x4813") +function reportstillimagesensorconfiguration_4813.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_StillImage.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportStillImageSensorConfiguration", string.format("ReportStillImageSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportStillImageSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_StillImageSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "StillImageSensorConfigurationList ") + body_StillImageSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_StillImageSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_StillImageSensorConfigurationList_count do + local body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_tree = body_StillImageSensorConfigurationList_tree:add(string.format("StillImageSensorConfigurationRec_%d", body_counter - 1)) + local body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv_count = 0 + body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv, body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "128x96 (sqcif)", [1] = "176x144 (qcif)", [2] = "352x288 (cif)", [3] = "704x576 (4cif)", [4] = "1408x1152 (16cif)", [5] = "160x120 (qqvga)", [6] = "320x240 (qvga)", [7] = "640x480 (vga)", [8] = "800x600 (svga)", [9] = "1024x768 (xga)", [10] = "1600x1200 (uxga)", [11] = "2048x1536 (qxga)", [12] = "1280x1024 (sxga)", [13] = "2560x2048 (qsxga)", [14] = "5120x4096 (hsxga)", [15] = "852x480 (wvga)", [16] = "1366x768 (wxga)", [17] = "1600x1024 (wsxga)", [18] = "1920x1200 (wuxga)", [19] = "2560x1600 (woxga)", [20] = "3200x2048 (wqsxga)", [21] = "3840x2400 (wquxga)", [22] = "6400x4096 (whsxga)", [23] = "7680x4800 (whuxga)", [24] = "320x200 (cga)", [25] = "640x350 (ega)", [26] = "852x480 (hd480)", [27] = "1280x720 (hd720)", [28] = "1920x1080 (hd1080)"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FrameSize: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv_count = body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv_count + 1 + if (bitAND(body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv, body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "JPEG", [1] = "GIF", [2] = "PNG", [3] = "BMP", [4] = "TIFF", [5] = "PPM", [6] = "PGM", [7] = "PNM", [8] = "NEF", [9] = "CR2", [10] = "DNG"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("StillImageFormat: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv_count = body_StillImageSensorConfigurationList_StillImageSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x4813, reportstillimagesensorconfiguration_4813) + +reportstillimagesensorcapabilities_4812 = Proto("reportstillimagesensorcapabilities_4812", "ReportStillImageSensorCapabilities 0x4812") +function reportstillimagesensorcapabilities_4812.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_StillImage.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportStillImageSensorCapabilities", string.format("ReportStillImageSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportStillImageSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_StillImageSensorList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "StillImageSensorList ") + body_StillImageSensorList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_StillImageSensorList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_StillImageSensorList_count do + local body_StillImageSensorList_StillImageSensorCapabilitiesRec_tree = body_StillImageSensorList_tree:add(string.format("StillImageSensorCapabilitiesRec_%d", body_counter - 1)) + local body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv_count = 0 + body_StillImageSensorList_StillImageSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv, body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv_count) > 0) then + local body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf = buffer(bufidx, 4) + local body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree = body_StillImageSensorList_StillImageSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedFrameSizes: 0x%X ", bitstr(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32), body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint())) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = sqcif_128x96: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 0, 0), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 0, 0))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qcif_176x144: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 1, 1), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 1, 1))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = cif_352x288: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 2, 2), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 2, 2))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = cif4_704x576: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 3, 3), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 3, 3))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = cif16_1408x1152: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 4, 4), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 4, 4))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qqvga_160x120: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 5, 5), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 5, 5))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qvga_320x240: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 6, 6), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 6, 6))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = vga_640x480: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 7, 7), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 7, 7))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = svga_800x600: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 8, 8), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 8, 8))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = xga_1024x768: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 9, 9), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 9, 9))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = uxga_1600x1200: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 10, 10), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 10, 10))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qxga_2048x1536: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 11, 11), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 11, 11))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = sxga_1280x1024: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 12, 12), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 12, 12))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = qsxga_2560x2048: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 13, 13), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 13, 13))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = hsxga_5120x4096: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 14, 14), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 14, 14))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wvga_852x480: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 15, 15), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 15, 15))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wxga_1366x768: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 16, 16), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 16, 16))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wsxga_1600x1024: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 17, 17), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 17, 17))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wuxga_1920x1200: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 18, 18), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 18, 18))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = woxga_2560x1600: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 19, 19), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 19, 19))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wqsxga_3200x2048: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 20, 20), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 20, 20))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = wquxga_3840x2400: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 21, 21), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 21, 21))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = whsxga_6400x4096: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 22, 22), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 22, 22))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = whuxga_7680x4800: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 23, 23), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 23, 23))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = cga_320x200: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 24, 24), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 24, 24))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = ega_640x350: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 25, 25), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 25, 25))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = hd480_852x480: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 26, 26), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 26, 26))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = hd720_1280x720: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 27, 27), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 27, 27))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_tree:add(buffer(bufidx, 4), string.format("%s = hd1080_1920x1080: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 32, 28, 28), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedFrameSizes_buf:le_uint(), 28, 28))) + bufidx = bufidx + 4 + end + body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv_count = body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv, body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv_count) > 0) then + local body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf = buffer(bufidx, 2) + local body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree = body_StillImageSensorList_StillImageSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("%s = SupportedImageFormats: 0x%X ", bitstr(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16), body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint())) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = JPEG: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 0, 0), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 0, 0))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = GIF: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 1, 1), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 1, 1))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = PNG: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 2, 2), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 2, 2))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = BMP: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 3, 3), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 3, 3))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = TIFF: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 4, 4), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 4, 4))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = PPM: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 5, 5), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 5, 5))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = PGM: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 6, 6), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 6, 6))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = PNM: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 7, 7), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 7, 7))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = NEF_Nikon_RAW: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 8, 8), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 8, 8))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = CR2_Canon_RAW: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 9, 9), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 9, 9))) + body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_tree:add(buffer(bufidx, 2), string.format("%s = DNG_Adobe_RAW: %d", bitstr_part(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 16, 10, 10), bitVal(body_StillImageSensorList_StillImageSensorCapabilitiesRec_SupportedImageFormats_buf:le_uint(), 10, 10))) + bufidx = bufidx + 2 + end + body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv_count = body_StillImageSensorList_StillImageSensorCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x4812, reportstillimagesensorcapabilities_4812) + +setvideoilluminatorconfiguration_081a = Proto("setvideoilluminatorconfiguration_081a", "SetVideoIlluminatorConfiguration 0x081a") +function setvideoilluminatorconfiguration_081a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VideoIlluminator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetVideoIlluminatorConfiguration", string.format("SetVideoIlluminatorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetVideoIlluminatorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_IlluminatorSeq_tree = body_tree:add("IlluminatorSeq") + local body_IlluminatorSeq_RequestIdRec_tree = body_IlluminatorSeq_tree:add("RequestIdRec") + body_IlluminatorSeq_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_IlluminatorSeq = bufidx + local body_IlluminatorSeq_IlluminatorList_tree = body_IlluminatorSeq_tree:add(buffer(bufidx_start_body_IlluminatorSeq, buffer:len() - bufidx_start_body_IlluminatorSeq), "IlluminatorList ") + body_IlluminatorSeq_IlluminatorList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_IlluminatorSeq_IlluminatorList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_IlluminatorSeq_counter=1,body_IlluminatorSeq_IlluminatorList_count do + local body_IlluminatorSeq_IlluminatorList_IlluminatorRec_tree = body_IlluminatorSeq_IlluminatorList_tree:add(string.format("IlluminatorRec_%d", body_IlluminatorSeq_counter - 1)) + local body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv = buffer(bufidx, 1):le_uint() + local body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count = 0 + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_tree:add(buffer(bufidx, 2), string.format("IlluminatorID: %d -- (unsigned short integer) Identifies an illumination device supported by the service. Zero is not a valid value.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_tree:add(buffer(bufidx, 2), string.format("Level: %.4f (scaled) -- (unsigned short integer) Desired intensity level, as a percent of capability. If the illuminator does not support variable levels of brightness, any non-zero value shall be interpreted as on, and a zero level value shall be interpreted as off.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv, body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count) > 0) then + local value_set = {[0] = "VISIBLE", [1] = "INFRARED", [2] = "GREYSCALE", [3] = "LOWLIGHT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_tree:add(buffer(bufidx, 1), string.format("Mode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count = body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count + 1 + if (bitAND(body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv, body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count) > 0) then + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_tree:add(buffer(bufidx, 2), string.format("BeamWidth: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.005493247883 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count = body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count + 1 + if (bitAND(body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv, body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count) > 0) then + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_tree:add(buffer(bufidx, 2), string.format("BeamHeight: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.005493247883 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count = body_IlluminatorSeq_IlluminatorList_IlluminatorRec_pv_count + 1 + end +end +messagetable:add(0x081A, setvideoilluminatorconfiguration_081a) + +queryvideoilluminatorconfiguration_281a = Proto("queryvideoilluminatorconfiguration_281a", "QueryVideoIlluminatorConfiguration 0x281a") +function queryvideoilluminatorconfiguration_281a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VideoIlluminator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVideoIlluminatorConfiguration", string.format("QueryVideoIlluminatorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVideoIlluminatorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_IlluminatorIDList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "IlluminatorIDList ") + body_IlluminatorIDList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_IlluminatorIDList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_IlluminatorIDList_count do + local body_IlluminatorIDList_IlluminatorIDRec_tree = body_IlluminatorIDList_tree:add(string.format("IlluminatorIDRec_%d", body_counter - 1)) + body_IlluminatorIDList_IlluminatorIDRec_tree:add(buffer(bufidx, 2), string.format("IlluminatorID: %d -- (unsigned short integer) Identifies an illumination device supported by the service. A value of zero shall be interpreted as query for all available illuminators.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x281A, queryvideoilluminatorconfiguration_281a) + +queryvideoilluminatorcapabilities_281b = Proto("queryvideoilluminatorcapabilities_281b", "QueryVideoIlluminatorCapabilities 0x281b") +function queryvideoilluminatorcapabilities_281b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VideoIlluminator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVideoIlluminatorCapabilities", string.format("QueryVideoIlluminatorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVideoIlluminatorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_IlluminatorIDList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "IlluminatorIDList ") + body_IlluminatorIDList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_IlluminatorIDList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_IlluminatorIDList_count do + local body_IlluminatorIDList_IlluminatorIDRec_tree = body_IlluminatorIDList_tree:add(string.format("IlluminatorIDRec_%d", body_counter - 1)) + body_IlluminatorIDList_IlluminatorIDRec_tree:add(buffer(bufidx, 2), string.format("IlluminatorID: %d -- (unsigned short integer) Identifies an illumination device supported by the service. A value of zero shall be interpreted as query for all available illuminators.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x281B, queryvideoilluminatorcapabilities_281b) + +reportvideoilluminatorconfiguration_481a = Proto("reportvideoilluminatorconfiguration_481a", "ReportVideoIlluminatorConfiguration 0x481a") +function reportvideoilluminatorconfiguration_481a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VideoIlluminator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVideoIlluminatorConfiguration", string.format("ReportVideoIlluminatorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVideoIlluminatorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_IlluminationRecList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "IlluminationRecList ") + body_IlluminationRecList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_IlluminationRecList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_IlluminationRecList_count do + local body_IlluminationRecList_IlluminatorRec_tree = body_IlluminationRecList_tree:add(string.format("IlluminatorRec_%d", body_counter - 1)) + local body_IlluminationRecList_IlluminatorRec_pv = buffer(bufidx, 1):le_uint() + local body_IlluminationRecList_IlluminatorRec_pv_count = 0 + body_IlluminationRecList_IlluminatorRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_IlluminationRecList_IlluminatorRec_tree:add(buffer(bufidx, 2), string.format("IlluminatorID: %d -- (unsigned short integer) Identifies an illumination device supported by the service. Zero is not a valid value.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_IlluminationRecList_IlluminatorRec_tree:add(buffer(bufidx, 2), string.format("Level: %.4f (scaled) -- (unsigned short integer) Requested intensity level, as a percent of capability. If the illuminator does not support variable levels of brightness, any non-zero value shall be interpreted as on, and a zero level value shall be interpreted as off.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_IlluminationRecList_IlluminatorRec_pv, body_IlluminationRecList_IlluminatorRec_pv_count) > 0) then + local value_set = {[0] = "VISIBLE", [1] = "INFRARED", [2] = "GREYSCALE", [3] = "LOWLIGHT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_IlluminationRecList_IlluminatorRec_tree:add(buffer(bufidx, 1), string.format("Mode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_IlluminationRecList_IlluminatorRec_pv_count = body_IlluminationRecList_IlluminatorRec_pv_count + 1 + if (bitAND(body_IlluminationRecList_IlluminatorRec_pv, body_IlluminationRecList_IlluminatorRec_pv_count) > 0) then + body_IlluminationRecList_IlluminatorRec_tree:add(buffer(bufidx, 2), string.format("BeamWidth: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.005493247883 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_IlluminationRecList_IlluminatorRec_pv_count = body_IlluminationRecList_IlluminatorRec_pv_count + 1 + if (bitAND(body_IlluminationRecList_IlluminatorRec_pv, body_IlluminationRecList_IlluminatorRec_pv_count) > 0) then + body_IlluminationRecList_IlluminatorRec_tree:add(buffer(bufidx, 2), string.format("BeamHeight: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.005493247883 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_IlluminationRecList_IlluminatorRec_pv_count = body_IlluminationRecList_IlluminatorRec_pv_count + 1 + end +end +messagetable:add(0x481A, reportvideoilluminatorconfiguration_481a) + +reportvideoilluminatorcapabilities_481b = Proto("reportvideoilluminatorcapabilities_481b", "ReportVideoIlluminatorCapabilities 0x481b") +function reportvideoilluminatorcapabilities_481b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VideoIlluminator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVideoIlluminatorCapabilities", string.format("ReportVideoIlluminatorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVideoIlluminatorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_IlluminatorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "IlluminatorCapabilitiesList ") + body_IlluminatorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_IlluminatorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_IlluminatorCapabilitiesList_count do + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_tree = body_IlluminatorCapabilitiesList_tree:add(string.format("IlluminatorCapabilitiesSeq_%d", body_counter - 1)) + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_tree:add("IlluminatorCapabilitiesRec") + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count = 0 + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("IlluminatorID: %d -- (unsigned short integer) Identifies an illumination device supported by the service. Zero is not a valid value.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_IlluminatorName_tree = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("IlluminatorName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_IlluminatorName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf = buffer(bufidx, 4) + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_tree = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedIlluminationModes: 0x%X ", bitstr(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 32), body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint())) + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_tree:add(buffer(bufidx, 4), string.format("%s = Visible: %d", bitstr_part(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 32, 0, 0), bitVal(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 0, 0))) + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_tree:add(buffer(bufidx, 4), string.format("%s = Infrared: %d", bitstr_part(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 32, 1, 1), bitVal(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 1, 1))) + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_tree:add(buffer(bufidx, 4), string.format("%s = GreyScale: %d", bitstr_part(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 32, 2, 2), bitVal(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 2, 2))) + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_tree:add(buffer(bufidx, 4), string.format("%s = LowLight: %d", bitstr_part(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 32, 3, 3), bitVal(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 3, 3))) + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_tree:add(buffer(bufidx, 4), string.format("%s = ReservedForFutureUse: %d", bitstr_part(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 32, 4, 20), bitVal(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 4, 20))) + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_tree:add(buffer(bufidx, 4), string.format("%s = ReservedForProgramOrImplementationSpecificUse: %d", bitstr_part(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 32, 21, 31), bitVal(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_SupportedIlluminationModes_buf:le_uint(), 21, 31))) + bufidx = bufidx + 4 + if (bitAND(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv, body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count) > 0) then + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumIntensity: %d -- (unsigned short integer) Minimum achievable brightness level. If this value is the same as the maximum, the illuminator is assumed to not support variable levels, and acts in an on/off fashion only.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count + 1 + if (bitAND(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv, body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count) > 0) then + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumIntensity: %d -- (unsigned short integer) Maximum achievable brightness level. If this value is the same as the minimum, the illuminator is assumed to not support variable levels, and acts in an on/off fashion only.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count + 1 + if (bitAND(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv, body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count) > 0) then + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumSupportedBeamWidth: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.005493247883 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count + 1 + if (bitAND(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv, body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count) > 0) then + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumSupportedBeamWidth: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.005493247883 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count + 1 + if (bitAND(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv, body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count) > 0) then + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumSupportedBeamHeight: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.005493247883 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count + 1 + if (bitAND(body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv, body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count) > 0) then + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumSupportedBeamHeight: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.005493247883 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_IlluminatorCapabilitiesRec_pv_count + 1 + local bufidx_start_body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq = bufidx + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_SensorIDList_tree = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_tree:add(buffer(bufidx_start_body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq, buffer:len() - bufidx_start_body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq), "SensorIDList ") + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_SensorIDList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_SensorIDList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_counter=1,body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_SensorIDList_count do + local body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_SensorIDList_SensorIDRec_tree = body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_SensorIDList_tree:add(string.format("SensorIDRec_%d", body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_counter - 1)) + body_IlluminatorCapabilitiesList_IlluminatorCapabilitiesSeq_SensorIDList_SensorIDRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) SensorID of a camera associated with this illuminator.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + end +end +messagetable:add(0x481B, reportvideoilluminatorcapabilities_481b) + +queryvisualsensorconfiguration_2807 = Proto("queryvisualsensorconfiguration_2807", "QueryVisualSensorConfiguration 0x2807") +function queryvisualsensorconfiguration_2807.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VisualSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVisualSensorConfiguration", string.format("QueryVisualSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVisualSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryVisualSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryVisualSensorConfigurationList ") + body_QueryVisualSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryVisualSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryVisualSensorConfigurationList_count do + local body_QueryVisualSensorConfigurationList_QueryVisualSensorConfigurationRec_tree = body_QueryVisualSensorConfigurationList_tree:add(string.format("QueryVisualSensorConfigurationRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryVisualSensorConfigurationList_QueryVisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_QueryVisualSensorConfigurationList_QueryVisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("QueryPresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2807, queryvisualsensorconfiguration_2807) + +queryvisualsensorcapabilities_2806 = Proto("queryvisualsensorcapabilities_2806", "QueryVisualSensorCapabilities 0x2806") +function queryvisualsensorcapabilities_2806.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VisualSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVisualSensorCapabilities", string.format("QueryVisualSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVisualSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryVisualSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryVisualSensorCapabilitiesList ") + body_QueryVisualSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryVisualSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryVisualSensorCapabilitiesList_count do + local body_QueryVisualSensorCapabilitiesList_QueryVisualSensorCapabilitiesRec_tree = body_QueryVisualSensorCapabilitiesList_tree:add(string.format("QueryVisualSensorCapabilitiesRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryVisualSensorCapabilitiesList_QueryVisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_QueryVisualSensorCapabilitiesList_QueryVisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("QueryPresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0x2806, queryvisualsensorcapabilities_2806) + +queryvisualsensorcapabilitiesext_280a = Proto("queryvisualsensorcapabilitiesext_280a", "QueryVisualSensorCapabilitiesExt 0x280a") +function queryvisualsensorcapabilitiesext_280a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VisualSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVisualSensorCapabilitiesExt", string.format("QueryVisualSensorCapabilitiesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVisualSensorCapabilitiesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryVisualSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryVisualSensorCapabilitiesList ") + body_QueryVisualSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryVisualSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryVisualSensorCapabilitiesList_count do + local body_QueryVisualSensorCapabilitiesList_QueryVisualSensorCapabilitiesRec_tree = body_QueryVisualSensorCapabilitiesList_tree:add(string.format("QueryVisualSensorCapabilitiesRec_%d", body_counter - 1)) + local value_set = {[0] = "AllSensors"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_QueryVisualSensorCapabilitiesList_QueryVisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + body_QueryVisualSensorCapabilitiesList_QueryVisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("QueryPresenceVector: %d ", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end +end +messagetable:add(0x280A, queryvisualsensorcapabilitiesext_280a) + +setvisualsensorconfiguration_0803 = Proto("setvisualsensorconfiguration_0803", "SetVisualSensorConfiguration 0x0803") +function setvisualsensorconfiguration_0803.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VisualSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetVisualSensorConfiguration", string.format("SetVisualSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetVisualSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_VisualSensorConfigurationSequence_tree = body_tree:add("VisualSensorConfigurationSequence") + local body_VisualSensorConfigurationSequence_RequestIdRec_tree = body_VisualSensorConfigurationSequence_tree:add("RequestIdRec") + body_VisualSensorConfigurationSequence_RequestIdRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_VisualSensorConfigurationSequence = bufidx + local body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_tree = body_VisualSensorConfigurationSequence_tree:add(buffer(bufidx_start_body_VisualSensorConfigurationSequence, buffer:len() - bufidx_start_body_VisualSensorConfigurationSequence), "VisualSensorConfigurationList ") + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_VisualSensorConfigurationSequence_counter=1,body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_count do + local body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_tree:add(string.format("VisualSensorConfigurationRec_%d", body_VisualSensorConfigurationSequence_counter - 1)) + local body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv = buffer(bufidx, 2):le_uint() + local body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = 0 + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Active", [1] = "Standby", [2] = "Off"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("SensorState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Mixed", [1] = "Analog Only", [2] = "Digital Only", [3] = "Off"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ZoomMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("ZoomLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("FocalLength: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("HorizontalFieldOfView: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("VerticalFieldOfView: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto Focus", [1] = "Manual Focus"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FocusMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("FocusValue: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto", [1] = "Daylight", [2] = "Cloudy", [3] = "Shade", [4] = "Tungsten", [5] = "Flurescent", [6] = "Flash"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("WhiteBalance: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Color", [1] = "Greyscale", [2] = "Infrared", [3] = "Low Light", [4] = "Thermal_WhiteHot", [5] = "Thermal_BlackHot", [6] = "Thermal_Rainbow"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ImagingMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto", [1] = "Manual", [2] = "Shutter Priority", [3] = "Aperture Priority"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ExposureMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto", [1] = "CenterWeighted", [2] = "Spot"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("MeteringMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("ShutterSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000915541314 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Aperture: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001951628901 + (0.100000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto", [1] = "ISO 100", [2] = "ISO 200", [3] = "ISO 400", [4] = "ISO 800", [5] = "ISO 1600", [6] = "ISO 3200"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("LightSensitivity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Off", [1] = "On"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ImageStabilization: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationSequence_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x0803, setvisualsensorconfiguration_0803) + +reportvisualsensorconfiguration_4807 = Proto("reportvisualsensorconfiguration_4807", "ReportVisualSensorConfiguration 0x4807") +function reportvisualsensorconfiguration_4807.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VisualSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVisualSensorConfiguration", string.format("ReportVisualSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVisualSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_VisualSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "VisualSensorConfigurationList ") + body_VisualSensorConfigurationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_VisualSensorConfigurationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_VisualSensorConfigurationList_count do + local body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree = body_VisualSensorConfigurationList_tree:add(string.format("VisualSensorConfigurationRec_%d", body_counter - 1)) + local body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv = buffer(bufidx, 2):le_uint() + local body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = 0 + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Active", [1] = "Standby", [2] = "Off"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("SensorState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Mixed", [1] = "Analog Only", [2] = "Digital Only", [3] = "Off"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ZoomMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("ZoomLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("FocalLength: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("HorizontalFieldOfView: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("VerticalFieldOfView: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto Focus", [1] = "Manual Focus"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FocusMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("FocusValue: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto", [1] = "Daylight", [2] = "Cloudy", [3] = "Shade", [4] = "Tungsten", [5] = "Flurescent", [6] = "Flash"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("WhiteBalance: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Color", [1] = "Greyscale", [2] = "Infrared", [3] = "Low Light", [4] = "Thermal_WhiteHot", [5] = "Thermal_BlackHot", [6] = "Thermal_Rainbow"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ImagingMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto", [1] = "Manual", [2] = "Shutter Priority", [3] = "Aperture Priority"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ExposureMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto", [1] = "CenterWeighted", [2] = "Spot"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("MeteringMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("ShutterSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000915541314 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Aperture: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001951628901 + (0.100000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Auto", [1] = "ISO 100", [2] = "ISO 200", [3] = "ISO 400", [4] = "ISO 800", [5] = "ISO 1600", [6] = "ISO 3200"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("LightSensitivity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + if (bitAND(body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv, body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Off", [1] = "On"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ImageStabilization: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count = body_VisualSensorConfigurationList_VisualSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0x4807, reportvisualsensorconfiguration_4807) + +reportvisualsensorcapabilities_4806 = Proto("reportvisualsensorcapabilities_4806", "ReportVisualSensorCapabilities 0x4806") +function reportvisualsensorcapabilities_4806.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VisualSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVisualSensorCapabilities", string.format("ReportVisualSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVisualSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_VisualSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "VisualSensorCapabilitiesList ") + body_VisualSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_VisualSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_VisualSensorCapabilitiesList_count do + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree = body_VisualSensorCapabilitiesList_tree:add(string.format("VisualSensorCapabilitiesRec_%d", body_counter - 1)) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv = buffer(bufidx, 2):le_uint() + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = 0 + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SensorName_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("SensorName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SensorName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedStates: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Active: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Standby: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Off: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = ZoomModes: 0x%X -- (unsigned byte) While many cameras offer zoom using purely analog (or optical) or digital techniques, some use a 'mixed' mode where both are used in combination. This is often of the form of analog (optical) zoom to its physical maximum, e.g. 10x, and digital beyond that to achieve higher magnifications, e.g. 150x. Those cameras that offer mixed mode can usually be configured to perform in a purely analog or digital function, effectively shutting off the other zoom behavior. This bitfield specifies which zoom techniques are available in the interface.", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree:add(buffer(bufidx, 1), string.format("%s = Mixed: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree:add(buffer(bufidx, 1), string.format("%s = AnalogOnly: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree:add(buffer(bufidx, 1), string.format("%s = DigitalOnly: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree:add(buffer(bufidx, 1), string.format("%s = None: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = FocusModes: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_tree:add(buffer(bufidx, 1), string.format("%s = AutoFocus: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_tree:add(buffer(bufidx, 1), string.format("%s = ManualFocus: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = WhiteBalance: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Auto: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Daylight: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Cloudy: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Shade: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 3, 3))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Tungsten: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 4, 4), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 4, 4))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Flurescent: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 5, 5), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 5, 5))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Flash: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 6, 6), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = ImagingModes: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 1), string.format("%s = Color: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 1), string.format("%s = Greyscale: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 1), string.format("%s = Infrared: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 1), string.format("%s = Lowlight: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 3, 3))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 1), string.format("%s = ThermalWhiteHot: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8, 4, 4), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 4, 4))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 1), string.format("%s = ThermalBlackHot: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8, 5, 5), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 5, 5))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 1), string.format("%s = ThermalRainbow: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8, 6, 6), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 6, 6))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 1), string.format("%s = ReservedForFutureUse: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 8, 7, 7), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 7, 7))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = ExposureModes: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree:add(buffer(bufidx, 1), string.format("%s = Auto: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree:add(buffer(bufidx, 1), string.format("%s = Manual: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree:add(buffer(bufidx, 1), string.format("%s = ShutterPriority: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree:add(buffer(bufidx, 1), string.format("%s = AperturePriority: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = MeteringModes: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_tree:add(buffer(bufidx, 1), string.format("%s = MatrixOrAuto: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_tree:add(buffer(bufidx, 1), string.format("%s = CenterWeighted: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_tree:add(buffer(bufidx, 1), string.format("%s = Spot: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumShutterSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000915541314 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumShutterSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000915541314 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumAperture: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001951628901 + (0.100000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumAperture: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001951628901 + (0.100000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinimumFocalLength: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumFocalLength: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = LightSensitivityLevels: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Auto: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO100: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO200: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO400: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 3, 3))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO800: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 4, 4), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 4, 4))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO1600: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 5, 5), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 5, 5))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO3200: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 6, 6), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("ImageStabilization: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x4806, reportvisualsensorcapabilities_4806) + +reportvisualsensorcapabilitiesext_480a = Proto("reportvisualsensorcapabilitiesext_480a", "ReportVisualSensorCapabilitiesExt 0x480a") +function reportvisualsensorcapabilitiesext_480a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.environment_sensing/urn_jaus_jss_environmentSensing_VisualSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVisualSensorCapabilitiesExt", string.format("ReportVisualSensorCapabilitiesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVisualSensorCapabilitiesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_VisualSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "VisualSensorCapabilitiesList ") + body_VisualSensorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_VisualSensorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_VisualSensorCapabilitiesList_count do + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree = body_VisualSensorCapabilitiesList_tree:add(string.format("VisualSensorCapabilitiesRec_%d", body_counter - 1)) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv = buffer(bufidx, 4):le_uint() + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = 0 + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 4):le_uint(), 4 * 8))) + bufidx = bufidx + 4 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SensorName_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("SensorName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SensorName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedStates: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Active: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Standby: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_tree:add(buffer(bufidx, 1), string.format("%s = Off: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_SupportedStates_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = ZoomModes: 0x%X -- (unsigned byte) While many cameras offer zoom using purely analog (or optical) or digital techniques, some use a 'mixed' mode where both are used in combination. This is often of the form of analog (optical) zoom to its physical maximum, e.g. 10x, and digital beyond that to achieve higher magnifications, e.g. 150x. Those cameras that offer mixed mode can usually be configured to perform in a purely analog or digital function, effectively shutting off the other zoom behavior. This bitfield specifies which zoom techniques are available in the interface.", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree:add(buffer(bufidx, 1), string.format("%s = Mixed: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree:add(buffer(bufidx, 1), string.format("%s = AnalogOnly: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree:add(buffer(bufidx, 1), string.format("%s = DigitalOnly: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_tree:add(buffer(bufidx, 1), string.format("%s = None: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ZoomModes_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = FocusModes: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_tree:add(buffer(bufidx, 1), string.format("%s = AutoFocus: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_tree:add(buffer(bufidx, 1), string.format("%s = ManualFocus: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_FocusModes_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = WhiteBalance: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Auto: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Daylight: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Cloudy: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Shade: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 3, 3))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Tungsten: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 4, 4), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 4, 4))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Flurescent: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 5, 5), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 5, 5))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_tree:add(buffer(bufidx, 1), string.format("%s = Flash: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 8, 6, 6), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_WhiteBalance_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf = buffer(bufidx, 4) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("%s = ImagingModes: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = Color: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = Greyscale: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = Infrared: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = Lowlight: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 3, 3))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = ThermalWhiteHot: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 4, 4), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 4, 4))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = ThermalBlackHot: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 5, 5), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 5, 5))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = ThermalRainbow: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 6, 6), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 6, 6))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = ReservedForFutureUse: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 7, 20), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 7, 20))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_tree:add(buffer(bufidx, 4), string.format("%s = ReservedForProgramSpecificUse: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 32, 21, 31), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ImagingModes_buf:le_uint(), 21, 31))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = ExposureModes: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree:add(buffer(bufidx, 1), string.format("%s = Auto: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree:add(buffer(bufidx, 1), string.format("%s = Manual: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree:add(buffer(bufidx, 1), string.format("%s = ShutterPriority: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_tree:add(buffer(bufidx, 1), string.format("%s = AperturePriority: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_ExposureModes_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = MeteringModes: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_tree:add(buffer(bufidx, 1), string.format("%s = MatrixOrAuto: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_tree:add(buffer(bufidx, 1), string.format("%s = CenterWeighted: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_tree:add(buffer(bufidx, 1), string.format("%s = Spot: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_MeteringModes_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumShutterSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000915541314 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumShutterSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000915541314 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumAperture: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001951628901 + (0.100000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumAperture: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001951628901 + (0.100000000000))) + bufidx = bufidx + 2 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinimumFocalLength: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumFocalLength: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf = buffer(bufidx, 1) + local body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = LightSensitivityLevels: 0x%X ", bitstr(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8), body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint())) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = Auto: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 0, 0), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 0, 0))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO100: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 1, 1), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 1, 1))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO200: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 2, 2), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 2, 2))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO400: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 3, 3), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 3, 3))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO800: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 4, 4), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 4, 4))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO1600: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 5, 5), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 5, 5))) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_tree:add(buffer(bufidx, 1), string.format("%s = ISO3200: %d", bitstr_part(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 8, 6, 6), bitVal(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_LightSensitivityLevels_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("ImageStabilization: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinimumHorizontalFieldOfView: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumHorizontalFieldOfView: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MinimumVerticalFieldOfView: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + if (bitAND(body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv, body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count) > 0) then + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumVerticalFieldOfView: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count = body_VisualSensorCapabilitiesList_VisualSensorCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0x480A, reportvisualsensorcapabilitiesext_480a) + +queryshape_ec42 = Proto("queryshape_ec42", "QueryShape 0xec42") +function queryshape_ec42.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/AEODRS_ComponentPhysicalProperties.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryShape", string.format("QueryShape, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryShape")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xEC42, queryshape_ec42) + +querymassproperties_ec40 = Proto("querymassproperties_ec40", "QueryMassProperties 0xec40") +function querymassproperties_ec40.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/AEODRS_ComponentPhysicalProperties.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMassProperties", string.format("QueryMassProperties, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMassProperties")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xEC40, querymassproperties_ec40) + +reportshape_fc42 = Proto("reportshape_fc42", "ReportShape 0xfc42") +function reportshape_fc42.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/AEODRS_ComponentPhysicalProperties.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportShape", string.format("ReportShape, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportShape")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ShapeList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ShapeList ") + body_ShapeList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_ShapeList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_ShapeList_count do + local body_ShapeList_ShapeSeq_tree = body_ShapeList_tree:add(string.format("ShapeSeq_%d", body_counter - 1)) + local body_ShapeList_ShapeSeq_CoordinateFrameVar_tree = body_ShapeList_ShapeSeq_tree:add("CoordinateFrameVar") + body_ShapeList_ShapeSeq_CoordinateFrameVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 3", buffer(bufidx, 1):le_uint())) + local body_ShapeList_ShapeSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ShapeList_ShapeSeq_index == 0) then + local body_ShapeList_ShapeSeq_CoordinateFrameVar_ModuleFrameVar_tree = body_ShapeList_ShapeSeq_CoordinateFrameVar_tree:add("ModuleFrameVar") + body_ShapeList_ShapeSeq_CoordinateFrameVar_ModuleFrameVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 0", buffer(bufidx, 1):le_uint())) + local body_ShapeList_ShapeSeq_CoordinateFrameVar_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + if (body_ShapeList_ShapeSeq_index == 1) then + local body_ShapeList_ShapeSeq_CoordinateFrameVar_LinkFrameRec_tree = body_ShapeList_ShapeSeq_CoordinateFrameVar_tree:add("LinkFrameRec") + body_ShapeList_ShapeSeq_CoordinateFrameVar_LinkFrameRec_tree:add(buffer(bufidx, 1), string.format("LinkIndex: %d -- (unsigned byte) Index of the serial manipulator link for the selected coordinate frame.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + if (body_ShapeList_ShapeSeq_index == 2) then + local body_ShapeList_ShapeSeq_CoordinateFrameVar_StabilizerFrameRec_tree = body_ShapeList_ShapeSeq_CoordinateFrameVar_tree:add("StabilizerFrameRec") + body_ShapeList_ShapeSeq_CoordinateFrameVar_StabilizerFrameRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d -- (unsigned byte) ID of the stabilizer which the coordinate frame is representing", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + if (body_ShapeList_ShapeSeq_index == 3) then + local body_ShapeList_ShapeSeq_CoordinateFrameVar_AttachmentFrameRec_tree = body_ShapeList_ShapeSeq_CoordinateFrameVar_tree:add("AttachmentFrameRec") + body_ShapeList_ShapeSeq_CoordinateFrameVar_AttachmentFrameRec_tree:add(buffer(bufidx, 1), string.format("HostNodeID: %d -- (unsigned byte) Node ID of the module that hosts the attachment point", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ShapeList_ShapeSeq_CoordinateFrameVar_AttachmentFrameRec_tree:add(buffer(bufidx, 1), string.format("AttachmentID: %d -- (unsigned byte) ID of the attachment which the coordinate frame is representing", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + local body_ShapeList_ShapeSeq_ShapeLocationRec_tree = body_ShapeList_ShapeSeq_tree:add("ShapeLocationRec") + body_ShapeList_ShapeSeq_ShapeLocationRec_tree:add(buffer(bufidx, 4), string.format("OffsetX: %.4f (scaled) -- (unsigned integer) X translation for selected frame of reference.", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + body_ShapeList_ShapeSeq_ShapeLocationRec_tree:add(buffer(bufidx, 4), string.format("OffsetY: %.4f (scaled) -- (unsigned integer) Y translation for selected frame of reference.", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + body_ShapeList_ShapeSeq_ShapeLocationRec_tree:add(buffer(bufidx, 4), string.format("OffsetZ: %.4f (scaled) -- (unsigned integer) Z translation for selected frame of reference.", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + local body_ShapeList_ShapeSeq_ShapeOrientationRec_tree = body_ShapeList_ShapeSeq_tree:add("ShapeOrientationRec") + body_ShapeList_ShapeSeq_ShapeOrientationRec_tree:add(buffer(bufidx, 4), string.format("dComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_ShapeList_ShapeSeq_ShapeOrientationRec_tree:add(buffer(bufidx, 4), string.format("aComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_ShapeList_ShapeSeq_ShapeOrientationRec_tree:add(buffer(bufidx, 4), string.format("bComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_ShapeList_ShapeSeq_ShapeOrientationRec_tree:add(buffer(bufidx, 4), string.format("cComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + local body_ShapeList_ShapeSeq_ShapeVar_tree = body_ShapeList_ShapeSeq_tree:add("ShapeVar") + body_ShapeList_ShapeSeq_ShapeVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_ShapeList_ShapeSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ShapeList_ShapeSeq_index == 0) then + local body_ShapeList_ShapeSeq_ShapeVar_BoxRec_tree = body_ShapeList_ShapeSeq_ShapeVar_tree:add("BoxRec") + body_ShapeList_ShapeSeq_ShapeVar_BoxRec_tree:add(buffer(bufidx, 4), string.format("LengthX: %.4f (scaled) -- (unsigned integer) Length of box along X dimension", buffer(bufidx, 4):le_uint() * 0.000000002328 + (0.000000000000))) + bufidx = bufidx + 4 + body_ShapeList_ShapeSeq_ShapeVar_BoxRec_tree:add(buffer(bufidx, 4), string.format("LengthY: %.4f (scaled) -- (unsigned integer) Length of box along Y dimension", buffer(bufidx, 4):le_uint() * 0.000000002328 + (0.000000000000))) + bufidx = bufidx + 4 + body_ShapeList_ShapeSeq_ShapeVar_BoxRec_tree:add(buffer(bufidx, 4), string.format("LengthZ: %.4f (scaled) -- (unsigned integer) Length of box along Z dimension", buffer(bufidx, 4):le_uint() * 0.000000002328 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_ShapeList_ShapeSeq_index == 1) then + local body_ShapeList_ShapeSeq_ShapeVar_CylinderRec_tree = body_ShapeList_ShapeSeq_ShapeVar_tree:add("CylinderRec") + body_ShapeList_ShapeSeq_ShapeVar_CylinderRec_tree:add(buffer(bufidx, 4), string.format("Radius: %.4f (scaled) -- (unsigned integer) Radius of the cylinder", buffer(bufidx, 4):le_uint() * 0.000000001164 + (0.000000000000))) + bufidx = bufidx + 4 + body_ShapeList_ShapeSeq_ShapeVar_CylinderRec_tree:add(buffer(bufidx, 4), string.format("Length: %.4f (scaled) -- (unsigned integer) Length of the cylinder", buffer(bufidx, 4):le_uint() * 0.000000002328 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_ShapeList_ShapeSeq_index == 2) then + local body_ShapeList_ShapeSeq_ShapeVar_SphereRec_tree = body_ShapeList_ShapeSeq_ShapeVar_tree:add("SphereRec") + body_ShapeList_ShapeSeq_ShapeVar_SphereRec_tree:add(buffer(bufidx, 4), string.format("Radius: %.4f (scaled) -- (unsigned integer) Radius of the sphere", buffer(bufidx, 4):le_uint() * 0.000000001164 + (0.000000000000))) + bufidx = bufidx + 4 + end + end +end +messagetable:add(0xFC42, reportshape_fc42) + +reportmassproperties_fc40 = Proto("reportmassproperties_fc40", "ReportMassProperties 0xfc40") +function reportmassproperties_fc40.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/AEODRS_ComponentPhysicalProperties.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMassProperties", string.format("ReportMassProperties, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMassProperties")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_MassPropertyList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "MassPropertyList ") + body_MassPropertyList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_MassPropertyList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_MassPropertyList_count do + local body_MassPropertyList_MassPropertySeq_tree = body_MassPropertyList_tree:add(string.format("MassPropertySeq_%d", body_counter - 1)) + local body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_tree = body_MassPropertyList_MassPropertySeq_tree:add("CoordinateFrameVar") + body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 3", buffer(bufidx, 1):le_uint())) + local body_MassPropertyList_MassPropertySeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_MassPropertyList_MassPropertySeq_index == 0) then + local body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_ModuleFrameVar_tree = body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_tree:add("ModuleFrameVar") + body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_ModuleFrameVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 0", buffer(bufidx, 1):le_uint())) + local body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + if (body_MassPropertyList_MassPropertySeq_index == 1) then + local body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_LinkFrameRec_tree = body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_tree:add("LinkFrameRec") + body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_LinkFrameRec_tree:add(buffer(bufidx, 1), string.format("LinkIndex: %d -- (unsigned byte) Index of the serial manipulator link for the selected coordinate frame.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + if (body_MassPropertyList_MassPropertySeq_index == 2) then + local body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_StabilizerFrameRec_tree = body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_tree:add("StabilizerFrameRec") + body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_StabilizerFrameRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d -- (unsigned byte) ID of the stabilizer which the coordinate frame is representing", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + if (body_MassPropertyList_MassPropertySeq_index == 3) then + local body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_AttachmentFrameRec_tree = body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_tree:add("AttachmentFrameRec") + body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_AttachmentFrameRec_tree:add(buffer(bufidx, 1), string.format("HostNodeID: %d -- (unsigned byte) Node ID of the module that hosts the attachment point", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_MassPropertyList_MassPropertySeq_CoordinateFrameVar_AttachmentFrameRec_tree:add(buffer(bufidx, 1), string.format("AttachmentID: %d -- (unsigned byte) ID of the attachment which the coordinate frame is representing", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + local body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree = body_MassPropertyList_MassPropertySeq_tree:add("MassPropertiesRecord") + local body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv = buffer(bufidx, 2):le_uint() + local body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = 0 + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("Mass: %.4f (scaled) -- (unsigned integer) Mass of the component. A value of zero is recognized as invalid.", buffer(bufidx, 4):le_uint() * 0.000002328306 + (0.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("CenterOfMassX: %.4f (scaled) -- (unsigned integer) Center of mass of the component, relative to the center of the selected coordinate frame", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("CenterOfMassY: %.4f (scaled) -- (unsigned integer) Center of mass of the component, relative to the center of the selected coordinate frame", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("CenterOfMassZ: %.4f (scaled) -- (unsigned integer) Center of mass of the component, relative to the center of the selected coordinate frame", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("MomentOfInertialTensorXX: %d -- (float) Moment of inertia of the component (relative to center of mass) in kilogram meters squared", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("MomentOfInertialTensorXY: %d -- (float) Moment of inertia of the component (relative to center of mass) in kilogram meters squared", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("MomentOfInertialTensorXZ: %d -- (float) Moment of inertia of the component (relative to center of mass) in kilogram meters squared", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("MomentOfInertialTensorYY: %d -- (float) Moment of inertia of the component (relative to center of mass) in kilogram meters squared", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("MomentOfInertialTensorYZ: %d -- (float) Moment of inertia of the component (relative to center of mass) in kilogram meters squared", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + if (bitAND(body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv, body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count) > 0) then + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_tree:add(buffer(bufidx, 4), string.format("MomentOfInertialTensorZZ: %d -- (float) Moment of inertia of the component (relative to center of mass) in kilogram meters squared", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count = body_MassPropertyList_MassPropertySeq_MassPropertiesRecord_pv_count + 1 + end +end +messagetable:add(0xFC40, reportmassproperties_fc40) + +querymountsite_e701 = Proto("querymountsite_e701", "QueryMountSite 0xe701") +function querymountsite_e701.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/AEODRS_MountSiteProperties.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMountSite", string.format("QueryMountSite, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMountSite")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ChildNodeIDRec_tree = body_tree:add("ChildNodeIDRec") + body_ChildNodeIDRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) The JAUS Node ID byte representing the child node for which associated mount site and attachment data is requested. A value of zero is used to request the mount site and attachment data for all registered mount sites.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xE701, querymountsite_e701) + +reportmountsite_f701 = Proto("reportmountsite_f701", "ReportMountSite 0xf701") +function reportmountsite_f701.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/AEODRS_MountSiteProperties.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMountSite", string.format("ReportMountSite, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMountSite")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_MountSitePropertiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "MountSitePropertiesList ") + body_MountSitePropertiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_MountSitePropertiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_MountSitePropertiesList_count do + local body_MountSitePropertiesList_MountSitePropertiesSeq_tree = body_MountSitePropertiesList_tree:add(string.format("MountSitePropertiesSeq_%d", body_counter - 1)) + local body_MountSitePropertiesList_MountSitePropertiesSeq_pv = buffer(bufidx, 1):le_uint() + local body_MountSitePropertiesList_MountSitePropertiesSeq_pv_count = 0 + body_MountSitePropertiesList_MountSitePropertiesSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_MountSitePropertiesList_MountSitePropertiesSeq_ChildNodeIDRec_tree = body_MountSitePropertiesList_MountSitePropertiesSeq_tree:add("ChildNodeIDRec") + body_MountSitePropertiesList_MountSitePropertiesSeq_ChildNodeIDRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) The JAUS Node ID byte representing the child node that can be mounted at this location.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_MountSitePropertiesList_MountSitePropertiesSeq_pv, body_MountSitePropertiesList_MountSitePropertiesSeq_pv_count) > 0) then + local body_MountSitePropertiesList_MountSitePropertiesSeq_AttachmentIDRec_tree = body_MountSitePropertiesList_MountSitePropertiesSeq_tree:add("AttachmentIDRec") + body_MountSitePropertiesList_MountSitePropertiesSeq_AttachmentIDRec_tree:add(buffer(bufidx, 1), string.format("AttachmentID: %d -- (unsigned byte) ID of the attachment site which is being reported. The attachment site is associated with the child node. Attachment IDs are defined by the child node.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_MountSitePropertiesList_MountSitePropertiesSeq_pv_count = body_MountSitePropertiesList_MountSitePropertiesSeq_pv_count + 1 + local body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_tree = body_MountSitePropertiesList_MountSitePropertiesSeq_tree:add("CoordinateFrameVar") + body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_MountSitePropertiesList_MountSitePropertiesSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_MountSitePropertiesList_MountSitePropertiesSeq_index == 0) then + local body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_ModuleFrameVar_tree = body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_tree:add("ModuleFrameVar") + body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_ModuleFrameVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 0", buffer(bufidx, 1):le_uint())) + local body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + if (body_MountSitePropertiesList_MountSitePropertiesSeq_index == 1) then + local body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_LinkFrameRec_tree = body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_tree:add("LinkFrameRec") + body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_LinkFrameRec_tree:add(buffer(bufidx, 1), string.format("LinkIndex: %d -- (unsigned byte) Index of the serial manipulator link for the selected coordinate frame.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + if (body_MountSitePropertiesList_MountSitePropertiesSeq_index == 2) then + local body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_StabilizerFrameRec_tree = body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_tree:add("StabilizerFrameRec") + body_MountSitePropertiesList_MountSitePropertiesSeq_CoordinateFrameVar_StabilizerFrameRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d -- (unsigned byte) ID of the stabilizer which the coordinate frame is representing.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + local body_MountSitePropertiesList_MountSitePropertiesSeq_LocationRec_tree = body_MountSitePropertiesList_MountSitePropertiesSeq_tree:add("LocationRec") + body_MountSitePropertiesList_MountSitePropertiesSeq_LocationRec_tree:add(buffer(bufidx, 4), string.format("OffsetX: %.4f (scaled) -- (unsigned integer) X coordinate of mount site location in selected frame of reference.", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + body_MountSitePropertiesList_MountSitePropertiesSeq_LocationRec_tree:add(buffer(bufidx, 4), string.format("OffsetY: %.4f (scaled) -- (unsigned integer) Y coordinate of mount site location in selected frame of reference.", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + body_MountSitePropertiesList_MountSitePropertiesSeq_LocationRec_tree:add(buffer(bufidx, 4), string.format("OffsetZ: %.4f (scaled) -- (unsigned integer) Z coordinate of mount site location in selected frame of reference.", buffer(bufidx, 4):le_uint() * 0.000000232831 + (-500.000000000000))) + bufidx = bufidx + 4 + local body_MountSitePropertiesList_MountSitePropertiesSeq_OrientationRec_tree = body_MountSitePropertiesList_MountSitePropertiesSeq_tree:add("OrientationRec") + body_MountSitePropertiesList_MountSitePropertiesSeq_OrientationRec_tree:add(buffer(bufidx, 4), string.format("dComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_MountSitePropertiesList_MountSitePropertiesSeq_OrientationRec_tree:add(buffer(bufidx, 4), string.format("aComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_MountSitePropertiesList_MountSitePropertiesSeq_OrientationRec_tree:add(buffer(bufidx, 4), string.format("bComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_MountSitePropertiesList_MountSitePropertiesSeq_OrientationRec_tree:add(buffer(bufidx, 4), string.format("cComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end +end +messagetable:add(0xF701, reportmountsite_f701) + +queryacousticsensorstatus_dabb = Proto("queryacousticsensorstatus_dabb", "QueryAcousticSensorStatus 0xdabb") +function queryacousticsensorstatus_dabb.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/AcousticSensor_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAcousticSensorStatus", string.format("QueryAcousticSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAcousticSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryAcousticSensorList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryAcousticSensorList ") + body_QueryAcousticSensorList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_QueryAcousticSensorList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_QueryAcousticSensorList_count do + local body_QueryAcousticSensorList_QueryAcousticSensorRec_tree = body_QueryAcousticSensorList_tree:add(string.format("QueryAcousticSensorRec_%d", body_counter - 1)) + body_QueryAcousticSensorList_QueryAcousticSensorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the acoustic sensor to be queried. A value of zero (0) implies all sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0xDABB, queryacousticsensorstatus_dabb) + +reportacousticsensorstatus_dabc = Proto("reportacousticsensorstatus_dabc", "ReportAcousticSensorStatus 0xdabc") +function reportacousticsensorstatus_dabc.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/AcousticSensor_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAcousticSensorStatus", string.format("ReportAcousticSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAcousticSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_AcousticSensorStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "AcousticSensorStatusList ") + body_AcousticSensorStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_AcousticSensorStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_AcousticSensorStatusList_count do + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_tree = body_AcousticSensorStatusList_tree:add(string.format("AcousticSensorStatusSeq_%d", body_counter - 1)) + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_tree = body_AcousticSensorStatusList_AcousticSensorStatusSeq_tree:add("AcousticSensorStatusRec") + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_pv_count = 0 + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the acoustic sensor to be queried. A value of zero (0) is not permitted.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_pv, body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_pv_count) > 0) then + local value_set = {[0] = "SensorRelative", [1] = "VehicleRelative", [2] = "GlobalRelative"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("CoordinateFrameEnum: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_pv_count = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorStatusRec_pv_count + 1 + local bufidx_start_body_AcousticSensorStatusList_AcousticSensorStatusSeq = bufidx + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_tree = body_AcousticSensorStatusList_AcousticSensorStatusSeq_tree:add(buffer(bufidx_start_body_AcousticSensorStatusList_AcousticSensorStatusSeq, buffer:len() - bufidx_start_body_AcousticSensorStatusList_AcousticSensorStatusSeq), "AcousticSensorDataList ") + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_AcousticSensorStatusList_AcousticSensorStatusSeq_counter=1,body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_count do + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_tree:add(string.format("AcousticSensorDataRec_%d", body_AcousticSensorStatusList_AcousticSensorStatusSeq_counter - 1)) + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv = buffer(bufidx, 1):le_uint() + local body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count = 0 + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv, body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count) > 0) then + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree:add(buffer(bufidx, 4), string.format("Range: %.4f (scaled) -- (unsigned integer) distance to the detected acoustic signal source", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count + 1 + if (bitAND(body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv, body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count) > 0) then + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree:add(buffer(bufidx, 4), string.format("Bearing: %.4f (scaled) -- (unsigned integer) bearing (rotation about the Z axis) to the detected acoustic signal source", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count + 1 + if (bitAND(body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv, body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count) > 0) then + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree:add(buffer(bufidx, 4), string.format("Elevation: %.4f (scaled) -- (unsigned integer) elevation (rotation about the Y axis) to the detected acoustic signal source", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count + 1 + if (bitAND(body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv, body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count) > 0) then + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree:add(buffer(bufidx, 4), string.format("Intensity: %d -- (float) Magnitude of the detected acoustic signal source", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count + 1 + if (bitAND(body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv, body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count) > 0) then + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree:add(buffer(bufidx, 1), string.format("Characterization: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count + 1 + if (bitAND(body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv, body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count) > 0) then + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count + 1 + if (bitAND(body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv, body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count) > 0) then + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count = body_AcousticSensorStatusList_AcousticSensorStatusSeq_AcousticSensorDataList_AcousticSensorDataRec_pv_count + 1 + end + end +end +messagetable:add(0xDABC, reportacousticsensorstatus_dabc) + +querycommunicatorcapability_2900 = Proto("querycommunicatorcapability_2900", "QueryCommunicatorCapability 0x2900") +function querycommunicatorcapability_2900.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommunicatorCapability", string.format("QueryCommunicatorCapability, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommunicatorCapability")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2900, querycommunicatorcapability_2900) + +querycommunicatorcapabilityext_2904 = Proto("querycommunicatorcapabilityext_2904", "QueryCommunicatorCapabilityExt 0x2904") +function querycommunicatorcapabilityext_2904.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommunicatorCapabilityExt", string.format("QueryCommunicatorCapabilityExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommunicatorCapabilityExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2904, querycommunicatorcapabilityext_2904) + +querycommunicatorconfiguration_2901 = Proto("querycommunicatorconfiguration_2901", "QueryCommunicatorConfiguration 0x2901") +function querycommunicatorconfiguration_2901.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommunicatorConfiguration", string.format("QueryCommunicatorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommunicatorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryCommunicatorConfigurationRec_tree = body_tree:add("QueryCommunicatorConfigurationRec") + body_QueryCommunicatorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x2901, querycommunicatorconfiguration_2901) + +querycommunicatorhealth_2902 = Proto("querycommunicatorhealth_2902", "QueryCommunicatorHealth 0x2902") +function querycommunicatorhealth_2902.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommunicatorHealth", string.format("QueryCommunicatorHealth, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommunicatorHealth")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryCommunicatorHealthRec_tree = body_tree:add("QueryCommunicatorHealthRec") + body_QueryCommunicatorHealthRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x2902, querycommunicatorhealth_2902) + +querycommunicatorhealthext_2903 = Proto("querycommunicatorhealthext_2903", "QueryCommunicatorHealthExt 0x2903") +function querycommunicatorhealthext_2903.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommunicatorHealthExt", string.format("QueryCommunicatorHealthExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommunicatorHealthExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryCommunicatorHealthSeq_tree = body_tree:add("QueryCommunicatorHealthSeq") + local body_QueryCommunicatorHealthSeq_QueryCommunicatorHealthRec_tree = body_QueryCommunicatorHealthSeq_tree:add("QueryCommunicatorHealthRec") + body_QueryCommunicatorHealthSeq_QueryCommunicatorHealthRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local bufidx_start_body_QueryCommunicatorHealthSeq = bufidx + local body_QueryCommunicatorHealthSeq_QueryEndpointList_tree = body_QueryCommunicatorHealthSeq_tree:add(buffer(bufidx_start_body_QueryCommunicatorHealthSeq, buffer:len() - bufidx_start_body_QueryCommunicatorHealthSeq), "QueryEndpointList ") + body_QueryCommunicatorHealthSeq_QueryEndpointList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_QueryCommunicatorHealthSeq_QueryEndpointList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_QueryCommunicatorHealthSeq_counter=1,body_QueryCommunicatorHealthSeq_QueryEndpointList_count do + local body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_tree = body_QueryCommunicatorHealthSeq_QueryEndpointList_tree:add(string.format("QueryEndpointRec_%d", body_QueryCommunicatorHealthSeq_counter - 1)) + local body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf = buffer(bufidx, 4) + local body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_tree = body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_tree:add(buffer(bufidx, 4), string.format("%s = EndpointID: 0x%X -- (unsigned integer) JAUS ID of the endpoint from which signal health should be measured. In a mesh network environment, this may include multiple hops over multiple radios. If this list is empty or an Endpoint ID of zero is used, general health of the communicator should be returned rather than health for a particular link.", bitstr(body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf:le_uint(), 32), body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf:le_uint())) + body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf:le_uint(), 32, 0, 7), bitVal(body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf:le_uint(), 0, 7))) + body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf:le_uint(), 32, 8, 15), bitVal(body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf:le_uint(), 8, 15))) + body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf:le_uint(), 32, 16, 31), bitVal(body_QueryCommunicatorHealthSeq_QueryEndpointList_QueryEndpointRec_EndpointID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end +end +messagetable:add(0x2903, querycommunicatorhealthext_2903) + +setcommunicatorconfiguration_0901 = Proto("setcommunicatorconfiguration_0901", "SetCommunicatorConfiguration 0x0901") +function setcommunicatorconfiguration_0901.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetCommunicatorConfiguration", string.format("SetCommunicatorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetCommunicatorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetCommunicatorConfigurationSeq_tree = body_tree:add("SetCommunicatorConfigurationSeq") + local body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree = body_SetCommunicatorConfigurationSeq_tree:add("SetCommunicatorConfigurationRec") + local body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv = buffer(bufidx, 2):le_uint() + local body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = 0 + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "TransmitOFF", [1] = "TransmitON", [2] = "Standby"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("TransmitterStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Point_to_Point", [1] = "Multipoint"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ModeOfOperation: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + local body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_EncryptionMode_buf = buffer(bufidx, 1) + local body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_EncryptionMode_tree = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("%s = EncryptionMode: 0x%X ", bitstr(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_EncryptionMode_buf:le_uint(), 8), body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_EncryptionMode_buf:le_uint())) + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_EncryptionMode_tree:add(buffer(bufidx, 1), string.format("%s = TransmitterMode: %d", bitstr_part(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_EncryptionMode_buf:le_uint(), 8, 0, 0), bitVal(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_EncryptionMode_buf:le_uint(), 0, 0))) + bufidx = bufidx + 1 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Channel: %d -- (unsigned byte) Channel number as defined by the Report Capabilities message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FrequencyBand: %d -- (unsigned byte) Band index as defined by the Report Capabilities message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "AdaptiveModulation", [1] = "MOD2_QAM", [2] = "MOD2_PSK", [3] = "MOD2_FSK", [4] = "MOD4_QAM", [5] = "MOD4_PSK", [6] = "MOD4_FSK", [7] = "MOD8_QAM", [8] = "MOD8_PSK", [9] = "MOD8_FSK", [10] = "MOD16_QAM", [11] = "MOD16_PSK", [12] = "MOD16_FSK", [13] = "MOD32_QAM", [14] = "MOD32_PSK", [15] = "MOD32_FSK", [16] = "MOD64_QAM", [17] = "MOD64_PSK", [18] = "MOD64_FSK"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ModulationScheme: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("OccupiedBandwidth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.023283064371 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ReservedForFutureUse: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv, body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ReservedForFutureIopUse: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count = body_SetCommunicatorConfigurationSeq_SetCommunicatorConfigurationRec_pv_count + 1 + local body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_tree = body_SetCommunicatorConfigurationSeq_tree:add("TransmitPowerVariant") + body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 3", buffer(bufidx, 1):le_uint())) + local body_SetCommunicatorConfigurationSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_SetCommunicatorConfigurationSeq_index == 0) then + local body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_ContinuousAdjustableRec_tree = body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add("ContinuousAdjustableRec") + body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_ContinuousAdjustableRec_tree:add(buffer(bufidx, 2), string.format("TransmitPower: %.4f (scaled) -- (unsigned short integer) Target value for the transmit power in watts. If the communicator supports only discrete values of power selection within the continuously adjustable range, this target value shall be rounded down to the nearest supported value by the implementation, such that the actual achieved value can never exceed the requested target value.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + if (body_SetCommunicatorConfigurationSeq_index == 1) then + local body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_HighLowPowerRec_tree = body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add("HighLowPowerRec") + local value_set = {[0] = "LOW_POWER", [1] = "HIGH_POWER"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_HighLowPowerRec_tree:add(buffer(bufidx, 1), string.format("TransmitPower: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_SetCommunicatorConfigurationSeq_index == 2) then + local body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_AutomaticPowerControlRec_tree = body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add("AutomaticPowerControlRec") + body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_AutomaticPowerControlRec_tree:add(buffer(bufidx, 2), string.format("MinTransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_AutomaticPowerControlRec_tree:add(buffer(bufidx, 2), string.format("MaxTransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_AutomaticPowerControlRec_tree:add(buffer(bufidx, 2), string.format("CurrentTransmitPower: %.4f (scaled) -- (unsigned short integer) If reporting, indicates the current transmit power. If being used to set configuration, indicates a desired transmit power, but this is not guaranteed.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + if (body_SetCommunicatorConfigurationSeq_index == 3) then + local body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_NoChangeRec_tree = body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add("NoChangeRec") + local value_set = {[0] = "NO_CHANGE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetCommunicatorConfigurationSeq_TransmitPowerVariant_NoChangeRec_tree:add(buffer(bufidx, 1), string.format("TransmitPower: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x0901, setcommunicatorconfiguration_0901) + +reportcommunicatorcapability_4900 = Proto("reportcommunicatorcapability_4900", "ReportCommunicatorCapability 0x4900") +function reportcommunicatorcapability_4900.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommunicatorCapability", string.format("ReportCommunicatorCapability, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommunicatorCapability")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportCommunicatorCapabilitiesSeq_tree = body_tree:add("ReportCommunicatorCapabilitiesSeq") + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree = body_ReportCommunicatorCapabilitiesSeq_tree:add("ReportCommunicatorCapabilityRec") + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = 0 + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf = buffer(bufidx, 1) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedTransmitterStatus: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 8), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_tree:add(buffer(bufidx, 1), string.format("%s = TransmitON: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 0, 0))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_tree:add(buffer(bufidx, 1), string.format("%s = TransmitOFF: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 8, 1, 1), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 1, 1))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_tree:add(buffer(bufidx, 1), string.format("%s = Standby: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 8, 2, 2), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf = buffer(bufidx, 1) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedModesOfOperation: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 8), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_tree:add(buffer(bufidx, 1), string.format("%s = Point_to_Point: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 0, 0))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_tree:add(buffer(bufidx, 1), string.format("%s = Multipoint: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 8, 1, 1), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf = buffer(bufidx, 1) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedEncryptionModes: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf:le_uint(), 8), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_tree:add(buffer(bufidx, 1), string.format("%s = Transmitter_supports_encryption: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf:le_uint(), 0, 0))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 2), string.format("MinTransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 2), string.format("MaxTransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf = buffer(bufidx, 1) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedTransmitPowerLevels: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree:add(buffer(bufidx, 1), string.format("%s = Continuous_Scale_Adjustable: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 0, 0))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree:add(buffer(bufidx, 1), string.format("%s = Low_Power: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8, 1, 1), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 1, 1))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree:add(buffer(bufidx, 1), string.format("%s = High_Power: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8, 2, 2), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 2, 2))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree:add(buffer(bufidx, 1), string.format("%s = Automatic_Transmit_Power_Control: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8, 3, 3), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf = buffer(bufidx, 4) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedModulationSchemes: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = Adaptive_Modulation: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 0, 0))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod2_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 1, 1), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 1, 1))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod2_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 2, 2), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 2, 2))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod2_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 3, 3), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 3, 3))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod4_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 4, 4), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 4, 4))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod4_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 5, 5), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 5, 5))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod4_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 6, 6), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 6, 6))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod8_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 7, 7), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 7, 7))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod8_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 8, 8), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 8, 8))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod8_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 9, 9), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 9, 9))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod16_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 10, 10), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 10, 10))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod16_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 11, 11), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 11, 11))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod16_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 12, 12), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 12, 12))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod32_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 13, 13), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 13, 13))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod32_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 14, 14), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 14, 14))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod32_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 15, 15), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 15, 15))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod64_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 16, 16), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 16, 16))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod64_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 17, 17), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 17, 17))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod64_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 18, 18), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 18, 18))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 4), string.format("MinimumOccupiedBandwidth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.023283064371 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 4), string.format("MaximumOccupiedBandwidth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.023283064371 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + local bufidx_start_body_ReportCommunicatorCapabilitiesSeq = bufidx + local body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_tree = body_ReportCommunicatorCapabilitiesSeq_tree:add(buffer(bufidx_start_body_ReportCommunicatorCapabilitiesSeq, buffer:len() - bufidx_start_body_ReportCommunicatorCapabilitiesSeq), "FrequencyBandList ") + body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportCommunicatorCapabilitiesSeq_counter=1,body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_count do + local body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_FrequencyBandRec_tree = body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_tree:add(string.format("FrequencyBandRec_%d", body_ReportCommunicatorCapabilitiesSeq_counter - 1)) + body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_FrequencyBandRec_tree:add(buffer(bufidx, 1), string.format("BandIndex: %d -- (unsigned byte) Defines a band for multi-band radios. Each band is defined in the range of [Min, Max].", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_FrequencyBandRec_tree:add(buffer(bufidx, 8), string.format("MinFrequency: %.4f (scaled) -- (unsigned long integer) Range of 100 kHz to 10 GHz", buffer(bufidx, 8):le_uint() * 0.000000000542 + (100000.000000000000))) + bufidx = bufidx + 8 + body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_FrequencyBandRec_tree:add(buffer(bufidx, 8), string.format("MaxFrequency: %.4f (scaled) -- (unsigned long integer) Range of 100 kHz to 10 GHz", buffer(bufidx, 8):le_uint() * 0.000000000542 + (100000.000000000000))) + bufidx = bufidx + 8 + end + local bufidx_start_body_ReportCommunicatorCapabilitiesSeq = bufidx + local body_ReportCommunicatorCapabilitiesSeq_ChannelList_tree = body_ReportCommunicatorCapabilitiesSeq_tree:add(buffer(bufidx_start_body_ReportCommunicatorCapabilitiesSeq, buffer:len() - bufidx_start_body_ReportCommunicatorCapabilitiesSeq), "ChannelList ") + body_ReportCommunicatorCapabilitiesSeq_ChannelList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportCommunicatorCapabilitiesSeq_ChannelList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportCommunicatorCapabilitiesSeq_counter=1,body_ReportCommunicatorCapabilitiesSeq_ChannelList_count do + local body_ReportCommunicatorCapabilitiesSeq_ChannelList_ChannelRec_tree = body_ReportCommunicatorCapabilitiesSeq_ChannelList_tree:add(string.format("ChannelRec_%d", body_ReportCommunicatorCapabilitiesSeq_counter - 1)) + body_ReportCommunicatorCapabilitiesSeq_ChannelList_ChannelRec_tree:add(buffer(bufidx, 1), string.format("ChannelNumber: %d -- (unsigned byte) For multi-band radios, channel numbers may be repeated, but each duplicate channel number must have a unique band index.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ReportCommunicatorCapabilitiesSeq_ChannelList_ChannelRec_tree:add(buffer(bufidx, 8), string.format("CenterFrequency: %.4f (scaled) -- (unsigned long integer) Range of 100 kHz to 10 GHz", buffer(bufidx, 8):le_uint() * 0.000000000542 + (100000.000000000000))) + bufidx = bufidx + 8 + body_ReportCommunicatorCapabilitiesSeq_ChannelList_ChannelRec_tree:add(buffer(bufidx, 1), string.format("FrequencyBand: %d -- (unsigned byte) Index of FrequencyBand to which this channel belongs.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x4900, reportcommunicatorcapability_4900) + +reportcommunicatorcapabilityext_4904 = Proto("reportcommunicatorcapabilityext_4904", "ReportCommunicatorCapabilityExt 0x4904") +function reportcommunicatorcapabilityext_4904.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommunicatorCapabilityExt", string.format("ReportCommunicatorCapabilityExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommunicatorCapabilityExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportCommunicatorCapabilitiesSeq_tree = body_tree:add("ReportCommunicatorCapabilitiesSeq") + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree = body_ReportCommunicatorCapabilitiesSeq_tree:add("ReportCommunicatorCapabilityRec") + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = 0 + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_RadioID_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("RadioID[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_RadioID_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf = buffer(bufidx, 1) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedTransmitterStatus: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 8), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_tree:add(buffer(bufidx, 1), string.format("%s = TransmitON: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 0, 0))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_tree:add(buffer(bufidx, 1), string.format("%s = TransmitOFF: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 8, 1, 1), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 1, 1))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_tree:add(buffer(bufidx, 1), string.format("%s = Standby: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 8, 2, 2), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitterStatus_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf = buffer(bufidx, 1) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedModesOfOperation: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 8), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_tree:add(buffer(bufidx, 1), string.format("%s = Point_to_Point: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 0, 0))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_tree:add(buffer(bufidx, 1), string.format("%s = Multipoint: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 8, 1, 1), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModesOfOperation_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf = buffer(bufidx, 1) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedEncryptionModes: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf:le_uint(), 8), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_tree:add(buffer(bufidx, 1), string.format("%s = Transmitter_supports_encryption: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedEncryptionModes_buf:le_uint(), 0, 0))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 2), string.format("MinTransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 2), string.format("MaxTransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf = buffer(bufidx, 1) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedTransmitPowerLevels: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree:add(buffer(bufidx, 1), string.format("%s = Continuous_Scale_Adjustable: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 0, 0))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree:add(buffer(bufidx, 1), string.format("%s = Low_Power: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8, 1, 1), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 1, 1))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree:add(buffer(bufidx, 1), string.format("%s = High_Power: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8, 2, 2), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 2, 2))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_tree:add(buffer(bufidx, 1), string.format("%s = Automatic_Transmit_Power_Control: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 8, 3, 3), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedTransmitPowerLevels_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf = buffer(bufidx, 4) + local body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 4), string.format("%s = SupportedModulationSchemes: 0x%X ", bitstr(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32), body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint())) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = Adaptive_Modulation: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 0, 0), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 0, 0))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod2_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 1, 1), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 1, 1))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod2_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 2, 2), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 2, 2))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod2_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 3, 3), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 3, 3))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod4_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 4, 4), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 4, 4))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod4_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 5, 5), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 5, 5))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod4_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 6, 6), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 6, 6))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod8_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 7, 7), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 7, 7))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod8_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 8, 8), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 8, 8))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod8_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 9, 9), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 9, 9))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod16_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 10, 10), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 10, 10))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod16_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 11, 11), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 11, 11))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod16_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 12, 12), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 12, 12))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod32_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 13, 13), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 13, 13))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod32_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 14, 14), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 14, 14))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod32_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 15, 15), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 15, 15))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod64_QAM: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 16, 16), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 16, 16))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod64_PSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 17, 17), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 17, 17))) + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_tree:add(buffer(bufidx, 4), string.format("%s = mod64_FSK: %d", bitstr_part(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 32, 18, 18), bitVal(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_SupportedModulationSchemes_buf:le_uint(), 18, 18))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 4), string.format("MinimumOccupiedBandwidth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.023283064371 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv, body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count) > 0) then + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_tree:add(buffer(bufidx, 4), string.format("MaximumOccupiedBandwidth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.023283064371 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count = body_ReportCommunicatorCapabilitiesSeq_ReportCommunicatorCapabilityRec_pv_count + 1 + local bufidx_start_body_ReportCommunicatorCapabilitiesSeq = bufidx + local body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_tree = body_ReportCommunicatorCapabilitiesSeq_tree:add(buffer(bufidx_start_body_ReportCommunicatorCapabilitiesSeq, buffer:len() - bufidx_start_body_ReportCommunicatorCapabilitiesSeq), "FrequencyBandList ") + body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportCommunicatorCapabilitiesSeq_counter=1,body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_count do + local body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_FrequencyBandRec_tree = body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_tree:add(string.format("FrequencyBandRec_%d", body_ReportCommunicatorCapabilitiesSeq_counter - 1)) + body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_FrequencyBandRec_tree:add(buffer(bufidx, 1), string.format("BandIndex: %d -- (unsigned byte) Defines a band for multi-band radios. Each band is defined in the range of [Min, Max].", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_FrequencyBandRec_tree:add(buffer(bufidx, 8), string.format("MinFrequency: %.4f (scaled) -- (unsigned long integer) Range of 100 kHz to 10 GHz", buffer(bufidx, 8):le_uint() * 0.000000000542 + (100000.000000000000))) + bufidx = bufidx + 8 + body_ReportCommunicatorCapabilitiesSeq_FrequencyBandList_FrequencyBandRec_tree:add(buffer(bufidx, 8), string.format("MaxFrequency: %.4f (scaled) -- (unsigned long integer) Range of 100 kHz to 10 GHz", buffer(bufidx, 8):le_uint() * 0.000000000542 + (100000.000000000000))) + bufidx = bufidx + 8 + end + local bufidx_start_body_ReportCommunicatorCapabilitiesSeq = bufidx + local body_ReportCommunicatorCapabilitiesSeq_ChannelList_tree = body_ReportCommunicatorCapabilitiesSeq_tree:add(buffer(bufidx_start_body_ReportCommunicatorCapabilitiesSeq, buffer:len() - bufidx_start_body_ReportCommunicatorCapabilitiesSeq), "ChannelList ") + body_ReportCommunicatorCapabilitiesSeq_ChannelList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportCommunicatorCapabilitiesSeq_ChannelList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportCommunicatorCapabilitiesSeq_counter=1,body_ReportCommunicatorCapabilitiesSeq_ChannelList_count do + local body_ReportCommunicatorCapabilitiesSeq_ChannelList_ChannelRec_tree = body_ReportCommunicatorCapabilitiesSeq_ChannelList_tree:add(string.format("ChannelRec_%d", body_ReportCommunicatorCapabilitiesSeq_counter - 1)) + body_ReportCommunicatorCapabilitiesSeq_ChannelList_ChannelRec_tree:add(buffer(bufidx, 1), string.format("ChannelNumber: %d -- (unsigned byte) For multi-band radios, channel numbers may be repeated, but each duplicate channel number must have a unique band index.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ReportCommunicatorCapabilitiesSeq_ChannelList_ChannelRec_tree:add(buffer(bufidx, 8), string.format("CenterFrequency: %.4f (scaled) -- (unsigned long integer) Range of 100 kHz to 10 GHz", buffer(bufidx, 8):le_uint() * 0.000000000542 + (100000.000000000000))) + bufidx = bufidx + 8 + body_ReportCommunicatorCapabilitiesSeq_ChannelList_ChannelRec_tree:add(buffer(bufidx, 1), string.format("FrequencyBand: %d -- (unsigned byte) Index of FrequencyBand to which this channel belongs.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x4904, reportcommunicatorcapabilityext_4904) + +reportcommunicatorconfiguration_4901 = Proto("reportcommunicatorconfiguration_4901", "ReportCommunicatorConfiguration 0x4901") +function reportcommunicatorconfiguration_4901.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommunicatorConfiguration", string.format("ReportCommunicatorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommunicatorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportCommunicatorConfigurationSeq_tree = body_tree:add("ReportCommunicatorConfigurationSeq") + local body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree = body_ReportCommunicatorConfigurationSeq_tree:add("ReportCommunicatorConfigurationRec") + local body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = 0 + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "TransmitOFF", [1] = "TransmitON", [2] = "Standby"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("TransmitterStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Point_to_Point", [1] = "Multipoint", [2] = "MeshOrMANET", [3] = "CloudNetwork"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ModeOfOperation: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + local body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_EncryptionMode_buf = buffer(bufidx, 1) + local body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_EncryptionMode_tree = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("%s = EncryptionMode: 0x%X ", bitstr(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_EncryptionMode_buf:le_uint(), 8), body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_EncryptionMode_buf:le_uint())) + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_EncryptionMode_tree:add(buffer(bufidx, 1), string.format("%s = Transmitter_supports_encryption: %d", bitstr_part(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_EncryptionMode_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_EncryptionMode_buf:le_uint(), 0, 0))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Channel: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("FrequencyBand: %d -- (unsigned byte) Band index as defined by the Report Capabilities message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + local body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_buf = buffer(bufidx, 1) + local body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_tree = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("%s = ActiveModulationScheme: 0x%X ", bitstr(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_buf:le_uint(), 8), body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_buf:le_uint())) + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_tree:add(buffer(bufidx, 1), string.format("%s = Adaptive_Modulation: %d", bitstr_part(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_buf:le_uint(), 8, 0, 0), bitVal(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_buf:le_uint(), 0, 0))) + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_tree:add(buffer(bufidx, 1), string.format("%s = CurrentModulation: %d", bitstr_part(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_buf:le_uint(), 8, 1, 7), bitVal(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_ActiveModulationScheme_buf:le_uint(), 1, 7))) + bufidx = bufidx + 1 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 4), string.format("OccupiedBandwidth: %.4f (scaled) -- (unsigned integer) Range of 0 to 100 Mhz", buffer(bufidx, 4):le_uint() * 0.023283064371 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ReservedForFutureUse: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv, body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count) > 0) then + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("ReservedForFutureIopUse: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count = body_ReportCommunicatorConfigurationSeq_ReportCommunicatorConfigurationRec_pv_count + 1 + local body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_tree = body_ReportCommunicatorConfigurationSeq_tree:add("TransmitPowerVariant") + body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_ReportCommunicatorConfigurationSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ReportCommunicatorConfigurationSeq_index == 0) then + local body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_ContinuousAdjustableRec_tree = body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add("ContinuousAdjustableRec") + body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_ContinuousAdjustableRec_tree:add(buffer(bufidx, 2), string.format("TransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + if (body_ReportCommunicatorConfigurationSeq_index == 1) then + local body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_HighLowPowerRec_tree = body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add("HighLowPowerRec") + local value_set = {[0] = "LOW_POWER", [1] = "HIGH_POWER"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_HighLowPowerRec_tree:add(buffer(bufidx, 1), string.format("TransmitPower: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_ReportCommunicatorConfigurationSeq_index == 2) then + local body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_AutomaticPowerControlRec_tree = body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_tree:add("AutomaticPowerControlRec") + body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_AutomaticPowerControlRec_tree:add(buffer(bufidx, 2), string.format("MinTransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_AutomaticPowerControlRec_tree:add(buffer(bufidx, 2), string.format("MaxTransmitPower: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + body_ReportCommunicatorConfigurationSeq_TransmitPowerVariant_AutomaticPowerControlRec_tree:add(buffer(bufidx, 2), string.format("CurrentTransmitPower: %.4f (scaled) -- (unsigned short integer) If reporting, indicates the current transmit power. If being used to set configuration, indicates a desired transmit power, but this is not guaranteed.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x4901, reportcommunicatorconfiguration_4901) + +reportcommunicatorhealth_4902 = Proto("reportcommunicatorhealth_4902", "ReportCommunicatorHealth 0x4902") +function reportcommunicatorhealth_4902.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommunicatorHealth", string.format("ReportCommunicatorHealth, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommunicatorHealth")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportCommunicatorHealthSeq_tree = body_tree:add("ReportCommunicatorHealthSeq") + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree = body_ReportCommunicatorHealthSeq_tree:add("ReportCommunicatorHealthRec") + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count = 0 + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count) > 0) then + local value_set = {[0] = "Passed", [1] = "Failed"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree:add(buffer(bufidx, 1), string.format("BIT_Results: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree:add(buffer(bufidx, 2), string.format("Latency: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000015259022 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree:add(buffer(bufidx, 2), string.format("DataRate: %.4f (scaled) -- (unsigned short integer) Measured in Mbps", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree:add(buffer(bufidx, 2), string.format("ReceivedSignalPower: %.4f (scaled) -- (unsigned short integer) Measured in dBm", buffer(bufidx, 2):le_uint() * 0.001525902190 + (-120.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree:add(buffer(bufidx, 2), string.format("ErrorVectorMagnitude: %.4f (scaled) -- (unsigned short integer) Measured in percent", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count + 1 + local body_ReportCommunicatorHealthSeq_ErrorVariant_tree = body_ReportCommunicatorHealthSeq_tree:add("ErrorVariant") + body_ReportCommunicatorHealthSeq_ErrorVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 3", buffer(bufidx, 1):le_uint())) + local body_ReportCommunicatorHealthSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ReportCommunicatorHealthSeq_index == 0) then + local body_ReportCommunicatorHealthSeq_ErrorVariant_PacketErrorCountRec_tree = body_ReportCommunicatorHealthSeq_ErrorVariant_tree:add("PacketErrorCountRec") + body_ReportCommunicatorHealthSeq_ErrorVariant_PacketErrorCountRec_tree:add(buffer(bufidx, 4), string.format("PacketErrorCount: %d -- (unsigned integer) Number of packet errors in the last one second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + if (body_ReportCommunicatorHealthSeq_index == 1) then + local body_ReportCommunicatorHealthSeq_ErrorVariant_PacketErrorRateRec_tree = body_ReportCommunicatorHealthSeq_ErrorVariant_tree:add("PacketErrorRateRec") + body_ReportCommunicatorHealthSeq_ErrorVariant_PacketErrorRateRec_tree:add(buffer(bufidx, 4), string.format("PacketErrorRate: %.4f (scaled) -- (unsigned integer) Packet errors as a percentage of total packets sent", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_ReportCommunicatorHealthSeq_index == 2) then + local body_ReportCommunicatorHealthSeq_ErrorVariant_BitErrorCountRec_tree = body_ReportCommunicatorHealthSeq_ErrorVariant_tree:add("BitErrorCountRec") + body_ReportCommunicatorHealthSeq_ErrorVariant_BitErrorCountRec_tree:add(buffer(bufidx, 4), string.format("BitErrorCount: %d -- (unsigned integer) Number of bit errors in the last one second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + if (body_ReportCommunicatorHealthSeq_index == 3) then + local body_ReportCommunicatorHealthSeq_ErrorVariant_BitErrorRateRec_tree = body_ReportCommunicatorHealthSeq_ErrorVariant_tree:add("BitErrorRateRec") + body_ReportCommunicatorHealthSeq_ErrorVariant_BitErrorRateRec_tree:add(buffer(bufidx, 4), string.format("BitErrorRate: %.4f (scaled) -- (unsigned integer) Bit errors as a percentage of total bits sent", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + local bufidx_start_body_ReportCommunicatorHealthSeq = bufidx + local body_ReportCommunicatorHealthSeq_ChannelList_tree = body_ReportCommunicatorHealthSeq_tree:add(buffer(bufidx_start_body_ReportCommunicatorHealthSeq, buffer:len() - bufidx_start_body_ReportCommunicatorHealthSeq), "ChannelList ") + body_ReportCommunicatorHealthSeq_ChannelList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportCommunicatorHealthSeq_ChannelList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportCommunicatorHealthSeq_counter=1,body_ReportCommunicatorHealthSeq_ChannelList_count do + local body_ReportCommunicatorHealthSeq_ChannelList_SNR_Per_Channel_Rec_tree = body_ReportCommunicatorHealthSeq_ChannelList_tree:add(string.format("SNR_Per_Channel_Rec_%d", body_ReportCommunicatorHealthSeq_counter - 1)) + body_ReportCommunicatorHealthSeq_ChannelList_SNR_Per_Channel_Rec_tree:add(buffer(bufidx, 1), string.format("Channel: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ReportCommunicatorHealthSeq_ChannelList_SNR_Per_Channel_Rec_tree:add(buffer(bufidx, 2), string.format("SNR: %.4f (scaled) -- (unsigned short integer) Difference between signal power and noise level, measured in dB", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x4902, reportcommunicatorhealth_4902) + +reportcommunicatorhealthext_4903 = Proto("reportcommunicatorhealthext_4903", "ReportCommunicatorHealthExt 0x4903") +function reportcommunicatorhealthext_4903.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommunicatorHealthExt", string.format("ReportCommunicatorHealthExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommunicatorHealthExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportCommunicatorHealthSeq_tree = body_tree:add("ReportCommunicatorHealthSeq") + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree = body_ReportCommunicatorHealthSeq_tree:add("ReportCommunicatorHealthRec") + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count = 0 + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count) > 0) then + local value_set = {[0] = "Passed", [1] = "Failed"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_tree:add(buffer(bufidx, 1), string.format("BIT_Results: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthRec_pv_count + 1 + local bufidx_start_body_ReportCommunicatorHealthSeq = bufidx + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_tree = body_ReportCommunicatorHealthSeq_tree:add(buffer(bufidx_start_body_ReportCommunicatorHealthSeq, buffer:len() - bufidx_start_body_ReportCommunicatorHealthSeq), "ReportCommunicatorHealthList ") + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportCommunicatorHealthSeq_counter=1,body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_count do + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_tree:add(string.format("ReportCommunicatorLinkHealthRec_%d", body_ReportCommunicatorHealthSeq_counter - 1)) + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = 0 + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf = buffer(bufidx, 4) + local body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_tree = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 4), string.format("%s = EndpointID: 0x%X -- (unsigned integer) JAUS ID of the endpoint from which signal health was measured to the local radio. In a mesh network environment, this may include multiple hops over multiple radios.", bitstr(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf:le_uint(), 32), body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf:le_uint())) + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf:le_uint(), 32, 0, 7), bitVal(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf:le_uint(), 0, 7))) + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf:le_uint(), 32, 8, 15), bitVal(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf:le_uint(), 8, 15))) + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf:le_uint(), 32, 16, 31), bitVal(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_EndpointID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 1), string.format("Channel: %d -- (unsigned byte) Channel for which metrics are being reported. This is generally the active channel, but may not be for systems that support metrics for non-active channels.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 2), string.format("Latency: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000015259022 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 2), string.format("DataRate: %.4f (scaled) -- (unsigned short integer) Measured in Mbps", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 2), string.format("ReceivedSignalPower: %.4f (scaled) -- (unsigned short integer) Measured in dBm", buffer(bufidx, 2):le_uint() * 0.001525902190 + (-120.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 2), string.format("ErrorVectorMagnitude: %.4f (scaled) -- (unsigned short integer) Measured in percent", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 1), string.format("SignalQualityIndicator: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 2), string.format("SNR: %.4f (scaled) -- (unsigned short integer) Difference between signal power and noise level, measured in dB", buffer(bufidx, 2):le_uint() * 0.003814755474 + (-50.000000000000))) + bufidx = bufidx + 2 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 4), string.format("PacketErrorCount: %d -- (unsigned integer) Number of packet errors in the last one second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 4), string.format("PacketErrorRate: %.4f (scaled) -- (unsigned integer) Packet errors as a percentage of total packets sent", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 4), string.format("BitErrorCount: %d -- (unsigned integer) Number of bit errors in the last one second", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + if (bitAND(body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv, body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count) > 0) then + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_tree:add(buffer(bufidx, 4), string.format("BitErrorRate: %.4f (scaled) -- (unsigned integer) Bit errors as a percentage of total bits sent", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count = body_ReportCommunicatorHealthSeq_ReportCommunicatorHealthList_ReportCommunicatorLinkHealthRec_pv_count + 1 + end +end +messagetable:add(0x4903, reportcommunicatorhealthext_4903) + +setcommunicatorconfigurationresponse_0902 = Proto("setcommunicatorconfigurationresponse_0902", "SetCommunicatorConfigurationResponse 0x0902") +function setcommunicatorconfigurationresponse_0902.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/Communicator_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetCommunicatorConfigurationResponse", string.format("SetCommunicatorConfigurationResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetCommunicatorConfigurationResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetCommunicatorConfigurationResponseRec_tree = body_tree:add("SetCommunicatorConfigurationResponseRec") + local body_SetCommunicatorConfigurationResponseRec_Result_buf = buffer(bufidx, 1) + local body_SetCommunicatorConfigurationResponseRec_Result_tree = body_SetCommunicatorConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("%s = Result: 0x%X ", bitstr(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8), body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint())) + body_SetCommunicatorConfigurationResponseRec_Result_tree:add(buffer(bufidx, 1), string.format("%s = TransmittedStatusInvalid: %d", bitstr_part(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8, 0, 0), bitVal(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 0, 0))) + body_SetCommunicatorConfigurationResponseRec_Result_tree:add(buffer(bufidx, 1), string.format("%s = ModeInvalid: %d", bitstr_part(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8, 1, 1), bitVal(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 1, 1))) + body_SetCommunicatorConfigurationResponseRec_Result_tree:add(buffer(bufidx, 1), string.format("%s = ChannelInvalid: %d", bitstr_part(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8, 2, 2), bitVal(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 2, 2))) + body_SetCommunicatorConfigurationResponseRec_Result_tree:add(buffer(bufidx, 1), string.format("%s = PowerLevelInvalid: %d", bitstr_part(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8, 3, 3), bitVal(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 3, 3))) + body_SetCommunicatorConfigurationResponseRec_Result_tree:add(buffer(bufidx, 1), string.format("%s = ModulationInvalid: %d", bitstr_part(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8, 4, 4), bitVal(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 4, 4))) + body_SetCommunicatorConfigurationResponseRec_Result_tree:add(buffer(bufidx, 1), string.format("%s = BandwidthInvalid: %d", bitstr_part(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8, 5, 5), bitVal(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 5, 5))) + body_SetCommunicatorConfigurationResponseRec_Result_tree:add(buffer(bufidx, 1), string.format("%s = EncryptionModeInvalid: %d", bitstr_part(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8, 6, 6), bitVal(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 6, 6))) + body_SetCommunicatorConfigurationResponseRec_Result_tree:add(buffer(bufidx, 1), string.format("%s = OtherFailure: %d", bitstr_part(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 8, 7, 7), bitVal(body_SetCommunicatorConfigurationResponseRec_Result_buf:le_uint(), 7, 7))) + bufidx = bufidx + 1 +end +messagetable:add(0x0902, setcommunicatorconfigurationresponse_0902) + +setcontactfollowingconfiguration_dd9a = Proto("setcontactfollowingconfiguration_dd9a", "SetContactFollowingConfiguration 0xdd9a") +function setcontactfollowingconfiguration_dd9a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ContactFollowing_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetContactFollowingConfiguration", string.format("SetContactFollowingConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetContactFollowingConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ContactFollowingConfigurationSeq_tree = body_tree:add("ContactFollowingConfigurationSeq") + local body_ContactFollowingConfigurationSeq_pv = buffer(bufidx, 1):le_uint() + local body_ContactFollowingConfigurationSeq_pv_count = 0 + body_ContactFollowingConfigurationSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_ContactFollowingConfigurationSeq_RequestIDRec_tree = body_ContactFollowingConfigurationSeq_tree:add("RequestIDRec") + body_ContactFollowingConfigurationSeq_RequestIDRec_tree:add(buffer(bufidx, 2), string.format("RequestID: %d -- (unsigned short integer) ID associated with the request. This is generated by the client and used to monitor responses from the service.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_ContactFollowingConfigurationSeq_pv, body_ContactFollowingConfigurationSeq_pv_count) > 0) then + local body_ContactFollowingConfigurationSeq_FollowContactRec_tree = body_ContactFollowingConfigurationSeq_tree:add("FollowContactRec-- Record identifying the contact to follow. If this record is omitted, the message is to be interpretted as a command to cease contact following.") + body_ContactFollowingConfigurationSeq_FollowContactRec_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to follow. A value of zero (0) is not supported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf = buffer(bufidx, 4) + local body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_tree = body_ContactFollowingConfigurationSeq_FollowContactRec_tree:add(buffer(bufidx, 4), string.format("%s = TrackingComponentJausID: 0x%X -- (unsigned integer) Address of the JAUS component on which the Contact Tracking service that identified this contact resides", bitstr(body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf:le_uint(), 32), body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf:le_uint())) + body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf:le_uint(), 32, 0, 7), bitVal(body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf:le_uint(), 0, 7))) + body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf:le_uint(), 32, 8, 15), bitVal(body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf:le_uint(), 8, 15))) + body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf:le_uint(), 32, 16, 31), bitVal(body_ContactFollowingConfigurationSeq_FollowContactRec_TrackingComponentJausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_ContactFollowingConfigurationSeq_pv_count = body_ContactFollowingConfigurationSeq_pv_count + 1 +end +messagetable:add(0xDD9A, setcontactfollowingconfiguration_dd9a) + +querycontactfollowingstatus_dd9b = Proto("querycontactfollowingstatus_dd9b", "QueryContactFollowingStatus 0xdd9b") +function querycontactfollowingstatus_dd9b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ContactFollowing_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryContactFollowingStatus", string.format("QueryContactFollowingStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryContactFollowingStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDD9B, querycontactfollowingstatus_dd9b) + +setcontactfollowingconfigurationresponse_dd9c = Proto("setcontactfollowingconfigurationresponse_dd9c", "SetContactFollowingConfigurationResponse 0xdd9c") +function setcontactfollowingconfigurationresponse_dd9c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ContactFollowing_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetContactFollowingConfigurationResponse", string.format("SetContactFollowingConfigurationResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetContactFollowingConfigurationResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ContactFollowConfigurationResponseRec_tree = body_tree:add("ContactFollowConfigurationResponseRec") + body_ContactFollowConfigurationResponseRec_tree:add(buffer(bufidx, 2), string.format("RequestID: %d -- (unsigned short integer) ID associated with the request. This is generated by the client and used to monitor responses from the service.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local value_set = {[0] = "SUCCESS", [1] = "INVALID_CONFIGURATION", [2] = "UNKNOWN_CONTACT", [3] = "FAILED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ContactFollowConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDD9C, setcontactfollowingconfigurationresponse_dd9c) + +reportcontactfollowingstatus_dd9d = Proto("reportcontactfollowingstatus_dd9d", "ReportContactFollowingStatus 0xdd9d") +function reportcontactfollowingstatus_dd9d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ContactFollowing_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportContactFollowingStatus", string.format("ReportContactFollowingStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportContactFollowingStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ContactFollowingStatusVar_tree = body_tree:add("ContactFollowingStatusVar") + body_ContactFollowingStatusVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_index == 0) then + local body_ContactFollowingStatusVar_NotFollowingRec_tree = body_ContactFollowingStatusVar_tree:add("NotFollowingRec") + local value_set = {[0] = "Reserved"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ContactFollowingStatusVar_NotFollowingRec_tree:add(buffer(bufidx, 1), string.format("NotFollowingField: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_index == 1) then + local body_ContactFollowingStatusVar_ContactFollowingStatusRec_tree = body_ContactFollowingStatusVar_tree:add("ContactFollowingStatusRec-- Record identifying the contact to follow.") + body_ContactFollowingStatusVar_ContactFollowingStatusRec_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to follow. A value of zero (0) is not supported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf = buffer(bufidx, 4) + local body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_tree = body_ContactFollowingStatusVar_ContactFollowingStatusRec_tree:add(buffer(bufidx, 4), string.format("%s = TrackingComponentJausID: 0x%X -- (unsigned integer) Address of the JAUS component on which the Contact Tracking service that identified this contact resides", bitstr(body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf:le_uint(), 32), body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf:le_uint())) + body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf:le_uint(), 32, 0, 7), bitVal(body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf:le_uint(), 0, 7))) + body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf:le_uint(), 32, 8, 15), bitVal(body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf:le_uint(), 8, 15))) + body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf:le_uint(), 32, 16, 31), bitVal(body_ContactFollowingStatusVar_ContactFollowingStatusRec_TrackingComponentJausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + local value_set = {[0] = "FOLLOWING_ACTIVE", [1] = "SEARCHING_FOR_CONTACT", [2] = "FOLLOWING_FAILED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ContactFollowingStatusVar_ContactFollowingStatusRec_tree:add(buffer(bufidx, 1), string.format("FollowingStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xDD9D, reportcontactfollowingstatus_dd9d) + +setcontactsext_dd92 = Proto("setcontactsext_dd92", "SetContactsExt 0xdd92") +function setcontactsext_dd92.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ContactTracking_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetContactsExt", string.format("SetContactsExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetContactsExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ContactRec_tree = body_tree:add("ContactRec") + local body_ContactRec_pv = buffer(bufidx, 1):le_uint() + local body_ContactRec_pv_count = 0 + body_ContactRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ContactRec_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to be set. A value of zero (0) is not supported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_ContactRec_pv, body_ContactRec_pv_count) > 0) then + local body_ContactRec_Designation_tree = body_ContactRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Designation[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ContactRec_Designation_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_ContactRec_pv_count = body_ContactRec_pv_count + 1 + if (bitAND(body_ContactRec_pv, body_ContactRec_pv_count) > 0) then + local body_ContactRec_Classification_buf = buffer(bufidx, 4) + local body_ContactRec_Classification_tree = body_ContactRec_tree:add(buffer(bufidx, 4), string.format("%s = Classification: 0x%X -- (unsigned integer) Description of a contact's classification, which can be estimated by the implementation or assigned by an operator.", bitstr(body_ContactRec_Classification_buf:le_uint(), 32), body_ContactRec_Classification_buf:le_uint())) + body_ContactRec_Classification_tree:add(buffer(bufidx, 4), string.format("%s = Category: %d", bitstr_part(body_ContactRec_Classification_buf:le_uint(), 32, 0, 7), bitVal(body_ContactRec_Classification_buf:le_uint(), 0, 7))) + body_ContactRec_Classification_tree:add(buffer(bufidx, 4), string.format("%s = Detail: %d", bitstr_part(body_ContactRec_Classification_buf:le_uint(), 32, 8, 16), bitVal(body_ContactRec_Classification_buf:le_uint(), 8, 16))) + body_ContactRec_Classification_tree:add(buffer(bufidx, 4), string.format("%s = Confidence: %d", bitstr_part(body_ContactRec_Classification_buf:le_uint(), 32, 17, 23), bitVal(body_ContactRec_Classification_buf:le_uint(), 17, 23))) + bufidx = bufidx + 4 + end + body_ContactRec_pv_count = body_ContactRec_pv_count + 1 + if (bitAND(body_ContactRec_pv, body_ContactRec_pv_count) > 0) then + local body_ContactRec_Disposition_buf = buffer(bufidx, 1) + local body_ContactRec_Disposition_tree = body_ContactRec_tree:add(buffer(bufidx, 1), string.format("%s = Disposition: 0x%X ", bitstr(body_ContactRec_Disposition_buf:le_uint(), 8), body_ContactRec_Disposition_buf:le_uint())) + body_ContactRec_Disposition_tree:add(buffer(bufidx, 1), string.format("%s = DispositionType: %d", bitstr_part(body_ContactRec_Disposition_buf:le_uint(), 8, 0, 4), bitVal(body_ContactRec_Disposition_buf:le_uint(), 0, 4))) + body_ContactRec_Disposition_tree:add(buffer(bufidx, 1), string.format("%s = Confidence: %d", bitstr_part(body_ContactRec_Disposition_buf:le_uint(), 8, 5, 6), bitVal(body_ContactRec_Disposition_buf:le_uint(), 5, 6))) + bufidx = bufidx + 1 + end + body_ContactRec_pv_count = body_ContactRec_pv_count + 1 + if (bitAND(body_ContactRec_pv, body_ContactRec_pv_count) > 0) then + local body_ContactRec_Priority_buf = buffer(bufidx, 1) + local body_ContactRec_Priority_tree = body_ContactRec_tree:add(buffer(bufidx, 1), string.format("%s = Priority: 0x%X ", bitstr(body_ContactRec_Priority_buf:le_uint(), 8), body_ContactRec_Priority_buf:le_uint())) + body_ContactRec_Priority_tree:add(buffer(bufidx, 1), string.format("%s = PriorityType: %d", bitstr_part(body_ContactRec_Priority_buf:le_uint(), 8, 0, 4), bitVal(body_ContactRec_Priority_buf:le_uint(), 0, 4))) + body_ContactRec_Priority_tree:add(buffer(bufidx, 1), string.format("%s = Confidence: %d", bitstr_part(body_ContactRec_Priority_buf:le_uint(), 8, 5, 6), bitVal(body_ContactRec_Priority_buf:le_uint(), 5, 6))) + bufidx = bufidx + 1 + end + body_ContactRec_pv_count = body_ContactRec_pv_count + 1 +end +messagetable:add(0xDD92, setcontactsext_dd92) + +querycontactsext_dd93 = Proto("querycontactsext_dd93", "QueryContactsExt 0xdd93") +function querycontactsext_dd93.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ContactTracking_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryContactsExt", string.format("QueryContactsExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryContactsExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryContactsRec_tree = body_tree:add("QueryContactsRec") + body_QueryContactsRec_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to be reported. A value of zero (0) returns all known contacts", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_QueryContactsRec_tree:add(buffer(bufidx, 4), string.format("PresenceVector: %d -- (unsigned integer) The preferred values to be returned in the report message.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 +end +messagetable:add(0xDD93, querycontactsext_dd93) + +reportcontactsext_dd94 = Proto("reportcontactsext_dd94", "ReportContactsExt 0xdd94") +function reportcontactsext_dd94.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ContactTracking_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportContactsExt", string.format("ReportContactsExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportContactsExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ContactList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ContactList ") + body_ContactList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + local body_ContactList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_ContactList_count do + local body_ContactList_ContactSeq_tree = body_ContactList_tree:add(string.format("ContactSeq_%d", body_counter - 1)) + local body_ContactList_ContactSeq_ContactRec_tree = body_ContactList_ContactSeq_tree:add("ContactRec") + local body_ContactList_ContactSeq_ContactRec_pv = buffer(bufidx, 1):le_uint() + local body_ContactList_ContactSeq_ContactRec_pv_count = 0 + body_ContactList_ContactSeq_ContactRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ContactList_ContactSeq_ContactRec_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact, assigned by the implementation upon detection. This ID is then used to represent the same contact as its tracked in time and space. A value of zero (0) is not supported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_ContactList_ContactSeq_ContactRec_pv, body_ContactList_ContactSeq_ContactRec_pv_count) > 0) then + local body_ContactList_ContactSeq_ContactRec_Designation_tree = body_ContactList_ContactSeq_ContactRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Designation[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ContactList_ContactSeq_ContactRec_Designation_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_ContactList_ContactSeq_ContactRec_pv_count = body_ContactList_ContactSeq_ContactRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactRec_pv, body_ContactList_ContactSeq_ContactRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactRec_tree:add(buffer(bufidx, 1), string.format("TrackingConfidence: %.4f (scaled) -- (unsigned byte) Denotes the confidence of the tracking solution as a percent. A value of zero indicates the contact has been lost. A value at or near 100 implies an active, strong contact.", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_ContactList_ContactSeq_ContactRec_pv_count = body_ContactList_ContactSeq_ContactRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactRec_pv, body_ContactList_ContactSeq_ContactRec_pv_count) > 0) then + local body_ContactList_ContactSeq_ContactRec_Classification_buf = buffer(bufidx, 4) + local body_ContactList_ContactSeq_ContactRec_Classification_tree = body_ContactList_ContactSeq_ContactRec_tree:add(buffer(bufidx, 4), string.format("%s = Classification: 0x%X -- (unsigned integer) Description of a contact's classification, which can be estimated by the implementation or assigned by an operator.", bitstr(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 32), body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint())) + body_ContactList_ContactSeq_ContactRec_Classification_tree:add(buffer(bufidx, 4), string.format("%s = Category: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 32, 0, 7), bitVal(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 0, 7))) + body_ContactList_ContactSeq_ContactRec_Classification_tree:add(buffer(bufidx, 4), string.format("%s = Detail: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 32, 8, 16), bitVal(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 8, 16))) + body_ContactList_ContactSeq_ContactRec_Classification_tree:add(buffer(bufidx, 4), string.format("%s = Confidence: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 32, 17, 23), bitVal(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 17, 23))) + body_ContactList_ContactSeq_ContactRec_Classification_tree:add(buffer(bufidx, 4), string.format("%s = Source: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 32, 24, 24), bitVal(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 24, 24))) + body_ContactList_ContactSeq_ContactRec_Classification_tree:add(buffer(bufidx, 4), string.format("%s = Reserved: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 32, 25, 31), bitVal(body_ContactList_ContactSeq_ContactRec_Classification_buf:le_uint(), 25, 31))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactRec_pv_count = body_ContactList_ContactSeq_ContactRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactRec_pv, body_ContactList_ContactSeq_ContactRec_pv_count) > 0) then + local body_ContactList_ContactSeq_ContactRec_Disposition_buf = buffer(bufidx, 1) + local body_ContactList_ContactSeq_ContactRec_Disposition_tree = body_ContactList_ContactSeq_ContactRec_tree:add(buffer(bufidx, 1), string.format("%s = Disposition: 0x%X ", bitstr(body_ContactList_ContactSeq_ContactRec_Disposition_buf:le_uint(), 8), body_ContactList_ContactSeq_ContactRec_Disposition_buf:le_uint())) + body_ContactList_ContactSeq_ContactRec_Disposition_tree:add(buffer(bufidx, 1), string.format("%s = DispositionType: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Disposition_buf:le_uint(), 8, 0, 4), bitVal(body_ContactList_ContactSeq_ContactRec_Disposition_buf:le_uint(), 0, 4))) + body_ContactList_ContactSeq_ContactRec_Disposition_tree:add(buffer(bufidx, 1), string.format("%s = Confidence: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Disposition_buf:le_uint(), 8, 5, 6), bitVal(body_ContactList_ContactSeq_ContactRec_Disposition_buf:le_uint(), 5, 6))) + body_ContactList_ContactSeq_ContactRec_Disposition_tree:add(buffer(bufidx, 1), string.format("%s = Source: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Disposition_buf:le_uint(), 8, 7, 7), bitVal(body_ContactList_ContactSeq_ContactRec_Disposition_buf:le_uint(), 7, 7))) + bufidx = bufidx + 1 + end + body_ContactList_ContactSeq_ContactRec_pv_count = body_ContactList_ContactSeq_ContactRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactRec_pv, body_ContactList_ContactSeq_ContactRec_pv_count) > 0) then + local body_ContactList_ContactSeq_ContactRec_Priority_buf = buffer(bufidx, 1) + local body_ContactList_ContactSeq_ContactRec_Priority_tree = body_ContactList_ContactSeq_ContactRec_tree:add(buffer(bufidx, 1), string.format("%s = Priority: 0x%X ", bitstr(body_ContactList_ContactSeq_ContactRec_Priority_buf:le_uint(), 8), body_ContactList_ContactSeq_ContactRec_Priority_buf:le_uint())) + body_ContactList_ContactSeq_ContactRec_Priority_tree:add(buffer(bufidx, 1), string.format("%s = PriorityType: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Priority_buf:le_uint(), 8, 0, 4), bitVal(body_ContactList_ContactSeq_ContactRec_Priority_buf:le_uint(), 0, 4))) + body_ContactList_ContactSeq_ContactRec_Priority_tree:add(buffer(bufidx, 1), string.format("%s = Confidence: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Priority_buf:le_uint(), 8, 5, 6), bitVal(body_ContactList_ContactSeq_ContactRec_Priority_buf:le_uint(), 5, 6))) + body_ContactList_ContactSeq_ContactRec_Priority_tree:add(buffer(bufidx, 1), string.format("%s = Source: %d", bitstr_part(body_ContactList_ContactSeq_ContactRec_Priority_buf:le_uint(), 8, 7, 7), bitVal(body_ContactList_ContactSeq_ContactRec_Priority_buf:le_uint(), 7, 7))) + bufidx = bufidx + 1 + end + body_ContactList_ContactSeq_ContactRec_pv_count = body_ContactList_ContactSeq_ContactRec_pv_count + 1 + local body_ContactList_ContactSeq_ContactStateEstimate_tree = body_ContactList_ContactSeq_tree:add("ContactStateEstimate-- Pose and velocity of the contact. Variant used depends on CoordinateFrame as selected in GeneralSensor") + body_ContactList_ContactSeq_ContactStateEstimate_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_ContactList_ContactSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ContactList_ContactSeq_index == 0) then + local body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree = body_ContactList_ContactSeq_ContactStateEstimate_tree:add("GlobalRelativeRec-- Pose and velocity offered in a global frame of reference") + local body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv = buffer(bufidx, 4):le_uint() + local body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = 0 + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 4):le_uint(), 4 * 8))) + bufidx = bufidx + 4 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("AltitudeAGL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("AltitudeMSL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("AltitudeASF: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("Depth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("Velocity_North: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("Velocity_East: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Down: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("Velocity_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the velocity data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 2), string.format("Rate_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the rotational velocity data.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970, time of last contact", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time, time of last contact", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_GlobalRelativeRec_pv_count + 1 + end + if (body_ContactList_ContactSeq_index == 1) then + local body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree = body_ContactList_ContactSeq_ContactStateEstimate_tree:add("VehicleRelativeRec-- Pose and velocity offered in a vehicle frame of reference, such that X points from the origin out the front of the vehicle, Z points down, and Y completes a right-handed frame") + local body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv = buffer(bufidx, 4):le_uint() + local body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = 0 + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 4):le_uint(), 4 * 8))) + bufidx = bufidx + 4 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("Velocity_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the velocity data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 2), string.format("Rate_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the rotational velocity data.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970, time of last contact", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time, time of last contact", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_VehicleRelativeRec_pv_count + 1 + end + if (body_ContactList_ContactSeq_index == 2) then + local body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree = body_ContactList_ContactSeq_ContactStateEstimate_tree:add("SensorRelativeRec-- Pose and velocity offered in a sensor frame of reference, meaured in spherical coordinate frame based on distance from the sensor, horizontal angle from the sensor center axis(bearing, positive right), and vertical angle from the sensor center axis (elevation, positive up)") + local body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv = buffer(bufidx, 1):le_uint() + local body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = 0 + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 4), string.format("Range: %.4f (scaled) -- (unsigned integer) distance to the object", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 4), string.format("Bearing: %.4f (scaled) -- (unsigned integer) bearing (rotation about the Z axis) to theobject", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 4), string.format("Elevation: %.4f (scaled) -- (unsigned integer) elevation (rotation about the Y axis) to the object", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 4), string.format("RangeRateOfChange: %.4f (scaled) -- (unsigned integer) Rate of change of distance to the object", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 4), string.format("BearingRateOfChange: %.4f (scaled) -- (unsigned integer) Rate of change of bearing (rotation about the Z axis) to the object", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 4), string.format("ElevationRateOfChange: %.4f (scaled) -- (unsigned integer) Rate of change of elevation (rotation about the Y axis) to the object", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count + 1 + if (bitAND(body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv, body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count) > 0) then + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count = body_ContactList_ContactSeq_ContactStateEstimate_SensorRelativeRec_pv_count + 1 + end + end +end +messagetable:add(0xDD94, reportcontactsext_dd94) + +setloggerstate_9109 = Proto("setloggerstate_9109", "SetLoggerState 0x9109") +function setloggerstate_9109.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLoggerState", string.format("SetLoggerState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLoggerState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerStateList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerStateList ") + body_LoggerStateList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerStateList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerStateList_count do + local body_LoggerStateList_LoggerStateRec_tree = body_LoggerStateList_tree:add(string.format("LoggerStateRec_%d", body_counter - 1)) + body_LoggerStateList_LoggerStateRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "LoggerOn", [1] = "LoggerOff", [2] = "LoggerPause"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoggerStateList_LoggerStateRec_tree:add(buffer(bufidx, 1), string.format("LoggerState: %d [%s] -- (byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x9109, setloggerstate_9109) + +setloggerconfiguration_9110 = Proto("setloggerconfiguration_9110", "SetLoggerConfiguration 0x9110") +function setloggerconfiguration_9110.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLoggerConfiguration", string.format("SetLoggerConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLoggerConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerConfigurationList ") + body_LoggerConfigurationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerConfigurationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerConfigurationList_count do + local body_LoggerConfigurationList_LoggerConfigurationSeq_tree = body_LoggerConfigurationList_tree:add(string.format("LoggerConfigurationSeq_%d", body_counter - 1)) + local body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_tree = body_LoggerConfigurationList_LoggerConfigurationSeq_tree:add("LoggerConfigurationRec") + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf = buffer(bufidx, 1) + local body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree = body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("%s = LoggingLevel: 0x%X ", bitstr(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8), body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint())) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogVerbose: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 0, 0), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 0, 0))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogUnknown: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 1, 1), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 1, 1))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogCritical: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 2, 2), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 2, 2))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogError: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 3, 3), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 3, 3))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogWarning: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 4, 4), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 4, 4))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogInformation: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 5, 5), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 5, 5))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogDebug: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 6, 6), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree = body_LoggerConfigurationList_LoggerConfigurationSeq_tree:add("OverflowPolicyRec") + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv = buffer(bufidx, 1):le_uint() + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count = 0 + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "First_In_First_Out", [1] = "Last_In_First_Out", [2] = "Least_Recently_Used", [3] = "Most_Recently_Used", [4] = "Least_Frequently_Used", [5] = "Random_Replacement"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 1), string.format("OverflowRemovalPolicy: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv, body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count) > 0) then + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf = buffer(bufidx, 1) + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree = body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 1), string.format("%s = OverflowLoggingLevel: 0x%X ", bitstr(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8), body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint())) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogVerbose: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 0, 0), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 0, 0))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogUnknown: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 1, 1), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 1, 1))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogCritical: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 2, 2), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 2, 2))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogError: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 3, 3), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 3, 3))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogWarning: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 4, 4), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 4, 4))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogInformation: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 5, 5), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 5, 5))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogDebug: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 6, 6), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + end + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count = body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count + 1 + if (bitAND(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv, body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count) > 0) then + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 8), string.format("OverflowSizeThreshold: %d -- (unsigned long integer) Size in MB", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count = body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count + 1 + if (bitAND(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv, body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count) > 0) then + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 1), string.format("OverflowPercentageThreshold: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count = body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count + 1 + end +end +messagetable:add(0x9110, setloggerconfiguration_9110) + +queryloggerconfiguration_9112 = Proto("queryloggerconfiguration_9112", "QueryLoggerConfiguration 0x9112") +function queryloggerconfiguration_9112.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLoggerConfiguration", string.format("QueryLoggerConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLoggerConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerIDList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerIDList ") + body_LoggerIDList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerIDList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerIDList_count do + local body_LoggerIDList_LoggerIDRec_tree = body_LoggerIDList_tree:add(string.format("LoggerIDRec_%d", body_counter - 1)) + body_LoggerIDList_LoggerIDRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x9112, queryloggerconfiguration_9112) + +queryloggerstatus_9111 = Proto("queryloggerstatus_9111", "QueryLoggerStatus 0x9111") +function queryloggerstatus_9111.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLoggerStatus", string.format("QueryLoggerStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLoggerStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerIDList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerIDList ") + body_LoggerIDList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerIDList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerIDList_count do + local body_LoggerIDList_LoggerIDRec_tree = body_LoggerIDList_tree:add(string.format("LoggerIDRec_%d", body_counter - 1)) + body_LoggerIDList_LoggerIDRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x9111, queryloggerstatus_9111) + +queryloggercapability_9113 = Proto("queryloggercapability_9113", "QueryLoggerCapability 0x9113") +function queryloggercapability_9113.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLoggerCapability", string.format("QueryLoggerCapability, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLoggerCapability")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerIDList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerIDList ") + body_LoggerIDList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerIDList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerIDList_count do + local body_LoggerIDList_LoggerIDRec_tree = body_LoggerIDList_tree:add(string.format("LoggerIDRec_%d", body_counter - 1)) + body_LoggerIDList_LoggerIDRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x9113, queryloggercapability_9113) + +reportloggerstatus_9211 = Proto("reportloggerstatus_9211", "ReportLoggerStatus 0x9211") +function reportloggerstatus_9211.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLoggerStatus", string.format("ReportLoggerStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLoggerStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerStatusList ") + body_LoggerStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerStatusList_count do + local body_LoggerStatusList_LoggerStatusRec_tree = body_LoggerStatusList_tree:add(string.format("LoggerStatusRec_%d", body_counter - 1)) + local body_LoggerStatusList_LoggerStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_LoggerStatusList_LoggerStatusRec_pv_count = 0 + body_LoggerStatusList_LoggerStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LoggerStatusList_LoggerStatusRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "LoggerOn", [1] = "LoggerOff", [2] = "LoggerPause"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoggerStatusList_LoggerStatusRec_tree:add(buffer(bufidx, 1), string.format("LoggerState: %d [%s] -- (byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_LoggerStatusList_LoggerStatusRec_pv, body_LoggerStatusList_LoggerStatusRec_pv_count) > 0) then + body_LoggerStatusList_LoggerStatusRec_tree:add(buffer(bufidx, 8), string.format("FillSize: %d -- (unsigned long integer) Filled size of log(s) in MB", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_LoggerStatusList_LoggerStatusRec_pv_count = body_LoggerStatusList_LoggerStatusRec_pv_count + 1 + if (bitAND(body_LoggerStatusList_LoggerStatusRec_pv, body_LoggerStatusList_LoggerStatusRec_pv_count) > 0) then + body_LoggerStatusList_LoggerStatusRec_tree:add(buffer(bufidx, 1), string.format("FillPercentageRec: %.4f (scaled) -- (unsigned byte) Percentage of space filled by log(s)", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_LoggerStatusList_LoggerStatusRec_pv_count = body_LoggerStatusList_LoggerStatusRec_pv_count + 1 + if (bitAND(body_LoggerStatusList_LoggerStatusRec_pv, body_LoggerStatusList_LoggerStatusRec_pv_count) > 0) then + local body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf = buffer(bufidx, 4) + local body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_tree = body_LoggerStatusList_LoggerStatusRec_tree:add(buffer(bufidx, 4), string.format("%s = BeginningTimestamp: 0x%X ", bitstr(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 32), body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint())) + body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 32, 0, 9), bitVal(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 0, 9))) + body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 32, 10, 15), bitVal(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 10, 15))) + body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 32, 16, 21), bitVal(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 16, 21))) + body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 32, 22, 26), bitVal(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 22, 26))) + body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 32, 27, 31), bitVal(body_LoggerStatusList_LoggerStatusRec_BeginningTimestamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_LoggerStatusList_LoggerStatusRec_pv_count = body_LoggerStatusList_LoggerStatusRec_pv_count + 1 + if (bitAND(body_LoggerStatusList_LoggerStatusRec_pv, body_LoggerStatusList_LoggerStatusRec_pv_count) > 0) then + local body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf = buffer(bufidx, 4) + local body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_tree = body_LoggerStatusList_LoggerStatusRec_tree:add(buffer(bufidx, 4), string.format("%s = EndingTimestamp: 0x%X ", bitstr(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 32), body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint())) + body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 32, 27, 31), bitVal(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 27, 31))) + body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 32, 0, 9), bitVal(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 0, 9))) + body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 32, 10, 15), bitVal(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 10, 15))) + body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 32, 16, 21), bitVal(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 16, 21))) + body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 32, 22, 26), bitVal(body_LoggerStatusList_LoggerStatusRec_EndingTimestamp_buf:le_uint(), 22, 26))) + bufidx = bufidx + 4 + end + body_LoggerStatusList_LoggerStatusRec_pv_count = body_LoggerStatusList_LoggerStatusRec_pv_count + 1 + end +end +messagetable:add(0x9211, reportloggerstatus_9211) + +reportloggerconfiguration_9212 = Proto("reportloggerconfiguration_9212", "ReportLoggerConfiguration 0x9212") +function reportloggerconfiguration_9212.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLoggerConfiguration", string.format("ReportLoggerConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLoggerConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerConfigurationList ") + body_LoggerConfigurationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerConfigurationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerConfigurationList_count do + local body_LoggerConfigurationList_LoggerConfigurationSeq_tree = body_LoggerConfigurationList_tree:add(string.format("LoggerConfigurationSeq_%d", body_counter - 1)) + local body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_tree = body_LoggerConfigurationList_LoggerConfigurationSeq_tree:add("LoggerConfigurationRec") + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf = buffer(bufidx, 1) + local body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree = body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("%s = LoggingLevel: 0x%X ", bitstr(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8), body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint())) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogVerbose: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 0, 0), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 0, 0))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogUnknown: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 1, 1), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 1, 1))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogCritical: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 2, 2), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 2, 2))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogError: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 3, 3), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 3, 3))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogWarning: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 4, 4), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 4, 4))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogInformation: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 5, 5), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 5, 5))) + body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogDebug: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 8, 6, 6), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_LoggerConfigurationRec_LoggingLevel_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree = body_LoggerConfigurationList_LoggerConfigurationSeq_tree:add("OverflowPolicyRec") + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv = buffer(bufidx, 1):le_uint() + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count = 0 + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "First_In_First_Out", [1] = "Last_In_First_Out", [2] = "Least_Recently_Used", [3] = "Most_Recently_Used", [4] = "Least_Frequently_Used", [5] = "Random_Replacement"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 1), string.format("OverflowRemovalPolicy: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv, body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count) > 0) then + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf = buffer(bufidx, 1) + local body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree = body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 1), string.format("%s = OverflowLoggingLevel: 0x%X ", bitstr(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8), body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint())) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogVerbose: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 0, 0), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 0, 0))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogUnknown: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 1, 1), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 1, 1))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogCritical: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 2, 2), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 2, 2))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogError: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 3, 3), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 3, 3))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogWarning: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 4, 4), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 4, 4))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogInformation: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 5, 5), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 5, 5))) + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogDebug: %d", bitstr_part(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 8, 6, 6), bitVal(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_OverflowLoggingLevel_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + end + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count = body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count + 1 + if (bitAND(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv, body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count) > 0) then + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 8), string.format("OverflowSizeThreshold: %d -- (unsigned long integer) Size in MB", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count = body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count + 1 + if (bitAND(body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv, body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count) > 0) then + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_tree:add(buffer(bufidx, 1), string.format("OverflowPercentageThreshold: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count = body_LoggerConfigurationList_LoggerConfigurationSeq_OverflowPolicyRec_pv_count + 1 + end +end +messagetable:add(0x9212, reportloggerconfiguration_9212) + +reportloggercapability_9213 = Proto("reportloggercapability_9213", "ReportLoggerCapability 0x9213") +function reportloggercapability_9213.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLoggerCapability", string.format("ReportLoggerCapability, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLoggerCapability")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerCapabilityList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerCapabilityList ") + body_LoggerCapabilityList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerCapabilityList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerCapabilityList_count do + local body_LoggerCapabilityList_LoggerCapabilityRec_tree = body_LoggerCapabilityList_tree:add(string.format("LoggerCapabilityRec_%d", body_counter - 1)) + local body_LoggerCapabilityList_LoggerCapabilityRec_pv = buffer(bufidx, 1):le_uint() + local body_LoggerCapabilityList_LoggerCapabilityRec_pv_count = 0 + body_LoggerCapabilityList_LoggerCapabilityRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LoggerCapabilityList_LoggerCapabilityRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_LoggerCapabilityList_LoggerCapabilityRec_LoggerDescription_tree = body_LoggerCapabilityList_LoggerCapabilityRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("LoggerDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_LoggerCapabilityList_LoggerCapabilityRec_LoggerDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf = buffer(bufidx, 1) + local body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_tree = body_LoggerCapabilityList_LoggerCapabilityRec_tree:add(buffer(bufidx, 1), string.format("%s = LoggingLevel: 0x%X ", bitstr(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 8), body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint())) + body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogVerbose: %d", bitstr_part(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 8, 0, 0), bitVal(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 0, 0))) + body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogUnknown: %d", bitstr_part(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 8, 1, 1), bitVal(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 1, 1))) + body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogCritical: %d", bitstr_part(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 8, 2, 2), bitVal(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 2, 2))) + body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogError: %d", bitstr_part(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 8, 3, 3), bitVal(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 3, 3))) + body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogWarning: %d", bitstr_part(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 8, 4, 4), bitVal(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 4, 4))) + body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogInformation: %d", bitstr_part(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 8, 5, 5), bitVal(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 5, 5))) + body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_tree:add(buffer(bufidx, 1), string.format("%s = LogDebug: %d", bitstr_part(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 8, 6, 6), bitVal(body_LoggerCapabilityList_LoggerCapabilityRec_LoggingLevel_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + if (bitAND(body_LoggerCapabilityList_LoggerCapabilityRec_pv, body_LoggerCapabilityList_LoggerCapabilityRec_pv_count) > 0) then + body_LoggerCapabilityList_LoggerCapabilityRec_tree:add(buffer(bufidx, 8), string.format("OverflowSizeThreshold: %d -- (unsigned long integer) Size in MB", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_LoggerCapabilityList_LoggerCapabilityRec_pv_count = body_LoggerCapabilityList_LoggerCapabilityRec_pv_count + 1 + if (bitAND(body_LoggerCapabilityList_LoggerCapabilityRec_pv, body_LoggerCapabilityList_LoggerCapabilityRec_pv_count) > 0) then + body_LoggerCapabilityList_LoggerCapabilityRec_tree:add(buffer(bufidx, 1), string.format("OverflowPercentageThreshold: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_LoggerCapabilityList_LoggerCapabilityRec_pv_count = body_LoggerCapabilityList_LoggerCapabilityRec_pv_count + 1 + end +end +messagetable:add(0x9213, reportloggercapability_9213) + +setloggerconfigurationresponse_9210 = Proto("setloggerconfigurationresponse_9210", "SetLoggerConfigurationResponse 0x9210") +function setloggerconfigurationresponse_9210.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DataLogging.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLoggerConfigurationResponse", string.format("SetLoggerConfigurationResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLoggerConfigurationResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoggerConfigurationResponseList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoggerConfigurationResponseList ") + body_LoggerConfigurationResponseList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoggerConfigurationResponseList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoggerConfigurationResponseList_count do + local body_LoggerConfigurationResponseList_LoggerConfigurationResponseRec_tree = body_LoggerConfigurationResponseList_tree:add(string.format("LoggerConfigurationResponseRec_%d", body_counter - 1)) + body_LoggerConfigurationResponseList_LoggerConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("LoggerID: %d -- (byte) ID of the logger, 0 reserved to be all loggers", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "None", [1] = "Overflow_Policy_Unsupported", [2] = "Logging_Level_Unsupported"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoggerConfigurationResponseList_LoggerConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("ErrorField: %d [%s] -- (byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x9210, setloggerconfigurationresponse_9210) + +querydebrisblowercapabilities_d7b8 = Proto("querydebrisblowercapabilities_d7b8", "QueryDebrisBlowerCapabilities 0xd7b8") +function querydebrisblowercapabilities_d7b8.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DebrisBlowerService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDebrisBlowerCapabilities", string.format("QueryDebrisBlowerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDebrisBlowerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD7B8, querydebrisblowercapabilities_d7b8) + +querydebrisblowerconfiguration_d7b9 = Proto("querydebrisblowerconfiguration_d7b9", "QueryDebrisBlowerConfiguration 0xd7b9") +function querydebrisblowerconfiguration_d7b9.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DebrisBlowerService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDebrisBlowerConfiguration", string.format("QueryDebrisBlowerConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDebrisBlowerConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD7B9, querydebrisblowerconfiguration_d7b9) + +setdebrisblowerconfiguration_d7ba = Proto("setdebrisblowerconfiguration_d7ba", "SetDebrisBlowerConfiguration 0xd7ba") +function setdebrisblowerconfiguration_d7ba.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DebrisBlowerService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetDebrisBlowerConfiguration", string.format("SetDebrisBlowerConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetDebrisBlowerConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DebrisBlowerConfigurationRec_tree = body_tree:add("DebrisBlowerConfigurationRec") + local body_DebrisBlowerConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_DebrisBlowerConfigurationRec_pv_count = 0 + body_DebrisBlowerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_DebrisBlowerConfigurationRec_pv, body_DebrisBlowerConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "OFF", [1] = "ON_SingleSpeed", [2] = "ON_Low", [3] = "ON_Medium", [4] = "ON_High"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DebrisBlowerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("OnOffStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DebrisBlowerConfigurationRec_pv_count = body_DebrisBlowerConfigurationRec_pv_count + 1 + if (bitAND(body_DebrisBlowerConfigurationRec_pv, body_DebrisBlowerConfigurationRec_pv_count) > 0) then + body_DebrisBlowerConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Azimuth: %.4f (scaled) -- (unsigned short integer) Desired azimuth angle of discharge, where a value of zero (0) represents the forward-direction of travel for the vehicle.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_DebrisBlowerConfigurationRec_pv_count = body_DebrisBlowerConfigurationRec_pv_count + 1 + if (bitAND(body_DebrisBlowerConfigurationRec_pv, body_DebrisBlowerConfigurationRec_pv_count) > 0) then + body_DebrisBlowerConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Elevation: %.4f (scaled) -- (unsigned short integer) Desired elevation angle of discharge, where a value of zero (0) represents the direction parallel to the ground.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (-1.570796326795))) + bufidx = bufidx + 2 + end + body_DebrisBlowerConfigurationRec_pv_count = body_DebrisBlowerConfigurationRec_pv_count + 1 +end +messagetable:add(0xD7BA, setdebrisblowerconfiguration_d7ba) + +reportdebrisblowercapabilities_d7bb = Proto("reportdebrisblowercapabilities_d7bb", "ReportDebrisBlowerCapabilities 0xd7bb") +function reportdebrisblowercapabilities_d7bb.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DebrisBlowerService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDebrisBlowerCapabilities", string.format("ReportDebrisBlowerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDebrisBlowerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DebrisBlowerCapabilitiesRec_tree = body_tree:add("DebrisBlowerCapabilitiesRec") + local body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf = buffer(bufidx, 1) + local body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_tree = body_DebrisBlowerCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SpeedCapabilities: 0x%X -- (unsigned byte) Bit field representing the underlying hardware capabilities. A value of one (1) means the speed is supported.", bitstr(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 8), body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint())) + body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = ON_SingleSpeed: %d", bitstr_part(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 8, 0, 0), bitVal(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 0, 0))) + body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = ON_Low: %d", bitstr_part(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 8, 1, 1), bitVal(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 1, 1))) + body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = ON_Medium: %d", bitstr_part(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 8, 2, 2), bitVal(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 2, 2))) + body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = ON_High: %d", bitstr_part(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 8, 3, 3), bitVal(body_DebrisBlowerCapabilitiesRec_SpeedCapabilities_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + body_DebrisBlowerCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumAzimuth: %.4f (scaled) -- (unsigned short integer) Minimum allowed azimuth angle of discharge, where a value of zero (0) represents the forward-direction of travel for the vehicle.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + body_DebrisBlowerCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumAzimuth: %.4f (scaled) -- (unsigned short integer) Maximum allowed azimuth angle of discharge, where a value of zero (0) represents the forward-direction of travel for the vehicle.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + body_DebrisBlowerCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinimumElevation: %.4f (scaled) -- (unsigned short integer) Minimum allowed elevation angle of discharge, where a value of zero (0) represents the direction parallel to the ground.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (-1.570796326795))) + bufidx = bufidx + 2 + body_DebrisBlowerCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumElevation: %.4f (scaled) -- (unsigned short integer) Maximum allowed elevation angle of discharge, where a value of zero (0) represents the direction parallel to the ground.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (-1.570796326795))) + bufidx = bufidx + 2 +end +messagetable:add(0xD7BB, reportdebrisblowercapabilities_d7bb) + +reportdebrisblowerconfiguration_d7bc = Proto("reportdebrisblowerconfiguration_d7bc", "ReportDebrisBlowerConfiguration 0xd7bc") +function reportdebrisblowerconfiguration_d7bc.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DebrisBlowerService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDebrisBlowerConfiguration", string.format("ReportDebrisBlowerConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDebrisBlowerConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DebrisBlowerConfigurationRec_tree = body_tree:add("DebrisBlowerConfigurationRec") + local body_DebrisBlowerConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_DebrisBlowerConfigurationRec_pv_count = 0 + body_DebrisBlowerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_DebrisBlowerConfigurationRec_pv, body_DebrisBlowerConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "OFF", [1] = "ON_SingleSpeed", [2] = "ON_Low", [3] = "ON_Medium", [4] = "ON_High"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DebrisBlowerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("OnOffStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_DebrisBlowerConfigurationRec_pv_count = body_DebrisBlowerConfigurationRec_pv_count + 1 + if (bitAND(body_DebrisBlowerConfigurationRec_pv, body_DebrisBlowerConfigurationRec_pv_count) > 0) then + body_DebrisBlowerConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Azimuth: %.4f (scaled) -- (unsigned short integer) Desired azimuth angle of discharge, where a value of zero (0) represents the forward-direction of travel for the vehicle.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_DebrisBlowerConfigurationRec_pv_count = body_DebrisBlowerConfigurationRec_pv_count + 1 + if (bitAND(body_DebrisBlowerConfigurationRec_pv, body_DebrisBlowerConfigurationRec_pv_count) > 0) then + body_DebrisBlowerConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Elevation: %.4f (scaled) -- (unsigned short integer) Desired elevation angle of discharge, where a value of zero (0) represents the direction parallel to the ground.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (-1.570796326795))) + bufidx = bufidx + 2 + end + body_DebrisBlowerConfigurationRec_pv_count = body_DebrisBlowerConfigurationRec_pv_count + 1 +end +messagetable:add(0xD7BC, reportdebrisblowerconfiguration_d7bc) + +querydigitalaudiosensorcapabilitiesext_daaa = Proto("querydigitalaudiosensorcapabilitiesext_daaa", "QueryDigitalAudioSensorCapabilitiesExt 0xdaaa") +function querydigitalaudiosensorcapabilitiesext_daaa.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DigitalAudioSensorExt_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalAudioSensorCapabilitiesExt", string.format("QueryDigitalAudioSensorCapabilitiesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalAudioSensorCapabilitiesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryDigitalAudioSensorRecExt_tree = body_tree:add("QueryDigitalAudioSensorRecExt") + body_QueryDigitalAudioSensorRecExt_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) Zero (0) may be used to request all sensors supported by the service. Otherwise, only the data for the specified sensor is returned.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0xDAAA, querydigitalaudiosensorcapabilitiesext_daaa) + +reportdigitalaudiosensorcapabilitiesext_daab = Proto("reportdigitalaudiosensorcapabilitiesext_daab", "ReportDigitalAudioSensorCapabilitiesExt 0xdaab") +function reportdigitalaudiosensorcapabilitiesext_daab.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/DigitalAudioSensorExt_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalAudioSensorCapabilitiesExt", string.format("ReportDigitalAudioSensorCapabilitiesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalAudioSensorCapabilitiesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalAudioSensorCapabilitiesExtList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalAudioSensorCapabilitiesExtList ") + body_DigitalAudioSensorCapabilitiesExtList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_DigitalAudioSensorCapabilitiesExtList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_DigitalAudioSensorCapabilitiesExtList_count do + local body_DigitalAudioSensorCapabilitiesExtList_DigitalAudioSensorCapabilitiesExtRec_tree = body_DigitalAudioSensorCapabilitiesExtList_tree:add(string.format("DigitalAudioSensorCapabilitiesExtRec_%d", body_counter - 1)) + body_DigitalAudioSensorCapabilitiesExtList_DigitalAudioSensorCapabilitiesExtRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) Zero (0) is not a valid sensor ID.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_DigitalAudioSensorCapabilitiesExtList_DigitalAudioSensorCapabilitiesExtRec_SensorName_tree = body_DigitalAudioSensorCapabilitiesExtList_DigitalAudioSensorCapabilitiesExtRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("SensorName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DigitalAudioSensorCapabilitiesExtList_DigitalAudioSensorCapabilitiesExtRec_SensorName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end +end +messagetable:add(0xDAAB, reportdigitalaudiosensorcapabilitiesext_daab) + +setcoordinateframe_eef0 = Proto("setcoordinateframe_eef0", "SetCoordinateFrame 0xeef0") +function setcoordinateframe_eef0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EndEffectorFrameOfReference_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetCoordinateFrame", string.format("SetCoordinateFrame, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetCoordinateFrame")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_CoordinateFrameSeq_tree = body_tree:add("CoordinateFrameSeq") + local body_CoordinateFrameSeq_pv = buffer(bufidx, 1):le_uint() + local body_CoordinateFrameSeq_pv_count = 0 + body_CoordinateFrameSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_CoordinateFrameSeq_CoordinateFrameRec_tree = body_CoordinateFrameSeq_tree:add("CoordinateFrameRec") + local body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_tree = body_CoordinateFrameSeq_CoordinateFrameRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X -- (unsigned integer) JAUS ID associated with this coordinate frame. For a frame associated with the local manipulator, the JAUS ID is simply the host of the service.", bitstr(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 32), body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint())) + body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_CoordinateFrameRec_tree:add(buffer(bufidx, 1), string.format("Link: %d -- (unsigned byte) Link associated with this coordinate frame. A value of zero refers to the base of the specified JAUS ID.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "FollowOFF", [1] = "FollowON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_CoordinateFrameSeq_CoordinateFrameRec_tree:add(buffer(bufidx, 1), string.format("FollowMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_CoordinateFrameSeq_pv, body_CoordinateFrameSeq_pv_count) > 0) then + local body_CoordinateFrameSeq_AdditionalOffsetRec_tree = body_CoordinateFrameSeq_tree:add("AdditionalOffsetRec") + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("PositionOffsetX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("PositionOffsetY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("PositionOffsetZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + body_CoordinateFrameSeq_pv_count = body_CoordinateFrameSeq_pv_count + 1 +end +messagetable:add(0xEEF0, setcoordinateframe_eef0) + +querycoordinateframe_eef1 = Proto("querycoordinateframe_eef1", "QueryCoordinateFrame 0xeef1") +function querycoordinateframe_eef1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EndEffectorFrameOfReference_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCoordinateFrame", string.format("QueryCoordinateFrame, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCoordinateFrame")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xEEF1, querycoordinateframe_eef1) + +reportcoordinateframe_eef2 = Proto("reportcoordinateframe_eef2", "ReportCoordinateFrame 0xeef2") +function reportcoordinateframe_eef2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EndEffectorFrameOfReference_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCoordinateFrame", string.format("ReportCoordinateFrame, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCoordinateFrame")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_CoordinateFrameSeq_tree = body_tree:add("CoordinateFrameSeq") + local body_CoordinateFrameSeq_pv = buffer(bufidx, 1):le_uint() + local body_CoordinateFrameSeq_pv_count = 0 + body_CoordinateFrameSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_CoordinateFrameSeq_CoordinateFrameRec_tree = body_CoordinateFrameSeq_tree:add("CoordinateFrameRec") + local body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_tree = body_CoordinateFrameSeq_CoordinateFrameRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X -- (unsigned integer) JAUS ID associated with this coordinate frame. For a frame associated with the local manipulator, the JAUS ID is simply the host of the service.", bitstr(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 32), body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint())) + body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_CoordinateFrameSeq_CoordinateFrameRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_CoordinateFrameRec_tree:add(buffer(bufidx, 1), string.format("Link: %d -- (unsigned byte) Link associated with this coordinate frame. A value of zero refers to the base of the specified JAUS ID.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "FollowOFF", [1] = "FollowON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_CoordinateFrameSeq_CoordinateFrameRec_tree:add(buffer(bufidx, 1), string.format("FollowMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_CoordinateFrameSeq_pv, body_CoordinateFrameSeq_pv_count) > 0) then + local body_CoordinateFrameSeq_AdditionalOffsetRec_tree = body_CoordinateFrameSeq_tree:add("AdditionalOffsetRec") + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("PositionOffsetX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("PositionOffsetY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("PositionOffsetZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_CoordinateFrameSeq_AdditionalOffsetRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + body_CoordinateFrameSeq_pv_count = body_CoordinateFrameSeq_pv_count + 1 +end +messagetable:add(0xEEF2, reportcoordinateframe_eef2) + +setcoordinateframeresponse_eef3 = Proto("setcoordinateframeresponse_eef3", "SetCoordinateFrameResponse 0xeef3") +function setcoordinateframeresponse_eef3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EndEffectorFrameOfReference_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetCoordinateFrameResponse", string.format("SetCoordinateFrameResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetCoordinateFrameResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetCoordinateFrameResponseRec_tree = body_tree:add("SetCoordinateFrameResponseRec") + local value_set = {[0] = "ACCEPTED", [1] = "FRAME_NOT_SUPPORTED", [2] = "FOLLOW_MODE_NOT_SUPPORTED", [3] = "SPECIFIED_JAUS_ID_IS_NOT_VALID", [4] = "SPECIFIED_JAUS_ID_DOES_NOT_EXIST", [5] = "SPECIFIED_LINK_DOES_NOT_EXIST"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetCoordinateFrameResponseRec_tree:add(buffer(bufidx, 1), string.format("SetResponse: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xEEF3, setcoordinateframeresponse_eef3) + +querydetectionstatus_dabd = Proto("querydetectionstatus_dabd", "QueryDetectionStatus 0xdabd") +function querydetectionstatus_dabd.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EngagementDetection_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDetectionStatus", string.format("QueryDetectionStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDetectionStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryDetectionStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryDetectionStatusList ") + body_QueryDetectionStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_QueryDetectionStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_QueryDetectionStatusList_count do + local body_QueryDetectionStatusList_QueryDetectionStatusRec_tree = body_QueryDetectionStatusList_tree:add(string.format("QueryDetectionStatusRec_%d", body_counter - 1)) + body_QueryDetectionStatusList_QueryDetectionStatusRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the sensor to be queried. A value of zero (0) implies all sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0xDABD, querydetectionstatus_dabd) + +reportdetectionstatus_dabf = Proto("reportdetectionstatus_dabf", "ReportDetectionStatus 0xdabf") +function reportdetectionstatus_dabf.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EngagementDetection_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDetectionStatus", string.format("ReportDetectionStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDetectionStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ReportDetectionStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ReportDetectionStatusList ") + body_ReportDetectionStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_ReportDetectionStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ReportDetectionStatusList_count do + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_tree = body_ReportDetectionStatusList_tree:add(string.format("ReportDetectionStatusSeq_%d", body_counter - 1)) + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_tree = body_ReportDetectionStatusList_ReportDetectionStatusSeq_tree:add("ReportDetectionStatusRec") + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_pv_count = 0 + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the sensor to be queried. A value of zero (0) is not permitted.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_pv, body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_pv_count) > 0) then + local value_set = {[0] = "SensorRelative", [1] = "VehicleRelative", [2] = "GlobalRelative"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_tree:add(buffer(bufidx, 1), string.format("CoordinateFrameEnum: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_pv_count = body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionStatusRec_pv_count + 1 + local bufidx_start_body_ReportDetectionStatusList_ReportDetectionStatusSeq = bufidx + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_tree = body_ReportDetectionStatusList_ReportDetectionStatusSeq_tree:add(buffer(bufidx_start_body_ReportDetectionStatusList_ReportDetectionStatusSeq, buffer:len() - bufidx_start_body_ReportDetectionStatusList_ReportDetectionStatusSeq), "ReportDetectionDataList ") + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportDetectionStatusList_ReportDetectionStatusSeq_counter=1,body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_count do + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_tree = body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_tree:add(string.format("ReportDetectionDataRec_%d", body_ReportDetectionStatusList_ReportDetectionStatusSeq_counter - 1)) + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count = 0 + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv, body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count) > 0) then + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_tree:add(buffer(bufidx, 4), string.format("Range: %.4f (scaled) -- (unsigned integer) distance to the detected source of the engagement", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count = body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count + 1 + if (bitAND(body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv, body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count) > 0) then + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_tree:add(buffer(bufidx, 4), string.format("Bearing: %.4f (scaled) -- (unsigned integer) bearing (rotation about the Z axis) to the detected source of the engagement", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count = body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count + 1 + if (bitAND(body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv, body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count) > 0) then + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_tree:add(buffer(bufidx, 4), string.format("Elevation: %.4f (scaled) -- (unsigned integer) elevation (rotation about the Y axis) to the detected source of the engagement", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count = body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count + 1 + if (bitAND(body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv, body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count) > 0) then + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_tree:add(buffer(bufidx, 1), string.format("Classification: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count = body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count + 1 + if (bitAND(body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv, body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count) > 0) then + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count = body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count + 1 + if (bitAND(body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv, body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count) > 0) then + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count = body_ReportDetectionStatusList_ReportDetectionStatusSeq_ReportDetectionDataList_ReportDetectionDataRec_pv_count + 1 + end + end +end +messagetable:add(0xDABF, reportdetectionstatus_dabf) + +requesthandoff_ff41 = Proto("requesthandoff_ff41", "RequestHandoff 0xff41") +function requesthandoff_ff41.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedAccessControl_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestHandoff", string.format("RequestHandoff, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestHandoff")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RequestHandoffRec_tree = body_tree:add("RequestHandoffRec") + body_RequestHandoffRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Client-generated ID for tracking handoff requests.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestHandoffRec_tree:add(buffer(bufidx, 1), string.format("AuthorityCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RequestHandoffRec_Explanation_tree = body_RequestHandoffRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Explanation[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RequestHandoffRec_Explanation_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() +end +messagetable:add(0xFF41, requesthandoff_ff41) + +queryhandoffdecisiontimeout_ff42 = Proto("queryhandoffdecisiontimeout_ff42", "QueryHandoffDecisionTimeout 0xff42") +function queryhandoffdecisiontimeout_ff42.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedAccessControl_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHandoffDecisionTimeout", string.format("QueryHandoffDecisionTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHandoffDecisionTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF42, queryhandoffdecisiontimeout_ff42) + +queryhandoffrequesttimeout_ff43 = Proto("queryhandoffrequesttimeout_ff43", "QueryHandoffRequestTimeout 0xff43") +function queryhandoffrequesttimeout_ff43.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedAccessControl_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHandoffRequestTimeout", string.format("QueryHandoffRequestTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHandoffRequestTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF43, queryhandoffrequesttimeout_ff43) + +removehandoffrequest_ff44 = Proto("removehandoffrequest_ff44", "RemoveHandoffRequest 0xff44") +function removehandoffrequest_ff44.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedAccessControl_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RemoveHandoffRequest", string.format("RemoveHandoffRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RemoveHandoffRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RemoveHandoffRec_tree = body_tree:add("RemoveHandoffRec") + body_RemoveHandoffRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Client-generated ID for tracking handoff requests. This should match an ID from a previous RequestHandoff message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xFF44, removehandoffrequest_ff44) + +confirmhandoffrequest_ff45 = Proto("confirmhandoffrequest_ff45", "ConfirmHandoffRequest 0xff45") +function confirmhandoffrequest_ff45.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedAccessControl_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmHandoffRequest", string.format("ConfirmHandoffRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmHandoffRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmHandoffRequestRec_tree = body_tree:add("ConfirmHandoffRequestRec") + body_ConfirmHandoffRequestRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID from the RequestHandoff message that established the handoff request.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "GRANTED", [1] = "NOT_AVAILABLE", [2] = "HANDOFF_REQUEST_TIMEOUT", [3] = "DENIED", [4] = "QUEUED", [5] = "DEFERRED", [6] = "INSUFFICIENT_AUTHORITY", [7] = "HANDOFF_DECISION_TIMEOUT", [8] = "SERVICE_NOT_CONTROLLED", [9] = "REMOVED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmHandoffRequestRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF45, confirmhandoffrequest_ff45) + +reporthandoffdecisiontimeout_ff46 = Proto("reporthandoffdecisiontimeout_ff46", "ReportHandoffDecisionTimeout 0xff46") +function reporthandoffdecisiontimeout_ff46.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedAccessControl_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportHandoffDecisionTimeout", string.format("ReportHandoffDecisionTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportHandoffDecisionTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportHandoffDecisionTimeoutRec_tree = body_tree:add("ReportHandoffDecisionTimeoutRec") + body_ReportHandoffDecisionTimeoutRec_tree:add(buffer(bufidx, 1), string.format("HandoffDecisionTimeout: %d -- (unsigned byte) The handoff decision timeout is the amount of time that must pass between this service requesting a handoff from the current controlling client and this service receiving a ConfirmReleaseControl message in response before that handoff request is considered failed due to a timeout.. A value of zero indicates this feature is disabled.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xFF46, reporthandoffdecisiontimeout_ff46) + +reporthandoffrequesttimeout_ff47 = Proto("reporthandoffrequesttimeout_ff47", "ReportHandoffRequestTimeout 0xff47") +function reporthandoffrequesttimeout_ff47.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedAccessControl_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportHandoffRequestTimeout", string.format("ReportHandoffRequestTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportHandoffRequestTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportHandoffRequestTimeoutRec_tree = body_tree:add("ReportHandoffRequestTimeoutRec") + body_ReportHandoffRequestTimeoutRec_tree:add(buffer(bufidx, 1), string.format("HandoffRequestTimeout: %d -- (unsigned byte) The handoff request timeout is the maximum amount of time between a client reasserting its desire for a handoff before that request for a handoff is considered timed out. A value of zero indicates this feature is disabled.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xFF47, reporthandoffrequesttimeout_ff47) + +setenhancedglobalwaypointinformation_f228 = Proto("setenhancedglobalwaypointinformation_f228", "SetEnhancedGlobalWaypointInformation 0xf228") +function setenhancedglobalwaypointinformation_f228.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetEnhancedGlobalWaypointInformation", string.format("SetEnhancedGlobalWaypointInformation, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetEnhancedGlobalWaypointInformation")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointInformationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointInformationList ") + body_WaypointInformationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointInformationList_count do + local body_WaypointInformationList_WaypointInformationRec_tree = body_WaypointInformationList_tree:add(string.format("WaypointInformationRec_%d", body_counter - 1)) + local body_WaypointInformationList_WaypointInformationRec_pv = buffer(bufidx, 1):le_uint() + local body_WaypointInformationList_WaypointInformationRec_pv_count = 0 + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Corresponds to the list ID of the global", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_WaypointInformationList_WaypointInformationRec_pv, body_WaypointInformationList_WaypointInformationRec_pv_count) > 0) then + local value_set = {[0] = "Forward", [1] = "Reverse"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("DirectionOfTravel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_WaypointInformationList_WaypointInformationRec_pv_count = body_WaypointInformationList_WaypointInformationRec_pv_count + 1 + if (bitAND(body_WaypointInformationList_WaypointInformationRec_pv, body_WaypointInformationList_WaypointInformationRec_pv_count) > 0) then + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 2), string.format("WaitTime: %.4f (scaled) -- (unsigned short integer) The number of seconds to pause after achieving this waypoint before resuming a waypoint plan. A zero (0) value corresponds to an indefinite wait, pausing until another execute command arrives. If this field is absent, there is no wait.", buffer(bufidx, 2):le_uint() * 0.054932478828 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_WaypointInformationList_WaypointInformationRec_pv_count = body_WaypointInformationList_WaypointInformationRec_pv_count + 1 + end +end +messagetable:add(0xF228, setenhancedglobalwaypointinformation_f228) + +setenhancedglobalwaypointinformationext_f22f = Proto("setenhancedglobalwaypointinformationext_f22f", "SetEnhancedGlobalWaypointInformationExt 0xf22f") +function setenhancedglobalwaypointinformationext_f22f.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetEnhancedGlobalWaypointInformationExt", string.format("SetEnhancedGlobalWaypointInformationExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetEnhancedGlobalWaypointInformationExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointInformationListExt_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointInformationListExt ") + body_WaypointInformationListExt_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationListExt_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointInformationListExt_count do + local body_WaypointInformationListExt_WaypointInformationSeqExt_tree = body_WaypointInformationListExt_tree:add(string.format("WaypointInformationSeqExt_%d", body_counter - 1)) + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_tree:add("WaypointInformationRecExt") + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv = buffer(bufidx, 1):le_uint() + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = 0 + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Corresponds to the list ID of the global", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + local value_set = {[0] = "Forward", [1] = "Reverse"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("DirectionOfTravel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 2), string.format("WaitTime: %.4f (scaled) -- (unsigned short integer) The number of seconds to pause after achieving this waypoint before resuming a waypoint plan. A zero (0) value corresponds to an indefinite wait, pausing until another execute command arrives. If this field is absent, there is no wait.", buffer(bufidx, 2):le_uint() * 0.054932478828 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("PlannerID: %d -- (unsigned byte) A numeric ID associated with the requested planner or planner algorithm for this waypoint", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + local bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt = bufidx + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_tree:add(buffer(bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt, buffer:len() - bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt), "WaypointPolicyList ") + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_WaypointInformationListExt_WaypointInformationSeqExt_counter=1,body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_count do + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_WaypointPolicyRec_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree:add(string.format("WaypointPolicyRec_%d", body_WaypointInformationListExt_WaypointInformationSeqExt_counter - 1)) + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_WaypointPolicyRec_tree:add(buffer(bufidx, 1), string.format("PolicyID: %d -- (unsigned byte) ID of the policy to be applied for this waypoint, as specified by the PolicyRegistryService", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0xF22F, setenhancedglobalwaypointinformationext_f22f) + +queryglobalwaypointstatus_f229 = Proto("queryglobalwaypointstatus_f229", "QueryGlobalWaypointStatus 0xf229") +function queryglobalwaypointstatus_f229.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalWaypointStatus", string.format("QueryGlobalWaypointStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalWaypointStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF229, queryglobalwaypointstatus_f229) + +queryenhancedglobalwaypointinformation_f22a = Proto("queryenhancedglobalwaypointinformation_f22a", "QueryEnhancedGlobalWaypointInformation 0xf22a") +function queryenhancedglobalwaypointinformation_f22a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEnhancedGlobalWaypointInformation", string.format("QueryEnhancedGlobalWaypointInformation, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEnhancedGlobalWaypointInformation")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryEnhancedGlobalWaypointInformationRec_tree = body_tree:add("QueryEnhancedGlobalWaypointInformationRec") + body_QueryEnhancedGlobalWaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Set Enhanced Global Waypoint Information Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF22A, queryenhancedglobalwaypointinformation_f22a) + +queryenhancedglobalwaypointinformationext_f230 = Proto("queryenhancedglobalwaypointinformationext_f230", "QueryEnhancedGlobalWaypointInformationExt 0xf230") +function queryenhancedglobalwaypointinformationext_f230.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEnhancedGlobalWaypointInformationExt", string.format("QueryEnhancedGlobalWaypointInformationExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEnhancedGlobalWaypointInformationExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryEnhancedGlobalWaypointInformationRecExt_tree = body_tree:add("QueryEnhancedGlobalWaypointInformationRecExt") + body_QueryEnhancedGlobalWaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Set Enhanced Global Waypoint Information Ext Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF230, queryenhancedglobalwaypointinformationext_f230) + +queryenhancedglobalwaypointcapabilities_f22d = Proto("queryenhancedglobalwaypointcapabilities_f22d", "QueryEnhancedGlobalWaypointCapabilities 0xf22d") +function queryenhancedglobalwaypointcapabilities_f22d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEnhancedGlobalWaypointCapabilities", string.format("QueryEnhancedGlobalWaypointCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEnhancedGlobalWaypointCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF22D, queryenhancedglobalwaypointcapabilities_f22d) + +reportglobalwaypointstatus_f22b = Proto("reportglobalwaypointstatus_f22b", "ReportGlobalWaypointStatus 0xf22b") +function reportglobalwaypointstatus_f22b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalWaypointStatus", string.format("ReportGlobalWaypointStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalWaypointStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportWaypointStatusRec_tree = body_tree:add("ReportWaypointStatusRec") + body_ReportWaypointStatusRec_tree:add(buffer(bufidx, 2), string.format("SuspendedTime: %d -- (unsigned short integer) Amount of time the vehicle has been suspended at the current waypoint", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local value_set = {[0] = "NoPlan", [1] = "PlanLoaded", [2] = "Executing", [3] = "Paused", [4] = "TimedWait", [5] = "Complete", [6] = "Fault", [7] = "NonSpecificFault", [8] = "VehicleUnresponsive", [9] = "OutsideCorridor", [10] = "InvalidSensorData", [11] = "NoPlanFault", [12] = "InvalidPlan", [13] = "NoPathAvailable"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportWaypointStatusRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xF22B, reportglobalwaypointstatus_f22b) + +reportenhancedglobalwaypointinformation_f22c = Proto("reportenhancedglobalwaypointinformation_f22c", "ReportEnhancedGlobalWaypointInformation 0xf22c") +function reportenhancedglobalwaypointinformation_f22c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEnhancedGlobalWaypointInformation", string.format("ReportEnhancedGlobalWaypointInformation, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEnhancedGlobalWaypointInformation")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointInformationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointInformationList ") + body_WaypointInformationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointInformationList_count do + local body_WaypointInformationList_WaypointInformationRec_tree = body_WaypointInformationList_tree:add(string.format("WaypointInformationRec_%d", body_counter - 1)) + local body_WaypointInformationList_WaypointInformationRec_pv = buffer(bufidx, 1):le_uint() + local body_WaypointInformationList_WaypointInformationRec_pv_count = 0 + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Corresponds to the list ID of the global", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_WaypointInformationList_WaypointInformationRec_pv, body_WaypointInformationList_WaypointInformationRec_pv_count) > 0) then + local value_set = {[0] = "Forward", [1] = "Reverse"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("DirectionOfTravel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_WaypointInformationList_WaypointInformationRec_pv_count = body_WaypointInformationList_WaypointInformationRec_pv_count + 1 + if (bitAND(body_WaypointInformationList_WaypointInformationRec_pv, body_WaypointInformationList_WaypointInformationRec_pv_count) > 0) then + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 2), string.format("WaitTime: %.4f (scaled) -- (unsigned short integer) The number of seconds to pause after achieving this waypoint before resuming a waypoint plan. A zero (0) value corresponds to an indefinite wait, pausing until another execute command arrives. If this field is absent, there is no wait.", buffer(bufidx, 2):le_uint() * 0.054932478828 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_WaypointInformationList_WaypointInformationRec_pv_count = body_WaypointInformationList_WaypointInformationRec_pv_count + 1 + end +end +messagetable:add(0xF22C, reportenhancedglobalwaypointinformation_f22c) + +reportenhancedglobalwaypointinformationext_f231 = Proto("reportenhancedglobalwaypointinformationext_f231", "ReportEnhancedGlobalWaypointInformationExt 0xf231") +function reportenhancedglobalwaypointinformationext_f231.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEnhancedGlobalWaypointInformationExt", string.format("ReportEnhancedGlobalWaypointInformationExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEnhancedGlobalWaypointInformationExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointInformationListExt_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointInformationListExt ") + body_WaypointInformationListExt_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationListExt_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointInformationListExt_count do + local body_WaypointInformationListExt_WaypointInformationSeqExt_tree = body_WaypointInformationListExt_tree:add(string.format("WaypointInformationSeqExt_%d", body_counter - 1)) + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_tree:add("WaypointInformationRecExt") + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv = buffer(bufidx, 1):le_uint() + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = 0 + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Corresponds to the list ID of the global", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + local value_set = {[0] = "Forward", [1] = "Reverse"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("DirectionOfTravel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 2), string.format("WaitTime: %.4f (scaled) -- (unsigned short integer) The number of seconds to pause after achieving this waypoint before resuming a waypoint plan. A zero (0) value corresponds to an indefinite wait, pausing until another execute command arrives. If this field is absent, there is no wait.", buffer(bufidx, 2):le_uint() * 0.054932478828 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("PlannerID: %d -- (unsigned byte) A numeric ID associated with the requested planner or planner algorithm for this waypoint", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + local bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt = bufidx + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_tree:add(buffer(bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt, buffer:len() - bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt), "WaypointPolicyList ") + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_WaypointInformationListExt_WaypointInformationSeqExt_counter=1,body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_count do + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_WaypointPolicyRec_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree:add(string.format("WaypointPolicyRec_%d", body_WaypointInformationListExt_WaypointInformationSeqExt_counter - 1)) + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_WaypointPolicyRec_tree:add(buffer(bufidx, 1), string.format("PolicyID: %d -- (unsigned byte) ID of the policy to be applied for this waypoint, as specified by the PolicyRegistryService", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0xF231, reportenhancedglobalwaypointinformationext_f231) + +reportenhancedglobalwaypointcapabilities_f22e = Proto("reportenhancedglobalwaypointcapabilities_f22e", "ReportEnhancedGlobalWaypointCapabilities 0xf22e") +function reportenhancedglobalwaypointcapabilities_f22e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedGlobalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEnhancedGlobalWaypointCapabilities", string.format("ReportEnhancedGlobalWaypointCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEnhancedGlobalWaypointCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointCapabilitiesList ") + body_WaypointCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointCapabilitiesList_count do + local body_WaypointCapabilitiesList_WaypointCapabilitiesRec_tree = body_WaypointCapabilitiesList_tree:add(string.format("WaypointCapabilitiesRec_%d", body_counter - 1)) + body_WaypointCapabilitiesList_WaypointCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("PlannerID: %d -- (unsigned byte) A numeric ID associated with this particular planner or planner algorithm", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_WaypointCapabilitiesList_WaypointCapabilitiesRec_PlannerName_tree = body_WaypointCapabilitiesList_WaypointCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("PlannerName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_WaypointCapabilitiesList_WaypointCapabilitiesRec_PlannerName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 20", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_WaypointCapabilitiesList_WaypointCapabilitiesRec_PlannerDescription_tree = body_WaypointCapabilitiesList_WaypointCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("PlannerDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_WaypointCapabilitiesList_WaypointCapabilitiesRec_PlannerDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end +end +messagetable:add(0xF22E, reportenhancedglobalwaypointcapabilities_f22e) + +setenhancedlocalwaypointinformation_f220 = Proto("setenhancedlocalwaypointinformation_f220", "SetEnhancedLocalWaypointInformation 0xf220") +function setenhancedlocalwaypointinformation_f220.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetEnhancedLocalWaypointInformation", string.format("SetEnhancedLocalWaypointInformation, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetEnhancedLocalWaypointInformation")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointInformationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointInformationList ") + body_WaypointInformationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointInformationList_count do + local body_WaypointInformationList_WaypointInformationRec_tree = body_WaypointInformationList_tree:add(string.format("WaypointInformationRec_%d", body_counter - 1)) + local body_WaypointInformationList_WaypointInformationRec_pv = buffer(bufidx, 1):le_uint() + local body_WaypointInformationList_WaypointInformationRec_pv_count = 0 + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Corresponds to the list ID of the local", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_WaypointInformationList_WaypointInformationRec_pv, body_WaypointInformationList_WaypointInformationRec_pv_count) > 0) then + local value_set = {[0] = "Forward", [1] = "Reverse"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("DirectionOfTravel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_WaypointInformationList_WaypointInformationRec_pv_count = body_WaypointInformationList_WaypointInformationRec_pv_count + 1 + if (bitAND(body_WaypointInformationList_WaypointInformationRec_pv, body_WaypointInformationList_WaypointInformationRec_pv_count) > 0) then + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 2), string.format("WaitTime: %.4f (scaled) -- (unsigned short integer) The number of seconds to pause after achieving this waypoint before resuming a waypoint plan. A zero (0) value corresponds to an indefinite wait, pausing until another execute command arrives. If this field is absent, there is no wait.", buffer(bufidx, 2):le_uint() * 0.054932478828 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_WaypointInformationList_WaypointInformationRec_pv_count = body_WaypointInformationList_WaypointInformationRec_pv_count + 1 + end +end +messagetable:add(0xF220, setenhancedlocalwaypointinformation_f220) + +setenhancedlocalwaypointinformationext_f225 = Proto("setenhancedlocalwaypointinformationext_f225", "SetEnhancedLocalWaypointInformationExt 0xf225") +function setenhancedlocalwaypointinformationext_f225.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetEnhancedLocalWaypointInformationExt", string.format("SetEnhancedLocalWaypointInformationExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetEnhancedLocalWaypointInformationExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointInformationListExt_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointInformationListExt ") + body_WaypointInformationListExt_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationListExt_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointInformationListExt_count do + local body_WaypointInformationListExt_WaypointInformationSeqExt_tree = body_WaypointInformationListExt_tree:add(string.format("WaypointInformationSeqExt_%d", body_counter - 1)) + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_tree:add("WaypointInformationRecExt") + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv = buffer(bufidx, 1):le_uint() + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = 0 + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Corresponds to the list ID of the local", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + local value_set = {[0] = "Forward", [1] = "Reverse"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("DirectionOfTravel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 2), string.format("WaitTime: %.4f (scaled) -- (unsigned short integer) The number of seconds to pause after achieving this waypoint before resuming a waypoint plan. A zero (0) value corresponds to an indefinite wait, pausing until another execute command arrives. If this field is absent, there is no wait.", buffer(bufidx, 2):le_uint() * 0.054932478828 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("PlannerID: %d -- (unsigned byte) A numeric ID associated with the requested planner or planner algorithm for this waypoint", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + local bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt = bufidx + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_tree:add(buffer(bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt, buffer:len() - bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt), "WaypointPolicyList ") + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_WaypointInformationListExt_WaypointInformationSeqExt_counter=1,body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_count do + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_WaypointPolicyRec_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree:add(string.format("WaypointPolicyRec_%d", body_WaypointInformationListExt_WaypointInformationSeqExt_counter - 1)) + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_WaypointPolicyRec_tree:add(buffer(bufidx, 1), string.format("PolicyID: %d -- (unsigned byte) ID of the policy to be applied for this waypoint, as specified by the PolicyRegistryService", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0xF225, setenhancedlocalwaypointinformationext_f225) + +querylocalwaypointstatus_f221 = Proto("querylocalwaypointstatus_f221", "QueryLocalWaypointStatus 0xf221") +function querylocalwaypointstatus_f221.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalWaypointStatus", string.format("QueryLocalWaypointStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalWaypointStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF221, querylocalwaypointstatus_f221) + +queryenhancedlocalwaypointinformation_f222 = Proto("queryenhancedlocalwaypointinformation_f222", "QueryEnhancedLocalWaypointInformation 0xf222") +function queryenhancedlocalwaypointinformation_f222.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEnhancedLocalWaypointInformation", string.format("QueryEnhancedLocalWaypointInformation, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEnhancedLocalWaypointInformation")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryEnhancedLocalWaypointInformationRec_tree = body_tree:add("QueryEnhancedLocalWaypointInformationRec") + body_QueryEnhancedLocalWaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Set Enhanced Local Waypoint Information Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF222, queryenhancedlocalwaypointinformation_f222) + +queryenhancedlocalwaypointinformationext_f226 = Proto("queryenhancedlocalwaypointinformationext_f226", "QueryEnhancedLocalWaypointInformationExt 0xf226") +function queryenhancedlocalwaypointinformationext_f226.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEnhancedLocalWaypointInformationExt", string.format("QueryEnhancedLocalWaypointInformationExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEnhancedLocalWaypointInformationExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryEnhancedLocalWaypointInformationExtRec_tree = body_tree:add("QueryEnhancedLocalWaypointInformationExtRec") + body_QueryEnhancedLocalWaypointInformationExtRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Set Enhanced Local Waypoint Information Ext Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF226, queryenhancedlocalwaypointinformationext_f226) + +queryenhancedlocalwaypointcapabilities_f227 = Proto("queryenhancedlocalwaypointcapabilities_f227", "QueryEnhancedLocalWaypointCapabilities 0xf227") +function queryenhancedlocalwaypointcapabilities_f227.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEnhancedLocalWaypointCapabilities", string.format("QueryEnhancedLocalWaypointCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEnhancedLocalWaypointCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF227, queryenhancedlocalwaypointcapabilities_f227) + +reportlocalwaypointstatus_f223 = Proto("reportlocalwaypointstatus_f223", "ReportLocalWaypointStatus 0xf223") +function reportlocalwaypointstatus_f223.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalWaypointStatus", string.format("ReportLocalWaypointStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalWaypointStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportWaypointStatusRec_tree = body_tree:add("ReportWaypointStatusRec") + body_ReportWaypointStatusRec_tree:add(buffer(bufidx, 2), string.format("SuspendedTime: %d -- (unsigned short integer) Amount of time the vehicle has been suspended at the current waypoint", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local value_set = {[0] = "NoPlan", [1] = "PlanLoaded", [2] = "Executing", [3] = "Paused", [4] = "TimedWait", [5] = "Complete", [6] = "Fault", [7] = "NonSpecificFault", [8] = "VehicleUnresponsive", [9] = "OutsideCorridor", [10] = "InvalidSensorData", [11] = "NoPlanFault", [12] = "InvalidPlan", [13] = "NoPathAvailable"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportWaypointStatusRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xF223, reportlocalwaypointstatus_f223) + +reportenhancedlocalwaypointinformation_f224 = Proto("reportenhancedlocalwaypointinformation_f224", "ReportEnhancedLocalWaypointInformation 0xf224") +function reportenhancedlocalwaypointinformation_f224.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEnhancedLocalWaypointInformation", string.format("ReportEnhancedLocalWaypointInformation, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEnhancedLocalWaypointInformation")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointInformationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointInformationList ") + body_WaypointInformationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointInformationList_count do + local body_WaypointInformationList_WaypointInformationRec_tree = body_WaypointInformationList_tree:add(string.format("WaypointInformationRec_%d", body_counter - 1)) + local body_WaypointInformationList_WaypointInformationRec_pv = buffer(bufidx, 1):le_uint() + local body_WaypointInformationList_WaypointInformationRec_pv_count = 0 + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Corresponds to the list ID of the local", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_WaypointInformationList_WaypointInformationRec_pv, body_WaypointInformationList_WaypointInformationRec_pv_count) > 0) then + local value_set = {[0] = "Forward", [1] = "Reverse"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 1), string.format("DirectionOfTravel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_WaypointInformationList_WaypointInformationRec_pv_count = body_WaypointInformationList_WaypointInformationRec_pv_count + 1 + if (bitAND(body_WaypointInformationList_WaypointInformationRec_pv, body_WaypointInformationList_WaypointInformationRec_pv_count) > 0) then + body_WaypointInformationList_WaypointInformationRec_tree:add(buffer(bufidx, 2), string.format("WaitTime: %.4f (scaled) -- (unsigned short integer) The number of seconds to pause after achieving this waypoint before resuming a waypoint plan. A zero (0) value corresponds to an indefinite wait, pausing until another execute command arrives. If this field is absent, there is no wait.", buffer(bufidx, 2):le_uint() * 0.054932478828 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_WaypointInformationList_WaypointInformationRec_pv_count = body_WaypointInformationList_WaypointInformationRec_pv_count + 1 + end +end +messagetable:add(0xF224, reportenhancedlocalwaypointinformation_f224) + +reportenhancedlocalwaypointinformationext_f233 = Proto("reportenhancedlocalwaypointinformationext_f233", "ReportEnhancedLocalWaypointInformationExt 0xf233") +function reportenhancedlocalwaypointinformationext_f233.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEnhancedLocalWaypointInformationExt", string.format("ReportEnhancedLocalWaypointInformationExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEnhancedLocalWaypointInformationExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointInformationListExt_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointInformationListExt ") + body_WaypointInformationListExt_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationListExt_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointInformationListExt_count do + local body_WaypointInformationListExt_WaypointInformationSeqExt_tree = body_WaypointInformationListExt_tree:add(string.format("WaypointInformationSeqExt_%d", body_counter - 1)) + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_tree:add("WaypointInformationRecExt") + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv = buffer(bufidx, 1):le_uint() + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = 0 + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Corresponds to the list ID of the local", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + local value_set = {[0] = "Forward", [1] = "Reverse"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("DirectionOfTravel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 2), string.format("WaitTime: %.4f (scaled) -- (unsigned short integer) The number of seconds to pause after achieving this waypoint before resuming a waypoint plan. A zero (0) value corresponds to an indefinite wait, pausing until another execute command arrives. If this field is absent, there is no wait.", buffer(bufidx, 2):le_uint() * 0.054932478828 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + if (bitAND(body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv, body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count) > 0) then + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_tree:add(buffer(bufidx, 1), string.format("PlannerID: %d -- (unsigned byte) A numeric ID associated with the requested planner or planner algorithm for this waypoint", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointInformationRecExt_pv_count + 1 + local bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt = bufidx + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_tree:add(buffer(bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt, buffer:len() - bufidx_start_body_WaypointInformationListExt_WaypointInformationSeqExt), "WaypointPolicyList ") + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_WaypointInformationListExt_WaypointInformationSeqExt_counter=1,body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_count do + local body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_WaypointPolicyRec_tree = body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_tree:add(string.format("WaypointPolicyRec_%d", body_WaypointInformationListExt_WaypointInformationSeqExt_counter - 1)) + body_WaypointInformationListExt_WaypointInformationSeqExt_WaypointPolicyList_WaypointPolicyRec_tree:add(buffer(bufidx, 1), string.format("PolicyID: %d -- (unsigned byte) ID of the policy to be applied for this waypoint, as specified by the PolicyRegistryService", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0xF233, reportenhancedlocalwaypointinformationext_f233) + +reportenhancedlocalwaypointcapabilities_f232 = Proto("reportenhancedlocalwaypointcapabilities_f232", "ReportEnhancedLocalWaypointCapabilities 0xf232") +function reportenhancedlocalwaypointcapabilities_f232.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/EnhancedLocalWaypointListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEnhancedLocalWaypointCapabilities", string.format("ReportEnhancedLocalWaypointCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEnhancedLocalWaypointCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_WaypointCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "WaypointCapabilitiesList ") + body_WaypointCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_WaypointCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_WaypointCapabilitiesList_count do + local body_WaypointCapabilitiesList_WaypointCapabilitiesRec_tree = body_WaypointCapabilitiesList_tree:add(string.format("WaypointCapabilitiesRec_%d", body_counter - 1)) + body_WaypointCapabilitiesList_WaypointCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("PlannerID: %d -- (unsigned byte) A numeric ID associated with this particular planner or planner algorithm", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_WaypointCapabilitiesList_WaypointCapabilitiesRec_PlannerName_tree = body_WaypointCapabilitiesList_WaypointCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("PlannerName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_WaypointCapabilitiesList_WaypointCapabilitiesRec_PlannerName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 20", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_WaypointCapabilitiesList_WaypointCapabilitiesRec_PlannerDescription_tree = body_WaypointCapabilitiesList_WaypointCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("PlannerDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_WaypointCapabilitiesList_WaypointCapabilitiesRec_PlannerDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end +end +messagetable:add(0xF232, reportenhancedlocalwaypointcapabilities_f232) + +queryjointoperationalparameters_f290 = Proto("queryjointoperationalparameters_f290", "QueryJointOperationalParameters 0xf290") +function queryjointoperationalparameters_f290.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ExtendedPrimitiveManipulator_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryJointOperationalParameters", string.format("QueryJointOperationalParameters, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryJointOperationalParameters")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryJointOperationalParametersRec_tree = body_tree:add("QueryJointOperationalParametersRec") + body_QueryJointOperationalParametersRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Operational Parameters for bitwise interpretation of the PV.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF290, queryjointoperationalparameters_f290) + +queryhostmanipulator_f292 = Proto("queryhostmanipulator_f292", "QueryHostManipulator 0xf292") +function queryhostmanipulator_f292.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ExtendedPrimitiveManipulator_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHostManipulator", string.format("QueryHostManipulator, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHostManipulator")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF292, queryhostmanipulator_f292) + +reportoperationalparameters_f291 = Proto("reportoperationalparameters_f291", "ReportOperationalParameters 0xf291") +function reportoperationalparameters_f291.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ExtendedPrimitiveManipulator_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportOperationalParameters", string.format("ReportOperationalParameters, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportOperationalParameters")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointOperationalParametersList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointOperationalParametersList ") + body_JointOperationalParametersList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointOperationalParametersList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointOperationalParametersList_count do + local body_JointOperationalParametersList_JointOperationalParametersRec_tree = body_JointOperationalParametersList_tree:add(string.format("JointOperationalParametersRec_%d", body_counter - 1)) + local body_JointOperationalParametersList_JointOperationalParametersRec_pv = buffer(bufidx, 1):le_uint() + local body_JointOperationalParametersList_JointOperationalParametersRec_pv_count = 0 + body_JointOperationalParametersList_JointOperationalParametersRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_JointOperationalParametersList_JointOperationalParametersRec_tree:add(buffer(bufidx, 1), string.format("JointNumber: %d -- (unsigned byte) 1 = first (most proximal) manipulator joint; largest joint number is most distal.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_JointOperationalParametersList_JointOperationalParametersRec_pv, body_JointOperationalParametersList_JointOperationalParametersRec_pv_count) > 0) then + body_JointOperationalParametersList_JointOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("JointTemperature: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-50.000000000000))) + bufidx = bufidx + 2 + end + body_JointOperationalParametersList_JointOperationalParametersRec_pv_count = body_JointOperationalParametersList_JointOperationalParametersRec_pv_count + 1 + if (bitAND(body_JointOperationalParametersList_JointOperationalParametersRec_pv, body_JointOperationalParametersList_JointOperationalParametersRec_pv_count) > 0) then + body_JointOperationalParametersList_JointOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("BusVoltage: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.002288853285 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_JointOperationalParametersList_JointOperationalParametersRec_pv_count = body_JointOperationalParametersList_JointOperationalParametersRec_pv_count + 1 + if (bitAND(body_JointOperationalParametersList_JointOperationalParametersRec_pv, body_JointOperationalParametersList_JointOperationalParametersRec_pv_count) > 0) then + body_JointOperationalParametersList_JointOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("BusCurrent: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_JointOperationalParametersList_JointOperationalParametersRec_pv_count = body_JointOperationalParametersList_JointOperationalParametersRec_pv_count + 1 + if (bitAND(body_JointOperationalParametersList_JointOperationalParametersRec_pv, body_JointOperationalParametersList_JointOperationalParametersRec_pv_count) > 0) then + body_JointOperationalParametersList_JointOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("PhaseCurrent: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_JointOperationalParametersList_JointOperationalParametersRec_pv_count = body_JointOperationalParametersList_JointOperationalParametersRec_pv_count + 1 + end +end +messagetable:add(0xF291, reportoperationalparameters_f291) + +reportmanipulatorhost_f293 = Proto("reportmanipulatorhost_f293", "ReportManipulatorHost 0xf293") +function reportmanipulatorhost_f293.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ExtendedPrimitiveManipulator_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportManipulatorHost", string.format("ReportManipulatorHost, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportManipulatorHost")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_HostManipulator_tree = body_tree:add("HostManipulator") + local body_HostManipulator_ParentID_buf = buffer(bufidx, 4) + local body_HostManipulator_ParentID_tree = body_HostManipulator_tree:add(buffer(bufidx, 4), string.format("%s = ParentID: 0x%X -- (unsigned integer) JAUS identifier on which this manipulator is mounted. A value of zero (0) means this manipulator is independent of any others.", bitstr(body_HostManipulator_ParentID_buf:le_uint(), 32), body_HostManipulator_ParentID_buf:le_uint())) + body_HostManipulator_ParentID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_HostManipulator_ParentID_buf:le_uint(), 32, 0, 7), bitVal(body_HostManipulator_ParentID_buf:le_uint(), 0, 7))) + body_HostManipulator_ParentID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_HostManipulator_ParentID_buf:le_uint(), 32, 8, 15), bitVal(body_HostManipulator_ParentID_buf:le_uint(), 8, 15))) + body_HostManipulator_ParentID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_HostManipulator_ParentID_buf:le_uint(), 32, 16, 31), bitVal(body_HostManipulator_ParentID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_HostManipulator_tree:add(buffer(bufidx, 1), string.format("ParentJoint: %d -- (unsigned byte) The joint number defining a coordinate frame on which this manipulator is mounted. A value of zero (0) means this manipulator is independent of any others.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF293, reportmanipulatorhost_f293) + +querypantiltoperationalparameters_f298 = Proto("querypantiltoperationalparameters_f298", "QueryPanTiltOperationalParameters 0xf298") +function querypantiltoperationalparameters_f298.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ExtendedPrimitivePanTilt_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPanTiltOperationalParameters", string.format("QueryPanTiltOperationalParameters, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPanTiltOperationalParameters")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryJointOperationalParametersRec_tree = body_tree:add("QueryJointOperationalParametersRec") + body_QueryJointOperationalParametersRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Pan Tilt Operational Parameters for bitwise interpretation of the PV.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF298, querypantiltoperationalparameters_f298) + +queryhostmanipulator_f29a = Proto("queryhostmanipulator_f29a", "QueryHostManipulator 0xf29a") +function queryhostmanipulator_f29a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ExtendedPrimitivePanTilt_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHostManipulator", string.format("QueryHostManipulator, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHostManipulator")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF29A, queryhostmanipulator_f29a) + +reportpantiltoperationalparameters_f299 = Proto("reportpantiltoperationalparameters_f299", "ReportPanTiltOperationalParameters 0xf299") +function reportpantiltoperationalparameters_f299.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ExtendedPrimitivePanTilt_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPanTiltOperationalParameters", string.format("ReportPanTiltOperationalParameters, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPanTiltOperationalParameters")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltOperationalParametersRec_tree = body_tree:add("PanTiltOperationalParametersRec") + local body_PanTiltOperationalParametersRec_pv = buffer(bufidx, 1):le_uint() + local body_PanTiltOperationalParametersRec_pv_count = 0 + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_PanTiltOperationalParametersRec_pv, body_PanTiltOperationalParametersRec_pv_count) > 0) then + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("Joint1Temperature: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-50.000000000000))) + bufidx = bufidx + 2 + end + body_PanTiltOperationalParametersRec_pv_count = body_PanTiltOperationalParametersRec_pv_count + 1 + if (bitAND(body_PanTiltOperationalParametersRec_pv, body_PanTiltOperationalParametersRec_pv_count) > 0) then + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("Joint1BusVoltage: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.002288853285 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PanTiltOperationalParametersRec_pv_count = body_PanTiltOperationalParametersRec_pv_count + 1 + if (bitAND(body_PanTiltOperationalParametersRec_pv, body_PanTiltOperationalParametersRec_pv_count) > 0) then + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("Joint1BusCurrent: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PanTiltOperationalParametersRec_pv_count = body_PanTiltOperationalParametersRec_pv_count + 1 + if (bitAND(body_PanTiltOperationalParametersRec_pv, body_PanTiltOperationalParametersRec_pv_count) > 0) then + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("Joint1PhaseCurrent: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PanTiltOperationalParametersRec_pv_count = body_PanTiltOperationalParametersRec_pv_count + 1 + if (bitAND(body_PanTiltOperationalParametersRec_pv, body_PanTiltOperationalParametersRec_pv_count) > 0) then + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("Joint2Temperature: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-50.000000000000))) + bufidx = bufidx + 2 + end + body_PanTiltOperationalParametersRec_pv_count = body_PanTiltOperationalParametersRec_pv_count + 1 + if (bitAND(body_PanTiltOperationalParametersRec_pv, body_PanTiltOperationalParametersRec_pv_count) > 0) then + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("Joint2BusVoltage: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.002288853285 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PanTiltOperationalParametersRec_pv_count = body_PanTiltOperationalParametersRec_pv_count + 1 + if (bitAND(body_PanTiltOperationalParametersRec_pv, body_PanTiltOperationalParametersRec_pv_count) > 0) then + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("Joint2BusCurrent: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PanTiltOperationalParametersRec_pv_count = body_PanTiltOperationalParametersRec_pv_count + 1 + if (bitAND(body_PanTiltOperationalParametersRec_pv, body_PanTiltOperationalParametersRec_pv_count) > 0) then + body_PanTiltOperationalParametersRec_tree:add(buffer(bufidx, 2), string.format("Joint2PhaseCurrent: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PanTiltOperationalParametersRec_pv_count = body_PanTiltOperationalParametersRec_pv_count + 1 +end +messagetable:add(0xF299, reportpantiltoperationalparameters_f299) + +reportmanipulatorhost_f29b = Proto("reportmanipulatorhost_f29b", "ReportManipulatorHost 0xf29b") +function reportmanipulatorhost_f29b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ExtendedPrimitivePanTilt_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportManipulatorHost", string.format("ReportManipulatorHost, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportManipulatorHost")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_HostManipulator_tree = body_tree:add("HostManipulator") + local body_HostManipulator_ParentID_buf = buffer(bufidx, 4) + local body_HostManipulator_ParentID_tree = body_HostManipulator_tree:add(buffer(bufidx, 4), string.format("%s = ParentID: 0x%X -- (unsigned integer) JAUS identifier on which this pan tilt is mounted. A value of zero (0) means this pan tilt is independent of any others.", bitstr(body_HostManipulator_ParentID_buf:le_uint(), 32), body_HostManipulator_ParentID_buf:le_uint())) + body_HostManipulator_ParentID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_HostManipulator_ParentID_buf:le_uint(), 32, 0, 7), bitVal(body_HostManipulator_ParentID_buf:le_uint(), 0, 7))) + body_HostManipulator_ParentID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_HostManipulator_ParentID_buf:le_uint(), 32, 8, 15), bitVal(body_HostManipulator_ParentID_buf:le_uint(), 8, 15))) + body_HostManipulator_ParentID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_HostManipulator_ParentID_buf:le_uint(), 32, 16, 31), bitVal(body_HostManipulator_ParentID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_HostManipulator_tree:add(buffer(bufidx, 1), string.format("ParentJoint: %d -- (unsigned byte) The joint number defining a coordinate frame on which this pan tilt is mounted. A value of zero (0) means this pan tilt is independent of any others.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF29B, reportmanipulatorhost_f29b) + +queryfluiddeliverycapabilities_da06 = Proto("queryfluiddeliverycapabilities_da06", "QueryFluidDeliveryCapabilities 0xda06") +function queryfluiddeliverycapabilities_da06.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFluidDeliveryCapabilities", string.format("QueryFluidDeliveryCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFluidDeliveryCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDA06, queryfluiddeliverycapabilities_da06) + +queryfluiddeliveryconfiguration_da07 = Proto("queryfluiddeliveryconfiguration_da07", "QueryFluidDeliveryConfiguration 0xda07") +function queryfluiddeliveryconfiguration_da07.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFluidDeliveryConfiguration", string.format("QueryFluidDeliveryConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFluidDeliveryConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDA07, queryfluiddeliveryconfiguration_da07) + +queryfluiddeliverystatus_da08 = Proto("queryfluiddeliverystatus_da08", "QueryFluidDeliveryStatus 0xda08") +function queryfluiddeliverystatus_da08.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFluidDeliveryStatus", string.format("QueryFluidDeliveryStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFluidDeliveryStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDA08, queryfluiddeliverystatus_da08) + +queryfluiddeliveryreport_da09 = Proto("queryfluiddeliveryreport_da09", "QueryFluidDeliveryReport 0xda09") +function queryfluiddeliveryreport_da09.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFluidDeliveryReport", string.format("QueryFluidDeliveryReport, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFluidDeliveryReport")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDA09, queryfluiddeliveryreport_da09) + +setfluiddeliveryconfiguration_da0a = Proto("setfluiddeliveryconfiguration_da0a", "SetFluidDeliveryConfiguration 0xda0a") +function setfluiddeliveryconfiguration_da0a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetFluidDeliveryConfiguration", string.format("SetFluidDeliveryConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetFluidDeliveryConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FluidDeliveryConfigurationSeq_tree = body_tree:add("FluidDeliveryConfigurationSeq") + local body_FluidDeliveryConfigurationSeq_pv = buffer(bufidx, 1):le_uint() + local body_FluidDeliveryConfigurationSeq_pv_count = 0 + body_FluidDeliveryConfigurationSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FluidDeliveryConfigurationSeq_FluidDeliveryRequestRec_tree = body_FluidDeliveryConfigurationSeq_tree:add("FluidDeliveryRequestRec") + body_FluidDeliveryConfigurationSeq_FluidDeliveryRequestRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Local request ID for the Fluid Delivery Configuration", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_pv, body_FluidDeliveryConfigurationSeq_pv_count) > 0) then + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_tree = body_FluidDeliveryConfigurationSeq_tree:add("RequestFluidDeliverySeq") + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_tree:add("FluidDeliveryRec") + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv = buffer(bufidx, 1):le_uint() + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count = 0 + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 1), string.format("SourceFluidTankID: %d -- (unsigned byte) ID of the fluid (from the capabilities message) that will be delivered.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count) > 0) then + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 8), string.format("DesiredFluidDeliveryRateInLPS: %d -- (long float) The desired rate at which fluid should be delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count) > 0) then + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 8), string.format("MaximumRequestedDeliveryRateInLPS: %d -- (long float) The maximum rate at which fluid should be delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count) > 0) then + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 8), string.format("MinimumRequestedDeliveryRateInLPS: %d -- (long float) The minimum rate at which fluid should be delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count + 1 + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_tree:add("FluidDeliveryRecipientRec") + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv = buffer(bufidx, 1):le_uint() + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count = 0 + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf = buffer(bufidx, 4) + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx, 4), string.format("%s = RecipientJausID: 0x%X -- (unsigned integer) JAUS ID of the recipient vehicle.", bitstr(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 32), body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint())) + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 32, 0, 7), bitVal(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 0, 7))) + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 32, 8, 15), bitVal(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 8, 15))) + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 32, 16, 31), bitVal(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx, 1), string.format("RecipientPowerPlantID: %d -- (unsigned byte) ID of the power plant with which this tank to be filled is associated.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count) > 0) then + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx, 1), string.format("RecipientTankID: %d -- (unsigned byte) ID of the tank into which the fluid will be delivered.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count) > 0) then + local types_set = {[1] = 8, [2] = 2} + local unit_set = {[1] = "liter", [2] = "percent"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[2] = 0} + local bias_set_tabe = {[2] = 0} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local DesiredFillAmount_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("DesiredFillAmount: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + DesiredFillAmount_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local DesiredFillAmount_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("DesiredFillAmount: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + DesiredFillAmount_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local DesiredFillAmount_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("DesiredFillAmount: %d %s", value, unit_list(type_value))) + DesiredFillAmount_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count + 1 + end + body_FluidDeliveryConfigurationSeq_pv_count = body_FluidDeliveryConfigurationSeq_pv_count + 1 +end +messagetable:add(0xDA0A, setfluiddeliveryconfiguration_da0a) + +reportpowerplantcapabilities_4507 = Proto("reportpowerplantcapabilities_4507", "ReportPowerPlantCapabilities 0x4507") +function reportpowerplantcapabilities_4507.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPowerPlantCapabilities", string.format("ReportPowerPlantCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPowerPlantCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_powerPlantCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "powerPlantCapabilitiesList ") + body_powerPlantCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_powerPlantCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_powerPlantCapabilitiesList_count do + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_tree = body_powerPlantCapabilitiesList_tree:add(string.format("powerPlantCapabilitiesSeq_%d", body_counter - 1)) + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_PowerPlantDescRec_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_tree:add("PowerPlantDescRec") + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_PowerPlantDescRec_tree:add(buffer(bufidx, 1), string.format("powerPlantID: %d -- (unsigned byte) Each powerplant has a unique ID associated with it. This ID is used in subsequent messages.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_PowerPlantDescRec_description_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_PowerPlantDescRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_PowerPlantDescRec_description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_tree:add("powerPlantCapabilitiesVar") + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 4", buffer(bufidx, 1):le_uint())) + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_index == 0) then + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_tree:add("gasEngineCapabilitiesRec") + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count = 0 + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("fuelCapacity: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("oilCapacity: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxOilPressure: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.007812619211 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxOilTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxEngineTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxCoolantLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxCoolantTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_gasEngineCapabilitiesRec_pv_count + 1 + end + if (body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_index == 1) then + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_tree:add("dieselEngineCapabilitiesRec") + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv = buffer(bufidx, 2):le_uint() + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = 0 + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("fuelCapacity: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("oilCapacity: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxOilPressure: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.007812619211 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxOilTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxEngineTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxCoolantLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxCoolantTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxGlowPlugTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("glowPlugTime: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_dieselEngineCapabilitiesRec_pv_count + 1 + end + if (body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_index == 2) then + local bufidx_start_body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar = bufidx + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_tree:add(buffer(bufidx_start_body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar, buffer:len() - bufidx_start_body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar), "batteryCapabilitiesList ") + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_counter=1,body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_count do + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_tree:add(string.format("batteryCapabilitiesRec_%d", body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_counter - 1)) + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count = 0 + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("nominalVoltage: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("maxCharge: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000838190317 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxCrankingAmps: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.076295109483 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_batteryCapabilitiesList_batteryCapabilitiesRec_pv_count + 1 + end + end + if (body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_index == 3) then + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_tree:add("hydraulicCapabilitiesRec") + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count = 0 + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("fluidCapacity: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxPressure: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.007812619211 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_hydraulicCapabilitiesRec_pv_count + 1 + end + if (body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_index == 4) then + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_tree = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_tree:add("fuelCellCapabilitiesRec") + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_pv_count = 0 + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_pv, body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_pv_count) > 0) then + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("fuelCapacity: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_pv_count = body_powerPlantCapabilitiesList_powerPlantCapabilitiesSeq_powerPlantCapabilitiesVar_fuelCellCapabilitiesRec_pv_count + 1 + end + end +end +messagetable:add(0x4507, reportpowerplantcapabilities_4507) + +reportpowerplantstatus_4508 = Proto("reportpowerplantstatus_4508", "ReportPowerPlantStatus 0x4508") +function reportpowerplantstatus_4508.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPowerPlantStatus", string.format("ReportPowerPlantStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPowerPlantStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_powerPlantStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "powerPlantStatusList ") + body_powerPlantStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_powerPlantStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_powerPlantStatusList_count do + local body_powerPlantStatusList_powerPlantStatus_tree = body_powerPlantStatusList_tree:add(string.format("powerPlantStatus_%d", body_counter - 1)) + local body_powerPlantStatusList_powerPlantStatus_PowerPlantDescRec_tree = body_powerPlantStatusList_powerPlantStatus_tree:add("PowerPlantDescRec") + body_powerPlantStatusList_powerPlantStatus_PowerPlantDescRec_tree:add(buffer(bufidx, 1), string.format("powerPlantID: %d -- (unsigned byte) This is a unique ID for each powerplant and is provided by 4507 Report PowerPlant Capabilities message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_powerPlantStatusList_powerPlantStatus_PowerPlantDescRec_description_tree = body_powerPlantStatusList_powerPlantStatus_PowerPlantDescRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_powerPlantStatusList_powerPlantStatus_PowerPlantDescRec_description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_tree = body_powerPlantStatusList_powerPlantStatus_tree:add("powerPlantStatusVar") + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 4", buffer(bufidx, 1):le_uint())) + local body_powerPlantStatusList_powerPlantStatus_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_powerPlantStatusList_powerPlantStatus_index == 0) then + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_tree:add("gasEngineStatus") + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv = buffer(bufidx, 2):le_uint() + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = 0 + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("percentRemainingFuel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("percentOilPressure: %.4f (scaled) -- (unsigned short integer) Pressure greater than 100% represents an overpressure situation.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("percentOilLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("oilTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("engineTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 4), string.format("engineHours: %d -- (unsigned integer) The total runtime of the engine in its lifetime.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("tachometer: %d -- (unsigned short integer) Rotations per minute. Units here are one since JSIDL does not support RPM natively", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("coolantLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("coolantTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("airIntakePressure: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.007812619211 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("airIntakeTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_tree:add(buffer(bufidx, 2), string.format("exhaustTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_gasEngineStatus_pv_count + 1 + end + if (body_powerPlantStatusList_powerPlantStatus_index == 1) then + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_tree:add("dieselEngineStatus") + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv = buffer(bufidx, 2):le_uint() + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = 0 + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 1), string.format("percentRemainingFuel: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 1), string.format("percentOilPressure: %.4f (scaled) -- (unsigned byte) Pressure greater than 100% represents an overpressure situation.", buffer(bufidx, 1):le_uint() * 0.784313725490 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("percentOilLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("oilTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("engineTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 4), string.format("engineHours: %d -- (unsigned integer) The total runtime of the engine in its lifetime", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("tachometer: %d -- (unsigned short integer) Rotations per minute. Units here are one since JSIDL does not support RPM natively", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("coolantLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("coolantTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("airIntakePressure: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.007812619211 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("airIntakeTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("exhaustTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_tree:add(buffer(bufidx, 2), string.format("glowPlugTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_dieselEngineStatus_pv_count + 1 + end + if (body_powerPlantStatusList_powerPlantStatus_index == 2) then + local bufidx_start_body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar = bufidx + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_tree = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_tree:add(buffer(bufidx_start_body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar, buffer:len() - bufidx_start_body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar), "batteryStatus ") + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_counter=1,body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_count do + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_tree = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_tree:add(string.format("batteryStatusRec_%d", body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_counter - 1)) + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count = 0 + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_tree:add(buffer(bufidx, 2), string.format("percentChargeRemaining: %.4f (scaled) -- (unsigned short integer) Percent of maximum.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_tree:add(buffer(bufidx, 2), string.format("voltage: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_tree:add(buffer(bufidx, 2), string.format("currentDraw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_tree:add(buffer(bufidx, 2), string.format("batteryTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_tree:add(buffer(bufidx, 4), string.format("batteryHours: %d -- (unsigned integer) The total runtime of the battery in its lifetime", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_batteryStatus_batteryStatusRec_pv_count + 1 + end + end + if (body_powerPlantStatusList_powerPlantStatus_index == 3) then + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_tree = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_tree:add("hydraulicStatus") + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count = 0 + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_tree:add(buffer(bufidx, 2), string.format("fluidLevel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003906309606 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_tree:add(buffer(bufidx, 2), string.format("percentFluidPressure: %.4f (scaled) -- (unsigned short integer) Pressure greater than 100% represents an overpressure situation.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_tree:add(buffer(bufidx, 2), string.format("fluidTemp: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003891050584 + (-75.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_tree:add(buffer(bufidx, 4), string.format("totalHours: %d -- (unsigned integer) The total runtime of the hydraulic system in its lifetime", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_hydraulicStatus_pv_count + 1 + end + if (body_powerPlantStatusList_powerPlantStatus_index == 4) then + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_tree = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_tree:add("fuelCellStatus") + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv_count = 0 + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_tree:add(buffer(bufidx, 2), string.format("percentRemainingFuel: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv_count + 1 + if (bitAND(body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv, body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv_count) > 0) then + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_tree:add(buffer(bufidx, 4), string.format("totalHours: %d -- (unsigned integer) The total runtime of the fuel cell in its lifetime", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv_count = body_powerPlantStatusList_powerPlantStatus_powerPlantStatusVar_fuelCellStatus_pv_count + 1 + end + end +end +messagetable:add(0x4508, reportpowerplantstatus_4508) + +reportfluiddeliverycapabilities_da0b = Proto("reportfluiddeliverycapabilities_da0b", "ReportFluidDeliveryCapabilities 0xda0b") +function reportfluiddeliverycapabilities_da0b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFluidDeliveryCapabilities", string.format("ReportFluidDeliveryCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFluidDeliveryCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FluidDeliveryCapabilitiesSeq_tree = body_tree:add("FluidDeliveryCapabilitiesSeq") + local body_FluidDeliveryCapabilitiesSeq_FluidDeliveryCapabilitiesRec_tree = body_FluidDeliveryCapabilitiesSeq_tree:add("FluidDeliveryCapabilitiesRec") + body_FluidDeliveryCapabilitiesSeq_FluidDeliveryCapabilitiesRec_tree:add(buffer(bufidx, 8), string.format("MaximumDeliveryRateInLPS: %d -- (long float) The maximum rate at which fluid can be delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + body_FluidDeliveryCapabilitiesSeq_FluidDeliveryCapabilitiesRec_tree:add(buffer(bufidx, 8), string.format("MinimumDeliveryRateInLPS: %d -- (long float) The minimum rate at which fluid can be delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + local bufidx_start_body_FluidDeliveryCapabilitiesSeq = bufidx + local body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_tree = body_FluidDeliveryCapabilitiesSeq_tree:add(buffer(bufidx_start_body_FluidDeliveryCapabilitiesSeq, buffer:len() - bufidx_start_body_FluidDeliveryCapabilitiesSeq), "FluidTankDeliveryCapabilitiesList ") + body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_FluidDeliveryCapabilitiesSeq_counter=1,body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_count do + local body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_tree = body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_tree:add(string.format("FluidTankDeliveryCapabilityRec_%d", body_FluidDeliveryCapabilitiesSeq_counter - 1)) + body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_tree:add(buffer(bufidx, 1), string.format("FluidTankID: %d -- (unsigned byte) ID of the fluid tank being registered.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_TankName_tree = body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("TankName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_TankName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local value_set = {[0] = "FluidType_Water", [1] = "FluidType_Gasoline", [2] = "FluidType_Diesel", [3] = "FluidType_Oil", [4] = "FluidType_Coolant", [5] = "FluidType_Cleaner", [6] = "FluidType_Other"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_tree:add(buffer(bufidx, 1), string.format("FluidType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_FluidName_tree = body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("FluidName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_FluidName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_tree:add(buffer(bufidx, 2), string.format("FluidCapacity: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.031250476844 + (0.000000000000))) + bufidx = bufidx + 2 + local value_set = {[0] = "Fluid_Filter_Not_Present", [1] = "Fluid_Filter_Present"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FluidDeliveryCapabilitiesSeq_FluidTankDeliveryCapabilitiesList_FluidTankDeliveryCapabilityRec_tree:add(buffer(bufidx, 1), string.format("FluidFilterCapability: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xDA0B, reportfluiddeliverycapabilities_da0b) + +reportfluiddeliveryconfiguration_da0c = Proto("reportfluiddeliveryconfiguration_da0c", "ReportFluidDeliveryConfiguration 0xda0c") +function reportfluiddeliveryconfiguration_da0c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFluidDeliveryConfiguration", string.format("ReportFluidDeliveryConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFluidDeliveryConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FluidDeliveryConfigurationSeq_tree = body_tree:add("FluidDeliveryConfigurationSeq") + local body_FluidDeliveryConfigurationSeq_pv = buffer(bufidx, 1):le_uint() + local body_FluidDeliveryConfigurationSeq_pv_count = 0 + body_FluidDeliveryConfigurationSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FluidDeliveryConfigurationSeq_FluidDeliveryRequestRec_tree = body_FluidDeliveryConfigurationSeq_tree:add("FluidDeliveryRequestRec") + body_FluidDeliveryConfigurationSeq_FluidDeliveryRequestRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Local request ID associated with the Fluid Delivery Configuration", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_pv, body_FluidDeliveryConfigurationSeq_pv_count) > 0) then + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_tree = body_FluidDeliveryConfigurationSeq_tree:add("RequestFluidDeliverySeq") + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_tree:add("FluidDeliveryRec") + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv = buffer(bufidx, 1):le_uint() + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count = 0 + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 1), string.format("SourceFluidTankID: %d -- (unsigned byte) ID of the fluid (from the capabilities message) that will be delivered.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count) > 0) then + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 8), string.format("DesiredFluidDeliveryRateInLPS: %d -- (long float) The desired rate at which fluid should be delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count) > 0) then + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 8), string.format("MaximumRequestedDeliveryRateInLPS: %d -- (long float) The maximum rate at which fluid should be delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count) > 0) then + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_tree:add(buffer(bufidx, 8), string.format("MinimumRequestedDeliveryRateInLPS: %d -- (long float) The minimum rate at which fluid should be delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRec_pv_count + 1 + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_tree:add("FluidDeliveryRecipientRec") + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv = buffer(bufidx, 1):le_uint() + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count = 0 + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf = buffer(bufidx, 4) + local body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx, 4), string.format("%s = RecipientJausID: 0x%X -- (unsigned integer) JAUS ID of the recipient vehicle.", bitstr(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 32), body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint())) + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 32, 0, 7), bitVal(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 0, 7))) + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 32, 8, 15), bitVal(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 8, 15))) + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 32, 16, 31), bitVal(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_RecipientJausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx, 1), string.format("RecipientPowerPlantID: %d -- (unsigned byte) ID of the power plant with which this tank to be filled is associated.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count) > 0) then + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx, 1), string.format("RecipientTankID: %d -- (unsigned byte) ID of the tank into which the fluid will be delivered.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count + 1 + if (bitAND(body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv, body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count) > 0) then + local types_set = {[1] = 8, [2] = 2} + local unit_set = {[1] = "liter", [2] = "percent"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[2] = 0} + local bias_set_tabe = {[2] = 0} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local DesiredFillAmount_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("DesiredFillAmount: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + DesiredFillAmount_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local DesiredFillAmount_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("DesiredFillAmount: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + DesiredFillAmount_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local DesiredFillAmount_tree = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("DesiredFillAmount: %d %s", value, unit_list(type_value))) + DesiredFillAmount_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count = body_FluidDeliveryConfigurationSeq_RequestFluidDeliverySeq_FluidDeliveryRecipientRec_pv_count + 1 + end + body_FluidDeliveryConfigurationSeq_pv_count = body_FluidDeliveryConfigurationSeq_pv_count + 1 +end +messagetable:add(0xDA0C, reportfluiddeliveryconfiguration_da0c) + +reportfluiddeliverystatus_da0d = Proto("reportfluiddeliverystatus_da0d", "ReportFluidDeliveryStatus 0xda0d") +function reportfluiddeliverystatus_da0d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFluidDeliveryStatus", string.format("ReportFluidDeliveryStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFluidDeliveryStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FluidDeliveryStatusSeq_tree = body_tree:add("FluidDeliveryStatusSeq") + local bufidx_start_body_FluidDeliveryStatusSeq = bufidx + local body_FluidDeliveryStatusSeq_FluidLevelStatusList_tree = body_FluidDeliveryStatusSeq_tree:add(buffer(bufidx_start_body_FluidDeliveryStatusSeq, buffer:len() - bufidx_start_body_FluidDeliveryStatusSeq), "FluidLevelStatusList ") + body_FluidDeliveryStatusSeq_FluidLevelStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_FluidDeliveryStatusSeq_FluidLevelStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_FluidDeliveryStatusSeq_counter=1,body_FluidDeliveryStatusSeq_FluidLevelStatusList_count do + local body_FluidDeliveryStatusSeq_FluidLevelStatusList_FluidTankStatusRec_tree = body_FluidDeliveryStatusSeq_FluidLevelStatusList_tree:add(string.format("FluidTankStatusRec_%d", body_FluidDeliveryStatusSeq_counter - 1)) + body_FluidDeliveryStatusSeq_FluidLevelStatusList_FluidTankStatusRec_tree:add(buffer(bufidx, 1), string.format("SourceFluidTankID: %d -- (unsigned byte) ID of the fluid tank from the capabilities message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_FluidDeliveryStatusSeq_FluidLevelStatusList_FluidTankStatusRec_tree:add(buffer(bufidx, 2), string.format("PercentRemainingFluid: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + local body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_tree = body_FluidDeliveryStatusSeq_tree:add("FluidDeliveryStatusVar") + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_FluidDeliveryStatusSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FluidDeliveryStatusSeq_index == 0) then + local body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_NoFluidDeliveryStatusRec_tree = body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_tree:add("NoFluidDeliveryStatusRec-- Status of non currently delivering fluid.") + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_NoFluidDeliveryStatusRec_tree:add(buffer(bufidx, 1), string.format("NoFluidDelivery: %d -- (unsigned byte) This field shall be zero. It is reserved for future use.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + if (body_FluidDeliveryStatusSeq_index == 1) then + local body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_tree = body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_tree:add("FluidDeliveryStatusRec-- Status of the ongoing fluid delivery.") + local body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count = 0 + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_tree:add(buffer(bufidx, 1), string.format("SelectedSourceFluidID: %d -- (unsigned byte) ID of the fluid (from the capabilities message) that is being delivered.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_tree:add(buffer(bufidx, 2), string.format("DeliverySystemRemainingFluid: %.4f (scaled) -- (unsigned short integer) The percentage of fluid currently remaining in the delivery system.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv, body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count) > 0) then + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_tree:add(buffer(bufidx, 8), string.format("CurrentFluidDeliveryRateInLPS: %d -- (long float) The rate at which fluid is being delivered by the system", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count = body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count + 1 + if (bitAND(body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv, body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count) > 0) then + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_tree:add(buffer(bufidx, 2), string.format("CurrentFluidFillPercentage: %.4f (scaled) -- (unsigned short integer) The percentage of fluid currently in the recipient tank", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count = body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count + 1 + if (bitAND(body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv, body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count) > 0) then + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_tree:add(buffer(bufidx, 8), string.format("FluidFilterPressureDifferential: %d -- (long float) The pressure differential (Delta-P) across the fluid filter in Pascal.", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count = body_FluidDeliveryStatusSeq_FluidDeliveryStatusVar_FluidDeliveryStatusRec_pv_count + 1 + end +end +messagetable:add(0xDA0D, reportfluiddeliverystatus_da0d) + +reportfluiddeliveryreport_da0e = Proto("reportfluiddeliveryreport_da0e", "ReportFluidDeliveryReport 0xda0e") +function reportfluiddeliveryreport_da0e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFluidDeliveryReport", string.format("ReportFluidDeliveryReport, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFluidDeliveryReport")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FluidDeliveryReportRec_tree = body_tree:add("FluidDeliveryReportRec-- Record of the last finished fluid delivery.") + local body_FluidDeliveryReportRec_pv = buffer(bufidx, 1):le_uint() + local body_FluidDeliveryReportRec_pv_count = 0 + body_FluidDeliveryReportRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FluidDeliveryReportRec_tree:add(buffer(bufidx, 1), string.format("DeliveredSourceFluidID: %d -- (unsigned byte) ID of the fluid (from the capabilities message) that was delivered.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_FluidDeliveryReportRec_pv, body_FluidDeliveryReportRec_pv_count) > 0) then + body_FluidDeliveryReportRec_tree:add(buffer(bufidx, 8), string.format("FluidDelivered: %d -- (long float) The amount of fluid that was delivered in Liters", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_FluidDeliveryReportRec_pv_count = body_FluidDeliveryReportRec_pv_count + 1 + if (bitAND(body_FluidDeliveryReportRec_pv, body_FluidDeliveryReportRec_pv_count) > 0) then + local body_FluidDeliveryReportRec_RecipientJausID_buf = buffer(bufidx, 4) + local body_FluidDeliveryReportRec_RecipientJausID_tree = body_FluidDeliveryReportRec_tree:add(buffer(bufidx, 4), string.format("%s = RecipientJausID: 0x%X -- (unsigned integer) JAUS ID of the recipient vehicle.", bitstr(body_FluidDeliveryReportRec_RecipientJausID_buf:le_uint(), 32), body_FluidDeliveryReportRec_RecipientJausID_buf:le_uint())) + body_FluidDeliveryReportRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FluidDeliveryReportRec_RecipientJausID_buf:le_uint(), 32, 0, 7), bitVal(body_FluidDeliveryReportRec_RecipientJausID_buf:le_uint(), 0, 7))) + body_FluidDeliveryReportRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FluidDeliveryReportRec_RecipientJausID_buf:le_uint(), 32, 8, 15), bitVal(body_FluidDeliveryReportRec_RecipientJausID_buf:le_uint(), 8, 15))) + body_FluidDeliveryReportRec_RecipientJausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FluidDeliveryReportRec_RecipientJausID_buf:le_uint(), 32, 16, 31), bitVal(body_FluidDeliveryReportRec_RecipientJausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_FluidDeliveryReportRec_pv_count = body_FluidDeliveryReportRec_pv_count + 1 + body_FluidDeliveryReportRec_tree:add(buffer(bufidx, 1), string.format("RecipientPowerPlantID: %d -- (unsigned byte) ID of the power plant with which this tank that was filled is associated.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_FluidDeliveryReportRec_pv, body_FluidDeliveryReportRec_pv_count) > 0) then + body_FluidDeliveryReportRec_tree:add(buffer(bufidx, 1), string.format("RecipientTankID: %d -- (unsigned byte) ID of the tank into which the fluid will be delivered.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_FluidDeliveryReportRec_pv_count = body_FluidDeliveryReportRec_pv_count + 1 + if (bitAND(body_FluidDeliveryReportRec_pv, body_FluidDeliveryReportRec_pv_count) > 0) then + body_FluidDeliveryReportRec_tree:add(buffer(bufidx, 2), string.format("EndingFluidFillPercentage: %.4f (scaled) -- (unsigned short integer) The percentage of fluid in the recipient tank when fluid delivery stopped", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FluidDeliveryReportRec_pv_count = body_FluidDeliveryReportRec_pv_count + 1 +end +messagetable:add(0xDA0E, reportfluiddeliveryreport_da0e) + +setfluiddeliveryconfigurationresponse_da0f = Proto("setfluiddeliveryconfigurationresponse_da0f", "SetFluidDeliveryConfigurationResponse 0xda0f") +function setfluiddeliveryconfigurationresponse_da0f.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FluidDeliveryDriver_IOP_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetFluidDeliveryConfigurationResponse", string.format("SetFluidDeliveryConfigurationResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetFluidDeliveryConfigurationResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetFluidDeliveryConfigurationResponseRec_tree = body_tree:add("SetFluidDeliveryConfigurationResponseRec") + body_SetFluidDeliveryConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Local request ID associated with the Fluid Delivery Configuration", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "EXECUTING", [1] = "INVALID_FLUID_DELIVERY_CONFIGURATION", [2] = "INSUFFICIENT_FLUID_AVAILABLE", [3] = "INVALID_RECIPIENT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetFluidDeliveryConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDA0F, setfluiddeliveryconfigurationresponse_da0f) + +queryfollowerstatus_f120 = Proto("queryfollowerstatus_f120", "QueryFollowerStatus 0xf120") +function queryfollowerstatus_f120.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FollowerStatus_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFollowerStatus", string.format("QueryFollowerStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFollowerStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryFollowerStatusRec_tree = body_tree:add("QueryFollowerStatusRec") + body_QueryFollowerStatusRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d -- (unsigned byte) ID of the group to be reported. A value of zero (0) returns all known groups", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF120, queryfollowerstatus_f120) + +queryfollowercapabilities_f121 = Proto("queryfollowercapabilities_f121", "QueryFollowerCapabilities 0xf121") +function queryfollowercapabilities_f121.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FollowerStatus_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFollowerCapabilities", string.format("QueryFollowerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFollowerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryParameters_tree = body_tree:add("QueryParameters") + local body_QueryParameters_pv = buffer(bufidx, 1):le_uint() + local body_QueryParameters_pv_count = 0 + body_QueryParameters_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_QueryParameters_pv, body_QueryParameters_pv_count) > 0) then + body_QueryParameters_tree:add(buffer(bufidx, 2), string.format("TargetSpeed: %.4f (scaled) -- (unsigned short integer) Target speed the vehicle is expected to achieve, which may impact capabilities report", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_QueryParameters_pv_count = body_QueryParameters_pv_count + 1 +end +messagetable:add(0xF121, queryfollowercapabilities_f121) + +reportfollowerstatus_f122 = Proto("reportfollowerstatus_f122", "ReportFollowerStatus 0xf122") +function reportfollowerstatus_f122.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FollowerStatus_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFollowerStatus", string.format("ReportFollowerStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFollowerStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_FollowerStateList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "FollowerStateList ") + body_FollowerStateList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerStateList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_FollowerStateList_count do + local body_FollowerStateList_FollowerStateRec_tree = body_FollowerStateList_tree:add(string.format("FollowerStateRec_%d", body_counter - 1)) + local body_FollowerStateList_FollowerStateRec_pv = buffer(bufidx, 4):le_uint() + local body_FollowerStateList_FollowerStateRec_pv_count = 0 + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 4), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 4):le_uint(), 4 * 8))) + bufidx = bufidx + 4 + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d -- (unsigned byte) ID of the group", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "NOT_READY", [1] = "READY", [2] = "FAILED", [3] = "GAP_TOO_SHORT", [4] = "NAV_NOT_READY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 1), string.format("Condition: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_FollowerStateList_FollowerStateRec_pv, body_FollowerStateList_FollowerStateRec_pv_count) > 0) then + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 4), string.format("CurrentFollowTime: %.4f (scaled) -- (unsigned integer) Current time that the follower is maintaining behind the leader", buffer(bufidx, 4):le_uint() * 0.000000838190 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerStateList_FollowerStateRec_pv_count = body_FollowerStateList_FollowerStateRec_pv_count + 1 + if (bitAND(body_FollowerStateList_FollowerStateRec_pv, body_FollowerStateList_FollowerStateRec_pv_count) > 0) then + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 4), string.format("CurrentFollowDistance: %.4f (scaled) -- (unsigned integer) Current distance that the follower is maintaining behind the leader", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerStateList_FollowerStateRec_pv_count = body_FollowerStateList_FollowerStateRec_pv_count + 1 + if (bitAND(body_FollowerStateList_FollowerStateRec_pv, body_FollowerStateList_FollowerStateRec_pv_count) > 0) then + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 1), string.format("CurrentSpeedOverridePercent: %.4f (scaled) -- (unsigned byte) Current speed override percentage requested by the follower", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_FollowerStateList_FollowerStateRec_pv_count = body_FollowerStateList_FollowerStateRec_pv_count + 1 + if (bitAND(body_FollowerStateList_FollowerStateRec_pv, body_FollowerStateList_FollowerStateRec_pv_count) > 0) then + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 2), string.format("CurrentSpeedOverrideAbsolute: %.4f (scaled) -- (unsigned short integer) Current absolute speed override requested by the follower", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerStateList_FollowerStateRec_pv_count = body_FollowerStateList_FollowerStateRec_pv_count + 1 + end +end +messagetable:add(0xF122, reportfollowerstatus_f122) + +reportfollowercapabilities_f123 = Proto("reportfollowercapabilities_f123", "ReportFollowerCapabilities 0xf123") +function reportfollowercapabilities_f123.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/FollowerStatus_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFollowerCapabilities", string.format("ReportFollowerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFollowerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_CapabilitiesRec_tree = body_tree:add("CapabilitiesRec") + local body_CapabilitiesRec_pv = buffer(bufidx, 4):le_uint() + local body_CapabilitiesRec_pv_count = 0 + body_CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 4):le_uint(), 4 * 8))) + bufidx = bufidx + 4 + if (bitAND(body_CapabilitiesRec_pv, body_CapabilitiesRec_pv_count) > 0) then + body_CapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("TargetSpeed: %.4f (scaled) -- (unsigned short integer) Target speed for which these capabilities apply", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_CapabilitiesRec_pv_count = body_CapabilitiesRec_pv_count + 1 + if (bitAND(body_CapabilitiesRec_pv, body_CapabilitiesRec_pv_count) > 0) then + body_CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("RecommendedOptimalGapDistance: %.4f (scaled) -- (unsigned integer) Current distance that the follower is maintaining behind the leader", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_CapabilitiesRec_pv_count = body_CapabilitiesRec_pv_count + 1 + if (bitAND(body_CapabilitiesRec_pv, body_CapabilitiesRec_pv_count) > 0) then + body_CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("RecommendedMinimumGapDistance: %.4f (scaled) -- (unsigned integer) Current distance that the follower is maintaining behind the leader", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_CapabilitiesRec_pv_count = body_CapabilitiesRec_pv_count + 1 + if (bitAND(body_CapabilitiesRec_pv, body_CapabilitiesRec_pv_count) > 0) then + body_CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("RecommendedMaximumGapDistance: %.4f (scaled) -- (unsigned integer) Current distance that the follower is maintaining behind the leader", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_CapabilitiesRec_pv_count = body_CapabilitiesRec_pv_count + 1 + if (bitAND(body_CapabilitiesRec_pv, body_CapabilitiesRec_pv_count) > 0) then + body_CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("RecommendedOptimalGapTime: %.4f (scaled) -- (unsigned integer) Current time that the follower is maintaining behind the leader", buffer(bufidx, 4):le_uint() * 0.000000838190 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_CapabilitiesRec_pv_count = body_CapabilitiesRec_pv_count + 1 + if (bitAND(body_CapabilitiesRec_pv, body_CapabilitiesRec_pv_count) > 0) then + body_CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("RecommendedMinimumGapTime: %.4f (scaled) -- (unsigned integer) Current time that the follower is maintaining behind the leader", buffer(bufidx, 4):le_uint() * 0.000000838190 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_CapabilitiesRec_pv_count = body_CapabilitiesRec_pv_count + 1 + if (bitAND(body_CapabilitiesRec_pv, body_CapabilitiesRec_pv_count) > 0) then + body_CapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("RecommendedMaximumGapTime: %.4f (scaled) -- (unsigned integer) Current time that the follower is maintaining behind the leader", buffer(bufidx, 4):le_uint() * 0.000000838190 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_CapabilitiesRec_pv_count = body_CapabilitiesRec_pv_count + 1 + if (bitAND(body_CapabilitiesRec_pv, body_CapabilitiesRec_pv_count) > 0) then + local value_set = {[0] = "DISTANCE", [1] = "TIME"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_CapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("RecommendedGapType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_CapabilitiesRec_pv_count = body_CapabilitiesRec_pv_count + 1 +end +messagetable:add(0xF123, reportfollowercapabilities_f123) + +querygeneralsensorcapabilities_dab0 = Proto("querygeneralsensorcapabilities_dab0", "QueryGeneralSensorCapabilities 0xdab0") +function querygeneralsensorcapabilities_dab0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/GeneralSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGeneralSensorCapabilities", string.format("QueryGeneralSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGeneralSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDAB0, querygeneralsensorcapabilities_dab0) + +querygeneralsensorconfiguration_dab1 = Proto("querygeneralsensorconfiguration_dab1", "QueryGeneralSensorConfiguration 0xdab1") +function querygeneralsensorconfiguration_dab1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/GeneralSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGeneralSensorConfiguration", string.format("QueryGeneralSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGeneralSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryGeneralSensorList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryGeneralSensorList ") + body_QueryGeneralSensorList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_QueryGeneralSensorList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_QueryGeneralSensorList_count do + local body_QueryGeneralSensorList_QueryGeneralSensorRec_tree = body_QueryGeneralSensorList_tree:add(string.format("QueryGeneralSensorRec_%d", body_counter - 1)) + body_QueryGeneralSensorList_QueryGeneralSensorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the sensor to be queried. A value of zero (0) implies all sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0xDAB1, querygeneralsensorconfiguration_dab1) + +setgeneralsensorconfiguration_dab2 = Proto("setgeneralsensorconfiguration_dab2", "SetGeneralSensorConfiguration 0xdab2") +function setgeneralsensorconfiguration_dab2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/GeneralSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGeneralSensorConfiguration", string.format("SetGeneralSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGeneralSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SetGeneralSensorList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SetGeneralSensorList ") + body_SetGeneralSensorList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_SetGeneralSensorList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_SetGeneralSensorList_count do + local body_SetGeneralSensorList_SetGeneralSensorRec_tree = body_SetGeneralSensorList_tree:add(string.format("SetGeneralSensorRec_%d", body_counter - 1)) + local body_SetGeneralSensorList_SetGeneralSensorRec_pv = buffer(bufidx, 1):le_uint() + local body_SetGeneralSensorList_SetGeneralSensorRec_pv_count = 0 + body_SetGeneralSensorList_SetGeneralSensorRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_SetGeneralSensorList_SetGeneralSensorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the sensor to be queried. A value of zero (0) implies all sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_SetGeneralSensorList_SetGeneralSensorRec_pv, body_SetGeneralSensorList_SetGeneralSensorRec_pv_count) > 0) then + local value_set = {[0] = "Active", [1] = "Standby", [2] = "Off"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetGeneralSensorList_SetGeneralSensorRec_tree:add(buffer(bufidx, 1), string.format("SensorStateEnum: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SetGeneralSensorList_SetGeneralSensorRec_pv_count = body_SetGeneralSensorList_SetGeneralSensorRec_pv_count + 1 + if (bitAND(body_SetGeneralSensorList_SetGeneralSensorRec_pv, body_SetGeneralSensorList_SetGeneralSensorRec_pv_count) > 0) then + local value_set = {[0] = "SensorRelative", [1] = "VehicleRelative", [2] = "GlobalRelative"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetGeneralSensorList_SetGeneralSensorRec_tree:add(buffer(bufidx, 1), string.format("CoordinateFrameEnum: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SetGeneralSensorList_SetGeneralSensorRec_pv_count = body_SetGeneralSensorList_SetGeneralSensorRec_pv_count + 1 + end +end +messagetable:add(0xDAB2, setgeneralsensorconfiguration_dab2) + +reportgeneralsensorcapabilities_dab3 = Proto("reportgeneralsensorcapabilities_dab3", "ReportGeneralSensorCapabilities 0xdab3") +function reportgeneralsensorcapabilities_dab3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/GeneralSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGeneralSensorCapabilities", string.format("ReportGeneralSensorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGeneralSensorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_GeneralSensorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "GeneralSensorCapabilitiesList ") + body_GeneralSensorCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_GeneralSensorCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_GeneralSensorCapabilitiesList_count do + local body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_tree = body_GeneralSensorCapabilitiesList_tree:add(string.format("GeneralSensorCapabilitiesRec_%d", body_counter - 1)) + body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the sensor to be queried. A value of zero (0) is not permitted.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_Description_tree = body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_Description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf = buffer(bufidx, 1) + local body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_tree = body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedSensorStates: 0x%X ", bitstr(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf:le_uint(), 8), body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf:le_uint())) + body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_tree:add(buffer(bufidx, 1), string.format("%s = Active: %d", bitstr_part(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf:le_uint(), 8, 0, 0), bitVal(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf:le_uint(), 0, 0))) + body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_tree:add(buffer(bufidx, 1), string.format("%s = Standby: %d", bitstr_part(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf:le_uint(), 8, 1, 1), bitVal(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf:le_uint(), 1, 1))) + body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_tree:add(buffer(bufidx, 1), string.format("%s = Off: %d", bitstr_part(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf:le_uint(), 8, 2, 2), bitVal(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedSensorStates_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + local body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf = buffer(bufidx, 1) + local body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_tree = body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedCoordinateFrames: 0x%X ", bitstr(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf:le_uint(), 8), body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf:le_uint())) + body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_tree:add(buffer(bufidx, 1), string.format("%s = SensorRelative: %d", bitstr_part(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf:le_uint(), 8, 0, 0), bitVal(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf:le_uint(), 0, 0))) + body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_tree:add(buffer(bufidx, 1), string.format("%s = VehicleRelative: %d", bitstr_part(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf:le_uint(), 8, 1, 1), bitVal(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf:le_uint(), 1, 1))) + body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_tree:add(buffer(bufidx, 1), string.format("%s = GlobalRelative: %d", bitstr_part(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf:le_uint(), 8, 2, 2), bitVal(body_GeneralSensorCapabilitiesList_GeneralSensorCapabilitiesRec_SupportedCoordinateFrames_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 + end +end +messagetable:add(0xDAB3, reportgeneralsensorcapabilities_dab3) + +reportgeneralsensorconfiguration_dab4 = Proto("reportgeneralsensorconfiguration_dab4", "ReportGeneralSensorConfiguration 0xdab4") +function reportgeneralsensorconfiguration_dab4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/GeneralSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGeneralSensorConfiguration", string.format("ReportGeneralSensorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGeneralSensorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_GeneralSensorConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "GeneralSensorConfigurationList ") + body_GeneralSensorConfigurationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_GeneralSensorConfigurationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_GeneralSensorConfigurationList_count do + local body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_tree = body_GeneralSensorConfigurationList_tree:add(string.format("GeneralSensorConfigurationRec_%d", body_counter - 1)) + local body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv_count = 0 + body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the sensor to be queried. A value of zero (0) implies all sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv, body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "Active", [1] = "Standby", [2] = "Off"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("SensorStateEnum: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv_count = body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv_count + 1 + if (bitAND(body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv, body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "SensorRelative", [1] = "VehicleRelative", [2] = "GlobalRelative"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_tree:add(buffer(bufidx, 1), string.format("CoordinateFrameEnum: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv_count = body_GeneralSensorConfigurationList_GeneralSensorConfigurationRec_pv_count + 1 + end +end +messagetable:add(0xDAB4, reportgeneralsensorconfiguration_dab4) + +requestreleasecontrol_ff48 = Proto("requestreleasecontrol_ff48", "RequestReleaseControl 0xff48") +function requestreleasecontrol_ff48.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HandoffController_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestReleaseControl", string.format("RequestReleaseControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestReleaseControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RequestReleaseControlRec_tree = body_tree:add("RequestReleaseControlRec") + body_RequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) ID from the client used to match this Request to its response.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RequestReleaseControlRec_tree:add(buffer(bufidx, 2), string.format("SrcSubsystemID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("SrcNodeID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("SrcComponentID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_RequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("AuthorityCode: %d -- (unsigned byte) Authority of the source requesting the handoff.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_RequestReleaseControlRec_Explanation_tree = body_RequestReleaseControlRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Explanation[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RequestReleaseControlRec_Explanation_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() +end +messagetable:add(0xFF48, requestreleasecontrol_ff48) + +removerequestreleasecontrol_ff49 = Proto("removerequestreleasecontrol_ff49", "RemoveRequestReleaseControl 0xff49") +function removerequestreleasecontrol_ff49.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HandoffController_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RemoveRequestReleaseControl", string.format("RemoveRequestReleaseControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RemoveRequestReleaseControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RemoveRequestReleaseControlRec_tree = body_tree:add("RemoveRequestReleaseControlRec") + body_RemoveRequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Matches the ID from a RequestReleaseControlRec in the RequestReleaseControl message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xFF49, removerequestreleasecontrol_ff49) + +confirmreleasecontrol_ff4a = Proto("confirmreleasecontrol_ff4a", "ConfirmReleaseControl 0xff4a") +function confirmreleasecontrol_ff4a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HandoffController_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmReleaseControl", string.format("ConfirmReleaseControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmReleaseControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReleaseControlRec_tree = body_tree:add("ReleaseControlRec") + body_ReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Matches the ID from a RequestReleaseControlRec in the RequestReleaseControl message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "GRANTED", [1] = "DENIED", [2] = "WAIT", [3] = "REMOVED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF4A, confirmreleasecontrol_ff4a) + +queryugvsummary_ed10 = Proto("queryugvsummary_ed10", "QueryUGVSummary 0xed10") +function queryugvsummary_ed10.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthMonitor_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryUGVSummary", string.format("QueryUGVSummary, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryUGVSummary")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xED10, queryugvsummary_ed10) + +updateugvsummary_dd10 = Proto("updateugvsummary_dd10", "UpdateUGVSummary 0xdd10") +function updateugvsummary_dd10.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthMonitor_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "UpdateUGVSummary", string.format("UpdateUGVSummary, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "UpdateUGVSummary")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDD10, updateugvsummary_dd10) + +reportugvsummary_fd10 = Proto("reportugvsummary_fd10", "ReportUGVSummary 0xfd10") +function reportugvsummary_fd10.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthMonitor_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportUGVSummary", string.format("ReportUGVSummary, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportUGVSummary")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_UGVHealthSummarySequence_tree = body_tree:add("UGVHealthSummarySequence") + local body_UGVHealthSummarySequence_UGVSeverityRec_tree = body_UGVHealthSummarySequence_tree:add("UGVSeverityRec") + local value_set = {[0] = "NONE", [1] = "NOTIFICATION", [2] = "ADVISORY", [3] = "CAUTION", [4] = "WARNING"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_UGVHealthSummarySequence_UGVSeverityRec_tree:add(buffer(bufidx, 1), string.format("severity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local bufidx_start_body_UGVHealthSummarySequence = bufidx + local body_UGVHealthSummarySequence_SeverityList_tree = body_UGVHealthSummarySequence_tree:add(buffer(bufidx_start_body_UGVHealthSummarySequence, buffer:len() - bufidx_start_body_UGVHealthSummarySequence), "SeverityList -- List of Node Severity Levels") + body_UGVHealthSummarySequence_SeverityList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_UGVHealthSummarySequence_SeverityList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_UGVHealthSummarySequence_counter=1,body_UGVHealthSummarySequence_SeverityList_count do + local body_UGVHealthSummarySequence_SeverityList_SeveritySequence_tree = body_UGVHealthSummarySequence_SeverityList_tree:add(string.format("SeveritySequence_%d", body_UGVHealthSummarySequence_counter - 1)) + local body_UGVHealthSummarySequence_SeverityList_SeveritySequence_NodeID_tree = body_UGVHealthSummarySequence_SeverityList_SeveritySequence_tree:add("NodeID") + body_UGVHealthSummarySequence_SeverityList_SeveritySequence_NodeID_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) JAUS Node ID", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_UGVHealthSummarySequence_SeverityList_SeveritySequence_SeverityRec_tree = body_UGVHealthSummarySequence_SeverityList_SeveritySequence_tree:add("SeverityRec") + local value_set = {[0] = "NONE", [1] = "NOTIFICATION", [2] = "ADVISORY", [3] = "CAUTION", [4] = "WARNING"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_UGVHealthSummarySequence_SeverityList_SeveritySequence_SeverityRec_tree:add(buffer(bufidx, 1), string.format("severity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xFD10, reportugvsummary_fd10) + +queryhealthdetails_ed01 = Proto("queryhealthdetails_ed01", "QueryHealthDetails 0xed01") +function queryhealthdetails_ed01.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHealthDetails", string.format("QueryHealthDetails, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHealthDetails")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xED01, queryhealthdetails_ed01) + +updatehealthreporter_dd01 = Proto("updatehealthreporter_dd01", "UpdateHealthReporter 0xdd01") +function updatehealthreporter_dd01.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "UpdateHealthReporter", string.format("UpdateHealthReporter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "UpdateHealthReporter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDD01, updatehealthreporter_dd01) + +queryhealthsummary_ed02 = Proto("queryhealthsummary_ed02", "QueryHealthSummary 0xed02") +function queryhealthsummary_ed02.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHealthSummary", string.format("QueryHealthSummary, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHealthSummary")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xED02, queryhealthsummary_ed02) + +queryhourmeter_ed03 = Proto("queryhourmeter_ed03", "QueryHourMeter 0xed03") +function queryhourmeter_ed03.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHourMeter", string.format("QueryHourMeter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHourMeter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xED03, queryhourmeter_ed03) + +queryremindersummary_ed04 = Proto("queryremindersummary_ed04", "QueryReminderSummary 0xed04") +function queryremindersummary_ed04.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryReminderSummary", string.format("QueryReminderSummary, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryReminderSummary")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xED04, queryremindersummary_ed04) + +resetreminder_dd05 = Proto("resetreminder_dd05", "ResetReminder 0xdd05") +function resetreminder_dd05.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ResetReminder", string.format("ResetReminder, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ResetReminder")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReminderIDRec_tree = body_tree:add("ReminderIDRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReminderIDRec_tree:add(buffer(bufidx, 1), string.format("ReminderID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDD05, resetreminder_dd05) + +queryreminder_ed05 = Proto("queryreminder_ed05", "QueryReminder 0xed05") +function queryreminder_ed05.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryReminder", string.format("QueryReminder, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryReminder")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReminderIDRec_tree = body_tree:add("ReminderIDRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReminderIDRec_tree:add(buffer(bufidx, 1), string.format("ReminderID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xED05, queryreminder_ed05) + +reporthealthdetails_fd01 = Proto("reporthealthdetails_fd01", "ReportHealthDetails 0xfd01") +function reporthealthdetails_fd01.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportHealthDetails", string.format("ReportHealthDetails, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportHealthDetails")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DetailedStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DetailedStatusList ") + body_DetailedStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_DetailedStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_DetailedStatusList_count do + local body_DetailedStatusList_DetailedSequence_tree = body_DetailedStatusList_tree:add(string.format("DetailedSequence_%d", body_counter - 1)) + local body_DetailedStatusList_DetailedSequence_ComponentRec_tree = body_DetailedStatusList_DetailedSequence_tree:add("ComponentRec") + body_DetailedStatusList_DetailedSequence_ComponentRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d -- (unsigned byte) JAUS Component ID", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local bufidx_start_body_DetailedStatusList_DetailedSequence = bufidx + local body_DetailedStatusList_DetailedSequence_ComponentStatusList_tree = body_DetailedStatusList_DetailedSequence_tree:add(buffer(bufidx_start_body_DetailedStatusList_DetailedSequence, buffer:len() - bufidx_start_body_DetailedStatusList_DetailedSequence), "ComponentStatusList ") + body_DetailedStatusList_DetailedSequence_ComponentStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_DetailedStatusList_DetailedSequence_ComponentStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_DetailedStatusList_DetailedSequence_counter=1,body_DetailedStatusList_DetailedSequence_ComponentStatusList_count do + local body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_tree = body_DetailedStatusList_DetailedSequence_ComponentStatusList_tree:add(string.format("HealthStatusRec_%d", body_DetailedStatusList_DetailedSequence_counter - 1)) + local body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_service_urn_tree = body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("service_urn[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_service_urn_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local value_set = {[0] = "NONE", [1] = "NOTIFICATION", [2] = "ADVISORY", [3] = "CAUTION", [4] = "WARNING"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_tree:add(buffer(bufidx, 1), string.format("severity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "NONE", [1] = "PROCESSOR", [2] = "RAM", [3] = "ROM", [4] = "FILESYS", [5] = "POWER", [6] = "SENSOR", [7] = "ACTUATOR", [8] = "SOFTWARE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_tree:add(buffer(bufidx, 1), string.format("code: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf = buffer(bufidx, 4) + local body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_tree = body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_tree:add(buffer(bufidx, 4), string.format("%s = Logtime: 0x%X ", bitstr(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 32), body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint())) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_tree:add(buffer(bufidx, 4), string.format("%s = milliseconds: %d", bitstr_part(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 32, 0, 9), bitVal(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 0, 9))) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_tree:add(buffer(bufidx, 4), string.format("%s = seconds: %d", bitstr_part(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 32, 10, 15), bitVal(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 10, 15))) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_tree:add(buffer(bufidx, 4), string.format("%s = minute: %d", bitstr_part(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 32, 16, 21), bitVal(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 16, 21))) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_tree:add(buffer(bufidx, 4), string.format("%s = hour: %d", bitstr_part(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 32, 22, 26), bitVal(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 22, 26))) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_tree:add(buffer(bufidx, 4), string.format("%s = day: %d", bitstr_part(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 32, 27, 31), bitVal(body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_Logtime_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + local body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_descriptor_tree = body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("descriptor[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DetailedStatusList_DetailedSequence_ComponentStatusList_HealthStatusRec_descriptor_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 64", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + end +end +messagetable:add(0xFD01, reporthealthdetails_fd01) + +reporthealthsummary_fd02 = Proto("reporthealthsummary_fd02", "ReportHealthSummary 0xfd02") +function reporthealthsummary_fd02.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportHealthSummary", string.format("ReportHealthSummary, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportHealthSummary")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SummaryStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SummaryStatusList ") + body_SummaryStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SummaryStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_SummaryStatusList_count do + local body_SummaryStatusList_SummarySequence_tree = body_SummaryStatusList_tree:add(string.format("SummarySequence_%d", body_counter - 1)) + local body_SummaryStatusList_SummarySequence_ComponentRec_tree = body_SummaryStatusList_SummarySequence_tree:add("ComponentRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SummaryStatusList_SummarySequence_ComponentRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_SummaryStatusList_SummarySequence_SeverityRec_tree = body_SummaryStatusList_SummarySequence_tree:add("SeverityRec") + local value_set = {[0] = "NONE", [1] = "NOTIFICATION", [2] = "ADVISORY", [3] = "CAUTION", [4] = "WARNING"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SummaryStatusList_SummarySequence_SeverityRec_tree:add(buffer(bufidx, 1), string.format("severity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xFD02, reporthealthsummary_fd02) + +reporthourmeter_fd03 = Proto("reporthourmeter_fd03", "ReportHourMeter 0xfd03") +function reporthourmeter_fd03.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportHourMeter", string.format("ReportHourMeter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportHourMeter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_HourMeterRec_tree = body_tree:add("HourMeterRec") + body_HourMeterRec_tree:add(buffer(bufidx, 4), string.format("ElapsedMinutes: %d -- (unsigned integer) Operational (powered-on) minutes for CM", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 +end +messagetable:add(0xFD03, reporthourmeter_fd03) + +reportremindersummary_fd04 = Proto("reportremindersummary_fd04", "ReportReminderSummary 0xfd04") +function reportremindersummary_fd04.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportReminderSummary", string.format("ReportReminderSummary, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportReminderSummary")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ReminderSummaryList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ReminderSummaryList ") + body_ReminderSummaryList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReminderSummaryList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ReminderSummaryList_count do + local body_ReminderSummaryList_ReminderSummaryRec_tree = body_ReminderSummaryList_tree:add(string.format("ReminderSummaryRec_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReminderSummaryList_ReminderSummaryRec_tree:add(buffer(bufidx, 1), string.format("ReminderID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "NotExpired", [1] = "Expired"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReminderSummaryList_ReminderSummaryRec_tree:add(buffer(bufidx, 1), string.format("ReminderStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xFD04, reportremindersummary_fd04) + +reportreminder_fd05 = Proto("reportreminder_fd05", "ReportReminder 0xfd05") +function reportreminder_fd05.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/HealthReporter_V1.5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportReminder", string.format("ReportReminder, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportReminder")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReminderRec_tree = body_tree:add("ReminderRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReminderRec_tree:add(buffer(bufidx, 1), string.format("ReminderID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "NotExpired", [1] = "Expired"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReminderRec_tree:add(buffer(bufidx, 1), string.format("ReminderStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ReminderRec_descriptor_tree = body_ReminderRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("descriptor[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ReminderRec_descriptor_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 64", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + body_ReminderRec_tree:add(buffer(bufidx, 4), string.format("ServiceInterval: %d -- (unsigned integer) Service reminder (duration) in minutes.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_ReminderRec_tree:add(buffer(bufidx, 4), string.format("ElapsedTime: %d -- (unsigned integer) Current elapsed CM powered-on time since last service interval reset.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 +end +messagetable:add(0xFD05, reportreminder_fd05) + +queryintelligentvehiclecapabilities_ddd1 = Proto("queryintelligentvehiclecapabilities_ddd1", "QueryIntelligentVehicleCapabilities 0xddd1") +function queryintelligentvehiclecapabilities_ddd1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryIntelligentVehicleCapabilities", string.format("QueryIntelligentVehicleCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryIntelligentVehicleCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDDD1, queryintelligentvehiclecapabilities_ddd1) + +queryintelligentvehiclecapabilitiesext_ddd8 = Proto("queryintelligentvehiclecapabilitiesext_ddd8", "QueryIntelligentVehicleCapabilitiesExt 0xddd8") +function queryintelligentvehiclecapabilitiesext_ddd8.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryIntelligentVehicleCapabilitiesExt", string.format("QueryIntelligentVehicleCapabilitiesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryIntelligentVehicleCapabilitiesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDDD8, queryintelligentvehiclecapabilitiesext_ddd8) + +queryintelligentvehicleconfiguration_ddd2 = Proto("queryintelligentvehicleconfiguration_ddd2", "QueryIntelligentVehicleConfiguration 0xddd2") +function queryintelligentvehicleconfiguration_ddd2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryIntelligentVehicleConfiguration", string.format("QueryIntelligentVehicleConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryIntelligentVehicleConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDDD2, queryintelligentvehicleconfiguration_ddd2) + +queryintelligentvehiclestatus_ddd3 = Proto("queryintelligentvehiclestatus_ddd3", "QueryIntelligentVehicleStatus 0xddd3") +function queryintelligentvehiclestatus_ddd3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryIntelligentVehicleStatus", string.format("QueryIntelligentVehicleStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryIntelligentVehicleStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDDD3, queryintelligentvehiclestatus_ddd3) + +setintelligentvehicleconfiguration_ddd4 = Proto("setintelligentvehicleconfiguration_ddd4", "SetIntelligentVehicleConfiguration 0xddd4") +function setintelligentvehicleconfiguration_ddd4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetIntelligentVehicleConfiguration", string.format("SetIntelligentVehicleConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetIntelligentVehicleConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_IntelligentVehicleSeq_tree = body_tree:add("IntelligentVehicleSeq") + local body_IntelligentVehicleSeq_pv = buffer(bufidx, 2):le_uint() + local body_IntelligentVehicleSeq_pv_count = 0 + body_IntelligentVehicleSeq_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local body_IntelligentVehicleSeq_IntelligentVehicleRec_tree = body_IntelligentVehicleSeq_tree:add("IntelligentVehicleRec") + local body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf = buffer(bufidx, 8) + local body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree = body_IntelligentVehicleSeq_IntelligentVehicleRec_tree:add(buffer(bufidx, 8), string.format("%s = EnabledBehaviors: 0x%X -- (unsigned long integer) Bit field representing the supported intelligent vehicle behaviors", bitstr(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64), body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint())) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ObstacleAvoidanceBehavior: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 0, 1), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 0, 1))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverLimit: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 2, 2), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 2, 2))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 3, 3), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 3, 3))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RolloverLimit: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 4, 4), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 4, 4))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RolloverWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 5, 5), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 5, 5))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AntilockBrakeSystem: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 6, 6), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 6, 6))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = TractionControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 7, 7), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 7, 7))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = DifferentialLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 8, 8), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 8, 8))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = FrontSuspensionLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 9, 9), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 9, 9))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RearSuspensionLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 10, 10), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 10, 10))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ActivePitchoverControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 11, 11), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 11, 11))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ActiveRolloverControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 12, 12), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 12, 12))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ForwardCollisionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 13, 13), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 13, 13))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BlindSpotMonitoring: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 14, 14), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 14, 14))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneDepartureWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 15, 15), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 15, 15))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PedestrianDetectionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 16, 16), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 16, 16))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BackupWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 17, 17), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 17, 17))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CollisionMitigationBraking: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 18, 18), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 18, 18))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 19, 19), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 19, 19))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 20, 20), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 20, 20))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BackupAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 21, 21), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 21, 21))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneChangeAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 22, 22), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 22, 22))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneKeepingAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 23, 23), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 23, 23))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AdaptiveCruiseControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 24, 24), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 24, 24))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = EmergencyBrakingAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 25, 25), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 25, 25))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HillHoldControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 26, 26), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 26, 26))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HillDescentControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 27, 27), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 27, 27))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AutomaticLaneCentering: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 28, 28), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 28, 28))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AutomatedParking: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 29, 29), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 29, 29))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = DriverAttentionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 30, 30), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 30, 30))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HeadwayWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 31, 31), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 31, 31))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = StuckDetection: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 32, 32), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 32, 32))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForIOP: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 33, 49), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 33, 49))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForProgramSpecificUse: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 50, 63), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 50, 63))) + bufidx = bufidx + 8 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_ObstacleAvoidanceStopRec_tree = body_IntelligentVehicleSeq_tree:add("ObstacleAvoidanceStopRec") + body_IntelligentVehicleSeq_ObstacleAvoidanceStopRec_tree:add(buffer(bufidx, 4), string.format("StandoffDistance: %d -- (float) The distance from the obstacle the vehicle must stop", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_ObstacleAvoidanceDeviateRec_tree = body_IntelligentVehicleSeq_tree:add("ObstacleAvoidanceDeviateRec") + body_IntelligentVehicleSeq_ObstacleAvoidanceDeviateRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %d -- (float) The distance from the path that the vehicle is allowed to deviate to navigate around an obstacle", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_ForwardCollisionWarningRec_tree = body_IntelligentVehicleSeq_tree:add("ForwardCollisionWarningRec") + body_IntelligentVehicleSeq_ForwardCollisionWarningRec_tree:add(buffer(bufidx, 4), string.format("TriggerForwardCollisionSeconds: %d -- (float) The time before a collision occurs to trigger a warning", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_LaneDepatureWarningRec_tree = body_IntelligentVehicleSeq_tree:add("LaneDepatureWarningRec") + body_IntelligentVehicleSeq_LaneDepatureWarningRec_tree:add(buffer(bufidx, 4), string.format("triggerLaneDepartureMeters: %d -- (float) A warning is generated when lane violation over this distance occurs", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_PedestrianDetectionWarningRec_tree = body_IntelligentVehicleSeq_tree:add("PedestrianDetectionWarningRec") + local value_set = {[0] = "LOW", [1] = "MEDIUM", [2] = "HIGH"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_IntelligentVehicleSeq_PedestrianDetectionWarningRec_tree:add(buffer(bufidx, 1), string.format("Sensitivity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_BackupWarningRec_tree = body_IntelligentVehicleSeq_tree:add("BackupWarningRec") + body_IntelligentVehicleSeq_BackupWarningRec_tree:add(buffer(bufidx, 4), string.format("TriggerBackupWarningMeters: %d -- (float) The distance to a rear collision which triggers the warning", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_CollisionMitigationBrakingRec_tree = body_IntelligentVehicleSeq_tree:add("CollisionMitigationBrakingRec") + body_IntelligentVehicleSeq_CollisionMitigationBrakingRec_tree:add(buffer(bufidx, 4), string.format("TriggerCollisionMitigationBrakingSeconds: %d -- (float) The time before a collision occurs to initiate automatic braking", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_BackupAssistRec_tree = body_IntelligentVehicleSeq_tree:add("BackupAssistRec") + body_IntelligentVehicleSeq_BackupAssistRec_tree:add(buffer(bufidx, 4), string.format("TriggerBackupBrakingMeters: %d -- (float) The distance to travel in reverse before automatic assist is engaged", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_LaneKeepingAssistRec_tree = body_IntelligentVehicleSeq_tree:add("LaneKeepingAssistRec") + body_IntelligentVehicleSeq_LaneKeepingAssistRec_tree:add(buffer(bufidx, 4), string.format("TerminateLaneDepartureMeters: %d -- (float) The distance to travel outside a lane before the assist is deactivated", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_AdaptiveCruiseControlRec_tree = body_IntelligentVehicleSeq_tree:add("AdaptiveCruiseControlRec") + body_IntelligentVehicleSeq_AdaptiveCruiseControlRec_tree:add(buffer(bufidx, 4), string.format("AdaptiveCruiseControlHeadwaySettings: %d -- (float) The minimum distance to maintain from the vehicle ahead", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_IntelligentVehicleSeq_AdaptiveCruiseControlRec_tree:add(buffer(bufidx, 4), string.format("adaptiveCruiseControlMinSetSpeed: %d -- (float) The minimum speed allowed", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_AutomatedParkingRec_tree = body_IntelligentVehicleSeq_tree:add("AutomatedParkingRec") + body_IntelligentVehicleSeq_AutomatedParkingRec_tree:add(buffer(bufidx, 4), string.format("StandoffDistance: %d -- (float) The minimum distance between other vehicles to maintain while parking", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 +end +messagetable:add(0xDDD4, setintelligentvehicleconfiguration_ddd4) + +reportintelligentvehiclecapabilities_ddd5 = Proto("reportintelligentvehiclecapabilities_ddd5", "ReportIntelligentVehicleCapabilities 0xddd5") +function reportintelligentvehiclecapabilities_ddd5.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportIntelligentVehicleCapabilities", string.format("ReportIntelligentVehicleCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportIntelligentVehicleCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_IntelligentVehicleRec_tree = body_tree:add("IntelligentVehicleRec") + local body_IntelligentVehicleRec_SupportedBehaviors_buf = buffer(bufidx, 8) + local body_IntelligentVehicleRec_SupportedBehaviors_tree = body_IntelligentVehicleRec_tree:add(buffer(bufidx, 8), string.format("%s = SupportedBehaviors: 0x%X -- (unsigned long integer) Bit field representing the supported intelligent vehicle behaviors", bitstr(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64), body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint())) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ObstacleAvoidanceBehavior_Stop: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 0, 0), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 0, 0))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ObstacleAvoidanceBehavior_DeviateAroundObstacle: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 1, 1), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 1, 1))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverLimit: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 2, 2), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 2, 2))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 3, 3), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 3, 3))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RolloverLimit: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 4, 4), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 4, 4))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RolloverWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 5, 5), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 5, 5))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AntilockBrakeSystem: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 6, 6), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 6, 6))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = TractionControl: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 7, 7), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 7, 7))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = DifferentialLock: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 8, 8), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 8, 8))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = FrontSuspensionLock: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 9, 9), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 9, 9))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RearSuspensionLock: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 10, 10), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 10, 10))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ActivePitchoverControl: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 11, 11), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 11, 11))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ActiveRolloverControl: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 12, 12), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 12, 12))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ForwardCollisionWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 13, 13), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 13, 13))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BlindSpotMonitoring: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 14, 14), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 14, 14))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneDepartureWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 15, 15), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 15, 15))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PedestrianDetectionWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 16, 16), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 16, 16))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BackupWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 17, 17), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 17, 17))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CollisionMitigationBraking: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 18, 18), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 18, 18))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficAssist: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 19, 19), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 19, 19))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 20, 20), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 20, 20))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BackupAssist: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 21, 21), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 21, 21))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneChangeAssist: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 22, 22), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 22, 22))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneKeepingAssist: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 23, 23), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 23, 23))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AdaptiveCruiseControl: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 24, 24), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 24, 24))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = EmergencyBrakingAssist: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 25, 25), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 25, 25))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HillHoldControl: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 26, 26), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 26, 26))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HillDescentControl: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 27, 27), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 27, 27))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AutomaticLaneCentering: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 28, 28), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 28, 28))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AutomatedParking: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 29, 29), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 29, 29))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = DriverAttentionWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 30, 30), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 30, 30))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HeadwayWarning: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 31, 31), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 31, 31))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = StuckDetection: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 32, 32), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 32, 32))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForIOP: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 33, 49), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 33, 49))) + body_IntelligentVehicleRec_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForProgramSpecificUse: %d", bitstr_part(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 64, 50, 63), bitVal(body_IntelligentVehicleRec_SupportedBehaviors_buf:le_uint(), 50, 63))) + bufidx = bufidx + 8 +end +messagetable:add(0xDDD5, reportintelligentvehiclecapabilities_ddd5) + +reportintelligentvehiclecapabilitiesext_ddd9 = Proto("reportintelligentvehiclecapabilitiesext_ddd9", "ReportIntelligentVehicleCapabilitiesExt 0xddd9") +function reportintelligentvehiclecapabilitiesext_ddd9.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportIntelligentVehicleCapabilitiesExt", string.format("ReportIntelligentVehicleCapabilitiesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportIntelligentVehicleCapabilitiesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_IntelligentVehicleSeq_tree = body_tree:add("IntelligentVehicleSeq") + local body_IntelligentVehicleSeq_pv = buffer(bufidx, 1):le_uint() + local body_IntelligentVehicleSeq_pv_count = 0 + body_IntelligentVehicleSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_IntelligentVehicleSeq_IntelligentVehicleRecExt_tree = body_IntelligentVehicleSeq_tree:add("IntelligentVehicleRecExt") + local body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf = buffer(bufidx, 8) + local body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree = body_IntelligentVehicleSeq_IntelligentVehicleRecExt_tree:add(buffer(bufidx, 8), string.format("%s = SupportedBehaviors: 0x%X -- (unsigned long integer) Bit field representing the supported intelligent vehicle behaviors", bitstr(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64), body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint())) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ObstacleAvoidance: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 0, 0), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 0, 0))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverLimit: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 1, 1), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 1, 1))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RolloverLimit: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 2, 2), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 2, 2))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AntilockBrakeSystem: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 3, 3), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 3, 3))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = TractionControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 4, 4), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 4, 4))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = DifferentialLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 5, 5), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 5, 5))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = FrontSuspensionLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 6, 6), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 6, 6))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RearSuspensionLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 7, 7), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 7, 7))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ActivePitchoverControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 8, 8), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 8, 8))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ActiveRolloverControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 9, 9), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 9, 9))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ForwardCollisionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 10, 10), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 10, 10))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BlindSpotMonitoring: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 11, 11), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 11, 11))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneDepartureWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 12, 12), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 12, 12))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PedestrianDetectionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 13, 13), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 13, 13))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BackupWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 14, 14), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 14, 14))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CollisionMitigationBraking: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 15, 15), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 15, 15))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 16, 16), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 16, 16))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 17, 17), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 17, 17))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BackupAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 18, 18), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 18, 18))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneChangeAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 19, 19), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 19, 19))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneKeepingAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 20, 20), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 20, 20))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AdaptiveCruiseControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 21, 21), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 21, 21))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = EmergencyBrakingAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 22, 22), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 22, 22))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HillHoldControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 23, 23), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 23, 23))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HillDescentControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 24, 24), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 24, 24))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AutomaticLaneCentering: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 25, 25), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 25, 25))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AutomatedParking: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 26, 26), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 26, 26))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = DriverAttentionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 27, 27), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 27, 27))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HeadwayWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 28, 28), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 28, 28))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = StuckDetection: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 29, 29), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 29, 29))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForIOP: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 30, 49), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 30, 49))) + body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForProgramSpecificUse: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 64, 50, 63), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRecExt_SupportedBehaviors_buf:le_uint(), 50, 63))) + bufidx = bufidx + 8 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_tree = body_IntelligentVehicleSeq_tree:add("ObstacleAvoidanceBehaviorRec") + local body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf = buffer(bufidx, 2) + local body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_tree = body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_tree:add(buffer(bufidx, 2), string.format("%s = ObstacleAvoidanceStopMotionTypes: 0x%X -- (unsigned short integer) Bit field representing the motion types for which obstacle avoidance STOP can be activated", bitstr(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 16), body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint())) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = Teleoperation: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 16, 0, 0), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 0, 0))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = GlobalWaypoints: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 16, 1, 1), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 1, 1))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = LocalWaypoints: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 16, 2, 2), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 2, 2))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = Retrotraverse: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 16, 3, 3), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 3, 3))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = LeaderFollower: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 16, 4, 4), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 4, 4))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = ReservedForIOPUse: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 16, 5, 11), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 5, 11))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = ReservedForProgramUse: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 16, 12, 15), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceStopMotionTypes_buf:le_uint(), 12, 15))) + bufidx = bufidx + 2 + local body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf = buffer(bufidx, 2) + local body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_tree = body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_tree:add(buffer(bufidx, 2), string.format("%s = ObstacleAvoidanceDeviateMotionTypes: 0x%X -- (unsigned short integer) Bit field representing the motion types for which obstacle avoidance DEVIATE can be activated", bitstr(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 16), body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint())) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = Teleoperation: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 16, 0, 0), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 0, 0))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = GlobalWaypoints: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 16, 1, 1), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 1, 1))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = LocalWaypoints: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 16, 2, 2), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 2, 2))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = Retrotraverse: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 16, 3, 3), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 3, 3))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = LeaderFollower: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 16, 4, 4), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 4, 4))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = ReservedForIOPUse: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 16, 5, 11), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 5, 11))) + body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_tree:add(buffer(bufidx, 2), string.format("%s = ReservedForProgramUse: %d", bitstr_part(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 16, 12, 15), bitVal(body_IntelligentVehicleSeq_ObstacleAvoidanceBehaviorRec_ObstacleAvoidanceDeviateMotionTypes_buf:le_uint(), 12, 15))) + bufidx = bufidx + 2 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_PitchOverBehaviorRec_tree = body_IntelligentVehicleSeq_tree:add("PitchOverBehaviorRec") + local body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_buf = buffer(bufidx, 1) + local body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_tree = body_IntelligentVehicleSeq_PitchOverBehaviorRec_tree:add(buffer(bufidx, 1), string.format("%s = PitchOverBehaviorTypes: 0x%X -- (unsigned byte) Bit field representing the supported behaviors for pitch over", bitstr(body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_buf:le_uint(), 8), body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_buf:le_uint())) + body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_tree:add(buffer(bufidx, 1), string.format("%s = PitchoverLimit: %d", bitstr_part(body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_buf:le_uint(), 8, 0, 0), bitVal(body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_buf:le_uint(), 0, 0))) + body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_tree:add(buffer(bufidx, 1), string.format("%s = PitchoverWarning: %d", bitstr_part(body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_buf:le_uint(), 8, 1, 1), bitVal(body_IntelligentVehicleSeq_PitchOverBehaviorRec_PitchOverBehaviorTypes_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_RolloverBehaviorRec_tree = body_IntelligentVehicleSeq_tree:add("RolloverBehaviorRec") + local body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_buf = buffer(bufidx, 1) + local body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_tree = body_IntelligentVehicleSeq_RolloverBehaviorRec_tree:add(buffer(bufidx, 1), string.format("%s = RolloverBehaviorTypes: 0x%X -- (unsigned byte) Bit field representing the supported behaviors for pitch over", bitstr(body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_buf:le_uint(), 8), body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_buf:le_uint())) + body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_tree:add(buffer(bufidx, 1), string.format("%s = RolloverLimit: %d", bitstr_part(body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_buf:le_uint(), 8, 0, 0), bitVal(body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_buf:le_uint(), 0, 0))) + body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_tree:add(buffer(bufidx, 1), string.format("%s = RolloverWarning: %d", bitstr_part(body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_buf:le_uint(), 8, 1, 1), bitVal(body_IntelligentVehicleSeq_RolloverBehaviorRec_RolloverBehaviorTypes_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 +end +messagetable:add(0xDDD9, reportintelligentvehiclecapabilitiesext_ddd9) + +reportintelligentvehicleconfiguration_ddd6 = Proto("reportintelligentvehicleconfiguration_ddd6", "ReportIntelligentVehicleConfiguration 0xddd6") +function reportintelligentvehicleconfiguration_ddd6.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportIntelligentVehicleConfiguration", string.format("ReportIntelligentVehicleConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportIntelligentVehicleConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_IntelligentVehicleSeq_tree = body_tree:add("IntelligentVehicleSeq") + local body_IntelligentVehicleSeq_pv = buffer(bufidx, 2):le_uint() + local body_IntelligentVehicleSeq_pv_count = 0 + body_IntelligentVehicleSeq_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local body_IntelligentVehicleSeq_IntelligentVehicleRec_tree = body_IntelligentVehicleSeq_tree:add("IntelligentVehicleRec") + local body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf = buffer(bufidx, 8) + local body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree = body_IntelligentVehicleSeq_IntelligentVehicleRec_tree:add(buffer(bufidx, 8), string.format("%s = EnabledBehaviors: 0x%X -- (unsigned long integer) Bit field representing the supported intelligent vehicle behaviors", bitstr(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64), body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint())) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ObstacleAvoidanceBehavior: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 0, 1), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 0, 1))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverLimit: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 2, 2), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 2, 2))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 3, 3), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 3, 3))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RolloverLimit: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 4, 4), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 4, 4))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RolloverWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 5, 5), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 5, 5))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AntilockBrakeSystem: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 6, 6), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 6, 6))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = TractionControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 7, 7), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 7, 7))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = DifferentialLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 8, 8), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 8, 8))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = FrontSuspensionLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 9, 9), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 9, 9))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = RearSuspensionLock: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 10, 10), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 10, 10))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ActivePitchoverControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 11, 11), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 11, 11))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ActiveRolloverControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 12, 12), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 12, 12))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ForwardCollisionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 13, 13), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 13, 13))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BlindSpotMonitoring: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 14, 14), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 14, 14))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneDepartureWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 15, 15), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 15, 15))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = PedestrianDetectionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 16, 16), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 16, 16))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BackupWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 17, 17), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 17, 17))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CollisionMitigationBraking: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 18, 18), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 18, 18))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 19, 19), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 19, 19))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 20, 20), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 20, 20))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = BackupAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 21, 21), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 21, 21))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneChangeAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 22, 22), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 22, 22))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = LaneKeepingAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 23, 23), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 23, 23))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AdaptiveCruiseControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 24, 24), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 24, 24))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = EmergencyBrakingAssist: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 25, 25), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 25, 25))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HillHoldControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 26, 26), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 26, 26))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HillDescentControl: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 27, 27), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 27, 27))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AutomaticLaneCentering: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 28, 28), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 28, 28))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = AutomatedParking: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 29, 29), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 29, 29))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = DriverAttentionWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 30, 30), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 30, 30))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = HeadwayWarning: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 31, 31), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 31, 31))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = StuckDetection: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 32, 32), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 32, 32))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForIOP: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 33, 49), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 33, 49))) + body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForProgramSpecificUse: %d", bitstr_part(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 64, 50, 63), bitVal(body_IntelligentVehicleSeq_IntelligentVehicleRec_EnabledBehaviors_buf:le_uint(), 50, 63))) + bufidx = bufidx + 8 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_ObstacleAvoidanceStopRec_tree = body_IntelligentVehicleSeq_tree:add("ObstacleAvoidanceStopRec") + body_IntelligentVehicleSeq_ObstacleAvoidanceStopRec_tree:add(buffer(bufidx, 4), string.format("StandoffDistance: %d -- (float) The distance from the obstacle the vehicle must stop", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_ObstacleAvoidanceDeviateRec_tree = body_IntelligentVehicleSeq_tree:add("ObstacleAvoidanceDeviateRec") + body_IntelligentVehicleSeq_ObstacleAvoidanceDeviateRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %d -- (float) The distance from the path that the vehicle is allowed to deviate to navigate around an obstacle", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_ForwardCollisionWarningRec_tree = body_IntelligentVehicleSeq_tree:add("ForwardCollisionWarningRec") + body_IntelligentVehicleSeq_ForwardCollisionWarningRec_tree:add(buffer(bufidx, 4), string.format("TriggerForwardCollisionSeconds: %d -- (float) The time before a collision occurs to trigger a warning", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_LaneDepatureWarningRec_tree = body_IntelligentVehicleSeq_tree:add("LaneDepatureWarningRec") + body_IntelligentVehicleSeq_LaneDepatureWarningRec_tree:add(buffer(bufidx, 4), string.format("triggerLaneDepartureMeters: %d -- (float) A warning is generated when lane violation over this distance occurs", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_PedestrianDetectionWarningRec_tree = body_IntelligentVehicleSeq_tree:add("PedestrianDetectionWarningRec") + local value_set = {[0] = "LOW", [1] = "MEDIUM", [2] = "HIGH"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_IntelligentVehicleSeq_PedestrianDetectionWarningRec_tree:add(buffer(bufidx, 1), string.format("Sensitivity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_BackupWarningRec_tree = body_IntelligentVehicleSeq_tree:add("BackupWarningRec") + body_IntelligentVehicleSeq_BackupWarningRec_tree:add(buffer(bufidx, 4), string.format("TriggerBackupWarningMeters: %d -- (float) The distance to a rear collision which triggers the warning", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_CollisionMitigationBrakingRec_tree = body_IntelligentVehicleSeq_tree:add("CollisionMitigationBrakingRec") + body_IntelligentVehicleSeq_CollisionMitigationBrakingRec_tree:add(buffer(bufidx, 4), string.format("TriggerCollisionMitigationBrakingSeconds: %d -- (float) The time before a collision occurs to initiate automatic braking", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_BackupAssistRec_tree = body_IntelligentVehicleSeq_tree:add("BackupAssistRec") + body_IntelligentVehicleSeq_BackupAssistRec_tree:add(buffer(bufidx, 4), string.format("TriggerBackupBrakingMeters: %d -- (float) The distance to travel in reverse before automatic assist is engaged", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_LaneKeepingAssistRec_tree = body_IntelligentVehicleSeq_tree:add("LaneKeepingAssistRec") + body_IntelligentVehicleSeq_LaneKeepingAssistRec_tree:add(buffer(bufidx, 4), string.format("TerminateLaneDepartureMeters: %d -- (float) The distance to travel outside a lane before the assist is deactivated", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_AdaptiveCruiseControlRec_tree = body_IntelligentVehicleSeq_tree:add("AdaptiveCruiseControlRec") + body_IntelligentVehicleSeq_AdaptiveCruiseControlRec_tree:add(buffer(bufidx, 4), string.format("AdaptiveCruiseControlHeadwaySettings: %d -- (float) The minimum distance to maintain from the vehicle ahead", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_IntelligentVehicleSeq_AdaptiveCruiseControlRec_tree:add(buffer(bufidx, 4), string.format("adaptiveCruiseControlMinSetSpeed: %d -- (float) The minimum speed allowed", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 + if (bitAND(body_IntelligentVehicleSeq_pv, body_IntelligentVehicleSeq_pv_count) > 0) then + local body_IntelligentVehicleSeq_AutomatedParkingRec_tree = body_IntelligentVehicleSeq_tree:add("AutomatedParkingRec") + body_IntelligentVehicleSeq_AutomatedParkingRec_tree:add(buffer(bufidx, 4), string.format("StandoffDistance: %d -- (float) The minimum distance between other vehicles to maintain while parking", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_IntelligentVehicleSeq_pv_count = body_IntelligentVehicleSeq_pv_count + 1 +end +messagetable:add(0xDDD6, reportintelligentvehicleconfiguration_ddd6) + +reportintelligentvehiclestatus_ddd7 = Proto("reportintelligentvehiclestatus_ddd7", "ReportIntelligentVehicleStatus 0xddd7") +function reportintelligentvehiclestatus_ddd7.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/IntelligentVehiclePolicyManager_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportIntelligentVehicleStatus", string.format("ReportIntelligentVehicleStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportIntelligentVehicleStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_IntelligentVehicleRec_tree = body_tree:add("IntelligentVehicleRec") + local body_IntelligentVehicleRec_BehaviorStatus_buf = buffer(bufidx, 8) + local body_IntelligentVehicleRec_BehaviorStatus_tree = body_IntelligentVehicleRec_tree:add(buffer(bufidx, 8), string.format("%s = BehaviorStatus: 0x%X -- (unsigned long integer) Bit field representing the supported intelligent vehicle behaviors", bitstr(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64), body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint())) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = ObstacleAvoidanceBehavior: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 0, 1), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 0, 1))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverLimit: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 2, 2), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 2, 2))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = PitchoverWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 3, 3), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 3, 3))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = RolloverLimit: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 4, 4), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 4, 4))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = RolloverWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 5, 5), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 5, 5))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = AntilockBrakeSystem: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 6, 6), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 6, 6))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = TractionControl: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 7, 7), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 7, 7))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = DifferentialLock: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 8, 8), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 8, 8))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = FrontSuspensionLock: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 9, 9), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 9, 9))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = RearSuspensionLock: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 10, 10), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 10, 10))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = ActivePitchoverControl: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 11, 11), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 11, 11))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = ActiveRolloverControl: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 12, 12), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 12, 12))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = ForwardCollisionWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 13, 13), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 13, 13))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = BlindSpotMonitoring: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 14, 14), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 14, 14))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = LaneDepartureWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 15, 15), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 15, 15))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = PedestrianDetectionWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 16, 16), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 16, 16))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = BackupWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 17, 17), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 17, 17))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = CollisionMitigationBraking: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 18, 18), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 18, 18))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficAssist: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 19, 19), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 19, 19))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = CrossTrafficWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 20, 20), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 20, 20))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = BackupAssist: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 21, 21), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 21, 21))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = LaneChangeAssist: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 22, 22), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 22, 22))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = LaneKeepingAssist: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 23, 23), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 23, 23))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = AdaptiveCruiseControl: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 24, 24), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 24, 24))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = EmergencyBrakingAssist: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 25, 25), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 25, 25))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = HillHoldControl: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 26, 26), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 26, 26))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = HillDescentControl: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 27, 27), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 27, 27))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = AutomaticLaneCentering: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 28, 28), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 28, 28))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = AutomatedParking: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 29, 29), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 29, 29))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = DriverAttentionWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 30, 30), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 30, 30))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = HeadwayWarning: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 31, 31), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 31, 31))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = StuckDetection: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 32, 32), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 32, 32))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForIOP: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 33, 49), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 33, 49))) + body_IntelligentVehicleRec_BehaviorStatus_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForProgramSpecificUse: %d", bitstr_part(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 64, 50, 63), bitVal(body_IntelligentVehicleRec_BehaviorStatus_buf:le_uint(), 50, 63))) + bufidx = bufidx + 8 +end +messagetable:add(0xDDD7, reportintelligentvehiclestatus_ddd7) + +querylaserdesignatorcapabilities_ddb0 = Proto("querylaserdesignatorcapabilities_ddb0", "QueryLaserDesignatorCapabilities 0xddb0") +function querylaserdesignatorcapabilities_ddb0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LaserDesignator_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLaserDesignatorCapabilities", string.format("QueryLaserDesignatorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLaserDesignatorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDDB0, querylaserdesignatorcapabilities_ddb0) + +querylaserdesignatorstate_ddb1 = Proto("querylaserdesignatorstate_ddb1", "QueryLaserDesignatorState 0xddb1") +function querylaserdesignatorstate_ddb1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LaserDesignator_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLaserDesignatorState", string.format("QueryLaserDesignatorState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLaserDesignatorState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryLaserDesignatorStateList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryLaserDesignatorStateList ") + body_QueryLaserDesignatorStateList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_QueryLaserDesignatorStateList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_QueryLaserDesignatorStateList_count do + local body_QueryLaserDesignatorStateList_QueryLaserDesignatorRecord_tree = body_QueryLaserDesignatorStateList_tree:add(string.format("QueryLaserDesignatorRecord_%d", body_counter - 1)) + body_QueryLaserDesignatorStateList_QueryLaserDesignatorRecord_tree:add(buffer(bufidx, 2), string.format("ID: %d -- (unsigned short integer) ID of the laser designator to query. A value of 0 indicates all IDs are being queried.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0xDDB1, querylaserdesignatorstate_ddb1) + +setlaserdesignatorstate_ddb2 = Proto("setlaserdesignatorstate_ddb2", "SetLaserDesignatorState 0xddb2") +function setlaserdesignatorstate_ddb2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LaserDesignator_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLaserDesignatorState", string.format("SetLaserDesignatorState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLaserDesignatorState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LaserDesignatorStateRecord_tree = body_tree:add("LaserDesignatorStateRecord") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_LaserDesignatorStateRecord_tree:add(buffer(bufidx, 2), string.format("ID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Disarmed", [1] = "Armed", [2] = "Active"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LaserDesignatorStateRecord_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDDB2, setlaserdesignatorstate_ddb2) + +reportlaserdesignatorcapabilities_dda0 = Proto("reportlaserdesignatorcapabilities_dda0", "ReportLaserDesignatorCapabilities 0xdda0") +function reportlaserdesignatorcapabilities_dda0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LaserDesignator_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLaserDesignatorCapabilities", string.format("ReportLaserDesignatorCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLaserDesignatorCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ReportLaserDesignatorCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ReportLaserDesignatorCapabilitiesList ") + body_ReportLaserDesignatorCapabilitiesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_ReportLaserDesignatorCapabilitiesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_ReportLaserDesignatorCapabilitiesList_count do + local body_ReportLaserDesignatorCapabilitiesList_LaserDesignatorCapabiltiesRecord_tree = body_ReportLaserDesignatorCapabilitiesList_tree:add(string.format("LaserDesignatorCapabiltiesRecord_%d", body_counter - 1)) + body_ReportLaserDesignatorCapabilitiesList_LaserDesignatorCapabiltiesRecord_tree:add(buffer(bufidx, 4), string.format("Frequency: %d -- (float) Frequency of the laser designator.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end +end +messagetable:add(0xDDA0, reportlaserdesignatorcapabilities_dda0) + +reportlaserdesignatorstate_dda1 = Proto("reportlaserdesignatorstate_dda1", "ReportLaserDesignatorState 0xdda1") +function reportlaserdesignatorstate_dda1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LaserDesignator_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLaserDesignatorState", string.format("ReportLaserDesignatorState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLaserDesignatorState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LaserDesignatorStateList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LaserDesignatorStateList ") + body_LaserDesignatorStateList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_LaserDesignatorStateList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_LaserDesignatorStateList_count do + local body_LaserDesignatorStateList_LaserDesignatorStateRecord_tree = body_LaserDesignatorStateList_tree:add(string.format("LaserDesignatorStateRecord_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_LaserDesignatorStateList_LaserDesignatorStateRecord_tree:add(buffer(bufidx, 2), string.format("ID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Disarmed", [1] = "Armed", [2] = "Active"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LaserDesignatorStateList_LaserDesignatorStateRecord_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xDDA1, reportlaserdesignatorstate_dda1) + +confirmlaserdesignator_dda2 = Proto("confirmlaserdesignator_dda2", "ConfirmLaserDesignator 0xdda2") +function confirmlaserdesignator_dda2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LaserDesignator_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmLaserDesignator", string.format("ConfirmLaserDesignator, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmLaserDesignator")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmLaserDesignatorRecord_tree = body_tree:add("ConfirmLaserDesignatorRecord") + local body_ConfirmLaserDesignatorRecord_pv = buffer(bufidx, 1):le_uint() + local body_ConfirmLaserDesignatorRecord_pv_count = 0 + body_ConfirmLaserDesignatorRecord_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ConfirmLaserDesignatorRecord_tree:add(buffer(bufidx, 2), string.format("ID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "Disarmed", [1] = "Armed", [2] = "Active"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmLaserDesignatorRecord_tree:add(buffer(bufidx, 1), string.format("RequestedState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "Success", [1] = "InvalidTransition", [2] = "Error"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmLaserDesignatorRecord_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_ConfirmLaserDesignatorRecord_pv, body_ConfirmLaserDesignatorRecord_pv_count) > 0) then + local body_ConfirmLaserDesignatorRecord_ResponseDescription_tree = body_ConfirmLaserDesignatorRecord_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmLaserDesignatorRecord_ResponseDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_ConfirmLaserDesignatorRecord_pv_count = body_ConfirmLaserDesignatorRecord_pv_count + 1 +end +messagetable:add(0xDDA2, confirmlaserdesignator_dda2) + +setfollowerconfiguration_f103 = Proto("setfollowerconfiguration_f103", "SetFollowerConfiguration 0xf103") +function setfollowerconfiguration_f103.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetFollowerConfiguration", string.format("SetFollowerConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetFollowerConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FollowerConfigurationSeq_tree = body_tree:add("FollowerConfigurationSeq") + local body_FollowerConfigurationSeq_FollowerConfigurationRec_tree = body_FollowerConfigurationSeq_tree:add("FollowerConfigurationRec") + local body_FollowerConfigurationSeq_FollowerConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count = 0 + body_FollowerConfigurationSeq_FollowerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerConfigurationSeq_FollowerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationRec_Name_tree = body_FollowerConfigurationSeq_FollowerConfigurationRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Name[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_FollowerConfigurationSeq_FollowerConfigurationRec_Name_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MaxSpeed: %.4f (scaled) -- (unsigned short integer) Maximum speed the group is expected to achieve", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count + 1 + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_tree = body_FollowerConfigurationSeq_tree:add("FollowerConfigurationTypeVar") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FollowerConfigurationSeq_index == 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_tree:add("AutomaticFormationSeq") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_AutomaticFormationRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_tree:add("AutomaticFormationRec") + local value_set = {[0] = "Column", [1] = "InvertedT", [2] = "StaggeredColumn"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_AutomaticFormationRec_tree:add(buffer(bufidx, 1), string.format("Formation: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local bufidx_start_body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq = bufidx + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_tree:add(buffer(bufidx_start_body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq, buffer:len() - bufidx_start_body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq), "FollowerParticipantList ") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_counter=1,body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_count do + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_tree:add(string.format("FollowerParticipantRec_%d", body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_counter - 1)) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = 0 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("VehicleID: %d -- (unsigned short integer) Subsystem ID of the follower being configured", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("%s = FollowerErrorBehavior: 0x%X ", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowingError: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LeaderFailureError: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 2, 3))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromLeader: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 4, 6), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 4, 6))) + bufidx = bufidx + 1 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("%s = LeaderErrorBehavior: 0x%X -- (unsigned byte) Error behavior desired for the leader. This value is expected to be passed to the leader via LeaderManagement::RegisterFollower", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowerCompromised: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromFollower: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 2, 3))) + bufidx = bufidx + 1 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Roll_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Pitch_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Heading_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + end + end + if (body_FollowerConfigurationSeq_index == 1) then + local bufidx_start_body_FollowerConfigurationSeq_FollowerConfigurationTypeVar = bufidx + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_tree:add(buffer(bufidx_start_body_FollowerConfigurationSeq_FollowerConfigurationTypeVar, buffer:len() - bufidx_start_body_FollowerConfigurationSeq_FollowerConfigurationTypeVar), "ManualFormationList ") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_counter=1,body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_count do + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_tree:add(string.format("FollowerParticipantSeq_%d", body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_counter - 1)) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv = buffer(bufidx, 1):le_uint() + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count = 0 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add("FollowerParticipantRec") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = 0 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("VehicleID: %d -- (unsigned short integer) Subsystem ID of the follower being configured", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("%s = FollowerErrorBehavior: 0x%X ", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowingError: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LeaderFailureError: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 2, 3))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromLeader: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 4, 6), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 4, 6))) + bufidx = bufidx + 1 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("%s = LeaderErrorBehavior: 0x%X -- (unsigned byte) Error behavior desired for the leader. This value is expected to be passed to the leader via LeaderManagement::RegisterFollower", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowerCompromised: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromFollower: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 2, 3))) + bufidx = bufidx + 1 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Roll_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Pitch_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Heading_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add("FollowGapSeq") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_tree:add("FollowGapLeaderID") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_index == 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree:add("LeaderByJausIDRec") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf = buffer(bufidx, 4) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Pose Sensor Service hosted on the leader", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 0, 7))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 8, 15))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_index == 1) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree:add("LeaderByContactID") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf = buffer(bufidx, 4) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Contact Sensor Service from which the ContactID was assigned", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 0, 7))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 8, 15))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to be followed. A value of zero (0) is not allowed.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_index == 2) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_Empty_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree:add("Empty-- The leader is not specified by a JAUS ID nor a Contact ID. The leader is assumed to be known a priori by the implementation") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_Empty_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_tree:add("FollowGapRec") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = 0 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 4, [1] = 4} + local unit_set = {[0] = "second", [1] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0} + local bias_set_tabe = {[0] = 0, [1] = 0} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local IdealFollowTarget_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("IdealFollowTarget: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + IdealFollowTarget_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local IdealFollowTarget_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("IdealFollowTarget: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + IdealFollowTarget_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local IdealFollowTarget_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("IdealFollowTarget: %d %s", value, unit_list(type_value))) + IdealFollowTarget_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 4), string.format("MinimumFollowTime: %.4f (scaled) -- (unsigned integer) Minimum time that the follower must maintain behind the leader or an error condition is triggered", buffer(bufidx, 4):le_uint() * 0.000000838190 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 4), string.format("MaximumFollowTime: %.4f (scaled) -- (unsigned integer) Maximum time that the follower must maintain behind the leader or an error condition is triggered", buffer(bufidx, 4):le_uint() * 0.000000838190 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 4), string.format("MinimumFollowDistance: %.4f (scaled) -- (unsigned integer) Minimum distance that the follower must maintain behind the leader or an error condition is triggered", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 4), string.format("MaximumFollowDistance: %.4f (scaled) -- (unsigned integer) Maximum distance that the follower must maintain behind the leader or an error condition is triggered", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 2), string.format("MaxCatchUpSpeed: %.4f (scaled) -- (unsigned short integer) Maximum speed the follower is allowed to achieve to close a gap", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add("LateralGapSeq") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_tree:add("LateralGapLeaderID") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_index == 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree:add("LeaderByJausIDRec") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf = buffer(bufidx, 4) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Pose Sensor Service hosted on the leader", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 0, 7))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 8, 15))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_index == 1) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree:add("LeaderByContactID") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf = buffer(bufidx, 4) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Contact Sensor Service from which the ContactID was assigned", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 0, 7))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 8, 15))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to be followed. A value of zero (0) is not allowed.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_index == 2) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_Empty_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree:add("Empty-- The leader is not specified by a JAUS ID nor a Contact ID. The leader is assumed to be known a priori by the implementation") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_Empty_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_tree:add("LateralGapRec") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv_count = 0 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_tree:add(buffer(bufidx, 4), string.format("LateralOffset: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_tree:add(buffer(bufidx, 4), string.format("MaxLateralError: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv_count + 1 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add("VerticalPosSeq") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv = buffer(bufidx, 1):le_uint() + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv_count = 0 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_tree:add("VerticalPosRec") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv_count = 0 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local VerticalPos_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("VerticalPos: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + VerticalPos_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local VerticalPos_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("VerticalPos: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + VerticalPos_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local VerticalPos_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("VerticalPos: %d %s", value, unit_list(type_value))) + VerticalPos_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv_count) > 0) then + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx, 4), string.format("MaxVerticalError: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv_count + 1 + if (bitAND(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv, body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv_count) > 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_tree:add("VerticalGapLeaderID-- ID of the leader from which the gap is being measured when 'Relative' offset is used") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_index == 0) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree:add("LeaderByJausIDRec") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf = buffer(bufidx, 4) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Pose Sensor Service hosted on the leader", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 0, 7))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 8, 15))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_index == 1) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree:add("LeaderByContactID") + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf = buffer(bufidx, 4) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Contact Sensor Service from which the ContactID was assigned", bitstr(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32), body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint())) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 0, 7))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 8, 15))) + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to be followed. A value of zero (0) is not allowed.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + if (body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_index == 2) then + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_Empty_tree = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree:add("Empty-- The leader is not specified by a JAUS ID nor a Contact ID. The leader is assumed to be known a priori by the implementation") + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_Empty_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv_count + 1 + end + body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count = body_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count + 1 + end + end +end +messagetable:add(0xF103, setfollowerconfiguration_f103) + +queryfollowerstate_f104 = Proto("queryfollowerstate_f104", "QueryFollowerState 0xf104") +function queryfollowerstate_f104.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFollowerState", string.format("QueryFollowerState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFollowerState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryFollowerStateRec_tree = body_tree:add("QueryFollowerStateRec") + body_QueryFollowerStateRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d -- (unsigned byte) ID of the group to be reported. A value of zero (0) returns all known groups", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF104, queryfollowerstate_f104) + +queryfollowercapabilities_f105 = Proto("queryfollowercapabilities_f105", "QueryFollowerCapabilities 0xf105") +function queryfollowercapabilities_f105.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFollowerCapabilities", string.format("QueryFollowerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFollowerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF105, queryfollowercapabilities_f105) + +queryfollowerconfigurationext_f10a = Proto("queryfollowerconfigurationext_f10a", "QueryFollowerConfigurationExt 0xf10a") +function queryfollowerconfigurationext_f10a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFollowerConfigurationExt", string.format("QueryFollowerConfigurationExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFollowerConfigurationExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryFollowerConfigRec_tree = body_tree:add("QueryFollowerConfigRec") + body_QueryFollowerConfigRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d -- (unsigned byte) ID of the group to be reported. A value of zero (0) returns all known groups", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF10A, queryfollowerconfigurationext_f10a) + +setfollowerstate_f110 = Proto("setfollowerstate_f110", "SetFollowerState 0xf110") +function setfollowerstate_f110.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetFollowerState", string.format("SetFollowerState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetFollowerState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FollowerStateRec_tree = body_tree:add("FollowerStateRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerStateRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "STOP", [1] = "START"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerStateRec_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xF110, setfollowerstate_f110) + +removefollowerconfiguration_f112 = Proto("removefollowerconfiguration_f112", "RemoveFollowerConfiguration 0xf112") +function removefollowerconfiguration_f112.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RemoveFollowerConfiguration", string.format("RemoveFollowerConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RemoveFollowerConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FollowerRec_tree = body_tree:add("FollowerRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xF112, removefollowerconfiguration_f112) + +reportfollowerconfigurationext_f10b = Proto("reportfollowerconfigurationext_f10b", "ReportFollowerConfigurationExt 0xf10b") +function reportfollowerconfigurationext_f10b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFollowerConfigurationExt", string.format("ReportFollowerConfigurationExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFollowerConfigurationExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_FollowerGroupList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "FollowerGroupList ") + body_FollowerGroupList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_FollowerGroupList_count do + local body_FollowerGroupList_FollowerConfigurationSeq_tree = body_FollowerGroupList_tree:add(string.format("FollowerConfigurationSeq_%d", body_counter - 1)) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_tree:add("FollowerConfigurationRec") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count = 0 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_Name_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Name[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_Name_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_tree:add(buffer(bufidx, 2), string.format("MaxSpeed: %.4f (scaled) -- (unsigned short integer) Maximum speed the group is expected to achieve", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationRec_pv_count + 1 + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_tree = body_FollowerGroupList_FollowerConfigurationSeq_tree:add("FollowerConfigurationTypeVar") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FollowerGroupList_FollowerConfigurationSeq_index == 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_tree:add("AutomaticFormationSeq") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_AutomaticFormationRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_tree:add("AutomaticFormationRec") + local value_set = {[0] = "Column", [1] = "InvertedT", [2] = "StaggeredColumn"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_AutomaticFormationRec_tree:add(buffer(bufidx, 1), string.format("Formation: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local bufidx_start_body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq = bufidx + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_tree:add(buffer(bufidx_start_body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq, buffer:len() - bufidx_start_body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq), "FollowerParticipantList ") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_counter=1,body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_count do + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_tree:add(string.format("FollowerParticipantRec_%d", body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_counter - 1)) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = 0 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("VehicleID: %d -- (unsigned short integer) Subsystem ID of the follower being configured", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("%s = FollowerErrorBehavior: 0x%X ", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowingError: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LeaderFailureError: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 2, 3))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromLeader: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 4, 6), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 4, 6))) + bufidx = bufidx + 1 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("%s = LeaderErrorBehavior: 0x%X -- (unsigned byte) Error behavior desired for the leader. This value is expected to be passed to the leader via LeaderManagement::RegisterFollower", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowerCompromised: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromFollower: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 2, 3))) + bufidx = bufidx + 1 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Roll_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Pitch_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Heading_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_AutomaticFormationSeq_FollowerParticipantList_FollowerParticipantRec_pv_count + 1 + end + end + if (body_FollowerGroupList_FollowerConfigurationSeq_index == 1) then + local bufidx_start_body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar = bufidx + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_tree:add(buffer(bufidx_start_body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar, buffer:len() - bufidx_start_body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar), "ManualFormationList ") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_counter=1,body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_count do + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_tree:add(string.format("FollowerParticipantSeq_%d", body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_counter - 1)) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv = buffer(bufidx, 1):le_uint() + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count = 0 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add("FollowerParticipantRec") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = 0 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("VehicleID: %d -- (unsigned short integer) Subsystem ID of the follower being configured", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("%s = FollowerErrorBehavior: 0x%X ", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowingError: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LeaderFailureError: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 2, 3))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromLeader: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 8, 4, 6), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_FollowerErrorBehavior_buf:le_uint(), 4, 6))) + bufidx = bufidx + 1 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 1), string.format("%s = LeaderErrorBehavior: 0x%X -- (unsigned byte) Error behavior desired for the leader. This value is expected to be passed to the leader via LeaderManagement::RegisterFollower", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowerCompromised: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromFollower: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_LeaderErrorBehavior_buf:le_uint(), 2, 3))) + bufidx = bufidx + 1 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Roll_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Pitch_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_tree:add(buffer(bufidx, 2), string.format("Max_Heading_Error: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowerParticipantRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add("FollowGapSeq") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_tree:add("FollowGapLeaderID") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_index == 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree:add("LeaderByJausIDRec") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf = buffer(bufidx, 4) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Pose Sensor Service hosted on the leader", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 0, 7))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 8, 15))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_index == 1) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree:add("LeaderByContactID") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf = buffer(bufidx, 4) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Contact Sensor Service from which the ContactID was assigned", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 0, 7))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 8, 15))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to be followed. A value of zero (0) is not allowed.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_index == 2) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_Empty_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_tree:add("Empty-- The leader is not specified by a JAUS ID nor a Contact ID. The leader is assumed to be known a priori by the implementation") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_Empty_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapLeaderID_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_tree:add("FollowGapRec") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = 0 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 4, [1] = 4} + local unit_set = {[0] = "second", [1] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0} + local bias_set_tabe = {[0] = 0, [1] = 0} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local IdealFollowTarget_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("IdealFollowTarget: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + IdealFollowTarget_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local IdealFollowTarget_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("IdealFollowTarget: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + IdealFollowTarget_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local IdealFollowTarget_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("IdealFollowTarget: %d %s", value, unit_list(type_value))) + IdealFollowTarget_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 4), string.format("MinimumFollowTime: %.4f (scaled) -- (unsigned integer) Minimum time that the follower must maintain behind the leader or an error condition is triggered", buffer(bufidx, 4):le_uint() * 0.000000838190 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 4), string.format("MaximumFollowTime: %.4f (scaled) -- (unsigned integer) Maximum time that the follower must maintain behind the leader or an error condition is triggered", buffer(bufidx, 4):le_uint() * 0.000000838190 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 4), string.format("MinimumFollowDistance: %.4f (scaled) -- (unsigned integer) Minimum distance that the follower must maintain behind the leader or an error condition is triggered", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 4), string.format("MaximumFollowDistance: %.4f (scaled) -- (unsigned integer) Maximum distance that the follower must maintain behind the leader or an error condition is triggered", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_tree:add(buffer(bufidx, 2), string.format("MaxCatchUpSpeed: %.4f (scaled) -- (unsigned short integer) Maximum speed the follower is allowed to achieve to close a gap", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_FollowGapSeq_FollowGapRec_pv_count + 1 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add("LateralGapSeq") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_tree:add("LateralGapLeaderID") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_index == 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree:add("LeaderByJausIDRec") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf = buffer(bufidx, 4) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Pose Sensor Service hosted on the leader", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 0, 7))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 8, 15))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_index == 1) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree:add("LeaderByContactID") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf = buffer(bufidx, 4) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Contact Sensor Service from which the ContactID was assigned", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 0, 7))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 8, 15))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to be followed. A value of zero (0) is not allowed.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_index == 2) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_Empty_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_tree:add("Empty-- The leader is not specified by a JAUS ID nor a Contact ID. The leader is assumed to be known a priori by the implementation") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_Empty_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapLeaderID_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_tree:add("LateralGapRec") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv_count = 0 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_tree:add(buffer(bufidx, 4), string.format("LateralOffset: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_tree:add(buffer(bufidx, 4), string.format("MaxLateralError: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_LateralGapSeq_LateralGapRec_pv_count + 1 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_tree:add("VerticalPosSeq") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv = buffer(bufidx, 1):le_uint() + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv_count = 0 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_tree:add("VerticalPosRec") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv_count = 0 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local VerticalPos_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("VerticalPos: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + VerticalPos_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local VerticalPos_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("VerticalPos: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + VerticalPos_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local VerticalPos_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("VerticalPos: %d %s", value, unit_list(type_value))) + VerticalPos_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv_count) > 0) then + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_tree:add(buffer(bufidx, 4), string.format("MaxVerticalError: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalPosRec_pv_count + 1 + if (bitAND(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv, body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv_count) > 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_tree:add("VerticalGapLeaderID-- ID of the leader from which the gap is being measured when 'Relative' offset is used") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_index == 0) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree:add("LeaderByJausIDRec") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf = buffer(bufidx, 4) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Pose Sensor Service hosted on the leader", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 0, 7))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 8, 15))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByJausIDRec_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_index == 1) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree:add("LeaderByContactID") + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf = buffer(bufidx, 4) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 4), string.format("%s = JausID: 0x%X -- (unsigned integer) JAUS ID of a Global Contact Sensor Service from which the ContactID was assigned", bitstr(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32), body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint())) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 0, 7))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 8, 15))) + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_JausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_LeaderByContactID_tree:add(buffer(bufidx, 2), string.format("ContactID: %d -- (unsigned short integer) ID of the contact to be followed. A value of zero (0) is not allowed.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + if (body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_index == 2) then + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_Empty_tree = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_tree:add("Empty-- The leader is not specified by a JAUS ID nor a Contact ID. The leader is assumed to be known a priori by the implementation") + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_Empty_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_VerticalGapLeaderID_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_VerticalPosSeq_pv_count + 1 + end + body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count = body_FollowerGroupList_FollowerConfigurationSeq_FollowerConfigurationTypeVar_ManualFormationList_FollowerParticipantSeq_pv_count + 1 + end + end + end +end +messagetable:add(0xF10B, reportfollowerconfigurationext_f10b) + +reportfollowerstate_f108 = Proto("reportfollowerstate_f108", "ReportFollowerState 0xf108") +function reportfollowerstate_f108.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFollowerState", string.format("ReportFollowerState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFollowerState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_FollowerStateList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "FollowerStateList ") + body_FollowerStateList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_FollowerStateList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_FollowerStateList_count do + local body_FollowerStateList_FollowerStateRec_tree = body_FollowerStateList_tree:add(string.format("FollowerStateRec_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "STOP", [1] = "START_Running", [2] = "START_FormingUp"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerStateList_FollowerStateRec_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xF108, reportfollowerstate_f108) + +reportfollowercapabilities_f109 = Proto("reportfollowercapabilities_f109", "ReportFollowerCapabilities 0xf109") +function reportfollowercapabilities_f109.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFollowerCapabilities", string.format("ReportFollowerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFollowerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_CapabilitiesRec_tree = body_tree:add("CapabilitiesRec") + local body_CapabilitiesRec_SupportedFormationTypes_buf = buffer(bufidx, 1) + local body_CapabilitiesRec_SupportedFormationTypes_tree = body_CapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedFormationTypes: 0x%X ", bitstr(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 8), body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint())) + body_CapabilitiesRec_SupportedFormationTypes_tree:add(buffer(bufidx, 1), string.format("%s = ManuallySpecified: %d", bitstr_part(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 8, 3, 3), bitVal(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 3, 3))) + body_CapabilitiesRec_SupportedFormationTypes_tree:add(buffer(bufidx, 1), string.format("%s = Column: %d", bitstr_part(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 8, 0, 0), bitVal(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 0, 0))) + body_CapabilitiesRec_SupportedFormationTypes_tree:add(buffer(bufidx, 1), string.format("%s = InvertedT: %d", bitstr_part(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 8, 1, 1), bitVal(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 1, 1))) + body_CapabilitiesRec_SupportedFormationTypes_tree:add(buffer(bufidx, 1), string.format("%s = StaggeredColumn: %d", bitstr_part(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 8, 2, 2), bitVal(body_CapabilitiesRec_SupportedFormationTypes_buf:le_uint(), 2, 2))) + bufidx = bufidx + 1 +end +messagetable:add(0xF109, reportfollowercapabilities_f109) + +setfollowerconfigurationresponse_f111 = Proto("setfollowerconfigurationresponse_f111", "SetFollowerConfigurationResponse 0xf111") +function setfollowerconfigurationresponse_f111.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderFollowerDriver_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetFollowerConfigurationResponse", string.format("SetFollowerConfigurationResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetFollowerConfigurationResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ResponseRec_tree = body_tree:add("ResponseRec") + body_ResponseRec_tree:add(buffer(bufidx, 1), string.format("GroupID: %d -- (unsigned byte) ID of the group", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "FAILED_BAD_FORMATION", [2] = "FAILED_BAD_STRUCTURE", [3] = "FAILED_UNSUPPORTED", [4] = "FAILED_GAP_TOO_LARGE", [5] = "FAILED_GAP_TOO_SMALL", [6] = "GROUP_ID_NOT_FOUND"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xF111, setfollowerconfigurationresponse_f111) + +queryfollowers_ffd3 = Proto("queryfollowers_ffd3", "QueryFollowers 0xffd3") +function queryfollowers_ffd3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderManagement_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFollowers", string.format("QueryFollowers, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFollowers")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFFD3, queryfollowers_ffd3) + +queryfollowersext_ffcf = Proto("queryfollowersext_ffcf", "QueryFollowersExt 0xffcf") +function queryfollowersext_ffcf.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderManagement_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryFollowersExt", string.format("QueryFollowersExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryFollowersExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFFCF, queryfollowersext_ffcf) + +registerfollower_ffd2 = Proto("registerfollower_ffd2", "RegisterFollower 0xffd2") +function registerfollower_ffd2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderManagement_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RegisterFollower", string.format("RegisterFollower, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RegisterFollower")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RegisterFollowerRec_tree = body_tree:add("RegisterFollowerRec") + local value_set = {[0] = "CONNECT", [1] = "DISCONNECT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RegisterFollowerRec_tree:add(buffer(bufidx, 1), string.format("RequestType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFFD2, registerfollower_ffd2) + +registerfollowerext_ffd6 = Proto("registerfollowerext_ffd6", "RegisterFollowerExt 0xffd6") +function registerfollowerext_ffd6.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderManagement_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RegisterFollowerExt", string.format("RegisterFollowerExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RegisterFollowerExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RegisterFollowerRecExt_tree = body_tree:add("RegisterFollowerRecExt") + local body_RegisterFollowerRecExt_pv = buffer(bufidx, 1):le_uint() + local body_RegisterFollowerRecExt_pv_count = 0 + body_RegisterFollowerRecExt_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "CONNECT", [1] = "DISCONNECT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RegisterFollowerRecExt_tree:add(buffer(bufidx, 1), string.format("RequestType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_RegisterFollowerRecExt_pv, body_RegisterFollowerRecExt_pv_count) > 0) then + local body_RegisterFollowerRecExt_LeaderErrorBehavior_buf = buffer(bufidx, 1) + local body_RegisterFollowerRecExt_LeaderErrorBehavior_tree = body_RegisterFollowerRecExt_tree:add(buffer(bufidx, 1), string.format("%s = LeaderErrorBehavior: 0x%X -- (unsigned byte) Error behavior desired for the leader. This value is expected to be passed to the leader via LeaderManagement::RegisterFollower", bitstr(body_RegisterFollowerRecExt_LeaderErrorBehavior_buf:le_uint(), 8), body_RegisterFollowerRecExt_LeaderErrorBehavior_buf:le_uint())) + body_RegisterFollowerRecExt_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowerCompromised: %d", bitstr_part(body_RegisterFollowerRecExt_LeaderErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_RegisterFollowerRecExt_LeaderErrorBehavior_buf:le_uint(), 0, 1))) + body_RegisterFollowerRecExt_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromFollower: %d", bitstr_part(body_RegisterFollowerRecExt_LeaderErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_RegisterFollowerRecExt_LeaderErrorBehavior_buf:le_uint(), 2, 3))) + bufidx = bufidx + 1 + end + body_RegisterFollowerRecExt_pv_count = body_RegisterFollowerRecExt_pv_count + 1 +end +messagetable:add(0xFFD6, registerfollowerext_ffd6) + +requestspeedoverride_ffd1 = Proto("requestspeedoverride_ffd1", "RequestSpeedOverride 0xffd1") +function requestspeedoverride_ffd1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderManagement_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestSpeedOverride", string.format("RequestSpeedOverride, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestSpeedOverride")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_OverrideType_tree = body_tree:add("OverrideType") + body_OverrideType_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_index == 0) then + local body_OverrideType_PercentRec_tree = body_OverrideType_tree:add("PercentRec") + body_OverrideType_PercentRec_tree:add(buffer(bufidx, 1), string.format("SpeedOverride: %.4f (scaled) -- (unsigned byte) Percent.", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + if (body_index == 1) then + local body_OverrideType_AbsoluteRec_tree = body_OverrideType_tree:add("AbsoluteRec") + body_OverrideType_AbsoluteRec_tree:add(buffer(bufidx, 2), string.format("SpeedOverride: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0xFFD1, requestspeedoverride_ffd1) + +reportfollowers_ffd4 = Proto("reportfollowers_ffd4", "ReportFollowers 0xffd4") +function reportfollowers_ffd4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderManagement_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFollowers", string.format("ReportFollowers, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFollowers")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_FollowerList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "FollowerList ") + body_FollowerList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_FollowerList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_FollowerList_count do + local body_FollowerList_FollowerRec_tree = body_FollowerList_tree:add(string.format("FollowerRec_%d", body_counter - 1)) + local body_FollowerList_FollowerRec_Follower_ID_buf = buffer(bufidx, 4) + local body_FollowerList_FollowerRec_Follower_ID_tree = body_FollowerList_FollowerRec_tree:add(buffer(bufidx, 4), string.format("%s = Follower_ID: 0x%X ", bitstr(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 32), body_FollowerList_FollowerRec_Follower_ID_buf:le_uint())) + body_FollowerList_FollowerRec_Follower_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 0, 7))) + body_FollowerList_FollowerRec_Follower_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 8, 15))) + body_FollowerList_FollowerRec_Follower_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end +end +messagetable:add(0xFFD4, reportfollowers_ffd4) + +reportfollowersext_ffd0 = Proto("reportfollowersext_ffd0", "ReportFollowersExt 0xffd0") +function reportfollowersext_ffd0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderManagement_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportFollowersExt", string.format("ReportFollowersExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportFollowersExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_FollowerList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "FollowerList ") + body_FollowerList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_FollowerList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_FollowerList_count do + local body_FollowerList_FollowerRec_tree = body_FollowerList_tree:add(string.format("FollowerRec_%d", body_counter - 1)) + local body_FollowerList_FollowerRec_pv = buffer(bufidx, 1):le_uint() + local body_FollowerList_FollowerRec_pv_count = 0 + body_FollowerList_FollowerRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_FollowerList_FollowerRec_Follower_ID_buf = buffer(bufidx, 4) + local body_FollowerList_FollowerRec_Follower_ID_tree = body_FollowerList_FollowerRec_tree:add(buffer(bufidx, 4), string.format("%s = Follower_ID: 0x%X ", bitstr(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 32), body_FollowerList_FollowerRec_Follower_ID_buf:le_uint())) + body_FollowerList_FollowerRec_Follower_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 32, 0, 7), bitVal(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 0, 7))) + body_FollowerList_FollowerRec_Follower_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 32, 8, 15), bitVal(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 8, 15))) + body_FollowerList_FollowerRec_Follower_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 32, 16, 31), bitVal(body_FollowerList_FollowerRec_Follower_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + if (bitAND(body_FollowerList_FollowerRec_pv, body_FollowerList_FollowerRec_pv_count) > 0) then + local body_FollowerList_FollowerRec_LeaderErrorBehavior_buf = buffer(bufidx, 1) + local body_FollowerList_FollowerRec_LeaderErrorBehavior_tree = body_FollowerList_FollowerRec_tree:add(buffer(bufidx, 1), string.format("%s = LeaderErrorBehavior: 0x%X -- (unsigned byte) Error behavior desired for the leader. This value is expected to be passed to the leader via LeaderManagement::RegisterFollower", bitstr(body_FollowerList_FollowerRec_LeaderErrorBehavior_buf:le_uint(), 8), body_FollowerList_FollowerRec_LeaderErrorBehavior_buf:le_uint())) + body_FollowerList_FollowerRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = FollowerCompromised: %d", bitstr_part(body_FollowerList_FollowerRec_LeaderErrorBehavior_buf:le_uint(), 8, 0, 1), bitVal(body_FollowerList_FollowerRec_LeaderErrorBehavior_buf:le_uint(), 0, 1))) + body_FollowerList_FollowerRec_LeaderErrorBehavior_tree:add(buffer(bufidx, 1), string.format("%s = LostCommsFromFollower: %d", bitstr_part(body_FollowerList_FollowerRec_LeaderErrorBehavior_buf:le_uint(), 8, 2, 3), bitVal(body_FollowerList_FollowerRec_LeaderErrorBehavior_buf:le_uint(), 2, 3))) + bufidx = bufidx + 1 + end + body_FollowerList_FollowerRec_pv_count = body_FollowerList_FollowerRec_pv_count + 1 + if (bitAND(body_FollowerList_FollowerRec_pv, body_FollowerList_FollowerRec_pv_count) > 0) then + body_FollowerList_FollowerRec_tree:add(buffer(bufidx, 1), string.format("CurrentSpeedOverridePercent: %.4f (scaled) -- (unsigned byte) Current speed override percentage requested by the follower", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_FollowerList_FollowerRec_pv_count = body_FollowerList_FollowerRec_pv_count + 1 + if (bitAND(body_FollowerList_FollowerRec_pv, body_FollowerList_FollowerRec_pv_count) > 0) then + body_FollowerList_FollowerRec_tree:add(buffer(bufidx, 2), string.format("CurrentSpeedOverrideAbsolute: %.4f (scaled) -- (unsigned short integer) Current absolute speed override requested by the follower", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_FollowerList_FollowerRec_pv_count = body_FollowerList_FollowerRec_pv_count + 1 + end +end +messagetable:add(0xFFD0, reportfollowersext_ffd0) + +registerfollowerresponse_ffd5 = Proto("registerfollowerresponse_ffd5", "RegisterFollowerResponse 0xffd5") +function registerfollowerresponse_ffd5.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LeaderManagement_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RegisterFollowerResponse", string.format("RegisterFollowerResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RegisterFollowerResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_FollowerResponseRec_tree = body_tree:add("FollowerResponseRec") + local value_set = {[0] = "CONNECTED", [1] = "DISCONNECTED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_FollowerResponseRec_tree:add(buffer(bufidx, 1), string.format("Result: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_FollowerResponseRec_tree:add(buffer(bufidx, 1), string.format("Timeout: %d -- (unsigned byte) The follower must resend a Register request before the timeout elapses; otherwise, the leader may consider the follower as having disconnected.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xFFD5, registerfollowerresponse_ffd5) + +setloadingspecifications_cb21 = Proto("setloadingspecifications_cb21", "SetLoadingSpecifications 0xcb21") +function setloadingspecifications_cb21.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LoadingSpecifications_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLoadingSpecifications", string.format("SetLoadingSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLoadingSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoadingSpecificationsList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoadingSpecificationsList ") + body_LoadingSpecificationsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoadingSpecificationsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoadingSpecificationsList_count do + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree = body_LoadingSpecificationsList_tree:add(string.format("LoadingSpecificationsSeq_%d", body_counter - 1)) + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv = buffer(bufidx, 1):le_uint() + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count = 0 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree:add("LoadingSpecificationsRec") + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv = buffer(bufidx, 1):le_uint() + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = 0 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("loadID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("vehicleLoad: %d -- (float) Weight of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadHeight: %d -- (float) Height of the load, measured along the host vehicle coordinate frame Z axis", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadWidth: %d -- (float) Width of the load, measured along the host vehicle coordinate frame Y axis", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadLength: %d -- (float) Length of the load, measured along the host vehicle coordinate frame X axis", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadGeometricCenterX: %d -- (float) Distance along the X axis from the host vehicle coordinate frame to the geometric center of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadGeometricCenterY: %d -- (float) Distance along the Y axis from the host vehicle coordinate frame to the geometric center of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadGeometricCenterZ: %d -- (float) Distance along the Z axis from the host vehicle coordinate frame to the geometric center of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadCenterOfGravityX: %d -- (float) Distance along the X axis from the host vehicle coordinate frame to the center of the gravity of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadCenterOfGravityY: %d -- (float) Distance along the Y axis from the host vehicle coordinate frame to the center of the gravity of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadCenterOfGravityZ: %d -- (float) Distance along the Z axis from the host vehicle coordinate frame to the center of the gravity of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count) > 0) then + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf = buffer(bufidx, 4) + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("%s = PoseSensorJausId: 0x%X -- (unsigned integer) JAUS ID of a Global or Local Pose Sensor associated with this load. This can be used in place of the Report Loading Status message to get position and orientation information from the load.", bitstr(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 32), body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint())) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 32, 0, 7), bitVal(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 0, 7))) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 32, 8, 15), bitVal(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 8, 15))) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 32, 16, 31), bitVal(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count) > 0) then + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree:add("HitchSpecificationsRec") + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv = buffer(bufidx, 1):le_uint() + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count = 0 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "HostVehicle"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("connectedLoadID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("hitchX: %d -- (float) Distance along the X axis from the host vehicle coordinate frame to the hitch point", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("hitchY: %d -- (float) Distance along the Y axis from the host vehicle coordinate frame to the hitch point", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("hitchZ: %d -- (float) Distance along the Z axis from the host vehicle coordinate frame to the hitch point", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 2), string.format("MinimumRelativeHitchAngle: %.4f (scaled) -- (unsigned short integer) Minimum supported value of the hitch angle, using a Z-down coordinate frame. For fixed loads, this value will always be zero.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 2), string.format("MaximumRelativeHitchAngle: %.4f (scaled) -- (unsigned short integer) Maximum supported value of the hitch angle, using a Z-down coordinate frame. For fixed loads, this value will always be zero.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count + 1 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count) > 0) then + local bufidx_start_body_LoadingSpecificationsList_LoadingSpecificationsSeq = bufidx + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree:add(buffer(bufidx_start_body_LoadingSpecificationsList_LoadingSpecificationsSeq, buffer:len() - bufidx_start_body_LoadingSpecificationsList_LoadingSpecificationsSeq), "AxleSpecificationsList ") + body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_LoadingSpecificationsList_LoadingSpecificationsSeq_counter=1,body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_count do + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_AxleSpecificationsRec_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_tree:add(string.format("AxleSpecificationsRec_%d", body_LoadingSpecificationsList_LoadingSpecificationsSeq_counter - 1)) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_AxleSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("axleX: %d -- (float) Distance along the X axis from the host vehicle coordinate frame to the center of the axle", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_AxleSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("numberOfWheels: %d -- (unsigned byte) Total number of wheels associated with this axle. It is expected to be symmetric, such that half this number are on the left and half on the right.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count + 1 + end +end +messagetable:add(0xCB21, setloadingspecifications_cb21) + +queryloadingspecifications_cb22 = Proto("queryloadingspecifications_cb22", "QueryLoadingSpecifications 0xcb22") +function queryloadingspecifications_cb22.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LoadingSpecifications_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLoadingSpecifications", string.format("QueryLoadingSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLoadingSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xCB22, queryloadingspecifications_cb22) + +queryloadingstatus_cb23 = Proto("queryloadingstatus_cb23", "QueryLoadingStatus 0xcb23") +function queryloadingstatus_cb23.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LoadingSpecifications_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLoadingStatus", string.format("QueryLoadingStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLoadingStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xCB23, queryloadingstatus_cb23) + +reportloadingspecifications_cb24 = Proto("reportloadingspecifications_cb24", "ReportLoadingSpecifications 0xcb24") +function reportloadingspecifications_cb24.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LoadingSpecifications_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLoadingSpecifications", string.format("ReportLoadingSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLoadingSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoadingSpecificationsList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoadingSpecificationsList ") + body_LoadingSpecificationsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoadingSpecificationsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoadingSpecificationsList_count do + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree = body_LoadingSpecificationsList_tree:add(string.format("LoadingSpecificationsSeq_%d", body_counter - 1)) + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv = buffer(bufidx, 1):le_uint() + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count = 0 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree:add("LoadingSpecificationsRec") + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv = buffer(bufidx, 1):le_uint() + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = 0 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("loadID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("vehicleLoad: %d -- (float) Weight of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadHeight: %d -- (float) Height of the load, measured along the host vehicle coordinate frame Z axis", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadWidth: %d -- (float) Width of the load, measured along the host vehicle coordinate frame Y axis", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadLength: %d -- (float) Length of the load, measured along the host vehicle coordinate frame X axis", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadGeometricCenterX: %d -- (float) Distance along the X axis from the host vehicle coordinate frame to the geometric center of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadGeometricCenterY: %d -- (float) Distance along the Y axis from the host vehicle coordinate frame to the geometric center of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadGeometricCenterZ: %d -- (float) Distance along the Z axis from the host vehicle coordinate frame to the geometric center of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadCenterOfGravityX: %d -- (float) Distance along the X axis from the host vehicle coordinate frame to the center of the gravity of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadCenterOfGravityY: %d -- (float) Distance along the Y axis from the host vehicle coordinate frame to the center of the gravity of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("loadCenterOfGravityZ: %d -- (float) Distance along the Z axis from the host vehicle coordinate frame to the center of the gravity of the load", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count) > 0) then + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf = buffer(bufidx, 4) + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("%s = PoseSensorJausId: 0x%X -- (unsigned integer) JAUS ID of a Global or Local Pose Sensor associated with this load. This can be used in place of the Report Loading Status message to get position and orientation information from the load.", bitstr(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 32), body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint())) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 32, 0, 7), bitVal(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 0, 7))) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 32, 8, 15), bitVal(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 8, 15))) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 32, 16, 31), bitVal(body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_PoseSensorJausId_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_LoadingSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count) > 0) then + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree:add("HitchSpecificationsRec") + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv = buffer(bufidx, 1):le_uint() + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count = 0 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "HostVehicle"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("connectedLoadID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("hitchX: %d -- (float) Distance along the X axis from the host vehicle coordinate frame to the hitch point", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("hitchY: %d -- (float) Distance along the Y axis from the host vehicle coordinate frame to the hitch point", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("hitchZ: %d -- (float) Distance along the Z axis from the host vehicle coordinate frame to the hitch point", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 2), string.format("MinimumRelativeHitchAngle: %.4f (scaled) -- (unsigned short integer) Minimum supported value of the hitch angle, using a Z-down coordinate frame. For fixed loads, this value will always be zero.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count) > 0) then + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_tree:add(buffer(bufidx, 2), string.format("MaximumRelativeHitchAngle: %.4f (scaled) -- (unsigned short integer) Maximum supported value of the hitch angle, using a Z-down coordinate frame. For fixed loads, this value will always be zero.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_HitchSpecificationsRec_pv_count + 1 + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count + 1 + if (bitAND(body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv, body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count) > 0) then + local bufidx_start_body_LoadingSpecificationsList_LoadingSpecificationsSeq = bufidx + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_tree:add(buffer(bufidx_start_body_LoadingSpecificationsList_LoadingSpecificationsSeq, buffer:len() - bufidx_start_body_LoadingSpecificationsList_LoadingSpecificationsSeq), "AxleSpecificationsList ") + body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_LoadingSpecificationsList_LoadingSpecificationsSeq_counter=1,body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_count do + local body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_AxleSpecificationsRec_tree = body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_tree:add(string.format("AxleSpecificationsRec_%d", body_LoadingSpecificationsList_LoadingSpecificationsSeq_counter - 1)) + body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_AxleSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("axleX: %d -- (float) Distance along the X axis from the host vehicle coordinate frame to the center of the axle", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_LoadingSpecificationsList_LoadingSpecificationsSeq_AxleSpecificationsList_AxleSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("numberOfWheels: %d -- (unsigned byte) Total number of wheels associated with this axle. It is expected to be symmetric, such that half this number are on the left and half on the right.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end + body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count = body_LoadingSpecificationsList_LoadingSpecificationsSeq_pv_count + 1 + end +end +messagetable:add(0xCB24, reportloadingspecifications_cb24) + +reportloadingstatus_cb25 = Proto("reportloadingstatus_cb25", "ReportLoadingStatus 0xcb25") +function reportloadingstatus_cb25.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/LoadingSpecifications_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLoadingStatus", string.format("ReportLoadingStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLoadingStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_LoadingStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "LoadingStatusList ") + body_LoadingStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LoadingStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_LoadingStatusList_count do + local body_LoadingStatusList_LoadingStatusRec_tree = body_LoadingStatusList_tree:add(string.format("LoadingStatusRec_%d", body_counter - 1)) + local body_LoadingStatusList_LoadingStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_LoadingStatusList_LoadingStatusRec_pv_count = 0 + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 1), string.format("loadID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_LoadingStatusList_LoadingStatusRec_pv, body_LoadingStatusList_LoadingStatusRec_pv_count) > 0) then + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 2), string.format("RelativeHitchAngle: %.4f (scaled) -- (unsigned short integer) Instantaneous value of the hitch angle, using a Z-down coordinate frame. For fixed loads, this value will always be zero.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LoadingStatusList_LoadingStatusRec_pv_count = body_LoadingStatusList_LoadingStatusRec_pv_count + 1 + if (bitAND(body_LoadingStatusList_LoadingStatusRec_pv, body_LoadingStatusList_LoadingStatusRec_pv_count) > 0) then + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 2), string.format("RelativeHitchAngle_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the hitch angle data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_LoadingStatusList_LoadingStatusRec_pv_count = body_LoadingStatusList_LoadingStatusRec_pv_count + 1 + if (bitAND(body_LoadingStatusList_LoadingStatusRec_pv, body_LoadingStatusList_LoadingStatusRec_pv_count) > 0) then + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 4), string.format("ForceX: %.4f (scaled) -- (unsigned integer) Force experienced by the load at the hitch in the vehicle frame X-direction.", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LoadingStatusList_LoadingStatusRec_pv_count = body_LoadingStatusList_LoadingStatusRec_pv_count + 1 + if (bitAND(body_LoadingStatusList_LoadingStatusRec_pv, body_LoadingStatusList_LoadingStatusRec_pv_count) > 0) then + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 4), string.format("ForceY: %.4f (scaled) -- (unsigned integer) Force experienced by the load at the hitch in the vehicle frame Y-direction.", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LoadingStatusList_LoadingStatusRec_pv_count = body_LoadingStatusList_LoadingStatusRec_pv_count + 1 + if (bitAND(body_LoadingStatusList_LoadingStatusRec_pv, body_LoadingStatusList_LoadingStatusRec_pv_count) > 0) then + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 4), string.format("ForceZ: %.4f (scaled) -- (unsigned integer) Force experienced by the load at the hitch in the vehicle frame Z-direction.", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LoadingStatusList_LoadingStatusRec_pv_count = body_LoadingStatusList_LoadingStatusRec_pv_count + 1 + if (bitAND(body_LoadingStatusList_LoadingStatusRec_pv, body_LoadingStatusList_LoadingStatusRec_pv_count) > 0) then + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970, time of last contact", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LoadingStatusList_LoadingStatusRec_pv_count = body_LoadingStatusList_LoadingStatusRec_pv_count + 1 + if (bitAND(body_LoadingStatusList_LoadingStatusRec_pv, body_LoadingStatusList_LoadingStatusRec_pv_count) > 0) then + body_LoadingStatusList_LoadingStatusRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time, time of last contact", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LoadingStatusList_LoadingStatusRec_pv_count = body_LoadingStatusList_LoadingStatusRec_pv_count + 1 + end +end +messagetable:add(0xCB25, reportloadingstatus_cb25) + +querymagneticsensorstatus_dab9 = Proto("querymagneticsensorstatus_dab9", "QueryMagneticSensorStatus 0xdab9") +function querymagneticsensorstatus_dab9.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MagneticSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMagneticSensorStatus", string.format("QueryMagneticSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMagneticSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryMagneticSensorList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryMagneticSensorList ") + body_QueryMagneticSensorList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_QueryMagneticSensorList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_QueryMagneticSensorList_count do + local body_QueryMagneticSensorList_QueryMagneticSensorRec_tree = body_QueryMagneticSensorList_tree:add(string.format("QueryMagneticSensorRec_%d", body_counter - 1)) + body_QueryMagneticSensorList_QueryMagneticSensorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the magnetic sensor to be queried. A value of zero (0) implies all sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0xDAB9, querymagneticsensorstatus_dab9) + +reportmagneticsensorstatus_daba = Proto("reportmagneticsensorstatus_daba", "ReportMagneticSensorStatus 0xdaba") +function reportmagneticsensorstatus_daba.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MagneticSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMagneticSensorStatus", string.format("ReportMagneticSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMagneticSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_MagneticSensorStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "MagneticSensorStatusList ") + body_MagneticSensorStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_MagneticSensorStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_MagneticSensorStatusList_count do + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_tree = body_MagneticSensorStatusList_tree:add(string.format("MagneticSensorStatusSeq_%d", body_counter - 1)) + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_tree = body_MagneticSensorStatusList_MagneticSensorStatusSeq_tree:add("MagneticSensorStatusRec") + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_pv_count = 0 + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the magnetic sensor to be queried. A value of zero (0) is not permitted.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_pv, body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_pv_count) > 0) then + local value_set = {[0] = "SensorRelative", [1] = "VehicleRelative", [2] = "GlobalRelative"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("CoordinateFrameEnum: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_pv_count = body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorStatusRec_pv_count + 1 + local bufidx_start_body_MagneticSensorStatusList_MagneticSensorStatusSeq = bufidx + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_tree = body_MagneticSensorStatusList_MagneticSensorStatusSeq_tree:add(buffer(bufidx_start_body_MagneticSensorStatusList_MagneticSensorStatusSeq, buffer:len() - bufidx_start_body_MagneticSensorStatusList_MagneticSensorStatusSeq), "MagneticSensorDataList ") + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_MagneticSensorStatusList_MagneticSensorStatusSeq_counter=1,body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_count do + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_tree = body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_tree:add(string.format("MagneticSensorDataRec_%d", body_MagneticSensorStatusList_MagneticSensorStatusSeq_counter - 1)) + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv = buffer(bufidx, 1):le_uint() + local body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count = 0 + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv, body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count) > 0) then + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_tree:add(buffer(bufidx, 8), string.format("MagneticX: %d -- (long float) Magnetic field strength measured in the X direction", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count = body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count + 1 + if (bitAND(body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv, body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count) > 0) then + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_tree:add(buffer(bufidx, 8), string.format("MagneticY: %d -- (long float) Magnetic field strength measured in the Y direction", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count = body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count + 1 + if (bitAND(body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv, body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count) > 0) then + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_tree:add(buffer(bufidx, 8), string.format("MagneticZ: %d -- (long float) Magnetic field strength measured in the Z direction", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count = body_MagneticSensorStatusList_MagneticSensorStatusSeq_MagneticSensorDataList_MagneticSensorDataRec_pv_count + 1 + end + end +end +messagetable:add(0xDABA, reportmagneticsensorstatus_daba) + +querymanipulatorendeffectorforcetorque_d998 = Proto("querymanipulatorendeffectorforcetorque_d998", "QueryManipulatorEndEffectorForceTorque 0xd998") +function querymanipulatorendeffectorforcetorque_d998.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ManipulatorEndEffectorForceTorqueSensor_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryManipulatorEndEffectorForceTorque", string.format("QueryManipulatorEndEffectorForceTorque, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryManipulatorEndEffectorForceTorque")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryManipulatorEndEffectorForceTorqueRec_tree = body_tree:add("QueryManipulatorEndEffectorForceTorqueRec") + body_QueryManipulatorEndEffectorForceTorqueRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) May be used to scope the data being returned. A value of 255 means all values.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xD998, querymanipulatorendeffectorforcetorque_d998) + +reportmanipulatorendeffectorforcetorque_d999 = Proto("reportmanipulatorendeffectorforcetorque_d999", "ReportManipulatorEndEffectorForceTorque 0xd999") +function reportmanipulatorendeffectorforcetorque_d999.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/ManipulatorEndEffectorForceTorqueSensor_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportManipulatorEndEffectorForceTorque", string.format("ReportManipulatorEndEffectorForceTorque, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportManipulatorEndEffectorForceTorque")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportManipulatorEndEffectorForceTorqueRec_tree = body_tree:add("ReportManipulatorEndEffectorForceTorqueRec") + local body_ReportManipulatorEndEffectorForceTorqueRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportManipulatorEndEffectorForceTorqueRec_pv_count = 0 + body_ReportManipulatorEndEffectorForceTorqueRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportManipulatorEndEffectorForceTorqueRec_pv, body_ReportManipulatorEndEffectorForceTorqueRec_pv_count) > 0) then + body_ReportManipulatorEndEffectorForceTorqueRec_tree:add(buffer(bufidx, 4), string.format("ForceX: %.4f (scaled) -- (unsigned integer) Force experienced in the X-direction of the End Effector Coordinate System.", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorEndEffectorForceTorqueRec_pv_count = body_ReportManipulatorEndEffectorForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportManipulatorEndEffectorForceTorqueRec_pv, body_ReportManipulatorEndEffectorForceTorqueRec_pv_count) > 0) then + body_ReportManipulatorEndEffectorForceTorqueRec_tree:add(buffer(bufidx, 4), string.format("ForceY: %.4f (scaled) -- (unsigned integer) Force experienced in the Y-direction of the End Effector Coordinate System.", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorEndEffectorForceTorqueRec_pv_count = body_ReportManipulatorEndEffectorForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportManipulatorEndEffectorForceTorqueRec_pv, body_ReportManipulatorEndEffectorForceTorqueRec_pv_count) > 0) then + body_ReportManipulatorEndEffectorForceTorqueRec_tree:add(buffer(bufidx, 4), string.format("ForceZ: %.4f (scaled) -- (unsigned integer) Force experienced in the Z-direction of the End Effector Coordinate System.", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorEndEffectorForceTorqueRec_pv_count = body_ReportManipulatorEndEffectorForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportManipulatorEndEffectorForceTorqueRec_pv, body_ReportManipulatorEndEffectorForceTorqueRec_pv_count) > 0) then + body_ReportManipulatorEndEffectorForceTorqueRec_tree:add(buffer(bufidx, 4), string.format("TorqueX: %.4f (scaled) -- (unsigned integer) Torque experienced around the X-axis of the End Effector Coordinate System.", buffer(bufidx, 4):le_uint() * 0.000465661287 + (-1000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorEndEffectorForceTorqueRec_pv_count = body_ReportManipulatorEndEffectorForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportManipulatorEndEffectorForceTorqueRec_pv, body_ReportManipulatorEndEffectorForceTorqueRec_pv_count) > 0) then + body_ReportManipulatorEndEffectorForceTorqueRec_tree:add(buffer(bufidx, 4), string.format("TorqueY: %.4f (scaled) -- (unsigned integer) Torque experienced around the Y-axis of the End Effector Coordinate System.", buffer(bufidx, 4):le_uint() * 0.000465661287 + (-1000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorEndEffectorForceTorqueRec_pv_count = body_ReportManipulatorEndEffectorForceTorqueRec_pv_count + 1 + if (bitAND(body_ReportManipulatorEndEffectorForceTorqueRec_pv, body_ReportManipulatorEndEffectorForceTorqueRec_pv_count) > 0) then + body_ReportManipulatorEndEffectorForceTorqueRec_tree:add(buffer(bufidx, 4), string.format("TorqueZ: %.4f (scaled) -- (unsigned integer) Torque experienced around the Z-axis of the End Effector Coordinate System.", buffer(bufidx, 4):le_uint() * 0.000465661287 + (-1000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorEndEffectorForceTorqueRec_pv_count = body_ReportManipulatorEndEffectorForceTorqueRec_pv_count + 1 +end +messagetable:add(0xD999, reportmanipulatorendeffectorforcetorque_d999) + +querymarkingsystemcapabilities_f400 = Proto("querymarkingsystemcapabilities_f400", "QueryMarkingSystemCapabilities 0xf400") +function querymarkingsystemcapabilities_f400.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MarkingSystem_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMarkingSystemCapabilities", string.format("QueryMarkingSystemCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMarkingSystemCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF400, querymarkingsystemcapabilities_f400) + +querymarkingsystemstatus_f401 = Proto("querymarkingsystemstatus_f401", "QueryMarkingSystemStatus 0xf401") +function querymarkingsystemstatus_f401.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MarkingSystem_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMarkingSystemStatus", string.format("QueryMarkingSystemStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMarkingSystemStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryMarkingSystemStatusSequence_tree = body_tree:add("QueryMarkingSystemStatusSequence") + local bufidx_start_body_QueryMarkingSystemStatusSequence = bufidx + local body_QueryMarkingSystemStatusSequence_QueryMarkingSystemStatusList_tree = body_QueryMarkingSystemStatusSequence_tree:add(buffer(bufidx_start_body_QueryMarkingSystemStatusSequence, buffer:len() - bufidx_start_body_QueryMarkingSystemStatusSequence), "QueryMarkingSystemStatusList ") + body_QueryMarkingSystemStatusSequence_QueryMarkingSystemStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 1, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_QueryMarkingSystemStatusSequence_QueryMarkingSystemStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_QueryMarkingSystemStatusSequence_counter=1,body_QueryMarkingSystemStatusSequence_QueryMarkingSystemStatusList_count do + local body_QueryMarkingSystemStatusSequence_QueryMarkingSystemStatusList_QueryMarkingSystemStatusRec_tree = body_QueryMarkingSystemStatusSequence_QueryMarkingSystemStatusList_tree:add(string.format("QueryMarkingSystemStatusRec_%d", body_QueryMarkingSystemStatusSequence_counter - 1)) + body_QueryMarkingSystemStatusSequence_QueryMarkingSystemStatusList_QueryMarkingSystemStatusRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) ID of the marking unit to query. A value of zero is used to request the status of all units", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0xF401, querymarkingsystemstatus_f401) + +dispensemarker_f402 = Proto("dispensemarker_f402", "DispenseMarker 0xf402") +function dispensemarker_f402.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MarkingSystem_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "DispenseMarker", string.format("DispenseMarker, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "DispenseMarker")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DispenseMarkerSequence_tree = body_tree:add("DispenseMarkerSequence") + local body_DispenseMarkerSequence_pv = buffer(bufidx, 1):le_uint() + local body_DispenseMarkerSequence_pv_count = 0 + body_DispenseMarkerSequence_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_DispenseMarkerSequence_CommandTypeVariant_tree = body_DispenseMarkerSequence_tree:add("CommandTypeVariant") + body_DispenseMarkerSequence_CommandTypeVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_DispenseMarkerSequence_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_DispenseMarkerSequence_index == 0) then + local body_DispenseMarkerSequence_CommandTypeVariant_DiscreteCommandRecord_tree = body_DispenseMarkerSequence_CommandTypeVariant_tree:add("DiscreteCommandRecord-- This record is used to either issue a discrete command to dispense a marker, to stop a continuous marking command that is already in progress, or to explicitly continue an already in progress marking command. The CONTINUE_COMMAND CommandType maybe be used by implementations that require routine positive re-affirmation of a continuous marking command.") + local value_set = {[0] = "STOP_COMMAND", [1] = "DISPENSE_MARKER_COMMAND", [2] = "CONTINUE_COMMAND"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DispenseMarkerSequence_CommandTypeVariant_DiscreteCommandRecord_tree:add(buffer(bufidx, 1), string.format("CommandType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_DispenseMarkerSequence_index == 1) then + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_tree = body_DispenseMarkerSequence_CommandTypeVariant_tree:add("ContinuousCommandSequence-- This sequence is used when commanding a continuous dispensing action of a marker.") + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv = buffer(bufidx, 1):le_uint() + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv_count = 0 + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_tree = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_tree:add("ContinuousDispenseMarkerVar") + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_index == 0) then + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_SetDistanceRec_tree = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_tree:add("SetDistanceRec") + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_SetDistanceRec_tree:add(buffer(bufidx, 8), string.format("Distance: %d -- (long float) If included and supported, this field specifies continuous dispensing of a marker for the specified distance along a path. The distance along the path is different than the 'as a bird flies' distance for any path that is not a straight line.", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + if (body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_index == 1) then + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_DistanceIntervalRec_tree = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_tree:add("DistanceIntervalRec") + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_DistanceIntervalRec_tree:add(buffer(bufidx, 8), string.format("OnInterval: %d -- (long float) If included and supported, this field specifies the 'ON' distance interval along the path of travel of marker dispensing. 'ON' distance is the amount of distance continuous marker dispensing is active. 'ON' distance always starts first, and alternates with 'OFF' distance until the end criteria (distance or time) of the continuous marking command is met, or marking material runs out.", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_DistanceIntervalRec_tree:add(buffer(bufidx, 8), string.format("OffInterval: %d -- (long float) If included and supported, this field specifies the 'OFF' distance interval along the path of travel of marker dispensing. 'OFF' distance is the amount of distance continuous marker dispensing is inactive. 'OFF' distance occurs after 'ON' distance is met, and alternates with 'ON' distance until the end criteria (distance or time) of the continuous marking command is met, or marking material runs out.", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + if (body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_index == 2) then + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_TimeIntervalRec_tree = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_tree:add("TimeIntervalRec") + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_TimeIntervalRec_tree:add(buffer(bufidx, 8), string.format("OnInterval: %d -- (long float) If included and supported, this field specifies the 'ON' time interval along the path of travel of marker dispensing. 'ON' time is the amount of time continuous marker dispensing is active. 'ON' time always starts first, and alternates with 'OFF' time until the end criteria (distance or time) of the continuous marking command is met, or marking material runs out.", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_ContinuousDispenseMarkerVar_TimeIntervalRec_tree:add(buffer(bufidx, 8), string.format("OffInterval: %d -- (long float) If included and supported, this field specifies the 'OFF' time interval along the path of travel of marker dispensing. 'OFF' time is the amount of time continuous marker dispensing is inactive. 'OFF' time occurs after 'ON' time expires, and alternates with 'ON' time until the end criteria (distance or time) of the continuous marking command is met, or marking material runs out.", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + if (bitAND(body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv, body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv_count) > 0) then + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_tree = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_tree:add("DurationLimitRec") + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_pv = buffer(bufidx, 1):le_uint() + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_pv_count = 0 + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_pv, body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_pv_count) > 0) then + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_tree:add(buffer(bufidx, 8), string.format("Duration: %d -- (long float) If included and supported, this field specifies the duration of a continuous marker dispensing. If excluded, the continuous marker dispensing lasts until distance criteria is met, the command is cancelled, or marking materials are gone.", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_pv_count = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DurationLimitRec_pv_count + 1 + end + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv_count = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv_count + 1 + if (bitAND(body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv, body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv_count) > 0) then + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_tree = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_tree:add("DistanceLimitRec") + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_pv = buffer(bufidx, 1):le_uint() + local body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_pv_count = 0 + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_pv, body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_pv_count) > 0) then + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_tree:add(buffer(bufidx, 8), string.format("DistanceLimit: %d -- (long float) If included and supported, this field specifies the maxium distance travelled for a continuous marker dispensing. If excluded, the continuous marker dispensing lasts until duration criteria is met, the command is cancelled, or marking materials are gone.", buffer(bufidx, 8):le_uint())) + bufidx = bufidx + 8 + end + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_pv_count = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_DistanceLimitRec_pv_count + 1 + end + body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv_count = body_DispenseMarkerSequence_CommandTypeVariant_ContinuousCommandSequence_pv_count + 1 + end + if (bitAND(body_DispenseMarkerSequence_pv, body_DispenseMarkerSequence_pv_count) > 0) then + local bufidx_start_body_DispenseMarkerSequence = bufidx + local body_DispenseMarkerSequence_MarkerUnitList_tree = body_DispenseMarkerSequence_tree:add(buffer(bufidx_start_body_DispenseMarkerSequence, buffer:len() - bufidx_start_body_DispenseMarkerSequence), "MarkerUnitList ") + body_DispenseMarkerSequence_MarkerUnitList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 1, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_DispenseMarkerSequence_MarkerUnitList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_DispenseMarkerSequence_counter=1,body_DispenseMarkerSequence_MarkerUnitList_count do + local body_DispenseMarkerSequence_MarkerUnitList_MarkerUnitRecord_tree = body_DispenseMarkerSequence_MarkerUnitList_tree:add(string.format("MarkerUnitRecord_%d", body_DispenseMarkerSequence_counter - 1)) + body_DispenseMarkerSequence_MarkerUnitList_MarkerUnitRecord_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) ID of the marking unit to command.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + end + body_DispenseMarkerSequence_pv_count = body_DispenseMarkerSequence_pv_count + 1 +end +messagetable:add(0xF402, dispensemarker_f402) + +reportmarkingsystemcapabilities_f480 = Proto("reportmarkingsystemcapabilities_f480", "ReportMarkingSystemCapabilities 0xf480") +function reportmarkingsystemcapabilities_f480.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MarkingSystem_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMarkingSystemCapabilities", string.format("ReportMarkingSystemCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMarkingSystemCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_MarkingSystemCapabilities_tree = body_tree:add("MarkingSystemCapabilities") + local body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_tree = body_MarkingSystemCapabilities_tree:add("MarkingSystemCapabilitiesRecord") + local body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_buf = buffer(bufidx, 1) + local body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_tree = body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_tree:add(buffer(bufidx, 1), string.format("%s = MarkerType: 0x%X -- (unsigned byte) Indicates the type of marker(s) used by this marking system.", bitstr(body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_buf:le_uint(), 8), body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_buf:le_uint())) + body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_tree:add(buffer(bufidx, 1), string.format("%s = Discrete: %d", bitstr_part(body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_buf:le_uint(), 8, 0, 0), bitVal(body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_buf:le_uint(), 0, 0))) + body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_tree:add(buffer(bufidx, 1), string.format("%s = Continuous: %d", bitstr_part(body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_buf:le_uint(), 8, 1, 1), bitVal(body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerType_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 + local value_set = {[0] = "COORDINATED_CONTROL_ONLY", [1] = "INDIVIDUAL_CONTROL"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_tree:add(buffer(bufidx, 1), string.format("ControlType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerDescription_tree = body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("MarkerDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MarkingSystemCapabilities_MarkingSystemCapabilitiesRecord_MarkerDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local bufidx_start_body_MarkingSystemCapabilities = bufidx + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_tree = body_MarkingSystemCapabilities_tree:add(buffer(bufidx_start_body_MarkingSystemCapabilities, buffer:len() - bufidx_start_body_MarkingSystemCapabilities), "MarkingUnitsCapabilitiesList -- List the capabilities specific to each marking unit. A marking system must have at least one marking unit.") + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 1, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_MarkingSystemCapabilities_counter=1,body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_count do + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_tree:add(string.format("MarkingUnitCapabilitiesSeq_%d", body_MarkingSystemCapabilities_counter - 1)) + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_tree:add("MarkingUnitCapabilitiesRec") + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_pv_count = 0 + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Unique ID of the marking unit, used to reference it for individual control, if allowed.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkingUnitName_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("MarkingUnitName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkingUnitName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local types_set = {[1] = 8, [2] = 4} + local unit_set = {[1] = "liter", [2] = "one"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {} + local bias_set_tabe = {} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Capacity_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Capacity: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Capacity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Capacity_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Capacity: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Capacity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Capacity_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Capacity: %d %s", value, unit_list(type_value))) + Capacity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_pv, body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_pv_count) > 0) then + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_buf = buffer(bufidx, 1) + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = MarkerType: 0x%X -- (unsigned byte) Indicates the type of marker of this single marking unit.", bitstr(body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_buf:le_uint(), 8), body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_buf:le_uint())) + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_tree:add(buffer(bufidx, 1), string.format("%s = Discrete: %d", bitstr_part(body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_buf:le_uint(), 8, 0, 0), bitVal(body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_buf:le_uint(), 0, 0))) + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_tree:add(buffer(bufidx, 1), string.format("%s = Continuous: %d", bitstr_part(body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_buf:le_uint(), 8, 1, 1), bitVal(body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_MarkerType_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 + end + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_pv_count = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_MarkingUnitCapabilitiesRec_pv_count + 1 + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_tree:add("GeometricPropertiesVariant") + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_index == 0) then + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_NoGeometricPropertiesVariant_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_tree:add("NoGeometricPropertiesVariant") + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_NoGeometricPropertiesVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 0", buffer(bufidx, 1):le_uint())) + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + if (body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_index == 1) then + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_tree:add("StaticGeometricPropertiesRec-- Specifies the position of the marking unit relative to the vehicle coordinate frame.") + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_PositionVector_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_tree:add("PositionVector") + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_PositionVector_PositionVectorDimension_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_PositionVector_tree:add("PositionVectorDimension [3]") + for body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_PositionVector_PositionVectorDimension_i = 1, 3 do + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_PositionVector_PositionVectorDimension_tree:add(buffer(bufidx, 4), string.format("PositionVectorElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_tree:add("UnitQuaternion") + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_tree:add("UnitQuaternionDimension [4]") + for body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_i = 1, 4 do + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_StaticGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_tree:add(buffer(bufidx, 4), string.format("UnitQuaternionElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + end + if (body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_index == 2) then + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_tree:add("ManipulatorGeometricPropertiesRec-- Specifies the position of the marking unit relative to the joint frame of a manipulator.") + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add(buffer(bufidx, 2), string.format("SubsystemID: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add(buffer(bufidx, 1), string.format("ComponentID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add(buffer(bufidx, 1), string.format("JointNumber: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_PositionVector_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add("PositionVector") + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_PositionVector_PositionVectorDimension_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_PositionVector_tree:add("PositionVectorDimension [3]") + for body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_PositionVector_PositionVectorDimension_i = 1, 3 do + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_PositionVector_PositionVectorDimension_tree:add(buffer(bufidx, 4), string.format("PositionVectorElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_tree:add("UnitQuaternion") + local body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_tree = body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_tree:add("UnitQuaternionDimension [4]") + for body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_i = 1, 4 do + body_MarkingSystemCapabilities_MarkingUnitsCapabilitiesList_MarkingUnitCapabilitiesSeq_GeometricPropertiesVariant_ManipulatorGeometricPropertiesRec_UnitQuaternion_UnitQuaternionDimension_tree:add(buffer(bufidx, 4), string.format("UnitQuaternionElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + end + end +end +messagetable:add(0xF480, reportmarkingsystemcapabilities_f480) + +reportmarkingsystemstatus_f481 = Proto("reportmarkingsystemstatus_f481", "ReportMarkingSystemStatus 0xf481") +function reportmarkingsystemstatus_f481.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MarkingSystem_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMarkingSystemStatus", string.format("ReportMarkingSystemStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMarkingSystemStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_MarkingSystemStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "MarkingSystemStatusList ") + body_MarkingSystemStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_MarkingSystemStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_MarkingSystemStatusList_count do + local body_MarkingSystemStatusList_MarkingSystemStatusRec_tree = body_MarkingSystemStatusList_tree:add(string.format("MarkingSystemStatusRec_%d", body_counter - 1)) + local body_MarkingSystemStatusList_MarkingSystemStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_MarkingSystemStatusList_MarkingSystemStatusRec_pv_count = 0 + body_MarkingSystemStatusList_MarkingSystemStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_MarkingSystemStatusList_MarkingSystemStatusRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) ID of the marking unit.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local types_set = {[1] = 4, [2] = 4, [3] = 8} + local unit_set = {[1] = "percent", [2] = "one", [3] = "liter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0} + local bias_set_tabe = {[1] = 0} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local RemainingMarkers_tree = body_MarkingSystemStatusList_MarkingSystemStatusRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("RemainingMarkers: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + RemainingMarkers_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local RemainingMarkers_tree = body_MarkingSystemStatusList_MarkingSystemStatusRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("RemainingMarkers: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + RemainingMarkers_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local RemainingMarkers_tree = body_MarkingSystemStatusList_MarkingSystemStatusRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("RemainingMarkers: %d %s", value, unit_list(type_value))) + RemainingMarkers_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + local value_set = {[0] = "ERROR", [1] = "DISABLED", [2] = "ENABLED", [3] = "COMMAND_IN_PROGRESS"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_MarkingSystemStatusList_MarkingSystemStatusRec_tree:add(buffer(bufidx, 1), string.format("MarkingStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_MarkingSystemStatusList_MarkingSystemStatusRec_pv, body_MarkingSystemStatusList_MarkingSystemStatusRec_pv_count) > 0) then + local value_set = {[0] = "ERROR", [1] = "ACTIVE_COMPRESSING", [2] = "NORMAL", [3] = "DECOMPRESSING"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_MarkingSystemStatusList_MarkingSystemStatusRec_tree:add(buffer(bufidx, 1), string.format("CompressorStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_MarkingSystemStatusList_MarkingSystemStatusRec_pv_count = body_MarkingSystemStatusList_MarkingSystemStatusRec_pv_count + 1 + if (bitAND(body_MarkingSystemStatusList_MarkingSystemStatusRec_pv, body_MarkingSystemStatusList_MarkingSystemStatusRec_pv_count) > 0) then + local body_MarkingSystemStatusList_MarkingSystemStatusRec_CompressorStatusDescription_tree = body_MarkingSystemStatusList_MarkingSystemStatusRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("CompressorStatusDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MarkingSystemStatusList_MarkingSystemStatusRec_CompressorStatusDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_MarkingSystemStatusList_MarkingSystemStatusRec_pv_count = body_MarkingSystemStatusList_MarkingSystemStatusRec_pv_count + 1 + end +end +messagetable:add(0xF481, reportmarkingsystemstatus_f481) + +dispensemarkerresponse_f482 = Proto("dispensemarkerresponse_f482", "DispenseMarkerResponse 0xf482") +function dispensemarkerresponse_f482.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MarkingSystem_V5.0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "DispenseMarkerResponse", string.format("DispenseMarkerResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "DispenseMarkerResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DispenseMarkerSequence_tree = body_tree:add("DispenseMarkerSequence") + local body_DispenseMarkerSequence_pv = buffer(bufidx, 1):le_uint() + local body_DispenseMarkerSequence_pv_count = 0 + body_DispenseMarkerSequence_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_DispenseMarkerSequence_MarkerSystemResponse_tree = body_DispenseMarkerSequence_tree:add("MarkerSystemResponse-- Indicates the overall status of the command.") + local body_DispenseMarkerSequence_MarkerSystemResponse_pv = buffer(bufidx, 1):le_uint() + local body_DispenseMarkerSequence_MarkerSystemResponse_pv_count = 0 + body_DispenseMarkerSequence_MarkerSystemResponse_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "INDIVIDUAL_CONTROL_NOT_SUPPORTED", [2] = "MARKING_UNIT_NOT_FOUND", [3] = "MARKING_SYSTEM_ERROR", [4] = "COMMAND_ALREADY_IN_PROGRESS", [5] = "COMMAND_TYPE_NOT_SUPPORTED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DispenseMarkerSequence_MarkerSystemResponse_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_DispenseMarkerSequence_MarkerSystemResponse_pv, body_DispenseMarkerSequence_MarkerSystemResponse_pv_count) > 0) then + local body_DispenseMarkerSequence_MarkerSystemResponse_ResponseDescription_tree = body_DispenseMarkerSequence_MarkerSystemResponse_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DispenseMarkerSequence_MarkerSystemResponse_ResponseDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_DispenseMarkerSequence_MarkerSystemResponse_pv_count = body_DispenseMarkerSequence_MarkerSystemResponse_pv_count + 1 + if (bitAND(body_DispenseMarkerSequence_pv, body_DispenseMarkerSequence_pv_count) > 0) then + local bufidx_start_body_DispenseMarkerSequence = bufidx + local body_DispenseMarkerSequence_MarkerUnitResponseList_tree = body_DispenseMarkerSequence_tree:add(buffer(bufidx_start_body_DispenseMarkerSequence, buffer:len() - bufidx_start_body_DispenseMarkerSequence), "MarkerUnitResponseList -- If there are individual marker units, may be used to provided information specific to each one.") + body_DispenseMarkerSequence_MarkerUnitResponseList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 1, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_DispenseMarkerSequence_MarkerUnitResponseList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_DispenseMarkerSequence_counter=1,body_DispenseMarkerSequence_MarkerUnitResponseList_count do + local body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_tree = body_DispenseMarkerSequence_MarkerUnitResponseList_tree:add(string.format("MarkerUnitResponseRec_%d", body_DispenseMarkerSequence_counter - 1)) + local body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_pv = buffer(bufidx, 1):le_uint() + local body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_pv_count = 0 + body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) ID of the marking unit to command.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "INDIVIDUAL_CONTROL_NOT_SUPPORTED", [2] = "MARKING_UNIT_NOT_FOUND", [3] = "MARKING_SYSTEM_ERROR", [4] = "COMMAND_ALREADY_IN_PROGRESS", [5] = "COMMAND_TYPE_NOT_SUPPORTED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_pv, body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_pv_count) > 0) then + local body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_ResponseDescription_tree = body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_ResponseDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_pv_count = body_DispenseMarkerSequence_MarkerUnitResponseList_MarkerUnitResponseRec_pv_count + 1 + end + end + body_DispenseMarkerSequence_pv_count = body_DispenseMarkerSequence_pv_count + 1 +end +messagetable:add(0xF482, dispensemarkerresponse_f482) + +querymilitaryilluminationmode_b513 = Proto("querymilitaryilluminationmode_b513", "QueryMilitaryIlluminationMode 0xb513") +function querymilitaryilluminationmode_b513.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MilitaryIllumination.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMilitaryIlluminationMode", string.format("QueryMilitaryIlluminationMode, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMilitaryIlluminationMode")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xB513, querymilitaryilluminationmode_b513) + +setmilitaryilluminationmode_b514 = Proto("setmilitaryilluminationmode_b514", "SetMilitaryIlluminationMode 0xb514") +function setmilitaryilluminationmode_b514.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MilitaryIllumination.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetMilitaryIlluminationMode", string.format("SetMilitaryIlluminationMode, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetMilitaryIlluminationMode")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_illuminationRec_tree = body_tree:add("illuminationRec") + local value_set = {[0] = "OFF", [1] = "ON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_illuminationRec_tree:add(buffer(bufidx, 1), string.format("blackout_mode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xB514, setmilitaryilluminationmode_b514) + +reportmilitaryilluminationmode_b515 = Proto("reportmilitaryilluminationmode_b515", "ReportMilitaryIlluminationMode 0xb515") +function reportmilitaryilluminationmode_b515.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MilitaryIllumination.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMilitaryIlluminationMode", string.format("ReportMilitaryIlluminationMode, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMilitaryIlluminationMode")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_illuminationRec_tree = body_tree:add("illuminationRec") + local value_set = {[0] = "OFF", [1] = "ON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_illuminationRec_tree:add(buffer(bufidx, 1), string.format("blackout_mode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xB515, reportmilitaryilluminationmode_b515) + +setmissionplan_abca = Proto("setmissionplan_abca", "SetMissionPlan 0xabca") +function setmissionplan_abca.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetMissionPlan", string.format("SetMissionPlan, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetMissionPlan")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetMissionPlanRec_tree = body_tree:add("SetMissionPlanRec") + body_SetMissionPlanRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Locally unique request ID for the request, which the client can use to associated a given response", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local format_field_set = {[0] = "C_BML", [1] = "Reserved_for_future_IOP_use", [2] = "Reserved_for_future_IOP_use", [3] = "Reserved_for_future_IOP_use", [4] = "Reserved_for_future_IOP_use", [32] = "Reserved_for_program_specific_use", [33] = "Reserved_for_program_specific_use", [34] = "Reserved_for_program_specific_use", [35] = "Reserved_for_program_specific_use", [36] = "Reserved_for_program_specific_use"} + local format_field_value = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + body_SetMissionPlanRec_tree:add(buffer(bufidx, 4), string.format("MissionPlan: %s [%s] -- (%d)",format_field_value, format_field_set[format_field_value], buffer(bufidx, 2):le_uint())) + local body_SetMissionPlanRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_SetMissionPlanRec_count):tvb(), pinfo, tree) + else + local body_SetMissionPlanRec_MissionPlan_tree = body_SetMissionPlanRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_SetMissionPlanRec_count)) + body_SetMissionPlanRec_MissionPlan_tree:append_text(", unknown message") + end + bufidx = bufidx + body_SetMissionPlanRec_count +end +messagetable:add(0xABCA, setmissionplan_abca) + +deletemissionplan_abcb = Proto("deletemissionplan_abcb", "DeleteMissionPlan 0xabcb") +function deletemissionplan_abcb.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "DeleteMissionPlan", string.format("DeleteMissionPlan, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "DeleteMissionPlan")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DeleteMissionPlanRec_tree = body_tree:add("DeleteMissionPlanRec") + body_DeleteMissionPlanRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Locally unique request ID for the request, which the client can use to associated a given response", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_DeleteMissionPlanRec_tree:add(buffer(bufidx, 1), string.format("MissionID: %d -- (unsigned byte) ID of the saved mission to be deleted", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xABCB, deletemissionplan_abcb) + +executemissionplan_abcc = Proto("executemissionplan_abcc", "ExecuteMissionPlan 0xabcc") +function executemissionplan_abcc.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ExecuteMissionPlan", string.format("ExecuteMissionPlan, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ExecuteMissionPlan")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ExecuteMissionPlanRec_tree = body_tree:add("ExecuteMissionPlanRec") + body_ExecuteMissionPlanRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Locally unique request ID for the request, which the client can use to associated a given response", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ExecuteMissionPlanRec_tree:add(buffer(bufidx, 1), string.format("MissionID: %d -- (unsigned byte) ID of the saved mission to be executed", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xABCC, executemissionplan_abcc) + +pausemissionplan_abcd = Proto("pausemissionplan_abcd", "PauseMissionPlan 0xabcd") +function pausemissionplan_abcd.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "PauseMissionPlan", string.format("PauseMissionPlan, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "PauseMissionPlan")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PauseMissionPlanRec_tree = body_tree:add("PauseMissionPlanRec") + body_PauseMissionPlanRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Locally unique request ID for the request, which the client can use to associated a given response", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xABCD, pausemissionplan_abcd) + +resumemissionplan_abce = Proto("resumemissionplan_abce", "ResumeMissionPlan 0xabce") +function resumemissionplan_abce.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ResumeMissionPlan", string.format("ResumeMissionPlan, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ResumeMissionPlan")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ResumeMissionPlanRec_tree = body_tree:add("ResumeMissionPlanRec") + body_ResumeMissionPlanRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Locally unique request ID for the request, which the client can use to associated a given response", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xABCE, resumemissionplan_abce) + +querymissionplans_abcf = Proto("querymissionplans_abcf", "QueryMissionPlans 0xabcf") +function querymissionplans_abcf.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMissionPlans", string.format("QueryMissionPlans, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMissionPlans")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_IncludeTasksRec_tree = body_tree:add("IncludeTasksRec") + body_IncludeTasksRec_tree:add(buffer(bufidx, 1), string.format("MissionID: %d -- (unsigned byte) ID of a mission being queried. A value of zero indicates all stored mission plans", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_IncludeTasksRec_tree:add(buffer(bufidx, 1), string.format("IncludeMissionPlan: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xABCF, querymissionplans_abcf) + +querymissionplanmanagercapabilities_abc0 = Proto("querymissionplanmanagercapabilities_abc0", "QueryMissionPlanManagerCapabilities 0xabc0") +function querymissionplanmanagercapabilities_abc0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMissionPlanManagerCapabilities", string.format("QueryMissionPlanManagerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMissionPlanManagerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xABC0, querymissionplanmanagercapabilities_abc0) + +missionrequestresponse_abba = Proto("missionrequestresponse_abba", "MissionRequestResponse 0xabba") +function missionrequestresponse_abba.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "MissionRequestResponse", string.format("MissionRequestResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "MissionRequestResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_MissionRequestResponseRec_tree = body_tree:add("MissionRequestResponseRec") + local body_MissionRequestResponseRec_pv = buffer(bufidx, 1):le_uint() + local body_MissionRequestResponseRec_pv_count = 0 + body_MissionRequestResponseRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_MissionRequestResponseRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Locally unique request ID for associating requests and responses", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "Success", [1] = "MissionFormatNotSupported", [2] = "MissionIDDoesNotExist", [3] = "CannotDeleteWhileExecuting", [4] = "MissionAlreadyExecuting", [5] = "MissionPlanPreconditionsNotSatisfied", [6] = "MissionPlanRequiresUnsupportedCapability"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_MissionRequestResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_MissionRequestResponseRec_pv, body_MissionRequestResponseRec_pv_count) > 0) then + body_MissionRequestResponseRec_tree:add(buffer(bufidx, 1), string.format("MissionID: %d -- (unsigned byte) Unique ID for the saved mission that is assigned if the mission is successfully created", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_MissionRequestResponseRec_pv_count = body_MissionRequestResponseRec_pv_count + 1 + if (bitAND(body_MissionRequestResponseRec_pv, body_MissionRequestResponseRec_pv_count) > 0) then + local body_MissionRequestResponseRec_AdditionalInfo_tree = body_MissionRequestResponseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("AdditionalInfo[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MissionRequestResponseRec_AdditionalInfo_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_MissionRequestResponseRec_pv_count = body_MissionRequestResponseRec_pv_count + 1 +end +messagetable:add(0xABBA, missionrequestresponse_abba) + +reportmissionplans_acdc = Proto("reportmissionplans_acdc", "ReportMissionPlans 0xacdc") +function reportmissionplans_acdc.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMissionPlans", string.format("ReportMissionPlans, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMissionPlans")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ReportMissionPlansList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ReportMissionPlansList ") + body_ReportMissionPlansList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportMissionPlansList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ReportMissionPlansList_count do + local body_ReportMissionPlansList_ReportMissionPlansSeq_tree = body_ReportMissionPlansList_tree:add(string.format("ReportMissionPlansSeq_%d", body_counter - 1)) + local body_ReportMissionPlansList_ReportMissionPlansSeq_pv = buffer(bufidx, 1):le_uint() + local body_ReportMissionPlansList_ReportMissionPlansSeq_pv_count = 0 + body_ReportMissionPlansList_ReportMissionPlansSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree = body_ReportMissionPlansList_ReportMissionPlansSeq_tree:add("ReportMissionPlansRec") + local body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_pv_count = 0 + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree:add(buffer(bufidx, 1), string.format("MissionID: %d -- (unsigned byte) Unique ID for the saved mission that is assigned if the mission is successfully created", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "Loaded", [1] = "Executing", [2] = "Paused", [3] = "Completed", [4] = "Failed", [5] = "Deleted"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf = buffer(bufidx, 4) + local body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_tree = body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree:add(buffer(bufidx, 4), string.format("%s = SourceJAUS_ID: 0x%X -- (unsigned integer) JAUS ID of the source that originally set the mission plan.", bitstr(body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf:le_uint(), 32), body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf:le_uint())) + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf:le_uint(), 0, 7))) + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf:le_uint(), 8, 15))) + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_SourceJAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970, time mission plan was set", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time, time mission plan was set", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + if (bitAND(body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_pv, body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_pv_count) > 0) then + local format_field_set = {[0] = "C_BML", [1] = "Reserved_for_future_IOP_use", [2] = "Reserved_for_future_IOP_use", [3] = "Reserved_for_future_IOP_use", [4] = "Reserved_for_future_IOP_use", [32] = "Reserved_for_program_specific_use", [33] = "Reserved_for_program_specific_use", [34] = "Reserved_for_program_specific_use", [35] = "Reserved_for_program_specific_use", [36] = "Reserved_for_program_specific_use"} + local format_field_value = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree:add(buffer(bufidx, 4), string.format("MissionPlan: %s [%s] -- (%d)",format_field_value, format_field_set[format_field_value], buffer(bufidx, 2):le_uint())) + local body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_count):tvb(), pinfo, tree) + else + local body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_MissionPlan_tree = body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_count)) + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_MissionPlan_tree:append_text(", unknown message") + end + bufidx = bufidx + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_count + end + body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_pv_count = body_ReportMissionPlansList_ReportMissionPlansSeq_ReportMissionPlansRec_pv_count + 1 + if (bitAND(body_ReportMissionPlansList_ReportMissionPlansSeq_pv, body_ReportMissionPlansList_ReportMissionPlansSeq_pv_count) > 0) then + local body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_tree = body_ReportMissionPlansList_ReportMissionPlansSeq_tree:add("MissionPlanProgress") + body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_ReportMissionPlansList_ReportMissionPlansSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ReportMissionPlansList_ReportMissionPlansSeq_index == 0) then + local body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_PercentCompleteRec_tree = body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_tree:add("PercentCompleteRec") + body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_PercentCompleteRec_tree:add(buffer(bufidx, 1), string.format("PercentComplete: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + if (body_ReportMissionPlansList_ReportMissionPlansSeq_index == 1) then + local body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_EstimatedTimeRemainingRec_tree = body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_tree:add("EstimatedTimeRemainingRec") + body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_EstimatedTimeRemainingRec_tree:add(buffer(bufidx, 4), string.format("EstimatedTimeRemaining: %d ", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + if (body_ReportMissionPlansList_ReportMissionPlansSeq_index == 2) then + local body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_StepsCompletedRec_tree = body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_tree:add("StepsCompletedRec") + body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_StepsCompletedRec_tree:add(buffer(bufidx, 2), string.format("CurrentStep: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_ReportMissionPlansList_ReportMissionPlansSeq_MissionPlanProgress_StepsCompletedRec_tree:add(buffer(bufidx, 2), string.format("TotalSteps: %d ", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + end + body_ReportMissionPlansList_ReportMissionPlansSeq_pv_count = body_ReportMissionPlansList_ReportMissionPlansSeq_pv_count + 1 + end +end +messagetable:add(0xACDC, reportmissionplans_acdc) + +reportmissionplanmanagercapabilities_abc1 = Proto("reportmissionplanmanagercapabilities_abc1", "ReportMissionPlanManagerCapabilities 0xabc1") +function reportmissionplanmanagercapabilities_abc1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/MissionPlanManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMissionPlanManagerCapabilities", string.format("ReportMissionPlanManagerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMissionPlanManagerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_MissionPlanManagerCapabilitiesRec_tree = body_tree:add("MissionPlanManagerCapabilitiesRec") + local body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf = buffer(bufidx, 8) + local body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_tree = body_MissionPlanManagerCapabilitiesRec_tree:add(buffer(bufidx, 8), string.format("%s = SupportedMissionPlanFormats: 0x%X -- (unsigned long integer) Bit field representing the supported mission plan format types", bitstr(body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf:le_uint(), 64), body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf:le_uint())) + body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_tree:add(buffer(bufidx, 8), string.format("%s = C_BML: %d", bitstr_part(body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf:le_uint(), 64, 0, 0), bitVal(body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf:le_uint(), 0, 0))) + body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForFutureIOPUse: %d", bitstr_part(body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf:le_uint(), 64, 1, 31), bitVal(body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf:le_uint(), 1, 31))) + body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_tree:add(buffer(bufidx, 8), string.format("%s = ReservedForProgramSpecificUse: %d", bitstr_part(body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf:le_uint(), 64, 32, 63), bitVal(body_MissionPlanManagerCapabilitiesRec_SupportedMissionPlanFormats_buf:le_uint(), 32, 63))) + bufidx = bufidx + 8 +end +messagetable:add(0xABC1, reportmissionplanmanagercapabilities_abc1) + +requestnodeid_db03 = Proto("requestnodeid_db03", "RequestNodeID 0xdb03") +function requestnodeid_db03.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/NodeIDAllocator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestNodeID", string.format("RequestNodeID, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestNodeID")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReviewNodeIDRec_tree = body_tree:add("ReviewNodeIDRec") + local body_ReviewNodeIDRec_RequesterID_tree = body_ReviewNodeIDRec_tree:add("RequesterID-- An array of 7 bytes used to represent a unique ID associated with the node requesting a Node ID. This field must be formed to be unique amongst all nodes that can request a Node ID within a Subsystem. The following methods are suggested for assigning a unique node ID: 1. The first 6 bytes of the array are a MAC Address or unique IPv6 Address of the location where the Requestor resides, and the final byte is a unique integer value used to differentiate multiple JAUS nodes at that location. 2. The first 4 bytes of the array are a unique IPv4 address of the location where the Requester resides, and the 5th byte is a unique integrer value used to differentiate multiple JAUS nodes at that location. The final two bytes are unused and set to 0.") + local body_ReviewNodeIDRec_RequesterID_OneDimensionArray_tree = body_ReviewNodeIDRec_RequesterID_tree:add("OneDimensionArray [7]") + for body_ReviewNodeIDRec_RequesterID_OneDimensionArray_i = 1, 7 do + body_ReviewNodeIDRec_RequesterID_OneDimensionArray_tree:add(buffer(bufidx, 1), string.format("RequesterIDArrayField: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0xDB03, requestnodeid_db03) + +grantnodeid_fb03 = Proto("grantnodeid_fb03", "GrantNodeID 0xfb03") +function grantnodeid_fb03.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/NodeIDAllocator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "GrantNodeID", string.format("GrantNodeID, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "GrantNodeID")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GrantNodeIDRec_tree = body_tree:add("GrantNodeIDRec") + body_GrantNodeIDRec_tree:add(buffer(bufidx, 1), string.format("NodeID: %d -- (unsigned byte) The 8 bit JAUS Node ID assigned by the NodeIDAllocator.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_GrantNodeIDRec_RequesterID_tree = body_GrantNodeIDRec_tree:add("RequesterID-- An array of 7 bytes used to represent a unique ID associated with the node requesting a Node ID. This field must be formed to be unique amongst all nodes that can request a Node ID within a Subsystem. The following methods are suggested for assigning a unique node ID: 1. The first 6 bytes of the array are a MAC Address or unique IPv6 Address of the location where the Requestor resides, and the final byte is a unique integer value used to differentiate multiple JAUS nodes at that location. 2. The first 4 bytes of the array are a unique IPv4 address of the location where the Requester resides, and the 5th byte is a unique integrer value used to differentiate multiple JAUS nodes at that location. The final two bytes are unused and set to 0.") + local body_GrantNodeIDRec_RequesterID_OneDimensionArray_tree = body_GrantNodeIDRec_RequesterID_tree:add("OneDimensionArray [7]") + for body_GrantNodeIDRec_RequesterID_OneDimensionArray_i = 1, 7 do + body_GrantNodeIDRec_RequesterID_OneDimensionArray_tree:add(buffer(bufidx, 1), string.format("RequesterIDArrayField: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0xFB03, grantnodeid_fb03) + +passthroughmessage_d701 = Proto("passthroughmessage_d701", "PassthroughMessage 0xd701") +function passthroughmessage_d701.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PassthroughMessage_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "PassthroughMessage", string.format("PassthroughMessage, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "PassthroughMessage")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_PassthroughMessageList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "PassthroughMessageList ") + body_PassthroughMessageList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + local body_PassthroughMessageList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_PassthroughMessageList_count do + local body_PassthroughMessageList_PassthroughMessageRec_tree = body_PassthroughMessageList_tree:add(string.format("PassthroughMessageRec_%d", body_counter - 1)) + local body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf = buffer(bufidx, 4) + local body_PassthroughMessageList_PassthroughMessageRec_targetJausID_tree = body_PassthroughMessageList_PassthroughMessageRec_tree:add(buffer(bufidx, 4), string.format("%s = targetJausID: 0x%X ", bitstr(body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf:le_uint(), 32), body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf:le_uint())) + body_PassthroughMessageList_PassthroughMessageRec_targetJausID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf:le_uint(), 32, 0, 7), bitVal(body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf:le_uint(), 0, 7))) + body_PassthroughMessageList_PassthroughMessageRec_targetJausID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf:le_uint(), 32, 8, 15), bitVal(body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf:le_uint(), 8, 15))) + body_PassthroughMessageList_PassthroughMessageRec_targetJausID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf:le_uint(), 32, 16, 31), bitVal(body_PassthroughMessageList_PassthroughMessageRec_targetJausID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + body_PassthroughMessageList_PassthroughMessageRec_tree:add(buffer(bufidx, 4), string.format("Count: %d, min_count: 2, max_count: 2147483647", buffer(bufidx, 4):le_uint())) + local body_PassthroughMessageList_PassthroughMessageRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + if body_PassthroughMessageList_PassthroughMessageRec_count > buffer:len() - bufidx then + body_PassthroughMessageList_PassthroughMessageRec_count = buffer:len() - bufidx + end + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_PassthroughMessageList_PassthroughMessageRec_count):tvb(), pinfo, tree) + else + local body_PassthroughMessageList_PassthroughMessageRec_passthroughMsg_tree = body_PassthroughMessageList_PassthroughMessageRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_PassthroughMessageList_PassthroughMessageRec_count)) + body_PassthroughMessageList_PassthroughMessageRec_passthroughMsg_tree:append_text(", unknown message") + end + bufidx = bufidx + body_PassthroughMessageList_PassthroughMessageRec_count + end +end +messagetable:add(0xD701, passthroughmessage_d701) + +querypassthroughmessageproperties_d702 = Proto("querypassthroughmessageproperties_d702", "QueryPassthroughMessageProperties 0xd702") +function querypassthroughmessageproperties_d702.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PassthroughMessage_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPassthroughMessageProperties", string.format("QueryPassthroughMessageProperties, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPassthroughMessageProperties")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD702, querypassthroughmessageproperties_d702) + +reportpassthroughmessageproperties_d703 = Proto("reportpassthroughmessageproperties_d703", "ReportPassthroughMessageProperties 0xd703") +function reportpassthroughmessageproperties_d703.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PassthroughMessage_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPassthroughMessageProperties", string.format("ReportPassthroughMessageProperties, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPassthroughMessageProperties")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportPassthroughMessagePropertiesSeq_tree = body_tree:add("ReportPassthroughMessagePropertiesSeq") + local body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_tree = body_ReportPassthroughMessagePropertiesSeq_tree:add("FilterTypeRec") + local body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_FilterType_buf = buffer(bufidx, 2) + local body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_FilterType_tree = body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_tree:add(buffer(bufidx, 2), string.format("%s = FilterType: 0x%X -- (unsigned short integer) A bit field where a high value (1) specifies this filter is used for that purpose", bitstr(body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_FilterType_buf:le_uint(), 16), body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_FilterType_buf:le_uint())) + body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_FilterType_tree:add(buffer(bufidx, 2), string.format("%s = SELF_COLLISION_AVOIDANCE: %d", bitstr_part(body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_FilterType_buf:le_uint(), 16, 0, 0), bitVal(body_ReportPassthroughMessagePropertiesSeq_FilterTypeRec_FilterType_buf:le_uint(), 0, 0))) + bufidx = bufidx + 2 + local bufidx_start_body_ReportPassthroughMessagePropertiesSeq = bufidx + local body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_tree = body_ReportPassthroughMessagePropertiesSeq_tree:add(buffer(bufidx_start_body_ReportPassthroughMessagePropertiesSeq, buffer:len() - bufidx_start_body_ReportPassthroughMessagePropertiesSeq), "MappedComponentList ") + body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportPassthroughMessagePropertiesSeq_counter=1,body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_count do + local body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_tree = body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_tree:add(string.format("MappedComponentRec_%d", body_ReportPassthroughMessagePropertiesSeq_counter - 1)) + local body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_tree = body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X -- (unsigned integer) JAUS ID of the end component for which this service is acting as a filter", bitstr(body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf:le_uint(), 32), body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf:le_uint())) + body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_ReportPassthroughMessagePropertiesSeq_MappedComponentList_MappedComponentRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end +end +messagetable:add(0xD703, reportpassthroughmessageproperties_d703) + +querydoorstatus_d721 = Proto("querydoorstatus_d721", "QueryDoorStatus 0xd721") +function querydoorstatus_d721.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformDoorService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDoorStatus", string.format("QueryDoorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDoorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD721, querydoorstatus_d721) + +setdoorlock_d720 = Proto("setdoorlock_d720", "SetDoorLock 0xd720") +function setdoorlock_d720.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformDoorService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetDoorLock", string.format("SetDoorLock, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetDoorLock")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DoorLockRec_tree = body_tree:add("DoorLockRec") + local value_set = {[0] = "Unlock", [1] = "Lock"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DoorLockRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xD720, setdoorlock_d720) + +reportdoorstatus_d722 = Proto("reportdoorstatus_d722", "ReportDoorStatus 0xd722") +function reportdoorstatus_d722.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformDoorService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDoorStatus", string.format("ReportDoorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDoorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_DoorStatusRec_tree = body_tree:add("DoorStatusRec") + local value_set = {[0] = "Unlocked", [1] = "Locked"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DoorStatusRec_tree:add(buffer(bufidx, 1), string.format("LockStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "False", [1] = "True"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DoorStatusRec_tree:add(buffer(bufidx, 1), string.format("DoorAjar: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xD722, reportdoorstatus_d722) + +setplatformmode_ff20 = Proto("setplatformmode_ff20", "SetPlatformMode 0xff20") +function setplatformmode_ff20.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPlatformMode", string.format("SetPlatformMode, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPlatformMode")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PlatformModeRec_tree = body_tree:add("PlatformModeRec") + local value_set = {[0] = "Standard_Operating", [1] = "Training", [2] = "Maintenance", [3] = "LowPower"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_PlatformModeRec_tree:add(buffer(bufidx, 1), string.format("PlatformMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF20, setplatformmode_ff20) + +queryplatformmode_ff21 = Proto("queryplatformmode_ff21", "QueryPlatformMode 0xff21") +function queryplatformmode_ff21.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPlatformMode", string.format("QueryPlatformMode, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPlatformMode")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF21, queryplatformmode_ff21) + +querysupportedplatformmodes_ff22 = Proto("querysupportedplatformmodes_ff22", "QuerySupportedPlatformModes 0xff22") +function querysupportedplatformmodes_ff22.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySupportedPlatformModes", string.format("QuerySupportedPlatformModes, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySupportedPlatformModes")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF22, querysupportedplatformmodes_ff22) + +querysupportedplatformmodesext_ff2b = Proto("querysupportedplatformmodesext_ff2b", "QuerySupportedPlatformModesExt 0xff2b") +function querysupportedplatformmodesext_ff2b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySupportedPlatformModesExt", string.format("QuerySupportedPlatformModesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySupportedPlatformModesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF2B, querysupportedplatformmodesext_ff2b) + +queryallowedplatformmodetransitions_ff2d = Proto("queryallowedplatformmodetransitions_ff2d", "QueryAllowedPlatformModeTransitions 0xff2d") +function queryallowedplatformmodetransitions_ff2d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAllowedPlatformModeTransitions", string.format("QueryAllowedPlatformModeTransitions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAllowedPlatformModeTransitions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF2D, queryallowedplatformmodetransitions_ff2d) + +setplatformmoderesponse_ff2a = Proto("setplatformmoderesponse_ff2a", "SetPlatformModeResponse 0xff2a") +function setplatformmoderesponse_ff2a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPlatformModeResponse", string.format("SetPlatformModeResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPlatformModeResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PlatformModeResponseRec_tree = body_tree:add("PlatformModeResponseRec") + local value_set = {[0] = "Standard_Operating", [1] = "Training", [2] = "Maintenance", [3] = "LowPower"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_PlatformModeResponseRec_tree:add(buffer(bufidx, 1), string.format("RequestedPlatformMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "Standard_Operating", [1] = "Training", [2] = "Maintenance", [3] = "LowPower"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_PlatformModeResponseRec_tree:add(buffer(bufidx, 1), string.format("StartingPlatformMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "Standard_Operating", [1] = "Training", [2] = "Maintenance", [3] = "LowPower"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_PlatformModeResponseRec_tree:add(buffer(bufidx, 1), string.format("EndingPlatformMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "Success", [1] = "RequestedTransitionNotSupported", [2] = "RequestedTransitionCurrentlyInvalid"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_PlatformModeResponseRec_tree:add(buffer(bufidx, 1), string.format("SetPlatformModeResult: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF2A, setplatformmoderesponse_ff2a) + +reportplatformmode_ff23 = Proto("reportplatformmode_ff23", "ReportPlatformMode 0xff23") +function reportplatformmode_ff23.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPlatformMode", string.format("ReportPlatformMode, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPlatformMode")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportPlatformModeRec_tree = body_tree:add("ReportPlatformModeRec") + local value_set = {[0] = "Standard_Operating", [1] = "Training", [2] = "Maintenance", [3] = "LowPower"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportPlatformModeRec_tree:add(buffer(bufidx, 1), string.format("PlatformMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "Initializing", [1] = "Active", [2] = "Exiting"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportPlatformModeRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF23, reportplatformmode_ff23) + +reportsupportedplatformmodes_ff24 = Proto("reportsupportedplatformmodes_ff24", "ReportSupportedPlatformModes 0xff24") +function reportsupportedplatformmodes_ff24.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSupportedPlatformModes", string.format("ReportSupportedPlatformModes, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSupportedPlatformModes")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SupportedPlatformModesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SupportedPlatformModesList ") + body_SupportedPlatformModesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SupportedPlatformModesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_SupportedPlatformModesList_count do + local body_SupportedPlatformModesList_PlatformModeRec_tree = body_SupportedPlatformModesList_tree:add(string.format("PlatformModeRec_%d", body_counter - 1)) + local value_set = {[0] = "Standard_Operating", [1] = "Training", [2] = "Maintenance", [3] = "LowPower"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SupportedPlatformModesList_PlatformModeRec_tree:add(buffer(bufidx, 1), string.format("PlatformMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xFF24, reportsupportedplatformmodes_ff24) + +reportsupportedplatformmodesext_ff2c = Proto("reportsupportedplatformmodesext_ff2c", "ReportSupportedPlatformModesExt 0xff2c") +function reportsupportedplatformmodesext_ff2c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSupportedPlatformModesExt", string.format("ReportSupportedPlatformModesExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSupportedPlatformModesExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SupportedPlatformModesExtList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SupportedPlatformModesExtList ") + body_SupportedPlatformModesExtList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_SupportedPlatformModesExtList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_SupportedPlatformModesExtList_count do + local body_SupportedPlatformModesExtList_PlatformModeExtRec_tree = body_SupportedPlatformModesExtList_tree:add(string.format("PlatformModeExtRec_%d", body_counter - 1)) + local body_SupportedPlatformModesExtList_PlatformModeExtRec_pv = buffer(bufidx, 1):le_uint() + local body_SupportedPlatformModesExtList_PlatformModeExtRec_pv_count = 0 + body_SupportedPlatformModesExtList_PlatformModeExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "Standard_Operating", [1] = "Training", [2] = "Maintenance", [3] = "LowPower"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SupportedPlatformModesExtList_PlatformModeExtRec_tree:add(buffer(bufidx, 1), string.format("PlatformMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_SupportedPlatformModesExtList_PlatformModeExtRec_pv, body_SupportedPlatformModesExtList_PlatformModeExtRec_pv_count) > 0) then + local body_SupportedPlatformModesExtList_PlatformModeExtRec_Name_tree = body_SupportedPlatformModesExtList_PlatformModeExtRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Name[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_SupportedPlatformModesExtList_PlatformModeExtRec_Name_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 20", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_SupportedPlatformModesExtList_PlatformModeExtRec_pv_count = body_SupportedPlatformModesExtList_PlatformModeExtRec_pv_count + 1 + if (bitAND(body_SupportedPlatformModesExtList_PlatformModeExtRec_pv, body_SupportedPlatformModesExtList_PlatformModeExtRec_pv_count) > 0) then + local body_SupportedPlatformModesExtList_PlatformModeExtRec_Description_tree = body_SupportedPlatformModesExtList_PlatformModeExtRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_SupportedPlatformModesExtList_PlatformModeExtRec_Description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_SupportedPlatformModesExtList_PlatformModeExtRec_pv_count = body_SupportedPlatformModesExtList_PlatformModeExtRec_pv_count + 1 + end +end +messagetable:add(0xFF2C, reportsupportedplatformmodesext_ff2c) + +reportallowedplatformmodetransitions_ff2e = Proto("reportallowedplatformmodetransitions_ff2e", "ReportAllowedPlatformModeTransitions 0xff2e") +function reportallowedplatformmodetransitions_ff2e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformMode_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAllowedPlatformModeTransitions", string.format("ReportAllowedPlatformModeTransitions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAllowedPlatformModeTransitions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_AllowedPlatformModeTransitionsList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "AllowedPlatformModeTransitionsList ") + body_AllowedPlatformModeTransitionsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_AllowedPlatformModeTransitionsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_AllowedPlatformModeTransitionsList_count do + local body_AllowedPlatformModeTransitionsList_AllowedPlatformModeTransitionsRec_tree = body_AllowedPlatformModeTransitionsList_tree:add(string.format("AllowedPlatformModeTransitionsRec_%d", body_counter - 1)) + local value_set = {[0] = "Standard_Operating", [1] = "Training", [2] = "Maintenance", [3] = "LowPower"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_AllowedPlatformModeTransitionsList_AllowedPlatformModeTransitionsRec_tree:add(buffer(bufidx, 1), string.format("EndingPlatformMode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xFF2E, reportallowedplatformmodetransitions_ff2e) + +setplatformstate_ff25 = Proto("setplatformstate_ff25", "SetPlatformState 0xff25") +function setplatformstate_ff25.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformState_V1.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPlatformState", string.format("SetPlatformState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPlatformState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PlatformStateRec_tree = body_tree:add("PlatformStateRec") + local value_set = {[0] = "Initialize", [1] = "Operational", [2] = "Shutdown", [3] = "System_Abort", [4] = "Emergency", [5] = "Render_Useless"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_PlatformStateRec_tree:add(buffer(bufidx, 1), string.format("PlatformState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF25, setplatformstate_ff25) + +queryplatformstate_ff26 = Proto("queryplatformstate_ff26", "QueryPlatformState 0xff26") +function queryplatformstate_ff26.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformState_V1.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPlatformState", string.format("QueryPlatformState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPlatformState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF26, queryplatformstate_ff26) + +confirmplatformstaterequest_ff27 = Proto("confirmplatformstaterequest_ff27", "ConfirmPlatformStateRequest 0xff27") +function confirmplatformstaterequest_ff27.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformState_V1.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmPlatformStateRequest", string.format("ConfirmPlatformStateRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmPlatformStateRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmPlatformStateRec_tree = body_tree:add("ConfirmPlatformStateRec") + local value_set = {[0] = "Initialize", [1] = "Operational", [2] = "Shutdown", [3] = "System_Abort", [4] = "Emergency", [5] = "Render_Useless"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmPlatformStateRec_tree:add(buffer(bufidx, 1), string.format("PlatformState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "Transitioning", [1] = "InvalidState"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmPlatformStateRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF27, confirmplatformstaterequest_ff27) + +reportplatformstate_ff28 = Proto("reportplatformstate_ff28", "ReportPlatformState 0xff28") +function reportplatformstate_ff28.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PlatformState_V1.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPlatformState", string.format("ReportPlatformState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPlatformState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PlatformStateRec_tree = body_tree:add("PlatformStateRec") + local value_set = {[0] = "Initialize", [1] = "Operational", [2] = "Shutdown", [3] = "System_Abort", [4] = "Emergency", [5] = "Render_Useless"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_PlatformStateRec_tree:add(buffer(bufidx, 1), string.format("PlatformState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF28, reportplatformstate_ff28) + +registerpolicy_d735 = Proto("registerpolicy_d735", "RegisterPolicy 0xd735") +function registerpolicy_d735.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PolicyRegistry.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RegisterPolicy", string.format("RegisterPolicy, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RegisterPolicy")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RegisterPolicyRec_tree = body_tree:add("RegisterPolicyRec") + body_RegisterPolicyRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID specified by the client and returned by the service to associate requests and responses", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_RegisterPolicyRec_tree:add(buffer(bufidx, 4), string.format("Count: %d, min_count: 2, max_count: None", buffer(bufidx, 4):le_uint())) + local body_RegisterPolicyRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + if body_RegisterPolicyRec_count > buffer:len() - bufidx then + body_RegisterPolicyRec_count = buffer:len() - bufidx + end + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_RegisterPolicyRec_count):tvb(), pinfo, tree) + else + local body_RegisterPolicyRec_SetPolicyMessage_tree = body_RegisterPolicyRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_RegisterPolicyRec_count)) + body_RegisterPolicyRec_SetPolicyMessage_tree:append_text(", unknown message") + end + bufidx = bufidx + body_RegisterPolicyRec_count +end +messagetable:add(0xD735, registerpolicy_d735) + +queryregisteredpolicy_d736 = Proto("queryregisteredpolicy_d736", "QueryRegisteredPolicy 0xd736") +function queryregisteredpolicy_d736.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PolicyRegistry.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRegisteredPolicy", string.format("QueryRegisteredPolicy, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRegisteredPolicy")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryRegisteredPolicyRec_tree = body_tree:add("QueryRegisteredPolicyRec") + body_QueryRegisteredPolicyRec_tree:add(buffer(bufidx, 1), string.format("PolicyID: %d -- (unsigned byte) ID of the policy to be returned, as generated in the RegisterPolicyResponse", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xD736, queryregisteredpolicy_d736) + +registerpolicyresponse_d737 = Proto("registerpolicyresponse_d737", "RegisterPolicyResponse 0xd737") +function registerpolicyresponse_d737.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PolicyRegistry.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RegisterPolicyResponse", string.format("RegisterPolicyResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RegisterPolicyResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RegisterPolicyResponseRec_tree = body_tree:add("RegisterPolicyResponseRec") + local body_RegisterPolicyResponseRec_pv = buffer(bufidx, 1):le_uint() + local body_RegisterPolicyResponseRec_pv_count = 0 + body_RegisterPolicyResponseRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_RegisterPolicyResponseRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) ID used in the RegisterPolicy message to allow a client to associate requests and responses", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "UNSUPPORTED_POLICY_TYPE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RegisterPolicyResponseRec_tree:add(buffer(bufidx, 1), string.format("Result: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_RegisterPolicyResponseRec_pv, body_RegisterPolicyResponseRec_pv_count) > 0) then + body_RegisterPolicyResponseRec_tree:add(buffer(bufidx, 1), string.format("PolicyID: %d -- (unsigned byte) Unique ID assigned to this policy if successfully registered", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_RegisterPolicyResponseRec_pv_count = body_RegisterPolicyResponseRec_pv_count + 1 +end +messagetable:add(0xD737, registerpolicyresponse_d737) + +reportregisteredpolicy_d734 = Proto("reportregisteredpolicy_d734", "ReportRegisteredPolicy 0xd734") +function reportregisteredpolicy_d734.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PolicyRegistry.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRegisteredPolicy", string.format("ReportRegisteredPolicy, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRegisteredPolicy")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportRegisteredPolicyRec_tree = body_tree:add("ReportRegisteredPolicyRec") + local body_ReportRegisteredPolicyRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportRegisteredPolicyRec_pv_count = 0 + body_ReportRegisteredPolicyRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ReportRegisteredPolicyRec_tree:add(buffer(bufidx, 1), string.format("RequestedPolicyID: %d -- (unsigned byte) ID of the policy requested in the corresponding QueryRegisteredPolicy", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "UNKNOWN_POLICY_ID"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportRegisteredPolicyRec_tree:add(buffer(bufidx, 1), string.format("Result: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_ReportRegisteredPolicyRec_pv, body_ReportRegisteredPolicyRec_pv_count) > 0) then + body_ReportRegisteredPolicyRec_tree:add(buffer(bufidx, 4), string.format("Count: %d, min_count: 2, max_count: None", buffer(bufidx, 4):le_uint())) + local body_ReportRegisteredPolicyRec_count = buffer(bufidx, 4):le_uint() + bufidx = bufidx + 4 + if body_ReportRegisteredPolicyRec_count > buffer:len() - bufidx then + body_ReportRegisteredPolicyRec_count = buffer:len() - bufidx + end + submsgid = buffer(bufidx, 2):le_uint() + local subpacket_dissector = messagetable:get_dissector(submsgid) + if subpacket_dissector ~= nil then + subid_str = subpacket_dissector(buffer(bufidx, body_ReportRegisteredPolicyRec_count):tvb(), pinfo, tree) + else + local body_ReportRegisteredPolicyRec_SetPolicyMessage_tree = body_ReportRegisteredPolicyRec_tree:add(pf_sub_messageid, buffer(bufidx, 2), submsgid, string.format("Included Message, MessageID: 0x%04X, %d bytes", submsgid, body_ReportRegisteredPolicyRec_count)) + body_ReportRegisteredPolicyRec_SetPolicyMessage_tree:append_text(", unknown message") + end + bufidx = bufidx + body_ReportRegisteredPolicyRec_count + end + body_ReportRegisteredPolicyRec_pv_count = body_ReportRegisteredPolicyRec_pv_count + 1 +end +messagetable:add(0xD734, reportregisteredpolicy_d734) + +querypresetposecapabilities_f001 = Proto("querypresetposecapabilities_f001", "QueryPresetPoseCapabilities 0xf001") +function querypresetposecapabilities_f001.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPresetPoseCapabilities", string.format("QueryPresetPoseCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPresetPoseCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF001, querypresetposecapabilities_f001) + +querycurrentpose_f002 = Proto("querycurrentpose_f002", "QueryCurrentPose 0xf002") +function querycurrentpose_f002.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCurrentPose", string.format("QueryCurrentPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCurrentPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF002, querycurrentpose_f002) + +setcurrentpose_f003 = Proto("setcurrentpose_f003", "SetCurrentPose 0xf003") +function setcurrentpose_f003.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetCurrentPose", string.format("SetCurrentPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetCurrentPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetCurrentPoseRec_tree = body_tree:add("SetCurrentPoseRec") + body_SetCurrentPoseRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Unique identifier associated with the SetCurrentPose request.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_SetCurrentPoseRec_tree:add(buffer(bufidx, 1), string.format("PoseID: %d -- (unsigned byte) The ID of the pose to transition to. A value of 255 will cancel any pose transitions in progress.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF003, setcurrentpose_f003) + +querypresetposespecifications_f005 = Proto("querypresetposespecifications_f005", "QueryPresetPoseSpecifications 0xf005") +function querypresetposespecifications_f005.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPresetPoseSpecifications", string.format("QueryPresetPoseSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPresetPoseSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF005, querypresetposespecifications_f005) + +updatepresetpose_f006 = Proto("updatepresetpose_f006", "UpdatePresetPose 0xf006") +function updatepresetpose_f006.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "UpdatePresetPose", string.format("UpdatePresetPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "UpdatePresetPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_UpdatePresetPoseSequence_tree = body_tree:add("UpdatePresetPoseSequence") + local body_UpdatePresetPoseSequence_UpdatePresetPoseRecord_tree = body_UpdatePresetPoseSequence_tree:add("UpdatePresetPoseRecord") + local value_set = {[0] = "ADD_PRESET_POSE", [1] = "REMOVE_PRESET_POSE", [2] = "UPDATE_PRESET_POSE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_UpdatePresetPoseSequence_UpdatePresetPoseRecord_tree:add(buffer(bufidx, 1), string.format("OperationType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local bufidx_start_body_UpdatePresetPoseSequence = bufidx + local body_UpdatePresetPoseSequence_PoseList_tree = body_UpdatePresetPoseSequence_tree:add(buffer(bufidx_start_body_UpdatePresetPoseSequence, buffer:len() - bufidx_start_body_UpdatePresetPoseSequence), "PoseList -- List of custom poses to add.") + body_UpdatePresetPoseSequence_PoseList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_UpdatePresetPoseSequence_PoseList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_UpdatePresetPoseSequence_counter=1,body_UpdatePresetPoseSequence_PoseList_count do + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_tree = body_UpdatePresetPoseSequence_PoseList_tree:add(string.format("PresetPoseSeq_%d", body_UpdatePresetPoseSequence_counter - 1)) + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPoseRec_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_tree:add("PresetPoseRec") + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPoseRec_tree:add(buffer(bufidx, 1), string.format("PoseID: %d -- (unsigned byte) Unique integer identifier of the pose. No Pose ID within the PoseList should be the same. A value of 255 is not permitted.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPoseRec_PoseName_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPoseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("PoseName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPoseRec_PoseName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq = bufidx + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_tree:add(buffer(bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq, buffer:len() - bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq), "TransitionList ") + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_counter=1,body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_count do + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_tree:add(string.format("TransitionRec_%d", body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_counter - 1)) + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_tree:add(buffer(bufidx, 1), string.format("StartPoseID: %d -- (unsigned byte) Unique identifier of the start pose for the transition. A value of 255 indicates an arbitrary or unknown starting pose; consequently the transition is valid from any starting position.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_tree:add(buffer(bufidx, 1), string.format("EndPoseID: %d -- (unsigned byte) Unique identifier of the end pose for the transition. Note that this field is scheduled for removal in future messages. Implementations are encouraged to define transitions such that EndPoseID is the same as PoseID. Consequently, each pose is defined with a list of valid incoming transitions.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf = buffer(bufidx, 1) + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_tree:add(buffer(bufidx, 1), string.format("%s = TransitionProperties: 0x%X -- (unsigned byte) This field specifies properties of the transition between two different poses.", bitstr(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf:le_uint(), 8), body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf:le_uint())) + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_tree:add(buffer(bufidx, 1), string.format("%s = Reserved: %d", bitstr_part(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf:le_uint(), 8, 0, 7), bitVal(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf:le_uint(), 0, 7))) + bufidx = bufidx + 1 + end + local bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq = bufidx + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_tree:add(buffer(bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq, buffer:len() - bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq), "PresetPositionsList ") + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_counter=1,body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_count do + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_tree:add(string.format("PresetPositionsSeq_%d", body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_counter - 1)) + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_tree:add("PresetPositionsRec") + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X -- (unsigned integer) JAUS ID of the component that the listed preset positions are associated with", bitstr(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 32), body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint())) + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_tree:add("PresetPositionsVar") + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 3", buffer(bufidx, 1):le_uint())) + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_index == 0) then + local bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar = bufidx + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add(buffer(bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar, buffer:len() - bufidx_start_body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar), "JointPositionList ") + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_counter=1,body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_count do + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_JointPositionRec_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_tree:add(string.format("JointPositionRec_%d", body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "radian", [2] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -25, [2] = -10} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointPosition_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointPosition_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointPosition_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + end + if (body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_index == 1) then + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add("EndEffectorPoseRec") + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + if (body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_index == 2) then + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_PanTiltJointPositionRec_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add("PanTiltJointPositionRec") + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint1Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint2Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + end + if (body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_index == 3) then + local body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_StabilizerPositionRec_tree = body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add("StabilizerPositionRec") + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_StabilizerPositionRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_UpdatePresetPoseSequence_PoseList_PresetPoseSeq_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_StabilizerPositionRec_tree:add(buffer(bufidx, 2), string.format("Position: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + end + end +end +messagetable:add(0xF006, updatepresetpose_f006) + +reportpresetposecapabilities_f0f1 = Proto("reportpresetposecapabilities_f0f1", "ReportPresetPoseCapabilities 0xf0f1") +function reportpresetposecapabilities_f0f1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPresetPoseCapabilities", string.format("ReportPresetPoseCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPresetPoseCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_PoseList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "PoseList ") + body_PoseList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_PoseList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_PoseList_count do + local body_PoseList_PresetPoseSeq_tree = body_PoseList_tree:add(string.format("PresetPoseSeq_%d", body_counter - 1)) + local body_PoseList_PresetPoseSeq_PresetPoseRec_tree = body_PoseList_PresetPoseSeq_tree:add("PresetPoseRec") + body_PoseList_PresetPoseSeq_PresetPoseRec_tree:add(buffer(bufidx, 1), string.format("PoseID: %d -- (unsigned byte) Unique integer identifier of the pose. No Pose ID within the PoseList should be the same. A value of 255 is not permitted.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_PoseList_PresetPoseSeq_PresetPoseRec_PoseName_tree = body_PoseList_PresetPoseSeq_PresetPoseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("PoseName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_PoseList_PresetPoseSeq_PresetPoseRec_PoseName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local bufidx_start_body_PoseList_PresetPoseSeq = bufidx + local body_PoseList_PresetPoseSeq_TransitionList_tree = body_PoseList_PresetPoseSeq_tree:add(buffer(bufidx_start_body_PoseList_PresetPoseSeq, buffer:len() - bufidx_start_body_PoseList_PresetPoseSeq), "TransitionList ") + body_PoseList_PresetPoseSeq_TransitionList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_PoseList_PresetPoseSeq_TransitionList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_PoseList_PresetPoseSeq_counter=1,body_PoseList_PresetPoseSeq_TransitionList_count do + local body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_tree = body_PoseList_PresetPoseSeq_TransitionList_tree:add(string.format("TransitionRec_%d", body_PoseList_PresetPoseSeq_counter - 1)) + body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_tree:add(buffer(bufidx, 1), string.format("StartPoseID: %d -- (unsigned byte) Unique identifier of the start pose for the transition. A value of 255 indicates an arbitrary or unknown starting pose; consequently the transition is valid from any starting position.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_tree:add(buffer(bufidx, 1), string.format("EndPoseID: %d -- (unsigned byte) Unique identifier of the end pose for the transition. Note that this field is scheduled for removal in future messages. Implementations are encouraged to define transitions such that EndPoseID is the same as PoseID. Consequently, each pose is defined with a list of valid incoming transitions.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf = buffer(bufidx, 1) + local body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_tree = body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_tree:add(buffer(bufidx, 1), string.format("%s = TransitionProperties: 0x%X -- (unsigned byte) This field specifies properties of the transition between two different poses.", bitstr(body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf:le_uint(), 8), body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf:le_uint())) + body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_tree:add(buffer(bufidx, 1), string.format("%s = Reserved: %d", bitstr_part(body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf:le_uint(), 8, 0, 7), bitVal(body_PoseList_PresetPoseSeq_TransitionList_TransitionRec_TransitionProperties_buf:le_uint(), 0, 7))) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0xF0F1, reportpresetposecapabilities_f0f1) + +reportcurrentpose_f0f2 = Proto("reportcurrentpose_f0f2", "ReportCurrentPose 0xf0f2") +function reportcurrentpose_f0f2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCurrentPose", string.format("ReportCurrentPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCurrentPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportCurrentPoseVar_tree = body_tree:add("ReportCurrentPoseVar") + body_ReportCurrentPoseVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_index == 0) then + local body_ReportCurrentPoseVar_CurrentPoseRec_tree = body_ReportCurrentPoseVar_tree:add("CurrentPoseRec") + body_ReportCurrentPoseVar_CurrentPoseRec_tree:add(buffer(bufidx, 1), string.format("CurrentStateID: %d -- (unsigned byte) Unique identifier of the current pose. A value of 255 shall indicate an unknown, arbitrary, or unavailable pose.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + if (body_index == 1) then + local body_ReportCurrentPoseVar_CurrentTransitionRec_tree = body_ReportCurrentPoseVar_tree:add("CurrentTransitionRec") + body_ReportCurrentPoseVar_CurrentTransitionRec_tree:add(buffer(bufidx, 1), string.format("StartStateID: %d -- (unsigned byte) Unique identifier of the start pose for the transition. A value of 255 indicates an arbitrary or unknown starting pose.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ReportCurrentPoseVar_CurrentTransitionRec_tree:add(buffer(bufidx, 1), string.format("EndStateID: %d -- (unsigned byte) Unique Identifier of the end pose for the transition.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0xF0F2, reportcurrentpose_f0f2) + +reporttransitioncompleted_f0f4 = Proto("reporttransitioncompleted_f0f4", "ReportTransitionCompleted 0xf0f4") +function reporttransitioncompleted_f0f4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTransitionCompleted", string.format("ReportTransitionCompleted, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTransitionCompleted")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TransitionCompletedRec_tree = body_tree:add("TransitionCompletedRec") + body_TransitionCompletedRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Unique identifier associated with a SetCurrentPose request.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "TRANSITION_COMPLETED", [1] = "INVALID_TRANSITION", [2] = "UNRECOGNIZED_POSE", [3] = "TRANSITION_FAILED", [4] = "TRANSITION_FAILED_ORIGINAL_POSE_RESTORED", [5] = "TRANSITION_TIMED_OUT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_TransitionCompletedRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xF0F4, reporttransitioncompleted_f0f4) + +reportpresetposespecifications_f0f5 = Proto("reportpresetposespecifications_f0f5", "ReportPresetPoseSpecifications 0xf0f5") +function reportpresetposespecifications_f0f5.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPresetPoseSpecifications", string.format("ReportPresetPoseSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPresetPoseSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_PresetPoseSpecificationsList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "PresetPoseSpecificationsList ") + body_PresetPoseSpecificationsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_PresetPoseSpecificationsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_PresetPoseSpecificationsList_count do + local body_PresetPoseSpecificationsList_PresetPoseSequence_tree = body_PresetPoseSpecificationsList_tree:add(string.format("PresetPoseSequence_%d", body_counter - 1)) + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPoseRec_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_tree:add("PresetPoseRec") + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPoseRec_tree:add(buffer(bufidx, 1), string.format("PoseID: %d -- (unsigned byte) The ID of the pose. A value of 255 is not permitted.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPoseRec_PoseName_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPoseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("PoseName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPoseRec_PoseName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local bufidx_start_body_PresetPoseSpecificationsList_PresetPoseSequence = bufidx + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_tree:add(buffer(bufidx_start_body_PresetPoseSpecificationsList_PresetPoseSequence, buffer:len() - bufidx_start_body_PresetPoseSpecificationsList_PresetPoseSequence), "PresetPositionsList ") + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_PresetPoseSpecificationsList_PresetPoseSequence_counter=1,body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_count do + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_tree:add(string.format("PresetPositionsSeq_%d", body_PresetPoseSpecificationsList_PresetPoseSequence_counter - 1)) + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_tree:add("PresetPositionsRec") + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X -- (unsigned integer) JAUS ID of the component that the listed preset positions are associated with", bitstr(body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 32), body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint())) + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_tree:add("PresetPositionsVar") + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 3", buffer(bufidx, 1):le_uint())) + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_index == 0) then + local bufidx_start_body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar = bufidx + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add(buffer(bufidx_start_body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar, buffer:len() - bufidx_start_body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar), "JointPositionList ") + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_counter=1,body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_count do + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_JointPositionRec_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_tree:add(string.format("JointPositionRec_%d", body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "radian", [2] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -25, [2] = -10} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointPosition_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointPosition_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointPosition_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + end + if (body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_index == 1) then + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add("EndEffectorPoseRec") + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + if (body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_index == 2) then + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_PanTiltJointPositionRec_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add("PanTiltJointPositionRec") + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint1Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint2Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + end + if (body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_index == 3) then + local body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_StabilizerPositionRec_tree = body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_tree:add("StabilizerPositionRec") + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_StabilizerPositionRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_PresetPoseSpecificationsList_PresetPoseSequence_PresetPositionsList_PresetPositionsSeq_PresetPositionsVar_StabilizerPositionRec_tree:add(buffer(bufidx, 2), string.format("Position: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + end + end +end +messagetable:add(0xF0F5, reportpresetposespecifications_f0f5) + +confirmupdatepresetpose_f0f6 = Proto("confirmupdatepresetpose_f0f6", "ConfirmUpdatePresetPose 0xf0f6") +function confirmupdatepresetpose_f0f6.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PresetPose_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmUpdatePresetPose", string.format("ConfirmUpdatePresetPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmUpdatePresetPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmPresetPoseSequence_tree = body_tree:add("ConfirmPresetPoseSequence") + local body_ConfirmPresetPoseSequence_pv = buffer(bufidx, 1):le_uint() + local body_ConfirmPresetPoseSequence_pv_count = 0 + body_ConfirmPresetPoseSequence_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_ConfirmPresetPoseSequence_ResultRec_tree = body_ConfirmPresetPoseSequence_tree:add("ResultRec") + local value_set = {[0] = "SUCCESS", [1] = "FAILURE", [2] = "CUSTOM_POSES_NOT_SUPPORTED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmPresetPoseSequence_ResultRec_tree:add(buffer(bufidx, 1), string.format("Result: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_ConfirmPresetPoseSequence_pv, body_ConfirmPresetPoseSequence_pv_count) > 0) then + local bufidx_start_body_ConfirmPresetPoseSequence = bufidx + local body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_tree = body_ConfirmPresetPoseSequence_tree:add(buffer(bufidx_start_body_ConfirmPresetPoseSequence, buffer:len() - bufidx_start_body_ConfirmPresetPoseSequence), "ConfirmPresetPoseList ") + body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ConfirmPresetPoseSequence_counter=1,body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_count do + local body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_ConfirmPresetPoseRec_tree = body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_tree:add(string.format("ConfirmPresetPoseRec_%d", body_ConfirmPresetPoseSequence_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_ConfirmPresetPoseRec_tree:add(buffer(bufidx, 1), string.format("PoseID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "CANNOT_UPDATE_NON_EXISTING_POSE", [2] = "CANNOT_CREATE_EXISTING_POSE", [3] = "CANNOT_REMOVE_NON_EXISTING_POSE", [4] = "THIS_POSE_CANT_BE_DELETED", [5] = "THIS_POSE_CANT_BE_UPDATED", [6] = "INVALID_POSE_INFORMATION"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_ConfirmPresetPoseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_ConfirmPresetPoseRec_ResponseDescription_tree = body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_ConfirmPresetPoseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseDescription[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ConfirmPresetPoseSequence_ConfirmPresetPoseList_ConfirmPresetPoseRec_ResponseDescription_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + end + body_ConfirmPresetPoseSequence_pv_count = body_ConfirmPresetPoseSequence_pv_count + 1 +end +messagetable:add(0xF0F6, confirmupdatepresetpose_f0f6) + +setprimitivegripper_d99a = Proto("setprimitivegripper_d99a", "SetPrimitiveGripper 0xd99a") +function setprimitivegripper_d99a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PrimitiveGripper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPrimitiveGripper", string.format("SetPrimitiveGripper, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPrimitiveGripper")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PrimitiveGripperRec_tree = body_tree:add("PrimitiveGripperRec") + body_PrimitiveGripperRec_tree:add(buffer(bufidx, 4), string.format("CommandedGripForce: %.4f (scaled) -- (unsigned integer) Commanded force to be applied across all points of contact between the gripper and object", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0xD99A, setprimitivegripper_d99a) + +queryprimitivegripper_d99b = Proto("queryprimitivegripper_d99b", "QueryPrimitiveGripper 0xd99b") +function queryprimitivegripper_d99b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PrimitiveGripper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPrimitiveGripper", string.format("QueryPrimitiveGripper, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPrimitiveGripper")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD99B, queryprimitivegripper_d99b) + +queryprimitivegripperspecification_d99c = Proto("queryprimitivegripperspecification_d99c", "QueryPrimitiveGripperSpecification 0xd99c") +function queryprimitivegripperspecification_d99c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PrimitiveGripper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPrimitiveGripperSpecification", string.format("QueryPrimitiveGripperSpecification, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPrimitiveGripperSpecification")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD99C, queryprimitivegripperspecification_d99c) + +reportprimitivegripper_d99d = Proto("reportprimitivegripper_d99d", "ReportPrimitiveGripper 0xd99d") +function reportprimitivegripper_d99d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PrimitiveGripper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPrimitiveGripper", string.format("ReportPrimitiveGripper, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPrimitiveGripper")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportPrimitiveGripperSeq_tree = body_tree:add("ReportPrimitiveGripperSeq") + local body_ReportPrimitiveGripperSeq_PrimitiveGripperRec_tree = body_ReportPrimitiveGripperSeq_tree:add("PrimitiveGripperRec") + body_ReportPrimitiveGripperSeq_PrimitiveGripperRec_tree:add(buffer(bufidx, 4), string.format("CommandedGripForce: %.4f (scaled) -- (unsigned integer) Commanded force to be applied across all points of contact between the gripper and object", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + local bufidx_start_body_ReportPrimitiveGripperSeq = bufidx + local body_ReportPrimitiveGripperSeq_GripForceList_tree = body_ReportPrimitiveGripperSeq_tree:add(buffer(bufidx_start_body_ReportPrimitiveGripperSeq, buffer:len() - bufidx_start_body_ReportPrimitiveGripperSeq), "GripForceList ") + body_ReportPrimitiveGripperSeq_GripForceList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportPrimitiveGripperSeq_GripForceList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportPrimitiveGripperSeq_counter=1,body_ReportPrimitiveGripperSeq_GripForceList_count do + local body_ReportPrimitiveGripperSeq_GripForceList_GripForceRec_tree = body_ReportPrimitiveGripperSeq_GripForceList_tree:add(string.format("GripForceRec_%d", body_ReportPrimitiveGripperSeq_counter - 1)) + body_ReportPrimitiveGripperSeq_GripForceList_GripForceRec_tree:add(buffer(bufidx, 4), string.format("CurrentGripForce: %.4f (scaled) -- (unsigned integer) Actual force currently being applied at this point of contact", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end +end +messagetable:add(0xD99D, reportprimitivegripper_d99d) + +reportprimitivegripperspecification_d99e = Proto("reportprimitivegripperspecification_d99e", "ReportPrimitiveGripperSpecification 0xd99e") +function reportprimitivegripperspecification_d99e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/PrimitiveGripper.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPrimitiveGripperSpecification", string.format("ReportPrimitiveGripperSpecification, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPrimitiveGripperSpecification")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SpecificationRec_tree = body_tree:add("SpecificationRec") + local body_SpecificationRec_ParentId_buf = buffer(bufidx, 4) + local body_SpecificationRec_ParentId_tree = body_SpecificationRec_tree:add(buffer(bufidx, 4), string.format("%s = ParentId: 0x%X -- (unsigned integer) 4 byte JAUS identifier of the manipulator on which this end effector is mounted", bitstr(body_SpecificationRec_ParentId_buf:le_uint(), 32), body_SpecificationRec_ParentId_buf:le_uint())) + body_SpecificationRec_ParentId_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_SpecificationRec_ParentId_buf:le_uint(), 32, 0, 7), bitVal(body_SpecificationRec_ParentId_buf:le_uint(), 0, 7))) + body_SpecificationRec_ParentId_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_SpecificationRec_ParentId_buf:le_uint(), 32, 8, 15), bitVal(body_SpecificationRec_ParentId_buf:le_uint(), 8, 15))) + body_SpecificationRec_ParentId_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_SpecificationRec_ParentId_buf:le_uint(), 32, 16, 31), bitVal(body_SpecificationRec_ParentId_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 +end +messagetable:add(0xD99E, reportprimitivegripperspecification_d99e) + +queryrefuelingarmcapabilities_da00 = Proto("queryrefuelingarmcapabilities_da00", "QueryRefuelingArmCapabilities 0xda00") +function queryrefuelingarmcapabilities_da00.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RefuelingArmStateDriver_IOP_V5_0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRefuelingArmCapabilities", string.format("QueryRefuelingArmCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRefuelingArmCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDA00, queryrefuelingarmcapabilities_da00) + +queryrefuelingarmstatus_da01 = Proto("queryrefuelingarmstatus_da01", "QueryRefuelingArmStatus 0xda01") +function queryrefuelingarmstatus_da01.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RefuelingArmStateDriver_IOP_V5_0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRefuelingArmStatus", string.format("QueryRefuelingArmStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRefuelingArmStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDA01, queryrefuelingarmstatus_da01) + +setrefuelingarmconfiguration_da02 = Proto("setrefuelingarmconfiguration_da02", "SetRefuelingArmConfiguration 0xda02") +function setrefuelingarmconfiguration_da02.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RefuelingArmStateDriver_IOP_V5_0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetRefuelingArmConfiguration", string.format("SetRefuelingArmConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetRefuelingArmConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetRefuelingArmConfigurationRec_tree = body_tree:add("SetRefuelingArmConfigurationRec") + body_SetRefuelingArmConfigurationRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Locally unique request ID for identifying the refueling arm state request", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "STOW", [1] = "GO_TO_READY", [2] = "SCAN", [3] = "ENGAGE_PORT", [4] = "DISENGAGE_PORT", [5] = "ABORT", [6] = "PAUSE", [7] = "RESUME", [8] = "RETRY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetRefuelingArmConfigurationRec_tree:add(buffer(bufidx, 1), string.format("RefuelingArmCommand: %d [%s] -- (byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDA02, setrefuelingarmconfiguration_da02) + +reportrefuelingarmcapabilities_da03 = Proto("reportrefuelingarmcapabilities_da03", "ReportRefuelingArmCapabilities 0xda03") +function reportrefuelingarmcapabilities_da03.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RefuelingArmStateDriver_IOP_V5_0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRefuelingArmCapabilities", string.format("ReportRefuelingArmCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRefuelingArmCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RefuelingArmCapabilitiesRec_tree = body_tree:add("RefuelingArmCapabilitiesRec") + local body_RefuelingArmCapabilitiesRec_RefuelingArmCapabilities_buf = buffer(bufidx, 1) + local body_RefuelingArmCapabilitiesRec_RefuelingArmCapabilities_tree = body_RefuelingArmCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = RefuelingArmCapabilities: 0x%X -- (unsigned byte) Capabilities of the refueling arm.", bitstr(body_RefuelingArmCapabilitiesRec_RefuelingArmCapabilities_buf:le_uint(), 8), body_RefuelingArmCapabilitiesRec_RefuelingArmCapabilities_buf:le_uint())) + body_RefuelingArmCapabilitiesRec_RefuelingArmCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = RetryStepCapabilities: %d", bitstr_part(body_RefuelingArmCapabilitiesRec_RefuelingArmCapabilities_buf:le_uint(), 8, 0, 0), bitVal(body_RefuelingArmCapabilitiesRec_RefuelingArmCapabilities_buf:le_uint(), 0, 0))) + bufidx = bufidx + 1 +end +messagetable:add(0xDA03, reportrefuelingarmcapabilities_da03) + +setrefuelingarmconfigurationresponse_da04 = Proto("setrefuelingarmconfigurationresponse_da04", "SetRefuelingArmConfigurationResponse 0xda04") +function setrefuelingarmconfigurationresponse_da04.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RefuelingArmStateDriver_IOP_V5_0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetRefuelingArmConfigurationResponse", string.format("SetRefuelingArmConfigurationResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetRefuelingArmConfigurationResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetRefuelingArmConfigurationResponseRec_tree = body_tree:add("SetRefuelingArmConfigurationResponseRec") + body_SetRefuelingArmConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Request ID from the SetRefuelingArmConfiguration message issuing a command to the refueling arm", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "EXECUTING", [1] = "IN_COMMANDED_STATE", [2] = "INVALID_CONFIGURATION_FOR_STATE", [3] = "SYSTEM_FAILURE", [4] = "NOT_SUPPORTED", [5] = "SYSTEM_PAUSED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetRefuelingArmConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDA04, setrefuelingarmconfigurationresponse_da04) + +reportrefuelingarmstatus_da05 = Proto("reportrefuelingarmstatus_da05", "ReportRefuelingArmStatus 0xda05") +function reportrefuelingarmstatus_da05.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RefuelingArmStateDriver_IOP_V5_0.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRefuelingArmStatus", string.format("ReportRefuelingArmStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRefuelingArmStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportRefuelingArmStatusRec_tree = body_tree:add("ReportRefuelingArmStatusRec") + local body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf = buffer(bufidx, 1) + local body_ReportRefuelingArmStatusRec_RefuelingArmStatus_tree = body_ReportRefuelingArmStatusRec_tree:add(buffer(bufidx, 1), string.format("%s = RefuelingArmStatus: 0x%X -- (unsigned byte) Status of the refueling arm.", bitstr(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 8), body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint())) + body_ReportRefuelingArmStatusRec_RefuelingArmStatus_tree:add(buffer(bufidx, 1), string.format("%s = CurrentRefuelingArmState: %d", bitstr_part(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 8, 0, 3), bitVal(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 0, 3))) + body_ReportRefuelingArmStatusRec_RefuelingArmStatus_tree:add(buffer(bufidx, 1), string.format("%s = StepPausedStatus: %d", bitstr_part(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 8, 4, 4), bitVal(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 4, 4))) + body_ReportRefuelingArmStatusRec_RefuelingArmStatus_tree:add(buffer(bufidx, 1), string.format("%s = FailureStatus: %d", bitstr_part(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 8, 5, 6), bitVal(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 5, 6))) + body_ReportRefuelingArmStatusRec_RefuelingArmStatus_tree:add(buffer(bufidx, 1), string.format("%s = AbortStatus: %d", bitstr_part(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 8, 7, 7), bitVal(body_ReportRefuelingArmStatusRec_RefuelingArmStatus_buf:le_uint(), 7, 7))) + bufidx = bufidx + 1 +end +messagetable:add(0xDA05, reportrefuelingarmstatus_da05) + +renderuseless_ffd7 = Proto("renderuseless_ffd7", "RenderUseless 0xffd7") +function renderuseless_ffd7.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RenderUseless_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RenderUseless", string.format("RenderUseless, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RenderUseless")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFFD7, renderuseless_ffd7) + +queryrenderuseless_ffd9 = Proto("queryrenderuseless_ffd9", "QueryRenderUseless 0xffd9") +function queryrenderuseless_ffd9.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RenderUseless_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRenderUseless", string.format("QueryRenderUseless, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRenderUseless")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFFD9, queryrenderuseless_ffd9) + +queryrenderuselesscapabilities_ffdb = Proto("queryrenderuselesscapabilities_ffdb", "QueryRenderUselessCapabilities 0xffdb") +function queryrenderuselesscapabilities_ffdb.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RenderUseless_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryRenderUselessCapabilities", string.format("QueryRenderUselessCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryRenderUselessCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFFDB, queryrenderuselesscapabilities_ffdb) + +confirmrenderuselessrequest_ffd8 = Proto("confirmrenderuselessrequest_ffd8", "ConfirmRenderUselessRequest 0xffd8") +function confirmrenderuselessrequest_ffd8.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RenderUseless_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmRenderUselessRequest", string.format("ConfirmRenderUselessRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmRenderUselessRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFFD8, confirmrenderuselessrequest_ffd8) + +reportrenderuseless_ffda = Proto("reportrenderuseless_ffda", "ReportRenderUseless 0xffda") +function reportrenderuseless_ffda.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RenderUseless_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRenderUseless", string.format("ReportRenderUseless, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRenderUseless")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RenderUselessStateRec_tree = body_tree:add("RenderUselessStateRec") + local value_set = {[0] = "Normal", [1] = "RenderedUseless", [2] = "RenderUselessFailed"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RenderUselessStateRec_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RenderUselessStateRec_ErrorString_tree = body_RenderUselessStateRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ErrorString[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RenderUselessStateRec_ErrorString_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() +end +messagetable:add(0xFFDA, reportrenderuseless_ffda) + +reportrenderuselesscapabilities_ffdc = Proto("reportrenderuselesscapabilities_ffdc", "ReportRenderUselessCapabilities 0xffdc") +function reportrenderuselesscapabilities_ffdc.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/RenderUseless_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportRenderUselessCapabilities", string.format("ReportRenderUselessCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportRenderUselessCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RenderUselessCapabilitiesRec_tree = body_tree:add("RenderUselessCapabilitiesRec") + local body_RenderUselessCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_RenderUselessCapabilitiesRec_pv_count = 0 + body_RenderUselessCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_RenderUselessCapabilitiesRec_pv, body_RenderUselessCapabilitiesRec_pv_count) > 0) then + local body_RenderUselessCapabilitiesRec_authenticationServiceURI_tree = body_RenderUselessCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("authenticationServiceURI[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RenderUselessCapabilitiesRec_authenticationServiceURI_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_RenderUselessCapabilitiesRec_pv_count = body_RenderUselessCapabilitiesRec_pv_count + 1 +end +messagetable:add(0xFFDC, reportrenderuselesscapabilities_ffdc) + +queryseismicsensorstatus_dab7 = Proto("queryseismicsensorstatus_dab7", "QuerySeismicSensorStatus 0xdab7") +function queryseismicsensorstatus_dab7.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SeismicSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySeismicSensorStatus", string.format("QuerySeismicSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySeismicSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QuerySeismicSensorList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QuerySeismicSensorList ") + body_QuerySeismicSensorList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_QuerySeismicSensorList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_QuerySeismicSensorList_count do + local body_QuerySeismicSensorList_QuerySeismicSensorRec_tree = body_QuerySeismicSensorList_tree:add(string.format("QuerySeismicSensorRec_%d", body_counter - 1)) + body_QuerySeismicSensorList_QuerySeismicSensorRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the seismic sensor to be queried. A value of zero (0) implies all sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end +end +messagetable:add(0xDAB7, queryseismicsensorstatus_dab7) + +reportseismicsensorstatus_dab8 = Proto("reportseismicsensorstatus_dab8", "ReportSeismicSensorStatus 0xdab8") +function reportseismicsensorstatus_dab8.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SeismicSensor_V3.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSeismicSensorStatus", string.format("ReportSeismicSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSeismicSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SeismicSensorStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SeismicSensorStatusList ") + body_SeismicSensorStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_SeismicSensorStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_SeismicSensorStatusList_count do + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_tree = body_SeismicSensorStatusList_tree:add(string.format("SeismicSensorStatusSeq_%d", body_counter - 1)) + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_tree = body_SeismicSensorStatusList_SeismicSensorStatusSeq_tree:add("SeismicSensorStatusRec") + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_pv_count = 0 + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_tree:add(buffer(bufidx, 2), string.format("SensorID: %d -- (unsigned short integer) ID of the seismic sensor to be queried. A value of zero (0) is not permitted.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + if (bitAND(body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_pv, body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_pv_count) > 0) then + local value_set = {[0] = "SensorRelative", [1] = "VehicleRelative", [2] = "GlobalRelative"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("CoordinateFrameEnum: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_pv_count = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorStatusRec_pv_count + 1 + local bufidx_start_body_SeismicSensorStatusList_SeismicSensorStatusSeq = bufidx + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_tree = body_SeismicSensorStatusList_SeismicSensorStatusSeq_tree:add(buffer(bufidx_start_body_SeismicSensorStatusList_SeismicSensorStatusSeq, buffer:len() - bufidx_start_body_SeismicSensorStatusList_SeismicSensorStatusSeq), "SeismicSensorDataList ") + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_SeismicSensorStatusList_SeismicSensorStatusSeq_counter=1,body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_count do + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_tree:add(string.format("SeismicSensorDataRec_%d", body_SeismicSensorStatusList_SeismicSensorStatusSeq_counter - 1)) + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv = buffer(bufidx, 1):le_uint() + local body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count = 0 + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv, body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count) > 0) then + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree:add(buffer(bufidx, 4), string.format("Range: %.4f (scaled) -- (unsigned integer) distance to the detected seismic signal source", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count + 1 + if (bitAND(body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv, body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count) > 0) then + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree:add(buffer(bufidx, 4), string.format("Bearing: %.4f (scaled) -- (unsigned integer) bearing (rotation about the Z axis) to the detected seismic signal source", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count + 1 + if (bitAND(body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv, body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count) > 0) then + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree:add(buffer(bufidx, 4), string.format("Elevation: %.4f (scaled) -- (unsigned integer) elevation (rotation about the Y axis) to the detected seismic signal source", buffer(bufidx, 4):le_uint() * 0.000000001463 + (-3.141592653590))) + bufidx = bufidx + 4 + end + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count + 1 + if (bitAND(body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv, body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4} + local unit_set = {[0] = "meter per second squared", [1] = "volt per meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {} + local bias_set_tabe = {} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Intensity_tree = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Intensity: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Intensity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Intensity_tree = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Intensity: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Intensity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Intensity_tree = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Intensity: %d %s", value, unit_list(type_value))) + Intensity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count + 1 + if (bitAND(body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv, body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count) > 0) then + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_tree:add(buffer(bufidx, 1), string.format("Characterization: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count = body_SeismicSensorStatusList_SeismicSensorStatusSeq_SeismicSensorDataList_SeismicSensorDataRec_pv_count + 1 + end + end +end +messagetable:add(0xDAB8, reportseismicsensorstatus_dab8) + +setselfcollisionavoidancepolicy_c521 = Proto("setselfcollisionavoidancepolicy_c521", "SetSelfCollisionAvoidancePolicy 0xc521") +function setselfcollisionavoidancepolicy_c521.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SelfCollisionAvoidance_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSelfCollisionAvoidancePolicy", string.format("SetSelfCollisionAvoidancePolicy, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSelfCollisionAvoidancePolicy")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SelfCollisionAvoidancePolicySeq_tree = body_tree:add("SelfCollisionAvoidancePolicySeq") + local body_SelfCollisionAvoidancePolicySeq_SelfCollisionAvoidancePolicyRec_tree = body_SelfCollisionAvoidancePolicySeq_tree:add("SelfCollisionAvoidancePolicyRec") + body_SelfCollisionAvoidancePolicySeq_SelfCollisionAvoidancePolicyRec_tree:add(buffer(bufidx, 1), string.format("Local_ID: %d -- (unsigned byte) A request identifier that will be returned in the response message. This field allows the client to coordinate requests and responses.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_SelfCollisionAvoidancePolicySeq_SelfCollisionAvoidanceRec_tree = body_SelfCollisionAvoidancePolicySeq_tree:add("SelfCollisionAvoidanceRec") + local value_set = {[0] = "DoNothing", [1] = "StopOnPath", [2] = "DeviateFromPathToAvoidCollisions"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SelfCollisionAvoidancePolicySeq_SelfCollisionAvoidanceRec_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_SelfCollisionAvoidancePolicySeq_SelfCollisionAvoidanceRec_tree:add(buffer(bufidx, 1), string.format("Priority: %d -- (unsigned byte) The relative priority used to establish precedence when multiple moving objects support self-collision avoidance. Lower values should yield to objects with higher values. Fixed objects, or moving objects that do not support self-collision avoidance, are considered to have maximum priority (255). If two objects have the same priority, the behavior is non-deterministic.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xC521, setselfcollisionavoidancepolicy_c521) + +queryselfcollisionavoidancecapabilities_c522 = Proto("queryselfcollisionavoidancecapabilities_c522", "QuerySelfCollisionAvoidanceCapabilities 0xc522") +function queryselfcollisionavoidancecapabilities_c522.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SelfCollisionAvoidance_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySelfCollisionAvoidanceCapabilities", string.format("QuerySelfCollisionAvoidanceCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySelfCollisionAvoidanceCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xC522, queryselfcollisionavoidancecapabilities_c522) + +queryselfcollisionavoidanceconfiguration_c523 = Proto("queryselfcollisionavoidanceconfiguration_c523", "QuerySelfCollisionAvoidanceConfiguration 0xc523") +function queryselfcollisionavoidanceconfiguration_c523.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SelfCollisionAvoidance_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySelfCollisionAvoidanceConfiguration", string.format("QuerySelfCollisionAvoidanceConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySelfCollisionAvoidanceConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xC523, queryselfcollisionavoidanceconfiguration_c523) + +queryselfcollisionavoidancestatus_c524 = Proto("queryselfcollisionavoidancestatus_c524", "QuerySelfCollisionAvoidanceStatus 0xc524") +function queryselfcollisionavoidancestatus_c524.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SelfCollisionAvoidance_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySelfCollisionAvoidanceStatus", string.format("QuerySelfCollisionAvoidanceStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySelfCollisionAvoidanceStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xC524, queryselfcollisionavoidancestatus_c524) + +setselfcollisionavoidancepolicyresponse_c525 = Proto("setselfcollisionavoidancepolicyresponse_c525", "SetSelfCollisionAvoidancePolicyResponse 0xc525") +function setselfcollisionavoidancepolicyresponse_c525.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SelfCollisionAvoidance_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSelfCollisionAvoidancePolicyResponse", string.format("SetSelfCollisionAvoidancePolicyResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSelfCollisionAvoidancePolicyResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SelfCollisionAvoidanceResponseRec_tree = body_tree:add("SelfCollisionAvoidanceResponseRec") + body_SelfCollisionAvoidanceResponseRec_tree:add(buffer(bufidx, 1), string.format("Local_ID: %d -- (unsigned byte) A request identifier that will be returned in the response message. This field allows the client to coordinate requests and responses.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "Success", [1] = "UnsupportedBehavior"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SelfCollisionAvoidanceResponseRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xC525, setselfcollisionavoidancepolicyresponse_c525) + +reportselfcollisionavoidancecapabilities_c526 = Proto("reportselfcollisionavoidancecapabilities_c526", "ReportSelfCollisionAvoidanceCapabilities 0xc526") +function reportselfcollisionavoidancecapabilities_c526.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SelfCollisionAvoidance_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSelfCollisionAvoidanceCapabilities", string.format("ReportSelfCollisionAvoidanceCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSelfCollisionAvoidanceCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SelfCollisionAvoidanceCapabilitiesRec_tree = body_tree:add("SelfCollisionAvoidanceCapabilitiesRec") + local body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_buf = buffer(bufidx, 1) + local body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_tree = body_SelfCollisionAvoidanceCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = SupportedBehaviors: 0x%X -- (unsigned byte) A high value (1) indicates the component supports the defined behavior.", bitstr(body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_buf:le_uint(), 8), body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_buf:le_uint())) + body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = StopOnObstacle: %d", bitstr_part(body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_buf:le_uint(), 8, 0, 0), bitVal(body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_buf:le_uint(), 0, 0))) + body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = AvoidObstacle: %d", bitstr_part(body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_buf:le_uint(), 8, 1, 1), bitVal(body_SelfCollisionAvoidanceCapabilitiesRec_SupportedBehaviors_buf:le_uint(), 1, 1))) + bufidx = bufidx + 1 +end +messagetable:add(0xC526, reportselfcollisionavoidancecapabilities_c526) + +reportselfcollisionavoidanceconfiguration_c527 = Proto("reportselfcollisionavoidanceconfiguration_c527", "ReportSelfCollisionAvoidanceConfiguration 0xc527") +function reportselfcollisionavoidanceconfiguration_c527.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SelfCollisionAvoidance_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSelfCollisionAvoidanceConfiguration", string.format("ReportSelfCollisionAvoidanceConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSelfCollisionAvoidanceConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SelfCollisionAvoidanceRec_tree = body_tree:add("SelfCollisionAvoidanceRec") + local value_set = {[0] = "DoNothing", [1] = "StopOnPath", [2] = "DeviateFromPathToAvoidCollisions"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SelfCollisionAvoidanceRec_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_SelfCollisionAvoidanceRec_tree:add(buffer(bufidx, 1), string.format("Priority: %d -- (unsigned byte) The relative priority used to establish precedence when multiple moving objects support self-collision avoidance. Lower values should yield to objects with higher values. Fixed objects, or moving objects that do not support self-collision avoidance, are considered to have maximum priority (255). If two objects have the same priority, the behavior is non-deterministic.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xC527, reportselfcollisionavoidanceconfiguration_c527) + +reportselfcollisionavoidancestatus_c528 = Proto("reportselfcollisionavoidancestatus_c528", "ReportSelfCollisionAvoidanceStatus 0xc528") +function reportselfcollisionavoidancestatus_c528.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SelfCollisionAvoidance_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSelfCollisionAvoidanceStatus", string.format("ReportSelfCollisionAvoidanceStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSelfCollisionAvoidanceStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SelfCollisionAvoidanceStatusRec_tree = body_tree:add("SelfCollisionAvoidanceStatusRec") + local value_set = {[0] = "Disabled", [1] = "Enabled", [2] = "Active_StopOnObstacle", [3] = "Active_AvoidObstacle"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SelfCollisionAvoidanceStatusRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xC528, reportselfcollisionavoidancestatus_c528) + +setsteeringcurve_fe30 = Proto("setsteeringcurve_fe30", "SetSteeringCurve 0xfe30") +function setsteeringcurve_fe30.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SteeringCurve.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSteeringCurve", string.format("SetSteeringCurve, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSteeringCurve")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SteeringCurveRec_tree = body_tree:add("SteeringCurveRec") + local value_set = {[0] = "Raw", [1] = "Linear", [2] = "Quadratic", [3] = "Sigmoid", [4] = "Gompertz"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SteeringCurveRec_tree:add(buffer(bufidx, 1), string.format("SteeringCurve: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFE30, setsteeringcurve_fe30) + +querysteeringcurve_fe31 = Proto("querysteeringcurve_fe31", "QuerySteeringCurve 0xfe31") +function querysteeringcurve_fe31.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SteeringCurve.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySteeringCurve", string.format("QuerySteeringCurve, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySteeringCurve")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFE31, querysteeringcurve_fe31) + +querysupportedsteeringcurves_fe32 = Proto("querysupportedsteeringcurves_fe32", "QuerySupportedSteeringCurves 0xfe32") +function querysupportedsteeringcurves_fe32.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SteeringCurve.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySupportedSteeringCurves", string.format("QuerySupportedSteeringCurves, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySupportedSteeringCurves")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFE32, querysupportedsteeringcurves_fe32) + +reportsteeringcurve_fe33 = Proto("reportsteeringcurve_fe33", "ReportSteeringCurve 0xfe33") +function reportsteeringcurve_fe33.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SteeringCurve.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSteeringCurve", string.format("ReportSteeringCurve, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSteeringCurve")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SteeringCurveRec_tree = body_tree:add("SteeringCurveRec") + local value_set = {[0] = "Raw", [1] = "Linear", [2] = "Quadratic", [3] = "Sigmoid", [4] = "Gompertz"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SteeringCurveRec_tree:add(buffer(bufidx, 1), string.format("SteeringCurve: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFE33, reportsteeringcurve_fe33) + +reportsupportedsteeringcurves_fe34 = Proto("reportsupportedsteeringcurves_fe34", "ReportSupportedSteeringCurves 0xfe34") +function reportsupportedsteeringcurves_fe34.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SteeringCurve.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSupportedSteeringCurves", string.format("ReportSupportedSteeringCurves, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSupportedSteeringCurves")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SupportedSteeringCurvesRec_tree = body_tree:add("SupportedSteeringCurvesRec") + local body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf = buffer(bufidx, 2) + local body_SupportedSteeringCurvesRec_SupportedSteeringCurves_tree = body_SupportedSteeringCurvesRec_tree:add(buffer(bufidx, 2), string.format("%s = SupportedSteeringCurves: 0x%X ", bitstr(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 16), body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint())) + body_SupportedSteeringCurvesRec_SupportedSteeringCurves_tree:add(buffer(bufidx, 2), string.format("%s = Raw: %d", bitstr_part(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 16, 0, 0), bitVal(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 0, 0))) + body_SupportedSteeringCurvesRec_SupportedSteeringCurves_tree:add(buffer(bufidx, 2), string.format("%s = Linear: %d", bitstr_part(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 16, 1, 1), bitVal(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 1, 1))) + body_SupportedSteeringCurvesRec_SupportedSteeringCurves_tree:add(buffer(bufidx, 2), string.format("%s = Quadratic: %d", bitstr_part(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 16, 2, 2), bitVal(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 2, 2))) + body_SupportedSteeringCurvesRec_SupportedSteeringCurves_tree:add(buffer(bufidx, 2), string.format("%s = Sigmoid: %d", bitstr_part(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 16, 3, 3), bitVal(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 3, 3))) + body_SupportedSteeringCurvesRec_SupportedSteeringCurves_tree:add(buffer(bufidx, 2), string.format("%s = Gompertz: %d", bitstr_part(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 16, 4, 4), bitVal(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 4, 4))) + body_SupportedSteeringCurvesRec_SupportedSteeringCurves_tree:add(buffer(bufidx, 2), string.format("%s = IOP_Reserved: %d", bitstr_part(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 16, 5, 10), bitVal(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 5, 10))) + body_SupportedSteeringCurvesRec_SupportedSteeringCurves_tree:add(buffer(bufidx, 2), string.format("%s = ReservedForProgramSpecificUse: %d", bitstr_part(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 16, 11, 15), bitVal(body_SupportedSteeringCurvesRec_SupportedSteeringCurves_buf:le_uint(), 11, 15))) + bufidx = bufidx + 2 +end +messagetable:add(0xFE34, reportsupportedsteeringcurves_fe34) + +setsurrogaterelativepose_dc70 = Proto("setsurrogaterelativepose_dc70", "SetSurrogateRelativePose 0xdc70") +function setsurrogaterelativepose_dc70.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSurrogateRelativePose", string.format("SetSurrogateRelativePose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSurrogateRelativePose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RelativePoseExtRec_tree = body_tree:add("RelativePoseExtRec-- Relative pose is defined as a position and orientation relative to the Host Frame of reference, as defined in Section 3 Common Conventions.") + local body_RelativePoseExtRec_pv = buffer(bufidx, 1):le_uint() + local body_RelativePoseExtRec_pv_count = 0 + body_RelativePoseExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_RelativePoseExtRec_pv, body_RelativePoseExtRec_pv_count) > 0) then + body_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_RelativePoseExtRec_pv_count = body_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RelativePoseExtRec_pv, body_RelativePoseExtRec_pv_count) > 0) then + body_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_RelativePoseExtRec_pv_count = body_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RelativePoseExtRec_pv, body_RelativePoseExtRec_pv_count) > 0) then + body_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_RelativePoseExtRec_pv_count = body_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RelativePoseExtRec_pv, body_RelativePoseExtRec_pv_count) > 0) then + body_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RelativePoseExtRec_pv_count = body_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RelativePoseExtRec_pv, body_RelativePoseExtRec_pv_count) > 0) then + body_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RelativePoseExtRec_pv_count = body_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RelativePoseExtRec_pv, body_RelativePoseExtRec_pv_count) > 0) then + body_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RelativePoseExtRec_pv_count = body_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RelativePoseExtRec_pv, body_RelativePoseExtRec_pv_count) > 0) then + body_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. UTC POSIX-style time in seconds since 1 January 1970.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_RelativePoseExtRec_pv_count = body_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RelativePoseExtRec_pv, body_RelativePoseExtRec_pv_count) > 0) then + body_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_RelativePoseExtRec_pv_count = body_RelativePoseExtRec_pv_count + 1 +end +messagetable:add(0xDC70, setsurrogaterelativepose_dc70) + +querysurrogatecapabilities_dc71 = Proto("querysurrogatecapabilities_dc71", "QuerySurrogateCapabilities 0xdc71") +function querysurrogatecapabilities_dc71.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySurrogateCapabilities", string.format("QuerySurrogateCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySurrogateCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDC71, querysurrogatecapabilities_dc71) + +querysurrogateconfiguration_dc72 = Proto("querysurrogateconfiguration_dc72", "QuerySurrogateConfiguration 0xdc72") +function querysurrogateconfiguration_dc72.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySurrogateConfiguration", string.format("QuerySurrogateConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySurrogateConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QuerySurrogateConfigurationRec_tree = body_tree:add("QuerySurrogateConfigurationRec") + body_QuerySurrogateConfigurationRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) Presence vector used when requesting surrogate configuration.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0xDC72, querysurrogateconfiguration_dc72) + +setsurrogateconfiguration_dc73 = Proto("setsurrogateconfiguration_dc73", "SetSurrogateConfiguration 0xdc73") +function setsurrogateconfiguration_dc73.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSurrogateConfiguration", string.format("SetSurrogateConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSurrogateConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SurrogateConfigurationRec_tree = body_tree:add("SurrogateConfigurationRec") + local body_SurrogateConfigurationRec_pv = buffer(bufidx, 2):le_uint() + local body_SurrogateConfigurationRec_pv_count = 0 + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "ENABLED", [1] = "DISABLED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 1), string.format("AutomaticUntwist: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "ENABLED", [1] = "DISABLED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 1), string.format("AutomaticDisengage: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("XMinimumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("XMaximumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("YMinimumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("YMaximumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("ZMinimumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("ZMaximumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "DEFAULT", [1] = "RECOVER", [2] = "RECOVER_IMMEDIATE", [3] = "HOVER_IN_PLACE", [4] = "GO_HOME_AND_HOVER"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 1), string.format("SafeAction: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "NO_TIMEOUT"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SafeActionTimeout: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 +end +messagetable:add(0xDC73, setsurrogateconfiguration_dc73) + +launchsurrogate_dc74 = Proto("launchsurrogate_dc74", "LaunchSurrogate 0xdc74") +function launchsurrogate_dc74.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "LaunchSurrogate", string.format("LaunchSurrogate, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "LaunchSurrogate")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LaunchSurrogateSequence_tree = body_tree:add("LaunchSurrogateSequence") + local body_LaunchSurrogateSequence_pv = buffer(bufidx, 1):le_uint() + local body_LaunchSurrogateSequence_pv_count = 0 + body_LaunchSurrogateSequence_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_LaunchSurrogateSequence_RelativePoseExtRec_tree = body_LaunchSurrogateSequence_tree:add("RelativePoseExtRec") + local body_LaunchSurrogateSequence_RelativePoseExtRec_pv = buffer(bufidx, 1):le_uint() + local body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = 0 + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_LaunchSurrogateSequence_RelativePoseExtRec_pv, body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count) > 0) then + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_LaunchSurrogateSequence_RelativePoseExtRec_pv, body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count) > 0) then + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_LaunchSurrogateSequence_RelativePoseExtRec_pv, body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count) > 0) then + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_LaunchSurrogateSequence_RelativePoseExtRec_pv, body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count) > 0) then + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_LaunchSurrogateSequence_RelativePoseExtRec_pv, body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count) > 0) then + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_LaunchSurrogateSequence_RelativePoseExtRec_pv, body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count) > 0) then + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_LaunchSurrogateSequence_RelativePoseExtRec_pv, body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count) > 0) then + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. UTC POSIX-style time in seconds since 1 January 1970.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_LaunchSurrogateSequence_RelativePoseExtRec_pv, body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count) > 0) then + body_LaunchSurrogateSequence_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count = body_LaunchSurrogateSequence_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_LaunchSurrogateSequence_pv, body_LaunchSurrogateSequence_pv_count) > 0) then + local body_LaunchSurrogateSequence_ForcedLaunch_tree = body_LaunchSurrogateSequence_tree:add("ForcedLaunch") + local value_set = {[0] = "FORCED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LaunchSurrogateSequence_ForcedLaunch_tree:add(buffer(bufidx, 1), string.format("LaunchOperation: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_LaunchSurrogateSequence_pv_count = body_LaunchSurrogateSequence_pv_count + 1 +end +messagetable:add(0xDC74, launchsurrogate_dc74) + +recoversurrogate_dc75 = Proto("recoversurrogate_dc75", "RecoverSurrogate 0xdc75") +function recoversurrogate_dc75.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RecoverSurrogate", string.format("RecoverSurrogate, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RecoverSurrogate")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RecoverSurrogateSeq_tree = body_tree:add("RecoverSurrogateSeq") + local body_RecoverSurrogateSeq_pv = buffer(bufidx, 1):le_uint() + local body_RecoverSurrogateSeq_pv_count = 0 + body_RecoverSurrogateSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_RecoverSurrogateSeq_pv, body_RecoverSurrogateSeq_pv_count) > 0) then + local body_RecoverSurrogateSeq_EmergencyRecovery_tree = body_RecoverSurrogateSeq_tree:add("EmergencyRecovery") + local value_set = {[0] = "IMMEDIATE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RecoverSurrogateSeq_EmergencyRecovery_tree:add(buffer(bufidx, 1), string.format("RecoveryOperation: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_RecoverSurrogateSeq_pv_count = body_RecoverSurrogateSeq_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_pv, body_RecoverSurrogateSeq_pv_count) > 0) then + local body_RecoverSurrogateSeq_RecoverSurrogateRec_tree = body_RecoverSurrogateSeq_tree:add("RecoverSurrogateRec") + local body_RecoverSurrogateSeq_RecoverSurrogateRec_pv = buffer(bufidx, 1):le_uint() + local body_RecoverSurrogateSeq_RecoverSurrogateRec_pv_count = 0 + body_RecoverSurrogateSeq_RecoverSurrogateRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoverSurrogateRec_pv, body_RecoverSurrogateSeq_RecoverSurrogateRec_pv_count) > 0) then + local body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf = buffer(bufidx, 4) + local body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_tree = body_RecoverSurrogateSeq_RecoverSurrogateRec_tree:add(buffer(bufidx, 4), string.format("%s = HostPlatformID: 0x%X ", bitstr(body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf:le_uint(), 32), body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf:le_uint())) + body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf:le_uint(), 32, 0, 7), bitVal(body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf:le_uint(), 0, 7))) + body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf:le_uint(), 32, 8, 15), bitVal(body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf:le_uint(), 8, 15))) + body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf:le_uint(), 32, 16, 31), bitVal(body_RecoverSurrogateSeq_RecoverSurrogateRec_HostPlatformID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_RecoverSurrogateSeq_RecoverSurrogateRec_pv_count = body_RecoverSurrogateSeq_RecoverSurrogateRec_pv_count + 1 + end + body_RecoverSurrogateSeq_pv_count = body_RecoverSurrogateSeq_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_pv, body_RecoverSurrogateSeq_pv_count) > 0) then + local body_RecoverSurrogateSeq_RecoveryLocationVariant_tree = body_RecoverSurrogateSeq_tree:add("RecoveryLocationVariant-- Location to where surrogate will be recovered.") + body_RecoverSurrogateSeq_RecoveryLocationVariant_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_RecoverSurrogateSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_RecoverSurrogateSeq_index == 0) then + local body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree = body_RecoverSurrogateSeq_RecoveryLocationVariant_tree:add("RelativePoseExtRec-- If recovery to a relative pose is specified, the surrogate is recoverd to a position relative to THE SURROGATE'S launch point on the vehicle. Relative pose is defined as a position and orientation relative to the Host Frame of reference, as defined in Section 3 Common Conventions.") + local body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv = buffer(bufidx, 1):le_uint() + local body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = 0 + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. UTC POSIX-style time in seconds since 1 January 1970.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RelativePoseExtRec_pv_count + 1 + end + if (body_RecoverSurrogateSeq_index == 1) then + local body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree = body_RecoverSurrogateSeq_RecoveryLocationVariant_tree:add("RecoverGlobalPoseExtRec") + local body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv = buffer(bufidx, 1):le_uint() + local body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count = 0 + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. UTC POSIX-style time in seconds since 1 January 1970.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv, body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count) > 0) then + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count = body_RecoverSurrogateSeq_RecoveryLocationVariant_RecoverGlobalPoseExtRec_pv_count + 1 + end + end + body_RecoverSurrogateSeq_pv_count = body_RecoverSurrogateSeq_pv_count + 1 +end +messagetable:add(0xDC75, recoversurrogate_dc75) + +querysurrogatestatus_dc76 = Proto("querysurrogatestatus_dc76", "QuerySurrogateStatus 0xdc76") +function querysurrogatestatus_dc76.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySurrogateStatus", string.format("QuerySurrogateStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySurrogateStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QuerySurrogateStatusRec_tree = body_tree:add("QuerySurrogateStatusRec") + body_QuerySurrogateStatusRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) Used to request reporting of specific optional records from the ReportSurrogateStatusSeq.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xDC76, querysurrogatestatus_dc76) + +tethermanagementcommand_dc77 = Proto("tethermanagementcommand_dc77", "TetherManagementCommand 0xdc77") +function tethermanagementcommand_dc77.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "TetherManagementCommand", string.format("TetherManagementCommand, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "TetherManagementCommand")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TetherManagementCommandRec_tree = body_tree:add("TetherManagementCommandRec") + local value_set = {[0] = "UNTWIST_TETHER", [1] = "REQUEST_DISENGAGE_TETHER", [2] = "CONFIRM_DISENGAGE_TETHER"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_TetherManagementCommandRec_tree:add(buffer(bufidx, 1), string.format("TetherManagementCommand: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDC77, tethermanagementcommand_dc77) + +setsurrogatestate_dc78 = Proto("setsurrogatestate_dc78", "SetSurrogateState 0xdc78") +function setsurrogatestate_dc78.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSurrogateState", string.format("SetSurrogateState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSurrogateState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetSurrogateStateRec_tree = body_tree:add("SetSurrogateStateRec") + local value_set = {[0] = "CLEAR_TO_LAUNCH", [1] = "NOT_CLEAR_TO_LAUNCH", [2] = "FORCED_RECOVERY_NOT_CLEAR_TO_LAUNCH", [3] = "LAUNCHED", [4] = "LAUNCHED_NOT_CLEAR_TO_RECOVER"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetSurrogateStateRec_tree:add(buffer(bufidx, 1), string.format("SurrogateState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDC78, setsurrogatestate_dc78) + +enabledisablemotorcommand_dc79 = Proto("enabledisablemotorcommand_dc79", "EnableDisableMotorCommand 0xdc79") +function enabledisablemotorcommand_dc79.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "EnableDisableMotorCommand", string.format("EnableDisableMotorCommand, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "EnableDisableMotorCommand")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EnableDisableMotorCommandSeq_tree = body_tree:add("EnableDisableMotorCommandSeq") + local body_EnableDisableMotorCommandSeq_EnableDisableMotorCommandRec_tree = body_EnableDisableMotorCommandSeq_tree:add("EnableDisableMotorCommandRec") + local value_set = {[0] = "DISABLE_MOTORS", [1] = "ENABLE_MOTORS"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_EnableDisableMotorCommandSeq_EnableDisableMotorCommandRec_tree:add(buffer(bufidx, 1), string.format("Operation: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_EnableDisableMotorCommandSeq_EnableDisableMotorCommandRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) RequestID used to match this command to response from the server. RequestID should be unique for each EnableDisableMotorCommand message sent.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_EnableDisableMotorCommandSeq_Stage_tree = body_EnableDisableMotorCommandSeq_tree:add("Stage") + body_EnableDisableMotorCommandSeq_Stage_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_EnableDisableMotorCommandSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_EnableDisableMotorCommandSeq_index == 0) then + local body_EnableDisableMotorCommandSeq_Stage_Request_tree = body_EnableDisableMotorCommandSeq_Stage_tree:add("Request-- Requesting disabling or enabling motors - no further information needed.") + body_EnableDisableMotorCommandSeq_Stage_Request_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_EnableDisableMotorCommandSeq_Stage_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + end + if (body_EnableDisableMotorCommandSeq_index == 1) then + local body_EnableDisableMotorCommandSeq_Stage_Confirm_tree = body_EnableDisableMotorCommandSeq_Stage_tree:add("Confirm") + body_EnableDisableMotorCommandSeq_Stage_Confirm_tree:add(buffer(bufidx, 1), string.format("ConfirmationIdentifier: %d -- (unsigned byte) Identifier used to verify the confirmation matches the identifier provided by the request response in EnableDisableMotorResponse.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0xDC79, enabledisablemotorcommand_dc79) + +setsurrogaterelativeposeresponse_dc80 = Proto("setsurrogaterelativeposeresponse_dc80", "SetSurrogateRelativePoseResponse 0xdc80") +function setsurrogaterelativeposeresponse_dc80.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSurrogateRelativePoseResponse", string.format("SetSurrogateRelativePoseResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSurrogateRelativePoseResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetSurrogateRelativePoseResponseRec_tree = body_tree:add("SetSurrogateRelativePoseResponseRec") + local value_set = {[0] = "SUCCESS", [1] = "REQUESTED_POSITION_INVALID", [2] = "REQUESTED_ORIENTATION_INVALID", [3] = "TETHER_ERROR", [4] = "MOTORS_NOT_ENABLED", [5] = "OTHER_ERROR"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetSurrogateRelativePoseResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_SetSurrogateRelativePoseResponseRec_Reasons_buf = buffer(bufidx, 2) + local body_SetSurrogateRelativePoseResponseRec_Reasons_tree = body_SetSurrogateRelativePoseResponseRec_tree:add(buffer(bufidx, 2), string.format("%s = Reasons: 0x%X -- (unsigned short integer) If Response is 1 or 2, at least one of the reason bits must be set to 1.", bitstr(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16), body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint())) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = X_POSITION_TOO_LARGE: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 0, 0), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 0, 0))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = X_POSITION_TOO_SMALL: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 1, 1), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 1, 1))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Y_POSITION_TOO_LARGE: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 2, 2), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 2, 2))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Y_POSITION_TOO_SMALL: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 3, 3), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 3, 3))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Z_POSITION_TOO_LARGE: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 4, 4), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 4, 4))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Z_POSITION_TOO_SMALL: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 5, 5), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 5, 5))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = ROLL_TOO_LARGE: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 6, 6), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 6, 6))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = ROLL_TOO_SMALL: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 7, 7), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 7, 7))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = PITCH_TOO_LARGE: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 8, 8), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 8, 8))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = PITCH_TOO_SMALL: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 9, 9), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 9, 9))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = HEADING_TOO_LARGE: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 10, 10), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 10, 10))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = HEADING_TOO_SMALL: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 11, 11), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 11, 11))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = DISTANCE_TOO_LARGE: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 12, 12), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 12, 12))) + body_SetSurrogateRelativePoseResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = DISTANCE_TOO_SMALL: %d", bitstr_part(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 16, 13, 13), bitVal(body_SetSurrogateRelativePoseResponseRec_Reasons_buf:le_uint(), 13, 13))) + bufidx = bufidx + 2 +end +messagetable:add(0xDC80, setsurrogaterelativeposeresponse_dc80) + +reportsurrogatecapabilities_dc81 = Proto("reportsurrogatecapabilities_dc81", "ReportSurrogateCapabilities 0xdc81") +function reportsurrogatecapabilities_dc81.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSurrogateCapabilities", string.format("ReportSurrogateCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSurrogateCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportSurrogateCapabilitiesSequence_tree = body_tree:add("ReportSurrogateCapabilitiesSequence") + local body_ReportSurrogateCapabilitiesSequence_pv = buffer(bufidx, 1):le_uint() + local body_ReportSurrogateCapabilitiesSequence_pv_count = 0 + body_ReportSurrogateCapabilitiesSequence_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree = body_ReportSurrogateCapabilitiesSequence_tree:add("LaunchAndRecoverCapabilities") + local body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv = buffer(bufidx, 1):le_uint() + local body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count = 0 + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf = buffer(bufidx, 1) + local body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_tree = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = SupportedLaunchAndRecoveryBehaviors: 0x%X ", bitstr(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 8), body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint())) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = AutonomousLaunch: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 8, 0, 0), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 0, 0))) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = AutonomousRecovery: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 8, 1, 1), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 1, 1))) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = RecoverOnDifferentPlatform: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 8, 2, 2), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 2, 2))) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = RecoverOnMovingPlatform: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 8, 3, 3), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 3, 3))) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = RecoverAtLocalPosition: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 8, 4, 4), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 4, 4))) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = RecoverAtGlobalPosition: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 8, 5, 5), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_SupportedLaunchAndRecoveryBehaviors_buf:le_uint(), 5, 5))) + bufidx = bufidx + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 4), string.format("MaximumCommandableRelativeXPosition: %d -- (float) Maximum commandable X position where 0 meters is considered the resting state (landed position) of the surrogate prior to launch.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 4), string.format("MinimumCommandableRelativeXPosition: %d -- (float) Minimum commandable X position where 0 meters is considered the resting state (landed position) of the surrogate prior to launch.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 4), string.format("MaximumCommandableRelativeYPosition: %d -- (float) Maximum commandable Y position where 0 meters is considered the resting state (landed position) of the surrogate prior to launch.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 4), string.format("MinimumCommandableRelativeYPosition: %d -- (float) Minimum commandable Y position where 0 meters is considered the resting state (landed position) of the surrogate prior to launch.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 4), string.format("MaximumCommandableRelativeZPosition: %d -- (float) Maximum commandable Z position where 0 meters is considered the resting state (landed position) of the surrogate prior to launch.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 4), string.format("MinimumCommandableRelativeZPosition: %d -- (float) Minimum commandable Z position where 0 meters is considered the resting state (landed position) of the surrogate prior to launch.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count) > 0) then + local body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf = buffer(bufidx, 4) + local body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_tree = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_tree:add(buffer(bufidx, 4), string.format("%s = HostPlatformID: 0x%X ", bitstr(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf:le_uint(), 32), body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf:le_uint())) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf:le_uint(), 32, 0, 7), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf:le_uint(), 0, 7))) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf:le_uint(), 32, 8, 15), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf:le_uint(), 8, 15))) + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf:le_uint(), 32, 16, 31), bitVal(body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_HostPlatformID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_LaunchAndRecoverCapabilities_pv_count + 1 + local body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_tree = body_ReportSurrogateCapabilitiesSequence_tree:add("TetherManagementCapabilities") + local body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv = buffer(bufidx, 1):le_uint() + local body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count = 0 + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf = buffer(bufidx, 1) + local body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_tree = body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = SupportedTetherManagementBehaviors: 0x%X ", bitstr(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 8), body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint())) + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = CommandedUntwist: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 8, 0, 0), bitVal(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 0, 0))) + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = AutomaticUntwist: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 8, 1, 1), bitVal(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 1, 1))) + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = CommandedTetherDisengagement: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 8, 2, 2), bitVal(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 2, 2))) + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_tree:add(buffer(bufidx, 1), string.format("%s = AutomaticTetherDisengagement: %d", bitstr_part(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 8, 3, 3), bitVal(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_SupportedTetherManagementBehaviors_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_tree:add(buffer(bufidx, 2), string.format("MaximumNumberOfTwists: %d -- (unsigned short integer) The maximum number of twists of the tether before safety or performance of the tether is significantly negatively affected.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_tree:add(buffer(bufidx, 4), string.format("MaximumTwistsPerMeter: %d -- (float) The maximum number of twists of the tether per meter of surrogate altitude before safety or performance of the tether is significantly negatively affected.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv, body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count) > 0) then + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_tree:add(buffer(bufidx, 4), string.format("MinimumMetersPerTwist: %d -- (float) The maximum number meters of altitude per twist of the tether before safety or performance of the tether is significantly negatively affected.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count = body_ReportSurrogateCapabilitiesSequence_TetherManagementCapabilities_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_pv, body_ReportSurrogateCapabilitiesSequence_pv_count) > 0) then + local body_ReportSurrogateCapabilitiesSequence_InitialLaunchPositionOffset_tree = body_ReportSurrogateCapabilitiesSequence_tree:add("InitialLaunchPositionOffset-- Offset of the inital launch position of the surrogate, thus defining the origin of the host frame with respect to the vehicle coordinate frame.") + local body_ReportSurrogateCapabilitiesSequence_InitialLaunchPositionOffset_PositionVector_tree = body_ReportSurrogateCapabilitiesSequence_InitialLaunchPositionOffset_tree:add("PositionVector") + local body_ReportSurrogateCapabilitiesSequence_InitialLaunchPositionOffset_PositionVector_PositionVectorDimension_tree = body_ReportSurrogateCapabilitiesSequence_InitialLaunchPositionOffset_PositionVector_tree:add("PositionVectorDimension [3]") + for body_ReportSurrogateCapabilitiesSequence_InitialLaunchPositionOffset_PositionVector_PositionVectorDimension_i = 1, 3 do + body_ReportSurrogateCapabilitiesSequence_InitialLaunchPositionOffset_PositionVector_PositionVectorDimension_tree:add(buffer(bufidx, 4), string.format("PositionVectorElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + end + body_ReportSurrogateCapabilitiesSequence_pv_count = body_ReportSurrogateCapabilitiesSequence_pv_count + 1 + if (bitAND(body_ReportSurrogateCapabilitiesSequence_pv, body_ReportSurrogateCapabilitiesSequence_pv_count) > 0) then + local body_ReportSurrogateCapabilitiesSequence_RecoveryPositionOffset_tree = body_ReportSurrogateCapabilitiesSequence_tree:add("RecoveryPositionOffset-- Offset of the recovery position (landed position) of the surrogate within the host coorindate frame. May be used to describe a recovery position that is separate from the initial launch position.") + local body_ReportSurrogateCapabilitiesSequence_RecoveryPositionOffset_PositionVector_tree = body_ReportSurrogateCapabilitiesSequence_RecoveryPositionOffset_tree:add("PositionVector") + local body_ReportSurrogateCapabilitiesSequence_RecoveryPositionOffset_PositionVector_PositionVectorDimension_tree = body_ReportSurrogateCapabilitiesSequence_RecoveryPositionOffset_PositionVector_tree:add("PositionVectorDimension [3]") + for body_ReportSurrogateCapabilitiesSequence_RecoveryPositionOffset_PositionVector_PositionVectorDimension_i = 1, 3 do + body_ReportSurrogateCapabilitiesSequence_RecoveryPositionOffset_PositionVector_PositionVectorDimension_tree:add(buffer(bufidx, 4), string.format("PositionVectorElement: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + end + body_ReportSurrogateCapabilitiesSequence_pv_count = body_ReportSurrogateCapabilitiesSequence_pv_count + 1 +end +messagetable:add(0xDC81, reportsurrogatecapabilities_dc81) + +launchsurrogateresponse_dc82 = Proto("launchsurrogateresponse_dc82", "LaunchSurrogateResponse 0xdc82") +function launchsurrogateresponse_dc82.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "LaunchSurrogateResponse", string.format("LaunchSurrogateResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "LaunchSurrogateResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LaunchSurrogateResponseRec_tree = body_tree:add("LaunchSurrogateResponseRec") + local body_LaunchSurrogateResponseRec_pv = buffer(bufidx, 1):le_uint() + local body_LaunchSurrogateResponseRec_pv_count = 0 + body_LaunchSurrogateResponseRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "REQUESTED_POSITION_INVALID", [2] = "REQUESTED_ORIENTATION_INALID", [3] = "LAUNCH_PREVENTED", [4] = "TETHER_ERROR", [5] = "MOTORS_NOT_ENABLED", [6] = "OTHER_ERROR"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LaunchSurrogateResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_LaunchSurrogateResponseRec_Reasons_buf = buffer(bufidx, 2) + local body_LaunchSurrogateResponseRec_Reasons_tree = body_LaunchSurrogateResponseRec_tree:add(buffer(bufidx, 2), string.format("%s = Reasons: 0x%X -- (unsigned short integer) If Response is 1 or 2, at least one of the reason bits must be set to 1.", bitstr(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16), body_LaunchSurrogateResponseRec_Reasons_buf:le_uint())) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = X_POSITION_TOO_LARGE: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 0, 0), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 0, 0))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = X_POSITION_TOO_SMALL: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 1, 1), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 1, 1))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Y_POSITION_TOO_LARGE: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 2, 2), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 2, 2))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Y_POSITION_TOO_SMALL: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 3, 3), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 3, 3))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Z_POSITION_TOO_LARGE: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 4, 4), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 4, 4))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Z_POSITION_TOO_SMALL: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 5, 5), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 5, 5))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = ROLL_TOO_LARGE: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 6, 6), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 6, 6))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = ROLL_TOO_SMALL: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 7, 7), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 7, 7))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = PITCH_TOO_LARGE: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 8, 8), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 8, 8))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = PITCH_TOO_SMALL: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 9, 9), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 9, 9))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = HEADING_TOO_LARGE: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 10, 10), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 10, 10))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = HEADING_TOO_SMALL: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 11, 11), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 11, 11))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = DISTANCE_TOO_LARGE: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 12, 12), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 12, 12))) + body_LaunchSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = DISTANCE_TOO_SMALL: %d", bitstr_part(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 16, 13, 13), bitVal(body_LaunchSurrogateResponseRec_Reasons_buf:le_uint(), 13, 13))) + bufidx = bufidx + 2 + if (bitAND(body_LaunchSurrogateResponseRec_pv, body_LaunchSurrogateResponseRec_pv_count) > 0) then + local body_LaunchSurrogateResponseRec_ResponseMessage_tree = body_LaunchSurrogateResponseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_LaunchSurrogateResponseRec_ResponseMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_LaunchSurrogateResponseRec_pv_count = body_LaunchSurrogateResponseRec_pv_count + 1 +end +messagetable:add(0xDC82, launchsurrogateresponse_dc82) + +recoversurrogateresponse_dc83 = Proto("recoversurrogateresponse_dc83", "RecoverSurrogateResponse 0xdc83") +function recoversurrogateresponse_dc83.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RecoverSurrogateResponse", string.format("RecoverSurrogateResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RecoverSurrogateResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RecoverSurrogateResponseRec_tree = body_tree:add("RecoverSurrogateResponseRec") + local body_RecoverSurrogateResponseRec_pv = buffer(bufidx, 1):le_uint() + local body_RecoverSurrogateResponseRec_pv_count = 0 + body_RecoverSurrogateResponseRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "REQUESTED_POSITION_INVALID", [2] = "REQUESTED_ORIENTATION_INVALID", [3] = "RECOVERY_PREVENTED", [4] = "TETHER_ERROR", [5] = "RECOVERY_ON_OTHER_PLATFORM_NOT_SUPPORTED", [6] = "RECOVERY_ON_MOVING_PLATFORM_NOT_SUPPORTED", [7] = "MOTORS_NOT_ENABLED", [8] = "OTHER_ERROR"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RecoverSurrogateResponseRec_tree:add(buffer(bufidx, 2), string.format("Response: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_RecoverSurrogateResponseRec_Reasons_buf = buffer(bufidx, 2) + local body_RecoverSurrogateResponseRec_Reasons_tree = body_RecoverSurrogateResponseRec_tree:add(buffer(bufidx, 2), string.format("%s = Reasons: 0x%X -- (unsigned short integer) If Response is 1 or 2, at least one of the reason bits must be set to 1.", bitstr(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16), body_RecoverSurrogateResponseRec_Reasons_buf:le_uint())) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = X_POSITION_TOO_LARGE: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 0, 0), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 0, 0))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = X_POSITION_TOO_SMALL: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 1, 1), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 1, 1))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Y_POSITION_TOO_LARGE: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 2, 2), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 2, 2))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Y_POSITION_TOO_SMALL: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 3, 3), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 3, 3))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Z_POSITION_TOO_LARGE: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 4, 4), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 4, 4))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = Z_POSITION_TOO_SMALL: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 5, 5), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 5, 5))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = ROLL_TOO_LARGE: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 6, 6), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 6, 6))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = ROLL_TOO_SMALL: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 7, 7), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 7, 7))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = PITCH_TOO_LARGE: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 8, 8), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 8, 8))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = PITCH_TOO_SMALL: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 9, 9), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 9, 9))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = HEADING_TOO_LARGE: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 10, 10), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 10, 10))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = HEADING_TOO_SMALL: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 11, 11), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 11, 11))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = DISTANCE_TOO_LARGE: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 12, 12), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 12, 12))) + body_RecoverSurrogateResponseRec_Reasons_tree:add(buffer(bufidx, 2), string.format("%s = DISTANCE_TOO_SMALL: %d", bitstr_part(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 16, 13, 13), bitVal(body_RecoverSurrogateResponseRec_Reasons_buf:le_uint(), 13, 13))) + bufidx = bufidx + 2 + if (bitAND(body_RecoverSurrogateResponseRec_pv, body_RecoverSurrogateResponseRec_pv_count) > 0) then + local body_RecoverSurrogateResponseRec_ResponseMessage_tree = body_RecoverSurrogateResponseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RecoverSurrogateResponseRec_ResponseMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_RecoverSurrogateResponseRec_pv_count = body_RecoverSurrogateResponseRec_pv_count + 1 +end +messagetable:add(0xDC83, recoversurrogateresponse_dc83) + +reportsurrogatestatus_dc84 = Proto("reportsurrogatestatus_dc84", "ReportSurrogateStatus 0xdc84") +function reportsurrogatestatus_dc84.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSurrogateStatus", string.format("ReportSurrogateStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSurrogateStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportSurrogateStatusSeq_tree = body_tree:add("ReportSurrogateStatusSeq") + local body_ReportSurrogateStatusSeq_pv = buffer(bufidx, 1):le_uint() + local body_ReportSurrogateStatusSeq_pv_count = 0 + body_ReportSurrogateStatusSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_ReportSurrogateStatusSeq_SurrogateStatusRec_tree = body_ReportSurrogateStatusSeq_tree:add("SurrogateStatusRec") + local value_set = {[0] = "CLEAR_TO_LAUNCH", [1] = "NOT_CLEAR_TO_LAUNCH", [2] = "FORCED_RECOVERY_NOT_CLEAR_TO_LAUNCH", [3] = "LAUNCHED", [4] = "LAUNCHED_NOT_CLEAR_TO_RECOVER", [5] = "LAUNCHING", [6] = "RECOVERING", [7] = "UNKNOWN"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportSurrogateStatusSeq_SurrogateStatusRec_tree:add(buffer(bufidx, 1), string.format("SurrogateState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "DISABLED", [1] = "ENABLED", [2] = "UNKNOWN_OR_ERROR"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportSurrogateStatusSeq_SurrogateStatusRec_tree:add(buffer(bufidx, 1), string.format("MotorState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_ReportSurrogateStatusSeq_pv, body_ReportSurrogateStatusSeq_pv_count) > 0) then + local body_ReportSurrogateStatusSeq_ActualRelativePosition_tree = body_ReportSurrogateStatusSeq_tree:add("ActualRelativePosition") + local body_ReportSurrogateStatusSeq_ActualRelativePosition_pv = buffer(bufidx, 2):le_uint() + local body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = 0 + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. UTC POSIX-style time in seconds since 1 January 1970.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_ActualRelativePosition_pv, body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_ActualRelativePosition_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count = body_ReportSurrogateStatusSeq_ActualRelativePosition_pv_count + 1 + end + body_ReportSurrogateStatusSeq_pv_count = body_ReportSurrogateStatusSeq_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_pv, body_ReportSurrogateStatusSeq_pv_count) > 0) then + local body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree = body_ReportSurrogateStatusSeq_tree:add("CommandedRelativePosition") + local body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv = buffer(bufidx, 2):le_uint() + local body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = 0 + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. UTC POSIX-style time in seconds since 1 January 1970.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv, body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count) > 0) then + body_ReportSurrogateStatusSeq_CommandedRelativePosition_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count = body_ReportSurrogateStatusSeq_CommandedRelativePosition_pv_count + 1 + end + body_ReportSurrogateStatusSeq_pv_count = body_ReportSurrogateStatusSeq_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_pv, body_ReportSurrogateStatusSeq_pv_count) > 0) then + local body_ReportSurrogateStatusSeq_TetherStatusRec_tree = body_ReportSurrogateStatusSeq_tree:add("TetherStatusRec") + local body_ReportSurrogateStatusSeq_TetherStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count = 0 + body_ReportSurrogateStatusSeq_TetherStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "TETHER_CONDITIONS_NOMINAL", [1] = "TWIST_LIMITS_WARNING", [2] = "TWIST_LIMITS_EXCEEDED", [3] = "TETHER_LINK_SEVERED", [4] = "TEHTER_DISENGAGED", [5] = "UNKNOWN_TETHER_ERROR", [6] = "TETHER_UNTWISTING"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportSurrogateStatusSeq_TetherStatusRec_tree:add(buffer(bufidx, 1), string.format("TetherState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_ReportSurrogateStatusSeq_TetherStatusRec_pv, body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_TetherStatusRec_tree:add(buffer(bufidx, 2), string.format("NumberOfTwists: %d -- (unsigned short integer) The current number of twists of the tether.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count = body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_TetherStatusRec_pv, body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_TetherStatusRec_tree:add(buffer(bufidx, 4), string.format("TwistsPerMeter: %d -- (float) The current number of twists of the tether per meter.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count = body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_TetherStatusRec_pv, body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_TetherStatusRec_tree:add(buffer(bufidx, 4), string.format("MetersPerTwist: %d -- (float) The current number meters of altitude per twist of the tether.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count = body_ReportSurrogateStatusSeq_TetherStatusRec_pv_count + 1 + end + body_ReportSurrogateStatusSeq_pv_count = body_ReportSurrogateStatusSeq_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_pv, body_ReportSurrogateStatusSeq_pv_count) > 0) then + local body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree = body_ReportSurrogateStatusSeq_tree:add("GlobalPoseExtRec") + local body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = 0 + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("HorizontalRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("VerticalRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. UTC POSIX-style time in seconds since 1 January 1970.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv, body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count) > 0) then + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Time at which this record is first created to be issued as part of a command or report. If included, can be used in determining when a command or report is no longer valid. Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count = body_ReportSurrogateStatusSeq_GlobalPoseExtRec_pv_count + 1 + end + body_ReportSurrogateStatusSeq_pv_count = body_ReportSurrogateStatusSeq_pv_count + 1 +end +messagetable:add(0xDC84, reportsurrogatestatus_dc84) + +tethermanagementresponse_dc85 = Proto("tethermanagementresponse_dc85", "TetherManagementResponse 0xdc85") +function tethermanagementresponse_dc85.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "TetherManagementResponse", string.format("TetherManagementResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "TetherManagementResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TetherManagementResponseRec_tree = body_tree:add("TetherManagementResponseRec") + local body_TetherManagementResponseRec_pv = buffer(bufidx, 1):le_uint() + local body_TetherManagementResponseRec_pv_count = 0 + body_TetherManagementResponseRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "AWAITING_CONFIRMATION_COMMAND", [2] = "FAILURE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_TetherManagementResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_TetherManagementResponseRec_pv, body_TetherManagementResponseRec_pv_count) > 0) then + local body_TetherManagementResponseRec_ResponseMessage_tree = body_TetherManagementResponseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_TetherManagementResponseRec_ResponseMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_TetherManagementResponseRec_pv_count = body_TetherManagementResponseRec_pv_count + 1 +end +messagetable:add(0xDC85, tethermanagementresponse_dc85) + +setsurrogateconfigurationresponse_dc86 = Proto("setsurrogateconfigurationresponse_dc86", "SetSurrogateConfigurationResponse 0xdc86") +function setsurrogateconfigurationresponse_dc86.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSurrogateConfigurationResponse", string.format("SetSurrogateConfigurationResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSurrogateConfigurationResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetSurrogateConfigurationResponseRec_tree = body_tree:add("SetSurrogateConfigurationResponseRec") + local body_SetSurrogateConfigurationResponseRec_pv = buffer(bufidx, 1):le_uint() + local body_SetSurrogateConfigurationResponseRec_pv_count = 0 + body_SetSurrogateConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "FAILURE", [2] = "CONFIGURED_BOUNDS_EXCEED_LIMITS", [3] = "INVALID_SAFE_ACTION", [4] = "INVALID_SAFE_ACTION_TIMEOUT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetSurrogateConfigurationResponseRec_tree:add(buffer(bufidx, 1), string.format("Response: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_SetSurrogateConfigurationResponseRec_pv, body_SetSurrogateConfigurationResponseRec_pv_count) > 0) then + local body_SetSurrogateConfigurationResponseRec_ResponseMessage_tree = body_SetSurrogateConfigurationResponseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_SetSurrogateConfigurationResponseRec_ResponseMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_SetSurrogateConfigurationResponseRec_pv_count = body_SetSurrogateConfigurationResponseRec_pv_count + 1 +end +messagetable:add(0xDC86, setsurrogateconfigurationresponse_dc86) + +reportsurrogateconfiguration_dc87 = Proto("reportsurrogateconfiguration_dc87", "ReportSurrogateConfiguration 0xdc87") +function reportsurrogateconfiguration_dc87.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSurrogateConfiguration", string.format("ReportSurrogateConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSurrogateConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SurrogateConfigurationRec_tree = body_tree:add("SurrogateConfigurationRec-- Minimum and maximum limits use Relative Pose. Relative pose is defined as a position and orientation relative to the Host Frame of reference, as defined in Section 3 Common Conventions.") + local body_SurrogateConfigurationRec_pv = buffer(bufidx, 2):le_uint() + local body_SurrogateConfigurationRec_pv_count = 0 + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "ENABLED", [1] = "DISABLED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 1), string.format("AutomaticUntwist: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "ENABLED", [1] = "DISABLED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 1), string.format("AutomaticDisengage: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("XMinimumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("XMaximumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("YMinimumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("YMaximumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("ZMinimumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 4), string.format("ZMaximumLimit: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "DEFAULT", [1] = "RECOVER", [2] = "RECOVER_IMMEDIATE", [3] = "HOVER_IN_PLACE", [4] = "GO_HOME_AND_HOVER"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 1), string.format("SafeAction: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 + if (bitAND(body_SurrogateConfigurationRec_pv, body_SurrogateConfigurationRec_pv_count) > 0) then + local value_set = {[0] = "NO_TIMEOUT"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_SurrogateConfigurationRec_tree:add(buffer(bufidx, 2), string.format("SafeActionTimeout: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + end + body_SurrogateConfigurationRec_pv_count = body_SurrogateConfigurationRec_pv_count + 1 +end +messagetable:add(0xDC87, reportsurrogateconfiguration_dc87) + +enabledisablemotorresponse_dc88 = Proto("enabledisablemotorresponse_dc88", "EnableDisableMotorResponse 0xdc88") +function enabledisablemotorresponse_dc88.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/SurrogateVehicleDriver_V5.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "EnableDisableMotorResponse", string.format("EnableDisableMotorResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "EnableDisableMotorResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EnableDisableMotorResponseRec_tree = body_tree:add("EnableDisableMotorResponseRec") + local body_EnableDisableMotorResponseRec_pv = buffer(bufidx, 1):le_uint() + local body_EnableDisableMotorResponseRec_pv_count = 0 + body_EnableDisableMotorResponseRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_EnableDisableMotorResponseRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) This response should have a RequestID that matches the command to which it is responding.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "SUCCESS", [1] = "INVALID_REQUEST", [2] = "INVALID_CONFIRMATION", [3] = "IDENTIFIER_EXPIRED"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_EnableDisableMotorResponseRec_tree:add(buffer(bufidx, 1), string.format("Status: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_EnableDisableMotorResponseRec_tree:add(buffer(bufidx, 1), string.format("Identifier: %d -- (unsigned byte) The ID to use when confirming an accepted request. If this is the response to a confirmation of a previous request, this is the ID associated with the confirmation.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_EnableDisableMotorResponseRec_pv, body_EnableDisableMotorResponseRec_pv_count) > 0) then + local body_EnableDisableMotorResponseRec_ResponseMessage_tree = body_EnableDisableMotorResponseRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ResponseMessage[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_EnableDisableMotorResponseRec_ResponseMessage_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_EnableDisableMotorResponseRec_pv_count = body_EnableDisableMotorResponseRec_pv_count + 1 +end +messagetable:add(0xDC88, enabledisablemotorresponse_dc88) + +settamperdetectionstate_de66 = Proto("settamperdetectionstate_de66", "SetTamperDetectionState 0xde66") +function settamperdetectionstate_de66.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/TamperDetection_V1.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetTamperDetectionState", string.format("SetTamperDetectionState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetTamperDetectionState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TamperDetectionStateRec_tree = body_tree:add("TamperDetectionStateRec") + local value_set = {[0] = "Disable", [1] = "Enable", [2] = "Clear"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_TamperDetectionStateRec_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xDE66, settamperdetectionstate_de66) + +querytamperdetectionstatus_de67 = Proto("querytamperdetectionstatus_de67", "QueryTamperDetectionStatus 0xde67") +function querytamperdetectionstatus_de67.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/TamperDetection_V1.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTamperDetectionStatus", string.format("QueryTamperDetectionStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTamperDetectionStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDE67, querytamperdetectionstatus_de67) + +reporttamperdetectionstatus_de68 = Proto("reporttamperdetectionstatus_de68", "ReportTamperDetectionStatus 0xde68") +function reporttamperdetectionstatus_de68.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/TamperDetection_V1.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTamperDetectionStatus", string.format("ReportTamperDetectionStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTamperDetectionStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TamperDetectionStatusRec_tree = body_tree:add("TamperDetectionStatusRec") + local value_set = {[0] = "Disabled", [1] = "Enabled", [2] = "AlwaysEnabled"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_TamperDetectionStatusRec_tree:add(buffer(bufidx, 1), string.format("CurrentState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_TamperDetectionStatusRec_TamperStatus_buf = buffer(bufidx, 2) + local body_TamperDetectionStatusRec_TamperStatus_tree = body_TamperDetectionStatusRec_tree:add(buffer(bufidx, 2), string.format("%s = TamperStatus: 0x%X -- (unsigned short integer) Current results of tamper detection", bitstr(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 16), body_TamperDetectionStatusRec_TamperStatus_buf:le_uint())) + body_TamperDetectionStatusRec_TamperStatus_tree:add(buffer(bufidx, 2), string.format("%s = NetworkInstrusion: %d", bitstr_part(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 16, 0, 0), bitVal(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 0, 0))) + body_TamperDetectionStatusRec_TamperStatus_tree:add(buffer(bufidx, 2), string.format("%s = PhysicalHardwareTamper: %d", bitstr_part(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 16, 1, 1), bitVal(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 1, 1))) + body_TamperDetectionStatusRec_TamperStatus_tree:add(buffer(bufidx, 2), string.format("%s = ElectricalTamper: %d", bitstr_part(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 16, 2, 2), bitVal(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 2, 2))) + body_TamperDetectionStatusRec_TamperStatus_tree:add(buffer(bufidx, 2), string.format("%s = Other: %d", bitstr_part(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 16, 3, 3), bitVal(body_TamperDetectionStatusRec_TamperStatus_buf:le_uint(), 3, 3))) + bufidx = bufidx + 2 + local body_TamperDetectionStatusRec_Description_tree = body_TamperDetectionStatusRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_TamperDetectionStatusRec_Description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() +end +messagetable:add(0xDE68, reporttamperdetectionstatus_de68) + +querytirepressurecapabilities_d7b0 = Proto("querytirepressurecapabilities_d7b0", "QueryTirePressureCapabilities 0xd7b0") +function querytirepressurecapabilities_d7b0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/TirePressureService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTirePressureCapabilities", string.format("QueryTirePressureCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTirePressureCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD7B0, querytirepressurecapabilities_d7b0) + +querytirepressurestatus_d7b1 = Proto("querytirepressurestatus_d7b1", "QueryTirePressureStatus 0xd7b1") +function querytirepressurestatus_d7b1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/TirePressureService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTirePressureStatus", string.format("QueryTirePressureStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTirePressureStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_QueryTireList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "QueryTireList ") + body_QueryTireList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_QueryTireList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_QueryTireList_count do + local body_QueryTireList_QueryTireRec_tree = body_QueryTireList_tree:add(string.format("QueryTireRec_%d", body_counter - 1)) + body_QueryTireList_QueryTireRec_tree:add(buffer(bufidx, 1), string.format("TireID: %d -- (unsigned byte) ID of the tire to be queried. A value of zero (0) implies all tires.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0xD7B1, querytirepressurestatus_d7b1) + +settirepressurestatus_d7b2 = Proto("settirepressurestatus_d7b2", "SetTirePressureStatus 0xd7b2") +function settirepressurestatus_d7b2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/TirePressureService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetTirePressureStatus", string.format("SetTirePressureStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetTirePressureStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SetTirePressureList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SetTirePressureList ") + body_SetTirePressureList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_SetTirePressureList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_SetTirePressureList_count do + local body_SetTirePressureList_SetTirePressureRec_tree = body_SetTirePressureList_tree:add(string.format("SetTirePressureRec_%d", body_counter - 1)) + body_SetTirePressureList_SetTirePressureRec_tree:add(buffer(bufidx, 1), string.format("TireID: %d -- (unsigned byte) ID of the tire to be queried. A value of zero (0) implies all tires.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_SetTirePressureList_SetTirePressureRec_tree:add(buffer(bufidx, 1), string.format("TirePressure: %.4f (scaled) -- (unsigned byte) Target air pressure for inflate and deflate control.", buffer(bufidx, 1):le_uint() * 0.039215686275 + (0.000000000000))) + bufidx = bufidx + 1 + end +end +messagetable:add(0xD7B2, settirepressurestatus_d7b2) + +reporttirepressurecapabilities_d7b3 = Proto("reporttirepressurecapabilities_d7b3", "ReportTirePressureCapabilities 0xd7b3") +function reporttirepressurecapabilities_d7b3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/TirePressureService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTirePressureCapabilities", string.format("ReportTirePressureCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTirePressureCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_TirePressureCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "TirePressureCapabilitiesList ") + body_TirePressureCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_TirePressureCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_TirePressureCapabilitiesList_count do + local body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_tree = body_TirePressureCapabilitiesList_tree:add(string.format("TirePressureCapabilitiesRec_%d", body_counter - 1)) + body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("TireID: %d -- (unsigned byte) ID of the tire to be queried. A value of zero (0) is not permitted.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_Description_tree = body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_Description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("NominalTirePressure: %.4f (scaled) -- (unsigned byte) Normal operating air pressure.", buffer(bufidx, 1):le_uint() * 0.039215686275 + (0.000000000000))) + bufidx = bufidx + 1 + local body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf = buffer(bufidx, 1) + local body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_tree = body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = TireCapabilities: 0x%X -- (unsigned byte) Bit field representing the underlying hardware capabilities. A value of one (1) means the capability is supported.", bitstr(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 8), body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint())) + body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = AirPressureMeasurement: %d", bitstr_part(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 8, 0, 0), bitVal(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 0, 0))) + body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = LowPressureAlert: %d", bitstr_part(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 8, 1, 1), bitVal(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 1, 1))) + body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = TireInflateDeflateControl: %d", bitstr_part(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 8, 2, 2), bitVal(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 2, 2))) + body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = RunFlatCapabable: %d", bitstr_part(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 8, 3, 3), bitVal(body_TirePressureCapabilitiesList_TirePressureCapabilitiesRec_TireCapabilities_buf:le_uint(), 3, 3))) + bufidx = bufidx + 1 + end +end +messagetable:add(0xD7B3, reporttirepressurecapabilities_d7b3) + +reporttirepressurestatus_d7b4 = Proto("reporttirepressurestatus_d7b4", "ReportTirePressureStatus 0xd7b4") +function reporttirepressurestatus_d7b4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/TirePressureService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTirePressureStatus", string.format("ReportTirePressureStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTirePressureStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_TirePressureStatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "TirePressureStatusList ") + body_TirePressureStatusList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_TirePressureStatusList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_TirePressureStatusList_count do + local body_TirePressureStatusList_TirePressureStatusRec_tree = body_TirePressureStatusList_tree:add(string.format("TirePressureStatusRec_%d", body_counter - 1)) + local body_TirePressureStatusList_TirePressureStatusRec_pv = buffer(bufidx, 1):le_uint() + local body_TirePressureStatusList_TirePressureStatusRec_pv_count = 0 + body_TirePressureStatusList_TirePressureStatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_TirePressureStatusList_TirePressureStatusRec_tree:add(buffer(bufidx, 1), string.format("TireID: %d -- (unsigned byte) ID of the tire to be queried. A value of zero (0) is not permitted.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_TirePressureStatusList_TirePressureStatusRec_pv, body_TirePressureStatusList_TirePressureStatusRec_pv_count) > 0) then + body_TirePressureStatusList_TirePressureStatusRec_tree:add(buffer(bufidx, 1), string.format("TirePressure: %.4f (scaled) -- (unsigned byte) Current air pressure.", buffer(bufidx, 1):le_uint() * 0.039215686275 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_TirePressureStatusList_TirePressureStatusRec_pv_count = body_TirePressureStatusList_TirePressureStatusRec_pv_count + 1 + if (bitAND(body_TirePressureStatusList_TirePressureStatusRec_pv, body_TirePressureStatusList_TirePressureStatusRec_pv_count) > 0) then + local value_set = {[0] = "Normal", [1] = "LowPressureAlert", [2] = "RunFlatActive"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_TirePressureStatusList_TirePressureStatusRec_tree:add(buffer(bufidx, 1), string.format("LowPressureAlert: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_TirePressureStatusList_TirePressureStatusRec_pv_count = body_TirePressureStatusList_TirePressureStatusRec_pv_count + 1 + if (bitAND(body_TirePressureStatusList_TirePressureStatusRec_pv, body_TirePressureStatusList_TirePressureStatusRec_pv_count) > 0) then + local value_set = {[0] = "Inactive", [1] = "Inflating", [2] = "Deflating"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_TirePressureStatusList_TirePressureStatusRec_tree:add(buffer(bufidx, 1), string.format("PressureControlStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_TirePressureStatusList_TirePressureStatusRec_pv_count = body_TirePressureStatusList_TirePressureStatusRec_pv_count + 1 + end +end +messagetable:add(0xD7B4, reporttirepressurestatus_d7b4) + +queryuninterruptiblepowersupply_ea01 = Proto("queryuninterruptiblepowersupply_ea01", "QueryUninterruptiblePowerSupply 0xea01") +function queryuninterruptiblepowersupply_ea01.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/UniterruptiblePowerSupply_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryUninterruptiblePowerSupply", string.format("QueryUninterruptiblePowerSupply, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryUninterruptiblePowerSupply")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xEA01, queryuninterruptiblepowersupply_ea01) + +setuninterruptiblepowersupply_ea02 = Proto("setuninterruptiblepowersupply_ea02", "SetUninterruptiblePowerSupply 0xea02") +function setuninterruptiblepowersupply_ea02.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/UniterruptiblePowerSupply_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetUninterruptiblePowerSupply", string.format("SetUninterruptiblePowerSupply, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetUninterruptiblePowerSupply")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_SetUninterruptiblePowerSupplyRec_tree = body_tree:add("SetUninterruptiblePowerSupplyRec") + local value_set = {[0] = "OFF", [1] = "ON"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SetUninterruptiblePowerSupplyRec_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xEA02, setuninterruptiblepowersupply_ea02) + +queryuninterruptiblepowersupplycapabilities_ea04 = Proto("queryuninterruptiblepowersupplycapabilities_ea04", "QueryUninterruptiblePowerSupplyCapabilities 0xea04") +function queryuninterruptiblepowersupplycapabilities_ea04.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/UniterruptiblePowerSupply_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryUninterruptiblePowerSupplyCapabilities", string.format("QueryUninterruptiblePowerSupplyCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryUninterruptiblePowerSupplyCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xEA04, queryuninterruptiblepowersupplycapabilities_ea04) + +reportuninterruptiblepowersupply_ea03 = Proto("reportuninterruptiblepowersupply_ea03", "ReportUninterruptiblePowerSupply 0xea03") +function reportuninterruptiblepowersupply_ea03.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/UniterruptiblePowerSupply_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportUninterruptiblePowerSupply", string.format("ReportUninterruptiblePowerSupply, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportUninterruptiblePowerSupply")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportUninterruptiblePowerSupplyRec_tree = body_tree:add("ReportUninterruptiblePowerSupplyRec") + local body_ReportUninterruptiblePowerSupplyRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportUninterruptiblePowerSupplyRec_pv_count = 0 + body_ReportUninterruptiblePowerSupplyRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "OFF", [1] = "ON_Activated", [2] = "ON_Charging", [3] = "ON_Ready", [4] = "Failure"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReportUninterruptiblePowerSupplyRec_tree:add(buffer(bufidx, 1), string.format("State: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_ReportUninterruptiblePowerSupplyRec_pv, body_ReportUninterruptiblePowerSupplyRec_pv_count) > 0) then + body_ReportUninterruptiblePowerSupplyRec_tree:add(buffer(bufidx, 2), string.format("percentCharge: %.4f (scaled) -- (unsigned short integer) Percent of maximum.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportUninterruptiblePowerSupplyRec_pv_count = body_ReportUninterruptiblePowerSupplyRec_pv_count + 1 + if (bitAND(body_ReportUninterruptiblePowerSupplyRec_pv, body_ReportUninterruptiblePowerSupplyRec_pv_count) > 0) then + body_ReportUninterruptiblePowerSupplyRec_tree:add(buffer(bufidx, 2), string.format("currentDraw: %.4f (scaled) -- (unsigned short integer) When UPS is active, this is the current being supplied by the unit", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportUninterruptiblePowerSupplyRec_pv_count = body_ReportUninterruptiblePowerSupplyRec_pv_count + 1 + if (bitAND(body_ReportUninterruptiblePowerSupplyRec_pv, body_ReportUninterruptiblePowerSupplyRec_pv_count) > 0) then + body_ReportUninterruptiblePowerSupplyRec_tree:add(buffer(bufidx, 2), string.format("timeRemaining: %.4f (scaled) -- (unsigned short integer) When UPS is active, this is an estimated time the unit will be able to continue to generate power", buffer(bufidx, 2):le_uint() * 0.152590218967 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportUninterruptiblePowerSupplyRec_pv_count = body_ReportUninterruptiblePowerSupplyRec_pv_count + 1 +end +messagetable:add(0xEA03, reportuninterruptiblepowersupply_ea03) + +reportuninterruptiblepowersupplycapabilities_ea05 = Proto("reportuninterruptiblepowersupplycapabilities_ea05", "ReportUninterruptiblePowerSupplyCapabilities 0xea05") +function reportuninterruptiblepowersupplycapabilities_ea05.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/UniterruptiblePowerSupply_V4.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportUninterruptiblePowerSupplyCapabilities", string.format("ReportUninterruptiblePowerSupplyCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportUninterruptiblePowerSupplyCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportUninterruptiblePowerSupplyCapabilitiesRec_tree = body_tree:add("ReportUninterruptiblePowerSupplyCapabilitiesRec") + local body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count = 0 + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv, body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count) > 0) then + local body_ReportUninterruptiblePowerSupplyCapabilitiesRec_Description_tree = body_ReportUninterruptiblePowerSupplyCapabilitiesRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_Description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count = body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv, body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count) > 0) then + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("nominalVoltage: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count = body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv, body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count) > 0) then + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("maxCharge: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000838190317 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count = body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count + 1 + if (bitAND(body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv, body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count) > 0) then + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("maxCurrentDraw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.076295109483 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count = body_ReportUninterruptiblePowerSupplyCapabilitiesRec_pv_count + 1 +end +messagetable:add(0xEA05, reportuninterruptiblepowersupplycapabilities_ea05) + +queryversion_e99a = Proto("queryversion_e99a", "QueryVersion 0xe99a") +function queryversion_e99a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/VersionReporting_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVersion", string.format("QueryVersion, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVersion")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xE99A, queryversion_e99a) + +reportversion_f99a = Proto("reportversion_f99a", "ReportVersion 0xf99a") +function reportversion_f99a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/VersionReporting_V6.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVersion", string.format("ReportVersion, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVersion")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_VersionList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "VersionList ") + body_VersionList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_VersionList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_VersionList_count do + local body_VersionList_VersionRec_tree = body_VersionList_tree:add(string.format("VersionRec_%d", body_counter - 1)) + local body_VersionList_VersionRec_pv = buffer(bufidx, 1):le_uint() + local body_VersionList_VersionRec_pv_count = 0 + body_VersionList_VersionRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_VersionList_VersionRec_Name_tree = body_VersionList_VersionRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Name[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_VersionList_VersionRec_Name_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local value_set = {[0] = "Hardware", [1] = "Software", [2] = "Firmware"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VersionList_VersionRec_tree:add(buffer(bufidx, 1), string.format("Type: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_VersionList_VersionRec_pv, body_VersionList_VersionRec_pv_count) > 0) then + local body_VersionList_VersionRec_Description_tree = body_VersionList_VersionRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_VersionList_VersionRec_Description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_VersionList_VersionRec_pv_count = body_VersionList_VersionRec_pv_count + 1 + if (bitAND(body_VersionList_VersionRec_pv, body_VersionList_VersionRec_pv_count) > 0) then + local body_VersionList_VersionRec_Version_tree = body_VersionList_VersionRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Version[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_VersionList_VersionRec_Version_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_VersionList_VersionRec_pv_count = body_VersionList_VersionRec_pv_count + 1 + if (bitAND(body_VersionList_VersionRec_pv, body_VersionList_VersionRec_pv_count) > 0) then + body_VersionList_VersionRec_tree:add(buffer(bufidx, 2), string.format("BuildID: %d -- (unsigned short integer) Build ID", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_VersionList_VersionRec_pv_count = body_VersionList_VersionRec_pv_count + 1 + if (bitAND(body_VersionList_VersionRec_pv, body_VersionList_VersionRec_pv_count) > 0) then + local body_VersionList_VersionRec_Copyright_tree = body_VersionList_VersionRec_tree:add(buffer(bufidx, 2 + buffer(bufidx, 2):le_uint()), string.format("Copyright[%d]: %s", buffer(bufidx, 2):le_uint(), buffer(bufidx + 2, buffer(bufidx, 2):le_uint()):string())) + body_VersionList_VersionRec_Copyright_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + buffer(bufidx, 2):le_uint() + end + body_VersionList_VersionRec_pv_count = body_VersionList_VersionRec_pv_count + 1 + if (bitAND(body_VersionList_VersionRec_pv, body_VersionList_VersionRec_pv_count) > 0) then + local body_VersionList_VersionRec_InstallLocation_tree = body_VersionList_VersionRec_tree:add(buffer(bufidx, 2 + buffer(bufidx, 2):le_uint()), string.format("InstallLocation[%d]: %s", buffer(bufidx, 2):le_uint(), buffer(bufidx + 2, buffer(bufidx, 2):le_uint()):string())) + body_VersionList_VersionRec_InstallLocation_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + buffer(bufidx, 2):le_uint() + end + body_VersionList_VersionRec_pv_count = body_VersionList_VersionRec_pv_count + 1 + if (bitAND(body_VersionList_VersionRec_pv, body_VersionList_VersionRec_pv_count) > 0) then + local body_VersionList_VersionRec_ManufacturerCAGENumber_tree = body_VersionList_VersionRec_tree:add(buffer(bufidx, 2 + buffer(bufidx, 2):le_uint()), string.format("ManufacturerCAGENumber[%d]: %s", buffer(bufidx, 2):le_uint(), buffer(bufidx + 2, buffer(bufidx, 2):le_uint()):string())) + body_VersionList_VersionRec_ManufacturerCAGENumber_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + buffer(bufidx, 2):le_uint() + end + body_VersionList_VersionRec_pv_count = body_VersionList_VersionRec_pv_count + 1 + end +end +messagetable:add(0xF99A, reportversion_f99a) + +querywheelspecifications_d970 = Proto("querywheelspecifications_d970", "QueryWheelSpecifications 0xd970") +function querywheelspecifications_d970.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WheelSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryWheelSpecifications", string.format("QueryWheelSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryWheelSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD970, querywheelspecifications_d970) + +querywheelstatus_d971 = Proto("querywheelstatus_d971", "QueryWheelStatus 0xd971") +function querywheelstatus_d971.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WheelSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryWheelStatus", string.format("QueryWheelStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryWheelStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD971, querywheelstatus_d971) + +reportwheelspecifications_d972 = Proto("reportwheelspecifications_d972", "ReportWheelSpecifications 0xd972") +function reportwheelspecifications_d972.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WheelSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportWheelSpecifications", string.format("ReportWheelSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportWheelSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_SpecificationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "SpecificationList ") + body_SpecificationList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + local body_SpecificationList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_SpecificationList_count do + local body_SpecificationList_SpecificationsRec_tree = body_SpecificationList_tree:add(string.format("SpecificationsRec_%d", body_counter - 1)) + local body_SpecificationList_SpecificationsRec_pv = buffer(bufidx, 1):le_uint() + local body_SpecificationList_SpecificationsRec_pv_count = 0 + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) ID of the wheel or track", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_SpecificationList_SpecificationsRec_Description_tree = body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_SpecificationList_SpecificationsRec_Description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local value_set = {[0] = "Wheel", [1] = "Track"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 1), string.format("Type: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_SpecificationList_SpecificationsRec_pv, body_SpecificationList_SpecificationsRec_pv_count) > 0) then + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 2), string.format("LocationX: %.4f (scaled) -- (unsigned short integer) X location of the center of the wheel or track measured in the vehicle coordinate frame.", buffer(bufidx, 2):le_uint() * 0.000305180438 + (-10.000000000000))) + bufidx = bufidx + 2 + end + body_SpecificationList_SpecificationsRec_pv_count = body_SpecificationList_SpecificationsRec_pv_count + 1 + if (bitAND(body_SpecificationList_SpecificationsRec_pv, body_SpecificationList_SpecificationsRec_pv_count) > 0) then + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 2), string.format("LocationY: %.4f (scaled) -- (unsigned short integer) Y location of the center of the wheel or track measured in the vehicle coordinate frame.", buffer(bufidx, 2):le_uint() * 0.000305180438 + (-10.000000000000))) + bufidx = bufidx + 2 + end + body_SpecificationList_SpecificationsRec_pv_count = body_SpecificationList_SpecificationsRec_pv_count + 1 + if (bitAND(body_SpecificationList_SpecificationsRec_pv, body_SpecificationList_SpecificationsRec_pv_count) > 0) then + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 2), string.format("LocationZ: %.4f (scaled) -- (unsigned short integer) Z location of the center of the wheel or track measured in the vehicle coordinate frame.", buffer(bufidx, 2):le_uint() * 0.000305180438 + (-10.000000000000))) + bufidx = bufidx + 2 + end + body_SpecificationList_SpecificationsRec_pv_count = body_SpecificationList_SpecificationsRec_pv_count + 1 + if (bitAND(body_SpecificationList_SpecificationsRec_pv, body_SpecificationList_SpecificationsRec_pv_count) > 0) then + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 4), string.format("MinEncoderCounts: %d -- (integer) Lowest possible encoder count value. Below this, the encoder counts are expected to wrap to max value", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_SpecificationList_SpecificationsRec_pv_count = body_SpecificationList_SpecificationsRec_pv_count + 1 + if (bitAND(body_SpecificationList_SpecificationsRec_pv, body_SpecificationList_SpecificationsRec_pv_count) > 0) then + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 4), string.format("MaxEncoderCounts: %d -- (integer) Maximum possible encoder count value. Above this, the encoder counts are expected to wrap to min value", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_SpecificationList_SpecificationsRec_pv_count = body_SpecificationList_SpecificationsRec_pv_count + 1 + if (bitAND(body_SpecificationList_SpecificationsRec_pv, body_SpecificationList_SpecificationsRec_pv_count) > 0) then + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 4), string.format("EncoderCountsPerRevolution: %d -- (integer) Encoder count corresponding to one complete revolution of the wheel or track", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_SpecificationList_SpecificationsRec_pv_count = body_SpecificationList_SpecificationsRec_pv_count + 1 + if (bitAND(body_SpecificationList_SpecificationsRec_pv, body_SpecificationList_SpecificationsRec_pv_count) > 0) then + body_SpecificationList_SpecificationsRec_tree:add(buffer(bufidx, 4), string.format("Circumference: %d -- (float) Total circumference of the wheel or track. This is the total forward movement for one complete revolution assuming no slipping or skidding.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_SpecificationList_SpecificationsRec_pv_count = body_SpecificationList_SpecificationsRec_pv_count + 1 + end +end +messagetable:add(0xD972, reportwheelspecifications_d972) + +reportwheelstatus_d973 = Proto("reportwheelstatus_d973", "ReportWheelStatus 0xd973") +function reportwheelstatus_d973.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WheelSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportWheelStatus", string.format("ReportWheelStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportWheelStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_StatusList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "StatusList ") + body_StatusList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + local body_StatusList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_StatusList_count do + local body_StatusList_StatusRec_tree = body_StatusList_tree:add(string.format("StatusRec_%d", body_counter - 1)) + local body_StatusList_StatusRec_pv = buffer(bufidx, 1):le_uint() + local body_StatusList_StatusRec_pv_count = 0 + body_StatusList_StatusRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_StatusList_StatusRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) ID of the wheel or track", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + if (bitAND(body_StatusList_StatusRec_pv, body_StatusList_StatusRec_pv_count) > 0) then + body_StatusList_StatusRec_tree:add(buffer(bufidx, 4), string.format("EncoderCounts: %d -- (integer) Current encoder value", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_StatusList_StatusRec_pv_count = body_StatusList_StatusRec_pv_count + 1 + if (bitAND(body_StatusList_StatusRec_pv, body_StatusList_StatusRec_pv_count) > 0) then + body_StatusList_StatusRec_tree:add(buffer(bufidx, 4), string.format("EncoderCountsPerSecond: %d -- (float) Current encoder rate", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_StatusList_StatusRec_pv_count = body_StatusList_StatusRec_pv_count + 1 + if (bitAND(body_StatusList_StatusRec_pv, body_StatusList_StatusRec_pv_count) > 0) then + body_StatusList_StatusRec_tree:add(buffer(bufidx, 4), string.format("RotationalRate: %d ", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_StatusList_StatusRec_pv_count = body_StatusList_StatusRec_pv_count + 1 + if (bitAND(body_StatusList_StatusRec_pv, body_StatusList_StatusRec_pv_count) > 0) then + body_StatusList_StatusRec_tree:add(buffer(bufidx, 2), string.format("BodyRelativeYaw: %.4f (scaled) -- (unsigned short integer) Current rotation about the vehicle coordinate frame Z axis", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_StatusList_StatusRec_pv_count = body_StatusList_StatusRec_pv_count + 1 + if (bitAND(body_StatusList_StatusRec_pv, body_StatusList_StatusRec_pv_count) > 0) then + body_StatusList_StatusRec_tree:add(buffer(bufidx, 2), string.format("BodyRelativePitch: %.4f (scaled) -- (unsigned short integer) Current rotation about the vehicle coordinate frame Y axis", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_StatusList_StatusRec_pv_count = body_StatusList_StatusRec_pv_count + 1 + if (bitAND(body_StatusList_StatusRec_pv, body_StatusList_StatusRec_pv_count) > 0) then + body_StatusList_StatusRec_tree:add(buffer(bufidx, 2), string.format("BodyRelativeRoll: %.4f (scaled) -- (unsigned short integer) Current rotation about the vehicle coordinate frame X axis", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_StatusList_StatusRec_pv_count = body_StatusList_StatusRec_pv_count + 1 + if (bitAND(body_StatusList_StatusRec_pv, body_StatusList_StatusRec_pv_count) > 0) then + body_StatusList_StatusRec_tree:add(buffer(bufidx, 2), string.format("SuspensionCompression: %.4f (scaled) -- (unsigned short integer) Compression (positive value) or extension (negative value) of the suspension from nominal position.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_StatusList_StatusRec_pv_count = body_StatusList_StatusRec_pv_count + 1 + if (bitAND(body_StatusList_StatusRec_pv, body_StatusList_StatusRec_pv_count) > 0) then + body_StatusList_StatusRec_tree:add(buffer(bufidx, 2), string.format("PercentSlip: %.4f (scaled) -- (unsigned short integer) Estimated slip. Zero implies perfect traction while 100 is spinning in place.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_StatusList_StatusRec_pv_count = body_StatusList_StatusRec_pv_count + 1 + end +end +messagetable:add(0xD973, reportwheelstatus_d973) + +querywipercapabilities_d7c0 = Proto("querywipercapabilities_d7c0", "QueryWiperCapabilities 0xd7c0") +function querywipercapabilities_d7c0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WiperService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryWiperCapabilities", string.format("QueryWiperCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryWiperCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD7C0, querywipercapabilities_d7c0) + +querywiperstatus_d7c1 = Proto("querywiperstatus_d7c1", "QueryWiperStatus 0xd7c1") +function querywiperstatus_d7c1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WiperService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryWiperStatus", string.format("QueryWiperStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryWiperStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xD7C1, querywiperstatus_d7c1) + +setwiperstatus_d7c2 = Proto("setwiperstatus_d7c2", "SetWiperStatus 0xd7c2") +function setwiperstatus_d7c2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WiperService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetWiperStatus", string.format("SetWiperStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetWiperStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_WiperStatusRec_tree = body_tree:add("WiperStatusRec") + local value_set = {[0] = "Off", [1] = "OneShotActive", [2] = "LowPeriodic", [3] = "MediumPeriodic", [4] = "HighPeriodic", [5] = "LowInterval", [6] = "MediumInterval", [7] = "HighInterval"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WiperStatusRec_tree:add(buffer(bufidx, 1), string.format("WiperStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xD7C2, setwiperstatus_d7c2) + +reportwipercapabilities_d7c3 = Proto("reportwipercapabilities_d7c3", "ReportWiperCapabilities 0xd7c3") +function reportwipercapabilities_d7c3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WiperService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportWiperCapabilities", string.format("ReportWiperCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportWiperCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_WiperCapabilitiesRec_tree = body_tree:add("WiperCapabilitiesRec") + local body_WiperCapabilitiesRec_pv = buffer(bufidx, 2):le_uint() + local body_WiperCapabilitiesRec_pv_count = 0 + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local body_WiperCapabilitiesRec_WiperCapabilities_buf = buffer(bufidx, 1) + local body_WiperCapabilitiesRec_WiperCapabilities_tree = body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("%s = WiperCapabilities: 0x%X -- (unsigned byte) Bit field representing the underlying hardware capabilities. A value of one (1) means the capability is supported.", bitstr(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 8), body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint())) + body_WiperCapabilitiesRec_WiperCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = OneShot: %d", bitstr_part(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 8, 0, 0), bitVal(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 0, 0))) + body_WiperCapabilitiesRec_WiperCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = LowPeriodic: %d", bitstr_part(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 8, 1, 1), bitVal(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 1, 1))) + body_WiperCapabilitiesRec_WiperCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = MediumPeriodic: %d", bitstr_part(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 8, 2, 2), bitVal(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 2, 2))) + body_WiperCapabilitiesRec_WiperCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = HighPeriodic: %d", bitstr_part(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 8, 3, 3), bitVal(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 3, 3))) + body_WiperCapabilitiesRec_WiperCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = LowInterval: %d", bitstr_part(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 8, 4, 4), bitVal(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 4, 4))) + body_WiperCapabilitiesRec_WiperCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = MediumInterval: %d", bitstr_part(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 8, 5, 5), bitVal(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 5, 5))) + body_WiperCapabilitiesRec_WiperCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = HighInterval: %d", bitstr_part(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 8, 6, 6), bitVal(body_WiperCapabilitiesRec_WiperCapabilities_buf:le_uint(), 6, 6))) + bufidx = bufidx + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("LowPeriod: %.4f (scaled) -- (unsigned byte) Time duration (period) of the LowPeriodic setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("MediumPeriod: %.4f (scaled) -- (unsigned byte) Time duration (period) of the MediumPeriodic setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("HighPeriod: %.4f (scaled) -- (unsigned byte) Time duration (period) of the HighPeriodic setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("LowIntervalPeriod: %.4f (scaled) -- (unsigned byte) Total time duration (period) of the LowInterval setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("MediumIntervalPeriod: %.4f (scaled) -- (unsigned byte) Total time duration (period) of the MediumInterval setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("HighIntervalPeriod: %.4f (scaled) -- (unsigned byte) Total time duration (period) of the HighInterval setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("LowIntervalDelay: %.4f (scaled) -- (unsigned byte) Time delay between wipes in the LowInterval setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("MediumIntervalDelay: %.4f (scaled) -- (unsigned byte) Time delay between wipes in the MediumInterval setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 + if (bitAND(body_WiperCapabilitiesRec_pv, body_WiperCapabilitiesRec_pv_count) > 0) then + body_WiperCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("HighIntervalDelay: %.4f (scaled) -- (unsigned byte) Time delay between wipes in the HighInterval setting, in seconds.", buffer(bufidx, 1):le_uint() * 0.100000000000 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WiperCapabilitiesRec_pv_count = body_WiperCapabilitiesRec_pv_count + 1 +end +messagetable:add(0xD7C3, reportwipercapabilities_d7c3) + +reportwiperstatus_d7c4 = Proto("reportwiperstatus_d7c4", "ReportWiperStatus 0xd7c4") +function reportwiperstatus_d7c4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop-v6/WiperService_V2.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportWiperStatus", string.format("ReportWiperStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportWiperStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_WiperStatusRec_tree = body_tree:add("WiperStatusRec") + local value_set = {[0] = "Off", [1] = "OneShotActive", [2] = "LowPeriodic", [3] = "MediumPeriodic", [4] = "HighPeriodic", [5] = "LowInterval", [6] = "MediumInterval", [7] = "HighInterval"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_WiperStatusRec_tree:add(buffer(bufidx, 1), string.format("WiperStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xD7C4, reportwiperstatus_d7c4) + +querycostmap2d_d738 = Proto("querycostmap2d_d738", "QueryCostMap2D 0xd738") +function querycostmap2d_d738.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/CostMap2DClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCostMap2D", string.format("QueryCostMap2D, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCostMap2D")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryCostMap2DSeq_tree = body_tree:add("QueryCostMap2DSeq") + local body_QueryCostMap2DSeq_pv = buffer(bufidx, 1):le_uint() + local body_QueryCostMap2DSeq_pv_count = 0 + body_QueryCostMap2DSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_QueryCostMap2DSeq_pv, body_QueryCostMap2DSeq_pv_count) > 0) then + local body_QueryCostMap2DSeq_QueryCostMap2DRec_tree = body_QueryCostMap2DSeq_tree:add("QueryCostMap2DRec") + body_QueryCostMap2DSeq_QueryCostMap2DRec_tree:add(buffer(bufidx, 2), string.format("MaxWidth: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.152590218967 + (0.000000000000))) + bufidx = bufidx + 2 + body_QueryCostMap2DSeq_QueryCostMap2DRec_tree:add(buffer(bufidx, 2), string.format("MaxHeight: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.152590218967 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_QueryCostMap2DSeq_pv_count = body_QueryCostMap2DSeq_pv_count + 1 + if (bitAND(body_QueryCostMap2DSeq_pv, body_QueryCostMap2DSeq_pv_count) > 0) then + local body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_tree = body_QueryCostMap2DSeq_tree:add("QueryCostMap2DCenterVar") + body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_QueryCostMap2DSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_QueryCostMap2DSeq_index == 0) then + local body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_CostMap2DGlobalPoseRec_tree = body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_tree:add("CostMap2DGlobalPoseRec") + body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_CostMap2DGlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("MapCenterLatitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_CostMap2DGlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("MapCenterLongitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_CostMap2DGlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("MapRotation: %.4f (scaled) -- (unsigned short integer) Rotation about the global Z axis.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + if (body_QueryCostMap2DSeq_index == 1) then + local body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_CostMap2DLocalPoseRec_tree = body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_tree:add("CostMap2DLocalPoseRec") + body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_CostMap2DLocalPoseRec_tree:add(buffer(bufidx, 4), string.format("MapCenterX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_CostMap2DLocalPoseRec_tree:add(buffer(bufidx, 4), string.format("MapCenterY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_QueryCostMap2DSeq_QueryCostMap2DCenterVar_CostMap2DLocalPoseRec_tree:add(buffer(bufidx, 2), string.format("MapRotation: %.4f (scaled) -- (unsigned short integer) Rotation about the local Z axis.", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + end + body_QueryCostMap2DSeq_pv_count = body_QueryCostMap2DSeq_pv_count + 1 +end +messagetable:add(0xD738, querycostmap2d_d738) + +querynogozones_d739 = Proto("querynogozones_d739", "QueryNoGoZones 0xd739") +function querynogozones_d739.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/CostMap2DClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryNoGoZones", string.format("QueryNoGoZones, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryNoGoZones")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ZoneIDRec_tree = body_tree:add("ZoneIDRec") + body_ZoneIDRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d -- (unsigned short integer) ID of the zone to be reported. If the specified value is zero (0), all zones will be reported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0xD739, querynogozones_d739) + +addnogozone_d740 = Proto("addnogozone_d740", "AddNoGoZone 0xd740") +function addnogozone_d740.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/CostMap2DClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "AddNoGoZone", string.format("AddNoGoZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "AddNoGoZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_NoGoZoneSeq_tree = body_tree:add("NoGoZoneSeq") + local body_NoGoZoneSeq_RequestIDRec_tree = body_NoGoZoneSeq_tree:add("RequestIDRec") + body_NoGoZoneSeq_RequestIDRec_tree:add(buffer(bufidx, 2), string.format("RequestID: %d -- (unsigned short integer) This value will be returned in the AddNoGoZoneResponse message to enable a client to match set and response pairs. The value is established by the client.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_NoGoZoneSeq_VertexVar_tree = body_NoGoZoneSeq_tree:add("VertexVar") + body_NoGoZoneSeq_VertexVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_NoGoZoneSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_NoGoZoneSeq_index == 0) then + local bufidx_start_body_NoGoZoneSeq_VertexVar = bufidx + local body_NoGoZoneSeq_VertexVar_GlobalVertexList_tree = body_NoGoZoneSeq_VertexVar_tree:add(buffer(bufidx_start_body_NoGoZoneSeq_VertexVar, buffer:len() - bufidx_start_body_NoGoZoneSeq_VertexVar), "GlobalVertexList ") + body_NoGoZoneSeq_VertexVar_GlobalVertexList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NoGoZoneSeq_VertexVar_GlobalVertexList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_NoGoZoneSeq_VertexVar_counter=1,body_NoGoZoneSeq_VertexVar_GlobalVertexList_count do + local body_NoGoZoneSeq_VertexVar_GlobalVertexList_GlobalVertexRec_tree = body_NoGoZoneSeq_VertexVar_GlobalVertexList_tree:add(string.format("GlobalVertexRec_%d", body_NoGoZoneSeq_VertexVar_counter - 1)) + body_NoGoZoneSeq_VertexVar_GlobalVertexList_GlobalVertexRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_NoGoZoneSeq_VertexVar_GlobalVertexList_GlobalVertexRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + end + if (body_NoGoZoneSeq_index == 1) then + local bufidx_start_body_NoGoZoneSeq_VertexVar = bufidx + local body_NoGoZoneSeq_VertexVar_LocalVertexList_tree = body_NoGoZoneSeq_VertexVar_tree:add(buffer(bufidx_start_body_NoGoZoneSeq_VertexVar, buffer:len() - bufidx_start_body_NoGoZoneSeq_VertexVar), "LocalVertexList ") + body_NoGoZoneSeq_VertexVar_LocalVertexList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NoGoZoneSeq_VertexVar_LocalVertexList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_NoGoZoneSeq_VertexVar_counter=1,body_NoGoZoneSeq_VertexVar_LocalVertexList_count do + local body_NoGoZoneSeq_VertexVar_LocalVertexList_LocalVertexRec_tree = body_NoGoZoneSeq_VertexVar_LocalVertexList_tree:add(string.format("LocalVertexRec_%d", body_NoGoZoneSeq_VertexVar_counter - 1)) + body_NoGoZoneSeq_VertexVar_LocalVertexList_LocalVertexRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_NoGoZoneSeq_VertexVar_LocalVertexList_LocalVertexRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + end +end +messagetable:add(0xD740, addnogozone_d740) + +removenogozone_d741 = Proto("removenogozone_d741", "RemoveNoGoZone 0xd741") +function removenogozone_d741.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/CostMap2DClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RemoveNoGoZone", string.format("RemoveNoGoZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RemoveNoGoZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ZoneIDRec_tree = body_tree:add("ZoneIDRec") + body_ZoneIDRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d -- (unsigned short integer) ID of the zone to be reported. If the specified value is zero (0), all zones will be reported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0xD741, removenogozone_d741) + +reportcostmap2d_d742 = Proto("reportcostmap2d_d742", "ReportCostMap2D 0xd742") +function reportcostmap2d_d742.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/CostMap2DClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCostMap2D", string.format("ReportCostMap2D, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCostMap2D")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_CostMap2DSeq_tree = body_tree:add("CostMap2DSeq") + local body_CostMap2DSeq_CostMap2DRec_tree = body_CostMap2DSeq_tree:add("CostMap2DRec") + body_CostMap2DSeq_CostMap2DRec_tree:add(buffer(bufidx, 2), string.format("NumberOfRows: %d -- (unsigned short integer) Number of rows in the map data.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_CostMap2DSeq_CostMap2DRec_tree:add(buffer(bufidx, 2), string.format("NumberOfColumns: %d -- (unsigned short integer) Number of columns in the map data.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_CostMap2DSeq_CostMap2DRec_tree:add(buffer(bufidx, 2), string.format("MapWidth: %.4f (scaled) -- (unsigned short integer) Total width of the cost map.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (0.000000000000))) + bufidx = bufidx + 2 + body_CostMap2DSeq_CostMap2DRec_tree:add(buffer(bufidx, 2), string.format("MapHeight: %.4f (scaled) -- (unsigned short integer) Total height of the cost map.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (0.000000000000))) + bufidx = bufidx + 2 + local body_CostMap2DSeq_CostMap2DPoseVar_tree = body_CostMap2DSeq_tree:add("CostMap2DPoseVar") + body_CostMap2DSeq_CostMap2DPoseVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_CostMap2DSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_CostMap2DSeq_index == 0) then + local body_CostMap2DSeq_CostMap2DPoseVar_CostMap2DGlobalPoseRec_tree = body_CostMap2DSeq_CostMap2DPoseVar_tree:add("CostMap2DGlobalPoseRec") + body_CostMap2DSeq_CostMap2DPoseVar_CostMap2DGlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("MapCenterLatitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_CostMap2DSeq_CostMap2DPoseVar_CostMap2DGlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("MapCenterLongitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + body_CostMap2DSeq_CostMap2DPoseVar_CostMap2DGlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("MapRotation: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + if (body_CostMap2DSeq_index == 1) then + local body_CostMap2DSeq_CostMap2DPoseVar_CostMap2DLocalPoseRec_tree = body_CostMap2DSeq_CostMap2DPoseVar_tree:add("CostMap2DLocalPoseRec") + body_CostMap2DSeq_CostMap2DPoseVar_CostMap2DLocalPoseRec_tree:add(buffer(bufidx, 4), string.format("MapCenterX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_CostMap2DSeq_CostMap2DPoseVar_CostMap2DLocalPoseRec_tree:add(buffer(bufidx, 4), string.format("MapCenterY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_CostMap2DSeq_CostMap2DPoseVar_CostMap2DLocalPoseRec_tree:add(buffer(bufidx, 2), string.format("MapRotation: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + local body_CostMap2DSeq_CostMap2DDataVar_tree = body_CostMap2DSeq_tree:add("CostMap2DDataVar") + body_CostMap2DSeq_CostMap2DDataVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_CostMap2DSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_CostMap2DSeq_index == 0) then + local bufidx_start_body_CostMap2DSeq_CostMap2DDataVar = bufidx + local body_CostMap2DSeq_CostMap2DDataVar_CostDataList_tree = body_CostMap2DSeq_CostMap2DDataVar_tree:add(buffer(bufidx_start_body_CostMap2DSeq_CostMap2DDataVar, buffer:len() - bufidx_start_body_CostMap2DSeq_CostMap2DDataVar), "CostDataList ") + body_CostMap2DSeq_CostMap2DDataVar_CostDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_CostMap2DSeq_CostMap2DDataVar_CostDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_CostMap2DSeq_CostMap2DDataVar_counter=1,body_CostMap2DSeq_CostMap2DDataVar_CostDataList_count do + local body_CostMap2DSeq_CostMap2DDataVar_CostDataList_CostDataRec_tree = body_CostMap2DSeq_CostMap2DDataVar_CostDataList_tree:add(string.format("CostDataRec_%d", body_CostMap2DSeq_CostMap2DDataVar_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_CostMap2DSeq_CostMap2DDataVar_CostDataList_CostDataRec_tree:add(buffer(bufidx, 1), string.format("Cost: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + end + if (body_CostMap2DSeq_index == 1) then + local bufidx_start_body_CostMap2DSeq_CostMap2DDataVar = bufidx + local body_CostMap2DSeq_CostMap2DDataVar_CostAndConfidenceDataList_tree = body_CostMap2DSeq_CostMap2DDataVar_tree:add(buffer(bufidx_start_body_CostMap2DSeq_CostMap2DDataVar, buffer:len() - bufidx_start_body_CostMap2DSeq_CostMap2DDataVar), "CostAndConfidenceDataList ") + body_CostMap2DSeq_CostMap2DDataVar_CostAndConfidenceDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_CostMap2DSeq_CostMap2DDataVar_CostAndConfidenceDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_CostMap2DSeq_CostMap2DDataVar_counter=1,body_CostMap2DSeq_CostMap2DDataVar_CostAndConfidenceDataList_count do + local body_CostMap2DSeq_CostMap2DDataVar_CostAndConfidenceDataList_CostAndConfidenceDataRec_tree = body_CostMap2DSeq_CostMap2DDataVar_CostAndConfidenceDataList_tree:add(string.format("CostAndConfidenceDataRec_%d", body_CostMap2DSeq_CostMap2DDataVar_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_CostMap2DSeq_CostMap2DDataVar_CostAndConfidenceDataList_CostAndConfidenceDataRec_tree:add(buffer(bufidx, 1), string.format("Cost: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_CostMap2DSeq_CostMap2DDataVar_CostAndConfidenceDataList_CostAndConfidenceDataRec_tree:add(buffer(bufidx, 1), string.format("Confidence: %.4f (scaled) -- (unsigned byte) Confidence value associated with the cost of the cell. A value of 0 means there is no confidence in the specified cost (unknown cost). A value of 100 means the cost of the cell is known perfectly.", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + end + if (body_CostMap2DSeq_index == 2) then + local bufidx_start_body_CostMap2DSeq_CostMap2DDataVar = bufidx + local body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_tree = body_CostMap2DSeq_CostMap2DDataVar_tree:add(buffer(bufidx_start_body_CostMap2DSeq_CostMap2DDataVar, buffer:len() - bufidx_start_body_CostMap2DSeq_CostMap2DDataVar), "RunLengthEncodedDataList ") + body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_CostMap2DSeq_CostMap2DDataVar_counter=1,body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_count do + local body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_tree = body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_tree:add(string.format("RunLengthEncodedDataRec_%d", body_CostMap2DSeq_CostMap2DDataVar_counter - 1)) + local body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf = buffer(bufidx, 2) + local body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_tree = body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_tree:add(buffer(bufidx, 2), string.format("%s = CostAndRunLength: 0x%X ", bitstr(body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf:le_uint(), 16), body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf:le_uint())) + body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_tree:add(buffer(bufidx, 2), string.format("%s = CostSubField: %d", bitstr_part(body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf:le_uint(), 16, 0, 2), bitVal(body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf:le_uint(), 0, 2))) + body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_tree:add(buffer(bufidx, 2), string.format("%s = CertaintySubField: %d", bitstr_part(body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf:le_uint(), 16, 3, 3), bitVal(body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf:le_uint(), 3, 3))) + body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_tree:add(buffer(bufidx, 2), string.format("%s = NumberCellsSubField: %d", bitstr_part(body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf:le_uint(), 16, 4, 15), bitVal(body_CostMap2DSeq_CostMap2DDataVar_RunLengthEncodedDataList_RunLengthEncodedDataRec_CostAndRunLength_buf:le_uint(), 4, 15))) + bufidx = bufidx + 2 + end + end +end +messagetable:add(0xD742, reportcostmap2d_d742) + +reportnogozones_d743 = Proto("reportnogozones_d743", "ReportNoGoZones 0xd743") +function reportnogozones_d743.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/CostMap2DClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportNoGoZones", string.format("ReportNoGoZones, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportNoGoZones")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_NoGoZonesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "NoGoZonesList ") + body_NoGoZonesList_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: 0, max_count: 65535", buffer(bufidx, 2):le_uint())) + local body_NoGoZonesList_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_counter=1,body_NoGoZonesList_count do + local body_NoGoZonesList_NoGoZoneSeq_tree = body_NoGoZonesList_tree:add(string.format("NoGoZoneSeq_%d", body_counter - 1)) + local body_NoGoZonesList_NoGoZoneSeq_ZoneIDRec_tree = body_NoGoZonesList_NoGoZoneSeq_tree:add("ZoneIDRec") + body_NoGoZonesList_NoGoZoneSeq_ZoneIDRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d -- (unsigned short integer) ID of the zone to be reported. If the specified value is zero (0), all zones will be reported.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local body_NoGoZonesList_NoGoZoneSeq_VertexVar_tree = body_NoGoZonesList_NoGoZoneSeq_tree:add("VertexVar") + body_NoGoZonesList_NoGoZoneSeq_VertexVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_NoGoZonesList_NoGoZoneSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_NoGoZonesList_NoGoZoneSeq_index == 0) then + local bufidx_start_body_NoGoZonesList_NoGoZoneSeq_VertexVar = bufidx + local body_NoGoZonesList_NoGoZoneSeq_VertexVar_GlobalVertexList_tree = body_NoGoZonesList_NoGoZoneSeq_VertexVar_tree:add(buffer(bufidx_start_body_NoGoZonesList_NoGoZoneSeq_VertexVar, buffer:len() - bufidx_start_body_NoGoZonesList_NoGoZoneSeq_VertexVar), "GlobalVertexList ") + body_NoGoZonesList_NoGoZoneSeq_VertexVar_GlobalVertexList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NoGoZonesList_NoGoZoneSeq_VertexVar_GlobalVertexList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_NoGoZonesList_NoGoZoneSeq_VertexVar_counter=1,body_NoGoZonesList_NoGoZoneSeq_VertexVar_GlobalVertexList_count do + local body_NoGoZonesList_NoGoZoneSeq_VertexVar_GlobalVertexList_GlobalVertexRec_tree = body_NoGoZonesList_NoGoZoneSeq_VertexVar_GlobalVertexList_tree:add(string.format("GlobalVertexRec_%d", body_NoGoZonesList_NoGoZoneSeq_VertexVar_counter - 1)) + body_NoGoZonesList_NoGoZoneSeq_VertexVar_GlobalVertexList_GlobalVertexRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_NoGoZonesList_NoGoZoneSeq_VertexVar_GlobalVertexList_GlobalVertexRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + end + if (body_NoGoZonesList_NoGoZoneSeq_index == 1) then + local bufidx_start_body_NoGoZonesList_NoGoZoneSeq_VertexVar = bufidx + local body_NoGoZonesList_NoGoZoneSeq_VertexVar_LocalVertexList_tree = body_NoGoZonesList_NoGoZoneSeq_VertexVar_tree:add(buffer(bufidx_start_body_NoGoZonesList_NoGoZoneSeq_VertexVar, buffer:len() - bufidx_start_body_NoGoZonesList_NoGoZoneSeq_VertexVar), "LocalVertexList ") + body_NoGoZonesList_NoGoZoneSeq_VertexVar_LocalVertexList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_NoGoZonesList_NoGoZoneSeq_VertexVar_LocalVertexList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_NoGoZonesList_NoGoZoneSeq_VertexVar_counter=1,body_NoGoZonesList_NoGoZoneSeq_VertexVar_LocalVertexList_count do + local body_NoGoZonesList_NoGoZoneSeq_VertexVar_LocalVertexList_LocalVertexRec_tree = body_NoGoZonesList_NoGoZoneSeq_VertexVar_LocalVertexList_tree:add(string.format("LocalVertexRec_%d", body_NoGoZonesList_NoGoZoneSeq_VertexVar_counter - 1)) + body_NoGoZonesList_NoGoZoneSeq_VertexVar_LocalVertexList_LocalVertexRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_NoGoZonesList_NoGoZoneSeq_VertexVar_LocalVertexList_LocalVertexRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + end + end +end +messagetable:add(0xD743, reportnogozones_d743) + +addnogozoneresponse_d744 = Proto("addnogozoneresponse_d744", "AddNoGoZoneResponse 0xd744") +function addnogozoneresponse_d744.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/CostMap2DClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "AddNoGoZoneResponse", string.format("AddNoGoZoneResponse, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "AddNoGoZoneResponse")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_AddNoGoZoneResponseRec_tree = body_tree:add("AddNoGoZoneResponseRec") + body_AddNoGoZoneResponseRec_tree:add(buffer(bufidx, 2), string.format("RequestID: %d -- (unsigned short integer) This value will be returned in the AddNoGoZoneResponse message to enable a client to match set and response pairs. The value is established by the client.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + local value_set = {[0] = "Success", [1] = "GlobalVerticesNotSupported", [2] = "LocalVerticesNotSupported"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_AddNoGoZoneResponseRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_AddNoGoZoneResponseRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d -- (unsigned short integer) This field shall be zero (invalid) unless the ResponseCode is zero (Success). Otherwise, Global ID of the newly defined no go zone.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0xD744, addnogozoneresponse_d744) + +querydigitalresourceendpoint_e702 = Proto("querydigitalresourceendpoint_e702", "QueryDigitalResourceEndpoint 0xe702") +function querydigitalresourceendpoint_e702.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/DigitalRessourceClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryDigitalResourceEndpoint", string.format("QueryDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xE702, querydigitalresourceendpoint_e702) + +registerdigitalresourceendpoint_e703 = Proto("registerdigitalresourceendpoint_e703", "RegisterDigitalResourceEndpoint 0xe703") +function registerdigitalresourceendpoint_e703.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/DigitalRessourceClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RegisterDigitalResourceEndpoint", string.format("RegisterDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RegisterDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RegisterDigitalResourceSeq_tree = body_tree:add("RegisterDigitalResourceSeq") + local body_RegisterDigitalResourceSeq_RequestIDRec_tree = body_RegisterDigitalResourceSeq_tree:add("RequestIDRec") + body_RegisterDigitalResourceSeq_RequestIDRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Client provided ID to link the response to the request", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree = body_RegisterDigitalResourceSeq_tree:add("DigitalResourceEndpointRec") + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv = buffer(bufidx, 1):le_uint() + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count = 0 + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "RTSP", [1] = "MPEG2_TS", [2] = "FTP", [3] = "SFTP", [4] = "FTP_over_SSH", [5] = "HTTP", [6] = "HTTPS", [7] = "SCP"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("ServerType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_ServerURL_tree = body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ServerURL[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_ServerURL_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv, body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count) > 0) then + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_tree = body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X ", bitstr(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32), body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint())) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count = body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count + 1 + if (bitAND(body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv, body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count) > 0) then + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 2), string.format("ResourceID: %d -- (unsigned short integer) The ID used by the configuration and control service to identify this source. This is the SensorID for visual sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count = body_RegisterDigitalResourceSeq_DigitalResourceEndpointRec_pv_count + 1 +end +messagetable:add(0xE703, registerdigitalresourceendpoint_e703) + +removedigitalresourceendpoint_e704 = Proto("removedigitalresourceendpoint_e704", "RemoveDigitalResourceEndpoint 0xe704") +function removedigitalresourceendpoint_e704.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/DigitalRessourceClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RemoveDigitalResourceEndpoint", string.format("RemoveDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RemoveDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RemoveDigitalResourceEndpointRec_tree = body_tree:add("RemoveDigitalResourceEndpointRec") + body_RemoveDigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Unique ID that was returned in the confirm message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_RemoveDigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Client provided ID to link the response to the request", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xE704, removedigitalresourceendpoint_e704) + +reportdigitalresourceendpoint_f702 = Proto("reportdigitalresourceendpoint_f702", "ReportDigitalResourceEndpoint 0xf702") +function reportdigitalresourceendpoint_f702.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/DigitalRessourceClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportDigitalResourceEndpoint", string.format("ReportDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_DigitalResourceEndpointList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "DigitalResourceEndpointList ") + body_DigitalResourceEndpointList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_DigitalResourceEndpointList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_DigitalResourceEndpointList_count do + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree = body_DigitalResourceEndpointList_tree:add(string.format("DigitalResourceEndpointRec_%d", body_counter - 1)) + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv = buffer(bufidx, 1):le_uint() + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count = 0 + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "RTSP", [1] = "MPEG2_TS", [2] = "FTP", [3] = "SFTP", [4] = "FTP_over_SSH", [5] = "HTTP", [6] = "HTTPS", [7] = "SCP"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("ServerType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_ServerURL_tree = body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ServerURL[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_ServerURL_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv, body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count) > 0) then + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf = buffer(bufidx, 4) + local body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_tree = body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 4), string.format("%s = JAUS_ID: 0x%X ", bitstr(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32), body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint())) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = ComponentID: %d", bitstr_part(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 0, 7), bitVal(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 0, 7))) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = NodeID: %d", bitstr_part(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 8, 15), bitVal(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 8, 15))) + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_tree:add(buffer(bufidx, 4), string.format("%s = SubsystemID: %d", bitstr_part(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 32, 16, 31), bitVal(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_JAUS_ID_buf:le_uint(), 16, 31))) + bufidx = bufidx + 4 + end + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count = body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count + 1 + if (bitAND(body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv, body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count) > 0) then + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_tree:add(buffer(bufidx, 2), string.format("ResourceID: %d -- (unsigned short integer) The ID used by the configuration and control service to identify this source. This is the SensorID for visual sensors.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count = body_DigitalResourceEndpointList_DigitalResourceEndpointRec_pv_count + 1 + end +end +messagetable:add(0xF702, reportdigitalresourceendpoint_f702) + +confirmdigitalresourceendpoint_f703 = Proto("confirmdigitalresourceendpoint_f703", "ConfirmDigitalResourceEndpoint 0xf703") +function confirmdigitalresourceendpoint_f703.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/DigitalRessourceClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmDigitalResourceEndpoint", string.format("ConfirmDigitalResourceEndpoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmDigitalResourceEndpoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmDigitalResourceEndpointRec_tree = body_tree:add("ConfirmDigitalResourceEndpointRec") + body_ConfirmDigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Unique ID identifying this resource endpoint", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_ConfirmDigitalResourceEndpointRec_tree:add(buffer(bufidx, 1), string.format("RequestID: %d -- (unsigned byte) Client provided ID to link the response to the request", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xF703, confirmdigitalresourceendpoint_f703) + +requestreleasecontrol_ff38 = Proto("requestreleasecontrol_ff38", "RequestReleaseControl 0xff38") +function requestreleasecontrol_ff38.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestReleaseControl", string.format("RequestReleaseControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestReleaseControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_RequestReleaseControlList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "RequestReleaseControlList ") + body_RequestReleaseControlList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_RequestReleaseControlList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_RequestReleaseControlList_count do + local body_RequestReleaseControlList_RequestReleaseControlRec_tree = body_RequestReleaseControlList_tree:add(string.format("RequestReleaseControlRec_%d", body_counter - 1)) + body_RequestReleaseControlList_RequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Local request ID for this Request.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_RequestReleaseControlList_RequestReleaseControlRec_tree:add(buffer(bufidx, 2), string.format("SrcSubsystemID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestReleaseControlList_RequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("SrcNodeID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestReleaseControlList_RequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("SrcComponentID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_RequestReleaseControlList_RequestReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("AuthorityCode: %d -- (unsigned byte) Authority of the source requesting the handoff.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local body_RequestReleaseControlList_RequestReleaseControlRec_Explanation_tree = body_RequestReleaseControlList_RequestReleaseControlRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Explanation[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RequestReleaseControlList_RequestReleaseControlRec_Explanation_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end +end +messagetable:add(0xFF38, requestreleasecontrol_ff38) + +confirmreleasecontrol_ff39 = Proto("confirmreleasecontrol_ff39", "ConfirmReleaseControl 0xff39") +function confirmreleasecontrol_ff39.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmReleaseControl", string.format("ConfirmReleaseControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmReleaseControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ReleaseControlList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ReleaseControlList ") + body_ReleaseControlList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReleaseControlList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ReleaseControlList_count do + local body_ReleaseControlList_ReleaseControlRec_tree = body_ReleaseControlList_tree:add(string.format("ReleaseControlRec_%d", body_counter - 1)) + body_ReleaseControlList_ReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("ID: %d -- (unsigned byte) Matches the ID from a RequestReleaseControlToRec in the RequestReleaseControl message.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + local value_set = {[0] = "GRANTED", [1] = "DENIED", [2] = "WAIT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ReleaseControlList_ReleaseControlRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0xFF39, confirmreleasecontrol_ff39) + +requesthandoff_ff31 = Proto("requesthandoff_ff31", "RequestHandoff 0xff31") +function requesthandoff_ff31.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestHandoff", string.format("RequestHandoff, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestHandoff")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RequestHandoffRec_tree = body_tree:add("RequestHandoffRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RequestHandoffRec_tree:add(buffer(bufidx, 1), string.format("AuthorityCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_RequestHandoffRec_Explanation_tree = body_RequestHandoffRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Explanation[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_RequestHandoffRec_Explanation_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() +end +messagetable:add(0xFF31, requesthandoff_ff31) + +queryhandofftimeout_ff32 = Proto("queryhandofftimeout_ff32", "QueryHandoffTimeout 0xff32") +function queryhandofftimeout_ff32.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryHandoffTimeout", string.format("QueryHandoffTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryHandoffTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF32, queryhandofftimeout_ff32) + +queryenhancedtimeout_ff33 = Proto("queryenhancedtimeout_ff33", "QueryEnhancedTimeout 0xff33") +function queryenhancedtimeout_ff33.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEnhancedTimeout", string.format("QueryEnhancedTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEnhancedTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xFF33, queryenhancedtimeout_ff33) + +removehandoffrequest_ff34 = Proto("removehandoffrequest_ff34", "RemoveHandoffRequest 0xff34") +function removehandoffrequest_ff34.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RemoveHandoffRequest", string.format("RemoveHandoffRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RemoveHandoffRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_RemoveHandoffRequestRec_tree = body_tree:add("RemoveHandoffRequestRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_RemoveHandoffRequestRec_tree:add(buffer(bufidx, 1), string.format("ID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF34, removehandoffrequest_ff34) + +confirmhandoffrequest_ff35 = Proto("confirmhandoffrequest_ff35", "ConfirmHandoffRequest 0xff35") +function confirmhandoffrequest_ff35.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ConfirmHandoffRequest", string.format("ConfirmHandoffRequest, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ConfirmHandoffRequest")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ConfirmHandoffRequestRec_tree = body_tree:add("ConfirmHandoffRequestRec") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmHandoffRequestRec_tree:add(buffer(bufidx, 1), string.format("ID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "GRANTED", [1] = "NOT_AVAILABLE", [2] = "TIMEOUT", [3] = "DENIED", [4] = "QUEUED", [5] = "DEFERRED", [6] = "INSUFFICIENT_AUTHORITY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_ConfirmHandoffRequestRec_tree:add(buffer(bufidx, 1), string.format("ResponseCode: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0xFF35, confirmhandoffrequest_ff35) + +reporthandofftimeout_ff36 = Proto("reporthandofftimeout_ff36", "ReportHandoffTimeout 0xff36") +function reporthandofftimeout_ff36.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportHandoffTimeout", string.format("ReportHandoffTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportHandoffTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportHandoffTimeoutRec_tree = body_tree:add("ReportHandoffTimeoutRec") + body_ReportHandoffTimeoutRec_tree:add(buffer(bufidx, 1), string.format("Timeout: %d -- (unsigned byte) Service must receive handoff confirmation from the current controller before this timeout expires. A value of zero indicates this feature is disabled.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xFF36, reporthandofftimeout_ff36) + +reportenhancedtimeout_ff37 = Proto("reportenhancedtimeout_ff37", "ReportEnhancedTimeout 0xff37") +function reportenhancedtimeout_ff37.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/HandoffClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEnhancedTimeout", string.format("ReportEnhancedTimeout, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEnhancedTimeout")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportEnhancedTimeoutRec_tree = body_tree:add("ReportEnhancedTimeoutRec") + body_ReportEnhancedTimeoutRec_tree:add(buffer(bufidx, 1), string.format("Timeout: %d -- (unsigned byte) Clients must re-request handoff to prevent being denied handoff request when the timeout expires. A value of zero indicates this feature is disabled.", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0xFF37, reportenhancedtimeout_ff37) + +querymeasurement_f92a = Proto("querymeasurement_f92a", "QueryMeasurement 0xf92a") +function querymeasurement_f92a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/MeasurementClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryMeasurement", string.format("QueryMeasurement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryMeasurement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xF92A, querymeasurement_f92a) + +reportmeasurement_f92b = Proto("reportmeasurement_f92b", "ReportMeasurement 0xf92b") +function reportmeasurement_f92b.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/MeasurementClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportMeasurement", string.format("ReportMeasurement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportMeasurement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_MeasurementSeq_tree = body_tree:add("MeasurementSeq") + local body_MeasurementSeq_pv = buffer(bufidx, 1):le_uint() + local body_MeasurementSeq_pv_count = 0 + body_MeasurementSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_MeasurementSeq_DeviceRec_tree = body_MeasurementSeq_tree:add("DeviceRec") + local body_MeasurementSeq_DeviceRec_pv = buffer(bufidx, 1):le_uint() + local body_MeasurementSeq_DeviceRec_pv_count = 0 + body_MeasurementSeq_DeviceRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_MeasurementSeq_DeviceRec_DeviceName_tree = body_MeasurementSeq_DeviceRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("DeviceName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_DeviceRec_DeviceName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_MeasurementSeq_DeviceRec_pv, body_MeasurementSeq_DeviceRec_pv_count) > 0) then + local body_MeasurementSeq_DeviceRec_DeviceDesignation_tree = body_MeasurementSeq_DeviceRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("DeviceDesignation[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_DeviceRec_DeviceDesignation_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_MeasurementSeq_DeviceRec_pv_count = body_MeasurementSeq_DeviceRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_DeviceRec_pv, body_MeasurementSeq_DeviceRec_pv_count) > 0) then + local body_MeasurementSeq_DeviceRec_Classification_tree = body_MeasurementSeq_DeviceRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Classification[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_DeviceRec_Classification_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_MeasurementSeq_DeviceRec_pv_count = body_MeasurementSeq_DeviceRec_pv_count + 1 + local bufidx_start_body_MeasurementSeq = bufidx + local body_MeasurementSeq_ReadingsList_tree = body_MeasurementSeq_tree:add(buffer(bufidx_start_body_MeasurementSeq, buffer:len() - bufidx_start_body_MeasurementSeq), "ReadingsList ") + body_MeasurementSeq_ReadingsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_MeasurementSeq_ReadingsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_MeasurementSeq_counter=1,body_MeasurementSeq_ReadingsList_count do + local body_MeasurementSeq_ReadingsList_ReadingSeq_tree = body_MeasurementSeq_ReadingsList_tree:add(string.format("ReadingSeq_%d", body_MeasurementSeq_counter - 1)) + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_tree:add("ReadingRec") + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv = buffer(bufidx, 1):le_uint() + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count = 0 + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_Sensor_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Sensor[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_Sensor_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_Source_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Source[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_Source_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_Type_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Type[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_Type_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv, body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count) > 0) then + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_Unit_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Unit[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_Unit_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv, body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count) > 0) then + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1), string.format("Minimum: %d -- (unsigned byte) sometimes the resulting values are accumulated, so you can specify the details", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv, body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count) > 0) then + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1), string.format("Avarage: %d -- (unsigned byte) sometimes the resulting values are accumulated, so you can specify the details", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv, body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count) > 0) then + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1), string.format("Maximum: %d -- (unsigned byte) sometimes the resulting values are accumulated, so you can specify the details", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv, body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count) > 0) then + local value_set = {[255] = "NOT_SUPPORTED", [0] = "NO_ALERT", [1] = "LOW", [2] = "MIDDLE", [3] = "HIGHT"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1), string.format("AlertLevel: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv, body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count) > 0) then + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_AlertExplanation_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("AlertExplanation[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_AlertExplanation_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv, body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count) > 0) then + local body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_ExtendedInfo_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("ExtendedInfo[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_ExtendedInfo_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count = body_MeasurementSeq_ReadingsList_ReadingSeq_ReadingRec_pv_count + 1 + local bufidx_start_body_MeasurementSeq_ReadingsList_ReadingSeq = bufidx + local body_MeasurementSeq_ReadingsList_ReadingSeq_ValueList_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_tree:add(buffer(bufidx_start_body_MeasurementSeq_ReadingsList_ReadingSeq, buffer:len() - bufidx_start_body_MeasurementSeq_ReadingsList_ReadingSeq), "ValueList ") + body_MeasurementSeq_ReadingsList_ReadingSeq_ValueList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_MeasurementSeq_ReadingsList_ReadingSeq_ValueList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_MeasurementSeq_ReadingsList_ReadingSeq_counter=1,body_MeasurementSeq_ReadingsList_ReadingSeq_ValueList_count do + local body_MeasurementSeq_ReadingsList_ReadingSeq_ValueList_ValueRec_tree = body_MeasurementSeq_ReadingsList_ReadingSeq_ValueList_tree:add(string.format("ValueRec_%d", body_MeasurementSeq_ReadingsList_ReadingSeq_counter - 1)) + body_MeasurementSeq_ReadingsList_ReadingSeq_ValueList_ValueRec_tree:add(buffer(bufidx, 4), string.format("Value: %.4f (scaled) -- (unsigned integer) one value or a spectrum of values", buffer(bufidx, 4):le_uint() * 0.000004656613 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + end + if (bitAND(body_MeasurementSeq_pv, body_MeasurementSeq_pv_count) > 0) then + local body_MeasurementSeq_GlobalPoseRec_tree = body_MeasurementSeq_tree:add("GlobalPoseRec") + local body_MeasurementSeq_GlobalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_MeasurementSeq_GlobalPoseRec_pv_count = 0 + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_MeasurementSeq_GlobalPoseRec_pv, body_MeasurementSeq_GlobalPoseRec_pv_count) > 0) then + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_MeasurementSeq_GlobalPoseRec_pv_count = body_MeasurementSeq_GlobalPoseRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_GlobalPoseRec_pv, body_MeasurementSeq_GlobalPoseRec_pv_count) > 0) then + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_MeasurementSeq_GlobalPoseRec_pv_count = body_MeasurementSeq_GlobalPoseRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_GlobalPoseRec_pv, body_MeasurementSeq_GlobalPoseRec_pv_count) > 0) then + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_MeasurementSeq_GlobalPoseRec_pv_count = body_MeasurementSeq_GlobalPoseRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_GlobalPoseRec_pv, body_MeasurementSeq_GlobalPoseRec_pv_count) > 0) then + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_MeasurementSeq_GlobalPoseRec_pv_count = body_MeasurementSeq_GlobalPoseRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_GlobalPoseRec_pv, body_MeasurementSeq_GlobalPoseRec_pv_count) > 0) then + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_MeasurementSeq_GlobalPoseRec_pv_count = body_MeasurementSeq_GlobalPoseRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_GlobalPoseRec_pv, body_MeasurementSeq_GlobalPoseRec_pv_count) > 0) then + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_MeasurementSeq_GlobalPoseRec_pv_count = body_MeasurementSeq_GlobalPoseRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_GlobalPoseRec_pv, body_MeasurementSeq_GlobalPoseRec_pv_count) > 0) then + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_MeasurementSeq_GlobalPoseRec_pv_count = body_MeasurementSeq_GlobalPoseRec_pv_count + 1 + if (bitAND(body_MeasurementSeq_GlobalPoseRec_pv, body_MeasurementSeq_GlobalPoseRec_pv_count) > 0) then + body_MeasurementSeq_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_MeasurementSeq_GlobalPoseRec_pv_count = body_MeasurementSeq_GlobalPoseRec_pv_count + 1 + end + body_MeasurementSeq_pv_count = body_MeasurementSeq_pv_count + 1 + if (bitAND(body_MeasurementSeq_pv, body_MeasurementSeq_pv_count) > 0) then + local body_MeasurementSeq_TimestampRec_tree = body_MeasurementSeq_tree:add("TimestampRec") + local body_MeasurementSeq_TimestampRec_TimeStamp_buf = buffer(bufidx, 4) + local body_MeasurementSeq_TimestampRec_TimeStamp_tree = body_MeasurementSeq_TimestampRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 32), body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint())) + body_MeasurementSeq_TimestampRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 0, 9))) + body_MeasurementSeq_TimestampRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 10, 15))) + body_MeasurementSeq_TimestampRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 16, 21))) + body_MeasurementSeq_TimestampRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 22, 26))) + body_MeasurementSeq_TimestampRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_MeasurementSeq_TimestampRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_MeasurementSeq_pv_count = body_MeasurementSeq_pv_count + 1 +end +messagetable:add(0xF92B, reportmeasurement_f92b) + +querypathreportercapabilities_def0 = Proto("querypathreportercapabilities_def0", "QueryPathReporterCapabilities 0xdef0") +function querypathreportercapabilities_def0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/PathReporterClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPathReporterCapabilities", string.format("QueryPathReporterCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPathReporterCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0xDEF0, querypathreportercapabilities_def0) + +querypath_def1 = Proto("querypath_def1", "QueryPath 0xdef1") +function querypath_def1.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/PathReporterClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPath", string.format("QueryPath, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPath")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryPathRec_tree = body_tree:add("QueryPathRec") + local body_QueryPathRec_pv = buffer(bufidx, 1):le_uint() + local body_QueryPathRec_pv_count = 0 + body_QueryPathRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "HistoricalGlobalPath", [1] = "HistoricalLocalPath", [2] = "PlannedGlobalPath", [3] = "PlannedLocalPath"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_QueryPathRec_tree:add(buffer(bufidx, 1), string.format("PathType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_QueryPathRec_pv, body_QueryPathRec_pv_count) > 0) then + body_QueryPathRec_tree:add(buffer(bufidx, 2), string.format("TargetResolution: %.4f (scaled) -- (unsigned short integer) The desired distance between reported path points.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_QueryPathRec_pv_count = body_QueryPathRec_pv_count + 1 + if (bitAND(body_QueryPathRec_pv, body_QueryPathRec_pv_count) > 0) then + body_QueryPathRec_tree:add(buffer(bufidx, 2), string.format("MaximumPoints: %d -- (unsigned short integer) The maximum number of elements for the list of points to be returned.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_QueryPathRec_pv_count = body_QueryPathRec_pv_count + 1 + if (bitAND(body_QueryPathRec_pv, body_QueryPathRec_pv_count) > 0) then + body_QueryPathRec_tree:add(buffer(bufidx, 4), string.format("MaximumDistance: %d -- (unsigned integer) The maximum planned distance for the list of points to be returned", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_QueryPathRec_pv_count = body_QueryPathRec_pv_count + 1 + if (bitAND(body_QueryPathRec_pv, body_QueryPathRec_pv_count) > 0) then + body_QueryPathRec_tree:add(buffer(bufidx, 4), string.format("MaximumTime: %d -- (unsigned integer) The maximum planned time for the list of points to be returned.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_QueryPathRec_pv_count = body_QueryPathRec_pv_count + 1 +end +messagetable:add(0xDEF1, querypath_def1) + +reportpathreportercapabilities_def2 = Proto("reportpathreportercapabilities_def2", "ReportPathReporterCapabilities 0xdef2") +function reportpathreportercapabilities_def2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/PathReporterClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPathReporterCapabilities", string.format("ReportPathReporterCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPathReporterCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_PathReporterCapabilitiesList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "PathReporterCapabilitiesList ") + body_PathReporterCapabilitiesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 1):le_uint())) + local body_PathReporterCapabilitiesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_PathReporterCapabilitiesList_count do + local body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_tree = body_PathReporterCapabilitiesList_tree:add(string.format("PathReporterCapabilitiesRec_%d", body_counter - 1)) + local body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv = buffer(bufidx, 1):le_uint() + local body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count = 0 + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "HistoricalGlobalPath", [1] = "HistoricalLocalPath", [2] = "PlannedGlobalPath", [3] = "PlannedLocalPath"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("PathType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv, body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count) > 0) then + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MinTargetResolution: %.4f (scaled) -- (unsigned short integer) The minimum supported distance between reported path points. For implementations that do not support interpolation, the Min and Max should be identical.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count = body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count + 1 + if (bitAND(body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv, body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count) > 0) then + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaxTargetResolution: %.4f (scaled) -- (unsigned short integer) The maximum supported distance between reported path points. For implementations that do not support interpolation, the Min and Max should be identical.", buffer(bufidx, 2):le_uint() * 0.152590218967 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count = body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count + 1 + if (bitAND(body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv, body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count) > 0) then + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumPoints: %d -- (unsigned short integer) The maximum supported element count for the list of points to be returned.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count = body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count + 1 + if (bitAND(body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv, body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count) > 0) then + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumDistance: %d -- (unsigned integer) The maximum supported distance for the list of points to be returned.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count = body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count + 1 + if (bitAND(body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv, body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count) > 0) then + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_tree:add(buffer(bufidx, 4), string.format("MaximumTime: %d -- (unsigned integer) The maximum supported time for the list of points to be returned.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count = body_PathReporterCapabilitiesList_PathReporterCapabilitiesRec_pv_count + 1 + end +end +messagetable:add(0xDEF2, reportpathreportercapabilities_def2) + +reportpath_def3 = Proto("reportpath_def3", "ReportPath 0xdef3") +function reportpath_def3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.iop/MessageSet/PathReporterClass.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPath", string.format("ReportPath, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPath")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X ', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PathVar_tree = body_tree:add("PathVar") + body_PathVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 3", buffer(bufidx, 1):le_uint())) + local body_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_index == 0) then + local bufidx_start_body_PathVar = bufidx + local body_PathVar_HistoricalGlobalPath_tree = body_PathVar_tree:add(buffer(bufidx_start_body_PathVar, buffer:len() - bufidx_start_body_PathVar), "HistoricalGlobalPath ") + body_PathVar_HistoricalGlobalPath_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + local body_PathVar_HistoricalGlobalPath_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_PathVar_counter=1,body_PathVar_HistoricalGlobalPath_count do + local body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree = body_PathVar_HistoricalGlobalPath_tree:add(string.format("GlobalPoseRec_%d", body_PathVar_counter - 1)) + local body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = 0 + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv, body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count) > 0) then + local body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf = buffer(bufidx, 4) + local body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_tree = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32), body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint())) + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 0, 9))) + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 10, 15))) + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 16, 21))) + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 22, 26))) + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_PathVar_HistoricalGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count = body_PathVar_HistoricalGlobalPath_GlobalPoseRec_pv_count + 1 + end + end + if (body_index == 1) then + local bufidx_start_body_PathVar = bufidx + local body_PathVar_HistoricalLocalPath_tree = body_PathVar_tree:add(buffer(bufidx_start_body_PathVar, buffer:len() - bufidx_start_body_PathVar), "HistoricalLocalPath ") + body_PathVar_HistoricalLocalPath_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + local body_PathVar_HistoricalLocalPath_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_PathVar_counter=1,body_PathVar_HistoricalLocalPath_count do + local body_PathVar_HistoricalLocalPath_LocalPoseRec_tree = body_PathVar_HistoricalLocalPath_tree:add(string.format("LocalPoseRec_%d", body_PathVar_counter - 1)) + local body_PathVar_HistoricalLocalPath_LocalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = 0 + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_HistoricalLocalPath_LocalPoseRec_pv, body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count) > 0) then + local body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf = buffer(bufidx, 4) + local body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_tree = body_PathVar_HistoricalLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32), body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint())) + body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 0, 9))) + body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 10, 15))) + body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 16, 21))) + body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 22, 26))) + body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_PathVar_HistoricalLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count = body_PathVar_HistoricalLocalPath_LocalPoseRec_pv_count + 1 + end + end + if (body_index == 2) then + local bufidx_start_body_PathVar = bufidx + local body_PathVar_PlannedGlobalPath_tree = body_PathVar_tree:add(buffer(bufidx_start_body_PathVar, buffer:len() - bufidx_start_body_PathVar), "PlannedGlobalPath ") + body_PathVar_PlannedGlobalPath_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + local body_PathVar_PlannedGlobalPath_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_PathVar_counter=1,body_PathVar_PlannedGlobalPath_count do + local body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree = body_PathVar_PlannedGlobalPath_tree:add(string.format("GlobalPoseRec_%d", body_PathVar_counter - 1)) + local body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = 0 + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv, body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count) > 0) then + local body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf = buffer(bufidx, 4) + local body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_tree = body_PathVar_PlannedGlobalPath_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32), body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint())) + body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 0, 9))) + body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 10, 15))) + body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 16, 21))) + body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 22, 26))) + body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_PathVar_PlannedGlobalPath_GlobalPoseRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count = body_PathVar_PlannedGlobalPath_GlobalPoseRec_pv_count + 1 + end + end + if (body_index == 3) then + local bufidx_start_body_PathVar = bufidx + local body_PathVar_PlannedLocalPath_tree = body_PathVar_tree:add(buffer(bufidx_start_body_PathVar, buffer:len() - bufidx_start_body_PathVar), "PlannedLocalPath ") + body_PathVar_PlannedLocalPath_tree:add(buffer(bufidx, 2), string.format("Count: %d, min_count: None, max_count: None", buffer(bufidx, 2):le_uint())) + local body_PathVar_PlannedLocalPath_count = buffer(bufidx, 2):le_uint() + bufidx = bufidx + 2 + for body_PathVar_counter=1,body_PathVar_PlannedLocalPath_count do + local body_PathVar_PlannedLocalPath_LocalPoseRec_tree = body_PathVar_PlannedLocalPath_tree:add(string.format("LocalPoseRec_%d", body_PathVar_counter - 1)) + local body_PathVar_PlannedLocalPath_LocalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = 0 + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + if (bitAND(body_PathVar_PlannedLocalPath_LocalPoseRec_pv, body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count) > 0) then + local body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf = buffer(bufidx, 4) + local body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_tree = body_PathVar_PlannedLocalPath_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32), body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint())) + body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 0, 9))) + body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 10, 15))) + body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 16, 21))) + body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 22, 26))) + body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_PathVar_PlannedLocalPath_LocalPoseRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count = body_PathVar_PlannedLocalPath_LocalPoseRec_pv_count + 1 + end + end +end +messagetable:add(0xDEF3, reportpath_def3) + +querycommandedactuatorforcetorques_2613 = Proto("querycommandedactuatorforcetorques_2613", "QueryCommandedActuatorForceTorques 0x2613") +function querycommandedactuatorforcetorques_2613.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorActuatorForceTorqueDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommandedActuatorForceTorques", string.format("QueryCommandedActuatorForceTorques, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommandedActuatorForceTorques")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2613, querycommandedactuatorforcetorques_2613) + +setactuatorforcetorques_0613 = Proto("setactuatorforcetorques_0613", "SetActuatorForceTorques 0x0613") +function setactuatorforcetorques_0613.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorActuatorForceTorqueDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetActuatorForceTorques", string.format("SetActuatorForceTorques, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetActuatorForceTorques")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ActuatorForceTorqueList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ActuatorForceTorqueList ") + body_ActuatorForceTorqueList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ActuatorForceTorqueList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ActuatorForceTorqueList_count do + local body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree = body_ActuatorForceTorqueList_tree:add(string.format("ActuatorForceTorqueRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "newton meter", [2] = "newton"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -1000, [2] = -500} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %d %s", value, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x0613, setactuatorforcetorques_0613) + +reportcommandedactuatorforcetorques_4613 = Proto("reportcommandedactuatorforcetorques_4613", "ReportCommandedActuatorForceTorques 0x4613") +function reportcommandedactuatorforcetorques_4613.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorActuatorForceTorqueDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommandedActuatorForceTorques", string.format("ReportCommandedActuatorForceTorques, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommandedActuatorForceTorques")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ActuatorForceTorqueList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ActuatorForceTorqueList ") + body_ActuatorForceTorqueList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ActuatorForceTorqueList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ActuatorForceTorqueList_count do + local body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree = body_ActuatorForceTorqueList_tree:add(string.format("ActuatorForceTorqueRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "newton meter", [2] = "newton"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -1000, [2] = -500} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %d %s", value, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x4613, reportcommandedactuatorforcetorques_4613) + +setendeffectorpose_0610 = Proto("setendeffectorpose_0610", "SetEndEffectorPose 0x0610") +function setendeffectorpose_0610.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorPoseDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetEndEffectorPose", string.format("SetEndEffectorPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetEndEffectorPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EndEffectorPoseRec_tree = body_tree:add("EndEffectorPoseRec") + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x0610, setendeffectorpose_0610) + +querycommandedendeffectorpose_2610 = Proto("querycommandedendeffectorpose_2610", "QueryCommandedEndEffectorPose 0x2610") +function querycommandedendeffectorpose_2610.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorPoseDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommandedEndEffectorPose", string.format("QueryCommandedEndEffectorPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommandedEndEffectorPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2610, querycommandedendeffectorpose_2610) + +reportcommandedendeffectorpose_4610 = Proto("reportcommandedendeffectorpose_4610", "ReportCommandedEndEffectorPose 0x4610") +function reportcommandedendeffectorpose_4610.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorPoseDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommandedEndEffectorPose", string.format("ReportCommandedEndEffectorPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommandedEndEffectorPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EndEffectorPoseRec_tree = body_tree:add("EndEffectorPoseRec") + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x4610, reportcommandedendeffectorpose_4610) + +queryendeffectorpose_2615 = Proto("queryendeffectorpose_2615", "QueryEndEffectorPose 0x2615") +function queryendeffectorpose_2615.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEndEffectorPose", string.format("QueryEndEffectorPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEndEffectorPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2615, queryendeffectorpose_2615) + +reportendeffectorpose_4615 = Proto("reportendeffectorpose_4615", "ReportEndEffectorPose 0x4615") +function reportendeffectorpose_4615.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEndEffectorPose", string.format("ReportEndEffectorPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEndEffectorPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EndEffectorPoseRec_tree = body_tree:add("EndEffectorPoseRec") + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorPoseRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x4615, reportendeffectorpose_4615) + +setendeffectorvelocitystate_0612 = Proto("setendeffectorvelocitystate_0612", "SetEndEffectorVelocityState 0x0612") +function setendeffectorvelocitystate_0612.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorVelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetEndEffectorVelocityState", string.format("SetEndEffectorVelocityState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetEndEffectorVelocityState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EndEffectorVelocityRec_tree = body_tree:add("EndEffectorVelocityRec") + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x0612, setendeffectorvelocitystate_0612) + +querycommandedendeffectorvelocitystate_2612 = Proto("querycommandedendeffectorvelocitystate_2612", "QueryCommandedEndEffectorVelocityState 0x2612") +function querycommandedendeffectorvelocitystate_2612.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorVelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommandedEndEffectorVelocityState", string.format("QueryCommandedEndEffectorVelocityState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommandedEndEffectorVelocityState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2612, querycommandedendeffectorvelocitystate_2612) + +reportcommandedendeffectorvelocitystate_4612 = Proto("reportcommandedendeffectorvelocitystate_4612", "ReportCommandedEndEffectorVelocityState 0x4612") +function reportcommandedendeffectorvelocitystate_4612.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorVelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommandedEndEffectorVelocityState", string.format("ReportCommandedEndEffectorVelocityState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommandedEndEffectorVelocityState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EndEffectorVelocityRec_tree = body_tree:add("EndEffectorVelocityRec") + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x4612, reportcommandedendeffectorvelocitystate_4612) + +queryendeffectorvelocitystate_2616 = Proto("queryendeffectorvelocitystate_2616", "QueryEndEffectorVelocityState 0x2616") +function queryendeffectorvelocitystate_2616.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorVelocityStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEndEffectorVelocityState", string.format("QueryEndEffectorVelocityState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEndEffectorVelocityState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2616, queryendeffectorvelocitystate_2616) + +reportendeffectorvelocitystate_4616 = Proto("reportendeffectorvelocitystate_4616", "ReportEndEffectorVelocityState 0x4616") +function reportendeffectorvelocitystate_4616.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorEndEffectorVelocityStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEndEffectorVelocityState", string.format("ReportEndEffectorVelocityState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEndEffectorVelocityState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EndEffectorVelocityRec_tree = body_tree:add("EndEffectorVelocityRec") + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("AngularVelocityComponentZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000029258 + (-62.831853071796))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + body_EndEffectorVelocityRec_tree:add(buffer(bufidx, 4), string.format("LinearVelocityComponentZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x4616, reportendeffectorvelocitystate_4616) + +queryjointforcetorques_2605 = Proto("queryjointforcetorques_2605", "QueryJointForceTorques 0x2605") +function queryjointforcetorques_2605.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointForceTorqueSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryJointForceTorques", string.format("QueryJointForceTorques, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryJointForceTorques")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2605, queryjointforcetorques_2605) + +reportjointforcetorques_4605 = Proto("reportjointforcetorques_4605", "ReportJointForceTorques 0x4605") +function reportjointforcetorques_4605.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointForceTorqueSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportJointForceTorques", string.format("ReportJointForceTorques, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportJointForceTorques")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ActuatorForceTorqueList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ActuatorForceTorqueList ") + body_ActuatorForceTorqueList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ActuatorForceTorqueList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ActuatorForceTorqueList_count do + local body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree = body_ActuatorForceTorqueList_tree:add(string.format("ActuatorForceTorqueRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "newton meter", [2] = "newton"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -1000, [2] = -500} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointForceTorque_tree = body_ActuatorForceTorqueList_ActuatorForceTorqueRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointForceTorque: %d %s", value, unit_list(type_value))) + JointForceTorque_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x4605, reportjointforcetorques_4605) + +queryjointmotionprofile_2607 = Proto("queryjointmotionprofile_2607", "QueryJointMotionProfile 0x2607") +function queryjointmotionprofile_2607.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointMotionProfile.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryJointMotionProfile", string.format("QueryJointMotionProfile, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryJointMotionProfile")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2607, queryjointmotionprofile_2607) + +setjointmotionprofile_0607 = Proto("setjointmotionprofile_0607", "SetJointMotionProfile 0x0607") +function setjointmotionprofile_0607.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointMotionProfile.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetJointMotionProfile", string.format("SetJointMotionProfile, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetJointMotionProfile")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointMotionProfileList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointMotionProfileList ") + body_JointMotionProfileList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointMotionProfileList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointMotionProfileList_count do + local body_JointMotionProfileList_JointType_tree = body_JointMotionProfileList_tree:add(string.format("JointType_%d", body_counter - 1)) + body_JointMotionProfileList_JointType_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_JointMotionProfileList_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_JointMotionProfileList_index == 0) then + local body_JointMotionProfileList_JointType_RevoluteJointMotionProfileRec_tree = body_JointMotionProfileList_JointType_tree:add("RevoluteJointMotionProfileRec") + body_JointMotionProfileList_JointType_RevoluteJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_JointMotionProfileList_JointType_RevoluteJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxAccelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_JointMotionProfileList_JointType_RevoluteJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxDecelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_JointMotionProfileList_index == 1) then + local body_JointMotionProfileList_JointType_PrismaticJointMotionProfileRec_tree = body_JointMotionProfileList_JointType_tree:add("PrismaticJointMotionProfileRec") + body_JointMotionProfileList_JointType_PrismaticJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001164 + (0.000000000000))) + bufidx = bufidx + 4 + body_JointMotionProfileList_JointType_PrismaticJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxAccelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (0.000000000000))) + bufidx = bufidx + 4 + body_JointMotionProfileList_JointType_PrismaticJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxDecelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (0.000000000000))) + bufidx = bufidx + 4 + end + end +end +messagetable:add(0x0607, setjointmotionprofile_0607) + +reportjointmotionprofile_4607 = Proto("reportjointmotionprofile_4607", "ReportJointMotionProfile 0x4607") +function reportjointmotionprofile_4607.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointMotionProfile.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportJointMotionProfile", string.format("ReportJointMotionProfile, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportJointMotionProfile")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointMotionProfileList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointMotionProfileList ") + body_JointMotionProfileList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointMotionProfileList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointMotionProfileList_count do + local body_JointMotionProfileList_JointType_tree = body_JointMotionProfileList_tree:add(string.format("JointType_%d", body_counter - 1)) + body_JointMotionProfileList_JointType_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_JointMotionProfileList_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_JointMotionProfileList_index == 0) then + local body_JointMotionProfileList_JointType_RevoluteJointMotionProfileRec_tree = body_JointMotionProfileList_JointType_tree:add("RevoluteJointMotionProfileRec") + body_JointMotionProfileList_JointType_RevoluteJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_JointMotionProfileList_JointType_RevoluteJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxAccelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_JointMotionProfileList_JointType_RevoluteJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxDecelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_JointMotionProfileList_index == 1) then + local body_JointMotionProfileList_JointType_PrismaticJointMotionProfileRec_tree = body_JointMotionProfileList_JointType_tree:add("PrismaticJointMotionProfileRec") + body_JointMotionProfileList_JointType_PrismaticJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000001164 + (0.000000000000))) + bufidx = bufidx + 4 + body_JointMotionProfileList_JointType_PrismaticJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxAccelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (0.000000000000))) + bufidx = bufidx + 4 + body_JointMotionProfileList_JointType_PrismaticJointMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("JointMaxDecelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (0.000000000000))) + bufidx = bufidx + 4 + end + end +end +messagetable:add(0x4607, reportjointmotionprofile_4607) + +querycommandedjointpositions_2608 = Proto("querycommandedjointpositions_2608", "QueryCommandedJointPositions 0x2608") +function querycommandedjointpositions_2608.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointPositionDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommandedJointPositions", string.format("QueryCommandedJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommandedJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2608, querycommandedjointpositions_2608) + +setjointpositions_0602 = Proto("setjointpositions_0602", "SetJointPositions 0x0602") +function setjointpositions_0602.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointPositionDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetJointPositions", string.format("SetJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointPositionList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointPositionList ") + body_JointPositionList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointPositionList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointPositionList_count do + local body_JointPositionList_JointPositionRec_tree = body_JointPositionList_tree:add(string.format("JointPositionRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "radian", [2] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -25, [2] = -10} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x0602, setjointpositions_0602) + +reportcommandedjointpositions_4608 = Proto("reportcommandedjointpositions_4608", "ReportCommandedJointPositions 0x4608") +function reportcommandedjointpositions_4608.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointPositionDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommandedJointPositions", string.format("ReportCommandedJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommandedJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointPositionList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointPositionList ") + body_JointPositionList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointPositionList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointPositionList_count do + local body_JointPositionList_JointPositionRec_tree = body_JointPositionList_tree:add(string.format("JointPositionRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "radian", [2] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -25, [2] = -10} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x4608, reportcommandedjointpositions_4608) + +queryjointpositions_2602 = Proto("queryjointpositions_2602", "QueryJointPositions 0x2602") +function queryjointpositions_2602.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointPositionSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryJointPositions", string.format("QueryJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2602, queryjointpositions_2602) + +reportjointpositions_4602 = Proto("reportjointpositions_4602", "ReportJointPositions 0x4602") +function reportjointpositions_4602.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointPositionSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportJointPositions", string.format("ReportJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointPositionList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointPositionList ") + body_JointPositionList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointPositionList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointPositionList_count do + local body_JointPositionList_JointPositionRec_tree = body_JointPositionList_tree:add(string.format("JointPositionRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "radian", [2] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -25, [2] = -10} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointPosition_tree = body_JointPositionList_JointPositionRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointPosition: %d %s", value, unit_list(type_value))) + JointPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x4602, reportjointpositions_4602) + +setjointvelocity_0603 = Proto("setjointvelocity_0603", "SetJointVelocity 0x0603") +function setjointvelocity_0603.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointVelocityDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetJointVelocity", string.format("SetJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointVelocityList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointVelocityList ") + body_JointVelocityList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointVelocityList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointVelocityList_count do + local body_JointVelocityList_JointVelocityRec_tree = body_JointVelocityList_tree:add(string.format("JointVelocityRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "radian per second", [2] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -31, [2] = -5} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %d %s", value, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x0603, setjointvelocity_0603) + +querycommandedjointvelocity_2611 = Proto("querycommandedjointvelocity_2611", "QueryCommandedJointVelocity 0x2611") +function querycommandedjointvelocity_2611.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointVelocityDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommandedJointVelocity", string.format("QueryCommandedJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommandedJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2611, querycommandedjointvelocity_2611) + +reportcommandedjointvelocity_4611 = Proto("reportcommandedjointvelocity_4611", "ReportCommandedJointVelocity 0x4611") +function reportcommandedjointvelocity_4611.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointVelocityDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommandedJointVelocity", string.format("ReportCommandedJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommandedJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointVelocityList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointVelocityList ") + body_JointVelocityList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointVelocityList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointVelocityList_count do + local body_JointVelocityList_JointVelocityRec_tree = body_JointVelocityList_tree:add(string.format("JointVelocityRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "radian per second", [2] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -31, [2] = -5} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %d %s", value, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x4611, reportcommandedjointvelocity_4611) + +queryjointvelocity_2603 = Proto("queryjointvelocity_2603", "QueryJointVelocity 0x2603") +function queryjointvelocity_2603.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointVelocitySensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryJointVelocity", string.format("QueryJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2603, queryjointvelocity_2603) + +reportjointvelocity_4603 = Proto("reportjointvelocity_4603", "ReportJointVelocity 0x4603") +function reportjointvelocity_4603.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorJointVelocitySensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportJointVelocity", string.format("ReportJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointVelocityList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointVelocityList ") + body_JointVelocityList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointVelocityList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointVelocityList_count do + local body_JointVelocityList_JointVelocityRec_tree = body_JointVelocityList_tree:add(string.format("JointVelocityRec_%d", body_counter - 1)) + local types_set = {[1] = 4, [2] = 4} + local unit_set = {[1] = "radian per second", [2] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[1] = 0, [2] = 0} + local bias_set_tabe = {[1] = -31, [2] = -5} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local JointVelocity_tree = body_JointVelocityList_JointVelocityRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("JointVelocity: %d %s", value, unit_list(type_value))) + JointVelocity_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end +end +messagetable:add(0x4603, reportjointvelocity_4603) + +executelist_061e = Proto("executelist_061e", "ExecuteList 0x061e") +function executelist_061e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ExecuteList", string.format("ExecuteList, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ExecuteList")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ExecuteListRec_tree = body_tree:add("ExecuteListRec") + local body_ExecuteListRec_pv = buffer(bufidx, 1):le_uint() + local body_ExecuteListRec_pv_count = 0 + body_ExecuteListRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ExecuteListRec_pv, body_ExecuteListRec_pv_count) > 0) then + body_ExecuteListRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Element UID of the starting element. A value of zero (0) indicates the first (head) element of the list.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_ExecuteListRec_pv_count = body_ExecuteListRec_pv_count + 1 +end +messagetable:add(0x061E, executelist_061e) + +queryactiveelement_261e = Proto("queryactiveelement_261e", "QueryActiveElement 0x261e") +function queryactiveelement_261e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryActiveElement", string.format("QueryActiveElement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryActiveElement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x261E, queryactiveelement_261e) + +reportactiveelement_461e = Proto("reportactiveelement_461e", "ReportActiveElement 0x461e") +function reportactiveelement_461e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorListDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportActiveElement", string.format("ReportActiveElement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportActiveElement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ActiveElementRec_tree = body_tree:add("ActiveElementRec") + body_ActiveElementRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) UID of the active list element. A value of 0 implies that no lists are executing.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x461E, reportactiveelement_461e) + +querymanipulatorspecifications_2600 = Proto("querymanipulatorspecifications_2600", "QueryManipulatorSpecifications 0x2600") +function querymanipulatorspecifications_2600.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorSpecificationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryManipulatorSpecifications", string.format("QueryManipulatorSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryManipulatorSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryManipulatorSpecificationsRec_tree = body_tree:add("QueryManipulatorSpecificationsRec") + body_QueryManipulatorSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2600, querymanipulatorspecifications_2600) + +reportmanipulatorspecifications_4600 = Proto("reportmanipulatorspecifications_4600", "ReportManipulatorSpecifications 0x4600") +function reportmanipulatorspecifications_4600.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorSpecificationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportManipulatorSpecifications", string.format("ReportManipulatorSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportManipulatorSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportManipulatorSpecification_tree = body_tree:add("ReportManipulatorSpecification") + local body_ReportManipulatorSpecification_pv = buffer(bufidx, 1):le_uint() + local body_ReportManipulatorSpecification_pv_count = 0 + body_ReportManipulatorSpecification_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportManipulatorSpecification_pv, body_ReportManipulatorSpecification_pv_count) > 0) then + local body_ReportManipulatorSpecification_ManipulatorCoordinateSystemRec_tree = body_ReportManipulatorSpecification_tree:add("ManipulatorCoordinateSystemRec") + body_ReportManipulatorSpecification_ManipulatorCoordinateSystemRec_tree:add(buffer(bufidx, 4), string.format("ManipulatorCoordinateSysX: %.4f (scaled) -- (unsigned integer) x coordinate of origin of manipulator coordinate system measured with respect to vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_ReportManipulatorSpecification_ManipulatorCoordinateSystemRec_tree:add(buffer(bufidx, 4), string.format("ManipulatorCoordinateSysY: %.4f (scaled) -- (unsigned integer) y coordinate of origin of manipulator coordinate system measured with respect to vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_ReportManipulatorSpecification_ManipulatorCoordinateSystemRec_tree:add(buffer(bufidx, 4), string.format("ManipulatorCoordinateSysZ: %.4f (scaled) -- (unsigned integer) z coordinate of origin of manipulator coordinate system measured with respect to vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + body_ReportManipulatorSpecification_ManipulatorCoordinateSystemRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_ReportManipulatorSpecification_ManipulatorCoordinateSystemRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_ReportManipulatorSpecification_ManipulatorCoordinateSystemRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + body_ReportManipulatorSpecification_ManipulatorCoordinateSystemRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_pv_count = body_ReportManipulatorSpecification_pv_count + 1 + local body_ReportManipulatorSpecification_FirstJointParameters_tree = body_ReportManipulatorSpecification_tree:add("FirstJointParameters") + body_ReportManipulatorSpecification_FirstJointParameters_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_ReportManipulatorSpecification_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ReportManipulatorSpecification_index == 0) then + local body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_tree = body_ReportManipulatorSpecification_FirstJointParameters_tree:add("RevoluteJoint1OffsetRec") + local body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count = 0 + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_tree:add(buffer(bufidx, 2), string.format("Joint1Offset: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000305180438 + (-10.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv, body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count) > 0) then + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_tree:add(buffer(bufidx, 4), string.format("Joint1MinValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count = body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv, body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count) > 0) then + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count = body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv, body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count) > 0) then + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count = body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv, body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count) > 0) then + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxTorque: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000001164153 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count = body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv, body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count) > 0) then + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_tree:add(buffer(bufidx, 2), string.format("OffsetBoundingCylinderRadius: %.4f (scaled) -- (unsigned short integer) The radius of an imaginary bounding cylinder whose length lies along the joint offset axis.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count = body_ReportManipulatorSpecification_FirstJointParameters_RevoluteJoint1OffsetRec_pv_count + 1 + end + if (body_ReportManipulatorSpecification_index == 1) then + local body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_tree = body_ReportManipulatorSpecification_FirstJointParameters_tree:add("PrismaticJoint1AngleRec") + local body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count = 0 + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_tree:add(buffer(bufidx, 2), string.format("Joint1Angle: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_tree:add(buffer(bufidx, 4), string.format("Joint1MinValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv, body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count) > 0) then + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000002328 + (-5.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count = body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv, body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count) > 0) then + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxForce: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000001164153 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count = body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv, body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count) > 0) then + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_tree:add(buffer(bufidx, 2), string.format("JointBoundingCylinderRadius: %.4f (scaled) -- (unsigned short integer) The radius of an imaginary bounding cylinder whose length lies along the joints moving axis.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count = body_ReportManipulatorSpecification_FirstJointParameters_PrismaticJoint1AngleRec_pv_count + 1 + end + local bufidx_start_body_ReportManipulatorSpecification = bufidx + local body_ReportManipulatorSpecification_JointSpecificationList_tree = body_ReportManipulatorSpecification_tree:add(buffer(bufidx_start_body_ReportManipulatorSpecification, buffer:len() - bufidx_start_body_ReportManipulatorSpecification), "JointSpecificationList ") + body_ReportManipulatorSpecification_JointSpecificationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportManipulatorSpecification_JointSpecificationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportManipulatorSpecification_counter=1,body_ReportManipulatorSpecification_JointSpecificationList_count do + local body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_tree = body_ReportManipulatorSpecification_JointSpecificationList_tree:add(string.format("JointSpecifications_%d", body_ReportManipulatorSpecification_counter - 1)) + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_ReportManipulatorSpecification_JointSpecificationList_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ReportManipulatorSpecification_JointSpecificationList_index == 0) then + local body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_tree:add("RevoluteJointSpecificationRec") + local body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count = 0 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("LinkLength: %.4f (scaled) -- (unsigned short integer) Link Length", buffer(bufidx, 2):le_uint() * 0.000305180438 + (-10.000000000000))) + bufidx = bufidx + 2 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("TwistAngle: %.4f (scaled) -- (unsigned short integer) Twist Angle", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("JointOffset: %.4f (scaled) -- (unsigned short integer) Joint Offset", buffer(bufidx, 2):le_uint() * 0.000305180438 + (-10.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 4), string.format("MinValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 4), string.format("MaxValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 4), string.format("MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 4), string.format("MaxTorque: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000001164153 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("OffsetBoundingCylinderRadius: %.4f (scaled) -- (unsigned short integer) The radius of an imaginary bounding cylinder whose length lies along the joint offset axis.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("LinkLengthBoundingCylinderRadius: %.4f (scaled) -- (unsigned short integer) The radius of an imaginary bounding cylinder whose length lies along the link length axis.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_RevoluteJointSpecificationRec_pv_count + 1 + end + if (body_ReportManipulatorSpecification_JointSpecificationList_index == 1) then + local body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_tree:add("PrismaticJointSpecificationRec") + local body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count = 0 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("LinkLength: %.4f (scaled) -- (unsigned short integer) Link Length", buffer(bufidx, 2):le_uint() * 0.000305180438 + (-10.000000000000))) + bufidx = bufidx + 2 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("TwistAngle: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("JointAngle: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 4), string.format("MinValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 4), string.format("MaxValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000004657 + (-10.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 4), string.format("MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000002328 + (-5.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 4), string.format("MaxForce: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000001164153 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("JointBoundingCylinderRadius: %.4f (scaled) -- (unsigned short integer) The radius of an imaginary bounding cylinder whose length lies along the joints moving axis.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count + 1 + if (bitAND(body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv, body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count) > 0) then + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_tree:add(buffer(bufidx, 2), string.format("LinkLengthBoundingCylinderRadius: %.4f (scaled) -- (unsigned short integer) The radius of an imaginary bounding cylinder whose length lies along the link length axis.", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count = body_ReportManipulatorSpecification_JointSpecificationList_JointSpecifications_PrismaticJointSpecificationRec_pv_count + 1 + end + end + if (bitAND(body_ReportManipulatorSpecification_pv, body_ReportManipulatorSpecification_pv_count) > 0) then + local bufidx_start_body_ReportManipulatorSpecification = bufidx + local body_ReportManipulatorSpecification_JointNamesList_tree = body_ReportManipulatorSpecification_tree:add(buffer(bufidx_start_body_ReportManipulatorSpecification, buffer:len() - bufidx_start_body_ReportManipulatorSpecification), "JointNamesList ") + body_ReportManipulatorSpecification_JointNamesList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ReportManipulatorSpecification_JointNamesList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_ReportManipulatorSpecification_counter=1,body_ReportManipulatorSpecification_JointNamesList_count do + local body_ReportManipulatorSpecification_JointNamesList_JointNameRec_tree = body_ReportManipulatorSpecification_JointNamesList_tree:add(string.format("JointNameRec_%d", body_ReportManipulatorSpecification_counter - 1)) + local body_ReportManipulatorSpecification_JointNamesList_JointNameRec_Description_tree = body_ReportManipulatorSpecification_JointNamesList_JointNameRec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("Description[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_ReportManipulatorSpecification_JointNamesList_JointNameRec_Description_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + end + end + body_ReportManipulatorSpecification_pv_count = body_ReportManipulatorSpecification_pv_count + 1 +end +messagetable:add(0x4600, reportmanipulatorspecifications_4600) + +querytooloffset_2604 = Proto("querytooloffset_2604", "QueryToolOffset 0x2604") +function querytooloffset_2604.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorToolOffsetService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryToolOffset", string.format("QueryToolOffset, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryToolOffset")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2604, querytooloffset_2604) + +settooloffset_0604 = Proto("settooloffset_0604", "SetToolOffset 0x0604") +function settooloffset_0604.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorToolOffsetService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetToolOffset", string.format("SetToolOffset, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetToolOffset")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ToolPointRec_tree = body_tree:add("ToolPointRec") + body_ToolPointRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000006985 + (-15.000000000000))) + bufidx = bufidx + 4 + body_ToolPointRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000006985 + (-15.000000000000))) + bufidx = bufidx + 4 + body_ToolPointRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000006985 + (-15.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x0604, settooloffset_0604) + +reporttooloffset_4604 = Proto("reporttooloffset_4604", "ReportToolOffset 0x4604") +function reporttooloffset_4604.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_ManipulatorToolOffsetService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportToolOffset", string.format("ReportToolOffset, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportToolOffset")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ToolPointRec_tree = body_tree:add("ToolPointRec") + body_ToolPointRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateX: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000006985 + (-15.000000000000))) + bufidx = bufidx + 4 + body_ToolPointRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateY: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000006985 + (-15.000000000000))) + bufidx = bufidx + 4 + body_ToolPointRec_tree:add(buffer(bufidx, 4), string.format("ToolPointCoordinateZ: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000006985 + (-15.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x4604, reporttooloffset_4604) + +querycommandedpantiltjointpositions_2628 = Proto("querycommandedpantiltjointpositions_2628", "QueryCommandedPanTiltJointPositions 0x2628") +function querycommandedpantiltjointpositions_2628.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointPositionDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommandedPanTiltJointPositions", string.format("QueryCommandedPanTiltJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommandedPanTiltJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2628, querycommandedpantiltjointpositions_2628) + +setpantiltjointpositions_0622 = Proto("setpantiltjointpositions_0622", "SetPanTiltJointPositions 0x0622") +function setpantiltjointpositions_0622.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointPositionDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPanTiltJointPositions", string.format("SetPanTiltJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPanTiltJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltJointPositionRec_tree = body_tree:add("PanTiltJointPositionRec") + body_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint1Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint2Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 +end +messagetable:add(0x0622, setpantiltjointpositions_0622) + +reportcommandedpantiltjointpositions_4628 = Proto("reportcommandedpantiltjointpositions_4628", "ReportCommandedPanTiltJointPositions 0x4628") +function reportcommandedpantiltjointpositions_4628.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointPositionDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommandedPanTiltJointPositions", string.format("ReportCommandedPanTiltJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommandedPanTiltJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltJointPositionRec_tree = body_tree:add("PanTiltJointPositionRec") + body_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint1Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint2Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 +end +messagetable:add(0x4628, reportcommandedpantiltjointpositions_4628) + +querypantiltjointpositions_2622 = Proto("querypantiltjointpositions_2622", "QueryPanTiltJointPositions 0x2622") +function querypantiltjointpositions_2622.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointPositionSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPanTiltJointPositions", string.format("QueryPanTiltJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPanTiltJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2622, querypantiltjointpositions_2622) + +reportpantiltjointpositions_4622 = Proto("reportpantiltjointpositions_4622", "ReportPanTiltJointPositions 0x4622") +function reportpantiltjointpositions_4622.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointPositionSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPanTiltJointPositions", string.format("ReportPanTiltJointPositions, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPanTiltJointPositions")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltJointPositionRec_tree = body_tree:add("PanTiltJointPositionRec") + body_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint1Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_PanTiltJointPositionRec_tree:add(buffer(bufidx, 4), string.format("Joint2Position: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 +end +messagetable:add(0x4622, reportpantiltjointpositions_4622) + +setpantiltjointvelocity_0623 = Proto("setpantiltjointvelocity_0623", "SetPanTiltJointVelocity 0x0623") +function setpantiltjointvelocity_0623.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointVelocityDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPanTiltJointVelocity", string.format("SetPanTiltJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPanTiltJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltJointVelocityRec_tree = body_tree:add("PanTiltJointVelocityRec") + body_PanTiltJointVelocityRec_tree:add(buffer(bufidx, 4), string.format("Joint1Velocity: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000014629 + (-31.415926535898))) + bufidx = bufidx + 4 + body_PanTiltJointVelocityRec_tree:add(buffer(bufidx, 4), string.format("Joint2Velocity: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000014629 + (-31.415926535898))) + bufidx = bufidx + 4 +end +messagetable:add(0x0623, setpantiltjointvelocity_0623) + +querycommandedpantiltjointvelocity_2631 = Proto("querycommandedpantiltjointvelocity_2631", "QueryCommandedPanTiltJointVelocity 0x2631") +function querycommandedpantiltjointvelocity_2631.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointVelocityDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryCommandedPanTiltJointVelocity", string.format("QueryCommandedPanTiltJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryCommandedPanTiltJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2631, querycommandedpantiltjointvelocity_2631) + +reportcommandedpantiltjointvelocity_4631 = Proto("reportcommandedpantiltjointvelocity_4631", "ReportCommandedPanTiltJointVelocity 0x4631") +function reportcommandedpantiltjointvelocity_4631.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointVelocityDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportCommandedPanTiltJointVelocity", string.format("ReportCommandedPanTiltJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportCommandedPanTiltJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltJointVelocityRec_tree = body_tree:add("PanTiltJointVelocityRec") + body_PanTiltJointVelocityRec_tree:add(buffer(bufidx, 4), string.format("Joint1Velocity: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000014629 + (-31.415926535898))) + bufidx = bufidx + 4 + body_PanTiltJointVelocityRec_tree:add(buffer(bufidx, 4), string.format("Joint2Velocity: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000014629 + (-31.415926535898))) + bufidx = bufidx + 4 +end +messagetable:add(0x4631, reportcommandedpantiltjointvelocity_4631) + +querypantiltjointvelocity_2623 = Proto("querypantiltjointvelocity_2623", "QueryPanTiltJointVelocity 0x2623") +function querypantiltjointvelocity_2623.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointVelocitySensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPanTiltJointVelocity", string.format("QueryPanTiltJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPanTiltJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2623, querypantiltjointvelocity_2623) + +reportpantiltjointvelocity_4623 = Proto("reportpantiltjointvelocity_4623", "ReportPanTiltJointVelocity 0x4623") +function reportpantiltjointvelocity_4623.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltJointVelocitySensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPanTiltJointVelocity", string.format("ReportPanTiltJointVelocity, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPanTiltJointVelocity")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltJointVelocityRec_tree = body_tree:add("PanTiltJointVelocityRec") + body_PanTiltJointVelocityRec_tree:add(buffer(bufidx, 4), string.format("Joint1Velocity: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000014629 + (-31.415926535898))) + bufidx = bufidx + 4 + body_PanTiltJointVelocityRec_tree:add(buffer(bufidx, 4), string.format("Joint2Velocity: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000014629 + (-31.415926535898))) + bufidx = bufidx + 4 +end +messagetable:add(0x4623, reportpantiltjointvelocity_4623) + +querypantiltmotionprofile_2627 = Proto("querypantiltmotionprofile_2627", "QueryPanTiltMotionProfile 0x2627") +function querypantiltmotionprofile_2627.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltMotionProfileService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPanTiltMotionProfile", string.format("QueryPanTiltMotionProfile, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPanTiltMotionProfile")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2627, querypantiltmotionprofile_2627) + +setpantiltmotionprofile_0627 = Proto("setpantiltmotionprofile_0627", "SetPanTiltMotionProfile 0x0627") +function setpantiltmotionprofile_0627.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltMotionProfileService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPanTiltMotionProfile", string.format("SetPanTiltMotionProfile, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPanTiltMotionProfile")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltMotionProfileRec_tree = body_tree:add("PanTiltMotionProfileRec") + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxAccelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxDecelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint2MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint2MaxAccelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint2MaxDecelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x0627, setpantiltmotionprofile_0627) + +reportpantiltmotionprofile_4627 = Proto("reportpantiltmotionprofile_4627", "ReportPanTiltMotionProfile 0x4627") +function reportpantiltmotionprofile_4627.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltMotionProfileService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPanTiltMotionProfile", string.format("ReportPanTiltMotionProfile, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPanTiltMotionProfile")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltMotionProfileRec_tree = body_tree:add("PanTiltMotionProfileRec") + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxAccelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxDecelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint2MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint2MaxAccelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_PanTiltMotionProfileRec_tree:add(buffer(bufidx, 4), string.format("Joint2MaxDecelerationRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x4627, reportpantiltmotionprofile_4627) + +querypantiltspecifications_2620 = Proto("querypantiltspecifications_2620", "QueryPanTiltSpecifications 0x2620") +function querypantiltspecifications_2620.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltSpecificationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPanTiltSpecifications", string.format("QueryPanTiltSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPanTiltSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryPanTiltSpecificationsRec_tree = body_tree:add("QueryPanTiltSpecificationsRec") + body_QueryPanTiltSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2620, querypantiltspecifications_2620) + +reportpantiltspecifications_4620 = Proto("reportpantiltspecifications_4620", "ReportPanTiltSpecifications 0x4620") +function reportpantiltspecifications_4620.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PanTiltSpecificationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPanTiltSpecifications", string.format("ReportPanTiltSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPanTiltSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportPanTiltSpecificationsRec_tree = body_tree:add("ReportPanTiltSpecificationsRec") + local body_ReportPanTiltSpecificationsRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportPanTiltSpecificationsRec_pv_count = 0 + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportPanTiltSpecificationsRec_pv, body_ReportPanTiltSpecificationsRec_pv_count) > 0) then + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("PanTiltCoordinateSysX: %.4f (scaled) -- (unsigned integer) x coordinate of origin of pan tilt coordinate system measured with respect to vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + body_ReportPanTiltSpecificationsRec_pv_count = body_ReportPanTiltSpecificationsRec_pv_count + 1 + if (bitAND(body_ReportPanTiltSpecificationsRec_pv, body_ReportPanTiltSpecificationsRec_pv_count) > 0) then + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("PanTiltCoordinateSysY: %.4f (scaled) -- (unsigned integer) x coordinate of origin of pan tilt coordinate system measured with respect to vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + body_ReportPanTiltSpecificationsRec_pv_count = body_ReportPanTiltSpecificationsRec_pv_count + 1 + if (bitAND(body_ReportPanTiltSpecificationsRec_pv, body_ReportPanTiltSpecificationsRec_pv_count) > 0) then + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("PanTiltCoordinateSysZ: %.4f (scaled) -- (unsigned integer) x coordinate of origin of pan tilt coordinate system measured with respect to vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000013970 + (-30.000000000000))) + bufidx = bufidx + 4 + end + body_ReportPanTiltSpecificationsRec_pv_count = body_ReportPanTiltSpecificationsRec_pv_count + 1 + if (bitAND(body_ReportPanTiltSpecificationsRec_pv, body_ReportPanTiltSpecificationsRec_pv_count) > 0) then + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("DComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + body_ReportPanTiltSpecificationsRec_pv_count = body_ReportPanTiltSpecificationsRec_pv_count + 1 + if (bitAND(body_ReportPanTiltSpecificationsRec_pv, body_ReportPanTiltSpecificationsRec_pv_count) > 0) then + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("AComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + body_ReportPanTiltSpecificationsRec_pv_count = body_ReportPanTiltSpecificationsRec_pv_count + 1 + if (bitAND(body_ReportPanTiltSpecificationsRec_pv, body_ReportPanTiltSpecificationsRec_pv_count) > 0) then + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("BComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + body_ReportPanTiltSpecificationsRec_pv_count = body_ReportPanTiltSpecificationsRec_pv_count + 1 + if (bitAND(body_ReportPanTiltSpecificationsRec_pv, body_ReportPanTiltSpecificationsRec_pv_count) > 0) then + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("CComponentOfUnitQuaternionQ: %.4f (scaled) -- (unsigned integer) quaternion q = d + ai +bj + ck defines the orientation of the manipulator coordinate system measured with respect to the vehicle coordinate system", buffer(bufidx, 4):le_uint() * 0.000000000466 + (-1.000000000000))) + bufidx = bufidx + 4 + end + body_ReportPanTiltSpecificationsRec_pv_count = body_ReportPanTiltSpecificationsRec_pv_count + 1 + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("Joint1MinValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("Joint1MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("Joint2MinValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("Joint2MaxValue: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000011703 + (-25.132741228718))) + bufidx = bufidx + 4 + body_ReportPanTiltSpecificationsRec_tree:add(buffer(bufidx, 4), string.format("Joint2MaxSpeed: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000007315 + (0.000000000000))) + bufidx = bufidx + 4 +end +messagetable:add(0x4620, reportpantiltspecifications_4620) + +queryendeffectorspecification_2632 = Proto("queryendeffectorspecification_2632", "QueryEndEffectorSpecification 0x2632") +function queryendeffectorspecification_2632.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitiveEndEffector.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEndEffectorSpecification", string.format("QueryEndEffectorSpecification, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEndEffectorSpecification")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2632, queryendeffectorspecification_2632) + +queryendeffectoreffort_2633 = Proto("queryendeffectoreffort_2633", "QueryEndEffectorEffort 0x2633") +function queryendeffectoreffort_2633.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitiveEndEffector.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryEndEffectorEffort", string.format("QueryEndEffectorEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryEndEffectorEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2633, queryendeffectoreffort_2633) + +setendeffectoreffort_0633 = Proto("setendeffectoreffort_0633", "SetEndEffectorEffort 0x0633") +function setendeffectoreffort_0633.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitiveEndEffector.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetEndEffectorEffort", string.format("SetEndEffectorEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetEndEffectorEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EndEffectorEffortRec_tree = body_tree:add("EndEffectorEffortRec") + body_EndEffectorEffortRec_tree:add(buffer(bufidx, 2), string.format("EndEffectorEffort: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x0633, setendeffectoreffort_0633) + +reportendeffectorspecification_4632 = Proto("reportendeffectorspecification_4632", "ReportEndEffectorSpecification 0x4632") +function reportendeffectorspecification_4632.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitiveEndEffector.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEndEffectorSpecification", string.format("ReportEndEffectorSpecification, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEndEffectorSpecification")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportEndEffectorSpecificationRec_tree = body_tree:add("ReportEndEffectorSpecificationRec") + body_ReportEndEffectorSpecificationRec_tree:add(buffer(bufidx, 4), string.format("ParentId: %d -- (unsigned integer) 4 byte JAUS identifier of the manipulator on which this end effector is mounted", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 +end +messagetable:add(0x4632, reportendeffectorspecification_4632) + +reportendeffectoreffort_4633 = Proto("reportendeffectoreffort_4633", "ReportEndEffectorEffort 0x4633") +function reportendeffectoreffort_4633.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitiveEndEffector.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportEndEffectorEffort", string.format("ReportEndEffectorEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportEndEffectorEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_EndEffectorEffortRec_tree = body_tree:add("EndEffectorEffortRec") + body_EndEffectorEffortRec_tree:add(buffer(bufidx, 2), string.format("EndEffectorEffort: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x4633, reportendeffectoreffort_4633) + +queryjointeffort_2601 = Proto("queryjointeffort_2601", "QueryJointEffort 0x2601") +function queryjointeffort_2601.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitiveManipulator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryJointEffort", string.format("QueryJointEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryJointEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2601, queryjointeffort_2601) + +setjointeffort_0601 = Proto("setjointeffort_0601", "SetJointEffort 0x0601") +function setjointeffort_0601.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitiveManipulator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetJointEffort", string.format("SetJointEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetJointEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointEffortList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointEffortList ") + body_JointEffortList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointEffortList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointEffortList_count do + local body_JointEffortList_JointEffortRec_tree = body_JointEffortList_tree:add(string.format("JointEffortRec_%d", body_counter - 1)) + body_JointEffortList_JointEffortRec_tree:add(buffer(bufidx, 2), string.format("JointEffort: %.4f (scaled) -- (unsigned short integer) Percent of maximum effort for this joint. Each joint must have a corresponding entry in the list.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x0601, setjointeffort_0601) + +reportjointeffort_4601 = Proto("reportjointeffort_4601", "ReportJointEffort 0x4601") +function reportjointeffort_4601.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitiveManipulator.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportJointEffort", string.format("ReportJointEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportJointEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_JointEffortList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "JointEffortList ") + body_JointEffortList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_JointEffortList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_JointEffortList_count do + local body_JointEffortList_JointEffortRec_tree = body_JointEffortList_tree:add(string.format("JointEffortRec_%d", body_counter - 1)) + body_JointEffortList_JointEffortRec_tree:add(buffer(bufidx, 2), string.format("JointEffort: %.4f (scaled) -- (unsigned short integer) Percent of maximum effort for this joint. Each joint must have a corresponding entry in the list.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x4601, reportjointeffort_4601) + +querypantiltjointeffort_2621 = Proto("querypantiltjointeffort_2621", "QueryPanTiltJointEffort 0x2621") +function querypantiltjointeffort_2621.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitivePanTilt.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPanTiltJointEffort", string.format("QueryPanTiltJointEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPanTiltJointEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2621, querypantiltjointeffort_2621) + +setpantiltjointeffort_0621 = Proto("setpantiltjointeffort_0621", "SetPanTiltJointEffort 0x0621") +function setpantiltjointeffort_0621.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitivePanTilt.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPanTiltJointEffort", string.format("SetPanTiltJointEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPanTiltJointEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltJointEffortRec_tree = body_tree:add("PanTiltJointEffortRec") + body_PanTiltJointEffortRec_tree:add(buffer(bufidx, 2), string.format("Joint1Effort: %.4f (scaled) -- (unsigned short integer) Percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + body_PanTiltJointEffortRec_tree:add(buffer(bufidx, 2), string.format("Joint2Effort: %.4f (scaled) -- (unsigned short integer) Percent of Maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x0621, setpantiltjointeffort_0621) + +reportpantiltjointeffort_4621 = Proto("reportpantiltjointeffort_4621", "ReportPanTiltJointEffort 0x4621") +function reportpantiltjointeffort_4621.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.manipulator/urn_jaus_jss_manipulator_PrimitivePanTilt.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPanTiltJointEffort", string.format("ReportPanTiltJointEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPanTiltJointEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PanTiltJointEffortRec_tree = body_tree:add("PanTiltJointEffortRec") + body_PanTiltJointEffortRec_tree:add(buffer(bufidx, 2), string.format("Joint1Effort: %.4f (scaled) -- (unsigned short integer) Percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + body_PanTiltJointEffortRec_tree:add(buffer(bufidx, 2), string.format("Joint2Effort: %.4f (scaled) -- (unsigned short integer) Percent of Maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x4621, reportpantiltjointeffort_4621) + +queryaccelerationstate_2417 = Proto("queryaccelerationstate_2417", "QueryAccelerationState 0x2417") +function queryaccelerationstate_2417.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_AccelerationStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAccelerationState", string.format("QueryAccelerationState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAccelerationState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryAccelerationStateRec_tree = body_tree:add("QueryAccelerationStateRec") + body_QueryAccelerationStateRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Acceleration State Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x2417, queryaccelerationstate_2417) + +queryaccelerationstateext_24b7 = Proto("queryaccelerationstateext_24b7", "QueryAccelerationStateExt 0x24b7") +function queryaccelerationstateext_24b7.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_AccelerationStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAccelerationStateExt", string.format("QueryAccelerationStateExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAccelerationStateExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryAccelerationStateExtRec_tree = body_tree:add("QueryAccelerationStateExtRec") + body_QueryAccelerationStateExtRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Acceleration State Ext Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x24B7, queryaccelerationstateext_24b7) + +reportaccelerationstate_4417 = Proto("reportaccelerationstate_4417", "ReportAccelerationState 0x4417") +function reportaccelerationstate_4417.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_AccelerationStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAccelerationState", string.format("ReportAccelerationState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAccelerationState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportAccelerationStateRec_tree = body_tree:add("ReportAccelerationStateRec") + local body_ReportAccelerationStateRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportAccelerationStateRec_pv_count = 0 + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the acceleration data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 4), string.format("RollAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 4), string.format("PitchAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 4), string.format("YawAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 2), string.format("RotationalAcceleration_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the rotational acceleration data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateRec_pv, body_ReportAccelerationStateRec_pv_count) > 0) then + local body_ReportAccelerationStateRec_TimeStamp_buf = buffer(bufidx, 4) + local body_ReportAccelerationStateRec_TimeStamp_tree = body_ReportAccelerationStateRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 32), body_ReportAccelerationStateRec_TimeStamp_buf:le_uint())) + body_ReportAccelerationStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 0, 9))) + body_ReportAccelerationStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 10, 15))) + body_ReportAccelerationStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 16, 21))) + body_ReportAccelerationStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 22, 26))) + body_ReportAccelerationStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_ReportAccelerationStateRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateRec_pv_count = body_ReportAccelerationStateRec_pv_count + 1 +end +messagetable:add(0x4417, reportaccelerationstate_4417) + +reportaccelerationstateext_44b7 = Proto("reportaccelerationstateext_44b7", "ReportAccelerationStateExt 0x44b7") +function reportaccelerationstateext_44b7.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_AccelerationStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAccelerationStateExt", string.format("ReportAccelerationStateExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAccelerationStateExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportAccelerationStateExtRec_tree = body_tree:add("ReportAccelerationStateExtRec") + local body_ReportAccelerationStateExtRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportAccelerationStateExtRec_pv_count = 0 + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the acceleration data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("RollAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("PitchAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("YawAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 2), string.format("RotationalAcceleration_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the rotational acceleration data.", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_ReportAccelerationStateExtRec_pv, body_ReportAccelerationStateExtRec_pv_count) > 0) then + body_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportAccelerationStateExtRec_pv_count = body_ReportAccelerationStateExtRec_pv_count + 1 +end +messagetable:add(0x44B7, reportaccelerationstateext_44b7) + +requestgpsfix_0428 = Proto("requestgpsfix_0428", "RequestGPSFix 0x0428") +function requestgpsfix_0428.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GPSFix.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "RequestGPSFix", string.format("RequestGPSFix, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "RequestGPSFix")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x0428, requestgpsfix_0428) + +querygpsfix_2428 = Proto("querygpsfix_2428", "QueryGPSFix 0x2428") +function querygpsfix_2428.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GPSFix.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGPSFix", string.format("QueryGPSFix, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGPSFix")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2428, querygpsfix_2428) + +reportgpsfix_4428 = Proto("reportgpsfix_4428", "ReportGPSFix 0x4428") +function reportgpsfix_4428.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GPSFix.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGPSFix", string.format("ReportGPSFix, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGPSFix")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GPSFixSeq_tree = body_tree:add("GPSFixSeq") + local body_GPSFixSeq_pv = buffer(bufidx, 1):le_uint() + local body_GPSFixSeq_pv_count = 0 + body_GPSFixSeq_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local body_GPSFixSeq_GPSFixRec_tree = body_GPSFixSeq_tree:add("GPSFixRec") + local body_GPSFixSeq_GPSFixRec_pv = buffer(bufidx, 1):le_uint() + local body_GPSFixSeq_GPSFixRec_pv_count = 0 + body_GPSFixSeq_GPSFixRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GPSFixSeq_GPSFixRec_tree:add(buffer(bufidx, 4), string.format("GPSFixTimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_GPSFixSeq_GPSFixRec_tree:add(buffer(bufidx, 4), string.format("GPSFixTimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + if (bitAND(body_GPSFixSeq_GPSFixRec_pv, body_GPSFixSeq_GPSFixRec_pv_count) > 0) then + body_GPSFixSeq_GPSFixRec_tree:add(buffer(bufidx, 4), string.format("GPSLatitude: %.4f (scaled) -- (unsigned integer) As defined by WGS84", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_GPSFixSeq_GPSFixRec_pv_count = body_GPSFixSeq_GPSFixRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_GPSFixRec_pv, body_GPSFixSeq_GPSFixRec_pv_count) > 0) then + body_GPSFixSeq_GPSFixRec_tree:add(buffer(bufidx, 4), string.format("GPSLongitude: %.4f (scaled) -- (unsigned integer) As defined by WGS84", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_GPSFixSeq_GPSFixRec_pv_count = body_GPSFixSeq_GPSFixRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_GPSFixRec_pv, body_GPSFixSeq_GPSFixRec_pv_count) > 0) then + body_GPSFixSeq_GPSFixRec_tree:add(buffer(bufidx, 4), string.format("GPSTrueCourse: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_GPSFixSeq_GPSFixRec_pv_count = body_GPSFixSeq_GPSFixRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_GPSFixRec_pv, body_GPSFixSeq_GPSFixRec_pv_count) > 0) then + body_GPSFixSeq_GPSFixRec_tree:add(buffer(bufidx, 2), string.format("GPS_SpeedOverGround: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_GPSFixSeq_GPSFixRec_pv_count = body_GPSFixSeq_GPSFixRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_pv, body_GPSFixSeq_pv_count) > 0) then + local body_GPSFixSeq_GPSStatusVar_tree = body_GPSFixSeq_tree:add("GPSStatusVar") + body_GPSFixSeq_GPSStatusVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_GPSFixSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_GPSFixSeq_index == 0) then + local body_GPSFixSeq_GPSStatusVar_MinGPSRec_tree = body_GPSFixSeq_GPSStatusVar_tree:add("MinGPSRec") + local value_set = {[0] = "Invalid", [1] = "Valid"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GPSFixSeq_GPSStatusVar_MinGPSRec_tree:add(buffer(bufidx, 1), string.format("GPSValidity: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GPSFixSeq_GPSStatusVar_MinGPSRec_tree:add(buffer(bufidx, 4), string.format("GPSMagneticVariation: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + if (body_GPSFixSeq_index == 1) then + local body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree = body_GPSFixSeq_GPSStatusVar_tree:add("AltGPSRec") + local body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv = buffer(bufidx, 1):le_uint() + local body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count = 0 + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "OptimalGPSSignal", [1] = "GoodGPSSignal", [2] = "MinimalGPSSignal", [3] = "NoGPSSignal"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 1), string.format("GPSStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "StableGPSFix", [1] = "InitiatingGPSFix", [2] = "PerformingGPSFix"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 1), string.format("GPSFixCommandStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "FALSE", [1] = "TRUE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 1), string.format("GPSLatLonValid: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv, body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count) > 0) then + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 4), string.format("GPSVelocityEast: %.4f (scaled) -- (unsigned integer) Easterly component of the velocity from GPS", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count = body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv, body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count) > 0) then + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 4), string.format("GPSVelocityNorth: %.4f (scaled) -- (unsigned integer) Northerly component of the velocity from GPS", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count = body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv, body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count) > 0) then + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 4), string.format("GPSVelocityDown: %.4f (scaled) -- (unsigned integer) Downward component of the velocity from GPS", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count = body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv, body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count) > 0) then + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 4), string.format("GPSAltitude: %.4f (scaled) -- (unsigned integer) Altitude as defined by WGS84", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count = body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv, body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count) > 0) then + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 1), string.format("NumberOfSatellitesSeen: %d -- (unsigned byte) Number of accessible (visible) satellites", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count = body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count + 1 + if (bitAND(body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv, body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count) > 0) then + body_GPSFixSeq_GPSStatusVar_AltGPSRec_tree:add(buffer(bufidx, 1), string.format("NumberOfSatellitesInSolution: %d -- (unsigned byte) Number of satellites currently used to compute a GPS fix", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end + body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count = body_GPSFixSeq_GPSStatusVar_AltGPSRec_pv_count + 1 + end + end + body_GPSFixSeq_pv_count = body_GPSFixSeq_pv_count + 1 +end +messagetable:add(0x4428, reportgpsfix_4428) + +setgloballoiter_0425 = Proto("setgloballoiter_0425", "SetGlobalLoiter 0x0425") +function setgloballoiter_0425.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGlobalLoiter", string.format("SetGlobalLoiter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGlobalLoiter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalLoiterSpecification_tree = body_tree:add("GlobalLoiterSpecification") + local body_GlobalLoiterSpecification_GlobalLoiterRec_tree = body_GlobalLoiterSpecification_tree:add("GlobalLoiterRec") + local body_GlobalLoiterSpecification_GlobalLoiterRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalLoiterSpecification_GlobalLoiterRec_pv_count = 0 + body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalLoiterSpecification_GlobalLoiterRec_pv, body_GlobalLoiterSpecification_GlobalLoiterRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalLoiterSpecification_GlobalLoiterRec_pv_count = body_GlobalLoiterSpecification_GlobalLoiterRec_pv_count + 1 + local body_GlobalLoiterSpecification_Loiter_tree = body_GlobalLoiterSpecification_tree:add("Loiter") + body_GlobalLoiterSpecification_Loiter_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_GlobalLoiterSpecification_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_GlobalLoiterSpecification_index == 0) then + local body_GlobalLoiterSpecification_Loiter_HoverRec_tree = body_GlobalLoiterSpecification_Loiter_tree:add("HoverRec") + local value_set = {[0] = "LatLonPriority", [1] = "ZPriority"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GlobalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 1), string.format("HoverPreference: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 4), string.format("XYTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + body_GlobalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 4), string.format("ZTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000011641532 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_GlobalLoiterSpecification_index == 1) then + local body_GlobalLoiterSpecification_Loiter_PolygonRec_tree = body_GlobalLoiterSpecification_Loiter_tree:add("PolygonRec") + body_GlobalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 1), string.format("NumberLoiterVertices: %d -- (unsigned byte) Number of vertices in loiter convex, regular polygon 0 and 1 are a circular loiter; 2 forms a linear loiter", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 4), string.format("XYExtent: %.4f (scaled) -- (unsigned integer) Distance from loiter reference position to polygon vertices", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + local value_set = {[0] = "VehicleDependent", [1] = "Clockwise", [2] = "CounterClockwise"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GlobalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 1), string.format("LoiterDirection: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 2), string.format("LoiterBearing: %.4f (scaled) -- (unsigned short integer) Angular offset clockwise from North about Z-axis from the loiter reference position to the first vertex of the polygon; a value of zero for a 4-vertex polygon would create a diamond while a value of PI/4 would create a square", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + if (body_GlobalLoiterSpecification_index == 2) then + local body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree = body_GlobalLoiterSpecification_Loiter_tree:add("RaceTrackRec") + local value_set = {[0] = "Racetrack", [1] = "Figure8"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 1), string.format("LoiterType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 4), string.format("LoiterRadius: %.4f (scaled) -- (unsigned integer) Width (smaller distance) of racetrack or figure 8", buffer(bufidx, 4):le_uint() * 0.000046566129 + (0.000000000000))) + bufidx = bufidx + 4 + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 4), string.format("LoiterLength: %.4f (scaled) -- (unsigned integer) Length (larger distance) of racetrack or figure 8", buffer(bufidx, 4):le_uint() * 0.000046566129 + (0.000000000000))) + bufidx = bufidx + 4 + local value_set = {[0] = "VehicleDependent", [1] = "Clockwise", [2] = "CounterClockwise"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 1), string.format("LoiterDirection: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 2), string.format("LoiterBearing: %.4f (scaled) -- (unsigned short integer) Angular offset of the length axis clockwise from North about Z-axis; a value of zero would orient the LoiterLength in the North-South direction while a value of PI/2 would orient it in the East-West direction.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x0425, setgloballoiter_0425) + +settravelspeedext_04aa = Proto("settravelspeedext_04aa", "SetTravelSpeedExt 0x04aa") +function settravelspeedext_04aa.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetTravelSpeedExt", string.format("SetTravelSpeedExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetTravelSpeedExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TravelSpeedExtRec_tree = body_tree:add("TravelSpeedExtRec") + local types_set = {[0] = 2, [1] = 2, [2] = 2, [3] = 2} + local unit_set = {[0] = "meter per second", [1] = "meter per second", [2] = "rotations per minute", [3] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -327, [1] = -327, [2] = -1000, [3] = -327} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Speed_tree = body_TravelSpeedExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Speed_tree = body_TravelSpeedExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Speed_tree = body_TravelSpeedExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) +end +messagetable:add(0x04AA, settravelspeedext_04aa) + +querygloballoiter_2425 = Proto("querygloballoiter_2425", "QueryGlobalLoiter 0x2425") +function querygloballoiter_2425.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalLoiter", string.format("QueryGlobalLoiter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalLoiter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalLoiterRec_tree = body_tree:add("GlobalLoiterRec") + body_GlobalLoiterRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Global Loiter Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2425, querygloballoiter_2425) + +querytravelspeedext_24aa = Proto("querytravelspeedext_24aa", "QueryTravelSpeedExt 0x24aa") +function querytravelspeedext_24aa.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTravelSpeedExt", string.format("QueryTravelSpeedExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTravelSpeedExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x24AA, querytravelspeedext_24aa) + +reportgloballoiter_4425 = Proto("reportgloballoiter_4425", "ReportGlobalLoiter 0x4425") +function reportgloballoiter_4425.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalLoiter", string.format("ReportGlobalLoiter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalLoiter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalLoiterSpecification_tree = body_tree:add("GlobalLoiterSpecification") + local body_GlobalLoiterSpecification_GlobalLoiterRec_tree = body_GlobalLoiterSpecification_tree:add("GlobalLoiterRec") + local body_GlobalLoiterSpecification_GlobalLoiterRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalLoiterSpecification_GlobalLoiterRec_pv_count = 0 + body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalLoiterSpecification_GlobalLoiterRec_pv, body_GlobalLoiterSpecification_GlobalLoiterRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_GlobalLoiterSpecification_GlobalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalLoiterSpecification_GlobalLoiterRec_pv_count = body_GlobalLoiterSpecification_GlobalLoiterRec_pv_count + 1 + local body_GlobalLoiterSpecification_Loiter_tree = body_GlobalLoiterSpecification_tree:add("Loiter") + body_GlobalLoiterSpecification_Loiter_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_GlobalLoiterSpecification_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_GlobalLoiterSpecification_index == 0) then + local body_GlobalLoiterSpecification_Loiter_HoverRec_tree = body_GlobalLoiterSpecification_Loiter_tree:add("HoverRec") + local value_set = {[0] = "LatLonPriority", [1] = "ZPriority"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GlobalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 1), string.format("HoverPreference: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 4), string.format("XYTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + body_GlobalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 4), string.format("ZTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000011641532 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_GlobalLoiterSpecification_index == 1) then + local body_GlobalLoiterSpecification_Loiter_PolygonRec_tree = body_GlobalLoiterSpecification_Loiter_tree:add("PolygonRec") + body_GlobalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 1), string.format("NumberLoiterVertices: %d -- (unsigned byte) Number of vertices in loiter convex, regular polygon 0 and 1 are a circular loiter; 2 forms a linear loiter", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 4), string.format("XYExtent: %.4f (scaled) -- (unsigned integer) Distance from loiter reference position to polygon vertices", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + local value_set = {[0] = "VehicleDependent", [1] = "Clockwise", [2] = "CounterClockwise"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GlobalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 1), string.format("LoiterDirection: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 2), string.format("LoiterBearing: %.4f (scaled) -- (unsigned short integer) Angular offset clockwise from North about Z-axis from the loiter reference position to the first vertex of the polygon; a value of zero for a 4-vertex polygon would create a diamond while a value of PI/4 would create a square", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + if (body_GlobalLoiterSpecification_index == 2) then + local body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree = body_GlobalLoiterSpecification_Loiter_tree:add("RaceTrackRec") + local value_set = {[0] = "Racetrack", [1] = "Figure8"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 1), string.format("LoiterType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 4), string.format("LoiterRadius: %.4f (scaled) -- (unsigned integer) Width (smaller distance) of racetrack or figure 8", buffer(bufidx, 4):le_uint() * 0.000046566129 + (0.000000000000))) + bufidx = bufidx + 4 + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 4), string.format("LoiterLength: %.4f (scaled) -- (unsigned integer) Length (larger distance) of racetrack or figure 8", buffer(bufidx, 4):le_uint() * 0.000046566129 + (0.000000000000))) + bufidx = bufidx + 4 + local value_set = {[0] = "VehicleDependent", [1] = "Clockwise", [2] = "CounterClockwise"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 1), string.format("LoiterDirection: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_GlobalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 2), string.format("LoiterBearing: %.4f (scaled) -- (unsigned short integer) Angular offset of the length axis clockwise from North about Z-axis; a value of zero would orient the LoiterLength in the North-South direction while a value of PI/2 would orient it in the East-West direction.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x4425, reportgloballoiter_4425) + +reporttravelspeedext_44aa = Proto("reporttravelspeedext_44aa", "ReportTravelSpeedExt 0x44aa") +function reporttravelspeedext_44aa.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTravelSpeedExt", string.format("ReportTravelSpeedExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTravelSpeedExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TravelSpeedExtRec_tree = body_tree:add("TravelSpeedExtRec") + local types_set = {[0] = 2, [1] = 2, [2] = 2, [3] = 2} + local unit_set = {[0] = "meter per second", [1] = "meter per second", [2] = "rotations per minute", [3] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -327, [1] = -327, [2] = -1000, [3] = -327} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Speed_tree = body_TravelSpeedExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Speed_tree = body_TravelSpeedExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Speed_tree = body_TravelSpeedExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) +end +messagetable:add(0x44AA, reporttravelspeedext_44aa) + +setglobaloperatingzone_0423 = Proto("setglobaloperatingzone_0423", "SetGlobalOperatingZone 0x0423") +function setglobaloperatingzone_0423.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGlobalOperatingZone", string.format("SetGlobalOperatingZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGlobalOperatingZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalOperatingZoneSeq_tree = body_tree:add("GlobalOperatingZoneSeq") + local bufidx_start_body_GlobalOperatingZoneSeq = bufidx + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_tree = body_GlobalOperatingZoneSeq_tree:add(buffer(bufidx_start_body_GlobalOperatingZoneSeq, buffer:len() - bufidx_start_body_GlobalOperatingZoneSeq), "GlobalOperatingZone ") + body_GlobalOperatingZoneSeq_GlobalOperatingZone_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_GlobalOperatingZoneSeq_counter=1,body_GlobalOperatingZoneSeq_GlobalOperatingZone_count do + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_tree:add(string.format("GlobalPolygonPointRec_%d", body_GlobalOperatingZoneSeq_counter - 1)) + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count = 0 + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv, body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count + 1 + if (bitAND(body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv, body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count + 1 + end + local bufidx_start_body_GlobalOperatingZoneSeq = bufidx + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_tree = body_GlobalOperatingZoneSeq_tree:add(buffer(bufidx_start_body_GlobalOperatingZoneSeq, buffer:len() - bufidx_start_body_GlobalOperatingZoneSeq), "GlobalExclusionZones ") + body_GlobalOperatingZoneSeq_GlobalExclusionZones_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_GlobalOperatingZoneSeq_counter=1,body_GlobalOperatingZoneSeq_GlobalExclusionZones_count do + local bufidx_start_body_GlobalOperatingZoneSeq_GlobalExclusionZones = bufidx + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_tree:add(buffer(bufidx_start_body_GlobalOperatingZoneSeq_GlobalExclusionZones, buffer:len() - bufidx_start_body_GlobalOperatingZoneSeq_GlobalExclusionZones), "GlobalExclusionZone ") + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_GlobalOperatingZoneSeq_GlobalExclusionZones_counter=1,body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_count do + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_tree:add(string.format("GlobalExclusionZoneSeq_%d", body_GlobalOperatingZoneSeq_GlobalExclusionZones_counter - 1)) + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalExclusionZoneRec_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_tree:add("GlobalExclusionZoneRec") + local value_set = {[0] = "RESERVED", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalExclusionZoneRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_tree:add("GlobalPolygonPointRec") + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count = 0 + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv, body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count + 1 + if (bitAND(body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv, body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count + 1 + end + end +end +messagetable:add(0x0423, setglobaloperatingzone_0423) + +deletezone_0422 = Proto("deletezone_0422", "DeleteZone 0x0422") +function deletezone_0422.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "DeleteZone", string.format("DeleteZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "DeleteZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_ZoneIDList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "ZoneIDList ") + body_ZoneIDList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_ZoneIDList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_ZoneIDList_count do + local body_ZoneIDList_ZoneIDRec_tree = body_ZoneIDList_tree:add(string.format("ZoneIDRec_%d", body_counter - 1)) + local value_set = {[0] = "RESERVED", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ZoneIDList_ZoneIDRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + end +end +messagetable:add(0x0422, deletezone_0422) + +queryglobaloperatingzone_2423 = Proto("queryglobaloperatingzone_2423", "QueryGlobalOperatingZone 0x2423") +function queryglobaloperatingzone_2423.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalOperatingZone", string.format("QueryGlobalOperatingZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalOperatingZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_OperatingZoneRec_tree = body_tree:add("OperatingZoneRec") + local value_set = {[0] = "ALL_ZONES", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_OperatingZoneRec_tree:add(buffer(bufidx, 2), string.format("QueryZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x2423, queryglobaloperatingzone_2423) + +queryexcursion_2424 = Proto("queryexcursion_2424", "QueryExcursion 0x2424") +function queryexcursion_2424.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryExcursion", string.format("QueryExcursion, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryExcursion")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ExcursionZoneRec_tree = body_tree:add("ExcursionZoneRec") + local value_set = {[0] = "ALL_ZONES", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_ExcursionZoneRec_tree:add(buffer(bufidx, 2), string.format("QueryZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x2424, queryexcursion_2424) + +reportglobaloperatingzone_4423 = Proto("reportglobaloperatingzone_4423", "ReportGlobalOperatingZone 0x4423") +function reportglobaloperatingzone_4423.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalOperatingZone", string.format("ReportGlobalOperatingZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalOperatingZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalOperatingZoneSeq_tree = body_tree:add("GlobalOperatingZoneSeq") + local bufidx_start_body_GlobalOperatingZoneSeq = bufidx + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_tree = body_GlobalOperatingZoneSeq_tree:add(buffer(bufidx_start_body_GlobalOperatingZoneSeq, buffer:len() - bufidx_start_body_GlobalOperatingZoneSeq), "GlobalOperatingZone ") + body_GlobalOperatingZoneSeq_GlobalOperatingZone_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_GlobalOperatingZoneSeq_counter=1,body_GlobalOperatingZoneSeq_GlobalOperatingZone_count do + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_tree:add(string.format("GlobalPolygonPointRec_%d", body_GlobalOperatingZoneSeq_counter - 1)) + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count = 0 + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv, body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count + 1 + if (bitAND(body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv, body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count = body_GlobalOperatingZoneSeq_GlobalOperatingZone_GlobalPolygonPointRec_pv_count + 1 + end + local bufidx_start_body_GlobalOperatingZoneSeq = bufidx + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_tree = body_GlobalOperatingZoneSeq_tree:add(buffer(bufidx_start_body_GlobalOperatingZoneSeq, buffer:len() - bufidx_start_body_GlobalOperatingZoneSeq), "GlobalExclusionZones ") + body_GlobalOperatingZoneSeq_GlobalExclusionZones_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_GlobalOperatingZoneSeq_counter=1,body_GlobalOperatingZoneSeq_GlobalExclusionZones_count do + local bufidx_start_body_GlobalOperatingZoneSeq_GlobalExclusionZones = bufidx + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_tree:add(buffer(bufidx_start_body_GlobalOperatingZoneSeq_GlobalExclusionZones, buffer:len() - bufidx_start_body_GlobalOperatingZoneSeq_GlobalExclusionZones), "GlobalExclusionZone ") + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_GlobalOperatingZoneSeq_GlobalExclusionZones_counter=1,body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_count do + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_tree:add(string.format("GlobalExclusionZoneSeq_%d", body_GlobalOperatingZoneSeq_GlobalExclusionZones_counter - 1)) + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalExclusionZoneRec_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_tree:add("GlobalExclusionZoneRec") + local value_set = {[0] = "RESERVED", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalExclusionZoneRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_tree:add("GlobalPolygonPointRec") + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count = 0 + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv, body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MinZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count + 1 + if (bitAND(body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv, body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MaxZPosition_tree = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count = body_GlobalOperatingZoneSeq_GlobalExclusionZones_GlobalExclusionZone_GlobalExclusionZoneSeq_GlobalPolygonPointRec_pv_count + 1 + end + end +end +messagetable:add(0x4423, reportglobaloperatingzone_4423) + +reportexcursion_4424 = Proto("reportexcursion_4424", "ReportExcursion 0x4424") +function reportexcursion_4424.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportExcursion", string.format("ReportExcursion, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportExcursion")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_Excursion_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "Excursion ") + body_Excursion_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_Excursion_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_Excursion_count do + local body_Excursion_ExcursionRec_tree = body_Excursion_tree:add(string.format("ExcursionRec_%d", body_counter - 1)) + local value_set = {[0] = "RESERVED", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_Excursion_ExcursionRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local value_set = {[0] = "InsideSafeOPZone", [1] = "OutsizeSafeOPZone", [2] = "InsideSafeOPZoneAndInsideExclusionZone"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_Excursion_ExcursionRec_tree:add(buffer(bufidx, 1), string.format("ZoneStatus: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x4424, reportexcursion_4424) + +executelist_041e = Proto("executelist_041e", "ExecuteList 0x041e") +function executelist_041e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ExecuteList", string.format("ExecuteList, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ExecuteList")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ExecuteListRec_tree = body_tree:add("ExecuteListRec") + local body_ExecuteListRec_pv = buffer(bufidx, 1):le_uint() + local body_ExecuteListRec_pv_count = 0 + body_ExecuteListRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_ExecuteListRec_tree:add(buffer(bufidx, 2), string.format("Speed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_ExecuteListRec_pv, body_ExecuteListRec_pv_count) > 0) then + body_ExecuteListRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Element UID of the starting element. A value of zero (0) indicates the first (head) element of the list.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_ExecuteListRec_pv_count = body_ExecuteListRec_pv_count + 1 +end +messagetable:add(0x041E, executelist_041e) + +executelistext_04ae = Proto("executelistext_04ae", "ExecuteListExt 0x04ae") +function executelistext_04ae.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ExecuteListExt", string.format("ExecuteListExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ExecuteListExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ExecuteListExtRec_tree = body_tree:add("ExecuteListExtRec") + local body_ExecuteListExtRec_pv = buffer(bufidx, 1):le_uint() + local body_ExecuteListExtRec_pv_count = 0 + body_ExecuteListExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 2, [1] = 2, [2] = 2, [3] = 2} + local unit_set = {[0] = "meter per second", [1] = "meter per second", [2] = "rotations per minute", [3] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -327, [1] = -327, [2] = -1000, [3] = -327} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Speed_tree = body_ExecuteListExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Speed_tree = body_ExecuteListExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Speed_tree = body_ExecuteListExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_ExecuteListExtRec_pv, body_ExecuteListExtRec_pv_count) > 0) then + body_ExecuteListExtRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) Element UID of the starting element. A value of zero (0) indicates the first (head) element of the list.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_ExecuteListExtRec_pv_count = body_ExecuteListExtRec_pv_count + 1 +end +messagetable:add(0x04AE, executelistext_04ae) + +querytravelspeed_240a = Proto("querytravelspeed_240a", "QueryTravelSpeed 0x240a") +function querytravelspeed_240a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTravelSpeed", string.format("QueryTravelSpeed, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTravelSpeed")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x240A, querytravelspeed_240a) + +queryglobalpathsegment_240f = Proto("queryglobalpathsegment_240f", "QueryGlobalPathSegment 0x240f") +function queryglobalpathsegment_240f.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalPathSegment", string.format("QueryGlobalPathSegment, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalPathSegment")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryGlobalPathSegmentRec_tree = body_tree:add("QueryGlobalPathSegmentRec") + body_QueryGlobalPathSegmentRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Global Path Segment Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x240F, queryglobalpathsegment_240f) + +queryglobalpathsegmentext_24af = Proto("queryglobalpathsegmentext_24af", "QueryGlobalPathSegmentExt 0x24af") +function queryglobalpathsegmentext_24af.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalPathSegmentExt", string.format("QueryGlobalPathSegmentExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalPathSegmentExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryGlobalPathSegmentExtRec_tree = body_tree:add("QueryGlobalPathSegmentExtRec") + body_QueryGlobalPathSegmentExtRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Global Path Segment Ext Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x24AF, queryglobalpathsegmentext_24af) + +queryactiveelement_241e = Proto("queryactiveelement_241e", "QueryActiveElement 0x241e") +function queryactiveelement_241e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryActiveElement", string.format("QueryActiveElement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryActiveElement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x241E, queryactiveelement_241e) + +reporttravelspeed_440a = Proto("reporttravelspeed_440a", "ReportTravelSpeed 0x440a") +function reporttravelspeed_440a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTravelSpeed", string.format("ReportTravelSpeed, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTravelSpeed")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TravelSpeedRec_tree = body_tree:add("TravelSpeedRec") + body_TravelSpeedRec_tree:add(buffer(bufidx, 2), string.format("Speed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x440A, reporttravelspeed_440a) + +reportglobalpathsegment_440f = Proto("reportglobalpathsegment_440f", "ReportGlobalPathSegment 0x440f") +function reportglobalpathsegment_440f.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalPathSegment", string.format("ReportGlobalPathSegment, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalPathSegment")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalPathSegmentRec_tree = body_tree:add("GlobalPathSegmentRec") + local body_GlobalPathSegmentRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalPathSegmentRec_pv_count = 0 + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P1_Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P1_Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalPathSegmentRec_pv, body_GlobalPathSegmentRec_pv_count) > 0) then + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P1_Altitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPathSegmentRec_pv_count = body_GlobalPathSegmentRec_pv_count + 1 + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P2_Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P2_Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalPathSegmentRec_pv, body_GlobalPathSegmentRec_pv_count) > 0) then + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P2_Altitude: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPathSegmentRec_pv_count = body_GlobalPathSegmentRec_pv_count + 1 + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 2), string.format("WeightingFactor: %.4f (scaled) -- (unsigned short integer) A value of zero (0) is a straight line", buffer(bufidx, 2):le_uint() * 0.007629510948 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_GlobalPathSegmentRec_pv, body_GlobalPathSegmentRec_pv_count) > 0) then + body_GlobalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) -- (unsigned integer) A value of zero (0) is used for infinite tolerance", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPathSegmentRec_pv_count = body_GlobalPathSegmentRec_pv_count + 1 +end +messagetable:add(0x440F, reportglobalpathsegment_440f) + +reportglobalpathsegmentext_44af = Proto("reportglobalpathsegmentext_44af", "ReportGlobalPathSegmentExt 0x44af") +function reportglobalpathsegmentext_44af.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalPathSegmentExt", string.format("ReportGlobalPathSegmentExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalPathSegmentExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalPathSegmentExtRec_tree = body_tree:add("GlobalPathSegmentExtRec") + local body_GlobalPathSegmentExtRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalPathSegmentExtRec_pv_count = 0 + body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("P1_Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("P1_Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalPathSegmentExtRec_pv, body_GlobalPathSegmentExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local P1_ZPosition_tree = body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P1_ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + P1_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local P1_ZPosition_tree = body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P1_ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + P1_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local P1_ZPosition_tree = body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P1_ZPosition: %d %s", value, unit_list(type_value))) + P1_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalPathSegmentExtRec_pv_count = body_GlobalPathSegmentExtRec_pv_count + 1 + body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("P2_Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("P2_Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalPathSegmentExtRec_pv, body_GlobalPathSegmentExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local P_ZPosition_tree = body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P_ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + P_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local P_ZPosition_tree = body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P_ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + P_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local P_ZPosition_tree = body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P_ZPosition: %d %s", value, unit_list(type_value))) + P_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalPathSegmentExtRec_pv_count = body_GlobalPathSegmentExtRec_pv_count + 1 + body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx, 2), string.format("WeightingFactor: %.4f (scaled) -- (unsigned short integer) A value of zero (0) is a straight line", buffer(bufidx, 2):le_uint() * 0.007629510948 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_GlobalPathSegmentExtRec_pv, body_GlobalPathSegmentExtRec_pv_count) > 0) then + body_GlobalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPathSegmentExtRec_pv_count = body_GlobalPathSegmentExtRec_pv_count + 1 +end +messagetable:add(0x44AF, reportglobalpathsegmentext_44af) + +reportactiveelement_441e = Proto("reportactiveelement_441e", "ReportActiveElement 0x441e") +function reportactiveelement_441e.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportActiveElement", string.format("ReportActiveElement, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportActiveElement")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ActiveElementRec_tree = body_tree:add("ActiveElementRec") + body_ActiveElementRec_tree:add(buffer(bufidx, 2), string.format("ElementUID: %d -- (unsigned short integer) UID of the active list element. A value of 0 implies that no lists are executing.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x441E, reportactiveelement_441e) + +setglobalpose_0402 = Proto("setglobalpose_0402", "SetGlobalPose 0x0402") +function setglobalpose_0402.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGlobalPose", string.format("SetGlobalPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGlobalPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalPoseRec_tree = body_tree:add("GlobalPoseRec") + local body_GlobalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_GlobalPoseRec_pv_count = 0 + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) -- (unsigned integer) Altitude with respect to WGS-84 reference ellipsoid", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + local body_GlobalPoseRec_TimeStamp_buf = buffer(bufidx, 4) + local body_GlobalPoseRec_TimeStamp_tree = body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32), body_GlobalPoseRec_TimeStamp_buf:le_uint())) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 0, 9))) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 10, 15))) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 16, 21))) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 22, 26))) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 +end +messagetable:add(0x0402, setglobalpose_0402) + +setglobalposeext_04a2 = Proto("setglobalposeext_04a2", "SetGlobalPoseExt 0x04a2") +function setglobalposeext_04a2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGlobalPoseExt", string.format("SetGlobalPoseExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGlobalPoseExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalPoseExtRec_tree = body_tree:add("GlobalPoseExtRec") + local body_GlobalPoseExtRec_pv = buffer(bufidx, 2):le_uint() + local body_GlobalPoseExtRec_pv_count = 0 + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_GlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_GlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_GlobalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("HorizontalRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("VerticalRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 + if (bitAND(body_GlobalPoseExtRec_pv, body_GlobalPoseExtRec_pv_count) > 0) then + body_GlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_GlobalPoseExtRec_pv_count = body_GlobalPoseExtRec_pv_count + 1 +end +messagetable:add(0x04A2, setglobalposeext_04a2) + +setgeomagneticproperty_0412 = Proto("setgeomagneticproperty_0412", "SetGeomagneticProperty 0x0412") +function setgeomagneticproperty_0412.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGeomagneticProperty", string.format("SetGeomagneticProperty, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGeomagneticProperty")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GeomagneticPropertyRec_tree = body_tree:add("GeomagneticPropertyRec") + body_GeomagneticPropertyRec_tree:add(buffer(bufidx, 2), string.format("MagneticVariation: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 +end +messagetable:add(0x0412, setgeomagneticproperty_0412) + +queryglobalpose_2402 = Proto("queryglobalpose_2402", "QueryGlobalPose 0x2402") +function queryglobalpose_2402.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalPose", string.format("QueryGlobalPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryGlobalPoseRec_tree = body_tree:add("QueryGlobalPoseRec") + body_QueryGlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Global Pose Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x2402, queryglobalpose_2402) + +queryglobalposeext_24a2 = Proto("queryglobalposeext_24a2", "QueryGlobalPoseExt 0x24a2") +function queryglobalposeext_24a2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalPoseExt", string.format("QueryGlobalPoseExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalPoseExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryGlobalPoseExtRec_tree = body_tree:add("QueryGlobalPoseExtRec") + body_QueryGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Global Pose Ext Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x24A2, queryglobalposeext_24a2) + +querygeomagneticproperty_2412 = Proto("querygeomagneticproperty_2412", "QueryGeomagneticProperty 0x2412") +function querygeomagneticproperty_2412.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGeomagneticProperty", string.format("QueryGeomagneticProperty, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGeomagneticProperty")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2412, querygeomagneticproperty_2412) + +reportglobalpose_4402 = Proto("reportglobalpose_4402", "ReportGlobalPose 0x4402") +function reportglobalpose_4402.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalPose", string.format("ReportGlobalPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalPoseRec_tree = body_tree:add("GlobalPoseRec") + local body_GlobalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_GlobalPoseRec_pv_count = 0 + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) -- (unsigned integer) Altitude with respect to WGS-84 reference ellipsoid", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + body_GlobalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 + if (bitAND(body_GlobalPoseRec_pv, body_GlobalPoseRec_pv_count) > 0) then + local body_GlobalPoseRec_TimeStamp_buf = buffer(bufidx, 4) + local body_GlobalPoseRec_TimeStamp_tree = body_GlobalPoseRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32), body_GlobalPoseRec_TimeStamp_buf:le_uint())) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 0, 9))) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 10, 15))) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 16, 21))) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 22, 26))) + body_GlobalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_GlobalPoseRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_GlobalPoseRec_pv_count = body_GlobalPoseRec_pv_count + 1 +end +messagetable:add(0x4402, reportglobalpose_4402) + +reportglobalposeext_44a2 = Proto("reportglobalposeext_44a2", "ReportGlobalPoseExt 0x44a2") +function reportglobalposeext_44a2.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalPoseExt", string.format("ReportGlobalPoseExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalPoseExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportGlobalPoseExtRec_tree = body_tree:add("ReportGlobalPoseExtRec") + local body_ReportGlobalPoseExtRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportGlobalPoseExtRec_pv_count = 0 + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeAGL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeMSL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeASF: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Depth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportGlobalPoseExtRec_pv, body_ReportGlobalPoseExtRec_pv_count) > 0) then + body_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportGlobalPoseExtRec_pv_count = body_ReportGlobalPoseExtRec_pv_count + 1 +end +messagetable:add(0x44A2, reportglobalposeext_44a2) + +reportgeomagneticproperty_4412 = Proto("reportgeomagneticproperty_4412", "ReportGeomagneticProperty 0x4412") +function reportgeomagneticproperty_4412.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGeomagneticProperty", string.format("ReportGeomagneticProperty, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGeomagneticProperty")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GeomagneticPropertyRec_tree = body_tree:add("GeomagneticPropertyRec") + body_GeomagneticPropertyRec_tree:add(buffer(bufidx, 2), string.format("MagneticVariation: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 +end +messagetable:add(0x4412, reportgeomagneticproperty_4412) + +setglobalvector_0407 = Proto("setglobalvector_0407", "SetGlobalVector 0x0407") +function setglobalvector_0407.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGlobalVector", string.format("SetGlobalVector, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGlobalVector")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalVectorRec_tree = body_tree:add("GlobalVectorRec") + local body_GlobalVectorRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalVectorRec_pv_count = 0 + body_GlobalVectorRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 2), string.format("Speed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) -- (unsigned integer) Altitude with respect to WGS-84 reference ellipsoid", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 +end +messagetable:add(0x0407, setglobalvector_0407) + +setglobalvectorext_04a7 = Proto("setglobalvectorext_04a7", "SetGlobalVectorExt 0x04a7") +function setglobalvectorext_04a7.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGlobalVectorExt", string.format("SetGlobalVectorExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGlobalVectorExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalVectorExtRec_tree = body_tree:add("GlobalVectorExtRec") + local body_GlobalVectorExtRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalVectorExtRec_pv_count = 0 + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 2, [1] = 2, [2] = 2, [3] = 2} + local unit_set = {[0] = "meter per second", [1] = "meter per second", [2] = "rotations per minute", [3] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -327, [1] = -327, [2] = -1000, [3] = -327} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Speed_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Speed_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Speed_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 +end +messagetable:add(0x04A7, setglobalvectorext_04a7) + +queryglobalvector_2407 = Proto("queryglobalvector_2407", "QueryGlobalVector 0x2407") +function queryglobalvector_2407.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalVector", string.format("QueryGlobalVector, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalVector")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryGlobalVectorRec_tree = body_tree:add("QueryGlobalVectorRec") + body_QueryGlobalVectorRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Global Vector Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2407, queryglobalvector_2407) + +queryglobalvectorext_24a7 = Proto("queryglobalvectorext_24a7", "QueryGlobalVectorExt 0x24a7") +function queryglobalvectorext_24a7.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalVectorExt", string.format("QueryGlobalVectorExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalVectorExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryGlobalVectorExtRec_tree = body_tree:add("QueryGlobalVectorExtRec") + body_QueryGlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Global Vector Ext Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x24A7, queryglobalvectorext_24a7) + +reportglobalvector_4407 = Proto("reportglobalvector_4407", "ReportGlobalVector 0x4407") +function reportglobalvector_4407.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalVector", string.format("ReportGlobalVector, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalVector")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalVectorRec_tree = body_tree:add("GlobalVectorRec") + local body_GlobalVectorRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalVectorRec_pv_count = 0 + body_GlobalVectorRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 2), string.format("Speed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) -- (unsigned integer) Altitude with respect to WGS-84 reference ellipsoid", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 + if (bitAND(body_GlobalVectorRec_pv, body_GlobalVectorRec_pv_count) > 0) then + body_GlobalVectorRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorRec_pv_count = body_GlobalVectorRec_pv_count + 1 +end +messagetable:add(0x4407, reportglobalvector_4407) + +reportglobalvectorext_44a7 = Proto("reportglobalvectorext_44a7", "ReportGlobalVectorExt 0x44a7") +function reportglobalvectorext_44a7.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalVectorExt", string.format("ReportGlobalVectorExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalVectorExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalVectorExtRec_tree = body_tree:add("GlobalVectorExtRec") + local body_GlobalVectorExtRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalVectorExtRec_pv_count = 0 + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 2, [1] = 2, [2] = 2, [3] = 2} + local unit_set = {[0] = "meter per second", [1] = "meter per second", [2] = "rotations per minute", [3] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -327, [1] = -327, [2] = -1000, [3] = -327} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Speed_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Speed_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Speed_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_GlobalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 + if (bitAND(body_GlobalVectorExtRec_pv, body_GlobalVectorExtRec_pv_count) > 0) then + body_GlobalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalVectorExtRec_pv_count = body_GlobalVectorExtRec_pv_count + 1 +end +messagetable:add(0x44A7, reportglobalvectorext_44a7) + +settravelspeed_040a = Proto("settravelspeed_040a", "SetTravelSpeed 0x040a") +function settravelspeed_040a.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetTravelSpeed", string.format("SetTravelSpeed, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetTravelSpeed")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_TravelSpeedRec_tree = body_tree:add("TravelSpeedRec") + body_TravelSpeedRec_tree:add(buffer(bufidx, 2), string.format("Speed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x040A, settravelspeed_040a) + +setglobalwaypoint_040c = Proto("setglobalwaypoint_040c", "SetGlobalWaypoint 0x040c") +function setglobalwaypoint_040c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGlobalWaypoint", string.format("SetGlobalWaypoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGlobalWaypoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalWaypointRec_tree = body_tree:add("GlobalWaypointRec") + local body_GlobalWaypointRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalWaypointRec_pv_count = 0 + body_GlobalWaypointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) -- (unsigned integer) Altitude with respect to WGS-84 reference ellipsoid", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 2), string.format("WaypointTolerance: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) -- (unsigned integer) A value of zero (0) is used for infinite tolerance", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 +end +messagetable:add(0x040C, setglobalwaypoint_040c) + +setglobalwaypointext_04ac = Proto("setglobalwaypointext_04ac", "SetGlobalWaypointExt 0x04ac") +function setglobalwaypointext_04ac.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetGlobalWaypointExt", string.format("SetGlobalWaypointExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetGlobalWaypointExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalWaypointExtRec_tree = body_tree:add("GlobalWaypointExtRec") + local body_GlobalWaypointExtRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalWaypointExtRec_pv_count = 0 + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_GlobalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_GlobalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_GlobalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("WaypointTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000002328306 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 +end +messagetable:add(0x04AC, setglobalwaypointext_04ac) + +queryglobalwaypoint_240c = Proto("queryglobalwaypoint_240c", "QueryGlobalWaypoint 0x240c") +function queryglobalwaypoint_240c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalWaypoint", string.format("QueryGlobalWaypoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalWaypoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryGlobalWaypointRec_tree = body_tree:add("QueryGlobalWaypointRec") + body_QueryGlobalWaypointRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Global Waypoint Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x240C, queryglobalwaypoint_240c) + +queryglobalwaypointext_24ac = Proto("queryglobalwaypointext_24ac", "QueryGlobalWaypointExt 0x24ac") +function queryglobalwaypointext_24ac.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryGlobalWaypointExt", string.format("QueryGlobalWaypointExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryGlobalWaypointExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryGlobalWaypointExtRec_tree = body_tree:add("QueryGlobalWaypointExtRec") + body_QueryGlobalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Global Waypoint Ext Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x24AC, queryglobalwaypointext_24ac) + +reportglobalwaypoint_440c = Proto("reportglobalwaypoint_440c", "ReportGlobalWaypoint 0x440c") +function reportglobalwaypoint_440c.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalWaypoint", string.format("ReportGlobalWaypoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalWaypoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalWaypointRec_tree = body_tree:add("GlobalWaypointRec") + local body_GlobalWaypointRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalWaypointRec_pv_count = 0 + body_GlobalWaypointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Altitude: %.4f (scaled) -- (unsigned integer) Altitude with respect to WGS-84 reference ellipsoid", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 2), string.format("WaypointTolerance: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 + if (bitAND(body_GlobalWaypointRec_pv, body_GlobalWaypointRec_pv_count) > 0) then + body_GlobalWaypointRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) -- (unsigned integer) A value of zero (0) is used for infinite tolerance", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalWaypointRec_pv_count = body_GlobalWaypointRec_pv_count + 1 +end +messagetable:add(0x440C, reportglobalwaypoint_440c) + +reportglobalwaypointext_44ac = Proto("reportglobalwaypointext_44ac", "ReportGlobalWaypointExt 0x44ac") +function reportglobalwaypointext_44ac.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_GlobalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportGlobalWaypointExt", string.format("ReportGlobalWaypointExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportGlobalWaypointExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_GlobalWaypointExtRec_tree = body_tree:add("GlobalWaypointExtRec") + local body_GlobalWaypointExtRec_pv = buffer(bufidx, 1):le_uint() + local body_GlobalWaypointExtRec_pv_count = 0 + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_GlobalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_GlobalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_GlobalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("WaypointTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000002328306 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 + if (bitAND(body_GlobalWaypointExtRec_pv, body_GlobalWaypointExtRec_pv_count) > 0) then + body_GlobalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_GlobalWaypointExtRec_pv_count = body_GlobalWaypointExtRec_pv_count + 1 +end +messagetable:add(0x44AC, reportglobalwaypointext_44ac) + +inertialsensorcontrol_0429 = Proto("inertialsensorcontrol_0429", "InertialSensorControl 0x0429") +function inertialsensorcontrol_0429.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_InertialSensorControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "InertialSensorControl", string.format("InertialSensorControl, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "InertialSensorControl")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_InertialSensorControlRec_tree = body_tree:add("InertialSensorControlRec") + local value_set = {[0] = "OFF", [1] = "ON", [2] = "RESTART"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_InertialSensorControlRec_tree:add(buffer(bufidx, 1), string.format("Command: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x0429, inertialsensorcontrol_0429) + +queryinertialsensorstatus_2429 = Proto("queryinertialsensorstatus_2429", "QueryInertialSensorStatus 0x2429") +function queryinertialsensorstatus_2429.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_InertialSensorControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryInertialSensorStatus", string.format("QueryInertialSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryInertialSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2429, queryinertialsensorstatus_2429) + +reportinertialsensorstatus_4429 = Proto("reportinertialsensorstatus_4429", "ReportInertialSensorStatus 0x4429") +function reportinertialsensorstatus_4429.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_InertialSensorControl.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportInertialSensorStatus", string.format("ReportInertialSensorStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportInertialSensorStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_InertialSensorStatusRec_tree = body_tree:add("InertialSensorStatusRec") + local value_set = {[0] = "OFF", [1] = "ON", [2] = "RESTARTING"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_InertialSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("PowerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "INIT", [1] = "OPERATIONAL", [2] = "COARSE_STATIONARY_ALIGNMENT", [3] = "COARSE_GPS_ALIGNMENT", [4] = "FINE_STATIONARY_ALIGNMENT_STARTED", [5] = "FINE_STATIONARY_ALIGNMENT_COMPLETE", [6] = "FINE_GPS_ALIGNMENT_STARTED", [7] = "FINE_GPS_ALIGNMENT_COMPLETE", [8] = "INERTIAL_SENSOR_FAILURE"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_InertialSensorStatusRec_tree:add(buffer(bufidx, 1), string.format("OperatingState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x4429, reportinertialsensorstatus_4429) + +setlocalloiter_0426 = Proto("setlocalloiter_0426", "SetLocalLoiter 0x0426") +function setlocalloiter_0426.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLocalLoiter", string.format("SetLocalLoiter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLocalLoiter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalLoiterSpecification_tree = body_tree:add("LocalLoiterSpecification") + local body_LocalLoiterSpecification_LocalLoiterRec_tree = body_LocalLoiterSpecification_tree:add("LocalLoiterRec") + local body_LocalLoiterSpecification_LocalLoiterRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalLoiterSpecification_LocalLoiterRec_pv_count = 0 + body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalLoiterSpecification_LocalLoiterRec_pv, body_LocalLoiterSpecification_LocalLoiterRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalLoiterSpecification_LocalLoiterRec_pv_count = body_LocalLoiterSpecification_LocalLoiterRec_pv_count + 1 + local body_LocalLoiterSpecification_Loiter_tree = body_LocalLoiterSpecification_tree:add("Loiter") + body_LocalLoiterSpecification_Loiter_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_LocalLoiterSpecification_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_LocalLoiterSpecification_index == 0) then + local body_LocalLoiterSpecification_Loiter_HoverRec_tree = body_LocalLoiterSpecification_Loiter_tree:add("HoverRec") + local value_set = {[0] = "XYPriority", [1] = "ZPriority"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LocalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 1), string.format("HoverPreference: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 4), string.format("XYTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + body_LocalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 4), string.format("ZTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000011641532 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_LocalLoiterSpecification_index == 1) then + local body_LocalLoiterSpecification_Loiter_PolygonRec_tree = body_LocalLoiterSpecification_Loiter_tree:add("PolygonRec") + body_LocalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 1), string.format("NumberLoiterVertices: %d -- (unsigned byte) Number of vertices in loiter convex, regular polygon 0 and 1 are a circular loiter; 2 forms a linear loiter", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 4), string.format("XYExtent: %.4f (scaled) -- (unsigned integer) Distance from loiter reference position to polygon vertices", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + local value_set = {[0] = "VehicleDependent", [1] = "Clockwise", [2] = "CounterClockwise"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LocalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 1), string.format("LoiterDirection: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 2), string.format("LoiterBearing: %.4f (scaled) -- (unsigned short integer) Angular offset from the X-axis in a right-hand sense about Z-axis from the loiter point to the first vertex of the polygon; a value of zero for a 4-vertex polygon would create a diamond while a value of PI/4 would create a square with respect to the local coordinate system.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + if (body_LocalLoiterSpecification_index == 2) then + local body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree = body_LocalLoiterSpecification_Loiter_tree:add("RaceTrackRec") + local value_set = {[0] = "Racetrack", [1] = "Figure8"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 1), string.format("LoiterType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 4), string.format("LoiterRadius: %.4f (scaled) -- (unsigned integer) Width (smaller distance) of racetrack or figure 8", buffer(bufidx, 4):le_uint() * 0.000046566129 + (0.000000000000))) + bufidx = bufidx + 4 + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 4), string.format("LoiterLength: %.4f (scaled) -- (unsigned integer) Length (larger distance) of racetrack or figure 8", buffer(bufidx, 4):le_uint() * 0.000046566129 + (0.000000000000))) + bufidx = bufidx + 4 + local value_set = {[0] = "VehicleDependent", [1] = "Clockwise", [2] = "CounterClockwise"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 1), string.format("LoiterDirection: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 2), string.format("LoiterBearing: %.4f (scaled) -- (unsigned short integer) Angular offset of the length axis from the X-axis in a right-hand sense about Z-axis; a value of zero would align the “LoiterLength” with the X-axis while a value of PI/2 would align it with the Y-axis.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x0426, setlocalloiter_0426) + +querylocalloiter_2426 = Proto("querylocalloiter_2426", "QueryLocalLoiter 0x2426") +function querylocalloiter_2426.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalLoiter", string.format("QueryLocalLoiter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalLoiter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalLoiterRec_tree = body_tree:add("LocalLoiterRec") + body_LocalLoiterRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Local Loiter Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2426, querylocalloiter_2426) + +reportlocalloiter_4426 = Proto("reportlocalloiter_4426", "ReportLocalLoiter 0x4426") +function reportlocalloiter_4426.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalLoiterDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalLoiter", string.format("ReportLocalLoiter, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalLoiter")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalLoiterSpecification_tree = body_tree:add("LocalLoiterSpecification") + local body_LocalLoiterSpecification_LocalLoiterRec_tree = body_LocalLoiterSpecification_tree:add("LocalLoiterRec") + local body_LocalLoiterSpecification_LocalLoiterRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalLoiterSpecification_LocalLoiterRec_pv_count = 0 + body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalLoiterSpecification_LocalLoiterRec_pv, body_LocalLoiterSpecification_LocalLoiterRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_LocalLoiterSpecification_LocalLoiterRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalLoiterSpecification_LocalLoiterRec_pv_count = body_LocalLoiterSpecification_LocalLoiterRec_pv_count + 1 + local body_LocalLoiterSpecification_Loiter_tree = body_LocalLoiterSpecification_tree:add("Loiter") + body_LocalLoiterSpecification_Loiter_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_LocalLoiterSpecification_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_LocalLoiterSpecification_index == 0) then + local body_LocalLoiterSpecification_Loiter_HoverRec_tree = body_LocalLoiterSpecification_Loiter_tree:add("HoverRec") + local value_set = {[0] = "XYPriority", [1] = "ZPriority"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LocalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 1), string.format("HoverPreference: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 4), string.format("XYTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + body_LocalLoiterSpecification_Loiter_HoverRec_tree:add(buffer(bufidx, 4), string.format("ZTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000011641532 + (0.000000000000))) + bufidx = bufidx + 4 + end + if (body_LocalLoiterSpecification_index == 1) then + local body_LocalLoiterSpecification_Loiter_PolygonRec_tree = body_LocalLoiterSpecification_Loiter_tree:add("PolygonRec") + body_LocalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 1), string.format("NumberLoiterVertices: %d -- (unsigned byte) Number of vertices in loiter convex, regular polygon 0 and 1 are a circular loiter; 2 forms a linear loiter", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 4), string.format("XYExtent: %.4f (scaled) -- (unsigned integer) Distance from loiter reference position to polygon vertices", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + local value_set = {[0] = "VehicleDependent", [1] = "Clockwise", [2] = "CounterClockwise"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LocalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 1), string.format("LoiterDirection: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_PolygonRec_tree:add(buffer(bufidx, 2), string.format("LoiterBearing: %.4f (scaled) -- (unsigned short integer) Angular offset from the X-axis in a right-hand sense about Z-axis from the loiter point to the first vertex of the polygon; a value of zero for a 4-vertex polygon would create a diamond while a value of PI/4 would create a square with respect to the local coordinate system.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + if (body_LocalLoiterSpecification_index == 2) then + local body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree = body_LocalLoiterSpecification_Loiter_tree:add("RaceTrackRec") + local value_set = {[0] = "Racetrack", [1] = "Figure8"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 1), string.format("LoiterType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 4), string.format("LoiterRadius: %.4f (scaled) -- (unsigned integer) Width (smaller distance) of racetrack or figure 8", buffer(bufidx, 4):le_uint() * 0.000046566129 + (0.000000000000))) + bufidx = bufidx + 4 + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 4), string.format("LoiterLength: %.4f (scaled) -- (unsigned integer) Length (larger distance) of racetrack or figure 8", buffer(bufidx, 4):le_uint() * 0.000046566129 + (0.000000000000))) + bufidx = bufidx + 4 + local value_set = {[0] = "VehicleDependent", [1] = "Clockwise", [2] = "CounterClockwise"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 1), string.format("LoiterDirection: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_LocalLoiterSpecification_Loiter_RaceTrackRec_tree:add(buffer(bufidx, 2), string.format("LoiterBearing: %.4f (scaled) -- (unsigned short integer) Angular offset of the length axis from the X-axis in a right-hand sense about Z-axis; a value of zero would align the “LoiterLength” with the X-axis while a value of PI/2 would align it with the Y-axis.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x4426, reportlocalloiter_4426) + +setlocaloperatingzone_0427 = Proto("setlocaloperatingzone_0427", "SetLocalOperatingZone 0x0427") +function setlocaloperatingzone_0427.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLocalOperatingZone", string.format("SetLocalOperatingZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLocalOperatingZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalOperatingZoneSeq_tree = body_tree:add("LocalOperatingZoneSeq") + local bufidx_start_body_LocalOperatingZoneSeq = bufidx + local body_LocalOperatingZoneSeq_LocalOperatingZone_tree = body_LocalOperatingZoneSeq_tree:add(buffer(bufidx_start_body_LocalOperatingZoneSeq, buffer:len() - bufidx_start_body_LocalOperatingZoneSeq), "LocalOperatingZone ") + body_LocalOperatingZoneSeq_LocalOperatingZone_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LocalOperatingZoneSeq_LocalOperatingZone_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_LocalOperatingZoneSeq_counter=1,body_LocalOperatingZoneSeq_LocalOperatingZone_count do + local body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_tree:add(string.format("LocalPolygonPointRec_%d", body_LocalOperatingZoneSeq_counter - 1)) + local body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count = 0 + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv, body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count + 1 + if (bitAND(body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv, body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count + 1 + end + local bufidx_start_body_LocalOperatingZoneSeq = bufidx + local body_LocalOperatingZoneSeq_LocalExclusionZones_tree = body_LocalOperatingZoneSeq_tree:add(buffer(bufidx_start_body_LocalOperatingZoneSeq, buffer:len() - bufidx_start_body_LocalOperatingZoneSeq), "LocalExclusionZones ") + body_LocalOperatingZoneSeq_LocalExclusionZones_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LocalOperatingZoneSeq_LocalExclusionZones_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_LocalOperatingZoneSeq_counter=1,body_LocalOperatingZoneSeq_LocalExclusionZones_count do + local bufidx_start_body_LocalOperatingZoneSeq_LocalExclusionZones = bufidx + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_tree:add(buffer(bufidx_start_body_LocalOperatingZoneSeq_LocalExclusionZones, buffer:len() - bufidx_start_body_LocalOperatingZoneSeq_LocalExclusionZones), "LocalExclusionZone ") + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_LocalOperatingZoneSeq_LocalExclusionZones_counter=1,body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_count do + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_tree:add(string.format("LocalExclusionZoneSeq_%d", body_LocalOperatingZoneSeq_LocalExclusionZones_counter - 1)) + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalExclusionZoneRec_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_tree:add("LocalExclusionZoneRec") + local value_set = {[0] = "RESERVED", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalExclusionZoneRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_tree:add("LocalPolygonPointRec") + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count = 0 + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv, body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count + 1 + if (bitAND(body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv, body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count + 1 + end + end +end +messagetable:add(0x0427, setlocaloperatingzone_0427) + +querylocaloperatingzone_2427 = Proto("querylocaloperatingzone_2427", "QueryLocalOperatingZone 0x2427") +function querylocaloperatingzone_2427.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalOperatingZone", string.format("QueryLocalOperatingZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalOperatingZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_OperatingZoneRec_tree = body_tree:add("OperatingZoneRec") + local value_set = {[0] = "ALL_ZONES", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_OperatingZoneRec_tree:add(buffer(bufidx, 2), string.format("QueryZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 +end +messagetable:add(0x2427, querylocaloperatingzone_2427) + +reportlocaloperatingzone_4427 = Proto("reportlocaloperatingzone_4427", "ReportLocalOperatingZone 0x4427") +function reportlocaloperatingzone_4427.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalOperatingZone.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalOperatingZone", string.format("ReportLocalOperatingZone, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalOperatingZone")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalOperatingZoneSeq_tree = body_tree:add("LocalOperatingZoneSeq") + local bufidx_start_body_LocalOperatingZoneSeq = bufidx + local body_LocalOperatingZoneSeq_LocalOperatingZone_tree = body_LocalOperatingZoneSeq_tree:add(buffer(bufidx_start_body_LocalOperatingZoneSeq, buffer:len() - bufidx_start_body_LocalOperatingZoneSeq), "LocalOperatingZone ") + body_LocalOperatingZoneSeq_LocalOperatingZone_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LocalOperatingZoneSeq_LocalOperatingZone_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_LocalOperatingZoneSeq_counter=1,body_LocalOperatingZoneSeq_LocalOperatingZone_count do + local body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_tree:add(string.format("LocalPolygonPointRec_%d", body_LocalOperatingZoneSeq_counter - 1)) + local body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count = 0 + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv, body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count + 1 + if (bitAND(body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv, body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count = body_LocalOperatingZoneSeq_LocalOperatingZone_LocalPolygonPointRec_pv_count + 1 + end + local bufidx_start_body_LocalOperatingZoneSeq = bufidx + local body_LocalOperatingZoneSeq_LocalExclusionZones_tree = body_LocalOperatingZoneSeq_tree:add(buffer(bufidx_start_body_LocalOperatingZoneSeq, buffer:len() - bufidx_start_body_LocalOperatingZoneSeq), "LocalExclusionZones ") + body_LocalOperatingZoneSeq_LocalExclusionZones_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LocalOperatingZoneSeq_LocalExclusionZones_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_LocalOperatingZoneSeq_counter=1,body_LocalOperatingZoneSeq_LocalExclusionZones_count do + local bufidx_start_body_LocalOperatingZoneSeq_LocalExclusionZones = bufidx + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_tree:add(buffer(bufidx_start_body_LocalOperatingZoneSeq_LocalExclusionZones, buffer:len() - bufidx_start_body_LocalOperatingZoneSeq_LocalExclusionZones), "LocalExclusionZone ") + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_LocalOperatingZoneSeq_LocalExclusionZones_counter=1,body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_count do + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_tree:add(string.format("LocalExclusionZoneSeq_%d", body_LocalOperatingZoneSeq_LocalExclusionZones_counter - 1)) + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalExclusionZoneRec_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_tree:add("LocalExclusionZoneRec") + local value_set = {[0] = "RESERVED", [1] = "OPERATING_ZONE"} + local value_id, value_name = (value_set[buffer(bufidx, 2):le_uint()]) + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalExclusionZoneRec_tree:add(buffer(bufidx, 2), string.format("ZoneID: %d [%s] -- (unsigned short integer)", buffer(bufidx, 2):le_uint(), value_id)) + bufidx = bufidx + 2 + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_tree:add("LocalPolygonPointRec") + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count = 0 + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv, body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MinZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MinZPosition: %d %s", value, unit_list(type_value))) + MinZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count + 1 + if (bitAND(body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv, body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local MaxZPosition_tree = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("MaxZPosition: %d %s", value, unit_list(type_value))) + MaxZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count = body_LocalOperatingZoneSeq_LocalExclusionZones_LocalExclusionZone_LocalExclusionZoneSeq_LocalPolygonPointRec_pv_count + 1 + end + end +end +messagetable:add(0x4427, reportlocaloperatingzone_4427) + +querylocalpathsegment_2410 = Proto("querylocalpathsegment_2410", "QueryLocalPathSegment 0x2410") +function querylocalpathsegment_2410.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalPathSegment", string.format("QueryLocalPathSegment, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalPathSegment")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryLocalPathSegmentRec_tree = body_tree:add("QueryLocalPathSegmentRec") + body_QueryLocalPathSegmentRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Local Path Segment Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2410, querylocalpathsegment_2410) + +querylocalpathsegmentext_24b0 = Proto("querylocalpathsegmentext_24b0", "QueryLocalPathSegmentExt 0x24b0") +function querylocalpathsegmentext_24b0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalPathSegmentExt", string.format("QueryLocalPathSegmentExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalPathSegmentExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryLocalPathSegmentExtRec_tree = body_tree:add("QueryLocalPathSegmentExtRec") + body_QueryLocalPathSegmentExtRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Local Path Segment Ext Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x24B0, querylocalpathsegmentext_24b0) + +reportlocalpathsegment_4410 = Proto("reportlocalpathsegment_4410", "ReportLocalPathSegment 0x4410") +function reportlocalpathsegment_4410.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalPathSegment", string.format("ReportLocalPathSegment, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalPathSegment")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalPathSegmentRec_tree = body_tree:add("LocalPathSegmentRec") + local body_LocalPathSegmentRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalPathSegmentRec_pv_count = 0 + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P1_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P1_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalPathSegmentRec_pv, body_LocalPathSegmentRec_pv_count) > 0) then + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P1_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPathSegmentRec_pv_count = body_LocalPathSegmentRec_pv_count + 1 + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P2_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P2_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalPathSegmentRec_pv, body_LocalPathSegmentRec_pv_count) > 0) then + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("P2_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPathSegmentRec_pv_count = body_LocalPathSegmentRec_pv_count + 1 + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 2), string.format("WeightingFactor: %.4f (scaled) -- (unsigned short integer) A value of zero (0) is a straight line", buffer(bufidx, 2):le_uint() * 0.007629510948 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_LocalPathSegmentRec_pv, body_LocalPathSegmentRec_pv_count) > 0) then + body_LocalPathSegmentRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) -- (unsigned integer) A value of zero (0) is used for infinite tolerance", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPathSegmentRec_pv_count = body_LocalPathSegmentRec_pv_count + 1 +end +messagetable:add(0x4410, reportlocalpathsegment_4410) + +reportlocalpathsegmentext_44b0 = Proto("reportlocalpathsegmentext_44b0", "ReportLocalPathSegmentExt 0x44b0") +function reportlocalpathsegmentext_44b0.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPathSegmentDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalPathSegmentExt", string.format("ReportLocalPathSegmentExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalPathSegmentExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalPathSegmentExtRec_tree = body_tree:add("LocalPathSegmentExtRec") + local body_LocalPathSegmentExtRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalPathSegmentExtRec_pv_count = 0 + body_LocalPathSegmentExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("P1_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("P1_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalPathSegmentExtRec_pv, body_LocalPathSegmentExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local P1_ZPosition_tree = body_LocalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P1_ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + P1_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local P1_ZPosition_tree = body_LocalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P1_ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + P1_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local P1_ZPosition_tree = body_LocalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P1_ZPosition: %d %s", value, unit_list(type_value))) + P1_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalPathSegmentExtRec_pv_count = body_LocalPathSegmentExtRec_pv_count + 1 + body_LocalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("P2_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("P2_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalPathSegmentExtRec_pv, body_LocalPathSegmentExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local P2_ZPosition_tree = body_LocalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P2_ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + P2_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local P2_ZPosition_tree = body_LocalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P2_ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + P2_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local P2_ZPosition_tree = body_LocalPathSegmentExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("P2_ZPosition: %d %s", value, unit_list(type_value))) + P2_ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalPathSegmentExtRec_pv_count = body_LocalPathSegmentExtRec_pv_count + 1 + body_LocalPathSegmentExtRec_tree:add(buffer(bufidx, 2), string.format("WeightingFactor: %.4f (scaled) -- (unsigned short integer) A value of zero (0) is a straight line", buffer(bufidx, 2):le_uint() * 0.007629510948 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_LocalPathSegmentExtRec_pv, body_LocalPathSegmentExtRec_pv_count) > 0) then + body_LocalPathSegmentExtRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) -- (unsigned integer) A value of zero (0) is used for infinite tolerance", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPathSegmentExtRec_pv_count = body_LocalPathSegmentExtRec_pv_count + 1 +end +messagetable:add(0x44B0, reportlocalpathsegmentext_44b0) + +setlocalpose_0403 = Proto("setlocalpose_0403", "SetLocalPose 0x0403") +function setlocalpose_0403.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLocalPose", string.format("SetLocalPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLocalPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalPoseRec_tree = body_tree:add("LocalPoseRec") + local body_LocalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_LocalPoseRec_pv_count = 0 + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + local body_LocalPoseRec_TimeStamp_buf = buffer(bufidx, 4) + local body_LocalPoseRec_TimeStamp_tree = body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32), body_LocalPoseRec_TimeStamp_buf:le_uint())) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 0, 9))) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 10, 15))) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 16, 21))) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 22, 26))) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 +end +messagetable:add(0x0403, setlocalpose_0403) + +setlocalposeext_04a3 = Proto("setlocalposeext_04a3", "SetLocalPoseExt 0x04a3") +function setlocalposeext_04a3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLocalPoseExt", string.format("SetLocalPoseExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLocalPoseExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalPoseExtRec_tree = body_tree:add("LocalPoseExtRec") + local body_LocalPoseExtRec_pv = buffer(bufidx, 2):le_uint() + local body_LocalPoseExtRec_pv_count = 0 + body_LocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_LocalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_LocalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_LocalPoseExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 + if (bitAND(body_LocalPoseExtRec_pv, body_LocalPoseExtRec_pv_count) > 0) then + body_LocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_LocalPoseExtRec_pv_count = body_LocalPoseExtRec_pv_count + 1 +end +messagetable:add(0x04A3, setlocalposeext_04a3) + +querylocalpose_2403 = Proto("querylocalpose_2403", "QueryLocalPose 0x2403") +function querylocalpose_2403.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalPose", string.format("QueryLocalPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryLocalPoseRec_tree = body_tree:add("QueryLocalPoseRec") + body_QueryLocalPoseRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Local Pose Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x2403, querylocalpose_2403) + +querylocalposeext_24a3 = Proto("querylocalposeext_24a3", "QueryLocalPoseExt 0x24a3") +function querylocalposeext_24a3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalPoseExt", string.format("QueryLocalPoseExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalPoseExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryLocalPoseExtRec_tree = body_tree:add("QueryLocalPoseExtRec") + body_QueryLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Local Pose Ext Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x24A3, querylocalposeext_24a3) + +reportlocalpose_4403 = Proto("reportlocalpose_4403", "ReportLocalPose 0x4403") +function reportlocalpose_4403.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalPose", string.format("ReportLocalPose, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalPose")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalPoseRec_tree = body_tree:add("LocalPoseRec") + local body_LocalPoseRec_pv = buffer(bufidx, 2):le_uint() + local body_LocalPoseRec_pv_count = 0 + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("Position_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + body_LocalPoseRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 + if (bitAND(body_LocalPoseRec_pv, body_LocalPoseRec_pv_count) > 0) then + local body_LocalPoseRec_TimeStamp_buf = buffer(bufidx, 4) + local body_LocalPoseRec_TimeStamp_tree = body_LocalPoseRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32), body_LocalPoseRec_TimeStamp_buf:le_uint())) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 0, 9))) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 10, 15))) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 16, 21))) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 22, 26))) + body_LocalPoseRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_LocalPoseRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_LocalPoseRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_LocalPoseRec_pv_count = body_LocalPoseRec_pv_count + 1 +end +messagetable:add(0x4403, reportlocalpose_4403) + +reportlocalposeext_44a3 = Proto("reportlocalposeext_44a3", "ReportLocalPoseExt 0x44a3") +function reportlocalposeext_44a3.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalPoseSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalPoseExt", string.format("ReportLocalPoseExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalPoseExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportLocalPoseExtRec_tree = body_tree:add("ReportLocalPoseExtRec") + local body_ReportLocalPoseExtRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportLocalPoseExtRec_pv_count = 0 + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeAGL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeMSL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeASF: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Depth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("ZLocal: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_ReportLocalPoseExtRec_pv, body_ReportLocalPoseExtRec_pv_count) > 0) then + body_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportLocalPoseExtRec_pv_count = body_ReportLocalPoseExtRec_pv_count + 1 +end +messagetable:add(0x44A3, reportlocalposeext_44a3) + +setlocalvector_0408 = Proto("setlocalvector_0408", "SetLocalVector 0x0408") +function setlocalvector_0408.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLocalVector", string.format("SetLocalVector, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLocalVector")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalVectorRec_tree = body_tree:add("LocalVectorRec") + local body_LocalVectorRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalVectorRec_pv_count = 0 + body_LocalVectorRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalVectorRec_tree:add(buffer(bufidx, 2), string.format("Speed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_LocalVectorRec_pv, body_LocalVectorRec_pv_count) > 0) then + body_LocalVectorRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalVectorRec_pv_count = body_LocalVectorRec_pv_count + 1 + if (bitAND(body_LocalVectorRec_pv, body_LocalVectorRec_pv_count) > 0) then + body_LocalVectorRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorRec_pv_count = body_LocalVectorRec_pv_count + 1 + if (bitAND(body_LocalVectorRec_pv, body_LocalVectorRec_pv_count) > 0) then + body_LocalVectorRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorRec_pv_count = body_LocalVectorRec_pv_count + 1 + if (bitAND(body_LocalVectorRec_pv, body_LocalVectorRec_pv_count) > 0) then + body_LocalVectorRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorRec_pv_count = body_LocalVectorRec_pv_count + 1 +end +messagetable:add(0x0408, setlocalvector_0408) + +setlocalvectorext_04a8 = Proto("setlocalvectorext_04a8", "SetLocalVectorExt 0x04a8") +function setlocalvectorext_04a8.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLocalVectorExt", string.format("SetLocalVectorExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLocalVectorExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalVectorExtRec_tree = body_tree:add("LocalVectorExtRec") + local body_LocalVectorExtRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalVectorExtRec_pv_count = 0 + body_LocalVectorExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 2, [1] = 2, [2] = 2, [3] = 2} + local unit_set = {[0] = "meter per second", [1] = "meter per second", [2] = "rotations per minute", [3] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -327, [1] = -327, [2] = -1000, [3] = -327} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Speed_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Speed_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Speed_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + body_LocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + body_LocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + body_LocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + body_LocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 +end +messagetable:add(0x04A8, setlocalvectorext_04a8) + +querylocalvector_2408 = Proto("querylocalvector_2408", "QueryLocalVector 0x2408") +function querylocalvector_2408.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalVector", string.format("QueryLocalVector, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalVector")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryLocalVectorRec_tree = body_tree:add("QueryLocalVectorRec") + body_QueryLocalVectorRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Local Vector Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2408, querylocalvector_2408) + +querylocalvectorext_24a8 = Proto("querylocalvectorext_24a8", "QueryLocalVectorExt 0x24a8") +function querylocalvectorext_24a8.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalVectorExt", string.format("QueryLocalVectorExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalVectorExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryLocalVectorExtRec_tree = body_tree:add("QueryLocalVectorExtRec") + body_QueryLocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Local Vector Ext Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x24A8, querylocalvectorext_24a8) + +reportlocalvector_4408 = Proto("reportlocalvector_4408", "ReportLocalVector 0x4408") +function reportlocalvector_4408.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalVector", string.format("ReportLocalVector, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalVector")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalVectorRec_tree = body_tree:add("LocalVectorRec") + local body_LocalVectorRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalVectorRec_pv_count = 0 + body_LocalVectorRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalVectorRec_tree:add(buffer(bufidx, 2), string.format("Speed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.004999923705 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_LocalVectorRec_pv, body_LocalVectorRec_pv_count) > 0) then + body_LocalVectorRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000010477379 + (-10000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalVectorRec_pv_count = body_LocalVectorRec_pv_count + 1 + if (bitAND(body_LocalVectorRec_pv, body_LocalVectorRec_pv_count) > 0) then + body_LocalVectorRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorRec_pv_count = body_LocalVectorRec_pv_count + 1 + if (bitAND(body_LocalVectorRec_pv, body_LocalVectorRec_pv_count) > 0) then + body_LocalVectorRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorRec_pv_count = body_LocalVectorRec_pv_count + 1 + if (bitAND(body_LocalVectorRec_pv, body_LocalVectorRec_pv_count) > 0) then + body_LocalVectorRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorRec_pv_count = body_LocalVectorRec_pv_count + 1 +end +messagetable:add(0x4408, reportlocalvector_4408) + +reportlocalvectorext_44a8 = Proto("reportlocalvectorext_44a8", "ReportLocalVectorExt 0x44a8") +function reportlocalvectorext_44a8.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalVectorDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalVectorExt", string.format("ReportLocalVectorExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalVectorExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalVectorExtRec_tree = body_tree:add("LocalVectorExtRec") + local body_LocalVectorExtRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalVectorExtRec_pv_count = 0 + body_LocalVectorExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local types_set = {[0] = 2, [1] = 2, [2] = 2, [3] = 2} + local unit_set = {[0] = "meter per second", [1] = "meter per second", [2] = "rotations per minute", [3] = "meter per second"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0} + local bias_set_tabe = {[0] = -327, [1] = -327, [2] = -1000, [3] = -327} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local Speed_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local Speed_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local Speed_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("Speed: %d %s", value, unit_list(type_value))) + Speed_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_LocalVectorExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + body_LocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + body_LocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + body_LocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 + if (bitAND(body_LocalVectorExtRec_pv, body_LocalVectorExtRec_pv_count) > 0) then + body_LocalVectorExtRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalVectorExtRec_pv_count = body_LocalVectorExtRec_pv_count + 1 +end +messagetable:add(0x44A8, reportlocalvectorext_44a8) + +setlocalwaypoint_040d = Proto("setlocalwaypoint_040d", "SetLocalWaypoint 0x040d") +function setlocalwaypoint_040d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLocalWaypoint", string.format("SetLocalWaypoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLocalWaypoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalWaypointRec_tree = body_tree:add("LocalWaypointRec") + local body_LocalWaypointRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalWaypointRec_pv_count = 0 + body_LocalWaypointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalWaypointRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_LocalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 2), string.format("WaypointTolerance: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) -- (unsigned integer) A value of zero (0) is used for infinite tolerance", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 +end +messagetable:add(0x040D, setlocalwaypoint_040d) + +setlocalwaypointext_04ad = Proto("setlocalwaypointext_04ad", "SetLocalWaypointExt 0x04ad") +function setlocalwaypointext_04ad.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetLocalWaypointExt", string.format("SetLocalWaypointExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetLocalWaypointExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalWaypointExtRec_tree = body_tree:add("LocalWaypointExtRec") + local body_LocalWaypointExtRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalWaypointExtRec_pv_count = 0 + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_LocalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_LocalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_LocalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("WaypointTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000002328306 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 +end +messagetable:add(0x04AD, setlocalwaypointext_04ad) + +querylocalwaypoint_240d = Proto("querylocalwaypoint_240d", "QueryLocalWaypoint 0x240d") +function querylocalwaypoint_240d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalWaypoint", string.format("QueryLocalWaypoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalWaypoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryLocalWaypointRec_tree = body_tree:add("QueryLocalWaypointRec") + body_QueryLocalWaypointRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Local Waypoint Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x240D, querylocalwaypoint_240d) + +querylocalwaypointext_24ad = Proto("querylocalwaypointext_24ad", "QueryLocalWaypointExt 0x24ad") +function querylocalwaypointext_24ad.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryLocalWaypointExt", string.format("QueryLocalWaypointExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryLocalWaypointExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryLocalWaypointExtRec_tree = body_tree:add("QueryLocalWaypointExtRec") + body_QueryLocalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Local Waypoint Ext Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x24AD, querylocalwaypointext_24ad) + +reportlocalwaypoint_440d = Proto("reportlocalwaypoint_440d", "ReportLocalWaypoint 0x440d") +function reportlocalwaypoint_440d.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalWaypoint", string.format("ReportLocalWaypoint, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalWaypoint")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalWaypointRec_tree = body_tree:add("LocalWaypointRec") + local body_LocalWaypointRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalWaypointRec_pv_count = 0 + body_LocalWaypointRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalWaypointRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + body_LocalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 4), string.format("Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000046566129 + (-100000.000000000000))) + bufidx = bufidx + 4 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 2), string.format("Yaw: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 2), string.format("WaypointTolerance: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 + if (bitAND(body_LocalWaypointRec_pv, body_LocalWaypointRec_pv_count) > 0) then + body_LocalWaypointRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) -- (unsigned integer) A value of zero (0) is used for infinite tolerance", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalWaypointRec_pv_count = body_LocalWaypointRec_pv_count + 1 +end +messagetable:add(0x440D, reportlocalwaypoint_440d) + +reportlocalwaypointext_44ad = Proto("reportlocalwaypointext_44ad", "ReportLocalWaypointExt 0x44ad") +function reportlocalwaypointext_44ad.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_LocalWaypointDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportLocalWaypointExt", string.format("ReportLocalWaypointExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportLocalWaypointExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_LocalWaypointExtRec_tree = body_tree:add("LocalWaypointExtRec") + local body_LocalWaypointExtRec_pv = buffer(bufidx, 1):le_uint() + local body_LocalWaypointExtRec_pv_count = 0 + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + local types_set = {[0] = 4, [1] = 4, [2] = 4, [3] = 4, [4] = 4} + local unit_set = {[0] = "meter", [1] = "meter", [2] = "meter", [3] = "meter", [4] = "meter"} + local type_value = buffer(bufidx, 1):le_uint() + local value = buffer(bufidx+1, types_list(type_value)):le_uint() + -- check for value_set or scale options + local value_set_tabe = {} + local scale_set_tabe = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0} + local bias_set_tabe = {[0] = -50000, [1] = -50000, [2] = -50000, [3] = -50000, [4] = -50000} + local value_set = value_set_tabe(type_value) + local scale = scale_set_tabe(type_value) + local bias = bias_set_tabe(type_value) + if (value_set ~= nil) then + -- value_set: NOT implemented + local ZPosition_tree = body_LocalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s (VALUE_SET defined, but interpreted)", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + elseif (scale ~= nil) then + local ZPosition_tree = body_LocalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %.4f (scaled) %s", value * scale + bias, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + else + local ZPosition_tree = body_LocalWaypointExtRec_tree:add(buffer(bufidx+1, types_list(type_value)), string.format("ZPosition: %d %s", value, unit_list(type_value))) + ZPosition_tree:add(buffer(bufidx, 1), string.format("index: %d", type_value)) + end + -- increase index for type_and_units_field + bufidx = bufidx + 1 + -- increase index for contained type + bufidx = bufidx + types_list(type_value) + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("WaypointTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000002328306 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 + if (bitAND(body_LocalWaypointExtRec_pv, body_LocalWaypointExtRec_pv_count) > 0) then + body_LocalWaypointExtRec_tree:add(buffer(bufidx, 4), string.format("PathTolerance: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_LocalWaypointExtRec_pv_count = body_LocalWaypointExtRec_pv_count + 1 +end +messagetable:add(0x44AD, reportlocalwaypointext_44ad) + +querynavigation_2421 = Proto("querynavigation_2421", "QueryNavigation 0x2421") +function querynavigation_2421.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_NavigationState.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryNavigation", string.format("QueryNavigation, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryNavigation")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryNavigationRec_tree = body_tree:add("QueryNavigationRec") + body_QueryNavigationRec_tree:add(buffer(bufidx, 2), string.format("GlobalPosePresenceVector: %d -- (unsigned short integer) See Report Global Pose Ext State Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_QueryNavigationRec_tree:add(buffer(bufidx, 2), string.format("LocalPosePresenceVector: %d -- (unsigned short integer) See Report Local Pose Ext State Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_QueryNavigationRec_tree:add(buffer(bufidx, 2), string.format("VelocityStatePresenceVector: %d -- (unsigned short integer) See Report Velocity State Ext State Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + body_QueryNavigationRec_tree:add(buffer(bufidx, 2), string.format("AccelerationStatePresenceVector: %d -- (unsigned short integer) See Report Acceleration State Ext State Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x2421, querynavigation_2421) + +reportnavigation_4421 = Proto("reportnavigation_4421", "ReportNavigation 0x4421") +function reportnavigation_4421.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_NavigationState.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportNavigation", string.format("ReportNavigation, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportNavigation")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_NavigationSeq_tree = body_tree:add("NavigationSeq") + local body_NavigationSeq_SyncTimeRec_tree = body_NavigationSeq_tree:add("SyncTimeRec") + body_NavigationSeq_SyncTimeRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970. If all data is captured simultaneously, this is the capture time. Otherwise, it is the time when the disparate data is combined.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + body_NavigationSeq_SyncTimeRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time. If all data is captured simultaneously, this is the capture time. Otherwise, it is the time when the disparate data is combined.", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + local body_NavigationSeq_ReportGlobalPoseExtRec_tree = body_NavigationSeq_tree:add("ReportGlobalPoseExtRec") + local body_NavigationSeq_ReportGlobalPoseExtRec_pv = buffer(bufidx, 2):le_uint() + local body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = 0 + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Latitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000041910 + (-90.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Longitude: %.4f (scaled) -- (unsigned integer) Decimal degrees", buffer(bufidx, 4):le_uint() * 0.000000083819 + (-180.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeAGL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeMSL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeASF: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Depth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportGlobalPoseExtRec_pv, body_NavigationSeq_ReportGlobalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportGlobalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportGlobalPoseExtRec_pv_count = body_NavigationSeq_ReportGlobalPoseExtRec_pv_count + 1 + local body_NavigationSeq_ReportLocalPoseExtRec_tree = body_NavigationSeq_tree:add("ReportLocalPoseExtRec") + local body_NavigationSeq_ReportLocalPoseExtRec_pv = buffer(bufidx, 2):le_uint() + local body_NavigationSeq_ReportLocalPoseExtRec_pv_count = 0 + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.009313225748 + (-20000000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeAGL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeMSL: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("AltitudeASF: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("Depth: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("ZLocal: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000023283064 + (-50000.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("XYPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("ZPositionRMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the position data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Roll: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Pitch: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Heading: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Attitude_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the orientation data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 2), string.format("Course: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportLocalPoseExtRec_pv, body_NavigationSeq_ReportLocalPoseExtRec_pv_count) > 0) then + body_NavigationSeq_ReportLocalPoseExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportLocalPoseExtRec_pv_count = body_NavigationSeq_ReportLocalPoseExtRec_pv_count + 1 + local body_NavigationSeq_ReportVelocityStateExtSeq_tree = body_NavigationSeq_tree:add("ReportVelocityStateExtSeq") + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_tree = body_NavigationSeq_ReportVelocityStateExtSeq_tree:add("VelocityVar") + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_NavigationSeq_ReportVelocityStateExtSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_NavigationSeq_ReportVelocityStateExtSeq_index == 0) then + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_tree:add("VelocityVehicleXYZRec-- Velocity measured in platform frame") + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv = buffer(bufidx, 1):le_uint() + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count = 0 + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count + 1 + end + if (body_NavigationSeq_ReportVelocityStateExtSeq_index == 1) then + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_tree:add("VelocityLocalXYZRec-- Velocity measured in local coordinate frame") + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv = buffer(bufidx, 1):le_uint() + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count = 0 + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count + 1 + end + if (body_NavigationSeq_ReportVelocityStateExtSeq_index == 2) then + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_tree:add("VelocityNEDRec-- Velocity measured in global (north, east, down) coordinate frame") + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv = buffer(bufidx, 1):le_uint() + local body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count = 0 + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree:add(buffer(bufidx, 4), string.format("Velocity_N: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree:add(buffer(bufidx, 4), string.format("Velocity_E: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree:add(buffer(bufidx, 4), string.format("Velocity_D: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count + 1 + end + local body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree = body_NavigationSeq_ReportVelocityStateExtSeq_tree:add("ReportVelocityStateExtRec") + local body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv = buffer(bufidx, 2):le_uint() + local body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = 0 + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("Velocity_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the velocity data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("Rate_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the rotational velocity data.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("SpeedOverGround: %.4f (scaled) -- (unsigned short integer) Scalar speed measured relative to fixed coordinate system", buffer(bufidx, 2):le_uint() * 0.010000000000 + (-327.680000000000))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("SpeedRelativeToMedium: %.4f (scaled) -- (unsigned short integer) Scalar speed measured relative to medium, such as air or water currents", buffer(bufidx, 2):le_uint() * 0.010000000000 + (-327.680000000000))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("RotationsPerMinute: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.030518043793 + (-1000.000000000000))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("IndicatedSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.010000000000 + (-327.680000000000))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_NavigationSeq_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + local body_NavigationSeq_ReportAccelerationStateExtRec_tree = body_NavigationSeq_tree:add("ReportAccelerationStateExtRec") + local body_NavigationSeq_ReportAccelerationStateExtRec_pv = buffer(bufidx, 2):le_uint() + local body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = 0 + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the acceleration data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("RollAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("PitchAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("YawAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 2), string.format("RotationalAcceleration_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the rotational acceleration data.", buffer(bufidx, 2):le_uint() * 0.015259021897 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 + if (bitAND(body_NavigationSeq_ReportAccelerationStateExtRec_pv, body_NavigationSeq_ReportAccelerationStateExtRec_pv_count) > 0) then + body_NavigationSeq_ReportAccelerationStateExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_NavigationSeq_ReportAccelerationStateExtRec_pv_count = body_NavigationSeq_ReportAccelerationStateExtRec_pv_count + 1 +end +messagetable:add(0x4421, reportnavigation_4421) + +setwrencheffort_0405 = Proto("setwrencheffort_0405", "SetWrenchEffort 0x0405") +function setwrencheffort_0405.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_PrimitiveDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetWrenchEffort", string.format("SetWrenchEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetWrenchEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_WrenchEffortRec_tree = body_tree:add("WrenchEffortRec") + local body_WrenchEffortRec_pv = buffer(bufidx, 2):le_uint() + local body_WrenchEffortRec_pv_count = 0 + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveLinearEffortX: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveLinearEffortY: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveLinearEffortZ: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveRotationalEffortX: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveRotationalEffortY: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveRotationalEffortZ: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveLinearEffortX: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveLinearEffortY: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveLinearEffortZ: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveRotationalEffortX: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveRotationalEffortY: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveRotationalEffortZ: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 +end +messagetable:add(0x0405, setwrencheffort_0405) + +querywrencheffort_2405 = Proto("querywrencheffort_2405", "QueryWrenchEffort 0x2405") +function querywrencheffort_2405.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_PrimitiveDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryWrenchEffort", string.format("QueryWrenchEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryWrenchEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryWrenchEffortRec_tree = body_tree:add("QueryWrenchEffortRec") + body_QueryWrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Wrench Effort Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x2405, querywrencheffort_2405) + +reportwrencheffort_4405 = Proto("reportwrencheffort_4405", "ReportWrenchEffort 0x4405") +function reportwrencheffort_4405.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_PrimitiveDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportWrenchEffort", string.format("ReportWrenchEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportWrenchEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_WrenchEffortRec_tree = body_tree:add("WrenchEffortRec") + local body_WrenchEffortRec_pv = buffer(bufidx, 2):le_uint() + local body_WrenchEffortRec_pv_count = 0 + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveLinearEffortX: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveLinearEffortY: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveLinearEffortZ: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveRotationalEffortX: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveRotationalEffortY: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 2), string.format("PropulsiveRotationalEffortZ: %.4f (scaled) -- (unsigned short integer) Measured as a percent of maximum", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveLinearEffortX: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveLinearEffortY: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveLinearEffortZ: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveRotationalEffortX: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveRotationalEffortY: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 + if (bitAND(body_WrenchEffortRec_pv, body_WrenchEffortRec_pv_count) > 0) then + body_WrenchEffortRec_tree:add(buffer(bufidx, 1), string.format("ResistiveRotationalEffortZ: %.4f (scaled) -- (unsigned byte) Measured as a percent of maximum", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_WrenchEffortRec_pv_count = body_WrenchEffortRec_pv_count + 1 +end +messagetable:add(0x4405, reportwrencheffort_4405) + +setvelocitycommand_0415 = Proto("setvelocitycommand_0415", "SetVelocityCommand 0x0415") +function setvelocitycommand_0415.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetVelocityCommand", string.format("SetVelocityCommand, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetVelocityCommand")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_VelocityCommandRec_tree = body_tree:add("VelocityCommandRec") + local body_VelocityCommandRec_pv = buffer(bufidx, 1):le_uint() + local body_VelocityCommandRec_pv_count = 0 + body_VelocityCommandRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SetCurrentCommand", [1] = "SetMaxAllowed", [2] = "SetMinAllowed", [3] = "SetDefaultCommand"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VelocityCommandRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 2), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 2), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 2), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 +end +messagetable:add(0x0415, setvelocitycommand_0415) + +setvelocitycommandext_04b5 = Proto("setvelocitycommandext_04b5", "SetVelocityCommandExt 0x04b5") +function setvelocitycommandext_04b5.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetVelocityCommandExt", string.format("SetVelocityCommandExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetVelocityCommandExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_VelocityCommandExtRec_tree = body_tree:add("VelocityCommandExtRec") + local body_VelocityCommandExtRec_pv = buffer(bufidx, 1):le_uint() + local body_VelocityCommandExtRec_pv_count = 0 + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SetCmdSOG", [1] = "SetMaxSOG", [2] = "SetMinSOG", [3] = "SetDefaultSOG", [4] = "SetCmdSRM", [5] = "SetMaxSRM", [6] = "SetMinSRM", [7] = "SetDefaultSRM"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 +end +messagetable:add(0x04B5, setvelocitycommandext_04b5) + +setaccelerationlimit_0416 = Proto("setaccelerationlimit_0416", "SetAccelerationLimit 0x0416") +function setaccelerationlimit_0416.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetAccelerationLimit", string.format("SetAccelerationLimit, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetAccelerationLimit")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_AccelerationLimitRec_tree = body_tree:add("AccelerationLimitRec") + local body_AccelerationLimitRec_pv = buffer(bufidx, 1):le_uint() + local body_AccelerationLimitRec_pv_count = 0 + body_AccelerationLimitRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[1] = "MaxAccel", [2] = "MaxDecel"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_AccelerationLimitRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("RollAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("PitchAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("YawAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 +end +messagetable:add(0x0416, setaccelerationlimit_0416) + +queryvelocitycommand_2415 = Proto("queryvelocitycommand_2415", "QueryVelocityCommand 0x2415") +function queryvelocitycommand_2415.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVelocityCommand", string.format("QueryVelocityCommand, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVelocityCommand")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryVelocityCommandRec_tree = body_tree:add("QueryVelocityCommandRec") + body_QueryVelocityCommandRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Velocity State Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_QueryVelocityCommandRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d -- (unsigned byte) See Report Velocity State Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2415, queryvelocitycommand_2415) + +queryvelocitycommandext_24b5 = Proto("queryvelocitycommandext_24b5", "QueryVelocityCommandExt 0x24b5") +function queryvelocitycommandext_24b5.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVelocityCommandExt", string.format("QueryVelocityCommandExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVelocityCommandExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryVelocityCommandExtRec_tree = body_tree:add("QueryVelocityCommandExtRec") + body_QueryVelocityCommandExtRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Velocity State Ext Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_QueryVelocityCommandExtRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d -- (unsigned byte) See Report Velocity State Ext Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x24B5, queryvelocitycommandext_24b5) + +queryaccelerationlimit_2416 = Proto("queryaccelerationlimit_2416", "QueryAccelerationLimit 0x2416") +function queryaccelerationlimit_2416.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAccelerationLimit", string.format("QueryAccelerationLimit, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAccelerationLimit")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryAccelerationLimitRec_tree = body_tree:add("QueryAccelerationLimitRec") + body_QueryAccelerationLimitRec_tree:add(buffer(bufidx, 1), string.format("PresenceVector: %d -- (unsigned byte) See Report Acceleration Limit Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_QueryAccelerationLimitRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d -- (unsigned byte) See Report Acceleration Limit Message", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 +end +messagetable:add(0x2416, queryaccelerationlimit_2416) + +reportvelocitycommand_4415 = Proto("reportvelocitycommand_4415", "ReportVelocityCommand 0x4415") +function reportvelocitycommand_4415.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVelocityCommand", string.format("ReportVelocityCommand, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVelocityCommand")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_VelocityCommandRec_tree = body_tree:add("VelocityCommandRec") + local body_VelocityCommandRec_pv = buffer(bufidx, 1):le_uint() + local body_VelocityCommandRec_pv_count = 0 + body_VelocityCommandRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SetCurrentCommand", [1] = "SetMaxAllowed", [2] = "SetMinAllowed", [3] = "SetDefaultCommand"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VelocityCommandRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 2), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 2), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 + if (bitAND(body_VelocityCommandRec_pv, body_VelocityCommandRec_pv_count) > 0) then + body_VelocityCommandRec_tree:add(buffer(bufidx, 2), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_VelocityCommandRec_pv_count = body_VelocityCommandRec_pv_count + 1 +end +messagetable:add(0x4415, reportvelocitycommand_4415) + +reportvelocitycommandext_44b5 = Proto("reportvelocitycommandext_44b5", "ReportVelocityCommandExt 0x44b5") +function reportvelocitycommandext_44b5.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVelocityCommandExt", string.format("ReportVelocityCommandExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVelocityCommandExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_VelocityCommandExtRec_tree = body_tree:add("VelocityCommandExtRec") + local body_VelocityCommandExtRec_pv = buffer(bufidx, 1):le_uint() + local body_VelocityCommandExtRec_pv_count = 0 + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[0] = "SetCmdSOG", [1] = "SetMaxSOG", [2] = "SetMinSOG", [3] = "SetDefaultSOG", [4] = "SetCmdSRM", [5] = "SetMaxSRM", [6] = "SetMinSRM", [7] = "SetDefaultSRM"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 + if (bitAND(body_VelocityCommandExtRec_pv, body_VelocityCommandExtRec_pv_count) > 0) then + body_VelocityCommandExtRec_tree:add(buffer(bufidx, 4), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_VelocityCommandExtRec_pv_count = body_VelocityCommandExtRec_pv_count + 1 +end +messagetable:add(0x44B5, reportvelocitycommandext_44b5) + +reportaccelerationlimit_4416 = Proto("reportaccelerationlimit_4416", "ReportAccelerationLimit 0x4416") +function reportaccelerationlimit_4416.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAccelerationLimit", string.format("ReportAccelerationLimit, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAccelerationLimit")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_AccelerationLimitRec_tree = body_tree:add("AccelerationLimitRec") + local body_AccelerationLimitRec_pv = buffer(bufidx, 1):le_uint() + local body_AccelerationLimitRec_pv_count = 0 + body_AccelerationLimitRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[1] = "MaxAccel", [2] = "MaxDecel"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_AccelerationLimitRec_tree:add(buffer(bufidx, 1), string.format("CommandType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("Acceleration_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000610333 + (-1310.680000000000))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("RollAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("PitchAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 + if (bitAND(body_AccelerationLimitRec_pv, body_AccelerationLimitRec_pv_count) > 0) then + body_AccelerationLimitRec_tree:add(buffer(bufidx, 4), string.format("YawAcceleration: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000006103329 + (-13106.799999999999))) + bufidx = bufidx + 4 + end + body_AccelerationLimitRec_pv_count = body_AccelerationLimitRec_pv_count + 1 +end +messagetable:add(0x4416, reportaccelerationlimit_4416) + +queryvelocitystate_2404 = Proto("queryvelocitystate_2404", "QueryVelocityState 0x2404") +function queryvelocitystate_2404.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVelocityState", string.format("QueryVelocityState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVelocityState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryVelocityStateRec_tree = body_tree:add("QueryVelocityStateRec") + body_QueryVelocityStateRec_tree:add(buffer(bufidx, 2), string.format("PresenceVector: %d -- (unsigned short integer) See Report Velocity State Message", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x2404, queryvelocitystate_2404) + +queryvelocitystateext_24a4 = Proto("queryvelocitystateext_24a4", "QueryVelocityStateExt 0x24a4") +function queryvelocitystateext_24a4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryVelocityStateExt", string.format("QueryVelocityStateExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryVelocityStateExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_QueryVelocityStateExtRec_tree = body_tree:add("QueryVelocityStateExtRec") + body_QueryVelocityStateExtRec_tree:add(buffer(bufidx, 1), string.format("VelocityVarPresenceVector: %d -- (unsigned byte) Requested presence vector associated with the velocity variant", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_QueryVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("ReportVelocityStateExtRecPresenceVector: %d -- (unsigned short integer) Requested presence vector associated with the ReportVelocityStateExtRec", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 +end +messagetable:add(0x24A4, queryvelocitystateext_24a4) + +reportvelocitystate_4404 = Proto("reportvelocitystate_4404", "ReportVelocityState 0x4404") +function reportvelocitystate_4404.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVelocityState", string.format("ReportVelocityState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVelocityState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportVelocityStateRec_tree = body_tree:add("ReportVelocityStateRec") + local body_ReportVelocityStateRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportVelocityStateRec_pv_count = 0 + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 4), string.format("Velocity_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the velocity data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 2), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 2), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 2), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + body_ReportVelocityStateRec_tree:add(buffer(bufidx, 2), string.format("Rate_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the rotational velocity data.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateRec_pv, body_ReportVelocityStateRec_pv_count) > 0) then + local body_ReportVelocityStateRec_TimeStamp_buf = buffer(bufidx, 4) + local body_ReportVelocityStateRec_TimeStamp_tree = body_ReportVelocityStateRec_tree:add(buffer(bufidx, 4), string.format("%s = TimeStamp: 0x%X ", bitstr(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 32), body_ReportVelocityStateRec_TimeStamp_buf:le_uint())) + body_ReportVelocityStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Milliseconds: %d", bitstr_part(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 32, 0, 9), bitVal(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 0, 9))) + body_ReportVelocityStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Seconds: %d", bitstr_part(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 32, 10, 15), bitVal(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 10, 15))) + body_ReportVelocityStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Minutes: %d", bitstr_part(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 32, 16, 21), bitVal(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 16, 21))) + body_ReportVelocityStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Hour: %d", bitstr_part(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 32, 22, 26), bitVal(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 22, 26))) + body_ReportVelocityStateRec_TimeStamp_tree:add(buffer(bufidx, 4), string.format("%s = Day: %d", bitstr_part(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 32, 27, 31), bitVal(body_ReportVelocityStateRec_TimeStamp_buf:le_uint(), 27, 31))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateRec_pv_count = body_ReportVelocityStateRec_pv_count + 1 +end +messagetable:add(0x4404, reportvelocitystate_4404) + +reportvelocitystateext_44a4 = Proto("reportvelocitystateext_44a4", "ReportVelocityStateExt 0x44a4") +function reportvelocitystateext_44a4.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.mobility/urn_jaus_jss_mobility_VelocityStateSensor.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportVelocityStateExt", string.format("ReportVelocityStateExt, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportVelocityStateExt")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) A two byte field to hold the message ID of a message', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_ReportVelocityStateExtSeq_tree = body_tree:add("ReportVelocityStateExtSeq") + local body_ReportVelocityStateExtSeq_VelocityVar_tree = body_ReportVelocityStateExtSeq_tree:add("VelocityVar") + body_ReportVelocityStateExtSeq_VelocityVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 2", buffer(bufidx, 1):le_uint())) + local body_ReportVelocityStateExtSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_ReportVelocityStateExtSeq_index == 0) then + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree = body_ReportVelocityStateExtSeq_VelocityVar_tree:add("VelocityVehicleXYZRec-- Velocity measured in platform frame") + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count = 0 + body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityVehicleXYZRec_pv_count + 1 + end + if (body_ReportVelocityStateExtSeq_index == 1) then + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree = body_ReportVelocityStateExtSeq_VelocityVar_tree:add("VelocityLocalXYZRec-- Velocity measured in local coordinate frame") + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count = 0 + body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_X: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Y: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_tree:add(buffer(bufidx, 4), string.format("Velocity_Z: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityLocalXYZRec_pv_count + 1 + end + if (body_ReportVelocityStateExtSeq_index == 2) then + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree = body_ReportVelocityStateExtSeq_VelocityVar_tree:add("VelocityNEDRec-- Velocity measured in global (north, east, down) coordinate frame") + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv = buffer(bufidx, 1):le_uint() + local body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count = 0 + body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree:add(buffer(bufidx, 4), string.format("Velocity_N: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree:add(buffer(bufidx, 4), string.format("Velocity_E: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv, body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_tree:add(buffer(bufidx, 4), string.format("Velocity_D: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000152586 + (-327.680000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count = body_ReportVelocityStateExtSeq_VelocityVar_VelocityNEDRec_pv_count + 1 + end + local body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree = body_ReportVelocityStateExtSeq_tree:add("ReportVelocityStateExtRec") + local body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv = buffer(bufidx, 2):le_uint() + local body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = 0 + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("Velocity_RMS: %.4f (scaled) -- (unsigned integer) An RMS value indicating the validity of the velocity data.", buffer(bufidx, 4):le_uint() * 0.000000023283 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("RollRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("PitchRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("YawRate: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000000015259 + (-32.768000000000))) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("Rate_RMS: %.4f (scaled) -- (unsigned short integer) An RMS value indicating the validity of the rotational velocity data.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("SpeedOverGround: %.4f (scaled) -- (unsigned short integer) Scalar speed measured relative to fixed coordinate system", buffer(bufidx, 2):le_uint() * 0.010000000000 + (-327.680000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("SpeedRelativeToMedium: %.4f (scaled) -- (unsigned short integer) Scalar speed measured relative to medium, such as air or water currents", buffer(bufidx, 2):le_uint() * 0.010000000000 + (-327.680000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("RotationsPerMinute: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.030518043793 + (-1000.000000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 2), string.format("IndicatedSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.010000000000 + (-327.680000000000))) + bufidx = bufidx + 2 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("TimeSeconds: %d -- (unsigned integer) UTC POSIX-style time in seconds since 1 January 1970", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 + if (bitAND(body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv, body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count) > 0) then + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_tree:add(buffer(bufidx, 4), string.format("TimeNanoSeconds: %d -- (unsigned integer) Nanoseconds component of POSIX-style time", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 + end + body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count = body_ReportVelocityStateExtSeq_ReportVelocityStateExtRec_pv_count + 1 +end +messagetable:add(0x44A4, reportvelocitystateext_44a4) + +setackermannconfiguration_0500 = Proto("setackermannconfiguration_0500", "SetAckermannConfiguration 0x0500") +function setackermannconfiguration_0500.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_AckermannDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetAckermannConfiguration", string.format("SetAckermannConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetAckermannConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_AckermannData_tree = body_tree:add("AckermannData") + local body_AckermannData_pv = buffer(bufidx, 1):le_uint() + local body_AckermannData_pv_count = 0 + body_AckermannData_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_AckermannData_tree:add(buffer(bufidx, 2), string.format("SteeringAngle: %.4f (scaled) -- (unsigned short integer) The desired effective steering angle of the vehicle, as measured by a virtual wheel at the center of the front axle. Negative values cause the platform to turn left; positive values cause the vehice to turn right. Control systems that attach directly to the steering wheel/column may need to convert this value to a steering wheel position that achieves the desired steering angle.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (-1.570796326795))) + bufidx = bufidx + 2 + body_AckermannData_tree:add(buffer(bufidx, 2), string.format("ThrottleEffort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_AckermannData_tree:add(buffer(bufidx, 2), string.format("BrakeEffort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_AckermannData_pv, body_AckermannData_pv_count) > 0) then + body_AckermannData_tree:add(buffer(bufidx, 2), string.format("MaxSteeringRate: %.4f (scaled) -- (unsigned short integer) The absolute value of the maximum rate of change in the steering angle. Lower values result in more gradual steering changes.", buffer(bufidx, 2):le_uint() * 0.000499992370 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_AckermannData_pv_count = body_AckermannData_pv_count + 1 + if (bitAND(body_AckermannData_pv, body_AckermannData_pv_count) > 0) then + body_AckermannData_tree:add(buffer(bufidx, 2), string.format("MaxSteeringTorque: %.4f (scaled) -- (unsigned short integer) The absolute value of the maximum torque allowed to effect a change in steering angle, as experienced at the steering wheel. Lower values allow a human operator to override remote commands", buffer(bufidx, 2):le_uint() * 0.007629510948 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_AckermannData_pv_count = body_AckermannData_pv_count + 1 +end +messagetable:add(0x0500, setackermannconfiguration_0500) + +queryackermannconfiguration_2500 = Proto("queryackermannconfiguration_2500", "QueryAckermannConfiguration 0x2500") +function queryackermannconfiguration_2500.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_AckermannDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAckermannConfiguration", string.format("QueryAckermannConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAckermannConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2500, queryackermannconfiguration_2500) + +reportackermannconfiguration_4500 = Proto("reportackermannconfiguration_4500", "ReportAckermannConfiguration 0x4500") +function reportackermannconfiguration_4500.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_AckermannDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAckermannConfiguration", string.format("ReportAckermannConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAckermannConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_AckermannDataRec_tree = body_tree:add("AckermannDataRec") + local body_AckermannDataRec_pv = buffer(bufidx, 1):le_uint() + local body_AckermannDataRec_pv_count = 0 + body_AckermannDataRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + body_AckermannDataRec_tree:add(buffer(bufidx, 2), string.format("SteeringAngle: %.4f (scaled) -- (unsigned short integer) The desired effective steering angle of the vehicle, as measured by a virtual wheel at the center of the front axle. Negative values cause the platform to turn left; positive values cause the vehice to turn right. Control systems that attach directly to the steering wheel/column may need to convert this value to a steering wheel position that achieves the desired steering angle.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (-1.570796326795))) + bufidx = bufidx + 2 + body_AckermannDataRec_tree:add(buffer(bufidx, 2), string.format("ThrottleEffort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + body_AckermannDataRec_tree:add(buffer(bufidx, 2), string.format("BrakeEffort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum.", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + if (bitAND(body_AckermannDataRec_pv, body_AckermannDataRec_pv_count) > 0) then + body_AckermannDataRec_tree:add(buffer(bufidx, 2), string.format("SteeringRate: %.4f (scaled) -- (unsigned short integer) The current rate of change in the steering angle. Negative values indicate the vehicle is trying to turn left.", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.767000000000))) + bufidx = bufidx + 2 + end + body_AckermannDataRec_pv_count = body_AckermannDataRec_pv_count + 1 + if (bitAND(body_AckermannDataRec_pv, body_AckermannDataRec_pv_count) > 0) then + body_AckermannDataRec_tree:add(buffer(bufidx, 2), string.format("SteeringTorque: %.4f (scaled) -- (unsigned short integer) The current torque allowed to effect a change in steering angle, as experienced at the steering wheel. Negative values indicate the vehicle is trying to turn left.", buffer(bufidx, 2):le_uint() * 0.015259021897 + (-500.000000000000))) + bufidx = bufidx + 2 + end + body_AckermannDataRec_pv_count = body_AckermannDataRec_pv_count + 1 +end +messagetable:add(0x4500, reportackermannconfiguration_4500) + +setannunciatorstate_0516 = Proto("setannunciatorstate_0516", "SetAnnunciatorState 0x0516") +function setannunciatorstate_0516.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_AnnunciatorService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetAnnunciatorState", string.format("SetAnnunciatorState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetAnnunciatorState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_annunciatorRec_tree = body_tree:add("annunciatorRec") + local body_annunciatorRec_annunciator_buf = buffer(bufidx, 4) + local body_annunciatorRec_annunciator_tree = body_annunciatorRec_tree:add(buffer(bufidx, 4), string.format("%s = annunciator: 0x%X -- (unsigned integer) Each supported annunciator is specified by a bitfield. A value of zero is off. A value of 15 is maximum volume.", bitstr(body_annunciatorRec_annunciator_buf:le_uint(), 32), body_annunciatorRec_annunciator_buf:le_uint())) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Horn: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 0, 3), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 0, 3))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Siren: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 4, 7), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 4, 7))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Backup: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 8, 11), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 8, 11))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Variable1: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 12, 15), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 12, 15))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Variable2: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 16, 19), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 16, 19))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Reserved: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 20, 31), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 20, 31))) + bufidx = bufidx + 4 +end +messagetable:add(0x0516, setannunciatorstate_0516) + +queryannunciatorstate_2516 = Proto("queryannunciatorstate_2516", "QueryAnnunciatorState 0x2516") +function queryannunciatorstate_2516.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_AnnunciatorService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAnnunciatorState", string.format("QueryAnnunciatorState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAnnunciatorState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2516, queryannunciatorstate_2516) + +queryannunciatorconfiguration_2517 = Proto("queryannunciatorconfiguration_2517", "QueryAnnunciatorConfiguration 0x2517") +function queryannunciatorconfiguration_2517.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_AnnunciatorService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryAnnunciatorConfiguration", string.format("QueryAnnunciatorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryAnnunciatorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2517, queryannunciatorconfiguration_2517) + +reportannunciatorstate_4516 = Proto("reportannunciatorstate_4516", "ReportAnnunciatorState 0x4516") +function reportannunciatorstate_4516.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_AnnunciatorService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAnnunciatorState", string.format("ReportAnnunciatorState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAnnunciatorState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_annunciatorRec_tree = body_tree:add("annunciatorRec") + local body_annunciatorRec_annunciator_buf = buffer(bufidx, 4) + local body_annunciatorRec_annunciator_tree = body_annunciatorRec_tree:add(buffer(bufidx, 4), string.format("%s = annunciator: 0x%X -- (unsigned integer) Each supported annunciator is specified by a bitfield. A value of zero is off. A value of 15 is maximum volume. Unsupported annunciators will always be reported as zero (off).", bitstr(body_annunciatorRec_annunciator_buf:le_uint(), 32), body_annunciatorRec_annunciator_buf:le_uint())) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Horn: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 0, 3), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 0, 3))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Siren: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 4, 7), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 4, 7))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Backup: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 8, 11), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 8, 11))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Variable1: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 12, 15), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 12, 15))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Variable2: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 16, 19), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 16, 19))) + body_annunciatorRec_annunciator_tree:add(buffer(bufidx, 4), string.format("%s = Reserved: %d", bitstr_part(body_annunciatorRec_annunciator_buf:le_uint(), 32, 20, 31), bitVal(body_annunciatorRec_annunciator_buf:le_uint(), 20, 31))) + bufidx = bufidx + 4 +end +messagetable:add(0x4516, reportannunciatorstate_4516) + +reportannunciatorconfiguration_4517 = Proto("reportannunciatorconfiguration_4517", "ReportAnnunciatorConfiguration 0x4517") +function reportannunciatorconfiguration_4517.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_AnnunciatorService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportAnnunciatorConfiguration", string.format("ReportAnnunciatorConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportAnnunciatorConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_typesRec_tree = body_tree:add("typesRec") + local body_typesRec_types_buf = buffer(bufidx, 1) + local body_typesRec_types_tree = body_typesRec_tree:add(buffer(bufidx, 1), string.format("%s = types: 0x%X -- (unsigned byte) For each annunciator supported by the service, the corresponding bit shall be set to the high (on, 1) value.", bitstr(body_typesRec_types_buf:le_uint(), 8), body_typesRec_types_buf:le_uint())) + body_typesRec_types_tree:add(buffer(bufidx, 1), string.format("%s = Horn: %d", bitstr_part(body_typesRec_types_buf:le_uint(), 8, 0, 0), bitVal(body_typesRec_types_buf:le_uint(), 0, 0))) + body_typesRec_types_tree:add(buffer(bufidx, 1), string.format("%s = Siren: %d", bitstr_part(body_typesRec_types_buf:le_uint(), 8, 1, 1), bitVal(body_typesRec_types_buf:le_uint(), 1, 1))) + body_typesRec_types_tree:add(buffer(bufidx, 1), string.format("%s = Backup: %d", bitstr_part(body_typesRec_types_buf:le_uint(), 8, 2, 2), bitVal(body_typesRec_types_buf:le_uint(), 2, 2))) + body_typesRec_types_tree:add(buffer(bufidx, 1), string.format("%s = Variable1: %d", bitstr_part(body_typesRec_types_buf:le_uint(), 8, 3, 3), bitVal(body_typesRec_types_buf:le_uint(), 3, 3))) + body_typesRec_types_tree:add(buffer(bufidx, 1), string.format("%s = Variable2: %d", bitstr_part(body_typesRec_types_buf:le_uint(), 8, 4, 4), bitVal(body_typesRec_types_buf:le_uint(), 4, 4))) + body_typesRec_types_tree:add(buffer(bufidx, 1), string.format("%s = Reserved: %d", bitstr_part(body_typesRec_types_buf:le_uint(), 8, 5, 7), bitVal(body_typesRec_types_buf:le_uint(), 5, 7))) + bufidx = bufidx + 1 +end +messagetable:add(0x4517, reportannunciatorconfiguration_4517) + +settransmissionstate_0509 = Proto("settransmissionstate_0509", "SetTransmissionState 0x0509") +function settransmissionstate_0509.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_DriveTrainDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetTransmissionState", string.format("SetTransmissionState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetTransmissionState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_transmissionStateRec_tree = body_tree:add("transmissionStateRec") + local value_set = {[0] = "DEFAULT", [1] = "PARK", [2] = "NEUTRAL", [3] = "REVERSE", [4] = "DRIVE", [5] = "OVERDRIVE", [6] = "L1", [7] = "L2", [8] = "L3", [9] = "L4", [10] = "L5", [11] = "L6", [12] = "L7", [13] = "L8", [14] = "L9", [15] = "L10"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_transmissionStateRec_tree:add(buffer(bufidx, 1), string.format("TransmissionState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x0509, settransmissionstate_0509) + +querytransmissionstate_2509 = Proto("querytransmissionstate_2509", "QueryTransmissionState 0x2509") +function querytransmissionstate_2509.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_DriveTrainDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTransmissionState", string.format("QueryTransmissionState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTransmissionState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2509, querytransmissionstate_2509) + +settransfercasestate_0510 = Proto("settransfercasestate_0510", "SetTransferCaseState 0x0510") +function settransfercasestate_0510.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_DriveTrainDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetTransferCaseState", string.format("SetTransferCaseState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetTransferCaseState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_transferCaseState_tree = body_tree:add("transferCaseState") + local value_set = {[0] = "DEFAULT", [1] = "FWD", [2] = "AUTO_4WD", [3] = "MANUAL_LOW_4WD", [4] = "MANUAL_HIGH_4WD", [5] = "LOW_AWD", [6] = "HIGH_AWD"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_transferCaseState_tree:add(buffer(bufidx, 1), string.format("TransferCaseState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x0510, settransfercasestate_0510) + +querytransfercasestate_2510 = Proto("querytransfercasestate_2510", "QueryTransferCaseState 0x2510") +function querytransfercasestate_2510.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_DriveTrainDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTransferCaseState", string.format("QueryTransferCaseState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTransferCaseState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2510, querytransfercasestate_2510) + +querytransmissioncapabilities_2511 = Proto("querytransmissioncapabilities_2511", "QueryTransmissionCapabilities 0x2511") +function querytransmissioncapabilities_2511.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_DriveTrainDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryTransmissionCapabilities", string.format("QueryTransmissionCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryTransmissionCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2511, querytransmissioncapabilities_2511) + +reporttransmissionstate_4509 = Proto("reporttransmissionstate_4509", "ReportTransmissionState 0x4509") +function reporttransmissionstate_4509.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_DriveTrainDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTransmissionState", string.format("ReportTransmissionState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTransmissionState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_reportTransmissionStateRec_tree = body_tree:add("reportTransmissionStateRec") + local value_set = {[0] = "DEFAULT", [1] = "PARK", [2] = "NEUTRAL", [3] = "REVERSE", [4] = "DRIVE", [5] = "OVERDRIVE", [6] = "L1", [7] = "L2", [8] = "L3", [9] = "L4", [10] = "L5", [11] = "L6", [12] = "L7", [13] = "L8", [14] = "L9", [15] = "L10"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_reportTransmissionStateRec_tree:add(buffer(bufidx, 1), string.format("RequestedTransmissionState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local value_set = {[0] = "DEFAULT", [1] = "PARK", [2] = "NEUTRAL", [3] = "REVERSE", [4] = "DRIVE", [5] = "OVERDRIVE", [6] = "L1", [7] = "L2", [8] = "L3", [9] = "L4", [10] = "L5", [11] = "L6", [12] = "L7", [13] = "L8", [14] = "L9", [15] = "L10"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_reportTransmissionStateRec_tree:add(buffer(bufidx, 1), string.format("ActualTransmissionState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x4509, reporttransmissionstate_4509) + +reporttransfercasestate_4510 = Proto("reporttransfercasestate_4510", "ReportTransferCaseState 0x4510") +function reporttransfercasestate_4510.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_DriveTrainDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTransferCaseState", string.format("ReportTransferCaseState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTransferCaseState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_transferCaseState_tree = body_tree:add("transferCaseState") + local value_set = {[0] = "DEFAULT", [1] = "FWD", [2] = "AUTO_4WD", [3] = "MANUAL_LOW_4WD", [4] = "MANUAL_HIGH_4WD", [5] = "LOW_AWD", [6] = "HIGH_AWD"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_transferCaseState_tree:add(buffer(bufidx, 1), string.format("TransferCaseState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x4510, reporttransfercasestate_4510) + +reporttransmissioncapabilities_4511 = Proto("reporttransmissioncapabilities_4511", "ReportTransmissionCapabilities 0x4511") +function reporttransmissioncapabilities_4511.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_DriveTrainDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportTransmissionCapabilities", string.format("ReportTransmissionCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportTransmissionCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_transmissionCapabilities_tree = body_tree:add("transmissionCapabilities") + local body_transmissionCapabilities_transmissionBF_buf = buffer(bufidx, 2) + local body_transmissionCapabilities_transmissionBF_tree = body_transmissionCapabilities_tree:add(buffer(bufidx, 2), string.format("%s = transmissionBF: 0x%X -- (unsigned short integer) When the bit is set high, the vehicle supports the specified mode. Otherwise, it is not supported.", bitstr(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16), body_transmissionCapabilities_transmissionBF_buf:le_uint())) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = PARK: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 0, 0), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 0, 0))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = NEUTRAL: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 1, 1), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 1, 1))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = REVERSE: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 2, 2), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 2, 2))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = DRIVE: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 3, 3), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 3, 3))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = OVERDRIVE: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 4, 4), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 4, 4))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L1: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 5, 5), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 5, 5))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L2: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 6, 6), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 6, 6))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L3: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 7, 7), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 7, 7))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L4: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 8, 8), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 8, 8))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L5: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 9, 9), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 9, 9))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L6: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 10, 10), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 10, 10))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L7: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 11, 11), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 11, 11))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L8: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 12, 12), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 12, 12))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L9: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 13, 13), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 13, 13))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = L10: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 14, 14), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 14, 14))) + body_transmissionCapabilities_transmissionBF_tree:add(buffer(bufidx, 2), string.format("%s = Reserved: %d", bitstr_part(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 16, 15, 15), bitVal(body_transmissionCapabilities_transmissionBF_buf:le_uint(), 15, 15))) + bufidx = bufidx + 2 + local body_transmissionCapabilities_transferCaseBF_buf = buffer(bufidx, 1) + local body_transmissionCapabilities_transferCaseBF_tree = body_transmissionCapabilities_tree:add(buffer(bufidx, 1), string.format("%s = transferCaseBF: 0x%X -- (unsigned byte) When the bit is set high, the vehicle supports the specified mode. Otherwise, it is not supported.", bitstr(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8), body_transmissionCapabilities_transferCaseBF_buf:le_uint())) + body_transmissionCapabilities_transferCaseBF_tree:add(buffer(bufidx, 1), string.format("%s = FWD: %d", bitstr_part(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8, 0, 0), bitVal(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 0, 0))) + body_transmissionCapabilities_transferCaseBF_tree:add(buffer(bufidx, 1), string.format("%s = AUTO_4WD: %d", bitstr_part(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8, 1, 1), bitVal(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 1, 1))) + body_transmissionCapabilities_transferCaseBF_tree:add(buffer(bufidx, 1), string.format("%s = MANUAL_LOW_4WD: %d", bitstr_part(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8, 2, 2), bitVal(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 2, 2))) + body_transmissionCapabilities_transferCaseBF_tree:add(buffer(bufidx, 1), string.format("%s = MANUAL_HIGH_4WD: %d", bitstr_part(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8, 3, 3), bitVal(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 3, 3))) + body_transmissionCapabilities_transferCaseBF_tree:add(buffer(bufidx, 1), string.format("%s = LOW_AWD: %d", bitstr_part(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8, 4, 4), bitVal(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 4, 4))) + body_transmissionCapabilities_transferCaseBF_tree:add(buffer(bufidx, 1), string.format("%s = HIGH_AWD: %d", bitstr_part(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8, 5, 5), bitVal(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 5, 5))) + body_transmissionCapabilities_transferCaseBF_tree:add(buffer(bufidx, 1), string.format("%s = Reserved_For_Future_Use: %d", bitstr_part(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8, 6, 6), bitVal(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 6, 6))) + body_transmissionCapabilities_transferCaseBF_tree:add(buffer(bufidx, 1), string.format("%s = Reserved_For_User_Defined_Use: %d", bitstr_part(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 8, 7, 7), bitVal(body_transmissionCapabilities_transferCaseBF_buf:le_uint(), 7, 7))) + bufidx = bufidx + 1 +end +messagetable:add(0x4511, reporttransmissioncapabilities_4511) + +queryilluminationstate_2513 = Proto("queryilluminationstate_2513", "QueryIlluminationState 0x2513") +function queryilluminationstate_2513.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_IlluminationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryIlluminationState", string.format("QueryIlluminationState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryIlluminationState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2513, queryilluminationstate_2513) + +queryilluminationconfiguration_2514 = Proto("queryilluminationconfiguration_2514", "QueryIlluminationConfiguration 0x2514") +function queryilluminationconfiguration_2514.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_IlluminationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryIlluminationConfiguration", string.format("QueryIlluminationConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryIlluminationConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2514, queryilluminationconfiguration_2514) + +setilluminationstate_0513 = Proto("setilluminationstate_0513", "SetIlluminationState 0x0513") +function setilluminationstate_0513.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_IlluminationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetIlluminationState", string.format("SetIlluminationState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetIlluminationState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_illuminationRec_tree = body_tree:add("illuminationRec") + local body_illuminationRec_illumination_buf = buffer(bufidx, 4) + local body_illuminationRec_illumination_tree = body_illuminationRec_tree:add(buffer(bufidx, 4), string.format("%s = illumination: 0x%X -- (unsigned integer) When a bit is set to the high (on, 1) value the service shall turn the light ON. Variable-power illumination settings may support up to four power levels.", bitstr(body_illuminationRec_illumination_buf:le_uint(), 32), body_illuminationRec_illumination_buf:le_uint())) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = Headlights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 0, 0), bitVal(body_illuminationRec_illumination_buf:le_uint(), 0, 0))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = LeftTurnSignal: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 1, 1), bitVal(body_illuminationRec_illumination_buf:le_uint(), 1, 1))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = RightTurnSignal: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 2, 2), bitVal(body_illuminationRec_illumination_buf:le_uint(), 2, 2))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = RunningLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 3, 3), bitVal(body_illuminationRec_illumination_buf:le_uint(), 3, 3))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = BrakeLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 4, 4), bitVal(body_illuminationRec_illumination_buf:le_uint(), 4, 4))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = BackupLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 5, 5), bitVal(body_illuminationRec_illumination_buf:le_uint(), 5, 5))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VisibleLightSource: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 6, 6), bitVal(body_illuminationRec_illumination_buf:le_uint(), 6, 6))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = IRLightSource: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 7, 7), bitVal(body_illuminationRec_illumination_buf:le_uint(), 7, 7))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight1: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 8, 11), bitVal(body_illuminationRec_illumination_buf:le_uint(), 8, 11))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight2: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 12, 15), bitVal(body_illuminationRec_illumination_buf:le_uint(), 12, 15))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight3: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 16, 19), bitVal(body_illuminationRec_illumination_buf:le_uint(), 16, 19))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight4: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 20, 23), bitVal(body_illuminationRec_illumination_buf:le_uint(), 20, 23))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = HighBeams: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 24, 24), bitVal(body_illuminationRec_illumination_buf:le_uint(), 24, 24))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = ParkingLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 25, 25), bitVal(body_illuminationRec_illumination_buf:le_uint(), 25, 25))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = FogLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 26, 26), bitVal(body_illuminationRec_illumination_buf:le_uint(), 26, 26))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = HazardLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 27, 27), bitVal(body_illuminationRec_illumination_buf:le_uint(), 27, 27))) + bufidx = bufidx + 4 +end +messagetable:add(0x0513, setilluminationstate_0513) + +reportilluminationstate_4513 = Proto("reportilluminationstate_4513", "ReportIlluminationState 0x4513") +function reportilluminationstate_4513.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_IlluminationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportIlluminationState", string.format("ReportIlluminationState, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportIlluminationState")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_illuminationRec_tree = body_tree:add("illuminationRec") + local body_illuminationRec_illumination_buf = buffer(bufidx, 4) + local body_illuminationRec_illumination_tree = body_illuminationRec_tree:add(buffer(bufidx, 4), string.format("%s = illumination: 0x%X -- (unsigned integer) When a bit is set to the high (on, 1) value the service shall turn the light ON. Variable-power illumination settings may support up to four power levels.", bitstr(body_illuminationRec_illumination_buf:le_uint(), 32), body_illuminationRec_illumination_buf:le_uint())) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = Headlights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 0, 0), bitVal(body_illuminationRec_illumination_buf:le_uint(), 0, 0))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = LeftTurnSignal: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 1, 1), bitVal(body_illuminationRec_illumination_buf:le_uint(), 1, 1))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = RightTurnSignal: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 2, 2), bitVal(body_illuminationRec_illumination_buf:le_uint(), 2, 2))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = RunningLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 3, 3), bitVal(body_illuminationRec_illumination_buf:le_uint(), 3, 3))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = BrakeLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 4, 4), bitVal(body_illuminationRec_illumination_buf:le_uint(), 4, 4))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = BackupLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 5, 5), bitVal(body_illuminationRec_illumination_buf:le_uint(), 5, 5))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VisibleLightSource: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 6, 6), bitVal(body_illuminationRec_illumination_buf:le_uint(), 6, 6))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = IRLightSource: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 7, 7), bitVal(body_illuminationRec_illumination_buf:le_uint(), 7, 7))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight1: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 8, 11), bitVal(body_illuminationRec_illumination_buf:le_uint(), 8, 11))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight2: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 12, 15), bitVal(body_illuminationRec_illumination_buf:le_uint(), 12, 15))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight3: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 16, 19), bitVal(body_illuminationRec_illumination_buf:le_uint(), 16, 19))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight4: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 20, 23), bitVal(body_illuminationRec_illumination_buf:le_uint(), 20, 23))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = HighBeams: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 24, 24), bitVal(body_illuminationRec_illumination_buf:le_uint(), 24, 24))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = ParkingLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 25, 25), bitVal(body_illuminationRec_illumination_buf:le_uint(), 25, 25))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = FogLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 26, 26), bitVal(body_illuminationRec_illumination_buf:le_uint(), 26, 26))) + body_illuminationRec_illumination_tree:add(buffer(bufidx, 4), string.format("%s = HazardLights: %d", bitstr_part(body_illuminationRec_illumination_buf:le_uint(), 32, 27, 27), bitVal(body_illuminationRec_illumination_buf:le_uint(), 27, 27))) + bufidx = bufidx + 4 +end +messagetable:add(0x4513, reportilluminationstate_4513) + +reportilluminationconfiguration_4514 = Proto("reportilluminationconfiguration_4514", "ReportIlluminationConfiguration 0x4514") +function reportilluminationconfiguration_4514.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_IlluminationService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportIlluminationConfiguration", string.format("ReportIlluminationConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportIlluminationConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_illuminatorTypes_tree = body_tree:add("illuminatorTypes") + local body_illuminatorTypes_types_buf = buffer(bufidx, 4) + local body_illuminatorTypes_types_tree = body_illuminatorTypes_tree:add(buffer(bufidx, 4), string.format("%s = types: 0x%X -- (unsigned integer) For each illuminator supported by the service, the corresponding bit shall be set to the high (on, 1) value.", bitstr(body_illuminatorTypes_types_buf:le_uint(), 32), body_illuminatorTypes_types_buf:le_uint())) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = Headlights: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 0, 0), bitVal(body_illuminatorTypes_types_buf:le_uint(), 0, 0))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = LeftTurnSignal: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 1, 1), bitVal(body_illuminatorTypes_types_buf:le_uint(), 1, 1))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = RightTurnSignal: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 2, 2), bitVal(body_illuminatorTypes_types_buf:le_uint(), 2, 2))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = RunningLights: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 3, 3), bitVal(body_illuminatorTypes_types_buf:le_uint(), 3, 3))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = BrakeLights: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 4, 4), bitVal(body_illuminatorTypes_types_buf:le_uint(), 4, 4))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = BackupLights: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 5, 5), bitVal(body_illuminatorTypes_types_buf:le_uint(), 5, 5))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = VisibleLightSource: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 6, 6), bitVal(body_illuminatorTypes_types_buf:le_uint(), 6, 6))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = IRLightSource: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 7, 7), bitVal(body_illuminatorTypes_types_buf:le_uint(), 7, 7))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight1: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 8, 8), bitVal(body_illuminatorTypes_types_buf:le_uint(), 8, 8))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight2: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 9, 9), bitVal(body_illuminatorTypes_types_buf:le_uint(), 9, 9))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight3: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 10, 10), bitVal(body_illuminatorTypes_types_buf:le_uint(), 10, 10))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = VariableLight4: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 11, 11), bitVal(body_illuminatorTypes_types_buf:le_uint(), 11, 11))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = HighBeams: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 12, 12), bitVal(body_illuminatorTypes_types_buf:le_uint(), 12, 12))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = ParkingLights: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 13, 13), bitVal(body_illuminatorTypes_types_buf:le_uint(), 13, 13))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = FogLights: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 14, 14), bitVal(body_illuminatorTypes_types_buf:le_uint(), 14, 14))) + body_illuminatorTypes_types_tree:add(buffer(bufidx, 4), string.format("%s = HazardLights: %d", bitstr_part(body_illuminatorTypes_types_buf:le_uint(), 32, 15, 15), bitVal(body_illuminatorTypes_types_buf:le_uint(), 15, 15))) + bufidx = bufidx + 4 +end +messagetable:add(0x4514, reportilluminationconfiguration_4514) + +resetodometry_0515 = Proto("resetodometry_0515", "ResetOdometry 0x0515") +function resetodometry_0515.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_OdometryService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ResetOdometry", string.format("ResetOdometry, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ResetOdometry")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_toReset_tree = body_tree:add("toReset") + local value_set = {[2] = "TRIP_A", [3] = "TRIP_B", [4] = "TRIP_C"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_toReset_tree:add(buffer(bufidx, 1), string.format("OdometryType: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x0515, resetodometry_0515) + +queryodometry_2515 = Proto("queryodometry_2515", "QueryOdometry 0x2515") +function queryodometry_2515.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_OdometryService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryOdometry", string.format("QueryOdometry, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryOdometry")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_queryRec_tree = body_tree:add("queryRec") + local value_set = {[1] = "PLATFORM", [2] = "TRIP_A", [3] = "TRIP_B", [4] = "TRIP_C"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_queryRec_tree:add(buffer(bufidx, 1), string.format("odom: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 +end +messagetable:add(0x2515, queryodometry_2515) + +reportodometry_4515 = Proto("reportodometry_4515", "ReportOdometry 0x4515") +function reportodometry_4515.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_OdometryService.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportOdometry", string.format("ReportOdometry, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportOdometry")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_odometryRec_tree = body_tree:add("odometryRec") + local value_set = {[1] = "PLATFORM", [2] = "TRIP_A", [3] = "TRIP_B", [4] = "TRIP_C"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_odometryRec_tree:add(buffer(bufidx, 1), string.format("odom: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + body_odometryRec_tree:add(buffer(bufidx, 4), string.format("odometry: %d ", buffer(bufidx, 4):le_uint())) + bufidx = bufidx + 4 +end +messagetable:add(0x4515, reportodometry_4515) + +setparkingbrake_0512 = Proto("setparkingbrake_0512", "SetParkingBrake 0x0512") +function setparkingbrake_0512.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_ParkingBrakeDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetParkingBrake", string.format("SetParkingBrake, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetParkingBrake")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_parkingBrakeRec_tree = body_tree:add("parkingBrakeRec") + body_parkingBrakeRec_tree:add(buffer(bufidx, 1), string.format("parkingBrake: %.4f (scaled) -- (unsigned byte) Percentage of application. Zero means off, while 100% mean fully engaged.", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 +end +messagetable:add(0x0512, setparkingbrake_0512) + +queryparkingbrake_2512 = Proto("queryparkingbrake_2512", "QueryParkingBrake 0x2512") +function queryparkingbrake_2512.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_ParkingBrakeDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryParkingBrake", string.format("QueryParkingBrake, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryParkingBrake")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2512, queryparkingbrake_2512) + +reportparkingbrake_4512 = Proto("reportparkingbrake_4512", "ReportParkingBrake 0x4512") +function reportparkingbrake_4512.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_ParkingBrakeDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportParkingBrake", string.format("ReportParkingBrake, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportParkingBrake")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_parkingBrakeRec_tree = body_tree:add("parkingBrakeRec") + body_parkingBrakeRec_tree:add(buffer(bufidx, 1), string.format("commandedParkingBrake: %.4f (scaled) -- (unsigned byte) Percentage of application. Zero means off, while 100% mean fully engaged.", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 + body_parkingBrakeRec_tree:add(buffer(bufidx, 1), string.format("actualParkingBrake: %.4f (scaled) -- (unsigned byte) Percentage of application. Zero means off, while 100% mean fully engaged.", buffer(bufidx, 1):le_uint() * 0.392156862745 + (0.000000000000))) + bufidx = bufidx + 1 +end +messagetable:add(0x4512, reportparkingbrake_4512) + +queryplatformspecifications_2502 = Proto("queryplatformspecifications_2502", "QueryPlatformSpecifications 0x2502") +function queryplatformspecifications_2502.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_PlatformSpecifications.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPlatformSpecifications", string.format("QueryPlatformSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPlatformSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2502, queryplatformspecifications_2502) + +reportplatformspecifications_4502 = Proto("reportplatformspecifications_4502", "ReportPlatformSpecifications 0x4502") +function reportplatformspecifications_4502.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_PlatformSpecifications.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPlatformSpecifications", string.format("ReportPlatformSpecifications, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPlatformSpecifications")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_PlatformData_tree = body_tree:add("PlatformData") + local body_PlatformData_PlatformSpecifics_tree = body_PlatformData_tree:add("PlatformSpecifics") + body_PlatformData_PlatformSpecifics_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 1", buffer(bufidx, 1):le_uint())) + local body_PlatformData_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_PlatformData_index == 0) then + local body_PlatformData_PlatformSpecifics_Skidsteer_tree = body_PlatformData_PlatformSpecifics_tree:add("Skidsteer-- Skid-steer specific platform specs") + local body_PlatformData_PlatformSpecifics_Skidsteer_pv = buffer(bufidx, 1):le_uint() + local body_PlatformData_PlatformSpecifics_Skidsteer_pv_count = 0 + body_PlatformData_PlatformSpecifics_Skidsteer_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_PlatformData_PlatformSpecifics_Skidsteer_pv, body_PlatformData_PlatformSpecifics_Skidsteer_pv_count) > 0) then + body_PlatformData_PlatformSpecifics_Skidsteer_tree:add(buffer(bufidx, 2), string.format("TrackSeparation: %.4f (scaled) -- (unsigned short integer) Distance between the two tracks", buffer(bufidx, 2):le_uint() * 0.000457770657 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpecifics_Skidsteer_pv_count = body_PlatformData_PlatformSpecifics_Skidsteer_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpecifics_Skidsteer_pv, body_PlatformData_PlatformSpecifics_Skidsteer_pv_count) > 0) then + body_PlatformData_PlatformSpecifics_Skidsteer_tree:add(buffer(bufidx, 2), string.format("DriveWheelRadius: %.4f (scaled) -- (unsigned short integer) Radius of the drive wheel (distance from center of the drive shaft to the outer edge of the drive wheel) in meters", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpecifics_Skidsteer_pv_count = body_PlatformData_PlatformSpecifics_Skidsteer_pv_count + 1 + end + if (body_PlatformData_index == 1) then + local body_PlatformData_PlatformSpecifics_Ackermann_tree = body_PlatformData_PlatformSpecifics_tree:add("Ackermann") + local body_PlatformData_PlatformSpecifics_Ackermann_pv = buffer(bufidx, 1):le_uint() + local body_PlatformData_PlatformSpecifics_Ackermann_pv_count = 0 + body_PlatformData_PlatformSpecifics_Ackermann_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_PlatformData_PlatformSpecifics_Ackermann_pv, body_PlatformData_PlatformSpecifics_Ackermann_pv_count) > 0) then + body_PlatformData_PlatformSpecifics_Ackermann_tree:add(buffer(bufidx, 2), string.format("SteeringAngleRange: %.4f (scaled) -- (unsigned short integer) The maximum achievable steering angles, as measured by a virtual wheel at the center of the front axle. Negative values cause the vehicle to turn left; positive values cause the vehicle to turn right.", buffer(bufidx, 2):le_uint() * 0.000047937631 + (-1.570796326795))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpecifics_Ackermann_pv_count = body_PlatformData_PlatformSpecifics_Ackermann_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpecifics_Ackermann_pv, body_PlatformData_PlatformSpecifics_Ackermann_pv_count) > 0) then + body_PlatformData_PlatformSpecifics_Ackermann_tree:add(buffer(bufidx, 2), string.format("MinTurnRadius: %.4f (scaled) -- (unsigned short integer) The radius of the smallest turn the vehicle is able to make.", buffer(bufidx, 2):le_uint() * 0.000381475547 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpecifics_Ackermann_pv_count = body_PlatformData_PlatformSpecifics_Ackermann_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpecifics_Ackermann_pv, body_PlatformData_PlatformSpecifics_Ackermann_pv_count) > 0) then + body_PlatformData_PlatformSpecifics_Ackermann_tree:add(buffer(bufidx, 2), string.format("WheelSeparation: %.4f (scaled) -- (unsigned short integer) Distance between the centers of the left and right wheels", buffer(bufidx, 2):le_uint() * 0.000457770657 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpecifics_Ackermann_pv_count = body_PlatformData_PlatformSpecifics_Ackermann_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpecifics_Ackermann_pv, body_PlatformData_PlatformSpecifics_Ackermann_pv_count) > 0) then + body_PlatformData_PlatformSpecifics_Ackermann_tree:add(buffer(bufidx, 2), string.format("DriveWheelRadius: %.4f (scaled) -- (unsigned short integer) Radius of the drive wheel (distance from center of the drive shaft to the outer edge of the drive wheel) in meters", buffer(bufidx, 2):le_uint() * 0.000152590219 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpecifics_Ackermann_pv_count = body_PlatformData_PlatformSpecifics_Ackermann_pv_count + 1 + end + local body_PlatformData_PlatformInertial_tree = body_PlatformData_tree:add("PlatformInertial-- General platform specs") + local body_PlatformData_PlatformInertial_pv = buffer(bufidx, 1):le_uint() + local body_PlatformData_PlatformInertial_pv_count = 0 + body_PlatformData_PlatformInertial_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + if (bitAND(body_PlatformData_PlatformInertial_pv, body_PlatformData_PlatformInertial_pv_count) > 0) then + body_PlatformData_PlatformInertial_tree:add(buffer(bufidx, 2), string.format("MaximumForwardSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001373311971 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformInertial_pv_count = body_PlatformData_PlatformInertial_pv_count + 1 + if (bitAND(body_PlatformData_PlatformInertial_pv, body_PlatformData_PlatformInertial_pv_count) > 0) then + body_PlatformData_PlatformInertial_tree:add(buffer(bufidx, 2), string.format("MaximumReverseSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.001373311971 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformInertial_pv_count = body_PlatformData_PlatformInertial_pv_count + 1 + if (bitAND(body_PlatformData_PlatformInertial_pv, body_PlatformData_PlatformInertial_pv_count) > 0) then + body_PlatformData_PlatformInertial_tree:add(buffer(bufidx, 2), string.format("MaximumRotationalSpeed: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095826658 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformInertial_pv_count = body_PlatformData_PlatformInertial_pv_count + 1 + if (bitAND(body_PlatformData_PlatformInertial_pv, body_PlatformData_PlatformInertial_pv_count) > 0) then + body_PlatformData_PlatformInertial_tree:add(buffer(bufidx, 1), string.format("MaximumForwardAcceleration: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.156862745098 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_PlatformData_PlatformInertial_pv_count = body_PlatformData_PlatformInertial_pv_count + 1 + if (bitAND(body_PlatformData_PlatformInertial_pv, body_PlatformData_PlatformInertial_pv_count) > 0) then + body_PlatformData_PlatformInertial_tree:add(buffer(bufidx, 1), string.format("MaximumReverseAcceleration: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.156862745098 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_PlatformData_PlatformInertial_pv_count = body_PlatformData_PlatformInertial_pv_count + 1 + if (bitAND(body_PlatformData_PlatformInertial_pv, body_PlatformData_PlatformInertial_pv_count) > 0) then + body_PlatformData_PlatformInertial_tree:add(buffer(bufidx, 1), string.format("MaximumForwardDeceleration: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.156862745098 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_PlatformData_PlatformInertial_pv_count = body_PlatformData_PlatformInertial_pv_count + 1 + if (bitAND(body_PlatformData_PlatformInertial_pv, body_PlatformData_PlatformInertial_pv_count) > 0) then + body_PlatformData_PlatformInertial_tree:add(buffer(bufidx, 1), string.format("MaximumReverseDeceleration: %.4f (scaled) ", buffer(bufidx, 1):le_uint() * 0.156862745098 + (0.000000000000))) + bufidx = bufidx + 1 + end + body_PlatformData_PlatformInertial_pv_count = body_PlatformData_PlatformInertial_pv_count + 1 + local body_PlatformData_PlatformSpec_tree = body_PlatformData_tree:add("PlatformSpec") + local body_PlatformData_PlatformSpec_pv = buffer(bufidx, 2):le_uint() + local body_PlatformData_PlatformSpec_pv_count = 0 + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 2):le_uint(), 2 * 8))) + bufidx = bufidx + 2 + local body_PlatformData_PlatformSpec_MobilityPlatformName_tree = body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 1 + buffer(bufidx, 1):le_uint()), string.format("MobilityPlatformName[%d]: %s", buffer(bufidx, 1):le_uint(), buffer(bufidx + 1, buffer(bufidx, 1):le_uint()):string())) + body_PlatformData_PlatformSpec_MobilityPlatformName_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + buffer(bufidx, 1):le_uint() + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Front: %.4f (scaled) -- (unsigned short integer) Measured along the positive X axis of the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000457770657 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Back: %.4f (scaled) -- (unsigned short integer) Measured along the negative X axis of the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000457770657 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Right: %.4f (scaled) -- (unsigned short integer) Measured along the positive Y axis of the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000457770657 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Left: %.4f (scaled) -- (unsigned short integer) Measured along the negative Y axis of the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000457770657 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Bottom: %.4f (scaled) -- (unsigned short integer) Measured along the positive Z axis of the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000457770657 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Top: %.4f (scaled) -- (unsigned short integer) Measured along the negative Z axis of the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000457770657 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Xcg: %.4f (scaled) -- (unsigned short integer) Measured from the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000915541314 + (-30.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Ycg: %.4f (scaled) -- (unsigned short integer) Measured from the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000915541314 + (-30.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("Zcg: %.4f (scaled) -- (unsigned short integer) Measured from the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.000915541314 + (-30.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("WheelBase: %.4f (scaled) -- (unsigned short integer) Distance between the center of the frontmost wheel and the center of the rearmost wheel.", buffer(bufidx, 2):le_uint() * 0.000915541314 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("StaticPitchOver: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("StaticRollOver: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875262 + (-3.141592653590))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 4), string.format("VehicleWeight: %.4f (scaled) ", buffer(bufidx, 4):le_uint() * 0.000232830644 + (0.000000000000))) + bufidx = bufidx + 4 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("ApproachAngle: %.4f (scaled) -- (unsigned short integer) The angle formed by an imaginary line from the front bumper to the bottom of the front tire", buffer(bufidx, 2):le_uint() * 0.000023968816 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("DepartureAngle: %.4f (scaled) -- (unsigned short integer) The angle formed by an imaginary line from the bottom of the rear tire to rear bumper.", buffer(bufidx, 2):le_uint() * 0.000023968816 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 + if (bitAND(body_PlatformData_PlatformSpec_pv, body_PlatformData_PlatformSpec_pv_count) > 0) then + body_PlatformData_PlatformSpec_tree:add(buffer(bufidx, 2), string.format("BreakOverAngle: %.4f (scaled) -- (unsigned short integer) The angle formed by an imaginary line from the bottom of the tires to the center of the vehicle’s underside.", buffer(bufidx, 2):le_uint() * 0.000023968816 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_PlatformData_PlatformSpec_pv_count = body_PlatformData_PlatformSpec_pv_count + 1 +end +messagetable:add(0x4502, reportplatformspecifications_4502) + +setpowerplantconfiguration_0506 = Proto("setpowerplantconfiguration_0506", "SetPowerPlantConfiguration 0x0506") +function setpowerplantconfiguration_0506.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_PowerPlantManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetPowerPlantConfiguration", string.format("SetPowerPlantConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetPowerPlantConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_powerPlantConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "powerPlantConfigurationList ") + body_powerPlantConfigurationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_powerPlantConfigurationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_powerPlantConfigurationList_count do + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_tree = body_powerPlantConfigurationList_tree:add(string.format("powerPlantConfigurationSeq_%d", body_counter - 1)) + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantID_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_tree:add("powerPlantID") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantID_tree:add(buffer(bufidx, 1), string.format("powerPlantID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_tree:add("powerPlantConfigurationVar") + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 4", buffer(bufidx, 1):le_uint())) + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 0) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("gasEngineConfigurationRec") + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count = 0 + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count) > 0) then + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree:add(buffer(bufidx, 2), string.format("rpm: %d -- (unsigned short integer) Rotations per minute. Units here are one since JSIDL does not support RPM natively.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count) > 0) then + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree:add(buffer(bufidx, 2), string.format("throttle: %.4f (scaled) -- (unsigned short integer) As a percent of maximum", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count + 1 + end + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 1) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("dieselEngineConfigurationRec") + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count = 0 + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count) > 0) then + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 2), string.format("rpm: %d -- (unsigned short integer) Rotations per minute. Units here are one since JSIDL does not support RPM natively.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count) > 0) then + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 2), string.format("throttle: %.4f (scaled) -- (unsigned short integer) As a percent of maximum", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count) > 0) then + local value_set = {[1] = "GLOWPLUG_ON", [2] = "GLOWPLUG_OFF"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("plugState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count + 1 + end + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 2) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_batteryConfigurationRec_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("batteryConfigurationRec-- This contains settable state for various powerplant types") + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_batteryConfigurationRec_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 3) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_hydraulicConfigurationRec_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("hydraulicConfigurationRec") + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_hydraulicConfigurationRec_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 4) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_fuelCellConfigurationRecs_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("fuelCellConfigurationRecs") + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_fuelCellConfigurationRecs_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0x0506, setpowerplantconfiguration_0506) + +querypowerplantconfiguration_2506 = Proto("querypowerplantconfiguration_2506", "QueryPowerPlantConfiguration 0x2506") +function querypowerplantconfiguration_2506.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_PowerPlantManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPowerPlantConfiguration", string.format("QueryPowerPlantConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPowerPlantConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_idList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "idList ") + body_idList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_idList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_idList_count do + local body_idList_powerPlantID_tree = body_idList_tree:add(string.format("powerPlantID_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_idList_powerPlantID_tree:add(buffer(bufidx, 1), string.format("powerPlantID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x2506, querypowerplantconfiguration_2506) + +querypowerplantcapabilities_2507 = Proto("querypowerplantcapabilities_2507", "QueryPowerPlantCapabilities 0x2507") +function querypowerplantcapabilities_2507.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_PowerPlantManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPowerPlantCapabilities", string.format("QueryPowerPlantCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPowerPlantCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_idList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "idList ") + body_idList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_idList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_idList_count do + local body_idList_powerPlantID_tree = body_idList_tree:add(string.format("powerPlantID_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_idList_powerPlantID_tree:add(buffer(bufidx, 1), string.format("powerPlantID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x2507, querypowerplantcapabilities_2507) + +querypowerplantstatus_2508 = Proto("querypowerplantstatus_2508", "QueryPowerPlantStatus 0x2508") +function querypowerplantstatus_2508.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_PowerPlantManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryPowerPlantStatus", string.format("QueryPowerPlantStatus, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryPowerPlantStatus")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_idList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "idList ") + body_idList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_idList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_idList_count do + local body_idList_powerPlantID_tree = body_idList_tree:add(string.format("powerPlantID_%d", body_counter - 1)) + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_idList_powerPlantID_tree:add(buffer(bufidx, 1), string.format("powerPlantID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end +end +messagetable:add(0x2508, querypowerplantstatus_2508) + +reportpowerplantconfiguration_4506 = Proto("reportpowerplantconfiguration_4506", "ReportPowerPlantConfiguration 0x4506") +function reportpowerplantconfiguration_4506.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_PowerPlantManager.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportPowerPlantConfiguration", string.format("ReportPowerPlantConfiguration, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportPowerPlantConfiguration")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_powerPlantConfigurationList_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "powerPlantConfigurationList ") + body_powerPlantConfigurationList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_powerPlantConfigurationList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_powerPlantConfigurationList_count do + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_tree = body_powerPlantConfigurationList_tree:add(string.format("powerPlantConfigurationSeq_%d", body_counter - 1)) + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantID_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_tree:add("powerPlantID") + local value_set = {} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantID_tree:add(buffer(bufidx, 1), string.format("powerPlantID: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_tree:add("powerPlantConfigurationVar") + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add(buffer(bufidx, 1), string.format("vtag: %d, min_count: 0, max_count: 4", buffer(bufidx, 1):le_uint())) + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_index = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 0) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("gasEngineConfigurationRec") + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count = 0 + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count) > 0) then + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree:add(buffer(bufidx, 2), string.format("rpm: %d -- (unsigned short integer) Rotations per minute. Units here are one since JSIDL does not support RPM natively.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count) > 0) then + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_tree:add(buffer(bufidx, 2), string.format("throttle: %.4f (scaled) -- (unsigned short integer) As a percent of maximum", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_gasEngineConfigurationRec_pv_count + 1 + end + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 1) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("dieselEngineConfigurationRec") + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv = buffer(bufidx, 1):le_uint() + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count = 0 + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("Presence Vector: %s", bitstr(buffer(bufidx, 1):le_uint(), 1 * 8))) + bufidx = bufidx + 1 + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count) > 0) then + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 2), string.format("rpm: %d -- (unsigned short integer) Rotations per minute. Units here are one since JSIDL does not support RPM natively.", buffer(bufidx, 2):le_uint())) + bufidx = bufidx + 2 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count) > 0) then + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 2), string.format("throttle: %.4f (scaled) -- (unsigned short integer) As a percent of maximum", buffer(bufidx, 2):le_uint() * 0.001525902190 + (0.000000000000))) + bufidx = bufidx + 2 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count + 1 + if (bitAND(body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv, body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count) > 0) then + local value_set = {[1] = "GLOWPLUG_ON", [2] = "GLOWPLUG_OFF"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_tree:add(buffer(bufidx, 1), string.format("plugState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_dieselEngineConfigurationRec_pv_count + 1 + end + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 2) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_batteryConfigurationRec_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("batteryConfigurationRec-- This contains settable state for various powerplant types") + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_batteryConfigurationRec_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 3) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_hydraulicConfigurationRec_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("hydraulicConfigurationRec") + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_hydraulicConfigurationRec_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + if (body_powerPlantConfigurationList_powerPlantConfigurationSeq_index == 4) then + local body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_fuelCellConfigurationRecs_tree = body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_tree:add("fuelCellConfigurationRecs") + local value_set = {[1] = "POWER_ON", [2] = "POWER_OFF", [3] = "POWER_STANDBY"} + local value_id, value_name = (value_set[buffer(bufidx, 1):le_uint()]) + body_powerPlantConfigurationList_powerPlantConfigurationSeq_powerPlantConfigurationVar_fuelCellConfigurationRecs_tree:add(buffer(bufidx, 1), string.format("powerState: %d [%s] -- (unsigned byte)", buffer(bufidx, 1):le_uint(), value_id)) + bufidx = bufidx + 1 + end + end +end +messagetable:add(0x4506, reportpowerplantconfiguration_4506) + +setskidsteereffort_0501 = Proto("setskidsteereffort_0501", "SetSkidSteerEffort 0x0501") +function setskidsteereffort_0501.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_SkidSteerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetSkidSteerEffort", string.format("SetSkidSteerEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetSkidSteerEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_skidSteerData_tree = body_tree:add("skidSteerData-- Negative is reverse, positive is forward") + body_skidSteerData_tree:add(buffer(bufidx, 2), string.format("LeftSidePropulsiveEffort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum. Positive results in forward thrust, while negative results in backward thrust.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + body_skidSteerData_tree:add(buffer(bufidx, 2), string.format("RightSidePropulsiveEffort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum. Positive results in forward thrust, while negative results in backward thrust.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x0501, setskidsteereffort_0501) + +queryskidsteereffort_2501 = Proto("queryskidsteereffort_2501", "QuerySkidSteerEffort 0x2501") +function queryskidsteereffort_2501.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_SkidSteerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QuerySkidSteerEffort", string.format("QuerySkidSteerEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QuerySkidSteerEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2501, queryskidsteereffort_2501) + +reportskidsteereffort_4501 = Proto("reportskidsteereffort_4501", "ReportSkidSteerEffort 0x4501") +function reportskidsteereffort_4501.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_SkidSteerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportSkidSteerEffort", string.format("ReportSkidSteerEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportSkidSteerEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local body_skidSteerData_tree = body_tree:add("skidSteerData-- Negative is reverse, positive is forward") + body_skidSteerData_tree:add(buffer(bufidx, 2), string.format("LeftSidePropulsiveEffort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum. Positive implies forward thrust, while negative results in backward thrust.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + body_skidSteerData_tree:add(buffer(bufidx, 2), string.format("RightSidePropulsiveEffort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum. Positive implies forward thrust, while negative results in backward thrust.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 +end +messagetable:add(0x4501, reportskidsteereffort_4501) + +querystabilizereffort_2503 = Proto("querystabilizereffort_2503", "QueryStabilizerEffort 0x2503") +function querystabilizereffort_2503.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_StabilizerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryStabilizerEffort", string.format("QueryStabilizerEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryStabilizerEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_stabilizerID_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "stabilizerID ") + body_stabilizerID_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_stabilizerID_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_stabilizerID_count do + local body_stabilizerID_queryStabilizerRec_tree = body_stabilizerID_tree:add(string.format("queryStabilizerRec_%d", body_counter - 1)) + body_stabilizerID_queryStabilizerRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x2503, querystabilizereffort_2503) + +querystabilizercapabilities_2505 = Proto("querystabilizercapabilities_2505", "QueryStabilizerCapabilities 0x2505") +function querystabilizercapabilities_2505.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_StabilizerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryStabilizerCapabilities", string.format("QueryStabilizerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryStabilizerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 +end +messagetable:add(0x2505, querystabilizercapabilities_2505) + +setstabilizereffort_0503 = Proto("setstabilizereffort_0503", "SetStabilizerEffort 0x0503") +function setstabilizereffort_0503.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_StabilizerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetStabilizerEffort", string.format("SetStabilizerEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetStabilizerEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_stabilizerEffort_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "stabilizerEffort ") + body_stabilizerEffort_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_stabilizerEffort_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_stabilizerEffort_count do + local body_stabilizerEffort_stabilizerEffortRec_tree = body_stabilizerEffort_tree:add(string.format("stabilizerEffortRec_%d", body_counter - 1)) + body_stabilizerEffort_stabilizerEffortRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_stabilizerEffort_stabilizerEffortRec_tree:add(buffer(bufidx, 2), string.format("Effort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum. Positive effort moves the stabilizer upward.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x0503, setstabilizereffort_0503) + +setstabilizerposition_0504 = Proto("setstabilizerposition_0504", "SetStabilizerPosition 0x0504") +function setstabilizerposition_0504.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_StabilizerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "SetStabilizerPosition", string.format("SetStabilizerPosition, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "SetStabilizerPosition")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_stabilizerPosition_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "stabilizerPosition ") + body_stabilizerPosition_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_stabilizerPosition_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_stabilizerPosition_count do + local body_stabilizerPosition_stabilizerPositionRec_tree = body_stabilizerPosition_tree:add(string.format("stabilizerPositionRec_%d", body_counter - 1)) + body_stabilizerPosition_stabilizerPositionRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_stabilizerPosition_stabilizerPositionRec_tree:add(buffer(bufidx, 2), string.format("Position: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875181 + (-3.141590000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x0504, setstabilizerposition_0504) + +querystabilizerposition_2504 = Proto("querystabilizerposition_2504", "QueryStabilizerPosition 0x2504") +function querystabilizerposition_2504.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_StabilizerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "QueryStabilizerPosition", string.format("QueryStabilizerPosition, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "QueryStabilizerPosition")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_stabilizerID_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "stabilizerID ") + body_stabilizerID_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_stabilizerID_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_stabilizerID_count do + local body_stabilizerID_queryStabilizerRec_tree = body_stabilizerID_tree:add(string.format("queryStabilizerRec_%d", body_counter - 1)) + body_stabilizerID_queryStabilizerRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + end +end +messagetable:add(0x2504, querystabilizerposition_2504) + +reportstabilizerposition_4504 = Proto("reportstabilizerposition_4504", "ReportStabilizerPosition 0x4504") +function reportstabilizerposition_4504.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_StabilizerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportStabilizerPosition", string.format("ReportStabilizerPosition, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportStabilizerPosition")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_stabilizerPosition_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "stabilizerPosition ") + body_stabilizerPosition_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_stabilizerPosition_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_stabilizerPosition_count do + local body_stabilizerPosition_stabilizerPositionRec_tree = body_stabilizerPosition_tree:add(string.format("stabilizerPositionRec_%d", body_counter - 1)) + body_stabilizerPosition_stabilizerPositionRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_stabilizerPosition_stabilizerPositionRec_tree:add(buffer(bufidx, 2), string.format("CommandedPosition: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875181 + (-3.141590000000))) + bufidx = bufidx + 2 + body_stabilizerPosition_stabilizerPositionRec_tree:add(buffer(bufidx, 2), string.format("ActualPosition: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000095875181 + (-3.141590000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x4504, reportstabilizerposition_4504) + +reportstabilizercapabilities_4505 = Proto("reportstabilizercapabilities_4505", "ReportStabilizerCapabilities 0x4505") +function reportstabilizercapabilities_4505.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_StabilizerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportStabilizerCapabilities", string.format("ReportStabilizerCapabilities, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportStabilizerCapabilities")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_stabilizerCapabilities_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "stabilizerCapabilities ") + body_stabilizerCapabilities_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_stabilizerCapabilities_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_stabilizerCapabilities_count do + local body_stabilizerCapabilities_stabilizerCapabilitiesSeq_tree = body_stabilizerCapabilities_tree:add(string.format("stabilizerCapabilitiesSeq_%d", body_counter - 1)) + local body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerCapabilitiesRec_tree = body_stabilizerCapabilities_stabilizerCapabilitiesSeq_tree:add("stabilizerCapabilitiesRec") + body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerCapabilitiesRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumUpAngle: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000047937591 + (0.000000000000))) + bufidx = bufidx + 2 + body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerCapabilitiesRec_tree:add(buffer(bufidx, 2), string.format("MaximumDownAngle: %.4f (scaled) ", buffer(bufidx, 2):le_uint() * 0.000047937438 + (-3.141580000000))) + bufidx = bufidx + 2 + local bufidx_start_body_stabilizerCapabilities_stabilizerCapabilitiesSeq = bufidx + local body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_tree = body_stabilizerCapabilities_stabilizerCapabilitiesSeq_tree:add(buffer(bufidx_start_body_stabilizerCapabilities_stabilizerCapabilitiesSeq, buffer:len() - bufidx_start_body_stabilizerCapabilities_stabilizerCapabilitiesSeq), "stabilizerDimensionsList ") + body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_stabilizerCapabilities_stabilizerCapabilitiesSeq_counter=1,body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_count do + local body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_points_tree = body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_tree:add(string.format("points_%d", body_stabilizerCapabilities_stabilizerCapabilitiesSeq_counter - 1)) + body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_points_tree:add(buffer(bufidx, 2), string.format("PointX: %.4f (scaled) -- (unsigned short integer) Measured from the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_points_tree:add(buffer(bufidx, 2), string.format("PointY: %.4f (scaled) -- (unsigned short integer) Measured from the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + body_stabilizerCapabilities_stabilizerCapabilitiesSeq_stabilizerDimensionsList_points_tree:add(buffer(bufidx, 2), string.format("PointZ: %.4f (scaled) -- (unsigned short integer) Measured from the vehicle coordinate frame", buffer(bufidx, 2):le_uint() * 0.001000000000 + (-32.768000000000))) + bufidx = bufidx + 2 + end + end +end +messagetable:add(0x4505, reportstabilizercapabilities_4505) + +reportstabilizereffort_4503 = Proto("reportstabilizereffort_4503", "ReportStabilizerEffort 0x4503") +function reportstabilizereffort_4503.dissector(buffer, pinfo, tree) + -- /home/tiderko/tmp/jsidl_xml/urn.jaus.jss.ugv/urn_jaus_jss_ugv_StabilizerDriver.xml + local bufidx = 0 + messageid = buffer(bufidx, 2):le_uint() + local tree_msg = tree:add(pf_message_name, buffer(), "ReportStabilizerEffort", string.format("ReportStabilizerEffort, MessageID: %04X, %d bytes", messageid, buffer:len())) + pinfo.cols.info:set(string.format("%s %s", tostring(pinfo.cols.info), "ReportStabilizerEffort")) + tree_msg:add(pf_messageid, buffer(bufidx, 2), messageid, string.format('Header, MessageID: 0x%04X -- (unsigned short integer) Two byte field to hold message ID', messageid)) + bufidx = bufidx + 2 + local body_tree = tree_msg:add(buffer(bufidx, buffer:len() - bufidx), "Body") + local bufidx_start_body = bufidx + local body_stabilizerEffort_tree = body_tree:add(buffer(bufidx_start_body, buffer:len() - bufidx_start_body), "stabilizerEffort ") + body_stabilizerEffort_tree:add(buffer(bufidx, 1), string.format("Count: %d, min_count: 0, max_count: 255", buffer(bufidx, 1):le_uint())) + local body_stabilizerEffort_count = buffer(bufidx, 1):le_uint() + bufidx = bufidx + 1 + for body_counter=1,body_stabilizerEffort_count do + local body_stabilizerEffort_stabilizerEffortRec_tree = body_stabilizerEffort_tree:add(string.format("stabilizerEffortRec_%d", body_counter - 1)) + body_stabilizerEffort_stabilizerEffortRec_tree:add(buffer(bufidx, 1), string.format("StabilizerID: %d ", buffer(bufidx, 1):le_uint())) + bufidx = bufidx + 1 + body_stabilizerEffort_stabilizerEffortRec_tree:add(buffer(bufidx, 2), string.format("Effort: %.4f (scaled) -- (unsigned short integer) As a percent of maximum. Positive effort moves the stabilizer upward.", buffer(bufidx, 2):le_uint() * 0.003051804379 + (-100.000000000000))) + bufidx = bufidx + 2 + end +end +messagetable:add(0x4503, reportstabilizereffort_4503) + diff --git a/dissectors/foundation-btp/LICENSE b/dissectors/foundation-btp/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/foundation-btp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/foundation-btp/README.md b/dissectors/foundation-btp/README.md new file mode 100644 index 0000000..2ca647d --- /dev/null +++ b/dissectors/foundation-btp/README.md @@ -0,0 +1,51 @@ +# BTP — Beefcake Transfer Protocol (Foundation Devices, BLE) + +Dissecteur Wireshark Lua du **Beefcake Transfer Protocol** (BTP) de +Foundation Devices, qui découpe les messages GSTP de l'API +d'appareil à appareil en morceaux adaptés à la MTU Bluetooth Low Energy. +Post-dissecteur `btp_proto` : il repère dans le paquet une écriture ATT +sans réponse (opcode 0x52, handle 0x0010) ou une notification (opcode +0x1b, handle 0x0012), puis décode l'en-tête BTP de 8 octets (identifiant +de message, index du morceau, nombre total de morceaux, longueur utile, +octet de bourrage) et affiche les données du morceau en hexadécimal, avec +trois alertes expertes (bourrage non nul, index ≥ total, longueur +supérieure aux données disponibles). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Foundation-Devices/foundation-api (fichier `btp/wireshark_dissector/btp.lua`) | +| Commit importé | `aba3b33e6b038b664f0df8672ab069c8966b9a6b` du 14/08/2026 (branche `main`, dernier commit ; dernière modification du script : `921c433` du 16/01/2026) | +| Licence amont | GPLv3 déclarée dans le README amont (« This project is licensed under the GPLv3 License. »), sans mention « or later », d'où `GPL-3.0-only` ; pas de fichier `LICENSE` amont ni d'en-tête dans le script — le texte de la GPLv3 est fourni ici dans `LICENSE` | +| Natif Wireshark 4.6.4 | Non (ATT / L2CAP Bluetooth sont natifs) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `btp.lua` | Post-dissecteur `btp_proto` (champs `btp.*`) | +| `LICENSE` | Texte de la GPLv3 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `btp.lua` dans le dossier `plugins` de Wireshark, ouvrir une capture +BLE contenant le trafic entre appareils Foundation, puis filtrer avec +`btp_proto` ou `btp.message_id`. + +## Remarques + +- Les handles ATT 0x0010 et 0x0012 sont codés en dur : ils dépendent de la + table GATT de l'appareil. +- Post-dissecteur sans filtre préalable : la recherche des octets + opcode + handle se fait sur chaque paquet, même hors BLE, d'où des faux + positifs possibles. +- Le script lit `fi.tvb` sur le champ `btl2cap` ; l'API FieldInfo + documentée de Wireshark expose `source` et `range`, pas `tvb` : cette + ligne risque de provoquer une erreur Lua dès qu'un champ L2CAP est + présent (non vérifié). +- Pas de réassemblage des morceaux BTP ni de décodage GSTP. Pas de capture + d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/foundation-btp/btp.lua b/dissectors/foundation-btp/btp.lua new file mode 100644 index 0000000..51e7818 --- /dev/null +++ b/dissectors/foundation-btp/btp.lua @@ -0,0 +1,115 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/Foundation-Devices/foundation-api (btp/wireshark_dissector/btp.lua), +-- commit aba3b33e6b038b664f0df8672ab069c8966b9a6b du 14/08/2026. +-- Licence amont : GPL-3.0-only (GPLv3 déclarée dans le README amont) — voir README.md. +-- BTP Protocol Dissector for Wireshark +-- Dissects the custom BTP chunked protocol over BLE ATT + +local btp_proto = Proto("btp_proto", "BTP Protocol Dissector") + +-- Field extractor for L2CAP to access reassembled data +local l2cap_field = Field.new("btl2cap") + +-- Define fields for BTP Header + +local f_message_id = ProtoField.uint16("btp.message_id", "Message ID", base.HEX, nil, 0, "Chunk message identifier") +local f_index = ProtoField.uint16("btp.index", "Index", base.DEC, nil, 0, "Current chunk index (0-based)") +local f_total_chunks = ProtoField.uint16("btp.total_chunks", "Total Chunks", base.DEC, nil, 0, "Total number of chunks in the message") +local f_data_len = ProtoField.uint8("btp.data_len", "Data Length", base.DEC, nil, 0, "Length of valid data in this chunk") +local f_padding = ProtoField.uint8("btp.padding", "Padding", base.HEX, nil, 0, "Unused padding byte") + +-- Define expert info +local expert_invalid_padding = ProtoExpert.new("btp.invalid_padding", "BTP Padding is not 0", expert.group.PROTOCOL, expert.severity.ERROR) +local expert_invalid_index = ProtoExpert.new("btp.invalid_index", "BTP Index is not less than Total Chunks", expert.group.PROTOCOL, expert.severity.ERROR) +local expert_data_len_mismatch = ProtoExpert.new("btp.data_len_mismatch", "BTP Data Length exceeds available buffer", expert.group.PROTOCOL, expert.severity.WARN) + +-- Add fields and experts to protocol +btp_proto.fields = { + f_message_id, + f_index, + f_total_chunks, + f_data_len, + f_padding +} +btp_proto.experts = { + expert_invalid_padding, + expert_invalid_index, + expert_data_len_mismatch +} + +-- Dissector function +function btp_proto.dissector(buffer, pinfo, tree) + -- Use reassembled L2CAP data if available to handle fragmentation + local fi = l2cap_field() + if fi then + buffer = fi.tvb + end + + -- Find BTP header offset in the ATT value + local btp_start = -1 + for i = 0, buffer:len() - 11 do + local opcode = buffer(i, 1):uint() + local handle = buffer(i+1, 2):le_uint() + if (opcode == 0x52 and handle == 0x0010) or (opcode == 0x1b and handle == 0x0012) then + btp_start = i + 3 + break + end + end + + if btp_start == -1 then + return + end + + local buf = buffer(btp_start) + + -- Set protocol column + pinfo.cols.protocol = "BTP" + + -- Add BTP subtree + local btp_tree = tree:add(btp_proto, buf(), "BTP Protocol Data") + + -- BTP Header (8 bytes, little-endian, starting at offset 0) + local header_tree = btp_tree:add(buf(0, 8), "BTP Header") + header_tree:add_le(f_message_id, buf(0, 2)) + header_tree:add_le(f_index, buf(2, 2)) + header_tree:add_le(f_total_chunks, buf(4, 2)) + header_tree:add(f_data_len, buf(6, 1)) + header_tree:add(f_padding, buf(7, 1)) + + -- Read values for checks + local index_val = buf(2, 2):le_uint() + local total_chunks_val = buf(4, 2):le_uint() + local padding_val = buf(7, 1):uint() + + -- Check padding + if padding_val ~= 0 then + btp_tree:add_proto_expert_info(expert_invalid_padding) + pinfo.cols.info:append(" (Invalid Padding)") + end + + -- Check index + if index_val >= total_chunks_val then + btp_tree:add_proto_expert_info(expert_invalid_index) + pinfo.cols.info:append(" (Invalid Index)") + end + + -- Chunk Data (from byte 8 onwards, length as per data_len) + local data_len = buf(6, 1):uint() + local data_start = 8 + local available_len = buf:len() - data_start + local actual_data_len = math.min(data_len, available_len) + + -- Check data length + if data_len > available_len then + btp_tree:add_proto_expert_info(expert_data_len_mismatch) + pinfo.cols.info:append(" (Data Length Mismatch)") + end + + if actual_data_len > 0 then + local data_tree = btp_tree:add(buf(data_start, actual_data_len), "Chunk Data") + data_tree:add(buf(data_start, actual_data_len), "Data (" .. actual_data_len .. " bytes): " .. buf(data_start, actual_data_len):bytes():tohex()) + end +end + +-- Register as post-dissector for BLE ATT protocol +register_postdissector(btp_proto) diff --git a/dissectors/fslibre-usb/LICENSE b/dissectors/fslibre-usb/LICENSE new file mode 100644 index 0000000..ac4d5c0 --- /dev/null +++ b/dissectors/fslibre-usb/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2014-2015, Tidepool Project +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or other +materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/dissectors/fslibre-usb/README.md b/dissectors/fslibre-usb/README.md new file mode 100644 index 0000000..927759e --- /dev/null +++ b/dissectors/fslibre-usb/README.md @@ -0,0 +1,75 @@ +# FreeStyle Libre — protocole USB (Tidepool) + +Dissecteur Wireshark Lua des rapports **USB HID** échangés avec les +lecteurs de glycémie **Abbott FreeStyle Libre** et **FreeStyle Libre Pro**, +écrit par Tidepool pour mettre au point son logiciel de téléversement. +Il décode les éléments suivants : +- l'octet de commande et la longueur ; +- les commandes texte (`0x60`, `0x21`, `0x06`, `0x35`) ; +- les trames ATP : numéros de séquence en réception et en émission, + CRC32 ; +- les trames AAP qu'elles transportent : longueur codée sur 1 à 3 octets, + code d'opération, données, et réassemblage sur plusieurs rapports + (issue #515). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/tidepool-org/uploader (`lib/drivers/abbott/tools/fslibre_usb_dissector.lua`) | +| Commit importé | `4c44f03d670a52976867067890e9b0e6bedafd81` du 19/10/2026 (dernier commit de la branche par défaut `develop`) ; dernière modification du fichier : commit `a14bc7dadce139f879fdf33cea809fb500d90c25` du 11/12/2017 (« add usb id of fslibre pro ») | +| Licence amont | BSD-2-Clause, « Copyright (c) 2014-2015, Tidepool Project » (`LICENSE` du dépôt), compatible avec la licence de ce dépôt (GPL-3.0-or-later) | +| Natif Wireshark 4.6.4 | Non : seul l'USB HID générique (`usbhid`) est décodé | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). Le reste du dépôt +(logiciel de téléversement en JavaScript) n'est pas importé. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/fslibre_usb_dissector.lua` | Protocole `fslibre_usb` (« Abbott FreeStyle Libre USB Protocol »), enregistré dans `usb.product` pour `1a61:3650` (Libre) et `1a61:3670` (Libre Pro) (lignes 281 et 284) ; il lit les 64 derniers octets de chaque paquet comme rapport HID | + +## Utilisation + +Copier `src/fslibre_usb_dissector.lua` dans le dossier des plugins Lua +personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »), +puis Ctrl+Maj+L. Capturer sur l'interface `usbmon` (Linux) ou USBPcap +(Windows) du lecteur **depuis son branchement**. La table `usb.product` +n'est utilisée que si le descripteur de périphérique (VID/PID) figure dans +la capture. Filtres : `fslibre_usb`, `fslibre_usb.command`, +`fslibre_usb.text`, `fslibre_usb.aap.op_code`. + +## Vérification à l'import + +tshark 4.6.4 (Lua 5.4) : le fichier se charge sans erreur +(`luac5.4 -p` : OK). Faute de capture réelle, rapports HID synthétiques +de 64 octets précédés de 27 octets d'en-tête, dans une capture DLT 147 +associée à `fslibre_usb` par la table « User DLTs » : + +| Essai | Résultat | +|---|---| +| Commande `0x05` sans données | `Command: 0x05`, `Data Length: 0` | +| Commandes texte `0x06` et `0x60` | `Text: JCGT123-T3012`, `Text: $sn?\r\n` | +| ATP de 4 octets | séquences Rx et Tx, `ATP UNKNOWN: 0x0000` | +| ATP avec AAP (longueur 3, code 0x01) | séquences et CRC32 décodés, puis **erreur Lua** ligne 90 : `attempt to index a nil value (global 'bit32')` | +| Même essai avec une copie temporaire du script précédée d'un `bit32` minimal (opérateurs Lua 5.4), copie non livrée | AAP complet décodé (`AAP Data Length: 3`, `AAP OP Code: 0x01`) ; AAP réparti sur deux rapports : `[partial][OP Code 0x2] 6 of 12 bytes`, puis réassemblé (10 octets de données) | + +## Limites constatées + +- **AAP non décodé sous Wireshark 4.6** : le script utilise la bibliothèque + `bit32` de Lua 5.2 (lignes 90 à 124), absente de Lua 5.4. Toute trame + ATP de plus de 6 octets lève une erreur Lua, et les commandes et données + AAP (cœur du protocole) ne s'affichent pas. Sous un Wireshark lié à + Lua 5.2, ou avec une bibliothèque `bit32` installée globalement, la + logique fonctionne (voir le dernier essai). +- `state.processed = True` (ligne 158) : `True` est une variable globale + non définie (`nil`), donc l'indicateur n'est jamais posé. Sans effet + visible dans les essais. +- Réassemblage AAP indexé par l'adresse source du paquet USB : deux + échanges entrelacés du même lecteur peuvent se mélanger. +- Colonne Info vide ; tout paquet de 64 octets ou plus du périphérique + (y compris des réponses de contrôle) est lu comme rapport HID. diff --git a/dissectors/fslibre-usb/src/fslibre_usb_dissector.lua b/dissectors/fslibre-usb/src/fslibre_usb_dissector.lua new file mode 100644 index 0000000..1593c8c --- /dev/null +++ b/dissectors/fslibre-usb/src/fslibre_usb_dissector.lua @@ -0,0 +1,286 @@ +-- SPDX-License-Identifier: BSD-2-Clause +-- Importé de https://github.com/tidepool-org/uploader (lib/drivers/abbott/tools/fslibre_usb_dissector.lua), +-- commit 4c44f03d670a52976867067890e9b0e6bedafd81 du 19/10/2026 (dernière modification du fichier : +-- commit a14bc7dadce139f879fdf33cea809fb500d90c25 du 11/12/2017). +-- Licence amont : BSD-2-Clause, « Copyright (c) 2014-2015, Tidepool Project » (LICENSE du dépôt) — voir README.md et LICENSE. +-- +-- Wireshark plugin to dissect the USB HID packets of the Abbott FreeStyle Libre +-- + +-- needed for debugging this script +--_G.debug = require("debug") +--require("mobdebug").start() +-- + +local fslibre_usb = Proto("fslibre_usb", "Abbott FreeStyle Libre USB Protocol") + +local fslibre_dump = ProtoField.new("FSLibre Dump", "fslibre_usb.dump", ftypes.BYTES) + +local command = ProtoField.new("Command", "fslibre_usb.command", ftypes.UINT8, nil, base.HEX) +local data_length = ProtoField.new("Data Length", "fslibre_usb.data_length", ftypes.UINT8) + +local text = ProtoField.new("Text", "fslibre_usb.text", ftypes.STRING) + +local atp_frame = ProtoField.new("ATP Frame", "fslibre_usb.atp", ftypes.NONE) +local atp_data = ProtoField.new("ATP Data", "fslibre_usb.atp.data", ftypes.BYTES) +local atp_sequence_rx = ProtoField.new("ATP Seq Rx", "fslibre_usb.atp.sequence_rx", ftypes.UINT8) +local atp_sequence_tx = ProtoField.new("ATP Seq Tx", "fslibre_usb.atp.sequence_tx", ftypes.UINT8) +local atp_crc32 = ProtoField.new("ATP CRC32", "fslibre_usb.atp.crc32", ftypes.UINT32, nil, base.HEX) +local atp_crc32bin = ProtoField.new("ATP CRC32 BIN", "fslibre_usb.atp.crc32bin", ftypes.STRING) +local atp_unknown = ProtoField.new("ATP UNKNOWN", "fslibre_usb.atp.unknown", ftypes.UINT16, nil, base.HEX) + +local aap_frame = ProtoField.new("AAP Frame", "fslibre_usb.aap", ftypes.STRING) +local aap_data_length = ProtoField.new("AAP Data Length", "fslibre_usb.aap.data_length", ftypes.UINT32) +local aap_op_code = ProtoField.new("AAP OP Code", "fslibre_usb.aap.op_code", ftypes.UINT8, nil, base.HEX) +local aap_data = ProtoField.new("AAP Data", "fslibre_usb.aap.data", ftypes.BYTES) +local aap_dump = ProtoField.new("AAP Dump", "fslibre_usb.aap.dump", ftypes.BYTES) + + +fslibre_usb.fields = { + fslibre_dump, + command, + text, + atp_frame, + data_length, + atp_data, + atp_sequence_rx, + atp_sequence_tx, + atp_crc32, + atp_crc32bin, + atp_unknown, + aap_frame, + aap_data_length, + aap_op_code, + aap_data, + aap_dump +} + +local HID_REPORT_LENGTH = 64 +local AAP_OPCODE_LENGTH = 1 + +local pkt_state = {} +local partial_aap_buf = {} + +local function to_bits(num, bits) + -- returns a string of bits, most significant first + bits = bits or math.max(1, select(2, math.frexp(num))) + local t = {} -- table containing the bits + for b = bits, 1, -1 do + t[b] = math.fmod(num, 2) + num = math.floor((num - t[b]) / 2) + end + return table.concat(t) -- convert table to string +end + + +local function dissect_aap(atp_payload_buf, atp_tree) + local aap_data_length_num_bytes = 0 + local aap_data_length_value = 0 + -- the first 0 to 3 bytes describe the aap frame length in their lower 7 bits in little endian + for i = 0, 2 do + -- if we are still parsing the length when we reach the buffer's end, we need at least 1 more byte + if i >= atp_payload_buf:len() then + -- show data as partial aap frame + atp_tree:add(aap_frame, atp_payload_buf:range(0), "[partial]: length not known yet") + return -1 + end + + local byte_value = atp_payload_buf:range(i, 1):uint() + -- if highest bit is not set, this is already the command byte + if not bit32.btest(byte_value, 0x80) then + break + end + -- highest bit was set, extract lower 7 bits as length value + local byte_length_value = bit32.band(byte_value, 0x7f) + -- shift these 7 bits to the left depending on the index i + byte_length_value = bit32.lshift(byte_length_value, 7 * i) + -- combine these bits with the previous length value + aap_data_length_value = bit32.bor(byte_length_value, aap_data_length_value) + aap_data_length_num_bytes = aap_data_length_num_bytes + 1 + end + + local aap_data_offset = aap_data_length_num_bytes + AAP_OPCODE_LENGTH + local aap_data_length_in_this_frame = math.min(atp_payload_buf:len() - aap_data_offset, aap_data_length_value) + + -- if aap packet is longer than current buffer, return number of missing bytes as negative number + if aap_data_length_in_this_frame < aap_data_length_value then + -- show data as partial aap frame, with info about missing bytes and possibly opcode + local op_code_info = "" + if atp_payload_buf:len() > aap_data_length_num_bytes then + local aap_op_code_value = atp_payload_buf:range(aap_data_length_num_bytes, 1):uint() + op_code_info = string.format("[OP Code 0x%x]", aap_op_code_value) + end + local description = string.format("[partial]%s %d of %d bytes", + op_code_info, + aap_data_offset + aap_data_length_in_this_frame, + aap_data_offset + aap_data_length_value) + atp_tree:add(aap_frame, atp_payload_buf:range(0), description) + + return - (aap_data_length_value - aap_data_length_in_this_frame) + end + + -- check that opcode does not have the highest bit set, otherwise cancel parsing due to faulty data + local aap_op_code_value = atp_payload_buf:range(aap_data_length_num_bytes, 1):uint() + if bit32.btest(aap_op_code_value, 0x80) then + return 0 + end + + -- add new aap sub-tree + local aap_tree = atp_tree:add(aap_frame, + atp_payload_buf:range(0, aap_data_length_num_bytes + AAP_OPCODE_LENGTH + aap_data_length_in_this_frame), "") + + -- add hidden field that can be used in custom column to show aap packet data + aap_tree:add(aap_dump, atp_payload_buf:range(0, aap_data_offset + aap_data_length_in_this_frame)):set_hidden() + + -- mark the aap data length bytes at the aap frame start + aap_tree:add(aap_data_length, atp_payload_buf:range(0, aap_data_length_num_bytes), aap_data_length_value) + + -- aap op code is the first byte after the aap length + aap_tree:add(aap_op_code, atp_payload_buf:range(aap_data_length_num_bytes, AAP_OPCODE_LENGTH)) + + if aap_data_length_in_this_frame > 0 then + -- aap data bytes start after the op code + aap_tree:add(aap_data, atp_payload_buf:range(aap_data_offset, aap_data_length_in_this_frame)) + end + + return aap_data_offset + aap_data_length_in_this_frame +end + + +local function reassemble_aap(atp_data_buf, pktinfo, atp_tree) + + local aap_buf + local state = pkt_state[pktinfo.number] + + if state ~= nil then + -- we've already processed this packet + aap_buf = ByteArray.tvb(state.buffer, "AAP Buffer") + state.processed = True + else + -- first time processing this packet + state = {} + + if partial_aap_buf[tostring(pktinfo.src)] ~= nil then + partial_aap_buf[tostring(pktinfo.src)]:append(atp_data_buf(0):bytes()) + aap_buf = ByteArray.tvb(partial_aap_buf[tostring(pktinfo.src)], "AAP Buffer") + else + aap_buf = atp_data_buf + end + end + + if state.processed == nil then + state.buffer = aap_buf(0):bytes() + end + + while aap_buf:len() > 0 do + local aap_packet_length = dissect_aap(aap_buf, atp_tree) + + if aap_packet_length == 0 then + + -- error disecting aap + if state.processed == nil then + pkt_state[pktinfo.number] = state + partial_aap_buf[tostring(pktinfo.src)] = nil + end + return + + elseif aap_packet_length < 0 then + + -- we don't have all the data we need yet + if state.processed == nil then + -- save remaining data + partial_aap_buf[tostring(pktinfo.src)] = aap_buf(0):bytes() + pkt_state[pktinfo.number] = state + end + return + + else + -- consumed one aap packet from aap_buf, remove it and continue parsing + aap_buf = aap_buf:range(aap_packet_length):tvb() + end + end + + if state.processed == nil then + -- emptied aap_buf without any remaining partial aap data + pkt_state[pktinfo.number] = state + partial_aap_buf[tostring(pktinfo.src)] = nil + end +end + + + +function fslibre_usb.dissector(tvbuf, pktinfo, root) + + pktinfo.cols.protocol:set("fslibre_usb") + local pktlen = tvbuf:len() + + if pktlen < HID_REPORT_LENGTH then + -- tell Wireshark that this packet was not for us + return 0 + end + + -- cut off leading data before the actual HID report, which is always 64 bytes + local hid_report_buf = tvbuf:range(pktlen - HID_REPORT_LENGTH, HID_REPORT_LENGTH):tvb() + + pktinfo.cols.protocol = fslibre_usb.name + + local command_value = hid_report_buf:range(0, 1):uint() + local data_length_value = hid_report_buf:range(1, 1):uint() + + local data_offset = 2 + local tree = root:add(fslibre_usb, hid_report_buf:range(0, data_offset + data_length_value)) + + -- add hidden field that can be used in custom column to show whole packet data + tree:add(fslibre_dump, hid_report_buf:range(0, data_offset + data_length_value)):set_hidden() + + -- actually the command is only in the lower 6 bits of the first byte, + -- but the 2 high bits are currently always 0 anyhow + tree:add(command, hid_report_buf:range(0, 1)) + + tree:add(data_length, hid_report_buf:range(1, 1)) + + if data_length_value > 0 then + if command_value == 0x60 or command_value == 0x21 or command_value == 0x06 or command_value == 0x35 then + tree:add(text, hid_report_buf:range(data_offset, data_length_value)) + + else + local atp_tree = tree:add(atp_frame, hid_report_buf:range(data_offset, data_length_value)) + + local atp_buf = hid_report_buf:range(data_offset, data_length_value):tvb() + atp_tree:add(atp_data, atp_buf:range()):set_hidden() + + if data_length_value >= 2 then + atp_tree:add(atp_sequence_rx, atp_buf:range(0, 1)) + atp_tree:add(atp_sequence_tx, atp_buf:range(1, 1)) + + if data_length_value >= 6 then + atp_tree:add(atp_crc32, atp_buf:range(2, 4)) + + local crc32_value = atp_buf:range(2, 4):uint() + atp_tree:add(atp_crc32bin, atp_buf:range(2, 4), to_bits(crc32_value, 32)):set_hidden() + + if data_length_value > 6 then + reassemble_aap(atp_buf:range(6):tvb(), pktinfo, atp_tree) + end + + elseif data_length_value == 4 then + atp_tree:add(atp_unknown, atp_buf:range(2, 2)) + end + end + end + end +end + + +function fslibre_usb.init() + -- needed to track the state of aap reassembly + pkt_state = {} + partial_aap_buf = {} + + -- register this disector for USB vendor:product 1a61:3650 (FreeStyle Libre) + DissectorTable.get("usb.product"):add(0x1a613650, fslibre_usb) + + -- register this disector for USB vendor:product 1a61:3670 (FreeStyle Libre Pro) + DissectorTable.get("usb.product"):add(0x1a613670, fslibre_usb) +end + diff --git a/dissectors/fujitsu-airstage-h/LICENSE b/dissectors/fujitsu-airstage-h/LICENSE new file mode 100644 index 0000000..fd10f6d --- /dev/null +++ b/dissectors/fujitsu-airstage-h/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Omni Flux + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/fujitsu-airstage-h/README.md b/dissectors/fujitsu-airstage-h/README.md new file mode 100644 index 0000000..5b52e4c --- /dev/null +++ b/dissectors/fujitsu-airstage-h/README.md @@ -0,0 +1,56 @@ +# Fujitsu AirStage-H / Halcyon (bus série des climatiseurs Fujitsu) + +Dissecteurs Wireshark Lua du **bus série AirStage-H (Halcyon) de Fujitsu +General**, qui relie unités intérieures, télécommandes filaires et +contrôleurs de zones des climatiseurs gainables Fujitsu. Les trames série +sont capturées par un ESP32 sous ESPHome +([esphome-tzspserial](https://github.com/Omniflux/esphome-tzspserial)) et +envoyées à Wireshark encapsulées en TZSP sur UDP 37008 : adresse source / +destination, type de trame, mode de fonctionnement, consigne, ventilation, +oscillation, températures (contrôleur, capteur déporté), filtre, codes +d'erreur, fonctions et zones, avec détection des trames dupliquées. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Omniflux/fujitsu-airstage-h-dissector | +| Commit importé | `abbbf404a9dc609c610c82b6e87a8292991ccb82` du 20/09/2026 (branche `main`, dernier commit, qui modifie aussi les deux dissecteurs) | +| Licence amont | MIT (`LICENSE` amont, © 2023 Omni Flux) | +| Natif Wireshark 4.6.4 | Non — TZSP est natif, pas le bus Fujitsu | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `dissector-fujitsuair.lua` | Dissecteur `fujitsuair` : bus AirStage-H (TZSP encapsulation 255) | +| `dissector-fujitsuair-dmmum.lua` | Dissecteur `fujitsuair-dmmum` : variante des contrôleurs multi-unités UTY-DMMUM (TZSP encapsulation 254) | +| `wireshark-coloring-rules.txt` | Règles de coloration amont (commentaires, trames dupliquées) | +| `protocol-notes.txt` | Notes amont sur le protocole | +| `captures/*.pcapng` | 10 captures d'exemple amont (fonctionnement normal, essais, sonde déportée, filtre, zones, erreur J5.7…) | +| `captures/*.txt` | 2 traces texte amont (appuis de boutons, programmation de zones) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête des fichiers Lua. Non importés : la capture +`1683777646.pcapng` (1,6 Mo, au-delà de la limite de 1 Mo) et le script +`esphome_log_parser.py`. + +## Utilisation + +Copier les deux fichiers `.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +faire « Décoder comme… » UDP 37008 → TZSP (README amont) et filtrer avec +`fujitsuair || fujitsuair-dmmum`. Les règles de coloration s'importent dans +Affichage → Règles de coloration → Importer. + +## Remarques + +- Dissecteur « incomplet » selon l'auteur : plusieurs champs restent + inconnus. +- Les valeurs d'encapsulation TZSP 254 / 255 sont des valeurs privées + choisies par esphome-tzspserial. +- Utilise la bibliothèque `bit` (fournie par Wireshark), pas `bit32`. +- Non vérifié dans Wireshark (pas de tshark dans l'environnement de test). diff --git a/dissectors/fujitsu-airstage-h/captures/1683955068.pcapng b/dissectors/fujitsu-airstage-h/captures/1683955068.pcapng new file mode 100644 index 0000000..36ed890 Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1683955068.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1684260609.pcapng b/dissectors/fujitsu-airstage-h/captures/1684260609.pcapng new file mode 100644 index 0000000..9b46cff Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1684260609.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1684260954.pcapng b/dissectors/fujitsu-airstage-h/captures/1684260954.pcapng new file mode 100644 index 0000000..273ce3e Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1684260954.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1684697704.pcapng b/dissectors/fujitsu-airstage-h/captures/1684697704.pcapng new file mode 100644 index 0000000..7fd86c3 Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1684697704.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1685034938.pcapng b/dissectors/fujitsu-airstage-h/captures/1685034938.pcapng new file mode 100644 index 0000000..fe92966 Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1685034938.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1741424959.pcapng b/dissectors/fujitsu-airstage-h/captures/1741424959.pcapng new file mode 100644 index 0000000..587f798 Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1741424959.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1741430635.pcapng b/dissectors/fujitsu-airstage-h/captures/1741430635.pcapng new file mode 100644 index 0000000..5079cc9 Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1741430635.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1741433307.pcapng b/dissectors/fujitsu-airstage-h/captures/1741433307.pcapng new file mode 100644 index 0000000..79bc9c3 Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1741433307.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1756220383.pcapng b/dissectors/fujitsu-airstage-h/captures/1756220383.pcapng new file mode 100644 index 0000000..9a345b7 Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1756220383.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/1785389677.pcapng b/dissectors/fujitsu-airstage-h/captures/1785389677.pcapng new file mode 100644 index 0000000..2c0292f Binary files /dev/null and b/dissectors/fujitsu-airstage-h/captures/1785389677.pcapng differ diff --git a/dissectors/fujitsu-airstage-h/captures/iu-emulator-button-presses.txt b/dissectors/fujitsu-airstage-h/captures/iu-emulator-button-presses.txt new file mode 100644 index 0000000..d41eee1 --- /dev/null +++ b/dissectors/fujitsu-airstage-h/captures/iu-emulator-button-presses.txt @@ -0,0 +1,29 @@ +[16:58:43][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 +[16:58:44][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 02 3B 00 -- swing vertical next position +[16:58:45][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 00 3B 00 + + +[17:00:09][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 +[17:00:10][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 08 3B 00 -- swing horizontal next position +[17:00:12][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 00 3B 00 + + +[17:02:02][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 +[17:02:04][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 04 3B 00 -- swing vertical enable +[17:02:05][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 + + +[17:03:45][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 +[17:03:46][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 10 3B 00 -- swing horizontal enable +[17:03:47][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 + + +[17:10:08][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 +[17:10:09][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 00 3B 20 -- maintenance button +[17:10:10][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 00 3B 00 +[17:10:11][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 + +[17:11:36][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 +[17:11:38][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 00 3B 40 -- filter reset +[17:11:39][I][indoor_unit_emulator:073]: Received: 20 81 08 4B 18 00 3B 00 +[17:11:40][I][indoor_unit_emulator:073]: Received: 20 81 00 4B 18 00 3B 00 diff --git a/dissectors/fujitsu-airstage-h/captures/rc-zone-programming.txt b/dissectors/fujitsu-airstage-h/captures/rc-zone-programming.txt new file mode 100644 index 0000000..eb3a9f7 --- /dev/null +++ b/dissectors/fujitsu-airstage-h/captures/rc-zone-programming.txt @@ -0,0 +1,48 @@ + +[21:09:59][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 0B 00 +[21:09:59][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 0B 02 +[21:09:59][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 0C 00 +[21:10:00][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 0C 02 +[21:10:00][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 0D 00 +[21:10:00][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 0D 01 +[21:10:01][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 0E 00 +[21:10:01][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 0E 00 +[21:10:01][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 0F 00 +[21:10:02][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 0F 00 +[21:10:02][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 10 00 +[21:10:02][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 10 00 +[21:10:02][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 11 00 +[21:10:03][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 11 00 +[21:10:03][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 12 00 +[21:10:03][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 12 00 +[21:10:04][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 13 00 +[21:10:04][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 13 00 +[21:10:04][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 00 00 +[21:10:05][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 00 00 +[21:10:05][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 00 00 +[21:10:05][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 00 00 +.... snip .... +[21:10:51][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 00 00 +[21:10:51][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 00 00 +[21:10:51][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 00 00 00 +[21:10:52][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 00 00 + +[21:10:52][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 0B 08 +[21:10:52][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 0B 08 +[21:10:52][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 0C 07 +[21:10:53][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 0C 07 +[21:10:53][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 0D 06 +[21:10:53][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 07 00 00 0D 06 +[21:10:54][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 0E 05 +[21:10:54][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 0F 00 00 0E 05 +[21:10:54][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 0F 04 +[21:10:55][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 1F 00 00 0F 04 +[21:10:55][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 10 03 +[21:10:55][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 3F 00 00 10 03 +[21:10:56][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 11 02 +[21:10:56][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 7F 00 00 11 02 +[21:10:56][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 12 01 +[21:10:57][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 60 FF 00 00 12 01 +[21:10:57][D][fujitsu-halcyon:071][UART_Event]: RX: 20 81 60 00 00 80 13 09 + +[21:10:57][D][fujitsu-halcyon:071][UART_Event]: RX: 00 A0 68 FF 00 00 13 09 \ No newline at end of file diff --git a/dissectors/fujitsu-airstage-h/dissector-fujitsuair-dmmum.lua b/dissectors/fujitsu-airstage-h/dissector-fujitsuair-dmmum.lua new file mode 100644 index 0000000..159bd05 --- /dev/null +++ b/dissectors/fujitsu-airstage-h/dissector-fujitsuair-dmmum.lua @@ -0,0 +1,289 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Omniflux/fujitsu-airstage-h-dissector (dissector-fujitsuair-dmmum.lua), +-- commit abbbf404a9dc609c610c82b6e87a8292991ccb82 du 20/09/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +local p_fujitsuair_dmmum = Proto("fujitsuair-dmmum", "Fujitsu AirStage BUS DMMUM"); + +local frame_len = 8 +local tzsp_encap_type = 254 + +local opmode = { + [0] = "NO CHANGE", + [1] = "COOL", + [2] = "DRY", + [3] = "HEAT", + [4] = "FAN", + [5] = "AUTO" +} + +local fanlevel = { + [0] = "NO CHANGE", + [1] = "AUTO", + [2] = "HIGH", + [3] = "MEDIUM", + [4] = "LOW", + [5] = "QUIET" +} + +local packettype = { + [0] = "CONFIG" +} + +local addrtype = { + [1] = "OUTDOOR UNIT", + [2] = "CONTROLLER", + [3] = "BRANCH BOX" +} + +local tristate = { + [0] = "NO CHANGE", + [1] = "False", + [2] = "True" +} + +local f_duplicate = ProtoField.bool ("fujitsuair-dmmum.duplicate" , "Duplicate" , base.NONE) +local f_dup_frame = ProtoField.framenum ("fujitsuair-dmmum.duplicate_frame" , "Duplicate Frame" , base.NONE) + +-- byte 0 +local f_unk0 = ProtoField.uint8 ("fujitsuair-dmmum.unknown0" , "Unknown" , base.DEC, nil , 0xC0) +local f_src_type = ProtoField.uint8 ("fujitsuair-dmmum.src_type" , "Source Type" , base.DEC, addrtype, 0x30) +local f_unk2 = ProtoField.uint8 ("fujitsuair-dmmum.unknown2" , "Unknown" , base.DEC, nil , 0x0C) +local f_src = ProtoField.uint8 ("fujitsuair-dmmum.src" , "Source" , base.DEC, nil , 0x03) +-- byte 1 +local f_unk1 = ProtoField.uint8 ("fujitsuair-dmmum.unknown1" , "Unknown" , base.DEC, nil , 0xC0) +local f_token_dst_type = ProtoField.uint8 ("fujitsuair-dmmum.token_dst_type" , "Token Destination Type", base.DEC, addrtype, 0x30) +local f_unk3 = ProtoField.uint8 ("fujitsuair-dmmum.unknown3" , "Unknown" , base.DEC, nil , 0x0C) +local f_token_dst = ProtoField.uint8 ("fujitsuair-dmmum.token_dst" , "Token Destination" , base.DEC, nil , 0x03) +-- byte 2 +local f_unk6 = ProtoField.uint8 ("fujitsuair-dmmum.unknown6" , "Unknown" , base.DEC, nil , 0xFF) +-- byte 3 +local f_ou_unit_exists = ProtoField.uint8 ("fujitsuair-dmmum.unit_exists" , "Existing Indoor Units" , base.HEX, nil , 0xFC) +local f_ou_unit_exists6 = ProtoField.bool ("fujitsuair-dmmum.unit_exists.6" , "Indoor Unit 6" , 8, nil , 0x80) +local f_ou_unit_exists5 = ProtoField.bool ("fujitsuair-dmmum.unit_exists.5" , "Indoor Unit 5" , 8, nil , 0x40) +local f_ou_unit_exists4 = ProtoField.bool ("fujitsuair-dmmum.unit_exists.4" , "Indoor Unit 4" , 8, nil , 0x20) +local f_ou_unit_exists3 = ProtoField.bool ("fujitsuair-dmmum.unit_exists.3" , "Indoor Unit 3" , 8, nil , 0x10) +local f_ou_unit_exists2 = ProtoField.bool ("fujitsuair-dmmum.unit_exists.2" , "Indoor Unit 2" , 8, nil , 0x08) +local f_ou_unit_exists1 = ProtoField.bool ("fujitsuair-dmmum.unit_exists.1" , "Indoor Unit 1" , 8, nil , 0x04) +local f_ou_unk8 = ProtoField.uint8 ("fujitsuair-dmmum.unknown8" , "Unknown" , base.DEC, nil , 0x03) + +local f_rc_units = ProtoField.uint8 ("fujitsuair-dmmum.unit" , "Indoor Units" , base.HEX, nil , 0xFF) +local f_rc_unit8 = ProtoField.bool ("fujitsuair-dmmum.unit.8" , "Indoor Unit 8" , 8, nil , 0x80) +local f_rc_unit7 = ProtoField.bool ("fujitsuair-dmmum.unit.7" , "Indoor Unit 7" , 8, nil , 0x40) +local f_rc_unit6 = ProtoField.bool ("fujitsuair-dmmum.unit.6" , "Indoor Unit 6" , 8, nil , 0x20) +local f_rc_unit5 = ProtoField.bool ("fujitsuair-dmmum.unit.5" , "Indoor Unit 5" , 8, nil , 0x10) +local f_rc_unit4 = ProtoField.bool ("fujitsuair-dmmum.unit.4" , "Indoor Unit 4" , 8, nil , 0x08) +local f_rc_unit3 = ProtoField.bool ("fujitsuair-dmmum.unit.3" , "Indoor Unit 3" , 8, nil , 0x04) +local f_rc_unit2 = ProtoField.bool ("fujitsuair-dmmum.unit.2" , "Indoor Unit 2" , 8, nil , 0x02) +local f_rc_unit1 = ProtoField.bool ("fujitsuair-dmmum.unit.1" , "Indoor Unit 1" , 8, nil , 0x01) +-- byte 4 +local f_ou_unk10 = ProtoField.uint8 ("fujitsuair-dmmum.unknown10" , "Unknown" , base.DEC, nil , 0x80) +local f_ou_unit = ProtoField.uint8 ("fujitsuair-dmmum.unit" , "Indoor Unit" , base.DEC, nil , 0x70) +local f_ou_unk11 = ProtoField.uint8 ("fujitsuair-dmmum.unknown11" , "Unknown" , base.DEC, nil , 0x0F) + +local f_rc_mode = ProtoField.uint8 ("fujitsuair-dmmum.mode" , "Mode" , base.DEC, opmode , 0xE0) +local f_rc_enabled = ProtoField.uint8 ("fujitsuair-dmmum.enabled" , "Enabled" , base.DEC, tristate, 0x18) +local f_rc_unk9 = ProtoField.uint8 ("fujitsuair-dmmum.unknown9" , "Unknown" , base.DEC, nil , 0x07) +-- byte 5 +local f_ou_fan = ProtoField.uint8 ("fujitsuair-dmmum.fan" , "Fan" , base.DEC, fanlevel, 0xE0) +local f_ou_mode = ProtoField.uint8 ("fujitsuair-dmmum.mode" , "Mode" , base.DEC, opmode , 0x1C) +local f_ou_enabled = ProtoField.bool ("fujitsuair-dmmum.enabled" , "Enabled" , 8, nil , 0x02) +local f_ou_unk13 = ProtoField.uint8 ("fujitsuair-dmmum.unknown13" , "Unknown" , base.DEC, nil , 0x01) + +local f_rc_temp = ProtoField.uint8 ("fujitsuair-dmmum.temperature_setpoint" , "Temperature Setpoint" , base.DEC, nil , 0xF8) +local f_rc_fan = ProtoField.uint8 ("fujitsuair-dmmum.fan" , "Fan" , base.DEC, fanlevel, 0x07) +-- byte 6 +local f_ou_min_heat = ProtoField.bool ("fujitsuair-dmmum.minimum_heat" , "Minimum Heat" , 8, nil , 0x80) +local f_ou_low_noise = ProtoField.bool ("fujitsuair-dmmum.low_noise" , "Low Noise" , 8, nil , 0x40) +local f_ou_eco = ProtoField.bool ("fujitsuair-dmmum.eco" , "Economy Mode" , 8, nil , 0x20) +local f_ou_temp = ProtoField.uint8 ("fujitsuair-dmmum.temperature_setpoint" , "Temperature Setpoint" , base.DEC, nil , 0x1F) + +local f_rc_rc_prohibit = ProtoField.uint8 ("fujitsuair-dmmum.rc_prohibit" , "RC Prohibit" , base.DEC, tristate, 0xC0) +local f_rc_min_heat = ProtoField.uint8 ("fujitsuair-dmmum.minimum_heat" , "Minimum Heat" , base.DEC, tristate, 0x30) +local f_rc_low_noise = ProtoField.uint8 ("fujitsuair-dmmum.low_noise" , "Low Noise" , base.DEC, tristate, 0x0C) +local f_rc_eco = ProtoField.uint8 ("fujitsuair-dmmum.eco" , "Economy Mode" , base.DEC, tristate, 0x03) +-- byte 7 +local f_ou_unk15 = ProtoField.uint8 ("fujitsuair-dmmum.unknown15" , "Unknown" , base.DEC, nil , 0xE0) +local f_ou_restricted = ProtoField.bool ("fujitsuair-dmmum.restricted" , "Operation Restricted" , 8, nil , 0x10) +local f_ou_error = ProtoField.bool ("fujitsuair-dmmum.error" , "Error" , 8, nil , 0x08) +local f_ou_standby = ProtoField.bool ("fujitsuair-dmmum.standby" , "Standby" , 8, nil , 0x04) +local f_ou_testrun = ProtoField.bool ("fujitsuair-dmmum.testrun" , "Test Run" , 8, nil , 0x02) +local f_ou_rc_prohibit = ProtoField.bool ("fujitsuair-dmmum.rc_prohibit" , "RC Prohibit" , 8, nil , 0x01) + +local f_rc_unk7 = ProtoField.uint8 ("fujitsuair-dmmum.unknown7" , "Unknown" , base.DEC, nil , 0xFF) + +p_fujitsuair_dmmum.fields = { + f_duplicate, f_dup_frame, + f_unk0, f_src_type, f_unk2, f_src, -- byte 0 + f_unk1, f_token_dst_type, f_unk3, f_token_dst, -- byte 1 + f_unk6, -- byte 2 + f_ou_unit_exists, f_ou_unit_exists6, f_ou_unit_exists5, -- byte 3 + f_ou_unit_exists4, f_ou_unit_exists3, f_ou_unit_exists2, -- byte 3 + f_ou_unit_exists1, f_ou_unk8, f_rc_units, -- byte 3 + f_rc_unit8, f_rc_unit7, f_rc_unit6, f_rc_unit5, -- byte 3 + f_rc_unit4, f_rc_unit3, f_rc_unit2, f_rc_unit1, -- byte 3 + f_rc_mode, f_rc_enabled, f_rc_unk9, -- byte 4 + f_ou_unit, f_ou_unk10, f_ou_unk11, -- byte 4 + f_ou_fan, f_ou_mode, f_ou_enabled, f_ou_unk13, -- byte 5 + f_rc_temp, f_rc_fan, -- byte 5 + f_ou_min_heat, f_ou_low_noise, f_ou_eco, f_ou_temp, -- byte 6 + f_rc_rc_prohibit, f_rc_min_heat, f_rc_low_noise, f_rc_eco, -- byte 6 + f_ou_unk15, f_ou_restricted, f_ou_error, f_ou_standby, -- byte 7 + f_ou_testrun, f_ou_rc_prohibit, f_rc_unk7 -- byte 7 +} + +local frame_number = Field.new("frame.number") +local ip_src = Field.new("ip.src") +local ipv6_src = Field.new("ipv6.src") +local udp_srcport = Field.new("udp.srcport") +local tzsp_encap_f = Field.new("tzsp.encap") +local data_f = Field.new("data.data") + +local track_unique = {} +local track_unique_list = {} +function p_fujitsuair_dmmum.init() + track_unique = {} + track_unique_list = {} +end + +function p_fujitsuair_dmmum.dissector(buf, pinfo, tree) + -- Incorrect frame length + if (buf:len() ~= frame_len) then return end + + -- Extract packet source and dest + local srctype = bit.rshift(bit.band(buf(0,1):uint(), 0x30), 4) + local srcaddr = bit.band(buf(0,1):uint(), 0x03) + local dsttype = bit.rshift(bit.band(buf(1,1):uint(), 0x30), 4) + local dstaddr = bit.band(buf(1,1):uint(), 0x03) + + -- Display information + local packet_type_name = packettype[0] or "UNKNOWN" + local src_type_name = addrtype[srctype] or "UNKNOWN" + local dst_type_name = addrtype[dsttype] or "UNKNOWN" + + pinfo.cols.protocol = p_fujitsuair_dmmum.name + pinfo.cols.info = string.format("%s [%s %u → %s %u]", packet_type_name, src_type_name, srcaddr, dst_type_name, dstaddr) + local subtree = tree:add(p_fujitsuair_dmmum, buf(), p_fujitsuair_dmmum.description) + subtree:append_text(string.format(", Src: %s %u, Dst: %s %u", src_type_name, srcaddr, dst_type_name, dstaddr)) + + -- Track duplicates + do + local frame_no = frame_number().value + local ip_src_f = ip_src() or ipv6_src() + local udp_srcport_f = udp_srcport() + local src_ip = ip_src_f and tostring(ip_src_f.value) or "unknown" + local src_port = udp_srcport_f and udp_srcport_f.value or 0 + local srcdst = bit.lshift(buf(0,2):uint(), 16) + local unit = bit.band(buf(4,1):uint(), 0x70) + srcdst = bit.bor(srcdst, unit) + local tracking_key = string.format("%s:%u:%u", src_ip, src_port, srcdst) + local data = buf(2):uint64() + + local i = 0 + if not track_unique[tracking_key] then + track_unique[tracking_key] = {} + track_unique_list[tracking_key] = {} + end + for _, f in ipairs(track_unique_list[tracking_key]) do + if (f >= frame_no) then break end + i = f + end + if (track_unique[tracking_key][i] == data) then + subtree:add(f_duplicate, true):set_generated() + subtree:add(f_dup_frame, i):set_generated() + elseif (track_unique[tracking_key][frame_no] == nil) then + track_unique[tracking_key][frame_no] = data + track_unique_list[tracking_key][#track_unique_list[tracking_key] + 1] = frame_no + end + end + + -- Dissect the packet + + -- byte 0 + subtree:add(f_unk0 , buf(0,1)) + subtree:add(f_src_type, buf(0,1)) + subtree:add(f_unk2 , buf(0,1)) + subtree:add(f_src , buf(0,1)) + -- byte 1 + subtree:add(f_unk1 , buf(1,1)) + subtree:add(f_token_dst_type, buf(1,1)) + subtree:add(f_unk3 , buf(1,1)) + subtree:add(f_token_dst , buf(1,1)) + -- byte 2 + subtree:add(f_unk6 , buf(2,1)) + -- byte 3 + if srctype == 1 or srctype == 3 then -- OUTDOOR UNIT + -- Decoded with a UTY-DMMUM which is documented to support up to 5 units, + -- but appears to support 6. UTY-DMMYM and UTY-DMMGM support up to 8 units, + -- so this may shift, or last two may be out of order...or previous byte... + local UNITtree = subtree:add(f_ou_unit_exists, buf(3,1)) + UNITtree:add(f_ou_unit_exists6, buf(3,1)) + UNITtree:add(f_ou_unit_exists5, buf(3,1)) + UNITtree:add(f_ou_unit_exists4, buf(3,1)) + UNITtree:add(f_ou_unit_exists3, buf(3,1)) + UNITtree:add(f_ou_unit_exists2, buf(3,1)) + UNITtree:add(f_ou_unit_exists1, buf(3,1)) + subtree:add(f_ou_unk8 , buf(3,1)) + else -- REMOTE + local UNITtree = subtree:add(f_rc_units, buf(3,1)) + UNITtree:add(f_rc_unit8, buf(3,1)) + UNITtree:add(f_rc_unit7, buf(3,1)) + UNITtree:add(f_rc_unit6, buf(3,1)) + UNITtree:add(f_rc_unit5, buf(3,1)) + UNITtree:add(f_rc_unit4, buf(3,1)) + UNITtree:add(f_rc_unit3, buf(3,1)) + UNITtree:add(f_rc_unit2, buf(3,1)) + UNITtree:add(f_rc_unit1, buf(3,1)) + end + -- byte 4 + if srctype == 1 or srctype == 3 then -- OUTDOOR UNIT + subtree:add(f_ou_unk10, buf(4,1)) -- I have seen a marketing image of a controller with 9 units displayed on screen. Could be this bit... + subtree:add(f_ou_unit , buf(4,1)) + subtree:add(f_ou_unk11, buf(4,1)) + else -- REMOTE + subtree:add(f_rc_mode , buf(4,1)) + subtree:add(f_rc_enabled, buf(4,1)) + subtree:add(f_rc_unk9 , buf(4,1)) + end + -- byte 5 + if srctype == 1 or srctype == 3 then -- OUTDOOR UNIT + subtree:add(f_ou_fan , buf(5,1)) + subtree:add(f_ou_mode , buf(5,1)) + subtree:add(f_ou_enabled, buf(5,1)) + subtree:add(f_ou_unk13 , buf(5,1)) + else -- REMOTE + subtree:add(f_rc_temp, buf(5,1)):append_text("°C") -- Need to add 4 to this value? + subtree:add(f_rc_fan , buf(5,1)) + end + -- byte 6 + if srctype == 1 or srctype == 3 then -- OUTDOOR UNIT + subtree:add(f_ou_min_heat , buf(6,1)) + subtree:add(f_ou_low_noise, buf(6,1)) + subtree:add(f_ou_eco , buf(6,1)) + subtree:add(f_ou_temp , buf(6,1)):append_text("°C") -- Need to add 4 to this value? + else -- REMOTE + subtree:add(f_rc_rc_prohibit, buf(6,1)) + subtree:add(f_rc_min_heat , buf(6,1)) + subtree:add(f_rc_low_noise , buf(6,1)) + subtree:add(f_rc_eco , buf(6,1)) + end + -- byte 7 + if srctype == 1 or srctype == 3 then -- OUTDOOR UNIT + subtree:add(f_ou_unk15 , buf(7,1)) + subtree:add(f_ou_restricted , buf(7,1)) + subtree:add(f_ou_error , buf(7,1)) + subtree:add(f_ou_standby , buf(7,1)) + subtree:add(f_ou_testrun , buf(7,1)) + subtree:add(f_ou_rc_prohibit, buf(7,1)) + else -- REMOTE + subtree:add(f_rc_unk7, buf(7,1)) + end + + local used = 8 + + if (used < frame_len) then + Dissector.get("data"):call(buf(used):tvb(), pinfo, tree) + end +end + +local tzsp_encap_d = DissectorTable.get("tzsp.encap") +tzsp_encap_d:add(tzsp_encap_type, p_fujitsuair_dmmum) diff --git a/dissectors/fujitsu-airstage-h/dissector-fujitsuair.lua b/dissectors/fujitsu-airstage-h/dissector-fujitsuair.lua new file mode 100644 index 0000000..9a79be0 --- /dev/null +++ b/dissectors/fujitsu-airstage-h/dissector-fujitsuair.lua @@ -0,0 +1,582 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Omniflux/fujitsu-airstage-h-dissector (dissector-fujitsuair.lua), +-- commit abbbf404a9dc609c610c82b6e87a8292991ccb82 du 20/09/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +local p_fujitsuair = Proto("fujitsuair", "Fujitsu AirStage BUS"); + +local frame_len = 8 +local tzsp_encap_type = 255 + +local opmode = { + [1] = "FAN", + [2] = "DRY", + [3] = "COOL", + [4] = "HEAT", + [5] = "AUTO" +} + +local fanlevel = { + [0] = "AUTO", + [1] = "QUIET", + [2] = "LOW", + [3] = "MEDIUM", + [4] = "HIGH" +} + +local packettype = { + [0] = "CONFIG", + [1] = "ERROR", + [2] = "FEATURES", + [3] = "FUNCTION", + [4] = "STATUS", + [5] = "ZONE CONFIG", + [6] = "ZONE FUNCTION" +} + +local addrtype = { + [0] = "INDOOR UNIT", + [1] = "CONTROLLER" +} + +local zonegroup = { + [0] = "NONE", + [1] = "DAY", + [2] = "NIGHT", + [3] = "ALL", +} + +local f_duplicate = ProtoField.bool ("fujitsuair.duplicate" , "Duplicate" , base.NONE) +local f_dup_frame = ProtoField.framenum ("fujitsuair.duplicate_frame" , "Duplicate Frame" , base.NONE) + +-- byte 0 +local f_unk0 = ProtoField.uint8 ("fujitsuair.unknown0" , "Unknown" , base.DEC, nil , 0xC0) -- ALL +local f_src_type = ProtoField.uint8 ("fujitsuair.src_type" , "Source Type" , base.DEC, addrtype , 0x20) -- ALL +local f_unk16 = ProtoField.uint8 ("fujitsuair.unknown16" , "Unknown" , base.DEC, nil , 0x10) -- ALL +local f_src = ProtoField.uint8 ("fujitsuair.src" , "Source" , base.DEC, nil , 0x0F) -- ALL + +-- byte 1 +local f_unk1 = ProtoField.uint8 ("fujitsuair.unknown1" , "Unknown" , base.DEC, nil , 0xC0) -- ALL +local f_token_dst_type = ProtoField.uint8 ("fujitsuair.token_dst_type" , "Token Destination Type" , base.DEC, addrtype , 0x20) -- ALL +local f_unk18 = ProtoField.uint8 ("fujitsuair.unknown17" , "Unknown" , base.DEC, nil , 0x10) -- ALL +local f_token_dst = ProtoField.uint8 ("fujitsuair.token_dst" , "Token Destination" , base.DEC, nil , 0x0F) -- ALL + +-- byte 2 +local f_unk2 = ProtoField.uint8 ("fujitsuair.unknown2" , "Unknown" , base.DEC, nil , 0x80) -- ALL -- not part of type field +local f_type = ProtoField.uint8 ("fujitsuair.type" , "Type" , base.DEC, packettype , 0x70) -- ALL +local f_standby = ProtoField.bool ("fujitsuair.standby" , "Standby" , 8, nil , 0x08) -- IU CONFIG +local f_write = ProtoField.bool ("fujitsuair.write" , "Write" , 8, nil , 0x08) -- RC CONFIG, RC FUNCTION, RC ZONE CONFIG +local f_unk3 = ProtoField.uint8 ("fujitsuair.unknown3" , "Unknown" , base.DEC, nil , 0x07) -- CONFIG, RC FUNCTION -- RC does not consume CONFIG packets if 0x01 or 0x02 are set +local f_unk26 = ProtoField.uint8 ("fujitsuair.unknown26" , "Unknown" , base.DEC, nil , 0x0F) -- IU STATUS, RC FEATURES, RC ERROR +local f_unk20 = ProtoField.uint8 ("fujitsuair.unknown20" , "Unknown" , base.DEC, nil , 0x07) -- IU ZONE FUNCTION +local f_zone_common = ProtoField.bool ("fujitsuair.zone_common" , "Zone Common" , 8, nil , 0x08) -- IU ZONE FUNCTION + +-- byte 3 +local f_unk21 = ProtoField.uint8 ("fujitsuair.unknown21" , "Unknown" , base.DEC, nil , 0xE0) -- IU FEATURES +local f_f_mode_auto = ProtoField.bool ("fujitsuair.feature.mode_auto" , "Mode Auto" , 8, nil , 0x10) -- IU FEATURES +local f_f_mode_heat = ProtoField.bool ("fujitsuair.feature.mode_heat" , "Mode Heat" , 8, nil , 0x08) -- IU FEATURES +local f_f_mode_fan = ProtoField.bool ("fujitsuair.feature.mode_fan" , "Mode Fan" , 8, nil , 0x04) -- IU FEATURES +local f_f_mode_dry = ProtoField.bool ("fujitsuair.feature.mode_dry" , "Mode Dry" , 8, nil , 0x02) -- IU FEATURES +local f_f_mode_cool = ProtoField.bool ("fujitsuair.feature.mode_cool" , "Mode Cool" , 8, nil , 0x01) -- IU FEATURES + +local f_errcode_ext = ProtoField.uint8 ("fujitsuair.errcode_extended" , "Error Code Extended" , base.DEC, nil , 0xF0) -- IU ERROR +local f_unk4 = ProtoField.uint8 ("fujitsuair.unknown4" , "Unknown" , base.DEC, nil , 0x0F) -- ERROR +local f_error = ProtoField.bool ("fujitsuair.error" , "Error" , 8, nil , 0x80) -- CONFIG +local f_fan = ProtoField.uint8 ("fujitsuair.fan" , "Fan" , base.DEC, fanlevel , 0x70) -- CONFIG +local f_mode = ProtoField.uint8 ("fujitsuair.mode" , "Mode" , base.DEC, opmode , 0x0E) -- CONFIG +local f_enabled = ProtoField.bool ("fujitsuair.enabled" , "Enabled" , 8, nil , 0x01) -- CONFIG +local f_unk13 = ProtoField.uint8 ("fujitsuair.unknown13" , "Unknown" , base.DEC, nil , 0xFF) -- FUNCTION +local f_unk27 = ProtoField.bool ("fujitsuair.unknown27" , "Unknown" , 8, nil , 0x80) -- IU STATUS -- false in first after power on, true thereafter +local f_unk28 = ProtoField.uint8 ("fujitsuair.unknown28" , "Unknown" , base.DEC, nil , 0x7F) -- IU STATUS +local f_zones = ProtoField.uint8 ("fujitsuair.zones" , "Active Zones" , base.HEX, nil , 0xFF) -- ZONE CONFIG / IU ZONE FUNCTION +local f_zone8 = ProtoField.bool ("fujitsuair.zones.8" , "Zone 8" , 8, nil , 0x80) -- ZONE CONFIG / IU ZONE FUNCTION +local f_zone7 = ProtoField.bool ("fujitsuair.zones.7" , "Zone 7" , 8, nil , 0x40) -- ZONE CONFIG / IU ZONE FUNCTION +local f_zone6 = ProtoField.bool ("fujitsuair.zones.6" , "Zone 6" , 8, nil , 0x20) -- ZONE CONFIG / IU ZONE FUNCTION +local f_zone5 = ProtoField.bool ("fujitsuair.zones.5" , "Zone 5" , 8, nil , 0x10) -- ZONE CONFIG / IU ZONE FUNCTION +local f_zone4 = ProtoField.bool ("fujitsuair.zones.4" , "Zone 4" , 8, nil , 0x08) -- ZONE CONFIG / IU ZONE FUNCTION +local f_zone3 = ProtoField.bool ("fujitsuair.zones.3" , "Zone 3" , 8, nil , 0x04) -- ZONE CONFIG / IU ZONE FUNCTION +local f_zone2 = ProtoField.bool ("fujitsuair.zones.2" , "Zone 2" , 8, nil , 0x02) -- ZONE CONFIG / IU ZONE FUNCTION +local f_zone1 = ProtoField.bool ("fujitsuair.zones.1" , "Zone 1" , 8, nil , 0x01) -- ZONE CONFIG / IU ZONE FUNCTION +local f_unk36 = ProtoField.uint8 ("fujitsuair.unknown36" , "Unknown" , base.HEX, nil , 0xFF) -- ZONE FEATURE + +-- byte 4 +local f_unk5 = ProtoField.uint8 ("fujitsuair.unknown5" , "Unknown" , base.DEC, nil , 0xE0) -- IU FEATURES +local f_f_fan_quiet = ProtoField.bool ("fujitsuair.feature.fan_quiet" , "Fan Quiet" , 8, nil , 0x10) -- IU FEATURES +local f_f_fan_low = ProtoField.bool ("fujitsuair.feature.fan_low" , "Fan Low" , 8, nil , 0x08) -- IU FEATURES +local f_f_fan_medium = ProtoField.bool ("fujitsuair.feature.fan_medium" , "Fan Medium" , 8, nil , 0x04) -- IU FEATURES +local f_f_fan_high = ProtoField.bool ("fujitsuair.feature.fan_high" , "Fan High" , 8, nil , 0x02) -- IU FEATURES +local f_f_fan_auto = ProtoField.bool ("fujitsuair.feature.fan_auto" , "Fan Auto" , 8, nil , 0x01) -- IU FEATURES + +local f_errcode_base = ProtoField.uint8 ("fujitsuair.errcode_base" , "Error Code Base" , base.HEX, nil , 0xFF) -- IU ERROR +local f_errcode = ProtoField.string ("fujitsuair.errcode" , "Error Code" , base.ASCII) -- IU ERROR +local f_eco = ProtoField.bool ("fujitsuair.eco" , "Economy Mode" , 8, nil , 0x80) -- CONFIG +local f_testrun = ProtoField.bool ("fujitsuair.testrun" , "Test Run" , 8, nil , 0x40) -- CONFIG +local f_unk6 = ProtoField.uint8 ("fujitsuair.unknown6" , "Unknown" , base.DEC, nil , 0x20) -- CONFIG -- another bit for temperature? sign bit? +local f_temp = ProtoField.uint8 ("fujitsuair.temperature_setpoint" , "Temperature Setpoint" , bit.bor(base.DEC, base.UNIT_STRING), {"°C"}, 0x1F) -- CONFIG -- celcius 16C (0x10) - 30C (0x1E) valid? +local f_function = ProtoField.uint8 ("fujitsuair.function" , "Function" , base.DEC, nil , 0xFF) -- FUNCTION -- maybe 7 bits? function #99 (0x63) appears to be maximum +local f_unk29 = ProtoField.uint8 ("fujitsuair.unknown29" , "Unknown" , base.DEC, nil , 0xFF) -- IU STATUS -- seen values 0,1,2,3, 6,7,8,9 +local f_unk33 = ProtoField.bool ("fujitsuair.unknown33" , "Unknown" , 8, nil , 0x80) -- ZONE CONFIG -- seen bit set when source is indoor unit, otherwise 0 +local f_unk32 = ProtoField.uint8 ("fujitsuair.unknown32" , "Unknown" , base.DEC, nil , 0x60) -- ZONE CONFIG +local f_unk37 = ProtoField.uint8 ("fujitsuair.unknown37" , "Unknown" , base.DEC, nil , 0x07) -- ZONE CONFIG +local f_zone_groups = ProtoField.uint8 ("fujitsuair.zone_groups" , "Active Zone Groups" , base.DEC, zonegroup , 0x18) -- ZONE CONFIG -- Group 'all' enables both night + day +local f_zone_group_night = ProtoField.bool ("fujitsuair.zone_groups.night" , "Zone Group - Night" , 8, nil , 0x10) -- ZONE CONFIG +local f_zone_group_day = ProtoField.bool ("fujitsuair.zone_groups.day" , "Zone Group - Day" , 8, nil , 0x08) -- ZONE CONFIG +local f_unk34 = ProtoField.uint8 ("fujitsuair.unknown34" , "Unknown" , base.HEX, nil , 0xFF) -- ZONE FEATURE + + +-- byte 5 +local f_f_filter_timer = ProtoField.bool ("fujitsuair.feature.filter_timer" , "Filter Timer" , 8, nil , 0x80) -- IU FEATURES +local f_f_sensor_switching = ProtoField.bool ("fujitsuair.feature.sensor_switching" , "Sensor Switching" , 8, nil , 0x40) -- IU FEATURES +local f_unk17 = ProtoField.uint8 ("fujitsuair.unknown17" , "Unknown" , base.DEC, nil , 0x30) -- IU FEATURES +local f_f_maintenance_button = ProtoField.bool ("fujitsuair.feature.maintenance_button", "Maintenance Button" , 8, nil , 0x08) -- IU FEATURES +local f_f_economy_mode = ProtoField.bool ("fujitsuair.feature.economy_mode" , "Economy Mode" , 8, nil , 0x04) -- IU FEATURES +local f_f_swing_horizontal = ProtoField.bool ("fujitsuair.feature.horizontal_louvers", "Horizontal Louvers" , 8, nil , 0x02) -- IU FEATURES +local f_f_swing_vertical = ProtoField.bool ("fujitsuair.feature.vertical_louvers" , "Vertical Louvers" , 8, nil , 0x01) -- IU FEATURES + +local f_unk7 = ProtoField.uint8 ("fujitsuair.unknown7" , "Unknown" , base.DEC, nil , 0xE0) -- IU CONFIG +local f_controller_sensor = ProtoField.bool ("fujitsuair.controller_sensor" , "Use Controller Sensor" , 8, nil , 0x80) -- RC CONFIG +local f_unk8 = ProtoField.uint8 ("fujitsuair.unknown8" , "Unknown" , base.DEC, nil , 0x60) -- RC CONFIG +local f_swing_horizontal = ProtoField.bool ("fujitsuair.swing_horizontal" , "Swing Horizontal" , 8, nil , 0x10) -- CONFIG +local f_unk24 = ProtoField.uint8 ("fujitsuair.unknown24" , "Unknown" , base.DEC, nil , 0x08) -- IU CONFIG +local f_set_horizontal_louver= ProtoField.bool ("fujitsuair.set_horizontal_louver" , "Set Horizontal Louver" , 8, nil , 0x08) -- RC CONFIG +local f_swing_vertical = ProtoField.bool ("fujitsuair.swing_vertical" , "Swing Vertical" , 8, nil , 0x04) -- CONFIG +local f_unk25 = ProtoField.uint8 ("fujitsuair.unknown25" , "Unknown" , base.DEC, nil , 0x03) -- IU CONFIG +local f_set_vertical_louver = ProtoField.bool ("fujitsuair.set_vertical_louver" , "Set Vertical Louver" , 8, nil , 0x02) -- RC CONFIG +local f_unk9 = ProtoField.uint8 ("fujitsuair.unknown9" , "Unknown" , base.DEC, nil , 0x01) -- RC CONFIG +local f_funcval = ProtoField.uint8 ("fujitsuair.function_value" , "Function Value" , base.DEC, nil , 0xFF) -- FUNCTION +local f_unk30 = ProtoField.uint8 ("fujitsuair.unknown30" , "Unknown" , base.DEC, nil , 0xFF) -- IU STATUS -- seen values 0x00, 0x16 + +local f_zone_grouping_1_4 = ProtoField.uint8 ("fujitsuair.zone_grouping_1_4" , "Zone Group Assoc 1-4" , base.HEX, nil , 0xFF) -- ZONE CONFIG +local f_zone4_groups = ProtoField.uint8 ("fujitsuair.zone_grouping_1_4.4" , "Zone 4 Groups" , base.DEC, zonegroup , 0xC0) -- ZONE CONFIG +local f_zone4_night = ProtoField.bool ("fujitsuair.zone_grouping_1_4.4.night" , "Zone 4 - Night" , 8, nil , 0x80) -- ZONE CONFIG +local f_zone4_day = ProtoField.bool ("fujitsuair.zone_grouping_1_4.4.day" , "Zone 4 - Day" , 8, nil , 0x40) -- ZONE CONFIG +local f_zone3_groups = ProtoField.uint8 ("fujitsuair.zone_grouping_1_4.3" , "Zone 3 Groups" , base.DEC, zonegroup , 0x30) -- ZONE CONFIG +local f_zone3_night = ProtoField.bool ("fujitsuair.zone_grouping_1_4.3.night" , "Zone 3 - Night" , 8, nil , 0x20) -- ZONE CONFIG +local f_zone3_day = ProtoField.bool ("fujitsuair.zone_grouping_1_4.3.day" , "Zone 3 - Day" , 8, nil , 0x10) -- ZONE CONFIG +local f_zone2_groups = ProtoField.uint8 ("fujitsuair.zone_grouping_1_4.2" , "Zone 2 Groups" , base.DEC, zonegroup , 0x0C) -- ZONE CONFIG +local f_zone2_night = ProtoField.bool ("fujitsuair.zone_grouping_1_4.2.night" , "Zone 2 - Night" , 8, nil , 0x08) -- ZONE CONFIG +local f_zone2_day = ProtoField.bool ("fujitsuair.zone_grouping_1_4.2.day" , "Zone 2 - Day" , 8, nil , 0x04) -- ZONE CONFIG +local f_zone1_groups = ProtoField.uint8 ("fujitsuair.zone_grouping_1_4.1" , "Zone 1 Groups" , base.DEC, zonegroup , 0x03) -- ZONE CONFIG +local f_zone1_night = ProtoField.bool ("fujitsuair.zone_grouping_1_4.1.night" , "Zone 1 - Night" , 8, nil , 0x02) -- ZONE CONFIG +local f_zone1_day = ProtoField.bool ("fujitsuair.zone_grouping_1_4.1.day" , "Zone 1 - Day" , 8, nil , 0x01) -- ZONE CONFIG + +local f_zone_func_write = ProtoField.bool ("fujitsuair.zone_func_write" , "Zone Function Write" , 8, nil , 0x80) -- RC ZONE FUNCTION +local f_unk38 = ProtoField.uint8 ("fujitsuair.unknown38" , "Unknown" , base.DEC, nil , 0x7F) -- RC ZONE FUNCTION +local f_unk39 = ProtoField.uint8 ("fujitsuair.unknown39" , "Unknown" , base.DEC, nil , 0xFF) -- IU ZONE FUNCTION + + +-- byte 6 +local f_unk10 = ProtoField.uint8 ("fujitsuair.unknown10" , "Unknown" , base.DEC, nil , 0xFF) -- IU FEATURES +local f_lock_filter_reset = ProtoField.bool ("fujitsuair.lock.filter_reset" , "Lock Filter Reset" , 8, nil , 0x80) -- IU CONFIG +local f_lock_on_off = ProtoField.bool ("fujitsuair.lock.on_off" , "Lock On/Off" , 8, nil , 0x40) -- IU CONFIG +local f_lock_mode = ProtoField.bool ("fujitsuair.lock.mode" , "Lock Mode" , 8, nil , 0x20) -- IU CONFIG +local f_lock_unknown = ProtoField.bool ("fujitsuair.lock.unknown" , "Lock Unknown" , 8, nil , 0x10) -- IU CONFIG +local f_lock_timer = ProtoField.bool ("fujitsuair.lock.timer" , "Lock Timer" , 8, nil , 0x08) -- IU CONFIG +local f_lock_all = ProtoField.bool ("fujitsuair.lock.all" , "Lock All" , 8, nil , 0x04) -- IU CONFIG +local f_seen_secondary_rc = ProtoField.bool ("fujitsuair.seen_secondary_rc" , "Seen Secondary RC" , 8, nil , 0x02) -- IU CONFIG +local f_seen_primary_rc = ProtoField.bool ("fujitsuair.seen_primary_rc" , "Seen Primary RC" , 8, nil , 0x01) -- IU CONFIG + +local f_unk11 = ProtoField.uint8 ("fujitsuair.unknown11" , "Unknown" , base.DEC, nil , 0x80) -- RC CONFIG -- sign bit? not used by controllers I have... +local f_controller_temp = ProtoField.float ("fujitsuair.controller_temp" , "Controller Temperature" , {"°C"} ) -- RC CONFIG -- temperature range reported by controller is 0C - 60C in 0.5 degree increments +local f_unk14 = ProtoField.uint8 ("fujitsuair.unknown14" , "Unknown" , base.DEC, nil , 0xFF) -- FUNCTION +local f_unk31 = ProtoField.uint8 ("fujitsuair.unknown31" , "Unknown" , base.DEC, nil , 0xFF) -- IU STATUS -- seen values 0x00, 0x01 -- 0x01 heat running? + +local f_zone_grouping_5_8 = ProtoField.uint8 ("fujitsuair.zone_grouping_5_8" , "Zone Group Assoc 5-8" , base.HEX, nil , 0xFF) -- ZONE CONFIG +local f_zone8_groups = ProtoField.uint8 ("fujitsuair.zone_grouping_5_8.8" , "Zone 8 Groups" , base.DEC, zonegroup , 0xC0) -- ZONE CONFIG +local f_zone8_night = ProtoField.bool ("fujitsuair.zone_grouping_5_8.8.night" , "Zone 8 - Night" , 8, nil , 0x80) -- ZONE CONFIG +local f_zone8_day = ProtoField.bool ("fujitsuair.zone_grouping_5_8.8.day" , "Zone 8 - Day" , 8, nil , 0x40) -- ZONE CONFIG +local f_zone7_groups = ProtoField.uint8 ("fujitsuair.zone_grouping_5_8.7" , "Zone 7 Groups" , base.DEC, zonegroup , 0x30) -- ZONE CONFIG +local f_zone7_night = ProtoField.bool ("fujitsuair.zone_grouping_5_8.7.night" , "Zone 7 - Night" , 8, nil , 0x20) -- ZONE CONFIG +local f_zone7_day = ProtoField.bool ("fujitsuair.zone_grouping_5_8.7.day" , "Zone 7 - Day" , 8, nil , 0x10) -- ZONE CONFIG +local f_zone6_groups = ProtoField.uint8 ("fujitsuair.zone_grouping_5_8.6" , "Zone 6 Groups" , base.DEC, zonegroup , 0x0C) -- ZONE CONFIG +local f_zone6_night = ProtoField.bool ("fujitsuair.zone_grouping_5_8.6.night" , "Zone 6 - Night" , 8, nil , 0x08) -- ZONE CONFIG +local f_zone6_day = ProtoField.bool ("fujitsuair.zone_grouping_5_8.6.day" , "Zone 6 - Day" , 8, nil , 0x04) -- ZONE CONFIG +local f_zone5_groups = ProtoField.uint8 ("fujitsuair.zone_grouping_5_8.5" , "Zone 5 Groups" , base.DEC, zonegroup , 0x03) -- ZONE CONFIG +local f_zone5_night = ProtoField.bool ("fujitsuair.zone_grouping_5_8.5.night" , "Zone 5 - Night" , 8, nil , 0x02) -- ZONE CONFIG +local f_zone5_day = ProtoField.bool ("fujitsuair.zone_grouping_5_8.5.day" , "Zone 5 - Day" , 8, nil , 0x01) -- ZONE CONFIG + +local f_zone_func_location = ProtoField.uint8 ("fujitsuair.zone_func_location" , "Zone Function Location" , base.HEX, nil , 0xFF) -- ZONE FUNCTION -- 0x0B thru 0x13 show the outlet count for zones 1-8 + common + +-- byte 7 +local f_unk12 = ProtoField.uint8 ("fujitsuair.unknown12" , "Unknown" , base.DEC, nil , 0xFF) -- IU FEATURES +local f_unk22 = ProtoField.uint8 ("fujitsuair.unknown22" , "Unknown" , base.DEC, nil , 0x80) -- CONFIG +local f_filter_timer = ProtoField.bool ("fujitsuair.filter_timer" , "Filter Timer" , 8, nil , 0x40) -- IU CONFIG +local f_reset_filter_timer = ProtoField.bool ("fujitsuair.reset_filter_timer" , "Reset Filter Timer" , 8, nil , 0x40) -- RC CONFIG -- Remote writes this bit, then writes this bit clear in next packet +local f_maintenance = ProtoField.bool ("fujitsuair.maintenance" , "Maintenance" , 8, nil , 0x20) -- RC CONFIG -- Remote writes this bit, then writes this bit clear in next packet +local f_unk19 = ProtoField.uint8 ("fujitsuair.unknown19" , "Unknown" , base.DEC, nil , 0x3F) -- IU CONFIG +local f_unk23 = ProtoField.uint8 ("fujitsuair.unknown23" , "Unknown" , base.DEC, nil , 0x1F) -- RC CONFIG +local f_unk15 = ProtoField.uint8 ("fujitsuair.unknown15" , "Unknown" , base.DEC, nil , 0xF0) -- FUNCTION +local f_indoorunit = ProtoField.uint8 ("fujitsuair.indoorunit" , "Indoor Unit" , base.DEC, nil , 0x0F) -- FUNCTION -- maybe ALL? +local f_unk35 = ProtoField.uint8 ("fujitsuair.unknown35" , "Unknown" , base.DEC, nil , 0xFF) -- RC ZONE CONFIG +local f_zone_func_value = ProtoField.uint8 ("fujitsuair.zone_func_value" , "Zone Function Value" , base.HEX, nil , 0xFF) -- ZONE FUNCTION + +-- oil recovery, defrost MAY be different flags from standby although controller displays same symbol for all. +-- maybe missing powerful, min heat, power diffuser, sleep, coil dry, but may not be available over this protocol, only over built in IR controllers... + +-- IU0 -> C0 unknown7 is usually 101, but is 010 on old unit pre FEATURE support +-- IU0 -> C0 unknown7 switches from 101 to 010 on eco on/off, then back to 101 on next packet +-- IU0 -> C0 unknown7 switches from 101 to 000 on min heat on/off, then back to 101 on next packet + +p_fujitsuair.fields = { + f_duplicate, f_dup_frame, + + f_unk0, f_src_type, f_unk16, f_src, -- byte 0 + + f_unk1, f_token_dst_type, f_unk18, f_token_dst, -- byte 1 + + f_unk2, f_type, f_standby, f_write, f_unk3, f_unk26, -- byte 2 + f_zone_common, f_unk20, -- byte 2 + + f_f_mode_auto, f_f_mode_heat, f_f_mode_fan, f_f_mode_dry, f_f_mode_cool, -- byte 3 + f_unk21, f_unk4, f_errcode_ext, f_error, f_fan, f_mode, f_enabled, -- byte 3 + f_unk13, f_unk27, f_unk28, f_unk36, f_zones, -- byte 3 + f_zone8, f_zone7, f_zone6, f_zone5, f_zone4, f_zone3, f_zone2, f_zone1, -- byte 3 + + f_f_fan_quiet, f_f_fan_low, f_f_fan_medium, f_f_fan_high, f_f_fan_auto, -- byte 4 + f_unk5, f_unk6, f_errcode_base, f_errcode, f_eco, f_testrun, f_temp, -- byte 4 + f_function, f_unk29, f_unk33, f_unk32, f_zone_groups, f_zone_group_night, -- byte 4 + f_zone_group_day, f_unk34, f_unk37, -- byte 4 + + f_f_filter_timer, f_f_sensor_switching, f_unk17, f_f_maintenance_button, -- byte 5 + f_f_economy_mode, f_f_swing_horizontal, f_f_swing_vertical, -- byte 5 + f_unk7, f_unk24, f_unk25, -- byte 5 + f_controller_sensor, f_unk8, f_swing_horizontal, f_set_horizontal_louver, -- byte 5 + f_swing_vertical, f_set_vertical_louver, f_unk9, f_funcval, f_unk30, -- byte 5 + f_zone_grouping_1_4, f_zone_func_write, f_unk38, f_unk39, -- byte 5 + f_zone4_groups, f_zone4_night, f_zone4_day, -- byte 5 + f_zone3_groups, f_zone3_night, f_zone3_day, -- byte 5 + f_zone2_groups, f_zone2_night, f_zone2_day, -- byte 5 + f_zone1_groups, f_zone1_night, f_zone1_day, -- byte 5 + + f_unk10, f_lock_filter_reset, f_lock_on_off, f_lock_mode, f_lock_unknown, -- byte 6 + f_lock_timer, f_lock_all, f_seen_secondary_rc, f_seen_primary_rc, -- byte 6 + f_unk11, f_controller_temp, f_unk14, f_unk31, -- byte 6 + f_zone_grouping_5_8, f_zone_func_location, -- byte 6 + f_zone8_groups, f_zone8_night, f_zone8_day, -- byte 6 + f_zone7_groups, f_zone7_night, f_zone7_day, -- byte 6 + f_zone6_groups, f_zone6_night, f_zone6_day, -- byte 6 + f_zone5_groups, f_zone5_night, f_zone5_day, -- byte 6 + + f_unk12, f_unk22, f_filter_timer, f_reset_filter_timer, f_maintenance, -- byte 7 + f_unk19, f_unk23, f_unk15, f_indoorunit, f_unk35, f_zone_func_value -- byte 7 +} + +local frame_number = Field.new("frame.number") +local ip_src = Field.new("ip.src") +local ipv6_src = Field.new("ipv6.src") +local udp_srcport = Field.new("udp.srcport") +local tzsp_encap_f = Field.new("tzsp.encap") +local data_f = Field.new("data.data") + +local track_unique = {} +local track_unique_list = {} +function p_fujitsuair.init() + track_unique = {} + track_unique_list = {} +end + +function p_fujitsuair.dissector(buf, pinfo, tree) + -- Incorrect frame length + if (buf:len() ~= frame_len) then return end + + -- Extract packet source, dest, and type + local srctype = bit.rshift(bit.band(buf(0,1):uint(), 0x20), 5) + local srcaddr = bit.band(buf(0,1):uint(), 0x0F) + local dsttype = bit.rshift(bit.band(buf(1,1):uint(), 0x20), 5) + local dstaddr = bit.band(buf(1,1):uint(), 0x0F) + local ptype = bit.rshift(bit.band(buf(2,1):uint(), 0x70), 4) + + -- Display information + local packet_type_name = packettype[ptype] or "UNKNOWN" + local src_type_name = addrtype[srctype] or "UNKNOWN" + local dst_type_name = addrtype[dsttype] or "UNKNOWN" + + pinfo.cols.protocol = p_fujitsuair.name + pinfo.cols.info = string.format("%s [%s %u → %s %u]", packet_type_name, src_type_name, srcaddr, dst_type_name, dstaddr) + local subtree = tree:add(p_fujitsuair, buf(), p_fujitsuair.description) + subtree:append_text(string.format(", Src: %s %u, Dst: %s %u", addrtype[srctype], srcaddr, addrtype[dsttype], dstaddr)) + + -- Track duplicates + do + local frame_no = frame_number().value + local ip_src_f = ip_src() or ipv6_src() + local udp_srcport_f = udp_srcport() + local src_ip = ip_src_f and tostring(ip_src_f.value) or "unknown" + local src_port = udp_srcport_f and udp_srcport_f.value or 0 + local srcdst = buf(0,2):uint() + local tracking_key = string.format("%s:%u:%u", src_ip, src_port, srcdst) + local data = buf(2):uint64() + + local i = 0 + if not track_unique[tracking_key] then + track_unique[tracking_key] = {} + track_unique_list[tracking_key] = {} + end + for _, f in ipairs(track_unique_list[tracking_key]) do + if (f >= frame_no) then break end + i = f + end + if (track_unique[tracking_key][i] == data) then + subtree:add(f_duplicate, true):set_generated() + subtree:add(f_dup_frame, i):set_generated() + elseif (track_unique[tracking_key][frame_no] == nil) then + track_unique[tracking_key][frame_no] = data + track_unique_list[tracking_key][#track_unique_list[tracking_key] + 1] = frame_no + end + end + + -- Dissect the packet + + -- byte 0 + subtree:add(f_unk0 , buf(0,1)) + subtree:add(f_src_type, buf(0,1)) + subtree:add(f_unk16 , buf(0,1)) + subtree:add(f_src , buf(0,1)) + -- byte 1 + subtree:add(f_unk1 , buf(1,1)) + subtree:add(f_token_dst_type, buf(1,1)) + subtree:add(f_unk18 , buf(1,1)) + subtree:add(f_token_dst , buf(1,1)) + -- byte 2 + subtree:add(f_unk2 , buf(2,1)) + subtree:add(f_type , buf(2,1)) + if srctype == 0 then -- INDOOR UNIT + if ptype == 0 then -- CONFIG + subtree:add(f_standby , buf(2,1)) + subtree:add(f_unk3 , buf(2,1)) + elseif ptype == 6 then -- ZONE FUNCTION + subtree:add(f_unk20 , buf(2,1)) + else + subtree:add(f_unk26 , buf(2,1)) + end + else -- REMOTE + if ptype == 0 or ptype == 3 or ptype == 5 then -- CONFIG, FUNCTION, ZONE CONFIG + subtree:add(f_write , buf(2,1)) + subtree:add(f_unk3 , buf(2,1)) + else + subtree:add(f_unk26 , buf(2,1)) + end + end + + local used = 3 + + if ptype == 0 then -- CONFIG + local CONFIGtree = subtree:add("", "CONFIG") + + -- byte 3 + CONFIGtree:add(f_error , buf(3,1)) + CONFIGtree:add(f_fan , buf(3,1)) + CONFIGtree:add(f_mode , buf(3,1)) + CONFIGtree:add(f_enabled , buf(3,1)) + -- byte 4 + CONFIGtree:add(f_eco , buf(4,1)) + CONFIGtree:add(f_testrun , buf(4,1)) + CONFIGtree:add(f_unk6 , buf(4,1)) + CONFIGtree:add(f_temp , buf(4,1)) + + if srctype == 0 then -- INDOOR UNIT + -- byte 5 + CONFIGtree:add(f_unk7 , buf(5,1)) + CONFIGtree:add(f_swing_horizontal , buf(5,1)) + CONFIGtree:add(f_unk24 , buf(5,1)) + CONFIGtree:add(f_swing_vertical , buf(5,1)) + CONFIGtree:add(f_unk25 , buf(5,1)) + -- byte 6 + CONFIGtree:add(f_lock_filter_reset , buf(6,1)) + CONFIGtree:add(f_lock_on_off , buf(6,1)) + CONFIGtree:add(f_lock_mode , buf(6,1)) + CONFIGtree:add(f_lock_unknown , buf(6,1)) + CONFIGtree:add(f_lock_timer , buf(6,1)) + CONFIGtree:add(f_lock_all , buf(6,1)) + CONFIGtree:add(f_seen_secondary_rc , buf(6,1)) + CONFIGtree:add(f_seen_primary_rc , buf(6,1)) + -- byte 7 + CONFIGtree:add(f_unk22 , buf(7,1)) + CONFIGtree:add(f_filter_timer , buf(7,1)) + CONFIGtree:add(f_unk19 , buf(7,1)) + else -- REMOTE + -- byte 5 + CONFIGtree:add(f_controller_sensor , buf(5,1)) + CONFIGtree:add(f_unk8 , buf(5,1)) + CONFIGtree:add(f_swing_horizontal , buf(5,1)) + CONFIGtree:add(f_set_horizontal_louver , buf(5,1)) + CONFIGtree:add(f_swing_vertical , buf(5,1)) + CONFIGtree:add(f_set_vertical_louver , buf(5,1)) + CONFIGtree:add(f_unk9 , buf(5,1)) + -- byte 6 + CONFIGtree:add(f_unk11 , buf(6,1)) + CONFIGtree:add(f_controller_temp , buf(6,1), buf(6,1):bitfield(1,7) / 2) -- No bit field displayed for floats, unfortunately + -- byte 7 + CONFIGtree:add(f_unk22 , buf(7,1)) + CONFIGtree:add(f_reset_filter_timer , buf(7,1)) + CONFIGtree:add(f_maintenance , buf(7,1)) + CONFIGtree:add(f_unk23 , buf(7,1)) + end + + used = used + 5 + elseif ptype == 1 and srctype == 0 then -- INDOOR UNIT ERROR + local errcode = buf(4,1):bytes():tohex() + local errcode_ext = buf(3,1):bitfield(0,4) + if errcode_ext ~= 0 then + errcode = errcode .. string.format(".%u", errcode_ext) + end + if errcode:sub(1, 1) == "D" then + errcode = "J" .. errcode:sub(2) + end + -- byte 3 + subtree:add(f_errcode_ext , buf(3,1)) + subtree:add(f_unk4 , buf(3,1)) + -- byte 4 + subtree:add(f_errcode_base , buf(4,1)) + -- combined + subtree:add(f_errcode , errcode) + + used = used + 2 + elseif ptype == 2 and srctype == 0 then -- INDOOR UNIT FEATURES + local featuretree = subtree:add("", "Supported Features") + -- byte 3 + featuretree:add(f_unk21 , buf(3,1)) + featuretree:add(f_f_mode_auto , buf(3,1)) + featuretree:add(f_f_mode_heat , buf(3,1)) + featuretree:add(f_f_mode_fan , buf(3,1)) + featuretree:add(f_f_mode_dry , buf(3,1)) + featuretree:add(f_f_mode_cool , buf(3,1)) + -- byte 4 + featuretree:add(f_unk5 , buf(4,1)) + featuretree:add(f_f_fan_quiet , buf(4,1)) + featuretree:add(f_f_fan_low , buf(4,1)) + featuretree:add(f_f_fan_medium , buf(4,1)) + featuretree:add(f_f_fan_high , buf(4,1)) + featuretree:add(f_f_fan_auto , buf(4,1)) + -- byte 5 + featuretree:add(f_f_filter_timer , buf(5,1)) + featuretree:add(f_f_sensor_switching , buf(5,1)) + featuretree:add(f_unk17 , buf(5,1)) + featuretree:add(f_f_maintenance_button , buf(5,1)) + featuretree:add(f_f_economy_mode , buf(5,1)) + featuretree:add(f_f_swing_horizontal , buf(5,1)) + featuretree:add(f_f_swing_vertical , buf(5,1)) + -- byte 6 + subtree:add(f_unk10 , buf(6,1)) + -- byte 7 + subtree:add(f_unk12 , buf(7,1)) + + used = used + 5 + elseif ptype == 3 then -- FUNCTION + -- byte 3 + subtree:add(f_unk13 , buf(3,1)) + -- byte 4 + subtree:add(f_function , buf(4,1)) + -- byte 5 + subtree:add(f_funcval , buf(5,1)) + -- byte 6 + subtree:add(f_unk14 , buf(6,1)) + -- byte 7 + subtree:add(f_unk15 , buf(7,1)) + subtree:add(f_indoorunit , buf(7,1)) + + used = used + 5 + elseif ptype == 4 and srctype == 0 then -- STATUS + -- byte 3 + subtree:add(f_unk27 , buf(3,1)) + subtree:add(f_unk28 , buf(3,1)) + -- byte 4 + subtree:add(f_unk29 , buf(4,1)) + -- byte 5 + subtree:add(f_unk30 , buf(5,1)) + -- byte 6 + subtree:add(f_unk31 , buf(6,1)) + + used = used + 4 + elseif ptype == 5 then -- ZONE CONFIG + local CONFIGtree = subtree:add("", "ZONE CONFIG") + -- byte 3 + local ZONEtree = CONFIGtree:add(f_zones , buf(3,1)) + ZONEtree:add(f_zone8 , buf(3,1)) + ZONEtree:add(f_zone7 , buf(3,1)) + ZONEtree:add(f_zone6 , buf(3,1)) + ZONEtree:add(f_zone5 , buf(3,1)) + ZONEtree:add(f_zone4 , buf(3,1)) + ZONEtree:add(f_zone3 , buf(3,1)) + ZONEtree:add(f_zone2 , buf(3,1)) + ZONEtree:add(f_zone1 , buf(3,1)) + -- byte 4 + CONFIGtree:add(f_unk33 , buf(4,1)) + CONFIGtree:add(f_unk32 , buf(4,1)) + local ZONEGROUPStree = CONFIGtree:add(f_zone_groups , buf(4,1)) + ZONEGROUPStree:add(f_zone_group_night , buf(4,1)) + ZONEGROUPStree:add(f_zone_group_day , buf(4,1)) + CONFIGtree:add(f_unk37 , buf(4,1)) + -- byte 5 + local ZONEGROUP14tree = CONFIGtree:add(f_zone_grouping_1_4 , buf(5,1)) + local ZONEGROUP4tree = ZONEGROUP14tree:add(f_zone4_groups , buf(5,1)) + ZONEGROUP4tree:add(f_zone4_night , buf(5,1)) + ZONEGROUP4tree:add(f_zone4_day , buf(5,1)) + local ZONEGROUP3tree = ZONEGROUP14tree:add(f_zone3_groups , buf(5,1)) + ZONEGROUP3tree:add(f_zone3_night , buf(5,1)) + ZONEGROUP3tree:add(f_zone3_day , buf(5,1)) + local ZONEGROUP2tree = ZONEGROUP14tree:add(f_zone2_groups , buf(5,1)) + ZONEGROUP2tree:add(f_zone2_night , buf(5,1)) + ZONEGROUP2tree:add(f_zone2_day , buf(5,1)) + local ZONEGROUP1tree = ZONEGROUP14tree:add(f_zone1_groups , buf(5,1)) + ZONEGROUP1tree:add(f_zone1_night , buf(5,1)) + ZONEGROUP1tree:add(f_zone1_day , buf(5,1)) + -- byte 6 + local ZONEGROUP58tree = CONFIGtree:add(f_zone_grouping_5_8 , buf(6,1)) + local ZONEGROUP8tree = ZONEGROUP58tree:add(f_zone8_groups , buf(6,1)) + ZONEGROUP8tree:add(f_zone8_night , buf(6,1)) + ZONEGROUP8tree:add(f_zone8_day , buf(6,1)) + local ZONEGROUP7tree = ZONEGROUP58tree:add(f_zone7_groups , buf(6,1)) + ZONEGROUP7tree:add(f_zone7_night , buf(6,1)) + ZONEGROUP7tree:add(f_zone7_day , buf(6,1)) + local ZONEGROUP6tree = ZONEGROUP58tree:add(f_zone6_groups , buf(6,1)) + ZONEGROUP6tree:add(f_zone6_night , buf(6,1)) + ZONEGROUP6tree:add(f_zone6_day , buf(6,1)) + local ZONEGROUP5tree = ZONEGROUP58tree:add(f_zone5_groups , buf(6,1)) + ZONEGROUP5tree:add(f_zone5_night , buf(6,1)) + ZONEGROUP5tree:add(f_zone5_day , buf(6,1)) + -- byte 7 + CONFIGtree:add(f_unk35 , buf(7,1)) + + used = used + 5 + elseif ptype == 6 then -- ZONE FUNCTION (IU ACKs) + local CONFIGtree = subtree:add("", "ZONE FUNCTION") + if srctype == 0 then -- INDOOR UNIT + -- byte 2 + CONFIGtree:add(f_zone_common , buf(2,1)) + -- byte 3 + local ZONEtree = CONFIGtree:add(f_zones , buf(3,1)) + ZONEtree:add(f_zone8 , buf(3,1)) + ZONEtree:add(f_zone7 , buf(3,1)) + ZONEtree:add(f_zone6 , buf(3,1)) + ZONEtree:add(f_zone5 , buf(3,1)) + ZONEtree:add(f_zone4 , buf(3,1)) + ZONEtree:add(f_zone3 , buf(3,1)) + ZONEtree:add(f_zone2 , buf(3,1)) + ZONEtree:add(f_zone1 , buf(3,1)) + else -- REMOTE + CONFIGtree:add(f_unk36 , buf(3,1)) + end + -- byte 4 + CONFIGtree:add(f_unk34 , buf(4,1)) + -- byte 5 + if srctype == 0 then -- INDOOR UNIT + CONFIGtree:add(f_unk39 , buf(5,1)) + else -- REMOTE + CONFIGtree:add(f_zone_func_write , buf(5,1)) + CONFIGtree:add(f_unk38 , buf(5,1)) + end + -- byte 6 + CONFIGtree:add(f_zone_func_location , buf(6,1)) + -- byte 7 + CONFIGtree:add(f_zone_func_value , buf(7,1)) + + used = used + 5 + end + + if (used < frame_len) then + Dissector.get("data"):call(buf(used):tvb(), pinfo, tree) + end +end + +local tzsp_encap_d = DissectorTable.get("tzsp.encap") +tzsp_encap_d:add(tzsp_encap_type, p_fujitsuair) diff --git a/dissectors/fujitsu-airstage-h/protocol-notes.txt b/dissectors/fujitsu-airstage-h/protocol-notes.txt new file mode 100644 index 0000000..d0c570d --- /dev/null +++ b/dissectors/fujitsu-airstage-h/protocol-notes.txt @@ -0,0 +1,62 @@ +I am using + +ARU18RLF +UTY-RNNUM +UTY-RSNUM + +These are connected with three wires, and is commonly called RWB type after the wire colors Red-White-Black. Some systems use a two wire connection instead. + +I do not have multiple indoor units setup with group control, so cannot document that aspect of the protocol. + +Fujitsu Mobile Technician app states models with fourth character being a letter use a new serial communication method, however the following appears to use a remote compatible with my system. + +ARYG60LHTA Installation manual states compatible with UTY-RNN*M and UTY-RSN*M and in section 5.1 (Remote Control Installation: Group Control): + A number of indoor units can be operated at the same time using a single remote controller. Connect up to 16 indoor units in a system. + R.C. address = Remote controller address + Set the R.C. address of each indoor unit using the DIP switch on the indoor unit circuit board. + Valid R.C. addresses are 0-15 + Be sure to set consecutive R.C. address. The indoor units cannot be operated if a number is skipped. + R.C. address is not the same as refrigerant circuit address + R.C. address is not the same as remote control Primary/Secondary + Turn on the indoor unit with the R.C. address 00 last. (Within 1 minute) + +ARU18RLF Installation Manual does not have these details but states compatible with UTY-RNNUM and UTY-RSNUM + Refers to R.C. address as Unit number of indoor unit. + +I will refer to + Indoor unit as IU, + Remote control as RC, + R.C. address / unit number of indoor unit as IU address or IU#, + Primary/Secondary remote control as RC0/RC1 + +When operating as group control, all IU have settings changed simultaneously (for example RC set to heat mode, all IU switch to heat mode). +The only time RC changes something on individual IU is when setting function values, where IU address, function number, and setting value are all specified. + +If two primary RC are connected, they transmit at the same time and corrupt packet is created on bus. + +Packets are 8 bytes. + +Protocol appears to be token based. First byte includes source address, second byte address of who may transmit next, NOT who packet is for. +IU0 uses data from packets where second byte address is IU1, RC1... + For example, with both primary and secondary RC where RC0 has temperature sensor, CONFIG packet goes IU0 -> RC0 -> RC1 -> IU1. + RC0 sets sensor temperature in CONFIG packet, RC1 sets sensor temperature as 0, but IU0 still uses sensor value from RC0. + +Token order appears to be IU0 -> RC0 -> RC1 -> RC2 -> ... -> IU1 (-> IU2 -> IU3 -> ...?) + +After token is assigned to address which does not respond (timeout of a few hundred milliseconds), IU0 restarts token. + +At power on, IU0 emits packets: + Current STATUS from IU0 -> IU0 repeating every 30 seconds, occasionally at other times resetting 30 second timer. + Current CONFIG from IU0 -> RC0 repeating at just under 1 second intervals + Current CONFIG from IU0 -> IU1 repeating at just under 1 second intervals + +If RC0 transmits, IU0 -> IU1 CONFIG stops. Most likely, this allows all IU to stay in sync when no RC is present, if IU1 responds, likely IU0 -> RC0 continues, or is replaced by IU1 -> RC0. + +When primary RC (RC0) receives token from IU0 for first time, it transmits FEATURES from RC0 to IU1. +Next cycle, IU0 transmits FEATURES which appears to details features/capabilities supported by indoor unit. RC knows which buttons (swing, sensor switching, ...) are available from this packet, can display lock icon if button pressed for unsupported feature. +Next RC0 transmits own CONFIG giving token to RC1. + +If there is a secondary RC, RC1 transmits CONFIG, giving token to RC2. Next cycle, RC1 again gives token to RC2. Following cycles, RC1 gives token to IU1. Likely if RC2 were to transmit, RC1 would continue to give token to RC2, and RC2 would look for RC3 and then revert to IU1. + +If there is no secondary RC, next cycle RC0 gives token to IU1. + diff --git a/dissectors/fujitsu-airstage-h/wireshark-coloring-rules.txt b/dissectors/fujitsu-airstage-h/wireshark-coloring-rules.txt new file mode 100644 index 0000000..097f042 --- /dev/null +++ b/dissectors/fujitsu-airstage-h/wireshark-coloring-rules.txt @@ -0,0 +1,3 @@ +# This file was created by Wireshark. Edit with care. +@Comment@frame.comment@[51143,38807,65535][4626,10023,11822] +@FujitsuAir Duplicate@fujitsuair.duplicate || fujitsuair-dmmum.duplicate@[65535,65535,65535][47802,48573,46774] diff --git a/dissectors/gdl90-kyser/LICENSE b/dissectors/gdl90-kyser/LICENSE new file mode 100644 index 0000000..8cdb845 --- /dev/null +++ b/dissectors/gdl90-kyser/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. + + {description} + Copyright (C) {year} {fullname} + + 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. + +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) year 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. + + {signature of Ty Coon}, 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 Lesser General +Public License instead of this License. + diff --git a/dissectors/gdl90-kyser/README.md b/dissectors/gdl90-kyser/README.md new file mode 100644 index 0000000..438215f --- /dev/null +++ b/dissectors/gdl90-kyser/README.md @@ -0,0 +1,77 @@ +# GDL 90 — interface de données ADS-B (BrantKyser) + +Dissecteur Wireshark Lua du protocole GDL 90 (« GDL 90 Data Interface +Specification », FAA / Garmin). Ce protocole est émis sur UDP par les +récepteurs ADS-B / UAT à destination des tablettes de vol (EFB). Le +script décode la trame (fanions `0x7E`, désémaphorage des octets `0x7D`, +contrôle du FCS CRC-16) puis les messages Heartbeat, Initialization, +Uplink Data, Height Above Terrain, Ownship Report, Ownship Geometric +Altitude, Traffic Report, Basic Report et le message propriétaire +uAvionix Static (`0x75`) (issue #530). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/BrantKyser/gdl90Dissector (`gdl90Dissector.lua`) | +| Commit importé | `04bb0c2e95c887152be39bd0a055633d19dfa76f` du 27/07/2021 (dernier commit de `master`) ; dernière modification du script : commit `1df3c53d2294de828a07af146eeb0830eb37be5c` du 07/05/2020 | +| Licence amont | GPLv2 (fichier `LICENSE` du dépôt, sans clause « or later » ; le script ne porte aucune mention de licence) — auteurs : Brant K. Kyser, Ryan C. Braun, Brad Walker. Déclarée `GPL-2.0-only` comme pour `dissectors/avionique` | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur GDL 90 dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/gdl90Dissector.lua` | Protocole `gdl90` (« GDL 90 », ligne 8), inscrit sur UDP 4000 (lignes 403 à 405) ; table des messages décodés (lignes 366 à 374) | + +## Utilisation + +`wireshark -X lua_script:src/gdl90Dissector.lua`, ou copier le fichier +dans le dossier des plugins Lua personnels de Wireshark (« Aide › À +propos de Wireshark › Dossiers »), puis recharger avec Ctrl+Maj+L. +Filtre : `gdl90`. Le port UDP 4000 est fixé dans le code (pas de +préférence) ; pour un autre port, utiliser « Décoder comme… ». + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. +Captures synthétiques sur UDP 4000, construites d'après la spécification +GDL 90 révision A (FCS calculé avec l'algorithme de table de la +spécification) : + +| Essai | Résultat | +|---|---| +| Heartbeat (GPS valide, UTC OK, horodatage 43200 s) | décodé : octets d'état, compteurs, FCS valide ; **horodatage faux** : « 108736 Seconds since 0000Z » (voir Limites) | +| Heartbeat contenant `0x7E` et `0x7D` (désémaphorage) | « Heartbeat, Stuffed, Len=13 », longueur désémaphorée 11, FCS valide | +| Heartbeat au FCS altéré | « Heartbeat, Invalid FCS » | +| Ownship Geometric Altitude (`0x0B`) | décodé : « 4000 ft. », indicateur d'alerte, facteur de mérite vertical | +| Height Above Terrain (`0x09`) | décodé : « 1200 ft. » | +| Ownship Report (`0x0A`) et Traffic Report (`0x14`) | **erreur Lua** ligne 120 (`attempt to call a nil value (field 'extract')`) : seul « Traffic Alert Status » est affiché | +| Heartbeat et Ownship Report dans un même datagramme | traités comme un seul message : « Heartbeat, Invalid FCS » | +| Heartbeat tronqué (`7E 00 81 7E`) | **erreur Lua** ligne 45 (`Range is out of bounds`) | +| Identifiant inconnu (`0x99`) | « Unknown 0x99 », FCS affiché | + +## Limites constatées + +- `bit.extract` n'existe pas dans la bibliothèque `bit` (BitOp) fournie + par Wireshark : les lignes 120, 138, 141, 144, 152, 170, 222 et 227 + échouent. Ownship Report, Traffic Report (fonction commune + `dissectTrafficReportFields`) et uAvionix Static ne sont donc pas + décodés au-delà de leurs premiers champs. Ce sont pourtant les messages + principaux du protocole. +- Horodatage du Heartbeat (lignes 44 à 46) : l'octet d'état 2 entier est + décalé de 16 bits au lieu de son seul bit 7. Tout autre bit à 1 (par + exemple « UTC OK ») fausse la valeur. +- Un seul message par datagramme : plusieurs trames GDL 90 concaténées + dans un même paquet UDP sont lues comme une seule, avec un FCS invalide. +- Pas de contrôle de longueur : un message tronqué provoque une erreur + Lua. +- Champs affichés en texte libre (pas de champs filtrables comme + `gdl90.msg_id`) : seul le filtre `gdl90` est disponible. +- Pas de capture réelle disponible dans le dépôt amont. diff --git a/dissectors/gdl90-kyser/src/gdl90Dissector.lua b/dissectors/gdl90-kyser/src/gdl90Dissector.lua new file mode 100644 index 0000000..787b193 --- /dev/null +++ b/dissectors/gdl90-kyser/src/gdl90Dissector.lua @@ -0,0 +1,405 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/BrantKyser/gdl90Dissector (gdl90Dissector.lua), +-- commit 04bb0c2e95c887152be39bd0a055633d19dfa76f du 27/07/2021 (dernière modification du fichier : +-- commit 1df3c53d2294de828a07af146eeb0830eb37be5c du 07/05/2020). +-- Licence amont : GPL-2.0, LICENSE du dépôt — voir README.md et LICENSE. +-- GDL90 protocol dissector +-- declare our protocol +gdl90_proto = Proto("gdl90","GDL 90") + +local function dissectMessageID(buffer,pinfo,subtree,desc) + subtree:add(buffer(1,1),"Message ID: " .. buffer(1,1):uint() .. " (" .. desc .. ")") + pinfo.cols.info = desc +end + +local function bitValue(byteValue,pos) + return bit.rshift(bit.band(bit.lshift(1,pos),byteValue),pos) +end + +local function dissectHeartbeat(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Heartbeat") + + local statusByte1Tree = subtree:add(gdl90_proto,buffer(2,1),"Status Byte 1") + local statusByteValue = buffer(2,1):uint() + statusByte1Tree:add(buffer(2,1),"GPS Pos Valid : " .. bitValue(statusByteValue,7)) + statusByte1Tree:add(buffer(2,1),"Maint Required : " .. bitValue(statusByteValue,6)) + statusByte1Tree:add(buffer(2,1),"IDENT : " .. bitValue(statusByteValue,5)) + statusByte1Tree:add(buffer(2,1),"Address Type : " .. bitValue(statusByteValue,4)) + statusByte1Tree:add(buffer(2,1),"GPS Batt Low : " .. bitValue(statusByteValue,3)) + statusByte1Tree:add(buffer(2,1),"RATCS : " .. bitValue(statusByteValue,2)) + statusByte1Tree:add(buffer(2,1),"Reserved : " .. bitValue(statusByteValue,1)) + statusByte1Tree:add(buffer(2,1),"UAT Initialized: " .. bitValue(statusByteValue,0)) + + local statusByte2Tree = subtree:add(gdl90_proto,buffer(3,1),"Status Byte 2") + local statusByte2Value = buffer(3,1):uint() + statusByte2Tree:add(buffer(3,1),"Time Stamp MSB : " .. bitValue(statusByte2Value,7)) + statusByte2Tree:add(buffer(3,1),"CSA Requested : " .. bitValue(statusByte2Value,6)) + statusByte2Tree:add(buffer(3,1),"CSA Not Available: " .. bitValue(statusByte2Value,5)) + statusByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(statusByte2Value,4)) + statusByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(statusByte2Value,3)) + statusByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(statusByte2Value,2)) + statusByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(statusByte2Value,1)) + statusByte2Tree:add(buffer(3,1),"UTC OK : " .. bitValue(statusByte2Value,0)) + + local timeStampValueMSB = bit.lshift(buffer(3,1):uint(),16) + local timeStampValue = bit.bor(timeStampValueMSB,buffer(4,1):uint()) + timeStampValue = bit.bor(timeStampValue,bit.lshift(buffer(5,1):uint(),8)) + + subtree:add(buffer(3,3),"Time Stamp: " .. timeStampValue .. " Seconds since 0000Z") + + local msgCountsTree = subtree:add(gdl90_proto,buffer(6,2),"Message Counts") + local uplinkReceptionsValue = bit.rshift(buffer(6,1):uint(),3) + local basicAndLongReceptionsValue = bit.bor(bit.band(buffer(6,1):uint(),3),buffer(7,1):uint()) + msgCountsTree:add(buffer(6,1),"Uplink Receptions: " .. uplinkReceptionsValue) + msgCountsTree:add(buffer(6,2),"Basic and Long Receptions: " .. basicAndLongReceptionsValue) +end + +local function dissectInitialization(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Initialization") + + local configByte1Tree = subtree:add(gdl90_proto,buffer(2,1),"Configuration Byte 1") + local configByteValue = buffer(2,1):uint() + configByte1Tree:add(buffer(2,1),"Reserved : " .. bitValue(configByteValue,7)) + configByte1Tree:add(buffer(2,1),"Audio Test : " .. bitValue(configByteValue,6)) + configByte1Tree:add(buffer(2,1),"Reserved : " .. bitValue(configByteValue,5)) + configByte1Tree:add(buffer(2,1),"Reserved : " .. bitValue(configByteValue,4)) + configByte1Tree:add(buffer(2,1),"Reserved : " .. bitValue(configByteValue,3)) + configByte1Tree:add(buffer(2,1),"Reserved : " .. bitValue(configByteValue,2)) + configByte1Tree:add(buffer(2,1),"Audio Inhibit: " .. bitValue(configByteValue,1)) + configByte1Tree:add(buffer(2,1),"CDTI OK : " .. bitValue(configByteValue,0)) + + local configByte2Tree = subtree:add(gdl90_proto,buffer(3,1),"Configuration Byte 2") + local configByte2Value = buffer(3,1):uint() + configByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(configByte2Value,7)) + configByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(configByte2Value,6)) + configByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(configByte2Value,5)) + configByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(configByte2Value,4)) + configByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(configByte2Value,3)) + configByte2Tree:add(buffer(3,1),"Reserved : " .. bitValue(configByte2Value,2)) + configByte2Tree:add(buffer(3,1),"CSA Audio Disable: " .. bitValue(configByte2Value,1)) + configByte2Tree:add(buffer(3,1),"CSA Disable : " .. bitValue(configByte2Value,0)) + +end + +local function dissectUplinkData(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Uplink Data") + + subtree:add(buffer(2,3),"Time Of Reception: " .. buffer(2,3):uint()) + subtree:add(buffer(5,8),"UAT Header: " .. buffer(5,8)) + + local appDataLen = buffer:reported_length_remaining() - 14 + subtree:add(buffer(11,appDataLen),"Application Data: " .. buffer(11,appDataLen)) +end + +local function dissectHeightAboveTerrain(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Height Above Terrain") + + subtree:add(buffer(2,2),"Height Above Terrain: " .. buffer(2,2):int() .. " ft.") +end + +-- Convert to degrees +-- Provided as 24-bit signed binary fraction +-- Encoded as a "semicircle" 2s complement +-- North and East are positive, +-180 +-- No valid position is lat=lon=NIC=0 +-- TODO Validate proper decode +local function decodeLatLon(value) + local deg = value + if (bit.band(value, 0x800000) == 0x800000) then + -- Negative value + deg = bit.band(value, 0x000007FFFFF)-0x800000 + end + deg = deg * 180 / 0x800000 + return deg +end + +local function dissectTrafficReportFields(buffer,pinfo,subtree) + local trafficAlertStatus = bit.rshift(buffer(0,1):uint(),4) + subtree:add(buffer(0,1), "Traffic Alert Status: " .. trafficAlertStatus) + + local addressType = bit.extract(buffer(0,1):uint(),0,4) + subtree:add(buffer(0,1), "Address Type: " .. addressType) + + subtree:add(buffer(1,3), "Participant Address (hex): " .. buffer(1,3):bytes():tohex()) + + local latitude = buffer(4,3):uint() + latitude = decodeLatLon(latitude) + subtree:add(buffer(4,3), "Latitude: " .. latitude) + local longitude = buffer(7,3):uint() + longitude = decodeLatLon(longitude) + subtree:add(buffer(7,3), "Longitude: " .. longitude) + + -- Altitude given in feet ("ddd" * 25) - 1000 + local altitude = bit.rshift(buffer(10,2):uint(),4) + altitude = altitude * 25 - 1000 + subtree:add(buffer(10,2), "Altitude: " .. altitude .. " feet") + + local miscIndicatorsTree = subtree:add(gdl90_proto,buffer(11,1),"Miscellaneous Indicators") + local miscIndicatorsValue = bit.extract(buffer(11,1):uint(),0,4) + miscIndicatorsTree:add(buffer(11,1), "Airborne: " .. bitValue(miscIndicatorsValue,3)) + miscIndicatorsTree:add(buffer(11,1), "Report Extrapolated: " .. bitValue(miscIndicatorsValue,2)) + miscIndicatorsTree:add(buffer(11,1), "TT: " .. bit.extract(miscIndicatorsValue,0,2)) + + subtree:add(buffer(12,1), "NIC: " .. bit.rshift(buffer(12,1):uint(),4)) + subtree:add(buffer(12,1), "NACp: " .. bit.extract(buffer(12,1):uint(),0,4)) + + subtree:add(buffer(13,2), "Horizontal Velocity: " .. bit.rshift(buffer(13,2):uint(),4) .. " knots") + + -- Vertical velocity signed in units of 64 fpm + -- 0x000 is 0 + -- 0x001 is +64 + -- 0xFFF is -64 + local verticalVelocity = bit.extract(buffer(14,2):uint(),0,12) + if (bit.band(verticalVelocity, 0x800) == 0x800) then + -- Negative value, convert + verticalVelocity = bit.band(verticalVelocity, 0x000007FF)-0x800 + end + verticalVelocity = verticalVelocity * 64 + subtree:add(buffer(14,2), "Vertical Velocity: " .. verticalVelocity .. " fpm") + + -- Track/Heading 8-bit angular weighted binary, resolution 360/256 degrees + -- 0=North, 128=South + local tt = buffer(16,1):uint() * 360 / 256; + subtree:add(buffer(16,1), "Track/Heading: " .. tt) + + subtree:add(buffer(17,1), "Emitter Category: " .. buffer(17,1):uint()) + + subtree:add(buffer(18,8), "Callsign: " .. buffer(18,8):string()) + + subtree:add(buffer(26,1), "Emergency/Priority Code: " .. bit.rshift(buffer(26,1):uint(),4)) + subtree:add(buffer(26,1), "Spare: " .. bit.extract(buffer(26,1):uint(),0,4)) + +end + +local function dissectOwnshipReport(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Ownship Report") + + dissectTrafficReportFields(buffer(2,27),pinfo,subtree); +end + +local function dissectOwnshipGeometricAltitude(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Ownship Geometric Altitude") + + subtree:add(buffer(2,2),"Ownship Geometric Altitude: " .. buffer(2,2):int() * 5 .. " ft.") + + local verticalMetricsTree = subtree:add(gdl90_proto,buffer(4,2),"Vertical Metrics") + verticalMetricsTree:add(buffer(4,1),"Vertical Warning indicator: " .. bitValue(buffer(4,1):uint(),7)) + + local verticalFigureOfMerritValue = bit.band(32767, buffer(4,2):uint()) + verticalMetricsTree:add(buffer(4,2),"Vertical Figure of Merit: " .. verticalFigureOfMerritValue) +end + +local function dissectTrafficReport(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Traffic Report") + + dissectTrafficReportFields(buffer(2,27),pinfo,subtree); +end + +local function dissectBasicReport(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Basic Report") +end + +local function dissectLongReport(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Long Report") +end + +local function dissectUavionixStatic(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"uAvionix Static Configuration") + + subtree:add(buffer(2,1), "Signature: " .. buffer(2,1):uint()) + local subtype = buffer(3,1):uint() + subtree:add(buffer(3,1), "Subtype: " .. subtype) + subtree:add(buffer(4,1), "Version: " .. buffer(4,1):uint()) + + if (subtype == 1) then + -- Static packet + + subtree:add(buffer(5,3), "ICAO Address (hex): " .. buffer(5,3):bytes():tohex()) + subtree:add(buffer(8,1), "Emitter Category: " .. buffer(8,1):uint()) + subtree:add(buffer(9,8), "Callsign: " .. buffer(9,8):string()) + subtree:add(buffer(17,1), "Vs0: " .. buffer(17,1):uint()) + + local lenWidth = bit.extract(buffer(18,1):uint(),0,4) + subtree:add(buffer(18,1), "Vehicle Length/Width: " .. lenWidth .. " (0x" .. string.format("%x", lenWidth) .. ")") + + local antOffsetLat = bit.rshift(buffer(19,1):uint(),5) + subtree:add(buffer(19,1), "Antenna Offset Lat: " .. antOffsetLat .. " (0x" .. string.format("%x", antOffsetLat) .. ")") + local antOffsetLon = bit.extract(buffer(19,1):uint(),0,5) + subtree:add(buffer(19,1), "Antenna Offset Lon: " .. antOffsetLon .. " (0x" .. string.format("%x", antOffsetLon) .. ")") + elseif (subtype == 2) then + -- Setup packet + local sil = buffer(5,1):uint() + local sda = buffer(6,1):uint() + local threshold = bit.bxor(bit.lshift(buffer(8,1):uint(), 8), buffer(7,1):uint()) + if (sil == 0xFF) then + subtree:add(buffer(5,1), "SIL: Not Provided (0xff)") + else + subtree:add(buffer(5,1), "SIL: " .. sil) + end + if (sda == 0xFF) then + subtree:add(buffer(6,1), "SDA: Not Provided (0xff)") + else + subtree:add(buffer(6,1), "SDA: " .. sda) + end + if (threshold == 0xFFFF) then + subtree:add(buffer(7,2), "Sniffer Threshold: Not Provided (0xffff)") + else + subtree:add(buffer(7,2), "Sniffer Threshold: " .. threshold) + end + end +end + +local function dissectUnknown(buffer,pinfo,subtree) + dissectMessageID(buffer,pinfo,subtree,"Unknown 0x" .. string.format("%x", buffer(1,1):uint())) +end + +local crcTable = {0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, + 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, + 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, + 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, + 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, + 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, + 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, + 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, + 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, + 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, + 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, + 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, + 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, + 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, + 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, + 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, + 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, + 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, + 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, + 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, + 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, + 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, + 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, + 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, + 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, + 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, + 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, + 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, + 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, + 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, + 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, + 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, + 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, + 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, + 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, + 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, + 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, + 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, + 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, + 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, + 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0} + +-- Calculate CRC16 +local function calculateCrc16(buffer) + local pktlen = buffer:reported_length_remaining() + local crc = 0x0000; + local crcTemp1, crcTemp2, crcTemp3 + -- Don't calculate CRC over flag bytes or CRC + for i=1,pktlen-4 do + crcTemp1 = crcTable[bit.band(bit.rshift(crc, 8),0xFF)+1] + crcTemp2 = bit.lshift(bit.band(crc,0xFF), 8) + crcTemp3 = buffer(i,1):uint() + crc = bit.bxor(crcTemp1, crcTemp2, crcTemp3) + end + return crc; +end + +local function swap16(value) + return bit.band(bit.rshift(value, 8) + bit.lshift(value,8), 0xFFFF) +end + +-- Return true if valid +local function validateFcs(buffer,pinfo,subtree) + local pktlen = buffer:reported_length_remaining() + local crcCalculated = calculateCrc16(buffer) + local crcReceived = swap16(buffer(pktlen-3,2):uint()) + if crcCalculated == crcReceived then + subtree:add(buffer(pktlen-3,2),"Frame Check Sequence: 0x" .. string.format("%x",crcReceived)) + return true + else + local fcs = subtree:add(buffer(pktlen-3,2),"Frame Check Sequence: INVALID " .. string.format("recv=0x%x,calc=0x%x",crcReceived,crcCalculated)) + fcs:add_expert_info(PI_CHECKSUM, PI_ERROR, "Invalid FCS") + subtree:add_expert_info(PI_CHECKSUM, PI_ERROR, "Invalid FCS") + return false + end +end + +-- TODO optimize by running through buffer instead of moving +-- a byte at a time +local function unBytestuff(buffer) + local pktlen = buffer:reported_length_remaining() + local baOutput = ByteArray.new() + local outputIndex = 0 + local flagged = false + for i=0,pktlen-1 do + if buffer(i,1):uint() == 0x7D then + flagged = true + else + if flagged then + -- TODO UNSTUFF + local dataByte = bit.bxor(buffer(i,1):uint(),0x20) + baOutput:append(ByteArray.new(string.format("%x",dataByte))) + else + baOutput:append(buffer(i,1):bytes()) + end + flagged = false + end + end + return ByteArray.tvb(baOutput, "Unstuffed GDL90") +end + +-- Map Message ID values to methods to dissect particular type of message +msgDissectFunctions = {} +msgDissectFunctions[0] = dissectHeartbeat +msgDissectFunctions[2] = dissectInitialization +msgDissectFunctions[7] = dissectUplinkData +msgDissectFunctions[9] = dissectHeightAboveTerrain +msgDissectFunctions[10] = dissectOwnshipReport +msgDissectFunctions[11] = dissectOwnshipGeometricAltitude +msgDissectFunctions[20] = dissectTrafficReport +msgDissectFunctions[30] = dissectBasicReport +msgDissectFunctions[117] = dissectUavionixStatic + +-- create a function to dissect it +function gdl90_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "GDL90" + + local decodedBuffer = unBytestuff(buffer) + local decodedLen = decodedBuffer:reported_length_remaining() + + local pktlen = buffer:reported_length_remaining() + + local subtree = tree:add(gdl90_proto,decodedBuffer(),"GDL 90 Data") + subtree:add(buffer(0,pktlen),"Stuffed Len: " .. pktlen) + subtree:add(decodedBuffer(0,decodedLen),"Unstuffed Len: " .. decodedLen) + subtree:add(decodedBuffer(0,1),string.format("Flag Byte: 0x%02x", decodedBuffer(0,1):uint())) + + if (msgDissectFunctions[decodedBuffer(1,1):uint()] == nil) then + dissectUnknown(decodedBuffer,pinfo,subtree) + else + msgDissectFunctions[decodedBuffer(1,1):uint()](decodedBuffer,pinfo,subtree) + end + + local validFcs = validateFcs(decodedBuffer,pinfo,subtree) + subtree:add(decodedBuffer(decodedLen-1,1),string.format("Flag Byte: 0x%02x", decodedBuffer(decodedLen-1,1):uint())) + + if pktlen ~= decodedLen then + pinfo.cols.info = tostring(pinfo.cols.info) .. ", Stuffed" + end + if validFcs == false then + pinfo.cols.info = tostring(pinfo.cols.info) .. ", Invalid FCS" + end + pinfo.cols.info = tostring(pinfo.cols.info) .. ", Len=" .. pktlen +end +-- load the udp.port table +udp_table = DissectorTable.get("udp.port") +-- register our protocol to handle udp port 4000 +udp_table:add(4000,gdl90_proto) diff --git a/dissectors/gfarm/README.md b/dissectors/gfarm/README.md new file mode 100644 index 0000000..4cd4c03 --- /dev/null +++ b/dissectors/gfarm/README.md @@ -0,0 +1,57 @@ +# Gfarm — système de fichiers distribué (protocoles gfm et gfs) + +Dissecteurs Wireshark Lua des protocoles de **Gfarm v2**, système de +fichiers distribué en grille (Université de Tsukuba / AIST) : + +- `gfarm-gfm` : protocole entre clients / serveurs de fichiers et le + serveur de métadonnées **gfmd** (TCP 601) — environ 130 noms de + commandes `GFM_PROTO_*`, décodage des arguments et des réponses + (association requête / réponse par numéro de requête), drapeaux des + hôtes, des fichiers, des réplicas, des serveurs de métadonnées… ; +- `gfarm-gfs` : protocole entre clients et serveurs de fichiers **gfsd** + (TCP 600) — commandes `GFS_PROTO_*` (ouverture, lecture, écriture, + réplication…). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/oss-tsukuba/gfarm (dossier `util/wireshark/`) | +| Commit importé | `aefbfde261e3376e4adc6cbacf6d9b6837926548` du 29/10/2026 (branche `2.8`, branche par défaut, dernier commit ; dernières modifications des scripts : `gfarm-gfm.lua` `7049c33` du 03/12/2016, `gfarm-gfs.lua` `ca6ed35` du 30/11/2016) | +| Licence amont | BSD-3-Clause d'après l'en-tête des deux fichiers (« Copyright (c) 2011 Software Research Associates, Inc. », trois clauses) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Gfarm natif | + +Le `LICENSE` du dépôt Gfarm est une licence permissive propre (© AIST, +Osamu Tatebe) avec des exceptions LGPL pour d'autres dossiers ; les deux +scripts portent leur propre en-tête BSD à trois clauses, retenu ici (le +texte complet de la licence est dans l'en-tête de chaque fichier, aucun +fichier de licence n'est copié). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `gfarm-gfm.lua` | Protocole `gfarm-gfm` sur TCP 601 (métadonnées) | +| `gfarm-gfs.lua` | Protocole `gfarm-gfs` sur TCP 600 (serveurs de fichiers) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête. + +## Utilisation + +Copier les deux fichiers dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `gfarm-gfm` ou `gfarm-gfs`. (Les commentaires amont décrivent +l'ancienne méthode `dofile` dans `init.lua`.) + +## Remarques + +- **`require("bit")`** en tête des deux scripts : la note amont dit de + mettre cette ligne en commentaire pour Wireshark ≥ 2.0 (Lua ≥ 5.2). Si le + chargement échoue sur « module 'bit' not found », commenter la ligne ; + le reste utilise `bit.band`, fourni par Wireshark 4.4 et plus. +- Limites amont : certaines commandes gfm ne sont pas détaillées, et les + paquets fragmentés sur plusieurs segments TCP ne sont pas correctement + décodés. Les connexions authentifiées en TLS / GSI chiffré ne sont pas + lisibles. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/gfarm/gfarm-gfm.lua b/dissectors/gfarm/gfarm-gfm.lua new file mode 100644 index 0000000..4a7b579 --- /dev/null +++ b/dissectors/gfarm/gfarm-gfm.lua @@ -0,0 +1,3186 @@ +-- SPDX-License-Identifier: BSD-3-Clause +-- Importé de https://github.com/oss-tsukuba/gfarm (util/wireshark/gfarm-gfm.lua), +-- commit aefbfde261e3376e4adc6cbacf6d9b6837926548 du 29/10/2026. +-- Licence amont : BSD-3-Clause (en-tête du fichier, © 2011 Software Research Associates) — voir README.md. +-- +-- Copyright (c) 2011 Software Research Associates, Inc. +-- +-- Redistribution and use in source and binary forms, with or without +-- modification, are permitted provided that the following conditions +-- are met: +-- 1. Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- 2. Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in the +-- documentation and/or other materials provided with the distribution. +-- 3. Neither the name of the project nor the names of its contributors +-- may be used to endorse or promote products derived from this software +-- without specific prior written permission. +-- +-- THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +-- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +-- ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +-- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +-- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +-- SUCH DAMAGE. +-- + +-- +-- Gfarm v2 gfm protocol dissector for Wireshark. +-- +-- How To Use: +-- Edit Wireshark's 'init.lua'. Replace the following line +-- +-- disable_lua = true; do return end; +-- with +-- +-- -- disable_lua = true; do return end; +-- +-- Then, insert the following line at the end of the file: +-- +-- dofile("/somewhere/else/gfarm-gfm.lua") +-- +-- where "/somewhere/..." is an actual path of this file. +-- +-- Restrictions: +-- 1. Packet dissection of some gfm commands have not been implemented yet. +-- 2. Fragmentated packet are not dissected correctly. +-- + +-- NOTE: comment out the following line, if Wireshark >= 2.0 (i.e. Lua >= 5.2) +require("bit") + +-- +-- Mapping table: command code -> name. +-- +local gfm_command_names = { + [ 0] = 'GFM_PROTO_HOST_INFO_GET_ALL', + [ 1] = 'GFM_PROTO_HOST_INFO_GET_BY_ARCHITECTURE', + [ 2] = 'GFM_PROTO_HOST_INFO_GET_BY_NAMES', + [ 3] = 'GFM_PROTO_HOST_INFO_GET_BY_NAMEALIASES', + [ 4] = 'GFM_PROTO_HOST_INFO_SET', + [ 5] = 'GFM_PROTO_HOST_INFO_MODIFY', + [ 6] = 'GFM_PROTO_HOST_INFO_REMOVE', + [ 16] = 'GFM_PROTO_USER_INFO_GET_ALL', + [ 17] = 'GFM_PROTO_USER_INFO_GET_BY_NAMES', + [ 18] = 'GFM_PROTO_USER_INFO_SET', + [ 19] = 'GFM_PROTO_USER_INFO_MODIFY', + [ 20] = 'GFM_PROTO_USER_INFO_REMOVE', + [ 21] = 'GFM_PROTO_USER_INFO_GET_BY_GSI_DN', + [ 32] = 'GFM_PROTO_GROUP_INFO_GET_ALL', + [ 33] = 'GFM_PROTO_GROUP_INFO_GET_BY_NAMES', + [ 34] = 'GFM_PROTO_GROUP_INFO_SET', + [ 35] = 'GFM_PROTO_GROUP_INFO_MODIFY', + [ 36] = 'GFM_PROTO_GROUP_INFO_REMOVE', + [ 37] = 'GFM_PROTO_GROUP_INFO_ADD_USERS', + [ 38] = 'GFM_PROTO_GROUP_INFO_REMOVE_USERS', + [ 39] = 'GFM_PROTO_GROUP_NAMES_GET_BY_USERS', + [ 48] = 'GFM_PROTO_QUOTA_USER_GET', + [ 49] = 'GFM_PROTO_QUOTA_USER_SET', + [ 50] = 'GFM_PROTO_QUOTA_GROUP_GET', + [ 51] = 'GFM_PROTO_QUOTA_GROUP_SET', + [ 52] = 'GFM_PROTO_QUOTA_CHECK', + [ 54] = 'GFM_PROTO_DIRSET_INFO_SET', + [ 55] = 'GFM_PROTO_DIRSET_INFO_REMOVE', + [ 56] = 'GFM_PROTO_DIRSET_INFO_LIST', + [ 57] = 'GFM_PROTO_QUOTA_DIRSET_GET', + [ 58] = 'GFM_PROTO_QUOTA_DIRSET_SET', + [ 59] = 'GFM_PROTO_QUOTA_DIR_GET', + [ 60] = 'GFM_PROTO_QUOTA_DIR_SET', + [ 61] = 'GFM_PROTO_DIRSET_DIR_LIST', + [ 64] = 'GFM_PROTO_COMPOUND_BEGIN', + [ 65] = 'GFM_PROTO_COMPOUND_END', + [ 66] = 'GFM_PROTO_COMPOUND_ON_ERROR', + [ 67] = 'GFM_PROTO_PUT_FD', + [ 68] = 'GFM_PROTO_GET_FD', + [ 69] = 'GFM_PROTO_SAVE_FD', + [ 70] = 'GFM_PROTO_RESTORE_FD', + [ 71] = 'GFM_PROTO_BEQUEATH_FD', + [ 72] = 'GFM_PROTO_INHERIT_FD', + [ 80] = 'GFM_PROTO_OPEN_ROOT', + [ 81] = 'GFM_PROTO_OPEN_PARENT', + [ 82] = 'GFM_PROTO_OPEN', + [ 83] = 'GFM_PROTO_CREATE', + [ 84] = 'GFM_PROTO_CLOSE', + [ 85] = 'GFM_PROTO_VERIFY_TYPE', + [ 86] = 'GFM_PROTO_VERIFY_TYPE_NOT', + [ 87] = 'GFM_PROTO_REVOKE_GFSD_ACCESS', + [ 89] = 'GFM_PROTO_CLOSE_GETGEN', + [ 96] = 'GFM_PROTO_FSTAT', + [ 97] = 'GFM_PROTO_FUTIMES', + [ 98] = 'GFM_PROTO_FCHMOD', + [ 99] = 'GFM_PROTO_FCHOWN', + [100] = 'GFM_PROTO_CKSUM_GET', + [101] = 'GFM_PROTO_CKSUM_SET', + [102] = 'GFM_PROTO_SCHEDULE_FILE', + [103] = 'GFM_PROTO_SCHEDULE_FILE_WITH_PROGRAM', + [104] = 'GFM_PROTO_FGETATTRPLUS', + [112] = 'GFM_PROTO_REMOVE', + [113] = 'GFM_PROTO_RENAME', + [114] = 'GFM_PROTO_FLINK', + [115] = 'GFM_PROTO_MKDIR', + [116] = 'GFM_PROTO_SYMLINK', + [117] = 'GFM_PROTO_READLINK', + [118] = 'GFM_PROTO_GETDIRPATH', + [119] = 'GFM_PROTO_GETDIRENTS', + [120] = 'GFM_PROTO_SEEK', + [121] = 'GFM_PROTO_GETDIRENTSPLUS', + [122] = 'GFM_PROTO_GETDIRENTSPLUSXATTR', + [128] = 'GFM_PROTO_REOPEN', + [129] = 'GFM_PROTO_CLOSE_READ', + [130] = 'GFM_PROTO_CLOSE_WRITE', + [131] = 'GFM_PROTO_LOCK', + [132] = 'GFM_PROTO_TRYLOCK', + [133] = 'GFM_PROTO_UNLOCK', + [134] = 'GFM_PROTO_LOCK_INFO', + [135] = 'GFM_PROTO_SWITCH_BACK_CHANNEL', + [136] = 'GFM_PROTO_SWITCH_ASYNC_BACK_CHANNEL', + [137] = 'GFM_PROTO_CLOSE_WRITE_V2_4', + [138] = 'GFM_PROTO_GENERATION_UPDATED', + [139] = 'GFM_PROTO_FHCLOSE_READ', + [140] = 'GFM_PROTO_FHCLOSE_WRITE', + [141] = 'GFM_PROTO_GENERATION_UPDATED_BY_COOKIE', + [144] = 'GFM_PROTO_GLOB', + [145] = 'GFM_PROTO_SCHEDULE', + [146] = 'GFM_PROTO_PIO_OPEN', + [147] = 'GFM_PROTO_PIO_SET_PATHS', + [148] = 'GFM_PROTO_PIO_CLOSE', + [149] = 'GFM_PROTO_PIO_VISIT', + [176] = 'GFM_PROTO_HOSTNAME_SET', + [177] = 'GFM_PROTO_SCHEDULE_HOST_DOMAIN', + [178] = 'GFM_PROTO_STATFS', + [192] = 'GFM_PROTO_REPLICA_LIST_BY_NAME', + [193] = 'GFM_PROTO_REPLICA_LIST_BY_HOST', + [194] = 'GFM_PROTO_REPLICA_REMOVE_BY_HOST', + [195] = 'GFM_PROTO_REPLICA_REMOVE_BY_FILE', + [196] = 'GFM_PROTO_REPLICA_INFO_GET', + [197] = 'GFM_PROTO_REPLICATE_FILE_FROM_TO', + [198] = 'GFM_PROTO_REPLICATE_FILE_TO', + [208] = 'GFM_PROTO_REPLICA_ADDING', + [209] = 'GFM_PROTO_REPLICA_ADDED', + [210] = 'GFM_PROTO_REPLICA_LOST', + [211] = 'GFM_PROTO_REPLICA_ADD', + [212] = 'GFM_PROTO_REPLICA_ADDED2', + [213] = 'GFM_PROTO_REPLICATION_RESULT', + [224] = 'GFM_PROTO_PROCESS_ALLOC', + [225] = 'GFM_PROTO_PROCESS_ALLOC_CHILD', + [226] = 'GFM_PROTO_PROCESS_FREE', + [227] = 'GFM_PROTO_PROCESS_SET', + [240] = 'GFJ_PROTO_LOCK_REGISTER', + [241] = 'GFJ_PROTO_UNLOCK_REGISTER', + [242] = 'GFJ_PROTO_REGISTER', + [243] = 'GFJ_PROTO_UNREGISTER', + [244] = 'GFJ_PROTO_REGISTER_NODE', + [245] = 'GFJ_PROTO_LIST', + [246] = 'GFJ_PROTO_INFO', + [247] = 'GFJ_PROTO_HOSTINFO', + [256] = 'GFM_PROTO_XATTR_SET', + [257] = 'GFM_PROTO_XMLATTR_SET', + [258] = 'GFM_PROTO_XATTR_GET', + [259] = 'GFM_PROTO_XMLATTR_GET', + [260] = 'GFM_PROTO_XATTR_REMOVE', + [261] = 'GFM_PROTO_XMLATTR_REMOVE', + [262] = 'GFM_PROTO_XATTR_LIST', + [263] = 'GFM_PROTO_XMLATTR_LIST', + [264] = 'GFM_PROTO_XMLATTR_FIND', + [272] = 'GFM_PROTO_SWITCH_GFMD_CHANNEL', + [273] = 'GFM_PROTO_JOURNAL_READY_TO_RECV', + [274] = 'GFM_PROTO_JOURNAL_SEND', + [288] = 'GFM_PROTO_METADB_SERVER_GET', + [289] = 'GFM_PROTO_METADB_SERVER_GET_ALL', + [290] = 'GFM_PROTO_METADB_SERVER_SET', + [291] = 'GFM_PROTO_METADB_SERVER_MODIFY', + [292] = 'GFM_PROTO_METADB_SERVER_REMOVE', +} + +-- +-- Mapping table: error code -> name. +-- +local error_names = { + [ 0] = 'GFARM_ERR_NO_ERROR', + [ 1] = 'GFARM_ERR_OPERATION_NOT_PERMITTED', + [ 2] = 'GFARM_ERR_NO_SUCH_FILE_OR_DIRECTORY', + [ 3] = 'GFARM_ERR_NO_SUCH_PROCESS', + [ 4] = 'GFARM_ERR_INTERRUPTED_SYSTEM_CALL', + [ 5] = 'GFARM_ERR_INPUT_OUTPUT', + [ 6] = 'GFARM_ERR_DEVICE_NOT_CONFIGURED', + [ 7] = 'GFARM_ERR_ARGUMENT_LIST_TOO_LONG', + [ 8] = 'GFARM_ERR_EXEC_FORMAT', + [ 9] = 'GFARM_ERR_BAD_FILE_DESCRIPTOR', + [ 10] = 'GFARM_ERR_NO_CHILD_PROCESS', + [ 11] = 'GFARM_ERR_RESOURCE_TEMPORARILY_UNAVAILABLE', + [ 12] = 'GFARM_ERR_NO_MEMORY', + [ 13] = 'GFARM_ERR_PERMISSION_DENIED', + [ 14] = 'GFARM_ERR_BAD_ADDRESS', + [ 15] = 'GFARM_ERR_BLOCK_DEVICE_REQUIRED', + [ 16] = 'GFARM_ERR_DEVICE_BUSY', + [ 17] = 'GFARM_ERR_ALREADY_EXISTS', + [ 18] = 'GFARM_ERR_CROSS_DEVICE_LINK', + [ 19] = 'GFARM_ERR_OPERATION_NOT_SUPPORTED_BY_DEVICE', + [ 20] = 'GFARM_ERR_NOT_A_DIRECTORY', + [ 21] = 'GFARM_ERR_IS_A_DIRECTORY', + [ 22] = 'GFARM_ERR_INVALID_ARGUMENT', + [ 23] = 'GFARM_ERR_TOO_MANY_OPEN_FILES_IN_SYSTEM', + [ 24] = 'GFARM_ERR_TOO_MANY_OPEN_FILES', + [ 25] = 'GFARM_ERR_INAPPROPRIATE_IOCTL_FOR_DEVICE', + [ 26] = 'GFARM_ERR_TEXT_FILE_BUSY', + [ 27] = 'GFARM_ERR_FILE_TOO_LARGE', + [ 28] = 'GFARM_ERR_NO_SPACE', + [ 29] = 'GFARM_ERR_ILLEGAL_SEEK', + [ 30] = 'GFARM_ERR_READ_ONLY_FILE_SYSTEM', + [ 31] = 'GFARM_ERR_TOO_MANY_LINKS', + [ 32] = 'GFARM_ERR_BROKEN_PIPE', + [ 33] = 'GFARM_ERR_NUMERICAL_ARGUMENT_OUT_OF_DOMAIN', + [ 34] = 'GFARM_ERR_RESULT_OUT_OF_RANGE', + [ 35] = 'GFARM_ERR_ILLEGAL_BYTE_SEQUENCE', + [ 36] = 'GFARM_ERR_RESOURCE_DEADLOCK_AVOIDED', + [ 37] = 'GFARM_ERR_FILE_NAME_TOO_LONG', + [ 38] = 'GFARM_ERR_DIRECTORY_NOT_EMPTY', + [ 39] = 'GFARM_ERR_NO_LOCKS_AVAILABLE', + [ 40] = 'GFARM_ERR_FUNCTION_NOT_IMPLEMENTED', + [ 41] = 'GFARM_ERR_OPERATION_NOW_IN_PROGRESS', + [ 42] = 'GFARM_ERR_OPERATION_ALREADY_IN_PROGRESS', + [ 43] = 'GFARM_ERR_SOCKET_OPERATION_ON_NON_SOCKET', + [ 44] = 'GFARM_ERR_DESTINATION_ADDRESS_REQUIRED', + [ 45] = 'GFARM_ERR_MESSAGE_TOO_LONG', + [ 46] = 'GFARM_ERR_PROTOCOL_WRONG_TYPE_FOR_SOCKET', + [ 47] = 'GFARM_ERR_PROTOCOL_NOT_AVAILABLE', + [ 48] = 'GFARM_ERR_PROTOCOL_NOT_SUPPORTED', + [ 49] = 'GFARM_ERR_OPERATION_NOT_SUPPORTED', + [ 50] = 'GFARM_ERR_ADDRESS_FAMILY_NOT_SUPPORTED_BY_PROTOCOL_FAMILY', + [ 51] = 'GFARM_ERR_ADDRESS_ALREADY_IN_USE', + [ 52] = 'GFARM_ERR_CANNOT_ASSIGN_REQUESTED_ADDRESS', + [ 53] = 'GFARM_ERR_NETWORK_IS_DOWN', + [ 54] = 'GFARM_ERR_NETWORK_IS_UNREACHABLE', + [ 55] = 'GFARM_ERR_CONNECTION_ABORTED', + [ 56] = 'GFARM_ERR_CONNECTION_RESET_BY_PEER', + [ 57] = 'GFARM_ERR_NO_BUFFER_SPACE_AVAILABLE', + [ 58] = 'GFARM_ERR_SOCKET_IS_ALREADY_CONNECTED', + [ 59] = 'GFARM_ERR_SOCKET_IS_NOT_CONNECTED', + [ 60] = 'GFARM_ERR_OPERATION_TIMED_OUT', + [ 61] = 'GFARM_ERR_CONNECTION_REFUSED', + [ 62] = 'GFARM_ERR_NO_ROUTE_TO_HOST', + [ 63] = 'GFARM_ERR_TOO_MANY_LEVELS_OF_SYMBOLIC_LINK', + [ 64] = 'GFARM_ERR_DISK_QUOTA_EXCEEDED', + [ 65] = 'GFARM_ERR_STALE_FILE_HANDLE', + [ 66] = 'GFARM_ERR_IDENTIFIER_REMOVED', + [ 67] = 'GFARM_ERR_NO_MESSAGE_OF_DESIRED_TYPE', + [ 68] = 'GFARM_ERR_VALUE_TOO_LARGE_TO_BE_STORED_IN_DATA_TYPE', + [ 69] = 'GFARM_ERR_AUTHENTICATION', + [ 70] = 'GFARM_ERR_EXPIRED', + [ 71] = 'GFARM_ERR_PROTOCOL', + [ 72] = 'GFARM_ERR_UNKNOWN_HOST', + [ 73] = 'GFARM_ERR_CANNOT_RESOLVE_AN_IP_ADDRESS_INTO_A_HOSTNAME', + [ 74] = 'GFARM_ERR_NO_SUCH_OBJECT', + [ 75] = 'GFARM_ERR_CANT_OPEN', + [ 76] = 'GFARM_ERR_UNEXPECTED_EOF', + [ 77] = 'GFARM_ERR_GFARM_URL_PREFIX_IS_MISSING', + [ 78] = 'GFARM_ERR_TOO_MANY_JOBS', + [ 79] = 'GFARM_ERR_FILE_MIGRATED', + [ 80] = 'GFARM_ERR_NOT_A_SYMBOLIC_LINK', + [ 81] = 'GFARM_ERR_IS_A_SYMBOLIC_LINK', + [ 82] = 'GFARM_ERR_UNKNOWN', + [ 83] = 'GFARM_ERR_INVALID_FILE_REPLICA', + [ 84] = 'GFARM_ERR_NO_SUCH_USER', + [ 85] = 'GFARM_ERR_CANNOT_REMOVE_LAST_REPLICA', + [ 86] = 'GFARM_ERR_NO_SUCH_GROUP', + [ 87] = 'GFARM_ERR_GFARM_URL_USER_IS_MISSING', + [ 88] = 'GFARM_ERR_GFARM_URL_HOST_IS_MISSING', + [ 89] = 'GFARM_ERR_GFARM_URL_PORT_IS_MISSING', + [ 90] = 'GFARM_ERR_GFARM_URL_PORT_IS_INVALID', + [ 91] = 'GFARM_ERR_FILE_BUSY', + [ 92] = 'GFARM_ERR_NOT_A_REGULAR_FILE', + [ 93] = 'GFARM_ERR_IS_A_REGULAR_FILE', + [ 94] = 'GFARM_ERR_PATH_IS_ROOT', + [ 95] = 'GFARM_ERR_INTERNAL_ERROR', + [ 96] = 'GFARM_ERR_DB_ACCESS_SHOULD_BE_RETRIED', + [ 97] = 'GFARM_ERR_TOO_MANY_HOSTS', + [ 98] = 'GFARM_ERR_GFMD_FAILED_OVER', + [ 99] = 'GFARM_ERR_BAD_INODE_NUMBER', + [100] = 'GFARM_ERR_BAD_COOKIE', + [101] = 'GFARM_ERR_INSUFFICIENT_NUMBER_OF_FILE_REPLICAS', + [102] = 'GFARM_ERR_CHECKSUM_MISMATCH', + [103] = 'GFARM_ERR_CONFLICT_DETECTED', + [104] = 'GFARM_ERR_INVALID_CREDENTIAL', + [105] = 'GFARM_ERR_NO_FILESYSTEM_NODE', + [106] = 'GFARM_ERR_DIRECTORY_QUOTA_EXISTS', +} + +-- +-- Mapping table: whence value -> symbol. +-- +local whence_names = { + [0] = SEEK_SET, + [1] = SEEK_CUR, + [2] = SEEK_END, +} + +-- +-- Proto. +-- +local gfm_port = 601 +local gfm_proto = Proto("gfarm-gfm", "gfarm gfm protocol") + +-- +-- Protofields. +-- +local uint32_field = ProtoField.string("gfm.parameter.uint32", + "uint32 parameter", + base.DEC) +local uint64_field = ProtoField.string("gfm.parameter.uint32", + "uint32 parameter", + base.DEC) +local string_field = ProtoField.string("gfm.parameter.string", + "string parameter") +local bytearray_field = ProtoField.bytes("gfm.parameter.bytes", + "bytestream parameter") + +gfm_proto.fields = { + uint32_field, + uint64_field, + string_field, + bytearray_field, +} + +-- +-- Parse one XDR field. +-- +function parse_xdr(tvb, item, xdr_type, offset, text, map) + if offset < 0 then + return offset + end + + if xdr_type == "i" then + if offset + 4 > tvb():len() then + return -1, 0 + end + local value = tvb(offset, 4):uint() + local subitem = item:add(uint32_field, tvb(offset, 4)) + if type(map) == "function" then + subitem:set_text(string.format("%-20s: %s", text, map(value))) + elseif type(map) == "table" then + local mapvalue = map[value] + if mapvalue == nil then + mapvalue = "unknown" + end + subitem:set_text(string.format("%-20s: %s (0x%08x)", + text, mapvalue, value)) + elseif map == base.OCT then + subitem:set_text(string.format("%-20s: %012o", text, value)) + elseif map == base.DEC then + subitem:set_text(string.format("%-20s: %d", text, value)) + elseif map == base.HEX then + subitem:set_text(string.format("%-20s: %08x", text, value)) + else + subitem:set_text(string.format("%-20s: %u", text, value)) + end + return offset + 4, value + + elseif xdr_type == "l" then + if offset + 8 > tvb():len() then + return -1, 0, 0 + end + local value1 = tvb(offset, 4):uint() + local value2 = tvb(offset + 4, 4):uint() + local subitem = item:add(uint64_field, tvb(offset, 8)) + if type(map) == "function" then + subitem:set_text(string.format("%-20s: %s", text, + map(value1, value2))) + elseif map == base.HEX or value1 ~= 0 then + subitem:set_text(string.format("%-20s: 0x%08x%08x", + text, value1, value2)) + elseif map == base.OCT then + subitem:set_text(string.format("%-20s: %012o", text, value2)) + else + subitem:set_text(string.format("%-20s: %u", text, value2)) + end + return offset + 8, value1, value2 + + elseif xdr_type == "s" then + if offset + 4 > tvb():len() then + return -1, 0 + end + local len = tvb(offset, 4):uint() + if offset + 4 + len > tvb():len() then + return -1 + end + local value = tvb(offset + 4, len):string() + local subitem = item:add(string_field, tvb(offset, 4 + len)) + subitem:set_text(string.format("%-20s: \"%s\"", text, value)) + return offset + 4 + len, len + + else + if offset + 4 > tvb():len() then + return -1, 0 + end + local len = tvb(offset, 4):uint() + if offset + 4 + len > tvb():len() then + return -1 + end + local subitem = item:add(bytearray_field, tvb(offset, 4 + len)) + subitem:set_text(string.format("%-20s: byte array [%s byte(s)]", + text, len)) + return offset + 4 + len, len + end +end + +-- +-- Format GFM_PROTO_CKSUM_GET flags. +-- +function format_gfm_cksum_get_flags(value) + local flags = {} + if bit.band(value, 0x01) ~= 0 then table.insert(flags, "MAYBE_EXPIRED") end + if bit.band(value, 0x02) ~= 0 then table.insert(flags, "EXPIRED") end + return table.concat(flags) +end + +-- +-- Format GFM_PROTO_CKSUM_SET flags. +-- +function format_gfm_cksum_set_flags(value) + local flags = {} + if bit.band(value, 0x01) ~= 0 then table.insert(flags, "MODIFIED") end + return table.concat(flags) +end + +-- +-- Format GFM_PROTO_SCHEDULE_FILE flags. +-- +function format_gfm_sched_flags(value) + local flags = {} + if bit.band(value, 0x01) ~= 0 then table.insert(flags, "HOST_AVAIL") end + if bit.band(value, 0x02) ~= 0 then table.insert(flags, "LOADAVG_AVAIL") end + if bit.band(value, 0x04) ~= 0 then table.insert(flags, "RTT_AVAIL") end + return table.concat(flags) +end + +-- +-- Format GFM_PROTO_CLOSE_WRITE_V2_4 flags. +-- +function format_gfm_write_v2_4_flags(value) + local flags = {} + if bit.band(value, 0x01) ~= 0 then + table.insert(flags, "GENERATION_UPDATE_NEEDED") + end + return table.concat(flags) +end + +-- +-- Format GFM_PROTO_METADB_SERVER_GET: Persistent Flags. +-- +function format_gfm_metadb_server_persistent_flags(value) + local flags = {} + if bit.band(value, 0x01) ~= 0 then + table.insert(flags, "IS_MASTER_CANDIDATE") + end + if bit.band(value, 0x02) ~= 0 then + table.insert(flags, "IS_DEFAULT_MASTER") + end + return table.concat(flags) +end + +-- +-- Format GFM_PROTO_METADB_SERVER_GET: Volatile Flags. +-- +function format_gfm_metadb_server_volatile_flags(value) + local flags = {} + if bit.band(value, 0x01) ~= 0 then table.insert(flags, "IS_SELF") end + if bit.band(value, 0x02) ~= 0 then table.insert(flags, "IS_MASTER") end + if bit.band(value, 0x04) ~= 0 then table.insert(flags, "IS_SYNCREP") end + if bit.band(value, 0x08) ~= 0 then table.insert(flags, "IS_ACTIVE") end + + local seqnum = bit.band(value, 0x0070) + if seqnum == 0 then + table.insert(flags, "SEQNUM_IS_UNKNOWN") + elseif seqnum == 1 then + table.insert(flags, "SEQNUM_IS_OK") + elseif seqnum == 1 then + table.insert(flags, "SEQNUM_IS_OUT_OF_SYNC") + else + table.insert(flags, "SEQNUM_IS_ERROR") + end + return table.concat(flags) +end + +-- +-- Format datetime. +-- +function format_datetime(value1, value2) + if value1 ~= 0 then + return string.format("%-20s: 0x%08x%08x", value1, value2) + else + return os.date("%Y-%m-%d %H:%M:%S", value2) + end +end + +-- +-- Parse a response which return an error code only. +-- +function parse_response_with_error_code_only(tvb, pinfo, item, offset) + return parse_xdr(tvb, item, "i", offset, "error_code", error_names) +end + +-- +-- Parse GFM_PROTO_HOST_INFO_GET_ALL. +-- +function parse_gfm_host_info_get_all_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_host_info_get_all_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) i:n_hosts + -- s[n_hosts]:hostname, i[n_hosts]:n_host_aliases, + -- s[n_hosts][n_host_aliases]:host_aliases + -- s[n_hosts]:architecture, i[n_hosts]:ncpu, + -- i[n_hosts]:port, i[n_hosts]:flags + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_hosts + offset, n_hosts = parse_xdr(tvb, item, "i", offset, "n_hosts") + for i = 1, n_hosts do + offset = parse_xdr(tvb, item, "s", offset, "hostname") + offset = parse_xdr(tvb, item, "s", offset, "architecture") + offset = parse_xdr(tvb, item, "i", offset, "ncpu") + offset = parse_xdr(tvb, item, "i", offset, "port") + offset = parse_xdr(tvb, item, "i", offset, "flags") + end + end + return offset +end + +-- +-- Parse GFM_PROTO_HOST_INFO_GET_BY_ARCHITECTURE. +-- +function parse_gfm_host_info_get_by_architecture_request(tvb, pinfo, item, offset) + -- IN s:architecture + return nil + -- offset = offset + 4 + -- offset = parse_xdr(tvb, item, "s", offset, "architecture") + -- return offset +end + +function parse_gfm_host_info_get_by_architecture_response(tvb, pinfo, item, offset) + return nil + -- return parse_gfm_host_info_get_all_response(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_HOST_INFO_GET_BY_NAMES. +-- +function parse_gfm_host_info_get_by_names_request(tvb, pinfo, item, offset) + -- IN i: n_hostnames, s[n_hostnames]:hostnames + offset = offset + 4 + local n_hostnames + offset, n_hostnames = parse_xdr(tvb, item, "i", offset, "n_hostnames") + for i = 1, n_hostnames do + offset = parse_xdr(tvb, item, "s", offset, "hostname") + end + return offset +end + +function parse_gfm_host_info_get_by_names_response(tvb, pinfo, item, offset) + return parse_gfm_host_info_get_all_response(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_HOST_INFO_GET_BY_NAMEALIASES. +-- +function parse_gfm_host_info_get_by_namealiases_request(tvb, pinfo, item, offset) + -- IN i: n_hostnames, s[n_hostnames]:hostnames + return parse_gfm_host_info_get_by_names_request(tvb, pinfo, item, offset) +end + +function parse_gfm_host_info_get_by_namealiases_response(tvb, pinfo, item, offset) + return parse_gfm_host_info_get_all_response(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_HOST_INFO_SET. +-- +function parse_gfm_host_info_set_request(tvb, pinfo, item, offset) + -- IN s:hostname, + -- s:hostname, s:architecture + -- i:ncpu, i:port, i:flags + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "hostname") + offset = parse_xdr(tvb, item, "s", offset, "architecture") + offset = parse_xdr(tvb, item, "i", offset, "ncpu") + offset = parse_xdr(tvb, item, "i", offset, "port") + offset = parse_xdr(tvb, item, "i", offset, "flags") + return offset +end + +function parse_gfm_host_info_set_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_HOST_INFO_MODIFY. +-- +function parse_gfm_host_info_modify_request(tvb, pinfo, item, offset) + -- IN s:hostname, + -- i:n_host_aliases, s[n_host_aliases]:host_aliases, + -- s:architecture, i:ncpu, i:port, i:flags + return parse_gfm_host_info_set_request(tvb, pinfo, item, offset) +end + +function parse_gfm_host_info_modify_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_HOST_INFO_REMOVE. +-- +function parse_gfm_host_info_remove_request(tvb, pinfo, item, offset) + -- IN s:hostname + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "hostname") + return offset +end + +function parse_gfm_host_info_remove_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_USER_INFO_GET_ALL. +-- +function parse_gfm_user_info_get_all_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_user_info_get_all_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) i:n_users + -- s[n_users]:username, s[n_users]:real_name + -- s[n_users]:gfarm_homedir, s[n_users]:gsi_dn + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_users + offset, n_users = parse_xdr(tvb, item, "i", offset, "n_users") + for i = 1, n_users do + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "real_name") + offset = parse_xdr(tvb, item, "s", offset, "gfarm_homedir") + offset = parse_xdr(tvb, item, "s", offset, "gsi_dn") + end + end + return offset +end + +-- +-- Parse GFM_PROTO_USER_INFO_GET_BY_NAMES. +-- +function parse_gfm_user_info_get_by_names_request(tvb, pinfo, item, offset) + -- IN i:n_usernames, s[n_usernames]:usernames + offset = offset + 4 + local n_usernames + offset, n_usernames = parse_xdr(tvb, item, "i", offset, "n_usernames") + + for i = 1, n_usernames do + offset = parse_xdr(tvb, item, "s", offset, "username") + end + return offset +end + +function parse_gfm_user_info_get_by_names_response(tvb, pinfo, item, offset) + return parse_gfm_user_info_get_all_response(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_USER_INFO_SET. +-- +function parse_gfm_user_info_set_request(tvb, pinfo, item, offset) + -- IN s:username, + -- s:real_name, s:gfarm_homedir, s:gsi_dn + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "gfarm_homedir") + offset = parse_xdr(tvb, item, "s", offset, "gsi_dn") + return offset +end + +function parse_gfm_user_info_set_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_USER_INFO_MODIFY. +-- +function parse_gfm_user_info_modify_request(tvb, pinfo, item, offset) + -- IN s:username, + -- s:real_name, s:gfarm_homedir, s:gsi_dn + return parse_gfm_user_info_set_request(tvb, pinfo, item, offset) +end + +function parse_gfm_user_info_modify_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_USER_INFO_REMOVE. +-- +function parse_gfm_user_info_remove_request(tvb, pinfo, item, offset) + -- IN s:username + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + return offset +end + +function parse_gfm_user_info_remove_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_USER_INFO_GET_BY_GSI_DN. +-- +function parse_gfm_user_info_get_by_gsi_dn_request(tvb, pinfo, item, offset) + -- IN s:dn (undocumented) + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "dn") + return offset + 4 +end + +function parse_gfm_user_info_get_by_gsi_dn_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) s:username, s:real_name + -- s:gfarm_homedir, s:gsi_dn + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "real_name") + offset = parse_xdr(tvb, item, "s", offset, "gfarm_homedir") + offset = parse_xdr(tvb, item, "s", offset, "gsi_dn") + end + return offset +end + +-- +-- Parse GFM_PROTO_GROUP_INFO_GET_ALL. +-- +function parse_gfm_group_info_get_all_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_group_info_get_all_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) i:n_groups, s[n_groups]:groupname, + -- i[n_groups]:n_users, s[n_groups][n_users]:users + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_groups + offset, n_groups = parse_xdr(tvb, item, "i", offset, "n_groups") + for i = 1, n_groups do + offset = parse_xdr(tvb, item, "s", offset, "groupname") + local n_users + offset, n_users = parse_xdr(tvb, item, "i", offset, "n_users") + for j = 1, n_users do + offset = parse_xdr(tvb, item, "s", offset, "user") + end + end + end + return offset +end + +-- +-- Parse GFM_PROTO_GROUP_INFO_GET_BY_NAMES. +-- +function parse_gfm_group_info_get_by_names_request(tvb, pinfo, item, offset) + -- IN i:n_groupnames, s[n_groupnames]:groupnames + offset = offset + 4 + local n_groupnames + offset, n_groupnames = parse_xdr(tvb, item, "i", offset, "n_groupnames") + for i = 1, n_groupnames do + offset = parse_xdr(tvb, item, "s", offset, "groupname") + end + return offset +end + +function parse_gfm_group_info_get_by_names_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_GROUP_INFO_SET. +-- +function parse_gfm_group_info_set_request(tvb, pinfo, item, offset) + -- IN s:groupname, + -- i:n_users, s[n_users]:users + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "groupname") + local n_users + offset, n_users = parse_xdr(tvb, item, "i", offset, "n_users") + for i = 1, n_users do + offset = parse_xdr(tvb, item, "s", offset, "user") + end + return offset +end + +function parse_gfm_group_info_set_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_GROUP_INFO_MODIFY. +-- +function parse_gfm_group_info_modify_request(tvb, pinfo, item, offset) + -- IN s:groupname, + -- i:n_users, s[n_users]:users + return parse_gfm_group_info_set_request(tvb, pinfo, item, offset) +end + +function parse_gfm_group_info_modify_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_GROUP_INFO_REMOVE. +-- +function parse_gfm_group_info_remove_request(tvb, pinfo, item, offset) + -- IN s:groupname + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "groupname") + return offset +end + +function parse_gfm_group_info_remove_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_GROUP_INFO_ADD_USERS. +-- +function parse_gfm_group_info_add_users_request(tvb, pinfo, item, offset) + -- IN s:groupname, + -- i:n_users, s[n_users]:users + return parse_gfm_group_info_set_request(tvb, pinfo, item, offset) +end + +function parse_gfm_group_info_add_users_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_GROUP_INFO_REMOVE_USERS. +-- +function parse_gfm_group_info_remove_users_request(tvb, pinfo, item, offset) + -- IN s:groupname, + -- i:n_users, s[n_users]:users + return parse_gfm_group_info_set_request(tvb, pinfo, item, offset) +end + +function parse_gfm_group_info_remove_users_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_GROUP_NAMES_GET_BY_USERS. +-- +function parse_gfm_group_names_get_by_users_request(tvb, pinfo, item, offset) + -- IN i:n_usernames, s[n_usernames]:usernames + return parse_gfm_user_info_get_by_names_request(tvb, pinfo, item, offset) +end + +function parse_gfm_group_names_get_by_users_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_QUOTA_USER_GET. +-- +function parse_gfm_quota_user_get_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_quota_user_get_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_QUOTA_USER_SET. +-- +function parse_gfm_quota_user_set_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_quota_user_set_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_QUOTA_GROUP_GET. +-- +function parse_gfm_quota_group_get_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_quota_group_get_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_QUOTA_GROUP_SET. +-- +function parse_gfm_quota_group_set_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_quota_group_set_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_QUOTA_CHECK. +-- +function parse_gfm_quota_check_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_quota_check_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_DIRSET_INFO_SET. +-- +function parse_gfm_dirset_info_set_request(tvb, pinfo, item, offset) + -- IN s:username, s:dirsetname + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "dirsetname") + return offset +end + +function parse_gfm_dirset_info_set_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_DIRSET_INFO_REMOVE. +-- +function parse_gfm_dirset_info_remove_request(tvb, pinfo, item, offset) + -- IN s:username, s:dirsetname + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "dirsetname") + return offset +end + +function parse_gfm_dirset_info_remove_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_DIRSET_INFO_LIST. +-- +function parse_gfm_dirset_info_list_request(tvb, pinfo, item, offset) + -- IN s:username + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + return offset +end + +function parse_gfm_dirset_info_list_response(tvb, pinfo, item, offset) + -- OUT i:error_code + -- (upon success) i:n_dirsets, + -- s[n_dirset]:username, s[n_dirset]:dirsetname + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_dirsets + offset, n_dirsets = parse_xdr(tvb, item, "i", offset, "n_dirsets") + for i = 1, n_dirsets do + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "dirsetname") + end + end + return offset +end + +-- +-- Parse GFM_PROTO_QUOTA_DIRSET_GET. +-- +function parse_gfm_quota_dirset_get_request(tvb, pinfo, item, offset) + -- IN s:username, s:dirsetname + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "dirsetname") + return offset +end + +function parse_gfm_quota_dirset_get_response(tvb, pinfo, item, offset) + -- OUT i:error_code + -- (upon success) + -- l:flags + -- l:grace_period, l:space, l:space_grace, + -- l:space_soft, l:space_hard, l:num, l:num_grace, + -- l:num_soft, l:num_hard, l:phy_space, + -- l:phy_space_grace, l:phy_space_soft, + -- l:phy_space_hard, l:phy_num, l:phy_num_grace, + -- l:phy_num_soft, l:phy_num_hard + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "flags") + offset = parse_xdr(tvb, item, "l", offset, "grace_period") + offset = parse_xdr(tvb, item, "l", offset, "space") + offset = parse_xdr(tvb, item, "l", offset, "space_grace") + offset = parse_xdr(tvb, item, "l", offset, "space_soft") + offset = parse_xdr(tvb, item, "l", offset, "space_hard") + offset = parse_xdr(tvb, item, "l", offset, "num") + offset = parse_xdr(tvb, item, "l", offset, "num_grace") + offset = parse_xdr(tvb, item, "l", offset, "num_soft") + offset = parse_xdr(tvb, item, "l", offset, "num_hard") + offset = parse_xdr(tvb, item, "l", offset, "phy_space") + offset = parse_xdr(tvb, item, "l", offset, "phy_space_grace") + offset = parse_xdr(tvb, item, "l", offset, "phy_space_soft") + offset = parse_xdr(tvb, item, "l", offset, "phy_space_hard") + offset = parse_xdr(tvb, item, "l", offset, "phy_num") + offset = parse_xdr(tvb, item, "l", offset, "phy_num_grace") + offset = parse_xdr(tvb, item, "l", offset, "phy_num_soft") + offset = parse_xdr(tvb, item, "l", offset, "phy_num_hard") + end + return offset +end + +-- +-- Parse GFM_PROTO_QUOTA_DIRSET_SET. +-- +function parse_gfm_quota_dirset_set_request(tvb, pinfo, item, offset) + -- IN s:username, s:dirsetname + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "dirsetname") + offset = parse_xdr(tvb, item, "l", offset, "grace_period") + offset = parse_xdr(tvb, item, "l", offset, "space_soft") + offset = parse_xdr(tvb, item, "l", offset, "space_hard") + offset = parse_xdr(tvb, item, "l", offset, "num_soft") + offset = parse_xdr(tvb, item, "l", offset, "num_hard") + offset = parse_xdr(tvb, item, "l", offset, "phy_space_soft") + offset = parse_xdr(tvb, item, "l", offset, "phy_space_hard") + offset = parse_xdr(tvb, item, "l", offset, "phy_num_soft") + offset = parse_xdr(tvb, item, "l", offset, "phy_num_hard") + return offset +end + +function parse_gfm_quota_dirset_set_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_QUOTA_DIR_GET. +-- +function parse_gfm_quota_dir_get_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_quota_dir_get_response(tvb, pinfo, item, offset) + -- OUT i:error_code + -- (upon success) + -- l:flags + -- s:username, s:dirsetname, + -- l:grace_period, l:space, l:space_grace, + -- l:space_soft, l:space_hard, l:num, l:num_grace, + -- l:num_soft, l:num_hard, l:phy_space, + -- l:phy_space_grace, l:phy_space_soft, + -- l:phy_space_hard, l:phy_num, l:phy_num_grace, + -- l:phy_num_soft, l:phy_num_hard + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "flags") + offset = parse_xdr(tvb, item, "l", offset, "grace_period") + offset = parse_xdr(tvb, item, "l", offset, "space") + offset = parse_xdr(tvb, item, "l", offset, "space_grace") + offset = parse_xdr(tvb, item, "l", offset, "space_soft") + offset = parse_xdr(tvb, item, "l", offset, "space_hard") + offset = parse_xdr(tvb, item, "l", offset, "num") + offset = parse_xdr(tvb, item, "l", offset, "num_grace") + offset = parse_xdr(tvb, item, "l", offset, "num_soft") + offset = parse_xdr(tvb, item, "l", offset, "num_hard") + offset = parse_xdr(tvb, item, "l", offset, "phy_space") + offset = parse_xdr(tvb, item, "l", offset, "phy_space_grace") + offset = parse_xdr(tvb, item, "l", offset, "phy_space_soft") + offset = parse_xdr(tvb, item, "l", offset, "phy_space_hard") + offset = parse_xdr(tvb, item, "l", offset, "phy_num") + offset = parse_xdr(tvb, item, "l", offset, "phy_num_grace") + offset = parse_xdr(tvb, item, "l", offset, "phy_num_soft") + offset = parse_xdr(tvb, item, "l", offset, "phy_num_hard") + end + return offset +end + +-- +-- Parse GFM_PROTO_QUOTA_DIR_SET. +-- +function parse_gfm_quota_dir_set_request(tvb, pinfo, item, offset) + -- IN s:username, s:dirsetname + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "dirsetname") + return offset +end + +function parse_gfm_quota_dir_set_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_DIRSET_DIR_LIST. +-- +function parse_gfm_dirset_dir_list_request(tvb, pinfo, item, offset) + -- IN s:username, s:dirsetname + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "dirsetname") + return offset +end + +function parse_gfm_dirset_dir_list_response(tvb, pinfo, item, offset) + -- OUT i:error_code + -- (upon success) i:n_dirs, + -- i:error_code[n_dir] + -- (upon success) + -- s[n_dir]:username + -- s[n_dir]:dirsetname + -- s[n_dir]:pathname + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_dirsets + offset, n_dirsets = parse_xdr(tvb, item, "i", offset, "n_dirsets") + for i = 1, n_dirsets do + local n_dirs + offset = parse_xdr(tvb, item, "s", offset, "username") + offset = parse_xdr(tvb, item, "s", offset, "dirsetname") + offset, n_dirs = parse_xdr(tvb, item, "i", offset, "n_dirs") + for j = 1, n_dirs do + + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "s", offset, "pathname") + end + end + end + end + return offset +end + +-- +-- Parse GFM_PROTO_COMPOUND_BEGIN. +-- +function parse_gfm_compound_begin_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_compound_begin_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_COMPOUND_END. +-- +function parse_gfm_compound_end_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_compound_end_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_COMPOUND_ON_ERROR. +-- +function parse_gfm_compound_on_error_request(tvb, pinfo, item, offset) + -- IN i:error_code + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + return offset +end + +function parse_gfm_compound_on_error_response(tvb, pinfo, item, offset) + -- OUT (none) + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + return offset +end + +-- +-- Parse GFM_PROTO_PUT_FD. +-- +function parse_gfm_put_fd_request(tvb, pinfo, item, offset) + -- IN i:fd + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + return offset +end + +function parse_gfm_put_fd_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_GET_FD. +-- +function parse_gfm_get_fd_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_get_fd_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) i:fd + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "i", offset, "fd") + end + return offset +end + +-- +-- Parse GFM_PROTO_SAVE_FD. +-- +function parse_gfm_save_fd_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_save_fd_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_RESTORE_FD. +-- +function parse_gfm_restore_fd_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_restore_fd_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_BEQUEATH_FD. +-- +function parse_gfm_bequeath_fd_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_bequeath_fd_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_INHERIT_FD. +-- +function parse_gfm_inherit_fd_request(tvb, pinfo, item, offset) + -- IN i:fd + return parse_gfm_put_fd_request(tvb, pinfo, item, offset) +end + +function parse_gfm_inherit_fd_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_OPEN_ROOT. +-- +function parse_gfm_open_root_request(tvb, pinfo, item, offset) + -- IN i:flags + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "flags") + return offset +end + +function parse_gfm_open_root_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_OPEN_PARENT. +-- +function parse_gfm_open_parent_request(tvb, pinfo, item, offset) + -- IN i:flags + return parse_gfm_open_root_request(tvb, pinfo, item, offset) +end + +function parse_gfm_open_parent_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_OPEN. +-- +function parse_gfm_open_request(tvb, pinfo, item, offset) + -- IN s:name, i:flags + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "name") + offset = parse_xdr(tvb, item, "i", offset, "flags") + return offset +end + +function parse_gfm_open_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) l:inode_number, l:generation, i:mode + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "i_node_number") + offset = parse_xdr(tvb, item, "l", offset, "generation") + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + end + return offset +end + +-- +-- Parse GFM_PROTO_CREATE. +-- +function parse_gfm_create_request(tvb, pinfo, item, offset) + -- IN s:name, i:flags, i:mode + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "name") + offset = parse_xdr(tvb, item, "i", offset, "flags") + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + return offset +end + +function parse_gfm_create_response(tvb, pinfo, item, offset) + return parse_gfm_open_response(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_CLOSE. +-- +function parse_gfm_close_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_close_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_VERIFY_TYPE. +-- +function parse_gfm_verify_type_request(tvb, pinfo, item, offset) + -- IN i:type + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "type") + return offset +end + +function parse_gfm_verify_type_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_VERIFY_TYPE_NOT. +-- +function parse_gfm_verify_type_not_request(tvb, pinfo, item, offset) + -- IN i:type + return parse_gfm_verify_type_request(tvb, pinfo, item, offset) +end + +function parse_gfm_verify_type_not_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_REVOKE_GFSD_ACCESS. +-- +function parse_gfm_revoke_gfsd_access_request(tvb, pinfo, item, offset) + -- IN i:fd + return parse_gfm_put_fd_request(tvb, pinfo, item, offset) +end + +function parse_gfm_revoke_gfsd_access_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_CLOSE_GETGEN. +-- +function parse_gfm_close_getgen_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_close_getgen_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) l:new_gen + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "new_gen") + end + return offset +end + +-- +-- Parse GFM_PROTO_FSTAT. +-- +function parse_gfm_fstat_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_fstat_response(tvb, pinfo, item, offset) + -- OUT l:ino, l:gen, i:mode, l:nlink, + -- s:user, s:group, l:size, l:ncopy, + -- l:atime_sec, i:atime_nsec, + -- l:mtime_sec, i:mtime_nsec, + -- l:ctime_sec, i:ctime_nsec + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + offset = parse_xdr(tvb, item, "l", offset, "i_node_number") + offset = parse_xdr(tvb, item, "l", offset, "generation") + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + offset = parse_xdr(tvb, item, "l", offset, "nlink") + offset = parse_xdr(tvb, item, "s", offset, "user") + offset = parse_xdr(tvb, item, "s", offset, "group") + offset = parse_xdr(tvb, item, "l", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "ncopy") + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "ctime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "ctime_nsec") + return offset +end + +-- +-- Parse GFM_PROTO_FUTIMES. +-- +function parse_gfm_futimes_request(tvb, pinfo, item, offset) + -- IN l:atime_sec, i:atime_nsec, + -- l:mtime_sec, i:mtime_nsec + offset = offset + 4 + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + return offset +end + +function parse_gfm_futimes_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_FCHMOD. +-- +function parse_gfm_fchmod_request(tvb, pinfo, item, offset) + -- IN i:mode + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + return offset +end + +function parse_gfm_fchmod_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_FCHOWN. +-- +function parse_gfm_fchown_request(tvb, pinfo, item, offset) + -- IN s:user, s:group + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "user") + offset = parse_xdr(tvb, item, "s", offset, "group") + return offset +end + +function parse_gfm_fchown_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_CKSUM_GET. +-- +function parse_gfm_cksum_get_request(tvb, pinfo, item, offset) +end + +function parse_gfm_cksum_get_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_CKSUM_SET. +-- +function parse_gfm_cksum_set_request(tvb, pinfo, item, offset) +end + +function parse_gfm_cksum_set_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_SCHEDULE_FILE. +-- +function parse_gfm_schedule_file_request(tvb, pinfo, item, offset) + -- IN s:domain + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "domain") + return offset +end + +function parse_gfm_schedule_file_response(tvb, pinfo, item, offset) + -- OUT i:error_code + -- (upon success) i:n_hosts, + -- s[n_host]:host, i[n_host]:port, + -- i[n_host]:loadavg*65536, l[n_host]:cache_time, + -- l[n_host]:usedsize, l[n_host]:availsize, + -- l[n_host]:rtt_cache_time, i[n_host]:rtt_usec, + -- i[n_host]:rtt_flags + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_hosts + offset, n_hosts = parse_xdr(tvb, item, "i", offset, "n_hosts") + for i = 1, n_hosts do + offset = parse_xdr(tvb, item, "s", offset, "host") + offset = parse_xdr(tvb, item, "i", offset, "port") + offset = parse_xdr(tvb, item, "i", offset, "ncpu") + offset = parse_xdr(tvb, item, "i", offset, "loadavg*65536") + offset = parse_xdr(tvb, item, "l", offset, "cache_time") + offset = parse_xdr(tvb, item, "l", offset, "usedsize") + offset = parse_xdr(tvb, item, "l", offset, "availsize") + offset = parse_xdr(tvb, item, "l", offset, "rtt_cache_time") + offset = parse_xdr(tvb, item, "i", offset, "rtt_usec") + offset = parse_xdr(tvb, item, "i", offset, "rtt_flags", + format_gfm_sched_flags) + end + end + return offset +end + +-- +-- Parse GFM_PROTO_SCHEDULE_FILE_WITH_PROGRAM. +-- +function parse_gfm_schedule_file_with_program_request(tvb, pinfo, item, offset) + return parse_gfm_schedule_file_request(tvb, pinfo, item, offset) +end + +function parse_gfm_schedule_file_with_program_response(tvb, pinfo, item, offset) + return parse_gfm_schedule_file_response(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_FGETATTRPLUS. +-- +function parse_gfm_fgetattrplus_request(tvb, pinfo, item, offset) + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "flags") + offset, n_patterns = parse_xdr(tvb, item, "i", offset, "n_patterns") + for i = 1, n_patterns do + offset = parse_xdr(tvb, item, "s", offset, "pattern") + end + return offset +end + +function parse_gfm_fgetattrplus_response(tvb, pinfo, item, offset) + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "i_node_number") + offset = parse_xdr(tvb, item, "l", offset, "generation") + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + offset = parse_xdr(tvb, item, "l", offset, "nlink") + offset = parse_xdr(tvb, item, "s", offset, "user") + offset = parse_xdr(tvb, item, "s", offset, "group") + offset = parse_xdr(tvb, item, "l", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "ncopy") + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "ctime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "ctime_nsec") + offset, n_xattrs = parse_xdr(tvb, item, "i", offset, "n_xattrs") + for i = 1, n_xattrs do + offset = parse_xdr(tvb, item, "s", offset, "name") + offset = parse_xdr(tvb, item, "b", offset, "value") + end + end + return offset +end + +-- +-- Parse GFM_PROTO_REMOVE. +-- +function parse_gfm_remove_request(tvb, pinfo, item, offset) + -- IN s:target + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "target") + return offset +end + +function parse_gfm_remove_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_RENAME. +-- +function parse_gfm_rename_request(tvb, pinfo, item, offset) + -- IN s:src_name, s: target_name + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "src_name") + offset = parse_xdr(tvb, item, "s", offset, "target_name") + return offset +end + +function parse_gfm_rename_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_FLINK. +-- +function parse_gfm_flink_request(tvb, pinfo, item, offset) + -- IN s:target_name + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "target_name") + return offset +end + +function parse_gfm_flink_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_MKDIR. +-- +function parse_gfm_mkdir_request(tvb, pinfo, item, offset) + -- IN s:name, i:mode + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "target_name") + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + return offset +end + +function parse_gfm_mkdir_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_SYMLINK. +-- +function parse_gfm_symlink_request(tvb, pinfo, item, offset) + -- IN s:source_path, s:new_name + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "source_path") + offset = parse_xdr(tvb, item, "s", offset, "new_name") + return offset +end + +function parse_gfm_symlink_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_READLINK. +-- +function parse_gfm_readlink_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_readlink_response(tvb, pinfo, item, offset) + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + offset = parse_xdr(tvb, item, "s", offset, "name") + return offset +end + +-- +-- Parse GFM_PROTO_GETDIRPATH. +-- +function parse_gfm_getdirpath_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_getdirpath_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_GETDIRENTS. +-- +function parse_gfm_getdirents_request(tvb, pinfo, item, offset) + -- IN i:n_entries + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "n_entries") + return offset +end + +function parse_gfm_getdirents_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_SEEK. +-- +function parse_gfm_seek_request(tvb, pinfo, item, offset) + -- IN l:offset, i:whence + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "offset") + offset = parse_xdr(tvb, item, "i", offset, "whence", whence_names) + return offset +end + +function parse_gfm_seek_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_GETDIRENTSPLUS. +-- +function parse_gfm_getdirentsplus_request(tvb, pinfo, item, offset) + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "n_entries") + return offset +end + +function parse_gfm_getdirentsplus_response(tvb, pinfo, item, offset) + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_stats + offset, n_stats = parse_xdr(tvb, item, "i", offset, "n_stats") + for i = 1, n_stats do + offset = parse_xdr(tvb, item, "s", offset, "name") + offset = parse_xdr(tvb, item, "l", offset, "i_node_number") + offset = parse_xdr(tvb, item, "l", offset, "generation") + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + offset = parse_xdr(tvb, item, "l", offset, "nlink") + offset = parse_xdr(tvb, item, "s", offset, "user") + offset = parse_xdr(tvb, item, "s", offset, "group") + offset = parse_xdr(tvb, item, "l", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "ncopy") + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "ctime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "ctime_nsec") + end + end + return offset +end + +-- +-- Parse GFM_PROTO_GETDIRENTSPLUSXATTR. +-- +function parse_gfm_getdirentsplusxattr_request(tvb, pinfo, item, offset) + -- IN i:n_entries, i:n_patterns, s[npatterns]:patterns + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "n_entries") + offset, n_patterns = parse_xdr(tvb, item, "i", offset, "n_patterns") + for i = 1, n_patterns do + offset = parse_xdr(tvb, item, "s", offset, "patterns") + end + return offset +end + +function parse_gfm_getdirentsplusxattr_response(tvb, pinfo, item, offset) + -- OUT s:name, l:ino, l:gen, i:mode, l:nlink, + -- s:user, s:group, l:size, l:ncopy, + -- l:atime_sec, i:atime_nsec, + -- l:mtime_sec, i:mtime_nsec, + -- l:ctime_sec, i:ctime_nsec, + -- i:nxattrs, s[0]:key, B[0]:value, ... + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_stats + local n_xattr + offset, n_stats = parse_xdr(tvb, item, "i", offset, "n_stats") + for i = 1, n_stats do + offset = parse_xdr(tvb, item, "s", offset, "name") + offset = parse_xdr(tvb, item, "l", offset, "i_node_number") + offset = parse_xdr(tvb, item, "l", offset, "generation") + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + offset = parse_xdr(tvb, item, "l", offset, "nlink") + offset = parse_xdr(tvb, item, "s", offset, "user") + offset = parse_xdr(tvb, item, "s", offset, "group") + offset = parse_xdr(tvb, item, "l", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "ncopy") + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "ctime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "ctime_nsec") + offset, n_xattr = parse_xdr(tvb, item, "i", offset, "nxattr") + for j = 1, n_xattr do + offset = parse_xdr(tvb, item, "s", offset, "name") + offset = parse_xdr(tvb, item, "b", offset, "value") + end + end + end + return offset +end +-- +-- Parse GFM_PROTO_REOPEN. +-- +function parse_gfm_reopen_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_reopen_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) l:inode_number, l:generation, i:mode, + -- i:flags, i:to_create + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "inode_number") + offset = parse_xdr(tvb, item, "l", offset, "generation") + offset = parse_xdr(tvb, item, "i", offset, "mode", base.OCT) + offset = parse_xdr(tvb, item, "i", offset, "flags") + offset = parse_xdr(tvb, item, "i", offset, "to_create") + end + return offset +end + +-- +-- Parse GFM_PROTO_CLOSE_READ. +-- +function parse_gfm_close_read_request(tvb, pinfo, item, offset) + -- IN l:atime_sec, i:atime_nsec + offset = offset + 4 + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + return offset +end + +function parse_gfm_close_read_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_CLOSE_WRITE. +-- +function parse_gfm_close_write_request(tvb, pinfo, item, offset) + -- IN l:size + -- l:atime_sec, i:atime_nsec + -- l:mtime_sec, i:mtime_nsec + offset = offset + 4 + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + return offset +end + +function parse_gfm_close_write_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_LOCK. +-- +function parse_gfm_lock_request(tvb, pinfo, item, offset) + -- IN l:start, l:len, i:type, i:whence + offset = offset + 4 + offset = parse_xdr(tvb, item, "l", offset, "start") + offset = parse_xdr(tvb, item, "l", offset, "len") + offset = parse_xdr(tvb, item, "i", offset, "type") + offset = parse_xdr(tvb, item, "i", offset, "whence", whence_names) + return offset +end + +function parse_gfm_lock_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_TRYLOCK. +-- +function parse_gfm_trylock_request(tvb, pinfo, item, offset) + -- IN l:start, l:len, i:type, i:whence + return parse_gfm_lock_request(tvb, pinfo, item, offset) +end + +function parse_gfm_trylock_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_UNLOCK. +-- +function parse_gfm_unlock_request(tvb, pinfo, item, offset) + -- IN l:start, l:len, i:type, i:whence + return parse_gfm_lock_request(tvb, pinfo, item, offset) +end + +function parse_gfm_unlock_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_LOCK_INFO. +-- +function parse_gfm_lock_info_request(tvb, pinfo, item, offset) + -- IN l:start, l:len, i:type, i:whence + return parse_gfm_lock_request(tvb, pinfo, item, offset) +end + +function parse_gfm_lock_info_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_SWITCH_BACK_CHANNEL. +-- +function parse_gfm_switch_back_channel_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_switch_back_channel_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_SWITCH_ASYNC_BACK_CHANNEL. +-- +function parse_gfm_switch_async_back_channel_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_switch_async_back_channel_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_CLOSE_WRITE_V2_4. +-- +function parse_gfm_close_write_v2_4_request(tvb, pinfo, item, offset) + -- IN l:size + -- l:atime_sec, i:atime_nsec + -- l:mtime_sec, i:mtime_nsec + offset = offset + 4 + offset = parse_xdr(tvb, item, "l", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + return offset +end + +function parse_gfm_close_write_v2_4_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) i:flags, l:old_gen, l:new_gen + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "i", offset, "flags", + format_gfm_write_v2_4_flags) + offset = parse_xdr(tvb, item, "l", offset, "old_gen") + offset = parse_xdr(tvb, item, "l", offset, "new_gen") + end + return offset +end + +-- +-- Parse GFM_PROTO_GENERATION_UPDATED. +-- +function parse_gfm_generation_updated_request(tvb, pinfo, item, offset) + -- IN i:error_code + return parse_gfm_compound_on_error_request(tvb, pinfo, item, offset) +end + +function parse_gfm_generation_updated_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_FHCLOSE_READ. +-- +function parse_gfm_fhclose_read_request(tvb, pinfo, item, offset) + -- IN l:inode_number, l:gen, l:atime_sec, i:atime_nsec + offset = offset + 4 + offset = parse_xdr(tvb, item, "l", offset, "inode_number") + offset = parse_xdr(tvb, item, "l", offset, "gen") + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + return offset +end + +function parse_gfm_fhclose_read_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_FHCLOSE_WRITE. +-- +function parse_gfm_fhclose_write_request(tvb, pinfo, item, offset) + -- IN l:inode_number, l:gen, l:size + -- l:atime_sec, i:atime_nsec + -- l:mtime_sec, i:mtime_nsec + offset = offset + 4 + offset = parse_xdr(tvb, item, "l", offset, "inode_number") + offset = parse_xdr(tvb, item, "l", offset, "gen") + offset = parse_xdr(tvb, item, "l", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + return offset +end + +function parse_gfm_fhclose_write_response(tvb, pinfo, item, offset) + -- OUT error_code + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "i", offset, "flags", + format_gfm_write_v2_4_flags) + offset = parse_xdr(tvb, item, "l", offset, "old_gen") + offset = parse_xdr(tvb, item, "l", offset, "new_gen") + offset = parse_xdr(tvb, item, "l", offset, "cookie") + end + return offset +end + +-- +-- Parse GFM_PROTO_GENERATION_UPDATED_BY_COOKIE. +-- +function parse_gfm_generation_updated_by_cookie_request(tvb, pinfo, item, offset) + -- IN l:cookie, i:errcode + offset = offset + 4 + offset = parse_xdr(tvb, item, "l", offset, "cookie") + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + return offset +end + +function parse_gfm_generation_updated_by_cookie_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_GLOB. +-- +function parse_gfm_glob_request(tvb, pinfo, item, offset) + -- IN i:n_globs, s[n_globs]:globs + return nil +end + +function parse_gfm_glob_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_SCHEDULE. +-- +function parse_gfm_schedule_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_schedule_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_PIO_OPEN. +-- +function parse_gfm_pio_open_request(tvb, pinfo, item, offset) + -- IN s:parallel_file, i:open_flags + offset = offset + 4 + local n_globs + offset, n_globs = parse_xdr(tvb, item, "s", offset, "parallel_file") + offset = parse_xdr(tvb, item, "i", offset, "open_flags", base.HEX) + return offset +end + +function parse_gfm_pio_open_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) i:n_files, s[n_files]:filenames + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + local n_files + offset, n_files = parse_xdr(tvb, item, "i", offset, "n_files") + for i = 1, n_files do + offset = parse_xdr(tvb, item, "s", offset, "filename") + end + end + return offset +end + +-- +-- Parse GFM_PROTO_PIO_SET_PATHS. +-- +function parse_gfm_pio_set_paths_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_pio_set_paths_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_PIO_CLOSE. +-- +function parse_gfm_pio_close_request(tvb, pinfo, item, offset) + -- IN (none) + return offset + 4 +end + +function parse_gfm_pio_close_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_PIO_VISIT. +-- +function parse_gfm_pio_visit_request(tvb, pinfo, item, offset) + -- IN s:parallel_file, i:open_flags + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "index") + return offset +end + +function parse_gfm_pio_visit_response(tvb, pinfo, item, offset) + -- OUT error_code + -- (upon success) i:flags + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "i", offset, "flags") + end + return offset +end + +-- +-- Parse GFM_PROTO_HOSTNAME_SET. +-- +function parse_gfm_hostname_set_request(tvb, pinfo, item, offset) + -- IN s:hostname (undocumented) + offset = offset + 4 + offset = parse_xdr(tvb, item, "s", offset, "hostname") + return offset +end + +function parse_gfm_hostname_set_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_SCHEDULE_HOST_DOMAIN. +-- +function parse_gfm_schedule_host_domain_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_schedule_host_domain_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_STATFS. +-- +function parse_gfm_statfs_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_statfs_response(tvb, pinfo, item, offset) + -- OUT error_code + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "used") + offset = parse_xdr(tvb, item, "l", offset, "avail") + offset = parse_xdr(tvb, item, "l", offset, "files") + end + return offset +end + +-- +-- Parse GFM_PROTO_REPLICA_LIST_BY_NAME. +-- +function parse_gfm_replica_list_by_name_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_list_by_name_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_LIST_BY_HOST. +-- +function parse_gfm_replica_list_by_host_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_list_by_host_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_REMOVE_BY_HOST. +-- +function parse_gfm_replica_remove_by_host_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_remove_by_host_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_REMOVE_BY_FILE. +-- +function parse_gfm_replica_remove_by_file_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_remove_by_file_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_INFO_GET. +-- +function parse_gfm_replica_info_get_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_info_get_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICATE_FILE_FROM_TO. +-- +function parse_gfm_replicate_file_from_to_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replicate_file_from_to_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICATE_FILE_TO. +-- +function parse_gfm_replicate_file_to_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replicate_file_to_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_ADDING. +-- +function parse_gfm_replica_adding_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_adding_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_ADDED. +-- +function parse_gfm_replica_added_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_added_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_LOST. +-- +function parse_gfm_replica_lost_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_lost_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_ADD. +-- +function parse_gfm_replica_add_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_add_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICA_ADDED2. +-- +function parse_gfm_replica_added2_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replica_added2_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_REPLICATION_RESULT. +-- +function parse_gfm_replication_result_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_replication_result_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_PROCESS_ALLOC. +-- +function parse_gfm_process_alloc_request(tvb, pinfo, item, offset) + -- IN i:key_type, b:shared_key + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "keytype") + offset = parse_xdr(tvb, item, "b", offset, "shared_key") + return offset +end + +function parse_gfm_process_alloc_response(tvb, pinfo, item, offset) + -- OUT l:pid + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "pid", base.DEC) + end + return nil +end + +-- +-- Parse GFM_PROTO_PROCESS_ALLOC_CHILD. +-- +function parse_gfm_process_alloc_child_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_process_alloc_child_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_PROCESS_FREE. +-- +function parse_gfm_process_free_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_process_free_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFM_PROTO_PROCESS_SET. +-- +function parse_gfm_process_set_request(tvb, pinfo, item, offset) + -- IN i:key_type, b:shared_key, l:pid + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "cookie") + offset = parse_xdr(tvb, item, "b", offset, "shared_key") + offset = parse_xdr(tvb, item, "l", offset, "pid", base.DEC) + return offset +end + +function parse_gfm_process_set_response(tvb, pinfo, item, offset) + -- OUT error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFJ_PROTO_LOCK_REGISTER. +-- +function parse_gfj_lock_register_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfj_lock_register_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFJ_PROTO_UNLOCK_REGISTER. +-- +function parse_gfj_unlock_register_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfj_unlock_register_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFJ_PROTO_REGISTER. +-- +function parse_gfj_register_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfj_register_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFJ_PROTO_UNREGISTER. +-- +function parse_gfj_unregister_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfj_unregister_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFJ_PROTO_REGISTER_NODE. +-- +function parse_gfj_register_node_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfj_register_node_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFJ_PROTO_LIST. +-- +function parse_gfj_list_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfj_list_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFJ_PROTO_INFO. +-- +function parse_gfj_info_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfj_info_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFJ_PROTO_HOSTINFO. +-- +function parse_gfj_hostinfo_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfj_hostinfo_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XATTR_SET. +-- +function parse_gfm_xattr_set_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xattr_set_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XMLATTR_SET. +-- +function parse_gfm_xmlattr_set_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xmlattr_set_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XATTR_GET. +-- +function parse_gfm_xattr_get_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xattr_get_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XMLATTR_GET. +-- +function parse_gfm_xmlattr_get_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xmlattr_get_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XATTR_REMOVE. +-- +function parse_gfm_xattr_remove_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xattr_remove_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XMLATTR_REMOVE. +-- +function parse_gfm_xmlattr_remove_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xmlattr_remove_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XATTR_LIST. +-- +function parse_gfm_xattr_list_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xattr_list_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XMLATTR_LIST. +-- +function parse_gfm_xmlattr_list_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xmlattr_list_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_XMLATTR_FIND. +-- +function parse_gfm_xmlattr_find_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_xmlattr_find_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_SWITCH_GFMD_CHANNEL. +-- +function parse_gfm_switch_gfmd_channel_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_switch_gfmd_channel_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_JOURNAL_READY_TO_RECV. +-- +function parse_gfm_journal_ready_to_recv_request(tvb, pinfo, item, offset) +end + +function parse_gfm_journal_ready_to_recv_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_JOURNAL_SEND. +-- +function parse_gfm_journal_send_request(tvb, pinfo, item, offset) +end + +function parse_gfm_journal_send_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_METADB_SERVER_GET. +-- +function parse_gfm_metadb_server_get_request(tvb, pinfo, item, offset) +end + +function parse_gfm_metadb_server_get_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_METADB_SERVER_GET_ALL. +-- +function parse_gfm_metadb_server_get_all_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_metadb_server_get_all_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_METADB_SERVER_SET. +-- +function parse_gfm_metadb_server_set_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_metadb_server_set_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_METADB_SERVER_MODIFY. +-- +function parse_gfm_metadb_server_modify_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_metadb_server_modify_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse GFM_PROTO_METADB_SERVER_REMOVE. +-- +function parse_gfm_metadb_server_remove_request(tvb, pinfo, item, offset) + return nil +end + +function parse_gfm_metadb_server_remove_response(tvb, pinfo, item, offset) + return nil +end + +-- +-- Parse function for each command. +-- +local gfm_command_parsers = { + [ 0] = {request = parse_gfm_host_info_get_all_request, + response = parse_gfm_host_info_get_all_response}, + [ 1] = {request = parse_gfm_host_info_get_by_architecture_request, + response = parse_gfm_host_info_get_by_architecture_response}, + [ 2] = {request = parse_gfm_host_info_get_by_names_request, + response = parse_gfm_host_info_get_by_names_response}, + [ 3] = {request = parse_gfm_host_info_get_by_namealiases_request, + response = parse_gfm_host_info_get_by_namealiases_response}, + [ 4] = {request = parse_gfm_host_info_set_request, + response = parse_gfm_host_info_set_response}, + [ 5] = {request = parse_gfm_host_info_modify_request, + response = parse_gfm_host_info_modify_response}, + [ 6] = {request = parse_gfm_host_info_remove_request, + response = parse_gfm_host_info_remove_response}, + [ 16] = {request = parse_gfm_user_info_get_all_request, + response = parse_gfm_user_info_get_all_response}, + [ 17] = {request = parse_gfm_user_info_get_by_names_request, + response = parse_gfm_user_info_get_by_names_response}, + [ 18] = {request = parse_gfm_user_info_set_request, + response = parse_gfm_user_info_set_response}, + [ 19] = {request = parse_gfm_user_info_modify_request, + response = parse_gfm_user_info_modify_response}, + [ 20] = {request = parse_gfm_user_info_remove_request, + response = parse_gfm_user_info_remove_response}, + [ 21] = {request = parse_gfm_user_info_get_by_gsi_dn_request, + response = parse_gfm_user_info_get_by_gsi_dn_response}, + [ 32] = {request = parse_gfm_group_info_get_all_request, + response = parse_gfm_group_info_get_all_response}, + [ 33] = {request = parse_gfm_group_info_get_by_names_request, + response = parse_gfm_group_info_get_by_names_response}, + [ 34] = {request = parse_gfm_group_info_set_request, + response = parse_gfm_group_info_set_response}, + [ 35] = {request = parse_gfm_group_info_modify_request, + response = parse_gfm_group_info_modify_response}, + [ 36] = {request = parse_gfm_group_info_remove_request, + response = parse_gfm_group_info_remove_response}, + [ 37] = {request = parse_gfm_group_info_add_users_request, + response = parse_gfm_group_info_add_users_response}, + [ 38] = {request = parse_gfm_group_info_remove_users_request, + response = parse_gfm_group_info_remove_users_response}, + [ 39] = {request = parse_gfm_group_names_get_by_users_request, + response = parse_gfm_group_names_get_by_users_response}, + [ 48] = {request = parse_gfm_quota_user_get_request, + response = parse_gfm_quota_user_get_response}, + [ 49] = {request = parse_gfm_quota_user_set_request, + response = parse_gfm_quota_user_set_response}, + [ 50] = {request = parse_gfm_quota_group_get_request, + response = parse_gfm_quota_group_get_response}, + [ 51] = {request = parse_gfm_quota_group_set_request, + response = parse_gfm_quota_group_set_response}, + [ 52] = {request = parse_gfm_quota_check_request, + response = parse_gfm_quota_check_response}, + [ 54] = {request = parse_gfm_dirset_info_set_request, + response = parse_gfm_dirset_info_set_response}, + [ 55] = {request = parse_gfm_dirset_info_remove_request, + response = parse_gfm_dirset_info_remove_response}, + [ 56] = {request = parse_gfm_dirset_info_list_request, + response = parse_gfm_dirset_info_list_response}, + [ 57] = {request = parse_gfm_quota_dirset_get_request, + response = parse_gfm_quota_dirset_get_response}, + [ 58] = {request = parse_gfm_quota_dirset_set_request, + response = parse_gfm_quota_dirset_set_response}, + [ 59] = {request = parse_gfm_quota_dir_get_request, + response = parse_gfm_quota_dir_get_response}, + [ 60] = {request = parse_gfm_quota_dir_set_request, + response = parse_gfm_quota_dir_set_response}, + [ 61] = {request = parse_gfm_dirset_dir_list_request, + response = parse_gfm_dirset_dir_list_response}, + [ 64] = {request = parse_gfm_compound_begin_request, + response = parse_gfm_compound_begin_response}, + [ 65] = {request = parse_gfm_compound_end_request, + response = parse_gfm_compound_end_response}, + [ 66] = {request = parse_gfm_compound_on_error_request, + response = parse_gfm_compound_on_error_response}, + [ 67] = {request = parse_gfm_put_fd_request, + response = parse_gfm_put_fd_response}, + [ 68] = {request = parse_gfm_get_fd_request, + response = parse_gfm_get_fd_response}, + [ 69] = {request = parse_gfm_save_fd_request, + response = parse_gfm_save_fd_response}, + [ 70] = {request = parse_gfm_restore_fd_request, + response = parse_gfm_restore_fd_response}, + [ 71] = {request = parse_gfm_bequeath_fd_request, + response = parse_gfm_bequeath_fd_response}, + [ 72] = {request = parse_gfm_inherit_fd_request, + response = parse_gfm_inherit_fd_response}, + [ 80] = {request = parse_gfm_open_root_request, + response = parse_gfm_open_root_response}, + [ 81] = {request = parse_gfm_open_parent_request, + response = parse_gfm_open_parent_response}, + [ 82] = {request = parse_gfm_open_request, + response = parse_gfm_open_response}, + [ 83] = {request = parse_gfm_create_request, + response = parse_gfm_create_response}, + [ 84] = {request = parse_gfm_close_request, + response = parse_gfm_close_response}, + [ 85] = {request = parse_gfm_verify_type_request, + response = parse_gfm_verify_type_response}, + [ 86] = {request = parse_gfm_verify_type_not_request, + response = parse_gfm_verify_type_not_response}, + [ 87] = {request = parse_gfm_revoke_gfsd_access_request, + response = parse_gfm_revoke_gfsd_access_response}, + [ 89] = {request = parse_gfm_close_getgen_request, + response = parse_gfm_close_getgen_response}, + [ 96] = {request = parse_gfm_fstat_request, + response = parse_gfm_fstat_response}, + [ 97] = {request = parse_gfm_futimes_request, + response = parse_gfm_futimes_response}, + [ 98] = {request = parse_gfm_fchmod_request, + response = parse_gfm_fchmod_response}, + [ 99] = {request = parse_gfm_fchown_request, + response = parse_gfm_fchown_response}, + [100] = {request = parse_gfm_cksum_get_request, + response = parse_gfm_cksum_get_response}, + [101] = {request = parse_gfm_cksum_set_request, + response = parse_gfm_cksum_set_response}, + [102] = {request = parse_gfm_schedule_file_request, + response = parse_gfm_schedule_file_response}, + [103] = {request = parse_gfm_schedule_file_with_program_request, + response = parse_gfm_schedule_file_with_program_response}, + [104] = {request = parse_gfm_fgetattrplus_request, + response = parse_gfm_fgetattrplus_response}, + [112] = {request = parse_gfm_remove_request, + response = parse_gfm_remove_response}, + [113] = {request = parse_gfm_rename_request, + response = parse_gfm_rename_response}, + [114] = {request = parse_gfm_flink_request, + response = parse_gfm_flink_response}, + [115] = {request = parse_gfm_mkdir_request, + response = parse_gfm_mkdir_response}, + [116] = {request = parse_gfm_symlink_request, + response = parse_gfm_symlink_response}, + [117] = {request = parse_gfm_readlink_request, + response = parse_gfm_readlink_response}, + [118] = {request = parse_gfm_getdirpath_request, + response = parse_gfm_getdirpath_response}, + [119] = {request = parse_gfm_getdirents_request, + response = parse_gfm_getdirents_response}, + [120] = {request = parse_gfm_seek_request, + response = parse_gfm_seek_response}, + [121] = {request = parse_gfm_getdirentsplus_request, + response = parse_gfm_getdirentsplus_response}, + [122] = {request = parse_gfm_getdirentsplusxattr_request, + response = parse_gfm_getdirentsplusxattr_response}, + [128] = {request = parse_gfm_reopen_request, + response = parse_gfm_reopen_response}, + [129] = {request = parse_gfm_close_read_request, + response = parse_gfm_close_read_response}, + [130] = {request = parse_gfm_close_write_request, + response = parse_gfm_close_write_response}, + [131] = {request = parse_gfm_lock_request, + response = parse_gfm_lock_response}, + [132] = {request = parse_gfm_trylock_request, + response = parse_gfm_trylock_response}, + [133] = {request = parse_gfm_unlock_request, + response = parse_gfm_unlock_response}, + [134] = {request = parse_gfm_lock_info_request, + response = parse_gfm_lock_info_response}, + [135] = {request = parse_gfm_switch_back_channel_request, + response = parse_gfm_switch_back_channel_response}, + [136] = {request = parse_gfm_switch_async_back_channel_request, + response = parse_gfm_switch_async_back_channel_response}, + [137] = {request = parse_gfm_close_write_v2_4_request, + response = parse_gfm_close_write_v2_4_response}, + [138] = {request = parse_gfm_generation_updated_request, + response = parse_gfm_generation_updated_response}, + [139] = {request = parse_gfm_fhclose_read_request, + response = parse_gfm_fhclose_read_response}, + [140] = {request = parse_gfm_fhclose_write_request, + response = parse_gfm_fhclose_write_response}, + [141] = {request = parse_gfm_generation_updated_by_cookie_request, + response = parse_gfm_generation_updated_by_cookie_response}, + [144] = {request = parse_gfm_glob_request, + response = parse_gfm_glob_response}, + [145] = {request = parse_gfm_schedule_request, + response = parse_gfm_schedule_response}, + [146] = {request = parse_gfm_pio_open_request, + response = parse_gfm_pio_open_response}, + [147] = {request = parse_gfm_pio_set_paths_request, + response = parse_gfm_pio_set_paths_response}, + [148] = {request = parse_gfm_pio_close_request, + response = parse_gfm_pio_close_response}, + [149] = {request = parse_gfm_pio_visit_request, + response = parse_gfm_pio_visit_response}, + [176] = {request = parse_gfm_hostname_set_request, + response = parse_gfm_hostname_set_response}, + [177] = {request = parse_gfm_schedule_host_domain_request, + response = parse_gfm_schedule_host_domain_response}, + [178] = {request = parse_gfm_statfs_request, + response = parse_gfm_statfs_response}, + [192] = {request = parse_gfm_replica_list_by_name_request, + response = parse_gfm_replica_list_by_name_response}, + [193] = {request = parse_gfm_replica_list_by_host_request, + response = parse_gfm_replica_list_by_host_response}, + [194] = {request = parse_gfm_replica_remove_by_host_request, + response = parse_gfm_replica_remove_by_host_response}, + [195] = {request = parse_gfm_replica_remove_by_file_request, + response = parse_gfm_replica_remove_by_file_response}, + [196] = {request = parse_gfm_replica_info_get_request, + response = parse_gfm_replica_info_get_response}, + [197] = {request = parse_gfm_replicate_file_from_to_request, + response = parse_gfm_replicate_file_from_to_response}, + [198] = {request = parse_gfm_replicate_file_to_request, + response = parse_gfm_replicate_file_to_response}, + [208] = {request = parse_gfm_replica_adding_request, + response = parse_gfm_replica_adding_response}, + [209] = {request = parse_gfm_replica_added_request, + response = parse_gfm_replica_added_response}, + [210] = {request = parse_gfm_replica_lost_request, + response = parse_gfm_replica_lost_response}, + [211] = {request = parse_gfm_replica_add_request, + response = parse_gfm_replica_add_response}, + [212] = {request = parse_gfm_replica_added2_request, + response = parse_gfm_replica_added2_response}, + [213] = {request = parse_gfm_replication_result_request, + response = parse_gfm_replication_result_response}, + [224] = {request = parse_gfm_process_alloc_request, + response = parse_gfm_process_alloc_response}, + [225] = {request = parse_gfm_process_alloc_child_request, + response = parse_gfm_process_alloc_child_response}, + [226] = {request = parse_gfm_process_free_request, + response = parse_gfm_process_free_response}, + [227] = {request = parse_gfm_process_set_request, + response = parse_gfm_process_set_response}, + [240] = {request = parse_gfj_lock_register_request, + response = parse_gfj_lock_register_response}, + [241] = {request = parse_gfj_unlock_register_request, + response = parse_gfj_unlock_register_response}, + [242] = {request = parse_gfj_register_request, + response = parse_gfj_register_response}, + [243] = {request = parse_gfj_unregister_request, + response = parse_gfj_unregister_response}, + [244] = {request = parse_gfj_register_node_request, + response = parse_gfj_register_node_response}, + [245] = {request = parse_gfj_list_request, + response = parse_gfj_list_response}, + [246] = {request = parse_gfj_info_request, + response = parse_gfj_info_response}, + [247] = {request = parse_gfj_hostinfo_request, + response = parse_gfj_hostinfo_response}, + [256] = {request = parse_gfm_xattr_set_request, + response = parse_gfm_xattr_set_response}, + [257] = {request = parse_gfm_xmlattr_set_request, + response = parse_gfm_xmlattr_set_response}, + [258] = {request = parse_gfm_xattr_get_request, + response = parse_gfm_xattr_get_response}, + [259] = {request = parse_gfm_xmlattr_get_request, + response = parse_gfm_xmlattr_get_response}, + [260] = {request = parse_gfm_xattr_remove_request, + response = parse_gfm_xattr_remove_response}, + [261] = {request = parse_gfm_xmlattr_remove_request, + response = parse_gfm_xmlattr_remove_response}, + [262] = {request = parse_gfm_xattr_list_request, + response = parse_gfm_xattr_list_response}, + [263] = {request = parse_gfm_xmlattr_list_request, + response = parse_gfm_xmlattr_list_response}, + [264] = {request = parse_gfm_xmlattr_find_request, + response = parse_gfm_xmlattr_find_response}, + [272] = {request = parse_gfm_switch_gfmd_channel_request, + response = parse_gfm_switch_gfmd_channel_response}, + [273] = {request = parse_gfm_journal_ready_to_recv_request, + response = parse_gfm_journal_ready_to_recv_response}, + [274] = {request = parse_gfm_journal_send_request, + response = parse_gfm_journal_send_response}, + [288] = {request = parse_gfm_metadb_server_get_request, + response = parse_gfm_metadb_server_get_response}, + [289] = {request = parse_gfm_metadb_server_get_all_request, + response = parse_gfm_metadb_server_get_all_response}, + [290] = {request = parse_gfm_metadb_server_set_request, + response = parse_gfm_metadb_server_set_response}, + [291] = {request = parse_gfm_metadb_server_modify_request, + response = parse_gfm_metadb_server_modify_response}, + [292] = {request = parse_gfm_metadb_server_remove_request, + response = parse_gfm_metadb_server_remove_response}, +} + +-- +-- Packet number of a request packet that the dissector has previously +-- parsed. +-- +local gfm_last_request_number = -1 + +-- +-- Array to search a request packet number which corresponds +-- with a response packet number. +-- +local gfm_response_to_request = {} + +-- +-- History of issued commands. +-- +local gfm_command_history = {} + +-- +-- Request dissector. +-- +function gfm_request_dissector(tvb, pinfo, root, history_key) + local pinfo_cmd_name = "unknown command" + pinfo.cols.protocol = gfm_proto.name + pinfo.cols.info = "Gfarm gfm request (" .. pinfo_cmd_name .. ")" + pinfo.desegment_len = 0 + local item = root:add(gfm_proto, tvb(), "Gfarm gfm protocol (request)") + gfm_command_history[history_key] = {} + + local i = 1 + local offset = pinfo.desegment_offset + pinfo.desegment_offset = 0 + + while offset < tvb():len() do + if offset + 4 > tvb():len() then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + pinfo.desegment_offset = offset + break + end + local cmd_code = tvb(offset, 4):uint() + local cmd_name = gfm_command_names[cmd_code] + if cmd_name == nil then + cmd_name = "unknown command" + end + if pinfo_cmd_name == "unknown command" or + pinfo_cmd_name == "GFM_PROTO_COMPOUND_BEGIN" or + pinfo_cmd_name == "GFM_PROTO_PUT_FD" then + pinfo_cmd_name = cmd_name + pinfo.cols.info = "Gfarm gfm request (" .. pinfo_cmd_name .. ")" + end + gfm_command_history[history_key][i] = cmd_code + + local subitem = item:add(gfm_proto, tvb(offset), + "Gfarm gfm protocol (request)") + subitem:set_text(string.format("gfm command: %s", cmd_name)) + parse_xdr(tvb, subitem, "i", offset, "command", gfm_command_names) + + local parser = gfm_command_parsers[cmd_code] + if parser == nil then + break + end + local next_offset = parser.request(tvb, pinfo, subitem, offset) + if next_offset == nil then + break + elseif next_offset < 0 then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + pinfo.desegment_offset = offset + break + end + subitem:set_len(next_offset - offset) + + offset = next_offset + i = i + 1 + end +end + +-- +-- Response dissector. +-- +function gfm_response_dissector(tvb, pinfo, root, history_key) + local pinfo_cmd_name = "unknown command" + pinfo.cols.protocol = gfm_proto.name + pinfo.cols.info = "Gfarm gfm response (" .. pinfo_cmd_name .. ")" + pinfo.desegment_len = 0 + local item = root:add(gfm_proto, tvb(), "Gfarm gfm protocol (response)") + if gfm_command_history[history_key] == nil then + pinfo.cols.info = "Gfarm gfm response (no corresponding request)" + return + end + + local i = 1 + local offset = pinfo.desegment_offset + pinfo.desegment_offset = 0 + + while offset < tvb():len() do + if offset + 4 > tvb():len() then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + pinfo.desegment_offset = offset + break + end + local cmd_code = gfm_command_history[history_key][i] + local cmd_name = gfm_command_names[cmd_code] + if cmd_name == nil then + cmd_name = "unknown command" + end + if pinfo_cmd_name == "unknown command" or + pinfo_cmd_name == "GFM_PROTO_COMPOUND_BEGIN" or + pinfo_cmd_name == "GFM_PROTO_PUT_FD" then + pinfo_cmd_name = cmd_name + pinfo.cols.info = "Gfarm gfm response (" .. pinfo_cmd_name .. ")" + end + + local subitem = item:add(gfm_proto, tvb(offset), + "Gfarm gfm protocol (response)") + subitem:set_text(string.format("gfm command: %s", cmd_name)) + + local parser = gfm_command_parsers[cmd_code] + if parser == nil then + break + end + local next_offset = parser.response(tvb, pinfo, subitem, offset) + if next_offset == nil then + break + elseif next_offset < 0 then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + pinfo.desegment_offset = offset + break + end + subitem:set_len(next_offset - offset) + + offset = next_offset + i = i + 1 + end +end + +-- +-- Dissector. +-- +function gfm_proto.dissector(tvb, pinfo, root) + if pinfo.dst_port == gfm_port then + gfm_last_request_number = pinfo.number + local history_key = string.format("%s;%d;%s;%d;%d", + tostring(pinfo.src), + pinfo.src_port, + tostring(pinfo.dst), + pinfo.dst_port, + pinfo.number) + return gfm_request_dissector(tvb, pinfo, root, history_key) + else + request_number = gfm_response_to_request[pinfo.number] + if request_number == nil then + request_number = gfm_last_request_number + gfm_response_to_request[pinfo.number] = request_number + end + local history_key = string.format("%s;%d;%s;%d;%d", + tostring(pinfo.dst), + pinfo.dst_port, + tostring(pinfo.src), + pinfo.src_port, + request_number) + return gfm_response_dissector(tvb, pinfo, root, history_key) + end +end + +-- +-- Register the dissector. +-- +local tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(gfm_port, gfm_proto) diff --git a/dissectors/gfarm/gfarm-gfs.lua b/dissectors/gfarm/gfarm-gfs.lua new file mode 100644 index 0000000..80b8baa --- /dev/null +++ b/dissectors/gfarm/gfarm-gfs.lua @@ -0,0 +1,1053 @@ +-- SPDX-License-Identifier: BSD-3-Clause +-- Importé de https://github.com/oss-tsukuba/gfarm (util/wireshark/gfarm-gfs.lua), +-- commit aefbfde261e3376e4adc6cbacf6d9b6837926548 du 29/10/2026. +-- Licence amont : BSD-3-Clause (en-tête du fichier, © 2011 Software Research Associates) — voir README.md. +-- +-- Copyright (c) 2011 Software Research Associates, Inc. +-- +-- Redistribution and use in source and binary forms, with or without +-- modification, are permitted provided that the following conditions +-- are met: +-- 1. Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- 2. Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in the +-- documentation and/or other materials provided with the distribution. +-- 3. Neither the name of the project nor the names of its contributors +-- may be used to endorse or promote products derived from this software +-- without specific prior written permission. +-- +-- THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +-- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +-- ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +-- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +-- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +-- SUCH DAMAGE. +-- + +-- +-- Gfarm v2 gfs protocol dissector for Wireshark. +-- +-- How To Use: +-- Edit Wireshark's 'init.lua'. Replace the following line +-- +-- disable_lua = true; do return end; +-- with +-- +-- -- disable_lua = true; do return end; +-- +-- Then, insert the following line at the end of the file: +-- +-- dofile("/somewhere/else/gfarm-gfs.lua") +-- +-- where "/somewhere/..." is an actual path of this file. +-- +-- Restrictions: +-- 1. Packet dissection of some gfs commands have not been implemented yet. +-- 2. Fragmentated packets are not dissected correctly. +-- + +-- NOTE: comment out the following line, if Wireshark >= 2.0 (i.e. Lua >= 5.2) +require("bit") + +-- +-- Mapping table: command code -> name. +-- +local gfs_command_names = { + [ 0] = 'GFS_PROTO_PROCESS_SET', + [ 1] = 'GFS_PROTO_OPEN_LOCAL', + [ 2] = 'GFS_PROTO_OPEN', + [ 3] = 'GFS_PROTO_CLOSE', + [ 4] = 'GFS_PROTO_PREAD', + [ 5] = 'GFS_PROTO_PWRITE', + [ 6] = 'GFS_PROTO_FTRUNCATE', + [ 7] = 'GFS_PROTO_FSYNC', + [ 8] = 'GFS_PROTO_FSTAT', + [ 9] = 'GFS_PROTO_CKSUM_SET', + [ 10] = 'GFS_PROTO_LOCK', + [ 11] = 'GFS_PROTO_TRYLOCK', + [ 12] = 'GFS_PROTO_UNLOCK', + [ 13] = 'GFS_PROTO_LOCK_INFO', + [ 14] = 'GFS_PROTO_REPLICA_ADD', + [ 15] = 'GFS_PROTO_REPLICA_ADD_FROM', + [ 16] = 'GFS_PROTO_REPLICA_RECV', + [ 17] = 'GFS_PROTO_STATFS', + [ 18] = 'GFS_PROTO_COMMAND', + [ 19] = 'GFS_PROTO_FHSTAT', + [ 20] = 'GFS_PROTO_FHREMOVE', + [ 21] = 'GFS_PROTO_STATUS', + [ 22] = 'GFS_PROTO_REPLICATION_REQUEST', + [ 23] = 'GFS_PROTO_REPLICATION_CANCEL', + [ 24] = 'GFS_PROTO_PROCESS_RESET', + [ 25] = 'GFS_PROTO_WRITE', + [ 32] = 'GFS_PROTO_RDMA_EXCH_INFO', + [ 33] = 'GFS_PROTO_RDMA_HELLO', + [ 34] = 'GFS_PROTO_RDMA_PREAD', + [ 35] = 'GFS_PROTO_RDMA_PWRITE', +} + +-- +-- Mapping table: error code -> name. +-- +local error_names = { + [ 0] = 'GFARM_ERR_NO_ERROR', + [ 1] = 'GFARM_ERR_OPERATION_NOT_PERMITTED', + [ 2] = 'GFARM_ERR_NO_SUCH_FILE_OR_DIRECTORY', + [ 3] = 'GFARM_ERR_NO_SUCH_PROCESS', + [ 4] = 'GFARM_ERR_INTERRUPTED_SYSTEM_CALL', + [ 5] = 'GFARM_ERR_INPUT_OUTPUT', + [ 6] = 'GFARM_ERR_DEVICE_NOT_CONFIGURED', + [ 7] = 'GFARM_ERR_ARGUMENT_LIST_TOO_LONG', + [ 8] = 'GFARM_ERR_EXEC_FORMAT', + [ 9] = 'GFARM_ERR_BAD_FILE_DESCRIPTOR', + [ 10] = 'GFARM_ERR_NO_CHILD_PROCESS', + [ 11] = 'GFARM_ERR_RESOURCE_TEMPORARILY_UNAVAILABLE', + [ 12] = 'GFARM_ERR_NO_MEMORY', + [ 13] = 'GFARM_ERR_PERMISSION_DENIED', + [ 14] = 'GFARM_ERR_BAD_ADDRESS', + [ 15] = 'GFARM_ERR_BLOCK_DEVICE_REQUIRED', + [ 16] = 'GFARM_ERR_DEVICE_BUSY', + [ 17] = 'GFARM_ERR_ALREADY_EXISTS', + [ 18] = 'GFARM_ERR_CROSS_DEVICE_LINK', + [ 19] = 'GFARM_ERR_OPERATION_NOT_SUPPORTED_BY_DEVICE', + [ 20] = 'GFARM_ERR_NOT_A_DIRECTORY', + [ 21] = 'GFARM_ERR_IS_A_DIRECTORY', + [ 22] = 'GFARM_ERR_INVALID_ARGUMENT', + [ 23] = 'GFARM_ERR_TOO_MANY_OPEN_FILES_IN_SYSTEM', + [ 24] = 'GFARM_ERR_TOO_MANY_OPEN_FILES', + [ 25] = 'GFARM_ERR_INAPPROPRIATE_IOCTL_FOR_DEVICE', + [ 26] = 'GFARM_ERR_TEXT_FILE_BUSY', + [ 27] = 'GFARM_ERR_FILE_TOO_LARGE', + [ 28] = 'GFARM_ERR_NO_SPACE', + [ 29] = 'GFARM_ERR_ILLEGAL_SEEK', + [ 30] = 'GFARM_ERR_READ_ONLY_FILE_SYSTEM', + [ 31] = 'GFARM_ERR_TOO_MANY_LINKS', + [ 32] = 'GFARM_ERR_BROKEN_PIPE', + [ 33] = 'GFARM_ERR_NUMERICAL_ARGUMENT_OUT_OF_DOMAIN', + [ 34] = 'GFARM_ERR_RESULT_OUT_OF_RANGE', + [ 35] = 'GFARM_ERR_ILLEGAL_BYTE_SEQUENCE', + [ 36] = 'GFARM_ERR_RESOURCE_DEADLOCK_AVOIDED', + [ 37] = 'GFARM_ERR_FILE_NAME_TOO_LONG', + [ 38] = 'GFARM_ERR_DIRECTORY_NOT_EMPTY', + [ 39] = 'GFARM_ERR_NO_LOCKS_AVAILABLE', + [ 40] = 'GFARM_ERR_FUNCTION_NOT_IMPLEMENTED', + [ 41] = 'GFARM_ERR_OPERATION_NOW_IN_PROGRESS', + [ 42] = 'GFARM_ERR_OPERATION_ALREADY_IN_PROGRESS', + [ 43] = 'GFARM_ERR_SOCKET_OPERATION_ON_NON_SOCKET', + [ 44] = 'GFARM_ERR_DESTINATION_ADDRESS_REQUIRED', + [ 45] = 'GFARM_ERR_MESSAGE_TOO_LONG', + [ 46] = 'GFARM_ERR_PROTOCOL_WRONG_TYPE_FOR_SOCKET', + [ 47] = 'GFARM_ERR_PROTOCOL_NOT_AVAILABLE', + [ 48] = 'GFARM_ERR_PROTOCOL_NOT_SUPPORTED', + [ 49] = 'GFARM_ERR_OPERATION_NOT_SUPPORTED', + [ 50] = 'GFARM_ERR_ADDRESS_FAMILY_NOT_SUPPORTED_BY_PROTOCOL_FAMILY', + [ 51] = 'GFARM_ERR_ADDRESS_ALREADY_IN_USE', + [ 52] = 'GFARM_ERR_CANNOT_ASSIGN_REQUESTED_ADDRESS', + [ 53] = 'GFARM_ERR_NETWORK_IS_DOWN', + [ 54] = 'GFARM_ERR_NETWORK_IS_UNREACHABLE', + [ 55] = 'GFARM_ERR_CONNECTION_ABORTED', + [ 56] = 'GFARM_ERR_CONNECTION_RESET_BY_PEER', + [ 57] = 'GFARM_ERR_NO_BUFFER_SPACE_AVAILABLE', + [ 58] = 'GFARM_ERR_SOCKET_IS_ALREADY_CONNECTED', + [ 59] = 'GFARM_ERR_SOCKET_IS_NOT_CONNECTED', + [ 60] = 'GFARM_ERR_OPERATION_TIMED_OUT', + [ 61] = 'GFARM_ERR_CONNECTION_REFUSED', + [ 62] = 'GFARM_ERR_NO_ROUTE_TO_HOST', + [ 63] = 'GFARM_ERR_TOO_MANY_LEVELS_OF_SYMBOLIC_LINK', + [ 64] = 'GFARM_ERR_DISK_QUOTA_EXCEEDED', + [ 65] = 'GFARM_ERR_STALE_FILE_HANDLE', + [ 66] = 'GFARM_ERR_IDENTIFIER_REMOVED', + [ 67] = 'GFARM_ERR_NO_MESSAGE_OF_DESIRED_TYPE', + [ 68] = 'GFARM_ERR_VALUE_TOO_LARGE_TO_BE_STORED_IN_DATA_TYPE', + [ 69] = 'GFARM_ERR_AUTHENTICATION', + [ 70] = 'GFARM_ERR_EXPIRED', + [ 71] = 'GFARM_ERR_PROTOCOL', + [ 72] = 'GFARM_ERR_UNKNOWN_HOST', + [ 73] = 'GFARM_ERR_CANNOT_RESOLVE_AN_IP_ADDRESS_INTO_A_HOSTNAME', + [ 74] = 'GFARM_ERR_NO_SUCH_OBJECT', + [ 75] = 'GFARM_ERR_CANT_OPEN', + [ 76] = 'GFARM_ERR_UNEXPECTED_EOF', + [ 77] = 'GFARM_ERR_GFARM_URL_PREFIX_IS_MISSING', + [ 78] = 'GFARM_ERR_TOO_MANY_JOBS', + [ 79] = 'GFARM_ERR_FILE_MIGRATED', + [ 80] = 'GFARM_ERR_NOT_A_SYMBOLIC_LINK', + [ 81] = 'GFARM_ERR_IS_A_SYMBOLIC_LINK', + [ 82] = 'GFARM_ERR_UNKNOWN', + [ 83] = 'GFARM_ERR_INVALID_FILE_REPLICA', + [ 84] = 'GFARM_ERR_NO_SUCH_USER', + [ 85] = 'GFARM_ERR_CANNOT_REMOVE_LAST_REPLICA', + [ 86] = 'GFARM_ERR_NO_SUCH_GROUP', + [ 87] = 'GFARM_ERR_GFARM_URL_USER_IS_MISSING', + [ 88] = 'GFARM_ERR_GFARM_URL_HOST_IS_MISSING', + [ 89] = 'GFARM_ERR_GFARM_URL_PORT_IS_MISSING', + [ 90] = 'GFARM_ERR_GFARM_URL_PORT_IS_INVALID', + [ 91] = 'GFARM_ERR_FILE_BUSY', + [ 92] = 'GFARM_ERR_NOT_A_REGULAR_FILE', + [ 93] = 'GFARM_ERR_IS_A_REGULAR_FILE', + [ 94] = 'GFARM_ERR_PATH_IS_ROOT', + [ 95] = 'GFARM_ERR_INTERNAL_ERROR', + [ 96] = 'GFARM_ERR_DB_ACCESS_SHOULD_BE_RETRIED', + [ 97] = 'GFARM_ERR_TOO_MANY_HOSTS', + [ 98] = 'GFARM_ERR_GFMD_FAILED_OVER', + [ 99] = 'GFARM_ERR_BAD_INODE_NUMBER', + [100] = 'GFARM_ERR_BAD_COOKIE', + [101] = 'GFARM_ERR_INSUFFICIENT_NUMBER_OF_FILE_REPLICAS', + [102] = 'GFARM_ERR_CHECKSUM_MISMATCH', + [103] = 'GFARM_ERR_CONFLICT_DETECTED', + [104] = 'GFARM_ERR_INVALID_CREDENTIAL', + [105] = 'GFARM_ERR_NO_FILESYSTEM_NODE', + [106] = 'GFARM_ERR_DIRECTORY_QUOTA_EXISTS', +} + +-- +-- Mapping table: whence value -> symbol. +-- +local whence_names = { + [0] = SEEK_SET, + [1] = SEEK_CUR, + [2] = SEEK_END, +} + +-- +-- Proto. +-- +local gfs_port = 600 +local gfs_proto = Proto("gfarm-gfs", "gfarm gfs protocol") + +-- +-- Protofields. +-- +local uint32_field = ProtoField.string("gfs.parameter.uint32", + "uint32 parameter", + base.DEC) +local uint64_field = ProtoField.string("gfs.parameter.uint32", + "uint32 parameter", + base.DEC) +local string_field = ProtoField.string("gfs.parameter.string", + "string parameter") +local bytearray_field = ProtoField.bytes("gfs.parameter.bytes", + "bytestream parameter") + +gfs_proto.fields = { + uint32_field, + uint64_field, + string_field, + bytearray_field, +} + +-- +-- Parse one XDR field. +-- +function parse_xdr(tvb, item, xdr_type, offset, text, map) + if offset < 0 then + return offset + end + + if xdr_type == "i" then + if offset + 4 > tvb():len() then + return -1, 0 + end + local value = tvb(offset, 4):uint() + local subitem = item:add(uint32_field, tvb(offset, 4)) + if type(map) == "function" then + subitem:set_text(string.format("%-20s: %s", text, map(value))) + elseif type(map) == "table" then + local mapvalue = map[value] + if mapvalue == nil then + mapvalue = "unknown" + end + subitem:set_text(string.format("%-20s: %s (0x%08x)", + text, mapvalue, value)) + elseif map == base.OCT then + subitem:set_text(string.format("%-20s: %012o", text, value)) + elseif map == base.DEC then + subitem:set_text(string.format("%-20s: %d", text, value)) + elseif map == base.HEX then + subitem:set_text(string.format("%-20s: %08x", text, value)) + else + subitem:set_text(string.format("%-20s: %u", text, value)) + end + return offset + 4, value + + elseif xdr_type == "l" then + if offset + 8 > tvb():len() then + return -1, 0, 0 + end + local value1 = tvb(offset, 4):uint() + local value2 = tvb(offset + 4, 4):uint() + local subitem = item:add(uint64_field, tvb(offset, 8)) + if type(map) == "function" then + subitem:set_text(string.format("%-20s: %s", text, + map(value1, value2))) + elseif map == base.HEX or value1 ~= 0 then + subitem:set_text(string.format("%-20s: 0x%08x%08x", + text, value1, value2)) + elseif map == base.OCT then + subitem:set_text(string.format("%-20s: %012o", text, value2)) + else + subitem:set_text(string.format("%-20s: %u", text, value2)) + end + return offset + 8, value1, value2 + + elseif xdr_type == "s" then + if offset + 4 > tvb():len() then + return -1, 0 + end + local len = tvb(offset, 4):uint() + if offset + 4 + len > tvb():len() then + return -1 + end + local value = tvb(offset + 4, len):string() + local subitem = item:add(string_field, tvb(offset, 4 + len)) + subitem:set_text(string.format("%-20s: \"%s\"", text, value)) + return offset + 4 + len, len + + else + if offset + 4 > tvb():len() then + return -1, 0 + end + local len = tvb(offset, 4):uint() + if offset + 4 + len > tvb():len() then + return -1 + end + local subitem = item:add(bytearray_field, tvb(offset, 4 + len)) + subitem:set_text(string.format("%-20s: byte array [%s byte(s)]", + text, len)) + return offset + 4 + len, len + end +end + +-- +-- Format datetime. +-- +function format_datetime(value1, value2) + if value1 ~= 0 then + return string.format("%-20s: 0x%08x%08x", value1, value2) + else + return os.date("%Y-%m-%d %H:%M:%S", value2) + end +end + +-- +-- Parse a response which return an error code only. +-- +function parse_response_with_error_code_only(tvb, pinfo, item, offset) + return parse_xdr(tvb, item, "i", offset, "error_code", error_names) +end + +function parse_response_with_error_code_and_length(tvb, pinfo, item, offset) + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "i", offset, "length") + end + return offset +end + +-- +-- Parse GFS_PROTO_PROCESS_SET. +-- +function parse_gfs_process_set_request(tvb, pinfo, item, offset) + -- IN i:type, b:shared_key, l:pid + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "type") + offset = parse_xdr(tvb, item, "b", offset, "shared_key") + offset = parse_xdr(tvb, item, "l", offset, "pid") + return offset +end + +function parse_gfs_process_set_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_OPEN_LOCAL. +-- +function parse_gfs_open_local_request(tvb, pinfo, item, offset) + -- IN i:fd + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + return offset +end + +function parse_gfs_open_local_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_OPEN. +-- +function parse_gfs_open_request(tvb, pinfo, item, offset) + -- IN i:fd + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + return offset +end + +function parse_gfs_open_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_CLOSE. +-- +function parse_gfs_close_request(tvb, pinfo, item, offset) + -- IN i:fd + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + return offset +end + +function parse_gfs_close_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_PREAD. +-- +function parse_gfs_pread_request(tvb, pinfo, item, offset) + -- IN i:fd, i:size, l:offset + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + offset = parse_xdr(tvb, item, "i", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "offset") + return offset +end + +function parse_gfs_pread_response(tvb, pinfo, item, offset) + -- OUT i:error_code, b:data + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + offset = parse_xdr(tvb, item, "b", offset, "data") + return offset +end + +-- +-- Parse GFS_PROTO_PWRITE. +-- +function parse_gfs_pwrite_request(tvb, pinfo, item, offset) + -- IN i:fd, b:buffer, l:offset + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + offset = parse_xdr(tvb, item, "b", offset, "buffer") + offset = parse_xdr(tvb, item, "l", offset, "offset") + return offset +end + +function parse_gfs_pwrite_response(tvb, pinfo, item, offset) + -- OUT i:error_code, i:length + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + offset = parse_xdr(tvb, item, "i", offset, "length") + return offset +end + +-- +-- Parse GFS_PROTO_WRITE. +-- +function parse_gfs_write_request(tvb, pinfo, item, offset) + -- IN i:fd, b:buffer + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + offset = parse_xdr(tvb, item, "b", offset, "buffer") + return offset +end + +function parse_gfs_write_response(tvb, pinfo, item, offset) + -- OUT i:error_code, i:length l:offset l:fole_size + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + offset = parse_xdr(tvb, item, "i", offset, "length") + offset = parse_xdr(tvb, item, "l", offset, "written_offset") + offset = parse_xdr(tvb, item, "l", offset, "file_size") + return offset +end + + +-- +-- Parse GFS_PROTO_PROCESS_RESET. +-- +function parse_gfs_process_reset_request(tvb, pinfo, item, offset) + -- IN i:fd, b:buffer + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "keytype") + offset = parse_xdr(tvb, item, "b", offset, "sharedkey") + offset = parse_xdr(tvb, item, "l", offset, "pid") + offset = parse_xdr(tvb, item, "i", offset, "failover_count") + return offset +end + +function parse_gfs_process_reset_response(tvb, pinfo, item, offset) + -- OUT i:error_code + offset = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + return offset +end + +-- +-- Parse GFS_PROTO_FTRUNCATE. +-- +function parse_gfs_ftruncate_request(tvb, pinfo, item, offset) + -- IN i:fd, l:length + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + offset = parse_xdr(tvb, item, "l", offset, "length") + return offset +end + +function parse_gfs_ftruncate_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_FSYNC. +-- +function parse_gfs_fsync_request(tvb, pinfo, item, offset) + -- IN i:fd, i:operation +end + +function parse_gfs_fsync_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_FSTAT. +-- +function parse_gfs_fstat_request(tvb, pinfo, item, offset) + -- IN i:fd + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + return offset +end + +function parse_gfs_fstat_response(tvb, pinfo, item, offset) + -- OUT i:error_code, + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "atime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "atime_nsec") + offset = parse_xdr(tvb, item, "l", offset, "mtime_sec", format_datetime) + offset = parse_xdr(tvb, item, "i", offset, "mtime_nsec") + end + return offset +end + +-- +-- Parse GFS_PROTO_CKSUM_SET. +-- +function parse_gfs_cksum_set_request(tvb, pinfo, item, offset) + -- IN i:fd, s:cksum_type, b:cksum + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + offset = parse_xdr(tvb, item, "s", offset, "cksum_type") + offset = parse_xdr(tvb, item, "b", offset, "cksum") + return offset +end + +function parse_gfs_cksum_set_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_LOCK. +-- +function parse_gfs_lock_request(tvb, pinfo, item, offset) + -- IN i:fd, l:start, l:len, i:type, i:whence + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + offset = parse_xdr(tvb, item, "l", offset, "start") + offset = parse_xdr(tvb, item, "l", offset, "len") + offset = parse_xdr(tvb, item, "i", offset, "type") + offset = parse_xdr(tvb, item, "i", offset, "whence", whence_names) + return offset +end + +function parse_gfs_lock_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_TRYLOCK. +-- +function parse_gfs_trylock_request(tvb, pinfo, item, offset) + -- IN i:fd, l:start, l:len, i:type, i:whence + return parse_gfs_lock_request(tvb, pinfo, item, offset) +end + +function parse_gfs_trylock_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_UNLOCK. +-- +function parse_gfs_unlock_request(tvb, pinfo, item, offset) + -- IN i:fd, l:start, l:len, i:type, i:whence + return parse_gfs_lock_request(tvb, pinfo, item, offset) +end + +function parse_gfs_unlock_response(tvb, pinfo, item, offset) + -- OUT i:error_code + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_LOCK_INFO. +-- +function parse_gfs_lock_info_request(tvb, pinfo, item, offset) + -- IN i:fd, l:start, l:len, i:type, i:whence + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +function parse_gfs_lock_info_response(tvb, pinfo, item, offset) + -- OUT i:error_code, + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "l", offset, "start") + offset = parse_xdr(tvb, item, "l", offset, "len") + offset = parse_xdr(tvb, item, "i", offset, "type") + offset = parse_xdr(tvb, item, "s", offset, "host") + offset = parse_xdr(tvb, item, "l", offset, "pid") + end + return offset +end + +-- +-- Parse GFS_PROTO_REPLICA_ADD. +-- +function parse_gfs_replica_add_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_replica_add_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_REPLICA_ADD_FROM. +-- +function parse_gfs_replica_add_from_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_replica_add_from_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_REPLICA_RECV. +-- +function parse_gfs_replica_recv_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_replica_recv_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_STATFS. +-- +function parse_gfs_statfs_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_statfs_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_COMMAND. +-- +function parse_gfs_command_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_command_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_FHSTAT. +-- +function parse_gfs_fhstat_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_fhstat_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_FHREMOVE. +-- +function parse_gfs_fhremove_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_fhremove_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_STATUS. +-- +function parse_gfs_status_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_status_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_REPLICATION_REQUEST. +-- +function parse_gfs_replication_request_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_replication_request_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_REPLICATION_CANCEL. +-- +function parse_gfs_replication_cancel_request(tvb, pinfo, item, offset) + -- IN +end + +function parse_gfs_replication_cancel_response(tvb, pinfo, item, offset) + -- OUT +end + +-- +-- Parse GFS_PROTO_RDMA_PREAD. +-- +function parse_gfs_rdma_pread_request(tvb, pinfo, item, offset) + -- IN i:fd, i:size, l:offset + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + offset = parse_xdr(tvb, item, "i", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "offset") + offset = parse_xdr(tvb, item, "i", offset, "rkey") + offset = parse_xdr(tvb, item, "l", offset, "addr") + return offset +end + +function parse_gfs_rdma_pread_response(tvb, pinfo, item, offset) + -- OUT i:error_code, l:length + return parse_response_with_error_code_and_length(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_RDMA_PWRITE. +-- +function parse_gfs_rdma_pwrite_request(tvb, pinfo, item, offset) + -- IN i:fd, i:size, l:offset + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "fd") + offset = parse_xdr(tvb, item, "i", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "offset") + offset = parse_xdr(tvb, item, "i", offset, "rkey") + offset = parse_xdr(tvb, item, "l", offset, "addr") + return offset +end + +function parse_gfs_rdma_pwrite_response(tvb, pinfo, item, offset) + -- OUT i:error_code, l:length + return parse_response_with_error_code_and_length(tvb, pinfo, item, offset) +end + +-- +-- Parse GFS_PROTO_RDMA_EXCH_INFO. +-- +function parse_gfs_rdma_pread_request(tvb, pinfo, item, offset) + -- IN i:fd, i:size, l:offset + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "lid") + offset = parse_xdr(tvb, item, "i", offset, "qpn") + offset = parse_xdr(tvb, item, "i", offset, "psn") + offset = parse_xdr(tvb, item, "b", offset, "gid") + return offset +end + +function parse_gfs_rdma_pread_response(tvb, pinfo, item, offset) + -- OUT i:error_code, l:length + local err + offset, err = parse_xdr(tvb, item, "i", offset, "error_code", error_names) + if err == 0 then + offset = parse_xdr(tvb, item, "i", offset, "success") + offset = parse_xdr(tvb, item, "i", offset, "lid") + offset = parse_xdr(tvb, item, "i", offset, "qpn") + offset = parse_xdr(tvb, item, "i", offset, "psn") + offset = parse_xdr(tvb, item, "b", offset, "gid") + end + return offset +end + +-- +-- Parse GFS_PROTO_RDMA_HELLO. +-- +function parse_gfs_rdma_hello_request(tvb, pinfo, item, offset) + -- IN i:fd, i:size, l:offset + offset = offset + 4 + offset = parse_xdr(tvb, item, "i", offset, "rkey") + offset = parse_xdr(tvb, item, "i", offset, "size") + offset = parse_xdr(tvb, item, "l", offset, "addr") + return offset +end + +function parse_gfs_rdma_hello_response(tvb, pinfo, item, offset) + -- OUT i:error_code, l:length + return parse_response_with_error_code_only(tvb, pinfo, item, offset) +end + +-- +-- Parse function for each command. +-- +local gfs_command_parsers = { + [ 0] = {request = parse_gfs_process_set_request, + response = parse_gfs_process_set_response}, + [ 1] = {request = parse_gfs_open_local_request, + response = parse_gfs_open_local_response}, + [ 2] = {request = parse_gfs_open_request, + response = parse_gfs_open_response}, + [ 3] = {request = parse_gfs_close_request, + response = parse_gfs_close_response}, + [ 4] = {request = parse_gfs_pread_request, + response = parse_gfs_pread_response}, + [ 5] = {request = parse_gfs_pwrite_request, + response = parse_gfs_pwrite_response}, + [ 6] = {request = parse_gfs_ftruncate_request, + response = parse_gfs_ftruncate_response}, + [ 7] = {request = parse_gfs_fsync_request, + response = parse_gfs_fsync_response}, + [ 8] = {request = parse_gfs_fstat_request, + response = parse_gfs_fstat_response}, + [ 9] = {request = parse_gfs_cksum_set_request, + response = parse_gfs_cksum_set_response}, + [ 10] = {request = parse_gfs_lock_request, + response = parse_gfs_lock_response}, + [ 11] = {request = parse_gfs_trylock_request, + response = parse_gfs_trylock_response}, + [ 12] = {request = parse_gfs_unlock_request, + response = parse_gfs_unlock_response}, + [ 13] = {request = parse_gfs_lock_info_request, + response = parse_gfs_lock_info_response}, + [ 14] = {request = parse_gfs_replica_add_request, + response = parse_gfs_replica_add_response}, + [ 15] = {request = parse_gfs_replica_add_from_request, + response = parse_gfs_replica_add_from_response}, + [ 16] = {request = parse_gfs_replica_recv_request, + response = parse_gfs_replica_recv_response}, + [ 17] = {request = parse_gfs_statfs_request, + response = parse_gfs_statfs_response}, + [ 18] = {request = parse_gfs_command_request, + response = parse_gfs_command_response}, + [ 19] = {request = parse_gfs_fhstat_request, + response = parse_gfs_fhstat_response}, + [ 20] = {request = parse_gfs_fhremove_request, + response = parse_gfs_fhremove_response}, + [ 21] = {request = parse_gfs_status_request, + response = parse_gfs_status_response}, + [ 22] = {request = parse_gfs_replication_request_request, + response = parse_gfs_replication_request_response}, + [ 23] = {request = parse_gfs_replication_cancel_request, + response = parse_gfs_replication_cancel_response}, + [ 24] = {request = parse_gfs_process_reset_request, + response = parse_gfs_process_reset_response}, + [ 25] = {request = parse_gfs_write_request, + response = parse_gfs_write_response}, + [ 32] = {request = parse_gfs_rdma_exch_info_request, + response = parse_gfs_rdma_exch_info_response}, + [ 33] = {request = parse_gfs_rdma_hello_request, + response = parse_gfs_rdma_hello_response}, + [ 34] = {request = parse_gfs_rdma_pread_request, + response = parse_gfs_rdma_pread_response}, + [ 35] = {request = parse_gfs_rdma_pwrite_request, + response = parse_gfs_rdma_pwrite_response}, +} + +-- +-- Packet number of a request packet that the dissector has previously +-- parsed. +-- +local gfs_last_request_number = -1 + +-- +-- Array to search a request packet number which corresponds +-- with a response packet number. +-- +local gfs_response_to_request = {} + +-- +-- History of issued commands. +-- +local gfs_command_history = {} + +-- +-- Request dissector. +-- +function gfs_request_dissector(tvb, pinfo, root, history_key) + local pinfo_cmd_name = "unknown command" + pinfo.cols.protocol = gfs_proto.name + pinfo.cols.info = "Gfarm gfs request (" .. pinfo_cmd_name .. ")" + pinfo.desegment_len = 0 + local item = root:add(gfs_proto, tvb(), "Gfarm gfs protocol (request)") + gfs_command_history[history_key] = {} + + local i = 1 + local offset = pinfo.desegment_offset + pinfo.desegment_offset = 0 + + while offset < tvb():len() do + if offset + 4 > tvb():len() then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + pinfo.desegment_offset = offset + break + end + local cmd_code = tvb(offset, 4):uint() + local cmd_name = gfs_command_names[cmd_code] + if cmd_name == nil then + cmd_name = "unknown command" + end + if pinfo_cmd_name == "unknown command" or + pinfo_cmd_name == "GFM_PROTO_COMPOUND_BEGIN" or + pinfo_cmd_name == "GFM_PROTO_PUT_FD" then + pinfo_cmd_name = cmd_name + pinfo.cols.info = "Gfarm gfs request (" .. pinfo_cmd_name .. ")" + end + gfs_command_history[history_key][i] = cmd_code + + local subitem = item:add(gfs_proto, tvb(offset), + "Gfarm gfs protocol (request)") + subitem:set_text(string.format("gfs command: %s", cmd_name)) + parse_xdr(tvb, subitem, "i", offset, "command", gfs_command_names) + + local parser = gfs_command_parsers[cmd_code] + if parser == nil then + break + end + local next_offset = parser.request(tvb, pinfo, subitem, offset) + if next_offset == nil then + break + elseif next_offset < 0 then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + pinfo.desegment_offset = offset + break + end + subitem:set_len(next_offset - offset) + + offset = next_offset + i = i + 1 + end +end + +-- +-- Response dissector. +-- +function gfs_response_dissector(tvb, pinfo, root, history_key) + local pinfo_cmd_name = "unknown command" + pinfo.cols.protocol = gfs_proto.name + pinfo.cols.info = "Gfarm gfs response (" .. pinfo_cmd_name .. ")" + pinfo.desegment_len = 0 + local item = root:add(gfs_proto, tvb(), "Gfarm gfs protocol (response)") + if gfs_command_history[history_key] == nil then + pinfo.cols.info = "Gfarm gfs response (no corresponding request)" + return + end + + local i = 1 + local offset = pinfo.desegment_offset + pinfo.desegment_offset = 0 + + while offset < tvb():len() do + if offset + 4 > tvb():len() then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + pinfo.desegment_offset = offset + break + end + local cmd_code = gfs_command_history[history_key][i] + local cmd_name = gfs_command_names[cmd_code] + if cmd_name == nil then + cmd_name = "unknown command" + end + if pinfo_cmd_name == "unknown command" or + pinfo_cmd_name == "GFM_PROTO_COMPOUND_BEGIN" or + pinfo_cmd_name == "GFM_PROTO_PUT_FD" then + pinfo_cmd_name = cmd_name + pinfo.cols.info = "Gfarm gfs response (" .. pinfo_cmd_name .. ")" + end + + local subitem = item:add(gfs_proto, tvb(offset), + "Gfarm gfs protocol (response)") + subitem:set_text(string.format("gfs command: %s", cmd_name)) + + local parser = gfs_command_parsers[cmd_code] + if parser == nil then + break + end + local next_offset = parser.response(tvb, pinfo, subitem, offset) + if next_offset == nil then + break + elseif next_offset < 0 then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + pinfo.desegment_offset = offset + break + end + subitem:set_len(next_offset - offset) + + offset = next_offset + i = i + 1 + end +end + +-- +-- Dissector. +-- +function gfs_proto.dissector(tvb, pinfo, root) + if pinfo.dst_port == gfs_port then + gfs_last_request_number = pinfo.number + local history_key = string.format("%s;%d;%s;%d;%d", + tostring(pinfo.src), + pinfo.src_port, + tostring(pinfo.dst), + pinfo.dst_port, + pinfo.number) + return gfs_request_dissector(tvb, pinfo, root, history_key) + else + request_number = gfs_response_to_request[pinfo.number] + if request_number == nil then + request_number = gfs_last_request_number + gfs_response_to_request[pinfo.number] = request_number + end + local history_key = string.format("%s;%d;%s;%d;%d", + tostring(pinfo.dst), + pinfo.dst_port, + tostring(pinfo.src), + pinfo.src_port, + request_number) + return gfs_response_dissector(tvb, pinfo, root, history_key) + end +end + +-- +-- Register the dissector. +-- +local tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(gfs_port, gfs_proto) diff --git a/dissectors/gizwits/LICENSE b/dissectors/gizwits/LICENSE new file mode 100644 index 0000000..6cd34e4 --- /dev/null +++ b/dissectors/gizwits/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021-2024 Ingo Fischer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/gizwits/README.md b/dissectors/gizwits/README.md new file mode 100644 index 0000000..19378c9 --- /dev/null +++ b/dissectors/gizwits/README.md @@ -0,0 +1,60 @@ +# Gizwits (protocole local des objets connectés Gizwits, PH-803W) + +Dissecteurs Wireshark Lua du **protocole LAN Gizwits**, plateforme IoT +chinoise utilisée notamment par le contrôleur pH/ORP PH-803W : découverte +et onboarding en UDP 12414, échanges avec l'appareil en TCP 12416. Le +dissecteur principal décode l'en-tête (version, longueur variable, drapeaux, +commande) puis transmet les « data points » à des sous-dissecteurs par +produit, enregistrés dans une table `gizwits` indexée par `product_key`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Apollon77/node-ph803w (dossier `wireshark/`) | +| Commit importé | `ddf25e3e9a6e174a3144570cef2cd97c0645ff46` du 21/04/2024 (branche `main`, dernier commit ; dernière modification du dossier `wireshark/` : `698035e` du 23/10/2022) | +| Licence amont | MIT (`LICENSE` amont, © 2021-2024 Ingo Fischer) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Gizwits natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `gizwits.lua` | Dissecteur principal `gizwits` (UDP 12414, TCP 12416) ; crée la table `gizwits` | +| `gizwits_ph803w.lua` | Data points du PH-803W (« iMoniter », pH / ORP, relais) | +| `gizwits_clearlight.lua` | Data points d'un produit ClearLight | +| `gizwits_gizkit_soc_pet.lua` | Data points du kit de développement GizKit SOC (pet) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête de chaque fichier. + +Non importés : `wireshark.lua` (fichier de déclarations `---@meta` pour +l'éditeur Lua — il redéfinit `base`, `ENC_*`… et fait `require "bit32"` ; +chargé par Wireshark, il écraserait les globales de l'API) et +`gizwits_template.lua` (modèle de génération avec `$product_key` non +renseigné). + +## Utilisation + +Copier les quatre fichiers `.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `gizwits`. `gizwits.lua` doit être chargé avant les fichiers +de data points (ordre alphabétique respecté : `gizwits.lua` précède +`gizwits_*.lua`). + +## Remarques + +- **`bit32` absent des Wireshark récents** : le décodage de la longueur + variable (`gizwits.lua`) et des attributs booléens/énumérés (fichiers de + data points) appelle `bit32.bor`, `bit32.band`, `bit32.lshift`, + bibliothèque de Lua 5.2 absente par défaut de Lua 5.3 et 5.4, seules + versions prises en charge depuis Wireshark 4.4 (qui fournit `bit` à la + place). Contournement local : ajouter `bit32 = bit` en tête de + `gizwits.lua` (code amont non modifié ici) ; +- les data points d'autres produits Gizwits s'ajoutent en générant un + fichier à partir du modèle amont (`gizwits_template.lua`) et de l'API + Gizwits (`/app/datapoint?product_key=…`) ; +- pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/gizwits/gizwits.lua b/dissectors/gizwits/gizwits.lua new file mode 100644 index 0000000..90ad861 --- /dev/null +++ b/dissectors/gizwits/gizwits.lua @@ -0,0 +1,298 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Apollon77/node-ph803w (wireshark/gizwits.lua), +-- commit ddf25e3e9a6e174a3144570cef2cd97c0645ff46 du 21/04/2024. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +local p_gizwits = Proto("gizwits", "Gizwits Agent"); +local p_gizwits_unknown = Proto("gizwits_unknown", "Gizwits Data Point: Unknown product (missing discovery packet?)"); + +local d_table = DissectorTable.new("gizwits", "Gizwits", ftypes.STRING, base.NONE, p_gizwits) + +local CMD_ONBOARDING = 0x0001 -- UDP +local CMD_REPLY_ONBOARDING = 0x0002 -- UDP +local CMD_ONDISCOVER = 0x0003 -- UDP +local CMD_REPLY_BROADCAST = 0x0004 -- UDP +local CMD_STARTUP_BROADCAST = 0x0005 -- UDP +local CMD_BINDING = 0x0006 -- TCP +local CMD_REPLY_BINDING = 0x0007 -- TCP +local CMD_LOGIN = 0x0008 -- TCP +local CMD_REPLY_LOGIN = 0x0009 -- TCP +local CMD_HOTSPOTS = 0x000C -- TCP +local CMD_REPLY_HOTSPOTS = 0x000D -- TCP +local CMD_LOG = 0x0010 -- TCP +local CMD_INFO = 0x0013 -- TCP +local CMD_REPLY_INFO = 0x0014 -- TCP +local CMD_TICK = 0x0015 -- TCP +local CMD_REPLY_TICK = 0x0016 -- TCP +local CMD_TEST = 0x0017 -- TCP +local CMD_REPLY_TEST = 0x0018 -- TCP +local CMD_AIR_BROADCAST = 0x0019 -- UDP +local CMD_TRANSMIT = 0x0090 -- TCP/UDP +local CMD_TRANSMIT_91 = 0x0091 -- TCP/UDP +local CMD_CTL_93 = 0x0093 -- TCP/UDP +local CMD_CTLACK_94 = 0x0094 -- TCP/UDP + +local cmds = { + [CMD_ONBOARDING ] = "onBoarding request", + [CMD_REPLY_ONBOARDING ] = "onBoarding response", + [CMD_ONDISCOVER ] = "Discovery request", + [CMD_REPLY_BROADCAST ] = "Discovery response", + [CMD_STARTUP_BROADCAST] = "Startup Broadcast", + [CMD_BINDING ] = "Device passcode request", + [CMD_REPLY_BINDING ] = "Device passcode response", + [CMD_LOGIN ] = "User login request", + [CMD_REPLY_LOGIN ] = "User login response", + [CMD_HOTSPOTS ] = "Wifi hotspots request", + [CMD_REPLY_HOTSPOTS ] = "Wifi hotspots response", + [CMD_LOG ] = "Log", + [CMD_INFO ] = "Wifi module information request", + [CMD_REPLY_INFO ] = "Wifi module information response", + [CMD_TICK ] = "Ping-Pong request", + [CMD_REPLY_TICK ] = "Ping-Pong response", + [CMD_TEST ] = "Test request", + [CMD_REPLY_TEST ] = "Test response", + [CMD_AIR_BROADCAST ] = "Air Broadcast", + [CMD_TRANSMIT ] = "Device serial data transmit request", + [CMD_TRANSMIT_91 ] = "Device serial data transmit response", + [CMD_CTL_93 ] = "Device serial data control request", + [CMD_CTLACK_94 ] = "Device serial data control response", +} + +local LOGIN_SUCCESS = 0 +local LOGIN_FAIL = 1 + +local logins = { + [LOGIN_SUCCESS] = "Success", + [LOGIN_FAIL ] = "Fail", +} + +local f_version = ProtoField.uint32("gizwits.version", "Version", base.DEC) +local f_len = ProtoField.uint64("gizwits.len", "Length", base.DEC) +local f_flags = ProtoField.uint8("gizwits.flags", "Flags", base.HEX) +local f_cmd = ProtoField.uint16("gizwits.cmd", "Command", base.HEX, cmds) + +local f_deviceid_len = ProtoField.uint32("gizwits.deviceid_len", "Device Id Length", base.DEC) +local f_deviceid = ProtoField.string("gizwits.deviceid", "Device Id", base.ASCII) +local f_firmwareversion_len = ProtoField.uint32("gizwits.firmwareversion_len", "Firmware Version Length", base.DEC) +local f_firmwareversion = ProtoField.string("gizwits.firmwareversion", "Firmware Version", base.ASCII) +local f_productkey_len = ProtoField.uint32("gizwits.productkey_len", "Product Key Length", base.DEC) +local f_productkey = ProtoField.string("gizwits.productkey", "Product Key", base.ASCII) +local f_mcuattributes = ProtoField.bytes("gizwits.productkey", "MCU Attributes") +local f_apiserver = ProtoField.stringz("gizwits.apiserver", "API Server", base.ASCII) +local f_agentversion = ProtoField.stringz("gizwits.agentversion", "Agent Version", base.ASCII) + +local f_login = ProtoField.uint16("gizwits.login", "Login", base.DEC, logins) + +local f_mac = ProtoField.ether("gizwits.mac", "Mac Address") +local f_mac_len = ProtoField.uint8("gizwits.mac_len", "Mac Address Length", base.DEC) +local f_sn = ProtoField.bytes("gizwits.sn", "Sequence Number") +local f_payload = ProtoField.bytes("gizwits.payload", "Payload") +local f_passcode_len = ProtoField.uint32("gizwits.passcode_len", "Passcode Length", base.DEC) +local f_passcode = ProtoField.string("gizwits.passcode", "Passcode", base.ASCII) + +p_gizwits.fields = { + f_version, f_len, f_flags, f_cmd, + f_deviceid_len, f_deviceid, + f_firmwareversion_len, f_firmwareversion, + f_productkey_len, f_productkey, + f_mcuattributes, f_apiserver, f_agentversion, + f_login, + f_mac_len, f_mac, f_sn, f_payload, + f_passcode_len, f_passcode, +} + +local productkeys_by_ip = {} + +local data_dis = Dissector.get("data") + +local function varint(range) + local value = 0 + for i = 0, math.min(4, range:len()) do + local b = range(i, 1):uint() + value = bit32.bor(value, bit32.lshift(bit32.band(b, 0x7f), i * 7)) + if b < 0x80 then + return value, i + 1; + end + end + error("varint too long") +end + +local function dissector(buf, pkt, tree) + + local len, len_len = varint(buf(4)) + local subtree = tree:add(p_gizwits, buf(0, 4 + len_len + len)) + local off = 0 + + subtree:add_packet_field(f_version, buf(off, 4), ENC_BIG_ENDIAN) + off = off + 4 + + subtree:add_packet_field(f_len, buf(off, len_len), ENC_BIG_ENDIAN) + off = off + len_len + + subtree:add_packet_field(f_flags, buf(off, 1), ENC_BIG_ENDIAN) + off = off + 1 + len = len - 1 + + subtree:add_packet_field(f_cmd, buf(off, 2), ENC_BIG_ENDIAN) + local cmd = buf(off, 2):uint() + off = off + 2 + len = len - 2 + + local cmd_s = cmds[cmd] + if cmd_s == nil then cmd_s = string.format("Unknown command (0x%04x)", cmd) end + subtree:append_text(", " .. cmd_s) + + if cmd == CMD_REPLY_BROADCAST then + subtree:add_packet_field(f_deviceid_len, buf(off, 2), ENC_BIG_ENDIAN) + local deviceid_len = buf(off, 2):uint() + off = off + 2 + len = len - 2 + + subtree:add_packet_field(f_deviceid, buf(off, deviceid_len), ENC_BIG_ENDIAN) + off = off + deviceid_len + len = len - deviceid_len + + subtree:add_packet_field(f_mac_len, buf(off, 2), ENC_BIG_ENDIAN) + local mac_len = buf(off, 2):uint() + off = off + 2 + len = len - 2 + + subtree:add_packet_field(f_mac, buf(off, mac_len), ENC_BIG_ENDIAN) + off = off + mac_len + len = len - mac_len + + subtree:add_packet_field(f_firmwareversion_len, buf(off, 2), ENC_BIG_ENDIAN) + local firmwareversion_len = buf(off, 2):uint() + off = off + 2 + len = len - 2 + + subtree:add_packet_field(f_firmwareversion, buf(off, firmwareversion_len), ENC_BIG_ENDIAN) + off = off + firmwareversion_len + len = len - firmwareversion_len + + subtree:add_packet_field(f_productkey_len, buf(off, 2), ENC_BIG_ENDIAN) + local productkey_len = buf(off, 2):uint() + off = off + 2 + len = len - 2 + + subtree:add_packet_field(f_productkey, buf(off, productkey_len), ENC_BIG_ENDIAN) + local productkey = buf(off, productkey_len):string() + off = off + productkey_len + len = len - productkey_len + + -- store productkey for later use + productkeys_by_ip[tostring(pkt.src)] = productkey + + subtree:add_packet_field(f_mcuattributes, buf(off, 8), ENC_BIG_ENDIAN) + off = off + 8 + len = len - 8 + + local f_apiserver_len = buf(off):strsize() + subtree:add_packet_field(f_apiserver, buf(off), ENC_BIG_ENDIAN) + off = off + f_apiserver_len + len = len - f_apiserver_len + + local f_agentversion_len = buf(off):strsize() + subtree:add_packet_field(f_agentversion, buf(off), ENC_BIG_ENDIAN) + off = off + f_agentversion_len + len = len - f_agentversion_len + end + + if pkt.match_uint == 12414 and cmd == CMD_TRANSMIT_91 then + subtree:add_packet_field(f_mac_len, buf(off, 1), ENC_BIG_ENDIAN) + local mac_len = buf(off, 1):uint() + off = off + 1 + len = len - 1 + + subtree:add_packet_field(f_mac, buf(off, mac_len), ENC_BIG_ENDIAN) + off = off + mac_len + len = len - mac_len + end + + if cmd == CMD_CTL_93 or cmd == CMD_CTLACK_94 then + subtree:add_packet_field(f_sn, buf(off, 4), ENC_BIG_ENDIAN) + off = off + 4 + len = len - 4 + end + + if cmd == CMD_REPLY_BINDING or cmd == CMD_LOGIN then + subtree:add_packet_field(f_passcode_len, buf(off, 2), ENC_BIG_ENDIAN) + local passcode_len = buf(off, 2):uint() + off = off + 2 + len = len - 2 + + subtree:add_packet_field(f_passcode, buf(off, passcode_len), ENC_BIG_ENDIAN) + off = off + passcode_len + len = len - passcode_len + end + + if cmd == CMD_REPLY_LOGIN then + subtree:add_packet_field(f_login, buf(off, 1), ENC_BIG_ENDIAN) + local login = buf(off, 1):uint() + off = off + 1 + len = len - 1 + + local login_s = logins[login] + if login_s == nil then login_s = string.format("Unknown result (0x%02x)", login) end + subtree:append_text(", " .. login_s) + end + + subtree:set_len(off) + + if cmd == CMD_TRANSMIT or cmd == CMD_TRANSMIT_91 or cmd == CMD_CTL_93 or cmd == CMD_CTLACK_94 then + if buf:len() > off then + local addr + if cmd == CMD_TRANSMIT or cmd == CMD_CTL_93 then + addr = pkt.dst + else + addr = pkt.src + end + + local product_key = productkeys_by_ip[tostring(addr)]; + if product_key and d_table:get_dissector(product_key) then + local bytes = d_table:try(product_key, buf(off):tvb(), pkt, tree) + off = off + bytes + len = len - bytes + else + local subtree = tree:add(p_gizwits_unknown) + subtree:add(f_payload, buf(off, len)) + off = off + len + len = 0 + end + end + end + + if buf:len() > off then + tree:add(f_payload, buf(off, len)) + off = off + len + len = 0 + end + + if buf:len() > off then + -- fallback dissector that just shows the raw data. + data_dis:call(buf(off):tvb(), pkt, tree) + + --dissector(buf(off), pkt, tree) + end + +end + +function p_gizwits.dissector(buf, pkt, tree) + + if pkt.match_uint == 12414 or pkt.match_uint == 12416 then + -- This helps Wireshark keep the currently selected field when switching between tcp/udp and mqtt packets + tree:add(p_gizwits, "...") + end + + dissector(buf, pkt, tree) + +end + +local udp_encap_table = DissectorTable.get("udp.port") +local tcp_encap_table = DissectorTable.get("tcp.port") +--local mqtt_topic_table = Dissector.get("mqtt").topic") + +---@diagnostic disable-next-line: need-check-nil +udp_encap_table:add(12414, p_gizwits) +---@diagnostic disable-next-line: need-check-nil +tcp_encap_table:add(12416, p_gizwits) +--mqtt_topic_table:add("dev2app/", p_gizwits) diff --git a/dissectors/gizwits/gizwits_clearlight.lua b/dissectors/gizwits/gizwits_clearlight.lua new file mode 100644 index 0000000..e06c588 --- /dev/null +++ b/dissectors/gizwits/gizwits_clearlight.lua @@ -0,0 +1,792 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Apollon77/node-ph803w (wireshark/gizwits_clearlight.lua), +-- commit ddf25e3e9a6e174a3144570cef2cd97c0645ff46 du 21/04/2024. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- http://usapi.gizwits.com/app/datapoint?product_key=4bde5ccdff4a48c0840e055204a71e1f +-- http://mageddo.com/tools/json-to-lua-converter +local prefix = "gizwits.clearlight" +local dataPoint = { + name = "Clearlight", + packetVersion = "0x00000004", + protocolType = "standard", + product_key = "4bde5ccdff4a48c0840e055204a71e1f", + entities = { { + display_name = "Gizwits Development Kit", + attrs = { { + display_name = "Set extern_light", + name = "EXTERNAL_LIGHT", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 0 + }, + type = "status_writable", + id = 0, + desc = "" + }, { + display_name = "Set intern_light", + name = "INTERNAL_LIGHT", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 1 + }, + type = "status_writable", + id = 1, + desc = "" + }, { + display_name = "PRE_TIME_FLAG", + name = "PRE_TIME_FLAG", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 2 + }, + type = "status_writable", + id = 2, + desc = "" + }, { + display_name = "power_flag", + name = "power_flag", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 3 + }, + type = "status_writable", + id = 3, + desc = "" + }, { + display_name = "cf_flag", + name = "cf_flag", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 4 + }, + type = "status_writable", + id = 4, + desc = "" + }, { + display_name = "UVB_FLAG", + name = "UVB_FLAG", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 5 + }, + type = "status_writable", + id = 5, + desc = "" + }, { + display_name = "N_FLAG", + name = "N_FLAG", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 6 + }, + type = "status_writable", + id = 6, + desc = "" + }, { + display_name = "Set LED color", + name = "LED", + data_type = "uint8", + position = { + byte_offset = 1, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 7, + desc = "" + }, { + display_name = "Set RIGHT", + name = "RIGHT", + data_type = "uint8", + position = { + byte_offset = 2, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 8, + desc = "" + }, { + display_name = "Set LEFT", + name = "LEFT", + data_type = "uint8", + position = { + byte_offset = 3, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 9, + desc = "" + }, { + display_name = "Set temperature", + name = "SET_TEMP", + data_type = "uint8", + position = { + byte_offset = 4, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 10, + desc = "" + }, { + display_name = "Set working hours", + name = "SET_HOUR", + data_type = "uint8", + position = { + byte_offset = 5, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 11, + desc = "" + }, { + display_name = "SET_MINUTE", + name = "SET_MINUTE", + data_type = "uint8", + position = { + byte_offset = 6, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 12, + desc = "" + }, { + display_name = "PRE_TIME_HOUR", + name = "PRE_TIME_HOUR", + data_type = "uint8", + position = { + byte_offset = 7, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 13, + desc = "" + }, { + display_name = "PRE_TIME_MINUTE", + name = "PRE_TIME_MINUTE", + data_type = "uint8", + position = { + byte_offset = 8, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 14, + desc = "" + }, { + display_name = "SN", + name = "SN", + data_type = "uint8", + position = { + byte_offset = 9, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 15, + desc = "" + }, { + display_name = "Ambient Temperature", + name = "CURRENT_TEMP", + data_type = "uint8", + position = { + byte_offset = 10, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_readonly", + id = 16, + desc = "" + }, { + display_name = "heart_pulse", + name = "heart_pulse", + data_type = "uint8", + position = { + byte_offset = 11, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 255, + ratio = 1, + min = 0 + }, + type = "status_readonly", + id = 17, + desc = "" + } }, + name = "entity0", + id = 0 + } }, + ui = { + object = { + version = 4, + showEditButton = false + }, + sections = { { + elements = { { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.EXTERNAL_LIGHT" }, + perm = "W" + }, + type = "QBooleanElement", + key = "entity0.EXTERNAL_LIGHT", + title = "Set extern_light" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.INTERNAL_LIGHT" }, + perm = "W" + }, + type = "QBooleanElement", + key = "entity0.INTERNAL_LIGHT", + title = "Set intern_light" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.PRE_TIME_FLAG" }, + perm = "W" + }, + type = "QBooleanElement", + key = "entity0.PRE_TIME_FLAG", + title = "PRE_TIME_FLAG" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.power_flag" }, + perm = "W" + }, + type = "QBooleanElement", + key = "entity0.power_flag", + title = "power_flag" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.cf_flag" }, + perm = "W" + }, + type = "QBooleanElement", + key = "entity0.cf_flag", + title = "cf_flag" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.UVB_FLAG" }, + perm = "W" + }, + type = "QBooleanElement", + key = "entity0.UVB_FLAG", + title = "UVB_FLAG" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.N_FLAG" }, + perm = "W" + }, + type = "QBooleanElement", + key = "entity0.N_FLAG", + title = "N_FLAG" + }, { + title = "Set LED color", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.LED" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.LED", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "Set RIGHT", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.RIGHT" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.RIGHT", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "Set LEFT", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.LEFT" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.LEFT", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "Set temperature", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.SET_TEMP" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.SET_TEMP", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "Set working hours", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.SET_HOUR" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.SET_HOUR", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "SET_MINUTE", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.SET_MINUTE" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.SET_MINUTE", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "PRE_TIME_HOUR", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.PRE_TIME_HOUR" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.PRE_TIME_HOUR", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "PRE_TIME_MINUTE", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.PRE_TIME_MINUTE" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.PRE_TIME_MINUTE", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "SN", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.SN" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.SN", + maximumValue = 255, + minimumValue = 0, + type = "QFloatElement" + }, { + object = { + action = "entity0", + bind = { "entity0.CURRENT_TEMP" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "N" + }, + type = "QLabelElement", + key = "entity0.CURRENT_TEMP", + title = "Ambient temperature" + }, { + object = { + action = "entity0", + bind = { "entity0.heart_pulse" }, + uint_spec = { + max = 255, + step = 1, + min = 0 + }, + perm = "N" + }, + type = "QLabelElement", + key = "entity0.heart_pulse", + title = "heart_pulse" + } } + } } + } +} + +local ACTION_CONTROL_DEVICE = 0x01 -- Protocol 4.10 WiFi Module Control Device WiFi Module Send +local ACTION_READ_DEV_STATUS = 0x02 -- Protocol 4.8 WiFi Module Reads the current status of the device WiFi module sent +local ACTION_READ_DEV_STATUS_ACK = 0x03 -- Protocol 4.8 WiFi Module Read Device Current Status Device MCU Reply +local ACTION_REPORT_DEV_STATUS = 0x04 -- Protocol 4.9 device MCU to the WiFi module to actively report the current status of the device to send the MCU +local ACTION_W2D_TRANSPARENT_DATA = 0x05 -- WiFi to device MCU transparent +local ACTION_D2W_TRANSPARENT_DATA = 0x06 -- Device MCU to WiFi + +local actions = { + [ACTION_CONTROL_DEVICE ] = "Control Device", + [ACTION_READ_DEV_STATUS ] = "Read Device Status", + [ACTION_READ_DEV_STATUS_ACK ] = "Read Device Status Ack", + [ACTION_REPORT_DEV_STATUS ] = "Report Device Status", + [ACTION_W2D_TRANSPARENT_DATA] = "Private data: WiFi to device MCU", + [ACTION_D2W_TRANSPARENT_DATA] = "Private data: Device MCU to WiFi", +} + +local f_action = ProtoField.uint8(prefix .. ".action", "Action", base.HEX, actions) +local f_flags = ProtoField.uint16(prefix .. ".flags", "Flags", base.HEX) + +local fields = { + f_action, f_flags, +} + +local attrs_by_type = { + status_writable = {}, + status_readonly = {}, + alert = {}, + fault = {}, +} +local count_bits_by_type = { + status_writable = 0, + status_readonly = 0, + alert = 0, + fault = 0, +} +local attrs = dataPoint.entities[1].attrs +for _, attr in ipairs(attrs) do + local list = attrs_by_type[attr.type] + list[#list + 1] = attr + if attr.data_type == "bool" then + count_bits_by_type[attr.type] = count_bits_by_type[attr.type] + 1 + end +end + +local add_packet_field_for_flag = {} +local count_flag_bits = math.ceil(#attrs_by_type.status_writable / 8) + +do + local mask = 1; + for i, attr in ipairs(attrs_by_type.status_writable) do + local field = ProtoField.bool(prefix .. ".flags." .. attr.name, attr.display_name, count_flag_bits * 8, {'Set', 'Not set'}, mask) + add_packet_field_for_flag[#add_packet_field_for_flag + 1] = function (subtree, r_values) + local f = subtree:add_packet_field(field, r_values, ENC_BIG_ENDIAN) + return attr, f, r_values:bitfield(count_flag_bits * 8 - i) + end + fields[#fields + 1] = field + mask = mask * 2; + end +end + +local make_protofield_by_data_type = { + uint8 = function(attr) + return ProtoField.uint8(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint16 = function(attr) + return ProtoField.uint16(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint24 = function(attr) + return ProtoField.uint24(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint32 = function(attr) + return ProtoField.uint32(prefix .. ".value." .. attr.name, attr.display_name) + end, + int8 = function(attr) + return ProtoField.int8(prefix .. ".value." .. attr.name, attr.display_name) + end, + int16 = function(attr) + return ProtoField.int16(prefix .. ".value." .. attr.name, attr.display_name) + end, + int24 = function(attr) + return ProtoField.int24(prefix .. ".value." .. attr.name, attr.display_name) + end, + int32 = function(attr) + return ProtoField.int32(prefix .. ".value." .. attr.name, attr.display_name) + end, + enum = function(attr) + local table = {} + for k, v in ipairs(attr.enum) do + table[k - 1] = v + end + return ProtoField.uint8(prefix .. ".value." .. attr.name, attr.display_name, base.UNIT_DEC, table) + end, + bool = function(attr) + local display = count_bits_by_type[attr.type] * 8 + local mask = bit32.lshift(1, attr.position.bit_offset) + return ProtoField.bool(prefix .. ".value." .. attr.name, attr.display_name, display, nil, mask) + end, + fallback = function(attr) + return ProtoField.none(prefix .. ".value." .. attr.name, attr.display_name .. ', unknown data_type: ' .. attr.data_type) + end, +} + +local add_packet_field_by_type = { + status_writable = {}, + status_readonly = {}, + alert = {}, + fault = {}, +} +for type, attrs_for_type in pairs(attrs_by_type) do + count_bits_by_type[type] = math.ceil(count_bits_by_type[type] / 8) + + for i, attr in ipairs(attrs_for_type) do + local maker = make_protofield_by_data_type[attr.data_type] + if not maker then + maker = make_protofield_by_data_type.fallback + end + local field = maker(attr) + local list = add_packet_field_by_type[attr.type] + list[#list + 1] = function (subtree, r_values) + local len = attr.position.len + if attr.position.unit == 'bit' then + len = math.ceil(len / 8) + end + return attr, subtree:add_packet_field(field, r_values(attr.position.byte_offset, len), ENC_BIG_ENDIAN) + end + fields[#fields + 1] = field + end +end + +local proto = Proto(prefix, "Gizwits Data Point: " .. dataPoint.name); +proto.fields = fields + +local data_dis = Dissector.get("data") + +function proto.dissector(buf, pkt, tree) + + local subtree = tree:add(proto, buf()) + local off = 0 + local len = buf:len() + + subtree:add(f_action, buf(off, 1)) + local action = buf(off, 1):uint() + off = off + 1 + len = len - 1 + + if action == ACTION_CONTROL_DEVICE and count_flag_bits > 0 then + + local r_flags = buf(off, count_flag_bits) + off = off + count_flag_bits + len = len - count_flag_bits + + local t_flags = subtree:add_packet_field(f_flags, r_flags, ENC_BIG_ENDIAN) + local values = {} + + for i, add_packet_field in ipairs(add_packet_field_for_flag) do + local attr, _, value = add_packet_field(t_flags, r_flags) + if not (value == 0) then + values[#values+1] = attr.name + end + end + t_flags:append_text(" (" .. table.concat(values, ", ") .. ")") + + local r_values = buf(off, len) + off = off + len + len = 0 + + for i, add_packet_field in ipairs(add_packet_field_by_type.status_writable) do + local attr, treeitem = add_packet_field(subtree, r_values) + end + + elseif action == ACTION_REPORT_DEV_STATUS then + + local r_status = buf(off, len) + off = off + len + len = 0 + + for _, add_packet_field in ipairs(add_packet_field_by_type.status_writable) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.status_readonly) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.alert) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.fault) do + add_packet_field(subtree, r_status) + end + + end + + if buf:len() > off then + + data_dis:call(buf(off):tvb(), pkt, subtree) + + end + +end + +DissectorTable.get("gizwits"):add(dataPoint.product_key, proto) diff --git a/dissectors/gizwits/gizwits_gizkit_soc_pet.lua b/dissectors/gizwits/gizwits_gizkit_soc_pet.lua new file mode 100644 index 0000000..b81f802 --- /dev/null +++ b/dissectors/gizwits/gizwits_gizkit_soc_pet.lua @@ -0,0 +1,594 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Apollon77/node-ph803w (wireshark/gizwits_gizkit_soc_pet.lua), +-- commit ddf25e3e9a6e174a3144570cef2cd97c0645ff46 du 21/04/2024. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- http://api.gizwits.com/app/datapoint?product_key=de9e8d18d9394cce9081b25a531e552b +-- http://mageddo.com/tools/json-to-lua-converter +local prefix = "gizwits.gizkit_soc_pet" +local dataPoint = { + name = "My WeChat Pet House SOC", + packetVersion = "0x00000004", + protocolType = "standard", + product_key = "de9e8d18d9394cce9081b25a531e552b", + entities = { { + display_name = "Gizwits Development Kit", + attrs = { { + display_name = "Turn on/off the red light", + name = "LED_OnOff", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 0 + }, + type = "status_writable", + id = 0, + desc = "" + }, { + display_name = "Set LED combination color", + name = "LED_Color", + data_type = "enum", + enum = { "Customize", "Yellow", "Purple", "Pink" }, + position = { + byte_offset = 0, + unit = "bit", + len = 2, + bit_offset = 1 + }, + type = "status_writable", + id = 1, + desc = "" + }, { + display_name = "Set LED red value", + name = "LED_R", + data_type = "uint8", + position = { + byte_offset = 1, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 254, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 2, + desc = "" + }, { + display_name = "Set LED green value", + name = "LED_G", + data_type = "uint8", + position = { + byte_offset = 2, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 254, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 3, + desc = "" + }, { + display_name = "Set LED blue value", + name = "LED_B", + data_type = "uint8", + position = { + byte_offset = 3, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 254, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 4, + desc = "" + }, { + display_name = "Set motor speed", + name = "Motor_Speed", + data_type = "uint8", + position = { + byte_offset = 4, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = -5, + max = 10, + ratio = 1, + min = 0 + }, + type = "status_writable", + id = 5, + desc = "" + }, { + display_name = "Infrared detection", + name = "Infrared", + data_type = "bool", + position = { + byte_offset = 5, + unit = "bit", + len = 1, + bit_offset = 0 + }, + type = "status_readonly", + id = 6, + desc = "" + }, { + display_name = "Ambient temperature", + name = "Temperature", + data_type = "uint8", + position = { + byte_offset = 6, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = -13, + max = 200, + ratio = 1, + min = 0 + }, + type = "status_readonly", + id = 7, + desc = "" + }, { + display_name = "environment humidity", + name = "Humidity", + data_type = "uint8", + position = { + byte_offset = 7, + unit = "byte", + len = 1, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 100, + ratio = 1, + min = 0 + }, + type = "status_readonly", + id = 8, + desc = "" + }, { + display_name = "Alarm 1", + name = "Alert_1", + data_type = "bool", + position = { + byte_offset = 8, + unit = "bit", + len = 1, + bit_offset = 0 + }, + type = "alert", + id = 9, + desc = "" + }, { + display_name = "Alarm 2", + name = "Alert_2", + data_type = "bool", + position = { + byte_offset = 8, + unit = "bit", + len = 1, + bit_offset = 1 + }, + type = "alert", + id = 10, + desc = "" + }, { + display_name = "LED fault", + name = "Fault_LED", + data_type = "bool", + position = { + byte_offset = 9, + unit = "bit", + len = 1, + bit_offset = 0 + }, + type = "fault", + id = 11, + desc = "" + }, { + display_name = "motor failure", + name = "Fault_Motor", + data_type = "bool", + position = { + byte_offset = 9, + unit = "bit", + len = 1, + bit_offset = 1 + }, + type = "fault", + id = 12, + desc = "" + }, { + display_name = "Temperature and humidity sensor failure", + name = "Fault_TemHum", + data_type = "bool", + position = { + byte_offset = 9, + unit = "bit", + len = 1, + bit_offset = 2 + }, + type = "fault", + id = 13, + desc = "" + }, { + display_name = "Infrared sensor failure", + name = "Fault_IR", + data_type = "bool", + position = { + byte_offset = 9, + unit = "bit", + len = 1, + bit_offset = 3 + }, + type = "fault", + id = 14, + desc = "" + } }, + name = "entity0", + id = 0 + } }, + ui = { + object = { + version = 4, + showEditButton = false + }, + sections = { { + elements = { { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.LED_OnOff" }, + perm = "W" + }, + type = "QBooleanElement", + key = "entity0.LED_OnOff", + title = "Turn on/off the red light" + }, { + items = { "Customize", "Yellow", "Purple", "Pink" }, + object = { + action = "entity0", + bind = { "entity0.LED_Color" }, + perm = "W" + }, + type = "QRadioElement", + key = "entity0.LED_Color", + title = "Set LED combination color" + }, { + title = "Set LED red value", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.LED_R" }, + uint_spec = { + max = 254, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.LED_R", + maximumValue = 254, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "Set LED green value", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.LED_G" }, + uint_spec = { + max = 254, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.LED_G", + maximumValue = 254, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "Set LED blue value", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.LED_B" }, + uint_spec = { + max = 254, + step = 1, + min = 0 + }, + perm = "W" + }, + value = 0, + key = "entity0.LED_B", + maximumValue = 254, + minimumValue = 0, + type = "QFloatElement" + }, { + title = "Set the motor speed", + bind = "floatValue:float", + object = { + action = "entity0", + bind = { "entity0.Motor_Speed" }, + uint_spec = { + max = 5, + step = 1, + min = -5 + }, + perm = "W" + }, + value = 0, + key = "entity0.Motor_Speed", + maximumValue = 5, + minimumValue = -5, + type = "QFloatElement" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.Infrared" }, + perm = "N" + }, + type = "QBooleanElement", + key = "entity0.Infrared", + title = "Infrared Detection" + }, { + object = { + action = "entity0", + bind = { "entity0.Temperature" }, + uint_spec = { + max = 187, + step = 1, + min = -13 + }, + perm = "N" + }, + type = "QLabelElement", + key = "entity0.Temperature", + title = "Ambient Temperature" + }, { + object = { + action = "entity0", + bind = { "entity0.Humidity" }, + uint_spec = { + max = 100, + step = 1, + min = 0 + }, + perm = "N" + }, + type = "QLabelElement", + key = "entity0.Humidity", + title = "Ambient Humidity" + } } + } } + } +} + +local ACTION_CONTROL_DEVICE = 0x01 -- Protocol 4.10 WiFi Module Control Device WiFi Module Send +local ACTION_READ_DEV_STATUS = 0x02 -- Protocol 4.8 WiFi Module Reads the current status of the device WiFi module sent +local ACTION_READ_DEV_STATUS_ACK = 0x03 -- Protocol 4.8 WiFi Module Read Device Current Status Device MCU Reply +local ACTION_REPORT_DEV_STATUS = 0x04 -- Protocol 4.9 device MCU to the WiFi module to actively report the current status of the device to send the MCU +local ACTION_W2D_TRANSPARENT_DATA = 0x05 -- WiFi to device MCU transparent +local ACTION_D2W_TRANSPARENT_DATA = 0x06 -- Device MCU to WiFi + +local actions = { + [ACTION_CONTROL_DEVICE ] = "Control Device", + [ACTION_READ_DEV_STATUS ] = "Read Device Status", + [ACTION_READ_DEV_STATUS_ACK ] = "Read Device Status Ack", + [ACTION_REPORT_DEV_STATUS ] = "Report Device Status", + [ACTION_W2D_TRANSPARENT_DATA] = "Private data: WiFi to device MCU", + [ACTION_D2W_TRANSPARENT_DATA] = "Private data: Device MCU to WiFi", +} + +local f_action = ProtoField.uint8(prefix .. ".action", "Action", base.HEX, actions) +local f_flags = ProtoField.uint16(prefix .. ".flags", "Flags", base.HEX) + +local fields = { + f_action, f_flags, +} + +local attrs_by_type = { + status_writable = {}, + status_readonly = {}, + alert = {}, + fault = {}, +} +local count_bits_by_type = { + status_writable = 0, + status_readonly = 0, + alert = 0, + fault = 0, +} +local attrs = dataPoint.entities[1].attrs +for _, attr in ipairs(attrs) do + local list = attrs_by_type[attr.type] + list[#list + 1] = attr + if attr.data_type == "bool" then + count_bits_by_type[attr.type] = count_bits_by_type[attr.type] + 1 + end +end + +local add_packet_field_for_flag = {} +local count_flag_bits = math.ceil(#attrs_by_type.status_writable / 8) + +do + local mask = 1; + for i, attr in ipairs(attrs_by_type.status_writable) do + local field = ProtoField.bool(prefix .. ".flags." .. attr.name, attr.display_name, count_flag_bits * 8, {'Set', 'Not set'}, mask) + add_packet_field_for_flag[#add_packet_field_for_flag + 1] = function (subtree, r_values) + local f = subtree:add_packet_field(field, r_values, ENC_BIG_ENDIAN) + return attr, f, r_values:bitfield(count_flag_bits * 8 - i) + end + fields[#fields + 1] = field + mask = mask * 2; + end +end + +local make_protofield_by_data_type = { + uint8 = function(attr) + return ProtoField.uint8(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint16 = function(attr) + return ProtoField.uint16(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint24 = function(attr) + return ProtoField.uint24(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint32 = function(attr) + return ProtoField.uint32(prefix .. ".value." .. attr.name, attr.display_name) + end, + int8 = function(attr) + return ProtoField.int8(prefix .. ".value." .. attr.name, attr.display_name) + end, + int16 = function(attr) + return ProtoField.int16(prefix .. ".value." .. attr.name, attr.display_name) + end, + int24 = function(attr) + return ProtoField.int24(prefix .. ".value." .. attr.name, attr.display_name) + end, + int32 = function(attr) + return ProtoField.int32(prefix .. ".value." .. attr.name, attr.display_name) + end, + enum = function(attr) + local table = {} + for k, v in ipairs(attr.enum) do + table[k - 1] = v + end + return ProtoField.uint8(prefix .. ".value." .. attr.name, attr.display_name, base.UNIT_DEC, table) + end, + bool = function(attr) + local display = count_bits_by_type[attr.type] * 8 + local mask = bit32.lshift(1, attr.position.bit_offset) + return ProtoField.bool(prefix .. ".value." .. attr.name, attr.display_name, display, nil, mask) + end, + fallback = function(attr) + return ProtoField.none(prefix .. ".value." .. attr.name, attr.display_name .. ', unknown data_type: ' .. attr.data_type) + end, +} + +local add_packet_field_by_type = { + status_writable = {}, + status_readonly = {}, + alert = {}, + fault = {}, +} +for type, attrs_for_type in pairs(attrs_by_type) do + count_bits_by_type[type] = math.ceil(count_bits_by_type[type] / 8) + + for i, attr in ipairs(attrs_for_type) do + local maker = make_protofield_by_data_type[attr.data_type] + if not maker then + maker = make_protofield_by_data_type.fallback + end + local field = maker(attr) + local list = add_packet_field_by_type[attr.type] + list[#list + 1] = function (subtree, r_values) + local len = attr.position.len + if attr.position.unit == 'bit' then + len = math.ceil(len / 8) + end + return attr, subtree:add_packet_field(field, r_values(attr.position.byte_offset, len), ENC_BIG_ENDIAN) + end + fields[#fields + 1] = field + end +end + +local proto = Proto(prefix, "Gizwits Data Point: " .. dataPoint.name); +proto.fields = fields + +local data_dis = Dissector.get("data") + +function proto.dissector(buf, pkt, tree) + + local subtree = tree:add(proto, buf()) + local off = 0 + local len = buf:len() + + subtree:add(f_action, buf(off, 1)) + local action = buf(off, 1):uint() + off = off + 1 + len = len - 1 + + if action == ACTION_CONTROL_DEVICE and count_flag_bits > 0 then + + local r_flags = buf(off, count_flag_bits) + off = off + count_flag_bits + len = len - count_flag_bits + + local t_flags = subtree:add_packet_field(f_flags, r_flags, ENC_BIG_ENDIAN) + local values = {} + + for i, add_packet_field in ipairs(add_packet_field_for_flag) do + local attr, _, value = add_packet_field(t_flags, r_flags) + if not (value == 0) then + values[#values+1] = attr.name + end + end + t_flags:append_text(" (" .. table.concat(values, ", ") .. ")") + + local r_values = buf(off, len) + off = off + len + len = 0 + + for i, add_packet_field in ipairs(add_packet_field_by_type.status_writable) do + local attr, treeitem = add_packet_field(subtree, r_values) + end + + elseif action == ACTION_REPORT_DEV_STATUS then + + local r_status = buf(off, len) + off = off + len + len = 0 + + for _, add_packet_field in ipairs(add_packet_field_by_type.status_writable) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.status_readonly) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.alert) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.fault) do + add_packet_field(subtree, r_status) + end + + end + + if buf:len() > off then + + data_dis:call(buf(off):tvb(), pkt, subtree) + + end + +end + +DissectorTable.get("gizwits"):add(dataPoint.product_key, proto) diff --git a/dissectors/gizwits/gizwits_ph803w.lua b/dissectors/gizwits/gizwits_ph803w.lua new file mode 100644 index 0000000..55c207a --- /dev/null +++ b/dissectors/gizwits/gizwits_ph803w.lua @@ -0,0 +1,456 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Apollon77/node-ph803w (wireshark/gizwits_ph803w.lua), +-- commit ddf25e3e9a6e174a3144570cef2cd97c0645ff46 du 21/04/2024. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- http://api.gizwits.com/app/datapoint?product_key=2d3d954d9bb741b4a19ba1153104932b +-- http://mageddo.com/tools/json-to-lua-converter +local prefix = "gizwits.ph803w" +local dataPoint = { + name = "iMoniter", + packetVersion = "0x00000004", + protocolType = "standard", + product_key = "2d3d954d9bb741b4a19ba1153104932b", + entities = { { + display_name = "Gizwits Development Kit", + attrs = { { + display_name = "pH_OUT", + name = "pH_OUT", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 0 + }, + type = "status_readonly", + id = 0, + desc = "" + }, { + display_name = "mV_OUT", + name = "mV_OUT", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 1 + }, + type = "status_readonly", + id = 1, + desc = "" + }, { + display_name = "EC_OUT", + name = "EC_OUT", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 2 + }, + type = "status_readonly", + id = 2, + desc = "" + }, { + display_name = "TEMP_OUT", + name = "TEMP_OUT", + data_type = "bool", + position = { + byte_offset = 0, + unit = "bit", + len = 1, + bit_offset = 3 + }, + type = "status_readonly", + id = 3, + desc = "" + }, { + display_name = "pH", + name = "pH", + data_type = "uint16", + position = { + byte_offset = 1, + unit = "byte", + len = 2, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 1400, + ratio = 0.01, + min = 0 + }, + type = "status_readonly", + id = 4, + desc = "" + }, { + display_name = "mV", + name = "mV", + data_type = "uint16", + position = { + byte_offset = 3, + unit = "byte", + len = 2, + bit_offset = 0 + }, + uint_spec = { + addition = -2000, + max = 4000, + ratio = 1, + min = 0 + }, + type = "status_readonly", + id = 5, + desc = "mV value" + }, { + display_name = "EC", + name = "EC", + data_type = "uint16", + position = { + byte_offset = 5, + unit = "byte", + len = 2, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 2000, + ratio = 0.01, + min = 0 + }, + type = "status_readonly", + id = 6, + desc = "Conductance" + }, { + display_name = "TEMP", + name = "TEMP", + data_type = "uint16", + position = { + byte_offset = 7, + unit = "byte", + len = 2, + bit_offset = 0 + }, + uint_spec = { + addition = 0, + max = 1000, + ratio = 0.1, + min = 0 + }, + type = "status_readonly", + id = 7, + desc = "Temperature" + } }, + name = "entity0", + id = 0 + } }, + ui = { + object = { + version = 4, + showEditButton = false + }, + sections = { { + elements = { { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.pH_OUT" }, + perm = "N" + }, + type = "QBooleanElement", + key = "entity0.pH_OUT", + title = "pH_OUT" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.mV_OUT" }, + perm = "N" + }, + type = "QBooleanElement", + key = "entity0.mV_OUT", + title = "mV_OUT" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.EC_OUT" }, + perm = "N" + }, + type = "QBooleanElement", + key = "entity0.EC_OUT", + title = "EC_OUT" + }, { + boolValue = false, + object = { + action = "entity0", + bind = { "entity0.TEMP_OUT" }, + perm = "N" + }, + type = "QBooleanElement", + key = "entity0.TEMP_OUT", + title = "TEMP_OUT" + }, { + object = { + action = "entity0", + bind = { "entity0.pH" }, + uint_spec = { + max = 14, + step = 0.01, + min = 0 + }, + perm = "N" + }, + type = "QLabelElement", + key = "entity0.pH", + title = "pH" + }, { + object = { + action = "entity0", + bind = { "entity0.mV" }, + uint_spec = { + max = 2000, + step = 1, + min = -2000 + }, + perm = "N" + }, + type = "QLabelElement", + key = "entity0.mV", + title = "mV" + }, { + object = { + action = "entity0", + bind = { "entity0.EC" }, + uint_spec = { + max = 20, + step = 0.01, + min = 0 + }, + perm = "N" + }, + type = "QLabelElement", + key = "entity0.EC", + title = "EC" + }, { + object = { + action = "entity0", + bind = { "entity0.TEMP" }, + uint_spec = { + max = 100, + step = 0.1, + min = 0 + }, + perm = "N" + }, + type = "QLabelElement", + key = "entity0.TEMP", + title = "TEMP" + } } + } } + } +} + +local ACTION_CONTROL_DEVICE = 0x01 -- Protocol 4.10 WiFi Module Control Device WiFi Module Send +local ACTION_READ_DEV_STATUS = 0x02 -- Protocol 4.8 WiFi Module Reads the current status of the device WiFi module sent +local ACTION_READ_DEV_STATUS_ACK = 0x03 -- Protocol 4.8 WiFi Module Read Device Current Status Device MCU Reply +local ACTION_REPORT_DEV_STATUS = 0x04 -- Protocol 4.9 device MCU to the WiFi module to actively report the current status of the device to send the MCU +local ACTION_W2D_TRANSPARENT_DATA = 0x05 -- WiFi to device MCU transparent +local ACTION_D2W_TRANSPARENT_DATA = 0x06 -- Device MCU to WiFi + +local actions = { + [ACTION_CONTROL_DEVICE ] = "Control Device", + [ACTION_READ_DEV_STATUS ] = "Read Device Status", + [ACTION_READ_DEV_STATUS_ACK ] = "Read Device Status Ack", + [ACTION_REPORT_DEV_STATUS ] = "Report Device Status", + [ACTION_W2D_TRANSPARENT_DATA] = "Private data: WiFi to device MCU", + [ACTION_D2W_TRANSPARENT_DATA] = "Private data: Device MCU to WiFi", +} + +local f_action = ProtoField.uint8(prefix .. ".action", "Action", base.HEX, actions) +local f_flags = ProtoField.uint16(prefix .. ".flags", "Flags", base.HEX) + +local fields = { + f_action, f_flags, +} + +local attrs_by_type = { + status_writable = {}, + status_readonly = {}, + alert = {}, + fault = {}, +} +local count_bits_by_type = { + status_writable = 0, + status_readonly = 0, + alert = 0, + fault = 0, +} +local attrs = dataPoint.entities[1].attrs +for _, attr in ipairs(attrs) do + local list = attrs_by_type[attr.type] + list[#list + 1] = attr + if attr.data_type == "bool" then + count_bits_by_type[attr.type] = count_bits_by_type[attr.type] + 1 + end +end + +local add_packet_field_for_flag = {} +local count_flag_bits = math.ceil(#attrs_by_type.status_writable / 8) + +do + local mask = 1; + for i, attr in ipairs(attrs_by_type.status_writable) do + local field = ProtoField.bool(prefix .. ".flags." .. attr.name, attr.display_name, count_flag_bits * 8, {'Set', 'Not set'}, mask) + add_packet_field_for_flag[#add_packet_field_for_flag + 1] = function (subtree, r_values) + local f = subtree:add_packet_field(field, r_values, ENC_BIG_ENDIAN) + return attr, f, r_values:bitfield(count_flag_bits * 8 - i) + end + fields[#fields + 1] = field + mask = mask * 2; + end +end + +local make_protofield_by_data_type = { + uint8 = function(attr) + return ProtoField.uint8(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint16 = function(attr) + return ProtoField.uint16(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint24 = function(attr) + return ProtoField.uint24(prefix .. ".value." .. attr.name, attr.display_name) + end, + uint32 = function(attr) + return ProtoField.uint32(prefix .. ".value." .. attr.name, attr.display_name) + end, + int8 = function(attr) + return ProtoField.int8(prefix .. ".value." .. attr.name, attr.display_name) + end, + int16 = function(attr) + return ProtoField.int16(prefix .. ".value." .. attr.name, attr.display_name) + end, + int24 = function(attr) + return ProtoField.int24(prefix .. ".value." .. attr.name, attr.display_name) + end, + int32 = function(attr) + return ProtoField.int32(prefix .. ".value." .. attr.name, attr.display_name) + end, + enum = function(attr) + local table = {} + for k, v in ipairs(attr.enum) do + table[k - 1] = v + end + return ProtoField.uint8(prefix .. ".value." .. attr.name, attr.display_name, base.UNIT_DEC, table) + end, + bool = function(attr) + local display = count_bits_by_type[attr.type] * 8 + local mask = bit32.lshift(1, attr.position.bit_offset) + return ProtoField.bool(prefix .. ".value." .. attr.name, attr.display_name, display, nil, mask) + end, + fallback = function(attr) + return ProtoField.none(prefix .. ".value." .. attr.name, attr.display_name .. ', unknown data_type: ' .. attr.data_type) + end, +} + +local add_packet_field_by_type = { + status_writable = {}, + status_readonly = {}, + alert = {}, + fault = {}, +} +for type, attrs_for_type in pairs(attrs_by_type) do + count_bits_by_type[type] = math.ceil(count_bits_by_type[type] / 8) + + for i, attr in ipairs(attrs_for_type) do + local maker = make_protofield_by_data_type[attr.data_type] + if not maker then + maker = make_protofield_by_data_type.fallback + end + local field = maker(attr) + local list = add_packet_field_by_type[attr.type] + list[#list + 1] = function (subtree, r_values) + local len = attr.position.len + if attr.position.unit == 'bit' then + len = math.ceil(len / 8) + end + return attr, subtree:add_packet_field(field, r_values(attr.position.byte_offset, len), ENC_BIG_ENDIAN) + end + fields[#fields + 1] = field + end +end + +local proto = Proto(prefix, "Gizwits Data Point: " .. dataPoint.name); +proto.fields = fields + +local data_dis = Dissector.get("data") + +function proto.dissector(buf, pkt, tree) + + local subtree = tree:add(proto, buf()) + local off = 0 + local len = buf:len() + + subtree:add(f_action, buf(off, 1)) + local action = buf(off, 1):uint() + off = off + 1 + len = len - 1 + + if action == ACTION_CONTROL_DEVICE and count_flag_bits > 0 then + + local r_flags = buf(off, count_flag_bits) + off = off + count_flag_bits + len = len - count_flag_bits + + local t_flags = subtree:add_packet_field(f_flags, r_flags, ENC_BIG_ENDIAN) + local values = {} + + for i, add_packet_field in ipairs(add_packet_field_for_flag) do + local attr, _, value = add_packet_field(t_flags, r_flags) + if not (value == 0) then + values[#values+1] = attr.name + end + end + t_flags:append_text(" (" .. table.concat(values, ", ") .. ")") + + local r_values = buf(off, len) + off = off + len + len = 0 + + for i, add_packet_field in ipairs(add_packet_field_by_type.status_writable) do + local attr, treeitem = add_packet_field(subtree, r_values) + end + + elseif action == ACTION_REPORT_DEV_STATUS then + + local r_status = buf(off, len) + off = off + len + len = 0 + + for _, add_packet_field in ipairs(add_packet_field_by_type.status_writable) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.status_readonly) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.alert) do + add_packet_field(subtree, r_status) + end + + for _, add_packet_field in ipairs(add_packet_field_by_type.fault) do + add_packet_field(subtree, r_status) + end + + end + + if buf:len() > off then + + data_dis:call(buf(off):tvb(), pkt, subtree) + + end + +end + +DissectorTable.get("gizwits"):add(dataPoint.product_key, proto) diff --git a/dissectors/hdds-rtps/LICENSE-APACHE b/dissectors/hdds-rtps/LICENSE-APACHE new file mode 100644 index 0000000..3674a0e --- /dev/null +++ b/dissectors/hdds-rtps/LICENSE-APACHE @@ -0,0 +1,190 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to the Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +Copyright 2025-2026 naskel.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dissectors/hdds-rtps/LICENSE-MIT b/dissectors/hdds-rtps/LICENSE-MIT new file mode 100644 index 0000000..1c574a2 --- /dev/null +++ b/dissectors/hdds-rtps/LICENSE-MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-2026 naskel.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/hdds-rtps/README.md b/dissectors/hdds-rtps/README.md new file mode 100644 index 0000000..b09ab1d --- /dev/null +++ b/dissectors/hdds-rtps/README.md @@ -0,0 +1,52 @@ +# HDDS RTPS — post-dissecteur RTPS / DDS + +Post-dissecteur Wireshark Lua de **HDDS** (implémentation DDS en Rust de +naskel.com) qui ajoute un arbre « HDDS RTPS Extensions » aux paquets +**RTPS** (protocole filaire de DDS) : en-tête (version, fournisseur avec +détection des paquets HDDS, préfixe GUID), sous-messages (DATA, HEARTBEAT, +ACKNACK, GAP, INFO_TS…), numéros de séquence, QoS en ligne (noms de topic +et de type), et décodage optionnel des charges utiles CDR2 à partir d'un +fichier de types JSON. Limité aux ports UDP 7400 à 7500. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/hdds-team/hdds (dossier `tools/wireshark/`) | +| Commit importé | `8701c0b6ad8c44b6b9328dee6ff7b8ac0d4c20d1` du 15/05/2026 (branche `master`, dernier commit ; dernière modification de `hdds_rtps.lua` : `0edc0e2` du 27/02/2026) | +| Licence amont | Apache-2.0 OR MIT (en-tête SPDX du fichier ; `LICENSE` amont : « licensed under either of » Apache 2.0 ou MIT ; `LICENSE-APACHE` et `LICENSE-MIT` copiés ici, © 2025-2026 naskel.com) | +| Natif Wireshark 4.6.4 | Oui pour RTPS — dissecteur natif `rtps`, très complet ; ce script n'apporte que des vues complémentaires propres à HDDS | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `hdds_rtps.lua` | Post-dissecteur `hdds` (« HDDS RTPS Extensions ») | +| `install.sh` | Script amont d'installation dans le dossier `plugins` (Linux, macOS, MSYS) | +| `LICENSE-APACHE`, `LICENSE-MIT` | Textes des deux licences au choix | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête du `.lua`. `install.sh` est copié sans +modification. + +## Utilisation + +Copier `hdds_rtps.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer `./install.sh`, puis +filtrer avec `hdds` (ex. `hdds.submsg.kind == "DATA"`). Préférences dans +Protocoles → HDDS (fichier de types, décodage CDR, hexadécimal brut, +mode verbeux). + +## Remarques + +- **Probablement inopérant tel quel** (lecture du code, non vérifié dans + Wireshark) : un post-dissecteur reçoit le tampon de la trame entière + (en-têtes Ethernet / IP / UDP compris), mais le script cherche le + magique `RTPS` à l'octet 0 de ce tampon ; sur une capture Ethernet, + ce test échoue et rien n'est ajouté. Par ailleurs `format_guid` et + `format_seq_range` sont déclarées `local` après leur utilisation. +- Le fichier de types est « analysé » en l'exécutant comme du code Lua + (`load("return " .. contenu)`) : n'utiliser que des fichiers de + confiance. +- Utilise `bit.band` (bibliothèque `bit` fournie par Wireshark 4.4 et + plus). Pas de capture d'exemple amont. diff --git a/dissectors/hdds-rtps/hdds_rtps.lua b/dissectors/hdds-rtps/hdds_rtps.lua new file mode 100644 index 0000000..8fb12d9 --- /dev/null +++ b/dissectors/hdds-rtps/hdds_rtps.lua @@ -0,0 +1,605 @@ +-- SPDX-License-Identifier: Apache-2.0 OR MIT +-- Importé de https://github.com/hdds-team/hdds (tools/wireshark/hdds_rtps.lua), +-- commit 8701c0b6ad8c44b6b9328dee6ff7b8ac0d4c20d1 du 15/05/2026. +-- Licence amont : Apache-2.0 OR MIT (en-tête du fichier, LICENSE-APACHE et LICENSE-MIT amont) — voir README.md. +-- SPDX-License-Identifier: Apache-2.0 OR MIT +-- Copyright (c) 2025-2026 naskel.com + +-- ============================================================================= +-- HDDS RTPS Wireshark Dissector +-- ============================================================================= +-- A Lua post-dissector for enhanced RTPS/DDS packet analysis. +-- +-- Features: +-- - Enhanced RTPS submessage decoding +-- - HDDS vendor-specific extensions +-- - CDR2 payload decoding with type registry +-- - Discovery protocol analysis +-- +-- Installation: +-- Linux: cp hdds_rtps.lua ~/.local/lib/wireshark/plugins/ +-- macOS: cp hdds_rtps.lua ~/Library/Application\ Support/Wireshark/plugins/ +-- Windows: copy hdds_rtps.lua %APPDATA%\Wireshark\plugins\ +-- +-- SPDX-License-Identifier: Apache-2.0 OR MIT +-- Copyright (c) 2025-2026 naskel.com +-- ============================================================================= + +local hdds = Proto("hdds", "HDDS RTPS Extensions") + +-- ============================================================================= +-- PREFERENCES +-- ============================================================================= + +hdds.prefs.types_file = Pref.string("Types JSON", "", "Path to types JSON file") +hdds.prefs.decode_cdr = Pref.bool("Decode CDR", true, "Decode CDR2 payloads") +hdds.prefs.show_raw = Pref.bool("Show Raw Hex", false, "Show raw hex for payloads") +hdds.prefs.verbose = Pref.bool("Verbose", false, "Show additional debug info") + +-- ============================================================================= +-- PROTOCOL FIELDS +-- ============================================================================= + +-- RTPS Header fields +local f_magic = ProtoField.string("hdds.magic", "Magic") +local f_version = ProtoField.string("hdds.version", "Protocol Version") +local f_vendor = ProtoField.string("hdds.vendor", "Vendor ID") +local f_guid_prefix = ProtoField.bytes("hdds.guid_prefix", "GUID Prefix") + +-- Submessage fields +local f_submsg_kind = ProtoField.string("hdds.submsg.kind", "Submessage Kind") +local f_submsg_flags = ProtoField.uint8("hdds.submsg.flags", "Flags", base.HEX) +local f_submsg_len = ProtoField.uint16("hdds.submsg.length", "Length") + +-- Entity IDs +local f_reader_id = ProtoField.bytes("hdds.reader_id", "Reader Entity ID") +local f_writer_id = ProtoField.bytes("hdds.writer_id", "Writer Entity ID") + +-- Sequence numbers +local f_seq_num = ProtoField.uint64("hdds.seq_num", "Sequence Number") +local f_first_seq = ProtoField.uint64("hdds.first_seq", "First Sequence") +local f_last_seq = ProtoField.uint64("hdds.last_seq", "Last Sequence") + +-- DATA specifics +local f_topic_name = ProtoField.string("hdds.topic", "Topic Name") +local f_type_name = ProtoField.string("hdds.type_name", "Type Name") +local f_payload_len = ProtoField.uint32("hdds.payload_len", "Payload Length") + +-- CDR decoded fields +local f_cdr_field = ProtoField.string("hdds.cdr.field", "Field") +local f_cdr_value = ProtoField.string("hdds.cdr.value", "Value") + +hdds.fields = { + f_magic, f_version, f_vendor, f_guid_prefix, + f_submsg_kind, f_submsg_flags, f_submsg_len, + f_reader_id, f_writer_id, + f_seq_num, f_first_seq, f_last_seq, + f_topic_name, f_type_name, f_payload_len, + f_cdr_field, f_cdr_value +} + +-- ============================================================================= +-- CONSTANTS +-- ============================================================================= + +-- RTPS submessage kinds (RTPS v2.5 spec Table 8.13) +local SUBMSG_KINDS = { + [0x01] = "PAD", + [0x06] = "ACKNACK", + [0x07] = "HEARTBEAT", + [0x08] = "GAP", + [0x09] = "INFO_TS", + [0x0c] = "INFO_SRC", + [0x0d] = "INFO_REPLY_IP4", + [0x0e] = "INFO_DST", + [0x0f] = "INFO_REPLY", + [0x12] = "NACK_FRAG", + [0x13] = "HEARTBEAT_FRAG", + [0x15] = "DATA", + [0x16] = "DATA_FRAG", +} + +-- Vendor IDs (OMG DDS Interoperability Wire Protocol v2.5) +local VENDOR_IDS = { + [0x0000] = "UNKNOWN", + [0x0101] = "RTI Connext", + [0x0102] = "OpenSplice (ADLink)", + [0x0103] = "OpenDDS (OCI)", + [0x010F] = "FastDDS (eProsima)", + [0x0110] = "Cyclone DDS", + [0x0112] = "RustDDS", + [0x01AA] = "HDDS", +} + +-- Well-known entity IDs +local ENTITY_IDS = { + ["\x00\x00\x00\x00"] = "UNKNOWN", + ["\x00\x00\x01\xC1"] = "PARTICIPANT", + ["\x00\x01\x00\xC2"] = "SPDP_WRITER", + ["\x00\x01\x00\xC7"] = "SPDP_READER", + ["\x00\x00\x03\xC2"] = "SEDP_PUB_WRITER", + ["\x00\x00\x03\xC7"] = "SEDP_PUB_READER", + ["\x00\x00\x04\xC2"] = "SEDP_SUB_WRITER", + ["\x00\x00\x04\xC7"] = "SEDP_SUB_READER", + ["\x00\x03\x00\xC3"] = "TYPELOOKUP_REQ", + ["\x00\x03\x00\xC4"] = "TYPELOOKUP_REP", +} + +-- Parameter IDs for inline QoS / discovery data +local PARAMETER_IDS = { + [0x0000] = "PID_PAD", + [0x0001] = "PID_SENTINEL", + [0x0002] = "PID_TOPIC_NAME", + [0x0004] = "PID_TYPE_NAME", + [0x0005] = "PID_METATRAFFIC_MULTICAST_PORT", + [0x0006] = "PID_METATRAFFIC_UNICAST_LOCATOR", + [0x0007] = "PID_DEFAULT_UNICAST_LOCATOR", + [0x000F] = "PID_PROTOCOL_VERSION", + [0x0016] = "PID_VENDOR_ID", + [0x001A] = "PID_RELIABILITY", + [0x001D] = "PID_LIVELINESS", + [0x001E] = "PID_DURABILITY", + [0x002B] = "PID_OWNERSHIP", + [0x002C] = "PID_PRESENTATION", + [0x0050] = "PID_PARTICIPANT_GUID", + [0x005A] = "PID_ENDPOINT_GUID", + [0x0072] = "PID_TYPE_OBJECT", + [0x0073] = "PID_TYPE_OBJECT_V1", + [0x8000] = "PID_VENDOR_SPECIFIC_START", +} + +-- ============================================================================= +-- TYPE REGISTRY (for CDR decoding) +-- ============================================================================= + +local type_registry = {} + +-- Load types from JSON file +local function load_types_json(path) + if path == "" then return {} end + + local file = io.open(path, "r") + if not file then + print("[HDDS] Warning: Cannot open types file: " .. path) + return {} + end + + local content = file:read("*all") + file:close() + + -- Simple JSON parser for our format + -- (In production, use a proper JSON library) + local ok, types = pcall(function() + return load("return " .. content:gsub('":"', '='):gsub('","', ','):gsub('{', '{'):gsub('}', '}'))() + end) + + if ok then + print("[HDDS] Loaded " .. (types.types and #types.types or 0) .. " types from " .. path) + return types + else + print("[HDDS] Warning: Failed to parse types JSON") + return {} + end +end + +-- ============================================================================= +-- CDR2 DECODER +-- ============================================================================= + +-- Read uint8 from buffer +local function read_u8(buf, offset) + if offset >= buf:len() then return 0, offset end + return buf(offset, 1):uint(), offset + 1 +end + +-- Read uint16 LE from buffer +local function read_u16_le(buf, offset) + if offset + 2 > buf:len() then return 0, offset end + return buf(offset, 2):le_uint(), offset + 2 +end + +-- Read uint32 LE from buffer +local function read_u32_le(buf, offset) + if offset + 4 > buf:len() then return 0, offset end + return buf(offset, 4):le_uint(), offset + 4 +end + +-- Read uint64 LE from buffer +local function read_u64_le(buf, offset) + if offset + 8 > buf:len() then return 0, offset end + return buf(offset, 8):le_uint64(), offset + 8 +end + +-- Read int32 LE from buffer +local function read_i32_le(buf, offset) + if offset + 4 > buf:len() then return 0, offset end + return buf(offset, 4):le_int(), offset + 4 +end + +-- Read float32 LE from buffer +local function read_f32_le(buf, offset) + if offset + 4 > buf:len() then return 0, offset end + return buf(offset, 4):le_float(), offset + 4 +end + +-- Read float64 LE from buffer +local function read_f64_le(buf, offset) + if offset + 8 > buf:len() then return 0, offset end + return buf(offset, 8):le_float(), offset + 8 +end + +-- Read CDR string (4-byte length + chars + null + padding) +local function read_cdr_string(buf, offset) + local len, new_offset = read_u32_le(buf, offset) + if len == 0 or new_offset + len > buf:len() then + return "", new_offset + end + + local str = buf(new_offset, len - 1):string() -- -1 for null terminator + new_offset = new_offset + len + + -- Align to 4 bytes + local padding = (4 - (new_offset % 4)) % 4 + return str, new_offset + padding +end + +-- Read bytes with length prefix +local function read_cdr_bytes(buf, offset) + local len, new_offset = read_u32_le(buf, offset) + if len == 0 or new_offset + len > buf:len() then + return "", new_offset + end + + local bytes = buf(new_offset, len):bytes():tohex() + new_offset = new_offset + len + + -- Align to 4 bytes + local padding = (4 - (new_offset % 4)) % 4 + return bytes, new_offset + padding +end + +-- ============================================================================= +-- SUBMESSAGE PARSERS +-- ============================================================================= + +-- Parse DATA submessage +local function parse_data(buf, offset, tree, flags) + local subtree = tree:add(hdds, buf(offset), "DATA Submessage") + + local extra_flags, new_off = read_u16_le(buf, offset) + local octets_to_inline_qos + octets_to_inline_qos, new_off = read_u16_le(buf, new_off) + + -- Reader/Writer Entity IDs + local reader_id = buf(new_off, 4) + subtree:add(f_reader_id, reader_id) + local reader_name = ENTITY_IDS[reader_id:raw()] or string.format("0x%08X", reader_id:uint()) + subtree:append_text(" Reader=" .. reader_name) + new_off = new_off + 4 + + local writer_id = buf(new_off, 4) + subtree:add(f_writer_id, writer_id) + local writer_name = ENTITY_IDS[writer_id:raw()] or string.format("0x%08X", writer_id:uint()) + subtree:append_text(" Writer=" .. writer_name) + new_off = new_off + 4 + + -- Sequence number (64-bit, split as high/low) + local seq_low, seq_high + seq_high, new_off = read_u32_le(buf, new_off) + seq_low, new_off = read_u32_le(buf, new_off) + local seq_num = seq_high * 0x100000000 + seq_low + subtree:add(f_seq_num, seq_num) + subtree:append_text(" Seq=" .. seq_num) + + -- Inline QoS (if Q flag set) + local has_inline_qos = bit.band(flags, 0x02) ~= 0 + local has_data = bit.band(flags, 0x04) ~= 0 + local has_key = bit.band(flags, 0x08) ~= 0 + + local topic_name = nil + local type_name = nil + + if has_inline_qos then + local qos_tree = subtree:add(hdds, buf(new_off), "Inline QoS") + local qos_start = new_off + + -- Parse parameter list + while new_off < buf:len() - 4 do + local pid + pid, new_off = read_u16_le(buf, new_off) + local plen + plen, new_off = read_u16_le(buf, new_off) + + if pid == 0x0001 then -- SENTINEL + break + end + + local pname = PARAMETER_IDS[pid] or string.format("PID_0x%04X", pid) + + if pid == 0x0002 then -- TOPIC_NAME + topic_name, _ = read_cdr_string(buf, new_off) + qos_tree:add(f_topic_name, topic_name) + elseif pid == 0x0004 then -- TYPE_NAME + type_name, _ = read_cdr_string(buf, new_off) + qos_tree:add(f_type_name, type_name) + end + + new_off = new_off + plen + -- Align to 4 bytes + local padding = (4 - (new_off % 4)) % 4 + new_off = new_off + padding + end + + if topic_name then + subtree:append_text(" Topic=\"" .. topic_name .. "\"") + end + end + + -- Payload (if D flag set) + if has_data and new_off < buf:len() then + local payload_len = buf:len() - new_off + subtree:add(f_payload_len, payload_len) + + -- Try to decode CDR payload + if hdds.prefs.decode_cdr and payload_len > 4 then + local payload_tree = subtree:add(hdds, buf(new_off, payload_len), "CDR2 Payload") + + -- CDR encapsulation header (4 bytes) + local encap_kind = buf(new_off, 2):uint() + local encap_opts = buf(new_off + 2, 2):uint() + + local encap_name = "UNKNOWN" + if encap_kind == 0x0001 then encap_name = "CDR_BE" + elseif encap_kind == 0x0000 then encap_name = "CDR_LE" + elseif encap_kind == 0x0006 then encap_name = "CDR2_LE" + elseif encap_kind == 0x0007 then encap_name = "CDR2_BE" + elseif encap_kind == 0x0010 then encap_name = "PL_CDR2_LE" + end + + payload_tree:add(hdds, buf(new_off, 2), "Encapsulation: " .. encap_name) + + if hdds.prefs.show_raw then + payload_tree:add(hdds, buf(new_off + 4), "Raw: " .. buf(new_off + 4):bytes():tohex()) + end + end + end + + return new_off +end + +-- Parse HEARTBEAT submessage +local function parse_heartbeat(buf, offset, tree, flags) + local subtree = tree:add(hdds, buf(offset), "HEARTBEAT Submessage") + + local new_off = offset + + -- Reader/Writer Entity IDs + local reader_id = buf(new_off, 4) + subtree:add(f_reader_id, reader_id) + new_off = new_off + 4 + + local writer_id = buf(new_off, 4) + subtree:add(f_writer_id, writer_id) + new_off = new_off + 4 + + -- First available sequence number + local first_high, first_low + first_high, new_off = read_u32_le(buf, new_off) + first_low, new_off = read_u32_le(buf, new_off) + local first_seq = first_high * 0x100000000 + first_low + subtree:add(f_first_seq, first_seq) + + -- Last sequence number + local last_high, last_low + last_high, new_off = read_u32_le(buf, new_off) + last_low, new_off = read_u32_le(buf, new_off) + local last_seq = last_high * 0x100000000 + last_low + subtree:add(f_last_seq, last_seq) + + -- Count + local count + count, new_off = read_u32_le(buf, new_off) + + subtree:append_text(string.format(" Seq=[%d-%d] Count=%d", first_seq, last_seq, count)) + + return new_off +end + +-- Parse ACKNACK submessage +local function parse_acknack(buf, offset, tree, flags) + local subtree = tree:add(hdds, buf(offset), "ACKNACK Submessage") + + local new_off = offset + + -- Reader/Writer Entity IDs + local reader_id = buf(new_off, 4) + subtree:add(f_reader_id, reader_id) + new_off = new_off + 4 + + local writer_id = buf(new_off, 4) + subtree:add(f_writer_id, writer_id) + new_off = new_off + 4 + + -- Sequence number set base + local base_high, base_low + base_high, new_off = read_u32_le(buf, new_off) + base_low, new_off = read_u32_le(buf, new_off) + local base_seq = base_high * 0x100000000 + base_low + + -- Num bits + local num_bits + num_bits, new_off = read_u32_le(buf, new_off) + + subtree:append_text(string.format(" Base=%d NumBits=%d", base_seq, num_bits)) + + return new_off +end + +-- Parse GAP submessage +local function parse_gap(buf, offset, tree, flags) + local subtree = tree:add(hdds, buf(offset), "GAP Submessage") + + local new_off = offset + + -- Reader/Writer Entity IDs + new_off = new_off + 4 -- reader + new_off = new_off + 4 -- writer + + -- Gap start + local start_high, start_low + start_high, new_off = read_u32_le(buf, new_off) + start_low, new_off = read_u32_le(buf, new_off) + local gap_start = start_high * 0x100000000 + start_low + + subtree:append_text(string.format(" Start=%d", gap_start)) + + return new_off +end + +-- Parse INFO_TS submessage +local function parse_info_ts(buf, offset, tree, flags) + local subtree = tree:add(hdds, buf(offset), "INFO_TS Submessage") + + local has_timestamp = bit.band(flags, 0x02) == 0 -- T flag = 0 means timestamp present + + if has_timestamp and offset + 8 <= buf:len() then + local seconds = buf(offset, 4):le_uint() + local fraction = buf(offset + 4, 4):le_uint() + subtree:append_text(string.format(" Time=%d.%09d", seconds, fraction)) + end + + return offset + 8 +end + +-- ============================================================================= +-- MAIN DISSECTOR +-- ============================================================================= + +function hdds.init() + -- Load types from JSON file on startup + type_registry = load_types_json(hdds.prefs.types_file) +end + +function hdds.dissector(buffer, pinfo, tree) + -- Only process UDP packets on RTPS ports (7400-7500 range typically) + local port = pinfo.dst_port + if port < 7400 or port > 7500 then + -- Also check src port + port = pinfo.src_port + if port < 7400 or port > 7500 then + return + end + end + + -- Check minimum RTPS header size + if buffer:len() < 20 then + return + end + + -- Verify RTPS magic + local magic = buffer(0, 4):string() + if magic ~= "RTPS" then + return + end + + -- Create HDDS subtree + local hdds_tree = tree:add(hdds, buffer(), "HDDS RTPS Analysis") + + -- Parse header + hdds_tree:add(f_magic, buffer(0, 4)) + + local version_major = buffer(4, 1):uint() + local version_minor = buffer(5, 1):uint() + hdds_tree:add(f_version, string.format("%d.%d", version_major, version_minor)) + + local vendor_id = buffer(6, 2):uint() + local vendor_name = VENDOR_IDS[vendor_id] or string.format("0x%04X", vendor_id) + hdds_tree:add(f_vendor, vendor_name) + + -- Highlight HDDS packets + if vendor_id == 0x01AA then + pinfo.cols.info:prepend("[HDDS] ") + end + + hdds_tree:add(f_guid_prefix, buffer(8, 12)) + + -- Parse submessages + local offset = 20 + local submsg_count = 0 + + while offset < buffer:len() - 4 do + local submsg_kind = buffer(offset, 1):uint() + local submsg_flags = buffer(offset + 1, 1):uint() + local submsg_len = buffer(offset + 2, 2):le_uint() + + local kind_name = SUBMSG_KINDS[submsg_kind] or string.format("0x%02X", submsg_kind) + local submsg_tree = hdds_tree:add(hdds, buffer(offset, 4 + submsg_len), + string.format("Submessage #%d: %s", submsg_count + 1, kind_name)) + + submsg_tree:add(f_submsg_kind, kind_name) + submsg_tree:add(f_submsg_flags, submsg_flags) + submsg_tree:add(f_submsg_len, submsg_len) + + -- Parse specific submessage types + local payload_offset = offset + 4 + + if submsg_kind == 0x15 then -- DATA + parse_data(buffer, payload_offset, submsg_tree, submsg_flags) + elseif submsg_kind == 0x07 then -- HEARTBEAT + parse_heartbeat(buffer, payload_offset, submsg_tree, submsg_flags) + elseif submsg_kind == 0x06 then -- ACKNACK + parse_acknack(buffer, payload_offset, submsg_tree, submsg_flags) + elseif submsg_kind == 0x08 then -- GAP + parse_gap(buffer, payload_offset, submsg_tree, submsg_flags) + elseif submsg_kind == 0x09 then -- INFO_TS + parse_info_ts(buffer, payload_offset, submsg_tree, submsg_flags) + end + + offset = offset + 4 + submsg_len + submsg_count = submsg_count + 1 + + -- Safety limit + if submsg_count > 100 then + hdds_tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Too many submessages") + break + end + end + + hdds_tree:append_text(string.format(" (%d submessages)", submsg_count)) + + -- Update info column + if hdds.prefs.verbose then + pinfo.cols.info:append(string.format(" [%s %d msgs]", vendor_name, submsg_count)) + end +end + +-- Register as post-dissector +register_postdissector(hdds) + +-- ============================================================================= +-- UTILITY FUNCTIONS +-- ============================================================================= + +-- Format GUID for display +local function format_guid(prefix, entity_id) + local parts = {} + for i = 1, 12 do + table.insert(parts, string.format("%02x", prefix:byte(i))) + end + for i = 1, 4 do + table.insert(parts, string.format("%02x", entity_id:byte(i))) + end + return table.concat(parts, ":") +end + +-- Format sequence number range +local function format_seq_range(first, last) + if first == last then + return tostring(first) + else + return string.format("%d-%d", first, last) + end +end + +print("[HDDS] RTPS Dissector loaded - Version 1.0.0") +print("[HDDS] Set hdds.types_file preference to enable CDR type decoding") diff --git a/dissectors/hdds-rtps/install.sh b/dissectors/hdds-rtps/install.sh new file mode 100644 index 0000000..50cd91f --- /dev/null +++ b/dissectors/hdds-rtps/install.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# HDDS Wireshark Dissector Installer +# SPDX-License-Identifier: Apache-2.0 OR MIT +# Copyright (c) 2025-2026 naskel.com + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PLUGIN_FILE="$SCRIPT_DIR/hdds_rtps.lua" + +# Detect OS and set plugin directory +case "$(uname -s)" in + Linux*) + PLUGIN_DIR="$HOME/.local/lib/wireshark/plugins" + ;; + Darwin*) + PLUGIN_DIR="$HOME/Library/Application Support/Wireshark/plugins" + ;; + MINGW*|MSYS*|CYGWIN*) + PLUGIN_DIR="$APPDATA/Wireshark/plugins" + ;; + *) + echo "Unknown OS: $(uname -s)" + echo "Please copy hdds_rtps.lua manually to your Wireshark plugins directory" + exit 1 + ;; +esac + +echo "HDDS Wireshark Dissector Installer" +echo "===================================" +echo "" +echo "Plugin file: $PLUGIN_FILE" +echo "Target dir: $PLUGIN_DIR" +echo "" + +# Create directory if needed +if [ ! -d "$PLUGIN_DIR" ]; then + echo "Creating plugin directory..." + mkdir -p "$PLUGIN_DIR" +fi + +# Copy plugin +echo "Installing plugin..." +cp "$PLUGIN_FILE" "$PLUGIN_DIR/" + +echo "" +echo "Installation complete!" +echo "" +echo "Next steps:" +echo " 1. Restart Wireshark" +echo " 2. Go to Help -> About Wireshark -> Plugins" +echo " 3. Verify 'hdds' appears in the list" +echo "" +echo "To configure:" +echo " Edit -> Preferences -> Protocols -> HDDS" +echo "" diff --git a/dissectors/helianthus-ebus/LICENSE b/dissectors/helianthus-ebus/LICENSE new file mode 100644 index 0000000..9efa6fb --- /dev/null +++ b/dissectors/helianthus-ebus/LICENSE @@ -0,0 +1,338 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + + 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 Lesser 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) + + 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, see . + +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) year 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 + Moe Ghoul, 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 Lesser General +Public License instead of this License. diff --git a/dissectors/helianthus-ebus/README.md b/dissectors/helianthus-ebus/README.md new file mode 100644 index 0000000..70ba062 --- /dev/null +++ b/dissectors/helianthus-ebus/README.md @@ -0,0 +1,58 @@ +# Helianthus eBUS — bus de chauffage eBUS (Vaillant et autres) + +Dissecteur Wireshark Lua des flux **eBUS** (bus série des chaudières, +pompes à chaleur et régulateurs de chauffage — Vaillant, Wolf, Kromschröder…) +produits par l'outil de capture `helianthus-ebus-extcap` du projet +Helianthus : enregistrement « HLTH » (magie, version, type de flux, +drapeaux), événements ENS (envoi / réception d'octets), et trames eBUS +(QQ initiateur, ZZ destinataire, PB / SB = opcode, longueur, données, +CRC, ACK, réponse de l'esclave), avec catalogue de 46 opcodes eBUS +génériques et 11 opcodes Vaillant `0xB5xx`, et affichage brut pour les +opcodes inconnus. S'enregistre sur l'encapsulation `USER0` (type de lien +pcap 147). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Project-Helianthus/helianthus-ebus-wireshark | +| Commit importé | `c8d6ee8d94166e7682d94d730a19e558838db5e2` du 25/08/2026 (branche `main`, dernier commit ; dernière modification du script : `cea2e48` du 18/04/2026) | +| Licence amont | GPL-2.0-or-later (`LICENSE` GPL v2 ; en-tête `SPDX-License-Identifier: GPL-2.0-or-later` ; README : « Licensing follows the Wireshark lane: GPL-2.0-or-later ») | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur eBUS natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `helianthus-ebus.lua` | Protocole `helianthus_ebus` sur l'encapsulation `USER0` | +| `captures/hlth-ebus-edge-cases.pcap` | Capture de test synthétique amont : B524 maître-maître et maître-esclave avec réponse, diffusion FF06, QQ / ZZ invalides | +| `captures/hlth-ens-and-kind-edge-cases.pcap` | Capture de test synthétique amont : événements ENS, types d'enregistrement non pris en charge | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête du script (qui portait déjà sa propre +ligne SPDX, conservée). Non importés : scripts de test et de CI, +générateur Python des captures, documents internes (`AGENTS.md`, +`ARCHITECTURE.md`). + +## Utilisation + +Copier `helianthus-ebus.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +ouvrir par exemple `captures/hlth-ebus-edge-cases.pcap` et filtrer avec +`helianthus_ebus`. Champs filtrables : `helianthus_ebus.opcode`, +`helianthus_ebus.qq`, `helianthus_ebus.zz`… + +## Remarques + +- Prend **toute** l'encapsulation `USER0` (DLT 147) : d'autres captures + utilisant ce type de lien seront décodées comme eBUS tant que le script + est chargé. +- Compatible avec et sans `bit32` (détection au chargement, opérateurs + natifs de Lua 5.3+ sinon). +- Le README amont indique un dépôt « bootstrap » : intégration sur + captures réelles encore en attente ; seules les captures synthétiques + fournies servent de test. +- Non vérifié dans Wireshark. diff --git a/dissectors/helianthus-ebus/captures/hlth-ebus-edge-cases.pcap b/dissectors/helianthus-ebus/captures/hlth-ebus-edge-cases.pcap new file mode 100644 index 0000000..5b7eb75 Binary files /dev/null and b/dissectors/helianthus-ebus/captures/hlth-ebus-edge-cases.pcap differ diff --git a/dissectors/helianthus-ebus/captures/hlth-ens-and-kind-edge-cases.pcap b/dissectors/helianthus-ebus/captures/hlth-ens-and-kind-edge-cases.pcap new file mode 100644 index 0000000..205d7da Binary files /dev/null and b/dissectors/helianthus-ebus/captures/hlth-ens-and-kind-edge-cases.pcap differ diff --git a/dissectors/helianthus-ebus/helianthus-ebus.lua b/dissectors/helianthus-ebus/helianthus-ebus.lua new file mode 100644 index 0000000..23a25f7 --- /dev/null +++ b/dissectors/helianthus-ebus/helianthus-ebus.lua @@ -0,0 +1,498 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later +-- Importé de https://github.com/Project-Helianthus/helianthus-ebus-wireshark (dissectors/helianthus-ebus.lua), +-- commit c8d6ee8d94166e7682d94d730a19e558838db5e2 du 25/08/2026. +-- Licence amont : GPL-2.0-or-later (LICENSE amont) — voir README.md. +-- SPDX-License-Identifier: GPL-2.0-or-later + +local plugin = {} + +plugin.VERSION = "0.1.0" +plugin.LINKTYPE_USER0 = 147 +plugin.WTAP_ENCAP_USER0_FALLBACK = 45 +plugin.WTAP_ENCAP_USER0 = (type(wtap_encaps) == "table" and wtap_encaps.USER0) + or plugin.WTAP_ENCAP_USER0_FALLBACK +plugin.RECORD_VERSION = 1 +plugin.RECORD_KIND_ENS_EVENT = 1 +plugin.RECORD_KIND_EBUS_FRAME = 2 + +plugin.record_flags = { + has_source = 0x01, + request_like = 0x02, + sync_terminated = 0x04, +} + +-- Wireshark's embedded Lua is 5.2 (with bit32) on Ubuntu 24.04 wireshark-common +-- 4.2.x and 5.3+ (native bitwise operators, no bit32) on 4.4+. Resolve the +-- helpers at load time without parsing 5.3-only syntax so the dissector loads +-- on both interpreters. +local band, lshift, rshift +if bit32 ~= nil then + band = bit32.band + lshift = bit32.lshift + rshift = bit32.rshift +else + local native_ops, err = load( + "return function(a,b) return a & b end, " .. + "function(a,b) return a << b end, " .. + "function(a,b) return a >> b end" + ) + if native_ops == nil then + error("helianthus-ebus: no bit32 and native bitwise load failed: " .. tostring(err)) + end + band, lshift, rshift = native_ops() +end + +plugin.semantic_ebus_opcodes = { + [0x0304] = "eBUS semantic 0x0304", + [0x0305] = "eBUS semantic 0x0305", + [0x0306] = "eBUS semantic 0x0306", + [0x0307] = "eBUS semantic 0x0307", + [0x0308] = "eBUS semantic 0x0308", + [0x0310] = "eBUS semantic 0x0310", + [0x0500] = "eBUS semantic 0x0500", + [0x0501] = "eBUS semantic 0x0501", + [0x0502] = "eBUS semantic 0x0502", + [0x0503] = "eBUS semantic 0x0503", + [0x0504] = "eBUS semantic 0x0504", + [0x0506] = "eBUS semantic 0x0506", + [0x0507] = "eBUS semantic 0x0507", + [0x0508] = "eBUS semantic 0x0508", + [0x0509] = "eBUS semantic 0x0509", + [0x050A] = "eBUS semantic 0x050A", + [0x050B] = "eBUS semantic 0x050B", + [0x050C] = "eBUS semantic 0x050C", + [0x050D] = "eBUS semantic 0x050D", + [0x0700] = "eBUS semantic 0x0700", + [0x0701] = "eBUS semantic 0x0701", + [0x0702] = "eBUS semantic 0x0702", + [0x0703] = "eBUS semantic 0x0703", + [0x0704] = "eBUS semantic 0x0704", + [0x07FE] = "eBUS semantic 0x07FE", + [0x07FF] = "eBUS semantic 0x07FF", + [0x0800] = "eBUS semantic 0x0800", + [0x0801] = "eBUS semantic 0x0801", + [0x0802] = "eBUS semantic 0x0802", + [0x0803] = "eBUS semantic 0x0803", + [0x0804] = "eBUS semantic 0x0804", + [0x0900] = "eBUS semantic 0x0900", + [0x0901] = "eBUS semantic 0x0901", + [0x0902] = "eBUS semantic 0x0902", + [0x0903] = "eBUS semantic 0x0903", + [0x0F01] = "eBUS semantic 0x0F01", + [0x0F02] = "eBUS semantic 0x0F02", + [0x0F03] = "eBUS semantic 0x0F03", + [0xFE01] = "eBUS semantic 0xFE01", + [0xFF00] = "eBUS semantic 0xFF00", + [0xFF01] = "eBUS semantic 0xFF01", + [0xFF02] = "eBUS semantic 0xFF02", + [0xFF03] = "eBUS semantic 0xFF03", + [0xFF04] = "eBUS semantic 0xFF04", + [0xFF05] = "eBUS semantic 0xFF05", + [0xFF06] = "eBUS semantic 0xFF06", +} + +-- Labels mirror helianthus-docs-ebus/protocols/vaillant/ebus-vaillant.md; +-- any addition here must update scripts/check_opcode_catalog.lua. +plugin.semantic_vaillant_opcodes = { + [0xB503] = "Vaillant B503", + [0xB504] = "Vaillant B504", + [0xB505] = "Vaillant B505", + [0xB506] = "Vaillant B506", + [0xB509] = "Vaillant B509 boiler registers", + [0xB510] = "Vaillant B510", + [0xB511] = "Vaillant B511", + [0xB512] = "Vaillant B512", + [0xB513] = "Vaillant B513", + [0xB514] = "Vaillant B514", + [0xB515] = "Vaillant B515", + [0xB516] = "Vaillant B516 energy", + [0xB51A] = "Vaillant B51A", + [0xB521] = "Vaillant B521", + [0xB522] = "Vaillant B522", + [0xB523] = "Vaillant B523", + [0xB524] = "Vaillant B524 extended registers", + [0xB555] = "Vaillant B555 timer protocol", +} + +function plugin.lookup_label(opcode) + return plugin.semantic_vaillant_opcodes[opcode] + or plugin.semantic_ebus_opcodes[opcode] + or string.format("Raw opcode 0x%04X", opcode) +end + +function plugin.is_supported(opcode) + return plugin.semantic_vaillant_opcodes[opcode] ~= nil + or plugin.semantic_ebus_opcodes[opcode] ~= nil +end + +function plugin.command_name(command, request_like) + -- Coerce strictly: only boolean true flips ENS command 0x01 to "send"; + -- nil/false/0/"" all fall through to "received". This matches the + -- expected contract for the record_flags.request_like bit. + local is_request = request_like == true + if command == 0x01 then + if is_request then + return "send" + end + return "received" + end + local names = { + [0x00] = "resetted", + [0x02] = "started", + [0x03] = "info", + [0x0A] = "failed", + [0x0B] = "error_ebus", + [0x0C] = "error_host", + } + return names[command] or string.format("command_0x%02X", command) +end + +function plugin.stream_kind_name(kind) + if kind == plugin.RECORD_KIND_ENS_EVENT then + return "ens-event" + end + if kind == plugin.RECORD_KIND_EBUS_FRAME then + return "ebus-frame" + end + return string.format("unknown(%d)", kind) +end + +function plugin.family_guess(opcode) + if opcode >= 0xB500 and opcode <= 0xB5FF then + return "vaillant-b5xx" + end + -- PB=0xFF is the eBUS manufacturer-specific range per the protocol + -- specification; the full 0xFF00-0xFFFF window is classified here so + -- that future allocations beyond the 0xFF00-0xFF06 set documented in + -- helianthus-docs-ebus get the right family without revisiting this. + if opcode >= 0xFF00 and opcode <= 0xFFFF then + return "ebus-manufacturer" + end + if opcode == 0 then + return "unknown" + end + return "ebus-semantic" +end + +function plugin.transaction_type(qq, zz) + local function invalid_address(addr) + return addr == 0xA9 or addr == 0xAA + end + if invalid_address(qq) or invalid_address(zz) then + return "Invalid" + end + if zz == 0xFE then + return "Broadcast" + end + local function initiator_part(bits) + return bits == 0x0 or bits == 0x1 or bits == 0x3 or bits == 0x7 or bits == 0xF + end + if initiator_part(band(zz, 0x0F)) and initiator_part(band(rshift(zz, 4), 0x0F)) then + return "Primary-Primary" + end + return "Primary-Secondary" +end + +function plugin.parse_primary_secondary_segments(raw_tvb) + -- Shared between Primary-Secondary and Primary-Primary transactions; the + -- layout is identical up to the request ACK. Error messages therefore use + -- "primary transaction" to cover both cases. + local raw_length = raw_tvb:len() + if raw_length < 7 then + return nil, "primary transaction too short" + end + + local request_length = raw_tvb(4, 1):uint() + local request_crc_offset = 5 + request_length + local request_ack_offset = request_crc_offset + 1 + if request_ack_offset >= raw_length then + return nil, "request segment truncated" + end + + local request = { + offset = 0, + header_length = 5, + length_offset = 4, + length = request_length, + data_offset = 5, + crc_offset = request_crc_offset, + ack_offset = request_ack_offset, + } + + local reply = nil + local reply_offset = request_ack_offset + 1 + if reply_offset < raw_length and raw_tvb(request_ack_offset, 1):uint() == 0x00 then + local reply_length = raw_tvb(reply_offset, 1):uint() + local reply_crc_offset = reply_offset + 1 + reply_length + local reply_ack_offset = reply_crc_offset + 1 + if reply_ack_offset >= raw_length then + return nil, "reply segment truncated" + end + reply = { + offset = reply_offset, + length_offset = reply_offset, + length = reply_length, + data_offset = reply_offset + 1, + crc_offset = reply_crc_offset, + ack_offset = reply_ack_offset, + } + end + + return { + request = request, + reply = reply, + } +end + +function plugin.parse_broadcast_segments(raw_tvb) + local raw_length = raw_tvb:len() + if raw_length < 6 then + return nil, "broadcast transaction too short" + end + + local request_length = raw_tvb(4, 1):uint() + local request_crc_offset = 5 + request_length + if request_crc_offset >= raw_length then + return nil, "broadcast request truncated" + end + + return { + request = { + offset = 0, + header_length = 5, + length_offset = 4, + length = request_length, + data_offset = 5, + crc_offset = request_crc_offset, + }, + reply = nil, + } +end + +if type(Proto) ~= "table" or type(ProtoField) ~= "table" then + return plugin +end + +local proto = Proto("helianthus_ebus", "Helianthus eBUS") + +local fields = { + magic = ProtoField.string("helianthus_ebus.magic", "Magic"), + record_version = ProtoField.uint8("helianthus_ebus.record_version", "Record version", base.DEC), + stream_kind = ProtoField.string("helianthus_ebus.stream_kind", "Stream kind"), + command = ProtoField.uint8("helianthus_ebus.command", "ENS command", base.HEX), + command_name = ProtoField.string("helianthus_ebus.command_name", "ENS command label"), + flags = ProtoField.uint8("helianthus_ebus.flags", "Flags", base.HEX), + has_source = ProtoField.bool("helianthus_ebus.has_source", "Has source", 8, nil, plugin.record_flags.has_source), + request_like = ProtoField.bool("helianthus_ebus.request_like", "Request-like", 8, nil, plugin.record_flags.request_like), + sync_terminated = ProtoField.bool("helianthus_ebus.sync_terminated", "Sync terminated", 8, nil, plugin.record_flags.sync_terminated), + source = ProtoField.uint8("helianthus_ebus.source", "Initiator hint", base.HEX), + qq = ProtoField.uint8("helianthus_ebus.qq", "QQ", base.HEX), + zz = ProtoField.uint8("helianthus_ebus.zz", "ZZ", base.HEX), + pb = ProtoField.uint8("helianthus_ebus.pb", "PB", base.HEX), + sb = ProtoField.uint8("helianthus_ebus.sb", "SB", base.HEX), + opcode = ProtoField.uint16("helianthus_ebus.opcode", "Opcode", base.HEX), + opcode_label = ProtoField.string("helianthus_ebus.opcode_label", "Opcode label"), + family = ProtoField.string("helianthus_ebus.family", "Family"), + frame_type = ProtoField.string("helianthus_ebus.frame_type", "Frame type"), + reserved_byte11 = ProtoField.uint8("helianthus_ebus.reserved_byte11", "Reserved (byte 11)", base.HEX), + raw_length = ProtoField.uint16("helianthus_ebus.raw_length", "Raw length", base.DEC), + payload = ProtoField.bytes("helianthus_ebus.payload", "Raw payload"), + request = ProtoField.string("helianthus_ebus.request", "Request"), + request_length = ProtoField.uint8("helianthus_ebus.request.length", "Request length", base.DEC), + request_data = ProtoField.bytes("helianthus_ebus.request.data", "Request data"), + request_crc = ProtoField.uint8("helianthus_ebus.request.crc", "Request CRC", base.HEX), + request_ack = ProtoField.uint8("helianthus_ebus.request.ack", "Request ACK", base.HEX), + reply = ProtoField.string("helianthus_ebus.reply", "Reply"), + reply_length = ProtoField.uint8("helianthus_ebus.reply.length", "Reply length", base.DEC), + reply_data = ProtoField.bytes("helianthus_ebus.reply.data", "Reply data"), + reply_crc = ProtoField.uint8("helianthus_ebus.reply.crc", "Reply CRC", base.HEX), + reply_ack = ProtoField.uint8("helianthus_ebus.reply.ack", "Reply ACK", base.HEX), +} + +proto.fields = fields + +function proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "HLTH-EBUS" + + local subtree = tree:add(proto, buffer(), "Helianthus eBUS record") + if buffer:len() == 0 then + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, "Empty Helianthus record") + return + end + + if buffer:len() < 14 then + subtree:add_expert_info(PI_MALFORMED, PI_WARN, "Record too short") + return + end + + local magic = buffer(0, 4):string() + subtree:add(fields.magic, buffer(0, 4)) + if magic ~= "HLTH" then + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, "Magic mismatch") + return + end + + local version = buffer(4, 1):uint() + local kind = buffer(5, 1):uint() + local command = buffer(6, 1):uint() + local flags = buffer(7, 1):uint() + local source = buffer(8, 1):uint() + local pb = buffer(9, 1):uint() + local sb = buffer(10, 1):uint() + local reserved_byte11 = buffer(11, 1):uint() + local raw_length = buffer(12, 1):uint() + lshift(buffer(13, 1):uint(), 8) + local payload_offset = 14 + + local request_like = band(flags, plugin.record_flags.request_like) ~= 0 + + subtree:add(fields.record_version, buffer(4, 1)) + subtree:add(fields.stream_kind, plugin.stream_kind_name(kind)) + subtree:add(fields.command, buffer(6, 1)) + if kind == plugin.RECORD_KIND_ENS_EVENT then + subtree:add(fields.command_name, plugin.command_name(command, request_like)) + end + subtree:add(fields.flags, buffer(7, 1)) + subtree:add(fields.has_source, buffer(7, 1)) + subtree:add(fields.request_like, buffer(7, 1)) + subtree:add(fields.sync_terminated, buffer(7, 1)) + subtree:add(fields.reserved_byte11, buffer(11, 1)) + if reserved_byte11 ~= 0 then + subtree:add_expert_info(PI_PROTOCOL, PI_NOTE, "Reserved byte 11 non-zero") + end + subtree:add(fields.raw_length, buffer(12, 2), raw_length) + + if band(flags, plugin.record_flags.has_source) ~= 0 then + subtree:add(fields.source, buffer(8, 1)) + end + + if version ~= plugin.RECORD_VERSION then + subtree:add_expert_info(PI_PROTOCOL, PI_NOTE, "Unexpected record version") + end + + if buffer:len() < payload_offset + raw_length then + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, "Record payload truncated") + return + end + + local raw_tvb = buffer(payload_offset, raw_length) + subtree:add(fields.payload, raw_tvb) + + if kind == plugin.RECORD_KIND_ENS_EVENT then + -- TODO(extcap-ws23): helianthus-ebus-extcap live.go currently folds + -- ens-events/both streams into StreamEbusFrames, so this branch is + -- only exercised by synthetic fixtures in testdata/. Remove this + -- note once the extcap writer emits RECORD_KIND_ENS_EVENT records. + pinfo.cols.src = "" + pinfo.cols.dst = "" + pinfo.cols.protocol = "HLTH-ENS" + local info_data + if raw_length == 0 then + info_data = "no data" + else + info_data = string.format("data=0x%02X", raw_tvb(0, 1):uint()) + end + pinfo.cols.info = string.format( + "ENS %s %s", + plugin.command_name(command, request_like), + info_data + ) + return + end + + if kind ~= plugin.RECORD_KIND_EBUS_FRAME then + pinfo.cols.info = string.format("Unsupported record kind=%d", kind) + subtree:add_expert_info(PI_PROTOCOL, PI_WARN, "Unsupported record kind") + return + end + + if raw_length >= 1 then + subtree:add(fields.qq, raw_tvb(0, 1)) + end + if raw_length >= 2 then + subtree:add(fields.zz, raw_tvb(1, 1)) + end + local qq = raw_length >= 1 and raw_tvb(0, 1):uint() or 0 + local zz = raw_length >= 2 and raw_tvb(1, 1):uint() or 0 + subtree:add(fields.pb, buffer(9, 1)) + subtree:add(fields.sb, buffer(10, 1)) + local opcode = lshift(pb, 8) + sb + subtree:add(fields.opcode, buffer(9, 2)) + subtree:add(fields.opcode_label, plugin.lookup_label(opcode)) + subtree:add(fields.family, plugin.family_guess(opcode)) + local transaction_type + if raw_length < 2 then + -- Without QQ and ZZ the frame type cannot be inferred; defaulting qq/zz + -- to 0 would mislabel the frame as Primary-Primary and trigger irrelevant + -- segment warnings. + transaction_type = "Truncated" + subtree:add(fields.frame_type, transaction_type) + subtree:add_expert_info(PI_MALFORMED, PI_WARN, "eBUS frame truncated: missing QQ/ZZ") + else + transaction_type = plugin.transaction_type(qq, zz) + subtree:add(fields.frame_type, transaction_type) + if transaction_type == "Invalid" then + subtree:add_expert_info(PI_MALFORMED, PI_WARN, "Invalid eBUS address (0xA9/0xAA)") + end + end + + local segments, segment_err + if transaction_type == "Primary-Secondary" or transaction_type == "Primary-Primary" then + segments, segment_err = plugin.parse_primary_secondary_segments(raw_tvb) + elseif transaction_type == "Broadcast" then + segments, segment_err = plugin.parse_broadcast_segments(raw_tvb) + end + + if segment_err ~= nil then + subtree:add_expert_info(PI_MALFORMED, PI_WARN, segment_err) + elseif segments ~= nil then + local request = segments.request + local request_end = request.ack_offset or request.crc_offset + local request_tree = subtree:add( + fields.request, + raw_tvb(request.offset, request_end - request.offset + 1), + string.format("Request (len=%d)", request.length) + ) + request_tree:add(fields.request_length, raw_tvb(request.length_offset, 1)) + request_tree:add(fields.request_data, raw_tvb(request.data_offset, request.length)) + request_tree:add(fields.request_crc, raw_tvb(request.crc_offset, 1)) + if request.ack_offset ~= nil then + request_tree:add(fields.request_ack, raw_tvb(request.ack_offset, 1)) + end + + if segments.reply ~= nil then + local reply = segments.reply + local reply_tree = subtree:add( + fields.reply, + raw_tvb(reply.offset, reply.ack_offset - reply.offset + 1), + string.format("Reply (len=%d)", reply.length) + ) + reply_tree:add(fields.reply_length, raw_tvb(reply.length_offset, 1)) + reply_tree:add(fields.reply_data, raw_tvb(reply.data_offset, reply.length)) + reply_tree:add(fields.reply_crc, raw_tvb(reply.crc_offset, 1)) + reply_tree:add(fields.reply_ack, raw_tvb(reply.ack_offset, 1)) + elseif transaction_type == "Primary-Secondary" then + -- The ProtoField label ("Reply") is prepended automatically, so pass + -- only ""; the rendered line is still "Reply: ". + subtree:add(fields.reply, "") + end + end + + pinfo.cols.src = raw_length >= 1 and string.format("0x%02X", qq) or "" + pinfo.cols.dst = raw_length >= 2 and string.format("0x%02X", zz) or "" + pinfo.cols.protocol = string.format("%02X/%02X", pb, sb) + local info = string.format( + "%s opcode=0x%04X %s len=%d", + transaction_type, + opcode, + plugin.lookup_label(opcode), + raw_length + ) + if raw_length >= 2 then + info = string.format("qq=0x%02X zz=0x%02X %s", raw_tvb(0, 1):uint(), raw_tvb(1, 1):uint(), info) + end + pinfo.cols.info = info +end + +plugin.proto = proto +DissectorTable.get("wtap_encap"):add(plugin.WTAP_ENCAP_USER0, proto) +return plugin diff --git a/dissectors/hncp-hnetd/LICENSE b/dissectors/hncp-hnetd/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/dissectors/hncp-hnetd/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/hncp-hnetd/README.md b/dissectors/hncp-hnetd/README.md new file mode 100644 index 0000000..a5eb01a --- /dev/null +++ b/dissectors/hncp-hnetd/README.md @@ -0,0 +1,47 @@ +# HNCP — Home Networking Control Protocol (hnetd) + +Dissecteur Wireshark Lua **basique** du **Home Networking Control +Protocol** (HNCP, RFC 7788, au-dessus de DNCP, RFC 7787), protocole de +configuration automatique des réseaux domestiques multi-routeurs (IETF +Homenet), tel qu'implémenté par le démon `hnetd` d'OpenWrt : décodage +récursif des TLV sur UDP 8231 (demandes d'état réseau / nœud, état de +nœud, hachages, identifiants de lien, numéro de mise à jour, keep-alive, +délégation et attribution de préfixes, etc. — une vingtaine de types +nommés). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/sbyx/hnetd (fichier `hnetd_wireshark.lua`) | +| Commit importé | `c43766610ed30194b048bc070a3c433aec731c40` du 21/12/2018 (branche `master`, dernier commit ; dernière modification du dissecteur : `4e7d49b` du 14/07/2018) | +| Licence amont | Apache-2.0 (`LICENSE` amont ; en-tête du fichier : « Author: Markus Stenberg », « Copyright (c) 2013 cisco Systems, Inc. ») | +| Natif Wireshark 4.6.4 | Non — pas de `packet-hncp.c` dans la branche `release-4.6` (vérifié dans l'arborescence des sources Wireshark le 01/11/2026) | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). Pas de fichier `NOTICE` amont. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `hnetd_wireshark.lua` | Dissecteur `hncp` (UDP 8231), champs `hncp.*` | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. Les fichiers Lua LuCI du dépôt +amont (interface web OpenWrt) ne sont pas des dissecteurs et ne sont pas +repris. + +## Utilisation + +Copier `hnetd_wireshark.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer +`wireshark -X lua_script:hnetd_wireshark.lua`, puis filtrer avec `hncp`. + +## Remarques + +- Dissecteur « TRÈS basique » selon son auteur : seules les TLV transmises + par hnetd sont nommées ; les autres sont affichées en données brutes. +- Les échanges HNCP sécurisés par DTLS (UDP 8232) ne sont pas décodés. +- Variables globales (`p_hncp`, `udp_table`) comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/hncp-hnetd/hnetd_wireshark.lua b/dissectors/hncp-hnetd/hnetd_wireshark.lua new file mode 100644 index 0000000..d474a68 --- /dev/null +++ b/dissectors/hncp-hnetd/hnetd_wireshark.lua @@ -0,0 +1,179 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/sbyx/hnetd (hnetd_wireshark.lua), +-- commit c43766610ed30194b048bc070a3c433aec731c40 du 21/12/2018. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- -*-lua-*- +-- +-- $Id: hnetd_wireshark.lua $ +-- +-- Author: Markus Stenberg +-- +-- Copyright (c) 2013 cisco Systems, Inc. +-- +-- Created: Tue Dec 3 11:13:05 2013 mstenber +-- Last modified: Sat Jul 14 08:36:53 2018 mstenber +-- Edit time: 123 min +-- + +-- This is Lua module which provides VERY basic dissector for TLVs we +-- transmit. + +-- Usage: wireshark -X lua_script:hnetd_wireshark.lua + +p_hncp = Proto("hncp", "Homenet Control Protocol") + +local f_id = ProtoField.uint16('hncp.id', 'TLV id') +local f_len = ProtoField.uint16('hncp.len', 'TLV len') +local f_data = ProtoField.bytes('hncp.data', 'TLV data') + +local f_nid_hash = ProtoField.bytes('hncp.node_identifier_hash', + 'Node identifier') +local f_data_hash = ProtoField.bytes('hncp.data_hash', + 'Node data hash') +local f_network_hash = ProtoField.bytes('hncp.network_hash', + 'Network state hash') + +local f_lid = ProtoField.uint32('hncp.llid', 'Local link identifier') +local f_rlid = ProtoField.uint32('hncp.rlid', 'Remote link identifier') +local f_upd = ProtoField.uint32('hncp.update_number', 'Update number') +local f_ms = ProtoField.uint32('hncp.ms_since_origination', + 'Time since origination (ms)') +local f_interval_ms = ProtoField.uint32('hncp.keepalive_interval', + 'Keep-alive interval (ms)') + +p_hncp.fields = {f_id, f_len, f_data, + f_nid_hash, f_data_hash, f_network_hash, + f_lid, f_rlid, f_upd, f_ms, f_interval_ms} + +local tlvs = { + -- dncp content + [1]={name='req-net-state'}, + [2]={name='req-node-state', + contents={{4, f_nid_hash}}, + }, + [3]={name='endpoint-id', + contents={{4, f_nid_hash}, + {4, f_lid}}, + }, + [4]={name='net-state', + contents={{8, f_network_hash}}}, + [5]={name='node-state', + contents={{4, f_nid_hash}, + {4, f_upd}, + {4, f_ms}, + {8, f_data_hash}, + }, + recurse=true + }, + -- historic never deployed [6]={name='custom'}, + -- historic never deployed [7]={name='fragment-count'}, + [8]={name='neighbor', contents={{4, f_nid_hash}, + {4, f_rlid}, + {4, f_lid}, + }, + }, + [9]={name='keepalive-interval', contents={{4, f_lid}, + {4, f_interval_ms}}, + }, + [10]={name='trust-verdict'}, + + -- hncp content + [32]={name='version'}, + [33]={name='external-connection', contents={}, recurse=true}, + [34]={name='delegated-prefix'}, + [35]={name='assigned-prefix'}, + [36]={name='router-address'}, + [37]={name='dhcpv4-options'}, + [38]={name='dhcpv6-options'}, + + [39]={name='dns-delegated-zone'}, + [40]={name='dns-domain-name'}, + [41]={name='dns-node-name'}, + [42]={name='managed-psk'}, + [43]={name='prefix-policy'}, + + -- does not seem to exist anymore in the wild: + -- [199]={name='routing-protocol'}, +} + + +function p_hncp.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = 'hncp' + + local rec_decode + local function data_decode(ofs, left, tlv, tree) + for i, v in ipairs(tlv.contents) + do + local elen, ef = unpack(v) + if elen > left + then + tree:append_text(string.format(' (!!! missing data - %d > %d (%s))', + elen, left, v)) + return + end + tree:add(ef, buffer(ofs, elen)) + left = left - elen + ofs = ofs + elen + end + if tlv.recurse + then + rec_decode(ofs, left, tree) + end + end + + rec_decode = function (ofs, left, tree) + if left < 4 + then + return + end + local partial + local rid = buffer(ofs, 2) + local rlen = buffer(ofs+2, 2) + local id = rid:uint() + local len = rlen:uint() + local bs = '' + local ps = '' + local tlv = tlvs[id] or {} + if tlv.name + then + bs = ' (' .. tlv.name .. ')' + end + if (len + 4) > left + then + len = left - 4 + ps = ' (partial)' + partial = true + end + local tree2 = tree:add(buffer(ofs, len + 4), + string.format('TLV %d%s - %d value bytes%s', + id, bs, len, ps)) + if partial + then + return + end + local fid = tree2:add(f_id, rid) + fid:append_text(bs) + local flen = tree2:add(f_len, rlen) + if len > 0 + then + local fdata = tree2:add(f_data, buffer(ofs + 4, len)) + if tlv.contents + then + -- skip the tlv header (that's why +- 4) + data_decode(ofs + 4, len, tlv, fdata) + end + end + -- recursively decode the rest too, hrr :) + + -- (note that we have to round it up to next /4 boundary; stupid + -- alignment..) + len = math.floor((len + 3)/4) * 4 + + rec_decode(ofs + len + 4, left - len - 4, tree) + end + rec_decode(0, buffer:len(), tree:add(p_hncp, buffer())) +end + +-- register as udp dissector +udp_table = DissectorTable.get("udp.port") +udp_table:add(8231, p_hncp) diff --git a/dissectors/homeplug-av-serock/LICENSE b/dissectors/homeplug-av-serock/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/dissectors/homeplug-av-serock/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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) + + 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. + +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) year 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 Lesser General +Public License instead of this License. diff --git a/dissectors/homeplug-av-serock/README.md b/dissectors/homeplug-av-serock/README.md new file mode 100644 index 0000000..90f02af --- /dev/null +++ b/dissectors/homeplug-av-serock/README.md @@ -0,0 +1,50 @@ +# HomePlug AV (dissecteur Lua alternatif, adaptateurs CPL) + +Dissecteur Wireshark Lua **alternatif** du protocole **HomePlug AV** +(EtherType 0x88E1), utilisé par les adaptateurs CPL (courant porteur en +ligne) pour leurs messages de gestion. Il décode entièrement les messages : + +| MMTYPE | Message | +|---|---| +| 0x0014 / 0x0015 | CC_DISCOVER_LIST.REQ / .CNF (stations et réseaux découverts) | +| 0x6034 / 0x6035 | CM_STA_CAP.REQ / .CNF (capacités de la station) | +| 0x6060 / 0x6061 | CM_STA_IDENTIFY.REQ / .CNF (identification, capacités étendues) | +| 0x6046 | CM_MME_ERROR.IND | + +avec l'en-tête MME (version, type, fragmentation) et les champs détaillés +(débits, capacités HomePlug Green PHY / AV2, etc.). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/serock/homeplug-av-dissector (fichier `homeplug-av.lua`) | +| Commit importé | `25f11a7bf406208188b0fb3935d63876f4cc9c28` du 29/04/2023 (branche `main`, dernier commit, qui modifie aussi le dissecteur) | +| Licence amont | GPL-2.0-or-later (en-tête du fichier : `SPDX-License-Identifier: GPL-2.0-or-later`, « Copyright (C) 2023 John Serock », « either version 2 of the License, or (at your option) any later version » ; `LICENSE` amont : texte de la GPL v2) | +| Natif Wireshark 4.6.4 | **Oui** — dissecteur natif `homeplug-av` (`packet-homeplug-av.c`), plus large ; ce script est une alternative plus détaillée pour les quelques messages ci-dessus, qui **remplace le natif sur l'EtherType 0x88E1** une fois chargé | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `homeplug-av.lua` | Protocole `homeplugav` (EtherType 0x88E1) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier (l'en-tête SPDX amont est +conservée). + +## Utilisation + +Copier `homeplug-av.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `homeplugav`. Pour revenir au natif, désactiver le protocole +`HOMEPLUGAV` (Analyse → Protocoles activés) et filtrer avec `homeplug-av`. + +## Remarques + +- Pas de défragmentation des messages fragmentés ; seul un sous-ensemble + des messages de gestion est décodé (README amont). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/homeplug-av-serock/homeplug-av.lua b/dissectors/homeplug-av-serock/homeplug-av.lua new file mode 100644 index 0000000..b4855df --- /dev/null +++ b/dissectors/homeplug-av-serock/homeplug-av.lua @@ -0,0 +1,658 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later +-- Importé de https://github.com/serock/homeplug-av-dissector (homeplug-av.lua), +-- commit 25f11a7bf406208188b0fb3935d63876f4cc9c28 du 29/04/2023. +-- Licence amont : GPL-2.0-or-later (LICENSE amont) — voir README.md. +-- SPDX-License-Identifier: GPL-2.0-or-later +------------------------------------------------------------------------ +-- homeplug-av-dissector - A HomePlug AV protocol dissector for +-- Wireshark +-- Copyright (C) 2023 John Serock +-- +-- This file is part of homeplug-av-dissector. +-- +-- homeplug-av-dissector 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. +-- +-- homeplug-av-dissector 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. +------------------------------------------------------------------------ +local p_homeplug_av = Proto("HomePlugAV", "HomePlug AV Protocol") + +local my_info = { + description = "A HomePlug AV protocol dissector", + version = "0.7.0", + author = "John Serock", + repository = "https://github.com/serock/homeplug-av-dissector" +} + +-- print("Lua version = ", _VERSION) + +local ETHERTYPE_HOMEPLUGAV = 0x88e1 + +local MMTYPE_DISCOVER_LIST_REQ = 0x0014 +local MMTYPE_DISCOVER_LIST_CNF = 0x0015 +local MMTYPE_STA_CAP_REQ = 0x6034 +local MMTYPE_STA_CAP_CNF = 0x6035 +local MMTYPE_NW_STATS_REQ = 0x6048 +local MMTYPE_NW_STATS_CNF = 0x6049 +local MMTYPE_STA_IDENTIFY_REQ = 0x6060 +local MMTYPE_STA_IDENTIFY_CNF = 0x6061 +local MMTYPE_ERROR_IND = 0x6046 + +local beacon_slots = { + [0] = "1", + [1] = "2", + [2] = "3", + [3] = "4", + [4] = "5", + [5] = "6", + [6] = "7", + [7] = "8" +} + +local bidir_bursting_values = { + [0] = "no", + [1] = "Selective ACK only", + [2] = "Selective ACK or reverse start of frame" +} + +local cco_capabilities = { + [0] = "QoS and TDMA not supported", + [1] = "QoS and TDMA in uncoordinated mode only", + [2] = "QoS and TDMA in coordinated mode", + [3] = "future" +} + +local coordinating_status = { + [0] = "Status unknown", + [1] = "Non-coordinating network", + [2] = "Coordinating, group status unknown", + [3] = "Coordinating, in same group as this Central Coordinator", + [4] = "Coordinating, not in same group as this Central Coordinator" +} + +local eebtm_values = { + [0] = "Pseudo noise sequence", + [1] = "Frame control and robust OFDM information for diversity" +} + +local guard_intervals = { + [0x00] = "5.56", + [0x01] = "7.56", + [0x02] = "47.12", + [0x03] = "1.6", + [0x04] = "2.08", + [0x05] = "2.56", + [0x06] = "3.92", + [0x07] = "9.56", + [0x08] = "11.56", + [0x09] = "15.56", + [0x0a] = "19.56", + [0x0b] = "0.00", + [0x0c] = "0.92" +} + +local homeplug_av_station_types = { + [0x00] = "HomePlug AV 1.1 station", + [0x01] = "HomePlug AV 2.0 station", + [0xff] = "Not a HomePlug AV station" +} + +local homeplug_av_versions = { + [0] = "1.1", + [1] = "2.0" +} + +local hybrid_modes = { + [0] = "AV only mode", + [1] = "Shared CSMA hybrid mode", + [2] = "Fully hybrid mode", + [3] = "Hybrid delimiters, frame lengths may be incompatible with HomePlug 1.0" +} + +local mimo_capabilities = { + [0] = "no", + [1] = "Selection diversity", + [2] = "Beam forming" +} + +local mmtypes = { + [MMTYPE_DISCOVER_LIST_REQ] = "Discover List request", + [MMTYPE_DISCOVER_LIST_CNF] = "Discover List confirmation", + [MMTYPE_STA_CAP_REQ] = "Station Capabilities request", + [MMTYPE_STA_CAP_CNF] = "Station Capabilities confirmation", + [MMTYPE_NW_STATS_REQ] = "Network Statistics request", + [MMTYPE_NW_STATS_CNF] = "Network Statistics confirmation", + [MMTYPE_STA_IDENTIFY_REQ] = "Station Identification Information request", + [MMTYPE_STA_IDENTIFY_CNF] = "Station Identification Information confirmation", + [MMTYPE_ERROR_IND] = "Error indication" +} + +local mmtype_lsbs = { + [0] = "request", + [1] = "confirmation", + [2] = "indication", + [3] = "response" +} + +local mmtype_msbs = { + [0] = "Station -- Central Coordinator", + [1] = "Proxy Coordinator", + [2] = "Central Coordinator -- Central Coordinator", + [3] = "Station -- Station", + [4] = "Manufacturer specific", + [5] = "Vendor specific", + [6] = "Reserved", + [7] = "Reserved" +} + +local mmvs = { + [0] = "1.0", + [1] = "1.1", + [2] = "2.0" +} + +local pb_values = { + [0] = "The maximum number based on physical parameters", + [1] = "Reserved" +} + +local network_kinds = { + [0] = "In-home", + [1] = "Access" +} + +local no_yes = { + [0] = "no", + [1] = "yes" +} + +local ouis = { + ["00:1f:84"] = "Gigle Semiconductor" +} + +local power_levels = { + [0] = "0.0 dB", + [1] = "0.5 dB", + [2] = "1.0 dB", + [3] = "1.5 dB", + [4] = "2.0 dB", + [5] = "2.5 dB", + [6] = "3.0 dB", + [7] = "3.5 dB" +} + +local rate_units = { + " Mbps" +} + +local reason_codes = { + [0] = "Management Message Entry not supported", + [1] = "Supported Management Message Entry with invalid fields", + [2] = "Unsupported feature" +} + +local security_levels = { + [0] = "Simple Connect", + [1] = "Secure" +} + +local signal_levels = { + [0x00] = "Unavailable", + [0x01] = "> -10 dB, but <= 0 dB", + [0x02] = "> -15 dB, but <= -10 dB", + [0x03] = "> -20 dB, but <= -15 dB", + [0x04] = "> -25 dB, but <= -20 dB", + [0x05] = "> -30 dB, but <= -25 dB", + [0x06] = "> -35 dB, but <= -30 dB", + [0x07] = "> -40 dB, but <= -35 dB", + [0x08] = "> -45 dB, but <= -40 dB", + [0x09] = "> -50 dB, but <= -45 dB", + [0x0a] = "> -55 dB, but <= -50 dB", + [0x0b] = "> -60 dB, but <= -55 dB", + [0x0c] = "> -65 dB, but <= -60 dB", + [0x0d] = "> -70 dB, but <= -65 dB", + [0x0e] = "> -75 dB, but <= -70 dB", + [0x0f] = "<= -75 dB", +} + +local regulatory_domains = { + [0] = "North America only" +} + +local pf = { + mmv = ProtoField.uint8("homeplugav.mmv", "Management Message Version", base.DEC, mmvs), + mmtype = ProtoField.uint16("homeplugav.mmtype", "Management Message Type", base.HEX, mmtypes), + mmtype_msbs = ProtoField.uint16("homeplugav.mmtype.msbs", "Three MSBs", base.DEC, mmtype_msbs, 0xe000), + mmtype_lsbs = ProtoField.uint16("homeplugav.mmtype.lsbs", "Two LSBs", base.DEC, mmtype_lsbs, 0x0003), + fmi = ProtoField.bytes("homeplugav.fmi", "Fragmentation Management Information", base.COLON), + fmi_nf_mi = ProtoField.uint8("homeplugav.fmi.nf_mi", "Number of Fragments", base.DEC, nil, 0xf0), + fmi_fn_mi = ProtoField.uint8("homeplugav.fmi.fn_mi", "Fragment Number", base.DEC, nil, 0x0f), + fmi_fmsn = ProtoField.uint8("homeplugav.fmi.fmsn", "Fragmentation Message Sequence Number", base.DEC), + num_stas = ProtoField.uint8("homeplugav.num_stas", "Number of Stations", base.DEC), + num_networks = ProtoField.uint8("homeplugav.num_networks", "Number of Networks", base.DEC), + sta_mac_addr = ProtoField.ether("homeplugav.sta.mac_addr", "MAC Address"), + sta_tei = ProtoField.uint8("homeplugav.sta.tei", "Terminal Equipment Identifier", base.DEC), + sta_same_network = ProtoField.uint8("homeplugav.sta.same_network", "Same Network", base.DEC, no_yes), + sta_network_kind = ProtoField.uint8("homeplugav.sta.network_kind", "Network Type", base.DEC, network_kinds, 0xf0), + sta_snid = ProtoField.uint8("homeplugav.sta.snid", "Short Network Identifier", base.DEC, nil, 0x0f), + sta_status_bcco = ProtoField.uint8("homeplugav.sta.status_bcco", "Backup Central Coordinator", base.DEC, no_yes, 0x80), + sta_status_pco = ProtoField.uint8("homeplugav.sta.status_pco", "Proxy Coordinator", base.DEC, no_yes, 0x40), + sta_status_cco = ProtoField.uint8("homeplugav.sta.status_cco", "Central Coordinator", base.DEC, no_yes, 0x20), + sta_capability_bcco = ProtoField.uint8("homeplugav.sta.capability_bcco", "Backup Central Coordinator Capability", base.DEC, no_yes, 0x10), + sta_capability_pco = ProtoField.uint8("homeplugav.sta.capability_pco", "Proxy Coordinator Capability", base.DEC, no_yes, 0x08), + sta_capability_cco = ProtoField.uint8("homeplugav.sta.capability_cco", "Central Coordinator Capability", base.DEC, cco_capabilities, 0x06), + sta_reserved = ProtoField.uint8("homeplugav.sta.reserved", "Reserved", base.DEC, nil, 0x01), + sta_signal_level = ProtoField.uint8("homeplugav.sta.signal_level", "Signal Level", base.DEC, signal_levels), + sta_ble = ProtoField.string("homeplugav.sta.ble", "Average Bit Loading Estimate"), + sta_ble_mantissa = ProtoField.uint8("homeplugav.sta.ble.mantissa", "Mantissa", base.DEC, nil, 0xf8), + sta_ble_exponent = ProtoField.uint8("homeplugav.sta.ble.exponent", "Exponent", base.DEC, nil, 0x07), + nw_nid = ProtoField.uint64("homeplugav.nw.nid", "Network Identifier", base.HEX), + nw_nid_sl = ProtoField.uint8("homeplugav.nw.nid.sl", "Security Level", base.DEC, security_levels, 0x30), + nw_network_kind = ProtoField.uint8("homeplugav.nw.network_kind", "Network Type", base.DEC, network_kinds, 0xf0), + nw_snid = ProtoField.uint8("homeplugav.nw.snid", "Short Network Identifier", base.DEC, nil, 0x0f), + nw_hybrid_mode = ProtoField.uint8("homeplugav.nw.hybrid_mode", "Hybrid Mode", base.DEC, hybrid_modes), + nw_beacon_slots = ProtoField.uint8("homeplugav.nw.beacon_slots", "Number of Beacon Slots", base.DEC, beacon_slots), + nw_coord_status = ProtoField.uint8("homeplugav.nw.coord_status", "Coordinating Status of Central Coordinator", base.DEC, coordinating_status), + nw_offset = ProtoField.string("homeplugav.nw.offset", "Offset between Beacon Regions"), + mac_addr = ProtoField.ether("homeplugav.mac_addr", "MAC Address"), + homeplug_av_version = ProtoField.uint8("homeplugav.hpav_version", "HomePlug AV Version", base.DEC, homeplug_av_versions), + oui = ProtoField.bytes("homeplugav.oui", "Organizationally Unique Identifier", base.COLON), + capability_auto_connect = ProtoField.uint8("homeplugav.capability_auto_connect", "Auto Connect Capability", base.DEC, no_yes), + capability_smoothing = ProtoField.uint8("homeplugav.capability_smoothing", "Smoothing Capability", base.DEC, no_yes), + capability_cco = ProtoField.uint8("homeplugav.capability_cco", "Central Coordinator Capability", base.DEC, no_yes), + capability_pco = ProtoField.uint8("homeplugav.capability_pco", "Proxy Coordinator Capability", base.DEC, no_yes), + capability_bcco = ProtoField.uint8("homeplugav.capability_bcco", "Backup Central Coordinator Capability", base.DEC, no_yes), + capability_soft_handover = ProtoField.uint8("homeplugav.capability_soft_handover", "Soft Handover Capability", base.DEC, no_yes), + capability_two_symbol_fc = ProtoField.uint8("homeplugav.capability_two_symbol_fc", "Two-Symbol Frame Control Capability", base.DEC, no_yes), + max_frame_len = ProtoField.string("homeplugav.max_frame_len", "Maximum Frame Length"), + capability_homeplug_1_1 = ProtoField.uint8("homeplugav.capability_homeplug_1_1", "HomePlug 1.1 Capability", base.DEC, no_yes), + interop_homeplug_1_0 = ProtoField.uint8("homeplugav.interop_homeplug_1_0", "HomePlug 1.0 Interoperability", base.DEC, no_yes), + capability_regulatory = ProtoField.uint8("homeplugav.capability_regulatory", "Regulatory Capability", base.DEC, regulatory_domains), + capability_bidir_burst = ProtoField.uint8("homeplugav.capability_bidir_burst", "Bidirectional Bursting Capability", base.DEC, bidir_bursting_values), + implementation_version = ProtoField.uint16("homeplugav.impl_version", "Implementation Version", base.DEC), + capability_green_phy = ProtoField.uint8("homeplugav.capability_green_phy", "Green PHY Capability", base.DEC, no_yes), + capability_power_save = ProtoField.uint8("homeplugav.capability_power_save", "Power Save Capability", base.DEC, no_yes), + capability_gp_pref_alloc = ProtoField.uint8("homeplugav.capability_gp_pref_alloc", "Green PHY Preferred Allocation Capability", base.DEC, no_yes), + capability_repeat_route = ProtoField.uint8("homeplugav.capability_repeat_route", "Repeating and Routing Capability", base.DEC, no_yes), + homeplug_av_station = ProtoField.uint8("homeplugav.hpav_station", "HomePlug AV Station Type", base.DEC, homeplug_av_station_types), + extended_fields_len = ProtoField.uint8("homeplugav.extended_fields_len", "Extended Fields Length", base.DEC), + ef_capability_mimo = ProtoField.uint8("homeplugav.ef.capability_mimo", "MIMO Capability", base.DEC, mimo_capabilities), + ef_ext_freq_band = ProtoField.uint8("homeplugav.ef.ext_freq_band", "Extended Frequency Band Capability", base.DEC, no_yes), + ef_immed_repeat = ProtoField.uint8("homeplugav.ef.immed_repeat", "Immediate Repeating Capability", base.DEC, no_yes), + ef_short_delimiter = ProtoField.uint8("homeplugav.ef.short_delimiter", "Short Delimiter Capability", base.DEC, no_yes), + ef_min_tx_gil = ProtoField.uint8("homeplugav.ef.min_tx_gil", "Minimum Transmit Guard Interval", base.DEC, guard_intervals), + ef_min_rx_gil = ProtoField.uint8("homeplugav.ef.min_tx_gil", "Minimum Receive Guard Interval", base.DEC, guard_intervals), + ef_min_carr_freq = ProtoField.string("homeplugav.ef.min_carr_freq", "Minimum Carrier Frequency"), + ef_max_carr_freq = ProtoField.string("homeplugav.ef.max_carr_freq", "Maximum Carrier Frequency"), + ef_eebtm = ProtoField.uint8("homeplugav.ef.eebtm", "Encoding of Extended Broadcast Tone Mask", base.DEC, eebtm_values), + ef_max_pb_sym = ProtoField.uint8("homeplugav.ef.max_pb_sym", "Maximum PHY Blocks per Symbol", base.DEC), + ef_max_pb_sym_enum = ProtoField.uint8("homeplugav.ef.max_pb_sym", "Maximum PHY Blocks per Symbol", base.DEC, pb_values), + ef_mimo_power = ProtoField.uint8("homeplugav.ef.mimo_power", "MIMO Power Allocation", base.DEC, power_levels), + ef_frame_256 = ProtoField.uint8("homeplugav.ef.frame_256", "256-bit Frame Control Capability", base.DEC, no_yes), + ef_vsinfo_len = ProtoField.uint16("homeplugav.ef.vsinfo_len", "Vendor-Specific Information Length", base.DEC), + ef_vs_oui = ProtoField.bytes("homeplugav.ef.vs.oui", "Organizationally Unique Identifier", base.COLON), + ef_vs_vendor_defined = ProtoField.bytes("homeplugav.ef.vs.vendor_defined", "Vendor Defined", base.SPACE), + reason_code = ProtoField.uint8("homeplugav.rc", "Reason Code", base.DEC, reason_codes), + rx_mmv = ProtoField.uint8("homeplugav.rx_mmv", "Received Management Message Version", base.DEC, mmvs), + rx_mmtype = ProtoField.uint16("homeplugav.rx_mmtype", "Received Management Message Type", base.HEX, mmtypes), + invalid_octet_offset = ProtoField.uint16("homeplugav.invalid_offset", base.DEC), + sta_dest_addr = ProtoField.ether("mediaxtream.sta.dest_addr", "Destination Address (DA)"), + sta_tx_rate_v1 = ProtoField.uint8("homeplugav.sta.tx_rate_v1", "Transmit Rate to DA", base.UNIT_STRING, rate_units), + sta_rx_rate_v1 = ProtoField.uint8("homeplugav.sta.rx_rate_v1", "Receive Rate from DA", base.UNIT_STRING, rate_units), + sta_tx_rate_v2 = ProtoField.uint16("homeplugav.sta.tx_rate_v2", "Transmit Rate to DA", base.UNIT_STRING, rate_units), + sta_rx_rate_v2 = ProtoField.uint16("homeplugav.sta.rx_rate_v2", "Receive Rate from DA", base.UNIT_STRING, rate_units) +} + +local ef = { + invalid_mmv = ProtoExpert.new("homeplugav.invalid_mmv.expert", "Invalid Management Message Version", expert.group.MALFORMED, expert.severity.ERROR), + unexpected_mmv = ProtoExpert.new("homeplugav.unexpected_mmv.expert", "Unexpected Management Message Version", expert.group.UNDECODED, expert.severity.ERROR), + unexpected_mmv_mmtype = ProtoExpert.new("homeplugav.unexpected_mmv_mmtype.expert", "Unexpected Management Message Version and Type", expert.group.UNDECODED, expert.severity.ERROR), + unknown_mmtype = ProtoExpert.new("homeplugav.unknown_data.expert", "Unknown Management Message Type", expert.group.UNDECODED, expert.severity.ERROR) +} + +p_homeplug_av.fields = pf +p_homeplug_av.experts = ef + +local f = { + mmv = Field.new("homeplugav.mmv"), + mmtype = Field.new("homeplugav.mmtype"), + num_stas = Field.new("homeplugav.num_stas"), + num_networks = Field.new("homeplugav.num_networks"), + sta_ble_mantissa = Field.new("homeplugav.sta.ble.mantissa"), + sta_ble_exponent = Field.new("homeplugav.sta.ble.exponent"), + oui = Field.new("homeplugav.oui"), + homeplug_av_station = Field.new("homeplugav.hpav_station"), + ef_vsinfo_len = Field.new("homeplugav.ef.vsinfo_len"), + ef_vs_oui = Field.new("homeplugav.ef.vs.oui"), + reason_code = Field.new("homeplugav.rc") +} + +local buffer_len +local mmtype +local mmv + +local function to_ble(range) + local mantissa = f.sta_ble_mantissa()() + local exponent = f.sta_ble_exponent()() + local ble = (mantissa + 32.0) * 2.0 ^ (exponent - 4.0) + 2.0 ^ (exponent - 5.0) + return ble .. " bits per microsecond" +end + +local function to_frame_length_string(range) + return range:le_uint() * 1.28 .. " microseconds" +end + +local function to_frequency_string(range) + local value = range:le_uint() * 24.414 + local result + if value < 1000.0 then + result = value .. " kHz" + else + result = value / 1000.0 .. " MHz" + end + return result +end + +local function to_network_offset(range) + return range:le_uint() * 10.24 .. " microseconds" +end + +local function dissect_discover_list_req(buffer, mme_tree) + mme_tree:append_text(": null") + mme_tree:set_len(0) +end + +local function dissect_discover_list_cnf(buffer, mme_tree) + mme_tree:add_le(pf.num_stas, buffer(5, 1)) + local num_stas = f.num_stas()() + local i = 6 + for j = 1, num_stas do + local sta_tree = mme_tree:add(buffer(i, 12), "Station " .. j) + sta_tree:add(pf.sta_mac_addr, buffer(i, 6)) + sta_tree:add_le(pf.sta_tei, buffer(i + 6, 1)) + sta_tree:add_le(pf.sta_same_network, buffer(i + 7, 1)) + do + local range = buffer(i + 8, 1) + sta_tree:add_le(pf.sta_network_kind, range) + sta_tree:add_le(pf.sta_snid, range) + end + do + local range = buffer(i + 9, 1) + sta_tree:add_le(pf.sta_status_bcco, range) + sta_tree:add_le(pf.sta_status_pco, range) + sta_tree:add_le(pf.sta_status_cco, range) + sta_tree:add_le(pf.sta_capability_bcco, range) + sta_tree:add_le(pf.sta_capability_pco, range) + sta_tree:add_le(pf.sta_capability_cco, range) + sta_tree:add_le(pf.sta_reserved, range) + end + sta_tree:add_le(pf.sta_signal_level, buffer(i + 10, 1)) + do + local range = buffer(i + 11, 1) + local ble_tree = sta_tree:add(range, "Average Bit Loading Estimate") + ble_tree:add_le(pf.sta_ble_mantissa, range) + ble_tree:add_le(pf.sta_ble_exponent, range) + ble_tree:append_text(": " .. to_ble(range)) + end + i = i + 12 + end + mme_tree:add_le(pf.num_networks, buffer(i, 1)) + i = i + 1 + local num_networks = f.num_networks()() + for j = 1, num_networks do + local network_tree = mme_tree:add(buffer(i, 13), "Network " .. j) + do + local nid_tree = network_tree:add_le(pf.nw_nid, buffer(i, 7)) + nid_tree.text = string.gsub(nid_tree.text, "0x00", "0x") + nid_tree:add_le(pf.nw_nid_sl, buffer(i + 6, 1)) + end + do + local range = buffer(i + 7, 1) + network_tree:add_le(pf.nw_network_kind, range) + network_tree:add_le(pf.nw_snid, range) + end + network_tree:add_le(pf.nw_hybrid_mode, buffer(i + 8, 1)) + network_tree:add_le(pf.nw_beacon_slots, buffer(i + 9, 1)) + network_tree:add_le(pf.nw_coord_status, buffer(i + 10, 1)) + do + local range = buffer(i + 11, 2) + network_tree:add_le(pf.nw_offset, range, to_network_offset(range)) + end + i = i + 13 + end + mme_tree:set_len(i - 5) +end + +local function dissect_error_ind(buffer, mme_tree) + mme_tree:add_le(pf.reason_code, buffer(5, 1)) + mme_tree:add_le(pf.rx_mmv, buffer(6, 1)) + mme_tree:add_le(pf.rx_mmtype, buffer(7, 2)) + local rc = f.reason_code()() + if rc == 1 then + mme_tree:add_le(pf.invalid_octet_offset, buffer(9, 2)) + mme_tree:set_len(6) -- 6=9+2-5 + else + mme_tree:set_len(4) -- 4=7+2-5 + end +end + +local function dissect_nw_stats_req_v1(buffer, mme_tree) + mme_tree:append_text(": null") + mme_tree:set_len(0) +end + +local function dissect_nw_stats_cnf_v1(buffer, mme_tree) + mme_tree:add_le(pf.num_stas, buffer(5, 1)) + local num_stas = f.num_stas()() + local i = 6 + for j = 1, num_stas do + local sta_tree = mme_tree:add(buffer(i, 8), "Station " .. j) + sta_tree:add(pf.sta_dest_addr, buffer(i, 6)) + sta_tree:add_le(pf.sta_tx_rate_v1, buffer(i + 6, 1)) + sta_tree:add_le(pf.sta_rx_rate_v1, buffer(i + 7, 1)) + i = i + 8 + end + mme_tree:set_len(i - 5) +end + +local function dissect_nw_stats_req_v2(buffer, mme_tree) + mme_tree:append_text(": null") + mme_tree:set_len(0) +end + +local function dissect_nw_stats_cnf_v2(buffer, mme_tree) + mme_tree:add_le(pf.num_stas, buffer(5, 1)) + local num_stas = f.num_stas()() + local i = 6 + for j = 1, num_stas do + local sta_tree = mme_tree:add(buffer(i, 10), "Station " .. j) + sta_tree:add(pf.sta_dest_addr, buffer(i, 6)) + sta_tree:add_le(pf.sta_tx_rate_v2, buffer(i + 6, 2)) + sta_tree:add_le(pf.sta_rx_rate_v2, buffer(i + 8, 2)) + i = i + 10 + end + mme_tree:set_len(i - 5) +end + +local function dissect_sta_cap_req(buffer, mme_tree) + mme_tree:append_text(": null") + mme_tree:set_len(0) +end + +local function dissect_sta_cap_cnf(buffer, mme_tree) + mme_tree:add_le(pf.homeplug_av_version, buffer(5, 1)) + mme_tree:add(pf.mac_addr, buffer(6, 6)) + local oui_tree = mme_tree:add(pf.oui, buffer(12, 3)) + local manufacturer = ouis[f.oui().label] + if manufacturer ~= nil then + oui_tree:append_text(" (" .. manufacturer .. ")") + end + mme_tree:add_le(pf.capability_auto_connect, buffer(15, 1)) + mme_tree:add_le(pf.capability_smoothing, buffer(16, 1)) + mme_tree:add_le(pf.capability_cco, buffer(17, 1)) + mme_tree:add_le(pf.capability_pco, buffer(18, 1)) + mme_tree:add_le(pf.capability_bcco, buffer(19, 1)) + mme_tree:add_le(pf.capability_soft_handover, buffer(20, 1)) + mme_tree:add_le(pf.capability_two_symbol_fc, buffer(21, 1)) + do + local range = buffer(22, 2) + mme_tree:add_le(pf.max_frame_len, range, to_frame_length_string(range)) + end + mme_tree:add_le(pf.capability_homeplug_1_1, buffer(24, 1)) + mme_tree:add_le(pf.interop_homeplug_1_0, buffer(25, 1)) + mme_tree:add_le(pf.capability_regulatory, buffer(26, 1)) + mme_tree:add_le(pf.capability_bidir_burst, buffer(27, 1)) + mme_tree:add_le(pf.implementation_version, buffer(28, 2)) + mme_tree:set_len(25) -- 25=28+2-5 +end + +local function dissect_sta_identify_req(buffer, mme_tree) + mme_tree:append_text(": null") + mme_tree:set_len(0) +end + +local function dissect_sta_identify_cnf(buffer, mme_tree) + mme_tree:add_le(pf.capability_green_phy, buffer(5, 1)) + mme_tree:add_le(pf.capability_power_save, buffer(6, 1)) + mme_tree:add_le(pf.capability_gp_pref_alloc, buffer(7, 1)) + mme_tree:add_le(pf.capability_repeat_route, buffer(8, 1)) + mme_tree:add_le(pf.homeplug_av_station, buffer(9, 1)) + mme_tree:add_le(pf.extended_fields_len, buffer(10, 1)) + local homeplug_av_station = f.homeplug_av_station()() + if homeplug_av_station == 0x01 then + local extended_tree = mme_tree:add(buffer(11), "Extended Fields") + extended_tree:add_le(pf.ef_capability_mimo, buffer(11, 1)) + extended_tree:add_le(pf.ef_ext_freq_band, buffer(12, 1)) + extended_tree:add_le(pf.ef_immed_repeat, buffer(13, 1)) + extended_tree:add_le(pf.ef_short_delimiter, buffer(14, 1)) + extended_tree:add_le(pf.ef_min_tx_gil, buffer(15, 1)) + extended_tree:add_le(pf.ef_min_rx_gil, buffer(16, 1)) + do + local range = buffer(17, 2) + extended_tree:add(pf.ef_min_carr_freq, range, to_frequency_string(range)) + end + do + local range = buffer(19, 2) + extended_tree:add(pf.ef_max_carr_freq, range, to_frequency_string(range)) + end + extended_tree:add_le(pf.ef_eebtm, buffer(21, 1)) + do + local range = buffer(22, 1) + local value = range:le_uint() + if value < 2 then + extended_tree:add_le(pf.ef_max_pb_sym_enum, range) + else + extended_tree:add_le(pf.ef_max_pb_sym, range) + end + end + extended_tree:add_le(pf.ef_mimo_power, buffer(23, 1)) + extended_tree:add_le(pf.ef_frame_256, buffer(24, 1)) + extended_tree:add_le(pf.ef_vsinfo_len, buffer(25, 2)) + local vsinfo_len = f.ef_vsinfo_len()() + if vsinfo_len ~= 0 then + local vsinfo_tree = extended_tree:add(buffer(27), "Vendor-Specific Information") + local oui_tree = vsinfo_tree:add(pf.ef_vs_oui, buffer(27, 3)) + local manufacturer = ouis[f.ef_vs_oui().label] + if manufacturer ~= nil then + oui_tree:append_text(" (" .. manufacturer .. ")") + end + vsinfo_tree:add(pf.ef_vs_vendor_defined, buffer(30)) + end + end +end + +local function dissect_homeplug_av_mme_v1(buffer, mme_tree) + if mmtype == MMTYPE_DISCOVER_LIST_REQ then + dissect_discover_list_req(buffer, mme_tree) + elseif mmtype == MMTYPE_DISCOVER_LIST_CNF then + dissect_discover_list_cnf(buffer, mme_tree) + elseif mmtype == MMTYPE_STA_CAP_REQ then + dissect_sta_cap_req(buffer, mme_tree) + elseif mmtype == MMTYPE_STA_CAP_CNF then + dissect_sta_cap_cnf(buffer, mme_tree) + elseif mmtype == MMTYPE_NW_STATS_REQ then + dissect_nw_stats_req_v1(buffer, mme_tree) + elseif mmtype == MMTYPE_NW_STATS_CNF then + dissect_nw_stats_cnf_v1(buffer, mme_tree) + elseif mmtype == MMTYPE_STA_IDENTIFY_REQ then + dissect_sta_identify_req(buffer, mme_tree) + elseif mmtype == MMTYPE_STA_IDENTIFY_CNF then + dissect_sta_identify_cnf(buffer, mme_tree) + elseif mmtype == MMTYPE_ERROR_IND then + dissect_error_ind(buffer, mme_tree) + else + mme_tree:add_proto_expert_info(ef.unexpected_mmv_mmtype) + end +end + +local function dissect_homeplug_av_mme_v2(buffer, mme_tree) + if mmtype == MMTYPE_NW_STATS_REQ then + dissect_nw_stats_req_v2(buffer, mme_tree) + elseif mmtype == MMTYPE_NW_STATS_CNF then + dissect_nw_stats_cnf_v2(buffer, mme_tree) + else + mme_tree:add_proto_expert_info(ef.unexpected_mmv_mmtype) + end +end + +local function update_packet_info(pinfo) + pinfo.cols.protocol = p_homeplug_av.name + pinfo.cols.info:set(mmtypes[mmtype]) +end + +function p_homeplug_av.dissector(buffer, pinfo, tree) + buffer_len = buffer:len() + if buffer_len < 46 then return end + + local protocol_tree = tree:add(p_homeplug_av, buffer(), "HomePlug AV Protocol") + + protocol_tree:add_le(pf.mmv, buffer(0, 1)) + local mmtype_tree = protocol_tree:add_le(pf.mmtype, buffer(1, 2)) + mmtype_tree:add_le(pf.mmtype_msbs, buffer(1, 2)) + mmtype_tree:add_le(pf.mmtype_lsbs, buffer(1, 2)) + + mmtype = f.mmtype()() + mmv = f.mmv()() + + if mmv > 2 then + protocol_tree:add_proto_expert_info(ef.invalid_mmv) + return + end + + if mmtypes[mmtype] == nil then + protocol_tree:add_proto_expert_info(ef.unknown_mmtype) + return + end + + update_packet_info(pinfo) + + do + local fmi_tree = protocol_tree:add(pf.fmi, buffer(3, 2)) + fmi_tree:add(pf.fmi_nf_mi, buffer(3, 1)) + fmi_tree:add(pf.fmi_fn_mi, buffer(3, 1)) + fmi_tree:add(pf.fmi_fmsn, buffer(4, 1)) + end + + local mme_tree = protocol_tree:add(buffer(5), "Management Message Entry") + + if mmv == 2 then + dissect_homeplug_av_mme_v2(buffer, mme_tree) + elseif mmv == 1 then + dissect_homeplug_av_mme_v1(buffer, mme_tree) + else + mme_tree:add_proto_expert_info(ef.unexpected_mmv) + end +end + +local dt_ethertype = DissectorTable.get("ethertype") +dt_ethertype:add(ETHERTYPE_HOMEPLUGAV, p_homeplug_av) diff --git a/dissectors/hotrod/LICENSE b/dissectors/hotrod/LICENSE new file mode 100644 index 0000000..294cb92 --- /dev/null +++ b/dissectors/hotrod/LICENSE @@ -0,0 +1,201 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2026 Rigazilla + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dissectors/hotrod/README.md b/dissectors/hotrod/README.md new file mode 100644 index 0000000..1404fdb --- /dev/null +++ b/dissectors/hotrod/README.md @@ -0,0 +1,53 @@ +# Infinispan Hot Rod (protocole 4.0 / 4.1) + +Dissecteur Wireshark Lua du protocole binaire **Hot Rod** d'Infinispan +(grille de données / cache distribué), versions 4.0 (Infinispan 14.0+) et +4.1 (Infinispan 15.1+). D'après l'amont, 124 des 127 opérations sont +décodées : opérations de cache (GET, PUT, REMOVE, REPLACE, conditionnelles, +en masse), statistiques, itération, compteurs, multimaps, flux (4.1), +transactions XA, authentification SASL, écouteurs clients et filtres de +Bloom, requêtes Ickle et scripts, événements, erreurs. Entiers variables +(vInt / vLong, ZigZag), types de média, topologie, métadonnées des +entrées, et association requête / réponse avec liens entre trames. + +Port TCP 11222 et heuristique TCP (tous ports). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/rigazilla/hotrod-dissector (fichier `src/hotrod.lua`, dossier `schemas/`) | +| Commit importé | `19c62707b03503efb34ba8b266c10c5d91ea63e1` du 08/05/2026 (branche `main`, dernier commit, qui est aussi la dernière modification de `hotrod.lua`) | +| Licence amont | Apache-2.0 (fichier `LICENSE`, copié ici ; README : « licensed under the Apache License 2.0 ») ; le script n'a pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Hot Rod / Infinispan natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `hotrod.lua` | Protocole `hotrod` sur TCP 11222 + heuristique TCP | +| `schemas/hotrod40.ksy`, `schemas/hotrod30.ksy` | Schémas Kaitai Struct du protocole (4.0 et 3.0), documentation de référence | +| `schemas/README.md` | Notice amont des schémas | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête du `.lua` (schémas copiés sans +modification). La capture d'écran amont (550 Ko) n'est pas importée. + +## Utilisation + +Copier `hotrod.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua +(Ctrl+Maj+L), puis filtrer avec `hotrod` (ex. `hotrod.magic == 0xa0` pour +les requêtes, `hotrod.req.opcode == 0x03` pour les GET). + +## Remarques + +- Seules les versions 4.0 et 4.1 sont décodées (le schéma 3.0 n'est que + de la documentation) ; hypothèse amont : intelligence client `0x03` + (HASH_DISTRIBUTION_AWARE). +- Pas de réassemblage TCP (aucun `desegment_len`) : les messages coupés + sur plusieurs segments ne sont pas recomposés. Les connexions TLS ne sont + pas lisibles. +- L'heuristique peut ralentir les grosses captures (note amont). Utilise + `bit.*` (bibliothèque `bit` fournie par Wireshark 4.4 et plus). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/hotrod/hotrod.lua b/dissectors/hotrod/hotrod.lua new file mode 100644 index 0000000..491e1b6 --- /dev/null +++ b/dissectors/hotrod/hotrod.lua @@ -0,0 +1,3719 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/rigazilla/hotrod-dissector (src/hotrod.lua), +-- commit 19c62707b03503efb34ba8b266c10c5d91ea63e1 du 08/05/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- Wireshark Dissector for Infinispan Hot Rod Protocol 4.0+ +-- Based on hotrod40.ksy schema and protocol documentation +-- +-- Installation: +-- Linux/macOS: ~/.local/lib/wireshark/plugins/hotrod.lua +-- Windows: %APPDATA%\Wireshark\plugins\hotrod.lua +-- Then press Ctrl+Shift+L in Wireshark to reload +-- +-- Protocol versions supported: +-- - 4.0 (0x28 = 40 decimal) - Infinispan 14.0+ +-- - 4.1 (0x29 = 41 decimal) - Infinispan 15.1+ +-- +-- Assumptions: +-- - Client intelligence: 0x03 (HASH_DISTRIBUTION_AWARE) + +-- ============================================================================ +-- Protocol Declaration +-- ============================================================================ + +local hotrod_protocol = Proto("hotrod", "Infinispan Hot Rod Protocol") + +-- ============================================================================ +-- Helper Functions for Variable-Length Integer Encoding +-- ============================================================================ + +-- Read unsigned variable-length integer (1-5 bytes for vint) +-- Returns: value, bytes_read +function read_vint(tvb, offset) + if offset >= tvb:len() then + return nil, 0 + end + + local value = 0 + local shift = 0 + local bytes_read = 0 + + while bytes_read < 5 do -- max 5 bytes for vint + if offset + bytes_read >= tvb:len() then + return nil, 0 + end + + local b = tvb(offset + bytes_read, 1):uint() + value = bit.bor(value, bit.lshift(bit.band(b, 0x7F), shift)) + bytes_read = bytes_read + 1 + shift = shift + 7 + + -- Check continuation bit (high bit) + if bit.band(b, 0x80) == 0 then + break + end + end + + return value, bytes_read +end + +-- Read unsigned variable-length long (1-9 bytes for vlong) +-- Returns: value, bytes_read +function read_vlong(tvb, offset) + if offset >= tvb:len() then + return nil, 0 + end + + local value = 0 + local shift = 0 + local bytes_read = 0 + + while bytes_read < 9 do -- max 9 bytes for vlong + if offset + bytes_read >= tvb:len() then + return nil, 0 + end + + local b = tvb(offset + bytes_read, 1):uint() + value = value + bit.lshift(bit.band(b, 0x7F), shift) + bytes_read = bytes_read + 1 + shift = shift + 7 + + -- Check continuation bit (high bit) + if bit.band(b, 0x80) == 0 then + break + end + end + + return value, bytes_read +end + +-- Read signed variable-length integer with ZigZag encoding +-- Returns: signed_value, bytes_read +function read_signed_vint(tvb, offset) + local unsigned_value, bytes_read = read_vint(tvb, offset) + if unsigned_value == nil then + return nil, 0 + end + + -- ZigZag decode: (n >>> 1) ^ -(n & 1) + local signed_value = bit.bxor(bit.rshift(unsigned_value, 1), -bit.band(unsigned_value, 1)) + + return signed_value, bytes_read +end + +-- Read length-prefixed bytes +-- Returns: tvb_range, total_bytes_read (including length prefix) +function read_lp_bytes(tvb, offset) + local length, len_bytes = read_vint(tvb, offset) + if length == nil then + return nil, 0 + end + + if offset + len_bytes + length > tvb:len() then + return nil, 0 + end + + local data_range = tvb(offset + len_bytes, length) + return data_range, len_bytes + length +end + +-- Read length-prefixed UTF-8 string +-- Returns: string_value, total_bytes_read +function read_lp_string(tvb, offset) + local data_range, total_bytes = read_lp_bytes(tvb, offset) + if data_range == nil then + return nil, 0 + end + + local str = data_range:string() + return str, total_bytes +end + +-- Helper: Add lp_bytes to tree with length field displayed +-- Also adds string representation if string_field is provided +-- Returns: offset after data +function add_lp_bytes_with_length(tree, tvb, offset, bytes_field, string_field, length_field, label) + local length, len_bytes = read_vint(tvb, offset) + if length == nil then + return offset + end + + if offset + len_bytes + length > tvb:len() then + return offset + end + + -- Add length field + local length_item = tree:add(length_field, tvb(offset, len_bytes)) + length_item:append_text(string.format(" (%d bytes)", length)) + + -- Add data field as bytes (hex) + tree:add(bytes_field, tvb(offset + len_bytes, length)) + + -- Add data field as string (text) if string_field provided + if string_field ~= nil then + local str_data = tvb(offset + len_bytes, length):string() + tree:add(string_field, tvb(offset + len_bytes, length), str_data) + end + + return offset + len_bytes + length +end + +-- Helper: Add lp_string to tree with length field displayed +-- Returns: offset after string +function add_lp_string_with_length(tree, tvb, offset, field, length_field, label) + local length, len_bytes = read_vint(tvb, offset) + if length == nil then + return offset + end + + if offset + len_bytes + length > tvb:len() then + return offset + end + + -- Add length field + local length_item = tree:add(length_field, tvb(offset, len_bytes)) + length_item:append_text(string.format(" (%d bytes)", length)) + + -- Add string field + local str = tvb(offset + len_bytes, length):string() + tree:add(field, tvb(offset + len_bytes, length), str) + + return offset + len_bytes + length +end + +-- ============================================================================ +-- Protocol Field Definitions +-- ============================================================================ + +-- Magic byte +local f_magic = ProtoField.uint8("hotrod.magic", "Magic Byte", base.HEX) + +-- Header containers (for tree organization) +local f_req_header = ProtoField.none("hotrod.req.header", "Request Header") +local f_resp_header = ProtoField.none("hotrod.resp.header", "Response Header") + +-- Request Header Fields +local f_req_message_id = ProtoField.uint64("hotrod.req.message_id", "Message ID", base.DEC) +local f_req_version = ProtoField.uint8("hotrod.req.version", "Protocol Version", base.DEC) +local f_req_opcode = ProtoField.uint8("hotrod.req.opcode", "Request Opcode", base.HEX) +local f_req_cache_name = ProtoField.string("hotrod.req.cache_name", "Cache Name") +local f_req_flags = ProtoField.uint64("hotrod.req.flags", "Flags", base.HEX) +local f_req_client_intelligence = ProtoField.uint8("hotrod.req.client_intelligence", "Client Intelligence", base.HEX) +local f_req_topology_id = ProtoField.uint64("hotrod.req.topology_id", "Topology ID", base.DEC) + +-- Response Header Fields +local f_resp_message_id = ProtoField.uint64("hotrod.resp.message_id", "Message ID", base.DEC) +local f_resp_opcode = ProtoField.uint8("hotrod.resp.opcode", "Response Opcode", base.HEX) +local f_resp_status = ProtoField.uint8("hotrod.resp.status", "Status", base.HEX) +local f_resp_topology_marker = ProtoField.uint8("hotrod.resp.topology_marker", "Topology Change Marker", base.HEX) +local f_resp_in_frame = ProtoField.framenum("hotrod.resp.request_in", "Request in Frame", base.NONE) +local f_req_in_frame = ProtoField.framenum("hotrod.req.response_in", "Response in Frame", base.NONE) + +-- Topology Change Fields +local f_topology_id = ProtoField.uint64("hotrod.topology.id", "Topology ID", base.DEC) +local f_topology_num_servers = ProtoField.uint64("hotrod.topology.num_servers", "Number of Servers", base.DEC) +local f_topology_server_host = ProtoField.string("hotrod.topology.server.host", "Server Host") +local f_topology_server_port = ProtoField.uint16("hotrod.topology.server.port", "Server Port", base.DEC) +local f_topology_hash_function = ProtoField.uint8("hotrod.topology.hash_function", "Hash Function Version", base.DEC) +local f_topology_num_segments = ProtoField.uint64("hotrod.topology.num_segments", "Number of Segments", base.DEC) +local f_topology_segment_owners = ProtoField.uint8("hotrod.topology.segment.num_owners", "Number of Owners", base.DEC) +local f_topology_owner_index = ProtoField.uint8("hotrod.topology.segment.owner", "Owner Index", base.DEC) + +-- MediaType Fields (no f_media_type - we'll create the tree directly) +local f_media_type_indicator = ProtoField.uint8("hotrod.media_type.indicator", "Type Indicator", base.HEX) +local f_media_type_predefined_id = ProtoField.uint64("hotrod.media_type.predefined_id", "Predefined ID", base.DEC) +local f_media_type_custom = ProtoField.string("hotrod.media_type.custom", "Custom Type") +local f_media_type_param_count = ProtoField.uint64("hotrod.media_type.param_count", "Parameter Count", base.DEC) +local f_media_type_param_key = ProtoField.string("hotrod.media_type.param.key", "Parameter Key") +local f_media_type_param_value = ProtoField.string("hotrod.media_type.param.value", "Parameter Value") + +-- Other Params Fields (Protocol 4.0+) +local f_other_param_count = ProtoField.uint64("hotrod.other_param_count", "Other Parameter Count", base.DEC) +local f_other_param_key = ProtoField.string("hotrod.other_param.key", "Parameter Key") +local f_other_param_value = ProtoField.bytes("hotrod.other_param.value", "Parameter Value") + +-- Body Fields +local f_key = ProtoField.bytes("hotrod.key", "Key (hex)") +local f_key_string = ProtoField.string("hotrod.key.string", "Key (string)") +local f_key_length = ProtoField.uint64("hotrod.key.length", "Key Length", base.DEC) +local f_value = ProtoField.bytes("hotrod.value", "Value (hex)") +local f_value_string = ProtoField.string("hotrod.value.string", "Value (string)") +local f_value_length = ProtoField.uint64("hotrod.value.length", "Value Length", base.DEC) +local f_string_length = ProtoField.uint64("hotrod.string.length", "String Length", base.DEC) +local f_bytes_length = ProtoField.uint64("hotrod.bytes.length", "Bytes Length", base.DEC) +local f_time_units = ProtoField.uint8("hotrod.time_units", "Time Units", base.HEX) +local f_lifespan = ProtoField.uint64("hotrod.lifespan", "Lifespan", base.DEC) +local f_max_idle = ProtoField.uint64("hotrod.max_idle", "Max Idle", base.DEC) + +-- Entry Metadata Fields (Protocol 4.0+) +local f_metadata_flag = ProtoField.uint8("hotrod.metadata.flag", "Metadata Flag", base.HEX) +local f_metadata_created = ProtoField.int64("hotrod.metadata.created", "Created", base.DEC) +local f_metadata_lifespan = ProtoField.uint64("hotrod.metadata.lifespan", "Lifespan", base.DEC) +local f_metadata_last_used = ProtoField.int64("hotrod.metadata.last_used", "Last Used", base.DEC) +local f_metadata_max_idle = ProtoField.uint64("hotrod.metadata.max_idle", "Max Idle", base.DEC) +local f_metadata_version = ProtoField.int64("hotrod.metadata.version", "Entry Version", base.DEC) + +-- PING Response Fields +local f_ping_key_type = ProtoField.none("hotrod.ping.key_type", "Key Type") +local f_ping_value_type = ProtoField.none("hotrod.ping.value_type", "Value Type") +local f_ping_server_version = ProtoField.uint8("hotrod.ping.server_version", "Server Version", base.DEC) +local f_ping_op_count = ProtoField.uint64("hotrod.ping.op_count", "Supported Operation Count", base.DEC) +local f_ping_supported_op = ProtoField.uint16("hotrod.ping.supported_op", "Supported Opcode", base.HEX) + +-- Bulk Operation Fields +local f_entry_count = ProtoField.uint64("hotrod.entry_count", "Entry Count", base.DEC) +local f_key_count = ProtoField.uint64("hotrod.key_count", "Key Count", base.DEC) +local f_bulk_more = ProtoField.uint8("hotrod.bulk.more", "More Entries", base.DEC) + +-- Utility Operation Fields +local f_stat_count = ProtoField.uint64("hotrod.stats.count", "Stat Count", base.DEC) +local f_stat_name = ProtoField.string("hotrod.stats.name", "Stat Name") +local f_stat_value = ProtoField.string("hotrod.stats.value", "Stat Value") +local f_cache_size = ProtoField.uint64("hotrod.size", "Cache Size", base.DEC) + +-- Iteration Operation Fields +local f_iteration_id = ProtoField.bytes("hotrod.iteration.id", "Iteration ID (hex)") +local f_iteration_id_string = ProtoField.string("hotrod.iteration.id.string", "Iteration ID (string)") +local f_iteration_id_length = ProtoField.uint64("hotrod.iteration.id.length", "Iteration ID Length", base.DEC) +local f_iteration_segments_size = ProtoField.int64("hotrod.iteration.segments_size", "Segments Size", base.DEC) +local f_iteration_segment_id = ProtoField.uint32("hotrod.iteration.segment_id", "Segment ID", base.DEC) +local f_iteration_filter_size = ProtoField.int64("hotrod.iteration.filter_size", "Filter Size", base.DEC) +local f_iteration_filter = ProtoField.string("hotrod.iteration.filter", "Filter Converter") +local f_iteration_param_count = ProtoField.uint8("hotrod.iteration.param_count", "Parameter Count", base.DEC) +local f_iteration_param = ProtoField.bytes("hotrod.iteration.param", "Parameter") +local f_iteration_batch_size = ProtoField.uint64("hotrod.iteration.batch_size", "Batch Size", base.DEC) +local f_iteration_metadata_flag = ProtoField.uint8("hotrod.iteration.metadata_flag", "Include Metadata", base.DEC) +local f_iteration_finished_segments_size = ProtoField.uint64("hotrod.iteration.finished_segments_size", "Finished Segments Size", base.DEC) +local f_iteration_finished_segment = ProtoField.uint32("hotrod.iteration.finished_segment", "Finished Segment", base.DEC) +local f_iteration_num_projections = ProtoField.uint64("hotrod.iteration.num_projections", "Number of Value Projections", base.DEC) +local f_iteration_metadata_present = ProtoField.uint8("hotrod.iteration.metadata_present", "Metadata Present", base.DEC) +local f_iteration_expiration_flag = ProtoField.uint8("hotrod.iteration.expiration_flag", "Expiration Flag", base.HEX) + +-- Counter Operation Fields +local f_counter_name = ProtoField.string("hotrod.counter.name", "Counter Name") +local f_counter_name_length = ProtoField.uint64("hotrod.counter.name.length", "Counter Name Length", base.DEC) +local f_counter_config_flags = ProtoField.uint8("hotrod.counter.config.flags", "Configuration Flags", base.HEX) +local f_counter_concurrency = ProtoField.uint64("hotrod.counter.config.concurrency", "Concurrency Level", base.DEC) +local f_counter_lower_bound = ProtoField.int64("hotrod.counter.config.lower_bound", "Lower Bound", base.DEC) +local f_counter_upper_bound = ProtoField.int64("hotrod.counter.config.upper_bound", "Upper Bound", base.DEC) +local f_counter_initial_value = ProtoField.int64("hotrod.counter.config.initial_value", "Initial Value", base.DEC) +local f_counter_value = ProtoField.int64("hotrod.counter.value", "Counter Value", base.DEC) +local f_counter_delta = ProtoField.int64("hotrod.counter.delta", "Delta", base.DEC) +local f_counter_expect = ProtoField.int64("hotrod.counter.expect", "Expected Value", base.DEC) +local f_counter_update = ProtoField.int64("hotrod.counter.update", "Update Value", base.DEC) + +-- Multimap Operation Fields +local f_multimap_support_duplicates = ProtoField.uint8("hotrod.multimap.support_duplicates", "Support Duplicates", base.DEC) +local f_multimap_value_count = ProtoField.uint64("hotrod.multimap.value_count", "Value Count", base.DEC) +local f_multimap_result = ProtoField.uint8("hotrod.multimap.result", "Result", base.DEC) + +-- Stream Operation Fields +local f_stream_id = ProtoField.int32("hotrod.stream.id", "Stream ID", base.DEC) +local f_stream_batch_size = ProtoField.uint64("hotrod.stream.batch_size", "Batch Size", base.DEC) +local f_stream_complete = ProtoField.uint8("hotrod.stream.complete", "Complete", base.DEC) +local f_stream_condition_version = ProtoField.int64("hotrod.stream.condition_version", "Condition Version", base.DEC) +local f_stream_chunk = ProtoField.bytes("hotrod.stream.chunk", "Data Chunk") + +-- Transaction Operation Fields +local f_tx_xid_format = ProtoField.uint64("hotrod.tx.xid.format_id", "XID Format ID", base.DEC) +local f_tx_xid_global_length = ProtoField.uint8("hotrod.tx.xid.global_length", "Global TX ID Length", base.DEC) +local f_tx_xid_global = ProtoField.bytes("hotrod.tx.xid.global", "Global TX ID") +local f_tx_xid_branch_length = ProtoField.uint8("hotrod.tx.xid.branch_length", "Branch Qualifier Length", base.DEC) +local f_tx_xid_branch = ProtoField.bytes("hotrod.tx.xid.branch", "Branch Qualifier") +local f_tx_one_phase = ProtoField.uint8("hotrod.tx.one_phase", "One Phase Commit", base.DEC) +local f_tx_recoverable = ProtoField.uint8("hotrod.tx.recoverable", "Recoverable", base.DEC) +local f_tx_timeout = ProtoField.int64("hotrod.tx.timeout", "Timeout", base.DEC) +local f_tx_num_keys = ProtoField.uint64("hotrod.tx.num_keys", "Number of Keys", base.DEC) +local f_tx_control_byte = ProtoField.uint8("hotrod.tx.control_byte", "Control Byte", base.HEX) +local f_tx_num_xids = ProtoField.uint64("hotrod.tx.num_xids", "Number of XIDs", base.DEC) + +-- Event Fields +local f_event_listener_id = ProtoField.bytes("hotrod.event.listener_id", "Listener ID (hex)") +local f_event_listener_id_string = ProtoField.string("hotrod.event.listener_id.string", "Listener ID (string)") +local f_event_listener_id_length = ProtoField.uint64("hotrod.event.listener_id.length", "Listener ID Length", base.DEC) +local f_event_custom_marker = ProtoField.uint8("hotrod.event.custom_marker", "Custom Marker", base.DEC) +local f_event_command_retried = ProtoField.uint8("hotrod.event.command_retried", "Command Retried", base.DEC) +local f_event_custom_data = ProtoField.bytes("hotrod.event.custom_data", "Custom Data") + +-- Error Response Fields +local f_error_message = ProtoField.string("hotrod.error.message", "Error Message") +local f_error_message_length = ProtoField.uint64("hotrod.error.message.length", "Error Message Length", base.DEC) + +-- Query Operation Fields +local f_query_payload = ProtoField.bytes("hotrod.query.payload", "Query Payload (hex)") +local f_query_payload_length = ProtoField.uint64("hotrod.query.payload.length", "Query Payload Length", base.DEC) +local f_query_response_payload = ProtoField.bytes("hotrod.query.response_payload", "Response Payload (hex)") +local f_query_response_payload_length = ProtoField.uint64("hotrod.query.response_payload.length", "Response Payload Length", base.DEC) + +-- Exec Operation Fields +local f_exec_script_name = ProtoField.string("hotrod.exec.script_name", "Script Name") +local f_exec_script_name_length = ProtoField.uint64("hotrod.exec.script_name.length", "Script Name Length", base.DEC) +local f_exec_param_count = ProtoField.uint64("hotrod.exec.param_count", "Parameter Count", base.DEC) +local f_exec_param_name = ProtoField.string("hotrod.exec.param.name", "Parameter Name") +local f_exec_param_name_length = ProtoField.uint64("hotrod.exec.param.name.length", "Parameter Name Length", base.DEC) +local f_exec_param_value = ProtoField.bytes("hotrod.exec.param.value", "Parameter Value (hex)") +local f_exec_param_value_string = ProtoField.string("hotrod.exec.param.value.string", "Parameter Value (string)") +local f_exec_param_value_length = ProtoField.uint64("hotrod.exec.param.value.length", "Parameter Value Length", base.DEC) +local f_exec_result = ProtoField.bytes("hotrod.exec.result", "Result (hex)") +local f_exec_result_string = ProtoField.string("hotrod.exec.result.string", "Result (string)") +local f_exec_result_length = ProtoField.uint64("hotrod.exec.result.length", "Result Length", base.DEC) + +-- Authentication Operation Fields +local f_auth_mech_count = ProtoField.uint64("hotrod.auth.mech_count", "Mechanism Count", base.DEC) +local f_auth_mech = ProtoField.string("hotrod.auth.mechanism", "SASL Mechanism") +local f_auth_mech_length = ProtoField.uint64("hotrod.auth.mechanism.length", "Mechanism Length", base.DEC) +local f_auth_response_data = ProtoField.bytes("hotrod.auth.response_data", "Response Data (hex)") +local f_auth_response_data_string = ProtoField.string("hotrod.auth.response_data.string", "Response Data (string)") +local f_auth_response_data_length = ProtoField.uint64("hotrod.auth.response_data.length", "Response Data Length", base.DEC) +local f_auth_completed = ProtoField.uint8("hotrod.auth.completed", "Authentication Completed", base.DEC) +local f_auth_challenge_data = ProtoField.bytes("hotrod.auth.challenge_data", "Challenge Data (hex)") +local f_auth_challenge_data_string = ProtoField.string("hotrod.auth.challenge_data.string", "Challenge Data (string)") +local f_auth_challenge_data_length = ProtoField.uint64("hotrod.auth.challenge_data.length", "Challenge Data Length", base.DEC) + +-- Transaction Operation Fields (additional) +local f_tx_xa_return_code = ProtoField.int32("hotrod.tx.xa_return_code", "XA Return Code", base.DEC) + +-- Client Listener Operation Fields +local f_listener_id = ProtoField.bytes("hotrod.listener.id", "Listener ID (hex)") +local f_listener_id_string = ProtoField.string("hotrod.listener.id.string", "Listener ID (string)") +local f_listener_id_length = ProtoField.uint64("hotrod.listener.id.length", "Listener ID Length", base.DEC) +local f_listener_include_state = ProtoField.uint8("hotrod.listener.include_state", "Include State", base.DEC) +local f_listener_filter_factory = ProtoField.string("hotrod.listener.filter_factory", "Filter Factory Name") +local f_listener_filter_factory_length = ProtoField.uint64("hotrod.listener.filter_factory.length", "Filter Factory Name Length", base.DEC) +local f_listener_converter_factory = ProtoField.string("hotrod.listener.converter_factory", "Converter Factory Name") +local f_listener_converter_factory_length = ProtoField.uint64("hotrod.listener.converter_factory.length", "Converter Factory Name Length", base.DEC) +local f_listener_use_raw_data = ProtoField.uint8("hotrod.listener.use_raw_data", "Use Raw Data", base.DEC) +local f_listener_event_interests = ProtoField.uint64("hotrod.listener.event_interests", "Event Type Interests", base.HEX) +local f_listener_param_count = ProtoField.uint8("hotrod.listener.param_count", "Parameter Count", base.DEC) +local f_listener_param = ProtoField.bytes("hotrod.listener.param", "Parameter (hex)") +local f_listener_param_string = ProtoField.string("hotrod.listener.param.string", "Parameter (string)") +local f_listener_param_length = ProtoField.uint64("hotrod.listener.param.length", "Parameter Length", base.DEC) +local f_bloom_filter_bit_size = ProtoField.uint64("hotrod.bloom.bit_size", "Bloom Filter Bit Size", base.DEC) +local f_bloom_filter_bits = ProtoField.bytes("hotrod.bloom.bits", "Bloom Filter Bits (hex)") +local f_bloom_filter_bits_length = ProtoField.uint64("hotrod.bloom.bits.length", "Bloom Filter Bits Length", base.DEC) + +-- Counter Names Response Fields +local f_counter_names_count = ProtoField.uint64("hotrod.counter.names.count", "Counter Names Count", base.DEC) + +-- Register all fields +hotrod_protocol.fields = { + f_magic, + f_req_header, f_resp_header, + f_req_message_id, f_req_version, f_req_opcode, f_req_cache_name, + f_req_flags, f_req_client_intelligence, f_req_topology_id, + f_media_type_indicator, f_media_type_predefined_id, f_media_type_custom, + f_media_type_param_count, f_media_type_param_key, f_media_type_param_value, + f_other_param_count, f_other_param_key, f_other_param_value, + f_resp_message_id, f_resp_opcode, f_resp_status, f_resp_topology_marker, + f_resp_in_frame, f_req_in_frame, + f_topology_id, f_topology_num_servers, f_topology_server_host, f_topology_server_port, + f_topology_hash_function, f_topology_num_segments, f_topology_segment_owners, f_topology_owner_index, + f_key, f_key_string, f_key_length, f_value, f_value_string, f_value_length, f_string_length, f_bytes_length, + f_time_units, f_lifespan, f_max_idle, + f_metadata_flag, f_metadata_created, f_metadata_lifespan, f_metadata_last_used, + f_metadata_max_idle, f_metadata_version, + f_ping_key_type, f_ping_value_type, f_ping_server_version, f_ping_op_count, f_ping_supported_op, + f_entry_count, f_key_count, f_bulk_more, + f_stat_count, f_stat_name, f_stat_value, f_cache_size, + f_iteration_id, f_iteration_id_string, f_iteration_id_length, + f_iteration_segments_size, f_iteration_segment_id, + f_iteration_filter_size, f_iteration_filter, f_iteration_param_count, f_iteration_param, + f_iteration_batch_size, f_iteration_metadata_flag, + f_iteration_finished_segments_size, f_iteration_finished_segment, + f_iteration_num_projections, f_iteration_metadata_present, f_iteration_expiration_flag, + f_counter_name, f_counter_name_length, f_counter_config_flags, + f_counter_concurrency, f_counter_lower_bound, f_counter_upper_bound, f_counter_initial_value, + f_counter_value, f_counter_delta, f_counter_expect, f_counter_update, + f_multimap_support_duplicates, f_multimap_value_count, f_multimap_result, + f_stream_id, f_stream_batch_size, f_stream_complete, f_stream_condition_version, f_stream_chunk, + f_tx_xid_format, f_tx_xid_global_length, f_tx_xid_global, f_tx_xid_branch_length, f_tx_xid_branch, + f_tx_one_phase, f_tx_recoverable, f_tx_timeout, f_tx_num_keys, f_tx_control_byte, f_tx_num_xids, + f_event_listener_id, f_event_listener_id_string, f_event_listener_id_length, + f_event_custom_marker, f_event_command_retried, f_event_custom_data, + f_error_message, f_error_message_length, + f_query_payload, f_query_payload_length, f_query_response_payload, f_query_response_payload_length, + f_exec_script_name, f_exec_script_name_length, f_exec_param_count, + f_exec_param_name, f_exec_param_name_length, f_exec_param_value, f_exec_param_value_string, f_exec_param_value_length, + f_exec_result, f_exec_result_string, f_exec_result_length, + f_auth_mech_count, f_auth_mech, f_auth_mech_length, + f_auth_response_data, f_auth_response_data_string, f_auth_response_data_length, + f_auth_completed, f_auth_challenge_data, f_auth_challenge_data_string, f_auth_challenge_data_length, + f_tx_xa_return_code, + f_listener_id, f_listener_id_string, f_listener_id_length, + f_listener_include_state, f_listener_filter_factory, f_listener_filter_factory_length, + f_listener_converter_factory, f_listener_converter_factory_length, + f_listener_use_raw_data, f_listener_event_interests, + f_listener_param_count, f_listener_param, f_listener_param_string, f_listener_param_length, + f_bloom_filter_bit_size, f_bloom_filter_bits, f_bloom_filter_bits_length, + f_counter_names_count +} + +-- ============================================================================ +-- Opcode Mappings (Protocol 4.0+) +-- ============================================================================ + +local request_opcodes = { + [0x01] = "PUT", + [0x03] = "GET", + [0x05] = "PUT_IF_ABSENT", + [0x07] = "REPLACE", + [0x09] = "REPLACE_IF_UNMODIFIED", + [0x0B] = "REMOVE", + [0x0D] = "REMOVE_IF_UNMODIFIED", + [0x0F] = "CONTAINS_KEY", + [0x11] = "GET_WITH_VERSION", + [0x13] = "CLEAR", + [0x15] = "STATS", + [0x17] = "PING", + [0x19] = "BULK_GET", + [0x1B] = "GET_WITH_METADATA", + [0x1D] = "BULK_GET_KEYS", + [0x1F] = "QUERY", + [0x21] = "AUTH_MECH_LIST", + [0x23] = "AUTH", + [0x25] = "ADD_CLIENT_LISTENER", + [0x27] = "REMOVE_CLIENT_LISTENER", + [0x29] = "SIZE", + [0x2B] = "EXEC", + [0x2D] = "PUT_ALL", + [0x2F] = "GET_ALL", + [0x31] = "ITERATION_START", + [0x33] = "ITERATION_NEXT", + [0x35] = "ITERATION_END", + [0x3D] = "COMMIT", + [0x3F] = "ROLLBACK", + [0x41] = "ADD_BLOOM_FILTER_LISTENER", + [0x43] = "UPDATE_BLOOM_FILTER", + [0x4B] = "COUNTER_CREATE", + [0x4D] = "COUNTER_GET_CONFIGURATION", + [0x4F] = "COUNTER_IS_DEFINED", + [0x52] = "COUNTER_ADD_AND_GET", + [0x54] = "COUNTER_RESET", + [0x56] = "COUNTER_GET_VALUE", + [0x58] = "COUNTER_CAS", + [0x5A] = "COUNTER_ADD_LISTENER", + [0x5C] = "COUNTER_REMOVE_LISTENER", + [0x5E] = "COUNTER_REMOVE", + [0x67] = "MULTIMAP_GET", + [0x69] = "MULTIMAP_GET_WITH_METADATA", + [0x6B] = "MULTIMAP_PUT", + [0x6D] = "MULTIMAP_REMOVE_KEY", + [0x6F] = "MULTIMAP_REMOVE_ENTRY", + [0x71] = "MULTIMAP_SIZE", + [0x73] = "MULTIMAP_CONTAINS_ENTRY", + [0x75] = "MULTIMAP_CONTAINS_KEY", + [0x77] = "MULTIMAP_CONTAINS_VALUE", + [0x79] = "FORGET_TX", + [0x7B] = "FETCH_IN_DOUBT_TX", + [0x7D] = "PREPARE_V2", + [0x7F] = "COUNTER_GET_AND_SET", + [0xE5] = "GET_STREAM_END", + [0xE7] = "GET_STREAM_NEXT", + [0xE9] = "GET_STREAM_START", + [0xEB] = "PUT_STREAM_END", + [0xED] = "PUT_STREAM_NEXT", + [0xEF] = "PUT_STREAM_START" +} + +local response_opcodes = { + [0x02] = "PUT", + [0x04] = "GET", + [0x06] = "PUT_IF_ABSENT", + [0x08] = "REPLACE", + [0x0A] = "REPLACE_IF_UNMODIFIED", + [0x0C] = "REMOVE", + [0x0E] = "REMOVE_IF_UNMODIFIED", + [0x10] = "CONTAINS_KEY", + [0x12] = "GET_WITH_VERSION", + [0x14] = "CLEAR", + [0x16] = "STATS", + [0x18] = "PING", + [0x1A] = "BULK_GET", + [0x1C] = "GET_WITH_METADATA", + [0x1E] = "BULK_GET_KEYS", + [0x20] = "QUERY", + [0x22] = "AUTH_MECH_LIST", + [0x24] = "AUTH", + [0x26] = "ADD_CLIENT_LISTENER", + [0x28] = "REMOVE_CLIENT_LISTENER", + [0x2A] = "SIZE", + [0x2C] = "EXEC", + [0x2E] = "PUT_ALL", + [0x30] = "GET_ALL", + [0x32] = "ITERATION_START", + [0x34] = "ITERATION_NEXT", + [0x36] = "ITERATION_END", + [0x3E] = "COMMIT", + [0x40] = "ROLLBACK", + [0x42] = "ADD_BLOOM_FILTER_LISTENER", + [0x44] = "UPDATE_BLOOM_FILTER", + [0x4C] = "COUNTER_CREATE", + [0x4E] = "COUNTER_GET_CONFIGURATION", + [0x50] = "ERROR", + [0x51] = "COUNTER_IS_DEFINED", + [0x53] = "COUNTER_ADD_AND_GET", + [0x55] = "COUNTER_RESET", + [0x57] = "COUNTER_GET_VALUE", + [0x59] = "COUNTER_CAS", + [0x5B] = "COUNTER_ADD_LISTENER", + [0x5D] = "COUNTER_REMOVE_LISTENER", + [0x5F] = "COUNTER_REMOVE", + [0x60] = "CACHE_ENTRY_CREATED_EVENT", + [0x61] = "CACHE_ENTRY_MODIFIED_EVENT", + [0x62] = "CACHE_ENTRY_REMOVED_EVENT", + [0x63] = "CACHE_ENTRY_EXPIRED_EVENT", + [0x65] = "COUNTER_GET_NAMES", + [0x66] = "COUNTER_EVENT", + [0x68] = "MULTIMAP_GET", + [0x6A] = "MULTIMAP_GET_WITH_METADATA", + [0x6C] = "MULTIMAP_PUT", + [0x6E] = "MULTIMAP_REMOVE_KEY", + [0x70] = "MULTIMAP_REMOVE_ENTRY", + [0x72] = "MULTIMAP_SIZE", + [0x74] = "MULTIMAP_CONTAINS_ENTRY", + [0x76] = "MULTIMAP_CONTAINS_KEY", + [0x78] = "MULTIMAP_CONTAINS_VALUE", + [0x7A] = "FORGET_TX", + [0x7C] = "FETCH_TX_RECOVERY", + [0x7E] = "PREPARE_V2", + [0x80] = "COUNTER_GET_AND_SET", + [0xE4] = "GET_STREAM_END", + [0xE6] = "GET_STREAM_NEXT", + [0xE8] = "GET_STREAM_START", + [0xEA] = "PUT_STREAM_END", + [0xEC] = "PUT_STREAM_NEXT", + [0xEE] = "PUT_STREAM_START" +} + +local status_codes = { + [0x00] = "Success", + [0x01] = "Not Executed", + [0x02] = "Key Does Not Exist", + [0x03] = "Success With Previous", + [0x04] = "Not Executed With Previous", + [0x81] = "Invalid Magic or Message ID", + [0x82] = "Unknown Command", + [0x83] = "Unknown Version", + [0x84] = "Parse Error", + [0x85] = "Server Error", + [0x86] = "Command Timed Out", + [0x87] = "Node Suspected", + [0x88] = "Illegal Lifecycle State" +} + +local client_intelligence = { + [0x01] = "Basic", + [0x02] = "Topology Aware", + [0x03] = "Hash Distribution Aware" +} + +-- Predefined Media Type IDs (from MediaTypeIds.java) +local predefined_media_types = { + [1] = "application/x-java-object", + [2] = "application/json", + [3] = "application/octet-stream", + [4] = "application/pdf", + [5] = "application/rtf", + [6] = "application/zip", + [7] = "image/gif", + [8] = "image/jpeg", + [9] = "image/png", + [10] = "text/css", + [11] = "text/csv", + [12] = "application/x-protostream", + [13] = "text/plain", + [14] = "text/html", + [15] = "application/x-jboss-marshalling", + [17] = "application/unknown" +} + +-- Media type kind names +local media_type_kind_names = { + [0x00] = "None", + [0x01] = "Predefined", + [0x02] = "Custom" +} + +-- ============================================================================ +-- Conversation Tracking for Request-Response Correlation +-- ============================================================================ + +-- Table to track request-response pairs by frame number +-- request_to_response[frame_number] = response_frame +-- response_to_request[frame_number] = request_frame +local request_to_response = {} +local response_to_request = {} + +-- Temporary table to track in-flight requests by message_id during first pass +-- pending_requests[message_id] = request_frame_number +local pending_requests = {} + +-- Protocol initialization function - called when protocol is loaded/reset +function hotrod_protocol.init() + -- Clear conversation tracking tables to prevent memory leaks on reload + -- Must clear in-place since these are module-level locals + for k in pairs(request_to_response) do + request_to_response[k] = nil + end + for k in pairs(response_to_request) do + response_to_request[k] = nil + end + for k in pairs(pending_requests) do + pending_requests[k] = nil + end +end + +-- ============================================================================ +-- Topology Change Parser (Intelligence 0x03) +-- ============================================================================ + +function parse_topology_change(tvb, offset, tree) + local start_offset = offset + + local topo_tree = tree:add(hotrod_protocol, tvb(offset, 1)):set_text("Topology Change") + + -- Topology ID (vint) + local topology_id, topo_id_len = read_vint(tvb, offset) + if topology_id == nil then + return nil, 0 + end + local topo_id_item = topo_tree:add(f_topology_id, tvb(offset, topo_id_len)) + topo_id_item:append_text(string.format(" (%d)", topology_id)) + offset = offset + topo_id_len + + -- Number of servers (vint) + local num_servers, num_servers_len = read_vint(tvb, offset) + if num_servers == nil then + return nil, 0 + end + local num_servers_item = topo_tree:add(f_topology_num_servers, tvb(offset, num_servers_len)) + num_servers_item:append_text(string.format(" (%d)", num_servers)) + offset = offset + num_servers_len + + -- Server list + for i = 1, num_servers do + -- Server host (lp_string) + local host, host_len = read_lp_string(tvb, offset) + if host == nil then + break + end + + local server_item = topo_tree:add(tvb(offset, 1), string.format("Server %d", i - 1)) + server_item:add(f_topology_server_host, tvb(offset, host_len), host) + offset = offset + host_len + + -- Server port (u2, big-endian) + if offset + 2 > tvb:len() then + break + end + local port = tvb(offset, 2):uint() + server_item:add(f_topology_server_port, tvb(offset, 2), port) + server_item:set_text(string.format("Server %d: %s:%d", i - 1, host, port)) + server_item:set_len(host_len + 2) + offset = offset + 2 + end + + -- Hash function version (u1) + if offset >= tvb:len() then + topo_tree:set_len(offset - start_offset) + return topo_tree, offset - start_offset + end + local hash_version = tvb(offset, 1):uint() + local hash_names = { + [0x01] = "MurmurHash2", + [0x02] = "MurmurHash3", + [0x03] = "MurmurHash3 with segments" + } + local hash_name = hash_names[hash_version] or "Unknown" + topo_tree:add(f_topology_hash_function, tvb(offset, 1)):append_text(string.format(" (%s)", hash_name)) + offset = offset + 1 + + -- Number of segments (vint) + local num_segments, num_segments_len = read_vint(tvb, offset) + if num_segments == nil then + topo_tree:set_len(offset - start_offset) + return topo_tree, offset - start_offset + end + local num_segments_item = topo_tree:add(f_topology_num_segments, tvb(offset, num_segments_len)) + num_segments_item:append_text(string.format(" (%d)", num_segments)) + offset = offset + num_segments_len + + -- Segments (showing only first few to avoid huge trees) + local max_segments_to_show = 10 + for i = 1, math.min(num_segments, max_segments_to_show) do + -- Number of owners for this segment (u1) + if offset >= tvb:len() then + break + end + local num_owners = tvb(offset, 1):uint() + local segment_item = topo_tree:add(tvb(offset, 1), string.format("Segment %d", i - 1)) + segment_item:add(f_topology_segment_owners, tvb(offset, 1), num_owners) + offset = offset + 1 + + -- Owner indices (u1 each) + for j = 1, num_owners do + if offset >= tvb:len() then + break + end + local owner_idx = tvb(offset, 1):uint() + segment_item:add(f_topology_owner_index, tvb(offset, 1), owner_idx) + offset = offset + 1 + end + segment_item:set_len(1 + num_owners) + end + + -- Skip remaining segments if there are more than max_segments_to_show + if num_segments > max_segments_to_show then + for i = max_segments_to_show + 1, num_segments do + if offset >= tvb:len() then + break + end + local num_owners = tvb(offset, 1):uint() + offset = offset + 1 + num_owners + end + topo_tree:add(tvb(offset - 1, 1), string.format("... (%d more segments not shown)", num_segments - max_segments_to_show)) + end + + topo_tree:set_len(offset - start_offset) + return topo_tree, offset - start_offset +end + +-- ============================================================================ +-- MediaType Parser (Protocol 2.8+) +-- ============================================================================ + +-- MediaType encoding: +-- 0x00 = none (no media type) +-- 0x01 = predefined (has predefined_id + optional params) +-- 0x02 = custom (has custom_string + optional params) +function parse_media_type(tvb, offset, tree, label) + local start_offset = offset + + if offset >= tvb:len() then + return nil, 0 + end + + -- Create a simple text tree item (not using ProtoField.none) + local media_tree = tree:add(hotrod_protocol, tvb(offset, 1)):set_text(label) + + -- Type indicator (u1) + local type_indicator = tvb(offset, 1):uint() + local type_name = media_type_kind_names[type_indicator] + if type_name then + media_tree:add(f_media_type_indicator, tvb(offset, 1)):append_text(" (" .. type_name .. ")") + else + media_tree:add(f_media_type_indicator, tvb(offset, 1)) + end + offset = offset + 1 + + -- If type is none (0x00), we're done + if type_indicator == 0x00 then + media_tree:set_len(offset - start_offset) + return media_tree, offset - start_offset + end + + -- Predefined type (0x01) - has predefined_id + if type_indicator == 0x01 then + local pred_id, pred_len = read_vint(tvb, offset) + if pred_id == nil then + return nil, 0 + end + -- For vint, add bytes and append decoded text with media type name + local pred_item = media_tree:add(f_media_type_predefined_id, tvb(offset, pred_len)) + local media_name = predefined_media_types[pred_id] + if media_name then + pred_item:append_text(" (" .. media_name .. ")") + end + offset = offset + pred_len + + -- Custom type (0x02) - has custom string + elseif type_indicator == 0x02 then + local custom_str, custom_len = read_lp_string(tvb, offset) + if custom_str == nil then + return nil, 0 + end + media_tree:add(f_media_type_custom, tvb(offset, custom_len), custom_str) + offset = offset + custom_len + else + -- Unknown type indicator + media_tree:set_len(offset - start_offset) + return media_tree, offset - start_offset + end + + -- Both predefined and custom can have parameters + if type_indicator == 0x01 or type_indicator == 0x02 then + local param_count, param_count_len = read_vint(tvb, offset) + if param_count == nil then + return nil, 0 + end + + -- For vint, add bytes and append decoded text + local param_count_item = media_tree:add(f_media_type_param_count, tvb(offset, param_count_len)) + param_count_item:append_text(string.format(" (%d)", param_count)) + offset = offset + param_count_len + + -- Read parameter key-value pairs + for i = 1, param_count do + -- Parameter key (lp_string) + local param_key, key_len = read_lp_string(tvb, offset) + if param_key == nil then + break + end + + local param_item = media_tree:add(tvb(offset, 1), string.format("Parameter %d", i - 1)) + param_item:add(f_media_type_param_key, tvb(offset, key_len), param_key) + offset = offset + key_len + + -- Parameter value (lp_string) + local param_value, value_len = read_lp_string(tvb, offset) + if param_value == nil then + break + end + param_item:add(f_media_type_param_value, tvb(offset, value_len), param_value) + param_item:set_len(key_len + value_len) + offset = offset + value_len + end + end + + media_tree:set_len(offset - start_offset) + return media_tree, offset - start_offset +end + +-- ============================================================================ +-- Entry Metadata Parser (Protocol 4.0+) +-- ============================================================================ + +function parse_entry_metadata(tvb, offset, tree) + local start_offset = offset + + if offset >= tvb:len() then + return nil, 0 + end + + local metadata_tree = tree:add(hotrod_protocol, tvb(offset, 1)):set_text("Entry Metadata") + + -- Metadata flag (u1) + local flag = tvb(offset, 1):uint() + metadata_tree:add(f_metadata_flag, tvb(offset, 1)) + offset = offset + 1 + + local infinite_lifespan = (bit.band(flag, 0x01) ~= 0) + local infinite_maxidle = (bit.band(flag, 0x02) ~= 0) + + -- Created (s8) - only if not infinite lifespan + if not infinite_lifespan then + if offset + 8 > tvb:len() then + return nil, 0 + end + metadata_tree:add(f_metadata_created, tvb(offset, 8)) + offset = offset + 8 + + -- Lifespan (vint) + local lifespan, lifespan_len = read_vint(tvb, offset) + if lifespan == nil then + return nil, 0 + end + local lifespan_item = metadata_tree:add(f_metadata_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + + -- Last Used (s8) - only if not infinite maxidle + if not infinite_maxidle then + if offset + 8 > tvb:len() then + return nil, 0 + end + metadata_tree:add(f_metadata_last_used, tvb(offset, 8)) + offset = offset + 8 + + -- Max Idle (vint) + local max_idle, max_idle_len = read_vint(tvb, offset) + if max_idle == nil then + return nil, 0 + end + local max_idle_item = metadata_tree:add(f_metadata_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + + -- Entry Version (s8) + if offset + 8 > tvb:len() then + return nil, 0 + end + metadata_tree:add(f_metadata_version, tvb(offset, 8)) + offset = offset + 8 + + metadata_tree:set_len(offset - start_offset) + return metadata_tree, offset - start_offset +end + +-- ============================================================================ +-- Operation Body Parsers +-- ============================================================================ + +-- GET Request (0x03) +function parse_get_request(tvb, offset, tree) + return add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") +end + +-- GET Response (0x04) +function parse_get_response(tvb, offset, tree, status) + if status == 0x00 then -- Success + return add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + end + return offset +end + +-- PUT Request (0x01) +function parse_put_request(tvb, offset, tree) + -- Key (lp_bytes with length and string representation) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Time Units (u1) + if offset >= tvb:len() then + return offset + end + local time_units = tvb(offset, 1):uint() + local lifespan_unit = bit.rshift(time_units, 4) + local maxidle_unit = bit.band(time_units, 0x0F) + + local time_unit_names = { + [0x00] = "SECONDS", [0x01] = "MILLISECONDS", [0x02] = "NANOSECONDS", + [0x03] = "MICROSECONDS", [0x04] = "MINUTES", [0x05] = "HOURS", + [0x06] = "DAYS", [0x07] = "DEFAULT", [0x08] = "INFINITE" + } + + tree:add(f_time_units, tvb(offset, 1)):append_text( + string.format(" (Lifespan: %s, MaxIdle: %s)", + time_unit_names[lifespan_unit] or "UNKNOWN", + time_unit_names[maxidle_unit] or "UNKNOWN")) + offset = offset + 1 + + -- Lifespan (vlong) - only if not DEFAULT or INFINITE + if lifespan_unit < 0x07 then + local lifespan, lifespan_len = read_vlong(tvb, offset) + if lifespan == nil then + return offset + end + local lifespan_item = tree:add(f_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + + -- Max Idle (vlong) - only if not DEFAULT or INFINITE + if maxidle_unit < 0x07 then + local max_idle, max_idle_len = read_vlong(tvb, offset) + if max_idle == nil then + return offset + end + local max_idle_item = tree:add(f_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + + -- Value (lp_bytes with length and string representation) + return add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") +end + +-- PUT Response (0x02) +function parse_put_response(tvb, offset, tree, status, version) + -- Only has body if status indicates previous value + if status == 0x03 or status == 0x04 then -- Success/Not Executed With Previous + -- Protocol 4.0+ includes metadata + if version >= 40 then + local metadata, metadata_len = parse_entry_metadata(tvb, offset, tree) + if metadata == nil then + return offset + end + offset = offset + metadata_len + end + + -- Value (lp_bytes with length and string representation) + return add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + end + return offset +end + +-- REMOVE Request (0x0B) - same as GET +function parse_remove_request(tvb, offset, tree) + return add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") +end + +-- REMOVE Response (0x0C) - same as PUT response (previous value with metadata in 4.0+) +function parse_remove_response(tvb, offset, tree, status, version) + -- Only has body if status indicates previous value + if status == 0x03 or status == 0x04 then -- Success/Not Executed With Previous + -- Protocol 4.0+ includes metadata + if version >= 40 then + local metadata, metadata_len = parse_entry_metadata(tvb, offset, tree) + if metadata == nil then + return offset + end + offset = offset + metadata_len + end + + -- Value (lp_bytes with length and string representation) + return add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + end + return offset +end + +-- REPLACE Request (0x07) - same as PUT +function parse_replace_request(tvb, offset, tree) + return parse_put_request(tvb, offset, tree) +end + +-- REPLACE Response (0x08) - same as PUT response +function parse_replace_response(tvb, offset, tree, status, version) + return parse_put_response(tvb, offset, tree, status, version) +end + +-- PUT_IF_ABSENT Request (0x05) - same as PUT +function parse_put_if_absent_request(tvb, offset, tree) + return parse_put_request(tvb, offset, tree) +end + +-- PUT_IF_ABSENT Response (0x06) - same as PUT response +function parse_put_if_absent_response(tvb, offset, tree, status, version) + return parse_put_response(tvb, offset, tree, status, version) +end + +-- CONTAINS_KEY Request (0x0F) - same as GET +function parse_contains_key_request(tvb, offset, tree) + return add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") +end + +-- CONTAINS_KEY Response (0x10) - no body, status indicates if key exists +function parse_contains_key_response(tvb, offset, tree, status) + -- No body - status tells us if key exists + -- 0x00 = key exists, 0x02 = key does not exist + return offset +end + +-- GET_WITH_METADATA Request (0x1B) - same as GET +function parse_get_with_metadata_request(tvb, offset, tree) + return add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") +end + +-- GET_WITH_METADATA Response (0x1C) - always includes metadata +function parse_get_with_metadata_response(tvb, offset, tree, status) + if status == 0x00 then -- Success + -- Parse metadata + local metadata, metadata_len = parse_entry_metadata(tvb, offset, tree) + if metadata == nil then + return offset + end + offset = offset + metadata_len + + -- Value (lp_bytes with length and string representation) + return add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + end + return offset +end + +-- PUT_ALL Request (0x2D) +function parse_put_all_request(tvb, offset, tree) + -- Time Units (u1) + if offset >= tvb:len() then + return offset + end + local time_units = tvb(offset, 1):uint() + local lifespan_unit = bit.rshift(time_units, 4) + local maxidle_unit = bit.band(time_units, 0x0F) + + local time_unit_names = { + [0x00] = "SECONDS", [0x01] = "MILLISECONDS", [0x02] = "NANOSECONDS", + [0x03] = "MICROSECONDS", [0x04] = "MINUTES", [0x05] = "HOURS", + [0x06] = "DAYS", [0x07] = "DEFAULT", [0x08] = "INFINITE" + } + + tree:add(f_time_units, tvb(offset, 1)):append_text( + string.format(" (Lifespan: %s, MaxIdle: %s)", + time_unit_names[lifespan_unit] or "UNKNOWN", + time_unit_names[maxidle_unit] or "UNKNOWN")) + offset = offset + 1 + + -- Lifespan (vlong) - only if not DEFAULT or INFINITE + if lifespan_unit < 0x07 then + local lifespan, lifespan_len = read_vlong(tvb, offset) + if lifespan == nil then + return offset + end + local lifespan_item = tree:add(f_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + + -- Max Idle (vlong) - only if not DEFAULT or INFINITE + if maxidle_unit < 0x07 then + local max_idle, max_idle_len = read_vlong(tvb, offset) + if max_idle == nil then + return offset + end + local max_idle_item = tree:add(f_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + + -- Entry count (vint) + local entry_count, count_len = read_vint(tvb, offset) + if entry_count == nil then + return offset + end + local count_item = tree:add(f_entry_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", entry_count)) + offset = offset + count_len + + -- Entries (key-value pairs) + for i = 1, entry_count do + local entry_item = tree:add(tvb(offset, 1), string.format("Entry %d", i - 1)) + + -- Key + local key_start = offset + offset = add_lp_bytes_with_length(entry_item, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Value + offset = add_lp_bytes_with_length(entry_item, tvb, offset, f_value, f_value_string, f_value_length, "Value") + + entry_item:set_len(offset - key_start) + end + + return offset +end + +-- PUT_ALL Response (0x2E) - no body, just status +function parse_put_all_response(tvb, offset, tree, status) + -- No body - status tells success/failure + return offset +end + +-- GET_ALL Request (0x2F) +function parse_get_all_request(tvb, offset, tree) + -- Key count (vint) + local key_count, count_len = read_vint(tvb, offset) + if key_count == nil then + return offset + end + local count_item = tree:add(f_key_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", key_count)) + offset = offset + count_len + + -- Keys + for i = 1, key_count do + local key_item = tree:add(tvb(offset, 1), string.format("Key %d", i - 1)) + local key_start = offset + offset = add_lp_bytes_with_length(key_item, tvb, offset, f_key, f_key_string, f_key_length, "Key") + key_item:set_len(offset - key_start) + end + + return offset +end + +-- GET_ALL Response (0x30) +function parse_get_all_response(tvb, offset, tree, status) + if status == 0x00 then -- Success + -- Entry count (vint) + local entry_count, count_len = read_vint(tvb, offset) + if entry_count == nil then + return offset + end + local count_item = tree:add(f_entry_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", entry_count)) + offset = offset + count_len + + -- Entries (key-value pairs) + for i = 1, entry_count do + local entry_item = tree:add(tvb(offset, 1), string.format("Entry %d", i - 1)) + + -- Key + local entry_start = offset + offset = add_lp_bytes_with_length(entry_item, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Value + offset = add_lp_bytes_with_length(entry_item, tvb, offset, f_value, f_value_string, f_value_length, "Value") + + entry_item:set_len(offset - entry_start) + end + end + return offset +end + +-- BULK_GET Request (0x19) +function parse_bulk_get_request(tvb, offset, tree) + -- Entry count (vint) - 0 means return all entries + local entry_count, count_len = read_vint(tvb, offset) + if entry_count == nil then + return offset + end + local count_item = tree:add(f_entry_count, tvb(offset, count_len)) + if entry_count == 0 then + count_item:append_text(" (0 = return all entries)") + else + count_item:append_text(string.format(" (%d)", entry_count)) + end + offset = offset + count_len + + return offset +end + +-- BULK_GET Response (0x1A) - chunked format +function parse_bulk_get_response(tvb, offset, tree, status) + if status == 0x00 then -- Success + local chunk_num = 0 + + -- Read chunks until more == 0 + while offset < tvb:len() do + local chunk_start = offset + + -- More marker (u1) + local more = tvb(offset, 1):uint() + local chunk_item = tree:add(tvb(offset, 1), string.format("Chunk %d", chunk_num)) + chunk_item:add(f_bulk_more, tvb(offset, 1)):append_text( + more == 0 and " (last chunk)" or " (more chunks follow)") + offset = offset + 1 + + -- If more != 0, read the entry (lp_bytes for both key and value combined) + if more ~= 0 then + -- This is actually a single lp_bytes that contains the entry + offset = add_lp_bytes_with_length(chunk_item, tvb, offset, f_value, f_value_string, f_value_length, "Entry Data") + end + + chunk_item:set_len(offset - chunk_start) + chunk_num = chunk_num + 1 + + -- If more == 0, we're done + if more == 0 then + break + end + end + end + return offset +end + +-- BULK_GET_KEYS Request (0x1D) - no body +function parse_bulk_get_keys_request(tvb, offset, tree) + -- No body - retrieves all keys + return offset +end + +-- BULK_GET_KEYS Response (0x1E) - same chunked format as BULK_GET +function parse_bulk_get_keys_response(tvb, offset, tree, status) + return parse_bulk_get_response(tvb, offset, tree, status) +end + +-- PING Response (0x18) - Protocol 3.0+ +function parse_ping_response(tvb, offset, tree) + -- Key Media Type + local key_media, key_media_len = parse_media_type(tvb, offset, tree, "Key Type") + if key_media == nil then + return offset + end + offset = offset + key_media_len + + -- Value Media Type + local value_media, value_media_len = parse_media_type(tvb, offset, tree, "Value Type") + if value_media == nil then + return offset + end + offset = offset + value_media_len + + -- Server Version (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_ping_server_version, tvb(offset, 1)):append_text( + string.format(" (Protocol %d.%d)", + math.floor(tvb(offset, 1):uint() / 10), + tvb(offset, 1):uint() % 10)) + offset = offset + 1 + + -- Operation Count (vint) + local op_count, op_count_len = read_vint(tvb, offset) + if op_count == nil then + return offset + end + local op_count_item = tree:add(f_ping_op_count, tvb(offset, op_count_len)) + op_count_item:append_text(string.format(" (%d)", op_count)) + offset = offset + op_count_len + + -- Supported Operations (u2 each) + for i = 1, op_count do + if offset + 2 > tvb:len() then + break + end + local opcode = tvb(offset, 2):uint() + local opcode_name = request_opcodes[opcode] or response_opcodes[opcode] or "UNKNOWN" + tree:add(f_ping_supported_op, tvb(offset, 2)):append_text( + string.format(" (%s)", opcode_name)) + offset = offset + 2 + end + + return offset +end + +-- ============================================================================ +-- Utility Operation Parsers (Batch 3) +-- ============================================================================ + +-- STATS Response (0x16) - No request body +function parse_stats_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Stat count (vint) + local count, count_len = read_vint(tvb, offset) + if count == nil then + return offset + end + local count_item = tree:add(f_stat_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", count)) + offset = offset + count_len + + -- Array of name-value pairs (both are length-prefixed strings) + for i = 1, count do + -- Stat name (lp_string) + local name, name_len = read_lp_string(tvb, offset) + if name == nil then + break + end + offset = add_lp_string_with_length(tree, tvb, offset, f_stat_name, f_string_length, "Stat Name") + + -- Stat value (lp_string) + local value, value_len = read_lp_string(tvb, offset) + if value == nil then + break + end + offset = add_lp_string_with_length(tree, tvb, offset, f_stat_value, f_string_length, "Stat Value") + end + + return offset +end + +-- SIZE Response (0x2A) - No request body +function parse_size_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Cache size (vlong) + local size, size_len = read_vlong(tvb, offset) + if size == nil then + return offset + end + local size_item = tree:add(f_cache_size, tvb(offset, size_len)) + size_item:append_text(string.format(" (%d)", size)) + offset = offset + size_len + + return offset +end + +-- ============================================================================ +-- Query Operation (0x1F request, 0x20 response) +-- ============================================================================ + +-- QUERY Request (0x1F) +function parse_query_request(tvb, offset, tree) + -- Query payload (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_query_payload, nil, + f_query_payload_length, "Query Payload") + return offset +end + +-- QUERY Response (0x20) +function parse_query_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Response payload (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_query_response_payload, nil, + f_query_response_payload_length, "Response Payload") + return offset +end + +-- ============================================================================ +-- Exec Operation (0x2B request, 0x2C response) +-- ============================================================================ + +-- EXEC Request (0x2B) +function parse_exec_request(tvb, offset, tree) + -- Script name (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_exec_script_name, + f_exec_script_name_length, "Script Name") + + -- Parameter count (vint) + local param_count, count_len = read_vint(tvb, offset) + if param_count == nil then + return offset + end + local count_item = tree:add(f_exec_param_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", param_count)) + offset = offset + count_len + + -- Parameters (array of name-value pairs) + for i = 1, param_count do + local param_tree = tree:add(tvb(offset, 0), string.format("Parameter %d", i)) + + -- Parameter name (lp_string) + local name_start = offset + offset = add_lp_string_with_length(param_tree, tvb, offset, f_exec_param_name, + f_exec_param_name_length, "Name") + + -- Parameter value (lp_bytes + string) + local value_start = offset + offset = add_lp_bytes_with_length(param_tree, tvb, offset, f_exec_param_value, f_exec_param_value_string, + f_exec_param_value_length, "Value") + + -- Update param_tree length + param_tree:set_len(offset - name_start) + end + + return offset +end + +-- EXEC Response (0x2C) +function parse_exec_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Result (lp_bytes + string) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_exec_result, f_exec_result_string, + f_exec_result_length, "Result") + return offset +end + +-- ============================================================================ +-- Error Response (0x50) +-- ============================================================================ + +-- ERROR Response (0x50) +-- Contains error message for all error status codes +function parse_error_response(tvb, offset, tree) + -- Error message (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_error_message, + f_error_message_length, "Error Message") + return offset +end + +-- ============================================================================ +-- Conditional Operations +-- ============================================================================ + +-- REPLACE_IF_UNMODIFIED Request (0x09) +function parse_replace_if_unmodified_request(tvb, offset, tree) + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, + f_key_length, "Key") + + -- Time units (u1) + local time_units = tvb(offset, 1):uint() + tree:add(f_time_units, tvb(offset, 1)) + offset = offset + 1 + + -- Lifespan (vlong) - conditional + local lifespan_unit = bit.band(time_units, 0x0F) + if lifespan_unit < 0x07 then + local lifespan, lifespan_len = read_vlong(tvb, offset) + if lifespan ~= nil then + local lifespan_item = tree:add(f_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + end + + -- Max idle (vlong) - conditional + local maxidle_unit = bit.rshift(bit.band(time_units, 0xF0), 4) + if maxidle_unit < 0x07 then + local max_idle, max_idle_len = read_vlong(tvb, offset) + if max_idle ~= nil then + local max_idle_item = tree:add(f_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + end + + -- Entry version (s8) + tree:add(f_metadata_version, tvb(offset, 8)) + offset = offset + 8 + + -- Value (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, + f_value_length, "Value") + + return offset +end + +-- REPLACE_IF_UNMODIFIED Response (0x0A) +-- Same as PUT response - returns previous value with metadata in protocol 4.0+ +function parse_replace_if_unmodified_response(tvb, offset, tree, status, version) + return parse_put_response(tvb, offset, tree, status, version) +end + +-- REMOVE_IF_UNMODIFIED Request (0x0D) +function parse_remove_if_unmodified_request(tvb, offset, tree) + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, + f_key_length, "Key") + + -- Entry version (s8) + tree:add(f_metadata_version, tvb(offset, 8)) + offset = offset + 8 + + return offset +end + +-- REMOVE_IF_UNMODIFIED Response (0x0E) +-- Same as REMOVE response - returns previous value with metadata in protocol 4.0+ +function parse_remove_if_unmodified_response(tvb, offset, tree, status, version) + return parse_remove_response(tvb, offset, tree, status, version) +end + +-- ============================================================================ +-- Transaction Operations +-- ============================================================================ + +-- PREPARE Request (0x3B) - Old version, before PREPARE_V2 +-- No body - just header +function parse_prepare_request(tvb, offset, tree) + -- No body + return offset +end + +-- PREPARE Response (0x3C) +function parse_prepare_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- XA Return Code (s4) + tree:add(f_tx_xa_return_code, tvb(offset, 4)) + offset = offset + 4 + + return offset +end + +-- COMMIT Request (0x3D) +function parse_commit_request(tvb, offset, tree) + -- Transaction ID (XID) + local xid_start = offset + local xid_info, xid_len = parse_xid(tvb, offset, tree) + if xid_info ~= nil then + offset = offset + xid_len + end + return offset +end + +-- COMMIT Response (0x3E) +function parse_commit_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- XA Return Code (s4) + tree:add(f_tx_xa_return_code, tvb(offset, 4)) + offset = offset + 4 + + return offset +end + +-- ROLLBACK Request (0x3F) +function parse_rollback_request(tvb, offset, tree) + -- Transaction ID (XID) + local xid_start = offset + local xid_info, xid_len = parse_xid(tvb, offset, tree) + if xid_info ~= nil then + offset = offset + xid_len + end + return offset +end + +-- ROLLBACK Response (0x40) +function parse_rollback_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- XA Return Code (s4) + tree:add(f_tx_xa_return_code, tvb(offset, 4)) + offset = offset + 4 + + return offset +end + +-- ============================================================================ +-- Authentication Operations +-- ============================================================================ + +-- AUTH_MECH_LIST Request (0x21) +-- No body - just header +function parse_auth_mech_list_request(tvb, offset, tree) + -- No body + return offset +end + +-- AUTH_MECH_LIST Response (0x22) +function parse_auth_mech_list_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Mechanism count (vint) + local mech_count, count_len = read_vint(tvb, offset) + if mech_count == nil then + return offset + end + local count_item = tree:add(f_auth_mech_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", mech_count)) + offset = offset + count_len + + -- Mechanisms (array of lp_string) + for i = 1, mech_count do + offset = add_lp_string_with_length(tree, tvb, offset, f_auth_mech, + f_auth_mech_length, string.format("Mechanism %d", i)) + end + + return offset +end + +-- AUTH Request (0x23) +function parse_auth_request(tvb, offset, tree) + -- Mechanism (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_auth_mech, + f_auth_mech_length, "SASL Mechanism") + + -- Response data (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_auth_response_data, f_auth_response_data_string, + f_auth_response_data_length, "Response Data") + + return offset +end + +-- AUTH Response (0x24) +function parse_auth_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Completed (u1) + tree:add(f_auth_completed, tvb(offset, 1)) + offset = offset + 1 + + -- Challenge data (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_auth_challenge_data, f_auth_challenge_data_string, + f_auth_challenge_data_length, "Challenge Data") + + return offset +end + +-- ============================================================================ +-- Client Listener Operations +-- ============================================================================ + +-- Helper: Parse listener factory params +function parse_listener_factory_params(tvb, offset, tree, label) + if offset >= tvb:len() then + return offset + end + + -- Parameter count (u1) + local param_count = tvb(offset, 1):uint() + local count_item = tree:add(f_listener_param_count, tvb(offset, 1)) + count_item:append_text(string.format(" (%d)", param_count)) + offset = offset + 1 + + -- Parameters (array of lp_bytes) + for i = 1, param_count do + offset = add_lp_bytes_with_length(tree, tvb, offset, f_listener_param, f_listener_param_string, + f_listener_param_length, string.format("%s Parameter %d", label, i)) + end + + return offset +end + +-- ADD_CLIENT_LISTENER Request (0x25) +function parse_add_client_listener_request(tvb, offset, tree) + -- Listener ID (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_listener_id, f_listener_id_string, + f_listener_id_length, "Listener ID") + + -- Include state (u1) + tree:add(f_listener_include_state, tvb(offset, 1)) + offset = offset + 1 + + -- Filter factory name (lp_string) + local filter_name_offset = offset + local filter_name, filter_name_len = read_lp_string(tvb, offset) + offset = add_lp_string_with_length(tree, tvb, offset, f_listener_filter_factory, + f_listener_filter_factory_length, "Filter Factory Name") + + -- Filter factory params (conditional - if name length > 0) + if filter_name ~= nil and #filter_name > 0 then + offset = parse_listener_factory_params(tvb, offset, tree, "Filter") + end + + -- Converter factory name (lp_string) + local converter_name_offset = offset + local converter_name, converter_name_len = read_lp_string(tvb, offset) + offset = add_lp_string_with_length(tree, tvb, offset, f_listener_converter_factory, + f_listener_converter_factory_length, "Converter Factory Name") + + -- Converter factory params (conditional - if name length > 0) + if converter_name ~= nil and #converter_name > 0 then + offset = parse_listener_factory_params(tvb, offset, tree, "Converter") + end + + -- Use raw data (u1) + tree:add(f_listener_use_raw_data, tvb(offset, 1)) + offset = offset + 1 + + -- Event type interests (vint) - bitmask + local interests, interests_len = read_vint(tvb, offset) + if interests ~= nil then + local interests_item = tree:add(f_listener_event_interests, tvb(offset, interests_len)) + local event_types = {} + if bit.band(interests, 0x01) ~= 0 then table.insert(event_types, "CREATED") end + if bit.band(interests, 0x02) ~= 0 then table.insert(event_types, "MODIFIED") end + if bit.band(interests, 0x04) ~= 0 then table.insert(event_types, "REMOVED") end + if bit.band(interests, 0x08) ~= 0 then table.insert(event_types, "EXPIRED") end + if #event_types > 0 then + interests_item:append_text(string.format(" (%s)", table.concat(event_types, ", "))) + end + offset = offset + interests_len + end + + return offset +end + +-- ADD_CLIENT_LISTENER Response (0x26) - No body (status only) +function parse_add_client_listener_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- REMOVE_CLIENT_LISTENER Request (0x27) +function parse_remove_client_listener_request(tvb, offset, tree) + -- Listener ID (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_listener_id, f_listener_id_string, + f_listener_id_length, "Listener ID") + return offset +end + +-- REMOVE_CLIENT_LISTENER Response (0x28) - No body (status only) +function parse_remove_client_listener_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- ADD_BLOOM_FILTER_LISTENER Request (0x41) +function parse_add_bloom_filter_listener_request(tvb, offset, tree) + -- Listener ID (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_listener_id, f_listener_id_string, + f_listener_id_length, "Listener ID") + + -- Bloom filter bit size (vint) + local bit_size, size_len = read_vint(tvb, offset) + if bit_size ~= nil then + local size_item = tree:add(f_bloom_filter_bit_size, tvb(offset, size_len)) + size_item:append_text(string.format(" (%d bits)", bit_size)) + offset = offset + size_len + end + + return offset +end + +-- ADD_BLOOM_FILTER_LISTENER Response (0x42) - No body (status only) +function parse_add_bloom_filter_listener_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- UPDATE_BLOOM_FILTER Request (0x43) +function parse_update_bloom_filter_request(tvb, offset, tree) + -- Bloom filter bits (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_bloom_filter_bits, nil, + f_bloom_filter_bits_length, "Bloom Filter Bits") + return offset +end + +-- UPDATE_BLOOM_FILTER Response (0x44) - No body (status only) +function parse_update_bloom_filter_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- ============================================================================ +-- Status-Only Response Operations +-- ============================================================================ + +-- CLEAR Response (0x14) - No body +function parse_clear_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- ITERATION_END Response (0x36) - No body +function parse_iteration_end_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- COUNTER_CREATE Response (0x4C) - No body +function parse_counter_create_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- COUNTER_IS_DEFINED Response (0x51) - No body +function parse_counter_is_defined_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- COUNTER_RESET Response (0x55) - No body +function parse_counter_reset_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- COUNTER_ADD_LISTENER Response (0x5B) - No body +function parse_counter_add_listener_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- COUNTER_REMOVE_LISTENER Response (0x5D) - No body +function parse_counter_remove_listener_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- COUNTER_REMOVE Response (0x5F) - No body +function parse_counter_remove_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- MULTIMAP_PUT Response (0x6C) - No body +function parse_multimap_put_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- FORGET_TX Response (0x7A) - No body +function parse_forget_tx_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- COUNTER_GET_NAMES Response (0x65) - HAS BODY! +function parse_counter_get_names_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Counter count (vint) + local count, count_len = read_vint(tvb, offset) + if count == nil then + return offset + end + local count_item = tree:add(f_counter_names_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", count)) + offset = offset + count_len + + -- Counter names (array of lp_string) + for i = 1, count do + offset = add_lp_string_with_length(tree, tvb, offset, f_counter_name, + f_counter_name_length, string.format("Counter Name %d", i)) + end + + return offset +end + +-- ============================================================================ +-- Stream Operations (Protocol 4.1) - Remaining +-- ============================================================================ + +-- GET_STREAM_END Response (0xE4) - No body +function parse_get_stream_end_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- GET_STREAM_NEXT Response (0xE6) - HAS BODY! +function parse_get_stream_next_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Stream ID (s4) + tree:add(f_stream_id, tvb(offset, 4)) + offset = offset + 4 + + -- Complete flag (u1) + tree:add(f_stream_complete, tvb(offset, 1)) + offset = offset + 1 + + -- Value chunk (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, + f_value_length, "Value Chunk") + + return offset +end + +-- PUT_STREAM_NEXT Response (0xEC) - No body +function parse_put_stream_next_response(tvb, offset, tree, status) + -- No body - status in header + return offset +end + +-- PUT_STREAM_START Response (0xEE) - HAS BODY! +function parse_put_stream_start_response_ex(tvb, offset, tree, status) + -- Note: there's already a parse_put_stream_start_response that we're using + -- This is the correct implementation - it just returns stream_id + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Stream ID (s4) + tree:add(f_stream_id, tvb(offset, 4)) + offset = offset + 4 + + return offset +end + +-- CLEAR (0x13/0x14) - No body in request or response (status-only) +-- No parser needed - status is already shown in response header + +-- ============================================================================ +-- Iteration Operation Parsers (Batch 4) +-- ============================================================================ + +-- ITERATION_START Request (0x31) +function parse_iteration_start_request(tvb, offset, tree) + -- Segments size (signed vint) - -1 means no segment filtering + local segments_size, segments_size_len = read_signed_vint(tvb, offset) + if segments_size == nil then + return offset + end + local seg_size_item = tree:add(f_iteration_segments_size, tvb(offset, segments_size_len)) + seg_size_item:append_text(string.format(" (%d)", segments_size)) + offset = offset + segments_size_len + + -- Segments array (only if segments_size > 0) + if segments_size > 0 then + -- Each segment is a vint + for i = 1, segments_size do + local seg_id, seg_id_len = read_vint(tvb, offset) + if seg_id == nil then + break + end + local seg_item = tree:add(f_iteration_segment_id, tvb(offset, seg_id_len)) + seg_item:append_text(string.format(" (%d)", seg_id)) + offset = offset + seg_id_len + end + end + + -- Filter converter size (signed vint) - -1 means no filter + local filter_size, filter_size_len = read_signed_vint(tvb, offset) + if filter_size == nil then + return offset + end + local filter_size_item = tree:add(f_iteration_filter_size, tvb(offset, filter_size_len)) + filter_size_item:append_text(string.format(" (%d)", filter_size)) + offset = offset + filter_size_len + + -- Filter converter (only if filter_size >= 0) + if filter_size >= 0 then + -- Filter string + if offset + filter_size > tvb:len() then + return offset + end + tree:add(f_iteration_filter, tvb(offset, filter_size)) + offset = offset + filter_size + + -- Parameter count (u1) + if offset >= tvb:len() then + return offset + end + local param_count = tvb(offset, 1):uint() + tree:add(f_iteration_param_count, tvb(offset, 1)) + offset = offset + 1 + + -- Parameters (array of lp_bytes) + if param_count > 0 then + for i = 1, param_count do + offset = add_lp_bytes_with_length(tree, tvb, offset, f_iteration_param, nil, f_bytes_length, "Parameter") + if offset == nil then + break + end + end + end + end + + -- Batch size (vint) + local batch_size, batch_size_len = read_vint(tvb, offset) + if batch_size == nil then + return offset + end + local batch_item = tree:add(f_iteration_batch_size, tvb(offset, batch_size_len)) + batch_item:append_text(string.format(" (%d)", batch_size)) + offset = offset + batch_size_len + + -- Include metadata flag (u1) + if offset >= tvb:len() then + return offset + end + local metadata_flag = tvb(offset, 1):uint() + tree:add(f_iteration_metadata_flag, tvb(offset, 1)):append_text( + metadata_flag == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + return offset +end + +-- ITERATION_START Response (0x32) +function parse_iteration_start_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Iteration ID (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_iteration_id, f_iteration_id_string, f_iteration_id_length, "Iteration ID") + + return offset +end + +-- ITERATION_NEXT Request (0x33) +function parse_iteration_next_request(tvb, offset, tree) + -- Iteration ID (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_iteration_id, f_iteration_id_string, f_iteration_id_length, "Iteration ID") + + return offset +end + +-- ITERATION_NEXT Response (0x34) +function parse_iteration_next_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Finished segments size (vint) + local finished_size, finished_size_len = read_vint(tvb, offset) + if finished_size == nil then + return offset + end + local finished_size_item = tree:add(f_iteration_finished_segments_size, tvb(offset, finished_size_len)) + finished_size_item:append_text(string.format(" (%d)", finished_size)) + offset = offset + finished_size_len + + -- Finished segments (raw bytes) + if finished_size > 0 then + if offset + finished_size > tvb:len() then + return offset + end + -- Parse as array of vints + local seg_offset = offset + local seg_end = offset + finished_size + while seg_offset < seg_end do + local seg_id, seg_len = read_vint(tvb, seg_offset) + if seg_id == nil or seg_offset + seg_len > seg_end then + break + end + local seg_item = tree:add(f_iteration_finished_segment, tvb(seg_offset, seg_len)) + seg_item:append_text(string.format(" (%d)", seg_id)) + seg_offset = seg_offset + seg_len + end + offset = offset + finished_size + end + + -- Entry count (vint) + local entry_count, entry_count_len = read_vint(tvb, offset) + if entry_count == nil then + return offset + end + local entry_count_item = tree:add(f_entry_count, tvb(offset, entry_count_len)) + entry_count_item:append_text(string.format(" (%d)", entry_count)) + offset = offset + entry_count_len + + -- Number of value projections (vint) - only if entry_count > 0 + local num_projections = 1 -- Default to 1 (full value) + if entry_count > 0 then + local proj, proj_len = read_vint(tvb, offset) + if proj == nil then + return offset + end + local proj_item = tree:add(f_iteration_num_projections, tvb(offset, proj_len)) + proj_item:append_text(string.format(" (%d)", proj)) + offset = offset + proj_len + num_projections = proj + end + + -- Entries array + for i = 1, entry_count do + local entry_tree = tree:add(hotrod_protocol, tvb(offset, 0)):set_text(string.format("Entry %d", i)) + + -- Metadata present flag (u1) + if offset >= tvb:len() then + break + end + local metadata_present = tvb(offset, 1):uint() + entry_tree:add(f_iteration_metadata_present, tvb(offset, 1)):append_text( + metadata_present == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + -- Metadata (if present) + if metadata_present == 1 then + local meta_tree = entry_tree:add(hotrod_protocol, tvb(offset, 0)):set_text("Metadata") + + -- Expiration flag (u1) + if offset >= tvb:len() then + break + end + local exp_flag = tvb(offset, 1):uint() + local flag_text = "" + if bit.band(exp_flag, 0x01) ~= 0 then + flag_text = flag_text .. " INFINITE_LIFESPAN" + end + if bit.band(exp_flag, 0x02) ~= 0 then + flag_text = flag_text .. " INFINITE_MAXIDLE" + end + meta_tree:add(f_iteration_expiration_flag, tvb(offset, 1)):append_text(flag_text) + offset = offset + 1 + + -- Created (s8) - only if INFINITE_LIFESPAN not set + if bit.band(exp_flag, 0x01) == 0 then + if offset + 8 > tvb:len() then + break + end + meta_tree:add(f_metadata_created, tvb(offset, 8)) + offset = offset + 8 + end + + -- Lifespan (vint) - only if INFINITE_LIFESPAN not set + if bit.band(exp_flag, 0x01) == 0 then + local lifespan, lifespan_len = read_vint(tvb, offset) + if lifespan == nil then + break + end + local lifespan_item = meta_tree:add(f_metadata_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + + -- Last used (s8) - only if INFINITE_MAXIDLE not set + if bit.band(exp_flag, 0x02) == 0 then + if offset + 8 > tvb:len() then + break + end + meta_tree:add(f_metadata_last_used, tvb(offset, 8)) + offset = offset + 8 + end + + -- Max idle (vint) - only if INFINITE_MAXIDLE not set + if bit.band(exp_flag, 0x02) == 0 then + local max_idle, max_idle_len = read_vint(tvb, offset) + if max_idle == nil then + break + end + local max_idle_item = meta_tree:add(f_metadata_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + + -- Entry version (s8) - always present + if offset + 8 > tvb:len() then + break + end + meta_tree:add(f_metadata_version, tvb(offset, 8)) + offset = offset + 8 + end + + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(entry_tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Values (array of lp_bytes, count = num_projections) + for j = 1, num_projections do + offset = add_lp_bytes_with_length(entry_tree, tvb, offset, f_value, f_value_string, f_value_length, + num_projections > 1 and string.format("Value %d", j) or "Value") + if offset == nil then + break + end + end + end + + return offset +end + +-- ITERATION_END Request (0x35) +function parse_iteration_end_request(tvb, offset, tree) + -- Iteration ID (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_iteration_id, f_iteration_id_string, f_iteration_id_length, "Iteration ID") + + return offset +end + +-- ITERATION_END Response (0x36) - No body (status only) +-- No parser needed + +-- ============================================================================ +-- Counter Operation Parsers (Batch 5) +-- ============================================================================ + +-- Helper: Parse counter configuration +function parse_counter_configuration(tvb, offset, tree) + local config_tree = tree:add(hotrod_protocol, tvb(offset, 0)):set_text("Counter Configuration") + + -- Flags (u1) + if offset >= tvb:len() then + return offset + end + local flags = tvb(offset, 1):uint() + local flag_text = "" + if bit.band(flags, 0x01) ~= 0 then flag_text = flag_text .. " WEAK" else flag_text = flag_text .. " STRONG" end + if bit.band(flags, 0x02) ~= 0 then flag_text = flag_text .. " BOUNDED" else flag_text = flag_text .. " UNBOUNDED" end + if bit.band(flags, 0x04) ~= 0 then flag_text = flag_text .. " PERSISTENT" else flag_text = flag_text .. " VOLATILE" end + config_tree:add(f_counter_config_flags, tvb(offset, 1)):append_text(flag_text) + offset = offset + 1 + + -- Concurrency level (vint) - only if WEAK (bit 0 set) + if bit.band(flags, 0x01) ~= 0 then + local concurrency, concurrency_len = read_vint(tvb, offset) + if concurrency == nil then + return offset + end + local concurrency_item = config_tree:add(f_counter_concurrency, tvb(offset, concurrency_len)) + concurrency_item:append_text(string.format(" (%d)", concurrency)) + offset = offset + concurrency_len + end + + -- Lower bound (s8) - only if BOUNDED (bit 1 set) + if bit.band(flags, 0x02) ~= 0 then + if offset + 8 > tvb:len() then + return offset + end + config_tree:add(f_counter_lower_bound, tvb(offset, 8)) + offset = offset + 8 + end + + -- Upper bound (s8) - only if BOUNDED (bit 1 set) + if bit.band(flags, 0x02) ~= 0 then + if offset + 8 > tvb:len() then + return offset + end + config_tree:add(f_counter_upper_bound, tvb(offset, 8)) + offset = offset + 8 + end + + -- Initial value (s8) - always present + if offset + 8 > tvb:len() then + return offset + end + config_tree:add(f_counter_initial_value, tvb(offset, 8)) + offset = offset + 8 + + return offset +end + +-- COUNTER_CREATE Request (0x4B) +function parse_counter_create_request(tvb, offset, tree) + -- Counter name (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_counter_name, f_counter_name_length, "Counter Name") + + -- Configuration + offset = parse_counter_configuration(tvb, offset, tree) + + return offset +end + +-- COUNTER_CREATE Response (0x4C) - No body (status only) + +-- COUNTER_GET_CONFIGURATION Request (0x4D) +function parse_counter_name_request(tvb, offset, tree) + -- Counter name (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_counter_name, f_counter_name_length, "Counter Name") + return offset +end + +-- COUNTER_GET_CONFIGURATION Response (0x4E) +function parse_counter_get_configuration_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Configuration + offset = parse_counter_configuration(tvb, offset, tree) + + return offset +end + +-- COUNTER_IS_DEFINED Request (0x4F) - uses counter_name_request +-- COUNTER_IS_DEFINED Response (0x50) - No body (status only) + +-- COUNTER_ADD_AND_GET Request (0x52) +function parse_counter_add_and_get_request(tvb, offset, tree) + -- Counter name (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_counter_name, f_counter_name_length, "Counter Name") + + -- Delta (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_counter_delta, tvb(offset, 8)) + offset = offset + 8 + + return offset +end + +-- COUNTER_ADD_AND_GET Response (0x53) +function parse_counter_value_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Value (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_counter_value, tvb(offset, 8)) + offset = offset + 8 + + return offset +end + +-- COUNTER_RESET Request (0x54) - uses counter_name_request +-- COUNTER_RESET Response (0x55) - No body (status only) + +-- COUNTER_GET_VALUE Request (0x56) - uses counter_name_request +-- COUNTER_GET_VALUE Response (0x57) - uses counter_value_response + +-- COUNTER_CAS Request (0x58) +function parse_counter_cas_request(tvb, offset, tree) + -- Counter name (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_counter_name, f_counter_name_length, "Counter Name") + + -- Expected value (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_counter_expect, tvb(offset, 8)) + offset = offset + 8 + + -- Update value (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_counter_update, tvb(offset, 8)) + offset = offset + 8 + + return offset +end + +-- COUNTER_CAS Response (0x59) - uses counter_value_response + +-- COUNTER_ADD_LISTENER Request (0x5A) - uses counter_name_request +-- COUNTER_ADD_LISTENER Response (0x5B) - No body (status only) + +-- COUNTER_REMOVE_LISTENER Request (0x5C) - uses counter_name_request +-- COUNTER_REMOVE_LISTENER Response (0x5D) - No body (status only) + +-- COUNTER_REMOVE Request (0x5E) - uses counter_name_request +-- COUNTER_REMOVE Response (0x5F) - No body (status only) + +-- COUNTER_GET_AND_SET Request (0x7F) +function parse_counter_get_and_set_request(tvb, offset, tree) + -- Counter name (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_counter_name, f_counter_name_length, "Counter Name") + + -- Value (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_counter_value, tvb(offset, 8)) + offset = offset + 8 + + return offset +end + +-- COUNTER_GET_AND_SET Response (0x80) - uses counter_value_response + +-- ============================================================================ +-- Multimap Operation Parsers (Batch 6.1) +-- ============================================================================ + +-- MULTIMAP_GET Request (0x67) - also used for MULTIMAP_REMOVE_KEY (0x6D) and MULTIMAP_CONTAINS_KEY (0x75) +function parse_multimap_get_request(tvb, offset, tree) + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Support duplicates (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_multimap_support_duplicates, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + return offset +end + +-- MULTIMAP_GET Response (0x68) +function parse_multimap_get_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Value count (vint) + local value_count, count_len = read_vint(tvb, offset) + if value_count == nil then + return offset + end + local count_item = tree:add(f_multimap_value_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", value_count)) + offset = offset + count_len + + -- Values array + for i = 1, value_count do + offset = add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, + value_count > 1 and string.format("Value %d", i) or "Value") + if offset == nil then + break + end + end + + return offset +end + +-- MULTIMAP_GET_WITH_METADATA Request (0x69) - uses multimap_get_request + +-- MULTIMAP_GET_WITH_METADATA Response (0x6A) +function parse_multimap_get_with_metadata_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Metadata + offset = parse_entry_metadata(tvb, offset, tree) + + -- Value count (vint) + local value_count, count_len = read_vint(tvb, offset) + if value_count == nil then + return offset + end + local count_item = tree:add(f_multimap_value_count, tvb(offset, count_len)) + count_item:append_text(string.format(" (%d)", value_count)) + offset = offset + count_len + + -- Values array + for i = 1, value_count do + offset = add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, + value_count > 1 and string.format("Value %d", i) or "Value") + if offset == nil then + break + end + end + + return offset +end + +-- MULTIMAP_PUT Request (0x6B) - also used for MULTIMAP_REMOVE_ENTRY (0x6F) +function parse_multimap_put_request(tvb, offset, tree) + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Time units (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_time_units, tvb(offset, 1)) + local time_units = tvb(offset, 1):uint() + offset = offset + 1 + + -- Lifespan (vlong) - only if low nibble < 0x07 + if bit.band(time_units, 0x0F) < 0x07 then + local lifespan, lifespan_len = read_vlong(tvb, offset) + if lifespan == nil then + return offset + end + local lifespan_item = tree:add(f_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + + -- Max idle (vlong) - only if high nibble < 0x07 + if bit.rshift(bit.band(time_units, 0xF0), 4) < 0x07 then + local max_idle, max_idle_len = read_vlong(tvb, offset) + if max_idle == nil then + return offset + end + local max_idle_item = tree:add(f_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + + -- Value (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + + -- Support duplicates (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_multimap_support_duplicates, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + return offset +end + +-- MULTIMAP_PUT Response (0x6C) - No body (status only) + +-- MULTIMAP_SIZE Request (0x71) - No body +-- MULTIMAP_SIZE Response (0x72) +function parse_multimap_size_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Size (vlong) + local size, size_len = read_vlong(tvb, offset) + if size == nil then + return offset + end + local size_item = tree:add(f_cache_size, tvb(offset, size_len)) + size_item:append_text(string.format(" (%d)", size)) + offset = offset + size_len + + return offset +end + +-- MULTIMAP_CONTAINS_VALUE Request (0x77) +function parse_multimap_contains_value_request(tvb, offset, tree) + -- Value (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + + -- Support duplicates (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_multimap_support_duplicates, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + return offset +end + +-- MULTIMAP_CONTAINS_ENTRY Request (0x73) +function parse_multimap_contains_entry_request(tvb, offset, tree) + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Time units (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_time_units, tvb(offset, 1)) + local time_units = tvb(offset, 1):uint() + offset = offset + 1 + + -- Lifespan (vlong) - only if high nibble < 0x07 + if bit.rshift(bit.band(time_units, 0xF0), 4) < 0x07 then + local lifespan, lifespan_len = read_vlong(tvb, offset) + if lifespan == nil then + return offset + end + local lifespan_item = tree:add(f_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + + -- Max idle (vlong) - only if low nibble < 0x07 + if bit.band(time_units, 0x0F) < 0x07 then + local max_idle, max_idle_len = read_vlong(tvb, offset) + if max_idle == nil then + return offset + end + local max_idle_item = tree:add(f_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + + -- Value (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + + -- Support duplicates (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_multimap_support_duplicates, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + return offset +end + +-- MULTIMAP_CONTAINS_* Responses (0x6E, 0x70, 0x74, 0x76, 0x78) +function parse_multimap_contains_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Result (u1) - boolean + if offset >= tvb:len() then + return offset + end + tree:add(f_multimap_result, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (True)" or " (False)") + offset = offset + 1 + + return offset +end + +-- ============================================================================ +-- Stream Operation Parsers (Batch 6.2) +-- ============================================================================ + +-- GET_STREAM_START Request (0xE9) +function parse_get_stream_start_request(tvb, offset, tree) + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Batch size (vint) + local batch_size, batch_len = read_vint(tvb, offset) + if batch_size == nil then + return offset + end + local batch_item = tree:add(f_stream_batch_size, tvb(offset, batch_len)) + batch_item:append_text(string.format(" (%d)", batch_size)) + offset = offset + batch_len + + return offset +end + +-- GET_STREAM_START Response (0xEA) +function parse_get_stream_start_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Stream ID (s4) + if offset + 4 > tvb:len() then + return offset + end + tree:add(f_stream_id, tvb(offset, 4)) + offset = offset + 4 + + -- Complete flag (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_stream_complete, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + -- Metadata + offset = parse_entry_metadata(tvb, offset, tree) + + -- Value (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + + return offset +end + +-- GET_STREAM_NEXT Request (0xE7) +function parse_get_stream_next_request(tvb, offset, tree) + -- Stream ID (s4) + if offset + 4 > tvb:len() then + return offset + end + tree:add(f_stream_id, tvb(offset, 4)) + offset = offset + 4 + + return offset +end + +-- GET_STREAM_NEXT Response (0xE8) - same as GET_STREAM_START response + +-- GET_STREAM_END Request (0xE5) - same as GET_STREAM_NEXT request +-- GET_STREAM_END Response (0xE6) - No body (status only) + +-- PUT_STREAM_START Request (0xEF) +function parse_put_stream_start_request(tvb, offset, tree) + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Time units (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_time_units, tvb(offset, 1)) + local time_units = tvb(offset, 1):uint() + offset = offset + 1 + + -- Lifespan (vlong) - only if low nibble < 0x07 + if bit.band(time_units, 0x0F) < 0x07 then + local lifespan, lifespan_len = read_vlong(tvb, offset) + if lifespan == nil then + return offset + end + local lifespan_item = tree:add(f_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + + -- Max idle (vlong) - only if high nibble < 0x07 + if bit.rshift(bit.band(time_units, 0xF0), 4) < 0x07 then + local max_idle, max_idle_len = read_vlong(tvb, offset) + if max_idle == nil then + return offset + end + local max_idle_item = tree:add(f_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + + -- Condition version (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_stream_condition_version, tvb(offset, 8)) + offset = offset + 8 + + return offset +end + +-- PUT_STREAM_START Response (0xF0) +function parse_put_stream_start_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Stream ID (s4) + if offset + 4 > tvb:len() then + return offset + end + tree:add(f_stream_id, tvb(offset, 4)) + offset = offset + 4 + + return offset +end + +-- PUT_STREAM_NEXT Request (0xED) +function parse_put_stream_next_request(tvb, offset, tree) + -- Stream ID (s4) + if offset + 4 > tvb:len() then + return offset + end + tree:add(f_stream_id, tvb(offset, 4)) + offset = offset + 4 + + -- Data chunk (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_stream_chunk, nil, f_bytes_length, "Data Chunk") + + return offset +end + +-- PUT_STREAM_NEXT Response (0xEE) - No body (status only) + +-- PUT_STREAM_END Request (0xEB) - same as GET_STREAM_NEXT request (stream ID only) +-- PUT_STREAM_END Response (0xEC) - No body (status only) + +-- ============================================================================ +-- Transaction Operation Parsers (Batch 6.3) +-- ============================================================================ + +-- Helper: Parse XID (transaction ID) +function parse_xid(tvb, offset, tree) + local xid_tree = tree:add(hotrod_protocol, tvb(offset, 0)):set_text("Transaction ID (XID)") + + -- Format ID (vint) + local format_id, format_len = read_vint(tvb, offset) + if format_id == nil then + return offset + end + local format_item = xid_tree:add(f_tx_xid_format, tvb(offset, format_len)) + format_item:append_text(string.format(" (%d)", format_id)) + offset = offset + format_len + + -- Global TX ID length (u1) + if offset >= tvb:len() then + return offset + end + local global_len = tvb(offset, 1):uint() + xid_tree:add(f_tx_xid_global_length, tvb(offset, 1)) + offset = offset + 1 + + -- Global TX ID (bytes) + if global_len > 0 then + if offset + global_len > tvb:len() then + return offset + end + xid_tree:add(f_tx_xid_global, tvb(offset, global_len)) + offset = offset + global_len + end + + -- Branch qualifier length (u1) + if offset >= tvb:len() then + return offset + end + local branch_len = tvb(offset, 1):uint() + xid_tree:add(f_tx_xid_branch_length, tvb(offset, 1)) + offset = offset + 1 + + -- Branch qualifier (bytes) + if branch_len > 0 then + if offset + branch_len > tvb:len() then + return offset + end + xid_tree:add(f_tx_xid_branch, tvb(offset, branch_len)) + offset = offset + branch_len + end + + return offset +end + +-- COMMIT Request (0x3D) - No body (just uses transaction context from request header) +-- COMMIT Response (0x3E) - No body (status only) + +-- ROLLBACK Request (0x3F) - No body +-- ROLLBACK Response (0x40) - No body (status only) + +-- FORGET_TX Request (0x79) +function parse_forget_tx_request(tvb, offset, tree) + offset = parse_xid(tvb, offset, tree) + return offset +end + +-- FORGET_TX Response (0x7A) - No body (status only) + +-- FETCH_IN_DOUBT_TX Request (0x7B) - No body +-- FETCH_IN_DOUBT_TX Response (0x7C) +function parse_fetch_in_doubt_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- Number of XIDs (vint) + local num_xids, num_len = read_vint(tvb, offset) + if num_xids == nil then + return offset + end + local num_item = tree:add(f_tx_num_xids, tvb(offset, num_len)) + num_item:append_text(string.format(" (%d)", num_xids)) + offset = offset + num_len + + -- XIDs array + for i = 1, num_xids do + offset = parse_xid(tvb, offset, tree) + end + + return offset +end + +-- PREPARE_V2 Request (0x7D) +function parse_prepare_v2_request(tvb, offset, tree) + -- Transaction ID (XID) + offset = parse_xid(tvb, offset, tree) + + -- One phase commit (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_tx_one_phase, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + -- Recoverable (u1) + if offset >= tvb:len() then + return offset + end + tree:add(f_tx_recoverable, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + -- Timeout (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_tx_timeout, tvb(offset, 8)) + offset = offset + 8 + + -- Number of keys (vint) + local num_keys, num_len = read_vint(tvb, offset) + if num_keys == nil then + return offset + end + local num_item = tree:add(f_tx_num_keys, tvb(offset, num_len)) + num_item:append_text(string.format(" (%d)", num_keys)) + offset = offset + num_len + + -- TX write entries array + for i = 1, num_keys do + local entry_tree = tree:add(hotrod_protocol, tvb(offset, 0)):set_text(string.format("Write Entry %d", i)) + + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(entry_tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Control byte (u1) + if offset >= tvb:len() then + break + end + local control_byte = tvb(offset, 1):uint() + local control_text = "" + if bit.band(control_byte, 0x01) ~= 0 then control_text = control_text .. " NOT_READ" end + if bit.band(control_byte, 0x02) ~= 0 then control_text = control_text .. " NON_EXISTING" end + if bit.band(control_byte, 0x04) ~= 0 then control_text = control_text .. " REMOVE_OPERATION" end + entry_tree:add(f_tx_control_byte, tvb(offset, 1)):append_text(control_text) + offset = offset + 1 + + -- Version read (s8) - only if NOT_READ and NON_EXISTING are both clear + if bit.band(control_byte, 0x01) == 0 and bit.band(control_byte, 0x02) == 0 then + if offset + 8 > tvb:len() then + break + end + entry_tree:add(f_metadata_version, tvb(offset, 8)) + offset = offset + 8 + end + + -- Time units (u1) - only if REMOVE_OPERATION is clear + if bit.band(control_byte, 0x04) == 0 then + if offset >= tvb:len() then + break + end + entry_tree:add(f_time_units, tvb(offset, 1)) + local time_units = tvb(offset, 1):uint() + offset = offset + 1 + + -- Lifespan (vlong) - conditional + if bit.band(time_units, 0x0F) < 0x07 then + local lifespan, lifespan_len = read_vlong(tvb, offset) + if lifespan == nil then + break + end + local lifespan_item = entry_tree:add(f_lifespan, tvb(offset, lifespan_len)) + lifespan_item:append_text(string.format(" (%d)", lifespan)) + offset = offset + lifespan_len + end + + -- Max idle (vlong) - conditional + if bit.rshift(bit.band(time_units, 0xF0), 4) < 0x07 then + local max_idle, max_idle_len = read_vlong(tvb, offset) + if max_idle == nil then + break + end + local max_idle_item = entry_tree:add(f_max_idle, tvb(offset, max_idle_len)) + max_idle_item:append_text(string.format(" (%d)", max_idle)) + offset = offset + max_idle_len + end + + -- Value (lp_bytes) + offset = add_lp_bytes_with_length(entry_tree, tvb, offset, f_value, f_value_string, f_value_length, "Value") + end + end + + return offset +end + +-- PREPARE_V2 Response (0x7E) +function parse_prepare_v2_response(tvb, offset, tree, status) + if status ~= 0x00 then -- Not SUCCESS + return offset + end + + -- XA Return Code (vint) + local xa_code, xa_len = read_vint(tvb, offset) + if xa_code == nil then + return offset + end + local xa_item = tree:add(hotrod_protocol, tvb(offset, xa_len)) + xa_item:set_text(string.format("XA Return Code: %d", xa_code)) + offset = offset + xa_len + + return offset +end + +-- ============================================================================ +-- Event Parsers (Batch 6.4) +-- ============================================================================ + +-- Helper: Parse event header (common to all cache events) +function parse_event_header(tvb, offset, tree) + -- Status (u1) + if offset >= tvb:len() then + return offset, nil + end + tree:add(f_resp_status, tvb(offset, 1)) + offset = offset + 1 + + -- Topology change marker (u1) + if offset >= tvb:len() then + return offset, nil + end + tree:add(f_resp_topology_marker, tvb(offset, 1)) + offset = offset + 1 + + -- Listener ID (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_event_listener_id, f_event_listener_id_string, f_event_listener_id_length, "Listener ID") + + -- Custom marker (u1) + if offset >= tvb:len() then + return offset, nil + end + local custom_marker = tvb(offset, 1):uint() + tree:add(f_event_custom_marker, tvb(offset, 1)) + offset = offset + 1 + + -- Command retried (u1) + if offset >= tvb:len() then + return offset, nil + end + tree:add(f_event_command_retried, tvb(offset, 1)):append_text( + tvb(offset, 1):uint() == 1 and " (Yes)" or " (No)") + offset = offset + 1 + + return offset, custom_marker +end + +-- CACHE_ENTRY_CREATED_EVENT (0x60) +-- CACHE_ENTRY_MODIFIED_EVENT (0x61) +-- CACHE_ENTRY_REMOVED_EVENT (0x62) +-- CACHE_ENTRY_EXPIRED_EVENT (0x63) +function parse_cache_entry_event(tvb, offset, tree) + local custom_marker + offset, custom_marker = parse_event_header(tvb, offset, tree) + + if custom_marker == nil then + return offset + end + + if custom_marker == 1 or custom_marker == 2 then + -- Custom data (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_event_custom_data, nil, f_bytes_length, "Custom Data") + else + -- Key (lp_bytes) + offset = add_lp_bytes_with_length(tree, tvb, offset, f_key, f_key_string, f_key_length, "Key") + + -- Version (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_metadata_version, tvb(offset, 8)) + offset = offset + 8 + end + + return offset +end + +-- COUNTER_EVENT (0x66) +function parse_counter_event(tvb, offset, tree) + offset = parse_event_header(tvb, offset, tree) + + -- Counter name (lp_string) + offset = add_lp_string_with_length(tree, tvb, offset, f_counter_name, f_counter_name_length, "Counter Name") + + -- Counter value (s8) + if offset + 8 > tvb:len() then + return offset + end + tree:add(f_counter_value, tvb(offset, 8)) + offset = offset + 8 + + return offset +end + +-- ============================================================================ +-- Request Header Parser +-- ============================================================================ + +function parse_request_header(tvb, offset, tree, pinfo) + local start_offset = offset + + -- Calculate remaining length for header tree + local remaining = tvb:len() - offset + if remaining < 1 then + return nil + end + + -- Create header tree using ProtoField + local header_tree = tree:add(f_req_header, tvb(offset, remaining)) + + -- Message ID (vlong) + local message_id, id_len = read_vlong(tvb, offset) + if message_id == nil or id_len == 0 then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to read message ID") + return nil + end + + -- For vlong (custom encoding), add bytes and append decoded text + local msg_id_item = header_tree:add(f_req_message_id, tvb(offset, id_len)) + msg_id_item:append_text(string.format(" (%d)", message_id)) + offset = offset + id_len + + -- Version (u1) + local version = tvb(offset, 1):uint() + header_tree:add(f_req_version, tvb(offset, 1)):append_text(string.format(" (Protocol %d.%d)", + math.floor(version / 10), version % 10)) + offset = offset + 1 + + -- Opcode (u1) + local opcode = tvb(offset, 1):uint() + local opcode_name = request_opcodes[opcode] or "UNKNOWN" + header_tree:add(f_req_opcode, tvb(offset, 1)):append_text(string.format(" (%s)", opcode_name)) + offset = offset + 1 + + -- Cache name (vint length + UTF-8 string) + local cache_name, cache_name_len = read_lp_string(tvb, offset) + if cache_name == nil or cache_name_len == 0 then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to read cache name") + return nil + end + header_tree:add(f_req_cache_name, tvb(offset, cache_name_len), cache_name) + offset = offset + cache_name_len + + -- Flags (vint) + local flags, flags_len = read_vint(tvb, offset) + if flags == nil or flags_len == 0 then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to read flags") + return nil + end + -- For vint (custom encoding), add bytes and append decoded text + local flags_item = header_tree:add(f_req_flags, tvb(offset, flags_len)) + flags_item:append_text(string.format(" (%d)", flags)) + offset = offset + flags_len + + -- Client Intelligence (u1) + local intelligence = tvb(offset, 1):uint() + local intelligence_name = client_intelligence[intelligence] or "Unknown" + header_tree:add(f_req_client_intelligence, tvb(offset, 1)):append_text(string.format(" (%s)", intelligence_name)) + offset = offset + 1 + + -- Topology ID (vint) + local topology_id, topo_len = read_vint(tvb, offset) + if topology_id == nil or topo_len == 0 then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to read topology ID") + return nil + end + -- For vint (custom encoding), add bytes and append decoded text + local topo_item = header_tree:add(f_req_topology_id, tvb(offset, topo_len)) + topo_item:append_text(string.format(" (%d)", topology_id)) + offset = offset + topo_len + + -- MediaType parsing (protocol 2.8+) + if version >= 28 then + -- Key Media Type + local key_media, key_media_len = parse_media_type(tvb, offset, header_tree, "Key Media Type") + if key_media ~= nil then + offset = offset + key_media_len + else + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to parse key media type") + return nil + end + + -- Value Media Type + local value_media, value_media_len = parse_media_type(tvb, offset, header_tree, "Value Media Type") + if value_media ~= nil then + offset = offset + value_media_len + else + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to parse value media type") + return nil + end + end + + -- Other Params parsing (protocol 4.0+) + if version >= 40 then + local other_param_count, param_count_len = read_vint(tvb, offset) + if other_param_count == nil then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to read other param count") + return nil + end + + -- For vint, add bytes and append decoded text + local other_count_item = header_tree:add(f_other_param_count, tvb(offset, param_count_len)) + other_count_item:append_text(string.format(" (%d)", other_param_count)) + offset = offset + param_count_len + + -- Read other parameters + for i = 1, other_param_count do + -- Parameter key (lp_string) + local param_key, key_len = read_lp_string(tvb, offset) + if param_key == nil then + break + end + + local param_item = header_tree:add(tvb(offset, 1), string.format("Other Parameter %d", i - 1)) + param_item:add(f_other_param_key, tvb(offset, key_len), param_key) + offset = offset + key_len + + -- Parameter value (lp_bytes - raw bytes, not string) + local param_value_range, value_len = read_lp_bytes(tvb, offset) + if param_value_range == nil then + break + end + param_item:add(f_other_param_value, tvb(offset, value_len)) + param_item:set_len(key_len + value_len) + offset = offset + value_len + end + end + + local header_info = { + message_id = message_id, + version = version, + opcode = opcode, + opcode_name = opcode_name, + cache_name = cache_name, + intelligence = intelligence, + header_length = offset - start_offset + } + + -- Store request for correlation (first pass only) + if not pinfo.visited then + -- Mark this message_id as pending, waiting for response + pending_requests[message_id] = pinfo.number + end + + -- Check if we have a response for this request + local response_frame = request_to_response[pinfo.number] + if response_frame then + local resp_frame_item = header_tree:add(f_req_in_frame, response_frame) + resp_frame_item:set_generated() + end + + return header_info +end + +-- ============================================================================ +-- Response Header Parser +-- ============================================================================ + +function parse_response_header(tvb, offset, tree, pinfo) + local start_offset = offset + + -- Calculate remaining length for header tree + local remaining = tvb:len() - offset + if remaining < 1 then + return nil + end + + -- Create header tree using ProtoField + local header_tree = tree:add(f_resp_header, tvb(offset, remaining)) + + -- Message ID (vlong) + local message_id, id_len = read_vlong(tvb, offset) + if message_id == nil or id_len == 0 then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to read message ID") + return nil + end + + -- For vlong (custom encoding), add bytes and append decoded text + local msg_id_item = header_tree:add(f_resp_message_id, tvb(offset, id_len)) + msg_id_item:append_text(string.format(" (%d)", message_id)) + offset = offset + id_len + + -- Opcode (u1) + local opcode = tvb(offset, 1):uint() + local opcode_name = response_opcodes[opcode] or "UNKNOWN" + header_tree:add(f_resp_opcode, tvb(offset, 1)):append_text(string.format(" (%s)", opcode_name)) + offset = offset + 1 + + -- Status (u1) - Not present for event opcodes (0x60-0x63) + local status = nil + local is_event = (opcode >= 0x60 and opcode <= 0x63) + if not is_event then + status = tvb(offset, 1):uint() + local status_name = status_codes[status] or "Unknown" + header_tree:add(f_resp_status, tvb(offset, 1)):append_text(string.format(" (%s)", status_name)) + offset = offset + 1 + + -- Topology Change Marker (u1) + local topology_marker = tvb(offset, 1):uint() + header_tree:add(f_resp_topology_marker, tvb(offset, 1)) + offset = offset + 1 + + -- Parse topology change if marker != 0 (assumes intelligence 0x03) + if topology_marker ~= 0 then + local topo_change, topo_len = parse_topology_change(tvb, offset, header_tree) + if topo_change ~= nil then + offset = offset + topo_len + else + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Failed to parse topology change") + end + end + end + + local header_info = { + message_id = message_id, + opcode = opcode, + opcode_name = opcode_name, + status = status, + is_event = is_event, + header_length = offset - start_offset + } + + -- Match response with pending request (first pass only) + if not pinfo.visited then + local request_frame = pending_requests[message_id] + if request_frame then + -- Found the matching request, create bidirectional mapping + request_to_response[request_frame] = pinfo.number + response_to_request[pinfo.number] = request_frame + -- Clear the pending request + pending_requests[message_id] = nil + end + end + + -- Check if we have a request for this response + local request_frame = response_to_request[pinfo.number] + if request_frame then + local req_frame_item = header_tree:add(f_resp_in_frame, request_frame) + req_frame_item:set_generated() + end + + return header_info +end + +-- ============================================================================ +-- Main Dissector Function +-- ============================================================================ + +function hotrod_protocol.dissector(tvb, pinfo, tree) + -- Check minimum length (at least magic byte + message_id start) + if tvb:len() < 2 then + return 0 + end + + -- Ensure tree is valid + if not tree then + return 0 + end + + -- Check magic byte + local magic = tvb(0, 1):uint() + if magic ~= 0xA0 and magic ~= 0xA1 then + -- Not a Hot Rod packet + return 0 + end + + -- Set protocol column + pinfo.cols.protocol = "HotRod" + + -- Create protocol tree + local subtree = tree:add(hotrod_protocol, tvb(), "Hot Rod Protocol") + + -- Add magic byte + local magic_item = subtree:add(f_magic, tvb(0, 1)) + local offset = 1 + + -- Determine if request or response + local is_request = (magic == 0xA0) + + if is_request then + magic_item:append_text(" (Request)") + pinfo.cols.info = "Request: " + + local header_info = parse_request_header(tvb, offset, subtree, pinfo) + if header_info == nil then + return tvb:len() + end + + pinfo.cols.info:append(header_info.opcode_name) + offset = offset + header_info.header_length + + -- Parse request body based on opcode + if header_info.opcode == 0x01 then -- PUT + offset = parse_put_request(tvb, offset, subtree) + elseif header_info.opcode == 0x03 then -- GET + offset = parse_get_request(tvb, offset, subtree) + elseif header_info.opcode == 0x05 then -- PUT_IF_ABSENT + offset = parse_put_if_absent_request(tvb, offset, subtree) + elseif header_info.opcode == 0x07 then -- REPLACE + offset = parse_replace_request(tvb, offset, subtree) + elseif header_info.opcode == 0x09 then -- REPLACE_IF_UNMODIFIED + offset = parse_replace_if_unmodified_request(tvb, offset, subtree) + elseif header_info.opcode == 0x0B then -- REMOVE + offset = parse_remove_request(tvb, offset, subtree) + elseif header_info.opcode == 0x0D then -- REMOVE_IF_UNMODIFIED + offset = parse_remove_if_unmodified_request(tvb, offset, subtree) + elseif header_info.opcode == 0x0F then -- CONTAINS_KEY + offset = parse_contains_key_request(tvb, offset, subtree) + elseif header_info.opcode == 0x1B then -- GET_WITH_METADATA + offset = parse_get_with_metadata_request(tvb, offset, subtree) + elseif header_info.opcode == 0x19 then -- BULK_GET + offset = parse_bulk_get_request(tvb, offset, subtree) + elseif header_info.opcode == 0x1D then -- BULK_GET_KEYS + offset = parse_bulk_get_keys_request(tvb, offset, subtree) + elseif header_info.opcode == 0x1F then -- QUERY + offset = parse_query_request(tvb, offset, subtree) + elseif header_info.opcode == 0x21 then -- AUTH_MECH_LIST + offset = parse_auth_mech_list_request(tvb, offset, subtree) + elseif header_info.opcode == 0x23 then -- AUTH + offset = parse_auth_request(tvb, offset, subtree) + elseif header_info.opcode == 0x25 then -- ADD_CLIENT_LISTENER + offset = parse_add_client_listener_request(tvb, offset, subtree) + elseif header_info.opcode == 0x27 then -- REMOVE_CLIENT_LISTENER + offset = parse_remove_client_listener_request(tvb, offset, subtree) + elseif header_info.opcode == 0x2B then -- EXEC + offset = parse_exec_request(tvb, offset, subtree) + elseif header_info.opcode == 0x2D then -- PUT_ALL + offset = parse_put_all_request(tvb, offset, subtree) + elseif header_info.opcode == 0x2F then -- GET_ALL + offset = parse_get_all_request(tvb, offset, subtree) + elseif header_info.opcode == 0x31 then -- ITERATION_START + offset = parse_iteration_start_request(tvb, offset, subtree) + elseif header_info.opcode == 0x33 then -- ITERATION_NEXT + offset = parse_iteration_next_request(tvb, offset, subtree) + elseif header_info.opcode == 0x35 then -- ITERATION_END + offset = parse_iteration_end_request(tvb, offset, subtree) + elseif header_info.opcode == 0x3B then -- PREPARE + offset = parse_prepare_request(tvb, offset, subtree) + elseif header_info.opcode == 0x3D then -- COMMIT + offset = parse_commit_request(tvb, offset, subtree) + elseif header_info.opcode == 0x3F then -- ROLLBACK + offset = parse_rollback_request(tvb, offset, subtree) + elseif header_info.opcode == 0x41 then -- ADD_BLOOM_FILTER_LISTENER + offset = parse_add_bloom_filter_listener_request(tvb, offset, subtree) + elseif header_info.opcode == 0x43 then -- UPDATE_BLOOM_FILTER + offset = parse_update_bloom_filter_request(tvb, offset, subtree) + elseif header_info.opcode == 0x4B then -- COUNTER_CREATE + offset = parse_counter_create_request(tvb, offset, subtree) + elseif header_info.opcode == 0x4D then -- COUNTER_GET_CONFIGURATION + offset = parse_counter_name_request(tvb, offset, subtree) + elseif header_info.opcode == 0x4F then -- COUNTER_IS_DEFINED + offset = parse_counter_name_request(tvb, offset, subtree) + elseif header_info.opcode == 0x52 then -- COUNTER_ADD_AND_GET + offset = parse_counter_add_and_get_request(tvb, offset, subtree) + elseif header_info.opcode == 0x54 then -- COUNTER_RESET + offset = parse_counter_name_request(tvb, offset, subtree) + elseif header_info.opcode == 0x56 then -- COUNTER_GET_VALUE + offset = parse_counter_name_request(tvb, offset, subtree) + elseif header_info.opcode == 0x58 then -- COUNTER_CAS + offset = parse_counter_cas_request(tvb, offset, subtree) + elseif header_info.opcode == 0x5A then -- COUNTER_ADD_LISTENER + offset = parse_counter_name_request(tvb, offset, subtree) + elseif header_info.opcode == 0x5C then -- COUNTER_REMOVE_LISTENER + offset = parse_counter_name_request(tvb, offset, subtree) + elseif header_info.opcode == 0x5E then -- COUNTER_REMOVE + offset = parse_counter_name_request(tvb, offset, subtree) + elseif header_info.opcode == 0x7F then -- COUNTER_GET_AND_SET + offset = parse_counter_get_and_set_request(tvb, offset, subtree) + elseif header_info.opcode == 0x67 then -- MULTIMAP_GET + offset = parse_multimap_get_request(tvb, offset, subtree) + elseif header_info.opcode == 0x69 then -- MULTIMAP_GET_WITH_METADATA + offset = parse_multimap_get_request(tvb, offset, subtree) + elseif header_info.opcode == 0x6B then -- MULTIMAP_PUT + offset = parse_multimap_put_request(tvb, offset, subtree) + elseif header_info.opcode == 0x6D then -- MULTIMAP_REMOVE_KEY + offset = parse_multimap_get_request(tvb, offset, subtree) + elseif header_info.opcode == 0x6F then -- MULTIMAP_REMOVE_ENTRY + offset = parse_multimap_put_request(tvb, offset, subtree) + elseif header_info.opcode == 0x73 then -- MULTIMAP_CONTAINS_ENTRY + offset = parse_multimap_contains_entry_request(tvb, offset, subtree) + elseif header_info.opcode == 0x75 then -- MULTIMAP_CONTAINS_KEY + offset = parse_multimap_get_request(tvb, offset, subtree) + elseif header_info.opcode == 0x77 then -- MULTIMAP_CONTAINS_VALUE + offset = parse_multimap_contains_value_request(tvb, offset, subtree) + elseif header_info.opcode == 0xE9 then -- GET_STREAM_START + offset = parse_get_stream_start_request(tvb, offset, subtree) + elseif header_info.opcode == 0xE7 then -- GET_STREAM_NEXT + offset = parse_get_stream_next_request(tvb, offset, subtree) + elseif header_info.opcode == 0xE5 then -- GET_STREAM_END + offset = parse_get_stream_next_request(tvb, offset, subtree) + elseif header_info.opcode == 0xEF then -- PUT_STREAM_START + offset = parse_put_stream_start_request(tvb, offset, subtree) + elseif header_info.opcode == 0xED then -- PUT_STREAM_NEXT + offset = parse_put_stream_next_request(tvb, offset, subtree) + elseif header_info.opcode == 0xEB then -- PUT_STREAM_END + offset = parse_get_stream_next_request(tvb, offset, subtree) + elseif header_info.opcode == 0x79 then -- FORGET_TX + offset = parse_forget_tx_request(tvb, offset, subtree) + elseif header_info.opcode == 0x7D then -- PREPARE_V2 + offset = parse_prepare_v2_request(tvb, offset, subtree) + end + + else + magic_item:append_text(" (Response)") + pinfo.cols.info = "Response: " + + local header_info = parse_response_header(tvb, offset, subtree, pinfo) + if header_info == nil then + return tvb:len() + end + + pinfo.cols.info:append(header_info.opcode_name) + offset = offset + header_info.header_length + + -- Parse response body based on opcode + -- We need the request version for protocol-specific parsing + -- For now, assume protocol 4.0+ (we can enhance this with version tracking later) + local version = 40 -- Default to 4.0 for now + + if header_info.opcode == 0x02 then -- PUT response + offset = parse_put_response(tvb, offset, subtree, header_info.status, version) + elseif header_info.opcode == 0x04 then -- GET response + offset = parse_get_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x06 then -- PUT_IF_ABSENT response + offset = parse_put_if_absent_response(tvb, offset, subtree, header_info.status, version) + elseif header_info.opcode == 0x08 then -- REPLACE response + offset = parse_replace_response(tvb, offset, subtree, header_info.status, version) + elseif header_info.opcode == 0x0A then -- REPLACE_IF_UNMODIFIED response + offset = parse_replace_if_unmodified_response(tvb, offset, subtree, header_info.status, version) + elseif header_info.opcode == 0x0C then -- REMOVE response + offset = parse_remove_response(tvb, offset, subtree, header_info.status, version) + elseif header_info.opcode == 0x0E then -- REMOVE_IF_UNMODIFIED response + offset = parse_remove_if_unmodified_response(tvb, offset, subtree, header_info.status, version) + elseif header_info.opcode == 0x10 then -- CONTAINS_KEY response + offset = parse_contains_key_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x14 then -- CLEAR response + offset = parse_clear_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x18 then -- PING response + offset = parse_ping_response(tvb, offset, subtree) + elseif header_info.opcode == 0x16 then -- STATS response + offset = parse_stats_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x2A then -- SIZE response + offset = parse_size_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x1C then -- GET_WITH_METADATA response + offset = parse_get_with_metadata_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x1A then -- BULK_GET response + offset = parse_bulk_get_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x1E then -- BULK_GET_KEYS response + offset = parse_bulk_get_keys_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x20 then -- QUERY response + offset = parse_query_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x22 then -- AUTH_MECH_LIST response + offset = parse_auth_mech_list_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x24 then -- AUTH response + offset = parse_auth_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x26 then -- ADD_CLIENT_LISTENER response + offset = parse_add_client_listener_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x28 then -- REMOVE_CLIENT_LISTENER response + offset = parse_remove_client_listener_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x2C then -- EXEC response + offset = parse_exec_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x2E then -- PUT_ALL response + offset = parse_put_all_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x30 then -- GET_ALL response + offset = parse_get_all_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x32 then -- ITERATION_START response + offset = parse_iteration_start_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x34 then -- ITERATION_NEXT response + offset = parse_iteration_next_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x36 then -- ITERATION_END response + offset = parse_iteration_end_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x3C then -- PREPARE response + offset = parse_prepare_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x3E then -- COMMIT response + offset = parse_commit_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x40 then -- ROLLBACK response + offset = parse_rollback_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x42 then -- ADD_BLOOM_FILTER_LISTENER response + offset = parse_add_bloom_filter_listener_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x44 then -- UPDATE_BLOOM_FILTER response + offset = parse_update_bloom_filter_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x4C then -- COUNTER_CREATE response + offset = parse_counter_create_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x4E then -- COUNTER_GET_CONFIGURATION response + offset = parse_counter_get_configuration_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x50 then -- ERROR response + offset = parse_error_response(tvb, offset, subtree) + elseif header_info.opcode == 0x51 then -- COUNTER_IS_DEFINED response + offset = parse_counter_is_defined_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x53 then -- COUNTER_ADD_AND_GET response + offset = parse_counter_value_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x55 then -- COUNTER_RESET response + offset = parse_counter_reset_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x57 then -- COUNTER_GET_VALUE response + offset = parse_counter_value_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x59 then -- COUNTER_CAS response + offset = parse_counter_value_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x5B then -- COUNTER_ADD_LISTENER response + offset = parse_counter_add_listener_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x5D then -- COUNTER_REMOVE_LISTENER response + offset = parse_counter_remove_listener_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x5F then -- COUNTER_REMOVE response + offset = parse_counter_remove_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x65 then -- COUNTER_GET_NAMES response + offset = parse_counter_get_names_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x80 then -- COUNTER_GET_AND_SET response + offset = parse_counter_value_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x68 then -- MULTIMAP_GET response + offset = parse_multimap_get_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x6A then -- MULTIMAP_GET_WITH_METADATA response + offset = parse_multimap_get_with_metadata_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x6C then -- MULTIMAP_PUT response + offset = parse_multimap_put_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x6E then -- MULTIMAP_REMOVE_KEY response + offset = parse_multimap_contains_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x70 then -- MULTIMAP_REMOVE_ENTRY response + offset = parse_multimap_contains_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x72 then -- MULTIMAP_SIZE response + offset = parse_multimap_size_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x74 then -- MULTIMAP_CONTAINS_ENTRY response + offset = parse_multimap_contains_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x76 then -- MULTIMAP_CONTAINS_KEY response + offset = parse_multimap_contains_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x78 then -- MULTIMAP_CONTAINS_VALUE response + offset = parse_multimap_contains_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x7A then -- FORGET_TX response + offset = parse_forget_tx_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0xE4 then -- GET_STREAM_END response + offset = parse_get_stream_end_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0xE6 then -- GET_STREAM_NEXT response + offset = parse_get_stream_next_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0xE8 then -- GET_STREAM_START response + offset = parse_get_stream_start_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0xEA then -- GET_STREAM_START response (duplicate?) + offset = parse_get_stream_start_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0xEC then -- PUT_STREAM_NEXT response + offset = parse_put_stream_next_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0xEE then -- PUT_STREAM_START response + offset = parse_put_stream_start_response_ex(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x7C then -- FETCH_IN_DOUBT_TX response + offset = parse_fetch_in_doubt_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x7E then -- PREPARE_V2 response + offset = parse_prepare_v2_response(tvb, offset, subtree, header_info.status) + elseif header_info.opcode == 0x60 then -- CACHE_ENTRY_CREATED_EVENT + offset = parse_cache_entry_event(tvb, offset, subtree) + elseif header_info.opcode == 0x61 then -- CACHE_ENTRY_MODIFIED_EVENT + offset = parse_cache_entry_event(tvb, offset, subtree) + elseif header_info.opcode == 0x62 then -- CACHE_ENTRY_REMOVED_EVENT + offset = parse_cache_entry_event(tvb, offset, subtree) + elseif header_info.opcode == 0x63 then -- CACHE_ENTRY_EXPIRED_EVENT + offset = parse_cache_entry_event(tvb, offset, subtree) + elseif header_info.opcode == 0x66 then -- COUNTER_EVENT + offset = parse_counter_event(tvb, offset, subtree) + end + end + + return tvb:len() +end + +-- ============================================================================ +-- Protocol Registration +-- ============================================================================ + +-- Register on TCP port 11222 (default Hot Rod port) +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(11222, hotrod_protocol) + +-- Heuristic dissector for auto-detection on non-standard ports +local function heuristic_checker(tvb, pinfo, tree) + -- Need at least 2 bytes to check magic + if tvb:len() < 2 then + return false + end + + -- Check for Hot Rod magic byte + local magic = tvb(0, 1):uint() + if magic ~= 0xA0 and magic ~= 0xA1 then + return false + end + + -- Looks like Hot Rod - dissect it + hotrod_protocol.dissector(tvb, pinfo, tree) + pinfo.conversation = hotrod_protocol + return true +end + +-- Register heuristic dissector +-- NOTE: Auto-detects HotRod traffic on any TCP port by checking for magic bytes (0xA0/0xA1) +-- This may slow down plugin reload on very large capture files (>10k packets) +hotrod_protocol:register_heuristic("tcp", heuristic_checker) diff --git a/dissectors/hotrod/schemas/README.md b/dissectors/hotrod/schemas/README.md new file mode 100644 index 0000000..be85671 --- /dev/null +++ b/dissectors/hotrod/schemas/README.md @@ -0,0 +1,71 @@ +# HotRod Protocol Schemas + +This directory contains Kaitai Struct schemas for the HotRod protocol. + +## Files + +- **hotrod40.ksy** - Kaitai Struct schema for HotRod Protocol 4.0 +- **hotrod30.ksy** - Kaitai Struct schema for HotRod Protocol 3.0 + +## What is Kaitai Struct? + +[Kaitai Struct](https://kaitai.io/) is a declarative language for describing binary data structures. These schemas provide a formal specification of the HotRod protocol that can be: + +- Used to generate parsers in various programming languages +- Serve as documentation for the protocol structure +- Validate protocol implementations +- Generate visualizations of protocol messages + +## Usage + +### Compile to Parser Code + +You can use the Kaitai Struct compiler to generate parser code in various languages: + +```bash +# Install Kaitai Struct compiler +# See: https://kaitai.io/#download + +# Compile to Python +kaitai-struct-compiler -t python hotrod40.ksy + +# Compile to Java +kaitai-struct-compiler -t java hotrod40.ksy + +# Compile to C++ +kaitai-struct-compiler -t cpp_stl hotrod40.ksy +``` + +### Visualize Protocol + +Use the [Kaitai Struct Web IDE](https://ide.kaitai.io/) to: +1. Load the schema +2. Upload a capture file +3. Visualize the parsed structure + +## Protocol Versions + +### HotRod 4.0 (hotrod40.ksy) +- Introduced in Infinispan 14.0 +- Protocol version byte: 0x28 (40 decimal) +- Key changes: PUT/REPLACE/REMOVE responses include metadata + +### HotRod 3.0 (hotrod30.ksy) +- Used in Infinispan 9.x - 13.x +- Protocol version byte: 0x1F (31 decimal) +- Legacy protocol for older Infinispan versions + +## Relationship to Wireshark Dissector + +The Lua dissector in [src/hotrod.lua](../src/hotrod.lua) implements the same protocol parsing but is optimized for Wireshark. The Kaitai schemas serve as: + +- Reference specification +- Cross-validation tool +- Alternative parser implementation +- Documentation + +## Links + +- [Kaitai Struct](https://kaitai.io/) +- [Kaitai Struct Format Gallery](https://formats.kaitai.io/) +- [HotRod Protocol Specification](https://infinispan.org/docs/stable/titles/hotrod_protocol/hotrod_protocol.html) diff --git a/dissectors/hotrod/schemas/hotrod30.ksy b/dissectors/hotrod/schemas/hotrod30.ksy new file mode 100644 index 0000000..75c2e35 --- /dev/null +++ b/dissectors/hotrod/schemas/hotrod30.ksy @@ -0,0 +1,1588 @@ +meta: + id: hotrod30 + title: Infinispan Hot Rod Protocol 3.x + endian: be + license: Apache-2.0 + +doc: | + Hot Rod is a binary TCP client-server protocol used by Infinispan. + This schema describes protocol versions 3.0 and 3.1. + + Protocol 3.0 was introduced in Infinispan 9.0. + Protocol 3.1 was introduced in Infinispan 12.0. + + Key differences from 4.x: + - PUT/REPLACE/REMOVE responses with previous values return only the value (no metadata) + - Request headers do not include "other params" field + + For more information, see: + https://infinispan.org/docs/stable/titles/hotrod_java/hotrod_java.html + +seq: + - id: magic + type: u1 + - id: message + type: + switch-on: magic + cases: + 0xA0: request_message + 0xA1: response_message + +types: + + request_message: + seq: + - id: header + type: request_header + - id: body + type: + switch-on: header.opcode + cases: + 'request_opcode::put': put_request + 'request_opcode::put_if_absent': put_request + 'request_opcode::replace': put_request + 'request_opcode::replace_if_unmodified': replace_if_unmodified_request + 'request_opcode::remove_if_unmodified': remove_if_unmodified_request + 'request_opcode::get': key_request + 'request_opcode::get_with_metadata': key_request + 'request_opcode::contains_key': key_request + 'request_opcode::remove': key_request + 'request_opcode::bulk_get': bulk_get_request + 'request_opcode::put_all': put_all_request + 'request_opcode::get_all': get_all_request + 'request_opcode::query': query_request + 'request_opcode::auth': auth_request + 'request_opcode::exec': exec_request + 'request_opcode::iteration_start': iteration_start_request + 'request_opcode::iteration_next': iteration_next_or_end_request + 'request_opcode::iteration_end': iteration_next_or_end_request + 'request_opcode::add_client_listener': add_listener_request + 'request_opcode::remove_client_listener': remove_listener_request + 'request_opcode::add_bloom_filter_listener': bloom_filter_listener_request + 'request_opcode::update_bloom_filter': update_bloom_filter_request + 'request_opcode::get_stream_start': get_stream_start_request + 'request_opcode::get_stream_next': get_stream_next_request + 'request_opcode::get_stream_end': get_stream_end_request + 'request_opcode::put_stream_start': put_stream_start_request + 'request_opcode::put_stream_next': put_stream_next_request + 'request_opcode::put_stream_end': put_stream_end_request + 'request_opcode::commit': tx_commit_or_rollback_request + 'request_opcode::rollback': tx_commit_or_rollback_request + 'request_opcode::forget_tx': forget_tx_request + 'request_opcode::counter_create': counter_create_request + 'request_opcode::counter_get_value': counter_name_request + 'request_opcode::counter_reset': counter_name_request + 'request_opcode::counter_add_and_get': counter_add_and_get_request + 'request_opcode::counter_cas': counter_cas_request + 'request_opcode::counter_is_defined': counter_name_request + 'request_opcode::counter_remove': counter_name_request + 'request_opcode::counter_get_configuration': counter_name_request + 'request_opcode::counter_get_and_set': counter_get_and_set_request + 'request_opcode::prepare_v2': prepare_request_v2 + 'request_opcode::multimap_get': multimap_get_request + 'request_opcode::multimap_get_with_metadata': multimap_get_request + 'request_opcode::multimap_put': multimap_put_request + 'request_opcode::multimap_remove_key': multimap_get_request + 'request_opcode::multimap_remove_entry': multimap_put_request + 'request_opcode::multimap_size': multimap_size_request + 'request_opcode::multimap_contains_key': multimap_get_request + 'request_opcode::multimap_contains_value': multimap_contains_value_request + 'request_opcode::multimap_contains_entry': multimap_contains_entry_request + if: | + header.opcode != request_opcode::ping and + header.opcode != request_opcode::clear and + header.opcode != request_opcode::stats and + header.opcode != request_opcode::size and + header.opcode != request_opcode::auth_mech_list and + header.opcode != request_opcode::bulk_get_keys and + header.opcode != request_opcode::prepare and + header.opcode != request_opcode::fetch_in_doubt_tx and + header.opcode != request_opcode::counter_add_listener and + header.opcode != request_opcode::counter_remove_listener + + response_message: + seq: + - id: header + type: response_header + - id: body + type: + switch-on: header.opcode + cases: + 'response_opcode::get': get_response + 'response_opcode::get_with_metadata': get_with_metadata_response + 'response_opcode::put': put_response + 'response_opcode::put_if_absent': put_response + 'response_opcode::replace': put_response + 'response_opcode::replace_if_unmodified': put_response + 'response_opcode::remove': put_response + 'response_opcode::remove_if_unmodified': put_response + 'response_opcode::bulk_get': bulk_get_response + 'response_opcode::get_all': get_all_response + 'response_opcode::query': query_response + 'response_opcode::exec': exec_response + 'response_opcode::auth_mech_list': auth_mech_list_response + 'response_opcode::auth': auth_response + 'response_opcode::iteration_start': iteration_start_response + 'response_opcode::iteration_next': iteration_next_response + 'response_opcode::get_stream_start': get_stream_start_response + 'response_opcode::get_stream_next': get_stream_next_response + 'response_opcode::put_stream_start': put_stream_start_response + 'response_opcode::prepare': tx_response + 'response_opcode::prepare_v2': tx_response + 'response_opcode::commit': tx_response + 'response_opcode::rollback': tx_response + 'response_opcode::fetch_tx_recovery': fetch_in_doubt_response + 'response_opcode::counter_get_configuration': counter_get_configuration_response + 'response_opcode::counter_get_value': counter_value_response + 'response_opcode::counter_add_and_get': counter_value_response + 'response_opcode::counter_cas': counter_value_response + 'response_opcode::counter_get_and_set': counter_value_response + 'response_opcode::counter_get_names': counter_get_names_response + 'response_opcode::ping': ping_response + 'response_opcode::stats': stats_response + 'response_opcode::size': size_response + 'response_opcode::multimap_get': multimap_get_response + 'response_opcode::multimap_get_with_metadata': multimap_get_with_metadata_response + 'response_opcode::multimap_size': multimap_size_response + 'response_opcode::multimap_remove_key': multimap_contains_response + 'response_opcode::multimap_remove_entry': multimap_contains_response + 'response_opcode::multimap_contains_entry': multimap_contains_response + 'response_opcode::multimap_contains_key': multimap_contains_response + 'response_opcode::multimap_contains_value': multimap_contains_response + 'response_opcode::error': error_response + 'response_opcode::cache_entry_created_event': cache_entry_created_event + 'response_opcode::cache_entry_modified_event': cache_entry_modified_event + 'response_opcode::cache_entry_removed_event': cache_entry_removed_event + 'response_opcode::cache_entry_expired_event': cache_entry_expired_event + if: | + header.opcode != response_opcode::contains_key and + header.opcode != response_opcode::clear and + header.opcode != response_opcode::add_client_listener and + header.opcode != response_opcode::remove_client_listener and + header.opcode != response_opcode::add_bloom_filter_listener and + header.opcode != response_opcode::update_bloom_filter and + header.opcode != response_opcode::counter_create and + header.opcode != response_opcode::counter_reset and + header.opcode != response_opcode::counter_remove and + header.opcode != response_opcode::iteration_end and + header.opcode != response_opcode::get_stream_end and + header.opcode != response_opcode::put_stream_end and + header.opcode != response_opcode::put_stream_next and + header.opcode != response_opcode::counter_event and + header.opcode != response_opcode::counter_is_defined and + header.opcode != response_opcode::multimap_put and + header.opcode != response_opcode::forget_tx + + + # ============================================================================ + # Fundamental Types + # ============================================================================ + + # Variable-length unsigned integer (1-5 bytes). + # High bit of each byte indicates continuation. + # Identical to protobuf varint32. + vint: + seq: + - id: groups + type: vint_group + repeat: until + repeat-until: not _.has_more + instances: + value: + value: >- + groups[0].value + + (groups.size > 1 ? (groups[1].value << 7) : 0) + + (groups.size > 2 ? (groups[2].value << 14) : 0) + + (groups.size > 3 ? (groups[3].value << 21) : 0) + + (groups.size > 4 ? (groups[4].value << 28) : 0) + + vint_group: + seq: + - id: b + type: u1 + instances: + has_more: + value: (b & 0x80) != 0 + value: + value: b & 0x7F + + # Variable-length signed integer (1-5 bytes). + # ZigZag encoding + # Identical to protobuf varint32. + signed_vint: + seq: + - id: groups + type: vint_group + repeat: until + repeat-until: not _.has_more + instances: + value: + value: >- + groups[0].value + + (groups.size > 1 ? (groups[1].value << 7) : 0) + + (groups.size > 2 ? (groups[2].value << 14) : 0) + + (groups.size > 3 ? (groups[3].value << 21) : 0) + + (groups.size > 4 ? (groups[4].value << 28) : 0) + signed: + value: (value >> 1) ^ -(value & 1) + + # Variable-length unsigned long (1-9 bytes). + # Same encoding as vint but extended to 64-bit values. + vlong: + seq: + - id: groups + type: vint_group + repeat: until + repeat-until: not _.has_more + instances: + value: + value: >- + groups[0].value + + (groups.size > 1 ? (groups[1].value << 7) : 0) + + (groups.size > 2 ? (groups[2].value << 14) : 0) + + (groups.size > 3 ? (groups[3].value << 21) : 0) + + (groups.size > 4 ? (groups[4].value << 28) : 0) + + (groups.size > 5 ? (groups[5].value << 35) : 0) + + (groups.size > 6 ? (groups[6].value << 42) : 0) + + (groups.size > 7 ? (groups[7].value << 49) : 0) + + (groups.size > 8 ? (groups[8].value << 56) : 0) + + # A length-prefixed byte array: vInt length followed by that many bytes. + lp_bytes: + seq: + - id: length + type: vint + - id: data + size: length.value + + # A length-prefixed UTF-8 string: vInt length followed by UTF-8 bytes. + lp_string: + seq: + - id: length + type: vint + - id: data + type: str + encoding: UTF-8 + size: length.value + + # ============================================================================ + # MediaType Encoding (Protocol 2.8+) + # ============================================================================ + + # MediaType descriptor used in request headers since protocol 2.8. + media_type: + seq: + - id: type_indicator + type: u1 + enum: media_type_kind + - id: predefined_id + type: vint + enum: predefined_media_type_id + if: type_indicator == media_type_kind::predefined + - id: custom_string + type: lp_string + if: type_indicator == media_type_kind::custom + - id: param_count + type: vint + if: type_indicator == media_type_kind::predefined or type_indicator == media_type_kind::custom + - id: params + type: media_type_param + repeat: expr + repeat-expr: param_count.value + if: (type_indicator == media_type_kind::predefined or type_indicator == media_type_kind::custom) and param_count.value > 0 + + media_type_param: + seq: + - id: key + type: lp_string + - id: value + type: lp_string + + other_param: + seq: + - id: key + type: lp_string + - id: value + type: lp_bytes + + # ============================================================================ + # Request Header (Protocol 4.1) + # ============================================================================ + + # Full request header for protocol versions >= 2.8 (with MediaType support). + request_header: + seq: + # Expected: 0xA0 + - id: message_id + type: vlong + - id: version + type: u1 + # 30 for protocol 3.0, 31 for protocol 3.1 + - id: opcode + type: u1 + enum: request_opcode + - id: cache_name_length + type: vint + - id: cache_name + type: str + encoding: UTF-8 + size: cache_name_length.value + - id: flags + type: vint + - id: client_intelligence + type: u1 + enum: client_intelligence_type + - id: topology_id + type: vint + # MediaType fields added in protocol 2.8 + - id: key_media_type + type: media_type + if: version >= 28 + - id: value_media_type + type: media_type + if: version >= 28 + # Note: Protocol 4.0+ adds other_param_count and other_params here, + # but these are not present in protocol 3.x + + # ============================================================================ + # Response Header + # ============================================================================ + + response_header: + seq: + - id: message_id + type: vlong + - id: opcode + type: u1 + enum: response_opcode + - id: status + type: u1 + enum: response_status + if: | + opcode != response_opcode::cache_entry_created_event and + opcode != response_opcode::cache_entry_modified_event and + opcode != response_opcode::cache_entry_removed_event and + opcode != response_opcode::cache_entry_expired_event + - id: topology_change_marker + type: u1 + if: | + opcode != response_opcode::cache_entry_created_event and + opcode != response_opcode::cache_entry_modified_event and + opcode != response_opcode::cache_entry_removed_event and + opcode != response_opcode::cache_entry_expired_event + - id: topology_change + type: topology_change_header + if: | + (opcode != response_opcode::cache_entry_created_event and + opcode != response_opcode::cache_entry_modified_event and + opcode != response_opcode::cache_entry_removed_event and + opcode != response_opcode::cache_entry_expired_event) and + topology_change_marker != 0 + instances: + has_previous: + value: | + status == response_status::success_with_previous or + status == response_status::not_executed_with_previous + + # ============================================================================ + # Topology Change Headers + # ============================================================================ + + # Topology-aware topology change (client intelligence 0x02) + topology_aware_header: + seq: + - id: topology_id + type: vint + - id: num_servers + type: vint + - id: servers + type: server_address + repeat: expr + repeat-expr: num_servers.value + + server_address: + seq: + - id: host + type: lp_string + - id: port + type: u2 + + # Hash-distribution-aware topology change (client intelligence 0x03, protocol >= 2.0) + hash_dist_header_v2: + seq: + - id: topology_id + type: vint + - id: num_servers + type: vint + - id: servers + type: server_address + repeat: expr + repeat-expr: num_servers.value + - id: hash_function_version + type: u1 + - id: num_segments + type: vint + - id: segments + type: segment_owners + repeat: expr + repeat-expr: num_segments.value + + segment_owners: + seq: + - id: num_owners + type: u1 + - id: owner_indices + type: u1 + repeat: expr + repeat-expr: num_owners + + # Generic topology change header - dispatches based on client intelligence. + # + # IMPORTANT: The actual response format depends on the client_intelligence + # value sent in the REQUEST header: + # - Intelligence 0x01 (BASIC): No topology change info at all + # - Intelligence 0x02 (TOPOLOGY_AWARE): Only topology_id + servers + # - Intelligence 0x03 (HASH_DISTRIBUTION_AWARE): Full format with segments + # + # This schema currently assumes HASH_DISTRIBUTION_AWARE (0x03). + # For topology-aware clients, the hash_function_version, num_segments, + # and segments fields would not be present in the response. + topology_change_header: + seq: + - id: topology_id + type: vint + - id: num_servers + type: vint + - id: servers + type: server_address + repeat: expr + repeat-expr: num_servers.value + # Fields below only present for HASH_DISTRIBUTION_AWARE (0x03) + - id: hash_function_version + type: u1 + - id: num_segments + type: vint + - id: segments + type: segment_owners + repeat: expr + repeat-expr: num_segments.value + + # ============================================================================ + # Entry Metadata + # ============================================================================ + + # Metadata block returned with GetWithMetadata/GetStream responses. + # + # IMPORTANT: In protocol 3.x, PUT/REPLACE/REMOVE responses with previous + # values return ONLY the value (no metadata). This metadata structure is + # only used for GetWithMetadata and iteration responses in 3.x. + # + # Protocol 4.0+ changed this: PUT/REPLACE/REMOVE responses also include + # metadata when returning previous values. + entry_metadata: + seq: + - id: flag + type: u1 + # Bitwise OR of: 0x01 = INFINITE_LIFESPAN, 0x02 = INFINITE_MAXIDLE + - id: created + type: s8 + if: (flag & 0x01) == 0 + - id: lifespan + type: vint + if: (flag & 0x01) == 0 + - id: last_used + type: s8 + if: (flag & 0x02) == 0 + - id: max_idle + type: vint + if: (flag & 0x02) == 0 + - id: entry_version + type: s8 + + # Expiration parameters used in PUT/REPLACE operations. + # Encodes lifespan and maxIdle with their time units in a single byte, + # followed by optional vlong values if not default/infinite. + expiration_params: + seq: + - id: time_units + type: u1 + # High nibble: lifespan time unit, Low nibble: maxIdle time unit + # 0x0-0x6 = specific time unit (SECONDS, MILLIS, NANOS, MICROS, MINUTES, HOURS, DAYS) + # 0x7 = DEFAULT (use server default) + # 0x8 = INFINITE + - id: lifespan + type: vlong + if: (time_units >> 4) != 0x07 and (time_units >> 4) != 0x08 + - id: max_idle + type: vlong + if: (time_units & 0x0F) != 0x07 and (time_units & 0x0F) != 0x08 + + # ============================================================================ + # Operations + # ============================================================================ + + # --- Key-only request body (Get, Remove, ContainsKey, GetWithVersion) --- + key_request: + seq: + - id: key + type: lp_bytes + + # --- Put/Replace/PutIfAbsent request body (protocol >= 2.2 with TimeUnits) --- + put_request: + seq: + - id: key + type: lp_bytes + - id: time_units + type: u1 + # High nibble (bits 4-7): lifespan time unit, Low nibble (bits 0-3): maxIdle time unit + - id: lifespan + type: vlong + if: (time_units >> 4) < 0x07 + - id: max_idle + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: value + type: lp_bytes + + # --- Multimap Put request body (0x6B) --- + multimap_put_request: + seq: + - id: key + type: lp_bytes + - id: time_units + type: u1 + - id: lifespan + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: max_idle + type: vlong + if: ((time_units >> 4) & 0x0F) < 0x07 + - id: value + type: lp_bytes + - id: support_duplicates + type: u1 + + # --- ReplaceIfUnmodified request body --- + replace_if_unmodified_request: + seq: + - id: key + type: lp_bytes + - id: time_units + type: u1 + - id: lifespan + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: max_idle + type: vlong + if: ((time_units >> 4) & 0x0F) < 0x07 + - id: entry_version + type: s8 + - id: value + type: lp_bytes + + # --- RemoveIfUnmodified request body --- + remove_if_unmodified_request: + seq: + - id: key + type: lp_bytes + - id: entry_version + type: s8 + + # --- Get response (0x04) --- + get_response: + seq: + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- GetWithMetadata response (0x1C) --- + get_with_metadata_response: + seq: + - id: metadata + type: entry_metadata + if: _parent.header.status == response_status::success + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- Previous value with metadata (NOT USED in protocol 3.x) --- + # This type is defined for GetWithMetadata responses but is NOT used + # in PUT/REPLACE/REMOVE responses in protocol 3.x (they return only the value). + # + # Protocol 4.0+ changed this behavior to include metadata for previous values. + previous_value_with_metadata: + seq: + - id: metadata + type: entry_metadata + - id: value + type: lp_bytes + + # --- Put/Replace/PutIfAbsent response --- + # Protocol 3.x: Returns only the previous value (no metadata) + put_response: + seq: + - id: previous_value + type: lp_bytes + if: _parent.header.has_previous + +# --- BulkGet response (0x05) --- + bulk_get_response: + seq: + - id: entries + type: bulk_arrays + if: _parent.header.status == response_status::success + + chunk: + seq: + - id: more + type: u1 + - id: value + type: lp_bytes + if: more != 0 + + bulk_arrays: + seq: + - id: chunks + type: chunk + repeat: until + repeat-until: _.more == 0 + + # --- Exec response 0x2C --- + exec_response: + seq: + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- Error response (0x50) --- + # Contains error message for all error status codes + error_response: + seq: + - id: error_message + type: lp_string + + # --- PutAll request --- + put_all_request: + seq: + - id: time_units + type: u1 + - id: lifespan + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: max_idle + type: vlong + if: ((time_units >> 4) & 0x0F) < 0x07 + - id: entry_count + type: vint + - id: entries + type: key_value_pair + repeat: expr + repeat-expr: entry_count.value + + key_value_pair: + seq: + - id: key + type: lp_bytes + - id: value + type: lp_bytes + + # --- GetAll request --- + get_all_request: + seq: + - id: key_count + type: vint + - id: keys + type: lp_bytes + repeat: expr + repeat-expr: key_count.value + + # --- GetAll response --- + get_all_response: + seq: + - id: entry_count + type: vint + - id: entries + type: key_value_pair + repeat: expr + repeat-expr: entry_count.value + + # --- Stats response --- + stats_response: + seq: + - id: num_stats + type: vint + - id: stats + type: stat_entry + repeat: expr + repeat-expr: num_stats.value + + stat_entry: + seq: + - id: name + type: lp_string + - id: value + type: lp_string + + # --- Query request (0x1F) --- + query_request: + seq: + - id: query_payload + type: lp_bytes + + # --- Query response (0x20) --- + query_response: + seq: + - id: response_payload + type: lp_bytes + + # --- Size response (0x2A) --- + size_response: + seq: + - id: size + type: vint + + # --- Exec request (0x2B) --- + exec_request: + seq: + - id: script_name + type: lp_string + - id: param_count + type: vint + - id: params + type: exec_param + repeat: expr + repeat-expr: param_count.value + + exec_param: + seq: + - id: name + type: lp_string + - id: value + type: lp_bytes + + # --- Auth mech list response (0x22) --- + auth_mech_list_response: + seq: + - id: mech_count + type: vint + - id: mechs + type: lp_string + repeat: expr + repeat-expr: mech_count.value + + # --- Auth request (0x23) --- + auth_request: + seq: + - id: mech + type: lp_string + - id: response_data + type: lp_bytes + + # --- Auth response (0x24) --- + auth_response: + seq: + - id: completed + type: u1 + - id: challenge_data + type: lp_bytes + + # --- Iteration Start request (0x31, protocol >= 2.5) --- + iteration_start_request: + seq: + - id: segments_size + type: signed_vint + # Signed: -1 means no segment filtering + - id: segments + size: segments_size.signed + if: segments_size.signed > 0 + - id: filter_converter_size + type: signed_vint + # Signed: -1 means no filter + - id: filter_converter + type: str + encoding: UTF-8 + size: filter_converter_size.signed + if: filter_converter_size.signed >= 0 + - id: param_count + type: u1 + if: filter_converter_size.signed >= 0 + - id: params + type: lp_bytes + repeat: expr + repeat-expr: param_count + if: filter_converter_size.signed >= 0 and param_count > 0 + - id: batch_size + type: vint + - id: metadata + type: u1 + # 1 = return metadata, 0 = no metadata + + # --- Iteration Start response (0x32, protocol >= 2.5) --- + iteration_start_response: + seq: + - id: iteration_id + type: lp_bytes + + # --- Iteration Next request (0x33) --- + iteration_next_or_end_request: + seq: + - id: iteration_id + type: lp_bytes + + # --- Iteration Next response (0x34) --- + iteration_next_response: + seq: + - id: finished_segments_size + type: vint + - id: finished_segments + size: finished_segments_size.value + - id: entry_count + type: vint + - id: num_value_projections + type: vint + - id: entries + type: iteration_entry + repeat: expr + repeat-expr: entry_count.value + + # --- Iteration Entry (used in iteration_next_response) --- + iteration_entry: + seq: + - id: metadata_present + type: u1 + # 1 if metadata is present, 0 otherwise (protocol 2.5+) + - id: metadata + type: iteration_entry_metadata + if: metadata_present == 1 + - id: key + type: lp_bytes + - id: values + type: lp_bytes + repeat: expr + repeat-expr: _parent.num_value_projections.value + + # --- Iteration Entry Metadata (Protocol 2.5+) --- + # Similar to entry_metadata but with different structure for iteration responses. + # This metadata format is used in iteration responses in protocol 3.x. + # + # Note: iteration_entry has metadata_present flag to indicate presence, + # while entry_metadata does not have such a flag in GetWithMetadata responses. + iteration_entry_metadata: + seq: + - id: expiration_flag + type: u1 + # Bitwise OR of: 0x01 = INFINITE_LIFESPAN, 0x02 = INFINITE_MAXIDLE + - id: created + type: s8 + if: (expiration_flag & 0x01) == 0 + - id: lifespan + type: vint + if: (expiration_flag & 0x01) == 0 + - id: last_used + type: s8 + if: (expiration_flag & 0x02) == 0 + - id: max_idle + type: vint + if: (expiration_flag & 0x02) == 0 + - id: entry_version + type: s8 + + # --- BulkGet request (0x19) --- + bulk_get_request: + seq: + - id: entry_count + type: vint + # 0 = return all entries + + # --- GetStreamStart request (0xE9, protocol 4.1) --- + get_stream_start_request: + seq: + - id: key + type: lp_bytes + - id: batch_size + type: vint + + # --- GetStreamStart response (0xE8) --- + get_stream_start_response: + seq: + - id: stream_id + type: s4 + if: _parent.header.status == response_status::success + - id: complete + type: u1 + if: _parent.header.status == response_status::success + - id: metadata + type: entry_metadata + if: _parent.header.status == response_status::success + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- GetStreamNext request (0xE7) --- + get_stream_next_request: + seq: + - id: stream_id + type: s4 + + # --- GetStreamNext response (0xE6) --- + get_stream_next_response: + seq: + - id: stream_id + type: s4 + if: _parent.header.status == response_status::success + - id: complete + type: u1 + if: _parent.header.status == response_status::success + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- GetStreamEnd request (0xE4) --- + get_stream_end_request: + seq: + - id: stream_id + type: s4 + + # --- PutStreamStart request (0xEF) --- + put_stream_start_request: + seq: + - id: key + type: lp_bytes + - id: expiration + type: expiration_params + - id: condition_version + type: s8 + # 0 = unconditional, -1 = put-if-absent, other = conditional replace + + # --- PutStreamStart response (0xEE) --- + put_stream_start_response: + seq: + - id: stream_id + type: s4 + + # --- PutStreamNext request (0xED) --- + put_stream_next_request: + seq: + - id: stream_id + type: s4 + - id: complete + type: u1 + - id: chunk + type: lp_bytes + + # --- PutStreamEnd request (0xEB) --- + put_stream_end_request: + seq: + - id: stream_id + type: s4 + + # --- Add Client Listener request (0x25, protocol >= 2.6) --- + add_listener_request: + seq: + - id: listener_id + type: lp_bytes + - id: include_state + type: u1 + - id: filter_factory_name + type: lp_string + - id: filter_factory_params + type: listener_factory_params + if: filter_factory_name.length.value > 0 + - id: converter_factory_name + type: lp_string + - id: converter_factory_params + type: listener_factory_params + if: converter_factory_name.length.value > 0 + - id: use_raw_data + type: u1 + - id: event_type_interests + type: vint + # Bitmask: 0x01=created, 0x02=modified, 0x04=removed, 0x08=expired + + listener_factory_params: + seq: + - id: param_count + type: u1 + - id: params + type: lp_bytes + repeat: expr + repeat-expr: param_count + + # --- Remove Client Listener request (0x27) --- + remove_listener_request: + seq: + - id: listener_id + type: lp_bytes + + # --- Bloom Filter Listener request (0x41, protocol 3.1) --- + bloom_filter_listener_request: + seq: + - id: listener_id + type: lp_bytes + - id: bloom_filter_bit_size + type: vint + + # --- Update Bloom Filter request (0x42) --- + update_bloom_filter_request: + seq: + - id: bloom_filter_bits + type: lp_bytes + + # --- Cache Entry Event (sent by server, protocol 2.1+) --- + # custom_marker: 0=normal event, 1=custom marshalled object, 2=raw custom data + cache_entry_created_event: + seq: + - id: status + type: u1 + - id: topology_change_marker + type: u1 + - id: listener_id + type: lp_bytes + - id: custom_marker + type: u1 + - id: command_retried + type: u1 + - id: custom_data + type: lp_bytes + if: custom_marker == 1 or custom_marker == 2 + - id: key + type: lp_bytes + if: custom_marker == 0 + - id: version + type: s8 + if: custom_marker == 0 + + cache_entry_modified_event: + seq: + - id: status + type: u1 + - id: topology_change_marker + type: u1 + - id: listener_id + type: lp_bytes + - id: custom_marker + type: u1 + - id: command_retried + type: u1 + - id: custom_data + type: lp_bytes + if: custom_marker == 1 or custom_marker == 2 + - id: key + type: lp_bytes + if: custom_marker == 0 + - id: version + type: s8 + if: custom_marker == 0 + + cache_entry_removed_event: + seq: + - id: status + type: u1 + - id: topology_change_marker + type: u1 + - id: listener_id + type: lp_bytes + - id: custom_marker + type: u1 + - id: command_retried + type: u1 + - id: custom_data + type: lp_bytes + if: custom_marker == 1 or custom_marker == 2 + - id: key + type: lp_bytes + if: custom_marker == 0 + + cache_entry_expired_event: + seq: + - id: status + type: u1 + - id: topology_change_marker + type: u1 + - id: listener_id + type: lp_bytes + - id: custom_marker + type: u1 + - id: command_retried + type: u1 + - id: custom_data + type: lp_bytes + if: custom_marker == 1 or custom_marker == 2 + - id: key + type: lp_bytes + if: custom_marker == 0 + + # --- XID (X/Open XA Transaction ID) --- + xid: + seq: + - id: format_id + type: vint + # Signed vInt (ZigZag encoded) + - id: global_tx_id_length + type: u1 + - id: global_tx_id + size: global_tx_id_length + - id: branch_qualifier_length + type: u1 + - id: branch_qualifier + size: branch_qualifier_length + + # --- Transaction Prepare request (0x7D, protocol >= 2.9) --- + prepare_request_v2: + seq: + - id: transaction_id + type: xid + - id: one_phase_commit + type: u1 + - id: recoverable + type: u1 + - id: timeout + type: s8 + - id: num_keys + type: vint + - id: keys + type: tx_write_entry + repeat: expr + repeat-expr: num_keys.value + + tx_write_entry: + seq: + - id: key + type: lp_bytes + - id: control_byte + type: u1 + # 0x01 = NOT_READ, 0x02 = NON_EXISTING, 0x04 = REMOVE_OPERATION + - id: version_read + type: s8 + if: (control_byte & 0x01) == 0 and (control_byte & 0x02) == 0 + - id: time_units + type: u1 + if: (control_byte & 0x04) == 0 + - id: lifespan + type: vlong + if: (control_byte & 0x04) == 0 and (time_units & 0x0F) < 0x07 + - id: max_idle + type: vlong + if: (control_byte & 0x04) == 0 and ((time_units >> 4) & 0x0F) < 0x07 + - id: value + type: lp_bytes + if: (control_byte & 0x04) == 0 + + # --- Transaction Commit/Rollback request --- + tx_commit_or_rollback_request: + seq: + - id: transaction_id + type: xid + + # --- Transaction Prepare/Commit/Rollback response --- + tx_response: + seq: + - id: xa_return_code + type: vint + # XA_OK=0, XA_RDONLY=3, or XA error codes + + # --- Forget Transaction request (0x79) --- + forget_tx_request: + seq: + - id: transaction_id + type: xid + + # --- Fetch In-Doubt Transactions response (0x7C) --- + fetch_in_doubt_response: + seq: + - id: num_xids + type: vint + - id: xids + type: xid + repeat: expr + repeat-expr: num_xids.value + + # --- Counter Configuration --- + counter_configuration: + seq: + - id: flags + type: u1 + # Bit 0: 1=WEAK, 0=STRONG + # Bit 1: 1=BOUNDED, 0=UNBOUNDED + # Bit 2: 1=PERSISTENT, 0=VOLATILE + - id: concurrency_level + type: vint + if: (flags & 0x01) != 0 + - id: lower_bound + type: s8 + if: (flags & 0x02) != 0 + - id: upper_bound + type: s8 + if: (flags & 0x02) != 0 + - id: initial_value + type: s8 + + # --- Counter Create request (0x4B) --- + counter_create_request: + seq: + - id: name + type: lp_string + - id: configuration + type: counter_configuration + + # --- Counter Get/Set/Add/Reset/Remove request --- + counter_name_request: + seq: + - id: name + type: lp_string + + # --- Counter Add-And-Get request (0x52) --- + counter_add_and_get_request: + seq: + - id: name + type: lp_string + - id: delta + type: s8 + + # --- Counter Compare-And-Swap request (0x58) --- + counter_cas_request: + seq: + - id: name + type: lp_string + - id: expect + type: s8 + - id: update + type: s8 + + # --- Counter Get-And-Set request (0x7F, protocol 3.1) --- + counter_get_and_set_request: + seq: + - id: name + type: lp_string + - id: value + type: s8 + + # --- Counter value response --- + counter_value_response: + seq: + - id: value + type: s8 + + # --- Counter Get Names response (0x65) --- + counter_get_names_response: + seq: + - id: count + type: vint + if: _parent.header.status == response_status::success + - id: names + type: lp_string + repeat: expr + repeat-expr: count.value + if: _parent.header.status == response_status::success + + # --- Counter Get Configuration response (0x4E) --- + counter_get_configuration_response: + seq: + - id: configuration + type: counter_configuration + if: _parent.header.status == response_status::success + + # --- Ping response (0x18, protocol >= 3.0) --- + # Protocol 3.0 added MediaType info and supported operations list. + # Earlier protocols (< 3.0) had no body (header only). + ping_response: + seq: + - id: key_type + type: media_type + - id: value_type + type: media_type + - id: server_version + type: u1 + - id: op_count + type: vint + - id: supported_opcodes + type: u2 + repeat: expr + repeat-expr: op_count.value + + # --- Multimap Get response (0x68, protocol 2.7+) --- + multimap_get_response: + seq: + - id: value_count + type: vint + if: _parent.header.status == response_status::success + - id: values + type: lp_bytes + repeat: expr + repeat-expr: value_count.value + if: _parent.header.status == response_status::success + + # --- Multimap Get With Metadata response (0x6A, protocol 2.7+) --- + multimap_get_with_metadata_response: + seq: + - id: value_count + type: vint + if: _parent.header.status == response_status::success + - id: values_with_metadata + type: value_with_metadata + repeat: expr + repeat-expr: value_count.value + if: _parent.header.status == response_status::success + + value_with_metadata: + seq: + - id: metadata + type: entry_metadata + - id: value + type: lp_bytes + + # --- Multimap Size response (0x72, protocol 2.7+) --- + multimap_size_response: + seq: + - id: size + type: vlong + + # --- Multimap Contains response (0x74, 0x76, 0x78, protocol 2.7+) --- + # Used by multimap_contains_entry, multimap_contains_key, multimap_contains_value + multimap_contains_response: + seq: + - id: result + type: u1 + + multimap_get_request: + seq: + - id: key + type: lp_bytes + - id: support_duplicates + type: u1 + + multimap_size_request: + seq: + - id: support_duplicates + type: u1 + + multimap_contains_value_request: + seq: + - id: time_units + type: u1 + # High nibble (bits 4-7): lifespan time unit, Low nibble (bits 0-3): maxIdle time unit + - id: lifespan + type: vlong + if: (time_units >> 4) < 0x07 + - id: max_idle + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: value + type: lp_bytes + - id: support_duplicates + type: u1 + + multimap_contains_entry_request: + seq: + - id: key + type: lp_bytes + - id: time_units + type: u1 + # High nibble (bits 4-7): lifespan time unit, Low nibble (bits 0-3): maxIdle time unit + - id: lifespan + type: vlong + if: (time_units >> 4) < 0x07 + - id: max_idle + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: value + type: lp_bytes + - id: support_duplicates + type: u1 + +# ============================================================================ +# Enums +# ============================================================================ + +enums: + request_opcode: + 0x01: put + 0x03: get + 0x05: put_if_absent + 0x07: replace + 0x09: replace_if_unmodified + 0x0B: remove + 0x0D: remove_if_unmodified + 0x0F: contains_key + 0x11: get_with_version # deprecated + 0x13: clear + 0x15: stats + 0x17: ping + 0x19: bulk_get + 0x1B: get_with_metadata + 0x1D: bulk_get_keys + 0x1F: query + 0x21: auth_mech_list + 0x23: auth + 0x25: add_client_listener + 0x27: remove_client_listener + 0x29: size + 0x2B: exec + 0x2D: put_all + 0x2F: get_all + 0x31: iteration_start + 0x33: iteration_next + 0x35: iteration_end + 0x3B: prepare + 0x3D: commit + 0x3F: rollback + 0x41: add_bloom_filter_listener + 0x43: update_bloom_filter + 0x4B: counter_create + 0x4D: counter_get_configuration + 0x4F: counter_is_defined + 0x52: counter_add_and_get + 0x54: counter_reset + 0x56: counter_get_value + 0x58: counter_cas + 0x5A: counter_add_listener + 0x5C: counter_remove_listener + 0x5E: counter_remove + 0x67: multimap_get + 0x69: multimap_get_with_metadata + 0x6B: multimap_put + 0x6D: multimap_remove_key + 0x6F: multimap_remove_entry + 0x71: multimap_size + 0x73: multimap_contains_entry + 0x75: multimap_contains_key + 0x77: multimap_contains_value + 0x79: forget_tx + 0x7B: fetch_in_doubt_tx + 0x7D: prepare_v2 + 0x7F: counter_get_and_set + 0xE5: get_stream_end + 0xE7: get_stream_next + 0xE9: get_stream_start + 0xEB: put_stream_end + 0xED: put_stream_next + 0xEF: put_stream_start + + response_opcode: + 0x02: put + 0x04: get + 0x06: put_if_absent + 0x08: replace + 0x0A: replace_if_unmodified + 0x0C: remove + 0x0E: remove_if_unmodified + 0x10: contains_key + 0x12: get_with_version # deprecated + 0x14: clear + 0x16: stats + 0x18: ping + 0x1A: bulk_get + 0x1C: get_with_metadata + 0x1E: bulk_get_keys + 0x20: query + 0x22: auth_mech_list + 0x24: auth + 0x26: add_client_listener + 0x28: remove_client_listener + 0x2A: size + 0x2C: exec + 0x2E: put_all + 0x30: get_all + 0x32: iteration_start + 0x34: iteration_next + 0x36: iteration_end + 0x3C: prepare + 0x3E: commit + 0x40: rollback + 0x42: add_bloom_filter_listener + 0x44: update_bloom_filter + 0x4C: counter_create + 0x4E: counter_get_configuration + 0x50: error + 0x51: counter_is_defined + 0x53: counter_add_and_get + 0x55: counter_reset + 0x57: counter_get_value + 0x59: counter_cas + 0x5B: counter_add_listener + 0x5D: counter_remove_listener + 0x5F: counter_remove + 0x60: cache_entry_created_event + 0x61: cache_entry_modified_event + 0x62: cache_entry_removed_event + 0x63: cache_entry_expired_event + 0x65: counter_get_names + 0x66: counter_event + 0x68: multimap_get + 0x6A: multimap_get_with_metadata + 0x6C: multimap_put + 0x6E: multimap_remove_key + 0x70: multimap_remove_entry + 0x72: multimap_size + 0x74: multimap_contains_entry + 0x76: multimap_contains_key + 0x78: multimap_contains_value + 0x7A: forget_tx + 0x7C: fetch_tx_recovery + 0x7E: prepare_v2 + 0x80: counter_get_and_set + 0xE4: get_stream_end + 0xE6: get_stream_next + 0xE8: get_stream_start + 0xEA: put_stream_end + 0xEC: put_stream_next + 0xEE: put_stream_start + + response_status: + 0x00: success + 0x01: not_executed + 0x02: key_does_not_exist + 0x03: success_with_previous + 0x04: not_executed_with_previous + 0x81: invalid_magic_or_message_id + 0x82: unknown_command + 0x83: unknown_version + 0x84: parse_error + 0x85: server_error + 0x86: command_timed_out + 0x87: node_suspected + 0x88: illegal_lifecycle_state + + client_intelligence_type: + 0x01: basic + 0x02: topology_aware + 0x03: hash_distribution_aware + + media_type_kind: + 0x00: none + 0x01: predefined + 0x02: custom + + predefined_media_type_id: + 1: application_x_java_object + 2: application_json + 3: application_octet_stream + 4: application_pdf + 5: application_rtf + 6: application_zip + 7: image_gif + 8: image_jpeg + 9: image_png + 10: text_css + 11: text_csv + 12: application_x_protostream + 13: text_plain + 14: text_html + 15: application_x_jboss_marshalling + 17: application_unknown + + time_unit: + 0x00: seconds + 0x01: milliseconds + 0x02: nanoseconds + 0x03: microseconds + 0x04: minutes + 0x05: hours + 0x06: days + 0x07: default + 0x08: infinite + + hash_function_version: + 0x01: murmur_hash_2 + 0x02: murmur_hash_3 + 0x03: murmur_hash_3_with_segments \ No newline at end of file diff --git a/dissectors/hotrod/schemas/hotrod40.ksy b/dissectors/hotrod/schemas/hotrod40.ksy new file mode 100644 index 0000000..04543c5 --- /dev/null +++ b/dissectors/hotrod/schemas/hotrod40.ksy @@ -0,0 +1,1618 @@ +meta: + id: hotrod40 + title: Infinispan Hot Rod Protocol 4.x + endian: be + license: Apache-2.0 + +doc: | + Hot Rod is a binary TCP client-server protocol used by Infinispan. + This schema describes protocol versions 4.0 and 4.1. + + Protocol 4.0 was introduced in Infinispan 14.0. + Protocol 4.1 was introduced in Infinispan 15.1. + + Key differences from 3.x: + - PUT/REPLACE/REMOVE responses with previous values now include metadata + (created, lifespan, lastUsed, maxIdle, version) in addition to the value + - Request headers include "other params" field for additional parameters + - Protocol 4.1 adds new stream operations (GetStreamStart, PutStreamStart, etc.) + + For more information, see: + https://infinispan.org/docs/stable/titles/hotrod_java/hotrod_java.html + +seq: + - id: magic + type: u1 + - id: message + type: + switch-on: magic + cases: + 0xA0: request_message + 0xA1: response_message + +types: + + request_message: + seq: + - id: header + type: request_header + - id: body + type: + switch-on: header.opcode + cases: + 'request_opcode::put': put_request + 'request_opcode::put_if_absent': put_request + 'request_opcode::replace': put_request + 'request_opcode::replace_if_unmodified': replace_if_unmodified_request + 'request_opcode::remove_if_unmodified': remove_if_unmodified_request + 'request_opcode::get': key_request + 'request_opcode::get_with_metadata': key_request + 'request_opcode::contains_key': key_request + 'request_opcode::remove': key_request + 'request_opcode::bulk_get': bulk_get_request + 'request_opcode::put_all': put_all_request + 'request_opcode::get_all': get_all_request + 'request_opcode::query': query_request + 'request_opcode::auth': auth_request + 'request_opcode::exec': exec_request + 'request_opcode::iteration_start': iteration_start_request + 'request_opcode::iteration_next': iteration_next_or_end_request + 'request_opcode::iteration_end': iteration_next_or_end_request + 'request_opcode::add_client_listener': add_listener_request + 'request_opcode::remove_client_listener': remove_listener_request + 'request_opcode::add_bloom_filter_listener': bloom_filter_listener_request + 'request_opcode::update_bloom_filter': update_bloom_filter_request + 'request_opcode::get_stream_start': get_stream_start_request + 'request_opcode::get_stream_next': get_stream_next_request + 'request_opcode::get_stream_end': get_stream_end_request + 'request_opcode::put_stream_start': put_stream_start_request + 'request_opcode::put_stream_next': put_stream_next_request + 'request_opcode::put_stream_end': put_stream_end_request + 'request_opcode::commit': tx_commit_or_rollback_request + 'request_opcode::rollback': tx_commit_or_rollback_request + 'request_opcode::forget_tx': forget_tx_request + 'request_opcode::counter_create': counter_create_request + 'request_opcode::counter_get_value': counter_name_request + 'request_opcode::counter_reset': counter_name_request + 'request_opcode::counter_add_and_get': counter_add_and_get_request + 'request_opcode::counter_cas': counter_cas_request + 'request_opcode::counter_is_defined': counter_name_request + 'request_opcode::counter_remove': counter_name_request + 'request_opcode::counter_get_configuration': counter_name_request + 'request_opcode::counter_get_and_set': counter_get_and_set_request + 'request_opcode::prepare_v2': prepare_request_v2 + 'request_opcode::multimap_get': multimap_get_request + 'request_opcode::multimap_get_with_metadata': multimap_get_request + 'request_opcode::multimap_put': multimap_put_request + 'request_opcode::multimap_remove_key': multimap_get_request + 'request_opcode::multimap_remove_entry': multimap_put_request + 'request_opcode::multimap_size': multimap_size_request + 'request_opcode::multimap_contains_key': multimap_get_request + 'request_opcode::multimap_contains_value': multimap_contains_value_request + 'request_opcode::multimap_contains_entry': multimap_contains_entry_request + if: | + header.opcode != request_opcode::ping and + header.opcode != request_opcode::clear and + header.opcode != request_opcode::stats and + header.opcode != request_opcode::size and + header.opcode != request_opcode::auth_mech_list and + header.opcode != request_opcode::bulk_get_keys and + header.opcode != request_opcode::prepare and + header.opcode != request_opcode::fetch_in_doubt_tx and + header.opcode != request_opcode::counter_add_listener and + header.opcode != request_opcode::counter_remove_listener + + response_message: + seq: + - id: header + type: response_header + - id: body + type: + switch-on: header.opcode + cases: + 'response_opcode::get': get_response + 'response_opcode::get_with_metadata': get_with_metadata_response + 'response_opcode::put': put_response + 'response_opcode::put_if_absent': put_response + 'response_opcode::replace': put_response + 'response_opcode::replace_if_unmodified': put_response + 'response_opcode::remove': put_response + 'response_opcode::remove_if_unmodified': put_response + 'response_opcode::bulk_get': bulk_get_response + 'response_opcode::get_all': get_all_response + 'response_opcode::query': query_response + 'response_opcode::exec': exec_response + 'response_opcode::auth_mech_list': auth_mech_list_response + 'response_opcode::auth': auth_response + 'response_opcode::iteration_start': iteration_start_response + 'response_opcode::iteration_next': iteration_next_response + 'response_opcode::get_stream_start': get_stream_start_response + 'response_opcode::get_stream_next': get_stream_next_response + 'response_opcode::put_stream_start': put_stream_start_response + 'response_opcode::prepare': tx_response + 'response_opcode::prepare_v2': tx_response + 'response_opcode::commit': tx_response + 'response_opcode::rollback': tx_response + 'response_opcode::fetch_tx_recovery': fetch_in_doubt_response + 'response_opcode::counter_get_configuration': counter_get_configuration_response + 'response_opcode::counter_get_value': counter_value_response + 'response_opcode::counter_add_and_get': counter_value_response + 'response_opcode::counter_cas': counter_value_response + 'response_opcode::counter_get_and_set': counter_value_response + 'response_opcode::counter_get_names': counter_get_names_response + 'response_opcode::ping': ping_response + 'response_opcode::stats': stats_response + 'response_opcode::size': size_response + 'response_opcode::error': error_response + 'response_opcode::cache_entry_created_event': cache_entry_created_event + 'response_opcode::cache_entry_modified_event': cache_entry_modified_event + 'response_opcode::cache_entry_removed_event': cache_entry_removed_event + 'response_opcode::cache_entry_expired_event': cache_entry_expired_event + 'response_opcode::multimap_get': multimap_get_response + 'response_opcode::multimap_get_with_metadata': multimap_get_with_metadata_response + 'response_opcode::multimap_size': multimap_size_response + 'response_opcode::multimap_remove_key': multimap_contains_response + 'response_opcode::multimap_remove_entry': multimap_contains_response + 'response_opcode::multimap_contains_entry': multimap_contains_response + 'response_opcode::multimap_contains_key': multimap_contains_response + 'response_opcode::multimap_contains_value': multimap_contains_response + if: | + header.opcode != response_opcode::contains_key and + header.opcode != response_opcode::clear and + header.opcode != response_opcode::add_client_listener and + header.opcode != response_opcode::remove_client_listener and + header.opcode != response_opcode::add_bloom_filter_listener and + header.opcode != response_opcode::update_bloom_filter and + header.opcode != response_opcode::counter_create and + header.opcode != response_opcode::counter_reset and + header.opcode != response_opcode::counter_remove and + header.opcode != response_opcode::iteration_end and + header.opcode != response_opcode::get_stream_end and + header.opcode != response_opcode::put_stream_end and + header.opcode != response_opcode::put_stream_next and + header.opcode != response_opcode::counter_event and + header.opcode != response_opcode::counter_is_defined and + header.opcode != response_opcode::forget_tx and + header.opcode != response_opcode::multimap_put + + + # ============================================================================ + # Fundamental Types + # ============================================================================ + + # Variable-length unsigned integer (1-5 bytes). + # High bit of each byte indicates continuation. + # Identical to protobuf varint32. + vint: + seq: + - id: groups + type: vint_group + repeat: until + repeat-until: not _.has_more + instances: + value: + value: >- + groups[0].value + + (groups.size > 1 ? (groups[1].value << 7) : 0) + + (groups.size > 2 ? (groups[2].value << 14) : 0) + + (groups.size > 3 ? (groups[3].value << 21) : 0) + + (groups.size > 4 ? (groups[4].value << 28) : 0) + + vint_group: + seq: + - id: b + type: u1 + instances: + has_more: + value: (b & 0x80) != 0 + value: + value: b & 0x7F + + # Variable-length signed integer (1-5 bytes). + # ZigZag encoding + # Identical to protobuf varint32. + signed_vint: + seq: + - id: groups + type: vint_group + repeat: until + repeat-until: not _.has_more + instances: + value: + value: >- + groups[0].value + + (groups.size > 1 ? (groups[1].value << 7) : 0) + + (groups.size > 2 ? (groups[2].value << 14) : 0) + + (groups.size > 3 ? (groups[3].value << 21) : 0) + + (groups.size > 4 ? (groups[4].value << 28) : 0) + signed: + value: (value >> 1) ^ -(value & 1) + + # Variable-length unsigned long (1-9 bytes). + # Same encoding as vint but extended to 64-bit values. + vlong: + seq: + - id: groups + type: vint_group + repeat: until + repeat-until: not _.has_more + instances: + value: + value: >- + groups[0].value + + (groups.size > 1 ? (groups[1].value << 7) : 0) + + (groups.size > 2 ? (groups[2].value << 14) : 0) + + (groups.size > 3 ? (groups[3].value << 21) : 0) + + (groups.size > 4 ? (groups[4].value << 28) : 0) + + (groups.size > 5 ? (groups[5].value << 35) : 0) + + (groups.size > 6 ? (groups[6].value << 42) : 0) + + (groups.size > 7 ? (groups[7].value << 49) : 0) + + (groups.size > 8 ? (groups[8].value << 56) : 0) + + # A length-prefixed byte array: vInt length followed by that many bytes. + lp_bytes: + seq: + - id: length + type: vint + - id: data + size: length.value + + # A length-prefixed UTF-8 string: vInt length followed by UTF-8 bytes. + lp_string: + seq: + - id: length + type: vint + - id: data + type: str + encoding: UTF-8 + size: length.value + + # ============================================================================ + # MediaType Encoding (Protocol 2.8+) + # ============================================================================ + + # MediaType descriptor used in request headers since protocol 2.8. + media_type: + seq: + - id: type_indicator + type: u1 + enum: media_type_kind + - id: predefined_id + type: vint + enum: predefined_media_type_id + if: type_indicator == media_type_kind::predefined + - id: custom_string + type: lp_string + if: type_indicator == media_type_kind::custom + - id: param_count + type: vint + if: type_indicator == media_type_kind::predefined or type_indicator == media_type_kind::custom + - id: params + type: media_type_param + repeat: expr + repeat-expr: param_count.value + if: (type_indicator == media_type_kind::predefined or type_indicator == media_type_kind::custom) and param_count.value > 0 + + media_type_param: + seq: + - id: key + type: lp_string + - id: value + type: lp_string + + other_param: + seq: + - id: key + type: lp_string + - id: value + type: lp_bytes + + # ============================================================================ + # Request Header (Protocol 4.1) + # ============================================================================ + + # Full request header for protocol versions >= 2.8 (with MediaType support). + request_header: + seq: + # Expected: 0xA0 + - id: message_id + type: vlong + - id: version + type: u1 + # 40 for protocol 4.0, 41 for protocol 4.1 + - id: opcode + type: u1 + enum: request_opcode + - id: cache_name_length + type: vint + - id: cache_name + type: str + encoding: UTF-8 + size: cache_name_length.value + - id: flags + type: vint + - id: client_intelligence + type: u1 + enum: client_intelligence_type + - id: topology_id + type: vint + # MediaType fields added in protocol 2.8 + - id: key_media_type + type: media_type + if: version >= 28 + - id: value_media_type + type: media_type + if: version >= 28 + # Other params added in protocol 4.0 + - id: other_param_count + type: vint + if: version >= 40 + - id: other_params + type: other_param + repeat: expr + repeat-expr: other_param_count.value + if: version >= 40 and other_param_count.value > 0 + + # ============================================================================ + # Response Header + # ============================================================================ + + response_header: + seq: + - id: message_id + type: vlong + - id: opcode + type: u1 + enum: response_opcode + - id: status + type: u1 + enum: response_status + if: | + opcode != response_opcode::cache_entry_created_event and + opcode != response_opcode::cache_entry_modified_event and + opcode != response_opcode::cache_entry_removed_event and + opcode != response_opcode::cache_entry_expired_event + - id: topology_change_marker + type: u1 + if: | + opcode != response_opcode::cache_entry_created_event and + opcode != response_opcode::cache_entry_modified_event and + opcode != response_opcode::cache_entry_removed_event and + opcode != response_opcode::cache_entry_expired_event + - id: topology_change + type: topology_change_header + if: | + (opcode != response_opcode::cache_entry_created_event and + opcode != response_opcode::cache_entry_modified_event and + opcode != response_opcode::cache_entry_removed_event and + opcode != response_opcode::cache_entry_expired_event) and + topology_change_marker != 0 + instances: + has_previous: + value: | + status == response_status::success_with_previous or + status == response_status::not_executed_with_previous + + # ============================================================================ + # Topology Change Headers + # ============================================================================ + + # Topology-aware topology change (client intelligence 0x02) + topology_aware_header: + seq: + - id: topology_id + type: vint + - id: num_servers + type: vint + - id: servers + type: server_address + repeat: expr + repeat-expr: num_servers.value + + server_address: + seq: + - id: host + type: lp_string + - id: port + type: u2 + + # Hash-distribution-aware topology change (client intelligence 0x03, protocol >= 2.0) + hash_dist_header_v2: + seq: + - id: topology_id + type: vint + - id: num_servers + type: vint + - id: servers + type: server_address + repeat: expr + repeat-expr: num_servers.value + - id: hash_function_version + type: u1 + - id: num_segments + type: vint + - id: segments + type: segment_owners + repeat: expr + repeat-expr: num_segments.value + + segment_owners: + seq: + - id: num_owners + type: u1 + - id: owner_indices + type: u1 + repeat: expr + repeat-expr: num_owners + + # Generic topology change header - dispatches based on client intelligence. + # + # CRITICAL LIMITATION: The actual response format depends on the client_intelligence + # value sent in the REQUEST header, but the RESPONSE does not indicate which + # intelligence level was used. The format is: + # - Intelligence 0x01 (BASIC): No topology change info at all + # - Intelligence 0x02 (TOPOLOGY_AWARE): Only topology_id + servers + # - Intelligence 0x03 (HASH_DISTRIBUTION_AWARE): Full format with segments + # + # ⚠️ THIS SCHEMA ASSUMES INTELLIGENCE 0x03 (HASH_DISTRIBUTION_AWARE) ⚠️ + # + # If you are parsing responses from intelligence 0x02 clients, this schema + # will FAIL because it expects hash_function_version and segments after the + # servers, but 0x02 responses go directly to the operation body. + # + # There is NO reliable way to auto-detect the intelligence level from the + # response bytes alone. You must know which intelligence level your client used. + # + # For intelligence 0x02 support, use topology_aware_header type instead, + # or create a custom parser that knows the client intelligence level. + topology_change_header: + seq: + - id: topology_id + type: vint + - id: num_servers + type: vint + - id: servers + type: server_address + repeat: expr + repeat-expr: num_servers.value + # Fields below only present for HASH_DISTRIBUTION_AWARE (0x03) + - id: hash_function_version + type: u1 + - id: num_segments + type: vint + - id: segments + type: segment_owners + repeat: expr + repeat-expr: num_segments.value + + # ============================================================================ + # Entry Metadata (Protocol 4.0+) + # ============================================================================ + + # Metadata block returned with previous values since protocol 4.0, + # and with GetWithMetadata/GetStream responses since protocol 1.2. + # + # IMPORTANT: In protocol 3.x, PUT/REPLACE/REMOVE responses with previous + # values return ONLY the value (no metadata). In protocol 4.x, they return + # this metadata structure followed by the value. + entry_metadata: + seq: + - id: flag + type: u1 + # Bitwise OR of: 0x01 = INFINITE_LIFESPAN, 0x02 = INFINITE_MAXIDLE + - id: created + type: s8 + if: (flag & 0x01) == 0 + - id: lifespan + type: vint + if: (flag & 0x01) == 0 + - id: last_used + type: s8 + if: (flag & 0x02) == 0 + - id: max_idle + type: vint + if: (flag & 0x02) == 0 + - id: entry_version + type: s8 + + # Expiration parameters used in PUT/REPLACE operations. + # Encodes lifespan and maxIdle with their time units in a single byte, + # followed by optional vlong values if not default/infinite. + expiration_params: + seq: + - id: time_units + type: u1 + # High nibble: lifespan time unit, Low nibble: maxIdle time unit + # 0x0-0x6 = specific time unit (SECONDS, MILLIS, NANOS, MICROS, MINUTES, HOURS, DAYS) + # 0x7 = DEFAULT (use server default) + # 0x8 = INFINITE + - id: lifespan + type: vlong + if: (time_units >> 4) != 0x07 and (time_units >> 4) != 0x08 + - id: max_idle + type: vlong + if: (time_units & 0x0F) != 0x07 and (time_units & 0x0F) != 0x08 + + # ============================================================================ + # Operations + # ============================================================================ + + # --- Key-only request body (Get, Remove, ContainsKey, GetWithVersion) --- + key_request: + seq: + - id: key + type: lp_bytes + + # --- Put/Replace/PutIfAbsent request body (protocol >= 2.2 with TimeUnits) --- + put_request: + seq: + - id: key + type: lp_bytes + - id: time_units + type: u1 + # High nibble (bits 4-7): lifespan time unit, Low nibble (bits 0-3): maxIdle time unit + - id: lifespan + type: vlong + if: (time_units >> 4) < 0x07 + - id: max_idle + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: value + type: lp_bytes + + # --- Multimap Put request body (0x6B) --- + multimap_put_request: + seq: + - id: key + type: lp_bytes + - id: time_units + type: u1 + - id: lifespan + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: max_idle + type: vlong + if: ((time_units >> 4) & 0x0F) < 0x07 + - id: value + type: lp_bytes + - id: support_duplicates + type: u1 + + # --- ReplaceIfUnmodified request body --- + replace_if_unmodified_request: + seq: + - id: key + type: lp_bytes + - id: time_units + type: u1 + - id: lifespan + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: max_idle + type: vlong + if: ((time_units >> 4) & 0x0F) < 0x07 + - id: entry_version + type: s8 + - id: value + type: lp_bytes + + # --- RemoveIfUnmodified request body --- + remove_if_unmodified_request: + seq: + - id: key + type: lp_bytes + - id: entry_version + type: s8 + + # --- Get response (0x04) --- + get_response: + seq: + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- GetWithMetadata response (0x1C) --- + get_with_metadata_response: + seq: + - id: metadata + type: entry_metadata + if: _parent.header.status == response_status::success + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- Put/Remove/Replace response with metadata (protocol 4.0+) --- + # Returned when status indicates previous value present (0x03 or 0x04). + # + # Protocol 3.x difference: In 3.x, only the value is returned (no metadata). + # Protocol 4.x: Returns metadata + value for operations: + # - put, putIfAbsent, replace, replaceIfUnmodified + # - remove, removeIfUnmodified + previous_value_with_metadata: + seq: + - id: metadata + type: entry_metadata + - id: value + type: lp_bytes + + # --- Put/Replace/PutIfAbsent response --- + # Protocol 4.x: Returns metadata + value when there's a previous value + put_response: + seq: + - id: previous_value_with_metadata + type: previous_value_with_metadata + if: _parent.header.has_previous + +# --- BulkGet response (0x05) --- + bulk_get_response: + seq: + - id: entries + type: bulk_arrays + if: _parent.header.status == response_status::success + + chunk: + seq: + - id: more + type: u1 + - id: value + type: lp_bytes + if: more != 0 + + bulk_arrays: + seq: + - id: chunks + type: chunk + repeat: until + repeat-until: _.more == 0 + + # --- Exec response 0x2C --- + exec_response: + seq: + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- Error response (0x50) --- + # Contains error message for all error status codes + error_response: + seq: + - id: error_message + type: lp_string + + # --- PutAll request --- + put_all_request: + seq: + - id: time_units + type: u1 + # High nibble: lifespan time unit, Low nibble: maxIdle time unit + - id: lifespan + type: vlong + if: (time_units >> 4) < 0x07 + - id: max_idle + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: entry_count + type: vint + - id: entries + type: key_value_pair + repeat: expr + repeat-expr: entry_count.value + + key_value_pair: + seq: + - id: key + type: lp_bytes + - id: value + type: lp_bytes + + # --- GetAll request --- + get_all_request: + seq: + - id: key_count + type: vint + - id: keys + type: lp_bytes + repeat: expr + repeat-expr: key_count.value + + # --- GetAll response --- + get_all_response: + seq: + - id: entry_count + type: vint + - id: entries + type: key_value_pair + repeat: expr + repeat-expr: entry_count.value + + # --- Stats response --- + stats_response: + seq: + - id: num_stats + type: vint + - id: stats + type: stat_entry + repeat: expr + repeat-expr: num_stats.value + + stat_entry: + seq: + - id: name + type: lp_string + - id: value + type: lp_string + + # --- Query request (0x1F) --- + query_request: + seq: + - id: query_payload + type: lp_bytes + + # --- Query response (0x20) --- + query_response: + seq: + - id: response_payload + type: lp_bytes + + # --- Size response (0x2A) --- + size_response: + seq: + - id: size + type: vint + + # --- Exec request (0x2B) --- + exec_request: + seq: + - id: script_name + type: lp_string + - id: param_count + type: vint + - id: params + type: exec_param + repeat: expr + repeat-expr: param_count.value + + exec_param: + seq: + - id: name + type: lp_string + - id: value + type: lp_bytes + + # --- Auth mech list response (0x22) --- + auth_mech_list_response: + seq: + - id: mech_count + type: vint + - id: mechs + type: lp_string + repeat: expr + repeat-expr: mech_count.value + + # --- Auth request (0x23) --- + auth_request: + seq: + - id: mech + type: lp_string + - id: response_data + type: lp_bytes + + # --- Auth response (0x24) --- + auth_response: + seq: + - id: completed + type: u1 + - id: challenge_data + type: lp_bytes + + # --- Iteration Start request (0x31, protocol >= 2.5) --- + iteration_start_request: + seq: + - id: segments_size + type: signed_vint + # Signed: -1 means no segment filtering + - id: segments + size: segments_size.signed + if: segments_size.signed > 0 + - id: filter_converter_size + type: signed_vint + # Signed: -1 means no filter + - id: filter_converter + type: str + encoding: UTF-8 + size: filter_converter_size.signed + if: filter_converter_size.signed >= 0 + - id: param_count + type: u1 + if: filter_converter_size.signed >= 0 + - id: params + type: lp_bytes + repeat: expr + repeat-expr: param_count + if: filter_converter_size.signed >= 0 and param_count > 0 + - id: batch_size + type: vint + - id: metadata + type: u1 + # 1 = return metadata, 0 = no metadata + + # --- Iteration Start response (0x32, protocol >= 2.5) --- + iteration_start_response: + seq: + - id: iteration_id + type: lp_bytes + + # --- Iteration Next request (0x33) --- + iteration_next_or_end_request: + seq: + - id: iteration_id + type: lp_bytes + + # --- Iteration Next response (0x34) --- + iteration_next_response: + seq: + - id: finished_segments_size + type: vint + - id: finished_segments + size: finished_segments_size.value + - id: entry_count + type: vint + - id: num_value_projections + type: vint + if: entry_count.value > 0 + - id: entries + type: iteration_entry + repeat: expr + repeat-expr: entry_count.value + + # --- Iteration Entry (used in iteration_next_response) --- + iteration_entry: + seq: + - id: metadata_present + type: u1 + # 1 if metadata is present, 0 otherwise (protocol 2.5+) + - id: metadata + type: iteration_entry_metadata + if: metadata_present == 1 + - id: key + type: lp_bytes + - id: values + type: lp_bytes + repeat: expr + repeat-expr: _parent.num_value_projections.value + + # --- Iteration Entry Metadata (Protocol 2.5+) --- + # Similar to entry_metadata but with different structure for iteration responses. + # This metadata format is used in iteration responses across both 3.x and 4.x protocols. + # + # Note: iteration_entry has metadata_present flag to indicate presence, + # while entry_metadata (used in PUT responses) does not have such a flag. + iteration_entry_metadata: + seq: + - id: expiration_flag + type: u1 + # Bitwise OR of: 0x01 = INFINITE_LIFESPAN, 0x02 = INFINITE_MAXIDLE + - id: created + type: s8 + if: (expiration_flag & 0x01) == 0 + - id: lifespan + type: vint + if: (expiration_flag & 0x01) == 0 + - id: last_used + type: s8 + if: (expiration_flag & 0x02) == 0 + - id: max_idle + type: vint + if: (expiration_flag & 0x02) == 0 + - id: entry_version + type: s8 + + # --- BulkGet request (0x19) --- + bulk_get_request: + seq: + - id: entry_count + type: vint + # 0 = return all entries + + # --- GetStreamStart request (0xE9, protocol 4.1) --- + get_stream_start_request: + seq: + - id: key + type: lp_bytes + - id: batch_size + type: vint + + # --- GetStreamStart response (0xE8) --- + get_stream_start_response: + seq: + - id: stream_id + type: s4 + if: _parent.header.status == response_status::success + - id: complete + type: u1 + if: _parent.header.status == response_status::success + - id: metadata + type: entry_metadata + if: _parent.header.status == response_status::success + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- GetStreamNext request (0xE7) --- + get_stream_next_request: + seq: + - id: stream_id + type: s4 + + # --- GetStreamNext response (0xE6) --- + get_stream_next_response: + seq: + - id: stream_id + type: s4 + if: _parent.header.status == response_status::success + - id: complete + type: u1 + if: _parent.header.status == response_status::success + - id: value + type: lp_bytes + if: _parent.header.status == response_status::success + + # --- GetStreamEnd request (0xE4) --- + get_stream_end_request: + seq: + - id: stream_id + type: s4 + + # --- PutStreamStart request (0xEF) --- + put_stream_start_request: + seq: + - id: key + type: lp_bytes + - id: expiration + type: expiration_params + - id: condition_version + type: s8 + # 0 = unconditional, -1 = put-if-absent, other = conditional replace + + # --- PutStreamStart response (0xEE) --- + put_stream_start_response: + seq: + - id: stream_id + type: s4 + + # --- PutStreamNext request (0xED) --- + put_stream_next_request: + seq: + - id: stream_id + type: s4 + - id: complete + type: u1 + - id: chunk + type: lp_bytes + + # --- PutStreamEnd request (0xEB) --- + put_stream_end_request: + seq: + - id: stream_id + type: s4 + + # --- Add Client Listener request (0x25, protocol >= 2.6) --- + add_listener_request: + seq: + - id: listener_id + type: lp_bytes + - id: include_state + type: u1 + - id: filter_factory_name + type: lp_string + - id: filter_factory_params + type: listener_factory_params + if: filter_factory_name.length.value > 0 + - id: converter_factory_name + type: lp_string + - id: converter_factory_params + type: listener_factory_params + if: converter_factory_name.length.value > 0 + - id: use_raw_data + type: u1 + - id: event_type_interests + type: vint + # Bitmask: 0x01=created, 0x02=modified, 0x04=removed, 0x08=expired + + listener_factory_params: + seq: + - id: param_count + type: u1 + - id: params + type: lp_bytes + repeat: expr + repeat-expr: param_count + + # --- Remove Client Listener request (0x27) --- + remove_listener_request: + seq: + - id: listener_id + type: lp_bytes + + # --- Bloom Filter Listener request (0x41, protocol 3.1) --- + bloom_filter_listener_request: + seq: + - id: listener_id + type: lp_bytes + - id: bloom_filter_bit_size + type: vint + + # --- Update Bloom Filter request (0x42) --- + update_bloom_filter_request: + seq: + - id: bloom_filter_bits + type: lp_bytes + + # --- Cache Entry Event (sent by server, protocol 2.1+) --- + # custom_marker: 0=normal event, 1=custom marshalled object, 2=raw custom data + cache_entry_created_event: + seq: + - id: status + type: u1 + - id: topology_change_marker + type: u1 + - id: listener_id + type: lp_bytes + - id: custom_marker + type: u1 + - id: command_retried + type: u1 + - id: custom_data + type: lp_bytes + if: custom_marker == 1 or custom_marker == 2 + - id: key + type: lp_bytes + if: custom_marker == 0 + - id: version + type: s8 + if: custom_marker == 0 + + cache_entry_modified_event: + seq: + - id: status + type: u1 + - id: topology_change_marker + type: u1 + - id: listener_id + type: lp_bytes + - id: custom_marker + type: u1 + - id: command_retried + type: u1 + - id: custom_data + type: lp_bytes + if: custom_marker == 1 or custom_marker == 2 + - id: key + type: lp_bytes + if: custom_marker == 0 + - id: version + type: s8 + if: custom_marker == 0 + + cache_entry_removed_event: + seq: + - id: status + type: u1 + - id: topology_change_marker + type: u1 + - id: listener_id + type: lp_bytes + - id: custom_marker + type: u1 + - id: command_retried + type: u1 + - id: custom_data + type: lp_bytes + if: custom_marker == 1 or custom_marker == 2 + - id: key + type: lp_bytes + if: custom_marker == 0 + + cache_entry_expired_event: + seq: + - id: status + type: u1 + - id: topology_change_marker + type: u1 + - id: listener_id + type: lp_bytes + - id: custom_marker + type: u1 + - id: command_retried + type: u1 + - id: custom_data + type: lp_bytes + if: custom_marker == 1 or custom_marker == 2 + - id: key + type: lp_bytes + if: custom_marker == 0 + + # --- XID (X/Open XA Transaction ID) --- + xid: + seq: + - id: format_id + type: vint + # Signed vInt (ZigZag encoded) + - id: global_tx_id_length + type: u1 + - id: global_tx_id + size: global_tx_id_length + - id: branch_qualifier_length + type: u1 + - id: branch_qualifier + size: branch_qualifier_length + + # --- Transaction Prepare request (0x7D, protocol >= 2.9) --- + prepare_request_v2: + seq: + - id: transaction_id + type: xid + - id: one_phase_commit + type: u1 + - id: recoverable + type: u1 + - id: timeout + type: s8 + - id: num_keys + type: vint + - id: keys + type: tx_write_entry + repeat: expr + repeat-expr: num_keys.value + + tx_write_entry: + seq: + - id: key + type: lp_bytes + - id: control_byte + type: u1 + # 0x01 = NOT_READ, 0x02 = NON_EXISTING, 0x04 = REMOVE_OPERATION + - id: version_read + type: s8 + if: (control_byte & 0x01) == 0 and (control_byte & 0x02) == 0 + - id: time_units + type: u1 + if: (control_byte & 0x04) == 0 + - id: lifespan + type: vlong + if: (control_byte & 0x04) == 0 and (time_units & 0x0F) < 0x07 + - id: max_idle + type: vlong + if: (control_byte & 0x04) == 0 and ((time_units >> 4) & 0x0F) < 0x07 + - id: value + type: lp_bytes + if: (control_byte & 0x04) == 0 + + # --- Transaction Commit/Rollback request --- + tx_commit_or_rollback_request: + seq: + - id: transaction_id + type: xid + + # --- Transaction Prepare/Commit/Rollback response --- + tx_response: + seq: + - id: xa_return_code + type: s4 + # XA_OK=0, XA_RDONLY=3, or XA error codes + + # --- Forget Transaction request (0x79) --- + forget_tx_request: + seq: + - id: transaction_id + type: xid + + # --- Fetch In-Doubt Transactions response (0x7C) --- + fetch_in_doubt_response: + seq: + - id: num_xids + type: vint + - id: xids + type: xid + repeat: expr + repeat-expr: num_xids.value + + # --- Counter Configuration --- + counter_configuration: + seq: + - id: flags + type: u1 + # Bit 0: 1=WEAK, 0=STRONG + # Bit 1: 1=BOUNDED, 0=UNBOUNDED + # Bit 2: 1=PERSISTENT, 0=VOLATILE + - id: concurrency_level + type: vint + if: (flags & 0x01) != 0 + - id: lower_bound + type: s8 + if: (flags & 0x02) != 0 + - id: upper_bound + type: s8 + if: (flags & 0x02) != 0 + - id: initial_value + type: s8 + + # --- Counter Create request (0x4B) --- + counter_create_request: + seq: + - id: name + type: lp_string + - id: configuration + type: counter_configuration + + # --- Counter Get/Set/Add/Reset/Remove request --- + counter_name_request: + seq: + - id: name + type: lp_string + + # --- Counter Add-And-Get request (0x52) --- + counter_add_and_get_request: + seq: + - id: name + type: lp_string + - id: delta + type: s8 + + # --- Counter Compare-And-Swap request (0x58) --- + counter_cas_request: + seq: + - id: name + type: lp_string + - id: expect + type: s8 + - id: update + type: s8 + + # --- Counter Get-And-Set request (0x7F, protocol 3.1) --- + counter_get_and_set_request: + seq: + - id: name + type: lp_string + - id: value + type: s8 + + # --- Counter value response --- + counter_value_response: + seq: + - id: value + type: s8 + + # --- Counter Get Names response (0x65) --- + counter_get_names_response: + seq: + - id: count + type: vint + if: _parent.header.status == response_status::success + - id: names + type: lp_string + repeat: expr + repeat-expr: count.value + if: _parent.header.status == response_status::success + + # --- Counter Get Configuration response (0x4E) --- + counter_get_configuration_response: + seq: + - id: configuration + type: counter_configuration + if: _parent.header.status == response_status::success + + # --- Ping response (0x18, protocol >= 3.0) --- + # Protocol 3.0+ added MediaType info and supported operations list. + # Earlier protocols had no body (header only). + ping_response: + seq: + - id: key_type + type: media_type + - id: value_type + type: media_type + - id: server_version + type: u1 + - id: op_count + type: vint + - id: supported_opcodes + type: u2 + repeat: expr + repeat-expr: op_count.value + + # --- Multimap Get request (0x67) --- + multimap_get_request: + seq: + - id: key + type: lp_bytes + - id: support_duplicates + type: u1 + + # --- Multimap Get response (0x68) --- + multimap_get_response: + seq: + - id: value_count + type: vint + if: _parent.header.status == response_status::success + - id: values + type: lp_bytes + repeat: expr + repeat-expr: value_count.value + if: _parent.header.status == response_status::success + + # --- Multimap Get with Metadata response (0x6A) --- + multimap_get_with_metadata_response: + seq: + - id: metadata + type: entry_metadata + if: _parent.header.status == response_status::success + - id: value_count + type: vint + if: _parent.header.status == response_status::success + - id: values + type: lp_bytes + repeat: expr + repeat-expr: value_count.value + if: _parent.header.status == response_status::success + + # --- Multimap Size request (0x71) --- + multimap_size_request: + seq: + - id: support_duplicates + type: u1 + + # --- Multimap Size response (0x72) --- + multimap_size_response: + seq: + - id: size + type: vlong + if: _parent.header.status == response_status::success + + # --- Multimap Contains Value request (0x77) --- + multimap_contains_value_request: + seq: + - id: time_units + type: u1 + # High nibble (bits 4-7): lifespan time unit, Low nibble (bits 0-3): maxIdle time unit + - id: lifespan + type: vlong + if: (time_units >> 4) < 0x07 + - id: max_idle + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: value + type: lp_bytes + - id: support_duplicates + type: u1 + + # --- Multimap Contains Entry request (0x73) --- + multimap_contains_entry_request: + seq: + - id: key + type: lp_bytes + - id: time_units + type: u1 + # High nibble (bits 4-7): lifespan time unit, Low nibble (bits 0-3): maxIdle time unit + - id: lifespan + type: vlong + if: (time_units >> 4) < 0x07 + - id: max_idle + type: vlong + if: (time_units & 0x0F) < 0x07 + - id: value + type: lp_bytes + - id: support_duplicates + type: u1 + + # --- Multimap Boolean responses (0x6C, 0x6E, 0x70, 0x74, 0x76, 0x78) --- + # These operations return success/failure status only (no body): + # - PUT (0x6C) + # - REMOVE_KEY (0x6E) + # - REMOVE_ENTRY (0x70) + # All "contains" operations return a boolean in the body: + # - CONTAINS_ENTRY (0x74) + # - CONTAINS_KEY (0x76) + # - CONTAINS_VALUE (0x78) + multimap_contains_response: + seq: + - id: result + type: u1 + if: _parent.header.status == response_status::success + # 1 = true, 0 = false + +# ============================================================================ +# Enums +# ============================================================================ + +enums: + request_opcode: + 0x01: put + 0x03: get + 0x05: put_if_absent + 0x07: replace + 0x09: replace_if_unmodified + 0x0B: remove + 0x0D: remove_if_unmodified + 0x0F: contains_key + 0x11: get_with_version # deprecated + 0x13: clear + 0x15: stats + 0x17: ping + 0x19: bulk_get + 0x1B: get_with_metadata + 0x1D: bulk_get_keys + 0x1F: query + 0x21: auth_mech_list + 0x23: auth + 0x25: add_client_listener + 0x27: remove_client_listener + 0x29: size + 0x2B: exec + 0x2D: put_all + 0x2F: get_all + 0x31: iteration_start + 0x33: iteration_next + 0x35: iteration_end + 0x3B: prepare + 0x3D: commit + 0x3F: rollback + 0x41: add_bloom_filter_listener + 0x43: update_bloom_filter + 0x4B: counter_create + 0x4D: counter_get_configuration + 0x4F: counter_is_defined + 0x52: counter_add_and_get + 0x54: counter_reset + 0x56: counter_get_value + 0x58: counter_cas + 0x5A: counter_add_listener + 0x5C: counter_remove_listener + 0x5E: counter_remove + 0x67: multimap_get + 0x69: multimap_get_with_metadata + 0x6B: multimap_put + 0x6D: multimap_remove_key + 0x6F: multimap_remove_entry + 0x71: multimap_size + 0x73: multimap_contains_entry + 0x75: multimap_contains_key + 0x77: multimap_contains_value + 0x79: forget_tx + 0x7B: fetch_in_doubt_tx + 0x7D: prepare_v2 + 0x7F: counter_get_and_set + 0xE5: get_stream_end + 0xE7: get_stream_next + 0xE9: get_stream_start + 0xEB: put_stream_end + 0xED: put_stream_next + 0xEF: put_stream_start + + response_opcode: + 0x02: put + 0x04: get + 0x06: put_if_absent + 0x08: replace + 0x0A: replace_if_unmodified + 0x0C: remove + 0x0E: remove_if_unmodified + 0x10: contains_key + 0x12: get_with_version # deprecated + 0x14: clear + 0x16: stats + 0x18: ping + 0x1A: bulk_get + 0x1C: get_with_metadata + 0x1E: bulk_get_keys + 0x20: query + 0x22: auth_mech_list + 0x24: auth + 0x26: add_client_listener + 0x28: remove_client_listener + 0x2A: size + 0x2C: exec + 0x2E: put_all + 0x30: get_all + 0x32: iteration_start + 0x34: iteration_next + 0x36: iteration_end + 0x3C: prepare + 0x3E: commit + 0x40: rollback + 0x42: add_bloom_filter_listener + 0x44: update_bloom_filter + 0x4C: counter_create + 0x4E: counter_get_configuration + 0x50: error + 0x51: counter_is_defined + 0x53: counter_add_and_get + 0x55: counter_reset + 0x57: counter_get_value + 0x59: counter_cas + 0x5B: counter_add_listener + 0x5D: counter_remove_listener + 0x5F: counter_remove + 0x60: cache_entry_created_event + 0x61: cache_entry_modified_event + 0x62: cache_entry_removed_event + 0x63: cache_entry_expired_event + 0x65: counter_get_names + 0x66: counter_event + 0x68: multimap_get + 0x6A: multimap_get_with_metadata + 0x6C: multimap_put + 0x6E: multimap_remove_key + 0x70: multimap_remove_entry + 0x72: multimap_size + 0x74: multimap_contains_entry + 0x76: multimap_contains_key + 0x78: multimap_contains_value + 0x7A: forget_tx + 0x7C: fetch_tx_recovery + 0x7E: prepare_v2 + 0x80: counter_get_and_set + 0xE4: get_stream_end + 0xE6: get_stream_next + 0xE8: get_stream_start + 0xEA: put_stream_end + 0xEC: put_stream_next + 0xEE: put_stream_start + + response_status: + 0x00: success + 0x01: not_executed + 0x02: key_does_not_exist + 0x03: success_with_previous + 0x04: not_executed_with_previous + 0x81: invalid_magic_or_message_id + 0x82: unknown_command + 0x83: unknown_version + 0x84: parse_error + 0x85: server_error + 0x86: command_timed_out + 0x87: node_suspected + 0x88: illegal_lifecycle_state + + client_intelligence_type: + 0x01: basic + 0x02: topology_aware + 0x03: hash_distribution_aware + + media_type_kind: + 0x00: none + 0x01: predefined + 0x02: custom + + predefined_media_type_id: + 1: application_x_java_object + 2: application_json + 3: application_octet_stream + 4: application_pdf + 5: application_rtf + 6: application_zip + 7: image_gif + 8: image_jpeg + 9: image_png + 10: text_css + 11: text_csv + 12: application_x_protostream + 13: text_plain + 14: text_html + 15: application_x_jboss_marshalling + 17: application_unknown + + time_unit: + 0x00: seconds + 0x01: milliseconds + 0x02: nanoseconds + 0x03: microseconds + 0x04: minutes + 0x05: hours + 0x06: days + 0x07: default + 0x08: infinite + + hash_function_version: + 0x01: murmur_hash_2 + 0x02: murmur_hash_3 + 0x03: murmur_hash_3_with_segments \ No newline at end of file diff --git a/dissectors/hytera-ip-dispatch/HytIPDispatch.lua b/dissectors/hytera-ip-dispatch/HytIPDispatch.lua new file mode 100644 index 0000000..6463fa2 --- /dev/null +++ b/dissectors/hytera-ip-dispatch/HytIPDispatch.lua @@ -0,0 +1,186 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dk7lst/HytBridge (wireshark/HytIPDispatch.lua), +-- commit 628c4a79c6c2d1f21c0a93140f6a753241cf6bc5 du 13/03/2022. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- Kommunikation zwischen Hytera IP-Dispatch-Software und Repeater analysieren +-- Zur Installation nach C:\Users\USERNAME\AppData\Roaming\Wireshark\plugins kopieren. Ordner muss ggf. angelegt werden wenn er noch nicht exisitert. +-- (Defaultpfad, siehe Hilfe -> Über Wireshark -> Ordner -> Personal Plugins) +-- Anschließend Plugins neu laden: "Analyse" -> "Lua Plugins neu laden" (Shortcut: STRG+SHIFT+L) + +-- URLs: +-- https://wiki.wireshark.org/LuaAPI +-- https://wiki.wireshark.org/Lua/Dissectors + +-- Neue Protokolle anlegen: +HyteraRRS = Proto("HyteraRRS", "Hytera Radio Registration Service") +HyteraLP = Proto("HyteraLP", "Hytera Location Protocol") +HyteraTP = Proto("HyteraTP", "Hytera Telemetry Protocol") +HyteraTMP = Proto("HyteraTMP", "Hytera Text Message Protocol") +HyteraRCP = Proto("HyteraRCP", "Hytera Radio Control Protocol") +HyteraSDM = Proto("HyteraSDM", "Hytera Self-Defined Message") +HyteraRTP = Proto("HyteraRTP", "Hytera RTP Audio") + +-- Felder von anderen Protokollschichten holen: +UDP_Port = Field.new("udp.dstport") +RTP_Payload = Field.new("rtp.payload") + +-- Funktion zur Analyse der Daten +--function trivial_proto.dissector(buffer, pinfo, tree) +-- pinfo.cols.protocol = "TRIVIAL" +-- local subtree = tree:add(trivial_proto,buffer(),"Trivial Protocol Data") +-- subtree:add(buffer(0,2),"The first two bytes: " .. buffer(0,2):uint()) +-- subtree = subtree:add(buffer(2,2),"The next two bytes") +-- subtree:add(buffer(2,1),"The 3rd byte: " .. buffer(2,1):uint()) +-- subtree:add(buffer(3,1),"The 4th byte: " .. buffer(3,1):uint()) +--end + +-- Prüfen, ob das Paket mit einer Hytera-Signatur beginnt: +function hasHyteraMagicNumber(buffer) + return tostring(buffer(0, 3)) == "324200" +end + +-- "Rückwärts" kodierte IDs richtigrum drehen: +function reverseID(id) + -- Lua 5.2 ist bei Logik-Operationen noch ein wenig umständlicher als 5.3. + return bit32.bor(bit32.bor(bit32.lshift(bit32.extract(id, 0, 8), 16), bit32.lshift(bit32.extract(id, 8, 8), 8)), bit32.extract(id, 16, 8)) +end + +function decodeCallType(ct) + if ct == 0 then + return "Pvt" + elseif ct == 1 then + return "Grp" + elseif ct == 2 then + return "All" + end + return "Unknown" .. "(" .. ct .. ")" +end + +-- Protokolle sind alle recht ähnlich, daher erstmal einen Dissector für alle probieren: +function HyteraDissector(protname, prot, buffer, pinfo, tree) + -- Protokollnamen setzen: + pinfo.cols.protocol = protname .. " [TS" .. (2 - UDP_Port().value % 2) .. "]" + + -- Baum aufbauen: + local subtree = tree:add(prot, buffer(), pinfo.cols.protocol) + subtree:add(buffer(0, 3), "Signature: " .. buffer(0, 3):uint() .. " (valid=" .. tostring(hasHyteraMagicNumber(buffer)) .. ")") + + local PacketType = buffer(3, 1):uint() + local PacketTypeStr + if PacketType == 0 then + PacketTypeStr = "Tx-Ctrl" + elseif PacketType == 1 then + PacketTypeStr = "ACK" + elseif PacketType == 2 then + PacketTypeStr = "Idle-Keep-Alive?" + elseif PacketType == 5 then + PacketTypeStr = "Connection Start-Up?" + elseif PacketType == 0x20 then + PacketTypeStr = "QSO-Data" + elseif PacketType == 0x24 then + PacketTypeStr = "No PC connected?" + else + PacketTypeStr = "CMD" .. string.format("#%02X", PacketType) + end + subtree:add(buffer(3, 1), "Packet Type: " .. PacketTypeStr .. " (" .. string.format("0x%02X", PacketType) .. ")") + + --subtree:add(buffer(4, 1), "?: " .. buffer(4, 1):uint()) + subtree:add(buffer(5, 1), "Sequence-Counter: " .. buffer(5, 1):uint()) + + if PacketType == 0 and buffer:len() == 18 then + local CT = decodeCallType(buffer(11, 1):uint()) + local DstId = reverseID(buffer(12, 3):uint()) + local CheckSumPacket = buffer(16, 1):uint() + subtree:add(buffer(11, 1), "Call-Type: " .. CT) + subtree:add(buffer(12, 3), "Destination-ID: " .. DstId) + -- local CheckSumCalc = 0x62, i + -- for i = 11, 14 do + -- CheckSumCalc = bit32.bxor(CheckSumCalc, buffer(i, 1):uint()) + -- end + -- subtree:add(buffer(16, 1), "CheckSum: " .. CheckSumPacket .. " (valid=" .. tostring(CheckSumPacket == CheckSumCalc) .. ")") + subtree:add(buffer(16, 1), "CheckSum: " .. CheckSumPacket) + PacketTypeStr = PacketTypeStr .. " Setup " .. CT .. "-call to " .. DstId + elseif PacketType == 0 and buffer:len() == 15 then + local PTTSwitch = buffer(12, 1):uint() + subtree:add(buffer(12, 1), "PTT switch: " .. PTTSwitch) + PacketTypeStr = PacketTypeStr .. " PTT: " .. PTTSwitch + elseif PacketType == 0x20 and buffer:len() == 38 then + local RptId = buffer(9, 3):uint() + local CT = decodeCallType(buffer(26, 1):uint()) + local DstId = reverseID(buffer(28, 3):uint()) + local SrcId = reverseID(buffer(32, 3):uint()) + subtree:add(buffer(9, 3), "Repeater-ID: " .. RptId) + subtree:add(buffer(26, 1), "Call-Type: " .. CT) + subtree:add(buffer(28, 3), "Destination-ID: " .. DstId) + subtree:add(buffer(32, 3), "Source-ID: " .. SrcId) + PacketTypeStr = PacketTypeStr .. " (" .. CT .. "-call from " .. SrcId .. " via " .. RptId .. " to " .. DstId .. ")" + end + + pinfo.cols.info = PacketTypeStr .. " Len: " .. tostring(buffer:len()) +end + +function HyteraRRS.dissector(buffer, pinfo, tree) + HyteraDissector("Hytera Radio Registration", HyteraRRS, buffer, pinfo, tree) +end + +function HyteraLP.dissector(buffer, pinfo, tree) + HyteraDissector("Hytera Location", HyteraLP, buffer, pinfo, tree) +end + +function HyteraTP.dissector(buffer, pinfo, tree) + HyteraDissector("Hytera Telemetry", HyteraTP, buffer, pinfo, tree) +end + +function HyteraTMP.dissector(buffer, pinfo, tree) + HyteraDissector("Hytera Text-Message", HyteraTMP, buffer, pinfo, tree) +end + +function HyteraRCP.dissector(buffer, pinfo, tree) + HyteraDissector("Hytera Radio Control", HyteraRCP, buffer, pinfo, tree) +end + +function HyteraSDM.dissector(buffer, pinfo, tree) + HyteraDissector("Hytera Self-Defined Message", HyteraSDM, buffer, pinfo, tree) +end + +function HyteraRTP.dissector(buffer, pinfo, tree) + if hasHyteraMagicNumber(buffer) then + -- Hytera-Signatur gefunden, also selber interpretieren: + HyteraDissector("", HyteraRCP, buffer, pinfo, tree) + pinfo.cols.protocol = "Hytera Audio (Control)" + else + -- Ist wohl echtes RTP, daher bei Wireshark mitgelieferten RTP-Dissector aufrufen: + Dissector.get("rtp"):call(buffer, pinfo, tree) + pinfo.cols.protocol = "Hytera Audio (RTP)" + if string.find(tostring(RTP_Payload().value), "[^F]") == nil then -- Enthält RTP-Payload was anderes als 0xFF ? + pinfo.cols.info = "Empty RTP" + else + pinfo.cols.info = "Audio RTP: " .. tostring(pinfo.cols.info) + end + end + + -- TS anhängen: + if UDP_Port().value == 30012 then + pinfo.cols.protocol = tostring(pinfo.cols.protocol) .. " [TS1]" + elseif UDP_Port().value == 30014 then + pinfo.cols.protocol = tostring(pinfo.cols.protocol) .. " [TS2]" + end +end + +-- Protokolle für die entsprechenden UDP-Ports eintragen. +-- Der erste Port ist vermutlich für TS1, der zweite für TS2. +udp_table = DissectorTable.get("udp.port") +udp_table:add(30001, HyteraRRS) +udp_table:add(30002, HyteraRRS) +udp_table:add(30003, HyteraLP) +udp_table:add(30004, HyteraLP) +udp_table:add(30005, HyteraTP) +udp_table:add(30006, HyteraTP) +udp_table:add(30007, HyteraTMP) +udp_table:add(30008, HyteraTMP) +udp_table:add(30009, HyteraRCP) +udp_table:add(30010, HyteraRCP) +udp_table:add(3017, HyteraSDM) +udp_table:add(3018, HyteraSDM) +udp_table:add(30012, HyteraRTP) +udp_table:add(30014, HyteraRTP) diff --git a/dissectors/hytera-ip-dispatch/LICENSE b/dissectors/hytera-ip-dispatch/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/dissectors/hytera-ip-dispatch/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/hytera-ip-dispatch/README.md b/dissectors/hytera-ip-dispatch/README.md new file mode 100644 index 0000000..6a6452d --- /dev/null +++ b/dissectors/hytera-ip-dispatch/README.md @@ -0,0 +1,61 @@ +# Hytera IP Dispatch — répéteurs DMR Hytera + +Dissecteur Wireshark Lua (commentaires en allemand) des échanges UDP +entre le logiciel **Hytera IP Dispatch** et un répéteur DMR Hytera, issu +du projet radioamateur HytBridge de Lars Struß (DK7LST). Il définit sept +protocoles — `HyteraRRS` (Radio Registration Service), `HyteraLP` +(Location), `HyteraTP` (Telemetry), `HyteraTMP` (Text Message), +`HyteraRCP` (Radio Control), `HyteraSDM` (Self-Defined Message) et +`HyteraRTP` (audio) — qui partagent le même décodage d'en-tête : +signature `32 42 00`, type de paquet (Tx-Ctrl, ACK, keep-alive…), +compteur de séquence, et pour certains paquets type d'appel, identifiants +DMR source / destination et identifiant du répéteur. L'intervalle de +temps (TS1 / TS2) est déduit du port. Pour l'audio, les paquets sans +signature sont passés au dissecteur RTP natif. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/dk7lst/HytBridge (fichier `wireshark/HytIPDispatch.lua`) | +| Commit importé | `628c4a79c6c2d1f21c0a93140f6a753241cf6bc5` du 13/03/2022 (branche `master`, dernier commit ; dernière modification du script : `2f47c2c` du 11/04/2018) | +| Licence amont | GPL-3.0 (fichier `LICENSE` amont, GPLv3, copié ici ; README : « Open Source licensed under GPL v3 ») ; aucune mention « or later », d'où `GPL-3.0-only` ; le script n'a pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Hytera natif (RTP est natif) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `HytIPDispatch.lua` | Sept protocoles Hytera, ports UDP ci-dessous | +| `LICENSE` | Licence GPLv3 amont | + +Ports UDP enregistrés (le premier de chaque paire serait TS1, le second +TS2, d'après le commentaire amont) : RRS 30001/30002, LP 30003/30004, +TP 30005/30006, TMP 30007/30008, RCP 30009/30010, SDM 3017/3018, +audio 30012/30014. + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le petit `install.bat` amont (copie dans +`%APPDATA%\Wireshark\plugins`) n'est pas repris. + +## Utilisation + +Copier `HytIPDispatch.lua` dans le dossier `plugins` de Wireshark, +recharger les plugins Lua (Ctrl+Maj+L), puis filtrer avec par exemple +`hyterarcp` ou `hyterartp`. + +## Remarques + +- **Lua 5.4** : la fonction `reverseID` utilise `bit32.bor`, + `bit32.lshift` et `bit32.extract`. `bit32` n'existe plus en Lua 5.4 et + la bibliothèque `bit` de Wireshark n'a pas d'`extract` : le décodage + des paquets Tx-Ctrl de 18 octets et QSO-Data de 38 octets devrait donc + échouer avec une erreur Lua sous Wireshark 4.6 (non vérifié). Les + autres paquets ne sont pas concernés. +- Les ports SDM (3017/3018) diffèrent de la série 300xx des autres + protocoles ; ils sont repris tels quels. +- Les protocoles, `HyteraDissector`, `UDP_Port`, `udp_table`… sont des + variables globales. Le README amont qualifie le projet de « Under + construction, not yet functional » et le destine à un usage + éducatif / scientifique en radioamateur. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/iec61850-90-5/LICENSE b/dissectors/iec61850-90-5/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/iec61850-90-5/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/iec61850-90-5/README.md b/dissectors/iec61850-90-5/README.md new file mode 100644 index 0000000..81457a9 --- /dev/null +++ b/dissectors/iec61850-90-5/README.md @@ -0,0 +1,51 @@ +# IEC 61850-90-5 (R-GOOSE / R-SV) et RFC 1240 + +Dissecteurs Wireshark Lua pour le **routage des messages IEC 61850 sur IP** +défini par l'IEC TR 61850-90-5:2012 (transmission de synchrophaseurs selon +l'IEEE C37.118) : transport OSI sans connexion sur UDP (RFC 1240 / ITU +X.234, UDP 102), puis en-tête de session IEC 61850-90-5 (SPDU ID… jusqu'au +champ `Simulation`), avec délégation aux dissecteurs natifs `goose` ou `sv` +selon le type de charge utile. Seules les APDU **R-GOOSE** et **R-SV** sont +décodées (APDU « Tunnelled » et « MGMT » non prises en charge, selon +l'amont). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/josemariasaldana/IEC61850-90-5-Wireshark-LUA-Dissector | +| Commit importé | `d52288ab0eabb487f7f18d4099609e6886686264` du 04/03/2021 (branche `main`, dernier commit) | +| Licence amont | GPL-3.0-only (`LICENSE` amont : texte de la GPL v3, sans mention « or any later version » ; pas d'en-tête de licence dans les fichiers Lua) | +| Natif Wireshark 4.6.4 | Non selon l'issue (`tshark -G protocols`) ; les dissecteurs natifs `goose` et `sv` sont utilisés pour la charge utile | + +Auteur amont : Jose Saldana (Fondation CIRCE), projet H2020 FARCROSS. + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `rfc1240.lua` | Dissecteur `RFC1240` (UDP 102) : en-tête de transport OSI sans connexion, appelle `iec61850_90_5` | +| `iec61850-90-5.lua` | Dissecteur `iec61850_90_5` : en-tête de session, puis appel de `goose` ou `sv` | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête de chaque fichier. Les captures d'écran +amont ne sont pas reprises. + +## Utilisation + +Copier les deux fichiers `.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `rfc1240` ou `iec61850_90_5` sur un trafic R-GOOSE / R-SV +(UDP 102). + +## Remarques + +- `rfc1240.lua` récupère `iec61850_90_5` avec `Dissector.get` au moment de + la dissection : les deux fichiers doivent être chargés. +- L'enregistrement sur UDP 102 peut entrer en concurrence avec un + traitement natif de ce port (non vérifié sur Wireshark 4.6.4). +- Pas de sécurité / signature 90-5 décodée ; pas de capture d'exemple amont. +- Non vérifié dans Wireshark. diff --git a/dissectors/iec61850-90-5/iec61850-90-5.lua b/dissectors/iec61850-90-5/iec61850-90-5.lua new file mode 100644 index 0000000..ac0b051 --- /dev/null +++ b/dissectors/iec61850-90-5/iec61850-90-5.lua @@ -0,0 +1,167 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/josemariasaldana/IEC61850-90-5-Wireshark-LUA-Dissector (iec61850-90-5.lua), +-- commit d52288ab0eabb487f7f18d4099609e6886686264 du 04/03/2021. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- declare the protocol +-- the name is from Figure 23 of the IEC 61850-90-5 standard +local iec61850_90_5 = Proto("iec61850_90_5", "IEC 61850-90-5 Protocol for sending GOOSE and SV over ITU X.234"); + +-- declare the fields of the header + +-- Session Type Marker (Tunneled = 0xA0, GOOSE = 0xA1, Sampled Value = 0xA2) +-- declare the value strings for the field SPDU_ID +local session_type_markers = { [160] = "Tunneled", + [161] = "GOOSE", + [162] = "Sampled Values" +} +local f_SI = ProtoField.uint8("iec61850_90_5.SI", "SPDU ID", base.DEC, session_type_markers) +local f_LI = ProtoField.uint8("iec61850_90_5.LI", "Session header length", base.DEC) +local common_header = ProtoField.uint8("iec61850_90_5.CH", "Header content indicator", base.DEC) +local f_LI2 = ProtoField.uint8("iec61850_90_5.LI2", "Length", base.DEC) +local SPDU_length = ProtoField.uint32("iec61850_90_5.SPDU_length", "SPDU Length", base.DEC) +local SPDU_number = ProtoField.uint32("iec61850_90_5.SPDU_number", "SPDU Number", base.DEC) +local version = ProtoField.uint16("iec61850_90_5.version", "Version", base.DEC) +local time_of_current_key = ProtoField.uint32("iec61850_90_5.time_of_current_key", "Time of Current Key", base.DEC) +local time_to_next_key = ProtoField.uint16("iec61850_90_5.time_to_next_key", "Time to Next Key", base.DEC) +-- Security Algorithm type marker (None = 0x00, AES128 = 0x01, AES256 = 0x02) +local security_algorithm_type_markers = { [0] = "None", + [1] = "AES128", + [2] = "AES256" +} +local securtiy_algorithms = ProtoField.uint8("iec61850_90_5.securtiy_algorithms", "Security Algorithms", base.DEC, security_algorithm_type_markers) +-- Signature Algorithm Type Marker (None = 0x00, SHA80 = 0x01, SHA128 = 0x02, SHA256 = 0x03, AES64 = 0x04, AES128 = 0x05) +local signature_algorithm_type_markers = {[0] = "None", + [1] = "SHA80", + [2] = "SHA128", + [3] = "SHA256", + [4] = "AES64", + [5] = "AES128" +} +local signature_algorithms = ProtoField.uint8("iec61850_90_5.signature_algorithms", "Signature Algorithms", base.DEC, signature_algorithm_type_markers) + +local key_ID = ProtoField.uint32("iec61850_90_5.key_ID", "Key ID", base.DEC) +local payload_length = ProtoField.uint32("iec61850_90_5.payload_length", "Length of the payload (PDU)", base.DEC) + +-- declare the value strings for the field 'Payload type' +local payload_types = { [129] = "GOOSE", + [130] = "Sampled Values" +} +-- declare the field 'Payload type' (APDU Tag, which will use the values defined in 'payload_types' +local payload_type = ProtoField.uint8("iec61850_90_5.payload_type", "Payload Type (APDU Tag)", base.DEC, payload_types) + +local simulation = ProtoField.uint8("iec61850_90_5.simulation", "Simulation flag", base.DEC) + + +-- define the field structure +iec61850_90_5.fields = { f_SI, f_LI, common_header, f_LI2, + SPDU_length, SPDU_number, + version, + time_of_current_key, time_to_next_key, + securtiy_algorithms, signature_algorithms, key_ID, + payload_length, payload_type, + simulation +} + +local data_dis = Dissector.get("data") + +-- dissector function +function iec61850_90_5.dissector(buf, pkt, tree) + + -- get the length: it is the value of the first byte + -- reduce it by 1 because LI itself is excluded from the value of the length + -- 'buf(0,1)' means 'take 1 character from position 0' + local length = buf(0, 1):uint() - 1 + + -- set the protocol column (it will appear in the packet list part of Wireshark window) + pkt.cols['protocol'] = "IEC61850-90-5" + + -- this variable stores the offset (number of positions I have read) + local offset = 0 + + -- create the RFC1240 protocol tree item + local subtree = tree:add(iec61850_90_5, buf(offset,14)) + + -- first byte: SI + subtree:add(f_SI, buf(offset,1)) + offset = offset + 1 + + -- second byte: LI + subtree:add(f_LI, buf(offset,1)) + offset = offset + 1 + + -- third byte: common header + subtree:add(common_header, buf(offset,1)) + offset = offset + 1 + + -- fourth byte: length identifier + subtree:add(f_LI2, buf(offset,1)) + offset = offset + 1 + + -- SPDU length: 4 bytes + subtree:add(SPDU_length, buf(offset,4)) + offset = offset + 4 + + -- SPDU number: 4 bytes + subtree:add(SPDU_number, buf(offset,4)) + offset = offset + 4 + + -- Version: 2 bytes + subtree:add(version, buf(offset,2)) + offset = offset + 2 + + -- Time of Current Key: 4 bytes + subtree:add(time_of_current_key, buf(offset,4)) + offset = offset + 4 + + -- Time to Next Key: 2 bytes + subtree:add(time_to_next_key, buf(offset,2)) + offset = offset + 2 + + -- Security Algorithms: 1 byte + subtree:add(securtiy_algorithms, buf(offset,1)) + offset = offset + 1 + + -- Signature Algorithms: 1 byte + subtree:add(signature_algorithms, buf(offset,1)) + offset = offset + 1 + + -- Key ID: 4 bytes + subtree:add(key_ID, buf(offset,4)) + offset = offset + 4 + + -- Length of the payload: 4 bytes + subtree:add(payload_length, buf(offset,4)) + offset = offset + 4 + + -- now it comes a byte indicating the type of APDU: 'payload type' + local type_of_APDU = buf(offset,1):uint() + subtree:add(payload_type, buf(offset,1)) + offset = offset + 1 + + -- simulation + subtree:add(simulation, buf(offset,1)) + offset = offset + 1 + + -- Sampled Values 0x82 (130) + if type_of_APDU == 130 then + -- https://github.com/wireshark/wireshark/blob/5f36e597a0e23b205397742570b102206574b70f/epan/dissectors/packet-sv.c#L36 + Dissector.get("sv"):call(buf(offset):tvb(), pkt, tree) + + -- GOOSE 0x81 (129) + else + if type_of_APDU == 129 then + -- https://github.com/wireshark/wireshark/blob/master/epan/dissectors/packet-goose.c#L37 + -- call the goose dissector for the next header + Dissector.get("goose"):call(buf(offset):tvb(), pkt, tree) + else + -- fallback dissector that just shows the raw data + data_dis:call(buf(offset):tvb(), pkt, tree) + end + end + +end + +-- you don't need to register this protocol anywhere. It will be called by RFC1240 + +-- if you register it as a postdissector, the postdissector will be used for every packet +--register_postdissector(iec61850_90_5) \ No newline at end of file diff --git a/dissectors/iec61850-90-5/rfc1240.lua b/dissectors/iec61850-90-5/rfc1240.lua new file mode 100644 index 0000000..1c80c16 --- /dev/null +++ b/dissectors/iec61850-90-5/rfc1240.lua @@ -0,0 +1,73 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/josemariasaldana/IEC61850-90-5-Wireshark-LUA-Dissector (rfc1240.lua), +-- commit d52288ab0eabb487f7f18d4099609e6886686264 du 04/03/2021. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- declare the protocol +-- https://tools.ietf.org/html/rfc1240 +local rfc1240 = Proto("RFC1240", "RFC 1240 OSI Connectionless Transport Services on top of UDP + ITU X.234"); + +-- https://www.itu.int/rec/T-REC-X.234/en goes on RFC1240 + +-- declare the fields of the header +local f_LI = ProtoField.uint8("RFC1240.LI", "LI (Length of the header)", base.DEC) +local f_UD = ProtoField.uint8("RFC1240.UD", "UD", base.HEX) +local variable_Part = ProtoField.string("RFC1240.data.string", "Variable Part") + +rfc1240.fields = { f_LI, f_UD, variable_Part } + +local data_dis = Dissector.get("data") + +-- dissector function +function rfc1240.dissector(buf, pkt, tree) + + -- get the length: it is the value of the first byte + -- reduce it by 1 because LI itself is excluded from the value of the length + -- 'buf(0,1)' means 'take 1 character from position 0' + local length = buf(0, 1):uint() - 1 + + -- set the protocol column (it will appear in the packet list part of Wireshark window) + pkt.cols['protocol'] = "RFC1240" + + -- this variable stores the offset (number of positions I have read) + local offset = 0 + + -- create the RFC1240 protocol tree item + local subtree = tree:add(rfc1240, buf(offset,2)) + + -- first byte: LI + subtree:add(f_LI, buf(offset,1)) + offset = offset + 1 + + -- second byte: UD (always 0x40) + local UD_value = buf(offset,1):uint() + subtree:add(f_UD, buf(offset,1)) + offset = offset + 1 + + -- UD MUST be 0x40 (64) + if UD_value == 64 then + -- third and subsequent bytes: variable part. It may have 0 size if LI is 1 + if length > 1 then + subtree:add(variable_Part, buf(offset,length)) + end + + -- move the offset to the end of the data + offset = offset + length + + -- call the IEC 61850-90-5 dissector for the next header + Dissector.get("iec61850_90_5"):call(buf(offset):tvb(), pkt, tree) + + -- this does not work: + -- https://github.com/wireshark/wireshark/blob/master/epan/dissectors/packet-goose.c#L37 + -- Dissector.get("R-GOOSE"):call(buf(offset):tvb(), pkt, tree) + + else + -- fallback dissector that just shows the raw data + data_dis:call(buf(offset):tvb(), pkt, tree) + end +end + +-- load the UDP port table +local udp_encap_table = DissectorTable.get("udp.port") + +-- register the protocol to port 102 +udp_encap_table:add(102, rfc1240) \ No newline at end of file diff --git a/dissectors/iec61850-marnm/LICENSE b/dissectors/iec61850-marnm/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dissectors/iec61850-marnm/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/iec61850-marnm/README.md b/dissectors/iec61850-marnm/README.md new file mode 100644 index 0000000..9c577e8 --- /dev/null +++ b/dissectors/iec61850-marnm/README.md @@ -0,0 +1,50 @@ +# IEC 61850 GOOSE / SV / MMS (dissecteur Lua simplifié) + +Dissecteur Wireshark Lua **basique** des trois profils de communication +IEC 61850 des postes électriques : **GOOSE** (EtherType `0x88B8`), +**Sampled Values** (EtherType `0x88BA`) et **MMS** (TCP 102, 1002, 10002 ; +UDP 102), sous un protocole unique `IEC61850` (type d'APDU, longueur, +identifiant d'invocation, service MMS, décodage BER simplifié). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Marnm/iec61850-packets-dec-lua | +| Commit importé | `0969d65fdc4cefa8670e3cbcc3e669f46777a330` du 27/08/2026 (branche `main`, dernier commit) | +| Licence amont | Apache-2.0 (`LICENSE` amont ; pas d'en-tête de licence dans le fichier Lua ; pas de fichier `NOTICE` amont) | +| Natif Wireshark 4.6.4 | **Oui** — dissecteurs natifs complets `goose`, `sv` et `mms` (via `tpkt`/`cotp`) ; ce script Lua est à considérer comme obsolète ou pédagogique | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `iec61850_dissector.lua` | Dissecteur `IEC61850` (champs `iec61850.*`) | +| `README_IEC61850_PLUGIN.md` | Documentation amont (en chinois) : installation, fonctions, filtres | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête du fichier Lua. + +## Utilisation + +Copier `iec61850_dissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `iec61850`. + +## Remarques + +- **Remplace les dissecteurs natifs** : le script prend les EtherType + `0x88B8` / `0x88BA` et les ports TCP 102 / UDP 102 à la place de `goose`, + `sv` et `tpkt` (donc `cotp`/`mms`), dont le décodage est bien plus + complet. Ne le charger que pour un usage ciblé, puis le retirer. +- **`bit32` absent des Wireshark récents** : le décodage BER appelle + `bit32.band` (2 appels), absent de Lua 5.4 (Wireshark 4.6 fournit + `bit`) ; contournement local : `bit32 = bit` en tête du script (non fait, + fichier conservé tel quel ; non vérifié). +- Les métadonnées `set_plugin_info` (auteur « IEC 61850 Working Group », + dépôt `github.com/iec61850/wireshark-plugin`) ne correspondent pas au + dépôt amont réel ; la provenance retenue est celle du tableau ci-dessus. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/iec61850-marnm/README_IEC61850_PLUGIN.md b/dissectors/iec61850-marnm/README_IEC61850_PLUGIN.md new file mode 100644 index 0000000..c25b2ce --- /dev/null +++ b/dissectors/iec61850-marnm/README_IEC61850_PLUGIN.md @@ -0,0 +1,178 @@ +# IEC 61850 Wireshark Lua Dissector Plugin + +这是一个用于解析 IEC 61850 协议数据报文的 Wireshark Lua 插件,支持以下三种主要协议: + +## 支持的协议 + +1. **GOOSE (Generic Object Oriented Substation Event)** - 通用面向对象变电站事件 + - 以太网类型:0x88B8 + - 用于快速传输变电站事件信息 + +2. **SV (Sampled Values)** - 采样值 + - 以太网类型:0x88BA + - 用于传输电流/电压采样数据 + +3. **MMS (Manufacturing Message Specification)** - 制造报文规范 + - TCP 端口:102, 1002, 10002 + - 用于客户端 - 服务器通信 + +## 安装方法 + +### Linux +```bash +# 创建插件目录(如果不存在) +mkdir -p ~/.local/lib/wireshark/plugins/ + +# 复制插件文件 +cp iec61850_dissector.lua ~/.local/lib/wireshark/plugins/ + +# 或者系统级安装 +sudo cp iec61850_dissector.lua /usr/share/wireshark/plugins/ +``` + +### Windows +``` +将 iec61850_dissector.lua 复制到: +C:\Program Files\Wireshark\plugins\ +``` + +### macOS +```bash +# 创建插件目录 +mkdir -p ~/.local/lib/wireshark/plugins/ + +# 复制插件文件 +cp iec61850_dissector.lua ~/.local/lib/wireshark/plugins/ +``` + +## 验证安装 + +1. 启动 Wireshark +2. 点击菜单:`帮助 (Help)` → `关于 Wireshark (About Wireshark)` +3. 查看 `插件 (Plugins)` 标签页 +4. 确认列表中显示 "IEC 61850 Protocol Dissector" + +或者在 Wireshark 启动时查看控制台输出,应该能看到: +``` +IEC 61850 plugin loaded successfully +``` + +## 功能特性 + +### ASN.1 BER 解码 +- 自动识别和解析 BER 编码的 TLV (Tag-Length-Value) 结构 +- 支持以下数据类型: + - BOOLEAN (布尔值) + - INTEGER (整数) + - BIT STRING (位串) + - OCTET STRING (字节串) + - NULL + - OBJECT IDENTIFIER (对象标识符) + - UTF8String / VisibleString (字符串) + - SEQUENCE (序列) + - APPLICATION 类标签 + +### GOOSE 报文解析 +- APPID (应用标识符) +- 长度字段 +- 保留字段 +- GOOSE APDU (ASN.1 BER 编码) + - GoCB Reference (控制块引用) + - TimeAllowedToLive (存活时间) + - DataSet Reference (数据集引用) + - stNum (状态号) + - sqNum (序列号) + - Test 标志 + - ConfRev (配置版本) + - NumDatSetEntries (数据条目数) + - All Data (所有数据) + +### SV 报文解析 +- APPID (应用标识符) +- 长度字段 +- 保留字段 +- SV APDU (ASN.1 BER 编码) + - SvID (采样值 ID) + - SmpCnt (采样计数) + - ConfRev (配置版本) + - SmpSynch (采样同步) + - DataSet Reference (数据集引用) + - All Data (所有数据) + +### MMS 报文解析 +- 完整的 ASN.1 BER 解码 +- 支持 MMS 服务类型识别: + - Initiate / Conclude + - Read / Write + - GetVariableAccessAttributes + - DefineNamedVariable + - EventNotification + - Journal 操作 + - ProgramInvocation 操作 + - Domain 操作 + +## 使用方法 + +1. **捕获流量** + - 选择适当的网络接口 + - 开始捕获 + +2. **过滤表达式** + ``` + iec61850 # 所有 IEC 61850 协议 + goose # 仅 GOOSE 报文 + sv # 仅采样值报文 + mms # 仅 MMS 报文 + ethertype == 0x88b8 # GOOSE 以太网类型 + ethertype == 0x88ba # SV 以太网类型 + tcp.port == 102 # MMS TCP 端口 + ``` + +3. **查看详细信息** + - 在数据包列表中选择 IEC 61850 数据包 + - 在数据包详情面板中展开 "IEC 61850 Protocol Suite" + - 查看各个字段的详细解析 + +## 故障排除 + +### 插件未加载 +- 检查 Wireshark 的插件目录路径是否正确 +- 确认 Lua 解释器已启用:`帮助` → `关于 Wireshark` → `文件夹` 查看插件路径 +- 检查 Wireshark 控制台是否有错误信息 + +### 语法错误 +- 使用 `luac -p iec61850_dissector.lua` 检查语法 +- 确保 Wireshark 版本与 Lua 版本兼容 + +### 协议未被识别 +- 检查以太网的类型是否正确 (GOOSE: 0x88B8, SV: 0x88BA) +- 对于 MMS,确认 TCP 端口是否为 102 或其他配置的端口 +- 可以尝试手动设置协议:右键数据包 → `Decode As` → 选择相应协议 + +## 技术细节 + +### 协议识别逻辑 +1. **GOOSE**: APPID 范围 0x0000-0x3FFF,且长度字段匹配 +2. **SV**: APPID 范围 0x4000-0x7FFF,且长度字段匹配 +3. **MMS**: 基于 TCP 端口 (102, 1002, 10002) 或 ASN.1 标签特征 + +### ASN.1 BER 解码器 +- 支持定长和不定长编码 +- 递归解析嵌套结构 +- 自动识别标签类别 (Universal, Application, Context-specific) + +## 开发信息 + +- **版本**: 1.0.0 +- **许可证**: 参见 LICENSE 文件 +- **兼容性**: Wireshark 3.x 及以上版本 + +## 贡献 + +欢迎提交问题报告和功能请求。如需扩展特定 MMS 服务的详细解析,可以参考 IEC 61850-8-1 标准文档。 + +## 参考资源 + +- IEC 61850 标准文档 +- Wireshark Lua API 文档:https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Proto.html +- IEC 61850 协议入门指南 diff --git a/dissectors/iec61850-marnm/iec61850_dissector.lua b/dissectors/iec61850-marnm/iec61850_dissector.lua new file mode 100644 index 0000000..e855053 --- /dev/null +++ b/dissectors/iec61850-marnm/iec61850_dissector.lua @@ -0,0 +1,418 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/Marnm/iec61850-packets-dec-lua (iec61850_dissector.lua), +-- commit 0969d65fdc4cefa8670e3cbcc3e669f46777a330 du 27/08/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- IEC 61850 MMS/GOOSE/SV Wireshark Lua Dissector Plugin +-- This plugin provides basic dissection support for IEC 61850 protocols +-- Place this file in: ~/.local/lib/wireshark/plugins/ (Linux) or +-- C:\Program Files\Wireshark\plugins\ (Windows) + +-- Protocol definitions +local iec61850_proto = Proto("IEC61850", "IEC 61850 Protocol Suite") + +-- Common fields +local f_apdu_type = ProtoField.uint8("iec61850.apdu_type", "APDU Type", base.DEC) +local f_length = ProtoField.uint16("iec61850.length", "Length", base.DEC) +local f_invoke_id = ProtoField.uint32("iec61850.invoke_id", "Invoke ID", base.DEC) + +-- MMS Fields +local f_mms_service = ProtoField.uint8("iec61850.mms.service", "MMS Service", base.HEX) +local f_mms_data = ProtoField.bytes("iec61850.mms.data", "MMS Data") + +-- GOOSE Fields +local f_goose_appid = ProtoField.uint16("iec61850.goose.appid", "APPID", base.HEX) +local f_goose_length = ProtoField.uint16("iec61850.goose.length", "Length", base.DEC) +local f_goose_reserved = ProtoField.uint16("iec61850.goose.reserved", "Reserved", base.DEC) +local f_goose_pcap = ProtoField.string("iec61850.goose.pcap", "Protocol APDU") +local f_goose_gocbref = ProtoField.string("iec61850.goose.gocbref", "GoCB Reference") +local f_goose_timeallowedtolive = ProtoField.uint32("iec61850.goose.tatl", "TimeAllowedToLive", base.DEC) +local f_goose_datset = ProtoField.string("iec61850.goose.dataset", "DataSet Reference") +local f_goose_statusnumber = ProtoField.uint32("iec61850.goose.stnum", "stNum", base.DEC) +local f_goose_sequence = ProtoField.uint32("iec61850.goose.sqnum", "sqNum", base.DEC) +local f_goose_test = ProtoField.bool("iec61850.goose.test", "Test", 8, nil, 0x80, nil) +local f_goose_confrev = ProtoField.uint32("iec61850.goose.confrev", "ConfRev", base.DEC) +local f_goose_ndat = ProtoField.uint8("iec61850.goose.ndat", "NumDatSetEntries", base.DEC) +local f_goose_data = ProtoField.bytes("iec61850.goose.data", "All Data") + +-- SV (Sampled Values) Fields +local f_sv_appid = ProtoField.uint16("iec61850.sv.appid", "APPID", base.HEX) +local f_sv_length = ProtoField.uint16("iec61850.sv.length", "Length", base.DEC) +local f_sv_reserved = ProtoField.uint16("iec61850.sv.reserved", "Reserved", base.DEC) +local f_sv_pcap = ProtoField.string("iec61850.sv.pcap", "Protocol APDU") +local f_sv_svid = ProtoField.string("iec61850.sv.svid", "SvID") +local f_sv_smpcnt = ProtoField.uint32("iec61850.sv.smpcnt", "SmpCnt", base.DEC) +local f_sv_confrev = ProtoField.uint32("iec61850.sv.confrev", "ConfRev", base.DEC) +local f_sv_smpsynch = ProtoField.bool("iec61850.sv.smpsynch", "SmpSynch", 8, nil, 0x80, nil) +local f_sv_datset = ProtoField.string("iec61850.sv.dataset", "DataSet Reference") +local f_sv_data = ProtoField.bytes("iec61850.sv.data", "All Data") + +-- Register all fields +iec61850_proto.fields = { + f_apdu_type, f_length, f_invoke_id, + f_mms_service, f_mms_data, + f_goose_appid, f_goose_length, f_goose_reserved, f_goose_pcap, + f_goose_gocbref, f_goose_timeallowedtolive, f_goose_datset, + f_goose_statusnumber, f_goose_sequence, f_goose_test, + f_goose_confrev, f_goose_ndat, f_goose_data, + f_sv_appid, f_sv_length, f_sv_reserved, f_sv_pcap, + f_sv_svid, f_sv_smpcnt, f_sv_confrev, f_sv_smpsynch, + f_sv_datset, f_sv_data +} + +-- ASN.1 BER tag constants +local BER_TAG_SEQUENCE = 0x30 +local BER_TAG_APPLICATION_0 = 0xA0 +local BER_TAG_APPLICATION_1 = 0xA1 +local BER_TAG_APPLICATION_2 = 0xA2 +local BER_TAG_APPLICATION_3 = 0xA3 +local BER_TAG_BOOLEAN = 0x01 +local BER_TAG_INTEGER = 0x02 +local BER_TAG_BIT_STRING = 0x03 +local BER_TAG_OCTET_STRING = 0x04 +local BER_TAG_NULL = 0x05 +local BER_TAG_OID = 0x06 +local BER_TAG_UTF8_STRING = 0x0C +local BER_TAG_VISIBLE_STRING = 0x1A +local BER_TAG_UTC_TIME = 0x17 +local BER_TAG_GENERALIZED_TIME = 0x18 +local BER_TAG_CONTEXT_0 = 0x80 +local BER_TAG_CONTEXT_1 = 0x81 + +-- MMS Service Types +local mms_services = { + [0x01] = "Initiate", + [0x02] = "Conclude", + [0x03] = "Reject", + [0x04] = "Cancel", + [0x05] = "GetVariableAccessAttributes", + [0x06] = "DefineNamedVariable", + [0x07] = "DefineScatteredAccess", + [0x08] = "GetVariableAccessAttributes", + [0x09] = "Read", + [0x0A] = "Write", + [0x0B] = "GetNamedVariableArrayAttributes", + [0x0C] = "DefineNamedVariableArray", + [0x0D] = "DeleteVariableAccess", + [0x0E] = "DefineDomain", + [0x0F] = "GetDomainAttributes", + [0x10] = "DownloadSegment", + [0x11] = "UploadSegment", + [0x12] = "RequestDomainDownload", + [0x13] = "RequestDomainUpload", + [0x14] = "LoadDomainContents", + [0x15] = "StoreDomainContents", + [0x16] = "DeleteDomain", + [0x17] = "GetProgramInvocationAttributes", + [0x18] = "StartProgramInvocation", + [0x19] = "StopProgramInvocation", + [0x1A] = "ResumeProgramInvocation", + [0x1B] = "KillProgramInvocation", + [0x1C] = "GetProgramExecutionArgs", + [0x1D] = "DefineProgramInvocation", + [0x1E] = "DeleteProgramInvocation", + [0x1F] = "EventNotification", + [0x20] = "AlarmAcknowledge", + [0x21] = "JournalInitialize", + [0x22] = "JournalRead", + [0x23] = "JournalStatus" +} + +-- Helper function to decode BER length +function decode_ber_length(buffer, offset) + local first_byte = buffer(offset, 1):uint() + if first_byte < 0x80 then + return first_byte, 1 + elseif first_byte == 0x80 then + return -1, 1 -- Indefinite length + else + local num_bytes = first_byte - 0x80 + if num_bytes > 4 then + return -1, 1 + end + local length = 0 + for i = 0, num_bytes - 1 do + length = length * 256 + buffer(offset + 1 + i, 1):uint() + end + return length, num_bytes + 1 + end +end + +-- Helper function to decode BER tag and length +function decode_ber_tag_length(buffer, offset) + if offset >= buffer:len() then + return nil, 0, 0 + end + + local tag = buffer(offset, 1):uint() + local length, len_size = decode_ber_length(buffer, offset + 1) + + return tag, length, 1 + len_size +end + +-- Decode ASN.1 BER encoded data recursively +function decode_asn1_ber(buffer, offset, tree, prefix) + if offset >= buffer:len() then + return offset + end + + local tag, length, header_size = decode_ber_tag_length(buffer, offset) + if not tag then + return offset + end + + if length == -1 then + length = buffer:len() - offset - header_size + end + + local tag_tree = tree:add(prefix .. string.format(" Tag: 0x%02X", tag), buffer(offset, header_size + length)) + + -- Add specific interpretation based on tag type + if tag == BER_TAG_BOOLEAN then + local value = buffer(offset + header_size, length):uint() + tag_tree:append_text(string.format(" (BOOLEAN): %s", value ~= 0 and "true" or "false")) + elseif tag == BER_TAG_INTEGER then + if length == 1 then + local value = buffer(offset + header_size, length):uint() + tag_tree:append_text(string.format(" (INTEGER): %d", value)) + elseif length == 2 then + local value = buffer(offset + header_size, length):uint() + tag_tree:append_text(string.format(" (INTEGER): %d", value)) + elseif length <= 4 then + local value = buffer(offset + header_size, length):uint() + tag_tree:append_text(string.format(" (INTEGER): %d", value)) + else + tag_tree:append_text(" (INTEGER)") + end + elseif tag == BER_TAG_BIT_STRING then + tag_tree:append_text(" (BIT STRING)") + elseif tag == BER_TAG_OCTET_STRING then + tag_tree:append_text(" (OCTET STRING)") + elseif tag == BER_TAG_NULL then + tag_tree:append_text(" (NULL)") + elseif tag == BER_TAG_OID then + tag_tree:append_text(" (OBJECT IDENTIFIER)") + elseif tag == BER_TAG_UTF8_STRING or tag == BER_TAG_VISIBLE_STRING then + local str_value = buffer(offset + header_size, length):string() + tag_tree:append_text(string.format(" (STRING): '%s'", str_value)) + elseif tag == BER_TAG_SEQUENCE then + tag_tree:append_text(" (SEQUENCE)") + -- Recursively decode sequence contents + local seq_offset = offset + header_size + local seq_end = offset + header_size + length + while seq_offset < seq_end do + seq_offset = decode_asn1_ber(buffer, seq_offset, tag_tree, " ") + end + elseif bit32.band(tag, 0xE0) == 0xA0 then -- Application class + local app_num = bit32.band(tag, 0x1F) + tag_tree:append_text(string.format(" (APPLICATION %d)", app_num)) + -- Recursively decode application contents + local app_offset = offset + header_size + local app_end = offset + header_size + length + while app_offset < app_end do + app_offset = decode_asn1_ber(buffer, app_offset, tag_tree, " ") + end + else + tag_tree:append_text(string.format(" (Tag: 0x%02X)", tag)) + end + + return offset + header_size + length +end + +-- GOOSE dissector +function dissect_goose(buffer, pinfo, root) + local goose_tree = root:add(iec61850_proto, buffer(), "GOOSE Packet") + + if buffer:len() < 4 then + goose_tree:add_expert_info(PI_MALFORMED, PI_ERROR, "GOOSE packet too short") + return + end + + local offset = 0 + + -- APPID (2 bytes) + local appid = buffer(offset, 2):uint() + goose_tree:add(f_goose_appid, buffer(offset, 2)):append_text(string.format(" (0x%04X)", appid)) + offset = offset + 2 + + -- Length (2 bytes) + local length = buffer(offset, 2):uint() + goose_tree:add(f_goose_length, buffer(offset, 2)) + offset = offset + 2 + + -- Reserved (2 bytes) + local reserved = buffer(offset, 2):uint() + goose_tree:add(f_goose_reserved, buffer(offset, 2)) + offset = offset + 2 + + -- Remaining is the Protocol APDU (ASN.1 BER encoded) + if offset < buffer:len() then + local pcap_buffer = buffer(offset, buffer:len() - offset) + goose_tree:add(f_goose_pcap, pcap_buffer) + + -- Try to decode ASN.1 BER structure + decode_asn1_ber(pcap_buffer, 0, goose_tree, "GOOSE APDU") + end + + -- Set protocol info + pinfo.cols.protocol:set("GOOSE") + pinfo.cols.info:set(string.format("GOOSE AppID: 0x%04X", appid)) +end + +-- SV (Sampled Values) dissector +function dissect_sv(buffer, pinfo, root) + local sv_tree = root:add(iec61850_proto, buffer(), "Sampled Values Packet") + + if buffer:len() < 4 then + sv_tree:add_expert_info(PI_MALFORMED, PI_ERROR, "SV packet too short") + return + end + + local offset = 0 + + -- APPID (2 bytes) + local appid = buffer(offset, 2):uint() + sv_tree:add(f_sv_appid, buffer(offset, 2)):append_text(string.format(" (0x%04X)", appid)) + offset = offset + 2 + + -- Length (2 bytes) + local length = buffer(offset, 2):uint() + sv_tree:add(f_sv_length, buffer(offset, 2)) + offset = offset + 2 + + -- Reserved (2 bytes) + local reserved = buffer(offset, 2):uint() + sv_tree:add(f_sv_reserved, buffer(offset, 2)) + offset = offset + 2 + + -- Remaining is the Protocol APDU (ASN.1 BER encoded) + if offset < buffer:len() then + local pcap_buffer = buffer(offset, buffer:len() - offset) + sv_tree:add(f_sv_pcap, pcap_buffer) + + -- Try to decode ASN.1 BER structure + decode_asn1_ber(pcap_buffer, 0, sv_tree, "SV APDU") + end + + -- Set protocol info + pinfo.cols.protocol:set("SV") + pinfo.cols.info:set(string.format("SV AppID: 0x%04X", appid)) +end + +-- MMS over TCP dissector +function dissect_mms(buffer, pinfo, root) + local mms_tree = root:add(iec61850_proto, buffer(), "MMS Packet") + + if buffer:len() < 1 then + mms_tree:add_expert_info(PI_MALFORMED, PI_ERROR, "MMS packet too short") + return + end + + local offset = 0 + + -- Try to decode as ASN.1 BER encoded MMS PDU + decode_asn1_ber(buffer, 0, mms_tree, "MMS APDU") + + -- Set protocol info + pinfo.cols.protocol:set("MMS") + pinfo.cols.info:set("MMS Protocol Data Unit") +end + +-- Main dissector function +function iec61850_proto.dissector(buffer, pinfo, tree) + if buffer:len() == 0 then + return + end + + local subtree = tree:add(iec61850_proto, buffer(), "IEC 61850 Protocol") + + -- Determine protocol type based on port or packet characteristics + local src_port = pinfo.src_port + local dst_port = pinfo.dest_port + + -- Check for GOOSE (typically Ethernet type 0x88B8, but we check packet structure) + -- GOOSE packets usually start with APPID in range 0x0000-0x3FFF + if buffer:len() >= 4 then + local potential_appid = buffer(0, 2):uint() + + -- GOOSE identification: APPID typically in 0x0000-0x3FFF range + -- and second length field matches remaining packet size + if potential_appid <= 0x3FFF then + local potential_length = buffer(2, 2):uint() + if potential_length == buffer:len() - 4 then + dissect_goose(buffer, pinfo, subtree) + return + end + end + + -- SV identification: APPID typically in 0x4000-0x7FFF range + if potential_appid >= 0x4000 and potential_appid <= 0x7FFF then + local potential_length = buffer(2, 2):uint() + if potential_length == buffer:len() - 4 then + dissect_sv(buffer, pinfo, subtree) + return + end + end + end + + -- Check for MMS over TCP (ports 102 or common MMS ports) + if src_port and dst_port then + local port_num = math.min(src_port:value(), dst_port:value()) + if port_num == 102 or port_num == 1002 or port_num == 10002 then + dissect_mms(buffer, pinfo, subtree) + return + end + end + + -- Default: try to detect based on content + -- If it looks like ASN.1 BER encoded data, treat as MMS + if buffer:len() > 0 then + local first_byte = buffer(0, 1):uint() + if first_byte == BER_TAG_SEQUENCE or + first_byte == BER_TAG_APPLICATION_0 or + first_byte == BER_TAG_APPLICATION_1 then + dissect_mms(buffer, pinfo, subtree) + return + end + end + + -- Unknown IEC 61850 protocol + subtree:add_expert_info(PI_UNDECODED, PI_WARN, "Unknown IEC 61850 protocol type") + pinfo.cols.protocol:set("IEC61850") + pinfo.cols.info:set("IEC 61850 (Unknown Type)") +end + +-- Register dissector for Ethernet types +local ethernet_type_table = DissectorTable.get("ethertype") +if ethernet_type_table then + -- GOOSE uses Ethernet type 0x88B8 + ethernet_type_table:add(0x88B8, iec61850_proto) + -- SV uses Ethernet type 0x88BA + ethernet_type_table:add(0x88BA, iec61850_proto) +end + +-- Register dissector for TCP ports +local tcp_port_table = DissectorTable.get("tcp.port") +if tcp_port_table then + -- MMS typically uses port 102 + tcp_port_table:add(102, iec61850_proto) + tcp_port_table:add(1002, iec61850_proto) + tcp_port_table:add(10002, iec61850_proto) +end + +-- Register dissector for UDP ports (some implementations may use UDP) +local udp_port_table = DissectorTable.get("udp.port") +if udp_port_table then + udp_port_table:add(102, iec61850_proto) +end + +-- Plugin information +set_plugin_info({ + name = "IEC 61850 Protocol Dissector", + version = "1.0.0", + author = "IEC 61850 Working Group", + description = "Dissector for IEC 61850 GOOSE, SV, and MMS protocols", + repository = "https://github.com/iec61850/wireshark-plugin" +}) + +-- Debug output when plugin loads (use print for Wireshark Lua) +-- debug("IEC 61850 plugin loaded successfully") diff --git a/dissectors/ipnd-rohieb/README.md b/dissectors/ipnd-rohieb/README.md new file mode 100644 index 0000000..4380b66 --- /dev/null +++ b/dissectors/ipnd-rohieb/README.md @@ -0,0 +1,74 @@ +# IPND — découverte de voisins des réseaux tolérants aux délais (rohieb) + +Dissecteur Wireshark Lua d'IPND (IP Neighbor Discovery), protocole de +découverte de voisins des réseaux tolérants aux délais et aux ruptures +(DTN, « Internet interplanétaire ») décrit par les brouillons +`draft-irtf-dtnrg-ipnd` de l'IRTF. Les nœuds DTN diffusent des balises +sur UDP 4551 qui annoncent leur identifiant (EID) et leurs services +(couches de convergence TCPCL, UDPCL…). Le script décode la version 2 +des balises : drapeaux, numéro de séquence, EID et bloc de services à +longueurs SDNV (issue #781). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/rohieb/wireshark-ipnd-dissector (`ipnd.lua`) | +| Commit importé | `0ea78bc664cbb8d087e45691143a6c70542dd404` du 23/05/2016 (seul commit du dépôt, « first version: parses v2 services and EIDs, no NBFs yet ») ; c'est aussi la dernière modification de `ipnd.lua` | +| Licence amont | BSD-2-Clause : texte de la licence en tête du script (lignes 9 à 32 du fichier importé), « Copyright (c) Roland Hieber ». Le dépôt ne contient pas de fichier de licence séparé. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : Wireshark décode Bundle Protocol (`bundle`, `bpv7`), BPSec et TCPCL, mais aucun dissecteur IPND dans `tshark -G protocols` | + +Le texte de la licence BSD-2-Clause, avec la mention de copyright, est +conservé dans l'en-tête du script, qui reste la seule source amont de la +licence : aucun fichier `LICENSE` n'est créé ici (le validateur l'accepte +avec un avertissement). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/ipnd.lua` | Protocole `ipnd` (« IP Neighbor Discovery », ligne 37) ; alertes expertes (lignes 43 à 50) ; champs `ipnd.*` (lignes 56 à 81) ; décodage SDNV et chaînes (lignes 89 à 158) ; services (ligne 161) ; versions 1, 2 et 3 (lignes 197, 202 et 262) ; dissecteur ligne 274 ; port UDP 4551 (lignes 292 et 293) | + +## Utilisation + +Copier `src/ipnd.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`). Le trafic du port UDP 4551 est +décodé. Filtres : `ipnd`, `ipnd.version`, `ipnd.seqno`, `ipnd.eid`, +`ipnd.flags.has_eid`, `ipnd.flags.has_service_block`… + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : chargement sans erreur. Le +dépôt amont ne contient aucune capture. Essais sur une capture +synthétique (UDP 4551), non commitée : + +| Essai | Résultat | +|---|---| +| v2, EID `dtn://node1` et service `tcpcl` / `port=4556` | drapeaux, séquence 1, « EID: dtn://node1 », « Service: tcpcl, params: port=4556 » | +| v2, EID de 156 caractères (longueur SDNV sur 2 octets) | EID décodé en entier, « String Length: 156 » | +| v2, 2 services annoncés, 1 seul présent | premier service décodé, puis « Service Name: [error] » et alerte « Insufficient bytes remaining in packet » | +| v2, SDNV tronquée (`80 80`) | « EID: [error] », erreur experte « Malformed SDNV » | +| v2, longueur d'EID 32 pour 3 octets | « EID: [error] », alerte « Insufficient bytes remaining in packet » | +| v1 et v3 | seule la version est affichée, sans alerte | +| Version 7 | alerte « Unknown Version » | +| v2 avec filtre de Bloom (drapeau 0x04) | drapeau affiché, octets du filtre ignorés | +| Champs | `ipnd.eid` = « String Value: dtn://node1 » ; `ipnd.service_name` = `537472696e,537472696e67205661` ; `ipnd.service_param` absent ; filtre `ipnd.eid contains "node1"` : 1 paquet | + +## Limites constatées + +- Versions 1 et 3 non décodées (fonctions vides, lignes 197 à 199 et + 262 à 263) ; filtre de Bloom des voisins (NBF) de la version 2 non + décodé (ligne 257, « FIXME »). +- Ligne 155 : la valeur des champs est remplacée par le texte + « String Value: … ». Pour `ipnd.eid` (chaîne), le champ vaut + « String Value: dtn://node1 » ; pour les noms de services (champ + d'octets), il contient les codes hexadécimaux des premiers caractères + de ce texte (`537472696e` = « Strin ») au lieu du nom. +- Les paramètres de service sont rangés dans `ipnd.service_name` + (ligne 179) : `ipnd.service_param` n'est jamais rempli. +- `ipnd.fields` (ligne 78) cite `pf_eid_len`, jamais définie ; sans + effet constaté. `pf_beacon_len` est déclaré mais pas utilisé. +- Variables globales `ipnd` et `udp_table`. diff --git a/dissectors/ipnd-rohieb/src/ipnd.lua b/dissectors/ipnd-rohieb/src/ipnd.lua new file mode 100644 index 0000000..d96415d --- /dev/null +++ b/dissectors/ipnd-rohieb/src/ipnd.lua @@ -0,0 +1,293 @@ +-- SPDX-License-Identifier: BSD-2-Clause +-- Importé de https://github.com/rohieb/wireshark-ipnd-dissector (ipnd.lua), +-- commit 0ea78bc664cbb8d087e45691143a6c70542dd404 du 23/05/2016 (dernière modification du fichier : +-- commit 0ea78bc664cbb8d087e45691143a6c70542dd404 du 23/05/2016). +-- Licence amont : BSD-2-Clause (texte en tête du fichier, ci-dessous) — voir README.md. +-- Wireshark Dissector for the IP Neighbor Discovery protocol +-- as specified in https://tools.ietf.org/html/draft-irtf-dtnrg-ipnd-00 et seq. +-- +-- Copyright (c) Roland Hieber +-- All rights reserved. +-- +-- Redistribution and use in source and binary forms, with or without +-- modification, are permitted provided that the following conditions +-- are met: +-- +-- 1. Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- 2. Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in the +-- documentation and/or other materials provided with the distribution. +-- +-- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +-- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +-- ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +-- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +-- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +-- SUCH DAMAGE. +-- + +--local bit = require("bit") + +ipnd = Proto("ipnd", "IP Neighbor Discovery") + +-- +-- Error handling +-- + +local ef_unknown_version = ProtoExpert.new("ipnd.err.unknown_version", "Unknown Version", + expert.group.UNDECODED, expert.severity.WARN) +local ef_sdnv_malformed = ProtoExpert.new("ipnd.err.sdnv_malformed", "Malformed SDNV", + expert.group.MALFORMED, expert.severity.ERROR) +local ef_too_short = ProtoExpert.new("ipnd.err.too_short", "Insufficient bytes remaining in packet", + expert.group.MALFORMED, expert.severity.ERROR) + +ipnd.experts = { ef_unknown_version, ef_sdnv_malformed, ef_too_short } + +-- +-- Protocol Fields +-- + +local pf_version = ProtoField.uint8 ("ipnd.version" , "Version") +local pf_flags = ProtoField.new ("Flags", "ipnd.flags", ftypes.UINT8, nil, base.HEX) +local pf_beacon_len = ProtoField.bytes ("ipnd.beacon_length" , "Beacon Length") +local pf_seqno = ProtoField.uint16("ipnd.seqno" , "Sequence Number") +local pf_eid = ProtoField.string("ipnd.eid" , "Canonical EID") +local pf_service_name = ProtoField.bytes ("ipnd.service_name" , "Service Name") +local pf_service_param = ProtoField.bytes ("ipnd.service_param" , "Service Parameter") + +local flag_v1_zerolength_mask = 0x01 +local pf_flag_v1_zerolength = ProtoField.bool("ipnd.flags.zero_length", + "Zero Length", 8, {"yes","no"}, flag_v1_zerolength_mask, "no Length or EID fields present") +local flag_v2_has_eid_mask = 0x01 +local pf_flag_v2_has_eid = ProtoField.bool("ipnd.flags.has_eid", + "EID Present", 8, {"yes","no"}, flag_v2_has_eid_mask, "EID and EID Length fields are present") +local flag_v2_has_svb_mask = 0x02 +local pf_flag_v2_has_svb = ProtoField.bool("ipnd.flags.has_service_block", + "Service Block present", 8, {"yes","no"}, flag_v2_has_svb_mask) +local flag_v2_has_nbf_mask = 0x04 +local pf_flag_v2_has_nbf = ProtoField.bool("ipnd.flags.has_nbf", + "Neighborhood Bloom Filter present", 8, {"yes","no"}, flag_v2_has_nbf_mask) + +ipnd.fields = { + pf_version, pf_flags, pf_beacon_len, pf_seqno, pf_eid_len, pf_eid, + pf_service_name, pf_service_param, + pf_flag_v1_zerolength, pf_flag_v2_has_eid, pf_flag_v2_has_svb, pf_flag_v2_has_nbf, +} + +-- +-- Primitive decoding functions +-- + +-- Decode SDNV value +-- @returns (value, length) of SDNV, or (nil, ef_error) in case of error. +local function sdnv_decode(buffer) + if buffer:len() == 0 then + return nil, ef_too_short + end + + local value = 0 + local value_len = 0 + local bytes = buffer:bytes() + + repeat + if value_len >= buffer:len() then + return nil, ef_sdnv_malformed + end + + local b = bytes:get_index(value_len) + value = bit.bor(bit.lshift(value, 7), bit.band(b, 0x7f)) + value_len = value_len + 1 + + until bit.band(b, 0x80) == 0 + + return value, value_len +end + +-- Decode string prefixed with SDNV length. +-- @returns (len, len_len, string), or (nil, ef_error) in case of error +local function sdnv_string_decode(buffer) + if buffer:len() == 0 then + return nil, ef_too_short + end + + local len, len_len = sdnv_decode(buffer) + local str, str_len = "", 0 + + if not len then + return nil, len_len -- len_len is the ef_error value + elseif len and len > buffer:len() then + return nil, ef_too_short + elseif len and len > 0 then + return len, len_len, buffer:range(len_len, len):string() + else -- len == 0 + return len, len_len, "" + end +end + +-- parse and add a SDNV-prefixed string to a tree +-- calls cb_filter(len, len_len, str) which can do error checking and return nil/(ef_error, string) +-- @returns (len, len_len, str) or nil in case of error +local function tree_add_sdnv_string(tree, buffer, name, pf_string, cb_filter) + local len, len_len, str = sdnv_string_decode(buffer) + + if len and len > buffer:len() then + len, len_len = nil, ef_too_short + elseif len and cb_filter then + local ef_error, ef_string = cb_filter(len, len_len, str) + if ef_error then + len, len_len, str = nil, ef_error, ef_string + end + end + + if not len then + local subtree = tree:add(buffer, name .. ": [error]") + subtree:add_proto_expert_info(len_len) + return nil + else + local subtree = tree:add(buffer(0, len+len_len), name .. ": " .. str) + subtree:add(buffer(0, len_len), "String Length: " .. len) + subtree:add(pf_string, buffer(len_len, len), "String Value: " .. str) + return len, len_len, str + end +end + +-- parse a v1 service block and add entries to the tree +local function v1_service_block_decode(tree, buffer) + local len, len_len, str, tmplen + + local subtree = tree:add(buffer, "Service: ") + + len, len_len, str = tree_add_sdnv_string(subtree, buffer, "Service Name", pf_service_name, + function(len, _, __) + if len == 0 then return ef_too_short, "Service Name has length 0" end + end) + if not len then + return nil + end + tmplen = len + len_len + + subtree:set_len(tmplen) + subtree:append_text(str .. ", params: ") + + len, len_len, str = tree_add_sdnv_string(subtree, buffer(tmplen), "Service Parameters", + pf_service_name, function(len, _, __) + if len == 0 then return ef_too_short, "Service Parameter string has length 0" end + end) + if not len then + return nil + end + + subtree:set_len(tmplen + len + len_len) + subtree:append_text(str) + + return tmplen + len + len_len +end + +-- +-- High-level dissectors per IPND version +-- + +-- IPND version 1, see https://tools.ietf.org/html/draft-irtf-dtnrg-ipnd-00 +local function dissect_ipnd_v1(buffer, pinfo, tree) + -- FIXME +end + +-- IPND version 2, see https://tools.ietf.org/html/draft-irtf-dtnrg-ipnd-01 +local function dissect_ipnd_v2(buffer, pinfo, tree) + -- Flags + -- _,value = add_packet_field(...) does not work for bitfields, use bitop and flag masks manually. + -- see https://github.com/wireshark/wireshark/blob/master/epan/wslua/wslua_tree.c#L136 + local flag_range = buffer:range(1,1) + local flag_tree = tree:add(pf_flags, flag_range) + flag_tree:add(pf_flag_v2_has_eid, flag_range) + flag_tree:add(pf_flag_v2_has_svb, flag_range) + flag_tree:add(pf_flag_v2_has_nbf, flag_range) + + local flag_has_eid = (bit.band(flag_range:uint(), flag_v2_has_eid_mask) ~= 0) + local flag_has_svb = (bit.band(flag_range:uint(), flag_v2_has_svb_mask) ~= 0) + local flag_has_nbf = (bit.band(flag_range:uint(), flag_v2_has_nbf_mask) ~= 0) + + -- Sequence Number + tree:add(pf_seqno, buffer:range(2,2)) + + local offset = 4 + + -- EID + if flag_has_eid then + local len, len_len = tree_add_sdnv_string(tree, buffer(offset), "EID", pf_eid) + if not len then + return nil + end + offset = offset + len + len_len + end + + -- Service Block + if flag_has_svb then + local num, len = sdnv_decode(buffer:range(offset)) + if num then + tree:add(buffer(offset, len), "Number of Service Block entries: " .. num) + offset = offset + len + + -- iterate over entries + local n = 0 + while (n < num) do + len = v1_service_block_decode(tree, buffer:range(offset)) + if not len then + return nil + end + offset = offset + len + n = n + 1 + end + else + local subtree = tree:add(buffer(offset), "Number of Service Block entries: [error]") + subtree:add_proto_expert_info(len) + return nil + end + + end -- if flag_has_svb + + -- Neighborhood Bloom Filter + if flag_has_nbf then + -- FIXME: we have no testdata for this... + end +end + +-- IPND version 3, see https://tools.ietf.org/html/draft-irtf-dtnrg-ipnd-03 +local function dissect_ipnd_v3(buffer, pinfo, tree) +end + +local version_dissectors = { + [1] = dissect_ipnd_v1, + [2] = dissect_ipnd_v2, + [3] = dissect_ipnd_v3, +} + +-- +-- Dissector scaffolding +-- +function ipnd.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "IPND" + local subtree = tree:add(ipnd, buffer(0), "IP Neighbor Discovery") + local version_range = buffer:range(0,1) + local version = version_range:uint() + + subtree:add(pf_version, version_range) + + if version_dissectors[version] then + version_dissectors[version](buffer, pinfo, subtree) + else + subtree:add_proto_expert_info(ef_unknown_version) + end +end + +-- +-- Dissector registration for UDP port 4551 +-- +udp_table = DissectorTable.get("udp.port") +udp_table:add(4551, ipnd) diff --git a/dissectors/ka9q-radio-ctl/LICENSE b/dissectors/ka9q-radio-ctl/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/ka9q-radio-ctl/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/ka9q-radio-ctl/README.md b/dissectors/ka9q-radio-ctl/README.md new file mode 100644 index 0000000..a0133e9 --- /dev/null +++ b/dissectors/ka9q-radio-ctl/README.md @@ -0,0 +1,81 @@ +# ka9q-radio — protocole de contrôle et d'état (ka9qctl) + +Dissecteur Wireshark Lua fourni avec ka9q-radio, le récepteur de radio +logicielle multicanal de Phil Karn (KA9Q). Il décode les paquets de +contrôle et d'état échangés entre `radiod` et ses clients (`control`, +`monitor`…) : la classe du message (STATUS ou CMD), puis une suite de +TLV (type sur un octet, longueur au format BER). Il décode les entiers, +les flottants, les chaînes, les adresses de socket IPv4 et IPv6, les +listes et les heures GPS, sur UDP 5006 (issue #827). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ka9q/ka9q-radio (`share/ka9q_ctl.lua`) | +| Commit importé | `ad53ecd341c8464e5813e6feb66be37a1e966982` du 01/11/2026 (dernier commit de la branche par défaut `main`) ; dernière modification du fichier : commit `0c55fba1b832689451f95c37ecf8d14c37426bc9` du 08/10/2026 | +| Licence amont | GPL-3.0-only : `LICENSE.TXT` du dépôt (texte de la GPLv3, sans mention « or later » dans le dépôt) ; le script n'a pas d'en-tête de licence (« December 2025 KA9Q + ChatGPT »). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur ka9q-radio dans `tshark -G protocols` | + +Texte de la licence : fichier `LICENSE` de ce dossier (copie conforme +du `LICENSE.TXT` amont). Le fichier est repris tel quel (aucune +modification) ; seule l'en-tête de provenance de cinq lignes est ajoutée +en tête de `ka9q_ctl.lua` (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/ka9q_ctl.lua` | Protocole `ka9qctl` (« ka9q-radio Control/Status », ligne 25) ; préférences (lignes 28 à 30) ; champs `ka9qctl.*` (lignes 33 à 52) ; noms des 122 types de TLV (`STATUS_TYPE_NAME`, ligne 55) ; nature de chaque type (`TLV_KIND`, ligne 189) ; décodage par nature (ligne 670) ; dissecteur ligne 987 ; inscription sur UDP 5006 ligne 1087 | + +## Utilisation + +Copier `src/ka9q_ctl.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`). Le trafic du port UDP 5006 est +décodé ; la colonne Info affiche « STAT » ou « CMD », puis l'étiquette +de commande (`tag=`), le SSRC et l'heure GPS quand ils sont présents. +Filtres : `ka9qctl`, `ka9qctl.class`, `ka9qctl.tlv.type`, +`ka9qctl.sock.addr4`, `ka9qctl.string`… + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : chargement sans erreur. Le +dépôt amont ne contient aucune capture. Essais sur une capture +synthétique (UDP 5006), non commitée ; le codage a été comparé à +`src/status.c` et `src/status.h` du même commit : + +| Essai | Résultat | +|---|---| +| STATUS : COMMAND_TAG, DESCRIPTION, STATUS_DEST_SOCKET IPv4, RADIO_FREQUENCY (f64), OUTPUT_SAMPRATE, GPS_TIME, EOL | « STAT tag=1234 5678 2024-05-17 16:53:02.0 UTC » ; « 239.1.2.3:5006 », « 14 074 000.000 Hz », « 12 000 Hz » | +| CMD : COMMAND_TAG 7, RADIO_FREQUENCY 7,074 MHz | « CMD tag=7 », « 7 074 000.000 Hz » | +| DESCRIPTION de 150 octets (longueur BER `81 96`) | Longueur 150, chaîne complète | +| TLV annoncé à 50 octets, 5 présents | Erreur « TLV type 4 length 50 overruns packet » | +| Type inconnu 200 | « (200) Unknown », valeur brute | +| RADIO_FREQUENCY de longueur 0 (zéro compressé par `radiod`) | « 0.000 Hz » | + +## Limites constatées + +- Six types que `status.h` marque aujourd'hui `UNUSED` portent encore + leur ancien nom : 37 DOPPLER_FREQUENCY, 38 DOPPLER_FREQUENCY_RATE, + 81 GAINSTEP, 88 CONVERTER_OFFSET, 92 COHERENT_BIN_SPACING et + 103 BLOCKS_SINCE_POLL (lignes 93 à 159). Les types 118 à 121 s'écrivent + « SWEEP RATE », « SWEEP DURATION »… avec une espace au lieu du `_` de + `status.h` (lignes 174 à 177). +- La préférence « Float/Dbl are little-endian » est sans effet : elle + est copiée dans une variable locale jamais lue (lignes 993 à 995), et + les flottants sont toujours lus en gros-boutiste. C'est d'ailleurs le + bon ordre : `status.c` (`encode_float`, `encode_double`) code les + flottants comme des entiers gros-boutistes, zéros de tête supprimés, + contrairement au commentaire de l'en-tête du script (« machine + order »). +- L'avertissement « Extra … byte(s) after EOL » (lignes 1071 à 1077) + ne peut jamais apparaître : la boucle s'arrête dès qu'elle lit un type + 0 (ligne 1015), avant d'atteindre ce contrôle. Les octets qui suivent + EOL sont ignorés sans avertissement (essai : `00 aa bb` en fin de + paquet). +- Aucun champ filtrable par type de TLV : la fréquence, le SSRC ou la + description ne se filtrent qu'au travers des champs génériques + (`ka9qctl.double`, `ka9qctl.uint`, `ka9qctl.string`). +- Seul le port UDP 5006 est inscrit ; `radiod` peut utiliser d'autres + groupes et ports d'état selon sa configuration. diff --git a/dissectors/ka9q-radio-ctl/src/ka9q_ctl.lua b/dissectors/ka9q-radio-ctl/src/ka9q_ctl.lua new file mode 100644 index 0000000..a0b18be --- /dev/null +++ b/dissectors/ka9q-radio-ctl/src/ka9q_ctl.lua @@ -0,0 +1,1087 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/ka9q/ka9q-radio (share/ka9q_ctl.lua), +-- commit ad53ecd341c8464e5813e6feb66be37a1e966982 du 01/11/2026 (dernière modification du fichier : +-- commit 0c55fba1b832689451f95c37ecf8d14c37426bc9 du 08/10/2026). +-- Licence amont : GPL-3.0 (LICENSE.TXT amont) — voir README.md et LICENSE. +-- ka9q_ctl.lua - Wireshark Lua dissector for ka9q-radio control/status protocol +-- UDP port: 5006 +-- +-- Wire format: +-- u8 msg_class (0=STATUS, 1=CMD) +-- repeated TLVs: +-- u8 tlv_type +-- len (BER-style): +-- if first_len < 0x80: length = first_len +-- else: n = first_len & 0x7f; next n bytes big-endian length +-- value[length] +-- +-- TLV type 0 (EOL) terminates parsing immediately. Extra bytes after EOL are flagged. +-- +-- Unsigned integers are variable-length big-endian; length 0 means 0. +-- Floats/doubles are sender "machine order" (endianness is a preference). +-- Socket values: length 6 (IPv4), 10 (compact-IPv6: 8 bytes), or 18 (full IPv6: 16 bytes), +-- followed by 2-byte port in network order. +-- December 2025 KA9Q + ChatGPT +local ka9q = Proto("ka9qctl", "ka9q-radio Control/Status") + +-- Preferences +ka9q.prefs.float_little_endian = Pref.bool("Float/Dbl are little-endian (common on x86/ARM)", false) +ka9q.prefs.add_info_column = Pref.bool("Populate Info column (msg class + key TLVs)", true) +ka9q.prefs.show_raw_packet = Pref.bool("Show raw packet bytes (debug)", false) + +-- Fields +local f = ka9q.fields +f.msg_class = ProtoField.uint8("ka9qctl.class", "Packet Type", base.DEC, { [0]="STATUS", [1]="CMD" }) +f.raw_packet = ProtoField.bytes("ka9qctl.raw", "Raw Packet Data") + +f.tlv_type = ProtoField.uint8("ka9qctl.tlv.type", "TLV Type", base.DEC) +f.tlv_len = ProtoField.uint32("ka9qctl.tlv.len", "TLV Length", base.DEC) +f.tlv_raw = ProtoField.bytes("ka9qctl.tlv.raw", "TLV Value (raw)") + +f.uint = ProtoField.uint64("ka9qctl.uint", "Unsigned Integer", base.DEC) +f.float = ProtoField.float("ka9qctl.float", "Float32") +f.double = ProtoField.double("ka9qctl.double", "Float64") +f.str = ProtoField.string("ka9qctl.string", "String") + +f.sock_addr4 = ProtoField.ipv4("ka9qctl.sock.addr4", "Socket IPv4 Address") +f.sock_addr6 = ProtoField.ipv6("ka9qctl.sock.addr6", "Socket IPv6 Address") +f.sock_port = ProtoField.uint16("ka9qctl.sock.port", "Socket Port", base.DEC) +f.sock_text = ProtoField.string("ka9qctl.sock.text", "Socket") + +f.list_uint = ProtoField.uint32("ka9qctl.list.uint", "List Element (uint)", base.DEC) +f.list_f32 = ProtoField.float("ka9qctl.list.f32", "List Element (f32)") + +-- ---- TLV name table (from your header) ---- +local STATUS_TYPE_NAME = { + [0] = "EOL", + [1] = "COMMAND_TAG", + [2] = "CMD_CNT", + [3] = "GPS_TIME", + [4] = "DESCRIPTION", + [5] = "STATUS_DEST_SOCKET", + [6] = "SETOPTS", + [7] = "CLEAROPTS", + [8] = "RTP_TIMESNAP", + [9] = "BIN_BYTE_DATA", + [10] = "INPUT_SAMPRATE", + [11] = "SPECTRUM_BASE", + [12] = "SPECTRUM_AVG", + [13] = "INPUT_SAMPLES", + [14] = "WINDOW_TYPE", + [15] = "NOISE_BW", + [16] = "OUTPUT_DATA_SOURCE_SOCKET", + [17] = "OUTPUT_DATA_DEST_SOCKET", + [18] = "OUTPUT_SSRC", + [19] = "OUTPUT_TTL", + [20] = "OUTPUT_SAMPRATE", + [21] = "OUTPUT_METADATA_PACKETS", + [22] = "OUTPUT_DATA_PACKETS", + [23] = "OUTPUT_ERRORS", + [24] = "CALIBRATE", + [25] = "LNA_GAIN", + [26] = "MIXER_GAIN", + [27] = "IF_GAIN", + [28] = "DC_I_OFFSET", + [29] = "DC_Q_OFFSET", + [30] = "IQ_IMBALANCE", + [31] = "IQ_PHASE", + [32] = "DIRECT_CONVERSION", + [33] = "RADIO_FREQUENCY", + [34] = "FIRST_LO_FREQUENCY", + [35] = "SECOND_LO_FREQUENCY", + [36] = "SHIFT_FREQUENCY", + [37] = "DOPPLER_FREQUENCY", + [38] = "DOPPLER_FREQUENCY_RATE", + [39] = "LOW_EDGE", + [40] = "HIGH_EDGE", + [41] = "KAISER_BETA", + [42] = "FILTER_BLOCKSIZE", + [43] = "FILTER_FIR_LENGTH", + [44] = "FILTER2", + [45] = "IF_POWER", + [46] = "BASEBAND_POWER", + [47] = "NOISE_DENSITY", + [48] = "DEMOD_TYPE", + [49] = "OUTPUT_CHANNELS", + [50] = "INDEPENDENT_SIDEBAND", + [51] = "PLL_ENABLE", + [52] = "PLL_LOCK", + [53] = "PLL_SQUARE", + [54] = "PLL_PHASE", + [55] = "PLL_BW", + [56] = "ENVELOPE", + [57] = "SNR_SQUELCH", + [58] = "PLL_SNR", + [59] = "FREQ_OFFSET", + [60] = "PEAK_DEVIATION", + [61] = "PL_TONE", + [62] = "AGC_ENABLE", + [63] = "HEADROOM", + [64] = "AGC_HANGTIME", + [65] = "AGC_RECOVERY_RATE", + [66] = "FM_SNR", + [67] = "AGC_THRESHOLD", + [68] = "GAIN", + [69] = "OUTPUT_LEVEL", + [70] = "OUTPUT_SAMPLES", + [71] = "OPUS_BIT_RATE", + [72] = "MAXDELAY", + [73] = "FILTER2_BLOCKSIZE", + [74] = "FILTER2_FIR_LENGTH", + [75] = "FILTER2_KAISER_BETA", + [76] = "SPECTRUM_FFT_N", + [77] = "FILTER_DROPS", + [78] = "LOCK", + [79] = "TP1", + [80] = "TP2", + [81] = "GAINSTEP", + [82] = "AD_BITS_PER_SAMPLE", + [83] = "SQUELCH_OPEN", + [84] = "SQUELCH_CLOSE", + [85] = "PRESET", + [86] = "DEEMPH_TC", + [87] = "DEEMPH_GAIN", + [88] = "CONVERTER_OFFSET", + [89] = "PL_DEVIATION", + [90] = "THRESH_EXTEND", + [91] = "SPECTRUM_SHAPE", + [92] = "COHERENT_BIN_SPACING", + [93] = "RESOLUTION_BW", + [94] = "BIN_COUNT", + [95] = "CROSSOVER", + [96] = "BIN_DATA", + [97] = "RF_ATTEN", + [98] = "RF_GAIN", + [99] = "RF_AGC", + [100] = "FE_LOW_EDGE", + [101] = "FE_HIGH_EDGE", + [102] = "FE_ISREAL", + [103] = "BLOCKS_SINCE_POLL", + [104] = "AD_OVER", + [105] = "RTP_PT", + [106] = "STATUS_INTERVAL", + [107] = "OUTPUT_ENCODING", + [108] = "SAMPLES_SINCE_OVER", + [109] = "PLL_WRAPS", + [110] = "RF_LEVEL_CAL", + [111] = "OPUS_DTX", + [112] = "OPUS_APPLICATION", + [113] = "OPUS_BANDWIDTH", + [114] = "OPUS_FEC", + [115] = "SPECTRUM_STEP", + [116] = "SPECTRUM_OVERLAP", + [117] = "LIFETIME", + [118] = "SWEEP RATE", + [119] = "SWEEP DURATION", + [120] = "SWEEP PERIOD", + [121] = "SWEEP START" +} + +-- Reverse lookup: name -> type ID +local name_to_id = {} +for k, v in pairs(STATUS_TYPE_NAME) do + name_to_id[v] = k +end + + +-- ---- TLV kind table (inferred from your dump.c) ---- +-- Kinds: "uint", "f64" (len 4/8 chosen at runtime), "string", "socket", "f32_list", "gps_ns" +local TLV_KIND = { + [1] = "uint_hex", + [2] = "uint", + [3] = "gps_ns", + [4] = "string", + [5] = "socket", + [6] = "uint", + [7] = "uint", + [8] = "uint", + [9] = "", -- write this + [10] = "uint_hz", + [11] = "f32_db", + [12] = "uint", + [13] = "uint", + [14] = "window", + [15] = "f32_hz", + [16] = "socket", + [17] = "socket", + [18] = "uint", + [19] = "uint", + [20] = "uint_hz", + [21] = "uint", + [22] = "uint", + [23] = "uint", + [24] = "f64_hz", + [25] = "uint_db", + [26] = "uint_db", + [27] = "uint_db", + [28] = "f32", + [29] = "f32", + [30] = "f32_db", + [31] = "f32", + [32] = "bool", + [33] = "f64_hz", + [34] = "f64_hz", + [35] = "f64_hz", + [36] = "f64_hz", + [37] = "f64_hz", + [38] = "f64_hz_per_s", + [39] = "f32_hz", + [40] = "f32_hz", + [41] = "f32", + [42] = "uint", + [43] = "uint", + [44] = "uint", + [45] = "f32_dbfs", + [46] = "f32_db", + [47] = "f32_dbmj", + [48] = "demod", + [49] = "uint", + [50] = "bool", + [51] = "bool", + [52] = "bool", + [53] = "bool", + [54] = "f32", + [55] = "f32_hz", + [56] = "bool", + [57] = "bool", + [58] = "f32_db", + [59] = "f32_hz", + [60] = "f32_hz", + [61] = "f32_hz", + [62] = "bool", + [63] = "f32_db", + [64] = "f32_s", + [65] = "f32_db_per_s", + [66] = "f32_db", + [67] = "f32_db", + [68] = "f32_db", + [69] = "f32_dbfs", + [70] = "uint", + [71] = "uint_bps", + [72] = "uint", + [73] = "uint", + [74] = "uint", + [75] = "f32", + [76] = "uint", + [77] = "uint", + [78] = "bool", + [79] = "f32", + [80] = "f32", + [81] = "uint", + [82] = "uint", + [83] = "f32_db", + [84] = "f32_db", + [85] = "string", + [86] = "f32_us", + [87] = "f32_db", + [88] = "f32_hz", + [89] = "f32_hz", + [90] = "bool", + [91] = "f32", + [92] = "f32_hz", + [93] = "f32_hz", + [94] = "uint", + [95] = "f32_hz", + [96] = "f32_list", + [97] = "f32_db", + [98] = "f32_db", + [99] = "bool", + [100] = "f32_hz", + [101] = "f32_hz", + [102] = "bool", + [103] = "uint", + [104] = "uint", + [105] = "uint", + [106] = "uint", + [107] = "encoding", + [108] = "uint", + [109] = "uint", + [110] = "f32_dbm", + [111] = "bool", + [112] = "opus_app", + [113] = "opus_bw", + [114] = "uint", + [115] = "f32_db", + [116] = "f32", + [117] = "uint", + [118] = "f64_hz_per_s", + [119] = "f64_s", + [120] = "f64_s", + [121] = "f64_s" +} + +-- ---- Helpers ---- + +local DEMOD = { + [0] = "Linear", + "fm", + "wfm", + "spectrum", + "spectrum v2", + "idle" +} + +local ENCODING = { + [0] = "None", + "S16LE (signed 16 bit little endian)", + "S16BE (signed 16 bit big endian)", + "OPUS", + "F32LE (IEEE float32 little endian)", + "AX25", + "F16LE (IEEE float16 little endian)", + "OPUS_VOIP (OPUS_APPLICATION_VOIP", + "F32BE (IEEE float32 big endian)", + "F16BE (IEEE float16 big endian)", + "μlaw PCM", + "Alaw PCM" +} + + +local OPUS_BW = { + [1101] = "Narrowband (4 kHz)", -- example numbers, replace with yours + [1102] = "Mediumband (6 kHz)", + [1103] = "Wideband (8 kHz)", + [1104] = "Superwideband (12 kHz)", + [1105] = "Fullband (20 kHz)", +} +local OPUS_APPLICATION = { + [2048] = "VOIP", + [2049] = "AUDIO", + [2051] = "RESTRICTED_LOWDELAY", + [2052] = "RESTRICTED_SILK", + [2053] = "RESTRICTED_CELT", +} + +local WINDOWS = { + [0] = "Kaiser", + "Rectangular", + "Blackman", + "Exact Blackman", + "Gaussian", + "Hann", + "Hamming", + "HP 5-pt flat top", +} + +local function fmt_opus_bw(u) + return OPUS_BW[u] or ("unknown (" .. tostring(u) .. ")") +end + +-- If OPUS_BANDWIDTH is encoded as uint: +-- FORMAT[name_to_id["OPUS_BANDWIDTH"]] = fmt_opus_bw + + +local function group_dec(s) + -- s = "123456789" + local sign = "" + if s:sub(1,1) == "-" then + sign = "-" + s = s:sub(2) + end + + local out = s:reverse():gsub("(%d%d%d)", "%1 "):reverse() + out = out:gsub("^ ", "") -- remove leading space if any + return sign .. out +end + +local function group_hex(s) + -- s = "deadbeef" + local out = s:reverse():gsub("(%x%x%x%x)", "%1 "):reverse() + out = out:gsub("^ ", "") + return out +end + +local function group_float(s) + local sign = "" + if s:sub(1,1) == "-" then + sign = "-" + s = s:sub(2) + end + + local int, frac = s:match("^(%d+)%.(%d+)$") + if frac then + return sign .. group_dec(int) .. "." .. frac + end + + -- No decimal point + return sign .. group_dec(s) +end + +local function fmt_bitrate(x) + if x == 0 then return "0 bps" end + if math.abs(x) >= 1000 then + return string.format("%.1f kbps", x/1000.0) + end + return string.format("%.0f bps", x) +end + +local function parse_ber_length(tvb, offset, pktlen) + if offset >= pktlen then return nil, 0, "Missing length byte" end + local first = tvb(offset,1):uint() + if first < 0x80 then + return first, 1, nil + end + local n = bit.band(first, 0x7f) + if n == 0 then + return nil, 1, "Indefinite length not supported" + end + if n > 4 then + return nil, 1 + n, string.format("Length-of-length too large (%u)", n) + end + if offset + 1 + n > pktlen then + return nil, 1 + n, "Truncated length field" + end + local len = 0 + for i = 0, n-1 do + len = len * 256 + tvb(offset + 1 + i, 1):uint() + end + return len, 1 + n, nil +end + +local function ieee754_f32_be(raw) + local b1,b2,b3,b4 = raw:byte(1,4) + + local u = + b1 * 16777216 + -- 2^24 + b2 * 65536 + -- 2^16 + b3 * 256 + + b4 + + local sign = (u >= 2147483648) and -1 or 1 + if sign < 0 then + u = u - 2147483648 + end + + local exp = math.floor(u / 8388608) -- 2^23 + local frac = u % 8388608 + + if exp == 255 then + if frac == 0 then + return sign * math.huge + else + return 0/0 + end + end + + if exp == 0 then + if frac == 0 then + return sign * 0.0 + end + return sign * (frac / 8388608) * 2^(-126) + end + + return sign * (1 + frac / 8388608) * 2^(exp - 127) +end + +local function ieee754_f64_be(raw) + local b = { raw:byte(1,8) } + + local hi = + b[1] * 16777216 + + b[2] * 65536 + + b[3] * 256 + + b[4] + + local lo = + b[5] * 16777216 + + b[6] * 65536 + + b[7] * 256 + + b[8] + + local sign = (hi >= 2147483648) and -1 or 1 + if sign < 0 then + hi = hi - 2147483648 + end + + local exp = math.floor(hi / 1048576) -- 2^20 + local frac_hi = hi % 1048576 + + local frac = frac_hi * 4294967296 + lo -- 2^32 + + if exp == 2047 then + if frac == 0 then + return sign * math.huge + else + return 0/0 + end + end + + if exp == 0 then + if frac == 0 then + return sign * 0.0 + end + return sign * (frac / 4503599627370496) * 2^(-1022) + end + + return sign * (1 + frac / 4503599627370496) * 2^(exp - 1023) +end + +local function decode_f32(v) + local L = v:len() + if L == 0 then + return 0.0, nil + end + if L > 4 then + return nil, "float32 len>4" + end + local raw = v:bytes():raw() + raw = string.rep("\0", 4 - L) .. raw + return ieee754_f32_be(raw), nil +end + +local function decode_f64(v) + local L = v:len() + if L == 0 then + return 0.0, nil + end + if L > 8 then + return nil, "float64 len>8" + end + local raw = v:bytes():raw() + raw = string.rep("\0", 8 - L) .. raw + return ieee754_f64_be(raw), nil +end + + + +local function decode_uint(v) + local n = v:len() + if n == 0 then return UInt64(0), nil end + if n > 8 then + return nil, string.format("uint too long (%u bytes)", n) + end + return v:uint64(), nil -- big-endian, 1..8 bytes +end + + + +local function decode_socket_text(v) + local L = v:len() + if L == 6 then + local a = v(0,4) + local p = v(4,2):uint() + return string.format("%u.%u.%u.%u:%u", + a(0,1):uint(), a(1,1):uint(), a(2,1):uint(), a(3,1):uint(), p) + end + if L == 10 then + local a = v(0,8) + local p = v(8,2):uint() + local s = { + string.format("%02x%02x", a(0,1):uint(), a(1,1):uint()), + string.format("%02x%02x", a(2,1):uint(), a(3,1):uint()), + string.format("%02x%02x", a(4,1):uint(), a(5,1):uint()), + string.format("%02x%02x", a(6,1):uint(), a(7,1):uint()), + } + return table.concat(s, ":") .. ":" .. tostring(p) + end + if L == 18 then + local p = v(16,2):uint() + return string.format("[IPv6]:%u", p) + end + return string.format("socket(len=%u)", L) +end + +local function add_socket(tree, tvb_range) + local L = tvb_range:len() + if L == 6 then + -- IPv4 (4) + port (2) + local a = tvb_range(0,4) + local p = tvb_range(4,2):uint() + local txt = string.format("%u.%u.%u.%u:%u", + a(0,1):uint(), a(1,1):uint(), a(2,1):uint(), a(3,1):uint(), p) + tree:add(f.sock_text, tvb_range, txt) + tree:add(f.sock_addr4, tvb_range(0,4)) + tree:add(f.sock_port, tvb_range(4,2)) + return + end + + if L == 10 then + -- "compact IPv6": 8 bytes + port (2) as you described. + -- Wireshark cannot represent this as a true IPv6 address field (needs 16 bytes), so show text. + local a = tvb_range(0,8) + local p = tvb_range(8,2):uint() + local s = { + string.format("%02x%02x", a(0,1):uint(), a(1,1):uint()), + string.format("%02x%02x", a(2,1):uint(), a(3,1):uint()), + string.format("%02x%02x", a(4,1):uint(), a(5,1):uint()), + string.format("%02x%02x", a(6,1):uint(), a(7,1):uint()), + } + local txt = table.concat(s, ":") .. ":" .. tostring(p) + tree:add(f.sock_text, tvb_range, txt) + tree:add(f.sock_port, tvb_range(8,2)) + return + end + + if L == 18 then + -- Full IPv6 (16) + port (2) + tree:add(f.sock_addr6, tvb_range(0,16)) + tree:add(f.sock_port, tvb_range(16,2)) + return + end + + tree:add(f.tlv_raw, tvb_range):append_text(" (expected 6=v4, 10=compact-v6, or 18=v6)") +end + +local function fmt_utc_seconds(x) + -- x: seconds since Unix epoch, may be integer or float + -- double precision is good enough for μs but not ns + local sec = math.floor(x) + local frac = x - sec + + local t = os.date("!%Y-%m-%d %H:%M:%S", sec) + if not t then + return "invalid time" + end + + return string.format("%s.%06d UTC", t, math.floor(frac * 1000000 + 0.5)) +end + + + +local GPS_UNIX_EPOCH_OFFSET = 315964800 -- seconds between 1970-01-01 and 1980-01-06 +local GPS_UTC_OFFSET_SECONDS = 18 -- current GPS-UTC offset; informational only (not tracked dynamically) + +local function format_gps_ns(u64) + -- nanoseconds since GPS epoch; keep it simple and safe + local ns = u64:tonumber() + if not ns then + return tostring(u64) + end + local sec = u64 / UInt64(1000000000) + GPS_UNIX_EPOCH_OFFSET - GPS_UTC_OFFSET_SECONDS + local ns = u64 % UInt64(1000000000) + local t = os.date("!%Y-%m-%d %H:%M:%S", sec:tonumber()) + return t .. "." .. ns .. " UTC" +end + +local function add_f32_list(tree, tvb_range, little) + local n = tvb_range:len() + if (n % 4) ~= 0 then + tree:add(f.tlv_raw, tvb_range):append_text(" (BIN_DATA len not multiple of 4)") + return + end + local count = n / 4 + local lt = tree:add(tvb_range, string.format("BIN_DATA (%u float32)", count)) + for i = 0, count - 1 do + local r = tvb_range(i*4, 4) + if little then lt:add_le(f.list_f32, r) else lt:add(f.list_f32, r) end + end +end + +local function decode_by_kind(kind, v, st, t) + if kind == "demod" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + local d = DEMOD[x:tonumber()] + if not d then + return "invalid" + else + return d + end + + elseif kind == "window" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + local e = WINDOWS[x:tonumber()] + if not e then + return "invalid" + else + return e + end + + elseif kind == "encoding" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + local e = ENCODING[x:tonumber()] + if not e then + return "invalid" + else + return e + end + + elseif kind == "opus_bw" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + local bw = OPUS_BW[x:tonumber()] + if not bw then + return "invalid" + else + return bw + end + + elseif kind == "opus_app" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + local bw = OPUS_APPLICATION[x:tonumber()] + if not bw then + return "invalid" + else + return bw + end + + elseif kind == "uint_hz" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + return group_dec(tostring(x)) .. " Hz" + + elseif kind == "uint_bps" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + return group_dec(tostring(x)) .. " bps" + + elseif kind == "f32_hz" then + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float, v, x) + return group_float(string.format("%.1f",x)) .. " Hz" + + elseif kind == "f64_hz" then + local x, err = decode_f64(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.double, v, x) + return group_float(string.format("%.3f",x)) .. " Hz" + + elseif kind == "f64_hz_per_s" then + local x, err = decode_f64(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.double, v, x) + return group_float(string.format("%.6f", x)) .. " Hz/s" + + elseif kind == "f64_s" then + local x, err = decode_f64(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.double, v, x) + return group_float(string.format("%.6f", x)) .. " s" + + elseif kind == "uint_db" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + return group_dec(tostring(x)) .. " dB" + + elseif kind == "f32_db" then + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float, v, x) + return group_float(string.format("%+.3f", x)) .. " dB" + + elseif kind == "f32_db_per_s" then + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float, v, x) + return group_float(string.format("%+.3f", x)) .. " dB/s" + + elseif kind == "f32_dbm" then + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float, v, x) + return group_float(string.format("%+.3f", x)) .. " dBm" + + elseif kind == "f32_dbmj" then + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float, v, x) + return group_float(string.format("%+.3f",x)) .. " dBmJ (dBm/Hz)" + + elseif kind == "f32_dbfs" then + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float, v, x) + return group_float(string.format("%+.3f",x)) .. " dBFS" + + elseif kind == "f32_s" then + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float, v, x) + return group_float(string.format("%.3f", x)) .. " s" + + elseif kind == "f32_us" then + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float, v, x) + return group_float(string.format("%.1f", 1e6*x)) .. " μs" + + elseif kind == "bool" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + if(x == UInt64(0)) then + return "false" + else + return "true" + end + + elseif kind == "uint" then + -- dimensionless integer + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + return group_dec(tostring(x)) + + elseif kind == "uint_hex" then + -- dimensionless hex integer + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v, x) + local h = x:tohex():gsub("^0+", "") + return group_hex((h ~= "" and h or "0")) + + elseif kind == "gps_ns" then + local x, err = decode_uint(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.uint, v,x):append_text(" (GPS ns)") + return format_gps_ns(x) + + elseif kind == "f32" then + -- dimensionless + local x, err = decode_f32(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.float,v,x) + return group_float(tostring(x)) + + elseif kind == "f64" then + -- dimensionless + local x, err = decode_f64(v) + if not x then + st:add_expert_info(PI_MALFORMED, PI_ERROR, err) + st:add(f.tlv_raw, v) + return nil + end + st:add(f.double, v, x) + return group_float(tostring(x)) + + elseif kind == "string" then + local s = v:string() + st:add(f.str, v, s) + local ss = s + if #ss > 60 then ss = ss:sub(1,60) .. "…" end + return '"' .. ss .. '"' + + elseif kind == "socket" then + local txt = decode_socket_text(v) + add_socket(st, v) + return txt + + elseif kind == "f32_list" then + idx = 0 + for i = 0, v:len()-4, 4 do + local r = v(i,4) + local x = decode_f32(r) + if x then + local ei = st:add(f.list_f32, r, x) + ei:append_text(string.format(" [%d]",idx)) + else + st:add(f.tlv_raw, r) + end + idx = idx+1 + end + else + st:add(f.tlv_raw, v) + return nil + end +end + +-- ---- Main dissector ---- +function ka9q.dissector(tvb, pinfo, tree) + local pktlen = tvb:len() + if pktlen < 1 then return end + + pinfo.cols.protocol = "KA9QCTL" + + local prefs = { + float_little_endian = ka9q.prefs.float_little_endian, + } + + local root = tree:add(ka9q, tvb(), "ka9q-radio Control/Status") + + if ka9q.prefs.show_raw_packet then + root:add(f.raw_packet, tvb()) + end + + local offset = 0 + local msg_class = tvb(offset,1):uint() + root:add(f.msg_class, tvb(offset,1)) + offset = offset + 1 + + local info_parts = {} + if ka9q.prefs.add_info_column then + table.insert(info_parts, (msg_class == 1) and "CMD " or "STAT") + end + + while offset < pktlen do + local opt = tvb(offset,1):uint() + if opt == 0 then + break + elseif offset + 2 > pktlen then + root:add_expert_info(PI_MALFORMED, PI_ERROR, "Truncated TLV header at end of packet") + break + end + + local t = tvb(offset,1):uint() + offset = offset + 1 + + local len, len_consumed, err = parse_ber_length(tvb, offset, pktlen) + if err then + root:add_expert_info(PI_MALFORMED, PI_ERROR, err) + break + end + offset = offset + len_consumed + + if offset + len > pktlen then + root:add_expert_info(PI_MALFORMED, PI_ERROR, + string.format("TLV type %u length %u overruns packet", t, len)) + break + end + + local v = tvb(offset, len) + offset = offset + len + + local tlv_name = STATUS_TYPE_NAME[t] or "Unknown" + local kind = TLV_KIND[t] + local st = root:add(v, string.format("(%u) %s", t, tlv_name, v, len)) + st:add(f.tlv_type, tvb(offset - len - len_consumed - 1, 1)) + st:add(f.tlv_len, tvb(offset - len - len_consumed, len_consumed), len) + + local summary = decode_by_kind(kind, v, st, t) + if summary and summary ~= "" then + st:append_text(" = " .. summary) + end + -- Info column: show COMMAND_TAG and GPS_TIME + if ka9q.prefs.add_info_column then + if t == (name_to_id["OUTPUT_SSRC"] or -1) then + local u, _ = decode_uint(v) + if u then + local tag = "ssrc=" .. tostring(u) + table.insert(info_parts, tag) + end + elseif t == (name_to_id["COMMAND_TAG"] or -1) then + local u, _ = decode_uint(v) + if u then + local h = u:tohex():gsub("^0+", "") + local tag = "tag=" .. group_hex((h ~= "" and h or "0")) + table.insert(info_parts, tag) + end + elseif t == (name_to_id["GPS_TIME"] or -1) and summary then + table.insert(info_parts, summary) + end + end + + -- EOL terminator: stop immediately (warn on trailing bytes) + if t == 0 then + if offset < pktlen then + root:add_expert_info(PI_PROTOCOL, PI_WARN, + string.format("Extra %u byte(s) after EOL", pktlen - offset)) + end + break + end + end + + if ka9q.prefs.add_info_column then + pinfo.cols.info = table.concat(info_parts, " ") + end +end + +-- Register to UDP port 5006 +DissectorTable.get("udp.port"):add(5006, ka9q) diff --git a/dissectors/kin-scp/LICENSE b/dissectors/kin-scp/LICENSE new file mode 100644 index 0000000..a465934 --- /dev/null +++ b/dissectors/kin-scp/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Kin Ecosystem + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/kin-scp/README.md b/dissectors/kin-scp/README.md new file mode 100644 index 0000000..3c178d4 --- /dev/null +++ b/dissectors/kin-scp/README.md @@ -0,0 +1,60 @@ +# SCP — Stellar Consensus Protocol (réseau Kin / Stellar Core) + +Dissecteur Wireshark Lua des messages du réseau pair-à-pair de +**Stellar Core**, publié par Kin Ecosystem (blockchain Kin, fork de +Stellar) : protocole `scp` — longueur d'enregistrement XDR et réassemblage +TCP, `AuthenticatedMessage` (séquence, HMAC), type de `StellarMessage`, +puis décodage détaillé des seuls messages `TRANSACTION` (enveloppe, +opérations, mémo) et `SCP_MESSAGE` (déclarations PREPARE, CONFIRM, +EXTERNALIZE et NOMINATE, scrutins) ; port TCP 11625. Les clés publiques +sont affichées en adresse Stellar (base32 + CRC16). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/kinecosystem/Wireshark-SCP-Dissector | +| Commit importé | `9803e08b6cd5bc38aa25c42eafc9745077a0a560` du 05/09/2019 (branche `master`, dernier commit ; dernières modifications : `scp.lua` `9803e08` du 05/09/2019, `scp/headers.lua` `7e7d7dc` du 27/05/2019, autres fichiers de `scp/` `6a21241` du 26/05/2019) | +| Licence amont | MIT (fichier `LICENSE` amont, « Copyright (c) 2019 Kin Ecosystem », copié ici) ; `scp/bit.lua` est LuaBit v0.4, « Under the MIT license », copyright (c) 2006~2007 hanzhao ; `scp/basexx.lua` et `scp/crc.lua` n'ont pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Stellar / SCP natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `scp.lua` | Protocole `scp` (et sous-protocoles d'affichage), TCP 11625 | +| `scp/headers.lua` | Définition des `ProtoField` (tables globales) | +| `scp/helpers.lua` | Lecture XDR et conversion des clés en adresses | +| `scp/basexx.lua` | Encodage base32 | +| `scp/crc.lua` | CRC16 XMODEM | +| `scp/bit.lua` | LuaBit v0.4 (opérations binaires en Lua pur) | +| `LICENSE` | Licence MIT amont | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête des `.lua`. + +## Utilisation + +Comme indiqué en amont, copier `scp.lua` et le dossier `scp/` dans le +dossier `plugins` personnel de Wireshark +(`cp -a scp.lua scp/ ~/.config/wireshark/plugins`), puis filtrer avec `scp`. + +## Remarques + +- Les modules sont chargés par `dofile("plugins/scp/…")` : ce chemin + relatif ne fonctionne que si le dossier `scp/` est dans le dossier + `plugins` du profil personnel de Wireshark. +- `scp/bit.lua` remplace la bibliothèque globale `bit` de Wireshark par + LuaBit, dont les fonctions ont d'autres noms (`blshift`, `brshift`…, pas + de `lshift` / `rshift`) : cela peut casser d'autres scripts Lua qui + utilisent `bit`. LuaBit date de Lua 5.0/5.1 ; son comportement sous + Lua 5.4 (Wireshark 4.6) n'a pas été vérifié. +- Le script enregistre, en plus de `scp`, des protocoles aux noms très + génériques (`envelope`, `statement`, `nominate`, `prepare`, `confirm`, + `ballot`, `externalize`, `tx`, `op`), susceptibles d'entrer en conflit + avec d'autres scripts ; de nombreuses fonctions et tables + (`dissectSCP`, `readInt`, `hdr_fields`…) sont globales. +- Seuls `TRANSACTION` et `SCP_MESSAGE` sont détaillés ; le format XDR est + celui de Stellar Core / Kin en 2019. Coquille amont dans le nom affiché : + « Stellar Concensus Protocol ». +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/kin-scp/scp.lua b/dissectors/kin-scp/scp.lua new file mode 100644 index 0000000..f802c29 --- /dev/null +++ b/dissectors/kin-scp/scp.lua @@ -0,0 +1,501 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/kinecosystem/Wireshark-SCP-Dissector (scp.lua), +-- commit 9803e08b6cd5bc38aa25c42eafc9745077a0a560 du 05/09/2019. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +dofile("plugins/scp/bit.lua") +dofile("plugins/scp/crc.lua") +dofile("plugins/scp/helpers.lua") + +local scp_proto = Proto("scp", "Stellar Concensus Protocol") +local envelope_proto = Proto("envelope", "Envelope") +local statement_proto = Proto("statement", "Statement") +local nomination_proto = Proto("nominate", "Nominate") +local prepare_proto = Proto("prepare", "Prepare") +local confirm_proto = Proto("confirm", "Confirm") +local ballot_proto = Proto("ballot", "Ballot") +local externalize_proto = Proto("externalize", "Externalize") +local transaction_proto = Proto("tx", "Tx") +local operation_proto = Proto("op", "Operation") + +-- register the ProtoFields + +dofile("plugins/scp/headers.lua") +scp_proto.fields = hdr_fields +envelope_proto.fields = env_hdr_fields +statement_proto.fields = stmt_hdr_fields +nomination_proto.fields = nom_hdr_fields +prepare_proto.fields = prep_hdr_fields +ballot_proto.fields = blt_hdr_fields +confirm_proto.fields = cfrm_hdr_fields +externalize_proto.fields = ext_hdr_fields +transaction_proto.fields = tx_hdr_fields +operation_proto.fields = op_hdr_fields + +function scp_proto.dissector(tvbuf, pktinfo, root) + -- get the length of the packet buffer (Tvb). + local pktlen = tvbuf:len() + + local bytes_consumed = 0 + + -- we do this in a while loop, because there could be multiple SCP messages + -- inside a single TCP segment, and thus in the same tvbuf - but our + -- scp_proto.dissector() will only be called once per TCP segment, so we + -- need to do this loop to dissect each SCP message in it + while bytes_consumed < pktlen do + + -- We're going to call our "dissect()" function, which is defined + -- later in this script file. The dissect() function returns the + -- length of the SCP message it dissected as a positive number, or if + -- it's a negative number then it's the number of additional bytes it + -- needs if the Tvb doesn't have them all. If it returns a 0, it's a + -- dissection error. + local result = dissectSCP(tvbuf, pktinfo, root, bytes_consumed) + + if result > 0 then + -- we successfully processed an SCP message, of 'result' length + bytes_consumed = bytes_consumed + result + -- go again on another while loop + elseif result == 0 then + -- If the result is 0, then it means we hit an error of some kind, + -- so return 0. Returning 0 tells Wireshark this packet is not for + -- us, and it will try heuristic dissectors or the plain "data" + -- one, which is what should happen in this case. + return 0 + else + -- we need more bytes, so set the desegment_offset to what we + -- already consumed, and the desegment_len to how many more + -- are needed + pktinfo.desegment_offset = bytes_consumed + + -- invert the negative result so it's a positive number + result = -result + + pktinfo.desegment_len = result + + -- even though we need more bytes, this packet is for us, so we + -- tell wireshark all of its bytes are for us by returning the + -- number of Tvb bytes we "successfully processed", namely the + -- length of the Tvb + return pktlen + end + end + + -- In a TCP dissector, you can either return nothing, or return the number of + -- bytes of the tvbuf that belong to this protocol, which is what we do here. + -- Do NOT return the number 0, or else Wireshark will interpret that to mean + -- this packet did not belong to your protocol, and will try to dissect it + -- with other protocol dissectors (such as heuristic ones) + return bytes_consumed +end + +local message_types = { + ERROR_MSG = 0, + AUTH = 2, + DONT_HAVE = 3, + + GET_PEERS = 4, + PEERS = 5, + + GET_TX_SET = 6, + TX_SET = 7, + + TRANSACTION = 8, + + GET_SCP_QUORUMSET = 9, + SCP_QUORUMSET = 10, + SCP_MESSAGE = 11, + GET_SCP_STATE = 12, + + HELLO = 13 +} + +local statement_types = { + SCP_ST_PREPARE = 0, + SCP_ST_CONFIRM = 1, + SCP_ST_EXTERNALIZE = 2, + SCP_ST_NOMINATE = 3 +} + +local message_types_funcs = {} +local statement_types_funcs = {} + +dissectSCP = function (tvbuf, pktinfo, root, offset) + local length_val, length_tvbr = checkScpLength(tvbuf, offset) + + if length_val <= 0 then + return length_val + end + + offset = offset + 4 + + -- if we got here, then we have a whole message in the Tvb buffer + -- so let's finish dissecting it... + + -- set the protocol column to show our protocol name + pktinfo.cols.protocol:set("SCP") + + -- set the INFO column too, but only if we haven't already set it before + -- for this frame/packet, because this function can be called multiple + -- times per packet/Tvb + if string.find(tostring(pktinfo.cols.info), "^SCP") == nil then + pktinfo.cols.info:set("SCP") + end + + -- We start by adding our protocol to the dissection display tree. + local tree = root:add(scp_proto, tvbuf:range(offset, length_val)) + + offset = offset + 4 -- discriminant + + tree:add(hdr_fields.sequence, tvbuf:range(offset, 8)) + offset = offset + 8 + + type, offset = readInt(tvbuf, offset) + + local type_string + for name, val in pairs(message_types) do + if val == type then type_string = name end + end + + tree:append_text(" - " .. type_string) + + -- if 1 then return offset end + + offset = message_types_funcs[type](tvbuf, offset, tree) + + tree:add(hdr_fields.hmac, tvbuf:range(offset, 32)) + offset = offset + 32 + + if offset < length_val then + tree:add(hdr_fields.msg, tvbuf:range(offset, length_val - offset)) + end + + return length_val + 4 +end + +-- message dissectors + +dissectError = function() end + +dissectSCPMessage = function(tvbuf, offset, root) + local env_tree = root:add(envelope_proto, tvbuf:range(offset, tvbuf:len() - offset)) + tree = env_tree:add(statement_proto, tvbuf:range(offset, tvbuf:len() - offset)) + + tree:add(stmt_hdr_fields.node_id, tvbuf:range(offset + 4, 32)) + tree:add(stmt_hdr_fields.node_id_s, publicKey(tvbuf:raw(offset + 4, 32))):set_generated(true) + offset = offset + 36 + + tree:add(stmt_hdr_fields.slot_idx, tvbuf:range(offset, 8)) + offset = offset + 8 + + type, offset = readInt(tvbuf, offset) + + local type_string + for name, val in pairs(statement_types) do + if val == type then type_string = name end + end + + tree:append_text(" - " .. type_string) + + offset = statement_types_funcs[type](tvbuf, offset, tree) + + sig_length, offset = readInt(tvbuf, offset) + env_tree:add(env_hdr_fields.signature, tvbuf:range(offset, sig_length)) + offset = offset + sig_length + + return offset +end + +dissectGetTxSet = function(tvbuf, offset, tree) + tree:add(hdr_fields.tx_set_hash, tvbuf:range(offset, 32)) + offset = offset + 32 + + return offset +end + +dissectTxSet = function(tvbuf, offset, tree) + tree:add(hdr_fields.prev_hash, tvbuf:range(offset, 32)) + offset = offset + 32 + + tx_count, offset = readInt(tvbuf, offset) + for _ = 1, tx_count do + offset = dissectTx(tvbuf, offset, tree) + end + + return offset +end + +dissectTx = function(tvbuf, offset, root) + local advance = function(v) offset = offset + v end + + local tree = root:add(transaction_proto, tvbuf:range(offset, tvbuf:len() - offset)) + + tree:add(tx_hdr_fields.source, tvbuf:range(offset + 4, 32)) + tree:add(tx_hdr_fields.source_s, publicKey(tvbuf:raw(offset + 4, 32))):set_generated(true) + advance(36) + + tree:add(tx_hdr_fields.fee, tvbuf:range(offset, 4)) + advance(4) + + tree:add(tx_hdr_fields.sequence, tvbuf:range(offset, 8)) + advance(8) + + tb_count, offset = readInt(tvbuf, offset) + if tb_count == 1 then + tb_min, offset = readUInt64(tvbuf, offset) + tb_max, offset = readUInt64(tvbuf, offset) + + tree:add(tx_hdr_fields.tb_min, tb_max) + tree:add(tx_hdr_fields.tb_max, tb_min) + end + + memo_type, offset = readInt(tvbuf, offset) + if memo_type == 0 then + -- no-op + elseif memo_type == 1 then + len, offset = readInt(tvbuf, offset) + tree:add(tx_hdr_fields.memo_str, tvbuf:range(offset, len)) + advance(len + (4 - len % 4) % 4) + elseif memo_type == 2 then + tree:add(tx_hdr_fields.memo_data, tvbuf:range(offset, 32)) + advance(32) + else + advance(32) + end + + + count, offset = readInt(tvbuf, offset) + tree:add(tx_hdr_fields.op_count, count) + + for _ = 1, count do + offset = dissectOp(tvbuf, offset, tree) + end + + advance(4) -- reserved + + count, offset = readInt(tvbuf, offset) + for _ = 1, count do + advance(4) -- hint + + count, offset = readInt(tvbuf, offset) + tree:add(tx_hdr_fields.signature, tvbuf:range(offset, count)) + advance(count) + end + + return offset +end + +dissectOp = function(tvbuf, offset, root) + local advance = function(v) offset = offset + v end + + local tree = root:add(operation_proto, tvbuf:range(offset, tvbuf:len() - offset)) + + addDest = function() + tree:add(op_hdr_fields.destination, tvbuf:range(offset + 4, 32)) + tree:add(op_hdr_fields.destination_s, publicKey(tvbuf:raw(offset + 4, 32))):set_generated(true) + offset = offset + 36 + end + + count, offset = readInt(tvbuf, offset) + if count == 1 then + tree:add(op_hdr_fields.source, tvbuf:range(offset + 4, 32)) + tree:add(op_hdr_fields.source_s, publicKey(tvbuf:raw(offset + 4, 32))):set_generated(true) + offset = offset + 36 + end + + type, offset = readInt(tvbuf, offset) + + if type == 0 then + tree:append_text(" - " .. "Create Account") + + addDest() + + tree:add(op_hdr_fields.amount, tvbuf:range(offset, 8)) + advance(8) + elseif type == 1 then + tree:append_text(" - " .. "Payment") + + addDest() + + local asset + type, offset = readInt(tvbuf, offset) + if type == 0 then + asset = "native" + elseif type == 1 then + asset = tvbuf:range(offset, 4) + offset = offset + 40 + else + asset = tvbuf:range(offset, 12) + offset = offset + 48 + end + + tree:add(op_hdr_fields.asset, asset) + + tree:add(op_hdr_fields.amount, tvbuf:range(offset, 8)) + advance(8) + end + + return offset +end + +message_types_funcs = { + [message_types.ERROR_MSG] = dissectError, + [message_types.GET_TX_SET] = dissectGetTxSet, + [message_types.TX_SET] = dissectTxSet, + [message_types.TRANSACTION] = dissectTx, + [message_types.SCP_MESSAGE] = dissectSCPMessage, +} + +-- statement dissectors + +dissectNominate = function(tvbuf, offset, root) + local tree = root:add(nomination_proto, tvbuf:range(offset, tvbuf:len() - offset)) + + tree:add(nom_hdr_fields.qs_hash, tvbuf:range(offset, 32)) + offset = offset + 32 + + vote_count, offset = readInt(tvbuf, offset) + + for _ = 1, vote_count do + vote_length, offset = readInt(tvbuf, offset) + + tree:add(nom_hdr_fields.votes, tvbuf:range(offset, vote_length)) + offset = offset + vote_length + end + + accepted_count, offset = readInt(tvbuf, offset) + + for _ = 1, accepted_count do + accepted_length, offset = readInt(tvbuf, offset) + + tree:add(nom_hdr_fields.accepted, tvbuf:range(offset, accepted_length)) + offset = offset + accepted_length + end + + return offset +end + +function dissectBallot(tvbuf, offset, root, label) + local tree = root:add(ballot_proto, tvbuf:range(offset, tvbuf:len() - offset)) + + counter, offset = readUInt32(tvbuf, offset) + tree:add(blt_hdr_fields.counter, counter) + + value_length, offset = readInt(tvbuf, offset) + + tree:add(blt_hdr_fields.value, tvbuf:range(offset, value_length)) + offset = offset + value_length + + tree:set_text(label) + + return offset +end + +dissectPrepare = function(tvbuf, offset, root) + local tree = root:add(prepare_proto, tvbuf:range(offset, tvbuf:len() - offset)) + + tree:add(prep_hdr_fields.qs_hash, tvbuf:range(offset, 32)) + offset = offset + 32 + + offset = dissectBallot(tvbuf, offset, tree, "Ballot") + + count, offset = readInt(tvbuf, offset) + if count == 1 then + offset = dissectBallot(tvbuf, offset, tree, "Prepare") + end + + count, offset = readInt(tvbuf, offset) + if count == 1 then + offset = dissectBallot(tvbuf, offset, tree, "Prepare'") + end + + nc, offset = readUInt32(tvbuf, offset) + tree:add(prep_hdr_fields.nC, nc) + + nh, offset = readUInt32(tvbuf, offset) + tree:add(prep_hdr_fields.nH, nh) + + return offset +end + +dissectConfirm = function(tvbuf, offset, root) + local tree = root:add(confirm_proto, tvbuf:range(offset, tvbuf:len() - offset)) + + offset = dissectBallot(tvbuf, offset, tree, "Ballot") + + nPrepared, offset = readUInt32(tvbuf, offset) + tree:add(cfrm_hdr_fields.nPrepared, nPrepared) + + nCommit, offset = readUInt32(tvbuf, offset) + tree:add(cfrm_hdr_fields.nCommit, nCommit) + + nh, offset = readUInt32(tvbuf, offset) + tree:add(cfrm_hdr_fields.nH, nh) + + tree:add(cfrm_hdr_fields.qs_hash, tvbuf:range(offset, 32)) + offset = offset + 32 + + return offset +end + +dissectExternalize = function(tvbuf, offset, root) + local tree = root:add(externalize_proto, tvbuf:range(offset, tvbuf:len() - offset)) + + offset = dissectBallot(tvbuf, offset, tree, "Commit ballot") + + nh, offset = readUInt32(tvbuf, offset) + tree:add(ext_hdr_fields.nH, nh) + + tree:add(ext_hdr_fields.qs_hash, tvbuf:range(offset, 32)) + offset = offset + 32 + + return offset +end + +statement_types_funcs = { + [statement_types.SCP_ST_NOMINATE] = dissectNominate, + [statement_types.SCP_ST_PREPARE] = dissectPrepare, + [statement_types.SCP_ST_CONFIRM] = dissectConfirm, + [statement_types.SCP_ST_EXTERNALIZE] = dissectExternalize, +} + +checkScpLength = function (tvbuf, offset) + -- "msglen" is the number of bytes remaining in the Tvb buffer which we + -- have available to dissect in this run + local msglen = tvbuf:len() - offset + + -- check if capture was only capturing partial packet size + if msglen ~= tvbuf:reported_length_remaining(offset) then + -- captured packets are being sliced/cut-off, so don't try to desegment/reassemble + return 0 + end + + if msglen < 4 then + -- we need more bytes, so tell the main dissector function that we + -- didn't dissect anything, and we need an unknown number of more + -- bytes (which is what "DESEGMENT_ONE_MORE_SEGMENT" is used for) + -- return as a negative number + return -DESEGMENT_ONE_MORE_SEGMENT + end + + -- if we got here, then we know we have enough bytes in the Tvb buffer + -- to at least figure out the full length of this SCP messsage (the length + -- is the 32-bit integer in first 4 bytes) + + -- get the TvbRange of bytes 0-3 + local length_tvbr = tvbuf:range(offset, 4) + + -- get the length as an unsigned integer, in network-order (big endian) + local length_val = length_tvbr:uint() + + -- XDR messages set the high bit to indicate EOF. Clear it. + length_val = length_val - 0x80000000 + + if msglen < length_val + 4 then + -- we need more bytes to get the whole SCP message + return -(length_val - msglen) + end + + return length_val, length_tvbr +end + +DissectorTable.get("tcp.port"):add(11625, scp_proto) diff --git a/dissectors/kin-scp/scp/basexx.lua b/dissectors/kin-scp/scp/basexx.lua new file mode 100644 index 0000000..821ddf9 --- /dev/null +++ b/dissectors/kin-scp/scp/basexx.lua @@ -0,0 +1,135 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/kinecosystem/Wireshark-SCP-Dissector (scp/basexx.lua), +-- commit 9803e08b6cd5bc38aa25c42eafc9745077a0a560 du 05/09/2019. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-------------------------------------------------------------------------------- +-- util functions +-------------------------------------------------------------------------------- + +local function divide_string( str, max ) + local result = {} + + local start = 1 + for i = 1, #str do + if i % max == 0 then + table.insert( result, str:sub( start, i ) ) + start = i + 1 + elseif i == #str then + table.insert( result, str:sub( start, i ) ) + end + end + + return result +end + +local function number_to_bit( num, length ) + local bits = {} + + while num > 0 do + local rest = math.floor( math.fmod( num, 2 ) ) + table.insert( bits, rest ) + num = ( num - rest ) / 2 + end + + while #bits < length do + table.insert( bits, "0" ) + end + + return string.reverse( table.concat( bits ) ) +end + +-------------------------------------------------------------------------------- + +local basexx = {} + +-------------------------------------------------------------------------------- +-- base2(bitfield) decode and encode function +-------------------------------------------------------------------------------- + +local bitMap = { o = "0", i = "1", l = "1" } + +function basexx.to_bit( str ) + return ( str:gsub( '.', function ( c ) + local byte = string.byte( c ) + local bits = {} + for _ = 1,8 do + table.insert( bits, byte % 2 ) + byte = math.floor( byte / 2 ) + end + return table.concat( bits ):reverse() + end ) ) +end + +-------------------------------------------------------------------------------- +-- generic function to decode and encode base32/base64 +-------------------------------------------------------------------------------- + +local function to_basexx( str, alphabet, bits, pad ) + local bitString = basexx.to_bit( str ) + + local chunks = divide_string( bitString, bits ) + local result = {} + for _,value in ipairs( chunks ) do + if ( #value < bits ) then + value = value .. string.rep( '0', bits - #value ) + end + local pos = tonumber( value, 2 ) + 1 + table.insert( result, alphabet:sub( pos, pos ) ) + end + + table.insert( result, pad ) + return table.concat( result ) +end + +-------------------------------------------------------------------------------- +-- rfc 3548: http://www.rfc-editor.org/rfc/rfc3548.txt +-------------------------------------------------------------------------------- + +local base32Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" +local base32PadMap = { "", "======", "====", "===", "=" } + +function basexx.from_base32( str, ignore ) + str = ignore_set( str, ignore ) + return from_basexx( string.upper( str ), base32Alphabet, 5 ) +end + +function basexx.to_base32( str ) + return to_basexx( str, base32Alphabet, 5, base32PadMap[ #str % 5 + 1 ] ) +end + +-------------------------------------------------------------------------------- +-- base64 decode and encode function +-------------------------------------------------------------------------------- + +local base64Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".. + "abcdefghijklmnopqrstuvwxyz".. + "0123456789+/" +local base64PadMap = { "", "==", "=" } + +function basexx.from_base64( str, ignore ) + str = ignore_set( str, ignore ) + return from_basexx( str, base64Alphabet, 6 ) +end + +function basexx.to_base64( str ) + return to_basexx( str, base64Alphabet, 6, base64PadMap[ #str % 3 + 1 ] ) +end + +-------------------------------------------------------------------------------- +-- URL safe base64 decode and encode function +-------------------------------------------------------------------------------- + +local url64Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".. + "abcdefghijklmnopqrstuvwxyz".. + "0123456789-_" + +function basexx.from_url64( str, ignore ) + str = ignore_set( str, ignore ) + return from_basexx( str, url64Alphabet, 6 ) +end + +function basexx.to_url64( str ) + return to_basexx( str, url64Alphabet, 6, "" ) +end + +return basexx diff --git a/dissectors/kin-scp/scp/bit.lua b/dissectors/kin-scp/scp/bit.lua new file mode 100644 index 0000000..d8dbede --- /dev/null +++ b/dissectors/kin-scp/scp/bit.lua @@ -0,0 +1,251 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/kinecosystem/Wireshark-SCP-Dissector (scp/bit.lua), +-- commit 9803e08b6cd5bc38aa25c42eafc9745077a0a560 du 05/09/2019. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +--[[--------------- +LuaBit v0.4 +------------------- +a bitwise operation lib for lua. + +http://luaforge.net/projects/bit/ + +How to use: +------------------- + bit.bnot(n) -- bitwise not (~n) + bit.band(m, n) -- bitwise and (m & n) + bit.bor(m, n) -- bitwise or (m | n) + bit.bxor(m, n) -- bitwise xor (m ^ n) + bit.brshift(n, bits) -- right shift (n >> bits) + bit.blshift(n, bits) -- left shift (n << bits) + bit.blogic_rshift(n, bits) -- logic right shift(zero fill >>>) + +Please note that bit.brshift and bit.blshift only support number within +32 bits. + +2 utility functions are provided too: + bit.tobits(n) -- convert n into a bit table(which is a 1/0 sequence) + -- high bits first + bit.tonumb(bit_tbl) -- convert a bit table into a number +------------------- + +Under the MIT license. + +copyright(c) 2006~2007 hanzhao (abrash_han@hotmail.com) +--]]--------------- + +do + +------------------------ +-- bit lib implementions + +local function check_int(n) + -- checking not float + if(n - math.floor(n) > 0) then + error("trying to use bitwise operation on non-integer!") + end +end + +local function to_bits(n) + check_int(n) + if(n < 0) then + -- negative + return to_bits(bit.bnot(math.abs(n)) + 1) + end + -- to bits table + local tbl = {} + local cnt = 1 + while (n > 0) do + local last = math.fmod(n,2) + if(last == 1) then + tbl[cnt] = 1 + else + tbl[cnt] = 0 + end + n = (n-last)/2 + cnt = cnt + 1 + end + + return tbl +end + +local function tbl_to_number(tbl) + local n = #tbl + + local rslt = 0 + local power = 1 + for i = 1, n do + rslt = rslt + tbl[i]*power + power = power*2 + end + + return rslt +end + +local function expand(tbl_m, tbl_n) + local big = {} + local small = {} + if(#tbl_m > #tbl_n) then + big = tbl_m + small = tbl_n + else + big = tbl_n + small = tbl_m + end + -- expand small + for i = #small + 1, #big do + small[i] = 0 + end + +end + +local function bit_or(m, n) + local tbl_m = to_bits(m) + local tbl_n = to_bits(n) + expand(tbl_m, tbl_n) + + local tbl = {} + local rslt = math.max(#tbl_m, #tbl_n) + for i = 1, rslt do + if(tbl_m[i]== 0 and tbl_n[i] == 0) then + tbl[i] = 0 + else + tbl[i] = 1 + end + end + + return tbl_to_number(tbl) +end + +local function bit_and(m, n) + local tbl_m = to_bits(m) + local tbl_n = to_bits(n) + expand(tbl_m, tbl_n) + + local tbl = {} + local rslt = math.max(#tbl_m, #tbl_n) + for i = 1, rslt do + if(tbl_m[i]== 0 or tbl_n[i] == 0) then + tbl[i] = 0 + else + tbl[i] = 1 + end + end + + return tbl_to_number(tbl) +end + +local function bit_not(n) + + local tbl = to_bits(n) + local size = math.max(#tbl, 32) + for i = 1, size do + if(tbl[i] == 1) then + tbl[i] = 0 + else + tbl[i] = 1 + end + end + return tbl_to_number(tbl) +end + +local function bit_xor(m, n) + local tbl_m = to_bits(m) + local tbl_n = to_bits(n) + expand(tbl_m, tbl_n) + + local tbl = {} + local rslt = math.max(#tbl_m, #tbl_n) + for i = 1, rslt do + if(tbl_m[i] ~= tbl_n[i]) then + tbl[i] = 1 + else + tbl[i] = 0 + end + end + + --table.foreach(tbl, print) + + return tbl_to_number(tbl) +end + +local function bit_rshift(n, bits) + check_int(n) + + local high_bit = 0 + if(n < 0) then + -- negative + n = bit_not(math.abs(n)) + 1 + high_bit = 2147483648 -- 0x80000000 + end + + for i=1, bits do + n = n/2 + n = bit_or(math.floor(n), high_bit) + end + return math.floor(n) +end + +-- logic rightshift assures zero filling shift +local function bit_logic_rshift(n, bits) + check_int(n) + if(n < 0) then + -- negative + n = bit_not(math.abs(n)) + 1 + end + for i=1, bits do + n = n/2 + end + return math.floor(n) +end + +local function bit_lshift(n, bits) + check_int(n) + + if(n < 0) then + -- negative + n = bit_not(math.abs(n)) + 1 + end + + for i=1, bits do + n = n*2 + end + return bit_and(n, 4294967295) -- 0xFFFFFFFF +end + +local function bit_xor2(m, n) + local rhs = bit_or(bit_not(m), bit_not(n)) + local lhs = bit_or(m, n) + local rslt = bit_and(lhs, rhs) + return rslt +end + +-------------------- +-- bit lib interface + +bit = { + -- bit operations + bnot = bit_not, + band = bit_and, + bor = bit_or, + bxor = bit_xor, + brshift = bit_rshift, + blshift = bit_lshift, + bxor2 = bit_xor2, + blogic_rshift = bit_logic_rshift, + + -- utility func + tobits = to_bits, + tonumb = tbl_to_number, +} + +end + +--[[ +for i = 1, 100 do + for j = 1, 100 do + if(bit.bxor(i, j) ~= bit.bxor2(i, j)) then + error("bit.xor failed.") + end + end +end +--]] diff --git a/dissectors/kin-scp/scp/crc.lua b/dissectors/kin-scp/scp/crc.lua new file mode 100644 index 0000000..0005e97 --- /dev/null +++ b/dissectors/kin-scp/scp/crc.lua @@ -0,0 +1,69 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/kinecosystem/Wireshark-SCP-Dissector (scp/crc.lua), +-- commit 9803e08b6cd5bc38aa25c42eafc9745077a0a560 du 05/09/2019. +-- Licence amont : MIT (LICENSE amont) — voir README.md. + +--/* +-- This is the CRC16 algorithm used by Redis Cluster to hash keys. +-- Implementation according to CCITT standards. +-- +-- This is actually the XMODEM CRC 16 algorithm, using the +-- following parameters: +-- +-- Name : "XMODEM", also known as "ZMODEM", "CRC-16/ACORN" +-- Width : 16 bit +-- Poly : 1021 (That is actually x^16 + x^12 + x^5 + 1) +-- Initialization : 0000 +-- Reflect Input byte : False +-- Reflect Output CRC : False +-- Xor constant to output CRC : 0000 +-- Output for "123456789" : 31C3 +--*/ + + + +local XMODEMCRC16Lookup = { + 0x0000,0x1021,0x2042,0x3063,0x4084,0x50a5,0x60c6,0x70e7, + 0x8108,0x9129,0xa14a,0xb16b,0xc18c,0xd1ad,0xe1ce,0xf1ef, + 0x1231,0x0210,0x3273,0x2252,0x52b5,0x4294,0x72f7,0x62d6, + 0x9339,0x8318,0xb37b,0xa35a,0xd3bd,0xc39c,0xf3ff,0xe3de, + 0x2462,0x3443,0x0420,0x1401,0x64e6,0x74c7,0x44a4,0x5485, + 0xa56a,0xb54b,0x8528,0x9509,0xe5ee,0xf5cf,0xc5ac,0xd58d, + 0x3653,0x2672,0x1611,0x0630,0x76d7,0x66f6,0x5695,0x46b4, + 0xb75b,0xa77a,0x9719,0x8738,0xf7df,0xe7fe,0xd79d,0xc7bc, + 0x48c4,0x58e5,0x6886,0x78a7,0x0840,0x1861,0x2802,0x3823, + 0xc9cc,0xd9ed,0xe98e,0xf9af,0x8948,0x9969,0xa90a,0xb92b, + 0x5af5,0x4ad4,0x7ab7,0x6a96,0x1a71,0x0a50,0x3a33,0x2a12, + 0xdbfd,0xcbdc,0xfbbf,0xeb9e,0x9b79,0x8b58,0xbb3b,0xab1a, + 0x6ca6,0x7c87,0x4ce4,0x5cc5,0x2c22,0x3c03,0x0c60,0x1c41, + 0xedae,0xfd8f,0xcdec,0xddcd,0xad2a,0xbd0b,0x8d68,0x9d49, + 0x7e97,0x6eb6,0x5ed5,0x4ef4,0x3e13,0x2e32,0x1e51,0x0e70, + 0xff9f,0xefbe,0xdfdd,0xcffc,0xbf1b,0xaf3a,0x9f59,0x8f78, + 0x9188,0x81a9,0xb1ca,0xa1eb,0xd10c,0xc12d,0xf14e,0xe16f, + 0x1080,0x00a1,0x30c2,0x20e3,0x5004,0x4025,0x7046,0x6067, + 0x83b9,0x9398,0xa3fb,0xb3da,0xc33d,0xd31c,0xe37f,0xf35e, + 0x02b1,0x1290,0x22f3,0x32d2,0x4235,0x5214,0x6277,0x7256, + 0xb5ea,0xa5cb,0x95a8,0x8589,0xf56e,0xe54f,0xd52c,0xc50d, + 0x34e2,0x24c3,0x14a0,0x0481,0x7466,0x6447,0x5424,0x4405, + 0xa7db,0xb7fa,0x8799,0x97b8,0xe75f,0xf77e,0xc71d,0xd73c, + 0x26d3,0x36f2,0x0691,0x16b0,0x6657,0x7676,0x4615,0x5634, + 0xd94c,0xc96d,0xf90e,0xe92f,0x99c8,0x89e9,0xb98a,0xa9ab, + 0x5844,0x4865,0x7806,0x6827,0x18c0,0x08e1,0x3882,0x28a3, + 0xcb7d,0xdb5c,0xeb3f,0xfb1e,0x8bf9,0x9bd8,0xabbb,0xbb9a, + 0x4a75,0x5a54,0x6a37,0x7a16,0x0af1,0x1ad0,0x2ab3,0x3a92, + 0xfd2e,0xed0f,0xdd6c,0xcd4d,0xbdaa,0xad8b,0x9de8,0x8dc9, + 0x7c26,0x6c07,0x5c64,0x4c45,0x3ca2,0x2c83,0x1ce0,0x0cc1, + 0xef1f,0xff3e,0xcf5d,0xdf7c,0xaf9b,0xbfba,0x8fd9,0x9ff8, + 0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0x0ed1,0x1ef0 +} + +function crc(bytes) + local crc = 0 + for i=1,#bytes do + local b = string.byte(bytes,i,i) + crc = bit.bxor(bit.band((bit.blshift(crc, 8)), 0xffff), XMODEMCRC16Lookup[bit.band(bit.bxor((bit.brshift(crc, 8)), b), 0xff) + 1]) + end + + return bit.band(crc, 0x00ff), bit.brshift(crc, 8) +end + diff --git a/dissectors/kin-scp/scp/headers.lua b/dissectors/kin-scp/scp/headers.lua new file mode 100644 index 0000000..2892661 --- /dev/null +++ b/dissectors/kin-scp/scp/headers.lua @@ -0,0 +1,79 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/kinecosystem/Wireshark-SCP-Dissector (scp/headers.lua), +-- commit 9803e08b6cd5bc38aa25c42eafc9745077a0a560 du 05/09/2019. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +hdr_fields = +{ + -- AuthenticatedMessage + sequence = ProtoField.uint64("scp.sequence", "Sequence", base.DEC), + + -- StellarMessage + tx_set_hash = ProtoField.bytes("scp.tx_set_hash", "Tx Set Hash", base.NONE), + prev_hash = ProtoField.bytes("scp.prev_hash", "Previous Ledger Hash", base.NONE), + hmac = ProtoField.bytes("scp.hmac", "HMAC SHA256", base.NONE), + + msg = ProtoField.bytes("scp.msg", "Message", base.NONE), +} + +env_hdr_fields = { + signature = ProtoField.bytes("scp.envelope.signature", "Signature", base.NONE), +} + +stmt_hdr_fields = { + node_id = ProtoField.bytes("scp.statement.node_id", "NodeId", base.NONE), + node_id_s = ProtoField.string("scp.statement.node_id_s", "PK", base.ASCII), + slot_idx = ProtoField.uint64("scp.statement.slot_idx", "Slot Index", base.DEC), +} + +nom_hdr_fields = { + qs_hash = ProtoField.bytes("scp.nomination.qs_hash", "Quorum Set Hash", base.NONE), + votes = ProtoField.bytes("scp.nomination.votes", "Votes", base.NONE), + accepted = ProtoField.bytes("scp.nomination.accepted", "Accepted", base.NONE), +} + +prep_hdr_fields = { + qs_hash = ProtoField.bytes("scp.prepare.qs_hash", "Quorum Set Hash", base.NONE), + nC = ProtoField.uint32("scp.prepare.nc", "nC", base.DEC), + nH = ProtoField.uint32("scp.prepare.nh", "nH", base.DEC), +} + +cfrm_hdr_fields = { + nPrepared = ProtoField.uint32("scp.confirm.nprepared", "nPrepared", base.DEC), + nCommit = ProtoField.uint32("scp.confirm.ncommit", "nCommit", base.DEC), + nH = ProtoField.uint32("scp.confirm.nh", "nH", base.DEC), + qs_hash = ProtoField.bytes("scp.confirm.qs_hash", "Quorum Set Hash", base.NONE), +} + +blt_hdr_fields = { + counter = ProtoField.uint32("scp.ballot.counter", "Counter", base.DEC), + value = ProtoField.bytes("scp.ballot.value", "Value", base.NONE), +} + +ext_hdr_fields = { + nH = ProtoField.uint32("scp.externalize.nh", "nH", base.DEC), + qs_hash = ProtoField.bytes("scp.externalize.qs_hash", "Quorum Set Hash", base.NONE), +} + +tx_hdr_fields = { + source = ProtoField.bytes("scp.tx.source", "Source", base.NONE), + source_s = ProtoField.string("scp.tx.source_s", "PK", base.ASCII), + fee = ProtoField.uint32("scp.tx.fee", "Fee", base.DEC), + sequence = ProtoField.uint64("scp.tx.sequence", "Sequence", base.DEC), + tb_min = ProtoField.uint64("scp.tx.tb.min", "Timebounds - Min", base.DEC), + tb_max = ProtoField.uint64("scp.tx.tb.max", "Timebounds - Max", base.DEC), + memo_str = ProtoField.string("scp.tx.memo.string", "Memo", base.ASCII), + memo_data = ProtoField.bytes("scp.tx.memo.data", "Memo", base.NONE), + op_count = ProtoField.int32("scp.tx.op_count", "Op Count", base.DEC), + signature = ProtoField.bytes("scp.tx.signature", "Signature", base.NONE), +} + +op_hdr_fields = { + source = ProtoField.bytes("scp.op.source", "Source", base.NONE), + source_s = ProtoField.string("scp.op.source_s", "PK", base.ASCII), + + -- payment + destination = ProtoField.bytes("scp.op.destination", "Destination", base.NONE), + destination_s = ProtoField.string("scp.op.destination_s", "PK", base.ASCII), + asset = ProtoField.string("scp.op.asset", "Asset", base.ASCII), + amount = ProtoField.int64("scp.op.amount", "Amount", base.DEC), +} diff --git a/dissectors/kin-scp/scp/helpers.lua b/dissectors/kin-scp/scp/helpers.lua new file mode 100644 index 0000000..17bf3f9 --- /dev/null +++ b/dissectors/kin-scp/scp/helpers.lua @@ -0,0 +1,27 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/kinecosystem/Wireshark-SCP-Dissector (scp/helpers.lua), +-- commit 9803e08b6cd5bc38aa25c42eafc9745077a0a560 du 05/09/2019. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +local basexx = dofile("plugins/scp/basexx.lua") + +readInt = function (tvbuf, offset) + return tvbuf:range(offset, 4):int(), offset + 4 +end + +readUInt32 = function (tvbuf, offset) + return tvbuf:range(offset, 4):uint(), offset + 4 +end + +readInt64 = function (tvbuf, offset) + return tvbuf:range(offset, 8):int64(), offset + 8 +end + +readUInt64 = function (tvbuf, offset) + return tvbuf:range(offset, 8):uint64(), offset + 8 +end + +publicKey = function(bytes) + bytes = string.char(0x30) .. bytes + local l, h = crc(bytes) + return basexx.to_base32(bytes .. string.char(l) .. string.char(h)) +end diff --git a/dissectors/libcsp-simhau19/LICENSE b/dissectors/libcsp-simhau19/LICENSE new file mode 100644 index 0000000..ce959b8 --- /dev/null +++ b/dissectors/libcsp-simhau19/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Simen Haug + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/libcsp-simhau19/README.md b/dissectors/libcsp-simhau19/README.md new file mode 100644 index 0000000..d747443 --- /dev/null +++ b/dissectors/libcsp-simhau19/README.md @@ -0,0 +1,92 @@ +# libcsp — CubeSat Space Protocol sur Ethernet brut (simhau19) + +Dissecteurs Wireshark Lua du CubeSat Space Protocol (CSP) version 2 de +[libcsp](https://github.com/libcsp/libcsp), protocole réseau des +nano-satellites CubeSat, tel qu'il circule sur l'interface Ethernet brute +de libcsp. Trois scripts coopèrent : `efp.lua` décode l'en-tête du +protocole de fragmentation Ethernet (EFP, EtherType `0x88B5`) et passe la +charge à `csp.lua`, qui décode l'en-tête CSP de 6 octets (priorité, +adresses et ports source et destination, drapeaux CRC, RDP, HMAC, FRAG) +et vérifie la CRC32C ; `rdp.lua` décode l'en-tête RDP (protocole fiable +de CSP) : drapeaux SYN, ACK, EAK, RST, numéros de séquence et d'acquit, +options de connexion et analyse des séquences (issue #782). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/simhau19/libcsp-dissector (`csp.lua`, `rdp.lua`, `efp.lua`) | +| Commit importé | `f0ed63ebf64f9972c0512d713a3a86adc739d5aa` du 09/04/2026 (dernier commit de la branche par défaut, « Create LICENSE ») ; dernière modification des trois scripts : commit `a523609778f7a82470bb351bcc9708a63e415c48` du 09/04/2026 (« initial commit ») | +| Licence amont | MIT (`LICENSE` amont, © 2026 Simen Haug) ; aucune mention dans les scripts. Le README amont indique que le travail part du dissecteur de [daniestevez/csp-tools](https://github.com/daniestevez/csp-tools) (`wireshark-dissector/csp-zmq.lua`), publié sous MIT ou Apache-2.0 au choix : la licence MIT retenue par l'auteur est cohérente. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur CSP ni EFP dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Les scripts sont repris tels quels (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête de chacun (convention du dépôt, issue #563). + +Le dossier `csp-kantatamura` (issue #536) traite un autre transport du +même protocole (CSP 1 et 2 sur bus CAN) : les deux imports sont +distincts et se complètent. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/csp.lua` | Protocole `csp` (« Cubesat Space Protocol », ligne 26) ; champs `csp.*` (lignes 43 à 56, liste lignes 58 à 71) ; table CRC32C (ligne 91) et calcul (ligne 352) ; dissecteur ligne 363, appelé par `efp.lua` | +| `src/rdp.lua` | Protocole `csp.rdp` (« CSP Reliable Data Protocol », ligne 8) ; champs `rdp.*` (lignes 10 à 27) ; dissecteur ligne 63, appelé par `csp.lua` quand le drapeau RDP est levé | +| `src/efp.lua` | Protocole `efp` (ligne 10) ; EtherType `0x88B5` (lignes 6 et 51) ; dissecteur ligne 27 | + +## Utilisation + +Copier les trois fichiers de `src/` dans le dossier des plugins Lua +personnels (`~/.local/lib/wireshark/plugins/`). Wireshark les charge +dans l'ordre alphabétique, ce qui convient : `rdp.lua` utilise des +champs déclarés par `csp.lua`. Avec `-X lua_script:`, il faut charger +`csp.lua` avant `rdp.lua`. Les trames Ethernet d'EtherType `0x88B5` sont +décodées. Filtres : `efp`, `csp`, `csp.rdp`, `csp.destination`, +`csp.source_port`, `csp.crc.status`, `rdp.seq`, `rdp.flags.syn`… + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, scripts copiés dans le dossier des +plugins, puis chargés par `-X lua_script:`. Le dépôt amont ne contient +aucune capture. Essais sur une capture synthétique (Ethernet, +EtherType `0x88B5`, en-têtes CSP 2 et CRC32C calculées par un script à +part), non commitée : + +| Essai | Résultat | +|---|---| +| CSP sans drapeau, « hello » | Info « 10:40 → 20:15 Len=5 », priorité « Normal (2) », données en hexadécimal | +| Drapeau CRC, CRC32C juste | « CRC32: 0x78863fcb », « CRC Status: Good (1) » | +| Drapeau CRC, CRC fausse | erreur experte « CRC mismatch: expected 0x78863FCB, got 0xDEADBEEF », « CRC Status: Bad (0) » ; filtre `csp.crc.status==0` : 1 paquet | +| EFP avec taille de segment < longueur du paquet | Info « Packet Fragment », charge confiée au dissecteur `data` | +| RDP : SYN avec options, SYN+ACK, données ACK (deux fois la même), EAK | en-tête RDP décodé (drapeaux, séquence, acquit), puis **erreur Lua** ligne 108 (« attempt to perform arithmetic on a nil value (local 'expected_seq') ») sur **chacun** des 5 paquets RDP : ni options SYN, ni analyse des séquences, ni colonne Info RDP | +| Chargement par `-X lua_script:` avec `rdp.lua` avant `csp.lua` | échec : « rdp.lua:55: bad argument #1 to 'new' (Field_new: a field with this name must exist) » | +| `efp.lua` seul | trames marquées EFP, en-tête EFP décodé, CSP non décodé | +| Filtres | `efp` : 9 paquets ; `csp` : 8 ; `csp.rdp` : 5 ; `rdp.seq==100` : 1 | + +## Limites constatées + +- `rdp.lua` compare les drapeaux booléens à `1` (`f_syn_flag_field()() + == 1`, lignes 81, 100, 143, 146, 149, 152 et 166) alors que Wireshark + renvoie `true` ou `false` : ces tests sont toujours faux. Le SYN n'est + jamais reconnu, `rdp_expected_seq` reste vide et la ligne 108 lève une + erreur Lua sur chaque paquet RDP. Les options SYN, les numéros EAK, + l'analyse des retransmissions et la colonne Info RDP ne sont donc + jamais produits. +- Réassemblage des fragments EFP non pris en charge (indiqué par + l'amont) ; EtherType `0x88B5` (EtherType expérimental local de l'IEEE) + fixe, sans préférence (ligne 6, « adjust if your firmware uses a + different value »). +- Pas de prise en charge de HMAC, de CMP ni des autres interfaces de + libcsp (UDP, ZeroMQ, CAN) ; la CRC32C est calculée sur les données + seules. +- `efp.lua` ne vérifie pas la longueur des trames : une taille de + segment supérieure aux octets présents lève une erreur Lua (ligne 38, « Range is out of bounds », constatée sur une trame à part). +- Les champs de `rdp.lua` sont nommés `rdp.*`, espace de noms du + protocole natif RDP (Remote Desktop Protocol) ; `rdp.flags` existe + déjà dans Wireshark. Les champs `csp.destination` et `csp.source_port` + portent aussi les mêmes noms que ceux de `csp-kantatamura`. +- Les expertises de CRC et de séquence utilisent l'ancienne API + `add_expert_info` (lignes 429 de `csp.lua` et 121 de `rdp.lua`). diff --git a/dissectors/libcsp-simhau19/src/csp.lua b/dissectors/libcsp-simhau19/src/csp.lua new file mode 100644 index 0000000..226a613 --- /dev/null +++ b/dissectors/libcsp-simhau19/src/csp.lua @@ -0,0 +1,463 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/simhau19/libcsp-dissector (csp.lua), +-- commit f0ed63ebf64f9972c0512d713a3a86adc739d5aa du 09/04/2026 (dernière modification du fichier : +-- commit a523609778f7a82470bb351bcc9708a63e415c48 du 09/04/2026). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +local csp_prio_bits = 2 +local csp_dst_bits = 14 +local csp_src_bits = 14 +local csp_dport_bits = 6 +local csp_sport_bits = 6 +local csp_flags_bits = 6 + +local csp_flags_offset = 0 +local csp_sport_offset = csp_flags_offset + csp_flags_bits +local csp_dport_offset = csp_sport_offset + csp_sport_bits +local csp_src_offset = csp_dport_offset + csp_dport_bits +local csp_dst_offset = csp_src_offset + csp_src_bits +local csp_prio_offset = csp_dst_offset + csp_dst_bits + +local csp_header_length_bytes = 6 + +local crc32_size_bytes = 4 +local crc32_initial = 0xFFFFFFFF +local crc32_final = 0xFFFFFFFF + +local csp_proto = Proto("CSP", "Cubesat Space Protocol") + +local csp_priorities = { + [0] = "Critical", + [1] = "High", + [2] = "Normal", + [3] = "Low", +} + +local crc_status_vals = { + [0] = "Bad", + [1] = "Good", + [2] = "Unverified", + [3] = "Not present", + [4] = "Illegal", +} + +local f_prio = ProtoField.uint8("csp.priority", "Priority", base.DEC, csp_priorities) + +local f_dst = ProtoField.uint16("csp.destination", "Destination", base.DEC) +local f_src = ProtoField.uint16("csp.source", "Source", base.DEC) +local f_dport = ProtoField.uint8("csp.destination_port", "Destination port", base.DEC) +local f_sport = ProtoField.uint8("csp.source_port", "Source port", base.DEC) +local f_flags = ProtoField.uint8("csp.flags", "Flags", base.HEX) +local f_crc = ProtoField.uint32("csp.crc", "CRC32", base.HEX) +local f_crc_status = ProtoField.uint8("csp.crc.status", "CRC Status", base.DEC, crc_status_vals) + +local f_frag_flag = ProtoField.bool("csp.flags.frag", "FRAG", 8, nil, 0x10) +local f_hmac_flag = ProtoField.bool("csp.flags.hmac", "HMAC", 8, nil, 0x08) +local f_rdp_flag = ProtoField.bool("csp.flags.rdp", "RDP", 8, nil, 0x02) +local f_crc_flag = ProtoField.bool("csp.flags.crc", "CRC", 8, nil, 0x01) + +csp_proto.fields = { + f_prio, + f_dst, + f_src, + f_dport, + f_sport, + f_flags, + f_crc, + f_hmac_flag, + f_frag_flag, + f_rdp_flag, + f_crc_flag, + f_crc_status, +} + +local source_field = Field.new("csp.source") +local source_port_field = Field.new("csp.source_port") +local destination_field = Field.new("csp.destination") +local destination_port_field = Field.new("csp.destination_port") + +local f_rdp_flag_field = Field.new("csp.flags.rdp") +local f_crc_flag_field = Field.new("csp.flags.crc") + +local function extract_field(raw, offset, bits) + return (raw >> offset) & ((1 << bits) - 1) +end + +local function extract_range(tvb, offset, bits) + local start = math.floor(offset / 8) + local bytes = math.ceil((offset + bits) / 8) - start + return tvb(start, bytes) +end + +local crc32_table = { + 0x00000000, + 0xF26B8303, + 0xE13B70F7, + 0x1350F3F4, + 0xC79A971F, + 0x35F1141C, + 0x26A1E7E8, + 0xD4CA64EB, + 0x8AD958CF, + 0x78B2DBCC, + 0x6BE22838, + 0x9989AB3B, + 0x4D43CFD0, + 0xBF284CD3, + 0xAC78BF27, + 0x5E133C24, + 0x105EC76F, + 0xE235446C, + 0xF165B798, + 0x030E349B, + 0xD7C45070, + 0x25AFD373, + 0x36FF2087, + 0xC494A384, + 0x9A879FA0, + 0x68EC1CA3, + 0x7BBCEF57, + 0x89D76C54, + 0x5D1D08BF, + 0xAF768BBC, + 0xBC267848, + 0x4E4DFB4B, + 0x20BD8EDE, + 0xD2D60DDD, + 0xC186FE29, + 0x33ED7D2A, + 0xE72719C1, + 0x154C9AC2, + 0x061C6936, + 0xF477EA35, + 0xAA64D611, + 0x580F5512, + 0x4B5FA6E6, + 0xB93425E5, + 0x6DFE410E, + 0x9F95C20D, + 0x8CC531F9, + 0x7EAEB2FA, + 0x30E349B1, + 0xC288CAB2, + 0xD1D83946, + 0x23B3BA45, + 0xF779DEAE, + 0x05125DAD, + 0x1642AE59, + 0xE4292D5A, + 0xBA3A117E, + 0x4851927D, + 0x5B016189, + 0xA96AE28A, + 0x7DA08661, + 0x8FCB0562, + 0x9C9BF696, + 0x6EF07595, + 0x417B1DBC, + 0xB3109EBF, + 0xA0406D4B, + 0x522BEE48, + 0x86E18AA3, + 0x748A09A0, + 0x67DAFA54, + 0x95B17957, + 0xCBA24573, + 0x39C9C670, + 0x2A993584, + 0xD8F2B687, + 0x0C38D26C, + 0xFE53516F, + 0xED03A29B, + 0x1F682198, + 0x5125DAD3, + 0xA34E59D0, + 0xB01EAA24, + 0x42752927, + 0x96BF4DCC, + 0x64D4CECF, + 0x77843D3B, + 0x85EFBE38, + 0xDBFC821C, + 0x2997011F, + 0x3AC7F2EB, + 0xC8AC71E8, + 0x1C661503, + 0xEE0D9600, + 0xFD5D65F4, + 0x0F36E6F7, + 0x61C69362, + 0x93AD1061, + 0x80FDE395, + 0x72966096, + 0xA65C047D, + 0x5437877E, + 0x4767748A, + 0xB50CF789, + 0xEB1FCBAD, + 0x197448AE, + 0x0A24BB5A, + 0xF84F3859, + 0x2C855CB2, + 0xDEEEDFB1, + 0xCDBE2C45, + 0x3FD5AF46, + 0x7198540D, + 0x83F3D70E, + 0x90A324FA, + 0x62C8A7F9, + 0xB602C312, + 0x44694011, + 0x5739B3E5, + 0xA55230E6, + 0xFB410CC2, + 0x092A8FC1, + 0x1A7A7C35, + 0xE811FF36, + 0x3CDB9BDD, + 0xCEB018DE, + 0xDDE0EB2A, + 0x2F8B6829, + 0x82F63B78, + 0x709DB87B, + 0x63CD4B8F, + 0x91A6C88C, + 0x456CAC67, + 0xB7072F64, + 0xA457DC90, + 0x563C5F93, + 0x082F63B7, + 0xFA44E0B4, + 0xE9141340, + 0x1B7F9043, + 0xCFB5F4A8, + 0x3DDE77AB, + 0x2E8E845F, + 0xDCE5075C, + 0x92A8FC17, + 0x60C37F14, + 0x73938CE0, + 0x81F80FE3, + 0x55326B08, + 0xA759E80B, + 0xB4091BFF, + 0x466298FC, + 0x1871A4D8, + 0xEA1A27DB, + 0xF94AD42F, + 0x0B21572C, + 0xDFEB33C7, + 0x2D80B0C4, + 0x3ED04330, + 0xCCBBC033, + 0xA24BB5A6, + 0x502036A5, + 0x4370C551, + 0xB11B4652, + 0x65D122B9, + 0x97BAA1BA, + 0x84EA524E, + 0x7681D14D, + 0x2892ED69, + 0xDAF96E6A, + 0xC9A99D9E, + 0x3BC21E9D, + 0xEF087A76, + 0x1D63F975, + 0x0E330A81, + 0xFC588982, + 0xB21572C9, + 0x407EF1CA, + 0x532E023E, + 0xA145813D, + 0x758FE5D6, + 0x87E466D5, + 0x94B49521, + 0x66DF1622, + 0x38CC2A06, + 0xCAA7A905, + 0xD9F75AF1, + 0x2B9CD9F2, + 0xFF56BD19, + 0x0D3D3E1A, + 0x1E6DCDEE, + 0xEC064EED, + 0xC38D26C4, + 0x31E6A5C7, + 0x22B65633, + 0xD0DDD530, + 0x0417B1DB, + 0xF67C32D8, + 0xE52CC12C, + 0x1747422F, + 0x49547E0B, + 0xBB3FFD08, + 0xA86F0EFC, + 0x5A048DFF, + 0x8ECEE914, + 0x7CA56A17, + 0x6FF599E3, + 0x9D9E1AE0, + 0xD3D3E1AB, + 0x21B862A8, + 0x32E8915C, + 0xC083125F, + 0x144976B4, + 0xE622F5B7, + 0xF5720643, + 0x07198540, + 0x590AB964, + 0xAB613A67, + 0xB831C993, + 0x4A5A4A90, + 0x9E902E7B, + 0x6CFBAD78, + 0x7FAB5E8C, + 0x8DC0DD8F, + 0xE330A81A, + 0x115B2B19, + 0x020BD8ED, + 0xF0605BEE, + 0x24AA3F05, + 0xD6C1BC06, + 0xC5914FF2, + 0x37FACCF1, + 0x69E9F0D5, + 0x9B8273D6, + 0x88D28022, + 0x7AB90321, + 0xAE7367CA, + 0x5C18E4C9, + 0x4F48173D, + 0xBD23943E, + 0xF36E6F75, + 0x0105EC76, + 0x12551F82, + 0xE03E9C81, + 0x34F4F86A, + 0xC69F7B69, + 0xD5CF889D, + 0x27A40B9E, + 0x79B737BA, + 0x8BDCB4B9, + 0x988C474D, + 0x6AE7C44E, + 0xBE2DA0A5, + 0x4C4623A6, + 0x5F16D052, + 0xAD7D5351, +} + +local computed_crc32_cache = {} + +local function crc32(tvb_range) + local crc = crc32_initial + for i = 0, tvb_range:len() - 1 do + local b = tvb_range(i, 1):uint() + local idx = (crc ~ b) & 0xFF + crc = (crc >> 8) + crc = crc ~ crc32_table[idx + 1] -- table is 1-indexed + end + return ~crc & crc32_final +end + +function csp_proto.dissector(buffer, pinfo, tree) + -- local length = buffer:reported_len() + pinfo.cols.protocol = csp_proto.name + + local subtree = tree:add(csp_proto, buffer(), "Cubesat Space Protocol") + + local header = buffer(0, csp_header_length_bytes) + + local hi32 = buffer(0, 4):uint() -- bits 47-16 + local lo16 = buffer(4, 2):uint() -- bits 15-0 + + local header_value = (hi32 << 16) + lo16 + + local flags_value = extract_field(header_value, csp_flags_offset, csp_flags_bits) + local flags_tree = subtree:add(f_flags, extract_range(header, csp_flags_offset, csp_flags_bits), flags_value) + flags_tree:add(f_crc_flag, flags_value) + flags_tree:add(f_rdp_flag, flags_value) + flags_tree:add(f_hmac_flag, flags_value) + flags_tree:add(f_frag_flag, flags_value) + + subtree:add( + f_sport, + extract_range(header, csp_sport_offset, csp_sport_bits), + extract_field(header_value, csp_sport_offset, csp_sport_bits) + ) + + subtree:add( + f_dport, + extract_range(header, csp_dport_offset, csp_dport_bits), + extract_field(header_value, csp_dport_offset, csp_dport_bits) + ) + + subtree:add( + f_src, + extract_range(header, csp_src_offset, csp_src_bits), + extract_field(header_value, csp_src_offset, csp_src_bits) + ) + + subtree:add( + f_dst, + extract_range(header, csp_dst_offset, csp_dst_bits), + extract_field(header_value, csp_dst_offset, csp_dst_bits) + ) + + subtree:add( + f_prio, + extract_range(header, csp_prio_offset, csp_prio_bits), + extract_field(header_value, csp_prio_offset, csp_prio_bits) + ) + + local payload + if f_crc_flag_field()() == true then + payload = + buffer(csp_header_length_bytes, buffer:reported_len() - csp_header_length_bytes - crc32_size_bytes):tvb() + local crc_buffer = buffer(buffer:reported_len() - crc32_size_bytes, crc32_size_bytes) + subtree:add(f_crc, crc_buffer) + + if pinfo.visited == false then + computed_crc32_cache[pinfo.number] = crc32(payload) + end + + local received_crc = crc_buffer:uint() + + if computed_crc32_cache[pinfo.number] == received_crc then + subtree:add(f_crc_status, crc_buffer, 1) + else + subtree:add_expert_info( + PI_CHECKSUM, + PI_ERROR, + string.format( + "CRC mismatch: expected 0x%08X, got 0x%08X", + computed_crc32_cache[pinfo.number], + received_crc + ) + ) + subtree:add(f_crc_status, crc_buffer, 0) + end + else + payload = buffer(csp_header_length_bytes):tvb() + end + + pinfo.cols.info = string.format( + "%d:%d → %d:%d Len=%d", + source_field()(), + source_port_field()(), + destination_field()(), + destination_port_field()(), + payload:reported_len() + ) + + subtree:append_text(string.format(" (Len: %d)", payload:reported_len())) + + if f_rdp_flag_field()() == true then + local rdp_dissector = Dissector.get("csp.rdp") + if rdp_dissector then + rdp_dissector:call(payload, pinfo, subtree) + end + else + Dissector.get("data"):call(payload, pinfo, subtree) + end +end diff --git a/dissectors/libcsp-simhau19/src/efp.lua b/dissectors/libcsp-simhau19/src/efp.lua new file mode 100644 index 0000000..12ba18a --- /dev/null +++ b/dissectors/libcsp-simhau19/src/efp.lua @@ -0,0 +1,51 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/simhau19/libcsp-dissector (efp.lua), +-- commit f0ed63ebf64f9972c0512d713a3a86adc739d5aa du 09/04/2026 (dernière modification du fichier : +-- commit a523609778f7a82470bb351bcc9708a63e415c48 du 09/04/2026). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +local csp_ethertype = 0x88B5 -- adjust if your firmware uses a different value + +local efp_header_length_bytes = 8 + +local efp_proto = Proto("efp", "CSP Ethernet fragmentation protocol") + +local f_packet_id = ProtoField.uint16("efp.packet_id", "Packet ID", base.HEX) +local f_src_addr = ProtoField.uint16("efp.src_addr", "Source Address", base.HEX) +local f_seg_size = ProtoField.uint16("efp.seg_size", "Segment Size", base.HEX) +local f_packet_length = ProtoField.uint16("efp.packet_length", "Packet Length", base.HEX) + +efp_proto.fields = { + f_packet_id, + f_src_addr, + f_seg_size, + f_packet_length, +} + +local f_seg_size_field = Field.new("efp.seg_size") +local f_packet_length_field = Field.new("efp.packet_length") + +function efp_proto.dissector(buffer, pinfo, tree) + -- local length = buffer:captured_len() + pinfo.cols.protocol = efp_proto.name + + local subtree = tree:add(efp_proto, buffer(), "Ethernet Fragmentation Protocol") + + subtree:add(f_packet_id, buffer(0, 2)) + subtree:add(f_src_addr, buffer(2, 2)) + subtree:add(f_seg_size, buffer(4, 2)) + subtree:add(f_packet_length, buffer(6, 2)) + + local payload = buffer(efp_header_length_bytes, f_seg_size_field()()):tvb() + + if f_seg_size_field()() == f_packet_length_field()() then + local csp_dissector = Dissector.get("csp") + if csp_dissector then + csp_dissector:call(payload, pinfo, subtree) + end + else + pinfo.cols.info = "Packet Fragment" + Dissector.get("data"):call(payload, pinfo, subtree) + end +end + +DissectorTable.get("ethertype"):add(csp_ethertype, efp_proto) diff --git a/dissectors/libcsp-simhau19/src/rdp.lua b/dissectors/libcsp-simhau19/src/rdp.lua new file mode 100644 index 0000000..5d6cde5 --- /dev/null +++ b/dissectors/libcsp-simhau19/src/rdp.lua @@ -0,0 +1,174 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/simhau19/libcsp-dissector (rdp.lua), +-- commit f0ed63ebf64f9972c0512d713a3a86adc739d5aa du 09/04/2026 (dernière modification du fichier : +-- commit a523609778f7a82470bb351bcc9708a63e415c48 du 09/04/2026). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +local rdp_header_length_bytes = 5 + +local rdp_proto = Proto.new("CSP.RDP", "CSP Reliable Data Protocol") + +local f_reserved = ProtoField.uint8("rdp.reserved", "Reserved bits", base.HEX, nil, 0xF0) + +local f_flags = ProtoField.uint8("rdp.flags", "Flags", base.HEX) +local f_syn_flag = ProtoField.bool("rdp.flags.syn", "SYN flag", 8, nil, 0x8) +local f_ack_flag = ProtoField.bool("rdp.flags.ack", "ACK flag", 8, nil, 0x4) +local f_eak_flag = ProtoField.bool("rdp.flags.eak", "EAK flag", 8, nil, 0x2) +local f_rst_flag = ProtoField.bool("rdp.flags.rst", "RST flag", 8, nil, 0x1) + +local f_seq = ProtoField.uint16("rdp.seq", "Sequence number", base.DEC, nil) +local f_ack = ProtoField.uint16("rdp.ack", "ACK number", base.DEC, nil) +local f_eak = ProtoField.uint16("rdp.eak", "EAK number", base.DEC, nil) +local f_syn_window_size = ProtoField.uint32("rdp.syn.window_size", "Window size", base.DEC, nil) +local f_syn_conn_timeout = ProtoField.uint32("rdp.syn.conn_timeout", "Connection timeout", base.DEC, nil) +local f_syn_packet_timeout = ProtoField.uint32("rdp.syn.packet_timeout", "Packet timeout", base.DEC, nil) +local f_syn_delayed_acks = ProtoField.uint32("rdp.syn.delayed_acks", "Delayed ACKs", base.DEC, nil) +local f_syn_ack_timeout = ProtoField.uint32("rdp.syn.ack_timeout", "ACK timeout", base.DEC, nil) +local f_syn_ack_delay_count = ProtoField.uint32("rdp.syn.ack_delay_count", "ACK delay count", base.DEC, nil) +local f_analysis = ProtoField.none("rdp.analysis", "RDP analysis") + +rdp_proto.fields = { + f_reserved, + f_flags, + f_syn_flag, + f_ack_flag, + f_eak_flag, + f_rst_flag, + f_seq, + f_ack, + f_eak, + f_syn_window_size, + f_syn_conn_timeout, + f_syn_packet_timeout, + f_syn_delayed_acks, + f_syn_ack_timeout, + f_syn_ack_delay_count, + f_analysis, +} + +local f_syn_flag_field = Field.new("rdp.flags.syn") +local f_ack_flag_field = Field.new("rdp.flags.ack") +local f_eak_flag_field = Field.new("rdp.flags.eak") +local f_rst_flag_field = Field.new("rdp.flags.rst") +local f_seq_field = Field.new("rdp.seq") +local f_ack_field = Field.new("rdp.ack") + +local source_field = Field.new("csp.source") +local source_port_field = Field.new("csp.source_port") +local destination_field = Field.new("csp.destination") +local destination_port_field = Field.new("csp.destination_port") + +local rdp_expected_seq = {} +local rdp_seq_analysis = {} + +function rdp_proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = rdp_proto.name + + local subtree = tree:add(rdp_proto, buffer(), "Reliable Datagram Protocol") + + local eak_numbers = {} + local header = buffer(buffer:reported_len() - rdp_header_length_bytes, rdp_header_length_bytes) + local payload = buffer:range(0, buffer:reported_len() - rdp_header_length_bytes):tvb() + + subtree:add(f_reserved, header(0, 1)) + local flags_tree = subtree:add(f_flags, header(0, 1)) + flags_tree:add(f_syn_flag, header(0, 1)) + flags_tree:add(f_ack_flag, header(0, 1)) + flags_tree:add(f_eak_flag, header(0, 1)) + flags_tree:add(f_rst_flag, header(0, 1)) + subtree:add(f_seq, header(1, 2)) + subtree:add(f_ack, header(3, 2)) + + if f_eak_flag_field()() == 1 then + if payload:reported_len() > 0 then + for offset = 0, payload:reported_len() - 2, 2 do + subtree:add(f_eak, payload(offset, 2)) + table.insert(eak_numbers, string.format("%d", payload(offset, 2):uint64():tonumber())) + end + payload = payload:range(0, 0):tvb() + end + end + + local conv_id = string.format( + "%d:%d-%d:%d", + source_field()(), + source_port_field()(), + destination_field()(), + destination_port_field()() + ) + + if pinfo.visited == false then + if f_syn_flag_field()() == 1 then + rdp_expected_seq[conv_id] = (f_seq_field()() + 1) % 65536 + else + local expected_seq = rdp_expected_seq[conv_id] + if f_seq_field()() == expected_seq then + if payload:reported_len() > 0 then + rdp_expected_seq[conv_id] = (expected_seq + 1) % 65536 + end + elseif (expected_seq - f_seq_field()()) % 65536 < 32768 then + rdp_seq_analysis[pinfo.number] = + string.format("Retransmission: ACK %d expected %d", f_seq_field()(), expected_seq) + else + rdp_seq_analysis[pinfo.number] = + string.format("Out of order: ACK %d expected %d", f_seq_field()(), expected_seq) + rdp_expected_seq[conv_id] = (f_seq_field()() + 1) % 65536 + end + end + end + + if rdp_seq_analysis[pinfo.number] then + local analysis = subtree:add(f_analysis) + analysis:add_expert_info(PI_SEQUENCE, PI_NOTE, rdp_seq_analysis[pinfo.number]) + end + + if f_syn_flag_field()() == 1 and f_ack_flag_field()() == 0 and payload:reported_len() == 24 then + subtree:add(f_syn_window_size, payload(0, 4)) + subtree:add(f_syn_conn_timeout, payload(4, 4)) + subtree:add(f_syn_packet_timeout, payload(8, 4)) + subtree:add(f_syn_delayed_acks, payload(12, 4)) + subtree:add(f_syn_ack_timeout, payload(16, 4)) + subtree:add(f_syn_ack_delay_count, payload(20, 4)) + payload = payload:range(0, 0):tvb() + end + + subtree.text = string.format( + "%s, Seq: %d, Ack: %d, Len: %d", + subtree.text, + f_seq_field()(), + f_ack_field()(), + payload:reported_len() + ) + + local flags = "" + if f_syn_flag_field()() == 1 then + flags = flags .. "SYN, " + end + if f_ack_flag_field()() == 1 then + flags = flags .. "ACK, " + end + if f_eak_flag_field()() == 1 then + flags = flags .. "EAK, " + end + if f_rst_flag_field()() == 1 then + flags = flags .. "RST, " + end + + local info = string.format( + "%d:%d → %d:%d [%s] Len=%d", + source_field()(), + source_port_field()(), + destination_field()(), + destination_port_field()(), + flags, + payload:reported_len() + ) + + if f_eak_flag_field()() == 1 then + info = string.format("%s Eak=%s", info, table.concat(eak_numbers, ",")) + end + pinfo.cols.info = info + + if payload:reported_len() > 0 then + Dissector.get("data"):call(payload:range(0):tvb(), pinfo, tree) + end +end diff --git a/dissectors/lifx-minervasrefuge/LICENSE b/dissectors/lifx-minervasrefuge/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/lifx-minervasrefuge/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/lifx-minervasrefuge/Lifx.lua b/dissectors/lifx-minervasrefuge/Lifx.lua new file mode 100644 index 0000000..6c829bc --- /dev/null +++ b/dissectors/lifx-minervasrefuge/Lifx.lua @@ -0,0 +1,143 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/Lifx.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local dissectorHndls = { + require("service"), + require("device"), + require("light"), + require("multizone"), + require("relay"), + require("tile") +} + +dissectors = {} + +lifxPacketTypes = { + -- Core + [45] = "Acknowledgement" +} + +lifx_protocol = Proto("LIFX", "LIFX LAN") +lifx_protocol.fields = {} + + +-- load dissectorLookups +-- load packetProtoFields +-- load lifx_packet_types + +for _,dhndl in ipairs(dissectorHndls) do + if dhndl["lifxPacketTypes"] then + for k,v in pairs(dhndl.lifxPacketTypes) do + lifxPacketTypes[k] = v + end + end + + if dhndl["packetProtoFields"] then + for _, pf in ipairs(dhndl.packetProtoFields) do + table.insert(lifx_protocol.fields, pf) + end + end + + if dhndl["dissectorLookups"] then + for k,v in pairs(dhndl.dissectorLookups) do + dissectors[k] = v + end + end +end + +-- Frame Header +size = ProtoField.uint16("lifx.size" , "PacketSize" , base.DEC) +protocol = ProtoField.uint16("lifx.protocol" , "Protocol" , base.DEC , nil , 0xFFF0) +addressable = ProtoField.bool ("lifx.addressable", "Addressable" , 16 , {"No", "Yes"}, 0x0008) +tagged = ProtoField.bool ("lifx.tagged" , "Tagged" , 16 , {"No", "Yes"}, 0x0004) +origin = ProtoField.uint8 ("lifx.origin" , "Origin" , base.HEX , nil , 0x0003) +source = ProtoField.uint32("lifx.source" , "Source" , base.HEX) + +pf_header = {size, protocol, addressable, tagged, origin, source} + +-- Frame Address +target = ProtoField.ether ("lifx.target" , "Target") +target_devices = ProtoField.uint16("lifx.target_device", "Target_device", base.HEX) +reserved1 = ProtoField.bytes ("lifx.reserved1" , "Reserved1" , base.SPACE) +res_required = ProtoField.bool ("lifx.res_required" , "Res Required" , 8 , {"No", "Yes"}, 0x80) +ack_required = ProtoField.bool ("lifx.ack_required" , "Ack Required" , 8 , {"No", "Yes"}, 0x40) +reserved2 = ProtoField.uint8 ("lifx.reserved2" , "Reserved2" , base.HEX, nil , 0x3F) +sequence = ProtoField.uint8 ("lifx.sequence" , "Sequence" , base.DEC) + +pf_address = {target, target_devices, reserved1, res_required, ack_required, reserved2, sequence} + +-- Protocol Header +reserved3 = ProtoField.uint64("lifx.reserved3", "Reserved3") +ptype = ProtoField.uint16("lifx.type" , "Type" , nil, lifxPacketTypes) +reserved4 = ProtoField.uint16("lifx.reserved4", "Reserved4") + +pf_protocol = {reserved3, ptype, reserved4} + +for _, pfs in ipairs({pf_header, pf_address, pf_protocol}) do + for _, pf in ipairs(pfs) do + table.insert(lifx_protocol.fields, pf) + end +end + + +function lifx_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = lifx_protocol.name + + local subtree = tree:add(lifx_protocol, buffer(), "LIFX") + local thead = subtree:add(lifx_protocol, buffer(), "Header") + + if length < 4 then return end + + thead:add_le(size, buffer(0,2)) + local data = buffer(2,4) + thead:add_le(protocol, data) + thead:add_le(addressable, data) + thead:add_le(tagged, data) + thead:add_le(origin, data) + thead:add_le(source, buffer(4, 4)) + + if length < 23 then return end + + local taddress = subtree:add(lifx_protocol, buffer(), "Address") + + taddress:add_le(target , buffer(8 , 6)) + taddress:add_le(target_devices, buffer(14, 2)) + taddress:add_le(reserved1 , buffer(16, 6)) -- 6 bytes + local data = buffer(22,1) + taddress:add_le(res_required , data) -- bool + taddress:add_le(ack_required , data) -- bool + taddress:add_le(reserved2 , data) -- 6 bits + taddress:add_le(sequence , buffer(23, 1)) -- 1 byte + + if length < 34 then return end + + local tproto = subtree:add(lifx_protocol, buffer(), "Protocol") + + tproto:add_le(reserved3, buffer(24, 8)) -- 8 bytes + tproto:add_le(ptype, buffer(32, 2)) -- u16 + tproto:add_le(reserved4, buffer(34, 2)) -- 2 bytes + + local comsID = buffer(32, 2):le_uint() + local comsType = lifxPacketTypes[comsID] + if comsType then + pinfo.cols["info"] = comsType + end + + local case = dissectors[comsID] + + if case ~= IGNORE_MARKER then + local payloadBuffer = buffer(36, length-36) + local ttype = subtree:add(lifx_protocol, payloadBuffer, comsType) + + if case then + case(ttype, payloadBuffer, pinfo) + end + end + +end + +DissectorTable.get("udp.port"):add(56700, lifx_protocol) diff --git a/dissectors/lifx-minervasrefuge/README.md b/dissectors/lifx-minervasrefuge/README.md new file mode 100644 index 0000000..a42709d --- /dev/null +++ b/dissectors/lifx-minervasrefuge/README.md @@ -0,0 +1,58 @@ +# LIFX LAN — ampoules LIFX (variante modulaire MinervasRefuge, inachevée) + +Dissecteur Wireshark Lua du **protocole LAN actuel des ampoules LIFX** +(documentation officielle LIFX LAN), découpé en modules : en-tête de +trame (taille, protocole, adressable, étiqueté, origine, source), +adresse de trame (cible, drapeaux d'acquittement / réponse, séquence) et +en-tête de protocole (type de message), puis modules par famille de +messages — découverte (`service`), appareil (`device`, avec table des +produits LIFX), lumière (`light`), multizone, relais, tuiles. Port UDP +56700. **Travail en cours selon l'amont** : seuls quelques messages sont +réellement décodés et testés (`GetVersion` / `StateVersion`, +`SetColour`, `LightState`…). + +## Import + +| | | +|---|---| +| Dépôt amont | https://codeberg.org/MinervasRefuge/LIFX-Wireshark (dossier `src/`) | +| Commit importé | `49b1a390abb75f264dd3e5dd824c0c40c9272e72` du 11/06/2022 (branche `main`, dernier commit ; dernière modification de `src/` : `1278c72` du 11/06/2022) | +| Licence amont | GPL-3.0-only (fichier `COPYING` GPL v3, copié ici sous le nom `LICENSE` ; aucun en-tête ni mention « or later ») | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur LIFX natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme du `COPYING` amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `Lifx.lua` | Point d'entrée : protocole `lifx` sur UDP 56700, en-têtes, chargement des modules par `require` | +| `util.lua` | Fonctions communes (`LDMOD`, groupes de champs, pourcentages) | +| `service.lua`, `device.lua`, `light.lua`, `multizone.lua`, `relay.lua`, `tile.lua` | Modules par famille de messages | +| `products.lua` | Table des produits LIFX (identifiants → noms) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête de chaque fichier. Non importés : le +`makefile` et le script vide `products-dumper.guile` (chaîne de +génération Lisp / Guile hors sujet). + +## Utilisation + +Les modules sont chargés par `require("device")`, `require("util")`… : +ils doivent être trouvables via `package.path`. Le plus simple est de +lancer Wireshark depuis ce dossier avec +`wireshark -X lua_script:Lifx.lua capture.pcapng` (le répertoire courant +fait partie du chemin par défaut). Ne pas copier les modules seuls dans +le dossier `plugins` : Wireshark y exécuterait chaque fichier comme un +plugin indépendant. Filtrer ensuite avec `lifx`. + +## Remarques + +- **Conflit** : `dissectors/lifx/`, `dissectors/lifx-magicmonkey/`, + `dissectors/lifx-scheffler/` et ce dossier déclarent tous le protocole + `lifx` sur le port 56700 ; n'en charger qu'un seul. Pour un décodage + complet du protocole actuel, préférer `dissectors/lifx/`. +- Chargement via `require` non vérifié ; nombreuses variables globales, + comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/lifx-minervasrefuge/device.lua b/dissectors/lifx-minervasrefuge/device.lua new file mode 100644 index 0000000..6006c7a --- /dev/null +++ b/dissectors/lifx-minervasrefuge/device.lua @@ -0,0 +1,71 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/device.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local lifxProducts = require("products") +require("util") + +local m = LDMOD { + [3] = "StateService", + [15] = "StateHostFirmware", + [17] = "StateWifiInfo", + [19] = "StateWifiFirmware", + [22] = "StatePower", + [25] = "StateLabel", + [33] = "StateVersion", + [35] = "StateInfo", + [50] = "StateLocation", + [53] = "StateGroup", + [59] = "EchoResponse", + [223] = "StateUnhandled", + + -- Device [get] + [14] = "GetHostFirmware", + [16] = "GetWifiInfo", + [18] = "GetWifiFirmware", + [20] = "GetPower", + [23] = "GetLabel", + [32] = "GetVersion", + [34] = "GetInfo", + [48] = "GetLocation", + [51] = "GetGroup", + [58] = "EchoRequest", + + -- Device [set] + [21] = "SetPower", + [24] = "SetLabel", + [38] = "SetReboot", + [49] = "SetLocation", + [52] = "SetGroup" +} + +-- StateVersion +BuildProtoFieldGroup { + mod=m, prefix = "sv_", key="lifx.StateVersion", group="pfs_stateversion", + + {id="vendor" , fn="uint32" , "vendor" , "Vendor" , DEC} , + {id="product" , fn="uint32" , "product" , "Product" , DEC} , + {id="reserved1" , fn="bytes" , "reserved1" , "Reserved1" , SPACE} +} + + + +addDissector(33, m, function (t, b, pinfo) + le(t, m.sv_vendor, b(0, 4)) + local field = le(t, m.sv_product, b(4, 4)) + local vendor = b(0, 4):le_uint() + local product = lifxProducts[b(4, 4):le_uint()] + if vendor == 1 and product then + field:append_text(" (" .. product .. ")") + end + le(t, m.sv_reserved1, b(8, 4)) +end) + + +-- GET +ignore(32, m) -- GetVersion + + +ignore(45, m) + +return m diff --git a/dissectors/lifx-minervasrefuge/light.lua b/dissectors/lifx-minervasrefuge/light.lua new file mode 100644 index 0000000..9e6b0e1 --- /dev/null +++ b/dissectors/lifx-minervasrefuge/light.lua @@ -0,0 +1,133 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/light.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +require("util") + +local m = LDMOD { + -- Light + [107] = "LightState", + [108] = "StateLightPower", + [121] = "StateInfrared", + [144] = "StateHevCycle", + [147] = "StateHevCycleConfiguration", + [149] = "StateLastHevCycleResult", + + -- Light [get] + [101] = "GetColour", + [116] = "GetLightPower", + [120] = "GetInfrared", + [142] = "GetHevCycle", + [145] = "GetHevCycleConfiguration", + [148] = "GetLastHevCycleResult", + + -- Light [set] + [102] = "SetColour", + [103] = "SetWaveform", + [117] = "SetLightPower", + [119] = "SetWaveformOptional", + [122] = "SetInfrared", + [143] = "SetHevCycle", + [146] = "SetHevCycleConfiguration" +} + +-- LightState +BuildProtoFieldGroup { + mod=m, prefix = "ls_", key="lifx.LightState", + + {id="hue" , fn="uint16" , "hue" , "Hue" , DEC} , + {id="satu" , fn="uint16" , "saturation" , "Saturation" , DEC} , + {id="bright" , fn="uint16" , "brightness" , "Brightness" , DEC} , + {id="kelvin" , fn="uint16" , "kelvin" , "Kelvin" , DEC} , + {id="reserved" , fn="bytes" , "reserved1" , "Reserved1" , SPACE} , + {id="power" , fn="uint16" , "power" , "Power" , DEC} , + {id="label" , fn="stringz" , "label" , "Label" , UNICODE} , + {id="reserved2" , fn="bytes" , "reserved2" , "Reserved2" , SPACE} +} + +---- GET + +---- SET + +-- Set Colour +BuildProtoFieldGroup { + mod=m, prefix = "sc_", key="lifx.SetColour", + + {id="reserved" , fn="bytes" , "reserved1" , "Reserved1" , SPACE} , + {id="hue" , fn="uint16" , "hue" , "Hue" , DEC} , + {id="satu" , fn="uint16" , "saturation" , "Saturation" , DEC} , + {id="bright" , fn="uint16" , "brightness" , "Brightness" , DEC} , + {id="kelvin" , fn="uint16" , "kelvin" , "Kelvin" , DEC} , + {id="durat" , fn="uint32" , "duration" , "Duration" , DEC} +} + +-- SetWaveformOptional +BuildProtoFieldGroup { + mod=m, prefix = "swo_", key="lifx.SetWaveformOptional", + + {id="reserved1" , fn="bytes" , "reserved1" , "Reserved1" , SPACE} , + {id="trans" , fn="uint8" , "transient" , "Transient" , nil , N_TF} , + {id="hue" , fn="uint16" , "hue" , "Hue" , DEC} , + {id="satu" , fn="uint16" , "saturation" , "Saturation" , DEC} , + {id="bright" , fn="uint16" , "brightness" , "Brightness" , DEC} , + {id="kelvin" , fn="uint16" , "kelvin" , "Kelvin" , DEC} , + {id="period" , fn="uint32" , "period" , "Period" , DEC} , + {id="cycles" , fn="float" , "cycles" , "Cycles" , DEC} , + {id="skrat" , fn="int16" , "skew_ratio" , "Skew Ratio" , DEC} , + {id="wfrm" , fn="uint8" , "waveform" , "Waveform" , nil , {[0]="SAW" , "SINE" , "HALF_SINE" , "TRIANGLE" , "PULSE"}} , + {id="shue" , fn="uint8" , "set_hue" , "Set Hue" , nil , N_TF} , + {id="ssatu" , fn="uint8" , "set_saturation" , "Set Saturation" , nil , N_TF} , + {id="sbright" , fn="uint8" , "set_brightness" , "Set Brightness" , nil , N_TF} , + {id="skelvin" , fn="uint8" , "set_kelvin" , "Set Kelvin" , nil , N_TF} +} + + +-- Dissectors + +addDissector(107, m, function (t, b, pinfo) -- LightState + local length = b:len() + le(t, m.ls_hue , b(0, 2)):append_text(u16Percent(b(0,2))) + le(t, m.ls_satu , b(2, 2)):append_text(u16Percent(b(2,2))) + le(t, m.ls_bright , b(4, 2)):append_text(u16Percent(b(4,2))) + le(t, m.ls_kelvin , b(6, 2)):append_text("K") + le(t, m.ls_reserved, b(8, 2)) + le(t, m.ls_power , b(10, 2)):append_text(u16Percent(b(10,2))) + local sz = b(12, length-12) + le(t, m.ls_label, sz) + local index = sz:strsize(UNICODE) - 1 + le(t, m.ls_reserved2, b(index, 8)) +end) + +-- GET + +ignore(101, m) -- GetColour + +-- SET + +addDissector(102, m, function (t, b, pinfo) -- SetColour + le(t, m.sc_reserved, b(0, 1)) + le(t, m.sc_hue , b(1, 2)):append_text(u16Percent(b(1,2))) + le(t, m.sc_satu , b(3, 2)):append_text(u16Percent(b(3,2))) + le(t, m.sc_bright , b(5, 2)):append_text(u16Percent(b(5,2))) + le(t, m.sc_kelvin , b(7, 2)):append_text("K") + le(t, m.sc_durat , b(9, 4)):append_text("ms") +end) + +addDissector(119, m, function (t, b, pinfo) -- SetWaveformOptional + le(t, m.swo_reserved1, b(0,1)) + le(t, m.swo_trans, b(1,1)) + le(t, m.swo_hue, b(2,2)):append_text(u16Percent(b(2,2))) + le(t, m.swo_satu, b(4,2)):append_text(u16Percent(b(4,2))) + le(t, m.swo_bright, b(6,2)):append_text(u16Percent(b(6,2))) + le(t, m.swo_kelvin, b(8,2)):append_text("K") + le(t, m.swo_period, b(10,4)):append_text("ms") + le(t, m.swo_cycles, b(14,4)) + le(t, m.swo_skrat, b(18, 2)) + le(t, m.swo_wfrm, b(20, 1)) + le(t, m.swo_shue, b(21, 1)) + le(t, m.swo_ssatu, b(22, 1)) + le(t, m.swo_sbright, b(23, 1)) + le(t, m.swo_skelvin, b(24,1)) +end) + +return m diff --git a/dissectors/lifx-minervasrefuge/multizone.lua b/dissectors/lifx-minervasrefuge/multizone.lua new file mode 100644 index 0000000..5917fd6 --- /dev/null +++ b/dissectors/lifx-minervasrefuge/multizone.lua @@ -0,0 +1,29 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/multizone.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local m = LDMOD { + -- MultiZone + [503] = "StateZone", + [506] = "StateMultiZone", + [509] = "StateMultiZoneEffect", + [512] = "StateExtendedColorZones", + + -- MultiZone [get] + [502] = "GetColorZones", + [507] = "GetMultiZoneEffect", + [511] = "GetExtendedColorZones", + + -- MultiZone [set] + [501] = "SetColorZones", + [508] = "SetMultiZoneEffect", + [510] = "SetExtendedColorZones" +} + +local function dissector_name(tree, buffer, pinfo) +end + +m.dissectorLookups = { +} + +return m diff --git a/dissectors/lifx-minervasrefuge/products.lua b/dissectors/lifx-minervasrefuge/products.lua new file mode 100644 index 0000000..9cd8d84 --- /dev/null +++ b/dissectors/lifx-minervasrefuge/products.lua @@ -0,0 +1,93 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/products.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +return { + [1] = "LIFX Original 1000", + [3] = "LIFX Color 650", + [10] = "LIFX White 800 (Low Voltage)", + [11] = "LIFX White 800 (High Voltage)", + [15] = "LIFX Color 1000", + [18] = "LIFX White 900 BR30 (Low Voltage)", + [19] = "LIFX White 900 BR30 (High Voltage)", + [20] = "LIFX Color 1000 BR30", + [22] = "LIFX Color 1000", + [27] = "LIFX A19", + [28] = "LIFX BR30", + [29] = "LIFX A19 Night Vision", + [30] = "LIFX BR30 Night Vision", + [31] = "LIFX Z", + [32] = "LIFX Z", + [36] = "LIFX Downlight", + [37] = "LIFX Downlight", + [38] = "LIFX Beam", + [39] = "LIFX Downlight White to Warm", + [40] = "LIFX Downlight", + [43] = "LIFX A19", + [44] = "LIFX BR30", + [45] = "LIFX A19 Night Vision", + [46] = "LIFX BR30 Night Vision", + [49] = "LIFX Mini Color", + [50] = "LIFX Mini White to Warm", + [51] = "LIFX Mini White", + [52] = "LIFX GU10", + [53] = "LIFX GU10", + [55] = "LIFX Tile", + [57] = "LIFX Candle", + [59] = "LIFX Mini Color", + [60] = "LIFX Mini White to Warm", + [61] = "LIFX Mini White", + [62] = "LIFX A19", + [63] = "LIFX BR30", + [64] = "LIFX A19 Night Vision", + [65] = "LIFX BR30 Night Vision", + [66] = "LIFX Mini White", + [68] = "LIFX Candle", + [70] = "LIFX Switch", + [71] = "LIFX Switch", + [81] = "LIFX Candle White to Warm", + [82] = "LIFX Filament Clear", + [85] = "LIFX Filament Amber", + [87] = "LIFX Mini White", + [88] = "LIFX Mini White", + [89] = "LIFX Switch", + [90] = "LIFX Clean", + [91] = "LIFX Color", + [92] = "LIFX Color", + [93] = "LIFX A19 US", + [94] = "LIFX BR30", + [96] = "LIFX Candle White to Warm", + [97] = "LIFX A19", + [98] = "LIFX BR30", + [99] = "LIFX Clean", + [100] = "LIFX Filament Clear", + [101] = "LIFX Filament Amber", + [109] = "LIFX A19 Night Vision", + [110] = "LIFX BR30 Night Vision", + [111] = "LIFX A19 Night Vision", + [112] = "LIFX BR30 Night Vision Intl", + [113] = "LIFX Mini WW US", + [114] = "LIFX Mini WW Intl", + [115] = "LIFX Switch", + [116] = "LIFX Switch", + [117] = "LIFX Z US", + [118] = "LIFX Z Intl", + [119] = "LIFX Beam US", + [120] = "LIFX Beam Intl", + [123] = "LIFX Color US", + [124] = "LIFX Color Intl", + [125] = "LIFX White to Warm US", + [126] = "LIFX White to Warm Intl", + [127] = "LIFX White US", + [128] = "LIFX White Intl", + [129] = "LIFX Color US", + [130] = "LIFX Color Intl", + [131] = "LIFX White To Warm US", + [132] = "LIFX White To Warm Intl", + [133] = "LIFX White US", + [134] = "LIFX White Intl", + [135] = "LIFX GU10 Color US", + [136] = "LIFX GU10 Color Intl", + [137] = "LIFX Candle Color US", + [138] = "LIFX Candle Color Intl" +} diff --git a/dissectors/lifx-minervasrefuge/relay.lua b/dissectors/lifx-minervasrefuge/relay.lua new file mode 100644 index 0000000..e3491f7 --- /dev/null +++ b/dissectors/lifx-minervasrefuge/relay.lua @@ -0,0 +1,25 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/relay.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local m = {} +m.packetProtoFields = {} + +m.lifxPacketTypes = { + -- Relay + [818] = "StateRPower", + + -- Relay [get] + [816] = "GetRPower", + + -- Relay [set] + [817] = "SetRPower" +} + +local function dissector_name(tree, buffer, pinfo) +end + +m.dissectorLookups = { +} + +return m diff --git a/dissectors/lifx-minervasrefuge/service.lua b/dissectors/lifx-minervasrefuge/service.lua new file mode 100644 index 0000000..0e398a7 --- /dev/null +++ b/dissectors/lifx-minervasrefuge/service.lua @@ -0,0 +1,28 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/service.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +require("util") + +local m = LDMOD { +-- Discovery [get] + [2] = "GetService", + [3] = "StateService" +} + +ignore(2, m) + +-- StateService +BuildProtoFieldGroup { + mod=m, prefix = "ss_", key="lifx.StateService", + + {id="service" , fn="uint8" , "service" , "Service" , nil , {"UDP" , "RESERVED1" , "RESERVED2" , "RESERVED3" , "RESERVED4"}} , + {id="port" , fn="uint32" , "port" , "Port" , DEC} +} + +addDissector(3, m, function (t, b, pinfo) -- StateService + le(t, m.ss_service, b(0, 1)) + le(t, m.ss_port , b(1, 4)) +end) + +return m diff --git a/dissectors/lifx-minervasrefuge/tile.lua b/dissectors/lifx-minervasrefuge/tile.lua new file mode 100644 index 0000000..532b538 --- /dev/null +++ b/dissectors/lifx-minervasrefuge/tile.lua @@ -0,0 +1,25 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/tile.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local m = LDMOD { + -- Tile + [702] = "StateDeviceChain", + [711] = "State64", + [720] = "StateTileEffect", + + -- Tile [get] + [701] = "GetDeviceChain", + [707] = "Get64", + [718] = "GetTileEffect", + + -- Tile [set] + [703] = "SetUserPosition", + [715] = "Set64", + [719] = "SetTileEffect" +} + +local function dissector_name(tree, buffer, pinfo) +end + +return m diff --git a/dissectors/lifx-minervasrefuge/util.lua b/dissectors/lifx-minervasrefuge/util.lua new file mode 100644 index 0000000..3be6864 --- /dev/null +++ b/dissectors/lifx-minervasrefuge/util.lua @@ -0,0 +1,47 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://codeberg.org/MinervasRefuge/LIFX-Wireshark (src/util.lua), +-- commit 49b1a390abb75f264dd3e5dd824c0c40c9272e72 du 11/06/2022. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +function u16Percent(value) + return " (" .. (value:le_uint()*100)/0xFFFF .. "%)" +end + +function BuildProtoFieldGroup(t) + for _, pf in ipairs(t) do + pf[1] = t.key .. "." .. pf[1] + + local newPF = ProtoField[pf.fn](table.unpack(pf)) + t.mod[t.prefix .. pf.id] = newPF + + table.insert(t.mod.packetProtoFields, newPF) + end +end + +function le(tree, pf, buffer) + return tree:add_le(pf, buffer) +end + +DEC = base.DEC +SPACE = base.SPACE +UNICODE = base.UNICODE +NONE = base.NONE + +N_TF = {[0]="False", [1]="True"} + +function LDMOD(pktypes) + return { + dissectorLookups = {}, + packetProtoFields = {}, + lifxPacketTypes = pktypes + } +end + +function addDissector(id, m, fn) + m.dissectorLookups[id] = fn +end + +IGNORE_MARKER = "IGNORE" + +function ignore(id, m) + m.dissectorLookups[id] = IGNORE_MARKER +end diff --git a/dissectors/lifx-scheffler/LICENSE b/dissectors/lifx-scheffler/LICENSE new file mode 100644 index 0000000..1772fc9 --- /dev/null +++ b/dissectors/lifx-scheffler/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2022 Thomas Scheffler + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/dissectors/lifx-scheffler/README.md b/dissectors/lifx-scheffler/README.md new file mode 100644 index 0000000..9e943d5 --- /dev/null +++ b/dissectors/lifx-scheffler/README.md @@ -0,0 +1,49 @@ +# LIFX — ampoules Wi-Fi LIFX (protocole LAN v1, variante Scheffler) + +Dissecteur Wireshark Lua du **protocole LAN historique des ampoules Wi-Fi +LIFX** : en-tête (taille, protocole, adresse cible, passerelle PAN, +horodatage, type de paquet) et charges utiles des messages (passerelle, +alimentation, étiquette, version et état des microprogrammes maillé et +Wi-Fi, informations Wi-Fi, état de la lampe — teinte, saturation, +luminosité, température —, étiquettes…). Ports TCP et UDP 56700. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/tscheffl/LIFX (dossier `Wireshark/`) | +| Commit importé | `db2d5826e760c5db5d5bac101d99b5a0a6a43a2f` du 13/02/2022 (branche `master`, dernier commit, qui est aussi la dernière modification de `Wireshark/lifx.lua`) | +| Licence amont | MIT (`LICENSE` amont, © 2022 Thomas Scheffler ; en-tête du fichier : © 2012 Mark Wolfe, 2022 Thomas Scheffler) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur LIFX natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `lifx.lua` | Protocole `lifx` sur TCP et UDP 56700 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le code C du dépôt (pilotage des ampoules) +n'est pas importé. + +## Utilisation + +Copier `lifx.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `lifx`. + +## Remarques + +- **Variante modifiée** du script de `dissectors/lifx-magicmonkey/` + (magicmonkey/lifxjs, MIT) : même structure et mêmes noms, avec des + types de messages complétés et numérotés. L'en-tête attribue le code + d'origine à Mark Wolfe (wolfeidau/lifx) ; attribution reprise telle + quelle. +- **Conflit** : `dissectors/lifx/`, `dissectors/lifx-magicmonkey/` et ce + dossier déclarent tous le protocole `lifx` et le port 56700 ; n'en + charger qu'un seul. Pour le protocole LAN actuel (v2), préférer + `dissectors/lifx/`. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/lifx-scheffler/lifx.lua b/dissectors/lifx-scheffler/lifx.lua new file mode 100644 index 0000000..584b3e8 --- /dev/null +++ b/dissectors/lifx-scheffler/lifx.lua @@ -0,0 +1,570 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/tscheffl/LIFX (Wireshark/lifx.lua), +-- commit db2d5826e760c5db5d5bac101d99b5a0a6a43a2f du 13/02/2022. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +--[[ + +Copyright (c) 2012 Mark Wolfe, https://github.com/wolfeidau/lifx + 2022 Thomas Scheffler + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +]]-- + +local lifx = Proto("lifx", "LIFX wifi lightbulb") +local F = lifx.fields + +function switch(t) + t.case = function (self, pType, buffer, pinfo, tree) + local f=self[pType] + if packetNames[pType] then pinfo.cols.info = packetNames[pType] end + if f then + if type(f)=="function" then + f(buffer, pinfo, tree, self) + end + end + end + return t +end + +local onOffStrings = { + [0x0000] = "Off", + [0x0001] = "On", + [0xffff] = "On" +} + +local resetSwitchStrings = { + [0] = "Up", + [1] = "Down" +} + +local interfaceStrings = { + [1] = "soft_ap", + [2] = "station" +} + +local wifiStatusStrings = { + [0] = "connecting", + [1] = "connected", + [2] = "failed", + [3] = "off" +} + +local securityProtocolStrings = { + [1] = "OPEN", + [2] = "WEP_PSK", + [3] = "WPA_TKIP_PSK", + [4] = "WPA_AES_PSK", + [5] = "WPA2_AES_PSK", + [6] = "WPA2_TKIP_PSK", + [7] = "WPA2_MIXED_PSK" +} + +local serviceStrings = { + [1] = "UDP", + [2] = "TCP" +} + +packetNames = { + [0x0002] = "Get PAN gateway (2)", + [0x0003] = "PAN gateway state (3)", + [0x0004] = "Get time", + [0x0005] = "Set time", + [0x0006] = "Time state", + [0x0007] = "Get reset switch state", + [0x0008] = "Reset switch state", + [0x0009] = "Get dummy load", + [0x000a] = "Set dummy load", + [0x000b] = "Dummy load", + [0x000c] = "Get mesh info", + [0x000d] = "Mesh info", + [0x000e] = "Get mesh firmware (14)", + [0x000f] = "Mesh firmware state (15)", + [0x0010] = "Get wifi info (10)", + [0x0011] = "Wifi info (11)", + [0x0012] = "Get wifi firmware state (18)", + [0x0013] = "Wifi firmware state (19)", + [0x0014] = "Get power state (20)", + [0x0015] = "Set power state (21)", + [0x0016] = "Power state (22)", + [0x0017] = "Get bulb label", + [0x0018] = "Set bulb label", + [0x0019] = "Bulb label", + [0x001a] = "Get tags", + [0x001b] = "Set tags", + [0x001c] = "Tags", + [0x001d] = "Get tag labels", + [0x001e] = "Set tag labels", + [0x001f] = "Tag labels", + [0x0020] = "Get version (32)", + [0x0021] = "Version state (33)", + [0x0022] = "Get info (34)", + [0x0023] = "Info state (35)", + [0x0024] = "Get MCU rail voltage", + [0x0025] = "MCU rail voltage", + [0x0026] = "Reboot", + [0x0027] = "Set factory test mode", + [0x0028] = "Disable factory test mode", + [0x0032] = "StateLocation (50)", + [0x003a] = "Echo Request (58)", + [0x003b] = "Echo Reply (59)", + [0x0065] = "Get light state (101)", + [0x0066] = "Set light colour (102", + [0x0067] = "Set waveform", + [0x0068] = "Set dim (absolute)", + [0x0069] = "Set dim (relative)", + [0x006b] = "Light status (107)", + [0x006f] = "Light temperature (111)", + [0x012d] = "Get wifi state (301)", + [0x012e] = "Set wifi state (302)", + [0x012f] = "Wifi state (303)", + [0x0130] = "Get access points", + [0x0131] = "Set access point", + [0x0132] = "Access point", + [0x0191] = "Get Ambient Light state", + [0x0192] = "Ambient Light state" +} + +function panGatewayState(buffer, pinfo, tree) + tree:add(F.service, buffer(0, 1)) + tree:add_le(F.port, buffer(1, 4)) +end + +function setTime(buffer, pinfo, tree) + tree:add(F.time, buffer(0, 8)) +end + +function timeState(buffer, pinfo, tree) + tree:add(F.time, buffer(0, 8)) +end + +function resetSwitchState(buffer, pinfo, tree) + tree:add(F.resetSwitch, buffer(0, 1)) +end + +function meshInfo(buffer, pinfo, tree) + tree:add(F.signal, buffer(0, 4)) + tree:add(F.tx, buffer(4, 4)) + tree:add(F.rx, buffer(8, 4)) + tree:add(F.mcuTemperature, buffer(12, 2)) +end + +function echoRequest(buffer, pinfo, tree) + tree:add(F.echo, buffer(0, 64)) +end + +function echoReply(buffer, pinfo, tree) + tree:add(F.echo, buffer(0, 64)) +end + +function meshFirmwareState(buffer, pinfo, tree) + local build = tree:add(buffer(0, 8), "Build") + local install = tree:add(buffer(8, 8), "Reserved") + local usecs = buffer(0,8):uint64() + local le_usecs = usecs:bswap() --LIFX uses little endian + local secs = (le_usecs / 1000000000):tonumber() + + build:add(F.time_utc, buffer(0,8), NSTime.new(secs)) + + --build:add(F.time_utc, usecs) + --build:add(F.second, buffer(0, 1)) + --build:add(F.minute, buffer(1, 1)) + --build:add(F.hour, buffer(2, 1)) + --build:add(F.day, buffer(3, 1)) + --build:add(F.month, buffer(4, 3)) + --build:add(F.year, buffer(7, 1)) + + usecs = buffer(8,8):uint64() + le_usecs = usecs:bswap() --LIFX uses little endian + secs = (le_usecs / 1000000000):tonumber() + + install:add(F.time_utc, buffer(8,8), NSTime.new(secs)) + + --install:add(F.time_utc, buffer(8, 8)) + --install:add(F.second, buffer(8, 1)) + --install:add(F.minute, buffer(9, 1)) + --install:add(F.hour, buffer(10, 1)) + --install:add(F.day, buffer(11, 1)) + --install:add(F.month, buffer(13, 3)) + --install:add(F.year, buffer(15, 1)) + + tree:add(F.version, buffer(16, 4)) +end + +function wifiInfo(buffer, pinfo, tree) + tree:add(F.signal, buffer(0, 4)) + tree:add(F.tx, buffer(4, 4)) + tree:add(F.rx, buffer(8, 4)) + tree:add(F.mcuTemperature, buffer(12, 2)) +end + +function wifiFirmwareState(buffer, pinfo, tree) + local build = tree:add(buffer(0, 8), "Build") + local install = tree:add(buffer(8, 8), "Reserved") + + build:add(F.time_utc, buffer(0, 8)) + --build:add(F.second, buffer(0, 1)) + --build:add(F.minute, buffer(1, 1)) + --build:add(F.hour, buffer(2, 1)) + --build:add(F.day, buffer(3, 1)) + --build:add(F.month, buffer(4, 3)) + --build:add(F.year, buffer(7, 1)) + + install:add(F.time_utc, buffer(8, 8)) + --install:add(F.second, buffer(8, 1)) + --install:add(F.minute, buffer(9, 1)) + --install:add(F.hour, buffer(10, 1)) + --install:add(F.day, buffer(11, 1)) + --install:add(F.month, buffer(12, 3)) + --install:add(F.year, buffer(15, 1)) + + tree:add(F.version, buffer(16, 4)) +end + +function setPowerState(buffer, pinfo, tree) + tree:add(F.onoffReq, buffer(0, 1)) +end + +function powerState(buffer, pinfo, tree) + tree:add(F.onoffRes, buffer(0, 2)) +end + +function bulbLabel(buffer, pinfo, tree) + tree:add(F.bulbName, buffer(0, 32)) +end + +function setBulbLabel(buffer, pinfo, tree) + tree:add(F.bulbName, buffer(0, 32)) +end + +function setTags(buffer, pinfo, tree) + tree:add(F.tags, buffer(0, 8)) +end + +function tags(buffer, pinfo, tree) + tree:add(F.tags, buffer(0, 8)) +end + +function getTagLabels(buffer, pinfo, tree) + tree:add(F.tags, buffer(0, 8)) +end + +function setTagLabels(buffer, pinfo, tree) + tree:add(F.tags, buffer(0, 8)) + tree:add(F.label, buffer(8, 40)) +end + +function tagLabels(buffer, pinfo, tree) + tree:add(F.tags, buffer(0, 8)) + tree:add(F.label, buffer(8, 40)) +end + +function versionState(buffer, pinfo, tree) + tree:add(F.vendor, buffer(0, 4)) + tree:add(F.product, buffer(4, 4)) + tree:add(F.version, buffer(8, 4)) +end + +function infoState(buffer, pinfo, tree) + tree:add(F.time, buffer(0, 8)) + --tree:add(F.uptime, buffer(8, 8)) + local usecs = buffer(8,8):uint64() + local le_usecs = usecs:bswap() --LIFX uses little endian + local secs = (le_usecs / 1000000000):tonumber() + tree:add(F.uptime, buffer(8,8), NSTime.new(secs)) + tree:add(F.downtime, buffer(16, 8)) +end + +function mcuRailVoltage(buffer, pinfo, tree) + tree:add(F.voltage, buffer(0, 4)) +end + +function stateLocation(buffer, pinfo, tree) + tree:add(F.location, buffer(0, 16)) + tree:add(F.label, buffer(16, 32)) + --tree:add(F.updated, buffer(48, 8)) + local usecs = buffer(48,8):uint64() + local le_usecs = usecs:bswap() --LIFX uses little endian + local secs = (le_usecs / 1000000000):tonumber() + + tree:add(F.time_utc, buffer(48, 8), NSTime.new(secs)) + +end + +function setFactoryTestMode(buffer, pinfo, tree) + tree:add(F.on, buffer(0, 1)) +end + +function setLightColour(buffer, pinfo, tree) + tree:add(F.stream , buffer(0, 1)) + tree:add_le(F.hue , buffer(1, 2)) + tree:add_le(F.saturation, buffer(3, 2)) + tree:add_le(F.brightness, buffer(5, 2)) + tree:add_le(F.kelvin , buffer(7, 2)) + tree:add_le(F.fadeTime , buffer(9, 4)) +end + +function setWaveform(buffer, pinfo, tree) + tree:add(F.stream , buffer(0 , 1)) + tree:add(F.transient , buffer(1 , 1)) + tree:add_le(F.hue , buffer(2 , 2)) + tree:add_le(F.saturation, buffer(4 , 2)) + tree:add_le(F.brightness, buffer(6 , 2)) + tree:add_le(F.kelvin , buffer(8 , 2)) + tree:add_le(F.period , buffer(10, 4)) + tree:add(F.cycles , buffer(14, 4)) + tree:add(F.dutyCycles , buffer(18, 2)) + tree:add(F.waveform , buffer(20, 1)) +end + +function setDimAbsolute(buffer, pinfo, tree) + tree:add_le(F.brightness, buffer(0, 2)) + tree:add_le(F.fadeTime , buffer(2, 4)) +end + +function setDimRelative(buffer, pinfo, tree) + tree:add_le(F.brightness, buffer(0, 2)) + tree:add_le(F.fadeTime , buffer(2, 4)) +end + +function lightStatus(buffer, pinfo, tree) + tree:add_le(F.hue , buffer(0 , 2)) + tree:add_le(F.saturation, buffer(2 , 2)) + tree:add_le(F.brightness, buffer(4 , 2)) + tree:add_le(F.kelvin , buffer(6 , 2)) + tree:add(F.dim , buffer(8 , 2)) + tree:add(F.power , buffer(10, 2)) + tree:add(F.bulbName , buffer(12, 32)) + tree:add(F.tags , buffer(44, 8)) +end + +function lightTemperature(buffer, pinfo, tree) + tree:add_le(F.kelvin , buffer(0 , 2)) +end + +function getWifiState(buffer, pinfo, tree) + tree:add(F.interface, buffer(0, 1)) +end + +function setWifiState(buffer, pinfo, tree) + tree:add(F.interface , buffer(0, 1)) + tree:add(F.wifiStatus, buffer(1, 1)) + tree:add(F.ip4Address, buffer(2, 4)) + tree:add(F.ip6Address, buffer(6, 16)) +end + +function wifiState(buffer, pinfo, tree) + tree:add(F.interface , buffer(0, 1)) + tree:add(F.wifiStatus, buffer(1, 1)) + tree:add(F.ip4Address, buffer(2, 4)) + tree:add(F.ip6Address, buffer(6, 16)) +end + +function setAccessPoint(buffer, pinfo, tree) + tree:add(F.interface , buffer(0 , 1)) + tree:add(F.ssid , buffer(1 , 32)) + tree:add(F.password , buffer(33, 64)) + tree:add(F.securityProtocol, buffer(97, 1)) +end + +function accessPoint(buffer, pinfo, tree) + tree:add(F.interface , buffer(0 , 1)) + tree:add(F.ssid , buffer(1 , 32)) + tree:add(F.securityProtocol, buffer(33, 1)) + tree:add(F.strength, buffer(34, 2)) + tree:add(F.channel, buffer(36, 2)) +end + +function ambientLightState(buffer, pinfo, tree) + tree:add(F.lux , buffer(0, 4)) +end + +packetTable = switch { + [0x0002] = getPanGateway, + [0x0003] = panGatewayState, + [0x0004] = getTime, + [0x0005] = setTime, + [0x0006] = timeState, + [0x0007] = getResetSwitchState, + [0x0008] = resetSwitchState, + [0x0009] = getDummyLoad, + [0x000a] = setDummyLoad, + [0x000b] = dummyLoad, + [0x000c] = getMeshInfo, + [0x000d] = meshInfo, + [0x000e] = getMeshFirmware, + [0x000f] = meshFirmwareState, + [0x0010] = getWifiInfo, + [0x0011] = wifiInfo, + [0x0012] = getWifiFirmwareState, + [0x0013] = wifiFirmwareState, + [0x0014] = getPowerState, + [0x0015] = setPowerState, + [0x0016] = powerState, + [0x0017] = getBulbLabel, + [0x0018] = setBulbLabel, + [0x0019] = bulbLabel, + [0x001a] = getTags, + [0x001b] = setTags, + [0x001c] = tags, + [0x001d] = getTagLabels, + [0x001e] = setTagLabels, + [0x001f] = tagLabels, + [0x0020] = getVersion, + [0x0021] = versionState, + [0x0022] = getInfo, + [0x0023] = infoState, + [0x0024] = getMcuRailVoltage, + [0x0025] = mcuRailVoltage, + [0x0026] = reboot, + [0x0027] = setFactoryTestMode, + [0x0028] = disableFactoryTestMode, + [0x0032] = stateLocation, + [0x003a] = echoRequest, + [0x003b] = echoReply, + [0x0065] = getLightState, + [0x0066] = setLightColour, + [0x0067] = setWaveform, + [0x0068] = setDimAbsolute, + [0x0069] = setDimRelative, + [0x006b] = lightStatus, + [0x006f] = lightTemperature, + [0x012d] = getWifiState, + [0x012e] = setWifiState, + [0x012f] = wifiState, + [0x0130] = getAccessPoints, + [0x0131] = setAccessPoint, + [0x0132] = accessPoint, + [0x0191] = getAmbientLightState, + [0x0192] = ambientLightState +} + +F.size = ProtoField.uint16("lifx.size" , "Packet size" , base.DEC) +F.protocol = ProtoField.uint16("lifx.protocol" , "LIFX protocol" , base.HEX) +F.reserved = ProtoField.bytes("lifx.reserved" , "Reserved" , base.SPACE) +F.targetAddr = ProtoField.ether("lifx.targetAddr" , "Target address" , base.HEX) +F.site = ProtoField.ether("lifx.site" , "Site address" , base.HEX) +F.timestamp = ProtoField.uint64("lifx.timestamp" , "Timestamp" , base.HEX) +F.packetType = ProtoField.uint16("lifx.packetType" , "Packet type" , base.HEX , packetNames) +F.unknown = ProtoField.bytes("lifx.unknown" , "Unknown" , base.SPACE) +F.onoffReq = ProtoField.uint8("lifx.onoff" , "On/off setting" , base.HEX , onOffStrings) +F.bulbName = ProtoField.string("lifx.bulbName" , "Bulb name" , base.ASCII) +F.hue = ProtoField.uint16("lifx.hue" , "Hue" , base.DEC) +F.saturation = ProtoField.uint16("lifx.saturation" , "Saturation" , base.DEC) +F.brightness = ProtoField.uint16("lifx.brightness" , "Brightness" , base.DEC) +F.kelvin = ProtoField.uint16("lifx.kelvin" , "Colour temperature" , base.DEC) +F.fadeTime = ProtoField.uint16("lifx.fadeTime" , "Fade time" , base.DEC) +F.onoffRes = ProtoField.uint16("lifx.onoffResponse" , "On/off" , base.HEX , onOffStrings) +F.time = ProtoField.uint64("lifx.time" , "Time (us since epoch)", base.HEX) +F.time_utc = ProtoField.absolute_time("lifx.time" , "Timestamp (UTC)" , base.ENC_TIME_TIMESPEC) +F.uptime = ProtoField.relative_time("lifx.uptime" , "Uptime" , base.ENC_TIME_TIMESPEC) +F.downtime = ProtoField.uint64("lifx.downtime" , "Downtime" , base.HEX) +F.resetSwitch = ProtoField.uint8("lifx.resetSwitch" , "Reset switch" , base.HEX , resetSwitchStrings) +F.tags = ProtoField.uint64("lifx.tags" , "Tags" , base.HEX) +F.voltage = ProtoField.uint64("lifx.voltage" , "Voltage" , base.DEC) +F.stream = ProtoField.uint8("lifx.stream" , "Stream" , base.HEX) +F.transient = ProtoField.uint8("lifx.transient" , "Transient" , base.HEX) +F.period = ProtoField.uint32("lifx.period" , "Period" , base.HEX) +F.cycles = ProtoField.float("lifx.cycles" , "Cycles" , base.HEX) +F.dutyCycles = ProtoField.uint16("lifx.dutyCycles" , "Duty cycles" , base.HEX) +F.waveform = ProtoField.uint8("lifx.waveform" , "Waveform" , base.HEX) +F.dim = ProtoField.uint16("lifx.dim" , "Dim" , base.DEC) +F.power = ProtoField.uint16("lifx.power" , "Power" , base.HEX , onOffStrings) +F.interface = ProtoField.uint8("lifx.interface" , "Interface" , base.DEC , interfaceStrings) +F.wifiStatus = ProtoField.uint8("lifx.wifiStatus" , "Wifi status" , base.HEX , wifiStatusStrings) +F.ip4Address = ProtoField.bytes("lifx.ip4Address" , "IP4 address" , base.SPACE) +F.ip6Address = ProtoField.bytes("lifx.ip6Address" , "IP6 address" , base.SPACE) +F.ssid = ProtoField.bytes("lifx.ssid" , "SSID (UTF8)" , base.SPACE) +F.password = ProtoField.bytes("lifx.password" , "Password (UTF8)" , base.SPACE) +F.securityProtocol = ProtoField.uint8("lifx.securityProtocol", "Security protocol" , base.HEX , securityProtocolStrings) +F.signal = ProtoField.float("lifx.signal" , "Signal" , base.DEC) +F.tx = ProtoField.uint32("lifx.tx" , "Tx" , base.DEC) +F.rx = ProtoField.uint32("lifx.rx" , "Rx" , base.DEC) +F.mcuTemperature = ProtoField.uint16("lifx.mcuTemperature" , "MCU temperature" , base.DEC) +F.second = ProtoField.uint8("lifx.second" , "Second" , base.DEC) +F.minute = ProtoField.uint8("lifx.minute" , "Minute" , base.DEC) +F.hour = ProtoField.uint8("lifx.hour" , "Hour" , base.DEC) +F.day = ProtoField.uint8("lifx.day" , "Day" , base.DEC) +F.month = ProtoField.bytes("lifx.month" , "Month" , base.SPACE) +F.year = ProtoField.uint8("lifx.year" , "Year" , base.DEC) +F.label = ProtoField.bytes("lifx.label" , "Label" , base.SPACE) +F.version = ProtoField.uint32("lifx.version" , "Version" , base.HEX) +F.product = ProtoField.uint32("lifx.product" , "Product" , base.HEX) +F.vendor = ProtoField.uint32("lifx.vendor" , "Vendor" , base.HEX) +F.on = ProtoField.uint8("lifx.on" , "On" , base.HEX) +F.strength = ProtoField.uint8("lifx.strength" , "Strength" , base.DEC) +F.channel = ProtoField.uint8("lifx.channel" , "Channel" , base.DEC) +F.service = ProtoField.uint8("lifx.service" , "Service" , base.HEX , serviceStrings) +F.port = ProtoField.uint32("lifx.port" , "Port" , base.DEC) +F.lux = ProtoField.float("lifx.lux" , "Lux" , base.HEX) +F.echo = ProtoField.bytes("lifx.echo" , "Echo Bytes" , base.SPACE) +F.location = ProtoField.bytes("lifx.location" , "Device location" , base.SPACE) +F.label = ProtoField.string("lifx.label" , "Label" , base.ASCII) +F.updated = ProtoField.uint64("lifx.updated" , "Updated at" , base.HEX) + +function lifx.dissector(buffer, pinfo, tree) + analyse(buffer, pinfo, tree) +end + +function analyse(buffer, pinfo, tree) + pinfo.cols.info = "LIFX" + + -- LE maths on the packet length + local lifxlength = buffer(0,2):le_uint() + + local subtree = tree:add(lifx, buffer(0, lifxlength), "LIFX packet") + subtree:add_le(F.size, buffer(0,2)) + subtree:add(F.protocol, buffer(2,2)) + subtree:add(F.reserved, buffer(4,4)) + subtree:add(F.targetAddr, buffer(8,6)) + subtree:add(F.reserved, buffer(14,2)) + subtree:add(F.site, buffer(16,6)) + subtree:add(F.reserved, buffer(22,2)) + + -- User readable Timestamp + local usecs = buffer(24,8):uint64() + local le_usecs = usecs:bswap() --LIFX uses little endian + local secs = (le_usecs / 1000000000):tonumber() + + subtree:add(F.time_utc,buffer(24,8), NSTime.new(secs)) + --subtree:add(F.timestamp, buffer(24,8)) + + + local packetPayload = subtree:add_le(F.packetType, buffer(32,2)) + subtree:add(F.reserved, buffer(34,2)) + + -- Call the packet-specific handler + packetTable:case(buffer(32,2):le_uint(), buffer(36), pinfo, packetPayload) + + -- Check if there's another LIFX packet inside this TCP packet + if (lifxlength > 0 and buffer:len() > lifxlength) then + analyse(buffer(lifxlength), pinfo, tree) + end + + +end + +local tcpTable = DissectorTable.get("tcp.port") +tcpTable:add(56700, lifx) +local udpTable = DissectorTable.get("udp.port") +udpTable:add(56700, lifx) + diff --git a/dissectors/lppb/LICENSE b/dissectors/lppb/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/dissectors/lppb/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/lppb/README.md b/dissectors/lppb/README.md new file mode 100644 index 0000000..a01ceb7 --- /dev/null +++ b/dissectors/lppb/README.md @@ -0,0 +1,47 @@ +# LPPB — Protocol Buffers préfixés par leur longueur (TCP) + +Dissecteur Wireshark Lua **LPPB** (« Length Prefixed Protocol Buffers ») : +il découpe un flux TCP en blocs préfixés par leur longueur (taille du +préfixe configurable, 4 octets par défaut, gros-boutiste), avec +réassemblage (`dissect_tcp_pdus`), et passe chaque message à un +dissecteur Protobuf choisi par son nom de message (préférence « Schema », +ex. `MY.PROTOBUF.MESSAGE`). Le port TCP est à régler dans les préférences +(0 = désactivé par défaut). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/othrayte/lppb (fichier `lppb.lua`) | +| Commit importé | `956133a736f0339ebd37e83e933b26770967c351` du 01/04/2016 (branche `master`, dernier commit) | +| Licence amont | GPL-3.0-only (fichier `LICENSE` GPL v3, copié ici ; pas de mention « or later » ; le script n'a pas d'en-tête) | +| Natif Wireshark 4.6.4 | En partie — le dissecteur natif `protobuf` décode les messages avec des fichiers `.proto`, mais sans découpage générique « longueur + message » sur TCP | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `lppb.lua` | Protocole `lppb`, port TCP configurable | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +1. Installer le plugin **protobuf_dissector** de + https://github.com/dex/protobuf_dissector (dépendance amont, non + incluse). +2. Copier `lppb.lua` dans le dossier `plugins` de Wireshark + (ex. `~/.local/lib/wireshark/plugins/`). +3. Dans Préférences → Protocols → LPPB, régler le port TCP, la taille du + préfixe et le nom du message (celui du protocole ajouté par + protobuf_dissector). + +## Remarques + +- Le script utilise la table de dissecteurs `protobuf.message`, créée par + protobuf_dissector et **absente** du dissecteur Protobuf natif de + Wireshark 4.6 : sans ce plugin, chaque paquet décodé produit une erreur + Lua (lecture du code, non vérifié dans Wireshark). +- Fonctions `get_message_len` et `dissect_message` et champ `len_F` + globaux, comme dans l'amont. Pas de capture d'exemple amont. diff --git a/dissectors/lppb/lppb.lua b/dissectors/lppb/lppb.lua new file mode 100644 index 0000000..90df605 --- /dev/null +++ b/dissectors/lppb/lppb.lua @@ -0,0 +1,58 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/othrayte/lppb (lppb.lua), +-- commit 956133a736f0339ebd37e83e933b26770967c351 du 01/04/2016. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +local lppb = Proto("lppb","Length Prefixed Protocol Buffers"); + +len_F = ProtoField.string("lppb.len","Length") +lppb.fields = {len_F} + +lppb.prefs.port = Pref.uint("TCP Port:", 0, "") +lppb.prefs.schema = Pref.string("Schema:", "", "E.g. MY.PROTOBUF.MESSAGE") +lppb.prefs.prefix_size = Pref.uint("Prefix size (bytes):", 4, "") + +function get_message_len(tvb, pinfo, tree) + local len = tvb:range(0, lppb.prefs.prefix_size):uint() + return len + lppb.prefs.prefix_size +end + +function dissect_message(tvb, pinfo, tree) + local subtree = tree:add(lppb,tvb(),"Length Prefixed Protocol Buffers Data") + local len = get_message_len(tvb, pinfo, tree) + subtree:add(len_F, tostring(len - lppb.prefs.prefix_size)) + if lppb.prefs.schema == "" then + subtree:add_expert_info(PI_DEBUG, PI_ERROR, "No protobuf schema specified") + else + local dissector = DissectorTable.get("protobuf.message"):get_dissector(lppb.prefs.schema) + if dissector == nil then + subtree:add_expert_info(PI_DEBUG, PI_ERROR, "Schema not found: "..lppb.prefs.schema) + else + return dissector:call(tvb(lppb.prefs.prefix_size):tvb(), pinfo, subtree) + end + end + return 0 +end + +function lppb.dissector(tvb, pinfo, tree) + dissect_tcp_pdus(tvb, tree, lppb.prefs.prefix_size, get_message_len, dissect_message) +end + +local port = 0 + +lppb.prefs_changed = function() + if port ~= lppb.prefs.port then + -- remove old port, if not 0 + if port ~= 0 then + DissectorTable.get("tcp.port"):remove(port, lppb) + end + + -- save new port + port = lppb.prefs.port + + -- add new port, if not 0 + if port ~= 0 then + DissectorTable.get("tcp.port"):add(port, lppb) + end + end +end + diff --git a/dissectors/lsl-discovery/LICENSE b/dissectors/lsl-discovery/LICENSE new file mode 100644 index 0000000..3e443e3 --- /dev/null +++ b/dissectors/lsl-discovery/LICENSE @@ -0,0 +1,15 @@ +Copyright (C) 2012 Christian A. Kothe + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This software uses the following libraries: + + +pugixml (https://pugixml.org), MIT. pugixml is Copyright (C) 2006-2018 Arseny Kapoulkine. +Boost (https://boost.org), Boost Software License +Loguru (https://github.com/emilk/loguru), Public Domain +Catch2 (https://github.com/catchorg/Catch2), Boost Software License diff --git a/dissectors/lsl-discovery/README.md b/dissectors/lsl-discovery/README.md new file mode 100644 index 0000000..541dec8 --- /dev/null +++ b/dissectors/lsl-discovery/README.md @@ -0,0 +1,66 @@ +# LSL — découverte des flux Lab Streaming Layer + +Dissecteur Wireshark Lua des paquets UDP de **découverte de flux** de +[Lab Streaming Layer](https://github.com/sccn/liblsl) (LSL : acquisition +synchronisée de signaux EEG, de capteurs, etc.) : requête +`LSL:shortinfo` (multidiffusion ou diffusion vers UDP 16571) avec la +requête de sélection, le port de réponse et l'identifiant de requête, et +réponse `shortinfo` (identifiant de requête et description XML du flux). +Les échanges de données des flux (TCP) ne sont pas décodés (issue #514). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/sccn/liblsl (`testing/lsl.lua`, dissecteur fourni avec la bibliothèque) | +| Commit importé | `992635a9277bb7cc71b6516e7608182e5e2976f3` du 14/10/2026 (dernier commit de la branche par défaut `dev`) ; dernière modification de `lsl.lua` : commit `b5fe3c7089ff16e64f83dbfeb9feabf0c325b955` du 13/10/2021 (Tristan Stenner) | +| Licence amont | MIT : `LICENSE` du dépôt (« Copyright (C) 2012 Christian A. Kothe »), suivi de la liste des bibliothèques tierces de liblsl. GitHub l'affiche « NOASSERTION » à cause de cette liste ajoutée. Le fichier porte la mention « (C) 2020 Tristan Stenner » sans licence propre : c'est la licence du dépôt qui s'applique. Compatible avec la licence de ce dépôt (GPL-3.0-or-later) | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur LSL dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/lsl.lua` | Protocole `lsldiscovery` (« Labstreaminglayer Discovery ») sur UDP 16571 (ligne 61) ; champs `lsl.cmd`, `lsl.content`, `lsl.answerport`, `lsl.query`, `lsl.streaminfo` | + +## Utilisation + +Copier `src/lsl.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis Ctrl+Maj+L. +Filtre : `lsldiscovery`. Autre port : `Decode As…`. + +## Vérification à l'import + +tshark 4.6.4 : le fichier se charge sans erreur (`luac5.4 -p` : OK). +Captures synthétiques construites au format produit par liblsl +(`src/resolve_attempt_udp.cpp`, lignes 50 à 52 ; `src/udp_server.cpp`, +ligne 140, au commit importé) : + +| Essai | Résultat | +|---|---| +| Requête `LSL:shortinfo\r\ntype='EEG' and name='BioSemi'\r\n16572 1234567890\r\n` | `Command: LSL:shortinfo`, `Content: type='EEG' and name='BioSemi'`, `Answer port: 16572`, `QueryID: 1234567890\r\n` | +| Requête courte `…\r\nname='EEG'\r\n16572 1234567890\r\n` | **erreur Lua** ligne 44 (`attempt to perform arithmetic on a nil value (local 'wspos')`) ; `Content` englobe la requête, le port et l'identifiant | +| Réponse `1234567890\r\n…` depuis UDP 16571 | `QueryID: 1234567890` ; **`Streaminfo` amputé** des 12 premiers caractères (`n="1.0"?>…`) | +| Requête tronquée (sans second `\r\n`), commande autre que `LSL:` | `Command` seul ; laissée sans arbre | + +## Limites constatées + +- **Requêtes de moins de 14 caractères mal découpées.** Ligne 38, la + recherche du deuxième `\r\n` reprend à la position `newlinepos+1` + calculée sur le tampon précédent. Pour une requête courte, elle saute le + vrai séparateur et finit par une erreur Lua. Les requêtes vides ou + simples (`name='EEG'`) sont pourtant courantes. +- **Début du XML perdu dans la réponse** : ligne 58, le tampon déjà avancé + est avancé une seconde fois (`buffer(newlinepos+1)`). +- `QueryID` de la requête garde le `\r\n` final ; colonnes Protocole et + Info laissées à UDP. +- Seul le port 16571 est enregistré, et une réponse n'est reconnue que si + son port source est 16571. Une réponse émise depuis un autre port (par + exemple par un serveur UDP unicast de liblsl) n'est pas décodée. +- Pas de capture réelle disponible ; données des flux (TCP 16572 et + suivants) non prises en charge. diff --git a/dissectors/lsl-discovery/src/lsl.lua b/dissectors/lsl-discovery/src/lsl.lua new file mode 100644 index 0000000..aacf242 --- /dev/null +++ b/dissectors/lsl-discovery/src/lsl.lua @@ -0,0 +1,62 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/sccn/liblsl (testing/lsl.lua), +-- commit 992635a9277bb7cc71b6516e7608182e5e2976f3 du 14/10/2026 (dernière modification du fichier : +-- commit b5fe3c7089ff16e64f83dbfeb9feabf0c325b955 du 13/10/2021). +-- Licence amont : MIT, LICENSE du dépôt (« Copyright (C) 2012 Christian A. Kothe ») — voir README.md et LICENSE. +-- Wireshark dissector for labstreamerlayer stream discovery packets +-- Place this file in $WIRESHARK_CONFIG_DIR/plugins/lsl.lua +-- (C) 2020 Tristan Stenner +do + local lsl_proto = Proto("lsldiscovery", "Labstreaminglayer Discovery") + -- source fields + local udp_src_f = Field.new("udp.srcport") + local udp_dst_f = Field.new("udp.dstport") + -- fields to be shown in the packet analysis pane + local cmd_F = ProtoField.string("lsl.cmd", "Command") + local dst_F = ProtoField.string("lsl.dst", "Destination") + local query_F = ProtoField.string("lsl.query", "QueryID", "QueryID") + local content_F = ProtoField.string("lsl.content", "Content", "Content") + local streaminfo_F = ProtoField.string("lsl.streaminfo", "Streaminfo", "Streaminfo") + local ansport_F = ProtoField.string('lsl.answerport', 'Answer port', 'Answer port') + + lsl_proto.fields = {cmd_F, dst_F, query_F, ansport_F, streaminfo_F, content_F} + + function lsl_proto.dissector(buffer, pinfo, tree) + if udp_dst_f().value == 16571 then + if buffer(0, 4):string()~='LSL:' then + return + end + local subtree = tree:add(lsl_proto, buffer) + + local data = buffer():string() + local newlinepos = data:find('\r\n') + if newlinepos == nil then + return + end + subtree:add(cmd_F, buffer(0, newlinepos-1)) + buffer = buffer(newlinepos + 1) + newlinepos = buffer():string():find('\r\n', newlinepos+1, true) + if newlinepos == nil then + return + end + subtree:add(content_F, buffer(0, newlinepos-1)) + buffer = buffer(newlinepos + 1) + local wspos = buffer():string():find(' ') + subtree:add(ansport_F, buffer(0, wspos-1)) + subtree:add(query_F, buffer(wspos)) + elseif udp_src_f().value == 16571 then + local subtree = tree:add(lsl_proto, buffer) + subtree:add(cmd_F, 'shortinfo reply') + + local data = buffer():string() + local newlinepos = data:find('\r\n') + if newlinepos == nil then + return + end + subtree:add(query_F, buffer(0, newlinepos-1)) + buffer = buffer(newlinepos + 1) + subtree:add(streaminfo_F, buffer(newlinepos+1)) + end + end + DissectorTable.get('udp.port'):add(16571, lsl_proto) +end diff --git a/dissectors/lwm2m-tlv-burger/LICENSE b/dissectors/lwm2m-tlv-burger/LICENSE new file mode 100644 index 0000000..8cdb845 --- /dev/null +++ b/dissectors/lwm2m-tlv-burger/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. + + {description} + Copyright (C) {year} {fullname} + + 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. + +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) year 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. + + {signature of Ty Coon}, 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 Lesser General +Public License instead of this License. + diff --git a/dissectors/lwm2m-tlv-burger/Lwm2mTlvDissector.lua b/dissectors/lwm2m-tlv-burger/Lwm2mTlvDissector.lua new file mode 100644 index 0000000..9b1cfaa --- /dev/null +++ b/dissectors/lwm2m-tlv-burger/Lwm2mTlvDissector.lua @@ -0,0 +1,158 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/cburger-scheidlin/Lwm2mTlvDissector (Lwm2mTlvDissector.lua), +-- commit d5fe61715c582ea273ae5a76b3b30df8fb7a8a9f du 08/02/2016. +-- Licence amont : GPL-2.0-only (LICENSE amont) — voir README.md. +-- Dissector for the TLV format specified in LWM2M +-- Copyright (C) 2015 Christoph Burger-Scheidlin +-- +-- 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 +-- +-- 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. + +p_tlv = Proto("tlv", "LWM2M TLV") + +coap_payload_f = Field.new("coap.payload") +coap_payload_desc_f = Field.new("coap.opt.ctype") + +local identifiers = { + [0x00] = "Object Instance", + [0x01] = "Resource Instance", + [0x02] = "Multiple Resources", + [0x03] = "Resource with value", +} + +local length_identifier = { + [0x00] = "1 byte identifier", + [0x01] = "2 bytes identifier", +} + +local length_type = { + [0x00] = "No length field", + [0x01] = "1 byte length field", + [0x02] = "2 bytes length field", + [0x03] = "3 bytes length field", +} + +f_tlv_type_type = ProtoField.uint8("tlv.type.type", "Type of Identifier", base.DEC, identifiers, 0xC0) +f_tlv_type_length_of_identifier = ProtoField.uint8("tlv.type.loi", "Length of Identifier", base.DEC, length_identifier, 0x20) +f_tlv_type_length_of_length = ProtoField.uint8("tlv.type.lol", "Length of Length", base.DEC, length_type, 0x18) +f_tlv_type_length = ProtoField.uint8("tlv.type.length", "Length", base.DEC, nil, 0x07) +f_tlv_type_ignored = ProtoField.uint8("tlv.type.ignored", "Ignored", base.DEC, nil, 0x07) + +f_tlv_identifier = ProtoField.uint16("tlv.identifier", "Identifier", base.DEC) +f_tlv_length = ProtoField.uint32("tlv.length", "Length", base.DEC) +f_tlv_value = ProtoField.bytes("tlv.value", "Value") + +p_tlv.fields = { f_tlv_type_type, f_tlv_type_length_of_identifier, f_tlv_type_length_of_length, f_tlv_type_length, f_tlv_type_ignored, f_tlv_identifier, f_tlv_length, f_tlv_value } + +function addTlvHeader(buffer, element, length_of_identifier, length_of_length, length_of_value) + local header = element:add(buffer(0, 1+length_of_identifier+length_of_length), "TLV Header") + header:add(f_tlv_type_type, buffer(0,1)) + header:add(f_tlv_type_length_of_identifier, buffer(0,1)) + header:add(f_tlv_type_length_of_length, buffer(0,1)) + + if length_of_length == 0 then + header:add(f_tlv_type_length, buffer(0,1)) + else + header:add(f_tlv_type_ignored, buffer(0,1)) + end + + header:add(f_tlv_identifier, buffer(1, length_of_identifier)) + + if length_of_length > 0 then + header:add(f_tlv_length, buffer(1+length_of_identifier, length_of_length)) + else + header:add("Inline length of " .. tostring(length_of_value)) + end +end + +function addTlvElement(buffer, tree, length_of_identifier, length_of_length, length_of_value) + local elementId = buffer(0,1):bitfield(0,2) + local identifier = buffer(1,length_of_identifier):uint() + + local value = buffer(1+length_of_identifier+length_of_length, length_of_value) + if elementId == 0x03 or elementId == 0x01 then + local text = identifiers[elementId] + .. ", ID: " + .. tostring(identifier) + .. " (" + .. tostring(length_of_value) + .. " Bytes): " + .. tostring(value) + + local element = tree:add(buffer, text) + addTlvHeader(buffer, element, length_of_identifier, length_of_length, length_of_value) + element:add(f_tlv_value, value) + else + local text = identifiers[elementId] + .. ", ID: " + .. tostring(identifier) + .. " (" + .. tostring(length_of_value) + .. " Bytes)" + + local element = tree:add(buffer, text) + addTlvHeader(buffer, element, length_of_identifier, length_of_length, length_of_value) + + parseArrayOfElements(value, element) + end +end + +function parseTLV(buffer, tree) + local length_of_identifier = buffer(0,1):bitfield(2,1) + 1 + local length_of_length = buffer(0,1):bitfield(3,2) + local length_of_value = buffer(0,1):bitfield(5,3) + + if length_of_length > 0 then + length_of_value = buffer(1+length_of_identifier, length_of_length):uint() + end + + local totalLength = 1 + length_of_identifier + length_of_length + length_of_value; + addTlvElement(buffer(0,totalLength), tree, length_of_identifier, length_of_length, length_of_value) + + return totalLength +end + +function parseArrayOfElements(buffer, tree) + local length = buffer:len() + local offset = 0 + + while length > 0 do + local parsed = parseTLV(buffer(offset, length), tree) + length = length - parsed + offset = offset + parsed + end +end + +-- function p_tlv.dissector(buffer, pinfo, tree) +-- local coap_payload = coap_payload_f() +-- local coap_payload_description = coap_payload_desc_f() +-- if coap_payload and coap_payload_description and coap_payload_description.range:uint() == 1542 then +-- local offset = coap_payload.range:offset() +-- local length = coap_payload.range:len() +-- local tlvtree = tree:add(p_tlv, buffer(offset)) +-- +-- parseArrayOfElements(buffer(offset, length), tlvtree) +-- end +-- end + +--register_postdissector(p_tlv) + +function p_tlv.dissector(buffer, pinfo, tree) + local tlvtree = tree:add(p_tlv, buffer) + parseArrayOfElements(buffer, tlvtree) +end + +do + local media_type_table = DissectorTable.get("media_type") + media_type_table:add("Unknown Type 1542", p_tlv) +end \ No newline at end of file diff --git a/dissectors/lwm2m-tlv-burger/README.md b/dissectors/lwm2m-tlv-burger/README.md new file mode 100644 index 0000000..46201a9 --- /dev/null +++ b/dissectors/lwm2m-tlv-burger/README.md @@ -0,0 +1,48 @@ +# LwM2M TLV — format TLV d'OMA Lightweight M2M (Burger-Scheidlin) + +Dissecteur Wireshark Lua du **format TLV d'OMA LwM2M**, transporté dans +les charges CoAP des objets connectés : pour chaque élément, type +(instance d'objet, instance de ressource, ressources multiples, ressource +avec valeur), taille de l'identifiant et de la longueur, identifiant, +longueur et valeur, avec décodage récursif des éléments imbriqués. Le +script s'enregistre dans la table `media_type` pour le type de contenu +CoAP numérique 1542 (« Unknown Type 1542 »). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/cburger-scheidlin/Lwm2mTlvDissector | +| Commit importé | `d5fe61715c582ea273ae5a76b3b30df8fb7a8a9f` du 08/02/2016 (branche `master`, dernier commit ; dernière modification du script Lua : `c7426ef` du 20/12/2015) | +| Licence amont | GPL-2.0-only (`LICENSE` GPL v2 ; en-tête du fichier : « either version 2 of the License », sans clause « or any later version », © 2015 Christoph Burger-Scheidlin) | +| Natif Wireshark 4.6.4 | **Oui** — dissecteur natif `lwm2mtlv` (`packet-lwm2mtlv.c`), appelé par CoAP pour `application/vnd.oma.lwm2m+tlv` (11542), avec noms des objets et ressources OMA ; ce script est à considérer comme obsolète ou pédagogique | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `Lwm2mTlvDissector.lua` | Protocole `tlv` (« LWM2M TLV ») sur le type de contenu CoAP 1542 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le plugin C du même dépôt (`src/`, CMake) +n'est pas importé. + +## Utilisation + +Copier `Lwm2mTlvDissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `tlv`. + +## Remarques + +- Le numéro 1542 est celui des brouillons LwM2M de 2015 ; la valeur + normalisée est 11542, déjà prise en charge par le dissecteur natif. Le + script ne s'appliquera donc qu'à d'anciennes captures, ou après + adaptation locale du type de contenu. +- Autre import du même format : `dissectors/lwm2m-tlv-tanganelli/`. +- Nom de protocole court `tlv` et fonctions globales (`parseTLV`…) comme + dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/lwm2m-tlv-tanganelli/LICENSE b/dissectors/lwm2m-tlv-tanganelli/LICENSE new file mode 100644 index 0000000..8cdb845 --- /dev/null +++ b/dissectors/lwm2m-tlv-tanganelli/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. + + {description} + Copyright (C) {year} {fullname} + + 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. + +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) year 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. + + {signature of Ty Coon}, 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 Lesser General +Public License instead of this License. + diff --git a/dissectors/lwm2m-tlv-tanganelli/README.md b/dissectors/lwm2m-tlv-tanganelli/README.md new file mode 100644 index 0000000..a74edc3 --- /dev/null +++ b/dissectors/lwm2m-tlv-tanganelli/README.md @@ -0,0 +1,52 @@ +# LwM2M TLV (dissecteur Lua historique) + +Dissecteur Wireshark Lua **historique** (2015) de l'**encodage TLV de +LwM2M** (OMA Lightweight M2M, gestion d'objets connectés au-dessus de +CoAP) : il se substitue au dissecteur du port UDP 5683, appelle le +dissecteur CoAP d'origine, puis décode la charge en suite de TLV — type +(instance d'objet, instance de ressource, ressources multiples, ressource +avec valeur), longueur de l'identifiant, type de longueur, longueur et +valeur. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Tanganelli/wireshark-lwm2m (fichier `lwm2m.lua`) | +| Commit importé | `90dc5748aee8fb7abdd071595a5ba808abf1c470` du 29/12/2015 (branche `master`, dernier commit ; dernière modification du dissecteur : `7b3eabe` du 29/12/2015) | +| Licence amont | GPL-2.0-only (`LICENSE` amont : texte de la GPL v2, sans mention « or any later version » propre au projet ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | **Oui** — dissecteur natif `lwm2mtlv` (`packet-lwm2mtlv.c`), appelé par CoAP pour le type de contenu `application/vnd.oma.lwm2m+tlv`, avec noms des objets et ressources OMA ; ce script Lua est à considérer comme obsolète ou pédagogique | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `lwm2m.lua` | Protocole `lwm2m` (remplace le dissecteur UDP 5683, puis rappelle CoAP) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `lwm2m.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `lwm2m`. Dans la plupart des cas, le dissecteur natif +`lwm2mtlv` suffit (filtre `lwm2mtlv`). + +## Remarques + +- **`bit32` absent des Wireshark récents** : le décodage des octets de type + appelle `bit32.band` et `bit32.arshift`, bibliothèque de Lua 5.2 absente + par défaut de Lua 5.3 et 5.4, seules versions prises en charge depuis + Wireshark 4.4 (qui fournit `bit` à la place). Sans `bit32` global, la + dissection échoue dès le premier paquet CoAP avec charge (« attempt to + index a nil value (global 'bit32') ») ; contournement local : ajouter + `bit32 = bit` en tête du fichier (code amont non modifié ici) ; +- tente de décoder en TLV **toute** charge CoAP sur le port 5683, même au + format texte, JSON, CBOR… (erreur affichée dans l'arbre, CoAP restant + décodé — README amont) ; ne couvre pas CoAPS ni les autres ports ; +- variable globale `original_coap_dissector` comme dans l'amont ; +- pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/lwm2m-tlv-tanganelli/lwm2m.lua b/dissectors/lwm2m-tlv-tanganelli/lwm2m.lua new file mode 100644 index 0000000..48be7a2 --- /dev/null +++ b/dissectors/lwm2m-tlv-tanganelli/lwm2m.lua @@ -0,0 +1,122 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/Tanganelli/wireshark-lwm2m (lwm2m.lua), +-- commit 90dc5748aee8fb7abdd071595a5ba808abf1c470 du 29/12/2015. +-- Licence amont : GPL-2.0-only (LICENSE amont) — voir README.md. +do + local lwm2m_proto = Proto("lwm2m", "LWM2M TLV decoding"); + + local F_payload = ProtoField.bytes("lwm2m.payload", "Encoded TLV") + local F_type = ProtoField.uint8("lwm2m.type", "Type") + local F_lidentifier = ProtoField.uint8("lwm2m.lidentifier", "Identifier Length") + local F_tlength = ProtoField.uint8("lwm2m.tlengthr", "Type of Length") + local F_identifier = ProtoField.uint16("lwm2m.identifier", "Identifier") + local F_length = ProtoField.uint32("lwm2m.length", "Length") + local F_value = ProtoField.bytes("lwm2m.value", "Value") + local F_tlv = ProtoField.bytes("lwm2m.tlv", "TLV") + + + lwm2m_proto.fields = {F_payload} + + local f_payload = Field.new("coap.payload") + local original_coap_dissector + + function lwm2m_proto.dissector(tvbuffer, pinfo, treeitem) + + original_coap_dissector:call(tvbuffer, pinfo, treeitem) + if f_payload() then + start = 0 + buf_len = tvbuffer:len() - 1 + for i=0, buf_len do -- find the payload + byte = tvbuffer (i, 1):uint() + if byte == 255 then + start = i + 1 + i = buf_len + end + end + + local subtreeitem = treeitem:add(lwm2m_proto, tvbuffer(start)) + local lwm2mtreeitem = subtreeitem:add(F_payload, tvbuffer(start)) + local i = start + while i< buf_len do + byte = tvbuffer (i, 1):uint() + i = i + 1 + tlvtype = bit32.band(byte, 0xc0) + tlvtype = bit32.arshift(byte, 6) + tlvtype_start = i - 1 + tlvtype_string = "" + if tlvtype == 0 then + tlvtype_string ="Object Instance TLV" + end + if tlvtype == 1 then + tlvtype_string ="Resource Instance TLV" + end + if tlvtype == 2 then + tlvtype_string ="Multiple Resource TLV" + end + if tlvtype == 3 then + tlvtype_string ="Resource with value TLV" + end + l_identifier = bit32.band(byte, 0x20) + l_identifier = bit32.arshift(l_identifier, 5) + l_identifier_start = i - 1 + + t_length = bit32.band(byte, 0x18) + t_length = bit32.arshift(t_length, 3) + t_length_start = i - 1 + + if t_length == 0 then + v_length = bit32.band(byte, 0x07) + v_length_start = i - 1 + v_length_buf_len = 1 + end + + if l_identifier == 0 then + identifier = tvbuffer (i, 1):uint() + i = i + 1 + identifier_start = i - 1 + identifier_buf_len = 1 + end + if l_identifier == 1 then + identifier = tvbuffer (i, 2):uint() + i = i + 2 + identifier_start = i - 2 + identifier_buf_len = 2 + end + + if t_length == 1 then + v_length = tvbuffer (i, 1):uint() + i = i + 1 + v_length_start = i - 1 + v_length_buf_len = 1 + end + if t_length == 2 then + v_length = tvbuffer (i, 2):uint() + i = i + 2 + v_length_start = i - 2 + v_length_buf_len = 2 + end + if t_length == 3 then + v_length = tvbuffer (i, 3):uint() + i = i + 3 + v_length_start = i - 3 + v_length_buf_len = 3 + end + value = tvbuffer (i, v_length) + i = i + v_length + + tlv_str = tlvtype_string.." - Identifier: " + local tlv = lwm2mtreeitem:add(F_tlv, tvbuffer:range(tlvtype_start, i-tlvtype_start), identifier):set_text(tlv_str..identifier) + + tlv:add(F_type, tvbuffer:range(tlvtype_start, 1), tlvtype):set_text(tlvtype_string..": "..tlvtype) + tlv:add(F_lidentifier, tvbuffer:range(l_identifier_start, 1), l_identifier):set_text("Identifier length: "..l_identifier) + tlv:add(F_tlength, tvbuffer:range(t_length_start, 1), t_length):set_text("Type of length: "..t_length) + tlv:add(F_length, tvbuffer:range(v_length_start, v_length_buf_len), v_length):set_text("Value Length: "..v_length) + tlv:add(F_value, tvbuffer:range(i-v_length, v_length), value):set_text("Value: "..value) + + end -- end while + end -- end if payload + end -- end dissector + local udp_dissector_table = DissectorTable.get("udp.port") + original_coap_dissector = udp_dissector_table:get_dissector(5683) + udp_dissector_table:add(5683, lwm2m_proto) +end diff --git a/dissectors/mavlink-tlog-shancock884/LICENSE b/dissectors/mavlink-tlog-shancock884/LICENSE new file mode 100644 index 0000000..0252185 --- /dev/null +++ b/dissectors/mavlink-tlog-shancock884/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Simon Hancock + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/mavlink-tlog-shancock884/README.md b/dissectors/mavlink-tlog-shancock884/README.md new file mode 100644 index 0000000..ea90978 --- /dev/null +++ b/dissectors/mavlink-tlog-shancock884/README.md @@ -0,0 +1,85 @@ +# MAVLink TLOG — lecteur de journaux de télémétrie (shancock884) + +Lecteur de fichiers Wireshark en Lua pour les journaux de télémétrie +MAVLink au format TLOG. Ces fichiers sont enregistrés par MAVProxy, +Mission Planner et d'autres stations sol ; ils contiennent les messages +MAVLink échangés avec le véhicule (drone, rover, bateau). Chaque message +complet (en-tête, somme de contrôle, signature éventuelle) y est précédé +d'un horodatage Unix de 8 octets en microsecondes. Ce script n'est pas +un dissecteur : il permet d'ouvrir un `.tlog` dans Wireshark, et le +décodage des messages est confié au plugin Lua MAVLink officiel +(issue #547). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/shancock884/wireshark-tlog-reader (`mavlink-tlog-reader.lua`) | +| Commit importé | `0e6b96610de9f6c547a04e8e70d216b490aca301` du 16/09/2025 (dernier commit de la branche par défaut) ; dernière modification du script : commit `fd0ddd3e53903f979ae6fdaedaaa86822c762acb` du 16/09/2025 | +| Licence amont | MIT (`LICENSE` amont, © 2025 Simon Hancock) ; le script ne porte que le nom de l'auteur, sans mention de licence. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun lecteur TLOG parmi les formats de fichiers, et aucun dissecteur MAVLink dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/mavlink-tlog-reader.lua` | Lecteur de fichiers `FileHandler` « Mavlink Telemetry log file reader », nom court `tlog` (ligne 287), extension `tlog` (ligne 295), inscrit ligne 298. Reconnaissance du fichier par `read_open` (ligne 90) ; lecture de chaque enregistrement par `read_common` (ligne 202). Les paquets sont livrés en encapsulation `USER0` (ligne 119) | + +## Utilisation + +1. Copier `src/mavlink-tlog-reader.lua` dans le dossier des plugins Lua + personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »). +2. Pour décoder les messages, générer le plugin MAVLink officiel avec + pymavlink (voir https://mavlink.io/en/guide/wireshark.html) et le + copier dans le même dossier, par exemple : + `python -m pymavlink.tools.mavgen --lang=WLua --wire-protocol=2.0 --output=mavlink_2_common.lua message_definitions/v1.0/common.xml`. +3. Ouvrir le `.tlog` par « Fichier › Ouvrir » (choisir « Tous les + fichiers », le filtre par défaut ne montre pas `.tlog`), ou + `tshark -r vol.tlog`. + +Sans le plugin MAVLink, les paquets s'affichent « Packet », avec +l'avertissement « User encapsulation not handled: DLT=147 ». + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. Le +dépôt amont ne contient aucun fichier TLOG. Essais sur des journaux +synthétiques construits avec pymavlink 2.4.50 (messages MAVLink 1 et 2, +dont un signé), non commités. Le décodage utilise un plugin MAVLink +généré par `mavgen` depuis `common.xml` (mavlink/mavlink, commit +`6bf60db` du 29/10/2026), également non commité : + +| Essai | Résultat | +|---|---| +| TLOG de 5 messages : HEARTBEAT v2, ATTITUDE, HEARTBEAT v1, SYS_STATUS signé, GPS_RAW_INT | 5 trames de 21, 40, 17, 56 et 42 octets ; horodatages exacts à la microseconde (14:13:20.000000Z, puis +0,250123 s par message) | +| Même fichier avec le plugin MAVLink | « MAVLink 2.0 HEARTBEAT », « ATTITUDE », « MAVLink 1.0 HEARTBEAT », « SYS_STATUS » avec sa signature (« Link id: 1 »), « GPS_RAW_INT » (lat 48.8156000 deg, lon 7.7905000 deg, 12 satellites) ; filtre `mavlink_proto.msgid == 0` : 2 trames | +| Sans le plugin MAVLink | encapsulation « USER 0 (45) », « User encapsulation not handled: DLT=147 » | +| Deuxième enregistrement avec un octet magique faux | lecture arrêtée après la première trame, sans erreur ; message « Lua: Unrecognised Mavlink magic byte 85 » sur la sortie | +| Dernier enregistrement tronqué | lecture arrêtée après la première trame ; message « Lua: read : read_common: failed to read data from file into buffer » | +| Fichier quelconque dont le 9ᵉ octet vaut `0xFD` | pris pour un TLOG, aucune trame lue | +| Capture pcap ordinaire, plugin chargé | ouverte normalement par le lecteur pcap | + +## Limites constatées + +- Le script ne décode rien lui-même : il faut aussi le plugin MAVLink + généré par pymavlink, qui n'est pas inclus ici. +- Le débogage est actif (`DEBUG = debug.LEVEL_1`, ligne 26) : les + erreurs de lecture s'impriment sur la sortie standard (« Lua: … ») + au lieu d'être signalées par Wireshark. Une erreur au milieu du + fichier arrête la lecture sans autre avertissement. +- La reconnaissance ne vérifie qu'un octet (le 9ᵉ, `0xFD` ou `0xFE`, + lignes 100 à 109) : tout fichier qui a cet octet à cette place est + revendiqué. Le lecteur s'inscrit comme heuristique faible, après les + formats à signature (pcap, pcapng…). +- Pas d'écriture : `tshark -F tlog` n'est pas pris en charge (lecteur + seulement, option `"r"` ligne 287). La description du lecteur parle + par erreur de « Ardupilot DF log file » (ligne 287). +- Les constantes `MAVLINK1_*` et `MAVLINK2_*` (lignes 74 à 78) sont + des variables globales. Le contrôle de version de Wireshark (ligne 58) + ne concerne que les versions 1.x. diff --git a/dissectors/mavlink-tlog-shancock884/src/mavlink-tlog-reader.lua b/dissectors/mavlink-tlog-shancock884/src/mavlink-tlog-reader.lua new file mode 100644 index 0000000..ea7c68d --- /dev/null +++ b/dissectors/mavlink-tlog-shancock884/src/mavlink-tlog-reader.lua @@ -0,0 +1,300 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/shancock884/wireshark-tlog-reader (mavlink-tlog-reader.lua), +-- commit 0e6b96610de9f6c547a04e8e70d216b490aca301 du 16/09/2025 (dernière modification du fichier : +-- commit fd0ddd3e53903f979ae6fdaedaaa86822c762acb du 16/09/2025). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- mavlink-tlog-reader.lua +-------------------------------------------------------------------------------- +--[[ + This is a Wireshark file reader for Mavlink Telemetry Log (tlog) files. + Author: Simon Hancock +--]] +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +-- set up debugging level +-------------------------------------------------------------------------------- + +local debug = { + DISABLED = 0, + LEVEL_1 = 1, + LEVEL_2 = 2 +} + +-- set this DEBUG to debug.LEVEL_1 to enable printing debug info +-- set it to debug.LEVEL_2 to enable really verbose printing +local DEBUG = debug.LEVEL_1 + + +local dprint = function() end +local dprint2 = function() end +local function reset_debug() + if DEBUG > debug.DISABLED then + dprint = function(...) + print(table.concat({"Lua:", ...}," ")) + end + + if DEBUG > debug.LEVEL_1 then + dprint2 = dprint + end + end +end +-- call it now +reset_debug() + +-------------------------------------------------------------------------------- +-- check for compatability with this version of Wireshark +-------------------------------------------------------------------------------- + +-- Set the name of Wireshark or Tshark application, for use in error +-- messages +local wireshark_name = "Wireshark" +if not GUI_ENABLED then + wireshark_name = "Tshark" +end + +-- verify Wireshark is new enough +local major, minor, micro = get_version():match("(%d+)%.(%d+)%.(%d+)") +if major and tonumber(major) <= 1 and ((tonumber(minor) <= 10) or (tonumber(minor) == 11 and tonumber(micro) < 3)) then + error( "Sorry, but your " .. wireshark_name .. " version (" .. get_version() .. ") is too old for this script!\n" .. + "This script needs " .. wireshark_name .. "version 1.11.3 or higher.\n" ) +end + +-- verify we have the FileHandler class in wireshark +assert(FileHandler.new, wireshark_name .. " does not have the FileHandler class!") + +-------------------------------------------------------------------------------- +-- definitions +-------------------------------------------------------------------------------- + +-- declare name of functions we'll define later +local read_common + +-- handy consts +MAVLINK1_MAGIC_BYTE = 0xfe +MAVLINK1_FRAME_OVERHEAD = 8 +MAVLINK2_MAGIC_BYTE = 0xfd +MAVLINK2_FRAME_OVERHEAD = 12 +MAVLINK2_SIGNATURE_LEN = 13 + +-------------------------------------------------------------------------------- +-- file reader handling functions for Wireshark to use +-------------------------------------------------------------------------------- + +---------------------------------------- +-- The read_open() is called by Wireshark once per file, to see if the file is this reader's type. +-- Wireshark passes in (1) a File object and (2) CaptureInfo object to this function +-- It expects in return either nil or false to mean it's not our file type, or true if it is +-- We do a quick check of the file to make sure that a Mavlink magic byte exists at location 9 - +-- i.e. directly after the 8-byte timestamp. +local function read_open(file, capture) + dprint2("read_open() called") + + -- read 9 bytes from the start of the file + local line = file:read(9) + + -- if we couldn't read these bytes, return false + if not line then return false end + + -- unpack into 8 byte timestamp and 1 byte Mavlink magic byte + local fields = { Struct.unpack(">E I1", line) } + + -- check we got what we expected (note that #fields is the number of returned fields PLUS ONE) + if #fields ~= 3 then + dprint2("Incorrect number of fields fields returned: " .. #fields) + return false + elseif fields[2] ~= MAVLINK2_MAGIC_BYTE and fields[2] ~= MAVLINK1_MAGIC_BYTE then + dprint2("No Mavlink magic byte " .. fields[1]) + return false + end + + dprint2("read_open: success, file is for us") + + -- if the file is for us, we MUST set the file position cursor to + -- where we want the first call to read() function to get it the next time + file:seek("set",0) + + -- these we can also set per record later during read operations + capture.time_precision = wtap_filetypes.TSPREC_USEC + capture.encap = wtap_encaps.USER0 -- we use USER0 for Mavlink + + return true +end + +---------------------------------------- +-- Wireshark/tshark calls read() for each frame/record in the file +-- It passes in (1) a File, (2) CaptureInfo, and (3) FrameInfo object to this function +-- It expects in return the file offset position the record starts at, +-- or nil/false if there's an error or end-of-file is reached. +-- The offset position is used later: wireshark remembers it and gives +-- it to seek_read() at various random times +local function read(file, capture, frame) + dprint2("read() called") + + -- remember where we are in the file + local position = file:seek() + + -- call our common reader function + if not read_common("read", file, capture, frame) then + -- this isnt' actually an error, because it might just mean we reached end-of-file + -- so let's test for that (read(0) is a special case in Lua, see Lua docs) + if file:read(0) ~= nil then + dprint("read: failed to call read_common") + else + dprint2("read: reached end of file") + end + return false + end + + dprint2("read: success") + + -- return the position we got to (or nil if we hit EOF/error) + return position +end + +---------------------------------------- +-- Wireshark/tshark calls seek_read() for each frame/record in the file, at random times +-- It passes in (1) a File, (2) CaptureInfo, (3) FrameInfo object, and the offset position number +-- It expects in return true for successful parsing, or nil/false if there's an error. +local function seek_read(file, capture, frame, offset) + dprint2("seek_read() called") + + -- first move to the right position in the file + file:seek("set",offset) + + -- call our common reader function + if not read_common("seek_read", file, capture, frame) then + dprint("seek_read: failed to call read_common") + return false + end + + return true +end + +---------------------------------------- +-- Wireshark/tshark calls read_close() when it's closing the file completely +-- It passes in (1) a File and (2) CaptureInfo object to this function +-- this is a good opportunity to clean up any state you may have created during +-- file reading. (in our case there's no real state) +local function read_close(file, capture) + dprint2("read_close() called") + return true +end + +---------------------------------------- +-- An often unused function, Wireshark calls this when the sequential walk-through is over +-- (i.e., no more calls to read(), only to seek_read()). +-- It passes in (1) a File and (2) CaptureInfo object to this function +-- This gives you a chance to clean up any state you used during read() calls, but remember +-- that there will be calls to seek_read() after this (in Wireshark, though not Tshark) +local function seq_read_close(file, capture) + dprint2("First pass of read() calls are over, but there may be seek_read() calls after this") + return true +end + +---------------------------------------- +-- internal functions declared previously +---------------------------------------- + +---------------------------------------- +-- this is used by both read() and seek_read() +-- the calling function to this should have already set the file position correctly +read_common = function(funcname, file, capture, frame) + dprint2(funcname,": read_common() called") + + -- remember where we are in the file, as we'll need to come back here + -- once we figure out the message length + local position = file:seek() + + -- read 11 bytes from the start of the record + local line = file:read(11) + + -- it's ok for us to not be able to read it, if it's end of file + if not line then return false end + + -- this is: time_usec (8 bytes), Mavlink magic byte, message length, incompat_flags + local fields = { Struct.unpack(">E I1 I1 I1", line) } + if #fields ~= 5 then -- #fields is number of returned fields PLUS ONE + dprint(funcname, ": read_common: incorrect number of fields returned: " .. #fields) + return false + end + + -- now move back to where we were, plus the 8 bytes of timestamp + file:seek('set', position + 8) + + -- set the timestamp of this frame + local ts = fields[1]:tonumber() + local sec = math.floor(ts / 1000000.0) + local usec = ((ts % 1000000) * 1000) + frame.time = NSTime(sec, usec) + + -- set the captured length and original length of this frame + -- (we add the Mavlink header length to the message length) + if fields[2] == MAVLINK2_MAGIC_BYTE then + if fields[4] & 0x01 ~= 0 then + frame.captured_length = fields[3] + MAVLINK2_FRAME_OVERHEAD + MAVLINK2_SIGNATURE_LEN + else + frame.captured_length = fields[3] + MAVLINK2_FRAME_OVERHEAD + end + elseif fields[2] == MAVLINK1_MAGIC_BYTE then + frame.captured_length = fields[3] + MAVLINK1_FRAME_OVERHEAD + else + dprint("Unrecognised Mavlink magic byte " .. fields[2]) + return false + end + frame.original_length = frame.captured_length + + -- set the flags to say we have a timestamp + frame.flags = wtap_presence_flags.TS + + -- now we need to get the packet bytes from the file record into the frame... + -- we *could* read them into a string using file:read(numbytes), and then + -- set them to frame.data so that wireshark gets it... + -- but that would mean the packet's string would be copied into Lua + -- and then sent right back into wireshark, which is gonna slow things + -- down; instead FrameInfo has a read_data() method, which makes + -- wireshark read directly from the file into the frame buffer, so we use that + if not frame:read_data(file, frame.captured_length) then + dprint(funcname, ": read_common: failed to read data from file into buffer") + return false + end + + return true +end + +-------------------------------------------------------------------------------- +-- register the FileHandler with Wireshark +-------------------------------------------------------------------------------- + +---------------------------------------- +-- ok, so let's create a FileHandler object +-- +-- note the last argument defines our file handler type (r=reader), and its magic/heuristic +-- capability - this is used to determine the ordering of this file reader compared with +-- the built-in file readers in wireshark. When a user opens a file, wireshark automatically +-- tries to find a matching file reader for the file. The file extensions are used as hints, +-- but really the ordering is more important. So wireshark first tries all the "magic" readers, +-- meaning ones that can figure out if a file is their format based on a magic byte sequence +-- at the beginning of the file, and then wireshark runs through the "heuristic" file readers, +-- meaning ones that have to guess if the file is their format or not. The ordering of these +-- is very important, since a weak heuristic will incorrectly think a file is its format and +-- prevent a lower-ordered file reader from getting to check it. So if your file reader uses +-- a magic value, you should use the "m" flag, and if it uses a heuristic then no flag means +-- a weak heuristic, whereas a "s" means a strong one. +-- +-- We consider our file format to have weak heuristic, as we rely only on byte 9 being a +-- Mavlink magic byte. +local fh = FileHandler.new("Mavlink Telemetry log file reader", "tlog", "A Lua-based file reader for Ardupilot DF log file","r") + +-- set above functions to the FileHandler +fh.read_open = read_open +fh.read = read +fh.seek_read = seek_read +fh.read_close = read_close +fh.seq_read_close = seq_read_close +fh.extensions = "tlog" -- this is just a hint + +-- and finally, register the FileHandler! +register_filehandler(fh) + +dprint2("Mavlink TLOG FileHandler registered") diff --git a/dissectors/melon-std/README.md b/dissectors/melon-std/README.md new file mode 100644 index 0000000..0dc3b6c --- /dev/null +++ b/dissectors/melon-std/README.md @@ -0,0 +1,56 @@ +# melon_std — protocole RPC standard de melon (dérivé de brpc) + +Dissecteur Wireshark Lua du **protocole RPC standard de melon** +(bibliothèque C++ de gottingen, dérivée d'Apache brpc) : en-tête de +12 octets (code magique `MRPC` ou `STRM`, taille du corps, taille des +métadonnées), réassemblage TCP, puis décodage des métadonnées +(`melon.policy.RpcMeta`, `melon.StreamFrameMeta`) et du corps des +requêtes / réponses par le dissecteur **Protobuf** natif de Wireshark, +avec association requête → méthode par `correlation_id`. Détection +heuristique sur TCP. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/gottingen/melon (fichier `tools/wireshark_melon_std.lua`) | +| Commit importé | `f416b6e9255935d6e09529d601dfad7a360740c0` du 26/06/2024 (branche `master`, dernier commit ; dernière modification du script : `253728d` du 24/04/2024) | +| Licence amont | Apache-2.0 d'après l'en-tête du fichier (« Licensed to the Apache Software Foundation (ASF)… Apache License, Version 2.0 ») — voir ci-dessous | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur brpc / melon natif (le décodage Protobuf est natif) | + +**Licence.** Le dépôt melon est sous AGPL v3 (fichier `LICENSE`), mais ce +script garde l'en-tête Apache-2.0 de la fondation Apache : c'est une +adaptation de `tools/wireshark_brpc_std.lua` d'Apache brpc (code magique +`PRPC` remplacé par `MRPC`, espaces de noms `brpc` → `melon`). L'en-tête, +propre au fichier, est retenu ; aucun fichier de licence n'est copié (le +`LICENSE` amont est l'AGPL), le texte Apache-2.0 est à +https://www.apache.org/licenses/LICENSE-2.0. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `wireshark_melon_std.lua` | Protocole `melon` (« melon_std »), heuristique TCP | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +1. Ajouter dans Wireshark (Préférences → Protocols → ProtoBuf → chemins de + recherche) le dossier `melon/proto` du dépôt melon, qui contient + `rpc/melon_rpc_meta.proto`, `rpc/streaming_rpc_meta.proto`, ainsi que + les `.proto` des services à décoder. +2. Copier `wireshark_melon_std.lua` dans le dossier `plugins` de Wireshark + (ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis + filtrer avec `melon`. + +## Remarques + +- Coquille amont dans l'heuristique (`maigc` au lieu de `magic`) : en + pratique seules les trames `MRPC` sont reconnues, pas `STRM`. +- Le script écrit des messages de débogage dans la console Lua à chaque + paquet (`LM_DBG`). +- Le décodage du corps dépend des fichiers `.proto` des services + (non fournis) ; sans eux, seules les métadonnées sont lisibles. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/melon-std/wireshark_melon_std.lua b/dissectors/melon-std/wireshark_melon_std.lua new file mode 100644 index 0000000..ee90c4e --- /dev/null +++ b/dissectors/melon-std/wireshark_melon_std.lua @@ -0,0 +1,283 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/gottingen/melon (tools/wireshark_melon_std.lua), +-- commit f416b6e9255935d6e09529d601dfad7a360740c0 du 26/06/2024. +-- Licence amont : Apache-2.0 (en-tête ASF du fichier ; LICENSE du dépôt : AGPL v3) — voir README.md. +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. +-- + +-------------------------------------------------------------------------------- +-- function +-- Proto.new(name, desc) +-- proto.dissector +-- proto.fields +-- proto.prefs +-- proto.prefs_changed +-- proto.init +-- proto.name +-- proto.description +-------------------------------------------------------------------------------- + +local plugin_info = { + name = "melon", + version = "0.1.0", + description = "melon_std" +} + +local major, minor, patch = get_version():match("(%d+)%.(%d+)%.(%d+)") +local version_code = tonumber(major) * 1000 * 1000 + tonumber(minor) * 1000 + tonumber(patch) + +local proto = Proto.new(plugin_info.name, plugin_info.description) + +local LM_DBG = function(fmt, ...) + if (tonumber(major) < 3) then + critical(table.concat({ plugin_info.name:upper() .. ":", fmt }, ' '):format(...)) + else + print (table.concat({ plugin_info.name:upper() .. ":", fmt }, ' '):format(...)) + end +end + +LM_DBG("Wireshark version =", get_version()) +LM_DBG("Lua version =", _VERSION) + +-------------------------------------------------------------------------------- + +local MAGIC_CODE_MRPC = "MRPC" +local MAGIC_CODE_STRM = "STRM" + +local PROTO_HEADER_LENGTH = 12 + + +local pf_magic = ProtoField.string(plugin_info.name .. ".magic", + "Magic Code", BASE_NONE) +local pf_body_size = ProtoField.uint32(plugin_info.name .. ".body_size", + "Body Size", BASE_DEC) +local pf_meta_size = ProtoField.uint32(plugin_info.name .. ".meta_size", + "Meta Size", BASE_DEC) + +-- used to customize tree item +local pf_any = ProtoField.bytes (plugin_info.name .. ".any", + "Any", BASE_NONE) + +proto.fields = { + pf_magic, + pf_body_size, + pf_meta_size, + pf_any +} + +---------------------------------------- +-- ref fields +local proto_f_magic_code = Field.new(plugin_info.name .. ".magic") +local proto_f_body_size = Field.new(plugin_info.name .. ".body_size") +local proto_f_meta_size = Field.new(plugin_info.name .. ".meta_size") + +local proto_f_protobuf_field_name = Field.new("protobuf.field.name") +local proto_f_protobuf_field_value = Field.new("protobuf.field.value") + +---------------------------------------- +-- protobuf dissector +-- Note: +-- options.proto, melon_rpc_meta.proto and streaming_rpc_meta.proto +-- should be put in Wireshark Protobuf Search Paths. +local protobuf_dissector = Dissector.get("protobuf") + +---------------------------------------- +-- declare functions + +local check_length = function() end +local dissect_proto = function() end + +---------------------------------------- +-- main dissector +function proto.dissector(tvbuf, pktinfo, root) + local pktlen = tvbuf:len() + + local bytes_consumed = 0 + + while bytes_consumed < pktlen do + local result = dissect_proto(tvbuf, pktinfo, root, bytes_consumed) + + if result > 0 then + bytes_consumed = bytes_consumed + result + elseif result == 0 then + -- hit an error + return 0 + else + pktinfo.desegment_offset = bytes_consumed + -- require more bytes + pktinfo.desegment_len = -result + + return pktlen + end + end + + return bytes_consumed +end + +-------------------------------------------------------------------------------- +-- heuristic +local function heur_dissect_proto(tvbuf, pktinfo, root) + LM_DBG("heur melon: pkg number: " .. pktinfo.number) + if (tvbuf:len() < PROTO_HEADER_LENGTH) then + LM_DBG("too short: pkg number: " .. pktinfo.number) + return false + end + + local magic = tvbuf:range(0, 4):string() + -- for range dissectors + if magic ~= MAGIC_CODE_MRPC and maigc ~= MAGIC_CODE_STRM then + LM_DBG("invalid magic code: pkg number: " .. pktinfo.number) + return false + end + + proto.dissector(tvbuf, pktinfo, root) + + pktinfo.conversation = proto + + return true +end +proto:register_heuristic("tcp", heur_dissect_proto) + +-------------------------------------------------------------------------------- + +local correlation_method_map = {} + +local store_method = function(correlation_id, method) + -- TODO: pop items + correlation_method_map[correlation_id] = method +end + +local load_method = function(correlation_id) + return correlation_method_map[correlation_id] +end + +-- check packet length, return length of packet if valid +check_length = function(tvbuf, offset) + local msglen = tvbuf:len() - offset + + if msglen ~= tvbuf:reported_length_remaining(offset) then + -- captured packets are being sliced/cut-off, so don't try to desegment/reassemble + LM_WARN("Captured packet was shorter than original, can't reassemble") + return 0 + end + + if msglen < PROTO_HEADER_LENGTH then + -- we need more bytes, so tell the main dissector function that we + -- didn't dissect anything, and we need an unknown number of more + -- bytes (which is what "DESEGMENT_ONE_MORE_SEGMENT" is used for) + return -DESEGMENT_ONE_MORE_SEGMENT + end + + -- if we got here, then we know we have enough bytes in the Tvb buffer + -- to at least figure out whether this is valid melon_std packet + + local magic = tvbuf:range(offset, 4):string() + if magic ~= MAGIC_CODE_MRPC and magic ~= MAGIC_CODE_STRM then + return 0 + end + + -- big endian + local packet_size = tvbuf:range(offset+4, 4):uint() + PROTO_HEADER_LENGTH + if msglen < packet_size then + LM_DBG("Need more bytes to desegment full melon_std packet") + return -(packet_size - msglen) + end + + return packet_size +end + +---------------------------------------- +dissect_proto = function(tvbuf, pktinfo, root, offset) + local len = check_length(tvbuf, offset) + if len <= 0 then + return len + end + + local tree = root:add(proto, tvbuf:range(offset, len)) + + tree:add(pf_magic, tvbuf:range(offset, 4)) + tree:add(pf_body_size, tvbuf:range(offset+4, 4)) + tree:add(pf_meta_size, tvbuf:range(offset+8, 4)) + + local meta_size = proto_f_meta_size().value + local body_size = proto_f_body_size().value + local tvb_meta = tvbuf:range(offset + PROTO_HEADER_LENGTH, meta_size):tvb() + if proto_f_magic_code().value == MAGIC_CODE_MRPC then + -- dissect rpc meta fields + pktinfo.private["pb_msg_type"] = "message,melon.policy.RpcMeta" + protobuf_dissector:call(tvb_meta, pktinfo, tree) + + local direction, method + + local service_name, method_name, correlation_id + + -- https://ask.wireshark.org/question/31800/protobuf-dissector-with-nested-structures/?answer=31924#post-id-31924 + local protobuf_field_names = { proto_f_protobuf_field_name() } + local protobuf_field_values = { proto_f_protobuf_field_value() } + for k, v in pairs(protobuf_field_names) do + if v.value == "request" then + direction = "request" + elseif v.value == "response" then + direction = "response" + elseif v.value == "service_name" then + service_name = protobuf_field_values[k].range:string(ENC_UTF8) + elseif v.value == "method_name" then + method_name = protobuf_field_values[k].range:string(ENC_UTF8) + elseif v.value == "correlation_id" then + correlation_id = protobuf_field_values[k].range:uint64() + end + end + + if direction == "request" then + method = service_name .. "/" .. method_name + -- NOTE: convert uint64 to string to be used as key of table + store_method(tostring(correlation_id), method) + elseif direction == "response" then + method = load_method(tostring(correlation_id)) + end + + if method ~= nil then + -- dissect rpc body + local tvb_body = tvbuf:range(offset + PROTO_HEADER_LENGTH + meta_size, body_size - meta_size):tvb() + pktinfo.private["pb_msg_type"] = "application/grpc,/" .. method .. "," .. direction + protobuf_dissector:call(tvb_body, pktinfo, tree) + end + elseif proto_f_magic_code().value == MAGIC_CODE_STRM then + -- dissect streaming meta fields + pktinfo.private["pb_msg_type"] = "message,melon.StreamFrameMeta" + protobuf_dissector:call(tvb_meta, pktinfo, tree) + end + + -- body fields are business related, customized here + + return len +end + +-------------------------------------------------------------------------------- +-- Editor modelines +-- +-- Local variables: +-- c-basic-offset: 4 +-- tab-width: 4 +-- indent-tab-mode: nil +-- End: +-- +-- kate: indent-width 4; tab-width 4; +-- vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab +-- :indentSize=4:tabSize=4:noTabs=true diff --git a/dissectors/meshtastic-exploiteers/LICENSE b/dissectors/meshtastic-exploiteers/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/meshtastic-exploiteers/README.md b/dissectors/meshtastic-exploiteers/README.md new file mode 100644 index 0000000..0facefc --- /dev/null +++ b/dissectors/meshtastic-exploiteers/README.md @@ -0,0 +1,111 @@ +# Meshtastic sur LoRa — dissecteur d'Exploitee.rs (Hacker Pager) + +Dissecteur Wireshark Lua des trames radio LoRa du réseau maillé +Meshtastic, publié par Exploitee.rs pour lire les captures de son +« Hacker Pager ». Il se branche sur le dissecteur LoRaTap natif (mot de +synchronisation 0x2b) et décode l'en-tête Meshtastic (destination, +émetteur, identifiant, sauts, accusé de réception, MQTT, empreinte du +canal). Il déchiffre ensuite la charge utile en AES-CTR avec la clé du +canal (préférence) et la confie au dissecteur protobuf de Wireshark +(`meshtastic.Data`, puis le message selon le `portnum` : texte, +`User`, position, télémétrie, routage…). Il signale aussi les doublons +et ajoute aux colonnes Source et Destination les noms des nœuds appris +dans les messages NODEINFO (issue #943). + +Ce dossier est distinct de `dissectors/meshtastic-talk/` et de +`dissectors/meshtastic-stridetastic/` : autre auteur, et ce script lit +les trames radio chiffrées (LoRaTap), pas des messages protobuf déjà +déchiffrés. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/exploiteers/Exploiteers-Wireshark-LoRa (dossier `meshtastic/`) | +| Commit importé | `ad985742a2a5893fa9753b780b86d365dce0beb0` du 08/10/2025 (dernier commit de la branche par défaut `main`, « Initial release ») ; tous les fichiers importés datent de ce commit | +| Licence amont | GPL-3.0-only : `LICENSE` du dépôt (texte de la GPLv3, sans mention « or later »). Bibliothèque `aeslua` (© 2006-2007 Matthias Hilbig) : LGPL-2.1-or-later d'après `aeslua/Copyright.txt` ; le fichier `aeslua/License.txt` qui l'accompagne contient pourtant le texte de la GPLv3. Fichiers `.proto` : ceux du projet Meshtastic (GPL-3.0), `google/protobuf/descriptor.proto` (BSD-3-Clause, © Google) et `nanopb.proto` (zlib, nanopb), sans en-tête de licence pour la plupart. Tout est compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : LoRaTap est natif, mais aucun dissecteur Meshtastic dans `tshark -G protocols` | + +Texte de la licence : fichier `LICENSE` de ce dossier (copie conforme +du `LICENSE` amont) ; les fichiers `Copyright.txt` et `License.txt` +d'aeslua restent à leur place dans `src/meshtastic/aeslua/`. Le dossier +`meshtastic/` amont est repris tel quel (aucune modification ; fins de +ligne CRLF de `meshtastic.lua` conservées) ; seule l'en-tête de +provenance de cinq lignes est ajoutée en tête de chaque fichier `.lua` +(convention du dépôt, issue #563). Les fichiers `.proto` et `colorrules` +ne sont pas modifiés. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/meshtastic/meshtastic.lua` | Chargement d'aeslua (ligne 28) ; clé du canal (ligne 35) et vecteur d'initialisation (ligne 73) ; protocole `meshtastic` (« Meshtastic », ligne 84) et préférence de clé (ligne 85, `AQ==` par défaut) ; sous-protocole de charge utile (ligne 136) ; post-dissecteur des noms (lignes 150 et 161) ; dissecteur ligne 170 (déchiffrement ligne 238) ; inscription sur `loratap.syncword` 0x2b (ligne 263) ; décodage par `portnum` (ligne 272) ; inscription sur `protobuf_field` `meshtastic.Data.payload` (ligne 334) | +| `src/meshtastic/aeslua/*.lua` | Bibliothèque AES en Lua pur (aeslua), appelée par `require("meshtastic.aeslua.…")` | +| `src/meshtastic/protobufs/` | Fichiers `.proto` de Meshtastic (21 fichiers dans `meshtastic/`, dont `exploiteers_pager.proto`, propre au Hacker Pager), `nanopb.proto` et `google/protobuf/descriptor.proto` | +| `src/meshtastic/colorrules` | Règle de couleur « Duplicate packets » (`meshtastic.duplicate`) | + +## Utilisation + +1. Copier le dossier `src/meshtastic/` entier dans le dossier des + plugins Lua personnels (`~/.local/lib/wireshark/plugins/meshtastic/`) : + le nom du dossier doit rester `meshtastic`, sinon les `require` + échouent. Le script ne peut pas être chargé seul par + `-X lua_script:` (« module 'meshtastic.aeslua.ciphermode' not + found »). +2. Préférences → Protocols → ProtoBuf : cocher « Load .proto files on + startup » et « Dissect protobuf fields as Wireshark fields » + (`protobuf.preload_protos`, `protobuf.pbf_as_hf`), puis ajouter + `plugins/meshtastic/protobufs/` aux « Protobuf search paths » avec + « Load all files ». +3. Préférences → Protocols → Meshtastic : clé du canal principal en + base64 (`AQ==` pour le canal par défaut LongFast). + +Filtres : `meshtastic`, `meshtastic.from`, `meshtastic.to`, +`meshtastic.id`, `meshtastic.payload.portnum`, `meshtastic.payload.text`, +`meshtastic.duplicate`, et les champs protobuf `pbf.meshtastic.*`. + +## Vérification à l'import + +`luac5.4 -p` : OK pour les six fichiers `.lua`. tshark 4.6.4, dossier +copié dans le dossier des plugins : chargement sans erreur. Le dépôt +amont ne contient aucune capture. Essais sur une capture synthétique +non commitée (LoRaTap v0, DLT 270, mot de synchronisation 0x2b), +charges utiles chiffrées en AES-128-CTR avec la clé par défaut, comme +le micrologiciel Meshtastic : + +| Essai | Résultat | +|---|---| +| Texte en diffusion | « 0x11223344 → 0xffffffff (broadcast) », « Text message: "Bonjour Haguenau" » | +| NODEINFO (`User`, nom long « Station Test Haguenau ») | « 0x11223344 is "Station Test Haguenau" » ; les trames suivantes de ce nœud affichent « 0x11223344 (Station Test Haguenau) » | +| Texte direct de 66 caractères (plusieurs blocs AES) | Déchiffré en entier | +| Même identifiant de paquet qu'une trame précédente | Note « Duplicate of an earlier packet » ; filtre `meshtastic.duplicate` : 1 trame | +| Octets non chiffrés quelconques | « Malformed meshtastic.Data protobuf » | +| Position et télémétrie | « latitude_i=487000000 longitude_i=78000000 », « time=1793612187 » | +| Clé `Ag==` au lieu de `AQ==` | Toutes les trames chiffrées : « Malformed meshtastic.Data protobuf » | +| Sans les réglages protobuf de l'étape 2 | Toutes les trames : « Malformed meshtastic.Data protobuf » | +| NODEINFO sans nom long | Erreur Lua « attempt to index a nil value » (ligne 282) | + +## Limites constatées + +- Les trois réglages protobuf de l'étape 2 sont indispensables : sans + eux, aucune trame n'est décodée. +- Un message NODEINFO sans nom long provoque une erreur Lua (ligne + 282 : `f_proto_meshtastic_User_long_name()` vaut `nil`). +- Les noms des nœuds ne sont connus qu'après leur message NODEINFO : les + trames antérieures n'en ont pas, même en deux passes (`-2`), car la + table est vidée à chaque passe (lignes 164 à 167). +- Seule la clé du canal principal est utilisée ; les messages directs + chiffrés par PKI (Meshtastic 2.5 et plus) ne sont pas déchiffrés. +- Le protocole s'appelle `meshtastic` (ligne 84), comme dans + `meshtastic-talk` et `meshtastic-stridetastic` : un seul des trois + scripts peut être chargé à la fois. +- Le script déclare un champ `eth.fcs.status` (ligne 132), déjà utilisé + par le dissecteur Ethernet, pour profiter de ses règles de couleur ; + et une fonction globale `call_protobuf` (ligne 266). +- La colonne Info des messages NODEINFO reçoit des ajouts du dissecteur + protobuf malgré `fence()` (remarque de l'auteur, ligne 283). +- Les fichiers `.proto` sont une copie figée (2025) de ceux de + Meshtastic ; les messages ajoutés depuis n'y sont pas. +- Les `portnum` 7 (texte compressé unishox2), 9 (audio codec2), 64, 68 + et 257 ne sont pas décodés ; le 33 (tunnel IP) n'a pas été essayé + (« TODO: Untested », ligne 304). diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/Copyright.txt b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/Copyright.txt new file mode 100644 index 0000000..a4f56d0 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/Copyright.txt @@ -0,0 +1,25 @@ +aeslua: Lua AES implementation +Copyright (c) 2006,2007 Matthias Hilbig + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU Lesser Public License as published by the +Free Software Foundation; either version 2.1 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 +Lesser Public License for more details. + +A copy of the terms and conditions of the license can be found in +License.txt or online at + + http://www.gnu.org/copyleft/lesser.html + +To obtain a copy, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +Author +------- +Matthias Hilbig +mhilbig@gmail.com diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/License.txt b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/License.txt new file mode 100644 index 0000000..6063a46 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/License.txt @@ -0,0 +1,450 @@ +---------------------------------------------------------------------- +The aeslua (all versions) is provided under the terms and +conditions of the GNU Lesser General Public Library, which is stated +below. It can also be found at: + + http://www.gnu.org/copyleft/lesser.html + +---------------------------------------------------------------------- + +GNU LESSER GENERAL PUBLIC LICENSE + +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 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. + +[This is the first released version of the Lesser GPL. It also counts +as the successor of the GNU Library Public License, version 2, hence the +version number 2.1.] + +Preamble + +The licenses for most software are designed to take away your freedom to +share and change it. By contrast, the GNU General Public Licenses are +intended to guarantee your freedom to share and change free software--to +make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the Free +Software Foundation and other authors who decide to use it. You can use +it too, but we suggest you first think carefully about whether this +license or the ordinary General Public License is the better strategy to +use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in +new free programs; and that you are informed that you can do these +things. + +To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for you +if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or +for a fee, you must give the recipients all the rights that we gave you. +You must make sure that they, too, receive or can get the source code. +If you link other code with the library, you must provide complete +object files to the recipients, so that they can relink them with the +library after making changes to the library and recompiling it. And you +must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is +no warranty for the free library. Also, if the library is modified by +someone else and passed on, the recipients should know that what they +have is not the original version, so that the original author's +reputation will not be affected by problems that might be introduced by +others. + +Finally, software patents pose a constant threat to the existence of any +free program. We wish to make sure that a company cannot effectively +restrict the users of a free program by obtaining a restrictive license +from a patent holder. Therefore, we insist that any patent license +obtained for a version of the library must be consistent with the full +freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License. This license, the GNU Lesser General Public +License, applies to certain designated libraries, and is quite different +from the ordinary General Public License. We use this license for +certain libraries in order to permit linking those libraries into +non-free programs. + +When a program is linked with a library, whether statically or using a +shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the entire +combination fits its criteria of freedom. The Lesser General Public +License permits more lax criteria for linking other code with the +library. + +We call this license the "Lesser" General Public License because it does +Less to protect the user's freedom than the ordinary General Public +License. It also provides other free software developers Less of an +advantage over competing non-free programs. These disadvantages are the +reason we use the ordinary General Public License for many libraries. +However, the Lesser license provides advantages in certain special +circumstances. + +For example, on rare occasions, there may be a special need to encourage +the widest possible use of a certain library, so that it becomes a +de-facto standard. To achieve this, non-free programs must be allowed to +use the library. A more frequent case is that a free library does the +same job as widely used non-free libraries. In this case, there is +little to gain by limiting the free library to free software only, so we +use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of free +software. For example, permission to use the GNU C Library in non-free +programs enables many more people to use the whole GNU operating system, +as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is linked +with the Library has the freedom and the wherewithal to run that program +using a modified version of the Library. + +The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or other +authorized party saying it may be distributed under the terms of this +Lesser General Public License (also called "this License"). Each +licensee is addressed as "you". + +A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which +has been distributed under these terms. A "work based on the Library" +means either the Library or any derivative work under copyright law: +that is to say, a work containing the Library or a portion of it, either +verbatim or with modifications and/or translated straightforwardly into +another language. (Hereinafter, translation is included without +limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making +modifications to it. For a library, 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 library. + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of running +a program using the Library is not restricted, and output from such a +program is covered only if its contents constitute a work based on the +Library (independent of the use of the Library in a tool for writing +it). Whether that is true depends on what the Library does and what the +program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete +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 +distribute a copy of this License along with the Library. + +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 Library or any portion of +it, thus forming a work based on the Library, 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) The modified work must itself be a software library. + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has +a purpose that is entirely well-defined independent of the application. +Therefore, Subsection 2d requires that any application-supplied function +or table used by this function must be optional: if the application does +not supply it, the square root function must still compute square +roots.) + + These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. + + In addition, mere aggregation of another work not based on the +Library with the Library (or with a work based on the Library) on a +volume of a storage or distribution medium does not bring the other work +under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so that +they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in these +notices. + +Once this change is made in a given copy, it is irreversible for that +copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the +Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative +of it, under Section 2) in object code or executable form under the +terms of Sections 1 and 2 above provided that you 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. + +If distribution of 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 satisfies the requirement to distribute the +source code, even though third parties are not compelled to copy the +source along with the object code. + +5. A program that contains no derivative of any portion of the Library, +but is designed to work with the Library by being compiled or linked +with it, is called a "work that uses the Library". Such a work, in +isolation, is not a derivative work of the Library, and therefore falls +outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates +an executable that is a derivative of the Library (because it contains +portions of the Library), rather than a "work that uses the library". +The executable is therefore covered by this License. Section 6 states +terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be linked +without the Library, or if the work is itself a library. The threshold +for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure +layouts and accessors, and small macros and small inline functions (ten +lines or less in length), then the use of the object file is +unrestricted, regardless of whether it is legally a derivative work. +(Executables containing this object code plus portions of the Library +will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, whether +or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a +"work that uses the Library" with the Library to produce a work +containing portions of the Library, and distribute that work under terms +of your choice, provided that the terms permit modification of the work +for the customer's own use and reverse engineering for debugging such +modifications. + +You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work during +execution displays copyright notices, you must include the copyright +notice for the Library among them, as well as a reference directing the +user to the copy of this License. Also, you must do one of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood that + the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the Library" +must include any data and utility programs needed for reproducing the +executable from it. However, as a special exception, the materials to be +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. + +It may happen that this requirement contradicts the license restrictions +of other proprietary libraries that do not normally accompany the +operating system. Such a contradiction means you cannot use both them +and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library +side-by-side in a single library together with other library facilities +not covered by this License, and distribute such a combined library, +provided that the separate distribution of the work based on the Library +and of the other library facilities is otherwise permitted, and provided +that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute the +Library except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, link with, or distribute the +Library 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. + +9. 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 Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and all +its terms and conditions for copying, distributing or modifying the +Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +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 with +this License. + +11. 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 Library at all. For example, if a patent license would +not permit royalty-free redistribution of the Library 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 Library. + +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. + +12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library 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. + +13. The Free Software Foundation may publish revised and/or new versions +of the Lesser 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 Library +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 Library does not specify a license +version number, you may choose any version ever published by the Free +Software Foundation. + +14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +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 + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE LIBRARY "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 LIBRARY IS WITH +YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL +NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. 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 LIBRARY 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 LIBRARY +(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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR +OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/aes.lua b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/aes.lua new file mode 100644 index 0000000..e739912 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/aes.lua @@ -0,0 +1,512 @@ +-- SPDX-License-Identifier: LGPL-2.1-or-later +-- Importé de https://github.com/exploiteers/Exploiteers-Wireshark-LoRa (meshtastic/aeslua/aes.lua), +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025 (dernière modification du fichier : +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025). +-- Licence amont : LGPL-2.1-or-later (aeslua, © 2006-2007 Matthias Hilbig, meshtastic/aeslua/Copyright.txt) — voir README.md et LICENSE. +-- require("bit"); + +local gf = require("meshtastic.aeslua.gf"); +local util = require("meshtastic.aeslua.util"); + +-- +-- Implementation of AES with nearly pure lua (only bitlib is needed) +-- +-- AES with lua is slow, really slow :-) +-- + +local public = {}; +local private = {}; + +-- aeslua.aes = public; + +-- some constants +public.ROUNDS = "rounds"; +public.KEY_TYPE = "type"; +public.ENCRYPTION_KEY=1; +public.DECRYPTION_KEY=2; + +-- aes SBOX +private.SBox = {}; +private.iSBox = {}; + +-- aes tables +private.table0 = {}; +private.table1 = {}; +private.table2 = {}; +private.table3 = {}; + +private.tableInv0 = {}; +private.tableInv1 = {}; +private.tableInv2 = {}; +private.tableInv3 = {}; + +-- round constants +private.rCon = {0x01000000, + 0x02000000, + 0x04000000, + 0x08000000, + 0x10000000, + 0x20000000, + 0x40000000, + 0x80000000, + 0x1b000000, + 0x36000000, + 0x6c000000, + 0xd8000000, + 0xab000000, + 0x4d000000, + 0x9a000000, + 0x2f000000}; + +-- +-- affine transformation for calculating the S-Box of AES +-- +function private.affinMap(byte) + mask = 0xf8; + result = 0; + for i = 1,8 do + result = bit.lshift(result,1); + + parity = util.byteParity(bit.band(byte,mask)); + result = result + parity + + -- simulate roll + lastbit = bit.band(mask, 1); + mask = bit.band(bit.rshift(mask, 1),0xff); + if (lastbit ~= 0) then + mask = bit.bor(mask, 0x80); + else + mask = bit.band(mask, 0x7f); + end + end + + return bit.bxor(result, 0x63); +end + +-- +-- calculate S-Box and inverse S-Box of AES +-- apply affine transformation to inverse in finite field 2^8 +-- +function private.calcSBox() + for i = 0, 255 do + if (i ~= 0) then + inverse = gf.invert(i); + else + inverse = i; + end + mapped = private.affinMap(inverse); + private.SBox[i] = mapped; + private.iSBox[mapped] = i; + end +end + +-- +-- Calculate round tables +-- round tables are used to calculate shiftRow, MixColumn and SubBytes +-- with 4 table lookups and 4 xor operations. +-- +function private.calcRoundTables() + for x = 0,255 do + byte = private.SBox[x]; + private.table0[x] = util.putByte(gf.mul(0x03, byte), 0) + + util.putByte( byte , 1) + + util.putByte( byte , 2) + + util.putByte(gf.mul(0x02, byte), 3); + private.table1[x] = util.putByte( byte , 0) + + util.putByte( byte , 1) + + util.putByte(gf.mul(0x02, byte), 2) + + util.putByte(gf.mul(0x03, byte), 3); + private.table2[x] = util.putByte( byte , 0) + + util.putByte(gf.mul(0x02, byte), 1) + + util.putByte(gf.mul(0x03, byte), 2) + + util.putByte( byte , 3); + private.table3[x] = util.putByte(gf.mul(0x02, byte), 0) + + util.putByte(gf.mul(0x03, byte), 1) + + util.putByte( byte , 2) + + util.putByte( byte , 3); + end +end + +-- +-- Calculate inverse round tables +-- does the inverse of the normal roundtables for the equivalent +-- decryption algorithm. +-- +function private.calcInvRoundTables() + for x = 0,255 do + byte = private.iSBox[x]; + private.tableInv0[x] = util.putByte(gf.mul(0x0b, byte), 0) + + util.putByte(gf.mul(0x0d, byte), 1) + + util.putByte(gf.mul(0x09, byte), 2) + + util.putByte(gf.mul(0x0e, byte), 3); + private.tableInv1[x] = util.putByte(gf.mul(0x0d, byte), 0) + + util.putByte(gf.mul(0x09, byte), 1) + + util.putByte(gf.mul(0x0e, byte), 2) + + util.putByte(gf.mul(0x0b, byte), 3); + private.tableInv2[x] = util.putByte(gf.mul(0x09, byte), 0) + + util.putByte(gf.mul(0x0e, byte), 1) + + util.putByte(gf.mul(0x0b, byte), 2) + + util.putByte(gf.mul(0x0d, byte), 3); + private.tableInv3[x] = util.putByte(gf.mul(0x0e, byte), 0) + + util.putByte(gf.mul(0x0b, byte), 1) + + util.putByte(gf.mul(0x0d, byte), 2) + + util.putByte(gf.mul(0x09, byte), 3); + end +end + + +-- +-- rotate word: 0xaabbccdd gets 0xbbccddaa +-- used for key schedule +-- +function private.rotWord(word) + local tmp = bit.band(word,0xff000000); + return (bit.lshift(word,8) + bit.rshift(tmp,24)) ; +end + +-- +-- replace all bytes in a word with the SBox. +-- used for key schedule +-- +function private.subWord(word) + return util.putByte(private.SBox[util.getByte(word,0)],0) + + util.putByte(private.SBox[util.getByte(word,1)],1) + + util.putByte(private.SBox[util.getByte(word,2)],2) + + util.putByte(private.SBox[util.getByte(word,3)],3); +end + +-- +-- generate key schedule for aes encryption +-- +-- returns table with all round keys and +-- the necessary number of rounds saved in [public.ROUNDS] +-- +function public.expandEncryptionKey(key) + local keySchedule = {}; + local keyWords = math.floor(#key / 4); + + + if ((keyWords ~= 4 and keyWords ~= 6 and keyWords ~= 8) or (keyWords * 4 ~= #key)) then + print("Invalid key size: ", keyWords); + return nil; + end + + keySchedule[public.ROUNDS] = keyWords + 6; + keySchedule[public.KEY_TYPE] = public.ENCRYPTION_KEY; + + for i = 0,keyWords - 1 do + keySchedule[i] = util.putByte(key[i*4+1], 3) + + util.putByte(key[i*4+2], 2) + + util.putByte(key[i*4+3], 1) + + util.putByte(key[i*4+4], 0); + end + + for i = keyWords, (keySchedule[public.ROUNDS] + 1)*4 - 1 do + local tmp = keySchedule[i-1]; + + if ( i % keyWords == 0) then + tmp = private.rotWord(tmp); + tmp = private.subWord(tmp); + + local index = math.floor(i/keyWords); + tmp = bit.bxor(tmp,private.rCon[index]); + elseif (keyWords > 6 and i % keyWords == 4) then + tmp = private.subWord(tmp); + end + + keySchedule[i] = bit.bxor(keySchedule[(i-keyWords)],tmp); + end + + return keySchedule; +end + +-- +-- Inverse mix column +-- used for key schedule of decryption key +-- +function private.invMixColumnOld(word) + local b0 = util.getByte(word,3); + local b1 = util.getByte(word,2); + local b2 = util.getByte(word,1); + local b3 = util.getByte(word,0); + + return util.putByte(gf.add(gf.add(gf.add(gf.mul(0x0b, b1), + gf.mul(0x0d, b2)), + gf.mul(0x09, b3)), + gf.mul(0x0e, b0)),3) + + util.putByte(gf.add(gf.add(gf.add(gf.mul(0x0b, b2), + gf.mul(0x0d, b3)), + gf.mul(0x09, b0)), + gf.mul(0x0e, b1)),2) + + util.putByte(gf.add(gf.add(gf.add(gf.mul(0x0b, b3), + gf.mul(0x0d, b0)), + gf.mul(0x09, b1)), + gf.mul(0x0e, b2)),1) + + util.putByte(gf.add(gf.add(gf.add(gf.mul(0x0b, b0), + gf.mul(0x0d, b1)), + gf.mul(0x09, b2)), + gf.mul(0x0e, b3)),0); +end + +-- +-- Optimized inverse mix column +-- look at http://fp.gladman.plus.com/cryptography_technology/rijndael/aes.spec.311.pdf +-- TODO: make it work +-- +function private.invMixColumn(word) + local b0 = util.getByte(word,3); + local b1 = util.getByte(word,2); + local b2 = util.getByte(word,1); + local b3 = util.getByte(word,0); + + local t = bit.bxor(b3,b2); + local u = bit.bxor(b1,b0); + local v = bit.bxor(t,u); + v = bit.bxor(v,gf.mul(0x08,v)); + w = bit.bxor(v,gf.mul(0x04, bit.bxor(b2,b0))); + v = bit.bxor(v,gf.mul(0x04, bit.bxor(b3,b1))); + + return util.putByte( bit.bxor(bit.bxor(b3,v), gf.mul(0x02, bit.bxor(b0,b3))), 0) + + util.putByte( bit.bxor(bit.bxor(b2,w), gf.mul(0x02, t )), 1) + + util.putByte( bit.bxor(bit.bxor(b1,v), gf.mul(0x02, bit.bxor(b0,b3))), 2) + + util.putByte( bit.bxor(bit.bxor(b0,w), gf.mul(0x02, u )), 3); +end + +-- +-- generate key schedule for aes decryption +-- +-- uses key schedule for aes encryption and transforms each +-- key by inverse mix column. +-- +function public.expandDecryptionKey(key) + local keySchedule = public.expandEncryptionKey(key); + if (keySchedule == nil) then + return nil; + end + + keySchedule[public.KEY_TYPE] = public.DECRYPTION_KEY; + + for i = 4, (keySchedule[public.ROUNDS] + 1)*4 - 5 do + keySchedule[i] = private.invMixColumnOld(keySchedule[i]); + end + + return keySchedule; +end + +-- +-- xor round key to state +-- +function private.addRoundKey(state, key, round) + for i = 0, 3 do + state[i] = bit.bxor(state[i], key[round*4+i]); + end +end + +-- +-- do encryption round (ShiftRow, SubBytes, MixColumn together) +-- +function private.doRound(origState, dstState) + dstState[0] = bit.bxor(bit.bxor(bit.bxor( + private.table0[util.getByte(origState[0],3)], + private.table1[util.getByte(origState[1],2)]), + private.table2[util.getByte(origState[2],1)]), + private.table3[util.getByte(origState[3],0)]); + + dstState[1] = bit.bxor(bit.bxor(bit.bxor( + private.table0[util.getByte(origState[1],3)], + private.table1[util.getByte(origState[2],2)]), + private.table2[util.getByte(origState[3],1)]), + private.table3[util.getByte(origState[0],0)]); + + dstState[2] = bit.bxor(bit.bxor(bit.bxor( + private.table0[util.getByte(origState[2],3)], + private.table1[util.getByte(origState[3],2)]), + private.table2[util.getByte(origState[0],1)]), + private.table3[util.getByte(origState[1],0)]); + + dstState[3] = bit.bxor(bit.bxor(bit.bxor( + private.table0[util.getByte(origState[3],3)], + private.table1[util.getByte(origState[0],2)]), + private.table2[util.getByte(origState[1],1)]), + private.table3[util.getByte(origState[2],0)]); +end + +-- +-- do last encryption round (ShiftRow and SubBytes) +-- +function private.doLastRound(origState, dstState) + dstState[0] = util.putByte(private.SBox[util.getByte(origState[0],3)], 3) + + util.putByte(private.SBox[util.getByte(origState[1],2)], 2) + + util.putByte(private.SBox[util.getByte(origState[2],1)], 1) + + util.putByte(private.SBox[util.getByte(origState[3],0)], 0); + + dstState[1] = util.putByte(private.SBox[util.getByte(origState[1],3)], 3) + + util.putByte(private.SBox[util.getByte(origState[2],2)], 2) + + util.putByte(private.SBox[util.getByte(origState[3],1)], 1) + + util.putByte(private.SBox[util.getByte(origState[0],0)], 0); + + dstState[2] = util.putByte(private.SBox[util.getByte(origState[2],3)], 3) + + util.putByte(private.SBox[util.getByte(origState[3],2)], 2) + + util.putByte(private.SBox[util.getByte(origState[0],1)], 1) + + util.putByte(private.SBox[util.getByte(origState[1],0)], 0); + + dstState[3] = util.putByte(private.SBox[util.getByte(origState[3],3)], 3) + + util.putByte(private.SBox[util.getByte(origState[0],2)], 2) + + util.putByte(private.SBox[util.getByte(origState[1],1)], 1) + + util.putByte(private.SBox[util.getByte(origState[2],0)], 0); +end + +-- +-- do decryption round +-- +function private.doInvRound(origState, dstState) + dstState[0] = bit.bxor(bit.bxor(bit.bxor( + private.tableInv0[util.getByte(origState[0],3)], + private.tableInv1[util.getByte(origState[3],2)]), + private.tableInv2[util.getByte(origState[2],1)]), + private.tableInv3[util.getByte(origState[1],0)]); + + dstState[1] = bit.bxor(bit.bxor(bit.bxor( + private.tableInv0[util.getByte(origState[1],3)], + private.tableInv1[util.getByte(origState[0],2)]), + private.tableInv2[util.getByte(origState[3],1)]), + private.tableInv3[util.getByte(origState[2],0)]); + + dstState[2] = bit.bxor(bit.bxor(bit.bxor( + private.tableInv0[util.getByte(origState[2],3)], + private.tableInv1[util.getByte(origState[1],2)]), + private.tableInv2[util.getByte(origState[0],1)]), + private.tableInv3[util.getByte(origState[3],0)]); + + dstState[3] = bit.bxor(bit.bxor(bit.bxor( + private.tableInv0[util.getByte(origState[3],3)], + private.tableInv1[util.getByte(origState[2],2)]), + private.tableInv2[util.getByte(origState[1],1)]), + private.tableInv3[util.getByte(origState[0],0)]); +end + +-- +-- do last decryption round +-- +function private.doInvLastRound(origState, dstState) + dstState[0] = util.putByte(private.iSBox[util.getByte(origState[0],3)], 3) + + util.putByte(private.iSBox[util.getByte(origState[3],2)], 2) + + util.putByte(private.iSBox[util.getByte(origState[2],1)], 1) + + util.putByte(private.iSBox[util.getByte(origState[1],0)], 0); + + dstState[1] = util.putByte(private.iSBox[util.getByte(origState[1],3)], 3) + + util.putByte(private.iSBox[util.getByte(origState[0],2)], 2) + + util.putByte(private.iSBox[util.getByte(origState[3],1)], 1) + + util.putByte(private.iSBox[util.getByte(origState[2],0)], 0); + + dstState[2] = util.putByte(private.iSBox[util.getByte(origState[2],3)], 3) + + util.putByte(private.iSBox[util.getByte(origState[1],2)], 2) + + util.putByte(private.iSBox[util.getByte(origState[0],1)], 1) + + util.putByte(private.iSBox[util.getByte(origState[3],0)], 0); + + dstState[3] = util.putByte(private.iSBox[util.getByte(origState[3],3)], 3) + + util.putByte(private.iSBox[util.getByte(origState[2],2)], 2) + + util.putByte(private.iSBox[util.getByte(origState[1],1)], 1) + + util.putByte(private.iSBox[util.getByte(origState[0],0)], 0); +end + +-- +-- encrypts 16 Bytes +-- key encryption key schedule +-- input array with input data +-- inputOffset start index for input +-- output array for encrypted data +-- outputOffset start index for output +-- +function public.encrypt(key, input, inputOffset, output, outputOffset) + --default parameters + inputOffset = inputOffset or 1; + output = output or {}; + outputOffset = outputOffset or 1; + + local state = {}; + local tmpState = {}; + + if (key[public.KEY_TYPE] ~= public.ENCRYPTION_KEY) then + print("No encryption key: ", key[public.KEY_TYPE]); + return; + end + + state = util.bytesToInts(input, inputOffset, 4); + private.addRoundKey(state, key, 0); + + local round = 1; + while (round < key[public.ROUNDS] - 1) do + -- do a double round to save temporary assignments + private.doRound(state, tmpState); + private.addRoundKey(tmpState, key, round); + round = round + 1; + + private.doRound(tmpState, state); + private.addRoundKey(state, key, round); + round = round + 1; + end + + private.doRound(state, tmpState); + private.addRoundKey(tmpState, key, round); + round = round +1; + + private.doLastRound(tmpState, state); + private.addRoundKey(state, key, round); + + return util.intsToBytes(state, output, outputOffset); +end + +-- +-- decrypt 16 bytes +-- key decryption key schedule +-- input array with input data +-- inputOffset start index for input +-- output array for decrypted data +-- outputOffset start index for output +--- +function public.decrypt(key, input, inputOffset, output, outputOffset) + -- default arguments + inputOffset = inputOffset or 1; + output = output or {}; + outputOffset = outputOffset or 1; + + local state = {}; + local tmpState = {}; + + if (key[public.KEY_TYPE] ~= public.DECRYPTION_KEY) then + print("No decryption key: ", key[public.KEY_TYPE]); + return; + end + + state = util.bytesToInts(input, inputOffset, 4); + private.addRoundKey(state, key, key[public.ROUNDS]); + + local round = key[public.ROUNDS] - 1; + while (round > 2) do + -- do a double round to save temporary assignments + private.doInvRound(state, tmpState); + private.addRoundKey(tmpState, key, round); + round = round - 1; + + private.doInvRound(tmpState, state); + private.addRoundKey(state, key, round); + round = round - 1; + end + + private.doInvRound(state, tmpState); + private.addRoundKey(tmpState, key, round); + round = round - 1; + + private.doInvLastRound(tmpState, state); + private.addRoundKey(state, key, round); + + return util.intsToBytes(state, output, outputOffset); +end + +-- calculate all tables when loading this file +private.calcSBox(); +private.calcRoundTables(); +private.calcInvRoundTables(); + +return public; \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/buffer.lua b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/buffer.lua new file mode 100644 index 0000000..306bbdc --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/buffer.lua @@ -0,0 +1,31 @@ +-- SPDX-License-Identifier: LGPL-2.1-or-later +-- Importé de https://github.com/exploiteers/Exploiteers-Wireshark-LoRa (meshtastic/aeslua/buffer.lua), +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025 (dernière modification du fichier : +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025). +-- Licence amont : LGPL-2.1-or-later (aeslua, © 2006-2007 Matthias Hilbig, meshtastic/aeslua/Copyright.txt) — voir README.md et LICENSE. +local public = {}; + +-- aeslua.buffer = public; + +function public.new () + return {}; +end + +function public.addString (stack, s) + table.insert(stack, s) + for i = #stack - 1, 1, -1 do + if #stack[i] > #stack[i+1] then + break; + end + stack[i] = stack[i] .. table.remove(stack); + end +end + +function public.toString (stack) + for i = #stack - 1, 1, -1 do + stack[i] = stack[i] .. table.remove(stack); + end + return stack[1]; +end + +return public; \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/ciphermode.lua b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/ciphermode.lua new file mode 100644 index 0000000..8f91590 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/ciphermode.lua @@ -0,0 +1,166 @@ +-- SPDX-License-Identifier: LGPL-2.1-or-later +-- Importé de https://github.com/exploiteers/Exploiteers-Wireshark-LoRa (meshtastic/aeslua/ciphermode.lua), +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025 (dernière modification du fichier : +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025). +-- Licence amont : LGPL-2.1-or-later (aeslua, © 2006-2007 Matthias Hilbig, meshtastic/aeslua/Copyright.txt) — voir README.md et LICENSE. +local aes = require("meshtastic.aeslua.aes"); +local util = require("meshtastic.aeslua.util"); +local buffer = require("meshtastic.aeslua.buffer"); + +local public = {}; + +-- aeslua.ciphermode = public; + +-- +-- Encrypt strings +-- key - byte array with key +-- string - string to encrypt +-- modefunction - function for cipher mode to use +-- +function public.encryptString(key, data, modeFunction) + local iv = iv or {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + local keySched = aes.expandEncryptionKey(key); + local encryptedData = buffer.new(); + + for i = 1, #data/16 do + local offset = (i-1)*16 + 1; + local byteData = {string.byte(data,offset,offset +15)}; + + modeFunction(keySched, byteData, iv); + + buffer.addString(encryptedData, string.char(table.unpack(byteData))); + end + + return buffer.toString(encryptedData); +end + +-- +-- the following 4 functions can be used as +-- modefunction for encryptString +-- + +-- Electronic code book mode encrypt function +function public.encryptECB(keySched, byteData, iv) + aes.encrypt(keySched, byteData, 1, byteData, 1); +end + +-- Cipher block chaining mode encrypt function +function public.encryptCBC(keySched, byteData, iv) + util.xorIV(byteData, iv); + + aes.encrypt(keySched, byteData, 1, byteData, 1); + + for j = 1,16 do + iv[j] = byteData[j]; + end +end + +-- Output feedback mode encrypt function +function public.encryptOFB(keySched, byteData, iv) + aes.encrypt(keySched, iv, 1, iv, 1); + util.xorIV(byteData, iv); +end + +-- Cipher feedback mode encrypt function +function public.encryptCFB(keySched, byteData, iv) + aes.encrypt(keySched, iv, 1, iv, 1); + util.xorIV(byteData, iv); + + for j = 1,16 do + iv[j] = byteData[j]; + end +end + +-- +-- Decrypt strings +-- key - byte array with key +-- string - string to decrypt +-- modefunction - function for cipher mode to use +-- iv - IV +-- +function public.decryptString(key, data, modeFunction, iv) + local keySched; + if (modeFunction == public.decryptOFB or modeFunction == public.decryptCFB or modeFunction == public.decryptCTR) then + keySched = aes.expandEncryptionKey(key); + else + keySched = aes.expandDecryptionKey(key); + end + + local decryptedData = buffer.new(); + + for i = 1, #data/16 do + local offset = (i-1)*16 + 1; + local byteData = {string.byte(data,offset,offset +15)}; + + iv = modeFunction(keySched, byteData, iv); + + buffer.addString(decryptedData, string.char(table.unpack(byteData))); + end + + return buffer.toString(decryptedData); +end + +-- +-- the following 4 functions can be used as +-- modefunction for decryptString +-- + +-- Electronic code book mode decrypt function +function public.decryptECB(keySched, byteData, iv) + + aes.decrypt(keySched, byteData, 1, byteData, 1); + + return iv; +end + +-- Cipher block chaining mode decrypt function +function public.decryptCBC(keySched, byteData, iv) + local nextIV = {}; + for j = 1,16 do + nextIV[j] = byteData[j]; + end + + aes.decrypt(keySched, byteData, 1, byteData, 1); + util.xorIV(byteData, iv); + + return nextIV; +end + +-- Output feedback mode decrypt function +function public.decryptOFB(keySched, byteData, iv) + aes.encrypt(keySched, iv, 1, iv, 1); + util.xorIV(byteData, iv); + + return iv; +end + +-- Cipher feedback mode decrypt function +function public.decryptCFB(keySched, byteData, iv) + local nextIV = {}; + for j = 1,16 do + nextIV[j] = byteData[j]; + end + + aes.encrypt(keySched, iv, 1, iv, 1); + + util.xorIV(byteData, iv); + + return nextIV; +end + +-- Counter mode decrypt function +function public.decryptCTR(keySched, byteData, iv) + local nextIV = {}; + for j = 1,16 do + nextIV[j] = iv[j]; + end + nextIV[#nextIV] = nextIV[#nextIV] + 1; + + aes.encrypt(keySched, iv, 1, iv, 1); + + util.xorIV(byteData, iv); + + return nextIV; +end + +return public; \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/gf.lua b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/gf.lua new file mode 100644 index 0000000..a0850ab --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/gf.lua @@ -0,0 +1,121 @@ +-- SPDX-License-Identifier: LGPL-2.1-or-later +-- Importé de https://github.com/exploiteers/Exploiteers-Wireshark-LoRa (meshtastic/aeslua/gf.lua), +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025 (dernière modification du fichier : +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025). +-- Licence amont : LGPL-2.1-or-later (aeslua, © 2006-2007 Matthias Hilbig, meshtastic/aeslua/Copyright.txt) — voir README.md et LICENSE. +-- require("bit"); + +-- finite field with base 2 and modulo irreducible polynom x^8+x^4+x^3+x+1 = 0x11d +local private = {}; +local public = {}; + +-- aeslua.gf = public; + +-- private data of gf +private.n = 0x100; +private.ord = 0xff; +private.irrPolynom = 0x11b; +private.exp = {}; +private.log = {}; + +-- +-- add two polynoms (its simply xor) +-- +function public.add(operand1, operand2) + return bit.bxor(operand1,operand2); +end + +-- +-- subtract two polynoms (same as addition) +-- +function public.sub(operand1, operand2) + return bit.bxor(operand1,operand2); +end + +-- +-- inverts element +-- a^(-1) = g^(order - log(a)) +-- +function public.invert(operand) + -- special case for 1 + if (operand == 1) then + return 1; + end; + -- normal invert + local exponent = private.ord - private.log[operand]; + return private.exp[exponent]; +end + +-- +-- multiply two elements using a logarithm table +-- a*b = g^(log(a)+log(b)) +-- +function public.mul(operand1, operand2) + if (operand1 == 0 or operand2 == 0) then + return 0; + end + + local exponent = private.log[operand1] + private.log[operand2]; + if (exponent >= private.ord) then + exponent = exponent - private.ord; + end + return private.exp[exponent]; +end + +-- +-- divide two elements +-- a/b = g^(log(a)-log(b)) +-- +function public.div(operand1, operand2) + if (operand1 == 0) then + return 0; + end + -- TODO: exception if operand2 == 0 + local exponent = private.log[operand1] - private.log[operand2]; + if (exponent < 0) then + exponent = exponent + private.ord; + end + return private.exp[exponent]; +end + +-- +-- print logarithmic table +-- +function public.printLog() + for i = 1, private.n do + print("log(", i-1, ")=", private.log[i-1]); + end +end + +-- +-- print exponentiation table +-- +function public.printExp() + for i = 1, private.n do + print("exp(", i-1, ")=", private.exp[i-1]); + end +end + +-- +-- calculate logarithmic and exponentiation table +-- +function private.initMulTable() + local a = 1; + + for i = 0,private.ord-1 do + private.exp[i] = a; + private.log[a] = i; + + -- multiply with generator x+1 -> left shift + 1 + a = bit.bxor(bit.lshift(a, 1), a); + + -- if a gets larger than order, reduce modulo irreducible polynom + if a > private.ord then + a = public.sub(a, private.irrPolynom); + end + end +end + +private.initMulTable(); + +return public; \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/util.lua b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/util.lua new file mode 100644 index 0000000..ca9f66a --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/aeslua/util.lua @@ -0,0 +1,159 @@ +-- SPDX-License-Identifier: LGPL-2.1-or-later +-- Importé de https://github.com/exploiteers/Exploiteers-Wireshark-LoRa (meshtastic/aeslua/util.lua), +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025 (dernière modification du fichier : +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025). +-- Licence amont : LGPL-2.1-or-later (aeslua, © 2006-2007 Matthias Hilbig, meshtastic/aeslua/Copyright.txt) — voir README.md et LICENSE. +-- require("bit"); + +local public = {}; +local private = {}; + +-- aeslua.util = public; + +-- +-- calculate the parity of one byte +-- +function public.byteParity(byte) + byte = bit.bxor(byte, bit.rshift(byte, 4)); + byte = bit.bxor(byte, bit.rshift(byte, 2)); + byte = bit.bxor(byte, bit.rshift(byte, 1)); + return bit.band(byte, 1); +end + +-- +-- get byte at position index +-- +function public.getByte(number, index) + if (index == 0) then + return bit.band(number,0xff); + else + return bit.band(bit.rshift(number, index*8),0xff); + end +end + + +-- +-- put number into int at position index +-- +function public.putByte(number, index) + if (index == 0) then + return bit.band(number,0xff); + else + return bit.lshift(bit.band(number,0xff),index*8); + end +end + +-- +-- convert byte array to int array +-- +function public.bytesToInts(bytes, start, n) + local ints = {}; + for i = 0, n - 1 do + ints[i] = public.putByte(bytes[start + (i*4) ], 3) + + public.putByte(bytes[start + (i*4) + 1], 2) + + public.putByte(bytes[start + (i*4) + 2], 1) + + public.putByte(bytes[start + (i*4) + 3], 0); + end + return ints; +end + +-- +-- convert int array to byte array +-- +function public.intsToBytes(ints, output, outputOffset, n) + n = n or #ints; + for i = 0, n do + for j = 0,3 do + output[outputOffset + i*4 + (3 - j)] = public.getByte(ints[i], j); + end + end + return output; +end + +-- +-- convert bytes to hexString +-- +function private.bytesToHex(bytes) + local hexBytes = ""; + + for i,byte in ipairs(bytes) do + hexBytes = hexBytes .. string.format("%02x ", byte); + end + + return hexBytes; +end + +-- +-- convert data to hex string +-- +function public.toHexString(data) + local type = type(data); + if (type == "number") then + return string.format("%08x",data); + elseif (type == "table") then + return private.bytesToHex(data); + elseif (type == "string") then + local bytes = {string.byte(data, 1, #data)}; + + return private.bytesToHex(bytes); + else + return data; + end +end + +function public.padByteString(data) + local dataLength = #data; + + local random1 = math.random(0,255); + local random2 = math.random(0,255); + + local prefix = string.char(random1, + random2, + random1, + random2, + public.getByte(dataLength, 3), + public.getByte(dataLength, 2), + public.getByte(dataLength, 1), + public.getByte(dataLength, 0)); + + data = prefix .. data; + + local paddingLength = math.ceil(#data/16)*16 - #data; + local padding = ""; + for i=1,paddingLength do + padding = padding .. string.char(math.random(0,255)); + end + + return data .. padding; +end + +function private.properlyDecrypted(data) + local random = {string.byte(data,1,4)}; + + if (random[1] == random[3] and random[2] == random[4]) then + return true; + end + + return false; +end + +function public.unpadByteString(data) + if (not private.properlyDecrypted(data)) then + return nil; + end + + local dataLength = public.putByte(string.byte(data,5), 3) + + public.putByte(string.byte(data,6), 2) + + public.putByte(string.byte(data,7), 1) + + public.putByte(string.byte(data,8), 0); + + return string.sub(data,9,8+dataLength); +end + +function public.xorIV(data, iv) + for i = 1,16 do + data[i] = bit.bxor(data[i], iv[i]); + end +end + +return public; \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/colorrules b/dissectors/meshtastic-exploiteers/src/meshtastic/colorrules new file mode 100644 index 0000000..d26ba9e --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/colorrules @@ -0,0 +1,2 @@ +# This file was created by Wireshark. Edit with care. +@Duplicate packets@meshtastic.duplicate@[48316,48316,48316][65535,65535,65535] diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/meshtastic.lua b/dissectors/meshtastic-exploiteers/src/meshtastic/meshtastic.lua new file mode 100644 index 0000000..d69c366 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/meshtastic.lua @@ -0,0 +1,335 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/exploiteers/Exploiteers-Wireshark-LoRa (meshtastic/meshtastic.lua), +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025 (dernière modification du fichier : +-- commit ad985742a2a5893fa9753b780b86d365dce0beb0 du 08/10/2025). +-- Licence amont : GPL-3.0 (LICENSE amont) — voir README.md et LICENSE. +-- Installation Instructions +-- +-- 1. Copy the meshtastic/ directory to the plugins/ directory of your "personal configuration folder". +-- See: https://www.wireshark.org/docs/wsug_html_chunked/ChAppFilesConfigurationSection.html +-- (you may need to create the plugins/ directory) +-- E.g. C:\Users\Dade\AppData\Roaming\Wireshark\plugins\meshtastic +-- 2. Open Wireshark. +-- 3. Edit > Preferences > Protocols > ProtoBuf +-- 4. Check "Load .proto files on startup." +-- 5. Check "Dissect protobuf fields as Wireshark fields." +-- 6. Click "Edit..." next to "Protobuf search paths". +-- 7. Add the plugins/meshtastic/protobuf/ directory. +-- 8. Check "Load all files" next to new entry. +-- 9. Save and close preferences. +-- 10. Open .pcap file. + +local info = { + version = "1.1", + author = "exploitee.rs", +}; +set_plugin_info(info); + +local ciphermode = require("meshtastic.aeslua.ciphermode"); +local protobuf_dissector = Dissector.get("protobuf"); +local ip_dissector = Dissector.get("ip"); +local names_table = {}; +local packets_table = {}; + + +local function get_crypto_key(key_base64_str) + -- From /meshtastic/firmware/src/mesh/Channels.cpp + local default_psk = { + 0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, + 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01 + }; + + local user_key = ByteArray.new(key_base64_str, true):base64_decode(); + + if user_key:len() == 0 then + -- Encryption disabled. + return {}; + elseif (user_key:len() == 1) then + -- Key is the default key with its last byte incremented by the user key. + local key = default_psk; + key[#key] = key[#key] + (user_key:int() - 1); + return key; + elseif (user_key:len() <= 16) then + local key = user_key; + key:set_size(16); + local key_table = {} + for i = 1, 16 do + key_table[i] = key:get_index(i - 1) + end + return key_table + elseif (user_key:len() <= 32) then + local key = user_key; + key:set_size(32); + local key_table = {} + for i = 1, 32 do + key_table[i] = key:get_index(i - 1) + end + return key_table + end + error("Error: Meshtastic channel key (set in Wireshark Preferences) is longer than 32 bytes") +end + + +local function get_crypto_iv(packet_id_range, from_range) + local iv = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + for i = 1, 4 do + iv[i] = packet_id_range:bytes():get_index(i - 1); + iv[i + 8] = from_range:bytes():get_index(i - 1); + end + return iv; +end + + +-- Protocol for the outer packet. Invoked when the syncword in the LoRaTap header is 0x2b. +local proto_meshtastic = Proto.new("meshtastic", "Meshtastic"); +proto_meshtastic.prefs.crypto_key = Pref.string("Primary channel encryption key (base64)", "AQ=="); +local p = proto_meshtastic; +p.fields.to = ProtoField.uint32("meshtastic.to", "Destination node", base.HEX); +local f_to = Field.new("meshtastic.to"); +p.fields.from = ProtoField.uint32("meshtastic.from", "Sender node", base.HEX); +local f_from = Field.new("meshtastic.from"); +p.fields.id = ProtoField.uint32("meshtastic.id", "Packet ID", base.HEX); +p.fields.flags = ProtoField.uint8("meshtastic.flags", "Flags", base.HEX); +p.fields.hop_limit = ProtoField.uint8("meshtastic.flags.hop_limit", "Hop limit (remaining hops)", base.DEC, nil, 0x07); +p.fields.hop_start = ProtoField.uint8("meshtastic.flags.hop_start", "Hop limit (original)", base.DEC, nil, 0xE0); +p.fields.want_ack = ProtoField.bool("meshtastic.flags.want_ack", "ACK requested", 8, nil, 0x08); +p.fields.via_mqtt = ProtoField.bool("meshtastic.flags.via_mqtt", "Path included MQTT", 8, nil, 0x10); +p.fields.channel = ProtoField.uint8("meshtastic.channel_hash", "Channel hash", base.HEX); +p.fields.next_hop = ProtoField.uint8("meshtastic.next_hop", "Next hop node (unused)", base.HEX); +p.fields.relay_node = ProtoField.uint8("meshtastic.relay_node", "Relay node (unused)", base.HEX); +p.fields.payload = ProtoField.protocol("meshtastic.payload", "Payload", base.NONE); +p.fields.payload_decrypted = ProtoField.protocol("meshtastic.payload.decrypted", "Decrypted (using key in preferences)", base.NONE); +p.fields.portnum = ProtoField.int32("meshtastic.payload.portnum", "Portnum", base.DEC, { + [1]="TEXT_MESSAGE_APP", + [2]="REMOTE_HARDWARE_APP", + [3]="POSITION_APP", + [4]="NODEINFO_APP", + [5]="ROUTING_APP", + [6]="ADMIN_APP", + [7]="TEXT_MESSAGE_COMPRESSED_APP", + [8]="WAYPOINT_APP", + [9]="AUDIO_APP", + [10]="DETECTION_SENSOR_APP", + [32]="REPLY_APP", + [33]="IP_TUNNEL_APP", + [34]="PAXCOUNTER_APP", + [64]="SERIAL_APP", + [65]="STORE_FORWARD_APP", + [66]="RANGE_TEST_APP", + [67]="TELEMETRY_APP", + [68]="ZPS_APP", + [69]="SIMULATOR_APP", + [70]="TRACEROUTE_APP", + [71]="NEIGHBORINFO_APP", + [72]="ATAK_PLUGIN", + [73]="MAP_REPORT_APP", + [256]="PRIVATE_APP", + [257]="ATAK_FORWARDER", +}); +p.experts.malformed = ProtoExpert.new("meshtastic.malformed", "Invalid meshtastic.Data proto", expert.group.MALFORMED, expert.severity.ERROR); +p.experts.duplicate = ProtoExpert.new("meshtastic.duplicate", "Duplicate of an earlier packet", expert.group.PROTOCOL, expert.severity.NOTE); +-- Reuse this status field from eth so that built-in packet coloring rules for status will apply: +p.fields.status = ProtoField.uint8("eth.fcs.status", "Status"); + + +-- Sub-protocol for the payload, chained to the protobuf dissector, which is invoked by the outer protocol. +local proto_meshtastic_payload = Proto.new("meshtastic_data_payload", "meshtastic_data_payload"); +proto_meshtastic_payload.fields.text = ProtoField.string("meshtastic.payload.text", "Text message", base.UNICODE); +-- The protobuf dissector only defines its fields after it has already run. To +-- avoid undefined field errors, create placeholder fields with the same types +-- that will be overwritten later by the protobuf dissector. These Fields will +-- actually read data created by the protobuf dissector, not proto_meshtastic. +proto_meshtastic_payload.fields._dontuse1 = ProtoField.int32("pbf.meshtastic.Data.portnum", "portnum", base.DEC); +local f_proto_meshtastic_Data_portnum = Field.new("pbf.meshtastic.Data.portnum"); +proto_meshtastic_payload.fields._dontuse2 = ProtoField.string("pbf.meshtastic.User.long_name", "long_name", base.NONE); +local f_proto_meshtastic_User_long_name = Field.new("pbf.meshtastic.User.long_name"); + + +-- Protocol to hold a sub-dissector that relabels packets with source/destination node names +-- collected from NODEINFO messages. +local proto_post_names = Proto.new("meshtastic_names", "meshtastic_names"); +function proto_post_names.dissector(tvb, pinfo, treeitem) + local src_name = names_table[tostring(pinfo.cols.src)]; + if src_name ~= nil then + pinfo.cols.src:append(" (" .. src_name .. ")"); + end + local dst_name = names_table[tostring(pinfo.cols.dst)]; + if dst_name ~= nil then + pinfo.cols.dst:append(" (" .. dst_name .. ")"); + end +end +register_postdissector(proto_post_names); + + +function proto_meshtastic.init() + names_table = {}; + packets_table = {}; +end + + +function proto_meshtastic.dissector(tvb, pinfo, treeitem) + pinfo.cols.protocol:set('Meshtastic'); + + local subtree = treeitem:add(proto_meshtastic, tvb()); + local pos = 0; + + -- To + subtree:add_le(p.fields.to, tvb(pos, 4)); + pos = pos + 4; + pinfo.cols.dst:set(f_to().display); + if f_to().value == 0xffffffff then + pinfo.cols.dst:append(' (broadcast)'); + end + + -- From + local from_range = tvb(pos, 4); + subtree:add_le(p.fields.from, from_range); + pos = pos + 4; + pinfo.cols.src:set(f_from().display); + + -- Packet ID + local packet_id_range = tvb(pos, 4); + subtree:add_le(p.fields.id, packet_id_range); + local idstr = packet_id_range:bytes():tohex(); + if packets_table[idstr] == nil then + packets_table[idstr] = pinfo.number; + else + -- A packet with the same ID was found in a different frame. + local is_dup = packets_table[idstr] ~= pinfo.number; + if is_dup then subtree:add_proto_expert_info(p.experts.duplicate) end; + end + pos = pos + 4; + + -- Header fields (hops, ack, mqtt) + local flag_byte = tvb(pos, 1); + pos = pos + 1; + local flags = subtree:add(p.fields.flags, flag_byte) + flags:add(p.fields.hop_limit, flag_byte); + flags:add(p.fields.hop_start, flag_byte); + flags:add(p.fields.want_ack, flag_byte); + flags:add(p.fields.via_mqtt, flag_byte); + + -- Channel hash + subtree:add(p.fields.channel, tvb(pos, 1)); + pos = pos + 1; + + -- (Unused) next hop + subtree:add(p.fields.next_hop, tvb(pos, 1)); + pos = pos + 1; + + -- (Unused) relay node + subtree:add(p.fields.relay_node, tvb(pos, 1)); + pos = pos + 1; + + -- Encrypted payload bytes + local payload_tvb = tvb(pos); + local payload_tree = subtree:add(p.fields.payload, payload_tvb); + payload_tree:set_text("Payload: " .. payload_tvb:len() .. " bytes"); + + -- Decrypted payload (meshtastic.Data protobuf) + local protobuf_tree; + local protobuf_tvb; + local data_bytearray = tvb(pos):bytes(); + local data_size = data_bytearray:len(); + data_bytearray:set_size(256); -- Zero-pad before decrypting. + local key = get_crypto_key(proto_meshtastic.prefs.crypto_key); + if #key > 0 then + local iv = get_crypto_iv(packet_id_range, from_range); + local decrypted = string.sub(ciphermode.decryptString(key, data_bytearray:raw(), ciphermode.decryptCTR, iv), 1, data_size); + protobuf_tvb = ByteArray.new(decrypted, true):tvb("Decrypted payload"); + protobuf_tree = payload_tree:add(p.fields.payload_decrypted, protobuf_tvb()); + else + -- Channel doesn't have a decryption key, skip decryption. + protobuf_tvb = payload_tvb; + protobuf_tree = payload_tree; + end + pinfo.private["pb_msg_type"] = "message,meshtastic.Data"; + -- Call protobuf dissector, including proto_meshtastic_payload on the "payload" bytes field of the protobuf. + pcall(Dissector.call, protobuf_dissector, protobuf_tvb, pinfo, protobuf_tree); + + -- Portnum (field decoded by proto_meshtastic_payload) + local portnum = f_proto_meshtastic_Data_portnum(); + if portnum ~= nil then + subtree:add(p.fields.portnum, portnum.value); + pinfo.cols.dst_port = portnum.value; + else + protobuf_tree:add_tvb_expert_info(p.experts.malformed, protobuf_tvb); + protobuf_tree:add(p.fields.status, 0):set_hidden(true); + pinfo.cols.info:set("Malformed meshtastic.Data protobuf"); + end + + return pos +end +DissectorTable.get("loratap.syncword"):add(0x2b, proto_meshtastic); + + +function call_protobuf(msg_name, tvb, pinfo, treeitem) + pinfo.private["pb_msg_type"] = "message," .. msg_name; + pcall(Dissector.call, protobuf_dissector, tvb, pinfo, treeitem); +end + + +function proto_meshtastic_payload.dissector(tvb, pinfo, treeitem) + local portnum = f_proto_meshtastic_Data_portnum().value; + pinfo.cols.info:set("[" .. string.match(f_proto_meshtastic_Data_portnum().display, "[a-zA-Z0-9_]*") .. "]"); + + if portnum == 1 then + treeitem:add(proto_meshtastic_payload.fields.text, tvb()); + pinfo.cols.info:set("Text message: \"" .. tvb():string(ENC_UTF_8) .. "\""); + elseif portnum == 4 then + call_protobuf("meshtastic.User", tvb, pinfo, treeitem); + pinfo.cols.info:clear(); + pinfo.cols.info:set(f_from().display .. " is \"" .. f_proto_meshtastic_User_long_name().value .. "\""); + pinfo.cols.info:fence(); -- This doesn't seem to work (Protobuf dissector appends junk), but at least we tried... + names_table[tostring(pinfo.cols.src)] = f_proto_meshtastic_User_long_name().value; + elseif portnum == 2 then + call_protobuf("meshtastic.HardwareMessage", tvb, pinfo, treeitem); + elseif portnum == 3 then + call_protobuf("meshtastic.Position", tvb, pinfo, treeitem); + elseif portnum == 5 then + call_protobuf("meshtastic.Routing", tvb, pinfo, treeitem); + elseif portnum == 6 then + call_protobuf("meshtastic.AdminMessage", tvb, pinfo, treeitem); + elseif portnum == 7 then + treeitem:add("(unishox2 compressed data)"); + elseif portnum == 8 then + call_protobuf("meshtastic.Waypoint", tvb, pinfo, treeitem); + elseif portnum == 9 then + treeitem:set_text("(codec2 audio frames)"); + elseif portnum == 10 then + treeitem:add(proto_meshtastic_payload.fields.text, tvb()); + elseif portnum == 32 then + treeitem:add(proto_meshtastic_payload.fields.text, tvb()); + elseif portnum == 33 then + -- TODO: Untested. IP traffic tunneled over mesh using https://github.com/meshtastic/python/. + pcall(Dissector.call, ip_dissector, tvb, pinfo, treeitem); + elseif portnum == 34 then + call_protobuf("meshtastic.Paxcount", tvb, pinfo, treeitem); + elseif portnum == 64 then + treeitem:set_text("(binary data)"); + elseif portnum == 65 then + call_protobuf("meshtastic.StoreAndForward", tvb, pinfo, treeitem); + elseif portnum == 66 then + treeitem:add(proto_meshtastic_payload.fields.text, tvb()); + elseif portnum == 67 then + call_protobuf("meshtastic.Telemetry", tvb, pinfo, treeitem); + elseif portnum == 68 then + treeitem:set_text("(https://github.com/a-f-G-U-C/Meshtastic-ZPS?tab=readme-ov-file#message-format-details)"); + elseif portnum == 69 then + -- Simulator use. Not sure what's in it but seems unlikely to actually be broadcast. + elseif portnum == 70 then + call_protobuf("meshtastic.RouteDiscovery", tvb, pinfo, treeitem); + elseif portnum == 71 then + call_protobuf("meshtastic.NeighborInfo", tvb, pinfo, treeitem); + elseif portnum == 72 then + call_protobuf("meshtastic.TAKPacket", tvb, pinfo, treeitem); + elseif portnum == 73 then + call_protobuf("meshtastic.MapReport", tvb, pinfo, treeitem); + elseif portnum == 257 then + treeitem:set_text("(https://github.com/paulmandal/libcotshrink)"); + elseif portnum >= 256 then + treeitem:set_text("(PRIVATE_APP data)"); + end +end +DissectorTable.get("protobuf_field"):add("meshtastic.Data.payload", proto_meshtastic_payload.dissector); + diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/google/protobuf/descriptor.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/google/protobuf/descriptor.proto new file mode 100644 index 0000000..04cddf5 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/google/protobuf/descriptor.proto @@ -0,0 +1,1296 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + +syntax = "proto2"; + +package google.protobuf; + +option go_package = "google.golang.org/protobuf/types/descriptorpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DescriptorProtos"; +option csharp_namespace = "Google.Protobuf.Reflection"; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// The full set of known editions. +enum Edition { + // A placeholder for an unknown edition value. + EDITION_UNKNOWN = 0; + + // A placeholder edition for specifying default behaviors *before* a feature + // was first introduced. This is effectively an "infinite past". + EDITION_LEGACY = 900; + + // Legacy syntax "editions". These pre-date editions, but behave much like + // distinct editions. These can't be used to specify the edition of proto + // files, but feature definitions must supply proto2/proto3 defaults for + // backwards compatibility. + EDITION_PROTO2 = 998; + EDITION_PROTO3 = 999; + + // Editions that have been released. The specific values are arbitrary and + // should not be depended on, but they will always be time-ordered for easy + // comparison. + EDITION_2023 = 1000; + EDITION_2024 = 1001; + + // Placeholder editions for testing feature resolution. These should not be + // used or relyed on outside of tests. + EDITION_1_TEST_ONLY = 1; + EDITION_2_TEST_ONLY = 2; + EDITION_99997_TEST_ONLY = 99997; + EDITION_99998_TEST_ONLY = 99998; + EDITION_99999_TEST_ONLY = 99999; + + // Placeholder for specifying unbounded edition support. This should only + // ever be used by plugins that can expect to never require any changes to + // support a new edition. + EDITION_MAX = 0x7FFFFFFF; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2", "proto3", and "editions". + // + // If `edition` is present, this value must be "editions". + optional string syntax = 12; + + // The edition of the proto file. + optional Edition edition = 14; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + + optional ExtensionRangeOptions options = 3; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // Range of reserved tag numbers. Reserved tag numbers may not be used by + // fields or extension ranges in the same message. Reserved ranges may + // not overlap. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +message ExtensionRangeOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + message Declaration { + // The extension number declared within the extension range. + optional int32 number = 1; + + // The fully-qualified name of the extension field. There must be a leading + // dot in front of the full name. + optional string full_name = 2; + + // The fully-qualified type name of the extension field. Unlike + // Metadata.type, Declaration.type must have a leading dot for messages + // and enums. + optional string type = 3; + + // If true, indicates that the number is reserved in the extension range, + // and any extension field with the number will fail to compile. Set this + // when a declared extension field is deleted. + optional bool reserved = 5; + + // If true, indicates that the extension must be defined as repeated. + // Otherwise the extension must be defined as optional. + optional bool repeated = 6; + + reserved 4; // removed is_repeated + } + + // For external users: DO NOT USE. We are in the process of open sourcing + // extension declaration and executing internal cleanups before it can be + // used externally. + repeated Declaration declaration = 2 [retention = RETENTION_SOURCE]; + + // Any features defined in the specific edition. + optional FeatureSet features = 50; + + // The verification state of the extension range. + enum VerificationState { + // All the extensions of the range must be declared. + DECLARATION = 0; + UNVERIFIED = 1; + } + + // The verification state of the range. + // TODO: flip the default to DECLARATION once all empty ranges + // are marked as UNVERIFIED. + optional VerificationState verification = 3 + [default = UNVERIFIED, retention = RETENTION_SOURCE]; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported after google.protobuf. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. In Editions, the group wire format + // can be enabled via the `message_encoding` feature. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + } + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REPEATED = 3; + // The required label is only allowed in google.protobuf. In proto3 and Editions + // it's explicitly prohibited. In Editions, the `field_presence` feature + // can be used to get this behavior. + LABEL_REQUIRED = 2; + } + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + optional Type type = 5; + + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + optional string json_name = 10; + + optional FieldOptions options = 8; + + // If true, this is a proto3 "optional". When a proto3 field is optional, it + // tracks presence regardless of field type. + // + // When proto3_optional is true, this field must belong to a oneof to signal + // to old proto3 clients that presence is tracked for this field. This oneof + // is known as a "synthetic" oneof, and this field must be its sole member + // (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs + // exist in the descriptor only, and do not generate any API. Synthetic oneofs + // must be ordered after all "real" oneofs. + // + // For message fields, proto3_optional doesn't create any semantic change, + // since non-repeated message fields always track presence. However it still + // indicates the semantic detail of whether the user wrote "optional" or not. + // This can be useful for round-tripping the .proto file. For consistency we + // give message fields a synthetic oneof also, even though it is not required + // to track presence. This is especially important because the parser can't + // tell if a field is a message or an enum, so it must always create a + // synthetic oneof. + // + // Proto2 optional fields do not set this flag, because they already indicate + // optional with `LABEL_OPTIONAL`. + optional bool proto3_optional = 17; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; + + // Range of reserved numeric values. Reserved values may not be used by + // entries in the same enum. Reserved ranges may not overlap. + // + // Note that this is distinct from DescriptorProto.ReservedRange in that it + // is inclusive such that it can appropriately represent the entire int32 + // domain. + message EnumReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. + } + + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + repeated EnumReservedRange reserved_range = 4; + + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + repeated string reserved_name = 5; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default = false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default = false]; +} + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + +message FileOptions { + + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + optional string java_package = 1; + + // Controls the name of the wrapper Java class generated for the .proto file. + // That class will always contain the .proto file's getDescriptor() method as + // well as any top-level extensions defined in the .proto file. + // If java_multiple_files is disabled, then all the other classes from the + // .proto file will be nested inside the single wrapper outer class. + optional string java_outer_classname = 8; + + // If enabled, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the wrapper class + // named by java_outer_classname. However, the wrapper class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + optional bool java_multiple_files = 10 [default = false]; + + // This option does nothing. + optional bool java_generate_equals_and_hash = 20 [deprecated=true]; + + // A proto2 file can set this to true to opt in to UTF-8 checking for Java, + // which will throw an exception if invalid UTF-8 is parsed from the wire or + // assigned to a string field. + // + // TODO: clarify exactly what kinds of field types this option + // applies to, and update these docs accordingly. + // + // Proto3 files already perform these checks. Setting the option explicitly to + // false has no effect: it cannot be used to opt proto3 files out of UTF-8 + // checks. + optional bool java_string_check_utf8 = 27 [default = false]; + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default = SPEED]; + + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + optional string go_package = 11; + + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + optional bool cc_generic_services = 16 [default = false]; + optional bool java_generic_services = 17 [default = false]; + optional bool py_generic_services = 18 [default = false]; + reserved 42; // removed php_generic_services + reserved "php_generic_services"; + + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + optional bool deprecated = 23 [default = false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default = true]; + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + optional string swift_prefix = 39; + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + optional string php_class_prefix = 40; + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + optional string php_namespace = 41; + + // Use this option to change the namespace of php generated metadata classes. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. + optional string php_metadata_namespace = 44; + + // Use this option to change the package of ruby generated classes. Default + // is empty. When this option is not set, the package name will be used for + // determining the ruby package. + optional string ruby_package = 45; + + // Any features defined in the specific edition. + optional FeatureSet features = 50; + + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. + // See the documentation for the "Options" section above. + extensions 1000 to max; + + reserved 38; +} + +message MessageOptions { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + optional bool message_set_wire_format = 1 [default = false]; + + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + optional bool no_standard_descriptor_accessor = 2 [default = false]; + + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + optional bool deprecated = 3 [default = false]; + + reserved 4, 5, 6; + + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementations still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + optional bool map_entry = 7; + + reserved 8; // javalite_serializable + reserved 9; // javanano_as_lite + + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // + // This should only be used as a temporary measure against broken builds due + // to the change in behavior for JSON field name conflicts. + // + // TODO This is legacy behavior we plan to remove once downstream + // teams have had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + + // Any features defined in the specific edition. + optional FeatureSet features = 12; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is only implemented to support use of + // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + // type "bytes" in the open source release. + // TODO: make ctype actually deprecated. + optional CType ctype = 1 [/*deprecated = true,*/ default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + // The option [ctype=CORD] may be applied to a non-repeated field of type + // "bytes". It indicates that in C++, the data should be stored in a Cord + // instead of a string. For very large strings, this may reduce memory + // fragmentation. It may also allow better performance when parsing from a + // Cord, or when parsing with aliasing enabled, as the parsed Cord may then + // alias the original buffer. + CORD = 1; + + STRING_PIECE = 2; + } + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. This option is prohibited in + // Editions, but the `repeated_field_encoding` feature can be used to control + // the behavior. + optional bool packed = 2; + + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // Note that lazy message fields are still eagerly verified to check + // ill-formed wireformat or missing required fields. Calling IsInitialized() + // on the outer message would fail if the inner message has missing required + // fields. Failed verification would result in parsing failure (except when + // uninitialized messages are acceptable). + optional bool lazy = 5 [default = false]; + + // unverified_lazy does no correctness checks on the byte stream. This should + // only be used where lazy with verification is prohibitive for performance + // reasons. + optional bool unverified_lazy = 15 [default = false]; + + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + optional bool deprecated = 3 [default = false]; + + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default = false]; + + // Indicate that the field value should not be printed out when using debug + // formats, e.g. when the field contains sensitive credentials. + optional bool debug_redact = 16 [default = false]; + + // If set to RETENTION_SOURCE, the option will be omitted from the binary. + // Note: as of January 2023, support for this is in progress and does not yet + // have an effect (b/264593489). + enum OptionRetention { + RETENTION_UNKNOWN = 0; + RETENTION_RUNTIME = 1; + RETENTION_SOURCE = 2; + } + + optional OptionRetention retention = 17; + + // This indicates the types of entities that the field may apply to when used + // as an option. If it is unset, then the field may be freely used as an + // option on any kind of entity. Note: as of January 2023, support for this is + // in progress and does not yet have an effect (b/264593489). + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0; + TARGET_TYPE_FILE = 1; + TARGET_TYPE_EXTENSION_RANGE = 2; + TARGET_TYPE_MESSAGE = 3; + TARGET_TYPE_FIELD = 4; + TARGET_TYPE_ONEOF = 5; + TARGET_TYPE_ENUM = 6; + TARGET_TYPE_ENUM_ENTRY = 7; + TARGET_TYPE_SERVICE = 8; + TARGET_TYPE_METHOD = 9; + } + + repeated OptionTargetType targets = 19; + + message EditionDefault { + optional Edition edition = 3; + optional string value = 2; // Textproto value. + } + repeated EditionDefault edition_defaults = 20; + + // Any features defined in the specific edition. + optional FeatureSet features = 21; + + // Information about the support window of a feature. + message FeatureSupport { + // The edition that this feature was first available in. In editions + // earlier than this one, the default assigned to EDITION_LEGACY will be + // used, and proto files will not be able to override it. + optional Edition edition_introduced = 1; + + // The edition this feature becomes deprecated in. Using this after this + // edition may trigger warnings. + optional Edition edition_deprecated = 2; + + // The deprecation warning text if this feature is used after the edition it + // was marked deprecated in. + optional string deprecation_warning = 3; + + // The edition this feature is no longer available in. In editions after + // this one, the last default assigned will be used, and proto files will + // not be able to override it. + optional Edition edition_removed = 4; + } + optional FeatureSupport feature_support = 22; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + reserved 4; // removed jtype + reserved 18; // reserve target, target_obsolete_do_not_use +} + +message OneofOptions { + // Any features defined in the specific edition. + optional FeatureSet features = 1; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + optional bool deprecated = 3 [default = false]; + + reserved 5; // javanano_as_lite + + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // TODO Remove this legacy behavior once downstream teams have + // had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + + // Any features defined in the specific edition. + optional FeatureSet features = 7; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + optional bool deprecated = 1 [default = false]; + + // Any features defined in the specific edition. + optional FeatureSet features = 2; + + // Indicate that fields annotated with this enum value should not be printed + // out when using debug formats, e.g. when the field contains sensitive + // credentials. + optional bool debug_redact = 3 [default = false]; + + // Information about the support window of a feature value. + optional FieldOptions.FeatureSupport feature_support = 4; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + + // Any features defined in the specific edition. + optional FeatureSet features = 34; + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + optional bool deprecated = 33 [default = false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + optional bool deprecated = 33 [default = false]; + + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + // or neither? HTTP based RPC implementation may choose GET verb for safe + // methods, and PUT verb for idempotent methods instead of the default POST. + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0; + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects + } + optional IdempotencyLevel idempotency_level = 34 + [default = IDEMPOTENCY_UNKNOWN]; + + // Any features defined in the specific edition. + optional FeatureSet features = 35; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +message UninterpretedOption { + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). + // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + // "foo.(bar.baz).moo". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Features + +// TODO Enums in C++ gencode (and potentially other languages) are +// not well scoped. This means that each of the feature enums below can clash +// with each other. The short names we've chosen maximize call-site +// readability, but leave us very open to this scenario. A future feature will +// be designed and implemented to handle this, hopefully before we ever hit a +// conflict here. +message FeatureSet { + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0; + EXPLICIT = 1; + IMPLICIT = 2; + LEGACY_REQUIRED = 3; + } + optional FieldPresence field_presence = 1 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "EXPLICIT" }, + edition_defaults = { edition: EDITION_PROTO3, value: "IMPLICIT" }, + edition_defaults = { edition: EDITION_2023, value: "EXPLICIT" } + ]; + + enum EnumType { + ENUM_TYPE_UNKNOWN = 0; + OPEN = 1; + CLOSED = 2; + } + optional EnumType enum_type = 2 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "CLOSED" }, + edition_defaults = { edition: EDITION_PROTO3, value: "OPEN" } + ]; + + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0; + PACKED = 1; + EXPANDED = 2; + } + optional RepeatedFieldEncoding repeated_field_encoding = 3 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "EXPANDED" }, + edition_defaults = { edition: EDITION_PROTO3, value: "PACKED" } + ]; + + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0; + VERIFY = 2; + NONE = 3; + reserved 1; + } + optional Utf8Validation utf8_validation = 4 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "NONE" }, + edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" } + ]; + + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0; + LENGTH_PREFIXED = 1; + DELIMITED = 2; + } + optional MessageEncoding message_encoding = 5 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "LENGTH_PREFIXED" } + ]; + + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0; + ALLOW = 1; + LEGACY_BEST_EFFORT = 2; + } + optional JsonFormat json_format = 6 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_MESSAGE, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "LEGACY_BEST_EFFORT" }, + edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" } + ]; + + reserved 999; + + // extensions 1000 to 9994 [ + // declaration = { + // number: 1000, + // full_name: ".pb.cpp", + // type: ".pb.CppFeatures" + // }, + // declaration = { + // number: 1001, + // full_name: ".pb.java", + // type: ".pb.JavaFeatures" + // }, + // declaration = { number: 1002, full_name: ".pb.go", type: ".pb.GoFeatures" }, + // declaration = { + // number: 9990, + // full_name: ".pb.proto1", + // type: ".pb.Proto1Features" + // } + // ]; + + extensions 9995 to 9999; // For internal testing + extensions 10000; // for https://github.com/bufbuild/protobuf-es +} + +// A compiled specification for the defaults of a set of features. These +// messages are generated from FeatureSet extensions and can be used to seed +// feature resolution. The resolution with this object becomes a simple search +// for the closest matching edition, followed by proto merges. +message FeatureSetDefaults { + // A map from every known edition with a unique set of defaults to its + // defaults. Not all editions may be contained here. For a given edition, + // the defaults at the closest matching edition ordered at or before it should + // be used. This field must be in strict ascending order by edition. + message FeatureSetEditionDefault { + optional Edition edition = 3; + + // Defaults of features that can be overridden in this edition. + optional FeatureSet overridable_features = 4; + + // Defaults of features that can't be overridden in this edition. + optional FeatureSet fixed_features = 5; + + reserved 1, 2; + reserved "features"; + } + repeated FeatureSetEditionDefault defaults = 1; + + // The minimum supported edition (inclusive) when this was constructed. + // Editions before this will not have defaults. + optional Edition minimum_edition = 4; + + // The maximum known edition (inclusive) when this was constructed. Editions + // after this will not have reliable defaults. + optional Edition maximum_edition = 5; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendant. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + repeated Location location = 1; + message Location { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition appears. + // For example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + repeated int32 path = 1 [packed = true]; + + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + repeated int32 span = 2 [packed = true]; + + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to moo. + // // + // // Another line attached to moo. + // optional double moo = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to moo or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed = true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // Identifies the ending offset in bytes in the generated code that + // relates to the identified object. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + optional int32 end = 4; + + // Represents the identified object's effect on the element in the original + // .proto file. + enum Semantic { + // There is no effect or the effect is indescribable. + NONE = 0; + // The element is set or otherwise mutated. + SET = 1; + // An alias to the element is returned. + ALIAS = 2; + } + optional Semantic semantic = 5; + } +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/admin.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/admin.options new file mode 100644 index 0000000..4804d89 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/admin.options @@ -0,0 +1,12 @@ +*AdminMessage.payload_variant anonymous_oneof:true + +*AdminMessage.set_canned_message_module_messages max_size:201 +*AdminMessage.get_canned_message_module_messages_response max_size:201 +*AdminMessage.delete_file_request max_size:201 + +*AdminMessage.set_ringtone_message max_size:231 +*AdminMessage.get_ringtone_response max_size:231 + +*HamParameters.call_sign max_size:8 +*HamParameters.short_name max_size:5 +*NodeRemoteHardwarePinsResponse.node_remote_hardware_pins max_count:16 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/admin.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/admin.proto new file mode 100644 index 0000000..9ddf856 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/admin.proto @@ -0,0 +1,388 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/channel.proto"; +import "meshtastic/config.proto"; +import "meshtastic/connection_status.proto"; +import "meshtastic/mesh.proto"; +import "meshtastic/module_config.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "AdminProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * This message is handled by the Admin module and is responsible for all settings/channel read/write operations. + * This message is used to do settings operations to both remote AND local nodes. + * (Prior to 1.2 these operations were done via special ToRadio operations) + */ +message AdminMessage { + /* + * TODO: REPLACE + */ + enum ConfigType { + /* + * TODO: REPLACE + */ + DEVICE_CONFIG = 0; + + /* + * TODO: REPLACE + */ + POSITION_CONFIG = 1; + + /* + * TODO: REPLACE + */ + POWER_CONFIG = 2; + + /* + * TODO: REPLACE + */ + NETWORK_CONFIG = 3; + + /* + * TODO: REPLACE + */ + DISPLAY_CONFIG = 4; + + /* + * TODO: REPLACE + */ + LORA_CONFIG = 5; + + /* + * TODO: REPLACE + */ + BLUETOOTH_CONFIG = 6; + } + + /* + * TODO: REPLACE + */ + enum ModuleConfigType { + /* + * TODO: REPLACE + */ + MQTT_CONFIG = 0; + + /* + * TODO: REPLACE + */ + SERIAL_CONFIG = 1; + + /* + * TODO: REPLACE + */ + EXTNOTIF_CONFIG = 2; + + /* + * TODO: REPLACE + */ + STOREFORWARD_CONFIG = 3; + + /* + * TODO: REPLACE + */ + RANGETEST_CONFIG = 4; + + /* + * TODO: REPLACE + */ + TELEMETRY_CONFIG = 5; + + /* + * TODO: REPLACE + */ + CANNEDMSG_CONFIG = 6; + + /* + * TODO: REPLACE + */ + AUDIO_CONFIG = 7; + + /* + * TODO: REPLACE + */ + REMOTEHARDWARE_CONFIG = 8; + + /* + * TODO: REPLACE + */ + NEIGHBORINFO_CONFIG = 9; + + /* + * TODO: REPLACE + */ + AMBIENTLIGHTING_CONFIG = 10; + + /* + * TODO: REPLACE + */ + DETECTIONSENSOR_CONFIG = 11; + + /* + * TODO: REPLACE + */ + PAXCOUNTER_CONFIG = 12; + } + + /* + * TODO: REPLACE + */ + oneof payload_variant { + /* + * Send the specified channel in the response to this message + * NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present) + */ + uint32 get_channel_request = 1; + + /* + * TODO: REPLACE + */ + Channel get_channel_response = 2; + + /* + * Send the current owner data in the response to this message. + */ + bool get_owner_request = 3; + + /* + * TODO: REPLACE + */ + User get_owner_response = 4; + + /* + * Ask for the following config data to be sent + */ + ConfigType get_config_request = 5; + + /* + * Send the current Config in the response to this message. + */ + Config get_config_response = 6; + + /* + * Ask for the following config data to be sent + */ + ModuleConfigType get_module_config_request = 7; + + /* + * Send the current Config in the response to this message. + */ + ModuleConfig get_module_config_response = 8; + + /* + * Get the Canned Message Module messages in the response to this message. + */ + bool get_canned_message_module_messages_request = 10; + + /* + * Get the Canned Message Module messages in the response to this message. + */ + string get_canned_message_module_messages_response = 11; + + /* + * Request the node to send device metadata (firmware, protobuf version, etc) + */ + bool get_device_metadata_request = 12; + + /* + * Device metadata response + */ + DeviceMetadata get_device_metadata_response = 13; + + /* + * Get the Ringtone in the response to this message. + */ + bool get_ringtone_request = 14; + + /* + * Get the Ringtone in the response to this message. + */ + string get_ringtone_response = 15; + + /* + * Request the node to send it's connection status + */ + bool get_device_connection_status_request = 16; + + /* + * Device connection status response + */ + DeviceConnectionStatus get_device_connection_status_response = 17; + + /* + * Setup a node for licensed amateur (ham) radio operation + */ + HamParameters set_ham_mode = 18; + + /* + * Get the mesh's nodes with their available gpio pins for RemoteHardware module use + */ + bool get_node_remote_hardware_pins_request = 19; + + /* + * Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use + */ + NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response = 20; + + /* + * Enter (UF2) DFU mode + * Only implemented on NRF52 currently + */ + bool enter_dfu_mode_request = 21; + + /* + * Delete the file by the specified path from the device + */ + string delete_file_request = 22; + + /* + * Set zero and offset for scale chips + */ + uint32 set_scale = 23; + + /* + * Set the owner for this node + */ + User set_owner = 32; + + /* + * Set channels (using the new API). + * A special channel is the "primary channel". + * The other records are secondary channels. + * Note: only one channel can be marked as primary. + * If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically. + */ + Channel set_channel = 33; + + /* + * Set the current Config + */ + Config set_config = 34; + + /* + * Set the current Config + */ + ModuleConfig set_module_config = 35; + + /* + * Set the Canned Message Module messages text. + */ + string set_canned_message_module_messages = 36; + + /* + * Set the ringtone for ExternalNotification. + */ + string set_ringtone_message = 37; + + /* + * Remove the node by the specified node-num from the NodeDB on the device + */ + uint32 remove_by_nodenum = 38; + + /* + * Set specified node-num to be favorited on the NodeDB on the device + */ + uint32 set_favorite_node = 39; + + /* + * Set specified node-num to be un-favorited on the NodeDB on the device + */ + uint32 remove_favorite_node = 40; + + /* + * Set fixed position data on the node and then set the position.fixed_position = true + */ + Position set_fixed_position = 41; + + /* + * Clear fixed position coordinates and then set position.fixed_position = false + */ + bool remove_fixed_position = 42; + + /* + * Begins an edit transaction for config, module config, owner, and channel settings changes + * This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) + */ + bool begin_edit_settings = 64; + + /* + * Commits an open transaction for any edits made to config, module config, owner, and channel settings + */ + bool commit_edit_settings = 65; + + /* + * Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot) + * Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth. + */ + int32 reboot_ota_seconds = 95; + + /* + * This message is only supported for the simulator Portduino build. + * If received the simulator will exit successfully. + */ + bool exit_simulator = 96; + + /* + * Tell the node to reboot in this many seconds (or <0 to cancel reboot) + */ + int32 reboot_seconds = 97; + + /* + * Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) + */ + int32 shutdown_seconds = 98; + + /* + * Tell the node to factory reset, all device settings will be returned to factory defaults. + */ + int32 factory_reset = 99; + + /* + * Tell the node to reset the nodedb. + */ + int32 nodedb_reset = 100; + } +} + +/* + * Parameters for setting up Meshtastic for ameteur radio usage + */ +message HamParameters { + /* + * Amateur radio call sign, eg. KD2ABC + */ + string call_sign = 1; + + /* + * Transmit power in dBm at the LoRA transceiver, not including any amplification + */ + int32 tx_power = 2; + + /* + * The selected frequency of LoRA operation + * Please respect your local laws, regulations, and band plans. + * Ensure your radio is capable of operating of the selected frequency before setting this. + */ + float frequency = 3; + + /* + * Optional short name of user + */ + string short_name = 4; +} + +/* + * Response envelope for node_remote_hardware_pins + */ +message NodeRemoteHardwarePinsResponse { + /* + * Nodes and their respective remote hardware GPIO pins + */ + repeated NodeRemoteHardwarePin node_remote_hardware_pins = 1; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/apponly.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/apponly.options new file mode 100644 index 0000000..28244de --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/apponly.options @@ -0,0 +1 @@ +*ChannelSet.settings max_count:8 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/apponly.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/apponly.proto new file mode 100644 index 0000000..100833f --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/apponly.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/channel.proto"; +import "meshtastic/config.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "AppOnlyProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * This is the most compact possible representation for a set of channels. + * It includes only one PRIMARY channel (which must be first) and + * any SECONDARY channels. + * No DISABLED channels are included. + * This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL + */ +message ChannelSet { + /* + * Channel list with settings + */ + repeated ChannelSettings settings = 1; + + /* + * LoRa config + */ + Config.LoRaConfig lora_config = 2; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/atak.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/atak.options new file mode 100644 index 0000000..6baa7ea --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/atak.options @@ -0,0 +1,7 @@ +*Contact.callsign max_size:120 +*Contact.device_callsign max_size:120 +*Status.battery int_size:8 +*PLI.course int_size:16 +*GeoChat.message max_size:200 +*GeoChat.to max_size:120 +*GeoChat.to_callsign max_size:120 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/atak.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/atak.proto new file mode 100644 index 0000000..ccde335 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/atak.proto @@ -0,0 +1,257 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ATAKProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Packets for the official ATAK Plugin + */ +message TAKPacket { + /* + * Are the payloads strings compressed for LoRA transport? + */ + bool is_compressed = 1; + /* + * The contact / callsign for ATAK user + */ + Contact contact = 2; + /* + * The group for ATAK user + */ + Group group = 3; + /* + * The status of the ATAK EUD + */ + Status status = 4; + /* + * The payload of the packet + */ + oneof payload_variant { + /* + * TAK position report + */ + PLI pli = 5; + /* + * ATAK GeoChat message + */ + GeoChat chat = 6; + } +} + +/* + * ATAK GeoChat message + */ +message GeoChat { + /* + * The text message + */ + string message = 1; + + /* + * Uid recipient of the message + */ + optional string to = 2; + + /* + * Callsign of the recipient for the message + */ + optional string to_callsign = 3; +} + +/* + * ATAK Group + * <__group role='Team Member' name='Cyan'/> + */ +message Group { + /* + * Role of the group member + */ + MemberRole role = 1; + /* + * Team (color) + * Default Cyan + */ + Team team = 2; +} + +enum Team { + /* + * Unspecifed + */ + Unspecifed_Color = 0; + /* + * White + */ + White = 1; + /* + * Yellow + */ + Yellow = 2; + /* + * Orange + */ + Orange = 3; + /* + * Magenta + */ + Magenta = 4; + /* + * Red + */ + Red = 5; + /* + * Maroon + */ + Maroon = 6; + /* + * Purple + */ + Purple = 7; + /* + * Dark Blue + */ + Dark_Blue = 8; + /* + * Blue + */ + Blue = 9; + /* + * Cyan + */ + Cyan = 10; + /* + * Teal + */ + Teal = 11; + /* + * Green + */ + Green = 12; + /* + * Dark Green + */ + Dark_Green = 13; + /* + * Brown + */ + Brown = 14; +} + +/* + * Role of the group member + */ +enum MemberRole { + /* + * Unspecifed + */ + Unspecifed = 0; + /* + * Team Member + */ + TeamMember = 1; + /* + * Team Lead + */ + TeamLead = 2; + /* + * Headquarters + */ + HQ = 3; + /* + * Airsoft enthusiast + */ + Sniper = 4; + /* + * Medic + */ + Medic = 5; + /* + * ForwardObserver + */ + ForwardObserver = 6; + /* + * Radio Telephone Operator + */ + RTO = 7; + /* + * Doggo + */ + K9 = 8; +} + +/* + * ATAK EUD Status + * + */ +message Status { + /* + * Battery level + */ + uint32 battery = 1; +} + +/* + * ATAK Contact + * + */ +message Contact { + /* + * Callsign + */ + string callsign = 1; + + /* + * Device callsign + */ + string device_callsign = 2; + /* + * IP address of endpoint in integer form (0.0.0.0 default) + */ + // fixed32 enpoint_address = 3; + /* + * Port of endpoint (4242 default) + */ + // uint32 endpoint_port = 4; + /* + * Phone represented as integer + * Terrible practice, but we really need the wire savings + */ + // uint32 phone = 4; +} + +/* + * Position Location Information from ATAK + */ +message PLI { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 longitude_i = 2; + + /* + * Altitude (ATAK prefers HAE) + */ + int32 altitude = 3; + + /* + * Speed + */ + uint32 speed = 4; + + /* + * Course in degrees + */ + uint32 course = 5; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/cannedmessages.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/cannedmessages.options new file mode 100644 index 0000000..c1d537b --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/cannedmessages.options @@ -0,0 +1 @@ +*CannedMessageModuleConfig.messages max_size:201 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/cannedmessages.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/cannedmessages.proto new file mode 100644 index 0000000..baa5134 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/cannedmessages.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "CannedMessageConfigProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Canned message module configuration. + */ +message CannedMessageModuleConfig { + /* + * Predefined messages for canned message module separated by '|' characters. + */ + string messages = 1; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/channel.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/channel.options new file mode 100644 index 0000000..d0bdcbc --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/channel.options @@ -0,0 +1,5 @@ +*Channel.index int_size:8 + +# 256 bit or 128 bit psk key +*ChannelSettings.psk max_size:32 +*ChannelSettings.name max_size:12 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/channel.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/channel.proto new file mode 100644 index 0000000..16c8c19 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/channel.proto @@ -0,0 +1,156 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ChannelProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * This information can be encoded as a QRcode/url so that other users can configure + * their radio to join the same channel. + * A note about how channel names are shown to users: channelname-X + * poundsymbol is a prefix used to indicate this is a channel name (idea from @professr). + * Where X is a letter from A-Z (base 26) representing a hash of the PSK for this + * channel - so that if the user changes anything about the channel (which does + * force a new PSK) this letter will also change. Thus preventing user confusion if + * two friends try to type in a channel name of "BobsChan" and then can't talk + * because their PSKs will be different. + * The PSK is hashed into this letter by "0x41 + [xor all bytes of the psk ] modulo 26" + * This also allows the option of someday if people have the PSK off (zero), the + * users COULD type in a channel name and be able to talk. + * FIXME: Add description of multi-channel support and how primary vs secondary channels are used. + * FIXME: explain how apps use channels for security. + * explain how remote settings and remote gpio are managed as an example + */ +message ChannelSettings { + /* + * Deprecated in favor of LoraConfig.channel_num + */ + uint32 channel_num = 1 [deprecated = true]; + + /* + * A simple pre-shared key for now for crypto. + * Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256). + * A special shorthand is used for 1 byte long psks. + * These psks should be treated as only minimally secure, + * because they are listed in this source code. + * Those bytes are mapped using the following scheme: + * `0` = No crypto + * `1` = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01} + * `2` through 10 = The default channel key, except with 1 through 9 added to the last byte. + * Shown to user as simple1 through 10 + */ + bytes psk = 2; + + /* + * A SHORT name that will be packed into the URL. + * Less than 12 bytes. + * Something for end users to call the channel + * If this is the empty string it is assumed that this channel + * is the special (minimally secure) "Default"channel. + * In user interfaces it should be rendered as a local language translation of "X". + * For channel_num hashing empty string will be treated as "X". + * Where "X" is selected based on the English words listed above for ModemPreset + */ + string name = 3; + + /* + * Used to construct a globally unique channel ID. + * The full globally unique ID will be: "name.id" where ID is shown as base36. + * Assuming that the number of meshtastic users is below 20K (true for a long time) + * the chance of this 64 bit random number colliding with anyone else is super low. + * And the penalty for collision is low as well, it just means that anyone trying to decrypt channel messages might need to + * try multiple candidate channels. + * Any time a non wire compatible change is made to a channel, this field should be regenerated. + * There are a small number of 'special' globally known (and fairly) insecure standard channels. + * Those channels do not have a numeric id included in the settings, but instead it is pulled from + * a table of well known IDs. + * (see Well Known Channels FIXME) + */ + fixed32 id = 4; + + /* + * If true, messages on the mesh will be sent to the *public* internet by any gateway ndoe + */ + bool uplink_enabled = 5; + + /* + * If true, messages seen on the internet will be forwarded to the local mesh. + */ + bool downlink_enabled = 6; + + /* + * Per-channel module settings. + */ + ModuleSettings module_settings = 7; +} + +/* + * This message is specifically for modules to store per-channel configuration data. + */ +message ModuleSettings { + /* + * Bits of precision for the location sent in position packets. + */ + uint32 position_precision = 1; + + /* + * Controls whether or not the phone / clients should mute the current channel + * Useful for noisy public channels you don't necessarily want to disable + */ + bool is_client_muted = 2; +} + +/* + * A pair of a channel number, mode and the (sharable) settings for that channel + */ +message Channel { + /* + * How this channel is being used (or not). + * Note: this field is an enum to give us options for the future. + * In particular, someday we might make a 'SCANNING' option. + * SCANNING channels could have different frequencies and the radio would + * occasionally check that freq to see if anything is being transmitted. + * For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow + * cross band routing as needed. + * If a device has only a single radio (the common case) only one channel can be PRIMARY at a time + * (but any number of SECONDARY channels can't be sent received on that common frequency) + */ + enum Role { + /* + * This channel is not in use right now + */ + DISABLED = 0; + + /* + * This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY + */ + PRIMARY = 1; + + /* + * Secondary channels are only used for encryption/decryption/authentication purposes. + * Their radio settings (freq etc) are ignored, only psk is used. + */ + SECONDARY = 2; + } + + /* + * The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1) + * (Someday - not currently implemented) An index of -1 could be used to mean "set by name", + * in which case the target node will find and set the channel by settings.name. + */ + int32 index = 1; + + /* + * The new settings, or NULL to disable that channel + */ + ChannelSettings settings = 2; + + /* + * TODO: REPLACE + */ + Role role = 3; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/clientonly.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/clientonly.options new file mode 100644 index 0000000..bc98b39 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/clientonly.options @@ -0,0 +1,2 @@ +*DeviceProfile.long_name max_size:40 +*DeviceProfile.short_name max_size:5 \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/clientonly.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/clientonly.proto new file mode 100644 index 0000000..b1a27b1 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/clientonly.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/localonly.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ClientOnlyProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * This abstraction is used to contain any configuration for provisioning a node on any client. + * It is useful for importing and exporting configurations. + */ +message DeviceProfile { + /* + * Long name for the node + */ + optional string long_name = 1; + + /* + * Short name of the node + */ + optional string short_name = 2; + + /* + * The url of the channels from our node + */ + optional string channel_url = 3; + + /* + * The Config of the node + */ + optional LocalConfig config = 4; + + /* + * The ModuleConfig of the node + */ + optional LocalModuleConfig module_config = 5; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/config.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/config.options new file mode 100644 index 0000000..22dcc88 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/config.options @@ -0,0 +1,17 @@ +# longest current is 45 chars, plan with a bit of buffer +*DeviceConfig.tzdef max_size:65 + +*NetworkConfig.wifi_ssid max_size:33 +*NetworkConfig.wifi_psk max_size:65 +*NetworkConfig.ntp_server max_size:33 +*NetworkConfig.rsyslog_server max_size:33 + +# Max of three ignored nodes for our testing +*LoRaConfig.ignore_incoming max_count:3 + +*LoRaConfig.tx_power int_size:8 +*LoRaConfig.bandwidth int_size:16 +*LoRaConfig.coding_rate int_size:8 +*LoRaConfig.channel_num int_size:16 + +*PowerConfig.device_battery_ina_address int_size:8 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/config.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/config.proto new file mode 100644 index 0000000..7805f71 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/config.proto @@ -0,0 +1,1012 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ConfigProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +message Config { + /* + * Configuration + */ + message DeviceConfig { + /* + * Defines the device's role on the Mesh network + */ + enum Role { + /* + * Description: App connected or stand alone messaging device. + * Technical Details: Default Role + */ + CLIENT = 0; + /* + * Description: Device that does not forward packets from other devices. + */ + CLIENT_MUTE = 1; + + /* + * Description: Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list. + * Technical Details: Mesh packets will prefer to be routed over this node. This node will not be used by client apps. + * The wifi radio and the oled screen will be put to sleep. + * This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh. + */ + ROUTER = 2; + + /* + * Description: Combination of both ROUTER and CLIENT. Not for mobile devices. + */ + ROUTER_CLIENT = 3; + + /* + * Description: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list. + * Technical Details: Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry + * or any other packet type. They will simply rebroadcast any mesh packets on the same frequency, channel num, spread factor, and coding rate. + */ + REPEATER = 4; + + /* + * Description: Broadcasts GPS position packets as priority. + * Technical Details: Position Mesh packets will be prioritized higher and sent more frequently by default. + * When used in conjunction with power.is_power_saving = true, nodes will wake up, + * send position, and then sleep for position.position_broadcast_secs seconds. + */ + TRACKER = 5; + + /* + * Description: Broadcasts telemetry packets as priority. + * Technical Details: Telemetry Mesh packets will be prioritized higher and sent more frequently by default. + * When used in conjunction with power.is_power_saving = true, nodes will wake up, + * send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. + */ + SENSOR = 6; + + /* + * Description: Optimized for ATAK system communication and reduces routine broadcasts. + * Technical Details: Used for nodes dedicated for connection to an ATAK EUD. + * Turns off many of the routine broadcasts to favor CoT packet stream + * from the Meshtastic ATAK plugin -> IMeshService -> Node + */ + TAK = 7; + + /* + * Description: Device that only broadcasts as needed for stealth or power savings. + * Technical Details: Used for nodes that "only speak when spoken to" + * Turns all of the routine broadcasts but allows for ad-hoc communication + * Still rebroadcasts, but with local only rebroadcast mode (known meshes only) + * Can be used for clandestine operation or to dramatically reduce airtime / power consumption + */ + CLIENT_HIDDEN = 8; + + /* + * Description: Broadcasts location as message to default channel regularly for to assist with device recovery. + * Technical Details: Used to automatically send a text message to the mesh + * with the current position of the device on a frequent interval: + * "I'm lost! Position: lat / long" + */ + LOST_AND_FOUND = 9; + + /* + * Description: Enables automatic TAK PLI broadcasts and reduces routine broadcasts. + * Technical Details: Turns off many of the routine broadcasts to favor ATAK CoT packet stream + * and automatic TAK PLI (position location information) broadcasts. + * Uses position module configuration to determine TAK PLI broadcast interval. + */ + TAK_TRACKER = 10; + } + + /* + * Defines the device's behavior for how messages are rebroadcast + */ + enum RebroadcastMode { + /* + * Default behavior. + * Rebroadcast any observed message, if it was on our private channel or from another mesh with the same lora params. + */ + ALL = 0; + + /* + * Same as behavior as ALL but skips packet decoding and simply rebroadcasts them. + * Only available in Repeater role. Setting this on any other roles will result in ALL behavior. + */ + ALL_SKIP_DECODING = 1; + + /* + * Ignores observed messages from foreign meshes that are open or those which it cannot decrypt. + * Only rebroadcasts message on the nodes local primary / secondary channels. + */ + LOCAL_ONLY = 2; + + /* + * Ignores observed messages from foreign meshes like LOCAL_ONLY, + * but takes it step further by also ignoring messages from nodenums not in the node's known list (NodeDB) + */ + KNOWN_ONLY = 3; + } + + /* + * Sets the role of node + */ + Role role = 1; + + /* + * Disabling this will disable the SerialConsole by not initilizing the StreamAPI + */ + bool serial_enabled = 2; + + /* + * By default we turn off logging as soon as an API client connects (to keep shared serial link quiet). + * Set this to true to leave the debug log outputting even when API is active. + */ + bool debug_log_enabled = 3; + + /* + * For boards without a hard wired button, this is the pin number that will be used + * Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. + */ + uint32 button_gpio = 4; + + /* + * For boards without a PWM buzzer, this is the pin number that will be used + * Defaults to PIN_BUZZER if defined. + */ + uint32 buzzer_gpio = 5; + + /* + * Sets the role of node + */ + RebroadcastMode rebroadcast_mode = 6; + + /* + * Send our nodeinfo this often + * Defaults to 900 Seconds (15 minutes) + */ + uint32 node_info_broadcast_secs = 7; + + /* + * Treat double tap interrupt on supported accelerometers as a button press if set to true + */ + bool double_tap_as_button_press = 8; + + /* + * If true, device is considered to be "managed" by a mesh administrator + * Clients should then limit available configuration and administrative options inside the user interface + */ + bool is_managed = 9; + + /* + * Disables the triple-press of user button to enable or disable GPS + */ + bool disable_triple_click = 10; + + /* + * POSIX Timezone definition string from https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv. + */ + string tzdef = 11; + + /* + * If true, disable the default blinking LED (LED_PIN) behavior on the device + */ + bool led_heartbeat_disabled = 12; + } + + /* + * Position Config + */ + message PositionConfig { + /* + * Bit field of boolean configuration options, indicating which optional + * fields to include when assembling POSITION messages. + * Longitude, latitude, altitude, speed, heading, and DOP + * are always included (also time if GPS-synced) + * NOTE: the more fields are included, the larger the message will be - + * leading to longer airtime and a higher risk of packet loss + */ + enum PositionFlags { + /* + * Required for compilation + */ + UNSET = 0x0000; + + /* + * Include an altitude value (if available) + */ + ALTITUDE = 0x0001; + + /* + * Altitude value is MSL + */ + ALTITUDE_MSL = 0x0002; + + /* + * Include geoidal separation + */ + GEOIDAL_SEPARATION = 0x0004; + + /* + * Include the DOP value ; PDOP used by default, see below + */ + DOP = 0x0008; + + /* + * If POS_DOP set, send separate HDOP / VDOP values instead of PDOP + */ + HVDOP = 0x0010; + + /* + * Include number of "satellites in view" + */ + SATINVIEW = 0x0020; + + /* + * Include a sequence number incremented per packet + */ + SEQ_NO = 0x0040; + + /* + * Include positional timestamp (from GPS solution) + */ + TIMESTAMP = 0x0080; + + /* + * Include positional heading + * Intended for use with vehicle not walking speeds + * walking speeds are likely to be error prone like the compass + */ + HEADING = 0x0100; + + /* + * Include positional speed + * Intended for use with vehicle not walking speeds + * walking speeds are likely to be error prone like the compass + */ + SPEED = 0x0200; + } + + enum GpsMode { + /* + * GPS is present but disabled + */ + DISABLED = 0; + + /* + * GPS is present and enabled + */ + ENABLED = 1; + + /* + * GPS is not present on the device + */ + NOT_PRESENT = 2; + } + + /* + * We should send our position this often (but only if it has changed significantly) + * Defaults to 15 minutes + */ + uint32 position_broadcast_secs = 1; + + /* + * Adaptive position braoadcast, which is now the default. + */ + bool position_broadcast_smart_enabled = 2; + + /* + * If set, this node is at a fixed position. + * We will generate GPS position updates at the regular interval, but use whatever the last lat/lon/alt we have for the node. + * The lat/lon/alt can be set by an internal GPS or with the help of the app. + */ + bool fixed_position = 3; + + /* + * Is GPS enabled for this node? + */ + bool gps_enabled = 4 [deprecated = true]; + + /* + * How often should we try to get GPS position (in seconds) + * or zero for the default of once every 30 seconds + * or a very large value (maxint) to update only once at boot. + */ + uint32 gps_update_interval = 5; + + /* + * Deprecated in favor of using smart / regular broadcast intervals as implicit attempt time + */ + uint32 gps_attempt_time = 6 [deprecated = true]; + + /* + * Bit field of boolean configuration options for POSITION messages + * (bitwise OR of PositionFlags) + */ + uint32 position_flags = 7; + + /* + * (Re)define GPS_RX_PIN for your board. + */ + uint32 rx_gpio = 8; + + /* + * (Re)define GPS_TX_PIN for your board. + */ + uint32 tx_gpio = 9; + + /* + * The minimum distance in meters traveled (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + */ + uint32 broadcast_smart_minimum_distance = 10; + + /* + * The minimum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + */ + uint32 broadcast_smart_minimum_interval_secs = 11; + + /* + * (Re)define PIN_GPS_EN for your board. + */ + uint32 gps_en_gpio = 12; + + /* + * Set where GPS is enabled, disabled, or not present + */ + GpsMode gps_mode = 13; + } + + /* + * Power Config\ + * See [Power Config](/docs/settings/config/power) for additional power config details. + */ + message PowerConfig { + /* + * Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. + * Don't use this setting if you want to use your device with the phone apps or are using a device without a user button. + * Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles + */ + bool is_power_saving = 1; + + /* + * Description: If non-zero, the device will fully power off this many seconds after external power is removed. + */ + uint32 on_battery_shutdown_after_secs = 2; + + /* + * Ratio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k) + * Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation. + * https://meshtastic.org/docs/configuration/radio/power/#adc-multiplier-override + * Should be set to floating point value between 2 and 6 + */ + float adc_multiplier_override = 3; + + /* + * Description: The number of seconds for to wait before turning off BLE in No Bluetooth states + * Technical Details: ESP32 Only 0 for default of 1 minute + */ + uint32 wait_bluetooth_secs = 4; + + /* + * Super Deep Sleep Seconds + * While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep + * for this value (default 1 year) or a button press + * 0 for default of one year + */ + uint32 sds_secs = 6; + + /* + * Description: In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on + * Technical Details: ESP32 Only 0 for default of 300 + */ + uint32 ls_secs = 7; + + /* + * Description: While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value + * Technical Details: ESP32 Only 0 for default of 10 seconds + */ + uint32 min_wake_secs = 8; + + /* + * I2C address of INA_2XX to use for reading device battery voltage + */ + uint32 device_battery_ina_address = 9; + } + + /* + * Network Config + */ + message NetworkConfig { + enum AddressMode { + /* + * obtain ip address via DHCP + */ + DHCP = 0; + + /* + * use static ip address + */ + STATIC = 1; + } + + message IpV4Config { + /* + * Static IP address + */ + fixed32 ip = 1; + + /* + * Static gateway address + */ + fixed32 gateway = 2; + + /* + * Static subnet mask + */ + fixed32 subnet = 3; + + /* + * Static DNS server address + */ + fixed32 dns = 4; + } + + /* + * Enable WiFi (disables Bluetooth) + */ + bool wifi_enabled = 1; + + /* + * If set, this node will try to join the specified wifi network and + * acquire an address via DHCP + */ + string wifi_ssid = 3; + + /* + * If set, will be use to authenticate to the named wifi + */ + string wifi_psk = 4; + + /* + * NTP server to use if WiFi is conneced, defaults to `0.pool.ntp.org` + */ + string ntp_server = 5; + + /* + * Enable Ethernet + */ + bool eth_enabled = 6; + + /* + * acquire an address via DHCP or assign static + */ + AddressMode address_mode = 7; + + /* + * struct to keep static address + */ + IpV4Config ipv4_config = 8; + + /* + * rsyslog Server and Port + */ + string rsyslog_server = 9; + } + + /* + * Display Config + */ + message DisplayConfig { + /* + * How the GPS coordinates are displayed on the OLED screen. + */ + enum GpsCoordinateFormat { + /* + * GPS coordinates are displayed in the normal decimal degrees format: + * DD.DDDDDD DDD.DDDDDD + */ + DEC = 0; + + /* + * GPS coordinates are displayed in the degrees minutes seconds format: + * DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant + */ + DMS = 1; + + /* + * Universal Transverse Mercator format: + * ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing + */ + UTM = 2; + + /* + * Military Grid Reference System format: + * ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square, + * E is easting, N is northing + */ + MGRS = 3; + + /* + * Open Location Code (aka Plus Codes). + */ + OLC = 4; + + /* + * Ordnance Survey Grid Reference (the National Grid System of the UK). + * Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square, + * E is the easting, N is the northing + */ + OSGR = 5; + } + + /* + * Unit display preference + */ + enum DisplayUnits { + /* + * Metric (Default) + */ + METRIC = 0; + + /* + * Imperial + */ + IMPERIAL = 1; + } + + /* + * Override OLED outo detect with this if it fails. + */ + enum OledType { + /* + * Default / Auto + */ + OLED_AUTO = 0; + + /* + * Default / Auto + */ + OLED_SSD1306 = 1; + + /* + * Default / Auto + */ + OLED_SH1106 = 2; + + /* + * Can not be auto detected but set by proto. Used for 128x128 screens + */ + OLED_SH1107 = 3; + } + + /* + * Number of seconds the screen stays on after pressing the user button or receiving a message + * 0 for default of one minute MAXUINT for always on + */ + uint32 screen_on_secs = 1; + + /* + * How the GPS coordinates are formatted on the OLED screen. + */ + GpsCoordinateFormat gps_format = 2; + + /* + * Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds. + * Potentially useful for devices without user buttons. + */ + uint32 auto_screen_carousel_secs = 3; + + /* + * If this is set, the displayed compass will always point north. if unset, the old behaviour + * (top of display is heading direction) is used. + */ + bool compass_north_top = 4; + + /* + * Flip screen vertically, for cases that mount the screen upside down + */ + bool flip_screen = 5; + + /* + * Perferred display units + */ + DisplayUnits units = 6; + + /* + * Override auto-detect in screen + */ + OledType oled = 7; + + enum DisplayMode { + /* + * Default. The old style for the 128x64 OLED screen + */ + DEFAULT = 0; + + /* + * Rearrange display elements to cater for bicolor OLED displays + */ + TWOCOLOR = 1; + + /* + * Same as TwoColor, but with inverted top bar. Not so good for Epaper displays + */ + INVERTED = 2; + + /* + * TFT Full Color Displays (not implemented yet) + */ + COLOR = 3; + } + /* + * Display Mode + */ + DisplayMode displaymode = 8; + + /* + * Print first line in pseudo-bold? FALSE is original style, TRUE is bold + */ + bool heading_bold = 9; + + /* + * Should we wake the screen up on accelerometer detected motion or tap + */ + bool wake_on_tap_or_motion = 10; + + enum CompassOrientation { + /* + * The compass and the display are in the same orientation. + */ + DEGREES_0 = 0; + + /* + * Rotate the compass by 90 degrees. + */ + DEGREES_90 = 1; + + /* + * Rotate the compass by 180 degrees. + */ + DEGREES_180 = 2; + + /* + * Rotate the compass by 270 degrees. + */ + DEGREES_270 = 3; + + /* + * Don't rotate the compass, but invert the result. + */ + DEGREES_0_INVERTED = 4; + + /* + * Rotate the compass by 90 degrees and invert. + */ + DEGREES_90_INVERTED = 5; + + /* + * Rotate the compass by 180 degrees and invert. + */ + DEGREES_180_INVERTED = 6; + + /* + * Rotate the compass by 270 degrees and invert. + */ + DEGREES_270_INVERTED = 7; + } + + /* + * Indicates how to rotate or invert the compass output to accurate display on the display. + */ + CompassOrientation compass_orientation = 11; + } + + /* + * Lora Config + */ + message LoRaConfig { + enum RegionCode { + /* + * Region is not set + */ + UNSET = 0; + + /* + * United States + */ + US = 1; + + /* + * European Union 433mhz + */ + EU_433 = 2; + + /* + * European Union 868mhz + */ + EU_868 = 3; + + /* + * China + */ + CN = 4; + + /* + * Japan + */ + JP = 5; + + /* + * Australia / New Zealand + */ + ANZ = 6; + + /* + * Korea + */ + KR = 7; + + /* + * Taiwan + */ + TW = 8; + + /* + * Russia + */ + RU = 9; + + /* + * India + */ + IN = 10; + + /* + * New Zealand 865mhz + */ + NZ_865 = 11; + + /* + * Thailand + */ + TH = 12; + + /* + * WLAN Band + */ + LORA_24 = 13; + + /* + * Ukraine 433mhz + */ + UA_433 = 14; + + /* + * Ukraine 868mhz + */ + UA_868 = 15; + + /* + * Malaysia 433mhz + */ + MY_433 = 16; + + /* + * Malaysia 919mhz + */ + MY_919 = 17; + + /* + * Singapore 923mhz + */ + SG_923 = 18; + } + + /* + * Standard predefined channel settings + * Note: these mappings must match ModemPreset Choice in the device code. + */ + enum ModemPreset { + /* + * Long Range - Fast + */ + LONG_FAST = 0; + + /* + * Long Range - Slow + */ + LONG_SLOW = 1; + + /* + * Very Long Range - Slow + */ + VERY_LONG_SLOW = 2; + + /* + * Medium Range - Slow + */ + MEDIUM_SLOW = 3; + + /* + * Medium Range - Fast + */ + MEDIUM_FAST = 4; + + /* + * Short Range - Slow + */ + SHORT_SLOW = 5; + + /* + * Short Range - Fast + */ + SHORT_FAST = 6; + + /* + * Long Range - Moderately Fast + */ + LONG_MODERATE = 7; + } + + /* + * When enabled, the `modem_preset` fields will be adhered to, else the `bandwidth`/`spread_factor`/`coding_rate` + * will be taked from their respective manually defined fields + */ + bool use_preset = 1; + + /* + * Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH. + * As a heuristic: If bandwidth is specified, do not use modem_config. + * Because protobufs take ZERO space when the value is zero this works out nicely. + * This value is replaced by bandwidth/spread_factor/coding_rate. + * If you'd like to experiment with other options add them to MeshRadio.cpp in the device code. + */ + ModemPreset modem_preset = 2; + + /* + * Bandwidth in MHz + * Certain bandwidth numbers are 'special' and will be converted to the + * appropriate floating point value: 31 -> 31.25MHz + */ + uint32 bandwidth = 3; + + /* + * A number from 7 to 12. + * Indicates number of chirps per symbol as 1< 7 results in the default + */ + uint32 hop_limit = 8; + + /* + * Disable TX from the LoRa radio. Useful for hot-swapping antennas and other tests. + * Defaults to false + */ + bool tx_enabled = 9; + + /* + * If zero, then use default max legal continuous power (ie. something that won't + * burn out the radio hardware) + * In most cases you should use zero here. + * Units are in dBm. + */ + int32 tx_power = 10; + + /* + * This controls the actual hardware frequency the radio transmits on. + * Most users should never need to be exposed to this field/concept. + * A channel number between 1 and NUM_CHANNELS (whatever the max is in the current region). + * If ZERO then the rule is "use the old channel name hash based + * algorithm to derive the channel number") + * If using the hash algorithm the channel number will be: hash(channel_name) % + * NUM_CHANNELS (Where num channels depends on the regulatory region). + */ + uint32 channel_num = 11; + + /* + * If true, duty cycle limits will be exceeded and thus you're possibly not following + * the local regulations if you're not a HAM. + * Has no effect if the duty cycle of the used region is 100%. + */ + bool override_duty_cycle = 12; + + /* + * If true, sets RX boosted gain mode on SX126X based radios + */ + bool sx126x_rx_boosted_gain = 13; + + /* + * This parameter is for advanced users and licensed HAM radio operators. + * Ignore Channel Calculation and use this frequency instead. The frequency_offset + * will still be applied. This will allow you to use out-of-band frequencies. + * Please respect your local laws and regulations. If you are a HAM, make sure you + * enable HAM mode and turn off encryption. + */ + float override_frequency = 14; + + /* + * For testing it is useful sometimes to force a node to never listen to + * particular other nodes (simulating radio out of range). All nodenums listed + * in ignore_incoming will have packets they send dropped on receive (by router.cpp) + */ + repeated uint32 ignore_incoming = 103; + + /* + * If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. + */ + bool ignore_mqtt = 104; + } + + message BluetoothConfig { + enum PairingMode { + /* + * Device generates a random PIN that will be shown on the screen of the device for pairing + */ + RANDOM_PIN = 0; + + /* + * Device requires a specified fixed PIN for pairing + */ + FIXED_PIN = 1; + + /* + * Device requires no PIN for pairing + */ + NO_PIN = 2; + } + + /* + * Enable Bluetooth on the device + */ + bool enabled = 1; + + /* + * Determines the pairing strategy for the device + */ + PairingMode mode = 2; + + /* + * Specified PIN for PairingMode.FixedPin + */ + uint32 fixed_pin = 3; + + /* + * Enables device (serial style logs) over Bluetooth + */ + bool device_logging_enabled = 4; + } + + /* + * Payload Variant + */ + oneof payload_variant { + DeviceConfig device = 1; + PositionConfig position = 2; + PowerConfig power = 3; + NetworkConfig network = 4; + DisplayConfig display = 5; + LoRaConfig lora = 6; + BluetoothConfig bluetooth = 7; + } +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/connection_status.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/connection_status.options new file mode 100644 index 0000000..d4901dd --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/connection_status.options @@ -0,0 +1 @@ +*WifiConnectionStatus.ssid max_size:33 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/connection_status.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/connection_status.proto new file mode 100644 index 0000000..7551596 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/connection_status.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ConnStatusProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +message DeviceConnectionStatus { + /* + * WiFi Status + */ + optional WifiConnectionStatus wifi = 1; + /* + * WiFi Status + */ + optional EthernetConnectionStatus ethernet = 2; + + /* + * Bluetooth Status + */ + optional BluetoothConnectionStatus bluetooth = 3; + + /* + * Serial Status + */ + optional SerialConnectionStatus serial = 4; +} + +/* + * WiFi connection status + */ +message WifiConnectionStatus { + /* + * Connection status + */ + NetworkConnectionStatus status = 1; + + /* + * WiFi access point SSID + */ + string ssid = 2; + + /* + * RSSI of wireless connection + */ + int32 rssi = 3; +} + +/* + * Ethernet connection status + */ +message EthernetConnectionStatus { + /* + * Connection status + */ + NetworkConnectionStatus status = 1; +} + +/* + * Ethernet or WiFi connection status + */ +message NetworkConnectionStatus { + /* + * IP address of device + */ + fixed32 ip_address = 1; + + /* + * Whether the device has an active connection or not + */ + bool is_connected = 2; + + /* + * Whether the device has an active connection to an MQTT broker or not + */ + bool is_mqtt_connected = 3; + + /* + * Whether the device is actively remote syslogging or not + */ + bool is_syslog_connected = 4; +} + +/* + * Bluetooth connection status + */ +message BluetoothConnectionStatus { + /* + * The pairing PIN for bluetooth + */ + uint32 pin = 1; + + /* + * RSSI of bluetooth connection + */ + int32 rssi = 2; + + /* + * Whether the device has an active connection or not + */ + bool is_connected = 3; +} + +/* + * Serial connection status + */ +message SerialConnectionStatus { + /* + * Serial baud rate + */ + uint32 baud = 1; + + /* + * Whether the device has an active connection or not + */ + bool is_connected = 2; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/deviceonly.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/deviceonly.options new file mode 100644 index 0000000..e9477a0 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/deviceonly.options @@ -0,0 +1,16 @@ +# options for nanopb +# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options + +# FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in RAM +*DeviceState.receive_queue max_count:1 + +*ChannelFile.channels max_count:8 + +*OEMStore.oem_text max_size:40 +*OEMStore.oem_icon_bits max_size:2048 +*OEMStore.oem_aes_key max_size:32 + +*DeviceState.node_remote_hardware_pins max_count:12 + +*NodeInfoLite.channel int_size:8 +*NodeInfoLite.hops_away int_size:8 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/deviceonly.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/deviceonly.proto new file mode 100644 index 0000000..eef59a7 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/deviceonly.proto @@ -0,0 +1,258 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/channel.proto"; +import "meshtastic/localonly.proto"; +import "meshtastic/mesh.proto"; +import "meshtastic/module_config.proto"; +import "meshtastic/telemetry.proto"; +import "nanopb.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "DeviceOnly"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; +option (nanopb_fileopt).include = ""; + + +/* + * Position with static location information only for NodeDBLite + */ +message PositionLite { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * TODO: REPLACE + */ + sfixed32 longitude_i = 2; + + /* + * In meters above MSL (but see issue #359) + */ + int32 altitude = 3; + + /* + * This is usually not sent over the mesh (to save space), but it is sent + * from the phone so that the local device can set its RTC If it is sent over + * the mesh (because there are devices on the mesh without GPS), it will only + * be sent by devices which has a hardware GPS clock. + * seconds since 1970 + */ + fixed32 time = 4; + + /* + * TODO: REPLACE + */ + Position.LocSource location_source = 5; +} + +message NodeInfoLite { + /* + * The node number + */ + uint32 num = 1; + + /* + * The user info for this node + */ + User user = 2; + + /* + * This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. + * Position.time now indicates the last time we received a POSITION from that node. + */ + PositionLite position = 3; + + /* + * Returns the Signal-to-noise ratio (SNR) of the last received message, + * as measured by the receiver. Return SNR of the last received message in dB + */ + float snr = 4; + + /* + * Set to indicate the last time we received a packet from this node + */ + fixed32 last_heard = 5; + /* + * The latest device metrics for the node. + */ + DeviceMetrics device_metrics = 6; + + /* + * local channel index we heard that node on. Only populated if its not the default channel. + */ + uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if adjacent) + */ + uint32 hops_away = 9; + + /* + * True if node is in our favorites list + * Persists between NodeDB internal clean ups + */ + bool is_favorite = 10; +} + +/* + * Font sizes for the device screen + */ +enum ScreenFonts { + /* + * TODO: REPLACE + */ + FONT_SMALL = 0; + + /* + * TODO: REPLACE + */ + FONT_MEDIUM = 1; + + /* + * TODO: REPLACE + */ + FONT_LARGE = 2; +} + + +/* + * This message is never sent over the wire, but it is used for serializing DB + * state to flash in the device code + * FIXME, since we write this each time we enter deep sleep (and have infinite + * flash) it would be better to use some sort of append only data structure for + * the receive queue and use the preferences store for the other stuff + */ +message DeviceState { + /* + * Read only settings/info about this node + */ + MyNodeInfo my_node = 2; + + /* + * My owner info + */ + User owner = 3; + + /* + * Received packets saved for delivery to the phone + */ + repeated MeshPacket receive_queue = 5; + + /* + * A version integer used to invalidate old save files when we make + * incompatible changes This integer is set at build time and is private to + * NodeDB.cpp in the device code. + */ + uint32 version = 8; + + /* + * We keep the last received text message (only) stored in the device flash, + * so we can show it on the screen. + * Might be null + */ + MeshPacket rx_text_message = 7; + + /* + * Used only during development. + * Indicates developer is testing and changes should never be saved to flash. + * Deprecated in 2.3.1 + */ + bool no_save = 9 [deprecated = true]; + + /* + * Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset. + */ + bool did_gps_reset = 11; + + /* + * We keep the last received waypoint stored in the device flash, + * so we can show it on the screen. + * Might be null + */ + MeshPacket rx_waypoint = 12; + + /* + * The mesh's nodes with their available gpio pins for RemoteHardware module + */ + repeated NodeRemoteHardwarePin node_remote_hardware_pins = 13; + + /* + * New lite version of NodeDB to decrease memory footprint + */ + repeated NodeInfoLite node_db_lite = 14 [(nanopb).callback_datatype = "std::vector"]; +} + +/* + * The on-disk saved channels + */ +message ChannelFile { + /* + * The channels our node knows about + */ + repeated Channel channels = 1; + + /* + * A version integer used to invalidate old save files when we make + * incompatible changes This integer is set at build time and is private to + * NodeDB.cpp in the device code. + */ + uint32 version = 2; +} + +/* + * This can be used for customizing the firmware distribution. If populated, + * show a secondary bootup screen with custom logo and text for 2.5 seconds. + */ +message OEMStore { + /* + * The Logo width in Px + */ + uint32 oem_icon_width = 1; + + /* + * The Logo height in Px + */ + uint32 oem_icon_height = 2; + + /* + * The Logo in XBM bytechar format + */ + bytes oem_icon_bits = 3; + + /* + * Use this font for the OEM text. + */ + ScreenFonts oem_font = 4; + + /* + * Use this font for the OEM text. + */ + string oem_text = 5; + + /* + * The default device encryption key, 16 or 32 byte + */ + bytes oem_aes_key = 6; + + /* + * A Preset LocalConfig to apply during factory reset + */ + LocalConfig oem_local_config = 7; + + /* + * A Preset LocalModuleConfig to apply during factory reset + */ + LocalModuleConfig oem_local_module_config = 8; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/exploiteers_pager.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/exploiteers_pager.options new file mode 100644 index 0000000..797341b --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/exploiteers_pager.options @@ -0,0 +1,5 @@ +# These options are required to create char[] fields from proto strings +# in the generated structs. + +*StoredMessage.sender max_size:40 +*StoredMessage.msg max_size:237 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/exploiteers_pager.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/exploiteers_pager.proto new file mode 100644 index 0000000..65f5a53 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/exploiteers_pager.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package meshtastic.exploiteers_pager; + + +message StoredMessage { + message DateTime { + int32 year = 1; + int32 month = 2; + int32 day = 3; + int32 hours = 4; + int32 minutes = 5; + int32 seconds = 6; + } + + DateTime datetime = 1; + string sender = 2; + uint32 senderId = 3; + string msg = 4; + uint32 dmToId = 5; +} + +message Settings { + int32 brightness = 1; + int32 contrast = 2; + + bool notify_light = 3; + enum NotifySound { + NONE = 0; + DEFAULT = 1; + } + NotifySound notify_sound = 4; + bool notify_vibrate = 5; +} \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/localonly.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/localonly.proto new file mode 100644 index 0000000..9694d7b --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/localonly.proto @@ -0,0 +1,135 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/config.proto"; +import "meshtastic/module_config.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "LocalOnlyProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Protobuf structures common to apponly.proto and deviceonly.proto + * This is never sent over the wire, only for local use + */ + +message LocalConfig { + /* + * The part of the config that is specific to the Device + */ + Config.DeviceConfig device = 1; + + /* + * The part of the config that is specific to the GPS Position + */ + Config.PositionConfig position = 2; + + /* + * The part of the config that is specific to the Power settings + */ + Config.PowerConfig power = 3; + + /* + * The part of the config that is specific to the Wifi Settings + */ + Config.NetworkConfig network = 4; + + /* + * The part of the config that is specific to the Display + */ + Config.DisplayConfig display = 5; + + /* + * The part of the config that is specific to the Lora Radio + */ + Config.LoRaConfig lora = 6; + + /* + * The part of the config that is specific to the Bluetooth settings + */ + Config.BluetoothConfig bluetooth = 7; + + /* + * A version integer used to invalidate old save files when we make + * incompatible changes This integer is set at build time and is private to + * NodeDB.cpp in the device code. + */ + uint32 version = 8; +} + +message LocalModuleConfig { + /* + * The part of the config that is specific to the MQTT module + */ + ModuleConfig.MQTTConfig mqtt = 1; + + /* + * The part of the config that is specific to the Serial module + */ + ModuleConfig.SerialConfig serial = 2; + + /* + * The part of the config that is specific to the ExternalNotification module + */ + ModuleConfig.ExternalNotificationConfig external_notification = 3; + + /* + * The part of the config that is specific to the Store & Forward module + */ + ModuleConfig.StoreForwardConfig store_forward = 4; + + /* + * The part of the config that is specific to the RangeTest module + */ + ModuleConfig.RangeTestConfig range_test = 5; + + /* + * The part of the config that is specific to the Telemetry module + */ + ModuleConfig.TelemetryConfig telemetry = 6; + + /* + * The part of the config that is specific to the Canned Message module + */ + ModuleConfig.CannedMessageConfig canned_message = 7; + + /* + * The part of the config that is specific to the Audio module + */ + ModuleConfig.AudioConfig audio = 9; + + /* + * The part of the config that is specific to the Remote Hardware module + */ + ModuleConfig.RemoteHardwareConfig remote_hardware = 10; + + /* + * The part of the config that is specific to the Neighbor Info module + */ + ModuleConfig.NeighborInfoConfig neighbor_info = 11; + + /* + * The part of the config that is specific to the Ambient Lighting module + */ + ModuleConfig.AmbientLightingConfig ambient_lighting = 12; + + /* + * The part of the config that is specific to the Detection Sensor module + */ + ModuleConfig.DetectionSensorConfig detection_sensor = 13; + + /* + * Paxcounter Config + */ + ModuleConfig.PaxcounterConfig paxcounter = 14; + + /* + * A version integer used to invalidate old save files when we make + * incompatible changes This integer is set at build time and is private to + * NodeDB.cpp in the device code. + */ + uint32 version = 8; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mesh.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mesh.options new file mode 100644 index 0000000..6dcd248 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mesh.options @@ -0,0 +1,65 @@ +# options for nanopb +# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options + +*macaddr max_size:6 fixed_length:true # macaddrs +*id max_size:16 # node id strings + +*User.long_name max_size:40 +*User.short_name max_size:5 + +*RouteDiscovery.route max_count:8 + +# note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is +# outside of this envelope +*Data.payload max_size:237 + +*NodeInfo.channel int_size:8 +*NodeInfo.hops_away int_size:8 + +# Big enough for 1.2.28.568032c-d +*MyNodeInfo.firmware_version max_size:18 + +*MyNodeInfo.air_period_tx max_count:8 +*MyNodeInfo.air_period_rx max_count:8 + +# Note: the actual limit (because of header bytes) on the size of encrypted payloads is 251 bytes, but I use 256 +# here because we might need to fill with zeros for padding to encryption block size (16 bytes per block) +*MeshPacket.encrypted max_size:256 +*MeshPacket.payload_variant anonymous_oneof:true +*MeshPacket.hop_limit int_size:8 +*MeshPacket.hop_start int_size:8 +*MeshPacket.channel int_size:8 + +*QueueStatus.res int_size:8 +*QueueStatus.free int_size:8 +*QueueStatus.maxlen int_size:8 + +*ToRadio.payload_variant anonymous_oneof:true + +*FromRadio.payload_variant anonymous_oneof:true + +*Routing.variant anonymous_oneof:true + +*LogRecord.message max_size:64 +*LogRecord.source max_size:8 + +# MyMessage.name max_size:40 +# or fixed_length or fixed_count, or max_count + +#This value may want to be a few bytes smaller to compensate for the parent fields. +*Compressed.data max_size:237 + +*Waypoint.name max_size:30 +*Waypoint.description max_size:100 + +*NeighborInfo.neighbors max_count:10 + +*DeviceMetadata.firmware_version max_size:18 + +*MqttClientProxyMessage.topic max_size:60 +*MqttClientProxyMessage.data max_size:435 +*MqttClientProxyMessage.text max_size:435 + +*ChunkedPayload.chunk_count int_size:16 +*ChunkedPayload.chunk_index int_size:16 +*ChunkedPayload.payload_chunk max_size:228 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mesh.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mesh.proto new file mode 100644 index 0000000..eb6b0df --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mesh.proto @@ -0,0 +1,1711 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/channel.proto"; +import "meshtastic/config.proto"; +import "meshtastic/module_config.proto"; +import "meshtastic/portnums.proto"; +import "meshtastic/telemetry.proto"; +import "meshtastic/xmodem.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "MeshProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * a gps position + */ +message Position { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * TODO: REPLACE + */ + sfixed32 longitude_i = 2; + + /* + * In meters above MSL (but see issue #359) + */ + int32 altitude = 3; + + /* + * This is usually not sent over the mesh (to save space), but it is sent + * from the phone so that the local device can set its time if it is sent over + * the mesh (because there are devices on the mesh without GPS or RTC). + * seconds since 1970 + */ + fixed32 time = 4; + + /* + * How the location was acquired: manual, onboard GPS, external (EUD) GPS + */ + enum LocSource { + /* + * TODO: REPLACE + */ + LOC_UNSET = 0; + + /* + * TODO: REPLACE + */ + LOC_MANUAL = 1; + + /* + * TODO: REPLACE + */ + LOC_INTERNAL = 2; + + /* + * TODO: REPLACE + */ + LOC_EXTERNAL = 3; + } + + /* + * TODO: REPLACE + */ + LocSource location_source = 5; + + /* + * How the altitude was acquired: manual, GPS int/ext, etc + * Default: same as location_source if present + */ + enum AltSource { + /* + * TODO: REPLACE + */ + ALT_UNSET = 0; + + /* + * TODO: REPLACE + */ + ALT_MANUAL = 1; + + /* + * TODO: REPLACE + */ + ALT_INTERNAL = 2; + + /* + * TODO: REPLACE + */ + ALT_EXTERNAL = 3; + + /* + * TODO: REPLACE + */ + ALT_BAROMETRIC = 4; + } + + /* + * TODO: REPLACE + */ + AltSource altitude_source = 6; + + /* + * Positional timestamp (actual timestamp of GPS solution) in integer epoch seconds + */ + fixed32 timestamp = 7; + + /* + * Pos. timestamp milliseconds adjustment (rarely available or required) + */ + int32 timestamp_millis_adjust = 8; + + /* + * HAE altitude in meters - can be used instead of MSL altitude + */ + sint32 altitude_hae = 9; + + /* + * Geoidal separation in meters + */ + sint32 altitude_geoidal_separation = 10; + + /* + * Horizontal, Vertical and Position Dilution of Precision, in 1/100 units + * - PDOP is sufficient for most cases + * - for higher precision scenarios, HDOP and VDOP can be used instead, + * in which case PDOP becomes redundant (PDOP=sqrt(HDOP^2 + VDOP^2)) + * TODO: REMOVE/INTEGRATE + */ + uint32 PDOP = 11; + + /* + * TODO: REPLACE + */ + uint32 HDOP = 12; + + /* + * TODO: REPLACE + */ + uint32 VDOP = 13; + + /* + * GPS accuracy (a hardware specific constant) in mm + * multiplied with DOP to calculate positional accuracy + * Default: "'bout three meters-ish" :) + */ + uint32 gps_accuracy = 14; + + /* + * Ground speed in m/s and True North TRACK in 1/100 degrees + * Clarification of terms: + * - "track" is the direction of motion (measured in horizontal plane) + * - "heading" is where the fuselage points (measured in horizontal plane) + * - "yaw" indicates a relative rotation about the vertical axis + * TODO: REMOVE/INTEGRATE + */ + uint32 ground_speed = 15; + + /* + * TODO: REPLACE + */ + uint32 ground_track = 16; + + /* + * GPS fix quality (from NMEA GxGGA statement or similar) + */ + uint32 fix_quality = 17; + + /* + * GPS fix type 2D/3D (from NMEA GxGSA statement) + */ + uint32 fix_type = 18; + + /* + * GPS "Satellites in View" number + */ + uint32 sats_in_view = 19; + + /* + * Sensor ID - in case multiple positioning sensors are being used + */ + uint32 sensor_id = 20; + + /* + * Estimated/expected time (in seconds) until next update: + * - if we update at fixed intervals of X seconds, use X + * - if we update at dynamic intervals (based on relative movement etc), + * but "AT LEAST every Y seconds", use Y + */ + uint32 next_update = 21; + + /* + * A sequence number, incremented with each Position message to help + * detect lost updates if needed + */ + uint32 seq_number = 22; + + /* + * Indicates the bits of precision set by the sending node + */ + uint32 precision_bits = 23; +} + +/* + * Note: these enum names must EXACTLY match the string used in the device + * bin/build-all.sh script. + * Because they will be used to find firmware filenames in the android app for OTA updates. + * To match the old style filenames, _ is converted to -, p is converted to . + */ +enum HardwareModel { + /* + * TODO: REPLACE + */ + UNSET = 0; + + /* + * TODO: REPLACE + */ + TLORA_V2 = 1; + + /* + * TODO: REPLACE + */ + TLORA_V1 = 2; + + /* + * TODO: REPLACE + */ + TLORA_V2_1_1P6 = 3; + + /* + * TODO: REPLACE + */ + TBEAM = 4; + + /* + * The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13 + * (see HELTEC_V2 for the new version). + */ + HELTEC_V2_0 = 5; + + /* + * TODO: REPLACE + */ + TBEAM_V0P7 = 6; + + /* + * TODO: REPLACE + */ + T_ECHO = 7; + + /* + * TODO: REPLACE + */ + TLORA_V1_1P3 = 8; + + /* + * TODO: REPLACE + */ + RAK4631 = 9; + + /* + * The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37. + * Sadly they did not update anything on the silkscreen to identify this board + */ + HELTEC_V2_1 = 10; + + /* + * Ancient heltec WiFi_Lora_32 board + */ + HELTEC_V1 = 11; + + /* + * New T-BEAM with ESP32-S3 CPU + */ + LILYGO_TBEAM_S3_CORE = 12; + + /* + * RAK WisBlock ESP32 core: https://docs.rakwireless.com/Product-Categories/WisBlock/RAK11200/Overview/ + */ + RAK11200 = 13; + + /* + * B&Q Consulting Nano Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:nano + */ + NANO_G1 = 14; + + /* + * TODO: REPLACE + */ + TLORA_V2_1_1P8 = 15; + + /* + * TODO: REPLACE + */ + TLORA_T3_S3 = 16; + + /* + * B&Q Consulting Nano G1 Explorer: https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer + */ + NANO_G1_EXPLORER = 17; + + /* + * B&Q Consulting Nano G2 Ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra + */ + NANO_G2_ULTRA = 18; + + /* + * LoRAType device: https://loratype.org/ + */ + LORA_TYPE = 19; + + /* + * wiphone https://www.wiphone.io/ + */ + WIPHONE = 20; + + /* + * WIO Tracker WM1110 family from Seeed Studio. Includes wio-1110-tracker and wio-1110-sdk + */ + WIO_WM1110 = 21; + + /* + * RAK2560 Solar base station based on RAK4630 + */ + RAK2560 = 22; + + /* + * B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station + */ + STATION_G1 = 25; + + /* + * RAK11310 (RP2040 + SX1262) + */ + RAK11310 = 26; + + /* + * Makerfabs SenseLoRA Receiver (RP2040 + RFM96) + */ + SENSELORA_RP2040 = 27; + + /* + * Makerfabs SenseLoRA Industrial Monitor (ESP32-S3 + RFM96) + */ + SENSELORA_S3 = 28; + + /* + * Canary Radio Company - CanaryOne: https://canaryradio.io/products/canaryone + */ + CANARYONE = 29; + + /* + * Waveshare RP2040 LoRa - https://www.waveshare.com/rp2040-lora.htm + */ + RP2040_LORA = 30; + + /* + * B&Q Consulting Station G2: https://wiki.uniteng.com/en/meshtastic/station-g2 + */ + STATION_G2 = 31; + + /* + * --------------------------------------------------------------------------- + * Less common/prototype boards listed here (needs one more byte over the air) + * --------------------------------------------------------------------------- + */ + LORA_RELAY_V1 = 32; + + /* + * TODO: REPLACE + */ + NRF52840DK = 33; + + /* + * TODO: REPLACE + */ + PPR = 34; + + /* + * TODO: REPLACE + */ + GENIEBLOCKS = 35; + + /* + * TODO: REPLACE + */ + NRF52_UNKNOWN = 36; + + /* + * TODO: REPLACE + */ + PORTDUINO = 37; + + /* + * The simulator built into the android app + */ + ANDROID_SIM = 38; + + /* + * Custom DIY device based on @NanoVHF schematics: https://github.com/NanoVHF/Meshtastic-DIY/tree/main/Schematics + */ + DIY_V1 = 39; + + /* + * nRF52840 Dongle : https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle/ + */ + NRF52840_PCA10059 = 40; + + /* + * Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3 + */ + DR_DEV = 41; + + /* + * M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ + */ + M5STACK = 42; + + /* + * New Heltec LoRA32 with ESP32-S3 CPU + */ + HELTEC_V3 = 43; + + /* + * New Heltec Wireless Stick Lite with ESP32-S3 CPU + */ + HELTEC_WSL_V3 = 44; + + /* + * New BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU + */ + BETAFPV_2400_TX = 45; + + /* + * BetaFPV ExpressLRS "Nano" TX Module 900MHz with ESP32 CPU + */ + BETAFPV_900_NANO_TX = 46; + + /* + * Raspberry Pi Pico (W) with Waveshare SX1262 LoRa Node Module + */ + RPI_PICO = 47; + + /* + * Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + * Newer V1.1, version is written on the PCB near the display. + */ + HELTEC_WIRELESS_TRACKER = 48; + + /* + * Heltec Wireless Paper with ESP32-S3 CPU and E-Ink display + */ + HELTEC_WIRELESS_PAPER = 49; + + /* + * LilyGo T-Deck with ESP32-S3 CPU, Keyboard and IPS display + */ + T_DECK = 50; + + /* + * LilyGo T-Watch S3 with ESP32-S3 CPU and IPS display + */ + T_WATCH_S3 = 51; + + /* + * Bobricius Picomputer with ESP32-S3 CPU, Keyboard and IPS display + */ + PICOMPUTER_S3 = 52; + + /* + * Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa + */ + HELTEC_HT62 = 53; + + /* + * EBYTE SPI LoRa module and ESP32-S3 + */ + EBYTE_ESP32_S3 = 54; + + /* + * Waveshare ESP32-S3-PICO with PICO LoRa HAT and 2.9inch e-Ink + */ + ESP32_S3_PICO = 55; + + /* + * CircuitMess Chatter 2 LLCC68 Lora Module and ESP32 Wroom + * Lora module can be swapped out for a Heltec RA-62 which is "almost" pin compatible + * with one cut and one jumper Meshtastic works + */ + CHATTER_2 = 56; + + /* + * Heltec Wireless Paper, With ESP32-S3 CPU and E-Ink display + * Older "V1.0" Variant, has no "version sticker" + * E-Ink model is DEPG0213BNS800 + * Tab on the screen protector is RED + * Flex connector marking is FPC-7528B + */ + HELTEC_WIRELESS_PAPER_V1_0 = 57; + + /* + * Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + * Older "V1.0" Variant + */ + HELTEC_WIRELESS_TRACKER_V1_0 = 58; + + /* + * unPhone with ESP32-S3, TFT touchscreen, LSM6DS3TR-C accelerometer and gyroscope + */ + UNPHONE = 59; + + /* + * Teledatics TD-LORAC NRF52840 based M.2 LoRA module + * Compatible with the TD-WRLS development board + */ + TD_LORAC = 60; + + /* + * CDEBYTE EoRa-S3 board using their own MM modules, clone of LILYGO T3S3 + */ + CDEBYTE_EORA_S3 = 61; + + /* + * TWC_MESH_V4 + * Adafruit NRF52840 feather express with SX1262, SSD1306 OLED and NEO6M GPS + */ + TWC_MESH_V4 = 62; + + /* + * NRF52_PROMICRO_DIY + * Promicro NRF52840 with SX1262/LLCC68, SSD1306 OLED and NEO6M GPS + */ + NRF52_PROMICRO_DIY = 63; + + /* + * RadioMaster 900 Bandit Nano, https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module + * ESP32-D0WDQ6 With SX1276/SKY66122, SSD1306 OLED and No GPS + */ + RADIOMASTER_900_BANDIT_NANO = 64; + + /* + * Heltec Capsule Sensor V3 with ESP32-S3 CPU, Portable LoRa device that can replace GNSS modules or sensors + */ + HELTEC_CAPSULE_SENSOR_V3 = 65; + + /** + * EXPLOITEERS_PAGER + * exploitee.rs Hacker Pager. Retro-styled pager with Meshtastic messaging and LoRa utilities. ESP32-S3, SX1262. + */ + EXPLOITEERS_PAGER = 66; + + /* + * ------------------------------------------------------------------------------------------------------------------------------------------ + * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. + * ------------------------------------------------------------------------------------------------------------------------------------------ + */ + PRIVATE_HW = 255; +} + +/* + * Broadcast when a newly powered mesh node wants to find a node num it can use + * Sent from the phone over bluetooth to set the user id for the owner of this node. + * Also sent from nodes to each other when a new node signs on (so all clients can have this info) + * The algorithm is as follows: + * when a node starts up, it broadcasts their user and the normal flow is for all + * other nodes to reply with their User as well (so the new node can build its nodedb) + * If a node ever receives a User (not just the first broadcast) message where + * the sender node number equals our node number, that indicates a collision has + * occurred and the following steps should happen: + * If the receiving node (that was already in the mesh)'s macaddr is LOWER than the + * new User who just tried to sign in: it gets to keep its nodenum. + * We send a broadcast message of OUR User (we use a broadcast so that the other node can + * receive our message, considering we have the same id - it also serves to let + * observers correct their nodedb) - this case is rare so it should be okay. + * If any node receives a User where the macaddr is GTE than their local macaddr, + * they have been vetoed and should pick a new random nodenum (filtering against + * whatever it knows about the nodedb) and rebroadcast their User. + * A few nodenums are reserved and will never be requested: + * 0xff - broadcast + * 0 through 3 - for future use + */ +message User { + /* + * A globally unique ID string for this user. + * In the case of Signal that would mean +16504442323, for the default macaddr derived id it would be !<8 hexidecimal bytes>. + * Note: app developers are encouraged to also use the following standard + * node IDs "^all" (for broadcast), "^local" (for the locally connected node) + */ + string id = 1; + + /* + * A full name for this user, i.e. "Kevin Hester" + */ + string long_name = 2; + + /* + * A VERY short name, ideally two characters. + * Suitable for a tiny OLED screen + */ + string short_name = 3; + + /* + * Deprecated in Meshtastic 2.1.x + * This is the addr of the radio. + * Not populated by the phone, but added by the esp32 when broadcasting + */ + bytes macaddr = 4 [deprecated = true]; + + /* + * TBEAM, HELTEC, etc... + * Starting in 1.2.11 moved to hw_model enum in the NodeInfo object. + * Apps will still need the string here for older builds + * (so OTA update can find the right image), but if the enum is available it will be used instead. + */ + HardwareModel hw_model = 5; + + /* + * In some regions Ham radio operators have different bandwidth limitations than others. + * If this user is a licensed operator, set this flag. + * Also, "long_name" should be their licence number. + */ + bool is_licensed = 6; + + /* + * Indicates that the user's role in the mesh + */ + Config.DeviceConfig.Role role = 7; +} + +/* + * A message used in our Dynamic Source Routing protocol (RFC 4728 based) + */ +message RouteDiscovery { + /* + * The list of nodenums this packet has visited so far + */ + repeated fixed32 route = 1; +} + +/* + * A Routing control Data packet handled by the routing module + */ +message Routing { + /* + * A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide + * details on the type of failure). + */ + enum Error { + /* + * This message is not a failure + */ + NONE = 0; + + /* + * Our node doesn't have a route to the requested destination anymore. + */ + NO_ROUTE = 1; + + /* + * We received a nak while trying to forward on your behalf + */ + GOT_NAK = 2; + + /* + * TODO: REPLACE + */ + TIMEOUT = 3; + + /* + * No suitable interface could be found for delivering this packet + */ + NO_INTERFACE = 4; + + /* + * We reached the max retransmission count (typically for naive flood routing) + */ + MAX_RETRANSMIT = 5; + + /* + * No suitable channel was found for sending this packet (i.e. was requested channel index disabled?) + */ + NO_CHANNEL = 6; + + /* + * The packet was too big for sending (exceeds interface MTU after encoding) + */ + TOO_LARGE = 7; + + /* + * The request had want_response set, the request reached the destination node, but no service on that node wants to send a response + * (possibly due to bad channel permissions) + */ + NO_RESPONSE = 8; + + /* + * Cannot send currently because duty cycle regulations will be violated. + */ + DUTY_CYCLE_LIMIT = 9; + + /* + * The application layer service on the remote node received your request, but considered your request somehow invalid + */ + BAD_REQUEST = 32; + + /* + * The application layer service on the remote node received your request, but considered your request not authorized + * (i.e you did not send the request on the required bound channel) + */ + NOT_AUTHORIZED = 33; + } + + oneof variant { + /* + * A route request going from the requester + */ + RouteDiscovery route_request = 1; + + /* + * A route reply + */ + RouteDiscovery route_reply = 2; + + /* + * A failure in delivering a message (usually used for routing control messages, but might be provided + * in addition to ack.fail_id to provide details on the type of failure). + */ + Error error_reason = 3; + } +} + +/* + * (Formerly called SubPacket) + * The payload portion fo a packet, this is the actual bytes that are sent + * inside a radio packet (because from/to are broken out by the comms library) + */ +message Data { + /* + * Formerly named typ and of type Type + */ + PortNum portnum = 1; + + /* + * TODO: REPLACE + */ + bytes payload = 2; + + /* + * Not normally used, but for testing a sender can request that recipient + * responds in kind (i.e. if it received a position, it should unicast back it's position). + * Note: that if you set this on a broadcast you will receive many replies. + */ + bool want_response = 3; + + /* + * The address of the destination node. + * This field is is filled in by the mesh radio device software, application + * layer software should never need it. + * RouteDiscovery messages _must_ populate this. + * Other message types might need to if they are doing multihop routing. + */ + fixed32 dest = 4; + + /* + * The address of the original sender for this message. + * This field should _only_ be populated for reliable multihop packets (to keep + * packets small). + */ + fixed32 source = 5; + + /* + * Only used in routing or response messages. + * Indicates the original message ID that this message is reporting failure on. (formerly called original_id) + */ + fixed32 request_id = 6; + + /* + * If set, this message is intened to be a reply to a previously sent message with the defined id. + */ + fixed32 reply_id = 7; + + /* + * Defaults to false. If true, then what is in the payload should be treated as an emoji like giving + * a message a heart or poop emoji. + */ + fixed32 emoji = 8; +} + +/* + * Waypoint message, used to share arbitrary locations across the mesh + */ +message Waypoint { + /* + * Id of the waypoint + */ + uint32 id = 1; + + /* + * latitude_i + */ + sfixed32 latitude_i = 2; + + /* + * longitude_i + */ + sfixed32 longitude_i = 3; + + /* + * Time the waypoint is to expire (epoch) + */ + uint32 expire = 4; + + /* + * If greater than zero, treat the value as a nodenum only allowing them to update the waypoint. + * If zero, the waypoint is open to be edited by any member of the mesh. + */ + uint32 locked_to = 5; + + /* + * Name of the waypoint - max 30 chars + */ + string name = 6; + + /* + * Description of the waypoint - max 100 chars + */ + string description = 7; + + /* + * Designator icon for the waypoint in the form of a unicode emoji + */ + fixed32 icon = 8; +} + +/* + * This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server + */ +message MqttClientProxyMessage { + /* + * The MQTT topic this message will be sent /received on + */ + string topic = 1; + + /* + * The actual service envelope payload or text for mqtt pub / sub + */ + oneof payload_variant { + /* + * Bytes + */ + bytes data = 2; + + /* + * Text + */ + string text = 3; + } + + /* + * Whether the message should be retained (or not) + */ + bool retained = 4; +} + +/* + * A packet envelope sent/received over the mesh + * only payload_variant is sent in the payload portion of the LORA packet. + * The other fields are either not sent at all, or sent in the special 16 byte LORA header. + */ +message MeshPacket { + /* + * The priority of this message for sending. + * Higher priorities are sent first (when managing the transmit queue). + * This field is never sent over the air, it is only used internally inside of a local device node. + * API clients (either on the local node or connected directly to the node) + * can set this parameter if necessary. + * (values must be <= 127 to keep protobuf field to one byte in size. + * Detailed background on this field: + * I noticed a funny side effect of lora being so slow: Usually when making + * a protocol there isn’t much need to use message priority to change the order + * of transmission (because interfaces are fairly fast). + * But for lora where packets can take a few seconds each, it is very important + * to make sure that critical packets are sent ASAP. + * In the case of meshtastic that means we want to send protocol acks as soon as possible + * (to prevent unneeded retransmissions), we want routing messages to be sent next, + * then messages marked as reliable and finally 'background' packets like periodic position updates. + * So I bit the bullet and implemented a new (internal - not sent over the air) + * field in MeshPacket called 'priority'. + * And the transmission queue in the router object is now a priority queue. + */ + enum Priority { + /* + * Treated as Priority.DEFAULT + */ + UNSET = 0; + + /* + * TODO: REPLACE + */ + MIN = 1; + + /* + * Background position updates are sent with very low priority - + * if the link is super congested they might not go out at all + */ + BACKGROUND = 10; + + /* + * This priority is used for most messages that don't have a priority set + */ + DEFAULT = 64; + + /* + * If priority is unset but the message is marked as want_ack, + * assume it is important and use a slightly higher priority + */ + RELIABLE = 70; + + /* + * Ack/naks are sent with very high priority to ensure that retransmission + * stops as soon as possible + */ + ACK = 120; + + /* + * TODO: REPLACE + */ + MAX = 127; + } + + /* + * Identify if this is a delayed packet + */ + enum Delayed { + /* + * If unset, the message is being sent in real time. + */ + NO_DELAY = 0; + + /* + * The message is delayed and was originally a broadcast + */ + DELAYED_BROADCAST = 1; + + /* + * The message is delayed and was originally a direct message + */ + DELAYED_DIRECT = 2; + } + + /* + * The sending node number. + * Note: Our crypto implementation uses this field as well. + * See [crypto](/docs/overview/encryption) for details. + */ + fixed32 from = 1; + + /* + * The (immediate) destination for this packet + */ + fixed32 to = 2; + + /* + * (Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on. + * If unset, packet was on the primary channel. + * A particular node might know only a subset of channels in use on the mesh. + * Therefore channel_index is inherently a local concept and meaningless to send between nodes. + * Very briefly, while sending and receiving deep inside the device Router code, this field instead + * contains the 'channel hash' instead of the index. + * This 'trick' is only used while the payload_variant is an 'encrypted'. + */ + uint32 channel = 3; + + /* + * Internally to the mesh radios we will route SubPackets encrypted per [this](docs/developers/firmware/encryption). + * However, when a particular node has the correct + * key to decode a particular packet, it will decode the payload into a SubPacket protobuf structure. + * Software outside of the device nodes will never encounter a packet where + * "decoded" is not populated (i.e. any encryption/decryption happens before reaching the applications) + * The numeric IDs for these fields were selected to keep backwards compatibility with old applications. + */ + + oneof payload_variant { + /* + * TODO: REPLACE + */ + Data decoded = 4; + + /* + * TODO: REPLACE + */ + bytes encrypted = 5; + } + + /* + * A unique ID for this packet. + * Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space). + * Otherwise a unique ID for this packet, useful for flooding algorithms. + * ID only needs to be unique on a _per sender_ basis, and it only + * needs to be unique for a few minutes (long enough to last for the length of + * any ACK or the completion of a mesh broadcast flood). + * Note: Our crypto implementation uses this id as well. + * See [crypto](/docs/overview/encryption) for details. + */ + fixed32 id = 6; + + /* + * The time this message was received by the esp32 (secs since 1970). + * Note: this field is _never_ sent on the radio link itself (to save space) Times + * are typically not sent over the mesh, but they will be added to any Packet + * (chain of SubPacket) sent to the phone (so the phone can know exact time of reception) + */ + fixed32 rx_time = 7; + + /* + * *Never* sent over the radio links. + * Set during reception to indicate the SNR of this packet. + * Used to collect statistics on current link quality. + */ + float rx_snr = 8; + + /* + * If unset treated as zero (no forwarding, send to adjacent nodes only) + * if 1, allow hopping through one node, etc... + * For our usecase real world topologies probably have a max of about 3. + * This field is normally placed into a few of bits in the header. + */ + uint32 hop_limit = 9; + + /* + * This packet is being sent as a reliable message, we would prefer it to arrive at the destination. + * We would like to receive a ack packet in response. + * Broadcasts messages treat this flag specially: Since acks for broadcasts would + * rapidly flood the channel, the normal ack behavior is suppressed. + * Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm). + * If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message. + * So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender. + * If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic. + * Note: This flag is normally sent in a flag bit in the header when sent over the wire + */ + bool want_ack = 10; + + /* + * The priority of this message for sending. + * See MeshPacket.Priority description for more details. + */ + Priority priority = 11; + + /* + * rssi of received packet. Only sent to phone for dispay purposes. + */ + int32 rx_rssi = 12; + + /* + * Describe if this message is delayed + */ + Delayed delayed = 13 [deprecated = true]; + + /* + * Describes whether this packet passed via MQTT somewhere along the path it currently took. + */ + bool via_mqtt = 14; + + /* + * Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header. + * When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. + */ + uint32 hop_start = 15; +} + +/* + * Shared constants between device and phone + */ +enum Constants { + /* + * First enum must be zero, and we are just using this enum to + * pass int constants between two very different environments + */ + ZERO = 0; + + /* + * From mesh.options + * note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is + * outside of this envelope + */ + DATA_PAYLOAD_LEN = 237; +} + +/* + * The bluetooth to device link: + * Old BTLE protocol docs from TODO, merge in above and make real docs... + * use protocol buffers, and NanoPB + * messages from device to phone: + * POSITION_UPDATE (..., time) + * TEXT_RECEIVED(from, text, time) + * OPAQUE_RECEIVED(from, payload, time) (for signal messages or other applications) + * messages from phone to device: + * SET_MYID(id, human readable long, human readable short) (send down the unique ID + * string used for this node, a human readable string shown for that id, and a very + * short human readable string suitable for oled screen) SEND_OPAQUE(dest, payload) + * (for signal messages or other applications) SEND_TEXT(dest, text) Get all + * nodes() (returns list of nodes, with full info, last time seen, loc, battery + * level etc) SET_CONFIG (switches device to a new set of radio params and + * preshared key, drops all existing nodes, force our node to rejoin this new group) + * Full information about a node on the mesh + */ +message NodeInfo { + /* + * The node number + */ + uint32 num = 1; + + /* + * The user info for this node + */ + User user = 2; + + /* + * This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true. + * Position.time now indicates the last time we received a POSITION from that node. + */ + Position position = 3; + + /* + * Returns the Signal-to-noise ratio (SNR) of the last received message, + * as measured by the receiver. Return SNR of the last received message in dB + */ + float snr = 4; + + /* + * TODO: REMOVE/INTEGRATE + * Returns the last measured frequency error. + * The LoRa receiver estimates the frequency offset between the receiver + * center frequency and that of the received LoRa signal. This function + * returns the estimates offset (in Hz) of the last received message. + * Caution: this measurement is not absolute, but is measured relative to the + * local receiver's oscillator. Apparent errors may be due to the + * transmitter, the receiver or both. \return The estimated center frequency + * offset in Hz of the last received message. + * int32 frequency_error = 6; + * enum RouteState { + * Invalid = 0; + * Discovering = 1; + * Valid = 2; + * } + * Not needed? + * RouteState route = 4; + */ + + /* + * TODO: REMOVE/INTEGRATE + * Not currently used (till full DSR deployment?) Our current preferred node node for routing - might be the same as num if + * we are adjacent Or zero if we don't yet know a route to this node. + * fixed32 next_hop = 5; + */ + + /* + * Set to indicate the last time we received a packet from this node + */ + fixed32 last_heard = 5; + /* + * The latest device metrics for the node. + */ + DeviceMetrics device_metrics = 6; + + /* + * local channel index we heard that node on. Only populated if its not the default channel. + */ + uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if adjacent) + */ + uint32 hops_away = 9; + + /* + * True if node is in our favorites list + * Persists between NodeDB internal clean ups + */ + bool is_favorite = 10; +} + +/* + * Error codes for critical errors + * The device might report these fault codes on the screen. + * If you encounter a fault code, please post on the meshtastic.discourse.group + * and we'll try to help. + */ +enum CriticalErrorCode { + /* + * TODO: REPLACE + */ + NONE = 0; + + /* + * A software bug was detected while trying to send lora + */ + TX_WATCHDOG = 1; + + /* + * A software bug was detected on entry to sleep + */ + SLEEP_ENTER_WAIT = 2; + + /* + * No Lora radio hardware could be found + */ + NO_RADIO = 3; + + /* + * Not normally used + */ + UNSPECIFIED = 4; + + /* + * We failed while configuring a UBlox GPS + */ + UBLOX_UNIT_FAILED = 5; + + /* + * This board was expected to have a power management chip and it is missing or broken + */ + NO_AXP192 = 6; + + /* + * The channel tried to set a radio setting which is not supported by this chipset, + * radio comms settings are now undefined. + */ + INVALID_RADIO_SETTING = 7; + + /* + * Radio transmit hardware failure. We sent data to the radio chip, but it didn't + * reply with an interrupt. + */ + TRANSMIT_FAILED = 8; + + /* + * We detected that the main CPU voltage dropped below the minimum acceptable value + */ + BROWNOUT = 9; + + /* Selftest of SX1262 radio chip failed */ + SX1262_FAILURE = 10; + + /* + * A (likely software but possibly hardware) failure was detected while trying to send packets. + * If this occurs on your board, please post in the forum so that we can ask you to collect some information to allow fixing this bug + */ + RADIO_SPI_BUG = 11; +} + +/* + * Unique local debugging info for this node + * Note: we don't include position or the user info, because that will come in the + * Sent to the phone in response to WantNodes. + */ +message MyNodeInfo { + /* + * Tells the phone what our node number is, default starting value is + * lowbyte of macaddr, but it will be fixed if that is already in use + */ + uint32 my_node_num = 1; + + /* + * The total number of reboots this node has ever encountered + * (well - since the last time we discarded preferences) + */ + uint32 reboot_count = 8; + + /* + * The minimum app version that can talk to this device. + * Phone/PC apps should compare this to their build number and if too low tell the user they must update their app + */ + uint32 min_app_version = 11; +} + +/* + * Debug output from the device. + * To minimize the size of records inside the device code, if a time/source/level is not set + * on the message it is assumed to be a continuation of the previously sent message. + * This allows the device code to use fixed maxlen 64 byte strings for messages, + * and then extend as needed by emitting multiple records. + */ +message LogRecord { + /* + * Log levels, chosen to match python logging conventions. + */ + enum Level { + /* + * Log levels, chosen to match python logging conventions. + */ + UNSET = 0; + + /* + * Log levels, chosen to match python logging conventions. + */ + CRITICAL = 50; + + /* + * Log levels, chosen to match python logging conventions. + */ + ERROR = 40; + + /* + * Log levels, chosen to match python logging conventions. + */ + WARNING = 30; + + /* + * Log levels, chosen to match python logging conventions. + */ + INFO = 20; + + /* + * Log levels, chosen to match python logging conventions. + */ + DEBUG = 10; + + /* + * Log levels, chosen to match python logging conventions. + */ + TRACE = 5; + } + + /* + * Log levels, chosen to match python logging conventions. + */ + string message = 1; + + /* + * Seconds since 1970 - or 0 for unknown/unset + */ + fixed32 time = 2; + + /* + * Usually based on thread name - if known + */ + string source = 3; + + /* + * Not yet set + */ + Level level = 4; +} + +message QueueStatus { + /* Last attempt to queue status, ErrorCode */ + int32 res = 1; + + /* Free entries in the outgoing queue */ + uint32 free = 2; + + /* Maximum entries in the outgoing queue */ + uint32 maxlen = 3; + + /* What was mesh packet id that generated this response? */ + uint32 mesh_packet_id = 4; +} + +/* + * Packets from the radio to the phone will appear on the fromRadio characteristic. + * It will support READ and NOTIFY. When a new packet arrives the device will BLE notify? + * It will sit in that descriptor until consumed by the phone, + * at which point the next item in the FIFO will be populated. + */ +message FromRadio { + /* + * The packet id, used to allow the phone to request missing read packets from the FIFO, + * see our bluetooth docs + */ + uint32 id = 1; + + /* + * Log levels, chosen to match python logging conventions. + */ + oneof payload_variant { + /* + * Log levels, chosen to match python logging conventions. + */ + MeshPacket packet = 2; + + /* + * Tells the phone what our node number is, can be -1 if we've not yet joined a mesh. + * NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + */ + MyNodeInfo my_info = 3; + + /* + * One packet is sent for each node in the on radio DB + * starts over with the first node in our DB + */ + NodeInfo node_info = 4; + + /* + * Include a part of the config (was: RadioConfig radio) + */ + Config config = 5; + + /* + * Set to send debug console output over our protobuf stream + */ + LogRecord log_record = 6; + + /* + * Sent as true once the device has finished sending all of the responses to want_config + * recipient should check if this ID matches our original request nonce, if + * not, it means your config responses haven't started yet. + * NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + */ + uint32 config_complete_id = 7; + + /* + * Sent to tell clients the radio has just rebooted. + * Set to true if present. + * Not used on all transports, currently just used for the serial console. + * NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + */ + bool rebooted = 8; + + /* + * Include module config + */ + ModuleConfig moduleConfig = 9; + + /* + * One packet is sent for each channel + */ + Channel channel = 10; + + /* + * Queue status info + */ + QueueStatus queueStatus = 11; + + /* + * File Transfer Chunk + */ + XModem xmodemPacket = 12; + + /* + * Device metadata message + */ + DeviceMetadata metadata = 13; + + /* + * MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) + */ + MqttClientProxyMessage mqttClientProxyMessage = 14; + } +} + +/* + * Packets/commands to the radio will be written (reliably) to the toRadio characteristic. + * Once the write completes the phone can assume it is handled. + */ +message ToRadio { + /* + * Log levels, chosen to match python logging conventions. + */ + oneof payload_variant { + /* + * Send this packet on the mesh + */ + MeshPacket packet = 1; + + /* + * Phone wants radio to send full node db to the phone, This is + * typically the first packet sent to the radio when the phone gets a + * bluetooth connection. The radio will respond by sending back a + * MyNodeInfo, a owner, a radio config and a series of + * FromRadio.node_infos, and config_complete + * the integer you write into this field will be reported back in the + * config_complete_id response this allows clients to never be confused by + * a stale old partially sent config. + */ + uint32 want_config_id = 3; + + /* + * Tell API server we are disconnecting now. + * This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link. + * (Sending this message is optional for clients) + */ + bool disconnect = 4; + + /* + * File Transfer Chunk + */ + + XModem xmodemPacket = 5; + + /* + * MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) + */ + MqttClientProxyMessage mqttClientProxyMessage = 6; + + /* + * Heartbeat message (used to keep the device connection awake on serial) + */ + Heartbeat heartbeat = 7; + } +} + +/* + * Compressed message payload + */ +message Compressed { + /* + * PortNum to determine the how to handle the compressed payload. + */ + PortNum portnum = 1; + + /* + * Compressed data. + */ + bytes data = 2; +} + +/* + * Full info on edges for a single node + */ +message NeighborInfo { + /* + * The node ID of the node sending info on its neighbors + */ + uint32 node_id = 1; + /* + * Field to pass neighbor info for the next sending cycle + */ + uint32 last_sent_by_id = 2; + + /* + * Broadcast interval of the represented node (in seconds) + */ + uint32 node_broadcast_interval_secs = 3; + /* + * The list of out edges from this node + */ + repeated Neighbor neighbors = 4; +} + +/* + * A single edge in the mesh + */ +message Neighbor { + /* + * Node ID of neighbor + */ + uint32 node_id = 1; + + /* + * SNR of last heard message + */ + float snr = 2; + + /* + * Reception time (in secs since 1970) of last message that was last sent by this ID. + * Note: this is for local storage only and will not be sent out over the mesh. + */ + fixed32 last_rx_time = 3; + + /* + * Broadcast interval of this neighbor (in seconds). + * Note: this is for local storage only and will not be sent out over the mesh. + */ + uint32 node_broadcast_interval_secs = 4; +} + +/* + * Device metadata response + */ +message DeviceMetadata { + /* + * Device firmware version string + */ + string firmware_version = 1; + + /* + * Device state version + */ + uint32 device_state_version = 2; + + /* + * Indicates whether the device can shutdown CPU natively or via power management chip + */ + bool canShutdown = 3; + + /* + * Indicates that the device has native wifi capability + */ + bool hasWifi = 4; + + /* + * Indicates that the device has native bluetooth capability + */ + bool hasBluetooth = 5; + + /* + * Indicates that the device has an ethernet peripheral + */ + bool hasEthernet = 6; + + /* + * Indicates that the device's role in the mesh + */ + Config.DeviceConfig.Role role = 7; + + /* + * Indicates the device's current enabled position flags + */ + uint32 position_flags = 8; + + /* + * Device hardware model + */ + HardwareModel hw_model = 9; + + /* + * Has Remote Hardware enabled + */ + bool hasRemoteHardware = 10; +} + +/* + * A heartbeat message is sent to the node from the client to keep the connection alive. + * This is currently only needed to keep serial connections alive, but can be used by any PhoneAPI. + */ +message Heartbeat {} + +/* + * RemoteHardwarePins associated with a node + */ +message NodeRemoteHardwarePin { + /* + * The node_num exposing the available gpio pin + */ + uint32 node_num = 1; + + /* + * The the available gpio pin for usage with RemoteHardware module + */ + RemoteHardwarePin pin = 2; +} + +message ChunkedPayload { + /* + * The ID of the entire payload + */ + uint32 payload_id = 1; + + /* + * The total number of chunks in the payload + */ + uint32 chunk_count = 2; + + /* + * The current chunk index in the total + */ + uint32 chunk_index = 3; + + /* + * The binary data of the current chunk + */ + bytes payload_chunk = 4; +} + +/* + * Wrapper message for broken repeated oneof support + */ +message resend_chunks { + repeated uint32 chunks = 1; +} + +/* + * Responses to a ChunkedPayload request + */ +message ChunkedPayloadResponse { + /* + * The ID of the entire payload + */ + uint32 payload_id = 1; + + oneof payload_variant { + /* + * Request to transfer chunked payload + */ + bool request_transfer = 2; + + /* + * Accept the transfer chunked payload + */ + bool accept_transfer = 3; + /* + * Request missing indexes in the chunked payload + */ + resend_chunks resend_chunks = 4; + } +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/module_config.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/module_config.options new file mode 100644 index 0000000..68aba7c --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/module_config.options @@ -0,0 +1,28 @@ +*CannedMessageConfig.allow_input_source max_size:16 + +*MQTTConfig.address max_size:64 +*MQTTConfig.username max_size:64 +*MQTTConfig.password max_size:64 +*MQTTConfig.root max_size:32 + +*AudioConfig.ptt_pin int_size:8 +*AudioConfig.i2s_ws int_size:8 +*AudioConfig.i2s_sd int_size:8 +*AudioConfig.i2s_din int_size:8 +*AudioConfig.i2s_sck int_size:8 + +*ExternalNotificationConfig.output_vibra int_size:8 +*ExternalNotificationConfig.output_buzzer int_size:8 +*ExternalNotificationConfig.nag_timeout int_size:16 + +*RemoteHardwareConfig.available_pins max_count:4 +*RemoteHardwarePin.name max_size:15 +*RemoteHardwarePin.gpio_pin int_size:8 + +*AmbientLightingConfig.current int_size:8 +*AmbientLightingConfig.red int_size:8 +*AmbientLightingConfig.green int_size:8 +*AmbientLightingConfig.blue int_size:8 + +*DetectionSensorConfig.monitor_pin int_size:8 +*DetectionSensorConfig.name max_size:20 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/module_config.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/module_config.proto new file mode 100644 index 0000000..8215e01 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/module_config.proto @@ -0,0 +1,802 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ModuleConfigProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Module Config + */ +message ModuleConfig { + /* + * MQTT Client Config + */ + message MQTTConfig { + /* + * If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as + * is_uplink_enabled or is_downlink_enabled. + */ + bool enabled = 1; + + /* + * The server to use for our MQTT global message gateway feature. + * If not set, the default server will be used + */ + string address = 2; + + /* + * MQTT username to use (most useful for a custom MQTT server). + * If using a custom server, this will be honoured even if empty. + * If using the default server, this will only be honoured if set, otherwise the device will use the default username + */ + string username = 3; + + /* + * MQTT password to use (most useful for a custom MQTT server). + * If using a custom server, this will be honoured even if empty. + * If using the default server, this will only be honoured if set, otherwise the device will use the default password + */ + string password = 4; + + /* + * Whether to send encrypted or decrypted packets to MQTT. + * This parameter is only honoured if you also set server + * (the default official mqtt.meshtastic.org server can handle encrypted packets) + * Decrypted packets may be useful for external systems that want to consume meshtastic packets + */ + bool encryption_enabled = 5; + + /* + * Whether to send / consume json packets on MQTT + */ + bool json_enabled = 6; + + /* + * If true, we attempt to establish a secure connection using TLS + */ + bool tls_enabled = 7; + + /* + * The root topic to use for MQTT messages. Default is "msh". + * This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs + */ + string root = 8; + + /* + * If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection + */ + bool proxy_to_client_enabled = 9; + + /* + * If true, we will periodically report unencrypted information about our node to a map via MQTT + */ + bool map_reporting_enabled = 10; + + /* + * Settings for reporting information about our node to a map via MQTT + */ + MapReportSettings map_report_settings = 11; + } + + /* + * Settings for reporting unencrypted information about our node to a map via MQTT + */ + message MapReportSettings { + /* + * How often we should report our info to the map (in seconds) + */ + uint32 publish_interval_secs = 1; + + /* + * Bits of precision for the location sent (default of 32 is full precision). + */ + uint32 position_precision = 2; + } + + /* + * RemoteHardwareModule Config + */ + message RemoteHardwareConfig { + /* + * Whether the Module is enabled + */ + bool enabled = 1; + + /* + * Whether the Module allows consumers to read / write to pins not defined in available_pins + */ + bool allow_undefined_pin_access = 2; + + /* + * Exposes the available pins to the mesh for reading and writing + */ + repeated RemoteHardwarePin available_pins = 3; + } + + /* + * NeighborInfoModule Config + */ + message NeighborInfoConfig { + /* + * Whether the Module is enabled + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we should try to send our + * Neighbor Info to the mesh + */ + uint32 update_interval = 2; + } + + /* + * Detection Sensor Module Config + */ + message DetectionSensorConfig { + /* + * Whether the Module is enabled + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we can send a message to the mesh when a state change is detected + */ + uint32 minimum_broadcast_secs = 2; + + /* + * Interval in seconds of how often we should send a message to the mesh with the current state regardless of changes + * When set to 0, only state changes will be broadcasted + * Works as a sort of status heartbeat for peace of mind + */ + uint32 state_broadcast_secs = 3; + /* + * Send ASCII bell with alert message + * Useful for triggering ext. notification on bell + */ + bool send_bell = 4; + + /* + * Friendly name used to format message sent to mesh + * Example: A name "Motion" would result in a message "Motion detected" + * Maximum length of 20 characters + */ + string name = 5; + + /* + * GPIO pin to monitor for state changes + */ + uint32 monitor_pin = 6; + + /* + * Whether or not the GPIO pin state detection is triggered on HIGH (1) + * Otherwise LOW (0) + */ + bool detection_triggered_high = 7; + + /* + * Whether or not use INPUT_PULLUP mode for GPIO pin + * Only applicable if the board uses pull-up resistors on the pin + */ + bool use_pullup = 8; + } + + /* + * Audio Config for codec2 voice + */ + message AudioConfig { + /* + * Baudrate for codec2 voice + */ + enum Audio_Baud { + CODEC2_DEFAULT = 0; + CODEC2_3200 = 1; + CODEC2_2400 = 2; + CODEC2_1600 = 3; + CODEC2_1400 = 4; + CODEC2_1300 = 5; + CODEC2_1200 = 6; + CODEC2_700 = 7; + CODEC2_700B = 8; + } + + /* + * Whether Audio is enabled + */ + bool codec2_enabled = 1; + + /* + * PTT Pin + */ + uint32 ptt_pin = 2; + + /* + * The audio sample rate to use for codec2 + */ + Audio_Baud bitrate = 3; + + /* + * I2S Word Select + */ + uint32 i2s_ws = 4; + + /* + * I2S Data IN + */ + uint32 i2s_sd = 5; + + /* + * I2S Data OUT + */ + uint32 i2s_din = 6; + + /* + * I2S Clock + */ + uint32 i2s_sck = 7; + } + + /* + * Config for the Paxcounter Module + */ + message PaxcounterConfig { + /* + * Enable the Paxcounter Module + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we should try to send our + * metrics to the mesh + */ + + uint32 paxcounter_update_interval = 2; + + /* + * WiFi RSSI threshold. Defaults to -80 + */ + int32 wifi_threshold = 3; + + /* + * BLE RSSI threshold. Defaults to -80 + */ + int32 ble_threshold = 4; + + } + + /* + * Serial Config + */ + message SerialConfig { + /* + * TODO: REPLACE + */ + enum Serial_Baud { + BAUD_DEFAULT = 0; + BAUD_110 = 1; + BAUD_300 = 2; + BAUD_600 = 3; + BAUD_1200 = 4; + BAUD_2400 = 5; + BAUD_4800 = 6; + BAUD_9600 = 7; + BAUD_19200 = 8; + BAUD_38400 = 9; + BAUD_57600 = 10; + BAUD_115200 = 11; + BAUD_230400 = 12; + BAUD_460800 = 13; + BAUD_576000 = 14; + BAUD_921600 = 15; + } + + /* + * TODO: REPLACE + */ + enum Serial_Mode { + DEFAULT = 0; + SIMPLE = 1; + PROTO = 2; + TEXTMSG = 3; + NMEA = 4; + // NMEA messages specifically tailored for CalTopo + CALTOPO = 5; + } + + /* + * Preferences for the SerialModule + */ + bool enabled = 1; + + /* + * TODO: REPLACE + */ + bool echo = 2; + + /* + * RX pin (should match Arduino gpio pin number) + */ + uint32 rxd = 3; + + /* + * TX pin (should match Arduino gpio pin number) + */ + uint32 txd = 4; + + /* + * Serial baud rate + */ + Serial_Baud baud = 5; + + /* + * TODO: REPLACE + */ + uint32 timeout = 6; + + /* + * Mode for serial module operation + */ + Serial_Mode mode = 7; + + /* + * Overrides the platform's defacto Serial port instance to use with Serial module config settings + * This is currently only usable in output modes like NMEA / CalTopo and may behave strangely or not work at all in other modes + * Existing logging over the Serial Console will still be present + */ + bool override_console_serial_port = 8; + } + + /* + * External Notifications Config + */ + message ExternalNotificationConfig { + /* + * Enable the ExternalNotificationModule + */ + bool enabled = 1; + + /* + * When using in On/Off mode, keep the output on for this many + * milliseconds. Default 1000ms (1 second). + */ + uint32 output_ms = 2; + + /* + * Define the output pin GPIO setting Defaults to + * EXT_NOTIFY_OUT if set for the board. + * In standalone devices this pin should drive the LED to match the UI. + */ + uint32 output = 3; + + /* + * Optional: Define a secondary output pin for a vibra motor + * This is used in standalone devices to match the UI. + */ + uint32 output_vibra = 8; + + /* + * Optional: Define a tertiary output pin for an active buzzer + * This is used in standalone devices to to match the UI. + */ + uint32 output_buzzer = 9; + + /* + * IF this is true, the 'output' Pin will be pulled active high, false + * means active low. + */ + bool active = 4; + + /* + * True: Alert when a text message arrives (output) + */ + bool alert_message = 5; + + /* + * True: Alert when a text message arrives (output_vibra) + */ + bool alert_message_vibra = 10; + + /* + * True: Alert when a text message arrives (output_buzzer) + */ + bool alert_message_buzzer = 11; + + /* + * True: Alert when the bell character is received (output) + */ + bool alert_bell = 6; + + /* + * True: Alert when the bell character is received (output_vibra) + */ + bool alert_bell_vibra = 12; + + /* + * True: Alert when the bell character is received (output_buzzer) + */ + bool alert_bell_buzzer = 13; + + /* + * use a PWM output instead of a simple on/off output. This will ignore + * the 'output', 'output_ms' and 'active' settings and use the + * device.buzzer_gpio instead. + */ + bool use_pwm = 7; + + /* + * The notification will toggle with 'output_ms' for this time of seconds. + * Default is 0 which means don't repeat at all. 60 would mean blink + * and/or beep for 60 seconds + */ + uint32 nag_timeout = 14; + + /* + * When true, enables devices with native I2S audio output to use the RTTTL over speaker like a buzzer + * T-Watch S3 and T-Deck for example have this capability + */ + bool use_i2s_as_buzzer = 15; + } + + /* + * Store and Forward Module Config + */ + message StoreForwardConfig { + /* + * Enable the Store and Forward Module + */ + bool enabled = 1; + + /* + * TODO: REPLACE + */ + bool heartbeat = 2; + + /* + * TODO: REPLACE + */ + uint32 records = 3; + + /* + * TODO: REPLACE + */ + uint32 history_return_max = 4; + + /* + * TODO: REPLACE + */ + uint32 history_return_window = 5; + } + + /* + * Preferences for the RangeTestModule + */ + message RangeTestConfig { + /* + * Enable the Range Test Module + */ + bool enabled = 1; + + /* + * Send out range test messages from this node + */ + uint32 sender = 2; + + /* + * Bool value indicating that this node should save a RangeTest.csv file. + * ESP32 Only + */ + bool save = 3; + } + + /* + * Configuration for both device and environment metrics + */ + message TelemetryConfig { + /* + * Interval in seconds of how often we should try to send our + * device metrics to the mesh + */ + uint32 device_update_interval = 1; + + /* + * Interval in seconds of how often we should try to send our + * environment measurements to the mesh + */ + + uint32 environment_update_interval = 2; + + /* + * Preferences for the Telemetry Module (Environment) + * Enable/Disable the telemetry measurement module measurement collection + */ + bool environment_measurement_enabled = 3; + + /* + * Enable/Disable the telemetry measurement module on-device display + */ + bool environment_screen_enabled = 4; + + /* + * We'll always read the sensor in Celsius, but sometimes we might want to + * display the results in Fahrenheit as a "user preference". + */ + bool environment_display_fahrenheit = 5; + + /* + * Enable/Disable the air quality metrics + */ + bool air_quality_enabled = 6; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + uint32 air_quality_interval = 7; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + bool power_measurement_enabled = 8; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + uint32 power_update_interval = 9; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + bool power_screen_enabled = 10; + } + + /* + * TODO: REPLACE + */ + message CannedMessageConfig { + /* + * TODO: REPLACE + */ + enum InputEventChar { + /* + * TODO: REPLACE + */ + NONE = 0; + + /* + * TODO: REPLACE + */ + UP = 17; + + /* + * TODO: REPLACE + */ + DOWN = 18; + + /* + * TODO: REPLACE + */ + LEFT = 19; + + /* + * TODO: REPLACE + */ + RIGHT = 20; + + /* + * '\n' + */ + SELECT = 10; + + /* + * TODO: REPLACE + */ + BACK = 27; + + /* + * TODO: REPLACE + */ + CANCEL = 24; + } + + /* + * Enable the rotary encoder #1. This is a 'dumb' encoder sending pulses on both A and B pins while rotating. + */ + bool rotary1_enabled = 1; + + /* + * GPIO pin for rotary encoder A port. + */ + uint32 inputbroker_pin_a = 2; + + /* + * GPIO pin for rotary encoder B port. + */ + uint32 inputbroker_pin_b = 3; + + /* + * GPIO pin for rotary encoder Press port. + */ + uint32 inputbroker_pin_press = 4; + + /* + * Generate input event on CW of this kind. + */ + InputEventChar inputbroker_event_cw = 5; + + /* + * Generate input event on CCW of this kind. + */ + InputEventChar inputbroker_event_ccw = 6; + + /* + * Generate input event on Press of this kind. + */ + InputEventChar inputbroker_event_press = 7; + + /* + * Enable the Up/Down/Select input device. Can be RAK rotary encoder or 3 buttons. Uses the a/b/press definitions from inputbroker. + */ + bool updown1_enabled = 8; + + /* + * Enable/disable CannedMessageModule. + */ + bool enabled = 9; + + /* + * Input event origin accepted by the canned message module. + * Can be e.g. "rotEnc1", "upDownEnc1" or keyword "_any" + */ + string allow_input_source = 10; + + /* + * CannedMessageModule also sends a bell character with the messages. + * ExternalNotificationModule can benefit from this feature. + */ + bool send_bell = 11; + } + + /* + Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. + Initially created for the RAK14001 RGB LED module. + */ + message AmbientLightingConfig { + /* + * Sets LED to on or off. + */ + bool led_state = 1; + + /* + * Sets the current for the LED output. Default is 10. + */ + uint32 current = 2; + + /* + * Sets the red LED level. Values are 0-255. + */ + uint32 red = 3; + + /* + * Sets the green LED level. Values are 0-255. + */ + uint32 green = 4; + + /* + * Sets the blue LED level. Values are 0-255. + */ + uint32 blue = 5; + } + + /* + * TODO: REPLACE + */ + oneof payload_variant { + /* + * TODO: REPLACE + */ + MQTTConfig mqtt = 1; + + /* + * TODO: REPLACE + */ + SerialConfig serial = 2; + + /* + * TODO: REPLACE + */ + ExternalNotificationConfig external_notification = 3; + + /* + * TODO: REPLACE + */ + StoreForwardConfig store_forward = 4; + + /* + * TODO: REPLACE + */ + RangeTestConfig range_test = 5; + + /* + * TODO: REPLACE + */ + TelemetryConfig telemetry = 6; + + /* + * TODO: REPLACE + */ + CannedMessageConfig canned_message = 7; + + /* + * TODO: REPLACE + */ + AudioConfig audio = 8; + + /* + * TODO: REPLACE + */ + RemoteHardwareConfig remote_hardware = 9; + + /* + * TODO: REPLACE + */ + NeighborInfoConfig neighbor_info = 10; + + /* + * TODO: REPLACE + */ + AmbientLightingConfig ambient_lighting = 11; + + /* + * TODO: REPLACE + */ + DetectionSensorConfig detection_sensor = 12; + + /* + * TODO: REPLACE + */ + PaxcounterConfig paxcounter = 13; + } +} + +/* + * A GPIO pin definition for remote hardware module + */ +message RemoteHardwarePin { + /* + * GPIO Pin number (must match Arduino) + */ + uint32 gpio_pin = 1; + + /* + * Name for the GPIO pin (i.e. Front gate, mailbox, etc) + */ + string name = 2; + + /* + * Type of GPIO access available to consumers on the mesh + */ + RemoteHardwarePinType type = 3; +} + +enum RemoteHardwarePinType { + /* + * Unset/unused + */ + UNKNOWN = 0; + + /* + * GPIO pin can be read (if it is high / low) + */ + DIGITAL_READ = 1; + + /* + * GPIO pin can be written to (high / low) + */ + DIGITAL_WRITE = 2; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mqtt.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mqtt.options new file mode 100644 index 0000000..591e898 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mqtt.options @@ -0,0 +1,8 @@ +*ServiceEnvelope.packet type:FT_POINTER +*ServiceEnvelope.channel_id type:FT_POINTER +*ServiceEnvelope.gateway_id type:FT_POINTER + +*MapReport.long_name max_size:40 +*MapReport.short_name max_size:5 +*MapReport.firmware_version max_size:18 +*MapReport.num_online_local_nodes int_size:16 \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mqtt.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mqtt.proto new file mode 100644 index 0000000..2dbc820 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/mqtt.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/config.proto"; +import "meshtastic/mesh.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "MQTTProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * This message wraps a MeshPacket with extra metadata about the sender and how it arrived. + */ +message ServiceEnvelope { + /* + * The (probably encrypted) packet + */ + MeshPacket packet = 1; + + /* + * The global channel ID it was sent on + */ + string channel_id = 2; + + /* + * The sending gateway node ID. Can we use this to authenticate/prevent fake + * nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as + * the globally trusted nodenum + */ + string gateway_id = 3; +} + +/* + * Information about a node intended to be reported unencrypted to a map using MQTT. + */ +message MapReport { + /* + * A full name for this user, i.e. "Kevin Hester" + */ + string long_name = 1; + + /* + * A VERY short name, ideally two characters. + * Suitable for a tiny OLED screen + */ + string short_name = 2; + + /* + * Role of the node that applies specific settings for a particular use-case + */ + Config.DeviceConfig.Role role = 3; + + /* + * Hardware model of the node, i.e. T-Beam, Heltec V3, etc... + */ + HardwareModel hw_model = 4; + + /* + * Device firmware version string + */ + string firmware_version = 5; + + /* + * The region code for the radio (US, CN, EU433, etc...) + */ + Config.LoRaConfig.RegionCode region = 6; + + /* + * Modem preset used by the radio (LongFast, MediumSlow, etc...) + */ + Config.LoRaConfig.ModemPreset modem_preset = 7; + + /* + * Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...) + * and it uses the default frequency slot given the region and modem preset. + */ + bool has_default_channel = 8; + + /* + * Latitude: multiply by 1e-7 to get degrees in floating point + */ + sfixed32 latitude_i = 9; + + /* + * Longitude: multiply by 1e-7 to get degrees in floating point + */ + sfixed32 longitude_i = 10; + + /* + * Altitude in meters above MSL + */ + int32 altitude = 11; + + /* + * Indicates the bits of precision for latitude and longitude set by the sending node + */ + uint32 position_precision = 12; + + /* + * Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) + */ + uint32 num_online_local_nodes = 13; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/paxcount.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/paxcount.proto new file mode 100644 index 0000000..47b2639 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/paxcount.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "PaxcountProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * TODO: REPLACE + */ +message Paxcount { + /* + * seen Wifi devices + */ + uint32 wifi = 1; + + /* + * Seen BLE devices + */ + uint32 ble = 2; + + /* + * Uptime in seconds + */ + uint32 uptime = 3; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/portnums.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/portnums.proto new file mode 100644 index 0000000..5808eb7 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/portnums.proto @@ -0,0 +1,216 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "Portnums"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a + * unique 'portnum' for their application. + * If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this + * master table. + * PortNums should be assigned in the following range: + * 0-63 Core Meshtastic use, do not use for third party apps + * 64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to register your application + * 256-511 Use one of these portnums for your private applications that you don't want to register publically + * All other values are reserved. + * Note: This was formerly a Type enum named 'typ' with the same id # + * We have change to this 'portnum' based scheme for specifying app handlers for particular payloads. + * This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically. + */ +enum PortNum { + /* + * Deprecated: do not use in new code (formerly called OPAQUE) + * A message sent from a device outside of the mesh, in a form the mesh does not understand + * NOTE: This must be 0, because it is documented in IMeshService.aidl to be so + * ENCODING: binary undefined + */ + UNKNOWN_APP = 0; + + /* + * A simple UTF-8 text message, which even the little micros in the mesh + * can understand and show on their screen eventually in some circumstances + * even signal might send messages in this form (see below) + * ENCODING: UTF-8 Plaintext (?) + */ + TEXT_MESSAGE_APP = 1; + + /* + * Reserved for built-in GPIO/example app. + * See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number + * ENCODING: Protobuf + */ + REMOTE_HARDWARE_APP = 2; + + /* + * The built-in position messaging app. + * Payload is a Position message. + * ENCODING: Protobuf + */ + POSITION_APP = 3; + + /* + * The built-in user info app. + * Payload is a User message. + * ENCODING: Protobuf + */ + NODEINFO_APP = 4; + + /* + * Protocol control packets for mesh protocol use. + * Payload is a Routing message. + * ENCODING: Protobuf + */ + ROUTING_APP = 5; + + /* + * Admin control packets. + * Payload is a AdminMessage message. + * ENCODING: Protobuf + */ + ADMIN_APP = 6; + + /* + * Compressed TEXT_MESSAGE payloads. + * ENCODING: UTF-8 Plaintext (?) with Unishox2 Compression + * NOTE: The Device Firmware converts a TEXT_MESSAGE_APP to TEXT_MESSAGE_COMPRESSED_APP if the compressed + * payload is shorter. There's no need for app developers to do this themselves. Also the firmware will decompress + * any incoming TEXT_MESSAGE_COMPRESSED_APP payload and convert to TEXT_MESSAGE_APP. + */ + TEXT_MESSAGE_COMPRESSED_APP = 7; + + /* + * Waypoint payloads. + * Payload is a Waypoint message. + * ENCODING: Protobuf + */ + WAYPOINT_APP = 8; + + /* + * Audio Payloads. + * Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now + * ENCODING: codec2 audio frames + * NOTE: audio frames contain a 3 byte header (0xc0 0xde 0xc2) and a one byte marker for the decompressed bitrate. + * This marker comes from the 'moduleConfig.audio.bitrate' enum minus one. + */ + AUDIO_APP = 9; + + /* + * Same as Text Message but originating from Detection Sensor Module. + * NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 + */ + DETECTION_SENSOR_APP = 10; + + /* + * Provides a 'ping' service that replies to any packet it receives. + * Also serves as a small example module. + * ENCODING: ASCII Plaintext + */ + REPLY_APP = 32; + + /* + * Used for the python IP tunnel feature + * ENCODING: IP Packet. Handled by the python API, firmware ignores this one and pases on. + */ + IP_TUNNEL_APP = 33; + + /* + * Paxcounter lib included in the firmware + * ENCODING: protobuf + */ + PAXCOUNTER_APP = 34; + + /* + * Provides a hardware serial interface to send and receive from the Meshtastic network. + * Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic + * network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network. + * Maximum packet size of 240 bytes. + * Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp. + * ENCODING: binary undefined + */ + SERIAL_APP = 64; + + /* + * STORE_FORWARD_APP (Work in Progress) + * Maintained by Jm Casler (MC Hamster) : jm@casler.org + * ENCODING: Protobuf + */ + STORE_FORWARD_APP = 65; + + /* + * Optional port for messages for the range test module. + * ENCODING: ASCII Plaintext + * NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 + */ + RANGE_TEST_APP = 66; + + /* + * Provides a format to send and receive telemetry data from the Meshtastic network. + * Maintained by Charles Crossan (crossan007) : crossan007@gmail.com + * ENCODING: Protobuf + */ + TELEMETRY_APP = 67; + + /* + * Experimental tools for estimating node position without a GPS + * Maintained by Github user a-f-G-U-C (a Meshtastic contributor) + * Project files at https://github.com/a-f-G-U-C/Meshtastic-ZPS + * ENCODING: arrays of int64 fields + */ + ZPS_APP = 68; + + /* + * Used to let multiple instances of Linux native applications communicate + * as if they did using their LoRa chip. + * Maintained by GitHub user GUVWAF. + * Project files at https://github.com/GUVWAF/Meshtasticator + * ENCODING: Protobuf (?) + */ + SIMULATOR_APP = 69; + + /* + * Provides a traceroute functionality to show the route a packet towards + * a certain destination would take on the mesh. + * ENCODING: Protobuf + */ + TRACEROUTE_APP = 70; + + /* + * Aggregates edge info for the network by sending out a list of each node's neighbors + * ENCODING: Protobuf + */ + NEIGHBORINFO_APP = 71; + + /* + * ATAK Plugin + * Portnum for payloads from the official Meshtastic ATAK plugin + */ + ATAK_PLUGIN = 72; + + /* + * Provides unencrypted information about a node for consumption by a map via MQTT + */ + MAP_REPORT_APP = 73; + + /* + * Private applications should use portnums >= 256. + * To simplify initial development and testing you can use "PRIVATE_APP" + * in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh)) + */ + PRIVATE_APP = 256; + + /* + * ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder + * ENCODING: libcotshrink + */ + ATAK_FORWARDER = 257; + + /* + * Currently we limit port nums to no higher than this value + */ + MAX = 511; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/remote_hardware.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/remote_hardware.proto new file mode 100644 index 0000000..ba4a693 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/remote_hardware.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "RemoteHardware"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * An example app to show off the module system. This message is used for + * REMOTE_HARDWARE_APP PortNums. + * Also provides easy remote access to any GPIO. + * In the future other remote hardware operations can be added based on user interest + * (i.e. serial output, spi/i2c input/output). + * FIXME - currently this feature is turned on by default which is dangerous + * because no security yet (beyond the channel mechanism). + * It should be off by default and then protected based on some TBD mechanism + * (a special channel once multichannel support is included?) + */ +message HardwareMessage { + /* + * TODO: REPLACE + */ + enum Type { + /* + * Unset/unused + */ + UNSET = 0; + + /* + * Set gpio gpios based on gpio_mask/gpio_value + */ + WRITE_GPIOS = 1; + + /* + * We are now interested in watching the gpio_mask gpios. + * If the selected gpios change, please broadcast GPIOS_CHANGED. + * Will implicitly change the gpios requested to be INPUT gpios. + */ + WATCH_GPIOS = 2; + + /* + * The gpios listed in gpio_mask have changed, the new values are listed in gpio_value + */ + GPIOS_CHANGED = 3; + + /* + * Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated + */ + READ_GPIOS = 4; + + /* + * A reply to READ_GPIOS. gpio_mask and gpio_value will be populated + */ + READ_GPIOS_REPLY = 5; + } + + /* + * What type of HardwareMessage is this? + */ + Type type = 1; + + /* + * What gpios are we changing. Not used for all MessageTypes, see MessageType for details + */ + uint64 gpio_mask = 2; + + /* + * For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios. + * Not used for all MessageTypes, see MessageType for details + */ + uint64 gpio_value = 3; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/rtttl.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/rtttl.options new file mode 100644 index 0000000..1ae0c2f --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/rtttl.options @@ -0,0 +1 @@ +*RTTTLConfig.ringtone max_size:230 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/rtttl.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/rtttl.proto new file mode 100644 index 0000000..11c8b92 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/rtttl.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "RTTTLConfigProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Canned message module configuration. + */ +message RTTTLConfig { + /* + * Ringtone for PWM Buzzer in RTTTL Format. + */ + string ringtone = 1; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/storeforward.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/storeforward.options new file mode 100644 index 0000000..8580aab --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/storeforward.options @@ -0,0 +1 @@ +*StoreAndForward.text max_size:237 \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/storeforward.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/storeforward.proto new file mode 100644 index 0000000..651eae5 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/storeforward.proto @@ -0,0 +1,218 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "StoreAndForwardProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * TODO: REPLACE + */ +message StoreAndForward { + /* + * 001 - 063 = From Router + * 064 - 127 = From Client + */ + enum RequestResponse { + /* + * Unset/unused + */ + UNSET = 0; + + /* + * Router is an in error state. + */ + ROUTER_ERROR = 1; + + /* + * Router heartbeat + */ + ROUTER_HEARTBEAT = 2; + + /* + * Router has requested the client respond. This can work as a + * "are you there" message. + */ + ROUTER_PING = 3; + + /* + * The response to a "Ping" + */ + ROUTER_PONG = 4; + + /* + * Router is currently busy. Please try again later. + */ + ROUTER_BUSY = 5; + + /* + * Router is responding to a request for history. + */ + ROUTER_HISTORY = 6; + + /* + * Router is responding to a request for stats. + */ + ROUTER_STATS = 7; + + /* + * Router sends a text message from its history that was a direct message. + */ + ROUTER_TEXT_DIRECT = 8; + + /* + * Router sends a text message from its history that was a broadcast. + */ + ROUTER_TEXT_BROADCAST = 9; + + /* + * Client is an in error state. + */ + CLIENT_ERROR = 64; + + /* + * Client has requested a replay from the router. + */ + CLIENT_HISTORY = 65; + + /* + * Client has requested stats from the router. + */ + CLIENT_STATS = 66; + + /* + * Client has requested the router respond. This can work as a + * "are you there" message. + */ + CLIENT_PING = 67; + + /* + * The response to a "Ping" + */ + CLIENT_PONG = 68; + + /* + * Client has requested that the router abort processing the client's request + */ + CLIENT_ABORT = 106; + } + + /* + * TODO: REPLACE + */ + message Statistics { + /* + * Number of messages we have ever seen + */ + uint32 messages_total = 1; + + /* + * Number of messages we have currently saved our history. + */ + uint32 messages_saved = 2; + + /* + * Maximum number of messages we will save + */ + uint32 messages_max = 3; + + /* + * Router uptime in seconds + */ + uint32 up_time = 4; + + /* + * Number of times any client sent a request to the S&F. + */ + uint32 requests = 5; + + /* + * Number of times the history was requested. + */ + uint32 requests_history = 6; + + /* + * Is the heartbeat enabled on the server? + */ + bool heartbeat = 7; + + /* + * Maximum number of messages the server will return. + */ + uint32 return_max = 8; + + /* + * Maximum history window in minutes the server will return messages from. + */ + uint32 return_window = 9; + } + + /* + * TODO: REPLACE + */ + message History { + /* + * Number of that will be sent to the client + */ + uint32 history_messages = 1; + + /* + * The window of messages that was used to filter the history client requested + */ + uint32 window = 2; + + /* + * Index in the packet history of the last message sent in a previous request to the server. + * Will be sent to the client before sending the history and can be set in a subsequent request to avoid getting packets the server already sent to the client. + */ + uint32 last_request = 3; + } + + /* + * TODO: REPLACE + */ + message Heartbeat { + /* + * Period in seconds that the heartbeat is sent out that will be sent to the client + */ + uint32 period = 1; + + /* + * If set, this is not the primary Store & Forward router on the mesh + */ + uint32 secondary = 2; + } + + /* + * TODO: REPLACE + */ + RequestResponse rr = 1; + + /* + * TODO: REPLACE + */ + oneof variant { + /* + * TODO: REPLACE + */ + Statistics stats = 2; + + /* + * TODO: REPLACE + */ + History history = 3; + + /* + * TODO: REPLACE + */ + Heartbeat heartbeat = 4; + + /* + * Text from history message. + */ + bytes text = 5; + } +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/telemetry.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/telemetry.options new file mode 100644 index 0000000..72aba92 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/telemetry.options @@ -0,0 +1,5 @@ +# options for nanopb +# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options + +*EnvironmentMetrics.iaq int_size:16 +*EnvironmentMetrics.wind_direction int_size:16 \ No newline at end of file diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/telemetry.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/telemetry.proto new file mode 100644 index 0000000..cf43fc8 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/telemetry.proto @@ -0,0 +1,403 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "TelemetryProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Key native device metrics such as battery level + */ +message DeviceMetrics { + /* + * 0-100 (>100 means powered) + */ + uint32 battery_level = 1; + + /* + * Voltage measured + */ + float voltage = 2; + + /* + * Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). + */ + float channel_utilization = 3; + + /* + * Percent of airtime for transmission used within the last hour. + */ + float air_util_tx = 4; + + /* + * How long the device has been running since the last reboot (in seconds) + */ + uint32 uptime_seconds = 5; +} + +/* + * Weather station or other environmental metrics + */ +message EnvironmentMetrics { + /* + * Temperature measured + */ + float temperature = 1; + + /* + * Relative humidity percent measured + */ + float relative_humidity = 2; + + /* + * Barometric pressure in hPA measured + */ + float barometric_pressure = 3; + + /* + * Gas resistance in MOhm measured + */ + float gas_resistance = 4; + + /* + * Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) + */ + float voltage = 5; + + /* + * Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) + */ + float current = 6; + + /* + * relative scale IAQ value as measured by Bosch BME680 . value 0-500. + * Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here. + */ + uint32 iaq = 7; + + /* + * RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm. + */ + float distance = 8; + + /* + * VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. + */ + float lux = 9; + + /* + * VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor. + */ + float white_lux = 10; + + /* + * Infrared lux + */ + float ir_lux = 11; + + /* + * Ultraviolet lux + */ + float uv_lux = 12; + + /* + * Wind direction in degrees + * 0 degrees = North, 90 = East, etc... + */ + uint32 wind_direction = 13; + + /* + * Wind speed in m/s + */ + float wind_speed = 14; + + /* + * Weight in KG + */ + float weight = 15; +} + +/* + * Power Metrics (voltage / current / etc) + */ +message PowerMetrics { + /* + * Voltage (Ch1) + */ + float ch1_voltage = 1; + + /* + * Current (Ch1) + */ + float ch1_current = 2; + + /* + * Voltage (Ch2) + */ + float ch2_voltage = 3; + + /* + * Current (Ch2) + */ + float ch2_current = 4; + + /* + * Voltage (Ch3) + */ + float ch3_voltage = 5; + + /* + * Current (Ch3) + */ + float ch3_current = 6; +} + +/* + * Air quality metrics + */ +message AirQualityMetrics { + /* + * Concentration Units Standard PM1.0 + */ + uint32 pm10_standard = 1; + + /* + * Concentration Units Standard PM2.5 + */ + uint32 pm25_standard = 2; + + /* + * Concentration Units Standard PM10.0 + */ + uint32 pm100_standard = 3; + + /* + * Concentration Units Environmental PM1.0 + */ + uint32 pm10_environmental = 4; + + /* + * Concentration Units Environmental PM2.5 + */ + uint32 pm25_environmental = 5; + + /* + * Concentration Units Environmental PM10.0 + */ + uint32 pm100_environmental = 6; + + /* + * 0.3um Particle Count + */ + uint32 particles_03um = 7; + + /* + * 0.5um Particle Count + */ + uint32 particles_05um = 8; + + /* + * 1.0um Particle Count + */ + uint32 particles_10um = 9; + + /* + * 2.5um Particle Count + */ + uint32 particles_25um = 10; + + /* + * 5.0um Particle Count + */ + uint32 particles_50um = 11; + + /* + * 10.0um Particle Count + */ + uint32 particles_100um = 12; +} + +/* + * Types of Measurements the telemetry module is equipped to handle + */ +message Telemetry { + /* + * Seconds since 1970 - or 0 for unknown/unset + */ + fixed32 time = 1; + + oneof variant { + /* + * Key native device metrics such as battery level + */ + DeviceMetrics device_metrics = 2; + + /* + * Weather station or other environmental metrics + */ + EnvironmentMetrics environment_metrics = 3; + + /* + * Air quality metrics + */ + AirQualityMetrics air_quality_metrics = 4; + + /* + * Power Metrics + */ + PowerMetrics power_metrics = 5; + } +} + +/* + * Supported I2C Sensors for telemetry in Meshtastic + */ +enum TelemetrySensorType { + /* + * No external telemetry sensor explicitly set + */ + SENSOR_UNSET = 0; + + /* + * High accuracy temperature, pressure, humidity + */ + BME280 = 1; + + /* + * High accuracy temperature, pressure, humidity, and air resistance + */ + BME680 = 2; + + /* + * Very high accuracy temperature + */ + MCP9808 = 3; + + /* + * Moderate accuracy current and voltage + */ + INA260 = 4; + + /* + * Moderate accuracy current and voltage + */ + INA219 = 5; + + /* + * High accuracy temperature and pressure + */ + BMP280 = 6; + + /* + * High accuracy temperature and humidity + */ + SHTC3 = 7; + + /* + * High accuracy pressure + */ + LPS22 = 8; + + /* + * 3-Axis magnetic sensor + */ + QMC6310 = 9; + + /* + * 6-Axis inertial measurement sensor + */ + QMI8658 = 10; + + /* + * 3-Axis magnetic sensor + */ + QMC5883L = 11; + + /* + * High accuracy temperature and humidity + */ + SHT31 = 12; + + /* + * PM2.5 air quality sensor + */ + PMSA003I = 13; + + /* + * INA3221 3 Channel Voltage / Current Sensor + */ + INA3221 = 14; + + /* + * BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280) + */ + BMP085 = 15; + + /* + * RCWL-9620 Doppler Radar Distance Sensor, used for water level detection + */ + RCWL9620 = 16; + + /* + * Sensirion High accuracy temperature and humidity + */ + SHT4X = 17; + + /* + * VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. + */ + VEML7700 = 18; + + /* + * MLX90632 non-contact IR temperature sensor. + */ + MLX90632 = 19; + + /* + * TI OPT3001 Ambient Light Sensor + */ + OPT3001 = 20; + + /* + * Lite On LTR-390UV-01 UV Light Sensor + */ + LTR390UV = 21; + + /* + * AMS TSL25911FN RGB Light Sensor + */ + TSL25911FN = 22; + + /* + * AHT10 Integrated temperature and humidity sensor + */ + AHT10 = 23; + + /* + * DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) + */ + DFROBOT_LARK = 24; + + /* + * NAU7802 Scale Chip or compatible + */ + NAU7802 = 25; +} + +/* + * NAU7802 Telemetry configuration, for saving to flash + */ +message Nau7802Config { + /* + * The offset setting for the NAU7802 + */ + int32 zeroOffset = 1; + + /* + * The calibration factor for the NAU7802 + */ + float calibrationFactor = 2; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/xmodem.options b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/xmodem.options new file mode 100644 index 0000000..3af6125 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/xmodem.options @@ -0,0 +1,6 @@ +# options for nanopb +# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options + +*XModem.buffer max_size:128 +*XModem.seq int_size:16 +*XModem.crc16 int_size:16 diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/xmodem.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/xmodem.proto new file mode 100644 index 0000000..732780a --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/meshtastic/xmodem.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "XmodemProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +message XModem { + enum Control { + NUL = 0; + SOH = 1; + STX = 2; + EOT = 4; + ACK = 6; + NAK = 21; + CAN = 24; + CTRLZ = 26; + } + + Control control = 1; + uint32 seq = 2; + uint32 crc16 = 3; + bytes buffer = 4; +} diff --git a/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/nanopb.proto b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/nanopb.proto new file mode 100644 index 0000000..2f27e34 --- /dev/null +++ b/dissectors/meshtastic-exploiteers/src/meshtastic/protobufs/nanopb.proto @@ -0,0 +1,184 @@ +// Custom options for defining: +// - Maximum size of string/bytes +// - Maximum number of elements in array +// +// These are used by nanopb to generate statically allocable structures +// for memory-limited environments. + +syntax = "proto2"; + +import "google/protobuf/descriptor.proto"; + +option java_package = "fi.kapsi.koti.jpa.nanopb"; + +enum FieldType { + FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible. + FT_CALLBACK = 1; // Always generate a callback field. + FT_POINTER = 4; // Always generate a dynamically allocated field. + FT_STATIC = 2; // Generate a static field or raise an exception if not possible. + FT_IGNORE = 3; // Ignore the field completely. + FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead +} + +enum IntSize { + IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto + IS_8 = 8; + IS_16 = 16; + IS_32 = 32; + IS_64 = 64; +} + +enum TypenameMangling { + M_NONE = 0; // Default, no typename mangling + M_STRIP_PACKAGE = 1; // Strip current package name + M_FLATTEN = 2; // Only use last path component + M_PACKAGE_INITIALS = 3; // Replace the package name by the initials +} + +enum DescriptorSize { + DS_AUTO = 0; // Select minimal size based on field type + DS_1 = 1; // 1 word; up to 15 byte fields, no arrays + DS_2 = 2; // 2 words; up to 4095 byte fields, 4095 entry arrays + DS_4 = 4; // 4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays + DS_8 = 8; // 8 words; up to 2^32-1 entry arrays +} + +// This is the inner options message, which basically defines options for +// a field. When it is used in message or file scope, it applies to all +// fields. +message NanoPBOptions { + // Allocated size for 'bytes' and 'string' fields. + // For string fields, this should include the space for null terminator. + optional int32 max_size = 1; + + // Maximum length for 'string' fields. Setting this is equivalent + // to setting max_size to a value of length+1. + optional int32 max_length = 14; + + // Allocated number of entries in arrays ('repeated' fields) + optional int32 max_count = 2; + + // Size of integer fields. Can save some memory if you don't need + // full 32 bits for the value. + optional IntSize int_size = 7 [default = IS_DEFAULT]; + + // Force type of field (callback or static allocation) + optional FieldType type = 3 [default = FT_DEFAULT]; + + // Use long names for enums, i.e. EnumName_EnumValue. + optional bool long_names = 4 [default = true]; + + // Add 'packed' attribute to generated structs. + // Note: this cannot be used on CPUs that break on unaligned + // accesses to variables. + optional bool packed_struct = 5 [default = false]; + + // Add 'packed' attribute to generated enums. + optional bool packed_enum = 10 [default = false]; + + // Skip this message + optional bool skip_message = 6 [default = false]; + + // Generate oneof fields as normal optional fields instead of union. + optional bool no_unions = 8 [default = false]; + + // integer type tag for a message + optional uint32 msgid = 9; + + // decode oneof as anonymous union + optional bool anonymous_oneof = 11 [default = false]; + + // Proto3 singular field does not generate a "has_" flag + optional bool proto3 = 12 [default = false]; + + // Force proto3 messages to have no "has_" flag. + // This was default behavior until nanopb-0.4.0. + optional bool proto3_singular_msgs = 21 [default = false]; + + // Generate an enum->string mapping function (can take up lots of space). + optional bool enum_to_string = 13 [default = false]; + + // Generate bytes arrays with fixed length + optional bool fixed_length = 15 [default = false]; + + // Generate repeated field with fixed count + optional bool fixed_count = 16 [default = false]; + + // Generate message-level callback that is called before decoding submessages. + // This can be used to set callback fields for submsgs inside oneofs. + optional bool submsg_callback = 22 [default = false]; + + // Shorten or remove package names from type names. + // This option applies only on the file level. + optional TypenameMangling mangle_names = 17 [default = M_NONE]; + + // Data type for storage associated with callback fields. + optional string callback_datatype = 18 [default = "pb_callback_t"]; + + // Callback function used for encoding and decoding. + // Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t + // structure. This is still supported, but does not work inside e.g. oneof or pointer + // fields. Instead, a new method allows specifying a per-message callback that + // will be called for all callback fields in a message type. + optional string callback_function = 19 [default = "pb_default_field_callback"]; + + // Select the size of field descriptors. This option has to be defined + // for the whole message, not per-field. Usually automatic selection is + // ok, but if it results in compilation errors you can increase the field + // size here. + optional DescriptorSize descriptorsize = 20 [default = DS_AUTO]; + + // Set default value for has_ fields. + optional bool default_has = 23 [default = false]; + + // Extra files to include in generated `.pb.h` + repeated string include = 24; + + // Automatic includes to exclude from generated `.pb.h` + // Same as nanopb_generator.py command line flag -x. + repeated string exclude = 26; + + // Package name that applies only for nanopb. + optional string package = 25; + + // Override type of the field in generated C code. Only to be used with related field types + optional google.protobuf.FieldDescriptorProto.Type type_override = 27; + + // Due to historical reasons, nanopb orders fields in structs by their tag number + // instead of the order in .proto. Set this to false to keep the .proto order. + // The default value will probably change to false in nanopb-0.5.0. + optional bool sort_by_tag = 28 [default = true]; + + // Set the FT_DEFAULT field conversion strategy. + // A field that can become a static member of a c struct (e.g. int, bool, etc) + // will be a a static field. + // Fields with dynamic length are converted to either a pointer or a callback. + optional FieldType fallback_type = 29 [default = FT_CALLBACK]; +} + +// Extensions to protoc 'Descriptor' type in order to define options +// inside a .proto file. +// +// Protocol Buffers extension number registry +// -------------------------------- +// Project: Nanopb +// Contact: Petteri Aimonen +// Web site: http://kapsi.fi/~jpa/nanopb +// Extensions: 1010 (all types) +// -------------------------------- + +extend google.protobuf.FileOptions { + optional NanoPBOptions nanopb_fileopt = 1010; +} + +extend google.protobuf.MessageOptions { + optional NanoPBOptions nanopb_msgopt = 1010; +} + +extend google.protobuf.EnumOptions { + optional NanoPBOptions nanopb_enumopt = 1010; +} + +extend google.protobuf.FieldOptions { + optional NanoPBOptions nanopb = 1010; +} diff --git a/dissectors/meshtastic-stridetastic/LICENSE b/dissectors/meshtastic-stridetastic/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/meshtastic-stridetastic/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/meshtastic-stridetastic/README.md b/dissectors/meshtastic-stridetastic/README.md new file mode 100644 index 0000000..afb6a54 --- /dev/null +++ b/dissectors/meshtastic-stridetastic/README.md @@ -0,0 +1,101 @@ +# Meshtastic — captures PCAP-NG de STRIDEtastic + +Dissecteur Wireshark Lua fourni avec STRIDEtastic, cadre de +supervision des réseaux maillés radio LoRa Meshtastic. STRIDEtastic +enregistre le trafic qu'il reçoit (MQTT, radio série ou TCP) dans des +fichiers PCAP-NG : chaque trame contient un message protobuf Meshtastic +brut, et son type est donné par un commentaire de trame +(`type=meshtastic.MeshPacket`, `type=meshtastic.Data`…). Le script lit +ce commentaire et confie la trame au dissecteur protobuf de Wireshark +avec le bon type de message. Il décode ensuite la charge utile de +`Data` selon le `portnum` (texte, position, télémétrie, routage…), +affiche les adresses `!xxxxxxxx` dans les colonnes Source et +Destination et ajoute les noms des nœuds (issue #832). + +Ce dossier est distinct de `dissectors/meshtastic-talk/` : autre +auteur et autre approche (captures PCAP-NG de STRIDEtastic sur +DLT_USER15, guidées par les commentaires de trame). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/0wulf/stridetastic (`wireshark/meshtastic.lua`) | +| Commit importé | `1e699d8f1a22007ef14e0f9ce48386570bafc04f` du 14/05/2026 (dernier commit de la branche par défaut `main`) ; dernière modification du fichier : commit `b84cc537deebe1e2235cbe3cac573873c34da747` du 13/12/2025 | +| Licence amont | GPL-3.0-only : `LICENSE` du dépôt (texte de la GPLv3, sans mention « or later » dans le dépôt) ; le script n'a pas d'en-tête de licence. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur Meshtastic dans `tshark -G protocols` | + +Texte de la licence : fichier `LICENSE` de ce dossier (copie conforme +du `LICENSE` amont). Le fichier est repris tel quel (aucune +modification) ; seule l'en-tête de provenance de cinq lignes est ajoutée +en tête de `meshtastic.lua` (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/meshtastic.lua` | Recherche du dissecteur protobuf (ligne 39, erreur au chargement s'il manque) ; lecture du commentaire de trame (ligne 49) ; sous-protocoles par type de message (ligne 63) ; table des `portnum` (lignes 131 à 151) ; décodage de `meshtastic.Data.payload` (lignes 153 et 175) ; colonnes et noms des nœuds (ligne 183) ; aiguillage par type (ligne 227) ; protocole `meshtastic` (« Meshtastic Capture », ligne 292) ; post-dissecteur « Meshtastic Node Labels » (ligne 347) ; inscription ligne 356 | + +## Utilisation + +1. Copier `src/meshtastic.lua` dans le dossier des plugins Lua + personnels (`~/.local/lib/wireshark/plugins/`). +2. Indiquer à Wireshark les fichiers `.proto` de Meshtastic (dépôt + https://github.com/meshtastic/protobufs) : Préférences → Protocols → + Protobuf → Protobuf search paths, en ajoutant la racine du dépôt + cloné. Sans eux, seuls les messages texte sont lisibles. +3. Associer le DLT 162 au protocole : Préférences → Protocols → + DLT_USER → Encapsulations Table, entrée « User 15 (DLT=162) », charge + utile `meshtastic` (voir les limites : sans cette étape, rien n'est + décodé). + +Filtres : `meshtastic`, `meshtastic.text`, `meshtastic.src_long_name`, +`meshtastic.dst_long_name`, `meshtastic.src_mac`, et les champs +protobuf (`protobuf.field.name == "long_name"`…). + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : chargement sans erreur. Le +dépôt amont ne contient aucune capture. Essais sur une capture produite +par l'enregistreur amont lui-même +(`api_stridetastic/stridetastic_api/utils/pcap_writer.py`, même commit) +avec des messages protobuf codés à la main ; capture non commitée. +Fichiers `.proto` : dépôt meshtastic/protobufs (paquet `meshtastic`). + +| Essai | Résultat | +|---|---| +| Capture lue sans réglage | Aucun décodage : « Packet 37 », trame vue comme USER 15 (encapsulation 60) | +| Avec l'entrée DLT_USER, sans fichiers `.proto` | Sous-protocoles appliqués (`Meshtastic_MeshPacket`, `Meshtastic_Data`…) ; seul le message texte est lisible : « Bonjour Haguenau » | +| Avec DLT_USER et fichiers `.proto` : MeshPacket texte, de !11223344 à !FFFFFFFF | Colonnes « !11223344 → !FFFFFFFF », Info « Bonjour Haguenau id=3735928559 », Destinataire « Broadcast » | +| `Data` seul, `portnum` 1 | « Bonjour Haguenau » (sous-protocole TextMessage) | +| `meshtastic.protobuf.User` (nom du paquet Python) | « long_name=Station Test short_name=ST » | +| `meshtastic.protobuf.Position` | « latitude_i=487000000 longitude_i=78000000 » | +| MeshPacket NODEINFO_APP (`portnum` 4) portant un `User` | Charge utile lue comme `meshtastic.NodeInfo` : « num=9 user position », champs faux | +| Filtre `meshtastic.text` | Trames 1, 2, 3 et 8 | + +## Limites constatées + +- L'inscription `DissectorTable.get("wtap_encap"):add(162, …)` + (ligne 356) utilise le numéro de DLT, alors que la table `wtap_encap` + attend un numéro d'encapsulation Wireshark : le DLT 162 correspond à + l'encapsulation 60 (USER 15). Les captures de STRIDEtastic ne sont + donc pas décodées sans l'entrée DLT_USER décrite plus haut. +- Le `portnum` 4 (NODEINFO_APP) est décodé comme `meshtastic.NodeInfo` + (ligne 133), alors que Meshtastic y transporte un `User` : les champs + affichés sont faux, et le nom long du nœud n'est pas relevé. +- Les noms des nœuds ne sont relevés que dans les trames MeshPacket + (ligne 183) ; une trame `User` seule ne remplit pas la table. Si le + MeshPacket n'a pas de champ `from`, la clé est tirée du champ `id`, + qui est l'identifiant du paquet (entier) et non celui du nœud + (ligne 210). Dans nos essais, le champ « Sender » n'est jamais apparu. +- Le protocole s'appelle `meshtastic` (ligne 292), comme celui de + `dissectors/meshtastic-talk/` : les deux scripts ne peuvent pas être + chargés ensemble (« there cannot be two protocols with the same + name »). +- Les fichiers `.proto` de Meshtastic ne sont pas fournis ; ceux qui + importent `google/protobuf/descriptor.proto` (`nanopb.proto`, + `field_metadata.proto`) provoquent un message d'erreur au chargement, + sans effet sur le décodage. +- Le script exige le dissecteur protobuf de Wireshark et s'arrête au + chargement s'il manque (lignes 39 à 42). diff --git a/dissectors/meshtastic-stridetastic/src/meshtastic.lua b/dissectors/meshtastic-stridetastic/src/meshtastic.lua new file mode 100644 index 0000000..3d47328 --- /dev/null +++ b/dissectors/meshtastic-stridetastic/src/meshtastic.lua @@ -0,0 +1,356 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/0wulf/stridetastic (wireshark/meshtastic.lua), +-- commit 1e699d8f1a22007ef14e0f9ce48386570bafc04f du 14/05/2026 (dernière modification du fichier : +-- commit b84cc537deebe1e2235cbe3cac573873c34da747 du 13/12/2025). +-- Licence amont : GPL-3.0 (LICENSE amont) — voir README.md et LICENSE. +-- meshtastic.lua +-- Wireshark Lua dissector for Stridetastic PCAP-NG captures. +-- Packets carry frame comments like "type=meshtastic.MeshPacket". +-- The dissector uses those hints to drive the protobuf decoder. + +-- luacheck: globals Dissector DissectorTable Proto ProtoField Field register_postdissector base ftypes ENC_UTF_8 + +------------------------------------------------------------------------------- +-- Shared helpers & globals +------------------------------------------------------------------------------- +local nodeinfo_table = { + ["!FFFFFFFF"] = "Broadcast", +} + +local enable_logging = false + +local function init_log(tree, proto) + if not enable_logging then + return function() end + end + + local log_tree = tree:add(proto, nil, "Debug Log") + log_tree:set_generated() + + return function(str) + log_tree:add(proto):set_text(str) + end +end + +local function format_mac(range) + return range:bytes():tohex(true, ":"):upper() +end + +local protobuf_dissector = Dissector.get("protobuf") +if not protobuf_dissector then + error("meshtastic.lua: protobuf dissector is unavailable. Enable Wireshark's Protobuf plugin.") +end + +local protobuf_field_table = DissectorTable.get("protobuf_field") +local protobuf_names_f = Field.new("protobuf.field.name") +local protobuf_values_f = Field.new("protobuf.field.value") +local frame_comment_f = Field.new("frame.comment") + +local function get_message_type_from_comment() + local comments = { frame_comment_f() } + for _, comment in ipairs(comments) do + local msg = tostring(comment):match("type=([%w%.]+)") + if msg then + return msg + end + end + return nil +end + +local proto_registry = {} +local payload_proto_by_type = {} + +local function create_protobuf_dissector(name, msgtype, context) + if proto_registry[name] then + return proto_registry[name] + end + + local description = string.format("%s [%s]", msgtype, context or name) + local proto = Proto(name, description) + local f_length = ProtoField.uint32(name .. ".length", "Length", base.DEC) + proto.fields = { f_length } + + proto.dissector = function(tvb, pinfo, tree) + local subtree = tree:add(proto, tvb()) + pinfo.private["pb_msg_type"] = "message," .. msgtype + pcall(Dissector.call, protobuf_dissector, tvb, pinfo, subtree) + pinfo.columns.protocol:set(name) + end + + proto_registry[name] = proto + return proto +end + +local function make_pb_handler(msgtype) + local suffix = msgtype:gsub("^meshtastic%.", ""):gsub("[^%w]", "_") + local name = "Meshtastic_" .. suffix + local proto = create_protobuf_dissector(name, msgtype, "frame") + payload_proto_by_type[msgtype] = proto + return function(tvb, pinfo, tree) + proto.dissector(tvb, pinfo, tree) + end +end + +------------------------------------------------------------------------------- +-- Payload (portnum) dissectors +------------------------------------------------------------------------------- +local text_message_proto = Proto("Meshtastic_TextMessage", "Meshtastic TextMessage") +local message_text_field = ProtoField.new("Message", "meshtastic.text", ftypes.STRING) +text_message_proto.fields = { message_text_field } +text_message_proto.dissector = function(tvb, pinfo, tree) + local subtree = tree:add(text_message_proto, tvb()) + local text = tvb():string(ENC_UTF_8) + subtree:add(message_text_field, text) + if text and text ~= "" and pinfo.columns and pinfo.columns.info then + local truncated = text + if #truncated > 120 then + truncated = truncated:sub(1, 117) .. "..." + end + pinfo.columns.info:set(truncated) + end + pinfo.columns.protocol:set("Meshtastic_Payload_TextMessage") +end + +payload_proto_by_type["meshtastic.TextMessage"] = text_message_proto +payload_proto_by_type["text/plain; charset=utf-8"] = text_message_proto +payload_proto_by_type["text/plain"] = text_message_proto + +local payload_dissectors = { + ["01"] = text_message_proto, +} + +local function add_payload_dissector(portnum, suffix, msgtype) + local key = string.format("port_%s", suffix) + local name = "Meshtastic_Payload_" .. suffix + local proto = create_protobuf_dissector(name, msgtype, key) + payload_dissectors[string.format("%02X", portnum)] = proto + payload_proto_by_type[msgtype] = proto + return proto +end + +add_payload_dissector(2, "RemoteHardware", "meshtastic.HardwareMessage") +add_payload_dissector(3, "Position", "meshtastic.Position") +add_payload_dissector(4, "NodeInfo", "meshtastic.NodeInfo") +add_payload_dissector(5, "Routing", "meshtastic.Routing") +add_payload_dissector(6, "Admin", "meshtastic.AdminMessage") +add_payload_dissector(7, "Compressed", "meshtastic.Compressed") +add_payload_dissector(8, "Waypoint", "meshtastic.Waypoint") +add_payload_dissector(10, "Sensor", "meshtastic.SensorData") +add_payload_dissector(11, "Alert", "meshtastic.ClientNotification") +add_payload_dissector(12, "KeyVerification", "meshtastic.KeyVerification") +add_payload_dissector(34, "Paxcounter", "meshtastic.Paxcount") +add_payload_dissector(65, "StoreForward", "meshtastic.StoreAndForward") +add_payload_dissector(66, "RangeTest", "meshtastic.PowerStressMessage") +add_payload_dissector(67, "Telemetry", "meshtastic.Telemetry") +add_payload_dissector(70, "RouteDiscovery", "meshtastic.RouteDiscovery") +add_payload_dissector(71, "NeighborInfo", "meshtastic.NeighborInfo") +add_payload_dissector(72, "AtakPlugin", "meshtastic.TAKPacket") +add_payload_dissector(73, "Map", "meshtastic.Map") +add_payload_dissector(74, "PowerMon", "meshtastic.PowerMon") +add_payload_dissector(77, "Cayenne", "meshtastic.ModuleConfig") +add_payload_dissector(257, "AtakForwarder", "meshtastic.TAKPacket") + +local payload_proto = Proto("Meshtastic_Payload", "Meshtastic Payload (portnum)") +payload_proto.dissector = function(tvb, pinfo, tree) + local names = { protobuf_names_f() } + local values = { protobuf_values_f() } + if #names == 0 then + return + end + + for idx, finfo_name in ipairs(names) do + if tostring(finfo_name) == "portnum" then + local finfo_val = values[idx] + local port_hex = string.format("%02X", finfo_val.range:uint()) + local dissector = payload_dissectors[port_hex] + if dissector then + pinfo.columns.protocol = dissector.name + pcall(Dissector.call, dissector.dissector, tvb, pinfo, tree) + return + end + end + end +end + +protobuf_field_table:add("meshtastic.Data.payload", payload_proto) + +------------------------------------------------------------------------------- +-- Core handlers +------------------------------------------------------------------------------- +local meshpacket_proto = create_protobuf_dissector("Meshtastic_MeshPacket", "meshtastic.MeshPacket", "frame") +local data_proto = create_protobuf_dissector("Meshtastic_Data", "meshtastic.Data", "frame") + +local function update_columns_and_tables(tree, pinfo) + local log = init_log(tree, meshpacket_proto) + + local names = { protobuf_names_f() } + local values = { protobuf_values_f() } + if #names == 0 then + return + end + + local map = {} + for idx, finfo_name in ipairs(names) do + map[tostring(finfo_name)] = values[idx] + log(tostring(finfo_name) .. ": " .. values[idx].display) + end + + if map["from"] then + pinfo.columns.src:set(string.format("!%08X", map["from"].range:le_uint())) + end + if map["to"] then + pinfo.columns.dst:set(string.format("!%08X", map["to"].range:le_uint())) + end + + if map["long_name"] then + local key + if map["from"] then + key = string.format("!%08X", map["from"].range:le_uint()) + elseif map["id"] then + key = string.upper(map["id"].range:string()) + end + if key then + nodeinfo_table[key] = map["long_name"].range:string(ENC_UTF_8) + end + end +end + +local function dissect_meshpacket(tvb, pinfo, tree) + meshpacket_proto.dissector(tvb, pinfo, tree) + update_columns_and_tables(tree, pinfo) +end + +local function dissect_data(tvb, pinfo, tree) + data_proto.dissector(tvb, pinfo, tree) +end + +local handler_map = { + ["meshtastic.MeshPacket"] = dissect_meshpacket, + ["meshtastic.protobuf.MeshPacket"] = dissect_meshpacket, + ["meshtastic.Data"] = dissect_data, + ["meshtastic.protobuf.Data"] = dissect_data, + ["meshtastic.TextMessage"] = text_message_proto.dissector, + ["meshtastic.protobuf.TextMessage"] = text_message_proto.dissector, +} + +local function register_pb_handler(msgtype, aliases) + local proto = payload_proto_by_type[msgtype] + local handler + + if proto then + handler = function(tvb, pinfo, tree) + proto.dissector(tvb, pinfo, tree) + end + else + handler = make_pb_handler(msgtype) + proto = payload_proto_by_type[msgtype] + end + + handler_map[msgtype] = handler + + if aliases then + for _, alias in ipairs(aliases) do + handler_map[alias] = handler + if proto then + payload_proto_by_type[alias] = proto + end + end + end +end + +register_pb_handler("meshtastic.User", { "meshtastic.protobuf.User" }) +register_pb_handler("meshtastic.NodeInfo", { "meshtastic.protobuf.NodeInfo" }) +register_pb_handler("meshtastic.Position", { "meshtastic.protobuf.Position" }) +register_pb_handler("meshtastic.Telemetry", { "meshtastic.protobuf.Telemetry" }) +register_pb_handler("meshtastic.Routing", { "meshtastic.protobuf.Routing" }) +register_pb_handler("meshtastic.AdminMessage", { "meshtastic.protobuf.AdminMessage" }) +register_pb_handler("meshtastic.Waypoint", { "meshtastic.protobuf.Waypoint" }) +register_pb_handler("meshtastic.RouteDiscovery", { "meshtastic.protobuf.RouteDiscovery" }) +register_pb_handler("meshtastic.NeighborInfo", { "meshtastic.protobuf.NeighborInfo" }) +register_pb_handler("meshtastic.Paxcount", { "meshtastic.protobuf.Paxcount" }) +register_pb_handler("meshtastic.StoreAndForward", { "meshtastic.protobuf.StoreAndForward" }) +register_pb_handler("meshtastic.HardwareMessage", { "meshtastic.protobuf.HardwareMessage" }) +register_pb_handler("meshtastic.SensorData", { "meshtastic.protobuf.SensorData" }) +register_pb_handler("meshtastic.ClientNotification", { "meshtastic.protobuf.ClientNotification" }) +register_pb_handler("meshtastic.KeyVerification", { "meshtastic.protobuf.KeyVerification" }) +register_pb_handler("meshtastic.KeyVerificationNumberRequest", { "meshtastic.protobuf.KeyVerificationNumberRequest" }) +register_pb_handler("meshtastic.KeyVerificationNumberInform", { "meshtastic.protobuf.KeyVerificationNumberInform" }) +register_pb_handler("meshtastic.KeyVerificationFinal", { "meshtastic.protobuf.KeyVerificationFinal" }) +register_pb_handler("meshtastic.PowerStressMessage", { "meshtastic.protobuf.PowerStressMessage" }) +register_pb_handler("meshtastic.PowerMon", { "meshtastic.protobuf.PowerMon" }) +register_pb_handler("meshtastic.TAKPacket", { "meshtastic.protobuf.TAKPacket" }) +register_pb_handler("meshtastic.Map", { "meshtastic.protobuf.Map" }) +register_pb_handler("meshtastic.ModuleConfig", { "meshtastic.protobuf.ModuleConfig" }) +register_pb_handler("meshtastic.Compressed", { "meshtastic.protobuf.Compressed" }) + +handler_map["text/plain; charset=utf-8"] = text_message_proto.dissector +handler_map["text/plain"] = text_message_proto.dissector + +------------------------------------------------------------------------------- +-- Dispatcher registered on our DLT +------------------------------------------------------------------------------- +local meshtastic_proto = Proto("meshtastic", "Meshtastic Capture") + +meshtastic_proto.dissector = function(tvb, pinfo, tree) + local subtree = tree:add(meshtastic_proto, tvb()) + local msg_type = get_message_type_from_comment() or "meshtastic.MeshPacket" + local handler = handler_map[msg_type] or handler_map["meshtastic.MeshPacket"] + handler(tvb, pinfo, subtree) +end + +------------------------------------------------------------------------------- +-- Post-dissector for friendly names and MACs +------------------------------------------------------------------------------- +local nodeinfo_proto = Proto("Meshtastic_NodeInfo", "Meshtastic Node Labels") +local nodeinfo_from_field = ProtoField.string("meshtastic.src_long_name", "Sender") +local nodeinfo_to_field = ProtoField.string("meshtastic.dst_long_name", "Receiver") +local nodeinfo_mac_field = ProtoField.string("meshtastic.src_mac", "Sender MAC") +nodeinfo_proto.fields = { nodeinfo_from_field, nodeinfo_to_field, nodeinfo_mac_field } + +nodeinfo_proto.dissector = function(tvb, pinfo, tree) + local subtree = tree:add(nodeinfo_proto, tvb()) + + local names = { protobuf_names_f() } + local values = { protobuf_values_f() } + if #names == 0 then + return + end + + local map = {} + for idx, finfo_name in ipairs(names) do + map[tostring(finfo_name)] = values[idx] + end + + local from_addr + if map["from"] then + from_addr = string.format("!%08X", map["from"].range:le_uint()) + pinfo.columns.src:set(from_addr) + end + + local to_addr + if map["to"] then + to_addr = string.format("!%08X", map["to"].range:le_uint()) + pinfo.columns.dst:set(to_addr) + end + + if from_addr and nodeinfo_table[from_addr] then + subtree:add(nodeinfo_from_field, nodeinfo_table[from_addr]) + end + if to_addr and nodeinfo_table[to_addr] then + subtree:add(nodeinfo_to_field, nodeinfo_table[to_addr]) + end + if map["macaddr"] then + subtree:add(nodeinfo_mac_field, format_mac(map["macaddr"].range)) + end +end + +register_postdissector(nodeinfo_proto) + +------------------------------------------------------------------------------- +-- Register for DLT_USER15 (DLT = 162) +------------------------------------------------------------------------------- +local mesh_dlt = DissectorTable.get("wtap_encap") +if not mesh_dlt then + error("meshtastic.lua: could not acquire 'wtap_encap' dissector table; check your Wireshark build.") +end +mesh_dlt:add(162, meshtastic_proto) diff --git a/dissectors/mgen-dragonradio/LICENSE b/dissectors/mgen-dragonradio/LICENSE new file mode 100644 index 0000000..f2eb3d4 --- /dev/null +++ b/dissectors/mgen-dragonradio/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-2020 Drexel University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/mgen-dragonradio/README.md b/dissectors/mgen-dragonradio/README.md new file mode 100644 index 0000000..76e8f53 --- /dev/null +++ b/dissectors/mgen-dragonradio/README.md @@ -0,0 +1,80 @@ +# MGEN — messages du générateur de trafic (DragonRadio, Drexel) + +Dissecteur Wireshark Lua des messages MGEN (« Multi-Generator »), le +générateur de trafic de test de l'U.S. Naval Research Laboratory, +employé par DragonRadio, la radio logicielle de l'université Drexel +(compétition DARPA SC2). Le script décode l'en-tête MGEN : taille, +version, drapeaux, flux, numéro de séquence, heure d'émission, adresses +de destination et d'hôte, position GPS, charge utile, bourrage et somme +de contrôle. Il connaît aussi la variante DARPA (version 4), avec un +champ réservé et un octet TOS (priorité, classe) (issue #773). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/drexelwireless/dragonradio (`tools/wireshark/mgen_dissector.lua`) | +| Commit importé | `da3808d267b54995a6ef95f317c66d1d1b4f22a9` du 22/11/2021 (dernier commit de la branche par défaut) ; dernière modification du script : commit `9da786a43443280fae15d05a317db2341361a0e9` du 10/08/2019 | +| Licence amont | MIT (`LICENSE` amont, © 2017-2020 Drexel University) ; aucune mention de licence dans le script. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur MGEN dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/mgen_dissector.lua` | Protocole `mgen` (« MGEN Protocol », ligne 6), champs `mgen.*` (lignes 12 à 146) ; préférences « Port number » (5001) et « Heuristic enabled » (lignes 152 à 182) ; dissecteur ligne 210 ; port UDP 5001 (ligne 333) et heuristique `udp` (lignes 335 à 359) | + +## Utilisation + +Copier `src/mgen_dissector.lua` dans le dossier des plugins Lua +personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »), +puis recharger avec Ctrl+Maj+L. Les messages sont reconnus sur le port +UDP 5001, modifiable dans « Préférences › Protocoles › MGEN ». Filtres : +`mgen`, `mgen.flow_id`, `mgen.seq`, `mgen.flags.checksum`, `mgen.tos`. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. Le +dépôt amont ne contient aucune capture. Essais sur des captures +synthétiques construites d'après le format décrit par le script et par +la [documentation MGEN](https://github.com/USNavalResearchLaboratory/mgen/blob/master/doc/mgen.html) +(coordonnées codées `(valeur + 180) × 60000`), non commitées : + +| Essai | Résultat | +|---|---| +| Version 2, latitude 48.8156, longitude 7.7905 | en-tête, drapeaux, flux, séquence, heure, adresses 10.0.0.2:5001 et 10.0.0.1:40000 décodés, puis **erreur Lua** ligne 299 (`number has no integer representation`) : le reste du message n'est pas affiché | +| Mêmes messages, sans arbre (`tshark -r` sans `-V`) | **tshark s'arrête** une fois sur deux en fin de lecture (`except.c:270: except_pop: Assertion … failed`, code 134), en `-X lua_script:` comme en dossier de plugins ; pas observé avec `-V` | +| Version 2, coordonnées entières (48 et 7) | décodé jusqu'au bout ; les valeurs s'affichent inversées (« Longitude: 48 », « Latitude: 7 ») ; altitude 150, « GPS status: Current (2) » | +| Charge utile de 5 octets et 10 octets de bourrage | « Payload: 68656c6c6f », « Padding length: 10 » | +| Somme de contrôle (drapeau `0x04`) | « Checksum: 0xdeadbeef », bourrage calculé sans les 4 derniers octets | +| Version 4 (DARPA), TOS `0x52` | « Reserved », « TOS: 0x52 », « Priority: 5 », priorité calculée « 1.5125 » | +| Message de 8 octets | arbre MGEN vide, octets en « Data » | +| Message MGEN valide sur le port UDP 6000 (heuristique) | ni MGEN ni Data : le datagramme est revendiqué mais rien n'est affiché | + +## Limites constatées + +- Lignes 299 et 303 : la longitude et la latitude converties en degrés + (nombres décimaux) sont ajoutées à des champs `uint32` (lignes 85 + et 86). Sous Wireshark 4.6, toute position non entière provoque une + erreur Lua et coupe la dissection ; dans le mode sans arbre, tshark + peut même s'arrêter sur une assertion. +- Le script lit la longitude avant la latitude (lignes 298 à 304), alors + que la documentation MGEN décrit la latitude en premier : les deux + valeurs s'affichent inversées. +- L'heuristique (lignes 335 à 356) renvoie seulement vrai ou faux sans + appeler le dissecteur : un message reconnu hors du port 5001 disparaît + de l'arbre. +- Les champs lus par `Field.new` (lignes 188 à 200) et appelés comme + fonctions (par exemple ligne 239) supposent la présence de l'arbre. + `base.Dec` (lignes 58, 63 et 88) n'existe pas (c'est `base.DEC`). + `off`, `version`, `priority` et d'autres sont des variables globales. +- La priorité TOS (ligne 287) n'est pas arrondie (1.5125 au lieu de 1.5). + Les adresses IPv6 ne sont pas affichées (seulement sautées). Les + messages fragmentés ne sont pas réassemblés et la somme de contrôle + n'est pas vérifiée. diff --git a/dissectors/mgen-dragonradio/src/mgen_dissector.lua b/dissectors/mgen-dragonradio/src/mgen_dissector.lua new file mode 100644 index 0000000..afa812e --- /dev/null +++ b/dissectors/mgen-dragonradio/src/mgen_dissector.lua @@ -0,0 +1,359 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/drexelwireless/dragonradio (tools/wireshark/mgen_dissector.lua), +-- commit da3808d267b54995a6ef95f317c66d1d1b4f22a9 du 22/11/2021 (dernière modification du fichier : +-- commit 9da786a43443280fae15d05a317db2341361a0e9 du 10/08/2019). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +local mgen = Proto("mgen", "MGEN Protocol") + +-------------------------------------------------------------------------------- +-- Protocol Fields +-------------------------------------------------------------------------------- + +local pf_size = ProtoField.uint16("mgen.size", "Size") +local pf_version = ProtoField.uint8("mgen.version", "Version") +local pf_flags = ProtoField.uint8("mgen.flags", "Flags", base.HEX) +local pf_flow_id = ProtoField.uint32("mgen.flow_id", "Flow ID") +local pf_seq = ProtoField.uint32("mgen.seq", "Sequence Number") +local pf_reserved_darpa = ProtoField.uint32("mgen.reserved_darpa", "Reserved") +local pf_tx_time_secs = ProtoField.uint32("mgen.tx_time_secs", "TX time (sec)") +local pf_tx_time_usecs = ProtoField.uint32("mgen.tx_time_usecs", "TX time (usec)") + +local pf_flag_continues = ProtoField.bool("mgen.flags.continues", "Continues", + 8, + {"this is a fragment", "this is not a fragment"}, + 0x01, + "is the message a fragment?") + +local pf_flag_end = ProtoField.bool("mgen.flags.end", "End of message", + 8, + {"this is the end of the message", "this is not the end of the message"}, + 0x02, + "is this the end of the message?") + +local pf_flag_checksum = ProtoField.bool("mgen.flags.checksum", "Checksum", + 8, + {"this message has a checksum", "this message does not have a checksum"}, + 0x04, + "does this message have a checksum?") + +local pf_flag_last_buffer = ProtoField.bool("mgen.flags.last_buffer", "Last buffer", + 8, + {"this message is the last buffer in a fragment", "this message is not the last buffer in a fragment"}, + 0x08, + "is this message the last buffer in a fragment?") + +local pf_flag_checksum_error = ProtoField.bool("mgen.flags.checksum_error", "Checksum error", + 8, + {"this message has a checksum error", "this message does not have a checksum error"}, + 0x10, + "does this message have a checksum error?") + +local address_types = { + [0] = "Invalid address", + [1] = "IPv4", + [2] = "IPv6" +} + +local pf_dst_port = ProtoField.uint16("mgen.dst_port", "Destination port") +local pf_dst_addr_type = ProtoField.uint8("mgen.dst_addr_type", "Destination address type", base.Dec, address_types) +local pf_dst_addr_len = ProtoField.uint8("mgen.dst_addr_len", "Destination address len") +local pf_dst_addr_ipv4 = ProtoField.ipv4("mgen.dst_addr", "Destination address") + +local pf_host_port = ProtoField.uint16("mgen.host_port", "Host port") +local pf_host_addr_type = ProtoField.uint8("mgen.host_addr_type", "Host address type", base.Dec, address_types) +local pf_host_addr_len = ProtoField.uint8("mgen.host_addr_len", "Host address len") +local pf_host_addr_ipv4 = ProtoField.ipv4("mgen.host_addr", "Host address") + +local tos_classes = { + [0] = "Leaky bucket", + [1] = "VOIP", + [2] = "FTP", + [3] = "HTTP" +} + +local pf_tos_darpa = ProtoField.uint8("mgen.tos", "TOS", base.HEX) +local pf_tos_priority = ProtoField.uint8("mgen.tos.priority", "Priority", base.DEC, nil, 0xf0) +local pf_tos_priority_f = ProtoField.float("mgen.tos.priority_f", "Priority") +local pf_tos_class = ProtoField.uint8("mgen.tos.class", "Class", base.DEC, tos_classes, 0x0f) + +local gps_status = { + [0] = "Invalid", + [1] = "Stale", + [2] = "Current" +} + +local pf_latitude = ProtoField.uint32("mgen.latitude", "Latitude") +local pf_longitude = ProtoField.uint32("mgen.longitude", "Longitude") +local pf_altitude = ProtoField.int32("mgen.altitude", "Altitude") +local pf_gps_status = ProtoField.uint8("mgen.gps_status", "GPS status", base.Dec, gps_status) + +local pf_reserved = ProtoField.uint8("mgen.reserved", "Reserved") + +local pf_payload_len = ProtoField.uint16("mgen.payload_len", "Payload length") +local pf_payload = ProtoField.bytes("mgen.payload", "Payload") + +local pf_padding_len = ProtoField.uint16("mgen.padding_len", "Padding length") +local pf_padding = ProtoField.bytes("mgen.padding", "Padding") + +local pf_checksum = ProtoField.uint32("mgen.checksum", "Checksum", base.HEX) + +mgen.fields = { pf_size + + , pf_version + + , pf_flags + , pf_flag_continues + , pf_flag_end + , pf_flag_checksum + , pf_flag_last_buffer + , pf_flag_checksum_error + + , pf_flow_id + + , pf_seq + + , pf_reserved_darpa + , pf_tx_time_secs + , pf_tx_time_usecs + + , pf_dst_port + , pf_dst_addr_type + , pf_dst_addr_len + , pf_dst_addr_ipv4 + + , pf_host_port + , pf_host_addr_type + , pf_host_addr_len + , pf_host_addr_ipv4 + + , pf_tos_darpa + , pf_tos_priority + , pf_tos_priority_f + , pf_tos_class + + , pf_latitude + , pf_longitude + , pf_altitude + , pf_gps_status + , pf_reserved + + , pf_payload_len + , pf_payload + , pf_padding_len + , pf_padding + + , pf_checksum + } + +-------------------------------------------------------------------------------- +-- Preferences +-------------------------------------------------------------------------------- + +local default_settings = +{ + port = 5001, + heur_enabled = true, +} + +mgen.prefs.port = Pref.uint("Port number", default_settings.port, + "The UDP port number for MGEN") + +mgen.prefs.heur = Pref.bool("Heuristic enabled", default_settings.heur_enabled, + "Whether heuristic dissection is enabled or not") + +function mgen.prefs_changed() + default_settings.heur_enabled = mgen.prefs.heur + + if default_settings.port ~= mgen.prefs.port then + -- Remove old port, if not 0 + if default_settings.port ~= 0 then + DissectorTable.get("udp.port"):remove(default_settings.port, mgen) + end + + -- Set our new default + default_settings.port = mgen.prefs.port + + -- Add new port, if not 0 + if default_settings.port ~= 0 then + DissectorTable.get("udp.port"):add(default_settings.port, mgen) + end + end + +end + +-------------------------------------------------------------------------------- +-- Fields +-------------------------------------------------------------------------------- + +local version_field = Field.new("mgen.version") + +local flag_checksum_field = Field.new("mgen.flags.checksum") + +local dst_addr_type_field = Field.new("mgen.dst_addr_type") +local dst_addr_len_field = Field.new("mgen.dst_addr_len") + +local host_addr_type_field = Field.new("mgen.host_addr_type") +local host_addr_len_field = Field.new("mgen.host_addr_len") + +local longitude_field = Field.new("mgen.longitude") + +local payload_len_field = Field.new("mgen.payload_len") + +local MGEN_HDR_LEN = 20 + +local MGEN_VERSION = 2 +local DARPA_MGEN_VERSION = 4 + +local IPV4 = 1 +local IPV6 = 2 + +mgen.dissector = function (tvbuf,pktinfo,root) + -- Set the protocol column to show our protocol name + pktinfo.cols.protocol:set("MGEN") + + -- We want to check that the packet size is rational during dissection, so + -- let's get the length of the packet buffer (Tvb). + local pktlen = tvbuf:reported_length_remaining() + + -- We start by adding our protocol to the dissection display tree. A call to + -- tree:add() returns the child created, so we can add more "under" it using + -- that return value. The second argument is how much of the buffer/packet + -- this added tree item covers/represents. + local tree = root:add(mgen, tvbuf:range(0,pktlen)) + + if pktlen < MGEN_HDR_LEN then + return 0 + end + + off = 0 + + local addField = function (field, sz) + subtree = tree:add(field, tvbuf:range(off, sz)) + off = off + sz + return subtree + end + + addField(pf_size, 2) + addField(pf_version, 1) + + version = version_field()() + + tree:add(pf_flags, tvbuf:range(off,1)) + tree:add(pf_flag_continues, tvbuf:range(off,1)) + tree:add(pf_flag_end, tvbuf:range(off,1)) + tree:add(pf_flag_checksum, tvbuf:range(off,1)) + tree:add(pf_flag_last_buffer, tvbuf:range(off,1)) + tree:add(pf_flag_checksum_error, tvbuf:range(off,1)) + off = off + 1 + + addField(pf_flow_id, 4) + addField(pf_seq, 4) + + if version == DARPA_MGEN_VERSION then + addField(pf_reserved_darpa, 4) + end + addField(pf_tx_time_secs, 4) + addField(pf_tx_time_usecs, 4) + + -- Destination + addField(pf_dst_port, 2) + addField(pf_dst_addr_type, 1) + addField(pf_dst_addr_len, 1) + + dst_addr_type = dst_addr_type_field()() + dst_addr_len = dst_addr_len_field()() + + if dst_addr_type == IPV4 and dst_addr_len == 4 then + tree:add(pf_dst_addr_ipv4, tvbuf:range(off,4)) + end + off = off + dst_addr_len + + -- Host + addField(pf_host_port, 2) + addField(pf_host_addr_type, 1) + addField(pf_host_addr_len, 1) + + host_addr_type = host_addr_type_field()() + host_addr_len = host_addr_len_field()() + + if host_addr_type == IPV4 and host_addr_len == 4 then + tree:add(pf_host_addr_ipv4, tvbuf:range(off,4)) + end + off = off + host_addr_len + + if version == DARPA_MGEN_VERSION then + -- See: + -- https://sc2colosseum.freshdesk.com/support/solutions/articles/22000220454-type-of-service-tos-field + priority = 1.0 + (tvbuf:range(off,1):uint() / 16) / 10.0 + + subtree = tree:add(pf_tos_darpa, tvbuf:range(off, 1)) + subtree:add(pf_tos_priority, tvbuf:range(off, 1)) + subtree:add(pf_tos_priority_f, tvbuf:range(off, 1), priority):set_generated() + subtree:add(pf_tos_class, tvbuf:range(off, 1)) + + off = off + 1 + end + + -- GPS info + longitude = tvbuf:range(off,4):uint() + tree:add(pf_longitude, tvbuf:range(off,4), longitude/60000.0-180.0) + off = off + 4 + + latitude = tvbuf:range(off,4):uint() + tree:add(pf_latitude, tvbuf:range(off,4), latitude/60000.0-180.0) + off = off + 4 + + addField(pf_altitude, 4) + addField(pf_gps_status, 1) + addField(pf_reserved, 1) + + -- Payload + addField(pf_payload_len, 2) + + payload_len = payload_len_field()() + + addField(pf_payload, payload_len) + + -- Padding + if flag_checksum_field()() then + padding_len = pktlen - off - 4 + else + padding_len = pktlen - off + end + tree:add(pf_padding_len, padding_len):set_generated() + + addField(pf_padding, padding_len) + + -- Checksum + if flag_checksum_field()() then + addField(pf_checksum, 4) + end +end + +DissectorTable.get("udp.port"):add(default_settings.port, mgen) + +local function heur_dissect_mgen(tvbuf,pktinfo,root) + if not default_settings.heur_enabled then + return false + end + + if tvbuf:len() < MGEN_HDR_LEN then + return false + end + + local tvbr = tvbuf:range(0,MGEN_HDR_LEN) + + -- First 2 bytes are size + local size = tvbr:range(0,2):uint() + + if size ~= tvbuf:len() then + return false + end + + -- Next byte is version + local version = tvbr:range(2,1):uint() + + return version == 2 or version == 4 +end + +mgen:register_heuristic("udp",heur_dissect_mgen) diff --git a/dissectors/mode-s-joushx/LICENSE b/dissectors/mode-s-joushx/LICENSE new file mode 100644 index 0000000..8cdb845 --- /dev/null +++ b/dissectors/mode-s-joushx/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. + + {description} + Copyright (C) {year} {fullname} + + 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. + +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) year 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. + + {signature of Ty Coon}, 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 Lesser General +Public License instead of this License. + diff --git a/dissectors/mode-s-joushx/README.md b/dissectors/mode-s-joushx/README.md new file mode 100644 index 0000000..0221643 --- /dev/null +++ b/dissectors/mode-s-joushx/README.md @@ -0,0 +1,88 @@ +# Mode S / ADS-B — flux brut dump1090 (joushx) + +Dissecteurs Wireshark Lua des réponses Mode S des transpondeurs +d'avions, reçues sous forme d'octets bruts sur TCP 30002. Ce flux vient +de dump1090 modifié par le correctif amont. `modes` décode le format +de liaison descendante (DF), l'adresse OACI, la parité, ainsi que +l'altitude ou l'identité (squawk) des messages courts. +`adsb` décode les squitters étendus DF 17 : indicatif, position +(altitude, CPR), vitesse, état. `commb` n'affiche qu'un en-tête +pour les DF 20, 21 et 24 (issue #527). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/joushx/mode-s-dissector (`modes.lua`, `adsb.lua`, `commb.lua`, `example.pcapng`) | +| Commit importé | `6543ebf2b97f50d0ade998a99f630afae56ad873` du 25/05/2016 (dernier commit de `master`) ; dernière modification des trois scripts : commit `f32ea2d8480da7da5ddbc397cfc8ee42d25da1f1` du 24/05/2016 ; capture : commit `34d1c9a57fef1fe43c8e5cf419afaeecb9561471` du 24/05/2016 | +| Licence amont | GPL-2.0 : `LICENSE` du dépôt (texte GNU GPL v2), sans mention « ou ultérieure » de l'auteur ni en-tête dans les scripts, d'où `GPL-2.0-only`. Licence propre au dossier, comme `dissectors/avionique` | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur Mode S ni ADS-B dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Les scripts sont repris tels quels (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête de chacun (convention du dépôt, issue #563). Le +correctif dump1090 et la capture d'écran amont ne sont pas importés. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/modes.lua` | Protocole `modes` (« Mode S ») sur TCP 30002 (ligne 89) ; appelle `adsb` (DF 17) ou `commb` (DF 20, 21, 24) | +| `src/adsb.lua` | Protocole `adsb` (« ADS-B ») : code de type, indicatif, position, vitesse, état | +| `src/commb.lua` | Protocole `commb` (« Comm-B ») : en-tête seul, aucun champ | +| `captures/example.pcapng` | Capture amont (57 460 octets, 476 trames, toutes des segments de données sur la boucle locale, TCP 30002) | + +## Utilisation + +Copier les trois fichiers de `src/` dans le dossier des plugins Lua +personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »), +puis Ctrl+Maj+L. `modes.lua` trouve `adsb` et `commb` lors du décodage, +quel que soit l'ordre de chargement. La source doit être un dump1090 +(MalcolmRobb) corrigé par le patch amont +`0001-Make-dump1090-output-raw-bytes-instead-hex-modstring.patch`. Sa +sortie 30002 est lue avec un client TCP (`nc localhost 30002`) et la +boucle locale est capturée. Filtres : `modes`, `adsb`, `adsb.ident`, +`modes.df == 17`. + +## Vérification à l'import + +tshark 4.6.4, trois scripts chargés par `-X lua_script:` : aucun message +d'erreur au chargement (`luac5.4 -p` : OK). + +Sur `captures/example.pcapng`, les 476 segments TCP 30002 sont tous +décodés, sans aucune erreur Lua : + +| Info | Trames | +|---|---| +| Mode S Elementary Surveillance | 266 | +| Comm-B | 57 | +| Mode S Altitude | 56 | +| ADS-B Velocity | 29 | +| Mode S Identity | 25 | +| ADS-B Position | 24 | +| ADS-B Identification | 11 | +| Mode S Enhanced Surveillance | 5 | +| ADS-B (autre code de type) | 3 | + +Exemples : indicatifs `DKNOP__`, `DLH2JV_`, `OEALB__` ; position +« Airborne position (Baro Alt) » à `34525 ft = 10523.22 m`. + +## Limites constatées + +- Longueur des segments : 17 octets (message court) ou 31 (long) dans + la capture. Le correctif ne réduit pas le compteur + (`(msgLen*2) + 3`) : chaque segment porte des octets résiduels après + le message. Le dissecteur s'y fie (`buffer:len() == 31`, ligne 32 de + `modes.lua`) : un flux sans ces octets ou plusieurs messages par + segment ne sont pas décodés correctement. +- Champ `CA` (capacité) affiché sous le nom « Subtype » avec des + libellés de sous-types ADS-B (ligne 12 de `modes.lua`), par exemple + « Surface position (6) » pour un avion en vol. +- Indicatif restitué sur 7 caractères pour 8 lettres décodées. +- Drapeau « Time » inversé (`0` affiché « UTC », ligne 40 de `adsb.lua`). +- Pas de vérification de parité (CRC Mode S) ni de décodage CPR en + latitude et longitude ; Comm-B non décodé ; la plupart des messages + courts (DF 0, 11, 16) restent « Elementary Surveillance » ; le README + amont prévient lui-même que le script est « very alpha ». +- Variables globales (`decode_parity`, `tcp_table`, protos). diff --git a/dissectors/mode-s-joushx/captures/example.pcapng b/dissectors/mode-s-joushx/captures/example.pcapng new file mode 100644 index 0000000..edd3af2 Binary files /dev/null and b/dissectors/mode-s-joushx/captures/example.pcapng differ diff --git a/dissectors/mode-s-joushx/src/adsb.lua b/dissectors/mode-s-joushx/src/adsb.lua new file mode 100644 index 0000000..f72824e --- /dev/null +++ b/dissectors/mode-s-joushx/src/adsb.lua @@ -0,0 +1,139 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/joushx/mode-s-dissector (adsb.lua), +-- commit 6543ebf2b97f50d0ade998a99f630afae56ad873 du 25/05/2016 (dernière modification du fichier : +-- commit f32ea2d8480da7da5ddbc397cfc8ee42d25da1f1 du 24/05/2016). +-- Licence amont : GPL-2.0, LICENSE du dépôt — voir README.md et LICENSE. +adsb_proto = Proto("adsb","ADS-B") + +local f = adsb_proto.fields + +f.typecode = ProtoField.uint8("adsb.typecode", "Format type code", base.DEC, {[1] = "Aicraft identification", [2] = "Aicraft identification", [3] = "Aicraft identification", [4] = "Aicraft identification",[5] = "Surface position", [6] = "Surface position", [7] = "Surface position", [8] = "Surface position", [9] = "Airborne position (Baro Alt)", [10] = "Airborne position (Baro Alt)", [11] = "Airborne position (Baro Alt)", [12] = "Airborne position (Baro Alt)", [13] = "Airborne position (Baro Alt)", [14] = "Airborne position (Baro Alt)", [15] = "Airborne position (Baro Alt)", [16] = "Airborne position (Baro Alt)", [17] = "Airborne position (Baro Alt)", [18] = "Airborne position (Baro Alt)", [19] = "Airborne velocity", [20] = "Airborne position (GNSS Height)", [21] = "Airborne position (GNSS Height)", [22] = "Airborne position (GNSS Height)", [23] = "Test message" }, 0xf8) +f.ident = ProtoField.string("adsb.ident", "Aircraft Identification") +f.i_first = ProtoField.uint8("adsb.ident.first", "First letter", base.DEC, {[1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "G", [8] = "H", [9] = "I", [10] = "J", [11] = "K", [12] = "L", [13] = "M", [14] = "N", [15] = "O", [16] = "P", [17] = "Q", [18] = "R", [19] = "S", [20] = "T", [21] = "U", [22] = "V", [23] = "W", [24] = "X", [25] = "Y", [26] = "Z", [32] = "_", [48] = "0", [49] = "1", [50] = "2", [51] = "3", [52] = "4", [53] = "5", [54] = "6", [55] = "7", [56] = "8", [57] = "9"}, 0xfc) +f.i_second = ProtoField.uint8("adsb.ident.second", "Second letter", base.DEC, {[1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "G", [8] = "H", [9] = "I", [10] = "J", [11] = "K", [12] = "L", [13] = "M", [14] = "N", [15] = "O", [16] = "P", [17] = "Q", [18] = "R", [19] = "S", [20] = "T", [21] = "U", [22] = "V", [23] = "W", [24] = "X", [25] = "Y", [26] = "Z", [32] = "_", [48] = "0", [49] = "1", [50] = "2", [51] = "3", [52] = "4", [53] = "5", [54] = "6", [55] = "7", [56] = "8", [57] = "9"}, 0x3f0) +f.i_third = ProtoField.uint8("adsb.ident.third", "Third letter", base.DEC, {[1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "G", [8] = "H", [9] = "I", [10] = "J", [11] = "K", [12] = "L", [13] = "M", [14] = "N", [15] = "O", [16] = "P", [17] = "Q", [18] = "R", [19] = "S", [20] = "T", [21] = "U", [22] = "V", [23] = "W", [24] = "X", [25] = "Y", [26] = "Z", [32] = "_", [48] = "0", [49] = "1", [50] = "2", [51] = "3", [52] = "4", [53] = "5", [54] = "6", [55] = "7", [56] = "8", [57] = "9"}, 0xfc0) +f.i_fourth = ProtoField.uint8("adsb.ident.fourth", "Fourth letter", base.DEC, {[1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "G", [8] = "H", [9] = "I", [10] = "J", [11] = "K", [12] = "L", [13] = "M", [14] = "N", [15] = "O", [16] = "P", [17] = "Q", [18] = "R", [19] = "S", [20] = "T", [21] = "U", [22] = "V", [23] = "W", [24] = "X", [25] = "Y", [26] = "Z", [32] = "_", [48] = "0", [49] = "1", [50] = "2", [51] = "3", [52] = "4", [53] = "5", [54] = "6", [55] = "7", [56] = "8", [57] = "9"}, 0x3f) +f.i_fifth = ProtoField.uint8("adsb.ident.fifth", "Fifth letter", base.DEC, {[1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "G", [8] = "H", [9] = "I", [10] = "J", [11] = "K", [12] = "L", [13] = "M", [14] = "N", [15] = "O", [16] = "P", [17] = "Q", [18] = "R", [19] = "S", [20] = "T", [21] = "U", [22] = "V", [23] = "W", [24] = "X", [25] = "Y", [26] = "Z", [32] = "_", [48] = "0", [49] = "1", [50] = "2", [51] = "3", [52] = "4", [53] = "5", [54] = "6", [55] = "7", [56] = "8", [57] = "9"}, 0xfc) +f.i_sixth = ProtoField.uint8("adsb.ident.sixth", "Sixth letter", base.DEC, {[1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "G", [8] = "H", [9] = "I", [10] = "J", [11] = "K", [12] = "L", [13] = "M", [14] = "N", [15] = "O", [16] = "P", [17] = "Q", [18] = "R", [19] = "S", [20] = "T", [21] = "U", [22] = "V", [23] = "W", [24] = "X", [25] = "Y", [26] = "Z", [32] = "_", [48] = "0", [49] = "1", [50] = "2", [51] = "3", [52] = "4", [53] = "5", [54] = "6", [55] = "7", [56] = "8", [57] = "9"}, 0x3f0) +f.i_seventh = ProtoField.uint8("adsb.ident.seventh", "Seventh letter", base.DEC, {[1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "G", [8] = "H", [9] = "I", [10] = "J", [11] = "K", [12] = "L", [13] = "M", [14] = "N", [15] = "O", [16] = "P", [17] = "Q", [18] = "R", [19] = "S", [20] = "T", [21] = "U", [22] = "V", [23] = "W", [24] = "X", [25] = "Y", [26] = "Z", [32] = "_", [48] = "0", [49] = "1", [50] = "2", [51] = "3", [52] = "4", [53] = "5", [54] = "6", [55] = "7", [56] = "8", [57] = "9"},0xfc0) +f.i_eighth = ProtoField.uint8("adsb.ident.eightn", "Eighth letter", base.DEC, {[1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "G", [8] = "H", [9] = "I", [10] = "J", [11] = "K", [12] = "L", [13] = "M", [14] = "N", [15] = "O", [16] = "P", [17] = "Q", [18] = "R", [19] = "S", [20] = "T", [21] = "U", [22] = "V", [23] = "W", [24] = "X", [25] = "Y", [26] = "Z", [32] = "_", [48] = "0", [49] = "1", [50] = "2", [51] = "3", [52] = "4", [53] = "5", [54] = "6", [55] = "7", [56] = "8", [57] = "9"}, 0x3f) + +f.v_subtype = ProtoField.uint8("adsb.velocity.subtype", "Subtype", base.DEC, {[1] = "Subsonic ground speed", [2] = "Supersonic ground speed", [3] = "Subsonic air speed", [4] = "Supersonic air speed"}, 0x7) +f.v_intchange = ProtoField.bool("adsb.velocity.intentchange", "Intent change flag", 8, nil, 0x80) +f.v_uncertainty = ProtoField.uint8("adsb.velocity.uncertainty", "Velocity uncertainty", nil, nil, 0x38) +f.v_ewsign = ProtoField.bool("adsb.velocity.ewsign", "East-West velocity sign", 8, nil, 0x4) +f.v_ew = ProtoField.uint8("adsb.velocity.ew", "East-West velocity", nil, nil, 0x4ff) +f.v_nssign = ProtoField.bool("adsb.velocity.nssign", "North-South velocity sign", 8, nil, 0x80) +f.v_ns = ProtoField.uint8("adsb.velocity.ns", "North-South velocity", nil, nil, 0x7fe0) +f.v_vrate_source = ProtoField.uint8("adsb.velocity.vsrate_source", "Vertical rate source", base.DEC, {[0] = "Baro-pressure altitude", [1] = "Geometric altitude"}, 0x10) +f.v_vrate_sign = ProtoField.uint8("adsb.velocity.vrate_sign", "Vertical rate sign", base.DEC, {[0] = "Up", [1] = "Down"}, 0x8) +f.v_vrate = ProtoField.uint8("adsb.velocity.vrate", "Vertical rate", nil, nil, 0x7fc) +f.v_diff_baro_sign = ProtoField.bool("adsb.velocity.diff_baro_sign", "Diff from baro alt sign", 8, nil, 0x80) +f.v_diff_baro = ProtoField.uint8("adsb.velocity.diff_baro", "Diff from baro alt", nil, nil, 0x7f) + +f.p_sstatus = ProtoField.uint8("adsb.position.sstatus", "Surveillance status", nil, nil, 0x6) +f.p_singleant = ProtoField.bool("adsb.position.singleant", "Single antenna flag", 8, {"Single", "Dual"}, 0x1) +f.p_alt = ProtoField.uint8("adsb.position.alt", "Altitude", nil, nil, 0xfff0) +f.p_alt_encoding = ProtoField.bool("adsb.position.alt.encoding", "Encoding", 8, {"Steps of 100ft", "Steps of 25 ft"}, 0x200) +f.p_alt_value = ProtoField.uint8("adsb.position.alt.value", "Value") +f.p_alt_calculted = ProtoField.uint8("adsb.position.alt.calculated", "Altitude") +f.p_time = ProtoField.bool("adsb.position.time", "Time", 8, {"Non UTC", "UTC"}, 0x8) +f.p_odd = ProtoField.bool("adsb.position.odd", "CPR even/odd frame flag", 8, {"Odd", "Even"}, 0x4) +f.p_lat = ProtoField.uint8("adsb.position.lat", "Latitude", nil, nil, 0x3fffe) +f.p_lon = ProtoField.uint8("adsb.position.lon", "Longitude", nil, nil, 0x1ffff) + +f.s_subtype = ProtoField.uint8("adsb.status.subtype", "Subtype", base.DEC, nil, 0x7) + +function adsb_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "ADS-B" + + local adsb = tree:add(adsb_proto, buffer(0, buffer:len()), "ADS-B") + + -- extract typecode + local tc = buffer(0,1):bitfield(0,5) + adsb:add(f.typecode, buffer(0,1)) + + --identification + if(tc >= 1 and tc <= 4) then + + pinfo.cols.info = "Identification" + + local table = "#ABCDEFGHIJKLMNOPQRSTUVWXYZ#####_###############0123456789######" + local ident_s = "" + + for i = 0, 5*8, 6 do + local char = buffer(1,6):bitfield(i, 6) + ident_s = ident_s .. string.sub(table, char+1, char+1) + end + + local ident = adsb:add(f.ident, ident_s) + + ident:add(f.i_first, buffer(1,1)) + ident:add(f.i_second, buffer(1,2)) + ident:add(f.i_third, buffer(2,2)) + ident:add(f.i_fourth, buffer(3,1)) + + ident:add(f.i_fifth, buffer(4,1)) + ident:add(f.i_sixth, buffer(4,2)) + ident:add(f.i_seventh, buffer(5,2)) + ident:add(f.i_eighth, buffer(6,1)) + + -- position + elseif(tc >= 9 and tc <= 18) then + + pinfo.cols.info = "Position" + + adsb:add(f.p_sstatus, buffer(0,1)) + adsb:add(f.p_singleant, buffer(0,1)) + local alt = adsb:add(f.p_alt, buffer(1,2)) + alt:add(f.p_alt_encoding, buffer(1,2)) + + local first = bit.lshift(buffer(1,1):bitfield(0,7),4) + local second = buffer(2,1):bitfield(0,4) + local value = bit.bor(first, second) + alt:add(f.p_alt_value, buffer(1,1), value) + + local alt_ft = alt:add(f.p_alt_calculted, buffer(1,2), value*25, nil, "ft", "=", value*25*0.3048, "m") + alt_ft:set_generated() + + adsb:add(f.p_time, buffer(2,1)) + adsb:add(f.p_odd, buffer(2,1)) + adsb:add(f.p_lat, buffer(2,3)) + adsb:add(f.p_lon, buffer(4,3)) + + -- velocity + elseif(tc == 19) then + + pinfo.cols.info = "Velocity" + + local subtype = buffer(0,1):bitfield(5,3) + adsb:add(f.v_subtype, buffer(0,1)) + + if(subtype == 1) then + adsb:add(f.v_intchange, buffer(1,1)) + adsb:add(f.v_uncertainty, buffer(1,1)) + adsb:add(f.v_ewsign, buffer(1,1)) + adsb:add(f.v_ew, buffer(1,2)) + adsb:add(f.v_nssign, buffer(3,1)) + adsb:add(f.v_ns, buffer(3,2)) + adsb:add(f.v_vrate_source, buffer(4,1)) + adsb:add(f.v_vrate_sign, buffer(4,1)) + adsb:add(f.v_vrate, buffer(4,2)) + adsb:add(f.v_diff_baro_sign, buffer(6,1)) + adsb:add(f.v_diff_baro, buffer(6,1)) + end + + -- status + elseif(tc == 28) then + + pinfo.cols.info = "Status" + + local subtype = buffer(0,1):bitfield(5,3) + adsb:add(f.s_subtype, buffer(0,1)) + + else + + -- unimplemented typecodes + pinfo.cols.info = "" + end +end diff --git a/dissectors/mode-s-joushx/src/commb.lua b/dissectors/mode-s-joushx/src/commb.lua new file mode 100644 index 0000000..522ae68 --- /dev/null +++ b/dissectors/mode-s-joushx/src/commb.lua @@ -0,0 +1,15 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/joushx/mode-s-dissector (commb.lua), +-- commit 6543ebf2b97f50d0ade998a99f630afae56ad873 du 25/05/2016 (dernière modification du fichier : +-- commit f32ea2d8480da7da5ddbc397cfc8ee42d25da1f1 du 24/05/2016). +-- Licence amont : GPL-2.0, LICENSE du dépôt — voir README.md et LICENSE. +commb_proto = Proto("commb","Comm-B") + +local f = commb_proto.fields + +function commb_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "Comm-B" + pinfo.cols.info = "" + + local commb = tree:add(commb_proto, buffer(0, buffer:len()), "Comm-B") +end diff --git a/dissectors/mode-s-joushx/src/modes.lua b/dissectors/mode-s-joushx/src/modes.lua new file mode 100644 index 0000000..84745e1 --- /dev/null +++ b/dissectors/mode-s-joushx/src/modes.lua @@ -0,0 +1,89 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/joushx/mode-s-dissector (modes.lua), +-- commit 6543ebf2b97f50d0ade998a99f630afae56ad873 du 25/05/2016 (dernière modification du fichier : +-- commit f32ea2d8480da7da5ddbc397cfc8ee42d25da1f1 du 24/05/2016). +-- Licence amont : GPL-2.0, LICENSE du dépôt — voir README.md et LICENSE. +modes_proto = Proto("modes","Mode S") + +local f = modes_proto.fields + +f.icao = ProtoField.bytes("modes.icao", "ICAO Address", "Unique aircraft identifier") +f.df = ProtoField.uint8("modes.df", "Downlink Format", base.DEC, {[0] = "Short Air to Air ACAS", [4] = "Surveillance, Altitude", [5] = "Surveillance, Identity", [11] = "Mode S Only All-Call Reply", [16] = "Long Air to Air ACAS", [17] = "ADS-B", [19] = "Military Extended Squitter",[20] = "Comm. B Altitude, IDENT Reply", [21] = "Comm. B Altitude, IDENT Reply", [22] = "Military", [24] = "Comm. D Extended Length Message"}, 0xf8, "The format of the payload") +f.ca = ProtoField.uint8("modes.ca", "Subtype", base.DEC, {[0] = "None", [5] = "Airborne Position", [6] = "Surface position", [7] = "Status", [8] = "Aircraft ID & Category", [0xa] = "Event Report", [0x61] = "Emergeny/Priority Status", [0x62] = "Target State and Status", [0x65] = "Aircraft Operational Status"}, 0x7, "The subtype of the message") +f.parity = ProtoField.bytes("modes.parity", "Parity") +f.fs = ProtoField.uint8("modes.fs", "Flight status", nil, {[0] = "No alert, No SPI, Airborne", [1] = "No alert, No SPI, Ground", [2] = "Alert, No SPI, Airborne", [3] = "Alert, No SPI, Ground", [4] = "Alert, SPI", [5] = "No alert, SPI"}, 0x7) +f.dr = ProtoField.uint8("modes.dr", "Downlink request", nil, {[0] = "No request", [1] = "Request to send Comm-B message"}, 0xf8) +f.um = ProtoField.uint8("modes.um", "Utility Message", nil, nil, 0xfe0) +f.ac = ProtoField.uint8("modes.ac", "Altitude", nil, nil, 0x1fff) +f.id = ProtoField.uint8("modes.id", "Identity (Squawk)", base.DEC, nil, 0x1fff) + +function decode_parity(buffer, pinfo, tree) + local size = buffer:len() + tree:add(f.parity, buffer(size-3,3)) +end + +function modes_proto.dissector(buffer,pinfo,tree) + + -- set protocol text + pinfo.cols.protocol = "Mode S" + + -- check if enhanced or elementary surveillance + local modes + if buffer:len() == 31 then + + modes = tree:add(modes_proto, buffer(0,14),"Mode S (Enhanced Surveillance)") + pinfo.cols.info = "Enhanced Surveillance" + + local df = buffer(0,4):bitfield(0,5) + + -- control bits + local control = modes:add(buffer(0,1), "Control bits") + control:add(f.df, buffer(0,1)) + control:add(f.ca, buffer(0,1)) + + if df ~= 4 then + -- icao address + modes:add(f.icao, buffer(1,3)) + end + + -- checksum + decode_parity(buffer(0,14), pinfo, modes) + + -- call payload dissectors + if df == 17 then + Dissector.get("adsb"):call(buffer(4,7):tvb(), pinfo, tree) + + elseif df == 20 or df == 21 or df==24 then + Dissector.get("commb"):call(buffer(4,7):tvb(), pinfo, tree) + + end + + else + modes = tree:add(modes_proto, buffer(0,7),"Mode S (Elementary Surveillance)") + pinfo.cols.info = "Elementary Surveillance" + + local df = buffer(0,1):bitfield(0,5) + + modes:add(f.df, buffer(0,1)) + + if df == 4 or df == 5 then + modes:add(f.fs, buffer(0,1)) + modes:add(f.dr, buffer(1,1)) + modes:add(f.um, buffer(1,2)) + + if df == 4 then + pinfo.cols.info = "Altitude" + modes:add(f.ac, buffer(2,2)) + elseif df == 5 then + pinfo.cols.info = "Identity" + modes:add(f.id, buffer(2,2)) + end + + end + + decode_parity(buffer(0,7), pinfo, modes) + end +end + +tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(30002, modes_proto) diff --git a/dissectors/motorola-xcmp-xnl/LICENSE b/dissectors/motorola-xcmp-xnl/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/dissectors/motorola-xcmp-xnl/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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) + + 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. + +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) year 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 Lesser General +Public License instead of this License. diff --git a/dissectors/motorola-xcmp-xnl/README.md b/dissectors/motorola-xcmp-xnl/README.md new file mode 100644 index 0000000..620bcb6 --- /dev/null +++ b/dissectors/motorola-xcmp-xnl/README.md @@ -0,0 +1,51 @@ +# Motorola XCMP / XNL — gestion des radios MOTOTRBO + +Dissecteurs Wireshark Lua de deux protocoles Motorola **MOTOTRBO** : + +- `xnl.lua` : protocole `xnl` (« Motorola XNL », couche réseau) — longueur, + opcode (statut maître, demande / réponse de clé d'authentification, + connexion, carte système, données, acquittement…), protocole encapsulé, + adresses source / destination, transaction, et détails des messages + de contrôle ; port TCP 8002 ; crée la table `xnl.proto` ; +- `xcmp.lua` : protocole `xcmp` (« Motorola XCMP », Extended Command and + Management Protocol) transporté par XNL (`xnl.proto` = 1) — opcode et + transaction dans la colonne Info, détail de plusieurs commandes (statut + radio, initialisation du périphérique, contrôle à distance, sélection + canal / zone, balayage, contrôle d'appel…). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/george-hopkins/xcmp-xnl-dissector | +| Commit importé | `bb39f2a22cb6ae3895de07f2295d8f48f14093ee` du 17/07/2017 (branche `master`, dernier commit ; dernières modifications : `xnl.lua` `bb39f2a`, `xcmp.lua` `3d09008`, tous deux du 17/07/2017) | +| Licence amont | GPL-2.0 (fichier `LICENSE` amont, GPLv2, copié ici) ; aucune mention « or later » en dehors du texte de la licence, d'où `GPL-2.0-only` ; les scripts n'ont pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur XCMP / XNL natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `xnl.lua` | Protocole `xnl`, TCP 8002, table `xnl.proto` | +| `xcmp.lua` | Protocole `xcmp`, sous-protocole 1 de XNL | +| `LICENSE` | Licence GPLv2 amont | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier les deux `.lua` dans le dossier `plugins` de Wireshark, recharger +les plugins Lua, puis filtrer avec `xnl` ou `xcmp`. + +## Remarques + +- **Ordre de chargement** : `xcmp.lua` appelle `Field.new("xnl.opcode")` + et `Field.new("xnl.transaction")` dès son chargement, alors que Wireshark + charge les scripts par ordre alphabétique (`xcmp` avant `xnl`). L'amont + prévoit un contournement commenté : renommer `xnl.lua` en `xnl.luainc` + et décommenter `dofile("xnl.luainc")` dans `xcmp.lua`. Sans cela, le + chargement de `xcmp.lua` peut échouer (non vérifié). +- `dissect_address` et `dissect_xnl_payload` sont des fonctions globales. +- L'amont précise que le projet n'est ni produit ni approuvé par Motorola + Solutions. Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/motorola-xcmp-xnl/xcmp.lua b/dissectors/motorola-xcmp-xnl/xcmp.lua new file mode 100644 index 0000000..c5e3263 --- /dev/null +++ b/dissectors/motorola-xcmp-xnl/xcmp.lua @@ -0,0 +1,263 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/george-hopkins/xcmp-xnl-dissector (xcmp.lua), +-- commit bb39f2a22cb6ae3895de07f2295d8f48f14093ee du 17/07/2017. +-- Licence amont : GPL-2.0-only (LICENSE amont) — voir README.md. +local proto = Proto("xcmp", "Motorola XCMP") + +local opcodes_base = { + [0x000d] = "SUPERBUNDLEAPPLY", + [0x000e] = "RSTATUS", + [0x000f] = "VERINFO", + [0x002c] = "LANGPKINFO", + [0x002e] = "SUPERBUNDLE", + [0x0109] = "CLONEWR", + [0x010a] = "CLONERD", + [0x0400] = "DEVINITSTS", + [0x0401] = "DISPTXT", + [0x0402] = "INDUPDRQ", + [0x0405] = "PUINPUT", + [0x0406] = "VOLCTRL", + [0x0407] = "SPKRCTRL", + [0x0408] = "TXPWRLVL", + [0x0409] = "TONECTRL", + [0x040a] = "SHUTDWN", + [0x040c] = "MON", + [0x040d] = "CHZNSEL", + [0x040e] = "MICCTRL", + [0x040f] = "SCAN", + [0x0410] = "BATLVL", + [0x0411] = "BRIGHTNESS", + [0x0412] = "BTNCONF", + [0x0413] = "EMG", + [0x0414] = "AUDRTCTRL", + [0x0415] = "KEY", + [0x041b] = "SIG", + [0x041c] = "RRCTRL", + [0x041d] = "DATA", + [0x041e] = "CALLCTRL", + [0x041f] = "NAVCTRL", + [0x0420] = "MENUCTRL", + [0x0421] = "DEVCTRL", + [0x0428] = "DEVMGMT", + [0x042e] = "ALARMCTRL", + [0x042f] = "ROSCTRL", + [0x0447] = "RPTRCTRL", + [0x0458] = "FD", + [0x04a1] = "SWA_AUDIO", +} + +local opcodes = {} +for base, name in pairs(opcodes_base) do + opcodes[base] = name .. "_REQ" + opcodes[base + 0x8000] = name .. "_RES" + opcodes[base + 0xb000] = name .. "_BRDCST" +end + +local address_types = { + [0] = "Local", + [1] = "MotoTRBO", + [2] = "IPv4", + [5] = "MDC", + [7] = "Phonenumber", + [11] = "QuickCall", + [13] = "5-Tone", + [14] = "De-/Access Code", +} + +local calltypes = { + [0] = "No Call", + [1] = "Selective Call", + [2] = "Call Alert", + [4] = "Enhanced Private Call", + [5] = "Private Phone Call", + [6] = "Group Call", + [8] = "Call Alert with Voice", + [9] = "Telegram Call", + [10] = "Group Phone Call", +} + +local results = { + [0] = "Success", + [2] = "Incorrect Mode", + [3] = "Unsupported Opcode", + [4] = "Invalid Parameter", + [5] = "Reply Too Big", + [6] = "Security Locked", + [7] = "Unavailable Function", +} + +local devinitsts_inits = { + [0] = "STATUS", + [1] = "COMPLETE", + [2] = "UPDATE", +} + +local devtypes = { + [1] = "RF Transceiver", + [10] = "IP Peripheral", +} + +local devinitsts_attrs = { + [0] = "Device Family", + [2] = "Display", + [3] = "Speaker", + [4] = "RF Band", + [5] = "GPIO", + [7] = "Radio Type", + [9] = "Keypad", + [13] = "Channel Knob", + [14] = "Virtual Personality", + [17] = "Bluetooth", + [19] = "Accelerometer", + [20] = "GPS", +} + +local f_opcode = ProtoField.uint16("xcmp.opcode", "Opcode", base.HEX, opcodes) +local f_address_type = ProtoField.uint8("xcmp.address.type", "Type", base.DEC, address_types) +local f_address_mototrbo = ProtoField.bytes("xcmp.address.mototrbo", "MotoTRBO ID") +local f_rstatus_result = ProtoField.uint8("xcmp.rstatus.result", "Result", base.DEC, results) +local f_rstatus_condition = ProtoField.uint8("xcmp.rstatus.condition", "Condition", base.DEC) +local f_rstatus_status = ProtoField.bytes("xcmp.rstatus.status", "Status") +local f_devinitsts_major = ProtoField.uint8("xcmp.devinitsts.major", "Major Version", base.DEC) +local f_devinitsts_minor = ProtoField.uint8("xcmp.devinitsts.minor", "Minor Version", base.DEC) +local f_devinitsts_patch = ProtoField.uint8("xcmp.devinitsts.patch", "Patch Version", base.DEC) +local f_devinitsts_product = ProtoField.uint8("xcmp.devinitsts.product", "Product ID", base.DEC) +local f_devinitsts_init = ProtoField.uint8("xcmp.devinitsts.init", "Initialization", base.DEC, devinitsts_inits) +local f_devinitsts_type = ProtoField.uint8("xcmp.devinitsts.type", "Type", base.DEC, devtypes) +local f_devinitsts_status = ProtoField.uint16("xcmp.devinitsts.status", "Status", base.DEC) +local f_devinitsts_attrlen = ProtoField.uint8("xcmp.devinitsts.status", "Attribute Length", base.DEC) +local f_devinitsts_attr = ProtoField.bytes("xcmp.devinitsts.attr", "Attribute") +local f_devinitsts_attr_key = ProtoField.uint8("xcmp.devinitsts.attr.key", "Key", base.HEX, devinitsts_attrs) +local f_devinitsts_attr_value = ProtoField.uint8("xcmp.devinitsts.attr.value", "Value", base.HEX) +local f_rrctrl_feature = ProtoField.uint8("xcmp.rrctrl.feature", "Feature", base.DEC) +local f_rrctrl_operation = ProtoField.uint8("xcmp.rrctrl.operation", "Operation", base.DEC) +local f_rrctrl_status = ProtoField.uint8("xcmp.rrctrl.status", "Status", base.DEC) +local f_rrctrl_address = ProtoField.bytes("xcmp.rrctrl.address", "Address") +local f_chznsel_function = ProtoField.uint8("xcmp.chznsel.function", "Function", base.DEC) +local f_chznsel_zone = ProtoField.uint16("xcmp.chznsel.zone", "Zone", base.DEC) +local f_chznsel_position = ProtoField.uint16("xcmp.chznsel.position", "Position", base.DEC) +local f_scan_function = ProtoField.uint8("xcmp.scan.function", "Function", base.DEC) +local f_callctrl_function = ProtoField.uint8("xcmp.callctrl.function", "Function", base.DEC) +local f_callctrl_calltype = ProtoField.uint8("xcmp.callctrl.calltype", "Call Type", base.DEC, calltypes) +local f_callctrl_address = ProtoField.bytes("xcmp.callctrl.address", "Address") +local f_callctrl_group = ProtoField.bytes("xcmp.callctrl.group", "Group ID") + +proto.fields = { + f_opcode, + f_address_type, + f_address_mototrbo, + f_rstatus_result, + f_rstatus_condition, + f_rstatus_status, + f_devinitsts_major, + f_devinitsts_minor, + f_devinitsts_patch, + f_devinitsts_product, + f_devinitsts_init, + f_devinitsts_type, + f_devinitsts_status, + f_devinitsts_attrlen, + f_devinitsts_attr, + f_devinitsts_attr_key, + f_devinitsts_attr_value, + f_rrctrl_feature, + f_rrctrl_operation, + f_rrctrl_status, + f_rrctrl_address, + f_chznsel_function, + f_chznsel_zone, + f_chznsel_position, + f_scan_function, + f_callctrl_function, + f_callctrl_calltype, + f_callctrl_address, + f_callctrl_group, +} + +-- dofile("xnl.luainc") -- uncomment to fix dependency order +local xnl_opcode = Field.new("xnl.opcode") +local xnl_transaction = Field.new("xnl.transaction") + +function dissect_address(root, field, buf) + local type = buf(0, 1):uint() + local size = buf(1, 1):uint() + local tree = root:add(field, buf(0, 2 + size)) + tree:add(f_address_type, buf(0, 1)) + if type == 1 then + tree:add(f_address_mototrbo, buf(2, size)) + end + return buf(2 + size) +end + +function proto.init() + DissectorTable.get("xnl.proto"):add(1, proto) +end + +function proto.dissector(buf, pkt, root) + if xnl_opcode().value == 12 and buf:len() == 0 then + return + end + + local tree = root:add(proto, buf(0, buf:len())) + local opcode = buf(0, 2):uint() + tree:add(f_opcode, buf(0, 2)) + + local desc = (opcodes[opcode] or opcode) .. " Transaction=" .. xnl_transaction().value + + if opcode == 0x000e then + tree:add(f_rstatus_condition, buf(2, 1)) + desc = desc .. " Condition=" .. buf(2, 1):uint() + elseif opcode == 0x800e then + local rstatus_result = buf(2, 1):uint() + tree:add(f_rstatus_result, buf(2, 1)) + if rstatus_result == 0 then + tree:add(f_rstatus_condition, buf(3, 1)) + tree:add(f_rstatus_status, buf(4, buf:len() - 4)) + desc = desc .. " Condition=" .. buf(3, 1):uint() + end + elseif opcode == 0xb400 then + tree:add(f_devinitsts_major, buf(2, 1)) + tree:add(f_devinitsts_minor, buf(3, 1)) + tree:add(f_devinitsts_patch, buf(4, 1)) + tree:add(f_devinitsts_product, buf(5, 1)) + local devinitsts_init = buf(6, 1):uint() + tree:add(f_devinitsts_init, buf(6, 1)) + desc = desc .. " Init=" .. (devinitsts_inits[devinitsts_init] or devinitsts_init) + if devinitsts_init ~= 1 then + tree:add(f_devinitsts_type, buf(7, 1)) + tree:add(f_devinitsts_status, buf(8, 2)) + local attrlen = buf(10, 1):uint() + tree:add(f_devinitsts_attrlen, buf(10, 1)) + for i = 0, (attrlen - 1), 2 do + local attr_tree = tree:add(f_devinitsts_attr, buf(11 + i, 2)) + local attr_key = buf(11 + i, 1):uint() + attr_tree:add(f_devinitsts_attr_key, buf(11 + i, 1)) + local attr_value = buf(11 + i + 1, 1):uint() + attr_tree:add(f_devinitsts_attr_value, buf(11 + i + 1, 1)) + if devinitsts_attrs[attr_key] then + attr_tree:set_text(string.format("%s: 0x%02x", devinitsts_attrs[attr_key], attr_value)) + end + end + end + elseif opcode == 0x041c or opcode == 0xb41c then + tree:add(f_rrctrl_feature, buf(2, 1)) + tree:add(opcode == 0x041c and f_rrctrl_operation or f_rrctrl_status, buf(3, 1)) + buf = dissect_address(tree, f_rrctrl_address, buf(4)) + elseif opcode == 0x040d then + tree:add(f_chznsel_function, buf(2, 1)) + tree:add(f_chznsel_zone, buf(3, 2)) + tree:add(f_chznsel_position, buf(5, 2)) + elseif opcode == 0x040f then + tree:add(f_scan_function, buf(2, 1)) + elseif opcode == 0x041e then + tree:add(f_callctrl_function, buf(2, 1)) + tree:add(f_callctrl_calltype, buf(3, 1)) + buf = dissect_address(tree, f_callctrl_address, buf(4)) + if buf:len() > 0 then + tree:add(f_callctrl_group, buf) + end + end + + pkt.cols.protocol:set("XCMP") + pkt.cols.info:set(desc) +end diff --git a/dissectors/motorola-xcmp-xnl/xnl.lua b/dissectors/motorola-xcmp-xnl/xnl.lua new file mode 100644 index 0000000..72fccdf --- /dev/null +++ b/dissectors/motorola-xcmp-xnl/xnl.lua @@ -0,0 +1,155 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/george-hopkins/xcmp-xnl-dissector (xnl.lua), +-- commit bb39f2a22cb6ae3895de07f2295d8f48f14093ee du 17/07/2017. +-- Licence amont : GPL-2.0-only (LICENSE amont) — voir README.md. +local proto = Proto("xnl", "Motorola XNL") + +local port = 8002 + +local opcodes = { + [2] = "MASTER_STATUS_BRDCST", + [3] = "DEV_MASTER_QUERY", + [4] = "DEV_AUTH_KEY_REQUEST", + [5] = "DEV_AUTH_KEY_REPLY", + [6] = "DEV_CONN_REQUEST", + [7] = "DEV_CONN_REPLY", + [8] = "DEV_SYSMAP_REQUEST", + [9] = "DEV_SYSMAP_BRDCST", + [11] = "DATA_MSG", + [12] = "DATA_MSG_ACK", +} + +local f_len = ProtoField.uint16("xnl.len", "Total Length", base.DEC) +local f_opcode = ProtoField.uint16("xnl.opcode", "Opcode", base.DEC, opcodes) +local f_proto = ProtoField.uint8("xnl.proto", "Protocol", base.DEC) +local f_flags = ProtoField.uint8("xnl.flags", "Flags", base.HEX) +local f_dst = ProtoField.uint16("xnl.dst", "Destination", base.HEX) +local f_src = ProtoField.uint16("xnl.src", "Source", base.HEX) +local f_transaction = ProtoField.uint16("xnl.transaction", "Transaction ID", base.DEC) +local f_payload_len = ProtoField.uint16("xnl.payload_len", "Payload Length", base.DEC) +local f_payload = ProtoField.bytes("xnl.payload", "Payload") +local f_masterstatus_major = ProtoField.uint16("xnl.masterstatus.major", "Major Version", base.DEC) +local f_masterstatus_minor = ProtoField.uint16("xnl.masterstatus.minor", "Minor Version", base.DEC) +local f_masterstatus_type = ProtoField.uint8("xnl.masterstatus.type", "Device Type", base.DEC) +local f_masterstatus_number = ProtoField.uint8("xnl.masterstatus.number", "Device Number", base.DEC) +local f_masterstatus_data_traffic = ProtoField.bool("xnl.masterstatus.data_traffic", "Data Traffic Occured") +local f_authkey_addr = ProtoField.uint16("xnl.authkey.addr", "Temporary Address", base.HEX) +local f_authkey_key = ProtoField.bytes("xnl.authkey.key", "Authentication Key") +local f_conn_addr = ProtoField.uint16("xnl.conn.addr", "Address", base.HEX) +local f_conn_type = ProtoField.uint8("xnl.conn.type", "Device Type", base.DEC) +local f_conn_number = ProtoField.uint8("xnl.conn.number", "Device Number", base.DEC) +local f_conn_index = ProtoField.uint8("xnl.conn.index", "Authentication Index", base.DEC) +local f_conn_key = ProtoField.bytes("xnl.conn.key", "Authentication Key") +local f_conn_result = ProtoField.uint8("xnl.conn.index", "Result Code", base.DEC) +local f_conn_transaction = ProtoField.uint8("xnl.conn.transaction", "Transaction ID Base", base.DEC) +local f_sysmap_size = ProtoField.uint16("xnl.sysmap.size", "System Map Size", base.DEC) +local f_sysmap = ProtoField.bytes("xnl.sysmap", "System Map Entry") +local f_sysmap_type = ProtoField.uint8("xnl.sysmap.type", "Device Type", base.DEC) +local f_sysmap_number = ProtoField.uint8("xnl.sysmap.number", "Device Number", base.DEC) +local f_sysmap_addr = ProtoField.uint16("xnl.sysmap.addr", "Address", base.HEX) +local f_sysmap_index = ProtoField.uint8("xnl.sysmap.index", "Authentication Index", base.DEC) + +local protos = DissectorTable.new("xnl.proto", "XNL Protocol", ftypes.UINT8) + +proto.fields = { + f_len, + f_opcode, + f_proto, + f_flags, + f_dst, + f_src, + f_transaction, + f_payload_len, + f_payload, + f_masterstatus_major, + f_masterstatus_minor, + f_masterstatus_type, + f_masterstatus_number, + f_masterstatus_data_traffic, + f_authkey_addr, + f_authkey_key, + f_conn_addr, + f_conn_type, + f_conn_number, + f_conn_index, + f_conn_key, + f_conn_result, + f_conn_transaction, + f_sysmap_size, + f_sysmap, + f_sysmap_type, + f_sysmap_number, + f_sysmap_addr, + f_sysmap_index, +} + +function proto.init() + DissectorTable.get("tcp.port"):add(port, proto) +end + +function dissect_xnl_payload(buf, tree, opcode) + if opcode == 2 then + tree:add(f_masterstatus_minor, buf(0, 2)) + tree:add(f_masterstatus_major, buf(2, 2)) + tree:add(f_masterstatus_type, buf(4, 1)) + tree:add(f_masterstatus_number, buf(5, 1)) + tree:add(f_masterstatus_data_traffic, buf(6, 1)) + elseif opcode == 5 then + tree:add(f_authkey_addr, buf(0, 2)) + tree:add(f_authkey_key, buf(2, 8)) + elseif opcode == 6 then + tree:add(f_conn_addr, buf(0, 2)) + tree:add(f_conn_type, buf(2, 1)) + tree:add(f_conn_index, buf(3, 1)) + tree:add(f_conn_key, buf(4, 8)) + elseif opcode == 7 then + tree:add(f_conn_result, buf(0, 1)) + tree:add(f_conn_transaction, buf(1, 1)) + tree:add(f_conn_addr, buf(2, 2)) + tree:add(f_conn_type, buf(4, 1)) + tree:add(f_conn_number, buf(5, 1)) + tree:add(f_conn_key, buf(6, 8)) + elseif opcode == 9 then + local sysmap_size = buf(0, 2):uint() + tree:add(f_sysmap_size, buf(0, 2)) + for i = 0, sysmap_size - 1 do + local infobuf = buf(2 + i * 5, 5) + local info = tree:add(f_sysmap, infobuf) + info:add(f_sysmap_type, infobuf(0, 1)) + info:add(f_sysmap_number, infobuf(1, 1)) + info:add(f_sysmap_addr, infobuf(2, 2)) + info:add(f_sysmap_index, infobuf(4, 1)) + end + end +end + +function proto.dissector(buf, pkt, root) + local len = buf(0, 2):uint() + 2 + local proto_num = buf(4, 1):uint() + local tree = root:add(proto, buf(0, proto_num ~= 0 and 14 or len)) + tree:add(f_len, buf(0, 2), len) + local opcode = buf(2, 2):uint() + tree:add(f_opcode, buf(2, 2)) + tree:add(f_proto, buf(4, 1)) + tree:add(f_flags, buf(5, 1)) + local dst = buf(6, 2):uint() + tree:add(f_dst, buf(6, 2)) + local src = buf(8, 2):uint() + tree:add(f_src, buf(8, 2)) + local transaction = buf(10, 2):uint() + tree:add(f_transaction, buf(10, 2)) + local payload_len = buf(12, 2):uint() + tree:add(f_payload_len, buf(12, 2)) + + pkt.cols.protocol:set("XNL") + desc = string.format("%04x → %04x Proto=%d Op=%s Transaction=%d Len=%d", src, dst, proto_num, opcodes[opcode] or opcode, transaction, payload_len) + tree:append_text(string.format(", Src: %04x, Dst: %04x, Proto: %d, Op: %d, Transaction: %d, Len: %d", src, dst, proto_num, opcode, transaction, payload_len)) + pkt.cols.info:set(desc) + + if proto_num == 0 and len > 14 then + local payload_tree = tree:add(f_payload, buf(14, len - 14)) + dissect_xnl_payload(buf(14, len - 14), payload_tree, opcode) + else + protos:try(proto_num, buf(14, len - 14):tvb(), pkt, root) + end +end diff --git a/dissectors/mqtt-menudoproblema/LICENSE b/dissectors/mqtt-menudoproblema/LICENSE new file mode 100644 index 0000000..4b43e63 --- /dev/null +++ b/dissectors/mqtt-menudoproblema/LICENSE @@ -0,0 +1,12 @@ +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 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, see . diff --git a/dissectors/mqtt-menudoproblema/README.md b/dissectors/mqtt-menudoproblema/README.md new file mode 100644 index 0000000..b19b192 --- /dev/null +++ b/dissectors/mqtt-menudoproblema/README.md @@ -0,0 +1,49 @@ +# MQTT v3 (dissecteur Lua historique) + +Dissecteur Wireshark Lua **historique** (2012) du protocole **MQTT v3** +(MQ Telemetry Transport) sur TCP 1883 : en-tête fixe (type de message, +DUP, QoS, RETAIN, longueur restante), puis CONNECT (nom du protocole, +version, drapeaux, keep-alive, identifiant client, will, identifiants), +PUBLISH, SUBSCRIBE / UNSUBSCRIBE et accusés de réception. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/menudoproblema/Wireshark-MQTT | +| Commit importé | `1e2f5486f19c147e87069f5892fd6aa31a3899f0` du 29/06/2014 (branche `master`, dernier commit) | +| Licence amont | LGPL-3.0-or-later (en-tête du fichier : « GNU Lesser General Public License […] either version 3 of the License, or (at your option) any later version », © 2012 Vicente Ruiz Rodríguez ; `LICENSE` amont : même avis) | +| Natif Wireshark 4.6.4 | **Oui** — dissecteur natif `mqtt` (v3.1, v3.1.1 et v5) ; ce script Lua est à considérer comme obsolète ou pédagogique | + +Le `LICENSE` amont ne contient que l'avis de licence (pas le texte complet +de la LGPL v3, ni celui de la GPL v3 qu'elle complète) ; il est copié tel +quel. Texte officiel : https://www.gnu.org/licenses/lgpl-3.0.txt et +https://www.gnu.org/licenses/gpl-3.0.txt. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `mqtt.lua` | Dissecteur `MQTT` (TCP 1883) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier (l'avis de licence amont est +conservé). + +## Utilisation + +Copier `mqtt.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `mqtt`. + +## Remarques + +- **Concurrence avec le natif** : le script déclare `Proto("MQTT", …)` + (même nom de filtre `mqtt` que le dissecteur natif) et s'enregistre sur + TCP 1883. Le chargement peut échouer pour cause de nom déjà utilisé, ou + remplacer le dissecteur natif sur ce port (non vérifié). Le dissecteur + natif est bien plus complet (MQTT v5, TLS sur 8883, WebSocket). +- Le script appelle `require("bit")` (bibliothèque BitOp) ; sa présence + comme module sous Wireshark 4.6 / Lua 5.4 n'est pas vérifiée. +- Pas de réassemblage TCP ni de capture d'exemple amont ; non vérifié dans + Wireshark. diff --git a/dissectors/mqtt-menudoproblema/mqtt.lua b/dissectors/mqtt-menudoproblema/mqtt.lua new file mode 100644 index 0000000..c8f4193 --- /dev/null +++ b/dissectors/mqtt-menudoproblema/mqtt.lua @@ -0,0 +1,252 @@ +-- SPDX-License-Identifier: LGPL-3.0-or-later +-- Importé de https://github.com/menudoproblema/Wireshark-MQTT (mqtt.lua), +-- commit 1e2f5486f19c147e87069f5892fd6aa31a3899f0 du 29/06/2014. +-- Licence amont : LGPL-3.0-or-later (LICENSE amont) — voir README.md. +-- +-- mqtt.lua is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Lesser General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- mqtt.lua 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 mqtt.lua. If not, see . +-- +-- +-- Copyright 2012 Vicente Ruiz Rodríguez . All rights reserved. +-- + +do + -- Create a new dissector + MQTTPROTO = Proto("MQTT", "MQ Telemetry Transport") + local bitw = require("bit") + local f = MQTTPROTO.fields + -- Fix header: byte 1 + f.message_type = ProtoField.uint8("mqtt.message_type", "Message Type", base.HEX, nil, 0xF0) + f.dup = ProtoField.uint8("mqtt.dup", "DUP Flag", base.DEC, nil, 0x08) + f.qos = ProtoField.uint8("mqtt.qos", "QoS Level", base.DEC, nil, 0x06) + f.retain = ProtoField.uint8("mqtt.retain", "Retain", base.DEC, nil, 0x01) + -- Fix header: byte 2 + f.remain_length = ProtoField.uint8("mqtt.remain_length", "Remain Length") + + -- Connect + f.connect_protocol_name = ProtoField.string("mqtt.connect.protocol_name", "Protocol Name") + f.connect_protocol_version = ProtoField.uint8("mqtt.connect.protocol_version", "Protocol Version") + f.connect_username = ProtoField.uint8("mqtt.connect.username", "Username Flag", base.DEC, nil, 0x80) + f.connect_password = ProtoField.uint8("mqtt.connect.password", "Password Flag", base.DEC, nil, 0x40) + f.connect_will_retain = ProtoField.uint8("mqtt.connect.will_retain", "Will Retain Flag", base.DEC, nil, 0x20) + f.connect_will_qos = ProtoField.uint8("mqtt.connect.will_qos", "Will QoS Flag", base.DEC, nil, 0x18) + f.connect_will = ProtoField.uint8("mqtt.connect.will", "Will Flag", base.DEC, nil, 0x04) + f.connect_clean_session = ProtoField.uint8("mqtt.connect.clean_session", "Clean Session Flag", base.DEC, nil, 0x02) + f.connect_keep_alive = ProtoField.uint16("mqtt.connect.keep_alive", "Keep Alive (secs)") + f.connect_payload_clientid = ProtoField.string("mqtt.connect.payload.clientid", "Client ID") + f.connect_payload_username = ProtoField.string("mqtt.connect.payload.username", "Username") + f.connect_payload_password = ProtoField.string("mqtt.connect.payload.password", "Password") + + -- Publish + f.publish_topic = ProtoField.string("mqtt.publish.topic", "Topic") + f.publish_message_id = ProtoField.uint16("mqtt.publish.message_id", "Message ID") + f.publish_data = ProtoField.string("mqtt.publish.data", "Data") + + -- Subscribe + f.subscribe_message_id = ProtoField.uint16("mqtt.subscribe.message_id", "Message ID") + f.subscribe_topic = ProtoField.string("mqtt.subscribe.topic", "Topic") + f.subscribe_qos = ProtoField.uint8("mqtt.subscribe.qos", "QoS") + + -- SubAck + f.suback_qos = ProtoField.uint8("mqtt.suback.qos", "QoS") + + -- Suback + f.suback_message_id = ProtoField.uint16("mqtt.suback.message_id", "Message ID") + f.suback_qos = ProtoField.uint8("mqtt.suback.qos", "QoS") + -- + f.payload_data = ProtoField.bytes("mqtt.payload", "Payload Data") + + -- decoding of fixed header remaining length + -- according to MQTT V3.1 + function lengthDecode(buffer, offset) + local multiplier = 1 + local value = 0 + local digit = 0 + repeat + digit = buffer(offset, 1):uint() + offset = offset + 1 + value = value + bitw.band(digit,127) * multiplier + multiplier = multiplier * 128 + until (bitw.band(digit,128) == 0) + return offset, value + end + + -- The dissector function + function MQTTPROTO.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "MQTT" + local msg_types = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 } + msg_types[1] = "CONNECT" + msg_types[2] = "CONNACK" + msg_types[3] = "PUBLISH" + msg_types[4] = "PUBACK" + msg_types[5] = "PUBREC" + msg_types[6] = "PUBREL" + msg_types[7] = "PUBCOMP" + msg_types[8] = "SUBSCRIBE" + msg_types[9] = "SUBACK" + msg_types[10] = "UNSUBSCRIBE" + msg_types[11] = "UNSUBACK" + msg_types[12] = "PINGREQ" + msg_types[13] = "PINGRESP" + msg_types[14] = "DISCONNECT" + + local msgtype = buffer(0, 1) + + local offset = 1 + local remain_length =0 + offset, remain_length = lengthDecode(buffer, offset) + + local msgindex = msgtype:bitfield(0,4) + + local subtree = tree:add(MQTTPROTO, buffer()) + local fixheader_subtree = subtree:add("Fixed Header", nil) + + subtree:append_text(", Message Type: " .. msg_types[msgindex]) + pinfo.cols.info:set(msg_types[msgindex]) + + fixheader_subtree:add(f.message_type, msgtype) + fixheader_subtree:add(f.dup, msgtype) + fixheader_subtree:add(f.qos, msgtype) + fixheader_subtree:add(f.retain, msgtype) + + fixheader_subtree:add(f.remain_length, remain_length) + + local fixhdr_qos = msgtype:bitfield(5,2) + subtree:append_text(", QoS: " .. fixhdr_qos) + + if(msgindex == 1) then -- CONNECT + local varheader_subtree = subtree:add("Variable Header", nil) + + local name_len = buffer(offset, 2):uint() + offset = offset + 2 + local name = buffer(offset, name_len) + offset = offset + name_len + local version = buffer(offset, 1) + offset = offset + 1 + local flags = buffer(offset, 1) + offset = offset + 1 + local keepalive = buffer(offset, 2) + offset = offset + 2 + + varheader_subtree:add(f.connect_protocol_name, name) + varheader_subtree:add(f.connect_protocol_version, version) + + local flags_subtree = varheader_subtree:add("Flags", nil) + flags_subtree:add(f.connect_username, flags) + flags_subtree:add(f.connect_password, flags) + flags_subtree:add(f.connect_will_retain, flags) + flags_subtree:add(f.connect_will_qos, flags) + flags_subtree:add(f.connect_will, flags) + flags_subtree:add(f.connect_clean_session, flags) + + varheader_subtree:add(f.connect_keep_alive, keepalive) + + local payload_subtree = subtree:add("Payload", nil) + -- Client ID + local clientid_len = buffer(offset, 2):uint() + offset = offset + 2 + local clientid = buffer(offset, clientid_len) + offset = offset + clientid_len + payload_subtree:add(f.connect_payload_clientid, clientid) + -- Flags + if(flags:bitfield(0) == 1) then -- Username flag is true + local username_len = buffer(offset, 2):uint() + offset = offset + 2 + local username = buffer(offset, username_len) + offset = offset + username_len + payload_subtree:add(f.connect_payload_username, username) + end + + if(flags:bitfield(1) == 1) then -- Password flag is true + local password_len = buffer(offset, 2):uint() + offset = offset + 2 + local password = buffer(offset, password_len) + offset = offset + password_len + payload_subtree:add(f.connect_payload_password, password) + end + + + elseif(msgindex == 3) then -- PUBLISH + local varhdr_init = offset -- For calculating variable header size + local varheader_subtree = subtree:add("Variable Header", nil) + + local topic_len = buffer(offset, 2):uint() + offset = offset + 2 + local topic = buffer(offset, topic_len) + offset = offset + topic_len + + varheader_subtree:add(f.publish_topic, topic) + + if(fixhdr_qos > 0) then + local message_id = buffer(offset, 2) + offset = offset + 2 + varheader_subtree:add(f.publish_message_id, message_id) + end + + local payload_subtree = subtree:add("Payload", nil) + -- Data + local data_len = remain_length - (offset - varhdr_init) + local data = buffer(offset, data_len) + offset = offset + data_len + payload_subtree:add(f.publish_data, data) + + + elseif(msgindex == 8 or msgindex == 10) then -- SUBSCRIBE & UNSUBSCRIBE + local varheader_subtree = subtree:add("Variable Header", nil) + + local message_id = buffer(offset, 2) + offset = offset + 2 + varheader_subtree:add(f.subscribe_message_id, message_id) + + local payload_subtree = subtree:add("Payload", nil) + while(offset < buffer:len()) do + local topic_len = buffer(offset, 2):uint() + offset = offset + 2 + local topic = buffer(offset, topic_len) + offset = offset + topic_len + local qos = buffer(offset, 1) + offset = offset + 1 + + payload_subtree:add(f.subscribe_topic, topic) + if(msgindex == 8) then -- QoS byte only for subscription + payload_subtree:add(f.subscribe_qos, qos) + end + end + + elseif(msgindex == 9 or msgindex == 11) then -- SUBACK & UNSUBACK + local varheader_subtree = subtree:add("Variable Header", nil) + + local message_id = buffer(offset, 2) + offset = offset + 2 + varheader_subtree:add(f.suback_message_id, message_id) + + local payload_subtree = subtree:add("Payload", nil) + while(offset < buffer:len()) do + local qos = buffer(offset, 1) + offset = offset + 1 + payload_subtree:add(f.suback_qos, qos); + end + + else + if((buffer:len()-offset) > 0) then + local payload_subtree = subtree:add("Payload", nil) + payload_subtree:add(f.payload_data, buffer(offset, buffer:len()-offset)) + end + end + + end + + -- Register the dissector + tcp_table = DissectorTable.get("tcp.port") + tcp_table:add(1883, MQTTPROTO) +end diff --git a/dissectors/msgpack-rpc/LICENSE b/dissectors/msgpack-rpc/LICENSE new file mode 100644 index 0000000..81795bf --- /dev/null +++ b/dissectors/msgpack-rpc/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright 2015 Sony Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dissectors/msgpack-rpc/README.md b/dissectors/msgpack-rpc/README.md new file mode 100644 index 0000000..b365707 --- /dev/null +++ b/dissectors/msgpack-rpc/README.md @@ -0,0 +1,52 @@ +# MessagePack-RPC (TCP / WebSocket) + +Dissecteur Wireshark Lua de **MessagePack-RPC** (Sony, projet linear-rpc) +sur TCP et WebSocket : réassemblage TCP, décodage des messages +MessagePack avec la bibliothèque **lua-MessagePack**, puis affichage du +type (requête 0, réponse 1, notification 2), de l'identifiant `msgid`, +de la méthode, des paramètres, de l'erreur et du résultat (valeurs +converties en texte). Ports par défaut : TCP 9003-9004 et 37800, +WebSocket 9005-9009 (préférences de protocole). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/linear-rpc/msgpack-rpc-dissector (fichiers `msgpack_rpc.lua` et `msgpack_rpc_1_x.lua`) | +| Commit importé | `0d1d7994f7c02032808f4daa787e54a4db6316af` du 07/09/2018 (branche `master`, dernier commit ; dernière modification des deux scripts : `f6d8f51` du 08/04/2016) | +| Licence amont | MIT (fichier `LICENSE`, « Copyright 2015 Sony Corporation », copié ici ; même mention en tête des scripts) | +| Natif Wireshark 4.6.4 | En partie — dissecteur natif `msgpack` (format MessagePack, sans couche RPC ni ports) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `msgpack_rpc.lua` | Protocole `msgpack-rpc`, TCP + WebSocket, ports configurables (Wireshark 1.12 et plus) | +| `msgpack_rpc_1_x.lua` | Variante pour Wireshark 1.10 : TCP seulement, ports fixes 9003 et 37800 | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête. La capture d'écran amont n'est pas +importée. + +## Dépendance + +Les deux scripts font `require "MessagePack"` : il faut installer +`MessagePack.lua` de **lua-MessagePack** (François Perrad, licence MIT, +https://framagit.org/fperrad/lua-MessagePack ; sous-module amont +`deps/lua-MessagePack` au commit `01ece0f60f227b98de25fc2d7c3c5c0dec8d379d`) +dans un dossier du `package.path` de Wireshark. Il n'est pas inclus ici. + +## Utilisation + +Installer `MessagePack.lua`, puis copier **un seul** des deux scripts +(normalement `msgpack_rpc.lua`) dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), et filtrer avec `msgpack-rpc` +(ex. `msgpack-rpc.type == 0`). + +## Remarques + +- Les deux variantes déclarent le même protocole `msgpack-rpc` : ne pas + les charger ensemble. +- Limite amont : une map à clés numériques est affichée comme un tableau + (Lua ne distingue pas tableaux et maps). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/msgpack-rpc/msgpack_rpc.lua b/dissectors/msgpack-rpc/msgpack_rpc.lua new file mode 100644 index 0000000..b74ccf8 --- /dev/null +++ b/dissectors/msgpack-rpc/msgpack_rpc.lua @@ -0,0 +1,230 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/linear-rpc/msgpack-rpc-dissector (msgpack_rpc.lua), +-- commit 0d1d7994f7c02032808f4daa787e54a4db6316af du 07/09/2018. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- +-- The MIT License (MIT) +-- Copyright 2015 Sony Corporation +-- + +do + if set_plugin_info then + local my_info = { + version = "1.1.0", -- required + description = "MessagePack-RPC Dissector", -- optional + author = "Sony Corporation", -- optional + repository = "https://github.com/linear-rpc/msgpack-rpc-dissector", -- optional + } + set_plugin_info(my_info) + end + + local current_settings = { + tcp_ports = "9003-9004,37800", + ws_ports = "9005-9009", + } + + msgpack_rpc_proto = Proto("msgpack-rpc", "MessagePack-RPC") + local f = msgpack_rpc_proto.fields + f.type_field = ProtoField.uint8("msgpack-rpc.type", "Type") + f.msgid_field = ProtoField.uint32("msgpack-rpc.msgid", "Msgid") + f.method_field = ProtoField.string("msgpack-rpc.method", "Method") + f.params_field = ProtoField.string("msgpack-rpc.params", "Params") + f.error_field = ProtoField.string("msgpack-rpc.error", "Error") + f.result_field = ProtoField.string("msgpack-rpc.result", "Result") + msgpack_rpc_proto.prefs.tcp_ports = Pref.range( + "TCP Port numbers", + current_settings.tcp_ports, + "The TCP port numbers for MessagePack-RPC", + 65535 + ) + msgpack_rpc_proto.prefs.ws_ports = Pref.range( + "WebSocket Port numbers", + current_settings.ws_ports, + "The WebSocket port numbers for MessagePack-RPC", + 65535 + ) + + function msgpack_rpc_proto.prefs_changed() + if current_settings.tcp_ports ~= msgpack_rpc_proto.prefs.tcp_ports then + -- remove old one + DissectorTable.get("tcp.port"):remove(current_settings.tcp_ports, msgpack_rpc_proto) + -- set our new default + current_settings.tcp_ports = msgpack_rpc_proto.prefs.tcp_ports + -- add new one + DissectorTable.get("tcp.port"):add(current_settings.tcp_ports, msgpack_rpc_proto) + end + if current_settings.ws_ports ~= msgpack_rpc_proto.prefs.ws_ports then + -- remove old one + DissectorTable.get("ws.port"):remove(current_settings.ws_ports, msgpack_rpc_proto) + -- set our new default + current_settings.ws_ports = msgpack_rpc_proto.prefs.ws_ports + -- add new one + DissectorTable.get("ws.port"):add(current_settings.ws_ports, msgpack_rpc_proto) + end + end + + local mp = require "MessagePack" + + function table_print(tt) + local len = 0 + local is_array = true + for key, value in pairs(tt) do + if "number" ~= type(key) then + is_array = false + end + len = len + 1 + end + + local sb = {} + if is_array then + table.insert(sb, "[") + else + table.insert(sb, "{") + end + local i = 1 + for key, value in pairs(tt) do + if is_array then + table.insert(sb, stringify(value)) + else + table.insert(sb, stringify(key) .. ": " .. stringify(value)) + end + if i < len then + table.insert(sb, ", ") + end + i = i + 1 + end + if is_array then + table.insert(sb, "]") + else + table.insert(sb, "}") + end + return table.concat(sb) + end + + function stringify(obj) + if "nil" == type(obj) then + return tostring(nil) + elseif "table" == type(obj) then + return table_print(obj) + elseif "string" == type(obj) then + return "\'" .. obj .. "\'" + else + return tostring(obj) + end + end + + function is_array(ar) + local is_array = true + if "table" == type(ar) then + for key, value in pairs(ar) do + if "number" ~= type(key) then + is_array = false + end + end + else + is_array = false + end + return is_array + end + + function is_number(num) + if "number" == type(num) then + return true + end + return false + end + + function is_string(str) + if "string" == type(str) then + return true + end + return false + end + + local str + local substr + + function msgpack_rpc_proto.dissector(tvb, pinfo, tree) + local proto_name = "MessagePack-RPC" + local b = tvb():bytes() + + str = "" + for i = 0, b:len() - 1 do + str = str .. string.char(b:get_index(i)) + end + + substr = str:sub(1, 1) + if substr ~= string.char(0x94) and substr ~= string.char(0x93) then + return + end + + local flag, ret = pcall(mp.unpack, str) + if not flag then + if ret:find("missing bytes$") then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return + else + error(ret) + end + end + + substr = str:sub(2, str:len()) + + local n = 1 + local pair = {} + for csr, val in mp.unpacker(substr) do + pair[n] = {csr, val} + n = n + 1 + end + + local subtree = tree:add(msgpack_rpc_proto, tvb(), "MessagePack-RPC Protocol") + -- type + if pair[1][2] == 0 then -- requiest + subtree:add(f.type_field, tvb(pair[1][1], pair[2][1] - pair[1][1]), pair[1][2]):append_text(" (Request)") + -- msgid + if not is_number(pair[2][2]) then + return + end + subtree:add(f.msgid_field, tvb(pair[2][1], pair[3][1] - pair[2][1]), pair[2][2]) + -- method + if not is_string(pair[3][2]) then + return + end + subtree:add(f.method_field, tvb(pair[3][1], pair[4][1] - pair[3][1]), pair[3][2], "Method: " .. stringify(pair[3][2])) + -- params + if not is_array(pair[4][2]) then + proto_name = proto_name .. " (dirty)" + end + subtree:add(f.params_field, tvb(pair[4][1], tvb:len() - pair[4][1]), stringify(pair[4][2])) + elseif pair[1][2] == 1 then -- response + subtree:add(f.type_field, tvb(pair[1][1], pair[2][1] - pair[1][1]), pair[1][2]):append_text(" (Response)") + -- msgid + if not is_number(pair[2][2]) then + return + end + subtree:add(f.msgid_field, tvb(pair[2][1], pair[3][1] - pair[2][1]), pair[2][2]) + -- error + subtree:add(f.error_field, tvb(pair[3][1], pair[4][1] - pair[3][1]), stringify(pair[3][2])) + -- result + subtree:add(f.result_field, tvb(pair[4][1], tvb:len() - pair[4][1]), stringify(pair[4][2])) + elseif pair[1][2] == 2 then -- notify + subtree:add(f.type_field, tvb(pair[1][1], pair[2][1] - pair[1][1]), pair[1][2]):append_text(" (Notify)") + -- method + if not is_string(pair[2][2]) then + return + end + subtree:add(f.method_field, tvb(pair[2][1], pair[3][1] - pair[2][1]), pair[2][2], "Method: " .. stringify(pair[2][2])) + -- params + if not is_array(pair[3][2]) then + proto_name = proto_name .. " (dirty)" + end + subtree:add(f.params_field, tvb(pair[3][1], tvb:len() - pair[3][1]), stringify(pair[3][2])) + else + return + end + pinfo.cols.protocol = proto_name + end + + DissectorTable.get("tcp.port"):add(current_settings.tcp_ports, msgpack_rpc_proto) + DissectorTable.get("ws.port"):add(current_settings.ws_ports, msgpack_rpc_proto) +end diff --git a/dissectors/msgpack-rpc/msgpack_rpc_1_x.lua b/dissectors/msgpack-rpc/msgpack_rpc_1_x.lua new file mode 100644 index 0000000..9e3b668 --- /dev/null +++ b/dissectors/msgpack-rpc/msgpack_rpc_1_x.lua @@ -0,0 +1,188 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/linear-rpc/msgpack-rpc-dissector (msgpack_rpc_1_x.lua), +-- commit 0d1d7994f7c02032808f4daa787e54a4db6316af du 07/09/2018. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- +-- The MIT License (MIT) +-- Copyright 2015 Sony Corporation +-- + +do + local PORTS = {9003, 37800} -- if you want to change port, modify this variable. + + msgpack_rpc_proto = Proto("msgpack-rpc", "MessagePack-RPC") + local f = msgpack_rpc_proto.fields + f.type_field = ProtoField.uint8("msgpack-rpc.type", "Type") + f.msgid_field = ProtoField.uint32("msgpack-rpc.msgid", "Msgid") + f.method_field = ProtoField.string("msgpack-rpc.method", "Method") + f.params_field = ProtoField.string("msgpack-rpc.params", "Params") + f.error_field = ProtoField.string("msgpack-rpc.error", "Error") + f.result_field = ProtoField.string("msgpack-rpc.result", "Result") + + local mp = require "MessagePack" + + function table_print(tt) + local len = 0 + local is_array = true + for key, value in pairs(tt) do + if "number" ~= type(key) then + is_array = false + end + len = len + 1 + end + + local sb = {} + if is_array then + table.insert(sb, "[") + else + table.insert(sb, "{") + end + local i = 1 + for key, value in pairs(tt) do + if is_array then + table.insert(sb, stringify(value)) + else + table.insert(sb, stringify(key) .. ": " .. stringify(value)) + end + if i < len then + table.insert(sb, ", ") + end + i = i + 1 + end + if is_array then + table.insert(sb, "]") + else + table.insert(sb, "}") + end + return table.concat(sb) + end + + function stringify(obj) + if "nil" == type(obj) then + return tostring(nil) + elseif "table" == type(obj) then + return table_print(obj) + elseif "string" == type(obj) then + return "\'" .. obj .. "\'" + else + return tostring(obj) + end + end + + function is_array(ar) + local is_array = true + if "table" == type(ar) then + for key, value in pairs(ar) do + if "number" ~= type(key) then + is_array = false + end + end + else + is_array = false + end + return is_array + end + + function is_number(num) + if "number" == type(num) then + return true + end + return false + end + + function is_string(str) + if "string" == type(str) then + return true + end + return false + end + + local str + local substr + + function msgpack_rpc_proto.dissector(tvb, pinfo, tree) + local proto_name = "MessagePack-RPC" + local b = tvb():bytes() + + str = "" + for i = 0, b:len() - 1 do + str = str .. string.char(b:get_index(i)) + end + + substr = str:sub(1, 1) + if substr ~= string.char(0x94) and substr ~= string.char(0x93) then + return + end + + local flag, ret = pcall(mp.unpack, str) + if not flag then + if ret:find("missing bytes$") then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return + else + error(ret) + end + end + + substr = str:sub(2, str:len()) + + local n = 1 + local pair = {} + for csr, val in mp.unpacker(substr) do + pair[n] = {csr, val} + n = n + 1 + end + + local subtree = tree:add(msgpack_rpc_proto, tvb(), "MessagePack-RPC Protocol") + -- type + if pair[1][2] == 0 then -- requiest + subtree:add(f.type_field, tvb(pair[1][1], pair[2][1] - pair[1][1]), pair[1][2]):append_text(" (Request)") + -- msgid + if not is_number(pair[2][2]) then + return + end + subtree:add(f.msgid_field, tvb(pair[2][1], pair[3][1] - pair[2][1]), pair[2][2]) + -- method + if not is_string(pair[3][2]) then + return + end + subtree:add(f.method_field, tvb(pair[3][1], pair[4][1] - pair[3][1]), pair[3][2], "Method: " .. stringify(pair[3][2])) + -- params + if not is_array(pair[4][2]) then + proto_name = proto_name .. " (dirty)" + end + subtree:add(f.params_field, tvb(pair[4][1], tvb:len() - pair[4][1]), stringify(pair[4][2])) + elseif pair[1][2] == 1 then -- response + subtree:add(f.type_field, tvb(pair[1][1], pair[2][1] - pair[1][1]), pair[1][2]):append_text(" (Response)") + -- msgid + if not is_number(pair[2][2]) then + return + end + subtree:add(f.msgid_field, tvb(pair[2][1], pair[3][1] - pair[2][1]), pair[2][2]) + -- error + subtree:add(f.error_field, tvb(pair[3][1], pair[4][1] - pair[3][1]), stringify(pair[3][2])) + -- result + subtree:add(f.result_field, tvb(pair[4][1], tvb:len() - pair[4][1]), stringify(pair[4][2])) + elseif pair[1][2] == 2 then -- notify + subtree:add(f.type_field, tvb(pair[1][1], pair[2][1] - pair[1][1]), pair[1][2]):append_text(" (Notify)") + -- method + if not is_string(pair[2][2]) then + return + end + subtree:add(f.method_field, tvb(pair[2][1], pair[3][1] - pair[2][1]), pair[2][2], "Method: " .. stringify(pair[2][2])) + -- params + if not is_array(pair[3][2]) then + proto_name = proto_name .. " (dirty)" + end + subtree:add(f.params_field, tvb(pair[3][1], tvb:len() - pair[3][1]), stringify(pair[3][2])) + else + return + end + pinfo.cols.protocol = proto_name + end + + tcp_table = DissectorTable.get("tcp.port") + for i, port in ipairs(PORTS) do + tcp_table:add(port, msgpack_rpc_proto) + end +end diff --git a/dissectors/mydefence-mdif/LICENSE b/dissectors/mydefence-mdif/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dissectors/mydefence-mdif/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/mydefence-mdif/README.md b/dissectors/mydefence-mdif/README.md new file mode 100644 index 0000000..43a419f --- /dev/null +++ b/dissectors/mydefence-mdif/README.md @@ -0,0 +1,71 @@ +# MDIF — MyDefence Device Interface + +Dissecteur Wireshark Lua de **MDIF**, l'interface de programmation des +équipements de **MyDefence** (composants cœur, mise à jour +micrologicielle, capteur RF « RFS » à algorithmes de détection, +effecteur RF « RFE »), lorsque les messages passent par +Ethernet. Protocole `mdif` sur TCP : trames préfixées par une longueur sur +4 octets (petit-boutiste), réassemblage TCP, puis lecture du numéro de +champ protobuf du message pour choisir le type racine et passage au +dissecteur **Protobuf natif** de Wireshark avec les fichiers `.proto` +fournis. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/mydefence/mdif (fichier `src/wireshark/create_mdif_dissector.lua` et définitions `src/protobuf/mdif/`) | +| Commit importé | `d97ac10122669b18530e25225692076477b5e1f6` du 13/10/2026 (branche `main`, dernier commit ; dernière modification du script : `10f85b9` du 16/11/2023) | +| Licence amont | Apache-2.0 (fichier `LICENSE` amont, copié ici ; en-têtes des `.proto` : « Copyright 2023 MyDefence A/S » — 2024 pour `rfe.proto` — « Licensed under the Apache License, Version 2.0 ») ; le script Lua n'a pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non (le dissecteur Protobuf générique est natif et utilisé par le script) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `create_mdif_dissector.lua` | Protocole `mdif` (TCP), appelle le dissecteur `protobuf` | +| `protobuf/mdif/common.proto` | Types communs (`mdif.common`) | +| `protobuf/mdif/core/core.proto` | Messages `mdif.core.CoreMsg` | +| `protobuf/mdif/fwu/fwu.proto` | Mise à jour micrologicielle, `mdif.fwu.FwuMsg` | +| `protobuf/mdif/rfs/rfs.proto` | Capteur RF, `mdif.rfs.RfsMsg` | +| `protobuf/mdif/rfe/rfe.proto` | Effecteur RF, `mdif.rfe.RfeMsg` | +| `LICENSE` | Licence Apache 2.0 amont | + +Le script est importé tel quel (seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée) ; les `.proto` sont copiés sans +modification. + +## Utilisation + +D'après la documentation amont (`docs/wireshark.html`) : + +1. copier `create_mdif_dissector.lua` dans le dossier des plugins Lua + personnels ; +2. dans Préférences → Protocols → ProtoBuf, ajouter aux chemins de + recherche le dossier `protobuf/` (celui qui contient `mdif/`) ; +3. « Décoder comme… » le port TCP 21020 en `MDIF` (le script ne + s'enregistre que sur le port 0 de `tcp.port`, uniquement pour + apparaître dans ce menu). + +Filtrer ensuite avec `mdif` ou les champs `pbf.mdif.*` du dissecteur +Protobuf. + +## Remarques + +- **Correspondance incomplète des types** : le script n'associe que les + numéros de champ < 0x20 à `mdif.core.CoreMsg`, < 0x30 à + `mdif.fwu.FwuMsg` et < 0x50 à `mdif.core_dev.CoreDevMsg` — ce dernier + type n'existe dans aucun `.proto` fourni. Les messages RFS (champs à + partir de 0x80) et RFE (à partir de 0xC0) ne sont pas associés ; comme + la variable `msgtype` n'est pas réinitialisée entre les paquets, ils + risquent d'être décodés avec le dernier type utilisé. De plus, les + messages `CoreMsg` vont jusqu'au numéro 257 et ne sont donc pas tous + reconnus. +- `get_tag` est une fonction globale ; le champ `MDIF.length` porte un + préfixe en majuscules. +- `rfs.proto` importe `google/protobuf/timestamp.proto`, non fourni : + il doit être trouvable dans les chemins de recherche Protobuf (par + exemple le dossier `include` d'une installation de protobuf). +- Seul le transport TCP est géré (pas le lien série HDLC décrit par + l'amont). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/mydefence-mdif/create_mdif_dissector.lua b/dissectors/mydefence-mdif/create_mdif_dissector.lua new file mode 100644 index 0000000..dd2b424 --- /dev/null +++ b/dissectors/mydefence-mdif/create_mdif_dissector.lua @@ -0,0 +1,96 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/mydefence/mdif (src/wireshark/create_mdif_dissector.lua), +-- commit d97ac10122669b18530e25225692076477b5e1f6 du 13/10/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +do + local protobuf_dissector = Dissector.get("protobuf") + + local name = "MDIF" + local desc = "MyDefence Device Interface" + local msgtype = nil + local proto = Proto(name, desc) + local f_length = ProtoField.uint32(name .. ".length", "Length", base.DEC) + proto.fields = { f_length } + + get_tag = function(len, data) + local max_rv = len + local tag = data:get_index(0) + local shift = 4 + + + tag = bit.rshift(bit.band(tag, 0x7f),3) + + if len > 5 then + max_rv = 4 + end + + if bit.band(data:get_index(0), 0xf8) == 0 then + return 0 + end + + if data:get_index(0) < 0x80 then + return tag + end + + for rv = 1, max_rv do + if data:get_index(rv) < 0x80 then + tag = bit.bor(tag, bit.lshift(data:get_index(rv), shift)) + return tag + else + tag = bit.bor(tag, bit.lshift(bit.band(data:get_index(rv), 0x7f), shift)) + shift = shift + 7 + end + end + + return 0 + + end + + proto.dissector = function(tvb, pinfo, tree) + local subtree = tree:add(proto, tvb()) + if pinfo.port_type == 2 then -- TCP + local offset = 0 + local remaining_len = tvb:len() + + while remaining_len > 0 do + if remaining_len < 4 then -- head not enough + pinfo.desegment_offset = offset + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return -1 + end + + local data_len = tvb(offset, 4):le_uint() + + if remaining_len - 4 < data_len then -- data not enough + pinfo.desegment_offset = offset + pinfo.desegment_len = data_len - (remaining_len - 4) + return -1 + end + subtree:add_le(f_length, tvb(offset, 4)) + + + local tag = get_tag(data_len, tvb(offset + 4, data_len):bytes()) + + if tag < 0x20 then + msgtype = "mdif.core.CoreMsg" + elseif tag < 0x30 then + msgtype = "mdif.fwu.FwuMsg" + elseif tag < 0x50 then + msgtype = "mdif.core_dev.CoreDevMsg" + end + if msgtype ~= nil then + pinfo.private["pb_msg_type"] = "message," .. msgtype + + pcall(Dissector.call, protobuf_dissector, + tvb(offset + 4, data_len):tvb(), pinfo, subtree) + end + + offset = offset + 4 + data_len + remaining_len = remaining_len - 4 - data_len + end + end + pinfo.columns.protocol:set(name) + end + + DissectorTable.get("tcp.port"):add(0, proto) +end diff --git a/dissectors/mydefence-mdif/protobuf/mdif/common.proto b/dissectors/mydefence-mdif/protobuf/mdif/common.proto new file mode 100644 index 0000000..fdd576b --- /dev/null +++ b/dissectors/mydefence-mdif/protobuf/mdif/common.proto @@ -0,0 +1,81 @@ +/******************************************************************************* + * * + * ,, * + * ,,,,, * + * ,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, ,,,, * + * ,,,,, ,,,,, ,,,,,, ,,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, , * + * ,,,,, ,,,,, ,,,,,, ,,, ,, , * + * ,,,,, ,,,,, ,,,,,, ,, ,, * + * ,,,,, ,,,,, ,,,,,, , , * + * ,,,,, ,,,,, ,,,,,, , * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, ,,,,,, * + * , ,,,,, ,,,,,, * + * , ,, ,,,,, ,,,,,, * + * , ,, ,,, ,,,,, ,,,,,, * + * , ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, * + * ,,,,, * + * * + * Program/file : common.proto * + * * + * Description : This protobuf file describes common features common to all * + * : other .proto files in project. * + * * + * Copyright 2023 MyDefence A/S. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * + * * + * * + *******************************************************************************/ + + /* + Common to all mdif protobuffers. + */ +syntax = "proto3"; + +package mdif.common; + +// [MD START java_declaration] +option java_package = "dk.mydefence.mdif.common"; +// [MD END java_declaration] + +/************************************* + ************* Sub types ************* + ************************************/ + +// Defines the status of a request +enum Status { + SUCCESS = 0; // The request was successful + FAILURE = 1; // The request failed + ERR_INVALID = 2; // The request was invalid + ERR_NOT_SUPPORTED = 3; // The request is not supported + ERR_NOT_IMPLEMENTED = 4; // The request is not implemented + ERR_NOT_READY = 5; // The device is not ready to process the request + ERR_SIZE = 6; // The device cannot process the size + BUSY = 7; // The device is busy and cannot process the incomming request +} + diff --git a/dissectors/mydefence-mdif/protobuf/mdif/core/core.proto b/dissectors/mydefence-mdif/protobuf/mdif/core/core.proto new file mode 100644 index 0000000..bcf7ef7 --- /dev/null +++ b/dissectors/mydefence-mdif/protobuf/mdif/core/core.proto @@ -0,0 +1,730 @@ +/******************************************************************************* + * * + * ,, * + * ,,,,, * + * ,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, ,,,, * + * ,,,,, ,,,,, ,,,,,, ,,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, , * + * ,,,,, ,,,,, ,,,,,, ,,, ,, , * + * ,,,,, ,,,,, ,,,,,, ,, ,, * + * ,,,,, ,,,,, ,,,,,, , , * + * ,,,,, ,,,,, ,,,,,, , * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, ,,,,,, * + * , ,,,,, ,,,,,, * + * , ,, ,,,,, ,,,,,, * + * , ,, ,,, ,,,,, ,,,,,, * + * , ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, * + * ,,,,, * + * * + * Program/file : core.proto * + * * + * Description : This protobuf file describes messages associated with the * + * : core functionality. * + * * + * Copyright 2023 MyDefence A/S. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * + * * + * * + *******************************************************************************/ + +/* + Message allocation for the Core component are in the range: + + | Start | End | Radix | + |-------|-------|-------| + | 0x01 | 0x1F | Hex | + | 1 | 31 | Dec | + | 0x100 | 0x1FF | Hex | + | 256 | 511 | Dec | + + */ +syntax = "proto3"; + +package mdif.core; + +// [MD START java_declaration] +option java_package = "dk.mydefence.mdif.core"; +option optimize_for = CODE_SIZE; +// [MD END java_declaration] + +import "mdif/common.proto"; + +/************************************* + ************* Sub types ************* + ************************************/ + +// Defines the type of device +enum DeviceType { + reserved 4 to 7, 10, 11; + NOTSET = 0; + WINGMAN = 1; // Wingman man-borne RF sensor + WATCHDOG = 2; // Watchdog fixed RF direction finding sensor + WOLFPACK = 3; // Wolfpack fixed 360 degree RF direction finding sensor + PITBULL = 8; // Pitbull man-borne RF effector + DOBERMANN = 9; // Dobermann fixed RF effector + DOBERMANN_DUAL = 12; // Dobermann dual fixed 90 degree RF effector + DOBERMANN360 = 13; // Dobermann 360 degree RF effector + FALCON = 14; // Falcon air-borne RF direction finding sensor + AA185 = 15; // External wide band antenna with DRID + BOXER = 16; // Boxer fixed RF effector + AA181 = 17; // External wide band antenna with DRID + HOST = 99; // Host device +} + +enum AccessoryId { + ACCESSORY_INVALID = 0; // + ACCESSORY_MASTER = 1; // + + ACCESSORY_CONSOLE = 10; // + reserved 11; + ACCESSORY_AA100 = 12; // + reserved 13; + ACCESSORY_PITBULL = 14; // + ACCESSORY_FUTTE = 15; // + ACCESSORY_AUDIO = 16; // + reserved 17, 18; + ACCESSORY_VIBRATOR = 19; // + reserved 20, 21; + ACCESSORY_AA120 = 22; // + reserved 23; + ACCESSORY_AA150 = 24; // + reserved 25; + ACCESSORY_DLC = 26; // + ACCESSORY_HDLC = 27; // + ACCESSORY_HDLC_MASTER = 28; // + ACCESSORY_HDLC_PITBULL = 29; // + ACCESSORY_HDLC_OTHER = 30; // + reserved 31; + ACCESSORY_AA180 = 32; // + reserved 33 to 35; + ACCESSORY_HDLC_AA185 = 36; + ACCESSORY_AA124 = 37; // + reserved 38 to 44; + ACCESSORY_AA154 = 45; // + reserved 46; + ACCESSORY_HDLC_AA181 = 47; // +} + +// Defines the IP configuration +message IpConfig +{ + // The IP address of the device. 4 bytes. 192.168.0.13 is encoded as + // ip[0]=192, ip[1]=168, ip[2]=0, ip[3]=13 + bytes ip = 1; + // The netmask of the device. 4 bytes. 255.255.255.0 is encoded as + // netmask[0]=255, netmask[1]=255, netmask[2]=255, netmask[3]=0 + bytes netmask = 2; + // The gateway of the device. 4 bytes. 192.168.0.1 is encoded as + // gateway[0]=192, gateway[1]=168, gateway[2]=0, gateway[3]=1 + bytes gateway = 3; +} + +// Defines the state of the system time. +enum SysTimeStatus { + // The system time is valid, and is currently being synchronized with GNSS. + VALID = 0; + // The system time was previously synchronized with GNSS, but is free-running with an estimated drift less than 100us. + VALID_DRIFTING = 1; + // The system time is free-running, with no synchronization. + NOT_VALID = 2; +} + +// The type of GNSS fix. +enum GnssFixType { + reserved 1, 4, 5; + // No fix available. + GNSS_FIX_NONE = 0; + // 2-dimensional fix. + GNSS_FIX_2D = 2; + // 3-dimensional fix. + GNSS_FIX_3D = 3; +} + +// Defines a GNSS status +message GnssStatus +{ + reserved 1, 4, 5, 10, 11, 12; + // Validity of the reported position. + bool pos_valid = 2; + // Validity of the reported system time. + // The time is considered valid if there is currently a valid GNSS time avaliable, + // or it has previously been available, and the system estimates that it has drifted + // less than 100us since it was lost. + SysTimeStatus time_valid = 3; + // Horizontal accuracy estimate, meters. + float pos_hacc = 6; + // Height over mean sea level, meters. + float pos_hmsl = 7; + // Vertical accuracy estimate, meters. + float pos_vacc = 8; + // GPS time in microseconds for this navigation solution. + int64 sol_time = 9; + // ECEF position accuracy estimate, meters. + float p_acc = 13; + // Speed over ground, meters/second + float ground_speed = 14; + // 2D heading. Degrees, 0 to 360. North is 0, East is 90. + float heading_2d = 15; + // Speed accuracy estimate, meters/s + float sacc = 16; + // Heading accuracy estimeate, degrees + float heading_acc = 17; + // The number of satellites used in the current navigation solution. + uint32 num_sv = 18; + // The type of fix currently provided + GnssFixType fix_type = 19; + // The estimated timing accuracy from the GNSS receiver, nanoseconds. + uint32 t_acc = 20; + // The estimated drift between the system time, and GNSS time. Microseconds. + uint32 systime_drift = 21; + // Latitude in degrees (WGS84 ellipsoid) + double pos_lat = 22; + // Longditude in degrees (WGS84 ellipsoid) + double pos_lon = 23; + // ECEF X coordinate, meters. + double ecef_x = 24; + // ECEF Y coordinate, meters. + double ecef_y = 25; + // ECEF Z coordinate, meters. + double ecef_z = 26; +} + +// Defines a compass heading +// +// Note that the reported heading is not compensated for magnetic declination. +// For details on how to compensate, see resources at NOAA: +// +// [World magnetic model](https://www.ncei.noaa.gov/products/world-magnetic-model) +// +// [Magnetic declination](https://www.ncei.noaa.gov/products/magnetic-declination) +// +message CompassHeading +{ + // Indicates presence of calibration data. + // Note that moving a device to a new mount or location will require a new calibration. + bool calibrated = 1; + // Uncompensated magnetic heading. Degrees, 0 to 360. North is 0, East is 90. + float heading = 2; + // X. Raw reading from magnetometer. For calibration purposes only. + int32 x = 3; + // Y. Raw reading from magnetometer. For calibration purposes only. + int32 y = 4; + // Z. Raw reading from magnetometer. For calibration purposes only. + int32 z = 5; +} + +// Defines the DHCP enable options +enum DhcpEnable { + DHCP_NO_CHANGE = 0; + DHCP_DISABLE = 1; + DHCP_ENABLE = 2; +} + +message CompositeInfo +{ + // Parent serial + string parent_serial = 1; + // Number of zones + uint32 num_zones = 2; + // Zone id + uint32 zone_id = 3; +} + +/************************************* + ****** API message definitions ****** + ************************************/ + +// Request Ping response +// +// The device will respond with a PingRes message. +message PingReq {} + +// Ping response +message PingRes {} + +// Request reset of device. +// +// The device will respond with a ResetRes message, and +// the device will reset. +message ResetReq {} + +// Reset response +message ResetRes +{ + // The status of the reset request + common.Status status = 1; +} + +// Request device info +// +// The device will respond with a GetDeviceInfoRes message. +message GetDeviceInfoReq {} + +// Device info +// +// Used in GetDeviceInfoRes and DeviceAnnounceInd +message DeviceInfo +{ + // Serial number of the device + string serial_number = 1; + // The type of device + DeviceType device_type = 2; + // The version of the device + uint32 device_version = 3; + // The version of the software + string sw_version = 4; + // Does this device have GNSS + bool gnss_present = 5; + // Does this device have a compass + bool compass_present = 6; + // Can GNSS settings be configured for this device. + bool gnss_configurable = 7; + // The connection index of the device + uint32 connection_index = 8; + // Battery available in the device + bool battery_present = 9; + // Build date of the device + string build_date = 10; + // Device MAC address + // Deprecated. Use mac_address field. + string mac = 11 [deprecated = true]; + // Composit info + CompositeInfo composite_info = 12; + // Device MAC address + bytes mac_address = 13; +} + +// Request battery status +// +// The device will respond with a GetBatteryStatusRes message. +message GetBatteryStatusReq {} + +// Charging state of the battery +enum ChargingState { + // Battery is not charging + DISCHARGING = 0; + // Charger connected but battery is full + NOT_CHARGING_FULL = 1; + // Battery is charging + CHARGING = 2; + // Charger connected but battery is too hot to charge + NOT_CHARGING_NTC_HOT = 3; + // Charger connected but battery is too cold to charge + NOT_CHARGING_NTC_COLD = 4; +} + +// Battery status response +message GetBatteryStatusRes +{ + // The status of the request + common.Status status = 1; + // Is the battery low + bool bat_low = 2; + // Is the battery charging + bool bat_charging = 3; + // The battery voltage + float bat_volt = 4; + // Battery temperature in degrees Celsius + float temperature = 5; + // Charging state + ChargingState charging_state = 6; + // Remaining battery percentage + int32 remaining_percent = 7; +} + +// Request IP configuration +// +// The device will respond with a GetIpConfigRes message. +message GetIpConfigReq {} + +// IP configuration response +message GetIpConfigRes +{ + // The status of the request + common.Status status = 1; + // The current IP configuration + IpConfig current_ip_config = 2; + // The IP configuration set in NVM and used on boot + IpConfig nvm_ip_config = 3; + // The MAC address of the device + bytes mac_address = 4; + // Is DHCP enabled + bool dhcp_enabled = 5; +} + +// Set IP configuration request +// +// The device will respond with a SetIpConfigRes message. Depending on the +// connection used to send the request and the IP configuration set, the +// response may not be received. +message SetIpConfigReq +{ + // Persist the IP configuration to NVM + bool persist = 1; + // The IP configuration to set + IpConfig ip_config = 2; + // Enable DHCP + DhcpEnable dhcp_enable = 3; +} + +// Set IP configuration response +message SetIpConfigRes +{ + // The status of the request + common.Status status = 1; +} + +// Request GNSS and compass data stream +// +// The device will respond with a GnssCompassStreamRes message. +message GnssCompassStreamReq +{ + // Enable or disable the stream. + // The device will include only the elements of the stream that it supports, + // as indicated in GetDeviceInfoRes. + // A device without GNSS does not support the stream. + bool enable = 1; + // Period between GNSS updates in miliseconds. + // Minimum value is 250ms. + // Periods >1000ms will be trunctated to the nearest 1000ms. + // The compass updates are tied to the GNSS update rate. + // Note on Wolfpack 210: + // A WP210 is composite in nature - there are four zones, each addressable via MDIF as its + // own device. The GNSS and compass stream setup in this case is split across two zones. + // In the GetDeviceInfoRes message, one zone will reply compass_present=true and + // gnss_configurable=false. Enable the stream on this device to receive compass headings. + // Another zone will reply compass_present=false and gnss_configurable=true. Enable the + // stream on this device to change the GNSS timing. + uint32 period = 2; + // Enable opportunistic calibration. If enabled, the calibration values will be incrementally + // updated when the device describes a full circle within 128 * period. + // Updates will be signalled with the CompassCalibrationAdjustedInd signal, and the updated + // values may be persisted with the CompassCalibrationStoreReq signal. + bool auto_update_calibration = 3; +} + +// GNSS and compass stream response +// +// Indicates whether the stream was started successfully. +message GnssCompassStreamRes +{ + // The status of the request. + common.Status status = 1; + // Error description string + string error_string = 2; +} + +// GNSS and compass stream data indication +message GnssCompassStreamInd +{ + // GNSS status + GnssStatus gnss_status = 1; + // Compass heading + CompassHeading compass_heading = 2; +} + +// Start a calibration of the compass. +// +// The device will respond with a CompassCalibrateRes message and, +// if the calibration was successfully started, will follow up with +// a CompassCalibrationCompleteInd once calibration has either succeeded, +// or timed out (20s-110s duration). +// +// When the calibration is running, the device must be on a level mount or surface, +// and should be rotated through 360 degrees within 20s. +// It may be necessary to rotate the device multiple times before the calibration succeeds. +message CompassCalibrateReq {} + +// Compass calibration response. +// +// Indicates whether the calibration was started successfully. +message CompassCalibrateRes +{ + // The status of the request + common.Status status = 1; +} + +// Indication of a completed compass calibration. +// +// On succesful completion, the new calibration values automatically replace the previous set +// in non-volatile memory. +message CompassCalibrationCompleteInd +{ + // The status of the calibration + common.Status status = 1; + // Calculated offset for X axis (Internal use only) + int32 offset_x = 2; + // Calculated offset for Y axis (Internal use only) + int32 offset_y = 3; + // Calculated scaling for X axis (Internal use only) + float scale_x = 4; + // Calculated scaling for Y axis (Internal use only) + float scale_y = 5; +} + +// Indication that opportunistic adjustment of compass calibration has happened. +// This happens when the device detects that is has moved a full circle within max 128 samples +// at the period set in GnssCompassStreamReq. +// The new calibration values are volatile, and will be reset on a power-cycle. +message CompassCalibrationAdjustedInd +{ + // Difference in heading for the latest measurement, due to calibration adjustment. + float heading_diff = 1; + // The updated calibration data. Internal use only. + // Calculated offset for X axis (Internal use only) + int32 offset_x = 2; + // Calculated offset for Y axis (Internal use only) + int32 offset_y = 3; + // Calculated scaling for X axis (Internal use only) + float scale_x = 4; + // Calculated scaling for Y axis (Internal use only) + float scale_y = 5; +} + +// Request that the current calibration values be written to non-volatile memory. +// +// The device will respond with a CompassCalibrationStoreRes message. +message CompassCalibrationStoreReq {} + +// Indicates if the calibration data has been written succesfully. +message CompassCalibrationStoreRes +{ + common.Status status = 1; +} + +// Indication that a device has been removed from the network. +message DisconnectInd +{ + string serial_number = 1; +} + +// Wraps a message for a specific device in the network. +// +// If the receiving device is not in the network then this message is sent back +// to sender indicating status=ERR_NOT_READY +message WrapperMsgInd +{ + string receiver = 1; + string sender = 2; + common.Status status = 3; + uint32 length = 4; + bytes payload = 5; +} + +// Api Error indication +// +// This message is used to indicate an error in the API. E.g if a request is not +// properly decoded. +message ApiErrorInd +{ + string error = 1; +} + +// Response on GetAccessoriesList request or indication of change in attached accessories +// +// The device will respond with a AccessoriesList message. If the port is in use, the +// accessory id will be set to the corresponding accessory and set to ACCESSORY_INVALID +// if nothing is attached on the given port. +message AccessoriesList +{ + // The accessory attached to the first port + repeated AccessoryId mpc = 1; + repeated string str_mpc = 2; +} + +// Get attached accessories request +// +// The device will respond with a AccessoriesList message. +message GetAccessoriesListReq {} + +// Persistent settings which can be changed in devices +enum PersistentSetting { + // Audio volume (value from 0-10). Uses first int_value in Set/GetPersistentSettingReq to set/get volume + AUDIO_VOLUME = 0; + // LED enable (0 or 1). Uses first int_value in Set/GetPersistentSettingReq to set/get led enable + LED_ENABLE = 1; + // Vibrator enable (0 or 1). Uses first int_value in Set/GetPersistentSettingReq to set/get vibrator enable + VIBRATOR_ENABLE = 2; + // Audio enable (0 or 1), Uses first int_value in Set/GetPersistentSettingReq to set/get audio enable + AUDIO_ENABLE = 3; + // ECM semi-automatic mode (0 or 1). Uses first int_value in Set/GetPersistentSettingReq to set/get ECM semi-automatic enable + ECM_SEMIAUTOMATIC_ENABLE = 4; +} + +// Change a persistent setting in device +// +// Settings set here are stored in non-volatile memory and will be persistent on +// power-cycle. +// Note that not all settings are available on all devices. +message SetPersistentSettingReq +{ + // The setting to change + PersistentSetting setting = 1; + // The string value to set + string str_value = 2; + // The integer value to set + repeated int32 int_value = 3; +} + +// Response to SetPersistentSettingReq +message SetPersistentSettingRes +{ + // The status of the request + common.Status status = 1; +} + +// Request a persistent setting from device +message GetPersistentSettingReq +{ + // The settings which can be queried + PersistentSetting setting = 1; +} + +// Response to GetPersistentSettingReq +message GetPersistentSettingRes +{ + // The status of the request + common.Status status = 1; + // The string value of the setting + string str_value = 2; + // The integer value of the setting + repeated int32 int_value = 3; +} + +// Core wire format message +// +// This message dictates the final format on the wire for core messages. It is a +// oneof construct to wrap a single message at a time. +// +// Every request (req) has a corresponding response (res). The req/res pairs are +// defined in the CoreService through RPC patterns. +// +// Indications (ind) are pushed without a request at any time +message CoreMsg +{ + oneof msg + { + // Request Ping response + PingReq ping_req = 1; + // Ping response + PingRes ping_res = 2; + // Request reset of device + ResetReq reset_req = 3; + // Reset response + ResetRes reset_res = 4; + // Request device info + GetDeviceInfoReq get_device_info_req = 5; + // Device info response + DeviceInfo get_device_info_res = 6; + // Request battery status + GetBatteryStatusReq get_battery_status_req = 7; + // Battery status response + GetBatteryStatusRes get_battery_status_res = 8; + // Request IP configuration + GetIpConfigReq get_ip_config_req = 9; + // IP configuration response + GetIpConfigRes get_ip_config_res = 10; + // Set IP configuration request + SetIpConfigReq set_ip_config_req = 11; + // Set IP configuration response + SetIpConfigRes set_ip_config_res = 12; + // Request streamed GNSS and compass updates + GnssCompassStreamReq gnss_compass_stream_req = 13; + // Response to GNSS and compass stream request. + GnssCompassStreamRes gnss_compass_stream_res = 14; + // GNSS and compass stream data indication. + GnssCompassStreamInd gnss_compass_stream_ind = 15; + // Request a compass calibration + CompassCalibrateReq compass_calibrate_req = 16; + // Response to a compass calibration request. + CompassCalibrateRes compass_calibrate_res = 17; + // Indication that a compass calibration has completed. + CompassCalibrationCompleteInd compass_calibration_complete_ind = 18; + // Indication that compass calibration has been updated. + CompassCalibrationAdjustedInd compass_calibration_adjusted_ind = 19; + // Request to store calibration data to non-volatile memory. + CompassCalibrationStoreReq compass_calibration_store_req = 20; + // Response to a compass calibration store request. + CompassCalibrationStoreRes compass_calibration_store_res = 21; + // Device Announce Indication + DeviceInfo device_announce_ind = 22; + // Device has been removed indication + DisconnectInd disconnect_ind = 23; + // Wrapper message indication + WrapperMsgInd wrapper_msg_ind = 24; + // Battery status indication + GetBatteryStatusRes battery_status_ind = 25; + // Get attached accessories request + GetAccessoriesListReq get_accessories_req = 26; + // List of attached accessories response + AccessoriesList get_accessories_res = 27; + // List of attached accessories indication + AccessoriesList accessories_list_ind = 28; + // Set persistent setting request + SetPersistentSettingReq set_persistent_setting_req = 29; + // Set persistent setting response + SetPersistentSettingRes set_persistent_setting_res = 30; + // Api Error indication + ApiErrorInd api_error_ind = 31; + + // Get persistent setting request + GetPersistentSettingReq get_persistent_setting_req = 256; + // Get persistent setting response + GetPersistentSettingRes get_persistent_setting_res = 257; + } +} + +// Defines the relationship between requests and responses in the Core component +service CoreService +{ + // Used to ping the target device + rpc Ping(PingReq) returns (PingRes); + // Used to reset the device + rpc Reset(ResetReq) returns (ResetRes); + // Used to get the device info + rpc GetDeviceInfo(GetDeviceInfoReq) returns (DeviceInfo); + // Used to get the battery status + rpc GetBatteryStatus(GetBatteryStatusReq) returns (GetBatteryStatusRes); + // Used to get the IP configuration + rpc GetIpConfig(GetIpConfigReq) returns (GetIpConfigRes); + // Used to set the IP configuration + rpc SetIpConfig(SetIpConfigReq) returns (SetIpConfigRes); + // Used to enable or disable streaming of GNSS and compass data. + rpc GnssCompassStream(GnssCompassStreamReq) returns (GnssCompassStreamRes); + // Used to calibrate compass + rpc CompassCalibrate(CompassCalibrateReq) returns (CompassCalibrateRes); + // Used to store current compass calibration + rpc CompassCalibrationStore(CompassCalibrationStoreReq) returns (CompassCalibrationStoreRes); + // Used to get a list of attached accessories + rpc GetAccessoriesList(GetAccessoriesListReq) returns (AccessoriesList); + // Used to set a persistent setting + rpc SetPersistentSetting(SetPersistentSettingReq) returns (SetPersistentSettingRes); + // Used to get a persistent setting + rpc GetPersistentSetting(GetPersistentSettingReq) returns (GetPersistentSettingRes); + // Used to set LED mode on Wolfpack +} diff --git a/dissectors/mydefence-mdif/protobuf/mdif/fwu/fwu.proto b/dissectors/mydefence-mdif/protobuf/mdif/fwu/fwu.proto new file mode 100644 index 0000000..470e1cb --- /dev/null +++ b/dissectors/mydefence-mdif/protobuf/mdif/fwu/fwu.proto @@ -0,0 +1,171 @@ +/******************************************************************************* + * * + * ,, * + * ,,,,, * + * ,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, ,,,, * + * ,,,,, ,,,,, ,,,,,, ,,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, , * + * ,,,,, ,,,,, ,,,,,, ,,, ,, , * + * ,,,,, ,,,,, ,,,,,, ,, ,, * + * ,,,,, ,,,,, ,,,,,, , , * + * ,,,,, ,,,,, ,,,,,, , * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, ,,,,,, * + * , ,,,,, ,,,,,, * + * , ,, ,,,,, ,,,,,, * + * , ,, ,,, ,,,,, ,,,,,, * + * , ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, * + * ,,,,, * + * * + * Program/file : fwu.proto * + * * + * Description : This protobuf file describes messages associated with the * + * : firmware update (fwu) functionality. * + * * + * Copyright 2023 MyDefence A/S. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * + * * + * * + *******************************************************************************/ + +/* + Message allocation for the FWU component are in the range: + + | Start | End | Radix | + |-------|------|-------| + | 0x20 | 0x2F | Hex | + | 32 | 47 | Dec | + + */ +syntax = "proto3"; + +package mdif.fwu; + +// [MD START java_declaration] +option java_package = "dk.mydefence.mdif.fwu"; +// [MD END java_declaration] +option optimize_for = CODE_SIZE; + +import "mdif/common.proto"; + +/************************************* + ******** Message definitions ******** + ************************************/ + + // Enumeration of possible states of FWU + // + // End-states means the FWU process has terminated +enum State { + IDLE = 0; // FWU not started (end-state) + RECEIVING_DATA = 1; // Data is being transfered to the device + PROCESSING_IMAGE = 2; // Processing received firmware data + ERASING_FLASH = 3; // Flash is being erased + WRITING_FLASH = 4; // Firmware is being written to flash + VERIFYING_FLASH = 5; // Written firmware is verified in flash + FWU_COMPLETE = 6; // FWU is successfully completed (end-state) + ERROR = 7; // An error has occured and FWU was not completed (end-state) +} + +// Initialize Firmware Update with size of firmware image. +// +// 'force' flag will skip any update guards in code making it possible to up/downgrade using +// firmware which is not directly supported by the device. Note this will void warranty if +// used without written approval from MyDefence. +message FwuInitReq { + uint32 size = 1; // Size of FWU image + bool force = 2; // Note using this flag could brik the device +} + +// Response on FwuInitReq +message FwuInitRes { + common.Status status = 1; // The status of the request + State state = 2; // If in State.RECEIVING_DATA the device is ready to proceed + uint32 max_chunk_size = 3; // Max chunk size in bytes +} + +// Chunk data contains part of FWU image +message FwuChunkReq { + bytes data = 1; // Section of firmware image +} + +// Response on FwuChunkReq +message FwuChunkRes { + common.Status status = 1; // The status of the request +} + +// Abort FWU process +message FwuAbortReq { +} + +// Response on FwuAbortReq +message FwuAbortRes { + common.Status status = 1; // The status of the request + State state = 2; // FWU state of the device +} + +// Indication with current FWU state of the device +message FwuStateInd { + State state = 1; // FWU state of the device +} + +// FWU wire format message +// +// This message dictates the final format on the wire for FWU messages. It is a +// oneof construct to wrap a single message at a time. +// +// Every request (req) has a corresponding response (res). The req/res pairs are +// defined in the FwuService below through RPC patterns. +// +// Indications (ind) are pushed without a request at any time +message FwuMsg { + oneof msg { + // Request FWU initialization + FwuInitReq fwu_init_req=0x0020; + // FWU init response + FwuInitRes fwu_init_res=0x0021; + // Request with FWU image chunk of data + FwuChunkReq fwu_chunk_req=0x0022; + // FWU chunk data response + FwuChunkRes fwu_chunk_res=0x0023; + // FWU state indication + FwuStateInd fwu_state_ind=0x0024; + // Request FWU to abort + FwuAbortReq fwu_abort_req=0x0025; + // FWU abort response + FwuAbortRes fwu_abort_res=0x0026; + } +} + +// Defines the relationship between requests and responses in the FWU component +service FwuService { + // Used to initialize FWU + rpc FwuInit (FwuInitReq) returns (FwuInitRes); + // Used to abort an active FWU + rpc FwuAbort (FwuAbortReq) returns (FwuAbortRes); + // Used to transmit a chunk with firmware data + rpc FwuChunk (FwuChunkReq) returns (FwuChunkRes); +} diff --git a/dissectors/mydefence-mdif/protobuf/mdif/rfe/rfe.proto b/dissectors/mydefence-mdif/protobuf/mdif/rfe/rfe.proto new file mode 100644 index 0000000..1fa7f92 --- /dev/null +++ b/dissectors/mydefence-mdif/protobuf/mdif/rfe/rfe.proto @@ -0,0 +1,268 @@ +/******************************************************************************* + * * + * ,, * + * ,,,,, * + * ,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, ,,,, * + * ,,,,, ,,,,, ,,,,,, ,,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, , * + * ,,,,, ,,,,, ,,,,,, ,,, ,, , * + * ,,,,, ,,,,, ,,,,,, ,, ,, * + * ,,,,, ,,,,, ,,,,,, , , * + * ,,,,, ,,,,, ,,,,,, , * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, ,,,,,, * + * , ,,,,, ,,,,,, * + * , ,, ,,,,, ,,,,,, * + * , ,, ,,, ,,,,, ,,,,,, * + * , ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, * + * ,,,,, * + * * + * Program/file : rfe.proto * + * * + * Description : This protobuf file describes messages associated with the * + * : rf effector (rfe) functionality. * + * * + * Copyright 2024 MyDefence A/S. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * + * * + * * + *******************************************************************************/ + +/* + Message allocation for the RFE component are in the range: + + | Start | End | Radix | + |-------|------|-------| + | 0xC0 | 0xDF | Hex | + | 192 | 223 | Dec | + + */ +syntax = "proto3"; + +package mdif.rfe; + +// [MD START java_declaration] +option java_package = "dk.mydefence.mdif.rfe"; +// [MD END java_declaration] + +import "mdif/common.proto"; + +// Defines the relationship between requests and responses in the RFE component +service RfeService { + // Use to start the RF effector + rpc Start(StartReq) returns (StartRes); + // Use to stop the RF effector + rpc Stop(StopReq) returns (StopRes); + // Use to get the current state of the RF effector + rpc GetStateInfo(GetStateInfoReq) returns (StateInfo); +} + +// Rfe wire format messages +// +// This message dictates the final format on the wire for rfe messages. It is a +// oneof construct to wrap a single message at a time. +// +// Every request (req) has a corresponding response (res). The req/res pairs are +// defined in the RfeService through RPC patterns. +// +// Indications (ind) are pushed without a request at any time +message RfeMsg { + oneof msg { + // Request RFE start + StartReq start_req = 0x00C0; + // RFE start response + StartRes start_res = 0x00C1; + // Request RFE stop + StopReq stop_req = 0x00C2; + // RFE stop response + StopRes stop_res = 0x00C3; + // Request RFE state + GetStateInfoReq get_state_info_req = 0x00C4; + // RFE state response + StateInfo get_state_info_res = 0x00C5; + // RFE state indication + StateInfo state_info_ind = 0x00C6; + } +} + +/************************************* + ************* Sub types ************* + ************************************/ + +// Defines the frequency bands that can be used for RFE +enum FreqBand { + // GPS (L1, 1.5GHz) + GLONASS (L1, 1.6GHz) + FREQ_BAND_GNSS = 0; + // 2.4 GHz band + FREQ_BAND_2_4_GHZ = 1; + // 5.2 GHz band + FREQ_BAND_5_2_GHZ = 2; + // 5.8 GHz band + FREQ_BAND_5_8_GHZ = 3; +} + +// Defines the status of the battery +enum BatteryStatus { + BATTERY_STATUS_UNDEFINED = 0; + // Battery status is normal + BATTERY_STATUS_NORMAL = 1; + // Battery status is low, still operating as normal + BATTERY_STATUS_LOW = 2; +} + +// Defines the temperature status +enum TemperatureStatus { + TEMPERATURE_STATUS_UNDEFINED = 0; + // Temperature status is normal + TEMPERATURE_STATUS_NORMAL = 1; + // Temperature status is high, output power is reduced + TEMPERATURE_STATUS_HIGH = 2; + // Temperature status is too high, transmission is stopped + TEMPERATURE_STATUS_TO_HIGH = 3; +} + +// Defines the status on the the requested frequency band +enum TxStatus { + TX_STATUS_UNDEFINED = 0; + // Frequency band accepted + TX_STATUS_ACCEPT = 1; + // The requested frequency band can not be jammed due to hardware limitations + TX_STATUS_FREQ_NOT_POSSIBLE = 2; + // The requested frequency band is not allowed. + TX_STATUS_FREQ_NOT_ALLOWED = 3; + // Only part of the requested frequency band will be jammed due to resource limitations + TX_STATUS_PARTIAL = 4; + // The requested frequency band can not be jammed due to resource limitations + TX_STATUS_RESOURCE_LIMITATION = 5; + // No jamming due to temperature + TX_STATUS_OVERHEAT = 6; + // No jamming due to battery status + TX_STATUS_BATTERY_LOW = 7; + // No jamming due to manual mode + TX_STATUS_MANUAL_MODE = 8; + // Currently unavailable - shutting down, FWU etc. + TX_STATUS_UNAVAILABLE = 9; +} + +// Defines the configuration of the RFE device +// The configuration is a bit field, and each bit must be explicitly tested +enum Config { + CONFIG_UNDEFINED = 0; + // Device is hutting down + CONFIG_SHUTDOWN = 1; + // Device is transmitting + CONFIG_TRANSMITTING = 2; + // Device is in automatic mode. That is, the device is controlled by an + // external entity + CONFIG_AUTOMATIC = 4; + // Device is configured to transmit on GNSS band + CONFIG_TX_GNSS = 8; + // Device is configured to transmit on 2.4 GHz band + CONFIG_TX_2G4 = 16; + // Device is configured to transmit on 5.2 GHz band + CONFIG_TX_5G2 = 32; + // Device is configured to transmit on 5.8 GHz band + CONFIG_TX_5G8 = 64; + // Device is in low power mode + CONFIG_LOW_POWER = 128; + // Device is in semi-automatic mode. That is, the device is controlled by an + // external entity but the user must manually approve each start request + CONFIG_SEMI_AUTOMATIC = 256; +} + +// Defines the type of controller +// If device is in automatic mode a controller must operate the device +enum ControllerType { + CONTROLLER_TYPE_UNDEFINED = 0; + // No controller is detected by the RFE device + CONTROLLER_TYPE_NOT_PRESENT = 1; + // Wingman is controlling RFE device + CONTROLLER_TYPE_WINGMAN = 2; + // Any other type of controller not covered by the previous types e.g. ATAK + // or PC. + CONTROLLER_TYPE_OTHER = 3; +} + +// Defines the state of the RFE device +message RfeState { + // Type of controller currently operating the RFE device + ControllerType controller_type = 1; + // Current configuration of the RFE device (deprecated, use config instead) + Config config_deprecated = 2 [deprecated = true]; + // Current battery status of the RFE device + BatteryStatus battery_status = 3; + // Current temperature status of the RFE device + TemperatureStatus temperature_status = 4; + // Current configuration of the RFE device as a bit mask using the Config + // enum values. Each bit represents a specific configuration option. + uint32 config = 5; +} + +/************************************* + ******** Message definitions ******** + ************************************/ + +// Request RFE start. +message StartReq { + // If clear_list is set to true, any currently active frequency bands will + // be cleared. If it is set to false, the frequency bands in the + // freq_band_list will be added to the active frequency bands. + bool clear_list = 1; + // List of frequency bands to transmit on. Pitbull/Doberman can only + // transmit on one band at a time, except when combining 2G4 and 5G bands + // (dual band). + repeated FreqBand freq_band_list = 2; + // Sender type composing the request. Used internally and can be left unset. + ControllerType controller_type = 3; +} +// Response to StartReq +message StartRes { + // Status of the StartReq request. + common.Status status = 1; + // List of statuses for each requested frequency band. The length and order + // corresponds to the length and order of frequency bands in the StartReq + // message. + repeated TxStatus tx_status_list = 2; +} +// Request RFE stop. +message StopReq {} +// Response to StopReq +message StopRes { + // Status of the request + common.Status status = 1; +} + +// Request RFE state +message GetStateInfoReq {} + +// Response to GetStateInfoReq and indication of RFE state +message StateInfo { + // State of the first device in the chain + RfeState local = 1; + // State of the last device in the chain (if any) + RfeState remote = 2; +} diff --git a/dissectors/mydefence-mdif/protobuf/mdif/rfs/rfs.proto b/dissectors/mydefence-mdif/protobuf/mdif/rfs/rfs.proto new file mode 100644 index 0000000..ab0c53e --- /dev/null +++ b/dissectors/mydefence-mdif/protobuf/mdif/rfs/rfs.proto @@ -0,0 +1,450 @@ +/******************************************************************************* + * * + * ,, * + * ,,,,, * + * ,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,, ,,,, * + * ,,,,, ,,,,, ,,,,,, ,,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, * + * ,,,,, ,,,,, ,,,,,, ,,, ,,, , * + * ,,,,, ,,,,, ,,,,,, ,,, ,, , * + * ,,,,, ,,,,, ,,,,,, ,, ,, * + * ,,,,, ,,,,, ,,,,,, , , * + * ,,,,, ,,,,, ,,,,,, , * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,,, ,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, ,,,,,, * + * , ,,,,, ,,,,,, * + * , ,, ,,,,, ,,,,,, * + * , ,, ,,, ,,,,, ,,,,,, * + * , ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,, ,,,, ,,,,, ,,,,,, * + * ,,,,, ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,, * + * ,,,,, * + * ,,,,, * + * * + * Program/file : rfs.proto * + * * + * Description : This protobuf file describes messages associated with the * + * : rf sensor (rfs) functionality. * + * * + * Copyright 2023 MyDefence A/S. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * + * * + * * + *******************************************************************************/ + +/* + Message allocation for the RFS component are in the range: + + | Start | End | Radix | + |-------|------|-------| + | 0x80 | 0x9F | Hex | + | 128 | 159 | Dec | + + */ +syntax = "proto3"; + +package mdif.rfs; + +// [MD START java_declaration] +option java_package = "dk.mydefence.mdif.rfs"; +// [MD END java_declaration] + +import "mdif/common.proto"; +import "google/protobuf/timestamp.proto"; + +// Defines the relationship between requests and responses in the RFS component +service RfsService { + // Use to start the RFS detection algorithms + rpc Start(StartReq) returns (StartRes); + // Use to stop the RFS detection algorithms + rpc Stop(StopReq) returns (StopRes); + // Use to get current state of the RFS detection algorithms + rpc State(StateReq) returns (StateRes); + // Use to get individual drone info + rpc GetDroneInfo(GetDroneInfoReq) returns (GetDroneInfoRes); + // Use to request a stream of remote ID messages. + rpc RemoteIdStream (RemoteIdStreamReq) returns (RemoteIdStreamRes); + // Request muting of a detection. + rpc Mute (MuteReq) returns (MuteRes); + // Use to request signal interference status + rpc GetSignalInterference (GetSignalInterferenceReq) returns (SignalInterference); +} + + +// Rfs wire format messages +// +// This message dictates the final format on the wire for rfs messages. It is a +// oneof construct to wrap a single message at a time. +// +// Every request (req) has a corresponding response (res). The req/res pairs are +// defined in the RfsService through RPC patterns. +// +// Indications (ind) are pushed without a request at any time +message RfsMsg { + reserved 0x0084, 0x0085; + oneof msg { + // Request RFS start + StartReq start_req = 0x0080; + // RFS start response + StartRes start_res = 0x0081; + // Request RFS stop + StopReq stop_req = 0x0082; + // RFS stop response + StopRes stop_res = 0x0083; + // Get individual drone info + GetDroneInfoReq get_drone_info_req = 0x0086; + // Individual drone info response + GetDroneInfoRes get_drone_info_res = 0x0087; + // RFS threat indication + RfsThreatInd rfs_threat_ind = 0x0088; + // Wifi threat indication + WifiThreatInd wifi_threat_ind = 0x0089; + // Threat stopped indication + ThreatStoppedInd threat_stopped_ind = 0x008A; + // Remote drone ID stream start - Request + RemoteIdStreamReq remote_id_stream_req = 0x008B [deprecated = true]; + // Remote Drone ID stream start - Response + RemoteIdStreamRes remote_id_stream_res = 0x008C [deprecated = true]; + // Remote Drone ID detection - Indication + RemoteIdInd remote_id_ind = 0x008D; + // Request to mute a detection + MuteReq mute_req = 0x008E; + // Response to muting + MuteRes mute_res = 0x008F; + // State request + StateReq state_req = 0x0090; + // State response + StateRes state_res = 0x0091; + // Indication of a mute status change + MuteInd mute_ind = 0x0092; + // Wolfpack set led identify + WpLedIdentifyReq wp_led_id_req = 0x0093; + // Wolfpack led identify response + WpLedIdentifyRes wp_led_id_res = 0x0094; + // Request signal interference information + GetSignalInterferenceReq signal_interference_req=0x0095; + // Signal interference status + SignalInterference signal_interference_res=0x0096; + // Signal interference indication + SignalInterference signal_interference_ind=0x0097; + } +} + +/************************************* + ************* Sub types ************* + ************************************/ + +// Enumeration of possible start-modes. +enum StartMode { + Default = 0; // RFS runs on internal antenna and external if present + ExtAntOnly = 1; // RFS runs on external antenna only. Will signal error if not present + IntAntOnly = 2; // RFS runs on internal antenna only, even if external is present + UAVModeSearch = 3; // RFS runs on internal antenna in search/direction finding mode +} + +// Enumeration of frequncies bands scanned. +enum ScanBand { + Invalid = 0; // Default, before overwriting with detection band. + MHz433 = 1; // ISM band 433MHz + MHz900 = 2; // ISM band 868-915MHz + MHz1200 = 3; // ISM band 1.2GHz + MHz2400 = 4; // ISM band 2.4GHz + MHz5800 = 5; // ISM band 5.8GHz + MHz5200 = 6; // ISM band 5.2GHz +} + +// Enumeration of the categories of threats that may be reported. +enum ThreatCategory { + CategoryInvalid = 0; // Invalid. + CategoryDrone = 1; // Drone / UAV. + CategoryController = 2; // Controller / ground station. + CategoryDroneOrController = 3; // Drone or controller. Source indeterminate. + CategoryWifi = 4; // Wi-Fi signal from either drone or controller. + CategoryTest = 5; // MyDefence test signal. +} + +// Enumeration of system status +enum State { + MAIN_STATE_IDLE = 0; + MAIN_STATE_RUNNING = 1; + MAIN_STATE_STOPPING = 2; + MAIN_STATE_STARTING = 3; + MAIN_STATE_START_ERROR = 4; +} + +enum RidTransportType { + TRANSPORT_UNKNOWN = 0; // Bluetooth classic transport + TRANSPORT_BEACON = 1; // Wi-Fi beacon transport + TRANSPORT_NAN = 2; // Wi-Fi NaN transport + TRANSPORT_BT_CLASSIC = 3; // Bluetooth classic transport + TRANSPORT_BT_EXT = 4; // Bluetooth extended transport, THIS IS NOT PART OF THE REMOTE ID STANDARD, see ASTM-F3411 (section 5.4.7.1) + TRANSPORT_BT_CLASSIC_CODED_PHY = 5; // Bluetooth classic coded PHY transport + TRANSPORT_BT_EXT_CODED_PHY = 6; // Bluetooth extended coded PHY transport + +} + +enum RfsDetectionLocationCapability { + LOC_CAP_PRESENCE = 0; // Detection is present. No further information. + LOC_CAP_ZONE = 1; // Detection is present in a defined zone. + LOC_CAP_DIRECTION = 2; // Detection direction is possible. + LOC_CAP_LOCATION = 3; // Detection location is possible. +} + +/************************************* + ******** Message definitions ******** + ************************************/ +// Description of a drone. +message DroneInfo { + reserved 6, 7; + uint32 type_id = 1; // Identifier for detection filter + string type_id_name = 2; // Name of RF protocol/Family (e.g Lightbridge) + string drone_name = 3; // Name of drone(s) (e.g Phantom 3) + uint32 vendor_id = 4; // Identifier to rf emitter vendor (e.g 1) + string vendor_id_name = 5; // Name of rf emitter vendor (e.g DJI) + repeated ScanBand band = 8; // Bands where detector looks (e.g 2G4 and 5G8) + ThreatCategory category = 9; // Category of threat. +} + +// Get individual drone description, just in time or loop through and build library. +message GetDroneInfoReq { + // Id of detection filter associated with drone. 0 is first in library. + uint32 type_id = 1; +} +// Response to GetDroneInfoReq +message GetDroneInfoRes { + common.Status status = 1; + // Description of drone. + DroneInfo drone_info = 2; + // Id to next drone, 0 indicates end of library. + uint32 next_drone_type_id = 3; +} + +// Request RFS start detection. +// All types of indications will be enabled by default, and can be disabled by setting the appropriate disable flag to true in this message. +// If detection is already started, flags will be updated without restarting detection. To update flags, send a new start request with the appropiate flags. +// To subscribe another instance, the StartReq must be sent with the flags set to false to get the desired indications on the new connection. +// Stopping RFS from another connection stops detection globally, but does not clear existing per-connection indication subscriptions. Indications will resume after RFS is started again. +message StartReq { + bool rfs_threat_ind_disable = 1; // Unregister for RfsThreatInd indications on this connection. + // Unregister to receive fingerprint data in RfsThreatInd messages on ALL connections. + // Note that fingerprint data may still be empty, if the sensor does not have valid system time. + bool rfs_threat_ind_fingerprint_disable = 2; + bool remote_id_ind_disable = 3; // Unregister for receive RemoteIdInd indications on this connection. + bool wifi_threat_ind_disable = 4; // Unregister for receive WifiThreatInd indications on this connection. + bool mute_ind_disable = 5; // Unregister for MuteInd indications on this connection. +} + +// Response to StartReq +message StartRes { + common.Status status = 1; +} +// Request RFS stop detection. +message StopReq {} +// Response to StopReq +message StopRes { + common.Status status = 1; +} + +// Request RFS state. +message StateReq {} +// Response to StartReq +message StateRes { + common.Status status = 1; + State state = 2; +} + +// Threat indication from the detection framework. +message RfsThreatInd { + reserved 3, 7, 8; + message RelativeBearing { + reserved 4; + bool valid = 1; // Current validity of the bearing calculation. + float bearing = 2; // Calculated bearing. Degrees from center of device. Positive is counter-clockwise. + float var_bearing = 3; // Variance in bearing. + google.protobuf.Timestamp ts = 5; // Timestamp when bearing was last updated. + } + message BandStats { + ScanBand band = 1; // Name of the band + float power = 2; // First-order IIR average of power on this band, alpha 0.25. [dB] + google.protobuf.Timestamp last_seen = 3; // Most recent observation on this band. + uint64 freq_min = 4; // Lowest frequency in Hz observed in this band + uint64 freq_max = 5; // Highest frequency in Hz observed in this band + } + /* Finterprint data for internal Mydefence use. */ + message FingerPrintData { + message Anchor { + google.protobuf.Timestamp timestamp = 1; // Timestamp of the segment nearest to the anchor epoch in microseconds + double freq = 2; // Frequency of the observed segment (Hz) + int32 channel_id = 3; // Channel ID if the detector defines a channel map, otherwise -1 + } + + message AnchorInfo { + uint64 hop_timing_us = 2; // Hop timing in microseconds + repeated Anchor anchors = 4; // Array of anchor information + } + + message ChanEstSample { + google.protobuf.Timestamp timestamp = 1; // Timestamp of the latest observation in a subband in seconds + double freq = 2; // Center frequency of the observed segment (Hz) + uint32 sb_num = 3; // Subband sequence number + } + + message ChanEst { + double min_chan_sep = 1; // Minimum separation of center frequencies [Hz] for a distinct channel + repeated ChanEstSample samples = 2; // Array of observations of detection center frequency + } + AnchorInfo anchor_info = 3; // Anchor point feature information for fingerprinting + ChanEst chan_est = 4; // Channel estimation fingerprint feature + } + uint32 id = 1; // ID of detection. Unique for this sensor at runtime, not across sensors. The same threat reappearing will have the same ID. ID's are reset on device restart and will start from 1. + uint32 type_id = 2; // Detection type id. May be be used to look up description with GetDroneInfoReq. + float power = 4 [deprecated = true]; // Use BandStats[0].power field. + repeated ScanBand current_band = 5 [deprecated = true]; // Use BandStats field. + RelativeBearing relative_bearing = 6; // Relative bearing from device to threat. + google.protobuf.Timestamp start_ts = 9; // Earliest observation of this detection. + google.protobuf.Timestamp last_seen_ts = 10 [deprecated = true]; // Use BandStats[0].last_seen field. + bool muted = 11; // Mute status of this threat. + uint32 sub_type_id = 12; // Sub-type of the emitter (where applicable). May be be used to look up description with GetDroneInfoReq. + repeated BandStats band_stats = 13; // Statistics for current bands. Will always contain at least one band. See element 0 for current power and band, and timestamp of latest observation. + RfsDetectionLocationCapability location_type = 14; // The location capabilityfor this detection. + FingerPrintData fingerprint_data = 15; // Fingerprint data for this threat, if requested and available. For internal Mydefence use. +} + +// Threat indication from the WiFi sniffer. +message WifiThreatInd { + reserved 3, 5, 8; + uint32 id = 1; // ID of detection. Unique for this sensor at runtime, not across sensors. The same threat reappearing will have the same ID. ID's are reset on device restart and will start from 1. + uint32 type_id = 2; // Detection type id. May be used to look up more info with GetDroneInfoReq. + float power = 4 [deprecated = true]; // Use BandStats[0].power field which is equal to Received signal strength indication in dB. + uint32 channel = 6; // Wifi channel as per international standards 802.11 a/b/g/n. + bytes mac_adr = 7; // // MAC address of the Wi‑Fi threat as raw bytes. // Example byte sequence: "p\263\325;\357\377" + google.protobuf.Timestamp start_ts = 9; // Earliest observation of this detection. + bool muted = 10; // Mute status of this threat. + RfsDetectionLocationCapability location_type = 11; // The location capability for this detection. + repeated RfsThreatInd.BandStats band_stats = 12; // Statistics for current Wi-Fi bands. Will always contain at least one band. See element 0 for current power and band, and timestamp of latest observation. +} +// Post stop of threat indication. +message ThreatStoppedInd { + reserved 2; + uint32 id = 1; // ID of detection. Unique for this sensor, not across sensors. +} + +// Deprecated. Use the remote_id_ind_disable flag in StartReq. +// Request that remote ID results be streamed from the device. +message RemoteIdStreamReq { + // Enable or disable the stream. + bool enable = 1 [deprecated = true]; +} + +// Deprecated. +// Response to RemoteIdStreamReq. +message RemoteIdStreamRes { + // Status of the request. + common.Status status = 1 [deprecated = true]; +} + +// Remote ID indication with binary message pack. +message RemoteIdInd { + // MAC address from which the remote ID was received. + bytes mac_adr = 1; + // Remote ID message pack, as per ASTM-F3411 + bytes payload = 2; + // ID of detection. Unique for this sensor, not across sensors. + uint32 id = 3; + // Transport type of RID message. + RidTransportType transport_type = 4; + // Mute status of this threat. + bool muted = 10; + + +} + +// Request to mute or unmute a detection. Note that if a detection is muted by both ID and type, it will be necessary +// to unmute by both methods too. +// Setting id = 0 and type_id = 0 will mute all active threats, by ID where possible, and by type otherwise. +// Setting id = 0 and type_id = 0 when all active threats are already muted, will unmute all. +message MuteReq { + // Enable or disable muting. + bool mute = 1; + // ID of the threat to mute, as received in RfsThreatInd, WifiThreatInd or RemoteIdInd. 0 to mute by type, only. + uint32 id = 2; + // Type ID to mute. This will also mute future threats of this type. This will be ignored if a valid (non-zero) ID is given. + uint32 type_id = 3; +} + +// Response to MuteReq. +message MuteRes { + // Status of the request. + common.Status status = 1; +} + +// Indication that a mute status has changed. +message MuteInd { + // Is muting enabled for this threat or type. + bool muted = 1; + // ID of the threat to mute, as received in RfsThreatInd, WifiThreatInd or RemoteIdInd. 0 is invalid, and means muting is done by type. + uint32 id = 2; + // Type ID to mute. This shall be ignored if a valid (non-zero) ID is given. + uint32 type_id = 3; +} + +// Send LED indentify signal to a Wolfpack +// Identify = 1 will make the Wolfpack flash green for 30 min, either with the red flash in default mode, or alone in darkmode. +// Identify = 0 will disable the green flash. +message WpLedIdentifyReq { + // Enable/disable the Wolfpack green LED flash. + bool identify = 1; +} + +// Response to WpLedIdentifyReq +message WpLedIdentifyRes { + // Status for the WpLedIdentifyReq, if no PMU is connected it will fail. + common.Status status = 1; +} + +// Single band of signal interference status +message SignalInterferenceBand { + ScanBand band = 1; + int32 interference_status = 2; // 0 = no interference, 1 = interference detected + int32 min_gain = 3; + int32 max_gain = 4; + int32 avg_gain = 5; + int32 threshold = 6; + int32 num_over = 7; + int32 num_under = 8; +} + +// Signal interference status +// +// This message is the response to a `GetSignalInterferenceReq` message or used in +// an indication. +// +// Indication will be sent when the signal interference status changes. +message SignalInterference { + repeated SignalInterferenceBand signal_interference = 1; +} + +// Request signal interference +// +// The device will respond with a `SignalInterference` message +message GetSignalInterferenceReq {} diff --git a/dissectors/napoleon-efire/LICENSE b/dissectors/napoleon-efire/LICENSE new file mode 100644 index 0000000..1260227 --- /dev/null +++ b/dissectors/napoleon-efire/LICENSE @@ -0,0 +1,22 @@ + +MIT License + +Copyright (c) 2023 Felix Kaechele + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/napoleon-efire/README.md b/dissectors/napoleon-efire/README.md new file mode 100644 index 0000000..3734ab5 --- /dev/null +++ b/dissectors/napoleon-efire/README.md @@ -0,0 +1,47 @@ +# Napoleon eFIRE (foyers et cheminées au gaz connectés, Bluetooth LE) + +Dissecteur Wireshark Lua du **protocole eFIRE de Napoleon**, utilisé par +l'application mobile pour piloter en Bluetooth LE les foyers au gaz Napoleon +(module de contrôle W190-0090) : en-tête 0xAA (requête) / 0xBB (réponse), +type de message, longueur, commande — veilleuse, hauteur de flamme, +ventilateur, flux séparé, sortie auxiliaire, éclairage LED (état, couleur, +effets), minuterie, alimentation, mot de passe, synchronisation de l'heure, +versions BLE/MCU — puis paramètres, somme de contrôle XOR (vérifiée, avec +info experte) et octet de fin. Il s'appuie sur la dissection ATT +de Wireshark (handles 0x001E et 0x0020). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/kaechele/bonaparte (fichier `contrib/wireshark_efire.lua`) | +| Commit importé | `5090a35e36fd0db4bb8c62ba6ee6a0c0e17971ff` du 29/10/2026 (branche `main`, dernier commit ; dernière modification du dissecteur : `4d5e0c1` du 15/03/2023) | +| Licence amont | MIT (`LICENSE` amont, © 2023 Felix Kaechele ; en-tête du fichier : « (c) 2023 Felix Kaechele ») | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur eFIRE natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `wireshark_efire.lua` | Dissecteur `efire` (table `btatt.handle`, handles 0x001E et 0x0020) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. Le reste du dépôt (bibliothèque +Python `bonaparte`, documentation du protocole Bluetooth) n'est pas importé. + +## Utilisation + +Copier `wireshark_efire.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, ouvrir +une capture Bluetooth LE (btsnoop Android, nRF Sniffer…) puis filtrer avec +`efire`. + +## Remarques + +- Les handles ATT 0x001E / 0x0020 sont ceux du module observé par l'auteur ; + un autre firmware pourrait les déplacer (non vérifié). +- Utilise la bibliothèque `bit` (fournie par Wireshark), pas `bit32`. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/napoleon-efire/wireshark_efire.lua b/dissectors/napoleon-efire/wireshark_efire.lua new file mode 100644 index 0000000..35936a9 --- /dev/null +++ b/dissectors/napoleon-efire/wireshark_efire.lua @@ -0,0 +1,443 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/kaechele/bonaparte (contrib/wireshark_efire.lua), +-- commit 5090a35e36fd0db4bb8c62ba6ee6a0c0e17971ff du 29/10/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- Wireshark Protocol Dissector for the Napoleon eFIRE controller protocol +-- (c) 2023 Felix Kaechele + +-- Copy this file into your Wireshark plugins directory: +-- https://www.wireshark.org/docs/wsug_html_chunked/ChPluginFolders.html + +-- luacheck: globals DissectorTable Proto ProtoExpert ProtoField Struct base expert + +local p_efire = Proto("efire", "Napoleon eFIRE") + +local t_msg_type = { [0xaa] = "Request", [0xbb] = "Response" } + +local t_commands = { + -- R = Read Command (Command sent without parameters, response received with state/data) + -- W = Write Command (Command sent with parameters, response received with return code) + [0x27] = "Set Night Light/Standing Pilot", -- W + [0x28] = "Set Split Flow/Blower Speed/Aux/Flame Height", -- W + [0xb1] = "Set LED State", -- W + [0xc1] = "Set LED Color", -- W + [0xc3] = "Set Timer", -- W + [0xc4] = "Set Power State", -- W + [0xc5] = "Send Password", -- W (authenticate or set password if used after sending 0xc6) + [0xc6] = "Manage Password", -- W + [0xc7] = "Set Time Sync", -- W + [0xe0] = "Query LED State", -- R + [0xe1] = "Query LED Color", -- R + [0xe2] = "Query LED Effect", -- R + [0xe3] = "Query Pilot/Night Light/Main Mode State", -- R + [0xe4] = "Query Split Flow/Blower Speed/Aux/Flame Height State", -- R + [0xe6] = "Query Timer", -- R + [0xe7] = "Query Power State", -- R + [0xe8] = "Read Password", -- R + [0xe9] = "Set Password", -- W (has no parameters, simply commits the previously sent password to memory) + [0xea] = "Time Sync Response", -- -R (queries an active timer from the controller for the time that's left on it) + [0xeb] = "LED Controller State Response", -- R (not seen in testing yet) + [0xee] = "Aux Control State Response", --R + [0xf1] = "Set LED Controller Effect", --W + [0xf2] = "Query BLE Version", --R + [0xf3] = "Query MCU Version", --R + [0xf4] = "Query Aux Control", --R +} + +local t_power_states = { + [0x00] = "Off", + [0xff] = "On", +} + +local t_password_actions = { + [0x3f] = "Reset Password", + [0xf5] = "Set Password", +} + +local t_c5_return_codes = { + [0x00] = "Password set", + [0x01] = "Password set failed", + [0x19] = "Invalid Password", + [0x35] = "Login Successful", +} + +local t_password_set_return_codes = { + [0x53] = "Success", + [0x25] = "Error", +} + +local t_light_states = { + [0x0] = false, + [0xffffff] = true, +} + +local t_light_modes = { + [0xffffff] = "Ember Bed", + [0x020202] = "Hold", + [0x010101] = "Cycle", +} + +local t_light_modes_short = { + [0xff] = "Ember Bed", + [0x02] = "Hold", + [0x01] = "Cycle", +} + +-- Functions that follow the generic return code schema (see return codes below) +local t_generic_return = { + [0x27] = true, + [0x28] = true, + [0xb1] = true, + [0xc1] = true, + [0xc3] = true, + [0xc4] = true, + [0xc6] = true, + [0xc7] = true, + [0xf1] = true, +} + +local t_generic_return_codes = { + [0x00] = "Success", + [0x01] = "Error", +} + +-- Common fields +local f_header = ProtoField.uint8("efire.header", "Header", base.HEX) +local f_msg_type = ProtoField.uint8("efire.msg_type", "Message Type", base.HEX, t_msg_type) +local f_payload_length = ProtoField.uint8("efire.payload_length", "Length") +local f_parameters = ProtoField.bytes("efire.parameters", "Parameters") +local f_checksum = ProtoField.uint8("efire.checksum", "Checksum", base.HEX) +local f_footer = ProtoField.uint8("efire.footer", "Footer", base.HEX) + +-- Request fields +local f_command = ProtoField.uint8("efire.command", "Command", base.HEX, t_commands) + +local f_login_password = ProtoField.string("efire.login_password", "Password") +local f_password_action = ProtoField.uint8("efire.password_action", "Action", base.HEX, t_password_actions) +local f_power_request = ProtoField.uint8("efire.power_request", "Requested state", base.HEX, t_power_states) + +-- Response fields +local f_response_class = ProtoField.uint8("efire.response_class", "Response Class", base.HEX, t_commands) + +local f_aux = ProtoField.bool("efire.aux", "Aux Relay on") +local f_aux_control = ProtoField.bool("efire.aux_control", "Aux Control detected") +local f_ble_version = ProtoField.string("efire.ble_version", "BLE Version") +local f_blower_speed = ProtoField.uint8("efire.blower_speed", "Blower Speed") +local f_flame_height = ProtoField.uint8("efire.flame_height", "Flame Height") +local f_light_color = ProtoField.string("efire.light_color", "Light color") +local f_light_mode = ProtoField.uint24("efire.light_mode", "Light mode", base.HEX, t_light_modes) +local f_light_mode_short = ProtoField.uint8("efire.light_mode_short", "Light mode", base.HEX, t_light_modes_short) +local f_light_state = ProtoField.bool("efire.light_state", "Light on") +local f_login_result = ProtoField.uint8("efire.login_result", "Login result", base.HEX, t_c5_return_codes) +local f_main_mode = ProtoField.uint8("efire.main_mode", "Main Mode") +local f_mcu_version = ProtoField.string("efire.mcu_version", "MCU Version") +local f_night_light = ProtoField.uint8("efire.night_light", "Night Light Level") +local f_pilot_state = ProtoField.bool("efire.pilot_state", "Pilot State on") +local f_power_state = ProtoField.bool("efire.power_state", "Fireplace on") +local f_set_password_result = + ProtoField.uint8("efire.set_password_result", "Result", base.HEX, t_password_set_return_codes) +local f_split_flow = ProtoField.bool("efire.split_flow", "Split Flow Valve on") +local f_timer_enabled = ProtoField.bool("efire.timer_hours", "Enabled") +local f_timer_hours = ProtoField.uint8("efire.timer_hours", "Hours") +local f_timer_minutes = ProtoField.uint8("efire.timer_hours", "Minutes") +local f_timer_seconds = ProtoField.uint8("efire.timer_hours", "Seconds") + +-- Generic fields +local f_set_command_result = ProtoField.uint8("efire.cmd_result", "Command Result", base.HEX, t_generic_return_codes) + +p_efire.fields = { + f_aux_control, + f_aux, + f_ble_version, + f_blower_speed, + f_checksum, + f_command, + f_flame_height, + f_footer, + f_header, + f_light_color, + f_light_mode, + f_light_state, + f_login_password, + f_login_result, + f_main_mode, + f_mcu_version, + f_msg_type, + f_night_light, + f_parameters, + f_password_action, + f_payload_length, + f_pilot_state, + f_power_request, + f_power_state, + f_response_class, + f_set_command_result, + f_set_password_result, + f_split_flow, + f_timer_enabled, + f_timer_hours, + f_timer_minutes, + f_timer_seconds, +} + +local x_checksum = ProtoExpert.new("efire.calculated_checksum", "Checksum", expert.group.CHECKSUM, expert.severity.CHAT) + +p_efire.experts = { x_checksum } + +-- calculate the checksum for eFIRE payloads +-- it's essentially an XOR over all fields except for header (byte 0), msg_type (byte 1) and footer (last byte) +local function calc_checksum(msg) + local bytes, _ = msg(2, msg:len() - 4):bytes() + local csum = 0x00 + for i = 0, bytes:len() - 1 do + csum = bit.bxor(csum, bytes:get_index(i)) + end + return csum +end + +local function checksum_is_valid(msg) + if calc_checksum(msg) == msg(msg:len() - 2, 1):uint() then + return expert.severity.CHAT, "Checksum valid" + end + return expert.severity.WARN, "Checksum invalid" +end + +function p_efire.dissector(buffer, pinfo, root) + pinfo.cols.protocol:set("eFIRE") + + local pktlen = buffer:reported_length_remaining() + -- Packet format: header, msg_type, payload, footer + -- Payload format: payload_length, command, parameters, checksum + local payload_len = buffer(2, 1):uint() + local msg_type = buffer(1, 1):uint() + local command = buffer(3, 1):uint() + local parameters, _ = buffer(4, payload_len - 3):bytes() + + if pktlen < 6 then + print("packet length", pktlen, "too short") + return + end + + local subtree = root:add(p_efire, buffer(0, pktlen), "Napoleon eFIRE Protocol Data") + subtree:add(f_header, buffer(0, 1)) + subtree:add(f_msg_type, buffer(1, 1)) + subtree:add(f_payload_length, buffer(2, 1)) + + if msg_type == 0xaa then + if t_commands[command] then + pinfo.cols.info = "eFIRE Controller Command (" .. t_commands[command] .. ")" + else + pinfo.cols.info = "eFIRE Controller Command (Unknown Class " .. string.format("0x%x", command) .. ")" + end + subtree:add(f_command, buffer(3, 1)) + elseif msg_type == 0xbb then + if t_commands[command] then + pinfo.cols.info = "eFIRE Controller Response (" .. t_commands[command] .. ")" + else + pinfo.cols.info = "eFIRE Controller Response (Unknown Class " .. string.format("0x%x", command) .. ")" + end + subtree:add(f_response_class, buffer(3, 1)) + end + + local param_tree = subtree:add(f_parameters, buffer(4, payload_len - 3)) + + -- Let's look at requests + if msg_type == 0xaa then + -- Set Night Light/Standing Pilot/Main Mode + -- These are commands that affect the fireplace regardless of flame state + if command == 0x27 then + local night_light_level = bit.band(bit.rshift(parameters:get_index(1), 4), 7) + local standing_pilot = bit.rshift(parameters:get_index(1), 7) + param_tree:add(f_night_light, buffer(5, 1), night_light_level):set_generated() + param_tree:add(f_pilot_state, buffer(5, 1), standing_pilot):set_generated() + end + + -- Set Split Flow/Blower/Aux/Flame Height + -- These commands affect the fireplace during heating operation + if command == 0x28 then + local param = parameters:get_index(1) + local split_flow = bit.band(bit.rshift(param, 7), 1) + local blower_speed = bit.band(bit.rshift(param, 4), 7) + local aux = bit.band(bit.rshift(param, 3), 1) + local flame_height = bit.band(param, 7) + param_tree:add(f_split_flow, buffer(4, 1), split_flow):set_generated() + param_tree:add(f_blower_speed, buffer(4, 1), blower_speed):set_generated() + param_tree:add(f_aux, buffer(4, 1), aux):set_generated() + param_tree:add(f_flame_height, buffer(4, 1), flame_height):set_generated() + end + + -- Set Light state + if command == 0xb1 then + local state = Struct.unpack(">I3", parameters:raw()) + print(state) + param_tree:add(f_light_state, buffer(4, 3), (t_light_states[state] and t_light_states[state])):set_generated() + end + + -- Set Color + if command == 0xc1 then + param_tree + :add( + f_light_color, + buffer(4, 3), + "R: " .. parameters:get_index(0) .. " G: " .. parameters:get_index(1) .. " B: " .. parameters:get_index(2) + ) + :set_generated() + end + + -- Timer + if command == 0xc3 then + param_tree:add(f_timer_hours, buffer(4, 1), parameters:get_index(0)) + param_tree:add(f_timer_minutes, buffer(5, 1), parameters:get_index(1)) + param_tree:add(f_timer_enabled, buffer(6, 1), parameters:get_index(2)) + end + + -- Power + if command == 0xc4 then + param_tree:add(f_power_request, buffer(4, 1), parameters:get_index(0)) + end + + -- Login & Change Password + if command == 0xc5 then + param_tree:add(f_login_password, buffer(4, payload_len - 3), buffer(4, payload_len - 3):string()) + end + + -- Password Management + if command == 0xc6 then + param_tree:add(f_password_action, buffer(4, 1), parameters:get_index(0)) + end + elseif msg_type == 0xbb then + -- Generic set command results + if t_generic_return[command] then + param_tree:add(f_set_command_result, buffer(4, 1), parameters:get_index(0)) + end + + -- Login result + if command == 0xc5 then + param_tree:add(f_login_result, buffer(4, 1), parameters:get_index(0)) + end + + -- Light State + if command == 0xe0 then + param_tree:add( + f_light_state, + buffer(4, 3), + parameters:get_index(0) == parameters:get_index(1) == parameters:get_index(2) == 0xff + ) + end + + -- Light Color + if command == 0xe1 then + param_tree:add( + f_light_color, + buffer(4, 3), + "R: " .. parameters:get_index(0) .. " G: " .. parameters:get_index(1) .. " B: " .. parameters:get_index(2) + ) + end + + -- Light mode + if command == 0xe2 then + local lm = Struct.unpack(">I3", parameters:raw()) + param_tree:add(f_light_mode, buffer(4, 3), lm) + end + + -- Response 0xe3 + -- Continuous Pilot / Night Light / Main Mode + -- Continuous Pilot: Indicates whether the continuous pilot is on or off + -- Night Light: Indicates the Night Light brightness (0/off to 6/max) + -- Main Mode: Indicates Operation Mode (0: off / 1: manual / 2: thermostat / 3: smart) + if command == 0xe3 then + local pilot_state = bit.band(bit.rshift(parameters:get_index(0), 7), 1) + local night_light = bit.band(bit.rshift(parameters:get_index(0), 4), 7) + local main_mode = bit.band(parameters:get_index(0), 7) + + param_tree:add(f_pilot_state, buffer(5, 1), pilot_state) + param_tree:add(f_night_light, buffer(5, 1), night_light) + param_tree:add(f_main_mode, buffer(5, 1), main_mode) + end + + -- Response 0xe4 + -- Split Flow/Blower Speed/Aux/Flame Height State + -- Split Flow: Indicates whether the Split Flow Valve is on or off + -- Blower Speed: Indicates the blower speed (0/off to 6/max) + -- Aux: Indicates the state of the 120V AUX relay (connector X13 on the ProFlame controller) + -- Flame Height: Indicates the Flame Height setting (0/off to 6/max) + if command == 0xe4 then + local split_flow = bit.band(bit.rshift(parameters:get_index(0), 7), 1) + local blower_speed = bit.band(bit.rshift(parameters:get_index(0), 4), 7) + local aux = bit.band(bit.rshift(parameters:get_index(0), 3), 1) + local flame_height = bit.band(parameters:get_index(0), 7) + + param_tree:add(f_split_flow, buffer(5, 1), split_flow) + param_tree:add(f_blower_speed, buffer(5, 1), blower_speed) + param_tree:add(f_aux, buffer(5, 1), aux) + param_tree:add(f_flame_height, buffer(5, 1), flame_height) + end + + -- Timer State + if command == 0xe6 then + param_tree:add(f_timer_hours, buffer(4, 1), parameters:get_index(0)) + param_tree:add(f_timer_minutes, buffer(5, 1), parameters:get_index(1)) + if parameters:len() > 3 then + param_tree:add(f_timer_seconds, buffer(7, 1), parameters:get_index(3)) + end + param_tree:add(f_timer_enabled, buffer(6, 1), parameters:get_index(2)) + end + + -- Power State + if command == 0xe7 then + param_tree:add(f_power_state, buffer(4, 1), parameters:get_index(0) == 0xff) + end + + -- Password Read + if command == 0xe8 then + param_tree:add(f_login_password, buffer(4, payload_len - 3), buffer(4, payload_len - 3):string()) + end + + -- Password Set + if command == 0xe9 then + param_tree:add(f_set_password_result, buffer(4, 1), parameters:get_index(0)) + end + + -- Time Sync + if command == 0xea then + param_tree:add(f_timer_hours, buffer(4, 1), parameters:get_index(0)) + param_tree:add(f_timer_minutes, buffer(5, 1), parameters:get_index(1)) + param_tree:add(f_timer_seconds, buffer(6, 1), parameters:get_index(2)) + end + + -- Light Mode + if command == 0xeb then + local light_state = parameters:get_index(0) == 0xff + local light_r = bit.band(parameters:get_index(1), 0xff) + local light_g = bit.band(parameters:get_index(2), 0xff) + local light_b = bit.band(parameters:get_index(3), 0xff) + param_tree:add(f_light_state, buffer(4, 1), light_state) + param_tree:add(f_light_color, buffer(5, 3), "R: " .. light_r .. " G: " .. light_g .. " B: " .. light_b) + param_tree:add(f_light_mode_short, buffer(8, 1), parameters:get_index(4)) + end + + -- Aux Control + if command == 0xee then + param_tree:add(f_aux_control, buffer(4, 1), parameters:get_index(0) == 0x00) + end + + -- BLE Version + if command == 0xf2 then + param_tree:add(f_ble_version, buffer(5, 1), parameters:get_index(1)) + end + + -- MCU Version + if command == 0xf3 then + local mcu_version = parameters:get_index(0) .. "." .. parameters:get_index(1) .. parameters:get_index(2) + param_tree:add(f_mcu_version, mcu_version) + end + end + + subtree:add(f_checksum, buffer(payload_len + 1, 1)) + local _, csum_message = checksum_is_valid(buffer) + subtree:add_proto_expert_info(x_checksum, csum_message) + subtree:add(f_footer, buffer(payload_len + 2, 1)) +end + +DissectorTable.get("btatt.handle"):add(0x0020, p_efire) +DissectorTable.get("btatt.handle"):add(0x001e, p_efire) diff --git a/dissectors/neo-p2p/LICENSE b/dissectors/neo-p2p/LICENSE new file mode 100644 index 0000000..4525f6c --- /dev/null +++ b/dissectors/neo-p2p/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 zhangtao + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/neo-p2p/README.md b/dissectors/neo-p2p/README.md new file mode 100644 index 0000000..5b5845a --- /dev/null +++ b/dissectors/neo-p2p/README.md @@ -0,0 +1,51 @@ +# NEO P2P — protocole pair-à-pair de la blockchain NEO (2.x) + +Dissecteur Wireshark Lua du protocole réseau des nœuds **NEO** dans sa +version 2.x (2018) : en-tête de message (magic MainNet / TestNet / +PrivNet, commande sur 12 octets, longueur, somme de contrôle), puis +décodage des commandes `version`, `addr`, `inv`, `getdata`, +`getheaders`, `getblocks`, `block` et `consensus` (pour les blocs : +transactions, entrées / sorties, attributs, scripts et témoins) ; les +autres commandes (`tx`, `headers`…) n'affichent que l'en-tête. Détection par +heuristique TCP sur la valeur magic, avec réassemblage TCP. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ZhangTao1596/neo-wireshark-plugin (fichier `neo.lua`) | +| Commit importé | `f24c5133d3ed5b94183c76c6cd853ae596acb2ac` du 06/12/2018 (branche `master`, dernier commit ; dernière modification du script : `e49875f` du 08/11/2018, commentaire de version « V1.1.0 2018-11-1 ») | +| Licence amont | MIT (fichier `LICENSE` amont, « Copyright (c) 2018 zhangtao », copié ici) ; le script n'a pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur NEO natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `neo.lua` | Protocole principal `NEOPROTOCOL` (heuristique TCP), protocole `NEO` (champs `neop2p.*`) et 21 sous-protocoles d'affichage | +| `LICENSE` | Licence MIT amont | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Le README amont fait charger le script par `dofile()` depuis `init.lua` ; +il suffit aujourd'hui de copier `neo.lua` dans le dossier `plugins` de +Wireshark. Filtrer avec `neo` (ou `neop2p.cmd == "block"`, par exemple). + +## Remarques + +- Format NEO 2.x ; le protocole réseau de NEO N3 (2021) est différent et + n'est pas pris en charge. +- Le script enregistre 23 protocoles, dont beaucoup aux noms génériques + (`Block`, `Transaction`, `Version`, `Headers`, `Address`, `Consensus`, + `script`…) : risque de conflit avec d'autres scripts Lua chargés en même + temps. Faute de frappe amont : `Outpus`. Quelques champs n'ont pas de préfixe + (`count`, `hashstop`). Les constantes (`M_MAINNET`, + `NET_TYPE`, `C_…`) sont globales. +- Défaut amont relevé à la lecture : `neo.dissector`, utilisé comme + dissecteur heuristique, se termine par un `return` sans valeur après + avoir décodé tous les messages d'un segment, ce qu'un heuristique peut + interpréter comme un refus. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/neo-p2p/neo.lua b/dissectors/neo-p2p/neo.lua new file mode 100644 index 0000000..cd2633a --- /dev/null +++ b/dissectors/neo-p2p/neo.lua @@ -0,0 +1,763 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/ZhangTao1596/neo-wireshark-plugin (neo.lua), +-- commit f24c5133d3ed5b94183c76c6cd853ae596acb2ac du 06/12/2018. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +--V1.1.0 2018-11-1 +do + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + M_MAINNET = 0x00746e41 + M_TESTNET = 0x74746e41 + M_PRIVNET = 0x00099e81 + + C_VERSION = "version" + C_VERSION_ACK = "verack" + C_GET_ADDR = "getaddr" + C_ADDR = "addr" + C_GET_HEADERS = "getheaders" + C_HEADERS = "headers" + C_GET_BLOCKS = "getblocks" + C_INV = "inv" + C_GET_DATA = "getdata" + C_TX = "tx" + C_BLOCK = "block" + C_CONSENSUS = "consensus" + C_MEMPOOL = "mempool" + C_FILTER_CLEAR = "filterclear" + C_FILTER_LOAD = "filterload" + C_FILTER_ADD = "filteradd" + + TX_MINER = 0x00 + TX_ISSUE = 0x01 + TX_CLAIM = 0x02 + TX_CONTRACT = 0x80 + TX_INVOCATION = 0xd1 + + ATTR_CONTRACTHASH = 0x00 + ATTR_ECDH02 = 0x02 + ATTR_ECDH03 = 0x03 + ATTR_SCRIPT = 0x20 + ATTR_VOTE = 0x30 + ATTR_CERTURL = 0x80 + ATTR_DESCRIPURL = 0x81 + ATTR_DESCRIP = 0x90 + ATTR_HASH1 = 0xa1 + ATTR_HASH15 = 0xaf + ATTR_REMARK0 = 0xf0 + ATTR_REMARK15 = 0xff + + DATA_TX = 0x01 + DATA_BLOCK = 0x02 + DATA_CONCENSUS = 0xe0 + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + NET_TYPE = { + [M_MAINNET] = "MainNet", + [M_TESTNET] = "TestNet", + [M_PRIVNET] = "PrivNet" + } + CMD_TYPE = { + [C_VERSION] = "VERSION", + [C_VERSION_ACK] = "VERACK", + [C_GET_ADDR] = "GETADR", + [C_ADDR] = "ADDR", + [C_GET_HEADERS] = "GETHEADERS", + [C_HEADERS] = "HEADERS", + [C_GET_BLOCKS] = "GETBLOCKS", + [C_INV] = "INV", + [C_GET_DATA] = "GETDATA", + [C_TX] = "TX", + [C_BLOCK] = "BLOCK", + [C_CONSENSUS] = "CONSENSUS", + [C_MEMPOOL] = "MEMPOOL", + [C_FILTER_CLEAR] = "FILTERCLEAR", + [C_FILTER_LOAD] = "FILTERLOAD", + [C_FILTER_ADD] = "FILTERADD" + } + DATA_TYPE = { + [DATA_TX] = "Txs", + [DATA_BLOCK] = "Blocks", + [DATA_CONCENSUS] = "Concensus" + } + TX_TYPE = { + [TX_MINER] = "MinerTx", + [TX_ISSUE] = "IssueTx", + [TX_CLAIM] = "ClaimTx", + [TX_CONTRACT] = "ContractTx", + [TX_INVOCATION] = "InvocationTx", + } + ATTR_USAGE_TYPE = { + [ATTR_CONTRACTHASH] = "ContractHash", + [ATTR_ECDH02] = "ECHH02", + [ATTR_ECDH03] = "ECHH03", + [ATTR_SCRIPT] = "Script", + [ATTR_VOTE] = "Vote", + [ATTR_CERTURL] = "CerUrl", + [ATTR_DESCRIPURL] = "DescriptionUrl", + [ATTR_DESCRIP] = "Description", + [ATTR_HASH1] = "Hash1", + [ATTR_HASH15] = "Hash15", + [ATTR_REMARK0] = "Remark0", + [ATTR_REMARK15] = "Remark15", + } + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local function dprint(...) + info(table.concat({"Lua: ", ...}, " ")) + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local function get_attr_type_str(type) + if ATTR_HASH1 <= type and type <= ATTR_HASH15 then + return "Hash"..tostring(type) + elseif ATTR_REMARK0 <= type and type <= ATTR_REMARK15 then + return "Remark"..tostring(type) + end + return ATTR_USAGE_TYPE[type] + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_hashes = Proto("Hashes", "hashes") + neop2p_hashes.fields.count = ProtoField.uint8("hashes.count", "COUNT", base.DEC) + neop2p_hashes.fields.hash = ProtoField.string("hashes.hash", "HASH", base.ASCII) + + local function neop2p_hashes_dissector(buffer, pinfo, tree, offset) + local count = buffer(offset, 1):le_uint() + local index = 0 + + local hashes_tree = tree:add(neop2p_hashes, buffer(offset, count * 32 + 1), "Hashes") + hashes_tree:add(neop2p_hashes.fields.count, buffer(offset, 1), count) + while (index < count) do + hashes_tree:add(neop2p_hashes.fields.hash, buffer(offset + 1 + index * 32, 32), tostring(buffer(offset + 1 + index * 32, 32))) + index = index + 1 + end + return count * 32 + 1 + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_script = Proto("script", "script") + + neop2p_script.fields.scriptlen = ProtoField.uint8("script.scriptlen", "LEN", base.DEC) + neop2p_script.fields.script = ProtoField.string("script.script", "DATA", base.ASCII) + + local function get_script_length(buffer, offset) + local slen = buffer(offset, 1):le_uint() + return slen + 1 + end + local function neop2p_script_dissector(buffer, pinfo, tree, offset, name) + local scriptlen = buffer(offset, 1):le_uint() + local script_tree = tree:add(neop2p_script, buffer(offset, scriptlen + 1), name) + + script_tree:add(neop2p_script.fields.scriptlen, buffer(offset, 1), scriptlen) + if scriptlen == 0 then + return 1 + end + script_tree:add(neop2p_script.fields.script, buffer(offset + 1, scriptlen), tostring(buffer(offset + 1, scriptlen))) + return scriptlen + 1 + end + + local neop2p_scripts = Proto("scripts", "scripts") + + neop2p_scripts.fields.count = ProtoField.uint8("scripts.count", "COUNT", base.DEC) + + local function get_scripts_length(buffer, offset) + local len = buffer:len() + local index = 0 + local loffset = 0 + local count = buffer(offset, 1):le_uint() + loffset = loffset + 1 + while (index < count) do + local result = get_script_length(buffer(offset + loffset, len - offset - loffset), offset + loffset) + loffset = loffset + result + end + return loffset + end + local function neop2p_scripts_dissector(buffer, pinfo, tree, offset) + local index = 0 + local local_offset = 0 + local count = buffer(offset, 1):le_uint() + local scripts_tree = tree:add(neop2p_scripts, buffer(offset, get_scripts_length(buffer, offset)), "SCRIPTS") + scripts_tree:add(neop2p_scripts.fields.count, buffer(offset, 1), count) + local_offset = local_offset + 1 + while (index < count) do + local result = neop2p_script_dissector(buffer, pinfo, scripts_tree, offset + 1 + index * count, "script") + local_offset = local_offset + result + index = index + 1 + end + return local_offset + end + + local neop2p_witness = Proto("NeoWitness", "Neo P2P Witness") + + local function get_witness_length(buffer, offset) + local len1 = buffer(offset, 1):le_uint() + local len2 = buffer(offset + 1 + len1, 1):le_uint() + return len1 + len2 + 2 + end + local function neop2p_witness_dissector(buffer, pinfo, tree, offset) + local loffset = 0 + local witness_tree = tree:add(neop2p_witness, buffer(offset, get_witness_length(buffer, offset)), "WITNESS") + result = neop2p_script_dissector(buffer, pinfo, witness_tree, offset, "INVOCATIONSCRIPT") + loffset = loffset + result + result = neop2p_script_dissector(buffer, pinfo, witness_tree, offset + loffset, "VERIFICATIONSCRIPT") + loffset = loffset + result + return loffset + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_coin = Proto("Coin", "coin reference") + + neop2p_coin.fields.prehash = ProtoField.string("coin.prehash", "PREHASH", base.ASCII) + neop2p_coin.fields.preindex = ProtoField.uint16("coin.preindex", "PREINDEX", base.DEC) + + local function neop2p_coin_dissector(buffer, pinfo, tree, offset) + local coin_tree = tree:add(neop2p_coin, buffer(offset, 34), "COIN") + coin_tree:add(neop2p_coin.fields.prehash, buffer(offset, 32), tostring(buffer(offset, 32))) + coin_tree:add(neop2p_coin.fields.preindex, buffer(offset + 32, 2), buffer(offset, 2):le_uint()) + return 34 + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_coins = Proto("Coins", "coin reference array") + + neop2p_coins.fields.count = ProtoField.uint8("coins.count", "COUNT", base.DEC) + + local function neop2p_coins_dissector(buffer, pinfo, tree, offset, name) + local index = 0 + local count = buffer(offset, 1):le_uint() + local coins_tree = tree:add(neop2p_coins, buffer(offset, 1 + count * 34), name) + coins_tree:add(neop2p_coins.fields.count, buffer(offset, 1), count) + while (index < count) do + local result = neop2p_coin_dissector(buffer, pinfo, coins_tree, offset + 1 + index * count) + index = index + 1 + end + return count * 34 + 1 + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_output = Proto("Output", "transaction output") + + neop2p_output.fields.assetid = ProtoField.string("output.assetid", "ASSETID", base.ASCII) + neop2p_output.fields.value = ProtoField.uint64("output.value", "VALUE", base.DEC) + neop2p_output.fields.scripthash = ProtoField.uint16("output.scripthash", "SCRIPTHASH", base.DEC) + + local function neop2p_output_dissector(buffer, pinfo, tree, offset) + local output_tree = tree:add(neop2p_coin, buffer(offset, 60), "Output") + output_tree:add(neop2p_output.fields.assetid, buffer(offset, 32), tostring(buffer(offset, 32))) + output_tree:add(neop2p_output.fields.value, buffer(offset + 32, 8), buffer(offset + 32 + 8, 8):le_uint64()) + output_tree:add(neop2p_output.fields.scripthash, buffer(offset + 40, 20), tostring(buffer(offset, 20))) + return 60 + end + + local neop2p_outputs = Proto("Outpus", "transaction outpus") + + neop2p_outputs.fields.count = ProtoField.uint8("outputs.count", "COUNT", base.DEC) + + local function neop2p_outputs_dissector(buffer, pinfo, tree, offset) + local index = 0 + local local_offset = 0 + local count = buffer(offset, 1):le_uint() + local outputs_tree = tree:add(neop2p_outputs, buffer(offset + local_offset, 1 + count * 60), "Outputs") + outputs_tree:add(neop2p_outputs.fields.count, buffer(offset + local_offset, 1), count) + local_offset = local_offset + 1 + while (index < count) do + local result = neop2p_coin_dissector(buffer, pinfo, coins_tree, offset + local_offset) + local_offset = local_offset + result + index = index + 1 + end + return local_offset + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_attr = Proto("Attribute", "transaction attribute") + + neop2p_attr.fields.usage = ProtoField.uint8("attr.usage", "USAGE", base.DEC) + neop2p_attr.fields.length = ProtoField.uint8("attr.length", "LENGTH", base.DEC) + neop2p_attr.fields.data = ProtoField.string("attr.data", "DATA", base.ASCII) + + local function get_attr_length(buffer, offset) + local usage = buffer(offset, 1):le_uint() + if usage == ATTR_CONTRACTHASH or usage == ATTR_VOTE or usage == ATTR_ECDH02 + or usage == ATTR_ECDH03 or (ATTR_HASH1 <= usage and usage <= ATTR_HASH15) then + local length = 32 + return length + 1 + end + local length = buffer(offset + 1, 1):le_uint() + return length + 2 + end + local function neop2p_attr_dissector(buffer, pinfo, tree, offset) + local usage = buffer(offset, 1):le_uint() + if usage == ATTR_CONTRACTHASH or usage == ATTR_VOTE or usage == ATTR_ECDH02 + or usage == ATTR_ECDH03 or (ATTR_HASH1 <= usage and usage <= ATTR_HASH15) then + local length = 32 + local attr_tree = tree:add(neop2p_attr, buffer(offset, 1 + length), "Attribute") + attr_tree:add(neop2p_attr.fields.usage, buffer(offset, 1), get_attr_type_str(usage)) + attr_tree:add(neop2p_attr.fields.data, buffer(offset + 1, length), tostring(buffer(offset + 1, length))) + return length + 1 + end + local length = buffer(offset + 1, 1):le_uint() + local attr_tree = tree:add(neop2p_attr, buffer(offset, 2 + length), "Attribute") + attr_tree:add(neop2p_attr.fields.usage, buffer(offset, 1), usage) + attr_tree:add(neop2p_attr.fields.length, buffer(offset + 1, 1), length) + attr_tree:add(neop2p_attr.fields.data, buffer(offset + 2, length), tostring(buffer(offset + 1, length))) + return length + 2 + end + + local neop2p_attrs = Proto("Attributes", "transaction attributes") + + neop2p_attrs.fields.count = ProtoField.uint8("attrs.count", "COUNT", base.DEC) + + local function get_attrs_length(buffer, offset) + local len = buffer:len() + local index = 0 + local loffset = 0 + local count = buffer(offset, 1):le_uint() + loffset = loffset + 1 + while (index < count) do + local result = get_attr_length(buffer(offset + loffset, len - offset - loffset), offset + loffset) + loffset = loffset + result + end + return loffset + end + local function neop2p_attrs_dissector(buffer, pinfo, tree, offset) + local index = 0 + local local_offset = 0 + local count = buffer(offset, 1):le_uint() + local attrs_tree = tree:add(neop2p_attrs, buffer(offset + local_offset, get_attrs_length(buffer, offset)), "ATTRIBUTES") + attrs_tree:add(neop2p_outputs.fields.count, buffer(offset + local_offset, 1), count) + local_offset = local_offset + 1 + while (index < count) do + local result = neop2p_attr_dissector(buffer, pinfo, attrs_tree, offset + local_offset) + local_offset = local_offset + result + index = index + 1 + end + return local_offset + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_tx = Proto("Transaction", "Neo P2P Transaction") + + neop2p_tx.fields.type = ProtoField.uint8("tx.type", "TYPE", base.DEC, TX_TYPE) + neop2p_tx.fields.version = ProtoField.uint8("tx.version", "VERSION", base.DEC) + ------exclusive + --miner + neop2p_tx.fields.nonce = ProtoField.uint32("tx.nonce", "NONCE", base.DEC) + --claims + --neop2p_tx.fields.claims = neop2p_coins + --invocation + --neop2p_tx.fields.script = neop2p_script + neop2p_tx.fields.gas = ProtoField.uint64("tx.gas", "GAS", base.DEC) + ------attributes + --neop2p_tx.fields.attributes = neop2p_attr + ------inputs + --neop2p_tx.fields.inputs = neop2p_coins + ------outpus + --neop2p_tx.fields.outputs = neop2p_outputs + neop2p_tx.fields.script = ProtoField.string("tx.script", "SCRIPT", base.ASCII) + + local function neop2p_tx_dissector(buffer, pinfo, tree) + local offset = 0 + local tx_tree = tree:add(neop2p_tx, buffer, "Tx") + local type = buffer(offset, 1):le_uint() + tx_tree:add(neop2p_tx.fields.type, buffer(offset, 1), type) + offset = offset + 1 + tx_tree:add(neop2p_tx.fields.version, buffer(offset, 1), buffer(offset, 1):le_uint()) + offset = offset + 1 + ----exclusive + if type == TX_MINER then + tx_tree:add(neop2p_tx.fields.nonce, buffer(offset, 4), buffer(offset, 4):le_uint()) + offset = offset + 4 + elseif type == TX_CLAIM then + local result = neop2p_coins_dissector(buffer, pinfo, tx_tree, offset, "CLAIMS") + offset = offset + result + elseif type == TX_INVOCATION then + local result = neop2p_script_dissector(buffer, pinfo, tx_tree, offset, "Script") + offset = offset + result + tx_tree:add(neop2p_tx.fields.gas, buffer(offset, 8), buffer(offset, 8):le_uint()) + offset = offset + 8 + end + ----attributes + local result = neop2p_attrs_dissector(buffer, pinfo, tx_tree, offset) + offset = offset + result + result = neop2p_coins_dissector(buffer, pinfo, tx_tree, offset, "INPUTS") + offset = offset + result + result = neop2p_outputs_dissector(buffer, pinfo, tx_tree, offset) + offset = offset + result + result = neop2p_scripts_dissector(buffer, pinfo, tx_tree, offset) + offset = offset + result + return offset + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_block = Proto("Block", "Neo P2P Block") + + neop2p_block.fields.version = ProtoField.uint32("block.version", "VERSION", base.DEC) + neop2p_block.fields.preblock = ProtoField.string("block.preblock", "PREBLOCK", base.ASCII) + neop2p_block.fields.merkleroot = ProtoField.string("block.merkleroot", "MERKLEROOT", base.ASCII) + neop2p_block.fields.timestamp = ProtoField.uint32("block.timestamp", "TIMESTAMP", base.DEC) + neop2p_block.fields.index = ProtoField.uint32("block.index", "INDEX", base.DEC) + neop2p_block.fields.consecsusdata = ProtoField.uint64("block.consecsusdata", "CONSECSUSDATA", base.DEC) + neop2p_block.fields.nextconsensus = ProtoField.string("block.nextconsensus", "NEXTCONSENSUS", base.ASCII) + neop2p_block.fields._ = ProtoField.uint8("block._", "_", base.DEC) + neop2p_block.fields.scriptcount = ProtoField.uint8("block.scriptcount", "scriptcount", base.DEC) + neop2p_block.fields.script = ProtoField.string("block.script", "SCRIPT", base.ASCII) + neop2p_block.fields.txs = ProtoField.string("block.txs", "TXS", base.ASCII) + neop2p_block.fields.txscount = ProtoField.uint8("block.txscount", "TXSCOUNT", base.DEC) + + local function neop2p_block_dissector(buffer, pinfo, tree) + local len = buffer:len() + local offset = 0 + + local block_tree = tree:add(neop2p_block, buffer, "Block") + + block_tree:add(neop2p_block.fields.version, buffer(offset, 4), buffer(offset, 4):le_uint()) + offset = offset + 4 + block_tree:add(neop2p_block.fields.preblock, buffer(offset, 32), tostring(buffer(offset, 32))) + offset = offset + 32 + block_tree:add(neop2p_block.fields.merkleroot, buffer(offset, 32), tostring(buffer(offset, 32))) + offset = offset + 32 + block_tree:add(neop2p_block.fields.timestamp, buffer(offset, 4), buffer(offset, 4):le_uint()) + offset = offset + 4 + block_tree:add(neop2p_block.fields.index, buffer(offset, 4), buffer(offset, 4):le_uint()) + offset = offset + 4 + block_tree:add(neop2p_block.fields.consecsusdata, buffer(offset, 8), buffer(offset, 8):le_uint64()) + offset = offset + 8 + block_tree:add(neop2p_block.fields.nextconsensus, buffer(offset, 20), tostring(buffer(offset, 20))) + offset = offset + 20 + block_tree:add(neop2p_block.fields._, buffer(offset, 1), buffer(offset, 1):le_uint()) + offset = offset + 1 + local result = neop2p_script_dissector(buffer, pinfo, block_tree, offset, "invocation") + offset = offset + result + result = neop2p_script_dissector(buffer, pinfo, block_tree, offset, "verify") + offset = offset + result + local txs_count = buffer(offset, 1):le_uint() + block_tree:add(neop2p_block.fields.txscount, buffer(offset, 1), txs_count) + offset = offset + 1 + local index = 0 + while (index < txs_count) do + local result = neop2p_tx_dissector(buffer(offset, len - offset), pinfo, block_tree) + offset = offset + result + index = index + 1 + end + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_getblocks = Proto("GetBlocks", "Neo P2P Get Blocks") + + neop2p_getblocks.fields.count = ProtoField.uint8("count", "COUNT", base.DEC) + neop2p_getblocks.fields.hash = ProtoField.string("hashstop", "HASHSTOP", base.ASCII) + + local function neop2p_getblocks_dissector(buffer, pinfo, tree) + local len = buffer:len() + local offset = 0 + local getblocks_tree = tree:add(neop2p_getblocks, buffer(0, len), "GetBlocks") + local result = neop2p_hashes_dissector(buffer, pinfo, getblocks_tree, 0) + offset = offset + result + getblocks_tree:add(neop2p_getblocks.fields.hash, buffer(offset, 32), tostring(buffer(offset, 32))) + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_headers = Proto("Headers", "Neo P2P Headers") + + neop2p_headers.fields.count = ProtoField.uint8("count", "COUNT", base.DEC) + + local function neop2p_headers_dissector(buffer, pinfo, tree) + local result = neop2p_hashes_dissector(buffer, pinfo, tree, 0) + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_getheaders = Proto("GetHeaders", "Neo P2P Get Headers") + + neop2p_getheaders.fields.count = ProtoField.uint8("count", "COUNT", base.DEC) + neop2p_getheaders.fields.hash = ProtoField.string("hashstop", "HASHSTOP", base.ASCII) + + local function neop2p_getheaders_dissector(buffer, pinfo, tree) + local len = buffer:len() + local offset = 0 + local getheaders_tree = tree:add(neop2p_getheaders, buffer(0, len), "GetHeaders") + local result = neop2p_hashes_dissector(buffer, pinfo, getheaders_tree, 0) + offset = offset + result + getheaders_tree:add(neop2p_getheaders.fields.hash, buffer(offset, 32), tostring(buffer(offset, 32))) + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_consensus = Proto("Consensus", "Neo P2P Consensus") + + neop2p_consensus.fields.version = ProtoField.uint32("consensus.version", "VERSION", base.DEC) + neop2p_consensus.fields.prehash = ProtoField.string("consensus.prehash", "PREHASH", base.ASCII) + neop2p_consensus.fields.blockindex = ProtoField.uint32("consensus.blockindex", "BLOCKINDEX", base.DEC) + neop2p_consensus.fields.validatorindex = ProtoField.uint16("consensus.validatorindex", "VALIDATORINDEX", base.DEC) + neop2p_consensus.fields.timestamp = ProtoField.uint32("consensus.timestamp", "TIMESTAMP", base.DEC) + ----data + --neop2p_consensus.fields.data = + neop2p_consensus.fields.witnesscount = ProtoField.uint8("consensus.witnesscount", "WITNESSCOUNT", base.DEC) + --neop2p_consensus.fields.invocationscript = + --neop2p_consensus.fields.verificationscript = + + local function neop2p_consensus_dissector(buffer, pinfo, tree) + local len = buffer:len() + + local con_tree = tree:add(neop2p_consensus, buffer(0, len), "Consensus") + local offset = 0 + con_tree:add(neop2p_consensus.fields.version, buffer(offset, 4), buffer(offset, 4):le_uint()) + offset = offset + 4 + con_tree:add(neop2p_consensus.fields.prehash, buffer(offset, 32), tostring(buffer(offset, 32))) + offset = offset + 32 + con_tree:add(neop2p_consensus.fields.blockindex, buffer(offset, 4), buffer(offset, 4):le_uint()) + offset = offset + 4 + con_tree:add(neop2p_consensus.fields.validatorindex, buffer(offset, 2), buffer(offset, 2):le_uint()) + offset = offset + 2 + con_tree:add(neop2p_consensus.fields.timestamp, buffer(offset, 4), buffer(offset, 4):le_uint()) + offset = offset + 4 + local result = neop2p_script_dissector(buffer, pinfo, con_tree, offset, "DATA") + offset = offset + result + local witness_count = buffer(offset, 1):le_uint() + con_tree:add(neop2p_consensus.fields.witnesscount, buffer(offset, 1), buffer(offset, 1):le_uint()) + offset = offset + 1 + local index = 0 + while (index < witness_count) do + local result = neop2p_witness_dissector(buffer, pinfo, con_tree, offset) + offset = offset + result + index = index + 1 + end + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_ver = Proto("Version", "Neo P2P Version") + + neop2p_ver.fields.version = ProtoField.uint32("version.version", "VERSION", base.DEC) + neop2p_ver.fields.services = ProtoField.uint64("version.services", "SERVICES", base.DEC) + neop2p_ver.fields.timestamp = ProtoField.uint32("version.timestamp", "TIMESTAMP", base.DEC) + neop2p_ver.fields.port = ProtoField.uint16("version.port", "PORT", base.DEC) + neop2p_ver.fields.nonce = ProtoField.uint32("version.nonce", "NONCE", base.DEC) + neop2p_ver.fields.useragent = ProtoField.string("version.useragent", "USERAGENT", base.ASCII) + neop2p_ver.fields.height = ProtoField.uint32("version.height", "HEIGHT", base.DEC) + neop2p_ver.fields.relay = ProtoField.bool("version.relay", "RELAY", base.NONE) + + local function neop2p_ver_dissector(buffer, pinfo, tree) + local L = buffer:len() + local useragent_len = L - 27 + + local ver_tree = tree:add(neop2p_ver, buffer(0, L), "Version") + local offset = 0 + ver_tree:add(neop2p_ver.fields.version, buffer(offset, 4), buffer(offset, 4):le_uint64():tonumber()) + offset = offset + 4 + ver_tree:add(neop2p_ver.fields.services, buffer(offset, 8), buffer(offset, 8):le_uint64()) + offset = offset + 8 + ver_tree:add(neop2p_ver.fields.timestamp, buffer(offset, 4), buffer(offset, 4):le_uint64():tonumber()) + offset = offset + 4 + ver_tree:add(neop2p_ver.fields.port, buffer(offset, 2), buffer(offset, 2):le_uint64():tonumber()) + offset = offset + 2 + ver_tree:add(neop2p_ver.fields.nonce, buffer(offset, 4), buffer(offset, 4):le_uint64():tonumber()) + offset = offset + 4 + ver_tree:add(neop2p_ver.fields.useragent, buffer(offset, useragent_len), buffer(offset, useragent_len):string()) + offset = offset + useragent_len + ver_tree:add(neop2p_ver.fields.height, buffer(offset, 4), buffer(offset, 4):le_uint64():tonumber()) + offset = offset + 4 + ver_tree:add(neop2p_ver.fields.relay, buffer(offset, 1), buffer(offset, 1):le_uint()) + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_getdata = Proto("GetData", "Neo P2P Get Data") + + neop2p_getdata.fields.type = ProtoField.uint8("inv.type", "TYPE", base.DEC, DATA_TYPE) + neop2p_getdata.fields.count = ProtoField.uint8("inv.count", "COUNT", base.DEC) + + local function neop2p_getdata_dissector(buffer, pinfo, tree) + local len = buffer:len() + local data_type = buffer(0, 1):uint() + local hash_count = buffer(1, 1):uint() + + local getdata_tree = tree:add(neop2p_getdata, buffer(0, len), "GetData") + getdata_tree:add(neop2p_getdata.fields.type, buffer(0, 1), buffer(0, 1):le_uint64():tonumber()) + local result = neop2p_hashes_dissector(buffer, pinfo, getdata_tree, 1) + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_addr = Proto("GetAddr", "Neo P2P Get Address") + + neop2p_addr.fields.count = ProtoField.uint8("getaddr.count", "COUNT", base.DEC) + + local neop2p_oneaddr = Proto("Address", "address") + + neop2p_oneaddr.fields.timestamp = ProtoField.uint32("addr.timestamp", "TIMESTAMP", base.DEC) + neop2p_oneaddr.fields.services = ProtoField.uint64("addr.services", "SERVICES", base.DEC) + -- addr.fields.ipv6 = ProtoField.string("addr.ipv6", "IPV6", base.DEC) + -- addr.fields.port = ProtoField.string("addr.port", "PORT", base.DEC) + neop2p_oneaddr.fields.iport = ProtoField.string("addr.iport", "IPORT", base.ASCII) + + local function neop2p_addr_dissector(buffer, pinfo, tree) + local len = buffer:len() + local addr_count = buffer(0, 1):uint() + + local addr_tree = tree:add(neop2p_addr, buffer(0, len), "GetAddress") + + addr_tree:add(neop2p_addr.fields.count, buffer(0, 1), addr_count) + + local index = 0 + while (index < addr_count) do + local addr = addr_tree:add(neop2p_oneaddr, buffer(1 + index * 30, 30), "Address") + addr:add(neop2p_oneaddr.fields.timestamp, buffer(1 + index * 30, 4), buffer(1 + index * 30, 4):le_uint64():tonumber()) + addr:add(neop2p_oneaddr.fields.services, buffer(1 + index * 30, 8), buffer(1 + index * 30, 8):le_uint64()) + addr:add(neop2p_oneaddr.fields.iport, buffer(1 + index * 30, 18), tostring(buffer(1 + index * 30, 18))) + index = index + 1 + end + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p_inv = Proto("InvData", "Neo P2P Version Data") + + neop2p_inv.fields.type = ProtoField.uint8("inv.type", "TYPE", base.DEC, DATA_TYPE) + neop2p_inv.fields.count = ProtoField.uint8("inv.count", "COUNT", base.DEC) + + local function neop2p_inv_dissector(buffer, pinfo, tree) + local len = buffer:len() + local inv_type = buffer(0, 1):uint() + local hash_count = buffer(1, 1):uint() + + local inv_tree = tree:add(neop2p_inv, buffer(0, len), "InvData") + inv_tree:add(neop2p_inv.fields.type, buffer(0, 1), buffer(0, 1):le_uint64():tonumber()) + local result = neop2p_hashes_dissector(buffer, pinfo, inv_tree, 1) + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neop2p = Proto("NEO", "Neo P2P Protocol") + + neop2p.fields.magic = ProtoField.uint32("neop2p.magic", "MAGIC", base.DEC, NET_TYPE) + neop2p.fields.cmd = ProtoField.string("neop2p.cmd", "COMMAND", base.UNICODE) + neop2p.fields.length = ProtoField.uint32("neop2p.length", "LENGTH", base.DEC) + neop2p.fields.checksum = ProtoField.uint32("neop2p.checksum", "CHECKSUM", base.DEC) + neop2p.fields.payload = ProtoField.string("neop2p.payload", "PAYLOAD", base.ASCII) + + local function neop2p_dissector(buffer, pinfo, tree) + local L = buffer:len() + local magic = buffer(0, 4):le_uint() + local cmd = buffer(4, 12):stringz() + local length = buffer(16, 4):le_uint() + + local p2p_tree = tree:add(neop2p, buffer(0, L), "Neo P2P Protocol, "..NET_TYPE[magic]) + pinfo.cols.protocol:set("NEO") + pinfo.cols.info:set(" ".. NET_TYPE[magic]..":"..cmd) + + local offset = 0 + + p2p_tree:add(neop2p.fields.magic, buffer(offset, 4), buffer(offset, 4):le_uint64():tonumber()) + offset = offset + 4 + p2p_tree:add(neop2p.fields.cmd, buffer(offset, 12), buffer(offset, 12):string()) + offset = offset + 12 + p2p_tree:add(neop2p.fields.length, buffer(offset, 4), buffer(offset, 4):le_uint64():tonumber()) + offset = offset + 4 + p2p_tree:add(neop2p.fields.checksum, buffer(offset, 4), buffer(offset, 4):le_uint64():tonumber()) + offset = offset + 4 + if length == 0 then + return true + end + local payload = buffer(offset, length) + if cmd == C_INV then + neop2p_inv_dissector(payload, pinfo, p2p_tree) + return true + end + if cmd == C_ADDR then + neop2p_addr_dissector(payload, pinfo, p2p_tree) + return true + end + if cmd == C_GET_DATA then + neop2p_getdata_dissector(payload, pinfo, p2p_tree) + return true + end + if cmd == C_VERSION then + neop2p_ver_dissector(payload, pinfo, p2p_tree) + return true + end + if cmd == C_GET_HEADERS then + neop2p_getheaders_dissector(payload, pinfo, p2p_tree) + return true + end + if cmd == C_BLOCK then + neop2p_block_dissector(payload, pinfo, p2p_tree) + return true + end + if cmd == C_GET_BLOCKS then + neop2p_getblocks_dissector(payload, pinfo, p2p_tree) + return + end + if cmd == C_CONSENSUS then + neop2p_consensus_dissector(payload, pinfo, p2p_tree) + return + end + p2p_tree:add(neop2p.fields.payload, payload, tostring(payload)) + offset = offset + length + return true + end + + local function neop2p_detector(buffer, pinfo, tree, offset) + local len = buffer:len() - offset + if len < 4 then + return 0 + end + local magic = buffer(offset, 4):le_uint() + if NET_TYPE[magic] == nil then + return 0 + end + if len < 24 then + return len - 24 + end + local length = buffer(offset + 16, 4):le_uint() + 24 + local cmd = buffer(offset + 4, 12):stringz() + if len < length then + return len - length + end + neop2p_dissector(buffer(offset, length), pinfo, tree) + return length + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + local neo = Proto("NEOPROTOCOL", "Neo Protocol") + + function neo.dissector(buffer, pinfo, tree) + local len = buffer:len() + local offset = 0 + + while offset < len do + + local result = neop2p_detector(buffer, pinfo, tree, offset) + + if 0 < result then + offset = offset + result + elseif 0 == result then + return 0 + else + pinfo.desegment_offset = offset + result = -result + pinfo.desegment_len = result + return len + end + end + return + end + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + --------------------------------------------------------------------------------------------------- + neo:register_heuristic("tcp", neo.dissector) + end \ No newline at end of file diff --git a/dissectors/niagara-fox/LICENSE b/dissectors/niagara-fox/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/niagara-fox/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/niagara-fox/README.md b/dissectors/niagara-fox/README.md new file mode 100644 index 0000000..02ead39 --- /dev/null +++ b/dissectors/niagara-fox/README.md @@ -0,0 +1,46 @@ +# Niagara Fox (automatisation des bâtiments) + +Dissecteur Wireshark Lua du **protocole Fox** de Tridium, protocole +textuel utilisé par les équipements et stations **Niagara Framework** +(gestion technique de bâtiments) pour communiquer, généralement sur TCP +1911 (et 4911 en TLS) : séquence magique `fox `, type de trame +(asynchrone, synchrone, keep-alive, réponse, erreur), numéros de +requête et contenu textuel structuré (messages, clés / valeurs). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/MartinoTommasini/foxdissector | +| Commit importé | `2d04b9173dadbc32ba14412e253868da8e957477` du 02/07/2021 (branche `main`, dernier commit) | +| Licence amont | GPL-3.0-only (`LICENSE` amont : texte de la GPL v3, sans mention « or any later version » ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Fox / Niagara dans la branche `release-4.6` des sources Wireshark | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `fox.lua` | Dissecteur `fox` (heuristique TCP + entrée « Décoder comme ») | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `fox.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer +`wireshark -X lua_script:fox.lua capture.pcap`, puis filtrer avec `fox`. +Le dissecteur heuristique reconnaît les flux TCP commençant par `fox ` ; +sinon, utiliser « Décoder comme… » sur le port concerné. + +## Remarques + +- Pas de port fixe : la table `tcp.port` reçoit l'entrée 0 (pour « Décoder + comme ») et la détection se fait par heuristique. +- Le trafic Fox chiffré (foxs, TLS) n'est lisible qu'après déchiffrement + TLS dans Wireshark. +- Variable globale `fox` (objet `Proto`) comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/niagara-fox/fox.lua b/dissectors/niagara-fox/fox.lua new file mode 100644 index 0000000..e42c1d6 --- /dev/null +++ b/dissectors/niagara-fox/fox.lua @@ -0,0 +1,426 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/MartinoTommasini/foxdissector (fox.lua), +-- commit 2d04b9173dadbc32ba14412e253868da8e957477 du 02/07/2021. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- Fox Niagara protocol dissector + +-- Declare our protocol +fox = Proto("fox", "Niagara Fox") + +-- Constants +-- +-- Fox packets start with "fox " +local magic_sequence_len = 4 + +-- Lookup table for fox frame types +local frameTypes = { + a = "Asynchronous", + s = "Synchronous", + k = "Keep-alive", + r = "Reply", + e = "Error", + n = "F_NULL", + ['?'] = "Unknown" +} + +function parse_blob(offset, buffer, tree, key, value_rel_offset) + -- get size of blob + local _, _end, size = buffer(offset + value_rel_offset):string():find("([%d]+)%[") + + if not size then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Couln't find number of bytes in blob data") + return + end + + -- + 1 for the ] + local key_tree = tree:add_le(fox, buffer(offset, value_rel_offset + _end + size + 1), key..": ") + + if size == "3" then + key_tree:append_text("empty") + else + local value = buffer(offset + value_rel_offset + _end, size):string() + key_tree:append_text("[Content-Length] "..size.." bytes") + key_tree:add_le(fox, buffer(offset, value_rel_offset + _end + size + 1), value) + end + -- +1 for ']' + return _end + size + 1 +end + +function parse_float(offset, buffer, tree, key, value_rel_offset) + local _, _end, value = buffer(offset + value_rel_offset):string():find("([%d%.]+)") -- TODO: test this regex + + if not value then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Couldn't find float value") + return + end + + tree:add_le(fox, buffer(offset, value_rel_offset + _end), key .. ":", value) + + return #value +end + + +function parse_int(offset, buffer, tree, key, value_rel_offset) + local _, _end, value = buffer(offset + value_rel_offset):string():find("([%d]+)") + + if not value then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Couldn't find int value") + return + end + + tree:add_le(fox, buffer(offset, value_rel_offset + _end), key .. ":", value) + + return #value +end + +function parse_message(offset, buffer, tree, key, value_rel_offset) + -- get all message data (take everything between curly brackets) + local relOffset = offset + value_rel_offset + local start_index, end_index, message = buffer(relOffset):string():find("{\n(.-)}\n") + local value + + -- eat { and \n + relOffset = relOffset + 2 -- offset is passed by value to this function + + -- message format not correct + if not message then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Couldn't find the message data") + return + end + + local message_tree = tree:add_le(fox, buffer(offset), key..":", " [Fox message]") + + if message:len() < 1 then + -- message empty + message_tree:append_text(" empty") + else + -- same logic of fox_parse_payload(). We don't reuse it to have more flexibility and readability. + while true do + local str_buf = buffer(relOffset):string() + + -- exit if buffer starts with terminator sequence + if str_buf:sub(0,2) == "}\n" then + break + end + + -- parse tuple key and data type + local _, _end, key, t = str_buf:find("([%S][%S]-)=([%l][%l]-):") + if not key or not t then + message_tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": tuple not correct") + return + end + + -- get appropriate parser + local do_parse = get_parser[t] + if not do_parse then + message_tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Unknown data type encountered ("..t.."). Parser not available for this data type") + return + end + -- parse tuple value + local bytes_parsed = do_parse(relOffset, buffer, message_tree, key, _end) + + if not bytes_parsed then + message_tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": A problem occurred when parsing the Fox payload") + return + end + + -- +1 for newline + relOffset = relOffset + _end + bytes_parsed + 1 + + -- Offset is expected to include the newline after each tuple + end + + end + + -- -1 to excude newline + message_tree:set_len(value_rel_offset + end_index - 1) + + -- -1 to exlude newline + return end_index - 1 + +end + +function parse_object(offset, buffer, tree, key, value_rel_offset) + -- get type and size of object + local _, _end, type, size = buffer(offset + value_rel_offset):string():find("([%S]+)%s([%d]+)%[") + + if not type then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Couln't find type in object data") + return + end + + if not size then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Couln't find number of bytes in object data") + return + end + + -- + 1 for the ] + local key_tree = tree:add_le(fox, buffer(offset, value_rel_offset + _end + size + 1), key..": ") + + local value = buffer(offset + value_rel_offset + _end, size):string() + + key_tree:append_text("[Object-Type] "..type..", ".."[Content-Length] "..size.." bytes") + key_tree:add_le(fox, buffer(offset, value_rel_offset + _end + size + 1), value) + + -- +1 for ']' + return _end + size + 1 +end + +function parse_string(offset, buffer, tree, key, value_rel_offset) + local _, _end, value = buffer(offset + value_rel_offset):string():find("([%C%:]*)") + + if not value then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Couldn't find string value") + return + end + + tree:add_le(fox, buffer(offset, value_rel_offset + _end), key .. ":", value) + + return #value +end + +function parse_time(offset, buffer, tree, key, value_rel_offset) + local _, _end, value = buffer(offset + value_rel_offset):string():find("([%x]+)") + + if not value then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Couldn't find time value") + return + end + + local seconds = tonumber(value,16) / 1000 + + local label + if seconds < 31557600 then + -- if year is 1970, value is likely a time duration (e.g. session stuff) + label = "[HH:MM:SS] "..seconds_to_time(seconds) + else + -- year is not 1970, value is likely a timestamp + label = "[Timestamp] "..seconds_to_timestamp(seconds).." UTC" + end + + tree:add_le(fox, buffer(offset, value_rel_offset + _end), key .. ": ", label) + + return #value +end + +function parse_bool(offset, buffer, tree, key, value_rel_offset) + local _, _end, value = buffer(offset + value_rel_offset):string():find("([tf])") + + if not value then + tree:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Boolean value is neither t (true) or f (false)") + return + end + + local label + if value == "t" then + label="true" + else + label="false" + end + + tree:add_le(fox, buffer(offset, value_rel_offset + _end), key .. ":", label) + + return 1 +end + + +-- +-- Returns the suitable parser +-- depending on the data type +-- +-- Parameters of the parsers: (offset in buffer, buffer, parent tree, tuple key, offset of tuple value with respect to the beginning of tuple) +-- Return value of the parsers: (number of bytes parsed) +-- +get_parser = +{ + ["b"] = parse_blob, + ["f"] = parse_float, + ["i"] = parse_int, + ["m"] = parse_message, + ["o"] = parse_object, + ["s"] = parse_string, + ["t"] = parse_time, + ["z"] = parse_bool, +} + + +function seconds_to_timestamp(epoch) + return os.date("!%Y-%m-%d %X", epoch) +end + +function seconds_to_time(epoch) + return os.date("!%X", epoch) +end + +-- Heuristic function +local function heur_dissect_fox(buffer, pinfo, tree) + if buffer:len() < magic_sequence_len then + print("Header to short to be fox") + return false + end + + -- Check if the command starts with "fox " + if buffer(0, magic_sequence_len):string() ~= "fox " then + print("Header Doesn't start w/ fox") + return false + end + print("All good, moving to dissector") + + -- Looks like it's ours, so go dissect it + fox.dissector(buffer, pinfo, tree) + + -- Since this is over a transport protocol, such as TCP, we can set the + -- conversation to make it sticky for our dissector, so that all future + -- packets to/from the same address:port pair will just call our dissector + -- function directly instead of this heuristic function. + pinfo.conversation = fox + + return true +end + +-- Dissection functions +function fox.dissector(buffer, pinfo, tree) + local offset = 0 + local buff_len = buffer:len() + + + -- Handle multiple PDUs in one TCP segment + while offset < buff_len do + + -- Handle TCP defragmentation here + -- + -- If we don't find the terminator '\n};;\n' ('0A7D3B3B0A'), then we accumulate the next packet. + local str_buf = buffer:bytes(offset):tohex() + local len_exc, len_inc = str_buf:find("0A7D3B3B0A") + if not len_inc then + pinfo.desegment_offset = offset + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return + end + + -- At this point we have a full PDU in buffer + + pinfo.cols.protocol = "Niagara Fox" + local pdu = tree:add_le(fox, buffer(offset), "Niagara Fox") + local len_pdu = dissect_pdu(buffer(offset), pinfo, pdu) + + pdu:set_len(len_pdu) + + offset = offset + len_pdu + end +end + +function dissect_pdu(buffer, pinfo, pdu) + local offset = 0 + local str = buffer(offset):string() + local _, _,first_line = str:find("([^\n]+)") + + -- parse header + offset = offset + fox_parse_header(offset, buffer, first_line, pdu, pinfo) + + -- Add two bytes to the offset to eat "{\n" + offset = offset + 2 + + -- parse fox payload + local len_payload = fox_parse_payload(offset, buffer, pdu) + if not len_payload then + return + end + + -- Add payload length + offset = offset + len_payload + + -- Add terminator sequence + offset = offset + 4 + + return offset +end + + +function fox_parse_header(offset, buffer, line, parent,pinfo) + local header = parent:add_le(fox, buffer(offset, offset + #line), "Header") + + -- Skip "fox " + local relOffset = offset + 4 + + -- e.g. "fox a -1 1 crypto keystore.getCertificates" + _, _, ft, seq, reply, channel, command = + line:find("^fox (%w) (-?%d+) (-?%d+) (%C+) (%C+)$") + + header:add_le(fox, buffer(relOffset, 1), "Frame type:", frameTypes[ft]) + relOffset = relOffset + 2 + header:add_le(fox, buffer(relOffset, #seq), "Sequence number:", seq) + relOffset = relOffset + #seq + 1 + header:add_le(fox, buffer(relOffset, #reply), "Reply number:", reply) + relOffset = relOffset + #reply + 1 + header:add_le(fox, buffer(relOffset, #channel), "Channel:", channel) + relOffset = relOffset + #channel + 1 + header:add_le(fox, buffer(relOffset, #command), "Command:", command) + + -- Display channel and command in the packet information + pinfo.cols.info = channel.." command: "..command + + -- + 1 to account for the line break + return #line + 1 +end + + + +function fox_parse_payload(offset, buffer, parent) + local start_offset = offset + local data = parent:add_le(fox, buffer(offset), "Data segment") + + + while true do + local str_buf = buffer(offset):string() + + -- exit if we find the terminator + if str_buf:sub(0,4) == "};;\n" then + -- If data segment is empty + if offset == start_offset then data:append_text(": empty") end + + break + end + + -- parse tuple key and data type + -- + -- ([%S][%S]-) because we want to match the shortest possible sequence. + local _, _end, key, t = str_buf:find("([%S][%S]-)=([%l][%l]-):") + if not key or not t then + data:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing the payload data: format of data not correct. It should be (key=datatype:value)") + return + end + + -- get appropriate parser + local do_parse = get_parser[t] + if not do_parse then + data:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Unknown data type encountered ("..t.."). Parser not available for this data type") + return + end + -- parse tuple value + local bytes_parsed = do_parse(offset, buffer, data, key, _end) + + if not bytes_parsed then + data:add_expert_info(PI_MALFORMED,PI_ERROR, "Error while parsing "..key..": Problem occurred when parsing the Fox payload") + return + end + + -- +1 for newline + offset = offset + _end + bytes_parsed + 1 + + -- Offset is expected to include the newline after each tuple + end + + data:set_len(offset-start_offset) + + return offset +end + + +-- Register our protocol with no specific port for TCP and UDP so it appears on the "Decode As..." menu +tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(0, fox) + +-- Now register that heuristic dissector into the TCP heuristic list +fox:register_heuristic("tcp", heur_dissect_fox) + diff --git a/dissectors/nng-sp/LICENSE b/dissectors/nng-sp/LICENSE new file mode 100644 index 0000000..5248f50 --- /dev/null +++ b/dissectors/nng-sp/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Felix Obenhuber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/nng-sp/README.md b/dissectors/nng-sp/README.md new file mode 100644 index 0000000..5922e17 --- /dev/null +++ b/dissectors/nng-sp/README.md @@ -0,0 +1,51 @@ +# NNG — protocoles SP (nanomsg next-generation) + +Dissecteur Wireshark Lua des **protocoles de scalabilité (SP)** de +[NNG](https://nng.nanomsg.org/) (nanomsg next-generation), bibliothèque +de messagerie distribuée : + +- transport **TCP** : poignée de main de 8 octets (`\0SP\0` + identifiant + de protocole) puis trames préfixées par une longueur de 8 octets, avec + réassemblage et plusieurs PDU par segment ; +- transport **UDP** expérimental : en-tête de 8 octets (version, opcode + DATA / CREQ / CACK / DISC / MESH, type, paramètres) ; +- en-têtes SP selon le protocole : PAIR v0/v1 (nombre de sauts), + PUB/SUB, REQ/REP et SURVEYOR/RESPONDENT (pile de retour / backtrace), + PUSH/PULL, BUS. + +Détection heuristique sur TCP (poignée de main) et UDP, sans port fixe. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/flxo/nng-wireshark-dissector (fichier `nng.lua`) | +| Commit importé | `ca594eb9113100b39ca8502748b8d95be0babe1a` du 07/04/2026 (branche `main`, dernier commit, qui est aussi la dernière modification de `nng.lua`) | +| Licence amont | MIT (fichier `LICENSE`, « Copyright (c) 2026 Felix Obenhuber », copié ici) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur NNG / nanomsg natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `nng.lua` | Protocole `nng`, heuristiques TCP et UDP | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `nng.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `nng`. + +## Remarques + +- TCP : la détection repose sur la poignée de main ; une capture commencée + après l'établissement de la connexion ne sera pas reconnue (pas de port + par défaut — utiliser « Décoder comme… »). +- Seuls les transports TCP et UDP sont couverts (pas IPC, WebSocket ni TLS). +- Utilise `bit.band` (bibliothèque `bit` fournie par Wireshark 4.4 et + plus). Sur une version plus ancienne qui ne fournit que `bit32`, + ajouter `bit = bit32` en tête du script. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/nng-sp/nng.lua b/dissectors/nng-sp/nng.lua new file mode 100644 index 0000000..35e7a76 --- /dev/null +++ b/dissectors/nng-sp/nng.lua @@ -0,0 +1,520 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/flxo/nng-wireshark-dissector (nng.lua), +-- commit ca594eb9113100b39ca8502748b8d95be0babe1a du 07/04/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- NNG (nanomsg next-generation) SP protocol dissector for Wireshark +-- Covers the TCP and UDP transport wire protocols as defined in: +-- https://github.com/nanomsg/nng +-- +-- TCP wire format: +-- Handshake (8 bytes each direction): +-- [0x00] ['S'] ['P'] [0x00] [proto_hi] [proto_lo] [0x00] [0x00] +-- Data frames: +-- [8-byte big-endian length] [SP header] [body] +-- length = header_len + body_len +-- +-- UDP wire format (experimental transport): +-- All packets have an 8-byte header (little-endian): +-- [ver: u8 = 0x01] [opcode: u8] [type: u16 LE] [params: 2x u16 LE] +-- Opcodes: +-- 0 = DATA params[0] = payload length +-- 1 = CREQ params[0] = recvmax, params[1] = refresh (seconds) +-- 2 = CACK params[0] = recvmax, params[1] = refresh (seconds) +-- 3 = DISC params[0] = reason +-- 4 = MESH +-- DATA payload: [SP header][body] (same SP header format as TCP) +-- +-- SP header format per protocol (precedes body in payload): +-- REQ (0x30): [request_id: u32, high bit set] +-- REP (0x31): [hop0: u32]...[request_id: u32, high bit set] +-- SURVEYOR (0x62): [survey_id: u32, high bit set] +-- RESPONDENT (0x63): [hop0: u32]...[survey_id: u32, high bit set] +-- PAIR1 (0x11): [hop_count: u32] +-- PAIR0/BUS/PUB/SUB/PUSH/PULL: (empty) +-- +-- Protocol IDs use NNI_PROTO(major, minor) = major * 16 + minor + +local nng = Proto("nng", "NNG SP Protocol") + +-- --------------------------------------------------------------------------- +-- Protocol ID table +-- --------------------------------------------------------------------------- +local proto_names = { + [0x10] = "pair v0", + [0x11] = "pair v1", + [0x20] = "pub v0", + [0x21] = "sub v0", + [0x30] = "req v0", + [0x31] = "rep v0", + [0x50] = "push v0", + [0x51] = "pull v0", + [0x62] = "surveyor v0", + [0x63] = "respondent v0", + [0x70] = "bus v0", +} + +-- UDP opcodes +local UDP_OPCODE_DATA = 0 +local UDP_OPCODE_CREQ = 1 +local UDP_OPCODE_CACK = 2 +local UDP_OPCODE_DISC = 3 +local UDP_OPCODE_MESH = 4 + +local udp_opcode_names = { + [UDP_OPCODE_DATA] = "DATA", + [UDP_OPCODE_CREQ] = "CREQ", + [UDP_OPCODE_CACK] = "CACK", + [UDP_OPCODE_DISC] = "DISC", + [UDP_OPCODE_MESH] = "MESH", +} + +local udp_disc_reasons = { + [0] = "Closed", + [1] = "Bad SP type", + [3] = "Refused", + [4] = "Message too large", + [5] = "Negotiation failed", + [6] = "Inactive", + [7] = "Protocol error", + [8] = "Resources exhausted", +} + +-- Header type per protocol +local HEADER_BACKTRACE = 1 -- REQ/REP, SURVEY/RESPONDENT +local HEADER_HOP_COUNT = 2 -- PAIR1 + +local header_type = { + [0x30] = HEADER_BACKTRACE, -- req + [0x31] = HEADER_BACKTRACE, -- rep + [0x62] = HEADER_BACKTRACE, -- surveyor + [0x63] = HEADER_BACKTRACE, -- respondent + [0x11] = HEADER_HOP_COUNT, -- pair v1 +} + +-- Whether a backtrace protocol uses "Survey ID" vs "Request ID" +local is_survey = { + [0x62] = true, + [0x63] = true, +} + +-- --------------------------------------------------------------------------- +-- Header fields +-- --------------------------------------------------------------------------- +local f_hs_magic = ProtoField.bytes("nng.hs.magic", "Magic", base.SPACE) +local f_hs_proto = ProtoField.uint16("nng.hs.proto", "Protocol ID", base.HEX, proto_names) +local f_hs_rsvd = ProtoField.uint16("nng.hs.rsvd", "Reserved", base.HEX) + +local f_msg_len = ProtoField.uint64("nng.msg.len", "Message Length", base.DEC) +local f_msg_data = ProtoField.bytes("nng.msg.data", "Message Data", base.SPACE) + +-- Backtrace fields (REQ/REP, SURVEY/RESPONDENT) +local f_bt_hop = ProtoField.uint32("nng.hdr.hop", "Backtrace Hop", base.HEX) +local f_req_id = ProtoField.uint32("nng.hdr.reqid", "Request ID", base.HEX) +local f_surv_id = ProtoField.uint32("nng.hdr.survid", "Survey ID", base.HEX) + +-- PAIR1 hop count +local f_hop_count = ProtoField.uint32("nng.hdr.hopcount", "Hop Count", base.DEC) + +local f_body = ProtoField.bytes("nng.msg.body", "Body", base.SPACE) + +-- UDP transport fields +local f_udp_ver = ProtoField.uint8("nng.udp.ver", "Version", base.DEC) +local f_udp_opcode = ProtoField.uint8("nng.udp.opcode", "Opcode", base.DEC, udp_opcode_names) +local f_udp_type = ProtoField.uint16("nng.udp.type", "Protocol ID", base.HEX, proto_names) +local f_udp_length = ProtoField.uint16("nng.udp.length", "Payload Length", base.DEC) +local f_udp_recvmax = ProtoField.uint16("nng.udp.recvmax", "Recv Max", base.DEC) +local f_udp_refresh = ProtoField.uint16("nng.udp.refresh", "Refresh (s)", base.DEC) +local f_udp_reason = ProtoField.uint16("nng.udp.reason", "Reason", base.DEC, udp_disc_reasons) +local f_udp_rsvd = ProtoField.uint16("nng.udp.rsvd", "Reserved", base.HEX) + +nng.fields = { + f_hs_magic, f_hs_proto, f_hs_rsvd, + f_msg_len, f_msg_data, + f_bt_hop, f_req_id, f_surv_id, + f_hop_count, f_body, + f_udp_ver, f_udp_opcode, f_udp_type, + f_udp_length, f_udp_recvmax, f_udp_refresh, f_udp_reason, f_udp_rsvd, +} + +-- --------------------------------------------------------------------------- +-- Per-connection state tracking +-- --------------------------------------------------------------------------- +-- We track the handshake protocol ID per direction so we can label data +-- frames with their protocol later. +-- TCP: key = tcp.stream .. "-" .. srcport +-- UDP: key = src .. ":" .. srcport .. "-" .. dst .. ":" .. dstport + +local stream_proto = {} -- stream_key -> protocol id seen in handshake + +function nng.init() + stream_proto = {} +end + +local function stream_key(pinfo) + local tcp_stream = pinfo.private["tcp.stream"] + if tcp_stream then + return tostring(tcp_stream) .. "-" .. tostring(pinfo.src_port) + end + -- UDP: use full address/port tuple + return tostring(pinfo.src) .. ":" .. tostring(pinfo.src_port) + .. "-" .. tostring(pinfo.dst) .. ":" .. tostring(pinfo.dst_port) +end + +local function peer_key(pinfo) + local tcp_stream = pinfo.private["tcp.stream"] + if tcp_stream then + return tostring(tcp_stream) .. "-" .. tostring(pinfo.dst_port) + end + -- UDP: reverse direction + return tostring(pinfo.dst) .. ":" .. tostring(pinfo.dst_port) + .. "-" .. tostring(pinfo.src) .. ":" .. tostring(pinfo.src_port) +end + +-- --------------------------------------------------------------------------- +-- Heuristic: detect NNG handshake +-- --------------------------------------------------------------------------- +local function is_handshake(tvb, offset) + if tvb:len() - offset < 8 then return false end + return tvb(offset, 1):uint() == 0x00 + and tvb(offset + 1, 1):uint() == 0x53 -- 'S' + and tvb(offset + 2, 1):uint() == 0x50 -- 'P' + and tvb(offset + 3, 1):uint() == 0x00 + and tvb(offset + 6, 1):uint() == 0x00 + and tvb(offset + 7, 1):uint() == 0x00 +end + +-- --------------------------------------------------------------------------- +-- Dissect a single handshake (8 bytes) +-- --------------------------------------------------------------------------- +local function dissect_handshake(tvb, pinfo, tree, offset) + local subtree = tree:add(nng, tvb(offset, 8), "NNG Handshake") + subtree:add(f_hs_magic, tvb(offset, 4)) + subtree:add(f_hs_proto, tvb(offset + 4, 2)) + subtree:add(f_hs_rsvd, tvb(offset + 6, 2)) + + local proto_id = tvb(offset + 4, 2):uint() + local name = proto_names[proto_id] or string.format("unknown (0x%04x)", proto_id) + + pinfo.cols.protocol:set("NNG") + pinfo.cols.info:set("Handshake [" .. name .. "]") + + -- Remember what protocol this side speaks + stream_proto[stream_key(pinfo)] = proto_id + + return offset + 8 +end + +-- --------------------------------------------------------------------------- +-- Dissect backtrace header (REQ/REP, SURVEY/RESPONDENT) +-- +-- On the wire the SP header is a sequence of big-endian u32 values. +-- Intermediate hops have the high bit clear; the final entry (the +-- request / survey ID) has the high bit set (0x80000000). +-- --------------------------------------------------------------------------- +local function dissect_backtrace(tvb, offset, msg_end, hdr_tree, proto_id) + local survey = is_survey[proto_id] + local id_field = survey and f_surv_id or f_req_id + local id_label = survey and "Survey ID" or "Request ID" + local hdr_start = offset + local hops = 0 + + while offset + 4 <= msg_end do + local val = tvb(offset, 4):uint() + local is_last = bit.band(val, 0x80000000) ~= 0 + + if is_last then + local masked = bit.band(val, 0x7FFFFFFF) + local item = hdr_tree:add(id_field, tvb(offset, 4)) + item:append_text(string.format(" (0x%08x, seq %u)", val, masked)) + offset = offset + 4 + hops = hops + 1 + break + else + hdr_tree:add(f_bt_hop, tvb(offset, 4)) + offset = offset + 4 + hops = hops + 1 + end + end + + local hdr_len = offset - hdr_start + hdr_tree:set_len(hdr_len) + + return offset, hops, id_label +end + +-- --------------------------------------------------------------------------- +-- Dissect PAIR1 hop count header +-- --------------------------------------------------------------------------- +local function dissect_hop_count(tvb, offset, msg_end, hdr_tree) + if offset + 4 > msg_end then + return offset + end + + hdr_tree:add(f_hop_count, tvb(offset, 4)) + offset = offset + 4 + + hdr_tree:set_len(4) + return offset +end + +-- --------------------------------------------------------------------------- +-- Shared SP payload dissection (used by both TCP and UDP paths) +-- --------------------------------------------------------------------------- +local function dissect_sp_payload(tvb, pinfo, subtree, payload_offset, payload_len, proto_id, name) + local msg_end = payload_offset + payload_len + local htype = proto_id and header_type[proto_id] + + if htype == HEADER_BACKTRACE and payload_len >= 4 then + local hdr_tree = subtree:add(nng, tvb(payload_offset, 0), "SP Header") + local body_start, hops, id_label = dissect_backtrace( + tvb, payload_offset, msg_end, hdr_tree, proto_id) + local body_len = msg_end - body_start + + if body_len > 0 then + subtree:add(f_body, tvb(body_start, body_len)) + end + + if hops > 1 then + pinfo.cols.info:set(string.format("Data [%s] %s + %d hops, %d bytes", + name or "?", id_label, hops - 1, body_len)) + else + pinfo.cols.info:set(string.format("Data [%s] %s, %d bytes", + name or "?", id_label, body_len)) + end + + elseif htype == HEADER_HOP_COUNT and payload_len >= 4 then + local hdr_tree = subtree:add(nng, tvb(payload_offset, 0), "SP Header") + local body_start = dissect_hop_count(tvb, payload_offset, msg_end, hdr_tree) + local body_len = msg_end - body_start + local hop_val = tvb(payload_offset, 4):uint() + + if body_len > 0 then + subtree:add(f_body, tvb(body_start, body_len)) + end + + pinfo.cols.info:set(string.format("Data [%s] hops=%d, %d bytes", + name or "pair v1", hop_val, body_len)) + + else + subtree:add(f_msg_data, tvb(payload_offset, payload_len)) + pinfo.cols.info:set(string.format("Data%s %d bytes", + name and (" [" .. name .. "]") or "", payload_len)) + end +end + +-- --------------------------------------------------------------------------- +-- UDP transport dissector +-- --------------------------------------------------------------------------- +-- Detect NNG UDP header: version 1, valid opcode, known protocol ID +local function is_udp_nng(tvb, offset) + if tvb:len() - offset < 8 then return false end + if tvb(offset, 1):uint() ~= 0x01 then return false end + local opcode = tvb(offset + 1, 1):uint() + if opcode > UDP_OPCODE_MESH then return false end + local proto_id = tvb(offset + 2, 2):le_uint() + if not proto_names[proto_id] then return false end + -- For DATA packets, verify payload length fits the datagram + if opcode == UDP_OPCODE_DATA then + local payload_len = tvb(offset + 4, 2):le_uint() + if payload_len > tvb:len() - offset - 8 then return false end + end + return true +end + +local function dissect_udp_nng(tvb, pinfo, tree) + local len = tvb:len() + if len < 8 then return 0 end + + local opcode = tvb(1, 1):uint() + local proto_id = tvb(2, 2):le_uint() + local name = proto_names[proto_id] or string.format("unknown (0x%04x)", proto_id) + local op_name = udp_opcode_names[opcode] or "?" + + pinfo.cols.protocol:set("NNG") + + if opcode == UDP_OPCODE_CREQ or opcode == UDP_OPCODE_CACK then + local subtree = tree:add(nng, tvb(0, 8), "NNG " .. op_name) + subtree:add(f_udp_ver, tvb(0, 1)) + subtree:add(f_udp_opcode, tvb(1, 1)) + subtree:add_le(f_udp_type, tvb(2, 2)) + subtree:add_le(f_udp_recvmax, tvb(4, 2)) + subtree:add_le(f_udp_refresh, tvb(6, 2)) + + local recvmax = tvb(4, 2):le_uint() + local refresh = tvb(6, 2):le_uint() + pinfo.cols.info:set(string.format("%s [%s] recvmax=%d refresh=%ds", + op_name, name, recvmax, refresh)) + + -- Track protocol for this direction + stream_proto[stream_key(pinfo)] = proto_id + return len + + elseif opcode == UDP_OPCODE_DISC then + local subtree = tree:add(nng, tvb(0, 8), "NNG DISC") + subtree:add(f_udp_ver, tvb(0, 1)) + subtree:add(f_udp_opcode, tvb(1, 1)) + subtree:add_le(f_udp_type, tvb(2, 2)) + subtree:add_le(f_udp_reason, tvb(4, 2)) + subtree:add_le(f_udp_rsvd, tvb(6, 2)) + + local reason_id = tvb(4, 2):le_uint() + local reason = udp_disc_reasons[reason_id] + or string.format("unknown (%d)", reason_id) + pinfo.cols.info:set(string.format("DISC [%s] %s", name, reason)) + return len + + elseif opcode == UDP_OPCODE_DATA then + local payload_len = tvb(4, 2):le_uint() + local payload_offset = 8 + + local subtree = tree:add(nng, tvb(0, payload_offset + payload_len), "NNG Data") + subtree:add(f_udp_ver, tvb(0, 1)) + subtree:add(f_udp_opcode, tvb(1, 1)) + subtree:add_le(f_udp_type, tvb(2, 2)) + subtree:add_le(f_udp_length, tvb(4, 2)) + + if payload_len == 0 then + pinfo.cols.info:set(string.format("Data [%s] (empty)", name)) + return len + end + + dissect_sp_payload(tvb, pinfo, subtree, payload_offset, payload_len, proto_id, name) + return len + + else + -- MESH or unknown opcode — show raw + local subtree = tree:add(nng, tvb(0, len), "NNG " .. op_name) + subtree:add(f_udp_ver, tvb(0, 1)) + subtree:add(f_udp_opcode, tvb(1, 1)) + subtree:add_le(f_udp_type, tvb(2, 2)) + if len > 8 then + subtree:add(f_msg_data, tvb(8, len - 8)) + end + pinfo.cols.info:set(string.format("%s [%s]", op_name, name)) + return len + end +end + +-- --------------------------------------------------------------------------- +-- Dissect a single TCP data message: 8-byte length + payload +-- Returns new offset, or negative value = bytes still needed +-- --------------------------------------------------------------------------- +local function dissect_message(tvb, pinfo, tree, offset) + local remaining = tvb:len() - offset + + -- Need at least the 8-byte length header + if remaining < 8 then + return -(8 - remaining) + end + + local msg_len = tvb(offset, 8):uint64():tonumber() + + -- Sanity guard: reject absurdly large lengths (> 256 MB) to avoid + -- misidentifying random TCP traffic as NNG. + if msg_len > 268435456 then + return nil -- not NNG + end + + local total = 8 + msg_len + if remaining < total then + -- We have the header but not the full payload yet; ask for reassembly + return -(total - remaining) + end + + pinfo.cols.protocol:set("NNG") + + -- Determine the protocol for this connection direction + local proto_id = stream_proto[stream_key(pinfo)] + or stream_proto[peer_key(pinfo)] + local name = proto_id and proto_names[proto_id] or nil + + local subtree = tree:add(nng, tvb(offset, total), "NNG Message") + subtree:add(f_msg_len, tvb(offset, 8)) + + if msg_len == 0 then + pinfo.cols.info:set(string.format("Data%s (empty)", + name and (" [" .. name .. "]") or "")) + return offset + total + end + + local payload_offset = offset + 8 + dissect_sp_payload(tvb, pinfo, subtree, payload_offset, msg_len, proto_id, name) + + return offset + total +end + +-- --------------------------------------------------------------------------- +-- Main dissector entry point +-- --------------------------------------------------------------------------- +function nng.dissector(tvb, pinfo, tree) + local is_tcp = pinfo.private["tcp.stream"] ~= nil + + -- UDP transport uses a different wire format + if not is_tcp then + if is_udp_nng(tvb, 0) then + return dissect_udp_nng(tvb, pinfo, tree) + end + return 0 + end + + -- TCP transport: handshakes + length-prefixed data frames + local offset = 0 + local pdu_count = 0 + + while offset < tvb:len() do + -- Try handshake first + if is_handshake(tvb, offset) then + offset = dissect_handshake(tvb, pinfo, tree, offset) + pdu_count = pdu_count + 1 + else + local result = dissect_message(tvb, pinfo, tree, offset) + if result == nil then + -- Not NNG data + return 0 + elseif result < 0 then + -- Need more bytes for reassembly + pinfo.desegment_len = -result + pinfo.desegment_offset = offset + return + else + offset = result + pdu_count = pdu_count + 1 + end + end + end + + if pdu_count > 1 then + pinfo.cols.info:append(string.format(" (+%d PDUs)", pdu_count - 1)) + end + + return offset +end + +-- --------------------------------------------------------------------------- +-- Heuristic dissectors +-- --------------------------------------------------------------------------- +local function tcp_heuristic_checker(tvb, pinfo, tree) + if tvb:len() < 8 then + return false + end + if not is_handshake(tvb, 0) then + return false + end + + nng.dissector(tvb, pinfo, tree) + pinfo.conversation = nng + return true +end + +local function udp_heuristic_checker(tvb, pinfo, tree) + if not is_udp_nng(tvb, 0) then + return false + end + + dissect_udp_nng(tvb, pinfo, tree) + pinfo.conversation = nng + return true +end + +nng:register_heuristic("tcp", tcp_heuristic_checker) +nng:register_heuristic("udp", udp_heuristic_checker) diff --git a/dissectors/noise-ik-mesh/README.md b/dissectors/noise-ik-mesh/README.md new file mode 100644 index 0000000..e9dc532 --- /dev/null +++ b/dissectors/noise-ik-mesh/README.md @@ -0,0 +1,53 @@ +# Noise IK Mesh — poignée de main Noise_IK_25519_ChaChaPoly_BLAKE2b + +Dissecteur Wireshark Lua du **protocole de transport « Noise Mesh »** du +projet bivex/Noise_IK_25519_ChaChaPoly_BLAKE2b (bibliothèque C de +sessions chiffrées pour réseau maillé d'objets connectés, fondée sur le +cadre Noise, motif IK, X25519, ChaCha20-Poly1305, BLAKE2b) : préfixe de +longueur sur 2 octets avec réassemblage TCP, puis identification du +message **d'après sa longueur** — initiation de la poignée de main +(96 octets : clé éphémère, clé statique chiffrée, étiquette Poly1305), +réponse (48), finalisation (45), réponse de transport (44) ou données +chiffrées — et sens client → serveur / serveur → client d'après les +ports. Ports TCP 7000 et 8000. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/bivex/Noise_IK_25519_ChaChaPoly_BLAKE2b (dossier `wireshark/`) | +| Commit importé | `44cf04b0d7e9ada98f24f40304fea001e75c79be` du 24/02/2026 (branche `main`, dernier commit, qui est aussi la dernière modification de `wireshark/noise_ik.lua`) | +| Licence amont | MIT — déclarée par l'auteur dans le README racine (« MIT License - See LICENSE file for details ») ; le fichier `LICENSE` annoncé est absent du dépôt et le script n'a pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non pour ce format ; WireGuard (natif `wg`) utilise aussi Noise IK, mais avec un autre format de trames | + +L'amont ne fournit pas de texte de licence : texte de référence de la +licence MIT : https://spdx.org/licenses/MIT.html — à reproduire avec la +mention « Copyright (c) bivex » (titulaire du dépôt) en cas de +redistribution. Même situation que `dissectors/pqkem-coap/` (#184). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `noise_ik.lua` | Protocole `noise_ik` sur TCP 7000 et 8000 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Non importés : la bibliothèque C, les +tests et le script `test_dissector.sh` (lance serveur, client et +capture du projet). + +## Utilisation + +Copier `noise_ik.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer +`tshark -r capture.pcap -X lua_script:noise_ik.lua -Y noise_ik`. +Champs filtrables : `noise_ik.msg_type`, `noise_ik.length`, +`noise_ik.direction`… + +## Remarques + +- La classification des messages repose uniquement sur leur longueur : + des données de transport de 96, 48 ou 45 octets seront prises pour des + messages de poignée de main. Aucun déchiffrement. +- Le sens est déduit de la comparaison des ports source et destination. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/noise-ik-mesh/noise_ik.lua b/dissectors/noise-ik-mesh/noise_ik.lua new file mode 100644 index 0000000..cebaae6 --- /dev/null +++ b/dissectors/noise-ik-mesh/noise_ik.lua @@ -0,0 +1,135 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/bivex/Noise_IK_25519_ChaChaPoly_BLAKE2b (wireshark/noise_ik.lua), +-- commit 44cf04b0d7e9ada98f24f40304fea001e75c79be du 24/02/2026. +-- Licence amont : MIT — voir README.md. +-- noise_ik.lua - Wireshark dissector for Noise_IK_25519_ChaChaPoly_BLAKE2b +-- Place in: ~/.local/lib/wireshark/plugins/ (Linux) +-- ~/Library/Application Support/Wireshark/Plugins/ (macOS) +-- %APPDATA%\Wireshark\plugins\ (Windows) + +-- Create the protocol +local noise_ik_proto = Proto("noise_ik", "Noise IK Protocol") + +-- Protocol fields +local f_length = ProtoField.uint16("noise_ik.length", "Message Length", base.DEC) +local f_msg_type = ProtoField.uint8("noise_ik.msg_type", "Message Type", base.DEC) +local f_direction = ProtoField.string("noise_ik.direction", "Direction", base.ASCII) + +-- Handshake fields +local f_e_pub = ProtoField.bytes("noise_ik.e_pub", "Ephemeral Public Key", base.SPACE) +local f_s_enc = ProtoField.bytes("noise_ik.s_enc", "Encrypted Static Key", base.SPACE) +local f_auth_tag = ProtoField.bytes("noise_ik.auth_tag", "Poly1305 Auth Tag", base.SPACE) + +-- Transport fields +local f_encrypted = ProtoField.bytes("noise_ik.encrypted", "Encrypted Payload", base.SPACE) + +noise_ik_proto.fields = { + f_length, f_msg_type, f_direction, + f_e_pub, f_s_enc, f_auth_tag, f_encrypted +} + +-- Message structure constants +local EPHEMERAL_KEY_LEN = 32 +local AUTH_TAG_LEN = 16 + +-- Desegment data to get complete messages +noise_ik_proto.dissector = function(buffer, pinfo, tree) + local len = buffer:len() + + -- Need at least 2 bytes for length prefix + if len < 2 then + -- Ask for more data + pinfo.desegment_offset = 0 + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return + end + + -- Read length prefix (big-endian) + local msg_len = buffer(0, 2):uint() + + -- Sanity check + if msg_len < 32 or msg_len > 65535 then + return 0 + end + + -- Check if we have the complete message + local total_len = 2 + msg_len + if len < total_len then + -- Need more data - request desegmentation + pinfo.desegment_offset = 0 + pinfo.desegment_len = total_len - len + return + end + + -- Determine message type + local msg_type = 0 + local msg_type_name = "Unknown" + local direction = pinfo.src_port > pinfo.dst_port and "C→S" or "S→C" + + if msg_len == 96 then + msg_type = 1 + msg_type_name = "Handshake Init: e, s" + elseif msg_len == 48 then + msg_type = 2 + msg_type_name = "Handshake Response: e, ee, se" + elseif msg_len == 45 then + msg_type = 3 + msg_type_name = "Handshake Final: s, es + Data" + elseif msg_len == 44 then + msg_type = 4 + msg_type_name = "Transport Response" + else + msg_type = 5 + msg_type_name = "Transport Data" + end + + -- Create tree + local subtree = tree:add(noise_ik_proto, buffer(0, total_len), + "Noise IK Protocol, " .. direction .. ", " .. msg_type_name) + + subtree:add(f_length, buffer(0, 2)) + subtree:add(f_msg_type, msg_type) + subtree:add(f_direction, direction) + + -- Parse payload + local payload = buffer(2, msg_len) + local offset = 0 + + if msg_type == 1 then + -- Initiator: e (32) + encrypted s + auth tag + if msg_len >= EPHEMERAL_KEY_LEN then + subtree:add(f_e_pub, payload(0, EPHEMERAL_KEY_LEN)) + offset = EPHEMERAL_KEY_LEN + end + if msg_len >= offset + AUTH_TAG_LEN then + subtree:add(f_auth_tag, payload(msg_len - AUTH_TAG_LEN, AUTH_TAG_LEN)) + subtree:add(f_s_enc, payload(offset, msg_len - offset - AUTH_TAG_LEN)) + end + + elseif msg_type == 2 then + -- Responder: e (32) + auth tag + if msg_len >= EPHEMERAL_KEY_LEN then + subtree:add(f_e_pub, payload(0, EPHEMERAL_KEY_LEN)) + end + if msg_len >= EPHEMERAL_KEY_LEN + AUTH_TAG_LEN then + subtree:add(f_auth_tag, payload(EPHEMERAL_KEY_LEN, AUTH_TAG_LEN)) + end + + else + -- Transport: encrypted data + auth tag + if msg_len >= AUTH_TAG_LEN then + subtree:add(f_auth_tag, payload(msg_len - AUTH_TAG_LEN, AUTH_TAG_LEN)) + subtree:add(f_encrypted, payload(0, msg_len - AUTH_TAG_LEN)) + end + end + + pinfo.cols.protocol = "NOISE-IK" + pinfo.cols.info = direction .. " " .. msg_type_name + + return total_len +end + +-- Register as a data dissector for TCP +local tcp_dissector_table = DissectorTable.get("tcp.port") +tcp_dissector_table:add(8000, noise_ik_proto) +tcp_dissector_table:add(7000, noise_ik_proto) diff --git a/dissectors/oase-fm-master/LICENSE b/dissectors/oase-fm-master/LICENSE new file mode 100644 index 0000000..f198e05 --- /dev/null +++ b/dissectors/oase-fm-master/LICENSE @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2022, wwwenca +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dissectors/oase-fm-master/README.md b/dissectors/oase-fm-master/README.md new file mode 100644 index 0000000..947e9e9 --- /dev/null +++ b/dissectors/oase-fm-master/README.md @@ -0,0 +1,48 @@ +# Oase FM Master — prises pilotées de bassin et jardin + +Dissecteur Wireshark Lua du **protocole UDP des contrôleurs Oase FM +Master** (prises commandées pour pompes, éclairages et variateur de +bassin) : chaîne magique `\#OA`, longueur des données, numéro de +séquence, sens (vers le contrôleur `0x00` / depuis le contrôleur `0xff`), +code de commande, données brutes, et décodage des commandes `0xc4` +(pilotage d'une prise : index et intensité / marche-arrêt) et `0xc5` +(état des cinq sorties). Port UDP 5959. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/wwwenca/oase-wireshark | +| Commit importé | `3f06e536b9c84a07b54d48f03f021476adf8b5e6` du 04/04/2022 (branche `main`, dernier commit ; dernière modification de `oase.lua` : `9f4eac3` du 04/04/2022) | +| Licence amont | BSD-2-Clause (`LICENSE` amont, © 2022 wwwenca) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Oase natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `oase.lua` | Protocole `oase` sur UDP 5959 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `oase.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `oase`. Champs filtrables : `oase.command`, +`oase.direction`, `oase.sequence`… + +## Remarques + +- Le champ `oase.details` (`generated_details`) n'est **pas déclaré** + dans `proto_oase.fields` ; les Wireshark récents refusent l'ajout d'un + champ non enregistré, ce qui peut produire une erreur Lua dans l'arbre + pour les commandes `0xc4` / `0xc5`. Contournement local : ajouter + `generated_details` à la liste `proto_oase.fields` (code amont non + modifié ici). +- Le README amont décrit le format des trames (rétro-ingénierie). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/oase-fm-master/oase.lua b/dissectors/oase-fm-master/oase.lua new file mode 100644 index 0000000..f0707d9 --- /dev/null +++ b/dissectors/oase-fm-master/oase.lua @@ -0,0 +1,81 @@ +-- SPDX-License-Identifier: BSD-2-Clause +-- Importé de https://github.com/wwwenca/oase-wireshark (oase.lua), +-- commit 3f06e536b9c84a07b54d48f03f021476adf8b5e6 du 04/04/2022. +-- Licence amont : BSD-2-Clause (LICENSE amont) — voir README.md. +local proto_oase = Proto.new("oase", "Oase Protocol") + +local field_direction = ProtoField.uint8("oase.direction", "Direction", base.HEX) +local field_command = ProtoField.uint8("oase.command", "Command", base.HEX) +local field_raw = ProtoField.bytes("oase.raw", "Raw Data", base.HEX) +local field_len = ProtoField.uint16("oase.len", "Data Length", base.DEC) +local field_seq = ProtoField.uint16("oase.sequence", "Sequence", base.DEC) + +generated_command_name = ProtoField.string("oase.command_name", "Command Name") +generated_details = ProtoField.string("oase.details", "Command Details") + +proto_oase.fields = { + field_direction, + field_command, + generated_command_name, + field_raw, + field_len, + field_seq +} + +function proto_oase.dissector(buffer, pinfo, tree) + if buffer(0,4):bytes():tohex() ~= "5C234F41" then return end + pinfo.cols.protocol = "Oase" + local payload_tree = tree:add(proto_oase, buffer() ) + local data_len = buffer(4,2):le_uint() + local seq = buffer(9,1):le_uint() + local dir = buffer(10,1) + payload_tree:add(field_direction, dir) + local command_buffer = buffer(11,1) + payload_tree:add(field_command, command_buffer) + payload_tree:add(field_len, data_len) + payload_tree:add(field_seq, seq) + + local data_start = 16 + local data_buffer = buffer(data_start, data_len) + payload_tree:add(field_raw, data_buffer) + + + local command_table = {} + command_table[0xc4] = command_c4 + command_table[0xc5] = command_c5 + + local command_code = command_buffer:uint() + local command_string = "" + local command_function = command_table[command_code] + if command_function ~= nil then + command_string = command_function(data_buffer, payload_tree, dir) + end + payload_tree:add(generated_command_name, command_string):set_generated() +end + +function command_c4(buffer, payload_tree, dir) + if dir:uint() == 0x00 then + local control = buffer(11,1):uint() + local intensity = buffer(12,1):uint() + payload_tree:add(generated_details, "Control: " .. control .. "; Intensity: " .. intensity):set_generated() + else + local status = buffer(0,1):uint() + payload_tree:add(generated_details, "Status: " .. status):set_generated() + end + return "Control" +end + +function command_c5(buffer, payload_tree, dir) + if dir:uint() == 0x00 then + else + local control1 = buffer(11,1):uint() + local control2 = buffer(12,1):uint() + local control3 = buffer(13,1):uint() + local control4 = buffer(14,1):uint() + local control5 = buffer(15,1):uint() + payload_tree:add(generated_details, "Control1: " .. control1 .. "; Control2: " .. control2 .. "; Control3: " .. control3 .. "; Control4: " .. control4 .. "; Control5: " .. control5):set_generated() + end + return "Control Status" +end + +udp_table = DissectorTable.get("udp.port"):add(5959, proto_oase) diff --git a/dissectors/octopus-iproto/LICENSE b/dissectors/octopus-iproto/LICENSE new file mode 100644 index 0000000..28b164d --- /dev/null +++ b/dissectors/octopus-iproto/LICENSE @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2016 Mail.RU + * Copyright (C) 2010-2021 Yury Vostrikov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ diff --git a/dissectors/octopus-iproto/README.md b/dissectors/octopus-iproto/README.md new file mode 100644 index 0000000..a886244 --- /dev/null +++ b/dissectors/octopus-iproto/README.md @@ -0,0 +1,51 @@ +# Octopus — protocoles iProto et Silverbox (« box ») + +Dissecteur Wireshark Lua des protocoles binaires d'**Octopus**, serveur de +stockage en mémoire (lignée Silverbox / Tarantool 1.x, Mail.Ru) : + +- `iproto` : en-tête iProto de 12 octets petit-boutiste (type de message, + longueur, *sync*), plusieurs messages par segment, réassemblage TCP, + distinction requête / réponse / ping (`0xff00`) selon le port ; +- `silverbox` : commandes du module « box » dans les requêtes — insertion, + sélection, suppression, mise à jour de champs — avec espace d'objets, + drapeaux, tuples et champs (longueurs varint), et réponses (code et + message d'erreur, tuples retournés). + +Ports TCP 33013 et 3313. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/delamonpansie/octopus (fichier `extra/wireshark/iproto.lua`) | +| Commit importé | `0e08b2a5b50da8d234b1f825be329072615e0697` du 13/03/2021 (branche `master`, dernier commit ; dernière modification de `iproto.lua` : `53e008e` du 22/08/2014) | +| Licence amont | BSD-2-Clause (fichier `LICENSE` : « Copyright (C) 2010-2016 Mail.RU, Copyright (C) 2010-2021 Yury Vostrikov », deux clauses ; GitHub indique `NOASSERTION`) ; copié ici, le script n'a pas d'en-tête | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur iProto / Tarantool natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `iproto.lua` | Protocoles `iproto` et `silverbox`, TCP 33013 et 3313 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `iproto.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `iproto`. + +## Remarques + +- Ancien protocole iProto binaire d'Octopus / Tarantool 1.5, distinct du + protocole MessagePack de Tarantool 1.6 et plus (voir aussi + https://github.com/mikhainin/tarantool-dissector, autre implémentation). +- Le sens requête / réponse est déduit des ports 33013 / 3313 ; sur un + autre port (« Décoder comme… »), les commandes box ne sont pas détaillées. +- `box_insert` est défini deux fois dans l'amont (la seconde définition + l'emporte). Utilise `bit.bor` / `bit.lshift` / `bit.band` (bibliothèque + `bit` fournie par Wireshark 4.4 et plus) ; sur une version plus ancienne + qui ne fournit que `bit32`, ajouter `bit = bit32` en tête du script. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/octopus-iproto/iproto.lua b/dissectors/octopus-iproto/iproto.lua new file mode 100644 index 0000000..02cb973 --- /dev/null +++ b/dissectors/octopus-iproto/iproto.lua @@ -0,0 +1,261 @@ +-- SPDX-License-Identifier: BSD-2-Clause +-- Importé de https://github.com/delamonpansie/octopus (extra/wireshark/iproto.lua), +-- commit 0e08b2a5b50da8d234b1f825be329072615e0697 du 13/03/2021. +-- Licence amont : BSD-2-Clause (LICENSE amont) — voir README.md. +local dport, sport = Field.new('tcp.dstport'), Field.new('tcp.srcport') + +local iproto = Proto("iproto","IProto") +local iproto_msg = ProtoField.uint32("iproto.msg", "Message") +local iproto_len = ProtoField.uint32("iproto.len", "Length") +local iproto_sync = ProtoField.uint32("iproto.sync", "Sync") +local iproto_data = ProtoField.bytes("iproto.data", "Data") +local iproto_errcode = ProtoField.uint32("iproto.err_code", "ErrCode", base.HEX) +local iproto_errmsg = ProtoField.string("iproto.err_msg", "ErrMessage") +iproto.fields = {iproto_msg, iproto_len, iproto_sync, iproto_data, + iproto_errcode, iproto_errmsg} + +local iproto_port +local iproto_data_dissector +function iproto.dissector(buf, pinfo, tree) + if buf:len() < 12 then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return + end + + local offt = 0 + while true do + local header = buf:range(offt, 12) + local msg = header:range(0, 4):le_uint() + local data_len = header:range(4, 4):le_uint() + local packet_len = 12 + data_len + if packet_len > 4 * 1024 * 1024 then + -- header looks like a garbage + return + end + if buf:len() < packet_len then + pinfo.desegment_len = packet_len - buf:len() + pinfo.desegment_offset = offt + return + end + local packet = buf:range(offt, packet_len) -- header & packet overlaps + + pinfo.cols.protocol = iproto.name + + local typ + if msg == 0xff00 then + typ = "IProto ping" + elseif iproto_port[tostring(sport())] then + typ = "IProto reply" + elseif iproto_port[tostring(dport())] then + typ = "IProto request" + else + typ = "IProto packet" + end + local subtree_packet = tree:add(iproto, packet, typ) + local subtree_header = subtree_packet:add(header, "Header") + + subtree_header:add_le(iproto_msg, header:range(0, 4)) + subtree_header:add_le(iproto_len, header:range(4, 4)) + subtree_header:add_le(iproto_sync, header:range(8, 4)) + + if data_len > 0 then + local subtree_data = subtree_packet:add(iproto_data, packet:range(12, data_len)) + + if iproto_data_dissector then + local command = packet:range(12, data_len) + iproto_data_dissector(msg, command, subtree_data) + end + end + + if buf:len() == offt + packet_len then + return + end + offt = offt + packet_len + end +end + + +local box = Proto("silverbox","Silverbox") +local box_objspace = ProtoField.uint32("silverbox.obj_space", "ObjectSpace") +local box_index = ProtoField.uint32("silverbox.index", "Index") +local box_offset = ProtoField.int32("silverbox.offset", "Offset") +local box_limit = ProtoField.int32("silverbox.limit", "Limit") +local box_flags = ProtoField.uint32("silverbox.flags", "Flags") +local box_count = ProtoField.uint32("silverbox.count", "Count") +local box_tuple = ProtoField.bytes("silverbox.tuple", "Tuple", base.HEX) +local box_tuple_cardinality = ProtoField.int32("silverbox.tuple.cardinality", "Cardinality") +local box_tuple_blen = ProtoField.int32("silverbox.tuple.blen", "Len") +local box_tuple_field = ProtoField.bytes("silverbox.tuple.field", "Field") +local box_tuple_field_len = ProtoField.int32("silverbox.tuple.field.len", "Len") +local box_tuple_field_data = ProtoField.string("silverbox.tuple.field.data", "Data") +local box_tuple_field_datau32 = ProtoField.int32("silverbox.tuple.field.datau32", "Data") + +box.fields = {box_objspace, box_index, box_offset, box_limit, box_flags, box_count, + box_tuple, box_tuple_cardinality, box_tuple_blen, + box_tuple_field, box_tuple_field_len, + box_tuple_field_data, box_tuple_field_datau32} + +local function box_insert(buf, tree) + tree:add_le(box_objspace, buf:range(0, 4)) +end + +local function varint(buf, offt) + local r = 0 + for i = 0, 4 do + local b = buf:range(offt + i, 1):uint() + r = bit.bor(bit.lshift(r, 7), bit.band(b, 0x7f)) + if b < 0x80 then + return i + 1, r + end + end +end + +local function field_dissect(buf, offt, vlen, blen, tree) + local field = tree:add(box_tuple_field, buf:range(offt, vlen + blen)) + field:add(box_tuple_field_len, buf:range(offt, vlen), blen) + if blen == 4 then + field:add_le(box_tuple_field_datau32, buf:range(offt + vlen, blen)) + elseif blen > 0 then + field:add(box_tuple_field_data, buf:range(offt + vlen, blen)) + end +end + +local function tuple_dissect(buf, tree, hasblen) + local offt, blen, cardinality + if hasblen then + blen = buf:range(0, 4) + cardinality = buf:range(4, 4) + offt = 8 + else + cardinality = buf:range(0, 4) + offt = 4 + end + local fields = {} + + for i = 1, cardinality:le_uint() do + local vlen, blen = varint(buf, offt) + table.insert(fields, {offt, vlen, blen}) + offt = offt + vlen + blen + end + + tree = tree:add(box_tuple, buf:range(0, offt), "Tuple") + if blen then + tree:add_le(box_tuple_blen, blen) + end + tree:add_le(box_tuple_cardinality, cardinality) + for _, v in ipairs(fields) do + local offt, vlen, blen = unpack(v) + field_dissect(buf, offt, vlen, blen, tree) + end + + if buf:len() == offt then + return offt + else + return offt, buf:range(offt) + end +end + + +local function box_select(buf, tree) + tree = tree:add(buf, "BOX_SELECT") + + tree:add_le(box_objspace, buf:range(0, 4)) + tree:add_le(box_index, buf:range(4, 4)) + tree:add_le(box_offset, buf:range(8, 4)) + tree:add_le(box_limit, buf:range(12, 4)) + local key_count = buf:range(16, 4) + local key_tree = tree:add(key_count, "Keys: " .. key_count:le_uint()) + buf = buf:range(20) + for i = 1, key_count:le_uint() do + _, buf = tuple_dissect(buf, key_tree) + end +end + +local function box_insert(buf, tree) + tree = tree:add(buf, "BOX_INSERT") + tree:add_le(box_objspace, buf:range(0, 4)) + tree:add_le(box_flags, buf:range(4, 4)) + tuple_dissect(buf:range(8), tree) +end + +local function box_delete(buf, tree) + tree = tree:add(buf, "BOX_DELETE") + tree:add_le(box_objspace, buf:range(0, 4)) + tuple_dissect(buf:range(4), tree) +end + +local op_decode = {[0] = "set", [1] = "add", [2] = "and", + [3] = "or", [4] = "xor", [5] = "splice", + [6] = "delete", [7] = "insert"} + +local function box_update_fields(buf, tree) + tree = tree:add(buf, "BOX_UPDATE_FIELDS") + tree:add_le(box_objspace, buf:range(0, 4)) + tree:add_le(box_flags, buf:range(4, 4)) + _, buf = tuple_dissect(buf:range(8), tree:add("Key")) + + local op_count = buf:range(0, 4) + tree = tree:add(op_count, "Ops: " .. op_count:le_uint()) + buf = buf:range(4) + for i = op_count:le_uint(),1,-1 do + local op_tree = tree:add("Op") + op_tree:add_le(buf:range(0, 4), "Idx: " .. buf:range(0, 4):le_uint()) + local op_txt = op_decode[buf:range(4, 1):le_uint()] + op_tree:add_le(buf:range(4, 1), "Op:" .. op_txt) + local vlen, blen = 0, 0 + vlen, blen = varint(buf, 5) + field_dissect(buf, 5, vlen, blen, op_tree) + if i > 1 then + buf = buf:range(5 + vlen + blen) + end + end +end + +local box_op = { + [13] = box_insert, + [17] = box_select, + [19] = box_update_fields, + [20] = box_delete +} + +local function box_reply(buf, tree) + tree:add_le(iproto_errcode, buf:range(0, 4)) + local ret_code = buf:range(0, 4):le_uint() + if ret_code > 0 then + tree:add(iproto_errmsg, buf:range(4)) + else + tree:add_le(box_count, buf:range(4, 4)) + local count = buf:range(4, 4):le_uint() + if buf:len() == 8 then + return + else + buf = buf:range(8) + end + for i = 1, count do + _, buf = tuple_dissect(buf, tree, true) + if not buf then + return + end + end + end +end + +local function box_dissector(cmd, buf, tree) + if iproto_port[tostring(dport())] then + if box_op[cmd] then + box_op[cmd](buf, tree) + end + elseif iproto_port[tostring(sport())] then + box_reply(buf, tree) + else + tree:add("unknow port") + end +end + +iproto_data_dissector = box_dissector +iproto_port = { ["33013"] = 1, ["3313"] = 1} + +local tcp_table = DissectorTable.get("tcp.port") +for k, _ in pairs(iproto_port) do + tcp_table:add(tonumber(k), iproto) +end diff --git a/dissectors/oicq-enhanced/LICENSE b/dissectors/oicq-enhanced/LICENSE new file mode 100644 index 0000000..2db3590 --- /dev/null +++ b/dissectors/oicq-enhanced/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 JackZ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/oicq-enhanced/README.md b/dissectors/oicq-enhanced/README.md new file mode 100644 index 0000000..a18f216 --- /dev/null +++ b/dissectors/oicq-enhanced/README.md @@ -0,0 +1,42 @@ +# OICQ amélioré — messagerie instantanée QQ (ancien protocole UDP) + +Dissecteur Wireshark Lua de l'ancien protocole **OICQ** (QQ, messagerie +instantanée de Tencent) sur UDP 8000. Il vérifie les marqueurs de début +(`0x02`) et de fin (`0x03`), puis affiche drapeau, version, commande +(avec une liste d'environ 35 noms : connexion, messages, amis, groupes, +statut…), numéro de séquence, numéro QQ et bloc de données ; sinon il +passe la main au dissecteur `data`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/z-jack/wireshark-lua-plugins (fichier `oicq_enhanced.lua`) | +| Commit importé | `6b685ef6c4fb461997ac2b973b1ab665df1a8214` du 24/06/2018 (branche `master`, dernier commit) | +| Licence amont | MIT (fichier `LICENSE`, « Copyright (c) 2018 JackZ », copié ici) | +| Natif Wireshark 4.6.4 | Oui — dissecteur natif `oicq` sur UDP 8000 | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `oicq_enhanced.lua` | Protocole `qplus` (colonne « OICQ »), UDP 8000 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `oicq_enhanced.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `qplus`. Champs : `OICQ.Flag`, `OICQ.Command`, `OICQ.QID`… + +## Remarques + +- **Doublon du dissecteur natif `oicq`** : le script remplace celui-ci + sur le port UDP 8000 (`DissectorTable:set`) ; son apport est la liste + des noms de commandes. Les champs (`OICQ.*`, majuscules) sont distincts + des champs natifs `oicq.*`. +- Protocole historique : le contenu des données (chiffré) n'est pas + décodé. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/oicq-enhanced/oicq_enhanced.lua b/dissectors/oicq-enhanced/oicq_enhanced.lua new file mode 100644 index 0000000..13e0db8 --- /dev/null +++ b/dissectors/oicq-enhanced/oicq_enhanced.lua @@ -0,0 +1,180 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/z-jack/wireshark-lua-plugins (oicq_enhanced.lua), +-- commit 6b685ef6c4fb461997ac2b973b1ab665df1a8214 du 24/06/2018. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +do + --[[ + + Proto.new(name, desc) + + name: displayed in the column of “Protocol” in the packet list + + desc: displayed as the dissection tree root in the packet details + + --]] + local PROTO_OICQ = Proto("QPlus", "OICQ Protocol(Enhanced) - IM software, popular in China") + + --[[ + + ProtoField: + + to be used when adding items to the dissection tree + + --]] + local hf_oicq_flg = ProtoField.uint8("OICQ.Flag", "Flag", base.HEX) + + local hf_oicq_version = ProtoField.uint16("OICQ.Version", "Version", base.HEX) + + local hf_oicq_command = ProtoField.string("OICQ.Command", "Command") + + local hf_oicq_seq = ProtoField.uint16("OICQ.Seq", "Sequence", base.DEC) + + local hf_oicq_qqid = ProtoField.uint32("OICQ.QID", "OICQ Number", base.DEC) + + local hf_oicq_eflg = ProtoField.uint8("OICQ.EFlag", "End Flag", base.HEX) + + -- define the fields table of this dissector(as a protoField array) + + PROTO_OICQ.fields = {hf_oicq_flg, hf_oicq_version, hf_oicq_command, hf_oicq_seq, hf_oicq_qqid, hf_oicq_eflg} + + --[[ + + Data Section + + --]] + local data_dis = Dissector.get("data") + + --[[ + + OICQ Dissector Function + + --]] + local function roh_dissector(buf, pkt, root) + -- check buffer length + + local buf_len = buf:len() + + if buf_len < 12 then + return false + end + + -- check flag + + if buf(0, 1):uint() ~= 0x02 then + return false + end + + -- check end flag + + if buf(buf_len - 1, 1):uint() ~= 0x03 then + return false + end + + --[[ + + packet list columns + + --]] + pkt.cols.protocol = "OICQ" + + pkt.cols.info = "OICQ Protocol(Enhanced) - IM software, popular in China" + + --[[ + + OICQ command list + + ]] + local command_list = {} + command_list[0x0001] = "Log out" + command_list[0x0002] = "Heart Message" + command_list[0x0004] = "Update User information" + command_list[0x0005] = "Search user" + command_list[0x0006] = "Get User informationBroadcast" + command_list[0x0009] = "Add friend no auth" + command_list[0x000a] = "Delete user" + command_list[0x000b] = "Add friend by auth" + command_list[0x000d] = "Set status" + command_list[0x0012] = "Confirmation of receiving message from server" + command_list[0x0016] = "Send message" + command_list[0x0017] = "Receive message" + command_list[0x0018] = "Retrieve information" + command_list[0x001a] = "Reserved " + command_list[0x001c] = "Delete Me" + command_list[0x001d] = "Request KEY" + command_list[0x0021] = "Cell Phone" + command_list[0x0022] = "Log in" + command_list[0x0026] = "Get friend list" + command_list[0x0027] = "Get friend online" + command_list[0x0029] = "Cell PHONE" + command_list[0x0030] = "Operation on group" + command_list[0x0031] = "Log in test" + command_list[0x003c] = "Group name operation" + command_list[0x003d] = "Upload group friend" + command_list[0x003e] = "MEMO Operation" + command_list[0x0058] = "Download group friend" + command_list[0x005c] = "Get level" + command_list[0x0062] = "Request login" + command_list[0x0065] = "Request extra information" + command_list[0x0067] = "Signature operation" + command_list[0x0080] = "Receive system message" + command_list[0x0081] = "Get status of friend" + command_list[0x00b5] = "Get friend's status of group" + + --[[ + + dissection tree in packet details + + --]] + -- tree root + + local t = root:add(PROTO_OICQ, buf(0, buf_len)) + + -- child items + + t:add(hf_oicq_flg, buf(0, 1)) + + t:add(hf_oicq_version, buf(1, 2)) + + local cmd = buf(3, 2):uint() + + if command_list[cmd] then + t:add(hf_oicq_command, buf(3, 2), string.format("%s (%d)", command_list[cmd], cmd)) + else + t:add(hf_oicq_command, buf(3, 2), string.format("Unknown (%d)", cmd)) + end + + t:add(hf_oicq_seq, buf(5, 2)) + + t:add(hf_oicq_qqid, buf(7, 4)) + + t:add(hf_oicq_eflg, buf(buf_len - 1, 1)) + + if buf_len > 12 then + local d = root:add(buf(11, buf_len - 12), "OICQ Data") + end + + return true + end + + --[[ + + Dissect Process + + --]] + function PROTO_OICQ.dissector(buf, pkt, root) + if roh_dissector(buf, pkt, root) then + -- valid ROH diagram + else + data_dis:call(buf, pkt, root) + end + end + + --[[ + + Specify Protocol Port + + --]] + local tcp_encap_table = DissectorTable.get("udp.port") + + tcp_encap_table:set(8000, PROTO_OICQ) +end diff --git a/dissectors/openwebnet/LICENSE b/dissectors/openwebnet/LICENSE new file mode 100644 index 0000000..fe638bb --- /dev/null +++ b/dissectors/openwebnet/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 John Toniutti + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/openwebnet/README.md b/dissectors/openwebnet/README.md new file mode 100644 index 0000000..2aacd6b --- /dev/null +++ b/dissectors/openwebnet/README.md @@ -0,0 +1,47 @@ +# OpenWebNet — passerelles domotiques Legrand / BTicino MyHOME + +Dissecteur Wireshark Lua du protocole **OpenWebNet** (OWN), protocole +texte des passerelles domotiques Legrand / BTicino MyHOME +(trames `*WHO*WHAT*WHERE##`) : ouverture de session (commande ou +événements), authentification (nonce, mot de passe OPEN, HMAC), ACK / NACK, +commandes normales, demandes d'état, demandes et écritures de grandeurs +(WHO, WHAT, WHERE, dimension, valeurs). Port TCP 20000. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/jotonedev/openwebnet-dissector | +| Commit importé | `1822eeb618b89504068ecd1aaa61c7691cece43d` du 01/03/2023 (branche `main`, dernier commit ; dernière modification du script : `52e122d` du 28/01/2023) | +| Licence amont | MIT (`LICENSE` amont, © 2023 John Toniutti) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur OpenWebNet natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `openwebnet_dissector.lua` | Protocole `own` sur TCP 20000 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. La capture d'écran amont n'est pas importée. + +## Utilisation + +Copier `openwebnet_dissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `own`. Champs filtrables : `own.cmd`, `own.who`, `own.what`, +`own.where`… + +## Remarques + +- Documentation du protocole : [Legrand — Open Web Net for MyHOME](https://developer.legrand.com/documentation/open-web-net-for-myhome/) + et [billet de l'auteur](https://jotone.eu/post/230128). +- Le champ `own.password` affiche le mot de passe OPEN échangé en clair : + attention avant de partager une capture. +- Deux champs déclarent la même abréviation `own.value` (« Values » et + « Value ») ; nonce et mot de passe sont déclarés en `uint16`, ce qui + peut tronquer des valeurs longues. Laissé tel quel. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/openwebnet/openwebnet_dissector.lua b/dissectors/openwebnet/openwebnet_dissector.lua new file mode 100644 index 0000000..f843981 --- /dev/null +++ b/dissectors/openwebnet/openwebnet_dissector.lua @@ -0,0 +1,350 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/jotonedev/openwebnet-dissector (openwebnet_dissector.lua), +-- commit 1822eeb618b89504068ecd1aaa61c7691cece43d du 01/03/2023. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- cmd aren't actually openwebnet commands, but are used to identify the type of message +local cmd = { + [1] = "OPEN_SESSION", + [2] = "HMAC", + [3] = "NONCE", + [4] = "PASSWORD", + [5] = "ACK", + [6] = "NACK", + [7] = "NORMAL", + [8] = "STATUS_REQUEST", + [9] = "DIMENSION_REQUEST", + [10] = "DIMENSION_WRITING" +} + +local session = { + [0] = "COMMAND_SESSION", + [1] = "EVENT_SESSION" +} + +local auth_type = { + [1] = "SHA1", + [2] = "SHA256" +} + +-- from documentation +local who = { + [0] = "Scenarios", + [1] = "Lighting", + [2] = "Automation", + [3] = "Power Management", + [4] = "Temperature Control", + [5] = "Alarm", + [6] = "VDES", + [7] = "Video Door Entry System/multimedia", + [9] = "Auxiliary", + [13] = "Gateway Management", + [14] = "Light+shutters actuators lock", + [15] = "CEN commands", + [16] = "Sound System/Audio", + [17] = "MH200N scenarios", + [18] = "Energy management", + [22] = "Sound diffusion", + [24] = "Lighting management", + [25] = "CEN plus / scenarios plus / dry contacts", + [1001] = "Automation diagnostic", + [1004] = "Thermoregulation diagnostic", + [1013] = "Device diagnostic" +} + + +local own = Proto("own", "OpenWebNet protocol") + +local f = own.fields +f.msg = ProtoField.string("own.msg", "Message") +f.cmd = ProtoField.uint8("own.cmd", "Command", base.HEX, cmd) +f.session = ProtoField.uint8("own.session", "Session Type", base.DEC, session) +f.auth_type = ProtoField.uint8("own.auth_type", "Auth Type", base.DEC, auth_type) +f.nonce = ProtoField.uint16("own.nonce", "Nonce", base.DEC) +f.password = ProtoField.uint16("own.password", "Password", base.DEC) + +f.who = ProtoField.uint16("own.who", "Who", base.DEC, who) +f.what = ProtoField.string("own.what", "What") +f.where = ProtoField.string("own.where", "Where") +f.dimension = ProtoField.string("own.dimension", "Dimension") + +f.values = ProtoField.string("own.value", "Values") +f.value = ProtoField.string("own.value", "Value") +f.tag = ProtoField.uint8("own.tag", "Tag", base.DEC) +f.param = ProtoField.uint8("own.param", "Param", base.DEC) + + +function own.dissector(buffer, pkt_info, root_tree) + if buffer:len() < 4 then return end + + pkt_info.cols.protocol = "OpenWebNet" + main_tree = root_tree:add(own, buffer) + + local payload = buffer(0, buffer:len()):string() + + local prev_i = 0 + local i = 0 + while true do + _, i = string.find(payload, "##", i+1) + if i == nil then break end + + msg = buffer(prev_i, i-prev_i):string() + prev_i = i + msg_tree = main_tree:add(f.msg, msg) + dissect_message(msg, pkt_info, msg_tree) + end +end + +function dissect_message(msg, pkt_info, main_tree) + if m_open_session(msg) then + main_tree:add(f.cmd, 1) + + local type = string.match(msg, "^[*]99[*](%d)##") + main_tree:add(f.session, tonumber(type)) + elseif m_rqt_hmac(msg) then + main_tree:add(f.cmd, 2) + + local type = string.match(msg, "^[*]98[*](%d)##") + main_tree:add(f.auth_type, tonumber(type)) + elseif m_nonce(msg) then + local nonce = string.match(msg, "%d+") + + if pkt_info.src_port == 20000 then + main_tree:add(f.cmd, 3) + main_tree:add(f.nonce, tonumber(nonce)) + else + main_tree:add(f.cmd, 4) + main_tree:add(f.password, tonumber(nonce)) + end + elseif m_ack(msg) then + main_tree:add(f.cmd, 5) + elseif m_nack(msg) then + main_tree:add(f.cmd, 6) + elseif m_norm(msg) then + main_tree:add(f.cmd, 7) + + local t = parse_message(msg) + main_tree:add(f.who, t[1]) + parse_what(t[2], main_tree) + parse_where(t[3], main_tree) + elseif m_sts(msg) then + main_tree:add(f.cmd, 8) + + local t = parse_message(msg) + main_tree:add(f.who, t[1]) + parse_where(t[2], main_tree) + elseif m_dim_req(msg) then + main_tree:add(f.cmd,9) + local t = parse_message(msg) + + main_tree:add(f.who, t[1]) + parse_where(t[2], main_tree) + main_tree:add(f.dimension, t[3]) + elseif m_dim_wtr(msg) then + main_tree:add(f.cmd, 10) + local t = parse_message(msg) + + main_tree:add(f.who, t[1]) + parse_where(t[2], main_tree) + parse_dimension(t[3], main_tree) + parse_values(t, main_tree) + end +end + +function parse_values(table, tree) + local field = "" + for i, value in ipairs(table) do + if i > 3 then + if i == 4 then + field = value + else + field = field .. "*".. value + end + end + end + + local values = tree:add(f.values, field) + for i, value in ipairs(table) do + if i > 3 then + values:add(f.value, value) + end + end +end + + +function parse_where(field, tree) + if field == nil or field == "" then return end + + local t = parse_params(field) + local where_tree = tree:add(f.where, field) + + if tag then + where_tree:add(f.tag, t[1]) + end + + for i, value in ipairs(t) do + if i ~= 1 or tag ~= true then + where_tree:add(f.param, value) + end + end +end + +function parse_what(field, tree) + if field == nil or field == "" then return end + + local t = parse_params(field) + local what_tree = tree:add(f.what, field) + + if tag then + what_tree:add(f.tag, t[1]) + end + + for i, value in ipairs(t) do + if i ~= 1 or tag ~= true then + what_tree:add(f.param, value) + end + end +end + +function parse_dimension(field, tree) + if field == nil or field == "" then return end + + t, tag = parse_params(field) + local dim_tree = tree:add(f.dimension, field) + + if tag then + dim_tree:add(f.tag, t[1]) + end + + for i, value in ipairs(t) do + if i ~= 1 or tag ~= true then + dim_tree:add(f.param, value) + end + end +end + +function parse_params(field) + local t = {} + local tag = false + + t[1] = tonumber(string.match(field, "^([0-9]*)")) + if t[1] ~= nil then + tag = true + end + + for str in string.gmatch(field, "#([0-9]*)") do + if str:len() > 0 and str ~= nil then + table.insert(t, tonumber(str)) + end + end + + return t, tag +end + +function parse_message(msg) + local t = {} + local i = 0 + for str in string.gmatch(msg, "([*][0-9#]*)") do + if str:len() > 0 then + if i == 0 then + local p = string.match(str, "[*]#?(%d*)") + table.insert(t, tonumber(p)) + elseif str == "*" then + table.insert(t, "") + else + local p = string.match(str, "[*](.*)") + if string.match(p, "##$") then + p = string.match(p, "(.*)##$") + end + table.insert(t, p) + end + i = i + 1 + end + end + + return t +end + +function m_open_session(string) + local str = string:match("^[*]99[*]%d##") + if str then + return true + else + return false + end +end + +function m_rqt_hmac(string) + local str = string:match("^[*]98[*]%d##") + if str then + return true + else + return false + end +end + +function m_nonce(string) + local str = string:match("^[*]#%d+##") + if str then + return true + else + return false + end +end + +function m_ack(string) + local str = string:match("^[*]#[*]1##") + if str then + return true + else + return false + end +end + +function m_nack(string) + local str = string:match("^[*]#[*]0##") + if str then + return true + else + return false + end +end + +function m_norm(string) + local str = string:match("^[*]%d+[*]%d*[#%d]*[*]%d+[#%d]*##") + if str then + return true + else + return false + end +end + +function m_sts(string) + local str = string:match("^[*]#%d+[*]%d*[#%d]*##") + if str then + return true + else + return false + end +end + +function m_dim_req(string) + local str = string:match("^[*]#%d+[*]%d*[#%d]*[*]%d+[#%d]*##") + if str then + return true + else + return false + end +end + +function m_dim_wtr(string) + local str = string:match("^[*]#%d+[*]%d*[#%d]*[*]%d*[#%d]*[%d*]*##") + if str then + return true + else + return false + end +end + + +tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(20000, own) diff --git a/dissectors/orion-gimbal/LICENSE b/dissectors/orion-gimbal/LICENSE new file mode 100644 index 0000000..ec3dc03 --- /dev/null +++ b/dissectors/orion-gimbal/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013-2018, Trillium Engineering, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/orion-gimbal/README.md b/dissectors/orion-gimbal/README.md new file mode 100644 index 0000000..e9bb74d --- /dev/null +++ b/dissectors/orion-gimbal/README.md @@ -0,0 +1,73 @@ +# Orion — protocole public des nacelles caméra Trillium + +Dissecteur Wireshark Lua du protocole public Orion de Trillium +Engineering (nacelles gyrostabilisées Orion). Il découpe les paquets +`0xD0 0x0D`, identifiant, longueur, données, somme de contrôle. Une même +trame peut en contenir plusieurs. Les champs de près de 100 types de +paquets sont décodés : commandes de pointage, versions logicielles, +GPS, INS, réglages caméra, suivi, enregistrement vidéo, réseau… (issue +#526). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/trilliumeng/orion-sdk (`wireshark/OrionPublic.lua`, `wireshark/OrionPublic_packet.lua`) | +| Commit importé | `dde2e42a646e22a38d723d31ab3e5c185035ae20` du 22/07/2026 (dernier commit de `master`) ; dernière modification des deux fichiers : commit `0576a327d735bc31dbf2b270f6e03f109e9d5967` du 22/07/2026 | +| Licence amont | MIT : `License.txt` du dépôt (« Copyright (c) 2013-2018, Trillium Engineering, LLC »). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur Orion dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `License.txt` amont). Les scripts sont repris tels quels +(aucune modification de code) ; seule l'en-tête de provenance de cinq +lignes est ajoutée en tête de chacun (convention du dépôt, issue #563). +`OrionPublic.lua` est produit par l'outil ProtoGen à partir de l'ICD +public ; `OrionPublic_packet.lua` est écrit à la main d'après le +`Readme.md` amont. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/OrionPublic_packet.lua` | Protocole `OrionPublic` (« Orion Protocol », ligne 88), champs `OrionPublic.id`, `.packet`, `.length`, `.time`, en-tête et ports UDP 8745, 8746, 8748 et TCP 8747 (lignes 158 à 161) | +| `src/OrionPublic.lua` | Tables d'énumérations et fonctions de décodage par type de paquet ; charge le précédent par `require("OrionPublic_packet")` (ligne 8) ; `OrionPublic.dissector` (ligne 5859) | + +## Utilisation + +Comme l'indique le `Readme.md` amont : copier les **deux** fichiers de +`src/` dans un sous-dossier `OrionPublic` du dossier des plugins Lua +personnels (« Aide › À propos de Wireshark › Dossiers »). Redémarrer +ensuite Wireshark. Filtres : `OrionPublic`, `OrionPublic.id == 1`, +`OrionPublic.packet == "ORION_PKT_CMD"`. + +## Vérification à l'import + +`luac5.4 -p` : OK pour les deux fichiers. tshark 4.6.4, fichiers placés +dans `plugins/OrionPublic/` : chargement sans erreur. Paquets +synthétiques construits d'après `Utils/TrilliumPacket.c` (somme de +Fletcher modulo 251) : + +| Essai | Résultat | +|---|---| +| TCP 8747, `ORION_PKT_CMD` (pan 1000, tilt −500, mode 2, stabilisé, impulsion 5) | `OrionCmd` : `Pan: 1 rad (57.29577951 deg)`, `Tilt: -0.5 rad`, `Mode: Unknown Value ( 2 )`, `Stabilized: 1`, `ImpulseTime: 0.5 seconds` | +| Même segment : requête `ORION_PKT_CROWN_VERSION` vide + `ORION_PKT_CMD` | Info « OrionCrownVersion[R], OrionCmd » : deux paquets décodés | +| Identifiant inconnu `0xfa` | « Unknown packet ID 0xfa » et données brutes | +| Paquet tronqué (7 octets sur 13) | **erreur Lua** `OrionPublic_packet.lua:132` (`Range is out of bounds`) | +| UDP 8745, `ORION_PKT_CMD` | décodé comme en TCP | +| Chargement par `-X lua_script:OrionPublic.lua` (hors dossier des plugins) | en-tête reconnu, mais **erreur Lua** `OrionPublic_packet.lua:146` (`get_OrionPktType_t_string` nil) | + +## Limites constatées + +- Les deux fichiers doivent être installés ensemble, comme plugins : + chargés par `-X lua_script:`, le décodage échoue. +- La somme de contrôle n'est ni vérifiée ni affichée ; aucun contrôle + de longueur (erreur Lua sur paquet tronqué, et donc sur un paquet + réparti sur deux segments TCP, faute de réassemblage). +- Identifiants en double dans l'aiguillage généré : seule la première + variante est décodée. C'est le cas pour `1` (`OrionCmd`, jamais + `OrionCmdExtended` ni la réponse, lignes 5789 à 5791), `228` (lignes + 5828 et 5829) et `98` (lignes 5831 et 5832). +- Le `Readme.md` amont signale des types encore « non optimisés » + (Orion Path, TLE Detects). +- Nombreuses fonctions et variables globales ; pas de capture réelle + disponible. diff --git a/dissectors/orion-gimbal/src/OrionPublic.lua b/dissectors/orion-gimbal/src/OrionPublic.lua new file mode 100644 index 0000000..6853eaa --- /dev/null +++ b/dissectors/orion-gimbal/src/OrionPublic.lua @@ -0,0 +1,5875 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/trilliumeng/orion-sdk (wireshark/OrionPublic.lua), +-- commit dde2e42a646e22a38d723d31ab3e5c185035ae20 du 22/07/2026 (dernière modification du fichier : +-- commit 0576a327d735bc31dbf2b270f6e03f109e9d5967 du 22/07/2026). +-- Licence amont : MIT, License.txt du dépôt — voir README.md et LICENSE. +-------------------- Generated by ProtoGen version 3.6.t---------------------- +-- Register General Protocol Packet Format +local OrionPublic_packet = require("OrionPublic_packet") +---------------------- Enumerated value lookup tables ---------------------- +--------------OrionPktType_t Lookup table ------------------------- +-- Identifiers of Orion public packets. The purpose of an Orion packet is determined by its ID field to this list. +function get_OrionPktType_t_string(OrionPktType_t) + if OrionPktType_t == 0 then return "ORION_PKT_INITIALIZE" + elseif OrionPktType_t == 1 then return "ORION_PKT_CMD" -- Basic commands for control of gimbal pan and tilt. + elseif OrionPktType_t == 2 then return "ORION_PKT_UART_CONFIG" -- Baud rate and protocol configuration for crown serial ports + elseif OrionPktType_t == 3 then return "ORION_PKT_LASER_CMD" -- Command to fire the laser + elseif OrionPktType_t == 4 then return "ORION_PKT_RESET" -- Send this packet to cause the gimbal to reset + elseif OrionPktType_t == 5 then return "ORION_PKT_PRIVATE_05" -- Reserved packet identifier + elseif OrionPktType_t == 6 then return "ORION_PKT_LASER_STATES" -- Laser state information + elseif OrionPktType_t == 7 then return "ORION_PKT_STARTUP_CMD" -- Command to run on startup at the end of motor initialization + elseif OrionPktType_t == 8 then return "ORION_PKT_PRIVATE_08" -- Reserved packet identifier + elseif OrionPktType_t == 9 then return "ORION_PKT_PRIVATE_09" -- Reserved packet identifier + elseif OrionPktType_t == 10 then return "ORION_PKT_POSITIONS" -- Stored gimbal positions + elseif OrionPktType_t == 31 then return "ORION_PKT_PRIVATE_1F" -- Reserved packet identifier + elseif OrionPktType_t == 32 then return "ORION_PKT_PRIVATE_20" -- Reserved packet identifier + elseif OrionPktType_t == 33 then return "ORION_PKT_PRIVATE_21" -- Reserved packet identifier + elseif OrionPktType_t == 34 then return "ORION_PKT_LIMITS" -- Pan and tilt limits for current, acceleration, velocity, and position + elseif OrionPktType_t == 35 then return "ORION_PKT_PRIVATE_23" -- Reserved packet identifier + elseif OrionPktType_t == 36 then return "ORION_PKT_PRIVATE_24" -- Reserved packet identifier + elseif OrionPktType_t == 37 then return "ORION_PKT_CLEVIS_VERSION" -- Software version for the clevis board + elseif OrionPktType_t == 38 then return "ORION_PKT_RESET_SOURCE" -- Reset information for a processor + elseif OrionPktType_t == 39 then return "ORION_PKT_BOARD" -- Information for a specific board + elseif OrionPktType_t == 40 then return "ORION_PKT_CROWN_VERSION" -- Software version for the crown board + elseif OrionPktType_t == 41 then return "ORION_PKT_PAYLOAD_VERSION" -- Software version for the payload board + elseif OrionPktType_t == 42 then return "ORION_PKT_PRIVATE_2A" -- Reserved packet identifier + elseif OrionPktType_t == 43 then return "ORION_PKT_PRIVATE_2B" -- Reserved packet identifier + elseif OrionPktType_t == 44 then return "ORION_PKT_TRACKER_VERSION" -- Software version for the tracker board (if present) + elseif OrionPktType_t == 45 then return "ORION_PKT_PRIVATE_2D" -- Reserved packet identifier + elseif OrionPktType_t == 46 then return "ORION_PKT_PRIVATE_2E" -- Reserved packet identifier + elseif OrionPktType_t == 47 then return "ORION_PKT_PRIVATE_2F" -- Reserved packet identifier + elseif OrionPktType_t == 48 then return "ORION_PKT_PRIVATE_30" -- Reserved packet identifier + elseif OrionPktType_t == 49 then return "ORION_PKT_PRIVATE_31" -- Reserved packet identifier + elseif OrionPktType_t == 64 then return "ORION_PKT_PRIVATE_40" -- Reserved packet identifier + elseif OrionPktType_t == 65 then return "ORION_PKT_DIAGNOSTICS" -- Electrical diagnostic data + elseif OrionPktType_t == 66 then return "ORION_PKT_FAULTS" + elseif OrionPktType_t == 67 then return "ORION_PKT_PERFORMANCE" -- Measurements related to stabilization performance + elseif OrionPktType_t == 68 then return "ORION_PKT_SOFTWARE_DIAGNOSTICS" -- Diagnostic information related to software performance for a processor + elseif OrionPktType_t == 69 then return "ORION_PKT_VIBRATION" -- Platform vibration statistics + elseif OrionPktType_t == 70 then return "ORION_PKT_NETWORK_DIAGNOSTICS" -- Network diagnostics + elseif OrionPktType_t == 71 then return "ORION_PKT_TLE_STATUS" -- Target Localization filter status + elseif OrionPktType_t == 72 then return "ORION_PKT_TLE_COMMAND" -- Target Localization filter commands + elseif OrionPktType_t == 73 then return "ORION_PKT_PRIVATE_49" -- Reserved packet identifier + elseif OrionPktType_t == 74 then return "ORION_PKT_BOARD_HEARTBEAT" -- Heartbeat indication for boards in a distributed system. + elseif OrionPktType_t == 95 then return "ORION_PKT_ADVANCED_ENCODING" -- Command the encoding settings for video streams + elseif OrionPktType_t == 96 then return "ORION_PKT_CAMERA_SWITCH" -- Command the gimbal to swtich cameras + elseif OrionPktType_t == 97 then return "ORION_PKT_CAMERA_STATE" -- Command a camera in the gimbal + elseif OrionPktType_t == 98 then return "ORION_PKT_NETWORK_VIDEO" -- Command the IP settings for video delivery + elseif OrionPktType_t == 99 then return "ORION_PKT_CAMERAS" -- Camera settings information + elseif OrionPktType_t == 100 then return "ORION_PKT_PRIVATE_64" -- Reserved packet identifier + elseif OrionPktType_t == 101 then return "ORION_PKT_PRIVATE_65" -- Reserved packet identifier + elseif OrionPktType_t == 102 then return "ORION_PKT_PRIVATE_66" -- Reserved packet identifier + elseif OrionPktType_t == 103 then return "ORION_PKT_FLIR_SETTINGS" -- FLIR-specific camera settings + elseif OrionPktType_t == 104 then return "ORION_PKT_APTINA_SETTINGS" -- Aptina-specific camera settings + elseif OrionPktType_t == 105 then return "ORION_PKT_ZAFIRO_SETTINGS" -- DRS Zafiro-specific camera settings + elseif OrionPktType_t == 106 then return "ORION_PKT_HITACHI_SETTINGS" -- Hitachi-specific camera settings + elseif OrionPktType_t == 107 then return "ORION_PKT_BAE_SETTINGS" -- BAE-specific camera settings + elseif OrionPktType_t == 108 then return "ORION_PKT_SONY_SETTINGS" -- Sony-specific camera settings + elseif OrionPktType_t == 109 then return "ORION_PKT_KTNC_SETTINGS" -- KTnC-specific camera settings + elseif OrionPktType_t == 110 then return "ORION_PKT_ATTOLLO_SETTINGS" -- Attollo-specific camera settings + elseif OrionPktType_t == 111 then return "ORION_PKT_ALVIUM_SETTINGS" -- Alvium-specific camera settings + elseif OrionPktType_t == 112 then return "ORION_PKT_VIDEO_OPTIONS" -- Settings for changing video processing and display + elseif OrionPktType_t == 113 then return "ORION_PKT_TRACK_OPTIONS" -- Options for changing scene/object track configurations + elseif OrionPktType_t == 114 then return "ORION_PKT_GEO_TRACK_STATUS" -- Status of Objects being Tracked + elseif OrionPktType_t == 115 then return "ORION_PKT_GEO_TRACK_COMMAND" -- GeoTracker Command Packet for setting filter + elseif OrionPktType_t == 116 then return "ORION_PKT_TRACK_CMD" -- Command Nudge, Clear tracks, etc. + elseif OrionPktType_t == 117 then return "ORION_PKT_VIDEORECORD_STATUS" -- Command Nudge, Clear tracks, etc. + elseif OrionPktType_t == 118 then return "ORION_PKT_VIDEORECORD_CMD" -- Command Nudge, Clear tracks, etc. + elseif OrionPktType_t == 119 then return "ORION_PKT_VIDEORECORD_CLOCK" -- Get Current PTS of VideoRecord and PTS of PayloadRouter + elseif OrionPktType_t == 120 then return "ORION_PKT_OMNIVIS_SETTINGS" -- OmniVision specific camera settings + elseif OrionPktType_t == 121 then return "ORION_PKT_SIERRA_SETTINGS" -- Sierra-Olympia specific camera settings + elseif OrionPktType_t == 122 then return "ORION_PKT_SIONYX_SETTINGS" -- Sionyx specific camera settings + elseif OrionPktType_t == 123 then return "ORION_PKT_LYNRED_SETTINGS" -- Lynred specific camera settings + elseif OrionPktType_t == 128 then return "ORION_PKT_AUTOPILOT_DATA" -- Autopilot state data, if available + elseif OrionPktType_t == 144 then return "ORION_PKT_PRIVATE_90" -- Reserved packet identifier + elseif OrionPktType_t == 145 then return "ORION_PKT_PRIVATE_91" -- Reserved packet identifier + elseif OrionPktType_t == 146 then return "ORION_PKT_PRIVATE_92" -- Reserved packet identifier + elseif OrionPktType_t == 147 then return "ORION_PKT_PRIVATE_93" -- Reserved packet identifier + elseif OrionPktType_t == 148 then return "ORION_PKT_PRIVATE_94" -- Reserved packet identifier + elseif OrionPktType_t == 160 then return "ORION_PKT_RETRACT_CMD" -- Retract or deploy command for a gimbal retraction mechanism + elseif OrionPktType_t == 161 then return "ORION_PKT_RETRACT_STATUS" -- Current gimbal retraction mechanism status + elseif OrionPktType_t == 167 then return "ORION_PKT_PRODUCT" -- Information specific to the product + elseif OrionPktType_t == 168 then return "ORION_PKT_SNPY_A8" -- Deprecated packet to be removed for 25.2 + elseif OrionPktType_t == 169 then return "ORION_PKT_SNPY_A9" -- Deprecated packet to be removed for 25.2 + elseif OrionPktType_t == 170 then return "ORION_PKT_SNPY_AA" -- Deprecated packet to be removed for 25.2 + elseif OrionPktType_t == 171 then return "ORION_PKT_SNPY_AB" -- Deprecated packet to be removed for 25.2 + elseif OrionPktType_t == 172 then return "ORION_PKT_SNPY_AC" -- Deprecated packet to be removed for 25.2 + elseif OrionPktType_t == 173 then return "ORION_PKT_SNPY_AD" -- Deprecated packet to be removed for 25.2 + elseif OrionPktType_t == 176 then return "ORION_PKT_CROWN_MODE" -- settings telemetry reporting modes + elseif OrionPktType_t == 177 then return "ORION_PKT_DEBUG_STRING" -- A human readable text string which is typically used for debugging purposes + elseif OrionPktType_t == 178 then return "ORION_PKT_USER_DATA" -- Packet for sending user data to a serial port in the gimbal + elseif OrionPktType_t == 179 then return "ORION_PKT_KLV_USER_DATA" -- KLV user-specified field settings + elseif OrionPktType_t == 180 then return "ORION_PKT_PRIVATE_B4" -- Reserved packet identifier + elseif OrionPktType_t == 192 then return "ORION_PKT_PRIVATE_C0" -- Reserved packet identifier + elseif OrionPktType_t == 193 then return "ORION_PKT_PRIVATE_C1" -- Reserved packet identifier + elseif OrionPktType_t == 194 then return "ORION_PKT_PRIVATE_C2" -- Reserved packet identifier + elseif OrionPktType_t == 195 then return "ORION_PKT_PRIVATE_C3" -- Reserved packet identifier + elseif OrionPktType_t == 206 then return "ORION_PKT_PRIVATE_CE" -- Reserved packet identifier + elseif OrionPktType_t == 207 then return "ORION_PKT_PRIVATE_CF" -- Reserved packet identifier + elseif OrionPktType_t == 208 then return "ORION_PKT_SENSOR_DATA" -- Raw sensor data from the Orion Crown board. + elseif OrionPktType_t == 209 then return "ORION_PKT_GPS_DATA" -- Raw GPS data input or output + elseif OrionPktType_t == 210 then return "ORION_PKT_EXT_HEADING_DATA" -- Externally supplied heading information + elseif OrionPktType_t == 211 then return "ORION_PKT_INS_QUALITY" -- Quality of the inertial navigation system + elseif OrionPktType_t == 212 then return "ORION_PKT_GEOLOCATE_TELEMETRY" -- Information needed to locate the gimbal and its imagery + elseif OrionPktType_t == 213 then return "ORION_PKT_GEOPOINT_CMD" -- Command the gimbal to go to Geopoint mode + elseif OrionPktType_t == 214 then return "ORION_PKT_RANGE_DATA" -- Range information from the gimbal to its target + elseif OrionPktType_t == 215 then return "ORION_PKT_PATH" -- Command the gimbal to path track mode + elseif OrionPktType_t == 216 then return "ORION_PKT_INS_OPTIONS" -- Configuration options for the Inertial Navigation System + elseif OrionPktType_t == 217 then return "ORION_PKT_STARE_START" -- Stare portion of step stare started + elseif OrionPktType_t == 218 then return "ORION_PKT_STARE_ACK" -- Stare acknowledged, clear to move + elseif OrionPktType_t == 219 then return "ORION_PKT_PRIVATE_DB" -- Reserved packet identifier + elseif OrionPktType_t == 220 then return "ORION_PKT_GEOID_UNDULATION" -- Geoid undulation data + elseif OrionPktType_t == 222 then return "ORION_PKT_PRIVATE_DE" -- Reserved packet identifier + elseif OrionPktType_t == 223 then return "ORION_PKT_PRIVATE_DF" -- Reserved packet identifier + elseif OrionPktType_t == 224 then return "ORION_PKT_PRIVATE_E0" -- Reserved packet identifier + elseif OrionPktType_t == 225 then return "ORION_PKT_PRIVATE_E1" -- Reserved packet identifier + elseif OrionPktType_t == 226 then return "ORION_PKT_PRIVATE_E2" -- Reserved packet identifier + elseif OrionPktType_t == 227 then return "ORION_PKT_PRIVATE_E3" -- Reserved packet identifier + elseif OrionPktType_t == 228 then return "ORION_PKT_NETWORK_SETTINGS" -- Change the IP network settings in the gimbal + elseif OrionPktType_t == 229 then return "ORION_PKT_PRIVATE_E5" -- Reserved packet identifier + elseif OrionPktType_t == 230 then return "ORION_PKT_PRIVATE_E6" -- Reserved packet identifier + elseif OrionPktType_t == 231 then return "ORION_PKT_PRIVATE_E7" -- Reserved packet identifier + elseif OrionPktType_t == 232 then return "ORION_PKT_PRIVATE_E8" -- Reserved packet identifier + elseif OrionPktType_t == 233 then return "ORION_PKT_PRIVATE_E9" -- Reserved packet identifier + elseif OrionPktType_t == 234 then return "ORION_PKT_PRIVATE_EA" -- Reserved packet identifier + elseif OrionPktType_t == 240 then return "ORION_PKT_PRIVATE_F0" -- Reserved packet identifier + elseif OrionPktType_t == 241 then return "ORION_PKT_PRIVATE_F1" -- Reserved packet identifier + elseif OrionPktType_t == 242 then return "ORION_PKT_PRIVATE_F2" -- Reserved packet identifier + elseif OrionPktType_t == 243 then return "ORION_PKT_PRIVATE_F3" -- Reserved packet identifier + elseif OrionPktType_t == 244 then return "ORION_PKT_PRIVATE_F4" -- Reserved packet identifier + elseif OrionPktType_t == 245 then return "ORION_PKT_PRIVATE_F5" -- Reserved packet identifier + elseif OrionPktType_t == 246 then return "ORION_PKT_PRIVATE_F6" -- Reserved packet identifier + elseif OrionPktType_t == 247 then return "ORION_PKT_PRIVATE_F7" -- Reserved packet identifier + elseif OrionPktType_t == 248 then return "ORION_PKT_RETRACT_VERSION" -- Software version for the retract board (if present) + elseif OrionPktType_t == 249 then return "ORION_PKT_LENSCTL_VERSION" -- Software version for the lens control board (if present) + elseif OrionPktType_t == 250 then return "ORION_PKT_PRIVATE_FA" -- Reserved packet identifier + elseif OrionPktType_t == 251 then return "ORION_PKT_PRF_DETECT" -- Control and telemtry from Mira PRF detect enabled systems + elseif OrionPktType_t == 252 then return "ORION_PKT_SCAN_PLAN" -- Control For Orion Scan Plan + elseif OrionPktType_t == 253 then return "ORION_PKT_UNIFIED_CAM_ERR_SETTINGS" -- A packet to indicate the total angular error between two cameras. + end + return "Unknown Value ( " .. OrionPktType_t .. " )" +end + +--------------OrionNumberOfCameras_t Lookup table ------------------------- +-- The maximum number of cameras in an Orion Gimbal +function get_OrionNumberOfCameras_t_string(OrionNumberOfCameras_t) + if OrionNumberOfCameras_t == 4 then return "NUM_CAMERAS" + end + return "Unknown Value ( " .. OrionNumberOfCameras_t .. " )" +end + +--------------GimbalAxis_t Lookup table ------------------------- +-- Enumeration of gimbal pan and tilt axes. +function get_GimbalAxis_t_string(GimbalAxis_t) + if GimbalAxis_t == 0 then return "GIMBAL_AXIS_PAN" -- The pan axis + elseif GimbalAxis_t == 1 then return "GIMBAL_AXIS_TILT" -- The tilt axis + elseif GimbalAxis_t == 2 then return "NUM_GIMBAL_AXES" -- Total number of axes in the gimbal + end + return "Unknown Value ( " .. GimbalAxis_t .. " )" +end + +--------------Axis_t Lookup table ------------------------- +-- 3D attitude axis enumeration. +function get_Axis_t_string(Axis_t) + if Axis_t == 0 then return "AXIS_ROLL" -- Roll axis (rotation about x) + elseif Axis_t == 1 then return "AXIS_PITCH" -- Pitch axis (rotation about y) + elseif Axis_t == 2 then return "AXIS_YAW" -- Yaw axis (rotation about z) + elseif Axis_t == 3 then return "NUM_AXES" -- Number of attitude axes + end + return "Unknown Value ( " .. Axis_t .. " )" +end + +--------------BodyAxis_t Lookup table ------------------------- +-- Enumeration for body axis X, Y, Z arrays. +function get_BodyAxis_t_string(BodyAxis_t) + if BodyAxis_t == 0 then return "AXIS_X" -- X points forward (away from connector) + elseif BodyAxis_t == 1 then return "AXIS_Y" -- Y points to the right (if X is forward) + elseif BodyAxis_t == 2 then return "AXIS_Z" -- Z points down + elseif BodyAxis_t == 3 then return "NUM_XYZ" -- Number of body axes + end + return "Unknown Value ( " .. BodyAxis_t .. " )" +end + +--------------Stator_t Lookup table ------------------------- +-- Enumeration for motor stator axes. +function get_Stator_t_string(Stator_t) + if Stator_t == 0 then return "STATOR_U" -- First field of three phase motor + elseif Stator_t == 1 then return "STATOR_V" -- Second field of three phase motor + elseif Stator_t == 2 then return "STATOR_W" -- Third field of three phase motor + elseif Stator_t == 3 then return "NUM_STATORS" -- Number of motor phases + end + return "Unknown Value ( " .. Stator_t .. " )" +end + +--------------OrionBoardEnumeration_t Lookup table ------------------------- +-- Enumeration identifying different boards in the Orion Gimbal. +function get_OrionBoardEnumeration_t_string(OrionBoardEnumeration_t) + if OrionBoardEnumeration_t == 0 then return "BOARD_NONE" -- Unknown board + elseif OrionBoardEnumeration_t == 1 then return "BOARD_CLEVIS" -- The clevis board (motor control) + elseif OrionBoardEnumeration_t == 2 then return "BOARD_CROWN" -- The crown board (ins and communications) + elseif OrionBoardEnumeration_t == 3 then return "BOARD_PAYLOAD" -- The payload board (camera) + elseif OrionBoardEnumeration_t == 4 then return "BOARD_LENSCTRL" -- The lens control board + elseif OrionBoardEnumeration_t == 5 then return "BOARD_MISSCOMP" -- This value is deprecated and will be removed in 25.2 + end + return "Unknown Value ( " .. OrionBoardEnumeration_t .. " )" +end + +--------------OrionMode_t Lookup table ------------------------- +-- The mode of operation of the gimbal. +function get_OrionMode_t_string(OrionMode_t) + if OrionMode_t == 0 then return "ORION_MODE_DISABLED" -- disable motor output + elseif OrionMode_t == 1 then return "ORION_MODE_FAULT" -- Gimbal has experienced a fault and motors have been disabled + elseif OrionMode_t == 16 then return "ORION_MODE_RATE" -- Commands give the line of sight angular rate of the camera + elseif OrionMode_t == 17 then return "ORION_MODE_GEO_RATE" -- Inertial rate mode, with bulk motion compensation when valid slant range is available + elseif OrionMode_t == 32 then return "ORION_MODE_FFC_AUTO" -- Commands the gimbal to perform a flat field correction, pan and tilt will drive the IR camera to look at the black body + elseif OrionMode_t == 32 then return "ORION_MODE_FFC" -- Legacy FFC mode, alias of ORION_MODE_FFC_AUTO + elseif OrionMode_t == 33 then return "ORION_MODE_FFC_MANUAL" -- Commands the gimbal to perform a flat field correction, pan and tilt will drive the IR camera to the commanded positions. NOTE: The pan/tilt targets specify the payload position, not the boresight position, so the reported angles may not match the command target + elseif OrionMode_t == 48 then return "ORION_MODE_SCENE" -- Commands give the angular rate of the image produced by the camera + elseif OrionMode_t == 49 then return "ORION_MODE_TRACK" -- Commands give the angular position of the track box in the camera image as fraction from center, bound these numbers -0.5 to 0.5 + elseif OrionMode_t == 50 then return "ORION_MODE_NUDGE_TRACK" -- (Deprecated) Use ORION_PKT_TRACK_CMD + elseif OrionMode_t == 51 then return "ORION_MODE_SECONDARY_TRACK" -- (Deprecated) Use ORION_PKT_TRACK_CMD + elseif OrionMode_t == 64 then return "ORION_MODE_CALIBRATION" -- Drives the pan and tilt axes to calibrate the stabilization gyros + elseif OrionMode_t == 65 then return "ORION_MODE_NULL_GYROS" -- Hold gimbal still while stabilization gyro and IMU gyro biases are estimated. User ensures that crown will not move while in this mode. + elseif OrionMode_t == 80 then return "ORION_MODE_POSITION" -- Commands give the position of the pan and tilt axes with respect to the gimbal mount + elseif OrionMode_t == 81 then return "ORION_MODE_POSITION_NO_LIMITS" -- Commands give the position of the pan and tilt axes with respect to the gimbal mount. NOTE: This mode ignores the pan/tilt limits and can result in serious damage to the gimbal if used incorrectly + elseif OrionMode_t == 96 then return "ORION_MODE_GEOPOINT" -- Gimbal is pointing toward a fixed spatial location + elseif OrionMode_t == 112 then return "ORION_MODE_PATH" -- Gimbal is pointing toward a fixed path in space, and may be doing step-stare + elseif OrionMode_t == 113 then return "ORION_MODE_DOWN" -- Gimbal is pointing straight down, and may be doing step-stare + elseif OrionMode_t == 255 then return "ORION_MODE_UNKNOWN" -- Unknown gimbal mode. This is unused in normal operation and is strictly to maintain compatibility with v1.2 + end + return "Unknown Value ( " .. OrionMode_t .. " )" +end + +--------------OrionMaxLasers_t Lookup table ------------------------- +-- The maximum number of lasers in an Orion gimbal. +function get_OrionMaxLasers_t_string(OrionMaxLasers_t) + if OrionMaxLasers_t == 3 then return "MAX_LASERS" -- Maximum number of lasers in an Orion gimbal. + end + return "Unknown Value ( " .. OrionMaxLasers_t .. " )" +end + +--------------OrionLaserType_t Lookup table ------------------------- +-- Laser type identifiers. +function get_OrionLaserType_t_string(OrionLaserType_t) + if OrionLaserType_t == 0 then return "LASER_TYPE_NONE" -- No laser installed + elseif OrionLaserType_t == 1 then return "LASER_TYPE_POINTER" -- Laser pointer + elseif OrionLaserType_t == 2 then return "LASER_TYPE_10MJ_MARKER" -- Laser marker + elseif OrionLaserType_t == 3 then return "LASER_TYPE_LIGHTWARE" -- LightWare LRF + elseif OrionLaserType_t == 4 then return "LASER_TYPE_JENOPTIK_DLEM" -- Jenoptik DLEM LRF + elseif OrionLaserType_t == 5 then return "LASER_TYPE_VECTRONIX" -- Vectronix LRF + elseif OrionLaserType_t == 6 then return "LASER_TYPE_DESIGNATOR" -- Laser designator + elseif OrionLaserType_t == 7 then return "LASER_TYPE_JENOPTIK_DLEM_TEST" -- Jenoptik DLEM LRF test mode + elseif OrionLaserType_t == 8 then return "LASER_TYPE_DESIGNATOR_6x" -- Laser Designator Extender 6x + elseif OrionLaserType_t == 9 then return "LASER_TYPE_DESIGNATOR_DUMMY" -- Laser Designator Dummy + elseif OrionLaserType_t == 10 then return "LASER_TYPE_ARETE_LD" -- Arete Laser Designator + elseif OrionLaserType_t == 11 then return "LASER_TYPE_VECTRONIX_3013" -- Vectronix 3013 LRF + end + return "Unknown Value ( " .. OrionLaserType_t .. " )" +end + +--------------RangeDataSrc_t Lookup table ------------------------- +-- Sources of ranging information. +function get_RangeDataSrc_t_string(RangeDataSrc_t) + if RangeDataSrc_t == 0 then return "RANGE_SRC_NONE" -- No ranging information + elseif RangeDataSrc_t == 1 then return "RANGE_SRC_SKYLINK" -- Range information from skylink terrrain lookup + elseif RangeDataSrc_t == 2 then return "RANGE_SRC_LASER" -- Range information from laser rangefinder + elseif RangeDataSrc_t == 3 then return "RANGE_SRC_OTHER" -- Other source of range data + elseif RangeDataSrc_t == 4 then return "RANGE_SRC_INTERNAL" -- Range information is being estimated internally by the gimbal. Note that estimates are not guaranteed be accurate and should only be used as a fallback option. + elseif RangeDataSrc_t == 5 then return "RANGE_SRC_INTERNAL_DTED" -- Range information estimated by the gimbal based on a DTED model + elseif RangeDataSrc_t == 6 then return "NUM_RANGE_SRCS" + end + return "Unknown Value ( " .. RangeDataSrc_t .. " )" +end + +--------------TleType_t Lookup table ------------------------- +-- TLE algorithm type enumeration +function get_TleType_t_string(TleType_t) + if TleType_t == 0 then return "TLE_TYPE_NONE" -- No TLE filter + elseif TleType_t == 1 then return "TLE_TYPE_NO_CHANGE" -- Appy settings to the currently active filter + elseif TleType_t == 2 then return "TLE_TYPE_GEOLOCATE" -- The geolocation target estimation filter + elseif TleType_t == 3 then return "TLE_TYPE_ALIGN" -- The pan tilt alignment offset filter + end + return "Unknown Value ( " .. TleType_t .. " )" +end + +--------------TleState_t Lookup table ------------------------- +function get_TleState_t_string(TleState_t) + if TleState_t == 0 then return "TLE_STATE_OFF" -- Filter is not running + elseif TleState_t == 1 then return "TLE_STATE_RUNNING" -- Filter is running + end + return "Unknown Value ( " .. TleState_t .. " )" +end + +--------------TleSource_t Lookup table ------------------------- +function get_TleSource_t_string(TleSource_t) + if TleSource_t == 0 then return "TLE_SOURCE_GIMBAL_GEO" + elseif TleSource_t == 1 then return "TLE_SOURCE_SKYLINK_GEO" + elseif TleSource_t == 2 then return "TLE_SOURCE_GIMBAL_DTED" + elseif TleSource_t == 3 then return "TLE_SOURCE_OTHER" + end + return "Unknown Value ( " .. TleSource_t .. " )" +end + +--------------GeoTrackerState_t Lookup table ------------------------- +function get_GeoTrackerState_t_string(GeoTrackerState_t) + if GeoTrackerState_t == 0 then return "GEO_TRACKER_STATE_OFF" -- Filter is not running + elseif GeoTrackerState_t == 1 then return "GEO_TRACKER_STATE_RUNNING" -- Filter is running + end + return "Unknown Value ( " .. GeoTrackerState_t .. " )" +end + +--------------OrionTrackCmd_t Lookup table ------------------------- +-- The retraction mechanism commands. +function get_OrionTrackCmd_t_string(OrionTrackCmd_t) + if OrionTrackCmd_t == 0 then return "TRACK_START_PRIMARY" -- Command give the angular position of the track box in the camera image as Target (bound -0.5 to 0.5) + elseif OrionTrackCmd_t == 1 then return "TRACK_START_SECONDARY" -- Command give the angular position of the track box in the camera image as Target (bound -0.5 to 0.5) + elseif OrionTrackCmd_t == 2 then return "TRACK_STOP_ALL" -- Clear all tracks + elseif OrionTrackCmd_t == 3 then return "TRACK_STOP_ALL_BUT_PRIMARY" -- Clear all secondary tracks + elseif OrionTrackCmd_t == 4 then return "TRACK_NUDGE_PRIMARY" -- Nudge a track index by given Target (percentage of FOV) + elseif OrionTrackCmd_t == 5 then return "TRACK_RESIZE_PRIMARY" -- Resize a track index by given Resize + elseif OrionTrackCmd_t == 6 then return "TRACK_NUDGE_BY_INDEX" -- Nudge a track index by given Target (percentage of FOV) + elseif OrionTrackCmd_t == 7 then return "TRACK_RESIZE_BY_INDEX" -- Resize a track index by given Resize + elseif OrionTrackCmd_t == 8 then return "TRACK_REMOVE_BY_INDEX" -- Remove a track at TrackIndex + elseif OrionTrackCmd_t == 9 then return "TRACK_REMOVE_BY_PIXEL" -- Remove a track by given Target (bound -0.5 to 0.5) + end + return "Unknown Value ( " .. OrionTrackCmd_t .. " )" +end + +--------------VideoRecordState_t Lookup table ------------------------- +-- The current status of cameras/recordings +function get_VideoRecordState_t_string(VideoRecordState_t) + if VideoRecordState_t == 0 then return "VideoRecordStateIdle" -- Not actively streaming or recording. + elseif VideoRecordState_t == 1 then return "VideoRecordStateRecording" -- Actively recording to disk. + elseif VideoRecordState_t == 2 then return "VideoRecordStateRecording_Streaming" -- Actively recording to disk and streaming to udp destination. + elseif VideoRecordState_t == 3 then return "VideoRecordStateStreaming" -- Actively streaming to udp destination. + elseif VideoRecordState_t == 4 then return "VideoRecordStateStalled" -- Streaming/Recording is failing. + end + return "Unknown Value ( " .. VideoRecordState_t .. " )" +end + +--------------KlvMode_t Lookup table ------------------------- +-- The current flavor of KLV encoding to stream +function get_KlvMode_t_string(KlvMode_t) + if KlvMode_t == 0 then return "KlvModeLegacy" -- The legacy mode of encoding KLV to the stream, a asynchronous stream with PTS timestamps. + elseif KlvMode_t == 1 then return "KlvModeSynchronous" -- The synchronous mode of encoding KLV to the stream, with MAU and PTS/DTS. + elseif KlvMode_t == 2 then return "KlvModeAsynchronous" -- The asynchronous mode of encoding KLV to the stream, without PTS/DTS. + elseif KlvMode_t == 255 then return "KlvModeDoNotChange" -- Do not change the current KLV mode. + end + return "Unknown Value ( " .. KlvMode_t .. " )" +end + +--------------GeoTrackerFilterType_t Lookup table ------------------------- +-- Geo Tracker filter Type enumeration +function get_GeoTrackerFilterType_t_string(GeoTrackerFilterType_t) + if GeoTrackerFilterType_t == 0 then return "GEO_TRACKER_FILTER_STATIC" -- Static object filter + elseif GeoTrackerFilterType_t == 1 then return "GEO_TRACKER_FILTER_CONST_VEL" -- Constant Velocity filter + elseif GeoTrackerFilterType_t == 2 then return "GEO_TRACKER_FILTER_CONST_ACC" -- Constant Acceleration filter + end + return "Unknown Value ( " .. GeoTrackerFilterType_t .. " )" +end + +--------------GeoTrackerTargetType_t Lookup table ------------------------- +-- Geo Tracker Target Type enumeration +function get_GeoTrackerTargetType_t_string(GeoTrackerTargetType_t) + if GeoTrackerTargetType_t == 0 then return "GEO_TRACKER_TARGET_STATIC" -- Static target type + elseif GeoTrackerTargetType_t == 1 then return "GEO_TRACKER_TARGET_PERSON" -- Person target type + elseif GeoTrackerTargetType_t == 2 then return "GEO_TRACKER_TARGET_CAR" -- Generic Car target type + elseif GeoTrackerTargetType_t == 3 then return "GEO_TRACKER_TARGET_CAR_CITY" -- City Car target type + elseif GeoTrackerTargetType_t == 4 then return "GEO_TRACKER_TARGET_CAR_HIGHWAY" -- City Highway target type + elseif GeoTrackerTargetType_t == 5 then return "GEO_TRACKER_TARGET_BOAT" -- Generic Boat target type + elseif GeoTrackerTargetType_t == 6 then return "GEO_TRACKER_TARGET_BOAT_FAST" -- Fast Boat target type + end + return "Unknown Value ( " .. GeoTrackerTargetType_t .. " )" +end + +--------------GeoTrackerCmd_t Lookup table ------------------------- +-- GeoTracker Command enumeration +function get_GeoTrackerCmd_t_string(GeoTrackerCmd_t) + if GeoTrackerCmd_t == 0 then return "GEO_TRACKER_CMD_STOP" -- Stop GeoTracker Algorithm from running on track data + elseif GeoTrackerCmd_t == 1 then return "GEO_TRACKER_CMD_RUN" -- Start GeoTracker Algorithm + elseif GeoTrackerCmd_t == 2 then return "GEO_TRACKER_CMD_RESTART" -- Restarts GeoTracker Algorithm and regenerates with new id for existing track if present in track data + end + return "Unknown Value ( " .. GeoTrackerCmd_t .. " )" +end + +--------------OrionRetractCmd_t Lookup table ------------------------- +-- The retraction mechanism commands. +function get_OrionRetractCmd_t_string(OrionRetractCmd_t) + if OrionRetractCmd_t == 0 then return "RETRACT_CMD_DISABLE" -- Disable the retract motor + elseif OrionRetractCmd_t == 1 then return "RETRACT_CMD_DEPLOY" -- Move the gimbal to a deployed position + elseif OrionRetractCmd_t == 2 then return "RETRACT_CMD_RETRACT" -- Move the gimbal to a retracted position + end + return "Unknown Value ( " .. OrionRetractCmd_t .. " )" +end + +--------------UserDataPort_t Lookup table ------------------------- +-- Destination port identifiers +function get_UserDataPort_t_string(UserDataPort_t) + if UserDataPort_t == 0 then return "USER_DATA_PORT_ETHERNET" -- Payload Ethernet connection + elseif UserDataPort_t == 2 then return "USER_DATA_PORT_PRIMARY" -- Primary front-panel RS-232 serial port + elseif UserDataPort_t == 3 then return "USER_DATA_PORT_FP2" -- Front panel FP1 RS-232 serial port + elseif UserDataPort_t == 4 then return "USER_DATA_PORT_FP1" -- Front panel FP2 RS-232 serial port + elseif UserDataPort_t == 8 then return "USER_DATA_PORT_FP3" -- Front panel FP3 TTL serial port + elseif UserDataPort_t == 9 then return "USER_DATA_PORT_FP4" -- Front panel FP4 TTL serial port + elseif UserDataPort_t == 255 then return "USER_DATA_PORT_CURRENT" -- The port referenced is whatever port delivered this packet + end + return "Unknown Value ( " .. UserDataPort_t .. " )" +end + +--------------ScanPlanState_t Lookup table ------------------------- +function get_ScanPlanState_t_string(ScanPlanState_t) + if ScanPlanState_t == 0 then return "SCAN_STOPPED" + elseif ScanPlanState_t == 1 then return "SCAN_RUNNING" + elseif ScanPlanState_t == 2 then return "SCAN_RUNNING_TARGET_RATE" + end + return "Unknown Value ( " .. ScanPlanState_t .. " )" +end + +--------------ScanPlanReferenceFrame_t Lookup table ------------------------- +function get_ScanPlanReferenceFrame_t_string(ScanPlanReferenceFrame_t) + if ScanPlanReferenceFrame_t == 0 then return "SCAN_WORLD" + elseif ScanPlanReferenceFrame_t == 1 then return "SCAN_GIMBAL" + end + return "Unknown Value ( " .. ScanPlanReferenceFrame_t .. " )" +end + +--------------InsRotationOptions Lookup table ------------------------- +-- Enumeration INS rotation options +function get_InsRotationOptions_string(InsRotationOptions) + if InsRotationOptions == 0 then return "insInGimbalNative" -- The INS is running in the gimbal native axis + elseif InsRotationOptions == 1 then return "insInPlatform" -- The INS is running in the platform axis, see the INS options for specific roataion details + elseif InsRotationOptions == 2 then return "insInPayloadBall" -- The INS is running in the payload ball. + end + return "Unknown Value ( " .. InsRotationOptions .. " )" +end + +--------------OrionFaultType_t Lookup table ------------------------- +-- The type of fault +function get_OrionFaultType_t_string(OrionFaultType_t) + if OrionFaultType_t == 0 then return "FAULT_TYPE_NONE" + elseif OrionFaultType_t == 1 then return "FAULT_TYPE_CLEVIS_RESET_COMMANDED" + elseif OrionFaultType_t == 2 then return "FAULT_TYPE_INVALID_GYRO_CALIBRATION" + elseif OrionFaultType_t == 3 then return "FAULT_TYPE_VELOCITY_LIMIT_EXCEEDED" + elseif OrionFaultType_t == 4 then return "FAULT_TYPE_ACCELERATION_LIMIT_EXCEEDED" + end + return "Unknown Value ( " .. OrionFaultType_t .. " )" +end + +--------------OrionFaultLevel_t Lookup table ------------------------- +-- The level of fault +function get_OrionFaultLevel_t_string(OrionFaultLevel_t) + if OrionFaultLevel_t == 0 then return "FAULT_LEVEL_LOG" + elseif OrionFaultLevel_t == 1 then return "FAULT_LEVEL_INFO" + elseif OrionFaultLevel_t == 2 then return "FAULT_LEVEL_WARNING" + elseif OrionFaultLevel_t == 3 then return "FAULT_LEVEL_ERROR" + elseif OrionFaultLevel_t == 4 then return "FAULT_LEVEL_FATAL" + end + return "Unknown Value ( " .. OrionFaultLevel_t .. " )" +end + +--------------OrionFaultComponent_t Lookup table ------------------------- +-- The component in fault +function get_OrionFaultComponent_t_string(OrionFaultComponent_t) + if OrionFaultComponent_t == 0 then return "FAULT_COMPONENT_PAN_AXIS" + elseif OrionFaultComponent_t == 1 then return "FAULT_COMPONENT_TILT_AXIS" + elseif OrionFaultComponent_t == 2 then return "FAULT_COMPONENT_PAYLOAD_GYROS" + end + return "Unknown Value ( " .. OrionFaultComponent_t .. " )" +end + +--------------TleOptions Lookup table ------------------------- +-- Options controlling what inputs TLE filter will use +function get_TleOptions_string(TleOptions) + if TleOptions == 0 then return "tleDefault" -- Use default options defined by the filter. + elseif TleOptions == 1 then return "tleIns" -- Include LOS measurements from the INS filter + elseif TleOptions == 2 then return "tleDted" -- Include altitude measurements using LOS and DTED lookups + elseif TleOptions == 4 then return "tleLrf" -- Include range measurements from laser range finder + elseif TleOptions == 8 then return "tleOffBoard" -- Include LLT measurements from offboard sources + end + return "Unknown Value ( " .. TleOptions .. " )" +end + +--------------OrionRetractState_t Lookup table ------------------------- +-- The retraction mechanism state +function get_OrionRetractState_t_string(OrionRetractState_t) + if OrionRetractState_t == 0 then return "RETRACT_STATE_DISABLED" -- Retract is disabled + elseif OrionRetractState_t == 1 then return "RETRACT_STATE_RETRACTED" -- Retract is fully retracted + elseif OrionRetractState_t == 2 then return "RETRACT_STATE_RETRACTING" -- Retract is moving to the retracted position + elseif OrionRetractState_t == 3 then return "RETRACT_STATE_DEPLOYING" -- Retract is moving to the deployed position + elseif OrionRetractState_t == 4 then return "RETRACT_STATE_DEPLOYED" -- Retract is fully deployed + elseif OrionRetractState_t == 5 then return "RETRACT_STATE_FAULT" -- Retract is experiencing a fault condition + end + return "Unknown Value ( " .. OrionRetractState_t .. " )" +end + +--------------crownModes Lookup table ------------------------- +-- Modes of operation for the orion crown board software. +function get_crownModes_string(crownModes) + if crownModes == 0 then return "crownModeNormal" -- The normal operation of the crown board + elseif crownModes == 1 then return "crownModeLogINS" -- Normal mode of operation except INS raw data are sent to users + elseif crownModes == 2 then return "crownModePrintIMU" -- Normal mode of operation except the IMU sensors are printed out using debug packets + elseif crownModes == 3 then return "crownModePrintINS" -- Normal mode of operation except the INS states are printed out using debug packets + elseif crownModes == 4 then return "crownModeTempCal" -- Special mode of operation used for temperature calibration of the sensors + elseif crownModes == 5 then return "crownModeIMUCal" -- Special mode of operation used for gain, bias, and alignment calibration of the IMU + end + return "Unknown Value ( " .. crownModes .. " )" +end + +--------------debugPriority Lookup table ------------------------- +-- Priority level of a debug message +function get_debugPriority_string(debugPriority) + if debugPriority == 0 then return "debugLevelLog" -- Logging information only, lowest priority + elseif debugPriority == 1 then return "debugLevelInfo" -- Informational message + elseif debugPriority == 2 then return "debugLevelWarn" -- Warning message + elseif debugPriority == 3 then return "debugLevelError" -- Describes a recoverable error + elseif debugPriority == 4 then return "debugLevelFatal" -- Describes an unrecoverable error, highest priority + end + return "Unknown Value ( " .. debugPriority .. " )" +end + +--------------gpsSource_t Lookup table ------------------------- +-- Enumeration for source of GPS data. +function get_gpsSource_t_string(gpsSource_t) + if gpsSource_t == 0 then return "externalSource" -- External GPS, user supplied data + elseif gpsSource_t == 1 then return "ubloxSource" -- uBlox internal GPS + elseif gpsSource_t == 2 then return "mavlinkSource" -- Mavlink supplied data + elseif gpsSource_t == 3 then return "nmeaSource" -- External GPS, supplied by NMEA input + elseif gpsSource_t == 4 then return "novatelSource" -- Novatel dual frequency GPS + elseif gpsSource_t == 5 then return "autopilotSource" -- Autopilot host GPS data + elseif gpsSource_t == 6 then return "piccoloSource" -- Preserved for backward compatibility + elseif gpsSource_t == 7 then return "piksiSource" -- Piksi external GPS + elseif gpsSource_t == 8 then return "apntSource" -- Alternative positioning, navigation, and timing system supplied data + elseif gpsSource_t == 9 then return "numGpsSources" -- Number of possible GPS sources + end + return "Unknown Value ( " .. gpsSource_t .. " )" +end + +--------------ubloxFixType_t Lookup table ------------------------- +-- Enumeration for types of GPS solutions, derived from uBlox specification. +function get_ubloxFixType_t_string(ubloxFixType_t) + if ubloxFixType_t == 0 then return "noFix" -- No solution + elseif ubloxFixType_t == 1 then return "deadReckoningOnly" -- Dead reckoning only + elseif ubloxFixType_t == 2 then return "twoDFix" -- Two dimensional solution + elseif ubloxFixType_t == 3 then return "threeDFix" -- Three dimensional solution + elseif ubloxFixType_t == 4 then return "gnssDeadReckoning" -- GNSS and dead reckoning combined + elseif ubloxFixType_t == 5 then return "timeOnly" -- Time only, no position or velocity + end + return "Unknown Value ( " .. ubloxFixType_t .. " )" +end + +--------------insMode_t Lookup table ------------------------- +-- Enumeration for the inertial navigation operational mode +function get_insMode_t_string(insMode_t) + if insMode_t == 0 then return "insModeInit1" -- Awaiting first IMU measurement + elseif insMode_t == 1 then return "insModeInit2" -- Awaiting IMU stabilization + elseif insMode_t == 2 then return "insModeAHRS" -- Running without GPS inputs + elseif insMode_t == 3 then return "insModeRunHard" -- Running with forced GPS inputs + elseif insMode_t == 4 then return "insModeRun" -- Normal mode of operation + elseif insMode_t == 5 then return "insModeRunTight" -- Normal mode of operation with tightly coupled corrections + end + return "Unknown Value ( " .. insMode_t .. " )" +end + +--------------imuType_t Lookup table ------------------------- +-- Enumeration for IMU type +function get_imuType_t_string(imuType_t) + if imuType_t == 0 then return "imuTypeInternal" -- Internal Trillium IMU + elseif imuType_t == 1 then return "imuTypeSensonor" -- Sensonor IMU + elseif imuType_t == 2 then return "imuTypeDmu11" -- DMU-11 IMU + elseif imuType_t == 3 then return "imuTypeExternal" -- Other external IMU + elseif imuType_t == 4 then return "imuTypeEpson" -- Epson IMU + elseif imuType_t == 5 then return "imuTypeSBGPulse" -- SBG Pulse IMU + elseif imuType_t == 6 then return "imuTypeVectorNav" -- VectorNav IMU + elseif imuType_t == 7 then return "numImuTypes" -- Number of known IMU types + end + return "Unknown Value ( " .. imuType_t .. " )" +end + +--------------PositionList Lookup table ------------------------- +function get_PositionList_string(PositionList) + if PositionList == 0 then return "POSITION_HOME" -- Home position, used on startup + elseif PositionList == 1 then return "POSITION_STOW" -- Stow position, currently unused + elseif PositionList == 2 then return "POSITION_RETRACT" -- Position to stow the gimbal at prior to retracting + elseif PositionList == 3 then return "POSITION_FFC" -- FFC position, currently unused + elseif PositionList == 4 then return "POSITION_USER_0" -- User-defined position 0 + elseif PositionList == 5 then return "POSITION_USER_1" -- User-defined position 1 + elseif PositionList == 6 then return "NUM_POSITIONS" + end + return "Unknown Value ( " .. PositionList .. " )" +end + +--------------geopointOptions Lookup table ------------------------- +-- Options controlling how the geopoint is interpreted +function get_geopointOptions_string(geopointOptions) + if geopointOptions == 0 then return "geopointNone" -- No geopoint options set. + elseif geopointOptions == 1 then return "geopointStare" -- If set this geopoint will issue a stare packet when it is pointing at the target location. This option is ignored if joystickRange is non-zero. + elseif geopointOptions == 2 then return "geopointClosure" -- If set this geopoint command will cause the gimbal to enter closure mode, in which it will drive at maximum performance to achieve the desired pointing. This option is ignored if the joystickRange is non-zero. + elseif geopointOptions == 3 then return "geopointStareClosure" -- Logical OR of geopointStare and geopointClosure. + elseif geopointOptions == 4 then return "geopointReturnToMode" -- Set this bit to return to the current operation mode after the closure threshold is reached + end + return "Unknown Value ( " .. geopointOptions .. " )" +end + +--------------maxPathPoints Lookup table ------------------------- +-- Maximum number of points in a path. +function get_maxPathPoints_string(maxPathPoints) + if maxPathPoints == 15 then return "MAX_PATH_POINTS" -- Maximum number of points in a path + end + return "Unknown Value ( " .. maxPathPoints .. " )" +end + +--------------FlirNucType_t Lookup table ------------------------- +-- FLIR NUC type enumeration +function get_FlirNucType_t_string(FlirNucType_t) + if FlirNucType_t == 0 then return "NUC_TYPE_MANUAL" -- Typical operation mode, manual FFC only + elseif FlirNucType_t == 1 then return "NUC_TYPE_SSN_NO_MOTION" -- Silent shutterless NUC (SSN), no motion setting + elseif FlirNucType_t == 2 then return "NUC_TYPE_SSN_LOW" -- Silent shutterless NUC (SSN), low setting + elseif FlirNucType_t == 3 then return "NUC_TYPE_SSN_MEDIUM" -- Silent shutterless NUC (SSN), medium setting + elseif FlirNucType_t == 4 then return "NUC_TYPE_SSN_HIGH" -- Silent shutterless NUC (SSN), high setting + end + return "Unknown Value ( " .. FlirNucType_t .. " )" +end + +--------------FlirAgcType_t Lookup table ------------------------- +-- FLIR AGC type enumeration +function get_FlirAgcType_t_string(FlirAgcType_t) + if FlirAgcType_t == 0 then return "AGC_TYPE_DEFAULT" + elseif FlirAgcType_t == 1 then return "AGC_TYPE_AUTO_LINEAR" + end + return "Unknown Value ( " .. FlirAgcType_t .. " )" +end + +--------------SierraPolarity_t Lookup table ------------------------- +-- Enumerated values representing the image polarity setting for SierraOlympia cameras +function get_SierraPolarity_t_string(SierraPolarity_t) + if SierraPolarity_t == 0 then return "SIERRA_POLARITY_WHITE_HOT" -- SierraOlympia White-hot polarity + elseif SierraPolarity_t == 1 then return "SIERRA_POLARITY_BLACK_HOT" -- SierraOlympia Black-hot polarity + end + return "Unknown Value ( " .. SierraPolarity_t .. " )" +end + +--------------SierraColorPalette_t Lookup table ------------------------- +-- Enumerated values representing the scene colorization palette options for SierraOlympia cameras +function get_SierraColorPalette_t_string(SierraColorPalette_t) + if SierraColorPalette_t == 0 then return "SIERRA_PALETTE_MONOCHROME" -- SierraOlympia monochrome palette (grey scale) + elseif SierraColorPalette_t == 1 then return "SIERRA_PALETTE_SOFTLIGHT" -- SierraOlympia soft light palette + elseif SierraColorPalette_t == 2 then return "SIERRA_PALETTE_INFERNAL" -- SierraOlympia infernal palette + elseif SierraColorPalette_t == 3 then return "SIERRA_PALETTE_FULL_SPRECTRUM" -- SierraOlympia full spectrum palette + elseif SierraColorPalette_t == 4 then return "SIERRA_PALETTE_INFERNO" -- SierraOlympia inferno palette + elseif SierraColorPalette_t == 5 then return "SIERRA_PALETTE_ARCUS" -- SierraOlympia arcus palette + elseif SierraColorPalette_t == 6 then return "SIERRA_PALETTE_OCEAN" -- SierraOlympia ocean palette + elseif SierraColorPalette_t == 7 then return "SIERRA_PALETTE_MEMORIAM" -- SierraOlympia memoriam palette + elseif SierraColorPalette_t == 8 then return "SIERRA_PALETTE_COUNT" -- End marker for SierraColorPalette_t + end + return "Unknown Value ( " .. SierraColorPalette_t .. " )" +end + +--------------SierraColorMode_t Lookup table ------------------------- +-- Enumerated values representing the scene colorization mode options for SierraOlympia cameras +function get_SierraColorMode_t_string(SierraColorMode_t) + if SierraColorMode_t == 0 then return "SIERRA_COLOR_DISABLED" -- SierraOlympia monochrome mode (disabled) + elseif SierraColorMode_t == 1 then return "SIERRA_COLOR_FULL" -- SierraOlympia full detail mode + elseif SierraColorMode_t == 2 then return "SIERRA_COLOR_HIGH" -- SierraOlympia high detail mode + elseif SierraColorMode_t == 3 then return "SIERRA_COLOR_NORMAL" -- SierraOlympia normal detail mode + elseif SierraColorMode_t == 4 then return "SIERRA_COLOR_COUNT" -- End marker for SierraColorMode_t + end + return "Unknown Value ( " .. SierraColorMode_t .. " )" +end + +--------------SionyxFrameRate_t Lookup table ------------------------- +-- Frame Rate enumeration for Sionyx cameras +function get_SionyxFrameRate_t_string(SionyxFrameRate_t) + if SionyxFrameRate_t == 0 then return "SIONYX_60_10_FPS" -- 60 FPS native, skipped to 10 FPS + elseif SionyxFrameRate_t == 1 then return "SIONYX_60_12_FPS" -- 60 FPS native, skipped to 12 FPS + elseif SionyxFrameRate_t == 2 then return "SIONYX_60_15_FPS" -- 60 FPS native, skipped to 15 FPS + elseif SionyxFrameRate_t == 3 then return "SIONYX_60_20_FPS" -- 60 FPS native, skipped to 20 FPS + elseif SionyxFrameRate_t == 4 then return "SIONYX_60_30_FPS" -- 60 FPS native, skipped to 30 FPS + elseif SionyxFrameRate_t == 5 then return "SIONYX_60_FPS" -- 60 FPS native + elseif SionyxFrameRate_t == 6 then return "SIONYX_90_15_FPS" -- 90 FPS native, skipped to 15 FPS + elseif SionyxFrameRate_t == 7 then return "SIONYX_90_18_FPS" -- 90 FPS native, skipped to 18 FPS + elseif SionyxFrameRate_t == 8 then return "SIONYX_90_22_5_FPS" -- 90 FPS native, skipped to 22.5 FPS + elseif SionyxFrameRate_t == 9 then return "SIONYX_90_30_FPS" -- 90 FPS native, skipped to 30 FPS + elseif SionyxFrameRate_t == 10 then return "SIONYX_90_45_FPS" -- 90 FPS native, skipped to 45 FPS + elseif SionyxFrameRate_t == 11 then return "SIONYX_90_FPS" -- 90 FPS native + elseif SionyxFrameRate_t == 12 then return "SIONYX_120_20_FPS" -- 120 FPS native, skipped to 20 FPS + elseif SionyxFrameRate_t == 13 then return "SIONYX_120_24_FPS" -- 120 FPS native, skipped to 24 FPS + elseif SionyxFrameRate_t == 14 then return "SIONYX_120_30_FPS" -- 120 FPS native, skipped to 30 FPS + elseif SionyxFrameRate_t == 15 then return "SIONYX_120_40_FPS" -- 120 FPS native, skipped to 40 FPS + elseif SionyxFrameRate_t == 16 then return "SIONYX_120_60_FPS" -- 120 FPS native, skipped to 60 FPS + elseif SionyxFrameRate_t == 17 then return "SIONYX_FPS_COUNT" -- Frame rate count + end + return "Unknown Value ( " .. SionyxFrameRate_t .. " )" +end + +--------------SionyxExposureMode_t Lookup table ------------------------- +-- Exposure mode enumeration for Sionyx cameras +function get_SionyxExposureMode_t_string(SionyxExposureMode_t) + if SionyxExposureMode_t == 0 then return "SIONYX_EXPOSURE_MANUAL" -- Manual exposure mode + elseif SionyxExposureMode_t == 1 then return "SIONYX_EXPOSURE_SEMI_AUTO" -- Semi-auto exposure mode, closed loop of AEC/AGC with influence by brightness trim and integration min/max lines. + elseif SionyxExposureMode_t == 2 then return "SIONYX_EXPOSURE_AUTO" -- Auto exposure mode, closed loop of AEC/AGC + end + return "Unknown Value ( " .. SionyxExposureMode_t .. " )" +end + +--------------CoordFormat_t Lookup table ------------------------- +function get_CoordFormat_t_string(CoordFormat_t) + if CoordFormat_t == 0 then return "COORD_FMT_DEG_DECIMAL" -- Decimal degrees + elseif CoordFormat_t == 1 then return "COORD_FMT_DEG_MIN" -- Degrees + decimal minutes + elseif CoordFormat_t == 2 then return "COORD_FMT_DEG_MIN_SEC" -- Degrees + minutes + seconds + elseif CoordFormat_t == 3 then return "COORD_FMT_MGRS" -- MGRS + elseif CoordFormat_t == 4 then return "COORD_FMT_UTM" -- UTM + end + return "Unknown Value ( " .. CoordFormat_t .. " )" +end + +--------------OrionProtocols_t Lookup table ------------------------- +-- Protocols understood by the Orion UART configuration +function get_OrionProtocols_t_string(OrionProtocols_t) + if OrionProtocols_t == 0 then return "PROTOCOL_NO_CHANGE" -- Do not change the protocol + elseif OrionProtocols_t == 1 then return "PROTOCOL_NONE" -- Disable the port + elseif OrionProtocols_t == 2 then return "PROTOCOL_DEFAULT" -- Use the default protocol. This is port dependent + elseif OrionProtocols_t == 3 then return "PROTOCOL_ORION" -- Orion packet communications protocol + elseif OrionProtocols_t == 4 then return "PROTOCOL_CLEVIS" -- Orion packet communications protocol specific to the clevis + elseif OrionProtocols_t == 5 then return "PROTOCOL_CLEVIS_RAW" -- Clevis raw communications mode + elseif OrionProtocols_t == 6 then return "PROTOCOL_NMEA_GPS" -- GPS input over NMEA + elseif OrionProtocols_t == 7 then return "PROTOCOL_UBLOX_GPS" -- uBlox GPS + elseif OrionProtocols_t == 8 then return "PROTOCOL_NOVATEL_GPS" -- Novatel GPS + elseif OrionProtocols_t == 9 then return "PROTOCOL_MAVLINK_GPS" -- Mavlink GPS + elseif OrionProtocols_t == 10 then return "PROTOCOL_UM7_MAG" -- CH Robotics UM7 magnetometer + elseif OrionProtocols_t == 11 then return "PROTOCOL_SIGHTLINE_VIDEO" -- Sightline video processing + elseif OrionProtocols_t == 12 then return "PROTOCOL_SENSONOR_IMU" -- Sensonor IMU + elseif OrionProtocols_t == 13 then return "PROTOCOL_DMU11_IMU" -- Silicon sensing IMU + elseif OrionProtocols_t == 14 then return "PROTOCOL_DISCOVERY" -- Discovery protocol that decides between novatel, UM7, and Sightline + elseif OrionProtocols_t == 15 then return "PROTOCOL_AIRROBOT" -- Air robot protocol + elseif OrionProtocols_t == 16 then return "PROTOCOL_PROPRIETARY1" -- Proprietary protocol + elseif OrionProtocols_t == 17 then return "PROTOCOL_PROPRIETARY2" -- Proprietary protocol + elseif OrionProtocols_t == 18 then return "PROTOCOL_FLIR" -- FLIR pass-through protocol + elseif OrionProtocols_t == 19 then return "PROTOCOL_EPSON_IMU" -- EPSON IMU protocol + elseif OrionProtocols_t == 20 then return "PROTOCOL_PIKSI" -- Swift Piksi GPS + elseif OrionProtocols_t == 21 then return "PROTOCOL_WEPILOT" -- WePilot AP + elseif OrionProtocols_t == 22 then return "PROTOCOL_ETHERNET" -- Ethernet serial pass-through + elseif OrionProtocols_t == 23 then return "PROTOCOL_VECTORNAV" -- VectorNav IMU + elseif OrionProtocols_t == 24 then return "PROTOCOL_UBLOX_HDG" -- uBlox relative heading + elseif OrionProtocols_t == 25 then return "PROTOCOL_SBG_PULSE_IMU" -- SBG Pulse IMU + elseif OrionProtocols_t == 26 then return "PROTOCOL_HEADWAY_INS" -- PNI Headway IMU + elseif OrionProtocols_t == 27 then return "NUM_PROTOCOL" + end + return "Unknown Value ( " .. OrionProtocols_t .. " )" +end + +--------------EncodingControlRate_t Lookup table ------------------------- +-- Video encoding control rates. +function get_EncodingControlRate_t_string(EncodingControlRate_t) + if EncodingControlRate_t == 0 then return "ENCODE_CONTROL_DISABLE" -- Disable hardware encoding rate control. + elseif EncodingControlRate_t == 1 then return "ENCODE_CONTROL_CONSTANT" -- Constant bitrate with constant frame rate. + elseif EncodingControlRate_t == 2 then return "ENCODE_CONTROL_CBR_VFR" -- Constant bitrate with variable frame rate. + elseif EncodingControlRate_t == 3 then return "ENCODE_CONTROL_VBR_CFR" -- Variable bitrate with constant frame rate. + elseif EncodingControlRate_t == 4 then return "ENCODE_CONTROL_VBR_VFR" -- Variable bitrate with variable frame rate. + elseif EncodingControlRate_t == 5 then return "ENCODE_CONTROL_QUALITY" -- Constant quality. + end + return "Unknown Value ( " .. EncodingControlRate_t .. " )" +end + +--------------BitrateBandIndex_t Lookup table ------------------------- +-- Named bitrate band indexes to map to specific encoder settings. +function get_BitrateBandIndex_t_string(BitrateBandIndex_t) + if BitrateBandIndex_t == 0 then return "ENCODE_IDX_BITRATE_LOW" -- Encoding band index for mapping to lowest bitrate settings. + elseif BitrateBandIndex_t == 1 then return "ENCODE_IDX_BITRATE_MED" -- Encoding band index for mapping to medium bitrate settings. + elseif BitrateBandIndex_t == 2 then return "ENCODE_IDX_BITRATE_HIGH" -- Encoding band index for mapping to high bitrate settings. + elseif BitrateBandIndex_t == 3 then return "ENCODE_IDX_BITRATE_COUNT" -- Count of encoding band idexes. + end + return "Unknown Value ( " .. BitrateBandIndex_t .. " )" +end + +--------------EntropyMode_t Lookup table ------------------------- +-- Video encoding entropy mode options. +function get_EntropyMode_t_string(EntropyMode_t) + if EntropyMode_t == 0 then return "ENTROPY_MODE_NONE" -- Encoder is master of entropy mode and can possibly fall back to CAVLC or CABAC. + elseif EntropyMode_t == 1 then return "ENTROPY_MODE_CAVLC" -- Context-Adaptive Variable-Length Coding. Consumes lower processing resource, but is less efficient, i.e. it may result in larger file sizes for same quality. + elseif EntropyMode_t == 2 then return "ENTROPY_MODE_CABAC" -- Context-Adaptive Binary Arithmetic Coding. More resource intensive algorithm, but will result in better compression efficiency, i.e. smaller sizes with better quality. + end + return "Unknown Value ( " .. EntropyMode_t .. " )" +end + +--------------IntraRefreshMode_t Lookup table ------------------------- +-- Video encoding intra-refresh mode options. +function get_IntraRefreshMode_t_string(IntraRefreshMode_t) + if IntraRefreshMode_t == 0 then return "INTRA_REFRESH_NONE" -- Intra-refresh is disabled. + elseif IntraRefreshMode_t == 1 then return "INTRA_REFRESH_RANDOM" -- Intra-refresh and will update random intra-frame macroblocks at the IntraRefreshMbs rate. + elseif IntraRefreshMode_t == 2 then return "INTRA_REFRESH_CYCLIC" -- Not currently supported. + end + return "Unknown Value ( " .. IntraRefreshMode_t .. " )" +end + +--------------LoopFilterMode_t Lookup table ------------------------- +-- Enables or disables the deblocking filter which can aid with reducing block artifacts, especially at lower bitrates or aggressive compression. +function get_LoopFilterMode_t_string(LoopFilterMode_t) + if LoopFilterMode_t == 0 then return "LOOP_FILTER_NONE" -- Loop filter mode is not specified and encoder can fallback or select mode. + elseif LoopFilterMode_t == 1 then return "LOOP_FILTER_ENABLED" -- Loop filter mode is enabled. + elseif LoopFilterMode_t == 2 then return "LOOP_FILTER_DISABLED" -- Loop filter mode is disabled. + elseif LoopFilterMode_t == 3 then return "LOOP_FILTER_DISABLED_SLICE" -- Mode that is intended for use when SliceMode is enabled. + end + return "Unknown Value ( " .. LoopFilterMode_t .. " )" +end + +--------------SliceMode_t Lookup table ------------------------- +-- Enables or disables the encoder to use slices, allowing emission of part of the frame before the whole is encoded. When slices are enabled with UDP transmission, a single packet loss can equate to slice loss rather than whole frame loss. +function get_SliceMode_t_string(SliceMode_t) + if SliceMode_t == 0 then return "SLICE_MODE_DISABLED" -- Slice mode is disabled. + elseif SliceMode_t == 1 then return "SLICE_MODE_ENABLED" -- Slice mode is enabled and will consult the slice mode macroblock rate. + end + return "Unknown Value ( " .. SliceMode_t .. " )" +end + +--------------StreamType_t Lookup table ------------------------- +-- Network video output stream types +function get_StreamType_t_string(StreamType_t) + if StreamType_t == 0 then return "STREAM_TYPE_H264" -- h.264+KLV stream in an MPEG transport stream + elseif StreamType_t == 1 then return "STREAM_TYPE_MJPEG" -- MJPEG multipart video stream + elseif StreamType_t == 2 then return "STREAM_TYPE_RAW" -- Raw multipart video stream + elseif StreamType_t == 3 then return "STREAM_TYPE_YUV" -- YUV (NV12) multipart video stream + elseif StreamType_t == 4 then return "STREAM_TYPE_H265" -- h.265+KLV stream in an MPEG transport stream + elseif StreamType_t == 5 then return "NUM_STREAM_TYPES" -- Number of video stream type IDs + elseif StreamType_t == 255 then return "STREAM_TYPE_NONE" -- Disable video streaming + end + return "Unknown Value ( " .. StreamType_t .. " )" +end + +--------------OrionCameraType_t Lookup table ------------------------- +-- The type of camera +function get_OrionCameraType_t_string(OrionCameraType_t) + if OrionCameraType_t == 0 then return "CAMERA_TYPE_NONE" -- No camera + elseif OrionCameraType_t == 1 then return "CAMERA_TYPE_VISIBLE" -- Visible light camera + elseif OrionCameraType_t == 2 then return "CAMERA_TYPE_SWIR" -- Short wave infrared camera + elseif OrionCameraType_t == 3 then return "CAMERA_TYPE_MWIR" -- Mid wave infrared camera + elseif OrionCameraType_t == 4 then return "CAMERA_TYPE_LWIR" -- Long wave infrared camera + elseif OrionCameraType_t == 5 then return "CAMERA_TYPE_SPOTTER" -- Visible light spotter camera + elseif OrionCameraType_t == 6 then return "CAMERA_TYPE_NIR" -- Near Infrared Camera + elseif OrionCameraType_t == 7 then return "CAMERA_TYPE_1064" -- Low Light Monochrome + end + return "Unknown Value ( " .. OrionCameraType_t .. " )" +end + +--------------OrionCameraProtocol_t Lookup table ------------------------- +-- The camera communications protocol +function get_OrionCameraProtocol_t_string(OrionCameraProtocol_t) + if OrionCameraProtocol_t == 0 then return "CAMERA_PROTO_UNKNOWN" -- Protocol unknown or unsupported + elseif OrionCameraProtocol_t == 1 then return "CAMERA_PROTO_FLIR" -- FLIR camera + elseif OrionCameraProtocol_t == 2 then return "CAMERA_PROTO_APTINA" -- Aptina camera + elseif OrionCameraProtocol_t == 3 then return "CAMERA_PROTO_ZAFIRO" -- Zafiro camera + elseif OrionCameraProtocol_t == 4 then return "CAMERA_PROTO_HITACHI" -- Hitachi camera + elseif OrionCameraProtocol_t == 5 then return "CAMERA_PROTO_BAE" -- BAE camera + elseif OrionCameraProtocol_t == 6 then return "CAMERA_PROTO_SONY" -- Sony camera + elseif OrionCameraProtocol_t == 7 then return "CAMERA_PROTO_KTNC" -- KTnC camera + elseif OrionCameraProtocol_t == 8 then return "CAMERA_PROTO_ATTOLLO" -- Attollo camera + elseif OrionCameraProtocol_t == 9 then return "CAMERA_PROTO_MIRA" -- Mira SWIR PRF detecting camera + elseif OrionCameraProtocol_t == 10 then return "CAMERA_PROTO_ALVIUM" -- Alvium camera + elseif OrionCameraProtocol_t == 11 then return "CAMERA_PROTO_OMNIVIS" -- OmniVision camera + elseif OrionCameraProtocol_t == 12 then return "CAMERA_PROTO_SIERRA" -- SierraOlympia camera + elseif OrionCameraProtocol_t == 13 then return "CAMERA_PROTO_SIONYX" -- Sionyx camera + elseif OrionCameraProtocol_t == 14 then return "CAMERA_PROTO_LYNRED" -- Lynred camera + elseif OrionCameraProtocol_t == 15 then return "NUM_CAMERA_PROTOS" -- Number of available camera protocols + end + return "Unknown Value ( " .. OrionCameraProtocol_t .. " )" +end + +----------- Called Functions Section +---------------------- Structure Print Section ---------------------- +-- Compresssed date format. +function print_Date_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local Date_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local year, month, day + -- 3 Data Elements found: + if size >= indexOffset + 2 then + year = buffer(indexOffset, 1):bitfield(0, 7) + 2000 -- Primitive year Type: [unsigned] size in bits:7 + Date_tree:add(buffer(indexOffset, 1), "year: " .. buffer(indexOffset, 1):bitfield(0, 7) + 2000) + month = buffer(indexOffset, 2):bitfield(7, 4) -- Primitive month Type: [unsigned] size in bits:4 + Date_tree:add(buffer(indexOffset, 2), "month: " .. buffer(indexOffset, 2):bitfield(7, 4)) + day = buffer(indexOffset, 2):bitfield(11, 5) -- Primitive day Type: [unsigned] size in bits:5 + Date_tree:add(buffer(indexOffset, 2), "day: " .. buffer(indexOffset, 2):bitfield(11, 5)) + indexOffset = indexOffset + 2 + end + end + + return indexOffset +end + +-- Track position data +function print_PrimaryTrackData_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local PrimaryTrackData_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Size, Confidence, Coasting, Active + -- 6 Data Elements found: + if size >= indexOffset + 4 then + Pos = buffer(indexOffset, 4) -- Primitive Pos Type: [float] size in bits:32 + PrimaryTrackData_tree:add(buffer(indexOffset, 4), "Pos: " .. buffer(indexOffset, 4)) + indexOffset = indexOffset + 4 + end + if size >= indexOffset + 1 then + Size = buffer(indexOffset, 1):uint() / 1000 -- Primitive Size Type: [float] size in bits:8 + PrimaryTrackData_tree:add(buffer(indexOffset, 1), "Size: " .. buffer(indexOffset, 1):uint() / 1000) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + Confidence = buffer(indexOffset, 1):uint() / 100 -- Primitive Confidence Type: [float] size in bits:8 + PrimaryTrackData_tree:add(buffer(indexOffset, 1), "Confidence: " .. buffer(indexOffset, 1):uint() / 100) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + -- Not in Memory, but encoded Value [Reserved0] size in bits:6 + Coasting = buffer(indexOffset, 1):bitfield(6, 1) -- Primitive Coasting Type: [uint32_t] size in bits:1 + PrimaryTrackData_tree:add(buffer(indexOffset, 1), "Coasting: " .. buffer(indexOffset, 1):bitfield(6, 1)) + Active = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive Active Type: [uint32_t] size in bits:1 + PrimaryTrackData_tree:add(buffer(indexOffset, 1), "Active: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + end + + return indexOffset +end + +-- Structure for holding a gimbal axis command (legacy format). +function print_OrionCmd_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local OrionCmd_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Mode, Stabilized, ImpulseTime + -- 4 Data Elements found: + if size >= indexOffset + 4 then + Target = buffer(indexOffset, 4) -- Primitive Target Type: [float] size in bits:32 + indexOffset = signed16x2ToPanTilt(OrionCmd_tree, "Target", buffer, indexOffset, 4, 1000.0) + end + if size >= indexOffset + 1 then + Mode = buffer(indexOffset, 1):uint() -- Enumeration Mode Type: [OrionMode_t] size in bits: 8 + OrionCmd_tree:add(buffer(indexOffset, 1), "Mode: " .. get_OrionMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + Stabilized = buffer(indexOffset, 1):uint() -- Primitive Stabilized Type: [uint8_t] size in bits:8 + OrionCmd_tree:add(buffer(indexOffset, 1), "Stabilized: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + ImpulseTime = buffer(indexOffset, 1):uint() / 10.0 -- Primitive ImpulseTime Type: [float] size in bits:8 + OrionCmd_tree:add(buffer(indexOffset, 1), "ImpulseTime: " .. buffer(indexOffset, 1):uint() / 10.0 .. " seconds") + indexOffset = indexOffset + 1 + end + end + + return indexOffset +end + +-- Extended command structure. Identical to OrionCmd plus sequence number and flags. +function print_OrionCmdExtended_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local OrionCmdExtended_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Mode, Stabilized, ImpulseTime, SequenceNum, Flags + -- 6 Data Elements found: + if size >= indexOffset + 4 then + Target = buffer(indexOffset, 4) -- Primitive Target Type: [float] size in bits:32 + OrionCmdExtended_tree:add(buffer(indexOffset, 4), "Target: " .. buffer(indexOffset, 4)) + indexOffset = indexOffset + 4 + end + if size >= indexOffset + 1 then + Mode = buffer(indexOffset, 1):uint() -- Enumeration Mode Type: [OrionMode_t] size in bits: 8 + OrionCmdExtended_tree:add(buffer(indexOffset, 1), "Mode: " .. get_OrionMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + Stabilized = buffer(indexOffset, 1):uint() -- Primitive Stabilized Type: [uint8_t] size in bits:8 + OrionCmdExtended_tree:add(buffer(indexOffset, 1), "Stabilized: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + ImpulseTime = buffer(indexOffset, 1):uint() / 10.0 -- Primitive ImpulseTime Type: [float] size in bits:8 + OrionCmdExtended_tree:add(buffer(indexOffset, 1), "ImpulseTime: " .. buffer(indexOffset, 1):uint() / 10.0) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 2 then + SequenceNum = buffer(indexOffset, 2):uint() -- Primitive SequenceNum Type: [uint16_t] size in bits:16 + OrionCmdExtended_tree:add(buffer(indexOffset, 2), "SequenceNum: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 1 then + Flags = buffer(indexOffset, 1):uint() -- Primitive Flags Type: [uint8_t] size in bits:8 + OrionCmdExtended_tree:add(buffer(indexOffset, 1), "Flags: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + end + + return indexOffset +end + +-- Extended response structure. All diagnostic fields populated by gimbal. +function print_OrionCmdExtendedResponse_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local OrionCmdExtendedResponse_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Mode, Stabilized, ImpulseTime, SequenceNum, ClevisTime, DropsDetected, Flags + -- 11 Data Elements found: + if size >= indexOffset + 4 then + Target = buffer(indexOffset, 4) -- Primitive Target Type: [float] size in bits:32 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 4), "Target: " .. buffer(indexOffset, 4)) + indexOffset = indexOffset + 4 + end + if size >= indexOffset + 1 then + Mode = buffer(indexOffset, 1):uint() -- Enumeration Mode Type: [OrionMode_t] size in bits: 8 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 1), "Mode: " .. get_OrionMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + Stabilized = buffer(indexOffset, 1):uint() -- Primitive Stabilized Type: [uint8_t] size in bits:8 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 1), "Stabilized: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + ImpulseTime = buffer(indexOffset, 1):uint() / 10.0 -- Primitive ImpulseTime Type: [float] size in bits:8 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 1), "ImpulseTime: " .. buffer(indexOffset, 1):uint() / 10.0) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 2 then + SequenceNum = buffer(indexOffset, 2):uint() -- Primitive SequenceNum Type: [uint16_t] size in bits:16 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 2), "SequenceNum: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 3 then + ClevisTime = buffer(indexOffset, 3):uint() -- Primitive ClevisTime Type: [uint32_t] size in bits:24 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 3), "ClevisTime: " .. buffer(indexOffset, 3):uint()) + indexOffset = indexOffset + 3 + end + if size >= indexOffset + 1 then + DropsDetected = buffer(indexOffset, 1):uint() -- Primitive DropsDetected Type: [uint8_t] size in bits:8 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 1), "DropsDetected: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 6 then + StabGyroRate = buffer(indexOffset, 6) -- Primitive StabGyroRate Type: [float] size in bits:48 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 6), "StabGyroRate: " .. buffer(indexOffset, 6)) + indexOffset = indexOffset + 6 + end + if size >= indexOffset + 4 then + EncoderPos = buffer(indexOffset, 4) -- Primitive EncoderPos Type: [float] size in bits:32 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 4), "EncoderPos: " .. buffer(indexOffset, 4)) + indexOffset = indexOffset + 4 + end + if size >= indexOffset + 4 then + EncoderRate = buffer(indexOffset, 4) -- Primitive EncoderRate Type: [float] size in bits:32 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 4), "EncoderRate: " .. buffer(indexOffset, 4)) + indexOffset = indexOffset + 4 + end + if size >= indexOffset + 1 then + Flags = buffer(indexOffset, 1):uint() -- Primitive Flags Type: [uint8_t] size in bits:8 + OrionCmdExtendedResponse_tree:add(buffer(indexOffset, 1), "Flags: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + end + + return indexOffset +end + +-- Camera angular offset error data, between this camera and another unified camera. +function print_CameraAngularOffsets_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local CameraAngularOffsets_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local ErrorPanRads, ErrorTiltRads + -- 2 Data Elements found: + if size >= indexOffset + 2 then + ErrorPanRads = buffer(indexOffset, 2):int() -- Primitive ErrorPanRads Type: [float] size in bits:16 + CameraAngularOffsets_tree:add(buffer(indexOffset, 2), "ErrorPanRads: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + ErrorTiltRads = buffer(indexOffset, 2):int() -- Primitive ErrorTiltRads Type: [float] size in bits:16 + CameraAngularOffsets_tree:add(buffer(indexOffset, 2), "ErrorTiltRads: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + end + end + + return indexOffset +end + +-- Per-laser state information. +function print_OrionLaserState_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local OrionLaserState_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Type, Enabled, Armed, Active, GroundSpeedLock, AltitudeLock, PasswordLock, ApCommLock, + ApFlyingLock, BypassEnabled, PitchAngleLock, WatchdogLock, AuxOutputStatus, AuxOperatingMode, VccUndervoltage, Reserved, LaserTemp, + WaitTimer + -- 18 Data Elements found: + if size >= indexOffset + 1 then + Type = buffer(indexOffset, 1):uint() -- Enumeration Type Type: [OrionLaserType_t] size in bits: 8 + OrionLaserState_tree:add(buffer(indexOffset, 1), "Type: " .. get_OrionLaserType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + Enabled = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive Enabled Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "Enabled: " .. buffer(indexOffset, 1):bitfield(0, 1)) + Armed = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive Armed Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "Armed: " .. buffer(indexOffset, 1):bitfield(1, 1)) + Active = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive Active Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "Active: " .. buffer(indexOffset, 1):bitfield(2, 1)) + GroundSpeedLock = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive GroundSpeedLock Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "GroundSpeedLock: " .. buffer(indexOffset, 1):bitfield(3, 1)) + AltitudeLock = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive AltitudeLock Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "AltitudeLock: " .. buffer(indexOffset, 1):bitfield(4, 1)) + PasswordLock = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive PasswordLock Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "PasswordLock: " .. buffer(indexOffset, 1):bitfield(5, 1)) + ApCommLock = buffer(indexOffset, 1):bitfield(6, 1) -- Primitive ApCommLock Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "ApCommLock: " .. buffer(indexOffset, 1):bitfield(6, 1)) + ApFlyingLock = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive ApFlyingLock Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "ApFlyingLock: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + BypassEnabled = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive BypassEnabled Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "BypassEnabled: " .. buffer(indexOffset, 1):bitfield(0, 1)) + PitchAngleLock = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive PitchAngleLock Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "PitchAngleLock: " .. buffer(indexOffset, 1):bitfield(1, 1)) + WatchdogLock = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive WatchdogLock Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "WatchdogLock: " .. buffer(indexOffset, 1):bitfield(2, 1)) + AuxOutputStatus = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive AuxOutputStatus Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "AuxOutputStatus: " .. buffer(indexOffset, 1):bitfield(3, 1)) + AuxOperatingMode = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive AuxOperatingMode Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "AuxOperatingMode: " .. buffer(indexOffset, 1):bitfield(4, 1)) + VccUndervoltage = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive VccUndervoltage Type: [unsigned] size in bits:1 + OrionLaserState_tree:add(buffer(indexOffset, 1), "VccUndervoltage: " .. buffer(indexOffset, 1):bitfield(5, 1)) + Reserved = buffer(indexOffset, 1):bitfield(6, 2) -- Primitive Reserved Type: [unsigned] size in bits:2 + OrionLaserState_tree:add(buffer(indexOffset, 1), "Reserved: " .. buffer(indexOffset, 1):bitfield(6, 2)) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + LaserTemp = buffer(indexOffset, 1):uint() / 1.0 -- Primitive LaserTemp Type: [float] size in bits:8 + indexOffset = unsigned8ToTemperature(OrionLaserState_tree, "LaserTemp", buffer, indexOffset, 1, 1.0) + end + if size >= indexOffset + 2 then + WaitTimer = buffer(indexOffset, 2):uint() -- Primitive WaitTimer Type: [uint16_t] size in bits:16 + OrionLaserState_tree:add(buffer(indexOffset, 2), "WaitTimer: " .. buffer(indexOffset, 2):uint() .. " ms") + indexOffset = indexOffset + 2 + end + end + + return indexOffset +end + +-- Single PRF detection information +function print_PRFDetect_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local PRFDetect_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local PRF, panAngle, tiltAngle + -- 3 Data Elements found: + if size >= indexOffset + 2 then + PRF = buffer(indexOffset, 2):uint() -- Primitive PRF Type: [uint16_t] size in bits:16 + PRFDetect_tree:add(buffer(indexOffset, 2), "PRF: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 4 then + panAngle = buffer(indexOffset, 4):float() -- Primitive panAngle Type: [float] size in bits:32 + indexOffset = float32ToDegrees(PRFDetect_tree, "panAngle", buffer, indexOffset, 4, 1) + end + if size >= indexOffset + 4 then + tiltAngle = buffer(indexOffset, 4):float() -- Primitive tiltAngle Type: [float] size in bits:32 + indexOffset = float32ToDegrees(PRFDetect_tree, "tiltAngle", buffer, indexOffset, 4, 1) + end + end + + return indexOffset +end + +-- Per-Core CPU load information +function print_CoreLoading_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local CoreLoading_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local cpuLoad, heapLoad, stackLoad, numThreads + -- 6 Data Elements found: + if size >= indexOffset + 1 then + cpuLoad = buffer(indexOffset, 1):uint() -- Primitive cpuLoad Type: [float] size in bits:8 + indexOffset = displayLoad(CoreLoading_tree, "cpuLoad", buffer, indexOffset, 1, 1) + end + if size >= indexOffset + 1 then + heapLoad = buffer(indexOffset, 1):uint() -- Primitive heapLoad Type: [float] size in bits:8 + indexOffset = displayLoad(CoreLoading_tree, "heapLoad", buffer, indexOffset, 1, 1) + end + if size >= indexOffset + 1 then + stackLoad = buffer(indexOffset, 1):uint() -- Primitive stackLoad Type: [float] size in bits:8 + indexOffset = displayLoad(CoreLoading_tree, "stackLoad", buffer, indexOffset, 1, 1) + end + if size >= indexOffset + 1 then + -- Not in Memory, but encoded Value [reserved] size in bits:8 + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + numThreads = buffer(indexOffset, 1):uint() -- Primitive numThreads Type: [uint8_t] size in bits:8 + CoreLoading_tree:add(buffer(indexOffset, 1), "numThreads: " .. buffer(indexOffset, 1):uint() .. " threads") + indexOffset = indexOffset + 1 + end + -- Embedded Struct: ThreadLoading Type: [ThreadLoading_t] size in bits reported:48 + indexOffset = print_ThreadLoading_t(CoreLoading_tree, "ThreadLoading", buffer, id, size, indexOffset, 6, numThreads ) + end + + return indexOffset +end + +-- A series of points containing FFT-derived frequency and magnitude data +function print_FftData_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local FftData_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Frequency + -- 3 Data Elements found: + if size >= indexOffset + 2 then + Frequency = buffer(indexOffset, 2):uint() -- Primitive Frequency Type: [float] size in bits:16 + indexOffset = unsigned16ToHertz(FftData_tree, "Frequency", buffer, indexOffset, 2, 1) + end + if size >= indexOffset + 3 then + Accel = buffer(indexOffset, 3) -- Primitive Accel Type: [float] size in bits:24 + indexOffset = unsigned8x3ToMagnitude(FftData_tree, "Accel", buffer, indexOffset, 3, 1) + end + if size >= indexOffset + 3 then + Gyro = buffer(indexOffset, 3) -- Primitive Gyro Type: [float] size in bits:24 + indexOffset = unsigned8x3ToMagnitude(FftData_tree, "Gyro", buffer, indexOffset, 3, 1) + end + end + + return indexOffset +end + +-- Detection Data MISB 0903.6 +function print_TleDetects_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local TleDetects_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local ID, SigmaNorth, SigmaEast, SigmaDown, RhoNorthEast, RhoNorthDown, RhoEastDown + -- 7 Data Elements found: + if size >= indexOffset + 1 then + ID = buffer(indexOffset, 1):uint() -- Primitive ID Type: [uint8_t] size in bits:8 + TleDetects_tree:add(buffer(indexOffset, 1), "ID: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 2 then + SigmaNorth = buffer(indexOffset, 2):uint() -- Primitive SigmaNorth Type: [float] size in bits:16 + TleDetects_tree:add(buffer(indexOffset, 2), "SigmaNorth: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + SigmaEast = buffer(indexOffset, 2):uint() -- Primitive SigmaEast Type: [float] size in bits:16 + TleDetects_tree:add(buffer(indexOffset, 2), "SigmaEast: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + SigmaDown = buffer(indexOffset, 2):uint() -- Primitive SigmaDown Type: [float] size in bits:16 + TleDetects_tree:add(buffer(indexOffset, 2), "SigmaDown: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + RhoNorthEast = buffer(indexOffset, 2):uint() -- Primitive RhoNorthEast Type: [float] size in bits:16 + TleDetects_tree:add(buffer(indexOffset, 2), "RhoNorthEast: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + RhoNorthDown = buffer(indexOffset, 2):uint() -- Primitive RhoNorthDown Type: [float] size in bits:16 + TleDetects_tree:add(buffer(indexOffset, 2), "RhoNorthDown: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + RhoEastDown = buffer(indexOffset, 2):uint() -- Primitive RhoEastDown Type: [float] size in bits:16 + TleDetects_tree:add(buffer(indexOffset, 2), "RhoEastDown: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + end + + return indexOffset +end + +-- +function print_PosPreset_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local PosPreset_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Pan, Tilt, Enabled + -- 4 Data Elements found: + if size >= indexOffset + 2 then + Pan = buffer(indexOffset, 2):int() -- Primitive Pan Type: [float] size in bits:16 + PosPreset_tree:add(buffer(indexOffset, 2), "Pan: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + Tilt = buffer(indexOffset, 2):uint() -- Primitive Tilt Type: [float] size in bits:16 + PosPreset_tree:add(buffer(indexOffset, 2), "Tilt: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 4 then + Enabled = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive Enabled Type: [uint32_t] size in bits:1 + PosPreset_tree:add(buffer(indexOffset, 1), "Enabled: " .. buffer(indexOffset, 1):bitfield(0, 1)) + -- Not in Memory, but encoded Value [Reserved] size in bits:31 + indexOffset = indexOffset + 4 + end + end + + return indexOffset +end + +-- List of path points +function print_Point_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local Point_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + -- 1 Data Elements found: + if size >= indexOffset + 9 then + posEcef = buffer(indexOffset, 9) -- Primitive posEcef Type: [float] size in bits:72 + indexOffset = signed24x3ToPoints(Point_tree, "posEcef", buffer, indexOffset, 9, 1) + end + end + + return indexOffset +end + +-- +function print_TelemetryOptions_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local TelemetryOptions_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local CameraPos, TargetPos, Fov, Range, MetricAlt, MetricDist, CoordFormat, Date, + Time, NorthIndicator, UserString + -- 12 Data Elements found: + if size >= indexOffset + 4 then + CameraPos = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive CameraPos Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 1), "CameraPos: " .. buffer(indexOffset, 1):bitfield(0, 1)) + TargetPos = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive TargetPos Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 1), "TargetPos: " .. buffer(indexOffset, 1):bitfield(1, 1)) + Fov = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive Fov Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 1), "Fov: " .. buffer(indexOffset, 1):bitfield(2, 1)) + Range = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive Range Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 1), "Range: " .. buffer(indexOffset, 1):bitfield(3, 1)) + MetricAlt = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive MetricAlt Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 1), "MetricAlt: " .. buffer(indexOffset, 1):bitfield(4, 1)) + MetricDist = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive MetricDist Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 1), "MetricDist: " .. buffer(indexOffset, 1):bitfield(5, 1)) + CoordFormat = buffer(indexOffset, 2):bitfield(6, 3) -- Enumeration CoordFormat Type: [CoordFormat_t] size in bits: 3 + TelemetryOptions_tree:add(buffer(indexOffset, 2), "CoordFormat: " .. get_CoordFormat_t_string(buffer(indexOffset, 2):bitfield(6, 3) ) .. " [" .. buffer(indexOffset, 2):bitfield(6, 3) .. "]") + Date = buffer(indexOffset, 2):bitfield(9, 1) -- Primitive Date Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 2), "Date: " .. buffer(indexOffset, 2):bitfield(9, 1)) + Time = buffer(indexOffset, 2):bitfield(10, 1) -- Primitive Time Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 2), "Time: " .. buffer(indexOffset, 2):bitfield(10, 1)) + NorthIndicator = buffer(indexOffset, 2):bitfield(11, 1) -- Primitive NorthIndicator Type: [uint32_t] size in bits:1 + TelemetryOptions_tree:add(buffer(indexOffset, 2), "NorthIndicator: " .. buffer(indexOffset, 2):bitfield(11, 1)) + -- Not in Memory, but encoded Value [Reserved] size in bits:20 + indexOffset = indexOffset + 4 + end + local strSize = 40 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + UserString = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive UserString Type: [char] size in bits:320 + TelemetryOptions_tree:add(buffer(indexOffset, strSize), "UserString: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + end + + return indexOffset +end + +-- Camera recording information for 1st, 2nd, 3rd cameras. +function print_CameraInformation_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local CameraInformation_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Status, StreamId, Bitrate, FrameStatistics, Enabled, Reserved0 + -- 6 Data Elements found: + if size >= indexOffset + 1 then + Status = buffer(indexOffset, 1):uint() -- Enumeration Status Type: [VideoRecordState_t] size in bits: 8 + CameraInformation_tree:add(buffer(indexOffset, 1), "Status: " .. get_VideoRecordState_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + StreamId = buffer(indexOffset, 1):uint() -- Primitive StreamId Type: [uint8_t] size in bits:8 + CameraInformation_tree:add(buffer(indexOffset, 1), "StreamId: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 2 then + Bitrate = buffer(indexOffset, 2):uint() -- Primitive Bitrate Type: [uint16_t] size in bits:16 + CameraInformation_tree:add(buffer(indexOffset, 2), "Bitrate: " .. buffer(indexOffset, 2):uint() .. " kbps") + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + FrameStatistics = buffer(indexOffset, 2):int() / 1000 -- Primitive FrameStatistics Type: [float] size in bits:16 + CameraInformation_tree:add(buffer(indexOffset, 2), "FrameStatistics: " .. buffer(indexOffset, 2):int() / 1000) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 8 then + Enabled = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive Enabled Type: [unsigned] size in bits:1 + CameraInformation_tree:add(buffer(indexOffset, 1), "Enabled: " .. buffer(indexOffset, 1):bitfield(0, 1)) + Reserved0 = buffer(indexOffset, 8):uint64() -- Primitive Reserved0 Type: [uint64_t] size in bits:64 + CameraInformation_tree:add(buffer(indexOffset, 8), "Reserved0: " .. buffer(indexOffset, 8):uint64()) + indexOffset = indexOffset + 8 + end + end + + return indexOffset +end + +-- +function print_Error_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local Error_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local DiskFull, Disk80Percent, BadStatistics, Reserved + -- 4 Data Elements found: + if size >= indexOffset + 1 then + DiskFull = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive DiskFull Type: [unsigned] size in bits:1 + Error_tree:add(buffer(indexOffset, 1), "DiskFull: " .. buffer(indexOffset, 1):bitfield(0, 1)) + Disk80Percent = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive Disk80Percent Type: [unsigned] size in bits:1 + Error_tree:add(buffer(indexOffset, 1), "Disk80Percent: " .. buffer(indexOffset, 1):bitfield(1, 1)) + BadStatistics = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive BadStatistics Type: [unsigned] size in bits:1 + Error_tree:add(buffer(indexOffset, 1), "BadStatistics: " .. buffer(indexOffset, 1):bitfield(2, 1)) + Reserved = buffer(indexOffset, 1):bitfield(3, 5) -- Primitive Reserved Type: [unsigned] size in bits:5 + Error_tree:add(buffer(indexOffset, 1), "Reserved: " .. buffer(indexOffset, 1):bitfield(3, 5)) + indexOffset = indexOffset + 1 + end + end + + return indexOffset +end + +-- Encoding settings across different bitrate zones, e.g. ENCODE_MODE_BITRATE_LOW/MED/HIGH +function print_VideoEncodingSettings_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local VideoEncodingSettings_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local BitrateThresholdBps, ControlRate, EntropyMode, IdrInterval, IntraRefreshMode, IntraRefreshMbs, LoopFilterMode, SliceMode, + QuantIFrameMin, QuantIFrameMax, QuantPFrameMin, QuantPFrameMax + -- 13 Data Elements found: + if size >= indexOffset + 4 then + BitrateThresholdBps = buffer(indexOffset, 4):uint() -- Primitive BitrateThresholdBps Type: [uint32_t] size in bits:32 + VideoEncodingSettings_tree:add(buffer(indexOffset, 4), "BitrateThresholdBps: " .. buffer(indexOffset, 4):uint() .. "bps") + indexOffset = indexOffset + 4 + end + if size >= indexOffset + 1 then + ControlRate = buffer(indexOffset, 1):uint() -- Enumeration ControlRate Type: [EncodingControlRate_t] size in bits: 8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "ControlRate: " .. get_EncodingControlRate_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + EntropyMode = buffer(indexOffset, 1):uint() -- Enumeration EntropyMode Type: [EntropyMode_t] size in bits: 8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "EntropyMode: " .. get_EntropyMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 2 then + IdrInterval = buffer(indexOffset, 2):uint() -- Primitive IdrInterval Type: [uint16_t] size in bits:16 + VideoEncodingSettings_tree:add(buffer(indexOffset, 2), "IdrInterval: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 1 then + IntraRefreshMode = buffer(indexOffset, 1):uint() -- Enumeration IntraRefreshMode Type: [IntraRefreshMode_t] size in bits: 8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "IntraRefreshMode: " .. get_IntraRefreshMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 2 then + IntraRefreshMbs = buffer(indexOffset, 2):uint() -- Primitive IntraRefreshMbs Type: [uint16_t] size in bits:16 + VideoEncodingSettings_tree:add(buffer(indexOffset, 2), "IntraRefreshMbs: " .. buffer(indexOffset, 2):uint() .. "MacroBlocks") + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 1 then + LoopFilterMode = buffer(indexOffset, 1):uint() -- Enumeration LoopFilterMode Type: [LoopFilterMode_t] size in bits: 8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "LoopFilterMode: " .. get_LoopFilterMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + SliceMode = buffer(indexOffset, 1):uint() -- Enumeration SliceMode Type: [SliceMode_t] size in bits: 8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "SliceMode: " .. get_SliceMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + QuantIFrameMin = buffer(indexOffset, 1):uint() -- Primitive QuantIFrameMin Type: [uint8_t] size in bits:8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "QuantIFrameMin: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + QuantIFrameMax = buffer(indexOffset, 1):uint() -- Primitive QuantIFrameMax Type: [uint8_t] size in bits:8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "QuantIFrameMax: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + QuantPFrameMin = buffer(indexOffset, 1):uint() -- Primitive QuantPFrameMin Type: [uint8_t] size in bits:8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "QuantPFrameMin: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + QuantPFrameMax = buffer(indexOffset, 1):uint() -- Primitive QuantPFrameMax Type: [uint8_t] size in bits:8 + VideoEncodingSettings_tree:add(buffer(indexOffset, 1), "QuantPFrameMax: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 8 then + -- Not in Memory, but encoded Value [Reserved] size in bits:64 + indexOffset = indexOffset + 8 + end + end + + return indexOffset +end + +-- Camera settings information +function print_OrionCamSettings_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local OrionCamSettings_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local Type, Proto, MinFocalLength, MaxFocalLength, PixelPitch, ArrayWidth, ArrayHeight + -- 12 Data Elements found: + if size >= indexOffset + 1 then + -- Not Encoded Gpio Type: [uint8_t] + -- Not Encoded GpioActiveState Type: [uint8_t] + Type = buffer(indexOffset, 1):uint() -- Enumeration Type Type: [OrionCameraType_t] size in bits: 8 + OrionCamSettings_tree:add(buffer(indexOffset, 1), "Type: " .. get_OrionCameraType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 1 then + Proto = buffer(indexOffset, 1):uint() -- Enumeration Proto Type: [OrionCameraProtocol_t] size in bits: 8 + OrionCamSettings_tree:add(buffer(indexOffset, 1), "Proto: " .. get_OrionCameraProtocol_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= indexOffset + 4 then + MinFocalLength = buffer(indexOffset, 4):uint() / 1000 -- Primitive MinFocalLength Type: [float] size in bits:32 + indexOffset = unsigned32ToUMScaled(OrionCamSettings_tree, "MinFocalLength", buffer, indexOffset, 4, 1000) + end + if size >= indexOffset + 4 then + MaxFocalLength = buffer(indexOffset, 4):uint() / 1000 -- Primitive MaxFocalLength Type: [float] size in bits:32 + indexOffset = unsigned32ToUMScaled(OrionCamSettings_tree, "MaxFocalLength", buffer, indexOffset, 4, 1000) + end + if size >= indexOffset + 2 then + PixelPitch = buffer(indexOffset, 2):uint() / 1000000 -- Primitive PixelPitch Type: [float] size in bits:16 + indexOffset = unsigned16ToNMPixelsScaled(OrionCamSettings_tree, "PixelPitch", buffer, indexOffset, 2, 1000000) + end + if size >= indexOffset + 2 then + ArrayWidth = buffer(indexOffset, 2):uint() -- Primitive ArrayWidth Type: [uint16_t] size in bits:16 + OrionCamSettings_tree:add(buffer(indexOffset, 2), "ArrayWidth: " .. buffer(indexOffset, 2):uint() .. " px") + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 2 then + ArrayHeight = buffer(indexOffset, 2):uint() -- Primitive ArrayHeight Type: [uint16_t] size in bits:16 + OrionCamSettings_tree:add(buffer(indexOffset, 2), "ArrayHeight: " .. buffer(indexOffset, 2):uint() .. " px") + indexOffset = indexOffset + 2 + end + if size >= indexOffset + 4 then + -- Not Encoded FrameRate Type: [float] + AlignMin = buffer(indexOffset, 4) -- Primitive AlignMin Type: [float] size in bits:32 + indexOffset = signed16x2ToPanTiltOffset(OrionCamSettings_tree, "AlignMin", buffer, indexOffset, 4, 1) + end + if size >= indexOffset + 4 then + AlignMax = buffer(indexOffset, 4) -- Primitive AlignMax Type: [float] size in bits:32 + indexOffset = signed16x2ToPanTiltOffset(OrionCamSettings_tree, "AlignMax", buffer, indexOffset, 4, 1) + end + end + + return indexOffset +end + +-- Per-thread information, in order of priority (highest to lowest) +function print_ThreadLoading_t(subtree, memberName, buffer, id, size, index, structSize, arraySize) + if size == 0 then + return index + end + local indexOffset = index + for i=0, arraySize-1 do + local name + if arraySize > 1 then + name = memberName .. "[" .. i + 1 .. "]" + else + name = memberName + end + if(structSize > size - indexOffset) then + structSize = size - indexOffset + end + local ThreadLoading_tree = makeStructureSubtreeOrionPublic(subtree, buffer(indexOffset, structSize), name, structSize) + local cpuLoad, heapLoad, stackLoad, watchdogLeft, numIterations, worstcase + -- 6 Data Elements found: + if size >= indexOffset + 1 then + cpuLoad = buffer(indexOffset, 1):uint() -- Primitive cpuLoad Type: [float] size in bits:8 + indexOffset = displayLoad(ThreadLoading_tree, "cpuLoad", buffer, indexOffset, 1, 1) + end + if size >= indexOffset + 1 then + heapLoad = buffer(indexOffset, 1):uint() -- Primitive heapLoad Type: [float] size in bits:8 + indexOffset = displayLoad(ThreadLoading_tree, "heapLoad", buffer, indexOffset, 1, 1) + end + if size >= indexOffset + 1 then + stackLoad = buffer(indexOffset, 1):uint() -- Primitive stackLoad Type: [float] size in bits:8 + indexOffset = displayLoad(ThreadLoading_tree, "stackLoad", buffer, indexOffset, 1, 1) + end + if size >= indexOffset + 1 then + watchdogLeft = buffer(indexOffset, 1):uint() -- Primitive watchdogLeft Type: [float] size in bits:8 + indexOffset = displayLoad(ThreadLoading_tree, "watchdogLeft", buffer, indexOffset, 1, 1) + end + if size >= indexOffset + 1 then + numIterations = buffer(indexOffset, 1):uint() / 0.1 -- Primitive numIterations Type: [uint16_t] size in bits:8 + indexOffset = displayIterations(ThreadLoading_tree, "numIterations", buffer, indexOffset, 1, 0.1) + end + if size >= indexOffset + 1 then + worstcase = buffer(indexOffset, 1):uint() -- Primitive worstcase Type: [float] size in bits:8 + indexOffset = unsignedToFloat32(ThreadLoading_tree, "worstcase", buffer, indexOffset, 1, 1) + end + end + + return indexOffset +end + +---------------------- Packet Print Section ---------------------- +-- Packet ID: ORION_PKT_GEOLOCATE_TELEMETRY +function print_GeolocateTelemetryCore(subtree, buffer, id, size, index) + local name = "GeolocateTelemetryCore" + local indexOffset = 0 + local GeolocateTelemetryCore_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(GeolocateTelemetryCore_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local systemTime, gpsITOW, gpsWeek, geoidUndulation, posLat, posLon, posAlt, pan, + tilt, hfov, vfov, pixelWidth, pixelHeight, mode, pathProgress, stareTime, pathFrom, + pathTo, imageShiftDeltaTime, imageShiftConfidence, rangeSource, leapSeconds, panAlignment, tiltAlignment, insRotationOption, imageRotation, + cameraIndex, hasTrackData + -- 35 Data Elements found: + if size >= (indexOffset + 4) then + systemTime = buffer(indexOffset, 4):uint() -- Primitive systemTime Type: [uint32_t] size in bits:32 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 4), "systemTime: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + gpsITOW = buffer(indexOffset, 4):uint() -- Primitive gpsITOW Type: [uint32_t] size in bits:32 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 4), "gpsITOW: " .. buffer(indexOffset, 4):uint() .. " ms") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 2) then + gpsWeek = buffer(indexOffset, 2):uint() -- Primitive gpsWeek Type: [uint16_t] size in bits:16 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 2), "gpsWeek: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + geoidUndulation = buffer(indexOffset, 2):int() -- Primitive geoidUndulation Type: [double] size in bits:16 + indexOffset = signed16ToGeoidUndulationMeters(GeolocateTelemetryCore_tree, "geoidUndulation", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 4) then + posLat = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive posLat Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(GeolocateTelemetryCore_tree, "posLat", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + posLon = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive posLon Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(GeolocateTelemetryCore_tree, "posLon", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + posAlt = buffer(indexOffset, 4):int() / 10000 -- Primitive posAlt Type: [double] size in bits:32 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 4), "posAlt: " .. buffer(indexOffset, 4):int() / 10000 .. " m") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 6) then + velNED = buffer(indexOffset, 6) -- Primitive velNED Type: [float] size in bits:48 + indexOffset = signed16x3To16NED(GeolocateTelemetryCore_tree, "velNED", buffer, indexOffset, 6, 100) + end + if size >= (indexOffset + 8) then + gimbalQuat = buffer(indexOffset, 8) -- Primitive gimbalQuat Type: [float] size in bits:64 + indexOffset = displayQuat(GeolocateTelemetryCore_tree, "gimbalQuat", buffer, indexOffset, 8, 1) + end + if size >= (indexOffset + 2) then + pan = buffer(indexOffset, 2):int() -- Primitive pan Type: [float] size in bits:16 + indexOffset = signed16ToPanTilt(GeolocateTelemetryCore_tree, "pan", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + tilt = buffer(indexOffset, 2):int() -- Primitive tilt Type: [float] size in bits:16 + indexOffset = signed16ToPanTilt(GeolocateTelemetryCore_tree, "tilt", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + hfov = buffer(indexOffset, 2):uint() -- Primitive hfov Type: [float] size in bits:16 + indexOffset = unsigned16ToFOV(GeolocateTelemetryCore_tree, "hfov", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + vfov = buffer(indexOffset, 2):uint() -- Primitive vfov Type: [float] size in bits:16 + indexOffset = unsigned16ToFOV(GeolocateTelemetryCore_tree, "vfov", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 6) then + losECEF = buffer(indexOffset, 6) -- Primitive losECEF Type: [float] size in bits:48 + indexOffset = displayLosECEF(posLat, posLon, posAlt, GeolocateTelemetryCore_tree, "losECEF", buffer, indexOffset, 6, 1) + end + if size >= (indexOffset + 2) then + pixelWidth = buffer(indexOffset, 2):uint() -- Primitive pixelWidth Type: [uint16_t] size in bits:16 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 2), "pixelWidth: " .. buffer(indexOffset, 2):uint() .. " px") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + pixelHeight = buffer(indexOffset, 2):uint() -- Primitive pixelHeight Type: [uint16_t] size in bits:16 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 2), "pixelHeight: " .. buffer(indexOffset, 2):uint() .. " px") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + mode = buffer(indexOffset, 1):uint() -- Enumeration mode Type: [OrionMode_t] size in bits: 8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "mode: " .. get_OrionMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + pathProgress = buffer(indexOffset, 1):uint() -- Primitive pathProgress Type: [float] size in bits:8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "pathProgress: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + stareTime = buffer(indexOffset, 1):uint() -- Primitive stareTime Type: [float] size in bits:8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "stareTime: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + pathFrom = buffer(indexOffset, 1):uint() -- Primitive pathFrom Type: [uint8_t] size in bits:8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "pathFrom: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + pathTo = buffer(indexOffset, 1):uint() -- Primitive pathTo Type: [uint8_t] size in bits:8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "pathTo: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 8) then + imageShifts = buffer(indexOffset, 8) -- Primitive imageShifts Type: [float] size in bits:64 + indexOffset = signed32x2ToPanTilt(GeolocateTelemetryCore_tree, "imageShifts", buffer, indexOffset, 8, 1000000) + end + if size >= (indexOffset + 2) then + imageShiftDeltaTime = buffer(indexOffset, 2):uint() / 1000 -- Primitive imageShiftDeltaTime Type: [float] size in bits:16 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 2), "imageShiftDeltaTime: " .. buffer(indexOffset, 2):uint() / 1000 .. " s") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + imageShiftConfidence = buffer(indexOffset, 1):uint() -- Primitive imageShiftConfidence Type: [float] size in bits:8 + indexOffset = unsignedToFloat32(GeolocateTelemetryCore_tree, "imageShiftConfidence", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 4) then + outputShifts = buffer(indexOffset, 4) -- Primitive outputShifts Type: [float] size in bits:32 + indexOffset = displayOutputShifts(GeolocateTelemetryCore_tree, "outputShifts", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 1) then + rangeSource = buffer(indexOffset, 1):uint() -- Enumeration rangeSource Type: [RangeDataSrc_t] size in bits: 8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "rangeSource: " .. get_RangeDataSrc_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + leapSeconds = buffer(indexOffset, 1):uint() -- Primitive leapSeconds Type: [uint8_t] size in bits:8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "leapSeconds: " .. buffer(indexOffset, 1):uint() .. " seconds") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + panAlignment = buffer(indexOffset, 1):int() / 1000 -- Primitive panAlignment Type: [float] size in bits:8 + indexOffset = signed8ToDegrees(GeolocateTelemetryCore_tree, "panAlignment", buffer, indexOffset, 1, 1000) + end + if size >= (indexOffset + 1) then + tiltAlignment = buffer(indexOffset, 1):int() / 1000 -- Primitive tiltAlignment Type: [float] size in bits:8 + indexOffset = signed8ToDegrees(GeolocateTelemetryCore_tree, "tiltAlignment", buffer, indexOffset, 1, 1000) + end + if size >= (indexOffset + 1) then + insRotationOption = buffer(indexOffset, 1):uint() -- Enumeration insRotationOption Type: [InsRotationOptions] size in bits: 8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "insRotationOption: " .. get_InsRotationOptions_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if not (insRotationOption == 0) and size >= (indexOffset + 8) then + insQuat = buffer(indexOffset, 8) -- Primitive insQuat Type: [float] size in bits:64 + indexOffset = displayQuat(GeolocateTelemetryCore_tree, "insQuat", buffer, indexOffset, 8, 1) + else + GeolocateTelemetryCore_tree:add(buffer(0,0), "insQuat: Was not included, compared [insRotationOption == 0] ") + end + if size >= (indexOffset + 2) then + imageRotation = buffer(indexOffset, 2):int() -- Primitive imageRotation Type: [float] size in bits:16 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 2), "imageRotation: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + cameraIndex = buffer(indexOffset, 1):int() -- Primitive cameraIndex Type: [int8_t] size in bits:8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "cameraIndex: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + hasTrackData = buffer(indexOffset, 1):uint() -- Primitive hasTrackData Type: [uint8_t] size in bits:8 + GeolocateTelemetryCore_tree:add(buffer(indexOffset, 1), "hasTrackData: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if not (hasTrackData == 0) then + -- Struct primaryTrackData Type: [PrimaryTrackData_t] size in bits reported:56 + indexOffset = print_PrimaryTrackData_t(GeolocateTelemetryCore_tree, "primaryTrackData", buffer, id, size, indexOffset, 7, 1 ) + else + GeolocateTelemetryCore_tree:add(buffer(0,0), "primaryTrackData: Was not included, compared [hasTrackData == 0] ") + end + return name +end + +-- Packet ID: ORION_PKT_PERFORMANCE +function print_OrionPerformance(subtree, buffer, id, size, index) + local name = "OrionPerformance" + local indexOffset = 0 + local OrionPerformance_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionPerformance_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + -- 5 Data Elements found: + if size >= (indexOffset + 4) then + RmsQuad = buffer(indexOffset, 4) -- Primitive RmsQuad Type: [float] size in bits:32 + indexOffset = displayRMSJitter(OrionPerformance_tree, "RmsQuad", buffer, indexOffset, 4, 1000000) + end + if size >= (indexOffset + 4) then + RmsDir = buffer(indexOffset, 4) -- Primitive RmsDir Type: [float] size in bits:32 + indexOffset = displayDirRMS(OrionPerformance_tree, "RmsDir", buffer, indexOffset, 4, 1000000) + end + if size >= (indexOffset + 4) then + RmsVel = buffer(indexOffset, 4) -- Primitive RmsVel Type: [float] size in bits:32 + indexOffset = displayVelRMS(OrionPerformance_tree, "RmsVel", buffer, indexOffset, 4, 1000) + end + if size >= (indexOffset + 4) then + RmsPos = buffer(indexOffset, 4) -- Primitive RmsPos Type: [float] size in bits:32 + indexOffset = displayPosRMS(OrionPerformance_tree, "RmsPos", buffer, indexOffset, 4, 1000000) + end + if size >= (indexOffset + 4) then + Iout = buffer(indexOffset, 4) -- Primitive Iout Type: [float] size in bits:32 + indexOffset = displayOutputCurrent(OrionPerformance_tree, "Iout", buffer, indexOffset, 4, 1000) + end + return name +end + +-- Packet ID: ORION_PKT_DIAGNOSTICS +function print_OrionDiagnostics(subtree, buffer, id, size, index) + local name = "OrionDiagnostics" + local indexOffset = 0 + local OrionDiagnostics_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionDiagnostics_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Voltage24, Voltage12, Voltage3v3, Current24, Current12, Current3v3, CrownTemp, SlaTemp, + GyroTemp, Voltage24Var, Voltage12Var, Voltage3v3Var, Current24Var, Current12Var, Current3v3Var, PayloadTemp, PayloadHumidity, + CurrentLaser, PayloadCPUTemp + -- 20 Data Elements found: + if size >= (indexOffset + 2) then + Voltage24 = buffer(indexOffset, 2):uint() / 1000 -- Primitive Voltage24 Type: [float] size in bits:16 + OrionDiagnostics_tree:add(buffer(indexOffset, 2), "Voltage24: " .. buffer(indexOffset, 2):uint() / 1000 .. " V") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Voltage12 = buffer(indexOffset, 2):uint() / 1000 -- Primitive Voltage12 Type: [float] size in bits:16 + OrionDiagnostics_tree:add(buffer(indexOffset, 2), "Voltage12: " .. buffer(indexOffset, 2):uint() / 1000 .. " V") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Voltage3v3 = buffer(indexOffset, 2):uint() / 1000 -- Primitive Voltage3v3 Type: [float] size in bits:16 + OrionDiagnostics_tree:add(buffer(indexOffset, 2), "Voltage3v3: " .. buffer(indexOffset, 2):uint() / 1000 .. " V") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Current24 = buffer(indexOffset, 2):uint() / 1000 -- Primitive Current24 Type: [float] size in bits:16 + OrionDiagnostics_tree:add(buffer(indexOffset, 2), "Current24: " .. buffer(indexOffset, 2):uint() / 1000 .. " Amps") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Current12 = buffer(indexOffset, 2):uint() / 1000 -- Primitive Current12 Type: [float] size in bits:16 + OrionDiagnostics_tree:add(buffer(indexOffset, 2), "Current12: " .. buffer(indexOffset, 2):uint() / 1000 .. " Amps") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Current3v3 = buffer(indexOffset, 2):uint() / 1000 -- Primitive Current3v3 Type: [float] size in bits:16 + OrionDiagnostics_tree:add(buffer(indexOffset, 2), "Current3v3: " .. buffer(indexOffset, 2):uint() / 1000 .. " Amps") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + CrownTemp = buffer(indexOffset, 1):int() / 1.0 -- Primitive CrownTemp Type: [float] size in bits:8 + OrionDiagnostics_tree:add(buffer(indexOffset, 1), "CrownTemp: " .. buffer(indexOffset, 1):int() / 1.0 .. " °C") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + SlaTemp = buffer(indexOffset, 1):int() / 1.0 -- Primitive SlaTemp Type: [float] size in bits:8 + OrionDiagnostics_tree:add(buffer(indexOffset, 1), "SlaTemp: " .. buffer(indexOffset, 1):int() / 1.0 .. " °C") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + GyroTemp = buffer(indexOffset, 1):int() / 1.0 -- Primitive GyroTemp Type: [float] size in bits:8 + OrionDiagnostics_tree:add(buffer(indexOffset, 1), "GyroTemp: " .. buffer(indexOffset, 1):int() / 1.0 .. " °C") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + -- Not in Memory, but encoded Value [reserved] size in bits:8 + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + Voltage24Var = buffer(indexOffset, 2):uint() / 100000 -- Primitive Voltage24Var Type: [float] size in bits:16 + indexOffset = unsigned16ToVarVolts(OrionDiagnostics_tree, "Voltage24Var", buffer, indexOffset, 2, 100000) + end + if size >= (indexOffset + 2) then + Voltage12Var = buffer(indexOffset, 2):uint() / 100000 -- Primitive Voltage12Var Type: [float] size in bits:16 + indexOffset = unsigned16ToVarVolts(OrionDiagnostics_tree, "Voltage12Var", buffer, indexOffset, 2, 100000) + end + if size >= (indexOffset + 2) then + Voltage3v3Var = buffer(indexOffset, 2):uint() / 100000 -- Primitive Voltage3v3Var Type: [float] size in bits:16 + indexOffset = unsigned16ToVarVolts(OrionDiagnostics_tree, "Voltage3v3Var", buffer, indexOffset, 2, 100000) + end + if size >= (indexOffset + 2) then + Current24Var = buffer(indexOffset, 2):uint() / 100000 -- Primitive Current24Var Type: [float] size in bits:16 + indexOffset = unsigned16ToVarAmps(OrionDiagnostics_tree, "Current24Var", buffer, indexOffset, 2, 100000) + end + if size >= (indexOffset + 2) then + Current12Var = buffer(indexOffset, 2):uint() / 100000 -- Primitive Current12Var Type: [float] size in bits:16 + indexOffset = unsigned16ToVarAmps(OrionDiagnostics_tree, "Current12Var", buffer, indexOffset, 2, 100000) + end + if size >= (indexOffset + 2) then + Current3v3Var = buffer(indexOffset, 2):uint() / 100000 -- Primitive Current3v3Var Type: [float] size in bits:16 + indexOffset = unsigned16ToVarAmps(OrionDiagnostics_tree, "Current3v3Var", buffer, indexOffset, 2, 100000) + end + if size >= (indexOffset + 1) then + PayloadTemp = buffer(indexOffset, 1):int() / 1.0 -- Primitive PayloadTemp Type: [float] size in bits:8 + OrionDiagnostics_tree:add(buffer(indexOffset, 1), "PayloadTemp: " .. buffer(indexOffset, 1):int() / 1.0 .. " °C") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + PayloadHumidity = buffer(indexOffset, 1):uint() -- Primitive PayloadHumidity Type: [float] size in bits:8 + indexOffset = unsigned8ToPercent(OrionDiagnostics_tree, "PayloadHumidity", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 2) then + CurrentLaser = buffer(indexOffset, 2):uint() / 1.0 -- Primitive CurrentLaser Type: [float] size in bits:16 + OrionDiagnostics_tree:add(buffer(indexOffset, 2), "CurrentLaser: " .. buffer(indexOffset, 2):uint() / 1.0 .. " Amps") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + PayloadCPUTemp = buffer(indexOffset, 1):int() / 1.0 -- Primitive PayloadCPUTemp Type: [float] size in bits:8 + OrionDiagnostics_tree:add(buffer(indexOffset, 1), "PayloadCPUTemp: " .. buffer(indexOffset, 1):int() / 1.0 .. " °C") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_FAULTS +function print_OrionFault(subtree, buffer, id, size, index) + local name = "OrionFault" + local indexOffset = 0 + local OrionFault_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionFault_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Type, Level, Component, Code, Value + -- 5 Data Elements found: + if size >= (indexOffset + 1) then + Type = buffer(indexOffset, 1):uint() -- Enumeration Type Type: [OrionFaultType_t] size in bits: 8 + OrionFault_tree:add(buffer(indexOffset, 1), "Type: " .. get_OrionFaultType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Level = buffer(indexOffset, 1):uint() -- Enumeration Level Type: [OrionFaultLevel_t] size in bits: 8 + OrionFault_tree:add(buffer(indexOffset, 1), "Level: " .. get_OrionFaultLevel_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Component = buffer(indexOffset, 1):uint() -- Enumeration Component Type: [OrionFaultComponent_t] size in bits: 8 + OrionFault_tree:add(buffer(indexOffset, 1), "Component: " .. get_OrionFaultComponent_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + Code = buffer(indexOffset, 4):uint() -- Primitive Code Type: [uint32_t] size in bits:32 + OrionFault_tree:add(buffer(indexOffset, 4), "Code: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + Value = buffer(indexOffset, 4):uint() -- Primitive Value Type: [float] size in bits:32 + OrionFault_tree:add(buffer(indexOffset, 4), "Value: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_SOFTWARE_DIAGNOSTICS +function print_OrionSoftwareDiagnostics(subtree, buffer, id, size, index) + local name = "OrionSoftwareDiagnostics" + local indexOffset = 0 + local OrionSoftwareDiagnostics_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionSoftwareDiagnostics_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local sourceBoard, numCores + -- 4 Data Elements found: + if size >= (indexOffset + 1) then + sourceBoard = buffer(indexOffset, 1):uint() -- Enumeration sourceBoard Type: [OrionBoardEnumeration_t] size in bits: 8 + OrionSoftwareDiagnostics_tree:add(buffer(indexOffset, 1), "sourceBoard: " .. get_OrionBoardEnumeration_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + numCores = buffer(indexOffset, 1):uint() -- Primitive numCores Type: [uint8_t] size in bits:8 + OrionSoftwareDiagnostics_tree:add(buffer(indexOffset, 1), "numCores: " .. buffer(indexOffset, 1):uint() .. " cores") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + -- Not in Memory, but encoded Value [reserved] size in bits:16 + indexOffset = indexOffset + 2 + end + -- Embedded Struct: CoreLoading Type: [CoreLoading_t] size in bits reported:88 + indexOffset = print_CoreLoading_t(OrionSoftwareDiagnostics_tree, "CoreLoading", buffer, id, size, indexOffset, 11, numCores ) + return name +end + +-- Packet ID: ORION_PKT_BOARD_HEARTBEAT +function print_OrionBoardHeartbeat(subtree, buffer, id, size, index) + local name = "OrionBoardHeartbeat" + local indexOffset = 0 + local OrionBoardHeartbeat_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionBoardHeartbeat_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local sourceBoard, includesClevis, heartbeatClevis, includesCrown, heartbeatCrown, includesPayload, heartbeatPayload + -- 8 Data Elements found: + if size >= (indexOffset + 1) then + sourceBoard = buffer(indexOffset, 1):uint() -- Enumeration sourceBoard Type: [OrionBoardEnumeration_t] size in bits: 8 + OrionBoardHeartbeat_tree:add(buffer(indexOffset, 1), "sourceBoard: " .. get_OrionBoardEnumeration_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + includesClevis = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive includesClevis Type: [unsigned] size in bits:1 + OrionBoardHeartbeat_tree:add(buffer(indexOffset, 1), "includesClevis: " .. buffer(indexOffset, 1):bitfield(0, 1)) + heartbeatClevis = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive heartbeatClevis Type: [unsigned] size in bits:1 + OrionBoardHeartbeat_tree:add(buffer(indexOffset, 1), "heartbeatClevis: " .. buffer(indexOffset, 1):bitfield(1, 1)) + includesCrown = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive includesCrown Type: [unsigned] size in bits:1 + OrionBoardHeartbeat_tree:add(buffer(indexOffset, 1), "includesCrown: " .. buffer(indexOffset, 1):bitfield(2, 1)) + heartbeatCrown = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive heartbeatCrown Type: [unsigned] size in bits:1 + OrionBoardHeartbeat_tree:add(buffer(indexOffset, 1), "heartbeatCrown: " .. buffer(indexOffset, 1):bitfield(3, 1)) + includesPayload = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive includesPayload Type: [unsigned] size in bits:1 + OrionBoardHeartbeat_tree:add(buffer(indexOffset, 1), "includesPayload: " .. buffer(indexOffset, 1):bitfield(4, 1)) + heartbeatPayload = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive heartbeatPayload Type: [unsigned] size in bits:1 + OrionBoardHeartbeat_tree:add(buffer(indexOffset, 1), "heartbeatPayload: " .. buffer(indexOffset, 1):bitfield(5, 1)) + -- Not in Memory, but encoded Value [reserved] size in bits:2 + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_VIBRATION +function print_OrionVibration(subtree, buffer, id, size, index) + local name = "OrionVibration" + local indexOffset = 0 + local OrionVibration_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionVibration_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + -- 3 Data Elements found: + if size >= (indexOffset + 6) then + MaxAccel = buffer(indexOffset, 6) -- Primitive MaxAccel Type: [float] size in bits:48 + indexOffset = signed16x3ToAcceleration(OrionVibration_tree, "MaxAccel", buffer, indexOffset, 6, 1) + end + if size >= (indexOffset + 6) then + MaxGyro = buffer(indexOffset, 6) -- Primitive MaxGyro Type: [float] size in bits:48 + indexOffset = signed16x3To16QUAT(OrionVibration_tree, "MaxGyro", buffer, indexOffset, 6, 1) + end + -- Embedded Struct: FftData Type: [FftData_t] size in bits reported:64 + indexOffset = print_FftData_t(OrionVibration_tree, "FftData", buffer, id, size, indexOffset, 8, 16 ) + return name +end + +-- Packet ID: ORION_PKT_NETWORK_DIAGNOSTICS +function print_NetworkDiagnostics(subtree, buffer, id, size, index) + local name = "NetworkDiagnostics" + local indexOffset = 0 + local NetworkDiagnostics_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(NetworkDiagnostics_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Flags, RxBytes, TxBytes, RxPackets, TxPackets, RxErrors, TxErrors, RxDrops, + TxDrops, RxFifoErrors, TxFifoErrors, FrameErrors, Collisions, CarrierErrors + -- 14 Data Elements found: + if size >= (indexOffset + 2) then + Flags = buffer(indexOffset, 2):uint() -- Primitive Flags Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "Flags: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 4) then + RxBytes = buffer(indexOffset, 4):uint() -- Primitive RxBytes Type: [uint32_t] size in bits:32 + indexOffset = unsigned32ToBytes(NetworkDiagnostics_tree, "RxBytes", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + TxBytes = buffer(indexOffset, 4):uint() -- Primitive TxBytes Type: [uint32_t] size in bits:32 + indexOffset = unsigned32ToBytes(NetworkDiagnostics_tree, "TxBytes", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + RxPackets = buffer(indexOffset, 4):uint() -- Primitive RxPackets Type: [uint32_t] size in bits:32 + NetworkDiagnostics_tree:add(buffer(indexOffset, 4), "RxPackets: " .. buffer(indexOffset, 4):uint() .. " packets") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + TxPackets = buffer(indexOffset, 4):uint() -- Primitive TxPackets Type: [uint32_t] size in bits:32 + NetworkDiagnostics_tree:add(buffer(indexOffset, 4), "TxPackets: " .. buffer(indexOffset, 4):uint() .. " packets") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 2) then + RxErrors = buffer(indexOffset, 2):uint() -- Primitive RxErrors Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "RxErrors: " .. buffer(indexOffset, 2):uint() .. " errors") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + TxErrors = buffer(indexOffset, 2):uint() -- Primitive TxErrors Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "TxErrors: " .. buffer(indexOffset, 2):uint() .. " errors") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + RxDrops = buffer(indexOffset, 2):uint() -- Primitive RxDrops Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "RxDrops: " .. buffer(indexOffset, 2):uint() .. " dropped packets") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + TxDrops = buffer(indexOffset, 2):uint() -- Primitive TxDrops Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "TxDrops: " .. buffer(indexOffset, 2):uint() .. " dropped packets") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + RxFifoErrors = buffer(indexOffset, 2):uint() -- Primitive RxFifoErrors Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "RxFifoErrors: " .. buffer(indexOffset, 2):uint() .. " errors") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + TxFifoErrors = buffer(indexOffset, 2):uint() -- Primitive TxFifoErrors Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "TxFifoErrors: " .. buffer(indexOffset, 2):uint() .. " errors") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + FrameErrors = buffer(indexOffset, 2):uint() -- Primitive FrameErrors Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "FrameErrors: " .. buffer(indexOffset, 2):uint() .. " errors") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Collisions = buffer(indexOffset, 2):uint() -- Primitive Collisions Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "Collisions: " .. buffer(indexOffset, 2):uint() .. " collisions") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + CarrierErrors = buffer(indexOffset, 2):uint() -- Primitive CarrierErrors Type: [uint16_t] size in bits:16 + NetworkDiagnostics_tree:add(buffer(indexOffset, 2), "CarrierErrors: " .. buffer(indexOffset, 2):uint() .. " loss events") + indexOffset = indexOffset + 2 + end + return name +end + +-- Packet ID: ORION_PKT_TLE_STATUS +function print_TleStatus(subtree, buffer, id, size, index) + local name = "TleStatus" + local indexOffset = 0 + local TleStatus_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(TleStatus_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local SystemTime, FilterType, State, SampleCount, Latitude, Longitude, Altitude, CE90, + VE90, SE90, EllipseMajor, EllipseMinor, EllipseAngle, PanError, TiltError, AltError, PanUncertainty, + TiltUncertainty, AltUncertainty, PercentOrbit, Source + -- 23 Data Elements found: + if size >= (indexOffset + 4) then + SystemTime = buffer(indexOffset, 4):uint() -- Primitive SystemTime Type: [uint32_t] size in bits:32 + TleStatus_tree:add(buffer(indexOffset, 4), "SystemTime: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + FilterType = buffer(indexOffset, 1):uint() -- Enumeration FilterType Type: [TleType_t] size in bits: 8 + TleStatus_tree:add(buffer(indexOffset, 1), "FilterType: " .. get_TleType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + State = buffer(indexOffset, 1):uint() -- Enumeration State Type: [TleState_t] size in bits: 8 + TleStatus_tree:add(buffer(indexOffset, 1), "State: " .. get_TleState_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + -- Not in Memory, but encoded Value [Reserved] size in bits:16 + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + SampleCount = buffer(indexOffset, 2):uint() -- Primitive SampleCount Type: [uint16_t] size in bits:16 + TleStatus_tree:add(buffer(indexOffset, 2), "SampleCount: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 4) then + Latitude = buffer(indexOffset, 4):int() -- Primitive Latitude Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(TleStatus_tree, "Latitude", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + Longitude = buffer(indexOffset, 4):int() -- Primitive Longitude Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(TleStatus_tree, "Longitude", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 3) then + Altitude = buffer(indexOffset, 3):int() / 100 -- Primitive Altitude Type: [double] size in bits:24 + TleStatus_tree:add(buffer(indexOffset, 3), "Altitude: " .. buffer(indexOffset, 3):int() / 100 .. " meters") + indexOffset = indexOffset + 3 + end + if size >= (indexOffset + 2) then + CE90 = buffer(indexOffset, 2):int() -- Primitive CE90 Type: [float] size in bits:16 + TleStatus_tree:add(buffer(indexOffset, 2), "CE90: " .. buffer(indexOffset, 2):int() .. " meters") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + VE90 = buffer(indexOffset, 2):int() -- Primitive VE90 Type: [float] size in bits:16 + TleStatus_tree:add(buffer(indexOffset, 2), "VE90: " .. buffer(indexOffset, 2):int() .. " meters") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + SE90 = buffer(indexOffset, 2):int() -- Primitive SE90 Type: [float] size in bits:16 + TleStatus_tree:add(buffer(indexOffset, 2), "SE90: " .. buffer(indexOffset, 2):int() .. " meters") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + EllipseMajor = buffer(indexOffset, 2):int() -- Primitive EllipseMajor Type: [float] size in bits:16 + TleStatus_tree:add(buffer(indexOffset, 2), "EllipseMajor: " .. buffer(indexOffset, 2):int() .. " meters") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + EllipseMinor = buffer(indexOffset, 2):int() -- Primitive EllipseMinor Type: [float] size in bits:16 + TleStatus_tree:add(buffer(indexOffset, 2), "EllipseMinor: " .. buffer(indexOffset, 2):int() .. " meters") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + EllipseAngle = buffer(indexOffset, 2):int() -- Primitive EllipseAngle Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(TleStatus_tree, "EllipseAngle", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + PanError = buffer(indexOffset, 2):int() -- Primitive PanError Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(TleStatus_tree, "PanError", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + TiltError = buffer(indexOffset, 2):int() -- Primitive TiltError Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(TleStatus_tree, "TiltError", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + AltError = buffer(indexOffset, 2):int() -- Primitive AltError Type: [float] size in bits:16 + TleStatus_tree:add(buffer(indexOffset, 2), "AltError: " .. buffer(indexOffset, 2):int() .. " meters") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + PanUncertainty = buffer(indexOffset, 2):uint() -- Primitive PanUncertainty Type: [float] size in bits:16 + indexOffset = unsigned16ToDegrees(TleStatus_tree, "PanUncertainty", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + TiltUncertainty = buffer(indexOffset, 2):uint() -- Primitive TiltUncertainty Type: [float] size in bits:16 + indexOffset = unsigned16ToDegrees(TleStatus_tree, "TiltUncertainty", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + AltUncertainty = buffer(indexOffset, 2):uint() -- Primitive AltUncertainty Type: [float] size in bits:16 + TleStatus_tree:add(buffer(indexOffset, 2), "AltUncertainty: " .. buffer(indexOffset, 2):uint() .. " meters") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + PercentOrbit = buffer(indexOffset, 1):uint() -- Primitive PercentOrbit Type: [float] size in bits:8 + TleStatus_tree:add(buffer(indexOffset, 1), "PercentOrbit: " .. buffer(indexOffset, 1):uint() .. "%") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Source = buffer(indexOffset, 1):uint() -- Enumeration Source Type: [TleSource_t] size in bits: 8 + TleStatus_tree:add(buffer(indexOffset, 1), "Source: " .. get_TleSource_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + -- Embedded Struct: TleDetects Type: [TleDetects_t] size in bits reported:104 + indexOffset = print_TleDetects_t(TleStatus_tree, "TleDetects", buffer, id, size, indexOffset, 13, 1 ) + return name +end + +-- Packet ID: ORION_PKT_TLE_COMMAND +function print_TleCommand(subtree, buffer, id, size, index) + local name = "TleCommand" + local indexOffset = 0 + local TleCommand_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(TleCommand_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local FilterType, Run, Options + -- 3 Data Elements found: + if size >= (indexOffset + 1) then + FilterType = buffer(indexOffset, 1):uint() -- Enumeration FilterType Type: [TleType_t] size in bits: 8 + TleCommand_tree:add(buffer(indexOffset, 1), "FilterType: " .. get_TleType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Run = buffer(indexOffset, 1):uint() -- Primitive Run Type: [uint8_t] size in bits:8 + TleCommand_tree:add(buffer(indexOffset, 1), "Run: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Options = buffer(indexOffset, 1):uint() -- Primitive Options Type: [uint8_t] size in bits:8 + TleCommand_tree:add(buffer(indexOffset, 1), "Options: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_RETRACT_STATUS +function print_OrionRetractStatus(subtree, buffer, id, size, index) + local name = "OrionRetractStatus" + local indexOffset = 0 + local OrionRetractStatus_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionRetractStatus_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Cmd, State, Pos, Flags + -- 4 Data Elements found: + if size >= (indexOffset + 1) then + Cmd = buffer(indexOffset, 1):uint() -- Enumeration Cmd Type: [OrionRetractCmd_t] size in bits: 8 + OrionRetractStatus_tree:add(buffer(indexOffset, 1), "Cmd: " .. get_OrionRetractCmd_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + State = buffer(indexOffset, 1):uint() -- Enumeration State Type: [OrionRetractState_t] size in bits: 8 + OrionRetractStatus_tree:add(buffer(indexOffset, 1), "State: " .. get_OrionRetractState_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + Pos = buffer(indexOffset, 2):int() / 1000 -- Primitive Pos Type: [float] size in bits:16 + OrionRetractStatus_tree:add(buffer(indexOffset, 2), "Pos: " .. buffer(indexOffset, 2):int() / 1000) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Flags = buffer(indexOffset, 2):uint() -- Primitive Flags Type: [uint16_t] size in bits:16 + OrionRetractStatus_tree:add(buffer(indexOffset, 2), "Flags: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + return name +end + +-- Packet ID: ORION_PKT_STARE_START +function print_StareStart(subtree, buffer, id, size, index) + local name = "StareStart" + local indexOffset = 0 + local StareStart_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(StareStart_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local systemTime, maxStareTime, alongTrackStare, prevStareTerminatedByTime, stareStartedByTime, gimbalDataValid, stareReset, prevStareTime, + stareLoad, posLat, posLon, posAlt, gimbalPosLat, gimbalPosLon, gimbalPosAlt, pan, tilt, + rangeSource, slantRange, alongStareAngle, crossStareAngle + -- 22 Data Elements found: + if size >= (indexOffset + 4) then + systemTime = buffer(indexOffset, 4):uint() -- Primitive systemTime Type: [uint32_t] size in bits:32 + StareStart_tree:add(buffer(indexOffset, 4), "systemTime: " .. buffer(indexOffset, 4):uint() .. " ms") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + maxStareTime = buffer(indexOffset, 1):uint() -- Primitive maxStareTime Type: [float] size in bits:8 + indexOffset = unsigned8ToStareTime(StareStart_tree, "maxStareTime", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + alongTrackStare = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive alongTrackStare Type: [unsigned] size in bits:1 + indexOffset = bitfield1ToTrue(StareStart_tree, "alongTrackStare", buffer, indexOffset, 1, 1, 0) + prevStareTerminatedByTime = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive prevStareTerminatedByTime Type: [unsigned] size in bits:1 + indexOffset = bitfield1ToTrue(StareStart_tree, "prevStareTerminatedByTime", buffer, indexOffset, 1, 1, 1) + stareStartedByTime = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive stareStartedByTime Type: [unsigned] size in bits:1 + indexOffset = bitfield1ToTrue(StareStart_tree, "stareStartedByTime", buffer, indexOffset, 1, 1, 2) + gimbalDataValid = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive gimbalDataValid Type: [unsigned] size in bits:1 + indexOffset = bitfield1ToTrue(StareStart_tree, "gimbalDataValid", buffer, indexOffset, 1, 1, 3) + stareReset = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive stareReset Type: [unsigned] size in bits:1 + indexOffset = bitfield1ToYes(StareStart_tree, "stareReset", buffer, indexOffset, 1, 1, 4) + prevStareTime = buffer(indexOffset, 1):uint() -- Primitive prevStareTime Type: [float] size in bits:8 + indexOffset = unsigned8ToStareTime(StareStart_tree, "prevStareTime", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + stareLoad = buffer(indexOffset, 1):uint() -- Primitive stareLoad Type: [float] size in bits:8 + indexOffset = unsignedToFloat32(StareStart_tree, "stareLoad", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 4) then + posLat = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive posLat Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(StareStart_tree, "posLat", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + posLon = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive posLon Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(StareStart_tree, "posLon", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + posAlt = buffer(indexOffset, 4):int() / 10000 -- Primitive posAlt Type: [double] size in bits:32 + indexOffset = signed32ToAltitude(StareStart_tree, "posAlt", buffer, indexOffset, 4, 10000) + end + if size >= (indexOffset + 4) then + gimbalPosLat = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive gimbalPosLat Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(StareStart_tree, "gimbalPosLat", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + gimbalPosLon = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive gimbalPosLon Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(StareStart_tree, "gimbalPosLon", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + gimbalPosAlt = buffer(indexOffset, 4):int() / 10000 -- Primitive gimbalPosAlt Type: [double] size in bits:32 + indexOffset = signed32ToAltitude(StareStart_tree, "gimbalPosAlt", buffer, indexOffset, 4, 10000) + end + if size >= (indexOffset + 8) then + gimbalQuat = buffer(indexOffset, 8) -- Primitive gimbalQuat Type: [float] size in bits:64 + indexOffset = signed16x4ToQuat(StareStart_tree, "gimbalQuat", buffer, indexOffset, 8, 1) + end + if size >= (indexOffset + 2) then + pan = buffer(indexOffset, 2):int() -- Primitive pan Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(StareStart_tree, "pan", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + tilt = buffer(indexOffset, 2):int() -- Primitive tilt Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(StareStart_tree, "tilt", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 1) then + rangeSource = buffer(indexOffset, 1):uint() -- Enumeration rangeSource Type: [RangeDataSrc_t] size in bits: 8 + StareStart_tree:add(buffer(indexOffset, 1), "rangeSource: " .. get_RangeDataSrc_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 3) then + slantRange = buffer(indexOffset, 3):uint() / 100 -- Primitive slantRange Type: [float] size in bits:24 + indexOffset = unsigned24ToSlantRange(StareStart_tree, "slantRange", buffer, indexOffset, 3, 100) + end + if size >= (indexOffset + 2) then + alongStareAngle = buffer(indexOffset, 2):int() -- Primitive alongStareAngle Type: [float] size in bits:16 + indexOffset = signed16ToStareAngle(StareStart_tree, "alongStareAngle", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + crossStareAngle = buffer(indexOffset, 2):int() -- Primitive crossStareAngle Type: [float] size in bits:16 + indexOffset = signed16ToStareAngle(StareStart_tree, "crossStareAngle", buffer, indexOffset, 2, 1) + end + return name +end + +-- Packet ID: ORION_PKT_RESET_SOURCE +function print_OrionResetSource(subtree, buffer, id, size, index) + local name = "OrionResetSource" + local indexOffset = 0 + local OrionResetSource_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionResetSource_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Vector, Address, sourceBoard + -- 3 Data Elements found: + if size >= (indexOffset + 4) then + Vector = buffer(indexOffset, 4):uint() -- Primitive Vector Type: [uint32_t] size in bits:32 + OrionResetSource_tree:add(buffer(indexOffset, 4), "Vector: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + Address = buffer(indexOffset, 4):uint() -- Primitive Address Type: [uint32_t] size in bits:32 + OrionResetSource_tree:add(buffer(indexOffset, 4), "Address: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + sourceBoard = buffer(indexOffset, 1):uint() -- Enumeration sourceBoard Type: [OrionBoardEnumeration_t] size in bits: 8 + OrionResetSource_tree:add(buffer(indexOffset, 1), "sourceBoard: " .. get_OrionBoardEnumeration_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_CROWN_MODE +function print_CrownMode(subtree, buffer, id, size, index) + local name = "CrownMode" + local indexOffset = 0 + local CrownMode_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(CrownMode_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local mode + -- 1 Data Elements found: + if size >= (indexOffset + 1) then + mode = buffer(indexOffset, 1):uint() -- Enumeration mode Type: [crownModes] size in bits: 8 + CrownMode_tree:add(buffer(indexOffset, 1), "mode: " .. get_crownModes_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_DEBUG_STRING +function print_DebugString(subtree, buffer, id, size, index) + local name = "DebugString" + local indexOffset = 0 + local DebugString_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(DebugString_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local source, priority, reserved1, reserved2, description + -- 5 Data Elements found: + if size >= (indexOffset + 1) then + source = buffer(indexOffset, 1):uint() -- Enumeration source Type: [OrionBoardEnumeration_t] size in bits: 8 + DebugString_tree:add(buffer(indexOffset, 1), "source: " .. get_OrionBoardEnumeration_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + priority = buffer(indexOffset, 1):uint() -- Enumeration priority Type: [debugPriority] size in bits: 8 + DebugString_tree:add(buffer(indexOffset, 1), "priority: " .. get_debugPriority_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + reserved1 = buffer(indexOffset, 1):uint() -- Primitive reserved1 Type: [uint8_t] size in bits:8 + DebugString_tree:add(buffer(indexOffset, 1), "reserved1: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + reserved2 = buffer(indexOffset, 1):uint() -- Primitive reserved2 Type: [uint8_t] size in bits:8 + DebugString_tree:add(buffer(indexOffset, 1), "reserved2: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + local strSize = 128 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + description = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive description Type: [char] size in bits:1024 + DebugString_tree:add(buffer(indexOffset, strSize), "description: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + return name +end + +-- Packet ID: ORION_PKT_KLV_USER_DATA +function print_KlvUserData(subtree, buffer, id, size, index) + local name = "KlvUserData" + local indexOffset = 0 + local KlvUserData_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(KlvUserData_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Key, SubKey, Length + -- 4 Data Elements found: + if size >= (indexOffset + 1) then + Key = buffer(indexOffset, 1):uint() -- Primitive Key Type: [uint8_t] size in bits:8 + KlvUserData_tree:add(buffer(indexOffset, 1), "Key: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + SubKey = buffer(indexOffset, 1):uint() -- Primitive SubKey Type: [uint8_t] size in bits:8 + KlvUserData_tree:add(buffer(indexOffset, 1), "SubKey: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Length = buffer(indexOffset, 1):uint() -- Primitive Length Type: [uint8_t] size in bits:8 + KlvUserData_tree:add(buffer(indexOffset, 1), "Length: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= indexOffset + (1 * Length) then + Value = buffer(indexOffset, (1 * Length)) -- Primitive Value Type: [uint8_t] size in bits:8 + indexOffset = displayAsciiString(Length, KlvUserData_tree, "Value", buffer, indexOffset, (1 * Length), 1) + end + return name +end + +-- Packet ID: ORION_PKT_SENSOR_DATA +function print_OrionSensorData(subtree, buffer, id, size, index) + local name = "OrionSensorData" + local indexOffset = 0 + local OrionSensorData_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionSensorData_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Baro, OAT, time, gyroTemp, gyroDt, accelDt, ppsAge, counter + -- 10 Data Elements found: + if size >= (indexOffset + 6) then + Gyros = buffer(indexOffset, 6) -- Primitive Gyros Type: [float] size in bits:48 + indexOffset = signed16x3ToAngularRate(OrionSensorData_tree, "Gyros", buffer, indexOffset, 6, 1) + end + if size >= (indexOffset + 6) then + Accels = buffer(indexOffset, 6) -- Primitive Accels Type: [float] size in bits:48 + indexOffset = signed16x3ToAxesForce(OrionSensorData_tree, "Accels", buffer, indexOffset, 6, 1) + end + if size >= (indexOffset + 2) then + Baro = buffer(indexOffset, 2):uint() -- Primitive Baro Type: [float] size in bits:16 + indexOffset = unsigned16ToBarometricPressure(OrionSensorData_tree, "Baro", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + OAT = buffer(indexOffset, 2):uint() / 100 -- Primitive OAT Type: [float] size in bits:16 + indexOffset = unsigned16ToKelvinTemperature(OrionSensorData_tree, "OAT", buffer, indexOffset, 2, 100) + end + if size >= (indexOffset + 4) then + time = buffer(indexOffset, 4):uint() -- Primitive time Type: [uint32_t] size in bits:32 + OrionSensorData_tree:add(buffer(indexOffset, 4), "time: " .. buffer(indexOffset, 4):uint() .. " ms") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 2) then + gyroTemp = buffer(indexOffset, 2):uint() / 100 -- Primitive gyroTemp Type: [float] size in bits:16 + indexOffset = unsigned16ToKelvinTemperature(OrionSensorData_tree, "gyroTemp", buffer, indexOffset, 2, 100) + end + if size >= (indexOffset + 2) then + gyroDt = buffer(indexOffset, 2):uint() / 1000000 -- Primitive gyroDt Type: [float] size in bits:16 + OrionSensorData_tree:add(buffer(indexOffset, 2), "gyroDt: " .. buffer(indexOffset, 2):uint() / 1000000 .. " seconds") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + accelDt = buffer(indexOffset, 2):uint() / 1000000 -- Primitive accelDt Type: [float] size in bits:16 + OrionSensorData_tree:add(buffer(indexOffset, 2), "accelDt: " .. buffer(indexOffset, 2):uint() / 1000000 .. " seconds") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + ppsAge = buffer(indexOffset, 2):int() -- Primitive ppsAge Type: [int16_t] size in bits:16 + OrionSensorData_tree:add(buffer(indexOffset, 2), "ppsAge: " .. buffer(indexOffset, 2):int() .. " ms") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + counter = buffer(indexOffset, 1):uint() -- Primitive counter Type: [uint8_t] size in bits:8 + OrionSensorData_tree:add(buffer(indexOffset, 1), "counter: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_GPS_DATA +function print_GpsData(subtree, buffer, id, size, index) + local name = "GpsData" + local indexOffset = 0 + local GpsData_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(GpsData_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local multiAntHeadingValid, FixType, FixState, TrackedSats, PDOP, Latitude, Longitude, Altitude, + Hacc, Vacc, SpeedAcc, HeadingAcc, ITOW, Week, GeoidUndulation, source, detailedAccuracyValid, + verticalVelocityValid, leapSeconds, multiAntHeading, multiAntHeadingAccuracy + -- 43 Data Elements found: + if size >= (indexOffset + 1) then + multiAntHeadingValid = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive multiAntHeadingValid Type: [unsigned] size in bits:1 + GpsData_tree:add(buffer(indexOffset, 1), "multiAntHeadingValid: " .. buffer(indexOffset, 1):bitfield(0, 1)) + -- Not in Memory, but encoded Value [reserved] size in bits:3 + FixType = buffer(indexOffset, 1):bitfield(4, 4) -- Enumeration FixType Type: [unsigned] size in bits: 4 + GpsData_tree:add(buffer(indexOffset, 1), "FixType: " .. get_ubloxFixType_t_string(buffer(indexOffset, 1):bitfield(4, 4) ) .. " [" .. buffer(indexOffset, 1):bitfield(4, 4) .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + FixState = buffer(indexOffset, 1):uint() -- Primitive FixState Type: [uint8_t] size in bits:8 + GpsData_tree:add(buffer(indexOffset, 1), "FixState: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + TrackedSats = buffer(indexOffset, 1):uint() -- Primitive TrackedSats Type: [uint8_t] size in bits:8 + GpsData_tree:add(buffer(indexOffset, 1), "TrackedSats: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + PDOP = buffer(indexOffset, 1):uint() / 10 -- Primitive PDOP Type: [float] size in bits:8 + GpsData_tree:add(buffer(indexOffset, 1), "PDOP: " .. buffer(indexOffset, 1):uint() / 10) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + Latitude = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive Latitude Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(GpsData_tree, "Latitude", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + Longitude = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive Longitude Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(GpsData_tree, "Longitude", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + Altitude = buffer(indexOffset, 4):int() / 10000 -- Primitive Altitude Type: [double] size in bits:32 + indexOffset = signed32ToAltitude(GpsData_tree, "Altitude", buffer, indexOffset, 4, 10000) + end + if size >= (indexOffset + 12) then + VelNED = buffer(indexOffset, 12) -- Primitive VelNED Type: [float] size in bits:96 + indexOffset = signed32x3ToNED(GpsData_tree, "VelNED", buffer, indexOffset, 12, 1000) + end + if size >= (indexOffset + 4) then + Hacc = buffer(indexOffset, 4):int() / 1000 -- Primitive Hacc Type: [float] size in bits:32 + indexOffset = signed32ToMeterAccuracy(GpsData_tree, "Hacc", buffer, indexOffset, 4, 1000) + end + if size >= (indexOffset + 4) then + Vacc = buffer(indexOffset, 4):int() / 1000 -- Primitive Vacc Type: [float] size in bits:32 + indexOffset = signed32ToMeterAccuracy(GpsData_tree, "Vacc", buffer, indexOffset, 4, 1000) + end + if size >= (indexOffset + 4) then + SpeedAcc = buffer(indexOffset, 4):int() / 1000 -- Primitive SpeedAcc Type: [float] size in bits:32 + indexOffset = signed32ToSpeed(GpsData_tree, "SpeedAcc", buffer, indexOffset, 4, 1000) + end + if size >= (indexOffset + 4) then + HeadingAcc = buffer(indexOffset, 4):int() / 5729578 -- Primitive HeadingAcc Type: [float] size in bits:32 + indexOffset = signed32ToDegrees(GpsData_tree, "HeadingAcc", buffer, indexOffset, 4, 5729578) + end + if size >= (indexOffset + 4) then + ITOW = buffer(indexOffset, 4):uint() -- Primitive ITOW Type: [uint32_t] size in bits:32 + GpsData_tree:add(buffer(indexOffset, 4), "ITOW: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 2) then + Week = buffer(indexOffset, 2):uint() -- Primitive Week Type: [uint16_t] size in bits:16 + GpsData_tree:add(buffer(indexOffset, 2), "Week: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + GeoidUndulation = buffer(indexOffset, 2):int() / 100 -- Primitive GeoidUndulation Type: [float] size in bits:16 + GpsData_tree:add(buffer(indexOffset, 2), "GeoidUndulation: " .. buffer(indexOffset, 2):int() / 100) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + source = buffer(indexOffset, 1):uint() -- Enumeration source Type: [gpsSource_t] size in bits: 8 + GpsData_tree:add(buffer(indexOffset, 1), "source: " .. get_gpsSource_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + -- Not in Memory, but encoded Value [reserved] size in bits:6 + detailedAccuracyValid = buffer(indexOffset, 1):bitfield(6, 1) -- Primitive detailedAccuracyValid Type: [unsigned] size in bits:1 + GpsData_tree:add(buffer(indexOffset, 1), "detailedAccuracyValid: " .. buffer(indexOffset, 1):bitfield(6, 1)) + verticalVelocityValid = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive verticalVelocityValid Type: [unsigned] size in bits:1 + GpsData_tree:add(buffer(indexOffset, 1), "verticalVelocityValid: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + -- Not in Memory, but encoded Value [postReceiptUpdate1] size in bits:0 + leapSeconds = buffer(indexOffset, 1):uint() -- Primitive leapSeconds Type: [uint8_t] size in bits:8 + GpsData_tree:add(buffer(indexOffset, 1), "leapSeconds: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if not (multiAntHeadingValid == 0) and size >= (indexOffset + 2) then + -- Not in Memory, but encoded Value [computeTime] size in bits:0 + multiAntHeading = buffer(indexOffset, 2):int() -- Primitive multiAntHeading Type: [float] size in bits:16 + GpsData_tree:add(buffer(indexOffset, 2), "multiAntHeading: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + else + GpsData_tree:add(buffer(0,0), "multiAntHeading: Was not included, compared [multiAntHeadingValid == 0] ") + end + if not (detailedAccuracyValid == 0) and size >= (indexOffset + 6) then + posAccuracy = buffer(indexOffset, 6) -- Primitive posAccuracy Type: [float] size in bits:48 + GpsData_tree:add(buffer(indexOffset, 6), "posAccuracy: " .. buffer(indexOffset, 6)) + indexOffset = indexOffset + 6 + else + GpsData_tree:add(buffer(0,0), "posAccuracy: Was not included, compared [detailedAccuracyValid == 0] ") + end + if not (detailedAccuracyValid == 0) and size >= (indexOffset + 6) then + velAccuracy = buffer(indexOffset, 6) -- Primitive velAccuracy Type: [float] size in bits:48 + GpsData_tree:add(buffer(indexOffset, 6), "velAccuracy: " .. buffer(indexOffset, 6)) + indexOffset = indexOffset + 6 + else + GpsData_tree:add(buffer(0,0), "velAccuracy: Was not included, compared [detailedAccuracyValid == 0] ") + end + if size >= (indexOffset + 4) then + -- Not Encoded posEcef Type: [double] + -- Not Encoded velEcef Type: [float] + -- Not Encoded posEcefAccuracy Type: [float] + -- Not Encoded velEcefAccuracy Type: [float] + -- Not Encoded Year Type: [uint16_t] + -- Not Encoded Month Type: [uint8_t] + -- Not Encoded Day Type: [uint8_t] + -- Not Encoded Hour Type: [uint8_t] + -- Not Encoded Minute Type: [uint8_t] + -- Not Encoded Second Type: [uint8_t] + -- Not Encoded TimeValid Type: [uint8_t] + -- Not Encoded GroundSpeed Type: [float] + -- Not Encoded GroundHeading Type: [float] + -- Not Encoded valid3DFix Type: [uint8_t] + -- Not in Memory, but encoded Value [postReceiptUpdate2] size in bits:0 + multiAntHeadingAccuracy = buffer(indexOffset, 4):int() / 5729578 -- Primitive multiAntHeadingAccuracy Type: [float] size in bits:32 + GpsData_tree:add(buffer(indexOffset, 4), "multiAntHeadingAccuracy: " .. buffer(indexOffset, 4):int() / 5729578) + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_INS_QUALITY +function print_InsQuality(subtree, buffer, id, size, index) + local name = "InsQuality" + local indexOffset = 0 + local InsQuality_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(InsQuality_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local systemTime, gpsSource, imuType, insMode, hasGyroBias, hasGravityBias, hasAccelBias, hasClockBias, + hasPanTiltBias, posRejected, velRejected, hdgRejected, gpsPeriod, hdgPeriod, posChiSquare, velChiSquare, hdgChiSquare, + gravityConfidence, clockBiasConfidence, clockDriftConfidence, gravityBias, clockBias, clockDrift, numTightSatPosUpdates, numTightSatVelUpdates, numTightPosUpdates, + numTightVelUpdates, panTiltChiSquare + -- 37 Data Elements found: + if size >= (indexOffset + 4) then + systemTime = buffer(indexOffset, 4):uint() -- Primitive systemTime Type: [uint32_t] size in bits:32 + InsQuality_tree:add(buffer(indexOffset, 4), "systemTime: " .. buffer(indexOffset, 4):uint() .. " ms") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + gpsSource = buffer(indexOffset, 1):uint() -- Enumeration gpsSource Type: [gpsSource_t] size in bits: 8 + InsQuality_tree:add(buffer(indexOffset, 1), "gpsSource: " .. get_gpsSource_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + -- Not in Memory, but encoded Value [reserved] size in bits:5 + imuType = buffer(indexOffset, 1):bitfield(5, 3) -- Enumeration imuType Type: [imuType_t] size in bits: 3 + InsQuality_tree:add(buffer(indexOffset, 1), "imuType: " .. get_imuType_t_string(buffer(indexOffset, 1):bitfield(5, 3) ) .. " [" .. buffer(indexOffset, 1):bitfield(5, 3) .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + insMode = buffer(indexOffset, 1):uint() -- Enumeration insMode Type: [insMode_t] size in bits: 8 + InsQuality_tree:add(buffer(indexOffset, 1), "insMode: " .. get_insMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + hasGyroBias = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive hasGyroBias Type: [unsigned] size in bits:1 + InsQuality_tree:add(buffer(indexOffset, 1), "hasGyroBias: " .. buffer(indexOffset, 1):bitfield(0, 1)) + hasGravityBias = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive hasGravityBias Type: [unsigned] size in bits:1 + InsQuality_tree:add(buffer(indexOffset, 1), "hasGravityBias: " .. buffer(indexOffset, 1):bitfield(1, 1)) + hasAccelBias = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive hasAccelBias Type: [unsigned] size in bits:1 + InsQuality_tree:add(buffer(indexOffset, 1), "hasAccelBias: " .. buffer(indexOffset, 1):bitfield(2, 1)) + hasClockBias = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive hasClockBias Type: [unsigned] size in bits:1 + InsQuality_tree:add(buffer(indexOffset, 1), "hasClockBias: " .. buffer(indexOffset, 1):bitfield(3, 1)) + hasPanTiltBias = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive hasPanTiltBias Type: [unsigned] size in bits:1 + InsQuality_tree:add(buffer(indexOffset, 1), "hasPanTiltBias: " .. buffer(indexOffset, 1):bitfield(4, 1)) + posRejected = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive posRejected Type: [unsigned] size in bits:1 + InsQuality_tree:add(buffer(indexOffset, 1), "posRejected: " .. buffer(indexOffset, 1):bitfield(5, 1)) + velRejected = buffer(indexOffset, 1):bitfield(6, 1) -- Primitive velRejected Type: [unsigned] size in bits:1 + InsQuality_tree:add(buffer(indexOffset, 1), "velRejected: " .. buffer(indexOffset, 1):bitfield(6, 1)) + hdgRejected = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive hdgRejected Type: [unsigned] size in bits:1 + InsQuality_tree:add(buffer(indexOffset, 1), "hdgRejected: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + gpsPeriod = buffer(indexOffset, 1):uint() / 100 -- Primitive gpsPeriod Type: [float] size in bits:8 + InsQuality_tree:add(buffer(indexOffset, 1), "gpsPeriod: " .. buffer(indexOffset, 1):uint() / 100 .. " seconds") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + hdgPeriod = buffer(indexOffset, 1):uint() / 100 -- Primitive hdgPeriod Type: [float] size in bits:8 + InsQuality_tree:add(buffer(indexOffset, 1), "hdgPeriod: " .. buffer(indexOffset, 1):uint() / 100 .. " seconds") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + posChiSquare = buffer(indexOffset, 2):int() -- Primitive posChiSquare Type: [float] size in bits:16 + indexOffset = float16ToChiSquare(InsQuality_tree, "posChiSquare", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + velChiSquare = buffer(indexOffset, 2):int() -- Primitive velChiSquare Type: [float] size in bits:16 + indexOffset = float16ToChiSquare(InsQuality_tree, "velChiSquare", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + hdgChiSquare = buffer(indexOffset, 2):int() -- Primitive hdgChiSquare Type: [float] size in bits:16 + indexOffset = float16ToChiSquare(InsQuality_tree, "hdgChiSquare", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 6) then + attConfidence = buffer(indexOffset, 6) -- Primitive attConfidence Type: [float] size in bits:48 + indexOffset = unsigned16x3To16QUAT(InsQuality_tree, "attConfidence", buffer, indexOffset, 6, 10000) + end + if size >= (indexOffset + 6) then + velConfidence = buffer(indexOffset, 6) -- Primitive velConfidence Type: [float] size in bits:48 + indexOffset = unsigned16x3To16NED(InsQuality_tree, "velConfidence", buffer, indexOffset, 6, 100) + end + if size >= (indexOffset + 6) then + posConfidence = buffer(indexOffset, 6) -- Primitive posConfidence Type: [float] size in bits:48 + indexOffset = unsigned16x3To16NED(InsQuality_tree, "posConfidence", buffer, indexOffset, 6, 100) + end + if not (hasGyroBias == 0) and size >= (indexOffset + 6) then + gyroConfidence = buffer(indexOffset, 6) -- Primitive gyroConfidence Type: [float] size in bits:48 + indexOffset = unsigned16x3ToGyroBias(InsQuality_tree, "gyroConfidence", buffer, indexOffset, 6, 100000) + else + InsQuality_tree:add(buffer(0,0), "gyroConfidence: Was not included, compared [hasGyroBias == 0] ") + end + if not (hasAccelBias == 0) and size >= (indexOffset + 6) then + accelConfidence = buffer(indexOffset, 6) -- Primitive accelConfidence Type: [float] size in bits:48 + indexOffset = unsigned16x3ToAccelerometerBias(InsQuality_tree, "accelConfidence", buffer, indexOffset, 6, 30000) + else + InsQuality_tree:add(buffer(0,0), "accelConfidence: Was not included, compared [hasAccelBias == 0] ") + end + if not (hasGravityBias == 0) and size >= (indexOffset + 2) then + gravityConfidence = buffer(indexOffset, 2):uint() / 30000 -- Primitive gravityConfidence Type: [float] size in bits:16 + InsQuality_tree:add(buffer(indexOffset, 2), "gravityConfidence: " .. buffer(indexOffset, 2):uint() / 30000 .. " m/s/s") + indexOffset = indexOffset + 2 + else + InsQuality_tree:add(buffer(0,0), "gravityConfidence: Was not included, compared [hasGravityBias == 0] ") + end + if not (hasClockBias == 0) and size >= (indexOffset + 2) then + clockBiasConfidence = buffer(indexOffset, 2):uint() / 10000 -- Primitive clockBiasConfidence Type: [float] size in bits:16 + InsQuality_tree:add(buffer(indexOffset, 2), "clockBiasConfidence: " .. buffer(indexOffset, 2):uint() / 10000 .. " meters") + indexOffset = indexOffset + 2 + else + InsQuality_tree:add(buffer(0,0), "clockBiasConfidence: Was not included, compared [hasClockBias == 0] ") + end + if not (hasClockBias == 0) and size >= (indexOffset + 2) then + clockDriftConfidence = buffer(indexOffset, 2):uint() / 10000 -- Primitive clockDriftConfidence Type: [float] size in bits:16 + InsQuality_tree:add(buffer(indexOffset, 2), "clockDriftConfidence: " .. buffer(indexOffset, 2):uint() / 10000 .. " m/s") + indexOffset = indexOffset + 2 + else + InsQuality_tree:add(buffer(0,0), "clockDriftConfidence: Was not included, compared [hasClockBias == 0] ") + end + if not (hasGyroBias == 0) and size >= (indexOffset + 6) then + gyroBias = buffer(indexOffset, 6) -- Primitive gyroBias Type: [float] size in bits:48 + indexOffset = signed16x3To16QUAT(InsQuality_tree, "gyroBias", buffer, indexOffset, 6, 100000) + else + InsQuality_tree:add(buffer(0,0), "gyroBias: Was not included, compared [hasGyroBias == 0] ") + end + if not (hasAccelBias == 0) and size >= (indexOffset + 6) then + accelBias = buffer(indexOffset, 6) -- Primitive accelBias Type: [float] size in bits:48 + indexOffset = unsigned16x3ToAccelerometerBias(InsQuality_tree, "accelBias", buffer, indexOffset, 6, 30000) + else + InsQuality_tree:add(buffer(0,0), "accelBias: Was not included, compared [hasAccelBias == 0] ") + end + if not (hasGravityBias == 0) and size >= (indexOffset + 2) then + gravityBias = buffer(indexOffset, 2):uint() / 30000 -- Primitive gravityBias Type: [float] size in bits:16 + InsQuality_tree:add(buffer(indexOffset, 2), "gravityBias: " .. buffer(indexOffset, 2):uint() / 30000 .. " m/s/s") + indexOffset = indexOffset + 2 + else + InsQuality_tree:add(buffer(0,0), "gravityBias: Was not included, compared [hasGravityBias == 0] ") + end + if not (hasClockBias == 0) and size >= (indexOffset + 2) then + clockBias = buffer(indexOffset, 2):int() / 100 -- Primitive clockBias Type: [float] size in bits:16 + InsQuality_tree:add(buffer(indexOffset, 2), "clockBias: " .. buffer(indexOffset, 2):int() / 100 .. " meters") + indexOffset = indexOffset + 2 + else + InsQuality_tree:add(buffer(0,0), "clockBias: Was not included, compared [hasClockBias == 0] ") + end + if not (hasClockBias == 0) and size >= (indexOffset + 2) then + clockDrift = buffer(indexOffset, 2):int() / 1000 -- Primitive clockDrift Type: [float] size in bits:16 + InsQuality_tree:add(buffer(indexOffset, 2), "clockDrift: " .. buffer(indexOffset, 2):int() / 1000 .. " meters/s") + indexOffset = indexOffset + 2 + else + InsQuality_tree:add(buffer(0,0), "clockDrift: Was not included, compared [hasClockBias == 0] ") + end + if not (hasClockBias == 0) and size >= (indexOffset + 1) then + numTightSatPosUpdates = buffer(indexOffset, 1):uint() -- Primitive numTightSatPosUpdates Type: [uint8_t] size in bits:8 + InsQuality_tree:add(buffer(indexOffset, 1), "numTightSatPosUpdates: " .. buffer(indexOffset, 1):uint() .. " satellites") + indexOffset = indexOffset + 1 + else + InsQuality_tree:add(buffer(0,0), "numTightSatPosUpdates: Was not included, compared [hasClockBias == 0] ") + end + if not (hasClockBias == 0) and size >= (indexOffset + 1) then + numTightSatVelUpdates = buffer(indexOffset, 1):uint() -- Primitive numTightSatVelUpdates Type: [uint8_t] size in bits:8 + InsQuality_tree:add(buffer(indexOffset, 1), "numTightSatVelUpdates: " .. buffer(indexOffset, 1):uint() .. " satellites") + indexOffset = indexOffset + 1 + else + InsQuality_tree:add(buffer(0,0), "numTightSatVelUpdates: Was not included, compared [hasClockBias == 0] ") + end + if not (hasClockBias == 0) and size >= (indexOffset + 1) then + numTightPosUpdates = buffer(indexOffset, 1):uint() -- Primitive numTightPosUpdates Type: [uint8_t] size in bits:8 + InsQuality_tree:add(buffer(indexOffset, 1), "numTightPosUpdates: " .. buffer(indexOffset, 1):uint() .. " signals") + indexOffset = indexOffset + 1 + else + InsQuality_tree:add(buffer(0,0), "numTightPosUpdates: Was not included, compared [hasClockBias == 0] ") + end + if not (hasClockBias == 0) and size >= (indexOffset + 1) then + numTightVelUpdates = buffer(indexOffset, 1):uint() -- Primitive numTightVelUpdates Type: [uint8_t] size in bits:8 + InsQuality_tree:add(buffer(indexOffset, 1), "numTightVelUpdates: " .. buffer(indexOffset, 1):uint() .. " signals") + indexOffset = indexOffset + 1 + else + InsQuality_tree:add(buffer(0,0), "numTightVelUpdates: Was not included, compared [hasClockBias == 0] ") + end + if not (hasPanTiltBias == 0) and size >= (indexOffset + 4) then + panTiltBias = buffer(indexOffset, 4) -- Primitive panTiltBias Type: [float] size in bits:32 + indexOffset = signed16x2ToPanTilt(InsQuality_tree, "panTiltBias", buffer, indexOffset, 4, 1) + else + InsQuality_tree:add(buffer(0,0), "panTiltBias: Was not included, compared [hasPanTiltBias == 0] ") + end + if not (hasPanTiltBias == 0) and size >= (indexOffset + 1) then + panTiltChiSquare = buffer(indexOffset, 1):uint() -- Primitive panTiltChiSquare Type: [float] size in bits:8 + InsQuality_tree:add(buffer(indexOffset, 1), "panTiltChiSquare: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + else + InsQuality_tree:add(buffer(0,0), "panTiltChiSquare: Was not included, compared [hasPanTiltBias == 0] ") + end + return name +end + +-- Packet ID: ORION_PKT_CMD +function print_OrionCmd(subtree, buffer, id, size, index) + local name = "OrionCmd" + local indexOffset = 0 + local OrionCmd_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionCmd_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + -- 1 Data Elements found: + -- Struct Cmd Type: [OrionCmd_t] size in bits reported:56 + indexOffset = print_OrionCmd_t(OrionCmd_tree, "Cmd", buffer, id, size, indexOffset, 7, 1 ) + return name +end + +-- Packet ID: ORION_PKT_CMD +function print_OrionCmdExtended(subtree, buffer, id, size, index) + local name = "OrionCmdExtended" + local indexOffset = 0 + local OrionCmdExtended_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionCmdExtended_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + -- 1 Data Elements found: + -- Struct Cmd Type: [OrionCmdExtended_t] size in bits reported:80 + indexOffset = print_OrionCmdExtended_t(OrionCmdExtended_tree, "Cmd", buffer, id, size, indexOffset, 10, 1 ) + return name +end + +-- Packet ID: ORION_PKT_CMD +function print_OrionCmdExtendedResponse(subtree, buffer, id, size, index) + local name = "OrionCmdExtendedResponse" + local indexOffset = 0 + local OrionCmdExtendedResponse_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionCmdExtendedResponse_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + -- 1 Data Elements found: + -- Struct Cmd Type: [OrionCmdExtendedResponse_t] size in bits reported:224 + indexOffset = print_OrionCmdExtendedResponse_t(OrionCmdExtendedResponse_tree, "Cmd", buffer, id, size, indexOffset, 28, 1 ) + return name +end + +-- Packet ID: ORION_PKT_STARTUP_CMD +function print_OrionStartupCmd(subtree, buffer, id, size, index) + local name = "OrionStartupCmd" + local indexOffset = 0 + local OrionStartupCmd_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionStartupCmd_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + -- 1 Data Elements found: + -- Struct Cmd Type: [OrionCmd_t] size in bits reported:56 + indexOffset = print_OrionCmd_t(OrionStartupCmd_tree, "Cmd", buffer, id, size, indexOffset, 7, 1 ) + return name +end + +-- Packet ID: ORION_PKT_POSITIONS +function print_OrionPositions(subtree, buffer, id, size, index) + local name = "OrionPositions" + local indexOffset = 0 + local OrionPositions_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionPositions_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local NumPositions + -- 2 Data Elements found: + if size >= (indexOffset + 1) then + NumPositions = buffer(indexOffset, 1):uint() -- Primitive NumPositions Type: [uint8_t] size in bits:8 + OrionPositions_tree:add(buffer(indexOffset, 1), "NumPositions: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + -- Embedded Struct: PosPreset Type: [PosPreset_t] size in bits reported:64 + indexOffset = print_PosPreset_t(OrionPositions_tree, "PosPreset", buffer, id, size, indexOffset, 8, NumPositions ) + return name +end + +-- Packet ID: ORION_PKT_GEOPOINT_CMD +function print_GeopointCmd(subtree, buffer, id, size, index) + local name = "GeopointCmd" + local indexOffset = 0 + local GeopointCmd_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(GeopointCmd_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local targetLat, targetLon, targetAlt, joystickRange, options + -- 6 Data Elements found: + if size >= (indexOffset + 4) then + targetLat = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive targetLat Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(GeopointCmd_tree, "targetLat", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + targetLon = buffer(indexOffset, 4):int() / (180*10000000/math.pi) -- Primitive targetLon Type: [double] size in bits:32 + indexOffset = signed32ToDegrees(GeopointCmd_tree, "targetLon", buffer, indexOffset, 4, (180*10000000/math.pi)) + end + if size >= (indexOffset + 4) then + targetAlt = buffer(indexOffset, 4):int() / 10000 -- Primitive targetAlt Type: [double] size in bits:32 + GeopointCmd_tree:add(buffer(indexOffset, 4), "targetAlt: " .. buffer(indexOffset, 4):int() / 10000 .. " meters") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 6) then + targetVelNED = buffer(indexOffset, 6) -- Primitive targetVelNED Type: [float] size in bits:48 + indexOffset = signed16x3To16NED(GeopointCmd_tree, "targetVelNED", buffer, indexOffset, 6, 100) + end + if size >= (indexOffset + 2) then + joystickRange = buffer(indexOffset, 2):uint() -- Primitive joystickRange Type: [float] size in bits:16 + GeopointCmd_tree:add(buffer(indexOffset, 2), "joystickRange: " .. buffer(indexOffset, 2):uint() .. " meters") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + options = buffer(indexOffset, 1):uint() -- Enumeration options Type: [geopointOptions] size in bits: 8 + GeopointCmd_tree:add(buffer(indexOffset, 1), "options: " .. get_geopointOptions_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_PATH +function print_OrionPath(subtree, buffer, id, size, index) + local name = "OrionPath" + local indexOffset = 0 + local OrionPath_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionPath_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local numPoints, pointDown, numCrossTrackSteps, alongTrackStepAngle, crossTrackStepRatio + -- 7 Data Elements found: + if size >= (indexOffset + 1) then + numPoints = buffer(indexOffset, 1):uint() -- Primitive numPoints Type: [uint8_t] size in bits:8 + OrionPath_tree:add(buffer(indexOffset, 1), "numPoints: " .. buffer(indexOffset, 1):uint() .. " points") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + pointDown = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive pointDown Type: [unsigned] size in bits:1 + indexOffset = bitfield1ToEnabled(OrionPath_tree, "pointDown", buffer, indexOffset, 1, 1, 0) + -- Not in Memory, but encoded Value [reserved] size in bits:3 + numCrossTrackSteps = buffer(indexOffset, 1):bitfield(4, 4) -- Primitive numCrossTrackSteps Type: [unsigned] size in bits:4 + OrionPath_tree:add(buffer(indexOffset, 1), "numCrossTrackSteps: " .. buffer(indexOffset, 1):bitfield(4, 4) .. " steps") + indexOffset = indexOffset + 1 + end + -- Embedded Struct: Point Type: [Point_t] size in bits reported:72 + indexOffset = print_Point_t(OrionPath_tree, "Point", buffer, id, size, indexOffset, 9, numPoints ) + if size >= (indexOffset + 2) + ((numPoints-1) * 9) then + alongTrackStepAngle = buffer(indexOffset, 2):uint() -- Primitive alongTrackStepAngle Type: [float] size in bits:16 + indexOffset = unsigned16ToTrackStepAngle(OrionPath_tree, "alongTrackStepAngle", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 1) + ((numPoints-1) * 9) then + crossTrackStepRatio = buffer(indexOffset, 1):uint() -- Primitive crossTrackStepRatio Type: [float] size in bits:8 + indexOffset = unsigned8ToTrackStepRatio(OrionPath_tree, "crossTrackStepRatio", buffer, indexOffset, 1, 1) + end + return name +end + +-- Packet ID: ORION_PKT_STARE_ACK +function print_StareAck(subtree, buffer, id, size, index) + local name = "StareAck" + local indexOffset = 0 + local StareAck_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(StareAck_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local echoSystemTime + -- 1 Data Elements found: + if size >= (indexOffset + 4) then + echoSystemTime = buffer(indexOffset, 4):uint() -- Primitive echoSystemTime Type: [uint32_t] size in bits:32 + StareAck_tree:add(buffer(indexOffset, 4), "echoSystemTime: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_GEOID_UNDULATION +function print_GeoidUndulation(subtree, buffer, id, size, index) + local name = "GeoidUndulation" + local indexOffset = 0 + local GeoidUndulation_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(GeoidUndulation_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Undulation + -- 1 Data Elements found: + if size >= (indexOffset + 2) then + Undulation = buffer(indexOffset, 2):int() / 100 -- Primitive Undulation Type: [float] size in bits:16 + GeoidUndulation_tree:add(buffer(indexOffset, 2), "Undulation: " .. buffer(indexOffset, 2):int() / 100) + indexOffset = indexOffset + 2 + end + return name +end + +-- Packet ID: ORION_PKT_CAMERA_SWITCH +function print_OrionCameraSwitch(subtree, buffer, id, size, index) + local name = "OrionCameraSwitch" + local indexOffset = 0 + local OrionCameraSwitch_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionCameraSwitch_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index + -- 1 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionCameraSwitch_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_CAMERA_STATE +function print_OrionCameraState(subtree, buffer, id, size, index) + local name = "OrionCameraState" + local indexOffset = 0 + local OrionCameraState_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionCameraState_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Zoom, Focus, KeepActiveCamera, Index + -- 4 Data Elements found: + if size >= (indexOffset + 2) then + Zoom = buffer(indexOffset, 2):int() / 100 -- Primitive Zoom Type: [float] size in bits:16 + OrionCameraState_tree:add(buffer(indexOffset, 2), "Zoom: " .. buffer(indexOffset, 2):int() / 100) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Focus = buffer(indexOffset, 2):int() / 10000 -- Primitive Focus Type: [float] size in bits:16 + OrionCameraState_tree:add(buffer(indexOffset, 2), "Focus: " .. buffer(indexOffset, 2):int() / 10000) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + KeepActiveCamera = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive KeepActiveCamera Type: [uint8_t] size in bits:1 + OrionCameraState_tree:add(buffer(indexOffset, 1), "KeepActiveCamera: " .. buffer(indexOffset, 1):bitfield(0, 1)) + Index = buffer(indexOffset, 1):bitfield(1, 7) -- Primitive Index Type: [uint8_t] size in bits:7 + OrionCameraState_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):bitfield(1, 7)) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_FLIR_SETTINGS +function print_OrionFlirSettings(subtree, buffer, id, size, index) + local name = "OrionFlirSettings" + local indexOffset = 0 + local OrionFlirSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionFlirSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, DisableSffc, Palette, NucType, BlackHot, MaxAgcGain, AceLevel, DdeThreshold, + AgcMidpoint, IntegrationTime, AgcType, AgcGamma, AgcLinearPercent, TceEnable, TceGamma, TceClipLimit, TceAlpha + -- 17 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + DisableSffc = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive DisableSffc Type: [unsigned] size in bits:1 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "DisableSffc: " .. buffer(indexOffset, 1):bitfield(0, 1)) + Palette = buffer(indexOffset, 1):bitfield(1, 3) -- Primitive Palette Type: [unsigned] size in bits:3 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "Palette: " .. buffer(indexOffset, 1):bitfield(1, 3)) + NucType = buffer(indexOffset, 1):bitfield(4, 3) -- Enumeration NucType Type: [FlirNucType_t] size in bits: 3 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "NucType: " .. get_FlirNucType_t_string(buffer(indexOffset, 1):bitfield(4, 3) ) .. " [" .. buffer(indexOffset, 1):bitfield(4, 3) .. "]") + BlackHot = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive BlackHot Type: [unsigned] size in bits:1 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "BlackHot: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MaxAgcGain = buffer(indexOffset, 1):uint() -- Primitive MaxAgcGain Type: [uint8_t] size in bits:8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "MaxAgcGain: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + AceLevel = buffer(indexOffset, 1):int() -- Primitive AceLevel Type: [int8_t] size in bits:8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "AceLevel: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + DdeThreshold = buffer(indexOffset, 1):uint() -- Primitive DdeThreshold Type: [uint8_t] size in bits:8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "DdeThreshold: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + AgcMidpoint = buffer(indexOffset, 1):uint() -- Primitive AgcMidpoint Type: [uint8_t] size in bits:8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "AgcMidpoint: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + IntegrationTime = buffer(indexOffset, 1):uint() -- Primitive IntegrationTime Type: [float] size in bits:8 + indexOffset = unsigned8ToIntegrationTime(OrionFlirSettings_tree, "IntegrationTime", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + AgcType = buffer(indexOffset, 1):uint() -- Enumeration AgcType Type: [FlirAgcType_t] size in bits: 8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "AgcType: " .. get_FlirAgcType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + AgcGamma = buffer(indexOffset, 1):uint() -- Primitive AgcGamma Type: [float] size in bits:8 + indexOffset = unsigned8ToGamma(OrionFlirSettings_tree, "AgcGamma", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + AgcLinearPercent = buffer(indexOffset, 1):uint() -- Primitive AgcLinearPercent Type: [float] size in bits:8 + indexOffset = unsigned8ToPercent(OrionFlirSettings_tree, "AgcLinearPercent", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + TceEnable = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive TceEnable Type: [unsigned] size in bits:1 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "TceEnable: " .. buffer(indexOffset, 1):bitfield(0, 1)) + TceGamma = buffer(indexOffset, 1):uint() -- Primitive TceGamma Type: [uint8_t] size in bits:8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "TceGamma: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + TceClipLimit = buffer(indexOffset, 1):uint() -- Primitive TceClipLimit Type: [uint8_t] size in bits:8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "TceClipLimit: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + TceAlpha = buffer(indexOffset, 1):uint() -- Primitive TceAlpha Type: [uint8_t] size in bits:8 + OrionFlirSettings_tree:add(buffer(indexOffset, 1), "TceAlpha: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_APTINA_SETTINGS +function print_OrionAptinaSettings(subtree, buffer, id, size, index) + local name = "OrionAptinaSettings" + local indexOffset = 0 + local OrionAptinaSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionAptinaSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, MinExposure, MaxExposure, MinGain, MaxGain, Brightness, Contrast, Saturation, + Sharpness, DebugEnable, Hue, Aperture, MinAperture, MaxAperture, Flip + -- 15 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionAptinaSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + MinExposure = buffer(indexOffset, 2):uint() -- Primitive MinExposure Type: [float] size in bits:16 + indexOffset = exposureToMilliseconds(OrionAptinaSettings_tree, "MinExposure", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + MaxExposure = buffer(indexOffset, 2):uint() -- Primitive MaxExposure Type: [float] size in bits:16 + indexOffset = exposureToMilliseconds(OrionAptinaSettings_tree, "MaxExposure", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + MinGain = buffer(indexOffset, 2):uint() -- Primitive MinGain Type: [float] size in bits:16 + indexOffset = unsigned16ToMinMaxGain(OrionAptinaSettings_tree, "MinGain", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + MaxGain = buffer(indexOffset, 2):uint() -- Primitive MaxGain Type: [float] size in bits:16 + indexOffset = unsigned16ToMinMaxGain(OrionAptinaSettings_tree, "MaxGain", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 1) then + Brightness = buffer(indexOffset, 1):int() -- Primitive Brightness Type: [int8_t] size in bits:8 + OrionAptinaSettings_tree:add(buffer(indexOffset, 1), "Brightness: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Contrast = buffer(indexOffset, 1):int() -- Primitive Contrast Type: [float] size in bits:8 + indexOffset = cameraContrast(OrionAptinaSettings_tree, "Contrast", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + Saturation = buffer(indexOffset, 1):int() -- Primitive Saturation Type: [float] size in bits:8 + indexOffset = cameraContrast(OrionAptinaSettings_tree, "Saturation", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + Sharpness = buffer(indexOffset, 1):uint() -- Primitive Sharpness Type: [float] size in bits:8 + indexOffset = cameraSharpness(OrionAptinaSettings_tree, "Sharpness", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + DebugEnable = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive DebugEnable Type: [unsigned] size in bits:1 + OrionAptinaSettings_tree:add(buffer(indexOffset, 1), "DebugEnable: " .. buffer(indexOffset, 1):bitfield(0, 1)) + Hue = buffer(indexOffset, 1):int() -- Primitive Hue Type: [int8_t] size in bits:8 + OrionAptinaSettings_tree:add(buffer(indexOffset, 1), "Hue: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Aperture = buffer(indexOffset, 1):uint() -- Primitive Aperture Type: [float] size in bits:8 + indexOffset = cameraAperature(OrionAptinaSettings_tree, "Aperture", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + MinAperture = buffer(indexOffset, 1):uint() -- Primitive MinAperture Type: [float] size in bits:8 + indexOffset = cameraAperature(OrionAptinaSettings_tree, "MinAperture", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + MaxAperture = buffer(indexOffset, 1):uint() -- Primitive MaxAperture Type: [float] size in bits:8 + indexOffset = cameraAperature(OrionAptinaSettings_tree, "MaxAperture", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + Flip = buffer(indexOffset, 1):uint() -- Primitive Flip Type: [uint8_t] size in bits:8 + OrionAptinaSettings_tree:add(buffer(indexOffset, 1), "Flip: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_ZAFIRO_SETTINGS +function print_OrionZafiroSettings(subtree, buffer, id, size, index) + local name = "OrionZafiroSettings" + local indexOffset = 0 + local OrionZafiroSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionZafiroSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, BlackHot, IntegrationTime, LapEnabled, LapGain, AgcSaturation, UseNucTablePresets + -- 7 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionZafiroSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + BlackHot = buffer(indexOffset, 1):uint() -- Primitive BlackHot Type: [uint8_t] size in bits:8 + OrionZafiroSettings_tree:add(buffer(indexOffset, 1), "BlackHot: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + IntegrationTime = buffer(indexOffset, 1):uint() -- Primitive IntegrationTime Type: [float] size in bits:8 + OrionZafiroSettings_tree:add(buffer(indexOffset, 1), "IntegrationTime: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + LapEnabled = buffer(indexOffset, 1):uint() -- Primitive LapEnabled Type: [uint8_t] size in bits:8 + OrionZafiroSettings_tree:add(buffer(indexOffset, 1), "LapEnabled: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + LapGain = buffer(indexOffset, 1):uint() -- Primitive LapGain Type: [float] size in bits:8 + OrionZafiroSettings_tree:add(buffer(indexOffset, 1), "LapGain: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + AgcSaturation = buffer(indexOffset, 1):uint() -- Primitive AgcSaturation Type: [float] size in bits:8 + OrionZafiroSettings_tree:add(buffer(indexOffset, 1), "AgcSaturation: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + UseNucTablePresets = buffer(indexOffset, 1):uint() -- Primitive UseNucTablePresets Type: [uint8_t] size in bits:8 + OrionZafiroSettings_tree:add(buffer(indexOffset, 1), "UseNucTablePresets: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_HITACHI_SETTINGS +function print_OrionHitachiSettings(subtree, buffer, id, size, index) + local name = "OrionHitachiSettings" + local indexOffset = 0 + local OrionHitachiSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionHitachiSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, IntegrationTime, Aperture, Sharpness, NightMode + -- 5 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionHitachiSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + IntegrationTime = buffer(indexOffset, 2):int() -- Primitive IntegrationTime Type: [int16_t] size in bits:16 + OrionHitachiSettings_tree:add(buffer(indexOffset, 2), "IntegrationTime: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Aperture = buffer(indexOffset, 2):int() / 10 -- Primitive Aperture Type: [float] size in bits:16 + OrionHitachiSettings_tree:add(buffer(indexOffset, 2), "Aperture: " .. buffer(indexOffset, 2):int() / 10) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + Sharpness = buffer(indexOffset, 1):uint() -- Primitive Sharpness Type: [float] size in bits:8 + indexOffset = unsigned8ToHitachiSharpness(OrionHitachiSettings_tree, "Sharpness", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + NightMode = buffer(indexOffset, 1):uint() -- Primitive NightMode Type: [uint8_t] size in bits:8 + OrionHitachiSettings_tree:add(buffer(indexOffset, 1), "NightMode: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_SONY_SETTINGS +function print_OrionSonySettings(subtree, buffer, id, size, index) + local name = "OrionSonySettings" + local indexOffset = 0 + local OrionSonySettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionSonySettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, MinExposure, MaxExposure, MinGain, MaxGain, Brightness, Contrast, Saturation, + Sharpness, FrameRate + -- 10 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionSonySettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + MinExposure = buffer(indexOffset, 2):uint() -- Primitive MinExposure Type: [float] size in bits:16 + OrionSonySettings_tree:add(buffer(indexOffset, 2), "MinExposure: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + MaxExposure = buffer(indexOffset, 2):uint() -- Primitive MaxExposure Type: [float] size in bits:16 + OrionSonySettings_tree:add(buffer(indexOffset, 2), "MaxExposure: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + MinGain = buffer(indexOffset, 1):uint() -- Primitive MinGain Type: [uint8_t] size in bits:8 + OrionSonySettings_tree:add(buffer(indexOffset, 1), "MinGain: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MaxGain = buffer(indexOffset, 1):uint() -- Primitive MaxGain Type: [uint8_t] size in bits:8 + OrionSonySettings_tree:add(buffer(indexOffset, 1), "MaxGain: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Brightness = buffer(indexOffset, 1):uint() -- Primitive Brightness Type: [uint8_t] size in bits:8 + OrionSonySettings_tree:add(buffer(indexOffset, 1), "Brightness: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Contrast = buffer(indexOffset, 1):int() -- Primitive Contrast Type: [float] size in bits:8 + OrionSonySettings_tree:add(buffer(indexOffset, 1), "Contrast: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Saturation = buffer(indexOffset, 1):int() -- Primitive Saturation Type: [float] size in bits:8 + OrionSonySettings_tree:add(buffer(indexOffset, 1), "Saturation: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Sharpness = buffer(indexOffset, 1):uint() -- Primitive Sharpness Type: [float] size in bits:8 + OrionSonySettings_tree:add(buffer(indexOffset, 1), "Sharpness: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + FrameRate = buffer(indexOffset, 1):uint() -- Primitive FrameRate Type: [float] size in bits:8 + OrionSonySettings_tree:add(buffer(indexOffset, 1), "FrameRate: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_KTNC_SETTINGS +function print_OrionKtncSettings(subtree, buffer, id, size, index) + local name = "OrionKtncSettings" + local indexOffset = 0 + local OrionKtncSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionKtncSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, IntegrationTime, Aperture, Sharpness, VerticalFlip, ExposureComp, Contrast, Saturation, + NightMode, ResetToDefaults, HasMaxExposure, MaxExposure, VersionMajor, VersionMinor, VersionPatch + -- 15 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + IntegrationTime = buffer(indexOffset, 2):int() -- Primitive IntegrationTime Type: [int16_t] size in bits:16 + OrionKtncSettings_tree:add(buffer(indexOffset, 2), "IntegrationTime: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Aperture = buffer(indexOffset, 2):int() / 10 -- Primitive Aperture Type: [float] size in bits:16 + OrionKtncSettings_tree:add(buffer(indexOffset, 2), "Aperture: " .. buffer(indexOffset, 2):int() / 10) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + Sharpness = buffer(indexOffset, 1):uint() / 15 -- Primitive Sharpness Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "Sharpness: " .. buffer(indexOffset, 1):uint() / 15) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + VerticalFlip = buffer(indexOffset, 1):uint() -- Primitive VerticalFlip Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "VerticalFlip: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + ExposureComp = buffer(indexOffset, 1):uint() / 17 -- Primitive ExposureComp Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "ExposureComp: " .. buffer(indexOffset, 1):uint() / 17) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Contrast = buffer(indexOffset, 1):uint() / 7 -- Primitive Contrast Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "Contrast: " .. buffer(indexOffset, 1):uint() / 7) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Saturation = buffer(indexOffset, 1):uint() / 7 -- Primitive Saturation Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "Saturation: " .. buffer(indexOffset, 1):uint() / 7) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + NightMode = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive NightMode Type: [unsigned] size in bits:1 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "NightMode: " .. buffer(indexOffset, 1):bitfield(0, 1)) + ResetToDefaults = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive ResetToDefaults Type: [unsigned] size in bits:1 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "ResetToDefaults: " .. buffer(indexOffset, 1):bitfield(1, 1)) + HasMaxExposure = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive HasMaxExposure Type: [unsigned] size in bits:1 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "HasMaxExposure: " .. buffer(indexOffset, 1):bitfield(2, 1)) + MaxExposure = buffer(indexOffset, 2):uint() / 1000000 -- Primitive MaxExposure Type: [float] size in bits:16 + OrionKtncSettings_tree:add(buffer(indexOffset, 2), "MaxExposure: " .. buffer(indexOffset, 2):uint() / 1000000) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + VersionMajor = buffer(indexOffset, 1):uint() -- Primitive VersionMajor Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "VersionMajor: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + VersionMinor = buffer(indexOffset, 1):uint() -- Primitive VersionMinor Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "VersionMinor: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + VersionPatch = buffer(indexOffset, 1):uint() -- Primitive VersionPatch Type: [uint8_t] size in bits:8 + OrionKtncSettings_tree:add(buffer(indexOffset, 1), "VersionPatch: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_ATTOLLO_SETTINGS +function print_OrionAttolloSettings(subtree, buffer, id, size, index) + local name = "OrionAttolloSettings" + local indexOffset = 0 + local OrionAttolloSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionAttolloSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, MinGain, MaxGain, MinExposure, MaxExposure, BlackHot, Sharpness, MeanTargetRange, + BlackPoint, DisableSeeSpot, SeeSpotDebugOutput, RawRecord, AutoGainMode, Reserved0, FixedLaserTriggerDelay, LaserIntegrationTime, Brightness, + Contrast, SeeSpotMode, LaserGain, LaserOffset + -- 21 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + MinGain = buffer(indexOffset, 2):uint() / 100 -- Primitive MinGain Type: [float] size in bits:16 + OrionAttolloSettings_tree:add(buffer(indexOffset, 2), "MinGain: " .. buffer(indexOffset, 2):uint() / 100) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + MaxGain = buffer(indexOffset, 2):uint() / 100 -- Primitive MaxGain Type: [float] size in bits:16 + OrionAttolloSettings_tree:add(buffer(indexOffset, 2), "MaxGain: " .. buffer(indexOffset, 2):uint() / 100) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + MinExposure = buffer(indexOffset, 2):uint() / 100 -- Primitive MinExposure Type: [float] size in bits:16 + OrionAttolloSettings_tree:add(buffer(indexOffset, 2), "MinExposure: " .. buffer(indexOffset, 2):uint() / 100) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + MaxExposure = buffer(indexOffset, 2):uint() / 100 -- Primitive MaxExposure Type: [float] size in bits:16 + OrionAttolloSettings_tree:add(buffer(indexOffset, 2), "MaxExposure: " .. buffer(indexOffset, 2):uint() / 100) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + BlackHot = buffer(indexOffset, 1):uint() -- Primitive BlackHot Type: [uint8_t] size in bits:8 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "BlackHot: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Sharpness = buffer(indexOffset, 1):uint() -- Primitive Sharpness Type: [float] size in bits:8 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "Sharpness: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MeanTargetRange = buffer(indexOffset, 1):uint() -- Primitive MeanTargetRange Type: [uint8_t] size in bits:8 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "MeanTargetRange: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + BlackPoint = buffer(indexOffset, 1):uint() -- Primitive BlackPoint Type: [uint8_t] size in bits:8 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "BlackPoint: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + DisableSeeSpot = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive DisableSeeSpot Type: [unsigned] size in bits:1 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "DisableSeeSpot: " .. buffer(indexOffset, 1):bitfield(0, 1)) + SeeSpotDebugOutput = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive SeeSpotDebugOutput Type: [unsigned] size in bits:1 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "SeeSpotDebugOutput: " .. buffer(indexOffset, 1):bitfield(1, 1)) + RawRecord = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive RawRecord Type: [unsigned] size in bits:1 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "RawRecord: " .. buffer(indexOffset, 1):bitfield(2, 1)) + AutoGainMode = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive AutoGainMode Type: [unsigned] size in bits:1 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "AutoGainMode: " .. buffer(indexOffset, 1):bitfield(3, 1)) + Reserved0 = buffer(indexOffset, 1):bitfield(4, 4) -- Primitive Reserved0 Type: [unsigned] size in bits:4 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "Reserved0: " .. buffer(indexOffset, 1):bitfield(4, 4)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + FixedLaserTriggerDelay = buffer(indexOffset, 4):float() -- Primitive FixedLaserTriggerDelay Type: [float] size in bits:32 + OrionAttolloSettings_tree:add(buffer(indexOffset, 4), "FixedLaserTriggerDelay: " .. buffer(indexOffset, 4):float()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + LaserIntegrationTime = buffer(indexOffset, 4):float() -- Primitive LaserIntegrationTime Type: [float] size in bits:32 + OrionAttolloSettings_tree:add(buffer(indexOffset, 4), "LaserIntegrationTime: " .. buffer(indexOffset, 4):float()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + Brightness = buffer(indexOffset, 4):float() -- Primitive Brightness Type: [float] size in bits:32 + OrionAttolloSettings_tree:add(buffer(indexOffset, 4), "Brightness: " .. buffer(indexOffset, 4):float()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + Contrast = buffer(indexOffset, 4):float() -- Primitive Contrast Type: [float] size in bits:32 + OrionAttolloSettings_tree:add(buffer(indexOffset, 4), "Contrast: " .. buffer(indexOffset, 4):float()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + SeeSpotMode = buffer(indexOffset, 1):uint() -- Primitive SeeSpotMode Type: [uint8_t] size in bits:8 + OrionAttolloSettings_tree:add(buffer(indexOffset, 1), "SeeSpotMode: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + LaserGain = buffer(indexOffset, 4):float() -- Primitive LaserGain Type: [float] size in bits:32 + OrionAttolloSettings_tree:add(buffer(indexOffset, 4), "LaserGain: " .. buffer(indexOffset, 4):float()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + LaserOffset = buffer(indexOffset, 4):uint() -- Primitive LaserOffset Type: [uint32_t] size in bits:32 + OrionAttolloSettings_tree:add(buffer(indexOffset, 4), "LaserOffset: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_ALVIUM_SETTINGS +function print_OrionAlviumSettings(subtree, buffer, id, size, index) + local name = "OrionAlviumSettings" + local indexOffset = 0 + local OrionAlviumSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionAlviumSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, Gain, Gamma, IntensityTarget, MinExposure, MaxExposure + -- 6 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionAlviumSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + Gain = buffer(indexOffset, 2):uint() / 10 -- Primitive Gain Type: [float] size in bits:16 + OrionAlviumSettings_tree:add(buffer(indexOffset, 2), "Gain: " .. buffer(indexOffset, 2):uint() / 10) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + Gamma = buffer(indexOffset, 2):uint() / 10 -- Primitive Gamma Type: [float] size in bits:16 + OrionAlviumSettings_tree:add(buffer(indexOffset, 2), "Gamma: " .. buffer(indexOffset, 2):uint() / 10) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + IntensityTarget = buffer(indexOffset, 2):uint() -- Primitive IntensityTarget Type: [float] size in bits:16 + OrionAlviumSettings_tree:add(buffer(indexOffset, 2), "IntensityTarget: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + MinExposure = buffer(indexOffset, 2):uint() / 1000000 -- Primitive MinExposure Type: [float] size in bits:16 + OrionAlviumSettings_tree:add(buffer(indexOffset, 2), "MinExposure: " .. buffer(indexOffset, 2):uint() / 1000000) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + MaxExposure = buffer(indexOffset, 2):uint() / 1000000 -- Primitive MaxExposure Type: [float] size in bits:16 + OrionAlviumSettings_tree:add(buffer(indexOffset, 2), "MaxExposure: " .. buffer(indexOffset, 2):uint() / 1000000) + indexOffset = indexOffset + 2 + end + return name +end + +-- Packet ID: ORION_PKT_UNIFIED_CAM_ERR_SETTINGS +function print_OrionUnifiedCamErrorSettings(subtree, buffer, id, size, index) + local name = "OrionUnifiedCamErrorSettings" + local indexOffset = 0 + local OrionUnifiedCamErrorSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionUnifiedCamErrorSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local NumCameras + -- 2 Data Elements found: + if size >= (indexOffset + 1) then + NumCameras = buffer(indexOffset, 1):uint() -- Primitive NumCameras Type: [uint8_t] size in bits:8 + OrionUnifiedCamErrorSettings_tree:add(buffer(indexOffset, 1), "NumCameras: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + -- Struct UnifiedCamAngularOffsets Type: [CameraAngularOffsets_t] size in bits reported:32 + indexOffset = print_CameraAngularOffsets_t(OrionUnifiedCamErrorSettings_tree, "UnifiedCamAngularOffsets", buffer, id, size, indexOffset, 4, NumCameras ) + return name +end + +-- Packet ID: ORION_PKT_OMNIVIS_SETTINGS +function print_OrionOmniVisSettings(subtree, buffer, id, size, index) + local name = "OrionOmniVisSettings" + local indexOffset = 0 + local OrionOmniVisSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionOmniVisSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, ExpMode, IsoMode, WbMode, ManExpTime, Brightness, Saturation, Contrast, + Sharpness, NoiseReduce, Scene, ControlMode, Rsc + -- 13 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + ExpMode = buffer(indexOffset, 1):uint() -- Primitive ExpMode Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "ExpMode: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + IsoMode = buffer(indexOffset, 1):uint() -- Primitive IsoMode Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "IsoMode: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + WbMode = buffer(indexOffset, 1):uint() -- Primitive WbMode Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "WbMode: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 8) then + ManExpTime = buffer(indexOffset, 8):uint64() -- Primitive ManExpTime Type: [uint64_t] size in bits:64 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 8), "ManExpTime: " .. buffer(indexOffset, 8):uint64()) + indexOffset = indexOffset + 8 + end + if size >= (indexOffset + 1) then + Brightness = buffer(indexOffset, 1):int() -- Primitive Brightness Type: [int8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "Brightness: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Saturation = buffer(indexOffset, 1):uint() -- Primitive Saturation Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "Saturation: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Contrast = buffer(indexOffset, 1):uint() -- Primitive Contrast Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "Contrast: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Sharpness = buffer(indexOffset, 1):uint() -- Primitive Sharpness Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "Sharpness: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + NoiseReduce = buffer(indexOffset, 1):uint() -- Primitive NoiseReduce Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "NoiseReduce: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Scene = buffer(indexOffset, 1):uint() -- Primitive Scene Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "Scene: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + ControlMode = buffer(indexOffset, 1):uint() -- Primitive ControlMode Type: [uint8_t] size in bits:8 + OrionOmniVisSettings_tree:add(buffer(indexOffset, 1), "ControlMode: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_SIERRA_SETTINGS +function print_OrionSierraSettings(subtree, buffer, id, size, index) + local name = "OrionSierraSettings" + local indexOffset = 0 + local OrionSierraSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionSierraSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, IceBrightness, IceGain, IceStrength, Polarity, ColorPalette, ColorMode + -- 7 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionSierraSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + IceBrightness = buffer(indexOffset, 2):uint() -- Primitive IceBrightness Type: [uint16_t] size in bits:16 + OrionSierraSettings_tree:add(buffer(indexOffset, 2), "IceBrightness: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + IceGain = buffer(indexOffset, 2):uint() -- Primitive IceGain Type: [uint16_t] size in bits:16 + OrionSierraSettings_tree:add(buffer(indexOffset, 2), "IceGain: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + IceStrength = buffer(indexOffset, 2):uint() -- Primitive IceStrength Type: [uint16_t] size in bits:16 + OrionSierraSettings_tree:add(buffer(indexOffset, 2), "IceStrength: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + Polarity = buffer(indexOffset, 1):bitfield(0, 1) -- Enumeration Polarity Type: [SierraPolarity_t] size in bits: 1 + OrionSierraSettings_tree:add(buffer(indexOffset, 1), "Polarity: " .. get_SierraPolarity_t_string(buffer(indexOffset, 1):bitfield(0, 1) ) .. " [" .. buffer(indexOffset, 1):bitfield(0, 1) .. "]") + ColorPalette = buffer(indexOffset, 1):bitfield(1, 4) -- Enumeration ColorPalette Type: [SierraColorPalette_t] size in bits: 4 + OrionSierraSettings_tree:add(buffer(indexOffset, 1), "ColorPalette: " .. get_SierraColorPalette_t_string(buffer(indexOffset, 1):bitfield(1, 4) ) .. " [" .. buffer(indexOffset, 1):bitfield(1, 4) .. "]") + ColorMode = buffer(indexOffset, 1):bitfield(5, 3) -- Enumeration ColorMode Type: [SierraColorMode_t] size in bits: 3 + OrionSierraSettings_tree:add(buffer(indexOffset, 1), "ColorMode: " .. get_SierraColorMode_t_string(buffer(indexOffset, 1):bitfield(5, 3) ) .. " [" .. buffer(indexOffset, 1):bitfield(5, 3) .. "]") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_SIONYX_SETTINGS +function print_OrionSionyxSettings(subtree, buffer, id, size, index) + local name = "OrionSionyxSettings" + local indexOffset = 0 + local OrionSionyxSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionSionyxSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, ExposureTime, AnalogGain, DigitalGain, FrameRate, ExposureMode, ToneMapping, Sharpening, + ImageOrientation, BrightnessTrim, IntegrationLineMin, IntegrationLineMax + -- 12 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionSionyxSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + ExposureTime = buffer(indexOffset, 2):uint() / 100 -- Primitive ExposureTime Type: [float] size in bits:16 + OrionSionyxSettings_tree:add(buffer(indexOffset, 2), "ExposureTime: " .. buffer(indexOffset, 2):uint() / 100) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 5) then + AnalogGain = buffer(indexOffset, 1):bitfield(0, 6) -- Primitive AnalogGain Type: [uint8_t] size in bits:6 + OrionSionyxSettings_tree:add(buffer(indexOffset, 1), "AnalogGain: " .. buffer(indexOffset, 1):bitfield(0, 6)) + DigitalGain = buffer(indexOffset, 2):bitfield(6, 7) -- Primitive DigitalGain Type: [uint8_t] size in bits:7 + OrionSionyxSettings_tree:add(buffer(indexOffset, 2), "DigitalGain: " .. buffer(indexOffset, 2):bitfield(6, 7)) + FrameRate = buffer(indexOffset, 3):bitfield(13, 5) -- Enumeration FrameRate Type: [SionyxFrameRate_t] size in bits: 5 + OrionSionyxSettings_tree:add(buffer(indexOffset, 3), "FrameRate: " .. get_SionyxFrameRate_t_string(buffer(indexOffset, 3):bitfield(13, 5) ) .. " [" .. buffer(indexOffset, 3):bitfield(13, 5) .. "]") + ExposureMode = buffer(indexOffset, 3):bitfield(18, 2) -- Primitive ExposureMode Type: [uint8_t] size in bits:2 + OrionSionyxSettings_tree:add(buffer(indexOffset, 3), "ExposureMode: " .. buffer(indexOffset, 3):bitfield(18, 2)) + ToneMapping = buffer(indexOffset, 3):bitfield(20, 3) -- Primitive ToneMapping Type: [uint8_t] size in bits:3 + OrionSionyxSettings_tree:add(buffer(indexOffset, 3), "ToneMapping: " .. buffer(indexOffset, 3):bitfield(20, 3)) + Sharpening = buffer(indexOffset, 5):bitfield(23, 15) -- Primitive Sharpening Type: [uint16_t] size in bits:15 + OrionSionyxSettings_tree:add(buffer(indexOffset, 5), "Sharpening: " .. buffer(indexOffset, 5):bitfield(23, 15)) + ImageOrientation = buffer(indexOffset, 5):bitfield(38, 2) -- Primitive ImageOrientation Type: [uint8_t] size in bits:2 + OrionSionyxSettings_tree:add(buffer(indexOffset, 5), "ImageOrientation: " .. buffer(indexOffset, 5):bitfield(38, 2)) + indexOffset = indexOffset + 5 + end + if size >= (indexOffset + 2) then + BrightnessTrim = buffer(indexOffset, 2):int() -- Primitive BrightnessTrim Type: [int16_t] size in bits:16 + OrionSionyxSettings_tree:add(buffer(indexOffset, 2), "BrightnessTrim: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + IntegrationLineMin = buffer(indexOffset, 2):uint() -- Primitive IntegrationLineMin Type: [uint16_t] size in bits:16 + OrionSionyxSettings_tree:add(buffer(indexOffset, 2), "IntegrationLineMin: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + IntegrationLineMax = buffer(indexOffset, 2):uint() -- Primitive IntegrationLineMax Type: [uint16_t] size in bits:16 + OrionSionyxSettings_tree:add(buffer(indexOffset, 2), "IntegrationLineMax: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + return name +end + +-- Packet ID: ORION_PKT_LYNRED_SETTINGS +function print_OrionLynredSettings(subtree, buffer, id, size, index) + local name = "OrionLynredSettings" + local indexOffset = 0 + local OrionLynredSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionLynredSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, ContrastMode, ICEMovingAverage, ICEMinThreshold, ICEMaxThreshold + -- 6 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionLynredSettings_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + ContrastMode = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive ContrastMode Type: [uint8_t] size in bits:1 + OrionLynredSettings_tree:add(buffer(indexOffset, 1), "ContrastMode: " .. buffer(indexOffset, 1):bitfield(0, 1)) + ICEMovingAverage = buffer(indexOffset, 2):bitfield(1, 9) -- Primitive ICEMovingAverage Type: [uint16_t] size in bits:9 + OrionLynredSettings_tree:add(buffer(indexOffset, 2), "ICEMovingAverage: " .. buffer(indexOffset, 2):bitfield(1, 9)) + -- Not in Memory, but encoded Value [Reserved] size in bits:6 + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + ICEMinThreshold = buffer(indexOffset, 1):uint() -- Primitive ICEMinThreshold Type: [uint8_t] size in bits:8 + OrionLynredSettings_tree:add(buffer(indexOffset, 1), "ICEMinThreshold: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + ICEMaxThreshold = buffer(indexOffset, 1):uint() -- Primitive ICEMaxThreshold Type: [uint8_t] size in bits:8 + OrionLynredSettings_tree:add(buffer(indexOffset, 1), "ICEMaxThreshold: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_VIDEO_OPTIONS +function print_VideoOptions(subtree, buffer, id, size, index) + local name = "VideoOptions" + local indexOffset = 0 + local VideoOptions_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(VideoOptions_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Stabilized, ShowTrackBox, ShowReticle, RotateVideo, DisableFovMatch, ShowTelemetry, HasTelemetryOptions, ShowDetections, + DisableNtsc, EnablePip, ZoomTrackBox, ShowTrackId, MaxShift + -- 15 Data Elements found: + if size >= (indexOffset + 1) then + Stabilized = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive Stabilized Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "Stabilized: " .. buffer(indexOffset, 1):bitfield(0, 1)) + ShowTrackBox = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive ShowTrackBox Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "ShowTrackBox: " .. buffer(indexOffset, 1):bitfield(1, 1)) + ShowReticle = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive ShowReticle Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "ShowReticle: " .. buffer(indexOffset, 1):bitfield(2, 1)) + RotateVideo = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive RotateVideo Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "RotateVideo: " .. buffer(indexOffset, 1):bitfield(3, 1)) + DisableFovMatch = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive DisableFovMatch Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "DisableFovMatch: " .. buffer(indexOffset, 1):bitfield(4, 1)) + ShowTelemetry = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive ShowTelemetry Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "ShowTelemetry: " .. buffer(indexOffset, 1):bitfield(5, 1)) + HasTelemetryOptions = buffer(indexOffset, 1):bitfield(6, 1) -- Primitive HasTelemetryOptions Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "HasTelemetryOptions: " .. buffer(indexOffset, 1):bitfield(6, 1)) + ShowDetections = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive ShowDetections Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "ShowDetections: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 3) then + DisableNtsc = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive DisableNtsc Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "DisableNtsc: " .. buffer(indexOffset, 1):bitfield(0, 1)) + EnablePip = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive EnablePip Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "EnablePip: " .. buffer(indexOffset, 1):bitfield(1, 1)) + ZoomTrackBox = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive ZoomTrackBox Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "ZoomTrackBox: " .. buffer(indexOffset, 1):bitfield(2, 1)) + ShowTrackId = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive ShowTrackId Type: [uint32_t] size in bits:1 + VideoOptions_tree:add(buffer(indexOffset, 1), "ShowTrackId: " .. buffer(indexOffset, 1):bitfield(3, 1)) + -- Not in Memory, but encoded Value [Reserved] size in bits:20 + indexOffset = indexOffset + 3 + end + if size >= (indexOffset + 1) then + MaxShift = buffer(indexOffset, 1):uint() -- Primitive MaxShift Type: [float] size in bits:8 + indexOffset = displayMaxShift(VideoOptions_tree, "MaxShift", buffer, indexOffset, 1, 1) + end + if not (HasTelemetryOptions == 0) then + -- Embedded Struct: TelemetryOptions Type: [TelemetryOptions_t] size in bits reported:352 + indexOffset = print_TelemetryOptions_t(VideoOptions_tree, "TelemetryOptions", buffer, id, size, indexOffset, 44, 1 ) + else + VideoOptions_tree:add(buffer(0,0), "TelemetryOptions: Was not included, compared [HasTelemetryOptions == 0] ") + end + return name +end + +-- Packet ID: ORION_PKT_TRACK_OPTIONS +function print_TrackOptions(subtree, buffer, id, size, index) + local name = "TrackOptions" + local indexOffset = 0 + local TrackOptions_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(TrackOptions_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local DebugEnable, KpScene, KiScene, KpTrack, KiTrack, MaxRate, MaxAccel, TrackSize, + TrackMode, TrackAlpha, RateAlpha, MinSceneConf, MinTrackConf, MaxCoastTime, TrackDelay, DisableMti, DetectionMode, + DetectionThreshold, DetectionMaxTelemTrks, TrackOffsetPan, TrackOffsetTilt, TrackInitSensitivity, LearningRate + -- 23 Data Elements found: + if size >= (indexOffset + 1) then + DebugEnable = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive DebugEnable Type: [uint32_t] size in bits:1 + TrackOptions_tree:add(buffer(indexOffset, 1), "DebugEnable: " .. buffer(indexOffset, 1):bitfield(0, 1)) + KpScene = buffer(indexOffset, 1):uint() / 10 -- Primitive KpScene Type: [float] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "KpScene: " .. buffer(indexOffset, 1):uint() / 10 .. " proportional gain") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + KiScene = buffer(indexOffset, 1):uint() / 10 -- Primitive KiScene Type: [float] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "KiScene: " .. buffer(indexOffset, 1):uint() / 10 .. " integral gain") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + KpTrack = buffer(indexOffset, 1):uint() / 10 -- Primitive KpTrack Type: [float] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "KpTrack: " .. buffer(indexOffset, 1):uint() / 10 .. " proportional gain") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + KiTrack = buffer(indexOffset, 1):uint() / 10 -- Primitive KiTrack Type: [float] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "KiTrack: " .. buffer(indexOffset, 1):uint() / 10 .. " integral gain") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MaxRate = buffer(indexOffset, 1):uint() / 100 -- Primitive MaxRate Type: [float] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "MaxRate: " .. buffer(indexOffset, 1):uint() / 100 .. " FOV/s") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MaxAccel = buffer(indexOffset, 1):uint() / 20 -- Primitive MaxAccel Type: [float] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "MaxAccel: " .. buffer(indexOffset, 1):uint() / 20 .. " FOV/s/s") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + TrackSize = buffer(indexOffset, 1):uint() / 1000 -- Primitive TrackSize Type: [float] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "TrackSize: " .. buffer(indexOffset, 1):uint() / 1000 .. " %") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + TrackMode = buffer(indexOffset, 1):uint() -- Primitive TrackMode Type: [uint8_t] size in bits:8 + indexOffset = getTrackMode(TrackOptions_tree, "TrackMode", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + TrackAlpha = buffer(indexOffset, 1):uint() -- Primitive TrackAlpha Type: [float] size in bits:8 + indexOffset = unsigned8ToFloat32(TrackOptions_tree, "TrackAlpha", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + RateAlpha = buffer(indexOffset, 1):uint() -- Primitive RateAlpha Type: [float] size in bits:8 + indexOffset = unsigned8ToFloat32(TrackOptions_tree, "RateAlpha", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + MinSceneConf = buffer(indexOffset, 1):uint() -- Primitive MinSceneConf Type: [float] size in bits:8 + indexOffset = unsigned8ToFloat32(TrackOptions_tree, "MinSceneConf", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + MinTrackConf = buffer(indexOffset, 1):uint() -- Primitive MinTrackConf Type: [float] size in bits:8 + indexOffset = unsigned8ToFloat32(TrackOptions_tree, "MinTrackConf", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + MaxCoastTime = buffer(indexOffset, 1):uint() / 100 -- Primitive MaxCoastTime Type: [float] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "MaxCoastTime: " .. buffer(indexOffset, 1):uint() / 100 .. " seconds") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + TrackDelay = buffer(indexOffset, 1):uint() -- Primitive TrackDelay Type: [uint8_t] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "TrackDelay: " .. buffer(indexOffset, 1):uint() .. " frames") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + DisableMti = buffer(indexOffset, 1):uint() -- Primitive DisableMti Type: [uint8_t] size in bits:8 + indexOffset = unsigned8ToDisabled(TrackOptions_tree, "DisableMti", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 2) then + DetectionMode = buffer(indexOffset, 2):uint() -- Primitive DetectionMode Type: [uint16_t] size in bits:16 + indexOffset = getDetectionMode(TrackOptions_tree, "DetectionMode", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 1) then + DetectionThreshold = buffer(indexOffset, 1):uint() -- Primitive DetectionThreshold Type: [uint8_t] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "DetectionThreshold: " .. buffer(indexOffset, 1):uint() .. " Detection Threshold") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + DetectionMaxTelemTrks = buffer(indexOffset, 1):uint() -- Primitive DetectionMaxTelemTrks Type: [uint8_t] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "DetectionMaxTelemTrks: " .. buffer(indexOffset, 1):uint() .. " Max Telemetry Tracks") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + TrackOffsetPan = buffer(indexOffset, 4):float() -- Primitive TrackOffsetPan Type: [float] size in bits:32 + indexOffset = displayAsRadians(TrackOptions_tree, "TrackOffsetPan", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + TrackOffsetTilt = buffer(indexOffset, 4):float() -- Primitive TrackOffsetTilt Type: [float] size in bits:32 + indexOffset = displayAsRadians(TrackOptions_tree, "TrackOffsetTilt", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 1) then + TrackInitSensitivity = buffer(indexOffset, 1):uint() -- Primitive TrackInitSensitivity Type: [uint8_t] size in bits:8 + TrackOptions_tree:add(buffer(indexOffset, 1), "TrackInitSensitivity: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + LearningRate = buffer(indexOffset, 2):uint() / 10000 -- Primitive LearningRate Type: [float] size in bits:16 + TrackOptions_tree:add(buffer(indexOffset, 2), "LearningRate: " .. buffer(indexOffset, 2):uint() / 10000) + indexOffset = indexOffset + 2 + end + return name +end + +-- Packet ID: ORION_PKT_GEO_TRACK_STATUS +function print_GeoTrackStatus(subtree, buffer, id, size, index) + local name = "GeoTrackStatus" + local indexOffset = 0 + local GeoTrackStatus_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(GeoTrackStatus_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, ID, Status, Latitude, Longitude, Altitude, SigmaLatitude, SigmaLongitude, + SigmaAltitude, EllipseMajor, EllipseMinor, EllipseAngle, State, Course + -- 16 Data Elements found: + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + GeoTrackStatus_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + ID = buffer(indexOffset, 4):uint() -- Primitive ID Type: [uint32_t] size in bits:32 + GeoTrackStatus_tree:add(buffer(indexOffset, 4), "ID: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + Status = buffer(indexOffset, 1):uint() -- Primitive Status Type: [uint8_t] size in bits:8 + GeoTrackStatus_tree:add(buffer(indexOffset, 1), "Status: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + Latitude = buffer(indexOffset, 4):int() -- Primitive Latitude Type: [double] size in bits:32 + indexOffset = signed32ToLatRads(GeoTrackStatus_tree, "Latitude", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + Longitude = buffer(indexOffset, 4):int() -- Primitive Longitude Type: [double] size in bits:32 + indexOffset = signed32ToLonRads(GeoTrackStatus_tree, "Longitude", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 3) then + Altitude = buffer(indexOffset, 3):int() / 100 -- Primitive Altitude Type: [double] size in bits:24 + GeoTrackStatus_tree:add(buffer(indexOffset, 3), "Altitude: " .. buffer(indexOffset, 3):int() / 100 .. " meters") + indexOffset = indexOffset + 3 + end + if size >= (indexOffset + 2) then + SigmaLatitude = buffer(indexOffset, 2):int() -- Primitive SigmaLatitude Type: [float] size in bits:16 + indexOffset = signed16ToSigmaLat(GeoTrackStatus_tree, "SigmaLatitude", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + SigmaLongitude = buffer(indexOffset, 2):int() -- Primitive SigmaLongitude Type: [float] size in bits:16 + indexOffset = signed16ToSigmaLonAlt(GeoTrackStatus_tree, "SigmaLongitude", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + SigmaAltitude = buffer(indexOffset, 2):int() -- Primitive SigmaAltitude Type: [float] size in bits:16 + indexOffset = signed16ToSigmaLonAlt(GeoTrackStatus_tree, "SigmaAltitude", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + EllipseMajor = buffer(indexOffset, 2):int() -- Primitive EllipseMajor Type: [float] size in bits:16 + indexOffset = signed16ToEllipseValue(GeoTrackStatus_tree, "EllipseMajor", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + EllipseMinor = buffer(indexOffset, 2):int() -- Primitive EllipseMinor Type: [float] size in bits:16 + indexOffset = signed16ToEllipseValue(GeoTrackStatus_tree, "EllipseMinor", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + EllipseAngle = buffer(indexOffset, 2):int() -- Primitive EllipseAngle Type: [float] size in bits:16 + indexOffset = signed16ToEllipseAngle(GeoTrackStatus_tree, "EllipseAngle", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 12) then + VelNED = buffer(indexOffset, 12) -- Primitive VelNED Type: [float] size in bits:96 + indexOffset = signed32x3ToNED(GeoTrackStatus_tree, "VelNED", buffer, indexOffset, 12, 1000) + end + if size >= (indexOffset + 6) then + SigmaVelNED = buffer(indexOffset, 6) -- Primitive SigmaVelNED Type: [float] size in bits:48 + indexOffset = unsigned16x3ToSigmaNED(GeoTrackStatus_tree, "SigmaVelNED", buffer, indexOffset, 6, 1) + end + if size >= (indexOffset + 1) then + State = buffer(indexOffset, 1):uint() -- Enumeration State Type: [uint8_t] size in bits: 8 + GeoTrackStatus_tree:add(buffer(indexOffset, 1), "State: " .. get_GeoTrackerState_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + Course = buffer(indexOffset, 2):int() -- Primitive Course Type: [float] size in bits:16 + indexOffset = signed16ToCourse(GeoTrackStatus_tree, "Course", buffer, indexOffset, 2, 1) + end + return name +end + +-- Packet ID: ORION_PKT_TRACK_CMD +function print_TrackCmd(subtree, buffer, id, size, index) + local name = "TrackCmd" + local indexOffset = 0 + local TrackCmd_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(TrackCmd_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Cmd, TrackIndex, Resize + -- 4 Data Elements found: + if size >= (indexOffset + 1) then + Cmd = buffer(indexOffset, 1):uint() -- Enumeration Cmd Type: [OrionTrackCmd_t] size in bits: 8 + TrackCmd_tree:add(buffer(indexOffset, 1), "Cmd: " .. get_OrionTrackCmd_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + Target = buffer(indexOffset, 4) -- Primitive Target Type: [float] size in bits:32 + TrackCmd_tree:add(buffer(indexOffset, 4), "Target: " .. buffer(indexOffset, 4)) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + TrackIndex = buffer(indexOffset, 4):int() -- Primitive TrackIndex Type: [int32_t] size in bits:32 + TrackCmd_tree:add(buffer(indexOffset, 4), "TrackIndex: " .. buffer(indexOffset, 4):int()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 2) then + Resize = buffer(indexOffset, 2):int() / 1000 -- Primitive Resize Type: [float] size in bits:16 + TrackCmd_tree:add(buffer(indexOffset, 2), "Resize: " .. buffer(indexOffset, 2):int() / 1000) + indexOffset = indexOffset + 2 + end + return name +end + +-- Packet ID: ORION_PKT_VIDEORECORD_STATUS +function print_VideoRecordStatus(subtree, buffer, id, size, index) + local name = "VideoRecordStatus" + local indexOffset = 0 + local VideoRecordStatus_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(VideoRecordStatus_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Version, UdpEnabled, RecordingEnabled, EnableKlvData, EnableOrionData, OBREnabled, Reserved1, UdpDestIp, + UdpPort, UdpBitrate, KlvMode, State, DiskConsumption, Reserved2 + -- 17 Data Elements found: + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + Version = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive Version Type: [char] size in bits:128 + VideoRecordStatus_tree:add(buffer(indexOffset, strSize), "Version: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + -- Embedded Struct: CameraInformation Type: [CameraInformation_t] size in bits reported:113 + indexOffset = print_CameraInformation_t(VideoRecordStatus_tree, "CameraInformation", buffer, id, size, indexOffset, 15, 3 ) + if size >= (indexOffset + 1) then + UdpEnabled = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive UdpEnabled Type: [unsigned] size in bits:1 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "UdpEnabled: " .. buffer(indexOffset, 1):bitfield(0, 1)) + RecordingEnabled = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive RecordingEnabled Type: [unsigned] size in bits:1 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "RecordingEnabled: " .. buffer(indexOffset, 1):bitfield(1, 1)) + EnableKlvData = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive EnableKlvData Type: [unsigned] size in bits:1 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "EnableKlvData: " .. buffer(indexOffset, 1):bitfield(2, 1)) + EnableOrionData = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive EnableOrionData Type: [unsigned] size in bits:1 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "EnableOrionData: " .. buffer(indexOffset, 1):bitfield(3, 1)) + OBREnabled = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive OBREnabled Type: [unsigned] size in bits:1 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "OBREnabled: " .. buffer(indexOffset, 1):bitfield(4, 1)) + Reserved1 = buffer(indexOffset, 1):bitfield(5, 3) -- Primitive Reserved1 Type: [unsigned] size in bits:3 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "Reserved1: " .. buffer(indexOffset, 1):bitfield(5, 3)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + UdpDestIp = buffer(indexOffset, 4):uint() -- Primitive UdpDestIp Type: [uint32_t] size in bits:32 + indexOffset = unsigned32ToIPv4(VideoRecordStatus_tree, "UdpDestIp", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 2) then + UdpPort = buffer(indexOffset, 2):uint() -- Primitive UdpPort Type: [uint16_t] size in bits:16 + VideoRecordStatus_tree:add(buffer(indexOffset, 2), "UdpPort: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 4) then + UdpBitrate = buffer(indexOffset, 4):uint() -- Primitive UdpBitrate Type: [uint32_t] size in bits:32 + VideoRecordStatus_tree:add(buffer(indexOffset, 4), "UdpBitrate: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + KlvMode = buffer(indexOffset, 1):uint() -- Enumeration KlvMode Type: [KlvMode_t] size in bits: 8 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "KlvMode: " .. get_KlvMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + State = buffer(indexOffset, 1):uint() -- Enumeration State Type: [VideoRecordState_t] size in bits: 8 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "State: " .. get_VideoRecordState_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + DiskConsumption = buffer(indexOffset, 2):int() / 10000 -- Primitive DiskConsumption Type: [float] size in bits:16 + VideoRecordStatus_tree:add(buffer(indexOffset, 2), "DiskConsumption: " .. buffer(indexOffset, 2):int() / 10000) + indexOffset = indexOffset + 2 + end + -- Embedded Struct: Error Type: [Error_t] size in bits reported:8 + indexOffset = print_Error_t(VideoRecordStatus_tree, "Error", buffer, id, size, indexOffset, 1, 1 ) + if size >= (indexOffset + 1) then + Reserved2 = buffer(indexOffset, 1):uint() -- Primitive Reserved2 Type: [uint8_t] size in bits:8 + VideoRecordStatus_tree:add(buffer(indexOffset, 1), "Reserved2: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + -- Struct CameraInformation3 Type: [CameraInformation_t] size in bits reported:113 + indexOffset = print_CameraInformation_t(VideoRecordStatus_tree, "CameraInformation3", buffer, id, size, indexOffset, 15, 1 ) + return name +end + +-- Packet ID: ORION_PKT_VIDEORECORD_CMD +function print_VideoRecordCmd(subtree, buffer, id, size, index) + local name = "VideoRecordCmd" + local indexOffset = 0 + local VideoRecordCmd_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(VideoRecordCmd_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local EnableUdpStream, EnableRecording, EnableKlvData, EnableOrionData, DeleteAllRecordings, Ident, StreamOnRestart, EnableOBR, + UdpDestIp, UdpPort, UdpBitrateCamera0, UdpBitrateCamera1, UdpBitrateCamera2, KlvMode, EnableCamera0, EnableCamera1, EnableCamera2, + EnableCamera3, Reserved1, UdpBitrateCamera3 + -- 20 Data Elements found: + if size >= (indexOffset + 1) then + EnableUdpStream = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive EnableUdpStream Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableUdpStream: " .. buffer(indexOffset, 1):bitfield(0, 1)) + EnableRecording = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive EnableRecording Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableRecording: " .. buffer(indexOffset, 1):bitfield(1, 1)) + EnableKlvData = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive EnableKlvData Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableKlvData: " .. buffer(indexOffset, 1):bitfield(2, 1)) + EnableOrionData = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive EnableOrionData Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableOrionData: " .. buffer(indexOffset, 1):bitfield(3, 1)) + DeleteAllRecordings = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive DeleteAllRecordings Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "DeleteAllRecordings: " .. buffer(indexOffset, 1):bitfield(4, 1)) + Ident = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive Ident Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "Ident: " .. buffer(indexOffset, 1):bitfield(5, 1)) + StreamOnRestart = buffer(indexOffset, 1):bitfield(6, 1) -- Primitive StreamOnRestart Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "StreamOnRestart: " .. buffer(indexOffset, 1):bitfield(6, 1)) + EnableOBR = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive EnableOBR Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableOBR: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + UdpDestIp = buffer(indexOffset, 4):uint() -- Primitive UdpDestIp Type: [uint32_t] size in bits:32 + indexOffset = unsigned32ToIPv4(VideoRecordCmd_tree, "UdpDestIp", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 2) then + UdpPort = buffer(indexOffset, 2):uint() -- Primitive UdpPort Type: [uint16_t] size in bits:16 + VideoRecordCmd_tree:add(buffer(indexOffset, 2), "UdpPort: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 4) then + UdpBitrateCamera0 = buffer(indexOffset, 4):uint() -- Primitive UdpBitrateCamera0 Type: [uint32_t] size in bits:32 + VideoRecordCmd_tree:add(buffer(indexOffset, 4), "UdpBitrateCamera0: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + UdpBitrateCamera1 = buffer(indexOffset, 4):uint() -- Primitive UdpBitrateCamera1 Type: [uint32_t] size in bits:32 + VideoRecordCmd_tree:add(buffer(indexOffset, 4), "UdpBitrateCamera1: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + UdpBitrateCamera2 = buffer(indexOffset, 4):uint() -- Primitive UdpBitrateCamera2 Type: [uint32_t] size in bits:32 + VideoRecordCmd_tree:add(buffer(indexOffset, 4), "UdpBitrateCamera2: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + KlvMode = buffer(indexOffset, 1):uint() -- Enumeration KlvMode Type: [KlvMode_t] size in bits: 8 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "KlvMode: " .. get_KlvMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + EnableCamera0 = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive EnableCamera0 Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableCamera0: " .. buffer(indexOffset, 1):bitfield(0, 1)) + EnableCamera1 = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive EnableCamera1 Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableCamera1: " .. buffer(indexOffset, 1):bitfield(1, 1)) + EnableCamera2 = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive EnableCamera2 Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableCamera2: " .. buffer(indexOffset, 1):bitfield(2, 1)) + EnableCamera3 = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive EnableCamera3 Type: [unsigned] size in bits:1 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "EnableCamera3: " .. buffer(indexOffset, 1):bitfield(3, 1)) + Reserved1 = buffer(indexOffset, 1):bitfield(4, 4) -- Primitive Reserved1 Type: [unsigned] size in bits:4 + VideoRecordCmd_tree:add(buffer(indexOffset, 1), "Reserved1: " .. buffer(indexOffset, 1):bitfield(4, 4)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + UdpBitrateCamera3 = buffer(indexOffset, 4):uint() -- Primitive UdpBitrateCamera3 Type: [uint32_t] size in bits:32 + VideoRecordCmd_tree:add(buffer(indexOffset, 4), "UdpBitrateCamera3: " .. buffer(indexOffset, 4):uint() .. " kbps") + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_VIDEORECORD_CLOCK +function print_VideoRecordClock(subtree, buffer, id, size, index) + local name = "VideoRecordClock" + local indexOffset = 0 + local VideoRecordClock_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(VideoRecordClock_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local PayloadRouterPTS, VideoRecordPTS, CameraIndex + -- 3 Data Elements found: + if size >= (indexOffset + 8) then + PayloadRouterPTS = buffer(indexOffset, 8):uint64() -- Primitive PayloadRouterPTS Type: [uint64_t] size in bits:64 + VideoRecordClock_tree:add(buffer(indexOffset, 8), "PayloadRouterPTS: " .. buffer(indexOffset, 8):uint64()) + indexOffset = indexOffset + 8 + end + if size >= (indexOffset + 8) then + VideoRecordPTS = buffer(indexOffset, 8):uint64() -- Primitive VideoRecordPTS Type: [uint64_t] size in bits:64 + VideoRecordClock_tree:add(buffer(indexOffset, 8), "VideoRecordPTS: " .. buffer(indexOffset, 8):uint64()) + indexOffset = indexOffset + 8 + end + if size >= (indexOffset + 1) then + CameraIndex = buffer(indexOffset, 1):uint() -- Primitive CameraIndex Type: [uint8_t] size in bits:8 + VideoRecordClock_tree:add(buffer(indexOffset, 1), "CameraIndex: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_GEO_TRACK_COMMAND +function print_GeoTrackerCommand(subtree, buffer, id, size, index) + local name = "GeoTrackerCommand" + local indexOffset = 0 + local GeoTrackerCommand_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(GeoTrackerCommand_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local FilterType, TargetType, cmd + -- 3 Data Elements found: + if size >= (indexOffset + 1) then + FilterType = buffer(indexOffset, 1):uint() -- Enumeration FilterType Type: [GeoTrackerFilterType_t] size in bits: 8 + GeoTrackerCommand_tree:add(buffer(indexOffset, 1), "FilterType: " .. get_GeoTrackerFilterType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + TargetType = buffer(indexOffset, 1):uint() -- Enumeration TargetType Type: [GeoTrackerTargetType_t] size in bits: 8 + GeoTrackerCommand_tree:add(buffer(indexOffset, 1), "TargetType: " .. get_GeoTrackerTargetType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + cmd = buffer(indexOffset, 1):uint() -- Enumeration cmd Type: [GeoTrackerCmd_t] size in bits: 8 + GeoTrackerCommand_tree:add(buffer(indexOffset, 1), "cmd: " .. get_GeoTrackerCmd_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_RETRACT_CMD +function print_OrionRetractCommand(subtree, buffer, id, size, index) + local name = "OrionRetractCommand" + local indexOffset = 0 + local OrionRetractCommand_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionRetractCommand_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Cmd + -- 2 Data Elements found: + if size >= (indexOffset + 1) then + Cmd = buffer(indexOffset, 1):uint() -- Enumeration Cmd Type: [OrionRetractCmd_t] size in bits: 8 + OrionRetractCommand_tree:add(buffer(indexOffset, 1), "Cmd: " .. get_OrionRetractCmd_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + -- Not in Memory, but encoded Value [Reserved] size in bits:8 + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_USER_DATA +function print_OrionUserData(subtree, buffer, id, size, index) + local name = "OrionUserData" + local indexOffset = 0 + local OrionUserData_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionUserData_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local port, size, id + -- 4 Data Elements found: + if size >= (indexOffset + 1) then + port = buffer(indexOffset, 1):uint() -- Enumeration port Type: [UserDataPort_t] size in bits: 8 + OrionUserData_tree:add(buffer(indexOffset, 1), "port: " .. get_UserDataPort_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + size = buffer(indexOffset, 1):uint() -- Primitive size Type: [uint8_t] size in bits:8 + OrionUserData_tree:add(buffer(indexOffset, 1), "size: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + id = buffer(indexOffset, 4):uint() -- Primitive id Type: [uint32_t] size in bits:32 + OrionUserData_tree:add(buffer(indexOffset, 4), "id: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= indexOffset + (1 * size) then + data = buffer(indexOffset, (1 * size)) -- Primitive data Type: [uint8_t] size in bits:8 + OrionUserData_tree:add(buffer(indexOffset, (1 * size)), "data: " .. buffer(indexOffset, (1 * size))) + indexOffset = indexOffset + (1 * size) + end + return name +end + +-- Packet ID: ORION_PKT_LASER_CMD +function print_OrionLaserCommand(subtree, buffer, id, size, index) + local name = "OrionLaserCommand" + local indexOffset = 0 + local OrionLaserCommand_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionLaserCommand_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Index, Password, Enable, Arm, Fire, OnTime, OffTime, PrfCode, + SafetyBypass + -- 10 Data Elements found: + if size >= (indexOffset + 2) then + -- Not in Memory, but encoded Value [Reserved] size in bits:16 + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + Index = buffer(indexOffset, 1):uint() -- Primitive Index Type: [uint8_t] size in bits:8 + OrionLaserCommand_tree:add(buffer(indexOffset, 1), "Index: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + Password = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive Password Type: [char] size in bits:128 + OrionLaserCommand_tree:add(buffer(indexOffset, strSize), "Password: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + if size >= (indexOffset + 1) then + Enable = buffer(indexOffset, 1):uint() -- Primitive Enable Type: [uint8_t] size in bits:8 + OrionLaserCommand_tree:add(buffer(indexOffset, 1), "Enable: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Arm = buffer(indexOffset, 1):uint() -- Primitive Arm Type: [uint8_t] size in bits:8 + OrionLaserCommand_tree:add(buffer(indexOffset, 1), "Arm: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + Fire = buffer(indexOffset, 1):uint() -- Primitive Fire Type: [uint8_t] size in bits:8 + OrionLaserCommand_tree:add(buffer(indexOffset, 1), "Fire: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + OnTime = buffer(indexOffset, 2):uint() -- Primitive OnTime Type: [uint16_t] size in bits:16 + OrionLaserCommand_tree:add(buffer(indexOffset, 2), "OnTime: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + OffTime = buffer(indexOffset, 2):uint() -- Primitive OffTime Type: [uint16_t] size in bits:16 + OrionLaserCommand_tree:add(buffer(indexOffset, 2), "OffTime: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + PrfCode = buffer(indexOffset, 2):uint() -- Primitive PrfCode Type: [uint16_t] size in bits:16 + OrionLaserCommand_tree:add(buffer(indexOffset, 2), "PrfCode: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + SafetyBypass = buffer(indexOffset, 1):uint() -- Primitive SafetyBypass Type: [uint8_t] size in bits:8 + OrionLaserCommand_tree:add(buffer(indexOffset, 1), "SafetyBypass: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_LASER_STATES +function print_OrionLaserStates(subtree, buffer, id, size, index) + local name = "OrionLaserStates" + local indexOffset = 0 + local OrionLaserStates_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionLaserStates_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local NumLasers + -- 2 Data Elements found: + if size >= (indexOffset + 1) then + NumLasers = buffer(indexOffset, 1):uint() -- Primitive NumLasers Type: [uint8_t] size in bits:8 + OrionLaserStates_tree:add(buffer(indexOffset, 1), "NumLasers: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + -- Struct State Type: [OrionLaserState_t] size in bits reported:48 + indexOffset = print_OrionLaserState_t(OrionLaserStates_tree, "State", buffer, id, size, indexOffset, 6, NumLasers ) + return name +end + +-- Packet ID: ORION_PKT_UART_CONFIG +function print_OrionUartConfig(subtree, buffer, id, size, index) + local name = "OrionUartConfig" + local indexOffset = 0 + local OrionUartConfig_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionUartConfig_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local port, baud, protocol, temporary, param + -- 5 Data Elements found: + if size >= (indexOffset + 1) then + port = buffer(indexOffset, 1):uint() -- Enumeration port Type: [UserDataPort_t] size in bits: 8 + OrionUartConfig_tree:add(buffer(indexOffset, 1), "port: " .. get_UserDataPort_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 3) then + baud = buffer(indexOffset, 3):uint() -- Primitive baud Type: [uint32_t] size in bits:24 + OrionUartConfig_tree:add(buffer(indexOffset, 3), "baud: " .. buffer(indexOffset, 3):uint()) + indexOffset = indexOffset + 3 + end + if size >= (indexOffset + 1) then + protocol = buffer(indexOffset, 1):uint() -- Enumeration protocol Type: [OrionProtocols_t] size in bits: 8 + OrionUartConfig_tree:add(buffer(indexOffset, 1), "protocol: " .. get_OrionProtocols_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + temporary = buffer(indexOffset, 1):uint() -- Primitive temporary Type: [uint8_t] size in bits:8 + OrionUartConfig_tree:add(buffer(indexOffset, 1), "temporary: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + param = buffer(indexOffset, 4):uint() -- Primitive param Type: [uint32_t] size in bits:32 + OrionUartConfig_tree:add(buffer(indexOffset, 4), "param: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_LIMITS +function print_OrionLimitsData(subtree, buffer, id, size, index) + local name = "OrionLimitsData" + local indexOffset = 0 + local OrionLimitsData_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionLimitsData_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + -- 9 Data Elements found: + if size >= (indexOffset + 4) then + MinPos = buffer(indexOffset, 4) -- Primitive MinPos Type: [float] size in bits:32 + indexOffset = signed16x2ToPanTilt(OrionLimitsData_tree, "MinPos", buffer, indexOffset, 4, 1000.0) + end + if size >= (indexOffset + 4) then + MaxPos = buffer(indexOffset, 4) -- Primitive MaxPos Type: [float] size in bits:32 + indexOffset = signed16x2ToPanTilt(OrionLimitsData_tree, "MaxPos", buffer, indexOffset, 4, 1000.0) + end + if size >= (indexOffset + 4) then + MaxVel = buffer(indexOffset, 4) -- Primitive MaxVel Type: [float] size in bits:32 + indexOffset = unsigned16x2ToPanTiltVel(OrionLimitsData_tree, "MaxVel", buffer, indexOffset, 4, 1000.0) + end + if size >= (indexOffset + 4) then + MaxAccel = buffer(indexOffset, 4) -- Primitive MaxAccel Type: [float] size in bits:32 + indexOffset = unsigned16x2ToPanTiltAccel(OrionLimitsData_tree, "MaxAccel", buffer, indexOffset, 4, 1.0) + end + if size >= (indexOffset + 4) then + ContCur = buffer(indexOffset, 4) -- Primitive ContCur Type: [float] size in bits:32 + indexOffset = unsigned16x2ToCurrent(OrionLimitsData_tree, "ContCur", buffer, indexOffset, 4, 1000.0) + end + if size >= (indexOffset + 4) then + PeakCur = buffer(indexOffset, 4) -- Primitive PeakCur Type: [float] size in bits:32 + indexOffset = unsigned16x2ToCurrent(OrionLimitsData_tree, "PeakCur", buffer, indexOffset, 4, 1000.0) + end + if size >= (indexOffset + 4) then + PeakCurTime = buffer(indexOffset, 4) -- Primitive PeakCurTime Type: [float] size in bits:32 + indexOffset = unsigned16x2ToCurrent(OrionLimitsData_tree, "PeakCurTime", buffer, indexOffset, 4, 1000.0) + end + if size >= (indexOffset + 4) then + InitCur = buffer(indexOffset, 4) -- Primitive InitCur Type: [float] size in bits:32 + indexOffset = unsigned16x2ToCurrent(OrionLimitsData_tree, "InitCur", buffer, indexOffset, 4, 1000.0) + end + if size >= (indexOffset + 2) then + MaxPower = buffer(indexOffset, 2) -- Primitive MaxPower Type: [float] size in bits:16 + indexOffset = displayWatts(OrionLimitsData_tree, "MaxPower", buffer, indexOffset, 2, 1.0) + end + return name +end + +-- Packet ID: ORION_PKT_INS_OPTIONS +function print_InsOptions(subtree, buffer, id, size, index) + local name = "InsOptions" + local indexOffset = 0 + local InsOptions_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(InsOptions_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local enablePlatformRotation, enableCourseIsHeading, disableMagnetometer, disableGPS, resetINS, disableGpsClockError, enableAccelBias, enableTightlyCoupled, + usePhaseForVelocity, disableL1, disableL2, disableL5, elevationMask, enablePayloadIns, enableNonLinearHeading, enableSensonorMV, enableHD25PayloadINS, + opticalFlowSetting, enableCustomIMURotation, initialHeading, headingObservationBiasAngle, alignHeadingNoise + -- 27 Data Elements found: + if size >= (indexOffset + 1) then + enablePlatformRotation = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive enablePlatformRotation Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enablePlatformRotation: " .. buffer(indexOffset, 1):bitfield(0, 1)) + enableCourseIsHeading = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive enableCourseIsHeading Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enableCourseIsHeading: " .. buffer(indexOffset, 1):bitfield(1, 1)) + disableMagnetometer = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive disableMagnetometer Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "disableMagnetometer: " .. buffer(indexOffset, 1):bitfield(2, 1)) + disableGPS = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive disableGPS Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "disableGPS: " .. buffer(indexOffset, 1):bitfield(3, 1)) + resetINS = buffer(indexOffset, 1):bitfield(4, 1) -- Primitive resetINS Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "resetINS: " .. buffer(indexOffset, 1):bitfield(4, 1)) + disableGpsClockError = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive disableGpsClockError Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "disableGpsClockError: " .. buffer(indexOffset, 1):bitfield(5, 1)) + enableAccelBias = buffer(indexOffset, 1):bitfield(6, 1) -- Primitive enableAccelBias Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enableAccelBias: " .. buffer(indexOffset, 1):bitfield(6, 1)) + enableTightlyCoupled = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive enableTightlyCoupled Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enableTightlyCoupled: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + usePhaseForVelocity = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive usePhaseForVelocity Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "usePhaseForVelocity: " .. buffer(indexOffset, 1):bitfield(0, 1)) + disableL1 = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive disableL1 Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "disableL1: " .. buffer(indexOffset, 1):bitfield(1, 1)) + disableL2 = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive disableL2 Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "disableL2: " .. buffer(indexOffset, 1):bitfield(2, 1)) + disableL5 = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive disableL5 Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "disableL5: " .. buffer(indexOffset, 1):bitfield(3, 1)) + elevationMask = buffer(indexOffset, 1):bitfield(4, 4) -- Primitive elevationMask Type: [float] size in bits:4 + indexOffset = displayElevationMask(InsOptions_tree, "elevationMask", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 1) then + enablePayloadIns = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive enablePayloadIns Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enablePayloadIns: " .. buffer(indexOffset, 1):bitfield(0, 1)) + enableNonLinearHeading = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive enableNonLinearHeading Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enableNonLinearHeading: " .. buffer(indexOffset, 1):bitfield(1, 1)) + enableSensonorMV = buffer(indexOffset, 1):bitfield(2, 1) -- Primitive enableSensonorMV Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enableSensonorMV: " .. buffer(indexOffset, 1):bitfield(2, 1)) + enableHD25PayloadINS = buffer(indexOffset, 1):bitfield(3, 1) -- Primitive enableHD25PayloadINS Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enableHD25PayloadINS: " .. buffer(indexOffset, 1):bitfield(3, 1)) + opticalFlowSetting = buffer(indexOffset, 1):bitfield(4, 4) -- Primitive opticalFlowSetting Type: [unsigned] size in bits:4 + InsOptions_tree:add(buffer(indexOffset, 1), "opticalFlowSetting: " .. buffer(indexOffset, 1):bitfield(4, 4)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + enableCustomIMURotation = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive enableCustomIMURotation Type: [unsigned] size in bits:1 + InsOptions_tree:add(buffer(indexOffset, 1), "enableCustomIMURotation: " .. buffer(indexOffset, 1):bitfield(0, 1)) + -- Not in Memory, but encoded Value [reserved] size in bits:7 + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 6) then + gimbalToPlatformEuler = buffer(indexOffset, 6) -- Primitive gimbalToPlatformEuler Type: [float] size in bits:48 + indexOffset = displayEuler(InsOptions_tree, "gimbalToPlatformEuler", buffer, indexOffset, 6, 1) + end + if size >= (indexOffset + 2) then + initialHeading = buffer(indexOffset, 2):int() -- Primitive initialHeading Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(InsOptions_tree, "initialHeading", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 6) then + gpsLeverArm = buffer(indexOffset, 6) -- Primitive gpsLeverArm Type: [float] size in bits:48 + indexOffset = displayMetersOffset(InsOptions_tree, "gpsLeverArm", buffer, indexOffset, 6, 1000) + end + if size >= (indexOffset + 2) then + headingObservationBiasAngle = buffer(indexOffset, 2):int() -- Primitive headingObservationBiasAngle Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(InsOptions_tree, "headingObservationBiasAngle", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 6) then + secondGPSLeverArm = buffer(indexOffset, 6) -- Primitive secondGPSLeverArm Type: [float] size in bits:48 + indexOffset = displayMetersOffset(InsOptions_tree, "secondGPSLeverArm", buffer, indexOffset, 6, 1000) + end + if size >= (indexOffset + 2) then + alignHeadingNoise = buffer(indexOffset, 2):uint() -- Primitive alignHeadingNoise Type: [float] size in bits:16 + indexOffset = unsigned16ToDegrees(InsOptions_tree, "alignHeadingNoise", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 6) then + imuToInsEuler = buffer(indexOffset, 6) -- Primitive imuToInsEuler Type: [float] size in bits:48 + indexOffset = displayEuler(InsOptions_tree, "imuToInsEuler", buffer, indexOffset, 6, 1) + end + return name +end + +-- Packet ID: ORION_PKT_NETWORK_SETTINGS +function print_OrionNetworkSettings(subtree, buffer, id, size, index) + local name = "OrionNetworkSettings" + local indexOffset = 0 + local OrionNetworkSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionNetworkSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Ip, Mask, Gateway, LowDelay, Mtu, SecondaryTcpPort, LowBandwidth, MaxTcpClients + -- 8 Data Elements found: + if size >= (indexOffset + 4) then + Ip = buffer(indexOffset, 4):uint() -- Primitive Ip Type: [uint32_t] size in bits:32 + indexOffset = unsigned32ToIPv4(OrionNetworkSettings_tree, "Ip", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + Mask = buffer(indexOffset, 4):uint() -- Primitive Mask Type: [uint32_t] size in bits:32 + indexOffset = unsigned32ToIPv4(OrionNetworkSettings_tree, "Mask", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + Gateway = buffer(indexOffset, 4):uint() -- Primitive Gateway Type: [uint32_t] size in bits:32 + indexOffset = unsigned32ToIPv4(OrionNetworkSettings_tree, "Gateway", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 1) then + LowDelay = buffer(indexOffset, 1):uint() -- Primitive LowDelay Type: [uint8_t] size in bits:8 + OrionNetworkSettings_tree:add(buffer(indexOffset, 1), "LowDelay: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + Mtu = buffer(indexOffset, 2):uint() -- Primitive Mtu Type: [uint16_t] size in bits:16 + OrionNetworkSettings_tree:add(buffer(indexOffset, 2), "Mtu: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + SecondaryTcpPort = buffer(indexOffset, 2):uint() -- Primitive SecondaryTcpPort Type: [uint16_t] size in bits:16 + OrionNetworkSettings_tree:add(buffer(indexOffset, 2), "SecondaryTcpPort: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + LowBandwidth = buffer(indexOffset, 1):uint() -- Primitive LowBandwidth Type: [uint8_t] size in bits:8 + OrionNetworkSettings_tree:add(buffer(indexOffset, 1), "LowBandwidth: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MaxTcpClients = buffer(indexOffset, 1):uint() -- Primitive MaxTcpClients Type: [uint8_t] size in bits:8 + OrionNetworkSettings_tree:add(buffer(indexOffset, 1), "MaxTcpClients: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_NETWORK_SETTINGS +function print_OrionNetworkByteSettings(subtree, buffer, id, size, index) + local name = "OrionNetworkByteSettings" + local indexOffset = 0 + local OrionNetworkByteSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionNetworkByteSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local LowDelay, Mtu, SecondaryTcpPort, LowBandwidth, MaxTcpClients + -- 8 Data Elements found: + if size >= (indexOffset + 4) then + Ip = buffer(indexOffset, 4) -- Primitive Ip Type: [uint8_t] size in bits:32 + indexOffset = unsigned8x4ToIPv4(OrionNetworkByteSettings_tree, "Ip", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + Mask = buffer(indexOffset, 4) -- Primitive Mask Type: [uint8_t] size in bits:32 + indexOffset = unsigned8x4ToIPv4(OrionNetworkByteSettings_tree, "Mask", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 4) then + Gateway = buffer(indexOffset, 4) -- Primitive Gateway Type: [uint8_t] size in bits:32 + indexOffset = unsigned8x4ToIPv4(OrionNetworkByteSettings_tree, "Gateway", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 1) then + LowDelay = buffer(indexOffset, 1):uint() -- Primitive LowDelay Type: [uint8_t] size in bits:8 + OrionNetworkByteSettings_tree:add(buffer(indexOffset, 1), "LowDelay: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + Mtu = buffer(indexOffset, 2):uint() -- Primitive Mtu Type: [uint16_t] size in bits:16 + OrionNetworkByteSettings_tree:add(buffer(indexOffset, 2), "Mtu: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + SecondaryTcpPort = buffer(indexOffset, 2):uint() -- Primitive SecondaryTcpPort Type: [uint16_t] size in bits:16 + OrionNetworkByteSettings_tree:add(buffer(indexOffset, 2), "SecondaryTcpPort: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + LowBandwidth = buffer(indexOffset, 1):uint() -- Primitive LowBandwidth Type: [uint8_t] size in bits:8 + OrionNetworkByteSettings_tree:add(buffer(indexOffset, 1), "LowBandwidth: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MaxTcpClients = buffer(indexOffset, 1):uint() -- Primitive MaxTcpClients Type: [uint8_t] size in bits:8 + OrionNetworkByteSettings_tree:add(buffer(indexOffset, 1), "MaxTcpClients: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_ADVANCED_ENCODING +function print_OrionAdvancedEncodingSettings(subtree, buffer, id, size, index) + local name = "OrionAdvancedEncodingSettings" + local indexOffset = 0 + local OrionAdvancedEncodingSettings_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionAdvancedEncodingSettings_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + -- 1 Data Elements found: + -- Embedded Struct: VideoEncodingSettings Type: [VideoEncodingSettings_t] size in bits reported:200 + indexOffset = print_VideoEncodingSettings_t(OrionAdvancedEncodingSettings_tree, "VideoEncodingSettings", buffer, id, size, indexOffset, 25, ENCODE_IDX_BITRATE_COUNT ) + return name +end + +-- Packet ID: ORION_PKT_NETWORK_VIDEO +function print_OrionNetworkVideo(subtree, buffer, id, size, index) + local name = "OrionNetworkVideo" + local indexOffset = 0 + local OrionNetworkVideo_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionNetworkVideo_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local DestIp, Port, Bitrate, Ttl, StreamType, MjpegQuality, SaveSettings, TsPacketCount, + FramePeriod, KlvMode + -- 10 Data Elements found: + if size >= (indexOffset + 4) then + DestIp = buffer(indexOffset, 4):uint() -- Primitive DestIp Type: [uint32_t] size in bits:32 + indexOffset = unsigned32ToIPv4(OrionNetworkVideo_tree, "DestIp", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 2) then + Port = buffer(indexOffset, 2):uint() -- Primitive Port Type: [uint16_t] size in bits:16 + OrionNetworkVideo_tree:add(buffer(indexOffset, 2), "Port: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 4) then + Bitrate = buffer(indexOffset, 4):uint() -- Primitive Bitrate Type: [uint32_t] size in bits:32 + OrionNetworkVideo_tree:add(buffer(indexOffset, 4), "Bitrate: " .. buffer(indexOffset, 4):uint() .. " bps") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + Ttl = buffer(indexOffset, 1):int() -- Primitive Ttl Type: [int8_t] size in bits:8 + OrionNetworkVideo_tree:add(buffer(indexOffset, 1), "Ttl: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + StreamType = buffer(indexOffset, 1):uint() -- Enumeration StreamType Type: [StreamType_t] size in bits: 8 + OrionNetworkVideo_tree:add(buffer(indexOffset, 1), "StreamType: " .. get_StreamType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MjpegQuality = buffer(indexOffset, 1):uint() -- Primitive MjpegQuality Type: [uint8_t] size in bits:8 + OrionNetworkVideo_tree:add(buffer(indexOffset, 1), "MjpegQuality: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + SaveSettings = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive SaveSettings Type: [unsigned] size in bits:1 + OrionNetworkVideo_tree:add(buffer(indexOffset, 1), "SaveSettings: " .. buffer(indexOffset, 1):bitfield(0, 1)) + TsPacketCount = buffer(indexOffset, 1):bitfield(1, 4) -- Primitive TsPacketCount Type: [unsigned] size in bits:4 + OrionNetworkVideo_tree:add(buffer(indexOffset, 1), "TsPacketCount: " .. buffer(indexOffset, 1):bitfield(1, 4)) + FramePeriod = buffer(indexOffset, 1):bitfield(5, 3) -- Primitive FramePeriod Type: [unsigned] size in bits:3 + OrionNetworkVideo_tree:add(buffer(indexOffset, 1), "FramePeriod: " .. buffer(indexOffset, 1):bitfield(5, 3)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + KlvMode = buffer(indexOffset, 1):uint() -- Enumeration KlvMode Type: [KlvMode_t] size in bits: 8 + OrionNetworkVideo_tree:add(buffer(indexOffset, 1), "KlvMode: " .. get_KlvMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_NETWORK_VIDEO +function print_OrionNetworkByteVideo(subtree, buffer, id, size, index) + local name = "OrionNetworkByteVideo" + local indexOffset = 0 + local OrionNetworkByteVideo_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionNetworkByteVideo_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Port, Bitrate, Ttl, StreamType, MjpegQuality, SaveSettings, TsPacketCount, FramePeriod, + KlvMode + -- 10 Data Elements found: + if size >= (indexOffset + 4) then + DestIp = buffer(indexOffset, 4) -- Primitive DestIp Type: [uint8_t] size in bits:32 + indexOffset = unsigned8x4ToIPv4(OrionNetworkByteVideo_tree, "DestIp", buffer, indexOffset, 4, 1) + end + if size >= (indexOffset + 2) then + Port = buffer(indexOffset, 2):uint() -- Primitive Port Type: [uint16_t] size in bits:16 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 2), "Port: " .. buffer(indexOffset, 2):uint()) + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 4) then + Bitrate = buffer(indexOffset, 4):uint() -- Primitive Bitrate Type: [uint32_t] size in bits:32 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 4), "Bitrate: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + Ttl = buffer(indexOffset, 1):int() -- Primitive Ttl Type: [int8_t] size in bits:8 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 1), "Ttl: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + StreamType = buffer(indexOffset, 1):uint() -- Enumeration StreamType Type: [StreamType_t] size in bits: 8 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 1), "StreamType: " .. get_StreamType_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + MjpegQuality = buffer(indexOffset, 1):uint() -- Primitive MjpegQuality Type: [uint8_t] size in bits:8 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 1), "MjpegQuality: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + SaveSettings = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive SaveSettings Type: [unsigned] size in bits:1 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 1), "SaveSettings: " .. buffer(indexOffset, 1):bitfield(0, 1)) + TsPacketCount = buffer(indexOffset, 1):bitfield(1, 4) -- Primitive TsPacketCount Type: [unsigned] size in bits:4 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 1), "TsPacketCount: " .. buffer(indexOffset, 1):bitfield(1, 4)) + FramePeriod = buffer(indexOffset, 1):bitfield(5, 3) -- Primitive FramePeriod Type: [unsigned] size in bits:3 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 1), "FramePeriod: " .. buffer(indexOffset, 1):bitfield(5, 3)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + KlvMode = buffer(indexOffset, 1):uint() -- Enumeration KlvMode Type: [KlvMode_t] size in bits: 8 + OrionNetworkByteVideo_tree:add(buffer(indexOffset, 1), "KlvMode: " .. get_KlvMode_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_CAMERAS +function print_OrionCameras(subtree, buffer, id, size, index) + local name = "OrionCameras" + local indexOffset = 0 + local OrionCameras_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionCameras_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local NumCameras + -- 3 Data Elements found: + if size >= (indexOffset + 1) then + NumCameras = buffer(indexOffset, 1):uint() -- Primitive NumCameras Type: [uint8_t] size in bits:8 + OrionCameras_tree:add(buffer(indexOffset, 1), "NumCameras: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 3) then + -- Not in Memory, but encoded Value [reserved] size in bits:24 + indexOffset = indexOffset + 3 + end + -- Embedded Struct: OrionCamSettings Type: [OrionCamSettings_t] size in bits reported:192 + indexOffset = print_OrionCamSettings_t(OrionCameras_tree, "OrionCamSettings", buffer, id, size, indexOffset, 24, NumCameras ) + return name +end + +-- Packet ID: ORION_PKT_CLEVIS_VERSION +function print_OrionClevisVersion(subtree, buffer, id, size, index) + local name = "OrionClevisVersion" + local indexOffset = 0 + local OrionClevisVersion_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionClevisVersion_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Version, PartNumber, OnTime + -- 3 Data Elements found: + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + Version = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive Version Type: [char] size in bits:128 + OrionClevisVersion_tree:add(buffer(indexOffset, strSize), "Version: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + PartNumber = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive PartNumber Type: [char] size in bits:128 + OrionClevisVersion_tree:add(buffer(indexOffset, strSize), "PartNumber: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + if size >= (indexOffset + 4) then + OnTime = buffer(indexOffset, 4):uint() -- Primitive OnTime Type: [uint32_t] size in bits:32 + OrionClevisVersion_tree:add(buffer(indexOffset, 4), "OnTime: " .. buffer(indexOffset, 4):uint() .. " minutes") + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_CROWN_VERSION +function print_OrionCrownVersion(subtree, buffer, id, size, index) + local name = "OrionCrownVersion" + local indexOffset = 0 + local OrionCrownVersion_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionCrownVersion_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Version, PartNumber, OnTime + -- 3 Data Elements found: + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + Version = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive Version Type: [char] size in bits:128 + OrionCrownVersion_tree:add(buffer(indexOffset, strSize), "Version: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + PartNumber = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive PartNumber Type: [char] size in bits:128 + OrionCrownVersion_tree:add(buffer(indexOffset, strSize), "PartNumber: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + if size >= (indexOffset + 4) then + OnTime = buffer(indexOffset, 4):uint() -- Primitive OnTime Type: [uint32_t] size in bits:32 + OrionCrownVersion_tree:add(buffer(indexOffset, 4), "OnTime: " .. buffer(indexOffset, 4):uint() .. " minutes") + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_PAYLOAD_VERSION +function print_OrionPayloadVersion(subtree, buffer, id, size, index) + local name = "OrionPayloadVersion" + local indexOffset = 0 + local OrionPayloadVersion_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionPayloadVersion_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Version, PartNumber, OnTime, HwType, HwRevision + -- 5 Data Elements found: + local strSize = 24 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + Version = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive Version Type: [char] size in bits:192 + OrionPayloadVersion_tree:add(buffer(indexOffset, strSize), "Version: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + PartNumber = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive PartNumber Type: [char] size in bits:128 + OrionPayloadVersion_tree:add(buffer(indexOffset, strSize), "PartNumber: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + if size >= (indexOffset + 4) then + OnTime = buffer(indexOffset, 4):uint() -- Primitive OnTime Type: [uint32_t] size in bits:32 + OrionPayloadVersion_tree:add(buffer(indexOffset, 4), "OnTime: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 1) then + HwType = buffer(indexOffset, 1):int() -- Primitive HwType Type: [int8_t] size in bits:8 + OrionPayloadVersion_tree:add(buffer(indexOffset, 1), "HwType: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + HwRevision = buffer(indexOffset, 1):int() -- Primitive HwRevision Type: [int8_t] size in bits:8 + OrionPayloadVersion_tree:add(buffer(indexOffset, 1), "HwRevision: " .. buffer(indexOffset, 1):int()) + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_TRACKER_VERSION +function print_OrionTrackerVersion(subtree, buffer, id, size, index) + local name = "OrionTrackerVersion" + local indexOffset = 0 + local OrionTrackerVersion_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionTrackerVersion_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Version, PartNumber, AppBits + -- 3 Data Elements found: + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + Version = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive Version Type: [char] size in bits:128 + OrionTrackerVersion_tree:add(buffer(indexOffset, strSize), "Version: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + PartNumber = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive PartNumber Type: [char] size in bits:128 + OrionTrackerVersion_tree:add(buffer(indexOffset, strSize), "PartNumber: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + if size >= (indexOffset + 4) then + AppBits = buffer(indexOffset, 4):uint() -- Primitive AppBits Type: [uint32_t] size in bits:32 + OrionTrackerVersion_tree:add(buffer(indexOffset, 4), "AppBits: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + return name +end + +-- Packet ID: ORION_PKT_RETRACT_VERSION +function print_OrionRetractVersion(subtree, buffer, id, size, index) + local name = "OrionRetractVersion" + local indexOffset = 0 + local OrionRetractVersion_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionRetractVersion_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Version + -- 1 Data Elements found: + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + Version = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive Version Type: [char] size in bits:128 + OrionRetractVersion_tree:add(buffer(indexOffset, strSize), "Version: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + return name +end + +-- Packet ID: ORION_PKT_LENSCTL_VERSION +function print_OrionLensCtlVersion(subtree, buffer, id, size, index) + local name = "OrionLensCtlVersion" + local indexOffset = 0 + local OrionLensCtlVersion_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionLensCtlVersion_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local Version + -- 1 Data Elements found: + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + Version = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive Version Type: [char] size in bits:128 + OrionLensCtlVersion_tree:add(buffer(indexOffset, strSize), "Version: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + return name +end + +-- Packet ID: ORION_PKT_BOARD +function print_OrionBoard(subtree, buffer, id, size, index) + local name = "OrionBoard" + local indexOffset = 0 + local OrionBoard_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionBoard_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local boardSN, assemblySN, config, boardEnum + -- 7 Data Elements found: + if size >= (indexOffset + 4) then + boardSN = buffer(indexOffset, 4):uint() -- Primitive boardSN Type: [uint32_t] size in bits:32 + OrionBoard_tree:add(buffer(indexOffset, 4), "boardSN: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + assemblySN = buffer(indexOffset, 4):uint() -- Primitive assemblySN Type: [uint32_t] size in bits:32 + OrionBoard_tree:add(buffer(indexOffset, 4), "assemblySN: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + config = buffer(indexOffset, 4):uint() -- Primitive config Type: [uint32_t] size in bits:32 + OrionBoard_tree:add(buffer(indexOffset, 4), "config: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 3) then + -- Not in Memory, but encoded Value [reserved] size in bits:24 + indexOffset = indexOffset + 3 + end + if size >= (indexOffset + 1) then + boardEnum = buffer(indexOffset, 1):uint() -- Enumeration boardEnum Type: [OrionBoardEnumeration_t] size in bits: 8 + OrionBoard_tree:add(buffer(indexOffset, 1), "boardEnum: " .. get_OrionBoardEnumeration_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + -- Struct manufactureDate Type: [Date_t] size in bits reported:16 + indexOffset = print_Date_t(OrionBoard_tree, "manufactureDate", buffer, id, size, indexOffset, 2, 1 ) + -- Struct calibrationDate Type: [Date_t] size in bits reported:16 + indexOffset = print_Date_t(OrionBoard_tree, "calibrationDate", buffer, id, size, indexOffset, 2, 1 ) + return name +end + +-- Packet ID: ORION_PKT_PRODUCT +function print_Product(subtree, buffer, id, size, index) + local name = "Product" + local indexOffset = 0 + local Product_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(Product_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local partNumber, serialNumber, productName + -- 3 Data Elements found: + local strSize = 16 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + partNumber = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive partNumber Type: [char] size in bits:128 + Product_tree:add(buffer(indexOffset, strSize), "partNumber: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + if size >= (indexOffset + 4) then + serialNumber = buffer(indexOffset, 4):uint() -- Primitive serialNumber Type: [uint32_t] size in bits:32 + Product_tree:add(buffer(indexOffset, 4), "serialNumber: " .. buffer(indexOffset, 4):uint()) + indexOffset = indexOffset + 4 + end + local strSize = 64 + if strSize > (size - indexOffset) then + strSize = (size - indexOffset) + end + productName = buffer(indexOffset, strSize):string(ENC_UTF_8) -- Primitive productName Type: [char] size in bits:512 + Product_tree:add(buffer(indexOffset, strSize), "productName: " .. buffer(indexOffset, strSize):string(ENC_UTF_8)) + return name +end + +-- Packet ID: ORION_PKT_AUTOPILOT_DATA +function print_OrionAutopilotData(subtree, buffer, id, size, index) + local name = "OrionAutopilotData" + local indexOffset = 0 + local OrionAutopilotData_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionAutopilotData_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local HasIAS, HasTAS, IsFlying, CommGood, Agl, IAS, TAS + -- 8 Data Elements found: + if size >= (indexOffset + 1) then + -- Not in Memory, but encoded Value [Reserved] size in bits:5 + HasIAS = buffer(indexOffset, 1):bitfield(5, 1) -- Primitive HasIAS Type: [unsigned] size in bits:1 + OrionAutopilotData_tree:add(buffer(indexOffset, 1), "HasIAS: " .. buffer(indexOffset, 1):bitfield(5, 1)) + HasTAS = buffer(indexOffset, 1):bitfield(6, 1) -- Primitive HasTAS Type: [unsigned] size in bits:1 + OrionAutopilotData_tree:add(buffer(indexOffset, 1), "HasTAS: " .. buffer(indexOffset, 1):bitfield(6, 1)) + IsFlying = buffer(indexOffset, 1):bitfield(7, 1) -- Primitive IsFlying Type: [unsigned] size in bits:1 + OrionAutopilotData_tree:add(buffer(indexOffset, 1), "IsFlying: " .. buffer(indexOffset, 1):bitfield(7, 1)) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + CommGood = buffer(indexOffset, 1):uint() -- Primitive CommGood Type: [uint8_t] size in bits:8 + OrionAutopilotData_tree:add(buffer(indexOffset, 1), "CommGood: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 2) then + Agl = buffer(indexOffset, 2):int() -- Primitive Agl Type: [int16_t] size in bits:16 + OrionAutopilotData_tree:add(buffer(indexOffset, 2), "Agl: " .. buffer(indexOffset, 2):int()) + indexOffset = indexOffset + 2 + end + if not (HasIAS == 0) and size >= (indexOffset + 1) then + IAS = buffer(indexOffset, 1):uint() -- Primitive IAS Type: [float] size in bits:8 + OrionAutopilotData_tree:add(buffer(indexOffset, 1), "IAS: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + else + OrionAutopilotData_tree:add(buffer(0,0), "IAS: Was not included, compared [HasIAS == 0] ") + end + if not (HasTAS == 0) and size >= (indexOffset + 1) then + TAS = buffer(indexOffset, 1):uint() -- Primitive TAS Type: [float] size in bits:8 + OrionAutopilotData_tree:add(buffer(indexOffset, 1), "TAS: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + else + OrionAutopilotData_tree:add(buffer(0,0), "TAS: Was not included, compared [HasTAS == 0] ") + end + return name +end + +-- Packet ID: ORION_PKT_EXT_HEADING_DATA +function print_OrionExtHeadingData(subtree, buffer, id, size, index) + local name = "OrionExtHeadingData" + local indexOffset = 0 + local OrionExtHeadingData_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionExtHeadingData_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local extHeading, noise, headingInGimbalAxis, headingFromAlign, pitch + -- 6 Data Elements found: + if size >= (indexOffset + 2) then + extHeading = buffer(indexOffset, 2):int() -- Primitive extHeading Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(OrionExtHeadingData_tree, "extHeading", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + noise = buffer(indexOffset, 2):uint() -- Primitive noise Type: [float] size in bits:16 + indexOffset = unsigned16ToDegrees(OrionExtHeadingData_tree, "noise", buffer, indexOffset, 2, 1) + end + if size >= (indexOffset + 2) then + headingInGimbalAxis = buffer(indexOffset, 1):bitfield(0, 1) -- Primitive headingInGimbalAxis Type: [unsigned] size in bits:1 + OrionExtHeadingData_tree:add(buffer(indexOffset, 1), "headingInGimbalAxis: " .. buffer(indexOffset, 1):bitfield(0, 1)) + headingFromAlign = buffer(indexOffset, 1):bitfield(1, 1) -- Primitive headingFromAlign Type: [unsigned] size in bits:1 + OrionExtHeadingData_tree:add(buffer(indexOffset, 1), "headingFromAlign: " .. buffer(indexOffset, 1):bitfield(1, 1)) + -- Not in Memory, but encoded Value [reserved] size in bits:14 + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 2) then + pitch = buffer(indexOffset, 2):int() -- Primitive pitch Type: [float] size in bits:16 + indexOffset = signed16ToDegrees(OrionExtHeadingData_tree, "pitch", buffer, indexOffset, 2, 1) + end + return name +end + +-- Packet ID: ORION_PKT_RANGE_DATA +function print_OrionRangeData(subtree, buffer, id, size, index) + local name = "OrionRangeData" + local indexOffset = 0 + local OrionRangeData_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionRangeData_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local range, maxAgeMs, source + -- 3 Data Elements found: + if size >= (indexOffset + 4) then + range = buffer(indexOffset, 4):uint() / 100 -- Primitive range Type: [float] size in bits:32 + OrionRangeData_tree:add(buffer(indexOffset, 4), "range: " .. buffer(indexOffset, 4):uint() / 100 .. " meters") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 2) then + maxAgeMs = buffer(indexOffset, 2):uint() -- Primitive maxAgeMs Type: [uint16_t] size in bits:16 + OrionRangeData_tree:add(buffer(indexOffset, 2), "maxAgeMs: " .. buffer(indexOffset, 2):uint() .. " ms") + indexOffset = indexOffset + 2 + end + if size >= (indexOffset + 1) then + source = buffer(indexOffset, 1):uint() -- Enumeration source Type: [RangeDataSrc_t] size in bits: 8 + OrionRangeData_tree:add(buffer(indexOffset, 1), "source: " .. get_RangeDataSrc_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + return name +end + +-- Packet ID: ORION_PKT_PRF_DETECT +function print_OrionPRFDetects(subtree, buffer, id, size, index) + local name = "OrionPRFDetects" + local indexOffset = 0 + local OrionPRFDetects_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionPRFDetects_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local detectState, fauxSequence, trackState + -- 5 Data Elements found: + if size >= (indexOffset + 1) then + detectState = buffer(indexOffset, 1):uint() -- Primitive detectState Type: [uint8_t] size in bits:8 + indexOffset = unsigned8ToDetectState(OrionPRFDetects_tree, "detectState", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 8) then + fauxSequence = buffer(indexOffset, 8):uint64() -- Primitive fauxSequence Type: [uint64_t] size in bits:64 + indexOffset = unsigned64ToFauxPRFs(OrionPRFDetects_tree, "fauxSequence", buffer, indexOffset, 8, 1) + end + if size >= (indexOffset + 1) then + trackState = buffer(indexOffset, 1):uint() -- Primitive trackState Type: [uint8_t] size in bits:8 + indexOffset = unsigned8ToTrackState(OrionPRFDetects_tree, "trackState", buffer, indexOffset, 1, 1) + end + if size >= (indexOffset + 8) then + -- Not in Memory, but encoded Value [reserved] size in bits:64 + indexOffset = indexOffset + 8 + end + -- Struct detects Type: [PRFDetect_t] size in bits reported:80 + indexOffset = print_PRFDetect_t(OrionPRFDetects_tree, "detects", buffer, id, size, indexOffset, 10, 5 ) + return name +end + +-- Packet ID: ORION_PKT_SCAN_PLAN +function print_OrionScanPlan(subtree, buffer, id, size, index) + local name = "OrionScanPlan" + local indexOffset = 0 + local OrionScanPlan_tree = makeSubtreeOrionPublic(subtree, buffer, name, id, size) + local isInvalid = checkOrionPublicPacketIsValid(OrionScanPlan_tree, buffer, id, name, size, index) + if string.len(isInvalid) > 0 then + return isInvalid + end + local enabled, state, horizontalScan, usePercentHorizon, useTargetHfov, referenceFrame, enableAutonomousRate, sweepAngleDeg, + hfovRateDeg, hfovDeg, maxTargetDistanceKm, minTargetDistanceKm, horizonPercent, yawOffsetDeg + -- 14 Data Elements found: + if size >= (indexOffset + 1) then + enabled = buffer(indexOffset, 1):uint() -- Primitive enabled Type: [uint8_t] size in bits:8 + OrionScanPlan_tree:add(buffer(indexOffset, 1), "enabled: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + state = buffer(indexOffset, 1):uint() -- Enumeration state Type: [ScanPlanState_t] size in bits: 8 + OrionScanPlan_tree:add(buffer(indexOffset, 1), "state: " .. get_ScanPlanState_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + horizontalScan = buffer(indexOffset, 1):uint() -- Primitive horizontalScan Type: [uint8_t] size in bits:8 + OrionScanPlan_tree:add(buffer(indexOffset, 1), "horizontalScan: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + usePercentHorizon = buffer(indexOffset, 1):uint() -- Primitive usePercentHorizon Type: [uint8_t] size in bits:8 + OrionScanPlan_tree:add(buffer(indexOffset, 1), "usePercentHorizon: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + useTargetHfov = buffer(indexOffset, 1):uint() -- Primitive useTargetHfov Type: [uint8_t] size in bits:8 + OrionScanPlan_tree:add(buffer(indexOffset, 1), "useTargetHfov: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + referenceFrame = buffer(indexOffset, 1):uint() -- Enumeration referenceFrame Type: [ScanPlanReferenceFrame_t] size in bits: 8 + OrionScanPlan_tree:add(buffer(indexOffset, 1), "referenceFrame: " .. get_ScanPlanReferenceFrame_t_string(buffer(indexOffset, 1):uint() ) .. " [" .. buffer(indexOffset, 1):uint() .. "]") + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 1) then + enableAutonomousRate = buffer(indexOffset, 1):uint() -- Primitive enableAutonomousRate Type: [uint8_t] size in bits:8 + OrionScanPlan_tree:add(buffer(indexOffset, 1), "enableAutonomousRate: " .. buffer(indexOffset, 1):uint()) + indexOffset = indexOffset + 1 + end + if size >= (indexOffset + 4) then + sweepAngleDeg = buffer(indexOffset, 4):uint() / 100 -- Primitive sweepAngleDeg Type: [float] size in bits:32 + OrionScanPlan_tree:add(buffer(indexOffset, 4), "sweepAngleDeg: " .. buffer(indexOffset, 4):uint() / 100 .. "°") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + hfovRateDeg = buffer(indexOffset, 4):uint() / 100 -- Primitive hfovRateDeg Type: [float] size in bits:32 + OrionScanPlan_tree:add(buffer(indexOffset, 4), "hfovRateDeg: " .. buffer(indexOffset, 4):uint() / 100 .. " deg/s") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + hfovDeg = buffer(indexOffset, 4):uint() / 100 -- Primitive hfovDeg Type: [float] size in bits:32 + OrionScanPlan_tree:add(buffer(indexOffset, 4), "hfovDeg: " .. buffer(indexOffset, 4):uint() / 100 .. "°") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + maxTargetDistanceKm = buffer(indexOffset, 4):uint() / 100 -- Primitive maxTargetDistanceKm Type: [float] size in bits:32 + OrionScanPlan_tree:add(buffer(indexOffset, 4), "maxTargetDistanceKm: " .. buffer(indexOffset, 4):uint() / 100 .. " Km") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + minTargetDistanceKm = buffer(indexOffset, 4):uint() / 100 -- Primitive minTargetDistanceKm Type: [float] size in bits:32 + OrionScanPlan_tree:add(buffer(indexOffset, 4), "minTargetDistanceKm: " .. buffer(indexOffset, 4):uint() / 100 .. " Km") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + horizonPercent = buffer(indexOffset, 4):int() / 100 -- Primitive horizonPercent Type: [float] size in bits:32 + OrionScanPlan_tree:add(buffer(indexOffset, 4), "horizonPercent: " .. buffer(indexOffset, 4):int() / 100 .. "%") + indexOffset = indexOffset + 4 + end + if size >= (indexOffset + 4) then + yawOffsetDeg = buffer(indexOffset, 4):int() / 100 -- Primitive yawOffsetDeg Type: [float] size in bits:32 + OrionScanPlan_tree:add(buffer(indexOffset, 4), "yawOffsetDeg: " .. buffer(indexOffset, 4):int() / 100 .. "°") + indexOffset = indexOffset + 4 + end + return name +end + +---------------------- Print Packet Section ---------------------- +-- Print Packet section will have 77 packets +function print_OrionPublicpacket(pinfo, subtree, buffer, index) + local id, size, data = getOrionPublicPacketIdentifier(buffer) + local info = "" + if id == 212 then info = print_GeolocateTelemetryCore(subtree, data, id, size, index) + elseif id == 67 then info = print_OrionPerformance(subtree, data, id, size, index) + elseif id == 65 then info = print_OrionDiagnostics(subtree, data, id, size, index) + elseif id == 66 then info = print_OrionFault(subtree, data, id, size, index) + elseif id == 68 then info = print_OrionSoftwareDiagnostics(subtree, data, id, size, index) + elseif id == 74 then info = print_OrionBoardHeartbeat(subtree, data, id, size, index) + elseif id == 69 then info = print_OrionVibration(subtree, data, id, size, index) + elseif id == 70 then info = print_NetworkDiagnostics(subtree, data, id, size, index) + elseif id == 71 then info = print_TleStatus(subtree, data, id, size, index) + elseif id == 72 then info = print_TleCommand(subtree, data, id, size, index) + elseif id == 161 then info = print_OrionRetractStatus(subtree, data, id, size, index) + elseif id == 217 then info = print_StareStart(subtree, data, id, size, index) + elseif id == 38 then info = print_OrionResetSource(subtree, data, id, size, index) + elseif id == 176 then info = print_CrownMode(subtree, data, id, size, index) + elseif id == 177 then info = print_DebugString(subtree, data, id, size, index) + elseif id == 179 then info = print_KlvUserData(subtree, data, id, size, index) + elseif id == 208 then info = print_OrionSensorData(subtree, data, id, size, index) + elseif id == 209 then info = print_GpsData(subtree, data, id, size, index) + elseif id == 211 then info = print_InsQuality(subtree, data, id, size, index) + elseif id == 1 then info = print_OrionCmd(subtree, data, id, size, index) + elseif id == 1 then info = print_OrionCmdExtended(subtree, data, id, size, index) + elseif id == 1 then info = print_OrionCmdExtendedResponse(subtree, data, id, size, index) + elseif id == 7 then info = print_OrionStartupCmd(subtree, data, id, size, index) + elseif id == 10 then info = print_OrionPositions(subtree, data, id, size, index) + elseif id == 213 then info = print_GeopointCmd(subtree, data, id, size, index) + elseif id == 215 then info = print_OrionPath(subtree, data, id, size, index) + elseif id == 218 then info = print_StareAck(subtree, data, id, size, index) + elseif id == 220 then info = print_GeoidUndulation(subtree, data, id, size, index) + elseif id == 96 then info = print_OrionCameraSwitch(subtree, data, id, size, index) + elseif id == 97 then info = print_OrionCameraState(subtree, data, id, size, index) + elseif id == 103 then info = print_OrionFlirSettings(subtree, data, id, size, index) + elseif id == 104 then info = print_OrionAptinaSettings(subtree, data, id, size, index) + elseif id == 105 then info = print_OrionZafiroSettings(subtree, data, id, size, index) + elseif id == 106 then info = print_OrionHitachiSettings(subtree, data, id, size, index) + elseif id == 108 then info = print_OrionSonySettings(subtree, data, id, size, index) + elseif id == 109 then info = print_OrionKtncSettings(subtree, data, id, size, index) + elseif id == 110 then info = print_OrionAttolloSettings(subtree, data, id, size, index) + elseif id == 111 then info = print_OrionAlviumSettings(subtree, data, id, size, index) + elseif id == 253 then info = print_OrionUnifiedCamErrorSettings(subtree, data, id, size, index) + elseif id == 120 then info = print_OrionOmniVisSettings(subtree, data, id, size, index) + elseif id == 121 then info = print_OrionSierraSettings(subtree, data, id, size, index) + elseif id == 122 then info = print_OrionSionyxSettings(subtree, data, id, size, index) + elseif id == 123 then info = print_OrionLynredSettings(subtree, data, id, size, index) + elseif id == 112 then info = print_VideoOptions(subtree, data, id, size, index) + elseif id == 113 then info = print_TrackOptions(subtree, data, id, size, index) + elseif id == 114 then info = print_GeoTrackStatus(subtree, data, id, size, index) + elseif id == 116 then info = print_TrackCmd(subtree, data, id, size, index) + elseif id == 117 then info = print_VideoRecordStatus(subtree, data, id, size, index) + elseif id == 118 then info = print_VideoRecordCmd(subtree, data, id, size, index) + elseif id == 119 then info = print_VideoRecordClock(subtree, data, id, size, index) + elseif id == 115 then info = print_GeoTrackerCommand(subtree, data, id, size, index) + elseif id == 160 then info = print_OrionRetractCommand(subtree, data, id, size, index) + elseif id == 178 then info = print_OrionUserData(subtree, data, id, size, index) + elseif id == 3 then info = print_OrionLaserCommand(subtree, data, id, size, index) + elseif id == 6 then info = print_OrionLaserStates(subtree, data, id, size, index) + elseif id == 2 then info = print_OrionUartConfig(subtree, data, id, size, index) + elseif id == 34 then info = print_OrionLimitsData(subtree, data, id, size, index) + elseif id == 216 then info = print_InsOptions(subtree, data, id, size, index) + elseif id == 228 then info = print_OrionNetworkSettings(subtree, data, id, size, index) + elseif id == 228 then info = print_OrionNetworkByteSettings(subtree, data, id, size, index) + elseif id == 95 then info = print_OrionAdvancedEncodingSettings(subtree, data, id, size, index) + elseif id == 98 then info = print_OrionNetworkVideo(subtree, data, id, size, index) + elseif id == 98 then info = print_OrionNetworkByteVideo(subtree, data, id, size, index) + elseif id == 99 then info = print_OrionCameras(subtree, data, id, size, index) + elseif id == 37 then info = print_OrionClevisVersion(subtree, data, id, size, index) + elseif id == 40 then info = print_OrionCrownVersion(subtree, data, id, size, index) + elseif id == 41 then info = print_OrionPayloadVersion(subtree, data, id, size, index) + elseif id == 44 then info = print_OrionTrackerVersion(subtree, data, id, size, index) + elseif id == 248 then info = print_OrionRetractVersion(subtree, data, id, size, index) + elseif id == 249 then info = print_OrionLensCtlVersion(subtree, data, id, size, index) + elseif id == 39 then info = print_OrionBoard(subtree, data, id, size, index) + elseif id == 167 then info = print_Product(subtree, data, id, size, index) + elseif id == 128 then info = print_OrionAutopilotData(subtree, data, id, size, index) + elseif id == 210 then info = print_OrionExtHeadingData(subtree, data, id, size, index) + elseif id == 214 then info = print_OrionRangeData(subtree, data, id, size, index) + elseif id == 251 then info = print_OrionPRFDetects(subtree, data, id, size, index) + elseif id == 252 then info = print_OrionScanPlan(subtree, data, id, size, index) + else + info = addUnknownOrionPublicPacket(subtree, data, id, size) + end + if tostring(pinfo.cols.info) == "" then + pinfo.cols.info = info + else + pinfo.cols.info = tostring(pinfo.cols.info) .. ", " .. info + end + return size + getOrionPublicHeaderLength() +end + +-- create a function to dissect it +function OrionPublic.dissector(buffer, pinfo, tree) + if checkIsOrionPublicPacket(buffer) then + pinfo.cols.protocol = "OrionPublic" + local i = 0 + local index = 0 + local bytes = buffer:len() + + pinfo.cols.info = "" + + while i < bytes do + i = i + print_OrionPublicpacket(pinfo, tree, buffer(i, bytes - i), index) + index = index + 1 + end + end +end + +registerOrionPublicDissectorTable() diff --git a/dissectors/orion-gimbal/src/OrionPublic_packet.lua b/dissectors/orion-gimbal/src/OrionPublic_packet.lua new file mode 100644 index 0000000..e2eaace --- /dev/null +++ b/dissectors/orion-gimbal/src/OrionPublic_packet.lua @@ -0,0 +1,1194 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/trilliumeng/orion-sdk (wireshark/OrionPublic_packet.lua), +-- commit dde2e42a646e22a38d723d31ab3e5c185035ae20 du 22/07/2026 (dernière modification du fichier : +-- commit 0576a327d735bc31dbf2b270f6e03f109e9d5967 du 22/07/2026). +-- Licence amont : MIT, License.txt du dépôt — voir README.md et LICENSE. +-- OrionPublic Wireshark Dissector +-- Trillium Engineering, Inc. 2026 +-- This dissector is designed to parse OrionPublic packets as defined in the Orion Public ICD. +-- It extracts the packet type ID, packet enumeration, data length, and system time from the packet header, +-- and provides helper functions to parse and display the contents of various packet types in a human-readable format. +-- [supported Packets] +-- • APTINA_SETTINGS +-- • BOARD +-- • CAMERAS +-- • CAMERA_STATE +-- • CAMERA_SWITCH +-- • CLEVIS_VERSION +-- • CMD +-- • CROWN_MODE +-- • CROWN_VERSION +-- • DIAGNOSTICS +-- • EXT_HEADING_DATA +-- • Orion Fault +-- • FLIR_SETTINGS +-- • GeoidUndulation +-- • GEOLOCATIE Telemetry +-- • GEOPOINT_CMD +-- • GeoTrackerCommand +-- • GPS_DATA +-- • Orion Hitachi Settings +-- • INS_Options +-- • INS_Quality +-- • KLV User data +-- • Laser Command +-- • Laser States +-- • Lens Control +-- • Limits +-- • Network Diagnostics +-- • Network Settings +-- • Network Video +-- • Omnivis settings +-- • Payload Version +-- • Performance +-- • Positions +-- • Product +-- • PRF Detect +-- • Range Data +-- • Reset Source +-- • Retract Command +-- • Retract Status +-- • Retract Version +-- • Sierra Settings +-- • Sensor Data +-- • Software Diagnostics +-- • Software Version +-- • Stare Ack +-- • Startup CMD +-- • Tle Command +-- • Track Command +-- • Tracker Version +-- • Uart Config +-- • User Data +-- • Vibration +-- • Video Options +-- • VideoRecordClock +-- • VideoRecordCmd +-- • VideoRecordStatus +-- • Stare Start +-- [Packets That will be added in official release but are not yet optimized in the dissector] +-- • Orion Path +-- • TLE Detects + +-- [Filtering and Displaying Packets] +-- To use, place in the "User plugins" folder. OrionPublic packets can be filtered +-- as follows: +-- +-- * OrionPublic: +-- This filter shows all frames which contain OrionPublic packets +-- * OrionPublic.id == 212 (or 0xD4): +-- Use this form to show only frames which contain OrionPublic packets with numerical ID +-- * OrionPublic.length == 7: +-- Use this form to show only frames which contain OrionPublic packets with +-- a data payload length of 7 +-- * OrionPublic.packet == ORION_PKT_SONY_SETTINGS: see [OrionPktType_t] in the ICD +-- Use this form to show frames that contain packets matching the packet enumeration +-- Declare the OrionPublic Protocol + +OrionPublic = Proto("OrionPublic", "Orion Protocol") + +-- the new fields that contain the extracted data +orion_id = ProtoField.new("Packet Type ID", "OrionPublic.id", ftypes.UINT8) +orion_packet = ProtoField.new("Packet Type ENUM", "OrionPublic.packet", ftypes.STRING) +orion_len = ProtoField.new("Data Length", "OrionPublic.length", ftypes.UINT8) +orion_systime = ProtoField.new("System Time", "OrionPublic.time", ftypes.UINT32) + +-- register the new fields into our protocol +OrionPublic.fields = { orion_id, orion_packet, orion_len, orion_systime } + +--------------------- Helper functions -------------------- +-- The checkIsProtocolPacket function return true/false if the data should be parsed as a OrionPublic packet +function checkIsOrionPublicPacket(buffer) + return (buffer(0,2):uint() == 53261) +end + +-- The checkProtocolPacketIsValid function recieves the current buffer, size, index and id to determine if the packet can be parsed +-- Return a string to be displayed in the dissector, or an empty string if packet can be parsed and is valid +function checkOrionPublicPacketIsValid(subtree, buffer, id, name, size, index) + local isInvalid = "" + if (id >= 103 and id <= 111) or id == 120 or id == 121 then -- Orion Camera Settings packet + if size == 1 then + isInvalid = name .. "[R][Camera: " .. buffer(index, 1):uint() .. "]" + subtree:add(buffer(index,1), "Requesting " .. name .. "[" .. buffer(index, 1):uint() .. "] Settings from Gimbal") + elseif size == 0 then + isInvalid = name .. "[R]" + subtree:add("Requesting [" .. name .. "] Packet from Gimbal") + end + elseif size == 0 then + isInvalid = name .. "[R]" + subtree:add("Requesting [" .. name .. "] Packet from Gimbal") + end + return isInvalid +end + +-- The getOrionPublicHeaderLength function returns the size of the packet header for the OrionPublic protocol +function getOrionPublicHeaderLength() + return 6 +end +-- The getOrionPublicPacketIdentifier function will attempt to decode the fields created above. Lua wireshark dissector expects an id, size, and a data section +function getOrionPublicPacketIdentifier(buffer) + local id = buffer(2,1):uint() + local size = buffer(3,1):uint() + local data = buffer(4,size) + return id, size, data +end + +function addUnknownOrionPublicPacket(subtree, data, id, size ) + local info = string.format("Unknown packet ID 0x%x", id) + subtree = subtree:add(OrionPublic, data, info) + subtree:add(data, "Data: " .. data) + return info +end + +function makeSubtreeOrionPublic(subtree, buffer, name, id, size) + subtree = subtree:add(OrionPublic, buffer, name) + subtree:add(orion_id, id) + subtree:add(orion_packet, get_OrionPktType_t_string(id)) + subtree:add(orion_len, size) + return subtree +end + +function makeStructureSubtreeOrionPublic(subtree, buffer, name, size) + subtree = subtree:add(OrionPublic, buffer, name) + subtree:add(orion_len, size) + return subtree +end + +function registerOrionPublicDissectorTable() + DissectorTable.get("udp.port"):add(8745, OrionPublic) + DissectorTable.get("udp.port"):add(8746, OrionPublic) + DissectorTable.get("tcp.port"):add(8747, OrionPublic) + DissectorTable.get("udp.port"):add(8748, OrionPublic) +end + +-- helper values +datum_semiMajorAxis = 6378137.0 +datum_flattening = (1.0 / 298.257223563) +datum_semiMinorAxis = (datum_semiMajorAxis * (1.0 - datum_flattening)) +datum_eSquared = (1.0 - (datum_semiMinorAxis * datum_semiMinorAxis) / (datum_semiMajorAxis * datum_semiMajorAxis)) +datum_eSecondSquared = ((datum_semiMajorAxis * datum_semiMajorAxis) / (datum_semiMinorAxis * datum_semiMinorAxis) - 1.0) + +-- Input: current subtree, name of value, value, floating point radians +function floatToString(max_precesion, value) + return string.gsub(string.format(("%." .. max_precesion .. "f"), value), "%.?0*$", "") +end +--------------------------------- Display Methods ----------------------------------------------------- + +function displayLosECEF(posLatRad, posLonRad, posAlt, subtree, name, data, index, size, scaler) + local losECEF = subtree:add(data(index, size), name) + local gimbal_ecef = lla_to_ecef(posLatRad, posLonRad, posAlt) + + local x = data(index,2):int() + local y = data(index+2,2):int() + local z = data(index+4,2):int() + + lla = ecef_to_lla(x + gimbal_ecef[0], y + gimbal_ecef[1], z + gimbal_ecef[2]) + + losECEF:add(data(index,2), "losECEFX: " .. x .. " m") + losECEF:add(data(index+2,2), "losECEFY: " .. y .. " m") + losECEF:add(data(index+4,2), "losECEFZ: " .. z .. " m") + displayRadians(data(index,6), losECEF, "Latitude", lla[0]) + displayRadians(data(index,6), losECEF, "Longitude", lla[1]) + losECEF:add(data(index,6), string.format("Altitude: %.1f", lla[2]) .. " m") + losECEF:add(data(index,6), string.format("Slant Range: %.1f", math.sqrt(x*x+y*y+z*z))) + return index + size +end + +function displayRadians(data, subtree, name, value) + rads = floatToString(8, value) + degs = floatToString(8, ((value*180)/math.pi)) + subtree:add(data, name .. ": " .. rads .. " rad (" .. degs .. " deg)") +end + +function displayDegrees(data, subtree, name, value) + degs = floatToString(8, value) + rads = floatToString(8, ((value*math.pi)/180)) + subtree:add(data, name .. ": " .. rads .. " rad (" .. degs .. " deg)") +end + +function displayKelvinTemperature(data, subtree, name, value) + kelvins = floatToString(8, value) + degrees = floatToString(8, (value - 273.15) * 9/5 + 32) + subtree:add(data, name .. ": " .. kelvins .. " K (" .. degrees .. " F)") +end +function displayRadiansPer(data, subtree, name, value, timeUnit) + rads = floatToString(8, value) + degs = floatToString(8, ((value*180)/math.pi)) + subtree:add(data, name .. ": " .. rads .. " rad/" .. timeUnit .. " (" .. degs .." deg/" .. timeUnit .. ")") +end + +function displayAsciiString(length, subtree, name, data, index, size, scaler) + if length > size - index then + length = size - index + end + subtree:add(data(index,length), name .. ": \"" .. data(index,length):string(ENC_ASCII) .. "\"") + return index + length +end + +function displayElevationMask(subtree, name, data, index, size, scaler) + local elevation = data(index,size):bitfield(4,4) + 0 + subtree:add(data(index,size), name .. ": " .. floatToString(6, elevation * (1.0/171.887339))) + return index + size +end + +function displayEuler(subtree, name, data, index, size, scaler) + local eulerArray = subtree:add(data(index,size), name) + displayRadians(data(index, 2), eulerArray, "Roll", data(index,2):int() * (1.0/10430.06)) + displayRadians(data(index+2, 2), eulerArray, "Pitch", data(index+2,2):int() * (1.0/10430.06)) + displayRadians(data(index+4, 2), eulerArray, "Yaw", data(index+4,2):int() * (1.0/10430.06)) + return index + size +end + +function displayMetersOffset(subtree, name, data, index, size, scaler) + local metersOffset = subtree:add(data(index,size), name) + metersOffset:add(data(index, 2), "X: " .. data(index,2):int() * 0.001 .. " m") + metersOffset:add(data(index+2, 2), "Y: " .. data(index+2,2):int() * 0.001 .. " m") + metersOffset:add(data(index+4, 2), "Z: " .. data(index+4,2):int() * 0.001 .. " m") + return index + size +end + +function displayQuat(subtree, name, data, index, size, scaler) + local quatArray = subtree:add(data(index,size), name) + + W = data(index,2):int() / 32768.0 + X = data(index + 2,2):int() / 32768.0 + Y = data(index + 4,2):int() / 32768.0 + Z = data(index + 6,2):int() / 32768.0 + + -- Display Quat data + quatArray:add(data(index,2), "W: " .. W) + quatArray:add(data(index+2,2), "X: " .. X) + quatArray:add(data(index+4,2), "Y: " .. Y) + quatArray:add(data(index+6,2), "Z: " .. Z) + + -- Display Euler + euler = quat_to_euler(W, X, Y, Z) + displayRadians(data(index,size), quatArray, "Roll", euler[0]) + displayRadians(data(index,size), quatArray, "Pitch", euler[1]) + displayRadians(data(index,size), quatArray, "Yaw", euler[2]) + return index + size +end + +function displayDirRMS(subtree, name, data, index, size, scaler) + subtree:add(data(index, 2), "Pan Direct Current Jitter: " .. data(index,2):uint() / scaler .. " uA") + subtree:add(data(index + 2, 2), "Tilt Direct Current Jitter: " .. data(index + 2, 2):uint() / scaler .. " uA") + return index + size +end + +function displayRMSJitter(subtree, name, data, index, size, scaler) + subtree:add(data(index, 2), "Pan Quadrature Current Jitter: " .. data(index, 2):uint() / scaler .. " uA") + subtree:add(data(index + 2,2), "Tilt Quadrature Current Jitter: " .. data(index + 2, 2):uint() / scaler .. " uA") + return index + size +end + +function displayVelRMS(subtree, name, data, index, size, scaler) + subtree:add(data(index, 2), "Pan Velocity Jitter: " .. data(index, 2):uint() / scaler .. " mrad/s") + subtree:add(data(index + 2, 2), "Tilt Velocity Jitter: " .. data(index + 2, 2):uint() / scaler .. " mrad/s") + return index + size +end + +function displayPosRMS(subtree, name, data, index, size, scaler) + subtree:add(data(index, 2), "Pan Position Jitter: " .. data(index, 2):uint() / scaler .. " radians") + subtree:add(data(index + 2, 2), "Tilt Position Jitter: " .. data(index + 2, 2):uint() / scaler .. " radians") + return index + size +end + +function displayOutputCurrent(subtree, name, data, index, size, scaler) + subtree:add(data(index, 2), "Pan Output Current: " .. data(index, 2):uint() / scaler .. " Amps") + subtree:add(data(index + 2, 2), "Tilt Output Current: " .. data(index + 2, 2):uint() / scaler .. " Amps") + return index + size +end + +function displayLoad(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(2, (data(index,size):uint() / scaler) * (1.0/ 2.55)) .. " %") + return index + size +end + +function displayMaxShift(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(6, (data(index,size):uint() / scaler) / 255)) + return index + size +end + +function displayIterations(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(2, (data(index,size):uint() * (1.0/ scaler)))) + return index + size +end + +function displayWatts(subtree, name, data, index, size, scaler) + local panTilt = subtree:add(data(index,size), name) + panTilt:add(data(index,1), "Pan: " .. floatToString(4,data(index,1):uint() / scaler) .. " watts") + panTilt:add(data(index+1,1), "Tilt: " .. floatToString(4,data(index+1,1):uint() / scaler) .. " watts") + return index + size +end + +function displayWorstCase(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(2, (data(index,size):uint() / scaler) / 10)) + return index + size +end + +function displayOutputShifts(subtree, name, data, index, size, scaler) + pantilt = subtree:add(OrionPublic, data(index,size), name) + pan = (data(index,2):int() / scaler) / 10430.06 + tilt = (data(index+2, 2):int() / scaler) / 10430.06 + displayRadians(data(index, 2), pantilt, "Pan", pan) + displayRadians(data(index+2, 2), pantilt, "Tilt", tilt) + return index + size +end + +----------------------------- End Display Methods -------------------------------------------- + +local function compute_max_sig(sigbits) +return (2 ^ sigbits) - 1 +end + +local function compute_bias(width, sigbits) +return (2 ^ (((width - 2) - sigbits))) - 1 +end + +local BINARY32_SIG_BITS = 23 +local BINARY32_SIG_MASK = 0x007FFFFF +local BINARY32_LEADING1 = 0x00800000 +local BINARY32_BIAS = 127 + +-- value: unsigned 16-bit integer, sigbits: number of significand bits in the source format +local function float16ToFloat32(value, sigbits) + local fieldInteger = 0 + + -- Zero (signed zero preserved later) + if (value & 0x7FFF) == 0 then + fieldInteger = 0 + else + local sigmask = compute_max_sig(sigbits) + local bias = compute_bias(16, sigbits) + + local unsignedExponent = ((value & 0x7FFF) >> sigbits) + + if unsignedExponent == 0 then + -- denormalized + fieldInteger = (value & sigmask) << ((BINARY32_SIG_BITS + 1) - sigbits) + unsignedExponent = unsignedExponent + (BINARY32_BIAS - bias) + + -- normalize + while (fieldInteger & 0x00800000) == 0 do + fieldInteger = fieldInteger << 1 + unsignedExponent = unsignedExponent - 1 + end + + -- mask off the implicit leading 1 + fieldInteger = fieldInteger & BINARY32_SIG_MASK + else + fieldInteger = (value & sigmask) << (BINARY32_SIG_BITS - sigbits) + unsignedExponent = unsignedExponent + (BINARY32_BIAS - bias) + end + + fieldInteger = fieldInteger | (unsignedExponent << BINARY32_SIG_BITS) + end + + if (value & 0x8000) ~= 0 then + fieldInteger = fieldInteger | 0x80000000 + end + + -- reinterpret 32-bit integer bits as IEEE-754 float + local packed = string.pack(">I4", fieldInteger) + local f = string.unpack(">f", packed) + return f +end + +-------- End Helper functions ------------------------------------------------------------------------ +-- Enumeration Functions + +function getTrackMode(subtree, name, data, index, size, scaler) + local highNoiseCompensation = data(index,size):bitfield(0, 1) + local acquisitionAssist = data(index,size):bitfield(1, 1) + local intelligentAssist = data(index,size):bitfield(2, 1) + local reducedSearch = data(index,size):bitfield(3, 1) + local trackModeValue = data(index,size):bitfield(4, 4) + local trackModeString = "" + if trackModeValue == 0 then + trackModeString = "No Change" + elseif trackModeValue == 1 then + trackModeString = "Stationary Mode" + elseif trackModeValue == 2 then + trackModeString = "Vehicle Mode" + elseif trackModeValue == 3 then + trackModeString = "Person Mode" + elseif trackModeValue == 4 then + trackModeString = "Scene Mode" + elseif trackModeValue == 6 then + trackModeString = "Static Mode" + elseif trackModeValue == 7 then + trackModeString = "No Registration" + elseif trackModeValue == 8 then + trackModeString = "Drone Mode" + else + trackModeString = "Reserved" + end + trackModeTree = subtree:add(OrionPublic, data(index,size), name) + trackModeTree:add(data(index,size):bitfield(4, 4), name .. ": " .. trackModeString) + if highNoiseCompensation == 1 then + trackModeTree:add(data(index,size):bitfield(0, 1), "High Noise Compensation: Enabled") + else + trackModeTree:add(data(index,size):bitfield(0, 1), "High Noise Compensation: Disabled") + end + if acquisitionAssist == 1 then + trackModeTree:add(data(index,size):bitfield(1, 1), "Acquisition Assist: Enabled") + else + trackModeTree:add(data(index,size):bitfield(1, 1), "Acquisition Assist: Disabled") + end + if intelligentAssist == 1 then + trackModeTree:add(data(index,size):bitfield(2, 1), "Intelligent Assist: Enabled") + else + trackModeTree:add(data(index,size):bitfield(2, 1), "Intelligent Assist: Disabled") + end + if reducedSearch == 1 then + trackModeTree:add(data(index,size):bitfield(3, 1), "Reduced Search: Enabled") + else + trackModeTree:add(data(index,size):bitfield(3, 1), "Reduced Search: Disabled") + end + return index + size +end + +function getDetectionMode(subtree, name, data, index, size, scaler) + local disableAll = data(index,size):bitfield(15, 1) + detectionModeTree = subtree:add(OrionPublic, data(index,size), name) + if disableAll == 1 then + detectionModeTree:add(data(index,size):bitfield(15, 1), name .. ": All Detection Disabled") + else + detectionModeTree:add(data(index,size):bitfield(15, 1), name .. ": Detection Enabled") + local resetDetect = data(index,size):bitfield(14, 1) + local vehicleEnabled = data(index,size):bitfield(11, 1) + local staringEnabled = data(index,size):bitfield(10, 1) + local aerialEnabled = data(index,size):bitfield(9, 1) + local anomalyEnabled = data(index,size):bitfield(8, 1) + local maritimeEnabled = data(index,size):bitfield(7, 1) + local radiometricEnabled = data(index,size):bitfield(6, 1) + local blobEnabled = data(index,size):bitfield(5, 1) + local droneEnabled = data(index,size):bitfield(4, 1) + local gasEnabled = data(index,size):bitfield(3, 1) + local personEnabled = data(index,size):bitfield(1, 1) + if resetDetect == 1 then + detectionModeTree:add(data(index,size):bitfield(14, 1), "Reset Detect: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(14, 1), "Reset Detect: Disabled") + end + if vehicleEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(11, 1), "Vehicle Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(11, 1), "Vehicle Detection: Disabled") + end + if staringEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(10, 1), "Staring Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(10, 1), "Staring Detection: Disabled") + end + if aerialEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(9, 1), "Aerial Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(9, 1), "Aerial Detection: Disabled") + end + if anomalyEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(8, 1), "Anomaly Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(8, 1), "Anomaly Detection: Disabled") + end + if maritimeEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(7, 1), "Maritime Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(7, 1), "Maritime Detection: Disabled") + end + if radiometricEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(6, 1), "Radiometric Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(6, 1), "Radiometric Detection: Disabled") + end + if blobEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(5, 1), "Blob Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(5, 1), "Blob Detection: Disabled") + end + if droneEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(4, 1), "Drone Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(4, 1), "Drone Detection: Disabled") + end + if gasEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(3, 1), "Gas Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(3, 1), "Gas Detection: Disabled") + end + if personEnabled == 1 then + detectionModeTree:add(data(index,size):bitfield(1, 1), "Person Detection: Enabled") + else + detectionModeTree:add(data(index,size):bitfield(1, 1), "Person Detection: Disabled") + end + end + + return index + size +end + +-- Conversion Functions +function signed16ToGeoidUndulationMeters(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(6, data(index,size):int() / 32768.0 * 120.0) .. " m") + return index + size +end + +function uint8ToFloat(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(10, (data(index,size):uint() / scaler) / 255.0)) + return index + size +end + +-- Pan And Til Conversions - these are commonly used in the ICD and have a standard conversion, so they get their own functions. The scaler is used to convert from the raw integer value to radians. +function signed16x2ToPanTilt(subtree, name, data, index, size, scaler) + pantilt = subtree:add(OrionPublic, data(index,size), name) + pan = data(index,2):int() / scaler + tilt = data(index+2, 2):int() / scaler + displayRadians(data(index, 2), pantilt, "Pan", pan) + displayRadians(data(index+2, 2), pantilt, "Tilt", tilt) + return index + 4 +end + +function unsigned16x2ToPanTiltAccel(subtree, name, data, index, size, scaler) + pantilt = subtree:add(OrionPublic, data(index,size), name) + pan = data(index,2):uint() / scaler + tilt = data(index+2, 2):uint() / scaler + displayRadiansPer(data(index, 4), pantilt, "Pan", pan, "s/s") + displayRadiansPer(data(index+4, 4), pantilt, "Tilt", tilt, "s/s") + return index + 4 +end + +function unsigned16x2ToPanTiltVel(subtree, name, data, index, size, scaler) + pantilt = subtree:add(OrionPublic, data(index,size), name) + pan = data(index,2):uint() / scaler + tilt = data(index+2, 2):uint() / scaler + displayRadiansPer(data(index, 4), pantilt, "Pan", pan, "s") + displayRadiansPer(data(index+4, 4), pantilt, "Tilt", tilt, "s") + return index + 4 +end +function signed32x2ToPanTilt(subtree, name, data, index, size, scaler) + pantilt = subtree:add(OrionPublic, data(index,size), name) + pan = data(index,4):int() / scaler + tilt = data(index+4, 4):int() / scaler + displayRadians(data(index, 4), pantilt, "Pan", pan) + displayRadians(data(index+4, 4), pantilt, "Tilt", tilt) + return index + 8 +end + +function signed16ToPanTilt(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, data(index, size):int() * 1.0/10430.06) + return index + size +end + +function signed16x2ToPanTiltOffset(subtree, name, data, index, size, scaler) + pantiltoffset = subtree:add(OrionPublic, data(index,4), name .. " Offsets") + displayRadians(data(index,2), pantiltoffset, "Pan Offset", data(index,2):int() * 1.0/10430.06) + displayRadians(data(index+2,2), pantiltoffset, "Tilt Offset", data(index+2,2):int() * 1.0/10430.06) + return index + 4 +end +--- End Pan and Tilt Conversions + +-- Start General Conversions - +function unsigned8ToEnabled(subtree, name, data, index, size, scaler) + local enabled = data(index,size):uint() + if enabled == 0 then + subtree:add(data(index,size), name .. ": Disabled") + else + subtree:add(data(index,size), name .. ": Enabled") + end + + return index + size +end + +function unsigned8ToDisabled(subtree, name, data, index, size, scaler) + local disabled = data(index,size):uint() + if disabled == 1 then + subtree:add(data(index,size), name .. ": Disabled") + else + subtree:add(data(index,size), name .. ": Enabled") + end + + return index + size +end + +function bitfield1ToEnabled(subtree, name, data, index, size, scaler, bitIndex) + local enabled = data(index,size):bitfield(bitIndex,1) + if enabled == 0 then + subtree:add(data(index,size), name .. ": Disabled") + else + subtree:add(data(index,size), name .. ": Enabled") + end + + return index -- bitfield1, do not increment index +end + +function bitfield1ToYes(subtree, name, data, index, size, scaler, bitIndex) + local enabled = data(index,size):bitfield(bitIndex,1) + if enabled == 0 then + subtree:add(data(index,size), name .. ": No") + else + subtree:add(data(index,size), name .. ": Yes") + end + return index -- bitfield1, do not increment index +end + +function bitfield1ToTrue(subtree, name, data, index, size, scaler, bitIndex) + local enabled = data(index,size):bitfield(bitIndex,1) + if enabled == 0 then + subtree:add(data(index,size), name .. ": False") + else + subtree:add(data(index,size), name .. ": True") + end + return index -- bitfield1, do not increment index +end + + +function unsigned8ToFloat32(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(4, (data(index,size):uint() / scaler) * (1.0/255.0))) + return index + size +end + +function displayAsRadians(subtree, name, data, index, size, scaler) + displayRadians(data(index,size), subtree, name, data(index,size):float() / scaler) + return index + size +end + +-- End Track Conversions + +--- Measurement Conversions - these are used to convert raw integer values into human readable measurements. +function unsigned32ToUMScaled(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(2, (data(index,size):uint() / scaler)) .. " mm (" .. data(index,size):uint() .. " µm)") + return index + size +end + +function unsigned16ToNMPixelsScaled(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(8, (data(index,size):uint() / scaler)) .. " pm (" .. data(index,size):uint() .. " nm)") + return index + size +end +--- End Measurement Conversions + +function unsigned32ToBytes(subtree, name, data, index, size, scaler) + local unitType = "Bytes" + local byteCount = data(index,size):uint() + if byteCount > 1073741824 then + unitType = "GB" + byteCount = byteCount / 1073741824 + elseif byteCount > 1048576 then + unitType = "MB" + byteCount = byteCount / 1048576 + elseif byteCount > 1024 then + unitType = "KB" + byteCount = byteCount / 1024 + end + subtree:add(data(index,size), name .. ": " .. byteCount .. " " .. unitType) + return index + size +end + +function unsigned32ToIPv4(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. data(index,1):uint() .. "." .. data(index + 1,1):uint() .. "." .. data(index + 2,1):uint() .. "." .. data(index + 3,1):uint()) + return index + size +end + +function unsigned8x4ToIPv4(subtree, name, data, index, size, scaler) + return unsigned32ToIPv4(subtree, name, data, index, size, scaler) +end + +-- Power Conversions - these are used to convert raw integer values into human readable power measurements. +function unsigned16ToVarVolts(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(4, data(index,size):uint() / 100) .. " mV") + return index + size +end + +function unsigned16x2ToCurrent(subtree, name, data, index, size, scaler) + local panTilt = subtree:add(data(index,size), name) + panTilt:add(data(index, 2), "Pan: " .. floatToString(3, data(index, 2):uint() / scaler) .. " Amps") + panTilt:add(data(index + 2, 2), "Tilt: " .. floatToString(3, data(index + 2, 2):uint() / scaler) .. " Amps") + return index + size +end + +function unsigned16ToVarAmps(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(4,data(index,size):uint() / 100) .. " mA") + return index + size +end + +-- End Power Conversions + +function unsigned8ToPercent(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(4,data(index,size):uint() / 2.55) .. " %") + return index + size +end + +function unsigned8ToHitachiSharpness(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(4, (data(index,size):uint() / 50.0))) + return index + size +end + +function unsigned8ToGamma(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(6, (data(index,size):uint() / 72.8571429) + 0.5) ) + return index + size +end + +function unsigned8ToTemperature(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(4, data(index,size):uint() / scaler) .. " C" ) + return index + size +end + +function exposureToMilliseconds(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(6, (data(index,size):uint() / 1988.92261) + 0.05) .. " ms" ) + return index + size +end + +function unsigned8ToStareTime(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(2, (data(index,size):uint() / 100.0)) .. " seconds" ) + return index + size +end + +function unsigned8ToStareLoad(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(5, (data(index,size):uint() * (1.0/255) ))) + return index + size +end + +function unsigned16ToMinMaxGain(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(5, (data(index,size):uint() / 2114.03226) + 1.0)) + return index + size +end + +function cameraContrast(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(6, (data(index,size):int() / 127.0))) + return index + size +end + +function cameraSharpness(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(6, (data(index,size):uint() / 51.0) )) + return index + size +end + +function cameraAperature(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(6, (data(index,size):uint() * (1.0/ 7.96875)) )) + return index + size +end + +function cameraFramerate(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(6, (data(index,size):uint() / 8.5) )) + return index + size +end + +function float16ToChiSquare(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(8, float16ToFloat32(data(index,size):uint(), 9) / scaler)) + return index + size +end + +function signed32ToLatRads(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, (data(index, size):int() / scaler) / 1367130550.516243) + return index + size +end + +function signed32ToLonRads(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, (data(index, size):int() / scaler) / 683565275.2581217) + return index + size +end + +function unsigned16x3To16QUAT(subtree, name, data, index, size, scaler) + local quat = subtree:add(data(index,size), name) + displayRadians(data(index, 2), quat, "Roll", data(index, 2):uint() / scaler) + displayRadians(data(index + 2, 2),quat, "Pitch", data(index + 2, 2):uint() / scaler) + displayRadians(data(index + 4, 2),quat, "Yaw", data(index + 4, 2):uint() / scaler) + return index + size +end + +function signed16x4ToQuat(subtree, name, data, index, size, scaler) + local quat = subtree:add(data(index,size), name) + displayRadians(data(index, 2), quat, "W", (data(index, 2):int() / scaler) / 32767.0) + displayRadians(data(index + 2, 2),quat, "X", (data(index + 2, 2):int() / scaler) / 32767.0) + displayRadians(data(index + 4, 2),quat, "Y", (data(index + 4, 2):int() / scaler) / 32767.0) + displayRadians(data(index + 6, 2),quat, "Z", (data(index + 6, 2):int() / scaler) / 32767.0) + return index + size +end + +function signed16x3To16QUAT(subtree, name, data, index, size, scaler) + local quat = subtree:add(data(index,size), name) + displayRadiansPer(data(index, 2), quat, "Roll", data(index, 2):int() / scaler, "s") + displayRadiansPer(data(index + 2, 2),quat, "Pitch", data(index + 2, 2):int() / scaler, "s") + displayRadiansPer(data(index + 4, 2),quat, "Yaw", data(index + 4, 2):int() / scaler, "s") + return index + size +end + +function unsigned16x3ToGyroBias(subtree, name, data, index, size, scaler) + local quat = subtree:add(data(index,size), name) + displayRadiansPer(data(index, 2), quat, "Roll", data(index, 2):uint() / scaler, "s") + displayRadiansPer(data(index + 2, 2),quat, "Pitch", data(index + 2, 2):uint() / scaler, "s") + displayRadiansPer(data(index + 4, 2),quat, "Yaw", data(index + 4, 2):uint() / scaler, "s") + return index + size +end + +function signed16x3ToAcceleration(subtree, name, data, index, size, scaler) + local quat = subtree:add(data(index,size), name) + quat:add(data(index, 2), "Roll: " .. data(index, 2):int() / scaler .. " m/s/s") + quat:add(data(index + 2, 2), "Pitch: " .. data(index + 2, 2):int() / scaler .. " m/s/s") + quat:add(data(index + 4, 2), "Yaw: " .. data(index + 4, 2):int() / scaler .. " m/s/s") + return index + size +end + +function float32x3ToAccelerometerBias(subtree, name, data, index, size, scaler) + local quat = subtree:add(data(index,size), name) + quat:add(data(index, 2), "X: " .. data(index, 2):int() / scaler .. " m/s/s") + quat:add(data(index + 2, 2), "Y: " .. data(index + 2, 2):int() / scaler .. " m/s/s") + quat:add(data(index + 4, 2), "Z: " .. data(index + 4, 2):int() / scaler .. " m/s/s") + return index + size +end + +function unsigned16x3ToSigmaNED(subtree, name, data, index, size, scaler) + local ned = subtree:add(data(index,size), name) + ned:add(data(index, 2), "North: " .. floatToString(1, ((data(index, 2):uint() / scaler) / 65.535)) .. " m/s") + ned:add(data(index+2, 2), "East: " .. floatToString(1, ((data(index+2, 2):uint() / scaler) / 65.535)) .. " m/s") + ned:add(data(index+4, 2), "Down: " .. floatToString(1, ((data(index+4, 2):uint() / scaler) / 65.535)) .. " m/s") + return index + size +end + +function signed16ToSigmaLat(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, (data(index, size):int() / scaler) / 20860.12008116854) + return index + size +end + +function signed16ToSigmaLonAlt(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, (data(index, size):int() / scaler) / 10430.06004058427) + return index + size +end + +function signed16ToCourse(subtree, name, data, index, size, scaler) + displayDegrees(data(index, size), subtree, name, (data(index, size):int() / scaler) / 91.01944444444445) + return index + size +end + +function unsigned16x3To16NED(subtree, name, data, index, size, scaler) + local ned = subtree:add(data(index,size), name) + ned:add(data(index, 2), "North: " .. (data(index, 2):uint() / scaler) .. " m/s") + ned:add(data(index+2, 2), "East: " .. (data(index+2, 2):uint() / scaler) .. " m/s") + ned:add(data(index+4, 2), "Down: " .. (data(index+4, 2):uint() / scaler) .. " m/s") + return index + size +end + +function signed16ToEllipseAngle(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, (data(index, size):int() / scaler) / 10430.06004058427) + return index + size +end + +function signed16ToEllipseValue(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(1, data(index,size):int() / scaler / 32.767) .. " meters") + return index + size +end + +function signed16x3To16NED(subtree, name, data, index, size, scaler) + local ned = subtree:add(data(index,size), name) + ned:add(data(index, 2), "North: " .. data(index, 2):int() / scaler .. " m/s") + ned:add(data(index+2, 2), "East: " .. data(index+2, 2):int() / scaler .. " m/s") + ned:add(data(index+4, 2), "Down: " .. data(index+2, 2):int() / scaler .. " m/s") + return index + size +end + +function signed32x3ToNED(subtree, name, data, index, size, scaler) + local ned = subtree:add(data(index,size), name) + ned:add(data(index, 4), "North: " .. (data(index, 4):int() / scaler) .. " m/s") + ned:add(data(index+4, 4), "East: " .. (data(index+4, 4):int() / scaler) .. " m/s") + ned:add(data(index+4, 4), "Down: " .. (data(index+8, 4):int() / scaler) .. " m/s") + return index + size +end + +function signed32ToMeterAccuracy(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. ": " .. data(index, size):int() / scaler .. " m") + return index + size +end + +function signed32ToSpeed(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. ": " .. data(index, size):int() / scaler .. " m/s") + return index + size +end + +function signed8ToDegrees(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, data(index, size):uint() / scaler) + return index + size +end + +function signed16ToDegrees(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, data(index, size):uint() / scaler) + return index + size +end + +function signed16ToDegrees(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, data(index, size):int() / 10430.06) + return index + size +end + +function unsigned16ToDegrees(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, data(index, size):int() / 10430.2192) + return index + size +end + +function signed32ToDegrees(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, data(index, size):int() / scaler) + return index + size +end + + +function float32ToDegrees(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, data(index, size):float() / scaler) + return index + size +end + +-- Rate Conversions +function unsigned16ToHertz(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. ": " .. floatToString(4, (data(index, size):uint() / scaler * 1.0/327.675)) .. " hz") + return index + size +end + +function unsigned8x3ToMagnitude(subtree, name, data, index, size, scaler) + local magnitude = subtree:add(data(index,size), name) + magnitude:add(data(index, 1), "Roll : " .. floatToString(7, (data(index, 1):uint() / 255.0) / scaler) .. " %") + magnitude:add(data(index + 1, 1), "Pitch : " .. floatToString(7, (data(index + 1, 1):uint()/ 255.0) / scaler) .. " %") + magnitude:add(data(index + 2, 1), "Yaw : " .. floatToString(7, (data(index + 2, 1):uint() / 255.0) / scaler) .. " %") + return index + size +end + +-- End Time Conversions + + +-- Time Conversions - these are used to convert raw integer values into human readable time measurements. +function unsigned16ToMilliseconds(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. ": " .. (data(index, size):uint() / scaler * 1.0/10430.06) .. " ms") + return index + size +end + +function unsigned8ToIntegrationTime(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. ": " .. floatToString(6, (data(index, size):uint() / 8.79310345) + 1.0) .. " ms") + return index + size +end + +-- End Time Conversions + +function unsigned16ToFOV(subtree, name, data, index, size, scaler) + displayRadians(data(index, size), subtree, name, data(index, size):int() / 1.0/10430.2192) + return index + size +end + +function convertSigned24FloatToSigned32Float(value, scaler) + value = (value / 1.0) / scaler + if(value >= 0) then + if(value >= 8388607) then + return 8388607 + else + if(value == (value // 1)) then + return value + else + return value + 0.5 + end + end + else + if(value <= -8388608) then + return -8388608 + else + if(value == (value // 1)) then + return value + else + return value - 0.5 + end + end + end +end +function signed24x3ToPoints(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. "[0]: " .. convertSigned24FloatToSigned32Float(data(index, 3):int(), scaler)) + subtree:add(data(index, size), name .. "[1]: " .. convertSigned24FloatToSigned32Float(data(index+3, 3):int(), scaler)) + subtree:add(data(index, size), name .. "[2]: " .. convertSigned24FloatToSigned32Float(data(index+6, 3):int(), scaler)) + return index + size +end + +function unsigned24ToSlantRange(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. ": " .. data(index, size):int() / scaler .. " m") + return index + size +end + +function signed32ToAltitude(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. ": " .. data(index, size):int() / 10000.0 .. " m") + return index + size +end + +function float32To24BitRange(subtree, name, data, index, size, scaler) + subtree:add(data(index, size), name .. ": " .. data(index, size):bitfield(0,24) / scaler) + return index + size +end + +function unsignedToFloat32(subtree, name, data, index, size, scaler) + unsignedValue = data(index, size):uint() + if(size == 4) then + unsignedValue = unsignedValue / 1000000.0 + elseif(size == 2) then + unsignedValue = (unsignedValue / 2114.03226) + 1.0 + elseif (size == 1) then + unsignedValue = unsignedValue / 255 + end + subtree:add(data(index, size), name .. ": " .. unsignedValue / scaler) + return index + size +end + +function signedToFloat32(subtree, name, data, index, size, scaler) + unsignedValue = data(index, size):uint() + if(size == 4) then + unsignedValue = unsignedValue / 1000000.0 + elseif(size == 2) then + unsignedValue = unsignedValue * (1.0/2114.03226) + elseif (size == 1) then + unsignedValue = unsignedValue * (1.0/127) + end + subtree:add(data(index, size), name .. ": " .. unsignedValue / scaler) + return index + size +end + +function signed16ToStareAngle(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. string.format(" Stare Angle: %.1f", data(index,size):int() / 32768.0 * 180.0)) + return index + size +end + +function signed16x3ToAngularRate(subtree, name, data, index, size, scaler) + local anglerate = subtree:add(data(index,size), name) + displayRadiansPer(data(index,2), anglerate, "Roll", (data(index,2):int() / 6258.03602) / scaler, "s") + displayRadiansPer(data(index+2,2), anglerate, "Pitch", (data(index+2,2):int() / 6258.03602) / scaler, "s") + displayRadiansPer(data(index+4,2), anglerate, "Yaw", (data(index+4,2):int() / 6258.03602) / scaler, "s") + return index + size +end + + +function signed16x3ToAxesForce(subtree, name, data, index, size, scaler) + local axesForce = subtree:add(data(index,size), name) + axesForce:add(data(index,2), "Roll: " .. floatToString(6, data(index,2):int() * (1.0/334.01631) / scaler) .. " m/s") + axesForce:add(data(index+2,2), "Pitch: " .. floatToString(6, data(index+2,2):int() * (1.0/334.01631) / scaler) .. " m/s") + axesForce:add(data(index+4,2), "Yaw: " .. floatToString(6, data(index+4,2):int() * (1.0/334.01631) / scaler) .. " m/s") + return index + size +end + +function unsigned16ToBarometricPressure(subtree, name, data, index, size, scaler) + subtree:add(data(index,size), name .. ": " .. floatToString(4, ((data(index,size):uint() /0.595772727) / scaler)) .. " Pa") + return index + size +end + +function unsigned16ToKelvinTemperature(subtree, name, data, index, size, scaler) + displayKelvinTemperature(data(index,size), subtree, name, data(index,size):uint() / scaler) + return index + size +end + +function unsigned8ToDetectState(subtree, name, data, index, size, scaler) + local state = data(index,size):uint() + local stateString = "Invalid" + if state == 0 then + stateString = "Disable" + elseif state == 1 then + stateString = "Enable" + elseif state == 2 then + stateString = "Faux" + end + subtree:add(data(index,size), name .. ": " .. stateString) + return index + size +end + +function unsigned8ToTrackState(subtree, name, data, index, size, scaler) + local state = data(index,size):uint() + local stateString = "Invalid" + if state == 0 then + stateString = "Not Tracking" + elseif state == 1 then + stateString = "Tracking" + end + subtree:add(data(index,size), name .. ": " .. stateString) + return index + size +end + +function unsigned64ToFauxPRFs(subtree, name, data, index, size, scaler) + local fauxPRFs = subtree:add(data(index,size), name) + for i = 0, size-1 do -- 8 bytes + local prfhigh = data(index + i, 1):bitfield(0, 4) + local prflow = data(index + i, 1):bitfield(4, 4) + fauxPRFs:add(data(index + i, 1), "Faux PRF[" .. (i * 2) .. "]: " .. prfhigh) + fauxPRFs:add(data(index + i, 1), "Faux PRF[" .. (i * 2) + 1 .. "]: " .. prflow) + end + return index + size +end + +-- convert latitude, longitude, altitude to ECEF coordinates. Latitude and Longitude should be in radians, altitude should be in meters. ECEF coordinates are returned in meters. +function lla_to_ecef(lat, lon, alt) + local sinLat = math.sin(lat) + local cosLat = math.cos(lat) + local sinLon = math.sin(lon) + local cosLon = math.cos(lon) + + -- // Radius of East-West curvature in meters + local Rc = datum_semiMajorAxis / math.sqrt(1.0 - datum_eSquared * sinLat * sinLat) + local ecef = {} + + -- // PosECEF position data + ecef[0] = (Rc+alt)*cosLat*cosLon + ecef[1] = (Rc+alt)*cosLat*sinLon + ecef[2] = (Rc*(1.0 - datum_eSquared) + alt)*sinLat + + return ecef +end +-- Convert ECEF coordinates to LLA. Latitude and Longitude are returned in radians, altitude is returned in meters. +function ecef_to_lla(x, y, z) + local psquared = x*x + y*y + local cosLat, sinLat, cosLon, sinLon + + local lla = {} + + if psquared == 0.0 then + -- // We are on the Earth rotation axis, we could be + -- // in the center, or at one of the poles + lla[2] = math.abs(z) - datum_semiMinorAxis + lla[1] = 0.0 + cosLon = 1.0 + sinLon = 0.0 + + if z == 0.0 then + lla[0] = 0.0 + elseif z > 0.0 then + lla[0] = 3.1415926535859/2.0 + else + lla[0] = -3.1415926535859/2.0 + end + else + -- // distance from axis of rotation + local p = math.sqrt(psquared) + + local zeta = math.atan(z*datum_semiMajorAxis, p*datum_semiMinorAxis) + local SinZeta = math.sin(zeta) + local CosZeta = math.cos(zeta) + + -- // Latitude + local num = z + datum_eSecondSquared*datum_semiMinorAxis*SinZeta*SinZeta*SinZeta + local den = p - datum_eSquared*datum_semiMajorAxis*CosZeta*CosZeta*CosZeta + + -- // hypotenuse should never be zero + local hyp = math.sqrt(num*num + den*den) + lla[0] = math.atan(num, den) + sinLat = num/hyp + cosLat = den/hyp + + -- // Longitude + lla[1] = math.atan(y, x) + + -- // Altitude is calculated differently at the poles, in order to avoid the singularity + if math.abs(cosLat) > 0.001 then + lla[2] = (p / cosLat) - datum_semiMajorAxis / math.sqrt(1.0 - datum_eSquared * sinLat * sinLat) + else + lla[2] = math.abs(z) - datum_semiMinorAxis + end + end + + return lla + +end + +function quat_to_euler(a, b, c, d) + local angles = {} + angles[0] = math.atan(2*(c*d + b*a), a^2 - b^2 - c^2 + d^2) + angles[1] = math.asin(math.max(-1, math.min(-2*(b*d - c*a), 1.0))) + angles[2] = math.atan(2*(b*c + d*a), a^2 + b^2 - c^2 - d^2) + return angles +end +---------------- End Conversion Methods ------------------------------------------------------------ + + diff --git a/dissectors/orvibo-s20/LICENSE b/dissectors/orvibo-s20/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/dissectors/orvibo-s20/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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) + + 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. + +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) year 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 Lesser General +Public License instead of this License. diff --git a/dissectors/orvibo-s20/README.md b/dissectors/orvibo-s20/README.md new file mode 100644 index 0000000..68fee60 --- /dev/null +++ b/dissectors/orvibo-s20/README.md @@ -0,0 +1,54 @@ +# Orvibo S20 / WiWo — prises Wi-Fi connectées + +Dissecteur Wireshark Lua du **protocole UDP des prises Wi-Fi Orvibo S20** +(gamme WiWo) : en-tête « magic », longueur et commande, puis découverte +(`qa`, `qg`), abonnement (`cl`), contrôle et état de la prise (`dc`, +`sf`), lecture et écriture des tables internes (`rt`, `tm` — table des +appareils, des minuteries…), battement (`hb`), réglage de l'heure… avec +préférences de port, de niveau de débogage et d'heuristique. Port UDP +10000 par défaut. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/starox/wireshark.orvibo | +| Commit importé | `bb5afa9b700feb6ff729f0c6885b373f36709f44` du 06/02/2016 (branche `master`, dernier commit, qui est aussi la dernière modification de `wiwo_orvibo.lua`) | +| Licence amont | GPL-2.0-or-later (fichier `COPYING` GPL v2, copié ici sous le nom `LICENSE` ; en-tête : « either version 2 of the License, or (at your option) any later version », © 2016 Frédéric Leroy) ; captures dans le domaine public (README amont) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Orvibo natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme du `COPYING` amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `wiwo_orvibo.lua` | Protocole `orvibo` sur UDP 10000 (port réglable dans les préférences) | +| `captures/orvibo_s20_capture_1.pcapng` | Capture amont (44 Ko) | +| `captures/orvibo_s20_capture_3_control_by_gateway_outside_of_local_lan.pcapng` | Capture amont : pilotage via la passerelle Orvibo hors du réseau local (186 Ko) | +| `captures/orvibo_s20_capture_4.pcapng.pcap` | Capture amont (302 Ko) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête du script. **Non importée** : la +capture `orvibo_s20_capture_2_no_internet_access_on_wifi_network.pcapng`, +qui contient l'appairage Wi-Fi « smart_config » de la prise (par +précaution, ces trames pouvant transporter les identifiants du réseau +Wi-Fi de l'auteur). + +## Utilisation + +Copier `wiwo_orvibo.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer +`wireshark -X lua_script:wiwo_orvibo.lua captures/orvibo_s20_capture_1.pcapng`, +puis filtrer avec `orvibo`. + +## Remarques + +- Selon le README amont, plusieurs champs sont inconnus, incomplets ou + inexacts (`cd`, `cs`, `gt`…) et la table de minuteries n° 3 n'est pas + décodée. +- Les captures contiennent les mots de passe d'accès distant des prises + de test de l'auteur (dont la valeur par défaut `888888`), tels que + publiés en amont. +- Non vérifié dans Wireshark. diff --git a/dissectors/orvibo-s20/captures/orvibo_s20_capture_1.pcapng b/dissectors/orvibo-s20/captures/orvibo_s20_capture_1.pcapng new file mode 100644 index 0000000..3cb22af Binary files /dev/null and b/dissectors/orvibo-s20/captures/orvibo_s20_capture_1.pcapng differ diff --git a/dissectors/orvibo-s20/captures/orvibo_s20_capture_3_control_by_gateway_outside_of_local_lan.pcapng b/dissectors/orvibo-s20/captures/orvibo_s20_capture_3_control_by_gateway_outside_of_local_lan.pcapng new file mode 100644 index 0000000..1e3604b Binary files /dev/null and b/dissectors/orvibo-s20/captures/orvibo_s20_capture_3_control_by_gateway_outside_of_local_lan.pcapng differ diff --git a/dissectors/orvibo-s20/captures/orvibo_s20_capture_4.pcapng.pcap b/dissectors/orvibo-s20/captures/orvibo_s20_capture_4.pcapng.pcap new file mode 100644 index 0000000..8b44ff3 Binary files /dev/null and b/dissectors/orvibo-s20/captures/orvibo_s20_capture_4.pcapng.pcap differ diff --git a/dissectors/orvibo-s20/wiwo_orvibo.lua b/dissectors/orvibo-s20/wiwo_orvibo.lua new file mode 100644 index 0000000..2ce42b6 --- /dev/null +++ b/dissectors/orvibo-s20/wiwo_orvibo.lua @@ -0,0 +1,876 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later +-- Importé de https://github.com/starox/wireshark.orvibo (wiwo_orvibo.lua), +-- commit bb5afa9b700feb6ff729f0c6885b373f36709f44 du 06/02/2016. +-- Licence amont : GPL-2.0-or-later (COPYING amont) — voir README.md. +-- Copyright (c) 2016 Frederic Leroy. All rights reserved. +-- Author: Frederic Leroy +-- +-- 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, see . + +local debug_level = { + DISABLED = 0, + LEVEL_1 = 1, + LEVEL_2 = 2 +} + +local DEBUG = debug_level.LEVEL_1 + +local default_settings = +{ + debug_level = DEBUG, + port = 10000, + heur_enabled = true, +} + +-- for testing purposes, we want to be able to pass in changes to the defaults +-- from the command line; because you can't set lua preferences from the command +-- line using the '-o' switch (the preferences don't exist until this script is +-- loaded, so the command line thinks they're invalid preferences being set) +-- so we pass them in as command arguments insetad, and handle it here: +local args={...} -- get passed-in args +if args and #args > 0 then + for _, arg in ipairs(args) do + local name, value = arg:match("(.+)=(.+)") + if name and value then + if tonumber(value) then + value = tonumber(value) + elseif value == "true" or value == "TRUE" then + value = true + elseif value == "false" or value == "FALSE" then + value = false + elseif value == "DISABLED" then + value = debug_level.DISABLED + elseif value == "LEVEL_1" then + value = debug_level.LEVEL_1 + elseif value == "LEVEL_2" then + value = debug_level.LEVEL_2 + else + error("invalid commandline argument value") + end + else + error("invalid commandline argument syntax") + end + default_settings[name] = value + end +end + +local dprint = function() end +local dprint2 = function() end + +local + function reset_debug_level() + if default_settings.debug_level > debug_level.DISABLED then + dprint = function(...) + print(table.concat({"Lua:", ...}," ")) + end + + if default_settings.debug_level > debug_level.LEVEL_1 then + dprint2 = dprint + end + end +end + +-- call it now +reset_debug_level() + +dprint2("Wireshark version = ", get_version()) +dprint2("Lua version = ", _VERSION) + +---------------------------------------- +-- Unfortunately, the older Wireshark/Tshark versions have bugs, and part of the point +-- of this script is to test those bugs are now fixed. So we need to check the version +-- end error out if it's too old. +local major, minor, micro = get_version():match("(%d+)%.(%d+)%.(%d+)") +if major and tonumber(major) <= 1 and ((tonumber(minor) <= 10) or (tonumber(minor) == 11 and tonumber(micro) < 3)) then + error( "Sorry, but your Wireshark/Tshark version ("..get_version()..") is too old for this script!\n".. + "This script needs Wireshark/Tshark version 1.11.3 or higher.\n" ) +end + +-- more sanity checking +-- verify we have the ProtoExpert class in wireshark, as that's the newest thing this file uses +assert(ProtoExpert.new, "Wireshark does not have the ProtoExpert class, so it's too old - get the latest 1.11.3 or higher") + +---------------------------------------- +-- creates a Proto object, but doesn't register it yet +local orvibo = Proto("orvibo","Wiwo orvibo Protocol") + +-------------------------------------------------------------------------------- +-- preferences handling stuff +-------------------------------------------------------------------------------- + +-- a "enum" table for our enum pref, as required by Pref.enum() +-- having the "index" number makes ZERO sense, and is completely illogical +-- but it's what the code has expected it to be for a long time. Ugh. +local debug_pref_enum = { + { 1, "Disabled", debug_level.DISABLED }, + { 2, "Level 1", debug_level.LEVEL_1 }, + { 3, "Level 2", debug_level.LEVEL_2 }, +} + +orvibo.prefs.debug = Pref.enum("Debug", default_settings.debug_level, + "The debug printing level", debug_pref_enum) + +orvibo.prefs.port = Pref.uint("Port number", default_settings.port, + "The UDP port number for orvibo") + +orvibo.prefs.heur = Pref.bool("Heuristic enabled", default_settings.heur_enabled, + "Whether heuristic dissection is enabled or not") + +---------------------------------------- +-- a function for handling prefs being changed +function orvibo.prefs_changed() + dprint2("prefs_changed called") + + default_settings.debug_level = orvibo.prefs.debug + reset_debug_level() + + default_settings.heur_enabled = orvibo.prefs.heur + + if default_settings.port ~= orvibo.prefs.port then + -- remove old one, if not 0 + if default_settings.port ~= 0 then + dprint2("removing Orvibo from port",default_settings.port) + DissectorTable.get("udp.port"):remove(default_settings.port, orvibo) + end + -- set our new default + default_settings.port = orvibo.prefs.port + -- add new one, if not 0 + if default_settings.port ~= 0 then + dprint2("adding Orvibo to port",default_settings.port) + DissectorTable.get("udp.port"):add(default_settings.port, orvibo) + end + end + +end + +dprint2("Orvibo Prefs registered") + +---------------------------------------- + +local HDR_LEN = 6 + +local header_magic_type = { + ["hd"] = "magic header" +} + +local opcodes_type = { + cd = "???", + cl = "CLaim", + cs = "???", + dc = "set Direct Current - power on/off ???", + dl = "only from controller to orvibo gw ??? distant link ?", + gt = "Get Time", + hb = "HeartBeat", + lt = "Leave Terminal ??? / Load Table", + mp = "Modify Password", + qa = "Query All - can also be emitted by devices", + qg = "Query Get", + rt = "Read Table", + sf = "State Flip ???", + tm = "Table Modify", + ts = "Time Set ???", +} + +local table_type = { + [0] = "end marker", + [1] = "table 1 - list of tables availables", + [3] = "table 3", + [4] = "table 4 - device configuration", +} + +local icon_type = { + [0] = "light bulb", + [1] = "fan", + [2] = "thermostat", + [3] = "switch", + [4] = "plug", +} + +local onoff_type = { + [0] = "off", + [1] = "on", +} + +local yesno_type = { + [0] = "no", + [1] = "yes", +} + +local ip_mode_type = { + [0] = "static", + [1] = "dhcp", +} + +local countdown_mode_type = { + [0x00ff] = "disabled", + [0x0100] = "enabled", +} + +local role_device = 0 +local role_controller = 1 +local role_gateway = 2 +local role_all_device = 3 +local role_all_controller = 4 +local role_type = { + [role_device] = "device", + [role_controller] = "controller", + [role_gateway] = "gateway", + [role_all_device] = "all device", + [role_all_controller] = "all controller", +} + +-- fields + +-- notes: +-- discoverable is "lock device" on android app + +local fields = { + ["orvibo.addr"] = ProtoField.ether("orvibo.addr", "hardware address", base.HEX), + ["orvibo.cookie"] = ProtoField.uint32("orvibo.cookie", "cookie", base.HEX), + ["orvibo.countdown"] = ProtoField.uint16("orvibo.countdown", "countdown seconds"), + ["orvibo.countdown_mode"] = ProtoField.uint16("orvibo.countdown_mode", "countdown mode", base.HEX, countdown_mode_type), + ["orvibo.date"] = ProtoField.uint32("orvibo.date", "epoch date"), + ["orvibo.date_str"] = ProtoField.string("orvibo.date_str", "date"), + ["orvibo.device"] = ProtoField.string("orvibo.device", "device", FT_STRING), + ["orvibo.discoverable"] = ProtoField.uint8("orvibo.discoverable", "discoverable", base.HEX, yesno_type), + ["orvibo.firmware_version"] = ProtoField.uint32("orvibo.firmware_version", "firmware_version"), + ["orvibo.flags.action"] = ProtoField.bool("orvibo.flags.action", "action", base.BOOL, {"response","query"}), + ["orvibo.flags.src"] = ProtoField.uint8("orvibo.flags.src", "src", base.DEC, role_type), + ["orvibo.gw"] = ProtoField.ipv4("orvibo.gw", "gw"), + ["orvibo.hardware_version"] = ProtoField.uint32("orvibo.hardware_version", "hardware_version"), + ["orvibo.header_magic"] = ProtoField.string("orvibo.header_magic", "header", FT_STRING, header_magic_type), + ["orvibo.icon"] = ProtoField.uint16("orvibo.icon", "icon", base.DEC, icon_type), + ["orvibo.ip"] = ProtoField.ipv4("orvibo.ip", "ip"), + ["orvibo.ip_mode"] = ProtoField.uint8("orvibo.ip_mode", "ip_mode", base.HEX, ip_mode_type), + ["orvibo.length"] = ProtoField.uint16("orvibo.length", "length"), + ["orvibo.mysterious"] = ProtoField.uint8("orvibo.mysterious", "mysterious", base.HEX), + ["orvibo.name"] = ProtoField.string("orvibo.name", "name", FT_STRING), + ["orvibo.netmask"] = ProtoField.ipv4("orvibo.netmask", "netmask"), + ["orvibo.new_password"] = ProtoField.string("orvibo.new_password", "new password", FT_STRING), + ["orvibo.opcode"] = ProtoField.string("orvibo.opcode", "opcode", FT_STRING, opcodes_type), + ["orvibo.padding"] = ProtoField.bytes("orvibo.padding", "padding", base.HEX), + ["orvibo.password"] = ProtoField.string("orvibo.password", "password", FT_STRING), + ["orvibo.port"] = ProtoField.uint16("orvibo.port", "port"), + ["orvibo.raddr"] = ProtoField.ether("orvibo.raddr", "reverse hardware address", base.HEX), + ["orvibo.record"] = ProtoField.uint16("orvibo.record", "record", base.DEC), + ["orvibo.record_count"] = ProtoField.uint16("orvibo.record_count", "record_count", base.DEC), + ["orvibo.record_length"] = ProtoField.uint16("orvibo.record_length", "record length", base.DEC), + ["orvibo.server_ip"] = ProtoField.ipv4("orvibo.server_ip", "server_ip"), + ["orvibo.server_name"] = ProtoField.string("orvibo.server_name", "server_name"), + ["orvibo.server_port"] = ProtoField.uint16("orvibo.server_port", "server_port"), + ["orvibo.state"] = ProtoField.uint8("orvibo.state", "state", base.HEX, onoff_type), + ["orvibo.table"] = ProtoField.uint16("orvibo.table", "table", base.DEC, table_type), + ["orvibo.table_version"] = ProtoField.uint16("orvibo.table_version", "table_version", base.DEC), + ["orvibo.timestamp"] = ProtoField.uint32("orvibo.timestamp", "timestamp", base.DEC), + ["orvibo.timezone"] = ProtoField.uint8("orvibo.timezone", "timezone"), + ["orvibo.timezone_set"] = ProtoField.uint8("orvibo.timezone_set", "timezone set ???"), + ["orvibo.unknown"] = ProtoField.bytes("orvibo.unknown", "unknown", base.HEX), + ["orvibo.version"] = ProtoField.uint16("orvibo.version", "version", base.HEX), + ["orvibo.wifi_version"] = ProtoField.uint32("orvibo.wifi_version", "wifi_version"), +} + +-- XXX this is weird, we can't get string maps from protofields, so we must have another +-- helper table +local fields_string_maps = { + ["orvibo.countdown_mode"] = countdown_mode_type, + ["orvibo.discoverable"] = yesno_type, + ["orvibo.icon"] = icon_type, + ["orvibo.ip_mode"] = ip_mode_type, + ["orvibo.opcode"] = opcodes_type, + ["orvibo.state"] = onoff_type, + ["orvibo.table"] = table_type, +} + +orvibo.fields = {} +for key,value in pairs(fields) do + table.insert(orvibo.fields, value) +end + +-- expert fields + +local expert_fields = { + ["orvibo.expert.bad_header"] = ProtoExpert.new("orvibo.expert.bad_header", "bad header", + expert.group.MALFORMED, expert.severity.ERROR), + ["orvibo.expert.bad_length"] = ProtoExpert.new("orvibo.expert.bad_length", "length mismatch", + expert.group.MALFORMED, expert.severity.ERROR), + ["orvibo.expert.unknown_value"] = ProtoExpert.new("orvibo.expert.unknown_value", "value is unknown", + expert.group.PROTOCOL, expert.severity.WARN), + ["orvibo.expert.too_short"] = ProtoExpert.new("orvibo.expert.too_short", "packet too short", + expert.group.MALFORMED, expert.severity.ERROR), + ["orvibo.expert.mac_reverse_mismatch"] = ProtoExpert.new("orvibo.expert.mac_reverse_mismatch", "addr and reverse addr mismatch", + expert.group.PROTOCOL, expert.severity.ERROR), + ["orvibo.expert.mac_mismatch"] = ProtoExpert.new("orvibo.expert.mac_mismatch", "addr and ethernet hardware address mismatch", + expert.group.PROTOCOL, expert.severity.WARN), + ["orvibo.expert.clear_password"] = ProtoExpert.new("orvibo.expert.clear_password", "You can find the password here !", + expert.group.SECURITY, expert.severity.WARN), + ["orvibo.expert.query"] = ProtoExpert.new("orvibo.expert.query", "This is a query", + expert.group.REQUEST_CODE, expert.severity.CHAT), + ["orvibo.expert.response"] = ProtoExpert.new("orvibo.expert.response", "This is a response", + expert.group.RESPONSE_CODE, expert.severity.CHAT), + ["orvibo.expert.unknown_opcode"] = ProtoExpert.new("orvibo.expert.unknown_opcode", "This opcode is unknown", + expert.group.UNDECODED, expert.severity.WARN), + ["orvibo.expert.unknown_data"] = ProtoExpert.new("orvibo.expert.unknown_data", "The packet contain unknown data", + expert.group.UNDECODED, expert.severity.WARN), + ["orvibo.expert.bad_padding"] = ProtoExpert.new("orvibo.expert.bad_padding", "bad padding", + expert.group.PROTOCOL, expert.severity.WARN), +} + +orvibo.experts = {} +for key,value in pairs(expert_fields) do + table.insert(orvibo.experts, value) +end + +-- extractors + +extractors = {} +for key, value in pairs(fields) do + extractors[key] = Field.new(key) +end + +get_ip_src = Field.new("ip.src") +get_ip_dst = Field.new("ip.dst") +get_eth_src = Field.new("eth.src") +get_eth_dst = Field.new("eth.dst") + +-- dissectors helpers + +function _add_field(tree, buf, pos, len, name, msg, expert, le) + if len == -1 then + len = buf:reported_length_remaining() - pos + end + if le == false then + item = tree:add(fields[name], buf(pos, len)) + else + item = tree:add_le(fields[name], buf(pos, len)) + end + if msg then + TreeItem.append_text(item, " - " .. msg ) + end + -- TODO check strings maps + if fields_string_maps[name] then + local value = extractors[name]().value + if not fields_string_maps[name][value] then + item:add_proto_expert_info(expert_fields["orvibo.expert.unknown_value"]) + end + end + if expert then + item:add_proto_expert_info(expert_fields[expert]) + end + return pos + len +end + +function add_field(tree, buf, pos, len, name, msg, expert) + return _add_field(tree, buf, pos, len, name, msg, expert, false) +end + +function add_field_le(tree, buf, pos, len, name, msg, expert) + return _add_field(tree, buf, pos, len, name, msg, expert, true) +end + +function add_padding(tree, buf, pos, len, value) + if len == -1 then + len = buf:reported_length_remaining() - pos + end + local padding = buf(pos, len) + local item = tree:add(fields["orvibo.padding"], padding) + TreeItem.append_text(item, " - should be padded with " .. string.format("0x%x", value) ) + pos = pos + len + -- check padding + for l=0, len - 1 do + if padding(i,1):int() ~= value then + item:add_proto_expert_info(expert_fields["orvibo.expert.bad_padding"]) + return pos + end + end + return pos +end + +function get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 6, "orvibo.addr") + if not ( extractors["orvibo.addr"]().value == get_eth_src().value or extractors["orvibo.addr"]().value == get_eth_dst().value ) then + item:add_proto_expert_info(expert_fields["orvibo.expert.mac_mismatch"]) + end + return add_padding(tree, buf, pos, 6, 32) +end + +function reverse_bytes(buf) + local l = buf:len() - 1 + local c = ByteArray.new() + for i=0,l do + c:append(buf(l-i,1):bytes()) + end + return c +end + +function get_rmac_and_padding(buf, pos, tree) + rmac = buf(pos, 6) + item = tree:add(fields["orvibo.raddr"], rmac) + pos = add_padding(tree, buf, pos + 6, 6, 32) + mac_bytes = extractors["orvibo.addr"]().range():bytes() + rmac_reversed_bytes = reverse_bytes(rmac) + if mac_bytes ~= rmac_reversed_bytes then + item:add_proto_expert_info(expert_fields["orvibo.expert.mac_reverse_mismatch"]) + end + return pos +end + +function get_mac_and_rmac(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = get_rmac_and_padding(buf, pos, tree) + return pos +end + +-- sub dissectors + +function add_timestamp(buf, pos, tree) + item = tree:add_le(fields["orvibo.timestamp"], buf(pos, 4)) + TreeItem.append_text(item, " - seconds since 1900-01-01 00:00:00") + -- $ python + -- Python 2.7.10 (default, Oct 14 2015, 16:09:02) + -- [GCC 5.2.1 20151010] on linux2 + -- Type "help", "copyright", "credits" or "license" for more information. + -- >>> import time + -- >>> from datetime import date + -- >>> ref1900 = date(1900, 01, 01) + -- >>> refepoch = date(1970, 01, 01) + -- >>> diff = ref1900 - refepoch + -- >>> diff.total_seconds() + -- -2208988800.0 + -- >>> + local epoch_date_in_seconds = extractors["orvibo.timestamp"]().value - 2208988800 + local tmp = item:add(fields["orvibo.date"], epoch_date_in_seconds) + tmp:set_generated() + tmp = item:add(fields["orvibo.date_str"], format_date(epoch_date_in_seconds)) + tmp:set_generated() + return pos + 4 +end + +function dissector_device_standard_response(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + pos = add_field(tree, buf, pos, 1, "orvibo.state") + return pos +end + +function dissector_cl_query_from_controller_to_device(buf, pos, tree) + pos = get_mac_and_rmac(buf, pos, tree) + return pos +end + +function dissector_cl_response_from_device(buf, pos, tree) + local pktlen = buf:reported_length_remaining() + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie", "???") + -- two byte left ! + return pos +end + +function dissector_cl_response_from_gateway_to_device(buf, pos, tree) + local pktlen = buf:reported_length_remaining() + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie", "???") + pos = get_rmac_and_padding(buf, pos, tree) + return pos +end + +function dissector_cl_response_from_irda_gateway_to_controller(buf, pos, tree) + local pktlen = buf:reported_length_remaining() + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie", "???") + pos = add_field(tree, buf, pos, 1, "orvibo.unknown", nil, "orvibo.expert.unknown_data") + pos = add_field(tree, buf, pos, 6, "orvibo.device") + return pos +end + +function dissector_cl_query_from_controller_to_gateway(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 6, "orvibo.password", nil, "orvibo.expert.clear_password") + pos = add_padding(tree, buf, pos, 6, 32) + pos = add_field(tree, buf, pos, 40, "orvibo.server_name") + return pos +end + +function dissector_cs_query(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + return pos +end + +function dissector_dl_query(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + pos = get_rmac_and_padding(buf, pos, tree) + return pos +end + +function dissector_gt_query(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + return pos +end + +function dissector_gt_response(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + return pos +end + +function dissector_hb_query(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + return pos +end + +function dissector_hb_response(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + pos = add_padding(tree, buf, pos, 1, 0) + return pos +end + + +function dissector_lt_from_device_to_gateway(buf, pos, tree) + return add_field(tree, buf, pos, 4, "orvibo.cookie") +end + +function dissector_lt_from_controller_to_device(buf, pos, tree) + return get_mac_and_padding(buf, pos, tree) +end + +function dissector_mp_query(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + pos = add_field(tree, buf, pos, 6, "orvibo.password",nil,"orvibo.expert.clear_password") + pos = add_padding(tree, buf, pos, 6, 32) + pos = add_field(tree, buf, pos, 6, "orvibo.new_password",nil,"orvibo.expert.clear_password") + pos = add_padding(tree, buf, pos, 6, 32) + return pos +end + +function dissector_mp_response_from_gw(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + pos = add_field(tree, buf, pos, 1, "orvibo.unknown", nil, "orvibo.expert.unknown_data") + pos = add_field(tree, buf, pos, 6, "orvibo.password",nil,"orvibo.expert.clear_password") + pos = add_padding(tree, buf, pos, 6, 32) + return pos +end + +function dissector_qa_query(buf, pos, tree) + return pos +end + +function dissector_qa_response(buf, pos, tree) + pos = add_padding(tree, buf, pos, 1, 0) -- always 0 in every opcode, only from device + pos = get_mac_and_rmac(buf, pos, tree) + pos = add_field(tree, buf, pos, 6, "orvibo.device", "device type ??? can change !") + pos = add_timestamp(buf, pos, tree) + pos = add_field(tree, buf, pos, 1, "orvibo.state") + return pos +end + +function dissector_qg_query(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + return pos +end + +function dissector_qg_response(buf, pos, tree) + pos = add_padding(tree, buf, pos, 1, 0) -- always 0 in every opcode, only from device + pos = get_mac_and_rmac(buf, pos, tree) + pos = add_field(tree, buf, pos, 6, "orvibo.device") + pos = add_timestamp(buf, pos, tree) + pos = add_field(tree, buf, pos, 1, "orvibo.state") + return pos +end + +function dissector_record_table_version(buf, pos, tree) + pos = add_field_le(tree, buf, pos, 2, "orvibo.table") + pos = add_field_le(tree, buf, pos, 2, "orvibo.table_version") + return pos +end + +function dissector_record_socket_description(buf, pos, tree) + pos = add_field(tree, buf, pos, 2, "orvibo.version") + pos = get_mac_and_rmac(buf, pos, tree) + pos = add_field(tree, buf, pos, 6, "orvibo.password",nil,"orvibo.expert.clear_password") + pos = add_padding(tree, buf, pos, 6, 32) + pos = add_field(tree, buf, pos, 16, "orvibo.name", " -> padded with space or all 0xff if not initialized") + pos = add_field_le(tree, buf, pos, 2, "orvibo.icon") + pos = add_field_le(tree, buf, pos, 4, "orvibo.hardware_version") + pos = add_field_le(tree, buf, pos, 4, "orvibo.firmware_version") + pos = add_field_le(tree, buf, pos, 4, "orvibo.wifi_version") + pos = add_field_le(tree, buf, pos, 2, "orvibo.port") + pos = add_field(tree, buf, pos, 4, "orvibo.server_ip") + pos = add_field_le(tree, buf, pos, 2, "orvibo.server_port") + pos = add_field(tree, buf, pos, 40, "orvibo.server_name") + pos = add_field(tree, buf, pos, 4, "orvibo.ip") + pos = add_field(tree, buf, pos, 4, "orvibo.gw") + pos = add_field(tree, buf, pos, 4, "orvibo.netmask") + pos = add_field(tree, buf, pos, 1, "orvibo.ip_mode") + pos = add_field(tree, buf, pos, 1, "orvibo.discoverable") + pos = add_field(tree, buf, pos, 1, "orvibo.timezone_set") + pos = add_field(tree, buf, pos, 1, "orvibo.timezone") + pos = add_field(tree, buf, pos, 2, "orvibo.countdown_mode") + pos = add_field_le(tree, buf, pos, 2, "orvibo.countdown", "seconds") + pos = add_field(tree, buf, pos, 12, "orvibo.unknown", "-> there is a date and two fields with hours in seconds", "orvibo.expert.unknown_data") + pos = add_field(tree, buf, pos, 20, "orvibo.date_str","???") + pos = add_field(tree, buf, pos, 20, "orvibo.date_str","???") + return pos +end + +table_record_dissector = { + [1] = { + [4] = dissector_record_table_version + }, + [4] = { + [1] = dissector_record_socket_description + } +} + +function dissector_rt_query_to_device(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + pos = add_field_le(tree, buf, pos, 2, "orvibo.table") + return pos +end + +function dissector_rt(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie", "???") + pos = add_field(tree, buf, pos, 2, "orvibo.table") + pos = add_field(tree, buf, pos, 2, "orvibo.record_count") + pos = add_field(tree, buf, pos, 2, "orvibo.unknown", nil, "orvibo.expert.unknown_data") + count = extractors["orvibo.record_count"]().value + while count > 0 do + pos = add_field_le(tree, buf, pos, 2, "orvibo.record_length") + pos = add_field_le(tree, buf, pos, 2, "orvibo.record") + pos = table_record_dissector[extractors["orvibo.table"]().value][extractors["orvibo.record"]().value](buf, pos, tree) + count = count - 1 + end + + return pos +end + +function dissector_tm(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie", "???") + pos = add_field_le(tree, buf, pos, 2, "orvibo.table") + pos = add_field_le(tree, buf, pos, 1, "orvibo.record_count") + count = extractors["orvibo.record_count"]().value + while count > 0 do + pos = add_field_le(tree, buf, pos, 2, "orvibo.record_length") + pos = add_field_le(tree, buf, pos, 2, "orvibo.record") + pos = table_record_dissector[extractors["orvibo.table"]().value][extractors["orvibo.record"]().value](buf, pos, tree) + count = count - 1 + end + return pos +end + +function dissector_ts_query(buf, pos, tree) + pos = get_mac_and_padding(buf, pos, tree) + pos = add_field(tree, buf, pos, 4, "orvibo.cookie") + return pos +end + +orvibo_dissectors = { + rt = dissector_rt, + tm = dissector_tm, +} + +orvibo_dissectors_by_size = { + cl = { + [30] = { dissector_cl_query_from_controller_to_device, false, }, + [24] = { dissector_cl_response_from_device, true, }, + [29] = { dissector_cl_response_from_irda_gateway_to_controller, true, }, + [34] = { dissector_cl_response_from_gateway_to_device, true, }, + [70] = { dissector_cl_query_from_controller_to_gateway, false, }, + }, + cs = { + [26] = { dissector_cs_query, false, }, + [23] = { dissector_hb_response, true, }, + }, + dc = { + [23] = { dissector_device_standard_response, nil, }, + }, + dl = { + [34] = { dissector_dl_query, false, }, + [23] = { dissector_device_standard_response, true, }, + }, + gt = { + [24] = { dissector_gt_query, false, }, + [73] = { dissector_gt_response, true, }, + }, + hb = { + [22] = { dissector_hb_query, false, }, + [23] = { dissector_device_standard_response, true, }, + }, + lt = { + [10] = { dissector_lt_from_device_to_gateway, nil, }, + [18] = { dissector_lt_from_controller_to_device, nil, }, + }, + mp = { + [46] = { dissector_mp_query, false, }, + [35] = { dissector_mp_response_from_gw, true, }, + [23] = { dissector_device_standard_response, true, }, + }, + qa = { + [6] = { dissector_qa_query, false, }, + [42] = { dissector_qa_response, true, }, + }, + qg = { + [18] = { dissector_qg_query, false, }, + [42] = { dissector_qg_response, true, }, + }, + sf = { + [23] = { dissector_device_standard_response, true, }, + }, + rt = { + [29] = { dissector_rt_query_to_device, false, }, + }, + tm = { + [23] = { dissector_device_standard_response, true, }, + }, + ts = { + [34] = { dissector_ts_query, false, }, + [23] = { dissector_device_standard_response, true, }, + }, +} + +-- dissector + +action_table = {} + +function dissector_1st_pass(buf, pktinfo, root) + dprint2("orvibo.dissector 1 called") + -- determine query/response and local controller/gateway controller/device + local pktlen = buf:reported_length_remaining() + local opcode = buf(4,2):string() + if orvibo_dissectors_by_size[opcode] and + orvibo_dissectors_by_size[opcode][pktlen] ~= nil and + orvibo_dissectors_by_size[opcode][pktlen][2] ~= nil then + action_table[pktinfo.number] = orvibo_dissectors_by_size[opcode][pktlen][2] + return + end + if opcode == "rt" then + action_table[pktinfo.number] = true + return + end + if opcode == "tm" then + action_table[pktinfo.number] = true + return + end +end + +function dissector_2nd_pass(buf, pktinfo, root) + dprint2("orvibo.dissector 2 called") + pktinfo.cols.protocol:set("Orvibo") + local pktlen = buf:reported_length_remaining() + local tree = root:add(orvibo, buf:range(0,pktlen)) + + if pktlen < HDR_LEN then + tree:add_proto_expert_info(expert_fields["orvibo.expert.too_short"]) + dprint("packet ",pktinfo.number," length",pktlen,"too short") + return 0 + end + + header = buf(0,2):string() + tree:add(fields["orvibo.header_magic"], header) + if header ~= "hd" then + tree:add_proto_expert_info(expert_fields["orvibo.expert.bad_header"]) + end + + tree:add(fields["orvibo.length"], buf(2,2)) + if extractors["orvibo.length"]().value ~= pktlen then + tree:add_proto_expert_info(expert_fields["orvibo.expert.bad_length"]) + end + + local opcode = buf(4,2):string() + t = tree:add(fields["orvibo.opcode"], opcode) + if opcodes_type[opcode] then + TreeItem.append_text(t, " - " .. opcodes_type[opcode]) + end + + pos = HDR_LEN + + if orvibo_dissectors_by_size[opcode] and orvibo_dissectors_by_size[opcode][pktlen] then + -- dissectors based on payload size + pos = orvibo_dissectors_by_size[opcode][pktlen][1](buf, pos, tree) + elseif orvibo_dissectors[opcode] then + -- default dissectors + pos = orvibo_dissectors[opcode](buf, pos, tree) + else + tree:add_proto_expert_info(expert_fields["orvibo.expert.unknown_opcode"]) + end + + if pos ~= pktlen then + pos = add_field(tree, buf, pos, -1, "unknown", nil, "orvibo.expert.unknown_data") + end + + -- expert info and generated fields + local action = "" + if action_table[pktinfo.number] ~= nil then + tree:add(fields["orvibo.flags.action"], action_table[pktinfo.number]):set_generated() + if action_table[pktinfo.number] then + action = "response" + else + action = "query" + end + end + + state = "" + if extractors["orvibo.state"]() ~= nil then + state = " state " .. onoff_type[extractors["orvibo.state"]().value] + end + + -- column info + pktinfo.cols.info:set(opcode .. " " .. action .. state) + + return pktlen +end + +function orvibo.dissector(buf, pktinfo, root) + if not pktinfo.visited then + dissector_1st_pass(buf, pktinfo, root) + else + dissector_2nd_pass(buf, pktinfo, root) + end +end + +DissectorTable.get("udp.port"):add(default_settings.port, orvibo) + +-- we just check the header size and the magic header to catch as much as possible +-- packets. The purpose of this plugin is to reverse enginer the protocol and so +-- we need to accept also unknown and malformed packet +function heur_dissect_orvibo(buf,pktinfo,root) + dprint2("heur_dissect_orvibo called") + + if not default_settings.heur_enabled then + return false + end + + local pktlen = buf:reported_length_remaining() + + if pktlen < HDR_LEN then + return false + end + + header = buf(0,2):string() + if header == "hd" then + return true + end + + return false +end + +orvibo:register_heuristic("udp",heur_dissect_orvibo) diff --git a/dissectors/oscar-icq/LICENSE b/dissectors/oscar-icq/LICENSE new file mode 100644 index 0000000..23cb790 --- /dev/null +++ b/dissectors/oscar-icq/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. + + {description} + Copyright (C) {year} {fullname} + + 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. + +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) year 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. + + {signature of Ty Coon}, 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 Lesser General +Public License instead of this License. diff --git a/dissectors/oscar-icq/README.md b/dissectors/oscar-icq/README.md new file mode 100644 index 0000000..db69cfd --- /dev/null +++ b/dissectors/oscar-icq/README.md @@ -0,0 +1,55 @@ +# OSCAR / ICQ — messagerie instantanée + +Dissecteur Wireshark Lua du protocole **OSCAR** utilisé par ICQ (et AIM), +d'après la description http://iserverd.khstu.ru/oscar/ : + +- `flapp` : suite de paquets FLAP dans un segment TCP (port 5190) ; +- `flap` : en-tête FLAP (canal, numéro de séquence, longueur) ; +- `snac` : familles / sous-types SNAC ; +- `uib`, `uibtlv` : blocs d'informations utilisateur (TLV) ; +- `icqumsg` / `icqsmsg` : messages texte utilisateur → serveur et + serveur → utilisateur, avec le texte décodé. + +Filtre pour afficher les messages : `icqsmsg || icqumsg`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/luc-lynx/icq-dissector (fichier `oscar.lua`) | +| Commit importé | `9a1ecd72a0e510957ce41a89521e3faf23f3da09` du 12/01/2016 (branche `master`, dernier commit, qui est aussi la dernière modification de `oscar.lua`) | +| Licence amont | GPL-3.0-or-later d'après l'en-tête du fichier (« Copyright (C) 2016 Evgeny Sidorov » ; « either version 3 of the License, or (at your option) any later version ») — voir ci-dessous | +| Natif Wireshark 4.6.4 | Oui en partie — dissecteur natif `aim` (OSCAR, TCP 5190) et `icq` (ancien protocole UDP 4000) | + +**Licence : incohérence amont.** Le fichier `LICENSE` du dépôt amont +(licence GitHub « GPL-2.0 ») est le texte de la GPL v2, alors que +l'en-tête de `oscar.lua`, seul fichier de code, accorde la GPL v3 ou +ultérieure. L'en-tête, déclaration explicite de l'auteur pour ce fichier, +est retenu (`GPL-3.0-or-later`, compatible avec la GPL v3 du dépôt) ; le +`LICENSE` amont (GPL v2) est conservé ici tel quel pour traçabilité. Le +texte de la GPL v3 est celui du `LICENSE` à la racine de ce dépôt. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `oscar.lua` | Protocoles `flapp`, `flap`, `snac`, `uib`, `uibtlv`, `icqumsg`, `icqsmsg` ; `flapp` sur TCP 5190 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `oscar.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `flap`, `snac` ou `icqsmsg || icqumsg`. + +## Remarques + +- Doublon partiel du dissecteur natif `aim`, plus complet pour OSCAR : + ce script prend le port TCP 5190 à sa place ; son intérêt est + l'extraction directe du texte des messages ICQ. +- Script de 2016 : les serveurs ICQ / OSCAR historiques ont fermé ; utile + pour des captures anciennes ou des serveurs compatibles. Les connexions + chiffrées (TLS) ne sont pas lisibles. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/oscar-icq/oscar.lua b/dissectors/oscar-icq/oscar.lua new file mode 100644 index 0000000..7a309c8 --- /dev/null +++ b/dissectors/oscar-icq/oscar.lua @@ -0,0 +1,802 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/luc-lynx/icq-dissector (oscar.lua), +-- commit 9a1ecd72a0e510957ce41a89521e3faf23f3da09 du 12/01/2016. +-- Licence amont : GPL-3.0-or-later (en-tête du fichier ; LICENSE amont : GPL v2) — voir README.md. +-- Lua dissector for OSCAR protocol (http://iserverd.khstu.ru/oscar/) +-- Copyright (C) 2016 Evgeny Sidorov +-- +-- 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 3 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, see . + +local icq_msg_proto = Proto("icqumsg", "ICQ User to Server Text Messages") + +local icq_msg_channel = ProtoField.uint16("icqumsg.chn", "Message Channel", base.HEX) +local icq_msg_uin_len = ProtoField.uint8("icqumsg.uin_len", "Screenname string length", base.DEC) +local icq_msg_uin = ProtoField.string("icqumsg.uin", "Sender UIN") +local icq_msg_text = ProtoField.string("icqumsg.text", "Message Text") + +icq_msg_proto.fields = { icq_msg_channel, icq_msg_uin_len, icq_msg_uin, icq_msg_text } + +local icq_msg_channels = { + [0x0001] = "Plain text", + [0x0002] = "RTF Message", + [0x0004] = "Typed old-style messages" +} + +local unicode_russian = { + [0x0401] = "Ё", + [0x0410] = "A", + [0x0411] = "Б", + [0x0412] = "В", + [0x0413] = "Г", + [0x0414] = "Д", + [0x0415] = "Е", + [0x0416] = "Ж", + [0x0417] = "З", + [0x0418] = "И", + [0x0419] = "Й", + [0x041a] = "К", + [0x041b] = "Л", + [0x041c] = "М", + [0x041d] = "Н", + [0x041e] = "О", + [0x041f] = "П", + [0x0420] = "Р", + [0x0421] = "С", + [0x0422] = "Т", + [0x0423] = "У", + [0x0424] = "Ф", + [0x0425] = "Х", + [0x0426] = "Ц", + [0x0427] = "Ч", + [0x0428] = "Ш", + [0x0429] = "Щ", + [0x042a] = "Ъ", + [0x042b] = "Ы", + [0x042c] = "Ь", + [0x042d] = "Э", + [0x042e] = "Ю", + [0x042f] = "Я", + [0x0430] = "а", + [0x0431] = "б", + [0x0432] = "в", + [0x0433] = "г", + [0x0434] = "д", + [0x0435] = "е", + [0x0436] = "ж", + [0x0437] = "з", + [0x0438] = "и", + [0x0439] = "й", + [0x043a] = "к", + [0x043b] = "л", + [0x043c] = "м", + [0x043d] = "н", + [0x043e] = "о", + [0x043f] = "п", + [0x0440] = "р", + [0x0441] = "с", + [0x0442] = "т", + [0x0443] = "у", + [0x0444] = "ф", + [0x0445] = "х", + [0x0446] = "ц", + [0x0447] = "ч", + [0x0448] = "ш", + [0x0449] = "щ", + [0x044a] = "ъ", + [0x044b] = "ы", + [0x044c] = "ь", + [0x044d] = "э", + [0x044e] = "ю", + [0x044f] = "я" +} + +local cp1251_russian = { + [0xb8] = "ё", + [0xc0] = "А", + [0xc1] = "Б", + [0xc2] = "В", + [0xc3] = "Г", + [0xc4] = "Д", + [0xc5] = "Е", + [0xc6] = "Ж", + [0xc7] = "З", + [0xc8] = "И", + [0xc9] = "Й", + [0xca] = "К", + [0xcb] = "Л", + [0xcc] = "М", + [0xcd] = "Н", + [0xce] = "О", + [0xcf] = "П", + [0xd0] = "Р", + [0xd1] = "С", + [0xd2] = "Т", + [0xd3] = "У", + [0xd4] = "Ф", + [0xd5] = "Х", + [0xd6] = "Ц", + [0xd7] = "Ч", + [0xd8] = "Ш", + [0xd9] = "Щ", + [0xda] = "Ъ", + [0xdb] = "Ы", + [0xdc] = "Ь", + [0xdd] = "Э", + [0xde] = "Ю", + [0xdf] = "Я", + [0xe0] = "а", + [0xe1] = "б", + [0xe2] = "в", + [0xe3] = "г", + [0xe4] = "д", + [0xe5] = "е", + [0xe6] = "ж", + [0xe7] = "з", + [0xe8] = "и", + [0xe9] = "й", + [0xea] = "к", + [0xeb] = "л", + [0xec] = "м", + [0xed] = "н", + [0xee] = "о", + [0xef] = "п", + [0xf0] = "р", + [0xf1] = "с", + [0xf2] = "т", + [0xf3] = "у", + [0xf4] = "ф", + [0xf5] = "х", + [0xf6] = "ц", + [0xf7] = "ч", + [0xf8] = "ш", + [0xf9] = "щ", + [0xfa] = "ъ", + [0xfb] = "ы", + [0xfc] = "ь", + [0xfd] = "э", + [0xfe] = "ю", + [0xff] = "я" +} + +function get_string(buf) + if buf:len() == 0 then + return "" + end + + result = "" + for t = 0, buf:len() - 1, 1 do + local chr = buf(t, 1):uint() + if cp1251_russian[chr] ~= nil then + result = result .. cp1251_russian[chr] + else + result = result .. buf(t, 1):string() + end + end + return result +end + +function get_unicode_string(buf) + if buf:len() == 0 then + return "" + end + + result = "" + local ln = 0 + if buf:len() % 2 == 1 then + ln = ((buf:len() - 1) / 2) - 1 + else + ln = (buf:len() / 2) - 1 + end + + for t = 0, ln, 1 do + local fst = buf(2*t,1):uint() + if fst == 0x04 then + if unicode_russian[buf(2*t, 2):uint()] ~= nil then + result = result .. unicode_russian[buf(2*t, 2):uint()] + else + result = result .. "-" -- if not in russian code set + end + elseif fst == 0x00 then + result = result .. buf(2*t + 1, 1):string() + else + result = result .. "*" -- if "unknown" code set + end + end + return result +end + +function icq_msg_proto.dissector(buf, pinfo, tree) + if buf:len() == 0 then return end + + local subtree = tree:add(icq_msg_proto, "ICQ User to Server Message") + + local chn = buf(8,2):uint() + local chn_item = subtree:add(icq_msg_channel, buf(8,2)) + + if icq_msg_channels[chn] ~= nil then + chn_item:append_text(" - " .. icq_msg_channels[chn]) + end + + local uin_len = buf(10,1):uint() + subtree:add(icq_msg_uin_len, buf(10,1)) + subtree:add(icq_msg_uin, buf(11, uin_len)) + + local offset = 11 + uin_len + + if chn == 0x0001 then + offset = offset + 2 -- TLV.Type(0x02) - message data + offset = offset + 2 -- TLV.Length + offset = offset + 1 -- fragment identifier (array of required capabilities) + offset = offset + 1 -- fragment version + offset = offset + 2 + buf(offset, 2):uint() -- Length of rest data AND byte array of required capabilities (1 - text) + offset = offset + 1 -- fragment identifier (text message) + offset = offset + 1 -- fragment version + local text_len = buf(offset, 2):uint() - 4 -- Length of rest data - Message charset number - Message language number + offset = offset + 2 -- Length of rest data + offset = offset + 4 -- Message charset number AND Message language number + subtree:add(icq_msg_text, buf(offset, text_len)):set_text("Txt: " .. get_string(buf(offset, text_len))) + end +end + +-- ICQ Server to User Text Messages Dissector + +local icq_smsg_proto = Proto("icqsmsg", "ICQ Server to Text Messages") + +local icq_smsg_channel = ProtoField.uint16("icqsmsg.chn", "Message Channel", base.HEX) +local icq_smsg_uin_len = ProtoField.uint8("icqsmsg.uin_len", "Screenname string length", base.DEC) +local icq_smsg_uin = ProtoField.string("icqsmsg.uin", "Sender UIN") +local icq_smsg_tlv_num = ProtoField.uint16("icqsmsg.tlv_num", "Number of TLVs") +local icq_smsg_nick = ProtoField.string("icqsmsg.nick", "Sender nick") +local icq_smsg_tlv_len = ProtoField.uint16("icqsmsg.tlv_len", "Length of TLV with message", base.HEX) +local icq_smsg_req_cap_len = ProtoField.uint16("icqsmsg.req_cap_len", "\"byte array of required capabilities\" Length", base.HEX) +local icq_smsg_req_cap_arr = ProtoField.bytes("icqsmsg.req_cap_arr", "Byte array of required capabilities") +local icq_smsg_msg_tlv_len = ProtoField.uint16("icqsmsg.msg_tlv_len", "Message TLV Length", base.HEX) +local icq_smsg_msg_charset = ProtoField.uint16("icqsmsg.charset", "Message Text Charset", base.HEX) +local icq_smsg_msg_charset_subset = ProtoField.uint16("icqsmsg.charset_sub", "Message Text Charset Subset", base.HEX) +local icq_smsg_text = ProtoField.string("icqsmsg.text", "Message Text") + +icq_smsg_proto.fields = { + icq_smsg_channel, + icq_smsg_uin_len, + icq_smsg_uin, + icq_smsg_nick, + icq_smsg_tlv_num, + icq_smsg_tlv_len, + icq_smsg_req_cap_len, + icq_smsg_req_cap_arr, + icq_smsg_msg_tlv_len, + icq_smsg_msg_charset, + icq_smsg_msg_charset_subset, + icq_smsg_text +} + +function icq_smsg_proto.dissector(buf, pinfo, tree) + if buf:len() == 0 then return end + local subtree = tree:add(icq_smsg_proto, "ICQ Server to User Message") + + local chn = buf(8,2):uint() + subtree:add(icq_smsg_channel, buf(8,2)) + local uin_len = buf(10, 1):uint() + subtree:add(icq_smsg_uin_len, buf(10,1)) + subtree:add(icq_smsg_uin, buf(11, uin_len)) + local offset = 11 + uin_len + offset = offset + 2 -- warning level + local tlv_num = buf(offset, 2):uint() + subtree:add(icq_smsg_tlv_num, buf(offset, 2)) + offset = offset + 2 -- number of tlv + + if chn == 0x0001 then + for t = 0, tlv_num, 1 do + local tlv_type = buf(offset, 2):uint() + offset = offset + 2 + local tlv_len = buf(offset, 2):uint() + offset = offset + 2 + local old_offset = offset + if tlv_type == 0x0018 then + subtree:add(icq_smsg_nick, buf(offset, tlv_len)):append_text(" - Decoded nickname: " .. get_string(buf(offset, tlv_len))) + end + if tlv_type == 0x0002 then + local loc_offset = offset + loc_offset = loc_offset + 2 -- fragment id and fragment version + local fr_len = buf(loc_offset, 2):uint() + subtree:add(icq_smsg_req_cap_len, buf(loc_offset, 2)) + loc_offset = loc_offset + 2 -- length + subtree:add(icq_smsg_req_cap_arr, buf(offset, fr_len)) + loc_offset = loc_offset + fr_len + + loc_offset = loc_offset + 1 -- fragment id (msg text) + loc_offset = loc_offset + 1 -- fragment version + local text_len = buf(loc_offset, 2):uint() - 4 -- - Msg Charset and Msg Charset subset + subtree:add(icq_smsg_msg_tlv_len, buf(loc_offset, 2)) + loc_offset = loc_offset + 2 -- TLV.Length + subtree:add(icq_smsg_msg_charset, buf(loc_offset, 2)) + local chset = buf(loc_offset, 2):uint() + loc_offset = loc_offset + 2 -- Msg Charset + subtree:add(icq_smsg_msg_charset_subset, buf(loc_offset, 2)) + local chset_sub = buf(loc_offset, 2):uint() + loc_offset = loc_offset + 2 -- Msg Charset Subset + if (chset == 0x0000) then + subtree:add(icq_smsg_text, buf(loc_offset, text_len)):set_text("Txt: " .. get_string(buf(loc_offset, text_len))) + elseif (chset == 0x0002) then + subtree:add(icq_smsg_text, buf(loc_offset, text_len)):set_text("Txt: " .. get_unicode_string(buf(loc_offset, text_len))) + else + subtree:add(icq_smsg_text, buf(loc_offset, text_len)) + end + + loc_offset = loc_offset + text_len + end + offset = offset + tlv_len + end + end +end + + +-- User Info Block TLV Dissector + +local uibtlv_proto = Proto("uibtlv", "User Info Block TLV") +local uibtlv_type = ProtoField.uint16("uibtlv.type", "UIB TLV Type", base.HEX) +local uibtlv_len = ProtoField.uint16("uibtlv.len", "UIB TLV Length", base.HEX) +local uibtlv_data = ProtoField.bytes("uibtlv.data", "UIB TLV Data") + +uibtlv_proto.fields = { uibtlv_type, uibtlv_len, uibtlv_data } + +local tlv_types = { + [0x0001] = "User class (nick flags)", + [0x0002] = "Create time", + [0x0003] = "Sigon time (unix time_t format)", + [0x0004] = "Idle time (in seconds)", + [0x0005] = "Account creation time (member since)", + [0x0006] = "User status (ICQ Only)", + [0x000a] = "External IP Address (ICQ Only)", + [0x000c] = "User DC info (ICQ Only)", + [0x000d] = "Client capabilities", + [0x000f] = "Online time (in seconds)" +} + +function uibtlv_proto.dissector(buf, pinfo, tree) + if buf:len() == 0 then return end + + local subtree = tree:add(uibtlv_proto, "TLV Chain element") + local type_item = subtree:add(uibtlv_type, buf(0,2)) + if tlv_types[buf(0,2):uint()] ~= nil then + type_item:append_text(" - " .. tlv_types[buf(0,2):uint()]) + end + local ln = buf(2,2):uint() + subtree:add(uibtlv_len, buf(2,2)) + subtree:add(uibtlv_data, buf(4, ln)) +end + +-- User Info Block dissector +local uib_proto = Proto("uib", "User Info Block") +local uib_uin_len = ProtoField.uint8("uib.uin_len", "UIN length", base.DEC) +local uib_uin = ProtoField.string("uib.uin", "UIN") +local uib_wl = ProtoField.uint16("uib.wl", "Warning level", base.HEX) +local uib_tlv_num = ProtoField.uint16("uib.tlv_num", "Number of TLV's", base.DEC) +local uib_tlv_data = ProtoField.bytes("uib.tlv_data", "User Info Blocks TLVs") + +uib_proto.fields = { uib_uin_len, uib_uin, uib_wl, uib_tlv_num, uib_tlv_data } + +function uib_proto.dissector(buf, pinfo, tree) + if buf:len() == 0 then return end + local subtree = tree:add(uib_proto, "User Info Block") + local ln = buf(0,1):uint() + subtree:add(uib_uin_len, buf(0,1)) + subtree:add(uib_uin, buf(1, ln)) + subtree:add(uib_wl, buf(ln+1,2)) + subtree:add(uib_tlv_num, buf(ln+3, 2)) + subtree:add(uib_tlv_data, buf(ln+5, buf:len() - ln - 5)) + + pinfo.cols.info = tostring(pinfo.cols.info) .. " - UIN: " .. (buf(1, ln):string()) .. "; " + + local count = buf(ln + 3, 2):uint() - 1 + local total_len = 0 + local buf_start = ln + 5 + for t = 0, count, 1 do + total_len = buf(buf_start + 2, 2):uint() + 2 + 2 -- word + word + len + local uibtlv_diss = Dissector.get("uibtlv") + uibtlv_diss:call(buf(buf_start, total_len):tvb(), pinfo, subtree) + buf_start = buf_start + total_len + end +end + +-- SNAC Protocol dissector +local snac_proto = Proto("snac", "SNAC protocol") +local snac_service_id = ProtoField.uint16("snac.service_id", "Family (service) id number", base.HEX) +local snac_subtype_id = ProtoField.uint16("snac.subtype_id", "Family subtype id number", base.HEX) +local snac_flags = ProtoField.uint16("snac.flags", "SNAC flags", base.HEX) +local snac_request_id = ProtoField.uint32("snac.request_id", "SNAC request id", base.HEX) +local snac_data = ProtoField.bytes("snac.data", "SNAC data") + +snac_proto.fields = { snac_service_id, snac_subtype_id, snac_flags, snac_request_id, snac_data } + +local general_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Client is now online and ready for normal function", + [0x0003] = "Server supported snac families list", + [0x0004] = "Request for new service", + [0x0005] = "Redirect (for 0x0004 subtype)", + [0x0006] = "Request rate limits information", + [0x0007] = "Rate limits information response", + [0x0008] = "Add rate limits group", + [0x0009] = "Delete rate limits group", + [0x000a] = "Rate information changed / rate limit warning", + [0x000b] = "Server pause command", + [0x000c] = "Client pause ack", + [0x000d] = "Server resume command", + [0x000e] = "Request own online information", + [0x000f] = "Requested online info response", + [0x0010] = "Evil notification", + [0x0011] = "Set idle time", + [0x0012] = "Migration notice and info", + [0x0013] = "Message of the day (MOTD)", + [0x0014] = "Set privacy flags", + [0x0015] = "Well known urls", + [0x0016] = "No operation (NOP)", + [0x0017] = "Request server services versions", + [0x0018] = "Server services versions", + [0x001e] = "Set status (set location info)", + [0x001f] = "Client verification request", + [0x0020] = "Client verification reply", + [0x0021] = "Client's extended status from server" +} + +local location_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Request limitations/params", + [0x0003] = "Limitations/params response", + [0x0004] = "Set user information", + [0x0005] = "Request user info", + [0x0006] = "User information response", + [0x0007] = "Watcher sub request", + [0x0008] = "Watcher notification", + [0x0009] = "Update directory info request", + [0x000A] = "Update directory info reply", + [0x000B] = "Query for SNAC(02,0C)", + [0x000C] = "Reply to SNAC(02,0B)", + [0x000F] = "Update user directory interests", + [0x0010] = "Update user directory interests reply", + [0x0015] = "User info query" +} + +local management_srv = { + [0x0001] = "Client/server error", + [0x0002] = "Request limitations/params", + [0x0003] = "Limitations/params responce", + [0x0004] = "Add buddy(s) to contact list", + [0x0005] = "Remove buddy(ies) from contact", + [0x0006] = "Query for list of watchers", + [0x0007] = "Requested watchers list", + [0x0008] = "Watcher sub request", + [0x0009] = "Watcher notification", + [0x000a] = "Notification rejected", + [0x000b] = "User online notification", + [0x000c] = "User offline notification" +} + +local messages_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Set ICBM parameters", + [0x0003] = "Reset ICBM parameters", + [0x0004] = "Request parameters info", + [0x0005] = "Requested parameters info response", + [0x0006] = "Send message thru server", + [0x0007] = "Message for client from server", + [0x0008] = "Evil request", + [0x0009] = "Server evil ack", + [0x000a] = "Missed call (msg not delivered)", + [0x000b] = "Client/server message error or data", + [0x000c] = "Server message ack", + [0x0014] = "Mini typing notifications (MTN)" +} + +local invitation_srv = { + [0x0001] = "Client server error", + [0x0002] = "Invite a friend to join AIM", + [0x0003] = " Invitation server ack" +} + +local administrative_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Request account info", + [0x0003] = "Requested account info", + [0x0004] = "Change account info (screenname, password) request", + [0x0005] = "Change account info ack", + [0x0006] = "Account confirm request", + [0x0007] = "Account confirm ack", + [0x0008] = "Account delete request", + [0x0009] = "Account delete ack" +} + +local popup_srv = { + [0x0001] = "Client server error", + [0x0002] = "Display popup message server command" +} + +local pricacy_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Request service parameters", + [0x0003] = "Requested service parameters", + [0x0004] = "Set group permissions mask", + [0x0005] = "Add to visible list", + [0x0006] = "Delete from visible list", + [0x0007] = "Add to invisible list", + [0x0008] = "Delete from invisible list", + [0x0009] = "Service error", + [0x000A] = "Add to visible list (?)", + [0x000B] = "Delete from visible list (?)" +} + +local lookup_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Search user by email", + [0x0003] = "Search response" +} + +local stats_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Set minimum report interval", + [0x0003] = "Usage stats report", + [0x0004] = "Usage stats report ack" +} + +local chat_navigation_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Request limits", + [0x0003] = "Request exchange information", + [0x0004] = "Request room information", + [0x0005] = "Request extended room information", + [0x0006] = "Request member list", + [0x0007] = "Search for room", + [0x0008] = "Create room", + [0x0009] = "Requested information response" +} + +local chat_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Room information update", + [0x0003] = "Users joined notification", + [0x0004] = "Users left notification", + [0x0005] = "Channel message from client", + [0x0006] = "Channel message to client", + [0x0007] = "Evil request", + [0x0008] = "Evil reply", + [0x0009] = "Chat error or data" +} + +local buddy_icons_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Upload your icon to server", + [0x0003] = "Server ack for icon upload", + [0x0004] = "Request buddy icon from server (AIM only)", + [0x0005] = "Server response to a buddy icon request (AIM only)", + [0x0006] = "Request buddy icon from server (ICQ)", + [0x0007] = "Server response to a buddy icon request (ICQ)" +} + +local server_side_srv = { + [0x0001] = "Client / server error", + [0x0002] = "Request service parameters", + [0x0003] = "Service parameters reply", + [0x0004] = "Request contact list (first time)", + [0x0005] = "Contact list checkout", + [0x0006] = "Server contact list reply", + [0x0007] = "Load server contact list (after login)", + [0x0008] = "SSI edit: add item(s)", + [0x0009] = "SSI edit: update group header", + [0x000a] = "SSI edit: remove item", + [0x000e] = "SSI edit server ack", + [0x000f] = "client local SSI is up-to-date", + [0x0011] = "Contacts edit start (begin transaction)", + [0x0012] = "Contacts edit end (finish transaction)", + [0x0014] = "Grant future authorization to client", + [0x0015] = "Future authorization granted", + [0x0016] = "Delete yourself from another client server contact", + [0x0018] = "Send authorization request", + [0x0019] = "Authorization request", + [0x001a] = "Send authorization reply", + [0x001b] = "Authorization reply", + [0x001c] = "\"You were added\" message" +} + +local auth_srv = { + [0x0001] = "Server error (registration refused)", + [0x0002] = "Client login request (md5 login sequence)", + [0x0003] = "Server login reply / error reply", + [0x0004] = "Request new uin", + [0x0005] = "New uin response", + [0x0006] = "Request md5 authkey", + [0x0007] = "Server md5 authkey response", + [0x000a] = "Server SecureID request", + [0x000b] = "Client SecureID reply" +} + +local snac_srv = { + [0x0001] = general_srv, + [0x0002] = location_srv, + [0x0003] = management_srv, + [0x0004] = messages_srv, + [0x0006] = invitation_srv, + [0x0007] = administrative_srv, + [0x0008] = popup_srv, + [0x0009] = pricacy_srv, + [0x000a] = lookup_srv, + [0x000b] = stats_srv, + [0x000d] = chat_navigation_srv, + [0x000e] = chat_srv, + [0x0010] = buddy_icons_srv, + [0x0013] = server_side_srv, + [0x0017] = auth_srv +} + +local snac_srv_names = { + [0x0001] = "Generic service controls", + [0x0002] = "Location services", + [0x0003] = "Buddy List management service", + [0x0004] = "ICBM (messages) service", + [0x0005] = "Advertisements service", + [0x0006] = "Invitation service", + [0x0007] = "Administrative service", + [0x0008] = "Popup notices service", + [0x0009] = "Privacy management service", + [0x000a] = "User lookup service (not used any more)", + [0x000b] = "Usage stats service", + [0x000c] = "Translation service", + [0x000d] = "Chat navigation service", + [0x000e] = "Chat service", + [0x000f] = "Directory user search", + [0x0010] = "Server-stored buddy icons (SSBI) service", + [0x0013] = "Server Side Information (SSI) service", + [0x0015] = "ICQ specific extensions service", + [0x0017] = "Authorization/registration service", + [0x0085] = "Broadcast service - IServerd extension" +} + +function snac_proto.dissector(buf, pinfo, tree) + if buf:len() == 0 then return end + + local subtree = tree:add(snac_proto, "SNAC Protocol data") + local srv_id = buf(0,2):uint() + local msg_id = buf(2,2):int() + + if snac_srv[srv_id] ~= nil then + local t_srv = subtree:add(snac_service_id, buf(0,2)) + t_srv:append_text(" - " .. snac_srv_names[srv_id]) + + if (snac_srv[srv_id])[msg_id] ~= nil then + local t_msg = subtree:add(snac_subtype_id, buf(2,2)) + t_msg:append_text(" - " .. (snac_srv[srv_id])[msg_id]) + pinfo.cols.info = tostring(pinfo.cols.info) .. " SNAC - " .. (snac_srv[srv_id])[msg_id] + else + subtree:add(snac_subtype_id, buf(2,2)) + end + else + subtree:add(snac_service_id, buf(0,2)) + subtree:add(snac_subtype_id, buf(2,2)) + end + + subtree:add(snac_flags, buf(4,2)) + subtree:add(snac_request_id, buf(6,4)) + subtree:add(snac_data, buf(10, buf:len() - 10)) + + if (srv_id == 0x0001 and msg_id == 0x000f) then + uib_diss = Dissector.get("uib") + uib_diss:call(buf(10 + 8):tvb(), pinfo, tree) + end + + if (srv_id == 0x0003 and (msg_id == 0x000b or msg_id == 0x000c)) then + uib_diss = Dissector.get("uib") + uib_diss:call(buf(10):tvb(), pinfo, tree) + end + + if (srv_id == 0x0004 and msg_id == 0x0006) then + icqmsg_diss = Dissector.get("icqumsg") + icqmsg_diss:call(buf(10):tvb(), pinfo, tree) + end + + if (srv_id == 0x0004 and msg_id == 0x0007) then + icqsmsg_diss = Dissector.get("icqsmsg") + icqsmsg_diss:call(buf(10):tvb(), pinfo, tree) + end +end + +-- FLAP Protocol dissector +local flap_proto = Proto("flap", "FLAP protocol") + +local flap_packet_types = { + [0x01] = "New Connection Negotiation", + [0x02] = "SNAC data", + [0x03] = "FLAP-level Error", + [0x04] = "Close Connection Negotiation", + [0x05] = "Keep alive" +} + +local flap_proto_magic = ProtoField.uint8("flap.magic", "FLAP Magic", base.HEX) +local flap_proto_channel = ProtoField.uint8("flap.channel", "FLAP Channel", base.HEX, packet_types) +local flap_datagram_seq_number = ProtoField.uint16("flap.seq_num", "FLAP Datagram seq number", base.HEX) +local flap_data_size = ProtoField.uint16("flap.data_size", "FLAP Data size", base.HEX) +local flap_data = ProtoField.bytes("flap.data", "FLAP Data") + +flap_proto.fields = { flap_proto_magic, flap_proto_channel, flap_datagram_seq_number, flap_data_size, flap_data } + +function flap_proto.dissector(buf, pinfo, tree) + if buf:len() == 0 then return end + local mag = buf(0,1):uint() + + local type_str = flap_packet_types[buf(1,1):uint()] + if type_str == nil then type_str = "Unknown" end + + pinfo.cols.protocol = flap_proto.name + subtree = tree:add(flap_proto, buf(0)) + + if mag == 0x2A then + if buf(1,1):uint() ~= 0x02 then + pinfo.cols.info = tostring(pinfo.cols.info) .. " Type: " .. type_str + end + subtree:add(flap_proto_magic, buf(0,1)) + subtree:add(flap_proto_channel, buf(1,1)) + subtree:add(flap_datagram_seq_number, buf(2,2)) + local chn = buf(1,1):uint() + subtree:add(flap_data_size, buf(4,2)) + local data_len = buf(4,2):uint() + subtree:add(flap_data, buf(6, data_len)) + --subtree:add(flap_data, buf(6, buf:len() - 6)) + + if chn == 2 then + local snac_diss = Dissector.get("snac") + --if snac_diss ~= nil then + snac_diss:call(buf(6):tvb(),pinfo,subtree) + --end + end + else + pinfo.cols.info = tostring(pinfo.cols.info) .. string.format(" Unknown version of FLAP Protocol. Magic: (0x%02x)", mag) + subtree:append_text(string.format(", Unknown version of FLAP Protocol. Magic: (0x%02x)", mag)) + end +end + +local flap_packets_proto = Proto("flapp", "Bunch of FLAP Packets") +local flap_packets_data = ProtoField.bytes("flapp.data", "Bunch of FLAP Packets Data") + +flap_packets_proto.fields = { flap_packets_data } + +function flap_packets_proto.dissector(buf, pinfo, tree) + if buf:len() == 0 then return end + + pinfo.cols.protocol = flap_packets_proto.name + pinfo.cols.info = "" + + subtree = tree:add(flap_packets_proto, buf(0)) + subtree:add(flap_packets_data, buf(0)) + + local start = 0 + local ln = 0 + while start < buf:len() do + flap_diss = Dissector.get("flap") + if buf(start, 1):uint() == 0x2A then + ln = buf(start + 4,2):uint() + 6 -- magic + channel + seq_num + data size value + if ln > buf:len() - start then -- workaround =) + flap_diss:call(buf(start):tvb(), pinfo, tree) + else + flap_diss:call(buf(start, ln):tvb(), pinfo, tree) + end + start = start + ln + else + flap_diss:call(buf(start):tvb(), pinfo, tree) + start = buf:len() + end + end +end + + +local tcp_dissector_table = DissectorTable.get("tcp.port") +tcp_dissector_table:add(5190, flap_packets_proto) diff --git a/dissectors/oss7-dash7/LICENSE b/dissectors/oss7-dash7/LICENSE new file mode 100644 index 0000000..5b2db15 --- /dev/null +++ b/dissectors/oss7-dash7/LICENSE @@ -0,0 +1,14 @@ +Copyright 2015 University of Antwerp + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + diff --git a/dissectors/oss7-dash7/README.md b/dissectors/oss7-dash7/README.md new file mode 100644 index 0000000..3a69956 --- /dev/null +++ b/dissectors/oss7-dash7/README.md @@ -0,0 +1,51 @@ +# OSS-7 / DASH7 Alliance Protocol (capteurs sans fil sub-GHz) + +Dissecteur Wireshark Lua des trames radio **DASH7 Alliance Protocol** +(brouillon 1.0) telles que journalisées par la pile libre **OSS-7** +(University of Antwerp) : en-tête de journalisation (type de paquet, TX / +RX, horodatage, canal, classe de mot de synchronisation, puissance +d'émission ou RSSI / LQI), puis couche liaison DLL (longueur, sous-réseau, +contrôle, adresse cible, CRC), couche réseau NWL (contrôle, saut, origine +et destination, sécurité / authentification) et couche transport (contrôle +de dialogue, identifiants, gabarits d'accusé, charge utile). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/octa-connect/Octa-stack (fichier `tools/wireshark-dissector/oss7-wireshark-dissector.lua`) | +| Commit importé | `19cc45a65b5b0a5adcd37f35aa0a22e381cf519a` du 24/03/2016 (branche `master`, dernier commit ; dernière modification du dissecteur : `2fc7c7d` du 25/08/2015) | +| Licence amont | Apache-2.0 (`LICENSE` amont : avis « Copyright 2015 University of Antwerp — Licensed under the Apache License, Version 2.0 » couvrant le dépôt ; README : « © 2015-2016, University of Antwerp and others ») | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur DASH7 natif | + +Le `LICENSE` amont (copié ici) ne contient que l'avis Apache-2.0 ; texte +complet de la licence : https://www.apache.org/licenses/LICENSE-2.0. + +Octa-stack est une copie de la pile OSS-7 (projet DASH7 open source de +l'University of Antwerp), arrêtée en 2016 ; le dissecteur y est resté au +stade du brouillon 1.0 du protocole. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `oss7-wireshark-dissector.lua` | Protocole `oss7_proto` (encapsulation `wtap.USER0`) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. Non importé : le journaliseur +Python `tools/PyLogger/` qui produit les captures. + +## Utilisation + +Copier `oss7-wireshark-dissector.lua` dans le dossier `plugins` de +Wireshark (ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins +Lua, puis ouvrir une capture produite par le journaliseur OSS-7 (type de +lien DLT USER0) et filtrer avec `oss7_proto`. + +## Remarques + +- Champ `oss7_proto.debug_var` (« test ») et description « DRAFT 1.0 test » + hérités de l'amont : dissecteur de mise au point, non finalisé. +- Ne suit pas les révisions ultérieures du protocole DASH7 (1.1, 1.2). +- Globales `oss7_proto` et `wtap_encap` comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/oss7-dash7/oss7-wireshark-dissector.lua b/dissectors/oss7-dash7/oss7-wireshark-dissector.lua new file mode 100644 index 0000000..b534448 --- /dev/null +++ b/dissectors/oss7-dash7/oss7-wireshark-dissector.lua @@ -0,0 +1,228 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/octa-connect/Octa-stack (tools/wireshark-dissector/oss7-wireshark-dissector.lua), +-- commit 19cc45a65b5b0a5adcd37f35aa0a22e381cf519a du 24/03/2016. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +oss7_proto = Proto("oss7_proto", "DASH7 Alliance Protocol DRAFT 1.0 test") + +local f = oss7_proto.fields + +f.start = ProtoField.uint32("oss7_proto.start", "Start") +f.test = ProtoField.uint32("oss7_proto.debug_var", "Debug Variable") + +f.packet_type = ProtoField.uint32("oss7_proto.packet_type", "Packet Type") +f.timestamp = ProtoField.uint32("oss7_proto.timestamp", "Timestamp") +f.channel_header_raw = ProtoField.uint8("oss7_proto.channel_header_raw", "Raw Channel Header") +f.center_freq_index = ProtoField.uint16("oss7_proto.center_freq_index", "Center Frequency Index") +f.syncword_class = ProtoField.uint8("oss7_proto.syncword_class", "Syncword Class", base.HEX) + +f.crc = ProtoField.uint16("oss7_proto.crc", "CRC", base.HEX) + +-- TX only +f.tx_eirp = ProtoField.uint8("oss7_proto.dll.control.tx_eirp", "TX EIRP") + +-- RX only +f.rssi = ProtoField.int16("oss7_proto.rssi", "RSSI") +f.lqi = ProtoField.uint8("oss7_proto.lqi", "Link Quality Indicator") + +f.dll_length = ProtoField.uint8("oss7_proto.dll.length", "Length") +f.dll_subnet = ProtoField.uint8("oss7_proto.dll.subnet", "Subnet", base.HEX) +f.dll_control = ProtoField.uint8("oss7_proto.dll.control", "Control", base.HEX) +f.dll_tadr = ProtoField.bytes("oss7_proto.dll.tadr", "Target Address") +f.dll_payload = ProtoField.bytes("oss7_proto.dll.payload", "Payload") +f.dll_crc = ProtoField.uint16("oss7_proto.dll.crc", "CRC", base.HEX) + +f.dll_control_tgt = ProtoField.bool("oss7_proto.dll.control.tgt", "Target Address Present") +f.dll_control_vid = ProtoField.bool("oss7_proto.dll.control.vid", "Virtual ID") +f.dll_control_eirp = ProtoField.uint8("oss7_proto.dll.control.control_eirp", "CONTROL EIRP") + +f.nwl_control = ProtoField.uint8("oss7_proto.nwl.control", "Control", base.HEX) +f.nwl_payload = ProtoField.bytes("oss7_proto.nwl.payload", "Payload") + +--optional +f.nwl_hopping_control = ProtoField.bytes("oss7_proto.nwl.hopping_control", "Hopping Control") +f.nwl_intermediary_access_id = ProtoField.bytes("oss7_proto.nwl.intermediary_access_id", "Intermediary Access ID") +f.nwl_destination_access_id = ProtoField.bytes("oss7_proto.nwl.destination_access_id", "Destination Access ID") +f.nwl_origin_access_id = ProtoField.bytes("oss7_proto.nwl.origin_access_id", "Origin Access ID") +f.nwl_security_header = ProtoField.bytes("oss7_proto.nwl.security_hdr", "Security Header") +f.nwl_auth_data = ProtoField.bytes("oss7_proto.nwl.auth_data", "Authentication Data") + +f.nwl_ctrl_nls = ProtoField.bool("oss7_proto.nwl.control.nls", "Network Layer Security Present") +f.nwl_ctrl_hop = ProtoField.bool("oss7_proto.nwl.control.hop", "Multi-hop enable") +f.nwl_ctrl_ori_id = ProtoField.bool("oss7_proto.nwl.control.ori_id", "Origin Access ID Present") +f.nwl_ctrl_ori_vid = ProtoField.bool("oss7_proto.nwl.control.ori_vid", "Origin Access ID Contains VID") +f.nwl_ctrl_ori_cl = ProtoField.uint8("oss7_proto.nwl.control.ori_cl", "Origin Access Class") + +--optional +f.nwl_hctrl_rfu = ProtoField.uint8("oss7_proto.nwl.hoppingcontrol.rfu", "RFU") +f.nwl_hctrl_nrhop = ProtoField.bool("oss7_proto.nwl.hoppingcontrol.nrhop", "Hopping Counter (no-hop & one-hop)") +f.nwl_hctrl_int_id = ProtoField.bool("oss7_proto.nwl.hoppingcontrol.int_id", "Intermediary Access ID Present") +f.nwl_hctrl_int_vid = ProtoField.bool("oss7_proto.nwl.hoppingcontrol.int_vid", "Intermediary Access ID is VID") +f.nwl_hctrl_int_cl = ProtoField.uint8("oss7_proto.nwl.hoppingcontrol.int_cl", "Intermediary Access Class") +f.nwl_hctrl_dst_id = ProtoField.bool("oss7_proto.nwl.hoppingcontrol.dst_id", "Destination Access ID Present") +f.nwl_hctrl_dst_id = ProtoField.bool("oss7_proto.nwl.hoppingcontrol.dst_vid", "Destination Access ID is VID") +f.nwl_hctrl_dst_cl = ProtoField.uint8("oss7_proto.nwl.hoppingcontrol.dst_cl", "Destination Access Class") + +--TODO: Security Header & Footer + +--optional (initizalization vector) +f.nwl_auth_nlcf = ProtoField.uint8("oss7_proto.nwl.auth.nlcf", "Network Layer Control Field") +f.nwl_auth_origin_address = ProtoField.bytes("oss7_proto.nwl.auth.origin_address", "Origin Address") +f.nwl_auth_frame_counter = ProtoField.bytes("oss7_proto.nwl.auth.frame_counter", "Frame Counter") +f.nwl_auth_key_counter = ProtoField.uint8("oss7_proto.nwl.auth.key_counter", "Key Counter") +f.nwl_auth_payload_length = ProtoField.uint8("oss7_proto.nwl.auth.payload_length", "Payload Length") +f.nwl_auth_payload_destination_address = ProtoField.uint8("oss7_proto.nwl.auth.destination_address", "XOR'ed Destination Address or Subnet") + +f.trans_ctrl = ProtoField.uint8("oss7_proto.trans.ctrl", "Control Field", base.HEX) +f.trans_dialog_id = ProtoField.uint8("oss7_proto.trans.dialog_id", "Dialog ID", base.HEX) +f.trans_tran_id = ProtoField.uint8("oss7_proto.trans.tran_id", "Transaction ID", base.HEX) +f.trans_timeout_templ = ProtoField.uint8("oss7_proto.trans.timeout_templ", "Timeout Template") +f.trans_ack_templ = ProtoField.bytes("oss7_proto.trans.ack_templ", "Acknowledge Template") +f.trans_payload= ProtoField.bytes("oss7_proto.trans.payload", "Payload") + +f.trans_ctrl_start = ProtoField.bool("oss7_proto.trans.ctrl.start", "Request New Dialog") +f.trans_ctrl_stop = ProtoField.bool("oss7_proto.trans.ctrl.stop", "Last Transaction of Dialog") +f.trans_ctrl_timeout = ProtoField.bool("oss7_proto.trans.ctrl.timeout", "Timeout Template Present") +f.trans_ctrl_rfu = ProtoField.bool("oss7_proto.trans.ctrl.rfu", "RFU") +f.trans_ctrl_ack_req = ProtoField.bool("oss7_proto.trans.ctrl.ack_req", "Acknowledge Return Template Requested") +f.trans_ctrl_ack_not_void = ProtoField.bool("oss7_proto.trans.ctrl.ack_not_void", "ACK Bitmap Non-empty") +f.trans_ctrl_ack_record = ProtoField.bool("oss7_proto.trans.ctrl.ack_record", "Record ACK Bitmap") +f.trans_ctrl_ack_tpl = ProtoField.bool("oss7_proto.trans.ctrl.ack_tpl", "Acknowledge Return Template Present") + +function oss7_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "DASH7 Alliance Protocol DRAFT 1.0" + + -- Parse extra bytes from phy_rx -> (rssi and lqi) + local subtree = tree:add(oss7_proto, buffer()) + local offset = 0 + local type = 0 + + -- DLL subtree + local dll_subtree = subtree:add("Data Link Layer", nil) + -- Length + dll_subtree:add(f.dll_length, buffer(offset, 1):int()) + local payload_length = buffer(offset, 1):int() + 1 - 2 -- headers will be removed later + + offset = offset + 1 + -- Subnet + dll_subtree:add(f.dll_subnet, buffer(offset, 1)) + offset = offset + 1 + -- Control + dll_subtree:add(f.dll_control, buffer(offset, 1)) + + local dll_control_subtree = dll_subtree:add("DLL Control", nil) + dll_control_subtree:add(f.dll_control_tgt, buffer(offset, 1):uint() / 128 ) + dll_control_subtree:add(f.dll_control_vid, buffer(offset, 1):uint() % 128 / 64 ) + dll_control_subtree:add(f.dll_control_eirp, buffer(offset, 1):uint() % 64 ):append_text(" dBm") -- % 64) - 32 + + offset = offset + 1 + + if f.dll_control_tgt == 1 then + if f.dll_control_vid == 1 then + dll_subtree:add(f.dll_tadr, buffer(offset, 2)) -- 2 & 8 switched around? + offset = offset + 2 + else + dll_subtree:add(f.dll_tadr, buffer(offset, 8)) + offset = offset + 8 + end + pinfo.cols.dst = f.dll_tadr + else + pinfo.cols.dst = "BROADCAST" + end + + + -- length of payload is the length of the packet - 2 (CRC) - (the already parsed bytes (offset) - the RX header (3)) + payload_length = payload_length - offset -- - 3) - 1 -- removed -1 + + local payload = buffer(offset, payload_length) + --dll_subtree:add(f.dll_payload, payload) + offset = offset + payload_length + + local crc = buffer(offset, 2) + + -- todo check CRC + + -- Network Layer + local nwl_subtree = dll_subtree:add("Network Layer", nil) + local nwl_offset = 0 + + nwl_subtree:add(f.nwl_control, payload(nwl_offset, 1)) + nwl_offset = nwl_offset + 1 + + local nwl_control_subtree = nwl_subtree:add("NWL Control", nil) + nwl_control_subtree:add(f.nwl_ctrl_nls, payload(nwl_offset, 1):uint() / 128 ) + nwl_control_subtree:add(f.nwl_ctrl_hop, payload(nwl_offset, 1):uint() % 128 / 64 ) + + local nwl_ctrl_ori_id = payload(nwl_offset, 1):uint() % 64 / 32 + nwl_control_subtree:add(f.nwl_ctrl_ori_id, nwl_ctrl_ori_id ) + + local nwl_ctrl_ori_vid = payload(nwl_offset, 1):uint() % 32 / 16 + nwl_control_subtree:add(f.nwl_ctrl_ori_vid, nwl_ctrl_ori_vid ) + + nwl_control_subtree:add(f.nwl_ctrl_ori_cl, payload(nwl_offset, 1):uint() % 16 ) + + -- for some reason, rounding is necessary here + nwl_ctrl_ori_id = math.floor(nwl_ctrl_ori_id + 0.5) + nwl_ctrl_ori_vid = math.floor(nwl_ctrl_ori_vid + 0.5) + + if nwl_ctrl_ori_id == 1 then + nwl_subtree:add(f.test, 4) + + if nwl_ctrl_ori_vid == 1 then + nwl_subtree:add(f.nwl_origin_access_id, payload(nwl_offset, 2)) + nwl_offset = nwl_offset + 2 + else + nwl_subtree:add(f.nwl_origin_access_id, payload(nwl_offset, 8)) + nwl_offset = nwl_offset + 8 + end + + end + + --todo: optional nwl + + payload_length = payload_length - nwl_offset + + local nwl_payload = payload(nwl_offset, payload_length) +-- nwl_subtree:add(f.nwl_payload, nwl_payload) + + -- Transport Layer + + local trans_subtree = nwl_subtree:add("Transport Layer", nil) + local trans_offset = 0 + + trans_subtree:add(f.trans_ctrl, nwl_payload(trans_offset, 1)) + + local trans_ctrl_subtree = trans_subtree:add("Control", nil) + trans_ctrl_subtree:add(f.trans_ctrl_start, nwl_payload(trans_offset, 1):uint() / 128) + trans_ctrl_subtree:add(f.trans_ctrl_stop, nwl_payload(trans_offset, 1):uint() % 128 / 64) + trans_ctrl_subtree:add(f.trans_ctrl_timeout, nwl_payload(trans_offset, 1):uint() % 64 / 32) + trans_ctrl_subtree:add(f.trans_ctrl_rfu, nwl_payload(trans_offset, 1):uint() % 32 / 16) + trans_ctrl_subtree:add(f.trans_ctrl_ack_req, nwl_payload(trans_offset, 1):uint() % 16 / 8) + trans_ctrl_subtree:add(f.trans_ctrl_ack_not_void, nwl_payload(trans_offset, 1):uint() % 8 / 4) + trans_ctrl_subtree:add(f.trans_ctrl_ack_record, nwl_payload(trans_offset, 1):uint() % 4 / 2) + trans_ctrl_subtree:add(f.trans_ctrl_ack_tpl, nwl_payload(trans_offset, 1):uint() % 2) + + trans_offset = trans_offset + 1 + + trans_subtree:add(f.trans_dialog_id, nwl_payload(trans_offset, 1)) + trans_offset = trans_offset + 1 + + trans_subtree:add(f.trans_tran_id, nwl_payload(trans_offset, 1)) + trans_offset = trans_offset + 1 + + if f.trans_ctrl_timeout == 1 then + trans_subtree:add(f.trans_timeout_templ, nwl_payload(trans_offset, 1)) + trans_offset = trans_offset + 1 + end + + payload_length = payload_length - trans_offset + + local trans_payload = nwl_payload(trans_offset, payload_length) + + trans_subtree:add(f.trans_payload,trans_payload) + dll_subtree:add(f.crc, crc) + + +end + +wtap_encap = DissectorTable.get("wtap_encap") +wtap_encap:add(wtap.USER0, oss7_proto) diff --git a/dissectors/ouroboros-network/LICENSE b/dissectors/ouroboros-network/LICENSE new file mode 100644 index 0000000..f433b1a --- /dev/null +++ b/dissectors/ouroboros-network/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/dissectors/ouroboros-network/NOTICE b/dissectors/ouroboros-network/NOTICE new file mode 100644 index 0000000..025f8f9 --- /dev/null +++ b/dissectors/ouroboros-network/NOTICE @@ -0,0 +1,14 @@ +Copyright 2019-2023 Input Output Global Inc (IOG), 2023-2026 Intersect + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/dissectors/ouroboros-network/README.md b/dissectors/ouroboros-network/README.md new file mode 100644 index 0000000..2bcc80e --- /dev/null +++ b/dissectors/ouroboros-network/README.md @@ -0,0 +1,52 @@ +# Ouroboros Network — réseau pair-à-pair de Cardano + +Dissecteurs Wireshark Lua de la pile réseau **Ouroboros** de Cardano +(projet IntersectMBO, ex-IOG) : + +- `ouroboros_network.lua` : protocole `ouroboros` — en-tête de + multiplexage (horodatage de transmission, identifiant de mini-protocole + et sens initiateur / répondeur, longueur), réassemblage TCP, noms des + messages des mini-protocoles Handshake, ChainSync, BlockFetch, + TxSubmission, KeepAlive et Peer Sharing (DeltaQueue nommé), puis charge + utile CBOR passée au dissecteur **CBOR** natif ; port TCP 6061 + (préférence) ; +- `mux.lua` : protocole `mux` (« LeiosDemo ») — uniquement les SDU de + multiplexage (en-tête et charge utile brute) pour la démonstration Leios + de `network-mux` ; port TCP 4000. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/IntersectMBO/ouroboros-network (fichiers `ouroboros-network/wireshark-plugin/ouroboros_network.lua` et `network-mux/wireshark-plugin/mux.lua`) | +| Commit importé | `4646039f05eb809bd5252af17121644ec1dc0c2c` du 22/10/2026 (branche `main`, dernier commit ; dernières modifications : `ouroboros_network.lua` `85fe17d` du 28/11/2025, `mux.lua` `a22595a` du 12/05/2026) | +| Licence amont | Apache-2.0 (fichiers `LICENSE` des paquets `ouroboros-network` et `network-mux`, copié ici ; `NOTICE` : « Copyright 2019-2023 Input Output Global Inc (IOG), 2023-2026 Intersect », copié ici) ; les scripts n'ont pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Ouroboros / Cardano natif (le décodage CBOR est natif) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `ouroboros_network.lua` | Protocole `ouroboros`, TCP 6061 | +| `mux.lua` | Protocole `mux` (SDU seuls), TCP 4000 ; renvoie aussi une table de module (`dissectMux`…) | +| `LICENSE`, `NOTICE` | Licence Apache 2.0 et avis de copyright amont | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête des `.lua`. + +## Utilisation + +Copier le ou les scripts dans le dossier `plugins` de Wireshark (amont : +`~/.config/wireshark/plugins/`), puis filtrer avec `ouroboros` ou `mux`. +Pour un nœud Cardano réel (port 3001 en général), régler le port dans les +préférences du protocole Ouroboros ou utiliser « Décoder comme… ». + +## Remarques + +- Le port par défaut 6061 est provisoire (commentaire amont « XXX Should + be something else »). Les deux scripts décodent le même en-tête de + multiplexage : ne les activer que sur des ports différents. +- Les commentaires d'installation de `mux.lua` citent un ancien chemin + (`network-mux/demo/mux-leios-demo.lua`). +- La variable `cbor` est globale, comme dans l'amont. Pas de capture + d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/ouroboros-network/mux.lua b/dissectors/ouroboros-network/mux.lua new file mode 100644 index 0000000..d49dbc7 --- /dev/null +++ b/dissectors/ouroboros-network/mux.lua @@ -0,0 +1,153 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/IntersectMBO/ouroboros-network (network-mux/wireshark-plugin/mux.lua), +-- commit 4646039f05eb809bd5252af17121644ec1dc0c2c du 22/10/2026. +-- Licence amont : Apache-2.0 (ouroboros-network/LICENSE amont) — voir README.md. +-- WireShark mux disector +-- +-- It is based on the +-- ./ouroboros-network/wireshark-plugin/ouroboros_network.lua +-- But it only dissects MuxSDU's, not protocol messages carries inside of it. +-- +-- To install the pluging, create a symbolic link: +-- ```bash +-- ls -s $(pwd)/network-mux/demo/mux-leios-demo.lua $HOME/.config/wireshark/plugins/mux-leios-demo.lua +-- ``` + +local default_settings = { + -- the port used by `./network-mux/demo/mux-leios-demo.sh` + port = 4000, + -- a range of mini-protocol numbers is used to check if we parsed a valid + -- MuxSDU header. This is important when TCP segments are lost, and we need + -- to skip bytes until we find a begining of a new MuxSDU. + min_mini_protocol_num = 1, + max_mini_protocol_num = 15, +} + +local MUX_HDR_LEN = 8 + +local mux = Proto("Mux", "LeiosDemo") + +local mux_transmission_time = ProtoField.new ("mux.time", "mux.time", ftypes.UINT32) +local mux_mini_protocol = ProtoField.uint16("mux.mini-protocol-num", "min-protocol-num", base.HEX) +local mux_length = ProtoField.new ("mux.length", "mux.length", ftypes.UINT16) +local mux_payload = ProtoField.bytes("mux.payload", "mux.payload", base.NONE) + +mux.fields = { + mux_transmission_time, + mux_mini_protocol, + mux_length, + mux_payload +} + + +function mux.dissector(tvbuf, pktinfo, root) + + local pktlen = tvbuf:len() + local offset = 0 + local total = 0 + + -- Parse possibly multiple MuxSDU's in the TCP segment. + while offset < pktlen do + local result = dissectMux(tvbuf, pktinfo, offset, false) + if result.mux_length > 0 then + -- A compate MuxSDU was parsed. + pktinfo.cols.protocol = mux.name + local subtree = root:add(mux, tvbuf(offset, result.mux_length), + string.format("mux (%u bytes)", result.mux_length)) + subtree:add(mux_transmission_time, result.transmission_time_buf) + subtree:add(mux_mini_protocol, result.mini_protocol_num_buf) + subtree:add(mux_length, result.len_buf) + subtree:add(mux_payload, result.payload_buf) + + -- advance offset and total for the while loop + offset = offset + result.mux_length + total = total + result.mux_length + + elseif result.mux_length < 0 then + -- We need more bytes to parse current MuxSDU. + pktinfo.desegment_offset = offset + pktinfo.desegment_len = -result.mux_length + return + + else + -- some error + break + end + end + + return total +end + +-- A generic helper function which disects a single message. It returns +-- a record with +-- +-- ``` +-- { mux_length +-- , transmission_time_buf +-- , mini_protocol_num_buf +-- , len_buf +-- , payload_buf +-- } +-- ``` +-- `mux_length` is +-- * positive length of used input bytes on success +-- * negative number of needed bytes if more data is required +-- +dissectMux = function (tvbuf, pktinfo, offset, skipping_bytes) + local pktlen = tvbuf:len() + local msglen = pktlen - offset + + if msglen < MUX_HDR_LEN then + if skipping_bytes then + -- we tried to resync by skipping bytes, but we didn't get it right. + -- We'll skip this packet. There's still a chance that we just missed + -- a few bytes... + return { mux_length = 0 } + else + -- Not enough data to read the header, we need at least one more segmet. + local need = MUX_HDR_LEN - msglen + return { mux_length = -need } + end + end + + local transmission_time_buf = tvbuf:range(offset, 4) -- 4-byte timestamp + local mini_protocol_num_buf = tvbuf:range(offset + 4, 2) -- 2-byte conv id + local len_buf = tvbuf:range(offset + 6, 2) -- 2-byte SDU payload length + local len = len_buf:uint() + + -- A simple sanity check on mini-protocol numbers. + -- + -- When TCP segments are lost, we need to skip until we find the begining of + -- next MuxSDU. + local mini_protocol_num = mini_protocol_num_buf:uint() & 0x7fff + if mini_protocol_num < default_settings.min_mini_protocol_num + or mini_protocol_num > default_settings.max_mini_protocol_num then + return dissectMux(tvbuf, pktinfo, offset + 1, true) + end + + local mux_length = MUX_HDR_LEN + len + if msglen < mux_length then + -- not enough data for the whole payload, ask for the rest + local need = mux_length - msglen + return { mux_length = -need } + end + local payload_buf = tvbuf(offset + 8, len) + + return { mux_length = mux_length + , transmission_time_buf = transmission_time_buf + , mini_protocol_num_buf = mini_protocol_num_buf + , len_buf = len_buf + , payload_buf = payload_buf + } +end + +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(default_settings.port, mux) + + +-- Export the `mux` dissector, `dissectMux` helper function, and MuxSDU header +-- length constant. +return { mux = mux + , dissectMux = dissectMux + , muxHdrLen = MUX_HDR_LEN + } diff --git a/dissectors/ouroboros-network/ouroboros_network.lua b/dissectors/ouroboros-network/ouroboros_network.lua new file mode 100644 index 0000000..fe2999a --- /dev/null +++ b/dissectors/ouroboros-network/ouroboros_network.lua @@ -0,0 +1,217 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/IntersectMBO/ouroboros-network (ouroboros-network/wireshark-plugin/ouroboros_network.lua), +-- commit 4646039f05eb809bd5252af17121644ec1dc0c2c du 22/10/2026. +-- Licence amont : Apache-2.0 (ouroboros-network/LICENSE amont) — voir README.md. +cbor = Dissector.get("cbor") + +local default_settings = +{ + port = 6061 -- XXX Should be somethig else +} + +local ouroboros = Proto("Ouroboros", "Ouroboros") + +local on_transmission_time = ProtoField.new ("Transmission Time", "ouroboros.ts", ftypes.UINT32) +local on_length = ProtoField.new ("Length", "ouroboros.length", ftypes.UINT16) + +local conv_ids = { + [0x0000] = "Handshake Initiator", + [0x8000] = "Handshake Responder", + [0x0001] = "DeltaQueue Initiator", + [0x8001] = "DeltaQueue Responder", + [0x0002] = "ChainSync Initiator", + [0x8002] = "ChainSync Responder", + [0x0003] = "BlockFetch Initiator", + [0x8003] = "BlockFetch Responder", + [0x8004] = "TxSubmission Responder", + [0x0004] = "TxSubmission Initiator", + [0x8008] = "KeepAlive Responder", + [0x0008] = "KeepAlive Initiator", + [0x800a] = "Peer Sharing Responder", + [0x000a] = "Peer Sharing Initiator" +} +local on_conversation = ProtoField.uint16("ouroboros.conv", "Conversation", base.HEX, conv_ids, nil, "Conversation ids") + +local handshake_msg_codes = { + [0] = "MsgProposeVersions", + [1] = "MsgAcceptVersion", + [2] = "MsgRefuse", + [3] = "MsgQueryReply" +} +local on_handshake_msg = ProtoField.uint8("ouroboros.handshakemsg", "Handshake Message", base.DEC, handshake_msg_codes, nil, "Handshake Message Types") + +local chainsync_msg_codes = { + [0] = "MsgRequestNext", + [1] = "MsgAwaitReply", + [2] = "MsgRollForward", + [3] = "MsgRollBackward", + [4] = "MsgFindIntersect", + [5] = "MsgIntersectFound", + [6] = "MsgIntersectNotFound", + [7] = "MsgDone" +} + +local on_chainsync_msg = ProtoField.uint8("ouroboros.chainmsg", "ChainSync Message", base.DEC, chainsync_msg_codes, nil, "ChainSync Message Types") + +local blockfetch_msg_codes = { + [0] = "MsgRequestRange", + [1] = "MsgClientDone", + [2] = "MsgStartBatch", + [3] = "MsgNoBlocks", + [4] = "MsgBlock", + [5] = "MsgBatchDone" +} + +local on_blockfetch_msg = ProtoField.uint8("ouroboros.blockmsg", "BlockFetch Message", base.DEC, blockfetch_msg_codes, nil, "BlockFetch Message Types") + +local txsubmission_msg_codes = { + [0] = "MsgRequestTxIds", + [1] = "MsgReplyTxIds", + [2] = "MsgRequestTxs", + [3] = "MsgReplyTxs", + [4] = "MsgDone", + [6] = "MsgHello" +} + +local on_txsubmission_msg = ProtoField.uint8("ouroboros.txsubmsg", "TxSubmission Message", base.DEC, txsubmission_msg_codes, nil, "TxSubmission Message Types") + +local ON_HDR_LEN = 8 + +local keepalive_msg_codes = { + [0] = "MsgKeepAlive", + [1] = "MsgKeepAliveResponse", + [2] = "MsgDone" +} + +local on_keepalive_msg = ProtoField.uint8("ouroboros.keepalivemsg", "KeepAlive Message", base.DEC, keepalive_msg_codes, nil, "KeepAlive Message Types") + +local peersharing_msg_codes = { + [0] = "MsgShareRequest", + [1] = "MsgSharePeers", + [2] = "MsgDone" +} + +local on_peersharing_msg = ProtoField.uint8("ouroboros.peersharingmsg", "PeerSharing Message", base.DEC, peersharing_msg_codes, nil, "PeerSharing Message Types") + +local on_cbor_payload = ProtoField.bytes("ouroboros.cbor_payload", + "CBOR payload (raw)", base.NONE) + +ouroboros.fields = { + on_transmission_time, + on_conversation, + on_length, + on_handshake_msg, + on_chainsync_msg, + on_blockfetch_msg, + on_txsubmission_msg, + on_keepalive_msg, + on_peersharing_msg, + on_cbor_payload +} + + +function ouroboros.dissector(tvbuf, pktinfo, root) + + local pktlen = tvbuf:len() + local offset = 0 + local total = 0 + + while offset < pktlen do + result = dissectOuroboros(tvbuf, pktinfo, root, offset) + if result > 0 then + -- We parsed an Ouroboros message + offset = offset + result + total = total + result + elseif result < 0 then + -- we need more bytes for current frame + pktinfo.desegment_offset = offset + pktinfo.desegment_len = -result + return -result + else + -- some error + break + end + end + + return total +end + +dissectOuroboros = function (tvbuf, pktinfo, root, offset) + + local pktlen = tvbuf:len() + local msglen = pktlen - offset + + if msglen < ON_HDR_LEN then + -- Not enough data to read the header, we need at least one more segmet. + local need = ON_HDR_LEN - msglen + return -need + end + + local ts_buf = tvbuf:range(offset, 4) -- 4-byte timestamp + local conv_buf = tvbuf:range(offset + 4, 2) -- 2-byte conv id + local len_buf = tvbuf:range(offset + 6, 2) -- 2-byte CBOR length + + local ts = ts_buf:uint() + local convId = conv_buf:uint() + local len = len_buf:uint() + + local total_len = ON_HDR_LEN + len + if msglen < total_len then + -- Not enough data for the whole payload, ask for the rest + local need = total_len - msglen + return -need + end + + -- We have a complete mux frame. + pktinfo.cols.protocol = ouroboros.name + + local subtree = root:add(ouroboros, tvbuf(offset, total_len), + string.format("Ouroboros (%u bytes)", total_len)) + subtree:add(on_transmission_time, ts_buf) + subtree:add(on_conversation, conv_buf) + subtree:add(on_length, len_buf) + + if on_cbor_payload then + subtree:add(on_cbor_payload, tvbuf(offset + ON_HDR_LEN, len)) + end + + if len > 0 then + local miniProt = nil + local miniVal = convId & 0x7fff + + if miniVal == 0 then miniProt = on_handshake_msg + elseif miniVal == 2 then miniProt = on_chainsync_msg + elseif miniVal == 3 then miniProt = on_blockfetch_msg + elseif miniVal == 4 then miniProt = on_txsubmission_msg + elseif miniVal == 8 then miniProt = on_keepalive_msg + elseif miniVal == 10 then miniProt = on_peersharing_msg + end + + if miniProt and len > 1 then + subtree:add(miniProt, tvbuf(offset + ON_HDR_LEN + 1, 1)) + end + + + if not cbor then + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, "CBOR dissector not found") + else + local cbor_tvb = tvbuf:range(offset + ON_HDR_LEN, len):tvb() + local success, err = pcall(function() + cbor:call(cbor_tvb, pktinfo, subtree) + end) + + if not success then + subtree:add_expert_info(PI_MALFORMED, PI_WARN, + "Possible partial CBOR message") + end + end + end + + return total_len + +end + +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(6061, ouroboros) + +-- vim: noexpandtab diff --git a/dissectors/p25cai/LICENSE b/dissectors/p25cai/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/dissectors/p25cai/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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) + + 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. + +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) year 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 Lesser General +Public License instead of this License. diff --git a/dissectors/p25cai/README.md b/dissectors/p25cai/README.md new file mode 100644 index 0000000..07b8af3 --- /dev/null +++ b/dissectors/p25cai/README.md @@ -0,0 +1,102 @@ +# P25 CAI — APCO Project 25 (interface radio) + +Dissecteur Wireshark Lua des trames **APCO Project 25 Common Air +Interface** (radio professionnelle numérique FDMA), telles qu'op25 les +transmet en UDP (port 23456, option `-W` de `rx.py`). Il traite la +synchronisation de trame et les symboles d'état, le NID (NAC, DUID) et les +unités de données : HDU (MI, MFID, ALGID, KID, groupe de conversation), TDU, +LDU1 et LDU2 (trames vocales IMBE, Link Control, Encryption Sync, LSD), TSDU +(blocs TSBK) et TDU avec Link Control. C'est un portage en Lua de +`packet-p25cai.c` d'op25 (issue #508). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ryanchapman/p25_wireshark (`lua/p25cai.lua`), **dépôt archivé** | +| Commit importé | `3d3c4492e11e02f7ebbda1adf5386d746438c425` du 10/03/2026 (dernier commit de la branche par défaut `main`) ; dernière modification de `p25cai.lua` : commit `c1da792aebfeb9e4d476f9956b4e972146a664f6` du 26/05/2025 | +| Licence amont | GPL-2.0 ou toute version ultérieure (en-tête du fichier, d'après `packet-p25cai.c`, © 2008 Michael Ossmann) ; `LICENSE` du dépôt = texte de la GPLv2. Compatible avec la licence de ce dépôt (GPL-3.0-or-later) | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur P25 CAI dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +Dissecteurs voisins dans ce dépôt : `dfsi-cai` (CAI transporté en RTP par +l'interface DFSI) et `quantar-sqd` (liaisons V.24 des stations Quantar). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/p25cai.lua` | Protocole `p25cai` (« P25 CAI ») sur UDP 23456 ; préférences `p25cai.port`, `p25cai.enabled` et `p25cai.debug` | + +## Utilisation + +Le script exige le module **`inspect.lua`** (https://github.com/kikito/inspect.lua, +licence MIT), non fourni ici : sans ce module, le chargement échoue +(`module 'inspect' not found`, ligne 51). Le module est chargé mais n'est +utilisé nulle part dans le script. Copier `inspect.lua` et +`src/p25cai.lua` dans le dossier des plugins Lua personnels de Wireshark +(« Aide › À propos de Wireshark › Dossiers »), ou `inspect.lua` dans un +dossier du `package.path` de Lua, puis Ctrl+Maj+L. Le script exige +Wireshark 4.4 au minimum. + +```sh +tshark -X lua_script:p25cai.lua -o p25cai.port:30000 -r capture.pcap -Y p25cai +``` + +Filtres : `p25cai`, `p25cai.hdu`, `p25cai.ldu1`, `p25cai.ldu2`, +`p25cai.tsbk`, `p25cai.lcf`, `p25cai.algid == 0x80` (clair), +`p25cai.algid == 0xaa` (ADP), `p25cai.imbe`. + +## Vérification à l'import + +tshark 4.6.4 (Lua 5.4), avec `inspect.lua` de kikito à côté du script. +Captures synthétiques UDP construites selon la structure lue par le script +(FS `5575f5ff77ff`, NID, mots de Golay 18,6 non corrigés, un symbole d'état +tous les 35 dibits) : + +| Essai | Résultat | +|---|---| +| HDU en clair, MI `010203…09`, groupe 0x1234 | `Header Data Unit` ; ALGID `Unencrypted message (0x80)`, `Talk Group ID: … (4660) (0x1234)` ; **MI affiché `000203…09`** | +| HDU ADP, KID 0x00bb, groupe 0x0042 | ALGID `Motorola ADP (40 bit RC4) (0xaa)`, KID et groupe corrects ; premier octet du MI forcé à `00` | +| TDU (DUID 3) | `Terminator without Link Control` | +| DUID 9 | `Unknown Data Unit (0x09)` | +| Trame de 7 octets | laissée à UDP (moins de 14 octets) | +| HDU tronqué (40 octets) | arbre HDU vide, sans erreur affichée ; seul le journal de débogage montre `Range is out of bounds` | +| UDP 30000 | décodé seulement avec `-o p25cai.port:30000` | + +LDU1, LDU2, TSDU et PDU n'ont pas été vérifiés (pas de capture op25 +réelle). + +## Limites constatées + +- **Premier octet du MI toujours nul** : la fausse correction + Reed-Solomon `rs_36_20_17_decode` (ligne 656) recopie les indices 1 à 15 + alors que le tampon du HDU commence à l'indice 0. `rs_24_12_13_decode` + (Link Control des LDU1 et des TDU-LC) et `rs_24_16_9_decode` + (Encryption Sync du LDU2, redéfinie ligne 1197) bouclent elles aussi de + 1 à n. Leur effet dépend de l'indexation de chaque appelant (lignes + 1130, 1275 et 1375) et n'a pas été vérifié. +- Aucune correction d'erreur : Golay, Hamming, cyclique et Reed-Solomon + sont des extractions de bits (« Fake error correction decoders », + ligne 625), comme dans le C d'origine ; une trame bruitée est affichée + telle quelle. +- **Journal de débogage sur la sortie standard** : niveau par défaut + `Level 2` (ligne 63), soit une ligne `Lua[p25cai]: dissect() returned + true` par paquet en plus des lignes de chargement. `-o + p25cai.debug:Disabled` ne l'arrête pas, car `reset_debug_level` + (ligne 111) ne remet jamais `dprint` à vide. Cela pollue les sorties + `tshark` (`-T fields`, `-T json`…). +- Les erreurs de dissection sont absorbées par `pcall` (ligne 1619) : un + paquet tronqué donne un arbre incomplet sans « Malformed Packet » ni + info d'expert. +- PDU (DUID 0xC) non décodé (ligne 1592) ; champs source et destination + du LDU1 non extraits (TODO amont) ; seul l'UDP d'op25 est pris en charge, + sans heuristique. +- Fonctions définies deux fois (`cyclic_16_8_5_decode` lignes 639 et 1150, + ainsi que `rs_24_16_9_decode` et `hamming_10_6_3_decode`) ; variables + globales `build_term_lc_tvb`, `byte_to_binary`, `print_tvb_bytes`, + `ptbf_item`. diff --git a/dissectors/p25cai/src/p25cai.lua b/dissectors/p25cai/src/p25cai.lua new file mode 100644 index 0000000..7faa137 --- /dev/null +++ b/dissectors/p25cai/src/p25cai.lua @@ -0,0 +1,1637 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later +-- Importé de https://github.com/ryanchapman/p25_wireshark (lua/p25cai.lua), +-- commit 3d3c4492e11e02f7ebbda1adf5386d746438c425 du 10/03/2026 (dernière modification du fichier : +-- commit c1da792aebfeb9e4d476f9956b4e972146a664f6 du 26/05/2025). +-- Licence amont : GPL-2.0 ou ultérieure (en-tête du fichier, LICENSE du dépôt) — voir README.md et LICENSE. +-- p25cai.lua +-- Wireshark dissector for APCO Project 25 Common Air Interface +-- +-- Ryan A. Chapman +-- Friday, April 25, 2025 +-- +-- +-- This lua implementation is based on packet-p25cai.c in the op25 project +-- https://gitea.osmocom.org/op25/op25-legacy.git +-- op25-legacy/wireshark/plugins/p25/packet-p25cai.c +-- +-- Routines for APCO Project 25 Common Air Interface dissection +-- Copyright 2008, 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. +-- +-- The general structure, debug, and prefs of this lua script are based +-- on dns_dissector.lua, which can be found in the Wireshark repo under +-- test/lua/dns_dissector.lua +-- +-- -- script-name: dns_dissector.lua +-- +-- -- author: Hadriel Kaplan +-- -- Copyright (c) 2014, Hadriel Kaplan +-- -- This code is in the Public Domain, or the BSD (3 clause) license if +-- -- Public Domain does not apply in your country. +-- + + +local inspect = require("inspect") + +-- do not modify this table +local debug_level = { + DISABLED = 0, + LEVEL_1 = 1, + LEVEL_2 = 2 +} + +-- set this DEBUG to debug_level.LEVEL_1 to enable printing debug_level info +-- set it to debug_level.LEVEL_2 to enable really verbose printing +-- note: this will be overridden by user's preference settings +local DEBUG = debug_level.LEVEL_2 + +local default_settings = + { + debug_level = DEBUG, + port = 23456, + enabled = true, + } + +-- for testing purposes, we want to be able to pass in changes to the defaults +-- from the command line; because you can't set lua preferences from the command +-- line using the '-o' switch (the preferences don't exist until this script is +-- loaded, so the command line thinks they're invalid preferences being set) +-- so we pass them in as command arguments insetad, and handle it here +-- +-- example: tshark -V -r /tmp/p25_tsdu.pcapng -X lua_script:`pwd`/p25cai.lua -X lua_script1:debug_level=LEVEL_2 -X lua_script1:port=1234 +if not gui_enabled() then + local args={...} -- get passed-in args + if args and #args > 0 then + for _, arg in ipairs(args) do + local name, value = arg:match("(.+)=(.+)") + if name and value then + if tonumber(value) then + value = tonumber(value) + elseif value == "true" or value == "TRUE" then + value = true + elseif value == "false" or value == "FALSE" then + value = false + elseif value == "DISABLED" then + value = debug_level.DISABLED + elseif value == "LEVEL_1" then + value = debug_level.LEVEL_1 + elseif value == "LEVEL_2" then + value = debug_level.LEVEL_2 + else + error("invalid commandline argument value") + end + else + error("invalid commandline argument syntax, want K=V, got " .. arg) + end + + default_settings[name] = value + end + end +end + +local dprint = function() end +local dprint2 = function() end +local function reset_debug_level() + if default_settings.debug_level > debug_level.DISABLED then + dprint = function(...) + io.write(table.concat({"Lua[p25cai]:", ...}," ")) + io.write("\n") + end + + if default_settings.debug_level > debug_level.LEVEL_1 then + dprint2 = dprint + end + end +end +-- call it now +reset_debug_level() + +dprint2("Wireshark version = ", get_version()) +dprint2("Lua version = ", _VERSION) + +local major, minor, micro = get_version():match("(%d+)%.(%d+)%.(%d+)") +if major and tonumber(major) <= 4 and ((tonumber(minor) <= 3) or (tonumber(minor) == 4 and tonumber(micro) < 0)) then + error( "Sorry, but your Wireshark/Tshark version ("..get_version()..") is too old for this script!\n".. + "This script needs Wireshark/Tshark version 4.4.0 or higher.\n" ) +end + +-- more sanity checking +-- verify we have the ProtoExpert class in wireshark, as that's the newest thing this file uses +assert(ProtoExpert.new, "Wireshark does not have the ProtoExpert class, so it's too old - get the latest 1.11.3 or higher") + + +-- Constants +local FRAME_SYNC_MAGIC = 0x5575F5FF77FF + +data_unit_ids = { + [0x0] = "Header Data Unit", + [0x3] = "Terminator without Link Control", + [0x5] = "Logical Link Data Unit 1", + [0x7] = "Trunking Signaling Data Unit", + [0xA] = "Logical Link Data Unit 2", + [0xC] = "Packet Data Unit", + [0xF] = "Terminator with Link Control" +} + +network_access_codes = { + [0x293] = "Default NAC", + [0xF7E] = "Receiver to open on any NAC", + [0xF7F] = "Repeater to receive and retransmit any NAC" +} + +manufacturer_ids = { + -- From https://connect.tiaonline.org/viewdocument/mfid-assignments-2016-01-27 + [0x00] = "Standard MFID (pre-2001)", + [0x01] = "Standard MFID (post-2001)", + [0x09] = "Aselsan Inc.", + [0x10] = "BK Radio (fka Relm)", + [0x18] = "Airbus (fka EADS Public Safety Inc.)", + [0x20] = "Cycomm", + [0x28] = "Efratom Time and Frequency Products, Inc", + [0x30] = "Com-Net Ericsson", + [0x34] = "Etherstack", + [0x38] = "Datron", + [0x40] = "Icom", + [0x48] = "Garmin", + [0x50] = "GTE", + [0x55] = "IFR Systems", + [0x5A] = "INIT Innovations in Transportation, Inc", + [0x60] = "GEC-Marconi", + [0x64] = "Harris Corporation (inactive)", + [0x68] = "Kenwood Communications", + [0x70] = "Glenayre Electronics", + [0x74] = "Japan Radio Co.", + [0x78] = "Kokusai", + [0x7C] = "Maxon", + [0x80] = "Midland", + [0x86] = "Daniels Electronics Ltd.", + [0x90] = "Motorola", + [0xA0] = "Thales", + [0xA4] = "Harris Corporation (fka Tyco, M/A-COM, Com-Net Ericsson, Ericsson)", + [0xAA] = "National Regional Planning Council (NRPC)", + [0xB0] = "Raytheon", + [0xC0] = "SEA", + [0xC8] = "Securicor", + [0xD0] = "ADI", + [0xD8] = "Tait Electronics", + [0xE0] = "Teletec", + [0xF0] = "EF Johnson (fka Transcrypt International)", + [0xF8] = "Vertex Standard", + [0xFC] = "Zetron, Inc" +} + +link_control_formats = { + [0x00] = "Group Call Format", + [0x03] = "Individual Call Format", + [0x80] = "Encrypted Group Call Format", + [0x83] = "Encrypted Individual Call Format" +} + +link_control_opcodes = { + -- From AABF + [0x00] = "Group Voice Channel User (LCGVR)", + [0x01] = "Reserved", + [0x02] = "Group Voice Channel Update (LCGVU)", + [0x03] = "Unit to Unit Voice Channel User (LCUVR)", + [0x04] = "Group Voice Channel Update - Explicit (LCGVUX)", + [0x05] = "Unit to Unit Answer Request (LCUAQ)", + [0x06] = "Telephone Interconnect Voice Channel User (LCTVR)", + [0x07] = "Telephone Interconnect Answer Request (LCTAQ)", + [0x08] = "Reserved", + [0x09] = "Reserved", + [0x0A] = "Reserved", + [0x0B] = "Reserved", + [0x0C] = "Reserved", + [0x0D] = "Reserved", + [0x0E] = "Reserved", + [0x0F] = "Call Termination/Cancellation (LCCT)", + [0x10] = "Group Affiliation Query (LCGAQ)", + [0x11] = "Unit Registration Command (LCRC)", + [0x12] = "Unit Authentication Command (LCAC)", + [0x13] = "Status Query (LCSQ)", + [0x14] = "Status Update (LCSU)", + [0x15] = "Message Update (LCMU)", + [0x16] = "Call Alert (LCCA)", + [0x17] = "Extended Function Command (LCEFC)", + [0x18] = "Channel Identifier Update (LCCIU)", + [0x19] = "Channel Identifier Update - Explicit (LCCIUX)", + [0x1A] = "Reserved", + [0x1B] = "Reserved", + [0x1C] = "Reserved", + [0x1D] = "Reserved", + [0x1E] = "Reserved", + [0x1F] = "Reserved", + [0x20] = "System Service Broadcast (LCSSB)", + [0x21] = "Secondary Control Channel Broadcast (LCSCB)", + [0x22] = "Adjacent Site Status Broadcast (LCASB)", + [0x23] = "RFSS Status Broadcast (LCRSB)", + [0x24] = "Network Status Broadcast (LCNSB)", + [0x25] = "Protection Parameter Broadcast (LCPPB)", + [0x26] = "Secondary Control Channel Broadcast - Explicit (LCSCBX)", + [0x27] = "Adjacent Site Status Broadcast - Explicit (LCASBX)", + [0x28] = "RFSS Status Broadcast - Explicit (LCRSBX)", + [0x29] = "Network Status Broadcast - Explicit (LCNSBX)", + [0x2A] = "Reserved", + [0x2B] = "Reserved", + [0x2C] = "Reserved", + [0x2D] = "Reserved", + [0x2E] = "Reserved", + [0x2F] = "Reserved", + [0x30] = "Reserved", + [0x31] = "Reserved", + [0x32] = "Reserved", + [0x33] = "Reserved", + [0x34] = "Reserved", + [0x35] = "Reserved", + [0x36] = "Reserved", + [0x37] = "Reserved", + [0x38] = "Reserved", + [0x39] = "Reserved", + [0x3A] = "Reserved", + [0x3B] = "Reserved", + [0x3C] = "Reserved", + [0x3D] = "Reserved", + [0x3E] = "Reserved", + [0x3F] = "Reserved", +} + +talk_group_ids = { + {0x0000, 0x0000, "No One (used for individual calls)"}, + {0x0001, 0x0001, "Default Talk Group (used in systems with no other talk groups defined)"}, + {0x0002, 0xFFFE, "Regular Talk Group"}, + {0xFFFF, 0xFFFF, "Everyone"}, +} + +key_ids = { + [0x0000] = "Default Key ID" +} + +algorithm_ids = { + -- From http://ftp.tiaonline.org/TR-8/TR815/Public/ALGID_Guide_040528.doc + -- Type I + [0x00] = "ACCORDION 1.3", + [0x01] = "BATON (Auto Even)", + [0x02] = "FIREFLY Type 1", + [0x03] = "MAYFLY Type 1", + [0x04] = "SAVILLE", + [0x05] = "Motorola Assigned - PADSTONE", + [0x41] = "BATON (Auto Odd)", + -- Type III + [0x80] = "Unencrypted message", + [0x81] = "DES-OFB, 56 bit key", + [0x82] = "2 key Triple DES", + [0x83] = "3 key Triple DES, 168 bit key", + [0x84] = "AES-256-OFB", + [0x85] = "AES-128-ECB", + [0x88] = "AES-CBC", + [0x89] = "AES-128-OFB", + -- Motorola proprietary + [0x9F] = "Motorola DES-XL 56-bit key", + [0xA0] = "Motorola DVI-XL", + [0xA1] = "Motorola DVP-XL", + [0xA2] = "Motorola DVI-XL-SPFL", + [0xA3] = "Motorola HAYSTACK", + [0xA4] = "Motorola Assigned - Unknown", + [0xA5] = "Motorola Assigned - Unknown", + [0xA6] = "Motorola Assigned - Unknown", + [0xA7] = "Motorola Assigned - Unknown", + [0xA8] = "Motorola Assigned - Unknown", + [0xA9] = "Motorola Assigned - Unknown", + [0xAA] = "Motorola ADP (40 bit RC4)", + [0xAB] = "Motorola CFX-256", + [0xAC] = "Motorola GOST 28147-89 (RFC 5830)", + [0xAD] = "Motorola Assigned - LOCALIZED", + [0xAE] = "Motorola Assigned - Unknown", + [0xAF] = "Motorola AES+", + [0xB0] = "Motorola DVP", + [0xD0] = "Motorola LOCAL_BR" +} + +service_access_points = { + [0x00] = "Unencrypted User Data", + [0x01] = "Encrypted User Data", + [0x02] = "Circuit Data", + [0x03] = "Circuit Data Control", + [0x04] = "Packet Data", + [0x05] = "Address Resolution Protocol", + [0x06] = "SNDCP Packet Data Control", + [0x1F] = "Extended Address", + [0x20] = "Registration and Authorization", + [0x21] = "Channel Reassignment", + [0x22] = "System Configuration", + [0x23] = "MR Loop-Back", + [0x24] = "MR Statistics", + [0x25] = "MR Out-of-Service", + [0x26] = "MR Paging", + [0x27] = "MR Configuration", + [0x28] = "Unencrypted Key Management Message", + [0x29] = "Encrypted Key Management Message", + [0x3D] = "Trunking Control", + [0x3F] = "Protected Trunking Control" +} + +isp_opcodes = { + -- Voice service isp + [0x00] = "Group Voice Service Request", + [0x04] = "Unit To Unit Voice Service Request", + [0x05] = "Unit To Unit Answer Response", + [0x08] = "Telephone Interconnect Request - Explicit Dialing", + [0x09] = "Telephone Interconnect Request - Implicit Dialing", + [0x0A] = "Telephone Interconnect Answer Response", + -- Data service isp + [0x10] = "Individual Data Service Request (obsolete)", + [0x11] = "Group Data Service Request (obsolete)", + [0x12] = "SNDCP Data Channel Request", + [0x13] = "SNDCP Data Page Response", + [0x14] = "SNDCP Reconnect Request", + -- Control and status isp + [0x20] = "Acknowledge Response - Unit", + [0x2E] = "Authentication Query", + [0x2F] = "Authentication Response", + [0x1F] = "Call Alert Request", + [0x23] = "Cancel Service Request", + [0x27] = "Emergency Alarm Request", + [0x24] = "Extended Function Response", + [0x29] = "Group Affiliation Query Response", + [0x28] = "Group Affiliation Request", + [0x32] = "Identifier Update Request", + [0x1C] = "Message Update Request", + [0x30] = "Protection Parameter Request", + [0x1A] = "Status Query Request", + [0x19] = "Status Query Response", + [0x18] = "Status Update Request", + [0x2C] = "Unit Registration Request", + [0x2B] = "De-Registration Request", + [0x2D] = "Location Registration Request", + [0x1D] = "Radio Unit Monitor Request", + [0x36] = "Roaming Address Request", + [0x37] = "Roaming Address Response" +} + +osp_opcodes = { + -- Voice service osp + [0x00] = "Group Voice Channel Grant", + [0x02] = "Group Voice Channel Grant Update", + [0x03] = "Group Voice Channel Grant Update - Explicit", + [0x04] = "Unit To Unit Voice Channel Grant", + [0x05] = "Unit To Unit Answer Request", + [0x06] = "Unit To Unit Voice Channel Grant Update", + [0x08] = "Telephone Interconnect Voice Channel Grant", + [0x09] = "Telephone Interconnect Voice Channel Grant Update", + [0x0A] = "Telephone Interconnect Answer Request", + -- Data service osp + [0x10] = "Individual Data Channel Grant (obsolete)", + [0x11] = "Group Data Channel Grant (obsolete)", + [0x12] = "Group Data Channel Announcement (obsolete)", + [0x13] = "Group Data Channel Announcement Explicit (obsolete)", + [0x14] = "SNDCP Data Channel Grant", + [0x15] = "SNDCP Data Page Request", + [0x16] = "SNDCP Data Channel Announcement - Explicit", + -- Control and status osp + [0x20] = "Acknowledge Response - FNE", + [0x3C] = "Adjacent Status Broadcast", + [0x2E] = "Authentication Command", + [0x1F] = "Call Alert", + [0x27] = "Deny Response", + [0x24] = "Extended Function Command", + [0x2A] = "Group Affiliation Query", + [0x28] = "Group Affiliation Response", + [0x3D] = "Identifier Update", + [0x1C] = "Message Update", + [0x3B] = "Network Status Broadcast", + [0x3E] = "Protection Parameter Broadcast", + [0x3F] = "Protection Parameter Update", + [0x21] = "Queued Response", + [0x3A] = "RFSS Status Broadcast", + [0x39] = "Secondary Control Channel Broadcast", + [0x1A] = "Status Query", + [0x18] = "Status Update", + [0x38] = "System Service Broadcast", + [0x2D] = "Unit Registration Command", + [0x2C] = "Unit Registration Response", + [0x2F] = "De-Registration Acknowledge", + [0x2B] = "Location Registration Response", + [0x1D] = "Radio Unit Monitor Command", + [0x36] = "Roaming Address Command", + [0x37] = "Roaming Address Update", + [0x35] = "Time and Date Announcement", + [0x34] = "Identifier Update for VHF/UHF Bands", + [0x29] = "Secondary Control Channel Broadcast - Explicit" +} + +pdu_formats = { + [0x03] = "Response Packet", + [0x15] = "Unconfirmed Data Packet", + [0x16] = "Confirmed Data Packet", + [0x17] = "Alternate Multiple Block Trunking Control Packet" +} + + +-- Status symbol can be one of 4 values: +-- HEX BIN USED_BY DESCRIPTION +-- 0x0 (00b) SUBSCRIBER unknown, used by talk-around +-- 0x1 (01b) REPEATER busy +-- 0x2 (10b) REPEATER OR SUBSCRIBER unknown, used for inbound and outbound +-- 0x3 (11b) REPEATER idle +-- +-- Note that there are two values used for `unknown`. +-- 0x0 00b is used by a subscriber when sending a message on a direct channel +-- 0x2 10b when a subscriber sends a message inbound to a repeater, it sets status symbol to 10b. +-- +status_symbols = { + [0x0] = "Unknown (set by subscriber: used by talk-around)", + [0x1] = "Busy (set by repeater)", + [0x2] = "Unknown (set by subscriber: used for inbound or outbound)", + [0x3] = "Idle (set by repeater: start of inbound slot)" +} + +-- Declare the protocol (after value tables) +local p25cai = Proto("p25cai", "APCO Project 25 Common Air Interface") + +-- Define the protocol fields +local f = p25cai.fields + +f.fs = ProtoField.bytes("p25cai.fs", "Frame Synchronization", base.NONE) +f.nid = ProtoField.uint64("p25cai.nid", "Network ID Codeword", base.HEX) +f.nac = ProtoField.uint16("p25cai.nac", "Network Access Code", base.HEX, network_access_codes, 0xFFF0) +f.duid = ProtoField.uint16("p25cai.duid", "Data Unit ID", base.HEX, data_unit_ids, 0x000F) +f.hdu = ProtoField.none("p25cai.hdu", "Header Data Unit", base.NONE) +f.tsbk = ProtoField.none("p25cai.tsbk", "Trunking Signaling Block", base.NONE) +f.pdu = ProtoField.none("p25cai.pdu", "Packet Data Unit", base.NONE) +f.ldu1 = ProtoField.none("p25cai.ldu1", "Logical Link Data Unit 1", base.NONE) +f.ldu2 = ProtoField.none("p25cai.ldu2", "Logical Link Data Unit 2", base.NONE) +f.mi = ProtoField.bytes("p25cai.mi", "Message Indicator (initialization vector [IV])", base.NONE) -- 72 bits, 9 bytes +f.mfid = ProtoField.uint8("p25cai.mfid", "Manufacturer's ID", base.HEX, manufacturer_ids) +f.algid = ProtoField.uint8("p25cai.algid", "Algorithm ID", base.HEX, algorithm_ids) +f.kid = ProtoField.uint16("p25cai.kid", "Key ID", base.HEX, key_ids) +f.tgid = ProtoField.uint16("p25cai.tgid", "Talk Group ID", base.RANGE_STRING, talk_group_ids) +f.ss_parent = ProtoField.none("p25cai.ss_parent", "Status Symbols", base.NONE) +f.ss = ProtoField.uint8("p25cai.ss", "Status Symbol", base.HEX, status_symbols, 0x3) +f.lc = ProtoField.none("p25cai.lc", "Link Control", base.NONE) +f.lcf = ProtoField.uint8("p25cai.lcf", "Link Control Format", base.HEX, link_control_formats) +f.lbf = ProtoField.bool("p25cai.lbf", "Last Block Flag", 8, nil, 0x80) -- 0x80 is binary 10000000 (MSB) +f.ei = ProtoField.bool("p25cai.ei", "Emergency Indicator", 8, nil, 0x80) +f.ptbf = ProtoField.bool("p25cai.ptbf", "Protected Trunking Block Flag", 8, nil, 0x40) -- 0x40 is binary 01000000 (2nd MSB) +f.isp_opcode = ProtoField.uint8("p25cai.isp.opcode", "Opcode", base.HEX, isp_opcodes, 0x3F) +f.osp_opcode = ProtoField.uint8("p25cai.osp.opcode", "Opcode", base.HEX, osp_opcodes, 0x3F) +f.unknown_opcode = ProtoField.uint8("p25cai.unknown.opcode", "Unknown Opcode (non-standard MFID)", base.HEX, nil, 0x3F) +f.args = ProtoField.uint64("p25cai.args", "Arguments", base.HEX) +f.tuid = ProtoField.uint24("p25cai.tuid", "Target Unit ID") +f.srcuid = ProtoField.uint24("p25cai.suid", "Source Unit ID") +f.dstuid = ProtoField.uint24("p25cai.suid", "Destination Unit ID") +f.crc = ProtoField.uint16("p25cai.crc", "CRC", base.HEX) +f.imbe = ProtoField.bytes("p25cai.imbe", "Raw IMBE Frame", base.NONE) +-- Low Speed Data (LSD) [16 bits, 2 bytes] is used for custom user applications not defined by p25cai (e.g. GPS coordinates). +-- total capacity of 88.89 bps. Encoded with shortened cyclic code to create 64 bits [8 bytes] per superframe. +f.lsd = ProtoField.uint16("p25cai.lsd", "Low Speed Data", base.HEX) +f.es = ProtoField.none("p25cai.es", "Encryption Sync", base.NONE) +f.an = ProtoField.bool("p25cai.an", "A/N", 8, nil, 0x40) +f.io = ProtoField.bool("p25cai.io", "I/O", 8, nil, 0x20) +f.pdu_format = ProtoField.uint8("p25cai.pdu.format", "Format", base.HEX, pdu_formats, 0x1F) +f.sapid = ProtoField.uint8("p25cai.sapid", "SAP ID", base.HEX, service_access_points, 0x3F) +f.llid = ProtoField.uint24("p25cai.llid", "Logical Link ID", base.DEC) +f.fmf = ProtoField.bool("p25cai.fmf", "Full Message Flag", 8, nil, 0x80) +f.btf = ProtoField.uint8("p25cai.btf", "Blocks to Follow", base.DEC, nil, 0x7F) +f.poc = ProtoField.uint8("p25cai.poc", "Pad Octet Count", base.HEX, nil, 0x1F) +f.syn = ProtoField.bool("p25cai.syn", "Syn", 8, nil, 0x80) +f.ns = ProtoField.uint8("p25cai.ns", "N(S)", base.HEX, nil, 0x70) +f.fsnf = ProtoField.uint8("p25cai.fsnf", "Fragment Sequence Number Field", base.HEX, nil, 0x0F) +f.dho = ProtoField.uint8("p25cai.dho", "Data Header Offset", base.HEX, nil, 0x3F) +f.db = ProtoField.none("p25cai.db", "Data Block", base.NONE) +f.dbsn = ProtoField.uint8("p25cai.dbsn", "Data Block Serial Number", base.HEX, nil, 0xFE) +f.crc9 = ProtoField.uint16("p25cai.crc9", "CRC", base.HEX, nil, 0x1FF) +f.ud = ProtoField.bytes("p25cai.ud", "User Data", base.NONE) +f.packet_crc = ProtoField.uint32("p25cai.packet_crc", "Packet CRC", base.HEX) +f.class = ProtoField.uint8("p25cai.class", "Response Class", base.HEX, nil, 0xA0) +f.type = ProtoField.uint8("p25cai.type", "Response Type", base.HEX, nil, 0x38) +f.status = ProtoField.uint8("p25cai.status", "Response Status", base.HEX, nil, 0x07) +f.x = ProtoField.bool("p25cai.x", "X", 8, nil, 0x80) +f.sllid = ProtoField.uint24("p25cai.sllid", "Source Logical Link ID", base.HEX) + +-- TODO: implement unit id +-- Unit ID [24 bit, 3 byte] is user programmable, and is used for individual and group calling. This is used for +-- both source ID and destination ID. User ID is not the same as the Electronic Serial Number (ESN) of the radio. +-- Ranges: +-- 0x000000 no one (never assigned to a radio unit) +-- 0x000001 to 0x98967F general use +-- 0x989680 to 0xFFFFFE talk groups or special purposes +-- 0xFFFFFF everyone (used for a group call with a TGID) + +-------------------------------------------------------------------------------- +-- preferences handling stuff +-------------------------------------------------------------------------------- +-- In the GUI, these preferences can be changed by accessing: +-- Wireshark GUI > Preferences > Protocols > P25CAI +-- or +-- Wireshark GUI > Preferences > Advanced > (search for p25) +-- +-- a "enum" table for our enum pref, as required by Pref.enum() +-- having the "index" number makes ZERO sense, and is completely illogical +-- but it's what the code has expected it to be for a long time. Ugh. +local debug_pref_enum = { + { 1, "Disabled", debug_level.DISABLED }, + { 2, "Level 1", debug_level.LEVEL_1 }, + { 3, "Level 2", debug_level.LEVEL_2 }, +} + +p25cai.prefs.debug = Pref.enum("Debug", default_settings.debug_level, + "The debug printing level", debug_pref_enum) + +p25cai.prefs.port = Pref.uint("Port number", default_settings.port, + "The UDP port number for P25 incoming traffic") + +p25cai.prefs.enabled = Pref.bool("filter enabled", default_settings.enabled, + "Whether P25 dissection is enabled or not") + +---------------------------------------- +-- a function for handling prefs being changed +function p25cai.prefs_changed() + dprint("P25CAI prefs_changed called") + + default_settings.debug_level = p25cai.prefs.debug + reset_debug_level() + + default_settings.enabled = p25cai.prefs.enabled + + if default_settings.port ~= p25cai.prefs.port then + -- remove old one, if not 0 + if default_settings.port ~= 0 then + dprint2("removing P25CAI from port", default_settings.port) + DissectorTable.get("udp.port"):remove(default_settings.port, p25cai) + end + -- set our new default + default_settings.port = p25cai.prefs.port + -- add new one, if not 0 + if default_settings.port ~= 0 then + dprint2("adding P25CAI to port", default_settings.port) + DissectorTable.get("udp.port"):add(default_settings.port, p25cai) + end + end + +end + +dprint2("P25CAI Prefs registered") + + +-- Utility functions +local function count_bits(n) + local count = 0 + while n > 0 do + count = count + 1 + n = bit.band(n, n - 1) + end + return count +end + +local function find_min(list, len) + local min = list[1] + local index = 1 + local unique = true + + for i = 2, len do + if list[i] < min then + min = list[i] + index = i + unique = true + elseif list[i] == min then + unique = false + end + end + + if not unique then + return -1 + end + + return index +end + +-- Fake error correction decoders (as in the original C code) +-- These just extract bits without actual error correction +local function golay_18_6_8_decode(codeword) + return bit.rshift(bit.band(codeword, 0x3FFFF), 12) +end + +local function golay_24_12_8_decode(codeword) + return bit.rshift(bit.band(codeword, 0xFFFFFF), 12) +end + +local function hamming_10_6_3_decode(codeword) + return bit.rshift(bit.band(codeword, 0x3FF), 4) +end + +local function cyclic_16_8_5_decode(codeword, decoded) + decoded[1] = bit.rshift(codeword, 24) + decoded[2] = bit.rshift(codeword, 8) +end + +local function rs_24_12_13_decode(codeword, decoded) + for i = 1, 9 do + decoded[i] = codeword[i] + end +end + +local function rs_24_16_9_decode(codeword, decoded) + for i = 1, 12 do + decoded[i] = codeword[i] + end +end + +local function rs_36_20_17_decode(codeword, decoded) + for i = 1, 15 do + decoded[i] = codeword[i] + end +end + +-- Dissector implementations for various frame types + +local function dissect_voice(tvb, tree, offset) + -- Add IMBE frames + tree:add(f.imbe, tvb(offset, 18)) + offset = offset + 18 + tree:add(f.imbe, tvb(offset, 18)) + offset = offset + 23 + tree:add(f.imbe, tvb(offset, 18)) + offset = offset + 23 + tree:add(f.imbe, tvb(offset, 18)) + offset = offset + 23 + tree:add(f.imbe, tvb(offset, 18)) + offset = offset + 23 + tree:add(f.imbe, tvb(offset, 18)) + offset = offset + 23 + tree:add(f.imbe, tvb(offset, 18)) + offset = offset + 23 + tree:add(f.imbe, tvb(offset, 18)) + offset = offset + 22 + tree:add(f.imbe, tvb(offset, 18)) +end + +local function dissect_lc(tvb, tree) + local lc_tree = tree:add(f.lc, tvb(0, 9)) + local lcf = tvb(0, 1):uint() + lc_tree:add(f.lcf, tvb(0, 1)) + + if lcf == 0x00 then -- 0x00 = Group Call Format + lc_tree:add(f.mfid, tvb(1, 1)) + lc_tree:add(f.ei, tvb(2,1)) + lc_tree:add(f.tgid, tvb(4,2)) + lc_tree:add(f.srcuid, tvb(6,3)) + elseif lcf == 0x03 then -- 0x03 = Individual Call Format + -- TODO: need to test this with a radio which isn't on a trunked system + lc_tree:add(f.mfid, tvb(1, 1)) + lc_tree:add(f.dstuid, tvb(3, 3)) + lc_tree:add(f.srcuid, tvb(6, 3)) + -- TODO: implement encryption (if key is known) + -- else if lcf == 0x80 -- Encrypted Group Call Format + -- else if lcf == 0x83 -- Encrypted Individual Call Format + end +end + +local function dissect_es(tvb, tree) + local es_tree = tree:add(f.es, tvb(0, 12)) + es_tree:add(f.mi, tvb(0, 9)) + es_tree:add(f.algid, tvb(9, 1)) + es_tree:add(f.kid, tvb(10, 2)) +end + +local function extract_status_symbols(tvb, pinfo, tree) + local raw_length = tvb:len() + local extracted_length = raw_length - math.floor(raw_length / 36) + local outbound = 0 + + -- Create buffer to become new tvb + local extracted_buffer = ByteArray.new() + extracted_buffer:set_size(extracted_length) + + -- Create status symbol subtree + local ss_parent_item = tree:add(f.ss_parent, tvb(0)) + local ss_tree = ss_parent_item + + -- Go through frame one dibit at a time + local i, j = 0, 0 + while i < raw_length * 4 do + if i % 36 == 35 then + -- After every 35 dibits is a status symbol + ss_tree:add(f.ss, tvb(math.floor(i/4), 1)) + -- Check to see if the status symbol is odd + if bit.band(tvb(math.floor(i/4), 1):uint(), 0x1) ~= 0 then + -- Flag as outbound (only outbound frames should have odd status symbols) + outbound = bit.bor(outbound, 1) + end + else + -- Extract frame bits from between status symbols + local byte_pos = math.floor((i * 2) / 8) + local bit_offset = (i * 2) % 8 + local dibit = bit.band(bit.rshift(tvb(byte_pos, 1):uint(), 6 - bit_offset), 0x3) + + local out_byte = math.floor(j / 4) + local out_shift = 6 - (j % 4) * 2 + local current = extracted_buffer:get_index(out_byte) + extracted_buffer:set_index(out_byte, bit.bor(current, bit.lshift(dibit, out_shift))) + j = j + 1 + end + i = i + 1 + end + + -- Setup a new tvb buffer with the extracted data + local extracted_tvb = ByteArray.tvb(extracted_buffer, "P25 Common Air Interface") + return extracted_tvb, outbound +end + +-- Build Header Data Unit tvb +local function build_hdu_tvb(tvb, pinfo, offset) + -- Check we have enough data + if tvb:len() - offset < 81 then + return tvb(0,0) -- Return empty tvb if not enough data + end + + -- Initialize buffers + local rs_codeword = {} + local hdu_buffer = {} + + for i = 0, 26 do rs_codeword[i] = 0 end + for i = 0, 14 do hdu_buffer[i] = 0 end + + -- Each 18 bits is a Golay codeword + local i = offset * 8 + for j = 0, 210, 6 do + -- Take 18 bits from the tvb, adjusting for byte boundaries + local byte_pos = math.floor(i / 8) + local bit_offset = i % 8 + + -- Need to extract 18 bits across byte boundaries + local golay_codeword = 0 + + -- Get first byte + local first_byte = tvb(byte_pos, 1):uint() + -- Calculate bits available in first byte + local bits_from_first = 8 - bit_offset + + if bits_from_first >= 18 then + -- All 18 bits fit in the first byte (rare case) + golay_codeword = bit.band(bit.rshift(first_byte, 8 - bit_offset - 18), 0x3FFFF) + else + -- We need multiple bytes + -- Add bits from first byte + golay_codeword = bit.lshift(bit.band(first_byte, bit.rshift(0xFF, bit_offset)), 18 - bits_from_first) + + -- Add bits from second byte + local bits_needed = 18 - bits_from_first + local second_byte = tvb(byte_pos + 1, 1):uint() + + if bits_needed <= 8 then + -- Second byte has all remaining bits + golay_codeword = bit.bor(golay_codeword, + bit.rshift(second_byte, 8 - bits_needed)) + else + -- Need bits from second and third bytes + golay_codeword = bit.bor(golay_codeword, bit.lshift(second_byte, bits_needed - 8)) + + -- Add bits from third byte + local third_byte = tvb(byte_pos + 2, 1):uint() + golay_codeword = bit.bor(golay_codeword, + bit.rshift(third_byte, 16 - bits_needed)) + end + end + + -- Apply Golay decoding (produces 6 bits) + local rs_code_byte = bit.lshift(golay_18_6_8_decode(golay_codeword), 2) + + -- Stuff high bits into one byte of the new buffer + local byte_idx = math.floor(j / 8) + local bit_idx = j % 8 + local high_byte = bit.rshift(rs_code_byte, bit_idx) + rs_codeword[byte_idx] = bit.bor(rs_codeword[byte_idx], high_byte) + + -- Stuff low bits into the next unless beyond end of buffer + if j < 210 then + local low_byte = bit.lshift(rs_code_byte, 8 - bit_idx) + rs_codeword[byte_idx + 1] = bit.bor(rs_codeword[byte_idx + 1], low_byte) + end + + -- Move to next 18-bit chunk + i = i + 18 + end + + -- Apply Reed-Solomon decoding to get the actual HDU data + rs_36_20_17_decode(rs_codeword, hdu_buffer) + + -- Create a new TVB buffer with the decoded data + local ba = ByteArray.new() + ba:set_size(15) -- Allocate space for 15 bytes + + for i = 0, 14 do + -- Make sure the value is a valid byte (0-255) + local value = hdu_buffer[i] or 0 + if type(value) ~= "number" then + value = 0 + else + value = bit.band(value, 0xFF) -- Ensure it's in range 0-255 + end + + ba:set_index(i, value) + end + + + local hdu_tvb = ba:tvb("Header Data Unit") + + return hdu_tvb +end + +-- Deinterleave data block. Assumes output buffer is already zeroed. +local function data_deinterleave(tvb, bit_offset) + local deinterleaved = {} + for i = 0, 24 do deinterleaved[i] = 0 end + + local d, i, j, t + local steps = {0, 52, 100, 148} + + -- Step through input nibbles to copy to output + i = bit_offset + d = 0 + while i < 45 + bit_offset do + for j = 0, 3 do + -- t = tvb bit index + -- d = deinterleaved bit index + t = i + steps[j + 1] + + -- Get byte and bit positions + local byte_pos = math.floor(t / 8) + local bit_pos = t % 8 + local d_byte = math.floor(d / 8) + local d_bit = d % 8 + + -- Extract nibble and place it in output + local tvb_byte = tvb(byte_pos, 1):uint() + local nibble = bit.band(bit.lshift(tvb_byte, bit_pos), 0xF0) + deinterleaved[d_byte] = bit.bor(deinterleaved[d_byte], bit.rshift(nibble, d_bit)) + + d = d + 4 + end + i = i + 4 + end + + -- Handle last nibble separately + t = bit_offset + 48 + local byte_pos = math.floor(t / 8) + local bit_pos = t % 8 + local tvb_byte = tvb(byte_pos, 1):uint() + local nibble = bit.band(bit.lshift(tvb_byte, bit_pos), 0xF0) + deinterleaved[24] = bit.bor(deinterleaved[24], nibble) + + return deinterleaved +end + +-- 1/2 rate trellis decoder +local function trellis_1_2_decode(encoded, offset) + -- Initialize the output buffer + local decoded = {} + for i = 0, 11 do decoded[i + offset] = 0 end + + -- Initialize state to 0 (not a0) + local state = 0 -- This was likely the issue - ensure it's initialized to a number + + -- State transition table, including constellation to dibit pair mapping + local next_words = { + {0x2, 0xC, 0x1, 0xF}, -- state 0 + {0xE, 0x0, 0xD, 0x3}, -- state 1 + {0x9, 0x7, 0xA, 0x4}, -- state 2 + {0x5, 0xB, 0x6, 0x8} -- state 3 + } + + -- Process the data + for i = 0, 192, 4 do -- Process each 4-bit codeword + -- Check bounds + if math.floor(i/8) + 1 > #encoded then + print(string.format("Lua: Warning: i/8 = %.1f exceeds encoded length %d", i/8, #encoded)) + break + end + + -- Extract codeword (4 bits from the input) + local byte_idx = math.floor(i / 8) + local bit_offset = i % 8 + + -- Ensure byte_idx is within bounds + if byte_idx >= #encoded then + print("Lua: Error: byte_idx out of bounds:", byte_idx, "#encoded =", #encoded) + break + end + + local codeword = 0 + if bit_offset <= 4 then + -- Codeword is entirely within one byte + codeword = bit.band(bit.rshift(encoded[byte_idx], 4 - bit_offset), 0xF) + else + -- Codeword spans two bytes + -- Make sure we don't run past the end of the buffer + if byte_idx + 1 >= #encoded then + print("Lua: Error: byte_idx + 1 out of bounds:", byte_idx + 1, "#encoded =", #encoded) + break + end + + local bits_from_first = 8 - bit_offset + local bits_from_second = 4 - bits_from_first + + local first_part = bit.band(encoded[byte_idx], bit.lshift(1, bits_from_first) - 1) + local second_part = bit.rshift(encoded[byte_idx + 1], 8 - bits_from_second) + + codeword = bit.bor(bit.lshift(first_part, bits_from_second), second_part) + end + + -- Calculate Hamming distance to each possible codeword from current state + local hd = {0, 0, 0, 0} -- Initialize with default values + for k = 0, 3 do + hd[k + 1] = count_bits(bit.bxor(codeword, next_words[state + 1][k + 1])) + end + + -- Find the minimum Hamming distance + local min_hd = hd[1] + local dibit_idx = 0 + for k = 1, 4 do + if hd[k] < min_hd then + min_hd = hd[k] + dibit_idx = k - 1 + end + end + + -- Determine next state based on current state and selected dibit + local prev_state = state + state = dibit_idx + + -- Write dibit to output + local out_byte = math.floor(i / 16) + offset + local out_shift = 6 - 2 * (math.floor(i / 4) % 4) + + if out_byte < offset + 12 then -- Ensure we're within the output buffer + decoded[out_byte] = bit.bor(decoded[out_byte] or 0, bit.lshift(dibit_idx, out_shift)) + end + end + + return decoded +end + +-- Build Trunking Signaling Block tvb +local function build_tsdu_tvb(tvb, pinfo, offset) + -- From here on, our tvb offset may not fall on bit boundaries, so we track + -- it by bits instead of bytes + local tvb_bit_offset = offset * 8 + local tsdu_offset = 0 + local block_offset = 0 + local last_block = 0 + + local tsdu_buffer = {} + -- 12 bytes for each TSDU, max of 3 TSDUs + for i = 0, 35 do + tsdu_buffer[i] = 0 + end + + -- Process blocks until last block flag is set + while (offset + block_offset + 23) < tvb:len() do + -- Ensure we have enough data remaining + if tvb:len() - math.floor(tvb_bit_offset / 8) < 25 then + error("ASSERT FAILURE: not enough data left to process another TSDU block") + end + + -- Deinterleave data + local trellis_buffer = data_deinterleave(tvb, tvb_bit_offset) + + -- Apply trellis decoding + local decoded_block = trellis_1_2_decode(trellis_buffer, tsdu_offset) + + for i = tsdu_offset, tsdu_offset + 11 do + tsdu_buffer[i] = decoded_block[i] + end + + -- Check if this is the last block + last_block = bit.rshift(tsdu_buffer[tsdu_offset], 7) + + -- Move to next block + tvb_bit_offset = tvb_bit_offset + 196 + block_offset = block_offset + 24 + tsdu_offset = tsdu_offset + 12 + end + + local ba = ByteArray.new() + ba:set_size(tsdu_offset) -- Allocate space for tsdu_offset bytes + + for i = 0, tsdu_offset - 1 do + -- Make sure the value is a valid byte (0-255) + local value = tsdu_buffer[i] or 0 + if type(value) ~= "number" then + value = 0 + else + value = bit.band(value, 0xFF) -- Ensure it's in range 0-255 + end + ba:set_index(i, value) + end + + local tsdu_tvb = ba:tvb("Trunking Signaling Block") + return tsdu_tvb +end + + +-- TODO: test this once we have a sample packet +-- Build Link Control tvb from LDU1 +local function build_ldu_lc_tvb(tvb, pinfo, offset) + -- Start from the correct offset within the LDU + offset = offset + 36 + + -- Make sure we have enough data + if tvb:reported_length_remaining(offset) < 147 then + return tvb:range(0, 0):tvb() -- Return an empty TVB instead of nil + end + + -- Allocate buffers for the Reed-Solomon codeword and LC buffer + local rs_codeword = {} + for i = 1, 18 do rs_codeword[i] = 0 end + + local lc_buffer = {} + for i = 1, 9 do lc_buffer[i] = 0 end + + -- Step through TVB bits to find 10-bit Hamming codewords + local r = 0 -- Reed-Solomon codeword bit index + for i = offset * 8, (offset * 8) + 143 * 184, 184 do + for j = 0, 30, 10 do + -- t = TVB bit index + local t = i + j + + -- Calculate the byte position and bit offset + local byte_pos = math.floor(t / 8) + local bit_offset = t % 8 + + -- Get 4 bytes as a 32-bit network-order integer + local uint32 = 0 + if byte_pos + 3 < tvb:len() then + uint32 = tvb:bytes(byte_pos, 4):uint() + else + -- If we don't have 4 bytes, use what we have + local available = tvb:reported_length() - byte_pos + if available > 0 then + uint32 = tvb:bytes(byte_pos, available):uint() + uint32 = bit.lshift(uint32, (4 - available) * 8) + end + end + + -- Extract the 10-bit codeword by shifting and masking + local shift_amount = 22 - bit_offset + local hamming_codeword = bit.band(bit.rshift(uint32, shift_amount), 0x3FF) + + -- Decode the Hamming codeword to get 6 bits of data + local rs_code_byte = bit.lshift(hamming_10_6_3_decode(hamming_codeword), 2) + + -- Calculate bit position in rs_codeword + local high_byte_idx = math.floor(r / 8) + 1 + if high_byte_idx <= 18 then -- Make sure we don't go beyond the rs_codeword array + local high_byte = bit.rshift(rs_code_byte, (r % 8)) + rs_codeword[high_byte_idx] = bit.bor(rs_codeword[high_byte_idx], high_byte) + + -- Stuff low bits into next byte unless beyond buffer end + if r < 144 then + local low_byte_idx = high_byte_idx + 1 + if low_byte_idx <= 18 then -- Make sure we don't go beyond the rs_codeword array + local low_byte = bit.lshift(rs_code_byte, (8 - r % 8)) + rs_codeword[low_byte_idx] = bit.bor(rs_codeword[low_byte_idx], low_byte) + end + end + end + + -- Increment bit index for next iteration + r = r + 6 + + -- Break if we've processed all 144 bits + if r >= 144 then + break + end + end + + -- Break if we've processed all 144 bits + if r >= 144 then + break + end + end + + -- Apply Reed-Solomon decoding + rs_24_12_13_decode(rs_codeword, lc_buffer) + + -- Create a new TVB from the lc_buffer + -- Create ByteArray directly with preset values to avoid string operations + local lc_bytearray = ByteArray.new() + -- Pre-allocate with 9 zeros + lc_bytearray:set_size(9) + -- Set the values + for i = 1, 9 do + lc_bytearray:set_index(i-1, bit.band(lc_buffer[i], 0xFF)) + end + + -- Create the new TVB + local lc_tvb = ByteArray.tvb(lc_bytearray, "Link Control") + + return lc_tvb +end + +-- Helper function for cyclic code decoding 16,8,5 +-- This is a "fake" decoder that just extracts first byte of each 16-bit word, as in the C++ version +local function cyclic_16_8_5_decode(codeword, out_buffer) + -- Take the first byte of each 16-bit word + out_buffer[1] = bit.band(bit.rshift(codeword, 24), 0xFF) -- High byte of high word + out_buffer[2] = bit.band(bit.rshift(codeword, 8), 0xFF) -- High byte of low word +end + +-- TODO: need a sample low speed packet to test this. Can I do that with a Harris radio? +-- maybe op25 can xmit this type of packet. +-- Low speed data tvb +local function build_ldu_lsd_tvb(tvb, pinfo, offset) + -- Start from the correct offset within the LDU + offset = offset + 174 + + -- Make sure we have enough data + if tvb:len() - offset < 4 then + return tvb:range(0, 0):tvb() -- Return an empty TVB instead of nil + end + + -- Allocate buffer for the LSD + local lsd_buffer = {0, 0} -- 2-byte buffer initialized with zeros + + -- Get 4 bytes as a 32-bit integer in network byte order + local uint32 = tvb:range(offset, 4):uint() + + -- Apply cyclic decoding + cyclic_16_8_5_decode(uint32, lsd_buffer) + + -- Create a new TVB from the lsd_buffer + -- Create ByteArray directly with preset values to avoid string operations + local lsd_bytearray = ByteArray.new() + -- Pre-allocate with 2 zeros + lsd_bytearray:set_size(2) + -- Set the values + lsd_bytearray:set_index(0, bit.band(lsd_buffer[1], 0xFF)) + lsd_bytearray:set_index(1, bit.band(lsd_buffer[2], 0xFF)) + + -- Create the new TVB + local lsd_tvb = ByteArray.tvb(lsd_bytearray, "Low Speed Data") + + -- Add as a data source - this may not be needed and could cause issues + -- pinfo.data_src:add_proto_data(lsd_tvb, "Low Speed Data") + + return lsd_tvb +end + +-- fake (24,16,9) Reed-Solomon decoder, no error correction +-- TODO: make less fake +local function rs_24_16_9_decode(rs_codeword, out_buffer) + -- Just grab the first 12 bytes (16 sets of six bits) + for i = 1, 12 do + out_buffer[i] = rs_codeword[i] + end +end + +local function hamming_10_6_3_decode(codeword) + -- Return the 6 bits starting from bit 4 (right-shift by 4) + return bit.band(bit.rshift(codeword, 4), 0x3F) +end + +-- Build Link Control tvb from Terminator +function build_term_lc_tvb(tvb, pinfo, offset) + -- Make sure we have enough data + if tvb:len() - offset < 36 then + return tvb:range(0, 0):tvb() -- Return an empty TVB instead of nil + end + + -- Allocate buffers for the Reed-Solomon codeword and LC buffer + local rs_codeword = {} + for i = 1, 18 do rs_codeword[i] = 0 end + + local lc_buffer = {} + for i = 1, 9 do lc_buffer[i] = 0 end + + -- Process Golay codewords + local j = 0 -- Reed-Solomon bit index + for i = offset * 8, (offset * 8) + 143, 24 do + -- Calculate the byte position and bit offset + local byte_pos = math.floor(i / 8) + local bit_offset = i % 8 + + -- Get 4 bytes as a 32-bit network-order integer + local uint32 = 0 + if byte_pos + 3 < tvb:len() then + uint32 = tvb:range(byte_pos, 4):uint() + else + -- If we don't have 4 bytes, use what we have + local available = tvb:len() - byte_pos + if available > 0 then + uint32 = tvb:range(byte_pos, available):uint() + uint32 = bit.lshift(uint32, (4 - available) * 8) + end + end + + -- Extract the 24-bit Golay codeword by shifting and masking + local shift_amount = 8 - bit_offset + local golay_codeword = bit.band(bit.rshift(uint32, shift_amount), 0xFFFFFF) + + -- Decode the Golay codeword to get 12 bits of data and shift left by 4 + local rs_code_chunk = bit.lshift(golay_24_12_8_decode(golay_codeword), 4) + + -- Calculate bit position in rs_codeword + local high_byte_idx = math.floor(j / 8) + 1 + if high_byte_idx <= 18 then -- Make sure we don't go beyond the rs_codeword array + -- Stuff high bits into current byte + local high_byte = bit.rshift(rs_code_chunk, (j % 8)) + rs_codeword[high_byte_idx] = bit.bor(rs_codeword[high_byte_idx], high_byte) + + -- Stuff low bits into next byte + local low_byte_idx = high_byte_idx + 1 + if low_byte_idx <= 18 then -- Make sure we don't go beyond the rs_codeword array + local low_byte = bit.lshift(rs_code_chunk, (8 - j % 8)) + rs_codeword[low_byte_idx] = bit.bor(rs_codeword[low_byte_idx], low_byte) + end + end + + -- Increment bit index for next iteration (12 bits per Golay decode) + j = j + 12 + + -- Break if we've processed all 144 bits + if j >= 144 then + break + end + end + + -- Apply Reed-Solomon decoding + rs_24_12_13_decode(rs_codeword, lc_buffer) + + -- Create a new TVB from the lc_buffer + -- Create ByteArray directly with preset values to avoid string operations + local lc_bytearray = ByteArray.new() + -- Pre-allocate with 9 zeros + lc_bytearray:set_size(9) + -- Set the values + for i = 1, 9 do + lc_bytearray:set_index(i-1, bit.band(lc_buffer[i], 0xFF)) + end + + -- Create the new TVB + local lc_tvb = ByteArray.tvb(lc_bytearray, "Link Control") + + return lc_tvb +end + + +-- Build encryption sync tvb +local function build_ldu_es_tvb(tvb, pinfo, offset) + -- Start from the correct offset within the LDU + offset = offset + 36 + + -- Make sure we have enough data + if tvb:len() - offset < 147 then + return tvb:range(0, 0):tvb() -- Return an empty TVB instead of nil + end + + -- Allocate buffers for the Reed-Solomon codeword and ES buffer + local rs_codeword = {} + for i = 1, 18 do rs_codeword[i] = 0 end + + local es_buffer = {} + for i = 1, 12 do es_buffer[i] = 0 end + + -- Step through TVB bits to find 10-bit Hamming codewords + local r = 0 -- Reed-Solomon codeword bit index + for i = offset * 8, (offset * 8) + 143 * 184, 184 do + for j = 0, 30, 10 do + -- t = TVB bit index + local t = i + j + + -- Calculate the byte position and bit offset + local byte_pos = math.floor(t / 8) + local bit_offset = t % 8 + + -- Get 4 bytes as a 32-bit network-order integer + local uint32 = 0 + if byte_pos + 3 < tvb:len() then + -- Use get_uint to get a 32-bit unsigned integer directly + uint32 = tvb:range(byte_pos, 4):uint() + else + -- If we don't have 4 bytes, use what we have + local available = tvb:len() - byte_pos + if available > 0 then + uint32 = tvb:range(byte_pos, available):uint() + uint32 = bit.lshift(uint32, (4 - available) * 8) + end + end + + -- Extract the 10-bit codeword by shifting and masking + local shift_amount = 22 - bit_offset + local hamming_codeword = bit.band(bit.rshift(uint32, shift_amount), 0x3FF) + + -- Decode the Hamming codeword to get 6 bits of data + local rs_code_byte = bit.lshift(hamming_10_6_3_decode(hamming_codeword), 2) + + -- Calculate bit position in rs_codeword + local high_byte_idx = math.floor(r / 8) + 1 + if high_byte_idx <= 18 then -- Make sure we don't go beyond the rs_codeword array + local high_byte = bit.rshift(rs_code_byte, (r % 8)) + rs_codeword[high_byte_idx] = bit.bor(rs_codeword[high_byte_idx], high_byte) + + -- Stuff low bits into next byte unless beyond buffer end + if r < 144 then + local low_byte_idx = high_byte_idx + 1 + if low_byte_idx <= 18 then -- Make sure we don't go beyond the rs_codeword array + local low_byte = bit.lshift(rs_code_byte, (8 - r % 8)) + rs_codeword[low_byte_idx] = bit.bor(rs_codeword[low_byte_idx], low_byte) + end + end + end + + -- Increment bit index for next iteration + r = r + 6 + + -- Break if we've processed all 144 bits + if r >= 144 then + break + end + end + + -- Break if we've processed all 144 bits + if r >= 144 then + break + end + end + + -- Apply Reed-Solomon decoding + rs_24_16_9_decode(rs_codeword, es_buffer) + + -- Create a new TVB from the es_buffer + -- In Wireshark Lua, ByteArray constructor can take a hex string + local hex_string = "" + for i = 1, 12 do + -- Ensure values are within byte range and convert to hex + hex_string = hex_string .. string.format("%02x ", bit.band(es_buffer[i], 0xFF)) + end + + -- Create ByteArray from the hex string (remove trailing space) + local es_bytearray = ByteArray.new(hex_string:sub(1, -2)) + + -- Create the new TVB using ByteArray.tvb() + local es_tvb = ByteArray.tvb(es_bytearray, "Encryption Sync") + + -- Optionally add as a data source to the pinfo - this may not be needed + -- and might even be causing issues + -- pinfo.cols.protocol = "P25" + -- pinfo.cols.info:append(" Encryption Sync") + + return es_tvb +end + + +local function byte_to_binary(n) + local binary = "" + for i = 7, 0, -1 do + binary = binary .. ((bit.band(n, bit.lshift(1, i)) == 0) and "0" or "1") + end + return binary +end + +-- Function to convert a byte to its binary representation +function byte_to_binary(byte) + local binary = "" + for i = 7, 0, -1 do + binary = binary .. ((byte & (1 << i)) > 0 and "1" or "0") + end + return binary +end + +-- Function to print TVB bytes with offset, hex, and binary representation +-- Example usage: +-- print_tvb_bytes(tsdu_tvb, tsdu_offset, 32, "last_block " .. last_block) +function print_tvb_bytes(tvb, offset, length, label) + local label = label or "" -- Default empty label if not provided + + dprint(string.format("%s tvb:length = %d", label, tvb:len())) + + -- Ensure we don't try to read beyond the TVB + local max_length = math.min(length, tvb:len() - offset) + + -- Determine format for byte numbering based on length + local byte_format = "byte%d" + if max_length >= 10 and max_length < 100 then + byte_format = "byte%02d" + elseif max_length >= 100 and max_length < 1000 then + byte_format = "byte%03d" + elseif max_length >= 1000 and max_length < 10000 then + byte_format = "byte%04d" + end + + for i = 0, max_length - 1 do + local byte = tvb(offset + i, 1):uint() + local byte_label = string.format(byte_format, i+1) + + dprint(string.format("%s %s[%d]: 0x%02X (binary %s)", + label, + byte_label, + offset + i, + byte, + byte_to_binary(byte))) + end +end + +local function dissect(tvb, pinfo, tree) + if not default_settings.enabled then + return 0 + end + + -- Check minimum length + -- + -- If this doesn't look like a P25 CAI frame, give up and return 0 so that + -- perhaps another dissector can take over. + if tvb:len() < 14 then + return 0 + end + + -- Set protocol name + pinfo.cols.protocol = "P25 CAI" + + -- Clear info column + pinfo.cols.info:clear() + + -- Get Data Unit ID (DUID) + local duid = bit.band(tvb(7, 1):uint(), 0xF) + + -- Set info column + pinfo.cols.info:set(data_unit_ids[duid] or ("Unknown Data Unit (0x" .. string.format("%02x", duid) .. ")")) + + -- Create protocol tree + local subtree = tree:add(p25cai, tvb()) + local offset = 0 + + -- Add frame sync + subtree:add(f.fs, tvb(offset, 6)) + offset = offset + 6 + + -- Extract status symbols + local extracted_tvb, outbound = extract_status_symbols(tvb, pinfo, subtree) + + -- Add NID fields + local nid_item = subtree:add(f.nid, extracted_tvb(offset, 8)) + local nid_tree = nid_item + nid_tree:add(f.nac, extracted_tvb(offset, 2)) + nid_tree:add(f.duid, extracted_tvb(offset, 2)) + offset = offset + 8 + + -- Process by DUID type + if duid == 0x0 then + -- Header Data Unit + local hdu_tvb = build_hdu_tvb(extracted_tvb, pinfo, offset) + local du_item = subtree:add(f.hdu, hdu_tvb(0)) + local du_tree = du_item + du_tree:add(f.mi, hdu_tvb(0, 9)) + du_tree:add(f.mfid, hdu_tvb(9, 1)) + du_tree:add(f.algid, hdu_tvb(10, 1)) + du_tree:add(f.kid, hdu_tvb(11, 2)) + local tgid = hdu_tvb(13, 2):uint() + du_tree:add(f.tgid, tgid):append_text(string.format(" (0x%04x)", tgid)) + + elseif duid == 0x3 then + -- Terminator without Link Control + -- Nothing left to decode + + elseif duid == 0x5 then + -- Logical Link Data Unit 1 + -- TODO: source ID field (user id of the sending unit) + -- TODO: destination ID field (user id of the intended recipient, only used for private voice messages) + -- TODO: emergency indicator, 1 bit, 0x0 for routine, non-emergency condition, 0x1 for emergency condition + local du_item = subtree:add(f.ldu1, extracted_tvb(offset)) + local du_tree = du_item + dissect_voice(extracted_tvb, du_tree, offset) + + -- Link Control (LC) Word + local lc_tvb = build_ldu_lc_tvb(extracted_tvb, pinfo, offset) + dissect_lc(lc_tvb, du_tree) + + local lsd_tvb = build_ldu_lsd_tvb(extracted_tvb, pinfo, offset) + du_tree:add(f.lsd, lsd_tvb(0, 2)) + + elseif duid == 0x7 then + -- Trunking Signaling Data Unit + local tsdu_tvb = build_tsdu_tvb(extracted_tvb, pinfo, offset) + local tsdu_offset = 0 + local last_block = 0 + + -- print_tvb_bytes(tsdu_tvb, 0, 32, "tsdu_tvb") + + while tsdu_offset < tsdu_tvb:len() do + -- Check if we have at least one more byte to read + if tsdu_offset >= tsdu_tvb:len() then + break + end + + last_block = bit.rshift(tsdu_tvb(tsdu_offset, 1):uint(), 7) + + local mfid = tsdu_tvb(tsdu_offset + 1, 1):uint() + + local du_item = subtree:add(f.tsbk, tsdu_tvb(tsdu_offset, 12)) + local du_tree = du_item + + du_tree:add(f.lbf, tsdu_tvb(tsdu_offset, 1)) + local is_protected = tsdu_tvb(tsdu_offset, 1) + ptbf_item = du_tree:add(f.ptbf, is_protected) + + + if mfid > 1 then + du_tree:add(f.unknown_opcode, tsdu_tvb(tsdu_offset, 1)) + elseif outbound == 1 then + du_tree:add(f.osp_opcode, tsdu_tvb(tsdu_offset, 1)) + else + du_tree:add(f.isp_opcode, tsdu_tvb(tsdu_offset, 1)) + end + + tsdu_offset = tsdu_offset + 1 + du_tree:add(f.mfid, tsdu_tvb(tsdu_offset, 1)) + tsdu_offset = tsdu_offset + 1 + du_tree:add(f.args, tsdu_tvb(tsdu_offset, 8)) + if outbound == 1 then + -- TODO:fix + local llid = tsdu_tvb(tsdu_offset+2, 2) + du_tree:add(f.llid, llid)--:append_text(string.format(" (0x%04x)", tgid)) + end + + tsdu_offset = tsdu_offset + 8 + du_tree:add(f.crc, tsdu_tvb(tsdu_offset, 2)) + tsdu_offset = tsdu_offset + 2 + -- If this was the last block, we're done after processing it + if last_block == 1 then + break + end + end + + elseif duid == 0xA then + -- Logical Link Data Unit 2 + local du_item = subtree:add(f.ldu2, extracted_tvb(offset)) + local du_tree = du_item + dissect_voice(extracted_tvb, du_tree, offset) + + local es_tvb = build_ldu_es_tvb(extracted_tvb, pinfo, offset) + dissect_es(es_tvb, du_tree) + + local lsd_tvb = build_ldu_lsd_tvb(extracted_tvb, pinfo, offset) + du_tree:add(f.lsd, lsd_tvb(0, 2)) + + elseif duid == 0xC then + -- Packet Data Unit + -- Not fully implemented, complex processing + + elseif duid == 0xF then + -- Terminator Data Unit with Link Control + local lc_tvb = build_term_lc_tvb(extracted_tvb, pinfo, offset) + dissect_lc(lc_tvb, subtree) + end + + return tvb:len() +end + +---------------------------------------- +-- The following creates the callback function for the dissector. +-- It's the same as doing "dns.dissector = function (tvbuf,pkt,root)" +-- The 'tvbuf' is a Tvb object, 'pktinfo' is a Pinfo object, and 'root' is a TreeItem object. + +-- Main dissector function +-- +-- Whenever Wireshark dissects a packet that our Proto is hooked into, it will call +-- this function and pass it these arguments for the packet it's dissecting. +-- +---@param tvb userdata Tvb object (Tapped Virtual Buffer represents captured packet data) +---@param pinfo userdata Pinfo object (Packet info) +---@param root userdata TreeItem object (Root of tree) +function p25cai.dissector(tvb, pinfo, root) + local ok, err = pcall(dissect, tvb, pinfo, root) + if not ok then + dprint("ERROR: dissect() returned false, err=" .. err) + else + dprint("dissect() returned true") + end +end + +-- Register the dissector +local udp_port = DissectorTable.get("udp.port") +udp_port:add(23456, p25cai) + +local dissector_info = { + version = "0.0.1", + author = "Ryan A. Chapman", + repository = "https://github.com/ryanchapman/p25_wireshark" +} + +set_plugin_info(dissector_info) diff --git a/dissectors/p4db/LICENSE b/dissectors/p4db/LICENSE new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/dissectors/p4db/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/dissectors/p4db/README.md b/dissectors/p4db/README.md new file mode 100644 index 0000000..0ec1bfa --- /dev/null +++ b/dissectors/p4db/README.md @@ -0,0 +1,47 @@ +# P4DB — traitement transactionnel dans le réseau + +Dissecteur Wireshark Lua des messages de **P4DB** (prototype de recherche +SIGMOD 2022 « P4DB - The Case for In-Network OLTP », TU Darmstadt — +groupe Data Management Lab) : SGBD distribué dont un commutateur +programmable P4 sert d'accélérateur pour les transactions. Il décode +l'en-tête petit-boutiste (type de message, taille, rang global du client, +numéro de transaction) et, pour LOCK_REQUEST et LOCK_GRANT, l'identifiant +de verrou, le mode et l'octroi. Types nommés : HELLO, SHUTDOWN, +LOCK_REQUEST, LOCK_RELEASE, VOTE_REQUEST, TX_END, TX_ABORT, LOCK_GRANT, +VOTE_RESPONSE, TRANSACTION_END_RESPONSE. + +Enregistré sur l'ethertype `0x1001` et le port UDP 4000. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/DataManagementLab/p4db (fichier `tests/wireshark_dissector.lua`, renommé ici `p4db.lua`) | +| Commit importé | `a221708787e23a1394cd116fbefb31f9a5506f4e` du 24/01/2023 (branche `master`, dernier commit ; dernière modification du script : `31e3ae7` du 07/06/2022) | +| Licence amont | Apache-2.0 (fichier `LICENSE`, copié ici ; le script n'a pas d'en-tête) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur P4DB natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `p4db.lua` | Protocole `p4db` sur ethertype `0x1001` et UDP 4000 | + +Fichier importé tel quel (seul le nom change) ; seule une en-tête SPDX + +provenance de quatre lignes a été ajoutée en tête. + +## Utilisation + +Copier `p4db.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `p4db`. + +## Remarques + +- **Conflit de port** : UDP 4000 est aussi le port du dissecteur natif + `icq` (ancien protocole ICQ) ; ce script le remplace sur ce port. +- Le champ `expiryTime` est déclaré mais ni enregistré ni utilisé ; les + octets 12 à 15 ne sont pas affichés ; pas de contrôle de longueur. La + fonction `get_msg_type` et la variable `length` sont globales, comme + dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/p4db/p4db.lua b/dissectors/p4db/p4db.lua new file mode 100644 index 0000000..97c907f --- /dev/null +++ b/dissectors/p4db/p4db.lua @@ -0,0 +1,85 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/DataManagementLab/p4db (tests/wireshark_dissector.lua), +-- commit a221708787e23a1394cd116fbefb31f9a5506f4e du 24/01/2023. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +local p4db_protocol = Proto("P4DB", "P4DB Protocol") + +local msg_type = ProtoField.int32("p4db.msgtype", "MessageType", base.DEC) +local msg_size = ProtoField.uint32("p4db.size", "Size", base.DEC) +local clientGlobalRank = ProtoField.uint32("p4db.clientGlobalRank", "clientGlobalRank", base.DEC) +local transactionNumber = ProtoField.uint64("p4db.transactionNumber", "transactionNumber", base.DEC) + +-- LockGrant fields +local lockId = ProtoField.uint64("p4db.lockId", "lockId", base.DEC) +local mode = ProtoField.int32("p4db.lockMode", "lockMode", base.DEC) +local granted = ProtoField.int32("p4db.granted", "granted", base.DEC) +local expiryTime = ProtoField.uint64("p4db.expiryTime", "expiryTime", base.DEC) + + +p4db_protocol.fields = { + msg_type, + msg_size, + clientGlobalRank, + transactionNumber, + + lockId, + mode, + granted, +} + + +function p4db_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = p4db_protocol.name + + local subtree = tree:add(p4db_protocol, buffer(), "P4DB Protocol Data") + + local type = buffer(0,4):le_int() + local type_name = get_msg_type(type) + subtree:add_le(msg_type, buffer(0,4)):append_text(" (" .. type_name .. ")") + + subtree:add_le(msg_size, buffer(4,4)) + subtree:add_le(clientGlobalRank, buffer(8,4)) + subtree:add_le(transactionNumber, buffer(16,8)) + + if type_name == 'LOCK_GRANT' then + subtree:add_le(lockId, buffer(24,8)) + subtree:add_le(mode, buffer(32,4)) + subtree:add_le(granted, buffer(36,4)) + elseif type_name == 'LOCK_REQUEST' then + subtree:add_le(lockId, buffer(24,8)) + subtree:add_le(mode, buffer(32,4)) + end +end + + +function get_msg_type(type) + local name = "Unknown" + + if type == 0x0000 then name = "HELLO" + elseif type == 0x0001 then name = "SHUTDOWN" + elseif type == 0x1000 then name = "LOCK_REQUEST" + elseif type == 0x1001 then name = "LOCK_RELEASE" + elseif type == 0x1002 then name = "VOTE_REQUEST" + elseif type == 0x1003 then name = "TX_END" + elseif type == 0x1004 then name = "TX_ABORT" + elseif type == 0x2000 then name = "LOCK_GRANT" + elseif type == 0x2001 then name = "VOTE_RESPONSE" + elseif type == 0x2002 then name = "TRANSACTION_END_RESPONSE" end + + return name + end + + + +local eth_type = DissectorTable.get("ethertype") +eth_type:add(0x1001, p4db_protocol) + + +local udp = DissectorTable.get("udp.port") +udp:add(4000, p4db_protocol) + + + \ No newline at end of file diff --git a/dissectors/p4xos-paxos/LICENSE b/dissectors/p4xos-paxos/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/dissectors/p4xos-paxos/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/p4xos-paxos/README.md b/dissectors/p4xos-paxos/README.md new file mode 100644 index 0000000..183ef4b --- /dev/null +++ b/dissectors/p4xos-paxos/README.md @@ -0,0 +1,45 @@ +# P4xos — Paxos dans le plan de données (UDP 34952) + +Dissecteur Wireshark Lua des messages **Paxos** de P4xos (consensus +Paxos implémenté dans des commutateurs programmables en P4, démonstrateur +bmv2 / Mininet) : type de message, instance, tour (*round*), tour du vote +(*vround*), identifiant de chemin de données (accepteur) et valeur +(32 octets). Port UDP 34952 (`0x8888`). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/usi-systems/p4xos-public (fichier `scripts/paxos.lua`) | +| Commit importé | `34f81008cf7bd72ce0a2e27eb64a0a3785203b81` du 29/01/2019 (branche `master`, dernier commit ; dernière modification de `paxos.lua` : `ee5b812` du 30/05/2016) | +| Licence amont | Apache-2.0 (fichier `LICENSE`, copié ici ; le script n'a pas d'en-tête) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Paxos natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `paxos.lua` | Protocole `paxos` sur UDP 34952 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `paxos.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `paxos`. + +## Remarques + +- **Format décalé par rapport au code P4 actuel** : le script (2016) lit + type 2 octets, instance 4, round 2, vround 2, chemin de données 2, + valeur 32 ; l'en-tête `p4src/includes/paxos_headers.p4` du même commit + définit type 1 octet, instance 2, round 1, vround 1, accepteur 8, + valeur 64. Les champs ne correspondent donc qu'à l'ancienne version. +- Pas de contrôle de longueur (paquet de moins de 44 octets → erreur). + Le commentaire amont parle du port 8002, le code utilise 34952. Le + troisième argument `FT_STRING` de `ProtoField.string` n'est pas une + valeur d'affichage valide (ignoré s'il vaut `nil`). Variables globales + `p_paxos`, `subtree`, `dissector`, comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/p4xos-paxos/paxos.lua b/dissectors/p4xos-paxos/paxos.lua new file mode 100644 index 0000000..4c693c5 --- /dev/null +++ b/dissectors/p4xos-paxos/paxos.lua @@ -0,0 +1,45 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/usi-systems/p4xos-public (scripts/paxos.lua), +-- commit 34f81008cf7bd72ce0a2e27eb64a0a3785203b81 du 29/01/2019. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- create paxos protocol and its fields +p_paxos = Proto ("paxos","Paxos Protocol") +local f_msgtype = ProtoField.uint16("paxos.msgtype", "MsgType", base.HEX) +local f_instance = ProtoField.uint32("paxos.instance", "Instance", base.HEX) +local f_round = ProtoField.uint16("paxos.round", "Round", base.HEX) +local f_vround = ProtoField.uint16("paxos.vround", "VRound", base.HEX) +local f_datapath = ProtoField.uint16("paxos.datapath", "Datapath", base.HEX) +local f_value = ProtoField.string("paxos.value", "Value", FT_STRING) + +p_paxos.fields = {f_instance, f_round, f_vround, f_datapath, f_msgtype, f_value} + +-- paxos dissector function +function p_paxos.dissector (buf, pkt, root) + -- validate packet length is adequate, otherwise quit + if buf:len() == 0 then return end + pkt.cols.protocol = p_paxos.name + + -- create subtree for paxos + subtree = root:add(p_paxos, buf(0)) + -- add protocol fields to subtree + subtree:add(f_msgtype, buf(0,2)):append_text(" [MsgType]") + subtree:add(f_instance, buf(2,4)):append_text(" [Instance]") + subtree:add(f_round, buf(6,2)):append_text(" [Round]") + subtree:add(f_vround, buf(8,2)):append_text(" [VRound]") + subtree:add(f_datapath, buf(10,2)):append_text(" [Datapath]") + subtree:add(f_value, buf(12,32)):append_text(" [Value]") + + -- description of payload + subtree:append_text("") +end + +-- Initialization routine +function p_paxos.init() +end + +-- register a chained dissector for port 8002 +local udp_dissector_table = DissectorTable.get("udp.port") +dissector = udp_dissector_table:get_dissector(34952) +-- you can call dissector from function p_paxos.dissec +-- so that the previous dissector gets called +udp_dissector_table:add(34952, p_paxos) diff --git a/dissectors/pentair-screenlogic/LICENSE b/dissectors/pentair-screenlogic/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/pentair-screenlogic/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/pentair-screenlogic/README.md b/dissectors/pentair-screenlogic/README.md new file mode 100644 index 0000000..fdf9060 --- /dev/null +++ b/dissectors/pentair-screenlogic/README.md @@ -0,0 +1,48 @@ +# Pentair ScreenLogic — automatisation de piscine + +Dissecteur Wireshark Lua du **protocole ScreenLogic de Pentair** +(passerelle réseau des automates de piscine et spa) : connexion, +défi / réponse, authentification, horloge, version, configuration du +contrôleur, état (températures, pompes, circuits, chloration au sel), +équipements, plannings… Chaque type de message est décodé par un +sous-protocole enregistré dans une table de dissecteurs `pentair`. +Port TCP 80. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/EdDuran/WireShark-ScreenLogic-Dissector | +| Commit importé | `032e1dc3e39ec579c25da10539ecc87cc4df7260` du 24/05/2023 (branche `main`, dernier commit, qui est aussi la dernière modification de `screenlogic.lua`) | +| Licence amont | GPL-3.0-only (`LICENSE` GPL v3 ; aucune mention « or later » dans le fichier ni le README ; en-tête du script : Keith Roberts, v1.0.0.0 du 24/05/2023) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Pentair natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `screenlogic.lua` | Protocole `pentair` (et sous-protocoles `pentair.*`) sur TCP 80 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `screenlogic.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `pentair`. + +## Remarques + +- **Prend le port TCP 80** : tant que le script est chargé, le trafic + HTTP sur ce port est décodé comme ScreenLogic. À ne charger que pour + analyser une passerelle ScreenLogic (ou changer le port localement). +- Le champ `Pentair.Password` affiche le mot de passe de connexion + transmis : attention avant de partager une capture. +- Utilise `bit.band` (bibliothèque `bit` fournie par Wireshark 4.4 et + plus) ; noms de protocoles et de champs avec majuscules, variables + globales, comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/pentair-screenlogic/screenlogic.lua b/dissectors/pentair-screenlogic/screenlogic.lua new file mode 100644 index 0000000..5a74d32 --- /dev/null +++ b/dissectors/pentair-screenlogic/screenlogic.lua @@ -0,0 +1,1300 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/EdDuran/WireShark-ScreenLogic-Dissector (screenlogic.lua), +-- commit 032e1dc3e39ec579c25da10539ecc87cc4df7260 du 24/05/2023. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +------------------------------------------------------------------------------- +-- +-- Pentair ScreenLogic Protocol WireShark Dissector +-- +-- Keith Roberts +-- keith.roberts66@comcast.net +-- +-- May 24, 2023 v1.0.0.0 +-- +------------------------------------------------------------------------------- + +local default_settings = +{ + debug_level = DEBUG, + port = 80 +} + +proto_pentair = Proto("Pentair", "Pentair ScreenLogic Protocol") +subproto_connect = Proto("Pentair.Connect", "Connect") +subproto_challenge = Proto("Pentair.Challenge", "Challenge") +subproto_challengeResponse = Proto("Pentair.ChallengeResponse", "Challenge Response") +subproto_login = Proto("Pentair.Login", "Login") +subproto_loginResponse = Proto("Pentair.LoginResponse", "Login Response") +subproto_saltConfig = Proto("Pentair.SaltConfig", "Salt Config") +subproto_saltConfigResponse = Proto("Pentair.SaltConfigResponse", "Salt Config Response") +subproto_setSaltConfig = Proto("Pentair.SetSaltConfig", "Set Salt Config") +subproto_setSaltConfigResponse = Proto("Pentair.SetSaltConfigResponse", "Set Salt Config Response") +subproto_allChemData = Proto("Pentair.AllChemData", "All Chem Data") +subproto_allChemDataResponse = Proto("Pentair.AllChemDataResponse", "All Chem Data Response") +subproto_pumpStatus = Proto("Pentair.PumpStatus", "Pump Status") +subproto_pumpStatusResponse = Proto("Pentair.PumpStatusResponse", "Pump Status Response") +subproto_controllerConfig = Proto("Pentair.ControllerConfig", "Controller Config") +subproto_controllerConfigResponse = Proto("Pentair.ControllerConfigResponse", "Controller Config Response") +subproto_status = Proto("Pentair.Status", "Status") +subproto_statusResponse = Proto("Pentair.StatusResponse", "Status Response") +subproto_version = Proto("Pentair.Version", "Version") +subproto_versionResponse = Proto("Pentair.VersionResponse", "Version Response") +subproto_pumpPresets = Proto("Pentair.Pump.Preset", "Pump Preset") +subproto_unknown = Proto("Pentair.Unknown", "Unknown") +subproto_scheduleChange = Proto("Pentair.ScheduleChange", "Schedule Change") +subproto_clock = Proto("Pentair.Clock", "Clock") +subproto_clockResponse = Proto("Pentair.ClockResponse", "Clock Response") +subproto_setClock = Proto("Pentair.SetClock", "Set Clock") +subproto_setClockResponse = Proto("Pentair.SetClockResponse", "Set Clock Response") +subproto_equipment = Proto("Pentair.Equipment", "Equipment") +subproto_equipmentResponse = Proto("Pentair.EquipmentResponse", "Equipment Response") + + +local vs_funcs = { + [99999] = "Connect", + [14] = "Challenge", + [15] = "Challenge Response", + [16] = "Ping", + [27] = "Login", + [28] = "Login Response", + [110] = "Get Controller Mode", + [111] = "Get Controller Mode Response", + [8058] = "Get Firmware", + [8059] = "Get Firmware Response", + [8110] = "Get Clock", + [8111] = "Get Clock Response", + [8112] = "Set Clock", + [8113] = "Set Clock Response", + [8120] = "Get Version", + [8121] = "Get Version Response", + [8300] = "Unknown", + [9611] = "Query", + [9612] = "Response", + [9806] = "Weather Forecast Change", + [9807] = "Get Weather Forecast", + [9808] = "Get Weather Forecast Response", + [12500] = "Status Change", + [12501] = "Schedule Change", + [12510] = "Get Circuit Definitions", + [12511] = "Get Circuit Definitions Response", + [12522] = "Add Client", + [12523] = "Add Client Response", + [12526] = "Get Status", + [12527] = "Get Status Response", + [12532] = "Get Controller Config", + [12533] = "Get Controller Config Response", + [12576] = "Set SCG Configuration", + [12577] = "Set SCG Configuration Response", + [12558] = "Get N Circuit Names", + [12559] = "Get N Circuit Names Response", + [12560] = "Get Circuit Names Response", + [12561] = "Get Circuit Names", + [12562] = "Get All Custom Names", + [12563] = "Get All Custom Names Response", + [12566] = "Get Equipment Configuration", + [12567] = "Get Equipment Configuration Response", + [12572] = "Get SCG Configuration", + [12573] = "Get SCG Configuration Response", + [12582] = "Get All Errors", + [12583] = "Get All Errors Response", + [12584] = "Get Pump Status", + [12585] = "Get Pump Status Response", + [12592] = "Get All Chem Data", + [12593] = "Get All Chem Data Response" +} + + +-- declare fields + +CONNECT = ProtoField.string("PENTAIR.CONNECT", "Connect", base.ASCII) +f_seq = ProtoField.uint16("Pentair.seq", "Sequence", base.DEC) +f_msg = ProtoField.uint16("Pentair.msg", "Message", base.DEC, vs_funcs) +f_len = ProtoField.uint16("Pentair.len", "Len", base.DEC) +f_byte = ProtoField.uint8("Pentair.Unknown8", "Unknown", base.HEX) +f_word16 = ProtoField.uint16("Pentair.Unknown16", "Unknown", base.HEX) +f_word = ProtoField.uint32("Pentair.Unknown32", "Unknown", base.HEX) +f_wordd = ProtoField.uint32("Pentair.Unknown32", "Unknown", base.DEC) +f_payload = ProtoField.bytes("Pentair.payload", "Payload", base.NONE) +f_text = ProtoField.string("Text", "Text", base.ASCII) +f_len32 = ProtoField.uint32("Pentair.Len32", "Len32", base.DEC) +f_processId = ProtoField.uint16("Pentair.ProcessId", "ProcessId", base.DEC) +f_clientVersion = ProtoField.string("Pentair.ClientVersion", "Client Version", base.ASCII) +f_password = ProtoField.string("Pentair.Password", "Password", base.ASCII) +f_firmwareVersion = ProtoField.string("Pentair.FirmwareVersion", "Firmware Version", base.ASCII) +f_controllerId = ProtoField.uint32("Pentair.ControllerId", "CtrlId", base.DEC) +f_saltPresent = ProtoField.string("Pentair.SaltPresent", "Salt Present", base.ASCII) +f_saltStatus = ProtoField.uint32("Pentair.SaltStatus", "Salt Status", base.HEX) +f_saltPoolLevel = ProtoField.uint32("Pentair.SaltPoolLevel", "Salt Pool Level", base.DEC) +f_saltSpaLevel = ProtoField.uint32("Pentair.SaltSpaLevel", "Salt Spa Level", base.DEC) +f_saltFlags = ProtoField.uint32("Pentair.SaltFlags", "Salt Flags", base.HEX) +f_saltPPM = ProtoField.uint32("Pentair.SaltPPM", "Salt PPM", base.DEC) +f_saltSuperTimer = ProtoField.uint32("Pentair.SaltSuperTimer", "Salt Super Timer", base.DEC) +f_poolMinSetPoint = ProtoField.uint8("Pentair.PoolMinSetPoint", "Pool Min Set Point", base.DEC) +f_poolMaxSetPoint = ProtoField.uint8("Pentair.PoolMaxSetPoint", "Pool Max Set Point", base.DEC) +f_spaMinSetPoint = ProtoField.uint8("Pentair.SpaMinSetPoint", "Spa Min Set Point", base.DEC) +f_spaMaxSetPoint = ProtoField.uint8("Pentair.SpaMaxSetPoint", "Spa Max Set Point", base.DEC) +f_isCelsius = ProtoField.string("Pentair.IsCelsius", "Is Celsius", base.ASCII) +f_typeStr = ProtoField.string("Pentair.Type", "Type", base.ASCII) +f_controllerType = ProtoField.uint8("Pentair.ControllerType", "Controller Type", base.DEC) +f_hardwareType = ProtoField.uint8("Pentair.HardwareType", "Hardware Type", base.DEC) +f_controllerBuffer = ProtoField.uint8("Pentair.ControllerBuffer", "Controller Buffer", base.DEC) +f_controllerData = ProtoField.uint8("Pentair.ControllerData", "Controller Data", base.DEC) +f_equipmentFlags = ProtoField.string("Pentair.EquipmentFlags", "Equipment Flags", base.ASCII) +f_circuit = ProtoField.string("Pentair.Circuit", "Circuit", base.ASCII) +f_cirCount = ProtoField.uint32("Pentair.CirCount", "Circuit Count", base.DEC) +f_cirId = ProtoField.uint32("Pentair.CirId", "Circuit Id", base.DEC) +f_pumpType = ProtoField.string("Pentair.PumpType", "Type", base.ASCII) +f_pumpState = ProtoField.string("Pentair.PumpState", "State", base.ASCII) +f_pumpWatts = ProtoField.uint32("Pentair.PumpWatts", "Watts", base.DEC) +f_pumpRPM = ProtoField.uint32("Pentair.PumpRPM", "RPM", base.DEC) +f_pumpGPM = ProtoField.uint32("Pentair.PumpGPM", "GPM", base.DEC) +f_pumpPresetCID = ProtoField.uint32("Pentair.Pump.Preset.CID", "CID", base.DEC) +f_pumpPresetSetPoint = ProtoField.uint32("Pentair.Pump.Preset.SetPoint", "Set Point", base.DEC) +f_pumpPresetIsRPM = ProtoField.uint32("Pentair.Pump.Preset.IsRPM", "Is RPM", base.DEC) +f_ok = ProtoField.uint32("Pentair.Status.Ok", "Ok", base.DEC) +f_freezeMode = ProtoField.uint8("Pentair.Status.FreezeMode", "Freeze Mode", base.DEC) +f_remotes = ProtoField.uint8("Pentair.Status.Remotes", "Remotes", base.DEC) +f_poolDelay = ProtoField.string("Pentair.Status.PoolDelay", "Pool Delay", base.ASCII) +f_spaDelay = ProtoField.string("Pentair.Status.SpaDelay", "Spa Delay", base.ASCII) +f_cleanerDelay = ProtoField.string("Pentair.Status.CleanerDelay", "Cleaner Delay", base.ASCII) +f_airTemp = ProtoField.uint32("Pentair.Status.AirTemp", "Air Temp", base.DEC) +f_lastTemp = ProtoField.uint32("Pentair.Status.Body.LastTemp", "Last Temp", base.DEC) +f_heatStatus = ProtoField.string("Pentair.Status.Body.HeatStatus", "Heat Status", base.ASCII) +f_heatSetPoint = ProtoField.uint32("Pentair.Status.Body.HeatSetPoint", "Heat Set Point", base.DEC) +f_heatMode = ProtoField.string("Pentair.Status.Body.HeatMode", "Heat Mode", base.ASCII) +f_coolSetPoint = ProtoField.uint32("Pentair.Status.Body.CoolSetPoint", "Cool Set Point", base.DEC) +f_bodyType = ProtoField.uint32("Pentair.Status.Body.Type", "Body Type", base.DEC) +f_cirType = ProtoField.uint32("Pentair.Status.Circuit.Type", "Circuit Type", base.DEC) +f_cirState = ProtoField.string("Pentair.Status.Circuit.State", "State", base.ASCII) +f_cirColorSet = ProtoField.uint8("Pentair.Status.Circuit.ColorSet", "Color Set", base.DEC) +f_cirColorPos = ProtoField.uint8("Pentair.Status.Circuit.ColorPos", "Color Pos", base.DEC) +f_cirColorStagger = ProtoField.uint8("Pentair.Status.Circuit.ColorStagger", "Color Stagger", base.DEC) +f_cirDelay = ProtoField.uint8("Pentair.Status.Circuit.Delay", "Delay", base.DEC) +f_ph = ProtoField.uint32("Pentair.Status.Circuit.Ph", "pH", base.DEC) +f_orp = ProtoField.uint32("Pentair.Status.Circuit.Orp", "ORP", base.DEC) +f_saturation = ProtoField.uint32("Pentair.Status.Circuit.Saturation", "Saturation", base.DEC) +f_phTank = ProtoField.uint32("Pentair.Status.Circuit.PhTank", "pH Tank", base.DEC) +f_orpTank = ProtoField.uint32("Pentair.Status.Circuit.OrpTank", "ORP Tank", base.DEC) +f_alarm = ProtoField.string("Pentair.Status.Circuit.Alarm", "Alarm", base.ASCII) + +f_nameIndex = ProtoField.uint8("Pentair.Status.Circuit.NameIndex", "Name Index", base.DEC) +f_function = ProtoField.string("Pentair.Status.Circuit.Function", "Function", base.ASCII) +f_interface = ProtoField.string("Pentair.Status.Circuit.Interface", "Interface", base.ASCII) +f_flags = ProtoField.uint8("Pentair.Status.Circuit.Flags", "Flags", base.DEC) +f_deviceId = ProtoField.uint8("Pentair.Status.Circuit.DeviceId", "Device ID", base.DEC) +f_defaultRT = ProtoField.uint8("Pentair.Status.Circuit.DefaultRT", "Default RT", base.DEC) + +f_year = ProtoField.uint16("Pentair.Date.Year", "Year", base.DEC) +f_month = ProtoField.uint16("Pentair.Date.Month", "Month", base.DEC) +f_day = ProtoField.uint16("Pentair.Date.Day", "Day", base.DEC) +f_hours = ProtoField.uint16("Pentair.Time.Hours", "Hours", base.DEC) +f_minutes = ProtoField.uint16("Pentair.Time.Minutes", "Minutes", base.DEC) +f_seconds = ProtoField.uint16("Pentair.Time.Seconds", "Seconds", base.DEC) +f_autoDST = ProtoField.string("Pentair.Time.AutoDST", "AutoDST", base.ASCII) +f_dayOfWeek = ProtoField.string("Pentair.Time.DayOfWeek", "Day of Week", base.ASCII) + + + +proto_pentair.fields = { + f_seq, f_msg, f_len, f_word16, f_payload, f_text, f_processId, f_controllerIndex, + f_clientVersion, f_password, f_firmwareVersion, f_wordd, f_controllerId, + f_saltPresent, f_saltStatus, f_saltPoolLevel, f_saltSpaLevel, f_saltFlags, + f_saltPPM, f_saltSuperTimer, f_poolMinSetPoint, f_poolMaxSetPoint, f_spaMinSetPoint, + f_spaMaxSetPoint, f_isCelsius, f_controllerType, f_hardwareType, f_controllerBuffer, + f_equipmentFlags, f_circuit, f_cirCount, f_cirId, f_pumpType, f_pumpState, f_pumpWatts, + f_pumpRPM, f_pumpGPM, f_pumpPresetCID, f_pumpPresetSetPoint, f_pumpPresetIsRPM, + f_ok, f_freezeMode, f_remotes, f_poolDelay, f_spaDelay, f_cleanerDelay, f_byte, + f_airTemp, f_lastTemp, f_heatStatus, f_heatSetPoint, f_heatMode, f_coolSetPoint, f_bodyType, + f_cirType, f_cirState, f_cirColorSet, f_cirColorPos, f_cirColorStagger, f_cirDelay, + f_ph, f_orp, f_saturation, f_phTank, f_orpTank, f_alarm, f_nameIndex, f_function, + f_interface, f_flags, f_deviceId, f_defaultRT, f_year, f_month, f_day, f_hours, f_minutes, + f_seconds, f_autoDST, f_dayOfWeek, f_len32, f_controllerData, +} + +f_schema = ProtoField.uint16("Login.Schema", "Schema", base.DEC) +f_type = ProtoField.uint16("Login.Type", "Connection Type", base.DEC) + +subproto_login.fields = { f_schema, f_type, f_word } + +f_mac = ProtoField.string("Pentair.MAC", "MAC", base.ASCII) + +subproto_challengeResponse.fields = { f_mac } + +f_controllerIndex = ProtoField.uint32("Pentair.ControllerIndex", "CtrlIndx", base.DEC) + +subproto_saltConfig.fields = { f_controllerIndex } + + +-- +-- ============================================================================ +-- +-- Pentair ScreenLogic Protocol +-- +function proto_pentair.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = proto_pentair.name + local packetLength = buffer:len(); + local offset = 0 + + local t_pentair = tree:add(proto_pentair, buffer(), "ScreenLogic Data") + -- + -- Special case for ConnectServerHost + -- + if packetLength >= 21 and buffer(offset,21):string() == "CONNECTSERVERHOST\r\n\r\n" then + local dissector = pentair_table:get_dissector(99999) + if (dissector ~= nil) then + dissector:call(buffer, pinfo, t_pentair) + else + t_pentair:add(f_text, string.format("Dissector 'connect' not found")) + end + else + -- Add the header tree item and populate + t_hdr = t_pentair:add(buffer(offset, 8), "Header") + local seq = buffer(offset, 2) + local msg = buffer(offset + 2, 2) + local len = buffer(offset + 4, 4) + + t_hdr:add_le(f_seq, seq) + t_hdr:add_le(f_msg, msg) + t_hdr:add_le(f_len, len) + + local msgCode = buffer(offset + 2, 2):le_uint() + offset = offset + 8 + -- + -- Look up Dissector for [msg] + -- + local dissector = pentair_table:get_dissector(msgCode) + if (dissector ~= nil) then + -- call dissector + dissector:call(buffer(offset,packetLength - offset):tvb(), pinfo, t_pentair) + else + t_hdr:add(f_text, string.format("Dissector %d not found", msgCode)) + -- Dissector not found, output payload bytes + if len:le_uint() ~= 0 then + local payloadLen = buffer:len() - offset + t_hdr:add(f_payload, buffer(offset, payloadLen)) + end + end + end +end -- pentair dissector + +-- +-- ============================================================================ +-- +-- Login +-- +-- (int) Schema [use 348] +-- (int) Connection type [use 0] +-- (String) Client Version [use ‘Android’] +-- (byte[ ]) Data [use array filled with zeros of length 16] • (int) Process ID [use 2] +-- +function subproto_login.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_login.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_login, buffer(), "Login") + + -- Schema (4) + -- Connection Type (4) + subtree:add_le(f_schema, buffer(offset,4)); offset = offset + 4 + subtree:add_le(f_type, buffer(offset,4)); offset = offset + 4 + + -- Client Version + local str, fullLen, newOffset = getString(buffer, offset) + subtree:add_le(f_len, buffer(offset, 4)); offset = offset + 4 + subtree:add(f_clientVersion, buffer(offset, fullLen)); offset = newOffset + + -- Password + str, fullLen, newOffset = getString(buffer, offset) + subtree:add_le(f_len, buffer(offset, 4)); offset = offset + 4 + subtree:add(f_password, buffer(offset, fullLen)); offset = newOffset + + -- Pad Byte + --offset = offset + 1 + + local processId = buffer(offset, 2):le_uint() + subtree:add_le(f_processId, buffer(offset, 4)); offset = offset + 4 + + if (packetLength > offset) then + subtree:add(f_payload, buffer(offset, packetLength - offset)) + end + +end + +-- +--------------------------------------- +-- +-- Login Response +-- +function subproto_loginResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_loginResponse.name + length = buffer:len() + local subtree = tree:add(subproto_login, buffer(), "Login Response") +-- subtree:add_le(f_schema, buffer(0,2)) +-- subtree:add_le(f_type, buffer(2,2)) +end + +-- +-- ============================================================================ +-- +-- Connect +-- +function subproto_connect.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_connect.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_connect, buffer(offset,21)) + local offset = 21 -- skip over "CONNECTSERVERHOST\r\n\r\n" + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset,packetLength - offset)) + end +end + +-- +-- ============================================================================ +-- +-- Challenge +-- +function subproto_challenge.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_challenge.name + local packetLength = buffer:len() + local offset = 0 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset,packetLength - offset)) + end +end + +-- +--------------------------------------- +-- +-- Challenge Response +-- +function subproto_challengeResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_challengeResponse.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_challengeResponse, buffer) + + local len = buffer(offset,4):le_uint() + subtree:add_le(f_len, buffer(offset,4)) + + local str, fullLen, newOffset = getString(buffer, offset); offset = offset +4 + subtree:add(f_mac, buffer(offset, fullLen)); offset = offset + fullLen + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset,packetLength - offset)) + end +end + +-- +-- ============================================================================ +-- +-- Salt Config +-- +function subproto_saltConfig.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_saltConfig.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_saltConfig, buffer) + + subtree:add(f_controllerIndex, buffer(offset, 4)); offset = offset + 4 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +--------------------------------------- +-- +-- Salt Config Response +-- +function subproto_saltConfigResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_saltConfigResponse.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_saltConfigResponse, buffer(), "Salt Config Response") + + local present = buffer(offset,4):le_uint(); + local str; if (present == 0) then str = "No" else str = "Yes" end + subtree:add(f_saltPresent, buffer(offset,4), str); offset = offset + 4; + + subtree:add_le(f_saltStatus, buffer(offset,4)); offset = offset + 4; + subtree:add_le(f_saltPoolLevel, buffer(offset,4)); offset = offset + 4; + subtree:add_le(f_saltSpaLevel, buffer(offset,4)); offset = offset + 4; + + local saltPPM = buffer(offset,4):le_uint() * 50 + subtree:add_le(f_saltPPM, buffer(offset,4), saltPPM); offset = offset + 4; + + subtree:add_le(f_saltFlags, buffer(offset,4)); offset = offset + 4; + subtree:add_le(f_saltSuperTimer, buffer(offset,4)); offset = offset + 4; + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +-- ============================================================================ +-- +-- Set Salt Config +-- +function subproto_setSaltConfig.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_setSaltConfig.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_setSaltConfig, buffer) + + subtree:add_le(f_controllerIndex, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_saltPoolLevel, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_saltSpaLevel, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_saltFlags, buffer(offset, 4)); offset = offset + 4; + subtree:add_le(f_saltSuperTimer, buffer(offset, 4)); offset = offset + 4; + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +--------------------------------------- +-- +-- Set Salt Config Response +-- +function subproto_setSaltConfigResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_setSaltConfigResponse.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_setSaltConfigResponse, buffer(), "Salt Config Response") + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +-- ============================================================================ +-- +-- Get All Chem Data +-- +function subproto_allChemData.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_allChemData.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_allChemData, buffer) + + subtree:add_le(f_controllerIndex, buffer(offset, 4)); offset = offset + 4 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +--------------------------------------- +-- +-- Get All Chem Data Response +-- +function subproto_allChemDataResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_allChemDataResponse.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_allChemDataResponse, buffer(), "Get All Chem Data Response") + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +-- ============================================================================ +-- +-- Pump Status +-- +function subproto_pumpStatus.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_pumpStatus.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_pumpStatus, buffer) + + subtree:add_le(f_controllerIndex, buffer(offset, 4)); offset = offset + 4 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +--------------------------------------- +-- +-- Pump Status Response +-- +function subproto_pumpStatusResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_pumpStatusResponse.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_pumpStatusResponse, buffer(), "Pump Status Response") + + local type = buffer(offset, 4):le_uint(); + subtree:add(f_pumpType, buffer(offset, 4), enum2string(type, PumpTypeMap)); offset = offset + 4; + + local state = buffer(offset, 4):le_uint(); + subtree:add(f_pumpState, buffer(offset, 4), enum2string(state, OnOffMap)); offset = offset + 4; + + subtree:add_le(f_pumpWatts, buffer(offset, 4)); offset = offset + 4; + subtree:add_le(f_pumpRPM, buffer(offset, 4)); offset = offset + 4; + subtree:add_le(f_word, buffer(offset, 4)); offset = offset + 4; + subtree:add_le(f_pumpGPM, buffer(offset, 4)); offset = offset + 4; + subtree:add_le(f_word, buffer(offset, 4)); offset = offset + 4; + -- + -- preset + -- + local len = packetLength - offset + local presets = subtree:add(subproto_pumpPresets, buffer(offset, len), "Presets") + for i = 0,7 do + -- if cid == Circuit["deviceId"] name = "Default" else name = Circuit["name"] + local preset = presets:add(subproto_pumpPresets, buffer(offset, 4+4+4), string.format("[%d]",i)) + preset:add_le(f_pumpPresetCID, buffer(offset, 4)); offset = offset + 4; + preset:add_le(f_pumpPresetSetPoint, buffer(offset, 4)); offset = offset + 4; + preset:add_le(f_pumpPresetIsRPM, buffer(offset, 4)); offset = offset + 4; + end + + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +function enum2string(value, map) + local str = map[value] + if (str == nil) then str = "Unknown" end + return string.format("%s (%d)", str, value) +end + +function enum2stringNoValue(value, map) + local str = map[value] + if (str == nil) then str = "Unknown" end + return str +end + +-- +-- ============================================================================ +-- +-- Controller Config +-- +function subproto_controllerConfig.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_controllerConfig.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_controllerConfig, buffer) + + subtree:add_le(f_controllerIndex, buffer(offset, 4)); offset = offset + 4 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +--------------------------------------- +-- +-- Controller Config Response +-- +function subproto_controllerConfigResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_controllerConfigResponse.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_controllerConfigResponse, buffer(), "Controller Config Response") + + -- Controller Id 4-bytes + subtree:add_le(f_controllerId, buffer(offset, 4)); offset = offset + 4 + + -- Pool Min Set Point 1-byte + subtree:add_le(f_poolMinSetPoint, buffer(offset, 1)); offset = offset + 1 + + -- Pool Max Set Point 1-byte + subtree:add_le(f_poolMaxSetPoint, buffer(offset, 1)); offset = offset + 1 + + -- Spa Min Set Point 1-byte + subtree:add_le(f_spaMinSetPoint, buffer(offset, 1)); offset = offset + 1 + + -- Spa Max Set Point 1-byte + subtree:add_le(f_spaMaxSetPoint, buffer(offset, 1)); offset = offset + 1 + + -- IsCelsius 1-byte + local isCelsius = buffer(offset,1):le_uint() + subtree:add(f_isCelsius, buffer(offset, 1), enum2string(isCelsius, YesNoMap)); offset = offset + 1 + + -- Controller Type 1-byte + -- Hardware Type 1-byte + local controllerType = buffer(offset,1):le_uint() + local hardwareType = buffer(offset+1,1):le_uint() + local type = (controllerType * 10) + hardwareType + local typeStr = enum2stringNoValue(type, ControllerTypeMap) + local typeTree = subtree:add(subproto_unknown, buffer(offset,2), typeStr) + typeTree:add_le(f_controllerType, buffer(offset, 1)); offset = offset + 1 + typeTree:add_le(f_hardwareType, buffer(offset, 1)); offset = offset + 1 + + -- Controller Buffer Type 1-byte + subtree:add_le(f_controllerBuffer, buffer(offset, 1)); offset = offset + 1 + + -- Equipment Flags 4-bytes + local flags = buffer(offset,4):le_uint() + local flagsStr = {} + for k, v in pairs(EquipmentFlagsMap) do + if (bit.band(flags,k) == k) then + flagsStr[#flagsStr+1] = tostring(v) + end + end + subtree:add(f_equipmentFlags, buffer(offset, 4), + string.format("%s (%d)", table.concat(flagsStr,","),flags)) + offset = offset + 4 + + -- Generic Circuit Name n-bytes + subtree:add_le(f_len, buffer(offset, 4)); + local str, fullLen, newOffset = getString(buffer, offset); offset = offset + 4 + subtree:add(f_circuit, buffer(offset, fullLen)):prepend_text("Generic ") + offset = newOffset + + -- Circuits + local circuitsOffsetStart = offset + local cirCount = buffer(offset, 4):le_uint(); + local cirTree = subtree:add(subproto_unknown, buffer(offset, 4), string.format("Circuits [%d]", cirCount)) + offset = offset + 4 + + for i = 1, cirCount do + local cirOffsetStart = offset + local cirId = buffer(offset, 4):le_uint() + local str, fullLen, newOffset = getString(buffer, offset+4); + local circuit = cirTree:add(subproto_unknown, buffer(offset, newOffset-offset), string.format("Circuit (%d) %s", cirId, str)) + offset = newOffset + + circuit:add(f_nameIndex, buffer(offset, 1)); offset = offset + 1 + local val = buffer(offset,1):le_uint(); + local str = enum2string(val, CircuitFunctionMap) + circuit:add(f_function, buffer(offset, 1), str); offset = offset + 1 + val = buffer(offset,1):le_uint(); + str = enum2string(val, CircuitInterfaceMap) + circuit:add(f_interface, buffer(offset, 1), str); offset = offset + 1 + circuit:add(f_flags, buffer(offset, 1)); offset = offset + 1 + circuit:add(f_cirColorSet, buffer(offset, 1)); offset = offset + 1 + circuit:add(f_cirColorStagger, buffer(offset, 1)); offset = offset + 1 + circuit:add(f_deviceId, buffer(offset, 1)); offset = offset + 1 + circuit:add(f_defaultRT, buffer(offset, 2)); offset = offset + 2 + circuit:add(f_byte, buffer(offset, 1)); offset = offset + 1 + circuit:add(f_byte, buffer(offset, 1)); offset = offset + 1 + circuit:add(f_byte, buffer(offset, 1)); offset = offset + 1 + circuit:set_len(offset - cirOffsetStart) + end + cirTree:set_len(offset - circuitsOffsetStart) + + -- Colors + local colorCount = buffer(offset, 4):le_uint(); + local colTree = subtree:add(subproto_unknown, buffer(offset, 4), string.format("Colors [%d]", colorCount)) + local colorsOffset = offset + + offset = offset + 4 + + for i = 1, colorCount do + local colorOffset = offset + local str, fullLen, newOffset = getString(buffer, offset); + local r = buffer(newOffset+0,4):le_uint(); + local g = buffer(newOffset+4,4):le_uint(); + local b = buffer(newOffset+8,4):le_uint(); + local color = colTree:add(subproto_unknown, buffer(offset, 0), + string.format("%s, R:%d, G:%d B:%d", str, r, g, b)) + offset = newOffset + color:add_le(f_wordd, buffer(offset,4)):set_text(string.format("Red: %d",r)); offset = offset + 4 + color:add_le(f_wordd, buffer(offset,4)):set_text(string.format("Green: %d",g)); offset = offset + 4 + color:add_le(f_wordd, buffer(offset,4)):set_text(string.format("Blue: %d",b)); offset = offset + 4 + color:set_len(offset - colorOffset) + end + colTree:set_len(offset - colorsOffset) + + subtree:add_le(f_byte, buffer(offset,1)):prepend_text("Pump Data: "); offset = offset + 1 -- pump data + subtree:add_le(f_byte, buffer(offset,1)):prepend_text("Pump Data: "); offset = offset + 1 -- pump data + subtree:add_le(f_byte, buffer(offset,1)):prepend_text("Pump Data: "); offset = offset + 1 -- pump data + subtree:add_le(f_byte, buffer(offset,1)):prepend_text("Pump Data: "); offset = offset + 1 -- pump data + subtree:add_le(f_byte, buffer(offset,1)):prepend_text("Pump Data: "); offset = offset + 1 -- pump data + subtree:add_le(f_byte, buffer(offset,1)):prepend_text("Pump Data: "); offset = offset + 1 -- pump data + subtree:add_le(f_byte, buffer(offset,1)):prepend_text("Pump Data: "); offset = offset + 1 -- pump data + subtree:add_le(f_byte, buffer(offset,1)):prepend_text("Pump Data: "); offset = offset + 1 -- pump data + + subtree:add_le(f_wordd, buffer(offset,4)):prepend_text("Interface Tab Flag: "); offset = offset + 4 -- interface tab flag + subtree:add_le(f_wordd, buffer(offset,4)):prepend_text("Show Alarms: "); offset = offset + 4 -- show alarms + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +-- Get the string at the specified buffer offset +-- buffer points to int32 length, followed by string +-- returns: +-- string +-- fullLen of string including trailing 0's +-- newOffset length +-- +function getString(buffer, offset) + local strLen = buffer(offset,4):le_uint(); offset = offset + 4 + local mod = strLen % 4 + local fullLen = strLen + if (mod ~= 0) then fullLen = strLen + (4 - mod) end + local str = buffer(offset, strLen):string() + newOffset = offset + fullLen + return str, fullLen, newOffset +end + +-- +------------------------------------------------------------------------------- +-- +-- Status +-- +function subproto_status.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_status.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_status, buffer) + + subtree:add_le(f_controllerIndex, buffer(offset, 4)); offset = offset + 4 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +--------------------------------------- +-- +-- Status Response +-- +function subproto_statusResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_statusResponse.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_statusResponse, buffer(), "Status Response") + local len + + subtree:add_le(f_ok, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_freezeMode, buffer(offset, 1)); offset = offset + 1 + subtree:add_le(f_remotes, buffer(offset, 1)); offset = offset + 1 + + local poolDelay = buffer(offset,1):le_uint() + local spaDelay = buffer(offset+1, 1):le_uint() + local cleanerDelay = buffer(offset+2, 1):le_uint() + + local delayTree = subtree:add(subproto_unknown, buffer(offset, 3), + string.format("Delays: Pool: %s, Spa: %s, Cleaner: %s", + enum2stringNoValue(poolDelay, YesNoMap), + enum2stringNoValue(spaDelay, YesNoMap), + enum2stringNoValue(cleanerDelay, YesNoMap)) + ) + delayTree:add(f_poolDelay, buffer(offset, 1), enum2string(poolDelay, YesNoMap)); offset = offset + 1 + delayTree:add(f_spaDelay, buffer(offset, 1), enum2string(spaDelay, YesNoMap)); offset = offset + 1 + delayTree:add(f_cleanerDelay, buffer(offset, 1), enum2string(cleanerDelay, YesNoMap)); offset = offset + 1 + + unknownTree = subtree:add(subproto_unknown, buffer(offset, 3), string.format("Unknown (%d)", 3)) + unknownTree:add(f_byte, buffer(offset, 1)); offset = offset + 1; + unknownTree:add(f_byte, buffer(offset, 1)); offset = offset + 1; + unknownTree:add(f_byte, buffer(offset, 1)); offset = offset + 1; + + subtree:add_le(f_airTemp, buffer(offset, 4)); offset = offset + 4; + -- + -- Body + -- + local bodyCount = buffer(offset,4):le_uint(); + len = bodyCount * (4*6) + 4; + local bodies = subtree:add(subproto_unknown, buffer(offset, len), "Bodies") + offset = offset + 4 + + for i=0,bodyCount-1 do + local bodyType = buffer(offset,4):le_uint(); + local bodyStart = offset; + + local lastTemp = buffer(offset+4, 4):le_uint(); + local heatStatus = buffer(offset+8, 4):le_uint(); + local heatSetPoint = buffer(offset+12, 4):le_uint(); + local coolSetPoint = buffer(offset+16, 4):le_uint(); + local heatMode = buffer(offset+20, 4):le_uint(); + + local bodyDetails = string.format("%s: @%d, %s:%s, Cool@%d, Heat@%d", + enum2string(bodyType, BodyMap), + lastTemp, + enum2stringNoValue(heatMode, HeatModeMap), + enum2stringNoValue(heatStatus, OnOffMap), + coolSetPoint, + heatSetPoint + ) + local bodyTree = bodies:add(subproto_unknown, buffer(bodyStart, 4*6), bodyDetails) + + + offset = offset + 4 + bodyTree:add_le(f_lastTemp, buffer(offset, 4)); offset = offset + 4 + local heatStatus = buffer(offset,4):le_uint() + bodyTree:add(f_heatStatus, buffer(offset, 4), enum2string(heatStatus, OnOffMap)); offset = offset + 4 + bodyTree:add_le(f_heatSetPoint, buffer(offset, 4)); offset = offset + 4 + bodyTree:add_le(f_coolSetPoint, buffer(offset, 4)); offset = offset + 4 + local heatMode = buffer(offset,4):le_uint() + bodyTree:add(f_heatMode, buffer(offset, 4), enum2string(heatMode, HeatModeMap)); offset = offset + 4 + end + + -- Circuit Count 4 + + local cirCount = buffer(offset,4):le_uint() + local circuits = subtree:add(subproto_unknown, buffer(offset, (cirCount*12)+4), string.format("Circuits (%d)", cirCount)) + offset = offset + 4 + + -- For i=1,CircuitCount do + -- Circuit Id 4 + -- Circuit State 4 + -- Color Set 1 + -- Color Pos 1 + -- Color Stagger 1 + -- Circuit Delay 1 + + for i=1,cirCount do + local cirId = buffer(offset,4):le_uint() + offset = offset + 4 + local cirState = buffer(offset,4):le_uint() + local cirStateStr = enum2string(cirState, OnOffMap) + local cirStateStrWO = enum2stringNoValue(cirState, OnOffMap) + local cirTree = circuits:add(subproto_unknown, buffer(offset,12), string.format("Circuit [%d]: %s", cirId, cirStateStrWO)) + cirTree:add_le(f_cirState, buffer(offset, 4), cirStateStr); offset = offset + 4 + cirTree:add_le(f_cirColorSet, buffer(offset, 1)); offset = offset + 1 + cirTree:add_le(f_cirColorPos, buffer(offset, 1)); offset = offset + 1 + cirTree:add_le(f_cirColorStagger, buffer(offset, 1)); offset = offset + 1 + cirTree:add_le(f_cirDelay, buffer(offset, 1)); offset = offset + 1 + end + + -- PH 4 + -- ORP 4 + -- Saturation 4 + -- SaltPPM 4 + -- PHTank 4 + -- ORPTank 4 + -- Alarm 4 + + subtree:add_le(f_ph, buffer(offset,4)); offset = offset + 4 + subtree:add_le(f_orp, buffer(offset,4)); offset = offset + 4 + subtree:add_le(f_saturation, buffer(offset,4)); offset = offset + 4 + local saltPPM = buffer(offset,4):le_uint() + subtree:add(f_saltPPM, buffer(offset,4), saltPPM*50); offset = offset + 4 + subtree:add_le(f_phTank, buffer(offset,4)); offset = offset + 4 + subtree:add_le(f_orpTank, buffer(offset,4)); offset = offset + 4 + + local alarm = buffer(offset,4):le_uint() + subtree:add_le(f_alarm, buffer(offset,4), enum2string(alarm, YesNoMap)); offset = offset + 4 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +-- ============================================================================ +-- +-- Firmware Version +-- +function subproto_version.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_version.name + local packetLength = buffer:len() + local offset = 0 +end + +-- +--------------------------------------- +-- +-- Firmware Version Response +-- +function subproto_versionResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_versionResponse.name + local packetLength = buffer:len() + local offset = 0 + local subtree = tree:add(subproto_versionResponse, buffer(), "Firmware Version Response") + + -- Firmware Version + local str, fullLen, newOffset = getString(buffer, offset) + subtree:add_le(f_len, buffer(offset, 4)); offset = offset + 4; + subtree:add(f_firmwareVersion, buffer(offset, fullLen)); offset = newOffset + + subtree:add_le(f_wordd, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_wordd, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_wordd, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_wordd, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_wordd, buffer(offset, 4)); offset = offset + 4 + subtree:add_le(f_wordd, buffer(offset, 4)); offset = offset + 4 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end +end + +-- +-- ============================================================================ +-- +-- Unknown +-- +function subproto_unknown.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_unknown.name + local packetLength = buffer:len() + local offset = 0 + + local subtree = tree:add(subproto_unknown, buffer(), "Unknown") + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end + +end + +-- +-- ============================================================================ +-- +-- Schedule Change +-- +function subproto_scheduleChange.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_scheduleChange.name + local packetLength = buffer:len() + local offset = 0 + + local subtree = tree:add(subproto_unknown, buffer(), "Unknown") + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end + +end + +-- +-- ============================================================================ +-- +-- Clock Request +-- +function subproto_clock.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_clock.name + local packetLength = buffer:len() + local offset = 0 + +end + +-- +-- ============================================================================ +-- +-- Equipment +-- +function subproto_equipment.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_equipment.name + local packetLength = buffer:len() + local offset = 0 + + subtree:add_le(f_controllerIndex, buffer(offset, 4)); offset = offset + 4 + + if packetLength > offset then + subtree:add_le(f_payload, buffer(offset, packetLength - offset)) + end + + return offset + +end + +-- +-- ============================================================================ +-- +-- Equipment Response +-- +function subproto_equipmentResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_equipmentResponse.name + local packetLength = buffer:len() + local offset = 0 + + local subtree = tree:add(subproto_equipment, buffer(), "Equipment") + + local controllerType = buffer(offset,1):le_uint() + local hardwareType = buffer(offset+1,1):le_uint() + local type = (controllerType * 10) + hardwareType + local typeStr = enum2stringNoValue(type, ControllerTypeMap) + local typeTree = subtree:add(subproto_unknown, buffer(offset,2), typeStr) + typeTree:add_le(f_controllerType, buffer(offset, 1)); offset = offset + 1 + typeTree:add_le(f_hardwareType, buffer(offset, 1)); offset = offset + 1 + + subtree:add_le(f_byte, buffer(offset,1)); offset = offset + 1 + subtree:add_le(f_byte, buffer(offset,1)); offset = offset + 1 + subtree:add_le(f_controllerData, buffer(offset,4)); offset = offset + 4 + + offset = getArray(subtree, buffer, offset, "Version Data") + offset = getArray(subtree, buffer, offset, "Speed Data") + offset = getArray(subtree, buffer, offset, "Valve Data") + offset = getArray(subtree, buffer, offset, "Remote Data") + offset = getArray(subtree, buffer, offset, "Sensor Data") + offset = getArray(subtree, buffer, offset, "Delay Data") + offset = getArray(subtree, buffer, offset, "Macros Data") + offset = getArray(subtree, buffer, offset, "Misc Data") + offset = getArray(subtree, buffer, offset, "Light Data") + offset = getArray(subtree, buffer, offset, "Flows Data") + offset = getArray(subtree, buffer, offset, "SGS Data") + offset = getArray(subtree, buffer, offset, "Spa Flows Data") + + + return offset +end + +-- +-- Get Equipment Data array +-- +-- Return: new Offset +-- +function getArray(tree, buffer, offset, name) + print("getArray("..name.."): offset="..offset) + local len = buffer(offset,4):le_uint() + print("len="..len) + + local arrayTree = tree:add(subproto_unknown, buffer(offset,len+4), name) + + arrayTree:add_le(f_len32, buffer(offset,4)); offset = offset + 4 + arrayTree:add_le(f_payload, buffer(offset, len)) + + local mod = len % 4 + if (mod ~= 0) then + print("..mod="..mod) + len = len + (4 - mod) + end + + + newOffset = offset + len + print("..newOffset="..newOffset) + return newOffset +end + + + + +-- +-- ============================================================================ +-- +-- Clock Response +-- +function subproto_clockResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_clockResponse.name + local packetLength = buffer:len() + local offset = 0 + + return DecodeClock(buffer, pinfo, tree, offset) + +end + + +-- +-- ============================================================================ +-- +-- Set Clock +-- +function subproto_setClock.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_setClock.name + local packetLength = buffer:len() + local offset = 0 + + return DecodeClock(buffer, pinfo, tree, offset) +end + +function DecodeClock(buffer, pinfo, tree, offset) + local year = buffer(offset,2):le_uint(); offset = offset + 2 + local month = buffer(offset,2):le_uint(); offset = offset + 2 + local dayOfWeek = buffer(offset,2):le_uint(); offset = offset + 2 + local day = buffer(offset,2):le_uint(); offset = offset + 2 + local hours = buffer(offset,2):le_uint(); offset = offset + 2 + local minutes = buffer(offset,2):le_uint(); offset = offset + 2 + local seconds = buffer(offset,2):le_uint(); offset = offset + 2 + local unk2 = buffer(offset,2):le_uint(); offset = offset + 2 + local autoDST = buffer(offset,2):le_uint(); offset = offset + 2 + local unk3 = buffer(offset,2):le_uint(); offset = offset + 2 + + local Clock = string.format("Clock: %s %s %d, %d %02d:%02d:%02d %s", + DayOfWeekMap[dayOfWeek], MonthMap[month], day, year, hours, minutes, seconds, + ternary(autoDST == 1, "AutoDST", "ManualDST")) + + local subtree = tree:add(subproto_clockResponse, buffer(), Clock); + offset = 0; + + subtree:add_le(f_year, buffer(offset, 2)); offset = offset + 2; + subtree:add_le(f_month, buffer(offset, 2)); offset = offset + 2; + subtree:add(f_dayOfWeek, buffer(offset, 2), enum2string(dayOfWeek, DayOfWeekMap)); offset = offset + 2; + subtree:add_le(f_day, buffer(offset, 2)); offset = offset + 2; + subtree:add_le(f_hours, buffer(offset, 2)); offset = offset + 2; + subtree:add_le(f_minutes, buffer(offset, 2)); offset = offset + 2; + subtree:add_le(f_seconds, buffer(offset, 2)); offset = offset + 2; + subtree:add_le(f_word16, buffer(offset, 2)); offset = offset + 2; + subtree:add(f_autoDST, buffer(offset, 2), enum2string(autoDST, YesNoMap)); offset = offset + 2; + + subtree:add_le(f_word16, buffer(offset, 2)); offset = offset + 2; + + return offset; +end + + +-- +-- ============================================================================ +-- +-- Set Clock +-- +function subproto_setClockResponse.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = subproto_setClockResponse.name + local packetLength = buffer:len() + local offset = 0 + +end + +-- +-- ============================================================================= +-- +-- Ternary Operator .. ie, ( condition ? true : false ) +-- +function ternary(cond, T, F) + if cond then return T else return F end +end + + +-- +-- ============================================================================ +-- +-- Enumeration Maps +-- + BodyMap = {} + BodyMap[0] = "Pool" + BodyMap[1] = "Spa" + + OnOffMap = {} + OnOffMap[0] = "Off" + OnOffMap[1] = "On" + + YesNoMap = {} + YesNoMap[0] = "No" + YesNoMap[1] = "Yes" + + HeatModeMap = {} + HeatModeMap[0] = "Off" + HeatModeMap[1] = "Solar" + HeatModeMap[2] = "Solar Preferred" + HeatModeMap[3] = "Heater" + HeatModeMap[4] = "Do Not Change" + + PumpTypeMap = {} + PumpTypeMap[0] = "None" + PumpTypeMap[1] = "Intelliflo VF" + PumpTypeMap[2] = "Intelliflo VS" + PumpTypeMap[3] = "Intelliflow VSF" + + ControllerTypeMap = {} + ControllerTypeMap[0] = "IntelliTouch i5+3S" + ControllerTypeMap[10] = "IntelliTouch i7+3" + ControllerTypeMap[20] = "IntelliTouch i9+3" + ControllerTypeMap[30] = "IntelliTouch i5+3S" + ControllerTypeMap[40] = "IntelliTouch i9+3S" + ControllerTypeMap[50] = "IntelliTouch i10+3D" + ControllerTypeMap[51] = "IntelliTouch i10X" + ControllerTypeMap[110] = "Suntouch/Intellicom" + ControllerTypeMap[130] = "EasyTouch2 8" + ControllerTypeMap[131] = "EasyTouch2 8P" + ControllerTypeMap[132] = "EasyTouch2 4" + ControllerTypeMap[133] = "EasyTouch2 4P" + ControllerTypeMap[135] = "EasyTouch2 PL4" + ControllerTypeMap[136] = "EasyTouch2 PSL4" + ControllerTypeMap[140] = "EasyTouch1 8" + ControllerTypeMap[141] = "EasyTouch1 8P" + ControllerTypeMap[142] = "EasyTouch1 4" + ControllerTypeMap[143] = "EasyTouch1 4P" + + CircuitFunctionMap = {} + CircuitFunctionMap[0] = "Generic" + CircuitFunctionMap[1] = "Spa" + CircuitFunctionMap[2] = "Pool" + CircuitFunctionMap[5] = "Master Cleaner" + CircuitFunctionMap[7] = "Light" + CircuitFunctionMap[8] = "Dimmer" + CircuitFunctionMap[9] = "Sam Light" + CircuitFunctionMap[10] = "Sal Light" + CircuitFunctionMap[11] = "PhotonGen" + CircuitFunctionMap[12] = "Color Wheel" + CircuitFunctionMap[13] = "Valve" + CircuitFunctionMap[14] = "Spillway" + CircuitFunctionMap[15] = "Floor Cleaner" + CircuitFunctionMap[16] = "IntelliBrite" + CircuitFunctionMap[17] = "MagicStream" + + + CircuitInterfaceMap = {} + CircuitInterfaceMap[0] = "Pool" + CircuitInterfaceMap[1] = "Spa" + CircuitInterfaceMap[2] = "Generic Feature" + CircuitInterfaceMap[3] = "Light" + CircuitInterfaceMap[4] = "IntelliBrite" + + EquipmentFlagsMap = {} + EquipmentFlagsMap[0x0001] = "Solar" + EquipmentFlagsMap[0x0002] = "Solar as Heat Pump" + EquipmentFlagsMap[0x0004] = "Chlorinator" + EquipmentFlagsMap[0x0008] = "Bit-3" + EquipmentFlagsMap[0x0010] = "Bit-5" + EquipmentFlagsMap[0x0020] = "Spa Side Remote" + EquipmentFlagsMap[0x0800] = "Cooling" + EquipmentFlagsMap[0x8000] = "Intellichem" + + MonthMap = {} + MonthMap[1] = "Jan" + MonthMap[2] = "Feb" + MonthMap[3] = "Mar" + MonthMap[4] = "Apr" + MonthMap[5] = "May" + MonthMap[6] = "Jun" + MonthMap[7] = "Jul" + MonthMap[8] = "Aug" + MonthMap[9] = "Sep" + MonthMap[10] = "Oct" + MonthMap[11] = "Nov" + MonthMap[12] = "Dec" + + DayOfWeekMap = {} + DayOfWeekMap[0] = "Mon" + DayOfWeekMap[1] = "Tue" + DayOfWeekMap[2] = "Wed" + DayOfWeekMap[3] = "Thu" + DayOfWeekMap[4] = "Fri" + DayOfWeekMap[5] = "Sat" + DayOfWeekMap[6] = "Sun" + +-- +-- ============================================================================ +-- +-- Load TCP Port Table +-- Register Pentair to Port 80 +-- +tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(80, proto_pentair) + +pentair_table = DissectorTable.new("pentair") +pentair_table:add(99999, subproto_connect) +pentair_table:add(14, subproto_challenge) +pentair_table:add(15, subproto_challengeResponse) +pentair_table:add(27, subproto_login) +pentair_table:add(28, subproto_loginResponse) +pentair_table:add(8110, subproto_clock) +pentair_table:add(8111, subproto_clockResponse) +pentair_table:add(8112, subproto_setClock) +pentair_table:add(8113, subproto_setClockResponse) +pentair_table:add(8120, subproto_version) +pentair_table:add(8121, subproto_versionResponse) +pentair_table:add(8300, subproto_unknown) +pentair_table:add(12501, subproto_scheduleChange) +pentair_table:add(12526, subproto_status) +pentair_table:add(12527, subproto_statusResponse) +pentair_table:add(12532, subproto_controllerConfig) +pentair_table:add(12533, subproto_controllerConfigResponse) +pentair_table:add(12566, subproto_equipment) +pentair_table:add(12567, subproto_equipmentResponse) +pentair_table:add(12572, subproto_saltConfig) +pentair_table:add(12573, subproto_saltConfigResponse) +pentair_table:add(12576, subproto_setSaltConfig) +pentair_table:add(12577, subproto_setSaltConfigResponse) +pentair_table:add(12584, subproto_pumpStatus) +pentair_table:add(12585, subproto_pumpStatusResponse) +pentair_table:add(12592, subproto_allChemData) +pentair_table:add(12593, subproto_allChemDataResponse) diff --git a/dissectors/perfect-prime-co2000/LICENSE b/dissectors/perfect-prime-co2000/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/dissectors/perfect-prime-co2000/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/perfect-prime-co2000/README.md b/dissectors/perfect-prime-co2000/README.md new file mode 100644 index 0000000..94ce7c5 --- /dev/null +++ b/dissectors/perfect-prime-co2000/README.md @@ -0,0 +1,48 @@ +# Perfect Prime CO2000 — enregistreur USB CO₂ / température / humidité + +Dissecteur Wireshark Lua du **protocole USB de l'enregistreur Perfect +Prime CO2000** (aussi vendu sous la référence HT2000) : sur les trames de +32 octets, décodage de la température (°C), de l'humidité relative (%) +et de la concentration en CO₂ (ppm). Le script s'enregistre dans la table +`usb.control` (classes `0xff` et `0xffff`) et documente en commentaire le +format de la charge et l'identifiant USB (`10c4:82cd`). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/vortextube/Perfect-Prime-CO2000 | +| Commit importé | `09c98a03425359b2d8712a0dd5790ae568585638` du 17/01/2017 (branche `master`, dernier commit, qui est aussi la dernière modification de `co2000.lua`) | +| Licence amont | GPL-3.0-or-later (`LICENSE` GPL v3 ; en-tête : « either version 3 of the License, or (at your option) any later version », © 2016 Charles Robert Hill) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur CO2000 / HT2000 natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `co2000.lua` | Protocole `co2000` sur la table `usb.control` | + +Fichier importé tel quel (fins de ligne CRLF conservées) ; seule une +en-tête SPDX + provenance de quatre lignes a été ajoutée en tête. + +## Utilisation + +Lancer `wireshark -X lua_script:co2000.lua capture-usb.pcapng` (usage +amont) ou copier le fichier dans le dossier `plugins` de Wireshark, puis +filtrer avec `co2000`. + +## Remarques + +- **Ne se charge probablement pas tel quel dans Wireshark 4.x** : le + script appelle `Field.new("usb.endpoint_number.endpoint")`, champ + supprimé des versions récentes (remplacé par + `usb.endpoint_address.number`) ; or `Field.new` sur un champ inconnu + déclenche une erreur au chargement. La variable obtenue n'est pas + utilisée : contournement local, supprimer cette ligne ou y mettre + `usb.endpoint_address.number` (code amont non modifié ici). +- Les valeurs sont des éléments texte, non filtrables ; l'alarme décrite + en commentaire n'est pas décodée. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/perfect-prime-co2000/co2000.lua b/dissectors/perfect-prime-co2000/co2000.lua new file mode 100644 index 0000000..3bd6461 --- /dev/null +++ b/dissectors/perfect-prime-co2000/co2000.lua @@ -0,0 +1,197 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/vortextube/Perfect-Prime-CO2000 (co2000.lua), +-- commit 09c98a03425359b2d8712a0dd5790ae568585638 du 17/01/2017. +-- Licence amont : GPL-3.0-or-later (LICENSE amont) — voir README.md. +-- co2000.lua +-- Wireshark dissector for the C02000 CO2/Temp./RH Data Logger +-- from Perfect Prime. +-- https://perfect-prime.com/collections/data-logger-temperature-humidity-co2/products/co2000-perfectprime +-- https://perfect-prime.com/pages/downloads-perfectprime +-- +-- Copyright (c) 2016 Charles Robert Hill +-- +-- 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 3 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, see . +-- +-- Usage: wireshark -X lua_script:co2000.lua +-- +-- Thanks to these excellent scripts as examples of USB dissectors for +-- Wireshark. +-- https://github.com/danielkitta/sigrok-util/blob/master/debug/sysclk-lwla/sysclk-lwla-dissector.lua +-- https://github.com/karlp/swopy/blob/master/stlink2.ws.lua +-- + +debug("starting co2000.lua\n") + +-- declare the protocol for Wireshark +co2000_proto = Proto("co2000", "HT2000 USB Protocol") +debug("co2000_proto registered\n") + +local f_usb_ep_num = Field.new("usb.endpoint_number.endpoint") + +local function getstring(fi) + local ok, val = pcall(tostring, fi) + if not ok then val = "(unknown)" end + return val +end + +function co2000_proto.dissector(buffer, pinfo, tree) + + debug("co2000_proto dissector called") + + pinfo.cols["protocol"] = "C02000" + + -- create protocol tree + local tree_c02000 = tree:add(co2000_proto, buffer(),"C02000 Protocol Data") + + -- get the length of the buffer + -- 32 bytes is the size of the data buffer containing environment data + local buffer_length = buffer:len() + + if buffer_length == 32 then + + local temp_buff = buffer(7,2) + local rh_buff = buffer(9,2) + local co2_buff = buffer(24,2) + + local temp = (temp_buff:uint() / 10) - 40 + local rh = rh_buff:uint() / 10 + local co2 = co2_buff:uint() + + tree_c02000:add(temp_buff,"Temperature: " .. temp) + tree_c02000:add(rh_buff,"Humidity: " .. rh) + tree_c02000:add(co2_buff,"C02: " .. co2) + end + +end + +function co2000_proto.init() + debug("co2000_proto init called") + + usb_table_control = DissectorTable.get("usb.control") + usb_table_control:add(0xff, co2000_proto) + usb_table_control:add(0xffff, co2000_proto) + +end + + +--[[ + + +data payload +=============================================================================== + + 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-------------------------------------------------------------------------------- +05587e365e 02e4 0278 01a9 0190032000640384b0030007d0 050c 0000 07d0 0000 +05016a9994 02e4 0292 0210 0190032000640384b0030007d0 058b 0000 03e8 0000 + temp rh co2 alarm + +temperature = ((half word at bytes 7, 8 lsb last) / 10) - 40 +relative humidity = ((half word at bytes 9, 10 lsb last) / 10 +carbon dioxide (ppm) = half word at bytes 24, 25 lsb last +alarm = half word at bytes 30, 31 lsb last + +lsusb output +=============================================================================== +Bus 002 Device 008: ID 10c4:82cd Cygnal Integrated Products, Inc. + +dmesg output +=============================================================================== +[3059462.674079] usb 1-2: USB disconnect, device number 15 +[4134065.924027] usb 2-2: new full-speed USB device number 6 using uhci_hcd +[4134066.073545] usb 2-2: New USB device found, idVendor=10c4, idProduct=82cd +[4134066.073550] usb 2-2: New USB device strings: Mfr=1, Product=2, +SerialNumber=0 +[4134066.073553] usb 2-2: Product: HT2000 +[4134066.073556] usb 2-2: Manufacturer: SLAB +[4134066.088765] hid-generic 0003:10C4:82CD.0005: hiddev0,hidraw3: USB HID +v1.01 Device [SLAB HT2000] on usb-0000:00:1d.0-2/input0 + +lsusb -D /dev/bus/usb/002/008 output +=============================================================================== +Device: ID 10c4:82cd Cygnal Integrated Products, Inc. +Device Descriptor: + bLength 18 + bDescriptorType 1 + bcdUSB 1.10 + bDeviceClass 0 + bDeviceSubClass 0 + bDeviceProtocol 0 + bMaxPacketSize0 64 + idVendor 0x10c4 Cygnal Integrated Products, Inc. + idProduct 0x82cd + bcdDevice 0.00 + iManufacturer 1 SLAB + iProduct 2 HT2000 + iSerial 0 + bNumConfigurations 1 + Configuration Descriptor: + bLength 9 + bDescriptorType 2 + wTotalLength 41 + bNumInterfaces 1 + bConfigurationValue 1 + iConfiguration 0 + bmAttributes 0x80 + (Bus Powered) + MaxPower 64mA + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 0 + bAlternateSetting 0 + bNumEndpoints 2 + bInterfaceClass 3 Human Interface Device + bInterfaceSubClass 0 + bInterfaceProtocol 0 + iInterface 0 + Warning: Descriptor too short + HID Device Descriptor: + bLength 9 + bDescriptorType 33 + bcdHID 1.01 + bCountryCode 0 Not supported + bNumDescriptors 2 + bDescriptorType 34 Report + wDescriptorLength 128 + bDescriptorType 123 (null) + wDescriptorLength 26135 + Report Descriptors: + ** UNAVAILABLE ** + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x81 EP 1 IN + bmAttributes 3 + Transfer Type Interrupt + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 10 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x01 EP 1 OUT + bmAttributes 3 + Transfer Type Interrupt + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 10 +Device Status: 0x0000 + (Bus Powered) + + +]]-- \ No newline at end of file diff --git a/dissectors/pinoccio-p2p/LICENSE b/dissectors/pinoccio-p2p/LICENSE new file mode 100644 index 0000000..36f94c0 --- /dev/null +++ b/dissectors/pinoccio-p2p/LICENSE @@ -0,0 +1,59 @@ + +The contents of uracoli is licensed with a Modified BSD License. + +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. + +See the license information in the individual source files for details. + +Additions and corrections to this file are welcome. + +_______________________________________________________________________________ + +Portions of µracoli are Copyright (c) 2007-2013 + Joerg Wunsch, + Daniel Thiele, + Karl Fessel, + Marco Arena, + Matthias Vorwerk, + Bjoern Riemer, + Samuel Klipphahn, + Eric Gnoske, + Axel Wachtler, + Atmel Corporation. + All rights reserved. + +Portions of µracoli documentation are Copyright (c) 2007-2013 + Joerg Wunsch, + Daniel Thiele, + Matthias Vorwerk, + Samuel Klipphahn, + Axel Wachtler, + Atmel Corporation. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the authors nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +_______________________________________________________________________________ diff --git a/dissectors/pinoccio-p2p/README.md b/dissectors/pinoccio-p2p/README.md new file mode 100644 index 0000000..8565a3b --- /dev/null +++ b/dissectors/pinoccio-p2p/README.md @@ -0,0 +1,49 @@ +# Pinoccio / uracoli P2P (IEEE 802.15.4) + +Dissecteur Wireshark Lua du **protocole pair-à-pair (P2P) uracoli**, +utilisé au-dessus d'IEEE 802.15.4 par le chargeur d'amorçage (bootloader) +des cartes Pinoccio pour la découverte de nœuds et la mise à jour de +micrologiciel par radio (OTA, « wibo ») : type de commande, numéro de +séquence, adresses, et champs propres à chaque commande (ping, réponse de +ping, données wibo, CRC…). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Pinoccio/hardware-pinoccio (fichier `firmware/bootloader/p2p-wireshark-dissector.lua`) | +| Commit importé | `d1a92f68f132dda9cf34fb467a885a0325ce4a31` du 17/04/2015 (branche `master`, dernier commit ; dernière modification du dissecteur : `8b7556c` du 06/03/2015) | +| Licence amont | BSD-3-Clause (en-tête du fichier : « This file is licensed under the terms of the Modified BSD license », texte des trois clauses ; fichier repris du projet uracoli) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur uracoli P2P natif | + +La licence du dépôt Pinoccio (`license.txt`, CERN OHL v1.1) vise les +plans matériels ; le dissecteur porte sa propre licence BSD dans son +en-tête, sans nom de détenteur des droits. Le fichier `LICENSE` de ce +dossier est la copie conforme de la note de licence uracoli fournie dans +le même dépôt (`firmware/bootloader/uracoli-src-20131127/LICENSE` : +« The contents of uracoli is licensed with a Modified BSD License »). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `p2p-wireshark-dissector.lua` | Dissecteur `p2p` (heuristique sur `wpan`, et table `wpan.panid`) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête (l'avis BSD amont est conservé). + +## Utilisation + +Copier `p2p-wireshark-dissector.lua` dans le dossier `plugins` de +Wireshark (ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins +Lua, ouvrir une capture IEEE 802.15.4 (par exemple faite avec le renifleur +uracoli) et filtrer avec `p2p`. + +## Remarques + +- Le dissecteur s'enregistre avec `wpan.panid` = -1, contournement d'un + bogue Wireshark de 2014 (bug 10696) ; comportement sous Wireshark 4.6 + non vérifié. +- L'heuristique sur `wpan` peut revendiquer des trames 802.15.4 d'autres + protocoles (non vérifié). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/pinoccio-p2p/p2p-wireshark-dissector.lua b/dissectors/pinoccio-p2p/p2p-wireshark-dissector.lua new file mode 100644 index 0000000..317ded0 --- /dev/null +++ b/dissectors/pinoccio-p2p/p2p-wireshark-dissector.lua @@ -0,0 +1,217 @@ +-- SPDX-License-Identifier: BSD-3-Clause +-- Importé de https://github.com/Pinoccio/hardware-pinoccio (firmware/bootloader/p2p-wireshark-dissector.lua), +-- commit d1a92f68f132dda9cf34fb467a885a0325ce4a31 du 17/04/2015. +-- Licence amont : BSD-3-Clause — voir README.md. +-- Peer-to-peer protocol dissector for Wireshark. +-- +-- This file was taken from the uracoli project, 802.15.4 sniffer. +-- +-- To install, just put this file into your "Personal Plugins" Folder +-- (see Help->About->Folders inside wireshark). +-- +-- This file is licensed under the terms of the Modified BSD license: +-- +-- Redistribution and use in source and binary forms, with or without +-- modification, are permitted provided that the following conditions +-- are met: +-- +-- * Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- * Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in the +-- documentation and/or other materials provided with the distribution. +-- * Neither the name of the authors nor the names of its contributors +-- may be used to endorse or promote products derived from this software +-- without specific prior written permission. +-- +-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +-- POSSIBILITY OF SUCH DAMAGE. + + -- + -- uracoli P2P dissector for Wireshark + -- + + local p2p = Proto ("p2p", "uracoli peer to peer protocoll") + + local cmd_table = { + [0x01] = "P2P_PING_REQ", + [0x02] = "P2P_PING_CNF", + [0x03] = "P2P_JUMP_BOOTL", + [0x20] = "P2P_WIBO_DATA", + [0x21] = "P2P_WIBO_FINISH", + [0x22] = "P2P_WIBO_RESET", + [0x23] = "P2P_WIBO_EXIT", + [0x24] = "P2P_WIBO_TARGET", + [0x25] = "P2P_WIBO_DEAF", + [0x26] = "P2P_WIBO_ADDR", + [0x30] = "P2P_XMPL_LED", + [0x40] = "P2P_WUART_DATA", + } + + local targmem_table = { + [string.byte("F")] = "F: Flash", + [string.byte("E")] = "E: EEPROM", + [string.byte("X")] = "X: Dry run", + } + + p2p.fields.f_cmd = ProtoField.uint8("p2p.cmd", "cmd", nil, cmd_table) + p2p.fields.f_rawdata = ProtoField.bytes("p2p.rawdata", "rawdata", base.HEX) + + -- PING_CNF + p2p.fields.f_status = ProtoField.uint8("p2p.status","status") + p2p.fields.f_errno = ProtoField.uint8("p2p.errno", "errno") + p2p.fields.f_version = ProtoField.uint8("p2p.version", "version") + p2p.fields.f_crc = ProtoField.uint16("p2p.crc", "crc", base.HEX) + p2p.fields.f_appname = ProtoField.string("p2p.appname", "appname") + p2p.fields.f_boardname = ProtoField.string("p2p.boardname", "boardname") + -- P2P_WIBO_DATA + p2p.fields.f_dsize = ProtoField.uint8("p2p.dsize", "dsize") + p2p.fields.f_data = ProtoField.bytes("p2p.data", "data") + -- P2P_WIBO_TARGET + p2p.fields.f_targmem = ProtoField.uint8("p2p.targmem", "targmem", nil, targmem_table) + -- P2P_WIBO_ADDR + p2p.fields.f_addr = ProtoField.uint32("p2p.addr", "addr") + -- P2P_XMPL_LED + p2p.fields.f_led = ProtoField.uint8("p2p.led", "led") + p2p.fields.f_state = ProtoField.uint8("p2p.state", "state") + -- P2P_WUART_DATA + p2p.fields.f_mode = ProtoField.uint8("p2p.mode", "mode") + p2p.fields.f_sdata = ProtoField.string("p2p.sdata", "sdata") + + p2p.experts.too_short = ProtoExpert.new("short", "Packet too short", expert.group.MALFORMED, expert.severity.ERROR) + p2p.experts.too_long = ProtoExpert.new("long", "Packet too long", expert.group.MALFORMED, expert.severity.ERROR) + p2p.experts.unknown_cmd = ProtoExpert.new("unknown_cmd", "Unknown command", expert.group.MALFORMED, expert.severity.ERROR) + + -- Init function, called before any packet is dissected + function p2p.init() + end + + function dissect_ping_cnf (buffer, pinfo, tree) + tree:add(p2p.fields.f_status, buffer(0, 1)) + tree:add(p2p.fields.f_errno, buffer(1, 1)) + tree:add(p2p.fields.f_version, buffer(2, 1)) + tree:add_le(p2p.fields.f_crc, buffer(3, 2)) + tree:add(p2p.fields.f_appname, buffer(5, 16)) + tree:add(p2p.fields.f_boardname, buffer(21)) + return buffer:len() + end + + function dissect_wibo_data(buffer, pinfo, tree) + local size = buffer(0, 1) + tree:add_le(p2p.fields.f_dsize, size) + tree:add(p2p.fields.f_data, buffer(1, size:uint())) + return 1 + size:uint(), string.format("%u bytes", size:uint()) + end + + function dissect_wibo_target(buffer, pinfo, tree) + local targmem = buffer(0, 1) + tree:add(p2p.fields.f_targmem, targmem) + return 1, targmem_table[targmem:uint()] + end + + function dissect_wibo_addr(buffer, pinfo, tree) + local addr = buffer(0, 4) + tree:add_le(p2p.fields.f_addr, addr) + return 4, string.format("0x%08x", addr:uint()) + end + + function dissect_xmpl_led(buffer, pinfo, subtree) + tree:add(p2p.fields.f_led, buffer(0, 1)) + tree:add(p2p.fields.f_state, buffer(1, 1)) + return 1 + 1 + end + + function dissect_wuart_data(buffer, pinfo, tree) + tree:add(p2p.fields.f_mode, buffer(0, 1)) + tree:add(p2p.fields.f_sdata, buffer(1)) + return buffer:len() + end + + -- The main dissector function + function real_dissector (buffer, pinfo, subtree) + local cmd = buffer(0,1) + subtree:add(p2p.fields.f_cmd, cmd) + + cmdname = cmd_table[cmd:uint()] + if (not cmdname) then + subtree:add_tvb_expert_info(p2p.experts.unknown_cmd, cmd) + return false + end + + -- Skip 1 byte of p2p command + subbuf = buffer(1):tvb() + + if (subbuf:len() > 0) then + subtree:add(p2p.fields.f_rawdata, subbuf()) + end + + -- decode frame internals + if (cmdname == "P2P_PING_CNF") then + len, msg = dissect_ping_cnf(subbuf, pinfo, subtree) + elseif (cmdname == "P2P_WIBO_DATA") then + len, msg = dissect_wibo_data(subbuf, pinfo, subtree) + elseif (cmdname == "P2P_WIBO_TARGET") then + len, msg = dissect_wibo_target(subbuf, pinfo, subtree) + elseif (cmdname == "P2P_WIBO_ADDR") then + len, msg = dissect_wibo_addr(subbuf, pinfo, subtree) + elseif (cmdname == "P2P_XMPL_LED") then + len, msg = dissect_xmpl_led(subbuf, pinfo, subtree) + elseif (cmdname == "P2P_WUART_DATA") then + len, msg = dissect_wuart_data(subbuf, pinfo, subtree) + else + len = 0 + msg = nil + end + + if subbuf:len() ~= len then + subtree:add_tvb_expert_info(p2p.experts.too_long, subbuf(len)) + return false + end + + -- Only set the protocol info last, so we only set it for + -- packets that look valid. + pinfo.cols.protocol = "P2P" + pinfo.cols.info = string.format("%s %s", cmdname, msg or "") + + return true + end + + -- The main dissector function + -- This is first defined as a regular function and then assigned to + -- p2p.dissector, since that assignment converts it into a Dissector + -- object and we need access to the original function for + -- register_heuristic. See also + -- https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10695 + function dissector(buffer, pinfo, tree) + local subtree = tree:add(p2p, "P2P Protocol Data") + + ok, result = pcall(real_dissector, buffer, pinfo, subtree) + if not ok and result:match("Range is out of bounds$") then + subtree:add_proto_expert_info(p2p.experts.too_short) + return false + elseif not ok then + error(result) + else + return result + end + end + p2p.dissector = dissector + + -- Register as a heuristic dissector, that gets called for all wpan + -- packets. + p2p:register_heuristic("wpan", dissector) + + -- Register as a normal dissector. We have to specify a panid here, + -- so we just pass -1 as we don't really care (we cannot leave it + -- out, see https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10696). + table = DissectorTable.get("wpan.panid") + table:add(-1, p2p) diff --git a/dissectors/pokerth/LICENSE b/dissectors/pokerth/LICENSE new file mode 100644 index 0000000..2def0e8 --- /dev/null +++ b/dissectors/pokerth/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + 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 +them 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. \ No newline at end of file diff --git a/dissectors/pokerth/README.md b/dissectors/pokerth/README.md new file mode 100644 index 0000000..e80bd4d --- /dev/null +++ b/dissectors/pokerth/README.md @@ -0,0 +1,50 @@ +# PokerTH — jeu de poker Texas Hold'em en réseau + +Dissecteur Wireshark Lua du **protocole réseau de PokerTH**, jeu libre de +poker Texas Hold'em multijoueur : préfixe de longueur sur 4 octets avec +réassemblage TCP, puis décodage minimal des messages protobuf du +protocole (`pokerth.proto`) — annonce, initialisation, authentification +(défi / réponse / vérification), avatars, listes de joueurs et de +parties, informations joueur, création et entrée en partie, déroulement +du jeu (cartes, mises, pots, fin de main), discussion, erreurs… — avec +les noms des types de messages. Port TCP 7234. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/pokerth/pokerth (fichier `pokerth.lua` à la racine) | +| Commit importé | `ba57b8dcdc3d89010cfda3a1c1359038c4dd2424` du 31/10/2026 (branche `stable`, branche par défaut, dernier commit ; dernière modification de `pokerth.lua` : `4dc3fa3` du 18/04/2025) | +| Licence amont | AGPL-3.0-or-later (fichier `COPYING` AGPL v3, copié ici sous le nom `LICENSE` ; README : « GNU Affero General Public License version 3 or later », avec une permission supplémentaire pour OpenSSL sans objet ici ; le script n'a pas d'en-tête propre) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur PokerTH natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme du `COPYING` amont). La GPLv3 du dépôt permet la combinaison +avec du code AGPLv3 (article 13) ; précédents : `dissectors/aerospike/`, +`dissectors/space-coap/`. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `pokerth.lua` | Protocole `pokerth` sur TCP 7234 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le jeu lui-même (C++, Qt) n'est pas +importé. + +## Utilisation + +Copier `pokerth.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `pokerth`. + +## Remarques + +- Le serveur officiel chiffre les connexions (TLS) : seul le trafic en + clair (serveur local, LAN) est lisible sans clés. +- Décodeur protobuf écrit à la main : seuls les messages et champs + prévus par le script sont détaillés. Utilise `bit.band` / + `bit.lshift` / `bit.rshift` (bibliothèque `bit` fournie par + Wireshark 4.4 et plus) ; fonctions globales comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/pokerth/pokerth.lua b/dissectors/pokerth/pokerth.lua new file mode 100644 index 0000000..577a01f --- /dev/null +++ b/dissectors/pokerth/pokerth.lua @@ -0,0 +1,1126 @@ +-- SPDX-License-Identifier: AGPL-3.0-or-later +-- Importé de https://github.com/pokerth/pokerth (pokerth.lua), +-- commit ba57b8dcdc3d89010cfda3a1c1359038c4dd2424 du 31/10/2026. +-- Licence amont : AGPL-3.0-or-later (COPYING amont) — voir README.md. +-- PokerTH Wireshark Lua dissector (extended for Announce and Init messages) +local p_pokerth = Proto("pokerth", "PokerTH Protocol") + +-- Port to dissect +local tcp_port = 7234 + +-- Message type map +local message_type_names = { + [1] = "AnnounceMessage", + [2] = "InitMessage", + [3] = "AuthServerChallengeMessage", + [4] = "AuthClientResponseMessage", + [5] = "AuthServerVerificationMessage", + [6] = "InitAckMessage", + [7] = "AvatarRequestMessage", + [8] = "AvatarHeaderMessage", + [9] = "AvatarDataMessage", + [10] = "AvatarEndMessage", + [11] = "UnknownAvatarMessage", + [12] = "PlayerListMessage", + [13] = "GameListNewMessage", + [14] = "GameListUpdateMessage", + [15] = "GameListPlayerJoinedMessage", + [16] = "GameListPlayerLeftMessage", + [17] = "GameListAdminChangedMessage", + [18] = "PlayerInfoRequestMessage", + [19] = "PlayerInfoReplyMessage", + [20] = "SubscriptionRequestMessage", + [21] = "JoinExistingGameMessage", + [22] = "JoinNewGameMessage", + [23] = "RejoinExistingGameMessage", + [24] = "JoinGameAckMessage", + [25] = "JoinGameFailedMessage", + [26] = "GamePlayerJoinedMessage", + [27] = "GamePlayerLeftMessage", + [28] = "GameAdminChangedMessage", + [29] = "RemovedFromGameMessage", + [30] = "KickPlayerRequestMessage", + [31] = "LeaveGameRequestMessage", + [32] = "InvitePlayerToGameMessage", + [33] = "InviteNotifyMessage", + [34] = "RejectGameInvitationMessage", + [35] = "RejectInvNotifyMessage", + [36] = "StartEventMessage", + [37] = "StartEventAckMessage", + [38] = "GameStartInitialMessage", + [39] = "GameStartRejoinMessage", + [40] = "HandStartMessage", + [41] = "PlayersTurnMessage", + [42] = "MyActionRequestMessage", + [43] = "YourActionRejectedMessage", + [44] = "PlayersActionDoneMessage", + [45] = "DealFlopCardsMessage", + [46] = "DealTurnCardMessage", + [47] = "DealRiverCardMessage", + [48] = "AllInShowCardsMessage", + [49] = "EndOfHandShowCardsMessage", + [50] = "EndOfHandHideCardsMessage", + [51] = "ShowMyCardsRequestMessage", + [52] = "AfterHandShowCardsMessage", + [53] = "EndOfGameMessage", + [54] = "PlayerIdChangedMessage", + [55] = "AskKickPlayerMessage", + [56] = "AskKickDeniedMessage", + [57] = "StartKickPetitionMessage", + [58] = "VoteKickRequestMessage", + [59] = "VoteKickReplyMessage", + [60] = "KickPetitionUpdateMessage", + [61] = "EndKickPetitionMessage", + [62] = "StatisticsMessage", + [63] = "ChatRequestMessage", + [64] = "ChatMessage", + [65] = "ChatRejectMessage", + [66] = "DialogMessage", + [67] = "TimeoutWarningMessage", + [68] = "ResetTimeoutMessage", + [69] = "ReportAvatarMessage", + [70] = "ReportAvatarAckMessage", + [71] = "ReportGameMessage", + [72] = "ReportGameAckMessage", + [73] = "ErrorMessage", + [74] = "AdminRemoveGameMessage", + [75] = "AdminRemoveGameAckMessage", + [76] = "AdminBanPlayerMessage", + [77] = "AdminBanPlayerAckMessage", + [78] = "GameListSpectatorJoinedMessage", + [79] = "GameListSpectatorLeftMessage", + [80] = "GameSpectatorJoinedMessage", + [81] = "GameSpectatorLeftMessage" +} + +-- Enum mappings +local server_types = { + [0] = "LAN", + [1] = "InternetNoAuth", + [2] = "InternetAuth" +} + +local login_types = { + [0] = "Guest", + [1] = "Authenticated", + [2] = "Unauthenticated" +} + +-- Fields +local f_length = ProtoField.uint32("pokerth.length", "Packet Length", base.DEC) +local f_type = ProtoField.uint8("pokerth.type", "Message Type", base.DEC, message_type_names) + +-- Version fields (used inside AnnounceMessage) +f_version_major = ProtoField.uint32("pokerth.version.major", "Major Version", base.DEC) +f_version_minor = ProtoField.uint32("pokerth.version.minor", "Minor Version", base.DEC) + +-- AnnounceMessage fields +f_announce_beta_rev = ProtoField.uint32("pokerth.announce.beta_revision", "Latest Beta Revision", base.DEC) +f_announce_server_type = ProtoField.string("pokerth.announce.server_type", "Server Type") +f_announce_num_players = ProtoField.uint32("pokerth.announce.num_players", "Players On Server", base.DEC) + +server_type_enum = { + [0] = "LAN", + [1] = "Internet (No Auth)", + [2] = "Internet (Auth)" +} + +local f_build_id = ProtoField.uint32("pokerth.build_id", "Build ID", base.DEC) +local f_login_type = ProtoField.uint32("pokerth.login", "Login Type", base.DEC, login_types) + +-- Define InitMessage subtree fields +local f_init_requested_version = ProtoField.string("pokerth.init.requested_version", "Requested Version") +local f_init_build_id = ProtoField.uint32("pokerth.init.build_id", "Build ID", base.DEC) +local f_init_last_session = ProtoField.bytes("pokerth.init.last_session", "Last Session ID") +local f_init_password = ProtoField.string("pokerth.init.password", "Auth Server Password") +local f_init_login = ProtoField.uint8("pokerth.init.login", "Login Type", base.DEC, { + [0] = "Guest Login", + [1] = "Authenticated Login", + [2] = "Unauthenticated Login" +}) +local f_init_nickname = ProtoField.string("pokerth.init.nickname", "Nickname") +local f_init_userdata = ProtoField.bytes("pokerth.init.client_userdata", "Client User Data") +local f_init_avatarhash = ProtoField.bytes("pokerth.init.avatarhash", "Avatar Hash") + +f_initack_yourSessionId = ProtoField.bytes("pokerth.initack_yourSessionId", "Your Session ID") +f_initack_yourPlayerId = ProtoField.uint32("pokerth.initack_yourPlayerId", "Your Player ID", base.DEC) +f_initack_yourAvatarHash = ProtoField.bytes("pokerth.initack_yourAvatarHash", "Your Avatar Hash") +f_initack_rejoinGameId = ProtoField.uint32("pokerth.initack_rejoinGameId", "Rejoin Game ID", base.DEC) + +f_playerlist_id = ProtoField.uint32("pokerth.playerlist.id", "Player ID", base.DEC) +f_playerlist_notify = ProtoField.uint8("pokerth.playerlist.notification", "Player List Notification", base.DEC, { + [0] = "playerListNew", + [1] = "playerListLeft" +}) + +f_gamelist_game_id = ProtoField.uint32("pokerth.gamelist.game_id", "Game ID", base.DEC) +f_gamelist_game_mode = ProtoField.uint8("pokerth.gamelist.game_mode", "Game Mode", base.DEC) +f_gamelist_private = ProtoField.bool("pokerth.gamelist.private", "Is Private") +f_gamelist_players = ProtoField.bytes("pokerth.gamelist.players", "Player IDs") +f_gamelist_players_id = ProtoField.uint32("pokerth.gamelist.player_id", "Player ID", base.DEC) +f_gamelist_admin_id = ProtoField.uint32("pokerth.gamelist.admin_id", "Admin Player ID", base.DEC) +f_gamelist_game_info = ProtoField.bytes("pokerth.gamelist.game_info", "NetGameInfo") +f_gamelist_spectators = ProtoField.bytes("pokerth.gamelist.spectators", "Spectator IDs") +f_gamelist_spectator_id = ProtoField.uint32("pokerth.gamelist.spectator_id", "Spectator ID", base.DEC) + +-- NetGameInfo fields +local f_gameinfo_name = ProtoField.string("pokerth.gameinfo.name", "Game Name") +local f_gameinfo_type = ProtoField.uint32("pokerth.gameinfo.type", "Net Game Type", base.DEC, { + [1] = "Normal", + [2] = "Registered Only", + [3] = "Invite Only", + [4] = "Ranking" +}) +local f_gameinfo_max_players = ProtoField.uint32("pokerth.gameinfo.max_players", "Max Number of Players") +local f_gameinfo_raise_mode = ProtoField.uint32("pokerth.gameinfo.raise_mode", "Raise Interval Mode", base.DEC, { + [1] = "On Hand Num", + [2] = "On Minutes" +}) +local f_gameinfo_raise_hands = ProtoField.uint32("pokerth.gameinfo.raise_hands", "Raise Every Hands") +local f_gameinfo_raise_minutes = ProtoField.uint32("pokerth.gameinfo.raise_minutes", "Raise Every Minutes") +local f_gameinfo_end_mode = ProtoField.uint32("pokerth.gameinfo.end_mode", "End Raise Mode", base.DEC, { + [1] = "Double Blinds", + [2] = "Raise By End Value", + [3] = "Keep Last Blind" +}) + +local f_gameinfo_end_blind = ProtoField.uint32("pokerth.gameinfo.end_blind", "End Raise Small Blind Value") +local f_gameinfo_gui_speed = ProtoField.uint32("pokerth.gameinfo.gui_speed", "Proposed GUI Speed") +local f_gameinfo_delay = ProtoField.uint32("pokerth.gameinfo.delay", "Delay Between Hands (s)") +local f_gameinfo_action_timeout = ProtoField.uint32("pokerth.gameinfo.action_timeout", "Player Action Timeout (s)") +local f_gameinfo_first_blind = ProtoField.uint32("pokerth.gameinfo.first_blind", "First Small Blind") +local f_gameinfo_start_money = ProtoField.uint32("pokerth.gameinfo.start_money", "Start Money") +local f_gameinfo_manual_blinds = ProtoField.uint32("pokerth.gameinfo.manual_blinds", "Manual Blinds", base.DEC) +local f_gameinfo_allow_spectators = ProtoField.bool("pokerth.gameinfo.allow_spectators", "Allow Spectators") + +f_player_info_id = ProtoField.uint32("pokerth.playerinfo.player_id", "Player ID", base.DEC) +f_playerinfo_reply_id = ProtoField.uint32("pokerth.playerinfo.id", "Player ID", base.DEC) +f_playerinfo_name = ProtoField.string("pokerth.playerinfo.name", "Player Name") +f_playerinfo_ishuman = ProtoField.bool("pokerth.playerinfo.ishuman", "Is Human") +f_playerinfo_rights = ProtoField.uint8("pokerth.playerinfo.rights", "Player Rights", base.DEC) +f_playerinfo_avatar_type = ProtoField.uint8("pokerth.playerinfo.avatar.type", "Avatar Type", base.DEC) +f_playerinfo_avatar_hash = ProtoField.bytes("pokerth.playerinfo.avatar.hash", "Avatar Hash") + +f_chat_game_id = ProtoField.uint32("pokerth.chat.gameid", "Game ID", base.DEC) +f_chat_player_id = ProtoField.uint32("pokerth.chat.playerid", "Player ID", base.DEC) +f_chat_type = ProtoField.uint8("pokerth.chat.type", "Chat Type", base.DEC, { + [0] = "Lobby", + [1] = "Game", + [2] = "Bot", + [3] = "Broadcast", + [4] = "Private" +}) +f_chat_text = ProtoField.string("pokerth.chat.text", "Chat Text") + +f_spectator_game_id = ProtoField.uint32("pokerth.spectator.game_id", "Spectator Game ID", base.DEC) +f_spectator_player_id = ProtoField.uint32("pokerth.spectator.player_id", "Spectator Player ID", base.DEC) + +f_player_joined_gameid = ProtoField.uint32("pokerth.playerjoined.gameid", "Game ID", base.DEC) +f_player_joined_playerid = ProtoField.uint32("pokerth.playerjoined.playerid", "Player ID", base.DEC) + +f_player_left_gameid = ProtoField.uint32("pokerth.playerleft.gameid", "Game ID", base.DEC) +f_player_left_playerid = ProtoField.uint32("pokerth.playerleft.playerid", "Player ID", base.DEC) + +f_chatreq_target_game_id = ProtoField.uint32("pokerth.chatreq.target_game_id", "Target Game ID", base.DEC) +f_chatreq_target_player_id = ProtoField.uint32("pokerth.chatreq.target_player_id", "Target Player ID", base.DEC) +f_chatreq_text = ProtoField.string("pokerth.chatreq.text", "Chat Text") + +f_error_reason = ProtoField.uint32("pokerth.error.reason", "Error Reason", base.DEC, { + [0] = "custReserved", + [1] = "initVersionNotSupported", + [2] = "initServerFull", + [3] = "initAuthFailure", + [4] = "initPlayerNameInUse", + [5] = "initInvalidPlayerName", + [6] = "initServerMaintenance", + [7] = "initBlocked", + [8] = "avatarTooLarge", + [9] = "invalidPacket", + [10] = "invalidState", + [11] = "kickedFromServer", + [12] = "bannedFromServer", + [13] = "blockedByServer", + [14] = "sessionTimeout" +}) + +p_pokerth.fields = { + -- Common header fields + f_length, f_type, + + -- AnnounceMessage fields + f_version_major, f_version_minor, f_announce_beta_rev, f_announce_server_type, f_announce_num_players, + + -- InitMessage fields + f_message_type, f_init_requested_version, f_init_build_id, f_init_last_session, + f_init_password, f_init_login, f_init_nickname, f_init_userdata, f_init_avatarhash, + f_initack_yourSessionId, f_initack_yourPlayerId, f_initack_yourAvatarHash, f_initack_rejoinGameId, + f_playerlist_id, f_playerlist_notify, + f_gamelist_game_id, f_gamelist_game_mode, f_gamelist_private, + f_gamelist_players, f_gamelist_players_id, + f_gamelist_admin_id, f_gamelist_game_info, + f_gamelist_spectators, f_gamelist_spectator_id, + f_gameinfo_name, f_gameinfo_type, f_gameinfo_max_players, + f_gameinfo_raise_mode, f_gameinfo_raise_hands, f_gameinfo_raise_minutes, + f_gameinfo_end_mode, f_gameinfo_end_blind, f_gameinfo_gui_speed, + f_gameinfo_delay, f_gameinfo_action_timeout, f_gameinfo_first_blind, + f_gameinfo_start_money, f_gameinfo_manual_blinds, f_gameinfo_allow_spectators, + f_player_info_id, f_playerinfo_reply_id, f_playerinfo_name, f_playerinfo_ishuman, f_playerinfo_rights, + f_playerinfo_avatar_type, f_playerinfo_avatar_hash, + f_chat_game_id, f_chat_player_id, f_chat_type, f_chat_text, + f_spectator_game_id, f_spectator_player_id, + f_player_joined_gameid, f_player_joined_playerid, + f_player_left_gameid, f_player_left_playerid, + f_chatreq_target_game_id, f_chatreq_target_player_id, f_chatreq_text, + f_error_reason +} + +-- Dissector function +function read_varint(tvb, offset) + local result = 0 + local shift = 0 + local consumed = 0 + local max_offset = tvb:len() + + while offset + consumed < max_offset and consumed < 10 do + local b = tvb(offset + consumed, 1):uint() + result = result + bit.lshift(bit.band(b, 0x7F), shift) + shift = shift + 7 + consumed = consumed + 1 + if bit.band(b, 0x80) == 0 then break end + end + + return result, consumed +end + +-- Utility to decode the next protobuf field tag and length (if applicable) +function read_protobuf_field_header(tvb, offset) + local start_offset = offset + + -- Read tag (varint encoded) + local tag, tag_len = read_varint(tvb, offset) + offset = offset + tag_len + + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + + local length = nil + local length_len = 0 + + -- Handle length-delimited (wire type 2) + if wire_type == 2 then + length, length_len = read_varint(tvb, offset) + offset = offset + length_len + end + + return { + field_number = field_number, + wire_type = wire_type, + tag_len = tag_len, + length = length, + length_len = length_len, + total_len = offset - start_offset, + next_offset = offset + } +end + +function parse_net_game_info(tvb, tree) + local offset = 0 + + while offset < tvb:len() do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 2 then -- string gameName + local len, len_size = read_varint(tvb, offset) + offset = offset + len_size + tree:add(f_gameinfo_name, tvb(offset, len)) + offset = offset + len + + elseif field_number == 2 and wire_type == 0 then -- enum netGameType + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_type, tvb(offset, size)):append_text(" (" .. tostring(value) .. ")") + offset = offset + size + + elseif field_number == 3 and wire_type == 0 then -- uint32 maxNumPlayers + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_max_players, tvb(offset, size)) + offset = offset + size + + elseif field_number == 4 and wire_type == 0 then -- enum raiseIntervalMode + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_raise_mode, tvb(offset, size)):append_text(" (" .. tostring(value) .. ")") + offset = offset + size + + elseif field_number == 5 and wire_type == 0 then -- optional raiseEveryHands + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_raise_hands, tvb(offset, size)) + offset = offset + size + + elseif field_number == 6 and wire_type == 0 then -- optional raiseEveryMinutes + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_raise_minutes, tvb(offset, size)) + offset = offset + size + + elseif field_number == 7 and wire_type == 0 then -- enum endRaiseMode + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_end_mode, tvb(offset, size)):append_text(" (" .. tostring(value) .. ")") + offset = offset + size + + elseif field_number == 8 and wire_type == 0 then -- optional endRaiseSmallBlindValue + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_end_blind, tvb(offset, size)) + offset = offset + size + + elseif field_number == 9 and wire_type == 0 then -- uint32 proposedGuiSpeed + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_gui_speed, tvb(offset, size)) + offset = offset + size + + elseif field_number == 10 and wire_type == 0 then -- uint32 delayBetweenHands + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_delay, tvb(offset, size)) + offset = offset + size + + elseif field_number == 11 and wire_type == 0 then -- uint32 playerActionTimeout + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_action_timeout, tvb(offset, size)) + offset = offset + size + + elseif field_number == 12 and wire_type == 0 then -- uint32 firstSmallBlind + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_first_blind, tvb(offset, size)) + offset = offset + size + + elseif field_number == 13 and wire_type == 0 then -- uint32 startMoney + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_start_money, tvb(offset, size)) + offset = offset + size + + elseif field_number == 14 and wire_type == 2 then -- repeated uint32 manualBlinds [packed = true] + local len, len_size = read_varint(tvb, offset) + offset = offset + len_size + local end_offset = offset + len + while offset < end_offset do + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_manual_blinds, tvb(offset, size)):append_text(" (" .. tostring(value) .. ")") + offset = offset + size + end + + elseif field_number == 15 and wire_type == 0 then -- optional bool allowSpectators + local value, size = read_varint(tvb, offset) + tree:add(f_gameinfo_allow_spectators, tvb(offset, size)) + offset = offset + size + + else + -- Unknown field, skip or show expert info + tree:add_expert_info(PI_UNDECODED, PI_NOTE, + string.format("Unknown NetGameInfo field %d (wire type %d)", field_number, wire_type)) + break + end + end +end + +function server_type_to_string(val) + if val == 0 then return "LAN" + elseif val == 1 then return "Internet (No Auth)" + elseif val == 2 then return "Internet (Auth)" + else return "Unknown" + end +end + +function parse_version(tvb, tree) + local offset = 0 + + while offset < tvb:len() do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + --tree:add(tvb(offset, 1), string.format("Version Tag: field=%d, wire=%d", field_number, wire_type)) + offset = offset + 1 + + if wire_type ~= 0 then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, + string.format("Unexpected wire type %d in version (field %d)", wire_type, field_number)) + break + end + + local val, len = read_varint(tvb, offset) + + if field_number == 1 then + tree:add(f_version_major, tvb(offset, len), val) + elseif field_number == 2 then + tree:add(f_version_minor, tvb(offset, len), val) + else + tree:add_expert_info(PI_UNDECODED, PI_NOTE, + string.format("Unknown field %d in Version message", field_number)) + end + + offset = offset + len + end +end + +-- Parse the full announce message (after message type and length have been read) +function parse_announce_message(tvb, tree) + local offset = 0 + local announce_end = tvb:len() + + local subtree = tree:add(tvb(), "AnnounceMessage") + + while offset < announce_end do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 2 then -- protocolVersion + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + local version_tvb = tvb(offset, len) + local version_tree = subtree:add(version_tvb, "Protocol Version") + parse_version(version_tvb, version_tree) + offset = offset + len + + elseif field_number == 2 and wire_type == 2 then -- latestGameVersion + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + local version_tvb = tvb(offset, len) + local version_tree = subtree:add(version_tvb, "Latest Game Version") + parse_version(version_tvb, version_tree) + offset = offset + len + + elseif field_number == 3 and wire_type == 0 then -- latestBetaRevision + local val, len = read_varint(tvb, offset) + subtree:add(f_announce_beta_rev, tvb(offset, len), val) + offset = offset + len + + elseif field_number == 4 and wire_type == 0 then -- serverType + local val, len = read_varint(tvb, offset) + subtree:add(f_announce_server_type, tvb(offset, len), server_type_enum[val] or "Unknown (" .. val .. ")") + offset = offset + len + + elseif field_number == 5 and wire_type == 0 then -- numPlayersOnServer + local val, len = read_varint(tvb, offset) + subtree:add(f_announce_num_players, tvb(offset, len), val) + offset = offset + len + + else + subtree:add_expert_info(PI_UNDECODED, PI_NOTE, + string.format("Unhandled field %d with wire type %d tag %x offset %d", field_number, wire_type, tag, offset)) + break + end + end +end + +function parse_init_message(tvb, tree) + local offset = 0 + local subtree = tree:add(tvb(), "InitMessage") + + while offset < tvb:len() do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + tree:add(tvb(offset, 1), string.format("Init Tag: field=%d, wire=%d", field_number, wire_type)) + offset = offset + 1 + + if field_number == 1 and wire_type == 2 then -- requested_version + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + local sub_tvb = tvb(offset, len) + local version_tree = tree:add(f_init_requested_version, sub_tvb) + parse_version(sub_tvb, version_tree) + offset = offset + len + + elseif field_number == 2 and wire_type == 0 then -- build_id + local val, len = read_varint(tvb, offset) + tree:add(f_init_build_id, tvb(offset, len), val) + offset = offset + len + + elseif field_number == 3 and wire_type == 2 then -- last_session_id + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + tree:add(f_init_last_session, tvb(offset, len)) + offset = offset + len + + elseif field_number == 4 and wire_type == 2 then -- password (not present in your example) + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + tree:add(f_init_password, tvb(offset, len)) + offset = offset + len + + elseif field_number == 5 and wire_type == 0 then -- login_type + local val, len = read_varint(tvb, offset) + tree:add(f_init_login, tvb(offset, len), val) + offset = offset + len + + elseif field_number == 6 and wire_type == 2 then -- nickname + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + tree:add(f_init_nickname, tvb(offset, len), tvb(offset, len):string()) + offset = offset + len + + elseif field_number == 7 and wire_type == 2 then -- userdata (not in this msg) + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + tree:add(f_init_userdata, tvb(offset, len)) + offset = offset + len + + elseif field_number == 8 and wire_type == 2 then -- avatarHash (not in this msg) + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + tree:add(f_init_avatarhash, tvb(offset, len)) + offset = offset + len + + else + tree:add_expert_info(PI_UNDECODED, PI_NOTE, + string.format("Unknown field %d (wire type %d)", field_number, wire_type)) + break + end + end +end + +function parse_init_ack_message(tvb, tree) + local offset = 0 + local subtree = tree:add(p_pokerth, tvb, "InitAckMessage") + + local pos = 0 + while pos < tvb:len() do + local tag = tvb(pos, 1):uint() + local field = bit.rshift(tag, 3) + local wire = bit.band(tag, 0x07) + pos = pos + 1 + + if field == 1 and wire == 2 then + local len, len_len = read_varint(tvb, pos) + pos = pos + len_len + subtree:add(f_initack_yourSessionId, tvb(pos, len)) + pos = pos + len + elseif field == 2 and wire == 0 then + local val, vlen = read_varint(tvb, pos) + subtree:add(f_initack_yourPlayerId, tvb(pos, vlen), val) + pos = pos + vlen + elseif field == 3 and wire == 2 then + local len, len_len = read_varint(tvb, pos) + pos = pos + len_len + subtree:add(f_initack_yourAvatarHash, tvb(pos, len)) + pos = pos + len + elseif field == 4 and wire == 0 then + local val, vlen = read_varint(tvb, pos) + subtree:add(f_initack_rejoinGameId, tvb(pos, vlen), val) + pos = pos + vlen + else + subtree:add_expert_info(PI_UNDECODED, PI_NOTE, string.format("Unknown field %d (wire type %d)", field, wire)) + break + end + end +end + +function parse_player_list_message(tvb, tree) + local offset = 0 + while offset < tvb:len() do + local tag_byte = tvb(offset,1):uint() + local field_number = bit.rshift(tag_byte, 3) + local wire_type = bit.band(tag_byte, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 0 then -- playerId + local value, size = read_varint(tvb, offset) + tree:add(f_playerlist_id, tvb(offset, size), value) + offset = offset + size + + elseif field == 13 and wire == 2 then -- playerId + local len, len_len = read_varint(tvb, pos) + pos = pos + len_len + tree:add(f_playerlist_id, tvb(pos, len)) + pos = pos + len + elseif field_number == 2 and wire_type == 0 then -- playerListNotification + local value, size = read_varint(tvb, offset) + tree:add(f_playerlist_notify, tvb(offset, size), value) + offset = offset + size + + else + tree:add_expert_info(PI_MALFORMED, PI_WARN, string.format("Unknown %x field %d (wire type %d)", tag_byte, field_number, wire_type)) + break + end + end +end + +function parse_game_list_new_message(tvb, tree) + local offset = 0 + + while offset < tvb:len() do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 0 then -- gameId + local value, size = read_varint(tvb, offset) + tree:add(f_gamelist_game_id, tvb(offset, size)) + offset = offset + size + + elseif field_number == 2 and wire_type == 0 then -- gameMode (enum) + local value, size = read_varint(tvb, offset) + tree:add(f_gamelist_game_mode, tvb(offset, size)):append_text(" (" .. tostring(value) .. ")") + offset = offset + size + + elseif field_number == 3 and wire_type == 0 then -- isPrivate (bool) + local value, size = read_varint(tvb, offset) + tree:add(f_gamelist_private, tvb(offset, size)) + offset = offset + size + + elseif field_number == 4 and wire_type == 2 then -- repeated uint32 playerIds [packed] + local len, len_size = read_varint(tvb, offset) + offset = offset + len_size + local end_offset = offset + len + while offset < end_offset do + local value, size = read_varint(tvb, offset) + tree:add(f_gamelist_players_id, tvb(offset, size)):append_text(" (" .. tostring(value) .. ")") + offset = offset + size + end + + elseif field_number == 5 and wire_type == 0 then -- adminPlayerId + local value, size = read_varint(tvb, offset) + tree:add(f_gamelist_admin_id, tvb(offset, size)) + offset = offset + size + + elseif field_number == 6 and wire_type == 2 then -- NetGameInfo + local len, len_size = read_varint(tvb, offset) + offset = offset + len_size + local netgameinfo_tree = tree:add(f_gamelist_game_info, tvb(offset, len), "NetGameInfo") + parse_net_game_info(tvb(offset, len):tvb(), netgameinfo_tree) + offset = offset + len + + elseif field_number == 7 and wire_type == 2 then -- repeated uint32 spectatorIds [packed] + local len, len_size = read_varint(tvb, offset) + offset = offset + len_size + local end_offset = offset + len + while offset < end_offset do + local value, size = read_varint(tvb, offset) + tree:add(f_gamelist_spectator_id, tvb(offset, size)):append_text(" (" .. tostring(value) .. ")") + offset = offset + size + end + + else + tree:add_expert_info(PI_UNDECODED, PI_NOTE, + string.format("Unknown GameListNewMessage field %d (wire type %d)", field_number, wire_type)) + break + end + end +end + +function parse_player_info_request_message(tvb, tree) + local offset = 0 + local tvb_len = tvb:len() + + while offset < tvb_len do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 2 then -- packed repeated uint32 + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + + local end_offset = offset + len + --local packed_tree = tree:add(tvb(offset, len), "Player IDs") + tree:add(tvb(offset, len), "Player IDs") + + while offset < end_offset do + local value, size = read_varint(tvb, offset) + --packed_tree:add(f_player_info_id, tvb(offset, size), value) + tree:add(f_player_info_id, tvb(offset, size), value) + offset = offset + size + end + else + tree:add_expert_info(PI_MALFORMED, PI_ERROR, + string.format("Unexpected field %d with wire type %d tag=%x offset=%d", field_number, wire_type, tag, offset)) + break + end + end +end + +function parse_player_info_reply_message(tvb, tree) + local offset = 0 + local msg_len = tvb:len() + local subtree = tree:add(tvb(), "PlayerInfoReplyMessage") + + while offset < msg_len do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + --subtree:add_expert_info(PI_INFO, PI_COMMENT, string.format("tag %x offset %d field %d wire %d", tag, offset, field_number, wire_type)) + if field_number == 1 and wire_type == 0 then + local value, size = read_varint(tvb, offset) + subtree:add(f_playerinfo_reply_id, tvb(offset, size), value) + offset = offset + size + + elseif field_number == 2 and wire_type == 2 then + local len, len_len = read_varint(tvb, offset) + offset = offset + len_len + local info_tvb = tvb(offset, len) + local info_tree = subtree:add(info_tvb, "PlayerInfoData") + + local ioff = 0 + while ioff < info_tvb:len() do + local tag = info_tvb(ioff, 1):uint() + local fn = bit.rshift(tag, 3) + local wt = bit.band(tag, 0x07) + ioff = ioff + 1 + + if fn == 1 and wt == 2 then + local slen, slen_len = read_varint(info_tvb, ioff) + ioff = ioff + slen_len + info_tree:add(f_playerinfo_name, info_tvb(ioff, slen)) + ioff = ioff + slen + + elseif fn == 2 and wt == 0 then + local val, size = read_varint(info_tvb, ioff) + info_tree:add(f_playerinfo_ishuman, info_tvb(ioff, size), val) + ioff = ioff + size + + elseif fn == 3 and wt == 0 then + local val, size = read_varint(info_tvb, ioff) + info_tree:add(f_playerinfo_rights, info_tvb(ioff, size), val) + ioff = ioff + size + + elseif fn == 5 and wt == 2 then + local alen, alen_len = read_varint(info_tvb, ioff) + ioff = ioff + alen_len + local avatar_tvb = info_tvb(ioff, alen) + local avatar_tree = info_tree:add(avatar_tvb, "AvatarData") + local aoff = 0 + + while aoff < avatar_tvb:len() do + local atag = avatar_tvb(aoff, 1):uint() + local afn = bit.rshift(atag, 3) + local awt = bit.band(atag, 0x07) + aoff = aoff + 1 + + if afn == 1 and awt == 0 then + local val, size = read_varint(avatar_tvb, aoff) + avatar_tree:add(f_playerinfo_avatar_type, avatar_tvb(aoff, size), val) + aoff = aoff + size + elseif afn == 2 and awt == 2 then + local hlen, hlen_len = read_varint(avatar_tvb, aoff) + aoff = aoff + hlen_len + avatar_tree:add(f_playerinfo_avatar_hash, avatar_tvb(aoff, hlen)) + aoff = aoff + hlen + else + break + end + end + + ioff = ioff + alen + else + break + end + end + + offset = offset + len + else + break + end + end +end + +function parse_chat_message(tvb, tree) + local offset = 0 + while offset < tvb:len() do + local tag_offset = offset + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + tree:add_expert_info(PI_INFO, PI_COMMENT, string.format("tag %x offset %d field %d wire %d", tag, offset, field_number, wire_type)) + if field_number == 1 and wire_type == 0 then -- gameId + local value, size = read_varint(tvb, offset) + tree:add(f_chat_game_id, tvb(offset, size), value) + offset = offset + size + + elseif field_number == 2 and wire_type == 0 then -- playerId + local value, size = read_varint(tvb, offset) + tree:add(f_chat_player_id, tvb(offset, size), value) + offset = offset + size + + elseif field_number == 3 and wire_type == 0 then -- chatType + local value, size = read_varint(tvb, offset) + --offset = offset + size + tree:add(f_chat_type, tvb(offset, size), value) + offset = offset + size + + elseif field_number == 4 and wire_type == 2 then -- chatText + local len, size = read_varint(tvb, offset) + offset = offset + size + tree:add(f_chat_text, tvb(offset, len), "Chat Text: " .. tvb(offset, len):string()) + offset = offset + len + + else + -- Unknown field + tree:add_expert_info(PI_UNDECODED, PI_NOTE, + string.format("Unknown field: %d (wire type %d) at offset %d", field_number, wire_type, tag_offset)) + break + end + end +end + +function parse_game_list_spectator_joined_message(tvb, tree) + local offset = 0 + + while offset < tvb:len() do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 0 then -- gameId + local value, size = read_varint(tvb, offset) + tree:add(f_spectator_game_id, tvb(offset, size), value) + offset = offset + size + + elseif field_number == 2 and wire_type == 0 then -- playerId + local value, size = read_varint(tvb, offset) + tree:add(f_spectator_player_id, tvb(offset, size), value) + offset = offset + size + + else + tree:add_expert_info(PI_UNDECODED, PI_NOTE, + string.format("Unhandled field: %d (wire type %d)", field_number, wire_type)) + break + end + end +end + +function parse_game_list_player_joined_message(tvb, tree) + local offset = 0 + + -- Parse gameId (field 1) + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 0 then + local game_id, varint_len = read_varint(tvb, offset) + tree:add(f_player_joined_gameid, tvb(offset, varint_len), game_id) + offset = offset + varint_len + end + + -- Parse playerId (field 2) + tag = tvb(offset, 1):uint() + field_number = bit.rshift(tag, 3) + wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 2 and wire_type == 0 then + local player_id, varint_len = read_varint(tvb, offset) + tree:add(f_player_joined_playerid, tvb(offset, varint_len), player_id) + offset = offset + varint_len + end +end + +function parse_game_list_player_left_message(tvb, tree) + local offset = 0 + + -- Parse gameId (field 1) + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 0 then + local game_id, varint_len = read_varint(tvb, offset) + tree:add(f_player_left_gameid, tvb(offset, varint_len), game_id) + offset = offset + varint_len + end + + -- Parse playerId (field 2) + tag = tvb(offset, 1):uint() + field_number = bit.rshift(tag, 3) + wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 2 and wire_type == 0 then + local player_id, varint_len = read_varint(tvb, offset) + tree:add(f_player_left_playerid, tvb(offset, varint_len), player_id) + offset = offset + varint_len + end +end + +function parse_chat_request_message(tvb, tree) + local offset = 0 + local tvb_len = tvb:len() + + while offset < tvb_len do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 0 then + -- targetGameId + local value, len = read_varint(tvb, offset) + tree:add(f_chatreq_target_game_id, tvb(offset, len), value) + offset = offset + len + + elseif field_number == 2 and wire_type == 0 then + -- targetPlayerId + local value, len = read_varint(tvb, offset) + tree:add(f_chatreq_target_player_id, tvb(offset, len), value) + offset = offset + len + + elseif field_number == 3 and wire_type == 2 then + -- chatText (length-delimited string) + local strlen, len_len = read_varint(tvb, offset) + offset = offset + len_len + + if offset + strlen > tvb_len then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Truncated chatText string") + break + end + + tree:add(f_chatreq_text, tvb(offset, strlen)) + offset = offset + strlen + + else + tree:add_expert_info(PI_MALFORMED, PI_WARN, + string.format("Unknown or unsupported field: %d (wire type %d)", field_number, wire_type)) + break + end + end +end + +function parse_error_message(tvb, tree) + local offset = 0 + local tvb_len = tvb:len() + + while offset < tvb_len do + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number == 1 and wire_type == 0 then + -- errorReason (enum, varint) + local value, len = read_varint(tvb, offset) + tree:add(f_error_reason, tvb(offset, len), value) + offset = offset + len + else + tree:add_expert_info(PI_MALFORMED, PI_WARN, + string.format("Unknown or unsupported field: %d (wire type %d)", field_number, wire_type)) + break + end + end +end + +-- Dispatcher function table +local MESSAGE_TYPE_ANNOUNCE = 1 +local MESSAGE_TYPE_INIT = 2 +local MESSAGE_TYPE_INIT_ACK = 6 +local MESSAGE_TYPE_PLAYERLIST = 12 +local MESSAGE_TYPE_GAME_LIST_NEW = 13 +local MESSAGE_TYPE_PLAYER_JOINED = 15 +local MESSAGE_TYPE_PLAYER_LEFT = 16 +local MESSAGE_TYPE_PLAYER_INFO_REQUEST = 18 +local MESSAGE_TYPE_PLAYER_INFO_REPLY = 19 +local MESSAGE_TYPE_CHAT_REQUEST = 63 +local MESSAGE_TYPE_CHAT_MESSAGE = 64 +local MESSAGE_TYPE_ERROR = 73 +local MESSAGE_TYPE_SPECTATOR_JOINED = 78 + +local message_parsers = { + [MESSAGE_TYPE_ANNOUNCE] = parse_announce_message, + [MESSAGE_TYPE_INIT] = parse_init_message, + [MESSAGE_TYPE_INIT_ACK] = parse_init_ack_message, + [MESSAGE_TYPE_PLAYERLIST] = parse_player_list_message, + [MESSAGE_TYPE_GAME_LIST_NEW] = parse_game_list_new_message, + [MESSAGE_TYPE_PLAYER_INFO_REQUEST] = parse_player_info_request_message, + [MESSAGE_TYPE_PLAYER_INFO_REPLY] = parse_player_info_reply_message, + [MESSAGE_TYPE_CHAT_REQUEST] = parse_chat_request_message, + [MESSAGE_TYPE_CHAT_MESSAGE] = parse_chat_message, + [MESSAGE_TYPE_SPECTATOR_JOINED] = parse_game_list_spectator_joined_message, + [MESSAGE_TYPE_PLAYER_JOINED] = parse_game_list_player_joined_message, + [MESSAGE_TYPE_PLAYER_LEFT] = parse_game_list_player_left_message, + [MESSAGE_TYPE_ERROR] = parse_error_message +} + +function p_pokerth.dissector(tvb, pinfo, tree) + pinfo.cols.protocol = "PokerTH" + + local subtree = tree:add(p_pokerth, tvb(), "PokerTH Protocol") + local offset = 0 + local tvb_len = tvb:len() + + -- Loop through potential multiple messages in one TCP segment + while offset + 4 <= tvb_len do + local msg_len = tvb(offset, 4):uint() + local total_len = 4 + msg_len + + -- Check if we have a full message, otherwise ask for more data + if offset + total_len > tvb_len then + -- Not enough data yet: request more from TCP reassembly + pinfo.desegment_len = (offset + total_len) - tvb_len + pinfo.desegment_offset = offset + return + end + + local msg_tvb = tvb(offset + 4, msg_len) + local msg_tree = subtree:add(p_pokerth, msg_tvb, "PokerTH Protobuf Message") + parse_pokerth_message(msg_tvb, msg_tree) + + offset = offset + total_len + end +end + +function parse_pokerth_message(tvb, tree) + if tvb:len() == 0 then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Empty protobuf message") + return + end + + local offset = 0 + local start_offset = offset -- Save this to highlight the full message + + -- Step 1: Read message type (field 1, varint) + local tag = tvb(offset, 1):uint() + local field_number = bit.rshift(tag, 3) + local wire_type = bit.band(tag, 0x07) + offset = offset + 1 + + if field_number ~= 1 or wire_type ~= 0 then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, + string.format("Expected message type at field 1 (varint), got field=%d wire=%d", field_number, wire_type)) + return + end + + -- Step 2: Read the message type + local msg_type, varint_len = read_varint(tvb, offset) + offset = offset + varint_len + + local header = read_protobuf_field_header(tvb, offset) + + local msg_tree = tree:add(p_pokerth, tvb(start_offset), string.format("PokerTH MessageType %d field=%d wire=%d len=%d tag=%x len=%d", msg_type, header.field_number, header.wire_type, header.total_len, tag, header.length)) + + local parser = message_parsers[msg_type] + if parser then + if offset + header.length > tvb:len() then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Truncated inner message body") + return + end + local tvb_msg = tvb(header.next_offset, header.length) + parser(tvb_msg, msg_tree) + else + msg_tree:add_expert_info(PI_UNDECODED, PI_NOTE, + string.format("Unknown or unhandled message type %d", msg_type)) + end +end + +-- Register the dissector +local tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(tcp_port, p_pokerth) + diff --git a/dissectors/pppp/LICENSE b/dissectors/pppp/LICENSE new file mode 100644 index 0000000..248c720 --- /dev/null +++ b/dissectors/pppp/LICENSE @@ -0,0 +1,7 @@ +Copyright 2023 Magnus Ihse Bursie + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dissectors/pppp/PPPP.md b/dissectors/pppp/PPPP.md new file mode 100644 index 0000000..866cadb --- /dev/null +++ b/dissectors/pppp/PPPP.md @@ -0,0 +1,320 @@ +The PPPP Protocol +=== + +The PPPP protocol is a family of related, proprietary and non-documented P2P +protocols used by various IoT devices, typically cheap Chinese IP cameras. The +PPPP name is not an official name, but it is a tag that has been seen in the +disassembly of some of the libraries, and I will use it as the generic name for +this family of protocols. Other namnes include "CS2 Network" and "Yunni +iLnkP2P". A closely related protocol is "Kalay" from TroughTek (TUTK). + +The official app accompanying these devices typically uses a native library +such as `libobject_jni.so` or `libvstc2_jni.so`, with bindings from Java in the +package `object.p2pipcam.nativecaller` or `vstc2.nativecaller`. + +### ⚠️ Caution -- security concerns + +These devices have a reputation for being insecure, and have been plagued by +security holes in the past. (See https://hacked.camera/ for more information.) +It is also highly likely that they will try to send data (such as the video +stream) to untrusted 3rd parties on the internet, due to the nature of the P2P +protocol, or that the network will try to use your device to proxy such private +data of other users. + +If you own such a device and want to interoperate with it locally on your +network, I **strongly** recommend that you block UDP port 32100 for outgoing +packets in your firewall. The protocol mandates that connection to the P2P +directory servers happen on UDP port 32100, so by blocking that port, you will +ensure that your device is not registering with any outside party. + +As an alternative, or complement, you can assign a fixed IP address to the +device, and block all outgoing traffic from that address. Note that this might +affect some functionality, like mobile push notifications. + +### Terminology + +In this document, I will use **device** for the IoT device (typically, a +camera) and **controller** for the other end. In the proprietary solution, this +is a mobile phone app. + +## Device Unique Identifier (UID or DID) + +Each device has a unique descriptor (UID, somtimes called DID) which serves to +identify it on the P2P network, or when communicating locally with it. + +The UID consists of three parts: a prefix, a serial, and a check value. The +prefix and check value are string values, and the serial is an integer value. + +In the protocol, the prefix and check values seem to allow up to 7 bytes long +strings, but in practice both prefix and check are made up of uppercase ASCII +letters (A-Z). The prefix has been observed to be between 3 and 7 letters, +where a length of 3 or 4 is by far the most common. The check has only been +observed with a length of 5. The check is calculated by a proprietary algorithm +from the prefix and the serial, and it is verified by the P2P servers when +trying to gain access to a device behind a firewall. This document will not +further disucss the check value, but it is assumed that the entire UID will be +known. + +The UID is presented to the user as e.g. ABCD-012345-XYZUV, or sometimes +without the hyphen. + +Every prefix is associated with a specific manufacturer. A single manufacturer +can apparently "own" several prefixes, maybe due to different models, or due to +fear of exhaustion of the serial range. + +## Pre-shared Key + +For some devices, the protocol is "encrypted" using a trivial XOR scheme. This +is based on a 256 byte long table, which is shared by all implementation of the +PPPP protocol, and a seed, which is calculated from a manufacturer-specific +pre-shared key (PSK). + +When interacting with the larger P2P network and servers, the PSK is always +"SSD@cs2-network.". When communicating locally with the device, a different PSK +is used, that is determined by the prefix of the UID. The following list of +known prefixes and PSKs have been extracted from a decompiled Android app. + +Prefixes | PSK +---|--- +`AES`, `ASH`, `BRTC`, `BRTD`, `CTW`, `ESN`, `EST`, `GBE`, `HWAA`, `ICB`, `IKB`, `JWEV`, `KBC`, `LAM`, `MATE`, `MEYE`, `MIL`, `OBJ`, `OEMAAAA`, `OEMAAAB`, `OEMAAAH`, `OPCS`, `PPCN`, `PPCS`, `PROCAM`, `RTOS`, `SPCN`, `TSD`, `VSTB`, `VSTC`, `WXH`, `WXO`, `XHA`, `XLT`, `ZSKJ` | *no encryption used* +`DGB`, `DGHA`, `DGHG`, `DGKA`, `DGKB`, `DGKC`, `DGOA`, `DGOB`, `DGOC`, `DGOD`, `DGOE`, `DGOF`, `DGOG`, `DGOH`, `DGOI`, `DGOJ`, `DGOK`, `NMSA`, `NMSB`, `NMSZ`, `PETA`, `PETAA` | "camera" +`AAA`, `ABC`, `ABCF`, `DDD`, `EEE`, `FFF`, `HBW`, `NNN`, `PIXA`, `PIXB`, `PIXC`, `PIXD`, `XIAODOU` | "SHIX" +`ACCQ`, `ACCR`, `ACCS`, `BCCQ` | "@@@@...." +`VMA`, `VMP`, `VMS`, `VMV` | "VMSV" +`FYIOT`, `FYPPCS`, `FYRTOS` | "FERRY@88" +`PPIL`, `PPLL`, `PPSL` | "mycamera" +`LIUX`, `PIR`, `TUT` | "Deng123abc" +`DUNIOTA`, `NANOIOT` | "Duncom" +`AYS`, `XYX` | "JX20130716" +`THPC` | "hyWHzyhtzH" +`JYDGZ` | "JYDGAOZHANP2P" +`XGAK` | "SZGMBESTER" +`VE` | "vstarcam2018" + +## Device discovery + +To discover PPPP devices on the local network, the controller broadcasts a +`MSG_LAN_SEARCH` packet on UDP port **32108**. + +The device, upon receiving this packet, will send `MSG_PUNCH_PKT`. The +controller will reply back with another `MSG_PUNCH_PKT`. At this point, the +communication channel is open, and the controller and device will communicate +back to each other on the UDP port and IP address that the respective punch +packet was sent from. + +The next step in the initialization process is that the device sends a +`MSG_P2P_RDY` message. This contains the UID of the device. At this point, the +controller can determine if this is the device it wants to communicate, and if +it knows the security credentials. If so, it can start sending commands on +channel 0. + +## Video and audio streams + +The device can send and/or receive data streams using the `MSG_DRW` (data +read/write) packets. The following channels are used: + +**channel** | **content** +---|--- +1 | video from the device +2 | audio from the device +3 | audio to the device ("talk") + +Data are sent in frames. If the payload of the `MSG_DRW` packet would exceed +1024 bytes, it will be split into multiple, consecutive packets. Only the first +packet in that sequence will have the header. + +Each frame begins with a 32 byte long header. (Note that this leaves room only +for 992 bytes of data in the frame, if it should fit in a single packet.) + +The structure of the frame header is only partially understood. Note that the +purpose of many fields are currently unknown, and that the `codec`/`type` and +`millis` fields are just guesswork. The purpose of the magic bytes is +presumably to help the receiver re-synchronize at the start of a new frame, if +some intermediate packets are lost. The only fields that have always seen being +respected are `magic`, `codec`/`type` and `len`. All other fields can, in +different circumstances, be set to e.g. all zeros or all `0xaa`, or some other +values. + +**name** | **size (in bytes)** | **description** +---|---|--- +`magic` | 4 | Magic bytes indicating start of a new header (always **0x55aa15a8**) +`codec` | 1 | A byte representing the A/V codec used +`type` | 1 | A byte representing the media type of the frame (**0** = video, **1** = audio) +`millis` | 2 | Presumably a millisecond offset from the timestamp +`timestamp` | 4 | The time in seconds since EPOCH, in little-endian order +`index` | 4 | The 0-based index of this frame, in little-endian order +`len` | 4 | The length of the frame data, in little-endian order +`unknown` | 12 | Unknown + +The observed values for the codec (if that is indeed what the field represents) +are listed below. The 0xaa value is just assumed, but the 0x08 value is +confirmed. + +**value** | **codec** +---|--- +0x03 | MJPEG, with one JPEG image per frame +0x08 | Audio, IMA ADPCM DVI/4 (4-bits, 11.025 kHz, 1 channel) +0xaa | Audio, IMA ADPCM DVI/4 (4-bits, 11.025 kHz, 1 channel) + +## Channel 0 commands and responses + +On channel 0, the controller can send commands to the device, and the device +can reply to those commands. The communication is done by exchanging JSON +objects. As shown by the dissect script, each packet on channel 0 can contain +one or more command blocks. The typical use case is to have one command block +per packet, though. + +All command requests and responses must have a minimal set of fields, but may +also contain additional fields. These additional fields are documented below in +the per-command sections. + +### Commands + +All commands must include the following fields in the JSON object: + +**key** | **type** | **description** +---|---|---- +`cmd` | integer | The command number (see the table below) +`pro` | string | The string representation of the command number +`user` | string | The user name for authentication +`pwd` | string | The password for the user, in clear text + +For most devices, there is no sofisticated user handling, and the `user` name +is just the fixed value of `admin`. + +The value of `cmd` and `pro` are both needed, and must correspond to each +other. This means that one of the fields are actually redundant, but they are +still both needed. + +### Responses + +All responses sent by the device must include the following fields in the JSON +object: + + **key** | **type** | **description** +---|---|---- +`cmd` | integer | The command number +`result` | integer | A result code + +The command number should be the same as in the command request. (Disturbingly, +some exceptions to this has been observed in the wild, where the device replies +with a different command number than the request.) + +The result code signals the success of the command. A value of **0** means +**success**. A value of **-1** means **failure**. (It is possible that other +failure codes exist.) + +### set_cypush (cmd 1) + +*Documentation not yet finished.* + +### check_user (cmd 100) + +This is like a login. This is typically the first packet sent in a conversation +between a controller and a device. + +**Additional command fields:** + +*none* + +**Additional response fields:** + +**key** | **type** | **description** +---|---|---- +`admin` | integer | Unknown +`restrict` | integer | Unknown +`mode` | integer | Unknown +`type` | integer | Unknown +`checkstr` | string | Unknown +`cloud_key` | string | Unknown + +The value of these fields are unknown. The currently observed numerical values +are: + +**key** | **observed values** +---|--- +`admin` | Always 1 +`restrict` | Always 0 +`mode` | Always 110 +`type` | Always 600 + +The `checkstr` and `cloud_key` fields are presumably used in validating the +device on the P2P networks. The checkstr has been observed to be "SHIX", and +the cloud key to be a large integer. + +In the underlying PPPP packet structure, the special "admin" flag (0x00000100 +of the command block flag field) is set to 1 for this particular response (the +only observed instance of this flag being non-zero). It is speculated that this +corresponds to the value of `admin` being 1. + +### get_parms (cmd 101) + +*Documentation not yet finished.* + +### dev_control (cmd 102) + +*Documentation not yet finished.* + +### get_alarm (cmd 107) + +*Documentation not yet finished.* + +### set_alarm (cmd 108) + +*Documentation not yet finished.* + +### stream (cmd 111) + +*Documentation not yet finished.* + +### get_wifi (cmd 112) + +*Documentation not yet finished.* + +### scan_wifi (cmd 113) + +*Documentation not yet finished.* + +### set_wifi (cmd 114) + +*Documentation not yet finished.* + +### set_datetime (cmd 126) + +*Documentation not yet finished.* + +### ptz_control (cmd 128) + +*Documentation not yet finished.* + +### get_record_param (cmd 199) + +*Documentation not yet finished.* + +### talk_send (cmd 300) + +*Documentation not yet finished.* + +### set_whiteLight (cmd 304) + +*Documentation not yet finished.* + +### get_whiteLight (cmd 305) + +*Documentation not yet finished.* + +### get_cloudsupport (cmd 9000) + +*Documentation not yet finished.* + +## Resources + +* https://hacked.camera/ +* https://github.com/pmarrapese/iot/tree/master/p2p/dissector +* https://github.com/fbertone/lib32100/issues/7 +* https://github.com/datenstau/A9_PPPP +* https://github.com/K-Francis-H/little-stars-hack +* https://re-ws.pl/2018/05/security-analysis-of-spy-camera-sold-by-chinese-suppliers-iminicam-app/ +* https://ppppdecodestring.ericbetts.dev/ +* https://github.com/sol-vin/0x42424242.in/tree/master/_posts/vstarcam-journey +* https://github.com/sol-vin/vstarcam-investigational-journey/tree/master diff --git a/dissectors/pppp/README.md b/dissectors/pppp/README.md new file mode 100644 index 0000000..7e4017a --- /dev/null +++ b/dissectors/pppp/README.md @@ -0,0 +1,52 @@ +# PPPP (P2P des caméras IP grand public) + +Dissecteur Wireshark Lua du **protocole P2P « PPPP »** (Peer-to-Peer +Protocol, souvent appelé CS2 / PPCS) utilisé par de nombreux objets +connectés, surtout des caméras IP chinoises bon marché : messages +d'initialisation, d'interrogation du serveur, de perforation NAT +(punch), de session, de données (DRW) et d'acquittement, sur UDP, avec +désobscurcissement du trafic « chiffré » par clé pré-partagée (PSK). Le +fichier `PPPP.md` documente le protocole et les PSK connues. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/magicus/pppp-dissector | +| Commit importé | `3ea9a7261f028fe2c75d141cb430bc29a162e2b0` du 05/05/2025 (branche `main`, dernier commit) | +| Licence amont | MIT (`LICENSE` amont et en-tête du fichier : « Copyright (C) 2023, Magnus Ihse Bursie », « Licensed under the MIT license ») | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur PPPP natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `pppp_dissect.lua` | Dissecteur `pppp` (heuristique UDP), préférence `pppp.psk` | +| `PPPP.md` | Description amont du protocole et table des PSK connues (en anglais) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête du fichier Lua (l'en-tête amont est +conservée). + +## Utilisation + +Copier `pppp_dissect.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `pppp`. Pour un trafic « chiffré » dont la PSK n'est pas +parmi les trois testées automatiquement : Préférences → Protocols → PPPP → +`Pre-shared Key` (voir la table de `PPPP.md`). + +## Remarques + +- **`bit32` absent des Wireshark récents** : le désobscurcissement par PSK + appelle `bit32.band` / `bit32.bxor` (8 appels), absents de Lua 5.4 + (Wireshark 4.6 fournit `bit`) ; sans `bit32` global, le décodage du + trafic chiffré échoue. Contournement local : `bit32 = bit` en tête du + script (non fait, fichier conservé tel quel ; non vérifié). +- Heuristique UDP : peut coexister avec `dissectors/eufy-security/` + (protocole Eufy dérivé de PPPP) ; ne charger que celui qui convient. +- Selon l'auteur, plus lent qu'un dissecteur en C ou WSGD. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/pppp/pppp_dissect.lua b/dissectors/pppp/pppp_dissect.lua new file mode 100644 index 0000000..e82fa68 --- /dev/null +++ b/dissectors/pppp/pppp_dissect.lua @@ -0,0 +1,478 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/magicus/pppp-dissector (pppp_dissect.lua), +-- commit 3ea9a7261f028fe2c75d141cb430bc29a162e2b0 du 05/05/2025. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- Copyright (C) 2023, Magnus Ihse Bursie +-- Licensed under the MIT license, see LICENSE for details. +-- +-- WireShark dissector for the P2P protocol used by various IoT devices, +-- typically cheap Chinese IP cameras. + +-- I am standing on the shoulder of giants. This would not have been possible +-- without the work of Paul Marrapese (https://github.com/pmarrapese/iot) and +-- datenstau (https://github.com/datenstau/A9_PPPP). +-- In learning to write a Lua WireShark dissector, this post from Mika's tech blog +-- was incredibly helpful: +-- https://mika-s.github.io/wireshark/lua/dissector/2017/11/04/creating-a-wireshark-dissector-in-lua-1.html + +pppp_protocol = Proto("PPPP", "PPPP Protocol") + +pppp_protocol.prefs.psk = Pref.string("Pre-shared Key", "", "The PSK used for PPPP encryption") + +local fields = {} + +-- inspired by https://github.com/Lekensteyn/kdnet +function add_field(proto_field_constructor, name, desc, ...) + local field_name = "pppp." .. name + -- If the description is omitted, use the name as label + if type(desc) == "string" then + fields[name] = proto_field_constructor(field_name, desc, ...) + else + fields[name] = proto_field_constructor(field_name, name, desc, ...) + end +end + +add_field(ProtoField.uint8, "magic", "Magic Byte", base.HEX) +add_field(ProtoField.bytes, "decrypted", "Decrypted Packet") +add_field(ProtoField.uint8, "opcode", "Opcode", base.HEX) +add_field(ProtoField.uint8, "len", "Payload Length") +add_field(ProtoField.bytes, "payload", "Payload") +add_field(ProtoField.bytes, "uid_raw", "Raw UID") +add_field(ProtoField.string, "uid", "UID") + +add_field(ProtoField.uint8, "data_magic", "Data Magic Byte", base.HEX) +add_field(ProtoField.uint8, "channel", "Data Channel ID") +add_field(ProtoField.uint16, "index", "Data Message Index") +add_field(ProtoField.bytes, "data", "Data") + +add_field(ProtoField.uint16, "ack_count", "Number of ACKs") +add_field(ProtoField.uint16, "index_ack", "Data Message Index ACK") + +add_field(ProtoField.uint32, "cmd_flags", "Command Flags", base.HEX) +add_field(ProtoField.uint32, "cmd_flags.reply", "Direction", base.HEX, { [0] = "Request", [0x305] = "Reply" }, 0x060a0000) +add_field(ProtoField.uint32, "cmd_flags.admin", "Admin", base.HEX, { [0] = "False", [1] = "True" }, 0x00000100) +add_field(ProtoField.uint32, "cmd_flags.unknown", "Unknown", base.HEX, { [0xa080] = "Expected" }, 0xf9f5feff) +add_field(ProtoField.uint16, "cmd_len", "Command Length") +add_field(ProtoField.string, "cmd", "Command") + +add_field(ProtoField.uint32, "frame_magic", "Frame Magic Bytes", base.HEX) +add_field(ProtoField.uint8, "frame_codec", "Codec", base.HEX) +add_field(ProtoField.uint8, "frame_type", "Media Type", base.HEX) +add_field(ProtoField.uint16, "frame_millis", "Milliseconds", base.HEX) +add_field(ProtoField.absolute_time, "frame_timestamp", "Timestamp") +add_field(ProtoField.uint32, "frame_index", "Index") +add_field(ProtoField.uint32, "frame_len", "Frame Length") +add_field(ProtoField.bytes, "frame_unknown", "Unknown") + +pppp_protocol.fields = fields + +local psk_magic_byte = 0x00 -- Only valid if PSK is set + +function pppp_protocol.dissector(buffer, pinfo, tree) + local bufferlen = buffer:len() + if bufferlen == 0 then + return 0 + end + + -- Check our magic byte + local magic = buffer(0, 1):uint() + + if magic == 0xf1 then + -- Unencrypted data, just do the actual dissection + pppp_dissect(buffer, pinfo, tree, tree) + return bufferlen + end + + -- It is either an encrypted PPPP packet, or not a PPPP packet at all + local psk = pppp_protocol.prefs.psk + + if psk ~= "" then + -- We have a PSK set, so use it + if magic == psk_magic_byte then + buffer = pppp_handle_decryption(psk, buffer, tree) + pppp_dissect(buffer, pinfo, tree, tree) + return bufferlen + else + -- The packet does not match our expected magic byte; not a PPPP packet + return 0 + end + end + + -- No PSK set, so check if using one of the three most common PSKs + if magic == 0x2c then + buffer = pppp_handle_decryption("camera", buffer, tree) + pppp_dissect(buffer, pinfo, tree, tree) + return bufferlen + elseif magic == 0x9f then + buffer = pppp_handle_decryption("SHIX", buffer, tree) + pppp_dissect(buffer, pinfo, tree, tree) + return bufferlen + elseif magic == 0xb1 then + buffer = pppp_handle_decryption("SSD@cs2-network.", buffer, tree) + pppp_dissect(buffer, pinfo, tree, tree) + return bufferlen + end + + -- No, this is not a PPPP packet + return 0 +end + +pppp_protocol:register_heuristic("udp", pppp_protocol.dissector) + +function pppp_protocol.init() + pppp_update_magic_byte() +end + +function pppp_protocol.prefs_changed() + pppp_update_magic_byte() +end + +function pppp_update_magic_byte() + local psk = pppp_protocol.prefs.psk + + if psk ~= "" then + -- We have a PSK set, so calculate and cache the magic byte value for it + local clear_magic_byte = ByteArray.new("f1") + psk_magic_byte = pppp_encrypt(psk, clear_magic_byte):get_index(0) + end +end + +function pppp_handle_decryption(psk, buffer, tree) + local decrypted_buffer = pppp_decrypt(psk, buffer:bytes()):tvb("Decrypted PPPP Packet") + local subtree = tree:add(pppp_protocol, buffer(), "PPPP Packet (encrypted)") + subtree:add(fields.decrypted, decrypted_buffer()) + return decrypted_buffer +end + +function pppp_dissect(buffer, pinfo, tree, roottree) + local extra_info = get_extra_info(buffer) + pinfo.cols.info:append(extra_info) + local subtree = tree:add(pppp_protocol, buffer(), "PPPP Packet" .. extra_info) + + pinfo.cols.protocol = pppp_protocol.name + + subtree:add(fields.magic, buffer(0, 1)) + + local opcode = buffer(1, 1):uint() + local opcode_name = get_opcode_name(opcode) + subtree:add(fields.opcode, buffer(1, 1)):append_text(" (" .. opcode_name .. ")") + + local payload_length = buffer(2, 2):uint() + subtree:add(fields.len, buffer(2, 2)) + if payload_length > 0 then + subtree:add(fields.payload, buffer(4)) + local payload_subtree = roottree:add(buffer(4), "PPPP Payload") + + -- Dissect the payload, if we have a dissector for this opcode + local opcode_dissector = opcode_dissectors[opcode] + if opcode_dissector then + opcode_dissector(buffer(4), pinfo, payload_subtree, roottree) + end + end +end + +---- Opcode-specfic dissectors + +function dissect_opcode_uid(buffer, pinfo, subtree, roottree) + local prefix = buffer(0, 8):stringz() + local serial = buffer(8, 4):uint() + local check = buffer(12, 8):stringz() + local uid = prefix .. "-" .. string.format("%06s", serial) .. "-" .. check + subtree:add(fields.uid, uid) + subtree:add(fields.uid_raw, buffer(0, 20)) +end + +function dissect_opcode_drw(buffer, pinfo, subtree, roottree) + subtree:add(fields.data_magic, buffer(0, 1)) + subtree:add(fields.channel, buffer(1, 1)) + subtree:add(fields.index, buffer(2, 2)) + local data_channel = buffer(1, 1):uint() + subtree:add(fields.data, buffer(4)) + if data_channel == 0 then + dissect_opcode_drw_command(buffer(4), pinfo, subtree, roottree) + elseif buffer(4, 4):uint() == 0x55aa15a8 then + dissect_opcode_drw_frame(buffer(4), pinfo, subtree, roottree) + end +end + +function dissect_opcode_drw_command(buffer, pinfo, subtree, roottree) + local commands_channel_subtree = roottree:add(buffer(), "PPPP Command Channel") + + while buffer:len() > 0 do + local command_block_length = buffer(4, 4):le_uint() + local command_subtree = commands_channel_subtree:add(buffer(0, 8 + command_block_length), "Command Block") + local flag_tree = command_subtree:add(fields.cmd_flags, buffer(0, 4)) + flag_tree:add(fields["cmd_flags.reply"], buffer(0, 4)) + flag_tree:add(fields["cmd_flags.admin"], buffer(0, 4)) + flag_tree:add(fields["cmd_flags.unknown"], buffer(0, 4)) + + command_subtree:add_le(fields.cmd_len, buffer(4, 4)) + command_subtree:add(fields.cmd, buffer(8, command_block_length)) + + if buffer:len() <= 8 + command_block_length then + break + end + buffer = buffer(8 + command_block_length) + end +end + +function dissect_opcode_drw_frame(buffer, pinfo, subtree, roottree) + local frame_subtree = roottree:add(buffer(), "PPPP Frame Header") + + frame_subtree:add(fields.frame_magic, buffer(0, 4)) + frame_subtree:add(fields.frame_codec, buffer(4, 1)) + frame_subtree:add(fields.frame_type, buffer(5, 1)) + + frame_subtree:add_le(fields.frame_millis, buffer(6, 2)) + + frame_subtree:add_le(fields.frame_timestamp, buffer(8, 4)) + frame_subtree:add_le(fields.frame_index, buffer(12, 4)) + frame_subtree:add_le(fields.frame_len, buffer(16, 4)) + + frame_subtree:add(fields.frame_unknown, buffer(20, 12)) +end + +function dissect_opcode_drw_ack(buffer, pinfo, subtree, roottree) + subtree:add(fields.data_magic, buffer(0, 1)) + subtree:add(fields.channel, buffer(1, 1)) + subtree:add(fields.ack_count, buffer(2, 2)) + + subtree:add(fields.data, buffer(4)) + + local ack_count = buffer(2, 2):uint() + local acks_subtree = subtree:add(buffer(4), "ACKed Packets") + buffer = buffer(4) + while buffer:len() > 0 do + local ack_index = buffer(0, 2):uint() + acks_subtree:add(fields.index_ack, buffer(0, 2)) + if ack_count == 1 then + break + end + if buffer:len() <= 2 then + print("Warning: PPPP MSG_DRW_ACK packet is too short") + break + end + buffer = buffer(2) + ack_count = ack_count - 1 + end +end + +opcode_dissectors = ({ + [0x41] = dissect_opcode_uid, -- MSG_PUNCH_PKT + [0x42] = dissect_opcode_uid, -- MSG_P2P_RDY + [0xd0] = dissect_opcode_drw, -- MSG_DRW + [0xd1] = dissect_opcode_drw_ack, -- MSG_DRW_ACK +}) + +---- Helper functions + +function get_extra_info(buffer) + local opcode = buffer(1, 1):uint() + local opcode_name = get_opcode_name(opcode) + + if opcode_name == "Unknown" then + return "" + end + + local extra_info + if opcode == 0xD0 then + -- for MSG_DRW, add channel and index + local channel = buffer(5, 1):uint() + local index = buffer(6, 2):uint() + + extra_info = opcode_name .. ":" .. channel .. ";" .. index + elseif opcode == 0xD1 then + -- for MSG_DRW_ACK, add channel + local channel = buffer(5, 1):uint() + + extra_info = opcode_name .. ":" .. channel + else + extra_info = opcode_name + end + + return " (" .. extra_info .. ")" +end + +function get_opcode_name(opcode) + local opcode_name = opcode_names[opcode] + if opcode_name == nil then + return "Unknown" + end + + return opcode_name +end + +-- from https://github.com/pmarrapese/iot/blob/master/p2p/dissector/pppp.fdesc +opcode_names = { + [0x00] = "MSG_HELLO", + [0x01] = "MSG_HELLO_ACK", + [0x02] = "MSG_HELLO_TO", + [0x03] = "MSG_HELLO_TO_ACK", + [0x08] = "MSG_QUERY_DID", + [0x09] = "MSG_QUERY_DID_ACK", + [0x10] = "MSG_DEV_LGN", + [0x11] = "MSG_DEV_LGN_ACK", + [0x12] = "MSG_DEV_LGN_CRC", + [0x13] = "MSG_DEV_LGN_ACK_CRC", + [0x14] = "MSG_DEV_LGN_KEY", + [0x15] = "MSG_DEV_LGN_ACK_KEY", + [0x16] = "MSG_DEV_LGN_DSK", + [0x18] = "MSG_DEV_ONLINE_REQ", + [0x19] = "MSG_DEV_ONLINE_REQ_ACK", + [0x20] = "MSG_P2P_REQ", + [0x21] = "MSG_P2P_REQ_ACK", + [0x26] = "MSG_P2P_REQ_DSK", + [0x30] = "MSG_LAN_SEARCH", + [0x31] = "MSG_LAN_NOTIFY", + [0x32] = "MSG_LAN_NOTIFY_ACK", + [0x40] = "MSG_PUNCH_TO", + [0x41] = "MSG_PUNCH_PKT", + [0x42] = "MSG_P2P_RDY", + [0x43] = "MSG_P2P_RDY_ACK", + [0x60] = "MSG_RS_LGN", + [0x61] = "MSG_RS_LGN_ACK", + [0x62] = "MSG_RS_LGN1", + [0x63] = "MSG_RS_LGN1_ACK", + [0x67] = "MSG_LIST_REQ1", + [0x68] = "MSG_LIST_REQ", + [0x69] = "MSG_LIST_REQ_ACK", + [0x6A] = "MSG_LIST_REQ_DSK", + [0x70] = "MSG_RLY_HELLO", + [0x71] = "MSG_RLY_HELLO_ACK", + [0x72] = "MSG_RLY_PORT", + [0x73] = "MSG_RLY_PORT_ACK", + [0x74] = "MSG_RLY_PORT_KEY", + [0x75] = "MSG_RLY_PORT_ACK_KEY", + [0x78] = "MSG_RLY_BYTE_COUNT", + [0x80] = "MSG_RLY_REQ", + [0x81] = "MSG_RLY_REQ_ACK", + [0x82] = "MSG_RLY_TO", + [0x83] = "MSG_RLY_PKT", + [0x84] = "MSG_RLY_RDY", + [0x85] = "MSG_RLY_TO_ACK", + [0x87] = "MSG_RLY_SERVER_REQ", + -- [0x87] = "MSG_RLY_SERVER_REQ_ACK", -- has the same value as MSG_RLY_SERVER_REQ + [0x90] = "MSG_SDEV_RUN", + [0x91] = "MSG_SDEV_LGN", + -- [0x91] = "MSG_SDEV_LGN_ACK", -- has the same value as MSG_SDEV_LGN + [0x92] = "MSG_SDEV_LGN_CRC", + -- [0x92] = "MSG_SDEV_LGN_ACK_CRC", -- has the same value as MSG_SDEV_LGN_CRC + [0x93] = "MSG_SDEV_LGN_KEY", + [0x94] = "MSG_SDEV_REPORT", + [0xA0] = "MSG_CONNECT_REPORT", + [0xA1] = "MSG_REPORT_REQ", + [0xA2] = "MSG_REPORT", + [0xD0] = "MSG_DRW", + [0xD1] = "MSG_DRW_ACK", + [0xD8] = "MSG_PSR", + [0xE0] = "MSG_ALIVE", + [0xE1] = "MSG_ALIVE_ACK", + [0xF0] = "MSG_CLOSE", + [0xF4] = "MSG_MGM_DUMP_LOGIN_DID", + [0xF5] = "MSG_MGM_DUMP_LOGIN_DID_DETAIL", + [0xF6] = "MSG_MGM_DUMP_LOGIN_DID_1", + [0xF7] = "MSG_MGM_LOG_CONTROL", + [0xF8] = "MSG_MGM_REMOTE_MANAGEMENT", + [0xF9] = "MSG_REPORT_SESSION_READY", +} + +---- "Decryption" functionality + +-- Inspired from https://github.com/datenstau/A9_PPPP/blob/master/crypt.js +-- and https://github.com/fbertone/lib32100/issues/7 + +function pppp_create_psk_hash(psk) + local psk_hash = { 0x00, 0x00, 0x00, 0x00 } + + for i = 0, psk:len() - 1 do + local psk_byte = psk:sub(i + 1, i + 1):byte() + + psk_hash[1] = bit32.band(255, psk_hash[1] + psk_byte) + psk_hash[2] = bit32.band(255, psk_hash[2] - psk_byte) + psk_hash[3] = bit32.band(255, psk_hash[3] + math.floor(psk_byte / 3)) + psk_hash[4] = bit32.band(255, bit32.bxor(psk_hash[4], psk_byte)) + end + + return psk_hash +end + +function pppp_lookup(psk_hash, byte) + local psk_hash_index = bit32.band(byte, 3) + local index = bit32.band(psk_hash[psk_hash_index + 1] + byte, 255) + + return shuffle_table[index + 1] +end + +function pppp_decrypt(psk, encrypted) + local clear = ByteArray.new() + clear:set_size(encrypted:len()) + + local psk_hash = pppp_create_psk_hash(psk) + local prev_enc_byte = 0 + for position = 0, encrypted:len() - 1 do + local key_byte = pppp_lookup(psk_hash, prev_enc_byte) + + local old_byte = encrypted:get_index(position) + local new_byte = bit32.bxor(old_byte, key_byte) + clear:set_index(position, new_byte) + + prev_enc_byte = old_byte + end + + return clear +end + +function pppp_encrypt(psk, clear) + local encrypted = ByteArray.new() + encrypted:set_size(clear:len()) + + local psk_hash = pppp_create_psk_hash(psk) + local prev_enc_byte = 0 + + for position = 0, clear:len() - 1 do + local key_byte = pppp_lookup(psk_hash, prev_enc_byte) + + local old_byte = clear:get_index(position) + local new_byte = bit32.bxor(old_byte, key_byte) + encrypted:set_index(position, new_byte) + + prev_enc_byte = new_byte + end + + return encrypted +end + +shuffle_table = { + 0x7C, 0x9C, 0xE8, 0x4A, 0x13, 0xDE, 0xDC, 0xB2, 0x2F, 0x21, 0x23, 0xE4, 0x30, 0x7B, 0x3D, 0x8C, + 0xBC, 0x0B, 0x27, 0x0C, 0x3C, 0xF7, 0x9A, 0xE7, 0x08, 0x71, 0x96, 0x00, 0x97, 0x85, 0xEF, 0xC1, + 0x1F, 0xC4, 0xDB, 0xA1, 0xC2, 0xEB, 0xD9, 0x01, 0xFA, 0xBA, 0x3B, 0x05, 0xB8, 0x15, 0x87, 0x83, + 0x28, 0x72, 0xD1, 0x8B, 0x5A, 0xD6, 0xDA, 0x93, 0x58, 0xFE, 0xAA, 0xCC, 0x6E, 0x1B, 0xF0, 0xA3, + 0x88, 0xAB, 0x43, 0xC0, 0x0D, 0xB5, 0x45, 0x38, 0x4F, 0x50, 0x22, 0x66, 0x20, 0x7F, 0x07, 0x5B, + 0x14, 0x98, 0x1D, 0x9B, 0xA7, 0x2A, 0xB9, 0xA8, 0xCB, 0xF1, 0xFC, 0x49, 0x47, 0x06, 0x3E, 0xB1, + 0x0E, 0x04, 0x3A, 0x94, 0x5E, 0xEE, 0x54, 0x11, 0x34, 0xDD, 0x4D, 0xF9, 0xEC, 0xC7, 0xC9, 0xE3, + 0x78, 0x1A, 0x6F, 0x70, 0x6B, 0xA4, 0xBD, 0xA9, 0x5D, 0xD5, 0xF8, 0xE5, 0xBB, 0x26, 0xAF, 0x42, + 0x37, 0xD8, 0xE1, 0x02, 0x0A, 0xAE, 0x5F, 0x1C, 0xC5, 0x73, 0x09, 0x4E, 0x69, 0x24, 0x90, 0x6D, + 0x12, 0xB3, 0x19, 0xAD, 0x74, 0x8A, 0x29, 0x40, 0xF5, 0x2D, 0xBE, 0xA5, 0x59, 0xE0, 0xF4, 0x79, + 0xD2, 0x4B, 0xCE, 0x89, 0x82, 0x48, 0x84, 0x25, 0xC6, 0x91, 0x2B, 0xA2, 0xFB, 0x8F, 0xE9, 0xA6, + 0xB0, 0x9E, 0x3F, 0x65, 0xF6, 0x03, 0x31, 0x2E, 0xAC, 0x0F, 0x95, 0x2C, 0x5C, 0xED, 0x39, 0xB7, + 0x33, 0x6C, 0x56, 0x7E, 0xB4, 0xA0, 0xFD, 0x7A, 0x81, 0x53, 0x51, 0x86, 0x8D, 0x9F, 0x77, 0xFF, + 0x6A, 0x80, 0xDF, 0xE2, 0xBF, 0x10, 0xD7, 0x75, 0x64, 0x57, 0x76, 0xF3, 0x55, 0xCD, 0xD0, 0xC8, + 0x18, 0xE6, 0x36, 0x41, 0x62, 0xCF, 0x99, 0xF2, 0x32, 0x4C, 0x67, 0x60, 0x61, 0x92, 0xCA, 0xD3, + 0xEA, 0x63, 0x7D, 0x16, 0xB6, 0x8E, 0xD4, 0x68, 0x35, 0xC3, 0x52, 0x9D, 0x46, 0x44, 0x1E, 0x17, +} + +---- Debug helpers + +-- from https://stackoverflow.com/a/27028488 +function dump(o) + if type(o) == 'table' then + local s = '{ ' + for k, v in pairs(o) do + if type(k) ~= 'number' then k = '"' .. k .. '"' end + s = s .. '[' .. k .. '] = ' .. dump(v) .. ',' + end + return s .. '} ' + else + return tostring(o) + end +end diff --git a/dissectors/pqkem-coap/README.md b/dissectors/pqkem-coap/README.md new file mode 100644 index 0000000..bb7bc84 --- /dev/null +++ b/dissectors/pqkem-coap/README.md @@ -0,0 +1,50 @@ +# PQ-KEM sur CoAP (échange de clés post-quantique pour objets connectés) + +Post-dissecteur Wireshark Lua d'un **protocole expérimental d'échange de +clés post-quantique (ML-KEM-512 / Kyber) sur CoAP**, issu d'un projet de +recherche sur microcontrôleurs PineCone / BL602 : il ne remplace pas le +dissecteur CoAP natif, mais repère le trafic UDP 5683, saute l'en-tête et +les options CoAP, puis ajoute un sous-arbre « PQKEM over CoAP » décodant les +petites structures du projet — KEM_REQ (algorithme, longueur et texte +chiffré KEM), KEM_RESP et DATA (nonce de 12 octets, charge AES-CCM et tag +de 16 octets). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ChanduKomme/Post-quantum-key-exchange-mechanisms-for-IoT-devices (fichier `sniffer/sniffer/wireshark_pqkem_coap.lua`) | +| Commit importé | `9dca83b74e1a64268c2f8b47a928e6d313991c81` du 30/10/2026 (branche `master`, dernier commit ; dernière modification du dissecteur : `b986009` du 15/03/2026) | +| Licence amont | MIT — déclarée par l'auteur dans le README (badge « License: MIT » renvoyant vers https://opensource.org/licenses/MIT) ; pas de fichier LICENSE à la racine ni d'en-tête de licence dans le fichier Lua (les fichiers `LICENSE` du dépôt ne concernent que la bibliothèque tierce `kyber512_ref`) | +| Natif Wireshark 4.6.4 | Non — CoAP est natif, mais pas ce format applicatif propre au projet | + +L'amont ne fournit pas de texte de licence : texte de référence de la +licence MIT : https://spdx.org/licenses/MIT.html — à reproduire avec la +mention « Copyright (c) ChanduKomme » (titulaire du dépôt) en cas de +redistribution. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `wireshark_pqkem_coap.lua` | Post-dissecteur `pqkem` (UDP 5683) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. Le reste du dépôt (firmwares +émetteur / récepteur / renifleur BL602, bibliothèque Kyber) n'est pas +importé. + +## Utilisation + +Copier `wireshark_pqkem_coap.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `pqkem`. + +## Remarques + +- Format propre au prototype de recherche : sans intérêt hors de ce projet. +- Post-dissecteur : appelé sur chaque paquet, il ne garde que le port 5683. +- Utilise la bibliothèque `bit` (fournie par Wireshark), pas `bit32`. +- Le README amont signale un identifiant Wi-Fi codé en dur dans le firmware + du renifleur (non importé ici) ; rien de sensible dans le fichier Lua. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/pqkem-coap/wireshark_pqkem_coap.lua b/dissectors/pqkem-coap/wireshark_pqkem_coap.lua new file mode 100644 index 0000000..f199aaa --- /dev/null +++ b/dissectors/pqkem-coap/wireshark_pqkem_coap.lua @@ -0,0 +1,131 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/ChanduKomme/Post-quantum-key-exchange-mechanisms-for-IoT-devices (sniffer/sniffer/wireshark_pqkem_coap.lua), +-- commit 9dca83b74e1a64268c2f8b47a928e6d313991c81 du 30/10/2026. +-- Licence amont : MIT — voir README.md. + +-- pqkem_coap.lua +-- Simple Wireshark post-dissector for PQ KEM over CoAP on UDP/5683 +-- It doesn't replace the built-in CoAP dissector; it just adds a subtree +-- that understands the small KEM/DATA payload structs. + +local p_pqkem = Proto("pqkem", "Post-Quantum KEM over CoAP") + +local f_role = ProtoField.string("pqkem.role", "Role") +local f_type = ProtoField.uint8("pqkem.type", "MsgType", base.DEC) +local f_alg = ProtoField.uint8("pqkem.alg", "Alg", base.DEC) +local f_ct_len = ProtoField.uint16("pqkem.ct_len", "Ciphertext Length", base.DEC) +local f_nonce = ProtoField.bytes("pqkem.nonce", "Nonce") +local f_cipher = ProtoField.bytes("pqkem.cipher", "Ciphertext") +local f_tag = ProtoField.bytes("pqkem.tag", "Tag") + +p_pqkem.fields = { f_role, f_type, f_alg, f_ct_len, f_nonce, f_cipher, f_tag } + +local MSG_KEM_REQ = 1 +local MSG_KEM_RESP = 2 +local MSG_DATA = 3 + +function p_pqkem.dissector(tvb, pinfo, tree) + -- Only look at CoAP/UDP 5683 + if pinfo.dst_port ~= 5683 and pinfo.src_port ~= 5683 then + return + end + + if tvb:len() < 8 then + return + end + + -- Very minimal CoAP parsing: skip header + token + options until payload marker 0xFF + local b0 = tvb(0,1):uint() + local tkl = bit.band(b0, 0x0F) + local offset = 4 + tkl + if offset >= tvb:len() then return end + + -- Skip options until we see 0xFF + while offset < tvb:len() do + local b = tvb(offset,1):uint() + if b == 0xFF then + offset = offset + 1 + break + end + + local delta = bit.rshift(b, 4) + local length = bit.band(b, 0x0F) + offset = offset + 1 + + if delta == 13 then + if offset >= tvb:len() then return end + offset = offset + 1 + elseif delta == 14 then + if offset + 1 >= tvb:len() then return end + offset = offset + 2 + elseif delta == 15 then + return + end + + if length == 13 then + if offset >= tvb:len() then return end + offset = offset + 1 + elseif length == 14 then + if offset + 1 >= tvb:len() then return end + offset = offset + 2 + elseif length == 15 then + return + end + + offset = offset + length + end + + if offset >= tvb:len() then + return + end + + local payload_len = tvb:len() - offset + if payload_len < 4 then + return + end + + local subtree = tree:add(p_pqkem, tvb(offset, payload_len), "PQKEM over CoAP") + + local msg_type = tvb(offset,1):uint() + subtree:add(f_type, tvb(offset,1)) + offset = offset + 1 + + if msg_type == MSG_KEM_REQ then + subtree:add(f_role, "Sender->Gateway (KEM_REQ)") + if payload_len < 4 then return end + subtree:add(f_alg, tvb(offset,1)) + local alg = tvb(offset,1):uint() + offset = offset + 1 + subtree:add(f_ct_len, tvb(offset,2)) + local ct_len = tvb(offset,2):uint() + offset = offset + 2 + + local remaining = tvb:len() - offset + if ct_len > 0 and ct_len <= remaining then + subtree:add(f_cipher, tvb(offset, ct_len)) + end + + elseif msg_type == MSG_DATA then + subtree:add(f_role, "Sender->Gateway (DATA)") + offset = offset + 1 -- reserved + subtree:add(f_ct_len, tvb(offset,2)) + local ct_len = tvb(offset,2):uint() + offset = offset + 2 + + if payload_len < 4 + 12 then return end + subtree:add(f_nonce, tvb(offset,12)) + offset = offset + 12 + + local remaining = tvb:len() - offset + if ct_len > 0 and ct_len <= remaining then + subtree:add(f_cipher, tvb(offset, ct_len)) + if remaining >= ct_len + 16 then + subtree:add(f_tag, tvb(offset + ct_len, 16)) + end + end + else + subtree:add(f_role, "Unknown/Other") + end +end + +register_postdissector(p_pqkem) diff --git a/dissectors/proxyv2-mqtt/LICENSE b/dissectors/proxyv2-mqtt/LICENSE new file mode 100644 index 0000000..a5d7ce7 --- /dev/null +++ b/dissectors/proxyv2-mqtt/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Domenico Briganti + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/proxyv2-mqtt/README.md b/dissectors/proxyv2-mqtt/README.md new file mode 100644 index 0000000..a27999e --- /dev/null +++ b/dissectors/proxyv2-mqtt/README.md @@ -0,0 +1,50 @@ +# PROXY Protocol v2 + MQTT — courtiers MQTT derrière un répartiteur + +Dissecteur Wireshark Lua des connexions **MQTT précédées d'un en-tête +PROXY Protocol v2**, situation courante quand les objets connectés +passent par un répartiteur de charge ou un proxy inverse qui termine TLS +avant le courtier MQTT : signature, version / commande, famille / +protocole, longueur, adresses IPv4 et ports d'origine et de destination, +extensions TLV (dont `PP2_TYPE_SSL` et le nom commun du certificat +client `PP2_SUBTYPE_SSL_CN`), puis transmission du reste du flux au +dissecteur MQTT natif. Les connexions MQTT sans en-tête PROXY sont aussi +acceptées. Port TCP 1884. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/dometec/proxyv2-mqtt-dissecort | +| Commit importé | `00ea760fd110d24296c98a358cc3a53bd6a3dd2a` du 02/03/2026 (branche `main`, dernier commit, qui est aussi la dernière modification de `proxyv2_mqtt.lua`) | +| Licence amont | MIT (`LICENSE` amont, © 2026 Domenico Briganti) | +| Natif Wireshark 4.6.4 | **En partie** — dissecteur natif `proxy` (`packet-proxy.c`, PROXY v1 et v2, heuristique TCP et UDP activée par défaut, IPv4 / IPv6 / TLV) ; ce script n'apporte que l'enchaînement direct vers MQTT sur le port 1884 | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `proxyv2_mqtt.lua` | Protocole `proxyv2_mqtt` sur TCP 1884, puis dissecteur `mqtt` natif | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `proxyv2_mqtt.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `proxyv2_mqtt` ou `mqtt`. Pour un autre port, modifier la +dernière ligne du script (README amont). + +## Remarques + +- Avant d'utiliser ce script, essayer le dissecteur natif `proxy`, qui + reconnaît déjà PROXY v2 par heuristique et décode IPv6 et davantage de + TLV. +- Seules les adresses IPv4 (famille `0x11`) sont décodées ; le script + attend un segment de plus si l'en-tête PROXY est incomplet, puis passe + la suite au dissecteur MQTT. +- Le champ `proxyv2.ssl.cn` révèle le nom commun du certificat client. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/proxyv2-mqtt/proxyv2_mqtt.lua b/dissectors/proxyv2-mqtt/proxyv2_mqtt.lua new file mode 100644 index 0000000..533b813 --- /dev/null +++ b/dissectors/proxyv2-mqtt/proxyv2_mqtt.lua @@ -0,0 +1,135 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/dometec/proxyv2-mqtt-dissecort (proxyv2_mqtt.lua), +-- commit 00ea760fd110d24296c98a358cc3a53bd6a3dd2a du 02/03/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +local proxy_mqtt = Proto("proxyv2_mqtt", "PROXYv2 + MQTT") + +local f_signature = ProtoField.bytes("proxyv2.signature", "Signature") +local f_version = ProtoField.uint8("proxyv2.version_cmd", "Version/Command", base.HEX) +local f_family = ProtoField.uint8("proxyv2.family_proto", "Family/Protocol", base.HEX) +local f_length = ProtoField.uint16("proxyv2.len", "Header Length", base.DEC) + +local f_src_ip = ProtoField.ipv4("proxyv2.src_ip", "Source IP") +local f_dst_ip = ProtoField.ipv4("proxyv2.dst_ip", "Destination IP") +local f_src_port = ProtoField.uint16("proxyv2.src_port", "Source Port", base.DEC) +local f_dst_port = ProtoField.uint16("proxyv2.dst_port", "Destination Port", base.DEC) + +local f_tlv_type = ProtoField.uint8("proxyv2.tlv.type", "TLV Type", base.HEX) +local f_tlv_len = ProtoField.uint16("proxyv2.tlv.len", "TLV Length", base.DEC) +local f_ssl_cn = ProtoField.string("proxyv2.ssl.cn", "SSL Common Name") + +proxy_mqtt.fields = { + f_signature, f_version, f_family, f_length, + f_src_ip, f_dst_ip, f_src_port, f_dst_port, + f_tlv_type, f_tlv_len, f_ssl_cn +} + +local mqtt_dissector = Dissector.get("mqtt") +local proxy_signature = ByteArray.new("0D0A0D0A000D0A515549540A") + +function proxy_mqtt.dissector(buffer, pinfo, tree) + + -- Mimic v15 logic: simple length check to avoid errors on tiny packets + if buffer:len() < 16 then + return 0 + end + + local sig = buffer(0,12):bytes() + + if sig ~= proxy_signature then + -- Not a proxy packet, pass to MQTT + mqtt_dissector:call(buffer, pinfo, tree) + return buffer:len() + end + + -- Proxy Protocol v2 detected! + pinfo.cols.protocol = "PROXYv2+MQTT" + + -- We need to read the length from the header (bytes 14-15) to know how much to read + local addr_len = buffer(14,2):uint() + local total_header = 16 + addr_len + + -- If we don't have the full header + addresses yet, wait for more data. + if buffer:len() < total_header then + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return 0 + end + + -- Create subtree only for the Proxy Protocol header (not including MQTT payload) + local subtree = tree:add(proxy_mqtt, buffer(0, total_header), "PROXY Protocol v2") + + subtree:add(f_signature, buffer(0,12)) + subtree:add(f_version, buffer(12,1)) + + local family = buffer(13,1):uint() + subtree:add(f_family, buffer(13,1)) + subtree:add(f_length, buffer(14,2)) + + local offset = 16 + + -- IPv4 TCP + if family == 0x11 then + subtree:add(f_src_ip, buffer(offset,4)) + subtree:add(f_dst_ip, buffer(offset+4,4)) + subtree:add(f_src_port, buffer(offset+8,2)) + subtree:add(f_dst_port, buffer(offset+10,2)) + offset = offset + 12 + end + + -- TLV Parsing + while offset + 3 <= total_header do + local tlv_type = buffer(offset,1):uint() + local tlv_len = buffer(offset+1,2):uint() + + if offset + 3 + tlv_len > total_header then + break + end + + local tlv_tree = subtree:add(buffer(offset,3+tlv_len),"TLV") + tlv_tree:add(f_tlv_type, buffer(offset,1)) + tlv_tree:add(f_tlv_len, buffer(offset+1,2)) + + if tlv_type == 0x20 then -- PP2_TYPE_SSL + local nested_offset = offset + 3 + 5 -- Skip type, len, client, verify, reserved? Check spec. + -- Actually spec says: + -- struct pp2_tlv_ssl { + -- uint8_t client; + -- uint32_t verify; + -- struct pp2_tlv sub_tlv[0]; + -- }; + -- So header is 1+4 = 5 bytes. + + while nested_offset + 3 <= offset + 3 + tlv_len do + local sub_type = buffer(nested_offset,1):uint() + local sub_len = buffer(nested_offset+1,2):uint() + + if sub_type == 0x22 then -- PP2_SUBTYPE_SSL_CN + -- Ensure we don't read past buffer + if nested_offset + 3 + sub_len <= offset + 3 + tlv_len then + tlv_tree:add(f_ssl_cn, buffer(nested_offset+3, sub_len):string()) + end + end + + nested_offset = nested_offset + 3 + sub_len + end + end + + offset = offset + 3 + tlv_len + end + + -- Pass MQTT payload to dissector (using v15 proven method) + if buffer:len() > total_header then + -- Convert TvbRange -> ByteArray -> Tvb (safe conversion from v15) + local mqtt_range = buffer(total_header, buffer:len() - total_header) + local ba = mqtt_range:bytes() + local mqtt_tvb = ba:tvb("MQTT") + + -- Call MQTT dissector + mqtt_dissector:call(mqtt_tvb, pinfo, tree) + end + + -- Always return the full buffer length - we handle everything + return buffer:len() +end + +DissectorTable.get("tcp.port"):add(1884, proxy_mqtt) diff --git a/dissectors/ptracks-vsgobbi/README.md b/dissectors/ptracks-vsgobbi/README.md new file mode 100644 index 0000000..64af5be --- /dev/null +++ b/dissectors/ptracks-vsgobbi/README.md @@ -0,0 +1,76 @@ +# PtrackS — pistes radar du simulateur de contrôle aérien de l'ICEA (vsgobbi) + +Dissecteur Wireshark Lua des messages « PtrackS » d'un simulateur de +contrôle du trafic aérien de l'ICEA (Instituto de Controle do Espaço +Aéreo, Brésil), écrit par Vitor Sgobbi en 2015. Ces messages texte, +diffusés en multicast sur UDP 1970, portent des pistes d'aéronefs dont +les champs sont séparés par `#` : identifiant du simulateur, type de +message, indicatif, type d'avion, heure, statut, longitude, latitude, +cap, altitude et vitesse (issue #783). + +Malgré le titre de l'issue, il ne s'agit pas d'ASTERIX (format +EUROCONTROL, décodé nativement par Wireshark sous `asterix`) : le script +décode le format texte propre au simulateur. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/vsgobbi/PTracksV0.3 (`PtrackSPostDissector.lua`, `packetsPtrackS.pcap`) | +| Commit importé | `25db0d65ba41973820cda5e91dcbc3b02f903b5c` du 08/01/2019 (seul commit du dépôt, « Upload do script em Lua ») ; c'est aussi la dernière modification des deux fichiers | +| Licence amont | « GPL licensed » (ligne 7 du fichier importé : « Created by Vitor Sgobbi, 2015, GPL licensed, Version 0.3 »), sans version précisée ; interprétée à la Wireshark — GPL-2.0-or-later, compatible GPL-3.0-or-later, comme pour `mysql-x-protocol` et `smith-meter` | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur PtrackS dans `tshark -G protocols` | + +Le dépôt amont ne contient pas de fichier de licence : la mention +d'en-tête est la seule déclaration de licence (pas de `LICENSE` dans ce +dossier). Le script est repris tel quel (aucune modification de code) ; +seule l'en-tête de provenance de cinq lignes est ajoutée en tête +(convention du dépôt, issue #563). Non importés : une copie de +conflit de la version 0.2 (« conflicted copy 2015-04-17 »), les +extraits de charge utile, le mode d'emploi en PDF et les captures +d'écran. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/PtrackSPostDissector.lua` | Protocole `ptracks` (« PtrackS Protocol », ligne 15) ; champs `ptracks.*` (lignes 25 à 41, liste ligne 44) ; dissecteur ligne 46 ; port UDP 1970 (lignes 109 et 110) ; compteur de paquets par `Listener` (lignes 113 à 129) | +| `captures/packetsPtrackS.pcap` | Capture amont (154 Ko, 672 trames, en-tête Linux « cooked » SLL) : 237 messages PtrackS vers les groupes 235.12.2.4 et 233.12.2.4, mêlés à d'autres trafics (DNS, NTP, HTTP, TLS, ARP) | + +## Utilisation + +Copier `src/PtrackSPostDissector.lua` dans le dossier des plugins Lua +personnels (`~/.local/lib/wireshark/plugins/`). Le trafic du port UDP +1970 est décodé. Filtres : `ptracks`, `ptracks.callsign`, +`ptracks.alt`, `ptracks.speed`… Malgré son nom, le script n'est pas un +post-dissecteur (l'appel `register_postdissector`, ligne 132, est +commenté). + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : chargement sans erreur, mais +le message « Starting to analyse PtrackS UDP data... » s'affiche sur la +sortie standard (ligne 13). Essais sur la capture amont : + +| Essai | Résultat | +|---|---| +| Filtre `ptracks` | 237 paquets (tous les messages du port 1970) ; colonne Protocole toujours « UDP » | +| Piste `SM@1#541#VRN2541#B747#23.8875219822#VN#-919.919253652#1300.29803507#291.558797836#1245.03696945#72.0222…` | arbre décodé mais **valeurs décalées** : « Simulator ID: SM@ », « Message ID: #54 », « Aircraft Call Sign: #VRN254 », « Aircraft type: #B74 », « Altitude: 245.0 », « Speed: 696945 » (au lieu de `SM@1`, `541`, `VRN2541`, `B747`, `1245.03…`, `72.02…`) | +| Messages courts `101#621#(0, 0, 24, 25)` (23 paquets) et `101#551#` (5 paquets) vers 233.12.2.4 | **erreur Lua** lignes 78 et 74 (« Range is out of bounds ») | +| Fin de lecture | « UDP packets from PtrackS = 237 » écrit sur la sortie standard (ligne 125), y compris avec `-T fields` | + +## Limites constatées + +- Champs lus à des positions fixes (lignes 70 à 104) au lieu d'être + découpés sur `#` : comme les longueurs varient d'un message à l'autre + (106 à 107 octets dans la capture), les valeurs sont tronquées ou + décalées, et les champs `ptracks.*` sont inexploitables pour filtrer. +- Pas de contrôle de longueur : erreur Lua sur les messages de moins + de 30 octets environ ; les autres types de messages (101#621#, + 101#551#) ne sont pas reconnus. +- `print` au chargement et à la fin de lecture (lignes 13 et 125) : + pollue la sortie de tshark. +- Colonnes Protocole et Info jamais renseignées. +- Variables globales : `trivial_proto`, les champs `message*`, + `ip_src_f`, `udp_port_table`, `messageType*`, etc. diff --git a/dissectors/ptracks-vsgobbi/captures/packetsPtrackS.pcap b/dissectors/ptracks-vsgobbi/captures/packetsPtrackS.pcap new file mode 100755 index 0000000..e20af48 Binary files /dev/null and b/dissectors/ptracks-vsgobbi/captures/packetsPtrackS.pcap differ diff --git a/dissectors/ptracks-vsgobbi/src/PtrackSPostDissector.lua b/dissectors/ptracks-vsgobbi/src/PtrackSPostDissector.lua new file mode 100644 index 0000000..08558b6 --- /dev/null +++ b/dissectors/ptracks-vsgobbi/src/PtrackSPostDissector.lua @@ -0,0 +1,133 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later +-- Importé de https://github.com/vsgobbi/PTracksV0.3 (PtrackSPostDissector.lua), +-- commit 25db0d65ba41973820cda5e91dcbc3b02f903b5c du 08/01/2019 (dernière modification du fichier : +-- commit 25db0d65ba41973820cda5e91dcbc3b02f903b5c du 08/01/2019). +-- Licence amont : « GPL licensed », sans version (en-tête du fichier) — voir README.md. +-- PtrackSPostDissector.lua +-- Created by Vitor Sgobbi, 2015, GPL licensed, Version 0.3 +-- Brazilian Air Traffic Control Institute +-- e-mail: vitorvgsms@icea.gov.br +-- There is a "how to" created on this project directory... +-- How to extract the payload bytes of an UDP packet??? + +print("\n\nStarting to analyse PtrackS UDP data...\n") +-- declared "fake" protocol as trivial_proto +trivial_proto = Proto("PtrackS","PtrackS Protocol") + +-- declare some Fields to be read: +ip_src_f = Field.new("ip.src") +ip_dst_f = Field.new("ip.dst") +udp_src_f = Field.new ("udp.srcport") +udp_dst_f = Field.new ("udp.dstport") + + +-- create the fields for "ptracks protocol" +src_F = ProtoField.string("ptracks.src","Source") +dst_F = ProtoField.string("ptracks.dst","Destination") +conv_F = ProtoField.string("ptracks.conv","Conversation","A Conversation") +data_F = ProtoField.string("ptracks.data","Data set ------------------------------------------") + +-- create the string to see some of the message (protocol.fieldToString, Name of field, Type) +messageSimID = ProtoField.string("ptracks.simID","Simulator ID","Text") -- simulator ID +messageMsgID = ProtoField.string("ptracks.messageID", "Message ID", "Text") --Message ID +messageCallSign = ProtoField.string("ptracks.callsign", "Aircraft Call Sign", "Text") -- Aircraft register +messageAircType = ProtoField.string("ptracks.ackind", "Aircraft type", "Text") +messageTime = ProtoField.string("ptracks.time", "Time", "Text") -- In seconds.miliseconds +messageStatus = ProtoField.string("ptracks.status", "Status", "Text") +messageLong = ProtoField.string("ptracks.long", "Longitude", "Text") +messageLat = ProtoField.string("ptracks.lat", "Latitude", "Text") +messageHeading = ProtoField.string("ptracks.heading", "Heading", "Text") -- Heading +messageAlt = ProtoField.string("ptracks.alt", "Altitude", "Text") +messageSpeed = ProtoField.string("ptracks.speed", "Speed", "Text") + +-- add the field to the protocol +trivial_proto.fields = {src_F, dst_F, conv_F, data_F, messageSimID, messageMsgID, messageCallSign, messageAircType, messageTime, messageStatus, messageLong, messageLat, messageHeading, messageAlt, messageSpeed} +-- create a function to "postdissect" each frame +function trivial_proto.dissector(buffer,pinfo,tree) +-- obtain the current values the protocol fields +--local tcp_src = tcp_src_f() +--local tcp_dst = tcp_dst_f() +local udp_src = udp_src_f() +local udp_dst = udp_dst_f() +local ip_src = ip_src_f() +local ip_dst = ip_dst_f() + + +-- do dissection for udp +if udp_src then + --local subtree = tree:add(trivial_proto,"PtrackS Protocol") + local subtree = tree:add(trivial_proto,buffer()) + local src = tostring(ip_src) .. ":" .. tostring(udp_src) + local dst = tostring(ip_dst) .. ":" .. tostring(udp_dst) + local conv = src .. " -> " .. dst + + subtree:add(src_F,src) + subtree:add(dst_F,dst) + subtree:add(conv_F,conv) + subtree:add(data_F) +-- Now the boring part to separate correctly the fields + --subtree = tree:add(trivial_proto,buffer()) + messageType = buffer(0,3):le_uint() + messageTypeString0 = "Identification of simulation type" + messageType = buffer(4,3):string() + messageTypeString1 = "Identification of message type" + messageType2 = buffer(8,7):string() + messageTypeString2 = "Aircraft register" + messageType3 = buffer(16,4):string() + messageTypeString3 = "Aircraft type" + messageType4 = buffer(21,8):string() + messageTypeString4 = "t1 Time in Seconds (sec.millisec)" + messageType5 = buffer(35,2):string() + messageTypeString5 = "Status, VN: Flying Normally" + messageType6 = buffer(38,8):string() + messageTypeString6 = "Longitude" + messageType7 = buffer(53,8):string() + messageTypeString7 = "Latitude" + messageType8 = buffer(68,8):string() + messageTypeString8 = "Heading (Prow in Degrees)" + messageType9 = buffer(83,5):string() + messageTypeString9 = "Altitude (Meters)" + messageType10 = buffer(89,6):string() + messageTypeString10 = "Speed (Meters/Second)" + +-- create fields to separate and format data: + subtree:add_le(messageSimID,buffer(0,3)):append_text(" (".. messageTypeString0 ..")") + subtree:add_le(messageMsgID,buffer(4,3)):append_text(" (".. messageTypeString1 ..")") + subtree:add_le(messageCallSign,buffer(8,7)):append_text(" (".. messageTypeString2 ..")") + subtree:add_le(messageAircType,buffer(16,4)):append_text(" (".. messageTypeString3 ..")") + subtree:add_le(messageTime,buffer(21,8)):append_text(" (" .. messageTypeString4 ..")") + subtree:add_le(messageStatus,buffer(35,2)):append_text(" (" .. messageTypeString5 ..")") + subtree:add_le(messageLong,buffer(38,8)):append_text(" (" .. messageTypeString6 ..")") + subtree:add_le(messageLat,buffer(53,8)):append_text(" (" .. messageTypeString7 ..")") + subtree:add_le(messageHeading,buffer(68,8)):append_text(" (" .. messageTypeString8 ..")") + subtree:add_le(messageAlt,buffer(83,5)):append_text(" (" .. messageTypeString9 ..")") + subtree:add_le(messageSpeed,buffer(89,6)):append_text(" (" .. messageTypeString10 ..")") + end + end + +-- register udp 1970 port to get only ptracks packets +udp_port_table = DissectorTable.get("udp.port") +udp_port_table:add(1970,trivial_proto) + +--function to count number of packets +do + packets = 0; + local function init_listener() + local tap = Listener.new("frame","udp.port==1970") +--"frame","ip.addr == 231.12.2.4/8" + function tap.reset() + packets = 0; + end + function tap.packet(pinfo,tvb,ip) + packets = packets + 1 + end + function tap.draw() + print("UDP packets from PtrackS =",packets) + end + end + init_listener() +end + +--*This will register the trivial_proto (duplicated) +--register_postdissector(trivial_proto) + diff --git a/dissectors/quantar-sqd/LICENSE b/dissectors/quantar-sqd/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/dissectors/quantar-sqd/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/quantar-sqd/Qv24_P25NX.lua b/dissectors/quantar-sqd/Qv24_P25NX.lua new file mode 100644 index 0000000..8f42f82 --- /dev/null +++ b/dissectors/quantar-sqd/Qv24_P25NX.lua @@ -0,0 +1,721 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/ZL4JY/SQD (Qv24_P25NX.lua), +-- commit 4192d56e6a1f11531cf7be6659f2f80fb5aaf299 du 17/11/2016. +-- Licence amont : GPL-3.0-only (en-tête « version 3 », sans « or later » ; LICENSE amont) — voir README.md. +-- Simple Quantar Dissector UDP for P25NX +-- Copyright 2016 John Yaldwyn ZL4JY +-- Release version 2 November 2016 for testing +-- This dissector contains the resutls of investigative work by: +-- Matt Ames (né Robert) VK2LK, Tony Casciato KT9AC, John Yaldwyn ZL4JY, +-- and anonymous contributors. Input also from DG9BEW. +-- 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 3 of the License, see: +-- http://www.gnu.org/licenses/ +-- The use of Wireshark's API are covered by GPL +-- The UDP dissector looks at Cisco STUN encapsualted V.24 frames carried P25NX V2 style. +-- +-- Create QV24 protocol and its fields +-- +p_QV24 = Proto ("QV24_P25NX","Quantar V.24 over TCP or UDP - P25NX") +local hdr_fields = +{ + stun_payload_length = ProtoField.new ( + "Payload Length", + "cisco_stun.payload_length" , + ftypes.UINT8 + ), + stun_id = ProtoField.new ( + "STUN ID", + "cisco_stun.id" , + ftypes.UINT8 + ), + hdlc_address = ProtoField.new ( + "HDLC Address", + "hdlc.address" , + ftypes.UINT8 + ), + hdlc_control_field = ProtoField.new ( + "Control Field", + "hdlc.control_field" , + ftypes.UINT8, + nil, + base.HEX, + 0xFF + ), + hdlc_poll_final = ProtoField.new ( + "Poll/Final", + "hdlc.poll_final" , + ftypes.UINT8, + { + [0] = "Poll", + [1] = "Final" + }, + base.HEX, + 0x10 + ), + hdlc_frame_type_informational = ProtoField.new ( + "Frame Type", + "hdlc.frame_type" , + ftypes.UINT8, + { + [0] = "Informational Frame", + [1] = "Supervisory Frame", + [2] = "Informational Frame", + [3] = "Unnumbered Frame" + }, + base.HEX, + 0x01 + ), + hdlc_frame_type_supervisory = ProtoField.new ( + "Frame Type", + "hdlc.frame_type" , + ftypes.UINT8, + { + [0] = "Informational Frame", + [1] = "Supervisory Frame", + [2] = "Informational Frame", + [3] = "Unnumbered Frame" + }, + base.HEX, + 0x03 + ), + hdlc_frame_type_unnumbered = ProtoField.new ( + "Frame Type", + "hdlc.frame_type" , + ftypes.UINT8, + { + [0] = "Informational Frame", + [1] = "Supervisory Frame", + [2] = "Informational Frame", + [3] = "Unnumbered Frame" + }, + base.HEX, + 0x03 + ), + hdlc_function_bits_supervisory = ProtoField.new ( + "Function Bits", + "hdlc.function_bits" , + ftypes.UINT8, + { + [0] = "Receive-Ready", + [1] = "Receive-Not-Ready", + [2] = "Reject", + [3] = "Selective-Reject" + }, + base.HEX, + 0x0c + ), + hdlc_function_bits_unnumbered = ProtoField.new ( + "Function Bits", + "hdlc.function_bits", + ftypes.UINT8, + { + [0] = "Unnumbered Information", + [1] = "Set/Request Init.Mode", + [2] = "", + [3] = "Set Async. Response Mode" + }, + base.HEX, + 0xec + ), + p25_frametype = ProtoField.new ( + "Frame Type", + "qv24_p25nx.frametype", + ftypes.UINT8, + { + [0x00] = "NID Start/Stop", + [0x60] = "Voice Header Part 1", + [0x61] = "Voice Header Part 2", + [0x62] = "IMBE Voice 1", + [0x63] = "IMBE Voice 2", + [0x64] = "IMBE Voice 3 + Link Control", + [0x65] = "IMBE Voice 4 + Link Control", + [0x66] = "IMBE Voice 5 + Link Control", + [0x67] = "IMBE Voice 6 + Link Control", + [0x68] = "IMBE Voice 7 + Link Control", + [0x69] = "IMBE Voice 8 + Link Control", + [0x6a] = "IMBE Voice 9 + Low Speed Data", + [0x6b] = "IMBE Voice 10", + [0x6c] = "IMBE Voice 11", + [0x6d] = "IMBE Voice 12 + Encryption Sync", + [0x6e] = "IMBE Voice 13 + Encryption Sync", + [0x6f] = "IMBE Voice 14 + Encryption Sync", + [0x70] = "IMBE Voice 15 + Encryption Sync", + [0x71] = "IMBE Voice 16 + Encryption Sync", + [0x72] = "IMBE Voice 17 + Encryption Sync", + [0x73] = "IMBE Voice 18 + Low Speed Data", + [0xa1] = "Page call frame", + }, + base.HEX + ), + p25_rt_rt_enabled = ProtoField.new ("RT/RT enabled", "qv24_p25nx.rt_rt", ftypes.UINT8, { + [0x02] = "RT/RT enabled", + [0x04] = "RT/RT disabled", + }, base.HEX), + p25_site_number = ProtoField.new ("Site Number", "qv24_p25nx.site_number", ftypes.UINT8, { + [0x1b] = "Quantar", + [0x00] = "DIU 3000", + }, base.HEX), + p25_voice_page = ProtoField.new ("Voice/Page", "qv24_p25nx.voice_page", ftypes.UINT8, { + [0x0b] = "Voice", + [0x0f] = "Page", + }, base.HEX), + p25_rssi = ProtoField.new ("RSSI", "qv24_p25nx.rssi" , ftypes.UINT8), + p25_inverse_signal = ProtoField.new ("Inverse Signal", "qv24_p25nx.inverse_signal" , ftypes.UINT8), + p25_candidate_adj_mm = ProtoField.new ("Candidate adjusted MM", "qv24_p25nx.candidate_adj_mm", ftypes.UINT8), + p25_last_byte = ProtoField.new ("Last Byte", "qv24_p25nx.last_byte", ftypes.UINT8), + p25_lcf = ProtoField.new ( + "Link Control Format", + "qv24_p25nx.lcf", + ftypes.UINT8, + { + [0x00] = "Group Voice Channel User", + [0x42] = "Group Voice Channel Update", + [0x03] = "Unit to Unit Voice Channel User", + [0x44] = "Group Voice Channel Update - Explicit", + [0x45] = "Unit to Unit Answer Request", + [0x46] = "Telephone Interconnect Voice Channel User", + [0x47] = "Telephone Interconnect Answer Request", + [0x4F] = "Call Termination/Cancellation", + [0x50] = "Group Affiliation Query", + [0x51] = "Unit Registration Command", + [0x52] = "Unit Authentication Command", + [0x53] = "Status Query", + [0x60] = "System Service Broadcast", + [0x61] = "Secondary Control Channel Broadcast", + [0x62] = "Adjacent Site Status Broadcast", + [0x63] = "RFSS Status Broadcast", + [0x64] = "Network Status Broadcast", + [0x54] = "Status Update", + [0x55] = "Message Update", + [0x56] = "Call Alert", + [0x57] = "Extended Function Command", + [0x58] = "Channel Identifier Update", + [0x65] = "Protection Parameter Broadcast", + [0x66] = "Secondary Control Channel Broadcast - Explicit (LCSCBX)", + [0x67] = "Adjacent Site Status Broadcast – Explicit (LCASBX)", + [0x59] = "Channel Identifier Update – Explicit (LCCIUX)", + [0x68] = "RFSS Status Broadcast – Explicit (LCRSBX)", + [0x69] = "Network Status Broadcast – Explicit (LCNSBX)", + + [0x80] = "Encrypted Group Voice Channel User", + [0xc2] = "Encrypted Group Voice Channel Update", + [0x83] = "Encrypted Unit to Unit Voice Channel User", + [0xc4] = "Encrypted Group Voice Channel Update - Explicit", + [0xc5] = "Encrypted Unit to Unit Answer Request", + [0xc6] = "Encrypted Telephone Interconnect Voice Channel User", + [0xc7] = "Encrypted Telephone Interconnect Answer Request", + [0xcF] = "Encrypted Call Termination/Cancellation", + [0xd0] = "Encrypted Group Affiliation Query", + [0xd1] = "Encrypted Unit Registration Command", + [0xd2] = "Encrypted Unit Authentication Command", + [0xd3] = "Encrypted Status Query", + [0xe0] = "Encrypted System Service Broadcast", + [0xe1] = "Encrypted Secondary Control Channel Broadcast", + [0xe2] = "Encrypted Adjacent Site Status Broadcast", + [0xe3] = "Encrypted RFSS Status Broadcast", + [0xe4] = "Encrypted Network Status Broadcast", + [0xd4] = "Encrypted Status Update", + [0xd5] = "Encrypted Message Update", + [0xd6] = "Encrypted Call Alert", + [0xd7] = "Encrypted Extended Function Command", + [0xd8] = "Encrypted Channel Identifier Update", + [0xe5] = "Encrypted Protection Parameter Broadcast", + }, + base.HEX, + 0xFF + ), + p25_lcf_protected_flag = ProtoField.new ( + "Protected Flag", + "qv24_p25nx.lcf_protected_flag", + ftypes.UINT8, + { + [0] = "Not encrypted", + [1] = "Encrypted", + }, + base.HEX, + 0x80 + ), + p25_lcf_mfid_format = ProtoField.new ( + "Implicit / Explicit MFID Format", + "qv24_p25nx.lcf_mfid_format", + ftypes.UINT8, + { + [0] = "Implicit, MFID 0 is implied", + [1] = "Explicit", + }, + base.HEX, + 0x40 + ), + p25_lcf_link_control_opcode = ProtoField.new ( + "Link Control Opcode", + "qv24_p25nx.lcf_link_control_opcode", + ftypes.UINT8, + {}, + base.HEX, + 0x3F + ), + p25_mfid = ProtoField.new ( + "Manufacturer's ID", + "qv24_p25nx.mfid", + ftypes.UINT8, + { + [0x00] = "default value", + [0x01] = "another default value", + [0x09] = "Aselsan Inc.", + [0x10] = "Relm/BK Radio", + [0x18] = "Airbus", + [0x20] = "Cycomm", + [0x28] = "Efratom", + [0x30] = "Com-Net Ericsson", + [0x34] = "Etherstack", + [0x38] = "Datron", + [0x40] = "Icom", + [0x48] = "Garmin", + [0x50] = "GTE", + [0x55] = "IFR Systems", + [0x5A] = "INIT Innovations", + [0x60] = "GEC-Marconi", + [0x64] = "Harris Corp (inactive)", + [0x68] = "Kenwood", + [0x70] = "Glenayre Electronics", + [0x74] = "Japan Radio Co.", + [0x78] = "Kokusai", + [0x7c] = "Maxon", + [0x80] = "Midland", + [0x86] = "Daniels Electronics", + [0x90] = "Motorola", + [0xa0] = "Thales", + [0xa4] = "Harris Corporation", + [0xAA] = "NRPC", + [0xb0] = "Raytheon", + [0xc0] = "SEA", + [0xc8] = "Securicor", + [0xd0] = "ADI", + [0xD8] = "Tait Electronics", + [0xe0] = "Teletec", + [0xf0] = "Transcrypt International", + [0xF8] = "Vertex Standard", + [0xFC] = "Zetron, Inc.", + }, + base.HEX + ), + p25_service_options = ProtoField.new ( + "Service Options", + "qv24_p25nx.service_options", + ftypes.UINT8, + {}, + base.HEX, + 0xFF + ), + p25_service_options_emergency = ProtoField.new ( + "Emergency Flag", + "qv24_p25nx.service_options_emergency", + ftypes.UINT8, + { + [0] = "Normal or non-emergency status", + [1] = "Emergency status requiring special processing", + }, + base.HEX, + 0x80 + ), + p25_service_options_protected = ProtoField.new ( + "Protected Flag", + "qv24_p25nx.service_options_protected", + ftypes.UINT8, + { + [0] = "non protected mode", + [1] = "protected mode", + }, + base.HEX, + 0x40 + ), + p25_service_options_duplex = ProtoField.new ( + "Duplex Flag", + "qv24_p25nx.service_options_duplex", + ftypes.UINT8, + { + [0] = "half duplex, the subscriber unit will be capable of transmitting but not simultaneously receiving on the assigned channel", + [1] = "full duplex, the subscriber unit will be capable of transmitting and receiving simultaneously on the assigned channel", + }, + base.HEX, + 0x20 + ), + p25_service_options_mode = ProtoField.new ( + "Data Mode Flag", + "qv24_p25nx.service_options_mode", + ftypes.UINT8, + { + [0] = "circuit mode - the resources shall support circuit switch operation", + [1] = "packet mode - the resources shall support packet switch operation", + }, + base.HEX, + 0x10 + ), + p25_service_options_priority = ProtoField.new ( + "Priority", + "qv24_p25nx.service_options_priority", + ftypes.UINT8, + {}, + base.HEX, + 0x07 + ), + p25_target_address = ProtoField.new ( + "Target Address/Radio ID", + "qv24_p25nx.target_address", + ftypes.UINT24, + { + [1] = "Local", + [10100] = "Worldwide", + [10101] = "WW Tac1", + [10102] = "WW Tac2", + [10103] = "WW Tac3", + [10200] = "North America", + [10201] = "NORTAC1", + [10202] = "NORTAC2", + [10203] = "NORTAC3", + [10235] = "Florida", + [10250] = "California", + [10251] = "NorCal", + [10252] = "SoCal", + [10300] = "Europe", + [10301] = "EURTAC1", + [10302] = "EURTAC2", + [10303] = "EURTAC4", + [10310] = "France", + [10320] = "Germany", + [10400] = "Pacific", + [10401] = "PACTAC1", + [10402] = "PACTAC2", + [10403] = "PACTAC3", + }, + base.DEC + ), + p25_source_address = ProtoField.new ( + "Source Address/Radio ID", + "qv24_p25nx.source_address", + ftypes.UINT24, + p25_radio_ids, + base.DEC + ), + p25_low_speed_data = ProtoField.new ( + "Low speed data", + "qv24_p25nx.low_speed_data", + ftypes.UINT16, + {}, + base.HEX + ), + p25_enc_iv = ProtoField.new ( + "Encryption initialization vector/Message Indicator", + "qv24_p25nx.enc_iv", + ftypes.BYTES, + {}, + base.NONE + ), + p25_algid = ProtoField.new ( + "Algorithm ID", + "qv24_p25nx.algid", + ftypes.UINT8, + { + [0x00] = "ACCORDION 1.3", + [0x01] = "BATON (Auto Even)", + [0x02] = "FIREFLY Type 1", + [0x03] = "MAYFLY Type 1", + [0x04] = "SAVILLE", + [0x41] = "BATON (Auto Odd)", + [0x80] = "Unencrypted", + [0x81] = "DES", + [0x83] = "Triple DES", + [0x84] = "AES 256", + [0x85] = "AES 128 GCM", + [0x88] = "AES CBC", + [0x9F] = "DES-XL", + [0xA0] = "DVI-XL", + [0xA1] = "DVP-XL", + [0xAA] = "ADP", + }, + base.HEX + ), + p25_keyid = ProtoField.new ( + "Key ID", + "qv24_p25nx.keyid", + ftypes.UINT16, + {}, + base.HEX + ), +} +p_QV24.fields = hdr_fields +-- +-- QV24 dissector function +-- +function p_QV24.dissector (buf, pkt, root) + -- + -- Validate packet length is adequate, otherwise quit + -- + local pktlen = buf:len() + if pktlen < 7 then + -- frame to short to contains STUN + return 0 + end + + local bytes_consumed = 0 + while bytes_consumed < pktlen do + local stun_tvbr = buf(0 + bytes_consumed, 7) + local stun_payload_length_tvbr = stun_tvbr(5, 1) + local stun_payload_length = stun_payload_length_tvbr:uint() + local stun_id_tvbr = stun_tvbr(6, 1) + local stun_id = stun_id_tvbr:uint() + local stun_payload_tvbr = buf(7 + bytes_consumed, stun_payload_length) + local stun_tree = root:add(stun_tvbr, "Cisco STUN") + stun_tree:add(hdr_fields.stun_id, stun_id_tvbr) + stun_tree:add(hdr_fields.stun_payload_length, stun_payload_length_tvbr) + pkt.cols.info:set("Cisco STUN") + pkt.cols.protocol:set("Cisco STUN") + + if stun_payload_tvbr:len() >= 2 then + local hdlc_tvbr = stun_payload_tvbr(0, 2) + local hdlc_address_tvbr = hdlc_tvbr(0, 1) + local hdlc_address = hdlc_address_tvbr:uint() + local hdlc_control_field_tvbr = hdlc_tvbr(1, 1) + local hdlc_control_field = hdlc_control_field_tvbr:uint() + local hdlc_tree = root:add(hdlc_tvbr, "Quantar HDLC") + pkt.cols.info:set("Quantar HDLC") + pkt.cols.protocol:set("Quantar HDLC") + + local frame_type_bits = 0 + if hdlc_control_field % 2 > 0 then + if ((hdlc_control_field - (hdlc_control_field % 2)) / 2) % 2 > 0 then + -- Unnumbered frame + frame_type_bits = 3 + hdlc_tree:add(hdr_fields.hdlc_frame_type_unnumbered, hdlc_control_field_tvbr) + hdlc_tree:add(hdr_fields.hdlc_function_bits_unnumbered, hdlc_control_field_tvbr) + else + -- Supervisory frame + frame_type_bits = 1 + hdlc_tree:add(hdr_fields.hdlc_frame_type_supervisory, hdlc_control_field_tvbr) + hdlc_tree:add(hdr_fields.hdlc_function_bits_supervisory, hdlc_control_field_tvbr) + local function_bits = hdlc_control_field_tvbr:bitfield(4,2) + if function_bits == 0 then + pkt.cols.info:set("Receive-Ready") + elseif function_bits == 1 then + pkt.cols.info:set("Receive-Not-Ready") + elseif function_bits == 2 then + pkt.cols.info:set("Reject") + elseif function_bits == 3 then + pkt.cols.info:set("Selective-Reject") + end + end + else + -- Information frame + frame_type_bits = 0 + hdlc_tree:add(hdr_fields.hdlc_frame_type_informational, hdlc_control_field_tvbr) + end + + local poll_final = hdlc_control_field_tvbr:uint() + hdlc_tree:add(hdr_fields.hdlc_poll_final, hdlc_control_field_tvbr) + + if stun_payload_tvbr:len() > 2 then + local p25_tvbr = stun_payload_tvbr(2) + + pkt.cols.protocol:set(p_QV24.name) + local tree = root:add(p_QV24, p25_tvbr) + local frame_type_tvbr = p25_tvbr(0,1) + local frame_type = frame_type_tvbr:uint() + tree:add(hdr_fields.p25_frametype, frame_type_tvbr) + local frame_type_text = { + [0x00] = "NID Start/Stop", + [0x01] = "undefined", + [0x59] = "undefined", + [0x60] = "Voice Header Part 1", + [0x61] = "Voice Header Part 2", + [0x62] = "IMBE Voice 1", + [0x63] = "IMBE Voice 2", + [0x64] = "IMBE Voice 3 + Link Control", + [0x65] = "IMBE Voice 4 + Link Control", + [0x66] = "IMBE Voice 5 + Link Control", + [0x67] = "IMBE Voice 6 + Link Control", + [0x68] = "IMBE Voice 7 + Link Control", + [0x69] = "IMBE Voice 8 + Link Control", + [0x6a] = "IMBE Voice 9 + Low Speed Data", + [0x6b] = "IMBE Voice 10", + [0x6c] = "IMBE Voice 11", + [0x6d] = "IMBE Voice 12 + Encryption Sync", + [0x6e] = "IMBE Voice 13 + Encryption Sync", + [0x6f] = "IMBE Voice 14 + Encryption Sync", + [0x70] = "IMBE Voice 15 + Encryption Sync", + [0x71] = "IMBE Voice 16 + Encryption Sync", + [0x72] = "IMBE Voice 17 + Encryption Sync", + [0x73] = "IMBE Voice 18 + Low Speed Data", + [0xa1] = "Page call frame", + } + pkt.cols.info:set(frame_type_text[frame_type]) + if frame_type == 0x00 then + local p25_rt_rt_enabled_tvbr = p25_tvbr(2,1) + local rt_rt_enabled = p25_rt_rt_enabled_tvbr:uint() + tree:add(hdr_fields.p25_rt_rt_enabled, p25_rt_rt_enabled_tvbr) + + local p25_voice_page_tvbr = p25_tvbr(4,1) + local voice_page = p25_voice_page_tvbr:uint() + tree:add(hdr_fields.p25_voice_page, p25_voice_page_tvbr) + + if p25_tvbr(3,1):uint() == 0x0c then + pkt.cols.info:set("ICW start") + elseif p25_tvbr(3,1):uint() == 0x25 then + pkt.cols.info:set("ICW terminate") + end + elseif frame_type == 0x60 then + local p25_rt_rt_enabled_tvbr = p25_tvbr(2,1) + tree:add(hdr_fields.p25_rt_rt_enabled, p25_rt_rt_enabled_tvbr) + + local p25_voice_page_tvbr = p25_tvbr(4,1) + tree:add(hdr_fields.p25_voice_page, p25_voice_page_tvbr) + + local p25_site_number_tvbr = p25_tvbr(5,1) + tree:add(hdr_fields.p25_site_number, p25_site_number_tvbr) + + local p25_rssi_tvbr = p25_tvbr(6,1) + tree:add(hdr_fields.p25_rssi, p25_rssi_tvbr) + + local p25_inverse_signal_tvbr = p25_tvbr(8,1) + tree:add(hdr_fields.p25_inverse_signal, p25_inverse_signal_tvbr) + elseif frame_type == 0x62 then + local p25_rt_rt_enabled_tvbr = p25_tvbr(2,1) + tree:add(hdr_fields.p25_rt_rt_enabled, p25_rt_rt_enabled_tvbr) + + local p25_voice_page_tvbr = p25_tvbr(4,1) + tree:add(hdr_fields.p25_voice_page, p25_voice_page_tvbr) + + local p25_site_number_tvbr = p25_tvbr(5,1) + tree:add(hdr_fields.p25_site_number, p25_site_number_tvbr) + + local p25_rssi_tvbr = p25_tvbr(6,1) + tree:add(hdr_fields.p25_rssi, p25_rssi_tvbr) + + local p25_inverse_signal_tvbr = p25_tvbr(8,1) + tree:add(hdr_fields.p25_inverse_signal, p25_inverse_signal_tvbr) + + local p25_candidate_adj_mm_tvbr = p25_tvbr(9,1) + tree:add(hdr_fields.p25_candidate_adj_mm, p25_candidate_adj_mm_tvbr) + elseif frame_type == 0x63 then + local p25_last_byte_tvbr = p25_tvbr(13,1) + tree:add(hdr_fields.p25_last_byte, p25_last_byte_tvbr) + elseif frame_type == 0x64 then + local p25_lcf_tvbr = p25_tvbr(1,1) + tree:add(hdr_fields.p25_lcf, p25_lcf_tvbr) + tree:add(hdr_fields.p25_lcf_protected_flag, p25_lcf_tvbr) + tree:add(hdr_fields.p25_lcf_mfid_format, p25_lcf_tvbr) + tree:add(hdr_fields.p25_lcf_link_control_opcode, p25_lcf_tvbr) + local lcf_mfid_format = p25_lcf_tvbr:bitfield(1,1) + + if lcf_mfid_format == 0 then + local p25_mfid_tvbr = p25_tvbr(2,1) + tree:add(hdr_fields.p25_mfid, p25_mfid_tvbr) + local p25_service_options_tvbr = p25_tvbr(3,1) + tree:add(hdr_fields.p25_service_options, p25_service_options_tvbr) + tree:add(hdr_fields.p25_service_options_emergency, p25_service_options_tvbr) + tree:add(hdr_fields.p25_service_options_protected, p25_service_options_tvbr) + tree:add(hdr_fields.p25_service_options_duplex, p25_service_options_tvbr) + tree:add(hdr_fields.p25_service_options_mode, p25_service_options_tvbr) + tree:add(hdr_fields.p25_service_options_priority, p25_service_options_tvbr) + else + tree:add("uncommon LCF, will be decoded in later version") + end + elseif frame_type == 0x65 then + local p25_target_address_tvbr = p25_tvbr(1,3) + tree:add(hdr_fields.p25_target_address, p25_target_address_tvbr) + elseif frame_type == 0x66 then + local p25_source_address_tvbr = p25_tvbr(1,3) + tree:add(hdr_fields.p25_source_address, p25_source_address_tvbr) + elseif frame_type == 0x67 then + + elseif frame_type == 0x68 then + + elseif frame_type == 0x69 then + + elseif frame_type == 0x6a then + local p25_low_speed_data_tvbr = p25_tvbr(2,2) + tree:add(hdr_fields.p25_low_speed_data, p25_low_speed_data_tvbr) + elseif frame_type == 0x6b then + local p25_rt_rt_enabled_tvbr = p25_tvbr(2,1) + tree:add(hdr_fields.p25_rt_rt_enabled, p25_rt_rt_enabled_tvbr) + local p25_voice_page_tvbr = p25_tvbr(4,1) + tree:add(hdr_fields.p25_voice_page, p25_voice_page_tvbr) + local p25_site_number_tvbr = p25_tvbr(5,1) + tree:add(hdr_fields.p25_site_number, p25_site_number_tvbr) + + local p25_rssi_tvbr = p25_tvbr(6,1) + tree:add(hdr_fields.p25_rssi, p25_rssi_tvbr) + + local p25_inverse_signal_tvbr = p25_tvbr(8,1) + tree:add(hdr_fields.p25_inverse_signal, p25_inverse_signal_tvbr) + + local p25_candidate_adj_mm_tvbr = p25_tvbr(9,1) + tree:add(hdr_fields.p25_candidate_adj_mm, p25_candidate_adj_mm_tvbr) + elseif frame_type == 0x6c then + + elseif frame_type == 0x6d then + local p25_enc_iv_tvbr = p25_tvbr(1,3) + tree:add(hdr_fields.p25_enc_iv, p25_enc_iv_tvbr) + elseif frame_type == 0x6e then + local p25_enc_iv_tvbr = p25_tvbr(1,3) + tree:add(hdr_fields.p25_enc_iv, p25_enc_iv_tvbr) + elseif frame_type == 0x6f then + local p25_enc_iv_tvbr = p25_tvbr(1,3) + tree:add(hdr_fields.p25_enc_iv, p25_enc_iv_tvbr) + elseif frame_type == 0x70 then + local p25_algid_tvbr = p25_tvbr(1,1) + tree:add(hdr_fields.p25_algid, p25_algid_tvbr) + local p25_keyid_tvbr = p25_tvbr(2,2) + tree:add(hdr_fields.p25_keyid, p25_keyid_tvbr) + elseif frame_type == 0x71 then + + elseif frame_type == 0x72 then + + elseif frame_type == 0x73 then + local p25_low_speed_data_tvbr = p25_tvbr(2,2) + tree:add(hdr_fields.p25_low_speed_data, p25_low_speed_data_tvbr) + elseif frame_type == 0xa1 then + local emergency_flags_tvbr = p25_tvbr(9,1) + local emergency_flags = emergency_flags_tvbr:uint() + if emergency_flags == 0x9F then + tree:add(emergency_flags_tvbr, "Page") + local p25_source_address_tvbr = p25_tvbr(13,3) + tree:add(hdr_fields.p25_source_address, p25_source_address_tvbr) + local p25_target_address_tvbr = p25_tvbr(17,2) + tree:add(hdr_fields.p25_target_address, p25_target_address_tvbr) + elseif emergency_flags == 0xA7 then + tree:add(emergency_flags_tvbr, "EMERGENCY") + local p25_source_address_tvbr = p25_tvbr(16,3) + tree:add(hdr_fields.p25_source_address, p25_source_address_tvbr) + local p25_target_address_tvbr = p25_tvbr(14,2) + tree:add(hdr_fields.p25_target_address, p25_target_address_tvbr) + end + end + end + else + -- payload less than 2 bytes + return 0 + end + bytes_consumed = bytes_consumed + stun_payload_length + 7 + end +return bytes_consumed +end +-- +-- Initialization routine +function p_QV24.init() +end +-- +-- Register the chained dissector for UDP port 30000 +local udp_dissector_table = DissectorTable.get("udp.port") +dissector = udp_dissector_table:get_dissector(30000) +udp_dissector_table:add(30000, p_QV24) +-- +-- Register the chained dissector for TCP port 1994 +local tcp_dissector_table = DissectorTable.get("tcp.port") +dissector = tcp_dissector_table:get_dissector(1994) +tcp_dissector_table:add(1994, p_QV24) +-- +-- END + + diff --git a/dissectors/quantar-sqd/Qv24_UDP.lua b/dissectors/quantar-sqd/Qv24_UDP.lua new file mode 100644 index 0000000..cc8ff5b --- /dev/null +++ b/dissectors/quantar-sqd/Qv24_UDP.lua @@ -0,0 +1,196 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/ZL4JY/SQD (Qv24_UDP.lua), +-- commit 4192d56e6a1f11531cf7be6659f2f80fb5aaf299 du 17/11/2016. +-- Licence amont : GPL-3.0-only (en-tête « version 3 », sans « or later » ; LICENSE amont) — voir README.md. +-- Simple Quantar Dissector UDP +-- Copyright 2016 John Yaldwyn +-- Release version 1.5 September 2016 for testing +-- This dissector contains the results of investigative work by: +-- Matt Ames (né Robert) VK2LK, Tony Casciato KT9AC, John Yaldwyn ZL4JY, +-- and anonymous contributors. +-- 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 3 of the License, see: +-- http://www.gnu.org/licenses/ +-- The use of Wireshark's API are covered by GPL. +-- The dissector looks at naked Quantar V.24 frames carried over UDP. +-- +-- Create QV24 protocol and fields +-- +p_QV24 = Proto ("QV24_UDP","Quantar V.24 over UDP") +local f_command = ProtoField.uint8("QV24.command", "Frame", base.HEX) +local f_data = ProtoField.string("QV24.data", "Data", FT_STRING) +-- +p_QV24.fields = {f_command} +-- +-- QV24 dissector function +-- +function p_QV24.dissector (buf, pkt, root) +-- +-- Validate packet length otherwise quit +-- +if buf:len() == 0 then return end +pkt.cols.protocol = p_QV24.name +-- +-- Frame type decoding +-- + local frame = buf(0,1):uint() + local frametext = "undefined" + if frame == 0x00 then + if buf(3,1):uint() == 0x0c then frametext = "ICW start" + elseif buf(3,1):uint() == 0x25 then frametext = "ICW terminate" + end + elseif frame == 0x60 then frametext = "Voice Header Part 1" + elseif frame == 0x61 then frametext = "Voice Header Part 2" + elseif frame == 0x62 then frametext = "IMBE Voice 1" + elseif frame == 0x63 then frametext = "IMBE Voice 2" + elseif frame == 0x64 then frametext = "IMBE Voice 3 + Link Control" + elseif frame == 0x65 then frametext = "IMBE Voice 4 + Link Control" + elseif frame == 0x66 then frametext = "IMBE Voice 5 + Link Control" + elseif frame == 0x67 then frametext = "IMBE Voice 6 + Link Control" + elseif frame == 0x68 then frametext = "IMBE Voice 7 + Link Control" + elseif frame == 0x69 then frametext = "IMBE Voice 8 + Link Control" + elseif frame == 0x6a then frametext = "IMBE Voice 9 + Low Speed Data" + elseif frame == 0x6b then frametext = "IMBE Voice 10" + elseif frame == 0x6c then frametext = "IMBE Voice 11" + elseif frame == 0x6d then frametext = "IMBE Voice 12 + Encryption Sync" + elseif frame == 0x6e then frametext = "IMBE Voice 13 + Encryption Sync" + elseif frame == 0x6f then frametext = "IMBE Voice 14 + Encryption Sync" + elseif frame == 0x70 then frametext = "IMBE Voice 15 + Encryption Sync" + elseif frame == 0x71 then frametext = "IMBE Voice 16 + Encryption Sync" + elseif frame == 0x72 then frametext = "IMBE Voice 17 + Encryption Sync" + elseif frame == 0x73 then frametext = "IMBE Voice 18 + Low Speed Data" + elseif frame == 0xa1 then frametext = "Page call frame" + end +-- + pkt.cols.info = frametext +-- +-- Create subtree for QV24 + subtree = root:add(p_QV24, buf(0)) +-- +-- Add protocol fields to subtree + subtree:append_text(": " .. frametext) +-- +-- Description of payload + subtree:append_text(", payload:") +-- +-- Description of bits before and after IMBE codeword + if frame == 0x00 then + if buf(2,1):uint() == 0x02 then subtree:append_text(" RT/RT enabled") + elseif buf(2,1):uint() == 0x04 then subtree:append_text(" RT/RT disbaled") + end + if buf(4,1):uint() == 0x0b then subtree:append_text(", Voice") + elseif buf(4,1):uint() == 0x0f then subtree:append_text(", Page") + end + end + if frame == 0x60 then + if buf(5,1):uint() == 0x00 then subtree:append_text(" DIU 3000,") + elseif buf(5,1):uint() == 0x1b then subtree:append_text(" Quantar,") + end + if buf(2,1):uint() == 0x02 then subtree:append_text(" RT/RT enabled") + elseif buf(2,1):uint() == 0x04 then subtree:append_text(" RT/RT disbaled") + end + if buf(4,1):uint() == 0x0b then subtree:append_text(", Voice") + elseif buf(4,1):uint() == 0x0f then subtree:append_text(", Page") + end + subtree:append_text(" LDU1 RSSI= ".. buf(6,1):uint()) + subtree:append_text(", inverse signal= ".. buf(8,1):uint()) + end + if frame == 0x62 then + if buf(5,1):uint() == 0x00 then subtree:append_text(" DIU 3000,") + elseif buf(5,1):uint() == 0x1b then subtree:append_text(" Quantar,") + end + if buf(2,1):uint() == 0x02 then subtree:append_text(" RT/RT enabled") + elseif buf(2,1):uint() == 0x04 then subtree:append_text(" RT/RT disbaled") + end + if buf(4,1):uint() == 0x0b then subtree:append_text(", Voice,") + elseif buf(4,1):uint() == 0x0f then subtree:append_text(", Page") + end + subtree:append_text(" LDU1 RSSI= ".. buf(6,1):uint()) + subtree:append_text(", inverse signal= ".. buf(8,1):uint()) + subtree:append_text(", candidate adjusted MM= $".. buf(9,1)) + end + if frame == 0x63 or frame == 0x6c then + subtree:append_text(" last byte= $".. buf(13,1)) + end + if frame == 0x64 then + if buf(1,1):uint() == 0x00 then subtree:append_text(" Voice 4 contains TGID,") + elseif buf(1,1):uint() == 0x03 then subtree:append_text(" Voice 4 contains Call target RID,") + else subtree:append_text(" Link Control Format= $".. buf(1,1)) + end + if buf(2,1):uint() == 0x00 then subtree:append_text(" MFID= default") + elseif buf(2,1):uint() == 0x40 then subtree:append_text(" MFID= Icom") + elseif buf(2,1):uint() == 0x90 then subtree:append_text(" MFID= Motorola") + elseif buf(2,1):uint() == 0xA4 then subtree:append_text(" MFID= Harris") + elseif buf(2,1):uint() == 0xD8 then subtree:append_text(" MFID= Tait") + else subtree:append_text(" MFID= $".. buf(2,1)) + end + if buf(3,1):uint() == 0x40 then subtree:append_text(", encrypted") + elseif buf(2,1):uint() == 0x90 then subtree:append_text(", legacy encryption") + elseif buf(2,1):uint() == 0x00 then subtree:append_text(", no encryption") + end + end + if frame == 0x65 then + subtree:append_text(" TGID (or Call RID)= ".. buf(1,3):uint()) + end + if frame == 0x66 then + subtree:append_text(" RID= ".. buf(1,3):uint()) + end + if frame == 0x6a then + subtree:append_text(" LDU1 low speed dat= $".. buf(1,2)) + subtree:append_text(" last byte= $".. buf(15,1)) + end + if frame == 0x6b then + if buf(5,1):uint() == 0x00 then subtree:append_text(" DIU 3000,") + elseif buf(5,1):uint() == 0x1b then subtree:append_text(" Quantar,") + end + if buf(2,1):uint() == 0x02 then subtree:append_text(" RT/RT enabled") + elseif buf(2,1):uint() == 0x04 then subtree:append_text(" RT/RT disbaled") + end + if buf(4,1):uint() == 0x0b then subtree:append_text(", Voice,") + elseif buf(4,1):uint() == 0x0f then subtree:append_text(", Page") + end + subtree:append_text(" LDU2 RSSI= ".. buf(6,1):uint()) + subtree:append_text(", inverse signal= ".. buf(8,1):uint()) + subtree:append_text(", candidate adjusted MM= $".. buf(9,1)) + end + if frame == 0x70 then subtree:append_text(" ALGID= $".. buf(1,1)) + if buf(1,1):uint() <= 0x7F then subtree:append_text(": Possible Type 1, be very afraid") + elseif buf(1,1):uint() == 0x80 then subtree:append_text(": Unencrypted") + elseif buf(1,1):uint() == 0x81 then subtree:append_text(": DES") + elseif buf(1,1):uint() == 0x83 then subtree:append_text(": Triple DES") + elseif buf(1,1):uint() == 0x84 then subtree:append_text(": AES 256") + elseif buf(1,1):uint() == 0x85 then subtree:append_text(": AES 128 GCM") + elseif buf(1,1):uint() == 0x88 then subtree:append_text(": AES CBC") + elseif buf(1,1):uint() == 0x9F then subtree:append_text(": DES-XL") + elseif buf(1,1):uint() == 0xA0 then subtree:append_text(": DVI-XL") + elseif buf(1,1):uint() == 0xA1 then subtree:append_text(": DVP-XL") + elseif buf(1,1):uint() == 0xAA then subtree:append_text(": ADP") + end + subtree:append_text(", KeyID: $".. buf(2,2)) + end + if frame == 0xa1 then + if buf(9,1):uint() == 0x9F then + subtree:append_text("Page, RID= ".. buf(13,3):uint()) + subtree:append_text(", TGID= ".. buf(17,2):uint()) + elseif buf(9,1):uint() == 0xA7 then + subtree:append_text(" EMERGENCY, RID= ".. buf(16,3):uint()) + subtree:append_text(", TGID= ".. buf(14,2):uint()) + end + end + if frame == 0x73 then + subtree:append_text(" LDU2 low speed dat= $".. buf(1,2)) + subtree:append_text(" last byte= $".. buf(15,1)) + end +end +-- +-- Initialization routine +function p_QV24.init() +end +-- +-- Register the chained dissector for port 30000 +local udp_dissector_table = DissectorTable.get("udp.port") +dissector = udp_dissector_table:get_dissector(30000) +udp_dissector_table:add(30000, p_QV24) +-- +-- END diff --git a/dissectors/quantar-sqd/README.md b/dissectors/quantar-sqd/README.md new file mode 100644 index 0000000..a5be587 --- /dev/null +++ b/dissectors/quantar-sqd/README.md @@ -0,0 +1,59 @@ +# SQD — Simple Quantar Dissector (V.24 Quantar / P25) + +Dissecteurs Wireshark Lua du protocole **V.24 des stations de base +Motorola Quantar** (aussi appelé Digital Conventional Infrastructure +Interface), tel qu'il circule sur IP dans les réseaux P25 radioamateurs, +par John Yaldwyn (ZL4JY). Deux variantes presque identiques : + +- `Qv24_P25NX.lua` (version 2, novembre 2016) : protocole `QV24_P25NX` + pour les trames V.24 encapsulées dans le tunnel série Cisco **STUN** + (« P25NX V2 ») — longueur et identifiant STUN, champs HDLC (adresse, + contrôle, type de trame, poll/final), puis champs P25 : type de trame, + RT/RT, site, RSSI, Link Control (opcode, MFID), options de service + (urgence, protégé, duplex, mode, priorité), adresses cible / source, + données basse vitesse, IV de chiffrement, ALGID et KEYID ; ports UDP + 30000 et TCP 1994 ; +- `Qv24_UDP.lua` (version 1.5, septembre 2016) : protocole `QV24_UDP` + pour les trames V.24 « nues » sur UDP (sans enveloppe STUN), décodage + plus sommaire ; port UDP 30000. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ZL4JY/SQD | +| Commit importé | `4192d56e6a1f11531cf7be6659f2f80fb5aaf299` du 17/11/2016 (branche `master`, dernier commit ; dernières modifications : `Qv24_P25NX.lua` `b24ca10` du 17/11/2016, `Qv24_UDP.lua` `978fbcb` du 18/09/2016) | +| Licence amont | GPL-3.0 : en-tête des scripts « either version 3 of the License, see: http://www.gnu.org/licenses/ » (sans « or later »), Copyright 2016 John Yaldwyn ZL4JY ; fichier `LICENSE` amont GPLv3, copié ici ; d'où `GPL-3.0-only` | +| Natif Wireshark 4.6.4 | Non — ni Quantar V.24 ni STUN Cisco (`stun` natif est le STUN des NAT, sans rapport) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `Qv24_P25NX.lua` | Protocole `QV24_P25NX`, UDP 30000 et TCP 1994 | +| `Qv24_UDP.lua` | Protocole `QV24_UDP`, UDP 30000 | +| `LICENSE` | Licence GPLv3 amont | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. `FAQ.md` et `Versions` amont ne sont pas +repris. + +## Utilisation + +Le README amont décrit un chargement par `dofile()` depuis `init.lua` +(Windows) ; il suffit aujourd'hui de copier le script voulu dans le +dossier `plugins` de Wireshark, puis de filtrer avec `qv24_p25nx` ou +`qv24_udp`. + +## Remarques + +- **Conflit interne** : les deux scripts s'enregistrent sur le port UDP + 30000 ; installés ensemble, le dernier chargé l'emporte. N'installer que + la variante correspondant au transport utilisé (ou utiliser « Décoder + comme… »). +- Les deux scripts utilisent la même variable globale `p_QV24` (et une + variable globale `dissector`) ; `Qv24_P25NX.lua` déclare des champs aux + préfixes `cisco_stun.` et `hdlc.` hors de son propre protocole. +- D'après le README amont, la version 1.5 de `Qv24_UDP.lua` n'intègre pas + encore les mises à jour de DG9BEW reprises dans `Qv24_P25NX.lua`. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/raiblocks-nano/LICENSE b/dissectors/raiblocks-nano/LICENSE new file mode 100644 index 0000000..305e28e --- /dev/null +++ b/dissectors/raiblocks-nano/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Written in 2017-2018 by slact (Leo Ponomarev) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dissectors/raiblocks-nano/README.md b/dissectors/raiblocks-nano/README.md new file mode 100644 index 0000000..84327e8 --- /dev/null +++ b/dissectors/raiblocks-nano/README.md @@ -0,0 +1,50 @@ +# RaiBlocks / Nano — protocole réseau des nœuds (2018) + +Dissecteur Wireshark Lua du protocole pair-à-pair **RaiBlocks** (ancien nom +de la cryptomonnaie Nano), écrit pour le nœud expérimental en Lua +**prailude** : protocole `raiblocks` — en-tête de message (types +`keepalive`, `publish`, `confirm_req`, `confirm_ack`, `bulk_pull`, +`bulk_push`, `frontier_req`), pairs du keepalive, blocs (sous-protocole +`raiblocks.block`) et réponses `frontier` / `bulk` suivies par connexion +TCP, avec réassemblage TCP ; ports UDP et TCP 7075. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/slact/prailude (fichier `wireshark-raiblocks-dissector.lua`) | +| Commit importé | `ed080adc2429c798b1ee27ee42cdcb8563092b09` du 07/04/2018 (branche `master`, dernier commit ; dernière modification du script : `5be70bf` du 22/02/2018) | +| Licence amont | MIT (`LICENSE.txt` amont, « Written in 2017-2018 by slact (Leo Ponomarev) », copié ici sous le nom `LICENSE`) ; le script n'a pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Oui — `packet-nano.c` (protocole `nano`, UDP/TCP 7075 + heuristiques), plus complet et à jour | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `wireshark-raiblocks-dissector.lua` | Protocole `raiblocks`, UDP/TCP 7075 | +| `LICENSE` | Licence MIT amont | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier le script dans le dossier `plugins` de Wireshark, puis filtrer avec +`raiblocks`. Désactiver le dissecteur natif `nano` (ou utiliser « Décoder +comme… ») pour éviter le conflit sur le port 7075. + +## Remarques + +- **Dépendance lourde** : le script fait `require "prailude"` et lève une + erreur au chargement si le paquet est absent. `prailude` (luarocks) est + un nœud complet avec modules C (blake2b, argon2, balance…) et dépendances + (`luv`, `lua-cjson`, `lsqlite3`…) ; son rockspec exige `lua >= 5.1, < 5.4`, + donc il n'est pas installable pour le Lua 5.4 de Wireshark 4.6. Le + dissecteur est vraisemblablement inutilisable en l'état ; il est importé + pour référence. +- Doublon fonctionnel du dissecteur natif `nano` ; protocole de 2018, + antérieur aux évolutions récentes de Nano. +- L'état des connexions TCP est conservé dans des tables locales au script, + sans fonction `init` : il n'est pas réinitialisé au rechargement d'une + capture. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/raiblocks-nano/wireshark-raiblocks-dissector.lua b/dissectors/raiblocks-nano/wireshark-raiblocks-dissector.lua new file mode 100644 index 0000000..231831b --- /dev/null +++ b/dissectors/raiblocks-nano/wireshark-raiblocks-dissector.lua @@ -0,0 +1,312 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/slact/prailude (wireshark-raiblocks-dissector.lua), +-- commit ed080adc2429c798b1ee27ee42cdcb8563092b09 du 07/04/2018. +-- Licence amont : MIT (LICENSE.txt amont) — voir README.md. +local loaded, prailude = pcall(require,"prailude") +if not loaded then + io.stdout:write("error="..prailude.."\n") + io.stdout:write("package.path=".. package.path.."\n") + io.stdout:write("package.cpath=".. package.cpath.."\n") + error("'prailude' package is required for RaiBlocks packet dissassembly. Please install it using luarocks for " .. _VERSION) +end +local blake2b_hash = prailude.util.blake2b.hash +local unpack_balance = prailude.util.unpack_balance +local unpack_account = prailude.util.unpack_account +local stohex = prailude.util.bytes_to_hex +local Balance = require "prailude.util.balance" + +local TCP_state = {} +local packet_state = {} +local packet_bulkpull_state = {} +local packet_bulkpull_count = {} +local packet_frontier_state = {} + +local function packet_endpoints_str(pinfo, reverse) + if not reverse then + return ("%s:%i->%s:%i"):format(pinfo.src, pinfo.src_port, pinfo.dst, pinfo.dst_port) + else + return ("%s:%i->%s:%i"):format(pinfo.dst, pinfo.dst_port, pinfo.src, pinfo.src_port) + end +end + +local function raw_balance_to_xrb(raw) + local balance = Balance.unpack(raw, "Mxrb") + if balance then + return ("%s XRB"):format(tostring(balance)) + else + return err + end +end + +local function hash_hashable(str) + return blake2b_hash(str, 32) +end + +local rai_proto = Proto("raiblocks", "RaiBlocks", "RaiBlocks Network Protocol") + +local block_proto = Proto("raiblocks.block", "Block", "RaiBlocks Block") + +-- setup protocol fields. +rai_proto.fields = {} +local fds = rai_proto.fields +local msg_types = { + [0]="invalid", + [1]="not_a_type", + [2]="keepalive", + [3]="publish", + [4]="confirm_req", + [5]="confirm_ack", + [6]="bulk_pull", + [7]="bulk_push", + [8]="frontier_req", + + [10000]="frontier", + [10001]="bulk" +} +local block_types = { + [0]="invalid", + [1]="not_a_block", + [2]="send", + [3]="receive", + [4]="open", + [5]="change" +} + +local header = { + greeting = + ProtoField.new("Magic number", "raiblocks.magic", ftypes.STRING), + version_max = + ProtoField.new("max version", "raiblocks.version_max", ftypes.UINT8, nil, base.DEC), + version_current = + ProtoField.new("current version", "raiblocks.version_using", ftypes.UINT8, nil, base.DEC), + version_min = + ProtoField.new("min version", "raiblocks.version_min", ftypes.UINT8, nil, base.DEC), + message_type = + ProtoField.new("message type", "raiblocks.message_type", ftypes.UINT8, msg_types, base.DEC), + extensions= + ProtoField.new("extensions", "raiblocks.extensions", ftypes.UINT16, nil, base.HEX), + +} +for k, f in pairs(header) do + fds[k]=f +end + +--keepalive +fds.keepalive_peer= ProtoField.new("peer", "raiblocks.keepalive.peer", ftypes.STRING) + +--block +local bfds = { + block_type = + ProtoField.new("type", "raiblocks.block.type", ftypes.UINT8, block_types, base.DEC), + block_raw = + ProtoField.new("raw", "raiblocks.block.raw", ftypes.BYTES), + block_previous = + ProtoField.new("previous", "raiblocks.block.previous", ftypes.STRING), + block_hash = + ProtoField.new("hash", "raiblocks.block.hash", ftypes.STRING), + block_balance = + ProtoField.new("balance", "raiblocks.block.balance", ftypes.STRING), + block_destination = + ProtoField.new("destination", "raiblocks.block.destination", ftypes.STRING), + block_account = + ProtoField.new("account", "raiblocks.block.account", ftypes.STRING), + block_source = + ProtoField.new("source block", "raiblocks.block.source", ftypes.STRING), + block_representative = + ProtoField.new("representative", "raiblocks.block.representative",ftypes.STRING), + block_work = + ProtoField.new("work", "raiblocks.block.work", ftypes.BYTES), + block_signature = + ProtoField.new("signature", "raiblocks.block.signature", ftypes.BYTES) +} +block_proto.fields = bfds + +--vote +fds.vote_account = + ProtoField.new("voting account", "raiblocks.vote.account", ftypes.STRING) +fds.vote_signature = + ProtoField.new("vote signature", "raiblocks.vote.signature", ftypes.BYTES) +fds.vote_sequence = + ProtoField.new("vote sequence", "raiblocks.vote.sequence", ftypes.UINT64) + + +--frontier_req +fds.frontier_req_start = + ProtoField.new("frontier start account","raiblocks.frontier_req.start", ftypes.STRING) +fds.frontier_req_age = + ProtoField.new("frontier age", "raiblocks.frontier_req.age", ftypes.UINT32) +fds.frontier_req_count = + ProtoField.new("frontier count", "raiblocks.frontier_req.count", ftypes.UINT32) + +--frontier +local frontier_proto = Proto("raiblocks.frontier", "Frontier", "RaiBlocks Frontier") + +--block +local ffds = { + account = + ProtoField.new("frontier account (raw)", "raiblocks.frontier.account",ftypes.STRING), + block_hash = + ProtoField.new("frontier block hash", "raiblocks.frontier.block_hash",ftypes.STRING) +} +frontier_proto.fields = ffds + +--bulk_pull +fds.bulk_pull_start_account = + ProtoField.new("bulk pull start account", "raiblocks.bulk_pull.account", ftypes.STRING) +fds.bulk_pull_end_block_hash = + ProtoField.new("bulk pull end block hash", "raiblocks.bulk_pull.block_hash",ftypes.STRING) + + +local block_size = { + send = 152, + receive = 136, + open = 168, + change = 136, + invalid = 0, + not_a_block=0 +} + +function message_block_dissector(buf, pinfo, root, btype_buf, block_info) + local fds = bfds + local blockt = block_types[btype_buf:uint()] + local tree = root:add(block_proto, ("Block %s(%s)"):format(block_info or "", blockt)) + tree:add(fds.block_type, btype_buf) + if blockt == "send" then + tree:add(fds.block_raw, buf(0, block_size.send)) + tree:add(fds.block_previous, buf(0, 32), stohex(buf:raw(0, 32))) + tree:add(fds.block_destination, buf(32, 32), unpack_account(buf:raw(32, 32))) + tree:add(fds.block_balance, buf(64, 16), raw_balance_to_xrb(buf:raw(64, 16))) + tree:add(fds.block_signature, buf(80, 64)) + tree:add(fds.block_work, buf(144, 8)) + tree:add(fds.block_hash, stohex(hash_hashable(buf:raw(0, 80)))) + elseif blockt == "receive" then + tree:add(fds.block_raw, buf(0, block_size.receive)) + tree:add(fds.block_previous, buf(0, 32), stohex(buf:raw(0, 32))) + tree:add(fds.block_source, buf(32, 32), stohex(buf:raw(32, 32))) + tree:add(fds.block_signature, buf(64, 64)) + tree:add(fds.block_work, buf(128, 8)) + tree:add(fds.block_hash, stohex(hash_hashable(buf:raw(0, 64)))) + elseif blockt == "open" then + tree:add(fds.block_raw, buf(0, block_size.open)) + tree:add(fds.block_source, buf(0, 32), stohex(buf:raw(0, 32))) + tree:add(fds.block_representative, buf(32, 32), unpack_account(buf:raw(32, 32))) + tree:add(fds.block_account, buf(64, 32), unpack_account(buf:raw(64, 32))) + tree:add(fds.block_signature, buf(96, 64)) + tree:add(fds.block_work, buf(160, 8)) + tree:add(fds.block_hash, stohex(hash_hashable(buf:raw(0, 96)))) + elseif blockt == "change" then + tree:add(fds.block_raw, buf(0, block_size.change)) + tree:add(fds.block_previous, buf(0, 32), stohex(buf:raw(0, 32))) + tree:add(fds.block_representative, buf(32, 32), unpack_account(buf:raw(32, 32))) + tree:add(fds.block_signature, buf(64, 64)) + tree:add(fds.block_work, buf(128, 8)) + tree:add(fds.block_hash, stohex(hash_hashable(buf:raw(0, 64)))) + end +end + +-- packet dissector +function rai_proto.dissector(buf, pinfo, root) + pinfo.cols.protocol = "raiblocks" + local tree = root:add(rai_proto) + + local conn_id = packet_endpoints_str(pinfo) + local tcp_state = TCP_state[conn_id] + local len = buf:len() + if tcp_state == "frontier" or packet_state[pinfo.number] == "frontier" then + packet_state[pinfo.number] = "frontier" + tree:add(header.message_type, 10000) --custom "frontier_req" response messat_type + local len = buf:len() + local entries = math.floor(len/64) + local leftovers=math.fmod(len, 64) + if leftovers > 0 then + --need more data to have a clean break for the next packet + pinfo.desegment_len = 64 - leftovers + return nil + end + + local frontier, acct + for offset=0, 64*entries-1, 64 do + acct = unpack_account(buf:raw(offset, 32)) + frontier = tree:add(frontier_proto, "Frontier ".. acct) + frontier:add(ffds.account, buf(offset, 32), stohex(buf:raw(offset, 32))) + frontier:add(ffds.block_hash, buf(offset+32, 32), stohex(buf:raw(offset+32, 32))) + end + --print("frontier entries:", entries, "leftovers:", leftovers) + elseif tcp_state=="bulk_pull" or packet_state[pinfo.number] == "bulk_pull" then + local bulkpull_count = bulkpull_start_count or 0 + packet_state[pinfo.number] = "bulk_pull" + local more_blocks = true + local offset = 0 + local block_len, block_type, btype_buf + tree:add(header.message_type, 10001) --custom "bulk" response message_type + while offset < len do + btype_buf = buf(offset,1) + block_type = block_types[btype_buf:uint()] + offset = offset+1 + if not block_type then + return nil --weird?.. + else + if block_type == "not_a_block" then + TCP_state[conn_id]=nil + end + block_len = block_size[block_type] + if not block_len then + error("invalid block type") + elseif len - offset < block_size[block_type] then + local leftovers = block_size[block_type] - (len - offset) + pinfo.desegment_len = block_size[block_type] - (len - offset) + return nil + else + message_block_dissector(buf(offset):tvb(), pinfo, tree, btype_buf) + end + offset = offset + block_len + end + end + else + local magic + if len >=2 then + magic = buf(0, 2):string() + end + if magic == "RA" or magic == "RB" or magic == "RC" then + local btype_buf = buf(7,1) + tree:add(header.greeting, buf(0, 2)) + tree:add(header.version_max, buf(2, 1)) + tree:add(header.version_current, buf(3, 1)) + tree:add(header.version_min, buf(4, 1)) + tree:add(header.message_type, buf(5, 1)) + tree:add(header.extensions, buf(6, 1)) + local msgt = msg_types[buf(5,1):uint()] + local blocktype = block_types[btype_buf:uint()] + if msgt == "keepalive" then + local blen = len - 8; + local ips = blen/18 + for i=0, blen-1, 18 do + tree:add(fds.keepalive_peer, buf(8+i,18), + ("%s:%i"):format(tostring(buf(8+i,16):ipv6()), buf(8+i+16,2):le_uint())) + end + elseif msgt == "publish" then + message_block_dissector(buf(8):tvb(), pinfo, tree, btype_buf) + elseif msgt == "confirm_req" then + message_block_dissector(buf(8):tvb(), pinfo, tree, btype_buf) + elseif msgt == "confirm_ack" then + tree:add(fds.vote_account, buf(8, 32), unpack_account(buf:raw(8, 32))) + tree:add(fds.vote_signature, buf(40, 64)) + tree:add(fds.vote_sequence, buf(104, 8), buf(104,8):le_uint64()) + message_block_dissector(buf(112):tvb(), pinfo, tree, btype_buf) + elseif msgt == "bulk_pull" then + tree:add(fds.bulk_pull_start_account,buf(8,32), unpack_account(buf:raw(8, 32))) + tree:add(fds.bulk_pull_end_block_hash,buf(40,32), stohex(buf:raw(40, 32))) + TCP_state[packet_endpoints_str(pinfo, "reverse")]="bulk_pull" + elseif msgt == "frontier_req" then + tree:add(fds.frontier_req_start, buf(8, 32), unpack_account(buf:raw(8, 32))) + tree:add(fds.frontier_req_age, buf(40, 4)) + tree:add(fds.frontier_req_count, buf(44, 4)) + TCP_state[packet_endpoints_str(pinfo, "reverse")]="frontier" + end + end + end +end + + +DissectorTable.get("udp.port"):add(7075, rai_proto) +DissectorTable.get("tcp.port"):add(7075, rai_proto) diff --git a/dissectors/rctserial/LICENSE b/dissectors/rctserial/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/rctserial/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/rctserial/README.md b/dissectors/rctserial/README.md new file mode 100644 index 0000000..5cd49b9 --- /dev/null +++ b/dissectors/rctserial/README.md @@ -0,0 +1,52 @@ +# RCT Power — Serial Communication Protocol (onduleurs solaires) + +Dissecteur Wireshark Lua **expérimental** (preuve de concept) du **« Serial +Communication Protocol » de RCT Power GmbH**, utilisé par les onduleurs +solaires et batteries RCT Power sur TCP 8899 : découpage des trames +(jeton de début `+`, échappement `-`), commande, identifiant d'objet (OID) +et valeur, avec une table de 895 OID nommés et typés tirée du registre de +[python-rctclient](https://github.com/svalouch/python-rctclient). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/svalouch/wireshark-rctserial-dissector | +| Commit importé | `bfe325206ac308aee62c9d9883f696c13cbba2b9` du 25/06/2022 (branche `main`, dernier commit) | +| Licence amont | GPL-3.0-only (en-têtes des fichiers : « Copyright 2021-2022 Stefan Valouch (svalouch) », `SPDX-License-Identifier: GPL-3.0-only` ; `LICENSE` amont : GPL v3) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur RCT Power natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `rctserial.lua` | Dissecteur `rctserial` (TCP 8899) | +| `rctutils.lua` | Fonctions utilitaires (décodage des types, CRC) | +| `rctdata.lua` | Table des OID (fichier généré amont) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête de chaque fichier (les en-têtes SPDX +amont sont conservées). + +## Utilisation + +Copier les trois fichiers `.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `rctserial`. Selon l'amont, il peut être nécessaire de passer +par « Décoder comme… » sur un flux TCP et de ne garder que `RCTSERIAL`. + +## Remarques + +- `rctserial.lua` charge `rctdata` et `rctutils` par `require` : les trois + fichiers doivent être dans le même dossier du chemin de recherche Lua de + Wireshark (non vérifié) ; Wireshark charge aussi ces deux modules comme + plugins, ce qui est sans effet gênant a priori (variables globales). +- Limites annoncées par l'auteur : lent, bogué, **CRC non fonctionnel** + (les erreurs de somme de contrôle sont ignorées), cas limites ignorés, + trames réparties sur plusieurs segments TCP non gérées. Projet non + poursuivi par l'auteur. +- Pas de capture d'exemple amont (capture d'écran non reprise) ; non + vérifié dans Wireshark. diff --git a/dissectors/rctserial/rctdata.lua b/dissectors/rctserial/rctdata.lua new file mode 100644 index 0000000..a91e212 --- /dev/null +++ b/dissectors/rctserial/rctdata.lua @@ -0,0 +1,903 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/svalouch/wireshark-rctserial-dissector (rctdata.lua), +-- commit bfe325206ac308aee62c9d9883f696c13cbba2b9 du 25/06/2022. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- Generated file, do not edit by hand +-- Copyright 2021-2022 Stefan Valouch (svalouch) +-- SPDX-License-Identifier: GPL-3.0-only +OID = {} +OID[0x104EB6A] = { name="rb485.f_grid[2]", type="FLOAT" } +OID[0x11F41DB] = { name="power_mng.schedule[0]", type="STRING" } +OID[0x16109E1] = { name="grid_mon[0].u_over.time", type="FLOAT" } +OID[0x1676FA6] = { name="battery.cells_stat[3]", type="UNKNOWN" } +OID[0x19C0B60] = { name="cs_neg[2]", type="FLOAT" } +OID[0x2247588] = { name="battery_placeholder[0].cells_stat[2].u_min.value", type="FLOAT" } +OID[0x31A6110] = { name="energy.e_ext_month", type="FLOAT" } +OID[0x35E64EA] = { name="battery_placeholder[0].module_sn[5]", type="STRING" } +OID[0x39BDE11] = { name="hw_test.state", type="UINT8" } +OID[0x3A39CA2] = { name="g_sync.p_ac_load[0]", type="FLOAT" } +OID[0x3D9C51F] = { name="battery.cells_stat[0].u_max.value", type="FLOAT" } +OID[0x40385DB] = { name="common_control_bits", type="UINT32" } +OID[0x48C9D69] = { name="battery_placeholder[0].cells_stat[1].u_min.value", type="FLOAT" } +OID[0x4EAAA98] = { name="nsm.f_low_entry", type="FLOAT" } +OID[0x528D1D8] = { name="frt.u_min[2]", type="FLOAT" } +OID[0x56162CA] = { name="battery.cells_stat[4].u_min.time", type="UINT32" } +OID[0x56417DF] = { name="battery.cells_stat[3].t_max.index", type="UINT8" } +OID[0x58F1759] = { name="hw_test.bt_power[6]", type="FLOAT" } +OID[0x5C7CFB1] = { name="logger.day_egrid_load_log_ts", type="INT32" } +OID[0x64A60FE] = { name="battery.cells_stat[4].t_max.index", type="UINT8" } +OID[0x64E4340] = { name="logger.minutes_ubat_log_ts", type="INT32" } +OID[0x6A9FFA2] = { name="battery.charged_amp_hours", type="FLOAT" } +OID[0x6E03755] = { name="wifi.ip", type="STRING" } +OID[0x71B5514] = { name="battery_placeholder[0].cells_stat[3].t_max.index", type="UINT8" } +OID[0x7367B64] = { name="rb485.phase_marker", type="INT16" } +OID[0x73C7E5D] = { name="battery_placeholder[0].max_cell_temperature", type="FLOAT" } +OID[0x74B1EF5] = { name="battery_placeholder[0].cells_stat[3].u_max.index", type="UINT8" } +OID[0x77692DE] = { name="battery.cells_stat[4].u_max.index", type="UINT8" } +OID[0x7C61FAD] = { name="adc.u_ref_1_5v[0]", type="UINT16" } +OID[0x8679611] = { name="net.id", type="UINT32" } +OID[0x86C75B0] = { name="battery.stack_software_version[3]", type="UINT32" } +OID[0x875C906] = { name="hw_test.bt_time[2]", type="FLOAT" } +OID[0x8E81725] = { name="battery_placeholder[0].cells_stat[0].t_max.value", type="FLOAT" } +OID[0x95AFAA8] = { name="logger.minutes_ul3_log_ts", type="INT32" } +OID[0x9923C1E] = { name="battery.cells_stat[3].t_min.index", type="UINT8" } +OID[0xA04CA7F] = { name="g_sync.u_zk_n_avg", type="FLOAT" } +OID[0xAA372CE] = { name="p_rec_req[1]", type="FLOAT" } +OID[0xAFDD6CF] = { name="acc_conv.i_acc_lp_fast", type="FLOAT" } +OID[0xB94A673] = { name="battery_placeholder[0].cells_stat[6].t_min.time", type="UINT32" } +OID[0xBA16A10] = { name="wifi.sockb_protocol", type="ENUM" } +OID[0xC2A7286] = { name="battery_placeholder[0].cells_resist[0]", type="STRING" } +OID[0xC3815C2] = { name="net.load_reduction", type="FLOAT" } +OID[0xC588B75] = { name="energy.e_ext_day_sum", type="FLOAT" } +OID[0xCB5D21B] = { name="dc_conv.dc_conv_struct[1].p_dc_lp", type="FLOAT" } +OID[0xCBA34B9] = { name="nsm.u_q_u[3]", type="FLOAT" } +OID[0xCC4BDAA] = { name="detect_phase_shift_enable", type="BOOL" } +OID[0xCFA8BC4] = { name="battery.stack_cycles[1]", type="UINT16" } +OID[0xD658831] = { name="i_bottom_max", type="FLOAT" } +OID[0xDACF21B] = { name="battery.cells_stat[4]", type="UNKNOWN" } +OID[0xDBD5E77] = { name="battery_placeholder[0].cells_stat[6].u_min.index", type="UINT8" } +OID[0xDE3D20D] = { name="battery.status2", type="INT32" } +OID[0xDF164DE] = { name="logger.day_eb_log_ts", type="INT32" } +OID[0xDF45696] = { name="io_board.io1_polarity", type="BOOL" } +OID[0xE0505B4] = { name="flash_rtc.time_stamp_set", type="UINT32" } +OID[0xE4AA301] = { name="battery_placeholder[0].cells_stat[6].u_max.index", type="UINT8" } +OID[0xE799A56] = { name="io_board.rse_table[0]", type="FLOAT" } +OID[0xEC64BA7] = { name="battery_placeholder[0].stack_software_version[3]", type="UINT32" } +OID[0xEF60C7E] = { name="battery.cells_stat[3].u_max.value", type="FLOAT" } +OID[0xF28E2E1] = { name="energy.e_ext_total_sum", type="FLOAT" } +OID[0xFA29566] = { name="logger.minutes_ub_log_ts", type="INT32" } +OID[0xFB40090] = { name="io_board.check_rs485_result", type="UINT8" } +OID[0x1025B491] = { name="battery_placeholder[0].maximum_discharge_current", type="FLOAT" } +OID[0x10842019] = { name="nsm.cos_phi_p[3][1]", type="FLOAT" } +OID[0x1089ACA9] = { name="nsm.u_q_u[0]", type="FLOAT" } +OID[0x108FC93D] = { name="max_phase_shift", type="FLOAT" } +OID[0x10970E9D] = { name="energy.e_ac_month", type="FLOAT" } +OID[0x1156DFD0] = { name="power_mng.battery_power", type="FLOAT" } +OID[0x120EC3B4] = { name="battery.cells_stat[4].u_min.index", type="UINT8" } +OID[0x126ABC86] = { name="energy.e_grid_load_month", type="FLOAT" } +OID[0x132AA71E] = { name="logger.minutes_temp2_log_ts", type="INT32" } +OID[0x1348AB07] = { name="battery.cells[4]", type="UNKNOWN" } +OID[0x147E8E26] = { name="g_sync.p_ac[1]", type="FLOAT" } +OID[0x14C0E627] = { name="wifi.password", type="STRING" } +OID[0x14FCA232] = { name="nsm.rpm_lock_out_power", type="FLOAT" } +OID[0x15AB1A61] = { name="power_mng.schedule[2]", type="STRING" } +OID[0x162491E8] = { name="battery.module_sn[5]", type="STRING" } +OID[0x1639B2D8] = { name="battery_placeholder[0].cells_stat[4].u_max.index", type="UINT8" } +OID[0x16A1F844] = { name="battery.bms_sn", type="STRING" } +OID[0x16AF2A92] = { name="db.power_board.Current_Mean", type="FLOAT" } +OID[0x16B28CCA] = { name="adc.u_ref_1_5v[1]", type="UINT16" } +OID[0x16ED8F8F] = { name="partition[1].last_id", type="INT32" } +OID[0x173D81E4] = { name="rb485.version_boot", type="UINT32" } +OID[0x1781CD31] = { name="battery_placeholder[0].soh", type="FLOAT" } +OID[0x17E3AF97] = { name="db.power_board.adc_p9V_meas", type="FLOAT" } +OID[0x18469762] = { name="battery_placeholder[0].cells_stat[0].u_max.value", type="FLOAT" } +OID[0x18BD807D] = { name="battery_placeholder[0].cells_stat[4].t_min.index", type="UINT8" } +OID[0x18D1E9E0] = { name="battery.cells_stat[5].u_max.index", type="UINT8" } +OID[0x18F98B6D] = { name="battery.cells_stat[3].u_min.value", type="FLOAT" } +OID[0x19608C98] = { name="partition[3].last_id", type="INT32" } +OID[0x19B814F2] = { name="logger.year_egrid_feed_log_ts", type="INT32" } +OID[0x1ABA3EE8] = { name="p_rec_req[0]", type="FLOAT" } +OID[0x1AC87AA0] = { name="g_sync.p_ac_load_sum_lp", type="FLOAT" } +OID[0x1B39A3A3] = { name="battery.bms_power_version", type="UINT32" } +OID[0x1B5445C4] = { name="io_board.check_rse_result", type="UINT16" } +OID[0x1BFA5A33] = { name="energy.e_grid_load_total_sum", type="FLOAT" } +OID[0x1C4A665F] = { name="grid_pll[0].f", type="FLOAT" } +OID[0x1D0623D6] = { name="wifi.dns_address", type="STRING" } +OID[0x1D2994EA] = { name="power_mng.soc_charge_power", type="FLOAT" } +OID[0x1D49380A] = { name="logger.minutes_eb_log_ts", type="INT32" } +OID[0x1D83D2A5] = { name="battery_placeholder[0].cells[4]", type="STRING" } +OID[0x1E0EB397] = { name="battery_placeholder[0].cells_stat[6].u_max.value", type="FLOAT" } +OID[0x1E5FCA70] = { name="battery.maximum_charge_current", type="FLOAT" } +OID[0x1F44C23A] = { name="battery_placeholder[0].cells_stat[1].t_min.index", type="UINT8" } +OID[0x1F73B6A4] = { name="battery.cells_stat[3].t_max.time", type="UINT32" } +OID[0x1F9CBBF2] = { name="db.power_board.Calibr_Value_Mean", type="FLOAT" } +OID[0x1FA192E3] = { name="battery_placeholder[0].cells_resist[4]", type="STRING" } +OID[0x1FB3A602] = { name="battery_placeholder[0].cells_stat[2].t_max.value", type="FLOAT" } +OID[0x1FEB2F67] = { name="switch_on_cond.u_min", type="FLOAT" } +OID[0x2082BFB6] = { name="hw_test.bt_time[9]", type="FLOAT" } +OID[0x20A3A91F] = { name="battery_placeholder[0].module_sn[4]", type="STRING" } +OID[0x20FD4419] = { name="prim_sm.island_next_repeat_timeout", type="FLOAT" } +OID[0x21879805] = { name="logger.minutes_eac1_log_ts", type="INT32" } +OID[0x21961B58] = { name="battery.current", type="FLOAT" } +OID[0x21E1A802] = { name="energy.e_dc_month_sum[1]", type="FLOAT" } +OID[0x21EE7CBB] = { name="rb485.u_l_grid[2]", type="FLOAT" } +OID[0x2266DCB8] = { name="flash_rtc.rtc_mcc_quartz_max_diff", type="FLOAT" } +OID[0x226A23A4] = { name="dc_conv.dc_conv_struct[0].u_target", type="FLOAT" } +OID[0x2295401F] = { name="battery_placeholder[0].cells_stat[3].u_max.time", type="UINT32" } +OID[0x22CC80C6] = { name="frt.u_min_end", type="FLOAT" } +OID[0x234B4736] = { name="fault[1].flt", type="UINT32" } +OID[0x234DD4DF] = { name="switch_on_cond.f_min", type="FLOAT" } +OID[0x235E0DF5] = { name="battery_placeholder[0].stack_software_version[1]", type="UINT32" } +OID[0x236D2178] = { name="frt.t_min[1]", type="FLOAT" } +OID[0x23D4A386] = { name="battery_placeholder[0].cells_stat[0]", type="STRING" } +OID[0x23E55DA0] = { name="battery.cells_stat[5]", type="UNKNOWN" } +OID[0x23F525DE] = { name="net.command", type="UINT16" } +OID[0x24150B85] = { name="g_sync.u_zk_sum_mov_avg", type="FLOAT" } +OID[0x241CFA0A] = { name="battery_placeholder[0].min_cell_temperature", type="FLOAT" } +OID[0x241F1F98] = { name="energy.e_dc_day_sum[1]", type="FLOAT" } +OID[0x24AC4CBB] = { name="battery_placeholder[0].cells_resist[6]", type="STRING" } +OID[0x2545E22D] = { name="g_sync.u_l_rms[2]", type="FLOAT" } +OID[0x257B5945] = { name="battery.cells_stat[2].u_min.index", type="UINT8" } +OID[0x257B7612] = { name="battery.module_sn[3]", type="STRING" } +OID[0x26260419] = { name="nsm.cos_phi_p[1][0]", type="FLOAT" } +OID[0x26363AAE] = { name="battery.cells_stat[1].t_max.index", type="UINT8" } +OID[0x265EACF6] = { name="battery.cells_stat[2].t_max.time", type="UINT32" } +OID[0x26EFFC2F] = { name="energy.e_grid_feed_year", type="FLOAT" } +OID[0x2703A771] = { name="cs_struct.is_tuned", type="BOOL" } +OID[0x27116260] = { name="battery_placeholder[0].cells_stat[5].u_min.value", type="FLOAT" } +OID[0x27650FE2] = { name="rb485.version_main", type="UINT32" } +OID[0x2788928C] = { name="g_sync.p_ac_load[1]", type="FLOAT" } +OID[0x27BE51D9] = { name="g_sync.p_ac_sc[0]", type="FLOAT" } +OID[0x27C39CEA] = { name="battery.stack_cycles[6]", type="UINT16" } +OID[0x27C828F4] = { name="energy.e_grid_feed_total_sum", type="FLOAT" } +OID[0x27EC8487] = { name="performance_free[0]", type="UINT32" } +OID[0x2848A1EE] = { name="grid_offset", type="FLOAT" } +OID[0x29BDA75F] = { name="display_struct.brightness", type="UINT8" } +OID[0x29CA60F8] = { name="io_board.rse_table[10]", type="FLOAT" } +OID[0x2A30A97E] = { name="battery.stack_cycles[5]", type="UINT16" } +OID[0x2A449E89] = { name="logger.year_log_ts", type="INT32" } +OID[0x2AACCAA7] = { name="battery.max_cell_voltage", type="FLOAT" } +OID[0x2AE703F2] = { name="energy.e_dc_day[0]", type="FLOAT" } +OID[0x2BC1E72B] = { name="battery.discharged_amp_hours", type="FLOAT" } +OID[0x2E06172D] = { name="net.net_tunnel_id", type="UINT32" } +OID[0x2E0C6220] = { name="io_board.home_relay_sw_off_delay", type="FLOAT" } +OID[0x2E9F3C50] = { name="battery_placeholder[0].cells_stat[0].t_max.index", type="UINT8" } +OID[0x2ED89924] = { name="db.power_board.afi_t300", type="FLOAT" } +OID[0x2ED8A639] = { name="battery_placeholder[0].cells_stat[2].u_min.time", type="UINT32" } +OID[0x2F0A6B15] = { name="logger.month_ea_log_ts", type="INT32" } +OID[0x2F3C1D7D] = { name="energy.e_load_day", type="FLOAT" } +OID[0x2F84A0A9] = { name="battery_placeholder[0].cells[2]", type="STRING" } +OID[0x3044195F] = { name="grid_mon[1].u_under.time", type="FLOAT" } +OID[0x31413485] = { name="battery_placeholder[0].cells_stat[5].u_min.index", type="UINT8" } +OID[0x314C13EB] = { name="battery_placeholder[0].cells_stat[5].u_max.value", type="FLOAT" } +OID[0x315D1490] = { name="power_mng.bat_empty_full", type="UINT8" } +OID[0x31ED1B75] = { name="modbus.mode", type="ENUM" } +OID[0x32CD0DB3] = { name="nsm.cos_phi_p[0][1]", type="FLOAT" } +OID[0x32DCA605] = { name="frt.u_max[0]", type="FLOAT" } +OID[0x331D0689] = { name="battery.cells_stat[2].t_max.value", type="FLOAT" } +OID[0x336415EA] = { name="battery.cells_stat[0].t_max.time", type="UINT32" } +OID[0x3390CC2F] = { name="switch_on_cond.test_time_fault", type="FLOAT" } +OID[0x33F76B78] = { name="nsm.p_u[0][1]", type="FLOAT" } +OID[0x34A164E7] = { name="battery.cells_stat[0]", type="UNKNOWN" } +OID[0x34E33726] = { name="battery.cells_stat[2].u_max.index", type="UINT8" } +OID[0x34ECA9CA] = { name="logger.year_eb_log_ts", type="INT32" } +OID[0x3500F1E8] = { name="net.index", type="INT8" } +OID[0x3503B92D] = { name="battery.cells_stat[3].u_max.time", type="UINT32" } +OID[0x3515F4A0] = { name="nsm.p_u[3][1]", type="FLOAT" } +OID[0x360BDE8A] = { name="nsm.startup_grad", type="FLOAT" } +OID[0x36214C57] = { name="net.prev_k", type="FLOAT" } +OID[0x362346D4] = { name="switch_on_cond.max_rnd_test_time_fault", type="FLOAT" } +OID[0x3623D82A] = { name="prim_sm.island_flag", type="UINT16" } +OID[0x365D12DA] = { name="p_rec_req[2]", type="FLOAT" } +OID[0x36A9E9A6] = { name="power_mng.use_grid_power_enable", type="BOOL" } +OID[0x374B5DD6] = { name="battery_placeholder[0].cells_stat[6].u_min.time", type="UINT32" } +OID[0x37F9D5CA] = { name="fault[0].flt", type="UINT32" } +OID[0x381B8BF9] = { name="battery.soh", type="FLOAT" } +OID[0x383A3614] = { name="db.power_board.afi_i60", type="FLOAT" } +OID[0x38789061] = { name="nsm.f_low_rise_grad_storage", type="FLOAT" } +OID[0x3903A5E9] = { name="flash_rtc.flag_time_auto_switch", type="BOOL" } +OID[0x3906A1D0] = { name="logger.minutes_eext_log_ts", type="INT32" } +OID[0x392D1BEE] = { name="wifi.connect_to_server", type="UINT8" } +OID[0x39AD4639] = { name="battery_placeholder[0].cells_stat[5].u_min.time", type="UINT32" } +OID[0x3A0EA5BE] = { name="power_spring_up", type="FLOAT" } +OID[0x3A3050E6] = { name="grid_lt.threshold", type="FLOAT" } +OID[0x3A35D491] = { name="battery_placeholder[0].cells_stat[2].u_max.value", type="FLOAT" } +OID[0x3A444FC6] = { name="g_sync.s_ac_lp[0]", type="FLOAT" } +OID[0x3A7D5F53] = { name="battery.cells_stat[1].u_max.value", type="FLOAT" } +OID[0x3A873343] = { name="energy.e_ac_day_sum", type="FLOAT" } +OID[0x3A9D2680] = { name="energy.e_ext_year_sum", type="FLOAT" } +OID[0x3AA565FC] = { name="net.package", type="UNKNOWN" } +OID[0x3AFEF139] = { name="prim_sm.is_thin_layer", type="BOOL" } +OID[0x3B0C6A53] = { name="bat_mng_struct.profile_pdc_max", type="STRING" } +OID[0x3B5F6B9D] = { name="rb485.f_wr[0]", type="FLOAT" } +OID[0x3B7FCD47] = { name="fault[2].flt", type="UINT32" } +OID[0x3BA1B77B] = { name="battery.cells_stat[3].t_min.value", type="FLOAT" } +OID[0x3C24F3E8] = { name="inv_struct.cosinus_phi", type="FLOAT" } +OID[0x3C705F61] = { name="io_board.rse_table[8]", type="FLOAT" } +OID[0x3C87C4F5] = { name="energy.e_grid_feed_day", type="FLOAT" } +OID[0x3CA8E8D0] = { name="hw_test.bt_time[0]", type="FLOAT" } +OID[0x3CB1EF01] = { name="grid_mon[0].u_under.threshold", type="FLOAT" } +OID[0x3D789979] = { name="hw_test.bt_power[7]", type="FLOAT" } +OID[0x3DBCC6B4] = { name="io_board.rse_table[6]", type="FLOAT" } +OID[0x3E25C391] = { name="bat_mng_struct.bat_calib_soc_thresh", type="FLOAT" } +OID[0x3E722B43] = { name="grid_mon[1].f_under.threshold", type="FLOAT" } +OID[0x3E728842] = { name="power_spring_bat", type="FLOAT" } +OID[0x3EFEB931] = { name="db.power_board.relays_state", type="UINT16" } +OID[0x3F98F58A] = { name="battery.cells_stat[5].t_max.index", type="UINT8" } +OID[0x400F015B] = { name="g_sync.p_acc_lp", type="FLOAT" } +OID[0x4077335D] = { name="g_sync.s_ac_lp[1]", type="FLOAT" } +OID[0x40B07CA4] = { name="power_mng.schedule[6]", type="STRING" } +OID[0x40FF01B7] = { name="battery.cells[6]", type="UNKNOWN" } +OID[0x41744E11] = { name="frt.u_min[0]", type="FLOAT" } +OID[0x41B11ECF] = { name="battery.cells_stat[3].u_min.index", type="UINT8" } +OID[0x428CCF46] = { name="battery.cells_stat[5].u_min.value", type="FLOAT" } +OID[0x431509D1] = { name="logger.month_eload_log_ts", type="INT32" } +OID[0x43257820] = { name="g_sync.p_ac[0]", type="FLOAT" } +OID[0x437B8122] = { name="rb485.available", type="BOOL" } +OID[0x4397D078] = { name="nsm.cos_phi_p[1][1]", type="FLOAT" } +OID[0x43CD0B6F] = { name="nsm.pf_delay", type="FLOAT" } +OID[0x43F16F7E] = { name="flash_state", type="UINT16" } +OID[0x43FF47C3] = { name="db.power_board.afi_t60", type="FLOAT" } +OID[0x442A3409] = { name="battery.cells_stat[4].t_min.time", type="UINT32" } +OID[0x4443C661] = { name="battery.cells_stat[0].t_max.index", type="UINT8" } +OID[0x44D4C533] = { name="energy.e_grid_feed_total", type="FLOAT" } +OID[0x4539A6D4] = { name="can_bus.bms_update_response[0]", type="UINT32" } +OID[0x465DDB50] = { name="battery_placeholder[0].cells_stat[2].t_min.value", type="FLOAT" } +OID[0x46635546] = { name="net.n_descendants", type="INT8" } +OID[0x4686E044] = { name="battery_placeholder[0].cells_stat[1].u_min.index", type="UINT8" } +OID[0x46892579] = { name="flash_param.write_cycles", type="UINT32" } +OID[0x46C3625D] = { name="battery_placeholder[0].cells_stat[2]", type="STRING" } +OID[0x474F80D5] = { name="iso_struct.Rn", type="FLOAT" } +OID[0x4764F9EE] = { name="battery_placeholder[0].cells_stat[3].t_max.value", type="FLOAT" } +OID[0x47A1DACA] = { name="power_mng.schedule[8]", type="STRING" } +OID[0x485AD749] = { name="g_sync.u_ptp_rms[1]", type="FLOAT" } +OID[0x488052BA] = { name="logger.minutes_ul2_log_ts", type="INT32" } +OID[0x48D73FA5] = { name="g_sync.i_dr_lp[2]", type="FLOAT" } +OID[0x494FE156] = { name="power_spring_offset", type="FLOAT" } +OID[0x495BF0B6] = { name="energy.e_dc_year_sum[0]", type="FLOAT" } +OID[0x4992E65A] = { name="update_is_allowed_id", type="UINT8" } +OID[0x4A61BAEE] = { name="nsm.p_u[3][0]", type="FLOAT" } +OID[0x4AAEB0D2] = { name="battery_placeholder[0].cells_stat[1]", type="STRING" } +OID[0x4AE96C12] = { name="dc_conv.dc_conv_struct[1].mpp.mpp_step", type="FLOAT" } +OID[0x4B51A539] = { name="battery.prog_sn", type="STRING" } +OID[0x4BC0F974] = { name="buf_v_control.power_reduction_max_solar", type="FLOAT" } +OID[0x4BE02BB7] = { name="energy.e_load_day_sum", type="FLOAT" } +OID[0x4C12C4C7] = { name="cs_neg[1]", type="FLOAT" } +OID[0x4C14CC7C] = { name="logger.year_ea_log_ts", type="INT32" } +OID[0x4C2A7CDC] = { name="nsm.cos_phi_p[2][1]", type="FLOAT" } +OID[0x4C374958] = { name="nsm.startup_grad_after_fault", type="FLOAT" } +OID[0x4CB7C0DC] = { name="battery.min_cell_voltage", type="FLOAT" } +OID[0x4D684EF2] = { name="battery_placeholder[0].cells[0]", type="STRING" } +OID[0x4D985F33] = { name="battery.cells_stat[5].u_max.value", type="FLOAT" } +OID[0x4DB1B91E] = { name="switch_on_cond.f_max", type="FLOAT" } +OID[0x4DC372A0] = { name="battery_placeholder[0].cells_stat[4].u_max.value", type="FLOAT" } +OID[0x4E04DD55] = { name="battery.soc_update_since", type="FLOAT" } +OID[0x4E0C56F2] = { name="flash_rtc.rtc_mcc_quartz_ppm_difference", type="FLOAT" } +OID[0x4E2B42A4] = { name="hw_test.bt_power[0]", type="FLOAT" } +OID[0x4E3CB7F8] = { name="phase_3_mode", type="BOOL" } +OID[0x4E49AEC5] = { name="g_sync.p_ac_sum", type="FLOAT" } +OID[0x4E699086] = { name="battery.module_sn[4]", type="STRING" } +OID[0x4E77B2CE] = { name="hw_test.bt_cycle", type="UINT8" } +OID[0x4E9D95A6] = { name="logger.year_eext_log_ts", type="INT32" } +OID[0x4EE8DB78] = { name="energy.e_load_year_sum", type="FLOAT" } +OID[0x4F330E08] = { name="io_board.io2_usage", type="ENUM" } +OID[0x4F735D10] = { name="db.temp2", type="FLOAT" } +OID[0x4FC53F19] = { name="battery_placeholder[0].module_sn[3]", type="STRING" } +OID[0x4FEDC1BE] = { name="battery_placeholder[0].cells_stat[5].t_min.value", type="FLOAT" } +OID[0x4FF8CCE2] = { name="battery_placeholder[0].stack_software_version[5]", type="UINT32" } +OID[0x501A162D] = { name="battery.cells_resist[5]", type="STRING" } +OID[0x50514732] = { name="battery.cells_stat[6].u_min.index", type="UINT8" } +OID[0x508FCE78] = { name="adc.u_ref_1_5v[3]", type="UINT16" } +OID[0x50B441C1] = { name="logger.minutes_ea_log_ts", type="INT32" } +OID[0x5151D84C] = { name="prim_sm.island_reset_retrials_counter_time", type="FLOAT" } +OID[0x518C7BBE] = { name="battery.cells_stat[5].u_min.time", type="UINT32" } +OID[0x51E5377D] = { name="battery_placeholder[0].stack_cycles[1]", type="UINT16" } +OID[0x5293B668] = { name="logger.minutes_soc_log_ts", type="INT32" } +OID[0x53656F42] = { name="battery_placeholder[0].cells_stat[2].u_max.index", type="UINT8" } +OID[0x537C719F] = { name="battery.cells_stat[0].t_max.value", type="FLOAT" } +OID[0x53886C09] = { name="wifi.connect_to_service", type="UINT8" } +OID[0x53EF7649] = { name="nsm.p_u[0][0]", type="FLOAT" } +OID[0x5411CE1B] = { name="logger.minutes_ul1_log_ts", type="INT32" } +OID[0x5438B68E] = { name="grid_mon[1].u_over.threshold", type="FLOAT" } +OID[0x54829753] = { name="p_rec_lim[1]", type="FLOAT" } +OID[0x54B4684E] = { name="g_sync.u_l_rms[1]", type="FLOAT" } +OID[0x54DBC202] = { name="io_board.rse_table[12]", type="FLOAT" } +OID[0x554D8FEE] = { name="logger.minutes_eac2_log_ts", type="INT32" } +OID[0x5570401B] = { name="battery.stored_energy", type="FLOAT" } +OID[0x55C22966] = { name="g_sync.s_ac[2]", type="FLOAT" } +OID[0x55DDF7BA] = { name="battery.max_cell_temperature", type="FLOAT" } +OID[0x5673D737] = { name="wifi.connect_to_wifi", type="BOOL" } +OID[0x57429627] = { name="wifi.authentication_method", type="STRING" } +OID[0x576D2A08] = { name="battery_placeholder[0].cells_stat[3].t_min.time", type="UINT32" } +OID[0x57945EE4] = { name="battery_placeholder[0].maximum_charge_current", type="FLOAT" } +OID[0x58378BD0] = { name="hw_test.bt_time[3]", type="FLOAT" } +OID[0x5847E59E] = { name="battery.maximum_charge_voltage_constant_u", type="FLOAT" } +OID[0x5867B3BE] = { name="io_board.rse_table[2]", type="FLOAT" } +OID[0x58C1A946] = { name="io_board.check_state", type="UINT8" } +OID[0x592B13DF] = { name="power_mng.schedule[4]", type="STRING" } +OID[0x59358EB2] = { name="power_mng.maximum_charge_voltage", type="FLOAT" } +OID[0x5939EC5D] = { name="battery.module_sn[6]", type="STRING" } +OID[0x5952E5E6] = { name="wifi.mask", type="STRING" } +OID[0x5A120CE4] = { name="battery.cells_stat[1].t_max.time", type="UINT32" } +OID[0x5A316247] = { name="wifi.mode", type="STRING" } +OID[0x5A9EEFF0] = { name="battery.stack_cycles[4]", type="UINT16" } +OID[0x5AF50FD7] = { name="battery.cells_stat[4].t_min.value", type="FLOAT" } +OID[0x5B10CE81] = { name="power_mng.is_heiphoss", type="UINT8" } +OID[0x5BA122A5] = { name="battery.stack_cycles[2]", type="UINT16" } +OID[0x5BB8075A] = { name="dc_conv.dc_conv_struct[1].u_sg_lp", type="FLOAT" } +OID[0x5BD2DB45] = { name="io_board.io1_s0_imp_per_kwh", type="INT16" } +OID[0x5C93093B] = { name="battery_placeholder[0].status2", type="INT32" } +OID[0x5CD75669] = { name="db.power_board.afi_t150", type="FLOAT" } +OID[0x5D0CDCF0] = { name="p_rec_available[2]", type="FLOAT" } +OID[0x5D1B0835] = { name="net.use_network_filter", type="BOOL" } +OID[0x5D34D09D] = { name="logger.month_egrid_load_log_ts", type="INT32" } +OID[0x5E540FB2] = { name="net.update_slaves", type="BOOL" } +OID[0x5E942C62] = { name="dc_conv.dc_conv_struct[1].mpp.fixed_voltage", type="FLOAT" } +OID[0x5EE03C45] = { name="io_board.alarm_home_relay_mode", type="ENUM" } +OID[0x5EF54372] = { name="battery_placeholder[0].cells_stat[0].u_max.index", type="UINT8" } +OID[0x5F33284E] = { name="prim_sm.state", type="ENUM" } +OID[0x6002891F] = { name="g_sync.p_ac_sc_sum", type="FLOAT" } +OID[0x60435F1C] = { name="battery_placeholder[0].cells[6]", type="STRING" } +OID[0x60749E5E] = { name="battery.cells_stat[6].u_min.time", type="UINT32" } +OID[0x60A9A532] = { name="logger.day_eext_log_ts", type="INT32" } +OID[0x612F7EAB] = { name="g_sync.s_ac[1]", type="FLOAT" } +OID[0x61EAC702] = { name="battery.cells_stat[0].t_min.value", type="FLOAT" } +OID[0x6213589B] = { name="battery.cells_stat[6].u_min.value", type="FLOAT" } +OID[0x6279F2A3] = { name="db.power_board.version_boot", type="UINT32" } +OID[0x62B8940B] = { name="dc_conv.start_voltage", type="FLOAT" } +OID[0x62D645D9] = { name="battery.cells[5]", type="UNKNOWN" } +OID[0x62FBE7DC] = { name="energy.e_grid_load_total", type="FLOAT" } +OID[0x63476DBE] = { name="g_sync.u_ptp_rms[0]", type="FLOAT" } +OID[0x6383DEA9] = { name="battery_placeholder[0].cells_stat[1].t_max.value", type="FLOAT" } +OID[0x6388556C] = { name="battery.stack_software_version[0]", type="UINT32" } +OID[0x6445D856] = { name="battery.cells_stat[1].u_min.index", type="UINT8" } +OID[0x6476A836] = { name="dc_conv.dc_conv_struct[0].mpp.enable_scan", type="BOOL" } +OID[0x649B10DA] = { name="battery.cells_resist[0]", type="STRING" } +OID[0x650C1ED7] = { name="g_sync.i_dr_eff[1]", type="FLOAT" } +OID[0x652B7536] = { name="battery_placeholder[0].cells_stat[3].t_min.index", type="UINT8" } +OID[0x6599E3D3] = { name="power_mng.schedule[3]", type="STRING" } +OID[0x65A44A98] = { name="flash_mem", type="STRING" } +OID[0x65B624AB] = { name="energy.e_grid_feed_month", type="FLOAT" } +OID[0x65EED11B] = { name="battery.voltage", type="FLOAT" } +OID[0x663F1452] = { name="power_mng.n_batteries", type="UINT8" } +OID[0x664A1326] = { name="io_board.rse_table[14]", type="FLOAT" } +OID[0x669D02FE] = { name="logger.minutes_eac_log_ts", type="INT32" } +OID[0x6709A2F4] = { name="energy.e_ac_year_sum", type="FLOAT" } +OID[0x672552DC] = { name="power_mng.bat_calib_days_in_advance", type="UINT8" } +OID[0x6743CCCE] = { name="battery_placeholder[0].cells_stat[6].t_max.index", type="UINT8" } +OID[0x675776B1] = { name="dc_conv.dc_conv_struct[1].u_target", type="FLOAT" } +OID[0x67BF3003] = { name="display_struct.display_dir", type="BOOL" } +OID[0x67C0A2F5] = { name="net.slave_p_total", type="FLOAT" } +OID[0x682CDDA1] = { name="power_mng.battery_type", type="ENUM" } +OID[0x6830F6E4] = { name="io_board.rse_table[9]", type="FLOAT" } +OID[0x68BA92E1] = { name="io_board.io2_s0_imp_per_kwh", type="INT16" } +OID[0x68BC034D] = { name="parameter_file", type="STRING" } +OID[0x68EEFD3D] = { name="energy.e_dc_total[1]", type="FLOAT" } +OID[0x690C32D2] = { name="battery_placeholder[0].module_sn[0]", type="STRING" } +OID[0x6974798A] = { name="battery.stack_software_version[6]", type="UINT32" } +OID[0x69AA598A] = { name="can_bus.requested_id", type="INT32" } +OID[0x69B8FF28] = { name="battery.cells[2]", type="UNKNOWN" } +OID[0x6B5A56C2] = { name="logger.month_eb_log_ts", type="INT32" } +OID[0x6BA10831] = { name="db.power_board.afi_i30", type="FLOAT" } +OID[0x6BBDC7C8] = { name="line_mon.u_max", type="FLOAT" } +OID[0x6BFF1AF4] = { name="hw_test.bt_power[2]", type="FLOAT" } +OID[0x6C03F5ED] = { name="battery_placeholder[0].bms_power_version", type="UINT32" } +OID[0x6C10E96A] = { name="battery_placeholder[0].cells_stat[0].u_min.time", type="UINT32" } +OID[0x6C243F71] = { name="modbus.address", type="UINT8" } +OID[0x6C2D00E4] = { name="io_board.rse_table[1]", type="FLOAT" } +OID[0x6C44F721] = { name="i_dc_max", type="FLOAT" } +OID[0x6CFCD774] = { name="energy.e_dc_year_sum[1]", type="FLOAT" } +OID[0x6D5318C8] = { name="cs_map[1]", type="UINT8" } +OID[0x6D639C25] = { name="battery_placeholder[0].cells_stat[0].t_min.value", type="FLOAT" } +OID[0x6D7C0BF4] = { name="wifi.sockb_port", type="INT32" } +OID[0x6DB1FDDC] = { name="battery.cells_stat[4].u_min.value", type="FLOAT" } +OID[0x6DCC4097] = { name="net.master_timeout", type="FLOAT" } +OID[0x6E1C5B78] = { name="g_sync.p_ac_lp[1]", type="FLOAT" } +OID[0x6E24632E] = { name="battery.cells_stat[5].u_max.time", type="UINT32" } +OID[0x6E3336A8] = { name="battery_placeholder[0].cells_stat[5].t_max.index", type="UINT8" } +OID[0x6E491B50] = { name="battery.maximum_charge_voltage", type="FLOAT" } +OID[0x6F3876BC] = { name="logger.error_log_time_stamp", type="INT32" } +OID[0x6FB2E2BF] = { name="db.power_board.afi_i150", type="FLOAT" } +OID[0x6FD36B32] = { name="rb485.f_wr[1]", type="FLOAT" } +OID[0x6FF4BD55] = { name="energy.e_ext_month_sum", type="FLOAT" } +OID[0x701A0482] = { name="dc_conv.dc_conv_struct[0].enabled", type="BOOL" } +OID[0x70349444] = { name="battery.cells_stat[1].t_min.index", type="UINT8" } +OID[0x70A2AF4F] = { name="battery.bat_status", type="INT32" } +OID[0x70BD7C46] = { name="logger.year_eac_log_ts", type="INT32" } +OID[0x70E28322] = { name="grid_mon[0].f_under.time", type="FLOAT" } +OID[0x71196579] = { name="battery.cells_stat[5].t_min.index", type="UINT8" } +OID[0x71277E71] = { name="frt.u_min_begin", type="FLOAT" } +OID[0x71465EAF] = { name="nsm.cos_phi_ts", type="FLOAT" } +OID[0x715C84A1] = { name="adc.u_ref_1_5v[2]", type="UINT16" } +OID[0x71765BD8] = { name="battery.status", type="INT32" } +OID[0x71B70DCE] = { name="hw_test.bt_power[4]", type="FLOAT" } +OID[0x71CB0B57] = { name="battery.cells_resist[1]", type="STRING" } +OID[0x71E10B51] = { name="g_sync.p_ac_lp[0]", type="FLOAT" } +OID[0x7232F7AF] = { name="nsm.apm", type="ENUM" } +OID[0x7268CE4D] = { name="battery.inv_cmd", type="UINT32" } +OID[0x72ACC0BF] = { name="logger.minutes_ua_log_ts", type="INT32" } +OID[0x7301A5A7] = { name="flash_rtc.time_stamp_factory", type="UINT32" } +OID[0x73489528] = { name="battery.module_sn[2]", type="STRING" } +OID[0x73E3ED49] = { name="prim_sm.island_max_trials", type="UINT16" } +OID[0x742966A6] = { name="db.power_board.afi_i300", type="FLOAT" } +OID[0x74FD4609] = { name="battery.cells_stat[2]", type="UNKNOWN" } +OID[0x751E80CA] = { name="prim_sm.island_reset_retrials_operation_time", type="FLOAT" } +OID[0x75898A45] = { name="battery_placeholder[0].cells_stat[5].t_max.time", type="UINT32" } +OID[0x75AE19ED] = { name="hw_test.hw_switch_time", type="FLOAT" } +OID[0x7689BE6A] = { name="io_board.home_relay_sw_on_delay", type="FLOAT" } +OID[0x76C9A0BD] = { name="logger.minutes_soc_targ_log_ts", type="INT32" } +OID[0x76CAA9BF] = { name="wifi.encryption_algorithm", type="STRING" } +OID[0x770A6E7C] = { name="battery.cells_stat[0].u_max.index", type="UINT8" } +OID[0x777DC0EB] = { name="iso_struct.r_min", type="FLOAT" } +OID[0x77A9480F] = { name="battery_placeholder[0].minimum_discharge_voltage", type="FLOAT" } +OID[0x77DD4364] = { name="hw_test.bt_time[5]", type="FLOAT" } +OID[0x77E5CEF1] = { name="battery_placeholder[0].stack_software_version[0]", type="UINT32" } +OID[0x78228507] = { name="battery_placeholder[0].stack_cycles[6]", type="UINT16" } +OID[0x7839EBCB] = { name="battery_placeholder[0].cells_stat[3].u_min.time", type="UINT32" } +OID[0x7924ABD9] = { name="inverter_sn", type="STRING" } +OID[0x792897C9] = { name="battery_placeholder[0].cells_stat[4].t_min.time", type="UINT32" } +OID[0x792A7B79] = { name="io_board.s0_direction", type="ENUM" } +OID[0x7940547B] = { name="inv_struct.force_dh", type="BOOL" } +OID[0x7946D888] = { name="i_dc_slow_time", type="FLOAT" } +OID[0x79C0A724] = { name="energy.e_ac_total_sum", type="FLOAT" } +OID[0x79D7D617] = { name="battery_placeholder[0].current", type="FLOAT" } +OID[0x79E66CDF] = { name="battery_placeholder[0].cells_stat[6].t_min.index", type="UINT8" } +OID[0x7A5C91F8] = { name="nsm.p_u[1][0]", type="FLOAT" } +OID[0x7A67E33B] = { name="can_bus.bms_update_response[1]", type="UINT32" } +OID[0x7A9091EA] = { name="rb485.u_l_grid[1]", type="FLOAT" } +OID[0x7AB9B045] = { name="energy.e_dc_month[1]", type="FLOAT" } +OID[0x7AE87E39] = { name="partition[2].last_id", type="INT32" } +OID[0x7AF0AD03] = { name="power_mng.schedule[9]", type="STRING" } +OID[0x7AF779C1] = { name="nsm.pu_mode", type="BOOL" } +OID[0x7B1F7FBE] = { name="wifi.gateway", type="STRING" } +OID[0x7B8E811E] = { name="battery_placeholder[0].cells_stat[6]", type="STRING" } +OID[0x7BF3886B] = { name="battery_placeholder[0].stack_cycles[2]", type="UINT16" } +OID[0x7C0827C5] = { name="partition[5].last_id", type="INT32" } +OID[0x7C556C7A] = { name="io_board.io2_polarity", type="BOOL" } +OID[0x7C78CBAC] = { name="g_sync.q_ac_sum_lp", type="FLOAT" } +OID[0x7C863EDB] = { name="battery_placeholder[0].cells[3]", type="STRING" } +OID[0x7D839AE6] = { name="battery_placeholder[0].cells_resist[2]", type="STRING" } +OID[0x7DA7D8B6] = { name="db.power_board.version_main", type="UINT32" } +OID[0x7DDE352B] = { name="wifi.sockb_ip", type="STRING" } +OID[0x7E096024] = { name="energy.e_load_total_sum", type="FLOAT" } +OID[0x7E590128] = { name="battery.cells_stat[0].u_max.time", type="UINT32" } +OID[0x7E75B17A] = { name="nsm.q_u_max_u_high_rel", type="FLOAT" } +OID[0x7F42BB82] = { name="battery.cells_stat[6].u_max.index", type="UINT8" } +OID[0x7F813D73] = { name="fault[3].flt", type="UINT32" } +OID[0x7FF6252C] = { name="battery.cells_stat[5].t_max.time", type="UINT32" } +OID[0x804A3266] = { name="battery.cells_stat[6].u_max.value", type="FLOAT" } +OID[0x80835476] = { name="db.power_board.adc_p5V_W_meas", type="FLOAT" } +OID[0x8128228D] = { name="battery_placeholder[0].cells_stat[1].u_max.value", type="FLOAT" } +OID[0x812E5ADD] = { name="energy.e_dc_total_sum[1]", type="FLOAT" } +OID[0x8160539D] = { name="battery.cells_stat[4].t_max.value", type="FLOAT" } +OID[0x81AE960B] = { name="energy.e_dc_month[0]", type="FLOAT" } +OID[0x81AF854E] = { name="nsm.pu_use", type="BOOL" } +OID[0x82258C01] = { name="cs_neg[0]", type="FLOAT" } +OID[0x82CD1525] = { name="grid_mon[1].u_under.threshold", type="FLOAT" } +OID[0x82E3C121] = { name="g_sync.q_ac[1]", type="FLOAT" } +OID[0x8320B84C] = { name="io_board.rse_data_delay", type="FLOAT" } +OID[0x8352F9DD] = { name="battery_placeholder[0].cells_stat[4].t_min.value", type="FLOAT" } +OID[0x83A5333A] = { name="nsm.cos_phi_p[0][0]", type="FLOAT" } +OID[0x83BBEF0B] = { name="frt.u_max_begin", type="FLOAT" } +OID[0x84ABE3D8] = { name="energy.e_grid_feed_year_sum", type="FLOAT" } +OID[0x85886E2E] = { name="p_rec_lim[0]", type="FLOAT" } +OID[0x8594D11E] = { name="battery_placeholder[0].module_sn[6]", type="STRING" } +OID[0x86782D58] = { name="hw_test.bt_power[9]", type="FLOAT" } +OID[0x867DEF7D] = { name="energy.e_grid_load_day", type="FLOAT" } +OID[0x872F380B] = { name="io_board.load_set", type="FLOAT" } +OID[0x87E4387A] = { name="current_sensor_max", type="FLOAT" } +OID[0x8822EF35] = { name="battery_placeholder[0].stack_software_version[2]", type="UINT32" } +OID[0x883DE9AB] = { name="g_sync.s_ac_lp[2]", type="FLOAT" } +OID[0x885BB57E] = { name="battery.cells_stat[6].t_min.value", type="FLOAT" } +OID[0x887D43C4] = { name="g_sync.i_dr_lp[0]", type="FLOAT" } +OID[0x889DC27F] = { name="battery.cells_stat[0].u_min.value", type="FLOAT" } +OID[0x88BBF8CB] = { name="battery.cells_stat[5].t_min.value", type="FLOAT" } +OID[0x88C9707B] = { name="io_board.rse_table[15]", type="FLOAT" } +OID[0x88DEBCFE] = { name="nsm.q_u_max_u_high", type="FLOAT" } +OID[0x88DFDE8B] = { name="frt.u_max_end", type="FLOAT" } +OID[0x88F36D45] = { name="io_board.rse_data", type="UINT8" } +OID[0x89B21223] = { name="frt.t_max[0]", type="FLOAT" } +OID[0x89B25F4B] = { name="battery.stack_cycles[3]", type="UINT16" } +OID[0x89EE3EB5] = { name="g_sync.i_dr_eff[0]", type="FLOAT" } +OID[0x8A18539B] = { name="g_sync.u_zk_sum_avg", type="FLOAT" } +OID[0x8AFD1410] = { name="battery_placeholder[0].stack_cycles[4]", type="UINT16" } +OID[0x8B4BE168] = { name="battery_placeholder[0].soc", type="FLOAT" } +OID[0x8B9FF008] = { name="battery.soc_target", type="FLOAT" } +OID[0x8BB08839] = { name="battery.cells_stat[6].t_min.time", type="UINT32" } +OID[0x8C6E28E4] = { name="battery_placeholder[0].cells_stat[2].t_max.time", type="UINT32" } +OID[0x8CA00014] = { name="wifi.result", type="INT8" } +OID[0x8D33B6BC] = { name="nsm.f_low_exit", type="FLOAT" } +OID[0x8D8E19F7] = { name="line_mon.u_min", type="FLOAT" } +OID[0x8DD1C728] = { name="dc_conv.dc_conv_struct[1].mpp.enable_scan", type="BOOL" } +OID[0x8DFFDD33] = { name="battery.cells_stat[3].u_min.time", type="UINT32" } +OID[0x8E41FC47] = { name="iso_struct.Rp", type="FLOAT" } +OID[0x8EBF9574] = { name="power_mng.soc_min_island", type="FLOAT" } +OID[0x8EC23427] = { name="battery.cells_stat[4].u_max.time", type="UINT32" } +OID[0x8EC4116E] = { name="display_struct.blink", type="BOOL" } +OID[0x8EF6FBBD] = { name="battery.cells[1]", type="UNKNOWN" } +OID[0x8EF9C9B8] = { name="battery.cells_stat[6].t_max.time", type="UINT32" } +OID[0x8F0FF9F3] = { name="p_rec_available[1]", type="FLOAT" } +OID[0x8FC89B10] = { name="com_service", type="ENUM" } +OID[0x902AFAFB] = { name="battery.temperature", type="FLOAT" } +OID[0x903FE89E] = { name="hw_test.bt_time[8]", type="FLOAT" } +OID[0x905F707B] = { name="rb485.f_wr[2]", type="FLOAT" } +OID[0x9061EA7B] = { name="grid_lt.granularity", type="FLOAT" } +OID[0x907CD1DF] = { name="wifi.connect_service_max_duration", type="INT32" } +OID[0x90832471] = { name="battery.cells_stat[1].u_max.time", type="UINT32" } +OID[0x9095FD74] = { name="battery_placeholder[0].cells[5]", type="STRING" } +OID[0x90B53336] = { name="temperature.sink_temp_power_reduction", type="FLOAT" } +OID[0x90C2AC13] = { name="battery_placeholder[0].stack_cycles[3]", type="UINT16" } +OID[0x90F123FA] = { name="io_board.io1_usage", type="ENUM" } +OID[0x915CD4A4] = { name="grid_mon[1].f_over.threshold", type="FLOAT" } +OID[0x91617C58] = { name="g_sync.p_ac_grid_sum_lp", type="FLOAT" } +OID[0x917E3622] = { name="energy.e_ext_year", type="FLOAT" } +OID[0x91C325D9] = { name="battery.cells_stat[0].t_min.time", type="UINT32" } +OID[0x91FB68CD] = { name="battery.cells_stat[6].t_max.value", type="FLOAT" } +OID[0x920AFF34] = { name="battery_placeholder[0].cells_stat[1].t_max.index", type="UINT8" } +OID[0x9214A00C] = { name="hw_test.booster_test_index", type="UINT8" } +OID[0x921997EE] = { name="logger.month_egrid_feed_log_ts", type="INT32" } +OID[0x9247DB99] = { name="logger.minutes_egrid_load_log_ts", type="INT32" } +OID[0x929394B7] = { name="svnversion_last_known", type="STRING" } +OID[0x92BC682B] = { name="g_sync.i_dr_eff[2]", type="FLOAT" } +OID[0x933F9A24] = { name="grid_mon[0].f_over.time", type="FLOAT" } +OID[0x934E64E9] = { name="switch_on_cond.u_max", type="FLOAT" } +OID[0x9350FE02] = { name="frt.u_max[2]", type="FLOAT" } +OID[0x93971C36] = { name="frt.t_max[2]", type="FLOAT" } +OID[0x93C0C2E2] = { name="power_mng.bat_calib_reqularity", type="UINT32" } +OID[0x93E6918D] = { name="nsm.f_exit", type="FLOAT" } +OID[0x93F976AB] = { name="rb485.u_l_grid[0]", type="FLOAT" } +OID[0x940569AC] = { name="hw_test.bt_time[6]", type="FLOAT" } +OID[0x947DDC38] = { name="battery_placeholder[0].cells_stat[0].t_min.index", type="UINT8" } +OID[0x9486134F] = { name="battery_placeholder[0].cells_stat[1].t_max.time", type="UINT32" } +OID[0x9558AD8A] = { name="rb485.f_grid[0]", type="FLOAT" } +OID[0x959930BF] = { name="battery.soc", type="FLOAT" } +OID[0x95E1E844] = { name="battery_placeholder[0].cells_stat[2].t_min.time", type="UINT32" } +OID[0x961C8261] = { name="battery_placeholder[0].cells_stat[4].u_max.time", type="UINT32" } +OID[0x96629BB9] = { name="can_bus.bms_update_state", type="UINT8" } +OID[0x9680077F] = { name="nsm.cos_phi_p[2][0]", type="FLOAT" } +OID[0x96E32D11] = { name="flash_param.erase_cycles", type="UINT32" } +OID[0x972B3029] = { name="power_mng.stop_discharge_voltage_buffer", type="FLOAT" } +OID[0x97997C93] = { name="power_mng.soc_max", type="FLOAT" } +OID[0x97DC2ECB] = { name="battery_placeholder[0].cells[1]", type="STRING" } +OID[0x97E203F9] = { name="power_mng.is_grid", type="BOOL" } +OID[0x97E3A6F2] = { name="power_mng.u_acc_lp", type="FLOAT" } +OID[0x980C5525] = { name="battery_placeholder[0].max_cell_voltage", type="FLOAT" } +OID[0x98ACC1B8] = { name="io_board.rse_table[4]", type="FLOAT" } +OID[0x99396810] = { name="battery.module_sn[1]", type="STRING" } +OID[0x993C06F6] = { name="battery.cells_resist[3]", type="STRING" } +OID[0x9981F1AC] = { name="db.power_board.adc_m9V_meas", type="FLOAT" } +OID[0x99EE89CB] = { name="power_mng.power_lim_src_index", type="ENUM" } +OID[0x9A33F9B7] = { name="power_mng.schedule[5]", type="STRING" } +OID[0x9A51A23B] = { name="logger.log_rate", type="UINT16" } +OID[0x9A67600D] = { name="p_rec_lim[2]", type="FLOAT" } +OID[0x9AAA9CAA] = { name="battery_placeholder[0].stack_cycles[5]", type="UINT16" } +OID[0x9B92023F] = { name="io_board.rse_table[7]", type="FLOAT" } +OID[0x9C75BD89] = { name="frt.t_min[0]", type="FLOAT" } +OID[0x9C8FE559] = { name="pas.period", type="UINT32" } +OID[0x9D785E8C] = { name="battery.bms_software_version", type="UINT32" } +OID[0x9DC927AA] = { name="bat_mng_struct.profile_load", type="UNKNOWN" } +OID[0x9E1A88F5] = { name="dc_conv.dc_conv_struct[0].mpp.fixed_voltage", type="FLOAT" } +OID[0x9E314430] = { name="battery.cells_stat[2].u_max.time", type="UINT32" } +OID[0x9F52F968] = { name="power_mng.feed_asymmetrical", type="BOOL" } +OID[0xA10D9A4B] = { name="battery.min_cell_temperature", type="FLOAT" } +OID[0xA1266D6B] = { name="line_mon.time_lim", type="FLOAT" } +OID[0xA12BE39C] = { name="energy.e_load_month_sum", type="FLOAT" } +OID[0xA12E9B43] = { name="phase_marker", type="INT16" } +OID[0xA1D2B565] = { name="wifi.service_port", type="INT32" } +OID[0xA23FE8B9] = { name="battery_placeholder[0].cells_stat[6].t_min.value", type="FLOAT" } +OID[0xA2F87161] = { name="battery_placeholder[0].cells_stat[0].u_max.time", type="UINT32" } +OID[0xA305214D] = { name="logger.buffer", type="STRING" } +OID[0xA3393749] = { name="io_board.check_start", type="UINT8" } +OID[0xA33D0954] = { name="nsm.q_u_hysteresis", type="BOOL" } +OID[0xA3E48B21] = { name="battery.cells_stat[2].t_min.value", type="FLOAT" } +OID[0xA40906BF] = { name="battery.stack_software_version[4]", type="UINT32" } +OID[0xA5044DCD] = { name="nsm.p_u[2][0]", type="FLOAT" } +OID[0xA5341F4A] = { name="energy.e_grid_feed_month_sum", type="FLOAT" } +OID[0xA54C4685] = { name="battery.stack_software_version[1]", type="UINT32" } +OID[0xA59C8428] = { name="energy.e_ext_total", type="FLOAT" } +OID[0xA60082A9] = { name="logger.minutes_egrid_feed_log_ts", type="INT32" } +OID[0xA616B022] = { name="battery.soc_target_low", type="FLOAT" } +OID[0xA6271C2E] = { name="grid_mon[0].u_over.threshold", type="FLOAT" } +OID[0xA6871A4D] = { name="battery.cells_stat[4].t_min.index", type="UINT8" } +OID[0xA6C4FD4A] = { name="battery.stack_cycles[0]", type="UINT16" } +OID[0xA7447FC4] = { name="temperature.bat_temp_power_reduction", type="FLOAT" } +OID[0xA76AE9CA] = { name="relays.bits_real", type="UINT16" } +OID[0xA7C708EB] = { name="logger.minutes_eload_log_ts", type="INT32" } +OID[0xA7DBD28C] = { name="battery.cells_stat[2].t_max.index", type="UINT8" } +OID[0xA7F4123B] = { name="battery_placeholder[0].stack_software_version[6]", type="UINT32" } +OID[0xA7FA5C5D] = { name="power_mng.u_acc_mix_lp", type="FLOAT" } +OID[0xA7FE5C0C] = { name="battery.cells_stat[2].t_min.index", type="UINT8" } +OID[0xA81176D0] = { name="battery_placeholder[0].cells_stat[1].u_min.time", type="UINT32" } +OID[0xA83F291F] = { name="battery_placeholder[0].cells_stat[6].u_min.value", type="FLOAT" } +OID[0xA8FEAEB9] = { name="battery_placeholder[0].cells_resist[5]", type="STRING" } +OID[0xA9033880] = { name="battery.used_energy", type="FLOAT" } +OID[0xA95AD038] = { name="grid_mon[0].f_under.threshold", type="FLOAT" } +OID[0xA95EE214] = { name="power_mng.model.bat_power_change", type="FLOAT" } +OID[0xA9CF517D] = { name="power_spring_down", type="FLOAT" } +OID[0xAA911BEE] = { name="battery_placeholder[0].cells_stat[4].t_max.value", type="FLOAT" } +OID[0xAA9AA253] = { name="dc_conv.dc_conv_struct[1].p_dc", type="FLOAT" } +OID[0xAACAC898] = { name="battery.cells_stat[4].t_max.time", type="UINT32" } +OID[0xAACE057A] = { name="io_board.io1_s0_min_duration", type="FLOAT" } +OID[0xABA015FC] = { name="battery_placeholder[0].module_sn[1]", type="STRING" } +OID[0xAC2E2A56] = { name="io_board.rse_table[5]", type="FLOAT" } +OID[0xACF7666B] = { name="battery.efficiency", type="FLOAT" } +OID[0xAE99F87A] = { name="battery_placeholder[0].cells_stat[5].t_min.time", type="UINT32" } +OID[0xAEF76FA1] = { name="power_mng.minimum_discharge_voltage", type="FLOAT" } +OID[0xAF64D0FE] = { name="energy.e_dc_year[0]", type="FLOAT" } +OID[0xB0041187] = { name="g_sync.u_sg_avg[1]", type="FLOAT" } +OID[0xB0307591] = { name="db.power_board.status", type="UINT16" } +OID[0xB082C4D7] = { name="hw_test.bt_power[5]", type="FLOAT" } +OID[0xB0EBE75A] = { name="battery.minimum_discharge_voltage", type="FLOAT" } +OID[0xB0FA4D23] = { name="acc_conv.i_charge_max", type="FLOAT" } +OID[0xB130B8D6] = { name="battery_placeholder[0].cells_stat[1].t_min.time", type="UINT32" } +OID[0xB1D1BE71] = { name="osci_struct.cmd_response_time", type="FLOAT" } +OID[0xB1D465C7] = { name="battery_placeholder[0].cells_stat[4].u_min.value", type="FLOAT" } +OID[0xB1EF67CE] = { name="energy.e_ac_total", type="FLOAT" } +OID[0xB20D1AD6] = { name="logger.day_egrid_feed_log_ts", type="INT32" } +OID[0xB221BCFA] = { name="g_sync.p_ac_sc[2]", type="FLOAT" } +OID[0xB228EC94] = { name="battery_placeholder[0].cells_stat[3].t_max.time", type="UINT32" } +OID[0xB238942F] = { name="last_successfull_flash_op", type="INT16" } +OID[0xB298395D] = { name="dc_conv.dc_conv_struct[0].u_sg_lp", type="FLOAT" } +OID[0xB2FB9A90] = { name="bat_mng_struct.k_trust", type="FLOAT" } +OID[0xB399B5B3] = { name="battery_placeholder[0].cells_stat[4].u_min.index", type="UINT8" } +OID[0xB403A7E6] = { name="battery_placeholder[0].soc_update_since", type="FLOAT" } +OID[0xB408E40A] = { name="acc_conv.i_acc_lp_slow", type="FLOAT" } +OID[0xB4222BDE] = { name="wifi.state", type="UINT8" } +OID[0xB45FE275] = { name="p_rec_available[0]", type="FLOAT" } +OID[0xB4E053D4] = { name="battery.cells_stat[1].u_min.value", type="FLOAT" } +OID[0xB5317B78] = { name="dc_conv.dc_conv_struct[0].p_dc", type="FLOAT" } +OID[0xB55BA2CE] = { name="g_sync.u_sg_avg[0]", type="FLOAT" } +OID[0xB57B59BD] = { name="battery.ah_capacity", type="FLOAT" } +OID[0xB5EDA8EC] = { name="battery_placeholder[0].cells_stat[3].u_max.value", type="FLOAT" } +OID[0xB6623608] = { name="power_mng.bat_next_calib_date", type="UINT32" } +OID[0xB69171C4] = { name="db.power_board.Current_AC_RMS", type="FLOAT" } +OID[0xB70D1703] = { name="battery_placeholder[0].cells_stat[5].u_max.index", type="UINT8" } +OID[0xB76E2B4C] = { name="nsm.cos_phi_const", type="FLOAT" } +OID[0xB7B2967F] = { name="energy.e_dc_total_sum[0]", type="FLOAT" } +OID[0xB7C85C51] = { name="wifi.use_ethernet", type="BOOL" } +OID[0xB7FEA209] = { name="wifi.connect_service_timestamp", type="INT32" } +OID[0xB81FB399] = { name="battery.cells_stat[2].u_min.time", type="UINT32" } +OID[0xB836B50C] = { name="dc_conv.dc_conv_struct[1].rescan_correction", type="FLOAT" } +OID[0xB84A38AB] = { name="battery.soc_target_high", type="FLOAT" } +OID[0xB84FDCF9] = { name="adc.u_acc", type="FLOAT" } +OID[0xB851FA70] = { name="io_board.rse_table[11]", type="FLOAT" } +OID[0xB98C8194] = { name="nsm.min_cos_phi", type="FLOAT" } +OID[0xB9928C51] = { name="g_sync.p_ac_lp[2]", type="FLOAT" } +OID[0xB9A026F9] = { name="energy.e_ext_day", type="FLOAT" } +OID[0xB9E09F78] = { name="battery.cells_stat[5].u_min.index", type="UINT8" } +OID[0xBA046C03] = { name="battery_placeholder[0].cells_stat[5].t_max.value", type="FLOAT" } +OID[0xBA8B8515] = { name="dc_conv.dc_conv_struct[0].mpp.mpp_step", type="FLOAT" } +OID[0xBB302278] = { name="battery.cells_stat[1].t_min.time", type="UINT32" } +OID[0xBB617E51] = { name="nsm.u_q_u[1]", type="FLOAT" } +OID[0xBBE6B9DF] = { name="io_board.p_rse_rise_grad", type="FLOAT" } +OID[0xBCA77559] = { name="g_sync.q_ac[2]", type="FLOAT" } +OID[0xBCC6F92F] = { name="io_board.home_relay_threshold", type="FLOAT" } +OID[0xBD008E29] = { name="power_mng.battery_power_extern", type="FLOAT" } +OID[0xBD3A23C3] = { name="power_mng.soc_charge", type="FLOAT" } +OID[0xBD4147B0] = { name="can_bus.set_cell_resist", type="UINT32" } +OID[0xBD55905F] = { name="energy.e_ac_day", type="FLOAT" } +OID[0xBD55D796] = { name="energy.e_dc_year[1]", type="FLOAT" } +OID[0xBD95C46C] = { name="battery_placeholder[0].ah_capacity", type="FLOAT" } +OID[0xBDE3BF0A] = { name="battery.cells_stat[6].t_max.index", type="UINT8" } +OID[0xBDFE5547] = { name="io_board.rse_table[3]", type="FLOAT" } +OID[0xBF9B6042] = { name="svnversion_factory", type="STRING" } +OID[0xBFFF3CAD] = { name="net.n_slaves", type="UINT8" } +OID[0xC03462F6] = { name="g_sync.p_ac[2]", type="FLOAT" } +OID[0xC04A5F3A] = { name="battery_placeholder[0].bms_software_version", type="UINT32" } +OID[0xC0680302] = { name="battery.cells_stat[2].t_min.time", type="UINT32" } +OID[0xC07E02CE] = { name="nsm.q_u_sel", type="ENUM" } +OID[0xC0A7074F] = { name="net.slave_data", type="UNKNOWN" } +OID[0xC0B7C4D2] = { name="db.power_board.afi_t30", type="FLOAT" } +OID[0xC0CC81B6] = { name="energy.e_ac_year", type="FLOAT" } +OID[0xC0DF2978] = { name="battery.cycles", type="INT32" } +OID[0xC198B25B] = { name="g_sync.u_zk_p_avg", type="FLOAT" } +OID[0xC1C82889] = { name="hw_test.bt_power[1]", type="FLOAT" } +OID[0xC1D051EC] = { name="display_struct.variate_contrast", type="UINT8" } +OID[0xC24E85D0] = { name="db.core_temp", type="FLOAT" } +OID[0xC3352B17] = { name="nsm.rpm", type="ENUM" } +OID[0xC36675D4] = { name="i_ac_max_set", type="FLOAT" } +OID[0xC3A3F070] = { name="i_ac_extern_connected", type="BOOL" } +OID[0xC3C7325E] = { name="hw_test.bt_time[4]", type="FLOAT" } +OID[0xC3DD7850] = { name="partition[6].last_id", type="INT32" } +OID[0xC40D5688] = { name="prim_sm.state_source", type="UINT32" } +OID[0xC42F5807] = { name="battery.cells_stat[1].u_max.index", type="UINT8" } +OID[0xC46E9CA4] = { name="nsm.u_lock_out", type="FLOAT" } +OID[0xC4D87E96] = { name="prim_sm.island_retrials", type="UINT16" } +OID[0xC4FA4E33] = { name="frt.u_min[1]", type="FLOAT" } +OID[0xC55EF32E] = { name="logger.year_egrid_load_log_ts", type="INT32" } +OID[0xC56A1346] = { name="battery_placeholder[0].cells_stat[4].t_max.index", type="UINT8" } +OID[0xC642B9D6] = { name="acc_conv.i_discharge_max", type="FLOAT" } +OID[0xC66665E8] = { name="battery_placeholder[0].temperature", type="FLOAT" } +OID[0xC66A522B] = { name="hw_test.bt_time[1]", type="FLOAT" } +OID[0xC6DA81A0] = { name="battery.cells_stat[6].u_max.time", type="UINT32" } +OID[0xC707102E] = { name="hw_test.bt_power[3]", type="FLOAT" } +OID[0xC71155B5] = { name="battery_placeholder[0].cells_stat[2].t_min.index", type="UINT8" } +OID[0xC717D1FB] = { name="iso_struct.Riso", type="FLOAT" } +OID[0xC7459513] = { name="power_mng.force_inv_class", type="ENUM" } +OID[0xC7605E16] = { name="io_board.s0_sum", type="FLOAT" } +OID[0xC7D3B479] = { name="energy.e_load_year", type="FLOAT" } +OID[0xC7E85F32] = { name="battery_placeholder[0].cells_stat[4].t_max.time", type="UINT32" } +OID[0xC8609C8E] = { name="battery.cells[3]", type="UNKNOWN" } +OID[0xC88EB032] = { name="battery.cells_stat[0].u_min.time", type="UINT32" } +OID[0xC8BA1729] = { name="battery.stack_software_version[2]", type="UINT32" } +OID[0xC8E56803] = { name="battery_placeholder[0].maximum_charge_voltage", type="FLOAT" } +OID[0xC937D38D] = { name="battery_placeholder[0].stack_cycles[0]", type="UINT16" } +OID[0xC9900716] = { name="power_mng.is_island_only", type="BOOL" } +OID[0xC9D76279] = { name="energy.e_dc_day_sum[0]", type="FLOAT" } +OID[0xCA4E0C03] = { name="battery_placeholder[0].cells_stat[5].u_max.time", type="UINT32" } +OID[0xCA6D6472] = { name="logger.day_eload_log_ts", type="INT32" } +OID[0xCABC44CA] = { name="g_sync.s_ac[0]", type="FLOAT" } +OID[0xCB1B3B10] = { name="io_board.io2_s0_min_duration", type="FLOAT" } +OID[0xCB78F611] = { name="frt.t_max[1]", type="FLOAT" } +OID[0xCB85C397] = { name="battery_placeholder[0].cells_stat[3].u_min.value", type="FLOAT" } +OID[0xCB9E1E6C] = { name="nsm.Q_const", type="FLOAT" } +OID[0xCBBEEB21] = { name="battery_placeholder[0].cells_stat[2].u_max.time", type="UINT32" } +OID[0xCBDAD315] = { name="logger.minutes_ebat_log_ts", type="INT32" } +OID[0xCBEC8200] = { name="hw_test.timer2", type="FLOAT" } +OID[0xCCB51399] = { name="nsm.q_u_max_u_low", type="FLOAT" } +OID[0xCD8EDAD3] = { name="battery_placeholder[0].cells_stat[3].t_min.value", type="FLOAT" } +OID[0xCE266F0F] = { name="power_mng.soc_min", type="FLOAT" } +OID[0xCE49EB86] = { name="battery_placeholder[0].cells_stat[2].t_max.index", type="UINT8" } +OID[0xCF005C54] = { name="prim_sm.phase_3_mode", type="BOOL" } +OID[0xCF053085] = { name="g_sync.u_l_rms[0]", type="FLOAT" } +OID[0xCF096A6B] = { name="battery_placeholder[0].stack_software_version[4]", type="UINT32" } +OID[0xD0C47326] = { name="battery.cells_stat[1].t_min.value", type="FLOAT" } +OID[0xD143A391] = { name="can_bus.set_cell_v_t", type="UINT32" } +OID[0xD166D94D] = { name="flash_rtc.time_stamp", type="UINT32" } +OID[0xD197CBE0] = { name="power_mng.stop_charge_current", type="FLOAT" } +OID[0xD1DFC969] = { name="power_mng.soc_target_set", type="FLOAT" } +OID[0xD1F9D017] = { name="battery_placeholder[0].cells_stat[4].u_min.time", type="UINT32" } +OID[0xD2DEA4B1] = { name="battery_placeholder[0].cells_stat[5].t_min.index", type="UINT8" } +OID[0xD3085D80] = { name="net.soc_av", type="FLOAT" } +OID[0xD3E94E6B] = { name="logger.minutes_temp_bat_log_ts", type="INT32" } +OID[0xD3F492EB] = { name="battery_placeholder[0].cells_stat[0].t_max.time", type="UINT32" } +OID[0xD451EF88] = { name="cs_map[2]", type="UINT8" } +OID[0xD45913EC] = { name="io_board.rse_table[13]", type="FLOAT" } +OID[0xD4C4A941] = { name="hw_test.bt_time[7]", type="FLOAT" } +OID[0xD5205A45] = { name="net.slave_timeout", type="FLOAT" } +OID[0xD536E7E9] = { name="frt.u_max[1]", type="FLOAT" } +OID[0xD5567470] = { name="partition[4].last_id", type="INT32" } +OID[0xD5790CE1] = { name="wifi.use_wifi", type="BOOL" } +OID[0xD580567B] = { name="nsm.u_lock_in", type="FLOAT" } +OID[0xD60E7A2F] = { name="battery.cells_stat[1].u_min.time", type="UINT32" } +OID[0xD81471DF] = { name="battery_placeholder[0].cells_stat[6].t_max.value", type="FLOAT" } +OID[0xD82F2D0B] = { name="battery_placeholder[0].cells_stat[3].u_min.index", type="UINT8" } +OID[0xD83DC6AC] = { name="wifi.server_port", type="INT32" } +OID[0xD876A4AC] = { name="battery_placeholder[0].cells_stat[0].u_min.index", type="UINT8" } +OID[0xD884AF95] = { name="nsm.pf_desc_grad", type="FLOAT" } +OID[0xD9D66B76] = { name="energy.e_grid_load_year_sum", type="FLOAT" } +OID[0xD9E721A5] = { name="grid_lt.timeframe", type="FLOAT" } +OID[0xD9F9F35B] = { name="acc_conv.state_slow", type="UINT8" } +OID[0xDA207111] = { name="energy.e_grid_load_month_sum", type="FLOAT" } +OID[0xDABD323E] = { name="osci_struct.error", type="INT16" } +OID[0xDAC7DD86] = { name="io_board.p_rse_desc_grad", type="FLOAT" } +OID[0xDB11855B] = { name="dc_conv.dc_conv_struct[0].p_dc_lp", type="FLOAT" } +OID[0xDB2D69AE] = { name="g_sync.p_ac_sum_lp", type="FLOAT" } +OID[0xDB45ABD0] = { name="dc_conv.dc_conv_struct[0].rescan_correction", type="FLOAT" } +OID[0xDB62DCB7] = { name="net.n_devices", type="UINT8" } +OID[0xDC667958] = { name="power_mng.state", type="UINT8" } +OID[0xDCA1CF26] = { name="g_sync.s_ac_sum_lp", type="FLOAT" } +OID[0xDCAC0EA9] = { name="g_sync.i_dr_lp[1]", type="FLOAT" } +OID[0xDD5930A2] = { name="battery.cells_stat[0].t_min.index", type="UINT8" } +OID[0xDD90A328] = { name="flash_rtc.time_stamp_update", type="UINT32" } +OID[0xDDD1C2D0] = { name="svnversion", type="STRING" } +OID[0xDE17F021] = { name="energy.e_grid_load_year", type="FLOAT" } +OID[0xDE68F62D] = { name="bat_mng_struct.profile_pext", type="STRING" } +OID[0xDE9CBCB0] = { name="battery.cells_stat[5].t_max.value", type="FLOAT" } +OID[0xDEE1957F] = { name="battery.cells_resist[4]", type="STRING" } +OID[0xDF0A735C] = { name="battery.maximum_discharge_current", type="FLOAT" } +OID[0xDF6EA121] = { name="bat_mng_struct.profile_pdc", type="STRING" } +OID[0xDFB53AF3] = { name="db.power_board.Current_Mean_Mean_AC", type="FLOAT" } +OID[0xDFF966E3] = { name="battery.cells_stat[6].t_min.index", type="UINT8" } +OID[0xE04C3900] = { name="logger.day_eac_log_ts", type="INT32" } +OID[0xE0E16E63] = { name="cs_map[0]", type="UINT8" } +OID[0xE14B8679] = { name="i_dc_slow_max", type="FLOAT" } +OID[0xE14F1CBA] = { name="battery_placeholder[0].cells_stat[4]", type="STRING" } +OID[0xE19C8B79] = { name="battery_placeholder[0].cells_resist[1]", type="STRING" } +OID[0xE1F49459] = { name="frt.t_min[2]", type="FLOAT" } +OID[0xE24B00BD] = { name="power_mng.schedule[1]", type="STRING" } +OID[0xE271C6D2] = { name="nsm.u_q_u[2]", type="FLOAT" } +OID[0xE29C24EB] = { name="logger.minutes_eac3_log_ts", type="INT32" } +OID[0xE31F8B17] = { name="prim_sm.Uzk_pump_grad[0]", type="FLOAT" } +OID[0xE3F4D1DF] = { name="acc_conv.i_max", type="FLOAT" } +OID[0xE49BE3ED] = { name="nsm.pf_rise_grad", type="FLOAT" } +OID[0xE4DC040A] = { name="logger.month_eext_log_ts", type="INT32" } +OID[0xE52B89FA] = { name="io_board.home_relay_off_threshold", type="FLOAT" } +OID[0xE5FBCC6F] = { name="logger.year_eload_log_ts", type="INT32" } +OID[0xE6248312] = { name="hw_test.bt_power[8]", type="FLOAT" } +OID[0xE635A6C4] = { name="battery_placeholder[0].module_sn[2]", type="STRING" } +OID[0xE63A3529] = { name="flash_result", type="UINT16" } +OID[0xE6AC95E5] = { name="phase_shift_threshold", type="UINT32" } +OID[0xE6F1CB83] = { name="nsm.pu_ts", type="FLOAT" } +OID[0xE7177DEE] = { name="battery.cells_stat[2].u_max.value", type="FLOAT" } +OID[0xE7B0E692] = { name="battery.bat_impedance.impedance_fine", type="FLOAT" } +OID[0xE87B1F4B] = { name="battery_placeholder[0].cells_stat[0].u_min.value", type="FLOAT" } +OID[0xE94C2EFC] = { name="g_sync.q_ac[0]", type="FLOAT" } +OID[0xE952FF2D] = { name="nsm.q_u_max_u_low_rel", type="FLOAT" } +OID[0xE96F1844] = { name="io_board.s0_external_power", type="FLOAT" } +OID[0xE9BBF6E4] = { name="power_mng.amp_hours_measured", type="FLOAT" } +OID[0xEA399EA8] = { name="battery_placeholder[0].min_cell_voltage", type="FLOAT" } +OID[0xEA77252E] = { name="battery.minimum_discharge_voltage_constant_u", type="FLOAT" } +OID[0xEAEEB3CA] = { name="energy.e_dc_month_sum[0]", type="FLOAT" } +OID[0xEB4C2597] = { name="battery.cells_resist[6]", type="STRING" } +OID[0xEB7773BF] = { name="nsm.p_u[1][1]", type="FLOAT" } +OID[0xEB7BCB93] = { name="battery_placeholder[0].bms_sn", type="STRING" } +OID[0xEBC62737] = { name="android_description", type="STRING" } +OID[0xEBF7A4E8] = { name="grid_mon[0].f_over.threshold", type="FLOAT" } +OID[0xECABB6CF] = { name="switch_on_cond.test_time", type="FLOAT" } +OID[0xEE049B1F] = { name="nsm.pf_hysteresis", type="BOOL" } +OID[0xEEA3F59B] = { name="battery.stack_software_version[5]", type="UINT32" } +OID[0xEEC44AA0] = { name="battery_placeholder[0].cells_stat[2].u_min.index", type="UINT8" } +OID[0xEECDFEFC] = { name="battery.cells_stat[2].u_min.value", type="FLOAT" } +OID[0xEF89568B] = { name="grid_mon[0].u_under.time", type="FLOAT" } +OID[0xEFD3EC8A] = { name="battery.cells_stat[5].t_min.time", type="UINT32" } +OID[0xEFF4B537] = { name="energy.e_load_total", type="FLOAT" } +OID[0xF03133E2] = { name="partition[0].last_id", type="INT32" } +OID[0xF044EDA0] = { name="battery.cells_stat[3].t_max.value", type="FLOAT" } +OID[0xF0527539] = { name="db.power_board.adc_p3V3_meas", type="FLOAT" } +OID[0xF09CC4A2] = { name="grid_mon[1].u_over.time", type="FLOAT" } +OID[0xF0A03A20] = { name="bat_mng_struct.k", type="FLOAT" } +OID[0xF0B436DD] = { name="g_sync.p_ac_load[2]", type="FLOAT" } +OID[0xF0BE6429] = { name="energy.e_load_month", type="FLOAT" } +OID[0xF1342795] = { name="power_mng.stop_discharge_current", type="FLOAT" } +OID[0xF168B748] = { name="power_mng.soc_strategy", type="ENUM" } +OID[0xF1DE6E99] = { name="battery_placeholder[0].cells_resist[3]", type="STRING" } +OID[0xF1FA5BB9] = { name="grid_mon[1].f_under.time", type="FLOAT" } +OID[0xF23D4595] = { name="battery_placeholder[0].cells_stat[1].t_min.value", type="FLOAT" } +OID[0xF2405AC6] = { name="nsm.p_limit", type="FLOAT" } +OID[0xF247BB16] = { name="display_struct.contrast", type="UINT8" } +OID[0xF25591AA] = { name="nsm.cos_phi_p[3][0]", type="FLOAT" } +OID[0xF257D342] = { name="battery.cells_stat[1].t_max.value", type="FLOAT" } +OID[0xF25C339B] = { name="g_sync.u_ptp_rms[2]", type="FLOAT" } +OID[0xF28341E2] = { name="logger.month_eac_log_ts", type="INT32" } +OID[0xF2BE0C9C] = { name="p_buf_available", type="FLOAT" } +OID[0xF393B7B0] = { name="power_mng.calib_charge_power", type="FLOAT" } +OID[0xF3FD6C4C] = { name="nsm.pf_use_p_max", type="BOOL" } +OID[0xF3FD8CE6] = { name="battery.cells_resist[2]", type="STRING" } +OID[0xF42D4DD0] = { name="io_board.alarm_home_value", type="ENUM" } +OID[0xF451E935] = { name="battery_placeholder[0].cells_stat[0].t_min.time", type="UINT32" } +OID[0xF473BC5E] = { name="buf_v_control.power_reduction_max_solar_grid", type="FLOAT" } +OID[0xF49F58F2] = { name="nsm.p_u[2][1]", type="FLOAT" } +OID[0xF52C0B50] = { name="power_mng.schedule[7]", type="STRING" } +OID[0xF54BC06D] = { name="battery.cells_stat[4].u_max.value", type="FLOAT" } +OID[0xF5584F90] = { name="g_sync.p_ac_sc[1]", type="FLOAT" } +OID[0xF644DCA7] = { name="bat_mng_struct.k_reserve", type="FLOAT" } +OID[0xF677D737] = { name="battery_placeholder[0].cells_stat[6].u_max.time", type="UINT32" } +OID[0xF68ECC1F] = { name="battery_placeholder[0].cells_stat[1].u_max.time", type="UINT32" } +OID[0xF6A85818] = { name="nsm.f_entry", type="FLOAT" } +OID[0xF742C6BA] = { name="battery_placeholder[0].cells_stat[1].u_max.index", type="UINT8" } +OID[0xF76DE445] = { name="logger.minutes_temp_log_ts", type="INT32" } +OID[0xF79D41D9] = { name="db.temp1", type="FLOAT" } +OID[0xF87A2A1E] = { name="dc_conv.last_rescan", type="UINT32" } +OID[0xF8C0D255] = { name="battery.cells[0]", type="UNKNOWN" } +OID[0xF8DECCE6] = { name="wifi.connected_ap_ssid", type="STRING" } +OID[0xF99E8CC8] = { name="battery.cells_stat[6]", type="UNKNOWN" } +OID[0xF9FD0D61] = { name="wifi.service_ip", type="STRING" } +OID[0xFA3276DC] = { name="battery.cells_stat[3].t_min.time", type="UINT32" } +OID[0xFA7DB323] = { name="io_board.check_s0_result", type="UINT16" } +OID[0xFAA837C8] = { name="nsm.f_low_rise_grad", type="FLOAT" } +OID[0xFAE429C5] = { name="rb485.f_grid[1]", type="FLOAT" } +OID[0xFB57BA65] = { name="bat_mng_struct.count", type="STRING" } +OID[0xFB5DE9C5] = { name="prim_sm.minigrid_flag", type="BOOL" } +OID[0xFB796780] = { name="battery.cells_stat[1]", type="UNKNOWN" } +OID[0xFBD94C1F] = { name="power_mng.amp_hours", type="FLOAT" } +OID[0xFBF3CE97] = { name="energy.e_dc_day[1]", type="FLOAT" } +OID[0xFBF6D834] = { name="battery.module_sn[0]", type="STRING" } +OID[0xFBF8D63C] = { name="energy.e_grid_load_day_sum", type="FLOAT" } +OID[0xFC1C614E] = { name="energy.e_ac_month_sum", type="FLOAT" } +OID[0xFC1F8C65] = { name="battery_placeholder[0].cells_stat[6].t_max.time", type="UINT32" } +OID[0xFC5AA529] = { name="bat_mng_struct.bat_calib_soc_threshold", type="FLOAT" } +OID[0xFC724A9E] = { name="energy.e_dc_total[0]", type="FLOAT" } +OID[0xFCA1CBB5] = { name="battery_placeholder[0].voltage", type="FLOAT" } +OID[0xFCC39293] = { name="nsm.rpm_lock_in_power", type="FLOAT" } +OID[0xFCF4E78D] = { name="logger.day_ea_log_ts", type="INT32" } +OID[0xFD4F17C4] = { name="grid_mon[1].f_over.time", type="FLOAT" } +OID[0xFD72CC0D] = { name="frt.enabled", type="BOOL" } +OID[0xFDB81124] = { name="energy.e_grid_feed_day_sum", type="FLOAT" } +OID[0xFDBD9EE9] = { name="battery.cells_stat[3].u_max.index", type="UINT8" } +OID[0xFE1AA500] = { name="buf_v_control.power_reduction", type="FLOAT" } +OID[0xFE38B227] = { name="battery_placeholder[0].cells_stat[5]", type="STRING" } +OID[0xFE44BA26] = { name="battery.cells_stat[0].u_min.index", type="UINT8" } +OID[0xFED51BD2] = { name="dc_conv.dc_conv_struct[1].enabled", type="BOOL" } +OID[0xFF2A258B] = { name="wifi.server_ip", type="STRING" } +OID[0xFF5B8A54] = { name="battery_placeholder[0].cells_stat[3]", type="STRING" } diff --git a/dissectors/rctserial/rctserial.lua b/dissectors/rctserial/rctserial.lua new file mode 100644 index 0000000..6cf0dbb --- /dev/null +++ b/dissectors/rctserial/rctserial.lua @@ -0,0 +1,257 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/svalouch/wireshark-rctserial-dissector (rctserial.lua), +-- commit bfe325206ac308aee62c9d9883f696c13cbba2b9 du 25/06/2022. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- Dissector for the "Serial Communication Protocol" by "RCT Power GmbH" +-- For more information, see https://github.com/svalouch/python-rctclient and the accompanied documentation. +-- +-- Copyright 2021-2022 Stefan Valouch (svalouch) +-- SPDX-License-Identifier: GPL-3.0-only +-- +-- Installation: Place the files "rctserial.lua", "rctutils.lua" and "rctdata.lua" in the directory +-- $HOME/.local/lib/wireshark/plugins/ and start Wireshark. It may be required to select a TCP stream once and select +-- "Decode as..." from the context-menu and remove everything but "RCTSERIAL" from the list. + +require('rctdata') -- bulk data +require('rctutils') -- utility functions + +rctserial_protocol = Proto("rctserial", "RCT Power GmbH - Serial Communication Protocol") + +START_TOKEN = '+' +ESCAPE_TOKEN = '-' + +Frame = {} +function Frame:new() + self.__buffer = '' + self.__consumed = 0 + self.__escaping = false + self.__frame_header_length = 7 + self.__address = 0 + self.cmd = 0 + self.id = 0 + self.frame_length = 0 + self.complete = true + self.crc_ok = false + self.crc16 = '' + self.data = '' + + self.skipped_from_start = 0 -- amount of bytes skipped before finding the start + + self.pos_command = 0 -- position of command + self.pos_length = 0 -- position of length + self.length_length = 1 -- how many bytes the length is long + self.pos_address = 0 -- position of address + self.pos_oid = 0 -- position of OID + self.pos_data = 0 -- position of start of data + self.length_data = 0 -- length of data + self.pos_crc = 0 -- position of crc + + return self +end + +function Frame:parse(bytes) + + local len = 0 + for i = 0, bytes:len(), 1 do + self.__consumed = self.__consumed + 1 + len = len + 1 + c = bytes:raw(i, 1) + + if self.__buffer:len() == 0 then + if c == START_TOKEN then + -- print('START') + self.__buffer = self.__buffer .. c + end + self.skipped_from_start = self.skipped_from_start + 1 + goto continue + end + + if self.__escaping then + self.__escaping = false + else + if c == ESCAPE_TOKEN then + self.__escaping = true + goto continue + end + end + + self.__buffer = self.__buffer .. c + + local blen = self.__buffer:len() + + if blen == 2 then + self.pos_command = len - 1 + self.cmd = Struct.unpack('B', self.__buffer:sub(2, 3)) + if not cmd_known(self.cmd) then + return false, len, 'Command unknown' + end + if self.cmd == 0x3c then + return false, len, 'Extension' + end + if cmd_is_plant(self.cmd) then + self.__frame_header_length = self.__frame_header_length + 4 + end + if cmd_is_long(self.cmd) then + self.__frame_header_length = self.__frame_header_length + 1 + end + elseif blen == self.__frame_header_length then + local data_length = 0 + local address_idx = 0 + self.pos_length = self.pos_command + 1 + if cmd_is_long(self.cmd) then + self.length_length = 2 + data_length = Struct.unpack('>H', self.__buffer:sub(3, 5)) + address_idx = 4 + else + self.length_length = 1 + data_length = Struct.unpack('>B', self.__buffer:sub(3, 4)) + address_idx = 3 + end + + local oid_idx = address_idx + if cmd_is_plant(self.cmd) then + self.frame_length = (self.__frame_header_length - 8) + data_length + 2 + self.pos_address = self.skipped_from_start + address_idx + self.__address = Struct.unpack('>I', self.__buffer:sub(address_idx + 1, address_idx + 1 + 4)) + oid_idx = oid_idx + 4 + else + self.frame_length = (self.__frame_header_length - 4) + data_length + 2 + end + self.pos_oid = self.skipped_from_start + oid_idx - 1 + self.id = Struct.unpack('>I', self.__buffer:sub(oid_idx + 1, oid_idx + 1 + 4)) + elseif self.frame_length > 0 and blen == self.frame_length then + self.complete = true + + self.pos_crc = self.skipped_from_start + self.__buffer:len() - 3 + self.crc16 = Struct.unpack('>H', self.__buffer:sub(-3)) + -- calc_crc16 = self.__buffer:sub(2, -3) + -- print(hex_dump(calc_crc16)) + calc_crc16 = CRC16(self.__buffer:sub(2, -3)) + self.crc_ok = calc_crc16 == self.crc16 + self.pos_data = self.skipped_from_start + self.__frame_header_length - 1 + self.data = self.__buffer:sub(self.__frame_header_length + 1, -3) + self.length_data = self.data:len() + return true, len, 'OK' + end + ::continue:: + end + return true, len, 'OK' +end + +-- Fields to be used later +frame_command = ProtoField.char("rctserial.command", "command", base.HEX, COMMANDS) +frame_length = ProtoField.uint16('rctserial.frame_length', 'Length', base.DEC) +frame_oid = ProtoField.uint32("rctserial.oid", "OID", base.HEX) +frame_crc = ProtoField.uint16("rctserial.crc", "CRC", base.HEX) + +frame_value_hex = ProtoField.string("rctserial.value_hex", "Value (hexdump)") +frame_value_string = ProtoField.string("rctserial.value_string", "Value (string)") +frame_value_int = ProtoField.int32("rctserial.value_int", "Value (uint)") +frame_value_uint = ProtoField.uint32("rctserial.value_uint", "Value (uint)") +frame_value_float = ProtoField.float("rctserial.value_float", "Value (float)") +frame_value_enum = ProtoField.uint8("rctserial.value_float", "Value (enum)") + +rctserial_protocol.fields = { + frame_command, frame_length, frame_oid, frame_crc, frame_value_hex, frame_value_float, frame_value_int, + frame_value_uint, frame_value_enum +} + +-- Expert fields add additional data and status information +ef_checksum = ProtoExpert.new('rctclient.checksum.invalid', 'Checksum is not valid', expert.group.CHECKSUM, expert.severity.ERROR) +ef_command_unknown = ProtoExpert.new('rctclient.command.unknown', 'Unknown command', expert.group.MALFORMED, expert.severity.ERROR) +ef_command_extension = ProtoExpert.new('rctclient.command.extension', 'Extension command', expert.group.UNDECODED, expert.severity.WARN) +ef_oid_unknown = ProtoExpert.new('rctclient.oid.unknown', 'Unknown OID', expert.group.UNDECODED, expert.severity.WARN) +ef_parse_error_unknown = ProtoExpert.new('rctclient.parse_error', 'Parse error', expert.group.MALFORMED, expert.severity.ERROR) + +rctserial_protocol.experts = { + ef_checksum, ef_command_unknown, ef_command_extension, ef_oid_unknown, ef_parse_error_unknown +} + +function rctserial_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = rctserial_protocol.name + + local start = 0 + f = Frame:new() + + while start < buffer:len() do + if f == nil then f = Frame:new() end + + print('Start: ' .. start .. '/' .. buffer:len()) + local ok, consumed, msg = f:parse(buffer:bytes(start)) + print('Frame: ' .. tostring(ok) .. ' plen: ' .. consumed .. ' msg: ' .. msg) + print('pos_command: ' .. f.pos_command .. ' pos_oid: ' .. f.pos_oid) + + if ok then + if f.complete then + local command_name = get_command_name(buffer(start + f.pos_command, 1):le_int()) + local oid_name = 'UNKNOWN' + if OID[f.id] ~= nil then + oid_name = OID[f.id].name + end + + local subtree = tree:add(rctserial_protocol, buffer(start, consumed), string.format('RCTSerial Frame (%s %s)', command_name, oid_name)) + -- command + subtree:add_le(frame_command, buffer(start + f.pos_command, 1)):append_text(" (" .. command_name .. ")") + -- length + subtree:add_le(frame_length, buffer(start + f.pos_length, f.length_length)) + -- address TODO + -- OID + local f_oid = subtree:add(frame_oid, buffer(start + f.pos_oid, 4)):append_text(" (" .. oid_name .. ")") + if oid_name == 'UNKNOWN' then + f_oid:add_proto_expert_info(ef_oid_unknown, 'OID not known, check for updates') + end + + -- Value + if f.cmd == 0x05 or f.cmd == 0x06 then + if OID[f.id] ~= nil then + dtype = OID[f.id].type + if dtype == 'FLOAT' then + subtree:add(frame_value_float, buffer(start + f.pos_data, f.length_data)) + elseif dtype == 'INT8' or dtype == 'INT16' or dtype == 'INT32' then + subtree:add(frame_value_int, buffer(start + f.pos_data, f.length_data)) + elseif dtype == 'UINT8' or dtype == 'UINT16' or dtype == 'UINT32' then + subtree:add(frame_value_uint, buffer(start + f.pos_data, f.length_data)) + elseif dtype == 'ENUM' then + subtree:add(frame_value_enum, buffer(start + f.pos_data, f.length_data)) + elseif dtype == 'STRING' then + subtree:add(frame_value_string, buffer(start + f.pos_data, f.length_data)) + end + else + subtree:add(frame_value_hex, buffer(start + f.pos_data, f.length_data)) + end + end + -- CRC + local f_csum = subtree:add(frame_crc, buffer(start + f.pos_crc, 2)) + -- CRC function is still br0ken + --if not f.crc_ok then + -- f_csum:add_tvb_expert_info(ef_checksum, buffer(start + f.pos_crc, 2), 'Invalid, expected ' .. string.format('0x%x', f.crc16)) + --end + else + print('Frame does not end at segment, not sure what to do') + end + f = nil + else + if msg == 'Command unknown' then + local subtree = tree:add(rctserial_protocol, buffer(start, consumed), "RCTSerial Frame (unknown command)") + local f_cmd = subtree:add_le(frame_command, buffer(start + f.pos_command, 1)) + f_cmd:add_proto_expert_info(ef_command_unknown, 'Unknown command ' .. string.format('0x%x', string.byte(buffer:raw(start + f.pos_command, 1)))) + elseif msg == 'Extension' then + local subtree = tree:add(rctserial_protocol, buffer(start, consumed), "RCTSerial Frame (Extension)") + local f_cmd = subtree:add_le(frame_command, buffer(start + f.pos_command, 1)) + f_cmd:add_proto_expert_info(ef_command_extension, 'Extension command, cannot decode') + else + local subtree = tree:add(rctserial_protocol, buffer(start, consumed), "RCTSerial Frame (Unknown error)") + subtree:add_proto_expert_info(ef_parse_error_unknown, msg) + end + f = nil + end + start = start + consumed + end +end + + +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(8899, rctserial_protocol) diff --git a/dissectors/rctserial/rctutils.lua b/dissectors/rctserial/rctutils.lua new file mode 100644 index 0000000..21fae40 --- /dev/null +++ b/dissectors/rctserial/rctutils.lua @@ -0,0 +1,124 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/svalouch/wireshark-rctserial-dissector (rctutils.lua), +-- commit bfe325206ac308aee62c9d9883f696c13cbba2b9 du 25/06/2022. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- +-- Utility functions for rctserial.lua +-- +-- Copyright 2021-2022 Stefan Valouch (svalouch) +-- SPDX-License-Identifier: GPL-3.0-only +-- + +function CRC16(data) + -- data: string + print('crc input: ' .. hex_dump(data)) + local crcsum = 0xFFFF + local polynom = 0x1021 -- CCITT Polynom + + if (data:len() % 2 == 1) then + data = data .. '\0' + end + + for i = 1, #data do + local byte = data:byte(i) + crcsum = crcsum ^ byte + for j = 1, 8 do + crcsum = bit.lshift(crcsum, 1) + local k = bit.band(crcsum, 0x7FFF0000) + if k ~= 0 then + crcsum = bit.band(crcsum, 0x0000FFFF) ^ polynom + end + end + end + return crcsum +end + + +-- function CRC16_new(byte_array) +-- local POLY = 0x1021 +-- +-- local function hash(crc, byte) +-- for i = 0, 7 do +-- local lsb = bit32.extract(byte, 7 - i) -- Take the lsb +-- local msb = bit32.extract(crc, 15, 1) -- msb +-- crc = crc << 1 -- Remove the lsb of crc +-- if lsb ^ msb == 1 then crc = crc ^ POLY end +-- end +-- return crc +-- end +-- +-- local crc = 0xffff +-- for i in ipairs(byte_array) do +-- crc = hash(crc, byte_array[i]) +-- end +-- +-- return bit32.extract(crc, 0, 16) +-- end + +function get_command_name(command) + if command == 0x01 then name = 'READ' + elseif command == 0x02 then name = 'WRITE' + elseif command == 0x03 then name = 'LONG WRITE' + elseif command == 0x05 then name = 'RESPONSE' + elseif command == 0x06 then name = 'LONG RESPONSE' + elseif command == 0x08 then name = 'READ PERIODICALLY' + elseif command == 0x41 then name = 'PLANT READ' + elseif command == 0x3c then name = 'EXTENSION' + else name = 'Unknown' + end + return name +end + +function cmd_known(cmd) + if cmd == 0x01 then return true + elseif cmd == 0x02 then return true + elseif cmd == 0x03 then return true + elseif cmd == 0x03 then return true + elseif cmd == 0x05 then return true + elseif cmd == 0x06 then return true + elseif cmd == 0x08 then return true + elseif cmd == 0x41 then return true + elseif cmd == 0x42 then return true + elseif cmd == 0x43 then return true + else return false + end +end +function cmd_is_plant(cmd) + if cmd == 0x41 then return true + elseif cmd == 0x42 then return true + elseif cmd == 0x43 then return true + else return false + end +end +function cmd_is_long(cmd) + if cmd == 0x03 then return true + elseif cmd == 0x06 then return true + elseif cmd == 0x43 then return true + else return false + end +end + +function hex_dump (str) + local len = string.len( str ) + local dump = "" + local hex = "" + local asc = "" + + for i = 1, len do + if 1 == i % 8 then + dump = dump .. hex .. asc .. "\n" + hex = string.format( "%04x: ", i - 1 ) + asc = "" + end + + local ord = string.byte( str, i ) + hex = hex .. string.format( "%02x ", ord ) + if ord >= 32 and ord <= 126 then + asc = asc .. string.char( ord ) + else + asc = asc .. "." + end + end + + return dump .. hex .. string.rep( " ", 8 - len % 8 ) .. asc +end diff --git a/dissectors/rf24network/LICENSE b/dissectors/rf24network/LICENSE new file mode 100644 index 0000000..23cb790 --- /dev/null +++ b/dissectors/rf24network/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. + + {description} + Copyright (C) {year} {fullname} + + 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. + +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) year 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. + + {signature of Ty Coon}, 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 Lesser General +Public License instead of this License. diff --git a/dissectors/rf24network/README.md b/dissectors/rf24network/README.md new file mode 100644 index 0000000..5d9f041 --- /dev/null +++ b/dissectors/rf24network/README.md @@ -0,0 +1,45 @@ +# RF24Network (radio nRF24L01+, passerelle RF24Gateway) + +Dissecteur Wireshark Lua des **messages RF24Network** relayés par la +passerelle Linux **RF24Gateway** entre des nœuds Arduino à modules radio +nRF24L01+ et le réseau IP : en-tête RF24Network (nœud maillé, nœuds +source et destination en octal, identifiant, type, taille de charge utile) +et lecture des premiers octets de la charge utile en entiers 16/32 bits. +Les messages sont vus sur UDP 32001 sur la machine qui fait tourner la +passerelle. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/nRF24/RF24Gateway (fichier `examples/addons/RF24Network.lua`) | +| Commit importé | `f81b281acad1cc840f7390faae95309d4edf36b3` du 30/10/2026 (branche par défaut, dernier commit ; dernière modification du dissecteur : `b3ddc43` du 31/03/2021) | +| Licence amont | GPL-2.0-only (`LICENSE` amont : texte de la GPL v2, sans mention « or any later version » ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur RF24Network natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `RF24Network.lua` | Dissecteur `rf24network` (UDP 32001), champs `rf24network.*` | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Sur la machine qui exécute RF24Gateway : copier `RF24Network.lua` dans le +dossier `plugins` de Wireshark (ex. `~/.local/lib/wireshark/plugins/`) ou +lancer `wireshark -X lua_script:RF24Network.lua`, puis appliquer le filtre +`!icmp` (consigne amont) ou `rf24network`. + +## Remarques + +- La ligne « Data(HEX) » utilise une variable `pSize` non définie (globale + `nil`) : l'intervalle couvre alors toute la fin du tampon ; laissé tel + quel (non vérifié dans Wireshark). +- Le décodage de la charge utile se limite aux 2 ou 4 premiers octets. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/rf24network/RF24Network.lua b/dissectors/rf24network/RF24Network.lua new file mode 100644 index 0000000..e4c3e81 --- /dev/null +++ b/dissectors/rf24network/RF24Network.lua @@ -0,0 +1,52 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/nRF24/RF24Gateway (examples/addons/RF24Network.lua), +-- commit f81b281acad1cc840f7390faae95309d4edf36b3 du 30/10/2026. +-- Licence amont : GPL-2.0-only (LICENSE amont) — voir README.md. +-- RF24Network LUA dissector for Wireshark +-- Usage: 1. Start wireshark on the host machine running RF24Gateway +-- 2. Use the command `wireshark -X lua_script:RF24Network.lua` +-- 3. In filters, add '!icmp' and apply +-- 4. RF24Network user payloads show as Protocol: RF24Net & header information is displayed + +rf24network_proto = Proto("rf24network", "RF24Network Protocol") + +rf24network_proto.fields.nodeID = ProtoField.uint8("rf24network.nodeID", "Mesh Node", base.DEC) +rf24network_proto.fields.from = ProtoField.uint16("rf24network.from", "Network from Node", base.OCT) +rf24network_proto.fields.to = ProtoField.uint16("rf24network.to", "Network to Node", base.OCT) +rf24network_proto.fields.hID = ProtoField.uint16("rf24network.hID", "Header ID", base.DEC) +rf24network_proto.fields.type = ProtoField.uint8("rf24network.type", "Header Type", base.DEC) +rf24network_proto.fields.reserved = ProtoField.uint8("rf24network.reserved", "Header Reserved", base.DEC) +rf24network_proto.fields.pSize = ProtoField.uint16("rf24network.payloadSize", "Payload Size", base.DEC) + +rf24network_proto.fields.uint16_t = ProtoField.uint32("rf24network.uint16", "16-bit unsigned:", base.DEC) +rf24network_proto.fields.int16_t = ProtoField.int32("rf24network.int16", "16-bit signed", base.DEC) +rf24network_proto.fields.uint32_t = ProtoField.uint32("rf24network.uint32", "32-bit unsigned", base.DEC) +rf24network_proto.fields.int32_t = ProtoField.uint32("rf24network.int32", "32-bit signed", base.DEC) + +function rf24network_proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "RF24Net" + local subtree = tree:add_le(rf24network_proto, buffer(), "RF24Network Header") + if (buffer:len() >= 11) then + subtree:add(rf24network_proto.fields.nodeID, buffer(0, 1)) + subtree:add_le(rf24network_proto.fields.from, buffer(1, 2)) + subtree:add_le(rf24network_proto.fields.to, buffer(3, 2)) + subtree:add_le(rf24network_proto.fields.hID, buffer(5, 2)) + subtree:add(rf24network_proto.fields.type, buffer(7, 1)) + subtree:add(rf24network_proto.fields.reserved, buffer(8, 1)) + subtree:add_le(rf24network_proto.fields.pSize, buffer(9, 2)) + end + subtree:add_le(buffer(11, pSize), "Data(HEX) " .. buffer(11, pSize)) + + local subtree = tree:add_le(rf24network_proto, buffer(), "Decode Payload (First Bytes Only)") + if buffer:len() >= 13 then + subtree:add_le(rf24network_proto.fields.uint16_t, buffer(11, 2)) + subtree:add_le(rf24network_proto.fields.int16_t, buffer(11, 2)) + end + if buffer:len() >= 15 then + subtree:add_le(rf24network_proto.fields.uint32_t, buffer(11, 4)) + subtree:add_le(rf24network_proto.fields.int32_t, buffer(11, 4)) + end +end + +udp_table = DissectorTable.get("udp.port") +udp_table:add(32001, rf24network_proto) diff --git a/dissectors/rfnoc-uhd/LICENSE.md b/dissectors/rfnoc-uhd/LICENSE.md new file mode 100644 index 0000000..8d2badd --- /dev/null +++ b/dissectors/rfnoc-uhd/LICENSE.md @@ -0,0 +1,642 @@ +# Ettus Research FPGA Repository: Licenses + +Please refer to the individual files to verify which license applies to them. + +UHD and MPM themselves, are, by default, licensed under the GPLv3. If you wish +to obtain an alternative license, please contact info@ettus.com. Some of UHD's +dependencies are shipped as part of the repository +(see https://github.com/EttusResearch/uhd/tree/master/host/lib/deps for details). + +The FPGA codebase (stored under fpga/) has its own +[licensing situation][fpga-license]. See the various subdirectories therein for +more details. + +Individual source files in this repository may have different licenses than +discussed above. Please refer to individual files and directories to verify +which license applies to which file. + +## GPLv3 License Text (applies to most of UHD and MPM) + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + +[fpga-license]: https://github.com/EttusResearch/uhd/blob/master/fpga/usrp3/LICENSE.md diff --git a/dissectors/rfnoc-uhd/README.md b/dissectors/rfnoc-uhd/README.md new file mode 100644 index 0000000..644b7f7 --- /dev/null +++ b/dissectors/rfnoc-uhd/README.md @@ -0,0 +1,82 @@ +# RFNoC / CHDR — radios logicielles USRP d'Ettus Research (UHD) + +Dissecteur Wireshark Lua officiel du protocole RFNoC (RF Network on +Chip) des radios logicielles USRP d'Ettus Research (groupe National +Instruments), fourni avec le pilote UHD. Il décode l'en-tête CHDR +(destination, longueur, séquence, métadonnées, type de paquet, fin de +vecteur et de rafale, canal virtuel) puis, selon le type, les paquets de +gestion (sauts et opérations), d'état et de commande de flux, de +transactions de contrôle (adresse, code d'opération, état, données) et +de données avec ou sans horodatage, sur UDP 49153 (issue #825). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/EttusResearch/uhd (`tools/dissectors/lua/rfnoc.lua`, `tools/dissectors/lua/color_rules.rfnoc`) | +| Commit importé | `d1be63490e3f3df22ff2f4ea1315f9aada468562` du 09/10/2026 (dernier commit de la branche par défaut `master`) ; dernière modification de `rfnoc.lua` : commit `3a1083452125080fabcb69d330f26892382d2cfe` du 20/07/2026 (« tools: Update RFNoC dissectors for 8-bit SeqNum ») ; de `color_rules.rfnoc` : commit `b584a7a923596b02d1413cc82cec5090080a45ef` du 20/06/2022 | +| Licence amont | GPL-3.0-or-later : en-tête des deux fichiers (« Copyright 2022 Ettus Research, a National Instruments Brand », « SPDX-License-Identifier: GPL-3.0-or-later ») ; `LICENSE.md` du dépôt (UHD sous GPLv3 par défaut, licence commerciale possible sur demande, texte de la GPLv3). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur RFNoC ni CHDR dans `tshark -G protocols` | + +Texte de la licence : fichier `LICENSE.md` de ce dossier (copie +conforme du `LICENSE.md` amont). Les fichiers sont repris tels quels +(aucune modification) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête de `rfnoc.lua` (convention du dépôt, issue #563). Le +dossier amont `tools/dissectors/epan/` contient aussi un dissecteur RFNoC +en C++, à compiler avec Wireshark : il n'est pas importé, ce dépôt ne +regroupant que des dissecteurs Lua. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/rfnoc.lua` | Port UDP 49153 (ligne 17) ; tables de valeurs (lignes 20 à 167) ; champs `rfnoc.*` (lignes 169 à 237) ; protocole `rfnoc` (« RFNoC Protocol », ligne 241) ; préférence de largeur CHDR 64 à 512 bits (ligne 304) ; dissecteur ligne 322 ; métadonnées (ligne 371) ; gestion (lignes 386 et 443), état et commande de flux (lignes 473 et 490), contrôle (ligne 508), données (lignes 577 et 587) ; inscription lignes 598 et 599 | +| `src/color_rules.rfnoc` | Règles de couleur par type de paquet (`rfnoc.PktType`), à importer par Affichage → Règles de coloration | + +## Utilisation + +Copier `src/rfnoc.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`). Le trafic du port UDP 49153 est +décodé. La largeur CHDR (64 bits par défaut) se règle dans les +préférences du protocole RFNoC. Filtres : `rfnoc`, `rfnoc.PktType`, +`rfnoc.DstEPID`, `rfnoc.SeqNum`, `rfnoc.ctrl.Address`, +`rfnoc.mgmt.OpCode`… + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : chargement sans erreur. Le +dépôt amont ne contient aucune capture. Essais sur une capture +synthétique (UDP 49153, CHDR 64 bits), non commitée ; les positions des +champs ont été comparées à `host/include/uhd/rfnoc/chdr_types.hpp` du +même commit : + +| Essai | Résultat | +|---|---| +| Données sans horodatage, 16 octets | « [Data] -> 2 », en-tête CHDR complet, charge utile de 16 octets | +| Données avec horodatage et fin de rafale | « [DaTS] -> 2 EOB time: 0x0000000123456789 » | +| Commande de flux « Initialize stream », 1000 octets | « [StrC] 7 -> 2 Initialize stream (packets: 0, bytes: 1000) » | +| État de flux, 5 paquets et 4096 octets transférés | « [StrS] 7 -> 2 Okay (No Error) (packets: 5, bytes: 4096) » | +| Gestion, 1 saut, « node info request » | « [Mgmt] 9 -> 2 node info request », version de protocole 1.0 | +| Contrôle « write » à l'adresse `0x1000`, port source 5, octet 2 de l'en-tête à `0x10` | Info « [Ctrl] 5 -> 2 write cafebabe -> 00001000 » ; arbre « num data: 0 », « src EPID: 16 », mais `Data[0]: 0xcafebabe` affiché (voir limites) | +| Données avec 1 mot de métadonnées | métadonnées affichées à partir de l'octet 16 au lieu de l'octet 8 ; charge utile tronquée de 8 octets (voir limites) | +| Paquet de 3 octets | **erreur Lua** ligne 330 (« Range is out of bounds ») | + +## Limites constatées + +- Paquets de contrôle : les champs de l'arbre suivent bien + `chdr_types.hpp` (NumData aux bits 10 à 13, SrcEPID aux bits 16 à 31), + mais le code lit le nombre de mots de données dans l'octet 2 + (ligne 535, bits 20 à 23, qui appartiennent à SrcEPID) et prend comme + source de la colonne Info les octets 4 et 5 (ligne 568 : port source + et numéro de séquence, et non SrcEPID). Les mots de données affichés + et la source de la colonne Info peuvent donc être faux. +- Métadonnées : `dissect_metadata` (lignes 371 à 384) compte deux fois + leur longueur ; la zone affichée comme métadonnées et le début de la + charge utile sont décalés dès qu'il y a des métadonnées. +- Pas de contrôle de longueur minimale : erreur Lua sur un paquet de + moins de 8 octets ; la longueur CHDR n'est pas comparée à la taille du + paquet. +- Port UDP 49153 fixe (ligne 17), sans préférence de port. +- Variables globales : tous les champs `pf_*`, `rfnoc_proto`, + `buf_length`, `dstEpid`, `info` et les fonctions `dissect_*`. diff --git a/dissectors/rfnoc-uhd/src/color_rules.rfnoc b/dissectors/rfnoc-uhd/src/color_rules.rfnoc new file mode 100644 index 0000000..6b99db0 --- /dev/null +++ b/dissectors/rfnoc-uhd/src/color_rules.rfnoc @@ -0,0 +1,13 @@ +# Copyright 2022 Ettus Research, a National Instruments Brand +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# These color rules ease orientation in RFNoC packet display. +# Import this file in Wireshark's Coloring Rules dialog +# (View -> Coloring Rules…) +@RFNoC Management@rfnoc.PktType == 0@[65535, 50372, 2313][0,0,0] +@RFNoC Stream Status@rfnoc.PktType == 1@[0,46774,30583][0,0,0] +@RFNoC Stream Command@rfnoc.PktType == 2@[1028,16705,8995][65535,65535,65535] +@RFNoC Control Transaction@rfnoc.PktType == 4@[25759,46003,59110][0,0,0] +@RFNoC Data Packet without a Timestamp@rfnoc.PktType == 6@[56283, 56283, 51400][32639,32639,32639] +@RFNoC Data Packet with a Timestamp@rfnoc.PktType == 7@[56283, 56283, 51400][0,0,0] diff --git a/dissectors/rfnoc-uhd/src/rfnoc.lua b/dissectors/rfnoc-uhd/src/rfnoc.lua new file mode 100644 index 0000000..e557d96 --- /dev/null +++ b/dissectors/rfnoc-uhd/src/rfnoc.lua @@ -0,0 +1,599 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/EttusResearch/uhd (tools/dissectors/lua/rfnoc.lua), +-- commit d1be63490e3f3df22ff2f4ea1315f9aada468562 du 09/10/2026 (dernière modification du fichier : +-- commit 3a1083452125080fabcb69d330f26892382d2cfe du 20/07/2026). +-- Licence amont : GPL-3.0-or-later (en-tête SPDX amont, LICENSE.md) — voir README.md et LICENSE.md. +-- Copyright 2022 Ettus Research, a National Instruments Brand +-- +-- SPDX-License-Identifier: GPL-3.0-or-later + +-- This file defines a LUA dissector for RFNoC. All chapter references refer to +-- https://files.ettus.com/app_notes/RFNoC_Specification.pdf. + +-- to install the dissector choose a global or personal LUA plugin folder +-- these folder can be found under Help -> About Wireshark -> Folders + +-- RFNoC UDP port +local RFNOC_PORT = 49153 + +-- general purpose lookup for boolean fields +local yesno = { + [0] = "no", + [1] = "yes" +} + +-- lookup table for CHDR with preferences +local chdr_widths = { + { 0, "64", 64 }, + { 1, "128", 128 }, + { 2, "256", 256 }, + { 3, "512", 512 } +} + +-- Packet type definitions for RFNoC (2.2.1) +local packet_types = { + [0x0] = "Management", + [0x1] = "Stream Status", + [0x2] = "Stream Command", + [0x3] = "", + [0x4] = "Control Transaction", + [0x5] = "", + [0x6] = "Data Packet without a Timestamp", + [0x7] = "Data Packet with a Timestamp" +} + +-- same packet type definitions as short names +local packet_types_short = { + [0x0] = "Mgmt", + [0x1] = "StrS", + [0x2] = "StrC", + [0x3] = "", + [0x4] = "Ctrl", + [0x5] = "", + [0x6] = "Data", + [0x7] = "DaTS" +} + +-- CHDR widths reported by management packet (table 15) +local mgmt_chdr_widths = { + [0x0] = "64 bits", + [0x1] = "128 bits", + [0x2] = "256 bits", + [0x3] = "512 bits", + [0x4] = "", + [0x5] = "", + [0x6] = "", + [0x7] = "" +} + +-- op codes for control transaction packet (table 9) +local ctrl_op_codes = { + [0] = "sleep", + [1] = "write", + [2] = "read", + [3] = "read then write", + [4] = "block write", + [5] = "block read", + [6] = "poll", + [7] = "", + [8] = "", + [9] = "", + [10] = "user 1", + [11] = "user 2", + [12] = "user 3", + [13] = "user 4", + [14] = "user 5", + [15] = "user 6" +} + +-- op codes for stream command packet (table 13) +local strc_op_codes = { + [0] = "Initialize stream", + [1] = "Ping", + [2] = "Resynchronize flow control", + [3] = "", + [4] = "", + [5] = "", + [6] = "", + [7] = "" +} + +-- op codes for management packet (table 15) +local mgmt_op_codes = { + [0] = "no-op", + [1] = "advertise", + [2] = "select destination", + [3] = "return to sender", + [4] = "node info request", + [5] = "node info response", + [6] = "config write", + [7] = "config read request", + [8] = "config read response" +} + +-- node types from management node info response (no ref) +local mgmt_op_nir_types = { + [0] = "", + [1] = "Crossbar", + [2] = "Stream Endpoint", + [3] = "Transport Adapter" +} + +-- fill remaining types +for i = 4, 255 do + mgmt_op_nir_types[i] = "" +end + +-- states of control status field (table 8) +local ctrl_states = { + [0] = "OK", + [1] = "CMDERR", + [2] = "TSERR", + [3] = "WARNING", +} + +-- states of stream status' status field (table 11) +local strs_states = { + [0] = "Okay (No Error)", + [1] = "Command Error (Command execution failed)", + [2] = "Sequence Error (Sequence number discontinuity)", + [3] = "Data Error (Data integrity check failed)", + [4] = "Routing Error (Unexpected destination)", + [5] = "", + [6] = "", + [7] = "" +} + +-- Protocol field definitions +-- Definitions are made for all fields of 32 bit or smaller. Larger fields +-- are handled directly, because the ProtoField does not support bitmasks +-- bigger than 32 bit. Therefore CHDR header fields are split into +-- 32 bit chunks (to make use of the bit-wise display of the ProtoField +-- which eases orientation in the detail pane). Also all CHDR header +-- fields are uint32 even if they would fit into a smaller field. +-- This eases orientation in the bit-wise display of the detail pane. +-- Because most stream packets fields are bigger than 32 bit there are no +-- ProtoField definitions with bit mask for the stream command/status +-- packets. +-- The naming convention for the ProtoFields follows the specification +-- names. All fields starts with rfnoc followed by a dot. CHDR header +-- fields have the format rfnoc.. Packet fields follow the +-- convention rfnoc... +-- The display name is a human readable form of the field name without +-- references to the packet name they are associated with. +-- The protocol field LUA names follow the naming scheme +-- pf__. CHDR fields use chdr instead of +-- the packet short name. The field name uses underscores as word separator. + +-- CHDR header fields +pf_chdr_dst_epid = ProtoField.uint32("rfnoc.DstEPID", "dest EPID", base.DEC, nil, 0x0000FFFF) +pf_chdr_length = ProtoField.uint32("rfnoc.Length", "length", base.DEC, nil, 0xFFFF0000) +pf_chdr_seq_num = ProtoField.uint32("rfnoc.SeqNum", "seq num", base.DEC, nil, 0x0000FFFF) +pf_chdr_num_mdata = ProtoField.uint32("rfnoc.NumMData", "num metadata", base.DEC, nil, 0x001F0000) +pf_chdr_pkt_type = ProtoField.uint32("rfnoc.PktType", "packet type", base.DEC, packet_types, 0x00E00000) +pf_chdr_end_of_vector = ProtoField.uint32("rfnoc.EOV", "end of vector", base.DEC, yesno, 0x01000000) +pf_chdr_end_of_burst = ProtoField.uint32("rfnoc.EOB", "end of burst", base.DEC, yesno, 0x02000000) +pf_chdr_virtual_channel = ProtoField.uint32("rfnoc.VC", "virtual channel", base.DEC, nil, 0xFC000000) + +pf_chdr_timestamp = ProtoField.uint64("rfnoc.Timestamp", "timestamp", base.HEX) +pf_chdr_metadata = ProtoField.bytes("rfnoc.Metadata", "metadata") +pf_chdr_payload = ProtoField.bytes("rfnoc.Payload", "payload") + +-- Management packet fields +pf_mgmt_src_epid = ProtoField.uint32("rfnoc.mgmt.SrcEPID", "src EPID", base.DEC, nil, 0x0000FFFF) +pf_mgmt_num_hops = ProtoField.uint32("rfnoc.mgmt.NumHops", "num hops", base.DEC, nil, 0x03FF0000) +-- reserved 0xFC000000 +-- reserved 0x00001FFF +pf_mgmt_chdr_width = ProtoField.uint32("rfnoc.mgmt.CHDRWidth", "CHDR width", base.DEC, mgmt_chdr_widths, 0x0000E000) +pf_mgmt_proto_ver = ProtoField.uint32("rfnoc.mgmt.ProtoVer", "protocol version", base.DEC, nil, 0xFFFF0000) +pf_mgmt_proto_major = ProtoField.uint32("rfnoc.mgmt.MajorVer", "major version", base.DEC, nil, 0xFF000000) +pf_mgmt_proto_minor = ProtoField.uint32("rfnoc.mgmt.MinorVer", "minor version", base.DEC, nil, 0x00FF0000) + +pf_mgmt_op_codes = ProtoField.uint8("rfnoc.mgmt.OpCode", "op code", base.DEC, mgmt_op_codes) +pf_mgmt_op_sd_dest = ProtoField.uint16("rfnoc.mgmt.sd.dest", "select dest", base.DEC) +pf_mgmt_op_nir_device_id = ProtoField.uint16("rfnoc.mgmt.nir.DeviceID", "device ID", base.DEC, nil) +pf_mgmt_op_nir_node_type = ProtoField.uint8("rfnoc.mgmt.nir.NodeType", "node type", base.DEC, mgmt_op_nir_types) +pf_mgmt_op_nir_node_inst = ProtoField.uint32("rfnoc.mgmt.nir.NodeInst", "node inst", base.DEC, nil) +pf_mgmt_op_nir_node_info = ProtoField.uint32("rfnoc.mgmt.nir.ExtendedInfo", "extended info", base.HEX, nil) +pf_mgmt_op_conf_address = ProtoField.uint16("rfnoc.mgmt.conf.Address", "address", base.HEX) +pf_mgmt_op_conf_data = ProtoField.uint32("rfnoc.mgmt.conf.Data", "data", base.HEX) + +-- Control packet fields +-- Word 0 +pf_ctrl_dst_port = ProtoField.uint32("rfnoc.ctrl.DstPort", "dst port", base.DEC, nil, 0x000003FF) +pf_ctrl_num_data = ProtoField.uint32("rfnoc.ctrl.NumData", "num data", base.DEC, nil, 0x00003C00) +pf_ctrl_has_timestamp = ProtoField.uint32("rfnoc.ctrl.HasTimestamp", "has time", base.DEC, yesno, 0x00004000) +pf_ctrl_is_ack = ProtoField.uint32("rfnoc.ctrl.IsACK", "is ACK", base.DEC, yesno, 0x00008000) +pf_ctrl_src_epid = ProtoField.uint32("rfnoc.ctrl.SrcEPID", "src EPID", base.DEC, nil, 0xFFFF0000) +-- Word 1 +pf_ctrl_src_port = ProtoField.uint32("rfnoc.ctrl.SrcPort", "src port", base.DEC, nil, 0x000003FF) +-- rem dst port (reserved in a CHDR control packet) 0x000FFC00 +pf_ctrl_ctrl_seq_num = ProtoField.uint32("rfnoc.ctrl.SeqNum", "ctrl seq num", base.DEC, nil, 0x0FF00000) +pf_ctrl_req_size = ProtoField.uint32("rfnoc.ctrl.ReqSize", "req size", base.DEC, nil, 0xF0000000) +pf_ctrl_timestamp = ProtoField.uint64("rfnoc.ctrl.Timestamp", "timestamp", base.HEX) +pf_ctrl_address = ProtoField.uint32("rfnoc.ctrl.Address", "address", base.HEX, nil, 0x000FFFFF) +pf_ctrl_byte_enable = ProtoField.uint32("rfnoc.ctrl.ByteEnable", "byte enable", base.HEX, nil, 0x00F00000) +pf_ctrl_op_code = ProtoField.uint32("rfnoc.ctrl.OpCode", "op code", base.DEC, ctrl_op_codes, 0x0F000000) +-- reserved 0x30000000 +pf_ctrl_status = ProtoField.uint32("rfnoc.ctrl.Status", "status", base.DEC, ctrl_states, 0xC0000000) + +pf_ctrl_data = ProtoField.bytes("rfnoc.ctrl.Data", "data") + +-- Stream Status fields +pf_strs_src_epid = ProtoField.uint16("rfnoc.strs.SrcEPID", "src EPID") +pf_strs_status = ProtoField.uint8("rfnoc.strs.Status", "status", base.DEC, strs_states) +pf_strs_capacity_bytes = ProtoField.uint64("rfnoc.strs.CapacityBytes", "capacity bytes") +pf_strs_capacity_packets = ProtoField.uint32("rfnoc.strs.CapacityPackets", "capacity packets") +pf_strs_xfer_count_packets = ProtoField.uint64("rfnoc.strs.XfcerCountPackets", "transferred packets") +pf_strs_xfer_count_bytes = ProtoField.uint64("rfnoc.strs.XferCountBytes", "transferred bytes") +pf_strs_buff_info = ProtoField.uint16("rfnoc.strs.BuffInfo", "buffer info") +pf_strs_status_info = ProtoField.uint64("rfnoc.strs.StatusInfo", "status info") + +-- Stream Command fields +pf_strc_src_epid = ProtoField.uint16("rfnoc.strc.SrcEPID", "src EPID") +pf_strc_op_code = ProtoField.uint8("rfnoc.strc.OpCode", "op code", base.DEC, strc_op_codes) +pf_strc_op_data = ProtoField.uint8("rfnoc.strc.OpData", "op data") +pf_strc_num_packets = ProtoField.uint64("rfnoc.strc.NumPkts", "num packets") +pf_strc_num_bytes = ProtoField.uint64("rfnoc.strc.NumBytes", "num bytes") + + +-- RFNoC protocol dissector +rfnoc_proto = Proto("RFNoC", "RFNoC Protocol") +rfnoc_proto.fields = { + pf_chdr_dst_epid, + pf_chdr_length, + pf_chdr_seq_num, + pf_chdr_num_mdata, + pf_chdr_pkt_type, + pf_chdr_end_of_vector, + pf_chdr_end_of_burst, + pf_chdr_virtual_channel, + + pf_chdr_timestamp, + pf_chdr_metadata, + pf_chdr_payload, + + pf_mgmt_src_epid, + pf_mgmt_num_hops, + pf_mgmt_chdr_width, + pf_mgmt_proto_ver, + pf_mgmt_proto_major, + pf_mgmt_proto_minor, + pf_mgmt_op_codes, + pf_mgmt_op_sd_dest, + pf_mgmt_op_nir_device_id, + pf_mgmt_op_nir_node_type, + pf_mgmt_op_nir_node_inst, + pf_mgmt_op_nir_node_info, + pf_mgmt_op_conf_address, + pf_mgmt_op_conf_data, + + pf_ctrl_dst_port, + pf_ctrl_src_port, + pf_ctrl_num_data, + pf_ctrl_ctrl_seq_num, + pf_ctrl_req_size, + pf_ctrl_has_timestamp, + pf_ctrl_is_ack, + pf_ctrl_src_epid, + pf_ctrl_timestamp, + pf_ctrl_address, + pf_ctrl_byte_enable, + pf_ctrl_op_code, + pf_ctrl_status, + + pf_ctrl_data, + + pf_strs_src_epid, + pf_strs_status, + pf_strs_capacity_bytes, + pf_strs_capacity_packets, + pf_strs_xfer_count_packets, + pf_strs_xfer_count_bytes, + pf_strs_buff_info, + pf_strs_status_info, + + pf_strc_src_epid, + pf_strc_op_code, + pf_strc_op_data, + pf_strc_num_packets, + pf_strc_num_bytes, +} + +-- define preferences +rfnoc_proto.prefs.chdr_width = Pref.enum( + "CHDR width", -- label + 64, -- default + "CHDR width used for decoding", -- description + chdr_widths, -- lookup + true -- use radio buttons in config +) + +-- main entry point for dissector +-- * decode the CHDR header +-- * dissect metadata +-- - metadata dissector return new dissector offset +-- * lookup decoder for packet type to decode packet-specific fields +-- - each packet decoder returns a tuple of src EPID (might be nil) +-- and additional info that will be placed along with the info +-- column in the main view +-- - the CHDR header is passed to the packet decoder, because +-- some decoders need references to CHDR fields. +function rfnoc_proto.dissector(buffer, pinfo, tree) + buf_length = buffer:len() + if buf_length == 0 then return end + + pinfo.cols.protocol = rfnoc_proto.name + pinfo.cols.info:clear() + + local subtree = tree:add(rfnoc_proto, buffer(), "RFNoC") + local chdr = subtree:add(rfnoc_proto, buffer(0, 8), "CHDR") + + chdr:add_le(pf_chdr_dst_epid, buffer(0, 4)) + chdr:add_le(pf_chdr_length, buffer(0, 4)) + chdr:add_le(pf_chdr_seq_num, buffer(4, 4)) + chdr:add_le(pf_chdr_num_mdata, buffer(4, 4)) + chdr:add_le(pf_chdr_pkt_type, buffer(4, 4)) + chdr:add_le(pf_chdr_end_of_vector, buffer(4, 4)) + chdr:add_le(pf_chdr_end_of_burst, buffer(4, 4)) + chdr:add_le(pf_chdr_virtual_channel, buffer(4, 4)) + + local packet_decoders = { + [0] = dissect_mgmt_packet, + [1] = dissect_stream_status_packet, + [2] = dissect_stream_command_packet, + [3] = dissect_reserved_packet, + [4] = dissect_ctrl_packet, + [5] = dissect_reserved_packet, + [6] = dissect_data_packet_without_ts, + [7] = dissect_data_packet_with_ts + } + + local packet_len = buffer(2, 2):le_uint() + local packet_type = buffer(6, 1):bitfield(0, 3) + local offset = dissect_metadata(buffer, packet_type, pinfo, subtree) + local src, info = packet_decoders[buffer(6, 1):bitfield(0, 3)]( + buffer(0, offset), + buffer(offset, packet_len - offset), + pinfo, subtree) + + local src_str = src == nil and " " or string.format("%3d", src) + pinfo.cols.info:append(string.format("[%s] %s -> %3d %s", + packet_types_short[packet_type], -- packet type + src_str, -- src EPID + buffer(0, 2):le_uint(), -- dst EPID + info -- packet specific info + )) +end + +-- see 2.2.1 for details about metadata memory layout depending +-- on CHDR width. +function dissect_metadata(buffer, packet_type, pinfo, subtree) + local mdata_len = buffer(6,1):bitfield(3, 5) + local chdr_width_in_bytes = rfnoc_proto.prefs.chdr_width / 8 + local packet_offset = 0 + if rfnoc_proto.prefs.chdr_width == 64 and packet_type == 7 then + packet_offset = chdr_width_in_bytes * (2 + mdata_len); + else + packet_offset = chdr_width_in_bytes * (1 + mdata_len); + end + if mdata_len > 0 then + subtree:add(pf_chdr_metadata, buffer(packet_offset, mdata_len * chdr_width_in_bytes)) + end + return packet_offset + mdata_len * chdr_width_in_bytes +end + +function dissect_mgmt_op(buffer, hop_node, op_index, op_code, op_payload) + local op_node = hop_node:add(rfnoc_proto, buffer(), "Operation " .. op_index) + local op_code = buffer(1, 1):le_uint() + local ext_info = bit.rshift(buffer(5, 3):le_uint(), 6) + local op_info = mgmt_op_codes[buffer(1, 1):le_uint()] + + op_node:add_le(pf_mgmt_op_codes, buffer(1, 1)) + if op_code == 2 then -- select destination + op_node:add(pf_mgmt_op_sd_dest, bit.band(buffer(2, 2):le_uint(), 0x3FF)) + op_info = op_info .. " " .. bit.band(buffer(2, 2):le_uint(), 0x3FF) + elseif op_code == 5 then -- node response info + local node_type = bit.band(buffer(4, 1):le_uint(), 0xF) + local node_inst = bit.rshift(bit.band(buffer(4, 2):le_uint(), 0x3FF0), 4) + op_node:add_le(pf_mgmt_op_nir_device_id, buffer(2, 2)) + op_node:add_le(pf_mgmt_op_nir_node_type, node_type) + op_node:add_le(pf_mgmt_op_nir_node_inst, node_inst) + local node_ext_info = op_node:add_le(pf_mgmt_op_nir_node_info, ext_info) + if node_type == 1 then -- crossbar + node_ext_info:set_text(string.format( + "NPORTS=%d, NPORTS_MGMT=%d, EXT_RTCFG_PORT=%d (0x%05X)", + bit.band(ext_info, 0xFF), + bit.band(bit.rshift(ext_info, 8), 0xFF), + bit.band(bit.rshift(ext_info, 16), 1), + ext_info + )) + elseif node_type == 2 then -- streaming endpoint + node_ext_info:set_text(string.format( + "AXIS_CTRL_EN=%d, AXIS_DATA_EN=%d, NUM_DATA_I=%d NUM_DATA_O=%d, REPORT_STREAM_ERRS=%d (0x%05X)", + bit.band(ext_info, 1), + bit.band(bit.rshift(ext_info, 1), 1), + bit.band(bit.rshift(ext_info, 2), 0x3F), + bit.band(bit.rshift(ext_info, 8), 0x3F), + bit.band(bit.rshift(ext_info, 14), 1), + ext_info + )) + elseif node_type == 3 then -- transport adapter + node_ext_info:set_text(string.format( + "NODE_SUBTYPE=%d (0x%05X)", + bit.band(ext_info, 0xFF), + ext_info + )) + else + node_ext_info:append_text(" ") + end + elseif op_code == 6 then -- config write + op_node:add_le(pf_mgmt_op_conf_address, buffer(2, 2)) + op_node:add_le(pf_mgmt_op_conf_data, buffer(4, 4)) + op_info = string.format("%s %x->%4.4x", op_info, buffer(4, 4):le_uint(), buffer(2, 2):le_uint()) + elseif op_code == 7 then -- config read request + op_node:add_le(pf_mgmt_op_conf_address, buffer(2, 2)) + elseif op_code == 8 then -- config read response + op_node:add_le(pf_mgmt_op_conf_address, buffer(2, 2)) + op_node:add_le(pf_mgmt_op_conf_data, buffer(4, 4)) + end + return op_info +end + +function dissect_mgmt_packet(header_buffer, buffer, pinfo, tree) + local header = tree:add(rfnoc_proto, buffer(), "Management") + header:add_le(pf_mgmt_src_epid, buffer(0, 4)) + header:add_le(pf_mgmt_num_hops, buffer(0, 4)) + header:add_le(pf_mgmt_chdr_width, buffer(4, 4)) + header:add_le(pf_mgmt_proto_ver, buffer(4, 4)) + header:add_le(pf_mgmt_proto_major, buffer(4, 4)) + header:add_le(pf_mgmt_proto_minor, buffer(4, 4)) + + local num_hops = bit.band(buffer(2, 4):le_uint(), 0x3FF) + local offset = 8 + local hop_info = "" + for hop = 0, num_hops - 1 do + local ops_pending = buffer(offset, 1):le_uint() + local hop_node = header:add(rfnoc_proto, buffer(offset, 8 * (ops_pending + 1)), "Hop " .. hop) + for op_nr = 0, ops_pending do + hop_info = hop_info .. dissect_mgmt_op(buffer(offset, 8), hop_node, op_nr, buffer(offset + 1, 1), buffer(offset + 2, 6)) + offset = offset + 8 + if ops_pending > 0 then + ops_pending = buffer(offset, 1):le_uint() + hop_info = hop_info .. ", " + end + end + if hop < num_hops - 1 then + hop_info = hop_info .. " | " + end + end + return buffer(0, 2):le_uint(), hop_info +end + +function dissect_stream_status_packet(header_buffer, buffer, pinfo, tree) + local header = tree:add(rfnoc_proto, buffer(), "Stream Status") + header:add_le(pf_strs_src_epid, buffer(0, 2)) + header:add_le(pf_strs_status, buffer(2, 1):bitfield(4, 4)) + header:add_le(pf_strs_capacity_bytes, buffer(3, 5)) + header:add_le(pf_strs_capacity_packets, buffer(8, 3)) + header:add_le(pf_strs_xfer_count_packets, buffer(11, 5)) + header:add_le(pf_strs_xfer_count_bytes, buffer(16, 8)) + header:add_le(pf_strs_buff_info, buffer(24, 2)) + header:add_le(pf_strs_status_info, buffer(26, 6)) + return buffer(0, 2):le_uint(), string.format("%s (packets: %s, bytes: %s)", + strs_states[buffer(2, 1):bitfield(4, 4)], -- stream status + tostring(UInt64(buffer(11, 4):le_uint(), buffer(15, 1):le_uint())), -- transferred packets + tostring(UInt64(buffer(16, 4):le_uint(), buffer(20, 4):le_uint())) -- transferred bytes + ) +end + +function dissect_stream_command_packet(header_buffer, buffer, pinfo, tree) + local header = tree:add(rfnoc_proto, buffer(), "Stream Command") + header:add_le(pf_strc_src_epid, buffer(0, 2)) + header:add_le(pf_strc_op_code, buffer(2, 1):bitfield(4, 4)) + header:add_le(pf_strc_op_data, buffer(2, 1):bitfield(0, 4)) + header:add_le(pf_strc_num_packets, buffer(3, 5)) + header:add_le(pf_strc_num_bytes, buffer(8, 8)) + return buffer(0, 2):le_uint(), string.format("%s (packets: %s, bytes: %s)", + strc_op_codes[buffer(2, 1):bitfield(4, 4)], -- op code + tostring(UInt64(buffer(3, 4):le_uint(), buffer(7, 1):le_uint())), -- packets + tostring(UInt64(buffer(8, 4):le_uint(), buffer(12, 4):le_uint())) -- bytes + ) +end + +function dissect_reserved_packet(header_buffer, buffer, pinfo, tree) + return nil, "" +end + +function dissect_ctrl_packet(header_buffer, buffer, pinfo, tree) + local header = tree:add(rfnoc_proto, buffer(), "Control") + header:add_le(pf_ctrl_dst_port, buffer(0,4)) + header:add_le(pf_ctrl_num_data, buffer(0,4)) + header:add_le(pf_ctrl_has_timestamp, buffer(0,4)) + header:add_le(pf_ctrl_is_ack, buffer(0,4)) + header:add_le(pf_ctrl_src_epid, buffer(0,4)) + header:add_le(pf_ctrl_src_port, buffer(4,4)) + header:add_le(pf_ctrl_ctrl_seq_num, buffer(4,4)) + header:add_le(pf_ctrl_req_size, buffer(4,4)) + local offset = 8 + local has_ts = buffer(1,1):bitfield(1) + local is_ack = buffer(1,1):bitfield(0) == 1 + local ack_info = "" + local time_info = "" + if is_ack then + ack_info = "ACK " + end + if has_ts == 1 then + header:add_le(pf_ctrl_timestamp, buffer(offset, 8)) + time_info = " @ 0x" .. tostring(buffer(offset, 8):le_uint64():tohex()) + offset = offset + 8 + end + header:add_le(pf_ctrl_address, buffer(offset, 4)) + header:add_le(pf_ctrl_byte_enable, buffer(offset, 4)) + header:add_le(pf_ctrl_op_code, buffer(offset, 4)) + header:add_le(pf_ctrl_status, buffer(offset, 4)) + local num_data_hdr = buffer(2, 1):bitfield(0, 4) + -- NumData is the number of data words actually present in the packet. Use + -- the buffer length as an upper bound to guard against malformed packets + -- where NumData is larger than the data actually present. For CHDR widths > + -- 64 bits this may include trailing padding words, but since num_data_hdr is + -- at most 15, the math.min below dominates for any valid or near-valid + -- packet. + local buffer_data_words = math.max(0, math.floor((buffer:len() - offset - 4) / 4)) + local actual_data_words = math.min(num_data_hdr, buffer_data_words) + local data_hex = "" + for i = 0, actual_data_words - 1 do + local item = header:add_le(pf_ctrl_data, buffer(offset + 4 + i * 4, 4)) + item:set_text(string.format("Data[%d]: 0x%s", i, + bit.tohex(buffer(offset + 4 + i * 4, 4):le_uint()))) + if i == 0 then + data_hex = bit.tohex(buffer(offset + 4 + i * 4, 4):le_uint()) + if actual_data_words > 1 then + data_hex = data_hex .. " ..." + end + end + end + -- Flag any bytes beyond the expected payload as unexpected. This can + -- indicate a malformed packet or an older firmware implementation that + -- sends extra data in read requests or write/sleep responses. + local expected_end = offset + 4 + actual_data_words * 4 + if buffer:len() > expected_end then + local extra_item = header:add(pf_ctrl_data, + buffer(expected_end, buffer:len() - expected_end)) + extra_item:set_text(string.format("Unexpected data (%d bytes)", + buffer:len() - expected_end)) + extra_item:add_expert_info(PI_PROTOCOL, PI_NOTE, + "Unexpected data beyond expected control payload") + end + return buffer(4, 2):le_uint(), string.format("%s%s %s -> %s%s", + ack_info, -- add ACK when is_ack is 1 + ctrl_op_codes[buffer(offset + 3):bitfield(4,4)], -- op code + data_hex, -- data + bit.tohex(bit.band(buffer(offset, 4):le_uint(), 0xFFFFF)), -- address + time_info -- timestamp if has_ts is 1 + ) +end + +function dissect_data_packet_without_ts(header_buffer, buffer, pinfo, tree) + tree:add(pf_chdr_payload, buffer) + local burst_info = "" + + if header_buffer(7, 1):bitfield(6) == 1 then + burst_info = burst_info .. "EOB " + end + return nil, burst_info +end + +function dissect_data_packet_with_ts(header_buffer, buffer, pinfo, tree) + tree:add_le(pf_chdr_timestamp, header_buffer(8, 8)) + dstEpid, info = dissect_data_packet_without_ts(header_buffer, buffer, pinfo, tree) + info = info .. string.format("time: 0x%.8x%.8x", + header_buffer(12, 4):le_uint(), + header_buffer(8, 4):le_uint() + ) + return nil, info +end + +-- register RFNoC dissector +local udp_port = DissectorTable.get("udp.port") +udp_port:add(RFNOC_PORT, rfnoc_proto) diff --git a/dissectors/rime-contiki/LICENSE b/dissectors/rime-contiki/LICENSE new file mode 100644 index 0000000..2dce424 --- /dev/null +++ b/dissectors/rime-contiki/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Guillermo Gastón + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/dissectors/rime-contiki/README.md b/dissectors/rime-contiki/README.md new file mode 100644 index 0000000..c5c8390 --- /dev/null +++ b/dissectors/rime-contiki/README.md @@ -0,0 +1,65 @@ +# Rime — pile de communication de Contiki (réseaux de capteurs 802.15.4) + +Dissecteurs Wireshark Lua de **Rime**, pile de communication légère du +système Contiki pour réseaux de capteurs sans fil IEEE 802.15.4 : en-tête +MAC 802.15.4 (champ de contrôle, séquence, PAN, adresses, CRC), en-tête +ContikiMAC éventuel (octet nul, longueur) et en-tête Rime (canal, type et +identifiant de paquet, adresses Rime source et destination), puis charge +utile. Un script par combinaison couche RDC × primitive Rime : RDC +**ContikiMAC** (`cmac`) ou **NullRDC** (`nullrdc`), primitives **abc** +(diffusion anonyme), **ibc** (diffusion identifiée), **uc** (unicast) et +**ruc** (unicast fiable). Chaque script remplace le dissecteur de +l'encapsulation `IEEE802_15_4`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/g-gaston/rime-dissector (dossier `lua-files/`) | +| Commit importé | `5c12ff74dca163a6b7db15aec29988f7f82d25a2` du 14/06/2014 (branche `master`, dernier commit ; dernière modification des scripts : `7757086` du 14/06/2014) | +| Licence amont | MIT (`LICENSE` amont, © 2014 Guillermo Gastón) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Rime natif (802.15.4 natif `wpan`) | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `rime-cmac-abc.lua` | ContikiMAC + diffusion anonyme | +| `rime-cmac-ibc.lua` | ContikiMAC + diffusion identifiée | +| `rime-cmac-uc.lua` | ContikiMAC + unicast | +| `rime-cmac-ruc.lua` | ContikiMAC + unicast fiable | +| `rime-nullrdc-abc.lua` | NullRDC + diffusion anonyme | +| `rime-nullrdc-ibc.lua` | NullRDC + diffusion identifiée | +| `rime-nullrdc-ruc.lua` | NullRDC + unicast fiable | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête. **Non importés** : +`rime-nullrdc-uc.lua`, qui contient une erreur de syntaxe amont +(parenthèse en trop ligne 100 : `…buffer(14,1):uint())`) et ne se charge +pas, et le script `wireshark-rime.bash` (copie avec `sudo` dans +`/usr/share/wireshark` et modification du `init.lua` système). + +## Utilisation + +Choisir **un seul** script selon la couche RDC et la primitive Rime de la +capture, puis lancer par exemple +`wireshark -X lua_script:rime-cmac-ruc.lua capture.pcap` (équivalent sans +`sudo` du script amont), et filtrer avec `rime`. + +## Remarques + +- **Effets de bord à connaître** : chaque script écrase la variable + globale `table` (bibliothèque standard Lua) par + `table = DissectorTable.get("wtap_encap")`, ce qui peut casser les + autres plugins Lua chargés qui utilisent `table.insert`, `table.concat`… + Il remplace aussi le dissecteur 802.15.4 natif (`wpan`) pour toute + l'encapsulation `IEEE802_15_4`. À charger seul, ponctuellement, via + `-X lua_script:`. +- Les huit scripts déclarent le même protocole `rime` : jamais deux à la + fois. +- Décodage figé (adresses courtes, sans sécurité 802.15.4) ; libellés + partiellement en espagnol (« Comando »). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/rime-contiki/rime-cmac-abc.lua b/dissectors/rime-contiki/rime-cmac-abc.lua new file mode 100644 index 0000000..f4a5d44 --- /dev/null +++ b/dissectors/rime-contiki/rime-cmac-abc.lua @@ -0,0 +1,114 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/g-gaston/rime-dissector (lua-files/rime-cmac-abc.lua), +-- commit 5c12ff74dca163a6b7db15aec29988f7f82d25a2 du 14/06/2014. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +print("loading ContikiMAC rime-abc dissector") + +rime_proto = Proto("rime","Contiki Rime") + +-- dissect +function rime_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "RIME" + + local mac_tree = tree:add(rime_proto, buffer(0, 9), "IEEE 802.15.4") + local fcf_tree = mac_tree:add(rime_proto, buffer(0, 2), "Frame Control Field 0x" .. tostring(buffer(1, 1))..tostring(buffer(0,1))) + local f_type = buffer(0,1):bitfield(5,3) + local security = "" + local frame_pen = "" + local ack = "" + local intra_pan = "" + local dst_add = buffer(1,1):bitfield(4,2) + local src_add = buffer(1,1):bitfield(0,2) + + if f_type == 1 then + f_type = "Data" + elseif f_type == 0 then + f_type = "Beacon" + elseif f_type == 2 then + f_type = "ACK" + elseif f_type == 3 then + f_type = "Comando" + else + f_type = "Reserved" + end + + if buffer(0,1):bitfield(4,1) == 1 then + security = "True" + else + security = "False" + end + + if buffer(0,1):bitfield(3,1) == 1 then + frame_pen = "True" + else + frame_pen = "False" + end + + if buffer(0,1):bitfield(2,1) == 1 then + ack = "True" + else + ack = "False" + end + + if buffer(0,1):bitfield(1,1) == 1 then + intra_pan = "True" + else + intra_pan = "False" + end + + if dst_add == 2 then + dst_add = "Short/16-bit" + elseif dst_add == 0 then + dst_add = "Address and PAN ID no present" + elseif dst_add == 3 then + dst_add = "Long/64-bit" + else + dst_add = "Reserved" + end + + if src_add == 2 then + src_add = "Short/16-bit" + elseif src_add == 0 then + src_add = "Address and PAN ID no present" + elseif src_add == 3 then + src_add = "Long/64-bit" + else + src_add = "Reserved" + end + + fcf_tree:add(buffer(0,1), "Frame Type: ", f_type) + fcf_tree:add(buffer(0,1), "Security Enabled: ", security) + fcf_tree:add(buffer(0,1), "Frame Pending: ", frame_pen) + fcf_tree:add(buffer(0,1), "Acknowledge Request: ", ack) + fcf_tree:add(buffer(0,1), "Intra-PAN: ", intra_pan) + + fcf_tree:add(buffer(1,1), "Destination Addressing Mode: ", dst_add) + fcf_tree:add(buffer(1,1), "Frame Version: ", buffer(1,1):bitfield(2,2)) + fcf_tree:add(buffer(1,1), "Source Addressing Mode: ", src_add) + + mac_tree:add(buffer(2,1), "Sequence Number: " .. buffer(2,1):uint()) + mac_tree:add(buffer(3,2),"Destination PAN: 0x" .. tostring(buffer(4,1))..tostring(buffer(3,1))) + mac_tree:add(buffer(5,2),"Destination: 0x" .. tostring(buffer(6,1))..tostring(buffer(5,1))) + mac_tree:add(buffer(7,2),"Source: 0x" .. tostring(buffer(8,1))..tostring(buffer(7,1))) + mac_tree:add(buffer(buffer:len()-2, 2), "CRC: ", buffer(buffer:len()-2, 2):uint()) + + local cmac_tree = tree:add(rime_proto, buffer(9, 2), "Contiki MAC") + cmac_tree:add(buffer(9,1), "Zero byte: " .. buffer(9,1)) + cmac_tree:add(buffer(9,2), "Packet length: " .. buffer(9,2):uint()) + + local rime_tree = tree:add(rime_proto, buffer(11, 4), "RIME") + rime_tree:add(buffer(11,2), "Channel: " .. buffer(11,2):le_uint()) + + local data_tree = tree:add(rime_proto, buffer(13, buffer:len() - 15), "Payload") + + pinfo.cols.info = "Rime abc on channel " .. buffer(11,2):le_uint() + pinfo.cols.src = "Unknown" + pinfo.cols.dst = "Broadcast" +end + +-- get wiretap table +table = DissectorTable.get("wtap_encap") +-- and add rime protocol +table:add(wtap["IEEE802_15_4"], rime_proto) + + diff --git a/dissectors/rime-contiki/rime-cmac-ibc.lua b/dissectors/rime-contiki/rime-cmac-ibc.lua new file mode 100644 index 0000000..f1d53a6 --- /dev/null +++ b/dissectors/rime-contiki/rime-cmac-ibc.lua @@ -0,0 +1,115 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/g-gaston/rime-dissector (lua-files/rime-cmac-ibc.lua), +-- commit 5c12ff74dca163a6b7db15aec29988f7f82d25a2 du 14/06/2014. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +print("loading ContikiMAC rime-ibc dissector") + +rime_proto = Proto("rime","Contiki Rime") + +-- dissect +function rime_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "RIME" + + local mac_tree = tree:add(rime_proto, buffer(0, 9), "IEEE 802.15.4") + local fcf_tree = mac_tree:add(rime_proto, buffer(0, 2), "Frame Control Field 0x" .. tostring(buffer(1, 1))..tostring(buffer(0,1))) + local f_type = buffer(0,1):bitfield(5,3) + local security = "" + local frame_pen = "" + local ack = "" + local intra_pan = "" + local dst_add = buffer(1,1):bitfield(4,2) + local src_add = buffer(1,1):bitfield(0,2) + + if f_type == 1 then + f_type = "Data" + elseif f_type == 0 then + f_type = "Beacon" + elseif f_type == 2 then + f_type = "ACK" + elseif f_type == 3 then + f_type = "Comando" + else + f_type = "Reserved" + end + + if buffer(0,1):bitfield(4,1) == 1 then + security = "True" + else + security = "False" + end + + if buffer(0,1):bitfield(3,1) == 1 then + frame_pen = "True" + else + frame_pen = "False" + end + + if buffer(0,1):bitfield(2,1) == 1 then + ack = "True" + else + ack = "False" + end + + if buffer(0,1):bitfield(1,1) == 1 then + intra_pan = "True" + else + intra_pan = "False" + end + + if dst_add == 2 then + dst_add = "Short/16-bit" + elseif dst_add == 0 then + dst_add = "Address and PAN ID no present" + elseif dst_add == 3 then + dst_add = "Long/64-bit" + else + dst_add = "Reserved" + end + + if src_add == 2 then + src_add = "Short/16-bit" + elseif src_add == 0 then + src_add = "Address and PAN ID no present" + elseif src_add == 3 then + src_add = "Long/64-bit" + else + src_add = "Reserved" + end + + fcf_tree:add(buffer(0,1), "Frame Type: ", f_type) + fcf_tree:add(buffer(0,1), "Security Enabled: ", security) + fcf_tree:add(buffer(0,1), "Frame Pending: ", frame_pen) + fcf_tree:add(buffer(0,1), "Acknowledge Request: ", ack) + fcf_tree:add(buffer(0,1), "Intra-PAN: ", intra_pan) + + fcf_tree:add(buffer(1,1), "Destination Addressing Mode: ", dst_add) + fcf_tree:add(buffer(1,1), "Frame Version: ", buffer(1,1):bitfield(2,2)) + fcf_tree:add(buffer(1,1), "Source Addressing Mode: ", src_add) + + mac_tree:add(buffer(2,1), "Sequence Number: " .. buffer(2,1):uint()) + mac_tree:add(buffer(3,2),"Destination PAN: 0x" .. tostring(buffer(4,1))..tostring(buffer(3,1))) + mac_tree:add(buffer(5,2),"Destination: 0x" .. tostring(buffer(6,1))..tostring(buffer(5,1))) + mac_tree:add(buffer(7,2),"Source: 0x" .. tostring(buffer(8,1))..tostring(buffer(7,1))) + mac_tree:add(buffer(buffer:len()-2, 2), "CRC: ", buffer(buffer:len()-2, 2):uint()) + + local cmac_tree = tree:add(rime_proto, buffer(9, 2), "Contiki MAC") + cmac_tree:add(buffer(9,1), "Zero byte: " .. buffer(9,1)) + cmac_tree:add(buffer(9,2), "Packet length: " .. buffer(9,2):uint()) + + local rime_tree = tree:add(rime_proto, buffer(11, 4), "RIME") + rime_tree:add(buffer(11,2), "Channel: " .. buffer(11,2):le_uint()) + rime_tree:add(buffer(13,2),"Source Address: " .. buffer(13,1):uint() .. ":" .. buffer(14,1):uint()) + + local data_tree = tree:add(rime_proto, buffer(15, buffer:len() - 17), "Payload") + + pinfo.cols.info = "Rime ibc on channel " .. buffer(11,2):le_uint() + pinfo.cols.src = "" .. buffer(13,1):uint() .. ":" .. buffer(14,1):uint() + pinfo.cols.dst = "Broadcast" +end + +-- get wiretap table +table = DissectorTable.get("wtap_encap") +-- and add rime protocol +table:add(wtap["IEEE802_15_4"], rime_proto) + + diff --git a/dissectors/rime-contiki/rime-cmac-ruc.lua b/dissectors/rime-contiki/rime-cmac-ruc.lua new file mode 100644 index 0000000..1779c87 --- /dev/null +++ b/dissectors/rime-contiki/rime-cmac-ruc.lua @@ -0,0 +1,118 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/g-gaston/rime-dissector (lua-files/rime-cmac-ruc.lua), +-- commit 5c12ff74dca163a6b7db15aec29988f7f82d25a2 du 14/06/2014. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +print("loading ContikiMAC rime-ruc dissector") + +rime_proto = Proto("rime","Contiki Rime") + +-- dissect +function rime_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "RIME" + + local mac_tree = tree:add(rime_proto, buffer(0, 9), "IEEE 802.15.4") + local fcf_tree = mac_tree:add(rime_proto, buffer(0, 2), "Frame Control Field 0x" .. tostring(buffer(1, 1))..tostring(buffer(0,1))) + local f_type = buffer(0,1):bitfield(5,3) + local security = "" + local frame_pen = "" + local ack = "" + local intra_pan = "" + local dst_add = buffer(1,1):bitfield(4,2) + local src_add = buffer(1,1):bitfield(0,2) + + if f_type == 1 then + f_type = "Data" + elseif f_type == 0 then + f_type = "Beacon" + elseif f_type == 2 then + f_type = "ACK" + elseif f_type == 3 then + f_type = "Comando" + else + f_type = "Reserved" + end + + if buffer(0,1):bitfield(4,1) == 1 then + security = "True" + else + security = "False" + end + + if buffer(0,1):bitfield(3,1) == 1 then + frame_pen = "True" + else + frame_pen = "False" + end + + if buffer(0,1):bitfield(2,1) == 1 then + ack = "True" + else + ack = "False" + end + + if buffer(0,1):bitfield(1,1) == 1 then + intra_pan = "True" + else + intra_pan = "False" + end + + if dst_add == 2 then + dst_add = "Short/16-bit" + elseif dst_add == 0 then + dst_add = "Address and PAN ID no present" + elseif dst_add == 3 then + dst_add = "Long/64-bit" + else + dst_add = "Reserved" + end + + if src_add == 2 then + src_add = "Short/16-bit" + elseif src_add == 0 then + src_add = "Address and PAN ID no present" + elseif src_add == 3 then + src_add = "Long/64-bit" + else + src_add = "Reserved" + end + + fcf_tree:add(buffer(0,1), "Frame Type: ", f_type) + fcf_tree:add(buffer(0,1), "Security Enabled: ", security) + fcf_tree:add(buffer(0,1), "Frame Pending: ", frame_pen) + fcf_tree:add(buffer(0,1), "Acknowledge Request: ", ack) + fcf_tree:add(buffer(0,1), "Intra-PAN: ", intra_pan) + + fcf_tree:add(buffer(1,1), "Destination Addressing Mode: ", dst_add) + fcf_tree:add(buffer(1,1), "Frame Version: ", buffer(1,1):bitfield(2,2)) + fcf_tree:add(buffer(1,1), "Source Addressing Mode: ", src_add) + + mac_tree:add(buffer(2,1), "Sequence Number: " .. buffer(2,1):uint()) + mac_tree:add(buffer(3,2),"Destination PAN: 0x" .. tostring(buffer(4,1))..tostring(buffer(3,1))) + mac_tree:add(buffer(5,2),"Destination: 0x" .. tostring(buffer(6,1))..tostring(buffer(5,1))) + mac_tree:add(buffer(7,2),"Source: 0x" .. tostring(buffer(8,1))..tostring(buffer(7,1))) + mac_tree:add(buffer(buffer:len()-2, 2), "CRC: ", buffer(buffer:len()-2, 2):uint()) + + local cmac_tree = tree:add(rime_proto, buffer(9, 2), "Contiki MAC") + cmac_tree:add(buffer(9,1), "Zero byte: " .. buffer(9,1)) + cmac_tree:add(buffer(9,2), "Packet length: " .. buffer(9,2):uint()) + + local rime_tree = tree:add(rime_proto, buffer(11, 7), "RIME") + rime_tree:add(buffer(11,2), "Channel: " .. buffer(11,2):le_uint()) + rime_tree:add(buffer(13,1), "Packet type: " .. buffer(13,1):bitfield(0,1)) + rime_tree:add(buffer(13,1), "Packet ID: " .. buffer(13,1):bitfield(1,2)) + rime_tree:add(buffer(13,3),"Destination Address: " .. buffer(13,2):bitfield(3,8) .. ":" .. buffer(14,2):bitfield(3,8)) + rime_tree:add(buffer(15,3),"Source Address: " .. buffer(15,2):bitfield(3,8) .. ":" .. buffer(16,2):bitfield(3,8)) + + local data_tree = tree:add(rime_proto, buffer(18, buffer:len() - 20), "Payload") + + pinfo.cols.info = "Rime ruc on channel " .. buffer(11,2):le_uint() + pinfo.cols.src = "" .. buffer(15,2):bitfield(3,8) .. ":" .. buffer(16,2):bitfield(3,8) + pinfo.cols.dst = "" .. buffer(13,2):bitfield(3,8) .. ":" .. buffer(14,2):bitfield(3,8) +end + +-- get wiretap table +table = DissectorTable.get("wtap_encap") +-- and add rime protocol +table:add(wtap["IEEE802_15_4"], rime_proto) + + diff --git a/dissectors/rime-contiki/rime-cmac-uc.lua b/dissectors/rime-contiki/rime-cmac-uc.lua new file mode 100644 index 0000000..b8613f7 --- /dev/null +++ b/dissectors/rime-contiki/rime-cmac-uc.lua @@ -0,0 +1,116 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/g-gaston/rime-dissector (lua-files/rime-cmac-uc.lua), +-- commit 5c12ff74dca163a6b7db15aec29988f7f82d25a2 du 14/06/2014. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +print("loading ContikiMAC rime-uc dissector") + +rime_proto = Proto("rime","Contiki Rime") + +-- dissect +function rime_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "RIME" + + local mac_tree = tree:add(rime_proto, buffer(0, 9), "IEEE 802.15.4") + local fcf_tree = mac_tree:add(rime_proto, buffer(0, 2), "Frame Control Field 0x" .. tostring(buffer(1, 1))..tostring(buffer(0,1))) + local f_type = buffer(0,1):bitfield(5,3) + local security = "" + local frame_pen = "" + local ack = "" + local intra_pan = "" + local dst_add = buffer(1,1):bitfield(4,2) + local src_add = buffer(1,1):bitfield(0,2) + + if f_type == 1 then + f_type = "Data" + elseif f_type == 0 then + f_type = "Beacon" + elseif f_type == 2 then + f_type = "ACK" + elseif f_type == 3 then + f_type = "Comando" + else + f_type = "Reserved" + end + + if buffer(0,1):bitfield(4,1) == 1 then + security = "True" + else + security = "False" + end + + if buffer(0,1):bitfield(3,1) == 1 then + frame_pen = "True" + else + frame_pen = "False" + end + + if buffer(0,1):bitfield(2,1) == 1 then + ack = "True" + else + ack = "False" + end + + if buffer(0,1):bitfield(1,1) == 1 then + intra_pan = "True" + else + intra_pan = "False" + end + + if dst_add == 2 then + dst_add = "Short/16-bit" + elseif dst_add == 0 then + dst_add = "Address and PAN ID no present" + elseif dst_add == 3 then + dst_add = "Long/64-bit" + else + dst_add = "Reserved" + end + + if src_add == 2 then + src_add = "Short/16-bit" + elseif src_add == 0 then + src_add = "Address and PAN ID no present" + elseif src_add == 3 then + src_add = "Long/64-bit" + else + src_add = "Reserved" + end + + fcf_tree:add(buffer(0,1), "Frame Type: ", f_type) + fcf_tree:add(buffer(0,1), "Security Enabled: ", security) + fcf_tree:add(buffer(0,1), "Frame Pending: ", frame_pen) + fcf_tree:add(buffer(0,1), "Acknowledge Request: ", ack) + fcf_tree:add(buffer(0,1), "Intra-PAN: ", intra_pan) + + fcf_tree:add(buffer(1,1), "Destination Addressing Mode: ", dst_add) + fcf_tree:add(buffer(1,1), "Frame Version: ", buffer(1,1):bitfield(2,2)) + fcf_tree:add(buffer(1,1), "Source Addressing Mode: ", src_add) + + mac_tree:add(buffer(2,1), "Sequence Number: " .. buffer(2,1):uint()) + mac_tree:add(buffer(3,2),"Destination PAN: 0x" .. tostring(buffer(4,1))..tostring(buffer(3,1))) + mac_tree:add(buffer(5,2),"Destination: 0x" .. tostring(buffer(6,1))..tostring(buffer(5,1))) + mac_tree:add(buffer(7,2),"Source: 0x" .. tostring(buffer(8,1))..tostring(buffer(7,1))) + mac_tree:add(buffer(buffer:len()-2, 2), "CRC: ", buffer(buffer:len()-2, 2):uint()) + + local cmac_tree = tree:add(rime_proto, buffer(9, 2), "Contiki MAC") + cmac_tree:add(buffer(9,1), "Zero byte: " .. buffer(9,1)) + cmac_tree:add(buffer(9,2), "Packet length: " .. buffer(9,2):uint()) + + local rime_tree = tree:add(rime_proto, buffer(11, 6), "RIME") + rime_tree:add(buffer(11,2), "Channel: " .. buffer(11,2):le_uint()) + rime_tree:add(buffer(15,2),"Destination Address: " .. buffer(13,1):uint() .. ":" .. buffer(14,1):uint()) + rime_tree:add(buffer(13,2),"Source Address: " .. buffer(15,1):uint() .. ":" .. buffer(16,1):uint()) + + local data_tree = tree:add(rime_proto, buffer(17, buffer:len() - 19), "Payload") + + pinfo.cols.info = "Rime uc on channel " .. buffer(11,2):le_uint() + pinfo.cols.src = "" .. buffer(15,1):uint() .. ":" .. buffer(16,1):uint() + pinfo.cols.dst = "" .. buffer(13,1):uint() .. ":" .. buffer(14,1):uint() +end + +-- get wiretap table +table = DissectorTable.get("wtap_encap") +-- and add rime protocol +table:add(wtap["IEEE802_15_4"], rime_proto) + + diff --git a/dissectors/rime-contiki/rime-nullrdc-abc.lua b/dissectors/rime-contiki/rime-nullrdc-abc.lua new file mode 100644 index 0000000..4e1e946 --- /dev/null +++ b/dissectors/rime-contiki/rime-nullrdc-abc.lua @@ -0,0 +1,110 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/g-gaston/rime-dissector (lua-files/rime-nullrdc-abc.lua), +-- commit 5c12ff74dca163a6b7db15aec29988f7f82d25a2 du 14/06/2014. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +print("loading NullRDC rime-abc dissector") + +rime_proto = Proto("rime","Contiki Rime") + +-- dissect +function rime_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "RIME" + + local mac_tree = tree:add(rime_proto, buffer(0, 9), "IEEE 802.15.4") + local fcf_tree = mac_tree:add(rime_proto, buffer(0, 2), "Frame Control Field 0x" .. tostring(buffer(1, 1))..tostring(buffer(0,1))) + local f_type = buffer(0,1):bitfield(5,3) + local security = "" + local frame_pen = "" + local ack = "" + local intra_pan = "" + local dst_add = buffer(1,1):bitfield(4,2) + local src_add = buffer(1,1):bitfield(0,2) + + if f_type == 1 then + f_type = "Data" + elseif f_type == 0 then + f_type = "Beacon" + elseif f_type == 2 then + f_type = "ACK" + elseif f_type == 3 then + f_type = "Comando" + else + f_type = "Reserved" + end + + if buffer(0,1):bitfield(4,1) == 1 then + security = "True" + else + security = "False" + end + + if buffer(0,1):bitfield(3,1) == 1 then + frame_pen = "True" + else + frame_pen = "False" + end + + if buffer(0,1):bitfield(2,1) == 1 then + ack = "True" + else + ack = "False" + end + + if buffer(0,1):bitfield(1,1) == 1 then + intra_pan = "True" + else + intra_pan = "False" + end + + if dst_add == 2 then + dst_add = "Short/16-bit" + elseif dst_add == 0 then + dst_add = "Address and PAN ID no present" + elseif dst_add == 3 then + dst_add = "Long/64-bit" + else + dst_add = "Reserved" + end + + if src_add == 2 then + src_add = "Short/16-bit" + elseif src_add == 0 then + src_add = "Address and PAN ID no present" + elseif src_add == 3 then + src_add = "Long/64-bit" + else + src_add = "Reserved" + end + + fcf_tree:add(buffer(0,1), "Frame Type: ", f_type) + fcf_tree:add(buffer(0,1), "Security Enabled: ", security) + fcf_tree:add(buffer(0,1), "Frame Pending: ", frame_pen) + fcf_tree:add(buffer(0,1), "Acknowledge Request: ", ack) + fcf_tree:add(buffer(0,1), "Intra-PAN: ", intra_pan) + + fcf_tree:add(buffer(1,1), "Destination Addressing Mode: ", dst_add) + fcf_tree:add(buffer(1,1), "Frame Version: ", buffer(1,1):bitfield(2,2)) + fcf_tree:add(buffer(1,1), "Source Addressing Mode: ", src_add) + + mac_tree:add(buffer(2,1), "Sequence Number: " .. buffer(2,1):uint()) + mac_tree:add(buffer(3,2),"Destination PAN: 0x" .. tostring(buffer(4,1))..tostring(buffer(3,1))) + mac_tree:add(buffer(5,2),"Destination: 0x" .. tostring(buffer(6,1))..tostring(buffer(5,1))) + mac_tree:add(buffer(7,2),"Source: 0x" .. tostring(buffer(8,1))..tostring(buffer(7,1))) + mac_tree:add(buffer(buffer:len()-2, 2), "CRC: ", buffer(buffer:len()-2, 2):uint()) + + local rime_tree = tree:add(rime_proto, buffer(9, 4), "RIME") + rime_tree:add(buffer(9,2), "Channel: " .. buffer(9,2):le_uint()) + + local data_tree = tree:add(rime_proto, buffer(11, buffer:len() - 13), "Payload") + + pinfo.cols.info = "Rime abc on channel " .. buffer(9,2):le_uint() + pinfo.cols.src = "Unknown" + pinfo.cols.dst = "Broadcast" +end + +-- get wiretap table +table = DissectorTable.get("wtap_encap") +-- and add rime protocol +table:add(wtap["IEEE802_15_4"], rime_proto) + + diff --git a/dissectors/rime-contiki/rime-nullrdc-ibc.lua b/dissectors/rime-contiki/rime-nullrdc-ibc.lua new file mode 100644 index 0000000..fbcf3b8 --- /dev/null +++ b/dissectors/rime-contiki/rime-nullrdc-ibc.lua @@ -0,0 +1,111 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/g-gaston/rime-dissector (lua-files/rime-nullrdc-ibc.lua), +-- commit 5c12ff74dca163a6b7db15aec29988f7f82d25a2 du 14/06/2014. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +print("loading NullRDC rime-ibc dissector") + +rime_proto = Proto("rime","Contiki Rime") + +-- dissect +function rime_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "RIME" + + local mac_tree = tree:add(rime_proto, buffer(0, 9), "IEEE 802.15.4") + local fcf_tree = mac_tree:add(rime_proto, buffer(0, 2), "Frame Control Field 0x" .. tostring(buffer(1, 1))..tostring(buffer(0,1))) + local f_type = buffer(0,1):bitfield(5,3) + local security = "" + local frame_pen = "" + local ack = "" + local intra_pan = "" + local dst_add = buffer(1,1):bitfield(4,2) + local src_add = buffer(1,1):bitfield(0,2) + + if f_type == 1 then + f_type = "Data" + elseif f_type == 0 then + f_type = "Beacon" + elseif f_type == 2 then + f_type = "ACK" + elseif f_type == 3 then + f_type = "Comando" + else + f_type = "Reserved" + end + + if buffer(0,1):bitfield(4,1) == 1 then + security = "True" + else + security = "False" + end + + if buffer(0,1):bitfield(3,1) == 1 then + frame_pen = "True" + else + frame_pen = "False" + end + + if buffer(0,1):bitfield(2,1) == 1 then + ack = "True" + else + ack = "False" + end + + if buffer(0,1):bitfield(1,1) == 1 then + intra_pan = "True" + else + intra_pan = "False" + end + + if dst_add == 2 then + dst_add = "Short/16-bit" + elseif dst_add == 0 then + dst_add = "Address and PAN ID no present" + elseif dst_add == 3 then + dst_add = "Long/64-bit" + else + dst_add = "Reserved" + end + + if src_add == 2 then + src_add = "Short/16-bit" + elseif src_add == 0 then + src_add = "Address and PAN ID no present" + elseif src_add == 3 then + src_add = "Long/64-bit" + else + src_add = "Reserved" + end + + fcf_tree:add(buffer(0,1), "Frame Type: ", f_type) + fcf_tree:add(buffer(0,1), "Security Enabled: ", security) + fcf_tree:add(buffer(0,1), "Frame Pending: ", frame_pen) + fcf_tree:add(buffer(0,1), "Acknowledge Request: ", ack) + fcf_tree:add(buffer(0,1), "Intra-PAN: ", intra_pan) + + fcf_tree:add(buffer(1,1), "Destination Addressing Mode: ", dst_add) + fcf_tree:add(buffer(1,1), "Frame Version: ", buffer(1,1):bitfield(2,2)) + fcf_tree:add(buffer(1,1), "Source Addressing Mode: ", src_add) + + mac_tree:add(buffer(2,1), "Sequence Number: " .. buffer(2,1):uint()) + mac_tree:add(buffer(3,2),"Destination PAN: 0x" .. tostring(buffer(4,1))..tostring(buffer(3,1))) + mac_tree:add(buffer(5,2),"Destination: 0x" .. tostring(buffer(6,1))..tostring(buffer(5,1))) + mac_tree:add(buffer(7,2),"Source: 0x" .. tostring(buffer(8,1))..tostring(buffer(7,1))) + mac_tree:add(buffer(buffer:len()-2, 2), "CRC: ", buffer(buffer:len()-2, 2):uint()) + + local rime_tree = tree:add(rime_proto, buffer(9, 4), "RIME") + rime_tree:add(buffer(9,2), "Channel: " .. buffer(9,2):le_uint()) + rime_tree:add(buffer(11,2),"Source Address: " .. buffer(11,1):uint() .. ":" .. buffer(12,1):uint()) + + local data_tree = tree:add(rime_proto, buffer(13, buffer:len() - 15), "Payload") + + pinfo.cols.info = "Rime ibc on channel " .. buffer(9,2):le_uint() + pinfo.cols.src = "" .. buffer(11,1):uint() .. ":" .. buffer(12,1):uint() + pinfo.cols.dst = "Broadcast" +end + +-- get wiretap table +table = DissectorTable.get("wtap_encap") +-- and add rime protocol +table:add(wtap["IEEE802_15_4"], rime_proto) + + diff --git a/dissectors/rime-contiki/rime-nullrdc-ruc.lua b/dissectors/rime-contiki/rime-nullrdc-ruc.lua new file mode 100644 index 0000000..a603774 --- /dev/null +++ b/dissectors/rime-contiki/rime-nullrdc-ruc.lua @@ -0,0 +1,114 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/g-gaston/rime-dissector (lua-files/rime-nullrdc-ruc.lua), +-- commit 5c12ff74dca163a6b7db15aec29988f7f82d25a2 du 14/06/2014. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +print("loading NullRDC rime-ruc dissector") + +rime_proto = Proto("rime","Contiki Rime") + +-- dissect +function rime_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "RIME" + + local mac_tree = tree:add(rime_proto, buffer(0, 9), "IEEE 802.15.4") + local fcf_tree = mac_tree:add(rime_proto, buffer(0, 2), "Frame Control Field 0x" .. tostring(buffer(1, 1))..tostring(buffer(0,1))) + local f_type = buffer(0,1):bitfield(5,3) + local security = "" + local frame_pen = "" + local ack = "" + local intra_pan = "" + local dst_add = buffer(1,1):bitfield(4,2) + local src_add = buffer(1,1):bitfield(0,2) + + if f_type == 1 then + f_type = "Data" + elseif f_type == 0 then + f_type = "Beacon" + elseif f_type == 2 then + f_type = "ACK" + elseif f_type == 3 then + f_type = "Comando" + else + f_type = "Reserved" + end + + if buffer(0,1):bitfield(4,1) == 1 then + security = "True" + else + security = "False" + end + + if buffer(0,1):bitfield(3,1) == 1 then + frame_pen = "True" + else + frame_pen = "False" + end + + if buffer(0,1):bitfield(2,1) == 1 then + ack = "True" + else + ack = "False" + end + + if buffer(0,1):bitfield(1,1) == 1 then + intra_pan = "True" + else + intra_pan = "False" + end + + if dst_add == 2 then + dst_add = "Short/16-bit" + elseif dst_add == 0 then + dst_add = "Address and PAN ID no present" + elseif dst_add == 3 then + dst_add = "Long/64-bit" + else + dst_add = "Reserved" + end + + if src_add == 2 then + src_add = "Short/16-bit" + elseif src_add == 0 then + src_add = "Address and PAN ID no present" + elseif src_add == 3 then + src_add = "Long/64-bit" + else + src_add = "Reserved" + end + + fcf_tree:add(buffer(0,1), "Frame Type: ", f_type) + fcf_tree:add(buffer(0,1), "Security Enabled: ", security) + fcf_tree:add(buffer(0,1), "Frame Pending: ", frame_pen) + fcf_tree:add(buffer(0,1), "Acknowledge Request: ", ack) + fcf_tree:add(buffer(0,1), "Intra-PAN: ", intra_pan) + + fcf_tree:add(buffer(1,1), "Destination Addressing Mode: ", dst_add) + fcf_tree:add(buffer(1,1), "Frame Version: ", buffer(1,1):bitfield(2,2)) + fcf_tree:add(buffer(1,1), "Source Addressing Mode: ", src_add) + + mac_tree:add(buffer(2,1), "Sequence Number: " .. buffer(2,1):uint()) + mac_tree:add(buffer(3,2),"Destination PAN: 0x" .. tostring(buffer(4,1))..tostring(buffer(3,1))) + mac_tree:add(buffer(5,2),"Destination: 0x" .. tostring(buffer(6,1))..tostring(buffer(5,1))) + mac_tree:add(buffer(7,2),"Source: 0x" .. tostring(buffer(8,1))..tostring(buffer(7,1))) + mac_tree:add(buffer(buffer:len()-2, 2), "CRC: ", buffer(buffer:len()-2, 2):uint()) + + local rime_tree = tree:add(rime_proto, buffer(9, 7), "RIME") + rime_tree:add(buffer(9,2), "Channel: " .. buffer(9,2):le_uint()) + rime_tree:add(buffer(11,1), "Packet type: " .. buffer(11,1):bitfield(0,1)) + rime_tree:add(buffer(11,1), "Packet ID: " .. buffer(11,1):bitfield(1,2)) + rime_tree:add(buffer(11,3),"Destination Address: " .. buffer(11,2):bitfield(3,8) .. ":" .. buffer(12,2):bitfield(3,8)) + rime_tree:add(buffer(13,3),"Source Address: " .. buffer(13,2):bitfield(3,8) .. ":" .. buffer(14,2):bitfield(3,8)) + + local data_tree = tree:add(rime_proto, buffer(16, buffer:len() - 18), "Payload") + + pinfo.cols.info = "Rime ruc on channel " .. buffer(9,2):le_uint() + pinfo.cols.src = "" .. buffer(13,2):bitfield(3,8) .. ":" .. buffer(14,2):bitfield(3,8) + pinfo.cols.dst = "" .. buffer(11,2):bitfield(3,8) .. ":" .. buffer(12,2):bitfield(3,8) +end + +-- get wiretap table +table = DissectorTable.get("wtap_encap") +-- and add rime protocol +table:add(wtap["IEEE802_13_4"], rime_proto) + + diff --git a/dissectors/rodos-network-messages/LICENSE b/dissectors/rodos-network-messages/LICENSE new file mode 100644 index 0000000..c5361ca --- /dev/null +++ b/dissectors/rodos-network-messages/LICENSE @@ -0,0 +1,36 @@ + +Copyright + DLR [2007 .. 2010] + University Würzburg [2010 .. 2020] + contact: sergio.montenegro@uni-wuerzburg.de + TU München [2020 .. 2020] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +§3 +Grant of Patent License. +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, +have made, use, offer to sell, sell, import, and otherwise transfer the Work, +where such license applies only to those patent claims licensable by such +Contributor that are necessarily infringed by their Contribution(s) +alone or by combination of their Contribution(s) with the Work to which +such Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Work or a Contribution incorporated within the Work constitutes +direct or contributory patent infringement, then any patent licenses granted to +You under this License for that Work shall terminate as of the date such +litigation is filed. + diff --git a/dissectors/rodos-network-messages/README.md b/dissectors/rodos-network-messages/README.md new file mode 100644 index 0000000..3822c42 --- /dev/null +++ b/dissectors/rodos-network-messages/README.md @@ -0,0 +1,71 @@ +# RODOS — messages réseau du middleware (fantana21/rodos) + +Dissecteur Wireshark Lua des messages réseau du middleware de RODOS +(Real time Onboard Dependable Operating System), système d'exploitation +temps réel embarqué conçu au DLR et à l'université de Wurtzbourg pour les +satellites et autres systèmes à haute fiabilité. Son middleware +publication-abonnement relie les nœuds par des passerelles ; sur UDP, +chaque message porte un en-tête `NetworkMessage` de 36 octets, que le +script décode : nœud et masque des nœuds destinataires, nombre maximal +de relais, somme de contrôle, type et longueur, nœud émetteur, heure +d'envoi, fil émetteur et identifiant du sujet (issue #822). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/fantana21/rodos (`support/tools/wireshark-dissector-network-messages.lua`) | +| Commit importé | `81072d9244e29aff24b7dd751f93a7989e0efbdf` du 14/04/2026 (dernier commit de la branche par défaut `master`) ; dernière modification du script : commit `ee10bc32f889d8e0f148c66bc12b3496cf526e17` du 02/04/2024 (« Add Python Middleware ») | +| Licence amont | Apache-2.0 : `LICENCE.txt` à la racine du dépôt (« Copyright DLR [2007 .. 2010], University Würzburg [2010 .. 2020], TU München [2020 .. 2020] », avis « Licensed under the Apache License, Version 2.0 » et rappel de la clause 3 sur les brevets) ; aucune mention dans le script, qui relève donc de la licence du dépôt. GitHub affiche « NOASSERTION » car le fichier ne reprend pas le texte complet. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur RODOS dans `tshark -G protocols` | + +`LICENSE` de ce dossier est la copie conforme de `LICENCE.txt` amont +(avis et extrait) ; le texte intégral de l'Apache License 2.0 est +publié sur https://www.apache.org/licenses/LICENSE-2.0. Le script est +repris tel quel (aucune modification de code) ; seule l'en-tête de +provenance de cinq lignes est ajoutée en tête (convention du dépôt, +issue #563). Son en-tête amont le présente comme un outil de débogage +inachevé de Sebastian Kind (20/03/2024). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/wireshark-dissector-network-messages.lua` | Protocole `rodos` (« Rodos Protocol », ligne 14) ; champs `rodos.*` (lignes 17 à 26, liste ligne 29) ; dissecteur ligne 32 ; port UDP 50000 (ligne 54) | + +## Utilisation + +Copier le script dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`), ou le charger par +`wireshark -X lua_script:…` comme l'indique son en-tête. Le trafic du +port UDP 50000 est décodé. Filtres : `rodos`, `rodos.topic_id`, +`rodos.sender_node`, `rodos.message_type`… + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : chargement sans erreur. Le +dépôt amont ne contient aucune capture. Les champs ont été comparés à la +classe `NetworkMessage` de `api/netmsginfo.h` amont (en-tête de 36 +octets, gros-boutiste) : positions, tailles et ordre des octets +concordent. Essais sur une capture synthétique (UDP 50000), non +commitée : + +| Essai | Résultat | +|---|---| +| En-tête complet et 8 octets de données (nœud −1, masque `0xffffffff`, relais 10, somme `0x1234`, type 1, longueur 8, émetteur 3, heure 123456789000, fil `0x11223344`, sujet 1003) | colonne Protocole « RODOS », toutes les valeurs décodées à l'identique ; filtre `rodos.topic_id==1003` : 1 paquet | +| Paquet de 5 octets | ignoré (« UDP »), sans erreur | + +## Limites constatées + +- Les données utiles qui suivent l'en-tête ne sont ni affichées ni + confiées au dissecteur `data` ; la longueur annoncée n'est pas + comparée à la taille du paquet. +- Somme de contrôle affichée sans vérification ; valeurs en décimal + (masque des nœuds, somme et identifiants seraient plus lisibles en + hexadécimal) ; heure d'envoi brute, sans conversion. +- Port UDP 50000 fixe (ligne 54), sans préférence ni heuristique ; tout + trafic de 36 octets ou plus sur ce port est décodé comme RODOS. +- Variables globales : `rodos_protocol`, les dix champs (`checksum`, + `topic_id`…), `length` et `udp_table` (qui reçoit en fait le résultat + de `add`, `nil`). diff --git a/dissectors/rodos-network-messages/src/wireshark-dissector-network-messages.lua b/dissectors/rodos-network-messages/src/wireshark-dissector-network-messages.lua new file mode 100644 index 0000000..a547bc9 --- /dev/null +++ b/dissectors/rodos-network-messages/src/wireshark-dissector-network-messages.lua @@ -0,0 +1,54 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/fantana21/rodos (support/tools/wireshark-dissector-network-messages.lua), +-- commit 81072d9244e29aff24b7dd751f93a7989e0efbdf du 14/04/2026 (dernière modification du fichier : +-- commit ee10bc32f889d8e0f148c66bc12b3496cf526e17 du 02/04/2024). +-- Licence amont : Apache-2.0 (LICENCE.txt amont) — voir README.md et LICENSE. +-- Decoder for rodos NetwerkMessages sent over UDP +-- this is a yet unfinished debugging tool from Sebastian Kind, he is still working on it +-- 20.03.2024 +-- usage: +-- sudo wireshark -X lua_script:'/path/to/this/script' +-- now you can filter by RODOS and see networkmessages within UDP packets + +-- Define the Rodos protocol +rodos_protocol = Proto("Rodos", "Rodos Protocol") + +-- Define the fields +receiver_node = ProtoField.int32("rodos.receiver_node", "Receiver Node") +receiver_nodes_bitmap = ProtoField.uint32("rodos.receiver_nodes_bitmap", "Receiver Nodes Bitmap") +max_steps_to_forward = ProtoField.int16("rodos.max_steps_to_forward", "Max Steps to Forward") +checksum = ProtoField.uint16("rodos.checksum", "Checksum") +message_type = ProtoField.uint16("rodos.message_type", "Message Type") +message_length = ProtoField.uint16("rodos.message_length", "Message Length") +sender_node = ProtoField.int32("rodos.sender_node", "Sender Node") +sent_time = ProtoField.int64("rodos.sent_time", "Sent Time") +sender_thread_id = ProtoField.uint32("rodos.sender_thread_id", "Sender Thread ID") +topic_id = ProtoField.uint32("rodos.topic_id", "Topic ID") + +-- Add the fields to the protocol +rodos_protocol.fields = { receiver_node, receiver_nodes_bitmap, max_steps_to_forward, checksum, message_type, message_length, sender_node, sent_time, sender_thread_id, topic_id } + +-- Define the dissector function +function rodos_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length < 36 then return end -- Minimum length check + + pinfo.cols.protocol = rodos_protocol.name + + local subtree = tree:add(rodos_protocol, buffer(), "Rodos Protocol Data") + + -- Add fields to the subtree + subtree:add(receiver_node, buffer(0, 4)) + subtree:add(receiver_nodes_bitmap, buffer(4, 4)) + subtree:add(max_steps_to_forward, buffer(8, 2)) + subtree:add(checksum, buffer(10, 2)) + subtree:add(message_type, buffer(12, 2)) + subtree:add(message_length, buffer(14, 2)) + subtree:add(sender_node, buffer(16, 4)) + subtree:add(sent_time, buffer(20, 8)) + subtree:add(sender_thread_id, buffer(28, 4)) + subtree:add(topic_id, buffer(32, 4)) +end + +-- Register the dissector +udp_table = DissectorTable.get("udp.port"):add(50000, rodos_protocol) diff --git a/dissectors/rovecomm-mrdt/LICENSE b/dissectors/rovecomm-mrdt/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/rovecomm-mrdt/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/rovecomm-mrdt/README.md b/dissectors/rovecomm-mrdt/README.md new file mode 100644 index 0000000..93deea4 --- /dev/null +++ b/dissectors/rovecomm-mrdt/README.md @@ -0,0 +1,86 @@ +# RoveComm — protocole des rovers de la Mars Rover Design Team (MRDT) + +Dissecteur Wireshark Lua du protocole RoveComm de la Mars Rover Design +Team (Missouri S&T), utilisé entre les cartes électroniques de ses rovers +martiens de compétition et le poste de commande. Il décode l'en-tête de +6 octets (version, `dataId`, `dataCount`, `dataType`), nomme le message +d'après le manifeste RoveComm (139 messages de commande, télémétrie et +erreur, plus 6 paquets système), décode les valeurs selon le type +(entiers 8 à 32 bits, flottants, caractères) et signale les écarts avec +le manifeste par des alertes expertes (issue #780). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/MissouriMRDT/RoveCommWiresharkDissector (`rovecomm.lua`) | +| Commit importé | `5c8994242e7d3be2125cfd3eba8ae7853b6eacb8` du 24/02/2026 (dernier commit de la branche par défaut, « Update RoveComm manifest version ») ; c'est aussi la dernière modification de `rovecomm.lua` | +| Licence amont | GPL-3.0 (`LICENSE` amont, texte de la GNU GPL version 3) ; aucune mention dans le script ni dans le README, sans clause « ou toute version ultérieure », d'où l'identifiant SPDX `GPL-3.0-only`. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur RoveComm dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +`rovecomm.lua` est le fichier **généré** et commité par l'amont : le +script `compile.py` y écrit des tables tirées du manifeste +`RoveComm_Base/manifest.json` (sous-module +[MissouriMRDT/RoveComm_Base](https://github.com/MissouriMRDT/RoveComm_Base), +commit `654f00f18827e021ce83411c4d591bd35c07e8ba` au commit importé), +puis y recopie `source.lua`. Seul le fichier généré, directement +utilisable, est importé ; `compile.py` et `source.lua` ne le sont pas. +Pour suivre une autre version du manifeste, il faut régénérer le fichier +avec l'outil amont. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/rovecomm.lua` | Tables générées (lignes 6 à 742 : noms et tailles des types, paquets système, adresses IP, noms, types, nombres et commentaires de chaque `dataId`) ; protocole `rovecomm` (« Mars Rover Design Team RoveComm », ligne 759) ; champs `rove.*` (lignes 761 à 773) ; alertes expertes (lignes 774 à 810) ; dissecteur ligne 812 ; ports TCP 12000 (ligne 865) et UDP 11000 (ligne 868) | + +## Utilisation + +Copier `src/rovecomm.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`). Le trafic des ports UDP 11000 et +TCP 12000 est décodé. Filtres : `rovecomm`, `rove.data_id`, +`rove.data_count`, `rove.data_type`, et un champ par type de valeur +(`rove.FLOAT_T`, `rove.UINT8_T`…). + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : chargement sans erreur. Le +dépôt amont ne contient aucune capture. Essais sur des captures +synthétiques (version 3), non commitées : + +| Essai (UDP 11000) | Résultat | +|---|---| +| `dataId` 3000, 2 × `FLOAT_T` (0,5 ; −0,25) | « 3000 (Core.Commands.DriveLeftRight) », `FLOAT_T: 0.5`, `FLOAT_T: -0.25`, sans alerte | +| `dataId` 1, `dataCount` 0 | « 1 (PING) », `data: ` | +| `dataId` 9999 inconnu | « Unknown » et alerte « The encoded data_id does not exist in the manifest » | +| `dataType` 12 | « Unknown », erreur experte « The data_type does not exist in the manifest », données confiées au dissecteur `data` | +| `dataId` 3000 avec 1 × `UINT8_T` | valeur décodée, alertes d'écart de nombre (« (2) ») et de type (« (6 FLOAT_T) ») avec le manifeste | +| `dataCount` 3 pour 8 octets de flottants | **erreur Lua** ligne 842 (« Range is out of bounds ») après les deux premières valeurs : l'alerte de longueur n'est jamais atteinte | +| Paquet de 5 octets | **erreur Lua** ligne 827 (« Range is out of bounds ») | +| Filtres | `rovecomm` : 7 paquets ; `rove.data_id == 3000` : 4 ; `rove.FLOAT_T == 0.5` : 1 | + +| Essai (TCP 12000) | Résultat | +|---|---| +| Deux messages (DriveLeftRight puis PING) dans un même segment | un seul message décodé ; les 6 octets du PING sont ajoutés aux données du premier, avec l'alerte « The encoded data_count does not equal the actual length » | + +## Limites constatées + +- Le contrôle de longueur minimale (ligne 813) accepte 5 octets alors + que l'en-tête en fait 6 : erreur Lua sur un paquet de 5 octets. +- La boucle des valeurs (lignes 841 à 843) lit `dataCount` valeurs sans + vérifier la longueur : erreur Lua quand le paquet est tronqué, au lieu + de l'alerte prévue (ligne 844). +- En TCP, aucun découpage des messages ni réassemblage : seul le premier + message d'un segment est décodé. +- Les tailles de types sont générées sous forme de chaînes (`"4"`, + lignes 18 à 28) ; Lua les convertit à l'usage, sans effet constaté. +- Les tables reflètent le manifeste à la date du commit importé ; les + adresses IP (table `IPS`) sont générées mais pas utilisées. +- Variables globales : `rove_protocol`, `version_field`, + `data_id_field`, `data_count_field`, `data_type_field`, `data_field`. diff --git a/dissectors/rovecomm-mrdt/src/rovecomm.lua b/dissectors/rovecomm-mrdt/src/rovecomm.lua new file mode 100644 index 0000000..6e191d9 --- /dev/null +++ b/dissectors/rovecomm-mrdt/src/rovecomm.lua @@ -0,0 +1,868 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/MissouriMRDT/RoveCommWiresharkDissector (rovecomm.lua), +-- commit 5c8994242e7d3be2125cfd3eba8ae7853b6eacb8 du 24/02/2026 (dernière modification du fichier : +-- commit 5c8994242e7d3be2125cfd3eba8ae7853b6eacb8 du 24/02/2026). +-- Licence amont : GPL-3.0 (LICENSE amont) — voir README.md et LICENSE. +-- Start generated code +local DATA_TYPE_NAMES = { + [0] = "INT8_T", + "UINT8_T", + "INT16_T", + "UINT16_T", + "INT32_T", + "UINT32_T", + "FLOAT_T", + "DOUBLE_T", + "CHAR", +} +local DATA_TYPE_SIZES = { + [0] = "1", + "1", + "2", + "2", + "4", + "4", + "4", + "8", + "1", +} +local SYSTEM_PACKETS = { + [1] = "PING", + [2] = "PING_REPLY", + [3] = "SUBSCRIBE", + [4] = "UNSUBSCRIBE", + [5] = "INVALID_VERSION", + [6] = "NO_DATA", +} +local IPS = { + [3000] = "192.168.2.110", + [3001] = "192.168.2.110", + [3002] = "192.168.2.110", + [3003] = "192.168.2.110", + [3004] = "192.168.2.110", + [3005] = "192.168.2.110", + [3006] = "192.168.2.110", + [3007] = "192.168.2.110", + [3008] = "192.168.2.110", + [3009] = "192.168.2.110", + [3010] = "192.168.2.110", + [3011] = "192.168.2.110", + [3012] = "192.168.2.110", + [3013] = "192.168.2.110", + [3100] = "192.168.2.110", + [3101] = "192.168.2.110", + [3102] = "192.168.2.110", + [3103] = "192.168.2.110", + [3104] = "192.168.2.110", + [3105] = "192.168.2.110", + [3200] = "192.168.2.110", + [4000] = "192.168.2.102", + [4001] = "192.168.2.102", + [4002] = "192.168.2.102", + [4003] = "192.168.2.102", + [4004] = "192.168.2.102", + [4005] = "192.168.2.102", + [4100] = "192.168.2.102", + [4101] = "192.168.2.102", + [4200] = "192.168.2.102", + [4201] = "192.168.2.102", + [4202] = "192.168.2.102", + [4203] = "192.168.2.102", + [6100] = "192.168.2.104", + [6102] = "192.168.2.104", + [6103] = "192.168.2.104", + [6200] = "192.168.2.104", + [7000] = "192.168.100.101", + [7001] = "192.168.100.101", + [7002] = "192.168.100.101", + [7003] = "192.168.100.101", + [7100] = "192.168.100.101", + [8000] = "192.168.2.107", + [8001] = "192.168.2.107", + [8002] = "192.168.2.107", + [8003] = "192.168.2.107", + [8004] = "192.168.2.107", + [8005] = "192.168.2.107", + [8006] = "192.168.2.107", + [8007] = "192.168.2.107", + [8008] = "192.168.2.107", + [8009] = "192.168.2.107", + [8010] = "192.168.2.107", + [8011] = "192.168.2.107", + [8012] = "192.168.2.107", + [8013] = "192.168.2.107", + [8014] = "192.168.2.107", + [8015] = "192.168.2.107", + [8016] = "192.168.2.107", + [8100] = "192.168.2.107", + [8101] = "192.168.2.107", + [8102] = "192.168.2.107", + [8103] = "192.168.2.107", + [9000] = "192.168.2.108", + [9001] = "192.168.2.108", + [9002] = "192.168.2.108", + [9003] = "192.168.2.108", + [9004] = "192.168.2.108", + [9005] = "192.168.2.108", + [9006] = "192.168.2.108", + [9007] = "192.168.2.108", + [9100] = "192.168.2.108", + [9101] = "192.168.2.108", + [9102] = "192.168.2.108", + [9103] = "192.168.2.108", + [9104] = "192.168.2.108", + [9105] = "192.168.2.108", + [11000] = "192.168.3.100", + [11001] = "192.168.3.100", + [11002] = "192.168.3.100", + [11003] = "192.168.3.100", + [11004] = "192.168.3.100", + [11005] = "192.168.3.100", + [11006] = "192.168.3.100", + [11007] = "192.168.3.100", + [11008] = "192.168.3.100", + [11009] = "192.168.3.100", + [11010] = "192.168.3.100", + [11011] = "192.168.3.100", + [11100] = "192.168.3.100", + [11101] = "192.168.3.100", + [11103] = "192.168.3.100", + [12000] = "192.168.4.100", + [12001] = "192.168.4.100", + [12002] = "192.168.4.100", + [12003] = "192.168.4.100", + [12004] = "192.168.4.100", + [12005] = "192.168.4.100", + [12100] = "192.168.4.100", + [12101] = "192.168.4.100", + [12102] = "192.168.4.100", + [12103] = "192.168.4.100", + [13000] = "192.168.4.101", + [13001] = "192.168.4.101", + [13002] = "192.168.4.101", + [13003] = "192.168.4.101", + [13004] = "192.168.4.101", + [13005] = "192.168.4.101", + [13100] = "192.168.4.101", + [13101] = "192.168.4.101", + [13102] = "192.168.4.101", + [13103] = "192.168.4.101", + [14000] = "192.168.4.102", + [14001] = "192.168.4.102", + [14002] = "192.168.4.102", + [14003] = "192.168.4.102", + [14004] = "192.168.4.102", + [14005] = "192.168.4.102", + [14008] = "192.168.4.102", + [14009] = "192.168.4.102", + [14010] = "192.168.4.102", + [14100] = "192.168.4.102", + [14101] = "192.168.4.102", + [14102] = "192.168.4.102", + [14200] = "192.168.4.102", + [16000] = "192.168.3.105", + [16001] = "192.168.3.105", + [16002] = "192.168.3.105", + [16003] = "192.168.3.105", + [16004] = "192.168.3.105", + [16005] = "192.168.3.105", + [16100] = "192.168.3.105", + [16101] = "192.168.3.105", + [16102] = "192.168.3.105", + [16103] = "192.168.3.105", + [16104] = "192.168.3.105", + [16105] = "192.168.3.105", + [16106] = "192.168.3.105", + [99100] = "127.0.0.1", +} +local NAMES = { + [3000] = "Core.Commands.DriveLeftRight", + [3001] = "Core.Commands.DriveIndividual", + [3002] = "Core.Commands.WatchdogOverride", + [3003] = "Core.Commands.LeftGimbal", + [3004] = "Core.Commands.RightGimbal", + [3005] = "Core.Commands.BackGimbal", + [3006] = "Core.Commands.LEDRGB", + [3007] = "Core.Commands.BackImage", + [3008] = "Core.Commands.InternalRGB", + [3009] = "Core.Commands.InternalImage", + [3010] = "Core.Commands.StateDisplay", + [3011] = "Core.Commands.Brightness", + [3012] = "Core.Commands.SetWatchdogMode", + [3013] = "Core.Commands.LEDText", + [3100] = "Core.Telemetry.MotorSpeeds", + [3101] = "Core.Telemetry.MotorCurrents", + [3102] = "Core.Telemetry.VESCCurrents", + [3103] = "Core.Telemetry.IMUData", + [3104] = "Core.Telemetry.AccelerometerData", + [3105] = "Core.Telemetry.Thermal", + [3200] = "Core.Error.VESCFault", + [4000] = "PMS.Commands.EStop", + [4001] = "PMS.Commands.Suicide", + [4002] = "PMS.Commands.Reboot", + [4003] = "PMS.Commands.EnableBus", + [4004] = "PMS.Commands.DisableBus", + [4005] = "PMS.Commands.SetBus", + [4100] = "PMS.Telemetry.CurrentAndVoltage", + [4101] = "PMS.Telemetry.BusStatus", + [4200] = "PMS.Error.PackOvercurrent", + [4201] = "PMS.Error.CellUndervoltage", + [4202] = "PMS.Error.CellCritical", + [4203] = "PMS.Error.AuxOvercurrent", + [6100] = "Nav.Telemetry.GPSLatLonAlt", + [6102] = "Nav.Telemetry.CompassData", + [6103] = "Nav.Telemetry.SatelliteCountData", + [6200] = "Nav.Error.GPSLockError", + [7000] = "SignalStack.Commands.OpenLoop", + [7001] = "SignalStack.Commands.SetAngleTarget", + [7002] = "SignalStack.Commands.SetGPSTarget", + [7003] = "SignalStack.Commands.WatchdogOverride", + [7100] = "SignalStack.Telemetry.CompassAngle", + [8000] = "Arm.Commands.OpenLoop", + [8001] = "Arm.Commands.TargetAngle", + [8002] = "Arm.Commands.TargetAngleIncrement", + [8003] = "Arm.Commands.GripperOpenLoop", + [8004] = "Arm.Commands.IKPosition", + [8005] = "Arm.Commands.IKPositionIncrement", + [8006] = "Arm.Commands.IKPoseIncrement", + [8007] = "Arm.Commands.Laser", + [8008] = "Arm.Commands.LinearServo", + [8009] = "Arm.Commands.Cache", + [8010] = "Arm.Commands.WatchdogOverride", + [8011] = "Arm.Commands.LimitSwitchOverride", + [8012] = "Arm.Commands.ClosedLoopOverride", + [8013] = "Arm.Commands.CalibrateEncoder", + [8014] = "Arm.Commands.SoftLimitOverride", + [8015] = "Arm.Commands.ArmGimbal1", + [8016] = "Arm.Commands.ArmGimbal2", + [8100] = "Arm.Telemetry.Position", + [8101] = "Arm.Telemetry.LimitSwitch", + [8102] = "Arm.Telemetry.SoftLimit", + [8103] = "Arm.Telemetry.SMOCOPing", + [9000] = "Auger.Commands.AugerAxis", + [9001] = "Auger.Commands.LimitSwitchOverride", + [9002] = "Auger.Commands.CalibrateEncoder", + [9003] = "Auger.Commands.Auger", + [9004] = "Auger.Commands.WatchdogOverride", + [9005] = "Auger.Commands.LED", + [9006] = "Auger.Commands.AugerServo", + [9007] = "Auger.Commands.AugerGimbal", + [9100] = "Auger.Telemetry.Position", + [9101] = "Auger.Telemetry.AugerSpeed", + [9102] = "Auger.Telemetry.LimitSwitch", + [9103] = "Auger.Telemetry.Environmental", + [9104] = "Auger.Telemetry.AugerCurrent", + [9105] = "Auger.Telemetry.SMOCOPing", + [11000] = "Autonomy.Commands.StartAutonomy", + [11001] = "Autonomy.Commands.DisableAutonomy", + [11002] = "Autonomy.Commands.AddPositionLeg", + [11003] = "Autonomy.Commands.AddMarkerLeg", + [11004] = "Autonomy.Commands.AddObjectLeg", + [11005] = "Autonomy.Commands.ClearWaypoints", + [11006] = "Autonomy.Commands.SetMaxSpeed", + [11007] = "Autonomy.Commands.SetMinTravScore", + [11008] = "Autonomy.Commands.SetBetaBias", + [11009] = "Autonomy.Commands.SetLoggingLevels", + [11010] = "Autonomy.Commands.AddObstacle", + [11011] = "Autonomy.Commands.ClearObstacles", + [11100] = "Autonomy.Telemetry.CurrentState", + [11101] = "Autonomy.Telemetry.StateDisplay", + [11103] = "Autonomy.Telemetry.ThreadFPS", + [12000] = "Camera1.Commands.TakePicture", + [12001] = "Camera1.Commands.ToggleStream", + [12002] = "Camera1.Commands.SetFFMPEGArguments", + [12003] = "Camera1.Commands.SetPictureArguments", + [12004] = "Camera1.Commands.SetBrightness", + [12005] = "Camera1.Commands.SetContrast", + [12100] = "Camera1.Telemetry.AvailableCameras", + [12101] = "Camera1.Telemetry.StreamingCameras", + [12102] = "Camera1.Telemetry.PictureTaken", + [12103] = "Camera1.Telemetry.Utilization", + [13000] = "Camera2.Commands.TakePicture", + [13001] = "Camera2.Commands.ToggleStream", + [13002] = "Camera2.Commands.SetFFMPEGArguments", + [13003] = "Camera2.Commands.SetPictureArguments", + [13004] = "Camera2.Commands.SetBrightness", + [13005] = "Camera2.Commands.SetContrast", + [13100] = "Camera2.Telemetry.AvailableCameras", + [13101] = "Camera2.Telemetry.StreamingCameras", + [13102] = "Camera2.Telemetry.PictureTaken", + [13103] = "Camera2.Telemetry.Utilization", + [14000] = "CameraServer.Commands.TakePhoto", + [14001] = "CameraServer.Commands.ToggleStream", + [14002] = "CameraServer.Commands.AdjustBrightness", + [14003] = "CameraServer.Commands.AdjustContrast", + [14004] = "CameraServer.Commands.AdjustSaturation", + [14005] = "CameraServer.Commands.AdjustHue", + [14008] = "CameraServer.Commands.SetWhiteBalance", + [14009] = "CameraServer.Commands.AdjustBacklightContrast", + [14010] = "CameraServer.Commands.SetExposure", + [14100] = "CameraServer.Telemetry.AvailableCameras", + [14101] = "CameraServer.Telemetry.StreamingCameras", + [14102] = "CameraServer.Telemetry.PictureTaken", + [14200] = "CameraServer.Error.CameraUnavailable", + [16000] = "Raman.Commands.InstrumentsAxis", + [16001] = "Raman.Commands.LimitSwitchOverride", + [16002] = "Raman.Commands.CalibrateEncoder", + [16003] = "Raman.Commands.WatchdogOverride", + [16004] = "Raman.Commands.Laser", + [16005] = "Raman.Commands.RequestRamanReading", + [16100] = "Raman.Telemetry.Position", + [16101] = "Raman.Telemetry.LimitSwitch", + [16102] = "Raman.Telemetry.RamanReading_Part1", + [16103] = "Raman.Telemetry.RamanReading_Part2", + [16104] = "Raman.Telemetry.RamanReading_Part3", + [16105] = "Raman.Telemetry.RamanReading_Part4", + [16106] = "Raman.Telemetry.SMOCOPing", + [99100] = "RoveSoSimulator.Telemetry.IMU", +} +local TYPES = { + [3000] = 6, + [3001] = 6, + [3002] = 1, + [3003] = 2, + [3004] = 2, + [3005] = 2, + [3006] = 1, + [3007] = 5, + [3008] = 1, + [3009] = 5, + [3010] = 1, + [3011] = 1, + [3012] = 1, + [3013] = 8, + [3100] = 6, + [3101] = 6, + [3102] = 6, + [3103] = 6, + [3104] = 6, + [3105] = 6, + [3200] = 1, + [4000] = 1, + [4001] = 1, + [4002] = 1, + [4003] = 1, + [4004] = 1, + [4005] = 1, + [4100] = 6, + [4101] = 1, + [4200] = 1, + [4201] = 1, + [4202] = 1, + [4203] = 1, + [6100] = 7, + [6102] = 6, + [6103] = 1, + [6200] = 1, + [7000] = 2, + [7001] = 6, + [7002] = 7, + [7003] = 1, + [7100] = 6, + [8000] = 2, + [8001] = 6, + [8002] = 6, + [8003] = 2, + [8004] = 6, + [8005] = 6, + [8006] = 6, + [8007] = 1, + [8008] = 1, + [8009] = 1, + [8010] = 1, + [8011] = 3, + [8012] = 1, + [8013] = 1, + [8014] = 3, + [8015] = 2, + [8016] = 2, + [8100] = 6, + [8101] = 3, + [8102] = 3, + [8103] = 3, + [9000] = 2, + [9001] = 1, + [9002] = 1, + [9003] = 2, + [9004] = 1, + [9005] = 1, + [9006] = 2, + [9007] = 2, + [9100] = 6, + [9101] = 6, + [9102] = 1, + [9103] = 6, + [9104] = 6, + [9105] = 3, + [11000] = 1, + [11001] = 1, + [11002] = 7, + [11003] = 7, + [11004] = 7, + [11005] = 1, + [11006] = 6, + [11007] = 6, + [11008] = 6, + [11009] = 1, + [11010] = 7, + [11011] = 1, + [11100] = 1, + [11101] = 1, + [11103] = 5, + [12000] = 1, + [12001] = 1, + [12002] = 8, + [12003] = 8, + [12004] = 6, + [12005] = 6, + [12100] = 1, + [12101] = 1, + [12102] = 1, + [12103] = 1, + [13000] = 1, + [13001] = 1, + [13002] = 8, + [13003] = 8, + [13004] = 6, + [13005] = 6, + [13100] = 1, + [13101] = 1, + [13102] = 1, + [13103] = 1, + [14000] = 1, + [14001] = 1, + [14002] = 1, + [14003] = 1, + [14004] = 1, + [14005] = 1, + [14008] = 1, + [14009] = 1, + [14010] = 4, + [14100] = 1, + [14101] = 1, + [14102] = 1, + [14200] = 1, + [16000] = 2, + [16001] = 1, + [16002] = 1, + [16003] = 1, + [16004] = 1, + [16005] = 5, + [16100] = 6, + [16101] = 1, + [16102] = 3, + [16103] = 3, + [16104] = 3, + [16105] = 3, + [16106] = 3, + [99100] = 7, +} +local COUNTS = { + [3000] = 2, + [3001] = 6, + [3002] = 1, + [3003] = 2, + [3004] = 2, + [3005] = 2, + [3006] = 3, + [3007] = 256, + [3008] = 3, + [3009] = 256, + [3010] = 1, + [3011] = 1, + [3012] = 1, + [3013] = 256, + [3100] = 6, + [3101] = 6, + [3102] = 6, + [3103] = 2, + [3104] = 3, + [3105] = 3, + [3200] = 2, + [4000] = 0, + [4001] = 0, + [4002] = 0, + [4003] = 1, + [4004] = 1, + [4005] = 1, + [4100] = 12, + [4101] = 1, + [4200] = 0, + [4201] = 1, + [4202] = 1, + [4203] = 0, + [6100] = 8, + [6102] = 1, + [6103] = 1, + [6200] = 0, + [7000] = 1, + [7001] = 1, + [7002] = 4, + [7003] = 1, + [7100] = 1, + [8000] = 6, + [8001] = 6, + [8002] = 6, + [8003] = 1, + [8004] = 6, + [8005] = 6, + [8006] = 6, + [8007] = 1, + [8008] = 1, + [8009] = 1, + [8010] = 1, + [8011] = 1, + [8012] = 1, + [8013] = 1, + [8014] = 1, + [8015] = 2, + [8016] = 2, + [8100] = 9, + [8101] = 1, + [8102] = 1, + [8103] = 7, + [9000] = 1, + [9001] = 1, + [9002] = 0, + [9003] = 1, + [9004] = 1, + [9005] = 4, + [9006] = 2, + [9007] = 2, + [9100] = 1, + [9101] = 1, + [9102] = 1, + [9103] = 2, + [9104] = 1, + [9105] = 1, + [11000] = 1, + [11001] = 1, + [11002] = 3, + [11003] = 4, + [11004] = 4, + [11005] = 1, + [11006] = 1, + [11007] = 1, + [11008] = 1, + [11009] = 3, + [11010] = 3, + [11011] = 1, + [11100] = 1, + [11101] = 1, + [11103] = 2, + [12000] = 2, + [12001] = 2, + [12002] = 16384, + [12003] = 16384, + [12004] = 4, + [12005] = 4, + [12100] = 1, + [12101] = 1, + [12102] = 0, + [12103] = 6, + [13000] = 2, + [13001] = 2, + [13002] = 16384, + [13003] = 16384, + [13004] = 4, + [13005] = 4, + [13100] = 1, + [13101] = 1, + [13102] = 0, + [13103] = 6, + [14000] = 1, + [14001] = 2, + [14002] = 2, + [14003] = 2, + [14004] = 2, + [14005] = 2, + [14008] = 2, + [14009] = 2, + [14010] = 2, + [14100] = 1, + [14101] = 4, + [14102] = 0, + [14200] = 1, + [16000] = 1, + [16001] = 1, + [16002] = 0, + [16003] = 1, + [16004] = 1, + [16005] = 1, + [16100] = 2, + [16101] = 1, + [16102] = 512, + [16103] = 512, + [16104] = 512, + [16105] = 512, + [16106] = 1, + [99100] = 10, +} +local COMMENTS = { + [3000] = "[LeftSpeed, RightSpeed] (-1 - 1) -> (-100% - 100%)", + [3001] = "[LF, LM, LR, RF, RM, RR] (-1 - 1) -> (-100% - 100%)", + [3002] = "[Enabled]", + [3003] = "[Pan, Tilt] (0 - 180)", + [3004] = "[Pan, Tilt] (0 - 180)", + [3005] = "[Pan, Tilt] (0 - 180)", + [3006] = "[R, G, B] (brightness 0 - 255)", + [3007] = "[Color] (RGBA)", + [3008] = "[R, G, B] (brightness 0 - 255)", + [3009] = "[Color] (RGBA)", + [3010] = "[State] (DisplayState)", + [3011] = "[Brightness] (0 - 255)", + [3012] = "[Mode] (0: Teleop 1: Autonomy)", + [3013] = "[Message] (null terminated string)", + [3100] = "[FL, ML, BL, FR, MR, BR] (-1 - 1) -> (-100% - 100%)", + [3101] = "[FL, ML, BL, FR, MR, BR] (A)", + [3102] = "[FL, ML, BL, FR, MR, BR] (A battery side)", + [3103] = "[Roll, Pitch] (deg)", + [3104] = "[X, Y, Z] (m/s2)", + [3105] = "[FanSpeed, BoardTemperature, OtherTemperature] (rpm, C, C)", + [3200] = "[MotorID, FaultCode]", + [4000] = "Power off all systems except network (PMS will stay on)", + [4001] = "Power off all systems including network, cannot recover without physical reboot (PMS will stay on)", + [4002] = "Cycle all systems including network off and back on (PMS will stay on)", + [4003] = "[Motor, Core, Aux] (bitmask enable)", + [4004] = "[Motor, Core, Aux] (bitmask disable)", + [4005] = "[Motor, Core, Aux] (bitmask enabled)", + [4100] = "[PackCurrent, AuxCurrent, LowCurrent, NetworkCurrent, RadioM2Current, RadioM9Current, Cell1Voltage, Cell2Voltage, Cell3Voltage, Cell4Voltage, Cell5Voltage, Cell6Voltage] (A, A, A, A, A, A, V, V, V, V, V, V)", + [4101] = "[Motor, Core, Aux, RadioM2, RadioM9, Network] (bitmask enabled)", + [4200] = "Higher current draw than the battery can support. Rover will Reboot automatically", + [4201] = "[C1, C2, C3, C4, C5, C6] (bitmask undervolt) Rover will EStop automatically", + [4202] = "[C1, C2, C3, C4, C5, C6] (bitmask critical) Rover will Suicide automatically", + [4203] = "Aux system current draw too high. Rover will disable Aux bus automatically", + [6100] = "[Lat, Lon, Alt, HorizontalAccuracy, VerticalAccuracy, HeadingAccuracy, FixType, IsDifferential] (deg, deg, m, m, m, deg, ublox_navpvt fix type http://docs.ros.org/en/noetic/api/ublox_msgs/html/msg/NavPVT.html, bool)", + [6102] = "[Heading] (0 - 360)", + [6103] = "[Satellites]", + [6200] = "", + [7000] = "[Speed] (-1000 - 1000) -> (-100% - 100%)", + [7001] = "[Heading] (0 - 360)", + [7002] = "[Rover Lat, Rover Lon, Basestation Lat, Basestation Lon] (-90 - 90, -180 - 180, -90 - 90, -180 - 180)", + [7003] = "[Enabled]", + [7100] = "[Heading] (0 - 360)", + [8000] = "[X, J2, J3, J4, J5, J6] (-32768 - 32767) -> (-100% - 100%)", + [8001] = "[X, J2, J3, J4, J5, J6] (in, deg, deg, deg, deg, deg)", + [8002] = "[X, J2, J3, J4, J5, J6] (in, deg, deg, deg, deg, deg)", + [8003] = "[Gripper] (-32768 - 32767) -> (-100% - 100%)", + [8004] = "[X, Y, Z, J4, J5, J6] (in, in, in, deg, deg, deg)", + [8005] = "[X, Y, Z, J4, J5, J6] (in, in, in, deg, deg, deg)", + [8006] = "[TX, TY, TZ, RX, RY, RZ] (in, in, in, deg, deg, deg)", + [8007] = "[Enabled]", + [8008] = "[Position] (0 - 180)", + [8009] = "[Position] (0 - 180)", + [8010] = "[Enabled]", + [8011] = "[X+, X-, J2+, J2-, J3+, J3-, J4+, J4-, J5+, J5-] (bitmask override enabled)", + [8012] = "[X, J2, J3, J4, J5, J6] (bitmask override enabled)", + [8013] = "[X, Roll] (bitmask start calibration)", + [8014] = "[X+, X-, J2+, J2-, J3+, J3-, J4+, J4-, J5+, J5-] (bitmask override enabled)", + [8015] = "[Pan, Tilt] (0 - 180)", + [8016] = "[Pan, Tilt] (0 - 180)", + [8100] = "[X, J2, J3, J4, J5, J6, GX, GY, GZ] (in, deg, deg, deg, deg, deg, in, in, in)", + [8101] = "[X+, X-, J2+, J2-, J3+, J3-, J4+, J4-, J5+, J5-] (bitmask depressed)", + [8102] = "[X+, X-, J2+, J2-, J3+, J3-, J4+, J4-, J5+, J5-] (bitmask triggered)", + [8103] = "[X, J2, J3, J4, J5, J6, G] (ping time ms)", + [9000] = "[Speed] (-32768 - 32767) -> (-100% - 100%)", + [9001] = "[AugerAxis+, AugerAxis-] (bitmask override enabled)", + [9002] = "Request calibration of the AugerAxis encoder", + [9003] = "[Speed] (-1000 - 1000) -> (-100% - 100%)", + [9004] = "[Enabled]", + [9005] = "[White, 365, 405, 500] (brightness 0 - 255)", + [9006] = "[AFFilters, SoilTrapdoor] (0 - 180)", + [9007] = "[Pan, Tilt] (0 - 180)", + [9100] = "[AugerAxis] (in)", + [9101] = "[AugerSpeed] (rpm)", + [9102] = "[AugerAxis+, AugerAxis-] (bitmask depressed)", + [9103] = "[Temperature, Humidity] (C, relative %)", + [9104] = "[AugerCurrent] (A)", + [9105] = "[AugerAxis] (ping time ms)", + [11000] = "Start Autonomy_Software", + [11001] = "Return Autonomy_Software to Idle state", + [11002] = "[Lat, Lon, AUTONOMYWAYPOINTTYPES]", + [11003] = "[Lat, Lon, AUTONOMYWAYPOINTTYPES, MarkerRadius (meters)]", + [11004] = "[Lat, Lon, AUTONOMYWAYPOINTTYPES, ObjectRadius (meters)]", + [11005] = "Clear queued positions, markers, and objects waypoints.", + [11006] = "A multiplier from 0.0 to 1.0 that will scale the max power effort of Autonomy.", + [11007] = "A multiplier from 0.0 to 1.0 that will filter points from the traversability map. Higher values will result in more conservative pathing.", + [11008] = "A multiplier from 0.0 to 1.0 that will bias the pathing algorithm towards shorter paths (lower values) or safer paths (higher values).", + [11009] = "[Enum (AUTONOMYLOG), Enum (AUTONOMYLOG), Enum (AUTONOMYLOG)] {Console, File, RoveComm}", + [11010] = "[Lat, Lon, ObstacleRadius (meters)]", + [11011] = "Clear queued permanent obstacles.", + [11100] = "[State] (AUTONOMYSTATE)", + [11101] = "[State] (0: Teleop 1: Autonomy 2: Reached Goal)", + [11103] = "[Thread, FPS] (AUTONOMYTHREADS, fps)", + [12000] = "[Camera, Restart]", + [12001] = "[Camera, Restart]", + [12002] = "[Arguments] (0x1f delimited, 0x04 terminated list with maximum length of 16384 characters for RPi-Camera/config.toml/ffmpeg_arguments. Accepts the following substitutions: $index: camera index, $input: input device file, $ip: output ip, $port: output port, $brightness, $contrast)", + [12003] = "[Arguments] (0x1f delimited, 0x04 terminated list with maximum length of 16384 characters for RPi-Camera/config.toml/picture_arguments. Accepts the following substitutions: $index: camera index, $input: input device file, $output: output file without extension, $brightness, $contrast)", + [12004] = "[Camera0, Camera1, Camera2, Camera3] (-1.0 - 1.0)", + [12005] = "[Camera0, Camera1, Camera2, Camera3] (-1.0 - 2.0)", + [12100] = "[AvailableCameras]", + [12101] = "[StreamingCameras]", + [12102] = "Picture has been taken.", + [12103] = "[cpu0, cpu1, cpu2, cpu3, mem, storage] (% usage)", + [13000] = "[Camera, Restart]", + [13001] = "[Camera, Restart]", + [13002] = "[Arguments] (0x1f delimited, 0x04 terminated list with maximum length of 16384 characters for RPi-Camera/config.toml/ffmpeg_arguments. Accepts the following substitutions: $index: camera index, $input: input device file, $ip: output ip, $port: output port, $brightness, $contrast)", + [13003] = "[Arguments] (0x1f delimited, 0x04 terminated list with maximum length of 16384 characters for RPi-Camera/config.toml/picture_arguments. Accepts the following substitutions: $index: camera index, $input: input device file, $output: output file without extension, $brightness, $contrast)", + [13004] = "[Camera0, Camera1, Camera2, Camera3] (-1.0 - 1.0)", + [13005] = "[Camera0, Camera1, Camera2, Camera3] (-1.0 - 2.0)", + [13100] = "[AvailableCameras]", + [13101] = "[StreamingCameras]", + [13102] = "Picture has been taken.", + [13103] = "[cpu0, cpu1, cpu2, cpu3, mem, storage] (% usage)", + [14000] = "[Camera]", + [14001] = "[Camera, Action] (id, 0: Shutdown 1: Startup 2: Restart)", + [14002] = "[Camera, Brightness] (id, 0 - 255)", + [14003] = "[Camera, Contrast] (id, 0 - 255)", + [14004] = "[Camera, Saturation] (id, 0 - 255)", + [14005] = "[Camera, Hue] (id, 0 - 255)", + [14008] = "[Camera, Temperature]", + [14009] = "[Camera, BacklightContrast]", + [14010] = "[Camera, Exposure]", + [14100] = "[Camera0, Camera1, Camera2, Camera3, Camera4, Camera5, Camera6, Camera7] (bitmask able to stream)", + [14101] = "[Port0, Port1, Port2, Port3] (currently streaming on each port)", + [14102] = "Picture has been taken", + [14200] = "[Camera] (id) Camera has errored and stopped streaming", + [16000] = "[Speed] (-32768 - 32767) -> (-100% - 100%)", + [16001] = "[InstrumentsAxis+, InstrumentsAxis-] (bitmask override enabled)", + [16002] = "Request calibration of the InstrumentsAxis encoder", + [16003] = "[Enabled]", + [16004] = "[Enabled]", + [16005] = "[Integration Time] (ms)", + [16100] = "[InstrumentsAxis, TOF] (mm, mm)", + [16101] = "[InstrumentsAxis+, InstrumentsAxis-] (bitmask depressed)", + [16102] = "Raman CCD elements 1-512", + [16103] = "Raman CCD elements 513-1024", + [16104] = "Raman CCD elements 1025-1536", + [16105] = "Raman CCD elements 1537-2048", + [16106] = "[InstrumentsAxis] (ping time ms)", + [99100] = "[Accel X, Accel Y, Accel Z, Gyro X, Gyro Y, Gyro Z, Quat X, Quat Y, Quat Z, Quat W]", +} +-- End generated code + +-- Unfortunately hardcoded and not derived from the manifest. +local DATA_TYPE_TYPES = { + [0] = ftypes.INT8, + ftypes.UINT8, + ftypes.INT16, + ftypes.UINT16, + ftypes.INT32, + ftypes.UINT32, + ftypes.FLOAT, + ftypes.DOUBLE, + ftypes.CHAR +} + +local DATA_TYPE_FIELDS = {} + +rove_protocol = Proto("RoveComm", "Mars Rover Design Team RoveComm") + +version_field = ProtoField.uint8("rove.version", "version", base.DEC) +data_id_field = ProtoField.uint16("rove.data_id", "dataId", base.DEC) +data_count_field = ProtoField.uint16("rove.data_count", "dataCount", base.DEC) +data_type_field = ProtoField.uint8("rove.data_type", "dataType", base.DEC) +data_field = ProtoField.bytes("rove.data", "data") +rove_protocol.fields = { version_field, data_id_field, data_count_field, data_type_field, data_field } + +for data_type_number = 0, 8 do + DATA_TYPE_FIELDS[data_type_number] = ProtoField.new(DATA_TYPE_NAMES[data_type_number], + "rove." .. DATA_TYPE_NAMES[data_type_number], DATA_TYPE_TYPES[data_type_number]) + table.insert(rove_protocol.fields, DATA_TYPE_FIELDS[data_type_number]) +end + +local expert_bad_data_id = ProtoExpert.new( + "BadDataId", + "The encoded data_id does not exist in the manifest", + expert.group.MALFORMED, + expert.severity.WARN +) +local expert_bad_length = ProtoExpert.new( + "BadLength", + "The encoded data_count does not equal the actual length", + expert.group.MALFORMED, + expert.severity.WARN +) +local expert_manifest_count_mismatch = ProtoExpert.new( + "ManifestCountMismatch", + "The encoded data_count does not match the manifest for this data_id", + expert.group.MALFORMED, + expert.severity.WARN +) +local expert_bad_data_type = ProtoExpert.new( + "BadDataType", + "The data_type does not exist in the manifest", + expert.group.MALFORMED, + expert.severity.ERROR +) +local expert_manifest_type_mismatch = ProtoExpert.new( + "ManifestTypeMismatch", + "The encoded data_type does not match the manifest for this data_id", + expert.group.MALFORMED, + expert.severity.WARN +) +rove_protocol.experts = { + expert_bad_data_id, + expert_bad_length, + expert_manifest_count_mismatch, + expert_bad_data_type, + expert_manifest_type_mismatch, +} + +function rove_protocol.dissector(buffer, pinfo, tree) + if buffer:captured_len() < 5 then return end + + pinfo.cols.protocol = rove_protocol.name + + -- Create a new subtree named "RoveComm Protocol Data". + local subtree = tree:add(rove_protocol, buffer(), "RoveComm Protocol Data") + + -- Add header fields. + subtree:add(version_field, buffer(0, 1)) + local data_id = buffer(1, 2):uint() + subtree:add(data_id_field, buffer(1, 2)):append_text(" (" .. + (SYSTEM_PACKETS[data_id] or NAMES[data_id] or "Unknown") .. ")") + local data_count_number = buffer(3, 2):uint() + subtree:add(data_count_field, buffer(3, 2)) + local data_type_number = buffer(5, 1):uint() + subtree:add(data_type_field, buffer(5, 1)):append_text(" (" .. + (DATA_TYPE_NAMES[data_type_number] or "Unknown") .. ")") + + if (DATA_TYPE_NAMES[data_type_number] == nil) then + -- Data type number is invalid, add the unparsed data. + subtree:add_proto_expert_info(expert_bad_data_type) + Dissector.get("data"):call(buffer(6):tvb(), pinfo, tree) + else + -- Add parsed data. + local data_type_size = DATA_TYPE_SIZES[data_type_number]; + local actual_data_length = buffer:reported_len() - 6 + local expected_data_length = data_type_size * data_count_number + local data_subtree = subtree:add(data_field, buffer(6)); + for i = 0, data_count_number - 1 do + data_subtree:add(DATA_TYPE_FIELDS[data_type_number], buffer(6 + i * data_type_size, data_type_size)); + end + if (actual_data_length ~= expected_data_length) then subtree:add_proto_expert_info(expert_bad_length) end + end + + -- Add warnings + if NAMES[data_id] == nil then + if SYSTEM_PACKETS[data_id] == nil then subtree:add_proto_expert_info(expert_bad_data_id) end + else + if COUNTS[data_id] ~= data_count_number then + subtree:add_proto_expert_info(expert_manifest_count_mismatch, + "The encoded data_count does not match the manifest for this data_id (" .. + tostring(COUNTS[data_id]) .. ")") + end + if TYPES[data_id] ~= data_type_number then + subtree:add_proto_expert_info(expert_manifest_type_mismatch, + "The encoded data_type does not match the manifest for this data_id (" .. + tostring(TYPES[data_id]) .. " " .. DATA_TYPE_NAMES[TYPES[data_id]] .. ")") + end + end +end + +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(12000, rove_protocol) + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(11000, rove_protocol) diff --git a/dissectors/roverlink-byu/LICENSE b/dissectors/roverlink-byu/LICENSE new file mode 100644 index 0000000..d6a9326 --- /dev/null +++ b/dissectors/roverlink-byu/LICENSE @@ -0,0 +1,340 @@ +GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. + + {description} + Copyright (C) {year} {fullname} + + 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. + +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) year 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. + + {signature of Ty Coon}, 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 Lesser General +Public License instead of this License. + diff --git a/dissectors/roverlink-byu/README.md b/dissectors/roverlink-byu/README.md new file mode 100644 index 0000000..8b851ab --- /dev/null +++ b/dissectors/roverlink-byu/README.md @@ -0,0 +1,65 @@ +# RoverLink (BYU Mars Rover) + +Ébauche de dissecteur Wireshark Lua du protocole RoverLink. Ce protocole +de messages a été défini en 2014 par l'équipe Mars Rover de la Brigham +Young University (BYU), d'après MAVLink, dans `RoverLink.xml`. Le script +déclare le protocole et décode seulement les deux premiers octets de la +charge TCP (« Command ») ; les textes affichés sont des marques +provisoires du modèle d'origine (issue #537). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/StephenCarlson/BYU-Mars-Rover (`roverlink.lua`) | +| Commit importé | `83b37cdb4fc11466ffa53586aefd1828319c0dcf` du 21/11/2014 (dernier commit de `master`, unique commit du script) | +| Licence amont | GPLv2 (fichier `LICENSE` du dépôt, sans clause « or later » hors de l'annexe modèle de la licence ; le script ne porte aucune mention de licence) — auteur : Stephen Carlson. Déclarée `GPL-2.0-only` comme pour `dissectors/avionique` | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur RoverLink dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code, fins de ligne CRLF d'origine conservées) ; seule +l'en-tête de provenance de cinq lignes est ajoutée en tête (convention du +dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/roverlink.lua` | Protocole `roverlink` (« BYU RoverLink », ligne 6), champ `roverlink.command` (uint16 hexadécimal) ; inscrit sur TCP 8002 (ligne 36) | + +## Utilisation + +Copier `src/roverlink.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis recharger +avec Ctrl+Maj+L. Les lignes 38 à 40 (chemin Windows de l'auteur avec +`dofile` dans `init.lua`) sont inutiles avec le dossier des plugins. +Filtres : `roverlink`, `roverlink.command`. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. +Capture synthétique TCP 40000 → 8002 : + +| Essai | Résultat | +|---|---| +| Segment de 5 octets `01 23 61 62 63` | « BYU RoverLink, Command details here or in the tree below », « Command: 0x0123 [Command text] » | +| Segment de 1 octet | **erreur Lua** ligne 21 (`Range is out of bounds`) | + +## Limites constatées + +- Le script n'est qu'un modèle : aucun message de `RoverLink.xml` n'est + décodé (ni en-tête, ni identifiant, ni charge utile). Les textes + « [Command text] » et « Command details here… » sont des marques + provisoires. +- `RoverLink.xml` décrit un protocole UDP, alors que le script s'inscrit + sur TCP 8002. Pour UDP, il faut utiliser « Décoder comme… ». +- Le champ `roverlink.data` (ligne 8) est déclaré avec `FT_STRING`, variable non + définie en Lua (donc `nil`), et n'est jamais utilisé. +- Les variables `subtree` et `dissector` sont globales (lignes 19 et 33). + La seconde écrase le nom d'une éventuelle variable globale d'un autre + script. +- Pas de contrôle de longueur : un segment de moins de 2 octets + provoque une erreur Lua. Pas de réassemblage TCP. +- Pas de capture réelle dans le dépôt amont. diff --git a/dissectors/roverlink-byu/src/roverlink.lua b/dissectors/roverlink-byu/src/roverlink.lua new file mode 100644 index 0000000..6e367ca --- /dev/null +++ b/dissectors/roverlink-byu/src/roverlink.lua @@ -0,0 +1,40 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/StephenCarlson/BYU-Mars-Rover (roverlink.lua), +-- commit 83b37cdb4fc11466ffa53586aefd1828319c0dcf du 21/11/2014 (dernière modification du fichier : +-- commit 83b37cdb4fc11466ffa53586aefd1828319c0dcf du 21/11/2014). +-- Licence amont : GPL-2.0, LICENSE du dépôt — voir README.md et LICENSE. +p_roverlink = Proto ("roverlink","BYU RoverLink") +local f_command = ProtoField.uint16("roverlink.command", "Command", base.HEX) +local f_data = ProtoField.string("roverlink.data", "Data", FT_STRING) + +p_roverlink.fields = {f_command} + +-- roverlink dissector function +function p_roverlink.dissector (buf, pkt, root) + -- validate packet length is adequate, otherwise quit + if buf:len() == 0 then return end + pkt.cols.protocol = p_roverlink.name + + -- create subtree for roverlink + subtree = root:add(p_roverlink, buf(0)) + -- add protocol fields to subtree + subtree:add(f_command, buf(0,2)):append_text(" [Command text]") + + -- description of payload + subtree:append_text(", Command details here or in the tree below") +end + +-- Initialization routine +function p_roverlink.init() +end + +-- register a chained dissector for port 8002 +local tcp_dissector_table = DissectorTable.get("tcp.port") +dissector = tcp_dissector_table:get_dissector(8002) + -- you can call dissector from function p_roverlink.dissector above + -- so that the previous dissector gets called +tcp_dissector_table:add(8002, p_roverlink) + +-- Put the following lines in the init.lua script found inside the Wireshark directory: +-- MYPROTO_SCRIPT_PATH="C:\Users\Steve\Desktop\Projects\MarsRover\BYU-Mars-Rover\" +-- dofile(MYPROTO_SCRIPT_PATH.."roverlink.lua") \ No newline at end of file diff --git a/dissectors/sapient-bsi-flex-335/LICENSE b/dissectors/sapient-bsi-flex-335/LICENSE new file mode 100644 index 0000000..f49a4e1 --- /dev/null +++ b/dissectors/sapient-bsi-flex-335/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/dissectors/sapient-bsi-flex-335/README.md b/dissectors/sapient-bsi-flex-335/README.md new file mode 100644 index 0000000..76d20af --- /dev/null +++ b/dissectors/sapient-bsi-flex-335/README.md @@ -0,0 +1,59 @@ +# SAPIENT — BSI Flex 335 v2.0 (gestion de capteurs, lutte anti-drones) + +Dissecteur Wireshark Lua des messages **SAPIENT** au format BSI Flex 335 +version 2.0 (« SAPIENT sCUAS », interface de gestion de capteurs), par +Jean Vanhay (version 2.0). Protocole `sapientmessages` : chaque message +est précédé d'une longueur sur 4 octets (petit-boutiste) ; le corps est +passé au dissecteur **Protobuf natif** comme +`sapient_msg.bsi_flex_335_v2_0.SapientMessage`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Hellikandra/SapientWireshark (fichier `plugins/sapient_protobuf_dissector.lua`) | +| Commit importé | `468787629572ac4c955f890b60daa6ff2fe7c92d` du 14/09/2024 (branche `main`, dernier commit ; dernière modification du script : `cd08789` du 14/09/2024) | +| Licence amont | MIT d'après le script (`set_plugin_info` : `license = "MIT license"`, auteur Jean Vanhay), retenue ici ; le dépôt a toutefois un fichier `LICENSE` Apache 2.0 (copié ici). Les deux licences sont permissives | +| Natif Wireshark 4.6.4 | Non (le dissecteur Protobuf générique est natif et utilisé par le script) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `sapient_protobuf_dissector.lua` | Protocole `sapientmessages` (« Décoder comme… » TCP/UDP) | +| `LICENSE` | Fichier de licence du dépôt amont (Apache 2.0) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Les copies amont de +`google/protobuf/descriptor.proto` et `timestamp.proto` ne sont pas +reprises ; les `.proto` SAPIENT ne sont pas non plus dans le dépôt amont. + +## Utilisation + +1. Copier le script dans le dossier des plugins Lua personnels. +2. Récupérer les fichiers `.proto` SAPIENT + (https://github.com/dstl/SAPIENT-Proto-Files) et les fichiers + Protobuf standard de Google, puis ajouter leurs dossiers aux chemins + de recherche Protobuf (Préférences → Protocols → ProtoBuf). +3. « Décoder comme… » le port TCP utilisé en `SapientMessages` (le script + ne s'enregistre que sur le port 0 de `tcp.port` et `udp.port`). + +Pour une autre version de SAPIENT, modifier le type passé à +`create_sapient_protobuf_dissector` en fin de script (conseil amont). + +## Remarques + +- **Défauts amont relevés à la lecture** (messages découpés sur plusieurs + segments TCP) : + - le script écrit dans `sapient_msg.is_partial_message`, variable qui + n'existe pas (au lieu de `sapient_state`) : une erreur Lua est + probable dès qu'un message dépasse le segment courant ; + - la longueur demandée pour le réassemblage est calculée par + `msg_len - (header - remaining_len)` au lieu de + `msg_len - (remaining_len - header)`, et l'offset de réassemblage + saute l'en-tête ; + - l'état de réassemblage est partagé entre toutes les conversations. + Les messages contenus dans un seul segment ne sont pas concernés. +- Le script affiche de nombreux messages de débogage (`print`) à chaque + paquet. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/sapient-bsi-flex-335/sapient_protobuf_dissector.lua b/dissectors/sapient-bsi-flex-335/sapient_protobuf_dissector.lua new file mode 100644 index 0000000..187ea82 --- /dev/null +++ b/dissectors/sapient-bsi-flex-335/sapient_protobuf_dissector.lua @@ -0,0 +1,148 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Hellikandra/SapientWireshark (plugins/sapient_protobuf_dissector.lua), +-- commit 468787629572ac4c955f890b60daa6ff2fe7c92d du 14/09/2024. +-- Licence amont : MIT (déclarée dans set_plugin_info ; LICENSE du dépôt : Apache-2.0) — voir README.md. +if set_plugin_info then + local my_info = { + version = "2.0", + author = "Jean Vanhay", + email = "jean.vanhay@gmail.com", + copyright = "", + license = "MIT license", + details = "This is a Lua plugin for Wireshark, to dissect SAPIENT using Google protobuf messages.", + + } + set_plugin_info(my_info) +end +do + local protobuf_dissector = Dissector.get("protobuf") + + -- Store the state between segments + local sapient_state = { + remaining_msg_len = 0, -- Length of the message that we are still waiting for + is_partial_message = false, -- Flag indicating if we're in the middle of a message + msg_len = 0 -- Total length of the message (excluding header) + } + -- The TCP dissector will + local function create_sapient_protobuf_dissector(name, desc, msgtype) + local proto = Proto(name, desc) + local f_length = ProtoField.uint32(name .. ".length", "Sapient Message Length", base.DEC) + proto.fields = { f_length } + + print("-- Debug -- Start proto.dissector -- for a Sapient Message in ") + + proto.dissector = function(tvb, pinfo, tree) + local subtree = tree:add(proto, tvb()) + + -- 4 Bytes which must be converted from Little Endian + local header = 4 + local offset = 0 + local remaining_len = tvb:len() + + print("-- Debug -- Sapient Message length + header = ", remaining_len) + print("-- Debug -- pinfo.fragmented = ", pinfo.fragmented) + print("-- Debug -- pinfo.desegment_len = ", pinfo.desegment_len) + print("-- Debug -- pinfo.desegment_offset = ", pinfo.desegment_offset) + + -- Check if we are handling a partial message from a previous segment + if sapient_state.is_partial_message then + print("Handling a continuation of partial message.") + + local msg_len = sapient_state.remaining_msg_len + + if remaining_len < msg_len then + -- Not enough data, request more segments + pinfo.desegment_offset = offset + pinfo.desegment_len = msg_len - remaining_len + + print("-- Debug -- Partial message: remaining_len < msg_len, requesting more data") + + return -1 + end + + -- We have enough data to complete the message + subtree:add(f_length, msg_len) + + -- Call the protobuf dissector to hanqdle the message + local success, error_message = pcall(Dissector.call, protobuf_dissector, tvb(offset, msg_len):tvb(), pinfo, subtree) + if not success then + print("-- Error --" .. error_message) + end + + -- Reset state ater handling the message + sapient_state.remaining_msg_len = 0 + sapient_state.is_partial_message = false + + offset = offset + msg_len + remaining_len = remaining_len - msg_len + print("-- Debug -- offset: ", offset, "remaining_len: ", remaining_len) + end + + -- Continue with new message (starting with a header) + while remaining_len > 0 do + print("-- Debug -- remaining_len > 0 --") + + -- Check if we have enough bytes for the header + if remaining_len < header then + pinfo.desegment_offset = offset + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + + print("-- Debug -- remaining_len < header : exit") + + return -1 + end + + -- Read the message length (4 bytes; little-endian) + local msg_len = tvb(offset, header):le_uint() + sapient_state.msg_len = msg_len -- Store the message length (excluding the header) + print("-- Debug -- msg_len (little-endian):", msg_len) + + -- Check if there is enough data remaining to handle the message + if remaining_len - header < msg_len then + -- not enough data, request more segments + sapient_state.remaining_msg_len = msg_len + sapient_msg.is_partial_message = true + + pinfo.desegment_offset = offset + header + pinfo.desegment_len = msg_len - (header - remaining_len) + + print("-- Debug -- remaining_len - header < msg_len: exit and store state") + + return -1 + end + + -- Add the message length to the subtree + subtree:add(f_length, msg_len) + + if msgtype ~= nil then + pinfo.private["pb_msg_type"] = "message," .. msgtype + end + + -- Call the protobuf dessector to handle the message + local success, error_message = pcall(Dissector.call, protobuf_dissector, tvb(offset + header, msg_len):tvb(), pinfo, subtree) + + if not success then + print("Error : " .. error_message) + end + + -- Update the remaing length of the offset for the next iteration + offset = offset + msg_len + header + remaining_len = remaining_len - (msg_len + header) + print("offset : ", offset, "remaining_len : ", remaining_len) + end -- endof while remaining > 0 do + + -- Set the protocol name in the Wireshark columns + pinfo.columns.protocol:set(name) + end -- endof proto.dissector = function (tvb, pinfo, tree) + + -- Register the dissector for both TCP qnd UDP ports + DissectorTable.get("tcp.port"):add(0, proto) + DissectorTable.get("udp.port"):add(0, proto) + + return proto + end -- endof function create_sapient_protobuf_dissector + + -- Create the SapientMessages dissector with protobuf support + create_sapient_protobuf_dissector("SapientMessages", "SapientMessage Sapient", "sapient_msg.bsi_flex_335_v2_0.SapientMessage") + +end -- endof do diff --git a/dissectors/sedona-sox/LICENSE.md b/dissectors/sedona-sox/LICENSE.md new file mode 100644 index 0000000..6c93da7 --- /dev/null +++ b/dissectors/sedona-sox/LICENSE.md @@ -0,0 +1,92 @@ +[//]: # (Copyright © 2008 Tridium, Inc + Licensed under the Academic Free License version 3.0 + + History: + 21 Aug 08 Brian Frank Creation) + +# License +![Sedona](doc/logo.png "Sedona Framework Logo") + +## The Sedona Framework Open Source License + +The License, granted by Tridium, Inc. ("Licensor"), as set forth below, +applies only to the computer software and documentation (collectively, the +"Original Work") available for download at +[http://sedonadev.org](http://sedonadev.org/), which Original Work is +copyright © 2006-2013 Licensor. + +"Sedona Framework" is a trademark of Licensor that our community of +customers, partners and developers recognize as an indicator of quality and +compatibility. For the avoidance of doubt, __the License set forth below does not +grant any right to use the "Sedona Framework" trademark in connection with +the sale, offer for sale or distribution of any product or service.__ Licensor +offers a program that allows you to apply for a permission or license to use +the Sedona Framework trademark and related logo to indicate technological +compatibility of products you develop with other products built on the Sedona +Framework or Niagara Framework. The Powered by Sedona Framework logo is +available for your use upon acceptance of your application by Tridium and your +acceptance of the terms of the applicable agreement with Tridium. For more +information on becoming authorized to use the "Powered by Sedona Framework" +trademark, go to the [certification program](http://sedonadev.org/certification.html) page. + +If you are not authorized by contract with Tridium to use the Sedona Framework +logo, the correct way to state that you used the Sedona Framework to build a +product is: +__"The [insert name of your product] was built on the Sedona Framework™."__ + +If you make this statement, you should also include in the text of the document +or product packaging in which it is used the statement that __“Sedona Framework +is a trademark of Tridium, Inc.”__ or otherwise indicate that the trademark +does not belong to you. + +## Academic Free License ("AFL") v. 3.0 + +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + + +### Licensed under the Academic Free License version 3.0 + +1. __Grant of Copyright License.__ Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + a. to reproduce the Original Work in copies, either alone or as part of a collective work; + + b. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + + c. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; + + d. to perform the Original Work publicly; and + + e. to display the Original Work publicly. + +2. __Grant of Patent License.__ Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + +3. __Grant of Source Code License.__ The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + +4. __Exclusions From License Grant.__ Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + +5. __External Deployment.__ The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + +6. __Attribution Rights.__ You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + +7. __Warranty of Provenance and Disclaimer of Warranty.__ Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + +8. __Limitation of Liability.__ Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + +9. __Acceptance and Termination.__ If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + +10. __Termination for Patent Action.__ This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + +11. __Jurisdiction, Venue and Governing Law.__ Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + +12. __Attorneys' Fees.__ In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + +13. __Miscellaneous.__ If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + +14. __Definition of "You" in This License.__ "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +15. __Right to Use.__ You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + +16. __Modification of This License.__ This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice `"Licensed under "` or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. + +--- +_Copyright © 2008 Tridium, Inc._ diff --git a/dissectors/sedona-sox/README.md b/dissectors/sedona-sox/README.md new file mode 100644 index 0000000..517d028 --- /dev/null +++ b/dissectors/sedona-sox/README.md @@ -0,0 +1,48 @@ +# Sedona Sox / Dasp (automatisation des bâtiments) + +Dissecteur Wireshark Lua des protocoles **Dasp** (Datagram +Authenticated Session Protocol, UDP 1876 par défaut) et **Sox** (Sedona +Object eXchange) du **Sedona Framework** (Tridium), utilisé dans des +contrôleurs embarqués d'automatisation de bâtiments et d'IoT : en-tête +Dasp (session, numéro de séquence, type de message, champs d'en-tête, +acquittements), puis commandes Sox (lecture / écriture de composants et +de propriétés, abonnements, événements, fichiers…). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/linsong/sedona (fichier `tools/wireshark/sox.lua`) | +| Commit importé | `406b11f3816fb00db6482640f9cf3397b874b515` du 10/12/2020 (branche `master`, dernier commit ; dernière modification du dissecteur : `22f092b` du 03/05/2019) | +| Licence amont | AFL-3.0 (`LICENSE.md` amont : « Sedona Framework Open Source License », texte de l'Academic Free License v3.0, © Tridium ; README amont : « We use Academic Free License ("AFL"), the same as the official Sedona framework » ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Sox/Dasp natif | + +Texte complet de la licence amont : fichier `LICENSE.md` de ce dossier +(copie conforme de l'amont, qui rappelle aussi que la marque « Sedona +Framework » appartient à Tridium et n'est pas concédée). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `sox.lua` | Dissecteurs `dasp` (UDP, port réglable dans les préférences, 1876 par défaut) et `sox` | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `sox.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer +`wireshark -X lua_script:sox.lua`, puis filtrer, par exemple : +`(sox.cmd == "c" || sox.cmd == "C") && sox.compId == 1`. + +## Remarques + +- Le script charge `bit`, puis `bit32` à défaut ; si aucun n'est + disponible comme module sous Wireshark 4.6 / Lua 5.4, il s'arrête avec + « sox dissector: bitop module not found » (non vérifié). +- Le port UDP est enregistré dans `dasp_proto.init()`, donc à chaque + rechargement ; un changement de préférence n'enlève pas l'ancien port. +- Pas de prise en charge des flux Sox (« TODO: stream support » amont). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/sedona-sox/sox.lua b/dissectors/sedona-sox/sox.lua new file mode 100644 index 0000000..4776ddf --- /dev/null +++ b/dissectors/sedona-sox/sox.lua @@ -0,0 +1,729 @@ +-- SPDX-License-Identifier: AFL-3.0 +-- Importé de https://github.com/linsong/sedona (tools/wireshark/sox.lua), +-- commit 406b11f3816fb00db6482640f9cf3397b874b515 du 10/12/2020. +-- Licence amont : AFL-3.0 (LICENSE.md amont) — voir README.md. +-- TODO: stream support + +-- to survive in different version of lua, try 'bit' module first, if fails, +-- try load 'bit32'. refers: http://lua-users.org/wiki/BitwiseOperators +local status, bit = pcall(require, "bit") +if not (status) then + status, bit = pcall(require, "bit32") + if not (status) then + print("sox dissector: bitop module not found") + return + end +end + +dasp_proto = Proto("dasp", "Dasp Protocol") +sox_proto = Proto("sox", "Sox Protocol") + +dasp_proto.prefs["udp_port"] = Pref.uint("UDP Port", 1876, "UDP Port for Dasp") + +-- dasp fields +local f_sessionId = ProtoField.uint16("dasp.sessionId", "sessionId", base.HEX) +local f_seqNum = ProtoField.uint16("dasp.seqNum", "seqNum", base.DEC) +local f_msgType = ProtoField.uint16("dasp.msgType", "msgType", base.HEX) +local f_headerFieldNum = ProtoField.uint16("dasp.numFields", "numFields", base.DEC) + +local f_headerAck = ProtoField.uint16("dasp.ack", "ack", base.DEC) +local f_headerAckMore = ProtoField.bytes("dasp.ackMore", "ackMore") +local f_headerErrorCode = ProtoField.uint16("dasp.errorCode", "errorCode", base.Hex) + +-- dasp stream support +local f_daspFrameRequest = ProtoField.framenum("dasp.request", "request", base.NONE, frametype.REQUEST, 0) +local f_daspFrameRequestDup = ProtoField.framenum("dasp.requestDup", "dasp requestDup", base.NONE, frametype.REQUEST, 0) +local f_daspFrameRequestAck = ProtoField.framenum("dasp.requestAck", "requestAck", base.NONE, frametype.ACK, 0) + +dasp_proto.fields = { + f_sessionId, f_seqNum, f_msgType, f_headerFieldNum, + f_headerAck, f_headerAckMore, f_headerErrorCode, + f_daspFrameRequest, f_daspFrameRequestDup, f_daspFrameRequestAck +} + +-- sox fields +local f_soxCmd = ProtoField.string("sox.cmd", "cmd") +local f_soxReplyNum = ProtoField.uint8("sox.replyNum", "replyNum", base.HEX) +local f_soxCompId = ProtoField.uint16("sox.compId", "compId", base.DEC) +local f_soxSlotId = ProtoField.uint8("sox.slotId", "slotId", base.DEC) + +local f_parentCompId = ProtoField.uint16("sox.parentCompId", "parentCompId", base.DEC) +local f_kitId = ProtoField.uint8("sox.kitId", "kitId", base.DEC) +local f_typeId = ProtoField.uint8("sox.typeId", "typeId", base.DEC) +local f_compName = ProtoField.stringz("sox.compName", "compName") +local f_compWhat = ProtoField.string("sox.compWhat", "compWhat") + +local f_linkAction = ProtoField.uint8("sox.linkAction", "linkAction", base.HEX) + +local f_linkFromCompId = ProtoField.uint16("sox.linkFromCompId", "linkFromCompId", base.DEC) +local f_linkFromSlotId = ProtoField.uint8("sox.linkFromSlotId", "linkFromSlotId", base.DEC) +local f_linkToCompId = ProtoField.uint16("sox.linkToCompId", "linkToCompId", base.DEC) +local f_linkToSlotId = ProtoField.uint8("sox.linkToSlotId", "linkToSlotId", base.DEC) + +local f_fileOpenMethod = ProtoField.stringz("sox.fileOpenMethod", "fileOpenMethod") +local f_fileUri = ProtoField.stringz("sox.fileUri", "fileUri") +local f_fileSize = ProtoField.uint32("sox.fileSize", "fileSize", base.DEC) + +local f_chunkNum = ProtoField.uint16("sox.chunkNum", "chunkNum", base.DEC) +local f_chunkSize = ProtoField.uint16("sox.chunkSize", "chunkSize", base.DEC) + +local f_soxRenameFrom = ProtoField.stringz("sox.renameFrom", "renameFrom") +local f_soxRenameTo = ProtoField.stringz("sox.renameTo", "renameTo") +local f_soxPlatformId = ProtoField.stringz("sox.platformId", "platformId") +local f_soxError = ProtoField.stringz("sox.errorStr", "errorStr") + +local f_soxBytes = ProtoField.bytes("sox.byteVal", "byteVal") + +sox_proto.fields = {f_soxCmd, f_soxReplyNum, f_soxCompId, f_soxSlotId, + f_parentCompId, f_kitId, f_typeId, f_compName, + f_compWhat, f_linkAction, f_linkFromCompId, + f_fileOpenMethod, f_fileUri, f_fileSize, + f_linkFromSlotId, f_linkToCompId, f_linkToSlotId, f_chunkNum, + f_chunkSize, f_soxBytes, f_soxRenameFrom, f_soxRenameTo, f_soxPlatformId, f_soxError} + +local msg_types = { + [0] = {"discover", "Discover"}, + [1] = {"hello", "Hello"}, + [2] = {"challenge", "Challenge"}, + [3] = {"authenticate", "Authenticate"}, + [4] = {"welcome", "Welcome"}, + [5] = {"keepAlive", "KeepAlive"}, + [6] = {"datagram", "Datagram"}, + [7] = {"close", "Close"} +}; + +local header_mappings = { + [0x05] = "version", + [0x09] = "remoteId", + [0x0e] = "digestAlgorithm", + [0x13] = "nonce", + [0x16] = "username", + [0x1b] = "digest", + [0x1d] = "idealMax", + [0x21] = "absMax", + [0x25] = "ack", + [0x2b] = "ackMore", + [0x2d] = "receiveMax", + [0x31] = "receiveTimeout", + [0x35] = "errorCode", + [0x3a] = "platformId" +}; + +local header_ids = { + [1] = "version", + [2] = "remoteId", + [3] = "digestAlgorithm", + [4] = "nonce", + [5] = "username", + [6] = "digest", + [7] = "idealMax", + [8] = "absMax", + [9] = "ack", + [10] = "ackMore", + [11] = "receiveMax", + [12] = "receiveTimeout", + [13] = "errorCode", + [14] = "platformId" +}; + +local header_types = { + [0] = {"nil", "No header data"}, + [1] = {"u2", "uint2"}, + [2] = {"str", "string"}, + [3] = {"bytes", "raw bytes"} +}; + +local error_codes = { + [0xe1] = "incompatibleVersion", + [0xe2] = "busy", + [0xe3] = "digestNotSupported", + [0xe4] = "notAuthenticated", + [0xe5] = "timeout" +}; + +local sox_cmds = { + ["a"] = "add", + ["b"] = "fileRename", + ["c"] = "readComp", + ["d"] = "delete", + ["e"] = "event", + ["f"] = "fileOpen", + ["i"] = "invoke", + ["k"] = "fileChunk", + ["l"] = "link", + ["n"] = "rename", + ["o"] = "reorder", + ["q"] = "query", + ["r"] = "readProp", + ["s"] = "subscribe", + ["u"] = "unsubscribe", + ["v"] = "version", + ["w"] = "write", + ["y"] = "versionMore", + ["z"] = "fileClose", + ["!"] = "error" +}; + +function add_string(tree, field, buf, offset) + local str = buf(offset):stringz() + tree:add(field, buf(offset, string.len(str) + 1), str) + offset = offset + string.len(str) + 1 + return offset +end + +function add_compId(tree, buf, offset) + tree:add(f_soxCompId, buf(offset, 2)) + offset = offset + 2 + return offset +end + +function add_id_list(num, tree, buf, offset) + local compIds = {} + for i=1, num do + table.insert(compIds, buf(offset+(i-1)*2, 2):uint()) + end + tree:add(buf(offset, 2*num), "compIds", table.concat(compIds, ",")) + offset = offset + 2*num + return offset +end + +function add_whatMask(tree, buf, offset) + local mask = buf(offset, 1):uint() + local maskElem = tree:add(buf(offset, 1), "whatMask", string.format("0x%02x", mask)) + offset = offset + 1 + if mask == 0xff then + maskElem:append_text("(all tree)") + else + local parts = {} + if bit.band(mask, 0x01) then table.insert(parts, "tree") end + if bit.band(mask, 0x02) then table.insert(parts, "config") end + if bit.band(mask, 0x04) then table.insert(parts, "runtime") end + if bit.band(mask, 0x08) then table.insert(parts, "links") end + maskElem:append_text("(" .. table.concat(parts, "|") .. ")") + end + + return offset +end + +function add_file_headers(tree, buf, offset) + local byte = buf(offset, 1):uint() + while byte ~= 0 do + local start = offset + local name = buf(offset):stringz() + offset = offset + string.len(name) + 1 + + local value = buf(offset):stringz() + offset = offset + string.len(value) + 1 + tree:add(buf(start, offset-start), name, value) + + byte = buf(offset, 1):uint() + end + offset = offset + 1 + + return offset +end + +function parse_comp_tree(tree, buf, offset) + local subtree = tree:add(f_compWhat, buf(offset, 1), buf(offset, 1):string(), "compTree") + offset = offset + 1 + + subtree:add(f_kitId, buf(offset, 1)) + offset = offset + 1 + + subtree:add(f_typeId, buf(offset, 1)) + offset = offset + 1 + + offset = add_string(subtree, f_compName, buf, offset) + + subtree:add(f_parentCompId, buf(offset, 2)) + offset = offset + 2 + + subtree:add(buf(offset, 1), "permissions", string.format("0x%02x", buf(offset, 1):uint())) + offset = offset + 1 + + local numKids = buf(offset, 1):uint() + subtree:add(buf(offset, 1), "numKids", numKids) + offset = offset + 1 + + offset = add_id_list(numKids, subtree, buf, offset) + + return offset +end + +function parse_comp_links(tree, buf, offset) + local subtree = tree:add(f_compWhat, buf(offset, 1), buf(offset, 1):string(), "compLink") + offset = offset + 1 + + local index = 1 + local fromCompId = buf(offset, 2):uint() + while fromCompId ~= 0xffff do + local fromSlotId = buf(offset+2, 1):uint() + local toCompId = buf(offset+3, 2):uint() + local toSlotId = buf(offset+5, 1):uint() + + local label = "" .. fromCompId .. "." .. fromSlotId .. " -> " .. toCompId .. "." .. toSlotId + subtree:add(buf(offset, 6), "Link" .. index, label) + offset = offset + 6 + index = index + 1 + + fromCompId = buf(offset, 2):uint() + end + offset = offset + 2 + + return offset +end + +function parse_comp_props(tree, buf, offset) + local typeChar = buf(offset, 1):string() + local subtree = nil + if typeChar == "c" or typeChar == "C" then + subtree = tree:add(f_compWhat, buf(offset, 1), buf(offset, 1):string(), "configProps") + elseif typeChar == "r" or typeChar == "R" then + subtree = tree:add(f_compWhat, buf(offset, 1), buf(offset, 1):string(), "runtimeProps") + end + offset = offset + 1 + + return offset +end + +local sox_handlers = { + -- add comp + ["a"] = function(tree, buf, offset) + tree:add(f_parentCompId, buf(offset, 2)) + offset = offset + 2 + + tree:add(f_kitId, buf(offset, 1)) + offset = offset + 1 + + tree:add(f_typeId, buf(offset, 1)) + offset = offset + 1 + + offset = add_string(tree, f_compName, buf, offset) + + -- TODO: handle configVals + return offset + end, + ["A"] = function(tree, buf, offset) + offset = add_compId(tree, buf, offset) + return offset + end, + + -- fileRename + ["b"] = function (tree, buf, offset) + offset = add_string(tree, f_soxRenameFrom, buf, offset) + offset = add_string(tree, f_soxRenameTo, buf, offset) + return offset + end, + + -- readComp + ["c"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + + local mapping = {t = "tree", c = "config", r = "runtime", l = "links"} + local whatElem = tree:add(f_compWhat, buf(offset, 1)) + local whatChar = buf(offset, 1):string() + whatElem:append_text("(" .. mapping[whatChar] .. ")") + offset = offset + 1 + + return offset + end, + ["C"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + + local compDataChar = buf(offset, 1):string() + if compDataChar == "t" then + offset = parse_comp_tree(tree, buf, offset) + elseif compDataChar == "l" then + offset = parse_comp_links(tree, buf, offset) + elseif compDataChar == "c" or compDataChar == "r" or compDataChar == "C" or compDataChar == "R" then + offset = parse_comp_props(tree, buf, offset) + end + return offset + end, + + -- delete + ["d"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + return offset + end, + + -- event + ["e"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + + local compDataChar = buf(offset, 1):string() + if compDataChar == "t" then + offset = parse_comp_tree(tree, buf, offset) + elseif compDataChar == "l" then + offset = parse_comp_links(tree, buf, offset) + elseif compDataChar == "c" or compDataChar == "r" or compDataChar == "C" or compDataChar == "R" then + offset = parse_comp_props(tree, buf, offset) + end + return offset + end, + + -- fileOpen + ["f"] = function (tree, buf, offset) + offset = add_string(tree, f_fileOpenMethod, buf, offset) + offset = add_string(tree, f_fileUri, buf, offset) + + tree:add(f_fileSize, buf(offset, 4)) + offset = offset + 4 + + tree:add(buf(offset, 2), "suggestedChunkSize", buf(offset, 2):uint()) + offset = offset + 2 + + offset = add_file_headers(tree, buf, offset) + + return offset + end, + ["F"] = function (tree, buf, offset) + tree:add(f_fileSize, buf(offset, 4)) + offset = offset + 4 + + tree:add(buf(offset, 2), "actualChunkSize", buf(offset, 2):uint()) + offset = offset + 2 + + offset = add_file_headers(tree, buf, offset) + + return offset + end, + + -- invoke + ["i"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + + tree:add(f_soxSlotId, buf(offset, 1)) + offset = offset + 1 + + -- TODO: parse val + return offset + end, + + -- fileChunk + ["k"] = function (tree, buf, offset) + tree:add(f_chunkNum, buf(offset, 2)) + offset = offset + 2 + + local chunkSize = buf(offset, 2):uint() + tree:add(f_chunkSize, buf(offset, 2)) + offset = offset + 2 + + tree:add(f_soxBytes, buf(offset, chunkSize)) + offset = offset + chunkSize + + return offset + end, + + -- link + ["l"] = function (tree, buf, offset) + local linkType = buf(offset, 1) + local linkTypeElem = tree:add(f_linkAction, linkType) + offset = offset + 1 + + local fromCompId = buf(offset, 2):uint() + tree:add(f_linkFromCompId, buf(offset, 2)) + offset = offset + 2 + local fromSlotId = buf(offset, 1):uint() + tree:add(f_linkFromSlotId, buf(offset, 1)) + offset = offset + 1 + + local toCompId = buf(offset, 2):uint() + tree:add(f_linkToCompId, buf(offset, 2)) + offset = offset + 2 + local toSlotId = buf(offset, 1):uint() + tree:add(f_linkToSlotId, buf(offset, 1)) + offset = offset + 1 + + local label = "" .. fromCompId .. "." .. fromSlotId .. " -> " .. toCompId .. "." .. toSlotId + if string.char(linkType:uint()) == "a" then + linkTypeElem:append_text("(add link: " .. label .. ")") + else + linkTypeElem:append_text("(delete link: " .. label .. ")") + end + return offset + end, + + -- rename + ["n"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + offset = add_string(tree, f_compName, buf, offset) + + return offset + end, + + -- reorder + ["o"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + + local numChildren = buf(offset, 1):uint() + tree:add(buf(offset, 1), "numChildren", buf(offset, 1):uint()) + offset = offset + 1 + + offset = add_id_list(numChildren, tree, buf, offset) + + return offset + end, + + -- readProp + ["r"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + + tree:add(buf(offset, 1), "propId", buf(offset, 1):uint()) + offset = offset + 1 + + return offset + end, + ["R"] = function (tree, buf, offset) + tree:add(buf(offset, 1), "ignored", buf(offset, 1):uint()) + offset = offset + 1 + -- TODO: parse prop val + return offset + end, + + -- subscribe + ["s"] = function (tree, buf, offset) + offset = add_whatMask(tree, buf, offset) + + local num = buf(offset, 1):uint() + tree:add(buf(offset, 1), "num", num) + offset = offset + 1 + + offset = add_id_list(num, tree, buf, offset) + + return offset + end, + ["S"] = function (tree, buf, offset) + tree:add(buf(offset, 1), "numSubscribed", buf(offset, 1):uint()) + offset = offset + 1 + return offset + end, + + -- unsubscribe + ["u"] = function (tree, buf, offset) + offset = add_whatMask(tree, buf, offset) + + local num = buf(offset, 1):uint() + tree:add(buf(offset, 1), "num", num) + offset = offset + 1 + + offset = add_id_list(num, tree, buf, offset) + + return offset + end, + + -- version + ["V"] = function (tree, buf, offset) + local kitCount = buf(offset, 1):uint() + tree:add(buf(offset, 1), "kitCount", kitCount) + offset = offset + 1 + + local parts = {} + local start = offset + for i=1, kitCount do + local str = buf(offset):stringz() + offset = offset + string.len(str) + 1 + table.insert(parts, str .. "@" .. string.format("0x%x", buf(offset, 4):uint())) + offset = offset + 4 + end + tree:add(buf(start, offset-start), "kits", table.concat(parts, ", ")) + + return offset + end, + + -- write + ["w"] = function (tree, buf, offset) + offset = add_compId(tree, buf, offset) + + tree:add(f_soxSlotId, buf(offset, 1)) + offset = offset + 1 + + --TODO: handle val + + return offset + end, + + -- versionMore + ["Y"] = function (tree, buf, offset) + offset = add_string(tree, f_soxPlatformId, buf, offset) + + local scodeFlags = buf(offset, 1):uint() + tree:add(buf(offset, 1), "scodeFlags", string.format("0x%02x", scodeFlags)) + offset = offset + 1 + + -- TODO: very hard to parse versionMore data + -- local start = offset + -- local versions = {} + -- local str = buf(offset):stringz("utf-8") + -- table.insert(versions, str) + -- offset = offset + string.len(str) + 1 + + return offset + end, + + -- query + ["q"] = function (tree, buf, offset) + tree:add(buf(offset, 1), "queryType", buf(offset, 1):string()) + offset = offset + 1 + + while offset < buf:len() do + tree:add(f_kitId, buf(offset, 1)) + offset = offset + 1 + + tree:add(f_typeId, buf(offset, 1)) + offset = offset + 1 + end + return offset + end, + ["Q"] = function (tree, buf, offset) + local ids = {} + local start = offset + local compId = buf(offset, 2):uint() + while compId ~= 0xffff do + table.insert(ids, compId) + offset = offset + 2 + + compId = buf(offset, 2):uint() + end + offset = offset + 2 + + tree:add(buf(start, offset-start), "compIds", table.concat(ids, ",")) + + return offset + end, + + -- error + ["!"] = function (tree, buf, offset) + offset = add_string(tree, f_soxError, buf, offset) + return offset + end, + +}; + +-- helpers + +function parse_sox(tree, buf, offset) + local cmdVal = buf(offset, 1):uint() + local cmdElem = tree:add(f_soxCmd, buf(offset, 1)) + if sox_cmds[string.char(cmdVal)] ~= nil then + cmdElem:append_text(" ('" .. string.char(cmdVal) .. "' " .. sox_cmds[string.char(cmdVal)] .. ")") + elseif sox_cmds[string.char(cmdVal):lower()] ~= nil then + cmdElem:append_text(" ('" .. string.char(cmdVal) .. "' " .. sox_cmds[string.char(cmdVal):lower()] .. " response)") + end + offset = offset + 1 + + tree:add(f_soxReplyNum, buf(offset, 1)) + offset = offset + 1 + + local cmdChar = string.char(cmdVal) + local handler = sox_handlers[cmdChar] + if handler ~= nil then + offset = handler(tree, buf, offset) + end + + -- output all pending bytes + if offset < buf:len() then + tree:add(f_soxBytes, buf(offset)) + offset = buf:len() + end + + return offset +end + +function add_header(tree, buf, offset) + local headerVal = buf(offset, 1) + local headerIdVal = headerVal:bitfield(0, 6) + local headerTypeVal = headerVal:bitfield(6, 2) + + local headerName = '' + if header_ids[headerIdVal] ~= nil then + headerName = header_ids[headerIdVal] + end + + if headerTypeVal == 0 then + if headerIdVal == 0x0d then + local elem = tree:add(f_headerErrorCode, buf(offset, 1)) + elem:append_text(" (" .. error_codes[headerVal:uint()] .. ")") + else + tree:add(buf(offset, 1), headerName) + end + offset = offset + 1 + elseif headerTypeVal == 1 then + if headerName == "ack" then + tree:add(f_headerAck, buf(offset, 3), buf(offset+1, 2):uint()) + elseif headerName == "ackMore" then + -- GOTCHA: there is a bug in old version of sox, ackMore is set as u2, + -- but encoded in bytes(only 1 byte). here is a workaround to + -- make this case work + tree:add(f_headerAckMore, buf(offset+2, 1)); + else + tree:add(buf(offset, 3), headerName, buf(offset+1, 2):uint()) + end + offset = offset + 3 + elseif headerTypeVal == 2 then + local str = buf(offset+1):stringz() + tree:add(buf(offset, string.len(str) + 1 + 1), headerName, str) + offset = offset + string.len(str) + 1 + 1 + elseif headerTypeVal == 3 then + local len = buf(offset+1, 1):uint() + local ba = buf(offset+2, len):bytes() + local baStr = '' + for i=0, ba:len()-1 do + baStr = baStr .. string.format("%02x", ba:get_index(i)) + end + + if headerName == "ackMore" then + tree:add(f_headerAckMore, buf(offset+2, len)) + else + tree:add(buf(offset, len+2), headerName, baStr) + end + offset = offset + len + 2 + end + + return offset +end + +function parse_headers(subtree, buf, headerOffset, headerNum) + for i=1, headerNum do + headerOffset = add_header(subtree, buf, headerOffset) + end + + return headerOffset +end + +-- dissector function +function dasp_proto.dissector(buf, pinfo, tree) + if buf:len() < 5 then return end + + pinfo.cols.protocol = dasp_proto.name + + local subtree = tree:add(dasp_proto, buf(0)) + subtree:add(f_sessionId, buf(0, 2)) + subtree:add(f_seqNum, buf(2, 2)) + + local typeVal = buf(4, 1):bitfield(0, 4) + local msgType = subtree:add(f_msgType, buf(4, 1), typeVal) + if msg_types[typeVal] ~= nil then + msgType:append_text(" (" .. msg_types[typeVal][1] .. ")") + pinfo.cols.info = string.format("seqNum: %5d msgType: %-12s %s", buf(2, 2):uint(), msg_types[typeVal][1], pinfo.cols.info) + else + pinfo.cols.info = string.format("seqNum: %5d %-12s", buf(2, 2):uint(), pinfo.cols.info) + end + + local headerNum = buf(4, 1):bitfield(4, 4) + subtree:add(f_headerFieldNum, buf(4, 1), headerNum) + + -- header fields + local headerOffset = 5 + headerOffset = parse_headers(subtree, buf, headerOffset, headerNum) + + if typeVal == 0x06 and headerOffset < buf:len() then + local soxtree = subtree:add(sox_proto, buf(headerOffset)) + parse_sox(soxtree, buf, headerOffset) + end +end + +function dasp_proto.init() + local udp_table = DissectorTable.get("udp.port") + udp_table:add(dasp_proto.prefs["udp_port"], dasp_proto) +end diff --git a/dissectors/seismocloud/LICENSE b/dissectors/seismocloud/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/dissectors/seismocloud/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/seismocloud/README.md b/dissectors/seismocloud/README.md new file mode 100644 index 0000000..b828760 --- /dev/null +++ b/dissectors/seismocloud/README.md @@ -0,0 +1,46 @@ +# SeismoCloud (capteurs sismiques, interface de commande locale) + +Dissecteur Wireshark Lua de l'**interface de commande locale SeismoCloud** +(application ↔ capteur), utilisée par les sismomètres du réseau +participatif SeismoCloud (université La Sapienza de Rome) sur UDP 62001 : +octets magiques, puis commande — DISCOVERY / DISCOVERY_REPLY, PING / PONG, +STREAM_START / STREAM_STOP, SENDGPS, OK, SETSYSLOG, REBOOT, GETINFO / +GETINFO_REPLY — avec décodage de l'adresse MAC, des coordonnées GPS et +des informations du capteur. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/sapienzaapps/galileo-terremoti (fichier `seismocloud.lua`) | +| Commit importé | `82e894e7ab4a7f289a50aaed1cf88c11c44b459d` du 23/01/2019 (branche `master`, dernier commit ; dernière modification du dissecteur : `990acba` du 30/10/2017) | +| Licence amont | GPL-3.0-only (`LICENSE` amont : texte de la GPL v3, sans mention « or any later version » ; README amont : « See LICENSE file » ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur SeismoCloud natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `seismocloud.lua` | Dissecteur `seismoproto` (UDP 62001) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `seismocloud.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) — plutôt que la méthode amont +historique `dofile` dans `init.lua` — recharger les plugins Lua, puis +filtrer avec `seismoproto`. + +## Remarques + +- Le projet amont (Raspberry Pi ; Intel Galileo abandonné) n'est plus + maintenu depuis 2019 ; le protocole a pu évoluer dans les capteurs + récents (non vérifié). +- Variables et fonctions globales (`seismoproto`, `mac2string`, + `udp_table`…) comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/seismocloud/seismocloud.lua b/dissectors/seismocloud/seismocloud.lua new file mode 100644 index 0000000..2c7b12f --- /dev/null +++ b/dissectors/seismocloud/seismocloud.lua @@ -0,0 +1,189 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/sapienzaapps/galileo-terremoti (seismocloud.lua), +-- commit 82e894e7ab4a7f289a50aaed1cf88c11c44b459d du 23/01/2019. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- Script Wireshark for SeismoCloud local command interface decoding (app<->device) +-- Add into init.lua this line (without "--"): +-- dofile("seismocloud.lua") +-- You should place this file into the same directory of "init.lua" + + +seismoproto = Proto("seismoproto", "SeismoCloud Protocol") + +function mac2string(buffer, i) + return string.format('%02X', buffer(i, 1):uint()) + .. string.format('%02X', buffer(i+1, 1):uint()) + .. string.format('%02X', buffer(i+2, 1):uint()) + .. string.format('%02X', buffer(i+3, 1):uint()) + .. string.format('%02X', buffer(i+4, 1):uint()) + .. string.format('%02X', buffer(i+5, 1):uint()); +end + +function hex2float (c) + if c == 0 then return 0.0 end + local c = string.gsub(string.format("%08X", c),"(..)",function (x) return string.char(tonumber(x, 16)) end) + local b1,b2,b3,b4 = string.byte(c, 1, 4) + local sign = b1 > 0x7F + local expo = (b1 % 0x80) * 0x2 + math.floor(b2 / 0x80) + local mant = ((b2 % 0x80) * 0x100 + b3) * 0x100 + b4 + + if sign then + sign = -1 + else + sign = 1 + end + + local n + + if mant == 0 and expo == 0 then + n = sign * 0.0 + elseif expo == 0xFF then + if mant == 0 then + n = sign * math.huge + else + n = 0.0/0.0 + end + else + n = sign * math.ldexp(1.0 + mant / 0x800000, expo - 0x7F) + end + + return n +end + + +function seismoproto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "SEISMOPROTO" + if buffer(0, 4):uint() == 0x494e4756 then -- INGV in hex + local i = 0 + local subtree = tree:add(seismoproto, buffer(), "SeismoCloud Protocol Data") + subtree:add(buffer(i, 5), i .. ": Magic bytes") + i = i + 5 + + local command = "UNKNOWN" + local cmdbyte = buffer(i, 1):uint() + if cmdbyte == 1 then + command = "DISCOVERY" + elseif cmdbyte == 2 then + command = "DISCOVERY_REPLY" + elseif cmdbyte == 3 then + command = "PING" + elseif cmdbyte == 4 then + command = "PONG" + elseif cmdbyte == 5 then + command = "STREAM_START" + elseif cmdbyte == 6 then + command = "STREAM_STOP" + elseif cmdbyte == 7 then + command = "SENDGPS" + elseif cmdbyte == 8 then + command = "OK" + elseif cmdbyte == 9 then + command = "SETSYSLOG" + elseif cmdbyte == 10 then + command = "REBOOT" + elseif cmdbyte == 11 then + command = "GETINFO" + elseif cmdbyte == 12 then + command = "GETINFO_REPLY" + end + subtree:add(buffer(i, 1), i .. ": " .. command .. " command") + i = i + 1 + + if cmdbyte == 2 then -- DISCOVERY_REPLY + subtree:add(buffer(i, 6), i .. ": MAC Address: " .. mac2string(buffer, i)); + i = i + 6 + + subtree:add(buffer(i, 4), i .. ": Version") + i = i + 4 + + subtree:add(buffer(i, 8), i .. ": Model") + i = i + 8 + elseif cmdbyte == 7 then + subtree:add(buffer(i, 6), i .. ": Dest. MAC Address: " .. mac2string(buffer, i)); + i = i + 6 + + local lat = buffer(i, 1):uint() * 16777216 + + buffer(i+1, 1):uint() * 65536 + + buffer(i+2, 1):uint() * 256 + + buffer(i+3, 1):uint(); + subtree:add(buffer(i, 4), i .. ": GPS Latitude: " .. hex2float(lat)) + i = i + 4 + + local lon = buffer(i, 1):uint() * 16777216 + + buffer(i+1, 1):uint() * 65536 + + buffer(i+2, 1):uint() * 256 + + buffer(i+3, 1):uint(); + subtree:add(buffer(i, 4), i .. ": GPS Longitude: " .. hex2float(lon)) + i = i + 4 + elseif cmdbyte == 12 then + subtree:add(buffer(i, 6), i .. ": Dest. MAC Address: " .. mac2string(buffer, i)); + i = i + 6 + + subtree:add(buffer(i, 4), i .. ": SYSLOG server"); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": X threshold"); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": Y threshold"); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": Z threshold"); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": Uptime: " .. buffer(i, 4):uint()); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": UNIX time: " .. buffer(i, 4):uint()); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": Software version"); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": Free RAM"); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": Latency"); + i = i + 4 + + subtree:add(buffer(i, 4), i .. ": NTP server"); + i = i + 4 + + local b = i + local strsize = 0 + while buffer(b, 1):uint() > 0 do + strsize = strsize + 1 + b = b + 1 + end + + subtree:add(buffer(i, strsize), i .. ": HTTP Base address") + i = i + strsize + + b = i + strsize = 0 + while buffer(b, 1):uint() > 0 do + strsize = strsize + 1 + b = b + 1 + end + + subtree:add(buffer(i, strsize), i .. ": Platform name") + i = i + strsize + + b = i + strsize = 0 + while buffer(b, 1):uint() > 0 do + strsize = strsize + 1 + b = b + 1 + end + + subtree:add(buffer(i, strsize), i .. ": Accelerometer name") + i = i + strsize + + subtree:add(buffer(i, 4), i .. ": Probe Speed (values/sec)"); + i = i + 4 + end + end +end + +udp_table = DissectorTable.get("udp.port") +udp_table:add(62001, seismoproto) diff --git a/dissectors/shardagnostic-network/LICENSE b/dissectors/shardagnostic-network/LICENSE new file mode 100644 index 0000000..f433b1a --- /dev/null +++ b/dissectors/shardagnostic-network/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/dissectors/shardagnostic-network/NOTICE b/dissectors/shardagnostic-network/NOTICE new file mode 100644 index 0000000..d36332e --- /dev/null +++ b/dissectors/shardagnostic-network/NOTICE @@ -0,0 +1,14 @@ +Copyright 2021 The-Blockchain-Company + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/dissectors/shardagnostic-network/README.md b/dissectors/shardagnostic-network/README.md new file mode 100644 index 0000000..40e2866 --- /dev/null +++ b/dissectors/shardagnostic-network/README.md @@ -0,0 +1,53 @@ +# Shardagnostic Network — multiplexage réseau (dérivé d'Ouroboros) + +Dissecteur Wireshark Lua du protocole `shardagnostic` de +**The-Blockchain-Company** : en-tête de multiplexage (horodatage de +transmission, conversation = mini-protocole et sens initiateur / +répondeur, longueur), réassemblage TCP et nom du message des +mini-protocoles Handshake, ChainSync, BlockFetch, TxSubmission et +KeepAlive (DeltaQueue nommé dans les conversations) ; port TCP 6061. + +Il s'agit d'une copie renommée d'une ancienne version du dissecteur +`ouroboros_network.lua` du réseau Cardano (IOG), déjà importé dans +`dissectors/ouroboros-network/` (#484) : même structure, mêmes champs +(préfixe `shardagnostic.` au lieu de `ouroboros.`), sans Peer Sharing ni +passage de la charge utile au dissecteur CBOR. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/The-Blockchain-Company/shardagnostic-network (fichier `shardagnostic-network/wireshark-plugin/shardagnostic_network.lua`) | +| Commit importé | `054398f81a5b0b46498adcb3a2167c2ce8ad2b1f` du 24/10/2022 (branche `main`, dernier commit ; dernière modification du script : `e80b661` du 22/10/2021) | +| Licence amont | Apache-2.0 (fichier `shardagnostic-network/LICENSE`, copié ici ; `NOTICE` : « Copyright 2021 The-Blockchain-Company », copié ici) ; le script n'a pas d'en-tête de licence. Le code d'origine (ouroboros-network d'IOG) est lui aussi sous Apache-2.0 | +| Natif Wireshark 4.6.4 | Non | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `shardagnostic_network.lua` | Protocole `shardagnostic`, TCP 6061 | +| `LICENSE`, `NOTICE` | Licence Apache 2.0 et avis de copyright amont | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. + +## Utilisation + +Copier `shardagnostic_network.lua` dans le dossier `plugins` de Wireshark +(le README amont cite par erreur `ark_network.lua`), puis filtrer avec +`shardagnostic`. + +## Remarques + +- **Conflit** : même port TCP 6061 (codé en dur ; la table + `default_settings` n'est pas utilisée) et même format que + `dissectors/ouroboros-network/ouroboros_network.lua` : ne pas installer + les deux ensemble. +- Le type de message est lu à l'octet 9 de chaque segment (suppose un + en-tête de tableau CBOR d'un octet) ; le commentaire amont rappelle + qu'il peut être faux si un message CBOR est découpé en plusieurs + segments. +- La fonction `dissectArk` (reliquat d'un autre renommage) et la variable + `result` sont globales. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/shardagnostic-network/shardagnostic_network.lua b/dissectors/shardagnostic-network/shardagnostic_network.lua new file mode 100644 index 0000000..9a90bf7 --- /dev/null +++ b/dissectors/shardagnostic-network/shardagnostic_network.lua @@ -0,0 +1,164 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/The-Blockchain-Company/shardagnostic-network (shardagnostic-network/wireshark-plugin/shardagnostic_network.lua), +-- commit 054398f81a5b0b46498adcb3a2167c2ce8ad2b1f du 24/10/2022. +-- Licence amont : Apache-2.0 (shardagnostic-network/LICENSE amont) — voir README.md. + +local default_settings = +{ + port = 6061 -- XXX Should be somethig else +} + +local shardagnostic = Proto("Shardagnostic", "Shardagnostic") + +local on_transmission_time = ProtoField.new ("Transmission Time", "shardagnostic.ts", ftypes.UINT32) +local on_length = ProtoField.new ("Length", "shardagnostic.length", ftypes.UINT16) + +local conv_ids = { + [0x0000] = "Handshake Initiator", + [0x8000] = "Handshake Responder", + [0x0001] = "DeltaQueue Initiator", + [0x8001] = "DeltaQueue Responder", + [0x0002] = "ChainSync Initiator", + [0x8002] = "ChainSync Responder", + [0x0003] = "BlockFetch Initiator", + [0x8003] = "BlockFetch Responder", + [0x8004] = "TxSubmission Responder", + [0x0004] = "TxSubmission Initiator", + [0x8008] = "KeepAlive Responder", + [0x0008] = "KeepAlive Initiator" +} +local on_conversation = ProtoField.uint16("shardagnostic.conv", "Conversation", base.HEX, conv_ids, nil, "Conversation ids") + +local handshake_msg_codes = { + [0] = "MsgProposeVersions", + [1] = "MsgAcceptVersion", + [2] = "MsgRefuse" +} +local on_handshake_msg = ProtoField.uint8("shardagnostic.handshakemsg", "Handshake Message", base.DEC, handshake_msg_codes, nil, "Handshake Message Types") + +local chainsync_msg_codes = { + [0] = "MsgRequestNext", + [1] = "MsgAwaitReply", + [2] = "MsgRollForward", + [3] = "MsgRollBackward", + [4] = "MsgFindIntersect", + [5] = "MsgIntersectFound", + [6] = "MsgIntersectNotFound", + [7] = "MsgDone" +} + +local on_chainsync_msg = ProtoField.uint8("shardagnostic.chainmsg", "ChainSync Message", base.DEC, chainsync_msg_codes, nil, "ChainSync Message Types") + +local blockfetch_msg_codes = { + [0] = "MsgRequestRange", + [1] = "MsgClientDone", + [2] = "MsgStartBatch", + [3] = "MsgNoBlocks", + [4] = "MsgBlock", + [5] = "MsgBatchDone" +} + +local on_blockfetch_msg = ProtoField.uint8("shardagnostic.blockmsg", "BlockFetch Message", base.DEC, blockfetch_msg_codes, nil, "BlockFetch Message Types") + +local ON_HDR_LEN = 8 + +local txsubmission_msg_codes = { + [0] = "MsgRequestTxIds", + [1] = "MsgReplyTxIds", + [2] = "MsgRequestTxs", + [3] = "MsgReplyTxs", + [4] = "MsgDone", + [6] = "MsgHello" +} + +local on_txsubmission_msg = ProtoField.uint8("shardagnostic.txsubmsg", "TxSubmission Message", base.DEC, txsubmission_msg_codes, nil, "TxSubmission Message Types") + +local ON_HDR_LEN = 8 + +local keepalive_msg_codes = { + [0] = "MsgKeepAlive", + [1] = "MsgKeepAliveResponse", + [2] = "MsgDone" +} + +local on_keepalive_msg = ProtoField.uint8("shardagnostic.keepalivemsg", "KeepAlive Message", base.DEC, keepalive_msg_codes, nil, "KeepAlive Message Types") + + +shardagnostic.fields = { + on_transmission_time, + on_conversation, + on_length, + on_handshake_msg, + on_chainsync_msg, + on_blockfetch_msg, + on_txsubmission_msg, + on_keepalive_msg +} + + +function shardagnostic.dissector(tvbuf, pktinfo, root) + + local pktlen = tvbuf:len() + local offset = 0 + + while offset < pktlen do + result = dissectArk(tvbuf, pktinfo, root, offset) + if result > 0 then + -- We parsed an Shardagnostic message + offset = offset + result + else + -- we need more bytes + pktinfo.desegment_offset = offset + result = -result + pktinfo.desegment_len = result + return pktlen + end + end +end + +dissectArk = function (tvbuf, pktinfo, root, offset) + + local msglen = tvbuf:len() - offset + if msglen < ON_HDR_LEN then + -- Not enough data to read the header, we need at least one more segmet. + return -DESEGMENT_ONE_MORE_SEGMENT + end + + local on_length_buf = tvbuf:range(offset + 6, 2) + local length = on_length_buf:uint() + + if msglen < ON_HDR_LEN + length then + -- more bytes needed to read the whole message + return -(length - msglen + ON_HDR_LEN) + end + + pktinfo.cols.protocol = shardagnostic.name + + local subtree = root:add(shardagnostic, tvbuf(), "Shardagnostic") + local conv = tvbuf:range(offset + 4, 2) + local convId = conv:uint() + + if (convId >= 0x8000) then convId = convId - 0x8000 + end + + subtree:add(on_transmission_time, tvbuf:range(offset, 4)) + subtree:add(on_conversation, conv) + subtree:add(on_length, length) + + -- XXX Without completly parsing the CBOR payload we can't be sure that this is + -- the correct message type since a CBOR message may be split into + -- multiple MUX segements. + if convId == 0 then subtree:add(on_handshake_msg, tvbuf:range(offset + 9, 1)) + elseif convId == 2 then subtree:add(on_chainsync_msg, tvbuf:range(offset + 9, 1)) + elseif convId == 3 then subtree:add(on_blockfetch_msg, tvbuf:range(offset + 9, 1)) + elseif convId == 4 then subtree:add(on_txsubmission_msg, tvbuf:range(offset + 9, 1)) + elseif convId == 8 then subtree:add(on_keepalive_msg, tvbuf:range(offset + 9, 1)) + end + + return ON_HDR_LEN + length +end + +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(6061, shardagnostic) + +-- vim: noexpandtab diff --git a/dissectors/siemens-apogee-p2/LICENSE b/dissectors/siemens-apogee-p2/LICENSE new file mode 100644 index 0000000..f21f693 --- /dev/null +++ b/dissectors/siemens-apogee-p2/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 James Cupps + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/siemens-apogee-p2/README.md b/dissectors/siemens-apogee-p2/README.md new file mode 100644 index 0000000..6f47284 --- /dev/null +++ b/dissectors/siemens-apogee-p2/README.md @@ -0,0 +1,55 @@ +# Siemens APOGEE P2 (Protocol II, gestion technique du bâtiment) + +Dissecteur Wireshark Lua du **protocole P2 (« Protocol II ») de Siemens +APOGEE**, protocole propriétaire des automates de gestion technique du +bâtiment (panneaux PXC, réseau ALN / BLN) sur TCP 5033 : réassemblage TCP +avec plusieurs PDU par segment, en-tête de trame (longueurs vérifiées, +séquence, sens), créneaux de routage `[BLN, nœud destination, BLN, nœud +source]`, code d'opération AP2 (jeu complet de noms, « opérandes » codés +dans l'opcode pour 55 familles), puis décodeurs par opération : poussée de +valeurs COV, réplication de la table des nœuds, identité / maintien de +connexion, lecture et commande de points, alarmes et alarmes avancées, +programmation horaire d'équipements, réponses corrélées à leur requête, +codes d'erreur 0x0001–0x0E17 et schéma attendu pour environ 440 opcodes. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/jamesccupps/P2_Wireshark_Dissector_And_P2_Scanner (fichier `p2.lua`, version 2.8) | +| Commit importé | `fec437fc45eca0ec4a36d763c23a560ad4020370` du 14/10/2026 (branche `main`, dernier commit ; dernière modification du dissecteur : `2a6f7f6` du 24/09/2026) | +| Licence amont | MIT (`LICENSE` amont, © 2026 James Cupps) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur APOGEE P2 natif (le `p22` natif est la messagerie X.400, sans rapport) | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `p2.lua` | Dissecteur `p2` (TCP 5033), ≈ 3 760 lignes, fins de ligne CRLF d'origine conservées | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. Non importés : la référence +`PROTOCOL.md` (≈ 800 Ko), le scanner actif Python (`p2_scanner.py`, +`p2_gui.py`…), le panneau virtuel `virtual_pxc/`, la passerelle BACnet +`bridge/` et leurs tests. + +## Utilisation + +Copier `p2.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua +(Ctrl+Maj+L), puis filtrer avec `p2` (ex. `p2.operand`). Ponctuellement : +`tshark -X lua_script:p2.lua -r capture.pcapng`. Si P2 tourne sur un autre +port que 5033 : « Décoder comme… » → TCP port → P2. + +## Remarques + +- Noms d'opcodes et structures reconstitués par l'auteur à partir de + captures réelles (rétro-ingénierie) ; certains schémas sont « dérivés » + et marqués comme tels dans l'arbre. +- Utilise la bibliothèque `bit` (fournie par Wireshark), pas `bit32`. +- Le dépôt amont fournit aussi un scanner **actif** (lecture des panneaux) : + seul le dissecteur passif est importé ici. +- Pas de capture d'exemple amont importée ; non vérifié dans Wireshark. diff --git a/dissectors/siemens-apogee-p2/p2.lua b/dissectors/siemens-apogee-p2/p2.lua new file mode 100644 index 0000000..ec7a706 --- /dev/null +++ b/dissectors/siemens-apogee-p2/p2.lua @@ -0,0 +1,3763 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/jamesccupps/P2_Wireshark_Dissector_And_P2_Scanner (p2.lua), +-- commit fec437fc45eca0ec4a36d763c23a560ad4020370 du 14/10/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- p2.lua — Siemens APOGEE P2 (Protocol II) Wireshark dissector +-- Version: 2.8 (2026-08-25) -- the two EQS records decoded in full +-- +-- Changelog +-- 2.8 The two EQS upload records decoded in full. +-- * 0x0989 mode schedule: eleven fields, not five. entry_enabled, mode, +-- occurrence, scheduled_days (a BITMASK, bit0=Sunday), start/end date, +-- start/stop time, days_spanned, exclusive, state_text_id. The old +-- reading landed on the dates by accident and mislabelled three fields. +-- * 0x0987 zone: the lead u16 is a COUNT OF NAMES. What was called a +-- two-byte separator is the second Team_response's own name_space -- +-- and the pair is system-name + user-name, not a duplicate. +-- * The trailing u16 on both is the state-text-table id: constant per +-- zone and identical across both opcodes. +-- 2.7 Error table corrected. Eight names were wrong -- three outright and a +-- five-code off-by-one -- and are replaced by the full 0x0001..0x0E17 set. +-- * 0x0E11 was "already_exists"; it is fln_invalid_drop_number. The +-- scanner had been treating it as a success, so a failed FLN point-add +-- reported as having worked. +-- * 0x0E12 was "record_state_rejected (unconfirmed)" / "invalid_point_number"; +-- it is fln_device_failed. Invalid point number is 0x0E13. +-- * 0x0009 was unnamed; it is already_exists. +-- * 0x0002 was "out_of_scope"; it is invalid_operation. +-- * 0x0E10-0x0E17 is the FLN error band -- field-level faults, not +-- record-state rejections. +-- * 0x00AC "not_supported" also covers a function code specific to a +-- different firmware revision, so it does not prove an opcode is +-- unimplemented. +-- 2.6 Accuracy pass against the corpus. +-- * 0x29 / 0x2A carrier labels corrected. They were named "peer maintenance" +-- and "peer COV-subscribe"; the corpus establishes neither function. They +-- are now "session carrier" and "peer-session carrier (panel<->panel)", +-- matching PROTOCOL.md 6.2. Both carry the EBLN_PING 0x4640 identity +-- exchange. +-- * Error 0x0E12 named "record_state_rejected (unconfirmed)" -- observed a +-- few times, adjacent to already-exists, precise meaning not pinned. +-- (Superseded in 2.7: it is fln_device_failed.) +-- * Opcode 0x0030 AP2_SET_GLOBAL_DATA added. +-- * BUG FIX: the error-tail read guarded on total>=2 and then read +-- tvb(total-2,2). On a truncated dir==0x05 frame whose routing slots run to +-- the end there is no tail, so that lifted two header/slot bytes and +-- rendered a phantom error code (observed: a 13-byte frame reporting +-- "ERROR 0x0105"). Now guards on off+2, matching the tree item. +-- 2.5 Response correlation via sequence state. Responses (direction 0x01 success / +-- 0x05 error) carry NO opcode on the wire — only the request does — but a response +-- echoes its request's sequence number. The dissector now keeps a per-TCP-stream +-- {sequence -> opcode} map (populated from direction==0x00 frames) and uses it to: +-- * label each response with the operation it answers ("response to +-- POINT_LOG_VALUE", "ERROR not_found — request was POINT_CMD_VALUE"), and +-- * dispatch a response-body decoder by the recovered opcode. +-- Response decoders added (designed against real captured bytes): +-- * CABINET_DISPLAY 0x010C -> firmware banner (rev / platform / build-date TLVs, +-- then node/site/BLN + IP/MAC via the walk) — the richest unauthenticated read. +-- * EBLN_PING 0x4640 -> eBLN_Node (node/site/BLN) via the identity decoder. +-- * Value responses (POINT_LOG_VALUE 0x0220, POINT_LOG_ALARM 0x0221, COV_ENABLE +-- 0x0271, UPL_ALL_* 0x0981/0x0982, TREND_DATA_DISPLAY 0x0295): names + EU-units +-- string, and the value block (3F FF FF Fx quality sentinel + sub-type + f32) +-- where present. NOTE: in a plain analog read the f32 is not behind the quality +-- sentinel and its offset varies by point type, so it is left in the raw body +-- rather than guessed (see PROTOCOL.md 10.9 [OPEN]); UPL/sentinel-framed values +-- ARE decoded. Honest over confidently-wrong. +-- seq-state is populated only on the first pass (pinfo.visited guard); requests +-- precede their responses in capture order so the map is ready when the response is +-- seen. Unmatched responses (request not in capture) fall back to the generic walk. +-- 2.4 Added wire-verified byte decoders for the most common request/push bodies, all +-- designed against real captured bytes (not metadata): +-- * Addressing family (POINT_LOG_VALUE 0x0220, POINT_LOG_ALARM 0x0221, +-- POINT_CMD_VALUE 0x0240, POINT_CMD_PRIORITY 0x0241, TREND_DATA_DISPLAY 0x0295, +-- UPL_ALL_* 0x0981/0x0982): optional scope tag (SYST/NONE/CC + command priority + +-- 3F FF FF FF) then Name_search (name_space u16 + name TLV + suffix TLV + resume +-- cursor). POINT_CMD_VALUE also decodes the trailing f32 commanded value. +-- * COV subscribe (COV_ENABLE 0x0271 / COV_DISABLE 0x0273 / COV_DELETE_STUB 0x0272): +-- name_space + name TLV + suffix TLV + 2-byte trailer (00 FF enable / 00 00 disable). +-- * ALARM_PRINT 0x0508: scope tag, point name + descriptor TLVs, the value block +-- (3F FF FF Fx quality sentinel + point sub-type + f32), and the 8-byte event +-- timestamps. Timestamp helper decodes [yr-1900][mo][day][DOW 1=Mon][hr][min][sec][cs]. +-- These run only on dir==0x00 (responses carry no opcode, so they are not per-opcode +-- dispatched). Anything past the known prefix falls through to the generic TLV walk, +-- so an unexpected layout degrades gracefully rather than mis-splitting. +-- 2.3 COV_ANNUNCIATE (0x0274) per-point record corrected: each point is a +-- name_response = u16 name_space (00 00) + name TLV + suffix TLV, THEN the +-- f32 value + 10-byte condition block. The prior decoder consumed the first +-- point's name_space as part of the count and lacked per-point name_space +-- handling, so it stopped after the first point in a multi-point push and +-- mislabelled the empty suffix TLV (01 00 00) as a "value marker". Now decodes +-- every point in a multi-point COV and handles non-empty subpoint suffixes. +-- (EBLN_PING baseTime is a Unix-epoch wall-clock, not a tick counter; event +-- timestamps are 8 bytes incl. a day-of-week field — see PROTOCOL.md.) +-- 2.2 message-class model added -- WITHDRAWN, see below +-- 2.2 From multi-panel + command captures, later shown wrong: +-- * The 0x29/0x2A/0x2E/0x2F/0x33/0x34 values were read as message classes in +-- legacy/modern pairs chosen by firmware generation. They are not classes at +-- all: the field is a HEADER LENGTH, 13 + the total bytes of the four routing +-- slots, and those six values are simply what one site's node names summed to. +-- Compute it per frame. See PROTOCOL.md 6.2 (and 6.6 for the withdrawal). +-- The traffic is real and is selected by OPCODE: identity exchange, DB-change +-- and replication records, alarm prints. +-- * COV (0x0274) condition block: byte0 point_priority (0x23=OPER when commanded) +-- and byte1 control_status (0x00/02/03/04/06) now wire-confirmed. +-- * Sequence is per-(peer,channel) with gaps (not one global counter); responses +-- echo the request seq; reconnect resumes (no reset). +-- * UPL_ALL_* continuation is application-layer cursoring (cursor = last object +-- name), not a frame more-follows bit; single frames up to ~1570 B. +-- * Event timestamps are 8 bytes [yr-1900][mo][day][DOW 1=Mon][hr][min][sec][cs]. +-- (Candidate future decoders, not yet shipped to avoid offset-fragility: a +-- seq-stateful CABINET_DISPLAY 0x010C banner decode on the response, and an +-- ALARM_PRINT 0x0508 record decode — both currently surface via the TLV walk.) +-- 2.1 Per-opcode EXPECTED BODY SCHEMA for every defined function code, derived +-- from the AP2 ASDU type structures and shown as a "[schema: struct-derived, +-- not byte-verified]" note under the body. The actual bytes are still parsed +-- by the wire-verified bespoke decoders (COV / node roster / identity) and a +-- generic TLV/scope/value walk. The schema tells you what fields the body +-- SHOULD contain; byte-level splitting is upgraded per opcode as live captures +-- confirm it. (Field-by-field byte decode is NOT auto-generated, because the +-- struct->wire mapping is non-trivial — TLV framing, scope tags, and unproven +-- enum widths — so a generated split would be confidently wrong for most ops.) +-- 2.0 Wire-verified rebuild: the full AP2_Function_Code name set; removed the +-- UDP/10001 233.89.188.1 "presence beacon" (misattribution); opcode read at +-- the variable post-slot offset and only on dir==0x00 (no phantom opcodes); +-- 0x29-0x2F session-control band incl. 0x2A; COV/roster/identity decoders; +-- length-prefix reassembly + multi-PDU. +-- 1.x Original public version (behavioral opcode guesses; UDP beacon decoder). +-- +-- Frame (big-endian): u32 total_len | u32 msg_type | u32 sequence | u8 direction | +-- four NUL-terminated ASCII routing slots [BLN, dst, BLN, src] | +-- (only when direction==0x00) u16 AP2 function code | body +-- Opcode is at a VARIABLE offset (after the 4 NULs) and present ONLY on dir==0x00. +-- There is NO multicast "presence beacon"; the real optional availability multicast +-- is 234.5.6.7:8 (off by default), not a discovery beacon. + +-- ==== P2_DATA BEGIN (generated by gen_embed.py; do not hand-edit) ========= +-- Compiled in so this dissector is a single drop-in file with no companion +-- data to ship or lose. Regenerate in place; edits inside this block are +-- overwritten. +-- +-- p2data.opcodes opcode -> {tag, note}; tag W wire, G grain, X export +-- p2data.point_types type code -> {mnemonic, name, default_enum} +-- p2data.enum_types enum id -> {name, apogee, levels} +-- p2data.revisions revision string -> {level, cab, str} +-- p2data.families opcode -> {family, param, value}; a run of opcodes +-- that is one operation with a parameter in the opcode +local p2data = {} +p2data.opcodes = { + [0] = {tag="W", note="inconclusive (never answered)"}, + [48] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [52] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [62] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [63] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [65] = {tag="G", note="panel export, body 4-9 B; device-side default opcode table, 317 record"}, + [66] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [68] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [70] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [71] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [80] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [81] = {tag="G", note="panel export, body 12-12 B; device-side default opcode table, 317 reco"}, + [88] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [89] = {tag="G", note="panel export, body 3-3 B; device-side default opcode table, 317 record"}, + [91] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [92] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [256] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [266] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [268] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [288] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [289] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [291] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [292] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [293] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [294] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [295] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [296] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [297] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [298] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [299] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [303] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [304] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [305] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [320] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [512] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [513] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [514] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [515] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [516] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [517] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [518] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [519] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [520] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [521] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [522] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [523] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [544] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [545] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [546] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [547] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [549] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [550] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [551] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [552] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [553] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [576] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [577] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [578] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [579] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [580] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [581] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [582] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [583] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [584] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [585] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [586] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [587] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [588] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [589] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [608] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [609] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [610] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [611] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [612] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [613] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [625] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [626] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [627] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [628] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [629] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [656] = {tag="X", note="panel export, body 30-59 B; device-side default opcode table, 317 reco"}, + [657] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [660] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [661] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [663] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [668] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [669] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [670] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [671] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [680] = {tag="W", note="IMPLEMENTED"}, + [736] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [737] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [738] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [770] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [771] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [777] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [782] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [787] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [788] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [790] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [791] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [818] = {tag="G", note="panel export, body 93-159 B"}, + [856] = {tag="G", note="replication grain"}, + [864] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [865] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [866] = {tag="G", note="panel export, body 107-107 B; device-side default opcode table, 317 re"}, + [869] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [870] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [872] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [1034] = {tag="W", note="IMPLEMENTED"}, + [1038] = {tag="G", note="replication grain"}, + [1280] = {tag="X", note="panel export, body 41-42 B; device-side default opcode table, 317 reco"}, + [1281] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1282] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1283] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1284] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1285] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1288] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [1289] = {tag="W", note="IMPLEMENTED"}, + [1291] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1292] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1293] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1296] = {tag="W", note="not implemented"}, + [1312] = {tag="W", note="not implemented; panel export, body 33-75 B; device-side default opcod"}, + [1313] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1314] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1315] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1316] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1317] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1318] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1321] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1323] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1324] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1325] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1328] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1344] = {tag="W", note="reached handler, refused; device-side default opcode table, 317 record"}, + [1345] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [1346] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1347] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1348] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1349] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1350] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1351] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1352] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1353] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [1354] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1355] = {tag="W", note="reached handler, refused"}, + [1356] = {tag="W", note="not implemented"}, + [1357] = {tag="W", note="IMPLEMENTED; panel export, body 19-19 B"}, + [1376] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1377] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [1378] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [1379] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [1380] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1381] = {tag="W", note="not implemented; panel export, body 6-6 B; device-side default opcode "}, + [1382] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1383] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1384] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [1536] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1537] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1538] = {tag="G", note="panel export, body 27-27 B"}, + [1539] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1540] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1541] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1542] = {tag="W", note="IMPLEMENTED"}, + [1552] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1553] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1554] = {tag="G", note="panel export, body 162-162 B; device-side default opcode table, 317 re"}, + [1555] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1556] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [1557] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2385] = {tag="W", note="IMPLEMENTED"}, + [2388] = {tag="W", note="IMPLEMENTED"}, + [2389] = {tag="W", note="IMPLEMENTED"}, + [2390] = {tag="W", note="IMPLEMENTED"}, + [2391] = {tag="W", note="IMPLEMENTED"}, + [2393] = {tag="W", note="IMPLEMENTED"}, + [2396] = {tag="W", note="IMPLEMENTED"}, + [2397] = {tag="W", note="IMPLEMENTED"}, + [2398] = {tag="W", note="IMPLEMENTED"}, + [2399] = {tag="W", note="IMPLEMENTED"}, + [2401] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2402] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2403] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2404] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2405] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2406] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [2407] = {tag="W", note="IMPLEMENTED"}, + [2409] = {tag="W", note="IMPLEMENTED"}, + [2411] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2417] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2418] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2419] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2420] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2421] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2422] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2423] = {tag="W", note="IMPLEMENTED"}, + [2425] = {tag="W", note="IMPLEMENTED"}, + [2427] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2428] = {tag="W", note="IMPLEMENTED"}, + [2429] = {tag="W", note="IMPLEMENTED"}, + [2430] = {tag="W", note="IMPLEMENTED"}, + [2431] = {tag="W", note="IMPLEMENTED"}, + [2433] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2434] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2435] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2436] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2437] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2438] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2439] = {tag="W", note="IMPLEMENTED"}, + [2440] = {tag="W", note="IMPLEMENTED"}, + [2441] = {tag="W", note="IMPLEMENTED"}, + [2443] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [2444] = {tag="W", note="IMPLEMENTED"}, + [2445] = {tag="W", note="IMPLEMENTED"}, + [2446] = {tag="W", note="IMPLEMENTED"}, + [2447] = {tag="W", note="IMPLEMENTED"}, + [2461] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2462] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2463] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2465] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2466] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2467] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [2471] = {tag="W", note="not implemented"}, + [2473] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2474] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2475] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [2481] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2482] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2483] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2485] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2486] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2487] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [2491] = {tag="W", note="reached handler, refused"}, + [2499] = {tag="W", note="reached handler, refused"}, + [3140] = {tag="W", note="inconclusive (never answered)"}, + [16399] = {tag="W", note="reached handler, refused"}, + [16400] = {tag="W", note="reached handler, refused"}, + [16401] = {tag="W", note="reached handler, refused"}, + [16640] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16643] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16644] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16645] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16646] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16647] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16648] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16649] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16650] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16652] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16654] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16655] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16656] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16657] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16682] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16691] = {tag="W", note="reached handler, refused"}, + [16692] = {tag="X", note="panel export, body 27-46 B"}, + [16896] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16897] = {tag="X", note="panel export, body 52-121 B; device-side default opcode table, 317 rec"}, + [16898] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16900] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16901] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16902] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16904] = {tag="W", note="not implemented; device-side default opcode table, 317 records, identi"}, + [16912] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16913] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16914] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16928] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16929] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16930] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16931] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [16932] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16933] = {tag="W", note="IMPLEMENTED; device-side default opcode table, 317 records, identical "}, + [16946] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [17475] = {tag="W", note="inconclusive (never answered)"}, + [17664] = {tag="W", note="reached handler, refused; device-side default opcode table, 317 record"}, + [17665] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [17666] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [17667] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [17668] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [17669] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [17678] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [17679] = {tag="S", note="device-side default opcode table, 317 records, identical across 16 fur"}, + [17960] = {tag="G", note="panel export, body 58-60 B"}, + [17965] = {tag="G", note="replication grain"}, + [17971] = {tag="W", note="IMPLEMENTED"}, + [17972] = {tag="W", note="IMPLEMENTED"}, + [17973] = {tag="W", note="IMPLEMENTED"}, + [17974] = {tag="W", note="IMPLEMENTED"}, + [17984] = {tag="W", note="IMPLEMENTED"}, + [17985] = {tag="W", note="IMPLEMENTED"}, + [17986] = {tag="W", note="reached handler, refused"}, + [17987] = {tag="W", note="reached handler, refused"}, + [17988] = {tag="W", note="IMPLEMENTED"}, + [17991] = {tag="W", note="inconclusive (never answered)"}, + [17994] = {tag="W", note="IMPLEMENTED"}, + [17995] = {tag="W", note="IMPLEMENTED"}, + [17996] = {tag="W", note="IMPLEMENTED"}, + [17997] = {tag="W", note="inconclusive (never answered)"}, + [17998] = {tag="W", note="IMPLEMENTED"}, + [17999] = {tag="W", note="IMPLEMENTED"}, + [18000] = {tag="W", note="IMPLEMENTED"}, + [18469] = {tag="X", note="panel export, body 10-10 B"}, + [18474] = {tag="X", note="panel export, body 2-2 B"}, + [18488] = {tag="X", note="panel export, body 160-197 B"}, + [18528] = {tag="X", note="panel export, body 54-66 B"}, + [18535] = {tag="X", note="panel export, body 18-18 B"}, + [18538] = {tag="X", note="panel export, body 28-28 B"}, + [18541] = {tag="X", note="panel export, body 21-21 B"}, + [18544] = {tag="X", note="panel export, body 39-52 B"}, + [18549] = {tag="X", note="panel export, body 30-36 B"}, + [18560] = {tag="X", note="panel export, body 37-43 B"}, + [18563] = {tag="X", note="panel export, body 16-51 B"}, + [18787] = {tag="X", note="panel export, body 87-107 B"}, + [19201] = {tag="X", note="panel export, body 118-118 B"}, + [20480] = {tag="W", note="IMPLEMENTED; panel export, body 47-84 B"}, + [20481] = {tag="W", note="IMPLEMENTED"}, + [20483] = {tag="W", note="IMPLEMENTED"}, + [20504] = {tag="X", note="panel export, body 42-76 B"}, + [20512] = {tag="W", note="IMPLEMENTED; panel export, body 41-54 B"}, + [20514] = {tag="W", note="IMPLEMENTED"}, + [20520] = {tag="X", note="panel export, body 38-44 B"}, + [20536] = {tag="W", note="IMPLEMENTED"}, + [20538] = {tag="W", note="IMPLEMENTED; panel export, body 53-69 B"}, + [20539] = {tag="W", note="IMPLEMENTED; panel export, body 100-114 B"}, + [20540] = {tag="W", note="IMPLEMENTED; panel export, body 50-64 B"}, + [20541] = {tag="W", note="IMPLEMENTED; panel export, body 24-38 B"}, + [21332] = {tag="W", note="not implemented"}, + [21333] = {tag="X", note="panel export, body 34-34 B"}, + [61488] = {tag="X", note="panel export, body 62-68 B"}, + [61490] = {tag="X", note="panel export, body 105-111 B"}, + [61492] = {tag="X", note="panel export, body 55-61 B"}, + [61494] = {tag="X", note="panel export, body 29-35 B"}, + [65535] = {tag="W", note="inconclusive (never answered)"}, +} + +p2data.families = { + [288] = {family="set operator-port baud rate", param="port", value="MMI 1"}, + [289] = {family="set operator-port baud rate", param="port", value="MMI 2"}, + [291] = {family="set field-bus baud rate", param="bus", value="FLN 1"}, + [292] = {family="set field-bus baud rate", param="bus", value="FLN 2"}, + [293] = {family="set field-bus baud rate", param="bus", value="FLN 3"}, + [544] = {family="point log", param="filter", value="value"}, + [545] = {family="point log", param="filter", value="in alarm"}, + [546] = {family="point log", param="filter", value="control status"}, + [547] = {family="point log", param="filter", value="failed"}, + [548] = {family="point log", param="filter", value="totalized"}, + [549] = {family="point log", param="filter", value="by priority"}, + [550] = {family="point log", param="filter", value="disabled"}, + [551] = {family="point log", param="filter", value="by type"}, + [552] = {family="point log", param="filter", value="in trouble"}, + [553] = {family="point log", param="filter", value="any"}, + [554] = {family="point log", param="filter", value="ODSB"}, + [555] = {family="point log", param="filter", value="PDSB"}, + [556] = {family="point log", param="filter", value="alarm-commanded"}, + [578] = {family="point command (enable)", param="state", value="enable"}, + [579] = {family="point command (enable)", param="state", value="disable"}, + [580] = {family="point command (alarm state)", param="state", value="alarm"}, + [581] = {family="point command (alarm state)", param="state", value="normal"}, + [582] = {family="point command (alarm enable)", param="state", value="enable"}, + [583] = {family="point command (alarm enable)", param="state", value="disable"}, + [588] = {family="point command (alarm state)", param="state", value="into trouble"}, + [589] = {family="point command (alarm state)", param="state", value="out of trouble"}, + [625] = {family="COV", param="state", value="enable"}, + [627] = {family="COV", param="state", value="disable"}, + [658] = {family="trend", param="state", value="enable"}, + [659] = {family="trend", param="state", value="disable"}, + [736] = {family="point total", param="state", value="enable"}, + [737] = {family="point total", param="state", value="disable"}, + [864] = {family="ems dial", param="state", value="enable"}, + [865] = {family="ems dial", param="state", value="disable"}, + [1348] = {family="category printing", param="state", value="enable"}, + [1350] = {family="category printing", param="state", value="disable"}, + [1353] = {family="category node list", param="action", value="append"}, + [1354] = {family="category node list", param="action", value="remove"}, + [1377] = {family="alarm message", param="state", value="enable"}, + [1378] = {family="alarm message", param="state", value="disable"}, + [2401] = {family="upload point", param="phase", value="deleted"}, + [2402] = {family="upload alarm setup", param="phase", value="deleted"}, + [2403] = {family="upload alarm mode", param="phase", value="deleted"}, + [2404] = {family="upload trend", param="phase", value="deleted"}, + [2405] = {family="upload ppcl", param="phase", value="deleted"}, + [2406] = {family="upload tec", param="phase", value="deleted"}, + [2407] = {family="upload eqs zone", param="phase", value="deleted"}, + [2408] = {family="upload eqs cmd table", param="phase", value="deleted"}, + [2409] = {family="upload eqs mode sched", param="phase", value="deleted"}, + [2410] = {family="upload loop", param="phase", value="deleted"}, + [2411] = {family="upload alarm message", param="phase", value="deleted"}, + [2417] = {family="upload point", param="phase", value="added"}, + [2418] = {family="upload alarm setup", param="phase", value="added"}, + [2419] = {family="upload alarm mode", param="phase", value="added"}, + [2420] = {family="upload trend", param="phase", value="added"}, + [2421] = {family="upload ppcl", param="phase", value="added"}, + [2422] = {family="upload tec", param="phase", value="added"}, + [2423] = {family="upload eqs zone", param="phase", value="added"}, + [2424] = {family="upload eqs cmd table", param="phase", value="added"}, + [2425] = {family="upload eqs mode sched", param="phase", value="added"}, + [2426] = {family="upload loop", param="phase", value="added"}, + [2427] = {family="upload alarm message", param="phase", value="added"}, + [2428] = {family="upload ssto general", param="phase", value="added"}, + [2429] = {family="upload ssto start", param="phase", value="added"}, + [2430] = {family="upload ssto stop", param="phase", value="added"}, + [2431] = {family="upload ssto night", param="phase", value="added"}, + [2433] = {family="upload point", param="phase", value="all"}, + [2434] = {family="upload alarm setup", param="phase", value="all"}, + [2435] = {family="upload alarm mode", param="phase", value="all"}, + [2436] = {family="upload trend", param="phase", value="all"}, + [2437] = {family="upload ppcl", param="phase", value="all"}, + [2438] = {family="upload tec", param="phase", value="all"}, + [2439] = {family="upload eqs zone", param="phase", value="all"}, + [2440] = {family="upload eqs cmd table", param="phase", value="all"}, + [2441] = {family="upload eqs mode sched", param="phase", value="all"}, + [2443] = {family="upload alarm message", param="phase", value="all"}, + [2444] = {family="upload ssto general", param="phase", value="all"}, + [2445] = {family="upload ssto start", param="phase", value="all"}, + [2446] = {family="upload ssto stop", param="phase", value="all"}, + [2447] = {family="upload ssto night", param="phase", value="all"}, + [2461] = {family="upload port", param="phase", value="deleted"}, + [2462] = {family="upload port", param="phase", value="added"}, + [2463] = {family="upload port", param="phase", value="all"}, + [2465] = {family="upload partner", param="phase", value="deleted"}, + [2466] = {family="upload partner", param="phase", value="added"}, + [2467] = {family="upload partner", param="phase", value="all"}, + [2469] = {family="upload eqs override", param="phase", value="deleted"}, + [2470] = {family="upload eqs override", param="phase", value="added"}, + [2471] = {family="upload eqs override", param="phase", value="all"}, + [2473] = {family="upload uc", param="phase", value="deleted"}, + [2474] = {family="upload uc", param="phase", value="added"}, + [2475] = {family="upload uc", param="phase", value="all"}, + [2481] = {family="upload tod point", param="phase", value="deleted"}, + [2482] = {family="upload tod point", param="phase", value="added"}, + [2483] = {family="upload tod point", param="phase", value="all"}, + [2485] = {family="upload tod cmd", param="phase", value="deleted"}, + [2486] = {family="upload tod cmd", param="phase", value="added"}, + [2487] = {family="upload tod cmd", param="phase", value="all"}, + [2489] = {family="upload lon", param="phase", value="deleted"}, + [2490] = {family="upload lon", param="phase", value="added"}, + [2491] = {family="upload lon", param="phase", value="all"}, + [2497] = {family="upload mstp device", param="phase", value="deleted"}, + [2498] = {family="upload mstp device", param="phase", value="added"}, + [2499] = {family="upload mstp device", param="phase", value="all"}, + [14339] = {family="racs partner", param="state", value="disable"}, + [14341] = {family="racs partner", param="state", value="enable"}, + [14355] = {family="racs port", param="state", value="disable"}, + [14357] = {family="racs port", param="state", value="enable"}, + [14371] = {family="racs system", param="state", value="disable"}, + [14373] = {family="racs system", param="state", value="enable"}, + [16644] = {family="PPCL lines", param="state", value="enable"}, + [16645] = {family="PPCL lines", param="state", value="disable"}, + [16654] = {family="report PPCL", param="variant", value="lines"}, + [16682] = {family="report PPCL", param="variant", value="unresolved references"}, + [16689] = {family="upload program", param="phase", value="deleted"}, + [16690] = {family="upload program", param="phase", value="added"}, + [16691] = {family="upload program", param="phase", value="all"}, + [16912] = {family="TEC log", param="log", value="member"}, + [16913] = {family="TEC log", param="log", value="report"}, + [16944] = {family="FLN scan", param="state", value="enable"}, + [16945] = {family="FLN scan", param="state", value="disable"}, + [17168] = {family="LON log", param="log", value="member"}, + [17169] = {family="LON log", param="log", value="report"}, + [17666] = {family="tod point", param="state", value="enable"}, + [17667] = {family="tod point", param="state", value="disable"}, + [17988] = {family="EBLN telnet", param="state", value="enable"}, + [17989] = {family="EBLN telnet", param="state", value="disable"}, + [18466] = {family="upload bbmd", param="phase", value="deleted"}, + [18467] = {family="upload bbmd", param="phase", value="added"}, + [18468] = {family="upload bbmd", param="phase", value="all"}, + [18481] = {family="upload covtab", param="phase", value="deleted"}, + [18482] = {family="upload covtab", param="phase", value="added"}, + [18483] = {family="upload covtab", param="phase", value="all"}, + [18500] = {family="upload bac trend", param="phase", value="deleted"}, + [18501] = {family="upload bac trend", param="phase", value="added"}, + [18502] = {family="upload bac trend", param="phase", value="all"}, + [18552] = {family="upload BACnet object", param="phase", value="added"}, + [18553] = {family="upload BACnet object", param="phase", value="deleted"}, + [20484] = {family="eqs zone", param="state", value="enable"}, + [20485] = {family="eqs zone", param="state", value="disable"}, + [20516] = {family="eqs mode entry", param="state", value="enable"}, + [20517] = {family="eqs mode entry", param="state", value="disable"}, + [20547] = {family="eqs ssto", param="state", value="enable"}, + [20548] = {family="eqs ssto", param="state", value="disable"}, + [21248] = {family="I/O module display", param="scope", value="global"}, + [21253] = {family="I/O module display", param="scope", value="local"}, +} + +p2data.enum_types = { + [-1] = {name="Default LDI", apogee=true, levels={[0]="OFF", [1]="ON"}}, + [-2] = {name="Default LDO", apogee=true, levels={[0]="OFF", [1]="ON"}}, + [-6] = {name="Default L2SL", apogee=true, levels={[0]="OFF", [1]="ON"}}, + [-7] = {name="Default LOOAP", apogee=true, levels={[0]="OFF", [1]="ON", [2]="AUTO"}}, + [-12] = {name="Default L2SP", apogee=true, levels={[0]="OFF", [1]="ON"}}, + [-13] = {name="Default LOOAL", apogee=true, levels={[0]="OFF", [1]="ON", [2]="AUTO"}}, + [-14] = {name="Default LFSSL", apogee=true, levels={[0]="STOP", [1]="SLOW", [2]="FAST"}}, + [-15] = {name="Default LFSSP", apogee=true, levels={[0]="STOP", [1]="SLOW", [2]="FAST"}}, + [-19] = {name="Default LCTLR", apogee=true, levels={[0]="DAY", [1]="NIGHT"}}, + [-21] = {name="Default LENUM", apogee=true, levels={[0]="NIGHT", [1]="DAY", [2]="SPECIAL2", [3]="SPECIAL3", [4]="SPECIAL4", [5]="SPECIAL5"}}, + [-107] = {name="BACNET OOA", apogee=true, levels={[1]="OFF", [2]="ON", [3]="AUTO"}}, + [-115] = {name="BACNET FSS", apogee=true, levels={[1]="STOP", [2]="SLOW", [3]="FAST"}}, + [-121] = {name="BACNET LENUM", apogee=true, levels={[1]="NIGHT", [2]="DAY", [3]="SPECIAL2", [4]="SPECIAL3", [5]="SPECIAL4", [6]="SPECIAL5"}}, + [-122] = {name="BACNET EVENT ENROLLMENT", apogee=true, levels={[0]="NRML", [1]="FAULT", [2]="OFFNRML", [3]="HIGH", [4]="LOW"}}, + [-1000] = {name="OFF_ON", apogee=true, levels={[0]="OFF", [1]="ON"}}, + [-1001] = {name="ON_OFF", apogee=true, levels={[0]="ON", [1]="OFF"}}, + [-1002] = {name="NO_YES", apogee=true, levels={[0]="NO", [1]="YES"}}, + [-1003] = {name="YES_NO", apogee=true, levels={[0]="YES", [1]="NO"}}, + [-1004] = {name="COOL_HEAT", apogee=true, levels={[0]="COOL", [1]="HEAT"}}, + [-1005] = {name="UNOCC_OCC", apogee=true, levels={[0]="UNOCC", [1]="OCC"}}, + [-1006] = {name="OCC_UNOCC", apogee=true, levels={[0]="OCC", [1]="UNOCC"}}, + [-1007] = {name="OPEN_CLOSED", apogee=true, levels={[0]="OPEN", [1]="CLOSED"}}, + [-1008] = {name="CLOSED_OPEN", apogee=true, levels={[0]="CLOSED", [1]="OPEN"}}, + [-1009] = {name="NOPEN_NCLOSE", apogee=true, levels={[0]="NOPEN", [1]="NCLOSE"}}, + [-1010] = {name="CAL_RECAL", apogee=true, levels={[0]="CAL", [1]="RECAL"}}, + [-1011] = {name="RECAL_CAL", apogee=true, levels={[0]="RECAL", [1]="CAL"}}, + [-1012] = {name="ETS_STE", apogee=true, levels={[0]="ETS", [1]="STE"}}, + [-1013] = {name="NTRAL_ACTIVE", apogee=true, levels={[0]="NTRAL", [1]="ACTIVE"}}, + [-1014] = {name="NEG_POS", apogee=true, levels={[0]="NEG", [1]="POS"}}, + [-1015] = {name="STPT_FLOW", apogee=true, levels={[0]="STPT", [1]="FLOW"}}, + [-1016] = {name="NORMAL_ALARM", apogee=true, levels={[0]="NORMAL", [1]="ALARM"}}, + [-1017] = {name="HW_ELEC", apogee=true, levels={[0]="HW", [1]="ELEC"}}, + [-1018] = {name="DAY_NIGHT", apogee=true, levels={[0]="DAY", [1]="NIGHT"}}, + [-1019] = {name="NIGHT_DAY", apogee=true, levels={[0]="NIGHT", [1]="DAY"}}, + [-1020] = {name="CLG_HTG", apogee=true, levels={[0]="CLG", [1]="HTG"}}, + [-1021] = {name="COLD_HOT", apogee=true, levels={[0]="COLD", [1]="HOT"}}, + [-1022] = {name="DISABL_ENABL", apogee=true, levels={[0]="DISABL", [1]="ENABLE"}}, + [-1023] = {name="FLOAT_SPRING", apogee=true, levels={[0]="FLOAT", [1]="SPRING"}}, + [-1024] = {name="VALVE_FBP", apogee=true, levels={[0]="VALVE", [1]="FBP"}}, + [-1025] = {name="NOAUX_AUX", apogee=true, levels={[0]="NOAUX", [1]="AUX"}}, + [-1026] = {name="NOELEC_ELEC", apogee=true, levels={[0]="NOELEC", [1]="ELEC"}}, + [-1027] = {name="FOUR_TWO", apogee=true, levels={[0]="FOUR", [1]="TWO"}}, + [-1028] = {name="ENG_SI", apogee=true, levels={[0]="ENG", [1]="SI"}}, + [-1029] = {name="DONE_READY", apogee=true, levels={[0]="DONE", [1]="READY"}}, + [-1030] = {name="READY_YES", apogee=true, levels={[0]="READY", [1]="YES"}}, + [-1031] = {name="SERIES_PAR", apogee=true, levels={[0]="SERIES", [1]="PAR"}}, + [-1032] = {name="ACTIVE_NTRAL", apogee=true, levels={[0]="ACTIVE", [1]="NTRAL"}}, + [-1033] = {name="ALARM_NORMAL", apogee=true, levels={[0]="ALARM", [1]="NORMAL"}}, + [-1034] = {name="NCLOSE_NOPEN", apogee=true, levels={[0]="NCLOSE", [1]="NOPEN"}}, + [-1035] = {name="SI_ENG", apogee=true, levels={[0]="SI", [1]="ENG"}}, + [-1036] = {name="HOLD_FILL", apogee=true, levels={[0]="HOLD", [1]="FILL"}}, + [-1037] = {name="BLEED_HOLD", apogee=true, levels={[0]="BLEED", [1]="HOLD"}}, + [-1038] = {name="MIN_MAX", apogee=true, levels={[0]="MIN", [1]="MAX"}}, + [-1039] = {name="ONE_TWO", apogee=true, levels={[0]="ONE", [1]="TWO"}}, + [-1040] = {name="AO_DO", apogee=true, levels={[0]="AO", [1]="DO"}}, + [-1041] = {name="CLOSED_ON", apogee=true, levels={[0]="CLOSED", [1]="ON"}}, + [-1042] = {name="OFF_CLOSED", apogee=true, levels={[0]="OFF", [1]="CLOSED"}}, + [-1043] = {name="READY_DONE", apogee=true, levels={[0]="READY", [1]="DONE"}}, + [-1044] = {name="LO_HI", apogee=true, levels={[0]="LO", [1]="HI"}}, + [-1045] = {name="OPEN_CLOSE", apogee=true, levels={[0]="OPEN", [1]="CLOSE"}}, + [-1046] = {name="CAV_VAV", apogee=true, levels={[0]="CAV", [1]="VAV"}}, + [-1047] = {name="PAR_SERIES", apogee=true, levels={[0]="PAR", [1]="SERIES"}}, + [-1048] = {name="AUTO_LEAD", apogee=true, levels={[0]="AUTO", [1]="LEAD"}}, + [-1049] = {name="AUTO_MANUAL", apogee=true, levels={[0]="AUTO", [1]="MANUAL"}}, + [-1050] = {name="AUTO_OFF", apogee=true, levels={[0]="AUTO", [1]="OFF"}}, + [-1051] = {name="AUTO_ON", apogee=true, levels={[0]="AUTO", [1]="ON"}}, + [-1052] = {name="AVERGE_NEARST", apogee=true, levels={[0]="AVERGE", [1]="NEARST"}}, + [-1053] = {name="BRINE_COMFRT", apogee=true, levels={[0]="BRINE", [1]="COMFRT"}}, + [-1054] = {name="CLEAN_DIRTY", apogee=true, levels={[0]="CLEAN", [1]="DIRTY"}}, + [-1055] = {name="CLEAR_LATCH", apogee=true, levels={[0]="CLEAR", [1]="LATCH"}}, + [-1056] = {name="CLEAR_RESET", apogee=true, levels={[0]="CLEAR", [1]="RESET"}}, + [-1057] = {name="CLRBIT_EXTFLT", apogee=true, levels={[0]="CLRBIT", [1]="EXTFLT"}}, + [-1058] = {name="CLRBIT_RESET", apogee=true, levels={[0]="CLRBIT", [1]="RESET"}}, + [-1059] = {name="CNSTNT_VARBLE", apogee=true, levels={[0]="CNSTNT", [1]="VARBLE"}}, + [-1060] = {name="COOLNG_HEATNG", apogee=true, levels={[0]="COOLNG", [1]="HEATNG"}}, + [-1061] = {name="CURENT_DELTPP", apogee=true, levels={[0]="CURENT", [1]="DELTPP"}}, + [-1062] = {name="DIRECT_REVRSE", apogee=true, levels={[0]="DIRECT", [1]="REVRSE"}}, + [-1063] = {name="DISPRS_AMBENT", apogee=true, levels={[0]="DISPRS", [1]="AMBENT"}}, + [-1064] = {name="ECON_VENT", apogee=true, levels={[0]="ECON", [1]="VENT"}}, + [-1065] = {name="ENABLE_DISABL", apogee=true, levels={[0]="ENABLE", [1]="DISABL"}}, + [-1066] = {name="ENGLSH_SI", apogee=true, levels={[0]="ENGLSH", [1]="SI"}}, + [-1067] = {name="EXTRNL_CHLR", apogee=true, levels={[0]="EXTRNL", [1]="CHLR"}}, + [-1068] = {name="FALSE_TRUE", apogee=true, levels={[0]="False", [1]="True"}}, + [-1069] = {name="FAULT_OK", apogee=true, levels={[0]="FAULT", [1]="OK"}}, + [-1070] = {name="FIXED_AUTO", apogee=true, levels={[0]="FIXED", [1]="AUTO"}}, + [-1071] = {name="FIXED_VARBLE", apogee=true, levels={[0]="FIXED", [1]="VARBLE"}}, + [-1072] = {name="FORWRD_REVRSE", apogee=true, levels={[0]="FORWRD", [1]="REVRSE"}}, + [-1073] = {name="FULL_LIMTED", apogee=true, levels={[0]="FULL", [1]="LIMTED"}}, + [-1074] = {name="FWD_REV", apogee=true, levels={[0]="FWD", [1]="REV"}}, + [-1075] = {name="GAUGE_PSI", apogee=true, levels={[0]="GAUGE", [1]="PSI"}}, + [-1076] = {name="GERMAN_ENGLSH", apogee=true, levels={[0]="GERMAN", [1]="ENGLSH"}}, + [-1077] = {name="HAND_AUTO", apogee=true, levels={[0]="HAND", [1]="AUTO"}}, + [-1078] = {name="HIGH_NORMAL", apogee=true, levels={[0]="HIGH", [1]="NORMAL"}}, + [-1079] = {name="HOT_COLD", apogee=true, levels={[0]="HOT", [1]="COLD"}}, + [-1080] = {name="INACTV_ACTIVE", apogee=true, levels={[0]="INACTV", [1]="ACTIVE"}}, + [-1081] = {name="LEAD_AUTO", apogee=true, levels={[0]="LEAD", [1]="AUTO"}}, + [-1082] = {name="LOCAL_NET", apogee=true, levels={[0]="LOCAL", [1]="NET"}}, + [-1083] = {name="LOCAL_REMOTE", apogee=true, levels={[0]="LOCAL", [1]="REMOTE"}}, + [-1084] = {name="LOW_HIGH", apogee=true, levels={[0]="LOW", [1]="HIGH"}}, + [-1085] = {name="LOW_NORMAL", apogee=true, levels={[0]="LOW", [1]="NORMAL"}}, + [-1086] = {name="LOW_STNDRD", apogee=true, levels={[0]="LOW", [1]="STNDRD"}}, + [-1087] = {name="LT_51S_TO255", apogee=true, levels={[0]="LT_51S", [1]="TO255"}}, + [-1088] = {name="LVWTR_RETWTR", apogee=true, levels={[0]="LVWTR", [1]="RETWTR"}}, + [-1089] = {name="MANUAL_AUTO", apogee=true, levels={[0]="MANUAL", [1]="AUTO"}}, + [-1090] = {name="MASTER_SLAVE", apogee=true, levels={[0]="MASTER", [1]="SLAVE"}}, + [-1091] = {name="NO_AUTH", apogee=true, levels={[0]="NO", [1]="AUTH"}}, + [-1092] = {name="NO_ERR_DATA_E", apogee=true, levels={[0]="NO_ERR", [1]="DATA_E"}}, + [-1093] = {name="NO_FLT_FAULT", apogee=true, levels={[0]="NO_FLT", [1]="FAULT"}}, + [-1094] = {name="NO_LIMIT", apogee=true, levels={[0]="NO", [1]="LIMIT"}}, + [-1095] = {name="NO_READY", apogee=true, levels={[0]="NO", [1]="READY"}}, + [-1096] = {name="NO_RESET", apogee=true, levels={[0]="NO", [1]="RESET"}}, + [-1097] = {name="NOFLOW_FLOW", apogee=true, levels={[0]="NOFLOW", [1]="FLOW"}}, + [-1098] = {name="NONLNR_LINEAR", apogee=true, levels={[0]="NONLNR", [1]="LINEAR"}}, + [-1099] = {name="NORMAL_CLEAR", apogee=true, levels={[0]="NORMAL", [1]="CLEAR"}}, + [-1100] = {name="NORMAL_FAIL", apogee=true, levels={[0]="NORMAL", [1]="FAIL"}}, + [-1101] = {name="NORMAL_LIGHT", apogee=true, levels={[0]="NORMAL", [1]="LIGHT"}}, + [-1102] = {name="NORMAL_RESET", apogee=true, levels={[0]="NORMAL", [1]="RESET"}}, + [-1103] = {name="NORMAL_STNDBY", apogee=true, levels={[0]="NORMAL", [1]="STNDBY"}}, + [-1104] = {name="NORMAL_UNFAIL", apogee=true, levels={[0]="NORMAL", [1]="UNFAIL"}}, + [-1105] = {name="NOTRDY_READY", apogee=true, levels={[0]="NOTRDY", [1]="READY"}}, + [-1106] = {name="NTO_ON", apogee=true, levels={[0]="NTO", [1]="ON"}}, + [-1107] = {name="OATEMP_ENTLPY", apogee=true, levels={[0]="OATEMP", [1]="ENTLPY"}}, + [-1108] = {name="OFF_AUTO", apogee=true, levels={[0]="OFF", [1]="AUTO"}}, + [-1109] = {name="OFF_BRAKE", apogee=true, levels={[0]="OFF", [1]="BRAKE"}}, + [-1110] = {name="OFF_BYPASS", apogee=true, levels={[0]="OFF", [1]="BYPASS"}}, + [-1111] = {name="OFF_HEAT", apogee=true, levels={[0]="OFF", [1]="HEAT"}}, + [-1112] = {name="OFF_MNWMUP", apogee=true, levels={[0]="OFF", [1]="MNWMUP"}}, + [-1113] = {name="OK_BAD", apogee=true, levels={[0]="OK", [1]="BAD"}}, + [-1114] = {name="OK_FAULT", apogee=true, levels={[0]="OK", [1]="FAULT"}}, + [-1115] = {name="OK_RESET", apogee=true, levels={[0]="OK", [1]="RESET"}}, + [-1116] = {name="OK_TRIP", apogee=true, levels={[0]="OK", [1]="TRIP"}}, + [-1117] = {name="OK_WARNNG", apogee=true, levels={[0]="OK", [1]="WARNNG"}}, + [-1118] = {name="OPEN_LOCK", apogee=true, levels={[0]="OPEN", [1]="LOCK"}}, + [-1119] = {name="PURGE_RUN", apogee=true, levels={[0]="PURGE", [1]="RUN"}}, + [-1120] = {name="RATEMP_OATEMP", apogee=true, levels={[0]="RATEMP", [1]="OATEMP"}}, + [-1121] = {name="REMOTE_LOCAL", apogee=true, levels={[0]="REMOTE", [1]="LOCAL"}}, + [-1122] = {name="RETURN_SPACE", apogee=true, levels={[0]="RETURN", [1]="SPACE"}}, + [-1123] = {name="REV_FWD", apogee=true, levels={[0]="REV", [1]="FWD"}}, + [-1124] = {name="REVRSE_FORWRD", apogee=true, levels={[0]="REVRSE", [1]="FORWRD"}}, + [-1125] = {name="SHARED_STNDRD", apogee=true, levels={[0]="SHARED", [1]="STNDRD"}}, + [-1126] = {name="SI_ENGLSH", apogee=true, levels={[0]="SI", [1]="ENGLSH"}}, + [-1127] = {name="SLAVE_MASTER", apogee=true, levels={[0]="SLAVE", [1]="MASTER"}}, + [-1128] = {name="SLC_LOCAL", apogee=true, levels={[0]="SLC", [1]="LOCAL"}}, + [-1129] = {name="SOFTWR_TSTAT", apogee=true, levels={[0]="SOFTWR", [1]="TSTAT"}}, + [-1130] = {name="STEAM_GAS", apogee=true, levels={[0]="STEAM", [1]="GAS"}}, + [-1131] = {name="STNDBY_ACT", apogee=true, levels={[0]="STNDBY", [1]="ACT"}}, + [-1132] = {name="STNDRD_LOWTMP", apogee=true, levels={[0]="STNDRD", [1]="LOWTMP"}}, + [-1133] = {name="STOP_ENABLE", apogee=true, levels={[0]="STOP", [1]="ENABLE"}}, + [-1134] = {name="STOP_RUN", apogee=true, levels={[0]="STOP", [1]="RUN"}}, + [-1135] = {name="STOP_START", apogee=true, levels={[0]="STOP", [1]="START"}}, + [-1136] = {name="SURGE_OK", apogee=true, levels={[0]="SURGE", [1]="OK"}}, + [-1137] = {name="TIME_NETWRK", apogee=true, levels={[0]="TIME", [1]="NETWRK"}}, + [-1138] = {name="UNLOCK_LOCK", apogee=true, levels={[0]="UNLOCK", [1]="LOCK"}}, + [-1139] = {name="UNUSED_USE", apogee=true, levels={[0]="UNUSED", [1]="USE"}}, + [-1140] = {name="VH_VECT", apogee=true, levels={[0]="VH", [1]="VECT"}}, + [-1141] = {name="MC_UV_HCMODE", apogee=true, levels={[0]="TEMPOK", [1]="COOLING", [2]="HEATING"}}, + [-1142] = {name="MC_UV_SYSMODE", apogee=true, levels={[0]="UNOCC", [1]="OCC", [2]="OVRD"}}, + [-1143] = {name="MC_RTU_SYSMODE", apogee=true, levels={[0]="RATEMP", [1]="SATEMP", [2]="NETWORK", [3]="OATEMP", [4]="NONE_MAT"}}, + [-1144] = {name="MC_RCH_CHWRSTOPT", apogee=true, levels={[0]="NO_RESET", [1]="RETURN", [2]="mA_4_20", [3]="NETWORK", [4]="ICE", [5]="OATEMP"}}, + [-1145] = {name="MC_SCU_SFANSTATS", apogee=true, levels={[0]="OFF", [1]="LO_SPEED", [2]="HI_SPEED"}}, + [-1146] = {name="MC_SCU_HUMCTRLTP", apogee=true, levels={[0]="NONE", [1]="HUMIDITY", [2]="DEWPOINT"}}, + [-1147] = {name="MC_SCH_OATMETHOD", apogee=true, levels={[1]="LOCAL", [2]="NETWORK"}}, + [-1148] = {name="MC_RMC_TPPRCALC", apogee=true, levels={[0]="MINIMUM", [1]="MAXIMUM", [2]="AVERAGE"}}, + [-1149] = {name="MC_SCA_CLGRESTYP", apogee=true, levels={[0]="NONE", [1]="SATEMP", [2]="RATEMP", [3]="OATEMP", [4]="mA_4_20", [5]="AIR_MAT"}}, + [-1150] = {name="MC_SCA_HTGRESTYP", apogee=true, levels={[0]="NONE", [1]="SATEMP", [2]="RATEMP", [3]="OATEMP", [4]="mA_4_20"}}, + [-1151] = {name="MC_TIMESCHEDULE", apogee=true, levels={[1]="SUNDAY", [2]="MONDAY", [3]="TUESDAY", [4]="WEDNSDAY", [5]="THURSDAY", [6]="FRIDAY", [7]="SATURDAY"}}, + [-1152] = {name="MC_HP_AUTMANMODE", apogee=true, levels={[0]="MANUNOCC", [1]="MANOCC", [5]="MANFAN", [9]="MANOFF", [255]="AUTO"}}, + [-1153] = {name="MC_HP_FAULTS", apogee=true, levels={[187]="LOWDAT1", [188]="LOWRPRS1", [189]="HIRPRS1", [204]="RATSENSR", [205]="LOWDAT2", [206]="LOWRPRS2", [207]="HIRPRS2", [255]="NONE"}}, + [-1154] = {name="MC_CHLR_OPMODE", apogee=true, levels={[0]="STOP", [1]="NETWORK", [2]="IDLE", [3]="RUN"}}, + [-1155] = {name="MC_CHLR_LDLGST", apogee=true, levels={[0]="BOTHOFF", [1]="LEADON", [2]="LAGON", [3]="BOTHON"}}, + [-1156] = {name="MC_CHLR_LDLGSP", apogee=true, levels={[0]="MSTLEAD", [1]="SLVLEAD", [2]="AUTO"}}, + [-1157] = {name="MC_CHLR_LDLGSSP", apogee=true, levels={[1]="SUNDAY", [2]="MONDAY", [3]="TUESDAY", [4]="WEDNSDAY", [5]="THURSDAY", [6]="FRIDAY", [7]="SATURDAY"}}, + [-1158] = {name="CR_RUNSTATUS1", apogee=true, levels={[0]="TIMEOUT", [1]="RECYCLE", [2]="STARTUP", [3]="RAMPING", [4]="RUNNING", [5]="DEMAND", [6]="OVERRIDE", [7]="SHUTDOWN", [8]="ABNORMAL", [9]="PUMPDOWN", [10]="READY", [11]="TRIPOUT", [12]="CONTROL TEST", [13]="LOCKOUT"}}, + [-1159] = {name="CR_RUNSTATUS2", apogee=true, levels={[0]="OFF", [1]="ON", [2]="STOPPING", [3]="DELAY"}}, + [-1160] = {name="CR_RUNSTATUS3", apogee=true, levels={[0]="OFF", [1]="ON", [3]="TEST"}}, + [-1161] = {name="CR_RUNSTATUS4", apogee=true, levels={[1]="RECYCLE", [2]="STARTUP", [3]="RAMPING", [4]="RUNNING", [5]="WARMUP", [6]="OVERRIDE", [7]="DESOLID", [8]="ABNORMAL", [9]="DILUTION", [10]="READY", [11]="TRIPOUT", [12]="CONTROL TEST"}}, + [-1162] = {name="CR_RUNSTATUS5", apogee=true, levels={[0]="SERVICE", [1]="OFF-LOCAL", [2]="OFF-CCN", [3]="OFF-TIME", [4]="EMERGENCY", [5]="ON-LOCAL", [6]="ON-CCN", [7]="ON-TIME"}}, + [-1163] = {name="CR_CONTROLMODE1", apogee=true, levels={[0]="OFF", [2]="LOCAL", [3]="CCN", [15]="RESET"}}, + [-1164] = {name="CR_CONTROLMODE2", apogee=true, levels={[0]="STOP", [2]="LOCAL", [3]="CCN"}}, + [-1165] = {name="CR_CONTROLMODE3", apogee=true, levels={[1]="LOCAL_ON", [2]="EMERGENCY STOP", [3]="CCN_ON", [4]="CLOCK_ON", [5]="DELAY_OFF", [6]="LOCAL_OFF", [7]="CCN_OFF", [8]="CLOCK_OFF"}}, + [-1166] = {name="CR_CONTROLMODE4", apogee=true, levels={[1]="OFF-LOCAL", [2]="OFF-CCN", [3]="TEST", [4]="EMERGENCY STOP", [5]="ON-LOCAL", [6]="ON-CCN", [7]="ON-CLOCK", [8]="OFF-CLOCK"}}, + [-1167] = {name="CR_CURRENTMODE1", apogee=true, levels={[0]="Unit is in Stop Mode", [1]="Unit is Off by CCN Command", [2]="Unit is Off by Time Clock", [3]="Unit in Local Mode", [4]="Unit is On by CCN Command", [5]="Unit is On by Time Clock", [6]="Dual Set Point Configured", [7]="Temperature Reset in Effect", [8]="Demand Limit in Effect", [9]="FSM Controlling Chiller", [10]="Low Source Protection", [11]="Ramp Load Limited", [12]="n Hour Timed Override", [13]="Low Cooler Suction Temperature Warning", [14]="WSM Controlling Chiller", [15]="Slow change Override in Effect", [16]="n Minute Off to On Delay in Effect", [17]="Low Suction Superheat Protection"}}, + [-1168] = {name="CR_CONTROLTYPE1", apogee=true, levels={[1]="REMOTE", [2]="LOCAL", [3]="CCN"}}, + [-1169] = {name="CR_CHILLERSTAT1", apogee=true, levels={[0]="No chiller configured for this number", [1]="Low load recycling", [2]="Off, available for starting", [3]="Restarting after power Fail", [4]="Running normally", [5]="Failed to stop in 5 minutes", [6]="Failed to start, but not faulted", [7]="Safety shutdown", [8]="Unavailable", [9]="CSM cannot communicate with the chiller"}}, + [-1170] = {name="CR_OVRDSTATUS1", apogee=true, levels={[0]="No override of time schedule", [1]="Remote contact forces schedule to be occupied", [2]="Temperature override forces schedule to occupied", [3]="Temperature override forces schedule to unoccupied"}}, + [-1171] = {name="CR_DMDLMTSTAT1", apogee=true, levels={[0]="RAMPING COMPLETE", [1]="CLAMPED", [2]="RAMPING", [3]="REDLINE ACTIVE", [4]="LOADSHED LIMIT EXCEEDED"}}, + [-1172] = {name="CR_LOADSHEDSTAT1", apogee=true, levels={[0]="NORMAL", [1]="REDLINE", [2]="SHED"}}, + [-1173] = {name="CR_ALARMSTATE1", apogee=true, levels={[0]="NORMAL", [1]="PARTIAL", [7]="SHUTDOWN"}}, + [-1174] = {name="CR_CURRENTALARM1", apogee=true, levels={[1]="Circ A, Comp 1 Fail", [2]="Circ A, Comp 2 Fail", [3]="Circ A, Comp 3 Fail", [4]="Circ A, Comp 4 Fail", [5]="Circ B, Comp 1 Fail", [6]="Circ B, Comp 2 Fail", [7]="Circ B, Comp 3 Fail", [8]="Circ B, Comp 4 Fail", [9]="Cooler Leaving Fluid Thermistor Fail", [10]="Cooler Entering Fluid Thermistor Fail", [11]="Condenser Leaving Fluid Thermistor Fail", [12]="Condenser Entering Fluid Thermistor Fail", [13]="Heat Reclaim Entering Fluid Thermistor Fail", [14]="Heat Reclaim Leaving Fluid Thermistor Fail", [15]="Circ A Saturated Cond Temp Thermistor Fail", [16]="Circ B Saturated Cond Temp Thermistor Fail", [17]="Circ A Saturated Suction Temp Thermistor Fail", [18]="Circ B Saturated Suction Temp Thermistor Fail", [19]="Circ A Comp Suction Temp Thermistor Fail", [20]="Circ B Comp Suction Thermistor Fail", [21]="External Reset Temp Thermistor Fail", [22]="Circ A Discharge Pressure Transducer Fail", [23]="Circ B Discharge Pressure Transducer Fail", [24]="Circ A Suction Pressure Transducer Fail", [25]="Circ B Suction Pressure Transducer Fail", [26]="Circ A Oil Pressure Transducer Fail", [27]="Circ B Oil Pressure Transducer Fail", [28]="Transducer Supply Voltage Outside Range", [29]="Local/Stop/CCN Switch Fail", [30]="4 - 20 ma Reset Input Out of Range", [31]="4 - 20 ma Demand Limit Input Out of Range", [32]="Comm Losss with DSIO-1", [33]="Comm Losss with DSIO-2", [34]="Comm Losss with Options Board 1", [35]="Comm Losss with Options Board 2", [36]="Circ A Low Refrigerant Pressure", [37]="Circ B Low Refrigerant Pressure", [38]="Circ A Fail to Pumpdown", [39]="Circ B Fail to Pumpdown", [40]="Circ A Low Oil Pressure", [41]="Circ B Low Oil Pressure", [42]="Cooler Freeze Protection", [43]="Low Cooler Fluid Flow", [44]="Circ A Low Cooler Suction Temp", [45]="Circ B Low Cooler Suction Temp", [46]="Circ A High Suction Superheat", [47]="Circ B High Suction Superheat", [48]="Circ A Low Suction Superheat", [49]="Circ B Low Suction Superheat", [50]="Illegal Configuration", [51]="Initial Configuration Required", [52]="Unit is in Emergency Stop", [53]="Cooler Pump Contacts Fail to Close at Startup", [54]="Cooler Pump Contacts Open in Normal Operation", [55]="Cooler Pump Contacts Close While Relay OFF", [56]="Comm Loss with Water System Manager", [57]="Circ A Disch Press Transducer Requires Cal", [58]="Circ B Disch Press Transducer Requires Cal", [59]="Circ A Suction Press Transducer Requires Cal", [60]="Circ B Suction Press Transducer Requires Cal", [61]="Circ A Oil Pressure Transducer Requires Cal", [62]="Circ B Oil Pressure Transducer Requires Cal", [63]="Circ A and Circ B both off, Unit down", [64]="Circ A Loss of Charge", [65]="Circ B Loss of Charge", [66]="Comm Loss with Flotronic System Manager", [67]="Bad Date Code- No Press Transducer Cal", [68]="Comm Loss with Remote Alarm DSIO #1", [69]="Comm Loss with Remote Alarm DSIO #2", [70]="High Leaving Chilled Water Temp"}}, + [-1175] = {name="CR_CURRENTALARM2", apogee=true, levels={[1]="Circ A1 Compressor Fail", [2]="Circ A1 Compressor Fail", [5]="Circ B1 Compressor Fail", [6]="Circ B2 Compressor Fail", [7]="Circ A Discharge Gas Thermistor Fail", [8]="Circ B Discharge Gas Thermistor Fail", [9]="Cooler Leaving Fluid Thermistor Fail", [10]="Cooler Entering Fluid Thermistor Fail", [11]="Condenser Leaving Fluid Thermistor Fail", [12]="Condenser Entering Fluid Thermistor Fail", [13]="Heat Reclaim Entering Fluid Thermistor Fail", [14]="Heat Reclaim Leaving Fluid Thermistor Fail", [15]="Circ A1 Compressor High Motor Temp", [16]="Circ A2 Compressor High Motor Temp", [17]="Circ B1 Compressor High Motor Temp", [18]="Circ B2 Compressor High Motor Temp", [19]="Circ A Low Oil Temp at Startup", [20]="Circ B Low Oil Temp at Startup", [21]="ExtErnAl Reset Temp Thermistor Fail", [22]="Circ A Discharge Pressure Transducer Fail", [23]="Circ B Discharge Pressure Transducer Fail", [24]="Circ A Suction Pressure Transducer Fail", [25]="Circ B Suction Pressure Transducer Fail", [26]="Circ A1 Comp Oil Pressure Transducer Fail", [27]="Circ A2 Comp Oil Pressure Transducer Fail", [28]="Circ B1 Comp Oil Pressure Transducer Fail", [29]="Circ B2 Comp Oil Pressure Transducer Fail", [30]="Circ A Economizer Transducer Fail", [31]="Circ B Economizer Transducer Fail", [32]="Transducer Supply Outside 4.5 to 5.5 Volts", [34]="4 - 20 ma Reset Input Out of Range", [35]="4 - 20 ma Demand Limit Input Out of Range", [36]="Comm Losss", [37]="Circ A Low Saturated Suction Temp", [38]="Circ B Low Saturated Suction Temp", [40]="Circ A1 Compressor Low Oil Pressure", [41]="Circ A2 Compressor Low Oil Pressure", [42]="Circ B1 Compressor Low Oil Pressure", [43]="Circ B2 Compressor Low Oil Pressure", [44]="Circ A Condenser Freeze Protection", [45]="Circ B Condenser Freeze Protection", [46]="Cooler Freeze Protection", [47]="Circ A High Saturated Suction Temp", [48]="Circ B High Saturated Suction Temp", [49]="Loss of Condenser Flow", [50]="Illegal Configuration", [51]="Initial Configuration Required", [52]="Unit is in Emergency Stop", [53]="Cooler Pump Interlock Failed at Startup", [54]="Cooler Pump Interlock Open Unexpectedly", [55]="Cooler Pump Interlock Close when Pump OFF", [56]="Comm Loss with WSM", [57]="Circ A Liquid Level Sensor Fail", [58]="Circ B Liquid Level Sensor Fail", [59]="Circ A1 Compressor Prestart Oil Pressure", [60]="Circ A2 Compressor Prestart Oil Pressure", [61]="Circ B1 Compressor Prestart Oil Pressure", [62]="Circ B2 Compressor Prestart Oil Pressure", [63]="Circ A and B OFF for Alerts-Unit down", [64]="Circ A Loss of Charge", [65]="Circ B Loss of Charge", [66]="Comm Loss with FSM", [67]="Circ A High Discharge Pressure", [68]="Circ B High Discharge Pressure", [70]="High Leaving Chilled Water Temp", [71]="Circ A Low Oil Level/Flow", [72]="Circ B Low Oil Level/Flow", [73]="Circ A Low Discharge Superheat", [74]="Circ B Low Discharge Superheat", [75]="Circ A1 Comp Max Oil Delta P (check oil line)", [76]="Circ A2 Comp Max Oil Delta P (check oil line)", [77]="Circ B1 Comp Max Oil Delta P (check oil line)", [78]="Circ B2 Comp Max Oil Delta P (check oil line)", [79]="Circ A1 Oil Solenoid Fail", [80]="Circ A2 Oil Solenoid Fail", [81]="Circ B1 Oil Solenoid Fail", [82]="Circ B2 Oil Solenoid Fail"}}, + [-1176] = {name="CR_ERRORCODES", apogee=true, levels={[1]="INVALID COMMAND", [2]="INVALID or NON-EXISTENT TABLE", [3]="COMMUNICATION ERROR", [6]="DEVICE NOT CONFIGURED", [7]="VARIABLE DOES NOT EXIST", [8]="INVALID DATA", [9]="ACCESS RESTRICTED", [10]="LIMITS EXCEEDED", [11]="ALARMS NOT AVAILABLE", [12]="CANNOT FORCE VARIABLE", [13]="PARAMETER NOT FOUND", [14]="COMMUNICATION NACK"}}, + [-1177] = {name="FIRE_EST_STATUS", apogee=true, levels={[0]="Normal", [1]="Maintenance Alert", [2]="Monitor", [3]="Active Under Test", [4]="Trouble", [5]="Supervisory", [6]="Alarm", [10]="Sup. Open, Message Disabled"}}, + [-1178] = {name="FIRE_MXL_STATUS", apogee=true, levels={[0]="Normal", [1]="Trouble", [2]="Supervisory", [4]="Security", [8]="Alarm"}}, + [-1179] = {name="FIRE_SIMPLEX4100", apogee=true, levels={[0]="Normal", [1]="Utility / Monitor", [4]="Supervisory", [5]="Priority 2 Alarm", [6]="Alarm"}}, + [-1180] = {name="SECURITY_STATUS", apogee=true, levels={[0]="Normal", [1]="Secure, message displayed", [4]="Open Circuit", [5]="Short Circuit", [20]="Alarm"}}, + [-1181] = {name="WINTER_SUMMER", apogee=true, levels={[0]="WINTER", [1]="SUMMER"}}, + [-1182] = {name="HIGH_LOW", apogee=true, levels={[0]="HIGH", [1]="LOW"}}, + [-1183] = {name="TREND_EVENT", apogee=true, levels={[0]="OFF", [1]="ON", [2]="ALARM"}}, + [-1184] = {name="MC_LON_HP_ALL", apogee=true, levels={[0]="Unocc", [1]="Occ", [2]="OVRD", [6]="Disable", [9]="Fan Only", [12]="CantHeat", [16]="CantCool", [190]="CondOvrd", [191]="BrownOut", [204]="RSnsFail", [205]="Low Temp", [206]="Low Pres", [207]="Hi Pres", [255]="Normal"}}, + [-1185] = {name="MA_RTU_OPSTAT", apogee=true, levels={[0]="Off", [1]="Shutdown", [2]="Startup", [3]="MWU", [7]="Econ", [8]="Heating", [9]="Cooling"}}, + [-1186] = {name="MA_RTU_ALARM", apogee=true, levels={[0]="None", [1]="Lo SAT", [2]="SAT Fail", [3]="RAT Fail", [4]="EAT Fail", [6]="CWT Fail", [7]="ZAT Fail", [8]="ZAT Fail", [9]="SF1 Fail", [10]="SF2 Fail", [13]="RF1 Fail", [14]="RF2 Fail", [17]="SF1VCone", [18]="SF2VCone", [21]="RF1VCone", [22]="RF2VCone", [25]="Hi SAT", [26]="DrtyFltr", [28]="Comp1Flt", [29]="Comp2Flt", [30]="Comp3Flt", [31]="Comp4Flt", [34]="HTG1Flt", [36]="HiStatic"}}, + [-1187] = {name="MA_RTU_WARNING", apogee=true, levels={[0]="None", [1]="SAT Fail", [2]="RAT Fail", [3]="EAT Fail", [5]="CWT Fail", [6]="ZAT Fail", [8]="SF1 Fail", [9]="SF2 Fail", [12]="RF1 Fail", [13]="RF2 Fail", [16]="SF1VCone", [17]="SF2VCone", [20]="RF1VCone", [21]="RF2VCone", [24]="SysSWOpn", [25]="NoAirFlo", [26]="Lo SAT", [27]="Hi SAT", [28]="CLG Lock", [30]="HTG Lock", [31]="VFDBypas", [32]="BMSStart", [33]="HiStatic"}}, + [-1188] = {name="MA_RTU_OPMODE", apogee=true, levels={[0]="Off", [1]="TimeClok", [2]="RemStart", [3]="Occ", [4]="Unocc", [5]="Cal"}}, + [-1189] = {name="MA_RTU_CTL_RESET", apogee=true, levels={[0]="None", [1]="Sfan", [2]="SFnoEcon", [3]="BMS Al", [4]="OAT", [5]="RAT_MAT", [6]="Zone Air"}}, + [-1190] = {name="YO_BAC_YT_WARN", apogee=true, levels={[1]="None", [2]="ClokFail", [3]="Deflt SP", [4]="TransErr", [5]="LoEvapP", [6]="HiCondP", [11]="PurgHiP", [12]="PurgeSW", [13]="ExessPrg", [15]="HiMtrCur", [16]="VanUnCal", [17]="VanUnCal", [18]="HR Inhib", [19]="HRNoData", [20]="HRFrqOOR", [27]="IO Com"}}, + [-1191] = {name="YO_BAC_YT_OPCODE", apogee=true, levels={[1]="StrtRdy", [2]="LocalSD", [3]="RemoteSD", [4]="Warning", [5]="CycleSD", [6]="SafetySD", [7]="Inhibit", [8]="Start", [9]="Run", [10]="RunWarm", [11]="Unload", [12]="Coastdwn"}}, + [-1192] = {name="YO_BAC_YT_SAFETY", apogee=true, levels={[1]="No Abnormal Condition", [2]="Evap - Low Pressure", [3]="Evap - Leaving Liquid Probe", [4]="Evap - Temp Transducer", [5]="Cond - Hi Pres Contacts Open", [6]="Cond - High Pressure", [7]="Cond - Pres Trans Out Of Range", [8]="Aux Safety - Contacts Closed", [9]="Discharge - Low Temp", [10]="Discharge - High Temp", [11]="Oil - High Temp", [12]="Oil - Low Differential Pressure", [13]="Oil - Hi Differential Pressure", [22]="Control Panel - Power Failure", [24]="Mtr Starter - Current Imbal", [30]="VSD - High Heatsink Temp", [31]="VSD - Motor Current Overlook", [32]="VSD - High Phase A Heatsink Temp", [33]="VSD - High Phase B Heatsink Temp", [34]="VSD - High Phase C Heatsink Temp", [35]="VSD - Hi Converter Heatsink Temp", [36]="VSD - Precharge Lockout", [37]="HarmFltr - High Heatsink Temp", [38]="HarmFltr - Hi Demand Distort", [39]="LCSSSS - Phase Loss", [40]="LCSSSS - Current Imbalance", [41]="LCSSSS - Motor Current Overload", [42]="LCSSSS - High Current", [43]="LCSSSS - Open SCR", [44]="LCSSSS - Shorted Phase A SCR", [45]="LCSSSS - Shorted Phase B SCR", [46]="LCSSSS - Shorted Phase C SCR", [47]="LCSSSS - High Phase A Temp", [48]="LCSSSS - High Phase B Temp", [49]="LCSSSS - High Phase C Temp", [50]="Starter - Invalid Mtr Selection", [52]="Evaporator - Low Pressure", [53]="Evaporator - Smart Freeze"}}, + [-1193] = {name="YO_BAC_YT_CYCLE", apogee=true, levels={[1]="No Abnormal Condition", [2]="MultiUnit Cycling - Contact Open", [3]="System Cycling - Contacts Open", [5]="Oil - Low Temp", [6]="Control Panel - Power Failure", [7]="Low Leaving Chilled Water Temp", [8]="No Chilled Water Flow", [9]="Condenser - Flow Switch", [10]="Motor Cntlr - Contacts Open", [11]="Motor Cntlr - Loss Of Current", [12]="Power Fault", [13]="Control Panel - Schedule", [14]="Starter - Lo Supply Voltage", [15]="Starter - Hi Supply Voltage", [18]="VSD Initialization Failure", [19]="VSD Shutdown", [20]="VSD - High Phase A Current", [21]="VSD - High Phase B Current", [22]="VSD - High Phase C Current", [23]="VSD - Phase A Gate Driver", [24]="VSD - Phase B Gate Driver", [25]="VSD - Phase C Gate Driver", [26]="VSD - Single Phase Input Power", [27]="VSD - High DC Bus Voltage", [28]="VSD - Logic Board Power Supply", [29]="VSD - Low DC Bus Voltage", [30]="VSD - DC Bus Voltage Imbalance", [31]="VSD - High Internal Ambient Temp", [32]="VSD - Invalid Current Scale", [33]="VSD - Low Phase A Heatsink Temp", [34]="VSD - Low Phase B Heatsink Temp", [35]="VSD - Low Phase C Heatsink Temp", [36]="VSD - Lo Converter Heatsink Temp", [37]="VSD - Prechrg - DCBus Volt Imbal", [38]="VSD - Precharge - Lo DC Bus Volt", [39]="VSD - Logic Board Processor", [40]="VSD - Run Signal", [41]="VSD - Serial Communications", [42]="VSD - Stop Contacts Open", [43]="HarmFltr - Communications", [44]="HarmFltr - High DC Bus Voltage", [45]="HarmFltr - High Phase A Current", [46]="HarmFltr - High Phase B Current", [47]="HarmFltr - High Phase C Current", [48]="HarmFltr - Phase Locked Loop", [49]="HarmFltr - Low DC Bus Voltage", [50]="HarmFltr - Low DC Bus Voltage", [51]="HarmFltr - DC Bus Voltage Imbal", [52]="HarmFltr - Input Current Ovrload", [53]="HarmFltr - Logic Board Power Sup", [54]="HarmFltr - Run Signal", [55]="HarmFltr - DC Current Trnsfmr 1", [56]="HarmFltr - DC Current Trnsfmr 2", [57]="LCSSS Initialization Failure", [58]="LCSSS Shutdown", [59]="LCSSS - Low PhaseA Heatsink Temp", [60]="LCSSS - Low PhaseB Heatsink Temp", [61]="LCSSS - Low PhaseC Heatsink Temp", [62]="LCSSS - Phase Locked Loop", [63]="LCSSS - Power Fault", [64]="LCSSS - High Supply Line Voltage", [65]="LCSSS - Low Supply Line Voltage", [66]="LCSSS - Invalid Model Selection", [67]="LCSSS - Run Signal", [68]="LCSSS - Serial Communications", [69]="LCSSS - Stop Contacts Open", [71]="LCSSS - Logic Board Processor", [73]="LCSSS - Power Fail", [74]="VSD - Serial Communications", [75]="LCSSS - Serial Communications", [76]="LCSSS - Phase Loss"}}, + [-2000] = {name="DISABLED_ENABLED", apogee=true, levels={[0]="DISABLED", [1]="ENABLED"}}, + [-2001] = {name="NOTOK_OK", apogee=true, levels={[0]="NOTOK", [1]="OK"}}, + [-2002] = {name="RESTORED", apogee=true, levels={[0]="NOT_REST", [1]="RESTORED"}}, + [-2003] = {name="EQS_OFF_ON", apogee=true, levels={[0]="OFF", [1]="ON"}}, + [-2004] = {name="INACTIVE_ACTIVE", apogee=true, levels={[0]="INACTIVE", [1]="ACTIVE"}}, + [-2005] = {name="ZONE_MODE", apogee=true, levels={[0]="VAC", [1]="OCC1", [2]="OCC2", [3]="OCC3", [4]="OCC4", [5]="OCC5", [6]="WARMUP", [7]="COOLDOWN", [8]="NGHT_HTG", [9]="NGHT_CLG", [10]="STOP_HTG", [11]="STOP_CLG"}}, + [-2006] = {name="SSTO_OPERATION", apogee=true, levels={[0]="NONE", [1]="HEATING", [2]="COOLING", [3]="BOTH"}}, + [-2007] = {name="OPERATION_PHASE", apogee=true, levels={[0]="OFF", [1]="HTDURVAC", [2]="CLDURVAC", [3]="STRT_HTG", [4]="STRT_CLG", [5]="REGULATG", [6]="STOP_HTG", [7]="STOP_CLG", [8]="POST_HTG", [9]="POST_CLG"}}, + [-2008] = {name="START_MODE", apogee=true, levels={[0]="STRT_HTG", [1]="STRT_CLG", [2]="NO_STRT"}}, + [-2009] = {name="STOP_MODE", apogee=true, levels={[0]="STOP_HTG", [1]="STOP_CLG", [2]="STOP_HOC", [3]="NO_STOP"}}, + [-2010] = {name="GAS_STEAM", apogee=true, levels={[0]="GAS", [1]="STEAM"}}, + [-2011] = {name="START_STOP", apogee=true, levels={[0]="START", [1]="STOP"}}, + [-2012] = {name="FAIL_NORMAL", apogee=true, levels={[0]="FAIL", [1]="NORMAL"}}, + [-2013] = {name="FLOW_NOFLOW", apogee=true, levels={[0]="FLOW", [1]="NOFLOW"}}, + [-2014] = {name="POS_NEG", apogee=true, levels={[0]="POS", [1]="NEG"}}, + [-2015] = {name="TRUE_FALSE", apogee=true, levels={[0]="TRUE", [1]="FALSE"}}, + [-2016] = {name="ACTIVE_INACTV", apogee=true, levels={[0]="ACTIVE", [1]="INACTV"}}, + [-2017] = {name="DIRTY_CLEAN", apogee=true, levels={[0]="DIRTY", [1]="CLEAN"}}, + [-2018] = {name="HTG_CLG", apogee=true, levels={[0]="HTG", [1]="CLG"}}, + [-2019] = {name="HEATING_COOLNG", apogee=true, levels={[0]="HEATING", [1]="COOLNG"}}, + [-2020] = {name="VARBLE_CNSTNT", apogee=true, levels={[0]="VARBLE", [1]="CNSTNT"}}, + [-2100] = {name="SMOKE_DETECTOR", apogee=true, levels={[0]="INACTIVE", [1]="ACTIVE", [2]="PREALM", [3]="ALMVER", [4]="MAINT", [5]="DIRTY"}}, + [-2101] = {name="PULL_STATION", apogee=true, levels={[0]="OFF", [1]="ON", [2]="STAGEONE"}}, + [-2102] = {name="SYSTEM_STATUS", apogee=true, levels={[0]="OK", [1]="REMOTE", [2]="DBFAULT", [3]="BLNFAULT", [4]="ALMFAULT", [5]="SHUTDOWN"}}, + [-2103] = {name="PRINTER_STATUS", apogee=true, levels={[0]="OK", [1]="PAPEROUT", [2]="FAULT"}}, + [-2104] = {name="CMDLST_STATUS", apogee=true, levels={[0]="IDLE", [1]="ACTIVATE", [2]="DEACTIV"}}, + [-2105] = {name="XLS LDO", apogee=true, levels={[0]="N/A", [1]="ON", [2]="OFF"}}, + [-2106] = {name="Clear_Alarm", apogee=true, levels={[0]="Clear", [1]="Alarm"}}, + [-2107] = {name="Normal_Fault", apogee=true, levels={[0]="Normal", [1]="Fault"}}, + [-2108] = {name="Fault_Normal", apogee=true, levels={[0]="Fault", [1]="Normal"}}, + [-2109] = {name="FIRE_XLS_STATUS", apogee=true, levels={[0]="Normal", [1]="Status", [2]="Test", [3]="Trouble", [4]="Supvisry", [5]="Security", [6]="Alarm"}}, + [-3000] = {name="days_of_week_t", apogee=true, levels={[0]="SUN", [1]="MON", [2]="TUE", [3]="WED", [4]="THU", [5]="FRI", [6]="SAT", [255]="NUL"}}, + [-3500] = {name="days_of_week_b", apogee=true, levels={[1]="SUN", [2]="MON", [3]="TUE", [4]="WED", [5]="THU", [6]="FRI", [7]="SAT"}}, + [-3001] = {name="discrete_levels_t", apogee=true, levels={[0]="OFF", [1]="LOW", [2]="MED", [3]="HIGH", [4]="ON", [255]="NUL"}}, + [-3501] = {name="discrete_levels_b", apogee=true, levels={[1]="OFF", [2]="LOW", [3]="MED", [4]="HIGH", [5]="ON"}}, + [-3002] = {name="telcom_states_t", apogee=false, levels={[0]="TEL_NOTINUSE", [1]="TEL_OFFHOOK", [2]="TEL_DIALING", [3]="TEL_DIALCOMP", [4]="TEL_RINGBACK", [5]="TEL_INCOMING", [6]="TEL_RINGING", [7]="TEL_ANSWERED", [8]="TEL_CONNECTED", [9]="TEL_TALKING", [10]="TEL_HANGINGUP", [11]="TEL_HUNGUPX", [12]="TEL_HOLD", [13]="TEL_UNHOLD", [14]="TEL_RELEASE", [15]="TEL_FULLDUP", [16]="TEL_BLOCKED", [17]="TEL_CWAIT", [18]="TEL_DESTBUSY", [19]="TEL_NETBUSY", [20]="TEL_ERROR", [255]="TEL_NUL"}}, + [-3003] = {name="config_source_t", apogee=false, levels={[0]="LOCAL", [1]="EXTERNAL", [255]="NUL"}}, + [-3004] = {name="file_request_t", apogee=false, levels={[0]="FR_OPEN_TO_SEND", [1]="FR_OPEN_TO_RECEIVE", [2]="FR_CLOSE_FILE", [3]="FR_CLOSE_DELETE_FILE", [4]="FR_DIRECTORY_LOOKUP", [5]="FR_OPEN_TO_SEND_RA", [6]="FR_OPEN_TO_RECEIVE_RA", [255]="FR_NUL"}}, + [-3005] = {name="file_status_t", apogee=false, levels={[0]="FS_XFER_OK", [1]="FS_LOOKUP_OK", [2]="FS_OPEN_FAIL", [3]="FS_LOOKUP_ERR", [4]="FS_XFER_UNDERWAY", [5]="FS_IO_ERR", [6]="FS_TIMEOUT_ERR", [7]="FS_WINDOW_ERR", [8]="FS_AUTH_ERR", [9]="FS_ACCESS_UNAVAIL", [10]="FS_SEEK_INVALID", [11]="FS_SEEK_WAIT", [255]="FS_NUL"}}, + [-3006] = {name="alarm_type_t", apogee=false, levels={[0]="AL_NO_CONDITION", [1]="AL_ALM_CONDITION", [2]="AL_TOT_SVC_ALM_1", [3]="AL_TOT_SVC_ALM_2", [4]="AL_TOT_SVC_ALM_3", [5]="AL_LOW_LMT_CLR_1", [6]="AL_LOW_LMT_CLR_2", [7]="AL_HIGH_LMT_CLR_1", [8]="AL_HIGH_LMT_CLR_2", [9]="AL_LOW_LMT_ALM_1", [10]="AL_LOW_LMT_ALM_2", [11]="AL_HIGH_LMT_ALM_1", [12]="AL_HIGH_LMT_ALM_2", [13]="AL_FIR_ALM", [14]="AL_FIR_PRE_ALM", [15]="AL_FIR_TRBL", [16]="AL_FIR_SUPV", [17]="AL_FIR_TEST_ALM", [18]="AL_FIR_TEST_PRE_ALM", [19]="AL_FIR_ENVCOMP_MAX", [20]="AL_FIR_MONITOR_COND", [21]="AL_FIR_MAINT_ALERT", [255]="AL_NUL"}}, + [-3007] = {name="priority_level_t", apogee=true, levels={[0]="LEVEL_0", [1]="LEVEL_1", [2]="LEVEL_2", [3]="LEVEL_3", [4]="PR_1", [5]="PR_2", [6]="PR_3", [7]="PR_4", [8]="PR_6", [9]="PR_8", [10]="PR_10", [11]="PR_16", [255]="NUL"}}, + [-3507] = {name="priority_level_b", apogee=true, levels={[1]="LEVEL_0", [2]="LEVEL_1", [3]="LEVEL_2", [4]="LEVEL_3", [5]="PR_1", [6]="PR_2", [7]="PR_3", [8]="PR_4", [9]="PR_6", [10]="PR_8", [11]="PR_10", [12]="PR_16"}}, + [-3008] = {name="currency_t", apogee=false, levels={[0]="CU_ARGENTINA_PESO", [1]="CU_AUSTRALIA_DOLLAR", [2]="CU_AUSTRIA_SCHILLING", [3]="CU_BAHRAIN_DINAR", [4]="CU_BELGIUM_FRANC", [5]="CU_BRAZIL_CRUZEIRO_REAL", [6]="CU_BRITAIN_POUND", [7]="CU_CANADA_DOLLAR", [8]="CU_CZECH_KORUNA", [9]="CU_CHILE_PESO", [10]="CU_CHINA_RENMINBI", [11]="CU_COLOMBIA_PESO", [12]="CU_DENMARK_KRONE", [13]="CU_ECUADOR_SUCRE", [14]="CU_EUROPEAN_CURRENCY_UNIT", [15]="CU_FINLAND_MARKKA", [16]="CU_FRANCE_FRANC", [17]="CU_GERMANY_MARK", [18]="CU_GREECE_DRACHMA", [19]="CU_HONG_KONG_DOLLAR", [20]="CU_HUNGARY_FORINT", [21]="CU_INDIA_RUPEE", [22]="CU_INDONESIA_RUPIAH", [23]="CU_IRELAND_PUNT", [24]="CU_ISRAEL_SHEKEL", [25]="CU_ITALY_LIRA", [26]="CU_JAPAN_YEN", [27]="CU_JORDAN_DINAR", [28]="CU_KUWAIT_DINAR", [29]="CU_LEBANON_POUND", [30]="CU_MALAYSIA_RINGGIT", [31]="CU_MALTA_LIRA", [32]="CU_MEXICO_PESO", [33]="CU_NETHERLANDS_GUILDER", [34]="CU_NEW_ZEALAND_DOLLAR", [35]="CU_NORWAY_KRONE", [36]="CU_PAKISTAN_RUPEE", [37]="CU_PERU_NEW_SOL", [38]="CU_PHILIPPINES_PESO", [39]="CU_POLAND_ZLOTY", [40]="CU_PORTUGAL_ESCUDO", [41]="CU_SAUDI_ARABIA_RIYAL", [42]="CU_SINGAPORE_DOLLAR", [43]="CU_SLOVAK_KORUNA", [44]="CU_SOUTH_AFRICA_RAND", [45]="CU_SOUTH_KOREA_WON", [46]="CU_SPAIN_PESETA", [47]="CU_SPECIAL_DRAWING_RIGHTS", [48]="CU_SWEDEN_KRONA", [49]="CU_SWITZERLAND_FRANC", [50]="CU_TAIWAN_DOLLAR", [51]="CU_THAILAND_BAHT", [52]="CU_TURKEY_LIRA", [53]="CU_UNITED_ARAB_DIRHAM", [54]="CU_UNITED_STATES_DOLLAR", [55]="CU_URUGUAY_NEW_PESO", [56]="CU_VENEZUELA_BOLIVAR", [255]="CU_NUL"}}, + [-3009] = {name="object_request_t", apogee=true, levels={[0]="NORMAL", [1]="DISABLED", [2]="UPDATE_S", [3]="SELFTEST", [4]="UPDATE_A", [5]="RPTMASK", [6]="OVERRIDE", [7]="ENABLE", [8]="REMVOVRD", [9]="CLRSTAT", [10]="CLRALARM", [11]="ALNVYENA", [12]="ALNVYDIS", [13]="MANUAL", [14]="REMOTE", [15]="PROGRAM", [16]="CLRESET", [255]="NUL"}}, + [-3509] = {name="object_request_b", apogee=true, levels={[1]="NORMAL", [2]="DISABLED", [3]="UPDATE_S", [4]="SELFTEST", [5]="UPDATE_A", [6]="RPTMASK", [7]="OVERRIDE", [8]="ENABLE", [9]="REMVOVRD", [10]="CLRSTAT", [11]="CLRALARM", [12]="ALNVYENA", [13]="ALNVYDIS", [14]="MANUAL", [15]="REMOTE", [16]="PROGRAM", [17]="CLRESET"}}, + [-3010] = {name="learn_mode_t", apogee=false, levels={[0]="LN_RECALL", [1]="LN_LEARN_CURRENT", [2]="LN_LEARN_VALUE", [3]="LN_REPORT_VALUE", [255]="LN_NUL"}}, + [-3011] = {name="override_t", apogee=true, levels={[0]="RETAIN", [1]="SPECIFY", [2]="DEFAULT", [255]="NUL"}}, + [-3511] = {name="override_b", apogee=true, levels={[1]="RETAIN", [2]="SPECIFY", [3]="DEFAULT"}}, + [-3012] = {name="emerg_t", apogee=true, levels={[0]="NORMAL", [1]="PRESS", [2]="DEPRESS", [3]="PURGE", [4]="SHUTDOWN", [5]="FIRE", [255]="NUL"}}, + [-3512] = {name="emerg_b", apogee=true, levels={[1]="NORMAL", [2]="PRESS", [3]="DEPRESS", [4]="PURGE", [5]="SHUTDOWN", [6]="FIRE"}}, + [-3013] = {name="hvac_t", apogee=true, levels={[0]="AUTO", [1]="HEAT", [2]="WARMUP", [3]="COOL", [4]="NGT_PURG", [5]="PRE_COOL", [6]="OFF", [7]="TEST", [8]="EMERHEAT", [9]="FAN_ONLY", [10]="FREECOOL", [11]="ICE", [12]="MAX_HEAT", [13]="ECONOMY", [14]="DEHUMID", [255]="NUL"}}, + [-3513] = {name="hvac_b", apogee=true, levels={[1]="AUTO", [2]="HEAT", [3]="WARMUP", [4]="COOL", [5]="NGT_PURG", [6]="PRE_COOL", [7]="OFF", [8]="TEST", [9]="EMERHEAT", [10]="FAN_ONLY", [11]="FREECOOL", [12]="ICE", [13]="MAX_HEAT", [14]="ECONOMY", [15]="DEHUMID"}}, + [-3014] = {name="occup_t", apogee=true, levels={[0]="OCC", [1]="UNOCC", [2]="BYPASS", [3]="STANDBY", [255]="NUL"}}, + [-3514] = {name="occup_b", apogee=true, levels={[1]="OCC", [2]="UNOCC", [3]="BYPASS", [4]="STANDBY"}}, + [-3015] = {name="hvac_overid_t", apogee=true, levels={[0]="OFF", [1]="POSITION", [2]="FLOW_VAL", [3]="FLOW_PCT", [4]="OPEN", [5]="CLOSE", [6]="MINIMUM", [7]="MAXIMUM", [8]="UNUSED8", [9]="UNUSED9", [10]="UNUSED10", [11]="UNUSED11", [12]="UNUSED12", [13]="UNUSED13", [14]="UNUSED14", [15]="UNUSED15", [16]="UNUSED16", [17]="POS_1", [18]="FLOWVAL1", [19]="FLOWPCT1", [20]="OPEN1", [21]="CLOSE1", [22]="MINIMUM1", [23]="MAXIMUM1", [24]="UNUSED24", [25]="UNUSED25", [26]="UNUSED26", [27]="UNUSED27", [28]="UNUSED28", [29]="UNUSED29", [30]="UNUSED30", [31]="UNUSED31", [32]="UNUSED32", [33]="POS_2", [34]="FLOWVAL2", [35]="FLOWPCT2", [36]="OPEN2", [37]="CLOSE2", [38]="MINIMUM2", [39]="MAXIMUM2", [40]="UNUSED40", [41]="UNUSED41", [42]="UNUSED42", [43]="UNUSED43", [44]="UNUSED44", [45]="UNUSED45", [46]="UNUSED46", [47]="UNUSED47", [48]="UNUSED48", [255]="NUL"}}, + [-3515] = {name="hvac_overid_b", apogee=true, levels={[1]="OFF", [2]="POSITION", [3]="FLOW_VAL", [4]="FLOW_PCT", [5]="OPEN", [6]="CLOSE", [7]="MINIMUM", [8]="MAXIMUM", [9]="UNUSED8", [10]="UNUSED9", [11]="UNUSED10", [12]="UNUSED11", [13]="UNUSED12", [14]="UNUSED13", [15]="UNUSED14", [16]="UNUSED15", [17]="UNUSED16", [18]="POS_1", [19]="FLOWVAL1", [20]="FLOWPCT1", [21]="OPEN1", [22]="CLOSE1", [23]="MINIMUM1", [24]="MAXIMUM1", [25]="UNUSED24", [26]="UNUSED25", [27]="UNUSED26", [28]="UNUSED27", [29]="UNUSED28", [30]="UNUSED29", [31]="UNUSED30", [32]="UNUSED31", [33]="UNUSED32", [34]="POS_2", [35]="FLOWVAL2", [36]="FLOWPCT2", [37]="OPEN2", [38]="CLOSE2", [39]="MINIMUM2", [40]="MAXIMUM2", [41]="UNUSED40", [42]="UNUSED41", [43]="UNUSED42", [44]="UNUSED43", [45]="UNUSED44", [46]="UNUSED45", [47]="UNUSED46", [48]="UNUSED47", [49]="UNUSED48"}}, + [-3016] = {name="scene_t", apogee=true, levels={[0]="RECALL", [1]="LEARN", [2]="DISPLAY", [3]="GRP_OFF", [4]="GP_ON", [5]="STAT_OFF", [6]="STAT_ON", [7]="STAT_MIX", [8]="GRP_STAT", [9]="FLICK", [10]="TIMEOUT", [11]="TMO_FLK", [12]="DELAYOFF", [13]="DLA_FLK", [14]="DELAYON", [15]="ENA_GRP", [16]="DIS_GRP", [17]="CLEANON", [18]="CLEANOFF", [19]="WINK", [20]="RESET", [21]="MODE1", [22]="MODE2", [23]="MODE3", [255]="NUL"}}, + [-3516] = {name="scene_b", apogee=true, levels={[1]="RECALL", [2]="LEARN", [3]="DISPLAY", [4]="GRP_OFF", [5]="GP_ON", [6]="STAT_OFF", [7]="STAT_ON", [8]="STAT_MIX", [9]="GRP_STAT", [10]="FLICK", [11]="TIMEOUT", [12]="TMO_FLK", [13]="DELAYOFF", [14]="DLA_FLK", [15]="DELAYON", [16]="ENA_GRP", [17]="DIS_GRP", [18]="CLEANON", [19]="CLEANOFF", [20]="WINK", [21]="RESET", [22]="MODE1", [23]="MODE2", [24]="MODE3"}}, + [-3017] = {name="scene_config_t", apogee=false, levels={[0]="SCF_SAVE", [1]="SCF_CLEAR", [2]="SCF_REPORT", [3]="SCF_SIZE", [4]="SCF_FREE", [255]="SCF_NUL"}}, + [-3018] = {name="setting_t", apogee=true, levels={[0]="OFF", [1]="ON", [2]="DOWN", [3]="UP", [4]="STOP", [5]="STATE", [255]="NUL"}}, + [-3518] = {name="setting_b", apogee=true, levels={[1]="OFF", [2]="ON", [3]="DOWN", [4]="UP", [5]="STOP", [6]="STATE"}}, + [-3019] = {name="evap_t", apogee=true, levels={[0]="NO_CLG", [1]="COOLING", [2]="EMER_CLG", [255]="NUL"}}, + [-3519] = {name="evap_b", apogee=true, levels={[1]="NO_CLG", [2]="COOLING", [3]="EMER_CLG"}}, + [-3020] = {name="therm_mode_t", apogee=true, levels={[0]="NO_CTL", [1]="IN_OUT", [2]="MODULATE", [255]="NUL"}}, + [-3520] = {name="therm_mode_b", apogee=true, levels={[1]="NO_CTL", [2]="IN_OUT", [3]="MODULATE"}}, + [-3021] = {name="defrost_mode_t", apogee=true, levels={[0]="AMBIENT", [1]="FORCED", [2]="SYNC", [255]="NUL"}}, + [-3521] = {name="defrost_mode_b", apogee=true, levels={[1]="AMBIENT", [2]="FORCED", [3]="SYNC"}}, + [-3022] = {name="defrost_term_t", apogee=true, levels={[0]="TEMP", [1]="TIME", [2]="FIRST", [3]="LAST", [255]="NUL"}}, + [-3522] = {name="defrost_term_b", apogee=true, levels={[1]="TEMP", [2]="TIME", [3]="FIRST", [4]="LAST"}}, + [-3023] = {name="defrost_state_t", apogee=true, levels={[0]="STANDBY", [1]="PUMPDOWN", [2]="DEFROST", [3]="DRAINDWN", [4]="INJ_DLY", [255]="NUL"}}, + [-3523] = {name="defrost_state_b", apogee=true, levels={[1]="STANDBY", [2]="PUMPDOWN", [3]="DEFROST", [4]="DRAINDWN", [5]="INJ_DLY"}}, + [-3024] = {name="chiller_t", apogee=true, levels={[0]="OFF", [1]="START", [2]="RUN", [3]="PRESHUTD", [4]="SERVICE", [255]="NUL"}}, + [-3524] = {name="chiller_b", apogee=true, levels={[1]="OFF", [2]="START", [3]="RUN", [4]="PRESHUTD", [5]="SERVICE"}}, + [-3025] = {name="fire_test_t", apogee=true, levels={[0]="NORMAL", [1]="RESET", [2]="TEST", [3]="NOTEST", [255]="NUL"}}, + [-3525] = {name="fire_test_b", apogee=true, levels={[1]="NORMAL", [2]="RESET", [3]="TEST", [4]="NOTEST"}}, + [-3026] = {name="fire_initiator_t", apogee=false, levels={[0]="FI_UNDEFINED", [1]="FI_THERMAL_FIXED", [2]="FI_SMOKE_ION", [3]="FI_MULTI_ION_THERMAL", [4]="FI_SMOKE_PHOTO", [5]="FI_MULTI_PHOTO_THERMAL", [6]="FI_MULTI_PHOTO_ION", [7]="FI_MULTI_PHOTO_ION_THERMAL", [8]="FI_THERMAL_ROR", [9]="FI_MULTI_THERMAL_ROR", [10]="FI_MANUAL_PULL", [11]="FI_WATER_FLOW", [12]="FI_WATER_FLOW_TAMPER", [13]="FI_STATUS_ONLY", [14]="FI_MANUAL_CALL", [15]="FI_FIREMAN_CALL", [16]="FI_UNIVERSAL", [255]="FI_NUL"}}, + [-3027] = {name="fire_indicator_t", apogee=true, levels={[0]="UNDEF", [1]="STROBE_U", [2]="STROBE_S", [3]="HORN", [4]="CHIME", [5]="BELL", [6]="SOUNDER", [7]="SPEAKER", [8]="UNIVERSL", [255]="NUL"}}, + [-3527] = {name="fire_indicator_b", apogee=true, levels={[1]="UNDEF", [2]="STROBE_U", [3]="STROBE_S", [4]="HORN", [5]="CHIME", [6]="BELL", [7]="SOUNDER", [8]="SPEAKER", [9]="UNIVERSL"}}, + [-3028] = {name="calendar_type_t", apogee=false, levels={[0]="CAL_GREG", [1]="CAL_JUL", [2]="CAL_MEU", [255]="CAL_NUL"}}, + [-3029] = {name="reg_val_unit_t", apogee=false, levels={[0]="RVU_NONE", [1]="RVU_W", [2]="RVU_KW", [3]="RVU_MW", [4]="RVU_GW", [5]="RVU_VAR", [6]="RVU_KVAR", [7]="RVU_MVAR", [8]="RVU_GVAR", [9]="RVU_WH", [10]="RVU_KWH", [11]="RVU_MWH", [12]="RVU_GWH", [13]="RVU_VARH", [14]="RVU_KVARH", [15]="RVU_MVARH", [16]="RVU_GVARH", [17]="RVU_V", [18]="RVU_A", [19]="RVU_COSF", [20]="RVU_M3", [21]="RVU_L", [22]="RVU_ML", [23]="RVU_USGAL", [24]="RVU_GJ", [25]="RVU_MJ", [26]="RVU_MCAL", [27]="RVU_KCAL", [28]="RVU_MBTU", [29]="RVU_KBTU", [30]="RVU_MJH", [31]="RVU_MLS", [32]="RVU_LS", [33]="RVU_M3S", [34]="RVU_C", [35]="RVU_LH", [36]="RVU_VA", [37]="RVU_KVA", [38]="RVU_MVA", [39]="RVU_GVA", [40]="RVU_VAH", [41]="RVU_KVAH", [42]="RVU_MVAH", [43]="RVU_GVAH", [255]="RVU_NUL"}}, + [-3030] = {name="hvac_hvt_t", apogee=true, levels={[0]="GENERIC", [1]="FAN_COIL", [2]="VAV", [3]="HEATPUMP", [4]="ROOFTOP", [5]="UNITVENT", [6]="CHILCEIL", [7]="RADIATOR", [8]="AHU", [9]="SELFCONT", [255]="NUL"}}, + [-3530] = {name="hvac_hvt_b", apogee=true, levels={[1]="GENERIC", [2]="FAN_COIL", [3]="VAV", [4]="HEATPUMP", [5]="ROOFTOP", [6]="UNITVENT", [7]="CHILCEIL", [8]="RADIATOR", [9]="AHU", [10]="SELFCONT"}}, + [-3031] = {name="event_mode_type_t", apogee=true, levels={[0]="LIST_END", [1]="SCENE", [2]="MODE", [255]="NUL"}}, + [-3531] = {name="event_mode_type_b", apogee=true, levels={[1]="LIST_END", [2]="SCENE", [3]="MODE"}}, + [-3100] = {name="T_in", apogee=false, levels={[0]="SPACE_TEMP", [1]="SPACE_SETPT_TEMP", [2]="SOURCE_TEMP", [3]="DISCH_TEMP", [4]="OA_TEMP", [5]="MIXED_TEMP", [8]="STAT_SWITCH_DI", [9]="OCC_SENSOR_DI", [10]="WALL_SWITCH_DI", [11]="LOW_TEMP_DI", [12]="FAN_STATUS_DI", [15]="ONBD_PRESSURE_PCT", [16]="EXT_PRESSURE_PCT", [17]="EXT_PRESSURE2_PCT", [19]="SPARE1_TEMP", [20]="SPARE1_DI", [21]="SPARE1_PCT", [255]="IN_UNUSED"}}, + [-3101] = {name="T_out", apogee=false, levels={[0]="TRM_H_COIL_AO", [1]="TRM_H_COIL_FLT_MTR", [2]="TRM_H_COIL_2POS_DO", [3]="TRM_H_STAGE1_DO", [4]="TRM_H_STAGE2_DO", [5]="TRM_H_STAGE3_DO", [6]="TRM_C_COIL_AO", [7]="TRM_C_COIL_FLT_MTR", [8]="TRM_C_COIL_2POS_DO", [9]="PERIM_H_COIL_AO", [10]="PERIM_H_COIL_FLT_MTR", [11]="PERIM_H_STAGE1_DO", [12]="AUX_H_COIL_AO", [13]="AUX_H_COIL_FLT_MTR", [14]="AUX_H_STAGE1_DO", [15]="AUX_H_STAGE2_DO", [16]="AUX_H_STAGE3_DO", [17]="FLOW_DMPR_AO", [18]="FLOW_DMPR_FLT_MTR", [19]="FLOW_DMPR2_AO", [20]="FLOW_DMPR2_FLT_MTR", [21]="OA_DMPR_AO", [22]="OA_DMPR_FLT_MTR", [23]="OA_DMPR_2POS_DO", [24]="FACE_BYPASS_AO", [25]="FACE_BYPASS_FLT_MTR", [26]="DX_STAGE1_DO", [27]="DX_STAGE2_DO", [28]="DX_STAGE3_DO", [29]="H_DX_STAGE1_DO", [30]="H_DX_STAGE2_DO", [31]="H_DX_STAGE3_DO", [32]="REV_RELAY_DO", [33]="TRM_FAN_DO", [34]="SPC_LIGHTS_DO", [35]="SPARE1_AO", [36]="SPARE2_AO", [37]="SPARE1_DO", [38]="SPARE2_DO", [255]="OUT_UNUSED"}}, + [-3102] = {name="T_sparei", apogee=false, levels={[0]="STAT_TEMP", [1]="STAT_SETPT_TEMP", [2]="SPARE1_TEMP", [3]="SPARE2_TEMP", [4]="SPARE3_TEMP", [5]="SPARE4_TEMP", [6]="SPARE5_TEMP", [7]="SPARE6_TEMP", [8]="STAT_OVRD_DI", [9]="SPARE1_DI", [10]="SPARE2_DI", [11]="SPARE3_DI", [12]="SPARE4_DI", [13]="SPARE5_DI", [14]="SPARE6_DI", [15]="SPARE1_PCT", [16]="SPARE2_PCT", [17]="SPARE3_PCT", [18]="SPARE4_PCT", [255]="IN_UNUSED"}}, + [-3103] = {name="T_spareo", apogee=false, levels={[0]="SPARE1_AO", [6]="SPARE2_AO", [9]="SPARE3_AO", [10]="SPARE1_FLT_MTR", [13]="SPARE2_FLT_MTR", [18]="SPARE3_FLT_MTR", [20]="SPARE4_FLT_MTR", [26]="SPARE1_DO", [27]="SPARE2_DO", [28]="SPARE3_DO", [29]="SPARE4_DO", [30]="SPARE5_DO", [31]="SPARE6_DO", [32]="SPARE7_DO", [33]="SPARE8_DO", [255]="OUT_UNUSED"}}, + [-3104] = {name="boolean", apogee=true, levels={[0]="FALSE", [1]="TRUE"}}, + [-3604] = {name="b_boolean", apogee=true, levels={[1]="FALSE", [2]="TRUE"}}, + [-3105] = {name="T_UNVT_device_mode", apogee=true, levels={[0]="MODULATE", [1]="CYCLE", [2]="OFF", [3]="ON"}}, + [-3605] = {name="B_UNVT_device_mode", apogee=true, levels={[1]="MODULATE", [2]="CYCLE", [3]="OFF", [4]="ON"}}, + [-3106] = {name="T_UNVT_coil_control", apogee=true, levels={[0]="VALVE", [1]="BYP_DMPR"}}, + [-3606] = {name="B_UNVT_coil_control", apogee=true, levels={[1]="VALVE", [2]="BYP_DMPR"}}, + [-3107] = {name="T_UNVT_switch_method", apogee=true, levels={[0]="DEADBAND", [1]="PWM"}}, + [-3607] = {name="B_UNVT_switch_method", apogee=true, levels={[1]="DEADBAND", [2]="PWM"}}, + [-3108] = {name="T_UNVT_energy_type", apogee=true, levels={[0]="ELECTRIC", [1]="HOTWATER", [2]="STEAM", [3]="CHILLWTR", [4]="OUT_AIR"}}, + [-3608] = {name="B_UNVT_energy_type", apogee=true, levels={[1]="ELECTRIC", [2]="HOTWATER", [3]="STEAM", [4]="CHILLWTR", [5]="OUT_AIR"}}, + [-3109] = {name="T_UNVT_air_terminal", apogee=true, levels={[0]="NO_FAN", [1]="SERIES", [2]="PARALLEL"}}, + [-3609] = {name="B_UNVT_air_terminal", apogee=true, levels={[1]="NO_FAN", [2]="SERIES", [3]="PARALLEL"}}, + [-3110] = {name="T_contact", apogee=true, levels={[0]="NRM_OPEN", [1]="NRM_CLOS"}}, + [-3610] = {name="B_contact", apogee=true, levels={[1]="NRM_OPEN", [2]="NRM_CLOS"}}, + [-3111] = {name="T_DO_offset", apogee=true, levels={[0]="NRM_OFF", [1]="NRM_ON"}}, + [-3611] = {name="B_DO_offset", apogee=true, levels={[1]="NRM_OFF", [2]="NRM_ON"}}, + [-3112] = {name="aux_dp_loc_t", apogee=true, levels={[0]="HOT_DUCT", [1]="DSCH_DCT"}}, + [-3612] = {name="aux_dp_loc_b", apogee=true, levels={[1]="HOT_DUCT", [2]="DSCH_DCT"}}, + [-3113] = {name="disable_type_t", apogee=true, levels={[0]="NONE", [1]="BYPASS", [2]="DI1", [3]="DI2", [4]="DI3", [5]="DI4", [6]="DI5", [7]="DI6", [8]="DO1", [9]="DO2", [10]="DO3", [11]="DO4", [12]="DO5", [13]="DO6", [14]="DO7", [15]="DO8", [16]="NVI_DIS"}}, + [-3613] = {name="disable_type_b", apogee=true, levels={[1]="NONE", [2]="BYPASS", [3]="DI1", [4]="DI2", [5]="DI3", [6]="DI4", [7]="DI5", [8]="DI6", [9]="DO1", [10]="DO2", [11]="DO3", [12]="DO4", [13]="DO5", [14]="DO6", [15]="DO7", [16]="DO8", [17]="NVI_DIS"}}, + [-3114] = {name="dp_range_t", apogee=true, levels={[0]="DP2_INWC", [1]="DP1_INWC", [2]="DP_HALF"}}, + [-3614] = {name="dp_range_b", apogee=true, levels={[1]="DP2_INWC", [2]="DP1_INWC", [3]="DP_HALF"}}, + [-3115] = {name="econ_control_t", apogee=true, levels={[0]="NONE", [1]="MAT", [2]="DAT", [3]="INTLK"}}, + [-3615] = {name="econ_control_b", apogee=true, levels={[1]="NONE", [2]="MAT", [3]="DAT", [4]="INTLK"}}, + [-3116] = {name="fan_coef_sel_t", apogee=true, levels={[0]="CUSTOM", [1]="TYPE_3", [2]="TYPE_5", [3]="TYPE_7"}}, + [-3616] = {name="fan_coef_sel_b", apogee=true, levels={[1]="CUSTOM", [2]="TYPE_3", [3]="TYPE_5", [4]="TYPE_7"}}, + [-3117] = {name="fnc_select_t", apogee=true, levels={[0]="MINIMUM", [1]="MAXIMUM", [2]="AVERAGE"}}, + [-3617] = {name="fnc_select_b", apogee=true, levels={[1]="MINIMUM", [2]="MAXIMUM", [3]="AVERAGE"}}, + [-3118] = {name="reset_src_t", apogee=true, levels={[0]="NONE", [1]="RETURN", [2]="SPACE", [3]="OA_TEMP", [4]="PERCENT"}}, + [-3618] = {name="reset_src_b", apogee=true, levels={[1]="NONE", [2]="RETURN", [3]="SPACE", [4]="OA_TEMP", [5]="PERCENT"}}, + [-3119] = {name="series_parl_t", apogee=true, levels={[0]="SERIES", [1]="PARALLEL"}}, + [-3619] = {name="series_parl_b", apogee=true, levels={[1]="SERIES", [2]="PARALLEL"}}, + [-3120] = {name="source_type_t", apogee=true, levels={[0]="STAT_TMP", [1]="STAT_SPT", [2]="PVI_TEMP", [3]="PVI_PCT", [4]="NVI_TEMP", [5]="NVI_PCT", [6]="PID", [7]="MAP", [8]="COMPARE", [9]="NCI_TEMP", [10]="NCI_PCT", [11]="AIRFLOW"}}, + [-3620] = {name="source_type_b", apogee=true, levels={[1]="STAT_TMP", [2]="STAT_SPT", [3]="PVI_TEMP", [4]="PVI_PCT", [5]="NVI_TEMP", [6]="NVI_PCT", [7]="PID", [8]="MAP", [9]="COMPARE", [10]="NCI_TEMP", [11]="NCI_PCT", [12]="AIRFLOW"}}, + [-3121] = {name="src_tmp_loc_t", apogee=true, levels={[0]="NONE", [1]="COLD_DCT", [2]="HOT_DUCT"}}, + [-3621] = {name="src_tmp_loc_b", apogee=true, levels={[1]="NONE", [2]="COLD_DCT", [3]="HOT_DUCT"}}, + [-3122] = {name="temp_source_t", apogee=true, levels={[0]="RETURN", [1]="SPACE", [2]="FIXED"}}, + [-3622] = {name="temp_source_b", apogee=true, levels={[1]="RETURN", [2]="SPACE", [3]="FIXED"}}, + [-3123] = {name="UNVT_unit_t", apogee=true, levels={[0]="TEMP", [1]="PERCENT"}}, + [-3623] = {name="UNVT_unit_b", apogee=true, levels={[1]="TEMP", [2]="PERCENT"}}, + [-3200] = {name="T_HP_in", apogee=false, levels={[0]="SPACE_TEMP", [1]="SPACE_SETPT_TEMP", [2]="SOURCE_TEMP", [4]="OA_TEMP", [5]="MIXED_TEMP", [8]="STAT_SWITCH_DI", [9]="OCC_SENSOR_DI", [10]="WALL_SWITCH_DI", [11]="LOW_TEMP_DI", [12]="FAN_STATUS_DI", [19]="SPARE1_TEMP", [20]="SPARE1_DI", [21]="SPARE1_PCT", [255]="IN_UNUSED"}}, + [-3201] = {name="T_HP_out", apogee=false, levels={[9]="PERIM_H_COIL_AO", [10]="PERIM_H_COIL_FLT_MTR", [11]="PERIM_H_STAGE1_DO", [12]="AUX_H_COIL_AO", [13]="AUX_H_COIL_FLT_MTR", [14]="AUX_H_STAGE1_DO", [15]="AUX_H_STAGE2_DO", [16]="AUX_H_STAGE3_DO", [21]="OA_DMPR_AO", [22]="OA_DMPR_FLT_MTR", [23]="OA_DMPR_2POS_DO", [26]="DX_STAGE1_DO", [27]="DX_STAGE2_DO", [28]="DX_STAGE3_DO", [29]="H_DX_STAGE1_DO", [30]="H_DX_STAGE2_DO", [31]="H_DX_STAGE3_DO", [32]="REV_RELAY_DO", [33]="TRM_FAN_DO", [35]="SPARE1_AO", [37]="SPARE1_DO", [255]="OUT_UNUSED"}}, + [-3210] = {name="T_MUX_in", apogee=false, levels={[0]="STAT_TEMP", [1]="STAT_SETPT_TEMP", [2]="SPARE1_TEMP", [3]="SPARE2_TEMP", [4]="SPARE3_TEMP", [5]="SPARE4_TEMP", [6]="SPARE5_TEMP", [7]="SPARE6_TEMP", [8]="STAT_OVRD_DI", [9]="SPARE1_DI", [10]="SPARE2_DI", [11]="SPARE3_DI", [12]="SPARE4_DI", [13]="SPARE5_DI", [14]="SPARE6_DI", [15]="SPARE1_PCT", [16]="SPARE2_PCT", [17]="SPARE3_PCT", [18]="SPARE4_PCT", [255]="IN_UNUSED"}}, + [-3211] = {name="T_MUX_out", apogee=false, levels={[0]="SPARE1_AO", [6]="SPARE2_AO", [9]="SPARE3_AO", [10]="SPARE1_FLT_MTR", [13]="SPARE2_FLT_MTR", [18]="SPARE3_FLT_MTR", [20]="SPARE4_FLT_MTR", [26]="SPARE1_DO", [27]="SPARE2_DO", [28]="SPARE3_DO", [29]="SPARE4_DO", [30]="SPARE5_DO", [31]="SPARE6_DO", [32]="SPARE7_DO", [33]="SPARE8_DO", [255]="OUT_UNUSED"}}, + [-3220] = {name="T_UV_in", apogee=false, levels={[0]="SPACE_TEMP", [1]="SPACE_SETPT_TEMP", [3]="DISCH_TEMP", [4]="OA_TEMP", [8]="STAT_SWITCH_DI", [9]="OCC_SENSOR_DI", [10]="WALL_SWITCH_DI", [11]="LOW_TEMP_DI", [19]="SPARE1_TEMP", [20]="SPARE1_DI", [21]="SPARE1_PCT", [255]="IN_UNUSED"}}, + [-3221] = {name="T_UV_out", apogee=false, levels={[0]="TRM_H_COIL_AO", [1]="TRM_H_COIL_FLT_MTR", [2]="TRM_H_COIL_2POS_DO", [3]="TRM_H_STAGE1_DO", [4]="TRM_H_STAGE2_DO", [5]="TRM_H_STAGE3_DO", [6]="TRM_C_COIL_AO", [7]="TRM_C_COIL_FLT_MTR", [8]="TRM_C_COIL_2POS_DO", [9]="PERIM_H_COIL_AO", [10]="PERIM_H_COIL_FLT_MTR", [11]="PERIM_H_STAGE1_DO", [21]="OA_DMPR_AO", [22]="OA_DMPR_FLT_MTR", [24]="FACE_BYPASS_AO", [25]="FACE_BYPASS_FLT_MTR", [33]="TRM_FAN_DO", [34]="SPC_LIGHTS_DO", [35]="SPARE1_AO", [36]="SPARE2_AO", [37]="SPARE1_DO", [38]="SPARE2_DO", [255]="OUT_UNUSED"}}, + [-3230] = {name="T_FC_in", apogee=false, levels={[0]="SPACE_TEMP", [1]="SPACE_SETPT_TEMP", [2]="SOURCE_TEMP", [8]="STAT_SWITCH_DI", [9]="OCC_SENSOR_DI", [10]="WALL_SWITCH_DI", [19]="SPARE1_TEMP", [20]="SPARE1_DI", [21]="SPARE1_PCT", [255]="IN_UNUSED"}}, + [-3231] = {name="T_FC_out", apogee=false, levels={[0]="TRM_H_COIL_AO", [1]="TRM_H_COIL_FLT_MTR", [3]="TRM_H_STAGE1_DO", [4]="TRM_H_STAGE2_DO", [5]="TRM_H_STAGE3_DO", [6]="TRM_C_COIL_AO", [7]="TRM_C_COIL_FLT_MTR", [9]="PERIM_H_COIL_AO", [10]="PERIM_H_COIL_FLT_MTR", [11]="PERIM_H_STAGE1_DO", [33]="TRM_FAN_DO", [34]="SPC_LIGHTS_DO", [35]="SPARE1_AO", [36]="SPARE2_AO", [37]="SPARE1_DO", [38]="SPARE2_DO", [255]="OUT_UNUSED"}}, + [-3240] = {name="T_VAV_in", apogee=false, levels={[0]="SPACE_TEMP", [1]="SPACE_SETPT_TEMP", [2]="SOURCE_TEMP", [8]="STAT_SWITCH_DI", [9]="OCC_SENSOR_DI", [10]="WALL_SWITCH_DI", [15]="ONBD_PRESSURE_PCT", [20]="SPARE1_DI", [21]="SPARE1_PCT", [255]="IN_UNUSED"}}, + [-3241] = {name="T_VAV_out", apogee=false, levels={[0]="TRM_H_COIL_AO", [1]="TRM_H_COIL_FLT_MTR", [3]="TRM_H_STAGE1_DO", [4]="TRM_H_STAGE2_DO", [5]="TRM_H_STAGE3_DO", [9]="PERIM_H_COIL_AO", [10]="PERIM_H_COIL_FLT_MTR", [11]="PERIM_H_STAGE1_DO", [17]="FLOW_DMPR_AO", [18]="FLOW_DMPR_FLT_MTR", [33]="TRM_FAN_DO", [34]="SPC_LIGHTS_DO", [35]="SPARE1_AO", [37]="SPARE1_DO", [255]="OUT_UNUSED"}}, +} + +p2data.revisions = { + ["INT02"] = {level="2.0", cab="INSIGHT", str="RAD50"}, + ["INT03"] = {level="3.0", cab="INSIGHT", str="RAD50"}, + ["INT0310"] = {level="3.1", cab="INSIGHT", str="ASCII"}, + ["INT0320"] = {level="3.2", cab="INSIGHT", str="ASCII"}, + ["INT0330"] = {level="3.3", cab="INSIGHT", str="ASCII"}, + ["INT0340"] = {level="3.4", cab="INSIGHT", str="ASCII"}, + ["INT0350"] = {level="3.5", cab="INSIGHT", str="ASCII"}, + ["INT0351"] = {level="3.51", cab="INSIGHT", str="ASCII"}, + ["INT0360"] = {level="3.6", cab="INSIGHT", str="ASCII"}, + ["INT0370"] = {level="3.7", cab="INSIGHT", str="ASCII"}, + ["INT0380"] = {level="3.8", cab="INSIGHT", str="ASCII"}, + ["INT0381"] = {level="3.81", cab="INSIGHT", str="ASCII"}, + ["INT0390"] = {level="3.9", cab="INSIGHT", str="ASCII"}, + ["INT0391"] = {level="3.91", cab="INSIGHT", str="ASCII"}, + ["INT3100"] = {level="3.10", cab="INSIGHT", str="ASCII"}, + ["INT3110"] = {level="3.11", cab="INSIGHT", str="ASCII"}, + ["INT3120"] = {level="3.12", cab="INSIGHT", str="ASCII"}, + ["INT3130"] = {level="3.13", cab="INSIGHT", str="ASCII"}, + ["INT3140"] = {level="3.14", cab="INSIGHT", str="ASCII"}, + ["INT3150"] = {level="3.15", cab="INSIGHT", str="ASCII"}, + ["INT3160"] = {level="3.16", cab="INSIGHT", str="ASCII"}, + ["2.0"] = {level="2.0", cab="INSIGHT", str="ASCII"}, + ["2.1.1"] = {level="2.1.1", cab="INSIGHT", str="ASCII"}, + ["3.0"] = {level="3.0", cab="INSIGHT", str="ASCII"}, + ["4.0"] = {level="4.0", cab="INSIGHT", str="ASCII"}, + ["5.0"] = {level="5.0", cab="INSIGHT", str="ASCII"}, + ["GMS2.0"] = {level="2.0", cab="INSIGHT", str="ASCII"}, + ["GMS2.1"] = {level="2.1", cab="INSIGHT", str="ASCII"}, + ["GMS3.0"] = {level="3.0", cab="INSIGHT", str="ASCII"}, + ["GMS4.0"] = {level="4.0", cab="INSIGHT", str="ASCII"}, + ["GMS5.0"] = {level="5.0", cab="INSIGHT", str="ASCII"}, + ["SCU0601"] = {level="6.1", cab="SCU", str="RAD50"}, + ["SCU0700"] = {level="7.0", cab="SCU", str="RAD50"}, + ["SCU0701"] = {level="7.1", cab="SCU", str="RAD50"}, + ["SCU0702"] = {level="7.2", cab="SCU", str="RAD50"}, + ["SCU0800"] = {level="8.0", cab="SCU", str="RAD50"}, + ["SCU0900"] = {level="9.0", cab="SCU", str="RAD50"}, + ["SCU0901"] = {level="9.1", cab="SCU", str="RAD50"}, + ["SCU0902"] = {level="9.2", cab="SCU", str="RAD50"}, + ["SCU0903"] = {level="9.3", cab="SCU", str="RAD50"}, + ["SCU1000"] = {level="10.0", cab="SCU", str="RAD50"}, + ["SCU1001"] = {level="10.1", cab="SCU", str="RAD50"}, + ["SCU1100"] = {level="11.0", cab="SCU", str="RAD50"}, + ["SCU1101"] = {level="11.1", cab="SCU", str="RAD50"}, + ["SCU1102"] = {level="11.2", cab="SCU", str="RAD50"}, + ["SCU1103"] = {level="11.3", cab="SCU", str="RAD50"}, + ["SCU1201"] = {level="12.1", cab="SCU", str="RAD50"}, + ["SCU1202"] = {level="12.2", cab="SCU", str="RAD50"}, + ["SCU1203"] = {level="12.3", cab="SCU", str="RAD50"}, + ["SCU1204"] = {level="12.4", cab="SCU", str="RAD50"}, + ["SCU1241"] = {level="12.41", cab="SCU", str="RAD50"}, + ["SCU1205"] = {level="12.5", cab="SCU", str="RAD50"}, + ["SCU1251"] = {level="12.51", cab="SCU", str="RAD50"}, + ["SCU1252"] = {level="12.52", cab="SCU", str="RAD50"}, + ["SCU1253"] = {level="12.53", cab="SCU", str="RAD50"}, + ["SCU1254"] = {level="12.54", cab="SCU", str="RAD50"}, + ["SCU126"] = {level="12.6", cab="SCU", str="RAD50"}, + ["SCU127"] = {level="12.7", cab="SCU", str="RAD50"}, + ["SCU128"] = {level="12.8", cab="SCU", str="RAD50"}, + ["SCU129"] = {level="12.9", cab="SCU", str="RAD50"}, + ["CEC03"] = {level="13.0", cab="MBC", str="ASCII"}, + ["CEC04"] = {level="13.1", cab="MBC", str="ASCII"}, + ["CEC05"] = {level="13.2", cab="MBC", str="ASCII"}, + ["CEC06"] = {level="13.3", cab="MBC", str="ASCII"}, + ["CEC07"] = {level="13.4", cab="MBC", str="ASCII"}, + ["CEC08"] = {level="13.5", cab="MBC", str="ASCII"}, + ["CEC0838"] = {level="13.52", cab="MBC", str="ASCII"}, + ["CEC09"] = {level="13.6", cab="MBC", str="ASCII"}, + ["CEC095"] = {level="13.65", cab="MBC", str="ASCII"}, + ["CEC10"] = {level="13.7", cab="MBC", str="ASCII"}, + ["CEC11"] = {level="13.8", cab="MBC", str="ASCII"}, + ["CEC096"] = {level="14.0", cab="MBC", str="ASCII"}, + ["SV503"] = {level="13.0", cab="SCU", str="ASCII"}, + ["SV504"] = {level="13.1", cab="SCU", str="ASCII"}, + ["SV505"] = {level="13.2", cab="SCU", str="ASCII"}, + ["SV506"] = {level="13.3", cab="SCU", str="ASCII"}, + ["SV507"] = {level="13.4", cab="SCU", str="ASCII"}, + ["SV508"] = {level="13.5", cab="SCU", str="ASCII"}, + ["SV50838"] = {level="13.52", cab="SCU", str="ASCII"}, + ["SV509"] = {level="13.6", cab="SCU", str="ASCII"}, + ["SV5095"] = {level="13.65", cab="SCU", str="ASCII"}, + ["SV510"] = {level="13.7", cab="SCU", str="ASCII"}, + ["SV511"] = {level="13.8", cab="SCU", str="ASCII"}, + ["SV5111"] = {level="13.81", cab="SCU", str="ASCII"}, + ["MEC03"] = {level="13.0", cab="MEC", str="ASCII"}, + ["MEC04"] = {level="13.1", cab="MEC", str="ASCII"}, + ["MEC05"] = {level="13.2", cab="MEC", str="ASCII"}, + ["MEC06"] = {level="13.3", cab="MEC", str="ASCII"}, + ["MEC07"] = {level="13.4", cab="MEC", str="ASCII"}, + ["MEC08"] = {level="13.5", cab="MEC", str="ASCII"}, + ["MEC0838"] = {level="13.52", cab="MEC", str="ASCII"}, + ["MEC09"] = {level="13.6", cab="MEC", str="ASCII"}, + ["MEC095"] = {level="13.65", cab="MEC", str="ASCII"}, + ["MEC10"] = {level="13.7", cab="MEC", str="ASCII"}, + ["MEC11"] = {level="13.8", cab="MEC", str="ASCII"}, + ["MEC096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["MCF07"] = {level="13.4", cab="MEC", str="ASCII"}, + ["MCF08"] = {level="13.5", cab="MEC", str="ASCII"}, + ["MCF0838"] = {level="13.52", cab="MEC", str="ASCII"}, + ["MCF09"] = {level="13.6", cab="MEC", str="ASCII"}, + ["MCF095"] = {level="13.65", cab="MEC", str="ASCII"}, + ["MCF10"] = {level="13.7", cab="MEC", str="ASCII"}, + ["MCF11"] = {level="13.8", cab="MEC", str="ASCII"}, + ["MCF096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["MCE08"] = {level="13.53", cab="MEC", str="ASCII"}, + ["MCE09"] = {level="13.6", cab="MEC", str="ASCII"}, + ["MCE095"] = {level="13.65", cab="MEC", str="ASCII"}, + ["MCE10"] = {level="13.7", cab="MEC", str="ASCII"}, + ["MCE11"] = {level="13.8", cab="MEC", str="ASCII"}, + ["MCE096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["MCE098"] = {level="13.63", cab="MEC", str="ASCII"}, + ["MCL08"] = {level="13.53", cab="MEC", str="ASCII"}, + ["MCL09"] = {level="13.6", cab="MEC", str="ASCII"}, + ["MCL095"] = {level="13.65", cab="MEC", str="ASCII"}, + ["MCL10"] = {level="13.7", cab="MEC", str="ASCII"}, + ["MCL11"] = {level="13.8", cab="MEC", str="ASCII"}, + ["MCL096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["MCL098"] = {level="13.63", cab="MEC", str="ASCII"}, + ["MBN08"] = {level="13.53", cab="MBC", str="ASCII"}, + ["MBN09"] = {level="13.6", cab="MBC", str="ASCII"}, + ["MBN095"] = {level="13.65", cab="MBC", str="ASCII"}, + ["MBN098"] = {level="13.63", cab="MBC", str="ASCII"}, + ["MBN10"] = {level="13.7", cab="MBC", str="ASCII"}, + ["MBN11"] = {level="13.8", cab="MBC", str="ASCII"}, + ["MBN096"] = {level="14.0", cab="MBC", str="ASCII"}, + ["MBS08"] = {level="13.53", cab="MBC", str="ASCII"}, + ["MBS0847"] = {level="13.52", cab="MBC", str="ASCII"}, + ["MBS09"] = {level="13.6", cab="MBC", str="ASCII"}, + ["MBS095"] = {level="13.65", cab="MBC", str="ASCII"}, + ["MBS10"] = {level="13.7", cab="MBC", str="ASCII"}, + ["MBS11"] = {level="13.8", cab="MBC", str="ASCII"}, + ["MBS096"] = {level="14.0", cab="MBC", str="ASCII"}, + ["MCA08"] = {level="13.53", cab="MEC", str="ASCII"}, + ["MCA09"] = {level="13.6", cab="MEC", str="ASCII"}, + ["MCA095"] = {level="13.65", cab="MEC", str="ASCII"}, + ["MCA10"] = {level="13.7", cab="MEC", str="ASCII"}, + ["MCA11"] = {level="13.8", cab="MEC", str="ASCII"}, + ["MCA096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["MCP09"] = {level="13.6", cab="MEC", str="ASCII"}, + ["MCP095"] = {level="13.65", cab="MEC", str="ASCII"}, + ["MCP10"] = {level="13.7", cab="MEC", str="ASCII"}, + ["MCP11"] = {level="13.8", cab="MEC", str="ASCII"}, + ["MCP096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["MCS09"] = {level="13.6", cab="MEC", str="ASCII"}, + ["MCS095"] = {level="13.65", cab="MEC", str="ASCII"}, + ["MCS10"] = {level="13.7", cab="MEC", str="ASCII"}, + ["MCS11"] = {level="13.8", cab="MEC", str="ASCII"}, + ["MCS096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["SCT09"] = {level="13.6", cab="SCT", str="ASCII"}, + ["SCT10"] = {level="13.7", cab="SCT", str="ASCII"}, + ["SCT11"] = {level="13.8", cab="SCT", str="ASCII"}, + ["SCT096"] = {level="14.0", cab="SCT", str="ASCII"}, + ["_M"] = {level="13.0", cab="MXL", str="ASCII"}, + ["_X"] = {level="13.0", cab="XLS", str="ASCII"}, + ["NCC"] = {level="", cab="NCC", str="ASCII"}, + ["BCL096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["BBN096"] = {level="14.0", cab="MBC", str="ASCII"}, + ["BCE096"] = {level="14.0", cab="MEC", str="ASCII"}, + ["BCL1141"] = {level="14.01", cab="MEC", str="ASCII"}, + ["BBN1141"] = {level="14.01", cab="MBC", str="ASCII"}, + ["BCE1141"] = {level="14.01", cab="COMPACT", str="ASCII"}, + ["BME1141"] = {level="14.01", cab="MODULAR", str="ASCII"}, + ["BCL1142"] = {level="14.01", cab="MEC", str="ASCII"}, + ["BBN1142"] = {level="14.01", cab="MBC", str="ASCII"}, + ["BCE1142"] = {level="14.01", cab="COMPACT", str="ASCII"}, + ["BME1142"] = {level="14.01", cab="MODULAR", str="ASCII"}, + ["PCP099"] = {level="13.71", cab="COMPACT", str="ASCII"}, + ["PCE099"] = {level="13.71", cab="COMPACT", str="ASCII"}, + ["PME11"] = {level="13.8", cab="MODULAR", str="ASCII"}, + ["PMP11"] = {level="13.8", cab="MODULAR", str="ASCII"}, + ["PME1120"] = {level="13.81", cab="MODULAR", str="ASCII"}, + ["PMP1120"] = {level="13.81", cab="MODULAR", str="ASCII"}, + ["PCL1120"] = {level="13.81", cab="MODULAR", str="ASCII"}, + ["MCL1121"] = {level="13.82", cab="MEC", str="ASCII"}, + ["MCE1121"] = {level="13.82", cab="MEC", str="ASCII"}, + ["MBN1121"] = {level="13.82", cab="MBC", str="ASCII"}, + ["MBS1121"] = {level="13.82", cab="MBC", str="ASCII"}, + ["MCA1121"] = {level="13.82", cab="MEC", str="ASCII"}, + ["MCP1121"] = {level="13.82", cab="MEC", str="ASCII"}, + ["PCE1121"] = {level="13.82", cab="COMPACT", str="ASCII"}, + ["PCE1168"] = {level="13.83", cab="COMPACT", str="ASCII"}, + ["PCP1121"] = {level="13.82", cab="COMPACT", str="ASCII"}, + ["PCP1168"] = {level="13.83", cab="COMPACT", str="ASCII"}, + ["PXE1168"] = {level="13.83", cab="COMPACT", str="ASCII"}, + ["PXP1168"] = {level="13.83", cab="COMPACT", str="ASCII"}, + ["PME1121"] = {level="13.82", cab="MODULAR", str="ASCII"}, + ["PMP1121"] = {level="13.82", cab="MODULAR", str="ASCII"}, + ["PCL1121"] = {level="13.82", cab="MODULAR", str="ASCII"}, + ["PCP110"] = {level="13.8", cab="COMPACT", str="ASCII"}, + ["MCL1122"] = {level="13.82", cab="MEC", str="ASCII"}, + ["MCE1122"] = {level="13.82", cab="MEC", str="ASCII"}, + ["MBN1122"] = {level="13.82", cab="MBC", str="ASCII"}, + ["MBS1122"] = {level="13.82", cab="MBC", str="ASCII"}, + ["MCA1122"] = {level="13.82", cab="MEC", str="ASCII"}, + ["MCP1122"] = {level="13.82", cab="MEC", str="ASCII"}, + ["PCE1122"] = {level="13.82", cab="COMPACT", str="ASCII"}, + ["PCP1122"] = {level="13.82", cab="COMPACT", str="ASCII"}, + ["PME1122"] = {level="13.82", cab="MODULAR", str="ASCII"}, + ["PMP1122"] = {level="13.82", cab="MODULAR", str="ASCII"}, + ["PCL1122"] = {level="13.82", cab="MODULAR", str="ASCII"}, + ["OP"] = {level="", cab="MBC", str="ASCII"}, + ["CEC"] = {level="", cab="MBC", str="ASCII"}, + ["FLNC"] = {level="", cab="FLNC", str="ASCII"}, + ["MEC"] = {level="", cab="MEC", str="ASCII"}, + ["MECF"] = {level="", cab="MEC", str="ASCII"}, + ["MECE"] = {level="", cab="MEC", str="ASCII"}, + ["MBCE"] = {level="", cab="MBC", str="ASCII"}, + ["MECL"] = {level="", cab="MEC", str="ASCII"}, + ["SV5"] = {level="", cab="SCU", str="ASCII"}, + ["SCU"] = {level="", cab="SCU", str="RAD50"}, + ["RCU"] = {level="", cab="RCU_P2", str="RAD50"}, + ["ASC"] = {level="", cab="SCU", str="ASCII"}, + ["MBCP"] = {level="", cab="MBC", str="ASCII"}, + ["MCFP"] = {level="", cab="MEC", str="ASCII"}, + ["MCLP"] = {level="", cab="MEC", str="ASCII"}, + ["MCNE"] = {level="", cab="MEC", str="ASCII"}, + ["MEFE"] = {level="", cab="MEC", str="ASCII"}, + ["MCFE"] = {level="", cab="MEC", str="ASCII"}, + ["MCLE"] = {level="", cab="MEC", str="ASCII"}, + ["FFP"] = {level="", cab="MEC", str="ASCII"}, + ["FFE"] = {level="", cab="MEC", str="ASCII"}, + ["FLP"] = {level="", cab="MEC", str="ASCII"}, + ["FLE"] = {level="", cab="MEC", str="ASCII"}, + ["MECP"] = {level="", cab="MEC", str="ASCII"}, + ["MECS"] = {level="", cab="MEC", str="ASCII"}, + ["MCKS"] = {level="", cab="MEC", str="ASCII"}, + ["MCMS"] = {level="", cab="MEC", str="ASCII"}, + ["MCKN"] = {level="", cab="MEC", str="ASCII"}, + ["MCMN"] = {level="", cab="MEC", str="ASCII"}, + ["SCTE"] = {level="", cab="SCT", str="ASCII"}, + ["MXL"] = {level="", cab="MXL", str="ASCII"}, + ["MXL-IQ"] = {level="", cab="MXL-IQ", str="ASCII"}, + ["XLS"] = {level="", cab="XLS", str="ASCII"}, + ["PMI-G"] = {level="", cab="PMI-G", str="ASCII"}, + ["PXCE"] = {level="", cab="COMPACT", str="ASCII"}, + ["PXCP"] = {level="", cab="COMPACT", str="ASCII"}, + ["PPXC"] = {level="", cab="COMPACT", str="ASCII"}, + ["PXME"] = {level="", cab="MODULAR", str="ASCII"}, + ["EPXC"] = {level="", cab="COMPACT", str="ASCII"}, + ["PXMP"] = {level="", cab="MODULAR", str="ASCII"}, + ["PXEE"] = {level="", cab="MODULAR", str="ASCII"}, + ["PXCL"] = {level="", cab="MODULAR", str="ASCII"}, + ["P36E"] = {level="", cab="COMPACT", str="ASCII"}, + ["P36P"] = {level="", cab="COMPACT", str="ASCII"}, + ["E36E"] = {level="", cab="COMPACT", str="ASCII"}, + ["E36L"] = {level="", cab="COMPACT", str="ASCII"}, + ["EX36"] = {level="", cab="COMPACT", str="ASCII"}, + ["PX36"] = {level="", cab="COMPACT", str="ASCII"}, + ["EL36"] = {level="", cab="COMPACT", str="ASCII"}, + ["PL36"] = {level="", cab="COMPACT", str="ASCII"}, + ["PAAC"] = {level="", cab="COMPACT", str="ASCII"}, + ["BCE1162"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["BBN1162"] = {level="14.1", cab="MBC", str="ASCII"}, + ["BCL1162"] = {level="14.1", cab="MEC", str="ASCII"}, + ["BME1162"] = {level="14.1", cab="MODULAR", str="ASCII"}, + ["BCP1162"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["BPX1162"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["BCE1163"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["BBN1163"] = {level="14.1", cab="MBC", str="ASCII"}, + ["BCL1163"] = {level="14.1", cab="MEC", str="ASCII"}, + ["BME1163"] = {level="14.1", cab="MODULAR", str="ASCII"}, + ["BCP1163"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["BPX1163"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["BCE1164"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["BBN1164"] = {level="14.1", cab="MBC", str="ASCII"}, + ["BCL1164"] = {level="14.1", cab="MEC", str="ASCII"}, + ["BME1164"] = {level="14.1", cab="MODULAR", str="ASCII"}, + ["BCP1164"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["BPX1164"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TCE1162"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TBN1162"] = {level="14.1", cab="MBC", str="ASCII"}, + ["TCL1162"] = {level="14.1", cab="MEC", str="ASCII"}, + ["TME1162"] = {level="14.1", cab="MODULAR", str="ASCII"}, + ["TCP1162"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TPX1162"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TCE1163"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TBN1163"] = {level="14.1", cab="MBC", str="ASCII"}, + ["TCL1163"] = {level="14.1", cab="MEC", str="ASCII"}, + ["TME1163"] = {level="14.1", cab="MODULAR", str="ASCII"}, + ["TCP1163"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TPX1163"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TCE1164"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TBN1164"] = {level="14.1", cab="MBC", str="ASCII"}, + ["TCL1164"] = {level="14.1", cab="MEC", str="ASCII"}, + ["TME1164"] = {level="14.1", cab="MODULAR", str="ASCII"}, + ["TCP1164"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["TPX1164"] = {level="14.1", cab="COMPACT", str="ASCII"}, + ["PCP1175"] = {level="13.84", cab="COMPACT", str="ASCII"}, + ["PXE1175"] = {level="13.84", cab="COMPACT", str="ASCII"}, + ["PXP1175"] = {level="13.84", cab="COMPACT", str="ASCII"}, + ["MCL120"] = {level="13.85", cab="MEC", str="ASCII"}, + ["MCE120"] = {level="13.85", cab="MEC", str="ASCII"}, + ["MBN120"] = {level="13.85", cab="MBC", str="ASCII"}, + ["MBS120"] = {level="13.85", cab="MBC", str="ASCII"}, + ["MCA120"] = {level="13.85", cab="MEC", str="ASCII"}, + ["MCP120"] = {level="13.85", cab="MEC", str="ASCII"}, + ["PCE120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["PCP120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["PXE120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["PXP120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["PME120"] = {level="13.85", cab="MODULAR", str="ASCII"}, + ["PMP120"] = {level="13.85", cab="MODULAR", str="ASCII"}, + ["PCL120"] = {level="13.85", cab="MODULAR", str="ASCII"}, + ["P3E120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["P3P120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["36E120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["36P120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["3LE120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["3LP120"] = {level="13.85", cab="COMPACT", str="ASCII"}, + ["BCE120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["BBN120"] = {level="14.2", cab="MBC", str="ASCII"}, + ["BCL120"] = {level="14.2", cab="MEC", str="ASCII"}, + ["BME120"] = {level="14.2", cab="MODULAR", str="ASCII"}, + ["BCP120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["BXE120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["BXP120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["B3E120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["B6E120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["BLE120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["TCE120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["TBN120"] = {level="14.2", cab="MBC", str="ASCII"}, + ["TCL120"] = {level="14.2", cab="MEC", str="ASCII"}, + ["T3E120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["TME120"] = {level="14.2", cab="MODULAR", str="ASCII"}, + ["TCP120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["TXE120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["TPX120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["TXP120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["T6E120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["TLE120"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["MCL1251"] = {level="13.86", cab="MEC", str="ASCII"}, + ["MCE11251"] = {level="13.86", cab="MEC", str="ASCII"}, + ["MBN1251"] = {level="13.86", cab="MBC", str="ASCII"}, + ["MBS1251"] = {level="13.86", cab="MBC", str="ASCII"}, + ["MCA1251"] = {level="13.86", cab="MEC", str="ASCII"}, + ["MCP1251"] = {level="13.86", cab="MEC", str="ASCII"}, + ["PCE1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["PCP1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["PXE1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["PXP1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["PME1251"] = {level="13.86", cab="MODULAR", str="ASCII"}, + ["PMP1251"] = {level="13.86", cab="MODULAR", str="ASCII"}, + ["PCL1251"] = {level="13.86", cab="MODULAR", str="ASCII"}, + ["P3E1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["P3P1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["36E1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["36P1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["3LE1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["3LP1251"] = {level="13.86", cab="COMPACT", str="ASCII"}, + ["BCE1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["BBN1251"] = {level="14.21", cab="MBC", str="ASCII"}, + ["BCL1251"] = {level="14.21", cab="MEC", str="ASCII"}, + ["BME1251"] = {level="14.21", cab="MODULAR", str="ASCII"}, + ["BCP1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["BXE1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["BXP1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["B3E1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["B6E1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["BLE1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["BUC1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["TCE1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["TBN1251"] = {level="14.21", cab="MBC", str="ASCII"}, + ["TCL1251"] = {level="14.21", cab="MEC", str="ASCII"}, + ["T3E1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["TME1251"] = {level="14.21", cab="MODULAR", str="ASCII"}, + ["TCP1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["TXE1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["TPX1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["TXP1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["T6E1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["TLE1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["TUC1251"] = {level="14.21", cab="COMPACT", str="ASCII"}, + ["MCL122"] = {level="13.87", cab="MEC", str="ASCII"}, + ["MCE122"] = {level="13.87", cab="MEC", str="ASCII"}, + ["MBN122"] = {level="13.87", cab="MBC", str="ASCII"}, + ["MBS122"] = {level="13.87", cab="MBC", str="ASCII"}, + ["MCA122"] = {level="13.87", cab="MEC", str="ASCII"}, + ["MCP122"] = {level="13.87", cab="MEC", str="ASCII"}, + ["PCE122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["PCP122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["PXE122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["PXP122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["PME122"] = {level="13.87", cab="MODULAR", str="ASCII"}, + ["PMP122"] = {level="13.87", cab="MODULAR", str="ASCII"}, + ["PCL122"] = {level="13.87", cab="MODULAR", str="ASCII"}, + ["P3E122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["P3P122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["36E122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["36P122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["3LE122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["3LP122"] = {level="13.87", cab="COMPACT", str="ASCII"}, + ["BCE122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["BBN122"] = {level="14.22", cab="MBC", str="ASCII"}, + ["BCL122"] = {level="14.22", cab="MEC", str="ASCII"}, + ["BME122"] = {level="14.22", cab="MODULAR", str="ASCII"}, + ["BCP122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["BXE122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["BXP122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["B3E122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["B6E122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["BLE122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["BUC122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["TCE122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["TBN122"] = {level="14.22", cab="MBC", str="ASCII"}, + ["TCL122"] = {level="14.22", cab="MEC", str="ASCII"}, + ["T3E122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["TME122"] = {level="14.22", cab="MODULAR", str="ASCII"}, + ["TCP122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["TXE122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["TPX122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["TXP122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["T6E122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["TLE122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["TUC122"] = {level="14.22", cab="COMPACT", str="ASCII"}, + ["MCL123"] = {level="13.88", cab="MEC", str="ASCII"}, + ["MCE123"] = {level="13.88", cab="MEC", str="ASCII"}, + ["MBN123"] = {level="13.88", cab="MBC", str="ASCII"}, + ["MBS123"] = {level="13.88", cab="MBC", str="ASCII"}, + ["MCA123"] = {level="13.88", cab="MEC", str="ASCII"}, + ["MCP123"] = {level="13.88", cab="MEC", str="ASCII"}, + ["PCE123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["PCP123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["PXE123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["PXP123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["PME123"] = {level="13.88", cab="MODULAR", str="ASCII"}, + ["PMP123"] = {level="13.88", cab="MODULAR", str="ASCII"}, + ["PCL123"] = {level="13.88", cab="MODULAR", str="ASCII"}, + ["P3E123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["P3P123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["36E123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["36P123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["3LE123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["3LP123"] = {level="13.88", cab="COMPACT", str="ASCII"}, + ["BCE123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["BBN123"] = {level="14.23", cab="MBC", str="ASCII"}, + ["BCL123"] = {level="14.23", cab="MEC", str="ASCII"}, + ["BME123"] = {level="14.23", cab="MODULAR", str="ASCII"}, + ["BCP123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["BXE123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["BXP123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["B3E123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["B6E123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["BLE123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["BUC123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["TCE123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["TBN123"] = {level="14.23", cab="MBC", str="ASCII"}, + ["TCL123"] = {level="14.23", cab="MEC", str="ASCII"}, + ["T3E123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["TME123"] = {level="14.23", cab="MODULAR", str="ASCII"}, + ["TCP123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["TXE123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["TPX123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["TXP123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["T6E123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["TLE123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["TUC123"] = {level="14.23", cab="COMPACT", str="ASCII"}, + ["MCL1240"] = {level="13.89", cab="MEC", str="ASCII"}, + ["MCE1240"] = {level="13.89", cab="MEC", str="ASCII"}, + ["MBN1240"] = {level="13.89", cab="MBC", str="ASCII"}, + ["MBS1240"] = {level="13.89", cab="MBC", str="ASCII"}, + ["MCA1240"] = {level="13.89", cab="MEC", str="ASCII"}, + ["MCP1240"] = {level="13.89", cab="MEC", str="ASCII"}, + ["PCE1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["PCP1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["PXE1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["PXP1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["PME1240"] = {level="13.89", cab="MODULAR", str="ASCII"}, + ["PMP1240"] = {level="13.89", cab="MODULAR", str="ASCII"}, + ["PCL1240"] = {level="13.89", cab="MODULAR", str="ASCII"}, + ["P3E1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["P3P1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["36E1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["36P1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["3LE1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["3LP1240"] = {level="13.89", cab="COMPACT", str="ASCII"}, + ["BCE1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["BBN1240"] = {level="14.24", cab="MBC", str="ASCII"}, + ["BCL1240"] = {level="14.24", cab="MEC", str="ASCII"}, + ["BME1240"] = {level="14.24", cab="MODULAR", str="ASCII"}, + ["BCP1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["BXE1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["BXP1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["B3E1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["B6E1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["BLE1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["BUC1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["TCE1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["TBN1240"] = {level="14.24", cab="MBC", str="ASCII"}, + ["TCL1240"] = {level="14.24", cab="MEC", str="ASCII"}, + ["T3E1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["TME1240"] = {level="14.24", cab="MODULAR", str="ASCII"}, + ["TCP1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["TXE1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["TPX1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["TXP1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["T6E1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["TLE1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["TUC1240"] = {level="14.24", cab="COMPACT", str="ASCII"}, + ["MCL1252"] = {level="13.811", cab="MEC", str="ASCII"}, + ["MCE1252"] = {level="13.811", cab="MEC", str="ASCII"}, + ["MBN1252"] = {level="13.811", cab="MBC", str="ASCII"}, + ["MBS1252"] = {level="13.811", cab="MBC", str="ASCII"}, + ["MCA1252"] = {level="13.811", cab="MEC", str="ASCII"}, + ["MCP1252"] = {level="13.811", cab="MEC", str="ASCII"}, + ["PCE1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["PCP1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["PXE1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["PXP1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["PME1252"] = {level="13.811", cab="MODULAR", str="ASCII"}, + ["PMP1252"] = {level="13.811", cab="MODULAR", str="ASCII"}, + ["PCL1252"] = {level="13.811", cab="MODULAR", str="ASCII"}, + ["P3E1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["P3P1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["36E1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["36P1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["3LE1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["3LP1252"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["BCE1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["BBN1252"] = {level="14.25", cab="MBC", str="ASCII"}, + ["BCL1252"] = {level="14.25", cab="MEC", str="ASCII"}, + ["BME1252"] = {level="14.25", cab="MODULAR", str="ASCII"}, + ["BCP1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["BXE1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["BXP1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["B3E1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["B6E1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["BLE1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["BUC1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["TCE1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["TBN1252"] = {level="14.25", cab="MBC", str="ASCII"}, + ["TCL1252"] = {level="14.25", cab="MEC", str="ASCII"}, + ["T3E1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["TME1252"] = {level="14.25", cab="MODULAR", str="ASCII"}, + ["TCP1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["TXE1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["TPX1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["TXP1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["T6E1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["TLE1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["TUC1252"] = {level="14.25", cab="COMPACT", str="ASCII"}, + ["MCL1261"] = {level="13.811", cab="MEC", str="ASCII"}, + ["MCE1261"] = {level="13.811", cab="MEC", str="ASCII"}, + ["MBN1261"] = {level="13.811", cab="MBC", str="ASCII"}, + ["MBS1261"] = {level="13.811", cab="MBC", str="ASCII"}, + ["MCA1261"] = {level="13.811", cab="MEC", str="ASCII"}, + ["MCP1261"] = {level="13.811", cab="MEC", str="ASCII"}, + ["PCE1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["PCP1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["PXE1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["PXP1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["PME1261"] = {level="13.811", cab="MODULAR", str="ASCII"}, + ["PMP1261"] = {level="13.811", cab="MODULAR", str="ASCII"}, + ["PCL1261"] = {level="13.811", cab="MODULAR", str="ASCII"}, + ["P3E1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["P3P1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["36E1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["36P1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["3LE1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["3LP1261"] = {level="13.811", cab="COMPACT", str="ASCII"}, + ["BCE1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["BBN1261"] = {level="14.3", cab="MBC", str="ASCII"}, + ["BCL1261"] = {level="14.3", cab="MEC", str="ASCII"}, + ["BME1261"] = {level="14.3", cab="MODULAR", str="ASCII"}, + ["BCP1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["BXE1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["BXP1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["B3E1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["B6E1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["BLE1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["BUC1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["TCE1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["TBN1261"] = {level="14.3", cab="MBC", str="ASCII"}, + ["TCL1261"] = {level="14.3", cab="MEC", str="ASCII"}, + ["T3E1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["TME1261"] = {level="14.3", cab="MODULAR", str="ASCII"}, + ["TCP1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["TXE1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["TPX1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["TXP1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["T6E1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["TLE1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["TUC1261"] = {level="14.3", cab="COMPACT", str="ASCII"}, + ["MCL1262"] = {level="13.812", cab="MEC", str="ASCII"}, + ["MCE1262"] = {level="13.812", cab="MEC", str="ASCII"}, + ["MBN1262"] = {level="13.812", cab="MBC", str="ASCII"}, + ["MBS1262"] = {level="13.812", cab="MBC", str="ASCII"}, + ["MCA1262"] = {level="13.812", cab="MEC", str="ASCII"}, + ["MCP1262"] = {level="13.812", cab="MEC", str="ASCII"}, + ["PCE1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["PCP1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["PXE1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["PXP1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["PME1262"] = {level="13.812", cab="MODULAR", str="ASCII"}, + ["PMP1262"] = {level="13.812", cab="MODULAR", str="ASCII"}, + ["PCL1262"] = {level="13.812", cab="MODULAR", str="ASCII"}, + ["P3E1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["P3P1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["36E1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["36P1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["3LE1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["3LP1262"] = {level="13.812", cab="COMPACT", str="ASCII"}, + ["BCE1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["BBN1262"] = {level="14.31", cab="MBC", str="ASCII"}, + ["BCL1262"] = {level="14.31", cab="MEC", str="ASCII"}, + ["BME1262"] = {level="14.31", cab="MODULAR", str="ASCII"}, + ["BCP1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["BXE1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["BXP1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["B3E1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["B6E1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["BLE1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["BUC1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["TCE1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["TBN1262"] = {level="14.31", cab="MBC", str="ASCII"}, + ["TCL1262"] = {level="14.31", cab="MEC", str="ASCII"}, + ["T3E1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["TME1262"] = {level="14.31", cab="MODULAR", str="ASCII"}, + ["TCP1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["TXE1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["TPX1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["TXP1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["T6E1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["TLE1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["TUC1262"] = {level="14.31", cab="COMPACT", str="ASCII"}, + ["MCL1265"] = {level="13.813", cab="MEC", str="ASCII"}, + ["MCE1265"] = {level="13.813", cab="MEC", str="ASCII"}, + ["MBN1265"] = {level="13.813", cab="MBC", str="ASCII"}, + ["MBS1265"] = {level="13.813", cab="MBC", str="ASCII"}, + ["MCA1265"] = {level="13.813", cab="MEC", str="ASCII"}, + ["MCP1265"] = {level="13.813", cab="MEC", str="ASCII"}, + ["PCE1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["PCP1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["PXE1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["PXP1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["PME1265"] = {level="13.813", cab="MODULAR", str="ASCII"}, + ["PMP1265"] = {level="13.813", cab="MODULAR", str="ASCII"}, + ["PCL1265"] = {level="13.813", cab="MODULAR", str="ASCII"}, + ["P3E1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["P3P1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["36E1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["36P1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["3LE1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["3LP1265"] = {level="13.813", cab="COMPACT", str="ASCII"}, + ["BCE1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["BBN1265"] = {level="14.4", cab="MBC", str="ASCII"}, + ["BCL1265"] = {level="14.4", cab="MEC", str="ASCII"}, + ["BME1265"] = {level="14.4", cab="MODULAR", str="ASCII"}, + ["BCP1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["BXE1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["BXP1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["B3E1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["B6E1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["BLE1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["BUC1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["TCE1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["TBN1265"] = {level="14.4", cab="MBC", str="ASCII"}, + ["TCL1265"] = {level="14.4", cab="MEC", str="ASCII"}, + ["T3E1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["TME1265"] = {level="14.4", cab="MODULAR", str="ASCII"}, + ["TCP1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["TXE1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["TPX1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["TXP1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["T6E1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["TLE1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["TUC1265"] = {level="14.4", cab="COMPACT", str="ASCII"}, + ["MCL1270"] = {level="13.815", cab="MEC", str="ASCII"}, + ["MCE1270"] = {level="13.815", cab="MEC", str="ASCII"}, + ["MBN1270"] = {level="13.815", cab="MBC", str="ASCII"}, + ["MBS1270"] = {level="13.815", cab="MBC", str="ASCII"}, + ["MCA1270"] = {level="13.815", cab="MEC", str="ASCII"}, + ["MCP1270"] = {level="13.815", cab="MEC", str="ASCII"}, + ["PCE1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["PCP1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["PXE1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["PXP1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["PME1270"] = {level="13.815", cab="MODULAR", str="ASCII"}, + ["PMP1270"] = {level="13.815", cab="MODULAR", str="ASCII"}, + ["PCL1270"] = {level="13.815", cab="MODULAR", str="ASCII"}, + ["P3E1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["P3P1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["36E1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["36P1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["3LE1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["3LP1270"] = {level="13.815", cab="COMPACT", str="ASCII"}, + ["BCE1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["BBN1270"] = {level="14.5", cab="MBC", str="ASCII"}, + ["BCL1270"] = {level="14.5", cab="MEC", str="ASCII"}, + ["BME1270"] = {level="14.5", cab="MODULAR", str="ASCII"}, + ["BCP1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["BXE1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["BXP1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["B3E1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["B6E1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["BLE1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["BUC1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["TCE1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["TBN1270"] = {level="14.5", cab="MBC", str="ASCII"}, + ["TCL1270"] = {level="14.5", cab="MEC", str="ASCII"}, + ["T3E1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["TME1270"] = {level="14.5", cab="MODULAR", str="ASCII"}, + ["TCP1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["TXE1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["TPX1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["TXP1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["T6E1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["TLE1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["TUC1270"] = {level="14.5", cab="COMPACT", str="ASCII"}, + ["BCE1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["BME1280"] = {level="14.51", cab="MODULAR", str="ASCII"}, + ["BCP1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["BXE1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["BXP1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["B3E1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["B6E1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["BUC1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["TCE1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["T3E1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["TME1280"] = {level="14.51", cab="MODULAR", str="ASCII"}, + ["TCP1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["TXE1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["TPX1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["TXP1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["T6E1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["TUC1280"] = {level="14.51", cab="COMPACT", str="ASCII"}, + ["BCE1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["BME1290"] = {level="14.52", cab="MODULAR", str="ASCII"}, + ["BCP1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["BXE1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["BXP1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["B3E1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["B6E1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["BUC1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["TCE1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["T3E1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["TME1290"] = {level="14.52", cab="MODULAR", str="ASCII"}, + ["TCP1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["TXE1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["TPX1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["TXP1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["T6E1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["TUC1290"] = {level="14.52", cab="COMPACT", str="ASCII"}, + ["MCL1300"] = {level="13.818", cab="MEC", str="ASCII"}, + ["MCE1300"] = {level="13.818", cab="MEC", str="ASCII"}, + ["MBN1300"] = {level="13.818", cab="MBC", str="ASCII"}, + ["MBS1300"] = {level="13.818", cab="MBC", str="ASCII"}, + ["MCA1300"] = {level="13.818", cab="MEC", str="ASCII"}, + ["MCP1300"] = {level="13.818", cab="MEC", str="ASCII"}, + ["PCE1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["PCP1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["PXE1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["PXP1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["PME1300"] = {level="13.818", cab="MODULAR", str="ASCII"}, + ["PMP1300"] = {level="13.818", cab="MODULAR", str="ASCII"}, + ["PCL1300"] = {level="13.818", cab="MODULAR", str="ASCII"}, + ["P3E1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["P3P1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["36E1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["36P1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["3LE1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["3LP1300"] = {level="13.818", cab="COMPACT", str="ASCII"}, + ["B6E1164"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["T6E1164"] = {level="14.2", cab="COMPACT", str="ASCII"}, + ["BCE1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["BME1300"] = {level="14.53", cab="MODULAR", str="ASCII"}, + ["BCP1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["BXE1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["BXP1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["B3E1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["B6E1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["BUC1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["TCE1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["T3E1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["TME1300"] = {level="14.53", cab="MODULAR", str="ASCII"}, + ["TCP1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["TXE1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["TPX1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["TXP1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["T6E1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["TUC1300"] = {level="14.53", cab="COMPACT", str="ASCII"}, + ["BCE1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["BME1310"] = {level="14.54", cab="MODULAR", str="ASCII"}, + ["BCP1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["BXE1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["BXP1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["B3E1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["B6E1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["BUC1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["TCE1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["T3E1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["TME1310"] = {level="14.54", cab="MODULAR", str="ASCII"}, + ["TCP1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["TXE1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["TPX1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["TXP1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["T6E1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["TUC1310"] = {level="14.54", cab="COMPACT", str="ASCII"}, + ["MCL1310"] = {level="13.819", cab="MEC", str="ASCII"}, + ["MCE1310"] = {level="13.819", cab="MEC", str="ASCII"}, + ["MBN1310"] = {level="13.819", cab="MBC", str="ASCII"}, + ["MBS1310"] = {level="13.819", cab="MBC", str="ASCII"}, + ["MCA1310"] = {level="13.819", cab="MEC", str="ASCII"}, + ["MCP1310"] = {level="13.819", cab="MEC", str="ASCII"}, + ["PCE1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["PCP1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["PXE1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["PXP1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["PME1310"] = {level="13.819", cab="MODULAR", str="ASCII"}, + ["PMP1310"] = {level="13.819", cab="MODULAR", str="ASCII"}, + ["PCL1310"] = {level="13.819", cab="MODULAR", str="ASCII"}, + ["P3E1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["P3P1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["36E1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["36P1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["3LE1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["3LP1310"] = {level="13.819", cab="COMPACT", str="ASCII"}, + ["BCE1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["BME1320"] = {level="14.55", cab="MODULAR", str="ASCII"}, + ["BCP1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["BXE1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["BXP1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["B3E1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["B6E1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["BUC1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["TCE1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["T3E1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["TME1320"] = {level="14.55", cab="MODULAR", str="ASCII"}, + ["TCP1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["TXE1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["TPX1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["TXP1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["T6E1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["TUC1320"] = {level="14.55", cab="COMPACT", str="ASCII"}, + ["MCL1320"] = {level="13.820", cab="MEC", str="ASCII"}, + ["MCE1320"] = {level="13.820", cab="MEC", str="ASCII"}, + ["MBN1320"] = {level="13.820", cab="MBC", str="ASCII"}, + ["MBS1320"] = {level="13.820", cab="MBC", str="ASCII"}, + ["MCA1320"] = {level="13.820", cab="MEC", str="ASCII"}, + ["MCP1320"] = {level="13.820", cab="MEC", str="ASCII"}, + ["PCE1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["PCP1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["PXE1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["PXP1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["PME1320"] = {level="13.820", cab="MODULAR", str="ASCII"}, + ["PMP1320"] = {level="13.820", cab="MODULAR", str="ASCII"}, + ["PCL1320"] = {level="13.820", cab="MODULAR", str="ASCII"}, + ["P3E1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["P3P1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["36E1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["36P1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["3LE1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["3LP1320"] = {level="13.820", cab="COMPACT", str="ASCII"}, + ["BCE1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["BME1330"] = {level="14.56", cab="MODULAR", str="ASCII"}, + ["BCP1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["BXE1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["BXP1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["B3E1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["B6E1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["BUC1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["TCE1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["T3E1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["TME1330"] = {level="14.56", cab="MODULAR", str="ASCII"}, + ["TCP1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["TXE1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["TPX1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["TXP1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["T6E1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, + ["TUC1330"] = {level="14.56", cab="COMPACT", str="ASCII"}, +} + +p2data.point_types = { + [1] = {mnemonic="LDI", name="Logical Digital Input", default_enum=-1}, + [2] = {mnemonic="LDO", name="Logical Digital Output", default_enum=-2}, + [3] = {mnemonic="LAI", name="Logical Analog Input", default_enum=nil}, + [4] = {mnemonic="LAO", name="Logical Analog Output", default_enum=nil}, + [6] = {mnemonic="L2SL", name="Logical Two-State Latched", default_enum=-6}, + [7] = {mnemonic="LOOAP", name="Logical On/Off/Auto Pulsed", default_enum=-7}, + [11] = {mnemonic="LPACI", name="Logical Pulse Accumulator (Counter) Input", default_enum=nil}, + [12] = {mnemonic="L2SP", name="Logical Two-State Pulsed", default_enum=-12}, + [13] = {mnemonic="LOOAL", name="Logical On/Off/Auto Latched", default_enum=-13}, + [14] = {mnemonic="LFSSL", name="Logical Fast/Slow/Stop Latched", default_enum=-14}, + [15] = {mnemonic="LFSSP", name="Logical Fast/Slow/Stop Pulsed", default_enum=-15}, + [19] = {mnemonic="LCTLR", name="Logical Controller (control loop)", default_enum=-19}, + [20] = {mnemonic="LDAO", name="Logical Digital-Actuated Analog Output", default_enum=nil}, + [21] = {mnemonic="LENUM", name="Logical Enumerated (multistate)", default_enum=-21}, + [22] = {mnemonic="LFMSSL", name="Logical Fast/Medium/Slow/Stop Latched", default_enum=nil}, + [23] = {mnemonic="LFMSSP", name="Logical Fast/Medium/Slow/Stop Pulsed", default_enum=nil}, + [24] = {mnemonic="PPCL_LAI", name="PPCL-referenced analog input", default_enum=nil}, +} + +-- A point type's default state-text set is the enum whose id is the +-- negation of its type code. Resolve an explicit reference first; fall +-- back to the default when the point carries none. +function p2data.default_enum_for(point_type) + local t = p2data.point_types[point_type] + return t and t.default_enum or nil +end + +-- Render an enumerated point value as text, or nil. +-- A point may carry an explicit enum reference; when it does not, its type's +-- DEFAULT enumeration applies -- the enum whose id is the negation of the +-- type code. Analog types have no default and correctly return nil. +function p2data.state_text(value, point_type, enum_id) + local eid = enum_id or p2data.default_enum_for(point_type) + if not eid then return nil end + local t = p2data.enum_types[eid] + if not t then return nil end + return t.levels[math.floor(tonumber(value or 0) + 0.5)] +end +-- ==== P2_DATA END ========================================================= + +-- --------------------------------------------------------------------------- +-- A COUNTING CAVEAT THAT IS NOT THIS DISSECTOR'S TO FIX +-- +-- A P2 frame carried in a PARTIAL RETRANSMISSION -- a segment that resends +-- already-seen bytes AND appends new ones -- may never reach this dissector. +-- Wireshark's TCP layer classifies the whole segment as a retransmission and +-- skips it, new tail included. On the reference capture that hides 10 frames +-- of 17,926: nine 0x0295 and one 0x0274, all in one 519-byte segment resent at +-- a sequence number 104 bytes of which had already been delivered. +-- +-- The obvious workaround is worse. With +-- -o tcp.analyze_sequence_numbers:FALSE +-- the same capture yields 18,056 -- 130 MORE than exist, because the duplicate +-- bytes are then appended and parsed a second time. +-- +-- Wireshark defaults 17,916 skips the segment, loses the tail +-- seq analysis off 18,056 appends it, double-counts +-- placed at sequence offset 17,926 correct +-- +-- Only the third is right, and it is not something a dissector can do: by the +-- time P2 sees the bytes, TCP has already decided. If you need an exact frame +-- census rather than a decode, count with a reader that places each segment at +-- its offset from the connection's lowest sequence number. +-- --------------------------------------------------------------------------- + +-- Dissector version. Tracks the p2.lua decode surface only; the scanner +-- versions independently (p2_scanner.__version__). History is in the Changelog +-- comment block at the top of this file. Keep it in step with that block: a +-- capture saved by an unknown build is only identifiable if this is honest. +local P2_DISSECTOR_VERSION = "2.10.0" +local P2_MIN_FRAME_LEN = 17 -- PROTOCOL.md 6.1.1; matches p2_scanner.P2_MIN_FRAME_LEN + +local p2 = Proto("p2", "Siemens APOGEE P2 (Protocol II) v" .. P2_DISSECTOR_VERSION) + +-- seq-state: responses carry no opcode, only an echoed sequence number. Map +-- {tcp.stream : sequence} -> request opcode so responses can be correlated + decoded. +local f_tcp_stream = Field.new("tcp.stream") +local resp_op = {} + +------------------------------------------------------------------------ value strings +-- There is no MSG_CLASS table, and there is no set of valid values. +-- The u32 at offset 4 is a HEADER LENGTH: 13 + the total bytes of the four +-- NUL-terminated routing slots (PROTOCOL.md §6.2). Earlier releases of this +-- dissector labelled it "Message Class" and named six values as legacy/modern +-- "dialect" pairs; those six are simply what one site's node names summed to, +-- and a reader running this dissector elsewhere saw `Unknown (0x32)` -- which +-- is how the mistake was found. Any value is valid if it matches the slots. +local DIR = { [0x00]="request / push", [0x01]="success response", [0x05]="error response" } +local ERRORS = { + [0x0001]="no_memory_available", + [0x0002]="invalid_command", + [0x0003]="not_found", + [0x0004]="priority_too_low", + [0x0005]="no_change", + [0x0007]="point_failed", + [0x0008]="out_of_service", + [0x0009]="already_exists", + [0x000A]="trend_already_exists", + [0x000B]="value_unchanged", + [0x000C]="value_out_of_range", + [0x000D]="not_hostcaller_node", + [0x0016]="line_not_traced", + [0x0028]="invalid_dst_pair", + [0x0040]="invalid_report_id", + [0x0065]="command_not_supported", + [0x0080]="invalid_user_id", + [0x0081]="invalid_password", + [0x0082]="user_accounts_database_full", + [0x00AB]="coldstart_required", + [0x00AC]="not_supported", + [0x00B7]="too_many_framing_errors", + [0x00B8]="scu_no_answer", + [0x00F9]="invalid_point_address", + [0x00FA]="failed_io_device", + [0x00FE]="io_timeout", + [0x0200]="monitor_list_full", + [0x0202]="flt_transfer_in_progress", + [0x0203]="flt_transfer_killed", + [0x0205]="tec_not_added", + [0x0206]="connection_lost", + [0x0207]="warm_started", + [0x0209]="protocol_error", + [0x0210]="timeout", + [0x0E10]="fln_invalid_fln_number", + [0x0E11]="fln_invalid_drop_number", + [0x0E12]="fln_device_failed", + [0x0E13]="fln_invalid_point_number", + [0x0E14]="fln_physical_point_failed", + [0x0E15]="physical_point_not_commandable", + [0x0E16]="fln_value_out_of_range", + [0x0E17]="fln_application_invalid_for_device", +} +local PRIORITY = { + [0x00]="NONE (read)", [0x01]="tec_ovrd", [0x05]="PDL", [0x0A]="host_2", + [0x0F]="host_3", [0x14]="host_4", [0x19]="host_5", [0x1E]="host_6", + [0x20]="EMER", [0x22]="SMOKE", [0x23]="OPER", +} +local OPCODES = { + [0x0030] = "AP2_SET_GLOBAL_DATA", + [0x0031] = "AP2_GET_GLOBAL_DATA", + [0x0032] = "AP2_REMOTE_NODE_CHECK", + [0x0033] = "AP2_GET_COMPLETE_NODE_STATE", + [0x0034] = "AP2_SET_NODE_STATE", + [0x0035] = "AP2_SET_COMPLETE_NODE_STATE", + [0x003E] = "AP2_CABINET_TIMEOUT_NORMAL", + [0x003F] = "AP2_CABINET_TIMEOUT_EXTENDED", + [0x0041] = "AP2_CABINET_ADD", + [0x0042] = "AP2_CABINET_REMOVE", + [0x0044] = "AP2_CABINET_MAKE_READY", + [0x0046] = "AP2_CABINET_ONLINE", + [0x0047] = "AP2_CABINET_OFFLINE", + [0x0050] = "AP2_DISK_LOG", + [0x0051] = "AP2_DISK_ADD", + [0x0058] = "AP2_REPORT_PRINTER_LOG", + [0x0059] = "AP2_REPORT_PRINTER_ADD", + [0x005B] = "AP2_BLN_DIAGNOSTICS_DISPLAY", + [0x005C] = "AP2_RESET_BLN_DIAGNOSTIC_COUNTERS", + [0x0100] = "AP2_DUMMY_CMD / AP2_REV_STRING", + [0x0108] = "AP2_CABINET_BOOT_MONITOR", + [0x010A] = "AP2_CABINET_COLDSTART", + [0x010B] = "AP2_CABINET_WARMSTART", + [0x010C] = "AP2_CABINET_DISPLAY", + [0x010D] = "AP2_SERVICES_RENDERED", + [0x010E] = "AP2_SERVICES_RENDERED_CHANGED", + [0x010F] = "AP2_LICENSE_MANAGER_DISPLAY", + [0x0110] = "AP2_LICENSE_MANAGER_ADD", + [0x0111] = "AP2_LICENSE_MANAGER_DELETE", + [0x0112] = "AP2_LICENSE_MANAGER_DELETE_ALL", + [0x0113] = "AP2_LICENSE_MANAGER_DBCHANGE", + [0x0114] = "AP2_LICENSE_MANAGER_DISPLAY_LICENSE", + [0x0116] = "AP2_LICENSE_MANAGER_MESSAGE_SEND", + [0x0120] = "AP2_CABINET_SET_MMI1_BAUDRATE", + [0x0121] = "AP2_CABINET_SET_MMI2_BAUDRATE", + [0x0123] = "AP2_CABINET_SET_FLN1_BAUDRATE", + [0x0124] = "AP2_CABINET_SET_FLN2_BAUDRATE", + [0x0125] = "AP2_CABINET_SET_FLN3_BAUDRATE", + [0x0126] = "AP2_CABINET_SET_BLN_BAUDRATE", + [0x0127] = "AP2_CABINET_SET_PBUS_STATE", + [0x0128] = "AP2_CABINET_SET_BLN_ADDRESS", + [0x0129] = "AP2_CABINET_SET_MODEM_STATE", + [0x012A] = "AP2_CABINET_COLDSTART_DISPLAY", + [0x012B] = "AP2_CABINET_COLDSTART_CLEAR_HISTORY", + [0x012F] = "AP2_CABINET_MEMORY_MODIFY", + [0x0130] = "AP2_CABINET_MEMORY_DISPLAY", + [0x0131] = "AP2_CABINET_MEMORY_AVAILABLE", + [0x0136] = "AP2_P2_ROUTE", + [0x0140] = "AP2_PBUS_MODULE_DISPLAY", + [0x0142] = "AP2_PBUS_DIAGS_RESET", + [0x0143] = "AP2_PBUS_LINETEST", + [0x0200] = "AP2_POINT_ADD", + [0x0201] = "AP2_POINT_ADD_LDO", + [0x0202] = "AP2_POINT_ADD_LDI", + [0x0203] = "AP2_POINT_ADD_LAO", + [0x0204] = "AP2_POINT_ADD_LAI", + [0x0205] = "AP2_POINT_ADD_L2SL", + [0x0206] = "AP2_POINT_ADD_L2SP", + [0x0207] = "AP2_POINT_ADD_LFSSL", + [0x0208] = "AP2_POINT_ADD_LFSSP", + [0x0209] = "AP2_POINT_ADD_LOOAL", + [0x020A] = "AP2_POINT_ADD_LOOAP", + [0x020B] = "AP2_POINT_ADD_LPACI", + [0x020C] = "AP2_POINT_ADD_LDAO", + [0x020D] = "AP2_POINT_ADD_LFMSSL", + [0x020E] = "AP2_POINT_ADD_LFMSSP", + [0x020F] = "AP2_POINT_ADD_LENUM", + [0x0220] = "AP2_POINT_LOG_VALUE", + [0x0221] = "AP2_POINT_LOG_ALARM", + [0x0222] = "AP2_POINT_LOG_CTRL_STAT", + [0x0223] = "AP2_POINT_LOG_FAILED", + [0x0224] = "AP2_POINT_LOG_TOTAL", + [0x0225] = "AP2_POINT_LOG_PRIORITY", + [0x0226] = "AP2_POINT_LOG_DISABLED", + [0x0227] = "AP2_POINT_LOG_TYPE", + [0x0228] = "AP2_POINT_LOG_TROUBLE", + [0x0229] = "AP2_POINT_LOG_ANY", + [0x022A] = "AP2_POINT_LOG_ODSB", + [0x022B] = "AP2_POINT_LOG_PDSB", + [0x022C] = "AP2_POINT_LOG_ALARM_CMD", + [0x0240] = "AP2_POINT_CMD_VALUE", + [0x0241] = "AP2_POINT_CMD_PRIORITY", + [0x0242] = "AP2_POINT_CMD_ENABLE", + [0x0243] = "AP2_POINT_CMD_DISABLE", + [0x0244] = "AP2_POINT_CMD_ALARM", + [0x0245] = "AP2_POINT_CMD_NORMAL", + [0x0246] = "AP2_POINT_CMD_ALARM_ENABLE", + [0x0247] = "AP2_POINT_CMD_ALARM_DISABLE", + [0x0248] = "AP2_POINT_CMD_INIT_LPACI", + [0x0249] = "AP2_POINT_CMD_LOWLIMIT", + [0x024A] = "AP2_POINT_CMD_HIGHLIMIT", + [0x024B] = "AP2_POINT_CMD_TOTALIZER", + [0x024C] = "AP2_POINT_CMD_INTO_TROUBLE", + [0x024D] = "AP2_POINT_CMD_OUTOF_TROUBLE", + [0x024E] = "AP2_POINT_CMD_RELEASE", + [0x0260] = "AP2_POINT_MODIFY", + [0x0261] = "AP2_POINT_LOOK", + [0x0262] = "AP2_POINT_DEFINITION_DISPLAY", + [0x0263] = "AP2_POINT_REMOVE", + [0x0264] = "AP2_POINT_DEFINITION_BYADDR_DISPLAY", + [0x0265] = "AP2_POINT_QUERY_NAME", + [0x0271] = "AP2_COV_ENABLE", + [0x0272] = "AP2_COV_DELETE_STUB", + [0x0273] = "AP2_COV_DISABLE", + [0x0274] = "AP2_COV_ANNUNCIATE", + [0x0275] = "AP2_XREF_COV_DISPLAY", + [0x0280] = "AP2_MONITOR_ADD_NAME", + [0x0281] = "AP2_MONITOR_REMOVE_NAME", + [0x0282] = "AP2_MONITOR_START", + [0x0290] = "AP2_TREND_SETUP_ADD", + [0x0291] = "AP2_TREND_SETUP_DELETE", + [0x0292] = "AP2_TREND_ENABLE", + [0x0293] = "AP2_TREND_DISABLE", + [0x0294] = "AP2_TREND_SETUP_LOG", + [0x0295] = "AP2_TREND_DATA_DISPLAY", + [0x0296] = "AP2_TREND_DEFINITION_DISPLAY", + [0x0297] = "AP2_TREND_MULTIPOINT_DISPLAY", + [0x0298] = "AP2_TREND_SETUP_MODIFY", + [0x0299] = "AP2_TREND_MODIFY", + [0x029A] = "AP2_TREND_SETUP_COPY", + [0x029B] = "AP2_TREND_COPY", + [0x029C] = "AP2_TREND_LOOK", + [0x029D] = "AP2_TREND_QUERY_SINGLE_NAME", + [0x029E] = "AP2_TREND_QUERY_NAMES", + [0x029F] = "AP2_TREND_QUERY_TRENDS", + [0x02A0] = "AP2_TREND_ARC_SETUP", + [0x02A1] = "AP2_TREND_ARC_DATA_UPLOAD", + [0x02A2] = "AP2_TREND_ARC_UPLOAD_ME", + [0x02A5] = "AP2_TREND_EVENT_SETUP_ADD", + [0x02A6] = "AP2_TREND_EVENT_MODIFY", + [0x02A7] = "AP2_TREND_EVENT_COPY", + [0x02A8] = "AP2_TREND_EVENT_ARC_SETUP", + [0x02A9] = "AP2_TREND_EVENT_ARC_ENABLE", + [0x02E0] = "AP2_POINT_TOTAL_ENABLE", + [0x02E1] = "AP2_POINT_TOTAL_DISABLE", + [0x02E2] = "AP2_POINT_TOTAL_DISPLAY", + [0x0300] = "AP2_POINT_SET_PREFIX", + [0x0301] = "AP2_TIME_DISPLAY / AP2_TIME_SOFTWARE", + [0x0302] = "AP2_TIME_DISPLAY_CLOCK / AP2_TIME_SET", + [0x0303] = "AP2_MESSAGE_SEND / AP2_MESSAGE", + [0x0304] = "AP2_LOGON_CEC", + [0x0305] = "AP2_LOGOFF_CEC", + [0x0306] = "AP2_QUICK_KEYS", + [0x0307] = "AP2_LOAD_DATABASE", + [0x0308] = "AP2_SAVE_DATABASE", + [0x0309] = "AP2_POINT_SAVE", + [0x030A] = "AP2_PPCL_SAVE", + [0x030B] = "AP2_TAPE_TRAILER", + [0x030C] = "AP2_TOGGLE_DEVELOPMENT", + [0x030D] = "AP2_COLBAS_TEST", + [0x030E] = "AP2_ROUTE_OBJECT", + [0x030F] = "AP2_P1_POLL", + [0x0310] = "AP2_PB_POLL", + [0x0311] = "AP2_PRINT_ERROR", + [0x0313] = "AP2_P1_ROUTE", + [0x0314] = "AP2_P1_LINETEST", + [0x0316] = "AP2_OPEN_ENVELOPE", + [0x0317] = "AP2_P1_RESET_COUNTERS", + [0x031B] = "AP2_ENVELOPE_OPEN_DEST", + [0x031C] = "AP2_ENVELOPE_CLOSE_DEST", + [0x031D] = "AP2_ENVELOPE_OPEN_TEXT", + [0x031E] = "AP2_ENVELOPE_CLOSE_TEXT", + [0x031F] = "AP2_ENVELOPE_OPEN_USERS", + [0x0320] = "AP2_ENVELOPE_CLOSE_USERS", + [0x0325] = "AP2_SETUP_LOGGER", + [0x0326] = "AP2_GET_LOGGER_STATE", + [0x0327] = "AP2_SETUP_BUFFERALARM", + [0x0328] = "AP2_GET_BUFFERALARM_STATE", + [0x0330] = "AP2_USER_ACCT_LOG", + [0x0331] = "AP2_USER_ACCT_DISPLAY", + [0x0332] = "AP2_USER_ACCT_ADD", + [0x0333] = "AP2_USER_ACCT_MODIFY", + [0x0334] = "AP2_USER_ACCT_COPY", + [0x0335] = "AP2_USER_ACCT_DELETE", + [0x0336] = "AP2_USER_ACCT_LOOK", + [0x0337] = "AP2_USER_ACCT_DB_GET", + [0x0338] = "AP2_USER_ACCT_DB_REPLACE", + [0x0350] = "AP2_ACCESS_GROUPS_LOG", + [0x0353] = "AP2_ACCESS_GROUPS_MODIFY", + [0x0357] = "AP2_ACCESS_GROUPS_DB_GET", + [0x0358] = "AP2_ACCESS_GROUPS_DB_REPLACE", + [0x0360] = "AP2_EMS_DIAL_ENABLE", + [0x0361] = "AP2_EMS_DIAL_DISABLE", + [0x0362] = "AP2_EMS_DB_REPLACE", + [0x0363] = "AP2_EMS_DB_GET", + [0x0364] = "AP2_EMS_DB_DISPLAY", + [0x0365] = "AP2_EMS_ENTRY_REPLACE", + [0x0366] = "AP2_EMS_DB_GET_DIALFLAGS", + [0x0367] = "AP2_EMS_DB_GET_DESTINATIONS", + [0x0368] = "AP2_EMS_PRINT", + [0x0401] = "AP2_ENUM_TYPE_ADD", + [0x0402] = "AP2_ENUM_TYPE_DELETE", + [0x0403] = "AP2_ENUM_TYPE_DB_DELETE", + [0x0404] = "AP2_ENUM_TYPE_DISPLAY", + [0x0405] = "AP2_ENUM_TYPE_LOOK", + [0x0406] = "AP2_ENUM_TYPE_LOG", + [0x0407] = "AP2_ENUM_ELEMENT_ADD", + [0x0408] = "AP2_ENUM_ELEMENT_DELETE", + [0x0409] = "AP2_ENUM_ELEMENT_MODIFY", + [0x040A] = "AP2_ENUM_TYPE_DB_GET", + [0x040B] = "AP2_ENUM_TYPE_DB_REPLACE", + [0x040E] = "AP2_ENUM_TYPE_REPLACE", + [0x0500] = "AP2_ALARM_SETUP", + [0x0501] = "AP2_ALARM_REMOVE", + [0x0502] = "AP2_ALARM_POINT_QUERY_LIST_EALARMABLE", + [0x0503] = "AP2_ALARM_POINT_QUERY_REC_EALARMABLE", + [0x0504] = "AP2_ALARM_POINT_SETUP_QUERY_LIST", + [0x0505] = "AP2_ALARM_POINT_SETUP_QUERY_RECORD", + [0x0506] = "AP2_ALARM_SETUP_COPY", + [0x0507] = "AP2_ALARM_SETUP_MODIFY", + [0x0508] = "AP2_ALARM_PRINT", + [0x0509] = "AP2_ALARM_ACK", + [0x050A] = "AP2_ALARM_ACK_PENDING_QUERY_LIST", + [0x050B] = "AP2_ALARM_SETUP_DISPLAY_BY_MODE", + [0x050C] = "AP2_ALARM_SETUP_DISPLAY_BY_CATEGORY", + [0x050D] = "AP2_ALARM_SETUP_DISPLAY", + [0x0520] = "AP2_ALARM_MODE_ADD", + [0x0521] = "AP2_ALARM_MODE_COPY", + [0x0522] = "AP2_ALARM_MODE_LISTBY_SETPOINT_NAME", + [0x0523] = "AP2_ALARM_MODE_LISTBY_PRIORITY", + [0x0524] = "AP2_ALARM_MODE_LISTBY_SETPOINT_VALUE", + [0x0525] = "AP2_ALARM_MODE_DEFINITION_DISPLAY", + [0x0526] = "AP2_ALARM_MODE_LOOK", + [0x0528] = "AP2_ALARM_MODE_MODIFY", + [0x0529] = "AP2_ALARM_MODE_QUERY_RECORD", + [0x052B] = "AP2_ALARM_MODE_DELETE", + [0x052C] = "AP2_ALARM_MODE_LISTBY_CATEGORY", + [0x052D] = "AP2_ALARM_MODE_LISTBY_MESSAGE", + [0x0530] = "AP2_ALARM_MODE_QUERY_LIST", + [0x0540] = "AP2_CATEGORY_ADD", + [0x0541] = "AP2_CATEGORY_REMOVE", + [0x0542] = "AP2_CATEGORY_DESCRIPTOR", + [0x0543] = "AP2_CATEGORY_ENABLE_DIAL", + [0x0544] = "AP2_CATEGORY_ENABLE_PRINT", + [0x0545] = "AP2_CATEGORY_DIAL_DISABLE", + [0x0546] = "AP2_CATEGORY_PRINT_DISABLE", + [0x0547] = "AP2_CATEGORY_DB_GET", + [0x0548] = "AP2_CATEGORY_LOG", + [0x0549] = "AP2_CATEGORY_NODES_APPEND", + [0x054A] = "AP2_CATEGORY_NODES_REMOVE", + [0x054B] = "AP2_CATEGORY_QUERY_LIST", + [0x054C] = "AP2_CATEGORY_DEFAULT_DB_GET", + [0x054D] = "AP2_CATEGORY_REPLACE", + [0x0560] = "AP2_ALARM_MESSAGE_LOOK", + [0x0561] = "AP2_ALARM_MESSAGE_ENABLE", + [0x0562] = "AP2_ALARM_MESSAGE_DISABLE", + [0x0563] = "AP2_ALARM_MESSAGE_DELETE", + [0x0564] = "AP2_ALARM_MESSAGE_COPY", + [0x0565] = "AP2_ALARM_MESSAGE_ADD", + [0x0566] = "AP2_ALARM_MESSAGE_QUERY_RECORD", + [0x0567] = "AP2_ALARM_MESSAGE_LOG", + [0x0568] = "AP2_ALARM_MESSAGE_QUERY_LIST", + [0x056A] = "AP2_ALARM_MESSAGE_MODIFY", + [0x0600] = "AP2_CAL_DATE_ADD", + [0x0601] = "AP2_CAL_DATE_RESET", + [0x0602] = "AP2_CAL_DB_ADD", + [0x0603] = "AP2_CAL_DB_RESET", + [0x0604] = "AP2_CAL_DB_DISPLAY", + [0x0605] = "AP2_CAL_DB_GET_HOL_SPEC", + [0x0606] = "AP2_CAL_DB_GET_OTHER", + [0x0610] = "AP2_DST_YEAR_ADD", + [0x0611] = "AP2_DST_YEAR_DELETE", + [0x0612] = "AP2_DST_DB_ADD", + [0x0613] = "AP2_DST_DB_DELETE", + [0x0614] = "AP2_DST_DB_DISPLAY", + [0x0615] = "AP2_DST_DB_GET", + [0x0900] = "AP2_LANGUAGE_GET_STRING", + [0x0901] = "AP2_LANGUAGE_GET_PROMPT", + [0x0902] = "AP2_LANGUAGE_REPORT_DATA", + [0x0950] = "AP2_DOWNLOAD_ME", + [0x0951] = "AP2_DBCHANGE_POINT", + [0x0952] = "AP2_DBCHANGE_ALARM_SETUP", + [0x0953] = "AP2_DBCHANGE_ALARM_MODE", + [0x0954] = "AP2_DBCHANGE_TREND", + [0x0955] = "AP2_DBCHANGE_PPCL", + [0x0956] = "AP2_DBCHANGE_CONTROLLER", + [0x0957] = "AP2_DBCHANGE_EQS_ZONE", + [0x0958] = "AP2_DBCHANGE_EQS_CMD_TABLE", + [0x0959] = "AP2_DBCHANGE_EQS_MODE_SCHED", + [0x095A] = "AP2_DBCHANGE_LOOP", + [0x095B] = "AP2_DBCHANGE_ALARM_MESSAGE", + [0x095C] = "AP2_DBCHANGE_SSTO_GENERAL", + [0x095D] = "AP2_DBCHANGE_SSTO_START", + [0x095E] = "AP2_DBCHANGE_SSTO_STOP", + [0x095F] = "AP2_DBCHANGE_SSTO_NIGHT", + [0x0961] = "AP2_UPL_DEL_POINT", + [0x0962] = "AP2_UPL_DEL_ALARM_SETUP", + [0x0963] = "AP2_UPL_DEL_ALARM_MODE", + [0x0964] = "AP2_UPL_DEL_TREND", + [0x0965] = "AP2_UPL_DEL_PPCL", + [0x0966] = "AP2_UPL_DEL_TEC", + [0x0967] = "AP2_UPL_DEL_EQS_ZONE", + [0x0968] = "AP2_UPL_DEL_EQS_CMD_TABLE", + [0x0969] = "AP2_UPL_DEL_EQS_MODE_SCHED", + [0x096A] = "AP2_UPL_DEL_LOOP", + [0x096B] = "AP2_UPL_DEL_ALARM_MESSAGE", + [0x0971] = "AP2_UPL_ADDED_POINT", + [0x0972] = "AP2_UPL_ADDED_ALARM_SETUP", + [0x0973] = "AP2_UPL_ADDED_ALARM_MODE", + [0x0974] = "AP2_UPL_ADDED_TREND", + [0x0975] = "AP2_UPL_ADDED_PPCL", + [0x0976] = "AP2_UPL_ADDED_TEC", + [0x0977] = "AP2_UPL_ADDED_EQS_ZONE", + [0x0978] = "AP2_UPL_ADDED_EQS_CMD_TABLE", + [0x0979] = "AP2_UPL_ADDED_EQS_MODE_SCHED", + [0x097A] = "AP2_UPL_ADDED_LOOP", + [0x097B] = "AP2_UPL_ADDED_ALARM_MESSAGE", + [0x097C] = "AP2_UPL_ADDED_SSTO_GENERAL", + [0x097D] = "AP2_UPL_ADDED_SSTO_START", + [0x097E] = "AP2_UPL_ADDED_SSTO_STOP", + [0x097F] = "AP2_UPL_ADDED_SSTO_NIGHT", + [0x0981] = "AP2_UPL_ALL_POINT", + [0x0982] = "AP2_UPL_ALL_ALARM_SETUP", + [0x0983] = "AP2_UPL_ALL_ALARM_MODE", + [0x0984] = "AP2_UPL_ALL_TREND", + [0x0985] = "AP2_UPL_ALL_PPCL", + [0x0986] = "AP2_UPL_ALL_TEC", + [0x0987] = "AP2_UPL_ALL_EQS_ZONE", + [0x0988] = "AP2_UPL_ALL_EQS_CMD_TABLE", + [0x0989] = "AP2_UPL_ALL_EQS_MODE_SCHED", + [0x098B] = "AP2_UPL_ALL_ALARM_MESSAGE", + [0x098C] = "AP2_UPL_ALL_SSTO_GENERAL", + [0x098D] = "AP2_UPL_ALL_SSTO_START", + [0x098E] = "AP2_UPL_ALL_SSTO_STOP", + [0x098F] = "AP2_UPL_ALL_SSTO_NIGHT", + [0x099C] = "AP2_DBCHANGE_PORT", + [0x099D] = "AP2_UPL_DEL_PORT", + [0x099E] = "AP2_UPL_ADDED_PORT", + [0x099F] = "AP2_UPL_ALL_PORT", + [0x09A0] = "AP2_DBCHANGE_PARTNER", + [0x09A1] = "AP2_UPL_DEL_PARTNER", + [0x09A2] = "AP2_UPL_ADDED_PARTNER", + [0x09A3] = "AP2_UPL_ALL_PARTNER", + [0x09A4] = "AP2_DBCHANGE_EQS_OVERRIDE", + [0x09A5] = "AP2_UPL_DEL_EQS_OVERRIDE", + [0x09A6] = "AP2_UPL_ADDED_EQS_OVERRIDE", + [0x09A7] = "AP2_UPL_ALL_EQS_OVERRIDE", + [0x09A8] = "AP2_DBCHANGE_UC", + [0x09A9] = "AP2_UPL_DEL_UC", + [0x09AA] = "AP2_UPL_ADDED_UC", + [0x09AB] = "AP2_UPL_ALL_UC", + [0x09B0] = "AP2_DBCHANGE_TOD_POINT", + [0x09B1] = "AP2_UPL_DEL_TOD_POINT", + [0x09B2] = "AP2_UPL_ADDED_TOD_POINT", + [0x09B3] = "AP2_UPL_ALL_TOD_POINT", + [0x09B4] = "AP2_DBCHANGE_TOD_CMD", + [0x09B5] = "AP2_UPL_DEL_TOD_CMD", + [0x09B6] = "AP2_UPL_ADDED_TOD_CMD", + [0x09B7] = "AP2_UPL_ALL_TOD_CMD", + [0x09B8] = "AP2_DBCHANGE_LON", + [0x09B9] = "AP2_UPL_DEL_LON", + [0x09BA] = "AP2_UPL_ADDED_LON", + [0x09BB] = "AP2_UPL_ALL_LON", + [0x09BC] = "AP2_DBCHANGE_COMMAND_REPORT", + [0x09BD] = "AP2_UPLD_COMND_REPORT", + [0x09BE] = "AP2_DBCHANGE_MISCDATA_REPORT", + [0x09BF] = "AP2_UPLD_MISCDATA_REPORT", + [0x09C0] = "AP2_DBCHANGE_MSTP_DEVICE", + [0x09C1] = "AP2_UPL_DEL_MSTP_DEVICE", + [0x09C2] = "AP2_UPL_ADDED_MSTP_DEVICE", + [0x09C3] = "AP2_UPL_ALL_MSTP_DEVICE", + [0x2824] = "AP2_RACS_SYSTEM_DISPLAY", + [0x3800] = "AP2_RACS_PARTNER_ADD", + [0x3801] = "AP2_RACS_PARTNER_COPY", + [0x3802] = "AP2_RACS_PARTNER_DELETE", + [0x3803] = "AP2_RACS_PARTNER_DISABLE", + [0x3804] = "AP2_RACS_PARTNER_DISPLAY", + [0x3805] = "AP2_RACS_PARTNER_ENABLE", + [0x3806] = "AP2_RACS_PARTNER_LOG", + [0x3807] = "AP2_RACS_PARTNER_LOOK", + [0x3808] = "AP2_RACS_PARTNER_MODIFY", + [0x3809] = "AP2_RACS_PARTNER_STATLOG", + [0x380A] = "AP2_RACS_PARTNER_STATLOG_RESET", + [0x3810] = "AP2_RACS_PORT_ADD", + [0x3811] = "AP2_RACS_PORT_COPY", + [0x3812] = "AP2_RACS_PORT_DELETE", + [0x3813] = "AP2_RACS_PORT_DISABLE", + [0x3814] = "AP2_RACS_PORT_DISPLAY", + [0x3815] = "AP2_RACS_PORT_ENABLE", + [0x3816] = "AP2_RACS_PORT_LOG", + [0x3817] = "AP2_RACS_PORT_LOOK", + [0x3818] = "AP2_RACS_PORT_MODIFY", + [0x3819] = "AP2_RACS_PORT_STATLOG", + [0x381A] = "AP2_RACS_PORT_STATLOG_RESET", + [0x3820] = "AP2_RACS_SYSTEM_ADD", + [0x3821] = "AP2_RACS_SYSTEM_COPY", + [0x3822] = "AP2_RACS_SYSTEM_DELETE", + [0x3823] = "AP2_RACS_SYSTEM_DISABLE", + [0x3825] = "AP2_RACS_SYSTEM_ENABLE", + [0x3826] = "AP2_RACS_SYSTEM_LOG", + [0x3827] = "AP2_RACS_SYSTEM_LOOK", + [0x3828] = "AP2_RACS_SYSTEM_MODIFY", + [0x3829] = "AP2_RACS_SYSTEM_STATLOG", + [0x382A] = "AP2_RACS_SYSTEM_STATLOG_RESET", + [0x4000] = "AP2_TEAM_LOG / AP2_APPLICATION_LOG", + [0x4001] = "AP2_TEAM_DESC_ADD / AP2_APPLICATION_DISPLAY", + [0x4002] = "AP2_MEMBER_DESC_ADD_ANALOG", + [0x4003] = "AP2_MEMBER_DESC_ADD_DIGITAL", + [0x4004] = "AP2_MEMBER_DESC_ADD_ENUM", + [0x4005] = "AP2_MEMBER_DESC_ADD_LPACI", + [0x4006] = "AP2_MEMBER_DESC_ADD_L2SL", + [0x400B] = "AP2_TEAM_MEMBER_LOG", + [0x400C] = "AP2_TEAM_REPORT_LOG", + [0x400D] = "AP2_TEAM_REPORT_LIST", + [0x400E] = "AP2_REPORT_DESC_ADD", + [0x400F] = "AP2_TEAM_DESC_UPLOAD", + [0x4010] = "AP2_MEMBER_DESC_UPLOAD", + [0x4011] = "AP2_REPORT_DESC_UPLOAD", + [0x4015] = "AP2_TEAM_DESC_DB_CHANGE", + [0x4016] = "AP2_TEAM_MEMBER_DB_CHANGE", + [0x4017] = "AP2_TEAM_DESC_UPLOAD_ADDED", + [0x4018] = "AP2_TEAM_MEMBER_UPLOAD_ADDED", + [0x4100] = "AP2_PPCL_ADD_LINE", + [0x4101] = "AP2_PPCL_EDIT_LINE", + [0x4103] = "AP2_PPCL_REMOVE_LINES", + [0x4104] = "AP2_PPCL_ENABLE_LINES", + [0x4105] = "AP2_PPCL_DISABLE_LINES", + [0x4106] = "AP2_PPCL_CLEAR_TRACE", + [0x4107] = "AP2_PPCL_PROGRAM_LOG", + [0x4108] = "AP2_PPCL_SEARCH_NAME_TYPE", + [0x4109] = "AP2_PPCL_QUERY_PROGRAM", + [0x410A] = "AP2_PPCL_PROGRAM_DISPLAY", + [0x410B] = "AP2_PPCL_MODIFY_LINE", + [0x410C] = "AP2_PPCL_COPY_LINE", + [0x410D] = "AP2_PPCL_SETUP_MODIFY_LINE", + [0x410E] = "AP2_PPCL_LOOK_LINES", + [0x410F] = "AP2_PPCL_PDL_RESET", + [0x4110] = "AP2_PPCL_PDL_INIT", + [0x4111] = "AP2_PPCL_PDL_DISPLAY", + [0x412A] = "AP2_PPCL_PROGRAM_DISPLAY_UNRESOLVED", + [0x4130] = "AP2_DBCHANGE_PROGRAM", + [0x4131] = "AP2_UPL_DEL_PROGRAM", + [0x4132] = "AP2_UPL_ADDED_PROGRAM", + [0x4133] = "AP2_UPL_ALL_PROGRAM", + [0x4134] = "AP2_PROGRAM_ADD", + [0x4135] = "AP2_PROGRAM_REMOVE", + [0x4137] = "AP2_PROGRAM_LOG", + [0x4138] = "AP2_PROGRAM_MODIFY", + [0x4200] = "AP2_CONTROLLER_LOG / AP2_TEC_LOG", + [0x4201] = "AP2_TEC_ADD", + [0x4202] = "AP2_TEC_COPY", + [0x4203] = "AP2_TEC_MODIFY / AP2_CONTROLLER_MODIFY", + [0x4204] = "AP2_CONTROLLER_REMOVE / AP2_TEC_REMOVE", + [0x4205] = "AP2_TEC_LOOK / AP2_CONTROLLER_LOOK", + [0x4206] = "AP2_TEC_QUERY_RECORD / AP2_CONTROLLER_QUERY", + [0x4207] = "AP2_TEC_QUERY_LIST", + [0x4208] = "AP2_TEC_DEFINITION", + [0x4210] = "AP2_TEC_MEMBER_LOG", + [0x4211] = "AP2_TEC_REPORT_LOG", + [0x4212] = "AP2_TEC_REPORT_QUERY_LIST", + [0x4220] = "AP2_TEC_LOCAL_INIT_VALUE_LOG", + [0x4221] = "AP2_TEC_REMOTE_INIT_VALUE_LOG", + [0x4222] = "AP2_TEC_SET_INIT_VALUE", + [0x4223] = "AP2_TEC_RESTORE_INIT_VALUE", + [0x4224] = "AP2_TEC_INITIALIZE", + [0x4225] = "AP2_TEC_UPDATE_LOCAL_INIT_VALUES", + [0x4230] = "AP2_FLN_SCAN_ENABLE", + [0x4231] = "AP2_FLN_SCAN_DISABLE", + [0x4232] = "AP2_P1_DIAGNOSTICS_LOG", + [0x4241] = "AP2_UC_ADD", + [0x4244] = "AP2_UC_REMOVE", + [0x4245] = "AP2_UC_LOOK", + [0x4249] = "AP2_UC_MEMBER_LOG", + [0x4300] = "AP2_LON_LOG", + [0x4301] = "AP2_LON_ADD", + [0x4303] = "AP2_LON_MODIFY", + [0x4304] = "AP2_LON_REMOVE", + [0x4310] = "AP2_LON_MEMBER_LOG", + [0x4311] = "AP2_LON_REPORT_LOG", + [0x4320] = "AP2_LON_LOCAL_INIT_VALUE_LOG", + [0x4321] = "AP2_LON_REMOTE_INIT_VALUE_LOG", + [0x4322] = "AP2_LON_SET_INIT_VALUE", + [0x4323] = "AP2_LON_RESTORE_INIT_VALUE", + [0x4324] = "AP2_LON_INITIALIZE", + [0x4325] = "AP2_LON_UPDATE_LOCAL_INIT_VALUES", + [0x4332] = "AP2_LON_DIAGNOSTICS_LOG", + [0x4401] = "AP2_LON_SEND_SERVICE_PIN", + [0x4402] = "AP2_LON_GET_DOMAIN", + [0x4403] = "AP2_LON_SET_DOMAIN", + [0x4404] = "AP2_LON_REQUEST_WINK", + [0x440B] = "AP2_LON_STATUS_CLEAR", + [0x4450] = "AP2_LON_PKCMSAGTSRVDBEXPORT", + [0x4451] = "AP2_LON_PKCMSAGTSRVDBIMPORT", + [0x4452] = "AP2_LON_PEAK_DB_CLEAR", + [0x4500] = "AP2_TOD_POINT_ADD", + [0x4501] = "AP2_TOD_POINT_REMOVE", + [0x4502] = "AP2_TOD_POINT_ENABLE", + [0x4503] = "AP2_TOD_POINT_DISABLE", + [0x4504] = "AP2_TOD_CMD_ADD", + [0x4505] = "AP2_TOD_CMD_REMOVE", + [0x4506] = "AP2_TOD_CMD_DISABLE", + [0x450E] = "AP2_TOD_POINT_DISPLAY", + [0x450F] = "AP2_TOD_CMD_DISPLAY", + [0x461F] = "AP2_EBLN_FP_NAMES_DISPLAY", + [0x4620] = "AP2_EBLN_FP_NAME_SET", + + -- EBLN management/replication set, 0x4620-0x4642. + -- Names recovered from the command string pool of a shipped EBLN + -- diagnostic binary, ordered by opcode; validated against five + -- independently wire-established bindings (0x4640, 0x4636, 0x4634, + -- 0x462E, 0x462D), which all agree on one base. Read/write kind is + -- from the command name. 0x4633-0x4636 and 0x4640 are wire-observed; + -- the rest have never been seen in captured traffic, so any + -- occurrence is anomalous by construction (see PROTOCOL.md 17). + [0x4623] = "AP2_EBLN_FP_DISPLAY", -- read + [0x4624] = "AP2_EBLN_STORAGE_NODES_REPLACE", -- write + [0x4625] = "AP2_EBLN_STORAGE_NODES_DISPLAY", -- read + [0x4626] = "AP2_EBLN_REPORT_PRINTER_REPLACE", -- write + [0x4627] = "AP2_EBLN_REPORT_PRINTER_DISPLAY", -- read + [0x4630] = "AP2_EBLN_NODE_ADD", -- write + [0x4631] = "AP2_EBLN_NODE_REMOVE", -- write + [0x4632] = "AP2_EBLN_NODE_LIST_DISPLAY", -- read + [0x4621] = "AP2_EBLN_FP_IP_CONFIGURE", + [0x4622] = "AP2_EBLN_FP_TCP_PORTS_CONFIGURE", + [0x4628] = "AP2_EBLN_TRUNK_SETTINGS_REPLACE", + [0x4629] = "AP2_EBLN_TRUNK_SETTINGS_DISPLAY", + [0x462A] = "AP2_EBLN_FP_SITE_NAME_SET", + [0x462B] = "AP2_EBLN_FP_BLN_NAME_SET", + [0x462C] = "AP2_EBLN_FP_MULTICAST_CONFIGURE", + [0x462D] = "AP2_EBLN_HOSTTABLE_ENTRY_ADD", + [0x462E] = "AP2_EBLN_HOSTTABLE_ENTRY_REMOVE", + [0x462F] = "AP2_EBLN_HOSTTABLE_DISPLAY", + [0x4633] = "AP2_EBLN_REPL_NOTIFY", + [0x4634] = "AP2_EBLN_REPL_PULL", + [0x4635] = "AP2_EBLN_REPL_PULL_MORE", + [0x4636] = "AP2_EBLN_REPL_CHANGES", + [0x4637] = "AP2_EBLN_POINT_LOCATION_GET", + [0x4638] = "AP2_EBLN_MAC_ADDRESS_SET", + [0x4639] = "AP2_EBLN_MII_CONFIGURE", + [0x463A] = "AP2_EBLN_MII_DISPLAY", + [0x463B] = "AP2_EBLN_IP_DISPLAY", + [0x463C] = "AP2_EBLN_PORTS_DISPLAY", + [0x463D] = "AP2_EBLN_MULTICAST_DISPLAY", + [0x463E] = "AP2_EBLN_MAC_ADDRESS_DISPLAY", + [0x4640] = "AP2_EBLN_PING", + [0x4644] = "AP2_EBLN_TELNET_ENABLE", + [0x4645] = "AP2_EBLN_TELNET_DISABLE", + [0x464C] = "AP2_EBLN_REPL_DIAG_NODELIST", + [0x465D] = "AP2_WEBSERVER_GET_STATE", + [0x4821] = "AP2_BAC_DBCHANGE_BBMD", + [0x4822] = "AP2_BAC_UPL_DEL_BBMD", + [0x4823] = "AP2_BAC_UPL_ADDED_BBMD", + [0x4824] = "AP2_BAC_UPL_ALL_BBMD", + [0x4825] = "AP2_BAC_BBMD_ADD", + [0x4826] = "AP2_BAC_BBMD_REMOVE", + [0x4827] = "AP2_BAC_BBMD_DISPLAY", + [0x4828] = "AP2_BAC_BBMD_REMOVE_ALL", + [0x4829] = "AP2_BAC_OBJECT_ID_LOG", + [0x482A] = "AP2_BAC_APPLICATION_PRIORITY_REPLACE", + [0x482B] = "AP2_BAC_APPLICATION_PRIORITY_REMOVE", + [0x482C] = "AP2_BAC_APPLICATION_PRIORITY_DISPLAY", + [0x482E] = "AP2_BAC_DEVICE_NAME_REPLACE", + [0x482F] = "AP2_BAC_DEVICE_NAME_REMOVE", + [0x4830] = "AP2_BAC_DBCHANGE_COVTAB", + [0x4831] = "AP2_BAC_UPL_DEL_COVTAB", + [0x4832] = "AP2_BAC_UPL_ADDED_COVTAB", + [0x4833] = "AP2_BAC_UPL_ALL_COVTAB", + [0x4834] = "AP2_BAC_COVTAB_ADD", + [0x4835] = "AP2_BAC_COVTAB_REMOVE", + [0x4837] = "AP2_BAC_COVTAB_REMOVE_ALL", + [0x4838] = "AP2_BAC_TREND_LOG_ADD", + [0x4839] = "AP2_BAC_TREND_LOG_DELETE", + [0x483A] = "AP2_BAC_TREND_LOG_MODIFY", + [0x4842] = "AP2_BAC_TREND_LOG_LOG", + [0x4843] = "AP2_BAC_TREND_DBCHANGE", + [0x4844] = "AP2_BAC_TREND_UPL_DELETED", + [0x4845] = "AP2_BAC_TREND_UPL_ADDED", + [0x4846] = "AP2_BAC_TREND_UPL_ALL", + [0x4877] = "AP2_BAC_DBCHANGE", + [0x4878] = "AP2_BAC_UPLOAD_ADDED", + [0x4879] = "AP2_BAC_UPLOAD_DELETED", + [0x4960] = "AP2_BACNET_SET_MSTP", + [0x4961] = "AP2_BACNET_SET_FLN_TYPE", + [0x4963] = "AP2_BNMSTP_ADD", + [0x4965] = "AP2_BNMSTP_MODIFY", + [0x4966] = "AP2_BNMSTP_REMOVE", + [0x4967] = "AP2_BNMSTP_LOOK", + [0x496B] = "AP2_BNMSTP_MEMBER_LOG", + [0x496E] = "AP2_BNMSTP_LOCAL_INIT_VALUE_LOG", + [0x4970] = "AP2_BNMSTP_SET_INIT_VALUE", + [0x4971] = "AP2_BNMSTP_RESTORE_INIT_VALUE", + [0x4972] = "AP2_BNMSTP_INITIALIZE", + [0x4973] = "AP2_BNMSTP_UPDATE_LOCAL_INIT_VALUES", + [0x4A00] = "AP2_COLBAS_IMMEDIATE", + [0x4A01] = "AP2_COLBAS_CONNECT", + [0x4A02] = "AP2_COLBAS_DISCONNECT", + [0x4A03] = "AP2_COLBAS_WRITE", + [0x4A04] = "AP2_COLBAS_ABORT", + [0x4A05] = "AP2_COLBAS_UPLOAD_BEGIN", + [0x4A06] = "AP2_COLBAS_UPLOAD_CONTINUE", + [0x4B01] = "AP2_BNEEO_ADD", + [0x4B02] = "AP2_BNEEO_REMOVE", + [0x4B03] = "AP2_BNEEO_LOOK", + [0x5000] = "AP2_EQS_ZONE_ADD", + [0x5001] = "AP2_EQS_ZONE_REMOVE", + [0x5002] = "AP2_EQS_ZONE_MODIFY", + [0x5003] = "AP2_EQS_ZONE_LOOK", + [0x5004] = "AP2_EQS_ZONE_ENABLE", + [0x5005] = "AP2_EQS_ZONE_DISABLE", + [0x5018] = "AP2_EQS_CMD_TABLE_ENTRY_ADD", + [0x5019] = "AP2_EQS_CMD_TABLE_ENTRY_MODIFY", + [0x501A] = "AP2_EQS_CMD_TABLE_ENTRY_REMOVE", + [0x501B] = "AP2_EQS_CMD_TABLE_ENTRY_LOOK", + [0x5020] = "AP2_EQS_MODE_ENTRY_ADD", + [0x5021] = "AP2_EQS_MODE_ENTRY_MODIFY", + [0x5022] = "AP2_EQS_MODE_ENTRY_REMOVE", + [0x5023] = "AP2_EQS_MODE_ENTRY_LOOK", + [0x5024] = "AP2_EQS_MODE_ENTRY_ENABLE", + [0x5025] = "AP2_EQS_MODE_ENTRY_DISABLE", + [0x5028] = "AP2_EQS_OVERRIDE_ADD", + [0x5029] = "AP2_EQS_OVERRIDE_MODIFY", + [0x502A] = "AP2_EQS_OVERRIDE_REMOVE", + [0x502B] = "AP2_EQS_OVERRIDE_LOOK", + [0x5035] = "AP2_EQS_DISPLAY_ZONE", + [0x5036] = "AP2_EQS_DISPLAY_MODE_ENTRY", + [0x5037] = "AP2_EQS_DISPLAY_CMD_TABLE", + [0x5038] = "AP2_EQS_ZONE_LOG", + [0x5039] = "AP2_EQS_DISPLAY_OVERRIDES", + [0x503A] = "AP2_EQS_SSTO_SETUP_GENERAL", + [0x503B] = "AP2_EQS_SSTO_SETUP_START", + [0x503C] = "AP2_EQS_SSTO_SETUP_STOP", + [0x503D] = "AP2_EQS_SSTO_SETUP_NIGHT", + [0x503E] = "AP2_EQS_SSTO_LOOK_GENERAL", + [0x503F] = "AP2_EQS_SSTO_LOOK_START", + [0x5040] = "AP2_EQS_SSTO_LOOK_STOP", + [0x5041] = "AP2_EQS_SSTO_LOOK_NIGHT", + [0x5042] = "AP2_EQS_SSTO_RESET", + [0x5043] = "AP2_EQS_SSTO_ENABLE", + [0x5044] = "AP2_EQS_SSTO_DISABLE", + [0x5050] = "AP2_EQS_SSTO_DISPLAY_GENERAL", + [0x5051] = "AP2_EQS_SSTO_DISPLAY_START", + [0x5052] = "AP2_EQS_SSTO_DISPLAY_STOP", + [0x5053] = "AP2_EQS_SSTO_DISPLAY_NIGHT", + [0x5054] = "AP2_EQS_MEMBER_LOG", + [0x5300] = "AP2_GLOBAL_IO_MODULE_DISPLAY", + [0x5301] = "AP2_GET_FLN_TOPOLOGY", + [0x5303] = "AP2_GLOBAL_IO_MODULE_DISPLAY_MEC_EXPBUS", + [0x5304] = "AP2_GET_MEC_EXPBUS_TOPOLOGY", + [0x5305] = "AP2_LOCAL_IO_MODULE_DISPLAY", + [0x5330] = "AP2_BACKUP_FLASH_DBASE", + [0x5331] = "AP2_RESTORE_FLASH_DBASE", + [0x5332] = "AP2_CLEAR_FLASH_DBASE", + [0x5351] = "AP2_HOA_MAP_MODIFY", + [0x5354] = "AP2_HOA_MAP_LOOK", + [0x5355] = "AP2_HOA_MAP_ADD", + [0x5356] = "AP2_DBCHANGE_HOA_MAP", + [0x700C] = "AP2_WS_APOGEEEDIT_GET_STATE", +} +-- Per-opcode expected body schema (struct-derived from the AP2 ASDU type set). +-- NOT a byte-level layout: it is the field list the request body SHOULD contain. +local OPSCHEMA = { + [0x0032] = "ownNodeNr:u8, coldstarted:bool", + [0x0034] = "node_changed:u8, node_table_event:Node_table_event, node_complete_state:Node_complete_state", + [0x0035] = "nrOfnode_table:u16, node_table:Node_complete_state[]", + [0x003E] = "change_node:u8", + [0x003F] = "change_node:u8", + [0x0041] = "new_node_address:u8, node_complete_state:Node_complete_state", + [0x0042] = "removed_node_address:u8, cold_start_removed_node:bool, scu_rev_8_filler:u8", + [0x0046] = "change_node:u8", + [0x0047] = "change_node:u8", + [0x005B] = "start_node:u16, end_node:u16, last_node:u16", + [0x010F] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0110] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, license_text:str", + [0x0111] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, app_name:str", + [0x0112] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0113] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0114] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0116] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, message:str", + [0x0120] = "baud_rate:Baud_rate", + [0x0121] = "baud_rate:Baud_rate", + [0x0123] = "baud_rate:Baud_rate", + [0x0124] = "baud_rate:Baud_rate", + [0x0125] = "baud_rate:Baud_rate", + [0x0126] = "baud_rate:Baud_rate", + [0x0127] = "pbus_enabled:bool", + [0x0128] = "new_address:u16", + [0x0129] = "modem_present:bool", + [0x012A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x012F] = "start_address:u32, nrOfnew_bytes:u16, new_bytes:Bytes_to_write[]", + [0x0130] = "start_address:u32, end_address:u32, last_address:u32", + [0x0136] = "nrOfp2_bytes:u16, p2_bytes:P2_bytes[]", + [0x0200] = "point:{tag_:u8,ldi:ldi_,ldo:ldo_,lai:lai_,lao:lao_,l2sl:l2sl_,looap:looap_,lpaci:lpaci_,l2sp:l2sp_,looal:looal_,lfssl:lfssl_,lfssp:lfssp_,ldao:ldao_,lenum:lenum_,lfmsl:lfmsl_,lfmsp:lfmsp_,ppcl_lai:ppcl_lai_}, lenum_address:{tag_:u8,not_present:-,present:present_}, user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, point_extension2:Point_extension2", + [0x0201] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0202] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0203] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0204] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0205] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0206] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0207] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0208] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0209] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x020A] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x020B] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x020C] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x020D] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x020E] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x020F] = "point_base:{point_type:Point_type,nrOfnames:u16,names:{name_space:Name_space,name:str,suffix:str}[],point_descriptor:Point_descriptor,access_class:Access_class,out_of_service:bool,failed:bool,control_status:Control_status,point_value:Point_value,point_priority:Point_priority,point_totalizer:{tag_:u8,disabled:-,enabled:enabled_},alarm_object:{tag_:u8,no_alarming:-,std_digital:std_digital_,std_single_analog:std_single_analog_,std_analog:std_analog_,enhanced_digital:enhanced_digital_,enhanced_analog:enhanced_analog_,enhanced_lenum:enhanced_lenum_,bacnet_alarm_analog:bacnet_alarm_analog_,bacnet...", + [0x0220] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0221] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, alarm_level:Alarm_levels", + [0x0222] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, control_status:Control_status", + [0x0223] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0224] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0225] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, point_priority:Point_priority", + [0x0226] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0227] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, point_type:Point_type", + [0x0228] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0229] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x022A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x022B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x022C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0240] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, point_value:Point_value, point_priority:Point_priority", + [0x0241] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, point_priority:Point_priority", + [0x0242] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0243] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0244] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0245] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0246] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0247] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0248] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, point_value:Point_value, point_priority:Point_priority", + [0x0249] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, low_alarm_limit:f32", + [0x024A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, high_alarm_limit:f32", + [0x024B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, reset_what:reset_what_", + [0x024C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x024D] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x024E] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0261] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0262] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0263] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0264] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, lan_choice:lan_choice_, drop_choice:drop_choice_, point_choice:point_choice_, bSubpoints:bool, last_lan:u8, last_drop:u8, last_point:u16, last_name:{name_space:Name_space,name:str,suffix:str}", + [0x0265] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0271] = "name_response:{name_space:Name_space,name:str,suffix:str}, cov_mask:Cov_mask", + [0x0272] = "name_response:{name_space:Name_space,name:str,suffix:str}", + [0x0273] = "name_response:{name_space:Name_space,name:str,suffix:str}, cov_mask:Cov_mask", + [0x0274] = "nrOfannunciate_request:u16, annunciate_request:{name_response:{name_space:Name_space,name:str,suffix:str},value:f32,point_priority:Point_priority,control_status:Control_status,out_of_service:bool,failed:bool,proof_on:bool,operator_disabled:bool,program_disabled:bool,commanded_to_alarm:bool,alarm_state:Alarm_state,alarm_priority:Alarm_priority}[]", + [0x0275] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0280] = "name_response:{name_space:Name_space,name:str,suffix:str}", + [0x0281] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0290] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, nrOftrend_setups:u16, trend_setups:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}[]", + [0x0291] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, which_trend:which_trend_", + [0x0292] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0293] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0294] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0295] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, trend_specifier:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}, last_sequence_number:u32, last_date_time:datetime, max_samples:u16", + [0x0299] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, trend_specifier:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}, new_trend_specifier:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}", + [0x029B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, nrOftrend_setups:u16, trend_setups:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}[]", + [0x029C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x02A0] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, nrOftrend_setups:u16, trend_setups:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}[]", + [0x02A1] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, trend_specifier:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}, max_samples:u16", + [0x02A5] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, nrOftrend_setups:u16, trend_setups:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}[], nrOftrend_event_setups:u16, trend_event_setups:{using_trend_archive:bool,highwater_level:u16,trend_by_event:{tag_:u8,no_trigger:-,event_trigger:event_trigger_}}[]", + [0x02A6] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, trend_specifier:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}, new_trend_specifier:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}, trend_by_event:{using_trend_archive:bool,highwater_level:u16,trend_by_event:{tag_:u8,no_trigger:-,event_trigger:event_trigger_}}, new_trend_by_event:{using_trend_ar...", + [0x02A8] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, nrOftrend_setups:u16, trend_setups:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}[], nrOftrend_event_setups:u16, trend_event_setups:{using_trend_archive:bool,highwater_level:u16,trend_by_event:{tag_:u8,no_trigger:-,event_trigger:event_trigger_}}[]", + [0x02E0] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, total_rate:Total_rate", + [0x02E1] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x02E2] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0301] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0302] = "bln_network_time:{year:u8,month:u8,dayofmonth:u8,dayofweek:u8,hours:u8,minutes:u8,seconds:u8,tics:u8}, tics_per_second:u16", + [0x0303] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, message:str", + [0x030F] = "lan:u8, drop:u16, nrOftx_buffer:u16, tx_buffer:Data_byte[]", + [0x0313] = "name:str, p1_command:u8, nrOftx_buffer:u16, tx_buffer:Data_byte[]", + [0x0314] = "lan:u8, drop:u8, p1_command:u8, nrOftx_buffer:u16, tx_buffer:Data_byte[]", + [0x0317] = "lan_number:u8, drop_number:u8, all_drops:bool", + [0x0325] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, logger_state:bool", + [0x0327] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, buffer_state:bool", + [0x0330] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, initials_pattern:str, last_initials:str", + [0x0331] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, initials_pattern:str, last_initials:str", + [0x0332] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, user_account:{initials:str,long_name:str,password:str,autologoff_enabled:bool,autologoff_delay:u16,language_ID:Language_ID,date_format:str,time_format:str,user_command_priority:User_command_priority,name_space:Name_space,access_class:BITSTRING32,nrOffunctional_accesses:u16,functional_accesses:{user_access_functions:User_access_functions,user_access_priority:User_access_priority}[]}, password_expire_ext:{strike_count:u8,expire_limit:u16,expire_date:datetime}, is_pxm10tiny_autologin_acct:bool", + [0x0333] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, user_account:{initials:str,long_name:str,password:str,autologoff_enabled:bool,autologoff_delay:u16,language_ID:Language_ID,date_format:str,time_format:str,user_command_priority:User_command_priority,name_space:Name_space,access_class:BITSTRING32,nrOffunctional_accesses:u16,functional_accesses:{user_access_functions:User_access_functions,user_access_priority:User_access_priority}[]}, password_expire_ext:{strike_count:u8,expire_limit:u16,expire_date:datetime}, is_pxm10tiny_autologin_acct:bool", + [0x0335] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, initials_pattern:str, last_initials:str", + [0x0336] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, initials_pattern:str, last_initials:str", + [0x0338] = "user_Account_DB:{nrOfuser_accounts:u16,user_accounts:{initials:str,long_name:str,password:str,autologoff_enabled:bool,autologoff_delay:u16,language_ID:Language_ID,date_format:str,time_format:str,user_command_priority:User_command_priority,name_space:Name_space,access_class:BITSTRING32,nrOffunctional_accesses:u16,functional_accesses:Functional_access[]}[]}, nrOfpassword_expire_db_ext:u16, password_expire_db_ext:{initials:str,password_expire_ext:{strike_count:u8,expire_limit:u16,expire_date:datetime}}[]", + [0x0350] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0353] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, access_group:{access_class_num:u8,description:str}", + [0x0358] = "access_group_DB:{nrOfaccess_groups:u16,access_groups:{access_class_num:u8,description:str}[]}", + [0x0360] = "ems_range_req:{begin_EMS_number:u16,end_EMS_number:u16}", + [0x0361] = "ems_range_req:{begin_EMS_number:u16,end_EMS_number:u16}", + [0x0362] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, ems_database:{nrOfems_entries:u16,ems_entries:{message_number:u16,category:u16,bring_on_remote:bool}[]}", + [0x0364] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0365] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, ems_entry:{message_number:u16,category:u16,bring_on_remote:bool}", + [0x0401] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, enum_type:{type_id:i16,type_name:str,nrOfelements:u16,elements:{value:i16,value_text:str}[]}", + [0x0402] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, enum_type_id:i16", + [0x0403] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0404] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_pattern:str, last_pattern:str", + [0x0405] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, enum_type_name:str", + [0x0406] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_pattern:str, last_pattern:str", + [0x0407] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, enum_type_id:i16, nrOfenum_elements:u16, enum_elements:{value:i16,value_text:str}[]", + [0x0408] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, enum_type_id:i16, value:i16", + [0x0409] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, enum_type_id:i16, value:i16, new_value_text:str", + [0x040A] = "last_enum_type_id:i16", + [0x040B] = "begin_type_id:i16, end_type_id:i16, enum_type:{type_id:i16,type_name:str,nrOfelements:u16,elements:{value:i16,value_text:str}[]}", + [0x040E] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, enum_type:{type_id:i16,type_name:str,nrOfelements:u16,elements:{value:i16,value_text:str}[]}", + [0x0500] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_response:{name_space:Name_space,name:str,suffix:str}, mode_name:str, mode_suffix:str, normal_acks:bool, alarmcnt2:bool, level_delay:u16, mode_delay:u16, differential:f32, category0:u8, category1:u8, category2:u8, category3:u8", + [0x0501] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_response:{name_space:Name_space,name:str,suffix:str}", + [0x0504] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0505] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0506] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_response:{name_space:Name_space,name:str,suffix:str}, mode_name:str, mode_suffix:str, normal_acks:bool, alarmcnt2:bool, level_delay:u16, mode_delay:u16, differential:f32, category0:u8, category1:u8, category2:u8, category3:u8", + [0x0507] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_response:{name_space:Name_space,name:str,suffix:str}, mode_name:str, mode_suffix:str, normal_acks:bool, alarmcnt2:bool, level_delay:u16, mode_delay:u16, differential:f32, category0:u8, category1:u8, category2:u8, category3:u8", + [0x0508] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, point:{tag_:u8,ldi:ldi_,ldo:ldo_,lai:lai_,lao:lao_,l2sl:l2sl_,looap:looap_,lpaci:lpaci_,l2sp:l2sp_,looal:looal_,lfssl:lfssl_,lfssp:lfssp_,ldao:ldao_,lenum:lenum_,lfmsl:lfmsl_,lfmsp:lfmsp_,ppcl_lai:ppcl_lai_}, alarm_message_node:u8, alarm_message_number:u16, alarm_message:str, lenum_address:{tag_:u8,not_present:-,present:present_}, nrOfalarm_buffer:u16, alarm_buffer:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},point:{tag_:u8,ldi:ldi_,ldo:ldo_,lai:lai_,lao:lao_,l2sl...", + [0x0509] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x050A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x050B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, mode_name:str", + [0x050C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, category:u16", + [0x050D] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0520] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_single:{name_space:Name_space,name:str,suffix:str}, setpoint_name:str, setpoint_suffix:str, alarm_mode:{mode_number:u8,set_point:f32,nrOflevels:u16,levels:{offset:f32,alarm_priority:Alarm_priority,category:u8,msg_number:u16}[]}", + [0x0521] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_single:{name_space:Name_space,name:str,suffix:str}, setpoint_name:str, setpoint_suffix:str, alarm_mode:{mode_number:u8,set_point:f32,nrOflevels:u16,levels:{offset:f32,alarm_priority:Alarm_priority,category:u8,msg_number:u16}[]}", + [0x0522] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u16, alarm_priority:Alarm_priority", + [0x0523] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u16, alarm_priority:Alarm_priority", + [0x0524] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u16, setpoint_value:f32", + [0x0525] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u16", + [0x0526] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u8", + [0x0528] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_single:{name_space:Name_space,name:str,suffix:str}, setpoint_name:str, setpoint_suffix:str, alarm_mode:{mode_number:u8,set_point:f32,nrOflevels:u16,levels:{offset:f32,alarm_priority:Alarm_priority,category:u8,msg_number:u16}[]}", + [0x0529] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, current_mode:u16", + [0x052B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_single:{name_space:Name_space,name:str,suffix:str}, alarm_mode_type:Alarm_mode_type", + [0x052C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u16, category:u8", + [0x052D] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u16, message_number:u8", + [0x0530] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u16", + [0x0540] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, category:{category_id:u8,description:str,dial_enabled:bool,printing_enabled:bool,nrOfnodes_bits:u16,nodes_bits:Node_bits[]}", + [0x0541] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, first_category_id:u8, last_category_id:u8", + [0x0542] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, category_id:u8, new_description:str", + [0x0543] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, first_category:u8, last_category:u8", + [0x0544] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, first_category:u8, last_category:u8", + [0x0545] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, first_category:u8, last_category:u8", + [0x0546] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, first_category:u8, last_category:u8", + [0x0547] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_category:u8, end_category:u8, last_category:u8", + [0x0548] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_category:u8, end_category:u8, last_category:u8", + [0x0549] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, category_id:u8, nrOfnode_bits:u16, node_bits:Node_bits[]", + [0x054A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, category_id:u8, nrOfnode_bits:u16, node_bits:Node_bits[]", + [0x054B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_category:u8, end_category:u8, last_category:u8", + [0x054C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_category:u8, end_category:u8, last_category:u8", + [0x054D] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, category:{category_id:u8,description:str,dial_enabled:bool,printing_enabled:bool,nrOfnodes_bits:u16,nodes_bits:Node_bits[]}", + [0x0560] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_message_id:u16, end_message_id:u16, last_message_id:u16", + [0x0561] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_message_id:u16, end_message_id:u16", + [0x0562] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_message_id:u16, end_message_id:u16", + [0x0563] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_message_id:u16, end_message_id:u16", + [0x0564] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, alarm_message:{enabled:bool,msg_number:u16,message:str}", + [0x0565] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, alarm_message:{enabled:bool,msg_number:u16,message:str}", + [0x0566] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, message_id:u16", + [0x0567] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_message_id:u16, end_message_id:u16, last_message_id:u16", + [0x0568] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, begin_message_id:u16, end_message_id:u16, last_message_id:u16", + [0x056A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, alarm_message:{enabled:bool,msg_number:u16,message:str}", + [0x0600] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, calendar_entry:{date_type:Date_type,the_date:date}", + [0x0601] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, date_to_reset:date", + [0x0602] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, nrOfcalendar_db:u16, calendar_db:{date_type:Date_type,the_date:date}[]", + [0x0603] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0604] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0605] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0606] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0610] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, dst_entry:{spring_date:datetime,fall_date:datetime}", + [0x0611] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, reset_year:date", + [0x0612] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, nrOfdst_pairs:u16, dst_pairs:{spring_date:datetime,fall_date:datetime}[]", + [0x0613] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0614] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x0961] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0962] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0963] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u8", + [0x0964] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, trend_specifier:{number_of_samples:u16,trend_type:{tag_:u8,point_cov:-,trend_cov:trend_cov_,time:time_}}", + [0x0965] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, last_line_returned:u16", + [0x0966] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x0967] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x0968] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, eqs_start_where:{tag_:u8,beginning:-,last_mode:i16}", + [0x0969] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, last_entry_id:i32", + [0x096B] = "last_alarm_msg_id:u16", + [0x0971] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0972] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0973] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u8", + [0x0974] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0975] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, last_line_returned:u16", + [0x0976] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x0977] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x0978] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, eqs_start_where:{tag_:u8,beginning:-,last_mode:i16}", + [0x0979] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, entry_ID:i32, last_entry_ID:i32, state_text_ID:i16", + [0x097B] = "begin_message_id:u16, end_message_id:u16, last_message_id:u16", + [0x097C] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x097D] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x097E] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x097F] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x0981] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0982] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0983] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_mode:u8", + [0x0984] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x0985] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, last_line_returned:u16", + [0x0986] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x0987] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x0988] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, eqs_start_where:{tag_:u8,beginning:-,last_mode:i16}", + [0x0989] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, entry_ID:i32, last_entry_ID:i32, state_text_ID:i16", + [0x098B] = "begin_message_id:u16, end_message_id:u16, last_message_id:u16", + [0x098C] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x098D] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x098E] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x098F] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x099E] = "port_request:{begin_port_number:u8,end_port_number:u8,last_port_number:u8}", + [0x099F] = "port_request:{begin_port_number:u8,end_port_number:u8,last_port_number:u8}", + [0x09A1] = "last_partner_id:u16", + [0x09A2] = "partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x09A3] = "partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x09A5] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, last_xoverride_entry_id:i32", + [0x09A6] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, last_xoverride_ID:i32", + [0x09A7] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, last_xoverride_ID:i32", + [0x09A9] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x09AA] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x09AB] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x09B9] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x09BA] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x09BB] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x09C1] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x09C2] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x09C3] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x3800] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_record:{partner_log:{number:u16,enabled:bool,device_type:Device_type,descriptor:str,insight_node_number:u16},host_id:str,nrOfpartner_numbers:u16,partner_numbers:{phone_number:str}[],flex_string:str,full_flex_string:str}", + [0x3802] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x3803] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x3804] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x3805] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x3806] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x3807] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x3808] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_record:{partner_log:{number:u16,enabled:bool,device_type:Device_type,descriptor:str,insight_node_number:u16},host_id:str,nrOfpartner_numbers:u16,partner_numbers:{phone_number:str}[],flex_string:str,full_flex_string:str}", + [0x3809] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x380A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, partner_request:{begin_partner_number:u16,end_partner_number:u16,last_partner_number:u16}", + [0x3814] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, port_request:{begin_port_number:u8,end_port_number:u8,last_port_number:u8}", + [0x3817] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, port_request:{begin_port_number:u8,end_port_number:u8,last_port_number:u8}", + [0x3818] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, port_log:{port_number:Port_number,port_status:{descriptor:str,baud_rate:Baud_rate,highlight_enabled:bool,autobye_enabled:bool,alarm_printing_enabled:bool,report_printing_enabled:bool,port_type:Port_type,my_site_id:str,AdvancedPortString:str,AdvancedSystemString:str,DiagPortString:str,DiagSystemString:str,PortName:str}}", + [0x3819] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, port_request:{begin_port_number:u8,end_port_number:u8,last_port_number:u8}", + [0x381A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, port_request:{begin_port_number:u8,end_port_number:u8,last_port_number:u8}", + [0x4000] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4001] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, description:str, default_member:u16, default_report:u16, member_count:u16, report_count:u16, dynamic:bool, extended_team_desc:{tag_:u8,no_extension:-,LON_extension:LON_extension_,MSTP_extension:-}", + [0x4002] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, def_analog_add:{member_desc_base:{member_number:u16,nrOfteam_suffix:u16,team_suffix:Team_Suffix[],member_desc:str,point_type:Point_type,virtual_pt:bool,alarmable:bool,reference_type:Reference_Type,totalize:bool,print_alarms:bool,total_scale:Total_rate,includeInCount2:bool},english_units:str,english_init_val:f32,english_low_alarm:f32,english_high_alarm:f32,si_units:str,si_init_val:f32,si_low_alarm:f32,si_high_alarm:f32,representation:Representation}, analog_team_scale:{scale:scale_}, extended_team_member:{tag_:u...", + [0x4003] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, def_digital_add:{member_desc_base:{member_number:u16,nrOfteam_suffix:u16,team_suffix:Team_Suffix[],member_desc:str,point_type:Point_type,virtual_pt:bool,alarmable:bool,reference_type:Reference_Type,totalize:bool,print_alarms:bool,total_scale:Total_rate,includeInCount2:bool},initial_value:f32,state_text_table:State_text_table}, inverted:bool, extended_team_member:{tag_:u8,no_extension:-,LON_extension:LON_extension_,MSTP_extension:MSTP_extension_}", + [0x4004] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, def_enum_add:{member_desc_base:{member_number:u16,nrOfteam_suffix:u16,team_suffix:Team_Suffix[],member_desc:str,point_type:Point_type,virtual_pt:bool,alarmable:bool,reference_type:Reference_Type,totalize:bool,print_alarms:bool,total_scale:Total_rate,includeInCount2:bool},initial_value:f32,state_text_table:State_text_table}, extended_team_member:{tag_:u8,no_extension:-,LON_extension:LON_extension_,MSTP_extension:MSTP_extension_}", + [0x4005] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, def_analog_add:{member_desc_base:{member_number:u16,nrOfteam_suffix:u16,team_suffix:Team_Suffix[],member_desc:str,point_type:Point_type,virtual_pt:bool,alarmable:bool,reference_type:Reference_Type,totalize:bool,print_alarms:bool,total_scale:Total_rate,includeInCount2:bool},english_units:str,english_init_val:f32,english_low_alarm:f32,english_high_alarm:f32,si_units:str,si_init_val:f32,si_low_alarm:f32,si_high_alarm:f32,representation:Representation}, count_both_edges:bool, si_gain:f32, si_cov_limit:f32, english_...", + [0x4006] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, def_digital_add:{member_desc_base:{member_number:u16,nrOfteam_suffix:u16,team_suffix:Team_Suffix[],member_desc:str,point_type:Point_type,virtual_pt:bool,alarmable:bool,reference_type:Reference_Type,totalize:bool,print_alarms:bool,total_scale:Total_rate,includeInCount2:bool},initial_value:f32,state_text_table:State_text_table}, inverted:bool, proof_delay:u16, slavenumber:i16, slaveinverted:bool, extended_team_member:{tag_:u8,no_extension:-,LON_extension:LON_extension_,MSTP_extension:MSTP_extension_}", + [0x400B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x400C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x400D] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, report_name_pattern:str, last_report_name:str", + [0x400F] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, last_team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}", + [0x4010] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, member_number:u16, last_member_number:u16", + [0x4017] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, last_team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}", + [0x4018] = "team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16}, member_number:u16, last_member_number:u16", + [0x4100] = "ppcl_data:{name_space:Name_space,name:str,line_status:str,line_text:str,line_number:u16,line_enabled:bool,line_traced:bool,line_unresolved:bool,line_failed:bool,line_looped:bool}, user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x4101] = "program_name:str", + [0x4103] = "ppcl_range:{name_space:Name_space,name:str,first_line:u16,last_line:u16}, user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x4104] = "ppcl_range:{name_space:Name_space,name:str,first_line:u16,last_line:u16}", + [0x4105] = "ppcl_range:{name_space:Name_space,name:str,first_line:u16,last_line:u16}", + [0x4106] = "ppcl_range:{name_space:Name_space,name:str,first_line:u16,last_line:u16}", + [0x4107] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4108] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, begin_line_number:u16, end_line_number:u16, last_line_returned:u16, point_name:str, nrOfStatement_types:u16, Statement_types:PPCL_statement_type[]", + [0x4109] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x410A] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, begin_line_number:u16, end_line_number:u16, last_line_returned:u16", + [0x410B] = "ppcl_data:{name_space:Name_space,name:str,line_status:str,line_text:str,line_number:u16,line_enabled:bool,line_traced:bool,line_unresolved:bool,line_failed:bool,line_looped:bool}, old_line_number:u16, user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x410E] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, begin_line_number:u16, end_line_number:u16, last_line_returned:u16", + [0x410F] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, meter_area:u16", + [0x4110] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, meter_area:u16", + [0x4111] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, meter_area:u16, last_state:Last_state", + [0x412A] = "team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, begin_line_number:u16, end_line_number:u16, last_line_returned:u16", + [0x4131] = "program_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4132] = "program_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4133] = "program_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4134] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, program:{name_space:Name_space,program_name:str,base_instance_number:u32,instance_range:u32,priority_for_writing:u32}", + [0x4135] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_space:Name_space, program_name:str", + [0x4137] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, program_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4200] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:i16", + [0x4201] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, tec_body:{team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16},nrOfnames:u16,names:{name_space:Name_space,name:str}[],descriptor:str,access_class:Access_class,si_units:bool,lan:u8,drop:u8,duct_available:{tag_:u8,no_duct:-,use_duct:use_duct_},nightOverride:u8,added_to_database:bool,initialized:bool,is_valid:TEC_valid,failed_status:Failed_status,nrOfinitial_values:u16,initial_values:{member_number:u16,initial_value:f32}[],nrOfrechar_values:u16,rechar_values:{member_number:u16,logi...", + [0x4202] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, tec_body:{team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16},nrOfnames:u16,names:{name_space:Name_space,name:str}[],descriptor:str,access_class:Access_class,si_units:bool,lan:u8,drop:u8,duct_available:{tag_:u8,no_duct:-,use_duct:use_duct_},nightOverride:u8,added_to_database:bool,initialized:bool,is_valid:TEC_valid,failed_status:Failed_status,nrOfinitial_values:u16,initial_values:{member_number:u16,initial_value:f32}[],nrOfrechar_values:u16,rechar_values:{member_number:u16,logi...", + [0x4203] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, tec_body:{team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16},nrOfnames:u16,names:{name_space:Name_space,name:str}[],descriptor:str,access_class:Access_class,si_units:bool,lan:u8,drop:u8,duct_available:{tag_:u8,no_duct:-,use_duct:use_duct_},nightOverride:u8,added_to_database:bool,initialized:bool,is_valid:TEC_valid,failed_status:Failed_status,nrOfinitial_values:u16,initial_values:{member_number:u16,initial_value:f32}[],nrOfrechar_values:u16,rechar_values:{member_number:u16,logi...", + [0x4204] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4205] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4206] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4208] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4210] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, suffix_is_number:bool, member_number:u16", + [0x4211] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, suffix_is_number:bool, report_number:u16", + [0x4212] = "query:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str},last_suffix:str,application_number:u16}", + [0x4220] = "def_TEC_app:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},application_family:Application_family,team_type:u16,name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str},all_init_values:bool}", + [0x4221] = "def_TEC_app:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},application_family:Application_family,team_type:u16,name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str},all_init_values:bool}", + [0x4222] = "set:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str},application_number:u16,suffix_is_number:bool}, member_number:u16, initial_value:f32", + [0x4223] = "restore:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str},application_number:u16,suffix_is_number:bool}, member_number:u16", + [0x4224] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:u16, clear_panel_initvals:bool, clear_device_initvals:bool", + [0x4225] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:u16", + [0x4230] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, lan_or_device:{tag_:u8,one_device:one_device_,whole_lan:whole_lan_}", + [0x4231] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, lan_or_device:{tag_:u8,one_device:one_device_,whole_lan:whole_lan_}", + [0x4232] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, which_lan:{tag_:u8,all_lans:-,one_lan:one_lan_}, which_drop:{tag_:u8,all_drops:-,one_drop:one_drop_}, last_lan:u8, last_drop:u8", + [0x4241] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, uc_body:{team_description_base:{team_family:Application_family,team_type:u16,team_revision:u16},nrOfnames:u16,names:{name_space:Name_space,name:str}[],descriptor:str,access_class:BITSTRING32,lan:u8,drop:u8,added_to_database:bool,initialized:bool,is_valid:Uc_is_valid,failed_status:Uc_failed_status,nrOfrechar_values:u16,rechar_values:{member_number:u16,logical_value:f32,point_priority:Point_priority,control_status:Control_status}[],is_bacnet:{tag_:u8,BACnetNo:-,BACnetYes:BACnetYes_}}", + [0x4244] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4245] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x4249] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x4300] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:i16", + [0x4301] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, lon_body:{team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16},nrOfnames:u16,names:{name_space:Name_space,name:str}[],descriptor:str,access_class:BITSTRING32,si_units:bool,lan:u8,drop:u8,added_to_database:bool,initialized:bool,is_valid:TEC_valid,failed_status:Failed_status,nrOfinitial_values:u16,initial_values:{member_number:u16,initial_value:f32}[],nrOfrechar_values:u16,rechar_values:{member_number:u16,logical_value:f32,point_priority:Point_priority,control_status:Control_statu...", + [0x4303] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, lon_body:{team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16},nrOfnames:u16,names:{name_space:Name_space,name:str}[],descriptor:str,access_class:BITSTRING32,si_units:bool,lan:u8,drop:u8,added_to_database:bool,initialized:bool,is_valid:TEC_valid,failed_status:Failed_status,nrOfinitial_values:u16,initial_values:{member_number:u16,initial_value:f32}[],nrOfrechar_values:u16,rechar_values:{member_number:u16,logical_value:f32,point_priority:Point_priority,control_status:Control_statu...", + [0x4304] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:i16", + [0x4310] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, suffix_is_number:bool, member_number:u16", + [0x4311] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, suffix_is_number:bool, report_number:u16", + [0x4320] = "def_LON_app:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},application_family:Application_family,team_type:u16,name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str},all_init_values:bool}", + [0x4321] = "def_LON_app:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},application_family:Application_family,team_type:u16,name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str},all_init_values:bool}", + [0x4322] = "set:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str},application_number:u16,suffix_is_number:bool}, member_number:u16, initial_value:f32", + [0x4323] = "restore:{user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class},name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str},application_number:u16,suffix_is_number:bool}, member_number:u16", + [0x4324] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:u16, clear_panel_initvals:bool, clear_device_initvals:bool", + [0x4325] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:u16", + [0x4332] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, subnet_choice:{tag_:u8,all_subnets:-,single_subnet:u8}, node_choice:{tag_:u8,all_nodes:-,single_node:u8}, last_subnet:u8, last_node:u8", + [0x4402] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, m_local:{tag_:u8,remote_is_set:remote_is_set_,local_is_set:-}", + [0x4403] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, nrOflon_domain:u16, lon_domain:{domain_index:u8,nrOfdomain_id:u16,domain_id:{data:u8}[],subnet:u8,node:u8}[]", + [0x4452] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x4621] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, node_name:str, site_name:str, bln_name:str, ip_addr_settings:{dhcp:dhcp_,dns:dns_,nrOfapp_ports:u16,app_ports:u16[],nrOfmulticast:u16,multicast:{mc_addr:u32,mc_port:u16}[],smtp_server:smtp_server_,telnet_enabled:bool,dynamic_dns:dynamic_dns_}, bacnetSettings:{tag_:u8,noBacnet:-,yesBacnet:yesBacnet_}, bacnet_ip_aln_choice:bool, bacnet_ip_network_number:u16, BACnetMSTPALNSettings:{tag_:u8,noMSTPALN:-,yesMSTPALN:yesMSTPALN_}, BACnetMSTPFLNSettings:{tag_:u8,noBACnetFLNs:-,yesBACnetFLNs:yesBACnetFLNs_}", + [0x4628] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, bln_name:str, intrasite_eping_period:u32, intrasite_eping_timeout:u32, intersite_eping_period:u32, intersite_eping_timeout:u32, intrasite_notif_repl_period:u32, intrasite_poll_repl_period:u32, intrasite_repl_cycle_timeout:u32, intersite_notif_repl_period:u32, intersite_poll_repl_period:u32, intersite_repl_cycl_timeout:u32, tombstone_lifetime:u32, holdback_delay:u32", + [0x4629] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x462A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, site_name:str", + [0x462B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, bln_name:str", + [0x462D] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, hosttable_entry:{node_name:str,ip_address:u32}", + [0x462E] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, node_name:str", + [0x462F] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, last_name:str", + [0x4634] = "reconciliation:u16, high_watermark:u32, nrOfutdv_array:u16, utdv_array:{originating_node:str,originating_usn:u32}[], changes_max_size:u32", + [0x4635] = "changes_max_size:u32, srce_cycle_number:u16, srce_cycle_pdu_number:u16", + [0x4636] = "reconciliation:u16, boc_usn_changed:u32, more_data:bool, srce_cycle_number:u16, srce_cycle_pdu_number:u16, nrOfutdv_array:u16, utdv_array:{originating_node:str,originating_usn:u32}[], nrOfgrain_array:u16, grain_array:{repl_guid:str,usn_changed:u32,repl_cmd_type:Repl_Cmd_Type,grain_type:Grain_Type,entry_id:str,nrOfblob:u16,blob:{k__BackingField:SByte}[],grain_version:u32,orig_time:u32,orig_node:str,orig_usn:u32}[]", + [0x4637] = "name_single:{name_space:Name_space,name:str,suffix:str}", + [0x4640] = "enode:{node_name:str,site_name:str,bln_name:str,failed:bool,ready:bool,replication_online:bool,reresolve_all:bool,reresolve_unresolved:bool,spare1:u32,baseTime:u32,offset:u16,dst_flag:bool}", + [0x4644] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x4645] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x482A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_priority_entry:{app_id:u8,bacnet_priority:u8}", + [0x482B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, app_id:u8", + [0x482C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, last_app_id:u8", + [0x482E] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, device_id:str, object_id:str, device_name:str, object_name:str, mac_address:str, option_string:str", + [0x482F] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, device_id:str, object_id:str", + [0x4838] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, point_name:{name_space:Name_space,name:str,suffix:str}, log_object:{object_Identifier:u32,object_Name:str,object_Type:u16,description:str,log_Enabled:bool,start_Time:datetime,stop_Time:datetime,log_deviceObjectProperty:{objectIdentifier:u32,propertyIdentifier:u32,propertyArrayIndex:u32,deviceIdentifer:u32},log_interval:u32,COV_Resubscription_Interval:u32,client_COV_Increment:client_COV_Increment_,stop_When_Full:bool,buffer_Size:u32,record_Count:u32,total_Record_Count:u32,notification_Threshold:u32,records...", + [0x4839] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, object_Identifier:u32", + [0x483A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, point_name:{name_space:Name_space,name:str,suffix:str}, log_object:{object_Identifier:u32,object_Name:str,object_Type:u16,description:str,log_Enabled:bool,start_Time:datetime,stop_Time:datetime,log_deviceObjectProperty:{objectIdentifier:u32,propertyIdentifier:u32,propertyArrayIndex:u32,deviceIdentifer:u32},log_interval:u32,COV_Resubscription_Interval:u32,client_COV_Increment:client_COV_Increment_,stop_When_Full:bool,buffer_Size:u32,record_Count:u32,total_Record_Count:u32,notification_Threshold:u32,records...", + [0x4842] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_Object_Identifer:u32", + [0x4844] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_Object_Identifer:u32", + [0x4845] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_Object_Identifer:u32", + [0x4846] = "name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, last_Object_Identifer:u32", + [0x4878] = "last_object_id:u32", + [0x4879] = "last_object_id:u32", + [0x4960] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, baud_rate:BAC_Baud_rate, mstp_network_number:u16, mstp_node_number:u8, keep_alive_poll_rate:u16, discovery_poll_rate:u16", + [0x4961] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, BACnet_MSTP_LAN:BACnet_MSTP_LAN_", + [0x4963] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, body:{team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16},nrOfnames:u16,names:{name_space:Name_space,name:str}[],descriptor:str,access_class:Access_class,is_master:{is_master:bool},device:{instance_number:u32,network_number:u16,mac_address:Mac_Address,failed:bool},added_to_database:bool,initialized:bool,is_valid:TEC_valid,nrOfinitial_values:u16,initial_values:{member_number:u16,initial_value:f32,xoverride:bool}[],initial_value_priority:u8,save_relinquish_default:bool,bacnet_pas...", + [0x4965] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, body:{team_desc_base:{team_family:Application_family,team_type:u16,team_revision:u16},nrOfnames:u16,names:{name_space:Name_space,name:str}[],descriptor:str,access_class:Access_class,is_master:{is_master:bool},device:{instance_number:u32,network_number:u16,mac_address:Mac_Address,failed:bool},added_to_database:bool,initialized:bool,is_valid:TEC_valid,nrOfinitial_values:u16,initial_values:{member_number:u16,initial_value:f32,xoverride:bool}[],initial_value_priority:u8,save_relinquish_default:bool,bacnet_pas...", + [0x4966] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:i16", + [0x4967] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:i16", + [0x496B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x496E] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x4970] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, application_number:u16, initial_value:f32", + [0x4971] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, application_number:u16", + [0x4972] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:u16, clear_panel_initvals:bool, clear_device_initvals:bool", + [0x4973] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, application_number:u16", + [0x4B01] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, log_object:{object_instance_number:u32,object_Type:u16,object_Name:str,description:str,log_deviceObjectProperty:{object_instance_number:u32,object_Type:u16,propertyIdentifier:u8,propertyArrayIndex:u8,device_present:bool,device_instance_number:u32,device_type:u16},eventType:u8,eventState:u16,notification_Class:u32,eventEnable:u8,ackedTransitions:u8,notifyType:u8,alarmmessage_Number:u16,eventresolved:u16,event_Time_Stamps:{AlarmTimeStamp:datetime,FaultTimeStamp:datetime,NormalTimeStamp:datetime},event_param...", + [0x4B02] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, searchbyname:bool, objectIDbegin:u32, objectIDend:u32, objectIDlast:u32", + [0x4B03] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, objectIDbegin:u32", + [0x5000] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, eqs_zone_definition:{nrOfnames:u16,names:{name_space:Name_space,name:str}[],eqs_zone_data:{zone_enabled:bool,description:str,access_class:Access_class,min_off_time:u16,recmd_after_warmstart:bool,warmstart_delay:u16,state_text_table:State_text_table,default_mode:i16,english_units:bool,optimization_osv:bool},nrOfrecharacterization_values:u16,recharacterization_values:{member_number:u16,logical_value:f32,point_priority:Point_priority,control_status:Control_status}[]}", + [0x5001] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5002] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, eqs_zone_definition:{nrOfnames:u16,names:{name_space:Name_space,name:str}[],eqs_zone_data:{zone_enabled:bool,description:str,access_class:Access_class,min_off_time:u16,recmd_after_warmstart:bool,warmstart_delay:u16,state_text_table:State_text_table,default_mode:i16,english_units:bool,optimization_osv:bool},nrOfrecharacterization_values:u16,recharacterization_values:{member_number:u16,logical_value:f32,point_priority:Point_priority,control_status:Control_status}[]}", + [0x5003] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5004] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5005] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5018] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, eqs_cmd_table_sequence:{name_team:{name_space:Name_space,name:str},name_name:{name_space:Name_space,name:str,suffix:str},nrOfcmd_table_entries:u16,cmd_table_entries:{mode:i16,command_value:f32,command_offset:u16}[]}", + [0x5019] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, eqs_cmd_table_entry:{name_team:{name_space:Name_space,name:str},name_name:{name_space:Name_space,name:str,suffix:str},eqs_cmd_table_data:{mode:i16,command_value:f32,command_offset:u16}}", + [0x501A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_response:{name_space:Name_space,name:str}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, mode:{tag_:u8,all_modes:-,one_mode:i16}", + [0x501B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}, eqs_start_where:{tag_:u8,beginning:-,last_mode:i16}", + [0x5020] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, eqs_mode_entry:{name:{name_space:Name_space,name:str},eqs_mode_data:{entry_ID:i32,entry_enabled:bool,mode:i16,occurrence:Occurrence,scheduled_days:Schedule_days,start_date:date,end_date:date,start_time:time,stop_time:time,days_spanned:u8,exclusive:bool}}", + [0x5021] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, eqs_mode_entry:{name:{name_space:Name_space,name:str},eqs_mode_data:{entry_ID:i32,entry_enabled:bool,mode:i16,occurrence:Occurrence,scheduled_days:Schedule_days,start_date:date,end_date:date,start_time:time,stop_time:time,days_spanned:u8,exclusive:bool}}", + [0x5022] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_response:{name_space:Name_space,name:str}, which_mode_entry:{tag_:u8,all_mode_entries:-,entry_ID:i32}", + [0x5023] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, entry_ID:i32, last_entry_ID:i32", + [0x5024] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_response:{name_space:Name_space,name:str}, eqs_which_mode_entry:{tag_:u8,all_mode_entries:-,entry_ID:i32}", + [0x5025] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_response:{name_space:Name_space,name:str}, eqs_which_mode_entry:{tag_:u8,all_mode_entries:-,entry_ID:i32}", + [0x5028] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_response:{name_space:Name_space,name:str}, eqs_xoverride:{entry_ID_to_xoverride:i32,my_entry_ID:i32,disable:bool,xoverride_date:date,ovr_start_time:time,ovr_stop_time:time,ovr_day_span:u8}", + [0x5029] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_response:{name_space:Name_space,name:str}, eqs_xoverride:{entry_ID_to_xoverride:i32,my_entry_ID:i32,disable:bool,xoverride_date:date,ovr_start_time:time,ovr_stop_time:time,ovr_day_span:u8}", + [0x502A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_response:{name_space:Name_space,name:str}, entry_ID:i32", + [0x502B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, xoverride_entry_ID:i32, last_entry_ID:i32", + [0x5035] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5036] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, scheduled_days:Schedule_days, last_entry_ID:i32, last_schedule_day:Schedule_days", + [0x5037] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x5038] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5039] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, last_entry_id:i32, last_xoverride_entry_ID:i32", + [0x503A] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, ssto_general_setup:{osv:bool,eopst:bool,eopsp:bool,eoocnt:bool,ssto_amd:Ssto_amd,ssto_desop:{tag_:u8,value:Ssto_desop_value,name_suffix:name_suffix_},to:{tag_:u8,value:f32,name_suffix:name_suffix_},ti:{tag_:u8,value:f32,name_suffix:name_suffix_},sph:{tag_:u8,value:f32,name_suffix:name_suffix_},sphd:{tag_:u8,value:f32,name_suffix:name_suffix_},spc:{tag_:u8,value:f32,name_suffix:name_suffix_},spcd:{tag_:u8,value:f...", + [0x503B] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, ssto_start_setup:{stmht:u16,occ_early_st_ht:bool,mod_early_st_ht:u16,occ_late_st_ht:bool,mod_late_st_ht:u16,ssto_zo_mod_ht:Ssto_zo_mod_ht,aosvstht:bool,hlo:f32,hdi:f32,min_st_dur_ht:f32,max_st_dur_ht:f32,to_min_st_dur_ht:f32,to_max_st_dur_ht:f32,cdtht:f32,dspht:f32,stmcl:u16,occ_early_st_cl:bool,mod_early_st_cl:u16,occ_late_st_cl:bool,mod_late_st_cl:u16,ssto_zo_mod_cl:Ssto_zo_mod_cl,aosvstcl:bool,clo:f32,cdi:f32...", + [0x503C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, ssto_stop_setup:{apmht:u16,sk1_ht:f32,tdht:f32,dt_max_ht:f32,max_sp_dur_ht:f32,a_osv_sp_ht:bool,spmcl:u16,sk1_cl:f32,dt_max_cl:f32,max_sp_dur_cl:f32,a_osv_sp_cl:bool}", + [0x503D] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, ssto_night_setup:{ntmht:u16,ntmcl:u16,ihys:f32}", + [0x503E] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x503F] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5040] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5041] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5042] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, reset_settings:Ssto_reset_settings", + [0x5043] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, enable_settings:SSTO_enable_settings", + [0x5044] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}, disable_settings:SSTO_disable_settings", + [0x5050] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5051] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5052] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5053] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, team_search:{name_space:Name_space,name_pattern:str,last_name_space:Name_space,last_name:str}", + [0x5054] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, application_family:Application_family, team_type:u16, name_search:{name_space:Name_space,name_pattern:str,suffix_pattern:str,last_name_space:Name_space,last_name:str,last_suffix:str}", + [0x5300] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, bim_lan_number:u8, bim_drop_number:u8", + [0x5301] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, lan_number:u8", + [0x5303] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, bim_lan_number:u8, bim_drop_number:u8", + [0x5304] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, lan_number:u8", + [0x5330] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x5331] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x5332] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x5351] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, hoa_map:{nrOfhoa_map_entries:u16,hoa_map_entries:{switch_number:u8,point_number:CHAR_}[]}", + [0x5354] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", + [0x5355] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}, hoa_map:{nrOfhoa_map_entries:u16,hoa_map_entries:{switch_number:u8,point_number:CHAR_}[]}", + [0x700C] = "user_profile:{user_logon:str,point_priority:Point_priority,access_class:Access_class}", +} + +------------------------------------------------------------------------ fields +local f = {} +f.total_len = ProtoField.uint32("p2.total_len","Total Length",base.DEC) +f.msg_type = ProtoField.uint32("p2.msg_type","Header Length (13 + slot bytes)",base.DEC) +f.hdr_calc = ProtoField.uint32("p2.hdr_len_calc","Header Length (computed from slots)",base.DEC) +f.hdr_bad = ProtoField.string("p2.hdr_len_mismatch","Header Length MISMATCH") +f.seq = ProtoField.uint32("p2.seq","Sequence",base.DEC) +f.dir = ProtoField.uint8 ("p2.dir","Direction",base.HEX,DIR) +f.bln1 = ProtoField.string("p2.bln1","BLN Name (slot 0)") +f.dst = ProtoField.string("p2.dst","Dest/Peer Node (slot 1)") +f.bln2 = ProtoField.string("p2.bln2","BLN Name (slot 2)") +f.src = ProtoField.string("p2.src","Source/Self Node (slot 3)") +f.opcode = ProtoField.uint16("p2.opcode","AP2 Function Code",base.HEX,OPCODES) +f.err = ProtoField.uint16("p2.err","Error Code",base.HEX,ERRORS) +f.schema = ProtoField.string("p2.schema","Expected body fields [struct-derived]") +f.operand = ProtoField.string("p2.operand","Operation operand [opcode-encoded]") +f.date = ProtoField.string("p2.date","Date (y/m/d + weekday)") +f.modept = ProtoField.string("p2.mode_point","Mode Point") +f.setpoint = ProtoField.float ("p2.setpoint","Set Point") +f.lvl_off = ProtoField.float ("p2.alarm_offset","Alarm Level Offset") +f.lvl_pri = ProtoField.uint8 ("p2.alarm_priority","Alarm Priority",base.DEC) +f.lvl_cat = ProtoField.uint8 ("p2.alarm_category","Alarm Category",base.DEC) +f.lvl_msg = ProtoField.uint16("p2.alarm_message","Alarm Message Number",base.DEC) +f.eqs_mode = ProtoField.uint16("p2.eqs_mode","EQS Mode Index",base.DEC) +f.eqs_val = ProtoField.float ("p2.eqs_value","Commanded Value") +f.eqs_time = ProtoField.string("p2.eqs_time","Scheduled Time") +f.rec_index = ProtoField.uint32("p2.record_index","Record Index (resume key)",base.DEC) +f.eqs_en = ProtoField.uint8 ("p2.eqs_enabled","Entry Enabled",base.DEC,{[0]="no",[1]="yes"}) +f.eqs_occ = ProtoField.uint8 ("p2.eqs_occurrence","Occurrence",base.DEC, + { [0]="one_time", [1]="weekly", [2]="replacement" }) +f.eqs_days = ProtoField.uint32("p2.eqs_days","Scheduled Days (bitmask)",base.HEX) +f.eqs_dayst = ProtoField.string("p2.eqs_days_text","Scheduled Days") +f.eqs_span = ProtoField.uint8 ("p2.eqs_days_spanned","Days Spanned",base.DEC) +f.eqs_excl = ProtoField.uint8 ("p2.eqs_exclusive","Exclusive",base.DEC,{[0]="no",[1]="yes"}) +f.eqs_stt = ProtoField.uint16("p2.eqs_state_text_id","State-Text Table Id",base.HEX) +f.tlv = ProtoField.string("p2.tlv","TLV String") +f.scope = ProtoField.string("p2.scope","User Logon (User_profile)") +f.access = ProtoField.uint32("p2.access_class","Access Class (BITSTRING32)",base.HEX) +f.ems_code = ProtoField.uint8 ("p2.ems_code","Session Event",base.HEX, + { [0x07]="logon", [0x08]="logoff", [0x09]="attempt (no account resolved)" }) +f.ems_user = ProtoField.string("p2.ems_user","Operator Account") +f.ems_desc = ProtoField.string("p2.ems_desc","Account Description") +f.priority = ProtoField.uint8 ("p2.priority","Command Priority",base.HEX,PRIORITY) +f.value = ProtoField.float ("p2.value","Value (f32 BE)") +f.cov_count = ProtoField.uint16("p2.cov.count","COV point count",base.DEC) +f.cov_point = ProtoField.string("p2.cov.point","COV Point Name") +f.cov_cond = ProtoField.bytes ("p2.cov.cond","COV condition/priority block (10B)") +-- 10-byte condition block, field order from the ASDU schema (1 byte each fits the 10B exactly). +-- byte0 point_priority and byte1 control_status are now WIRE-CONFIRMED (point_priority=0x23 OPER +-- when commanded; control_status observed 0x00/02/03/04/06). A failed sensor asserts the +-- oos/failed bytes. alarm_state(+8)/alarm_priority(+9) still need a limit-alarmed capture. +f.cov_pri = ProtoField.uint8("p2.cov.point_priority","point_priority",base.HEX,PRIORITY) +f.cov_ctrl = ProtoField.uint8("p2.cov.control_status","control_status",base.HEX) +f.cov_oos = ProtoField.uint8("p2.cov.out_of_service","out_of_service",base.DEC) +f.cov_fail = ProtoField.uint8("p2.cov.failed","failed",base.DEC) +f.cov_proof = ProtoField.uint8("p2.cov.proof_on","proof_on",base.DEC) +f.cov_opdis = ProtoField.uint8("p2.cov.operator_disabled","operator_disabled",base.DEC) +f.cov_pgmdis = ProtoField.uint8("p2.cov.program_disabled","program_disabled",base.DEC) +f.cov_cmdal = ProtoField.uint8("p2.cov.commanded_to_alarm","commanded_to_alarm",base.DEC) +f.cov_astate = ProtoField.uint8("p2.cov.alarm_state","alarm_state",base.DEC) +f.cov_apri = ProtoField.uint8("p2.cov.alarm_priority","alarm_priority",base.DEC) +f.r_name = ProtoField.string("p2.roster.name","Node Name") +f.r_ver = ProtoField.uint32("p2.roster.ver","Node Version (change generation)") +f.r_tabver = ProtoField.uint16("p2.roster.tabver","Table Version") +f.r_count = ProtoField.uint16("p2.roster.count","Entry Count") +f.id_node = ProtoField.string("p2.id.node","Node Name") +f.id_site = ProtoField.string("p2.id.site","Site Name") +f.id_bln = ProtoField.string("p2.id.bln","BLN Name") +-- request-family decoders (2.4) +local NAME_SPACE = { [0x0000]="system", [0x0001]="user", [0xFFFF]="any" } +local COV_SUB = { [0x00FF]="enable", [0x0000]="disable" } +f.ns = ProtoField.uint16("p2.namespace","Name Space",base.HEX,NAME_SPACE) +f.pt_name = ProtoField.string("p2.point.name","Point / Object Name") +f.pt_suffix = ProtoField.string("p2.point.suffix","Name Suffix") +f.resume = ProtoField.string("p2.resume","Resume Cursor (last object)") +f.cov_sub = ProtoField.uint16("p2.cov.subscribe","COV Subscribe",base.HEX,COV_SUB) +f.cmd_value = ProtoField.float ("p2.cmd.value","Commanded Value (f32 BE)") +f.ts = ProtoField.string("p2.timestamp","Event Timestamp") +f.qual = ProtoField.uint32("p2.quality","Value Quality Sentinel",base.HEX) +f.subtype = ProtoField.uint8 ("p2.point.subtype","Point Sub-type",base.HEX) +f.al_value = ProtoField.float ("p2.alarm.value","Alarm Value (f32 BE)") +-- seq-state response correlation (2.5) +f.resp_op = ProtoField.string("p2.response_to","Response to (opcode recovered via seq)") +f.fw_rev = ProtoField.string("p2.fw.rev","Firmware Revision") +f.fw_plat = ProtoField.string("p2.fw.platform","Hardware Platform / Firmware Version") +f.fw_build = ProtoField.string("p2.fw.build","Firmware Build Date") +f.eu = ProtoField.string("p2.eu","Engineering Units") +f.body = ProtoField.bytes ("p2.body","Body") +p2.fields = { + f.total_len,f.msg_type,f.hdr_calc,f.hdr_bad,f.seq,f.dir,f.bln1,f.dst,f.bln2,f.src, + f.opcode,f.err,f.schema,f.operand,f.tlv,f.scope,f.priority,f.value, + f.access,f.ems_code,f.ems_user,f.ems_desc,f.date,f.modept,f.setpoint,f.lvl_off,f.lvl_pri,f.lvl_cat,f.lvl_msg, + f.eqs_mode,f.eqs_val,f.eqs_time,f.rec_index, + f.eqs_en,f.eqs_occ,f.eqs_days,f.eqs_dayst,f.eqs_span,f.eqs_excl,f.eqs_stt, + f.cov_count,f.cov_point,f.cov_cond, + f.cov_pri,f.cov_ctrl,f.cov_oos,f.cov_fail,f.cov_proof,f.cov_opdis,f.cov_pgmdis,f.cov_cmdal,f.cov_astate,f.cov_apri, + f.r_name,f.r_ver,f.r_tabver,f.r_count, + f.id_node,f.id_site,f.id_bln, + f.ns,f.pt_name,f.pt_suffix,f.resume,f.cov_sub,f.cmd_value,f.ts,f.qual,f.subtype,f.al_value, + f.resp_op,f.fw_rev,f.fw_plat,f.fw_build,f.eu, + f.body, +} + +------------------------------------------------------------------------ helpers +local function cstr(tvb, off) + local n = tvb:len(); if off >= n then return nil end + for i = off, n-1 do if tvb(i,1):uint()==0 then return tvb(off,i-off):string(),(i-off+1) end end + return nil +end +-- The prologue on most addressable requests is a User_profile: +-- TLV(user_logon) | u8 point_priority | BITSTRING32 access_class +-- SYST/NONE/CC are the logons the stack presents for system-originated work; +-- an operator driving a panel session puts their own login here instead, so +-- an unknown name in this position is a person, not a parse failure. +-- The system logons the stack presents for its own work. A *person* driving a +-- session puts their own account name here instead, so this table is a label +-- hint only -- recognition is by shape (see profile_at), never by name list: +-- hardcoding site account names would neither generalise nor be ours to ship. +local SYSTEM_LOGON = { SYST=true, NONE=true, CC=true } +-- A User_profile prologue: TLV(user_logon) + u8 point_priority + +-- BITSTRING32 access_class, whose low three bytes are all ones in every +-- observed frame. Returns the logon and the offset past the block, or nil. +local function profile_at(tvb, off, last) + local s, l, no = read_tlv(tvb, off, last) + if not s or l < 2 or l > 8 or no + 5 > last then return nil end + if not s:match("^[%w%-%._]+$") then return nil end + if tvb(no+2,3):uint() ~= 0xFFFFFF then return nil end + return s, l, no +end +-- Deliberately reads a SINGLE-byte length where 8.1 gives a u16: this walk +-- tests every offset, so a false positive swallows the rest of the body while a +-- false negative just falls through. Reading the full u16 unanchored accepts 186 +-- more positions across the reference corpus, every one a mid-structure landing +-- with a non-printable payload. The anchored decoders above read the full width. +local function tlv_walk(tvb, off, last, tree) + local i = off + while i + 3 <= last do + if tvb(i,1):uint()==0x01 and tvb(i+1,1):uint()==0x00 then + local l = tvb(i+2,1):uint() + if l > 0 and i+3+l <= last then + local s = tvb(i+3,l):string() + if SYSTEM_LOGON[s] then + tree:add(f.scope, tvb(i,3+l), s) + if i+3+l < last then tree:add(f.priority, tvb(i+3+l,1)) end + else tree:add(f.tlv, tvb(i,3+l), s) end + i = i + 3 + l + else i = i + 1 end + else i = i + 1 end + end +end +local function dissect_cov(tvb, off, last, tree) + -- COV_ANNUNCIATE body: u16 count, then per point a name_response + -- (u16 name_space + name TLV + suffix TLV) + f32 value + 10-byte condition block. + if off+2 > last then return end + tree:add(f.cov_count, tvb(off,2)); off = off + 2 + while off + 9 <= last do + local rec = off + off = off + 2 -- name_space (u16; observed 00 00 = system) + -- textType is 0x00 or 0x01 (8.1). Testing ~=0x01 here used to `break`, + -- abandoning every remaining record over one 0x00-typed name. + if tvb(off,1):uint() > 0x01 then break end + local l = tvb(off+1,2):uint(); if off+3+l > last then break end -- u16 length (8.1) + local pt = tree:add(p2, tvb(rec,0), "COV point") + pt:add(f.cov_point, tvb(off+3,l)); off = off + 3 + l + -- suffix TLV: empty for top-level points, non-empty for FLN subpoints. + -- The empty form is `01 00 00` OR `00 00 00` -- textType 0x00 is legal and + -- occurs. Testing ==0x01 skipped the advance and then read the suffix + -- header as the f32 value, reporting a denormal instead of the reading. + if off+3 <= last and tvb(off,1):uint() <= 0x01 then + local sl = tvb(off+1,2):uint() + if off+3+sl <= last then + if sl > 0 then pt:add(f.cov_point, tvb(off+3,sl)) end + off = off + 3 + sl + else break end + end + if off+4 <= last then pt:add(f.value, tvb(off,4)); off = off + 4 else break end + if off+10 <= last then + local cb = pt:add(f.cov_cond, tvb(off,10)) + cb:set_text("condition/priority block (10B) [byte0/1 wire-confirmed; alarm bytes need limit-alarm capture]") + cb:add(f.cov_pri, tvb(off,1)); cb:add(f.cov_ctrl, tvb(off+1,1)) + cb:add(f.cov_oos, tvb(off+2,1)); cb:add(f.cov_fail, tvb(off+3,1)) + cb:add(f.cov_proof, tvb(off+4,1)); cb:add(f.cov_opdis, tvb(off+5,1)) + cb:add(f.cov_pgmdis,tvb(off+6,1)); cb:add(f.cov_cmdal, tvb(off+7,1)) + cb:add(f.cov_astate,tvb(off+8,1)); cb:add(f.cov_apri, tvb(off+9,1)) + off = off + 10 + else break end + end +end +local function dissect_roster(tvb, off, last, tree) + if off+8 > last then return end + local n = tvb(off+6,2):uint() + tree:add(f.r_tabver, tvb(off+4,2)); tree:add(f.r_count, tvb(off+6,2)); off = off + 8 + -- Walk the DECLARED count, not "until the bytes run out". The table ends with + -- four zero bytes after the last entry, and an end-of-buffer walk reads those + -- as a blank 15th node. It used to stop there for the wrong reason -- a + -- textType test that `break`s on 0x00, which is a legal textType (8.1). + for _ = 1, n do + if off + 3 > last or tvb(off,1):uint() > 0x01 then break end + local l = tvb(off+1,2):uint(); if off+3+l > last then break end -- u16 length (8.1) + local e = tree:add(p2, tvb(off,0), "Node entry") + e:add(f.r_name, tvb(off+3,l)); off = off + 3 + l + if off+4 <= last then e:add(f.r_ver, tvb(off,4)); off = off + 4 end + end +end +local function dissect_identity(tvb, off, last, tree) + local fl = { f.id_node, f.id_site, f.id_bln }; local idx = 1 + while off + 3 <= last and idx <= 3 do + -- textType is 0x00 or 0x01 (8.1). Testing ~=0x01 here used to `break`, + -- abandoning every remaining record over one 0x00-typed name. + if tvb(off,1):uint() > 0x01 then break end + local l = tvb(off+1,2):uint(); if off+3+l > last then break end -- u16 length (8.1) + tree:add(fl[idx], tvb(off+3,l)); off = off + 3 + l; idx = idx + 1 + end + if off < last then tlv_walk(tvb, off, last, tree) end +end + +-- ---- request-family helpers/decoders (2.4; designed against captured bytes) ---- +-- read a string TLV (01 00 ); returns (string, len, next_off) or nil +local function read_tlv(tvb, off, last) + if off + 3 > last then return nil end + if tvb(off,1):uint() ~= 0x01 or tvb(off+1,1):uint() ~= 0x00 then return nil end + local l = tvb(off+2,1):uint() + if off + 3 + l > last then return nil end + return tvb(off+3,l):string(), l, off + 3 + l +end +-- decode an 8-byte event timestamp [yr-1900][mo][day][DOW 1=Mon][hr][min][sec][centisec] +local DOW = { "Mon","Tue","Wed","Thu","Fri","Sat","Sun" } +local function ts8(tvb, off, last) + if off + 8 > last then return nil end + local yr=tvb(off,1):uint(); local mo=tvb(off+1,1):uint(); local dy=tvb(off+2,1):uint() + local dw=tvb(off+3,1):uint(); local hh=tvb(off+4,1):uint(); local mm=tvb(off+5,1):uint() + local ss=tvb(off+6,1):uint(); local cs=tvb(off+7,1):uint() + -- year>=2000 excludes the all-zero "null/never" sentinel (epoch base 1900) and most + -- non-timestamp trailing bytes; cs<=99 (centiseconds). Tightened to avoid false matches. + if yr<100 or yr>199 or mo<1 or mo>12 or dy<1 or dy>31 or dw<1 or dw>7 + or hh>23 or mm>59 or ss>59 or cs>99 then return nil end + return string.format("%04d-%02d-%02d %s %02d:%02d:%02d.%02d", 1900+yr, mo, dy, DOW[dw] or "?", hh, mm, ss, cs) +end +-- 4-byte calendar date [yr-1900][mo][day][DOW 1=Mon..7=Sun] -- the same encoding +-- as ts8 above, truncated before the time. The weekday is redundant with the +-- date, which makes it a free alignment check: every date in the reference +-- corpus carries the correct weekday, so a mismatch means the parse has drifted. +local function date4(tvb, off, last) + if off + 4 > last then return nil end + local yr=tvb(off,1):uint(); local mo=tvb(off+1,1):uint() + local dy=tvb(off+2,1):uint(); local dw=tvb(off+3,1):uint() + if mo == 0 and dy == 0 then return "(none)" end + if yr<100 or yr>199 or mo>12 or dy>31 or dw<1 or dw>7 then return nil end + -- Sakamoto: weekday of a Gregorian date, 0=Sunday + local y = 1900 + yr + local t = {0,3,2,5,0,3,5,1,4,6,2,4} + local yy = (mo < 3) and (y - 1) or y + local w = (yy + math.floor(yy/4) - math.floor(yy/100) + math.floor(yy/400) + + t[mo] + dy) % 7 + local iso = (w == 0) and 7 or w -- 1=Mon .. 7=Sun + return string.format("%04d-%02d-%02d %s%s", y, mo, dy, DOW[dw] or "?", + (iso == dw) and "" or string.format(" [weekday byte %d, date is %s]", + dw, DOW[iso] or "?")) +end +-- consume an optional scope tag: 01 00 <3F FF FF FF>; returns next_off +local function scope_tag(tvb, off, last, tree) + local s, l, no = profile_at(tvb, off, last) + if s then + local sc = tree:add(p2, tvb(off, (no+5)-off), "User_profile: "..s) + sc:add(f.scope, tvb(off,3+l), s) + sc:add(f.priority, tvb(no,1)) -- point_priority (wire-confirmed: 0x23 oper on commands) + if no + 5 <= last then sc:add(f.access, tvb(no+1,4)) end -- access_class bit string + return no + 5 + end + return off +end +-- Name_search: name_space u16 + name TLV + suffix TLV [+ last_name_space u16 + last_name TLV + last_suffix TLV] +local function dissect_namesearch(tvb, off, last, tree, has_resume) + if off + 2 > last then return off end + tree:add(f.ns, tvb(off,2)); off = off + 2 + local nm, nl, no = read_tlv(tvb, off, last); if not nm then return off end + tree:add(f.pt_name, tvb(off+3,nl)); off = no + local sf, sl, so = read_tlv(tvb, off, last) + if sf ~= nil then if sl > 0 then tree:add(f.pt_suffix, tvb(off+3,sl)) end; off = so end + if has_resume and off + 2 <= last then + off = off + 2 -- last_name_space + local rn, rl, rno = read_tlv(tvb, off, last) + if rn ~= nil then + if rl > 0 then tree:add(f.resume, tvb(off+3,rl)) end; off = rno + local rs, rsl, rso = read_tlv(tvb, off, last) + if rs ~= nil then off = rso end + end + end + return off +end +-- addressing-family request: [scope] + Name_search + opcode tail +local function dissect_addr(tvb, off, last, tree, has_resume, tail) + off = scope_tag(tvb, off, last, tree) + off = dissect_namesearch(tvb, off, last, tree, has_resume) + if tail == "cov" then + if off + 2 <= last then tree:add(f.cov_sub, tvb(off,2)); off = off + 2 end + elseif tail == "value" then + if off + 4 <= last then tree:add(f.cmd_value, tvb(off,4)); off = off + 4 end + end + if off < last then tlv_walk(tvb, off, last, tree) end +end +-- ALARM_PRINT 0x0508 push: scope + name/descriptor TLVs + value block + dual timestamps +local function dissect_alarm(tvb, off, last, tree) + off = scope_tag(tvb, off, last, tree) + local nts = 0 -- alarm records carry up to 3 timestamps + while off < last do + local b0 = tvb(off,1):uint() + -- Deliberately strict: this is an unanchored scan, and accepting + -- textType 0x00 here makes every 0x00 byte a TLV candidate. Measured over + -- the corpus that desynchronises the walk and replaces point names with + -- empty strings (976 rows). The anchored decoders read the full rule; see + -- `_probe_tlv` in p2_scanner.py for the same trade-off written down. + if off + 3 <= last and b0 == 0x01 and tvb(off+1,1):uint() == 0x00 then + local l = tvb(off+2,1):uint() + if off + 3 + l <= last then + if l > 0 then tree:add(f.tlv, tvb(off,3+l), tvb(off+3,l):string()) end + off = off + 3 + l + else off = off + 1 end + elseif off + 4 <= last and b0 == 0x3F and tvb(off+1,1):uint() == 0xFF and tvb(off+2,1):uint() == 0xFF then + tree:add(f.qual, tvb(off,4)); off = off + 4 -- quality sentinel 3F FF FF Fx + if off + 3 <= last then tree:add(f.subtype, tvb(off+2,1)); off = off + 3 end -- 00 comm subtype + if off + 4 <= last then tree:add(f.al_value, tvb(off,4)); off = off + 4 end -- f32 value + else + local t = (nts < 3) and ts8(tvb, off, last) or nil -- report / onset / last-normal + if t then tree:add(f.ts, tvb(off,8), t); off = off + 8; nts = nts + 1 + else off = off + 1 end + end + end +end +-- EMS_PRINT 0x0368: the panel announcing an operator session on its own console. +-- Body: u8 event code | 01 00 00 | TLV(node) | TLV(account) | TLV(description). +-- The account name arrives as typed on logon and in its canonical case on logoff, +-- and the description is the account's own text -- all in clear. +local function dissect_ems(tvb, off, last, tree) + if off >= last then return end + tree:add(f.ems_code, tvb(off,1)); off = off + 4 -- code + 01 00 00 + local labels = { f.pt_name, f.ems_user, f.ems_desc } + for i = 1, 3 do + local v, l, no = read_tlv(tvb, off, last); if not v then break end + if l > 0 then tree:add(labels[i], tvb(off+3,l)) end + off = no + end + if off < last then tlv_walk(tvb, off, last, tree) end +end +-- opcodes whose request body is scope?+Name_search (point reads, trend read, bulk uploads) +local ADDR_OPS = { + [0x0220]=true, [0x0221]=true, [0x0295]=true, + [0x0981]=true, [0x0982]=true, +} + +-- ---- response-body decoders (2.5; reached via seq-state, never an on-wire opcode) ---- +-- CABINET_DISPLAY 0x010C response: firmware banner = rev / platform / build TLVs, then +-- (after a binary config block) node/site/BLN + IP/MAC TLVs surfaced by the walk. +local function dissect_banner(tvb, off, last, tree) + local labels = { f.fw_rev, f.fw_plat, f.fw_build } + for i = 1, 3 do + local s, l, no = read_tlv(tvb, off, last) + if s then if l > 0 then tree:add(labels[i], tvb(off+3,l)) end; off = no else break end + end + if off < last then tlv_walk(tvb, off, last, tree) end +end +-- Value responses (read / COV-enable / UPL / trend): names + EU-units string + the value +-- block at the 3F FF FF Fx quality-sentinel anchor. The f32 in a plain analog read is NOT +-- sentinel-framed and its offset varies by point type, so it is intentionally left raw. +local EU_HINT = { ["DEG F"]=1,["DEG C"]=1,["PCT"]=1,["IN H2O"]=1,["PSI"]=1,["GPM"]=1, + ["CFM"]=1,["KW"]=1,["KWH"]=1,["VOLTS"]=1,["AMPS"]=1,["HZ"]=1,["RPM"]=1,["FPM"]=1 } +local function dissect_value_resp(tvb, off, last, tree) + while off < last do + local b0 = tvb(off,1):uint() + -- Deliberately strict: this is an unanchored scan, and accepting + -- textType 0x00 here makes every 0x00 byte a TLV candidate. Measured over + -- the corpus that desynchronises the walk and replaces point names with + -- empty strings (976 rows). The anchored decoders read the full rule; see + -- `_probe_tlv` in p2_scanner.py for the same trade-off written down. + if off + 3 <= last and b0 == 0x01 and tvb(off+1,1):uint() == 0x00 then + local l = tvb(off+2,1):uint() + if off + 3 + l <= last then + if l > 0 then + local s = tvb(off+3,l):string() + tree:add(EU_HINT[s] and f.eu or f.tlv, tvb(off,3+l), s) + end + off = off + 3 + l + else off = off + 1 end + elseif off + 11 <= last and b0 == 0x3F and tvb(off+1,1):uint() == 0xFF and tvb(off+2,1):uint() == 0xFF then + tree:add(f.qual, tvb(off,4)); off = off + 4 -- quality sentinel + tree:add(f.subtype, tvb(off+2,1)); off = off + 3 -- 00 comm sub-type + tree:add(f.value, tvb(off,4)); off = off + 4 -- f32 value + else off = off + 1 end + end +end +-- UPL_ALL_ALARM_MODE 0x0983 response: an enhanced-alarm definition. The tail is +-- self-validating -- a u16 count followed by exactly count*8 bytes of Alarm_level -- +-- so it is located from the end and the middle block is left as a raw block rather +-- than guessed at (its field offsets shift between records). +local function dissect_alarmmode(tvb, off, last, tree) + if off + 2 > last then return end + tree:add(f.ns, tvb(off,2)); off = off + 2 + local labels = { f.pt_name, f.pt_suffix, f.modept, f.pt_suffix, f.eu } + for i = 1, 5 do + local v, l, no = read_tlv(tvb, off, last); if not v then break end + if l > 0 then tree:add(labels[i], tvb(off+3,l)) end + off = no + end + off = off + 5 -- flag + four category bytes + for _ = 1, 3 do -- changed / reference / changed + local t = ts8(tvb, off, last) + if not t then break end + tree:add(f.ts, tvb(off,8), t); off = off + 8 + end + -- find the count: the only position where count*8 consumes the rest exactly + local cut = nil + for j = off, last - 2 do + local n = tvb(j,2):uint() + if n > 0 and (last - (j + 2)) == n * 8 then cut = j; break end + end + if not cut then if off < last then tlv_walk(tvb, off, last, tree) end; return end + if cut - 4 >= off then tree:add(f.setpoint, tvb(cut-4,4)) end + if cut - 4 > off then tree:add(p2, tvb(off, (cut-4)-off), "Setup block (delays, differential)") end + local n = tvb(cut,2):uint() + local lt = tree:add(p2, tvb(cut, last-cut), "Alarm levels ("..n..")") + for k = 0, n - 1 do + local b = cut + 2 + k * 8 + local e = lt:add(p2, tvb(b,8), string.format("Level %d", k + 1)) + e:add(f.lvl_off, tvb(b,4)); e:add(f.lvl_pri, tvb(b+4,1)) + e:add(f.lvl_cat, tvb(b+5,1)); e:add(f.lvl_msg, tvb(b+6,2)) + end +end +-- UPL_ALL_EQS_CMD_TABLE 0x0988: zone, commanded point, mode index, value +local function dissect_eqs_cmd(tvb, off, last, tree) + if off + 2 > last then return end + tree:add(f.ns, tvb(off,2)); off = off + 2 + local z, zl, zo = read_tlv(tvb, off, last); if not z then return end + tree:add(f.pt_name, tvb(off+3,zl)); off = zo + 2 -- + second name space + local p, pl, po = read_tlv(tvb, off, last); if not p then return end + tree:add(f.pt_name, tvb(off+3,pl)); off = po + local sf, sl, so = read_tlv(tvb, off, last) + if sf then if sl > 0 then tree:add(f.pt_suffix, tvb(off+3,sl)) end; off = so end + if off + 6 <= last then + tree:add(f.eqs_mode, tvb(off,2)); tree:add(f.eqs_val, tvb(off+2,4)); off = off + 6 + end +end +-- UPL_ALL_EQS_MODE_SCHED 0x0989: zone, record index (the resume key), mode, +-- effective-from / effective-until dates, and the time the mode starts +-- 0x0989 UPL_ALL_EQS_MODE_SCHED. Eleven fields (PROTOCOL.md 10.8), validated on +-- every captured record: both dates carry a weekday byte that must match their +-- own date, both times must be real, the booleans must be 0/1, and the record +-- must consume the body exactly. +local DAYNAME = { "Su","Mo","Tu","We","Th","Fr","Sa" } +local function days_text(mask) + if mask == 0 then return "(none)" end + local out = {} + for b = 0, 6 do + if bit.band(bit.rshift(mask, b), 1) == 1 then out[#out+1] = DAYNAME[b+1] end + end + for b = 7, 13 do + if bit.band(bit.rshift(mask, b), 1) == 1 then out[#out+1] = "Repl"..(b-6) end + end + return #out > 0 and table.concat(out, "+") or string.format("0x%X", mask) +end +local function time4(tvb, off, last) + if off + 4 > last then return nil end + local h, m, s = tvb(off,1):uint(), tvb(off+1,1):uint(), tvb(off+2,1):uint() + if h > 23 or m > 59 or s > 59 then return nil end + return string.format("%02d:%02d:%02d", h, m, s) +end +local function dissect_eqs_sched(tvb, off, last, tree) + if off + 2 > last then return end + tree:add(f.ns, tvb(off,2)); off = off + 2 + local z, zl, zo = read_tlv(tvb, off, last); if not z then return end + tree:add(f.pt_name, tvb(off+3,zl)); off = zo + if off + 12 > last then return end + tree:add(f.rec_index, tvb(off,4)); off = off + 4 + tree:add(f.eqs_en, tvb(off,1)); off = off + 1 + tree:add(f.eqs_mode, tvb(off,2)); off = off + 2 + tree:add(f.eqs_occ, tvb(off,1)); off = off + 1 + local mask = tvb(off,4):uint() + tree:add(f.eqs_days, tvb(off,4)) + tree:add(f.eqs_dayst, tvb(off,4), days_text(mask)); off = off + 4 + for _, lab in ipairs({ "Start date", "End date" }) do + local d = date4(tvb, off, last); if not d then return end + tree:add(f.date, tvb(off,4), lab..": "..d); off = off + 4 + end + for _, lab in ipairs({ "Start time", "Stop time" }) do + local v = time4(tvb, off, last); if not v then return end + tree:add(f.eqs_time, tvb(off,4), lab..": "..v); off = off + 4 + end + if off + 2 > last then return end + tree:add(f.eqs_span, tvb(off,1)); off = off + 1 + tree:add(f.eqs_excl, tvb(off,1)); off = off + 1 + if off + 2 <= last then tree:add(f.eqs_stt, tvb(off,2)) end +end +-- UPL_ALL_EQS_ZONE 0x0987: zone name, its schedule point, and a descriptor +-- 0x0987 UPL_ALL_EQS_ZONE. The lead u16 is a COUNT OF NAMES, not a marker: it +-- predicts exactly that many Team_response entries (u16 name_space + TLV), and +-- the second entry's own name_space is what an earlier reading called a +-- "two-byte separator". Then Eqs_zone_data. PROTOCOL.md 10.8. +local function dissect_eqs_zone(tvb, off, last, tree) + if off + 2 > last then return end + local n = tvb(off,2):uint() + tree:add(f.r_count, tvb(off,2)); off = off + 2 + if n < 1 or n > 8 then return end -- not the shape we know + for _ = 1, n do + if off + 2 > last then return end + tree:add(f.ns, tvb(off,2)); off = off + 2 + local s, sl, no = read_tlv(tvb, off, last); if not s then return end + if sl > 0 then tree:add(f.pt_name, tvb(off+3,sl)) end + off = no + end + if off >= last then return end + tree:add(f.eqs_en, tvb(off,1)); off = off + 1 -- zone_enabled + local d, dl, dno = read_tlv(tvb, off, last); if not d then return end + if dl > 0 then tree:add(f.tlv, tvb(off+3,dl)) end + off = dno + if off + 11 > last then return end + tree:add(f.access, tvb(off,4)); off = off + 4 -- access_class + off = off + 2 -- min_off_time + off = off + 1 -- recmd_after_warmstart + off = off + 2 -- warmstart_delay + tree:add(f.eqs_stt, tvb(off,2)) -- state_text_table +end +-- opcodes whose response carries a value/Point_base-style body +local VALUE_RESP = { + [0x0220]=true, [0x0221]=true, [0x0271]=true, [0x0295]=true, [0x0981]=true, [0x0982]=true, +} + +------------------------------------------------------------------------ one PDU +local function dissect_one(tvb, pinfo, tree) + local total = tvb(0,4):uint() + local hdrlen = tvb(4,4):uint() + local dir = tvb(12,1):uint() + local st = tree:add(p2, tvb(0,total), "Siemens P2") + st:add(f.total_len, tvb(0,4)); st:add(f.msg_type, tvb(4,4)) + st:add(f.seq, tvb(8,4)); st:add(f.dir, tvb(12,1)) + local off = 13 + local sfields = { f.bln1, f.dst, f.bln2, f.src }; local slots = {} + for s = 1, 4 do + local val, adv = cstr(tvb, off); if not val then break end + st:add(sfields[s], tvb(off, adv-1), val); slots[s] = val; off = off + adv + end + -- The header length is redundant with the slots, so check it. The panel + -- largely does: holding node names constant, a frame whose value matches its + -- slots is answered 98.0% of the time and one that does not 6.2% + -- (PROTOCOL.md 6.2.2). An intermittent silent drop is the hardest failure to + -- diagnose from the sending side, which is why this is worth surfacing. +-- Name it, because `off` keeps walking: the opcode read below does + -- `off = off + 2`, and the Info column compares against this same value ~70 + -- lines further on. Comparing `hdrlen` to a bare `off` down there reported a + -- 2-byte mismatch on every single request frame. + local hdr_end = off + st:add(f.hdr_calc, tvb(4,4), hdr_end):set_generated() + if hdrlen ~= hdr_end then + st:add(f.hdr_bad, tvb(4,4), + string.format("wire says %d, slots give %d (13 + %d) -- a panel usually drops this", + hdrlen, hdr_end, hdr_end - 13)):set_generated() + end + -- seq-state key: per TCP stream + the (echoed) sequence number + local seq = tvb(8,4):uint() + local sinfo = f_tcp_stream() + local skey = (sinfo and tostring(sinfo.value) or "?") .. ":" .. seq + local opname, rop = nil, nil + -- A run of opcodes is often one operation with a parameter encoded in the + -- opcode rather than the body, so name the operand alongside the mnemonic. + local function rlabel(o) + local n = OPCODES[o] or string.format("0x%04X", o) + local fm = p2data.families[o] + return fm and (n .. string.format(" (%s=%s)", fm.param, fm.value)) or n + end + if dir == 0x00 then + if off + 2 <= total then + local op = tvb(off,2):uint(); st:add(f.opcode, tvb(off,2)) + opname = OPCODES[op] or string.format("unknown_0x%04X", op) + local fam = p2data.families[op] + if fam then + st:add(f.operand, tvb(off,2), string.format("%s - %s: %s", + fam.family, fam.param, fam.value)):set_generated() + opname = opname .. string.format(" (%s=%s)", fam.param, fam.value) + end + if not pinfo.visited then resp_op[skey] = op end -- remember for the matching response + off = off + 2 + if off < total then + local bt = st:add(p2, tvb(off, total-off), "Body ("..(total-off).." B)") + if OPSCHEMA[op] then bt:add(f.schema, tvb(off,0), OPSCHEMA[op]) end + local ok = pcall(function() + if op==0x0274 then dissect_cov(tvb,off,total,bt) + elseif op==0x4634 or op==0x4636 then dissect_roster(tvb,off,total,bt) + elseif op==0x4640 then dissect_identity(tvb,off,total,bt) + elseif op==0x0508 then dissect_alarm(tvb,off,total,bt) + elseif op==0x0368 then dissect_ems(tvb,off,total,bt) + elseif op==0x0271 or op==0x0272 or op==0x0273 then dissect_addr(tvb,off,total,bt,false,"cov") + elseif op==0x0240 then dissect_addr(tvb,off,total,bt,true,"value") + elseif op==0x0241 then dissect_addr(tvb,off,total,bt,true,"none") + elseif ADDR_OPS[op] then dissect_addr(tvb,off,total,bt,true,"none") + else tlv_walk(tvb,off,total,bt) end + end) + if not ok then tlv_walk(tvb,off,total,bt) end + end + end + elseif dir == 0x05 then + rop = resp_op[skey] + if total >= off+2 then st:add(f.err, tvb(total-2,2)) end + if rop then st:add(f.resp_op, tvb(0,0), rlabel(rop)):set_generated() end + if off < total-2 then tlv_walk(tvb, off, total-2, st:add(p2, tvb(off,total-2-off), "Body")) end + else + rop = resp_op[skey] + if off < total then + local hdr = rop and ("Body ("..(total-off).." B) -- response to "..rlabel(rop)) + or ("Body ("..(total-off).." B)") + local bt = st:add(p2, tvb(off,total-off), hdr) + if rop then bt:add(f.resp_op, tvb(0,0), rlabel(rop)):set_generated() end + pcall(function() + if rop==0x010C then dissect_banner(tvb,off,total,bt) + elseif rop==0x4640 then dissect_identity(tvb,off,total,bt) + elseif rop==0x0983 then dissect_alarmmode(tvb,off,total,bt) + elseif rop==0x0987 then dissect_eqs_zone(tvb,off,total,bt) + elseif rop==0x0988 then dissect_eqs_cmd(tvb,off,total,bt) + elseif rop==0x0989 then dissect_eqs_sched(tvb,off,total,bt) + elseif rop and VALUE_RESP[rop] then dissect_value_resp(tvb,off,total,bt) + else tlv_walk(tvb,off,total,bt) end + end) + elseif rop then + st:add(f.resp_op, tvb(0,0), rlabel(rop)):set_generated() -- 0-byte ACK (e.g. write) + end + end + local cls = (hdrlen == hdr_end) and "" + or string.format("[hdrlen %d/=%d] ", hdrlen, hdr_end) + local who = (slots[4] or "?").."->"..(slots[2] or "?") + if dir == 0x00 then pinfo.cols.info:set(cls..(opname or "?").." "..who) + elseif dir == 0x05 then + -- Guard on off+2, not total>=2. The error tail lives after the four routing + -- slots; on a truncated frame whose slots run to the end there is no tail, + -- and reading tvb(total-2,2) would lift two header/slot bytes and render + -- them as a phantom error code (observed: a 13-byte dir-0x05 frame reported + -- "ERROR 0x0105"). Matches the guard already used on the tree item above. + if total >= off+2 then + local ec = tvb(total-2,2):uint() + pinfo.cols.info:set("ERROR "..(ERRORS[ec] or string.format("0x%04X",ec)).." seq="..seq + ..(rop and (" ["..rlabel(rop).."]") or "")) + else + pinfo.cols.info:set("ERROR (truncated - no code) seq="..seq + ..(rop and (" ["..rlabel(rop).."]") or "")) + end + else + pinfo.cols.info:set("success"..(rop and (" "..rlabel(rop).." resp") or "").." seq="..seq.." "..who) + end +end + +------------------------------------------------------------------------ top-level (reassembly) +function p2.dissector(tvb, pinfo, tree) + pinfo.cols.protocol = "P2" + local len = tvb:len(); local offset = 0 + while offset < len do + -- Fewer than a full 13-byte header (4 len + 4 class + 4 seq + 1 dir) in hand: + -- ask TCP for one more segment rather than dropping the tail. The old guard + -- (`offset + 4 > len` inside a `offset + 13 <= len` loop) could never fire, so + -- a segment ending mid-header silently desynced the rest of the stream. + if offset + 13 > len then + pinfo.desegment_offset = offset + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return + end + local total = tvb(offset,4):uint() + -- PROTOCOL.md 6.1.1: 13 header bytes plus four NUL terminators is 17, + -- so nothing below that can describe a frame. This said 13 while + -- p2_scanner said 12, which meant a header-only frame was accepted by + -- one reader and refused by the other. + if total < P2_MIN_FRAME_LEN or total > 65536 then return end + if offset + total > len then + pinfo.desegment_offset = offset; pinfo.desegment_len = (offset+total)-len; return + end + dissect_one(tvb(offset,total):tvb(), pinfo, tree) + offset = offset + total + end +end + +local tcp = DissectorTable.get("tcp.port") +tcp:add(5033, p2) +tcp:add(5034, p2) diff --git a/dissectors/sma-speedwire/LICENSE b/dissectors/sma-speedwire/LICENSE new file mode 100644 index 0000000..5471dc1 --- /dev/null +++ b/dissectors/sma-speedwire/LICENSE @@ -0,0 +1,203 @@ + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/sma-speedwire/README.md b/dissectors/sma-speedwire/README.md new file mode 100644 index 0000000..9728f59 --- /dev/null +++ b/dissectors/sma-speedwire/README.md @@ -0,0 +1,45 @@ +# SMA Speedwire (onduleurs et compteurs solaires) + +Dissecteur Wireshark Lua du **protocole SMA Speedwire**, utilisé sur +Ethernet (UDP 9522, multidiffusion) par les onduleurs solaires et compteurs +d'énergie SMA : identifiant `SMA`, entrées étiquetées (groupe, découverte, +adresse IP) et décodage des trames SMA Net 2. Tiré de la bibliothèque Go +`sunny`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/bboehmke/sunny (fichier `wireshark/spw.lua`) | +| Commit importé | `5389c82be7d724a46b1297ec16f3521e05981bc0` du 25/05/2026 (branche `master`, dernier commit ; dernière modification du dissecteur : `036de0c` du 08/06/2021) | +| Licence amont | Apache-2.0 (`LICENSE` amont et en-tête du fichier : « Copyright 2019 Benjamin Böhmke […] Licensed under the Apache License, Version 2.0 ») | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Speedwire natif | + +L'issue citait `evcc-io/sunny`, qui n'est plus accessible (404 le +01/11/2026) ; le fichier est repris du dépôt de l'auteur original, +Benjamin Böhmke, dont l'en-tête de copyright figure dans le fichier. + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). Pas de fichier `NOTICE` amont. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `spw.lua` | Dissecteur `spw` (UDP 9522), champs `spw.*` | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête (l'en-tête Apache amont est conservée). + +## Utilisation + +Copier `spw.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, capturer +le trafic Speedwire du réseau local et filtrer avec `spw`. + +## Remarques + +- Le commentaire amont mentionne « udp port 12010 » mais le code enregistre + bien le port 9522 (port Speedwire SMA). +- Variables globales (`udp_table`, fonctions `parse_*`) comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/sma-speedwire/spw.lua b/dissectors/sma-speedwire/spw.lua new file mode 100644 index 0000000..fbdc7df --- /dev/null +++ b/dissectors/sma-speedwire/spw.lua @@ -0,0 +1,348 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/bboehmke/sunny (wireshark/spw.lua), +-- commit 5389c82be7d724a46b1297ec16f3521e05981bc0 du 25/05/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- Copyright 2019 Benjamin Böhmke . +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local spw_proto = Proto("spw","SMA Speedwire") + + +local pf_spw_id = ProtoField.new("ID", "spw.id", ftypes.STRING) +local pf_spw_end = ProtoField.uint32("spw.end", "End", base.HEX) + +-- general fields +local pf_spw_entry_length = ProtoField.uint16("spw.entry_length", "Entry Length", base.HEX) +local ENTRY_TAGS = { + [0x02a0] = "Tag0 (Group)", + [0x0010] = "SMA Net 2", + [0x0020] = "Discovery", + [0x0030] = "IP Address", +} +local pf_spw_entry_tag = ProtoField.uint16("spw.entry_tag", "Entry", base.HEX, ENTRY_TAGS) +local pf_spw_raw = ProtoField.new("Raw data", "spw.raw", ftypes.BYTES) + +-- Tag0 (Group) +local pf_spw_tag0_group = ProtoField.uint32("spw.tag0.group", "Group", base.HEX) + +-- IP Address +local pf_spw_ip = ProtoField.ipv4("spw.ip", "IP", base.HEX) + +-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +-- SMA Net 2 +-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +local SMA_NET2_IDS = { + [0x6069] = "Energy meter", + [0x6065] = "Device data", +} +local pf_spw_net2_id = ProtoField.uint16("spw.net2.id", "Protocol ID", base.HEX, SMA_NET2_IDS) + +-- Energy meter +local pf_net2_em_susys = ProtoField.uint16("spw.net2.em.susys_id", "SusyID", base.DEC) +local pf_net2_em_ser_no = ProtoField.uint32("spw.net2.em.ser_no", "SerNo", base.DEC) +local pf_net2_em_ticker = ProtoField.uint32("spw.net2.em.ticker", "Ticker (ms)", base.DEC) + +local pf_net2_em_obis_chan = ProtoField.uint8("spw.net2.em.obis.chan", "Chanel", base.DEC) +local pf_net2_em_obis_value = ProtoField.uint8("spw.net2.em.obis.value", "value", base.DEC) +local pf_net2_em_obis_type = ProtoField.uint8("spw.net2.em.obis.type", "type", base.DEC) +local pf_net2_em_obis_tariff = ProtoField.uint8("spw.net2.em.obis.tariff", "Tariff", base.DEC) + +local pf_net2_em_val = ProtoField.uint32("spw.net2.em.value", "Value", base.DEC) +local pf_net2_em_val_l = ProtoField.uint64("spw.net2.em.value_large", "Value", base.DEC) + +-- Device data +local pf_net2_dd_len = ProtoField.uint8("spw.net2.dd.length", "Length (1/4)", base.DEC) +local pf_net2_dd_control = ProtoField.uint8("spw.net2.dd.control", "Control", base.HEX) + +local pf_net2_dd_dst_susys = ProtoField.uint16("spw.net2.dd.dst_susys_id", "Dst SusyID", base.DEC) +local pf_net2_dd_dst_ser_no = ProtoField.uint32("spw.net2.dd.dst_ser_no", "Dst SerNo", base.DEC) +local pf_net2_dd_job_num = ProtoField.uint8("spw.net2.dd.job_num", "Job number", base.HEX) +local pf_net2_dd_src_susys = ProtoField.uint16("spw.net2.dd.src_susys_id", "Src SusyID", base.DEC) +local pf_net2_dd_src_ser_no = ProtoField.uint32("spw.net2.dd.src_ser_no", "Src SerNo", base.DEC) + +local pf_net2_dd_status = ProtoField.uint16("spw.net2.dd.status", "Status", base.HEX) +local pf_net2_dd_packet_count = ProtoField.uint16("spw.net2.dd.packet_count", "Packet count", base.HEX) +local pf_net2_dd_packet_id = ProtoField.uint16("spw.net2.dd.packet_id", "Packet ID", base.HEX) + +local pf_net2_dd_command = ProtoField.uint8("spw.net2.dd.command", "Command", base.HEX) +local pf_net2_dd_object = ProtoField.uint16("spw.net2.dd.object", "Object", base.HEX) +local pf_net2_dd_param = ProtoField.uint32("spw.net2.dd.param", "Param", base.HEX) + +local pf_net2_dd_resp_class = ProtoField.uint8("spw.net2.dd.resp_class", "Class", base.HEX) +local pf_net2_dd_resp_code = ProtoField.uint16("spw.net2.dd.resp_code", "Code", base.HEX) +local pf_net2_dd_resp_type = ProtoField.uint8("spw.net2.dd.resp_type", "Type", base.HEX) +local pf_net2_dd_resp_timestamp = ProtoField.uint64("spw.net2.dd.resp_timestamp", "Timestamp", base.DEC) + +local pf_net2_dd_resp_value = ProtoField.uint32("spw.net2.dd.resp_value", "Val32", base.DEC) +local pf_net2_dd_resp_value_i = ProtoField.int32("spw.net2.dd.resp_value", "iVal32", base.DEC) +local pf_net2_dd_resp_value_l = ProtoField.uint64("spw.net2.dd.resp_value_l", "Val64", base.DEC) +local pf_net2_dd_resp_value_s = ProtoField.string("spw.net2.dd.resp_value_s", "ValStr") + + +spw_proto.fields = { + pf_spw_id, pf_spw_end, + pf_spw_entry_length, pf_spw_entry_tag, pf_spw_raw, + + pf_spw_tag0_group, + pf_spw_ip, + + pf_spw_net2_id, + pf_net2_em_susys, pf_net2_em_ser_no, pf_net2_em_ticker, + pf_net2_em_obis_chan, pf_net2_em_obis_value, pf_net2_em_obis_type, pf_net2_em_obis_tariff, + pf_net2_em_val, pf_net2_em_val_l, + + pf_net2_dd_len, pf_net2_dd_control, + pf_net2_dd_dst_susys, pf_net2_dd_dst_ser_no, pf_net2_dd_job_num, pf_net2_dd_src_susys, pf_net2_dd_src_ser_no, + pf_net2_dd_status, pf_net2_dd_packet_count, pf_net2_dd_packet_id, + pf_net2_dd_command, pf_net2_dd_object, pf_net2_dd_param, + + pf_net2_dd_resp_class, pf_net2_dd_resp_code, pf_net2_dd_resp_type, pf_net2_dd_resp_timestamp, + pf_net2_dd_resp_value, pf_net2_dd_resp_value_l, pf_net2_dd_resp_value_s, pf_net2_dd_resp_value_i, +} + +-- dissect protocol +function spw_proto.dissector(buffer, pinfo, root) + pinfo.cols.protocol = "Speedwire" + + local spw_tree = root:add(spw_proto, buffer, "") + spw_tree:add(pf_spw_id, buffer:range(0x0, 4)) + + local offset = 0x04 + local length = buffer:range(offset, 2):uint() + local tag = buffer:range(offset+2, 2):uint() + + while tag > 0 or length > 0 do + local entry_tree = spw_tree:add(spw_proto, buffer:range(offset, length+4), "Entry: "..entry_name(tag)) + entry_tree:add(pf_spw_entry_length, buffer:range(offset, 2)) + --entry_tree:add(pf_spw_entry_tag, buffer:range(offset+2, 2)) + + local content = buffer:range(offset+4, length) + -- Tag0 (Group) + if tag == 0x02a0 then + entry_tree:add(pf_spw_tag0_group, content) + + -- SMA Net 2 + elseif tag == 0x0010 then + parse_net2(entry_tree, content) + + -- Discovery + elseif tag == 0x0020 then + -- No content + + -- IP Address + elseif tag == 0x0030 then + entry_tree:add(pf_spw_ip, content) + + else + entry_tree:add(pf_spw_raw, content) + end + + offset = offset + length + 4 + length = buffer:range(offset,2):uint() + tag = buffer:range(offset+2, 2):uint() + end + spw_tree:add(pf_spw_end, buffer:range(offset, 4)) +end + +function entry_name(tag) + local tag_string = string.format(" (0x%04X)", tag) + if ENTRY_TAGS[tag] == nil then + return "Unknown"..tag_string + else + return ENTRY_TAGS[tag]..tag_string + end +end + +-- load the udp.port table +udp_table = DissectorTable.get("udp.port") + +-- register our protocol to handle udp port 12010 +udp_table:add(9522, spw_proto) + + +-- SMA Net 2 +function parse_net2(root, buffer) + local id = buffer:range(0, 2):uint() + local proto_tree = root:add(spw_proto, buffer, "Protocol: "..protocol_name(id)) + + -- Energy meter + local content = buffer:range(2) + if id == 0x6069 then + parse_net2_emergy_meter(proto_tree, content) + + -- device data + elseif id == 0x6065 then + parse_net2_device_data(proto_tree, content) + + else + proto_tree:add(pf_spw_raw, content) + end +end + +function protocol_name(id) + local id_string = string.format(" (0x%04X)", id) + if SMA_NET2_IDS[id] == nil then + return "Unknown"..id_string + else + return SMA_NET2_IDS[id]..id_string + end +end + + +function parse_net2_emergy_meter(root, buffer) + root:add(pf_net2_em_susys, buffer:range(0, 2)) + root:add(pf_net2_em_ser_no, buffer:range(2, 4)) + root:add(pf_net2_em_ticker, buffer:range(6, 4)) + + local offset = 10 + while buffer:len() > offset+8 do + local obis_str = string.format("%d:%d.%d.%d", + buffer:range(offset, 1):uint(), + buffer:range(offset+1, 1):uint(), + buffer:range(offset+2, 1):uint(), + buffer:range(offset+3, 1):uint()) + local value_str = "" + + -- obis type + local val_length = 0 + if buffer:range(offset+2, 1):uint() == 8 then + -- TODO find better solution for big integers + value_str = string.format("%d", buffer:range(offset+8, 4):uint()) + val_length = 8 + else + value_str = string.format("%d", buffer:range(offset+4, 4):uint()) + val_length = 4 + end + + local value_tree = root:add(spw_proto, buffer:range(offset, val_length+4), obis_str.." - "..value_str) + local obis_tree = value_tree:add(spw_proto, buffer:range(offset, 4), obis_str) + obis_tree:add(pf_net2_em_obis_chan, buffer:range(offset, 1)) + obis_tree:add(pf_net2_em_obis_value, buffer:range(offset+1, 1)) + obis_tree:add(pf_net2_em_obis_type, buffer:range(offset+2, 1)) + obis_tree:add(pf_net2_em_obis_tariff, buffer:range(offset+3, 1)) + + if buffer:range(offset+2, 1):uint() == 8 then + value_tree:add(pf_net2_em_val_l, buffer:range(offset+4, 8)) + else + value_tree:add(pf_net2_em_val, buffer:range(offset+4, 4)) + end + offset = offset + 4 + val_length + end +end + +function parse_net2_device_data(root, buffer) + root:add_le(pf_net2_dd_len, buffer:range(0, 1)) + root:add_le(pf_net2_dd_control, buffer:range(1, 1)) + + root:add_le(pf_net2_dd_dst_susys, buffer:range(2, 2)) + root:add_le(pf_net2_dd_dst_ser_no, buffer:range(4, 4)) + -- 8 = unknown + root:add_le(pf_net2_dd_job_num, buffer:range(9, 1)) + root:add_le(pf_net2_dd_src_susys, buffer:range(10, 2)) + root:add_le(pf_net2_dd_src_ser_no, buffer:range(12, 4)) + -- 16,17 == 8,9 ??? + + root:add_le(pf_net2_dd_status, buffer:range(18, 2)) + root:add_le(pf_net2_dd_packet_count, buffer:range(20, 2)) + root:add_le(pf_net2_dd_packet_id, buffer:range(22, 2)) + root:add_le(pf_net2_dd_command, buffer:range(24, 1)) + root:add_le(pf_net2_dd_object, buffer:range(26, 2)) + + local offset = 28 + local param_count = buffer:range(25, 1):uint() + + if param_count > 0 then + local param_tree = root:add(spw_proto, buffer(offset, param_count*4), "Parameters") + while param_count > 0 do + param_tree:add_le(pf_net2_dd_param, buffer:range(offset, 4)) + + offset = offset + 4 + param_count = param_count - 1 + end + end + + -- check if content exists + if buffer:len() <= offset then + return + end + + data = buffer:range(offset) + if buffer:range(24, 1):uint() == 1 then + local obj = buffer:range(26, 2):le_uint() + local resp_tree = root:add(spw_proto, data, "Response") + + off = 0 + while off + 8 <= data:len() do + local data_type = data:range(off+3, 1):uint() + + local data_length = 0 + if data_type == 0x10 then + data_length = data:range(off+8, 32):string():len() + elseif data_type == 0x08 then + data_length = 8*4 + elseif obj == 0x5400 then + data_length = 8 + elseif data_type == 0x00 or data_type == 0x40 then + data_length = 5*4 + end + + local val_tree = resp_tree:add(spw_proto, data:range(off, data_length+8), "Value") + val_tree:add_le(pf_net2_dd_resp_class, data:range(off, 1)) + val_tree:add_le(pf_net2_dd_resp_code, data:range(off+1, 2)) + val_tree:add_le(pf_net2_dd_resp_type, data:range(off+3, 1)) + val_tree:add_le(pf_net2_dd_resp_timestamp, data:range(off+4, 4)) + + if data_type == 0x10 then + val_tree:add(pf_net2_dd_resp_value_s, data:range(off+8, data_length)) + elseif data_type == 0x08 then + for i = 0,7,1 do + val = data:range(off+8+4*i, 3) + + if val:le_uint() == 0xfffffe then + break + end + if data:range(off+8+4*i+3, 1):le_uint() == 1 then + val_tree:add_le(pf_net2_dd_resp_value, val) + end + end + elseif obj == 0x5400 then + val_tree:add_le(pf_net2_dd_resp_value_l, data:range(off+8, 8)) + + elseif data_type == 0x00 then + for i = 0,4,1 do + val = data:range(off+8+4*i, 4) + + if val:le_uint() == 0xffffffff then + break + end + val_tree:add_le(pf_net2_dd_resp_value, val) + end + + elseif data_type == 0x40 then + for i = 0,4,1 do + val = data:range(off+8+4*i, 4) + + if val:le_uint() == -0x80000000 then + break + end + val_tree:add_le(pf_net2_dd_resp_value_i, val) + end + end + + off = off + 8 + data_length + end + else + root:add(pf_spw_raw, data) + end +end diff --git a/dissectors/smp-mcumgr/LICENSE b/dissectors/smp-mcumgr/LICENSE new file mode 100644 index 0000000..38a30d5 --- /dev/null +++ b/dissectors/smp-mcumgr/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Pieter De Gendt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/smp-mcumgr/README.md b/dissectors/smp-mcumgr/README.md new file mode 100644 index 0000000..a85143b --- /dev/null +++ b/dissectors/smp-mcumgr/README.md @@ -0,0 +1,48 @@ +# SMP / MCUmgr (gestion d'appareils Zephyr sur UDP) + +Dissecteur Wireshark Lua du **SMP (Simple Management Protocol) de MCUmgr**, +protocole de gestion à distance des objets connectés sous Zephyr RTOS +(et MCUboot) : mise à jour de firmware, redémarrage, statistiques, +paramètres, fichiers, shell… Il décode l'en-tête de 8 octets (opération +lecture/écriture requête/réponse v1 et v2, drapeaux, longueur, groupe, +numéro de séquence, commande, avec noms des groupes et commandes +standards), passe la charge CBOR au dissecteur CBOR natif de Wireshark, et +relie requêtes et réponses (champs `smp_mcumgr.response_in` / +`smp_mcumgr.request_in`). Transport UDP, port 1337 par défaut +(préférence). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/pdgendt/wireshark-smp-mcumgr (fichier `smp_mcumgr.lua`) | +| Commit importé | `2981ee6471a984198c7ade1ab32de75f6977c773` du 08/09/2026 (branche `main`, dernier commit ; dernière modification du dissecteur : `07f9ae9` du 08/09/2026) | +| Licence amont | MIT (`LICENSE` amont, © 2026 Pieter De Gendt) | +| Natif Wireshark 4.6.4 | Non — le `smp` natif (`packet-smp.c`) est le Session Multiplex Protocol de TDS, sans rapport ; pas de dissecteur MCUmgr natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `smp_mcumgr.lua` | Dissecteur `smp_mcumgr` (UDP 1337 configurable, « Décoder comme… ») | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `smp_mcumgr.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `smp_mcumgr`. Le port se change dans Préférences → +Protocoles → SMP_MCUMGR, ou via Analyse → Décoder comme… → UDP port. + +## Remarques + +- Couvre le transport UDP uniquement ; SMP sur Bluetooth LE (GATT), série + ou CoAP n'est pas pris en charge par ce script. +- Le décodage de la charge dépend du dissecteur `cbor` natif (appel protégé + par `pcall`, info experte en cas d'échec). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/smp-mcumgr/smp_mcumgr.lua b/dissectors/smp-mcumgr/smp_mcumgr.lua new file mode 100644 index 0000000..5e56000 --- /dev/null +++ b/dissectors/smp-mcumgr/smp_mcumgr.lua @@ -0,0 +1,323 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/pdgendt/wireshark-smp-mcumgr (smp_mcumgr.lua), +-- commit 2981ee6471a984198c7ade1ab32de75f6977c773 du 08/09/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- smp_mcumgr.lua +-- Wireshark dissector for SMP (Simple Management Protocol) / MCUmgr over UDP +-- Default port: 1337 +-- +-- SMP Header (8 bytes, Big Endian): +-- Byte 0: OP (3 bits) | Version (2 bits) | Reserved (3 bits) +-- Byte 1: Flags +-- Bytes 2-3: Data Length (uint16, big-endian) +-- Bytes 4-5: Group ID (uint16, big-endian) +-- Byte 6: Sequence Number +-- Byte 7: Command ID +-- +-- Payload: CBOR-encoded data (variable length, may be absent) +-- +-- References: +-- https://docs.zephyrproject.org/latest/services/device_mgmt/smp_protocol.html +-- https://github.com/zephyrproject-rtos/mcumgr/blob/master/protocol.md + +-- ─── Protocol declaration ──────────────────────────────────────────────────── + +local smp_proto = Proto("smp_mcumgr", "SMP MCUmgr Protocol") + +-- ─── Expert info ───────────────────────────────────────────────────────────── + +local e_len_mismatch = ProtoExpert.new( + "smp_mcumgr.len_mismatch.expert", + "Header data length does not match the actual payload", + expert.group.MALFORMED, expert.severity.WARN) +local e_cbor_failed = ProtoExpert.new( + "smp_mcumgr.cbor_failed.expert", "CBOR decode failed", + expert.group.UNDECODED, expert.severity.WARN) +smp_proto.experts = { e_len_mismatch, e_cbor_failed } + +-- ─── Field definitions ─────────────────────────────────────────────────────── + +local f_op = ProtoField.uint8 ("smp_mcumgr.op", "Operation Code", base.DEC) +local f_version = ProtoField.uint8 ("smp_mcumgr.version", "SMP Version", base.DEC) +local f_reserved = ProtoField.uint8 ("smp_mcumgr.reserved", "Reserved", base.HEX) +local f_flags = ProtoField.uint8 ("smp_mcumgr.flags", "Flags", base.HEX) +local f_len = ProtoField.uint16("smp_mcumgr.len", "Data Length", base.DEC) +local f_group = ProtoField.uint16("smp_mcumgr.group", "Group ID", base.DEC) +local f_seq = ProtoField.uint8 ("smp_mcumgr.seq", "Sequence Number", base.DEC) +local f_id = ProtoField.uint8 ("smp_mcumgr.id", "Command ID", base.DEC) +local f_payload = ProtoField.bytes ("smp_mcumgr.payload", "CBOR Payload", base.SPACE) + +local f_response_in = ProtoField.framenum( + "smp_mcumgr.response_in", "Response in", base.NONE, frametype.RESPONSE) +local f_request_in = ProtoField.framenum( + "smp_mcumgr.request_in", "Request in", base.NONE, frametype.REQUEST) + +smp_proto.fields = { f_op, f_version, f_reserved, f_flags, f_len, f_group, + f_seq, f_id, f_payload, f_response_in, f_request_in } + +-- ─── Request/response correlation ──────────────────────────────────────────── +-- An exchange is identified by endpoint pair + group + command + sequence +-- number; requests have even op codes, responses odd ones. + +local pending_requests = {} -- endpoint/group/cmd/seq -> request frame +local exchange_response = {} -- request frame -> response frame +local exchange_request = {} -- response frame -> request frame + +function smp_proto.init() + pending_requests = {} + exchange_response = {} + exchange_request = {} +end + +-- ─── Value string tables ───────────────────────────────────────────────────── + +local op_names = { + [0] = "Read Request", + [1] = "Read Response", + [2] = "Write Request", + [3] = "Write Response", + [4] = "Read Request (v2)", + [5] = "Read Response (v2)", + [6] = "Write Request (v2)", + [7] = "Write Response (v2)", +} + +local group_names = { + [0] = "OS Management", + [1] = "Image Management", + [2] = "Statistics Management", + [3] = "Settings (Config) Management", + [4] = "Log Management (deprecated)", + [5] = "Crash Management", + [6] = "Split Image Management", + [7] = "Run Test Management", + [8] = "File Management", + [9] = "Shell Management", + [10] = "Enumeration Management", + [63] = "Zephyr Management", + [64] = "Peruser Group Base", +} + +-- Command IDs per group (group_id -> { cmd_id -> name }) +local cmd_names = { + [0] = { -- OS Management + [0] = "Echo", + [1] = "Console Echo Control", + [2] = "Task Statistics", + [3] = "Memory Pool Statistics", + [4] = "Date/Time", + [5] = "Reset", + [6] = "MCUmgr Parameters", + [7] = "Application Info", + [8] = "Boot Mode", + }, + [1] = { -- Image Management + [0] = "Image State", + [1] = "Image Upload", + [2] = "Image File", + [3] = "Core List", + [4] = "Core Load", + [5] = "Image Erase", + [6] = "Image Slot Info", + [7] = "Image Erase State", + }, + [2] = { -- Statistics Management + [0] = "Statistics Group List", + [1] = "Statistics Group", + }, + [3] = { -- Settings (Config) Management + [0] = "Read Setting", + [1] = "Write Setting", + [2] = "Delete Setting", + [3] = "Commit Settings", + [4] = "Load Settings", + [5] = "Save Settings", + }, + [8] = { -- File Management + [0] = "File Download / Upload", + [1] = "File Status", + [2] = "File Hash / Checksum", + [3] = "Supported File Hash / Checksum Types", + [4] = "File Close", + }, + [9] = { -- Shell Management + [0] = "Execute Command", + [1] = "Control", + }, + [10] = { -- Enumeration Management + [0] = "Count Groups", + [1] = "List Groups", + [2] = "List Commands", + [3] = "List Details", + }, + [63] = { -- Zephyr Management + [0] = "Erase Storage", + }, +} + +-- ─── Helper: lookup with fallback ──────────────────────────────────────────── + +local function lookup(tbl, key, fmt) + return tbl[key] or string.format(fmt or "Unknown (0x%02x)", key) +end + +local function lookup_cmd(group_id, cmd_id) + local g = cmd_names[group_id] + if g then + return g[cmd_id] or string.format("Unknown Command (%d)", cmd_id) + end + return string.format("Command %d", cmd_id) +end + +-- ─── Dissector ─────────────────────────────────────────────────────────────── + +function smp_proto.dissector(buffer, pinfo, tree) + local pkt_len = buffer:len() + + -- Need at least the 8-byte SMP header + if pkt_len < 8 then + return 0 + end + + pinfo.cols.protocol:set("SMP MCUmgr") + + -- Parse byte 0: Reserved (bits 7-5) | Version (bits 4-3) | OP (bits 2-0). + -- bitfield() counts from the most significant bit; using it avoids the + -- legacy `bit` library, kept only as a compatibility shim in Lua 5.4. + local reserved = buffer(0, 1):bitfield(0, 3) -- bits [7:5] + local version = buffer(0, 1):bitfield(3, 2) -- bits [4:3] + local op = buffer(0, 1):bitfield(5, 3) -- bits [2:0] + + local flags = buffer(1, 1):uint() + local data_len = buffer(2, 2):uint() + local group_id = buffer(4, 2):uint() + local seq = buffer(6, 1):uint() + local cmd_id = buffer(7, 1):uint() + + -- Build a human-readable summary for the packet list column + local op_str = lookup(op_names, op, "Op(%d)") + local group_str = lookup(group_names, group_id, "Group(%d)") + local cmd_str = lookup_cmd(group_id, cmd_id) + + pinfo.cols.info:set( + string.format("[%s] %s / %s seq=%d len=%d", + op_str, group_str, cmd_str, seq, data_len) + ) + + -- Build the protocol tree + local subtree = tree:add(smp_proto, buffer(0, pkt_len), "SMP MCUmgr Protocol") + + -- Correlate requests (even op) and responses (odd op) by endpoint + -- pair + group + command + sequence number + local is_response = (op % 2) == 1 + local exchange = string.format("%d/%d/%d", group_id, cmd_id, seq) + if not pinfo.visited then + if is_response then + local key = tostring(pinfo.dst) .. ":" .. tostring(pinfo.dst_port) + .. ">" .. tostring(pinfo.src) .. ":" .. tostring(pinfo.src_port) + .. "|" .. exchange + local request_frame = pending_requests[key] + if request_frame then + exchange_request[pinfo.number] = request_frame + exchange_response[request_frame] = pinfo.number + pending_requests[key] = nil + end + else + local key = tostring(pinfo.src) .. ":" .. tostring(pinfo.src_port) + .. ">" .. tostring(pinfo.dst) .. ":" .. tostring(pinfo.dst_port) + .. "|" .. exchange + pending_requests[key] = pinfo.number + end + end + if exchange_response[pinfo.number] then + subtree:add(f_response_in, + exchange_response[pinfo.number]):set_generated() + elseif exchange_request[pinfo.number] then + subtree:add(f_request_in, + exchange_request[pinfo.number]):set_generated() + end + + -- Header subtree + local hdr = subtree:add(buffer(0, 8), "SMP Header") + + -- Byte 0 sub-fields + local b0_item = hdr:add(buffer(0, 1), + string.format("Byte 0: OP=%d (%s), Version=%d, Reserved=0x%x", + op, op_str, version, reserved)) + b0_item:add(f_op, buffer(0, 1)):set_text( + string.format("Operation Code: %d (%s)", op, op_str)) + b0_item:add(f_version, buffer(0, 1)):set_text( + string.format("SMP Version: %d", version)) + b0_item:add(f_reserved, buffer(0, 1)):set_text( + string.format("Reserved: 0x%x", reserved)) + + hdr:add(f_flags, buffer(1, 1)):set_text( + string.format("Flags: 0x%02x", flags)) + hdr:add(f_len, buffer(2, 2)):set_text( + string.format("Data Length: %d bytes", data_len)) + hdr:add(f_group, buffer(4, 2)):set_text( + string.format("Group ID: %d (%s)", group_id, group_str)) + hdr:add(f_seq, buffer(6, 1)):set_text( + string.format("Sequence Number: %d", seq)) + hdr:add(f_id, buffer(7, 1)):set_text( + string.format("Command ID: %d (%s)", cmd_id, cmd_str)) + + -- CBOR Payload (if present) + local payload_len = pkt_len - 8 + if payload_len > 0 then + local payload_buf = buffer(8, payload_len) + local payload_item = subtree:add(f_payload, payload_buf) + payload_item:set_text( + string.format("CBOR Payload (%d bytes)", payload_len)) + + -- Attempt to hand off to Wireshark's built-in CBOR dissector if + -- available (Dissector.get raises when the name is unknown) + local found, cbor_dissector = pcall(Dissector.get, "cbor") + if found and cbor_dissector then + local ok, err = pcall(function() + cbor_dissector:call(payload_buf:tvb(), pinfo, subtree) + end) + if not ok then + subtree:add_proto_expert_info(e_cbor_failed, + "CBOR decode failed: " .. tostring(err)) + end + end + end + + -- Expert info for unusual conditions + if data_len ~= payload_len then + subtree:add_proto_expert_info(e_len_mismatch, + string.format( + "Header Data Length (%d) does not match actual payload (%d)", + data_len, payload_len)) + end + + return pkt_len +end + +-- ─── Registration ──────────────────────────────────────────────────────────── +-- The UDP port is a protocol preference (default 1337); the protocol is +-- also offered via Decode As for other ports. + +local udp_table = DissectorTable.get("udp.port") + +smp_proto.prefs.port = Pref.uint( + "port", 1337, "UDP port carrying SMP/MCUmgr traffic") + +local bound_port = nil +local function bind_port() + if bound_port then + udp_table:remove(bound_port, smp_proto) + end + bound_port = smp_proto.prefs.port + if bound_port and bound_port > 0 then + udp_table:add(bound_port, smp_proto) + end +end +function smp_proto.prefs_changed() + bind_port() +end +bind_port() +udp_table:add_for_decode_as(smp_proto) + +print("[smp_mcumgr] SMP MCUmgr dissector loaded - port " .. tostring(bound_port)) diff --git a/dissectors/solarman-v5/LICENSE b/dissectors/solarman-v5/LICENSE new file mode 100644 index 0000000..95b626b --- /dev/null +++ b/dissectors/solarman-v5/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 0xb1ff + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/solarman-v5/README.md b/dissectors/solarman-v5/README.md new file mode 100644 index 0000000..7146e30 --- /dev/null +++ b/dissectors/solarman-v5/README.md @@ -0,0 +1,48 @@ +# Solarman V5 (onduleurs solaires, protocole cloud) + +Dissecteur Wireshark Lua du **protocole cloud Solarman V5**, échangé entre +l'enregistreur (logger Wi-Fi) de micro-onduleurs solaires — Bosswerk MI600 +et modèles proches (Bosswerk MI300, Deye SUN600G3 / SUN300G3…) — et le +serveur Solarman, sur TCP 10000 : en-tête V5 (longueur, type de message, +numéros de séquence, numéro de série du logger) et décodage d'une partie +des messages (hello, données, réponses serveur, commandes AT). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/0xb1ff/solarman-dissector | +| Commit importé | `7ad7e11757c2db8459ff34f6370dec85769a22d7` du 28/11/2022 (branche `main`, dernier commit) | +| Licence amont | MIT (`LICENSE` amont, © 2022 0xb1ff ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Solarman natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `solarmanv5.lua` | Dissecteur `SolarmanV5` (TCP 10000), champs `solarmanv5.*` | +| `messages/*.md` | Analyse amont octet par octet des messages (hello, fin de hello, données, réponse serveur, commande AT et réponse), en anglais | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête du fichier Lua. + +## Utilisation + +Copier `solarmanv5.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, ouvrir +une capture du trafic entre l'onduleur et le serveur cloud (par exemple +`tcpdump` sur le routeur, comme le décrit l'amont) et filtrer avec +`solarmanv5`. + +## Remarques + +- L'amont précise que le dissecteur ne couvre qu'une partie de son analyse + (`messages/`) ; le message « heartbeat » cité dans le README amont n'a pas + de fiche (`decode_heartbeat.md` absent de l'amont). +- Le protocole varie selon les onduleurs (autre implémentation citée dans + l'issue : marxram/spidr). +- Variables globales (`solarmanv5_protocol`, champs) comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/solarman-v5/messages/decode_at-response.md b/dissectors/solarman-v5/messages/decode_at-response.md new file mode 100644 index 0000000..39493be --- /dev/null +++ b/dissectors/solarman-v5/messages/decode_at-response.md @@ -0,0 +1,42 @@ +# unit AT response message +##### [back to readme](../README.md) +V5 table + +message type 0x1510 + +message size depends on payload + +| HEX | DEC | TYPE | VALUE | +|------ |-----: |---------- |-------------------------------------------------------------------------------------------------------------- | +| 0x00 | 0 | uInt8 | always a5 | +| 0x01 | 1 | uInt16LE | msg length - excl msg header(0x00 - 0x0A), checksum and last byte | +| 0x02 | 2 | " | msg length | +| 0x03 | 3 | uInt16LE | always 10 msg type - AT response msg | +| 0x04 | 4 | " | always 15 msg type - AT response msg | +| 0x05 | 5 | uInt8 | server message serial nr - starts from 01 (synced with server) | +| 0x06 | 6 | uInt8 | unit message serial nr - starts from 01 | +| 0x07 | 7 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x08 | 8 | " | data logger SN (Embedded Device SN) | +| 0x09 | 9 | " | data logger SN (Embedded Device SN) | +| 0x0A | 10 | " | data logger SN (Embedded Device SN) | +| ---- | --- | -------- | | +| 0x0B | 11 | uInt8 | frame type - always 01 (data logger) | +| 0x0C | 12 | uInt8 | status - 0x01: OK | +| 0x0D | 13 | uInt32LE | uptime ? | +| 0x0E | 14 | " | uptime ? | +| 0x0F | 15 | " | uptime ? | +| 0x10 | 16 | " | uptime ? | +| 0x11 | 17 | uInt32LE | timer ? | +| 0x12 | 18 | " | timer ? | +| 0x13 | 19 | " | timer ? | +| 0x14 | 20 | " | timer ? | +| 0x15 | 21 | uInt32LE | offset time ? | +| 0x16 | 22 | " | offset time ? | +| 0x17 | 23 | " | offset time ? | +| 0x18 | 24 | " | offset time ? | +| 0x19 | 25 | string | AT response, e.g. '+ok' | +| ---- | --- | -------- | | +| 0x.. | .. | uInt8 | checksum - add all bytes, except first, last, and checksum itself, then mod 256 | +| 0x.. | .. | uInt8 | always 0x15 | + +Source: https://www.photovoltaikforum.com/thread/179529-daten-von-deye-sun-mikrowechselrichtern-abfangen/?pageNo=3 diff --git a/dissectors/solarman-v5/messages/decode_data.md b/dissectors/solarman-v5/messages/decode_data.md new file mode 100644 index 0000000..0da80f1 --- /dev/null +++ b/dissectors/solarman-v5/messages/decode_data.md @@ -0,0 +1,278 @@ +# data message +##### [back to readme](../README.md) +V5 table +message type 0x4210 +602 bytes on wire +547 bytes SolarmanV5 data + +| HEX | DEC | TYPE | VALUE | +|------ |-----: |---------- |-------------------------------------------------------------------------------------------------------------- | +| 0x00 | 0 | uInt8 | always 0xA5 | +| 0x01 | 1 | uInt16LE | always 0x16 msg length - 534 bytes excl msg header(0x00 - 0x0A), checksum and last byte | +| 0x02 | 2 | uInt16LE | always 0x02 msg length | +| 0x03 | 3 | uInt16LE | always 0x10 msg type - data | +| 0x04 | 4 | uInt16LE | always 0x42 msg type - data | +| 0x05 | 5 | uInt8 | server message serial nr - copy of last server message serial nr received from server | +| 0x06 | 6 | uInt8 | inverter message serial nr - incremented from last inverter message serial nr sent to server | +| 0x07 | 7 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x08 | 8 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x09 | 9 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x0A | 10 | uInt32LE | data logger SN (Embedded Device SN) | +| ---- | --- | -------- | | +| 0x0B | 11 | uInt8 | always 0x01 | +| 0x0C | 12 | uInt16LE | always 0x08 (Sensor Type) | +| 0x0D | 13 | uInt16LE | always 0x54 (Sensor Type) | +| 0x0E | 14 | uInt32LE | total operation time - in seconds | +| 0x0F | 15 | uInt32LE | total operation time | +| 0x10 | 16 | uInt32LE | total operation time | +| 0x11 | 17 | uInt32LE | total operation time | +| 0x12 | 18 | uInt32LE | timer - every >= 5240 s - reset after ~5240 seconds (1.5 h interval?), | +| 0x13 | 19 | uInt32LE | timer - every >= 5240 s - communication restarts with hello_msg | +| 0x14 | 20 | uInt32LE | timer - every >= 5240 s | +| 0x15 | 21 | uInt32LE | timer - every >= 5240 s | +| 0x16 | 22 | uInt32LE | offset time (Unix timestamp) | +| 0x17 | 23 | uInt32LE | offset time | +| 0x18 | 24 | uInt32LE | offset time | +| 0x19 | 25 | uInt32LE | offset time | +| 0x1A | 26 | uInt16LE | status (0x01 = OK) | +| 0x1B | 27 | uInt16LE | always 00 | +| 0x1C | 28 | uInt16LE | data message serial number, incremented with every msg, no reset - (uInt32LE?) | +| 0x1D | 29 | uInt16LE | data message serial number | +| 0x1E | 30 | uInt16LE | always 00 | +| 0x1F | 31 | uInt16LE | always 00 | +| 0x20 | 32 | string | inverter SN - string (10 bytes, ASCII coded) | +| 0x21 | 33 | string | inverter SN - string | +| 0x22 | 34 | string | inverter SN - string | +| 0x23 | 35 | string | inverter SN - string | +| 0x24 | 36 | string | inverter SN - string | +| 0x25 | 37 | string | inverter SN - string | +| 0x26 | 38 | string | inverter SN - string | +| 0x27 | 39 | string | inverter SN - string | +| 0x28 | 40 | string | inverter SN - string | +| 0x29 | 41 | string | inverter SN - string | +| 0x2A | 42 | uInt8 | always 0x04 ? | +| 0x2B | 43 | uInt8 | always 0x00 ? | +| 0x2C | 44 | uInt32LE | daily energy in kWh/100 | +| 0x2D | 45 | uInt32LE | daily energy in kWh/100 | +| 0x2E | 46 | uInt32LE | daily energy in kWh/100 | +| 0x2F | 47 | uInt32LE | daily energy in kWh/100 | +| 0x30 | 48 | uInt32LE | total energy in kWh/100 - (uInt64LE ?) | +| 0x31 | 49 | uInt32LE | total energy in kWh/100 | +| 0x32 | 50 | uInt32LE | total energy in kWh/100 | +| 0x33 | 51 | uInt32LE | total energy in kWh/100 | +| 0x34 | 52 | uInt8 | always 0x00 (?) | +| 0x35 | 53 | uInt8 | always 0x00 | +| 0x36 | 54 | uInt8 | always 0x00 | +| 0x36 | 55 | uInt8 | always 0x00 | +| 0x38 | 56 | uInt16LE | grid voltage in V/10 | +| 0x37 | 57 | uInt16LE | grid voltage in V/10 | +| 0x3A | 58 | uInt8 | always 0x00 | +| 0x3B | 59 | uInt8 | always 0x00 | +| 0x3C | 60 | uInt8 | always 0x00 | +| 0x3D | 61 | uInt8 | always 0x00 | +| 0x3E | 62 | uInt8 | always 0x00 | +| 0x3F | 63 | uInt8 | always 0x00 | +| 0x40 | 64 | uInt8 | always 0x00 | +| 0x41 | 65 | uInt8 | always 0x00 | +| 0x42 | 66 | uInt8 | always 0x00 | +| 0x43 | 67 | uInt8 | always 0x00 | +| 0x44 | 68 | uInt16LE | grid frequency in Hz/100 | +| 0x45 | 79 | uInt16LE | grid frequency in Hz/100 | +| 0x46 | 70 | uInt16LE | power to grid in W | +| 0x47 | 71 | uInt16LE | power to grid in W | +| 0x48 | 72 | uInt8 | always 0x00 | +| 0x49 | 73 | uInt8 | always 0x00 | +| 0x4A | 74 | int16LE | heatsink temperature in °C/100 (signed!) | +| 0x4B | 75 | int16LE | heatsink temperature in °C/100 | +| 0x4C | 76 | uInt8 | always 0x18 ? | +| 0x4D | 77 | uInt8 | always 0xFC ? | +| 0x4E | 78 | uInt8 | always 0x18 ? | +| 0x4F | 79 | uInt8 | always 0xFC ? | +| 0x50 | 80 | uInt8 | always 0x18 ? | +| 0x51 | 81 | uInt8 | always 0xFC ? | +| 0x52 | 82 | uInt8 | always 0x18 ? | +| 0x53 | 83 | uInt8 | always 0xFC ? | +| 0x54 | 84 | uInt8 | always 0x00 ? | +| 0x55 | 85 | uInt8 | always 0x00 ? | +| 0x56 | 86 | uInt8 | always 0x00 ? | +| 0x57 | 87 | uInt8 | always 0x00 ? | +| 0x58 | 88 | uInt8 | always 0x00 ? | +| 0x59 | 89 | uInt8 | always 0x00 ? | +| 0x5A | 90 | uInt8 | always 0x00 ? | +| 0x5B | 91 | uInt8 | always 0x00 ? | +| 0x5C | 92 | uInt8 | always 0x00 ? | +| 0x5D | 93 | uInt8 | always 0x00 ? | +| 0x5E | 94 | uInt8 | always 0x00 ? | +| 0x5F | 95 | uInt8 | always 0x00 ? | +| 0x60 | 96 | uInt16LE | VDC1 in V/10 | +| 0x61 | 97 | uInt16LE | VDC1 in V/10 | +| 0x62 | 98 | uInt16LE | IDC1 in A/10 | +| 0x63 | 99 | uInt16LE | IDC1 in A/10 | +| 0x64 | 100 | uInt16LE | VDC2 in V/10 | +| 0x65 | 101 | uInt16LE | VDC2 in V/10 | +| 0x66 | 102 | uInt16LE | IDC2 in A/10 | +| 0x67 | 103 | uInt16LE | IDC2 in A/10 | +| 0x68 | 104 | uInt8 | always 0x00 ? | +| 0x69 | 105 | uInt8 | always 0x00 ? | +| 0x6A | 106 | uInt8 | always 0x00 ? | +| 0x6B | 107 | uInt8 | always 0x00 ? | +| 0x6C | 108 | uInt8 | always 0x00 ? | +| 0x6D | 109 | uInt8 | always 0x00 ? | +| 0x6E | 110 | uInt8 | always 0x00 ? | +| 0x6F | 111 | uInt8 | always 0x00 ? | +| 0x70 | 112 | string | inverter communication protocol version (ASCII, 8 bytes) | +| 0x71 | 113 | string | inverter communication protocol version | +| 0x72 | 114 | string | inverter communication protocol version | +| 0x73 | 115 | string | inverter communication protocol version | +| 0x74 | 116 | string | inverter communication protocol version | +| 0x75 | 117 | string | inverter communication protocol version | +| 0x76 | 118 | string | inverter communication protocol version | +| 0x77 | 119 | string | inverter communication protocol version | +| 0x78 | 120 | string | inverter control board firmware version (ASCII, 8 bytes) | +| 0x79 | 121 | string | inverter control board firmware version | +| 0x7A | 122 | string | inverter control board firmware version | +| 0x7B | 123 | string | inverter control board firmware version | +| 0x7C | 124 | string | inverter control board firmware version | +| 0x7D | 125 | string | inverter control board firmware version | +| 0x7E | 126 | string | inverter control board firmware version | +| 0x7F | 127 | string | inverter control board firmware version | +| 0x80 | 128 | string | inverter communication board firmware version (ASCII, 8 bytes) | +| 0x81 | 129 | string | inverter communication board firmware version | +| 0x82 | 130 | string | inverter communication board firmware version | +| 0x83 | 131 | string | inverter communication board firmware version | +| 0x84 | 132 | string | inverter communication board firmware version | +| 0x85 | 133 | string | inverter communication board firmware version | +| 0x86 | 134 | string | inverter communication board firmware version | +| 0x87 | 134 | string | inverter communication board firmware version | +| 0x88 | 134 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0x89 | 134 | uInt16 | always 0x00 ? | +| 0x8A | 138 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0x8B | 139 | uInt16 | always 0x00 ? | +| 0x8C | 140 | uInt16 | rated power in W/10 (big endian! 0x1770 = 6000 = 600 W) | +| 0x8D | 141 | uInt16 | rated power in W/10 | +| 0x8E | 142 | uInt16 | always 0x02 ? (0x0201 = 513) | +| 0x8F | 143 | uInt16 | always 0x01 ? | +| 0x90 | 144 | uInt16 | always 0x00 ? (device type 4 ?) | +| 0x91 | 145 | uInt16 | always 0x04 ? | +| 0x92 | 146 | uInt16 | always 0x00 ? (0x0001 = 1) | +| 0x93 | 147 | uInt16 | always 0x01 ? | +| 0x94 | 148 | uInt16 | always 0x00 ? (0x0001 = 1) | +| 0x95 | 149 | uInt16 | always 0x01 ? | +| 0x96 | 150 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0x97 | 151 | uInt16 | always 0x00 ? | +| 0x98 | 152 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0x99 | 153 | uInt16 | always 0x00 ? | +| 0x9A | 154 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0x9B | 155 | uInt16 | always 0x00 ? | +| 0x9C | 156 | uInt16 | always 0x02 ? (0x020c = 524) | +| 0x9D | 157 | uInt16 | always 0x0c ? | +| 0x9E | 158 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0x9F | 159 | uInt16 | always 0x00 ? | +| 0xA0 | 160 | uInt16 | always 0x02 ? (0x0213 = 531) | +| 0xA1 | 161 | uInt16 | always 0x0c ? | +| 0xA2 | 162 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0xA3 | 163 | uInt16 | always 0x00 ? | +| 0xA4 | 164 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0xA5 | 165 | uInt16 | always 0x00 ? | +| 0xA6 | 166 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0xA7 | 167 | uInt16 | always 0x00 ? | +| 0xA8 | 168 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0xA9 | 169 | uInt16 | always 0x00 ? | +| 0xAA | 170 | string | micro inverter port 1 (16 bytes, ASCII, padded with 0x20 = ) | +| 0xAB | 171 | string | micro inverter port 1 | +| 0xAC | 172 | string | micro inverter port 1 | +| 0xAD | 173 | string | micro inverter port 1 | +| 0xAE | 174 | string | micro inverter port 1 | +| 0xAF | 175 | string | micro inverter port 1 | +| 0xB0 | 176 | string | micro inverter port 1 | +| 0xB1 | 177 | string | micro inverter port 1 | +| 0xB2 | 178 | string | micro inverter port 1 | +| 0xB3 | 179 | string | micro inverter port 1 | +| 0xB4 | 180 | string | micro inverter port 1 | +| 0xB5 | 181 | string | micro inverter port 1 | +| 0xB6 | 182 | string | micro inverter port 1 | +| 0xB7 | 183 | string | micro inverter port 1 | +| 0xB8 | 184 | string | micro inverter port 1 | +| 0xB9 | 185 | string | micro inverter port 1 | +| 0xBA | 186 | string | micro inverter port 2 (16 bytes, ASCII, padded with 0x20 = ) | +| 0xBB | 187 | string | micro inverter port 2 | +| 0xBC | 188 | string | micro inverter port 2 | +| 0xBD | 189 | string | micro inverter port 2 | +| 0xBE | 190 | string | micro inverter port 2 | +| 0xBF | 191 | string | micro inverter port 2 | +| 0xC0 | 192 | string | micro inverter port 2 | +| 0xC1 | 193 | string | micro inverter port 2 | +| 0xC2 | 194 | string | micro inverter port 2 | +| 0xC3 | 195 | string | micro inverter port 2 | +| 0xC4 | 196 | string | micro inverter port 2 | +| 0xC5 | 197 | string | micro inverter port 2 | +| 0xC6 | 198 | string | micro inverter port 2 | +| 0xC7 | 199 | string | micro inverter port 2 | +| 0xC8 | 200 | string | micro inverter port 2 | +| 0xC9 | 201 | string | micro inverter port 2 | +| 0xCA | 202 | string | micro inverter port 3 (16 bytes, ASCII, padded with 0x20 = ) | +| 0xCB | 203 | string | micro inverter port 3 | +| 0xCC | 204 | string | micro inverter port 3 | +| 0xCD | 205 | string | micro inverter port 3 | +| 0xCE | 206 | string | micro inverter port 3 | +| 0xCF | 207 | string | micro inverter port 3 | +| 0xD0 | 200 | string | micro inverter port 3 | +| 0xD1 | 209 | string | micro inverter port 3 | +| 0xD2 | 210 | string | micro inverter port 3 | +| 0xD3 | 211 | string | micro inverter port 3 | +| 0xD4 | 212 | string | micro inverter port 3 | +| 0xD5 | 213 | string | micro inverter port 3 | +| 0xD6 | 214 | string | micro inverter port 3 | +| 0xD7 | 215 | string | micro inverter port 3 | +| 0xD8 | 216 | string | micro inverter port 3 | +| 0xD9 | 217 | string | micro inverter port 3 | +| 0xDA | 218 | string | micro inverter port 4 (16 bytes, ASCII, padded with 0x20 = ) | +| 0xDB | 219 | string | micro inverter port 4 | +| 0xDC | 220 | string | micro inverter port 4 | +| 0xDD | 221 | string | micro inverter port 4 | +| 0xDE | 222 | string | micro inverter port 4 | +| 0xDF | 223 | string | micro inverter port 4 | +| 0xE0 | 224 | string | micro inverter port 4 | +| 0xE1 | 225 | string | micro inverter port 4 | +| 0xE2 | 226 | string | micro inverter port 4 | +| 0xE3 | 227 | string | micro inverter port 4 | +| 0xE4 | 228 | string | micro inverter port 4 | +| 0xE5 | 229 | string | micro inverter port 4 | +| 0xE6 | 230 | string | micro inverter port 4 | +| 0xE7 | 231 | string | micro inverter port 4 | +| 0xE8 | 232 | string | micro inverter port 4 | +| 0xE9 | 233 | string | micro inverter port 4 | +| 0xEA | 234 | uInt16 | overfrequency and load reduction starting point (in Hz/100) | +| 0xEB | 235 | uInt16 | overfrequency and load reduction starting point | +| 0xEC | 236 | uInt16 | overfrequency and load reduction percentage (in %) | +| 0xED | 237 | uInt16 | overfrequency and load reduction percentage | +| 0xEE | 238 | uInt16 | always 0x00 ? (0x0001 = 1) | +| 0xEF | 239 | uInt16 | always 0x01 ? | +| 0xF0 | 240 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0xF1 | 241 | uInt16 | always 0x00 ? | +| 0xF2 | 242 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0xF3 | 243 | uInt16 | always 0x00 ? | +| 0xF4 | 244 | uInt16 | always 0x00 ? (0x0000 = 0) | +| 0xF5 | 245 | uInt16 | always 0x00 ? | +| 0xF6 | 246 | uInt16 | grid voltage upper limit (in V/10) | +| 0xF7 | 247 | uInt16 | grid voltage upper limit | +| 0xF8 | 248 | uInt16 | grid voltage lower limit (in V/10) | +| 0xF9 | 249 | uInt16 | grid voltage lower limit | +| 0xFA | 250 | uInt16 | grid frequency upper limit (in Hz/100) | +| 0xFB | 251 | uInt16 | grid frequency upper limit | +| 0xFC | 252 | uInt16 | grid frequency lower limit (in Hz/100) | +| 0xFD | 253 | uInt16 | grid frequency lower limit | +| 0xFE | 254 | uInt16 | start-up self-checking time (in seconds) | +| 0xFF | 255 | uInt16 | start-up self-checking time | +| 0x100 | 256 | uInt8 | year | +| 0x101 | 257 | uInt8 | month | +| 0x102 | 258 | uInt8 | day | +| 0x103 | 259 | uInt8 | hour | +| 0x104 | 260 | uInt8 | minutes | +| 0x105 | 261 | uInt8 | seconds | +| | | | | +| .. | .. | tbd | tbd | +| | | | | +| ---- | --- | -------- | | +| 0x221 | 545 | uInt8 | checksum - add all bytes, except first, last, and checksum itself, then mod 256 | +| 0x222 | 546 | uInt8 | always 0x15 | diff --git a/dissectors/solarman-v5/messages/decode_hello-msg.md b/dissectors/solarman-v5/messages/decode_hello-msg.md new file mode 100644 index 0000000..3c434de --- /dev/null +++ b/dissectors/solarman-v5/messages/decode_hello-msg.md @@ -0,0 +1,157 @@ +# hello message +##### [back to readme](../README.md) +V5 table + +message type 0x4110 + +197 bytes on wire + +143 bytes SolarmanV5 data + +| HEX | DEC | TYPE | VALUE | +|------ |-----: |---------- |-------------------------------------------------------------------------------------------------------------- | +| 0x00 | 0 | uInt8 | always a5 | +| 0x01 | 1 | uInt16LE | always 130 msg length - excl msg header(0x00 - 0x0A), checksum and last byte | +| 0x02 | 2 | uInt16LE | always 00 msg length | +| 0x03 | 3 | uInt16LE | always 10 msg type - hello msg | +| 0x04 | 4 | uInt16LE | always 41 msg type - hello msg | +| 0x05 | 5 | uInt8 | server message serial nr - starts from 00 (synced with server) | +| 0x06 | 6 | uInt8 | inverter message serial nr - starts from 01 | +| 0x07 | 7 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x08 | 8 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x09 | 9 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x0A | 10 | uInt32LE | data logger SN (Embedded Device SN) | +| ---- | --- | -------- | | +| 0x0B | 11 | uInt8 | always 01 | +| 0x0C | 12 | uInt32LE | total operation time (sec) | +| 0x0D | 13 | uInt32LE | total operation time (sec) | +| 0x0E | 14 | uInt32LE | total operation time (sec) | +| 0x0F | 15 | uInt32LE | total operation time (sec) | +| 0x10 | 16 | uInt32LE | timer - every >= 5240 s - reset after ~5240 seconds (1.5 h interval?), | +| 0x11 | 17 | uInt32LE | timer - every >= 5240 s - communication restarts with hello_msg | +| 0x12 | 18 | uInt32LE | timer - every >= 5240 s | +| 0x13 | 19 | uInt32LE | timer - every >= 5240 s | +| 0x14 | 20 | uInt32LE | always 00 | +| 0x15 | 21 | uInt32LE | always 00 | +| 0x16 | 22 | uInt32LE | always 00 | +| 0x17 | 23 | uInt32LE | always 00 | +| 0x18 | 24 | uInt8 | upload period, always 5 (minutes) | +| 0x19 | 25 | uInt8 | data acquisition period, always 60 (seconds) | +| 0x1A | 26 | uInt8 | heart rate, always 120 (seconds) | +| 0x1B | 27 | uInt8 | always 0x01 (max nr of connected devices or command type ?) | +| 0x1C | 28 | uInt8 | wifi signal strength | +| 0x1D | 29 | uInt8 | always 0x01 (sensor type nr ?) | +| 0x1E | 30 | string | module version - string (40 bytes, ASCII code, padded with 00) | +| 0x1F | 31 | string | module version - string | +| 0x20 | 32 | string | module version - string I | +| 0x21 | 33 | string | module version - string | +| 0x22 | 34 | string | module version - string | +| 0x23 | 35 | string | module version - string | +| 0x24 | 36 | string | module version - string | +| 0x25 | 37 | string | module version - string | +| 0x26 | 38 | string | module version - string | +| 0x27 | 39 | string | module version - string | +| 0x28 | 40 | string | module version - string | +| 0x29 | 41 | string | module version - string | +| 0x2A | 42 | string | module version - string | +| 0x2B | 43 | string | module version - string | +| 0x2C | 44 | string | module version - string | +| 0x2D | 45 | string | module version - string | +| 0x2E | 46 | string | module version - string | +| 0x2F | 47 | string | module version - string | +| 0x30 | 48 | string | module version - string | +| 0x31 | 49 | string | module version - string | +| 0x32 | 50 | string | module version - string | +| 0x33 | 51 | string | module version - string | +| 0x34 | 52 | string | module version - string | +| 0x35 | 53 | string | module version - string | +| 0x36 | 54 | string | module version - string | +| 0x37 | 55 | string | module version - string | +| 0x38 | 56 | string | module version - string | +| 0x39 | 57 | string | module version - string | +| 0x3A | 58 | string | module version - string | +| 0x3B | 59 | string | module version - string | +| 0x3C | 60 | string | module version - string | +| 0x3D | 61 | string | module version - string | +| 0x3E | 62 | string | module version - string | +| 0x3F | 63 | string | module version - string | +| 0x40 | 64 | string | module version - string | +| 0x41 | 65 | string | module version - string | +| 0x42 | 66 | string | module version - string | +| 0x43 | 67 | string | module version - string | +| 0x44 | 68 | string | module version - string | +| 0x45 | 69 | string | module version - string | +| 0x46 | 70 | hex | STA mac address (6) | +| 0x47 | 71 | hex | STA mac address | +| 0x48 | 72 | hex | STA mac address | +| 0x49 | 73 | hex | STA mac address | +| 0x4A | 74 | hex | STA mac address | +| 0x4B | 75 | hex | STA mac address | +| 0x4C | 76 | string | local IP - string (16 bytes ?, ASCII coded, padded with 00 at end) | +| 0x4D | 77 | string | local IP - string | +| 0x4E | 78 | string | local IP - string | +| 0x4F | 79 | string | local IP - string | +| 0x50 | 80 | string | local IP - string | +| 0x51 | 81 | string | local IP - string | +| 0x52 | 82 | string | local IP - string | +| 0x53 | 83 | string | local IP - string | +| 0x54 | 84 | string | local IP - string | +| 0x55 | 85 | string | local IP - string | +| 0x56 | 86 | string | local IP - string | +| 0x57 | 87 | string | local IP - string | +| 0x58 | 88 | string | local IP - string | +| 0x59 | 89 | string | local IP - string | +| 0x5A | 90 | string | local IP - string | +| 0x5B | 91 | string | local IP - string | +| 0x5C | 92 | uInt8 | always 0x00 | +| 0x5D | 93 | uInt8 | always 0x00 | +| 0x5E | 94 | uInt8 | always 0x01 | +| 0x5F | 95 | uInt8 | always 0x06 | +| 0x60 | 96 | uInt8 | always 0x54 | +| 0x61 | 97 | uInt8 | always 0x07 | +| 0x62 | 98 | uInt8 | always 0x00 | +| 0x63 | 99 | uInt8 | always 0xFF (AT+ Update Command Supported ?) | +| 0x64 | 100 | string | Extended System Version - string (40 bytes, ASCII code, padded with 00) | +| 0x65 | 101 | string | Extended System Version - string | +| 0x66 | 102 | string | Extended System Version - string I | +| 0x67 | 103 | string | Extended System Version - string | +| 0x68 | 104 | string | Extended System Version - string | +| 0x69 | 105 | string | Extended System Version - string | +| 0x6A | 106 | string | Extended System Version - string | +| 0x6B | 107 | string | Extended System Version - string | +| 0x6C | 108 | string | Extended System Version - string | +| 0x6D | 109 | string | Extended System Version - string | +| 0x6E | 110 | string | Extended System Version - string | +| 0x6F | 111 | string | Extended System Version - string | +| 0x70 | 112 | string | Extended System Version - string | +| 0x71 | 113 | string | Extended System Version - string | +| 0x72 | 114 | string | Extended System Version - string | +| 0x73 | 115 | string | Extended System Version - string | +| 0x74 | 116 | string | Extended System Version - string | +| 0x75 | 117 | string | Extended System Version - string | +| 0x76 | 118 | string | Extended System Version - string | +| 0x77 | 119 | string | Extended System Version - string | +| 0x78 | 120 | string | Extended System Version - string | +| 0x79 | 121 | string | Extended System Version - string | +| 0x7A | 122 | string | Extended System Version - string | +| 0x7B | 123 | string | Extended System Version - string | +| 0x7C | 124 | string | Extended System Version - string | +| 0x7D | 125 | string | Extended System Version - string | +| 0x7E | 126 | string | Extended System Version - string | +| 0x7F | 127 | string | Extended System Version - string | +| 0x80 | 128 | string | Extended System Version - string | +| 0x81 | 129 | string | Extended System Version - string | +| 0x82 | 130 | string | Extended System Version - string | +| 0x83 | 131 | string | Extended System Version - string | +| 0x84 | 132 | string | Extended System Version - string | +| 0x85 | 133 | string | Extended System Version - string | +| 0x86 | 134 | string | Extended System Version - string | +| 0x87 | 135 | string | Extended System Version - string | +| 0x88 | 136 | string | Extended System Version - string | +| 0x89 | 137 | string | Extended System Version - string | +| 0x8A | 138 | string | Extended System Version - string | +| 0x8B | 139 | string | Extended System Version - string | +| 0x8C | 140 | uInt8 | always 0xFF (Protocol Upgrade Method ?) | +| ---- | --- | -------- | | +| 0x8D | 141 | uInt8 | checksum - add all bytes, except first, last, and checksum itself, then mod 256 | +| 0x8E | 143 | uInt8 | always 0x15 | diff --git a/dissectors/solarman-v5/messages/decode_hello_end-msg.md b/dissectors/solarman-v5/messages/decode_hello_end-msg.md new file mode 100644 index 0000000..b6604ed --- /dev/null +++ b/dissectors/solarman-v5/messages/decode_hello_end-msg.md @@ -0,0 +1,41 @@ +# hello end message +##### [back to readme](../README.md) +V5 table + +message type 0x4810 + +127 bytes on wire + +73 bytes SolarmanV5 data + +| HEX | DEC | TYPE | VALUE | +|------ |-----: |---------- |-------------------------------------------------------------------------------------------------------------- | +| 0x00 | 0 | uInt8 | always a5 | +| 0x01 | 1 | uInt16LE | always 60 msg length - excl msg header(0x00 - 0x0A), checksum and last byte | +| 0x02 | 2 | uInt16LE | always 00 msg length | +| 0x03 | 3 | uInt16LE | always 10 msg type - hello end msg | +| 0x04 | 4 | uInt16LE | always 48 msg type - hello end msg | +| 0x05 | 5 | uInt8 | server message serial nr - starts from 00 (synced with server) | +| 0x06 | 6 | uInt8 | inverter message serial nr - starts from 01 | +| 0x07 | 7 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x08 | 8 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x09 | 9 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x0A | 10 | uInt32LE | data logger SN (Embedded Device SN) | +| ---- | --- | -------- | | +| 0x0B | 11 | uInt8 | always 01 | +| 0x0C | 12 | uInt32LE | uptime (sec) | +| 0x0D | 13 | " | uptime (sec) | +| 0x0E | 14 | " | uptime (sec) | +| 0x0F | 15 | " | uptime (sec) | +| 0x10 | 16 | uInt32LE | timer - every >= 5240 s - reset after ~5240 seconds (1.5 h interval?), | +| 0x11 | 17 | " | timer - every >= 5240 s - communication restarts with hello_msg | +| 0x12 | 18 | " | timer - every >= 5240 s | +| 0x13 | 19 | " | timer - every >= 5240 s | +| 0x14 | 20 | uInt32LE | offset time | +| 0x15 | 21 | " | offset time | +| 0x16 | 22 | " | offset time | +| 0x17 | 23 | " | offset time | +| 0x18 | 24 | uInt8 | status - 0x01: OK | +| ---- | --- | -------- | | +| 0x19 | 25 | uInt8 | checksum - add all bytes, except first, last, and checksum itself, then mod 256 | +| 0x2A | 26 | uInt8 | always 0x15 | diff --git a/dissectors/solarman-v5/messages/decode_srv-at-command.md b/dissectors/solarman-v5/messages/decode_srv-at-command.md new file mode 100644 index 0000000..4486082 --- /dev/null +++ b/dissectors/solarman-v5/messages/decode_srv-at-command.md @@ -0,0 +1,44 @@ +# server AT command message +##### [back to readme](../README.md) +V5 table + +message type 0x4510 + +message size depends on payload + +| HEX | DEC | TYPE | VALUE | +|------ |-----: |---------- |-------------------------------------------------------------------------------------------------------------- | +| 0x00 | 0 | uInt8 | always a5 | +| 0x01 | 1 | uInt16LE | msg length - excl msg header(0x00 - 0x0A), checksum and last byte | +| 0x02 | 2 | " | msg length | +| 0x03 | 3 | uInt16LE | always 10 msg type - server AT command msg | +| 0x04 | 4 | " | always 45 msg type - server AT command msg | +| 0x05 | 5 | uInt8 | server message serial nr - starts from 01 (synced with server) | +| 0x06 | 6 | uInt8 | logger message serial nr - starts from 01 | +| 0x07 | 7 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x08 | 8 | " | data logger SN (Embedded Device SN) | +| 0x09 | 9 | " | data logger SN (Embedded Device SN) | +| 0x0A | 10 | " | data logger SN (Embedded Device SN) | +| ---- | --- | -------- | | +| 0x0B | 11 | uInt8 | always 01 | +| 0x0C | 12 | uInt16LE | 02 | +| 0x0D | 13 | " | 00 | +| 0x0E | 14 | uInt32LE | 00 | +| 0x0F | 15 | " | 00 | +| 0x10 | 16 | " | 00 | +| 0x11 | 17 | " | 00 | +| 0x12 | 18 | uInt32LE | 00 | +| 0x13 | 19 | " | 00 | +| 0x14 | 20 | " | 00 | +| 0x15 | 21 | " | 00 | +| 0x16 | 22 | uInt32LE | unix time stamp | +| 0x17 | 23 | " | unix time stamp | +| 0x18 | 24 | " | unix time stamp | +| 0x19 | 25 | " | unix time stamp | +| 0x1A | 26 | string | AT command, ending with '\r' | +| 0x.. | .. | string | 0d ('\r') +| ---- | --- | -------- | | +| 0x.. | .. | uInt8 | checksum - add all bytes, except first, last, and checksum itself, then mod 256 | +| 0x.. | .. | uInt8 | always 0x15 | + +Source: https://www.photovoltaikforum.com/thread/179529-daten-von-deye-sun-mikrowechselrichtern-abfangen/?pageNo=3 diff --git a/dissectors/solarman-v5/messages/decode_srv-response.md b/dissectors/solarman-v5/messages/decode_srv-response.md new file mode 100644 index 0000000..721fa41 --- /dev/null +++ b/dissectors/solarman-v5/messages/decode_srv-response.md @@ -0,0 +1,36 @@ +# server response message +##### [back to readme](../README.md) +V5 table + +message type 0x1110 (hello response), 0x1210 (data response), 0x1710 (keep alive response), 0x1810 (hello end response) + +77 bytes on wire + +23 bytes SolarmanV5 data + +| HEX | DEC | TYPE | VALUE | +|------ |-----: |---------- |-------------------------------------------------------------------------------------------------------------- | +| 0x00 | 0 | uInt8 | always 0xa5 | +| 0x01 | 1 | uInt16LE | msg length - always 10, excl msg header(0x00 - 0x0A), checksum and last byte | +| 0x02 | 2 | " | msg length - always 00 | +| 0x03 | 3 | uInt16LE | msg type - always 0x10 | +| 0x04 | 4 | " | msg type - 0x11: hello response, 0x12: data response, 0x17: keep alive rsp, 0x18: hello end rsp | +| 0x05 | 5 | uInt8 | server message serial nr - starts from 00 (synced with server) | +| 0x06 | 6 | uInt8 | unit message serial nr - starts from 01 | +| 0x07 | 7 | uInt32LE | data logger SN (Embedded Device SN) | +| 0x08 | 8 | " | data logger SN (Embedded Device SN) | +| 0x09 | 9 | " | data logger SN (Embedded Device SN) | +| 0x0A | 10 | " | data logger SN (Embedded Device SN) | +| ---- | --- | -------- | | +| 0x0B | 11 | uInt8 | frame type - 00: keep alive, 01: data logger (data rsp, hello end rsp), 02: solar inverter (hello rsp) | +| 0x0C | 12 | uInt8 | status - 0x01: OK | +| 0x0D | 13 | uInt32LE | unix time stamp | +| 0x0E | 14 | " | unix time stamp | +| 0x0F | 15 | " | unix time stamp | +| 0x10 | 16 | " | unix time stamp | +| 0x11 | 17 | uInt8 | heart rate, always 120 (seconds) | +| 0x12 | 11 | uInt8 | always 00 | +| 0x13 | 11 | uInt8 | always 00 | +| 0x14 | 11 | uInt8 | always 00 | +| 0x15 | 18 | uInt8 | checksum - add all bytes, except first, last, and checksum itself, then mod 256 | +| 0x16 | 19 | uInt8 | always 0x15 | diff --git a/dissectors/solarman-v5/solarmanv5.lua b/dissectors/solarman-v5/solarmanv5.lua new file mode 100644 index 0000000..2ec4c05 --- /dev/null +++ b/dissectors/solarman-v5/solarmanv5.lua @@ -0,0 +1,251 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/0xb1ff/solarman-dissector (solarmanv5.lua), +-- commit 7ad7e11757c2db8459ff34f6370dec85769a22d7 du 28/11/2022. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +solarmanv5_protocol = Proto("SolarmanV5", "SolarmanV5 Protocol") + +message_start = ProtoField.uint8("solarmanv5.message_start", "Start", base.HEX) +message_length = ProtoField.uint16("solarmanv5.message_length", "Length", base.DEC) +message_type = ProtoField.uint16("solarmanv5.message_type", "Message Type", base.HEX) +message_serial_unit = ProtoField.uint8("solarmanv5.message_serial_unit", "Serial (Unit)", base.HEX) +message_serial_cloud = ProtoField.uint8("solarmanv5.message_serial_cloud", "Serial (Cloud)", base.HEX) +logger_serial = ProtoField.uint32("solarmanv5.logger_serial", "Logger Serial", base.DEC) +frame_type = ProtoField.uint8("solarmanv5.frame_type", "Frame Type", base.HEX) +status = ProtoField.uint8("solarmanv5.status", "Status", base.HEX) +sensor_type = ProtoField.uint16("solarmanv5.sensor_type", "Sensor Type", base.HEX) +delivery_time = ProtoField.uint32("solarmanv5.delivery_time", "Delivery Time", base.DEC) +poweron_time = ProtoField.uint32("solarmanv5.poweron_time", "Power On Time", base.DEC) +offset_time = ProtoField.uint32("solarmanv5.offset_time", "Offset Time", base.DEC) +upload_period = ProtoField.uint8("solarmanv5.upload_period", "Upload Period", base.DEC) +data_acquisition_period = ProtoField.uint8("solarmanv5.data_acquisition_period", "Data Acquisition Period", base.DEC) +heart_rate = ProtoField.uint32("solarmanv5.heart_rate", "Heart Rate", base.DEC) +modbus_payload = ProtoField.bytes("solarmanv5.modbus_payload", "Modbus Payload") +signal_strength = ProtoField.uint8("solarmanv5.signal_strength", "Signal Strength", base.DEC) +module_version = ProtoField.string("solarmanv5.module_version", "Module Version", base.ASCII) +mac_address = ProtoField.bytes("solarmanv5.mac_address", "MAC Address") +local_ip = ProtoField.string("solarmanv5.local_ip", "Local IP Number", base.ASCII) +at_update_command = ProtoField.uint8("solarmanv5.at_update_command", "AT+ Update Command Supported (?)", base.HEX) +extd_system_version = ProtoField.string("solarmanv5.extd_system_version", "Extended System Version", base.ASCII) +protocol_upgrade_mthd = ProtoField.uint8("solarmanv5.protocol_upgrade_mthd", "Protocol Upgrade Method (?)", base.HEX) +-- 4210 +inverter_serial = ProtoField.string("solarmanv5.inverter_serial", "Inverter Serial", base.ASCII) +daily_energy = ProtoField.uint32("solarmanv5.daily_energy", "Daily Energy", base.DEC) +total_energy = ProtoField.uint32("solarmanv5.total_energy", "Total Energy", base.DEC) +grid_voltage = ProtoField.uint16("solarmanv5.grid_voltage", "Grid Voltage", base.DEC) +grid_frequency = ProtoField.uint16("solarmanv5.grid_frequency", "Grid Frequency", base.DEC) +power = ProtoField.uint16("solarmanv5.power", "Power", base.DEC) +heatsink_temperature = ProtoField.int16("solarmanv5.heatsink_temperature", "Heatsink Temperature", base.DEC) +vdc1 = ProtoField.uint16("solarmanv5.vdc1", "VDC1", base.DEC) +idc1 = ProtoField.uint16("solarmanv5.idc1", "IDC1", base.DEC) +vdc2 = ProtoField.uint16("solarmanv5.vdc2", "VDC2", base.DEC) +idc2 = ProtoField.uint16("solarmanv5.idc2", "IDC2", base.DEC) +inverter_comm_prot_ver = ProtoField.string("solarmanv5.inverter_comm_prot_ver", "Inverter Communication Protocol Version", base.ASCII) +inverter_ctrl_fw_ver = ProtoField.string("solarmanv5.inverter_ctrl_fw_ver", "Inverter Control Board Firmware Version", base.ASCII) +inverter_comm_fw_ver = ProtoField.string("solarmanv5.inverter_comm_fw_ver", "Inverter Communication Board Firmware Version", base.ASCII) +module1_serial = ProtoField.string("solarmanv5.module1_serial", "Module 1 Serial", base.ASCII) +module2_serial = ProtoField.string("solarmanv5.module2_serial", "Module 2 Serial", base.ASCII) +overfrequency = ProtoField.uint16("solarmanv5.overfrequency", "Overfrequency and Load Reduction Starting Point", base.DEC) +overfreq_percentage = ProtoField.uint16("solarmanv5.overfreq_percentage", "Overfrequency and Load Reduction Percentage", base.DEC) +grid_volt_ul = ProtoField.uint16("solarmanv5.grid_volt_ul", "Grid Voltage Upper Limit", base.DEC) +grid_volt_ll = ProtoField.uint16("solarmanv5.grid_volt_ll", "Grid Voltage Lower Limit", base.DEC) +grid_freq_ul = ProtoField.uint16("solarmanv5.grid_freq_ul", "Grid Frequency Upper Limit", base.DEC) +grid_freq_ll = ProtoField.uint16("solarmanv5.grid_freq_ul", "Grid Frequency Lower Limit", base.DEC) +selfcheck_time = ProtoField.uint16("solarmanv5.selfcheck_time", "Start-up Self-checking Time", base.DEC) +-- end +message_checksum = ProtoField.uint8("solarmanv5.message_checksum", "Checksum", base.HEX) +message_end = ProtoField.uint8("solarmanv5.message_end", "End", base.HEX) + +solarmanv5_protocol.fields = {message_start, message_length, message_type, message_serial_unit, message_serial_cloud, logger_serial, frame_type, status, sensor_type, delivery_time, poweron_time, offset_time, upload_period, data_acquisition_period, heart_rate, modbus_payload, signal_strength, module_version, mac_address, local_ip, at_update_command, extd_system_version, protocol_upgrade_mthd, inverter_serial, daily_energy, total_energy, grid_voltage, grid_frequency, power, heatsink_temperature, vdc1, idc1, vdc2, idc2, inverter_comm_prot_ver, inverter_ctrl_fw_ver, inverter_comm_fw_ver, module1_serial, module2_serial, overfrequency, overfreq_percentage, grid_volt_ul, grid_volt_ll, grid_freq_ul, grid_freq_ll, selfcheck_time, message_checksum, message_end} + +function solarmanv5_protocol.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length == 0 then return end + local msg_start = buffer(0,1):le_uint() + if msg_start ~= 0xa5 then return end + + pinfo.cols.protocol = solarmanv5_protocol.name + + local subtree = tree:add(solarmanv5_protocol, buffer(), "SolarmanV5 Protocol") + + subtree:add_le(message_start, buffer(0,1)) + + local message_length_value = buffer(1,2):le_uint() + subtree:add_le(message_length, buffer(1,2)) + + local control_code_value = buffer(3,2):le_uint() + local control_code_name = get_control_code_name(control_code_value) + subtree:add_le(message_type, buffer(3,2)):append_text(" (" .. control_code_name .. ")") + + subtree:add_le(message_serial_cloud, buffer(5,1)) + subtree:add_le(message_serial_unit, buffer(6,1)) + subtree:add_le(logger_serial, buffer(7,4)) + + local frame_type_number = buffer(11,1):le_uint() + local frame_type_name = get_frame_type_name(frame_type_number) + subtree:add_le(frame_type, buffer(11,1)):append_text(" (" .. frame_type_name .. ")") + + + if control_code_value == 0x4110 then -- hello message, unit to cloud + subtree:add_le(delivery_time, buffer(12,4)):append_text(" s") + subtree:add_le(poweron_time, buffer(16,4)):append_text(" s") + + subtree:add (upload_period, buffer(24,1)):append_text(" min") + subtree:add (data_acquisition_period, buffer(25,1)):append_text(" s") + subtree:add (heart_rate, buffer(26,1)):append_text(" s") + + subtree:add (signal_strength, buffer( 28, 1)) + subtree:add (module_version, buffer( 30, 40)) + + subtree:add (mac_address, buffer( 70, 6)):append_text(" (" .. tostring(buffer(70,6):ether()) .. ")") -- :append_text(" (" .. buffer( 70, 6):bytes():tohex(false, ":") .. ")") + subtree:add (local_ip, buffer( 76, 16)) + + subtree:add (at_update_command, buffer( 99, 1)) + subtree:add (extd_system_version, buffer(100, 40)) + subtree:add (protocol_upgrade_mthd,buffer(140, 1)) + + subtree:add_le(message_checksum, buffer(message_length_value+11,1)) :append_text(" [unverified]") + subtree:add_le(message_end, buffer(message_length_value+12,1)) :append_text(" [always 0x15]") + + + elseif control_code_value == 0x4210 then -- data message, unit to cloud + subtree:add_le(sensor_type, buffer(12,2)) + + local offset_time_value = buffer(22,4):le_uint() + local offset_time_text = get_datetime_text(offset_time_value) + local delivery_time_value = buffer(14,4):le_uint() + local delivery_time_text = get_datetime_text(offset_time_value+delivery_time_value) + local poweron_time_value = buffer(18,4):le_uint() + local poweron_time_text = get_time_text(poweron_time_value) + + subtree:add_le (delivery_time, buffer(14,4)):append_text(" (" .. delivery_time_text .. ")") + subtree:add_le (poweron_time, buffer(18,4)):append_text(" (" .. poweron_time_text .. ")") + subtree:add_le (offset_time, buffer(22,4)):append_text(" (" .. offset_time_text .. ")") + + subtree:add_le(status, buffer(26,1)) :append_text(" [0x01 = OK]") + + subtree:add (inverter_serial, buffer( 32, 10)) + + subtree:add_le (daily_energy, buffer( 44, 4)):append_text(" (" .. string.format("%.2f",tostring((buffer(44,4):le_uint())/100)) .. " kWh)") + subtree:add_le (total_energy, buffer( 48, 4)):append_text(" (" .. string.format("%.1f",tostring((buffer(48,4):le_uint())/10)) .. " kWh)") + + subtree:add_le (grid_voltage, buffer( 56, 2)):append_text(" (" .. string.format("%.1f",tostring((buffer(56,2):le_uint())/10)) .. " V)") + subtree:add_le (grid_frequency, buffer( 68, 2)):append_text(" (" .. string.format("%.2f",tostring((buffer(68,2):le_uint())/100)) .. " Hz)") + subtree:add_le (power, buffer( 70, 2)):append_text(" (" .. tostring(buffer(70,2):le_uint()) .. " W)") + + subtree:add_le (heatsink_temperature, buffer( 74, 2)):append_text(" (" .. string.format("%.2f",tostring((buffer( 74, 2):le_int())/100)) .. "°C)") + + subtree:add_le (vdc1, buffer( 96, 2)):append_text(" (" .. string.format("%.1f",tostring((buffer(96,2):le_uint())/10)) .. " V)") + subtree:add_le (idc1, buffer( 98, 2)):append_text(" (" .. string.format("%.1f",tostring((buffer(98,2):le_uint())/10)) .. " A)") + subtree:add_le (vdc2, buffer(100, 2)):append_text(" (" .. string.format("%.1f",tostring((buffer(100,2):le_uint())/10)) .. " V)") + subtree:add_le (idc2, buffer(102, 2)):append_text(" (" .. string.format("%.1f",tostring((buffer(102,2):le_uint())/10)) .. " A)") + + subtree:add (inverter_comm_prot_ver, buffer(112, 8)) + subtree:add (inverter_ctrl_fw_ver, buffer(120, 8)) + subtree:add (inverter_comm_fw_ver, buffer(128, 8)) + + + subtree:add (module1_serial, buffer(170, 16)) + subtree:add (module2_serial, buffer(186, 16)) +-- subtree:add (module3_serial, buffer(202, 16)) +-- subtree:add (module4_serial, buffer(218, 16)) + + subtree:add (overfrequency, buffer(234, 2)):append_text(" (" .. string.format("%.2f",tostring((buffer(234,2):uint())/100)) .. " Hz)") + subtree:add (overfreq_percentage, buffer(236, 2)):append_text(" (" .. buffer(236,2):uint() .. "%)") + + subtree:add (grid_volt_ul, buffer(246, 2)):append_text(" (" .. string.format("%.1f",buffer(246,2):uint()/10) .. " V)") + subtree:add (grid_volt_ll, buffer(248, 2)):append_text(" (" .. string.format("%.1f",buffer(248,2):uint()/10) .. " V)") + subtree:add (grid_freq_ul, buffer(250, 2)):append_text(" (" .. string.format("%.2f",buffer(250,2):uint()/100) .. " Hz)") + subtree:add (grid_freq_ll, buffer(252, 2)):append_text(" (" .. string.format("%.2f",buffer(252,2):uint()/100) .. " Hz)") + + subtree:add (selfcheck_time, buffer(254, 2)):append_text(" (" .. buffer(254,2):uint() .. " s)") + + subtree:add_le(message_checksum, buffer(message_length_value+11,1)) :append_text(" [unverified]") + subtree:add_le(message_end, buffer(message_length_value+12,1)) :append_text(" [always 0x15]") + + elseif control_code_value == 0x4810 then -- hello_end message + local offset_time_value = buffer(20,4):le_uint() + local offset_time_text = get_datetime_text(offset_time_value) + local delivery_time_value = buffer(12,4):le_uint() + local delivery_time_text = get_datetime_text(offset_time_value+delivery_time_value) + local poweron_time_value = buffer(16,4):le_uint() + local poweron_time_text = get_time_text(poweron_time_value) + + subtree:add_le(delivery_time, buffer(12,4)):append_text(" (" .. delivery_time_text .. ")") + subtree:add_le(poweron_time, buffer(16,4)):append_text(" (" .. poweron_time_text .. ")") + subtree:add_le(offset_time, buffer(20,4)):append_text(" (" .. offset_time_text .. ")") + + subtree:add_le(status, buffer(24,1)) :append_text(" [0x01 = OK]") + + -- 0x05 + -- 0x2c + -- 44 * 0xFF + + subtree:add_le(message_checksum, buffer(message_length_value+11,1)) :append_text(" [unverified]") + subtree:add_le(message_end, buffer(message_length_value+12,1)) :append_text(" [always 0x15]") + + elseif control_code_value == 0x4710 then -- Keep alive message, unit to cloud [complete] + subtree:add_le(message_checksum, buffer(12,1)) :append_text(" [unverified]") + subtree:add_le(message_end, buffer(13,1)) :append_text(" [always 0x15]") + elseif control_code_value == 0x1110 -- Hello response, cloud to unit + or control_code_value == 0x1210 -- data response, cloud to unit + or control_code_value == 0x1710 -- keep alive response, cloud to unit + or control_code_value == 0x1810 -- hello_end response, cloud to unit + then + subtree:add_le(status, buffer(12,1)) :append_text(" [0x01 = OK]") + + local delivery_time_value = buffer(13,4):le_uint() + local delivery_time_text = get_datetime_text(delivery_time_value) + + subtree:add_le(delivery_time, buffer(13,4)):append_text(" (" .. delivery_time_text .. ")") + subtree:add_le(heart_rate, buffer(17,4)):append_text(" seconds") + + subtree:add_le(message_checksum, buffer(21,1)) :append_text(" [unverified]") + subtree:add_le(message_end, buffer(22,1)) :append_text(" [always 0x15]") + end + +end + +function get_control_code_name(control_code_value) + local control_code_name = "Unknown" + + if control_code_value == 0x4110 then control_code_name = "Hello message, unit to cloud" + elseif control_code_value == 0x1110 then control_code_name = "Hello response, cloud to unit" + elseif control_code_value == 0x4210 then control_code_name = "Data message, unit to cloud" + elseif control_code_value == 0x1210 then control_code_name = "Data response, cloud to unit" + elseif control_code_value == 0x4710 then control_code_name = "Keep alive message, unit to cloud" + elseif control_code_value == 0x1710 then control_code_name = "Keep alive response, cloud to unit" + elseif control_code_value == 0x4810 then control_code_name = "Hello_end message, unit to cloud" + elseif control_code_value == 0x1810 then control_code_name = "Hello_end response, cloud to unit" + end +-- Unknown: 4810, 1810. + + return control_code_name +end + + +function get_frame_type_name(frame_type) + local frame_type_name = "Unknown" + + if frame_type == 0 then frame_type_name = "keep alive" + elseif frame_type == 1 then frame_type_name = "Data Logging Stick" + elseif frame_type == 2 then frame_type_name = "Solar Inverter" end + + return frame_type_name +end + +function get_datetime_text(time_value) + local datetime_text = "Unknown" + datetime_text = os.date("!%c", tonumber(time_value)) + return datetime_text +end + +function get_time_text(time_value) + local time_text = "Unknown" + time_text = os.date("!%X", tonumber(time_value)) + return time_text +end + + +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(10000, solarmanv5_protocol) + diff --git a/dissectors/space-coap/LICENSE b/dissectors/space-coap/LICENSE new file mode 100644 index 0000000..be3f7b2 --- /dev/null +++ b/dissectors/space-coap/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + 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 +them 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/dissectors/space-coap/README.md b/dissectors/space-coap/README.md new file mode 100644 index 0000000..4ba2d4a --- /dev/null +++ b/dissectors/space-coap/README.md @@ -0,0 +1,52 @@ +# Space CoAP — CoAP adapté au Bundle Protocol (réseaux spatiaux DTN) + +Dissecteur Wireshark Lua **« Space CoAP »**, variante expérimentale de +CoAP conçue pour fonctionner sur le Bundle Protocol (réseaux tolérants +aux délais, DTN) dans un travail de recherche de l'UPC (groupe ENTEL-WNG) : +en-tête CoAP avec **identifiant de message sur 24 bits** (au lieu de +16), jeton, options CoAP habituelles (Uri-Path, Content-Format, Observe, +Block…) plus une option **Payload-Length**, et charge utile. Ports UDP +5683 et 5684, plus une heuristique UDP. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ENTEL-WNG/CoAPoverBP-no-proxy-version | +| Commit importé | `a2fb4311b89b31c30e93a5c1704f78131594e927` du 12/06/2025 (branche `main`, dernier commit ; dernière modification de `spacecoap.lua` : `f7ce233` du 06/05/2025) | +| Licence amont | AGPL-3.0-or-later (`LICENSE` AGPL v3 ; en-tête : « either version 3 of the License, or any later version », © 2025 Michael Karpov) | +| Natif Wireshark 4.6.4 | Non pour Space CoAP ; CoAP standard natif (`coap`) | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). La GPLv3 du dépôt permet la combinaison avec du +code AGPLv3 (article 13) ; précédents : `dissectors/aerospike/`, +`dissectors/donet/`. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `spacecoap.lua` | Protocole `spacecoap` sur UDP 5683 / 5684 et heuristique UDP | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le reste du dépôt (aiocoap et µD3TN +modifiés, scripts d'expérience) n'est pas importé. + +## Utilisation + +Copier `spacecoap.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou, de préférence, le charger +ponctuellement avec `wireshark -X lua_script:spacecoap.lua capture.pcap`, +puis filtrer avec `spacecoap`. + +## Remarques + +- **Remplace CoAP standard** : le script prend les ports UDP 5683 et + 5684, où le CoAP natif (16 bits d'identifiant) sera alors mal décodé. +- **Heuristique très large** : elle accepte tout datagramme UDP de plus + de 5 octets dont le premier octet commence par les bits `01` (version + CoAP 1), ce qui peut faire décoder à tort une grande partie du trafic + UDP. Désactivable dans Analyse › Protocoles heuristiques + (`spacecoap_udp`). +- L'auteur le qualifie de « hautement expérimental ». +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/space-coap/spacecoap.lua b/dissectors/space-coap/spacecoap.lua new file mode 100644 index 0000000..891045f --- /dev/null +++ b/dissectors/space-coap/spacecoap.lua @@ -0,0 +1,266 @@ +-- SPDX-License-Identifier: AGPL-3.0-or-later +-- Importé de https://github.com/ENTEL-WNG/CoAPoverBP-no-proxy-version (spacecoap.lua), +-- commit a2fb4311b89b31c30e93a5c1704f78131594e927 du 12/06/2025. +-- Licence amont : AGPL-3.0-or-later (LICENSE amont) — voir README.md. +-- Highly experimental Space CoAP Lua Dissector (CoAP with 24-bit Message ID and payload_length option) +-- Copyright (C) 2025 Michael Karpov +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or 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 Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . + +-- Define the new protocol +local spacecoap_proto = Proto("spacecoap", "Space CoAP Protocol") + +-- Value string tables for types and codes (for human-readable display in Wireshark) +local coap_type_names = { + [0] = "Confirmable (CON)", + [1] = "Non-confirmable (NON)", + [2] = "Acknowledgement (ACK)", + [3] = "Reset (RES)" +} +local coap_code_names = { + [0] = "Empty (0.00)", + [1] = "GET (0.01)", + [2] = "POST (0.02)", + [3] = "PUT (0.03)", + [4] = "DELETE (0.04)", + [65] = "2.01 Created", + [66] = "2.02 Deleted", + [67] = "2.03 Valid", + [68] = "2.04 Changed", + [69] = "2.05 Content", + [95] = "2.31 Continue", + [128] = "4.00 Bad Request", + [129] = "4.01 Unauthorized", + [130] = "4.02 Bad Option", + [131] = "4.03 Forbidden", + [132] = "4.04 Not Found", + [133] = "4.05 Method Not Allowed", + [134] = "4.06 Not Acceptable", + [136] = "4.08 Request Entity Incomplete", + [140] = "4.12 Precondition Failed", + [141] = "4.13 Request Entity Too Large", + [143] = "4.15 Unsupported Content-Format", + [160] = "5.00 Internal Server Error", + [161] = "5.01 Not Implemented", + [162] = "5.02 Bad Gateway", + [163] = "5.03 Service Unavailable", + [164] = "5.04 Gateway Timeout", + [165] = "5.05 Proxying Not Supported" +} + +-- Define protocol fields for Wireshark's dissection tree +local f = spacecoap_proto.fields +f.version = ProtoField.uint8 ("spacecoap.version", "Version", base.DEC, nil, 0xC0) +f.type = ProtoField.uint8 ("spacecoap.type", "Type", base.DEC, coap_type_names, 0x30) +f.tkl = ProtoField.uint8 ("spacecoap.tkl", "Token Length", base.DEC, nil, 0x0F) +f.code = ProtoField.uint8 ("spacecoap.code", "Code", base.DEC, coap_code_names) +f.mid = ProtoField.uint24 ("spacecoap.mid", "Message ID", base.DEC) -- 24‑bit MID +f.token = ProtoField.bytes ("spacecoap.token", "Token") +f.payload = ProtoField.bytes ("spacecoap.payload", "Payload") +-- CoAP option fields +f.opt_if_match = ProtoField.bytes ("spacecoap.opt.if_match", "If-Match") +f.opt_uri_host = ProtoField.string ("spacecoap.opt.uri_host", "Uri-Host") +f.opt_etag = ProtoField.bytes ("spacecoap.opt.etag", "ETag") +f.opt_if_none_match = ProtoField.none ("spacecoap.opt.if_none_match", "If-None-Match") +f.opt_observe = ProtoField.uint24 ("spacecoap.opt.observe", "Observe") +f.opt_uri_port = ProtoField.uint16 ("spacecoap.opt.uri_port", "Uri-Port") +f.opt_location_path = ProtoField.string ("spacecoap.opt.location_path", "Location-Path") +f.opt_uri_path = ProtoField.string ("spacecoap.opt.uri_path", "Uri-Path") +f.opt_content_format = ProtoField.uint16 ("spacecoap.opt.content_format", "Content-Format") +f.opt_max_age = ProtoField.uint32 ("spacecoap.opt.max_age", "Max-Age") +f.opt_uri_query = ProtoField.string ("spacecoap.opt.uri_query", "Uri-Query") +f.opt_accept = ProtoField.uint16 ("spacecoap.opt.accept", "Accept") +f.opt_location_query = ProtoField.string ("spacecoap.opt.location_query", "Location-Query") +f.opt_block2 = ProtoField.uint32 ("spacecoap.opt.block2", "Block2") +f.opt_block1 = ProtoField.uint32 ("spacecoap.opt.block1", "Block1") +f.opt_size2 = ProtoField.uint32 ("spacecoap.opt.size2", "Size2") +f.opt_proxy_uri = ProtoField.string ("spacecoap.opt.proxy_uri", "Proxy-URI") +f.opt_proxy_scheme = ProtoField.string ("spacecoap.opt.proxy_scheme", "Proxy-Scheme") +f.opt_size1 = ProtoField.uint32 ("spacecoap.opt.size1", "Size1") +f.opt_payload_length = ProtoField.uint32("spacecoap.opt.payload_length", "Payload-Length") + +-- Known CoAP content formats for display +local content_format_names = { + [0] = "text/plain", + [40] = "application/link-format", + [41] = "application/xml", + [42] = "application/octet-stream", + [47] = "application/exi", + [50] = "application/json" +} + +-- Main dissector function +function spacecoap_proto.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length < 5 then return 0 end + + local b0 = buffer(0,1):uint() + local version = math.floor(b0 / 64) + if version ~= 1 then return 0 end + + local type_val = math.floor((b0 % 64) / 16) + local token_length = b0 % 16 + local code_val = buffer(1,1):uint() + local code_str = coap_code_names[code_val] or string.format("0x%02X", code_val) + local mid_val = buffer(2,3):uint() + + pinfo.cols.protocol = "Space CoAP" + + local token_str = "" + if token_length > 0 then + token_str = buffer(5, token_length):bytes():tohex() + end + + pinfo.cols.info = string.format( + "%s, %s, MID=%d, Token=%s", + coap_type_names[type_val], + code_str, + mid_val, + token_str + ) + + local subtree = tree:add(spacecoap_proto, buffer(), "Space CoAP") + subtree:add(f.version, buffer(0,1)) + subtree:add(f.type, buffer(0,1)) + subtree:add(f.tkl, buffer(0,1)) + subtree:add(f.code, buffer(1,1)) + subtree:add(f.mid, buffer(2,3)) + + local offset = 5 + if token_length > 0 then + if token_length > 8 or offset + token_length > length then + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, + string.format("Invalid Token Length %d", token_length)) + return length + end + subtree:add(f.token, buffer(offset, token_length)) + offset = offset + token_length + end + + local last_opt = 0 + + if offset < length and buffer(offset,1):uint() ~= 0xFF then + local opts_t = subtree:add(spacecoap_proto, buffer(offset), "Options") + + while offset < length do + local hdr = buffer(offset,1):uint() + if hdr == 0xFF then break end + offset = offset + 1 + + local opt_delta = math.floor(hdr / 16) + local opt_len = hdr % 16 + + if opt_delta == 13 then + opt_delta = buffer(offset,1):uint() + 13; offset = offset + 1 + elseif opt_delta == 14 then + opt_delta = buffer(offset,2):uint() + 269; offset = offset + 2 + elseif opt_delta == 15 then + opts_t:add_expert_info(PI_PROTOCOL, PI_ERROR, + "Invalid option delta=15") + opt_delta = 0 + end + + if opt_len == 13 then + opt_len = buffer(offset,1):uint() + 13; offset = offset + 1 + elseif opt_len == 14 then + opt_len = buffer(offset,2):uint() + 269; offset = offset + 2 + elseif opt_len == 15 then + opts_t:add_expert_info(PI_PROTOCOL, PI_ERROR, + "Invalid option length=15") + opt_len = 0 + end + + local opt_num = last_opt + opt_delta + last_opt = opt_num + + if offset + opt_len > length then + opts_t:add_expert_info(PI_MALFORMED, PI_ERROR, + "Option value truncated") + opt_len = length - offset + end + + local val = buffer(offset, opt_len) + offset = offset + opt_len + + if opt_num == 1 then opts_t:add(f.opt_if_match, val) + elseif opt_num == 3 then opts_t:add(f.opt_uri_host, val) + elseif opt_num == 4 then opts_t:add(f.opt_etag, val) + elseif opt_num == 5 then opts_t:add(f.opt_if_none_match, val) + elseif opt_num == 6 then opts_t:add(f.opt_observe, val) + elseif opt_num == 7 then opts_t:add(f.opt_uri_port, val) + elseif opt_num == 8 then opts_t:add(f.opt_location_path, val) + elseif opt_num == 11 then opts_t:add(f.opt_uri_path, val) + elseif opt_num == 12 then + local v = val:uint() + local txt = content_format_names[v] or ("Unknown("..v..")") + opts_t:add(f.opt_content_format, val, txt.." ("..v..")") + elseif opt_num == 14 then opts_t:add(f.opt_max_age, val) + elseif opt_num == 15 then opts_t:add(f.opt_uri_query, val) + elseif opt_num == 17 then opts_t:add(f.opt_accept, val) + elseif opt_num == 20 then opts_t:add(f.opt_location_query, val) + elseif opt_num == 23 then + local raw = val:uint() + local blk_num = math.floor(raw / 16) + local rem4 = raw % 16 + local m = math.floor(rem4 / 8) + local szx = rem4 % 8 + local sz = 2 ^ (szx + 4) + opts_t:add(f.opt_block2, val, + string.format("Block2: NUM=%d, M=%d, SZX=%d (%d bytes)", blk_num, m, szx, sz)) + elseif opt_num == 27 then + local raw = val:uint() + local blk_num = math.floor(raw / 16) + local rem4 = raw % 16 + local m = math.floor(rem4 / 8) + local szx = rem4 % 8 + local sz = 2 ^ (szx + 4) + opts_t:add(f.opt_block1, val, + string.format("Block1: NUM=%d, M=%d, SZX=%d (%d bytes)", blk_num, m, szx, sz)) + elseif opt_num == 28 then opts_t:add(f.opt_size2, val) + elseif opt_num == 35 then opts_t:add(f.opt_proxy_uri, val) + elseif opt_num == 39 then opts_t:add(f.opt_proxy_scheme, val) + elseif opt_num == 60 then opts_t:add(f.opt_size1, val) + elseif opt_num == 65000 then + opts_t:add(f.opt_payload_length, val) + else + opts_t:add(val, string.format("Option %d: %s", opt_num, tostring(val))) + end + end + end + + if offset < length and buffer(offset,1):uint() == 0xFF then + offset = offset + 1 + end + if offset < length then + subtree:add(f.payload, buffer(offset)) + end + + return length +end + +-- Register protocol for standard CoAP ports +local udp_table = DissectorTable.get("udp.port") +udp_table:add(5683, spacecoap_proto) +udp_table:add(5684, spacecoap_proto) + +-- Heuristic dissector to detect SpaceCoAP on unknown ports +local function spacecoap_heuristic(buffer, pinfo, tree) + if buffer:len() < 5 then return false end + local b0 = buffer(0,1):uint() + if math.floor(b0 / 64) ~= 1 then return false end + local tkl = b0 % 16 + if buffer:len() < 5 + tkl then return false end + spacecoap_proto.dissector(buffer, pinfo, tree) + return true +end +spacecoap_proto:register_heuristic("udp", spacecoap_heuristic) diff --git a/dissectors/superfunkychat/LICENSE b/dissectors/superfunkychat/LICENSE new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/dissectors/superfunkychat/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/dissectors/superfunkychat/README.md b/dissectors/superfunkychat/README.md new file mode 100644 index 0000000..fe82e3c --- /dev/null +++ b/dissectors/superfunkychat/README.md @@ -0,0 +1,49 @@ +# SuperFunkyChat — messagerie d'exemple (TCP) + +Dissecteur Wireshark Lua du protocole TCP de +[SuperFunkyChat](https://github.com/tyranid/SuperFunkyChat), application +de discussion d'exemple écrite par James Forshaw pour le livre +« Attacking Network Protocols ». Il gère le réassemblage TCP (message +coupé ou plusieurs messages par segment) et décode : + +- l'en-tête : magique `BINX` éventuel (début de connexion), longueur, + somme de contrôle, commande ; +- les commandes : demande / réponse de connexion (utilisateur, hôte), + sortie, message, message direct (destinataire, expéditeur, texte), + demande / réponse de liste des utilisateurs connectés. + +Port TCP 12345 par défaut (préférence `port`, activable / désactivable). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/0x1452/SuperFunkyChat-Dissector (fichier `chat_dissector.lua`) | +| Commit importé | `65ae7ee8eaad120413926d8bd13ed1368272af9b` du 27/03/2021 (branche `main`, dernier commit) | +| Licence amont | Unlicense (fichier `LICENSE`, domaine public, copié ici) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur SuperFunkyChat natif | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `chat_dissector.lua` | Protocole `chat` (« SuperFunkyChat Protocol ») sur TCP 12345 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. La capture d'écran amont n'est pas importée. + +## Utilisation + +Copier `chat_dissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`) ou lancer +`wireshark -X lua_script:chat_dissector.lua`, puis filtrer avec `chat`. + +## Remarques + +- Nom de protocole générique `chat` : conflit possible avec un autre + plugin du même nom (une autre version SuperFunkyChat est suivie dans + l'issue #428, sans licence à ce jour). +- Le niveau de débogage par défaut (`LEVEL_1`) écrit des messages dans la + console Lua ; la somme de contrôle est affichée mais non vérifiée. +- La fonction `read_string` est globale, comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/superfunkychat/chat_dissector.lua b/dissectors/superfunkychat/chat_dissector.lua new file mode 100644 index 0000000..aaf146c --- /dev/null +++ b/dissectors/superfunkychat/chat_dissector.lua @@ -0,0 +1,363 @@ +-- SPDX-License-Identifier: Unlicense +-- Importé de https://github.com/0x1452/SuperFunkyChat-Dissector (chat_dissector.lua), +-- commit 65ae7ee8eaad120413926d8bd13ed1368272af9b du 27/03/2021. +-- Licence amont : Unlicense (LICENSE amont) — voir README.md. +local debug_level = { + DISABLED = 0, + LEVEL_1 = 1, + LEVEL_2 = 2 +} + +local DEBUG = debug_level.LEVEL_1 + +local default_settings = +{ + debug_level = DEBUG, + enabled = true, + port = 12345, +} + +local dprint = function() end +local dprint2 = function() end +local function resetDebugLevel() + if default_settings.debug_level > debug_level.DISABLED then + dprint = function(...) + print(table.concat({"Lua: ", ...}," ")) + end + + if default_settings.debug_level > debug_level.LEVEL_1 then + dprint2 = dprint + end + else + dprint = function() end + dprint2 = dprint + end +end +resetDebugLevel() + +---------------------------------------------------------- + +-- Declare our chat protocol for dissection +local chat_proto = Proto("chat", "SuperFunkyChat Protocol") + +---------------------------------------------------------- + +local function makeValString(enumTable) + local t = {} + for name,num in pairs(enumTable) do + t[num] = name + end + return t +end + +local command_type = { + CON_REQUEST = 0, + CON_RESPONSE = 1, + CON_EXIT = 2, + MSG = 3, + DIRECT_MSG = 5, + LIST_REQUEST = 6, + LIST_RESPONSE = 7 +} + +local command_type_valstr = makeValString(command_type) + +---------------------------------------------------------- + +-- Specify protocol fields +local chat_fields = +{ + length = ProtoField.uint32("chat.length", "Length", base.DEC), + chksum = ProtoField.uint32("chat.chksum", "Checksum", base.HEX), + command = ProtoField.uint8 ("chat.command", "Command", base.DEC, command_type_valstr), + data = ProtoField.bytes ("chat.data", "Data"), +} + +-- Register the ProtoFields +chat_proto.fields = chat_fields + +dprint2("chat_proto ProtoFields registered") + +---------------------------------------------------------- + +-- minimum message size we need to be able to figure out how long the rest is +-- 8 because of the `BINX` magic value that gets sent on `CON_REQUEST` messages +local CHAT_MSG_HDR_LEN = 8 + +local dissectChat, checkChatLength + +---------------------------------------------------------- + +function chat_proto.dissector(buffer, pinfo, tree) + dprint2("chat_proto.dissector called") + + local pktlen = buffer:len() + + local bytes_consumed = 0 + + while bytes_consumed < pktlen do + -- Call the Chat dissector + -- Returns: + -- 0 -> error + -- >0 -> length of the message (if successful) + -- <0 -> number of additional bytes needed + local result = dissectChat(buffer, pinfo, tree, bytes_consumed) + + if result > 0 then + bytes_consumed = bytes_consumed + result + elseif result == 0 then + return 0 + else + -- set `desegment_offset` to how many bytes we already consumed + pinfo.desegment_offset = bytes_consumed + + -- invert the negative result + result = -result + + -- set `desegment_len` to how many more bytes we need + pinfo.desegment_len = result + + return pktlen + end + end + + return bytes_consumed +end + +---------------------------------------------------------- + +-- buffer: A TVB containing packet data +-- start: The offset in the TVB to read the string from +-- returns: The string and the total length +function read_string(buffer, start) + local len = buffer(start, 1):uint() + local str = buffer(start + 1, len):string() + + return str, (len + 1) +end + + +checkChatLength = function(buffer, offset) + local msglen = buffer:len() - offset + + if msglen ~= buffer:reported_length_remaining(offset) then + dprint2("Captured packet was shorter than original, can't reassemble") + return 0 + end + + if msglen < CHAT_MSG_HDR_LEN then + dprint2("Need more bytes to figure out the length of the rest of the packet") + return -DESEGMENT_ONE_MORE_SEGMENT + end + + -- if we got here, we know we have enough bytes to at least + -- figure out the full length of this Chat message + local length_tvbr = buffer:range(offset, 4) + local length_str = length_tvbr:string() + + -- `length` only contains the length of the `type`+`data` portions + local length_header = 8 + + -- if the string `BINX` is contained in the first four bytes + -- move `length_tvbr` by 4 bytes and add 4 to `length_header` + local i, j = string.find(length_str, "BINX") + if (i) then + length_tvbr = buffer:range(offset + 4, 4) + length_header = length_header + 4 + end + + length_val = length_tvbr:uint() + + if msglen < length_val + length_header then + dprint2("Need more bytes to desegment full Chat message") + return -(length_val - msglen + length_header) + end + + return length_val + length_header, length_tvbr +end + +-- Dissector function +-- buffer: The packet data as a "Testy Virtual Buffer" +-- pinfo: Packet information +-- tree: Root of the UI tree +dissectChat = function(buffer, pinfo, tree, offset) + dprint2("Chat dissect function called") + + local length_val, length_tvbr = checkChatLength(buffer, offset) + + if length_val <= 0 then + return length_val + end + + -- if we got here, we have a whole message in `buffer` + + -- Set the name in the protocol column in the UI + pinfo.cols.protocol:set("CHAT") + + -- Create sub tree which represents the entire buffer + local subtree = tree:add(chat_proto, buffer:range(offset, length_val), "SuperFunkyChat Protocol Data") + + -- If the packet contains the magic bytes `BINX`, add 4 to the offset + local inner_offset = offset + + -- dissect the length field + local chat_length_tvbr = buffer:range(inner_offset, 4) + + local chat_length_str = chat_length_tvbr:string() + local i, j = string.find(chat_length_str, "BINX") + if (i) then + inner_offset = offset + 4 + chat_length_tvbr = buffer:range(inner_offset, 4) + end + + local chat_length_val = chat_length_tvbr:uint() + subtree:add(chat_fields.length, chat_length_tvbr) + + -- dissect the checksum field + local checksum_tvbr = buffer:range(inner_offset + 4, 4) + subtree:add(chat_fields.chksum, checksum_tvbr) + + -- dissect the command field + local command_tvbr = buffer:range(inner_offset + 8, 1) + local command_val = command_tvbr:uint() + subtree:add(chat_fields.command, command_tvbr) + + -- dissect the data field + local data = buffer(inner_offset + 9):tvb() + local datatree = subtree:add(chat_fields.data, data()) + + local curr_ofs = 0 + if command_val == command_type.CON_REQUEST then + local str, len = read_string(data, curr_ofs) + datatree:add(chat_proto, data(curr_ofs, len), "Username: " .. str) + curr_ofs = curr_ofs + len + + str, len = read_string(data, curr_ofs) + datatree:add(chat_proto, data(curr_ofs, len), "Hostname: " .. str) + + elseif command_val == command_type.CON_EXIT then + local str, len = read_string(data, curr_ofs) + datatree:add(chat_proto, data(curr_ofs, len), "Message: " .. str) + + elseif command_val == command_type.MSG then + local str, len = read_string(data, curr_ofs) + datatree:add(chat_proto, data(curr_ofs, len), "Username: " .. str) + curr_ofs = curr_ofs + len + + str, len = read_string(data, curr_ofs) + datatree:add(chat_proto, data(curr_ofs, len), "Message: " .. str) + + elseif command_val == command_type.DIRECT_MSG then + local str, len = read_string(data, curr_ofs) + datatree:add(chat_proto, data(curr_ofs, len), "To: " .. str) + curr_ofs = curr_ofs + len + + local unknown = data(curr_ofs, 4):uint() + datatree:add(chat_proto, data(curr_ofs, 4), "Command?: " .. unknown) + curr_ofs = curr_ofs + 4 + + str, len = read_string(data, curr_ofs) + datatree:add(chat_proto, data(curr_ofs, len), "From: " .. str) + curr_ofs = curr_ofs + len + + str, len = read_string(data, curr_ofs) + datatree:add(chat_proto, data(curr_ofs, len), "Message: " .. str) + curr_ofs = curr_ofs + len + + elseif command_val == command_type.LIST_RESPONSE then + local user_count = data(curr_ofs, 4):uint() + datatree:add(chat_proto, data(curr_ofs, 4), "User Count: " .. user_count) + curr_ofs = curr_ofs + 4 + + for i=1,user_count do + local username, username_len = read_string(data, curr_ofs) + local hostname, hostname_len = read_string(data, curr_ofs + username_len) + + local user_data = data(curr_ofs, username_len + hostname_len):tvb() + curr_ofs = curr_ofs + username_len + curr_ofs = curr_ofs + hostname_len + + local usertree = datatree:add('User: ' .. username, user_data()) + usertree:add(chat_proto, user_data(0, username_len), "Username: " .. username) + usertree:add(chat_proto, user_data(username_len, hostname_len), "Hostname: " .. hostname) + end + end + + return length_val +end + +---------------------------------------------------------- + +local function enableDissector() + DissectorTable.get("tcp.port"):add(default_settings.port, chat_proto) +end + +enableDissector() + +local function disableDissector() + DissectorTable.get("tcp.port"):remove(default_settings.port, chat_proto) +end + +---------------------------------------------------------- + +local debug_pref_enum = { + { 1, "Disabled", debug_level.DISABLED }, + { 2, "Level 1", debug_level.LEVEL_1 }, + { 3, "Level 2", debug_level.LEVEL_2 }, +} + +-- register our preferences +chat_proto.prefs.enabled = Pref.bool( + "Dissector enabled", default_settings.enabled, + "Whether the SuperFunkyChat dissector is enabled or not" +) + +chat_proto.prefs.port = Pref.range( + "Port", default_settings.port, + "Port that the SuperFunkyChat Server is using", + 65535 +) + +chat_proto.prefs.debug = Pref.enum( + "Debug", default_settings.debug_level, + "The debug printing level", debug_pref_enum +) + +---------------------------------------------------------- + +-- this function handles preferences being changed +function chat_proto.prefs_changed() + dprint2("prefs_changed called") + + default_settings.debug_level = chat_proto.prefs.debug + resetDebugLevel() + + if default_settings.port ~= chat_proto.prefs.port then + -- remove old port, if not 0 + if default_settings.port ~= 0 then + dprint2("Removing CHAT from old port", default_settings.port) + DissectorTable.get("tcp.port"):remove(default_settings.port, chat_proto) + end + -- set new port + default_settings.port = chat_proto.prefs.port + -- add new port, if not 0 + if default_settings.port ~= 0 then + dprint2("Adding CHAT to new port", default_settings.port) + DissectorTable.get("tcp.port"):add(default_settings.port, chat_proto) + end + end + + if default_settings.enabled ~= chat_proto.prefs.enabled then + default_settings.enabled = chat_proto.prefs.enabled + if default_settings.enabled then + enableDissector() + else + disableDissector() + end + -- you have to reload the capture file for this type of change + reload() + end + +end + +dprint2("pcapfile Prefs registered") \ No newline at end of file diff --git a/dissectors/syncthing-discovery/LICENSE b/dissectors/syncthing-discovery/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/dissectors/syncthing-discovery/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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) + + 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. + +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) year 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 Lesser General +Public License instead of this License. diff --git a/dissectors/syncthing-discovery/README.md b/dissectors/syncthing-discovery/README.md new file mode 100644 index 0000000..9799e2a --- /dev/null +++ b/dissectors/syncthing-discovery/README.md @@ -0,0 +1,47 @@ +# Syncthing — annonces de découverte locale (v4) + +Dissecteur Wireshark Lua des **annonces de découverte locale** de +[Syncthing](https://syncthing.net/) (Local Discovery Protocol v4, +https://docs.syncthing.net/specs/localdisco-v4.html) : vérification du +magique `0x2EA7D90B`, puis décodage du message Protobuf `Announce` +(identifiant de l'appareil, adresses, identifiant d'instance) par le +dissecteur **Protobuf** natif de Wireshark, à l'aide du schéma +`syncthing.proto` fourni. Port UDP 21027 (diffusion IPv4 / multidiffusion +IPv6). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/tmo1/wireshark-syncthing-dissector (fichiers `syncthing.lua` et `syncthing.proto`) | +| Commit importé | `746aed2826c10012af59e774251a5c14a5a0a006` du 27/02/2022 (branche `main`, dernier commit) | +| Licence amont | GPL-2.0-only (README : « licensed under the Gnu General Public License version 2 », sans « or later » ; texte `gpl-2.0.txt`, copié ici sous le nom `LICENSE`) ; auteur : Thomas More | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Syncthing natif (le décodage Protobuf est natif) | + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `syncthing.lua` | Protocole `syncthing` (« Syncthing Announcement »), UDP 21027 | +| `syncthing.proto` | Schéma Protobuf du message `syncthing.Announce` | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête du `.lua` (le `.proto` est copié sans +modification). + +## Utilisation + +1. Copier `syncthing.lua` dans le dossier `plugins` de Wireshark + (ex. `~/.local/lib/wireshark/plugins/`). +2. Copier `syncthing.proto` dans un dossier et l'ajouter dans + Préférences → Protocols → ProtoBuf → chemins de recherche. +3. Recharger les plugins Lua (Ctrl+Maj+L), puis filtrer avec `syncthing`. + +## Remarques + +- Seules les annonces de découverte locale sont décodées (pas le protocole + d'échange de blocs BEP, chiffré en TLS, ni la découverte globale). +- L'identifiant d'appareil est affiché en octets bruts, pas au format + Syncthing (base32 avec contrôle). +- Variables globales (`magic`, `length`…), comme dans l'amont. Pas de + capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/syncthing-discovery/syncthing.lua b/dissectors/syncthing-discovery/syncthing.lua new file mode 100644 index 0000000..6b4efb3 --- /dev/null +++ b/dissectors/syncthing-discovery/syncthing.lua @@ -0,0 +1,31 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/tmo1/wireshark-syncthing-dissector (syncthing.lua), +-- commit 746aed2826c10012af59e774251a5c14a5a0a006 du 27/02/2022. +-- Licence amont : GPL-2.0-only (gpl-2.0.txt amont) — voir README.md. +-- Wireshark dissector for Syncthing protocols +-- Currently, only Announcement packets (Local Discovery Protocol v4) are supported +-- https://docs.syncthing.net/specs/localdisco-v4.html + +-- Based on: +-- https://mika-s.github.io/wireshark/lua/dissector/2017/11/04/creating-a-wireshark-dissector-in-lua-1.html +-- https://wiki.wireshark.org/Lua/Dissectors +-- https://ask.wireshark.org/question/25070/lua-how-to-get-a-field-from-a-decoded-protobuf-to-decode-the-next-protobuf/ + +syncthing_announcement_protocol = Proto("Syncthing", "Syncthing Announcement") +syncthing_announcement_protocol.fields = {} +magic = ProtoField.int32("syncthing.magic", "Magic", base.DEC) +syncthing_announcement_protocol.fields = {magic} + +function syncthing_announcement_protocol.dissector(tvb, pinfo, tree) + length = tvb:len() + if length == 0 or tvb(0, 4):uint() ~= 782752011 then return end + local subtree = tree:add(syncthing_announcement_protocol, tvb(), "Syncthing Announcement") + subtree:add(magic, tvb(0, 4)) + local protobuf_dissector = Dissector.get("protobuf") + pinfo.private["pb_msg_type"] = "message,syncthing.Announce" + pcall(Dissector.call, protobuf_dissector, tvb(4, length - 4):tvb(), pinfo, subtree) + pinfo.cols.protocol = syncthing_announcement_protocol.name +end + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(21027, syncthing_announcement_protocol) diff --git a/dissectors/syncthing-discovery/syncthing.proto b/dissectors/syncthing-discovery/syncthing.proto new file mode 100644 index 0000000..808aa47 --- /dev/null +++ b/dissectors/syncthing-discovery/syncthing.proto @@ -0,0 +1,14 @@ +// Syncthing (Local Discovery Protocol v4) Announce Message protocol buffer schema +// https://docs.syncthing.net/specs/localdisco-v4.html + +// See: https://wiki.wireshark.org/Protobuf +// and https://gitlab.com/wireshark/wireshark/-/wikis/Protobuf + +syntax = "proto3"; +package syncthing; + +message Announce { + bytes id = 1; + repeated string addresses = 2; + int64 instance_id = 3; +} diff --git a/dissectors/systa-stouch/LICENSE b/dissectors/systa-stouch/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/systa-stouch/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/systa-stouch/README.md b/dissectors/systa-stouch/README.md new file mode 100644 index 0000000..d41d1c7 --- /dev/null +++ b/dissectors/systa-stouch/README.md @@ -0,0 +1,49 @@ +# Paradigma SystaComfort — protocole S-Touch + +Dissecteur Wireshark Lua du **protocole « device touch » de l'application +S-Touch**, qui pilote à distance l'écran tactile des régulateurs de +chauffage **Paradigma SystaComfort** (via l'interface SystaTouch) sur +UDP 3477 : type de paquet, commande, identifiant de paquet, sous-type, +puis contenu des commandes (appuis à l'écran avec coordonnées, commandes +de dessin de l'écran distant, réponses OK / ERR…). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/beep-projects/SystaPi (fichier `helpers/stouch.lua`) | +| Commit importé | `827b95b51a3cfff2068cc9fd284985cc62851b46` du 03/04/2026 (branche `main`, dernier commit ; dernière modification du dissecteur : `dbb9d80` du 22/04/2025) | +| Licence amont | GPL-3.0-or-later (en-tête du fichier : « Copyright (c) 2021, The beep-projects contributors », « either version 3 of the License, or (at your option) any later version » ; `LICENSE` amont : GPL v3) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur S-Touch / SystaComfort natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `stouch.lua` | Dissecteur `S-Touch` (UDP 3477), champs `S-Touch.*` | + +Fichier importé tel quel, à une exception près : seule une en-tête SPDX + +provenance a été ajoutée en tête, plus une **correction locale minimale**. +Le fichier amont ne compile pas (opérateur `||`, qui n'existe pas en Lua, +ligne 86 amont : Wireshark refuserait de charger le script) ; il est +remplacé par `or`, et la correction est décrite dans l'en-tête du +fichier. Le reste est identique à l'amont. + +## Utilisation + +Copier `stouch.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, capturer +le trafic entre l'application S-Touch (ou le service `STouchREST` de +SystaPi) et la SystaComfort, puis filtrer avec `s-touch`. + +## Remarques + +- Nom de protocole et préfixe de champs avec majuscules et tiret + (`S-Touch`) : acceptation par Wireshark 4.6 et nom exact du filtre non + vérifiés. +- Nombreuses variables globales (champs `packet_type`, `pressX`…) comme + dans l'amont, susceptibles d'entrer en collision avec d'autres scripts. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/systa-stouch/stouch.lua b/dissectors/systa-stouch/stouch.lua new file mode 100644 index 0000000..f4a5987 --- /dev/null +++ b/dissectors/systa-stouch/stouch.lua @@ -0,0 +1,456 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/beep-projects/SystaPi (helpers/stouch.lua), +-- commit 827b95b51a3cfff2068cc9fd284985cc62851b46 du 03/04/2026. +-- Licence amont : GPL-3.0-or-later (LICENSE amont) — voir README.md. +-- Correction locale (syntaxe invalide en amont, le fichier ne charge pas) : +-- « || » remplacé par « or » dans « if packet_type == 1 or packet_type == 9 » (ligne 86 amont). +-- Copyright (c) 2021, The beep-projects contributors +-- this file originated from https://github.com/beep-projects +-- Do not remove the lines above. +-- 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 3 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, see https://www.gnu.org/licenses/ + +-- Wireshark dissector fot the device touce protocol used by the S-Touch app +-- should be placed in +-- ~/.local/lib/wireshark/plugins (Linux) +-- %APPDATA%\Wireshark\plugins or WIRESHARK\plugins (Windows) +-- %APPDIR%/Contents/PlugIns/wireshark or INSTALLDIR/lib/wireshark/plugins (macOS) + +stouch_protocol = Proto("S-Touch", "S-Touch Protocol") + +-- Header fields +packet_type = ProtoField.uint8 ("S-Touch.packet_type" , "packetType" , base.DEC) +packet_command = ProtoField.uint16 ("S-Touch.packet_command" , "packetCommand" , base.HEX) +pktID = ProtoField.uint16 ("S-Touch.pktID" , "pktID" , base.DEC) +packet_subtype = ProtoField.int8 ("S-Touch.packet_subtype" , "packetSubtype" , base.DEC) + +-- Payload fields +pressId = ProtoField.int8 ("S-Touch.button_pressed.id" , "id" , base.DEC) +pressX = ProtoField.int16 ("S-Touch.button_pressed.x" , "x" , base.DEC) +pressY = ProtoField.int16 ("S-Touch.button_pressed.y" , "y" , base.DEC) +zero_bytes = ProtoField.int16 ("S-Touch.zero_bytes" , "zeroBytes" , base.DEC) +int01 = ProtoField.int16 ("S-Touch.int01" , "int01" , base.DEC) +int02 = ProtoField.int16 ("S-Touch.int02" , "int02" , base.DEC) +free_command_space = ProtoField.int16 ("S-Touch.free_command_space" , "freeCommandSpace" , base.DEC) + +-- command parameters +style = ProtoField.uint8 ("S-Touch.SETSTYLE.style" , "style" , base.DEC) +x = ProtoField.int16 ("S-Touch.PRINT.x" , "x" , base.DEC) +y = ProtoField.int16 ("S-Touch.PRINT.y" , "y" , base.DEC) +text = ProtoField.string ("S-Touch.PRINT.text" , "text" , base.UNICODE) +unknown = ProtoField.uint32 ("S-Touch.unknown" , "unknown" , base.HEX) +id = ProtoField.int8 ("S-Touch.PRINT.id" , "id" , base.DEC) +width = ProtoField.int16 ("S-Touch.PRINT.width" , "width" , base.DEC) +height = ProtoField.int16 ("S-Touch.PRINT.height" , "height" , base.DEC) +btnId = ProtoField.int8 ("S-Touch.SETBUTTON.id" , "id" , base.DEC) +btnX1 = ProtoField.int16 ("S-Touch.SETBUTTON.x1" , "x1" , base.DEC) +btnX2 = ProtoField.int16 ("S-Touch.SETBUTTON.x2" , "x2" , base.DEC) +btnY1 = ProtoField.int16 ("S-Touch.SETBUTTON.y1" , "y1" , base.DEC) +btnY2 = ProtoField.int16 ("S-Touch.SETBUTTON.y2" , "y2" , base.DEC) +rectX1 = ProtoField.int16 ("S-Touch.DRAWRECTANGLE.x1" , "x1" , base.DEC) +rectX2 = ProtoField.int16 ("S-Touch.DRAWRECTANGLE.x2" , "x2" , base.DEC) +rectY1 = ProtoField.int16 ("S-Touch.DRAWRECTANGLE.y1" , "y1" , base.DEC) +rectY2 = ProtoField.int16 ("S-Touch.DRAWRECTANGLE.y2" , "y2" , base.DEC) +fgcolor = ProtoField.uint16 ("S-Touch.SETFGCOLOR.color" , "color" , base.HEX) +bgcolor = ProtoField.uint16 ("S-Touch.SETBGCOLOR.color" , "color" , base.HEX) +mvToX = ProtoField.int16 ("S-Touch.MOVETO.x" , "x" , base.DEC) +mvToY = ProtoField.int16 ("S-Touch.MOVETO.y" , "y" , base.DEC) + +stouch_protocol.fields = { + packet_type, packet_command, pktID, packet_subtype, -- Header + pressId, pressX, pressY, zero_bytes, int02, int01, free_command_space, -- PKT_OK || PKT_ERR + style, x, y, text, unknown, id, width, height, -- command parameters + btnId, btnX1, btnX2, btnY1, btnY2, + rectX1, rectX2, rectY1, rectY2, fgcolor, bgcolor, + mvToX, mvToY +} + +function stouch_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = stouch_protocol.name + + local subtree = tree:add(stouch_protocol, buffer(), "S-Touch Protocol Data") + + -- Header + subtree:add(packet_type, buffer(0,1)) + local packet_type = buffer(0,1):uint() + local packet_subtype_name = "Unknown" + subtree:add_le(packet_command, buffer(1,2)) + local i = 3 + if packet_type == 1 or packet_type == 9 then + subtree:add_le(pktID, buffer(3,2)) + i = 5 + -- i = 4 + --elseif packet_type == 9 then + -- subtree:add_le(pktID, buffer(3,2)) + -- i = 5 + end + + local packet_subtype = buffer(i,1):uint() + + if packet_subtype == 0 then --ok + dissect_OK(buffer, pinfo, subtree, i) + elseif packet_subtype == 255 then --error + dissect_ERR(buffer, pinfo, subtree, i) + else -- command packet + dissect_CMD(buffer, pinfo, subtree, i) + end + +end + +function get_subtype_name(subtype) + local subtype_name = "Unknown" + + if subtype == 0 then + subtype_name = "PKT_OK" + elseif subtype == 255 then + subtype_name = "PKT_ERR" + else + subtype_name = "PKT_CMD" + end + + return subtype_name +end + +function dissect_CMD(buffer, pinfo, subtree, i) + local cmdSubtree = subtree:add(stouch_protocol, buffer(i, buffer:len() - i), "Commands") + local cmdLen = 0 + --loop over the rest of the packet and extract the commands + while i < buffer:len() - 1 do + local cmd = buffer(i,1):uint() + -- print("cmd: " .. cmd .. ", i: " .. i) + if cmd == stouch_commands.SWITCHON then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SWITCHON") + i = i+1 -- move the read index + elseif cmd == stouch_commands.SWITCHOFF then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SWITCHOFF") + i = i+1 -- move the read index + elseif cmd == stouch_commands.SETSTYLE then + cmdLen = 1 + local styleSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETSTYLE") + i = i+1 -- move the read index + styleSubtree:add(style, buffer(i, cmdLen)) + i = i+cmdLen + elseif cmd == stouch_commands.SETINVERS then + cmdLen = 1 + local inverseSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETINVERS") + i = i+1 -- move the read index + -- inverseSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SWITCHOFF") + i = i+cmdLen + elseif cmd == stouch_commands.SETFOREGROUNDCOLOR then + cmdLen = 2 + local fgSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETFOREGROUNDCOLOR") + i = i+1 -- move the read index + fgSubtree:add_le(fgcolor, buffer(i, cmdLen)) + i = i+cmdLen + elseif cmd == stouch_commands.SETBACKGROUNDCOLOR then + cmdLen = 2 + local bgSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETBACKGROUNDCOLOR") + i = i+1 -- move the read index + bgSubtree:add_le(bgcolor, buffer(i, cmdLen)) + i = i+cmdLen + elseif cmd == stouch_commands.SETFONTTYPE then + cmdLen = 1 + local fontSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETFONTTYPE") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.SETPIXEL then + cmdLen = 0 + local pixelSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETPIXEL") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.MOVETO then + cmdLen = 4 + local movetoSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "MOVETO") + i = i+1 -- move the read index + movetoSubtree:add_le(mvToX, buffer(i, 2)) + movetoSubtree:add_le(mvToY, buffer(i+2, 2)) + i = i+cmdLen + elseif cmd == stouch_commands.DRAWLINETO then + cmdLen = 4 + local DRAWLINETOSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "DRAWLINETO") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.DRAWRECTANGLE then + cmdLen = 8 + local rectSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "DRAWRECTANGLE") + i = i+1 -- move the read index + rectSubtree:add_le(rectX1, buffer(i, 2)) + rectSubtree:add_le(rectY1, buffer(i+2, 2)) + rectSubtree:add_le(rectX2, buffer(i+4, 2)) + rectSubtree:add_le(rectY2, buffer(i+6, 2)) + i = i+cmdLen + elseif cmd == stouch_commands.DRAWARC then + cmdLen = 6 + local arcSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "DRAWARC") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.DRAWROUNDRECTANGLE then + cmdLen = 10 + local roundrectSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "DRAWROUNDRECTANGLE") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.DRAWSYMBOL then + cmdLen = 6 + local symbolSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "DRAWSYMBOL") + i = i+1 -- move the read index + symbolSubtree:add_le(x, buffer(i, 2)) + symbolSubtree:add_le(y, buffer(i+2, 2)) + symbolSubtree:add_le(id, buffer(i+4, 2)) + i = i+cmdLen + elseif cmd == stouch_commands.DELETESYMBOL then + cmdLen = 6 + local delsymbolSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "DELETESYMBOL") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.SETXY then + cmdLen = 4 + local xySubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETXY") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.PUTC then + cmdLen = 1 + local putcSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "PUTC") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.PRINT then + -- next 0 after i+1 + cmdLen = findNextZero(buffer, i+1) - i + local printSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "PRINT") + i = i+1 -- move the read index + printSubtree:add(text, buffer(i, cmdLen-1)) --cut the zero delimiter + i = i+cmdLen + elseif cmd == stouch_commands.PRINTXY then + -- next 0 after i+5 + cmdLen = findNextZero(buffer, i+5) - i + local printxySubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "PRINTXY") + i = i+1 -- move the read index + printxySubtree:add_le(x, buffer(i, 2)) + printxySubtree:add_le(y, buffer(i+2, 2)) + printxySubtree:add(text, buffer(i+4, cmdLen-5)) --cut the zero delimiter + i = i+cmdLen + elseif cmd == stouch_commands.PUTCROTATE then + cmdLen = 3 + local crotSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "PUTCROTATE") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.PRINTROTATE then + -- next 0 after i+3 + cmdLen = findNextZero(buffer, i+3) - i + local printrotateSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "PRINTROTATE") + i = i+1 -- move the read index + printrotateSubtree:add(unknown, buffer(i, 1)) + printrotateSubtree:add(text, buffer(i+1, cmdLen-2)) --cut the zero delimiter + i = i+cmdLen + elseif cmd == stouch_commands.CALIBRATETOUCH then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "CALIBRATETOUCH") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.SYNCNOW then + cmdLen = 2 + local syncSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SYNCNOW") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.SETBACKLIGHT then + cmdLen = 1 + local backlightSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETBACKLIGHT") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.SETBUZZER then + cmdLen = 2 + local buzzerSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETBUZZER") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.SETCLICK then + cmdLen = 1 + local clickSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETCLICK") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.SETBUTTON then + cmdLen = 9 + local btnSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETBUTTON") + i = i+1 -- move the read index + btnSubtree:add(btnId, buffer(i, 1)) + btnSubtree:add_le(btnX1, buffer(i+1, 2)) + btnSubtree:add_le(btnY1, buffer(i+3, 2)) + btnSubtree:add_le(btnX2, buffer(i+5, 2)) + btnSubtree:add_le(btnY2, buffer(i+7, 2)) + i = i+cmdLen + elseif cmd == stouch_commands.DELETEBUTTON then + cmdLen = 1 + local delbtnSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "DELETEBUTTON") + i = i+1 -- move the read index + delbtnSubtree:add(id, buffer(i, 1)) + i = i+cmdLen + elseif cmd == stouch_commands.SETTEMPOFFSETS then + cmdLen = 4 + local tmpoffSubtree = cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETTEMPOFFSETS") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.GETSYSTEM then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "GETSYSTEM") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.GOSYSTEM then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "GOSYSTEM") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.CLEARID then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "CLEARID") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.GETRESOURCEINFO then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "GETRESOURCEINFO") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.ERASERESOURCE then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "ERASERESOURCE") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.FLASHRESOURCE then + cmdLen = 0 + subtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "FLASHRESOURCE") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.ACTIVATERESOURCE then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "ACTIVATERESOURCE") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.SETCONFIG then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "SETCONFIG") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.CLEARAPP then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "CLEARAPP") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.FLASHAPP then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "FLASHAPP") + i = i+1 -- move the read index + i = i+cmdLen + elseif cmd == stouch_commands.ACTIVATEAPP then + cmdLen = 0 + cmdSubtree:add(stouch_protocol, buffer(i, 1 + cmdLen), "ACTIVATEAPP") + i = i+1 -- move the read index + i = i+cmdLen + else + i = i+1 + end + end +end + +function findNextZero(buffer, i) + local byte = 0 + while i < buffer:len() - 1 do + byte = buffer(i,1):uint() + if byte == 0 then + break + end + i = i + 1 + end + return i +end + +function dissect_OK(buffer, pinfo, subtree, i) + -- local packet_subtype_name = get_subtype_name(packet_subtype) + subtree:add(packet_subtype, buffer(i,1)):append_text(" ( PKT_OK )") + i = i+1 + subtree:add_le(int02, buffer(i,2)) + i = i+2 + subtree:add(pressId, buffer(i,1)) + i = i+1 + subtree:add_le(pressX, buffer(i,2)) + i = i+2 + subtree:add_le(pressY, buffer(i,2)) + i = i+2 + subtree:add_le(zero_bytes, buffer(i,2)) + i = i+2 + subtree:add_le(free_command_space, buffer(i,2)) + i = i+2 + subtree:add_le(int01, buffer(i,2)) + +end + +function dissect_ERR(buffer, pinfo, subtree, i) + -- local packet_subtype_name = get_subtype_name(packet_subtype) + subtree:add(packet_subtype, buffer(i,1)):append_text(" ( PKT_ERR )") + i = i+1 + subtree:add_le(int02, buffer(i,2)) + i = i+2 + subtree:add_le(free_command_space, buffer(i,2)) + i = i+2 + subtree:add_le(int01, buffer(i,2)) + +end + + +stouch_commands = { + SWITCHON = 0, + SWITCHOFF = 1, + SETSTYLE = 2, + SETINVERS = 3, + SETFOREGROUNDCOLOR = 4, + SETBACKGROUNDCOLOR = 5, + SETFONTTYPE = 6, + SETPIXEL = 7, + MOVETO = 8, + DRAWLINETO = 9, + DRAWRECTANGLE = 10, + DRAWARC = 11, + DRAWROUNDRECTANGLE = 12, + DRAWSYMBOL = 13, + DELETESYMBOL = 14, + SETXY = 15, + PUTC = 16, + PRINT = 17, + PRINTXY = 18, + PUTCROTATE = 19, + PRINTROTATE = 20, + CALIBRATETOUCH = 21, + SYNCNOW = 22, + SETBACKLIGHT = 128, + SETBUZZER = 129, + SETCLICK = 130, + SETBUTTON = 144, + DELETEBUTTON = 145, + SETTEMPOFFSETS = 146, + GETSYSTEM = 240, + GOSYSTEM = 241, + CLEARID = 242, + GETRESOURCEINFO = 243, + ERASERESOURCE = 244, + FLASHRESOURCE = 245, + ACTIVATERESOURCE = 246, + SETCONFIG = 247, + CLEARAPP = 250, + FLASHAPP = 251, + ACTIVATEAPP = 252 +} + + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(3477, stouch_protocol) diff --git a/dissectors/tak-cot/LICENSE b/dissectors/tak-cot/LICENSE new file mode 100644 index 0000000..c5a1b72 --- /dev/null +++ b/dissectors/tak-cot/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Joshua M. Keyes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/tak-cot/README.md b/dissectors/tak-cot/README.md new file mode 100644 index 0000000..58611ec --- /dev/null +++ b/dissectors/tak-cot/README.md @@ -0,0 +1,59 @@ +# TAK — Cursor-on-Target / TAK Protocol + +Dissecteur Wireshark Lua des messages **TAK** (Team Awareness Kit) +au format **Cursor-on-Target** (CoT), par +Joshua M. Keyes (version 1.0.0). Protocole `tak` sur TCP et UDP, port +6969 par défaut (préférence) : il distingue trois formes et indique +version, longueur et forme dans l'arbre : + +- **XML** (« version 0 ») : message commençant par `", + repository = "https://github.com/jmkeyes/wireshark-tak-plugin", + version = "1.0.0", +}) + +-- Default settings. +local default_settings = { + -- The port number to associate with TAK messages. + port = 6969, + -- The protobuf message name to decode from the buffer. + message_type = "atakmap.commoncommo.protobuf.v1.TakMessage" +} + +-- Decode a TAK protocol spec varint. +local function varint(buffer, offset) + local index = 0 + local value = 0 + + while true do + -- Get the next byte in the buffer. + local byte = buffer:range(offset + index, 1):uint() + + -- Accumulate the lower seven bits of this byte. + value = value + bit.lshift(bit.band(byte, 0x7f), index * 7) + + -- Exit if the most significant bit was not set. + if bit.band(byte, 0x80) == 0 then + break + end + + -- Advance the index. + index = index + 1 + end + + -- Return the total value and byte count. + return value, (index + 1) +end + +-- Protocol definition. +tak = Proto("TAK", "TAK Protocol") + +-- Protocol preferences. +tak.prefs.port = Pref.uint("Port number", default_settings.port, "TCP/UDP port number.") +tak.prefs.message_type = Pref.string("Message Type", default_settings.message_type, "Protobuf message type.") + +-- Protocol preference change callback. +tak.prefs_changed = function () + -- Reassociate the DissectorTable entry if using a non-default port. + if default_settings.port ~= tak.prefs.port then + -- Dissociate the TAK protocol from any non-default port. + if default_settings.port ~= 0 then + DissectorTable.get("tcp.port"):remove(default_settings.port, tak) + DissectorTable.get("udp.port"):remove(default_settings.port, tak) + end + + -- Reassign the default port to our preferred port. + default_settings.port = tak.prefs.port + + -- Assocate the TAK protocol with the current port. + if default_settings.port ~= 0 then + DissectorTable.get("tcp.port"):add(default_settings.port, tak) + DissectorTable.get("udp.port"):add(default_settings.port, tak) + end + end + + -- Set the Protobuf message type we should decode. + default_settings.message_type = tak.message_type +end + +-- Protocol fields. +tak.fields.protocol = ProtoField.string("tak.protocol", "Protocol") +tak.fields.version = ProtoField.uint8("tak.version", "Version", base.DEC) +tak.fields.length = ProtoField.uint32("tak.length", "Length", base.DEC) + +-- Protocol expert information. +tak.experts.malformed = ProtoExpert.new("tak.expert.malformed", "Malformed TAK Message", expert.group.MALFORMED, expert.severity.ERROR) + +-- Protocol dissector callback. +tak.dissector = function (buffer, pinfo, tree) + local offset = 0 + local length = buffer:reported_length_remaining() + local subtree = tree:add(tak, buffer:range(0, length), "TAK Message") + + -- Assign this packet our protocol name. + pinfo.cols.protocol:set(tak.name) + + -- If this is an XML COT message then process it immediately. + if buffer:range(offset, 5):string() == " + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. + diff --git a/dissectors/tamanu-stream/README.md b/dissectors/tamanu-stream/README.md new file mode 100644 index 0000000..25737c3 --- /dev/null +++ b/dissectors/tamanu-stream/README.md @@ -0,0 +1,65 @@ +# Tamanu — flux de synchronisation `application/json+frame` + +Dissecteur Wireshark Lua (post-dissecteur) des réponses HTTP en flux du +serveur central de [Tamanu](https://github.com/beyondessential/tamanu) +(dossier patient électronique de BES) : il découpe le corps des réponses +`Content-Type: application/json+frame` en messages `CR+LF`, type (u16), +longueur (u32), puis données JSON. Il affiche les types connus +(`SESSION WAITING`, `PULL WAITING`, `PULL CHANGE`, `END`) (issue #517). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/beyondessential/tamanu (`docs/wireshark-tamanu-stream.lua`) | +| Commit importé | `7672b1b4cd0548ef9639051d2b5356113360dafd` du 02/11/2026 (dernier commit de `main`) ; dernière modification du fichier : commit `2d0e73e5a48bd635101c466c08cbe3c49a232b53` du 07/10/2025 (Daniel Nash) | +| Licence amont | Double licence du dépôt. D'après `COPYRIGHT`, le projet est sous GPL-3.0 ou ultérieure (`LICENSE-GPL`), sauf les API et intégrations FHIR. Celles-ci sont sous BSL 1.1 (`LICENSE-BSL`) et listées explicitement (`packages/database/src/models/fhir`, `packages/central-server/app/hl7fhir`, etc.). `docs/` n'en fait pas partie : le fichier est donc sous GPL-3.0-or-later, comme ce dépôt. `package.json` déclare « GPL-3.0-and-later AND BUSL-1.1 » pour l'ensemble | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur Tamanu dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE-GPL` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/wireshark-tamanu-stream.lua` | Protocole `tamanu.stream` (« Tamanu stream »), post-dissecteur (ligne 81) ; champs `tamanu.message`, `tamanu.kind`, `tamanu.length`, `tamanu.data` | + +## Utilisation + +Copier `src/wireshark-tamanu-stream.lua` dans le dossier des plugins Lua +personnels de Wireshark (« Aide › À propos de Wireshark › Dossiers »), +puis Ctrl+Maj+L. Le trafic doit être décodé en HTTP : port HTTP connu, ou +`Decode As…` (par exemple `-d tcp.port==3000,http`). En HTTPS, il faut +aussi les clés TLS. Filtres : `tamanu.stream`, `tamanu.kind == 0x0003`. + +## Vérification à l'import + +tshark 4.6.4 : le fichier se charge sans erreur (`luac5.4 -p` : OK). +Captures synthétiques construites au format produit par le serveur +(`packages/central-server/app/sync/StreamMessage.js`, lignes 3 à 27 ; +types dans `packages/constants/src/sync.ts`, au commit importé) : + +| Essai | Résultat | +|---|---| +| Réponse `Content-Length` avec 4 messages (`0x0001`, deux `0x0003` avec JSON, `0xf001`) | `Tamanu stream (4 messages)` : types décodés, longueurs et données JSON exacts ; filtre `tamanu.kind == 3` : OK | +| Réponse `Transfer-Encoding: chunked` (comme le serveur), un message par bloc, segments TCP séparés | `Tamanu stream (3 messages)` sur la trame qui termine la réponse | +| Longueur annoncée (100) supérieure aux données restantes | **erreur Lua** ligne 63 (`Range is out of bounds`) | + +## Limites constatées + +- **Aucun contrôle de longueur** : une longueur annoncée trop grande ou + des octets de fin incomplets (réponse tronquée, capture coupée) + provoquent une erreur Lua (lignes 53 à 63) au lieu d'un avertissement. +- Les deux octets `CR+LF` sont sautés sans vérification (ligne 53). +- Rien n'est affiché tant que la réponse HTTP n'est pas complète + (`http.file_data` n'est fourni qu'une fois le flux réassemblé). Un flux + interrompu n'est donc pas décodé. +- Le type de contenu doit valoir exactement `application/json+frame` + (ligne 40) : un paramètre (`; charset=…`) le fait ignorer. +- Le post-dissecteur s'exécute sur toutes les trames ; colonnes Protocole + et Info laissées à HTTP. +- Pas de capture réelle disponible (le trafic de production passe en + HTTPS). diff --git a/dissectors/tamanu-stream/src/wireshark-tamanu-stream.lua b/dissectors/tamanu-stream/src/wireshark-tamanu-stream.lua new file mode 100644 index 0000000..5ad4bf4 --- /dev/null +++ b/dissectors/tamanu-stream/src/wireshark-tamanu-stream.lua @@ -0,0 +1,82 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/beyondessential/tamanu (docs/wireshark-tamanu-stream.lua), +-- commit 7672b1b4cd0548ef9639051d2b5356113360dafd du 02/11/2026 (dernière modification du fichier : +-- commit 2d0e73e5a48bd635101c466c08cbe3c49a232b53 du 07/10/2025). +-- Licence amont : GPL-3.0-or-later (COPYRIGHT et LICENSE-GPL du dépôt, hors parties sous BSL) — voir README.md et LICENSE. +-- Wireshark dissector for Tamanu Streaming Protocol +-- +-- install by symlinking into your ~/.local/lib/wireshark/plugins/ +-- or wherever your install reads from, see Wireshark documentation: +-- https://www.wireshark.org/docs/wsug_html_chunked/ChPluginFolders.html +do + -- define fields that can be filtered on and how they're displayed in the UI + local proto = Proto("tamanu.stream", "Tamanu stream") + local F_msg = ProtoField.none("tamanu.message", "Message", base.HEX) + local F_msg_length = ProtoField.uint32("tamanu.length", "Payload length", base.DEC) + local F_msg_kind = ProtoField.uint16("tamanu.kind", "Message kind", base.HEX) + local F_msg_data = ProtoField.string("tamanu.data", "Message data", base.NONE) + proto.fields = { F_msg, F_msg_length, F_msg_kind, F_msg_data } + + -- existing fields that we want to match on and use for dissecting + local f_tcp_stream = Field.new("tcp.stream") + local f_content_type = Field.new("http.content_type") + local f_http_data = Field.new("http.file_data") + + -- these match the message kinds defined in + -- /packages/constants/src/sync.ts + local function decode_kind(id) + if id == 0xf001 then return "END" end + if id == 0x0001 then return "SESSION WAITING" end + if id == 0x0002 then return "PULL WAITING" end + if id == 0x0003 then return "PULL CHANGE" end + return nil + end + + function proto.dissector(tvbuffer, pinfo, treeitem) + -- if we're not looking at an HTTP response with the right content type, go away + if not f_tcp_stream() then return end + if not f_http_data() then return end + if not f_content_type() then return end + if f_content_type().value ~= "application/json+frame" then return end + + -- the actual data in the HTTP response stream + local data = f_http_data().range + + -- declare a new tree in the packet UI for the protocol + local subtree = treeitem:add(proto, data) + + -- loop through messages in the stream + local offset = 0 + local amount = 0 + while offset < data:len() do + -- skip the CR+LF bytes, then read the u16 kind and u32 length + local kind = data(offset + 2, 2) + local len = data(offset + 4, 4) + + -- read the message payload + local msg_len = len:uint() + + -- declare a new subtree for the individual message + -- with a label that has the decoded kind, and then + -- add the decoded field values. message payload is + -- omitted if length is zero, for concise display + local msg = subtree:add(F_msg, data(offset, msg_len + 8)) + local decoded_kind = decode_kind(kind:uint()) + if decoded_kind then msg:append_text(": " .. decoded_kind) end + msg:add(F_msg_kind, kind, kind:uint()) + msg:add(F_msg_length, len, msg_len) + if msg_len > 0 then msg:add(F_msg_data, data(offset + 8, len:uint())) end + + -- increment to parse the next message + offset = offset + 8 + msg_len + amount = amount + 1 + end + + -- once we're done, add the total number of messages at the top + if amount > 0 then + subtree:append_text(" (" .. amount .. " messages)") + end + end + + register_postdissector(proto) +end diff --git a/dissectors/tin-aaa/LICENSE b/dissectors/tin-aaa/LICENSE new file mode 100644 index 0000000..9d6983e --- /dev/null +++ b/dissectors/tin-aaa/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Anton Masiukevich, Joanna Sokołowska, Adrian Brodzik + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/tin-aaa/README.md b/dissectors/tin-aaa/README.md new file mode 100644 index 0000000..0a22fbe --- /dev/null +++ b/dissectors/tin-aaa/README.md @@ -0,0 +1,49 @@ +# TIN-AAA — protocole maison d'un mandataire pour réseau de capteurs + +Dissecteur Wireshark Lua du **protocole « AAA » du projet étudiant TINs** +(mandataire HTTP pour un réseau de capteurs simulé, 2021) : en-tête de +2 octets — type de paquet (DATA, ACK, ERROR, sur les 2 bits de poids fort), numéro de paquet (ou +code d'erreur : mauvais type, mauvaise session, mauvais compteur) et +identifiant de session — puis charge utile texte. Port UDP 3000. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/amasiukevich/TINs (fichier `src/wireshark/tin-aaa.lua`) | +| Commit importé | `d80a64891ecd0cf64d5d04f715e2dfc00dae908d` du 10/06/2021 (branche `main`, dernier commit ; dernière modification du script : `03fbea5` du 07/06/2021) | +| Licence amont | MIT (`LICENSE` amont, © 2021 Anton Masiukevich, Joanna Sokołowska, Adrian Brodzik) | +| Natif Wireshark 4.6.4 | Non — protocole propre au projet | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `tin-aaa.lua` | Protocole `aaa` sur UDP 3000 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Le reste du dépôt (mandataire, appareils +simulés en C++, sous-modules) n'est pas importé. + +## Utilisation + +Copier `tin-aaa.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`, inutile de lancer Wireshark en +`sudo` comme dans le README amont), recharger les plugins Lua, puis +filtrer avec `aaa`. + +## Remarques + +- **Noms de champs génériques** : les champs sont déclarés sous les + abréviations `type`, `num` et `session`, sans préfixe de protocole, ce + qui peut entrer en conflit avec d'autres champs ou être refusé par les + Wireshark récents ; arguments de `ProtoField.uint8/uint16` décalés + (`base.dec` en minuscules vaut `nil`). Laissé tel quel. +- Le nom de protocole court et générique `aaa` peut prêter à confusion + avec l'authentification / autorisation / comptabilité (Diameter, + RADIUS) : il s'agit ici d'un protocole d'exercice. +- Le port UDP 3000 est souvent utilisé par d'autres applications. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/tin-aaa/tin-aaa.lua b/dissectors/tin-aaa/tin-aaa.lua new file mode 100644 index 0000000..c1d0307 --- /dev/null +++ b/dissectors/tin-aaa/tin-aaa.lua @@ -0,0 +1,97 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/amasiukevich/TINs (src/wireshark/tin-aaa.lua), +-- commit d80a64891ecd0cf64d5d04f715e2dfc00dae908d du 10/06/2021. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- created by Joanna Sokołowska on 16.05.2021 + + +-- tutorial: https://mika-s.github.io/wireshark/lua/dissector/2017/11/04/creating-a-wireshark-dissector-in-lua-1.html + + + +local math = require("math") + +-- definitions concerning message type +local packet_type_mask = 0xC0 +local msg_data = 2 +local msg_ack = 1 +local msg_error = 3 +local counter_mask = 0x3F80; +local session_mask = 0x007F; + +-- definitions of error codes +local e_unknown = 0; +local e_wrong_type = 1; +local e_wrong_count = 2; +local e_wrong_session = 3; + +aaa_protocol = Proto("AAA", "AAA Protocol") + +packet_type = ProtoField.uint8( "type", "packet type",nil, base.dec, packet_type_mask) +number = ProtoField.uint16("num", "packet number",nil, base.dec, counter_mask) +session_id = ProtoField.uint16("session", "session id", nil, base.dec, session_mask) + + +aaa_protocol.fields = {packet_type, number, session_id} + +-- sourrce: https://stackoverflow.com/questions/32387117/bitwise-and-in-lua +local function bitwise_and(a, b) + local result = 0 + local bitval = 1 + while a>0 and b >0 do + if a%2 == 1 and b%2==1 then + result = result + bitval + end + bitval = bitval * 2 -- left shift + a = math.floor(a/2) + b = math.floor(b/2) + end + return result +end + +local function get_msg_type(code) + code = math.floor(code / (2^6)) -- shift right by 6 so that you get int representation of codes (lua 5.2 does not support bitwise operations :C) + local msg_type = "UNKNOWN" + if code == msg_error then msg_type = "ERROR" + elseif code == msg_data then msg_type = "DATA" + elseif code == msg_ack then msg_type = "ACK" end + return msg_type +end + +local function get_error_codes(num) + num = bitwise_and(num, counter_mask) + num = math.floor(num/2^7) + local err_code = "E_UNKNOWN" + if num == e_wrong_type then err_code= "E_WRONG_PACKET_TYPE" + elseif num == e_wrong_session then err_code = "E_WRONG_SESSION" + elseif num == e_wrong_count then err_code = "E_WRONG_COUNT" + end + return err_code +end + +function aaa_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if(length == 0) then return end + + pinfo.cols.protocol = aaa_protocol.name + local subtree = tree:add(aaa_protocol, buffer(), "AAA protocol data") + local type = buffer(0,1):bytes():get_index(0) + local typename = get_msg_type(type) + subtree:add(packet_type, buffer(0,1)):append_text(" [" .. typename .. "] ") + + local counter = buffer(0,1):bytes():get_index(0) + subtree:add(session_id, buffer(0,2)):append_text("[session_id]") + if(typename == "ERROR") then + local error_code = get_error_codes(counter) + subtree:add(number, buffer(0,2)):append_text(" [" .. error_code .. "]" ) + else + subtree:add(number, buffer(0,2)):append_text(" [nr] ") + + end + if (typename ~= "ACK" and length > 2) then + subtree:add(buffer(2, length-2), buffer(2, length-2):string()):append_text(" [payload] ") + end +end + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(3000, aaa_protocol) diff --git a/dissectors/tplink-smarthome/LICENSE b/dissectors/tplink-smarthome/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/dissectors/tplink-smarthome/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/tplink-smarthome/README.md b/dissectors/tplink-smarthome/README.md new file mode 100644 index 0000000..ff7b08f --- /dev/null +++ b/dissectors/tplink-smarthome/README.md @@ -0,0 +1,56 @@ +# TP-Link Smart Home — prises et ampoules Kasa (port 9999) + +Dissecteur Wireshark Lua du **protocole local TP-Link Smart Home** (prises +HS100 / HS110 et autres appareils Kasa pilotés par l'application Kasa) : +après l'en-tête de 4 octets (longueur), déchiffrement du chiffrement par +« XOR à clé automatique » (clé initiale 171, chaque octet chiffré servant +de clé au suivant), affichage du texte en clair puis transmission du JSON +obtenu au dissecteur `json` natif. Port TCP 9999. + +## Import + +| | | +|---|---| +| Dépôt amont | https://gitlab.com/a.lloyd.l.branch/tplink-smartplug (copie GitLab de https://github.com/softScheck/tplink-smartplug) | +| Commit importé | `3ac643160b04ea0bfa2e0b5b4a11211bc7f305e2` du 08/09/2018 (branche `master`, dernier commit ; dernière modification de `tplink-smarthome.lua` : `244b0f9b` du 28/07/2016, « Initial commit ») | +| Licence amont | Apache-2.0 (`LICENSE` amont ; en-tête du fichier : « Licensed under the Apache License, Version 2.0 », © 2016 softScheck GmbH, Lubomir Stroetmann) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur TP-Link Smart Home natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). Aucun fichier `NOTICE` amont. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `tplink-smarthome.lua` | Protocole `tplink-smarthome` sur TCP 9999, puis dissecteur `json` | + +Fichier importé tel quel (fins de ligne CRLF conservées) ; seule une +en-tête SPDX + provenance de quatre lignes a été ajoutée en tête. Il est +identique octet pour octet au `tplink-smarthome.lua` de la branche +`master` de softScheck/tplink-smartplug. Non importés : les clients +Python (`tplink-smartplug.py`, `tddp-client/`), la liste de commandes et +la capture d'écran. + +## Utilisation + +Copier `tplink-smarthome.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `tplink-smarthome` ou `json`. + +## Remarques + +- **`bit32` absent des Wireshark récents** : le déchiffrement appelle + `bit32.bxor`, bibliothèque de Lua 5.2 absente par défaut de Lua 5.3 et + 5.4, seules versions prises en charge depuis Wireshark 4.4 (qui fournit + `bit` à la place). Sans `bit32` global, la dissection échoue dès le + premier paquet (« attempt to index a nil value (global 'bit32') ») ; + contournement local : ajouter `bit32 = bit` en tête du fichier (code + amont non modifié ici). +- Les octets déchiffrés sont convertis en hexadécimal avec `%x` sans + zéro de tête : un octet inférieur à `0x10` (retour à la ligne, par + exemple) décale la conversion et peut corrompre le JSON transmis. +- Seul le chiffrement historique (XOR) est géré, pas le protocole KLAP + des micrologiciels récents ; pour les appareils Tapo, voir + `dissectors/tplink-tapo/`. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/tplink-smarthome/tplink-smarthome.lua b/dissectors/tplink-smarthome/tplink-smarthome.lua new file mode 100644 index 0000000..3c37a13 --- /dev/null +++ b/dissectors/tplink-smarthome/tplink-smarthome.lua @@ -0,0 +1,92 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://gitlab.com/a.lloyd.l.branch/tplink-smartplug (tplink-smarthome.lua), +-- commit 3ac643160b04ea0bfa2e0b5b4a11211bc7f305e2 du 08/09/2018. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- TP-Link Smart Home Protocol (Port 9999) Wireshark Dissector +-- For decrypting local network traffic between TP-Link +-- Smart Home Devices and the Kasa Smart Home App +-- +-- Install under: +-- (Windows) %APPDATA%\Wireshark\plugins\ +-- (Linux, Mac) $HOME/.wireshark/plugins +-- +-- by Lubomir Stroetmann +-- Copyright 2016 softScheck GmbH +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- + +-- Create TP-Link Smart Home protocol and its fields +p_tplink = Proto ("TPLink-SmartHome","TP-Link Smart Home Protocol") + +-- Dissector function +function p_tplink.dissector (buf, pkt, root) + -- Validate packet length + if buf:len() == 0 then return end + pkt.cols.protocol = p_tplink.name + + -- Decode data + local ascii = "" + local hex = "" + + -- Skip first 4 bytes (header) + start = 4 + endPosition = buf:len() - 1 + + -- Decryption key is -85 (256-85=171) + local key = 171 + + -- Decrypt Autokey XOR + -- Save results as ascii and hex + for index = start, endPosition do + local c = buf(index,1):uint() + -- XOR first byte with key + d = bit32.bxor(c,key) + -- Use byte as next key + key = c + + hex = hex .. string.format("%x", d) + -- Convert to printable characters + if d >= 0x20 and d <= 0x7E then + ascii = ascii .. string.format("%c", d) + else + -- Use dot for non-printable bytes + ascii = ascii .. "." + end + end + + + -- Create subtree + subtree = root:add(p_tplink, buf(0)) + + -- Add data to subtree + subtree:add(ascii) + -- Description of payload + subtree:append_text(" (decrypted)") + + -- Call JSON Dissector with decrypted data + local b = ByteArray.new(hex) + local tvb = ByteArray.tvb(b, "JSON TVB") + Dissector.get("json"):call(tvb, pkt, root) + +end + +-- Initialization routine +function p_tplink.init() +end + +-- Register a chained dissector for port 9999 +local tcp_dissector_table = DissectorTable.get("tcp.port") +dissector = tcp_dissector_table:get_dissector(9999) +tcp_dissector_table:add(9999, p_tplink) \ No newline at end of file diff --git a/dissectors/tplink-tapo/LICENSE b/dissectors/tplink-tapo/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/tplink-tapo/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/tplink-tapo/README.md b/dissectors/tplink-tapo/README.md new file mode 100644 index 0000000..fa95661 --- /dev/null +++ b/dissectors/tplink-tapo/README.md @@ -0,0 +1,52 @@ +# TP-Link Tapo (protocole propriétaire des caméras Tapo) + +Dissecteur Wireshark Lua du **protocole propriétaire des caméras IP TP-Link +Tapo** (testé par l'auteur sur une Tapo C100) : + +- **découverte d'appareils** sur UDP 20002 / 20004 : en-tête de 16 octets + (version, type, code d'opération, longueur, drapeaux, numéro de série, + somme de contrôle) puis charge JSON (passée au dissecteur JSON natif) ou + binaire ; +- **contrôle et flux média** sur TCP 8800 : messages multipart de type + HTTP (frontière de flux, `Content-Type`, `Content-Length`, + `X-Session-Id`, indicateur de chiffrement), avec charge chiffrée + signalée, le HTTP classique restant transmis au dissecteur HTTP ; +- **maintien de connexion** sur le port 8001. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/KostasEreksonas/Tapo_protocol_analysis (fichier `tapoWireshark.lua`) | +| Commit importé | `3666da95d0ffca3df6e945a224a70972067bb643` du 31/08/2026 (branche `main`, dernier commit ; dernière modification du dissecteur : `130a769` du 19/07/2026) | +| Licence amont | GPL-3.0-or-later (en-tête du fichier : « Copyright (C) 2026 Kostas Ereksonas », « either version 3 of the License, or (at your option) any later version » ; `LICENSE` amont : texte de la GPL v3) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Tapo natif (le `tplink-smarthome` natif concerne les prises Kasa, protocole différent) | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `tapoWireshark.lua` | Dissecteur `tapo` (UDP 20002, 20004, 8001 ; TCP 8800) | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. Non importés : les schémas et +captures d'écran `images/` du README amont, qui documente aussi en détail +la structure des paquets. + +## Utilisation + +Copier `tapoWireshark.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `tapo` (champs `tapo.opcode`, `tapo.serial_number`, +`tapo.session_id`…). + +## Remarques + +- Travail en cours selon l'auteur (« WIP ») ; testé sur un seul modèle. +- Le port 8001 est enregistré en **UDP** dans le code, alors que le README + amont parle de TCP 8001 pour le maintien de connexion (non vérifié). +- Les flux média chiffrés ne sont pas déchiffrés. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/tplink-tapo/tapoWireshark.lua b/dissectors/tplink-tapo/tapoWireshark.lua new file mode 100644 index 0000000..a9f8d96 --- /dev/null +++ b/dissectors/tplink-tapo/tapoWireshark.lua @@ -0,0 +1,267 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/KostasEreksonas/Tapo_protocol_analysis (tapoWireshark.lua), +-- commit 3666da95d0ffca3df6e945a224a70972067bb643 du 31/08/2026. +-- Licence amont : GPL-3.0-or-later (LICENSE amont) — voir README.md. +-- -*- coding: utf-8 -*- +-- Dissector for proprietary communication protocol found on TP-Link Tapo devices +-- Copyright (C) 2026 Kostas Ereksonas +-- +-- 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 3 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, see . + +-- Header length of discovery packets +local HEADER_LEN_DISCOVERY = 16 + +-- JSON curly braces +local JSON_OPEN_BRACE = 0x7b +local JSON_CLOSE_BRACE = 0x7d + +-- Load JSON dissector +local json = Dissector.get("json") + +-- Keep HTTP messages intact when dissecting TP-Link proprietary messages on port TCP/8800 +local http = DissectorTable.get("tcp.port"):get_dissector(80) + +local tapo_proto = Proto("tapo", "TP-Link Tapo Protocol") + +-- Discovery message fields (header + payload) +local tapo_header = ProtoField.bytes("tapo.header", "RAW Header") +local tapo_version = ProtoField.uint8("tapo.version", "Packet Version", base.HEX_DEC) +local tapo_type = ProtoField.uint8("tapo.type", "Packet Type", base.HEX_DEC) +local tapo_opcode = ProtoField.uint16("tapo.opcode", "Operation Code for Current Message", base.HEX_DEC) +local tapo_payload_length = ProtoField.uint16("tapo.payload_length", "Payload Length of Discovery Message", base.DEC_HEX) +local tapo_flags = ProtoField.uint8("tapo.flags", "Flags for Current Message", base.HEX_DEC) +local tapo_align = ProtoField.uint8("tapo.align", "Extra Value for Struct Alignment", base.HEX_DEC) +local tapo_serial_number = ProtoField.uint32("tapo.serial_number", "Serial Number", base.HEX_DEC) +local tapo_checksum = ProtoField.uint32("tapo.checksum", "Checksum", base.HEX_DEC) +local tapo_payload_json_raw = ProtoField.string("tapo.data", "Raw JSON Message") + +-- Control and media message fields +local tapo_device_stream_boundary = ProtoField.string("tapo.device_stream_boundary", "Device Stream Boundary") +local tapo_content_type = ProtoField.string("tapo.content_type", "Content Type") +local tapo_content_length = ProtoField.string("tapo.content_length", "Content Length") +local tapo_x_session_id = ProtoField.string("tapo.session_id", "Session ID") +local tapo_x_if_encrypt = ProtoField.string("tapo.encrypted", "Ecryption Flag") + +-- Field for discovery packet wiyh binary data +local tapo_binary = ProtoField.string("tapo.binary", "Discovery Packet With Binary Data") + +tapo_proto.fields = { + -- Discovery message fields (header + payload) + tapo_header, + tapo_version, + tapo_type, + tapo_opcode, + tapo_payload_length, + tapo_flags, + tapo_align, + tapo_serial_number, + tapo_checksum, + tapo_payload_json_raw, + -- Control and media message fields + tapo_device_stream_boundary, + tapo_content_type, + tapo_content_length, + tapo_x_session_id, + tapo_x_if_encrypt, + tapo_binary +} + +local function get_udp_length(tvb) + return tvb:len() +end + +local function udp_dissect_json_pdu(tvb, pinfo, subtree) + -- Dissect discovery and management packets + -- Add raw header to the protocol tree + subtree:add(tapo_header, tvb(0, 16)) + + -- Parse separate header fields and put into a subtree + local htree = subtree:add(tapo_proto, tvb(0, HEADER_LEN_DISCOVERY), "TAPO Discovery Packet Header") + htree:add(tapo_version, tvb(0, 1)) + htree:add(tapo_type, tvb(1, 1)) + htree:add(tapo_opcode, tvb(2, 2)) + htree:add(tapo_payload_length, tvb(4, 2)) + htree:add(tapo_flags, tvb(6, 1)) + htree:add(tapo_align, tvb(7, 1)) + htree:add(tapo_serial_number, tvb(8, 4)) + htree:add(tapo_checksum, tvb(12, 4)) + + -- Save payload as JSON + local json_tvb + json_tvb = tvb(HEADER_LEN_DISCOVERY, tvb:len() - HEADER_LEN_DISCOVERY) + + -- Decode JSON object using built-in dissector + json:call(json_tvb:tvb(), pinfo, subtree) + + -- Add JSON payload to the protocol tree + subtree:add(tapo_payload_json_raw, json_tvb) + + -- Update protocol info + pinfo.cols.protocol = tapo_proto.name + pinfo.cols.info = "Discovery Packet " + + return tvb:len() +end + +local function parse_header(tvb) + -- Parse message header + local byte_string = tvb:raw() + local delimiter = "\x0d\x0a\x0d\x0a" + + -- Get header length + local first, last = string.find(byte_string, delimiter, 1, true) + local header_length = last + + -- Parse header fields that have variable length + local header_string = tvb(30, header_length):string() + local header_fields = {} + + for split in string.gmatch(header_string, "(.-)\r\n") do + for key, value in string.gmatch(split, "([^:]+):([^\r\n]+)") do -- Key: value\r\n + header_fields[key] = value + end + end + + -- Get length of a payload + local payload_length = tonumber(header_fields["Content-Length"]) + + if header_length == nil then + return 0 + end + + return header_length, payload_length +end + +local function get_content_length(tvb, pinfo, offset) + -- Get length of Tapo protocol message (header + payload) + local header_length, payload_length = parse_header(tvb) + + if payload_length == nil then + return 0 + end + + return header_length + payload_length + 2 +end + +local function build_content_message_header(tvb, header_length, htree) + -- Build content message header + local offset = 30 + local header_string = tvb(offset, header_length):string() + + for split in string.gmatch(header_string, "(.-)\r\n") do + for key in string.gmatch(split, "([^:]+):") do + if key == "Content-Type" then + htree:add(tapo_content_type, tvb(offset, split:len())) + elseif key == "Content-Length" then + htree:add(tapo_content_length, tvb(offset, split:len())) + elseif key == "X-Session-Id" then + htree:add(tapo_x_session_id, tvb(offset, split:len())) + elseif key == "X-If-Encrypt" then + htree:add(tapo_x_if_encrypt, tvb(offset, split:len())) + end + end + offset = offset + split:len() + 2 + end +end + +local function dissect_content_pdu(tvb, pinfo, subtree) + -- Dissect one Tapo PDU + local header_length, payload_length = parse_header(tvb) + + -- Populate message header tree + local htree = subtree:add(tapo_proto, tvb(0, header_length), "TAPO Content Packet Header") + htree:add(tapo_device_stream_boundary, tvb(0, 28)) + build_content_message_header(tvb, header_length, htree) + + -- Parse payload (JSON or encrypted media) + if tvb(header_length, 1):uint() == JSON_OPEN_BRACE and tvb(header_length + payload_length - 1, 1):uint() == JSON_CLOSE_BRACE then + local json_tvb + json_tvb = tvb(header_length, payload_length) + + -- Raw JSON text + subtree:add(tapo_payload_json_raw, json_tvb) + + -- Decode JSON object using built-in dissector + json:call(json_tvb:tvb(), pinfo, subtree) + + -- Packet information + pinfo.cols.info = "JSON Payload " + else + subtree:add(tapo_proto, tvb(header_length, payload_length), "TAPO Encrypted Payload") + + -- Packet information + pinfo.cols.info = "Encrypted Payload " + end + + -- Message ends with a newline + subtree:add(tapo_proto, tvb(header_length + payload_length, 2), "Newline") + + -- Add information to pinfo + pinfo.cols.protocol = tapo_proto.name +end + +local function discovery_binary_packet(tvb, pinfo, subtree) + -- Structure of this packet is yet to be defined + subtree:add(tapo_binary, tvb(0, tvb:len())) + + -- Add information to pinfo + pinfo.cols.protocol = tapo_proto.name + + -- Add packet description + pinfo.cols.info = "Discovery Packet With Binary Data " +end + +local function dissect_config_packet(tvb, pinfo, subtree) + local json_tvb + json_tvb = tvb(0, tvb:len()) + + -- Raw JSON text + subtree:add(tapo_payload_json_raw, json_tvb) + + -- Decode JSON object using built-in dissector + json:call(json_tvb:tvb(), pinfo, subtree) + + -- Add information to pinfo + pinfo.cols.protocol = tapo_proto.name + + -- Packet information + pinfo.cols.info = "Keep-alive request on port TCP/8001 " +end + +function tapo_proto.dissector(tvb, pinfo, tree) + local subtree = tree:add(tapo_proto, tvb(), "TAPO Communication Protocol") + if tvb(0, 4):uint() == 0x02000001 then + -- Dissect as TP-Link discovery packets on port UDP/20002 + udp_dissect_json_pdu(tvb, pinfo, subtree) + elseif tvb(0, 4):uint() == 0x01f00001 then + dissect_tcp_pdus(tvb, subtree, HEADER_LEN_DISCOVERY, get_udp_length, discovery_binary_packet, true) + elseif tvb(0, 4):string() == "HTTP" or tvb(0, 4):string() == "POST" then + -- Port TCP/8800 has some HTTP messages as well. Leave them intact. + http:call(tvb, pinfo, tree) + elseif tvb(0, 4):uint() == 0x2d2d2d2d then + -- Dissect video stream and communication service on port TCP/8800 + dissect_tcp_pdus(tvb, subtree, 0, get_content_length, dissect_content_pdu, true) + elseif tvb(0, 1):uint() == JSON_OPEN_BRACE then + -- Dissect configuration packets on port UDP/8001 + dissect_config_packet(tvb, pinfo, subtree) + end +end + +-- Assign Tapo protocol to relevant ports +local udp_table = DissectorTable.get("udp.port") +udp_table:add(8001, tapo_proto) +udp_table:add(20002, tapo_proto) +udp_table:add(20004, tapo_proto) +local tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(8800, tapo_proto) diff --git a/dissectors/trimble-gsof-ryanf55/LICENSE b/dissectors/trimble-gsof-ryanf55/LICENSE new file mode 100644 index 0000000..24dccd5 --- /dev/null +++ b/dissectors/trimble-gsof-ryanf55/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Ryan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/trimble-gsof-ryanf55/README.md b/dissectors/trimble-gsof-ryanf55/README.md new file mode 100644 index 0000000..49833bc --- /dev/null +++ b/dissectors/trimble-gsof-ryanf55/README.md @@ -0,0 +1,80 @@ +# Trimble GSOF — sortie GNSS des récepteurs Trimble (Ryanf55) + +Dissecteur Wireshark Lua du format Trimble GSOF (« General Serial Output +Format »), sortie de position, de navigation inertielle et de qualité +des récepteurs GNSS Trimble (par exemple le PX-1). Le script décode la +trame DCOL (« Data Collector Format »), le paquet GENOUT (type `0x40`) +qu'elle transporte, puis les enregistrements GSOF qu'il contient +(issue #541). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Ryanf55/trimble-gsof-wireshark (`gsof.lua`) | +| Commit importé | `3cc025178def1f848ef0deb03463aac2679e0bee` du 30/05/2025 (dernier commit de la branche par défaut) ; dernière modification du script : commit `22b5fe8941ec4110de062a1ddd13b4e883907b12` du 30/05/2025 | +| Licence amont | MIT (`LICENSE` amont, © 2025 Ryan) ; aucune mention de licence dans le script. Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur GSOF, DCOL ou GENOUT dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/gsof.lua` | Protocoles `DCOL`, `GENOUT` et `GSOF` (lignes 7, 10 et 13), champs `dcol.*`, `genout.*` et `gsof.*` (lignes 16 à 106) ; dissecteurs aux lignes 275 (GSOF), 304 (DCOL) et 384 (GENOUT) ; inscrit sur le port UDP 44444 (ligne 411) | + +## Utilisation + +Copier `src/gsof.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis recharger +avec Ctrl+Maj+L. Le récepteur doit envoyer sa sortie GSOF en UDP sur le +port 44444 (réglage décrit dans le README amont). Pour un autre port : +« Décoder comme » › DCOL. Filtres : `dcol`, `genout`, `gsof`, +`gsof.record_type`, `gsof.postime.*`, `gsof.ins.*`, `gsof.ins_rms.*`, +`gsof.llh_msl.*`. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins (sortie identique) : aucun +message au chargement. Le dépôt amont ne contient aucune capture (deux +copies d'écran seulement). Essais sur une capture synthétique construite +d'après la documentation Trimble (DCOL : STX `0x02`, état, type, longueur, +somme de contrôle, ETX `0x03` ; GSOF gros-boutiste), non commitée : + +| Essai | Résultat | +|---|---| +| GENOUT avec enregistrements 1 (Position Time) et 49 (INS Full Navigation) | « GPS Time (ms): 345600000 », « GPS Week Number: 2400 », 12 satellites ; latitude 48.8156, longitude 7.7905, altitude 150.25, vitesses, attitude, vitesses angulaires et accélérations exactes | +| Enregistrement 50 (INS RMS) | les neuf écarts types décodés (0.1 à 0.9) | +| Enregistrement 70 (Lat, Long, MSL Height) | la latitude s'affiche « FOO » ; longitude en radians (0.13597), hauteur 150.25, modèle « EGM96 » | +| Deux trames DCOL dans un datagramme, la première de type `0x4B` | deux « DCOL Packet » ; charge `0x4B` en octets bruts, la seconde décodée | +| ETX faux | avertissement « Missing ETX (0x03) » | +| Datagramme de 2 octets | colonne DCOL, avertissement « Truncated DCOL packet » sans arbre | +| Longueur d'enregistrement supérieure aux données | avertissement « Truncated GSOF Record » | +| Filtres `gsof.record_type`, `gsof.postime.gps_week_number`, `gsof.ins.latitude`, `gsof.llh_msl.height`, `dcol.status`, `genout.page_index` | trames attendues sélectionnées | + +## Limites constatées + +- Seuls les enregistrements 1, 49, 50 et 70 sont détaillés. Les types 2 + à 8 sont nommés (lignes 109 à 125) mais leurs données ne sont pas + décodées. L'enregistrement 1 s'arrête après le nombre de satellites + (lignes 127 à 136) : les octets de drapeaux et le compteur + d'initialisation ne sont pas affichés. +- Enregistrement 70 : la latitude est remplacée par le texte de mise au + point « FOO » (ligne 246, variable globale `lat_item` ligne 245). La + ligne 243 lit la valeur en petit-boutiste sans l'utiliser. +- `gsof_proto.fields` est réaffecté cinq fois (lignes 43 à 106) ; les + filtres fonctionnent quand même sous 4.6.4. Le champ + `gsof.record_name` (ligne 39) n'est jamais rempli. +- La somme de contrôle DCOL n'est pas vérifiée. Les pages GENOUT + multiples (`page_index` / `max_page_index`) ne sont pas réassemblées. + Un paquet GENOUT de moins de 7 octets est ignoré sans avertissement + (ligne 385). +- Le paquet GENOUT apparaît deux fois imbriqué dans l'arbre (« GENOUT + Packet » dans « GENOUT Packet »). +- Pas d'heuristique : seul le port UDP 44444 est reconnu ; rien n'est + prévu pour la liaison série ou TCP. diff --git a/dissectors/trimble-gsof-ryanf55/src/gsof.lua b/dissectors/trimble-gsof-ryanf55/src/gsof.lua new file mode 100644 index 0000000..4bb28f1 --- /dev/null +++ b/dissectors/trimble-gsof-ryanf55/src/gsof.lua @@ -0,0 +1,411 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Ryanf55/trimble-gsof-wireshark (gsof.lua), +-- commit 3cc025178def1f848ef0deb03463aac2679e0bee du 30/05/2025 (dernière modification du fichier : +-- commit 22b5fe8941ec4110de062a1ddd13b4e883907b12 du 30/05/2025). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +-- Define DCOL Protocol +local dcol_proto = Proto("DCOL", "Trimble Data Collector Format (DCOL)") + +-- Define GENOUT Protocol (subdissector for GSOF) +local genout_proto = Proto("GENOUT", "Trimble GENOUT Packet (40h)") + +-- Define GSOF Protocol (subdissector for GENOUT messages) +local gsof_proto = Proto("GSOF", "Trimble General Serial Output Format (GSOF)") + +-- DCOL Field Definitions +local dcol_fields = { + stx = ProtoField.uint8("dcol.stx", "Start transmission", base.HEX), + status = ProtoField.uint8("dcol.status", "Receiver status code", base.DEC), + packet_type = ProtoField.uint8("dcol.packet_type", "Hexadecimal code assigned to the packet", base.HEX), + length = ProtoField.uint8("dcol.length", "Payload Length", base.DEC), + payload = ProtoField.bytes("dcol.payload", "Payload"), + checksum = ProtoField.uint8("dcol.checksum", "Checksum", base.HEX), + etx = ProtoField.uint8("dcol.etx", "End transmission", base.HEX) +} +dcol_proto.fields = dcol_fields + +-- GENOUT Field Definitions +local genout_fields = { + transmission_number = ProtoField.uint8("genout.transmission_number", "Transmission Number", base.DEC), + page_index = ProtoField.uint8("genout.page_index", "Page Index", base.DEC), + max_page_index = ProtoField.uint8("genout.max_page_index", "Max Page Index", base.DEC), + gsof_data = ProtoField.bytes("genout.gsof_data", "GSOF Data") +} +genout_proto.fields = genout_fields + +-- GSOF Field Definitions +local gsof_fields = { + record_type = ProtoField.uint8("gsof.record_type", "Record Type", base.DEC), + record_name = ProtoField.string("gsof.record_name", "Record Name"), + record_length = ProtoField.uint8("gsof.record_length", "Record Length", base.DEC), + record_data = ProtoField.bytes("gsof.record_data", "Record Data") +} +gsof_proto.fields = gsof_fields + +-- GSOF 1 (pos time) Fields +local gsof_1_fields = { + gps_time_ms = ProtoField.uint32("gsof.postime.gps_time_ms", "GPS Time (ms)", base.DEC), + gps_week_number = ProtoField.uint16("gsof.postime.gps_week_number", "GPS Week Number", base.DEC), + number_svs_used = ProtoField.uint8("gsof.postime.n_svs_used", "Number of satellites used to determine position", base.DEC), +} +gsof_proto.fields = gsof_1_fields + +-- GSOF 49 (INS Full Navigation) Fields +local gsof_49_fields = { + gps_week_number = ProtoField.uint16("gsof.ins.gps_week_number", "GPS Week Number", base.DEC), + gps_time_ms = ProtoField.uint32("gsof.ins.gps_time_ms", "GPS Time (ms)", base.DEC), + imu_alignment_status = ProtoField.uint8("gsof.ins.imu_alignment_status", "IMU Alignment Status", base.HEX), + gps_quality_indicator = ProtoField.uint8("gsof.ins.gps_quality_indicator", "GPS Quality Indicator", base.HEX), + latitude = ProtoField.double("gsof.ins.latitude", "Latitude (°)"), + longitude = ProtoField.double("gsof.ins.longitude", "Longitude (°)"), + altitude = ProtoField.double("gsof.ins.altitude", "Altitude (m)"), + velocity_n = ProtoField.float("gsof.ins.velocity_n", "North Velocity (m/s)"), + velocity_e = ProtoField.float("gsof.ins.velocity_e", "East Velocity (m/s)"), + velocity_d = ProtoField.float("gsof.ins.velocity_d", "Down Velocity (m/s)"), + total_speed = ProtoField.float("gsof.ins.total_speed", "Total Speed (m/s)"), + roll = ProtoField.double("gsof.ins.roll", "Roll (°)"), + pitch = ProtoField.double("gsof.ins.pitch", "Pitch (°)"), + heading = ProtoField.double("gsof.ins.heading", "Heading (°)"), + track_angle = ProtoField.double("gsof.ins.track_angle", "Track Angle (°)"), + angular_rate_x = ProtoField.float("gsof.ins.angular_rate_x", "Angular Rate X (°/s)"), + angular_rate_y = ProtoField.float("gsof.ins.angular_rate_y", "Angular Rate Y (°/s)"), + angular_rate_z = ProtoField.float("gsof.ins.angular_rate_z", "Angular Rate Z (°/s)"), + acceleration_x = ProtoField.float("gsof.ins.acceleration_x", "Longitudinal Acceleration X (m/s²)"), + acceleration_y = ProtoField.float("gsof.ins.acceleration_y", "Transverse Acceleration Y (m/s²)"), + acceleration_z = ProtoField.float("gsof.ins.acceleration_z", "Down Acceleration Z (m/s²)") +} +gsof_proto.fields = gsof_49_fields + +-- GSOF 50 (INS RMS) Fields +local gsof_50_fields = { + gps_week_number = ProtoField.uint16("gsof.ins_rms.gps_week_number", "GPS Week Number", base.DEC), + gps_time_ms = ProtoField.uint32("gsof.ins_rms.gps_time_ms", "GPS Time (ms)", base.DEC), + imu_alignment_status = ProtoField.uint8("gsof.ins_rms.imu_alignment_status", "IMU Alignment Status", base.HEX), + gps_quality_indicator = ProtoField.uint8("gsof.ins_rms.gps_quality_indicator", "GPS Quality Indicator", base.HEX), + north_pos_rms = ProtoField.float("gsof.ins_rms.north_pos_rms", "North Position RMS (m)"), + east_pos_rms = ProtoField.float("gsof.ins_rms.east_pos_rms", "East Position RMS (m)"), + down_pos_rms = ProtoField.float("gsof.ins_rms.down_pos_rms", "Down Position RMS (m)"), + north_velocity_rms = ProtoField.float("gsof.ins_rms.north_velocity_rms", "North Velocity RMS (m)"), + east_velocity_rms = ProtoField.float("gsof.ins_rms.east_velocity_rms", "East Velocity RMS (m)"), + down_velocity_rms = ProtoField.float("gsof.ins_rms.down_velocity_rms", "Down Velocity RMS (m)"), + roll_rms = ProtoField.float("gsof.ins_rms.roll_rms", "Roll RMS (m)"), + pitch_rms = ProtoField.float("gsof.ins_rms.pitch_rms", "Pitch RMS (m)"), + heading_rms = ProtoField.float("gsof.ins_rms.heading_rms", "Heading RMS (m)"), +} +gsof_proto.fields = gsof_50_fields + + +-- GSOF 70 (Lat, Long, MSL Height) Fields +local gsof_70_fields = { + latitude = ProtoField.double("gsof.llh_msl.latitude", "Latitude (rad)"), + longitude = ProtoField.double("gsof.llh_msl.longitude", "Longitude (rad)"), + height = ProtoField.double("gsof.llh_msl.height", "Height (m) MSL"), + model = ProtoField.string("gsof.llh_msl.model", "Character string with the geoid model name, this will typically be EGM96") + -- TODO model +} +gsof_proto.fields = gsof_70_fields + +-- GSOF Record Type Mapping Function +local function get_gsof_record_name(record_type) + local record_types = { + [1] = "Position Time", + [2] = "Velocity", + [3] = "Altitude", + [4] = "DOPs", + [5] = "Clock Info", + [6] = "Position RMS", + [7] = "SV Brief", + [8] = "SV Detailed", + [49] = "INS Full Navigation", + [50] = "INS RMS", + [70] = "Lat, Long, MSL Height", + + } + return record_types[record_type] or "Unknown" +end + +local function parse_gsof_1(tree, buffer, offset) + tree:add(gsof_1_fields.gps_time_ms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_1_fields.gps_week_number, buffer(offset, 2)) + offset = offset + 2 + + tree:add(gsof_1_fields.number_svs_used, buffer(offset, 1)) + offset = offset + 1 +end + +local function parse_gsof_49(tree, buffer, offset) + tree:add(gsof_49_fields.gps_week_number, buffer(offset, 2)) + offset = offset + 2 + + tree:add(gsof_49_fields.gps_time_ms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.imu_alignment_status, buffer(offset, 1)) + offset = offset + 1 + + tree:add(gsof_49_fields.gps_quality_indicator, buffer(offset, 1)) + offset = offset + 1 + + tree:add(gsof_49_fields.latitude, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_49_fields.longitude, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_49_fields.altitude, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_49_fields.velocity_n, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.velocity_e, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.velocity_d, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.total_speed, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.roll, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_49_fields.pitch, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_49_fields.heading, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_49_fields.track_angle, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_49_fields.angular_rate_x, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.angular_rate_y, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.angular_rate_z, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.acceleration_x, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.acceleration_y, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_49_fields.acceleration_z, buffer(offset, 4)) +end + +local function parse_gsof_50(tree, buffer, offset) + tree:add(gsof_50_fields.gps_week_number, buffer(offset, 2)) + offset = offset + 2 + + tree:add(gsof_50_fields.gps_time_ms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.imu_alignment_status, buffer(offset, 1)) + offset = offset + 1 + + tree:add(gsof_50_fields.gps_quality_indicator, buffer(offset, 1)) + offset = offset + 1 + + tree:add(gsof_50_fields.north_pos_rms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.east_pos_rms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.down_pos_rms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.north_velocity_rms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.east_velocity_rms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.down_velocity_rms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.roll_rms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.pitch_rms, buffer(offset, 4)) + offset = offset + 4 + + tree:add(gsof_50_fields.heading_rms, buffer(offset, 4)) +end + +local function parse_gsof_70(tree, buffer, offset) + local lat_rad = buffer(offset, 8):le_float() -- Extract as double (little-endian) + local lat_deg = math.deg(lat_rad) -- Convert to degrees + lat_item = tree:add(gsof_70_fields.latitude, buffer(offset, 8)) + lat_item:set_text("FOO") + -- lat_item:set_text("Latitude: %.6f° (%.6f rad)", lat_deg, lat_rad)) + offset = offset + 8 + + tree:add(gsof_70_fields.longitude, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_70_fields.height, buffer(offset, 8)) + offset = offset + 8 + + tree:add(gsof_70_fields.model, buffer(offset)) +end + +local function parse_gsof(record_tree, record_type, buffer, offset, record_length) + local tree = record_tree:add(gsof_proto, buffer(offset + 2, record_length), get_gsof_record_name(record_type) .. " Data") + offset = offset + 2 -- Skip record_type and record_length + + if record_type == 1 then + parse_gsof_1(tree, buffer, offset) + elseif record_type == 49 then + parse_gsof_49(tree, buffer, offset) + elseif record_type == 50 then + parse_gsof_50(tree, buffer, offset) + elseif record_type == 70 then + parse_gsof_70(tree, buffer, offset) + end +end + +-- GSOF Subdissector Function +function gsof_proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = gsof_proto.name + local offset = 0 + local gsof_tree = tree:add(gsof_proto, buffer(), "GSOF Records") + + while offset < buffer:len() do + if offset + 2 > buffer:len() then break end + + local record_type = buffer(offset, 1):uint() + local record_length = buffer(offset + 1, 1):uint() + local record_name = string.format("Record Type %d - %s", record_type, get_gsof_record_name(record_type)) + + if offset + 2 + record_length > buffer:len() then + gsof_tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Truncated GSOF Record") + break + end + + local record_tree = gsof_tree:add(gsof_proto, buffer(offset, 2 + record_length), record_name) + + record_tree:add(gsof_fields.record_type, buffer(offset, 1)) + record_tree:add(gsof_fields.record_length, buffer(offset + 1, 1)) + + parse_gsof(record_tree, record_type, buffer, offset, record_length) + + offset = offset + 2 + record_length + end +end + +-- DCOL Dissector Function +function dcol_proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = dcol_proto.name + local offset = 0 + local udp_length = buffer:len() + + while offset < udp_length do + if offset + 6 > udp_length then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Truncated DCOL packet") + break + end + + -- Ensure STX is present + if buffer(offset, 1):uint() ~= 0x02 then + tree:add_expert_info(PI_MALFORMED, PI_WARN, "Expected STX (0x02) but not found") + break + end + + local start_offset = offset + + -- Read packet header fields + local stx = buffer(offset, 1) + local status = buffer(offset + 1, 1) + local packet_type = buffer(offset + 2, 1):uint() + local payload_length = buffer(offset + 3, 1):uint() + + -- Calculate total packet size + local packet_size = payload_length + 6 -- STX + status + type + length + checksum + ETX + + -- Ensure we don't read beyond the buffer + if offset + packet_size > udp_length then + tree:add_expert_info(PI_MALFORMED, PI_ERROR, "Packet length exceeds available data") + break + end + + -- **🔹 Create the subtree only for the current packet range** + local subtree = tree:add(dcol_proto, buffer(offset, packet_size), "DCOL Packet") + + subtree:add(dcol_fields.stx, stx) + subtree:add(dcol_fields.status, status) + subtree:add(dcol_fields.packet_type, buffer(offset + 2, 1)) + subtree:add(dcol_fields.length, buffer(offset + 3, 1)) + + offset = offset + 4 -- Move past header fields + + -- Process GENOUT packets + if packet_type == 0x40 then + local genout_tvb = buffer(offset, payload_length):tvb() + local genout_tree = subtree:add(genout_proto, genout_tvb, "GENOUT Packet") + genout_proto.dissector(genout_tvb, pinfo, genout_tree) + else + subtree:add(dcol_fields.payload, buffer(offset, payload_length)) + end + + offset = offset + payload_length + + -- Ensure there's enough data for checksum + ETX + if offset + 2 > udp_length then + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, "Missing checksum or ETX") + break + end + + -- Add checksum + subtree:add(dcol_fields.checksum, buffer(offset, 1)) + offset = offset + 1 + + -- Ensure ETX (0x03) + if buffer(offset, 1):uint() ~= 0x03 then + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, "Missing ETX (0x03)") + break + end + subtree:add(dcol_fields.etx, buffer(offset, 1)) + offset = offset + 1 + + -- Ensure progress + if offset == start_offset then break end + end + +end + +-- GENOUT Dissector Function +function genout_proto.dissector(buffer, pinfo, tree) + if buffer:len() < 7 then return end + + pinfo.cols.protocol = genout_proto.name + local subtree = tree:add(genout_proto, buffer(), "GENOUT Packet") + + local offset = 0 + subtree:add(genout_fields.transmission_number, buffer(offset, 1)) + offset = offset + 1 + + subtree:add(genout_fields.page_index, buffer(offset, 1)) + offset = offset + 1 + + subtree:add(genout_fields.max_page_index, buffer(offset, 1)) + offset = offset + 1 + + -- Remaining is GSOF Data + if buffer:len() > offset then + local gsof_tvb = buffer(offset) + local gsof_tree = subtree:add(genout_fields.gsof_data, gsof_tvb) + + -- Call GSOF Parser TODO + gsof_proto.dissector(gsof_tvb:tvb(), pinfo, gsof_tree) + end +end + +-- Register DCOL on UDP Port 44444 +DissectorTable.get("udp.port"):add(44444, dcol_proto) diff --git a/dissectors/trimlight-sp/LICENSE b/dissectors/trimlight-sp/LICENSE new file mode 100644 index 0000000..b90f5ca --- /dev/null +++ b/dissectors/trimlight-sp/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Michael Jarrett + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/trimlight-sp/README.md b/dissectors/trimlight-sp/README.md new file mode 100644 index 0000000..352f23b --- /dev/null +++ b/dissectors/trimlight-sp/README.md @@ -0,0 +1,48 @@ +# Trimlight Select Plus (éclairage LED permanent) + +Dissecteur Wireshark Lua du **protocole local Trimlight Select Plus** +(contrôleurs d'éclairage LED de façade Trimlight), entre l'application +mobile et le contrôleur sur TCP 8189 : drapeau de début, type de requête, +longueur, puis charge utile selon la commande (motifs de bibliothèque, nom, +catégorie, mode d'effet, vitesse, luminosité, couleurs, planification…), +avec liaison requête ↔ réponse et contrôle du drapeau de fin. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/msjarrett/trimlight (fichier `protocol/TrimlightSP.lua`) | +| Commit importé | `3c16e54cfcabdff9f6e965e336dafbafcace8e3d` du 23/11/2023 (branche `main`, dernier commit ; dernière modification du dissecteur : `20a28ef` du 22/11/2023) | +| Licence amont | MIT (`LICENSE` amont, © 2020 Michael Jarrett) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Trimlight natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `TrimlightSP.lua` | Dissecteur `TRIMLIGHTSP` (TCP 8189) | +| `captures/msjarrett-trimlight1.pcapng` | Capture d'exemple amont (18 Ko) | +| `captures/msjarrett-trimlight2.pcapng` | Capture d'exemple amont (23 Ko) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier Lua. Non importés : la grosse +capture `nexus-bytes-trimlightSP-full.pcapng` (2 Mo), les traces texte +`matthewg-capture-01/`, la description du protocole `protocol/protocol.md` +et les outils Java / Python (proxy) du dépôt. + +## Utilisation + +Copier `TrimlightSP.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +ouvrir une capture de `captures/` et filtrer avec `trimlightsp`. + +## Remarques + +- Utilise la bibliothèque `bit` (fournie par Wireshark), pas `bit32`. +- Le sens requête/réponse est déduit du port de destination 8189. +- Ne décode pas l'API cloud Trimlight récente (Trimlight Edge), seulement + le protocole LAN du Select Plus. +- Non vérifié dans Wireshark (pas de tshark dans l'environnement de test). diff --git a/dissectors/trimlight-sp/TrimlightSP.lua b/dissectors/trimlight-sp/TrimlightSP.lua new file mode 100644 index 0000000..ea8eaac --- /dev/null +++ b/dissectors/trimlight-sp/TrimlightSP.lua @@ -0,0 +1,544 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/msjarrett/trimlight (protocol/TrimlightSP.lua), +-- commit 3c16e54cfcabdff9f6e965e336dafbafcace8e3d du 23/11/2023. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- Trimlight Select Plus LED (TRIMLIGHTSP) +local trimlightsp_proto = Proto("TRIMLIGHTSP", "Trimlight LED Select Plus Protocol") + +local START_FLAG = 0x5a -- decimal 90 +local END_FLAG = 0xa5 -- decimal -91 (signed int8) +local MAX_DEVICE_NAME_CHARS = 15 +local MAX_LIB_PATTERN_NAME_CHARS = 25 +local MIN_DEVICE_DOT_COUNT = 30 +local MAX_DEVICE_DOT_COUNT = 2048 +local MAX_PATTERN_DOT_COUNT = 30 + +local request_types_table = {} +request_types_table[1] = "Sync" -- Obsolete? +request_types_table[2] = "Sync Detail" -- HAS RESPONSE. Returns the list of pattern ID's the controller has saved. +request_types_table[3] = "Check Pattern" -- Load pattern from library (sent from the Schedule page of the app, maybe others) +request_types_table[4] = "Delete Pattern" +request_types_table[5] = "Update Pattern" -- Updates an existing pattern, e.g. "Cover" +request_types_table[6] = "Create Pattern" -- Create new pattern, e.g. "Save As" +request_types_table[7] = "Create Schedule" -- e.g. Save new calendar event +request_types_table[8] = "Delete Schedule" -- e.g. Delete existing calendar event +request_types_table[9] = "Update Daily Schedule" +request_types_table[10] = "Check Preset Mode" -- Display Preset +-- 11 is unused +request_types_table[12] = "Check Device" -- HAS RESPONSE. Request Controllers Info. Used for Discovery. Returns verification byte, controller name, pixel/dot count +request_types_table[13] = "Set Mode" -- (trimlight calls this "Device On") +request_types_table[14] = "Set Device Name" +-- 15 is unused +request_types_table[16] = "Set RGB Sequence" +request_types_table[17] = "Set IC Model" +request_types_table[18] = "Set Dot Count" +request_types_table[19] = "Check Custom Pattern" -- Custom patterns are those on the pattern creation page that aren't saved yet +request_types_table[20] = "Set Solid Color" -- Sets all pixels to this single solid colid (used when setting a custom color) +request_types_table[21] = "Auto Mode" -- Probably "Auto mode" network config (Pair your device to a Wi-Fi network with one click) +request_types_table[22] = "Sync Pattern Detail" -- HAS RESPONSE. Returns the details of the given pattern ID (name, dot count, dot colors, brightness, speed) +request_types_table[23] = "Sync Schedule Detail" -- HAS RESPONSE. +request_types_table[24] = "Update Schedule" +--25 is unused +request_types_table[26] = "AP Network Config" +request_types_table[27] = "AP Network Config OK" + +local mode_table = {} +mode_table[0] = "Timer" +mode_table[1] = "Manual" + +local week_days_table = {} +week_days_table[0] = "Sunday" +week_days_table[1] = "Monday" +week_days_table[2] = "Tuesday" +week_days_table[3] = "Wednesday" +week_days_table[4] = "Thursday" +week_days_table[5] = "Friday" +week_days_table[6] = "Saturday" + +local rgb_seq_table = {} +rgb_seq_table[0] = "RGB (Red Green Blue)" +rgb_seq_table[1] = "RBG (Red Blue Green)" +rgb_seq_table[2] = "GRB (Green Red Blue)" +rgb_seq_table[3] = "GBR (Green Blue Red)" +rgb_seq_table[4] = "BRG (Blue Red Green)" +rgb_seq_table[5] = "BGR (Blue Green Red)" + +local ic_model_table = {} +ic_model_table[0] = "SM16703" +ic_model_table[1] = "TM1804" +ic_model_table[2] = "UCS1903" +ic_model_table[3] = "WS2811" +ic_model_table[4] = "WS2801" +ic_model_table[5] = "SK6812" +ic_model_table[6] = "LPD6803" +ic_model_table[7] = "LPD8806" +ic_model_table[8] = "APA102" +ic_model_table[9] = "APA105" +ic_model_table[10] = "DMX512" +ic_model_table[11] = "TM1914" +ic_model_table[12] = "TM1913" +ic_model_table[13] = "P9813" +ic_model_table[14] = "INK1003" +ic_model_table[15] = "P943S" +ic_model_table[16] = "P9411" +ic_model_table[17] = "P9413" +ic_model_table[18] = "TX1812" +ic_model_table[19] = "TX1813" +ic_model_table[20] = "GS8206" +ic_model_table[21] = "GS8208" +ic_model_table[22] = "SK9822" +ic_model_table[23] = "TM1814" +ic_model_table[24] = "SK6812_RGBW" +ic_model_table[25] = "P9414" +ic_model_table[26] = "P9412" + +local effect_table = {} +effect_table[0] = "Static" +effect_table[1] = "Chase Forward" +effect_table[2] = "Chase Backward" +effect_table[3] = "Chase Middle to Out" +effect_table[4] = "Chase Out to Middle" +effect_table[5] = "Strobe" +effect_table[6] = "Fade" +effect_table[7] = "Comet Forward" +effect_table[8] = "Come Backward" +effect_table[9] = "Wave Forward" +effect_table[10] = "Wave Backward" +effect_table[11] = "Solid Fade" + +local state_table = {} +state_table[0] = "Off" +state_table[1] = "On" + +local repetition_table = {} +repetition_table[0] = "Today Only" +repetition_table[1] = "Everyday" +repetition_table[2] = "Week Days" +repetition_table[3] = "Weekend" + +local category_table = {} +category_table[1] = "Preset" +category_table[2] = "Custom" + + +-- Common Fields +trimlightsp_proto.fields.req_resp = ProtoField.string("trimlightsp.req_resp", "Request/Response") +trimlightsp_proto.fields.start_flag = ProtoField.uint8("trimlightsp.start_flag", "Start Flag", base.HEX) +trimlightsp_proto.fields.end_flag = ProtoField.uint8("trimlightsp.end_flag", "End Flag", base.HEX) +trimlightsp_proto.fields.request_type = ProtoField.uint8("trimlightsp.requestType", "Request Type", base.DEC, request_types_table) +trimlightsp_proto.fields.message_type = ProtoField.string("trimlightsp.message_type", "Message Type", base.ASCII) +trimlightsp_proto.fields.linked_request = ProtoField.framenum("trimlightsp.linked_request", "Linked Request") +trimlightsp_proto.fields.linked_response = ProtoField.framenum("trimlightsp.linked_response", "Linked Response") +trimlightsp_proto.fields.command_length = ProtoField.uint16("trimlightsp.command_length", "Commmand Length", base.DEC) -- length of command (excludes start/end flags, request_type, and length) +trimlightsp_proto.fields.payload = ProtoField.bytes("trimlightsp.data", "Data") +trimlightsp_proto.fields.unknown = ProtoField.bytes("trimlightsp.unknown", "Unknown") +trimlightsp_proto.fields.name = ProtoField.string("trimlightsp.name", "Name", base.ASCII) +trimlightsp_proto.fields.name_length = ProtoField.uint8("trimlightsp.name_length", "Name Length", base.DEC) -- Not all name fields are preceeded by a length +trimlightsp_proto.fields.unused_string_padding = ProtoField.none("sple.unused_string_padding", "Unused String Padding") +trimlightsp_proto.fields.category = ProtoField.uint8("trimlightsp.category", "Category", base.DEC, category_table) +trimlightsp_proto.fields.speed = ProtoField.uint8("trimlightsp.speed", "Speed Level", base.DEC) +trimlightsp_proto.fields.brightness = ProtoField.uint8("trimlightsp.brightness", "Brightness Level", base.DEC) +trimlightsp_proto.fields.lib_pattern_id = ProtoField.uint8("trimlightsp.libPatternId", "Pattern Id", base.DEC) +trimlightsp_proto.fields.schedule_id = ProtoField.uint8("trimlightsp.schedule_id", "Schedule ID", base.DEC) +trimlightsp_proto.fields.start_hour = ProtoField.uint8("trimlightsp.start_hour", "Start Hour", base.DEC) +trimlightsp_proto.fields.start_minute = ProtoField.uint8("trimlightsp.start_minute", "Start Minute", base.DEC) +trimlightsp_proto.fields.off_hour = ProtoField.uint8("trimlightsp.off_hour", "Off Hour", base.DEC) +trimlightsp_proto.fields.off_minute = ProtoField.uint8("trimlightsp.off_minute", "Off Minute", base.DEC) +trimlightsp_proto.fields.num_lib_patterns = ProtoField.uint8("trimlightsp.num_lib_patterns", "Library Patterns Count", base.DEC) +trimlightsp_proto.fields.num_schedules = ProtoField.uint8("trimlightsp.num_schedules", "Schedules Count", base.DEC) +trimlightsp_proto.fields.start_month = ProtoField.uint8("trimlightsp.start_month", "Start Month", base.DEC) +trimlightsp_proto.fields.start_day = ProtoField.uint8("trimlightsp.start_day", "Start Day", base.DEC) +trimlightsp_proto.fields.off_month = ProtoField.uint8("trimlightsp.off_month", "Off Month", base.DEC) +trimlightsp_proto.fields.off_day = ProtoField.uint8("trimlightsp.off_day", "Off Day", base.DEC) +trimlightsp_proto.fields.daily_schedule_id = ProtoField.uint8("trimlightsp.daily_schedule_id", "Daily Schedule ID", base.DEC) +trimlightsp_proto.fields.daily_sched_state = ProtoField.uint8("trimlightsp.daily_sched_state", "State", base.DEC, state_table) +trimlightsp_proto.fields.daily_sched_repetition = ProtoField.uint8("trimlightsp.daily_sched_repetition", "Repetition", base.DEC, repetition_table) +trimlightsp_proto.fields.preset_pattern_id = ProtoField.uint8("trimlightsp.presetPatternId", "Preset Id", base.DEC) -- preset patterns are the built-in patterns on the colorwheel page +trimlightsp_proto.fields.verification = ProtoField.uint24("trimlightsp.verification", "Verification Bytes", base.HEX) +trimlightsp_proto.fields.verification_resp = ProtoField.uint8("trimlightsp.verification_resp", "Verification Response", base.HEX) +trimlightsp_proto.fields.year = ProtoField.uint8("trimlightsp.year", "Year", base.DEC) +trimlightsp_proto.fields.month = ProtoField.uint8("trimlightsp.month", "Month", base.DEC) +trimlightsp_proto.fields.day = ProtoField.uint8("trimlightsp.day", "Day", base.DEC) +trimlightsp_proto.fields.day_of_week = ProtoField.uint8("trimlightsp.day_of_week", "Day of Week", base.DEC, week_days_table) +trimlightsp_proto.fields.hour = ProtoField.uint8("trimlightsp.hour", "Hour", base.DEC) +trimlightsp_proto.fields.minute = ProtoField.uint8("trimlightsp.minute", "Minute", base.DEC) +trimlightsp_proto.fields.second = ProtoField.uint8("trimlightsp.second", "Second", base.DEC) +trimlightsp_proto.fields.mode = ProtoField.uint8("trimlightsp.mode", "Mode", base.DEC, mode_table) +trimlightsp_proto.fields.rgb_sequence = ProtoField.uint8("trimlightsp.rgb_seq", "RGB Sequence", base.DEC, rgb_seq_table) +trimlightsp_proto.fields.ic_model = ProtoField.uint8("trimlightsp.ic_model", "IC Model", base.DEC, ic_model_table) +trimlightsp_proto.fields.device_dot_count = ProtoField.uint16("trimlightsp.device_dot_count", "Device Dot Count (Num Pixels on String)", base.DEC) -- Min: 30, Max: 2048 +trimlightsp_proto.fields.pattern_rgb = ProtoField.uint24("trimlightsp.pattern_rgb", " RGB", base.HEX) +trimlightsp_proto.fields.effect_mode = ProtoField.uint8("sple.effect_mode", "Effect Mode", base.DEC, effect_table) +trimlightsp_proto.fields.color1_count = ProtoField.uint8("trimlightsp.color1_count", "Color 1 Count", base.DEC) +trimlightsp_proto.fields.color2_count = ProtoField.uint8("trimlightsp.color2_count", "Color 2 Count", base.DEC) +trimlightsp_proto.fields.color3_count = ProtoField.uint8("trimlightsp.color3_count", "Color 3 Count", base.DEC) +trimlightsp_proto.fields.color4_count = ProtoField.uint8("trimlightsp.color4_count", "Color 4 Count", base.DEC) +trimlightsp_proto.fields.color5_count = ProtoField.uint8("trimlightsp.color5_count", "Color 5 Count", base.DEC) +trimlightsp_proto.fields.color6_count = ProtoField.uint8("trimlightsp.color6_count", "Color 6 Count", base.DEC) +trimlightsp_proto.fields.color7_count = ProtoField.uint8("trimlightsp.color7_count", "Color 7 Count", base.DEC) +trimlightsp_proto.fields.color1_rgb = ProtoField.uint24("trimlightsp.color1_rgb", "Color 1 RGB", base.HEX) +trimlightsp_proto.fields.color2_rgb = ProtoField.uint24("trimlightsp.color2_rgb", "Color 2 RGB", base.HEX) +trimlightsp_proto.fields.color3_rgb = ProtoField.uint24("trimlightsp.color3_rgb", "Color 3 RGB", base.HEX) +trimlightsp_proto.fields.color4_rgb = ProtoField.uint24("trimlightsp.color4_rgb", "Color 4 RGB", base.HEX) +trimlightsp_proto.fields.color5_rgb = ProtoField.uint24("trimlightsp.color5_rgb", "Color 5 RGB", base.HEX) +trimlightsp_proto.fields.color6_rgb = ProtoField.uint24("trimlightsp.color6_rgb", "Color 6 RGB", base.HEX) +trimlightsp_proto.fields.color7_rgb = ProtoField.uint24("trimlightsp.color7_rgb", "Color 7 RGB", base.HEX) + +local request_map = {} -- a table of request info (with frame number as index) + +function trimlightsp_proto.dissector(buffer, pinfo, tree) + -- safety checks + local length = buffer:len() + print("buffer length: " .. length) + if length < 2 then + print("payload too short!") + return + end + + local first_payload_byte = buffer(0, 1):uint() + if first_payload_byte ~= START_FLAG then + print("packet missing start flag") + return + end + + local last_payload_byte = buffer(length - 1, 1):uint() + if last_payload_byte ~= END_FLAG then + print("packet missing end flag") + return + end + + pinfo.cols.protocol = trimlightsp_proto.name + local subtree = tree:add(trimlightsp_proto, buffer(), "Trimlight LED Select Plus Protocol Data") + + local dst_port = pinfo.dst_port + local is_request = dst_port == 8189 + local req_resp_text = is_request and "Request" or "Response" + + subtree:add(trimlightsp_proto.fields.req_resp, req_resp_text):set_generated(true) + subtree:add(trimlightsp_proto.fields.start_flag, buffer(0, 1)) + + if is_request then + local request_type_id = buffer(1, 1):uint() + local command_length = buffer(2, 2):uint() + if not pinfo.visited then + request_map[pinfo.number] = {request_type=request_type_id, response=nil, verification=nil} + end + + subtree:add(trimlightsp_proto.fields.message_type, request_types_table[request_type_id]):set_generated(true) + if request_map[pinfo.number].response then + subtree:add(trimlightsp_proto.fields.linked_response, request_map[pinfo.number].response):set_generated(true) + end + subtree:add(trimlightsp_proto.fields.request_type, buffer(1, 1)):append_text(" (0x".. buffer(1, 1) .. ")") + subtree:add(trimlightsp_proto.fields.command_length, buffer(2, 2)) + + if request_type_id == 2 then -- Sync Detail + -- No fields (empty payload) + elseif request_type_id == 3 then -- Check Pattern + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(4, 1)) + elseif request_type_id == 4 then -- Delete Pattern + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(4, 1)) + elseif request_type_id == 5 then -- Update Pattern + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(4, 1)) + local name_length = get_name_length(5, MAX_LIB_PATTERN_NAME_CHARS, buffer) + subtree:add(trimlightsp_proto.fields.name, buffer(5, name_length)) -- Note: the app only allows limited characters: a-z, A-Z, 0-9, -, _, ', & + subtree:add(trimlightsp_proto.fields.unused_string_padding, buffer(5 + name_length, MAX_LIB_PATTERN_NAME_CHARS - name_length)) + subtree:add(trimlightsp_proto.fields.category, buffer(30, 1)) + subtree:add(trimlightsp_proto.fields.effect_mode, buffer(31, 1)) + subtree:add(trimlightsp_proto.fields.speed, buffer(32, 1)):append_text(percentage(buffer(32, 1))) + subtree:add(trimlightsp_proto.fields.brightness, buffer(33, 1)):append_text(percentage(buffer(33, 1))) + subtree:add(trimlightsp_proto.fields.color1_count, buffer(34, 1)) + subtree:add(trimlightsp_proto.fields.color2_count, buffer(35, 1)) + subtree:add(trimlightsp_proto.fields.color3_count, buffer(36, 1)) + subtree:add(trimlightsp_proto.fields.color4_count, buffer(37, 1)) + subtree:add(trimlightsp_proto.fields.color5_count, buffer(38, 1)) + subtree:add(trimlightsp_proto.fields.color6_count, buffer(39, 1)) + subtree:add(trimlightsp_proto.fields.color7_count, buffer(40, 1)) + subtree:add(trimlightsp_proto.fields.color1_rgb, buffer(41, 3)):append_text((get_rgb(buffer(41, 3)))) + subtree:add(trimlightsp_proto.fields.color2_rgb, buffer(44, 3)):append_text((get_rgb(buffer(44, 3)))) + subtree:add(trimlightsp_proto.fields.color3_rgb, buffer(47, 3)):append_text((get_rgb(buffer(47, 3)))) + subtree:add(trimlightsp_proto.fields.color4_rgb, buffer(50, 3)):append_text((get_rgb(buffer(50, 3)))) + subtree:add(trimlightsp_proto.fields.color5_rgb, buffer(53, 3)):append_text((get_rgb(buffer(53, 3)))) + subtree:add(trimlightsp_proto.fields.color6_rgb, buffer(56, 3)):append_text((get_rgb(buffer(56, 3)))) + subtree:add(trimlightsp_proto.fields.color7_rgb, buffer(59, 3)):append_text((get_rgb(buffer(59, 3)))) + elseif request_type_id == 6 then -- Create Pattern + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(4, 1)) + local name_length = get_name_length(5, MAX_LIB_PATTERN_NAME_CHARS, buffer) + subtree:add(trimlightsp_proto.fields.name, buffer(5, name_length)) -- Note: only allows limited characters: a-z, A-Z, 0-9, -, _, ', & + subtree:add(trimlightsp_proto.fields.unused_string_padding, buffer(5 + name_length, MAX_LIB_PATTERN_NAME_CHARS - name_length)) + subtree:add(trimlightsp_proto.fields.category, buffer(30, 1)) + subtree:add(trimlightsp_proto.fields.effect_mode, buffer(31, 1)) + subtree:add(trimlightsp_proto.fields.speed, buffer(32, 1)):append_text(percentage(buffer(32, 1))) + subtree:add(trimlightsp_proto.fields.brightness, buffer(33, 1)):append_text(percentage(buffer(33, 1))) + subtree:add(trimlightsp_proto.fields.color1_count, buffer(34, 1)) + subtree:add(trimlightsp_proto.fields.color2_count, buffer(35, 1)) + subtree:add(trimlightsp_proto.fields.color3_count, buffer(36, 1)) + subtree:add(trimlightsp_proto.fields.color4_count, buffer(37, 1)) + subtree:add(trimlightsp_proto.fields.color5_count, buffer(38, 1)) + subtree:add(trimlightsp_proto.fields.color6_count, buffer(39, 1)) + subtree:add(trimlightsp_proto.fields.color7_count, buffer(40, 1)) + subtree:add(trimlightsp_proto.fields.color1_rgb, buffer(41, 3)):append_text((get_rgb(buffer(41, 3)))) + subtree:add(trimlightsp_proto.fields.color2_rgb, buffer(44, 3)):append_text((get_rgb(buffer(44, 3)))) + subtree:add(trimlightsp_proto.fields.color3_rgb, buffer(47, 3)):append_text((get_rgb(buffer(47, 3)))) + subtree:add(trimlightsp_proto.fields.color4_rgb, buffer(50, 3)):append_text((get_rgb(buffer(50, 3)))) + subtree:add(trimlightsp_proto.fields.color5_rgb, buffer(53, 3)):append_text((get_rgb(buffer(53, 3)))) + subtree:add(trimlightsp_proto.fields.color6_rgb, buffer(56, 3)):append_text((get_rgb(buffer(56, 3)))) + subtree:add(trimlightsp_proto.fields.color7_rgb, buffer(59, 3)):append_text((get_rgb(buffer(59, 3)))) + elseif request_type_id == 7 then -- Create Schedule + subtree:add(trimlightsp_proto.fields.schedule_id, buffer(4, 1)) + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(5, 1)) + subtree:add(trimlightsp_proto.fields.start_month, buffer(6, 1)) + subtree:add(trimlightsp_proto.fields.start_day, buffer(7, 1)) + subtree:add(trimlightsp_proto.fields.off_month, buffer(8, 1)) + subtree:add(trimlightsp_proto.fields.off_day, buffer(9, 1)) + subtree:add(trimlightsp_proto.fields.start_hour, buffer(10, 1)) + subtree:add(trimlightsp_proto.fields.start_minute, buffer(11, 1)) + subtree:add(trimlightsp_proto.fields.off_hour, buffer(12, 1)) + subtree:add(trimlightsp_proto.fields.off_minute, buffer(13, 1)) + elseif request_type_id == 8 then -- Delete Schedule + subtree:add(trimlightsp_proto.fields.schedule_id, buffer(4, 1)) + elseif request_type_id == 9 then -- Update Daily Schedule + subtree:add(trimlightsp_proto.fields.daily_schedule_id, buffer(4, 1)) + subtree:add(trimlightsp_proto.fields.daily_sched_state, buffer(5, 1)) + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(6, 1)) + subtree:add(trimlightsp_proto.fields.daily_sched_repetition, buffer(7, 1)) + subtree:add(trimlightsp_proto.fields.start_hour, buffer(8, 1)) + subtree:add(trimlightsp_proto.fields.start_minute, buffer(9, 1)) + subtree:add(trimlightsp_proto.fields.off_hour, buffer(10, 1)) + subtree:add(trimlightsp_proto.fields.off_minute, buffer(11, 1)) + elseif request_type_id == 10 then -- Check Preset Mode + subtree:add(trimlightsp_proto.fields.preset_pattern_id, buffer(4, 1)) + subtree:add(trimlightsp_proto.fields.speed, buffer(5, 1)):append_text(percentage(buffer(5, 1))) + subtree:add(trimlightsp_proto.fields.brightness, buffer(6, 1)):append_text(percentage(buffer(6, 1))) + elseif request_type_id == 12 then -- Check Device + if not pinfo.visited then + request_map[pinfo.number].verification = { buffer(4, 1):uint(), buffer(5, 1):uint(), buffer(6, 1):uint() } + end + subtree:add(trimlightsp_proto.fields.verification, buffer(4, 3)) + subtree:add(trimlightsp_proto.fields.year, buffer(7, 1)) + subtree:add(trimlightsp_proto.fields.month, buffer(8, 1)) + subtree:add(trimlightsp_proto.fields.day, buffer(9, 1)) + subtree:add(trimlightsp_proto.fields.day_of_week, buffer(10, 1)) + subtree:add(trimlightsp_proto.fields.hour, buffer(11, 1)) + subtree:add(trimlightsp_proto.fields.minute, buffer(12, 1)) + subtree:add(trimlightsp_proto.fields.second, buffer(13, 1)) + elseif request_type_id == 13 then -- Set Mode + subtree:add(trimlightsp_proto.fields.mode, buffer(4, 1)) + elseif request_type_id == 14 then -- Set Device Name + subtree:add(trimlightsp_proto.fields.name, buffer(4, command_length)) + elseif request_type_id == 16 then -- Set RGB Sequence + subtree:add(trimlightsp_proto.fields.rgb_sequence, buffer(4, 1)) + elseif request_type_id == 17 then -- Set IC Model + subtree:add(trimlightsp_proto.fields.ic_model, buffer(4, 1)) + elseif request_type_id == 18 then -- Set Dot Count + subtree:add(trimlightsp_proto.fields.device_dot_count, buffer(4, 2)) + elseif request_type_id == 19 then -- Check Custom Pattern + subtree:add(trimlightsp_proto.fields.effect_mode, buffer(4, 1)) + subtree:add(trimlightsp_proto.fields.speed, buffer(5, 1)):append_text(percentage(buffer(5, 1))) + subtree:add(trimlightsp_proto.fields.brightness, buffer(6, 1)):append_text(percentage(buffer(6, 1))) + subtree:add(trimlightsp_proto.fields.color1_count, buffer(7, 1)):append_text(" (1st)") + subtree:add(trimlightsp_proto.fields.color2_count, buffer(8, 1)):append_text(" (2nd)") + subtree:add(trimlightsp_proto.fields.color3_count, buffer(9, 1)):append_text(" (3rd)") + subtree:add(trimlightsp_proto.fields.color4_count, buffer(10, 1)):append_text(" (4th)") + subtree:add(trimlightsp_proto.fields.color5_count, buffer(11, 1)):append_text(" (5th)") + subtree:add(trimlightsp_proto.fields.color6_count, buffer(12, 1)):append_text(" (6th)") + subtree:add(trimlightsp_proto.fields.color7_count, buffer(13, 1)):append_text(" (7th)") + subtree:add(trimlightsp_proto.fields.color1_rgb, buffer(14, 3)):append_text(" (1st)" .. get_rgb(buffer(14, 3))) + subtree:add(trimlightsp_proto.fields.color2_rgb, buffer(17, 3)):append_text(" (2nd)" .. get_rgb(buffer(17, 3))) + subtree:add(trimlightsp_proto.fields.color3_rgb, buffer(20, 3)):append_text(" (3rd)" .. get_rgb(buffer(20, 3))) + subtree:add(trimlightsp_proto.fields.color4_rgb, buffer(23, 3)):append_text(" (4th)" .. get_rgb(buffer(23, 3))) + subtree:add(trimlightsp_proto.fields.color5_rgb, buffer(26, 3)):append_text(" (5th)" .. get_rgb(buffer(26, 3))) + subtree:add(trimlightsp_proto.fields.color6_rgb, buffer(29, 3)):append_text(" (6th)" .. get_rgb(buffer(29, 3))) + subtree:add(trimlightsp_proto.fields.color7_rgb, buffer(32, 3)):append_text(" (7th)" .. get_rgb(buffer(32, 3))) + elseif request_type_id == 20 then -- Solid Color + subtree:add(trimlightsp_proto.fields.pattern_rgb, buffer(4, 3)):append_text(get_rgb(buffer(4, 3))) + elseif request_type_id == 21 then -- Auto Mode ? + elseif request_type_id == 22 then -- Sync Pattern Detail + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(4, 1)) + elseif request_type_id == 23 then -- Sync Schedule Detail + subtree:add(trimlightsp_proto.fields.schedule_id, buffer(4, 1)) + elseif request_type_id == 24 then -- Update Schedule + subtree:add(trimlightsp_proto.fields.schedule_id, buffer(4, 1)) + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(5, 1)) + subtree:add(trimlightsp_proto.fields.start_month, buffer(6, 1)) + subtree:add(trimlightsp_proto.fields.start_day, buffer(7, 1)) + subtree:add(trimlightsp_proto.fields.off_month, buffer(8, 1)) + subtree:add(trimlightsp_proto.fields.off_day, buffer(9, 1)) + subtree:add(trimlightsp_proto.fields.start_hour, buffer(10, 1)) + subtree:add(trimlightsp_proto.fields.start_minute, buffer(11, 1)) + subtree:add(trimlightsp_proto.fields.off_hour, buffer(12, 1)) + subtree:add(trimlightsp_proto.fields.off_minute, buffer(13, 1)) + elseif request_type_id == 26 then -- AP Network Config + -- unsure of the specific fields on this one + subtree:add(trimlightsp_proto.fields.payload, buffer(4, command_length)) + elseif request_type_id == 27 then -- AP Network Config OK + -- unsure of the specific fields on this one + subtree:add(trimlightsp_proto.fields.payload, buffer(4, 3)) + else + -- Unknown message, just show generic payload + print("Unable to parse request type " .. request_type_id) + subtree:add(trimlightsp_proto.fields.payload, buffer(4, length - 5)):append_text(" (" .. length - 5 .. " bytes)") + end + else + -- Response + -- Find the most recent request (e.g. request with highest index that is less that response frame number) + local request_index = -1 + for i in pairs(request_map) do + if i < pinfo.number and i > request_index then + request_index = i + end + end + + if not pinfo.visited then + request_map[request_index].response = pinfo.number + end + + local request_type = nil + local verification = nil + + if request_map[request_index] then + request_type = request_map[request_index].request_type + verification = request_map[request_index].verification + end + + subtree:add(trimlightsp_proto.fields.message_type, request_types_table[request_type] .. " Response"):set_generated(true) + if request_index > 0 then + subtree:add(trimlightsp_proto.fields.linked_request, request_index):set_generated(true) + end + + if request_type == 12 then -- Check Device Response + local verification_result = calc_verification(verification) + local verification_text + if buffer(1, 1):uint() == verification_result then + verification_text = " (Verification matches!)" + else + verification_text = " (Verification failed - expected: " .. verification_result .. ")" + end + + subtree:add(trimlightsp_proto.fields.verification_resp, buffer(1, 1)):append_text(verification_text) + subtree:add(trimlightsp_proto.fields.mode, buffer(2, 1)) + subtree:add(trimlightsp_proto.fields.name_length, buffer(3,1)) + local length_of_name = buffer(3,1):uint() + subtree:add(trimlightsp_proto.fields.name, buffer(4, length_of_name)):prepend_text("Controller ") + subtree:add(trimlightsp_proto.fields.ic_model, buffer(4 + length_of_name, 1)) + subtree:add(trimlightsp_proto.fields.rgb_sequence, buffer(4 + length_of_name + 1, 1)) + subtree:add(trimlightsp_proto.fields.device_dot_count, buffer(4 + length_of_name + 2, 2)) + subtree:add(trimlightsp_proto.fields.unknown, buffer(4 + length_of_name + 4, 1)) + subtree:add(trimlightsp_proto.fields.unknown, buffer(4 + length_of_name + 5, 1)) + elseif request_type == 2 then -- Sync Detail Response + subtree:add(trimlightsp_proto.fields.num_lib_patterns, buffer(1, 1)) + local num_patterns = buffer(1, 1):uint() + local index = 2 + for i = index, index + (num_patterns - 1) do + index = i + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(index, 1)) + end + + index = index + 1 + subtree:add(trimlightsp_proto.fields.num_schedules, buffer(index, 1)) + local num_schedules = buffer(index, 1):uint() + index = index + 1 + for i = index, index + (num_schedules - 1) do + index = i + subtree:add(trimlightsp_proto.fields.schedule_id, buffer(index, 1)) + end + + -- Daily schedules (there are two, first 7 bytes are schedule 1, last 7 are schedule 2) + index = index + 1 + subtree:add(trimlightsp_proto.fields.daily_sched_state, buffer(index, 1)):prepend_text("Daily Schedule 1 ") + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(index + 1, 1)):prepend_text("Daily Schedule 1 ") + subtree:add(trimlightsp_proto.fields.daily_sched_repetition, buffer(index + 2, 1)):prepend_text("Daily Schedule 1 ") + subtree:add(trimlightsp_proto.fields.start_hour, buffer(index + 3, 1)):prepend_text("Daily Schedule 1 ") + subtree:add(trimlightsp_proto.fields.start_minute, buffer(index + 4, 1)):prepend_text("Daily Schedule 1 ") + subtree:add(trimlightsp_proto.fields.off_hour, buffer(index + 5, 1)):prepend_text("Daily Schedule 1 ") + subtree:add(trimlightsp_proto.fields.off_minute, buffer(index + 6, 1)):prepend_text("Daily Schedule 1 ") + index = index + 7 + subtree:add(trimlightsp_proto.fields.daily_sched_state, buffer(index, 1)):prepend_text("Daily Schedule 2 ") + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(index + 1, 1)):prepend_text("Daily Schedule 2 ") + subtree:add(trimlightsp_proto.fields.daily_sched_repetition, buffer(index + 2, 1)):prepend_text("Daily Schedule 2 ") + subtree:add(trimlightsp_proto.fields.start_hour, buffer(index + 3, 1)):prepend_text("Daily Schedule 2 ") + subtree:add(trimlightsp_proto.fields.start_minute, buffer(index + 4, 1)):prepend_text("Daily Schedule 2 ") + subtree:add(trimlightsp_proto.fields.off_hour, buffer(index + 5, 1)):prepend_text("Daily Schedule 2 ") + subtree:add(trimlightsp_proto.fields.off_minute, buffer(index + 6, 1)):prepend_text("Daily Schedule 2 ") + elseif request_type == 22 then -- Sync Pattern Detail Response + local string_start_pos = 2 + local max_name_length = 25 + local length_of_name = get_name_length(string_start_pos, max_name_length, buffer) + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(1, 1)) + subtree:add(trimlightsp_proto.fields.name, buffer(2, length_of_name)):prepend_text("Pattern ") + subtree:add(trimlightsp_proto.fields.unused_string_padding, buffer(2 + length_of_name, max_name_length - length_of_name)) + subtree:add(trimlightsp_proto.fields.category, buffer(27, 1)) + subtree:add(trimlightsp_proto.fields.effect_mode, buffer(28, 1)) + subtree:add(trimlightsp_proto.fields.speed, buffer(29, 1)):append_text(percentage(buffer(29, 1))) + subtree:add(trimlightsp_proto.fields.brightness, buffer(30, 1)):append_text(percentage(buffer(30, 1))) + subtree:add(trimlightsp_proto.fields.color1_count, buffer(31, 1)) + subtree:add(trimlightsp_proto.fields.color2_count, buffer(32, 1)) + subtree:add(trimlightsp_proto.fields.color3_count, buffer(33, 1)) + subtree:add(trimlightsp_proto.fields.color4_count, buffer(34, 1)) + subtree:add(trimlightsp_proto.fields.color5_count, buffer(35, 1)) + subtree:add(trimlightsp_proto.fields.color6_count, buffer(36, 1)) + subtree:add(trimlightsp_proto.fields.color7_count, buffer(37, 1)) + subtree:add(trimlightsp_proto.fields.color1_rgb, buffer(38, 3)):append_text(get_rgb(buffer(38, 3))) + subtree:add(trimlightsp_proto.fields.color2_rgb, buffer(41, 3)):append_text(get_rgb(buffer(41, 3))) + subtree:add(trimlightsp_proto.fields.color3_rgb, buffer(44, 3)):append_text(get_rgb(buffer(44, 3))) + subtree:add(trimlightsp_proto.fields.color4_rgb, buffer(47, 3)):append_text(get_rgb(buffer(47, 3))) + subtree:add(trimlightsp_proto.fields.color5_rgb, buffer(50, 3)):append_text(get_rgb(buffer(50, 3))) + subtree:add(trimlightsp_proto.fields.color6_rgb, buffer(53, 3)):append_text(get_rgb(buffer(53, 3))) + subtree:add(trimlightsp_proto.fields.color7_rgb, buffer(56, 3)):append_text(get_rgb(buffer(56, 3))) + elseif request_type == 23 then -- Sync Schedule Detail Response + subtree:add(trimlightsp_proto.fields.schedule_id, buffer(1, 1)) + subtree:add(trimlightsp_proto.fields.lib_pattern_id, buffer(2, 1)) + subtree:add(trimlightsp_proto.fields.start_month, buffer(3, 1)) + subtree:add(trimlightsp_proto.fields.start_day, buffer(4, 1)) + subtree:add(trimlightsp_proto.fields.off_month, buffer(5, 1)) + subtree:add(trimlightsp_proto.fields.off_day, buffer(6, 1)) + subtree:add(trimlightsp_proto.fields.start_hour, buffer(7, 1)) + subtree:add(trimlightsp_proto.fields.start_minute, buffer(8, 1)) + subtree:add(trimlightsp_proto.fields.off_hour, buffer(9, 1)) + subtree:add(trimlightsp_proto.fields.off_minute, buffer(10, 1)) + else + -- Unknown message, just show generic payload + print("Unable to parse response") + subtree:add(trimlightsp_proto.fields.payload, buffer(4, length - 5)) + end + end + + subtree:add(trimlightsp_proto.fields.end_flag, buffer(length - 1, 1)) +end + +function get_name_length(start, max_chars, buffer) + local length = max_chars + for i = start, start + max_chars, 1 do + local char = buffer(i, 1):uint() + if (char == 0 or char == 0xff) then -- can be terminated with 0x00 or 0xff + length = i - start + break + end + end + + return length +end + +function get_rgb(buffer) + local red = buffer(0, 1):uint() + local green = buffer(1, 1):uint() + local blue = buffer(2, 1):uint() + return " (" .. red .. ", " .. green .. ", " .. blue .. ")" +end + +function percentage(buffer) + return string.format(" (%.1f%%)", buffer:uint() / 255.0 * 100) +end + +function calc_verification(input) + if not input then + return nil + end + + local byte1 = bit.rshift(input[1], 3) + local byte2 = bit.band(input[2], 0x1f) + local byte3 = bit.lshift(input[3], 5) + return bit.band(bit.bor(byte3, bit.band(byte1, byte2)), 0xff) +end + +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(8189, trimlightsp_proto) diff --git a/dissectors/trimlight-sp/captures/msjarrett-trimlight1.pcapng b/dissectors/trimlight-sp/captures/msjarrett-trimlight1.pcapng new file mode 100644 index 0000000..0111b63 Binary files /dev/null and b/dissectors/trimlight-sp/captures/msjarrett-trimlight1.pcapng differ diff --git a/dissectors/trimlight-sp/captures/msjarrett-trimlight2.pcapng b/dissectors/trimlight-sp/captures/msjarrett-trimlight2.pcapng new file mode 100644 index 0000000..0dceec4 Binary files /dev/null and b/dissectors/trimlight-sp/captures/msjarrett-trimlight2.pcapng differ diff --git a/dissectors/udp-32100/32100_dissector.lua b/dissectors/udp-32100/32100_dissector.lua new file mode 100644 index 0000000..54f35af --- /dev/null +++ b/dissectors/udp-32100/32100_dissector.lua @@ -0,0 +1,94 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/fbertone/32100-dissector (32100_dissector.lua), +-- commit 5c82c865ed77cfbb9c8d5a0bf3c47fe3c9c5179e du 21/02/2018. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- Wireshark dissector for IoT protocol running on UDP port 32100 +-- Author: Fabrizio Bertone +-- Version: 0.0.3 (2018-02-21_1) +-- https://github.com/fbertone/32100-dissector + +-- known message types +messages = { + [0xf100] = "STUN request", + [0xf101] = "STUN response", + [0xf102] = "Send ping to server ???", + [0xf103] = "TURN NACK / server ping ???", + [0xf110] = "UID register (cam online) ???", + [0xf111] = "UID register Response ???", + [0xf120] = "UID Lookup Request 1", + [0xf121] = "UID Lookup ACK", + [0xf130] = "Hello World ???", + [0xf140] = "UID Lookup Response 1", + [0xf141] = "UID Session Open Request", + [0xf142] = "UID Session Open Response", + [0xf167] = "UID Lookup Request 2", + [0xf169] = "UID Lookup Response 2 (TURN servers list)", + [0xf170] = "TURN server init (C->S)", + [0xf171] = "TURN server OK (S->C)", + [0xf172] = "TURN server OK2 (C->S)", + [0xf173] = "TURN server password ???", + [0xf180] = "TURN server UID lookup request ???", + [0xf182] = "TURN server redirect ???", + [0xf183] = "TURN server UID lookup request 2 (connection) ???", + [0xf184] = "TURN server UID lookup response 2 (connecting...) ???", + [0xf191] = "UID de-register (reboot) ???", + [0xf1d0] = "Data", + [0xf1d1] = "Data ACK", + [0xf1e0] = "PING", + [0xf1e1] = "PONG", + [0xf1f0] = "Session END", +} + +function parseAddress (buf) + local type = buf(1,1):uint() + local port1 = buf(2,1):uint() + local port2 = buf(3,1):uint() + local port = port2 * 0xFF + port1 + local ip = buf(6,1):uint() .. '.' .. buf(6,1):uint() .. '.' .. buf(4,1):uint() .. '.' .. buf(3,1):uint() + return ip .. ':' .. port +end + +-- declare our protocol +IoT32100_proto = Proto("32100","32100 IoT Protocol") + +-- declare fields +local F_fullnumtype = ProtoField.new("Full Numeric Type", "32100.fulltype", ftypes.UINT16, nil, base.DEC_HEX, nil, "Full Message Type (DEC_HEX)") +local F_numtype = ProtoField.new("Numeric Type", "32100.type", ftypes.UINT8, nil, base.DEC_HEX, nil, "Short Message Type (DEC_HEX)") +local F_strtype = ProtoField.new("Description", "32100.description", ftypes.STRING, nil, nil, nil, "Message Type Description (STRING)") +local F_known = ProtoField.new("Known type", "32100.known", ftypes.BOOLEAN, nil, nil, nil, "Message type is known (BOOLEAN)") +local F_paylen = ProtoField.new("Payload length", "32100.paylen", ftypes.UINT16, nil, base.DEC, nil, "Payload Length (DEC)") + +-- add the fields to the protocol +-- (to confirm this worked, check that these fields appeared in the "Filter Expression" dialog) +IoT32100_proto.fields = {F_fullnumtype, F_numtype, F_strtype, F_known, F_paylen} + +-- create a function to dissect it +function IoT32100_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "32100" + local full_type = buffer(0,2):uint() + local num_type = buffer(1,1):uint() + local known = false + local str_type = "Unknown - " .. string.format("0x%x", full_type) + + if (messages[full_type]) then + known = true + str_type = messages[full_type] + end + + local payload_len = buffer(2,2):uint() + local payload = buffer(4,payload_len) + + local subtree = tree:add(IoT32100_proto,buffer(),"32100 Protocol") + + subtree:add(F_fullnumtype, buffer(0,2), full_type) + subtree:add(F_numtype, buffer(1,1), num_type) + subtree:add(F_strtype, buffer(0,2), str_type) + subtree:add(F_known, buffer(0,2), known) + subtree:add(F_paylen, buffer(2,2), payload_len) + +end + +-- load the udp.port table +udp_table = DissectorTable.get("udp.port") +-- register our protocol to handle udp port 32100 +udp_table:add(32100,IoT32100_proto) diff --git a/dissectors/udp-32100/LICENSE b/dissectors/udp-32100/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/dissectors/udp-32100/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/udp-32100/README.md b/dissectors/udp-32100/README.md new file mode 100644 index 0000000..8a98284 --- /dev/null +++ b/dissectors/udp-32100/README.md @@ -0,0 +1,51 @@ +# Protocole « 32100 » (P2P des caméras IP, port UDP 32100) + +Dissecteur Wireshark Lua du **protocole « 32100 »**, nom donné par l'auteur +au protocole P2P de nombreuses caméras IP grand public qui contactent leurs +serveurs sur UDP 32100 (protocole connu ailleurs sous le nom PPPP / CS2, +documenté dans [lib32100](https://github.com/fbertone/lib32100/wiki)) : +en-tête 0xF1, type et longueur, puis messages STUN, ping, enregistrement / +désenregistrement de l'UID de la caméra, requêtes de connexion, adresses +IP:port échangées, etc. Les types non reconnus sont signalés +(`32100.known == false`). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/fbertone/32100-dissector (fichier `32100_dissector.lua`, version 0.0.3) | +| Commit importé | `5c82c865ed77cfbb9c8d5a0bf3c47fe3c9c5179e` du 21/02/2018 (branche `master`, dernier commit, qui modifie aussi le dissecteur) | +| Licence amont | GPL-3.0-only (`LICENSE` amont : texte de la GPL v3, sans mention « or any later version » propre au projet ; en-tête du fichier : « Author: Fabrizio Bertone ») | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur PPPP / 32100 natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `32100_dissector.lua` | Dissecteur `32100` (UDP 32100), fins de ligne CRLF d'origine conservées | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. Non importées : les captures +d'écran `images/` du README amont. + +## Utilisation + +Copier `32100_dissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `32100`. Les échanges caméra ↔ application ↔ relais passent par +d'autres ports : « Décoder comme… » → `32100` sur ces ports (README amont). + +## Remarques + +- **Recouvrement avec `dissectors/pppp/`** (#175) : même famille de + protocole. `pppp` est plus complet (heuristique UDP, désobscurcissement + PSK) ; si les deux sont chargés, le port 32100 revient à celui-ci et les + autres ports à l'heuristique de `pppp`. Charger l'un ou l'autre selon le + besoin. +- Globales `messages`, `IoT32100_proto`, `udp_table` comme dans l'amont. +- Plusieurs types sont marqués « ??? » par l'auteur (signification + supposée) ; projet non maintenu depuis 2018. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/usp-tr369/LICENSE b/dissectors/usp-tr369/LICENSE new file mode 100644 index 0000000..9063e4f --- /dev/null +++ b/dissectors/usp-tr369/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 NSIDE ATTACK LOGIC GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/usp-tr369/README.md b/dissectors/usp-tr369/README.md new file mode 100644 index 0000000..6e5edda --- /dev/null +++ b/dissectors/usp-tr369/README.md @@ -0,0 +1,56 @@ +# USP (TR-369) — User Services Platform sur MQTT + +Dissecteur Wireshark Lua de **USP — User Services Platform** (TR-369 du +Broadband Forum, successeur de TR-069 / CWMP pour la gestion des box et +équipements réseau domestiques), transporté dans les messages MQTT +PUBLISH : enveloppe USP Record (`NoSessionContext`, `SessionContext`, +enregistrements de connexion MQTT / WebSocket / STOMP / UDS, déconnexion) +et message USP interne (les 22 types : GET, SET, ADD, DELETE, OPERATE, +NOTIFY, GET_SUPPORTED_DM, GET_INSTANCES, GET_SUPPORTED_PROTO, REGISTER, +DEREGISTER et leurs réponses, ERROR), avec chemins et valeurs de +paramètres, clés uniques, codes d'erreur et sous-types de notification. +Décodeur protobuf minimal en Lua ; post-dissecteur sur le champ +`mqtt.msg`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/NSIDE-ATTACK-LOGIC/USP-Wireshark-Dissector | +| Commit importé | `ba1e91336388d6d447e80682d0df74585eb146a9` du 03/07/2026 (branche `main`, dernier commit ; dernière modification de `usp_dissector.lua` : `b474cdc` du 11/05/2026) | +| Licence amont | MIT (`LICENSE` amont, © 2026 NSIDE ATTACK LOGIC GmbH ; en-tête : « License: MIT ») | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur USP natif (le dissecteur protobuf générique demande les fichiers `.proto`) | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `usp_dissector.lua` | Protocoles `usp_record` et `usp_msg`, post-dissecteur `usp_postdissector` sur MQTT | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête. Les captures d'écran amont ne sont pas +importées. + +## Utilisation + +Copier `usp_dissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `usp_record`, `usp_msg.msg_type == 1` (GET), +`usp_msg.param_path contains "Device.WiFi."`… Pour MQTT sur TLS, +renseigner un fichier de clés TLS (`SSLKEYLOGFILE`) dans les préférences +TLS. + +## Remarques + +- Limites indiquées par l'amont : transport MQTT seulement (pas + WebSocket, STOMP ni UDS) ; pas de réassemblage des `SessionContext` + segmentés ; détection heuristique (d'autres charges MQTT binaires + peuvent apparaître brièvement comme USP) ; entiers varint exacts + jusqu'à 2^53. +- Utilise `bit.band` / `bit.rshift` (bibliothèque `bit` fournie par + Wireshark 4.4 et plus). +- L'auteur indique un développement assisté par IA. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/usp-tr369/usp_dissector.lua b/dissectors/usp-tr369/usp_dissector.lua new file mode 100644 index 0000000..360204d --- /dev/null +++ b/dissectors/usp-tr369/usp_dissector.lua @@ -0,0 +1,869 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/NSIDE-ATTACK-LOGIC/USP-Wireshark-Dissector (usp_dissector.lua), +-- commit ba1e91336388d6d447e80682d0df74585eb146a9 du 03/07/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- USP (TR-369) Wireshark Dissector +-- Parses USP Records and USP Messages carried over MQTT. +-- Based on usp_record.proto and usp_msg.proto (Broadband Forum TR-369). +-- +-- Author: Benedikt Strobl +-- License: MIT +-- +-- Install: copy to ~/.local/lib/wireshark/plugins/ (Linux) or +-- %APPDATA%\Wireshark\plugins\ (Windows) +-- Then reload plugins: Analyze → Reload Lua Plugins (Ctrl+Shift+L) + +local usp_record_proto = Proto("usp_record", "USP Record (TR-369)") +local usp_msg_proto = Proto("usp_msg", "USP Message (TR-369)") + +----------------------------------------------------------------------- +-- ProtoField declarations – usp_record +----------------------------------------------------------------------- +local rf = {} +rf.version = ProtoField.string ("usp_record.version", "Version") +rf.to_id = ProtoField.string ("usp_record.to_id", "To ID") +rf.from_id = ProtoField.string ("usp_record.from_id", "From ID") +rf.payload_security = ProtoField.uint32 ("usp_record.payload_security", "Payload Security", + base.DEC, {[0]="PLAINTEXT",[1]="TLS12"}) +rf.mac_signature = ProtoField.bytes ("usp_record.mac_signature", "MAC Signature") +rf.sender_cert = ProtoField.bytes ("usp_record.sender_cert", "Sender Certificate") +rf.record_type = ProtoField.string ("usp_record.record_type", "Record Type") +-- NoSessionContext +rf.nsc_payload = ProtoField.bytes ("usp_record.nsc.payload", "NSC Payload (raw)") +-- SessionContext +rf.sc_session_id = ProtoField.uint64 ("usp_record.sc.session_id", "Session ID") +rf.sc_sequence_id = ProtoField.uint64 ("usp_record.sc.sequence_id", "Sequence ID") +rf.sc_expected_id = ProtoField.uint64 ("usp_record.sc.expected_id", "Expected ID") +rf.sc_retransmit_id = ProtoField.uint64 ("usp_record.sc.retransmit_id", "Retransmit ID") +local sar_vals = {[0]="NONE",[1]="BEGIN",[2]="INPROCESS",[3]="COMPLETE"} +rf.sc_payload_sar = ProtoField.uint32 ("usp_record.sc.payload_sar", "Payload SAR State", base.DEC, sar_vals) +rf.sc_payloadrec_sar = ProtoField.uint32 ("usp_record.sc.payloadrec_sar", "PayloadRec SAR State", base.DEC, sar_vals) +rf.sc_payload = ProtoField.bytes ("usp_record.sc.payload", "SC Payload (raw)") +-- MQTTConnect +rf.mqtt_version = ProtoField.string ("usp_record.mqtt.version", "MQTT Version") +rf.mqtt_topic = ProtoField.string ("usp_record.mqtt.topic", "Subscribed Topic") +-- WebSocketConnect +rf.ws_topic = ProtoField.string ("usp_record.ws.topic", "Subscribed Topic") +-- STOMPConnect +rf.stomp_dest = ProtoField.string ("usp_record.stomp.dest", "Subscribed Destination") +rf.stomp_version = ProtoField.string ("usp_record.stomp.version", "STOMP Version") +-- Disconnect +rf.disc_reason_code = ProtoField.uint32 ("usp_record.disc.reason_code", "Reason Code") +rf.disc_reason = ProtoField.string ("usp_record.disc.reason", "Reason") + +usp_record_proto.fields = { + rf.version, rf.to_id, rf.from_id, rf.payload_security, + rf.mac_signature, rf.sender_cert, rf.record_type, + rf.nsc_payload, + rf.sc_session_id, rf.sc_sequence_id, rf.sc_expected_id, + rf.sc_retransmit_id, rf.sc_payload_sar, rf.sc_payloadrec_sar, rf.sc_payload, + rf.mqtt_version, rf.mqtt_topic, + rf.ws_topic, + rf.stomp_dest, rf.stomp_version, + rf.disc_reason_code, rf.disc_reason, +} + +----------------------------------------------------------------------- +-- ProtoField declarations – usp_msg +----------------------------------------------------------------------- +local mf = {} +local MSG_TYPES = { + [0]="ERROR", [1]="GET", [2]="GET_RESP", + [3]="NOTIFY", [4]="SET", [5]="SET_RESP", + [6]="OPERATE", [7]="OPERATE_RESP", [8]="ADD", + [9]="ADD_RESP", [10]="DELETE", [11]="DELETE_RESP", + [12]="GET_SUPPORTED_DM", [13]="GET_SUPPORTED_DM_RESP", + [14]="GET_INSTANCES", [15]="GET_INSTANCES_RESP", + [16]="NOTIFY_RESP", [17]="GET_SUPPORTED_PROTO", + [18]="GET_SUPPORTED_PROTO_RESP", + [19]="REGISTER", [20]="REGISTER_RESP", + [21]="DEREGISTER", [22]="DEREGISTER_RESP", +} +mf.msg_id = ProtoField.string ("usp_msg.msg_id", "Message ID") +mf.msg_type = ProtoField.uint32 ("usp_msg.msg_type", "Message Type", base.DEC, MSG_TYPES) +mf.body_type = ProtoField.string ("usp_msg.body_type", "Body Type") +mf.notif_type = ProtoField.string ("usp_msg.notif_type", "Notification Type") +mf.param_path = ProtoField.string ("usp_msg.param_path", "Param Path") +mf.obj_path = ProtoField.string ("usp_msg.obj_path", "Object Path") +mf.param_value = ProtoField.string ("usp_msg.param_value", "Param Value") +mf.param_key = ProtoField.string ("usp_msg.param_key", "Param Key") +mf.command = ProtoField.string ("usp_msg.command", "Command") +mf.command_key = ProtoField.string ("usp_msg.command_key", "Command Key") +mf.send_resp = ProtoField.bool ("usp_msg.send_resp", "Send Response") +mf.allow_partial = ProtoField.bool ("usp_msg.allow_partial", "Allow Partial") +mf.max_depth = ProtoField.uint32 ("usp_msg.max_depth", "Max Depth") +mf.sub_id = ProtoField.string ("usp_msg.sub_id", "Subscription ID") +mf.err_code = ProtoField.uint32 ("usp_msg.err_code", "Error Code") +mf.err_msg = ProtoField.string ("usp_msg.err_msg", "Error Message") +mf.first_level = ProtoField.bool ("usp_msg.first_level", "First Level Only") +mf.ret_cmds = ProtoField.bool ("usp_msg.ret_cmds", "Return Commands") +mf.ret_events = ProtoField.bool ("usp_msg.ret_events", "Return Events") +mf.ret_params = ProtoField.bool ("usp_msg.ret_params", "Return Params") +mf.proto_vers = ProtoField.string ("usp_msg.proto_vers", "Protocol Versions") +mf.oui = ProtoField.string ("usp_msg.oui", "OUI") +mf.product_class = ProtoField.string ("usp_msg.product_class", "Product Class") +mf.serial_num = ProtoField.string ("usp_msg.serial_num", "Serial Number") +mf.requested_path = ProtoField.string ("usp_msg.requested_path", "Requested Path") +mf.resolved_path = ProtoField.string ("usp_msg.resolved_path", "Resolved Path") +mf.affected_path = ProtoField.string ("usp_msg.affected_path", "Affected Path") +mf.instantiated_path = ProtoField.string ("usp_msg.instantiated_path","Instantiated Path") +mf.registered_path = ProtoField.string ("usp_msg.registered_path", "Registered Path") +mf.result_param = ProtoField.string ("usp_msg.result_param", "Result Param") +mf.output_arg = ProtoField.string ("usp_msg.output_arg", "Output Arg") +mf.unique_key = ProtoField.string ("usp_msg.unique_key", "Unique Key") + +usp_msg_proto.fields = { + mf.msg_id, mf.msg_type, mf.body_type, mf.notif_type, + mf.param_path, mf.obj_path, mf.param_value, mf.param_key, + mf.command, mf.command_key, mf.send_resp, mf.allow_partial, + mf.max_depth, mf.sub_id, mf.err_code, mf.err_msg, + mf.first_level, mf.ret_cmds, mf.ret_events, mf.ret_params, + mf.proto_vers, mf.oui, mf.product_class, mf.serial_num, + mf.requested_path, mf.resolved_path, mf.affected_path, + mf.instantiated_path, mf.registered_path, + mf.result_param, mf.output_arg, mf.unique_key, +} + +----------------------------------------------------------------------- +-- Protobuf binary parser (pure Lua, string-based, 1-indexed) +----------------------------------------------------------------------- + +-- Decodes a varint from string s starting at pos. +-- Uses float arithmetic (mult*128) to handle > 32-bit values up to 2^53. +-- Returns: value (number), new_pos or nil, pos on error. +local function decode_varint(s, pos) + local result = 0 + local mult = 1 + local len = #s + while pos <= len do + local b = string.byte(s, pos) + pos = pos + 1 + result = result + bit.band(b, 0x7F) * mult + mult = mult * 128 + if bit.band(b, 0x80) == 0 then + return result, pos + end + if mult > 2^63 then break end + end + return nil, pos +end + +-- Reads one tag+value from string s at pos. +-- Returns: field_number, wire_type, value, new_pos or nil on error. +-- wire 0 → value is number (varint) +-- wire 1 → value is 0 (64-bit, skipped) +-- wire 2 → value is string (length-delimited bytes) +-- wire 5 → value is number (fixed32, little-endian) +local function read_field(s, pos) + if pos > #s then return nil end + local tag, npos = decode_varint(s, pos) + if tag == nil then return nil end + local wt = bit.band(tag, 0x7) + local fnum = bit.rshift(tag, 3) + if fnum < 0 then fnum = fnum + 2^29 end + + if wt == 0 then + local v, np = decode_varint(s, npos) + return fnum, 0, v, np + elseif wt == 1 then + if npos + 7 > #s then return nil end + return fnum, 1, 0, npos + 8 + elseif wt == 2 then + local llen, np = decode_varint(s, npos) + if llen == nil or np + llen - 1 > #s then return nil end + local sub = s:sub(np, np + llen - 1) + return fnum, 2, sub, np + llen + elseif wt == 5 then + if npos + 3 > #s then return nil end + local b0 = string.byte(s, npos) + local b1 = string.byte(s, npos+1) + local b2 = string.byte(s, npos+2) + local b3 = string.byte(s, npos+3) + local v = b0 + b1*256 + b2*65536 + b3*16777216 + return fnum, 5, v, npos + 4 + else + return nil + end +end + +-- Calls fn(field_number, wire_type, value) for every field in protobuf string s. +local function iter_fields(s, fn) + local pos = 1 + while pos <= #s do + local fnum, wt, val, np = read_field(s, pos) + if fnum == nil then break end + fn(fnum, wt, val) + pos = np + end +end + +-- Decodes a map entry (wire-type-2 blob) into "key = value". +local function decode_map_entry(s) + local k, v = "", "" + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then k = val + elseif fn == 2 and wt == 2 then v = val + end + end) + return k .. " = " .. v +end + +----------------------------------------------------------------------- +-- USP Message sub-dissectors (one per request/response type) +----------------------------------------------------------------------- + +local function diss_get(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.param_path, val) + elseif fn == 2 and wt == 0 then t:add(mf.max_depth, val) + end + end) +end + +local function diss_get_supported_dm(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.obj_path, val) + elseif fn == 2 and wt == 0 then t:add(mf.first_level, val ~= 0) + elseif fn == 3 and wt == 0 then t:add(mf.ret_cmds, val ~= 0) + elseif fn == 4 and wt == 0 then t:add(mf.ret_events, val ~= 0) + elseif fn == 5 and wt == 0 then t:add(mf.ret_params, val ~= 0) + end + end) +end + +local function diss_get_instances(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.obj_path, val) + elseif fn == 2 and wt == 0 then t:add(mf.first_level, val ~= 0) + end + end) +end + +local function diss_set(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 0 then + t:add(mf.allow_partial, val ~= 0) + elseif fn == 2 and wt == 2 then + local ot = t:add(usp_msg_proto, "UpdateObject") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then ot:add(mf.obj_path, val2) + elseif fn2 == 2 and wt2 == 2 then + local ps = ot:add(usp_msg_proto, "ParamSetting") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then ps:add(mf.param_key, val3) + elseif fn3 == 2 and wt3 == 2 then ps:add(mf.param_value, val3) + elseif fn3 == 3 and wt3 == 0 then ps:add(mf.send_resp, val3 ~= 0) + end + end) + end + end) + end + end) +end + +local function diss_add(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 0 then + t:add(mf.allow_partial, val ~= 0) + elseif fn == 2 and wt == 2 then + local ot = t:add(usp_msg_proto, "CreateObject") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then ot:add(mf.obj_path, val2) + elseif fn2 == 2 and wt2 == 2 then + local ps = ot:add(usp_msg_proto, "ParamSetting") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then ps:add(mf.param_key, val3) + elseif fn3 == 2 and wt3 == 2 then ps:add(mf.param_value, val3) + elseif fn3 == 3 and wt3 == 0 then ps:add(mf.send_resp, val3 ~= 0) + end + end) + end + end) + end + end) +end + +local function diss_delete(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 0 then t:add(mf.allow_partial, val ~= 0) + elseif fn == 2 and wt == 2 then t:add(mf.obj_path, val) + end + end) +end + +local function diss_operate(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.command, val) + elseif fn == 2 and wt == 2 then t:add(mf.command_key, val) + elseif fn == 3 and wt == 0 then t:add(mf.send_resp, val ~= 0) + elseif fn == 4 and wt == 2 then + local at = t:add(usp_msg_proto, "InputArg") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then at:add(mf.param_key, val2) + elseif fn2 == 2 and wt2 == 2 then at:add(mf.param_value, val2) + end + end) + end + end) +end + +local function diss_notify(s, t) + local ntype, ndata = nil, nil + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.sub_id, val) + elseif fn == 2 and wt == 0 then t:add(mf.send_resp, val ~= 0) + elseif fn == 3 and wt == 2 then ntype = "Event"; ndata = val + elseif fn == 4 and wt == 2 then ntype = "ValueChange"; ndata = val + elseif fn == 5 and wt == 2 then ntype = "ObjectCreation"; ndata = val + elseif fn == 6 and wt == 2 then ntype = "ObjectDeletion"; ndata = val + elseif fn == 7 and wt == 2 then ntype = "OperationComplete"; ndata = val + elseif fn == 8 and wt == 2 then ntype = "OnBoardRequest"; ndata = val + end + end) + if not ntype then return end + t:add(mf.notif_type, ntype) + local nt = t:add(usp_msg_proto, ntype) + if ntype == "ValueChange" then + iter_fields(ndata, function(fn, wt, val) + if fn == 1 and wt == 2 then nt:add(mf.param_path, val) + elseif fn == 2 and wt == 2 then nt:add(mf.param_value, val) + end + end) + elseif ntype == "ObjectCreation" then + iter_fields(ndata, function(fn, wt, val) + if fn == 1 and wt == 2 then nt:add(mf.obj_path, val) + elseif fn == 2 and wt == 2 then nt:add(mf.unique_key, decode_map_entry(val)) + end + end) + elseif ntype == "ObjectDeletion" then + iter_fields(ndata, function(fn, wt, val) + if fn == 1 and wt == 2 then nt:add(mf.obj_path, val) end + end) + elseif ntype == "Event" then + iter_fields(ndata, function(fn, wt, val) + if fn == 1 and wt == 2 then nt:add(mf.obj_path, val) + elseif fn == 2 and wt == 2 then nt:add(mf.param_key, val) + elseif fn == 3 and wt == 2 then + local ep = nt:add(usp_msg_proto, "EventParam") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then ep:add(mf.param_key, val2) + elseif fn2 == 2 and wt2 == 2 then ep:add(mf.param_value, val2) + end + end) + end + end) + elseif ntype == "OperationComplete" then + iter_fields(ndata, function(fn, wt, val) + if fn == 1 and wt == 2 then nt:add(mf.command, val) + elseif fn == 2 and wt == 2 then nt:add(mf.command_key, val) + elseif fn == 3 and wt == 2 then nt:add(mf.obj_path, val) + elseif fn == 4 and wt == 2 then + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then nt:add(mf.output_arg, decode_map_entry(val2)) end + end) + elseif fn == 5 and wt == 2 then + local cf = nt:add(usp_msg_proto, "CommandFailure") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 5 then cf:add(mf.err_code, val2) + elseif fn2 == 2 and wt2 == 2 then cf:add(mf.err_msg, val2) + end + end) + end + end) + elseif ntype == "OnBoardRequest" then + iter_fields(ndata, function(fn, wt, val) + if fn == 1 and wt == 2 then nt:add(mf.oui, val) + elseif fn == 2 and wt == 2 then nt:add(mf.product_class, val) + elseif fn == 3 and wt == 2 then nt:add(mf.serial_num, val) + elseif fn == 4 and wt == 2 then nt:add(mf.proto_vers, val) + end + end) + end +end + +local function diss_get_supported_proto(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.proto_vers, val) end + end) +end + +local function diss_register(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 0 then t:add(mf.allow_partial, val ~= 0) + elseif fn == 2 and wt == 2 then + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then t:add(mf.param_path, val2) end + end) + end + end) +end + +local function diss_deregister(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.param_path, val) end + end) +end + +-- Responses + +local function diss_get_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local rr = t:add(usp_msg_proto, "RequestedPathResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then rr:add(mf.requested_path, val2) + elseif fn2 == 2 and wt2 == 5 then rr:add(mf.err_code, val2) + elseif fn2 == 3 and wt2 == 2 then rr:add(mf.err_msg, val2) + elseif fn2 == 4 and wt2 == 2 then + local rp = rr:add(usp_msg_proto, "ResolvedPathResult") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then rp:add(mf.resolved_path, val3) + elseif fn3 == 2 and wt3 == 2 then rp:add(mf.result_param, decode_map_entry(val3)) + end + end) + end + end) + end + end) +end + +local function diss_get_supported_dm_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local rr = t:add(usp_msg_proto, "RequestedObjectResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then rr:add(mf.obj_path, val2) + elseif fn2 == 2 and wt2 == 5 then rr:add(mf.err_code, val2) + elseif fn2 == 3 and wt2 == 2 then rr:add(mf.err_msg, val2) + elseif fn2 == 5 and wt2 == 2 then + local so = rr:add(usp_msg_proto, "SupportedObject") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then so:add(mf.obj_path, val3) end + end) + end + end) + end + end) +end + +local function diss_get_instances_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local rr = t:add(usp_msg_proto, "RequestedPathResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then rr:add(mf.requested_path, val2) + elseif fn2 == 2 and wt2 == 5 then rr:add(mf.err_code, val2) + elseif fn2 == 3 and wt2 == 2 then rr:add(mf.err_msg, val2) + elseif fn2 == 4 and wt2 == 2 then + local ci = rr:add(usp_msg_proto, "CurrInstance") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then ci:add(mf.instantiated_path, val3) + elseif fn3 == 2 and wt3 == 2 then ci:add(mf.unique_key, decode_map_entry(val3)) + end + end) + end + end) + end + end) +end + +local function diss_set_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local ur = t:add(usp_msg_proto, "UpdatedObjectResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then ur:add(mf.requested_path, val2) + elseif fn2 == 2 and wt2 == 2 then + local ok = ur:add(usp_msg_proto, "OperationSuccess") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then + local ir = ok:add(usp_msg_proto, "UpdatedInstanceResult") + iter_fields(val3, function(fn4, wt4, val4) + if fn4 == 1 and wt4 == 2 then ir:add(mf.affected_path, val4) + elseif fn4 == 3 and wt4 == 2 then ir:add(mf.result_param, decode_map_entry(val4)) + end + end) + end + end) + elseif fn2 == 3 and wt2 == 2 then + local nok = ur:add(usp_msg_proto, "OperationFailure") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 5 then nok:add(mf.err_code, val3) + elseif fn3 == 2 and wt3 == 2 then nok:add(mf.err_msg, val3) + end + end) + end + end) + end + end) +end + +local function diss_add_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local cr = t:add(usp_msg_proto, "CreatedObjectResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then cr:add(mf.requested_path, val2) + elseif fn2 == 2 and wt2 == 2 then + local ok = cr:add(usp_msg_proto, "OperationSuccess") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then ok:add(mf.instantiated_path, val3) + elseif fn3 == 3 and wt3 == 2 then ok:add(mf.unique_key, decode_map_entry(val3)) + end + end) + elseif fn2 == 3 and wt2 == 2 then + local nok = cr:add(usp_msg_proto, "OperationFailure") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 5 then nok:add(mf.err_code, val3) + elseif fn3 == 2 and wt3 == 2 then nok:add(mf.err_msg, val3) + end + end) + end + end) + end + end) +end + +local function diss_delete_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local dr = t:add(usp_msg_proto, "DeletedObjectResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then dr:add(mf.requested_path, val2) + elseif fn2 == 2 and wt2 == 2 then + local ok = dr:add(usp_msg_proto, "OperationSuccess") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then ok:add(mf.affected_path, val3) end + end) + elseif fn2 == 3 and wt2 == 2 then + local nok = dr:add(usp_msg_proto, "OperationFailure") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 5 then nok:add(mf.err_code, val3) + elseif fn3 == 2 and wt3 == 2 then nok:add(mf.err_msg, val3) + end + end) + end + end) + end + end) +end + +local function diss_operate_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local or_ = t:add(usp_msg_proto, "OperationResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then or_:add(mf.command, val2) + elseif fn2 == 2 and wt2 == 2 then or_:add(mf.obj_path, val2) + elseif fn2 == 3 and wt2 == 2 then + local oa = or_:add(usp_msg_proto, "OutputArgs") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then oa:add(mf.output_arg, decode_map_entry(val3)) end + end) + elseif fn2 == 4 and wt2 == 2 then + local cf = or_:add(usp_msg_proto, "CommandFailure") + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 5 then cf:add(mf.err_code, val3) + elseif fn3 == 2 and wt3 == 2 then cf:add(mf.err_msg, val3) + end + end) + end + end) + end + end) +end + +local function diss_notify_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.sub_id, val) end + end) +end + +local function diss_get_supported_proto_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then t:add(mf.proto_vers, val) end + end) +end + +local function diss_register_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local rpr = t:add(usp_msg_proto, "RegisteredPathResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then rpr:add(mf.requested_path, val2) + elseif fn2 == 2 and wt2 == 2 then + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then rpr:add(mf.registered_path, val3) end + end) + elseif fn2 == 3 and wt2 == 2 then + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 5 then rpr:add(mf.err_code, val3) + elseif fn3 == 2 and wt3 == 2 then rpr:add(mf.err_msg, val3) + end + end) + end + end) + end + end) +end + +local function diss_deregister_resp(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local dpr = t:add(usp_msg_proto, "DeregisteredPathResult") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then dpr:add(mf.requested_path, val2) + elseif fn2 == 2 and wt2 == 2 then + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 2 then dpr:add(mf.registered_path, val3) end + end) + elseif fn2 == 3 and wt2 == 2 then + iter_fields(val2, function(fn3, wt3, val3) + if fn3 == 1 and wt3 == 5 then dpr:add(mf.err_code, val3) + elseif fn3 == 2 and wt3 == 2 then dpr:add(mf.err_msg, val3) + end + end) + end + end) + end + end) +end + +local function diss_error(s, t) + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 5 then t:add(mf.err_code, val) + elseif fn == 2 and wt == 2 then t:add(mf.err_msg, val) + elseif fn == 3 and wt == 2 then + local pe = t:add(usp_msg_proto, "ParamError") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then pe:add(mf.param_path, val2) + elseif fn2 == 2 and wt2 == 5 then pe:add(mf.err_code, val2) + elseif fn2 == 3 and wt2 == 2 then pe:add(mf.err_msg, val2) + end + end) + end + end) +end + +local REQ_DISSECTORS = { + [1] = {"Get", diss_get}, + [2] = {"GetSupportedDM", diss_get_supported_dm}, + [3] = {"GetInstances", diss_get_instances}, + [4] = {"Set", diss_set}, + [5] = {"Add", diss_add}, + [6] = {"Delete", diss_delete}, + [7] = {"Operate", diss_operate}, + [8] = {"Notify", diss_notify}, + [9] = {"GetSupportedProtocol", diss_get_supported_proto}, + [10] = {"Register", diss_register}, + [11] = {"Deregister", diss_deregister}, +} + +local RESP_DISSECTORS = { + [1] = {"GetResp", diss_get_resp}, + [2] = {"GetSupportedDMResp", diss_get_supported_dm_resp}, + [3] = {"GetInstancesResp", diss_get_instances_resp}, + [4] = {"SetResp", diss_set_resp}, + [5] = {"AddResp", diss_add_resp}, + [6] = {"DeleteResp", diss_delete_resp}, + [7] = {"OperateResp", diss_operate_resp}, + [8] = {"NotifyResp", diss_notify_resp}, + [9] = {"GetSupportedProtocolResp", diss_get_supported_proto_resp}, + [10] = {"RegisterResp", diss_register_resp}, + [11] = {"DeregisterResp", diss_deregister_resp}, +} + +----------------------------------------------------------------------- +-- USP Msg top-level dissector (operates on a Lua string) +----------------------------------------------------------------------- + +local function dissect_usp_msg(s, parent_tree) + local mt = parent_tree:add(usp_msg_proto, "USP Message") + local msg_type_val = nil + + iter_fields(s, function(fn, wt, val) + if fn == 1 and wt == 2 then + local ht = mt:add(usp_msg_proto, "Header") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then + ht:add(mf.msg_id, val2) + elseif fn2 == 2 and wt2 == 0 then + msg_type_val = val2 + ht:add(mf.msg_type, val2) + end + end) + + elseif fn == 2 and wt == 2 then + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then + local req_t = mt:add(usp_msg_proto, "Request") + mt:add(mf.body_type, "Request") + iter_fields(val2, function(fn3, wt3, val3) + local d = REQ_DISSECTORS[fn3] + if d and wt3 == 2 then + local sub = req_t:add(usp_msg_proto, d[1]) + d[2](val3, sub) + end + end) + + elseif fn2 == 2 and wt2 == 2 then + local resp_t = mt:add(usp_msg_proto, "Response") + mt:add(mf.body_type, "Response") + iter_fields(val2, function(fn3, wt3, val3) + local d = RESP_DISSECTORS[fn3] + if d and wt3 == 2 then + local sub = resp_t:add(usp_msg_proto, d[1]) + d[2](val3, sub) + end + end) + + elseif fn2 == 3 and wt2 == 2 then + local err_t = mt:add(usp_msg_proto, "Error") + mt:add(mf.body_type, "Error") + diss_error(val2, err_t) + end + end) + end + end) + + local label = MSG_TYPES[msg_type_val] or ("MsgType=" .. tostring(msg_type_val)) + mt:set_text("USP Message [" .. label .. "]") + return label +end + +----------------------------------------------------------------------- +-- USP Record dissector (entry point, called with a TvbRange) +----------------------------------------------------------------------- + +function usp_record_proto.dissector(tvb, pinfo, tree) + if tvb:len() == 0 then return 0 end + + -- Always receives a proper Tvb (callers must use ByteArray:tvb() to wrap foreign ranges). + local raw = tvb:bytes():raw() + pinfo.cols.protocol:set("USP") + + local rec_t = tree:add(usp_record_proto, tvb(), "USP Record (TR-369)") + local rtype = "Unknown" + local payload_str = nil + + iter_fields(raw, function(fn, wt, val) + if fn == 1 and wt == 2 then rec_t:add(rf.version, val) + elseif fn == 2 and wt == 2 then rec_t:add(rf.to_id, val) + elseif fn == 3 and wt == 2 then rec_t:add(rf.from_id, val) + elseif fn == 4 and wt == 0 then rec_t:add(rf.payload_security, val) + elseif fn == 5 and wt == 2 then rec_t:add(rf.mac_signature, val) + elseif fn == 6 and wt == 2 then rec_t:add(rf.sender_cert, val) + + elseif fn == 7 and wt == 2 then + rtype = "NoSessionContext" + local st = rec_t:add(usp_record_proto, "NoSessionContextRecord") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 2 and wt2 == 2 then + st:add(rf.nsc_payload, val2) + payload_str = val2 + end + end) + + elseif fn == 8 and wt == 2 then + rtype = "SessionContext" + local st = rec_t:add(usp_record_proto, "SessionContextRecord") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 0 then st:add(rf.sc_session_id, val2) + elseif fn2 == 2 and wt2 == 0 then st:add(rf.sc_sequence_id, val2) + elseif fn2 == 3 and wt2 == 0 then st:add(rf.sc_expected_id, val2) + elseif fn2 == 4 and wt2 == 0 then st:add(rf.sc_retransmit_id,val2) + elseif fn2 == 5 and wt2 == 0 then st:add(rf.sc_payload_sar, val2) + elseif fn2 == 6 and wt2 == 0 then st:add(rf.sc_payloadrec_sar,val2) + elseif fn2 == 7 and wt2 == 2 then + st:add(rf.sc_payload, val2) + payload_str = val2 + end + end) + + elseif fn == 9 and wt == 2 then + rtype = "WebSocketConnect" + local st = rec_t:add(usp_record_proto, "WebSocketConnectRecord") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then st:add(rf.ws_topic, val2) end + end) + + elseif fn == 10 and wt == 2 then + rtype = "MQTTConnect" + local st = rec_t:add(usp_record_proto, "MQTTConnectRecord") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then st:add(rf.mqtt_version, val2) + elseif fn2 == 2 and wt2 == 2 then st:add(rf.mqtt_topic, val2) + end + end) + + elseif fn == 11 and wt == 2 then + rtype = "STOMPConnect" + local st = rec_t:add(usp_record_proto, "STOMPConnectRecord") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 2 then st:add(rf.stomp_dest, val2) + elseif fn2 == 2 and wt2 == 2 then st:add(rf.stomp_version, val2) + end + end) + + elseif fn == 12 and wt == 2 then + rtype = "UDSConnect" + rec_t:add(usp_record_proto, "UDSConnectRecord") + + elseif fn == 13 and wt == 2 then + rtype = "Disconnect" + local st = rec_t:add(usp_record_proto, "DisconnectRecord") + iter_fields(val, function(fn2, wt2, val2) + if fn2 == 1 and wt2 == 5 then st:add(rf.disc_reason_code, val2) + elseif fn2 == 2 and wt2 == 2 then st:add(rf.disc_reason, val2) + end + end) + end + end) + + rec_t:add(rf.record_type, rtype) + local info = "USP [" .. rtype .. "]" + + if payload_str and #payload_str > 0 then + local ok, label = pcall(dissect_usp_msg, payload_str, rec_t) + if ok and label then + info = "USP [" .. rtype .. "] " .. label + end + end + + rec_t:set_text("USP Record [" .. rtype .. "]") + pinfo.cols.info:set(info) + return tvb:len() +end + +----------------------------------------------------------------------- +-- MQTT payload hookup via post-dissector +-- Field name is "mqtt.msg" (the PUBLISH payload field in Wireshark's MQTT dissector) +----------------------------------------------------------------------- + +local f_mqtt_payload = Field.new("mqtt.msg") + +local post_proto = Proto("usp_postdissector", "USP MQTT Hookup") +function post_proto.dissector(tvb, pinfo, tree) + local fis = {f_mqtt_payload()} + if #fis == 0 then return end + + -- Copy bytes into a fresh standalone Tvb. + -- When MQTT runs over TLS the field range lives in the inner decrypted + -- TVB; passing that range directly to tree:add() causes a cross-TVB + -- error, so we must materialise it into its own Tvb first. + local ba = fis[1].range:bytes() + if ba:len() < 2 then return end + + -- Heuristic: first byte must be a valid protobuf tag (fields 1-16, wire 0 or 2). + local b0 = ba:get_index(0) + local wt = bit.band(b0, 0x7) + local fn0 = bit.rshift(b0, 3) + if (wt ~= 0 and wt ~= 2) or fn0 < 1 or fn0 > 16 then return end + + local payload_tvb = ba:tvb("USP Record") + pcall(function() + usp_record_proto.dissector(payload_tvb, pinfo, tree) + end) +end + +register_postdissector(post_proto) \ No newline at end of file diff --git a/dissectors/veilid/LICENSE b/dissectors/veilid/LICENSE new file mode 100644 index 0000000..d0a1fa1 --- /dev/null +++ b/dissectors/veilid/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at https://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/dissectors/veilid/README.md b/dissectors/veilid/README.md new file mode 100644 index 0000000..eedc026 --- /dev/null +++ b/dissectors/veilid/README.md @@ -0,0 +1,39 @@ +# Veilid + +Dissecteur Wireshark en Lua pur pour le protocole pair-à-pair [Veilid](https://veilid.com) +(issue #49). Il couvre les enveloppes (ENV0/ENV1), les reçus (RCP0), les +trames VLD0/VLD1, le réassemblage des fragments sur UDP, TCP et WebSocket, et +le déchiffrement optionnel des opérations (ChaCha20) à partir d'un fichier de +secrets partagés. + +## Import + +| | | +|---|---| +| Dépôt amont | https://gitlab.com/SuperTeece/veilid-wireshark-dissector | +| Note | Le dépôt cité dans l'issue (`gitlab.com/veilid/veilid-wireshark-dissector`) renvoie 404. Celui-ci est le dépôt de son auteur, retenu sur décision de Mathilde (01/11/2026). | +| Commit importé | `a0a4eb3734df36d78969e831c2b8f4ad00e1930f` du 06/08/2026 | +| Licence amont | MPL-2.0 (`LICENSE` amont, en-tête `SPDX-License-Identifier: MPL-2.0` dans chaque fichier) | +| Natif Wireshark 4.6.4 | Non | + +Les fichiers sont repris sans modification ; seule une en-tête SPDX et de provenance a été ajoutée (convention #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/veilid.lua` | Point d'entrée : enregistrement du protocole, heuristiques UDP/TCP/WebSocket | +| `src/veilid/*.lua` | Modules : champs, enveloppes, reçus, réassemblage, déchiffrement, statistiques | +| `tools/veilid-secrets.py` | Extraction des secrets partagés depuis un nœud Veilid | +| `examples/*.pcap` | Captures de test de l'amont (une par type de trame, plus un cas de déchiffrement) | +| `examples/decrypt-secrets.txt` | Secrets de test qui vont avec `decrypt.pcap` | + +## Utilisation + +Lier ou copier `src/veilid.lua` **et** le dossier `src/veilid/` dans le dossier +des plugins Lua personnels (`~/.local/lib/wireshark/plugins/`). Pour le +déchiffrement, renseigner la préférence `veilid.secrets_file`. + +## Licence + +MPL-2.0, licence amont conservée. diff --git a/dissectors/veilid/examples/badsize.pcap b/dissectors/veilid/examples/badsize.pcap new file mode 100644 index 0000000..3578ac5 Binary files /dev/null and b/dissectors/veilid/examples/badsize.pcap differ diff --git a/dissectors/veilid/examples/decrypt-secrets.txt b/dissectors/veilid/examples/decrypt-secrets.txt new file mode 100644 index 0000000..2391d02 --- /dev/null +++ b/dissectors/veilid/examples/decrypt-secrets.txt @@ -0,0 +1,2 @@ +# generated by test/make_fixtures.py +VLD0 AAsWISw3Qk1YY255hI-apbC7xtHc5_L9CBMeKTQ_SlU 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f diff --git a/dissectors/veilid/examples/decrypt.pcap b/dissectors/veilid/examples/decrypt.pcap new file mode 100644 index 0000000..61895ed Binary files /dev/null and b/dissectors/veilid/examples/decrypt.pcap differ diff --git a/dissectors/veilid/examples/env0.pcap b/dissectors/veilid/examples/env0.pcap new file mode 100644 index 0000000..2d9e39f Binary files /dev/null and b/dissectors/veilid/examples/env0.pcap differ diff --git a/dissectors/veilid/examples/env1.pcap b/dissectors/veilid/examples/env1.pcap new file mode 100644 index 0000000..9838de7 Binary files /dev/null and b/dissectors/veilid/examples/env1.pcap differ diff --git a/dissectors/veilid/examples/rcp0.pcap b/dissectors/veilid/examples/rcp0.pcap new file mode 100644 index 0000000..49380b9 Binary files /dev/null and b/dissectors/veilid/examples/rcp0.pcap differ diff --git a/dissectors/veilid/examples/vld1.pcap b/dissectors/veilid/examples/vld1.pcap new file mode 100644 index 0000000..a0b8e89 Binary files /dev/null and b/dissectors/veilid/examples/vld1.pcap differ diff --git a/dissectors/veilid/examples/xyz0.pcap b/dissectors/veilid/examples/xyz0.pcap new file mode 100644 index 0000000..ffbed39 Binary files /dev/null and b/dissectors/veilid/examples/xyz0.pcap differ diff --git a/dissectors/veilid/src/veilid.lua b/dissectors/veilid/src/veilid.lua new file mode 100644 index 0000000..242f327 --- /dev/null +++ b/dissectors/veilid/src/veilid.lua @@ -0,0 +1,451 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Veilid protocol dissector for Wireshark. +-- +-- This is the ONLY file that registers anything. Everything under veilid/ is +-- a plain module that defines and returns a table; Wireshark auto-loads those +-- files too (it scans plugin subdirectories recursively), so they must stay +-- inert until required from here. See CLAUDE.md. +-- +-- Versioning rule: no file except veilid/versions.lua (and the registry +-- entries in envelope.lua / receipt.lua) may name a concrete version FourCC. +-- "ENV0"/"RCP0"/"VLD0" carry digits that veilid-core will increment. + +-- Resolve sibling modules relative to this script. Wireshark exposes no +-- script-path global, so derive it from the debug info of this chunk. +local script_path = debug.getinfo(1, "S").source:sub(2) +local script_dir = script_path:match("^(.*)[/\\][^/\\]*$") or "." +package.path = script_dir .. "/?.lua;" .. package.path + +local util = require "veilid.util" +local versions = require "veilid.versions" +local fields = require "veilid.fields" +local assembly = require "veilid.assembly" +local transport = require "veilid.transport" +local nodeid = require "veilid.nodeid" +local stats = require "veilid.stats" +local secrets = require "veilid.secrets" +local decrypt = require "veilid.decrypt" +-- These two exist to populate the version registry; nothing references their +-- return values. +require "veilid.envelope" -- registers the ENV0 layout +require "veilid.receipt" -- registers the RCP0 layout + +-------------------------------------------------------------------------------- +-- Protocol + fields +-------------------------------------------------------------------------------- + +local PROTO_FILTER_NAME = "veilid" + +local veilid = Proto(PROTO_FILTER_NAME, "Veilid") + +-- Zero-length UDP datagrams are Veilid NAT hole-punch probes, but Wireshark's +-- UDP dissector never calls a subdissector when the payload is empty, so a +-- port registration cannot see them. A narrowly-gated postdissector is the +-- only way to label them. It borrows the veilid.* field namespace and adds the +-- veilid protocol item itself, so `-Y veilid` and `-Y veilid.hole_punch` both +-- work on these frames. +local veilid_hp = Proto("veilid_holepunch", "Veilid Hole Punch") + +-- Wireshark binds a dissector table entry to a Proto, not to a bare function, +-- so each transport needs its own Proto object. They all add items using the +-- veilid.* field namespace and insert the `veilid` protocol item, so a single +-- `-Y veilid` filter still matches every transport. +local veilid_tcp = Proto("veilid_tcp", "Veilid over TCP") +local veilid_ws = Proto("veilid_ws", "Veilid over WebSocket") + +local f = fields.build() +veilid.fields = f +local e = fields.build_experts(PROTO_FILTER_NAME) +veilid.experts = e + +-------------------------------------------------------------------------------- +-- Preferences +-------------------------------------------------------------------------------- + +local DEFAULT_PORTS = "5150" + +veilid.prefs.udp_ports = Pref.range("UDP ports", DEFAULT_PORTS, + "UDP port range carrying Veilid traffic", 65535) +veilid.prefs.tcp_ports = Pref.range("TCP ports", DEFAULT_PORTS, + "TCP port range carrying Veilid traffic (raw TCP and WebSocket)", 65535) +veilid.prefs.heuristics = Pref.bool("Heuristic detection", true, + "Detect Veilid on ports outside the configured ranges. Heuristics only " + .. "claim a packet containing a readable message header, then pin the " + .. "conversation.") +veilid.prefs.network_key = Pref.string("Private network key (base64)", "", + "Shared secret for a private Veilid network. veilid-core XOR-masks the " + .. "nonce, sender ID and recipient ID with this key; leave empty for the " + .. "public network.") +veilid.prefs.self_node_id = Pref.string("Local node ID", "", + "Node ID of the capturing node, e.g. VLD0:. Used to label " + .. "traffic direction.") +veilid.prefs.secrets_file = Pref.string("Shared secrets file", "", + "Path to a file of pre-derived shared secrets produced by " + .. "tools/veilid-secrets.py. Enables decryption of envelope operations. " + .. "Lines: ") + +-------------------------------------------------------------------------------- +-- Dissector context +-------------------------------------------------------------------------------- + +-- Single table threaded through every module so they never reach for globals. +local ctx = { + proto = veilid, + fields = f, + experts = e, + network_key = nil, + self_node_id = nil, +} + +local registered_udp_ports = nil +local registered_tcp_ports = nil +local udp_port_ranges = {} + +--- Re-read preferences into the context. Called at init so a preference change +--- takes effect on the next redissection. +local function refresh_prefs() + udp_port_ranges = util.parse_ranges(veilid.prefs.udp_ports) + + local nk = veilid.prefs.network_key + if nk and nk ~= "" then + local bytes, err = util.base64url_decode(nk) + if bytes then + ctx.network_key = bytes + else + ctx.network_key = nil + report_failure("Veilid: could not decode the private network key: " .. tostring(err)) + end + else + ctx.network_key = nil + end + + local self_id = veilid.prefs.self_node_id + ctx.self_node_id = (self_id ~= "" ) and self_id or nil + + local path = veilid.prefs.secrets_file + local loaded, serr = secrets.load(path ~= "" and path or nil) + if serr then + report_failure("Veilid: shared secrets file: " .. serr) + end + ctx.secrets_loaded = loaded +end + +-------------------------------------------------------------------------------- +-- Message dispatch (transport-independent) +-------------------------------------------------------------------------------- + +--- Dissect one complete Veilid message. +-- +-- Only bytes 0x00..0x04 are version-independent, so this function reads the +-- FourCC, resolves a layout from the registry, and delegates. It deliberately +-- distinguishes three outcomes: not-Veilid (return 0), known family with an +-- unknown version (dissect the header, note, consume), and fully known. +-- +-- @param tvb tvb covering exactly one message +-- @param transport "UDP" | "TCP" | "WebSocket" +-- @return number bytes consumed (0 if this is not a Veilid message) +local function dissect_message(tvb, pinfo, tree, transport) + local len = tvb:len() + if len < versions.FOURCC_LEN then return 0 end + + local fourcc_range = tvb(0, versions.FOURCC_LEN) + local info = versions.classify(fourcc_range:raw()) + if not info then return 0 end + + local display_fourcc = util.printable_fourcc(info.fourcc) + + local subtree = tree:add(veilid, tvb()) + subtree:set_text(("Veilid %s (%s)"):format(info.family_name, display_fourcc)) + subtree:add(f.version, fourcc_range, display_fourcc) + subtree:add(f.family, fourcc_range, info.family):set_generated() + if info.version_num then + subtree:add(f.version_num, fourcc_range, info.version_num):set_generated() + end + if transport then + subtree:add(f.transport, fourcc_range, transport):set_generated() + end + + pinfo.cols.protocol = "Veilid" + + -- Known family, unknown version. Still Veilid; say so and move on rather + -- than reporting malformed bytes we simply do not understand yet. + if not info.layout then + subtree:append_text(" [unsupported version]") + subtree:add_proto_expert_info(e.unsupported_version, + ("%s is a recognized Veilid %s family FourCC but this dissector has no " + .. "layout for version %q"):format(display_fourcc, + info.family, info.version_char)) + if len > versions.FOURCC_LEN then + subtree:add(f.unsupported_body, tvb(versions.FOURCC_LEN)) + end + pinfo.cols.info:set(("%s (unsupported version, %d bytes)"):format(display_fourcc, len)) + return len + end + + local summary = info.layout.dissect(ctx, tvb, pinfo, subtree) + if summary then + summary.transport = transport + + -- Direction is only meaningful once we know which key is ours. + local self_id = ctx.self_node_id + if self_id then + local direction + if summary.sender == self_id then + direction = "outbound" + elseif summary.recipient == self_id then + direction = "inbound" + end + if direction then + subtree:add(f.direction, fourcc_range, direction):set_generated() + summary.direction = direction + end + end + + -- Accumulate once per message, not once per redissection. + if not pinfo.visited then + nodeid.observe(pinfo, summary) + end + + ctx.set_info_column(pinfo, summary) + end + return len +end + +--- Compose the info column for a dissected message. +function ctx.set_info_column(pinfo, s) + local parts = { s.version } + if s.sender and s.recipient then + parts[#parts + 1] = ("%s \u{2192} %s"):format( + util.short_key(s.sender), util.short_key(s.recipient)) + elseif s.sender then + -- Receipts name only a sender; they are addressed by the flow they + -- arrive on. + parts[#parts + 1] = ("from %s"):format(util.short_key(s.sender)) + end + if s.body_len and s.body_len > 0 then + parts[#parts + 1] = ("%d B ops"):format(s.body_len) + end + if s.extra_data_len and s.extra_data_len > 0 then + parts[#parts + 1] = ("%d B extra"):format(s.extra_data_len) + end + pinfo.cols.info:set(table.concat(parts, " ")) +end + +ctx.dissect_message = dissect_message + +-------------------------------------------------------------------------------- +-- UDP +-------------------------------------------------------------------------------- + +--- Dissect a Veilid UDP datagram. +-- @return number bytes consumed, 0 if this is not Veilid +local function dissect_udp(tvb, pinfo, tree) + local len = tvb:len() + + -- Zero-length datagrams are hole-punch probes. veilid-core sends these + -- deliberately and drops them silently on receipt, so they are valid + -- protocol traffic, not truncated packets. + -- Returning 0 here would tell Wireshark "not mine" and revert the columns, + -- so signal a full consume by returning nothing. + if len == 0 then + pinfo.cols.protocol = "Veilid" + pinfo.cols.info:set("NAT hole punch") + local t = tree:add(veilid, tvb()) + t:set_text("Veilid NAT Hole Punch") + t:add(f.hole_punch, tvb(0, 0), true):set_generated() + return + end + + local h = assembly.parse_header(tvb) + if not h then return 0 end + + local payload = tvb(assembly.HEADER_LEN) + + -- Decide whether this is ours BEFORE touching the tree. Rejecting after + -- adding items leaves a stray half-built framing subtree on packets that + -- then fall through to another dissector. + -- + -- Any fragment at offset 0 starts with the message FourCC, so it can be + -- checked directly. Later fragments carry no magic and are claimed on the + -- structural validity of the assembly header alone. + if h.offset == 0 and payload:len() >= versions.FOURCC_LEN then + if not versions.classify(payload(0, versions.FOURCC_LEN):raw()) then + return 0 + end + end + + if not pinfo.visited then assembly.count(h) end + assembly.add_header_tree(ctx, tvb, tree, h) + + if h.complete then + dissect_message(payload, pinfo, tree, "UDP") + return len + end + + -- Fragment: accumulate on the first pass only, then render from the cache so + -- redissection is stable. + pinfo.cols.protocol = "Veilid" + + local conflict = false + if not pinfo.visited then + _, conflict = assembly.accumulate(pinfo, h, payload:raw()) + end + + local result = assembly.result_for(pinfo.number) + local frag = assembly.fragment_info(pinfo.number) + + if conflict then + tree:add_proto_expert_info(e.fragment_conflict, + ("two fragments at offset %d of sequence %d carry different bytes") + :format(h.offset, h.seq)) + end + + if result then + -- This frame carried the last missing bytes: reassemble and dissect. + assembly.add_reassembly_tree(ctx, tree, result, tvb) + local reassembled = ByteArray.new(result.data, true):tvb("Reassembled Veilid Message") + dissect_message(reassembled, pinfo, tree, "UDP") + pinfo.cols.info:prepend(("[%d frags] "):format(#result.frames)) + return len + end + + local desc = ("Message fragment %d-%d of %d (seq %d)") + :format(h.offset, h.offset + h.payload_len - 1, h.total, h.seq) + if frag then + tree:add(f.asm_reassembled_in, tvb(0, 0), frag.reassembled_in):set_generated() + desc = desc .. (" [reassembled in frame %d]"):format(frag.reassembled_in) + elseif pinfo.visited then + -- Only meaningful on a redissection: during the initial forward pass the + -- completing fragment simply has not been read yet, so "incomplete" would + -- be a false alarm on every non-final fragment. By the time a frame is + -- revisited the whole file has been indexed, and a still-missing + -- reassembly is genuinely missing. + tree:add_proto_expert_info(e.fragment_incomplete, + ("no frame in this capture completes sequence %d"):format(h.seq)) + desc = desc .. " [never reassembled]" + else + desc = desc .. " [reassembly pending]" + end + pinfo.cols.info:set(desc) + return len +end + +veilid.dissector = function(tvb, pinfo, tree) + return dissect_udp(tvb, pinfo, tree) +end + +veilid_tcp.dissector = function(tvb, pinfo, tree) + return transport.dissect_tcp(ctx, tvb, pinfo, tree) +end + +veilid_ws.dissector = function(tvb, pinfo, tree) + return transport.dissect_ws(ctx, tvb, pinfo, tree) +end + +-------------------------------------------------------------------------------- +-- Hole-punch postdissector +-------------------------------------------------------------------------------- + +local fe_udp_length = Field.new("udp.length") +local fe_udp_srcport = Field.new("udp.srcport") +local fe_udp_dstport = Field.new("udp.dstport") + +-- A UDP header is 8 bytes, so udp.length == 8 means a zero-byte payload. +local UDP_HEADER_LEN = 8 + +function veilid_hp.dissector(tvb, pinfo, tree) + local ulen = fe_udp_length() + if not ulen or ulen.value ~= UDP_HEADER_LEN then return end + + local sp, dp = fe_udp_srcport(), fe_udp_dstport() + local sport = sp and sp.value + local dport = dp and dp.value + if not (util.in_ranges(udp_port_ranges, sport) or util.in_ranges(udp_port_ranges, dport)) then + return + end + + pinfo.cols.protocol = "Veilid" + pinfo.cols.info:set("NAT hole punch") + local t = tree:add(veilid, tvb(0, 0)) + t:set_text("Veilid NAT Hole Punch") + t:add(f.hole_punch, tvb(0, 0), true):set_generated() +end + +-------------------------------------------------------------------------------- +-- Registration +-------------------------------------------------------------------------------- + +function veilid.init() + refresh_prefs() + assembly.reset() + nodeid.reset() + decrypt.reset() +end + +ctx.decrypt_body = decrypt.decrypt_body + +--- Bind the configured port ranges, replacing any previous binding. +local function apply_port_prefs() + local udp_table = DissectorTable.get("udp.port") + if registered_udp_ports then + udp_table:remove(registered_udp_ports, veilid) + end + registered_udp_ports = veilid.prefs.udp_ports + udp_table:add(registered_udp_ports, veilid) + + local tcp_table = DissectorTable.get("tcp.port") + local ws_table = DissectorTable.get("ws.port") + if registered_tcp_ports then + tcp_table:remove(registered_tcp_ports, veilid_tcp) + ws_table:remove(registered_tcp_ports, veilid_ws) + end + registered_tcp_ports = veilid.prefs.tcp_ports + tcp_table:add(registered_tcp_ports, veilid_tcp) + -- ws.port is keyed on the underlying TCP port, so Veilid's WebSocket + -- transport shares the TCP range. + ws_table:add(registered_tcp_ports, veilid_ws) +end + +function veilid.prefs_changed() + refresh_prefs() + apply_port_prefs() +end + +-------------------------------------------------------------------------------- +-- Heuristics +-------------------------------------------------------------------------------- + +-- Gated on the preference so a user seeing a false positive can switch them +-- off without losing port-based decoding. +veilid:register_heuristic("udp", function(tvb, pinfo, tree) + if not veilid.prefs.heuristics then return false end + return transport.heuristic_udp(ctx, veilid, tvb, pinfo, tree) +end) + +veilid_tcp:register_heuristic("tcp", function(tvb, pinfo, tree) + if not veilid.prefs.heuristics then return false end + return transport.heuristic_tcp(ctx, veilid_tcp, tvb, pinfo, tree) +end) + +veilid_ws:register_heuristic("ws", function(tvb, pinfo, tree) + if not veilid.prefs.heuristics then return false end + return transport.heuristic_ws(ctx, veilid_ws, tvb, pinfo, tree) +end) + +-- Allow manual "Decode As ..." for captures on unusual ports. +DissectorTable.get("udp.port"):add_for_decode_as(veilid) +DissectorTable.get("tcp.port"):add_for_decode_as(veilid_tcp) + +refresh_prefs() +apply_port_prefs() +register_postdissector(veilid_hp) +stats.register(ctx, nodeid, assembly) diff --git a/dissectors/veilid/src/veilid/assembly.lua b/dissectors/veilid/src/veilid/assembly.lua new file mode 100644 index 0000000..32a352b --- /dev/null +++ b/dissectors/veilid/src/veilid/assembly.lua @@ -0,0 +1,257 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/assembly.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Veilid UDP framing: the veilid-tools AssemblyBuffer header. +-- +-- Every Veilid UDP datagram carries an 8-byte big-endian header before the +-- message. A datagram is a complete message iff offset == 0 and length equals +-- the payload size; otherwise it is one fragment of a larger message. +-- +-- 0x00 u8 version (VERSION_1 = 1) +-- 0x01 u8 reserved (0) +-- 0x02 u16 seq per-peer message sequence +-- 0x04 u16 offset this fragment's offset into the message +-- 0x06 u16 length TOTAL assembled message length +-- +-- Fragment payloads are 1272 bytes (1280 - 8). Zero-length datagrams are NAT +-- hole-punch probes, not errors. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +if not package.searchpath("veilid.util", package.path) then return {} end + +local M = {} + +M.HEADER_LEN = 8 +M.VERSION_1 = 1 +M.FRAGMENT_PAYLOAD_LEN = 1272 + +local OFF_VERSION = 0x00 +local OFF_FLAGS = 0x01 +local OFF_SEQ = 0x02 +local OFF_OFFSET = 0x04 +local OFF_TOTAL = 0x06 + +--- Parse and structurally validate the assembly header. +-- Pure: takes a tvb, touches no dissection state, so heuristics can call it +-- cheaply before deciding whether to claim a packet. +-- @return table|nil header, string|nil reason +function M.parse_header(tvb) + local len = tvb:len() + if len < M.HEADER_LEN then return nil, "shorter than the 8-byte assembly header" end + + local h = { + version = tvb(OFF_VERSION, 1):uint(), + flags = tvb(OFF_FLAGS, 1):uint(), + seq = tvb(OFF_SEQ, 2):uint(), + offset = tvb(OFF_OFFSET, 2):uint(), + total = tvb(OFF_TOTAL, 2):uint(), + } + h.payload_len = len - M.HEADER_LEN + + if h.version ~= M.VERSION_1 then + return nil, ("unsupported assembly version %d"):format(h.version) + end + if h.flags ~= 0 then + return nil, ("reserved assembly byte is %#04x, expected 0"):format(h.flags) + end + if h.payload_len == 0 then + return nil, "assembly header with no payload" + end + if h.offset + h.payload_len > h.total then + return nil, ("fragment [%d,%d) overruns the declared total of %d") + :format(h.offset, h.offset + h.payload_len, h.total) + end + + h.complete = (h.offset == 0 and h.payload_len == h.total) + return h +end + +--- Add the assembly header to the tree. +function M.add_header_tree(ctx, tvb, tree, h) + local f = ctx.fields + local sub = tree:add(ctx.proto, tvb(0, M.HEADER_LEN)) + sub:set_text(("Veilid UDP Framing (seq %d, %s)"):format( + h.seq, + h.complete and "complete" + or ("fragment %d-%d of %d"):format(h.offset, h.offset + h.payload_len - 1, h.total))) + + sub:add(f.asm_version, tvb(OFF_VERSION, 1)) + sub:add(f.asm_flags, tvb(OFF_FLAGS, 1)) + sub:add(f.asm_seq, tvb(OFF_SEQ, 2)) + sub:add(f.asm_offset, tvb(OFF_OFFSET, 2)) + sub:add(f.asm_total_len, tvb(OFF_TOTAL, 2)) + sub:add(f.asm_frag_len, tvb(OFF_OFFSET, 2), h.payload_len):set_generated() + sub:add(f.asm_fragmented, tvb(0, M.HEADER_LEN), not h.complete):set_generated() + + return sub +end + +-------------------------------------------------------------------------------- +-- Reassembly +-------------------------------------------------------------------------------- +-- +-- Wireshark's Lua bindings expose no fragment-table API, so reassembly is done +-- by hand. Two rules keep this stable under Wireshark's non-linear access +-- patterns (clicking around, filtering, two-pass tshark): +-- +-- 1. Accumulate ONLY when pinfo.visited is false, so a frame is never +-- counted twice. +-- 2. Cache the finished result keyed by the frame that completed it, so +-- every later redissection renders identically without re-accumulating. +-- +-- All state is cleared from proto.init (i.e. on every reload/refilter). + +-- key -> { total, chunks = {offset -> bytes}, order = {offsets}, frames = {} } +local pending = {} +-- completing frame number -> { data, frames, total } +local results = {} +-- any fragment frame number -> { reassembled_in, index, count } +local frag_index = {} + +local counters + +function M.reset() + pending = {} + results = {} + frag_index = {} + counters = { + datagrams = 0, complete = 0, fragments = 0, + reassembled = 0, conflicts = 0, + } +end + +M.reset() + +--- Count a datagram. Call once per datagram, on the first pass only. +function M.count(h) + counters.datagrams = counters.datagrams + 1 + if h.complete then + counters.complete = counters.complete + 1 + else + counters.fragments = counters.fragments + 1 + end +end + +--- Snapshot for the stats tap. `incomplete` is derived at read time from +-- whatever is still sitting in the pending table. +function M.stats() + local s = {} + for k, v in pairs(counters) do s[k] = v end + s.incomplete = M.pending_count() + return s +end + +local function flow_key(pinfo, seq) + return ("%s:%d>%s:%d#%d"):format( + tostring(pinfo.src), pinfo.src_port, tostring(pinfo.dst), pinfo.dst_port, seq) +end + +--- Walk the collected chunks from offset 0 and return the assembled message, +-- or nil if there is a gap. Verifying contiguity explicitly is stricter than +-- summing lengths -- overlapping fragments could otherwise sum to `total` +-- while leaving a hole. +local function try_assemble(st) + local parts, off = {}, 0 + while off < st.total do + local chunk = st.chunks[off] + if not chunk then return nil end + parts[#parts + 1] = chunk + off = off + #chunk + end + if off ~= st.total then return nil end + return table.concat(parts) +end + +--- Feed one fragment into the reassembler. +-- @return table|nil result { data, frames, total } when this frame completes a +-- message, plus a boolean indicating a conflicting overlap +function M.accumulate(pinfo, h, payload_bytes) + local key = flow_key(pinfo, h.seq) + local conflict = false + + local st = pending[key] + -- A different total under the same key means the sequence number was reused + -- for a new message; start over rather than blending two messages. + if st and st.total ~= h.total then + st = nil + end + if not st then + st = { total = h.total, chunks = {}, frames = {} } + pending[key] = st + end + + local existing = st.chunks[h.offset] + if existing then + if existing ~= payload_bytes then + counters.conflicts = counters.conflicts + 1 + -- Same offset, different bytes: treat as the start of a new message + -- reusing this sequence number. + conflict = true + st = { total = h.total, chunks = {}, frames = {} } + pending[key] = st + end + end + + if not st.chunks[h.offset] then + st.chunks[h.offset] = payload_bytes + st.frames[#st.frames + 1] = pinfo.number + end + + local data = try_assemble(st) + if not data then return nil, conflict end + + pending[key] = nil + counters.reassembled = counters.reassembled + 1 + local result = { data = data, frames = st.frames, total = st.total } + results[pinfo.number] = result + for i, frame in ipairs(st.frames) do + frag_index[frame] = { + reassembled_in = pinfo.number, + index = i, + count = #st.frames, + } + end + return result, conflict +end + +--- Result cached for the frame that completed a message, if any. +function M.result_for(frame_number) + return results[frame_number] +end + +--- Position of a frame within its message, once known. +function M.fragment_info(frame_number) + return frag_index[frame_number] +end + +--- Add the "reassembled from" list to the completing frame's tree. +function M.add_reassembly_tree(ctx, tree, result, tvb) + local f = ctx.fields + local sub = tree:add(ctx.proto, tvb(0, 0)) + sub:set_text(("Reassembled Veilid Message (%d bytes from %d fragments)") + :format(result.total, #result.frames)) + sub:set_generated() + for _, frame in ipairs(result.frames) do + sub:add(f.asm_fragment, tvb(0, 0), frame):set_generated() + end + sub:add(f.asm_fragment_count, tvb(0, 0), #result.frames):set_generated() + sub:add(f.asm_reassembled_len, tvb(0, 0), result.total):set_generated() + return sub +end + +--- Number of messages still awaiting fragments (never completed in capture). +function M.pending_count() + local n = 0 + for _ in pairs(pending) do n = n + 1 end + return n +end + +return M diff --git a/dissectors/veilid/src/veilid/chacha.lua b/dissectors/veilid/src/veilid/chacha.lua new file mode 100644 index 0000000..b7e4ff8 --- /dev/null +++ b/dissectors/veilid/src/veilid/chacha.lua @@ -0,0 +1,203 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/chacha.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- XChaCha20 keystream, pure Lua 5.4. +-- +-- Veilid encrypts the envelope operations body with +-- ::new(&shared_secret, &nonce).apply_keystream(body) +-- (crypto_system/vld0/mod.rs). That is the raw stream cipher, NOT the AEAD: +-- unauthenticated, no tag, no padding, and the block counter starts at 0. +-- So plaintext length == ciphertext length and decryption is a plain XOR +-- against the keystream. +-- +-- Wireshark's Lua has no crypto bindings, but XChaCha20 is only 32-bit adds, +-- XORs and rotates -- which Lua 5.4 has natively. The X25519 + BLAKE3 half of +-- the key agreement is NOT feasible here; that happens out of band in +-- tools/veilid-secrets.py, which hands us the finished shared secret. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +local M = {} + +local MASK = 0xFFFFFFFF + +-- "expand 32-byte k" +local C0, C1, C2, C3 = 0x61707865, 0x3320646e, 0x79622d32, 0x6b206574 + +local function rotl32(x, n) + x = x & MASK + return ((x << n) | (x >> (32 - n))) & MASK +end + +--- Read `n` little-endian 32-bit words starting at 1-based byte index `off`. +local function le_words(s, off, n) + local w = {} + for i = 0, n - 1 do + local a, b, c, d = s:byte(off + i * 4, off + i * 4 + 3) + w[i + 1] = (a | (b << 8) | (c << 16) | (d << 24)) & MASK + end + return w +end + +--- 20 rounds (10 column/diagonal double rounds) over a 16-word state, in place. +local function rounds20(s) + for _ = 1, 10 do + -- column rounds + local a, b, c, d + a, b, c, d = 1, 5, 9, 13 + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 16) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 12) + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 8) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 7) + a, b, c, d = 2, 6, 10, 14 + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 16) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 12) + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 8) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 7) + a, b, c, d = 3, 7, 11, 15 + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 16) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 12) + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 8) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 7) + a, b, c, d = 4, 8, 12, 16 + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 16) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 12) + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 8) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 7) + -- diagonal rounds + a, b, c, d = 1, 6, 11, 16 + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 16) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 12) + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 8) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 7) + a, b, c, d = 2, 7, 12, 13 + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 16) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 12) + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 8) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 7) + a, b, c, d = 3, 8, 9, 14 + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 16) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 12) + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 8) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 7) + a, b, c, d = 4, 5, 10, 15 + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 16) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 12) + s[a] = (s[a] + s[b]) & MASK; s[d] = rotl32(s[d] ~ s[a], 8) + s[c] = (s[c] + s[d]) & MASK; s[b] = rotl32(s[b] ~ s[c], 7) + end +end + +--- HChaCha20 key derivation. +-- @param key 32 raw bytes +-- @param nonce16 16 raw bytes +-- @return 32 raw bytes of subkey +function M.hchacha20(key, nonce16) + assert(#key == 32, "hchacha20 key must be 32 bytes") + assert(#nonce16 == 16, "hchacha20 nonce must be 16 bytes") + + local k = le_words(key, 1, 8) + local n = le_words(nonce16, 1, 4) + local s = { + C0, C1, C2, C3, + k[1], k[2], k[3], k[4], k[5], k[6], k[7], k[8], + n[1], n[2], n[3], n[4], + } + + rounds20(s) + + -- HChaCha20 output is words 0..3 and 12..15 WITHOUT the feed-forward add + -- that the ChaCha20 block function performs. + local out = {} + local idx = 0 + for _, i in ipairs { 1, 2, 3, 4, 13, 14, 15, 16 } do + local w = s[i] + out[idx + 1] = string.char(w & 0xFF, (w >> 8) & 0xFF, (w >> 16) & 0xFF, (w >> 24) & 0xFF) + idx = idx + 1 + end + return table.concat(out) +end + +--- Generate one 64-byte ChaCha20 keystream block into `dst` as 4-byte strings. +local function chacha20_block(k, n, counter, dst) + local s = { + C0, C1, C2, C3, + k[1], k[2], k[3], k[4], k[5], k[6], k[7], k[8], + counter & MASK, n[1], n[2], n[3], + } + local init = { table.unpack(s) } + rounds20(s) + for i = 1, 16 do + local w = (s[i] + init[i]) & MASK + dst[i] = string.char(w & 0xFF, (w >> 8) & 0xFF, (w >> 16) & 0xFF, (w >> 24) & 0xFF) + end +end + +--- XOR `data` with the ChaCha20 keystream (RFC 8439, 12-byte nonce). +-- +-- Symmetric: the same call encrypts and decrypts. +-- @param key 32 raw bytes +-- @param nonce12 12 raw bytes +-- @param data raw bytes +-- @param counter0 starting block counter (RFC 8439 AEAD uses 1; the bare +-- stream cipher, and therefore Veilid, uses 0) +-- @return raw bytes of the same length +function M.chacha20_xor(key, nonce12, data, counter0) + assert(#key == 32, "chacha20 key must be 32 bytes") + assert(#nonce12 == 12, "chacha20 nonce must be 12 bytes") + + local k = le_words(key, 1, 8) + local n = le_words(nonce12, 1, 3) + + local counter = counter0 or 0 + local out = {} + local block = {} + local len = #data + local pos = 1 + + while pos <= len do + chacha20_block(k, n, counter, block) + local ks = table.concat(block) + local chunk_len = math.min(64, len - pos + 1) + local chunk = data:sub(pos, pos + chunk_len - 1) + local piece = {} + for i = 1, chunk_len do + piece[i] = string.char(chunk:byte(i) ~ ks:byte(i)) + end + out[#out + 1] = table.concat(piece) + pos = pos + chunk_len + counter = counter + 1 + end + + return table.concat(out) +end + +--- XOR `data` with the XChaCha20 keystream. +-- +-- Symmetric: the same call encrypts and decrypts. This is the entry point the +-- dissector uses -- Veilid's envelope body is exactly this construction. +-- @param key 32 raw bytes (the Veilid shared secret) +-- @param nonce24 24 raw bytes (the envelope nonce) +-- @param data raw bytes +-- @param counter0 optional starting block counter; defaults to 0, matching +-- RustCrypto's XChaCha20 stream cipher as used by veilid-core +-- @return raw bytes of the same length +function M.xchacha20_xor(key, nonce24, data, counter0) + assert(#key == 32, "xchacha20 key must be 32 bytes") + assert(#nonce24 == 24, "xchacha20 nonce must be 24 bytes") + + -- Derive a subkey from the first 16 nonce bytes, then run ChaCha20 with a + -- 12-byte nonce of four zero bytes followed by the remaining 8. + local subkey = M.hchacha20(key, nonce24:sub(1, 16)) + local chacha_nonce = "\0\0\0\0" .. nonce24:sub(17, 24) + return M.chacha20_xor(subkey, chacha_nonce, data, counter0 or 0) +end + +return M diff --git a/dissectors/veilid/src/veilid/decrypt.lua b/dissectors/veilid/src/veilid/decrypt.lua new file mode 100644 index 0000000..15c1da1 --- /dev/null +++ b/dissectors/veilid/src/veilid/decrypt.lua @@ -0,0 +1,99 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/decrypt.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Envelope body decryption. +-- +-- Installed as ctx.decrypt_body and called by a version's dissect function +-- once it has located the encrypted operations. Silent when no secret is +-- available -- most users have no keys, and an expert warning on every packet +-- would be noise rather than information. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +if not package.searchpath("veilid.util", package.path) then return {} end + +local chacha = require "veilid.chacha" +local secrets = require "veilid.secrets" + +local M = {} + +-- frame number -> plaintext, so scrolling around in the GUI does not redo the +-- keystream. Cleared per capture from proto.init. +local cache = {} + +function M.reset() + cache = {} +end + +--- Attempt to decrypt an envelope body and attach the result to the tree. +-- @param ctx dissector context +-- @param a table { tree, pinfo, body (TvbRange), nonce, crypto, crypto_kind, +-- sender, recipient } +function M.decrypt_body(ctx, a) + local crypto = a.crypto + if not crypto then return end + + -- The cipher comes from the crypto-kind registry, never assumed. An + -- unrecognized kind means we genuinely do not know how the body is + -- protected, so leave it alone. + if crypto.cipher == "none" then + a.tree:append_text(" [crypto kind declares no encryption]") + return + end + if crypto.cipher ~= "xchacha20" then return end + + local plaintext = cache[a.pinfo.number] + local matched + + if not plaintext then + local secret + secret, matched = secrets.lookup(a.crypto_kind, a.sender, a.recipient) + if not secret then return end + + if #secret ~= crypto.shared_secret_len then + a.tree:append_text((" [shared secret is %d bytes, %s expects %d]") + :format(#secret, a.crypto_kind, crypto.shared_secret_len)) + return + end + if #a.nonce ~= crypto.nonce_len then + a.tree:append_text((" [nonce is %d bytes, %s expects %d]") + :format(#a.nonce, a.crypto_kind, crypto.nonce_len)) + return + end + + local ok, result = pcall(chacha.xchacha20_xor, secret, a.nonce, a.body:raw()) + if not ok then + a.tree:append_text(" [decryption failed: " .. tostring(result) .. "]") + return + end + plaintext = result + if not a.pinfo.visited then cache[a.pinfo.number] = plaintext end + end + + -- The stream cipher is unauthenticated, so a wrong key yields plausible + -- garbage rather than an error. Say so instead of implying the plaintext is + -- trustworthy: the envelope's Ed25519 signature is what actually + -- authenticates this data, and we cannot verify it here. + local sub = a.tree:add(ctx.proto, a.body) + sub:set_text(("Decrypted Operations (%d bytes, unauthenticated)"):format(#plaintext)) + sub:set_generated() + + local ptvb = ByteArray.new(plaintext, true):tvb("Decrypted Veilid Operations") + sub:add(ctx.fields.operations, ptvb(0, #plaintext)) + sub:add(ctx.fields.decrypted, a.body, true):set_generated() + if matched then + sub:append_text((" using the secret for %s"):format(matched)) + end + + -- The plaintext is a Cap'n Proto `Operation` (proto/veilid.capnp). Decoding + -- it is out of scope here; the bytes are exposed for external tooling. +end + +return M diff --git a/dissectors/veilid/src/veilid/envelope.lua b/dissectors/veilid/src/veilid/envelope.lua new file mode 100644 index 0000000..899aaba --- /dev/null +++ b/dissectors/veilid/src/veilid/envelope.lua @@ -0,0 +1,223 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/envelope.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Envelope family (FourCC prefix "ENV"). +-- +-- Registers the ENV0 layout into the version registry. Nothing outside this +-- file's registry entry knows the string "ENV0"; dispatch happens generically +-- in versions.classify(). To add ENV1, add a second register_envelope() call +-- with its own dissect function -- do not branch inside this one. +-- +-- The only load-time effect is that registry insertion, which is the module's +-- entire purpose and is reached only when required through veilid.lua (the +-- guard below short-circuits Wireshark's standalone auto-load pass). + +if not package.searchpath("veilid.util", package.path) then return {} end + +local util = require "veilid.util" +local versions = require "veilid.versions" + +local M = {} + +-- veilid-core crypto/envelope/mod.rs. Only offset 0x00..0x04 is shared with +-- other versions; everything below belongs to ENV0 specifically. +local ENV0 = { + OFF_CRYPTO_KIND = 0x04, + OFF_SIZE = 0x08, + OFF_TIMESTAMP = 0x0A, + OFF_NONCE = 0x12, + OFF_SENDER = 0x2A, + OFF_RECIPIENT = 0x4A, + OFF_BODY = 0x6A, + NONCE_LEN = 24, -- ENV0_NONCE_LENGTH + KEY_LEN = 32, -- HASH_COORDINATE_LENGTH + SIG_LEN = 64, -- ENV0_SIGNATURE_LENGTH +} + +-- Messages older than this are dropped by veilid-core as replays. +local REPLAY_WINDOW_SECS = 10.0 + +--- Read a typed key, applying the private-network mask if one is configured. +-- Returns raw bytes plus the "VLD0:" display form. +local function typed_key(ctx, raw, crypto_fourcc) + local masked, shortfall = raw, 0 + if ctx.network_key and #ctx.network_key > 0 then + masked, shortfall = util.xor_prefix(raw, ctx.network_key) + end + return masked, crypto_fourcc .. ":" .. util.base64url(masked), shortfall +end + +--- Dissect an ENV0 message. +-- @param ctx dissector context (fields, experts, prefs, helpers) +-- @param tvb tvb covering exactly one whole message +-- @param pinfo +-- @param tree the message subtree +-- @return table summary for the info column / taps, or nil on hard failure +local function dissect_env0(ctx, tvb, pinfo, tree) + local f, e = ctx.fields, ctx.experts + local len = tvb:len() + + local min_size = ENV0.OFF_BODY + ENV0.SIG_LEN -- ENV0_MIN_ENVELOPE_SIZE = 170 + if len < min_size then + tree:add_proto_expert_info(e.too_small, + ("ENV0 envelope is %d bytes, minimum is %d"):format(len, min_size)) + return nil + end + + local summary = { family = "ENV", version = "ENV0" } + + -- Crypto kind ------------------------------------------------------------ + local ck_range = tvb(ENV0.OFF_CRYPTO_KIND, versions.FOURCC_LEN) + local ck_fourcc = ck_range:raw() + local ck_display = util.printable_fourcc(ck_fourcc) + local crypto = versions.lookup_crypto(ck_fourcc) + local ck_item = tree:add(f.crypto_kind, ck_range, ck_display) + if crypto then + ck_item:append_text(" (" .. crypto.description .. ")") + else + ck_item:add_proto_expert_info(e.unknown_crypto_kind, + ("Unknown crypto kind %q; key material shown raw"):format(ck_display)) + end + summary.crypto_kind = ck_display + + -- Size ------------------------------------------------------------------- + local size = tvb(ENV0.OFF_SIZE, 2):le_uint() + local size_item = tree:add_le(f.size, tvb(ENV0.OFF_SIZE, 2)) + if size ~= len then + size_item:add_proto_expert_info(e.size_mismatch, + ("size field is %d but the message is %d bytes"):format(size, len)) + end + summary.size = size + + -- Timestamp -------------------------------------------------------------- + -- u64 LE microseconds since the UNIX epoch; NSTime wants (secs, nsecs). + local ts_range = tvb(ENV0.OFF_TIMESTAMP, 8) + local ts_us = util.u64_exact(ts_range:le_uint64()) + local ts_secs = ts_us // 1000000 + local ts_nsecs = (ts_us % 1000000) * 1000 + tree:add(f.timestamp, ts_range, NSTime.new(ts_secs, ts_nsecs)) + + local capture_secs = pinfo.abs_ts + local skew = (ts_us / 1e6) - capture_secs + local skew_item = tree:add(f.skew, ts_range, skew) + skew_item:set_generated() + skew_item:set_text(("Clock skew vs capture: %+.6f s"):format(skew)) + if math.abs(skew) > REPLAY_WINDOW_SECS then + skew_item:add_proto_expert_info(e.stale, + ("envelope timestamp is %.3f s from the capture time; veilid-core drops " + .. "envelopes older than %d s"):format(skew, REPLAY_WINDOW_SECS)) + end + summary.skew = skew + summary.timestamp_us = ts_us + + -- Nonce ------------------------------------------------------------------ + local nonce_range = tvb(ENV0.OFF_NONCE, ENV0.NONCE_LEN) + local nonce_raw = nonce_range:raw() + local nonce_shortfall = 0 + if ctx.network_key and #ctx.network_key > 0 then + nonce_raw, nonce_shortfall = util.xor_prefix(nonce_raw, ctx.network_key) + end + local nonce_item = tree:add(f.nonce, nonce_range, nonce_raw) + if ctx.network_key and #ctx.network_key > 0 then + nonce_item:append_text(" (network key applied)") + end + summary.nonce = nonce_raw + + -- Sender / recipient ----------------------------------------------------- + local sender_range = tvb(ENV0.OFF_SENDER, ENV0.KEY_LEN) + local recipient_range = tvb(ENV0.OFF_RECIPIENT, ENV0.KEY_LEN) + + local sender_raw, sender_str, sk_short = typed_key(ctx, sender_range:raw(), ck_display) + local recipient_raw, recipient_str, rk_short = typed_key(ctx, recipient_range:raw(), ck_display) + + tree:add(f.sender, sender_range, sender_raw) + local si = tree:add(f.sender_str, sender_range, sender_str) + si:set_generated() + tree:add(f.recipient, recipient_range, recipient_raw) + local ri = tree:add(f.recipient_str, recipient_range, recipient_str) + ri:set_generated() + + -- One `veilid.node` entry per endpoint so a single filter catches both + -- directions of a peer's traffic. + tree:add(f.node, sender_range, sender_str):set_generated() + tree:add(f.node, recipient_range, recipient_str):set_generated() + + if math.max(sk_short, rk_short, nonce_shortfall) > 0 then + tree:add_proto_expert_info(e.network_key_short, + ("network key is %d bytes; %d bytes of masked fields left unmasked") + :format(#ctx.network_key, math.max(sk_short, rk_short, nonce_shortfall))) + end + + if sender_raw == recipient_raw then + tree:add_proto_expert_info(e.same_id, + "veilid-core rejects envelopes whose sender and recipient IDs match") + end + + summary.sender = sender_str + summary.recipient = recipient_str + summary.sender_raw = sender_raw + summary.recipient_raw = recipient_raw + + -- Body + signature ------------------------------------------------------- + -- Trust the actual buffer length rather than the size field: if they + -- disagree we have already flagged it, and slicing by a bogus size would + -- throw instead of showing the user what is there. + local sig_off = len - ENV0.SIG_LEN + local body_len = sig_off - ENV0.OFF_BODY + + if body_len > 0 then + local body_range = tvb(ENV0.OFF_BODY, body_len) + local body_item = tree:add(f.body, body_range) + body_item:append_text((" (%d bytes, %s)"):format( + body_len, + crypto and crypto.cipher ~= "none" and "encrypted" or "not encrypted")) + tree:add(f.body_len, body_range, body_len):set_generated() + + summary.body_range = body_range + summary.body_len = body_len + + -- Phase 6 hands the plaintext back if a shared secret is available. + if ctx.decrypt_body then + ctx.decrypt_body(ctx, { + tree = body_item, + pinfo = pinfo, + body = body_range, + nonce = nonce_raw, + crypto = crypto, + crypto_kind = ck_display, + sender = sender_str, + recipient = recipient_str, + }) + end + else + summary.body_len = 0 + end + + tree:add(f.signature, tvb(sig_off, ENV0.SIG_LEN)) + + return summary +end + +versions.register_envelope("ENV0", { + name = "Envelope v0", + min_size = ENV0.OFF_BODY + ENV0.SIG_LEN, -- 170 + max_size = 65507, -- ENV0_MAX_ENVELOPE_SIZE + nonce_len = ENV0.NONCE_LEN, + signature_len = ENV0.SIG_LEN, + -- Offset of the u16 LE size field, used by heuristics for a structural + -- cross-check. Registry-scoped because a future version may move it. + size_field_offset = ENV0.OFF_SIZE, + dissect = dissect_env0, +}) + +M.ENV0 = ENV0 +M.REPLAY_WINDOW_SECS = REPLAY_WINDOW_SECS + +return M diff --git a/dissectors/veilid/src/veilid/fields.lua b/dissectors/veilid/src/veilid/fields.lua new file mode 100644 index 0000000..85d6437 --- /dev/null +++ b/dissectors/veilid/src/veilid/fields.lua @@ -0,0 +1,168 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/fields.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- All ProtoField / ProtoExpert definitions for the Veilid dissector. +-- +-- This module only *builds* field tables; it does not create the Proto and +-- does not attach anything. veilid.lua owns the Proto and calls build(). +-- Keeping construction behind a function is what makes this file safe to be +-- auto-loaded standalone by Wireshark's recursive plugin scan. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +local M = {} + +-- Field name conventions: +-- veilid.asm.* UDP AssemblyBuffer framing (fragmentation layer) +-- veilid.tcp.* TCP "VL" length-prefix framing +-- veilid.* the message itself (envelope or receipt) +-- +-- Version-bearing values (version, crypto_kind) are exposed as strings rather +-- than enums with a value_string, so a future ENV1/VLD1 displays its real +-- FourCC instead of "Unknown (0x...)". `family` and `version_num` are broken +-- out so filters can be written without naming a version at all: +-- veilid.family == "ENV" && veilid.version_num >= 1 + +--- Build the field table. +-- @return table fields, table experts +function M.build() + local f = {} + + --------------------------------------------------------------------------- + -- UDP AssemblyBuffer framing + --------------------------------------------------------------------------- + f.asm_version = ProtoField.uint8("veilid.asm.version", "Assembly Version", base.DEC) + f.asm_flags = ProtoField.uint8("veilid.asm.flags", "Assembly Flags", base.HEX) + f.asm_seq = ProtoField.uint16("veilid.asm.seq", "Sequence", base.DEC) + f.asm_offset = ProtoField.uint16("veilid.asm.offset", "Fragment Offset", base.DEC) + f.asm_total_len = ProtoField.uint16("veilid.asm.total_len", "Total Message Length", base.DEC) + f.asm_frag_len = ProtoField.uint32("veilid.asm.frag_len", "Fragment Length", base.DEC) + f.asm_fragmented = ProtoField.bool("veilid.asm.fragmented", "Fragmented") + f.asm_fragment = ProtoField.framenum("veilid.asm.fragment", "Message Fragment") + f.asm_fragment_count = ProtoField.uint32("veilid.asm.fragment_count", "Fragment Count", base.DEC) + f.asm_reassembled_in = ProtoField.framenum("veilid.asm.reassembled_in", "Reassembled In") + f.asm_reassembled_len = ProtoField.uint32("veilid.asm.reassembled_len", "Reassembled Length", base.DEC) + + f.hole_punch = ProtoField.bool("veilid.hole_punch", "NAT Hole Punch") + + --------------------------------------------------------------------------- + -- TCP "VL" framing + --------------------------------------------------------------------------- + f.tcp_magic = ProtoField.string("veilid.tcp.magic", "Frame Magic") + f.tcp_len = ProtoField.uint16("veilid.tcp.len", "Frame Length", base.DEC) + + --------------------------------------------------------------------------- + -- Message header (the only version-independent part: bytes 0x00..0x04) + --------------------------------------------------------------------------- + f.version = ProtoField.string("veilid.version", "Version") + f.family = ProtoField.string("veilid.family", "Family") + f.version_num = ProtoField.uint32("veilid.version_num", "Version Number", base.DEC) + f.transport = ProtoField.string("veilid.transport", "Transport") + + --------------------------------------------------------------------------- + -- Envelope / receipt body (layout supplied by the version registry) + --------------------------------------------------------------------------- + f.crypto_kind = ProtoField.string("veilid.crypto_kind", "Crypto Kind") + f.size = ProtoField.uint16("veilid.size", "Size", base.DEC) + f.timestamp = ProtoField.absolute_time("veilid.timestamp", "Timestamp", base.UTC) + f.skew = ProtoField.double("veilid.skew", "Clock Skew vs Capture (s)") + f.nonce = ProtoField.bytes("veilid.nonce", "Nonce") + + f.sender = ProtoField.bytes("veilid.sender", "Sender ID") + f.sender_str = ProtoField.string("veilid.sender_str", "Sender") + f.recipient = ProtoField.bytes("veilid.recipient", "Recipient ID") + f.recipient_str = ProtoField.string("veilid.recipient_str", "Recipient") + -- Set once per endpoint so `veilid.node == "VLD0:..."` matches traffic in + -- both directions without an || of sender/recipient. + f.node = ProtoField.string("veilid.node", "Node") + f.direction = ProtoField.string("veilid.direction", "Direction") + + f.body = ProtoField.bytes("veilid.body", "Encrypted Operations") + f.body_len = ProtoField.uint32("veilid.body_len", "Operations Length", base.DEC) + f.signature = ProtoField.bytes("veilid.signature", "Signature") + + -- Receipts carry plaintext extra data instead of an encrypted body. + f.extra_data = ProtoField.bytes("veilid.extra_data", "Extra Data") + f.extra_data_len = ProtoField.uint32("veilid.extra_data_len", "Extra Data Length", base.DEC) + + -- Known family, unrecognized version: everything past the FourCC. + f.unsupported_body = ProtoField.bytes("veilid.unsupported_body", "Unsupported Version Body") + + -- Phase 6. + f.decrypted = ProtoField.bool("veilid.decrypted", "Operations Decrypted") + f.operations = ProtoField.bytes("veilid.operations", "Decrypted Operations") + + return f +end + +--- Build the expert-info table. +-- +-- Severity choices matter here. An unrecognized *version* is a NOTE, not an +-- error: the capture is still valid Veilid and the dissector is simply older +-- than the node. Reserve ERROR for things that mean the bytes are actually +-- malformed. +-- @param prefix lowercase filter prefix, e.g. "veilid". +-- Do NOT pass proto.name here: wslua returns the *short* name, which is +-- uppercased ("VEILID"), and display filters are case-sensitive. Deriving +-- the prefix from it would register experts as VEILID.*.expert while every +-- other field lives under veilid.*, so filters would silently never match. +function M.build_experts(prefix) + local e = {} + local name = prefix + + e.unsupported_version = ProtoExpert.new( + name .. ".unsupported_version.expert", + "Unsupported Veilid version -- dissector may need updating", + expert.group.UNDECODED, expert.severity.NOTE) + + e.unknown_crypto_kind = ProtoExpert.new( + name .. ".unknown_crypto_kind.expert", + "Unknown crypto kind", + expert.group.UNDECODED, expert.severity.NOTE) + + e.size_mismatch = ProtoExpert.new( + name .. ".size_mismatch.expert", + "Size field does not match message length", + expert.group.MALFORMED, expert.severity.ERROR) + + e.too_small = ProtoExpert.new( + name .. ".too_small.expert", + "Message shorter than the minimum for its version", + expert.group.MALFORMED, expert.severity.ERROR) + + e.same_id = ProtoExpert.new( + name .. ".same_id.expert", + "Sender and recipient IDs are identical", + expert.group.PROTOCOL, expert.severity.ERROR) + + e.stale = ProtoExpert.new( + name .. ".stale.expert", + "Envelope timestamp outside the 10s replay window", + expert.group.SEQUENCE, expert.severity.WARN) + + e.fragment_conflict = ProtoExpert.new( + name .. ".fragment_conflict.expert", + "Overlapping fragments disagree", + expert.group.MALFORMED, expert.severity.WARN) + + e.fragment_incomplete = ProtoExpert.new( + name .. ".fragment_incomplete.expert", + "Message never fully reassembled in this capture", + expert.group.REASSEMBLE, expert.severity.NOTE) + + e.network_key_short = ProtoExpert.new( + name .. ".network_key_short.expert", + "Configured network key is shorter than the field it must mask", + expert.group.PROTOCOL, expert.severity.WARN) + + return e +end + +return M diff --git a/dissectors/veilid/src/veilid/nodeid.lua b/dissectors/veilid/src/veilid/nodeid.lua new file mode 100644 index 0000000..14e87be --- /dev/null +++ b/dissectors/veilid/src/veilid/nodeid.lua @@ -0,0 +1,141 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/nodeid.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Node registry and per-peer accounting. +-- +-- Builds a picture of which node IDs were seen, where, and how much traffic +-- each exchanged. Populated as a side effect of dissection and read back by +-- stats.lua for the Statistics > Veilid taps. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +if not package.searchpath("veilid.util", package.path) then return {} end + +local M = {} + +-- node id string -> record +local nodes = {} +-- how many messages we have accounted for, so a tap can report coverage +local totals = { messages = 0, bytes = 0 } + +function M.reset() + nodes = {} + totals = { messages = 0, bytes = 0 } +end + +local function record_for(id) + local rec = nodes[id] + if not rec then + rec = { + id = id, + sent = 0, recv = 0, + bytes_sent = 0, bytes_recv = 0, + first_frame = nil, last_frame = nil, + first_ts = nil, last_ts = nil, + addresses = {}, address_list = {}, + transports = {}, transport_list = {}, + max_abs_skew = 0, + } + nodes[id] = rec + end + return rec +end + +local function note_address(rec, addr) + if addr and not rec.addresses[addr] then + rec.addresses[addr] = true + rec.address_list[#rec.address_list + 1] = addr + end +end + +local function note_transport(rec, transport) + if transport and not rec.transports[transport] then + rec.transports[transport] = true + rec.transport_list[#rec.transport_list + 1] = transport + end +end + +--- Record one dissected message. +-- +-- Only called when pinfo.visited is false, so counts do not inflate when +-- Wireshark redissects a frame. +function M.observe(pinfo, summary) + local size = summary.size or 0 + totals.messages = totals.messages + 1 + totals.bytes = totals.bytes + size + + local src = tostring(pinfo.src) + local dst = tostring(pinfo.dst) + + if summary.sender then + local rec = record_for(summary.sender) + rec.sent = rec.sent + 1 + rec.bytes_sent = rec.bytes_sent + size + note_address(rec, src) + note_transport(rec, summary.transport) + if not rec.first_frame then + rec.first_frame = pinfo.number + rec.first_ts = pinfo.abs_ts + end + rec.last_frame = pinfo.number + rec.last_ts = pinfo.abs_ts + if summary.skew and math.abs(summary.skew) > rec.max_abs_skew then + rec.max_abs_skew = math.abs(summary.skew) + end + end + + if summary.recipient then + local rec = record_for(summary.recipient) + rec.recv = rec.recv + 1 + rec.bytes_recv = rec.bytes_recv + size + note_address(rec, dst) + note_transport(rec, summary.transport) + if not rec.first_frame then + rec.first_frame = pinfo.number + rec.first_ts = pinfo.abs_ts + end + rec.last_frame = pinfo.number + rec.last_ts = pinfo.abs_ts + end +end + +--- All node records, busiest first. +function M.sorted_nodes() + local list = {} + for _, rec in pairs(nodes) do list[#list + 1] = rec end + table.sort(list, function(a, b) + local at, bt = a.sent + a.recv, b.sent + b.recv + if at ~= bt then return at > bt end + return a.id < b.id + end) + return list +end + +function M.totals() + return totals +end + +--- Infer the capturing node: the ID that appears on both sides of the most +-- conversations is almost always the local node. Used only as a fallback when +-- the user has not set the local-node preference. +function M.infer_local_node() + local best, best_score + for _, rec in pairs(nodes) do + -- A relay or peer is mostly one-directional; the local node both sends + -- and receives across many peers. + local score = math.min(rec.sent, rec.recv) + if not best_score or score > best_score then + best, best_score = rec, score + end + end + return best and best.id or nil, best_score or 0 +end + +return M diff --git a/dissectors/veilid/src/veilid/receipt.lua b/dissectors/veilid/src/veilid/receipt.lua new file mode 100644 index 0000000..4f2e7e2 --- /dev/null +++ b/dissectors/veilid/src/veilid/receipt.lua @@ -0,0 +1,120 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/receipt.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Receipt family (FourCC prefix "RCP"). +-- +-- Out-of-band receipts are sent directly over a transport rather than inside +-- an envelope, and are versioned on the same scheme as envelopes. Unlike an +-- envelope body, `extra_data` is NOT encrypted (veilid-core: "arbitrary extra +-- data, not encrypted by receipt itself"), so it is dissected as plain bytes. +-- +-- The reference capture contains no receipts; this layout comes from +-- veilid-core crypto/receipt/mod.rs and is exercised by a synthetic fixture in +-- test/run.sh. +-- +-- Registry-only load effect -- see envelope.lua. + +if not package.searchpath("veilid.util", package.path) then return {} end + +local util = require "veilid.util" +local versions = require "veilid.versions" + +local M = {} + +local RCP0 = { + OFF_CRYPTO_KIND = 0x04, + OFF_SIZE = 0x08, + OFF_NONCE = 0x0A, + OFF_SENDER = 0x22, + OFF_EXTRA = 0x42, + NONCE_LEN = 24, -- RCP0_NONCE_LENGTH + KEY_LEN = 32, + SIG_LEN = 64, -- RCP0_SIGNATURE_LENGTH + MAX_SIZE = 1380, -- RCP0_MAX_RECEIPT_SIZE +} + +local function dissect_rcp0(ctx, tvb, pinfo, tree) + local f, e = ctx.fields, ctx.experts + local len = tvb:len() + + local min_size = RCP0.OFF_EXTRA + RCP0.SIG_LEN -- RCP0_MIN_RECEIPT_SIZE = 130 + if len < min_size then + tree:add_proto_expert_info(e.too_small, + ("RCP0 receipt is %d bytes, minimum is %d"):format(len, min_size)) + return nil + end + + local summary = { family = "RCP", version = "RCP0" } + + local ck_range = tvb(RCP0.OFF_CRYPTO_KIND, versions.FOURCC_LEN) + local ck_display = util.printable_fourcc(ck_range:raw()) + local crypto = versions.lookup_crypto(ck_range:raw()) + local ck_item = tree:add(f.crypto_kind, ck_range, ck_display) + if crypto then + ck_item:append_text(" (" .. crypto.description .. ")") + else + ck_item:add_proto_expert_info(e.unknown_crypto_kind, + ("Unknown crypto kind %q; key material shown raw"):format(ck_display)) + end + summary.crypto_kind = ck_display + + local size = tvb(RCP0.OFF_SIZE, 2):le_uint() + local size_item = tree:add_le(f.size, tvb(RCP0.OFF_SIZE, 2)) + if size ~= len then + size_item:add_proto_expert_info(e.size_mismatch, + ("size field is %d but the receipt is %d bytes"):format(size, len)) + end + summary.size = size + + local nonce_range = tvb(RCP0.OFF_NONCE, RCP0.NONCE_LEN) + local nonce_raw = nonce_range:raw() + if ctx.network_key and #ctx.network_key > 0 then + nonce_raw = util.xor_prefix(nonce_raw, ctx.network_key) + end + tree:add(f.nonce, nonce_range, nonce_raw) + + local sender_range = tvb(RCP0.OFF_SENDER, RCP0.KEY_LEN) + local sender_raw = sender_range:raw() + if ctx.network_key and #ctx.network_key > 0 then + sender_raw = util.xor_prefix(sender_raw, ctx.network_key) + end + local sender_str = ck_display .. ":" .. util.base64url(sender_raw) + tree:add(f.sender, sender_range, sender_raw) + tree:add(f.sender_str, sender_range, sender_str):set_generated() + tree:add(f.node, sender_range, sender_str):set_generated() + summary.sender = sender_str + + -- Receipts carry no recipient: they are addressed by the flow they arrive on. + local sig_off = len - RCP0.SIG_LEN + local extra_len = sig_off - RCP0.OFF_EXTRA + if extra_len > 0 then + tree:add(f.extra_data, tvb(RCP0.OFF_EXTRA, extra_len)) + tree:add(f.extra_data_len, tvb(RCP0.OFF_EXTRA, extra_len), extra_len):set_generated() + end + summary.extra_data_len = extra_len + + tree:add(f.signature, tvb(sig_off, RCP0.SIG_LEN)) + + return summary +end + +versions.register_receipt("RCP0", { + name = "Receipt v0", + min_size = RCP0.OFF_EXTRA + RCP0.SIG_LEN, -- 130 + max_size = RCP0.MAX_SIZE, + nonce_len = RCP0.NONCE_LEN, + signature_len = RCP0.SIG_LEN, + size_field_offset = RCP0.OFF_SIZE, + dissect = dissect_rcp0, +}) + +M.RCP0 = RCP0 + +return M diff --git a/dissectors/veilid/src/veilid/secrets.lua b/dissectors/veilid/src/veilid/secrets.lua new file mode 100644 index 0000000..1602464 --- /dev/null +++ b/dissectors/veilid/src/veilid/secrets.lua @@ -0,0 +1,120 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/secrets.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Shared-secret sidecar loader. +-- +-- Veilid derives the envelope body key as +-- BLAKE3(VLD0_CRYPT || X25519(our_secret, peer_public)) +-- X25519 and BLAKE3 are not available in Wireshark Lua, so the derivation is +-- done out of band by tools/veilid-secrets.py and the finished secrets are +-- read from a file. Wireshark's TLS keylog preference works the same way and +-- for the same reason. +-- +-- File format (whitespace-separated, '#' comments, blank lines ignored): +-- +-- e.g. +-- VLD0 CAAD0fhiVV0-nPlwOiqCqjzq_1b93mYQVusYJ2ZFqro 1f2e... +-- +-- The secret is symmetric, so one line covers both directions with that peer. +-- The crypto kind is recorded so a future VLD1 peer cannot silently be +-- decrypted with VLD0 assumptions. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +if not package.searchpath("veilid.util", package.path) then return {} end + +local util = require "veilid.util" + +local M = {} + +-- ":" -> secret bytes +local secrets = {} +local loaded_path = nil +local load_error = nil +local count = 0 + +function M.reset() + secrets = {} + loaded_path = nil + load_error = nil + count = 0 +end + +--- Load (or reload) the secrets file. Cheap to call repeatedly with the same +-- path: it is a no-op unless the path changed. +-- @return number secrets loaded, string|nil error +function M.load(path) + if path == loaded_path then return count, load_error end + + secrets = {} + count = 0 + load_error = nil + loaded_path = path + + if not path or path == "" then return 0, nil end + + local fh, err = io.open(path, "r") + if not fh then + load_error = tostring(err) + return 0, load_error + end + + local lineno = 0 + for line in fh:lines() do + lineno = lineno + 1 + line = line:gsub("#.*$", ""):match("^%s*(.-)%s*$") + if line ~= "" then + local kind, peer, hex = line:match("^(%S+)%s+(%S+)%s+(%S+)$") + if not kind then + load_error = ("%s:%d: expected ' '") + :format(path, lineno) + break + end + if #hex % 2 ~= 0 then + load_error = ("%s:%d: secret has an odd number of hex digits") + :format(path, lineno) + break + end + local raw = hex:gsub("%x%x", function(cc) return string.char(tonumber(cc, 16)) end) + secrets[kind .. ":" .. peer] = raw + count = count + 1 + end + end + fh:close() + + return count, load_error +end + +--- Find the shared secret for a message between two typed node IDs. +-- +-- Exactly one of them should be a peer we have a secret for; the other is the +-- local node. Returns the secret plus which ID matched, so the caller can +-- report whose key was used. +-- @param crypto_kind FourCC string, e.g. "VLD0" +-- @param ... typed node IDs ("VLD0:") +-- @return string|nil secret, string|nil matched_id +function M.lookup(crypto_kind, ...) + if count == 0 then return nil end + for _, typed in ipairs { ... } do + if typed then + -- Strip the "KIND:" prefix; the file stores bare base64url. + local bare = typed:match("^[^:]*:(.*)$") or typed + local secret = secrets[crypto_kind .. ":" .. bare] + if secret then return secret, typed end + end + end + return nil +end + +function M.status() + return { path = loaded_path, count = count, error = load_error } +end + +return M diff --git a/dissectors/veilid/src/veilid/stats.lua b/dissectors/veilid/src/veilid/stats.lua new file mode 100644 index 0000000..a7235e1 --- /dev/null +++ b/dissectors/veilid/src/veilid/stats.lua @@ -0,0 +1,123 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/stats.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Statistics taps: Statistics > Veilid > ... in the GUI, and +-- `tshark -q -z veilid,peers` / `-z veilid,assembly` on the command line. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +if not package.searchpath("veilid.util", package.path) then return {} end + +local util = require "veilid.util" + +local M = {} + +local function pad(s, n) + s = tostring(s) + if #s >= n then return s end + return s .. string.rep(" ", n - #s) +end + +local function lpad(s, n) + s = tostring(s) + if #s >= n then return s end + return string.rep(" ", n - #s) .. s +end + +--- Register both taps. +-- @param ctx dissector context +-- @param nodeid the node registry module +-- @param assembly the reassembly module +function M.register(ctx, nodeid, assembly) + ------------------------------------------------------------------------------ + -- Peers + ------------------------------------------------------------------------------ + local function peers_tap() + local tap = Listener.new("frame") + + function tap.draw() + local nodes = nodeid.sorted_nodes() + local totals = nodeid.totals() + + local local_id = ctx.self_node_id + local inferred = false + if not local_id then + local_id = nodeid.infer_local_node() + inferred = true + end + + print("") + print("===================================================================================") + print("Veilid Peers") + print((" %d messages, %d bytes, %d distinct node IDs") + :format(totals.messages, totals.bytes, #nodes)) + if local_id then + print((" local node: %s%s"):format(local_id, inferred and " (inferred)" or "")) + end + print("===================================================================================") + print(("%s %s %s %s %s %s"):format( + pad("Node", 48), lpad("Sent", 7), lpad("Recv", 7), + lpad("Bytes", 11), pad(" Transports", 20), "Addresses")) + print(string.rep("-", 98)) + + for _, rec in ipairs(nodes) do + local label = rec.id + if local_id and rec.id == local_id then label = label .. " *" end + local addrs = table.concat(rec.address_list, ",") + if #addrs > 40 then addrs = addrs:sub(1, 37) .. "..." end + print(("%s %s %s %s %s %s"):format( + pad(util.short_key(label, 12), 48), + lpad(rec.sent, 7), + lpad(rec.recv, 7), + lpad(rec.bytes_sent + rec.bytes_recv, 11), + pad(" " .. table.concat(rec.transport_list, ","), 20), + addrs)) + end + print(string.rep("-", 98)) + print(" * = local node") + print("") + end + + function tap.reset() end + end + + register_stat_cmd_arg("veilid,peers", peers_tap) + + ------------------------------------------------------------------------------ + -- Assembly / reassembly health + ------------------------------------------------------------------------------ + local function assembly_tap() + local tap = Listener.new("frame") + + function tap.draw() + local s = assembly.stats() + print("") + print("===================================================================") + print("Veilid UDP Reassembly") + print("===================================================================") + print((" datagrams seen : %d"):format(s.datagrams)) + print((" complete in one datagram : %d"):format(s.complete)) + print((" fragment datagrams : %d"):format(s.fragments)) + print((" messages reassembled : %d"):format(s.reassembled)) + print((" fragments per message : %.2f"):format( + s.reassembled > 0 and (s.fragments / s.reassembled) or 0)) + print((" overlap conflicts : %d"):format(s.conflicts)) + print((" never completed : %d <-- nonzero means lost fragments") + :format(s.incomplete)) + print("") + end + + function tap.reset() end + end + + register_stat_cmd_arg("veilid,assembly", assembly_tap) +end + +return M diff --git a/dissectors/veilid/src/veilid/transport.lua b/dissectors/veilid/src/veilid/transport.lua new file mode 100644 index 0000000..ad8e6af --- /dev/null +++ b/dissectors/veilid/src/veilid/transport.lua @@ -0,0 +1,180 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/transport.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Stream and datagram transports: TCP framing, WebSocket, and the heuristics +-- that find Veilid on ports outside the configured range. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +if not package.searchpath("veilid.util", package.path) then return {} end + +local versions = require "veilid.versions" +local assembly = require "veilid.assembly" + +local M = {} + +-- veilid-core network/native/protocol/tcp.rs: +-- let header = [b'V', b'L', len as u8, (len >> 8) as u8]; +-- Not version-bearing -- this is a fixed frame magic, unlike the ENV/RCP/VLD +-- FourCCs -- so a literal is correct here. +M.FRAME_MAGIC = "VL" +M.FRAME_HEADER_LEN = 4 + +-------------------------------------------------------------------------------- +-- TCP +-------------------------------------------------------------------------------- + +--- Dissect Veilid frames inside a TCP segment. +-- +-- Handles both directions of the mismatch between TCP segments and Veilid +-- frames: several frames per segment, and frames split across segments. On a +-- short read it asks Wireshark for more data via desegment_offset/len rather +-- than guessing. +-- +-- @return number bytes consumed; 0 rejects the segment so other dissectors run +function M.dissect_tcp(ctx, tvb, pinfo, tree) + local len = tvb:len() + local offset = 0 + local messages = 0 + local max_msg = versions.global_max_size() + local min_msg = versions.global_min_size() + + while offset < len do + local remaining = len - offset + + if remaining < M.FRAME_HEADER_LEN then + pinfo.desegment_offset = offset + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return len + end + + if tvb(offset, 2):raw() ~= M.FRAME_MAGIC then + -- Garbage where a frame header should be. If we have not decoded + -- anything yet this is simply not a Veilid stream; hand it back. + if messages == 0 then return 0 end + break + end + + local msg_len = tvb(offset + 2, 2):le_uint() + if msg_len < min_msg or msg_len > max_msg then + if messages == 0 then return 0 end + break + end + + if remaining - M.FRAME_HEADER_LEN < msg_len then + pinfo.desegment_offset = offset + pinfo.desegment_len = msg_len - (remaining - M.FRAME_HEADER_LEN) + return len + end + + -- Before claiming the stream, confirm the first framed payload really is + -- a Veilid message. "VL" plus a plausible length is only 4 bytes of + -- evidence and would false-positive on binary traffic. + local body_off = offset + M.FRAME_HEADER_LEN + if messages == 0 then + if not versions.classify(tvb(body_off, versions.FOURCC_LEN):raw()) then + return 0 + end + end + + local framing = tree:add(ctx.proto, tvb(offset, M.FRAME_HEADER_LEN + msg_len)) + framing:set_text(("Veilid TCP Framing (%d bytes)"):format(msg_len)) + framing:add(ctx.fields.tcp_magic, tvb(offset, 2), M.FRAME_MAGIC) + framing:add_le(ctx.fields.tcp_len, tvb(offset + 2, 2)) + + ctx.dissect_message(tvb(body_off, msg_len), pinfo, tree, "TCP") + messages = messages + 1 + offset = offset + M.FRAME_HEADER_LEN + msg_len + end + + if messages > 1 then + pinfo.cols.info:prepend(("[%d msgs] "):format(messages)) + end + return offset +end + +-------------------------------------------------------------------------------- +-- WebSocket +-------------------------------------------------------------------------------- + +--- Dissect a Veilid message carried in a binary WebSocket frame. +-- WebSocket is already message-framed, so there is no length prefix and no +-- AssemblyBuffer -- the payload is exactly one message. +function M.dissect_ws(ctx, tvb, pinfo, tree) + local len = tvb:len() + if len < versions.FOURCC_LEN then return 0 end + if not versions.classify(tvb(0, versions.FOURCC_LEN):raw()) then return 0 end + ctx.dissect_message(tvb, pinfo, tree, "WebSocket") + return len +end + +-------------------------------------------------------------------------------- +-- Heuristics +-------------------------------------------------------------------------------- +-- +-- Veilid peers do not all run on 5150 (this project's reference capture has a +-- peer on 54994), so port registration alone under-detects. Heuristics have to +-- be strict: they are offered every packet on the network, and a false claim +-- corrupts an unrelated protocol's dissection. +-- +-- The rule used here is "claim only on positive identification, then pin the +-- conversation". A heuristic fires only for a packet that contains a readable +-- message FourCC; on success it sets pinfo.conversation so the remaining +-- packets of that flow -- including later fragments, which carry no magic of +-- their own -- are routed to us directly. + +--- UDP heuristic. +function M.heuristic_udp(ctx, proto, tvb, pinfo, tree) + local h = assembly.parse_header(tvb) + if not h then return false end + + -- Only offset-0 datagrams expose a FourCC. Requiring one keeps the + -- heuristic honest; later fragments arrive via the pinned conversation. + if h.offset ~= 0 then return false end + + local payload = tvb(assembly.HEADER_LEN) + if payload:len() < versions.FOURCC_LEN then return false end + + local info = versions.classify(payload(0, versions.FOURCC_LEN):raw()) + if not info then return false end + + pinfo.conversation = proto + proto.dissector(tvb, pinfo, tree) + return true +end + +--- TCP heuristic. +function M.heuristic_tcp(ctx, proto, tvb, pinfo, tree) + local len = tvb:len() + if len < M.FRAME_HEADER_LEN + versions.FOURCC_LEN then return false end + if tvb(0, 2):raw() ~= M.FRAME_MAGIC then return false end + + local msg_len = tvb(2, 2):le_uint() + if msg_len < versions.global_min_size() or msg_len > versions.global_max_size() then + return false + end + if not versions.classify(tvb(M.FRAME_HEADER_LEN, versions.FOURCC_LEN):raw()) then + return false + end + + pinfo.conversation = proto + proto.dissector(tvb, pinfo, tree) + return true +end + +--- WebSocket heuristic. The websocket dissector hands us the unmasked payload. +function M.heuristic_ws(ctx, proto, tvb, pinfo, tree) + if tvb:len() < versions.FOURCC_LEN then return false end + if not versions.classify(tvb(0, versions.FOURCC_LEN):raw()) then return false end + proto.dissector(tvb, pinfo, tree) + return true +end + +return M diff --git a/dissectors/veilid/src/veilid/util.lua b/dissectors/veilid/src/veilid/util.lua new file mode 100644 index 0000000..4231278 --- /dev/null +++ b/dissectors/veilid/src/veilid/util.lua @@ -0,0 +1,177 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/util.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Pure helpers for the Veilid dissector. +-- +-- NO SIDE EFFECTS AT LOAD TIME. Wireshark recursively auto-loads every .lua +-- file under the plugin directory, so this file gets executed standalone in +-- addition to being require()d. Define and return; register nothing. + +local M = {} + +local B64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" + +local B64URL_REVERSE = {} +for i = 1, #B64URL_ALPHABET do + B64URL_REVERSE[B64URL_ALPHABET:sub(i, i)] = i - 1 +end +-- Accept standard-alphabet input too, so a key pasted from a non-Veilid tool +-- still decodes. +B64URL_REVERSE["+"] = 62 +B64URL_REVERSE["/"] = 63 + +local function sixbit(v, shift) + local idx = (v >> shift) & 0x3F + return B64URL_ALPHABET:sub(idx + 1, idx + 1) +end + +--- Encode raw bytes as unpadded base64url. +-- Matches data_encoding::BASE64URL_NOPAD, which veilid-core uses for every +-- key/nonce/signature it prints (crypto/types/byte_array_types.rs). +-- @param s string of raw bytes +-- @return string +function M.base64url(s) + if not s then return "" end + local out, n, i = {}, #s, 1 + while i + 2 <= n do + local a, b, c = s:byte(i, i + 2) + local v = (a << 16) | (b << 8) | c + out[#out + 1] = sixbit(v, 18) .. sixbit(v, 12) .. sixbit(v, 6) .. sixbit(v, 0) + i = i + 3 + end + local rem = n - i + 1 + if rem == 1 then + local v = s:byte(i) << 16 + out[#out + 1] = sixbit(v, 18) .. sixbit(v, 12) + elseif rem == 2 then + local a, b = s:byte(i, i + 1) + local v = (a << 16) | (b << 8) + out[#out + 1] = sixbit(v, 18) .. sixbit(v, 12) .. sixbit(v, 6) + end + return table.concat(out) +end + +--- Decode unpadded (or padded) base64url into raw bytes. +-- @return string|nil bytes, string|nil error +function M.base64url_decode(str) + if type(str) ~= "string" then return nil, "not a string" end + str = str:gsub("[%s=]", "") + if #str == 0 then return "" end + if #str % 4 == 1 then return nil, "truncated base64" end + + local out, acc, bits = {}, 0, 0 + for i = 1, #str do + local ch = str:sub(i, i) + local v = B64URL_REVERSE[ch] + if not v then return nil, ("invalid base64 character %q"):format(ch) end + acc = (acc << 6) | v + bits = bits + 6 + if bits >= 8 then + bits = bits - 8 + out[#out + 1] = string.char((acc >> bits) & 0xFF) + end + end + return table.concat(out) +end + +--- Parse a Wireshark range preference ("5150", "5150,6000-6010") into a list +-- of {lo, hi} pairs. Returns an empty list for empty/malformed input. +function M.parse_ranges(str) + local ranges = {} + if type(str) ~= "string" then return ranges end + for part in str:gmatch("[^,%s]+") do + local lo, hi = part:match("^(%d+)%s*%-%s*(%d+)$") + if lo then + ranges[#ranges + 1] = { lo = tonumber(lo), hi = tonumber(hi) } + else + local single = part:match("^(%d+)$") + if single then + local n = tonumber(single) + ranges[#ranges + 1] = { lo = n, hi = n } + end + end + end + return ranges +end + +--- True when `port` falls in any of the parsed ranges. +function M.in_ranges(ranges, port) + if not port then return false end + for i = 1, #ranges do + if port >= ranges[i].lo and port <= ranges[i].hi then return true end + end + return false +end + +--- Convert a wslua UInt64 to an exact Lua 5.4 integer. +-- +-- UInt64:tonumber() returns a *float*, which silently loses precision above +-- 2^53. Reassembling from the 32-bit halves is exact for the full range and +-- costs nothing. (Envelope timestamps are microseconds since the epoch -- +-- currently ~1.8e15, safe as a double today but not worth relying on.) +function M.u64_exact(u64) + local hi = math.tointeger(u64:higher()) or 0 + local lo = math.tointeger(u64:lower()) or 0 + return (hi << 32) | lo +end + +--- Lowercase hex, no separators. +function M.hex(s) + return (s:gsub(".", function(c) return ("%02x"):format(c:byte()) end)) +end + +--- Render a 4-byte FourCC for display, escaping anything unprintable so a +-- garbage match never injects control characters into the packet tree. +function M.printable_fourcc(s) + if not s then return "" end + return (s:gsub(".", function(c) + local b = c:byte() + if b >= 0x20 and b < 0x7F then return c end + return ("\\x%02x"):format(b) + end)) +end + +--- True when every byte is an ASCII alphanumeric (explicit ranges, not %w, +-- which is locale-dependent). +function M.is_ascii_alnum(s) + if not s or #s == 0 then return false end + return s:match("^[0-9A-Za-z]+$") ~= nil +end + +--- Abbreviate a long typed key for the info column: "VLD0:AbCd…WxYz". +-- @param typed string like "VLD0:" +-- @param keep number of base64 characters to keep at each end (default 4) +function M.short_key(typed, keep) + keep = keep or 4 + local prefix, body = typed:match("^([^:]*:)(.*)$") + if not prefix then prefix, body = "", typed end + if #body <= (keep * 2) + 1 then return typed end + return prefix .. body:sub(1, keep) .. "\u{2026}" .. body:sub(-keep) +end + +--- XOR `s` against the leading bytes of `key`. +-- +-- veilid-core applies a private-network key exactly this way -- `nonce[n] ^= +-- nk[n]` for n in 0..len -- so a key shorter than `s` is a configuration +-- error, not something to paper over by repeating the key. Bytes beyond +-- #key are left untouched and the shortfall is reported. +-- @return string result, number bytes_not_covered +function M.xor_prefix(s, key) + if not key or #key == 0 then return s, #s end + local n = math.min(#s, #key) + local out = {} + for i = 1, n do + out[i] = string.char(s:byte(i) ~ key:byte(i)) + end + if n < #s then out[n + 1] = s:sub(n + 1) end + return table.concat(out), math.max(0, #s - #key) +end + +return M diff --git a/dissectors/veilid/src/veilid/versions.lua b/dissectors/veilid/src/veilid/versions.lua new file mode 100644 index 0000000..1262167 --- /dev/null +++ b/dissectors/veilid/src/veilid/versions.lua @@ -0,0 +1,195 @@ +-- SPDX-License-Identifier: MPL-2.0 +-- Importé de https://gitlab.com/SuperTeece/veilid-wireshark-dissector (veilid/versions.lua), +-- commit a0a4eb3734df36d78969e831c2b8f4ad00e1930f du 06/08/2026. Code amont non modifié. + +-- This Source Code Form is subject to the terms of the Mozilla Public +-- License, v. 2.0. If a copy of the MPL was not distributed with this +-- file, You can obtain one at https://mozilla.org/MPL/2.0/. +-- +-- SPDX-License-Identifier: MPL-2.0 + +-- Version registry: the single place in this dissector allowed to name a +-- concrete Veilid version FourCC. +-- +-- WHY THIS EXISTS +-- --------------- +-- "ENV0", "RCP0" and "VLD0" all carry a version digit that veilid-core will +-- increment over time (it already ships a commented-out CRYPTO_KIND_VLD1, and +-- MAX_ENVELOPE_VERSIONS is 16). A dissector that compares against the literal +-- strings silently stops working the day a node upgrades. +-- +-- What the wire format actually guarantees is narrow: only bytes 0x00..0x04 of +-- a message are version-independent. veilid-core's EnvelopeHeader is documented +-- as "at least 4 bytes ... depending on the version specified, the size may +-- vary and should be cast to the appropriate struct", and +-- Envelope::try_from_signed_data reads exactly those 4 bytes before +-- dispatching. Even crypto_kind at 0x04 and size at 0x08 are ENV0 details. +-- +-- So: the 4-byte FourCC selects a layout table from a registry. Everything +-- past offset 4 belongs to that table. Adding ENV1 support should mean adding +-- one registry entry, not editing a branch somewhere. +-- +-- NO SIDE EFFECTS AT LOAD TIME -- see util.lua. + +-- Standalone-load guard (house idiom, used by every module with a dependency). +-- Wireshark recursively auto-loads every .lua file under the plugin directory, +-- and it reaches subdirectories BEFORE the top-level veilid.lua that sets up +-- package.path. In that pass our sibling modules are unreachable and there is +-- nothing useful to do, so return an inert table instead of raising. When +-- veilid.lua later require()s us for real, the path resolves and the module +-- body runs properly. Testing searchpath rather than pcall(require) means a +-- genuine syntax or runtime error in a sibling still propagates loudly. +if not package.searchpath("veilid.util", package.path) then return {} end + +local util = require "veilid.util" + +local M = {} + +M.FOURCC_LEN = 4 + +-- Layout registries, keyed by full 4-character FourCC. +-- Populated by envelope.lua / receipt.lua via the register_* functions below. +M.ENVELOPE_VERSIONS = {} +M.RECEIPT_VERSIONS = {} + +-- Message families, keyed by the 3-character prefix. This is what detection +-- and heuristics match on -- never a full literal. +M.FAMILIES = { + ENV = { key = "ENV", name = "Envelope", registry = M.ENVELOPE_VERSIONS }, + RCP = { key = "RCP", name = "Receipt", registry = M.RECEIPT_VERSIONS }, +} + +-- Crypto kinds are an INDEPENDENT axis from message versions: an ENV0 envelope +-- names its crypto kind in a separate field, and nonce/signature lengths are +-- specified twice over (ENV0_NONCE_LENGTH vs VLD0_NONCE_LENGTH) and must +-- agree. Note "NONE" deliberately has no version digit, which is exactly why +-- this is a registry lookup and not a pattern match. +M.CRYPTO_KINDS = {} + +--- Register a crypto kind. Values mirror veilid-core's per-system sizes.rs. +function M.register_crypto(fourcc, entry) + entry.fourcc = fourcc + M.CRYPTO_KINDS[fourcc] = entry + return entry +end + +M.register_crypto("VLD0", { + name = "VLD0", + description = "Ed25519 / X25519 / XChaCha20 / BLAKE3", + public_key_len = 32, + nonce_len = 24, + signature_len = 64, + shared_secret_len = 32, + hash_len = 32, + -- Phase 6 decryption parameters. + dh = "x25519-blake3", + crypt_domain = "VLD0_CRYPT", + cipher = "xchacha20", +}) + +M.register_crypto("NONE", { + name = "NONE", + description = "no cryptography (test/debug builds)", + public_key_len = 32, + nonce_len = 24, + signature_len = 64, + shared_secret_len = 32, + hash_len = 32, + dh = "none", + crypt_domain = nil, + cipher = "none", +}) + +--- Register an envelope layout. +-- @param fourcc string e.g. "ENV0" +-- @param entry table { min_size, max_size, nonce_len, signature_len, dissect } +function M.register_envelope(fourcc, entry) + entry.fourcc = fourcc + entry.family = "ENV" + M.ENVELOPE_VERSIONS[fourcc] = entry + return entry +end + +--- Register a receipt layout. Same shape as register_envelope. +function M.register_receipt(fourcc, entry) + entry.fourcc = fourcc + entry.family = "RCP" + M.RECEIPT_VERSIONS[fourcc] = entry + return entry +end + +--- Split a 4-byte FourCC into family prefix and version. +-- +-- Returns nil for anything that is not 4 printable ASCII alphanumerics, which +-- is a cheap first filter for heuristics. +-- @param s string of exactly 4 raw bytes +-- @return table|nil { fourcc, family, version_char, version_num } +function M.parse_fourcc(s) + if type(s) ~= "string" or #s ~= M.FOURCC_LEN then return nil end + if not util.is_ascii_alnum(s) then return nil end + local version_char = s:sub(4, 4) + return { + fourcc = s, + family = s:sub(1, 3), + version_char = version_char, + version_num = tonumber(version_char, 10), + } +end + +--- Classify a message by its leading FourCC. +-- +-- Three distinct outcomes, and callers must treat them differently: +-- nil -> not a Veilid message; reject +-- { layout = nil, ... } -> known family, UNKNOWN version. Still Veilid. +-- Show what we can, emit a note, never a +-- malformed error. A capture from a future +-- node must remain recognizable. +-- { layout = , ... } -> fully dissectable +-- @param s string of exactly 4 raw bytes +function M.classify(s) + local fc = M.parse_fourcc(s) + if not fc then return nil end + local family = M.FAMILIES[fc.family] + if not family then return nil end + fc.family_name = family.name + fc.layout = family.registry[fc.fourcc] + return fc +end + +--- Look up crypto parameters. Returns nil for unknown kinds; callers should +-- degrade to a note rather than refusing to dissect, since the crypto kind +-- only governs interpretation of key material, not envelope structure. +function M.lookup_crypto(s) + if type(s) ~= "string" or #s ~= M.FOURCC_LEN then return nil end + return M.CRYPTO_KINDS[s] +end + +--- Smallest min_size across every registered layout, for "could this possibly +-- be a message?" length checks in heuristics. +function M.global_min_size() + local min + for _, registry in pairs { M.ENVELOPE_VERSIONS, M.RECEIPT_VERSIONS } do + for _, entry in pairs(registry) do + if entry.min_size and (not min or entry.min_size < min) then + min = entry.min_size + end + end + end + -- Nothing registered yet: fall back to the universal header length. + return min or M.FOURCC_LEN +end + +--- Largest max_size across every registered layout. +function M.global_max_size() + local max + for _, registry in pairs { M.ENVELOPE_VERSIONS, M.RECEIPT_VERSIONS } do + for _, entry in pairs(registry) do + if entry.max_size and (not max or entry.max_size > max) then + max = entry.max_size + end + end + end + return max or 65535 +end + +return M diff --git a/dissectors/veilid/tools/veilid-secrets.py b/dissectors/veilid/tools/veilid-secrets.py new file mode 100755 index 0000000..3f8e9dc --- /dev/null +++ b/dissectors/veilid/tools/veilid-secrets.py @@ -0,0 +1,449 @@ +#!/usr/bin/env python3 +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. +# +# SPDX-License-Identifier: MPL-2.0 + +"""Derive Veilid envelope shared secrets for the Wireshark dissector. + +Wireshark's Lua has no X25519 or BLAKE3, so the key agreement half of Veilid's +envelope encryption is done here and the finished secrets are handed to the +dissector through a sidecar file -- the same arrangement as a TLS keylog. + +For crypto kind VLD0 (veilid-core crypto_system/vld0/mod.rs): + + shared = BLAKE3(b"VLD0_CRYPT" || X25519(ed25519_to_x25519(our_secret), + ed25519_to_x25519(peer_public))) + +The result is symmetric, so one line per peer covers both directions. + +Usage +----- + # Read the secret from a file (or '-' for stdin) so it never appears in + # `ps` output or shell history: + sudo cat /path/to/node.key | cut -d: -f3 \\ + | veilid-secrets.py --secret-key-file - \\ + --from-pcap veilid-packets.pcapng > secrets.txt + + # Specific peers: + veilid-secrets.py --secret-key-file key.txt \\ + --peer VLD0:CAAD0fhi... --peer VLD0:7yRv... > secrets.txt + +Then set Wireshark's "Shared secrets file" preference (veilid.secrets_file) to +the output path, or pass -o veilid.secrets_file:secrets.txt to tshark. + +The output file is itself sensitive: it decrypts every message exchanged with +the listed peers. It does not, however, contain your node's secret key. + +Requires: pip install cryptography (BLAKE3 is implemented here, no extra dep) +""" + +from __future__ import annotations + +import argparse +import base64 +import binascii +import os +import struct +import subprocess +import sys + +VLD0_DOMAIN_CRYPT = b"VLD0_CRYPT" +DEFAULT_CRYPTO_KIND = "VLD0" + +# Offsets within an ENV0 envelope (veilid-core crypto/envelope/mod.rs). +ENV0_OFF_CRYPTO_KIND = 0x04 +ENV0_OFF_SENDER = 0x2A +ENV0_OFF_RECIPIENT = 0x4A +ENV0_KEY_LEN = 32 +ENV0_MIN_SIZE = 0x6A + 0x40 + +ASSEMBLY_HEADER_LEN = 8 +TCP_FRAME_MAGIC = b"VL" + + +def b64url_decode(s: str) -> bytes: + s = s.split(":", 1)[-1] # tolerate a "VLD0:" prefix + return base64.urlsafe_b64decode(s + "=" * (-len(s) % 4)) + + +def b64url_encode(b: bytes) -> str: + return base64.urlsafe_b64encode(b).decode().rstrip("=") + + +# --- Ed25519 -> X25519 (RFC 7748 birational map) ---------------------------- +P = 2**255 - 19 + + +def _decompress_ed25519_y(pub: bytes) -> int: + """Return the Edwards y coordinate encoded in an Ed25519 public key.""" + if len(pub) != 32: + raise ValueError("ed25519 public key must be 32 bytes") + return int.from_bytes(pub, "little") & ((1 << 255) - 1) + + +def ed25519_pub_to_x25519(pub: bytes) -> bytes: + """u = (1 + y) / (1 - y) mod p.""" + y = _decompress_ed25519_y(pub) + denom = (1 - y) % P + if denom == 0: + raise ValueError("degenerate ed25519 public key") + u = ((1 + y) * pow(denom, P - 2, P)) % P + return u.to_bytes(32, "little") + + +def ed25519_secret_to_x25519(secret: bytes) -> bytes: + """SHA-512 the seed, clamp the low half -- the standard conversion.""" + import hashlib + + if len(secret) != 32: + raise ValueError("ed25519 secret key must be a 32-byte seed") + h = bytearray(hashlib.sha512(secret).digest()[:32]) + h[0] &= 248 + h[31] &= 127 + h[31] |= 64 + return bytes(h) + + +def x25519(scalar: bytes, u: bytes) -> bytes: + from cryptography.hazmat.primitives.asymmetric.x25519 import ( + X25519PrivateKey, + X25519PublicKey, + ) + + priv = X25519PrivateKey.from_private_bytes(scalar) + pub = X25519PublicKey.from_public_bytes(u) + return priv.exchange(pub) + + +# --- BLAKE3 ----------------------------------------------------------------- +# Implemented here rather than pulled in as a dependency: the only input this +# tool ever hashes is 10 bytes of domain separator plus a 32-byte DH output, so +# the single-chunk path is all that is needed and `pip install blake3` (which +# needs a compiler or a matching wheel, and trips over PEP 668 on system +# Pythons) would be a disproportionate requirement. +# +# Verified against the reference test vectors for input lengths 0, 1, 3, 63 and +# 64 -- the last two covering the block boundary. Inputs above one chunk would +# need parent-node chaining, so they are refused rather than silently wrong. +_B3_IV = [0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, + 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19] +_B3_PERM = [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8] +_B3_CHUNK_START, _B3_CHUNK_END, _B3_ROOT = 1, 2, 8 +_M32 = 0xFFFFFFFF + + +def _rotr(x: int, n: int) -> int: + return ((x >> n) | (x << (32 - n))) & _M32 + + +def _b3_g(s, a, b, c, d, mx, my): + s[a] = (s[a] + s[b] + mx) & _M32; s[d] = _rotr(s[d] ^ s[a], 16) + s[c] = (s[c] + s[d]) & _M32; s[b] = _rotr(s[b] ^ s[c], 12) + s[a] = (s[a] + s[b] + my) & _M32; s[d] = _rotr(s[d] ^ s[a], 8) + s[c] = (s[c] + s[d]) & _M32; s[b] = _rotr(s[b] ^ s[c], 7) + + +def _b3_round(s, m): + _b3_g(s, 0, 4, 8, 12, m[0], m[1]); _b3_g(s, 1, 5, 9, 13, m[2], m[3]) + _b3_g(s, 2, 6, 10, 14, m[4], m[5]); _b3_g(s, 3, 7, 11, 15, m[6], m[7]) + _b3_g(s, 0, 5, 10, 15, m[8], m[9]); _b3_g(s, 1, 6, 11, 12, m[10], m[11]) + _b3_g(s, 2, 7, 8, 13, m[12], m[13]); _b3_g(s, 3, 4, 9, 14, m[14], m[15]) + + +def _b3_compress(cv, block_words, counter, block_len, flags): + s = cv[:8] + _B3_IV[:4] + [counter & _M32, (counter >> 32) & _M32, + block_len, flags] + m = list(block_words) + for i in range(7): + _b3_round(s, m) + if i < 6: + m = [m[p] for p in _B3_PERM] + for i in range(8): + s[i] ^= s[i + 8] + s[i + 8] ^= cv[i] + return s + + +def blake3_256(data: bytes) -> bytes: + """BLAKE3-256 of a single chunk (at most 1024 bytes).""" + if len(data) > 1024: + raise ValueError("blake3_256 here handles a single chunk only") + blocks = [data[i:i + 64] for i in range(0, len(data), 64)] or [b""] + cv = _B3_IV[:] + for i, blk in enumerate(blocks): + flags = 0 + if i == 0: + flags |= _B3_CHUNK_START + if i == len(blocks) - 1: + flags |= _B3_CHUNK_END | _B3_ROOT + words = list(struct.unpack("<16I", blk + b"\x00" * (64 - len(blk)))) + cv = _b3_compress(cv, words, 0, len(blk), flags)[:8] + return struct.pack("<8I", *cv) + + +def _blake3_selftest() -> None: + """Refuse to derive anything if the hash is wrong.""" + cases = { + b"": "af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262", + b"abc": "6437b3ac38465133ffb63b75273a8db548c558465d79db03fd359c6cd5bd9d85", + bytes(i % 251 for i in range(63)): + "e9bc37a594daad83be9470df7f7b3798297c3d834ce80ba85d6e207627b7db7b", + bytes(i % 251 for i in range(64)): + "4eed7141ea4a5cd4b788606bd23f46e212af9cacebacdc7d1f4c6dc7f2511b98", + } + for data, want in cases.items(): + if blake3_256(data).hex() != want: + raise SystemExit("error: BLAKE3 self-test failed; refusing to derive keys") + + +def derive_shared_secret(our_ed_secret: bytes, peer_ed_public: bytes) -> bytes: + dh = x25519(ed25519_secret_to_x25519(our_ed_secret), + ed25519_pub_to_x25519(peer_ed_public)) + return blake3_256(VLD0_DOMAIN_CRYPT + dh) + + +def ed25519_public_from_seed(seed: bytes) -> bytes: + from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey + from cryptography.hazmat.primitives import serialization + return Ed25519PrivateKey.from_private_bytes(seed).public_key().public_bytes( + encoding=serialization.Encoding.Raw, + format=serialization.PublicFormat.Raw) + + +# --- Peer discovery from a capture ------------------------------------------ +def _iter_envelopes(payload: bytes): + """Yield (crypto_kind, sender, recipient) from a UDP or WebSocket payload.""" + if len(payload) >= ASSEMBLY_HEADER_LEN: + ver, flags, _seq, off, total = struct.unpack( + ">BBHHH", payload[:ASSEMBLY_HEADER_LEN]) + if ver == 1 and flags == 0: + body = payload[ASSEMBLY_HEADER_LEN:] + if off == 0 and len(body) == total: + yield from _parse_message(body) + return + yield from _parse_message(payload) + + +def _parse_message(msg: bytes): + if len(msg) < ENV0_MIN_SIZE or msg[:3] != b"ENV": + return + kind = msg[ENV0_OFF_CRYPTO_KIND:ENV0_OFF_CRYPTO_KIND + 4].decode("ascii", "replace") + yield (kind, + msg[ENV0_OFF_SENDER:ENV0_OFF_SENDER + ENV0_KEY_LEN], + msg[ENV0_OFF_RECIPIENT:ENV0_OFF_RECIPIENT + ENV0_KEY_LEN]) + + +def _dissector_loaded(tshark: str) -> bool: + out = subprocess.run([tshark, "-G", "protocols"], + capture_output=True, text=True).stdout + return any(line.split("\t")[2:3] == ["veilid"] for line in out.splitlines()) + + +def peers_via_dissector(path: str, tshark: str, plugin: str | None, + our_pub: bytes | None): + """Collect peers using the Veilid dissector. + + Preferred over parsing packets here: the dissector already handles TCP + framing and desegmentation, UDP fragment reassembly and WebSocket, so it + sees peers that a payload-level scan misses entirely. + """ + load: list[str] = [] + if not _dissector_loaded(tshark): + if not (plugin and os.path.exists(plugin)): + return None + load = ["-X", f"lua_script:{plugin}"] + # Passing -X when the plugin is already installed is a hard error + # ("there cannot be two protocols with the same description"), hence the + # check above rather than always injecting it. + + cmd = [tshark, *load, "-r", path, + "-o", "tcp.reassemble_out_of_order:TRUE", + "-Y", "veilid", + "-T", "fields", "-e", "veilid.sender_str", "-e", "veilid.recipient_str"] + proc = subprocess.run(cmd, capture_output=True, text=True) + if proc.returncode != 0: + return None + + seen: dict[tuple[str, bytes], None] = {} + for line in proc.stdout.splitlines(): + for field in line.split("\t"): + for typed in field.split(","): + typed = typed.strip() + if not typed or ":" not in typed: + continue + kind, _, b64 = typed.partition(":") + try: + node = b64url_decode(b64) + except Exception: + continue + if our_pub is not None and node == our_pub: + continue + seen.setdefault((kind, node), None) + return list(seen) + + +def peers_from_pcap(path: str, tshark: str, our_pub: bytes | None): + """Fallback peer scan: parse UDP and WebSocket payloads directly. + + Only sees unfragmented UDP datagrams and WebSocket frames -- it does not + reassemble TCP, so it will miss any peer reached solely over TCP. Used only + when the dissector is unavailable. + """ + cmd = [tshark, "-r", path, "-Y", + "udp.payload || websocket.payload", + "-T", "fields", "-e", "udp.payload", "-e", "websocket.payload"] + out = subprocess.run(cmd, capture_output=True, text=True, check=True).stdout + + seen: dict[tuple[str, bytes], None] = {} + for line in out.splitlines(): + for field in line.split("\t"): + for hexstr in field.split(","): + hexstr = hexstr.strip().replace(":", "") + if not hexstr: + continue + try: + payload = binascii.unhexlify(hexstr) + except binascii.Error: + continue + for kind, snd, rcp in _iter_envelopes(payload): + for node in (snd, rcp): + if our_pub is not None and node == our_pub: + continue + seen.setdefault((kind, node), None) + return list(seen) + + +def main() -> int: + ap = argparse.ArgumentParser( + description="Derive Veilid envelope shared secrets for Wireshark.") + src = ap.add_mutually_exclusive_group(required=True) + src.add_argument("--secret-key-file", + help="File containing our node's Ed25519 secret key " + "(32-byte seed, base64url); '-' reads stdin. Preferred: " + "keeps the key out of `ps` output and shell history.") + src.add_argument("--secret-key", + help="Our node's secret key on the command line. Exposed to " + "other users via `ps` and saved in shell history; use " + "--secret-key-file instead where possible.") + ap.add_argument("--public-key", + help="Our node's public key (base64url). Used to exclude " + "ourselves from --from-pcap discovery; derived " + "automatically if omitted.") + ap.add_argument("--peer", action="append", default=[], + help="Peer node ID, with or without a 'VLD0:' prefix. Repeatable.") + ap.add_argument("--from-pcap", + help="Capture file to scan for peers") + ap.add_argument("--tshark", default="tshark", + help="Path to tshark (default: tshark)") + ap.add_argument("--plugin", + default=os.path.join(os.path.dirname(os.path.abspath(__file__)), + os.pardir, "veilid.lua"), + help="Path to veilid.lua, used for peer discovery when the " + "dissector is not already installed (default: the " + "sibling checkout)") + ap.add_argument("--crypto-kind", default=DEFAULT_CRYPTO_KIND, + help=f"Crypto kind to emit (default: {DEFAULT_CRYPTO_KIND})") + args = ap.parse_args() + + if args.crypto_kind != DEFAULT_CRYPTO_KIND: + print(f"error: only {DEFAULT_CRYPTO_KIND} key agreement is implemented; " + f"got {args.crypto_kind!r}. Add its DH/hash construction here " + f"before using it.", file=sys.stderr) + return 2 + + _blake3_selftest() + + if args.secret_key_file: + if args.secret_key_file == "-": + raw = sys.stdin.read() + else: + with open(args.secret_key_file) as fh: + raw = fh.read() + # Tolerate a whole "VLD0::" keypair line as well as a + # bare secret, so `cut`-ing the field out is optional. + raw = raw.strip().splitlines()[0].strip() if raw.strip() else "" + parts = raw.split(":") + secret_text = parts[-1] if parts else "" + else: + secret_text = args.secret_key + + try: + secret = b64url_decode(secret_text) + except Exception as exc: + print(f"error: could not decode the secret key: {exc}", file=sys.stderr) + return 2 + if len(secret) != 32: + print(f"error: secret key decoded to {len(secret)} bytes, expected 32", + file=sys.stderr) + return 2 + + # Derive our own public key so we can exclude ourselves from discovery and + # let the caller confirm this is the node they meant -- without ever + # printing the secret. + try: + derived_pub = ed25519_public_from_seed(secret) + except Exception as exc: + print(f"error: could not derive the public key: {exc}", file=sys.stderr) + return 2 + print(f"# derived node ID: {DEFAULT_CRYPTO_KIND}:{b64url_encode(derived_pub)}", + file=sys.stderr) + + our_pub = b64url_decode(args.public_key) if args.public_key else derived_pub + if args.public_key and our_pub != derived_pub: + print("error: --public-key does not match the key derived from " + "--secret-key; wrong keypair?", file=sys.stderr) + return 2 + + targets: list[tuple[str, bytes]] = [ + (args.crypto_kind, b64url_decode(p)) for p in args.peer + ] + if args.from_pcap: + found = peers_via_dissector(args.from_pcap, args.tshark, args.plugin, our_pub) + if found is None: + print("# note: Veilid dissector unavailable; falling back to a " + "UDP/WebSocket-only scan, which misses TCP-only peers", + file=sys.stderr) + found = peers_from_pcap(args.from_pcap, args.tshark, our_pub) + targets += found + + # De-duplicate while preserving order. + unique: dict[tuple[str, bytes], None] = {} + for t in targets: + unique.setdefault(t, None) + + if not unique: + print("error: no peers given; use --peer and/or --from-pcap", + file=sys.stderr) + return 2 + + print("# veilid shared secrets v1") + print("# ") + emitted = skipped = 0 + # Iterate the keys: each is a (crypto_kind, public_key) tuple. Using + # .items() here would bind peer_pub to the dict value (None). + for kind, peer_pub in unique: + if kind != DEFAULT_CRYPTO_KIND: + print(f"# skipped {b64url_encode(peer_pub)}: unsupported crypto kind {kind}") + skipped += 1 + continue + if len(peer_pub) != 32: + print(f"# skipped: peer key is {len(peer_pub)} bytes, expected 32") + skipped += 1 + continue + try: + shared = derive_shared_secret(secret, peer_pub) + except Exception as exc: + print(f"# skipped {b64url_encode(peer_pub)}: {exc}") + skipped += 1 + continue + print(f"{kind} {b64url_encode(peer_pub)} {shared.hex()}") + emitted += 1 + + print(f"# {emitted} secret(s) derived, {skipped} skipped", file=sys.stderr) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/dissectors/victure-media/LICENSE b/dissectors/victure-media/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/victure-media/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/victure-media/README.md b/dissectors/victure-media/README.md new file mode 100644 index 0000000..f4bf396 --- /dev/null +++ b/dissectors/victure-media/README.md @@ -0,0 +1,42 @@ +# Victure Media — flux audio/vidéo des caméras IP Victure + +Dissecteur Wireshark Lua du **protocole média propriétaire des caméras IP +Victure** (et caméras apparentées), issu d'un travail de recherche de +vulnérabilités : taille du message, deux octets de synchronisation, type de +média, octet de contrôle, numéro de séquence, longueur des données, +horodatage, puis données média brutes. Port TCP 16116. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/TKems/Victure-Camera-Vulnerabilities | +| Commit importé | `952d589dc7906d7d849751b2457015c8d93bfc2b` du 05/09/2024 (branche `main`, dernier commit, qui est aussi la dernière modification de `victure.lua`) | +| Licence amont | GPL-3.0-or-later (`LICENSE` GPL v3 ; en-tête du fichier : « either version 3 of the License, or (at your option) any later version », © 2024 Trevor Kems) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Victure natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `victure.lua` | Protocole `victure-media` sur TCP 16116 | + +Fichier importé tel quel (fins de ligne CRLF conservées) ; seule une +en-tête SPDX + provenance de quatre lignes a été ajoutée en tête. + +## Utilisation + +Copier `victure.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `victure-media`. Champs filtrables : `victure.media_type`, +`victure.seqNum`, `victure.timestamp`… + +## Remarques + +- Le dissecteur suppose un message par segment TCP (pas de réassemblage). +- Les champs et variables sont globaux dans le script amont (pas de + `local`) ; laissé tel quel. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/victure-media/victure.lua b/dissectors/victure-media/victure.lua new file mode 100644 index 0000000..80b8287 --- /dev/null +++ b/dissectors/victure-media/victure.lua @@ -0,0 +1,73 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/TKems/Victure-Camera-Vulnerabilities (victure.lua), +-- commit 952d589dc7906d7d849751b2457015c8d93bfc2b du 05/09/2024. +-- Licence amont : GPL-3.0-or-later (LICENSE amont) — voir README.md. +--[[Victure Camera Vulnerabilties +Copyright (C) 2024 Trevor Kems + +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 3 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, see .]]-- + +victure_protocol = Proto("Victure-Media", "Victure Media Protocol") + +message_size = ProtoField.uint32("victure.message_size", "messageSize", base.DEC) +sync_one = ProtoField.uint8("victure.sync_one", "syncOne", base.HEX) +sync_two = ProtoField.uint8("victure.sync_two", "syncTwo", base.HEX) +media_type = ProtoField.uint8("victure.media_type", "mediaType", base.DEC) +eck_byte = ProtoField.uint8("victure.eck_byte", "eckByte", base.HEX) +seqNum = ProtoField.uint16("victure.seqNum", "seqNum", base.HEX) +data_length = ProtoField.uint16("victure.dataLength", "dataLength", base.HEX) +timestamp = ProtoField.uint32("victure.timestamp", "timestamp", base.HEX) +media_data = ProtoField.bytes("victure.mediaData", "mediaData", base.NONE) + +victure_protocol.fields = {message_size, sync_one, sync_two, media_type, eck_byte, seqNum, data_length, timestamp, media_data} + +function victure_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = victure_protocol.name + + local subtree = tree:add(victure_protocol, buffer(), "Victure Protocol Data") + subtree:add(message_size, buffer(0,4)) + subtree:add(sync_one, buffer(4,1)) + subtree:add(sync_two, buffer(5,1)) + + local media_type_num = buffer(6,1):uint() + local media_type_name = get_media_type_name(media_type_num) + + subtree:add(media_type, buffer(6,1)):append_text(" (" .. media_type_name .. ")") + subtree:add(eck_byte, buffer(7,1)) + subtree:add(seqNum, buffer(8,2)) + subtree:add(data_length, buffer(10,2)) + subtree:add(timestamp, buffer(12,4)) + subtree:add(media_data, buffer(16,length-16)) + +end + +function get_media_type_name(media_type) + local mediaType_name = "Unknown" + + if media_type == 5 then mediaType_name = "MEDIATYPE_VIDEO_H265" + elseif media_type == 2 then mediaType_name = "MEDIATYPE_AUDIO_ALAW" + elseif media_type == 60 then mediaType_name = "MEDIATYPE_AUDIO_MAX" + elseif media_type == 61 then mediaType_name = "ERROR_EOL" + elseif media_type == 62 then mediaType_name = "ERROR_BAD" end + + return mediaType_name + end + + + +local tcp_port = DissectorTable.get("tcp.port") +tcp_port:add(16116, victure_protocol) diff --git a/dissectors/vita49-tomer-harari/LICENSE b/dissectors/vita49-tomer-harari/LICENSE new file mode 100644 index 0000000..3838063 --- /dev/null +++ b/dissectors/vita49-tomer-harari/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Tomer Harari + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/vita49-tomer-harari/README.md b/dissectors/vita49-tomer-harari/README.md new file mode 100644 index 0000000..ffc6aaa --- /dev/null +++ b/dissectors/vita49-tomer-harari/README.md @@ -0,0 +1,88 @@ +# VITA 49.2 — Tomer Harari + +Dissecteur Wireshark Lua du **VITA 49.2** (VITA Radio Transport, VRT) et +du profil **DIFI** sur UDP. Il décode : +- les paquets de données, de contexte et de commande ; +- le prologue : type, Class ID, horodatages TSI/TSF, compteur, taille ; +- plusieurs paquets VRT dans un même datagramme ; +- le parcours complet du CIF0 : fréquences radix 20 converties en Hz, + niveaux en dB, blocs GPS/INS ; +- les champs de version du CIF1 ; +- le préambule des commandes : mot CAM, Message ID, Controllee et + Controller ; +- les indicateurs de la remorque des paquets de données ; +- le marquage DIFI par son OUI `0x6A621E`. + +Il signale par info d'expert les trous de compteur, les tailles +incohérentes et les pertes d'échantillons (issue #511). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Tomer-Harari/vita49.2-wireshark-dissector (`vita49.lua`) | +| Commit importé | `1f5ab2ba2b5c072596c89e742c7cd524b262d638` du 04/08/2026 (dernier commit de la branche par défaut `main`, et dernière modification de `vita49.lua`) | +| Licence amont | MIT, « Copyright (c) 2026 Tomer Harari » (`LICENSE` du dépôt), compatible avec la licence de ce dépôt (GPL-3.0-or-later) | +| Natif Wireshark 4.6.4 | Oui, en partie : `vrt` (« VITA 49 », `packet-vrt.c`) sur UDP 4991 ; ce script prend sa place sur ce port (voir Limites) | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). La capture +`tests/corpus.pcap` (40 paquets du paquetiseur RTL de +[vita49.2-core](https://github.com/Tomer-Harari/vita49.2-core)) est copiée +telle quelle dans `captures/`. Le générateur de captures et la suite de +tests amont (`tools/make_test_pcap.py`, `tests/run_tests.py`) ne sont pas +importés : ils supposent l'arborescence amont. + +Autres dissecteurs du même domaine dans ce dépôt : `difi-consortium` et +`difi-jo-rivera` (profil DIFI seul). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/vita49.lua` | Protocole `vita49` (« VITA 49.2 Radio Transport ») sur UDP 4991 (ligne 432), plage de ports modifiable (préférence « UDP ports », ligne 148), heuristique UDP (ligne 451) ; aucune variable globale | +| `captures/corpus.pcap` | 40 paquets VRT réels émis par le paquetiseur RTL amont | + +## Utilisation + +Copier `src/vita49.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis Ctrl+Maj+L, +ou sans installation : + +```sh +tshark -X lua_script:vita49.lua -r captures/corpus.pcap +``` + +Filtres : `vita49`, `vita49.type == 4`, `vita49.rf_freq_hz > 100e6`, +`vita49.sid`, `vita49.cam_action == 2`, `_ws.expert.message contains "gap"`. + +## Vérification à l'import + +tshark 4.6.4 (Lua 5.4) : le fichier se charge sans erreur +(`luac5.4 -p` : OK). + +| Essai | Résultat | +|---|---| +| Suite amont lancée dans le dépôt amont (`make_test_pcap.py` puis `run_tests.py`, `TSHARK=tshark`) | `PASS: 28 packets field-exact, expert checks correct, corpus 40/40 clean` | +| `captures/corpus.pcap` | 40 trames `VITA-49.2` | +| Infos d'expert de la capture de test amont | trame 24 « Packet count gap », 25 « Packet Size exceeds the remaining datagram bytes », 27 « Trailer signals sample loss » | +| Même capture sans le script | 27 trames prises par le natif `VITA 49`, 1 laissée à UDP (port non standard) | +| Capture DIFI GNU Radio de `jo-rivera/difi-wireshark-dissector` (22 624 trames, UDP 50003) | toutes reconnues par l'heuristique ; contexte : CIF0 `0x00000000`, donc aucun champ de contexte détaillé (données restées dans `Payload`) | +| Synthétique : datagramme quelconque de 12 octets dont les octets 2 et 3 valent `0x0003` | **pris par l'heuristique** (« Packet Type: Unknown (13) ») puis erreur Lua `vita49.lua:353: Range is out of bounds` | + +## Limites constatées + +- **Heuristique très permissive** (lignes 436 à 451). Elle n'exige que des + champs Packet Size cohérents avec la longueur du datagramme : tout + datagramme UDP non réclamé dont les octets 2 et 3 donnent sa longueur en + mots de 32 bits est pris pour du VRT, ce qui peut finir par une erreur + Lua. Désactiver l'heuristique (`vita49_udp`, « Analyser › Protocoles + activés ») si elle gêne. +- Remplace le dissecteur natif `vrt` sur UDP 4991 tant que le script est + chargé (filtres `vrt.*` sans effet sur ce port). +- CIF1 : seuls les champs de version sont décodés. Tout autre champ CIF1 + arrête le décodage détaillé avec une note d'expert (ligne 247). +- DIFI reconnu par l'OUI `0x6A621E` seulement ; la capture GNU Radio de + jo-rivera, qui utilise `0x7C386C`, n'est donc pas marquée DIFI. diff --git a/dissectors/vita49-tomer-harari/captures/corpus.pcap b/dissectors/vita49-tomer-harari/captures/corpus.pcap new file mode 100644 index 0000000..c21bc09 Binary files /dev/null and b/dissectors/vita49-tomer-harari/captures/corpus.pcap differ diff --git a/dissectors/vita49-tomer-harari/src/vita49.lua b/dissectors/vita49-tomer-harari/src/vita49.lua new file mode 100644 index 0000000..04bf361 --- /dev/null +++ b/dissectors/vita49-tomer-harari/src/vita49.lua @@ -0,0 +1,451 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/Tomer-Harari/vita49.2-wireshark-dissector (vita49.lua), +-- commit 1f5ab2ba2b5c072596c89e742c7cd524b262d638 du 04/08/2026 (dernière modification du fichier : +-- commit 1f5ab2ba2b5c072596c89e742c7cd524b262d638 du 04/08/2026). +-- Licence amont : MIT, « Copyright (c) 2026 Tomer Harari » (LICENSE du dépôt) — voir README.md et LICENSE. +-- vita49.lua - Wireshark dissector for VITA 49.2 (VRT) with DIFI awareness +-- +-- Dissects VRT packets carried over UDP: the full prologue per ANSI/VITA +-- 49.2-2017 section 5.1 (header, stream ID, class ID, TSI/TSF timestamps), the +-- trailer of signal data packets, the payload, and - for context packets - +-- a full CIF0/CIF1 field walk (section 9.1): every enabled field is decoded at its +-- correct size, with the 64-bit radix-20 frequency fields (section 9.5.1) shown +-- in Hz. Recognizes the DIFI profile by its OUI (0x6A621E) and names its +-- packet classes. Multiple VRT packets per UDP datagram are walked using +-- the Packet Size field. +-- +-- Also decodes the signal-data trailer bit pairs (section 5.1.6), the command +-- packet preamble - CAM word, Message ID, Controllee/Controller IDs +-- (section 8.2) - renders UTC integer timestamps as calendar time, and +-- registers a heuristic so VRT streams are recognized on any UDP port. +-- +-- Expert checks: +-- * packet count gaps, tracked per (type, stream ID, class) - the scope +-- the standard gives the counter (section 5.1.1.7) +-- * Packet Size disagreeing with the remaining datagram bytes +-- * sample loss signalled in a data packet trailer +-- +-- Install: copy into Wireshark's "Personal Lua Plugins" folder, or run +-- tshark -X lua_script:vita49.lua -r capture.pcap +-- Ports: UDP 4991 by default (the DIFI convention), editable in +-- Preferences; other ports are caught by the heuristic. + +local vrt = Proto("vita49", "VITA 49.2 Radio Transport") + +local PACKET_TYPES = { + [0] = "Signal Data (no Stream ID)", + [1] = "Signal Data", + [2] = "Extension Data (no Stream ID)", + [3] = "Extension Data", + [4] = "Context", + [5] = "Extension Context", + [6] = "Command", + [7] = "Extension Command", +} + +local TSI_NAMES = { [0] = "none", [1] = "UTC", [2] = "GPS", [3] = "other" } +local TSF_NAMES = { [0] = "none", [1] = "sample count", + [2] = "real time (ps)", [3] = "free running" } + +local DIFI_OUI = 0x6A621E +local DIFI_CLASSES = { + ["0:0"] = "DIFI Standard Flow Data", + ["0:1"] = "DIFI Standard Context", + ["1:4"] = "DIFI Version Context", +} + +local f = vrt.fields +f.ptype = ProtoField.uint8 ("vita49.type", "Packet Type", base.DEC, PACKET_TYPES) +f.cid = ProtoField.bool ("vita49.cid", "Class ID present") +f.ind = ProtoField.uint8 ("vita49.ind", "Indicator bits", base.HEX) +f.trailer_p = ProtoField.bool("vita49.trailer_present", "Trailer present") +f.tsi = ProtoField.uint8 ("vita49.tsi", "TSI (integer timestamp)", base.DEC, TSI_NAMES) +f.tsf = ProtoField.uint8 ("vita49.tsf", "TSF (fractional timestamp)", base.DEC, TSF_NAMES) +f.seq = ProtoField.uint8 ("vita49.seq", "Packet Count", base.DEC) +f.size = ProtoField.uint16("vita49.size", "Packet Size (words)", base.DEC) +f.sid = ProtoField.uint32("vita49.sid", "Stream ID", base.HEX) +f.oui = ProtoField.uint24("vita49.oui", "Class OUI", base.HEX) +f.iclass = ProtoField.uint16("vita49.info_class", "Information Class", base.HEX) +f.pclass = ProtoField.uint16("vita49.packet_class", "Packet Class", base.HEX) +f.tsint = ProtoField.uint32("vita49.ts_int", "Integer Timestamp", base.DEC) +f.tsfrac = ProtoField.uint64("vita49.ts_frac", "Fractional Timestamp", base.DEC) +f.payload = ProtoField.bytes ("vita49.payload", "Payload") +f.paywords= ProtoField.uint16("vita49.payload_words", "Payload Words", base.DEC) +f.trailer = ProtoField.uint32("vita49.trailer", "Trailer", base.HEX) +f.difi = ProtoField.string("vita49.difi", "DIFI Class") + +-- Context Information Fields (section 9.1) +f.cif0 = ProtoField.uint32("vita49.cif0", "CIF0", base.HEX) +f.cif1 = ProtoField.uint32("vita49.cif1", "CIF1", base.HEX) +f.ref_point = ProtoField.uint32("vita49.ref_point", "Reference Point ID", base.HEX) +f.bandwidth = ProtoField.double("vita49.bandwidth_hz", "Bandwidth (Hz)") +f.if_freq = ProtoField.double("vita49.if_freq_hz", "IF Reference Frequency (Hz)") +f.rf_freq = ProtoField.double("vita49.rf_freq_hz", "RF Reference Frequency (Hz)") +f.rf_offset = ProtoField.double("vita49.rf_offset_hz", "RF Frequency Offset (Hz)") +f.if_band_off = ProtoField.double("vita49.if_band_offset_hz", "IF Band Offset (Hz)") +f.ref_level = ProtoField.float ("vita49.ref_level_dbm", "Reference Level (dBm)") +f.gain1 = ProtoField.float ("vita49.gain1_db", "Gain Stage 1 (dB)") +f.gain2 = ProtoField.float ("vita49.gain2_db", "Gain Stage 2 (dB)") +f.overrange = ProtoField.uint32("vita49.over_range", "Over-Range Count", base.DEC) +f.sample_rate = ProtoField.double("vita49.sample_rate_hz", "Sample Rate (Hz)") +f.ts_adjust = ProtoField.uint64("vita49.ts_adjust_fs", "Timestamp Adjustment (fs)", base.DEC) +f.ts_calib = ProtoField.uint32("vita49.ts_calib", "Timestamp Calibration Time", base.DEC) +f.temperature = ProtoField.float ("vita49.temperature_c", "Temperature (degC)") +f.device_id = ProtoField.bytes ("vita49.device_id", "Device Identifier") +f.state_event = ProtoField.uint32("vita49.state_event", "State/Event Indicators", base.HEX) +f.data_format = ProtoField.uint64("vita49.data_format", "Data Packet Payload Format", base.HEX) +f.cif_raw = ProtoField.bytes ("vita49.cif_field", "CIF field (raw)") +f.v49_ver = ProtoField.uint32("vita49.v49_spec_version", "V49 Spec Version", base.HEX) +f.build_ydr = ProtoField.uint32("vita49.build_ydr", "Year/Day/Revision word", base.HEX) +f.ts_utc = ProtoField.string("vita49.ts_utc", "Timestamp (UTC)") + +-- signal-data trailer (section 5.1.6): enable/indicator bit pairs +local TRAILER_BITS = { + {31, 19, "Calibrated Time"}, + {30, 18, "Valid Data"}, + {29, 17, "Reference Lock"}, + {28, 16, "AGC/MGC"}, + {27, 15, "Detected Signal"}, + {26, 14, "Spectral Inversion"}, + {25, 13, "Over-Range"}, + {24, 12, "Sample Loss"}, +} +f.trl_flag = ProtoField.string("vita49.trailer_flag", "Trailer Indicator") +f.trl_ecount = ProtoField.uint8 ("vita49.trailer_context_count", + "Associated Context Packet Count", base.DEC) + +-- command preamble (section 8.2) +local ACTION_NAMES = { [0] = "no-action", [1] = "dry-run", + [2] = "execute", [3] = "reserved" } +f.cam = ProtoField.uint32("vita49.cam", "CAM (Control/Ack Mode)", base.HEX) +f.cam_ce_en = ProtoField.bool ("vita49.cam_controllee", "Controllee ID present", 32, nil, 0x80000000) +f.cam_cr_en = ProtoField.bool ("vita49.cam_controller", "Controller ID present", 32, nil, 0x20000000) +f.cam_partial = ProtoField.bool ("vita49.cam_partial", "Partial-action permitted", 32, nil, 0x08000000) +f.cam_warn = ProtoField.bool ("vita49.cam_warnings", "Warnings requested", 32, nil, 0x04000000) +f.cam_err = ProtoField.bool ("vita49.cam_errors", "Errors requested", 32, nil, 0x02000000) +f.cam_action = ProtoField.uint32("vita49.cam_action", "Action", base.DEC, ACTION_NAMES, 0x01800000) +f.cam_nack = ProtoField.bool ("vita49.cam_nack", "Not-Ack only", 32, nil, 0x00400000) +f.msg_id = ProtoField.uint32("vita49.message_id", "Message ID", base.HEX) +f.controllee = ProtoField.uint32("vita49.controllee_id", "Controllee ID", base.HEX) +f.controller = ProtoField.uint32("vita49.controller_id", "Controller ID", base.HEX) +f.cmd_ack = ProtoField.bool ("vita49.cmd_ack", "Acknowledge packet") +f.cmd_cancel = ProtoField.bool ("vita49.cmd_cancel", "Cancellation packet") + +local ex_seq = ProtoExpert.new("vita49.seq_gap.expert", + "Packet count gap (lost or reordered packets)", + expert.group.SEQUENCE, expert.severity.WARN) +local ex_size = ProtoExpert.new("vita49.bad_size.expert", + "Packet Size exceeds the remaining datagram bytes", + expert.group.MALFORMED, expert.severity.ERROR) +local ex_cif = ProtoExpert.new("vita49.cif_var.expert", + "Variable-size CIF field present; detailed decode stops here", + expert.group.UNDECODED, expert.severity.NOTE) +local ex_loss = ProtoExpert.new("vita49.sample_loss.expert", + "Trailer signals sample loss in this packet", + expert.group.SEQUENCE, expert.severity.WARN) +vrt.experts = { ex_seq, ex_size, ex_cif, ex_loss } + +vrt.prefs.ports = Pref.range("UDP ports", "4991", + "UDP ports carrying VRT packets", 65535) +local registered_ports = "4991" +function vrt.prefs_changed() + local udp = DissectorTable.get("udp.port") + udp:remove(registered_ports, vrt) + registered_ports = tostring(vrt.prefs.ports) + udp:add(registered_ports, vrt) +end + +-- sequence tracking: first-pass state and per-frame verdicts +local seq_last, seq_gap_frames +function vrt.init() + seq_last = {} + seq_gap_frames = {} +end + +-- 64-bit two's complement with the radix point right of bit 20 +-- (section 9.5.1). tonumber() is exact up to 2^53, i.e. frequencies up +-- to ~8.5 THz at radix-20 - far beyond anything VRT carries. +local function radix20(range) + return range:int64():tonumber() / 1048576.0 +end + +-- CIF0 field walk table (section 9.1): MSB-first order of the enabled fields. +-- {bit, words (0 = variable), handler} +local CIF0_FIELDS = { + {30, 1, function(t, r) t:add(f.ref_point, r) end}, + {29, 2, function(t, r) t:add(f.bandwidth, r, radix20(r)) end}, + {28, 2, function(t, r) t:add(f.if_freq, r, radix20(r)) end}, + {27, 2, function(t, r) t:add(f.rf_freq, r, radix20(r)) end}, + {26, 2, function(t, r) t:add(f.rf_offset, r, radix20(r)) end}, + {25, 2, function(t, r) t:add(f.if_band_off, r, radix20(r)) end}, + {24, 1, function(t, r) + t:add(f.ref_level, r(2, 2), r(2, 2):int() / 128.0) end}, + {23, 1, function(t, r) + t:add(f.gain2, r(0, 2), r(0, 2):int() / 128.0) + t:add(f.gain1, r(2, 2), r(2, 2):int() / 128.0) end}, + {22, 1, function(t, r) t:add(f.overrange, r) end}, + {21, 2, function(t, r) t:add(f.sample_rate, r, radix20(r)) end}, + {20, 2, function(t, r) t:add(f.ts_adjust, r) end}, + {19, 1, function(t, r) t:add(f.ts_calib, r) end}, + {18, 1, function(t, r) + t:add(f.temperature, r(2, 2), r(2, 2):int() / 64.0) end}, + {17, 2, function(t, r) t:add(f.device_id, r) end}, + {16, 1, function(t, r) t:add(f.state_event, r) end}, + {15, 2, function(t, r) t:add(f.data_format, r) end}, + {14, 11, function(t, r) t:add(f.cif_raw, r):append_text(" (Formatted GPS)") end}, + {13, 11, function(t, r) t:add(f.cif_raw, r):append_text(" (Formatted INS)") end}, + {12, 13, function(t, r) t:add(f.cif_raw, r):append_text(" (ECEF Ephemeris)") end}, + {11, 13, function(t, r) t:add(f.cif_raw, r):append_text(" (Relative Ephemeris)") end}, + {10, 1, function(t, r) t:add(f.cif_raw, r):append_text(" (Ephemeris Ref ID)") end}, + {9, 0, nil}, -- GPS ASCII: variable size + {8, 0, nil}, -- Context Association Lists: variable size +} + +-- Decode the context section of a context packet: CIF0 (+CIF1) and every +-- enabled field. Returns nothing; adds to the tree. +local function decode_context(tvb, tree, p, pay_end) + if pay_end - p < 4 then return end + local cif0r = tvb(p, 4) + local cif0 = cif0r:uint() + tree:add(f.cif0, cif0r) + p = p + 4 + + local cif1 = nil + if cif0 % 4 >= 2 then -- bit 1: CIF1 enable + cif1 = tvb(p, 4) + tree:add(f.cif1, cif1) + p = p + 4 + end + + for _, e in ipairs(CIF0_FIELDS) do + local bit_i, words, fn = e[1], e[2], e[3] + if math.floor(cif0 / 2 ^ bit_i) % 2 == 1 then + if words == 0 then + tree:add_proto_expert_info(ex_cif) + if pay_end > p then + tree:add(f.cif_raw, tvb(p, pay_end - p)) + end + return + end + if p + words * 4 > pay_end then return end + fn(tree, tvb(p, words * 4)) + p = p + words * 4 + end + end + + if cif1 then + local c1 = cif1:uint() + local handled = 0 + if math.floor(c1 / 8) % 2 == 1 then -- bit 3: V49 spec version + tree:add(f.v49_ver, tvb(p, 4)); p = p + 4 + handled = handled + 8 + end + if math.floor(c1 / 4) % 2 == 1 then -- bit 2: year/day/revision + tree:add(f.build_ydr, tvb(p, 4)); p = p + 4 + handled = handled + 4 + end + -- any other enabled CIF1 field has no size table here: stop the + -- detailed decode honestly rather than misalign what follows + if c1 - handled ~= 0 then + tree:add_proto_expert_info(ex_cif) + if pay_end > p then + tree:add(f.cif_raw, tvb(p, pay_end - p)) + end + end + end +end + +-- signal-data trailer (section 5.1.6): show each indicator whose enable bit +-- is set, plus the associated-context count when its E bit is on +local function decode_trailer(tree, r) + local w = r:uint() + local sub = tree:add(f.trailer, r) + local loss = false + for _, e in ipairs(TRAILER_BITS) do + local en_bit, ind_bit, name = e[1], e[2], e[3] + if math.floor(w / 2 ^ en_bit) % 2 == 1 then + local v = math.floor(w / 2 ^ ind_bit) % 2 + sub:add(f.trl_flag, r, string.format("%s = %d", name, v)) + if name == "Sample Loss" and v == 1 then + loss = true + end + end + end + if math.floor(w / 128) % 2 == 1 then -- bit 7: count enable + sub:add(f.trl_ecount, r, w % 128) + end + if loss then + tree:add_proto_expert_info(ex_loss) + end +end + +-- command packet preamble (section 8.2): CAM, Message ID, optional +-- Controllee/Controller IDs (32-bit form), then the CIF control section +local function decode_command(tvb, tree, p, pay_end, ind) + tree:add(f.cmd_ack, ind % 8 >= 4):set_generated() + tree:add(f.cmd_cancel, ind % 2 == 1):set_generated() + if pay_end - p < 8 then return end + local camr = tvb(p, 4) + local cam = camr:uint() + local ct = tree:add(f.cam, camr) + ct:add(f.cam_ce_en, camr) + ct:add(f.cam_cr_en, camr) + ct:add(f.cam_partial, camr) + ct:add(f.cam_warn, camr) + ct:add(f.cam_err, camr) + ct:add(f.cam_action, camr) + ct:add(f.cam_nack, camr) + p = p + 4 + tree:add(f.msg_id, tvb(p, 4)); p = p + 4 + if math.floor(cam / 2 ^ 31) % 2 == 1 then -- controllee, 32-bit ID + if math.floor(cam / 2 ^ 30) % 2 == 1 then return end + if pay_end - p < 4 then return end + tree:add(f.controllee, tvb(p, 4)); p = p + 4 + end + if math.floor(cam / 2 ^ 29) % 2 == 1 then -- controller, 32-bit ID + if math.floor(cam / 2 ^ 28) % 2 == 1 then return end + if pay_end - p < 4 then return end + tree:add(f.controller, tvb(p, 4)); p = p + 4 + end + decode_context(tvb, tree, p, pay_end) +end + +local function dissect_one(tvb, pinfo, root, off, remaining) + local hdr = tvb(off, 4) + local ptype = hdr:bitfield(0, 4) + local has_c = hdr:bitfield(4, 1) == 1 + local ind = hdr:bitfield(5, 3) + local tsi = hdr:bitfield(8, 2) + local tsf = hdr:bitfield(10, 2) + local seq = hdr:bitfield(12, 4) + local size_w = hdr:bitfield(16, 16) + local is_data = ptype <= 3 + local is_ctx = ptype == 4 or ptype == 5 + local has_sid = (ptype ~= 0) and (ptype ~= 2) + local has_trl = is_data and hdr:bitfield(5, 1) == 1 -- bit 26 + + local nbytes = size_w * 4 + local tree = root:add(vrt, tvb(off, math.min(nbytes, remaining)), + string.format("VITA 49.2, %s, seq %d, %d words", + PACKET_TYPES[ptype] or "?", seq, size_w)) + + tree:add(f.ptype, hdr, ptype) + tree:add(f.cid, hdr, has_c) + tree:add(f.ind, hdr, ind) + if is_data then tree:add(f.trailer_p, hdr, has_trl) end + tree:add(f.tsi, hdr, tsi) + tree:add(f.tsf, hdr, tsf) + tree:add(f.seq, hdr, seq) + tree:add(f.size, hdr, size_w) + + if nbytes > remaining or size_w == 0 then + tree:add_proto_expert_info(ex_size) + return remaining -- consume the rest, stop walking + end + + local p = off + 4 + local sid = nil + if has_sid then + sid = tvb(p, 4):uint() + tree:add(f.sid, tvb(p, 4)); p = p + 4 + end + + local difi_key = nil + local icl, pcl = nil, nil + if has_c then + local oui = tvb(p, 4):bitfield(8, 24) + tree:add(f.oui, tvb(p + 1, 3)) + icl = tvb(p + 4, 2):uint() + pcl = tvb(p + 6, 2):uint() + tree:add(f.iclass, tvb(p + 4, 2)) + tree:add(f.pclass, tvb(p + 6, 2)) + if oui == DIFI_OUI then + difi_key = DIFI_CLASSES[icl .. ":" .. pcl] or "DIFI (unknown class)" + tree:add(f.difi, difi_key):set_generated() + end + p = p + 8 + end + + if tsi ~= 0 then + tree:add(f.tsint, tvb(p, 4)) + if tsi == 1 then -- UTC epoch seconds + tree:add(f.ts_utc, tvb(p, 4), format_date(tvb(p, 4):uint()) + ):set_generated() + end + p = p + 4 + end + if tsf ~= 0 then + tree:add(f.tsfrac, tvb(p, 8)); p = p + 8 + end + + local tail = has_trl and 4 or 0 + local pay_bytes = off + nbytes - p - tail + if pay_bytes > 0 then + tree:add(f.payload, tvb(p, pay_bytes)) + tree:add(f.paywords, pay_bytes / 4):set_generated() + if is_ctx then + decode_context(tvb, tree, p, p + pay_bytes) + elseif ptype == 6 or ptype == 7 then + decode_command(tvb, tree, p, p + pay_bytes, ind) + end + end + if has_trl then + decode_trailer(tree, tvb(off + nbytes - 4, 4)) + end + + -- sequence continuity per (type, stream ID, class): the packet count + -- runs independently per stream AND packet class (section 5.1.1.7) + local key = ptype .. ":" .. tostring(sid or "-") .. ":" + .. tostring(icl or "-") .. ":" .. tostring(pcl or "-") + if not pinfo.visited then + local last = seq_last[key] + if last ~= nil and seq ~= (last + 1) % 16 then + seq_gap_frames[pinfo.number] = true + end + seq_last[key] = seq + end + if seq_gap_frames[pinfo.number] then + tree:add_proto_expert_info(ex_seq) + end + + -- info column + local info = string.format("%s seq=%d", + difi_key or PACKET_TYPES[ptype] or "VRT", seq) + if sid then info = info .. string.format(" SID=0x%X", sid) end + if pinfo.cols.info then + pinfo.cols.info:append(" | " .. info) + end + return nbytes +end + +function vrt.dissector(tvb, pinfo, root) + pinfo.cols.protocol = "VITA-49.2" + pinfo.cols.info = "" + local off = 0 + while tvb:len() - off >= 4 do + local used = dissect_one(tvb, pinfo, root, off, tvb:len() - off) + off = off + used + end + return off +end + +DissectorTable.get("udp.port"):add(4991, vrt) + +-- heuristic: accept a UDP payload iff walking it as VRT packets by their +-- Packet Size fields consumes the datagram exactly +local function vrt_heuristic(tvb, pinfo, root) + local len = tvb:len() + local off = 0 + local n = 0 + while off + 4 <= len do + local size_w = tvb(off, 4):bitfield(16, 16) + if size_w == 0 then return false end + off = off + size_w * 4 + n = n + 1 + if n > 64 then return false end + end + if off ~= len or n == 0 then return false end + vrt.dissector(tvb, pinfo, root) + return true +end +vrt:register_heuristic("udp", vrt_heuristic) diff --git a/dissectors/voter-allstarlink/LICENSE b/dissectors/voter-allstarlink/LICENSE new file mode 100644 index 0000000..0ad25db --- /dev/null +++ b/dissectors/voter-allstarlink/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + 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 +them 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/dissectors/voter-allstarlink/README.md b/dissectors/voter-allstarlink/README.md new file mode 100644 index 0000000..e8fe398 --- /dev/null +++ b/dissectors/voter-allstarlink/README.md @@ -0,0 +1,82 @@ +# VOTER — protocole des récepteurs votants d'AllStarLink + +Dissecteur Wireshark Lua du protocole VOTER (« Voice Observing Time +Extension for Radio », créé par Jim Dixon, WB6NIL) : les cartes +VOTER/RTCM envoient au serveur Asterisk (`chan_voter`) l'audio de leurs +récepteurs radio, horodaté par GPS et accompagné du niveau de signal, +pour que le serveur retienne le meilleur récepteur. Le script décode +l'en-tête (secondes, nanosecondes ou numéro de séquence, défi et +réponse d'authentification, type de charge utile) et les charges +utiles authentification + options, RSSI + audio µ-law, GPS, +RSSI + audio ADPCM et ping, sur UDP 667 (issue #944). Auteur : Mason +Nelson, N5LSN. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/AllStarLink/Voter (`VOTER-dissector/voter.lua`) | +| Commit importé | `d85a1d796e7aaec4a5df0c349a6f04e528b5c1d1` du 24/10/2026 (dernier commit de la branche par défaut `master`) ; dernière modification du fichier : commit `8f4e65ad78ed3e0be175bac32603f5a92ddc75f6` du 31/05/2024 | +| Licence amont | AGPL-3.0-only : `LICENSE` du dépôt (texte de l'AGPLv3, sans mention « or later ») ; le script n'a pas d'en-tête de licence. Comme pour `aerospike`, la licence est conservée telle quelle (la GPLv3 permet de combiner avec l'AGPLv3, article 13), sans re-licenciement | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur VOTER dans `tshark -G protocols` | + +Texte de la licence : fichier `LICENSE` de ce dossier (copie conforme +du `LICENSE` amont). Le fichier est repris tel quel (aucune +modification ; pas de fin de ligne finale, comme l'amont) ; seule +l'en-tête de provenance de cinq lignes est ajoutée en tête de +`voter.lua` (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/voter.lua` | Protocole `voter` (« VOTER Protocol », ligne 15, variable globale) ; champs `voter.*` (lignes 18 à 31) ; dissecteur ligne 34 ; inscription sur UDP 667 ligne 104 | + +## Utilisation + +Copier `src/voter.lua` dans le dossier des plugins Lua personnels +(`~/.local/lib/wireshark/plugins/`), ou le charger par +`-X lua_script:voter.lua`. Le trafic du port UDP 667 (port par défaut +des cartes VOTER) est décodé. Filtres : `voter`, `voter.payload_type`, +`voter.rssi`, `voter.flags`, `voter.longitude`, `voter.latitude`… + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, par `-X lua_script:` et dans le +dossier des plugins : chargement sans erreur. Le dépôt amont ne +contient aucune capture. Essais sur une capture synthétique (UDP 667), +non commitée ; formats comparés au micrologiciel du même dépôt +(`VOTER_RTCM-firmware/build-files/ASL-VOTER.X/src/Voter.c`, structures +`VOTER_PACKET_HEADER`, `audio_packet`, `gps_packet`) : + +| Essai | Résultat | +|---|---| +| Authentification avec octet d'options (25 octets) | « [0 - Auth + Flags] Seconds: 1793612187, Nanoseconds: 500000000 », Flags 0x22 | +| Authentification sans options (en-tête seul, 24 octets) | Erreur Lua « Range is out of bounds » (ligne 74) | +| µ-law : RSSI 200 + 160 octets | « [1 - RSSI + Mu-law] », RSSI 200 | +| GPS : `4848.120N`, `00747.540E`, `150.0M` | Champs inversés : « Longitude: 4848.120N », « Latitude: 00747.540E » | +| ADPCM : RSSI 128 + 163 octets | « [3 - RSSI + ADPCM] », RSSI 128 | +| Ping avec 8 octets | « [5 - PING] », données affichées | +| Types 4 et 9 | « [4 - RESERVED] » et « Unknown Payload Type: 9 », erreur « Unknown payload type » dans les deux cas | +| Paquet de 10 octets | Erreur Lua « Range is out of bounds » (ligne 40) | +| µ-law tronqué (100 octets d'audio) | Erreur Lua « Range is out of bounds » (ligne 78) | + +## Limites constatées + +- Les libellés GPS sont inversés : le micrologiciel envoie + `lat[9]` puis `lon[10]` puis `elev[7]`, mais le script appelle + « Longitude » les 9 premiers octets et « Latitude » les 10 suivants + (lignes 83 et 84). Les valeurs sont justes, les noms des champs + `voter.longitude` et `voter.latitude` sont échangés. +- Aucune vérification de longueur : un paquet plus court que l'en-tête, + une authentification sans octet d'options (envoyée par le + micrologiciel tant qu'il n'est pas authentifié) ou un audio tronqué + provoquent une erreur Lua au lieu d'un avertissement. +- L'audio µ-law et ADPCM est affiché en octets bruts, sans décodage ni + lecture RTP. +- Le défi d'authentification est affiché comme une chaîne ; la réponse + (`digest`) n'est pas vérifiée. +- Le type 4 est reconnu dans la colonne Info (« RESERVED ») mais signalé + comme inconnu dans l'arbre. +- `voter_proto` est une variable globale (ligne 15). +- Seul le port UDP 667 est inscrit. diff --git a/dissectors/voter-allstarlink/src/voter.lua b/dissectors/voter-allstarlink/src/voter.lua new file mode 100644 index 0000000..93f5f96 --- /dev/null +++ b/dissectors/voter-allstarlink/src/voter.lua @@ -0,0 +1,104 @@ +-- SPDX-License-Identifier: AGPL-3.0-only +-- Importé de https://github.com/AllStarLink/Voter (VOTER-dissector/voter.lua), +-- commit d85a1d796e7aaec4a5df0c349a6f04e528b5c1d1 du 24/10/2026 (dernière modification du fichier : +-- commit 8f4e65ad78ed3e0be175bac32603f5a92ddc75f6 du 31/05/2024). +-- Licence amont : AGPL-3.0 (LICENSE amont) — voir README.md et LICENSE. +-- VOTER Protocol Dissector for Wireshark +-- Created by Mason Nelson, N5LSN/WRKF394 + +-- The VOTER Protocol – Voice Observing Time Extension (for) Radio +-- was created by Jim Dixon, WB6NIL (SK). This protocol is used for +-- transmission of audio signals from remote radio receivers along with +-- ultra-precise (GPS-based) timing information and signal quality. + +-- Define the VOTER protocol +voter_proto = Proto("voter", "VOTER Protocol") + +-- Define the fields of the VOTER protocol +local fields = voter_proto.fields +fields.seconds = ProtoField.uint32("voter.seconds", "Seconds", base.DEC) +fields.nanoseconds_or_seq = ProtoField.uint32("voter.nanoseconds_or_seq", "Nanoseconds/Sequence", base.DEC) +fields.auth_challenge = ProtoField.string("voter.auth_challenge", "Auth Challenge") +fields.auth_response = ProtoField.uint32("voter.auth_response", "Auth Response", base.HEX) +fields.payload_type = ProtoField.uint16("voter.payload_type", "Payload Type", base.DEC) +fields.flags = ProtoField.uint8("voter.flags", "Flags", base.HEX) +fields.rssi = ProtoField.uint8("voter.rssi", "RSSI", base.DEC) +fields.mu_law_audio = ProtoField.bytes("voter.mu_law_audio", "Mu-law Audio") +fields.longitude = ProtoField.string("voter.longitude", "Longitude") +fields.latitude = ProtoField.string("voter.latitude", "Latitude") +fields.elevation = ProtoField.string("voter.elevation", "Elevation") +fields.adpcm_audio = ProtoField.bytes("voter.adpcm_audio", "ADPCM Audio") +fields.ping_payload = ProtoField.bytes("voter.ping_payload", "Ping Payload") + +-- Dissector function +function voter_proto.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = voter_proto.name + + -- Parse the common header + local seconds = buffer(0, 4):uint() + local nanoseconds_or_seq = buffer(4, 4):uint() + local payload_type = buffer(22, 2):uint() + + -- Set the info column text based on payload type + local info_text + if payload_type == 0 then + info_text = string.format("[0 - Auth + Flags] Seconds: %d, Nanoseconds: %d", seconds, nanoseconds_or_seq) + elseif payload_type == 1 then + info_text = string.format("[1 - RSSI + Mu-law] Seconds: %d, Nanoseconds: %d", seconds, nanoseconds_or_seq) + elseif payload_type == 2 then + info_text = string.format("[2 - GPS] Seconds: %d, Nanoseconds: %d", seconds, nanoseconds_or_seq) + elseif payload_type == 3 then + info_text = string.format("[3 - RSSI + ADPCM] Seconds: %d, Nanoseconds: %d", seconds, nanoseconds_or_seq) + elseif payload_type == 4 then + info_text = string.format("[4 - RESERVED] Seconds: %d, Nanoseconds: %d", seconds, nanoseconds_or_seq) + elseif payload_type == 5 then + info_text = string.format("[5 - PING] Seconds: %d, Nanoseconds: %d", seconds, nanoseconds_or_seq) + else + info_text = string.format("[Unknown Payload Type: %d] Seconds: %d, Nanoseconds: %d", payload_type, seconds, nanoseconds_or_seq) + end + pinfo.cols.info = info_text + + -- Create a subtree for VOTER protocol + local subtree = tree:add(voter_proto, buffer(), "VOTER Protocol Data") + + -- Add fields to the subtree + subtree:add(fields.payload_type, buffer(22, 2)) + subtree:add(fields.seconds, buffer(0, 4)) + subtree:add(fields.nanoseconds_or_seq, buffer(4, 4)) + subtree:add(fields.auth_challenge, buffer(8, 10)) + subtree:add(fields.auth_response, buffer(18, 4)) + + -- Switch based on payload type + if payload_type == 0 then + -- Authentication plus flags + subtree:add(fields.flags, buffer(24, 1)) + elseif payload_type == 1 then + -- RSSI information + Mu-law audio + subtree:add(fields.rssi, buffer(24, 1)) + subtree:add(fields.mu_law_audio, buffer(25, 160)) + elseif payload_type == 2 then + -- GPS Information + local gps_len = buffer:len() - 24 + if gps_len > 0 then + subtree:add(fields.longitude, buffer(24, 9)) + subtree:add(fields.latitude, buffer(33, 10)) + subtree:add(fields.elevation, buffer(43, 7)) + end + elseif payload_type == 3 then + -- RSSI information + IMA ADPCM audio + subtree:add(fields.rssi, buffer(24, 1)) + subtree:add(fields.adpcm_audio, buffer(25, 163)) + elseif payload_type == 5 then + -- Ping (connectivity test) + local ping_len = buffer:len() - 24 + if ping_len > 0 then + subtree:add(fields.ping_payload, buffer(24, ping_len)) + end + else + subtree:add_expert_info(PI_MALFORMED, PI_ERROR, "Unknown payload type") + end +end + +-- Register the dissector for a specific UDP port (667) +local udp_port = DissectorTable.get("udp.port") +udp_port:add(667, voter_proto) \ No newline at end of file diff --git a/dissectors/vxsdr-vesperix/LICENSE.md b/dissectors/vxsdr-vesperix/LICENSE.md new file mode 100644 index 0000000..b10871f --- /dev/null +++ b/dissectors/vxsdr-vesperix/LICENSE.md @@ -0,0 +1,590 @@ +# License + +The source code for the VXSDR library is provided under the terms of the +GNU General Public License, either version 3.0 or (at your option) any +later version. + +Alternate licenses for uses not permitted under the GNU General Public License +are available from Vesperix Corporation; please contact us for details. + +## GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright (C) 2007 [Free Software Foundation, Inc.](http://fsf.org/) + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +### Preamble + +The GNU General Public License is a free, copyleft license for software and +other kinds of works. + +The licenses for most software and other practical works are designed to take +away your freedom to share and change the works. By contrast, the GNU General +Public License is intended to guarantee your freedom to share and change all +versions of a program--to make sure it remains free software for all its users. +We, the Free Software Foundation, use the GNU General Public License for most +of our software; it applies also to any other work released this way by its +authors. 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 them 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 prevent others from denying you these rights +or asking you to surrender the rights. Therefore, you have certain +responsibilities if you distribute copies of the software, or if you modify it: +responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must pass on to the recipients the same freedoms that you received. +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. + +Developers that use the GNU GPL protect your rights with two steps: + + 1. assert copyright on the software, and + 2. offer you this License giving you legal permission to copy, distribute + and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that +there is no warranty for this free software. For both users' and authors' sake, +the GPL requires that modified versions be marked as changed, so that their +problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified +versions of the software inside them, although the manufacturer can do so. This +is fundamentally incompatible with the aim of protecting users' freedom to +change the software. The systematic pattern of such abuse occurs in the area of +products for individuals to use, which is precisely where it is most +unacceptable. Therefore, we have designed this version of the GPL to prohibit +the practice for those products. If such problems arise substantially in other +domains, we stand ready to extend this provision to those domains in future +versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States +should not allow patents to restrict development and use of software on +general-purpose computers, but in those that do, we wish to avoid the special +danger that patents applied to a free program could make it effectively +proprietary. To prevent this, the GPL assures that patents cannot be used to +render the program non-free. + +The precise terms and conditions for copying, distribution and modification +follow. + +### TERMS AND CONDITIONS + +#### 0. Definitions. + +*This License* refers to version 3 of the GNU General Public License. + +*Copyright* also means copyright-like laws that apply to other kinds of works, +such as semiconductor masks. + +*The Program* refers to any copyrightable work licensed under this License. +Each licensee is addressed as *you*. *Licensees* and *recipients* may be +individuals or organizations. + +To *modify* a work means to copy from or adapt all or part of the work in a +fashion requiring copyright permission, other than the making of an exact copy. +The resulting work is called a *modified version* of the earlier work or a work +*based on* the earlier work. + +A *covered work* means either the unmodified Program or a work based on the +Program. + +To *propagate* a work means to do anything with it that, without permission, +would make you directly or secondarily liable for infringement under applicable +copyright law, except executing it on a computer or modifying a private copy. +Propagation includes copying, distribution (with or without modification), +making available to the public, and in some countries other activities as well. + +To *convey* a work means any kind of propagation that enables other parties to +make or receive copies. Mere interaction with a user through a computer +network, with no transfer of a copy, is not conveying. + +An interactive user interface displays *Appropriate Legal Notices* to the +extent that it includes a convenient and prominently visible feature that + + 1. displays an appropriate copyright notice, and + 2. tells the user that there is no warranty for the work (except to the + extent that warranties are provided), that licensees may convey the work + under this License, and how to view a copy of this License. + +If the interface presents a list of user commands or options, such as a menu, a +prominent item in the list meets this criterion. + +#### 1. Source Code. + +The *source code* for a work means the preferred form of the work for making +modifications to it. *Object code* means any non-source form of a work. + +A *Standard Interface* means an interface that either is an official standard +defined by a recognized standards body, or, in the case of interfaces specified +for a particular programming language, one that is widely used among developers +working in that language. + +The *System Libraries* of an executable work include anything, other than the +work as a whole, that (a) is included in the normal form of packaging a Major +Component, but which is not part of that Major Component, and (b) serves only +to enable use of the work with that Major Component, or to implement a Standard +Interface for which an implementation is available to the public in source code +form. A *Major Component*, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system (if any) on +which the executable work runs, or a compiler used to produce the work, or an +object code interpreter used to run it. + +The *Corresponding Source* for a work in object code form means all the source +code needed to generate, install, and (for an executable work) run the object +code and to modify the work, including scripts to control those activities. +However, it does not include the work's System Libraries, or general-purpose +tools or generally available free programs which are used unmodified in +performing those activities but which are not part of the work. For example, +Corresponding Source includes interface definition files associated with source +files for the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, such as +by intimate data communication or control flow between those subprograms and +other parts of the work. + +The Corresponding Source need not include anything that users can regenerate +automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +#### 2. Basic Permissions. + +All rights granted under this License are granted for the term of copyright on +the Program, and are irrevocable provided the stated conditions are met. This +License explicitly affirms your unlimited permission to run the unmodified +Program. The output from running a covered work is covered by this License only +if the output, given its content, constitutes a covered work. This License +acknowledges your rights of fair use or other equivalent, as provided by +copyright law. + +You may make, run and propagate covered works that you do not convey, without +conditions so long as your license otherwise remains in force. You may convey +covered works to others for the sole purpose of having them make modifications +exclusively for you, or provide you with facilities for running those works, +provided that you comply with the terms of this License in conveying all +material for which you do not control copyright. Those thus making or running +the covered works for you must do so exclusively on your behalf, under your +direction and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the +conditions stated below. Sublicensing is not allowed; section 10 makes it +unnecessary. + +#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological measure +under any applicable law fulfilling obligations under article 11 of the WIPO +copyright treaty adopted on 20 December 1996, or similar laws prohibiting or +restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention is +effected by exercising rights under this License with respect to the covered +work, and you disclaim any intention to limit operation or modification of the +work as a means of enforcing, against the work's users, your or third parties' +legal rights to forbid circumvention of technological measures. + +#### 4. Conveying Verbatim Copies. + +You may convey 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; keep intact all notices stating that +this License and any non-permissive terms added in accord with section 7 apply +to the code; keep intact all notices of the absence of any warranty; and give +all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may +offer support or warranty protection for a fee. + +#### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to produce it +from the Program, in the form of source code under the terms of section 4, +provided that you also meet all of these conditions: + + - a) The work must carry prominent notices stating that you modified it, and + giving a relevant date. + - b) The work must carry prominent notices stating that it is released under + this License and any conditions added under section 7. This requirement + modifies the requirement in section 4 to *keep intact all notices*. + - c) You must license the entire work, as a whole, under this License to + anyone who comes into possession of a copy. This License will therefore + apply, along with any applicable section 7 additional terms, to the whole + of the work, and all its parts, regardless of how they are packaged. This + License gives no permission to license the work in any other way, but it + does not invalidate such permission if you have separately received it. + - d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your work need + not make them do so. + +A compilation of a covered work with other separate and independent works, +which are not by their nature extensions of the covered work, and which are not +combined with it such as to form a larger program, in or on a volume of a +storage or distribution medium, is called an *aggregate* if the compilation and +its resulting copyright are not used to limit the access or legal rights of the +compilation's users beyond what the individual works permit. Inclusion of a +covered work in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +#### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of sections 4 +and 5, provided that you also convey the machine-readable Corresponding Source +under the terms of this License, in one of these ways: + + - a) Convey the object code in, or embodied in, a physical product (including + a physical distribution medium), accompanied by the Corresponding Source + fixed on a durable physical medium customarily used for software + interchange. + - b) Convey the object code in, or embodied in, a physical product (including + a physical distribution medium), accompanied by a written offer, valid for + at least three years and valid for as long as you offer spare parts or + customer support for that product model, to give anyone who possesses the + object code either + 1. a copy of the Corresponding Source for all the software in the product + that is covered by this License, on a durable physical medium + customarily used for software interchange, for a price no more than your + reasonable cost of physically performing this conveying of source, or + 2. access to copy the Corresponding Source from a network server at no + charge. + - c) Convey individual copies of the object code with a copy of the written + offer to provide the Corresponding Source. This alternative is allowed only + occasionally and noncommercially, and only if you received the object code + with such an offer, in accord with subsection 6b. + - d) Convey the object code by offering access from a designated place + (gratis or for a charge), and offer equivalent access to the Corresponding + Source in the same way through the same place at no further charge. You + need not require recipients to copy the Corresponding Source along with the + object code. If the place to copy the object code is a network server, the + Corresponding Source may be on a different server operated by you or a + third party) that supports equivalent copying facilities, provided you + maintain clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the Corresponding + Source, you remain obligated to ensure that it is available for as long as + needed to satisfy these requirements. + - e) Convey the object code using peer-to-peer transmission, provided you + inform other peers where the object code and Corresponding Source of the + work are being offered to the general public at no charge under subsection + 6d. + +A separable portion of the object code, whose source code is excluded from the +Corresponding Source as a System Library, need not be included in conveying the +object code work. + +A *User Product* is either + + 1. a *consumer product*, which means any tangible personal property which is + normally used for personal, family, or household purposes, or + 2. anything designed or sold for incorporation into a dwelling. + +In determining whether a product is a consumer product, doubtful cases shall be +resolved in favor of coverage. For a particular product received by a +particular user, *normally used* refers to a typical or common use of that +class of product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected to use, +the product. A product is a consumer product regardless of whether the product +has substantial commercial, industrial or non-consumer uses, unless such uses +represent the only significant mode of use of the product. + +*Installation Information* for a User Product means any methods, procedures, +authorization keys, or other information required to install and execute +modified versions of a covered work in that User Product from a modified +version of its Corresponding Source. The information must suffice to ensure +that the continued functioning of the modified object code is in no case +prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as part of a +transaction in which the right of possession and use of the User Product is +transferred to the recipient in perpetuity or for a fixed term (regardless of +how the transaction is characterized), the Corresponding Source conveyed under +this section must be accompanied by the Installation Information. But this +requirement does not apply if neither you nor any third party retains the +ability to install modified object code on the User Product (for example, the +work has been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates for a +work that has been modified or installed by the recipient, or for the User +Product in which it has been modified or installed. Access to a network may be +denied when the modification itself materially and adversely affects the +operation of the network or violates the rules and protocols for communication +across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord +with this section must be in a format that is publicly documented (and with an +implementation available to the public in source code form), and must require +no special password or key for unpacking, reading or copying. + +#### 7. Additional Terms. + +*Additional permissions* are terms that supplement the terms of this License by +making exceptions from one or more of its conditions. Additional permissions +that are applicable to the entire Program shall be treated as though they were +included in this License, to the extent that they are valid under applicable +law. If additional permissions apply only to part of the Program, that part may +be used separately under those permissions, but the entire Program remains +governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any +additional permissions from that copy, or from any part of it. (Additional +permissions may be written to require their own removal in certain cases when +you modify the work.) You may place additional permissions on material, added +by you to a covered work, for which you have or can give appropriate copyright +permission. + +Notwithstanding any other provision of this License, for material you add to a +covered work, you may (if authorized by the copyright holders of that material) +supplement the terms of this License with terms: + + - a) Disclaiming warranty or limiting liability differently from the terms of + sections 15 and 16 of this License; or + - b) Requiring preservation of specified reasonable legal notices or author + attributions in that material or in the Appropriate Legal Notices displayed + by works containing it; or + - c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in reasonable + ways as different from the original version; or + - d) Limiting the use for publicity purposes of names of licensors or authors + of the material; or + - e) Declining to grant rights under trademark law for use of some trade + names, trademarks, or service marks; or + - f) Requiring indemnification of licensors and authors of that material by + anyone who conveys the material (or modified versions of it) with + contractual assumptions of liability to the recipient, for any liability + that these contractual assumptions directly impose on those licensors and + authors. + +All other non-permissive additional terms are considered *further restrictions* +within the meaning of section 10. If the Program as you received it, or any +part of it, contains a notice stating that it is governed by this License along +with a term that is a further restriction, you may remove that term. If a +license document contains a further restriction but permits relicensing or +conveying under this License, you may add to a covered work material governed +by the terms of that license document, provided that the further restriction +does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, +in the relevant source files, a statement of the additional terms that apply to +those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a +separately written license, or stated as exceptions; the above requirements +apply either way. + +#### 8. Termination. + +You may not propagate or modify a covered work except as expressly provided +under this License. Any attempt otherwise to propagate or modify it is void, +and will automatically terminate your rights under this License (including any +patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a +particular copyright holder is reinstated + + - a) provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and + - b) permanently, if the copyright holder fails to notify you of the + violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated +permanently if the copyright holder notifies you of the violation by some +reasonable means, this is the first time you have received notice of violation +of this License (for any work) from that copyright holder, and you cure the +violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses +of parties who have received copies or rights from you under this License. If +your rights have been terminated and not permanently reinstated, you do not +qualify to receive new licenses for the same material under section 10. + +#### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy +of the Program. Ancillary propagation of a covered work occurring solely as a +consequence of using peer-to-peer transmission to receive a copy likewise does +not require acceptance. However, nothing other than this License grants you +permission to propagate or modify any covered work. These actions infringe +copyright if you do not accept this License. Therefore, by modifying or +propagating a covered work, you indicate your acceptance of this License to do +so. + +#### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a +license from the original licensors, to run, modify and propagate that work, +subject to this License. You are not responsible for enforcing compliance by +third parties with this License. + +An *entity transaction* is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered work +results from an entity transaction, each party to that transaction who receives +a copy of the work also receives whatever licenses to the work the party's +predecessor in interest had or could give under the previous paragraph, plus a +right to possession of the Corresponding Source of the work from the +predecessor in interest, if the predecessor has it or can get it with +reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights +granted or affirmed under this License. For example, you may not impose a +license fee, royalty, or other charge for exercise of rights granted under this +License, and you may not initiate litigation (including a cross-claim or +counterclaim in a lawsuit) alleging that any patent claim is infringed by +making, using, selling, offering for sale, or importing the Program or any +portion of it. + +#### 11. Patents. + +A *contributor* is a copyright holder who authorizes use under this License of +the Program or a work on which the Program is based. The work thus licensed is +called the contributor's *contributor version*. + +A contributor's *essential patent claims* are all patent claims owned or +controlled by the contributor, whether already acquired or hereafter acquired, +that would be infringed by some manner, permitted by this License, of making, +using, or selling its contributor version, but do not include claims that would +be infringed only as a consequence of further modification of the contributor +version. For purposes of this definition, *control* includes the right to grant +patent sublicenses in a manner consistent with the requirements of this +License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent +license under the contributor's essential patent claims, to make, use, sell, +offer for sale, import and otherwise run, modify and propagate the contents of +its contributor version. + +In the following three paragraphs, a *patent license* is any express agreement +or commitment, however denominated, not to enforce a patent (such as an express +permission to practice a patent or covenant not to sue for patent +infringement). To *grant* such a patent license to a party means to make such +an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the +Corresponding Source of the work is not available for anyone to copy, free of +charge and under the terms of this License, through a publicly available +network server or other readily accessible means, then you must either + + 1. cause the Corresponding Source to be so available, or + 2. arrange to deprive yourself of the benefit of the patent license for this + particular work, or + 3. arrange, in a manner consistent with the requirements of this License, to + extend the patent license to downstream recipients. + +*Knowingly relying* means you have actual knowledge that, but for the patent +license, your conveying the covered work in a country, or your recipient's use +of the covered work in a country, would infringe one or more identifiable +patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you +convey, or propagate by procuring conveyance of, a covered work, and grant a +patent license to some of the parties receiving the covered work authorizing +them to use, propagate, modify or convey a specific copy of the covered work, +then the patent license you grant is automatically extended to all recipients +of the covered work and works based on it. + +A patent license is *discriminatory* if it does not include within the scope of +its coverage, prohibits the exercise of, or is conditioned on the non-exercise +of one or more of the rights that are specifically granted under this License. +You may not convey a covered work if you are a party to an arrangement with a +third party that is in the business of distributing software, under which you +make payment to the third party based on the extent of your activity of +conveying the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory patent +license + + - a) in connection with copies of the covered work conveyed by you (or copies + made from those copies), or + - b) primarily for and in connection with specific products or compilations + that contain the covered work, unless you entered into that arrangement, or + that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied +license or other defenses to infringement that may otherwise be available to +you under applicable patent law. + +#### 12. No Surrender of Others' Freedom. + +If 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 convey a covered work so +as to satisfy simultaneously your obligations under this License and any other +pertinent obligations, then as a consequence you may not convey it at all. For +example, if you agree to terms that obligate you to collect a royalty for +further conveying from those to whom you convey the Program, the only way you +could satisfy both those terms and this License would be to refrain entirely +from conveying the Program. + +#### 13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have permission to +link or combine any covered work with a work licensed under version 3 of the +GNU Affero General Public License into a single combined work, and to convey +the resulting work. The terms of this License will continue to apply to the +part which is the covered work, but the special requirements of the GNU Affero +General Public License, section 13, concerning interaction through a network +will apply to the combination as such. + +#### 14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU +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 +that a certain numbered version of the GNU General Public License *or any later +version* applies to it, you have the option of following the terms and +conditions either of that numbered version or of any later version published by +the Free Software Foundation. If the Program does not specify a version number +of the GNU General Public License, you may choose any version ever published by +the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the +GNU General Public License can be used, that proxy's public statement of +acceptance of a version permanently authorizes you to choose that version for +the Program. + +Later license versions may give you additional or different permissions. +However, no additional obligations are imposed on any author or copyright +holder as a result of your choosing to follow a later version. + +#### 15. Disclaimer of Warranty. + +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. + +#### 16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY +COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. + +#### 17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot +be given local legal effect according to their terms, reviewing courts shall +apply local law that most closely approximates an absolute waiver of all civil +liability in connection with the Program, unless a warranty or assumption of +liability accompanies a copy of the Program in return for a fee. diff --git a/dissectors/vxsdr-vesperix/README.md b/dissectors/vxsdr-vesperix/README.md new file mode 100644 index 0000000..06cf361 --- /dev/null +++ b/dissectors/vxsdr-vesperix/README.md @@ -0,0 +1,80 @@ +# VXSDR — protocole de commande et de données de libvxsdr + +Dissecteur Wireshark Lua fourni avec libvxsdr, la bibliothèque hôte des +radios logicielles VXSDR de Vesperix. Il décode l'en-tête de 8 octets +des paquets UDP (type de paquet sur 6 bits, commande sur 6 bits, +drapeaux sur 4 bits, sous-appareil, voie, taille, compteur de +séquence), puis les arguments des commandes d'appareil et de radio +(heure, fréquence, gain, débit, correction IQ, démarrage, boucle…), de +leurs réponses et de leurs erreurs, et les messages asynchrones. Ports +UDP 1030 (commandes) et 1031 (données) (issue #948). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/vesperix/libvxsdr (`tools/vxsdr_dissector.lua`) | +| Commit importé | `ab9976199d0a3a6664150533380095399708f819` du 19/05/2026 (dernier commit de la branche par défaut `main`) ; dernière modification du fichier : commit `92bc327fd4bc37f135276df3baeae57fb50f4b11` du 28/08/2024 | +| Licence amont | GPL-3.0-or-later : `LICENSE.md` du dépôt (« GNU General Public License, either version 3.0 or (at your option) any later version », avec mention de licences commerciales alternatives proposées par Vesperix) et en-tête SPDX du script (© 2023 Vesperix Corporation) | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur VXSDR dans `tshark -G protocols` | + +Texte de la licence : fichier `LICENSE.md` de ce dossier (copie +conforme du `LICENSE.md` amont). Le fichier est repris tel quel (aucune +modification) ; seule l'en-tête de provenance de cinq lignes est ajoutée +en tête de `vxsdr_dissector.lua` (convention du dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/vxsdr_dissector.lua` | Protocole `vxsdr` (« VXSDR Protocol », ligne 9) ; ports (ligne 11) ; types de paquets (ligne 15), commandes d'appareil (ligne 43) et de radio (ligne 128) ; masques et champs `vxsdr.*` (lignes 193 à 282) ; dissecteur ligne 285 ; inscription sur UDP 1030 et 1031 lignes 500 et 501 | + +## Utilisation + +Copier `src/vxsdr_dissector.lua` dans le dossier des plugins Lua +personnels (`~/.local/lib/wireshark/plugins/`), ou le charger par +`-X lua_script:`. Le trafic des ports UDP 1030 et 1031 est attribué à +VXSDR. Mais voir les limites : avec Wireshark 4.6.4, chaque paquet +provoque une erreur Lua. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, par `-X lua_script:` et dans le +dossier des plugins : chargement sans erreur, protocole `vxsdr` présent +dans `tshark -G protocols`. Le dépôt amont ne contient aucune capture. +Essais sur une capture synthétique (UDP 1030), non commitée ; en-tête +comparé à `include/vxsdr_packets.hpp` et `include/packet_header.h` du +même commit : + +| Essai | Résultat | +|---|---| +| Les dix paquets, fichier importé | Erreur Lua « attempt to index a nil value (global 'bit32') » (ligne 289) sur chaque paquet ; seule la colonne Protocole indique « VXSDR » | +| Copie d'essai non commitée, précédée de `local bit32 = bit` : DEVICE_CMD HELLO et sa réponse (8 entiers) | « Packet Type: DEVICE_CMD (0x02) », « Device Command: HELLO (0x00) » ; huit « UInt32 Data » | +| Même copie : RX_RADIO_CMD SET_RF_FREQ 1,42 GHz, réponse GET_RF_FREQ, erreur BAD_PARAMETER | « Frequency (Hz): 1.42e+09 », « Relative Tolerance: 1e-06 » ; « Radio Error Reason: BAD_PARAMETER (0x00000008) » | +| Même copie : TX_RADIO_CMD SET_SAMPLE_RATE avec drapeau 0x1 | « Rate (Hz): 2e+06 », « Flags: 0x1 » | +| Même copie : réponse GET_TIMING_STATUS (valeur 5) | PPS externe True, 10 MHz externe False, oscillateur de référence True | +| Même copie : ASYNC_MSG DATA_UNDERFLOW du système RX | « Async Message Type: DATA_UNDERFLOW (0x1) », mais « Async Message System: Unknown (0x1) » | +| Même copie : paquet de 3 octets | Erreur Lua « Range is out of bounds » (ligne 291) | +| Même copie : SET_TIME_NOW annonçant 16 octets, 10 reçus | Erreur Lua « Range is out of bounds » (ligne 332) | + +## Limites constatées + +- Le script appelle la bibliothèque `bit32` de Lua 5.2 (lignes 289 et + 290), absente de Wireshark 4.6.4 (Lua 5.4) : chaque paquet provoque + une erreur et rien n'est décodé. La bibliothèque `bit` de Wireshark + fournit les mêmes fonctions. +- Le système d'un message asynchrone est extrait par le masque 0x0C00 + (ligne 198), soit une valeur de 0 à 3, mais la table `async_sys_id` + (ligne 121) attend 0x10, 0x20 ou 0x30 : tout système autre que 0 + s'affiche « Unknown ». L'auteur l'indique (« FIXME: these need + testing », ligne 196). +- Les drapeaux ne sont affichés qu'en bloc (« Flags ») ; les champs par + drapeau sont commentés (« FIXME: still doesn't display flags + properly », ligne 219). Plusieurs champs sont nommés `vxsddr.*` (faute + de frappe, lignes 220 à 255). +- La taille du paquet est lue avant le contrôle de longueur minimale + (ligne 291), et les arguments ne sont pas contrôlés : un paquet court + provoque une erreur Lua. `tvbuf(0, pktlen)` (ligne 293) utilise une + variable inexistante (`pkt_len` est la bonne). +- Les échantillons des paquets de données (port 1031) ne sont pas + décodés ; la colonne Info n'est pas renseignée. diff --git a/dissectors/vxsdr-vesperix/src/vxsdr_dissector.lua b/dissectors/vxsdr-vesperix/src/vxsdr_dissector.lua new file mode 100644 index 0000000..43a9beb --- /dev/null +++ b/dissectors/vxsdr-vesperix/src/vxsdr_dissector.lua @@ -0,0 +1,501 @@ +-- SPDX-License-Identifier: GPL-3.0-or-later +-- Importé de https://github.com/vesperix/libvxsdr (tools/vxsdr_dissector.lua), +-- commit ab9976199d0a3a6664150533380095399708f819 du 19/05/2026 (dernière modification du fichier : +-- commit 92bc327fd4bc37f135276df3baeae57fb50f4b11 du 28/08/2024). +-- Licence amont : GPL-3.0-or-later (LICENSE.md amont et en-tête SPDX) — voir README.md et LICENSE.md. +-- Copyright (c) 2023 Vesperix Corporation +-- SPDX-License-Identifier: GPL-3.0-or-later + +local vxsdr = Proto("vxsdr", "VXSDR Protocol") + +local vxsdr_cmd_port = 1030 +local vxsdr_data_port = 1031 +local vxsdr_min_len = 8 + +local packet_types = { + [0x00] = "TX_SIGNAL_DATA", + [0x01] = "RX_SIGNAL_DATA", + [0x02] = "DEVICE_CMD", + [0x03] = "TX_RADIO_CMD", + [0x04] = "RX_RADIO_CMD", + [0x05] = "ASYNC_MSG", + + [0x12] = "DEVICE_CMD_RSP", + [0x13] = "TX_RADIO_CMD_RSP", + [0x14] = "RX_RADIO_CMD_RSP", + + [0x22] = "DEVICE_CMD_ERR", + [0x23] = "TX_RADIO_CMD_ERR", + [0x24] = "RX_RADIO_CMD_ERR", + + [0x30] = "TX_SIGNAL_DATA_ACK", + [0x31] = "RX_SIGNAL_DATA_ACK", + [0x32] = "DEVICE_CMD_ACK", + [0x33] = "TX_RADIO_CMD_ACK", + [0x34] = "RX_RADIO_CMD_ACK", +} + +local packet_types_index = {} +for k, v in pairs(packet_types) do + packet_types_index[v] = k +end + +local device_cmds = { + [0x00] = "HELLO", + [0x01] = "SET_TIME_NOW", + [0x02] = "SET_TIME_NEXT_PPS", + [0x03] = "GET_TIME", + [0x04] = "GET_STATUS", + [0x05] = "CLEAR_STATUS", + [0x06] = "GET_BUFFER_INFO", + [0x07] = "GET_BUFFER_USE", + [0x08] = "GET_STREAM_STATE", + [0x09] = "STOP", + [0x0A] = "GET_TRANSPORT_INFO", -- unimplemented + [0x0B] = "GET_TRANSPORT_ADDR", + [0x0C] = "GET_MAX_PAYLOAD", + [0x0D] = "CLEAR_DATA_BUFFER", + [0x0E] = "DISCOVER", + [0x0F] = "SET_TRANSPORT_ADDR", + [0x10] = "SET_MAX_PAYLOAD", + [0x11] = "SAVE_TRANSPORT_ADDR", + [0x12] = "GET_TIMING_INFO", -- unimplemented + [0x13] = "GET_TIMING_STATUS", + [0x14] = "GET_TIMING_REF", -- unimplemented + [0x15] = "SET_TIMING_REF", -- unimplemented + [0x16] = "GET_TIMING_RESOLUTION", + [0x17] = "GET_NUM_SUBDEVS", + [0x18] = "GET_NUM_SENSORS", + [0x19] = "GET_SENSOR_READING", + [0x1A] = "GET_SENSOR_NAME", + [0x1B] = "GET_CAPABILITIES", + -- 0x1C-0x3B reserved + [0x3C] = "APP_UPDATE_MODE_SET", + [0x3D] = "APP_UPDATE_DATA", + [0x3E] = "APP_UPDATE_DONE", + [0x3F] = "RESET" -- unimplemented +} + +local device_cmd_rsps = device_cmds + +local device_cmds_index = {} +for k, v in pairs(device_cmds) do + device_cmds_index[v] = k +end + +local device_cmd_rsps_index = {} +for k, v in pairs(device_cmd_rsps) do + device_cmd_rsps_index[v] = k +end + +local cmd_errs = { + [0x00] = "NO_ERROR", + [0x01] = "BAD_CMD", + [0x02] = "BUSY", + [0x03] = "NO_SUCH_SUBDEVICE", + [0x04] = "NO_SUCH_CHANNEL", + [0x05] = "TIMEOUT", + [0x06] = "BAD_HEADER_SIZE", + [0x07] = "BAD_HEADER_FLAGS", + [0x08] = "BAD_PARAMETER", + [0x09] = "NOT_SUPPORTED", + [0x0A] = "BAD_PACKET_SIZE", + [0x0B] = "INTERNAL_ERROR", + [0x0C] = "FAILED" +} + +local async_msgs = { + [0x00] = "NO_ERROR", + [0x01] = "DATA_UNDERFLOW", + [0x02] = "DATA_OVERFLOW", + [0x03] = "OVER_TEMP", + [0x04] = "POWER_ERROR", + [0x05] = "FREQ_ERROR", + [0x06] = "OUT_OF_SEQUENCE", + [0x07] = "CTRL_OVERFLOW", + [0x08] = "PPS_TIMEOUT", + [0x09] = "VOLTAGE_ERROR", + [0x0A] = "CURRENT_ERROR" +} + +local async_sys_id = { + [0x00] = "UNSPECIFIED", + [0x10] = "TX", + [0x20] = "RX", + [0x30] = "FPGA" + } + +local radio_cmds = { + [0x01] = "STOP", + [0x02] = "START", + [0x03] = "LOOP", + [0x04] = "GET_RF_FREQ", + [0x05] = "GET_RF_GAIN", + [0x06] = "GET_SAMPLE_RATE", + [0x07] = "GET_RF_BW", -- unimplemented + [0x08] = "GET_RF_ENABLED", + [0x09] = "GET_RF_PORT", + [0x0A] = "GET_NUM_RF_PORTS", + [0x0B] = "GET_RF_PORT_NAME", + [0x0C] = "GET_LO_INPUT", --unimplemented + [0x0D] = "GET_LOCK_STATUS", + [0x0E] = "GET_MASTER_CLK", + [0x0F] = "GET_FILTER_COEFFS", + [0x10] = "SET_RF_FREQ", + [0x11] = "SET_RF_GAIN", + [0x12] = "SET_SAMPLE_RATE", + [0x13] = "SET_RF_BW", -- unimplemented + [0x14] = "SET_RF_ENABLED", + [0x15] = "SET_RF_PORT", + [0x16] = "SET_LO_INPUT", + [0x17] = "SET_MASTER_CLK", --unimplemented + [0x18] = "GET_IF_FREQ", + [0x19] = "GET_RF_FREQ_RANGE", + [0x1A] = "GET_RF_GAIN_RANGE", + [0x1B] = "GET_SAMPLE_RATE_RANGE", + [0x1C] = "GET_NUM_CHANNELS", + [0x1D] = "SET_ADC_TEST_PATTERN", + [0x1E] = "GET_FILTER_LENGTH", + [0x1F] = "GET_IQ_BIAS", + [0x20] = "GET_IQ_CORR", + [0x21] = "SET_IQ_BIAS", + [0x22] = "SET_IQ_CORR", + [0x23] = "SET_FILTER_ENABLED", + [0x24] = "SET_FILTER_COEFFS", + [0x25] = "GET_RF_NUM_GAIN_STAGES", + [0x26] = "GET_RF_GAIN_STAGE_NAME", + [0x27] = "GET_RF_GAIN_RANGE_STAGE", + [0x28] = "GET_RF_GAIN_STAGE", + [0x29] = "SET_RF_GAIN_STAGE", + [0x2A] = "GET_RF_NUM_FREQ_STAGES", + [0x2B] = "GET_RF_FREQ_STAGE_NAME", + [0x2C] = "GET_RF_FREQ_RANGE_STAGE", + [0x2D] = "GET_RF_FREQ_STAGE", + [0x2E] = "SET_RF_FREQ_STAGE", + [0x2F] = "GET_RF_BW_RANGE", + [0x30] = "GET_CAPABILITIES" +} + +local bool_flags = {[0] = "False", [1] = "True"} + +local radio_cmds_index = {} +for k, v in pairs(radio_cmds) do + radio_cmds_index[v] = k +end + +local radio_cmd_rsps = radio_cmds + +local radio_cmd_rsps_index = {} +for k, v in pairs(radio_cmd_rsps) do + radio_cmd_rsps_index[v] = k +end + +local packet_type_mask = 0x003F +local command_mask = 0x0FC0 +local flags_mask = 0xF000 +-- FIXME: these need testing +local async_type_mask = 0x03C0 +local async_sys_mask = 0x0C00 + +local pf_packet_type = ProtoField.uint16("vxsdr.packet_type", "Packet Type", base.HEX, packet_types, packet_type_mask) +local pf_command = ProtoField.uint16("vxsdr.command", "Command", base.HEX, nil, command_mask) +local pf_flags = ProtoField.uint16("vxsdr.flags", "Flags", base.HEX, nil, flags_mask) +local pf_target_subdevice = ProtoField.uint8("vxsdr.target_subdevice", "Target Subdevice", base.DEC) +local pf_channel = ProtoField.uint8("vxsdr.channel", "Channel", base.DEC) +local pf_packet_size = ProtoField.uint16("vxsdr.packet_size", "Packet Size", base.DEC) +local pf_sequence_counter = ProtoField.uint16("vxsdr.sequence_counter", "Sequence Counter", base.DEC) + +local pf_device_command = ProtoField.uint16("vxsdr.device_command", "Device Command", base.HEX, device_cmds, command_mask) +local pf_device_command_err = ProtoField.uint16("vxsdr.device_command_err", "Device Command Error", base.HEX, device_cmds, command_mask) +local pf_device_command_rsp = ProtoField.uint16("vxsdr.device_command_rsp", "Device Command Response", base.HEX, device_cmds, command_mask) +local pf_radio_command = ProtoField.uint16("vxsdr.radio_command", "Radio Command", base.HEX, radio_cmds, command_mask) +local pf_radio_command_err = ProtoField.uint16("vxsdr.radio_command_err", "Radio Command Error", base.HEX, radio_cmds, command_mask) +local pf_radio_command_rsp = ProtoField.uint16("vxsdr.radio_command_rsp", "Radio Command Response", base.HEX, radio_cmds, command_mask) +local pf_device_error = ProtoField.uint32("vxsdr.device_error", "Device Error Reason", base.HEX, cmd_errs) +local pf_radio_error = ProtoField.uint32("vxsdr.radio_error", "Radio Error Reason", base.HEX, cmd_errs) +local pf_async_msg_type = ProtoField.uint16("vxsdr.async_msg_type", "Async Message Type", base.HEX, async_msgs, async_type_mask) +local pf_async_msg_sys = ProtoField.uint16("vxsdr.async_msg_sys", "Async Message System", base.HEX, async_sys_id, async_sys_mask) + +-- FIXME: still doesn't display flags properly +local pf_flag_ack = ProtoField.uint16("vxsddr.flag_request_ack", "Request Ack", base.DEC, bool_flags, 0x1000) +local pf_flag_time = ProtoField.uint16("vxsddr.flag_time_present", "Time Present", base.DEC, bool_flags, 0x2000) +local pf_flag_stream = ProtoField.uint16("vxsddr.flag_stream_id_present", "Stream ID Present", base.DEC, bool_flags, 0x4000) + +local pf_uint16_data = ProtoField.uint16("vxsdr.u16_data", "UInt16 Data", base.DEC) +local pf_uint32_data = ProtoField.uint32("vxsdr.u32_data", "UInt32 Data", base.DEC) +local pf_uint64_data = ProtoField.uint64("vxsdr.u64_data", "UInt64 Data", base.DEC) +local pf_double_data = ProtoField.double("vxsdr.f64_data", "Double Data") +local pf_boolean_data = ProtoField.new("Boolean Data", "vxsddr.u32_bool_data", ftypes.UINT32, + {[0] = "False", [1] = "True"}, base.DEC) + +local pf_uint32_result = ProtoField.uint32("vxsdr.u32_result", "Result", base.DEC) +local pf_uint32_stage = ProtoField.uint32("vxsdr.u32_stage", "Stage", base.DEC) +local pf_string16_name = ProtoField.string("vxsdr.string16_name", "Name", base.ASCII) + +local pf_double_rtol = ProtoField.double("vxsdr.f64_rtol", "Relative Tolerance") + +local pf_double_gain = ProtoField.double("vxsdr.f64_gain", "Gain (dB)") +local pf_double_rate = ProtoField.double("vxsdr.f64_rate", "Rate (Hz)") +local pf_double_freq = ProtoField.double("vxsdr.f64_freq", "Frequency (Hz)") + +local pf_double_fmin = ProtoField.double("vxsdr.f64_fmin", "Minumum (Hz)") +local pf_double_fmax = ProtoField.double("vxsdr.f64_fmax", "Maximum (Hz)") + +local pf_double_gmin = ProtoField.double("vxsdr.f64_gmin", "Minumum (dB)") +local pf_double_gmax = ProtoField.double("vxsdr.f64_gmax", "Maximum (dB)") + +local pf_uint32_sec = ProtoField.uint32("vxsdr.u32_sec", "Seconds", base.DEC) +local pf_uint32_nsec = ProtoField.uint32("vxsdr.u32_nsec", "Nanoseconds", base.DEC) + +local pf_double_res = ProtoField.double("vxsdr.f64_time_resolution", "Time Resolution") + +local pf_stream_state = ProtoField.new("Stream State", "vxsdr.stream_state", ftypes.UINT32, + {[0] = "Stopped", [1] = "Waiting", [2] = "Running", [3] = "Error"}, base.DEC, 0x00000003) + +local pf_ext_pps_lock = ProtoField.new("External PPS Lock", "vxsddr.ext_pps_lock", ftypes.UINT32, + {[0] = "False", [1] = "True"}, base.DEC, 0x00000001) +local pf_ext_10MHz_lock = ProtoField.new("External 10Mhz Lock", "vxsdr.ext_10Mhz_lock", ftypes.UINT32, + {[0] = "False", [1] = "True"}, base.DEC, 0x00000002) +local pf_ref_osc_lock = ProtoField.new("Reference Oscillator Lock", "vxsdr.ref_lock", ftypes.UINT32, + {[0] = "False", [1] = "True"}, base.DEC, 0x00000004) + +local pf_double_ibias = ProtoField.double("vxsdr.f64_ibias", "I Bias") +local pf_double_qbias = ProtoField.double("vxsdr.f64_qbias", "Q Bias") + +local pf_double_a11 = ProtoField.double("vxsdr.f64_iqcorr_a11", "a(1,1)") +local pf_double_a12 = ProtoField.double("vxsdr.f64_iqcorr_a12", "a(1,2)") +local pf_double_a21 = ProtoField.double("vxsdr.f64_iqcorr_a21", "a(2,1)") +local pf_double_a22 = ProtoField.double("vxsdr.f64_iqcorr_a22", "a(2,2)") + + + +vxsdr.fields = { pf_packet_type, pf_command, pf_flags, pf_target_subdevice, pf_channel, pf_packet_size, pf_sequence_counter, + pf_device_command, pf_radio_command, pf_device_command_err, pf_radio_command_err, + pf_device_command_rsp, pf_radio_command_rsp, pf_device_error, pf_radio_error, pf_async_msg_type, pf_async_msg_sys, +-- pf_flag_ack, pf_flag_time, pf_flag_stream, + pf_uint16_data, pf_uint32_data, pf_uint64_data, pf_double_data, pf_boolean_data, + pf_uint32_result, pf_uint32_stage, pf_string16_name, + pf_double_freq, pf_double_rtol, + pf_double_gain, pf_double_rate, + pf_double_fmin, pf_double_fmax, pf_double_gmin, pf_double_gmax, + pf_uint32_sec, pf_uint32_nsec, pf_double_res, pf_stream_state, + pf_ext_pps_lock, pf_ext_10MHz_lock, pf_ref_osc_lock, pf_double_ibias, pf_double_qbias, + pf_double_a11, pf_double_a12, pf_double_a21, pf_double_a22 } + +function vxsdr.dissector(tvbuf, pktinfo, root) + + pktinfo.cols.protocol:set("VXSDR") + local pkt_len = tvbuf:reported_length_remaining() + local pkt_type = bit32.band(tvbuf(0, 1):le_uint(), packet_type_mask) + local pkt_cmd = bit32.rshift(bit32.band(tvbuf(0, 2):le_uint(), 0x0FC0), 6) + local pkt_size = tvbuf(4, 2):le_uint() + + local tree = root:add(vxsdr, tvbuf(0, pktlen)) + + if pkt_len < vxsdr_min_len then + return + end + + tree:add_le( pf_packet_type, tvbuf(0, 2)) + if pkt_type == packet_types_index["DEVICE_CMD"] then + tree:add_le( pf_device_command, tvbuf(0, 2)) + elseif pkt_type == packet_types_index["DEVICE_CMD_RSP"] then + tree:add_le( pf_device_command_rsp, tvbuf(0, 2)) + elseif pkt_type == packet_types_index["DEVICE_CMD_ERR"] then + tree:add_le( pf_device_command_err, tvbuf(0, 2)) + elseif pkt_type == packet_types_index["TX_RADIO_CMD"] or pkt_type == packet_types_index["RX_RADIO_CMD"] then + tree:add_le( pf_radio_command, tvbuf(0, 2)) + elseif pkt_type == packet_types_index["TX_RADIO_CMD_RSP"] or pkt_type == packet_types_index["RX_RADIO_CMD_RSP"] then + tree:add_le( pf_radio_command_rsp, tvbuf(0, 2)) + elseif pkt_type == packet_types_index["TX_RADIO_CMD_ERR"] or pkt_type == packet_types_index["RX_RADIO_CMD_ERR"] then + tree:add_le( pf_radio_command_err, tvbuf(0, 2)) + elseif pkt_type == packet_types_index["ASYNC_MSG"] then + tree:add_le( pf_async_msg_type, tvbuf(0, 2)) + tree:add_le( pf_async_msg_sys, tvbuf(0, 2)) + else + tree:add_le( pf_command, tvbuf(0, 2)) + end + tree:add_le(pf_flags, tvbuf(0, 2)) +-- flags are still not displayed correctly +-- tree:add( pf_flag_ack, tvbuf(0, 2)) +-- tree:add( pf_flag_time, tvbuf(0, 2)) +-- tree:add( pf_flag_stream, tvbuf(0, 2)) + tree:add( pf_target_subdevice, tvbuf(2, 1)) + tree:add( pf_channel, tvbuf(3, 1)) + tree:add_le(pf_packet_size, tvbuf(4, 2)) + tree:add_le(pf_sequence_counter, tvbuf(6, 2)) + if pkt_size > 8 then + -- device commands + if pkt_type == packet_types_index["DEVICE_CMD"] then + -- set time now or next pps + if pkt_cmd == device_cmds_index["SET_TIME_NOW"] or pkt_cmd == device_cmds_index["SET_TIME_NEXT_PPS"] then + tree:add_le(pf_uint32_sec, tvbuf( 8, 4)) + tree:add_le(pf_uint32_nsec, tvbuf(12, 4)) + elseif pkt_cmd == device_cmds_index["GET_SENSOR_NAME"] or + pkt_cmd == device_cmds_index["GET_SENSOR_READING"] or + pkt_cmd == device_cmds_index["SET_MAX_PAYLOAD"] then + tree:add_le(pf_uint32_data, tvbuf( 8, 4)) + end + -- device command responses + elseif pkt_type == packet_types_index["DEVICE_CMD_RSP"] then + if pkt_cmd == device_cmd_rsps_index["HELLO"] then + tree:add_le(pf_uint32_data, tvbuf( 8, 4)) + tree:add_le(pf_uint32_data, tvbuf(12, 4)) + tree:add_le(pf_uint32_data, tvbuf(16, 4)) + tree:add_le(pf_uint32_data, tvbuf(20, 4)) + tree:add_le(pf_uint32_data, tvbuf(24, 4)) + tree:add_le(pf_uint32_data, tvbuf(28, 4)) + tree:add_le(pf_uint32_data, tvbuf(32, 4)) + tree:add_le(pf_uint32_data, tvbuf(36, 4)) + elseif pkt_cmd == device_cmd_rsps_index["GET_TIME"] then + tree:add_le(pf_uint32_sec, tvbuf( 8, 4)) + tree:add_le(pf_uint32_nsec, tvbuf(12, 4)) + elseif pkt_cmd == device_cmd_rsps_index["GET_TIMING_RESOLUTION"] then + tree:add_le(pf_double_res, tvbuf( 8, 8)) + elseif pkt_cmd == device_cmd_rsps_index["GET_TIMING_STATUS"] then + tree:add_le(pf_ext_pps_lock, tvbuf( 8, 4)) + tree:add_le(pf_ext_10MHz_lock, tvbuf( 8, 4)) + tree:add_le(pf_ref_osc_lock, tvbuf( 8, 4)) + elseif pkt_cmd == device_cmd_rsps_index["GET_BUFFER_INFO"] or pkt_cmd == device_cmd_rsps_index["GET_BUFFER_USE"] then + -- get_time, buffer info, buffer use response + tree:add_le(pf_uint32_data, tvbuf( 8, 4)) + tree:add_le(pf_uint32_data, tvbuf(12, 4)) + elseif pkt_cmd == device_cmd_rsps_index["GET_STREAM_STATE"] then + tree:add_le(pf_stream_state, tvbuf( 8, 4)) + elseif pkt_cmd == device_cmd_rsps_index["GET_STATUS"] then + -- status response + tree:add_le(pf_uint32_data, tvbuf( 8, 4)) + tree:add_le(pf_uint32_data, tvbuf(12, 4)) + tree:add_le(pf_uint32_data, tvbuf(16, 4)) + tree:add_le(pf_uint32_data, tvbuf(20, 4)) + tree:add_le(pf_uint32_data, tvbuf(24, 4)) + tree:add_le(pf_uint32_data, tvbuf(28, 4)) + elseif pkt_cmd == device_cmd_rsps_index["GET_NUM_SUBDEVS"] or + pkt_cmd == device_cmd_rsps_index["GET_NUM_SENSORS"] or + pkt_cmd == device_cmd_rsps_index["GET_MAX_PAYLOAD"] then + tree:add_le(pf_uint32_result, tvbuf( 8, 4)) + elseif pkt_cmd == device_cmd_rsps_index["GET_SENSOR_NAME"] then + tree:add_le(pf_string16_name, tvbuf(8, 16)) + elseif pkt_cmd == device_cmd_rsps_index["GET_SENSOR_READING"] then + tree:add_le(pf_double_data, tvbuf(8, 8)) + end + -- device command errors + elseif pkt_type == packet_types_index["DEVICE_CMD_ERR"] then + tree:add_le(pf_device_error, tvbuf( 8, 4)) + tree:add_le(pf_uint32_data, tvbuf(12, 4)) + -- radio commands + elseif pkt_type == packet_types_index["TX_RADIO_CMD"] or pkt_type == packet_types_index["RX_RADIO_CMD"] then + -- set rf_enabled or filter_enables + if pkt_cmd == radio_cmds_index["SET_RF_ENABLED"] or + pkt_cmd == radio_cmds_index["SET_FILTER_ENABLED"] then + tree:add_le(pf_boolean_data, tvbuf(8, 4)) + -- set freq, gain, or rate + elseif pkt_cmd == radio_cmds_index["SET_RF_FREQ"] then + tree:add_le(pf_double_freq, tvbuf(8, 8)) + tree:add_le(pf_double_rtol, tvbuf(16, 8)) + elseif pkt_cmd == radio_cmds_index["SET_RF_FREQ_STAGE"] then + tree:add_le(pf_uint32_stage, tvbuf(8, 4)) + tree:add_le(pf_double_freq, tvbuf(16, 8)) + elseif pkt_cmd == radio_cmds_index["SET_RF_GAIN"] then + tree:add_le(pf_double_gain, tvbuf(8, 8)) + elseif pkt_cmd == radio_cmds_index["SET_RF_GAIN_STAGE"] then + tree:add_le(pf_uint32_stage, tvbuf(8, 4)) + tree:add_le(pf_double_gain, tvbuf(16, 8)) + elseif pkt_cmd == radio_cmds_index["GET_RF_GAIN_STAGE"] or + pkt_cmd == radio_cmds_index["GET_RF_FREQ_STAGE"] or + pkt_cmd == radio_cmds_index["GET_RF_GAIN_STAGE_NAME"] or + pkt_cmd == radio_cmds_index["GET_RF_FREQ_STAGE_NAME"] or + pkt_cmd == radio_cmds_index["GET_RF_GAIN_RANGE_STAGE"] or + pkt_cmd == radio_cmds_index["GET_RF_FREQ_RANGE_STAGE"] then + tree:add_le(pf_uint32_stage, tvbuf(8, 4)) + elseif pkt_cmd == radio_cmds_index["SET_SAMPLE_RATE"] then + tree:add_le(pf_double_rate, tvbuf(8, 8)) + elseif pkt_cmd == radio_cmds_index["SET_IQ_BIAS"] then + tree:add_le(pf_double_ibias, tvbuf(8, 8)) + tree:add_le(pf_double_qbias, tvbuf(16, 8)) + elseif pkt_cmd == radio_cmds_index["SET_IQ_CORR"] then + tree:add_le(pf_double_a11, tvbuf(8, 8)) + tree:add_le(pf_double_a12, tvbuf(16, 8)) + tree:add_le(pf_double_a21, tvbuf(24, 8)) + tree:add_le(pf_double_a22, tvbuf(32, 8)) + -- start + elseif pkt_cmd == radio_cmds_index["START"] then + tree:add_le(pf_uint32_sec, tvbuf( 8, 4)) + tree:add_le(pf_uint32_nsec, tvbuf(12, 4)) + tree:add_le(pf_uint64_data, tvbuf(16, 8)) + -- loop + elseif pkt_cmd == radio_cmds_index["LOOP"] then + tree:add_le(pf_uint32_sec, tvbuf( 8, 4)) + tree:add_le(pf_uint32_nsec, tvbuf(12, 4)) + tree:add_le(pf_uint64_data, tvbuf(16, 8)) + tree:add_le(pf_uint32_sec, tvbuf(24, 4)) + tree:add_le(pf_uint32_nsec, tvbuf(28, 4)) + tree:add_le(pf_uint32_data, tvbuf(32, 4)) + -- set rf port + elseif pkt_cmd == radio_cmds_index["SET_RF_PORT"] or + pkt_cmd == radio_cmds_index["SET_LO_INPUT"] then + tree:add_le(pf_uint32_data, tvbuf( 8, 4)) + --elseif pkt_cmd == radio_cmds_index["SET_FILTER_COEFFICIENTS"] then + end + -- radio command responses + elseif pkt_type == packet_types_index["TX_RADIO_CMD_RSP"] or pkt_type == packet_types_index["RX_RADIO_CMD_RSP"] then + -- get rf_enabled + if pkt_cmd == radio_cmd_rsps_index["GET_RF_ENABLED"] then + tree:add_le(pf_boolean_data, tvbuf(8, 4)) + -- get freq, gain, or rate + elseif pkt_cmd == radio_cmd_rsps_index["GET_RF_FREQ"] or + pkt_cmd == radio_cmd_rsps_index["GET_IF_FREQ"] or + pkt_cmd == radio_cmd_rsps_index["GET_RF_FREQ_STAGE"] then + tree:add_le(pf_double_freq, tvbuf(8, 8)) + elseif pkt_cmd == radio_cmd_rsps_index["GET_RF_GAIN"] or + pkt_cmd == radio_cmd_rsps_index["GET_RF_GAIN_STAGE"]then + tree:add_le(pf_double_gain, tvbuf(8, 8)) + elseif pkt_cmd == radio_cmd_rsps_index["GET_SAMPLE_RATE"] then + tree:add_le(pf_double_freq, tvbuf(8, 8)) + elseif pkt_cmd == radio_cmd_rsps_index["GET_RF_FREQ_RANGE"] or + pkt_cmd == radio_cmd_rsps_index["GET_RF_FREQ_RANGE_STAGE"] or + pkt_cmd == radio_cmd_rsps_index["GET_SAMPLE_RATE_RANGE"] then + tree:add_le(pf_double_fmin, tvbuf(8, 8)) + tree:add_le(pf_double_fmax, tvbuf(16, 8)) + elseif pkt_cmd == radio_cmd_rsps_index["GET_RF_GAIN_RANGE"] or + pkt_cmd == radio_cmd_rsps_index["GET_RF_GAIN_RANGE_STAGE"] then + tree:add_le(pf_double_gmin, tvbuf(8, 8)) + tree:add_le(pf_double_gmax, tvbuf(16, 8)) + elseif pkt_cmd == radio_cmd_rsps_index["GET_RF_GAIN_STAGE_NAME"] or + pkt_cmd == radio_cmd_rsps_index["GET_RF_FREQ_STAGE_NAME"] then + tree:add_le(pf_string16_name, tvbuf(8, 16)) + elseif pkt_cmd == radio_cmd_rsps_index["GET_IQ_BIAS"] then + tree:add_le(pf_double_ibias, tvbuf(8, 8)) + tree:add_le(pf_double_qbias, tvbuf(16, 8)) + elseif pkt_cmd == radio_cmd_rsps_index["GET_IQ_CORR"] then + tree:add_le(pf_double_a11, tvbuf(8, 8)) + tree:add_le(pf_double_a12, tvbuf(16, 8)) + tree:add_le(pf_double_a21, tvbuf(24, 8)) + tree:add_le(pf_double_a22, tvbuf(32, 8)) + elseif pkt_cmd == radio_cmd_rsps_index["GET_NUM_CHANNELS"] or + pkt_cmd == radio_cmd_rsps_index["GET_NUM_RF_PORTS"] or + pkt_cmd == radio_cmd_rsps_index["GET_FILTER_LENGTH"] or + pkt_cmd == radio_cmd_rsps_index["GET_RF_NUM_GAIN_STAGES"] or + pkt_cmd == radio_cmd_rsps_index["GET_RF_NUM_FREQ_STAGES"] or + pkt_cmd == radio_cmd_rsps_index["GET_RF_PORT"] then + tree:add_le(pf_uint32_result, tvbuf( 8, 4)) + end + -- radio command errors + elseif pkt_type == packet_types_index["TX_RADIO_CMD_ERR"] or pkt_type == packet_types_index["RX_RADIO_CMD_ERR"] then + tree:add_le(pf_radio_error, tvbuf( 8, 4)) + tree:add_le(pf_uint32_data, tvbuf(12, 4)) + -- tx data acks + elseif pkt_type == packet_types_index["TX_SIGNAL_DATA_ACK"] then + tree:add_le(pf_uint32_data, tvbuf( 8, 4)) + tree:add_le(pf_uint32_data, tvbuf(12, 4)) + tree:add_le(pf_uint32_data, tvbuf(16, 4)) + tree:add_le(pf_uint32_data, tvbuf(20, 4)) + tree:add_le(pf_uint32_data, tvbuf(24, 4)) + tree:add_le(pf_uint32_data, tvbuf(28, 4)) + end + end +end + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(vxsdr_cmd_port, vxsdr) +udp_port:add(vxsdr_data_port, vxsdr) diff --git a/dissectors/wattsonic/LICENSE b/dissectors/wattsonic/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/wattsonic/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/wattsonic/README.md b/dissectors/wattsonic/README.md new file mode 100644 index 0000000..c7b8370 --- /dev/null +++ b/dissectors/wattsonic/README.md @@ -0,0 +1,47 @@ +# Wattsonic (onduleurs hybrides solaires) + +Dissecteur Wireshark Lua des **paquets de télémétrie envoyés par les +onduleurs hybrides Wattsonic** vers leurs serveurs cloud, sur TCP 5743 : +numéro de série, date, état de santé et de charge de la batterie, durée de +fonctionnement, températures de l'onduleur et du pack BMS, et autres +valeurs à positions fixes (sans chiffrement, un paquet par minute selon +l'amont). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/schoerg/wattsonic | +| Commit importé | `b23b660a3f18370791404ae1dea57ca3c0d0be36` du 06/08/2023 (branche `master`, dernier commit) | +| Licence amont | GPL-3.0-only (`LICENSE` amont : texte de la GPL v3, sans mention « or any later version » ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Wattsonic natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `wattsonic.lua` | Dissecteur `wattsonic` (TCP 5743), champs `wattsonic.*` | +| `captures/wattsonic.pcap` | Capture d'exemple amont (`doc/wattsonic.pcap`) | + +Fichier Lua importé tel quel ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête. La capture est une copie binaire +conforme. + +## Utilisation + +Copier `wattsonic.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, ouvrir +`captures/wattsonic.pcap` (ou une capture faite sur un port miroir / le +routeur) et filtrer avec `wattsonic`. + +## Remarques + +- Positions des champs trouvées par l'auteur en comparant avec les réponses + Modbus ; les paquets de 58 octets ne sont pas analysés (amont). +- Non repris : la documentation constructeur du protocole Modbus (PDF, + droits non précisés) et la capture d'écran — disponibles dans le dépôt + amont. +- Non vérifié dans Wireshark, y compris sur la capture fournie. diff --git a/dissectors/wattsonic/captures/wattsonic.pcap b/dissectors/wattsonic/captures/wattsonic.pcap new file mode 100644 index 0000000..4395059 Binary files /dev/null and b/dissectors/wattsonic/captures/wattsonic.pcap differ diff --git a/dissectors/wattsonic/wattsonic.lua b/dissectors/wattsonic/wattsonic.lua new file mode 100644 index 0000000..1ca3510 --- /dev/null +++ b/dissectors/wattsonic/wattsonic.lua @@ -0,0 +1,214 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/schoerg/wattsonic (wattsonic.lua), +-- commit b23b660a3f18370791404ae1dea57ca3c0d0be36 du 06/08/2023. +-- Licence amont : GPL-3.0-only (LICENSE amont) — voir README.md. +-- wattsonic.lua + +local wattsonic_proto = Proto("wattsonic", "Wattsonic Protocol") + +local fields = { + serial_number = ProtoField.string("wattsonic.serial_number", "Serial Number"), + date = ProtoField.string("wattsonic.date", "Date (YY-MM-DD)"), + soh = ProtoField.int16("wattsonic.soh", "State of Health (SOH)"), + soc = ProtoField.int16("wattsonic.soc", "State of Charge (SOC)"), + + inverter_runtime = ProtoField.uint32("wattsonic.inverter_runtime", "Runtime"), + inverter_temp1 = ProtoField.int16("wattsonic.inverter_temp1", "Inverter Temperature 1"), + inverter_temp2 = ProtoField.int16("wattsonic.inverter_temp2", "Inverter Temperature 2"), + inverter_temp3 = ProtoField.int16("wattsonic.inverter_temp3", "Inverter Temperature 3"), + inverter_temp4 = ProtoField.int16("wattsonic.inverter_temp4", "Inverter Temperature 4"), + + pv1_voltage = ProtoField.int16("wattsonic.pv1_voltage", "PV1 Voltage"), + pv1_current = ProtoField.int16("wattsonic.pv1_current", "PV1 Current"), + pv2_voltage = ProtoField.int16("wattsonic.pv2_voltage", "PV2 Voltage"), + pv2_current = ProtoField.int16("wattsonic.pv2_current", "PV2 Current"), + + battery_p = ProtoField.int16("wattsonic.battery_p", "Battery Power"), + + grid_extern = ProtoField.int16("wattsonic.grid_extern", "Grid"), + pv = ProtoField.int16("wattsonic.pv", "PV input total power"), + + t_e_injected_to_grid = ProtoField.uint32("wattsonic.t_e_injected_to_grid", "Total energy injected into grid"), + t_e_purchased_from_grid = ProtoField.uint16("wattsonic.t_e_purchased_from_grid", "Energy purchased from grid today"), + t_e_charged_to_battery = ProtoField.uint32("wattsonic.t_e_charged_to_battery", "Total energy charged into battery"), + t_e_discharged_from_battery = ProtoField.uint32("wattsonic.t_e_discharged_from_battery", "Total energy discharged from battery"), + t_output_backup_port = ProtoField.uint32("wattsonic.t_output_backup_port", "Total output energy on backup port"), + pv_generation_energy_today = ProtoField.uint16("wattsonic.pv_generation_energy_today", "PV energy generated today"), + pv_generation_from_installation = ProtoField.uint32("wattsonic.pv_generation_from_installation", "PV total energy generated since installation"), + total_pv_generation = ProtoField.uint32("wattsonic.total_pv_generation", "PV total energy generated"), + loading_energy_today = ProtoField.uint16("wattsonic.loading_energy_today", "Load energy used today"), + total_loading_energy_consumed_at_grid_side = ProtoField.uint32("wattsonic.total_loading_energy_consumed_at_grid_side", "Total loading consumed energy on grid side"), + total_energy_purchased_from_grid_from_meter = ProtoField.uint32("wattsonic.total_energy_purchased_from_grid_from_meter", "Total energy purchased from grid from meter"), + bms_pack_temp = ProtoField.int16("wattsonic.bms_pack_temp", "BMS Pack Temperature"), + +} + +local function parse_date(buffer, offset) + local year = buffer(offset, 1):uint() + local month = buffer(offset + 1, 1):uint() + local day = buffer(offset + 2, 1):uint() + + local hour = buffer(offset + 3, 1):uint() + local minute = buffer(offset + 4, 1):uint() + local second = buffer(offset + 5, 1):uint() + + -- YY-MM-DD h:m:s + local date_string = string.format("%02d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, second ) + return date_string +end + +wattsonic_proto.fields = fields + +-- dissector +function wattsonic_proto.dissector(buffer, pinfo, tree) + -- parse only large packets + length = buffer:len() + if length < 500 then return end + + -- the inverter sends stuff to port 5743 + if pinfo.dst_port == 5743 then + pinfo.cols.protocol:set("Wattsonic") + + local subtree = tree:add(wattsonic_proto, buffer(), "Wattsonic Protocol Data") + + -- serial number + local serial_number = buffer(10, 16):string() + subtree:add(fields.serial_number, buffer(10, 16), serial_number) + + local date_string = parse_date(buffer, 26) + subtree:add(fields.date, buffer(26, 6), date_string) + + local grid_extern = buffer(123, 2):int() + local grid_field = subtree:add(fields.grid_extern, buffer(123, 2), grid_extern) + grid_field:append_text(" W (negative = purchase)") + + local pv_generation_from_installation = buffer(161, 4):int() + local pv_generation_from_installation_float = pv_generation_from_installation / 10.0 + local pv_generation_from_installation_field = subtree:add(fields.pv_generation_from_installation, buffer(161, 4), pv_generation_from_installation) + pv_generation_from_installation_field:append_text(" (" .. string.format("%.1f", pv_generation_from_installation_float) .. " kWh)") + + local inverter_runtime = buffer(165, 4):uint() + local inverter_runtime_field = subtree:add(fields.inverter_runtime, buffer(165, 4), inverter_runtime) + inverter_runtime_field:append_text(" hours") + + local pv = buffer(179, 2):int() + local pv_field = subtree:add(fields.pv, buffer(179, 2), pv) + pv_field:append_text(" W") + + local inverter_temp = buffer(185, 2):int() + local inverter_temp_float = inverter_temp / 10 + local inverter_temp_field = subtree:add(fields.inverter_temp1, buffer(185, 2), inverter_temp) + inverter_temp_field:append_text(" (" .. string.format("%.1f", inverter_temp_float) .. " °C)") + + local inverter_temp = buffer(187, 2):int() + local inverter_temp_float = inverter_temp / 10 + local inverter_temp_field = subtree:add(fields.inverter_temp2, buffer(187, 2), inverter_temp) + inverter_temp_field:append_text(" (" .. string.format("%.1f", inverter_temp_float) .. " °C)") + + local inverter_temp = buffer(189, 2):int() + local inverter_temp_float = inverter_temp / 10 + local inverter_temp_field = subtree:add(fields.inverter_temp3, buffer(189, 2), inverter_temp) + inverter_temp_field:append_text(" (" .. string.format("%.1f", inverter_temp_float) .. " °C)") + + local inverter_temp = buffer(191, 2):int() + local inverter_temp_float = inverter_temp / 10 + local inverter_temp_field = subtree:add(fields.inverter_temp4, buffer(191, 2), inverter_temp) + inverter_temp_field:append_text(" (" .. string.format("%.1f", inverter_temp_float) .. " °C)") + + local pv1_voltage = buffer(197, 2):int() + local pv1_voltage_float = pv1_voltage / 10 + local pv1_voltage_field = subtree:add(fields.pv1_voltage, buffer(197, 2), pv1_voltage) + pv1_voltage_field:append_text(" (" .. string.format("%.1f", pv1_voltage_float) .. " V)") + + local pv1_current = buffer(199, 2):int() + local pv1_current_float = pv1_current / 10 + local pv1_current_field = subtree:add(fields.pv1_current, buffer(199, 2), pv1_current) + pv1_current_field:append_text(" (" .. string.format("%.1f", pv1_current_float) .. " A)") + + local pv2_voltage = buffer(201, 2):int() + local pv2_voltage_float = pv2_voltage / 10 + local pv2_voltage_field = subtree:add(fields.pv2_voltage, buffer(201, 2), pv2_voltage) + pv2_voltage_field:append_text(" (" .. string.format("%.1f", pv2_voltage_float) .. " V)") + + local pv2_current = buffer(203, 2):int() + local pv2_current_float = pv2_current / 10 + local pv2_current_field = subtree:add(fields.pv2_current, buffer(203, 2), pv2_current) + pv2_current_field:append_text(" (" .. string.format("%.1f", pv2_current_float) .. " A)") + + + local battery_p = buffer(417, 4):uint() + local battery_p_field = subtree:add(fields.battery_p, buffer(417, 4), battery_p) + battery_p_field:append_text(" W (negative = charging)") + + local t_e_purchased_from_grid = buffer(439, 2):int() + local t_e_purchased_from_grid_float = t_e_purchased_from_grid / 10.0 + local t_e_purchased_from_grid_field = subtree:add(fields.t_e_purchased_from_grid, buffer(439, 2), t_e_purchased_from_grid) + t_e_purchased_from_grid_field:append_text(" (" .. string.format("%.1f", t_e_purchased_from_grid_float) .. " kWh)") + + local pv_generation_energy_today = buffer(447, 2):int() + local pv_generation_energy_today_float = pv_generation_energy_today / 10.0 + local pv_generation_energy_today_field = subtree:add(fields.pv_generation_energy_today, buffer(447, 2), pv_generation_energy_today) + pv_generation_energy_today_field:append_text(" (" .. string.format("%.1f", pv_generation_energy_today_float) .. " kWh)") + + local loading_energy_today = buffer(449, 2):int() + local loading_energy_today_float = loading_energy_today / 10.0 + local loading_energy_today_field = subtree:add(fields.loading_energy_today, buffer(449, 2), loading_energy_today) + loading_energy_today_field:append_text(" (" .. string.format("%.1f", loading_energy_today_float) .. " kWh)") + + local t_e_injected_to_grid = buffer(463, 4):int() + local t_e_injected_to_grid_float = t_e_injected_to_grid / 10.0 + local t_e_injected_to_grid_field = subtree:add(fields.t_e_injected_to_grid, buffer(463, 4), t_e_injected_to_grid) + t_e_injected_to_grid_field:append_text(" (" .. string.format("%.1f", t_e_injected_to_grid_float) .. " kWh)") + + local total_energy_purchased_from_grid_from_meter = buffer(467, 4):int() + local total_energy_purchased_from_grid_from_meter_float = total_energy_purchased_from_grid_from_meter / 10.0 + local total_energy_purchased_from_grid_from_meter_field = subtree:add(fields.total_energy_purchased_from_grid_from_meter, buffer(467, 4), total_energy_purchased_from_grid_from_meter) + total_energy_purchased_from_grid_from_meter_field:append_text(" (" .. string.format("%.1f", total_energy_purchased_from_grid_from_meter_float) .. " kWh)") + + local t_output_backup_port = buffer(471, 4):int() + local t_output_backup_port_float = t_output_backup_port / 10.0 + local t_output_backup_port_field = subtree:add(fields.t_output_backup_port, buffer(471, 4), t_output_backup_port) + t_output_backup_port_field:append_text(" (" .. string.format("%.1f", t_output_backup_port_float) .. " kWh)") + + local t_e_charged_to_battery = buffer(475, 4):int() + local t_e_charged_to_battery_float = t_e_charged_to_battery / 10.0 + local t_e_charged_to_battery_field = subtree:add(fields.t_e_charged_to_battery, buffer(475, 4), t_e_charged_to_battery) + t_e_charged_to_battery_field:append_text(" (" .. string.format("%.1f", t_e_charged_to_battery_float) .. " kWh)") + + local t_e_discharged_from_battery = buffer(479, 4):int() + local t_e_discharged_from_battery_float = t_e_discharged_from_battery / 10.0 + local t_e_discharged_from_battery_field = subtree:add(fields.t_e_discharged_from_battery, buffer(479, 4), t_e_discharged_from_battery) + t_e_discharged_from_battery_field:append_text(" (" .. string.format("%.1f", t_e_discharged_from_battery_float) .. " kWh)") + + local total_pv_generation = buffer(483, 4):int() + local total_pv_generation_float = total_pv_generation / 10.0 + local total_pv_generation_field = subtree:add(fields.total_pv_generation, buffer(483, 4), total_pv_generation) + total_pv_generation_field:append_text(" (" .. string.format("%.1f", total_pv_generation_float) .. " kWh)") + + local total_loading_energy_consumed_at_grid_side = buffer(487, 4):int() + local total_loading_energy_consumed_at_grid_side_float = total_loading_energy_consumed_at_grid_side / 10.0 + local total_loading_energy_consumed_at_grid_side_field = subtree:add(fields.total_loading_energy_consumed_at_grid_side, buffer(487, 4), total_loading_energy_consumed_at_grid_side) + total_loading_energy_consumed_at_grid_side_field:append_text(" (" .. string.format("%.1f", total_loading_energy_consumed_at_grid_side_float) .. " kWh)") + + + local soc_value = buffer(523, 2):int() + local soc_float = soc_value / 100.0 + local soc_field = subtree:add(fields.soc, buffer(523, 2), soc_value) + soc_field:append_text(" (" .. string.format("%.2f", soc_float) .. "%)") + + local soh_value = buffer(525, 2):int() + local soh_float = soh_value / 100.0 + local soh_field = subtree:add(fields.soh, buffer(525, 2), soh_value) + soh_field:append_text(" (" .. string.format("%.2f", soh_float) .. "%)") + + local bms_pack_temp = buffer(541, 2):int() + local bms_pack_temp_float = bms_pack_temp / 10 + local bms_pack_temp_field = subtree:add(fields.bms_pack_temp, buffer(541, 2), bms_pack_temp) + bms_pack_temp_field:append_text(" (" .. string.format("%.1f", bms_pack_temp_float) .. " °C)") + + end +end + +-- register dissector +local tcp_dissector_table = DissectorTable.get("tcp.port") +tcp_dissector_table:add(5743, wattsonic_proto) diff --git a/dissectors/wattstopper-irb/LICENSE b/dissectors/wattstopper-irb/LICENSE new file mode 100644 index 0000000..a606321 --- /dev/null +++ b/dissectors/wattstopper-irb/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 kargs-net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/wattstopper-irb/README.md b/dissectors/wattstopper-irb/README.md new file mode 100644 index 0000000..6a8b8ff --- /dev/null +++ b/dissectors/wattstopper-irb/README.md @@ -0,0 +1,56 @@ +# Watt Stopper DLM / In Room Bus — commande d'éclairage (Legrand) + +Dissecteur Wireshark Lua du **bus DLM / In Room Bus (IRB) de Watt +Stopper** (Legrand), réseau local des commandes d'éclairage de pièce +(interrupteurs, détecteurs de présence, variateurs, relais) : codes de +fonction (arbitrage, « Push n' Go » / « Push n' Learn », réglage, +lecture / écriture mémoire, état des charges, détecteurs, mesure de +puissance…), adresses source et destination, multidiffusion, données et +contrôle LRC. Le même fichier ajoute un sous-dissecteur des services +**BACnet PrivateTransfer** du fabricant n° 86 (Watt Stopper), utilisés +par les passerelles LMBC pour transporter des trames DLM. Le bus DLM +s'enregistre sur l'encapsulation `USER0`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/kargs-net/kargs-net.github.io (fichier `captures/irb.lua`) | +| Commit importé | `c7f6b224d314da0d7bfe3711fee34cd3a693680e` du 31/05/2026 (branche `main`, dernier commit ; dernière modification de `captures/irb.lua` : `8728c53` du 24/12/2023) | +| Licence amont | MIT (`LICENSE` amont, © 2023 kargs-net ; en-tête : « Copyright Steve Karg ») | +| Natif Wireshark 4.6.4 | Non pour DLM / IRB ; BACnet (`bacapp`) est natif et ce script s'y greffe par la table `bacapp.vendor_identifier` | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `irb.lua` | Protocole `dlm` sur `USER0`, et `bacnet-pt` sur le fabricant BACnet 86 | + +Le dépôt amont contient deux copies du script : `BACnet/irb.lua` et +`captures/irb.lua`. Seule la seconde, plus récente (même jour, quelques +minutes après) et plus complète (codes de fonction supplémentaires : +« Sensor Default », « Power Monitor High Resolution »…), est importée, +telle quelle, avec une en-tête SPDX + provenance de quatre lignes. Les +captures BACnet du dossier amont (dont des captures de plugfests +d'autres sociétés) et les présentations ne sont pas importées. + +## Utilisation + +Copier `irb.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `dlm` (captures du bus en `USER0`) ou `bacnet-pt` (services +PrivateTransfer Watt Stopper dans le trafic BACnet). + +## Remarques + +- Prend **toute** l'encapsulation `USER0` (DLT 147) tant que le script + est chargé. +- Le commentaire d'origine vise Wireshark 1.6 ; non vérifié dans les + versions récentes. Utilise `bit.band` (bibliothèque `bit` fournie par + Wireshark 4.4 et plus). +- Le champ `irb.lrc` est déclaré par les deux protocoles (`dlm` et + `bacnet-pt`), comme dans l'amont. +- Pas de capture DLM d'exemple importée ; non vérifié dans Wireshark. diff --git a/dissectors/wattstopper-irb/irb.lua b/dissectors/wattstopper-irb/irb.lua new file mode 100644 index 0000000..3d6cf9d --- /dev/null +++ b/dissectors/wattstopper-irb/irb.lua @@ -0,0 +1,1564 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/kargs-net/kargs-net.github.io (captures/irb.lua), +-- commit c7f6b224d314da0d7bfe3711fee34cd3a693680e du 31/05/2026. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- The Watt Stopper - In Room Bus dissector +-- Copyright Steve Karg +--[[ + +Copy this file to the plugins directory: +i.e. C:\Program Files\Wireshark\plugins\1.6.3 + +TODO: +add dissection to all the packet types + +]] + +local irb = Proto("DLM", "The Watt Stopper DLM bus") + +local f = irb.fields + +-- Value Strings +local vs_fc = { + [0] = "none", + [1] = "Arbitrate Request", + [3] = "Arbitrate Release", + [4] = "PnG Request", + [5] = "PnG Enter", + [6] = "PnG Exit", + [7] = "PnG Required", + [8] = "PnG Configure", + [9] = "PnG Deny", + [10] = "PnL Request", + [11] = "PnL Enter", + [12] = "PnL Exit", + [13] = "PnL Next", + [14] = "PnL Data", + [15] = "PnL Set", + [16] = "Set", + [17] = "Clear Device", + [18] = "Memory Read", + [19] = "MAC Response", + [20] = "MAC Ping", + [21] = "MAC Reboot", + [22] = "MAC Reset", + [23] = "MAC Report", + [24] = "Sensor Default", + [25] = "Memory Write", + [26] = "Short Address", + [27] = "PnL Load Query", + [28] = "Load Table", + [29] = "Sensor Query", + [30] = "Sensor Data", + [31] = "Active for Override", + [32] = "Schedule Request", + [33] = "Schedule Overrides", + [35] = "Scene Include Exclude", + [36] = "Scene Set", + [37] = "Test Mode Override", + [38] = "Sensor Detection", + [39] = "Ack Load", + [40] = "Ack IR", + [41] = "Set MAC", + [42] = "Clear Bindings", + [43] = "IRB Clear", + [44] = "IRB Reset", + [45] = "IRB Reboot", + [46] = "Device Query", + [47] = "Memory Reply", + [48] = "Test Mode Exit", + [49] = "Device Response", + [50] = "Test Mode", + [51] = "Sensor Warning", + [52] = "Sensor Goto", + [53] = "PnL Toggle Binding", + [54] = "Scene Table On Level", + [55] = "Scene Table Off Level", + [56] = "Scene Table Fade Rate", + [57] = "Lock Switches", + [58] = "Button Query", + [59] = "Button ID", + [60] = "Group Status", + [61] = "Load Data", + [62] = "Load Count Request", + [63] = "Load Count", + [64] = "24V Request", + [65] = "24V Reply", + [66] = "24V Assign", + [67] = "Ack Load Query", + [68] = "Function Code 68", + [69] = "Factory Defaults Request", + [70] = "Factory Defaults Unlock", + [71] = "Function Code 71", + [72] = "Presentation Mode", + [74] = "Analog Photocell", + [75] = "Power Monitor", + [76] = "Power Monitor High Resolution", + [77] = "Power Monitor Shades", + [78] = "Status Report", + [79] = "Status Response", + [80] = "Get", + [81] = "Set Macro", + [82] = "Radio Activate", + [83] = "BAS Module Report", + [84] = "BAS Module Response", + [85] = "Active Profile Set", + [86] = "Function Code 86", + [87] = "PnG/PnL Lock/Unlock", + [88] = "IRB Environment Type", + [89] = "Function Code 89", + [90] = "Locale Query", + [91] = "Locale Response", + [92] = "MAC Ping Stop", + [93] = "Function Code 93", + [94] = "Load Shed", + [95] = "Function Code 95", + [96] = "Bootloader Present", + [97] = "Bootloader Start", + [98] = "Bootloader Gone", + [99] = "Function Code 99", + [100] = "PnS Tug Lock", + [101] = "24V Enable", + [102] = "Shade Bus Power Control", + [103] = "Shade Count Request", + [104] = "Shade Count", + [105] = "TnG Deny", + [106] = "TnL Request", + [107] = "TnL Enter", + [108] = "TnL Exit", + [109] = "TnL Next", + [110] = "TnL Data", + [111] = "TnL Set", + [112] = "Daylight Set Sensor Calibration", + [113] = "Daylight Commission Auto", + [114] = "Daylight Commission Manual", + [115] = "Daylight Report Task Levels", + [116] = "Daylight Commission Stop", + [117] = "Daylight Commission Complete", + [118] = "Daylight Adjust Start", + [119] = "Daylight Adjust Level", + [120] = "Daylight Adjust End", + [121] = "Daylight Report Task Setpoint", + [122] = "Photocell COV", + [123] = "Function Code 123", + [124] = "Function Code 124", + [125] = "Function Code 125", + [126] = "Function Code 126", + [127] = "Function Code 127", + [128] = "Master MAC Report", + [129] = "Master MAC Response", + [130] = "Get Image", + [131] = "Get Image", + [132] = "Get Image Mask", + [133] = "Get Image Data", + [133] = "Smartwire Process", + [134] = "Tag Network Description", + [135] = "Image Mask Data", + [136] = "Masking Event", + [137] = "Group Control", + [138] = "Color Acknowledge", + [139] = "Luna Bootload Command", + [140] = "Function Code 140", + [141] = "Function Code 141", + [142] = "Function Code 142", + [143] = "Function Code 143", + [144] = "Debug Message", + + [240] = "Switch Error", + [245] = "Load Step Request", + [246] = "Load Step Response", + [254] = "Room Error", + [255] = "Test" +} + +local vs_sfc = { + [0] = "ACK", + [1] = "Load ID", + [2] = "Load Table", + [3] = "Zone", + [4] = "Scene", + [8] = "Short Address", + [9] = "Scene Name", + [10] = "LED On Level", + [11] = "LED Off Level", + [12] = "LED Brightness", + [13] = "Sensor Sensitivity", + [14] = "Sensor Priority", + [16] = "Relay Close Time", + + [100] = "Sensor Features v1", + [101] = "Sensor/Switch Load Table", + [102] = "Sensor/Switch Load Status", + [103] = "Sensor Features v2", + [105] = "Switch Features", + [106] = "Button Label", + [107] = "Button Features", + [108] = "LMxW Load Table", + [109] = "LMxW Load Status", + + [110] = "Daylight Features", + [111] = "Daylight Load Table", + [112] = "Daylight Dimming", + [113] = "Daylight Switching", + [114] = "Daylight Zone Dimming", + [115] = "Daylight Zone Switching", + [116] = "Photocell Features", + [117] = "Daylight Calibration", + [118] = "Daylight Dual Head Features", + [119] = "Daylight Dual Head Calibration", + + [120] = "Load Power", + [121] = "Load Label", + [122] = "Load Features", + [123] = "Load Mode Dimming", + [124] = "Load Mode", + [125] = "Load Scene", + [126] = "Load Priority Array", + [127] = "Load Reference Current", + [128] = "Load Scene Enabled", + [129] = "Load Trim", + + [130] = "BACnet Module Features", + [131] = "BACnet Strings", + [132] = "BACnet Demand Response", + [133] = "BACnet Group Name", + [134] = "BACnet Group Features", + [135] = "BACnet Dark Features", + [136] = "BACnet Status", + [137] = "BACnet Occupy", + [138] = "BACnet Button", + [139] = "Crypto Data", + + [140] = "Holiday", + [141] = "Location", + [142] = "Time", + [143] = "Daylight Savings Time", + [144] = "Schedule Name", + [145] = "Schedule", + + [150] = "Load Power High Resolution", + [151] = "Camera Sensor Features", + + [154] = "802.15.4 Radio", + + [159] = "Log Message", + + [160] = "Ballast Curve", + [161] = "Shade LED Status", + [162] = "Shade Calibration", + [163] = "Shade Power", + [164] = "Shade Statistics", + + [176] = "LX Firmware Version", + + [178] = "LMSP Power Status", + [179] = "LMSP USB Status", + + [181] = "LMSP Schedule", + + [200] = "Device Name", + [201] = "Device Location", + [202] = "Device Version", + + [255] = "NAK" +} + +local vs_shed_mode = { + [0] = "disabled", + [1] = "enabled override allowed", + [2] = "enabled override forbidden" +} + +local vs_dimmer_command = { + [0] = "Dimmer Stop", + [1] = "Dimmer Up", + [2] = "Dimmer Down" +} + +local vs_group_local = { + [0] = "Local and Remote", + [1] = "Local Only", + [2] = "Remote Only" +} + +local vs_priority = { + [0] = "Override or Egress", + [1] = "Manual-Life Safety", + [2] = "Automatic-Life Safety", + [3] = "non-specific", + [4] = "non-specific", + [5] = "Critical Equipment Control", + [6] = "Minimum On/Off", + [7] = "Daylighting", + [8] = "Manual Operator", + [9] = "non-specific", + [10] = "non-specific", + [11] = "non-specific", + [12] = "non-specific", + [13] = "non-specific", + [14] = "non-specific", + [15] = "non-specific", + [16] = "Lowest", + [17] = "no-priority" +} + +local vs_level = { + [0] = "Off (0%)", + [1] = "Minumum On (1%)", + [100] = "Maximum On (100%)", + [240] = "Last non-zero", + [241] = "Do nothing", + [242] = "Normal Hours Override", + [243] = "After Hours Override", + [244] = "Normal Hours", + [245] = "After Hours", + [246] = "Last non-zero occupied", + [247] = "Group Off", + [248] = "Group On", + [249] = "Scene On", + [250] = "Blink", + [251] = "Shed Down", + [252] = "Shed Up", + [253] = "Scene Off", + [254] = "Presentation", + [255] = "Relinquish" +} + +local vs_sensor_mode = { + [0] = "nothing", + [1] = "off-only", + [2] = "on-only", + [3] = "on and off", + [4] = "on-only use override", + [5] = "off-only use grace time", + [6] = "on and off use grace time", + [254] = "reload", + [255] = "ignored" +} + +local vs_button_mode = { + [0] = "nothing", + [1] = "off-only", + [2] = "on-only", + [3] = "on and off", + [254] = "reload", + [255] = "ignored" +} + +local vs_button_momentary_mode = { + [0] = "toggle tracking", + [1] = "on-only", + [2] = "off-only", + [3] = "toggle non-tracking" +} + +local vs_button_scene_lock = { + [0] = "unlocked", + [1] = "locked" +} + +local vs_switch_button_mode = { + [1] = "Scene 1", + [2] = "Scene 2", + [3] = "Scene 3", + [4] = "Scene 4", + [5] = "Scene 5", + [6] = "Scene 6", + [7] = "Scene 7", + [8] = "Scene 8", + [9] = "Scene 9", + [10] = "Scene 10", + [11] = "Scene 11", + [12] = "Scene 12", + [13] = "Scene 13", + [14] = "Scene 14", + [15] = "Scene 15", + [16] = "Scene 16", + [238] = "Rocker 0xEE", + [239] = "Rocker 0xEF", + [254] = "Load 0xFE", + [255] = "Load 0xFF" +} + +local vs_egress = { + [0] = "disable blink warn", + [1] = "enable blink warn", + [255] = "ignored" +} + +local vs_schedule_mode = { + [100] = "After Hours", + [255] = "Normal Hours" +} + +local vs_override_time = { + [0] = "no override", + [255] = "ignored" +} + +local vs_action = { + [0] = "Scene 1", + [1] = "Scene 2", + [2] = "Scene 3", + [3] = "Scene 4", + [4] = "Scene 5", + [5] = "Scene 6", + [6] = "Scene 7", + [7] = "Scene 8", + [8] = "Scene 9", + [9] = "Scene 10", + [10] = "Scene 11", + [11] = "Scene 12", + [12] = "Scene 13", + [13] = "Scene 14", + [14] = "Scene 15", + [240] = "Goto Level", + [250] = "Blink", + [255] = "Relinquish" +} + +local vs_lm_class = { + [0] = "NONE", + [1] = "SWITCH", + [2] = "SENSOR", + [3] = "DAYLIGHT", + [4] = "PHOTOCELL", + [5] = "PLUGLOAD", + [6] = "LOAD", + [7] = "SHADE", + [8] = "IR", + [9] = "REMOTE", + [10] = "BACNET", + [11] = "PARTITION", + [15] = "SENSOR SWITCH" +} + +local vs_lm_type = { + [0] = "ALL", + [5] = "BC_300", + [10] = "SW_100", + [11] = "SW_101", + [12] = "SW_102", + [13] = "SW_103", + [14] = "SW_104", + [15] = "SW_105", + [16] = "SW_108", + [19] = "DM_101", + [20] = "DM_102", + [29] = "TS_100", + [32] = "IO_101", + [40] = "PC_100", + [41] = "UC_100", + [42] = "DC_100", + [43] = "PX_100", + [44] = "DX_100", + [45] = "UC_200", + [46] = "IO_201", + [48] = "CC_100", + [50] = "DW_101", + [51] = "DW_102", + [52] = "PW_101", + [53] = "PW_102", + [58] = "PD_102", + [70] = "LS_400", + [71] = "LS_500", + [72] = "LS_600", + [90] = "IO_301", + [102] = "PL_101", + [103] = "PL_201", + [104] = "PL_202", + [105] = "PL_201DK", + [107] = "PL_202DK", + [108] = "RC_2CREE1", + [110] = "RC_101", + [111] = "RC_102", + [112] = "RC_211", + [113] = "RC_212", + [114] = "RC_213", + [117] = "RC_221", + [118] = "RC_222", + [121] = "RC_231", + [124] = "RC_114", + [145] = "PANEL", + [150] = "IR_100", + [152] = "IO_102", + [153] = "PS_104", + [155] = "RH_101", + [156] = "RH_102", + [157] = "RH_105", + [160] = "FSP_201", + [161] = "FSP_211", + [255] = "CLASS" +} + +local vs_bridge = { + [0] = "None", + [1] = "BACnet", + [2] = "ZigBee", + [3] = "LonWorks" +} + +local vs_noyes = { + [1] = "No", + [2] = "Yes" +} + +local vs_offon = { + [1] = "off", + [2] = "on" +} + +local vs_empty = { + [1] = "empty", + [2] = "not empty" +} + +local vs_schedule = { + [1] = "normal hours", + [2] = "after hours" +} + +local vs_enabled = { + [1] = "disabled", + [2] = "enabled" +} + +local vs_multicast = { + [0] = "Load", + [1] = "Scene", + [2] = "Zone", + [3] = "BACnet" +} + +local vs_short_command = { + [0] = "None", + [1] = "Ping", + [2] = "Goto", + [3] = "Ramp Up", + [4] = "Ramp Down", + [5] = "Stop", + [6] = "Who Is", + [7] = "Data Set", + [8] = "Up", + [9] = "Down", + [10] = "Schedule" +} + +local vs_donglecode = { + [0] = "No Error", + [1] = "Preamble 1 Error", + [2] = "Preamble 2 Error", + [3] = "Checksum Error", + [4] = "Timeout Error", + [8] = "Other Family Error" +} + +local vs_bootcmd = { + [0x0D] = "Acknowledge", + [0x41] = "[A]ddress Set", + [0x42] = "[B]lock Write Flash", + [0x45] = "[E]xit", + [0x53] = "[S]Programmer", + [0x56] = "[V]ersion", + [0x61] = "[a]uto increment", + [0x62] = "[b]lock load query", + [0x65] = "[e]rase chip", + [0x67] = "[g]block read", + [0x6e] = "safety [n]et", + [0x73] = "[s]ignature", + [0x75] = "[u]nlock" +} + +local vs_group_trigger = { + [0] = "Local", + [1] = "Button", + [2] = "Schedule", + [3] = "Dark/Light", + [4] = "Occupancy/Vacancy", + [5] = "Local Button", + [6] = "Terminal", + [7] = "Status", + [8] = "Remote" +} + +-- Fields +f.donglecode = ProtoField.uint8("irb.donglecode", "donglecode", base.DEC, vs_donglecode) +f.deltadelay = ProtoField.uint16("irb.deltadelay", "deltadelay", base.DEC) +f.preamble1 = ProtoField.uint8("irb.preamble1", "preamble1", base.HEX) +f.preamble2 = ProtoField.uint8("irb.preamble2", "preamble2", base.HEX) +f.family = ProtoField.uint8("irb.family", "family", base.HEX) +f.family_type = ProtoField.uint8("irb.family.type", "family type", base.DEC, nil, 0xE0) +f.family_amode = ProtoField.uint8("irb.family.amode", "address mode", base.DEC, nil, 0x18) +f.family_ir = ProtoField.uint8("irb.family.ir", "IR direction", base.DEC, nil, 0x06) +f.seqno = ProtoField.uint8("irb.seqno", "seqno", base.DEC) +f.srcaddr = ProtoField.uint32("irb.srcaddr", "srcaddr", base.DEC) +f.dstaddr = ProtoField.uint32("irb.dstaddr", "dstaddr", base.DEC) +f.pkttype = ProtoField.uint8("irb.pkttype", "pkttype", base.DEC, vs_fc) +f.datalen = ProtoField.uint8("irb.datalen", "datalen", base.DEC) +f.multicast = ProtoField.uint32("irb.multicast", "multicast", base.DEC, vs_multicast, 0x000000C0) + +f.sfc = ProtoField.uint8("irb.sfc", "SFC", base.DEC, vs_sfc) + +f.arb_device = ProtoField.uint8("irb.arb.device", "device type", base.DEC, vs_lm_type) +f.arb_numload = ProtoField.uint8("irb.arb.numload", "load count", base.DEC) +f.arb_bridge = ProtoField.uint8("irb.arb.bridge", "bridge type", base.DEC, vs_bridge) + +f.png_loads_all = ProtoField.uint8("irb.png.loads_all", "all loads", base.DEC) +f.png_loads = ProtoField.uint8("irb.png.loads", "loads except plugloads", base.DEC) +f.png_lock = ProtoField.uint8("irb.png.lock", "PnG Lock Level", base.DEC) + +f.load_ack_index = ProtoField.uint8("irb.load_ack.index", "Load Index", base.DEC) +f.load_ack_settings = ProtoField.uint8("irb.load_ack.settings", "Load Ack Settings", base.HEX) +f.load_ack_settings_rbl = ProtoField.bool("irb.load_ack.settings.rbl", "Relay Bearing Load", 8, vs_noyes, 0x80) +f.load_ack_settings_rs = ProtoField.bool("irb.load_ack.settings.rs", "Relay Status", 8, vs_offon, 0x40) +f.load_ack_settings_dcl = ProtoField.bool("irb.load_ack.settings.dcl", "Dimming Capable Load", 8, vs_noyes, 0x20) +f.load_ack_settings_sts = ProtoField.bool("irb.load_ack.settings.sts", "Sensor Table State", 8, vs_empty, 0x10) +f.load_ack_settings_dl = ProtoField.bool("irb.load_ack.settings.dl", "Legacy Daylight Signal", 8, vs_offon, 0x08) +f.load_ack_settings_on = ProtoField.bool("irb.load_ack.settings.on", "Sensor Mode Auto On", 8, nil, 0x04) +f.load_ack_settings_ah = ProtoField.bool("irb.load_ack.settings.ah", "Normal or After Hours", 8, vs_schedule, 0x02) +f.load_ack_settings_bw = ProtoField.bool("irb.load_ack.settings.bw", "Blink Warn Enabled", 8, vs_enabled, 0x01) +f.load_ack_target_level = ProtoField.uint8("irb.load_ack.target_level", "Target Load Level", base.DEC, vs_level) +f.load_ack_priority = ProtoField.uint8("irb.load_ack.priority", "Priority", base.DEC, vs_priority) +f.load_ack_scene = ProtoField.uint8("irb.load_ack.scene", "Scene ID", base.DEC) +f.load_ack_profile = ProtoField.uint8("irb.load_ack.profile", "Room Profile", base.DEC) +f.load_ack_grace = ProtoField.uint8("irb.load_ack.grace", "Grace Time Countdown", base.DEC) +f.load_ack_direction = ProtoField.uint8("irb.load_ack.direction", "Ramp Direction", base.DEC, vs_dimmer_command) +f.load_ack_ramp = ProtoField.uint8("irb.load_ack.ramp", "Ramp Rate", base.DEC) +f.load_ack_fade = ProtoField.uint8("irb.load_ack.fade", "Fade Time", base.DEC) +f.load_ack_current_level = ProtoField.uint8("irb.load_ack.current_level", "Current Load Level", base.DEC, vs_level) +f.load_ack_timeout = ProtoField.uint8("irb.load_ack.timeout", "Override Time Countdown Minutes", base.DEC) +f.load_ack_scene_active = ProtoField.uint16("irb.load_ack.scene_active", "Scene Active Table", base.HEX) +f.load_ack_scene_table = ProtoField.uint16("irb.load_ack.scene_table", "Scene Bindings Table", base.HEX) +f.load_ack_limits = ProtoField.uint8("irb.load_ack.limits", "Dimming Limits", base.HEX) +f.load_ack_limits_shed = ProtoField.bool("irb.load_ack.limits.shed", "Load Shed", 8, nil, 0x01) +f.load_ack_limits_low = ProtoField.bool("irb.load_ack.limits.low", "Low Trim", 8, nil, 0x02) +f.load_ack_limits_high = ProtoField.bool("irb.load_ack.limits.high", "High Trim", 8, nil, 0x04) +f.load_ack_limits_lamp = ProtoField.bool("irb.load_ack.limits.lamp", "Lamp Lumen", 8, nil, 0x08) +f.load_ack_limits_burn = ProtoField.bool("irb.load_ack.limits.burn", "Burn-in", 8, nil, 0x10) +f.load_ack_limits_polarity = ProtoField.bool("irb.load_ack.limits.polarity", "Polarity", 8, nil, 0x20) +f.load_ack_limits_override = ProtoField.bool("irb.load_ack.limits.override", "Override", 8, nil, 0x40) +f.load_ack_limits_disabled = ProtoField.bool("irb.load_ack.limits.disabled", "Out of Service", 8, nil, 0x80) + +f.load_shed_level = ProtoField.uint8("irb.load_shed.level", "Shed Level", base.DEC, vs_level) +f.load_shed_mode = ProtoField.uint8("irb.load_shed.mode", "Shed Mode", base.DEC, vs_shed_mode) +f.load_shed_origin = ProtoField.uint8("irb.load_shed.origen", "Shed Origin", base.DEC) +f.load_shed_timeout = ProtoField.uint8("shed.timeout", "Shed Timeout Minutes", base.DEC) + +f.set_107_1 = ProtoField.uint8("set.107.1", "Button Index", base.DEC) +f.set_107_2 = ProtoField.uint8("set.107.2", "Button Mode", base.DEC, vs_switch_button_mode) +f.set_107_3 = ProtoField.uint8("set.107.3", "Button Fade Rate", base.DEC) +f.set_107_4 = ProtoField.uint8("set.107.4", "Button Ramp Rate", base.DEC) +f.set_107_5 = ProtoField.uint8("set.107.5", "Button Value ON", base.DEC, vs_level) +f.set_107_6 = ProtoField.uint8("set.107.6", "Button Value OFF", base.DEC, vs_level) +f.set_107_7 = ProtoField.uint8("set.107.7", "Button Time Delay", base.DEC) +f.set_107_8 = ProtoField.uint8("set.107.8", "Button Momentary Mode", base.DEC, vs_button_momentary_mode) +f.set_107_9 = ProtoField.uint8("set.107.9", "Button Priority", base.DEC) +f.set_107_10 = ProtoField.uint8("set.107.10", "Button LED Level", base.DEC) +f.set_107_12 = ProtoField.uint8("set.107.12", "Button Scene Lock", base.DEC, vs_button_scene_lock) +f.set_107_13 = ProtoField.uint8("set.107.13", "Button Fade ON", base.DEC) +f.set_107_14 = ProtoField.uint8("set.107.14", "Button Fade OFF", base.DEC) + +f.set_125_1 = ProtoField.uint8("set.125.1", "Output Index", base.DEC) +f.set_125_2 = ProtoField.uint8("set.125.2", "Profile Index", base.DEC) +f.set_125_3 = ProtoField.uint8("set.125.3", "Scene Index", base.DEC) +f.set_125_4 = ProtoField.uint8("set.125.4", "Number of Pairs", base.DEC) +f.set_125_level = ProtoField.uint8("set.125.level", "Load Level", base.DEC, vs_level) +f.set_125_fade = ProtoField.uint8("set.125.fade", "Load Fade Time", base.DEC) + +f.set_130_1 = ProtoField.uint24("set.130.1", "BACnet Device ID", base.DEC) +f.set_130_4 = ProtoField.uint8("set.130.4", "BACnet MS/TP MAC", base.DEC) +f.set_130_5 = ProtoField.uint8("set.130.5", "BACnet MS/TP Baud", base.DEC) +f.set_130_6 = ProtoField.uint8("set.130.6", "BACnet MS/TP Max_Master", base.DEC) +f.set_130_7 = ProtoField.uint8("set.130.7", "BACnet MS/TP MAC Actual", base.DEC) +f.set_130_8 = ProtoField.uint8("set.130.8", "IRB Poll Interval Minutes", base.DEC) +f.set_130_9 = ProtoField.uint16("set.130.9", "Room Square Feet", base.DEC) + +f.load_table = ProtoField.uint64("irb.load_table", "Load Table", base.HEX) +f.load_table_1 = ProtoField.bool("irb.load_table.1","Loads 1-8", 8, vs_offon, 0xFF) +f.load_table_2 = ProtoField.bool("irb.load_table.2","Loads 9-16", 8, vs_offon, 0xFF) +f.load_table_3 = ProtoField.bool("irb.load_table.3","Loads 17-24", 8, vs_offon, 0xFF) +f.load_table_4 = ProtoField.bool("irb.load_table.4","Loads 25-32", 8, vs_offon, 0xFF) +f.load_table_5 = ProtoField.bool("irb.load_table.5","Loads 33-40", 8, vs_offon, 0xFF) +f.load_table_6 = ProtoField.bool("irb.load_table.6","Loads 41-48", 8, vs_offon, 0xFF) +f.load_table_7 = ProtoField.bool("irb.load_table.7","Loads 49-56", 8, vs_offon, 0xFF) +f.load_table_8 = ProtoField.bool("irb.load_table.8","Loads 56-64", 8, vs_offon, 0xFF) +f.load_table_command = ProtoField.uint8("irb.load_table.command", "Load Table Command", base.DEC, vs_short_command) + +f.group_id = ProtoField.uint16("irb.group.id", "Group ID", base.DEC) +f.group_action = ProtoField.uint8("irb.group.action", "Group Action", base.DEC, vs_level) +f.group_priority = ProtoField.uint8("irb.group.priority", "Group Priority", base.DEC, vs_priority) +f.group_local = ProtoField.uint8("irb.group.local", "Group Local", base.DEC, vs_group_local) +f.group_trigger = ProtoField.uint8("irb.group.trigger", "Group Trigger", base.DEC, vs_group_trigger) +f.group_trigger_index = ProtoField.uint8("irb.group.trigger_index", "Group Trigger Index", base.DEC) + +f.schedule_mode = ProtoField.uint8("irb.schedule.mode", "Schedule Mode", base.DEC, vs_schedule_mode) +f.schedule_sensor_override = ProtoField.uint8("irb.schedule.sensor_override", "Sensor Override", base.DEC, vs_sensor_mode) +f.schedule_button_override = ProtoField.uint8("irb.schedule.button_override", "Button Override", base.DEC, vs_button_mode) +f.schedule_egress_override = ProtoField.uint8("irb.schedule.egress_override", "Egress Override", base.DEC, vs_egress) +f.schedule_override_time = ProtoField.uint8("irb.schedule.override_time", "Override Time", base.DEC, vs_override_time) +f.schedule_channel = ProtoField.uint8("irb.schedule.channel", "Channel", base.DEC) +f.schedule_time_delay = ProtoField.uint8("irb.schedule.time_delay", "Time Delay Minutes", base.DEC, vs_override_time) + +f.short_address_command = ProtoField.uint8("irb.cmd", "Short Address Command", base.DEC, vs_short_command) +f.cmd_goto_priority = ProtoField.uint8("irb.cmd.goto.priority", "Command Priority", base.HEX) +f.cmd_goto_level = ProtoField.uint8("irb.cmd.goto.level", "Command Level", base.DEC, vs_level) +f.cmd_goto_timeout = ProtoField.uint8("irb.cmd.goto.timeout", "Command Timeout (minutes)", base.DEC) +f.cmd_goto_origin = ProtoField.uint8("irb.cmd.goto.origin", "Command Origin", base.DEC) +f.cmd_goto_ramp = ProtoField.uint8("irb.cmd.goto.ramp", "Command Fade Rate", base.DEC) +f.cmd_goto_fade = ProtoField.uint8("irb.cmd.goto.fade", "Command Fade Time", base.DEC) +f.cmd_goto_action = ProtoField.uint8("irb.cmd.goto.action", "Command Action", base.DEC, vs_action) +f.cmd_goto_sensor = ProtoField.uint8("irb.cmd.goto.sensor", "Sensor Command", base.DEC, vs_level) + +f.mac_class = ProtoField.uint8("irb.mac.class", "MAC Class", base.DEC, vs_lm_class) +f.mac_type = ProtoField.uint8("irb.mac.type", "MAC Type", base.DEC, vs_lm_type) + +f.channels = ProtoField.uint8("irb.channels", "Channels", base.DEC) + +f.png_output = ProtoField.uint8("irb.png.output", "PnG Output", base.DEC) +f.png_address = ProtoField.uint8("irb.png.address", "PnG Short Address", base.DEC) +f.load_settings = ProtoField.uint8("irb.png.address", "PnG Settings", base.HEX) +f.load_settings_pxm = ProtoField.bool("irb.load_settings.pxm", "Sensor Mode", 8, vs_noyes, 0x01) +f.load_settings_swm = ProtoField.bool("irb.load_settings.swm", "Switch Mode", 8, vs_noyes, 0x02) +f.load_settings_leg = ProtoField.bool("irb.load_settings.leg", "Legacy Sensor", 8, vs_noyes, 0x04) +f.load_settings_dl = ProtoField.bool("irb.load_settings.dl", "Daylighting", 8, vs_noyes, 0x08) + +f.power_milliamps = ProtoField.uint16("irb.power.milliamps", "Milliamps", base.DEC) +f.power_volts = ProtoField.uint16("irb.power.volts", "Volts", base.DEC) +f.power_watts = ProtoField.uint16("irb.power.watts", "Watts", base.DEC) +f.power_pf = ProtoField.uint8("irb.power.pf", "Power Factor", base.DEC) +f.power_baseline = ProtoField.uint16("irb.power.baseline", "Baseline Watts", base.DEC) + +f.pdu = ProtoField.bytes("irb.pdu", "IRB Payload") + +f.bootcmd = ProtoField.uint8("irb.bootcmd", "boot command", base.DEC, vs_bootcmd) +f.bootrsp = ProtoField.string("irb.bootrsp", "boot response") +f.bootdata = ProtoField.bytes("irb.bootrsp", "boot data") +f.bootaddr = ProtoField.uint16("irb.bootaddr", "chip address") +f.bootmac = ProtoField.uint32("irb.bootmac", "serial number") + +f.lrc = ProtoField.uint8("irb.lrc", "LRC Checksum", base.HEX) + +-- Dissector +function irb.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "IRB" + local dongle = buffer(0,3) + local dongletree = tree:add(irb, dongle(0,3), "IRB Dongle") + local donglecode = dongle(0,1):uint() + dongletree:add(f.donglecode, dongle(0,1)) + dongletree:add(f.deltadelay, dongle(1,2)) + if (donglecode ~= 0) then + if (donglecode == 3) then + dongletree:add_expert_info(PI_CHECKSUM, PI_ERROR) + else + dongletree:add_expert_info(PI_MALFORMED, PI_ERROR) + end + else + local irb_len = 0 + local family = bit.band(buffer(5,1):uint(),0xE0) + if (family == 0xE0) then + -- BOOTLOADER + local irb_len_max = buffer:len() - 3 + irb_len = 4 + buffer(6,1):uint() + if (irb_len > irb_len_max) then + irb_len = irb_len_max + end + local boot_buf = buffer(3, irb_len) + dlm_bootloader_dissector(boot_buf, pinfo, tree) + end + if (family == 0xA0) then + -- DLM + local irb_len_max = buffer:len() - 3 + local pdulen = buffer(16,1):uint() + irb_len = 14 + pdulen + if (irb_len > irb_len_max) then + irb_len = irb_len_max + end + local irb_buf = buffer(3, irb_len) + dlm_dissector(irb_buf, pinfo, tree) + end + local lrc_offset = 3 + irb_len; + local lrc_offset_max = buffer:len() - 1 + if (lrc_offset > lrc_offset_max) then + lrc_offset = lrc_offset_max + end + local lrc = buffer(lrc_offset, 1) + local lrc_tree = tree:add(irb, lrc, "LRC") + lrc_tree:add(f.lrc, lrc) + end +end + +function dlm_bootloader_dissector(tvb, pinfo, tree) + local dissector_name = "Bootloader" + pinfo.cols.info = dissector_name + local header = tvb(0,4) + local headertree = tree:add(irb, header(0,4), "Bootloader") + headertree:add(f.preamble1, header(0,1)) + headertree:add(f.preamble2, header(1,1)) + local family_bytes = header(2,1) + local family_tree = headertree:add(f.family, family_bytes) + family_tree:add(f.family_type, family_bytes) + family_tree:add(f.family_amode, family_bytes) + family_tree:add(f.family_ir, family_bytes) + headertree:add(f.datalen, header(3,1)) + local pdulen = header(3,1):uint() + if (pdulen > 0) then + local pdulenmax = tvb:len() - 4 + if (pdulen > pdulenmax) then + headertree:add_expert_info(PI_MALFORMED, PI_ERROR, + "datalen exceeds packet size") + pdulen = pdulenmax + end + local pdu = tvb(4,pdulen) + local pdutree = tree:add(irb, pdu, "Bootloader PDU") + local opcode = pdu(0,1):uint() + local fc_string = "Command " .. opcode + local pduname = vs_bootcmd[opcode] or fc_string + if (((opcode == 0x0D) and (pdulen <= 1)) or + ((opcode == 0x41) and (pdulen <= 3)) or + ((opcode == 0x42) and (pdulen <= 4)) or + ((opcode == 0x45) and (pdulen <= 1)) or + ((opcode == 0x53) and (pdulen <= 1)) or + ((opcode == 0x56) and (pdulen <= 1)) or + ((opcode == 0x61) and (pdulen <= 1)) or + ((opcode == 0x62) and (pdulen <= 1)) or + ((opcode == 0x65) and (pdulen <= 3)) or + ((opcode == 0x67) and (pdulen <= 4)) or + ((opcode == 0x6E) and (pdulen <= 3)) or + ((opcode == 0x73) and (pdulen <= 1)) or + ((opcode == 0x75) and (pdulen <= 5))) then + pinfo.cols.info = dissector_name .. ":" .. pduname + pdutree:add(f.bootcmd, pdu(0,1)) + if (opcode == 0x41) then + pdutree:add(f.bootaddr, pdu(1,2)) + end + if (opcode == 0x75) then + pdutree:add(f.bootmac, pdu(1,4)) + end + else + if (pdulen <= 10) then + pinfo.cols.info = dissector_name .. ":" .. "Response" + pdutree:add(f.bootrsp, pdu(0,pdulen)) + else + pinfo.cols.info = dissector_name .. ":" .. "Data" + pdutree:add(f.bootdata, pdu(0,pdulen)) + end + end + end +end + +function dlm_dissector(tvb, pinfo, tree) + local header = tvb(0,14) + local opcode = header(12,1):uint() + local fc_string = "FC-" .. opcode + local pduname = vs_fc[opcode] or fc_string + local pdu_text = "Function Code: " .. pduname .. " (" .. opcode .. ")" + local srcaddr = header(4,4):uint() + local src_text = "Src: " .. srcaddr + local dstaddr = header(8,4):uint() + local dst_text = "Dst: " .. dstaddr + hdr_text = pdu_text .. ", " .. src_text .. ", " .. dst_text + local headertree = tree:add(irb, header(0,14), "IRB Header,", hdr_text) + headertree:add(f.preamble1, header(0,1)) + headertree:add(f.preamble2, header(1,1)) + local family_bytes = header(2,1) + local family_tree = headertree:add(f.family, family_bytes) + family_tree:add(f.family_type, family_bytes) + family_tree:add(f.family_amode, family_bytes) + family_tree:add(f.family_ir, family_bytes) + local seqno = header(3,1) + headertree:add(f.seqno, seqno) + + headertree:add(f.srcaddr, header(4,4)) + pinfo.cols.src = header(4,4):uint() + headertree:add(f.dstaddr, header(8,4)) + pinfo.cols.dst = header(8,4):uint() + headertree:add(f.pkttype, header(12,1)) + headertree:add(f.datalen, header(13,1)) + + local seqno_string = "[" .. seqno .. "] " + pinfo.cols.info = seqno_string .. pduname + + local pdulen = header(13,1):uint(); + if (pdulen > 0) then + local pdulenmax = tvb:len() - 14 + if (pdulen > pdulenmax) then + headertree:add_expert_info(PI_MALFORMED, PI_ERROR, + "datalen exceeds packet size") + pdulen = pdulenmax + end + local pdu = tvb(14,pdulen) + local pdutree = tree:add(f.pdu, pdu) + if pduname == "Arbitrate Request" then + pdutree:add(f.arb_device, pdu(0,1)) + pdutree:add(f.arb_numload, pdu(1,1)) + pdutree:add(f.arb_bridge, pdu(2,1)) + end + if pduname == "PnG Configure" then + pdutree:add(f.png_loads_all, pdu(0,1)) + pdutree:add(f.png_loads, pdu(1,1)) + end + if pduname == "PnG Deny" then + pdutree:add(f.png_lock, pdu(0,1)) + end + if pduname == "Group Control" then + pdutree:add(f.group_id, pdu(0,2)) + pdutree:add(f.group_action, pdu(2,1)) + pdutree:add(f.group_priority, pdu(3,1)) + pdutree:add(f.group_local, pdu(4,1)) + if (pdulen > 5) then + pdutree:add(f.group_trigger, pdu(5,1)) + end + if (pdulen > 6) then + pdutree:add(f.group_trigger_index, pdu(6,1)) + end + end + if pduname == "Group Status" then + pdutree:add(f.group_id, pdu(0,2)) + pdutree:add(f.group_action, pdu(2,1)) + if (pdulen > 3) then + pdutree:add(f.group_trigger, pdu(3,1)) + end + end + if pduname == "Set" or pduname == "Get" then + pdutree:add(f.sfc, pdu(0,1)) + local sfc = pdu(0,1):uint() + local sfc_string = "SFC-" .. sfc + local sfcname = vs_sfc[sfc] or sfc_string + pinfo.cols.info = seqno_string .. pduname .. " " .. sfcname + if pduname == "Set" then + if sfcname == "BACnet Module Features" then + pdutree:add(f.set_130_1, pdu(1,3)) + pdutree:add(f.set_130_4, pdu(4,1)) + pdutree:add(f.set_130_5, pdu(5,1)) + pdutree:add(f.set_130_6, pdu(6,1)) + pdutree:add(f.set_130_7, pdu(7,1)) + if (pdulen > 8) then + pdutree:add(f.set_130_8, pdu(8,1)) + end + if (pdulen > 9) then + pdutree:add(f.set_130_9, pdu(9,2)) + end + end + if sfcname == "Button Features" then + pdutree:add(f.set_107_1, pdu(1,1)) + pdutree:add(f.set_107_2, pdu(2,1)) + pdutree:add(f.set_107_3, pdu(3,1)) + pdutree:add(f.set_107_4, pdu(4,1)) + pdutree:add(f.set_107_5, pdu(5,1)) + pdutree:add(f.set_107_6, pdu(6,1)) + pdutree:add(f.set_107_7, pdu(7,1)) + pdutree:add(f.set_107_8, pdu(8,1)) + pdutree:add(f.set_107_9, pdu(9,1)) + pdutree:add(f.set_107_10, pdu(10,1)) + pdutree:add(f.set_107_12, pdu(12,1)) + pdutree:add(f.set_107_13, pdu(13,1)) + pdutree:add(f.set_107_14, pdu(14,1)) + end + if sfcname == "Load ID" then + pdutree:add(f.png_output, pdu(1,1)) + pdutree:add(f.png_address, pdu(2,1)) + if (pdulen > 3) then + load_settings(pdu(3,1), pdutree) + end + end + if sfcname == "Load Scene" then + pdutree:add(f.set_125_1, pdu(1,1)) + pdutree:add(f.set_125_2, pdu(2,1)) + pdutree:add(f.set_125_3, pdu(3,1)) + pdutree:add(f.set_125_4, pdu(4,1)) + local pairs = pdu(4,1):uint() + local level_offset = 5 + local fade_offset = 6 + while (pairs > 0) do + pdutree:add(f.set_125_level, pdu(level_offset,1)) + pdutree:add(f.set_125_fade, pdu(fade_offset,1)) + level_offset = level_offset + 2 + fade_offset = fade_offset + 2 + pairs = pairs - 1 + end + end + if sfcname == "Load Power" then + end + if sfcname == "Load Label" then + end + if sfcname == "Load Features" then + end + if sfcname == "Load Mode" then + end + if sfcname == "Load Priority Array" then + end + if sfcname == "Load Reference Current" then + end + if sfcname == "Load Scene Enabled" then + end + if sfcname == "NAK" then + end + end + end + if pduname == "Short Address" then + local multicast_type = bit.band(dstaddr, 0x000000C0) + local identifier = bit.band(dstaddr, 0x0000000F) + if (multicast_type == 0x00) then + -- load address multicast + local load_number = identifier + 1 + local short_command = pdu(0,1):uint() + local short_command_name = vs_short_command[short_command] or short_command + pinfo.cols.info = seqno_string .. pduname .. ":" .. " Load " .. load_number .. "-" .. short_command_name + pdutree:add(f.short_address_command, pdu(0,1)) + local short_pdu_len = pdulen - 1 + local short_pdu = pdu(1, short_pdu_len) + irb_short_command(short_pdu, pdutree, short_command_name) + end + if (multicast_type == 0x40) then + -- scene address multicast + local scene_number = identifier + 1 + local short_command = pdu(0,1):uint() + local short_command_name = vs_short_command[short_command] or short_command + pinfo.cols.info = seqno_string .. pduname .. ":" .. " Scene " .. scene_number .. "-" .. short_command_name + pdutree:add(f.short_address_command, pdu(0,1)) + local short_pdu_len = pdulen - 1 + local short_pdu = pdu(1, short_pdu_len) + irb_short_command(short_pdu, pdutree, short_command_name) + end + end + if pduname == "Load Table" then + local short_command = pdu(8,1):uint() + local short_command_name = vs_short_command[short_command] or short_command + pinfo.cols.info = seqno_string .. pduname .. "-" .. short_command_name + irb_load_table(pdu, pdutree) + pdutree:add(f.load_table_command, pdu(8,1)) + local short_pdu_len = pdulen - 9 + local short_pdu = pdu(9, short_pdu_len) + irb_short_command(short_pdu, pdutree, short_command_name) + end + if pduname == "Sensor Goto" then + irb_load_table(pdu, pdutree) + if (pdulen > 9) then + pdutree:add(f.cmd_goto_level, pdu(8,1)) + pdutree:add(f.cmd_goto_sensor, pdu(9,1)) + else + pdutree:add(f.cmd_goto_level, pdu(8,1)) + end + end + if pduname == "Ack Load" then + local load_number = pdu(0,1):uint() + 1 + pinfo.cols.info = seqno_string .. pduname .. " " .. load_number + pdutree:add(f.load_ack_index, pdu(0,1)) + load_ack_settings(pdu(1,1), pdutree) + pdutree:add(f.load_ack_target_level, pdu(2,1)) + pdutree:add(f.load_ack_priority, pdu(3,1)) + pdutree:add(f.load_ack_scene, pdu(4,1)) + pdutree:add(f.load_ack_profile, pdu(5,1)) + pdutree:add(f.load_ack_grace, pdu(6,1)) + pdutree:add(f.load_ack_direction, pdu(7,1)) + pdutree:add(f.load_ack_ramp, pdu(8,1)) + pdutree:add(f.load_ack_fade, pdu(9,1)) + pdutree:add(f.load_ack_current_level, pdu(10,1)) + pdutree:add(f.load_ack_timeout, pdu(11,1)) + if (pdulen > 12) then + pdutree:add(f.load_ack_scene_active, pdu(12,2)) + pdutree:add(f.load_ack_scene_table, pdu(13,2)) + end + if (pdulen > 16) then + local limits_byte = pdu(16,1) + local limits_tree = pdutree:add(f.load_ack_limits, limits_byte) + limits_tree:add(f.load_ack_limits_shed, limits_byte) + limits_tree:add(f.load_ack_limits_low, limits_byte) + limits_tree:add(f.load_ack_limits_high, limits_byte) + limits_tree:add(f.load_ack_limits_lamp, limits_byte) + limits_tree:add(f.load_ack_limits_burn, limits_byte) + limits_tree:add(f.load_ack_limits_polarity, limits_byte) + limits_tree:add(f.load_ack_limits_override, limits_byte) + limits_tree:add(f.load_ack_limits_disabled, limits_byte) + end + end + if pduname == "Schedule Request" then + local schedule_mode = pdu(8,1):uint() + local mode_name = vs_schedule_mode[schedule_mode] or schedule_mode + pinfo.cols.info = seqno_string .. pduname .. "-" .. mode_name + irb_load_table(pdu, pdutree) + pdutree:add(f.schedule_mode, pdu(8,1)) + pdutree:add(f.schedule_sensor_override, pdu(9,1)) + pdutree:add(f.schedule_button_override, pdu(10,1)) + pdutree:add(f.schedule_egress_override, pdu(11,1)) + pdutree:add(f.schedule_override_time, pdu(12,1)) + pdutree:add(f.schedule_channel, pdu(13,1)) + pdutree:add(f.schedule_time_delay, pdu(13,1)) + end + if pduname == "Load Shed" then + local shed_mode = pdu(9,1):uint() + local shed_mode_name = vs_shed_mode[shed_mode] or shed_mode + pinfo.cols.info = seqno_string .. pduname .. ", " .. "Mode=" .. shed_mode_name + irb_load_table(pdu, pdutree) + pdutree:add(f.load_shed_level, pdu(8,1)) + pdutree:add(f.load_shed_mode, pdu(9,1)) + pdutree:add(f.load_shed_origin, pdu(10,1)) + pdutree:add(f.load_shed_timeout, pdu(11,1)) + end + if pduname == "MAC Report" then + pdutree:add(f.mac_type, pdu(0,1)) + pdutree:add(f.mac_class, pdu(1,1)) + end + if pduname == "MAC Response" then + pdutree:add(f.mac_type, pdu(0,1)) + pdutree:add(f.mac_class, pdu(1,1)) + end + if pduname == "Status Report" then + pdutree:add(f.mac_type, pdu(0,1)) + pdutree:add(f.mac_class, pdu(1,1)) + end + if pduname == "Status Response" then + pdutree:add(f.mac_type, pdu(0,1)) + pdutree:add(f.mac_class, pdu(1,1)) + pdutree:add(f.channels, pdu(2,1)) + end + if pduname == "Power Monitor" then + pdutree:add(f.power_milliamps, pdu(0,2)) + pdutree:add(f.power_volts, pdu(2,2)) + pdutree:add(f.power_watts, pdu(4,2)) + pdutree:add(f.power_pf, pdu(6,1)) + pdutree:add(f.power_baseline, pdu(7,2)) + end + end +end + +function load_settings(pdu, pdutree) + local settings_bytes = pdu(0,1) + local settings_tree = pdutree:add(f.load_settings, settings_bytes) + settings_tree:add(f.load_settings_pxm, settings_bytes) + settings_tree:add(f.load_settings_swm, settings_bytes) + settings_tree:add(f.load_settings_leg, settings_bytes) + settings_tree:add(f.load_settings_dl, settings_bytes) +end + +function load_ack_settings(pdu, pdutree) + local settings_bytes = pdu(0,1) + local settings_tree = pdutree:add(f.load_ack_settings, settings_bytes) + settings_tree:add(f.load_ack_settings_rbl, settings_bytes) + settings_tree:add(f.load_ack_settings_rs, settings_bytes) + settings_tree:add(f.load_ack_settings_dcl, settings_bytes) + settings_tree:add(f.load_ack_settings_sts, settings_bytes) + settings_tree:add(f.load_ack_settings_dl, settings_bytes) + settings_tree:add(f.load_ack_settings_on, settings_bytes) + settings_tree:add(f.load_ack_settings_ah, settings_bytes) + settings_tree:add(f.load_ack_settings_bw, settings_bytes) +end + +function irb_load_table(pdu, pdutree) + local load_table_bytes = pdu(0,8) + local load_table_tree = pdutree:add(f.load_table, load_table_bytes) + load_table_tree:add(f.load_table_1, pdu(0,1)) + load_table_tree:add(f.load_table_2, pdu(1,1)) + load_table_tree:add(f.load_table_3, pdu(2,1)) + load_table_tree:add(f.load_table_4, pdu(3,1)) + load_table_tree:add(f.load_table_5, pdu(4,1)) + load_table_tree:add(f.load_table_6, pdu(5,1)) + load_table_tree:add(f.load_table_7, pdu(6,1)) + load_table_tree:add(f.load_table_8, pdu(7,1)) +end + +function irb_short_command(pdu, pdutree, short_command_name) + if short_command_name == "Goto" then + pdutree:add(f.cmd_goto_priority, pdu(0,1)) + pdutree:add(f.cmd_goto_level, pdu(1,1)) + pdutree:add(f.cmd_goto_timeout, pdu(2,1)) + pdutree:add(f.cmd_goto_origin, pdu(3,1)) + pdutree:add(f.cmd_goto_ramp, pdu(4,1)) + pdutree:add(f.cmd_goto_fade, pdu(5,1)) + end + if short_command_name == "Ramp Up" then + pdutree:add(f.cmd_goto_priority, pdu(0,1)) + pdutree:add(f.cmd_goto_ramp, pdu(1,1)) + pdutree:add(f.cmd_goto_origin, pdu(2,1)) + end + if short_command_name == "Ramp Down" then + pdutree:add(f.cmd_goto_priority, pdu(0,1)) + pdutree:add(f.cmd_goto_ramp, pdu(1,1)) + pdutree:add(f.cmd_goto_origin, pdu(2,1)) + end + if short_command_name == "Stop" then + pdutree:add(f.cmd_goto_priority, pdu(0,1)) + pdutree:add(f.cmd_goto_origin, pdu(1,1)) + end + if short_command_name == "Up" then + pdutree:add(f.cmd_goto_priority, pdu(0,1)) + pdutree:add(f.cmd_goto_ramp, pdu(1,1)) + pdutree:add(f.cmd_goto_origin, pdu(2,1)) + end + if short_command_name == "Down" then + pdutree:add(f.cmd_goto_ramp, pdu(0,1)) + pdutree:add(f.cmd_goto_origin, pdu(1,1)) + end + if short_command_name == "Data Set" then + end +end + +local wtap_encap = DissectorTable.get("wtap_encap") +wtap_encap:add(wtap.USER0,irb) + +-- PrivateTransfer hook into existing BACnet dissector +local pt = Proto("BACnet-PT", "PrivateTransfer") +local ptf = pt.fields +ptf.lrc = ProtoField.uint8("irb.lrc", "LRC Checksum", base.HEX) +ptf.tag1 = ProtoField.uint8("bacapp.pt.tag1", "Context Tag 1", base.HEX) +ptf.tag2open = ProtoField.uint8("bacapp.pt.tag2open", "Opening Tag 2", base.HEX) +ptf.apptag = ProtoField.bytes("bacapp.pt.apptag", "Application Tag") +ptf.appdata = ProtoField.bytes("bacapp.pt.appdata", "Application Data") +ptf.tag2close = ProtoField.uint8("bacapp.pt.tag2close", "Closing Tag 2", base.HEX) +ptf.service = ProtoField.uint16("bacapp.pt.service", "Service number", base.DEC) +ptf.group_id = ProtoField.uint16("bacapp.pt.group_id", "Group ID", base.DEC) +ptf.level = ProtoField.uint8("bacapp.pt.level", "Level", base.DEC, vs_level) +ptf.command = ProtoField.uint8("bacapp.pt.command", "Command", base.DEC, vs_level) +ptf.priority = ProtoField.uint8("bacapp.pt.priority", "Priority", base.DEC, vs_priority) +ptf.trigger = ProtoField.uint8("bacapp.pt.trigger", "Group Trigger", base.DEC, vs_group_trigger) +ptf.trigger_index = ProtoField.uint8("bacapp.pt.trigger_index", "Group Trigger Index", base.DEC) +ptf.fade_rate = ProtoField.uint8("bacapp.pt.fade_rate", "Fade Rate", base.DEC) +ptf.fade_time = ProtoField.uint8("bacapp.pt.fade_time", "Fade Time", base.DEC) +ptf.mac = ProtoField.uint32("bacapp.pt.mac", "Serial Number", base.DEC) +ptf.button = ProtoField.uint8("bacapp.pt.button", "Button Index", base.DEC) +ptf.mode = ProtoField.uint8("bacapp.pt.mode", "Button Mode", base.DEC) +ptf.zone = ProtoField.uint8("bacapp.pt.zone", "Zone", base.DEC) + +-- decodes BACnet tag. +-- Public variables tag_len, len_value_tag, tag_number and context_specific +function tag_header(tvb, tvb_offset, pinfo, tree) + tag_len = 1 + local lvt_offset = tvb_offset + tag_info = 0 + local tag = tvb(lvt_offset,1) + len_value_tag = bit.band(tag:uint(),0x07) + -- debug + -- local tag_tree = tree:add(pt, tag, "Len Value Tag", len_value_tag) + -- To solve the problem of lvt values of 6/7 being indeterminate + -- it can mean open/close tag or length of 6/7 after the length is + -- computed below - store whole tag info, not just context bit. + context_specific = bit.band(tag:uint(),0x08) + if (context_specific == 0x08) then + tag_info = bit.band(tag:uint(),0x07) + end + tag_number = bit.rshift(tag:uint(), 4) + extended_tag_number = bit.band(tag:uint(),0xF0) + if (extended_tag_number == 0xF0) then + lvt_offset = lvt_offset + 1 + local tag = tvb(lvt_offset,1) + tag_number = tag:uint() + tag_len = tag_len + 1 + -- debug + -- local tag_tree = tree:add(pt, tag, "Extended Tag", tag_number, tag_len) + end + if (len_value_tag == 5) then + -- extended value tag + lvt_offset = lvt_offset + 1 + local tag = tvb(lvt_offset,1) + tag_value = tag:uint() + tag_len = tag_len + 1 + if (tag_value == 254) then + lvt_offset = lvt_offset + 1 + local tag = tvb(lvt_offset,2) + len_value_tag = tag:uint() + tag_len = tag_len + 2 + end + if (tag_value == 255) then + lvt_offset = lvt_offset + 1 + local tag = tvb(lvt_offset,4) + len_value_tag = tag:uint() + tag_len = tag_len + 4 + end + if ((tag_value ~= 254) and (tag_value ~= 255)) then + len_value_tag = tag_value; + end + end +end + +function pt.dissector(tvb, pinfo, tree) + pinfo.cols.protocol = "BACnet-WattStopper" + local tvb_offset = 0 + local service_number = 0 + local service_offset = 0 + local service_len = 0 + local service_tree = tree + local service_text = "Service Data" + tag_header(tvb, tvb_offset, pinfo, tree) + if ((context_specific == 0x08) and (tag_number == 1)) then + -- calculate all the pieces + local service_number_len = tag_len + len_value_tag + local service_number_buf = tvb(tvb_offset, service_number_len) + local tag_buf = tvb(tvb_offset, tag_len) + tvb_offset = tvb_offset + tag_len + local value_buf = tvb(tvb_offset, len_value_tag) + tvb_offset = tvb_offset + len_value_tag + service_number = value_buf:uint() + local srv_text = "(" .. service_number .. ")" + -- now start printing pieces + local tag_tree = tree:add(pt, service_number_buf, "Service Number", srv_text) + tag_tree:add(ptf.tag1, tag_buf) + tag_tree:add(ptf.service, value_buf) + service_offset = tvb_offset + service_len = tvb:len() - tvb_offset + local service_data = tvb(service_offset, service_len) + service_tree = tree:add(pt, service_data, service_text) + end + if ((service_number == 1) or + (service_number == 2) or + (service_number == 3)) then + pinfo.cols.protocol = "PT->IRB" + end + if (service_number == 5) then + pinfo.cols.protocol = "IRB->PT" + end + if ((service_number == 1) or + (service_number == 2) or + (service_number == 3) or + (service_number == 5)) then + tag_header(tvb, tvb_offset, pinfo, tree) + if ((context_specific == 0x08) and + (tag_number == 2) and + (tag_info == 6)) then + -- opening tag + local tag_buf = tvb(tvb_offset, tag_len) + tvb_offset = tvb_offset + tag_len + -- application data + tag_header(tvb, tvb_offset, pinfo, tree) + if (context_specific == 0x00) then + service_tree:add(ptf.tag2open, tag_buf) + local apptag_buf = tvb(tvb_offset, tag_len) + service_tree:add(ptf.apptag, apptag_buf) + local app_data_offset = tvb_offset + tag_len + local app_data_len = len_value_tag + local app_data = tvb(app_data_offset, app_data_len) + if (tag_number == 6) then + -- octetstring + local irb_tree = service_tree:add(pt, app_data, "IRB Message") + local family = bit.band(app_data(2,1):uint(),0xE0) + if (family == 0xE0) then + dlm_bootloader_dissector(app_data, pinfo, irb_tree) + end + if (family == 0xA0) then + dlm_dissector(app_data, pinfo, irb_tree) + local dlm_text = service_text .. ", IRB " .. hdr_text + service_tree:set_text(dlm_text) + end + local lrc_offset = app_data_offset + app_data_len - 1; + local lrc = tvb(lrc_offset, 1) + local lrc_tree = irb_tree:add(pt, lrc, "LRC") + lrc_tree:add(ptf.lrc, lrc) + end + if (tag_number ~= 6) then + service_tree:add(ptf.appdata, app_data) + end + tvb_offset = tvb_offset + tag_len + len_value_tag; + -- closing tag + tag_header(tvb, tvb_offset, pinfo, tree) + tag_buf = tvb(tvb_offset, tag_len) + service_tree:add(ptf.tag2close, tag_buf) + end + end + end + if (service_number == 4) then + pinfo.cols.protocol = "PT->LMBC" + pinfo.cols.info = "LMBC: IRB Tunnel Heartbeat" + end + if (service_number == 20) then + pinfo.cols.protocol = "PT->LMBC" + pinfo.cols.info = "LMBC: Close IRB Tunnel" + end + if (service_number == 100) then + pinfo.cols.protocol = "PT->LMBC" + pinfo.cols.info = "LMBC: Simulation" + end + if (service_number == 120) then + pinfo.cols.protocol = "PT->LMBC" + pinfo.cols.info = "LMBC: ReinitializeDevice" + end + if (service_number == 200) then + pinfo.cols.protocol = "PT->COV" + pinfo.cols.info = "LMBC: ChangeOfValue" + end + if (service_number == 300) then + pinfo.cols.protocol = "PT->Group" + pinfo.cols.info = "LMBC: Group Control" + end + if (service_number == 301) then + pinfo.cols.protocol = "PT->Group" + pinfo.cols.info = "LMBC: Group Status" + end + if (service_number == 302) then + pinfo.cols.protocol = "PT->Group" + pinfo.cols.info = "LMBC: Group Occupancy Sensor" + end + if (service_number == 303) then + pinfo.cols.protocol = "PT->Group" + pinfo.cols.info = "LMBC: Group Button" + end + if ((service_number == 300) or + (service_number == 301) or + (service_number == 302) or + (service_number == 303)) then + tag_header(tvb, tvb_offset, pinfo, tree) + if ((context_specific == 0x08) and + (tag_number == 2) and + (tag_info == 6)) then + -- opening tag + local open_tag_buf = tvb(tvb_offset, tag_len) + service_tree:add(ptf.tag2open, open_tag_buf) + tvb_offset = tvb_offset + tag_len + -- parse the service data for application data + parsing_data = 1 + while (parsing_data > 0) do + -- loop to parse the application tagged values + tag_header(tvb, tvb_offset, pinfo, tree) + local apptag_buf = tvb(tvb_offset, tag_len) + service_tree:add(ptf.apptag, apptag_buf) + if (context_specific == 0x00) then + if (tag_number == 2) then + -- unsigned + local app_data_offset = tvb_offset + tag_len + local app_data_len = len_value_tag + local app_data = tvb(app_data_offset, app_data_len) + if (parsing_data == 1) then + service_tree:add(ptf.group_id, app_data) + elseif (parsing_data == 2) then + if ((service_number == 300) or + (service_number == 301) or + (service_number == 303)) then + service_tree:add(ptf.level, app_data) + elseif (service_number == 302) then + service_tree:add(ptf.command, app_data) + else + service_tree:add(pt, app_data, "Unsigned Integer") + end + elseif (parsing_data == 3) then + if ((service_number == 300) or + (service_number == 303)) then + service_tree:add(ptf.priority, app_data) + elseif (service_number == 302) then + service_tree:add(ptf.level, app_data) + else + service_tree:add(pt, app_data, "Unsigned Integer") + end + elseif (parsing_data == 4) then + if ((service_number == 300) or + (service_number == 303)) then + service_tree:add(ptf.trigger, app_data) + elseif (service_number == 302) then + service_tree:add(ptf.zone, app_data) + else + service_tree:add(pt, app_data, "Unsigned Integer") + end + elseif (parsing_data == 5) then + if ((service_number == 300) or + (service_number == 303)) then + service_tree:add(ptf.trigger_index, app_data) + elseif (service_number == 302) then + service_tree:add(ptf.mac, app_data) + else + service_tree:add(pt, app_data, "Unsigned Integer") + end + elseif (parsing_data == 6) then + if (service_number == 303) then + service_tree:add(ptf.fade_rate, app_data) + else + service_tree:add(pt, app_data, "Unsigned Integer") + end + elseif (parsing_data == 7) then + if (service_number == 303) then + service_tree:add(ptf.fade_time, app_data) + else + service_tree:add(pt, app_data, "Unsigned Integer") + end + else + service_tree:add(pt, app_data, "Unsigned Integer") + end + else + local app_data_offset = tvb_offset + tag_len + local app_data_len = len_value_tag + local app_data = tvb(app_data_offset, app_data_len) + local irb_tree = service_tree:add(pt, app_data, + "Unknown Value") + end + tvb_offset = tvb_offset + tag_len + len_value_tag + parsing_data = parsing_data + 1 + end + if (context_specific == 0x08) then + if ((tag_number == 2) and + (tag_info == 7)) then + -- closing tag + local close_tag_buf = tvb(tvb_offset, tag_len) + service_tree:add(ptf.tag2close, close_tag_buf) + -- break out of our loop + parsing_data = 0 + end + tvb_offset = tvb_offset + tag_len + end + end + end + end + if (service_number == 200) then + tag_header(tvb, tvb_offset, pinfo, tree) + if ((context_specific == 0x08) and + (tag_number == 2) and + (tag_info == 6)) then + -- opening tag + local open_tag_buf = tvb(tvb_offset, tag_len) + service_tree:add(ptf.tag2open, open_tag_buf) + tvb_offset = tvb_offset + tag_len + -- parse the service data for application data + parsing_data = 1 + while (parsing_data > 0) do + -- loop to parse the application tagged values + tag_header(tvb, tvb_offset, pinfo, tree) + local apptag_buf = tvb(tvb_offset, tag_len) + service_tree:add(ptf.apptag, apptag_buf) + if (context_specific == 0x00) then + if (tag_number == 2) then + -- unsigned + local app_data_offset = tvb_offset + tag_len + local app_data_len = len_value_tag + local app_data = tvb(app_data_offset, app_data_len) + if (parsing_data == 1) then + service_tree:add(ptf.mac, app_data) + elseif (parsing_data == 2) then + service_tree:add(ptf.button, app_data) + elseif (parsing_data == 3) then + service_tree:add(ptf.level, app_data) + elseif (parsing_data == 4) then + service_tree:add(ptf.mode, app_data) + elseif (parsing_data == 5) then + service_tree:add(ptf.priority, app_data) + elseif (parsing_data == 6) then + service_tree:add(ptf.group_id, app_data) + else + service_tree:add(pt, app_data, "Unsigned Integer") + end + else + local app_data_offset = tvb_offset + tag_len + local app_data_len = len_value_tag + local app_data = tvb(app_data_offset, app_data_len) + local irb_tree = service_tree:add(pt, app_data, + "Unknown Value") + end + tvb_offset = tvb_offset + tag_len + len_value_tag + parsing_data = parsing_data + 1 + end + if (context_specific == 0x08) then + if ((tag_number == 2) and + (tag_info == 7)) then + -- closing tag + local close_tag_buf = tvb(tvb_offset, tag_len) + service_tree:add(ptf.tag2close, close_tag_buf) + -- break out of our loop + parsing_data = 0 + end + tvb_offset = tvb_offset + tag_len + end + end + end + end + if (service_number == 9600) then + pinfo.cols.protocol = "PT->LMBC" + pinfo.cols.info = "LMBC: Baud Rate" + end +end + +local bacnet_pt_table = DissectorTable.get("bacapp.vendor_identifier") +bacnet_pt_table:add (86, pt) diff --git a/dissectors/wip-weather/LICENSE b/dissectors/wip-weather/LICENSE new file mode 100644 index 0000000..1ad6b36 --- /dev/null +++ b/dissectors/wip-weather/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 WIP Project + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/wip-weather/README.md b/dissectors/wip-weather/README.md new file mode 100644 index 0000000..1ae67cf --- /dev/null +++ b/dissectors/wip-weather/README.md @@ -0,0 +1,53 @@ +# WIP — Weather Information Protocol (données météo pour objets connectés) + +Dissecteurs Wireshark Lua du **WIP (Weather Information Protocol)**, +protocole UDP léger inspiré de NTP, conçu par un projet étudiant japonais +(U22) pour distribuer aux objets connectés les données publiques de +l'Agence météorologique du Japon : en-tête de 16 octets (version, +identifiant de paquet, type — requête / réponse de localisation, de météo, +de rapport, d'erreur —, drapeaux météo / température / probabilité de +précipitation / alertes / catastrophes / extension, jour, horodatage, code +de zone, somme de contrôle), champs fixes des réponses (code météo, +température, probabilité de précipitation) et enregistrements d'extension +(clé, longueur, données). Ports UDP 4109, 4110 et 4111. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/U22-2025/WIP (dossier `lua/`) | +| Commit importé | `ea9e49fe3f89bc2f3570d1eab0d04fca9070e73a` du 01/09/2025 (branche `main`, dernier commit ; dernière modification des dissecteurs : `bc084f1` du 11/07/2025) | +| Licence amont | MIT (`LICENSE` amont, © 2025 WIP Project) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur WIP natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `wip_dissector.lua` | Protocole `wipv1` : version la plus complète (champs fixes des réponses : code météo, température, probabilité de précipitation) | +| `wireshark.lua` | Protocole `wip-u22` : variante plus ancienne, sans ces champs fixes ; c'est celle que cite le README amont | + +Fichiers importés tels quels (commentaires en japonais) ; seule une +en-tête SPDX + provenance de quatre lignes a été ajoutée en tête de chaque +fichier. Le reste du dépôt (serveurs et clients Python / Rust / C++, +configuration) n'est pas importé. + +## Utilisation + +Copier **un seul** des deux fichiers (de préférence `wip_dissector.lua`) +dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +filtrer avec `wipv1` (ou `wip-u22`). Champs filtrables : `wip.type`, +`wip.area_code`, `wip.weather_code`… + +## Remarques + +- **Ne pas charger les deux fichiers ensemble** : ils déclarent les mêmes + champs `wip.*` et les mêmes ports UDP 4109-4111 ; le dernier chargé + prend les ports. +- Le nom « WIP » est celui du projet amont, sans rapport avec d'autres + protocoles de même sigle. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/wip-weather/wip_dissector.lua b/dissectors/wip-weather/wip_dissector.lua new file mode 100644 index 0000000..555752d --- /dev/null +++ b/dissectors/wip-weather/wip_dissector.lua @@ -0,0 +1,296 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/U22-2025/WIP (lua/wip_dissector.lua), +-- commit ea9e49fe3f89bc2f3570d1eab0d04fca9070e73a du 01/09/2025. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- WIP (Weather Transmission Protocol) Wireshark Dissector +-- Based on PACKET_STRUCTURE.md specification + +-- プロトコル定義 +local wip_proto = Proto("WIPv1", "Weather Transmission Protocol") + +-- 基本フィールドの定義(128ビット固定) +local f_version = ProtoField.uint8("wip.version", "Version", base.DEC, nil, 0x0F) +local f_packet_id = ProtoField.uint16("wip.packet_id", "Packet ID", base.DEC, nil, 0xFFF0) +local f_type = ProtoField.uint8("wip.type", "Type", base.DEC, { + [0] = "Location Request", + [1] = "Location Response", + [2] = "Weather Request", + [3] = "Weather Response", + [4] = "Query Request", + [5] = "Query Response", + [6] = "Alert", + [7] = "Reserved" +}, 0x07) + +-- フラグフィールド +local f_weather_flag = ProtoField.bool("wip.weather_flag", "Weather Flag", 8, nil, 0x08) +local f_temperature_flag = ProtoField.bool("wip.temperature_flag", "Temperature Flag", 8, nil, 0x10) +local f_pop_flag = ProtoField.bool("wip.pop_flag", "PoP Flag", 8, nil, 0x20) +local f_alert_flag = ProtoField.bool("wip.alert_flag", "Alert Flag", 8, nil, 0x40) +local f_disaster_flag = ProtoField.bool("wip.disaster_flag", "Disaster Flag", 8, nil, 0x80) +local f_ex_flag = ProtoField.bool("wip.ex_flag", "Extension Flag", 8, nil, 0x01) +local f_day = ProtoField.uint8("wip.day", "Days", base.DEC, nil, 0x0E) +local f_reserved = ProtoField.uint8("wip.reserved", "Reserved", base.HEX, nil, 0xF0) + +-- タイムスタンプとエリア情報 +local f_timestamp = ProtoField.uint64("wip.timestamp", "Timestamp", base.DEC) +local f_area_code = ProtoField.uint32("wip.area_code", "Area Code", base.DEC, nil, 0xFFFFF000) +local f_checksum = ProtoField.uint16("wip.checksum", "Checksum", base.HEX, nil, 0x0FFF) + +-- レスポンス固定長拡張フィールド(129-160ビット) +local f_weather_code = ProtoField.uint16("wip.weather_code", "Weather Code", base.DEC) +local f_temperature = ProtoField.uint8("wip.temperature", "Temperature", base.DEC) +local f_pops = ProtoField.uint8("wip.pops", "precipitation_prob Probability (%)", base.DEC) + +-- 可変長拡張フィールド +local f_ext_record = ProtoField.bytes("wip.ext_record", "Extension Record") +local f_ext_key = ProtoField.uint16("wip.ext_key", "Extension Key", base.DEC, { + [1] = "Alert", + [2] = "Disaster", + [33] = "Latitude", + [34] = "Longitude", + [40] = "Source" +}, 0x003F) +local f_ext_length = ProtoField.uint16("wip.ext_length", "Extension Length", base.DEC, nil, 0xFFC0) +local f_ext_data = ProtoField.string("wip.ext_data", "Extension Data") + +-- プロトコルフィールドの登録 +wip_proto.fields = { + f_version, f_packet_id, f_type, + f_weather_flag, f_temperature_flag, f_pop_flag, f_alert_flag, f_disaster_flag, + f_ex_flag, f_day, f_reserved, + f_timestamp, f_area_code, f_checksum, + f_weather_code, f_temperature, f_pops, + f_ext_record, f_ext_key, f_ext_length, f_ext_data +} + +-- ビット抽出用ヘルパー関数(リトルエンディアン対応) +local function extract_bits_le(data, bit_pos, bit_len) + local byte_pos = math.floor(bit_pos / 8) + local bit_offset = bit_pos % 8 + local mask = (1 << bit_len) - 1 + + if byte_pos >= data:len() then + return 0 + end + + -- 複数バイトにまたがる場合の処理 + local value = 0 + local bits_read = 0 + local current_byte = byte_pos + + while bits_read < bit_len and current_byte < data:len() do + -- WiresharkのTvbRange APIを使用してバイト値を取得 + local byte_val = data(current_byte, 1):uint() + local available_bits = 8 - (current_byte == byte_pos and bit_offset or 0) + local bits_to_read = math.min(bit_len - bits_read, available_bits) + + local shift = current_byte == byte_pos and bit_offset or 0 + local byte_mask = ((1 << bits_to_read) - 1) << shift + local extracted = (byte_val & byte_mask) >> shift + + value = value | (extracted << bits_read) + bits_read = bits_read + bits_to_read + current_byte = current_byte + 1 + end + + return value & mask +end + +-- パケットタイプ別最小サイズ取得関数 +local function get_min_packet_size(type_val) + -- レスポンスパケット(1, 3, 5)は20バイト、リクエストパケットは16バイト + if type_val == 1 or type_val == 3 or type_val == 5 then + return 20 -- 基本16バイト + 固定長拡張4バイト + else + return 16 -- 基本フィールドのみ + end +end + +-- レスポンスパケット判定関数 +local function is_response_packet(type_val) + return type_val == 1 or type_val == 3 or type_val == 5 +end + +-- 拡張フィールドデコード関数 +local function decode_extension_data(key, data) + if key == 1 or key == 2 then -- Alert, Disaster (UTF-8 string) + return data:string() + elseif key == 33 or key == 34 then -- Latitude, Longitude (int32 scaled, little-endian) + if data:len() >= 4 then + -- リトルエンディアン符号付き32ビット整数として読み取り(10^6倍スケール) + local value = data:le_int() + return string.format("%.6f", value / 1000000.0) + end + elseif key == 40 then -- Source (UTF-8 string) + return data:string() + end + return data:bytes():tohex() +end + +-- メイン解析関数 +function wip_proto.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length < 16 then -- 最小パケットサイズ(128ビット = 16バイト) + return + end + + pinfo.cols.protocol = wip_proto.name + + local subtree = tree:add(wip_proto, buffer(), "Weather Transmission Protocol") + + -- 基本フィールドの解析(128ビット) + local basic_tree = subtree:add(buffer(0, 16), "Basic Fields (128 bits)") + + -- 制御情報ブロック(0-31ビット) + local control_tree = basic_tree:add(buffer(0, 4), "Control Information Block") + + -- ビット単位でのフィールド抽出 + local version = extract_bits_le(buffer(0, 4), 0, 4) + local packet_id = extract_bits_le(buffer(0, 4), 4, 12) + local type_val = extract_bits_le(buffer(0, 4), 16, 3) + local weather_flag = extract_bits_le(buffer(0, 4), 19, 1) + local temperature_flag = extract_bits_le(buffer(0, 4), 20, 1) + local pop_flag = extract_bits_le(buffer(0, 4), 21, 1) + local alert_flag = extract_bits_le(buffer(0, 4), 22, 1) + local disaster_flag = extract_bits_le(buffer(0, 4), 23, 1) + local ex_flag = extract_bits_le(buffer(0, 4), 24, 1) + local day = extract_bits_le(buffer(0, 4), 25, 3) + local reserved = extract_bits_le(buffer(0, 4), 28, 4) + + control_tree:add_le(f_version, buffer(0, 1)):append_text(" (" .. version .. ")") + control_tree:add_le(f_packet_id, buffer(0, 2)):append_text(" (" .. packet_id .. ")") + control_tree:add_le(f_type, buffer(2, 1)):append_text(" (" .. type_val .. ")") + + -- フラグ情報 + local flag_tree = control_tree:add(buffer(2, 2), "Flags") + flag_tree:add_le(f_weather_flag, buffer(2, 1)):append_text(" (" .. weather_flag .. ")") + flag_tree:add_le(f_temperature_flag, buffer(2, 1)):append_text(" (" .. temperature_flag .. ")") + flag_tree:add_le(f_pop_flag, buffer(2, 1)):append_text(" (" .. pop_flag .. ")") + flag_tree:add_le(f_alert_flag, buffer(2, 1)):append_text(" (" .. alert_flag .. ")") + flag_tree:add_le(f_disaster_flag, buffer(2, 1)):append_text(" (" .. disaster_flag .. ")") + flag_tree:add_le(f_ex_flag, buffer(3, 1)):append_text(" (" .. ex_flag .. ")") + flag_tree:add_le(f_day, buffer(3, 1)):append_text(" (" .. day .. " days)") + flag_tree:add_le(f_reserved, buffer(3, 1)):append_text(" (" .. reserved .. ")") + + -- タイムスタンプ(32-95ビット) + local timestamp = buffer(4, 8):le_uint64() + local timestamp_str = "" + if timestamp:tonumber() and timestamp:tonumber() > 0 then + -- UInt64を安全にnumberに変換してからos.dateを使用 + local ts_num = timestamp:tonumber() + if ts_num <= 2147483647 then -- 32bit時刻の範囲内 + timestamp_str = os.date("%Y-%m-%d %H:%M:%S", ts_num) + else + timestamp_str = "Invalid timestamp: " .. tostring(timestamp) + end + else + timestamp_str = tostring(timestamp) + end + basic_tree:add_le(f_timestamp, buffer(4, 8)):append_text(" (" .. timestamp_str .. ")") + + -- エリア情報(96-127ビット) + local area_info_tree = basic_tree:add(buffer(12, 4), "Area Information Block") + local area_code = extract_bits_le(buffer(12, 4), 0, 20) + local checksum = extract_bits_le(buffer(12, 4), 20, 12) + + area_info_tree:add_le(f_area_code, buffer(12, 3)):append_text(" (" .. area_code .. ")") + area_info_tree:add_le(f_checksum, buffer(14, 2)):append_text(" (0x" .. string.format("%03X", checksum) .. ")") + + -- パケットサイズの検証とパディング効率の表示 + local min_size = get_min_packet_size(type_val) + local efficiency = string.format("%.1f%%", (length / length) * 100) -- 実際は有効データ/全体で計算 + subtree:add(buffer(0, 0), "Packet Analysis: Size=" .. length .. " bytes, Min=" .. min_size .. " bytes, Efficiency=" .. efficiency) + + -- レスポンスパケットの固定長拡張フィールド解析(129-160ビット) + if is_response_packet(type_val) and length >= 20 then + local fixed_ext_tree = subtree:add(buffer(16, 4), "Fixed Extension Fields (129-160 bits)") + + -- weather_code (129-144ビット, 16ビット) + local weather_code = extract_bits_le(buffer(16, 4), 0, 16) + fixed_ext_tree:add_le(f_weather_code, buffer(16, 2)):append_text(" (" .. weather_code .. ")") + + -- temperature (145-152ビット, 8ビット) + local temperature = extract_bits_le(buffer(16, 4), 16, 8) + local temp_celsius = temperature - 100 -- -100℃~+155℃ + fixed_ext_tree:add_le(f_temperature, buffer(18, 1)):append_text(" (" .. temperature .. " = " .. temp_celsius .. "°C)") + + -- pops (153-160ビット, 8ビット) + local pops = extract_bits_le(buffer(16, 4), 24, 8) + fixed_ext_tree:add_le(f_pops, buffer(19, 1)):append_text(" (" .. pops .. "%)") + end + + -- 可変長拡張フィールドの解析(ex_flag = 1の場合) + if ex_flag == 1 and length > min_size then + local var_ext_start = is_response_packet(type_val) and 20 or 16 + local ext_tree = subtree:add(buffer(var_ext_start), "Variable Extension Fields") + local offset = var_ext_start + local record_num = 1 + local valid_records = 0 + + while offset < length do + if offset + 2 > length then + break + end + + -- レコードヘッダー(16ビット: 6ビットキー + 10ビットデータ長) + local header = buffer(offset, 2):le_uint() + local key = header & 0x3F -- 下位6ビット(0-5) + local data_len = (header >> 6) & 0x3FF -- 上位10ビット(6-15) + + -- 無効なレコード(key=0, data_len=0)の場合は処理を終了 + if header == 0 or (key == 0 and data_len == 0) then + -- パディング開始位置を記録 + local padding_length = length - offset + ext_tree:add(buffer(offset), "Zero Padding (Offset: " .. offset .. ", Length: " .. padding_length .. " bytes)") + break + end + + if offset + 2 + data_len > length then + break + end + + local record_tree = ext_tree:add(buffer(offset, 2 + data_len), + "Extension Record " .. record_num .. " (Key: " .. key .. ", Length: " .. data_len .. ")") + + record_tree:add_le(f_ext_key, buffer(offset, 1)):append_text(" (" .. key .. ")") + record_tree:add_le(f_ext_length, buffer(offset, 2)):append_text(" (" .. data_len .. " bytes)") + + if data_len > 0 then + local data_buffer = buffer(offset + 2, data_len) + local decoded_data = decode_extension_data(key, data_buffer) + record_tree:add(f_ext_data, data_buffer):append_text(" (" .. decoded_data .. ")") + end + + offset = offset + 2 + data_len + record_num = record_num + 1 + valid_records = valid_records + 1 + end + + -- デバッグ情報を表示 + ext_tree:add(buffer(16, 0), "Debug Info: Valid records=" .. valid_records .. ", Total packet=" .. length .. " bytes, Expected end=" .. offset) + end + + -- パケット情報の設定 + pinfo.cols.info = "WIP v" .. version .. " ID:" .. packet_id .. " Type:" .. type_val .. + " Area:" .. area_code .. (ex_flag == 1 and " [Extended]" or "") +end + +-- UDPポート4109-4111にプロトコルを登録 +local udp_port_table = DissectorTable.get("udp.port") +udp_port_table:add(4109, wip_proto) +udp_port_table:add(4110, wip_proto) +udp_port_table:add(4111, wip_proto) + +-- プロトコル情報を表示 +local function wip_proto_init() + local wip_info = { + version = "1.0", + author = "WIP Project", + description = "Weather Transmission Protocol Dissector for Wireshark" + } + print("WIP Dissector loaded: " .. wip_info.description .. " v" .. wip_info.version) +end + +-- 初期化時にプロトコル情報を表示 +wip_proto_init() diff --git a/dissectors/wip-weather/wireshark.lua b/dissectors/wip-weather/wireshark.lua new file mode 100644 index 0000000..416ab22 --- /dev/null +++ b/dissectors/wip-weather/wireshark.lua @@ -0,0 +1,251 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/U22-2025/WIP (lua/wireshark.lua), +-- commit ea9e49fe3f89bc2f3570d1eab0d04fca9070e73a du 01/09/2025. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +-- WIP (Weather Transmission Protocol) Wireshark Dissector +-- Based on PACKET_STRUCTURE.md specification + +-- プロトコル定義 +local wip_proto = Proto("WIP-U22", "Weather Transmission Protocol") + +-- 基本フィールドの定義(128ビット固定) +local f_version = ProtoField.uint8("wip.version", "Version", base.DEC, nil, 0x0F) +local f_packet_id = ProtoField.uint16("wip.packet_id", "Packet ID", base.DEC, nil, 0xFFF0) +local f_type = ProtoField.uint8("wip.type", "Type", base.DEC, { + [0] = "Location Request", + [1] = "Location Response", + [2] = "Weather Request", + [3] = "Weather Response", + [4] = "Query Request", + [5] = "Query Response", + [6] = "Alert", + [7] = "Reserved" +}, 0x07) + +-- フラグフィールド +local f_weather_flag = ProtoField.bool("wip.weather_flag", "Weather Flag", 8, nil, 0x08) +local f_temperature_flag = ProtoField.bool("wip.temperature_flag", "Temperature Flag", 8, nil, 0x10) +local f_pop_flag = ProtoField.bool("wip.pop_flag", "pop Flag", 8, nil, 0x20) +local f_alert_flag = ProtoField.bool("wip.alert_flag", "Alert Flag", 8, nil, 0x40) +local f_disaster_flag = ProtoField.bool("wip.disaster_flag", "Disaster Flag", 8, nil, 0x80) +local f_ex_flag = ProtoField.bool("wip.ex_flag", "Extension Flag", 8, nil, 0x01) +local f_day = ProtoField.uint8("wip.day", "Days", base.DEC, nil, 0x0E) +local f_reserved = ProtoField.uint8("wip.reserved", "Reserved", base.HEX, nil, 0xF0) + +-- タイムスタンプとエリア情報 +local f_timestamp = ProtoField.uint64("wip.timestamp", "Timestamp", base.DEC) +local f_area_code = ProtoField.uint32("wip.area_code", "Area Code", base.DEC, nil, 0xFFFFF000) +local f_checksum = ProtoField.uint16("wip.checksum", "Checksum", base.HEX, nil, 0x0FFF) + +-- 拡張フィールド +local f_ext_record = ProtoField.bytes("wip.ext_record", "Extension Record") +local f_ext_key = ProtoField.uint16("wip.ext_key", "Extension Key", base.DEC, { + [1] = "Alert", + [2] = "Disaster", + [33] = "Latitude", + [34] = "Longitude", + [40] = "Source" +}, 0x003F) +local f_ext_length = ProtoField.uint16("wip.ext_length", "Extension Length", base.DEC, nil, 0xFFC0) +local f_ext_data = ProtoField.string("wip.ext_data", "Extension Data") + +-- プロトコルフィールドの登録 +wip_proto.fields = { + f_version, f_packet_id, f_type, + f_weather_flag, f_temperature_flag, f_pop_flag, f_alert_flag, f_disaster_flag, + f_ex_flag, f_day, f_reserved, + f_timestamp, f_area_code, f_checksum, + f_ext_record, f_ext_key, f_ext_length, f_ext_data +} + +-- ビット抽出用ヘルパー関数(リトルエンディアン対応) +local function extract_bits_le(data, bit_pos, bit_len) + local byte_pos = math.floor(bit_pos / 8) + local bit_offset = bit_pos % 8 + local mask = (1 << bit_len) - 1 + + if byte_pos >= data:len() then + return 0 + end + + -- 複数バイトにまたがる場合の処理 + local value = 0 + local bits_read = 0 + local current_byte = byte_pos + + while bits_read < bit_len and current_byte < data:len() do + -- WiresharkのTvbRange APIを使用してバイト値を取得 + local byte_val = data(current_byte, 1):uint() + local available_bits = 8 - (current_byte == byte_pos and bit_offset or 0) + local bits_to_read = math.min(bit_len - bits_read, available_bits) + + local shift = current_byte == byte_pos and bit_offset or 0 + local byte_mask = ((1 << bits_to_read) - 1) << shift + local extracted = (byte_val & byte_mask) >> shift + + value = value | (extracted << bits_read) + bits_read = bits_read + bits_to_read + current_byte = current_byte + 1 + end + + return value & mask +end + +-- 拡張フィールドデコード関数 +local function decode_extension_data(key, data) + if key == 1 or key == 2 then -- Alert, Disaster (UTF-8 string) + return data:string() + elseif key == 33 or key == 34 then -- Latitude, Longitude (int32 scaled, little-endian) + if data:len() >= 4 then + -- リトルエンディアン符号付き32ビット整数として読み取り(10^6倍スケール) + local value = data:le_int() + return string.format("%.6f", value / 1000000.0) + end + elseif key == 40 then -- Source (UTF-8 string) + return data:string() + end + return data:bytes():tohex() +end + +-- メイン解析関数 +function wip_proto.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length < 16 then -- 最小パケットサイズ(128ビット = 16バイト) + return + end + + pinfo.cols.protocol = wip_proto.name + + local subtree = tree:add(wip_proto, buffer(), "Weather Transmission Protocol") + + -- 基本フィールドの解析(128ビット) + local basic_tree = subtree:add(buffer(0, 16), "Basic Fields (128 bits)") + + -- 制御情報ブロック(0-31ビット) + local control_tree = basic_tree:add(buffer(0, 4), "Control Information Block") + + -- ビット単位でのフィールド抽出 + local version = extract_bits_le(buffer(0, 4), 0, 4) + local packet_id = extract_bits_le(buffer(0, 4), 4, 12) + local type_val = extract_bits_le(buffer(0, 4), 16, 3) + local weather_flag = extract_bits_le(buffer(0, 4), 19, 1) + local temperature_flag = extract_bits_le(buffer(0, 4), 20, 1) + local pop_flag = extract_bits_le(buffer(0, 4), 21, 1) + local alert_flag = extract_bits_le(buffer(0, 4), 22, 1) + local disaster_flag = extract_bits_le(buffer(0, 4), 23, 1) + local ex_flag = extract_bits_le(buffer(0, 4), 24, 1) + local day = extract_bits_le(buffer(0, 4), 25, 3) + local reserved = extract_bits_le(buffer(0, 4), 28, 4) + + control_tree:add_le(f_version, buffer(0, 1)):append_text(" (" .. version .. ")") + control_tree:add_le(f_packet_id, buffer(0, 2)):append_text(" (" .. packet_id .. ")") + control_tree:add_le(f_type, buffer(2, 1)):append_text(" (" .. type_val .. ")") + + -- フラグ情報 + local flag_tree = control_tree:add(buffer(2, 2), "Flags") + flag_tree:add_le(f_weather_flag, buffer(2, 1)):append_text(" (" .. weather_flag .. ")") + flag_tree:add_le(f_temperature_flag, buffer(2, 1)):append_text(" (" .. temperature_flag .. ")") + flag_tree:add_le(f_pop_flag, buffer(2, 1)):append_text(" (" .. pop_flag .. ")") + flag_tree:add_le(f_alert_flag, buffer(2, 1)):append_text(" (" .. alert_flag .. ")") + flag_tree:add_le(f_disaster_flag, buffer(2, 1)):append_text(" (" .. disaster_flag .. ")") + flag_tree:add_le(f_ex_flag, buffer(3, 1)):append_text(" (" .. ex_flag .. ")") + flag_tree:add_le(f_day, buffer(3, 1)):append_text(" (" .. day .. " days)") + flag_tree:add_le(f_reserved, buffer(3, 1)):append_text(" (" .. reserved .. ")") + + -- タイムスタンプ(32-95ビット) + local timestamp = buffer(4, 8):le_uint64() + local timestamp_str = "" + if timestamp:tonumber() and timestamp:tonumber() > 0 then + -- UInt64を安全にnumberに変換してからos.dateを使用 + local ts_num = timestamp:tonumber() + if ts_num <= 2147483647 then -- 32bit時刻の範囲内 + timestamp_str = os.date("%Y-%m-%d %H:%M:%S", ts_num) + else + timestamp_str = "Invalid timestamp: " .. tostring(timestamp) + end + else + timestamp_str = tostring(timestamp) + end + basic_tree:add_le(f_timestamp, buffer(4, 8)):append_text(" (" .. timestamp_str .. ")") + + -- エリア情報(96-127ビット) + local area_info_tree = basic_tree:add(buffer(12, 4), "Area Information Block") + local area_code = extract_bits_le(buffer(12, 4), 0, 20) + local checksum = extract_bits_le(buffer(12, 4), 20, 12) + + area_info_tree:add_le(f_area_code, buffer(12, 3)):append_text(" (" .. area_code .. ")") + area_info_tree:add_le(f_checksum, buffer(14, 2)):append_text(" (0x" .. string.format("%03X", checksum) .. ")") + + -- 拡張フィールドの解析(ex_flag = 1の場合) + if ex_flag == 1 and length > 16 then + local ext_tree = subtree:add(buffer(16), "Extension Fields") + local offset = 16 + local record_num = 1 + local valid_records = 0 + + while offset < length do + if offset + 2 > length then + break + end + + -- レコードヘッダー(16ビット: 6ビットキー + 10ビットデータ長) + local header = buffer(offset, 2):le_uint() + local key = header & 0x3F -- 下位6ビット(0-5) + local data_len = (header >> 6) & 0x3FF -- 上位10ビット(6-15) + + -- 無効なレコード(key=0, data_len=0)の場合は処理を終了 + if header == 0 or (key == 0 and data_len == 0) then + -- パディング開始位置を記録 + local padding_length = length - offset + ext_tree:add(buffer(offset), "Zero Padding (Offset: " .. offset .. ", Length: " .. padding_length .. " bytes)") + break + end + + if offset + 2 + data_len > length then + break + end + + local record_tree = ext_tree:add(buffer(offset, 2 + data_len), + "Extension Record " .. record_num .. " (Key: " .. key .. ", Length: " .. data_len .. ")") + + record_tree:add_le(f_ext_key, buffer(offset, 1)):append_text(" (" .. key .. ")") + record_tree:add_le(f_ext_length, buffer(offset, 2)):append_text(" (" .. data_len .. " bytes)") + + if data_len > 0 then + local data_buffer = buffer(offset + 2, data_len) + local decoded_data = decode_extension_data(key, data_buffer) + record_tree:add(f_ext_data, data_buffer):append_text(" (" .. decoded_data .. ")") + end + + offset = offset + 2 + data_len + record_num = record_num + 1 + valid_records = valid_records + 1 + end + + -- デバッグ情報を表示 + ext_tree:add(buffer(16, 0), "Debug Info: Valid records=" .. valid_records .. ", Total packet=" .. length .. " bytes, Expected end=" .. offset) + end + + -- パケット情報の設定 + pinfo.cols.info = "WIP v" .. version .. " ID:" .. packet_id .. " Type:" .. type_val .. + " Area:" .. area_code .. (ex_flag == 1 and " [Extended]" or "") +end + +-- UDPポート4109-4111にプロトコルを登録 +local udp_port_table = DissectorTable.get("udp.port") +udp_port_table:add(4109, wip_proto) +udp_port_table:add(4110, wip_proto) +udp_port_table:add(4111, wip_proto) + +-- プロトコル情報を表示 +local function wip_proto_init() + local wip_info = { + version = "1.0", + author = "WIP Project", + description = "Weather Transmission Protocol Dissector for Wireshark" + } + print("WIP Dissector loaded: " .. wip_info.description .. " v" .. wip_info.version) +end + +-- 初期化時にプロトコル情報を表示 +wip_proto_init() \ No newline at end of file diff --git a/dissectors/wireshark-growatt/LICENSE b/dissectors/wireshark-growatt/LICENSE new file mode 100644 index 0000000..a4a8912 --- /dev/null +++ b/dissectors/wireshark-growatt/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Antti Kupila + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/wireshark-growatt/README.md b/dissectors/wireshark-growatt/README.md new file mode 100644 index 0000000..64e1045 --- /dev/null +++ b/dissectors/wireshark-growatt/README.md @@ -0,0 +1,50 @@ +# Growatt — wireshark-growatt (onduleurs solaires) + +Dissecteur Wireshark Lua (partiel) du **protocole des enregistreurs Wi-Fi +Growatt**, échangé entre le module Wi-Fi d'un onduleur solaire Growatt et +le serveur `server.growatt.com` sur TCP 5279 : le contenu est désembrouillé +(XOR avec une clé) puis les paquets de ping, de données et de données en +tampon sont décodés (tensions, courants, puissances, énergie). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/akupila/wireshark-growatt | +| Commit importé | `75dc07a4eceeff8227ddddae1f69fca499fc0ef0` du 19/11/2024 (branche `main`, dernier commit) | +| Licence amont | MIT (`LICENSE` amont, © 2024 Antti Kupila ; pas d'en-tête de licence dans le fichier Lua) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Growatt natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `growatt.lua` | Dissecteur `growatt` (TCP 5279) | +| `captures/growatt.pcapng` | Capture d'exemple amont (`data/growatt.pcapng`) | + +Fichier Lua importé tel quel ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête. La capture est une copie binaire +conforme. + +## Utilisation + +Copier `growatt.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, ouvrir +`captures/growatt.pcapng` et filtrer avec `growatt` (ou +`tcp.port == 5279 and tcp.len > 0`). Le README amont décrit la redirection +du trafic de l'enregistreur via une machine Linux (iptables DNAT / TEE). + +## Remarques + +- Lua 5.3 minimum (opérateur `~`), donc Wireshark 4.4 ou plus récent, + selon l'amont. +- **Conflit de nom** : `dissectors/pygrowatt/` (issue #137) déclare aussi + `Proto("growatt", …)` sur TCP 5279 ; ne charger qu'un des deux scripts à + la fois. +- Rétro-ingénierie partielle, sans garantie selon l'auteur ; seuls les + paquets ping et données / données en tampon sont décodés. +- Non repris : les captures d'écran et le `Makefile` d'installation amont. +- Non vérifié dans Wireshark, y compris sur la capture fournie. diff --git a/dissectors/wireshark-growatt/captures/growatt.pcapng b/dissectors/wireshark-growatt/captures/growatt.pcapng new file mode 100644 index 0000000..badf00c Binary files /dev/null and b/dissectors/wireshark-growatt/captures/growatt.pcapng differ diff --git a/dissectors/wireshark-growatt/growatt.lua b/dissectors/wireshark-growatt/growatt.lua new file mode 100644 index 0000000..d2a817c --- /dev/null +++ b/dissectors/wireshark-growatt/growatt.lua @@ -0,0 +1,150 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/akupila/wireshark-growatt (growatt.lua), +-- commit 75dc07a4eceeff8227ddddae1f69fca499fc0ef0 du 19/11/2024. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +local protocol = Proto("growatt", "Growatt Protocol") + +local f = { + -- Header fields + message_id = ProtoField.uint16("growatt.message_id", "Message ID"), + protocol_id = ProtoField.uint16("growatt.protocol_id", "Protocol ID"), + unit_id = ProtoField.uint8("growatt.unit_id", "Unit ID"), + packet_type = ProtoField.uint8("growatt.packet_type", "Packet Type", base.HEX), + + -- Data fields + serial = ProtoField.string("growatt.serial", "Datalogger serial"), + inverter = ProtoField.string("growatt.inverter", "Inverter serial"), + timestamp = ProtoField.string("growatt.timestamp", "Payload timestamp"), + status = ProtoField.bool("growatt.status", "Status"), + ppv = ProtoField.float("growatt.input_power", "Input power"), + vpv1 = ProtoField.float("growatt.vpv1", "PV1 Voltage"), + ipv1 = ProtoField.float("growatt.vpv1", "PV1 Current"), + ppv1 = ProtoField.float("growatt.vpv2", "PV2 Power"), + vpv2 = ProtoField.float("growatt.vpv2", "PV2 Voltage"), + ipv2 = ProtoField.float("growatt.vpv2", "PV2 Current"), + ppv2 = ProtoField.float("growatt.vpv2", "PV2 Power"), + vpv3 = ProtoField.float("growatt.vpv3", "PV3 Voltage"), + ipv3 = ProtoField.float("growatt.vpv3", "PV3 Current"), + ppv3 = ProtoField.float("growatt.vpv3", "PV3 Power"), + vpv4 = ProtoField.float("growatt.vpv4", "PV4 Voltage"), + ipv4 = ProtoField.float("growatt.vpv4", "PV4 Current"), + ppv4 = ProtoField.float("growatt.vpv4", "PV4 Power"), + pac = ProtoField.float("growatt.pac", "Output power"), + fac = ProtoField.float("growatt.fac", "Grid frequency"), + vac1 = ProtoField.float("growatt.vac1", "AC1 Voltage"), + iac1 = ProtoField.float("growatt.iac1", "AC1 Current"), + pac1 = ProtoField.float("growatt.pac1", "AC1 Power"), + vac2 = ProtoField.float("growatt.vac2", "AC2 Voltage"), + iac2 = ProtoField.float("growatt.iac2", "AC2 Current"), + pac2 = ProtoField.float("growatt.pac2", "AC2 Power"), + vac3 = ProtoField.float("growatt.vac3", "AC3 Voltage"), + iac3 = ProtoField.float("growatt.iac3", "AC3 Current"), + pac3 = ProtoField.float("growatt.pac3", "AC3 Power"), + eac_today = ProtoField.float("growatt.eac_today", "Generated today"), + eac_total = ProtoField.float("growatt.eac_total", "Generated total"), + total_work = ProtoField.float("growatt.total_work", "Total work time"), + pviso = ProtoField.uint16("growatt.pv_iso", "PV resistance"), + rated_power = ProtoField.float("growatt.rated_power", "Rated power"), +} + +protocol.fields = f + +local function unscramble(data) + local key = "Growatt" + local out = {} + for i = 0, data:len() - 1 do + local nthData = data(i, 1):uint() + local nthKey = key:byte(i % #key + 1) + local v = nthData ~ nthKey + out[i + 1] = string.format("%02x", v) + end + return ByteArray.new(table.concat(out)):tvb() +end + +local function add_float(subtree, field, buf, div, unit) + subtree:add(field, buf, buf:uint() / div):append_text(unit) +end + +-- Define the dissector function +function protocol.dissector(buf, pinfo, tree) + if buf:len() == 0 then return end + + pinfo.cols.protocol = "Growatt" + + local subtree = tree:add(protocol, buf(), "Growatt Protocol data") + subtree:add(f.message_id, buf(0, 2)) + subtree:add(f.protocol_id, buf(2, 2)) + subtree:add(f.unit_id, buf(6, 1)) + subtree:add(f.packet_type, buf(7, 1)) + + local body = unscramble(buf(8)) + + local type = buf(7, 1):uint() + if type == 0x16 then + pinfo.cols.info = "Ping" + subtree:add(body(0, 10), string.format("Serial: %s", body(0, 10):string())) + elseif type == 0x04 or type == 0x50 then + if type == 0x04 then + pinfo.cols.info = "Data" + elseif type == 0x50 then + pinfo.cols.info = "Buffered Data" + end + + subtree:add(f.serial, body(0, 10)) + subtree:add(f.inverter, body(30, 10)) + + local year = body(60, 1):uint() + 2000 + local month = body(61, 1):uint() + local day = body(62, 1):uint() + local hour = body(63, 1):uint() + local minute = body(64, 1):uint() + local second = body(65, 1):uint() + subtree:add(f.timestamp, body(60, 6)):set_text( + string.format("Timestamp: %04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, + minute, second) + ) + + local statusVal = body(71, 2) + subtree:add(f.status, statusVal):set_text( + string.format("Status: %s", statusVal:uint() > 0 and "On" or "Off") + ) + add_float(subtree, f.ppv, body(73, 4), 10, "W") + + add_float(subtree, f.vpv1, body(77, 2), 10, "V") + add_float(subtree, f.ipv1, body(79, 2), 10, "A") + add_float(subtree, f.ppv1, body(81, 4), 10, "W") + add_float(subtree, f.vpv2, body(85, 2), 10, "V") + add_float(subtree, f.ipv2, body(87, 2), 10, "A") + add_float(subtree, f.ppv2, body(89, 4), 10, "W") + add_float(subtree, f.vpv3, body(93, 2), 10, "V") + add_float(subtree, f.ipv3, body(95, 2), 10, "A") + add_float(subtree, f.ppv3, body(97, 4), 10, "W") + add_float(subtree, f.vpv4, body(101, 2), 10, "V") + add_float(subtree, f.ipv4, body(103, 2), 10, "A") + add_float(subtree, f.ppv4, body(105, 4), 10, "W") + + add_float(subtree, f.pac, body(117, 4), 10, "W") + add_float(subtree, f.fac, body(121, 2), 100, "Hz") + + add_float(subtree, f.vac1, body(123, 2), 10, "V") + add_float(subtree, f.iac1, body(125, 2), 10, "A") + add_float(subtree, f.pac1, body(127, 4), 10, "W") + add_float(subtree, f.vac2, body(131, 2), 10, "V") + add_float(subtree, f.iac2, body(133, 2), 10, "A") + add_float(subtree, f.pac2, body(135, 4), 10, "W") + add_float(subtree, f.vac3, body(139, 2), 10, "V") + add_float(subtree, f.iac3, body(141, 2), 10, "A") + add_float(subtree, f.pac3, body(143, 4), 10, "W") + + add_float(subtree, f.eac_today, body(169, 4), 10, "kWh") + add_float(subtree, f.eac_total, body(173, 4), 10, "kWh") + add_float(subtree, f.total_work, body(177, 4), 2, "h") + + subtree:add(f.pviso, body(245, 2)):append_text("K ohm") + add_float(subtree, f.rated_power, body(277, 2), 10, "W") + end +end + +-- Register the dissector +local tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(5279, protocol) diff --git a/dissectors/worterbuch/LICENSE b/dissectors/worterbuch/LICENSE new file mode 100644 index 0000000..be3f7b2 --- /dev/null +++ b/dissectors/worterbuch/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + 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 +them 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/dissectors/worterbuch/README.md b/dissectors/worterbuch/README.md new file mode 100644 index 0000000..377cfed --- /dev/null +++ b/dissectors/worterbuch/README.md @@ -0,0 +1,59 @@ +# Wörterbuch — magasin clé-valeur et courtier de messages + +Dissecteurs Wireshark Lua de **Wörterbuch** (magasin clé-valeur en +mémoire et courtier de messages publication / abonnement, écrit en Rust) +dont les messages sont du JSON : + +- `worterbuch_tcp` : protocole TCP (un message JSON par ligne), + réassemblage, type de message (première clé JSON), `transactionId`, + validation par rapport aux types connus des schémas client et serveur, + résumé dans la colonne Info ; port TCP 8081 (préférence) ; +- `worterbuch_ws` : mêmes messages dans les trames texte WebSocket, + heuristique sur `ws` et ports TCP optionnels (préférence, vide par + défaut) ; +- `wb_peer` : messages entre nœuds de l'orchestrateur de cluster + (JSON sur UDP : battements de cœur et votes, avec `nodeId` et + priorité), en post-dissecteur sans configuration de port. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/babymotte/worterbuch (fichiers `wireshark-dissector/worterbuch-tcp.lua`, `wireshark-dissector/worterbuch-ws.lua`, `worterbuch-cluster-orchestrator/wireshark/worterbuch-cluster-orchestrator.lua`) | +| Commit importé | `409837f8e408cf68b124b892893eb4dca2714d70` du 31/10/2026 (branche `main`, dernier commit ; dernières modifications : `worterbuch-tcp.lua` `bbe0886` du 21/01/2026, `worterbuch-ws.lua` `8d4cfbd` du 21/01/2026, `worterbuch-cluster-orchestrator.lua` `45e5a06` du 13/06/2026) | +| Licence amont | AGPL-3.0-or-later (fichier `LICENSE` AGPL v3, copié ici ; README : « GNU Affero General Public License v3 or later ») ; les scripts n'ont pas d'en-tête de licence | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Wörterbuch natif (le JSON est seulement décodé de façon générique) | + +L'auteur propose aussi des licences commerciales ; seule l'AGPL v3 ou +ultérieure s'applique à cette copie. La GPLv3 du dépôt permet la +combinaison avec du code AGPLv3 (article 13) ; précédents : +`dissectors/aerospike/`, `dissectors/space-coap/`. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `worterbuch-tcp.lua` | Protocole `worterbuch_tcp`, TCP 8081 | +| `worterbuch-ws.lua` | Protocole `worterbuch_ws`, heuristique WebSocket | +| `worterbuch-cluster-orchestrator.lua` | Post-dissecteur `wb_peer` (UDP) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête. + +## Utilisation + +Copier les scripts voulus dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), **redémarrer** Wireshark (note +amont : le rechargement des plugins Lua ne suffit pas pour `wb_peer`), +puis filtrer avec `worterbuch_tcp`, `worterbuch_ws` ou `wb_peer`. + +## Remarques + +- Analyse JSON par motifs (`string.match`) : seuls le type, le + `transactionId` et quelques champs sont extraits ; le message complet est + affiché en texte. +- `wb_peer` s'exécute sur chaque paquet UDP et ne s'affiche que si la + charge utile ressemble à un message de cluster. +- Le changement de port TCP de `worterbuch_tcp` ajoute le nouveau port + sans retirer l'ancien (amont). +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/worterbuch/worterbuch-cluster-orchestrator.lua b/dissectors/worterbuch/worterbuch-cluster-orchestrator.lua new file mode 100644 index 0000000..2a2e100 --- /dev/null +++ b/dissectors/worterbuch/worterbuch-cluster-orchestrator.lua @@ -0,0 +1,122 @@ +-- SPDX-License-Identifier: AGPL-3.0-or-later +-- Importé de https://github.com/babymotte/worterbuch (worterbuch-cluster-orchestrator/wireshark/worterbuch-cluster-orchestrator.lua), +-- commit 409837f8e408cf68b124b892893eb4dca2714d70 du 31/10/2026. +-- Licence amont : AGPL-3.0-or-later (LICENSE amont) — voir README.md. +-- worterbuch-cluster-orchestrator.lua +-- Wireshark dissector for Wörterbuch Cluster PeerMessage (JSON over UDP) +-- +-- Wire format: raw UTF-8 JSON in a single UDP datagram, no length prefix. +-- Serde serialization uses external tagging + camelCase variant names: +-- +-- Heartbeat Request: {"heartbeat":{"request":{"nodeId":""}}} +-- Heartbeat Response: {"heartbeat":{"response":{"nodeId":""}}} +-- Vote Request: {"vote":{"request":{"nodeId":"","priority":}}} +-- Vote Response: {"vote":{"response":{"nodeId":""}}} +-- +-- Installation: +-- Symlink or copy to ~/.local/lib/wireshark/plugins/ (Linux) +-- Then restart Wireshark — Reload Lua Plugins will NOT work due to a +-- Wireshark limitation (Proto objects cannot be unregistered between reloads). +-- +-- This dissector registers as a post-dissector so it runs on every packet +-- without requiring any port configuration or heuristic toggles in the UI. + +local proto = Proto("wb_peer", "Wörterbuch Cluster PeerMessage") + +-- ── Protocol fields ────────────────────────────────────────────────────────── + +local f_type = ProtoField.string("wb_peer.type", "Message Type") +local f_subtype = ProtoField.string("wb_peer.subtype", "Subtype") +local f_node_id = ProtoField.string("wb_peer.node_id", "Node ID") +local f_priority = ProtoField.string("wb_peer.priority", "Priority") +local f_raw = ProtoField.string("wb_peer.raw", "Raw JSON") + +proto.fields = { f_type, f_subtype, f_node_id, f_priority, f_raw } + +-- ── Field accessors (must be declared at module level) ─────────────────────── + +-- Used to gate the post-dissector to UDP packets only. +local f_udp_src = Field.new("udp.srcport") +-- The UDP payload as a TvbRange; present once the UDP dissector has run. +local f_udp_payload = Field.new("udp.payload") +-- Fallback for ports not claimed by any other dissector (shown as raw "Data"). +local f_data = Field.new("data.data") + +-- ── Helpers ────────────────────────────────────────────────────────────────── + +local function json_get(s, key) + local val = s:match('"' .. key .. '"%s*:%s*"([^"]*)"') + if not val then + val = s:match('"' .. key .. '"%s*:%s*(%-?%d+)') + end + return val +end + +local function looks_like_wb_peer(s) + return s:match("^%s*{") and (s:match('"heartbeat"') or s:match('"vote"')) +end + +-- ── Core dissection logic ──────────────────────────────────────────────────── + +local function do_dissect(range, pinfo, tree) + local ok, payload = pcall(function() return range:string() end) + if not ok or not looks_like_wb_peer(payload) then return end + + pinfo.cols.protocol:set("WB-PEER") + + local root = tree:add(proto, range, "Wörterbuch PeerMessage") + root:add(f_raw, range, payload) + + local msg_type, msg_subtype, node_id, priority + + if payload:match('"heartbeat"') then + msg_type = "Heartbeat" + if payload:match('"request"') then + msg_subtype = "Request" + elseif payload:match('"response"') then + msg_subtype = "Response" + end + elseif payload:match('"vote"') then + msg_type = "Vote" + if payload:match('"request"') then + msg_subtype = "Request" + priority = json_get(payload, "priority") + elseif payload:match('"response"') then + msg_subtype = "Response" + end + end + + node_id = json_get(payload, "nodeId") + + if msg_type then root:add(f_type, range, msg_type) end + if msg_subtype then root:add(f_subtype, range, msg_subtype) end + if node_id then root:add(f_node_id, range, node_id) end + if priority then root:add(f_priority, range, priority) end + + local info = (msg_type or "?") .. " " .. (msg_subtype or "?") + if node_id then info = info .. " node=" .. node_id end + if priority then info = info .. " priority=" .. priority end + pinfo.cols.info:set(info) +end + +-- ── Post-dissector registration ─────────────────────────────────────────────── +-- +-- A post-dissector is called after all normal dissectors on every packet. +-- No port configuration or heuristic toggles are needed. + +register_postdissector(proto) + +function proto.dissector(_, pinfo, tree) + -- Gate to UDP packets only + if not f_udp_src() then return end + + -- Prefer the udp.payload field (Wireshark 3.5+); fall back to data.data + -- for ports not claimed by another dissector. + local fis = { f_udp_payload() } + if #fis == 0 then + fis = { f_data() } + end + if #fis == 0 then return end + + do_dissect(fis[1].range, pinfo, tree) +end diff --git a/dissectors/worterbuch/worterbuch-tcp.lua b/dissectors/worterbuch/worterbuch-tcp.lua new file mode 100644 index 0000000..aedad72 --- /dev/null +++ b/dissectors/worterbuch/worterbuch-tcp.lua @@ -0,0 +1,154 @@ +-- SPDX-License-Identifier: AGPL-3.0-or-later +-- Importé de https://github.com/babymotte/worterbuch (wireshark-dissector/worterbuch-tcp.lua), +-- commit 409837f8e408cf68b124b892893eb4dca2714d70 du 31/10/2026. +-- Licence amont : AGPL-3.0-or-later (LICENSE amont) — voir README.md. +-- Wörterbuch Protocol Dissector +-- Validates messages against client and server schemas +local worterbuch_tcp_proto = Proto("worterbuch_tcp", "Wörterbuch Protocol") + +-- Protocol fields +local f_message = ProtoField.string("worterbuch_tcp.message", "JSON Message") +local f_partial = ProtoField.string("worterbuch_tcp.partial", "Partial Message") +local f_message_type = ProtoField.string("worterbuch_tcp.message_type", "Message Type") +local f_src_port = ProtoField.uint16("worterbuch_tcp.src_port", "Source Port") +local f_dst_port = ProtoField.uint16("worterbuch_tcp.dst_port", "Destination Port") +local f_transaction_id = ProtoField.string("worterbuch_tcp.transaction_id", "Transaction ID") +local f_invalid = ProtoField.string("worterbuch_tcp.invalid", "Invalid Message") +worterbuch_tcp_proto.fields = { + f_message, f_partial, f_message_type, f_src_port, f_dst_port, + f_transaction_id, f_invalid +} + +-- Preferences +worterbuch_tcp_proto.prefs.port = Pref.uint("TCP Port", 8081, "The TCP port for this protocol") + +-- Simple JSON message type extractor +-- Extracts the first top-level key from a JSON object +local function extract_message_type(json_str) + -- Remove leading/trailing whitespace + json_str = json_str:match("^%s*(.-)%s*$") + + -- Must start with { + if not json_str:match("^{") then + return nil + end + + -- Find first key (handling both "key" and key formats) + -- Pattern: optional whitespace, quote, key name, quote, colon + local key = json_str:match('^%s*{%s*"([^"]+)"%s*:') + + return key +end + +-- Extract transactionId if present +local function extract_transaction_id(json_str) + local tid = json_str:match('"transactionId"%s*:%s*(%d+)') + return tid +end + +-- Parse message and extract type +local function parse_message(json_str) + local msg_type = extract_message_type(json_str) + + if not msg_type then + return false, nil, "Invalid JSON format" + end + + return true, msg_type, nil +end + +function worterbuch_tcp_proto.dissector(buffer, pinfo, tree) + local buf_len = buffer:len() + if buf_len == 0 then return end + + pinfo.cols.protocol = worterbuch_tcp_proto.name + + local subtree = tree:add(worterbuch_tcp_proto, buffer(), "Wörterbuch Protocol") + + local offset = 0 + local message_count = 0 + local valid_count = 0 + local invalid_count = 0 + + while offset < buf_len do + -- Look for newline + local newline_pos = nil + for i = offset, buf_len - 1 do + if buffer(i, 1):uint() == 10 then -- \n + newline_pos = i + break + end + end + + if newline_pos then + -- Complete message found + local msg_len = newline_pos - offset + 1 + local msg_buf = buffer(offset, msg_len) + local msg_text = msg_buf:string():gsub("\n$", "") -- Remove trailing newline + + -- Parse the message + local is_valid, msg_type, error_msg = parse_message(msg_text) + + local msg_tree = subtree:add(f_message, msg_buf, msg_text) + + if is_valid then + msg_tree:add(f_message_type, msg_type) + + -- Extract transaction ID if present + local tid = extract_transaction_id(msg_text) + if tid then + msg_tree:add(f_transaction_id, tid) + end + + valid_count = valid_count + 1 + else + msg_tree:add_expert_info(PI_MALFORMED, PI_ERROR, error_msg or "Invalid message") + msg_tree:add(f_invalid, error_msg or "Invalid message") + if msg_type then + msg_tree:add(f_message_type, msg_type .. " (invalid)") + end + invalid_count = invalid_count + 1 + end + + message_count = message_count + 1 + offset = newline_pos + 1 + else + -- Incomplete message - need more data + local remaining = buffer(offset, buf_len - offset) + subtree:add(f_partial, remaining, remaining:string()) + + -- Request reassembly + pinfo.desegment_offset = offset + pinfo.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return + end + end + + -- Update info column + local port_info = string.format("%d → %d", pinfo.src_port, pinfo.dst_port) + + if message_count == 1 then + local is_valid, msg_type = parse_message(buffer():string():gsub("\n$", "")) + if is_valid then + pinfo.cols.info = string.format("%s: %s", port_info, msg_type) + else + pinfo.cols.info = string.format("%s: Invalid message", port_info) + end + elseif message_count > 1 then + if invalid_count > 0 then + pinfo.cols.info = string.format("%s: %d messages (%d valid, %d invalid)", + port_info, message_count, valid_count, invalid_count) + else + pinfo.cols.info = string.format("%s: %d messages", port_info, message_count) + end + end +end + +-- Register the dissector on TCP port +local tcp_table = DissectorTable.get("tcp.port") +tcp_table:add(worterbuch_tcp_proto.prefs.port, worterbuch_tcp_proto) + +-- Allow dynamic port changes +function worterbuch_tcp_proto.init() + tcp_table:add(worterbuch_tcp_proto.prefs.port, worterbuch_tcp_proto) +end diff --git a/dissectors/worterbuch/worterbuch-ws.lua b/dissectors/worterbuch/worterbuch-ws.lua new file mode 100644 index 0000000..067a929 --- /dev/null +++ b/dissectors/worterbuch/worterbuch-ws.lua @@ -0,0 +1,204 @@ +-- SPDX-License-Identifier: AGPL-3.0-or-later +-- Importé de https://github.com/babymotte/worterbuch (wireshark-dissector/worterbuch-ws.lua), +-- commit 409837f8e408cf68b124b892893eb4dca2714d70 du 31/10/2026. +-- Licence amont : AGPL-3.0-or-later (LICENSE amont) — voir README.md. +-- Wörterbuch WebSocket Protocol Dissector +-- Validates WebSocket text messages against client and server schemas +local worterbuch_ws_proto = Proto("worterbuch_ws", "Wörterbuch WebSocket Protocol") + +-- Preferences +worterbuch_ws_proto.prefs.ports = Pref.string("TCP ports", "", "Comma-separated list of TCP ports (e.g., 8080,3012)") + +-- Protocol fields +local f_message = ProtoField.string("worterbuch_ws.message", "JSON Message") +local f_message_type = ProtoField.string("worterbuch_ws.message_type", "Message Type") +local f_transaction_id = ProtoField.string("worterbuch_ws.transaction_id", "Transaction ID") +local f_invalid = ProtoField.string("worterbuch_ws.invalid", "Invalid Message") + +worterbuch_ws_proto.fields = { + f_message, f_message_type, + f_transaction_id, f_invalid +} + +-- Valid message types (combined list for heuristic detection) +local valid_message_types = { + "welcome", "authorized", "state", "cState", "pState", + "ack", "err", "lsState", + "protocolSwitchRequest", "authorizationRequest", "get", "cGet", "pGet", + "set", "cSet", "sPubInit", "sPub", "publish", "subscribe", "pSubscribe", + "unsubscribe", "delete", "pDelete", "ls", "subscribeLs", "pLs", + "unsubscribeLs", "lock", "acquireLock", "releaseLock" +} + +-- Helper function to create a lookup table +local function create_lookup(list) + local lookup = {} + for _, v in ipairs(list) do + lookup[v] = true + end + return lookup +end + +local valid_types_lookup = create_lookup(valid_message_types) + +-- Simple JSON message type extractor +local function extract_message_type(json_str) + -- Remove leading/trailing whitespace + json_str = json_str:match("^%s*(.-)%s*$") + + -- Must start with { + if not json_str:match("^{") then + return nil + end + + -- Find first key + local key = json_str:match('^%s*{%s*"([^"]+)"%s*:') + + return key +end + +-- Extract transactionId if present +local function extract_transaction_id(json_str) + local tid = json_str:match('"transactionId"%s*:%s*(%d+)') + return tid +end + +-- Parse message and extract type +local function parse_message(json_str) + local msg_type = extract_message_type(json_str) + + if not msg_type then + return false, nil, "Invalid JSON format" + end + + return true, msg_type, nil +end + +-- WebSocket opcode for text frames +local WS_TEXT_OPCODE = 1 + +-- Get the WebSocket opcode field +local ws_opcode_field = Field.new("websocket.opcode") + +function worterbuch_ws_proto.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length == 0 then return 0 end + + pinfo.cols.protocol = worterbuch_ws_proto.name + + local subtree = tree:add(worterbuch_ws_proto, buffer(), "Wörterbuch Protocol") + + -- Get the JSON payload + local msg_text = buffer():string() + + -- Parse the message + local is_valid, msg_type, error_msg = parse_message(msg_text) + + local msg_tree = subtree:add(f_message, buffer(), msg_text) + + if is_valid then + msg_tree:add(f_message_type, msg_type) + + -- Extract transaction ID if present + local tid = extract_transaction_id(msg_text) + if tid then + msg_tree:add(f_transaction_id, tid) + end + + -- Update info column + pinfo.cols.info:append(string.format(" [%s]", msg_type)) + else + msg_tree:add_expert_info(PI_MALFORMED, PI_ERROR, error_msg or "Invalid message") + msg_tree:add(f_invalid, error_msg or "Invalid message") + if msg_type then + msg_tree:add(f_message_type, msg_type .. " (invalid)") + end + + -- Update info column + pinfo.cols.info:append(" [Invalid]") + end + + return length +end + +-- Heuristic dissector function for WebSocket +local function heur_dissect_worterbuch_ws(buffer, pinfo, tree) + local length = buffer:len() + if length == 0 then return false end + + -- Check if this is a WebSocket text frame + local ws_opcode = ws_opcode_field() + if not ws_opcode or ws_opcode.value ~= WS_TEXT_OPCODE then + return false + end + + -- Get the payload as string + local payload = buffer():string() + + -- Check if it looks like JSON + if not payload:match("^%s*{") then + return false + end + + -- Try to extract message type + local msg_type = extract_message_type(payload) + if not msg_type then + return false + end + + -- Check if it's a valid Wörterbuch message type + if not valid_types_lookup[msg_type] then + return false + end + + -- This looks like Wörterbuch, so dissect it + worterbuch_ws_proto.dissector(buffer, pinfo, tree) + return true +end + +-- Register as a heuristic dissector for WebSocket +worterbuch_ws_proto:register_heuristic("ws", heur_dissect_worterbuch_ws) + +-- Port registration management +local tcp_port_table = DissectorTable.get("tcp.port") +local registered_ports = {} + +-- Function to parse comma-separated port list +local function parse_ports(port_string) + local ports = {} + if not port_string or port_string == "" then + return ports + end + + for port_str in string.gmatch(port_string, "[^,]+") do + local port = tonumber(port_str:match("^%s*(.-)%s*$")) + if port and port > 0 and port < 65536 then + table.insert(ports, port) + end + end + return ports +end + +-- Function to update port registrations +local function update_ports() + -- Unregister old ports + for _, port in ipairs(registered_ports) do + tcp_port_table:remove(port, worterbuch_ws_proto) + end + registered_ports = {} + + -- Register new ports + local ports = parse_ports(worterbuch_ws_proto.prefs.ports) + for _, port in ipairs(ports) do + tcp_port_table:add(port, worterbuch_ws_proto) + table.insert(registered_ports, port) + end +end + +-- Register the prefs_changed function +function worterbuch_ws_proto.prefs_changed() + update_ports() +end + +-- Initial port registration +update_ports() diff --git a/dissectors/wpan-ctp-tinyos/LICENSE b/dissectors/wpan-ctp-tinyos/LICENSE new file mode 100644 index 0000000..20293a2 --- /dev/null +++ b/dissectors/wpan-ctp-tinyos/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, ABusyProgrammer +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dissectors/wpan-ctp-tinyos/README.md b/dissectors/wpan-ctp-tinyos/README.md new file mode 100644 index 0000000..3378941 --- /dev/null +++ b/dissectors/wpan-ctp-tinyos/README.md @@ -0,0 +1,55 @@ +# IEEE 802.15.4 / Collection Tree Protocol (TinyOS) + +Dissecteur heuristique Wireshark Lua de la **charge des trames IEEE +802.15.4 émises par des capteurs sans fil TinyOS** utilisant le +**Collection Tree Protocol (CTP)** et la couche **Active Messaging** : +selon l'identifiant 6LoWPAN / AM (0x70 trame de routage, 0x71 trame de +données, 0x72 trame de débogage), il décode les champs CTP (options, THL, +ETX, origine, numéro de séquence, identifiant de collecte, parent…) et la +trame Active Messaging transportée. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/AryanKukreja/wireshark_dissector (fichier `dissector.lua`, renommé `wpan-ctp-dissector.lua` ici) | +| Commit importé | `7f56b23d5bb195551f0d7979a3d21674b0d2b9b1` du 07/11/2019 (branche `master`, dernier commit ; dernière modification du dissecteur : `efb7774` du 06/11/2019) | +| Licence amont | BSD-3-Clause (`LICENSE.txt` amont, © 2019 ABusyProgrammer ; texte BSD modifiée en en-tête du fichier, conservé) | +| Natif Wireshark 4.6.4 | Non — 802.15.4 et 6LoWPAN sont natifs, pas CTP / Active Messaging de TinyOS | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE.txt` amont). + +Selon son en-tête, le fichier est une modification du dissecteur P2P de +Pinoccio (`hardware-pinoccio/firmware/bootloader/p2p-wireshark-dissector.lua`), +déjà importé dans `dissectors/pinoccio-p2p/` (#164, BSD-3-Clause) ; les +commentaires de l'auteur d'origine sont conservés dans le fichier. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `wpan-ctp-dissector.lua` | Protocole `ctp_protocol` (heuristique sur `wpan`, et table `wpan.panid`) | + +Fichier importé tel quel (renommé, le nom amont `dissector.lua` étant trop +générique) ; seule une en-tête SPDX + provenance de quatre lignes a été +ajoutée en tête du fichier. + +## Utilisation + +Copier `wpan-ctp-dissector.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, puis +ouvrir une capture 802.15.4 et filtrer avec `ctp_protocol`. + +## Remarques + +- **Écrase la bibliothèque standard `table`** : le fichier fait + `table = DissectorTable.get("wpan.panid")` en variable globale (repris de + l'original Pinoccio), ce qui remplace la bibliothèque Lua `table` + (`table.insert`, `table.concat`…) pour **tous** les plugins Lua chargés + après lui. Contournement local : remplacer `table` par une variable + `local` (code amont non modifié ici). +- **Conflit avec `dissectors/pinoccio-p2p/`** : les deux s'enregistrent sur + `wpan.panid` = -1 et en heuristique `wpan` ; ne charger que l'un des deux. +- L'heuristique peut revendiquer des trames 802.15.4 d'autres protocoles. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/wpan-ctp-tinyos/wpan-ctp-dissector.lua b/dissectors/wpan-ctp-tinyos/wpan-ctp-dissector.lua new file mode 100644 index 0000000..11d4273 --- /dev/null +++ b/dissectors/wpan-ctp-tinyos/wpan-ctp-dissector.lua @@ -0,0 +1,183 @@ +-- SPDX-License-Identifier: BSD-3-Clause +-- Importé de https://github.com/AryanKukreja/wireshark_dissector (dissector.lua), +-- commit 7f56b23d5bb195551f0d7979a3d21674b0d2b9b1 du 07/11/2019. +-- Licence amont : BSD-3-Clause (LICENSE.txt amont) — voir README.md. +--- -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +--- This file is licensed under the terms of the Modified BSD license: +--- +--- Redistribution and use in source and binary forms, with or without +--- modification, are permitted provided that the following conditions +--- are met: +--- +--- * Redistributions of source code must retain the above copyright +--- notice, this list of conditions and the following disclaimer. +--- * Redistributions in binary form must reproduce the above copyright +--- notice, this list of conditions and the following disclaimer in the +--- documentation and/or other materials provided with the distribution. +--- * Neither the name of the authors nor the names of its contributors +--- may be used to endorse or promote products derived from this software +--- without specific prior written permission. +--- +--- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +--- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +--- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +--- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +--- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +--- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +--- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +--- POSSIBILITY OF SUCH DAMAGE. +--- -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +-- The dissector below is a modification of an original dissector found at the following link: +-- -> https://github.com/Pinoccio/hardware-pinoccio/blob/master/firmware/bootloader/p2p-wireshark-dissector.lua + +-- The following block of comments belong to the author of the original code: +-- Declaring the Protocol (parameters are name of protocol, and long description of it respectively) +local CTP_Protocol = Proto ("CTP_Protocol", "802.15.4 I-Frame Payload Dissection") + +-- Declare the 3 types of Frames according to 6LowPAN ID (information obtained from TinyOS source code) +local SixLowPAN_ID = +{ + [0x70] = "RoutingFrame", + [0x71] = "DataFrame", + [0x72] = "DebugFrame" +} + +-- Declaring Field Values of Dissector (grouped on purpose/function) +-- Format: Each entry is a property of the fields property of the CTP_Protocol Proto object. +-- -> Each field is assigned a 16-bit storage space. Can be optimized depending on the maximum size required by the field +-- -> Parameters of Protofield() are: Name of Field, and Long Description of Field + +-- Non-CTP Fields (Active Message Layer and 6LowPAN ID) +CTP_Protocol.fields.LowPAN_ID = ProtoField.uint16("CTP_Protocol.LowPAN_ID", "6LowPAN ID") +CTP_Protocol.fields.AM_Type = ProtoField.uint16("CTP_Protocol.AM_Type", "Active Message Type") + +-- CTP Fields common to Data Frame and Routing Frame (6LowPAN ID: 0x70 and 0x71) +CTP_Protocol.fields.Expected_Transmission = ProtoField.uint16("CTP_Protocol.Expected_Transmission", "Expected Transmissions Value") +CTP_Protocol.fields.P_Bit = ProtoField.bool("CTP_Protocol.P_Bit", "Routing Pull Bit") +CTP_Protocol.fields.C_Bit = ProtoField.bool("CTP_Protocol.C_Bit", "Congestion Notification Bit") +CTP_Protocol.fields.Fixed_Bit = ProtoField.bool("CTP_Protocol.Fixed_Bit", "Fixed Node Bit") +CTP_Protocol.fields.Reserved_Bit = ProtoField.uint16("CTP_Protocol.Reserved_Bit", "Reserved Bits") + +-- Specific to Data Frame (6LowPAN ID: 0x71) +CTP_Protocol.fields.Time_Has_Lived = ProtoField.uint16("CTP_Protocol.Time_Has_Lived", "TimeHasLived Value") +CTP_Protocol.fields.Origin_ID = ProtoField.uint16("CTP_Protocol.Origin_ID", "Origin") +CTP_Protocol.fields.Sequence_Number = ProtoField.uint16("CTP_Protocol.Sequence_Number", "CTP Sequence Number") +CTP_Protocol.fields.Collection_ID = ProtoField.uint16("CTP_Protocol.Collection_ID", "Collection ID") + +-- Specific to Routing Frame (6LowPAN ID: 0x70) +CTP_Protocol.fields.Parent_ID = ProtoField.uint16("CTP_Protocol.Parent_ID", "Parent_ID") +CTP_Protocol.fields.NumberEntries = ProtoField.uint16("CTP_Protocol.NumberEntries", "Number of Entries") +CTP_Protocol.fields.Reserved_LE_Bits = ProtoField.uint16("CTP_Protocol.Reserved_LE_Bits", "Reserved Bits LE Header") +CTP_Protocol.fields.Sequence_Value = ProtoField.uint16("CTP_Protocol.Sequence_Value", "Sequence Number") + +-- Capturing the errors (part of original code - left unmodified) +CTP_Protocol.experts.too_short = ProtoExpert.new("short", "Packet too short", expert.group.MALFORMED, expert.severity.ERROR) +CTP_Protocol.experts.too_long = ProtoExpert.new("long", "Packet too long", expert.group.MALFORMED, expert.severity.ERROR) +CTP_Protocol.experts.unknown_cmd = ProtoExpert.new("unknown_cmd", "Unknown command", expert.group.MALFORMED, expert.severity.ERROR) + +-- Declare and define all the functions here +-- Init function, called before any packet is dissected +function CTP_Protocol.init() + -- Nothing required from init() function +end + +-- Function called only for dissecting the Routing Frames +-- Parameters: buffer => captured data | pinfo => Packet Information | tree => Detail Dissection +-- Consists of tree:add() functions. +-- -> Parameters: Protocol Field name, allocated buffer +function Dissect_CTP_Routing_Fields(buffer, pinfo, tree) + tree:add(CTP_Protocol.fields.LowPAN_ID, buffer(0, 1)) + tree:add(CTP_Protocol.fields.AM_Type, buffer(1, 1)) + + tree:add(CTP_Protocol.fields.NumberEntries, buffer(2, 1):bitfield(4, 4)) + tree:add(CTP_Protocol.fields.Reserved_LE_Bits, buffer(2, 1):bitfield(0, 4)) + tree:add(CTP_Protocol.fields.Sequence_Value, buffer(3, 1)) + + tree:add(CTP_Protocol.fields.P_Bit, buffer(4, 1):bitfield(0, 1)) + tree:add(CTP_Protocol.fields.C_Bit, buffer(4, 1):bitfield(1, 1)) + tree:add(CTP_Protocol.fields.Fixed_Bit, buffer(4, 1):bitfield(2, 1)) + tree:add(CTP_Protocol.fields.Reserved_Bit, buffer(4, 1):bitfield(3, 5)) + tree:add(CTP_Protocol.fields.Parent_ID, buffer(5, 2)) + tree:add(CTP_Protocol.fields.Expected_Transmission, buffer(7, 2)) + + return buffer:len() +end + +-- Function called only for dissecting the Data Frames +-- Parameters: buffer => captured data | pinfo => Packet Information | tree => Detail Dissection +-- Consists of tree:add() functions. +-- -> Parameters: Protocol Field name, allocated buffer +function Dissect_CTP_Data_Fields(buffer, pinfo, tree) + tree:add(CTP_Protocol.fields.LowPAN_ID, buffer(0, 1)) + tree:add(CTP_Protocol.fields.AM_Type, buffer(1, 1)) + + tree:add(CTP_Protocol.fields.P_Bit, buffer(2, 1):bitfield(0,1)) + tree:add(CTP_Protocol.fields.C_Bit, buffer(2, 1):bitfield(1,1)) + tree:add(CTP_Protocol.fields.Fixed_Bit, buffer(2, 1):bitfield(2, 1)) + tree:add(CTP_Protocol.fields.Reserved_Bit, buffer(2, 1):bitfield(3, 5)) + + tree:add(CTP_Protocol.fields.Time_Has_Lived, buffer(3, 1)) + tree:add(CTP_Protocol.fields.Expected_Transmission, buffer(4, 2)) + tree:add(CTP_Protocol.fields.Origin_ID, buffer(6, 2)) + tree:add(CTP_Protocol.fields.Sequence_Number, buffer(8, 1)) + tree:add(CTP_Protocol.fields.Collection_ID, buffer(9, 1)) + return buffer:len() +end + +-- The main dissector function (part of original code) +-- -> The only modifications made are the names of the variables and tables; the code is not changed +function real_dissector (buffer, pinfo, subtree) + cmdname = SixLowPAN_ID[buffer(1,1):uint()] + if (not cmdname) then + subtree:add_tvb_expert_info(CTP_Protocol.experts.unknown_cmd, buffer(0,1)) + return false + end + + subbuf = buffer(0):tvb() + + -- decode frame internals + if (cmdname == "DataFrame") then + len, msg = Dissect_CTP_Data_Fields(buffer(0), pinfo, subtree) + elseif (cmdname == "RoutingFrame") then + len, msg = Dissect_CTP_Routing_Fields(buffer(0), pinfo, subtree) + else + len = 0 + msg = nil + end + + if subbuf:len() ~= len then + subtree:add_tvb_expert_info(CTP_Protocol.experts.too_long, subbuf(len)) + return false + end + + -- Only set the protocol info last, so we only set it for + -- packets that look valid. + pinfo.cols.protocol = "Collection Tree Protocol" + pinfo.cols.info = string.format("%s %s", cmdname, msg or "") + + return true +end + +function dissector(buffer, pinfo, tree) + local subtree = tree:add(CTP_Protocol, "CTP Protocol") + + ok, result = pcall(real_dissector, buffer, pinfo, subtree) + if not ok and result:match("Range is out of bounds$") then + return false + elseif not ok then + error(result) + else + return result + end +end + +-- Dissector is registered and activated here. Apart from the variable names, the original code is left unchanged +CTP_Protocol.dissector = dissector + +CTP_Protocol:register_heuristic("wpan", dissector) +table = DissectorTable.get("wpan.panid") +table:add(-1, CTP_Protocol) \ No newline at end of file diff --git a/dissectors/xiaomi-miio/LICENSE b/dissectors/xiaomi-miio/LICENSE new file mode 100644 index 0000000..272ffb9 --- /dev/null +++ b/dissectors/xiaomi-miio/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 gaosen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/xiaomi-miio/README.md b/dissectors/xiaomi-miio/README.md new file mode 100644 index 0000000..0a6665c --- /dev/null +++ b/dissectors/xiaomi-miio/README.md @@ -0,0 +1,51 @@ +# Xiaomi MiIO (protocole binaire local Mi Home) + +Dissecteur Wireshark Lua du **protocole binaire MiIO de Xiaomi** (appareils +Mi Home : aspirateurs, purificateurs, prises, lampes…) sur UDP 54321 : +octets magiques 0x2131, longueur, champ inconnu, identifiant d'appareil, +horodatage, somme MD5, puis charge chiffrée en AES-128-CBC. Les paquets +« Hello » / « Hello Ack » (découverte) sont signalés ; si le **jeton de +l'appareil** (128 bits, en hexadécimal) est saisi dans les préférences, la +charge JSON est déchiffrée et affichée dans la colonne Info. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/0x5e/miio-dissector (fichier `miio.lua`) | +| Commit importé | `4ef5a80bbdcde45aee981ef413b10b38d080758f` du 07/08/2022 (branche `main`, dernier commit ; dernière modification du dissecteur : `758489c` du 07/08/2022) | +| Licence amont | MIT (`LICENSE` amont, © 2022 gaosen) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur MiIO natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `miio.lua` | Dissecteur `miio` (UDP 54321), préférence « Device token » | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. Non importés : `install.sh` et la +capture d'écran du README amont. + +## Utilisation + +Copier `miio.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), redémarrer Wireshark, saisir le +jeton dans Préférences → Protocoles → MIIO, puis filtrer avec `miio`. + +## Remarques + +- **Déchiffrement par commandes externes** : MD5 et AES sont calculés en + lançant `xxd` et `openssl` via `io.popen` (shell) à chaque paquet chiffré. + Il faut ces deux outils dans le `PATH` ; c'est lent sur de grosses + captures, et le jeton saisi est inséré tel quel dans la commande shell + (ne saisir qu'un jeton hexadécimal). +- L'auteur indique macOS seulement (Linux non testé, Windows non pris en + charge). Avec OpenSSL 1.1 / 3, `openssl md5` affiche « MD5(stdin)= … » + au lieu du seul condensat, ce qui fausserait la clé dérivée (non vérifié). +- Sans jeton, la charge reste affichée chiffrée ; le jeton est une donnée + sensible de l'appareil, à ne pas partager avec les captures. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/xiaomi-miio/miio.lua b/dissectors/xiaomi-miio/miio.lua new file mode 100644 index 0000000..c3d0e9c --- /dev/null +++ b/dissectors/xiaomi-miio/miio.lua @@ -0,0 +1,95 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/0x5e/miio-dissector (miio.lua), +-- commit 4ef5a80bbdcde45aee981ef413b10b38d080758f du 07/08/2022. +-- Licence amont : MIT (LICENSE amont) — voir README.md. +local p_miio = Proto("miio", "Xiaomi Mi Home Binary Protocol") +p_miio.prefs.token = Pref.string("Device token", "", "128-bit device token (in hex)") + +local f_magic = ProtoField.uint16("miio.magic", "Magic", base.HEX) +local f_length = ProtoField.uint16("miio.length", "Length", base.DEC) +local f_unknown = ProtoField.uint32("miio.unknown", "Unknown", base.HEX) +local f_deviceId = ProtoField.uint32("miio.deviceId", "DeviceID", base.HEX) +local f_ts = ProtoField.uint32("miio.ts", "Timestamp", base.DEC) +local f_checksum = ProtoField.bytes("miio.checksum", "Checksum") +local f_encryptd_data = ProtoField.bytes("miio.encryptd_data", "Encrypted data") +local f_decrypted_data = ProtoField.string("miio.data", "Data") +p_miio.fields = { f_magic, f_length, f_unknown, f_deviceId, f_ts, f_checksum, f_encryptd_data, f_decrypted_data } + +local function md5(str) + local f = io.popen(string.format("echo '%s' | xxd -r -p - | openssl md5", str)) + local result = f:read("*a") + result = string.gsub(result, "\n", "") + f:close() + return result +end + +local function aes_128_cbc_decrypt(data, key, iv) + local f = io.popen(string.format("echo '%s' | xxd -r -p - | openssl aes-128-cbc -d -K '%s' -iv '%s'", data:tohex(), key, iv)) + local result = f:read("*a") + result = string.gsub(result, "\n", "") + f:close() + return result +end + +local function miio_dissector(buf, pkt, root) + if buf:len() < 32 then return false end + + local magic = buf(0, 2) + if magic:uint() ~= 0x2131 then return false end + + local len = buf(2, 2) + if buf:len() ~= len:uint() then return false end + + pkt.cols.protocol = "MIIO" + + local unknown = buf(4, 4) + local deviceId = buf(8, 4) + local ts = buf(12, 4) + local checksum = buf(16, 16) + + local t = root:add(p_miio, buf) + if len:uint() == 32 then + if deviceId:uint() == 0xffffffff then + pkt.cols.info = "Hello" + else + pkt.cols.info = "Hello Ack" + end + end + + t:add(f_magic, magic) + t:add(f_length, len) + t:add(f_unknown, unknown) + t:add(f_deviceId, deviceId) + t:add(f_ts, ts) + t:add(f_checksum, checksum) + + if len:uint() > 32 then + local data = buf(32, len:uint() - 32) + local token = p_miio.prefs.token + if (token ~= nil and token ~= "") then + local key = md5(token) + local iv = md5(string.format("%s%s", key, token)) + local decrypted_data = aes_128_cbc_decrypt(data:bytes(), key, iv) + -- TODO trim && check valid + pkt.cols.info = decrypted_data + t:add(f_decrypted_data, data, decrypted_data) + else + t:add(f_encryptd_data, data) + end + end + + return true +end + + +local data_dis = Dissector.get("data") +function p_miio.dissector(buf, pkt, root) + if miio_dissector(buf, pkt, root) then + --valid MIIO diagram + else + data_dis:call(buf, pkt, root) + end +end + +local udp_encap_table = DissectorTable.get("udp.port") +udp_encap_table:add(54321, p_miio) diff --git a/dissectors/xplane-avacee/LICENSE b/dissectors/xplane-avacee/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/xplane-avacee/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/xplane-avacee/README.md b/dissectors/xplane-avacee/README.md new file mode 100644 index 0000000..4d4b691 --- /dev/null +++ b/dissectors/xplane-avacee/README.md @@ -0,0 +1,75 @@ +# X-Plane UDP (Avacee) + +Dissecteur Wireshark Lua heuristique du protocole UDP du simulateur de +vol X-Plane (versions 11). Il reconnaît 32 types de messages par leur +prologue de quatre lettres, sur n'importe quel port UDP : `DATA`, +`DREF`, `RREF`, `RPOS`, `RADR`, `CMND`, `BECN`, `VEHX`, `ACFN`, `ACPR`, +`ALRT`, `FAIL`/`RECO`, `ISE4`/`ISE6`, `OBJN`/`OBJL`, `SOUN`/`LSND`/ +`SSND`, `SIMO`, `QUIT`/`SHUT`, etc. Les paquets `DATA` sont décodés +avec le nom de chaque groupe et de chaque valeur (issue #535). Un autre +dissecteur X-Plane 11, de wegylexy, est importé dans +`dissectors/xplane11-wegylexy/`. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/Avacee/XPlane-Wireshark-Dissector-Lua (`xplane.lua`) | +| Commit importé | `e2e97512554702a6d71a9dec2f03005c912e45e7` du 29/01/2021 (dernier commit de `master`) ; dernière modification du script : commit `7a73f36bd2e9dd8a8b5098cee4258df8652d99c8` du 22/11/2020 | +| Licence amont | GPL-3.0 (`LICENSE` amont : texte de la GPLv3, sans mention « or later » ni en-tête de licence dans le script). Déclarée `GPL-3.0-only` | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur X-Plane dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code, fins de ligne CRLF d'origine conservées) ; seule +l'en-tête de provenance de cinq lignes est ajoutée en tête (convention du +dépôt, issue #563). L'auteur indique dans son README que sa version en C +(Avacee/XPlane-Wireshark-Dissector-C) est plus rapide et seule suivie. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/xplane.lua` | Protocole `xplane` (« X-Plane », ligne 18) et sous-protocoles `xplane.` ; préférence « BECN Port » (49707, ligne 20) ; table des messages (ligne 1786) ; contrôles de taille par type (`ValidatePacket`, ligne 1821) ; heuristique sur UDP (ligne 1868) | + +## Utilisation + +Copier `src/xplane.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis recharger +avec Ctrl+Maj+L. Aucun port à régler : le dissecteur s'applique dès que +le prologue est reconnu, sauf pour `BECN`, accepté seulement sur le port +de la préférence `xplane.becn_port`. Filtres : `xplane`, `xplane.rpos`, +`xplane.data`, etc. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. +Captures synthétiques construites d'après la documentation UDP +d'X-Plane : + +| Essai | Résultat | +|---|---| +| `RPOS` (UDP 49001) | décodé : longitude 7.75, latitude 48.8166, altitude, hauteur, assiette, cap, inclinaison, vitesses, taux | +| `RREF` à deux paires | « Count = 2.0 », deux entrées avec identifiant et valeur | +| `DATA` à deux groupes (index 3 et 0) | « Speeds » avec « Knots Indicated Airspeed », « Knots True Airspeed », etc. ; « Frame Rate Info » | +| `DATA` d'index inconnu (999) | **erreur Lua** ligne 1392 (`attempt to index a nil value`) | +| `CMND` | « Command: sim/operation/pause_toggle » | +| `RPOS` de demande (6 octets) | « Request Positional Data », fréquence | +| `BECN` sur UDP 49707 | décodé : versions, « Host ID », « Version Number: 115101 », « Role: Master (1) », port, nom de machine, nouveau port | +| `BECN` sur UDP 49001 | refusé (port différent de la préférence), reste en UDP | +| `RADR` à deux points | « Weather Radar (OUT) », « Count = 2.0 », longitude, latitude, précipitations (40 et 80) et sommet de chaque point | +| Charge utile `HELLO world`, datagrammes de 2 et 4 octets | non revendiqués, restent en UDP, sans erreur | + +## Limites constatées + +- `DATA` : un index absent de la table interne provoque une erreur Lua + (ligne 1392). C'est le cas d'index propres à une version ou ajoutés + par la suite. +- L'heuristique ne contrôle que le prologue (et la taille pour quelques + types). Tout datagramme UDP commençant par `DATA`, `RPOS`, `CMND`, + etc. est revendiqué, quel que soit le port. +- La préférence `controlpad_port`, citée par le contrôle `ACFN` + (ligne 1827), n'est jamais déclarée : ce contrôle est sans effet. +- Les compteurs sont affichés en flottants (« Count = 2.0 »). +- Pas de capture réelle dans le dépôt amont. diff --git a/dissectors/xplane-avacee/src/xplane.lua b/dissectors/xplane-avacee/src/xplane.lua new file mode 100644 index 0000000..b32370b --- /dev/null +++ b/dissectors/xplane-avacee/src/xplane.lua @@ -0,0 +1,1876 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/Avacee/XPlane-Wireshark-Dissector-Lua (xplane.lua), +-- commit e2e97512554702a6d71a9dec2f03005c912e45e7 du 29/01/2021 (dernière modification du fichier : +-- commit 7a73f36bd2e9dd8a8b5098cee4258df8652d99c8 du 22/11/2020). +-- Licence amont : GPL-3.0 (LICENSE amont) — voir README.md et LICENSE. +local xplane_info = +{ + version = "1.1.0", + author = "Avacee", + description = "This plugin parses UDP packets from Laminar Research's X-Plane Flight Simulator", + repository = "https://github.com/avacee/xp11-Lua-Dissector" +} + +set_plugin_info(xplane_info) + +-- local d = require('debug') + +xplane = Proto("xplane","X-Plane") + +xplane.prefs.becn_port = Pref.uint("BECN Port",49707," X-Plane's BECN port") + +local VALS_StartType = { + [5] = "RepeatLast", + [6] = "LatLong", + [7] = "GeneralArea", + [8] = "NearestAirport", + [9] = "SnapshotLoad", + [10] = "Ramp", + [11] = "Runway", + [12] = "RunwayVFR", + [13] = "RunwayIFR", + [14] = "GrassStrip", + [15] = "DirtStrip", + [16] = "GravelStrip", + [17] = "WaterRunway", + [18] = "Helipad", + [19] = "CarrierCatapult", + [20] = "GliderTowPlane", + [21] = "GliderWinch", + [22] = "FormationFlying", + [23] = "RefuelBoom", + [24] = "RefuelBasket", + [25] = "B52Drop", + [26] = "ShuttlePiggyBack", + [27] = "CarrierApproach", + [28] = "FrigateApproach", + [29] = "SmallOilRigApproach", + [30] = "LargeOilPlatformApproach", + [31] = "ForestFireApproach", + [32] = "Shuttle01", + [33] = "Shuttle02", + [34] = "Shuttle03", + [35] = "Shuttle04", + [36] = "ShuttleGlide" +} + +local VALS_Situation = { + [0] = "Save Situation", + [1] = "Load Situation", + [2] = "Save Movie", + [3] = "Load Movie" +} + +local VALS_BECN_MachineRole = { + [1] = "Master", + [2] = "External Visual", + [3] = "IOS" +} + +--xplane_EngineMode = { +-- [0] = "Feather", +-- [1] = "Normal", +-- [2] = "Beta", +-- [3] = "Reverse" +--} + +local VALS_ISEx_MachineType = { + [0] = "Multiplayer1", + [1] = "Multiplayer2", + [2] = "Multiplayer3", + [3] = "Multiplayer4", + [4] = "Multiplayer5", + [5] = "Multiplayer6", + [6] = "Multiplayer7", + [7] = "Multiplayer8", + [8] = "Multiplayer9", + [9] = "Multiplayer10", + [10] = "Multiplayer11", + [11] = "Multiplayer12", + [12] = "Multiplayer13", + [13] = "Multiplayer14", + [14] = "Multiplayer15", + [15] = "Multiplayer16", + [16] = "Multiplayer17", + [17] = "Multiplayer18", + [18] = "Multiplayer19", + [19] = "ExternalVisual0", + [20] = "ExternalVisual1", + [21] = "ExternalVisual2", + [22] = "ExternalVisual3", + [23] = "ExternalVisual4", + [24] = "ExternalVisual5", + [25] = "ExternalVisual6", + [26] = "ExternalVisual7", + [27] = "ExternalVisual8", + [28] = "ExternalVisual9", + [29] = "ExternalVisual10", + [30] = "ExternalVisual11", + [31] = "ExternalVisual12", + [32] = "ExternalVisual13", + [33] = "ExternalVisual14", + [34] = "ExternalVisual15", + [35] = "ExternalVisual16", + [36] = "ExternalVisual17", + [37] = "ExternalVisual18", + [38] = "ExternalVisual19", + [39] = "ExternalVisualMaster8", + [42] = "IOSMasterThisIsIOS", + [62] = "IOSThisIsMaster", + [64] = "DataOutputTarget", + [71] = "Xavi1", + [72] = "Xavi2", + [73] = "Xavi3", + [74] = "Xavi4", + [75] = "ForeFlight", + [76] = "ForeFlightBroadcast", + [77] = "ControlPadForIOS" +} + +local xplane_DataIdLookup = {} +for i = 0, 138 do + xplane_DataIdLookup[i] = {} + for j=0,8 do + xplane_DataIdLookup[i][j] = "" + end +end + +xplane_DataIdLookup[0][0] = "Frame Rate Info" +xplane_DataIdLookup[0][1] = "Actual Frame Rate" +xplane_DataIdLookup[0][2] = "Sim Frame Rate" +xplane_DataIdLookup[0][3] = "" --Unused +xplane_DataIdLookup[0][4] = "Frame Time (s) DataRef=sim/time/framerate_period" +xplane_DataIdLookup[0][5] = "CPU Time (s)" +xplane_DataIdLookup[0][6] = "GPU Time (s) DataRef=sim/time/gpu_time_per_frame_sec_approx" +xplane_DataIdLookup[0][7] = "grnd ratio" +xplane_DataIdLookup[0][8] = "flit ratio (Requested Simulator Speed multiple from ctrl-T DataRef=sim/time/sim_speed_actual" + +xplane_DataIdLookup[1][0]= "Times" +xplane_DataIdLookup[1][1] = "Elapsed Sim Start (s)" +xplane_DataIdLookup[1][2] = "Elapsed Total Time (exc Start Screen) (s)" +xplane_DataIdLookup[1][3] = "Elapsed Mission Time (s)" +xplane_DataIdLookup[1][4] = "Elapsed Timer (s)" +xplane_DataIdLookup[1][5] = "" -- Unused +xplane_DataIdLookup[1][6] = "Zulu Time DataRef=sim/time/zulu_time_sec" +xplane_DataIdLookup[1][7] = "Simulator Local Time" +xplane_DataIdLookup[1][8] = "Hobbs Time DataRef=sim/time/hobbs_time" + +xplane_DataIdLookup[2][0]= "Sim Stats" +xplane_DataIdLookup[2][1]= "USE (puffs)" +xplane_DataIdLookup[2][2]= "TOT (puffs)" +xplane_DataIdLookup[2][3]= "Triangles Visible" +xplane_DataIdLookup[2][4]= "" -- Unused +xplane_DataIdLookup[2][5]= "" -- Unused +xplane_DataIdLookup[2][6]= "" -- Unused +xplane_DataIdLookup[2][7]= "" -- Unused +xplane_DataIdLookup[2][8]= "" -- Unused + +xplane_DataIdLookup[3][0]= "Speeds" +xplane_DataIdLookup[3][1]= "Knots Indicated Airspeed" +xplane_DataIdLookup[3][2]= "Knots Equivalent Airspeed " +xplane_DataIdLookup[3][3]= "Knots True Airspeed" +xplane_DataIdLookup[3][4]= "Knots Tree Ground Speed" +xplane_DataIdLookup[3][5]= "" -- Unused +xplane_DataIdLookup[3][6]= "Indicated (mph)" +xplane_DataIdLookup[3][7]= "True Airspeed (mph)" +xplane_DataIdLookup[3][8]= "True Ground Speed (mph)" + +xplane_DataIdLookup[4][0]= "Mach, VVI, g-load" +xplane_DataIdLookup[4][1]= "Current Mach" +xplane_DataIdLookup[4][2]= "" -- Unused +xplane_DataIdLookup[4][3]= "Vertical Velocity (feet per minute)" +xplane_DataIdLookup[4][4]= "" -- Unused +xplane_DataIdLookup[4][5]= "Gload (normal)" +xplane_DataIdLookup[4][6]= "GLoad (axial)" +xplane_DataIdLookup[4][7]= "Gload (side)" +xplane_DataIdLookup[4][8]= "" -- Unused + +xplane_DataIdLookup[5][0]= "Weather" +xplane_DataIdLookup[5][1]= "Sea Level Pressure (inHG)" +xplane_DataIdLookup[5][2]= "Sea Level Temperature (degC)" +xplane_DataIdLookup[5][3]= "" -- Unused +xplane_DataIdLookup[5][4]= "Wind Speed (knots)" +xplane_DataIdLookup[5][5]= "Wind From Direction 0=N->S 270=West->East" +xplane_DataIdLookup[5][6]= "Local Turbulance (0->1)" +xplane_DataIdLookup[5][7]= "Local Precipitation (0->1)" +xplane_DataIdLookup[5][8]= "Local Hail (0->1)" + +xplane_DataIdLookup[6][0]= "Aircraft atmosphere" +xplane_DataIdLookup[6][1]= "Atmospheric Pressure (inHG)" +xplane_DataIdLookup[6][2]= "Atmospheric Temperature (degC)" +xplane_DataIdLookup[6][3]= "LE temp (degC)" +xplane_DataIdLookup[6][4]= "Aircraft Density Ratio" +xplane_DataIdLookup[6][5]= "A (ktas)" +xplane_DataIdLookup[6][6]= "Q Dynamic pressue (lbs / ft^2)" +xplane_DataIdLookup[6][7]= "" -- Unused +xplane_DataIdLookup[6][8]= "Gravitational Force (feet/s^2)" + +xplane_DataIdLookup[7][0]= "System pressures" +xplane_DataIdLookup[7][1]= "Barometric pressure (inHG)" +xplane_DataIdLookup[7][2]= "edens (part)" +xplane_DataIdLookup[7][3]= "Vacuum ratio" +xplane_DataIdLookup[7][4]= "Vacuum ratio" +xplane_DataIdLookup[7][5]= "Elec ratio" +xplane_DataIdLookup[7][6]= "Elec ratio" +xplane_DataIdLookup[7][7]= "AHRS ratio" +xplane_DataIdLookup[7][8]= "AHRS ratio" + +xplane_DataIdLookup[8][0]= "Joystick aileron/elevator/rudder" +xplane_DataIdLookup[8][1]= "Elevator Full down = -1 Full Up = +1" +xplane_DataIdLookup[8][2]= "Aileron Full Left = -1 Full Right = +1" +xplane_DataIdLookup[8][3]= "Rudder Full Left = -1 Full Right = +1" +xplane_DataIdLookup[8][4]= "" --Unused +xplane_DataIdLookup[8][5]= "" --Unused +xplane_DataIdLookup[8][6]= "" --Unused +xplane_DataIdLookup[8][7]= "" --Unused +xplane_DataIdLookup[8][8]= "" --Unused + +xplane_DataIdLookup[9][0]= "Other Flight Controls" +xplane_DataIdLookup[9][1]= "Requested Thrust Vectoring" +xplane_DataIdLookup[9][2]= "Requested Wing Sweep" +xplane_DataIdLookup[9][3]= "Requested Wing Incidence" +xplane_DataIdLookup[9][4]= "Requested Wing Digedral" +xplane_DataIdLookup[9][5]= "Requested Wing Retration" +xplane_DataIdLookup[9][6]= "" --Unused +xplane_DataIdLookup[9][7]= "" --Unused +xplane_DataIdLookup[9][8]= "Water Jettisoned" + +xplane_DataIdLookup[10][0]= "Artificial Stability Input" +xplane_DataIdLookup[10][1]= "Elevator Full down = -1 Full Up = +1" +xplane_DataIdLookup[10][2]= "Aileron Full Left = -1 Full Right = +1" +xplane_DataIdLookup[10][3]= "Rudder Full Left = -1 Full Right = +1" +xplane_DataIdLookup[10][4]= "" --Unused +xplane_DataIdLookup[10][5]= "" --Unused +xplane_DataIdLookup[10][6]= "" --Unused +xplane_DataIdLookup[10][7]= "" --Unused +xplane_DataIdLookup[10][8]= "" --Unused + +xplane_DataIdLookup[11][0]= "Flight Control Deflections" +xplane_DataIdLookup[11][1]= "Elevator Full down = -1 Full Up = +1" +xplane_DataIdLookup[11][2]= "Aileron Full Left = -1 Full Right = +1" +xplane_DataIdLookup[11][3]= "Rudder Full Left = -1 Full Right = +1" +xplane_DataIdLookup[11][4]= "" --Unused +xplane_DataIdLookup[11][5]= "Nosewheel Degrees from forward. Negative = left, Positive = right" +xplane_DataIdLookup[11][6]= "" --Unused +xplane_DataIdLookup[11][7]= "" --Unused +xplane_DataIdLookup[11][8]= "" --Unused + +xplane_DataIdLookup[12][0]= "Wing sweep and thrust vectoring" +xplane_DataIdLookup[12][1]= "Sweep 1 (degrees back from normal)" +xplane_DataIdLookup[12][2]= "Sweep 1 (degrees back from normal)" +xplane_DataIdLookup[12][3]= "Sweep (degrees back from normal)" +xplane_DataIdLookup[12][4]= "Vector Ratio" +xplane_DataIdLookup[12][5]= "Sweep ratio (to fully forward)" +xplane_DataIdLookup[12][6]= "Incidence ratio (to fully angled)" +xplane_DataIdLookup[12][7]= "Dihedral ratio (to fulyl angled)" +xplane_DataIdLookup[12][8]= "Retraction ratio (to fully angled)" + +xplane_DataIdLookup[13][0]= "Trim / flaps / Slats / Speedbrakes" +xplane_DataIdLookup[13][1]= "Elevator trim" +xplane_DataIdLookup[13][2]= "Aileron trim" +xplane_DataIdLookup[13][3]= "Rudder trim" +xplane_DataIdLookup[13][4]= "Flap Requested (0->1)" +xplane_DataIdLookup[13][5]= "Flap Ratio (0->1)" +xplane_DataIdLookup[13][6]= "Slat Ratio" +xplane_DataIdLookup[13][7]= "Speedbrake Requested (0->1)" +xplane_DataIdLookup[13][8]= "Speedbrake Ratio (0->1)" + +xplane_DataIdLookup[14][0]= "Gear and Brakes" +xplane_DataIdLookup[14][1]= "Gear Requested (0->1)" +xplane_DataIdLookup[14][2]= "wbrak, set" +xplane_DataIdLookup[14][3]= "Left Toe Brake requested" +xplane_DataIdLookup[14][4]= "Right Toe Brake requested" +xplane_DataIdLookup[14][5]= "wbrak, position" +xplane_DataIdLookup[14][6]= "" --Unused +xplane_DataIdLookup[14][7]= "" --Unused +xplane_DataIdLookup[14][8]= "" --Unused + +xplane_DataIdLookup[15][0]= "Angular Moments" +xplane_DataIdLookup[15][1]= "M Roll Torque around X-axis (foot / lbs)" +xplane_DataIdLookup[15][2]= "L Roll Torque around Z-axis (foot / lbs)" +xplane_DataIdLookup[15][3]= "N Roll Torque around Y-axis (foot / lbs)" +xplane_DataIdLookup[15][4]= "" --Unused +xplane_DataIdLookup[15][5]= "" --Unused +xplane_DataIdLookup[15][6]= "" --Unused +xplane_DataIdLookup[15][7]= "" --Unused +xplane_DataIdLookup[15][8]= "" --Unused + +xplane_DataIdLookup[16][0]= "Angular Velocities" +xplane_DataIdLookup[16][1]= "Q Pitch Rate (measued in Body-axes)" +xplane_DataIdLookup[16][2]= "P Roll Rate (measued in Body-axes)" +xplane_DataIdLookup[16][3]= "R Yaw Rate (measued in Body-axes)" +xplane_DataIdLookup[16][4]= "" --Unused +xplane_DataIdLookup[16][5]= "" --Unused +xplane_DataIdLookup[16][6]= "" --Unused +xplane_DataIdLookup[16][7]= "" --Unused +xplane_DataIdLookup[16][8]= "" --Unused + +xplane_DataIdLookup[17][0]= "Pitch / Roll / Headings" +xplane_DataIdLookup[17][1]= "Pitch degrees (measured in body-axis Euler angles)" +xplane_DataIdLookup[17][2]= "Roll degrees (measured in body-axis Euler angles)" +xplane_DataIdLookup[17][3]= "True Heading (degrees)" +xplane_DataIdLookup[17][4]= "Magnetic Heading (degrees)" +xplane_DataIdLookup[17][5]= "" --Unused +xplane_DataIdLookup[17][6]= "" --Unused +xplane_DataIdLookup[17][7]= "" --Unused +xplane_DataIdLookup[17][8]= "" --Unused + +xplane_DataIdLookup[18][0]= "Angle Of Attack, sideslip, paths" +xplane_DataIdLookup[18][1]= "Alpha - AoA (degrees)" +xplane_DataIdLookup[18][2]= "Beta slideslip (degrees)" +xplane_DataIdLookup[18][3]= "HPath (degrees)" +xplane_DataIdLookup[18][4]= "VPath (degrees)" +xplane_DataIdLookup[18][5]= "" --Unused +xplane_DataIdLookup[18][6]= "" --Unused +xplane_DataIdLookup[18][7]= "" --Unused +xplane_DataIdLookup[18][8]= "slip, degrees" + +xplane_DataIdLookup[19][0]= "Magnetic Compass" +xplane_DataIdLookup[19][1]= "Magnetic Heading" +xplane_DataIdLookup[19][2]= "Magnetic Variation (from True)" +xplane_DataIdLookup[19][3]= "" --Unused +xplane_DataIdLookup[19][4]= "" --Unused +xplane_DataIdLookup[19][5]= "" --Unused +xplane_DataIdLookup[19][6]= "" --Unused +xplane_DataIdLookup[19][7]= "" --Unused +xplane_DataIdLookup[19][8]= "" --Unused + +xplane_DataIdLookup[20][0]= "Global Position" +xplane_DataIdLookup[20][1]= "Latitude" +xplane_DataIdLookup[20][2]= "Longitude" +xplane_DataIdLookup[20][3]= "Altitude (ft above mean sea level)" +xplane_DataIdLookup[20][4]= "Altitude (ft above ground)" +xplane_DataIdLookup[20][5]= "Is On Runway?" +xplane_DataIdLookup[20][6]= "Indicated Altitude" +xplane_DataIdLookup[20][7]= "Latitude (bottom of containing Lat/Long scenery square)" +xplane_DataIdLookup[20][8]= "Longitude (left of containing Lat/Long scenery square)" + +xplane_DataIdLookup[21][0]= "Distances Travelled" +xplane_DataIdLookup[21][1]= "X - relative to inertial axes" +xplane_DataIdLookup[21][2]= "Y - relative to inertial axes" +xplane_DataIdLookup[21][3]= "Z - relative to inertial axes" +xplane_DataIdLookup[21][4]= "vX (m/s) - relative to inertial axes" +xplane_DataIdLookup[21][5]= "vY (m/s) - relative to inertial axes" +xplane_DataIdLookup[21][6]= "vZ (m/s) - relative to inertial axes" +xplane_DataIdLookup[21][7]= "Distance (feet)" +xplane_DataIdLookup[21][8]= "Distance (nm)" + +xplane_DataIdLookup[22][0]= "All Planes Latitude" +xplane_DataIdLookup[23][0]= "All Planes Longitude" +xplane_DataIdLookup[24][0]= "All Planes Altitude (feet above mean sea level)" + +for i=0,7,1 do + xplane_DataIdLookup[22][i+1]= "Latitude of Plane " .. i + xplane_DataIdLookup[23][i+1]= "Longitude of Plane " .. i + xplane_DataIdLookup[24][i+1]= "Altitude of Plane " .. i +end + +-- The following DATA entries have a similar descriptions so are populated in a loop later +xplane_DataIdLookup[25][0]= "Throttle - Requested" +xplane_DataIdLookup[26][0]= "Throttle - Actual" +xplane_DataIdLookup[27][0]= "Engine Mode (0=Feather, 1=Normal, 2-Beta and 3=Reverse)" +xplane_DataIdLookup[28][0]= "Propeller setting" +xplane_DataIdLookup[29][0]= "Mixture setting" +xplane_DataIdLookup[30][0]= "Carb heat" +xplane_DataIdLookup[31][0]= "Cowl flaps" +xplane_DataIdLookup[32][0]= "Magnetos" +xplane_DataIdLookup[33][0]= "Starter timeout" +xplane_DataIdLookup[34][0]= "Engine power" +xplane_DataIdLookup[35][0]= "Engine thrust" +xplane_DataIdLookup[36][0]= "Engine torque" +xplane_DataIdLookup[37][0]= "Engine RPM" +xplane_DataIdLookup[38][0]= "Propeller RPM" +xplane_DataIdLookup[39][0]= "Propeller Pitch" +xplane_DataIdLookup[40][0]= "Engine Wash" +xplane_DataIdLookup[41][0]= "N1" +xplane_DataIdLookup[42][0]= "N2" +xplane_DataIdLookup[43][0]= "Manifold pressure" +xplane_DataIdLookup[44][0]= "EPR" +xplane_DataIdLookup[45][0]= "Fuel Flow" +xplane_DataIdLookup[46][0]= "ITT" +xplane_DataIdLookup[47][0]= "EGT" +xplane_DataIdLookup[48][0]= "CHT" +xplane_DataIdLookup[49][0]= "Oil pressure" +xplane_DataIdLookup[50][0]= "Oil temperature" +xplane_DataIdLookup[51][0]= "Fuel pressure" +xplane_DataIdLookup[52][0]= "Generator amps" +xplane_DataIdLookup[53][0]= "Battery amps" +xplane_DataIdLookup[54][0]= "Battery volts" +xplane_DataIdLookup[55][0]= "Electric fuel pump on/off" +xplane_DataIdLookup[56][0]= "Idle speed low/high" +xplane_DataIdLookup[57][0]= "Battery on/off" +xplane_DataIdLookup[58][0]= "Generator on/off" +xplane_DataIdLookup[59][0]= "Inverter on/off" +xplane_DataIdLookup[60][0]= "FADEC on/off" +xplane_DataIdLookup[61][0]= "Igniter on/off" +xplane_DataIdLookup[62][0]= "Fuel weights" + +for i=0,7,1 do + xplane_DataIdLookup[25][i+1]= "Engine " .. i .. " requested throttle" + xplane_DataIdLookup[26][i+1]= "Engine " .. i .. " actual throttle" + xplane_DataIdLookup[27][i+1]= "Engine " .. i .. " mode" + xplane_DataIdLookup[28][i+1]= "Propeller " .. i .. " setting" + xplane_DataIdLookup[30][i+1]= "Engine " .. i .. " Carb heat" + xplane_DataIdLookup[31][i+1]= "Engine " .. i .. " Cowl flaps" + xplane_DataIdLookup[32][i+1]= "Magneto" .. 1 + xplane_DataIdLookup[33][i+1]= "Starter " .. i .. " timeout" + xplane_DataIdLookup[34][i+1]= "Engine " .. i .. " Power (hp)" + xplane_DataIdLookup[35][i+1]= "Engine " .. i .. " Thrust (lbs)" + xplane_DataIdLookup[36][i+1]= "Engine " .. i .. " Torque (ft/lbs)" + xplane_DataIdLookup[37][i+1]= "Engine " .. i .. " RPM" + xplane_DataIdLookup[38][i+1]= "Propeller " .. i .. " RPM" + xplane_DataIdLookup[39][i+1]= "Propeller " .. i .. " Pitch" + xplane_DataIdLookup[40][i+1]= "Engine " .. i .. " Wash" + xplane_DataIdLookup[41][i+1]= "Engine " .. i .. " N1" + xplane_DataIdLookup[42][i+1]= "Engine " .. i .. " N2" + xplane_DataIdLookup[43][i+1]= "Engine " .. i .. " MP (Manifold Pressure)" + xplane_DataIdLookup[44][i+1]= "Engine " .. i .. " EPR (Engine Pressure Ratio)" + xplane_DataIdLookup[45][i+1]= "Engine " .. i .. " Fuel Flow (lb/h)" + xplane_DataIdLookup[46][i+1]= "Engine " .. i .. " ITT (Interstage Turbine Temperature)" + xplane_DataIdLookup[47][i+1]= "Engine " .. i .. " EGT (Exhaust Gas Temperature(" + xplane_DataIdLookup[48][i+1]= "Engine " .. i .. " CHT (Cylinder Head Temperature)" + xplane_DataIdLookup[49][i+1]= "Engine " .. i .. " Oil Pressure (lbs/in^2)" + xplane_DataIdLookup[50][i+1]= "Engine " .. i .. " Oil Temperature" + xplane_DataIdLookup[51][i+1]= "Engine " .. i .. " Fuel Pressure (lb/in^2)" + xplane_DataIdLookup[52][i+1]= "Engine " .. i .. " Generator Amps (A)" + xplane_DataIdLookup[53][i+1]= "Battery " .. i .. " Amps (A)" + xplane_DataIdLookup[54][i+1]= "Battery " .. i .. " Volts (V)" + xplane_DataIdLookup[55][i+1]= "Electric fuel pump " .. i .. " On/Off" + xplane_DataIdLookup[56][i+1]= "Engine " .. i .. " Idle Speed Low/High" + xplane_DataIdLookup[57][i+1]= "Battery " .. i .. " On/Off" + xplane_DataIdLookup[58][i+1]= "Generator " .. i .. " on/off" + xplane_DataIdLookup[59][i+1]= "Inverter " .. i .. " on/off" + xplane_DataIdLookup[60][i+1]= "FADEC " .. i .. " on/off" + xplane_DataIdLookup[61][i+1]= "Igniter " .. i .. " on/off" + xplane_DataIdLookup[62][i+1]= "Fuel Tank " .. i .. " weight (lbs)" +end + +xplane_DataIdLookup[63][0]= "Aircraft Payload (lbs) and Centre of Gravity" +xplane_DataIdLookup[63][1]= "Weight Empty" +xplane_DataIdLookup[63][2]= "Weight Total" +xplane_DataIdLookup[63][3]= "Fuel Total" +xplane_DataIdLookup[63][4]= "Weight Jettisonable" +xplane_DataIdLookup[63][5]= "Weight Current" +xplane_DataIdLookup[63][6]= "Weight Maximum" +xplane_DataIdLookup[63][7]= "" --Unused +xplane_DataIdLookup[63][8]= "CoG (feet behind reference point)" + +xplane_DataIdLookup[64][0]= "Aerodynamic Forces" +xplane_DataIdLookup[64][1]= "Lift (lbs)" +xplane_DataIdLookup[64][2]= "Drag (lbs)" +xplane_DataIdLookup[64][3]= "Side (lbs)" +xplane_DataIdLookup[64][4]= "L (ft / lbs)" +xplane_DataIdLookup[64][5]= "M (ft / lbs)" +xplane_DataIdLookup[64][6]= "N (ft / lbs)" +xplane_DataIdLookup[64][7]= "" --Unused +xplane_DataIdLookup[64][8]= "" --Unused + +xplane_DataIdLookup[65][0]= "Engine Forces" +xplane_DataIdLookup[65][1]= "Normal (lbs)" +xplane_DataIdLookup[65][2]= "Axial (lbs)" +xplane_DataIdLookup[65][3]= "Side (lbs)" +xplane_DataIdLookup[65][4]= "" --Unused +xplane_DataIdLookup[65][5]= "" --Unused +xplane_DataIdLookup[65][6]= "" --Unused +xplane_DataIdLookup[65][7]= "" --Unused +xplane_DataIdLookup[65][8]= "" --Unused + +xplane_DataIdLookup[66][0]= "Landing Gear Vertical Forces (lbs)" +xplane_DataIdLookup[66][1]= "Landing Gear 1 (typically nosewheel)" +xplane_DataIdLookup[66][2]= "Landing Gear 2" +xplane_DataIdLookup[66][3]= "Landing Gear 3" +xplane_DataIdLookup[66][4]= "Landing Gear 4" +xplane_DataIdLookup[66][5]= "Landing Gear 5" +xplane_DataIdLookup[66][6]= "Landing Gear 6" +xplane_DataIdLookup[66][7]= "Landing Gear 7" +xplane_DataIdLookup[66][8]= "Landing Gear 8" + +xplane_DataIdLookup[67][0]= "Landing Gear Deployment Ratio (0=Up, 1=Down)" +xplane_DataIdLookup[67][1]= "Landing Gear 1 (typically nosewheel)" +xplane_DataIdLookup[67][2]= "Landing Gear 2" +xplane_DataIdLookup[67][3]= "Landing Gear 3" +xplane_DataIdLookup[67][4]= "Landing Gear 4" +xplane_DataIdLookup[67][5]= "Landing Gear 5" +xplane_DataIdLookup[67][6]= "Landing Gear 6" +xplane_DataIdLookup[67][7]= "Landing Gear 7" +xplane_DataIdLookup[67][8]= "Landing Gear 8" + +xplane_DataIdLookup[68][0]= "Lift over drag and coefficients" +xplane_DataIdLookup[68][1]= "Lift/Drag Ratio" +xplane_DataIdLookup[68][2]= "" --Unused +xplane_DataIdLookup[68][3]= "cl, total" +xplane_DataIdLookup[68][4]= "cd, total" +xplane_DataIdLookup[68][5]= "" --Unused +xplane_DataIdLookup[68][6]= "" --Unused +xplane_DataIdLookup[68][7]= "" --Unused +xplane_DataIdLookup[68][8]= "Lift/Drag (*etaP)" + +xplane_DataIdLookup[69][0]= "Propeller Efficiency" +for i=0,7,1 do + xplane_DataIdLookup[69][i+1]= "Propeller " .. i .. " Efficiency" +end + +xplane_DataIdLookup[70][0]= "Aileron deflections 1" +xplane_DataIdLookup[71][0]= "Aileron deflections 2" +xplane_DataIdLookup[72][0]= "Roll spoiler deflections 1" +xplane_DataIdLookup[73][0]= "Roll spoiler deflections 2" +xplane_DataIdLookup[74][0]= "Elevator Deflections (degrees)" +xplane_DataIdLookup[75][0]= "Rudder deflections" +xplane_DataIdLookup[76][0]= "Yaw and brake deflections" +for i=0,6,2 do + xplane_DataIdLookup[70][i+1]= "Left Aileron " .. i/2 + xplane_DataIdLookup[71][i+1]= "Left Aileron " .. (i/2) + 4 + xplane_DataIdLookup[72][i+1]= "Left Roll spoiler " .. i/2 + xplane_DataIdLookup[73][i+1]= "Left Roll spoiler " .. (i/2) + 4 + xplane_DataIdLookup[74][i+1]= "Left Elevator " .. i/2 + xplane_DataIdLookup[75][i+1]= "Left Rudder " .. i/2 + xplane_DataIdLookup[76][i+1]= "Left Yaw Brake " .. i/2 +end +for i=1,7,2 do + xplane_DataIdLookup[70][i+1]= "Right Aileron " .. (i-1)/2 + xplane_DataIdLookup[71][i+1]= "Right Aileron " .. ((i-1)/2) + 4 + xplane_DataIdLookup[72][i+1]= "Right Roll spoiler " .. (i-1)/2 + xplane_DataIdLookup[73][i+1]= "Right Roll spoiler " .. ((i-1)/2) + 4 + xplane_DataIdLookup[74][i+1]= "Right Elevator " .. (i-1)/2 + xplane_DataIdLookup[75][i+1]= "Right Rudder " .. (i-1)/2 + xplane_DataIdLookup[76][i+1]= "Right Yaw Brake " .. (i-1)/2 +end + +xplane_DataIdLookup[77][0]= "Control Forces on Pilot's Hands (lbs)" +xplane_DataIdLookup[77][1]= "Pitch" +xplane_DataIdLookup[77][2]= "Roll" +xplane_DataIdLookup[77][3]= "Heading" +xplane_DataIdLookup[77][4]= "Left-Brake" +xplane_DataIdLookup[77][5]= "Right-Brake" +xplane_DataIdLookup[77][6]= "" --Unused +xplane_DataIdLookup[77][7]= "" --Unused +xplane_DataIdLookup[77][8]= "" --Unused + +xplane_DataIdLookup[78][0]= "Total Vertical Thrust Vectors" +xplane_DataIdLookup[79][0]= "Total lateral thrust vectors" +xplane_DataIdLookup[80][0]= "Pitch cyclic disc tilts" +xplane_DataIdLookup[81][0]= "Roll cyclic disc tilts" +xplane_DataIdLookup[82][0]= "Pitch cyclic flapping" +xplane_DataIdLookup[83][0]= "Roll cyclic flapping" +for i=0,7,1 do + xplane_DataIdLookup[78][i+1]= "Vertical Thrust Vectors " .. i + xplane_DataIdLookup[79][i+1]= "Lateral thrust vectors " .. i + xplane_DataIdLookup[80][i+1]= "Pitch cyclic disc tilts " .. i + xplane_DataIdLookup[81][i+1]= "Roll cyclic disc tilts " .. i + xplane_DataIdLookup[82][i+1]= "Pitch cyclic flapping " .. i + xplane_DataIdLookup[83][i+1]= "Roll cyclic flapping " .. i +end + +xplane_DataIdLookup[84][0]= "Ground Effect lift (wings)" +xplane_DataIdLookup[84][1]= "Wing1 L cl*" +xplane_DataIdLookup[84][2]= "Wing1 R cl*" +xplane_DataIdLookup[84][3]= "Wing2 L cl*" +xplane_DataIdLookup[84][4]= "Wing2 R cl*" +xplane_DataIdLookup[84][5]= "Wing3 L cl*" +xplane_DataIdLookup[84][6]= "Wing3 R cl*" +xplane_DataIdLookup[84][7]= "Wing4 L cl*" +xplane_DataIdLookup[84][8]= "Wing4 R cl*" + +xplane_DataIdLookup[85][0]= "Ground Effect drag (wings)" +xplane_DataIdLookup[85][1]= "Wing1 Lcdi*" +xplane_DataIdLookup[85][2]= "Wing1 Rcdi*" +xplane_DataIdLookup[85][3]= "Wing2 Lcdi*" +xplane_DataIdLookup[85][4]= "Wing2 Rcdi*" +xplane_DataIdLookup[85][5]= "Wing3 Lcdi*" +xplane_DataIdLookup[85][6]= "Wing3 Rcdi*" +xplane_DataIdLookup[85][7]= "Wing4 Lcdi*" +xplane_DataIdLookup[85][8]= "Wing4 Rcdi*" + +xplane_DataIdLookup[86][0]= "Ground Effect wash (wings)" +xplane_DataIdLookup[86][1]= "Wing1 wash*" +xplane_DataIdLookup[86][2]= "Wing1 wash*" +xplane_DataIdLookup[86][3]= "Wing2 wash*" +xplane_DataIdLookup[86][4]= "Wing2 wash*" +xplane_DataIdLookup[86][5]= "Wing3 wash*" +xplane_DataIdLookup[86][6]= "Wing3 wash*" +xplane_DataIdLookup[86][7]= "Wing4 wash*" +xplane_DataIdLookup[86][8]= "Wing4 wash*" + +xplane_DataIdLookup[87][0]= "Ground Effect lift (stabilisers)" +xplane_DataIdLookup[87][1]= "hstab L cl*" +xplane_DataIdLookup[87][2]= "hstab R cl*" +xplane_DataIdLookup[87][3]= "vstb1 cl*" +xplane_DataIdLookup[87][4]= "vstb2 cl*" +xplane_DataIdLookup[87][5]= "" --Unused +xplane_DataIdLookup[87][6]= "" --Unused +xplane_DataIdLookup[87][7]= "" --Unused +xplane_DataIdLookup[87][8]= "" --Unused + +xplane_DataIdLookup[88][0]= "Ground Effect drag (stabilisers)" +xplane_DataIdLookup[88][1]= "hstab Lcdi*" +xplane_DataIdLookup[88][2]= "hstab Rcdi*" +xplane_DataIdLookup[88][3]= "vstb1 cdi*" +xplane_DataIdLookup[88][4]= "vstb2 cdi*" +xplane_DataIdLookup[88][5]= "" --Unused +xplane_DataIdLookup[88][6]= "" --Unused +xplane_DataIdLookup[88][7]= "" --Unused +xplane_DataIdLookup[88][8]= "" --Unused + +xplane_DataIdLookup[89][0]= "Ground Effect wash (stabilisers)" +xplane_DataIdLookup[89][1]= "hstab wash*" +xplane_DataIdLookup[89][2]= "hstab wash*" +xplane_DataIdLookup[89][3]= "vstb1 wash*" +xplane_DataIdLookup[89][4]= "vstb2 wash*" +xplane_DataIdLookup[89][5]= "" --Unused +xplane_DataIdLookup[89][6]= "" --Unused +xplane_DataIdLookup[89][7]= "" --Unused +xplane_DataIdLookup[89][8]= "" --Unused + +xplane_DataIdLookup[90][0]= "Wash ratio from Ground Effect (rotors)" +xplane_DataIdLookup[90][1]= "GE rotor 1 wash*" +xplane_DataIdLookup[90][2]= "GE rotor 2 wash*" +xplane_DataIdLookup[90][3]= "GE rotor 3 wash*" +xplane_DataIdLookup[90][4]= "GE rotor 4 wash*" +xplane_DataIdLookup[90][5]= "GE rotor 5 wash*" +xplane_DataIdLookup[90][6]= "GE rotor 6 wash*" +xplane_DataIdLookup[90][7]= "GE rotor 7 wash*" +xplane_DataIdLookup[90][8]= "GE rotor 8 wash*" + +xplane_DataIdLookup[91][0]= "Wash ratio from Vortex Effect (rotors)" +xplane_DataIdLookup[91][1]= "VRS rotor 1 wash*" +xplane_DataIdLookup[91][2]= "VRS rotor 2 wash*" +xplane_DataIdLookup[91][3]= "VRS rotor 3 wash*" +xplane_DataIdLookup[91][4]= "VRS rotor 4 wash*" +xplane_DataIdLookup[91][5]= "VRS rotor 5 wash*" +xplane_DataIdLookup[91][6]= "VRS rotor 6 wash*" +xplane_DataIdLookup[91][7]= "VRS rotor 7 wash*" +xplane_DataIdLookup[91][8]= "VRS rotor 8 wash*" + +xplane_DataIdLookup[92][0]= "Wing lift" +xplane_DataIdLookup[92][1]= "Wing1 lift" +xplane_DataIdLookup[92][2]= "Wing1 lift" +xplane_DataIdLookup[92][3]= "Wing2 lift" +xplane_DataIdLookup[92][4]= "Wing2 lift" +xplane_DataIdLookup[92][5]= "Wing3 lift" +xplane_DataIdLookup[92][6]= "Wing3 lift" +xplane_DataIdLookup[92][7]= "Wing4 lift" +xplane_DataIdLookup[92][8]= "Wing4 lift" + +xplane_DataIdLookup[93][0]= "Wing drag" +xplane_DataIdLookup[93][1]= "Wing1 drag" +xplane_DataIdLookup[93][2]= "Wing1 drag" +xplane_DataIdLookup[93][3]= "Wing2 drag" +xplane_DataIdLookup[93][4]= "Wing2 drag" +xplane_DataIdLookup[93][5]= "Wing3 drag" +xplane_DataIdLookup[93][6]= "Wing3 drag" +xplane_DataIdLookup[93][7]= "Wing4 drag" +xplane_DataIdLookup[93][8]= "Wing4 drag" + +xplane_DataIdLookup[94][0]= "Stabilizer lift" +xplane_DataIdLookup[94][1]= "hstab lift" +xplane_DataIdLookup[94][2]= "hstab lift" +xplane_DataIdLookup[94][3]= "vstb1 lift" +xplane_DataIdLookup[94][4]= "vstb2 lift" +xplane_DataIdLookup[94][5]= "" --Unused +xplane_DataIdLookup[94][6]= "" --Unused +xplane_DataIdLookup[94][7]= "" --Unused +xplane_DataIdLookup[94][8]= "" --Unused + +xplane_DataIdLookup[95][0]= "Stabilizer drag" +xplane_DataIdLookup[95][1]= "hstab drag" +xplane_DataIdLookup[95][2]= "hstab drag" +xplane_DataIdLookup[95][3]= "vstb1 drag" +xplane_DataIdLookup[95][4]= "vstb2 drag" +xplane_DataIdLookup[95][5]= "" +xplane_DataIdLookup[95][6]= "" +xplane_DataIdLookup[95][7]= "" +xplane_DataIdLookup[95][8]= "" + +xplane_DataIdLookup[96][0]= "COM1 and COM2 radio freqs" +xplane_DataIdLookup[96][1]= "COM1 Active" +xplane_DataIdLookup[96][2]= "COM1 Standby" +xplane_DataIdLookup[96][3]= "" -- Unused +xplane_DataIdLookup[96][4]= "COM2 Active" +xplane_DataIdLookup[96][5]= "COM2 Standby" +xplane_DataIdLookup[96][6]= "" --Unused +xplane_DataIdLookup[96][7]= "Transmit Status" +xplane_DataIdLookup[96][8]= "" --Unused + +xplane_DataIdLookup[97][0]= "NAV1 and NAV2 radio freqs" +xplane_DataIdLookup[97][1]= "NAV1 Active" +xplane_DataIdLookup[97][2]= "NAV1 Standby" +xplane_DataIdLookup[97][3]= "NAV1 Type" +xplane_DataIdLookup[97][4]= "" --Unused +xplane_DataIdLookup[97][5]= "NAV2 Active" +xplane_DataIdLookup[97][6]= "NAV2 Standby" +xplane_DataIdLookup[97][7]= "NAV2 Type" +xplane_DataIdLookup[97][8]= "" --Unused + +xplane_DataIdLookup[98][0]= "NAV1 and NAV2 OBS" +xplane_DataIdLookup[98][1]= "NAV1 OBS" +xplane_DataIdLookup[98][2]= "NAV1 s-crs" +xplane_DataIdLookup[98][3]= "NAV1 flag" +xplane_DataIdLookup[98][4]= "" --Unused +xplane_DataIdLookup[98][5]= "NAV2 OBS" +xplane_DataIdLookup[98][6]= "NAV2 s-crs" +xplane_DataIdLookup[98][7]= "NAV2 flag" +xplane_DataIdLookup[98][8]= "" + +xplane_DataIdLookup[99][0]= "NAV1 deflection" +xplane_DataIdLookup[99][1]= "NAV1 n-typ" +xplane_DataIdLookup[99][2]= "NAV1 to-fr" +xplane_DataIdLookup[99][3]= "NAV1 m-crs" +xplane_DataIdLookup[99][4]= "NAV1 r-brg" +xplane_DataIdLookup[99][5]= "NAV1 dme-d" +xplane_DataIdLookup[99][6]= "NAV1 h-def" +xplane_DataIdLookup[99][7]= "NAV1 v-def" +xplane_DataIdLookup[99][8]= "" --Unused + +xplane_DataIdLookup[100][0]= "NAV2 deflection" +xplane_DataIdLookup[100][1]= "NAV2 n-typ" +xplane_DataIdLookup[100][2]= "NAV2 to-fr" +xplane_DataIdLookup[100][3]= "NAV2 m-crs" +xplane_DataIdLookup[100][4]= "NAV2 r-brg" +xplane_DataIdLookup[100][5]= "NAV2 dme-d" +xplane_DataIdLookup[100][6]= "NAV2 h-def" +xplane_DataIdLookup[100][7]= "NAV2 v-def" +xplane_DataIdLookup[100][8]= "" --Unused + +xplane_DataIdLookup[101][0]= "ADF1 and ADF2 statuses" +xplane_DataIdLookup[101][1]= "ACF1 frequency" +xplane_DataIdLookup[101][2]= "ADF1 card" +xplane_DataIdLookup[101][3]= "ADF1 r-brg" +xplane_DataIdLookup[101][4]= "ADF1 n-typ" +xplane_DataIdLookup[101][5]= "ACF2 frequency" +xplane_DataIdLookup[101][6]= "ADF2 card" +xplane_DataIdLookup[101][7]= "ADF2 r-brg" +xplane_DataIdLookup[101][8]= "ADF2 n-typ" + +xplane_DataIdLookup[102][0]= "DME status" +xplane_DataIdLookup[102][1]= "DME nav01" +xplane_DataIdLookup[102][2]= "DME mode" +xplane_DataIdLookup[102][3]= "DME found" +xplane_DataIdLookup[102][4]= "DME dist" +xplane_DataIdLookup[102][5]= "DME speed" +xplane_DataIdLookup[102][6]= "DME time" +xplane_DataIdLookup[102][7]= "DME n-typ" +xplane_DataIdLookup[102][8]= "DME-3 freq" + +xplane_DataIdLookup[103][0]= "GPS status" +xplane_DataIdLookup[103][1]= "GPS mode" +xplane_DataIdLookup[103][2]= "GPS index" +xplane_DataIdLookup[103][3]= "GPS dist - nm" +xplane_DataIdLookup[103][4]= "OSB mag" +xplane_DataIdLookup[103][5]= "crs mag" +xplane_DataIdLookup[103][6]= "rel brng" +xplane_DataIdLookup[103][7]= "hdef dots" +xplane_DataIdLookup[103][8]= "vdef dots" + +xplane_DataIdLookup[104][0]= "Transponder status" +xplane_DataIdLookup[104][1]= "trans mode" +xplane_DataIdLookup[104][2]= "trans sett" +xplane_DataIdLookup[104][3]= "trans ID" +xplane_DataIdLookup[104][4]= "trans inter" +xplane_DataIdLookup[104][5]= "" --Unused +xplane_DataIdLookup[104][6]= "" --Unused +xplane_DataIdLookup[104][7]= "" --Unused +xplane_DataIdLookup[104][8]= "" --Unused + +xplane_DataIdLookup[105][0]= "Marker staus" +xplane_DataIdLookup[105][1]= "Outer Marker - morse" +xplane_DataIdLookup[105][2]= "Middle Marker - morse" +xplane_DataIdLookup[105][3]= "Inner Marker - morse" +xplane_DataIdLookup[105][4]= "audio - active" +xplane_DataIdLookup[105][5]= "" --Unused +xplane_DataIdLookup[105][6]= "" --Unused +xplane_DataIdLookup[105][7]= "" --Unused +xplane_DataIdLookup[105][8]= "" --Unused + +xplane_DataIdLookup[106][0]= "Electrical switches" +xplane_DataIdLookup[106][1]= "avio 0/1" +xplane_DataIdLookup[106][2]= "Navigation Lights (0/1)" +xplane_DataIdLookup[106][3]= "Beacon Light (0/1)" +xplane_DataIdLookup[106][4]= "Strob Light (0/1)" +xplane_DataIdLookup[106][5]= "Landing Lights (0/1)" +xplane_DataIdLookup[106][6]= "Taxi Lights (0/1)" +xplane_DataIdLookup[106][7]= "" --Unused +xplane_DataIdLookup[106][8]= "" --Unused + +xplane_DataIdLookup[107][0]= "EFIS switches" +xplane_DataIdLookup[107][1]= "ECAM mode`" +xplane_DataIdLookup[107][2]= "EFIS sel 1" +xplane_DataIdLookup[107][3]= "EFIS sel 2" +xplane_DataIdLookup[107][4]= "HSI sel 1" +xplane_DataIdLookup[107][5]= "HSI sel 2" +xplane_DataIdLookup[107][6]= "HSI arc" +xplane_DataIdLookup[107][7]= "map r-sel" +xplane_DataIdLookup[107][8]= "map range" + +xplane_DataIdLookup[108][0]= "AP, FD, HUD switches" +xplane_DataIdLookup[108][1]= "Ap - src" +xplane_DataIdLookup[108][2]= "fdir - mode" +xplane_DataIdLookup[108][3]= "fdir - ptch" +xplane_DataIdLookup[108][4]= "fdir - roll" +xplane_DataIdLookup[108][5]= "" --Unused +xplane_DataIdLookup[108][6]= "HUD power" +xplane_DataIdLookup[108][7]= "HUD brite" +xplane_DataIdLookup[108][8]= "" --Unused + +xplane_DataIdLookup[109][0]= "Anti-ice switches" +xplane_DataIdLookup[109][1]= "deice - all" +xplane_DataIdLookup[109][2]= "deice inlet" +xplane_DataIdLookup[109][3]= "deice prop" +xplane_DataIdLookup[109][4]= "deice windo" +xplane_DataIdLookup[109][5]= "deice pito1" +xplane_DataIdLookup[109][6]= "deice piot2" +xplane_DataIdLookup[109][7]= "deice AoA" +xplane_DataIdLookup[109][8]= "devie wing" + +xplane_DataIdLookup[110][0]= "Anti-ice and fuel switches" +xplane_DataIdLookup[110][1]= "alt air0" +xplane_DataIdLookup[110][2]= "alt air1" +xplane_DataIdLookup[110][3]= "auto ignit" +xplane_DataIdLookup[110][4]= "audo ignit" +xplane_DataIdLookup[110][5]= "manul ignit" +xplane_DataIdLookup[110][6]= "manul ignit" +xplane_DataIdLookup[110][7]= "l-eng tank" +xplane_DataIdLookup[110][8]= "r-eng tank" + +xplane_DataIdLookup[111][0]= "Clutch and artificial stability switches" +xplane_DataIdLookup[111][1]= "prero engag" +xplane_DataIdLookup[111][2]= "prero level" +xplane_DataIdLookup[111][3]= "clutc ratio" +xplane_DataIdLookup[111][4]= "" --Unused +xplane_DataIdLookup[111][5]= "art pitch" +xplane_DataIdLookup[111][6]= "art roll" +xplane_DataIdLookup[111][7]= "yaw damp" +xplane_DataIdLookup[111][8]= "auto brake" + +xplane_DataIdLookup[112][0]= "Misc switches" +xplane_DataIdLookup[112][1]= "tot energ" +xplane_DataIdLookup[112][2]= "radal feet" +xplane_DataIdLookup[112][3]= "prop sync" +xplane_DataIdLookup[112][4]= "fethr mode" +xplane_DataIdLookup[112][5]= "puffr power" +xplane_DataIdLookup[112][6]= "water scoop" +xplane_DataIdLookup[112][7]= "arrst hook" +xplane_DataIdLookup[112][8]= "chute deply" + +xplane_DataIdLookup[113][0]= "Gen. Annunciations 1" +xplane_DataIdLookup[113][1]= "mast cau" +xplane_DataIdLookup[113][2]= "mast wat" +xplane_DataIdLookup[113][3]= "masy accp" +xplane_DataIdLookup[113][4]= "auto disco" +xplane_DataIdLookup[113][5]= "low vacum" +xplane_DataIdLookup[113][6]= "low volt" +xplane_DataIdLookup[113][7]= "fuel quant" +xplane_DataIdLookup[113][8]= "hyd press" + +xplane_DataIdLookup[114][0]= "Gen. Annunciations 2" +xplane_DataIdLookup[114][1]= "yawda on" +xplane_DataIdLookup[114][2]= "sbrk on" +xplane_DataIdLookup[114][3]= "GPWS warn" +xplane_DataIdLookup[114][4]= "ice warn" +xplane_DataIdLookup[114][5]= "pitot off" +xplane_DataIdLookup[114][6]= "cabin althi" +xplane_DataIdLookup[114][7]= "afthr arm" +xplane_DataIdLookup[114][8]= "osps time" + +xplane_DataIdLookup[115][0]= "Engine annunciations" +xplane_DataIdLookup[115][1]= "fuel press" +xplane_DataIdLookup[115][2]= "oil press" +xplane_DataIdLookup[115][3]= "oil temp" +xplane_DataIdLookup[115][4]= "inver warn" +xplane_DataIdLookup[115][5]= "gener warn" +xplane_DataIdLookup[115][6]= "chip detec" +xplane_DataIdLookup[115][7]= "engin fire" +xplane_DataIdLookup[115][8]= "ignit 0/1" + +xplane_DataIdLookup[116][0]= "Autopilot armed status" +xplane_DataIdLookup[116][1]= "nav arm" +xplane_DataIdLookup[116][2]= "alt arm" +xplane_DataIdLookup[116][3]= "app arm" +xplane_DataIdLookup[116][4]= "vnav enab" +xplane_DataIdLookup[116][5]= "vnav warn" +xplane_DataIdLookup[116][6]= "vnav time" +xplane_DataIdLookup[116][7]= "gp enabl" +xplane_DataIdLookup[116][8]= "" + +xplane_DataIdLookup[117][0]= "Autopilot modes" +xplane_DataIdLookup[117][1]= "auto throt" +xplane_DataIdLookup[117][2]= "mode hding" +xplane_DataIdLookup[117][3]= "mode alt" +xplane_DataIdLookup[117][4]= "" +xplane_DataIdLookup[117][5]= "bac 0/1" +xplane_DataIdLookup[117][6]= "app" +xplane_DataIdLookup[117][7]= "" +xplane_DataIdLookup[117][8]= "sync butn" + +xplane_DataIdLookup[118][0]= "Autopilot values" +xplane_DataIdLookup[118][1]= "set speed" +xplane_DataIdLookup[118][2]= "set hding" +xplane_DataIdLookup[118][3]= "set vvi" +xplane_DataIdLookup[118][4]= "dial alt" +xplane_DataIdLookup[118][5]= "bac vnav alt" +xplane_DataIdLookup[118][6]= "use alt" +xplane_DataIdLookup[118][7]= "sync roll" +xplane_DataIdLookup[118][8]= "sync pitch" + +xplane_DataIdLookup[119][0]= "Weapon status" +xplane_DataIdLookup[119][1]= "hdng delta" +xplane_DataIdLookup[119][2]= "ptch delta" +xplane_DataIdLookup[119][3]= "R d/sec" +xplane_DataIdLookup[119][4]= "Q d/sec" +xplane_DataIdLookup[119][5]= "rudd ratio" +xplane_DataIdLookup[119][6]= "elev ratio" +xplane_DataIdLookup[119][7]= "V kts" +xplane_DataIdLookup[119][8]= "dis ft" + +xplane_DataIdLookup[120][0]= "Pressurization status" +xplane_DataIdLookup[120][1]= "set alt" +xplane_DataIdLookup[120][2]= "set vvi" +xplane_DataIdLookup[120][3]= "cabin alt" +xplane_DataIdLookup[120][4]= "cabin vvi" +xplane_DataIdLookup[120][5]= "test time" +xplane_DataIdLookup[120][6]= "diff psi" +xplane_DataIdLookup[120][7]= "dump all" +xplane_DataIdLookup[120][8]= "bleed src" + +xplane_DataIdLookup[121][0]= "APU and GPU status" +xplane_DataIdLookup[121][1]= "APU runng" +xplane_DataIdLookup[121][2]= "APU N1" +xplane_DataIdLookup[121][3]= "APU rat" +xplane_DataIdLookup[121][4]= "GPU rat" +xplane_DataIdLookup[121][5]= "RAT rat" +xplane_DataIdLookup[121][6]= "APU amp" +xplane_DataIdLookup[121][7]= "GPU amp" +xplane_DataIdLookup[121][8]= "RAT amp" + +xplane_DataIdLookup[122][0]= "Radar status" +xplane_DataIdLookup[122][1]= "targ select" +xplane_DataIdLookup[122][2]= "" --Unused +xplane_DataIdLookup[122][3]= "" --Unused +xplane_DataIdLookup[122][4]= "" --Unused +xplane_DataIdLookup[122][5]= "" --Unused +xplane_DataIdLookup[122][6]= "" --Unused +xplane_DataIdLookup[122][7]= "" --Unused +xplane_DataIdLookup[122][8]= "" --Unused + +xplane_DataIdLookup[123][0]= "Hydraulic status" +xplane_DataIdLookup[123][1]= "eng-1 pump" +xplane_DataIdLookup[123][2]= "eng-2 pump" +xplane_DataIdLookup[123][3]= "ele pum" +xplane_DataIdLookup[123][4]= "RA pum" +xplane_DataIdLookup[123][5]= "hyd qty" +xplane_DataIdLookup[123][6]= "hyd qty" +xplane_DataIdLookup[123][7]= "hyd pres" +xplane_DataIdLookup[123][8]= "hyd pres" + +xplane_DataIdLookup[124][0]= "Electrical and solar systems" +xplane_DataIdLookup[124][1]= "bus1 volt" +xplane_DataIdLookup[124][2]= "bus2 volt" +xplane_DataIdLookup[124][3]= "bus1 amp" +xplane_DataIdLookup[124][4]= "bus2 amp" +xplane_DataIdLookup[124][5]= "batt1 w-hr" +xplane_DataIdLookup[124][6]= "batt2 w-hr" +xplane_DataIdLookup[124][7]= "engin in W" +xplane_DataIdLookup[124][8]= "solar out W" + +xplane_DataIdLookup[125][0]= "Icing status 1" +xplane_DataIdLookup[125][1]= "inlet ice" +xplane_DataIdLookup[125][2]= "inlet ine" +xplane_DataIdLookup[125][3]= "prop ice" +xplane_DataIdLookup[125][4]= "prop ice" +xplane_DataIdLookup[125][5]= "pitot ice" +xplane_DataIdLookup[125][6]= "pitot ice" +xplane_DataIdLookup[125][7]= "statc ice" +xplane_DataIdLookup[125][8]= "statc ice" + +xplane_DataIdLookup[126][0]= "Icing status 2" +xplane_DataIdLookup[126][1]= "aoa ice" +xplane_DataIdLookup[126][2]= "aoa ice" +xplane_DataIdLookup[126][3]= "lwing ice" +xplane_DataIdLookup[126][4]= "rwing ice" +xplane_DataIdLookup[126][5]= "windo ice" +xplane_DataIdLookup[126][6]= "" --Unused +xplane_DataIdLookup[126][7]= "carb1 ice" +xplane_DataIdLookup[126][8]= "carb2 ice" + +xplane_DataIdLookup[127][0]= "Warning status" +xplane_DataIdLookup[127][1]= "warn time" +xplane_DataIdLookup[127][2]= "caut time" +xplane_DataIdLookup[127][3]= "warn work" +xplane_DataIdLookup[127][4]= "caut work" +xplane_DataIdLookup[127][5]= "gear work" +xplane_DataIdLookup[127][6]= "gear warn" +xplane_DataIdLookup[127][7]= "stall warn" +xplane_DataIdLookup[127][8]= "" + +xplane_DataIdLookup[128][0]= "Flight plan legs" +xplane_DataIdLookup[128][1]= "leg #" +xplane_DataIdLookup[128][2]= "leg type" +xplane_DataIdLookup[128][3]= "leg lat" +xplane_DataIdLookup[128][4]= "leg long" +xplane_DataIdLookup[128][5]= "" --Unused +xplane_DataIdLookup[128][6]= "" --Unused +xplane_DataIdLookup[128][7]= "" --Unused +xplane_DataIdLookup[128][8]= "" --Unused + +xplane_DataIdLookup[129][0]= "Hardware options" +xplane_DataIdLookup[129][1]= "pedal nobrk" +xplane_DataIdLookup[129][2]= "pedal wibrk" +xplane_DataIdLookup[129][3]= "yoke pfc" +xplane_DataIdLookup[129][4]= "pedal pfc" +xplane_DataIdLookup[129][5]= "throt pfc" +xplane_DataIdLookup[129][6]= "cecon pfc" +xplane_DataIdLookup[129][7]= "switc pfc" +xplane_DataIdLookup[129][8]= "btogg pfc" + +xplane_DataIdLookup[130][0]= "Camera location" +xplane_DataIdLookup[130][1]= "camra long" +xplane_DataIdLookup[130][2]= "camra lat" +xplane_DataIdLookup[130][3]= "camra ele" +xplane_DataIdLookup[130][4]= "camra hdng" +xplane_DataIdLookup[130][5]= "camra pitch" +xplane_DataIdLookup[130][6]= "camra roll" +xplane_DataIdLookup[130][7]= "" --Unused +xplane_DataIdLookup[130][8]= "camra clou" + +xplane_DataIdLookup[131][0]= "Ground location" +xplane_DataIdLookup[131][1]= "" --Unused +xplane_DataIdLookup[131][2]= "" --Unused +xplane_DataIdLookup[131][3]= "" --Unused +xplane_DataIdLookup[131][4]= "" --Unused +xplane_DataIdLookup[131][5]= "" --Unused +xplane_DataIdLookup[131][6]= "" --Unused +xplane_DataIdLookup[131][7]= "" --Unused +xplane_DataIdLookup[131][8]= "" --Unused + +xplane_DataIdLookup[132][0]= "Climb stats" +xplane_DataIdLookup[132][1]= "h-spd kt" +xplane_DataIdLookup[132][2]= "v-spd fpm" +xplane_DataIdLookup[132][3]= "" --Unused +xplane_DataIdLookup[132][4]= "mult VxVVI" +xplane_DataIdLookup[132][5]= "" --Unused +xplane_DataIdLookup[132][6]= "" --Unused +xplane_DataIdLookup[132][7]= "" --Unused +xplane_DataIdLookup[132][8]= "" --Unused + +xplane_DataIdLookup[133][0]= "Cruise stats" +xplane_DataIdLookup[133][1]= "ff pph" +xplane_DataIdLookup[133][2]= "ff gph" +xplane_DataIdLookup[133][3]= "speed mph" +xplane_DataIdLookup[133][4]= "eta smpg" +xplane_DataIdLookup[133][5]= "etc nm/lb" +xplane_DataIdLookup[133][6]= "range sm" +xplane_DataIdLookup[133][7]= "endur hours" +xplane_DataIdLookup[133][8]= "mult VxMPG" + +xplane_DataIdLookup[134][0]= "Landing gear steering" +xplane_DataIdLookup[134][1]= "Gear 1 deg" +xplane_DataIdLookup[134][2]= "Gear 2 deg" +xplane_DataIdLookup[134][3]= "Gear 3 deg" +xplane_DataIdLookup[134][4]= "Gear 4 deg" +xplane_DataIdLookup[134][5]= "Gear 5 deg" +xplane_DataIdLookup[134][6]= "Gear 6 deg" +xplane_DataIdLookup[134][7]= "Gear 7 deg" +xplane_DataIdLookup[134][8]= "Gear 8 deg" + +xplane_DataIdLookup[135][0]= "Motion platform stats" +xplane_DataIdLookup[135][1]= "acc-x m/ss" +xplane_DataIdLookup[135][2]= "acc-y m/ss" +xplane_DataIdLookup[135][3]= "acc-z m/ss" +xplane_DataIdLookup[135][4]= "P rad/s" +xplane_DataIdLookup[135][5]= "Q rad/s" +xplane_DataIdLookup[135][6]= "R rad/s" +xplane_DataIdLookup[135][7]= "" --Unused +xplane_DataIdLookup[135][8]= "" --Unused + +xplane_DataIdLookup[136][0]= "Joystick Raw Axis Deflections" +xplane_DataIdLookup[136][1]= "axis1 ratio" +xplane_DataIdLookup[136][2]= "axis2 ratio" +xplane_DataIdLookup[136][3]= "axis3 ratio" +xplane_DataIdLookup[136][4]= "axis4 ratio" +xplane_DataIdLookup[136][5]= "axis5 ratio" +xplane_DataIdLookup[136][6]= "axis6 ratio" +xplane_DataIdLookup[136][7]= "axis7 ratio" +xplane_DataIdLookup[136][8]= "axis8 ratio" + +xplane_DataIdLookup[137][0]= "Gear forces" +xplane_DataIdLookup[137][1]= "norm lb" +xplane_DataIdLookup[137][2]= "axial lb" +xplane_DataIdLookup[137][3]= "side lb" +xplane_DataIdLookup[137][4]= "L lb-ft" +xplane_DataIdLookup[137][5]= "M lb-ft" +xplane_DataIdLookup[137][6]= "N lb-ft" +xplane_DataIdLookup[137][7]= "" --Unused +xplane_DataIdLookup[137][8]= "" --Unused + +xplane_DataIdLookup[138][0]= "Servo Aileron / Elevator / Rudder" +xplane_DataIdLookup[138][1]= "elev servo" +xplane_DataIdLookup[138][2]= "ailrn servo" +xplane_DataIdLookup[138][3]= "ruddr servo" +xplane_DataIdLookup[138][4]= "" --Unused +xplane_DataIdLookup[138][5]= "" --Unused +xplane_DataIdLookup[138][6]= "" --Unused +xplane_DataIdLookup[138][7]= "" --Unused +xplane_DataIdLookup[138][8]= "" --Unused + +xplane.fields.acfn_header = ProtoField.string("xplane.acfn","Header") +xplane.fields.acfn_index = ProtoField.int32("xplane.acfn.index","Index") +xplane.fields.acfn_path = ProtoField.string("xplane.acfn.path","Path") +xplane.fields.acfn_livery = ProtoField.int32("xplane.acfn.livery","Livery") + +xplane.fields.acpr_header = ProtoField.string("xplane.acpr","Header") +xplane.fields.acpr_index = ProtoField.int32("xplane.acpr.index","Index") +xplane.fields.acpr_path = ProtoField.string("xplane.acpr.path","Path") +xplane.fields.acpr_livery = ProtoField.int32("xplane.acpr.livery","Livery") +xplane.fields.acpr_starttype = ProtoField.int32("xplane.acpr.starttype","Start Type",base.DEC,VALS_StartType) +xplane.fields.acpr_aircraftindex = ProtoField.int32("xplane.acpr.aircraftindex","Aircraft Index") +xplane.fields.acpr_ICAO = ProtoField.string("xplane.acpr.ICAO","ICAO") +xplane.fields.acpr_runwayindex = ProtoField.int32("xplane.acpr.runwayindex","Runway Index") +xplane.fields.acpr_runwaydirection = ProtoField.int32("xplane.acpr.runwaydirection","Runway Direction") +xplane.fields.acpr_latitude = ProtoField.double("xplane.acpr.latitude","Latitude") +xplane.fields.acpr_longitude = ProtoField.double("xplane.acpr.longitude","Longitude") +xplane.fields.acpr_elevation = ProtoField.double("xplane.acpr.elevation","Elevation") +xplane.fields.acpr_trueheading = ProtoField.double("xplane.acpr.trueheading","True Heading") +xplane.fields.acpr_speed = ProtoField.double("xplane.acpr.speed","Speed") + +xplane.fields.alrt_header = ProtoField.string("xplane.alrt","Header") +xplane.fields.alrt_line1 = ProtoField.string("xplane.alrt.line1","Line 1") +xplane.fields.alrt_line2 = ProtoField.string("xplane.alrt.line2","Line 2") +xplane.fields.alrt_line3 = ProtoField.string("xplane.alrt.line3","Line 3") +xplane.fields.alrt_line4 = ProtoField.string("xplane.alrt.line4","Line 4") + +xplane.fields.becn_header = ProtoField.string("xplane.becn", "Header") +xplane.fields.becn_major = ProtoField.uint8("xplane.becn.major", "Major Version") +xplane.fields.becn_minor = ProtoField.uint8("xplane.becn.minor", "Minor Version") +xplane.fields.becn_appid = ProtoField.int32("xplane.becn.appid", "Host ID") +xplane.fields.becn_version = ProtoField.int32("xplane.becn.version", "Version Number") +xplane.fields.becn_role = ProtoField.uint32("xplane.becn.role", "Role", base.DEC, VALS_BECN_MachineRole) +xplane.fields.becn_port = ProtoField.uint16("xplane.becn.port", "Port") +xplane.fields.becn_name = ProtoField.stringz("xplane.becn.name", "Computer Name") +xplane.fields.becn_newport = ProtoField.uint16("xplane.becn.newport", "New Port") + +xplane.fields.cmnd_header = ProtoField.string("xplane.cmnd","Header") +xplane.fields.cmnd_command = ProtoField.string("xplane.cmnd.command","Command") + +xplane.fields.data_header = ProtoField.string("xplane.data","Header") +xplane.fields.data_index = ProtoField.int32("xplane.data.index","Index") +xplane.fields.data_value = ProtoField.float("xplane.data.value","Value") + +xplane.fields.dcoc_header = ProtoField.string("xplane.dcoc","Header") +xplane.fields.dcoc_id = ProtoField.int32("xplane.dcoc.id","ID") + +xplane.fields.dref_header = ProtoField.string("xplane.dref","Header") +xplane.fields.dref_value = ProtoField.float("xplane.dref.value","Value") +xplane.fields.dref_dataref = ProtoField.string("xplane.dref.dataref","DataRef") + +xplane.fields.dsel_header = ProtoField.string("xplane.dsel","Header") +xplane.fields.dsel_id = ProtoField.int32("xplane.dsel.id","ID") + +xplane.fields.fail_header = ProtoField.string("xplane.fail","Header") +xplane.fields.fail_id = ProtoField.string("xplane.fail.id","System ID") + +xplane.fields.flir_in_header = ProtoField.string("xplane.flir","Header") +xplane.fields.flir_in_framerate = ProtoField.string("xplane.flir.framerate","Frame Rate") + +xplane.fields.flir_out_header = ProtoField.string("xplane.flir", "Infra-red image data)") +xplane.fields.flir_out_height = ProtoField.int16("xp11in.flir.height","Height") +xplane.fields.flir_out_width = ProtoField.int16("xp11in.flir.width","Width") +xplane.fields.flir_out_frameindex = ProtoField.char("xp11in.flir.frameindex","Frame Index") +xplane.fields.flir_out_framecount = ProtoField.char("xp11in.flir.framecount","Frame Count") +xplane.fields.flir_out_imagedata = ProtoField.none("Xp11.flir.imagedata","Image Data (DXT1 Encoded)") + +xplane.fields.ise4_header = ProtoField.string("xplane.ise4","Header") +xplane.fields.ise4_machinetype = ProtoField.int32("xplane.ise4.machinetpye","Machine Type", base.DEC,VALS_ISEx_MachineType) +xplane.fields.ise4_address = ProtoField.string("xplane.ise4.address","IP Address") +xplane.fields.ise4_port = ProtoField.string("xplane.ise4.port","Port") +xplane.fields.ise4_useip = ProtoField.int32("xplane.ise4.useip","Enabled") + +xplane.fields.ise6_header = ProtoField.string("xplane.ise6","Header") +xplane.fields.ise6_machinetype = ProtoField.int32("xplane.ise6.machinetpye","Machine Type", base.DEC, VALS_ISEx_MachineType) +xplane.fields.ise6_address = ProtoField.string("xplane.ise6.address","IP Address") +xplane.fields.ise6_port = ProtoField.string("xplane.ise6.port","Port") +xplane.fields.ise6_useip = ProtoField.int32("xplane.ise6.useip","Enabled") + +xplane.fields.lsnd_header = ProtoField.string("xplane.lsnd","Header") +xplane.fields.lsnd_index = ProtoField.int32("xplane.lsnd.index","Index (0-4)") +xplane.fields.lsnd_speed = ProtoField.float("xplane.lsnd.speed","Relative Speed (0->1)") +xplane.fields.lsnd_volume = ProtoField.float("xplane.lsnd.volume","Relative Volume (0->1") +xplane.fields.lsnd_filename = ProtoField.string("xplane.lsnd.filename","Filename") + +xplane.fields.nfal_header = ProtoField.string("xplane.nfal","Header") +xplane.fields.nfal_navaidcode = ProtoField.string("xplane.nfal.navaidcode","Nav Aid Code") + +xplane.fields.nrec_header = ProtoField.string("xplane.nrec","Header") +xplane.fields.nrec_navaidcode = ProtoField.string("xplane.nrec.navaidcode","Nav Aid Code") + +xplane.fields.objl_header = ProtoField.string("xplane.objl","Header") +xplane.fields.objl_index = ProtoField.int32("xplane.objl.index","Index") +xplane.fields.objl_padding1 = ProtoField.bytes("xplane.objl.padding1","Padding 1") +xplane.fields.objl_latitude = ProtoField.double("xplane.objl.latitude","Latitude") +xplane.fields.objl_longitude = ProtoField.double("xplane.objl.longitude","Longitude") +xplane.fields.objl_elevation = ProtoField.double("xplane.objl.elevation","Elevation") +xplane.fields.objl_psi = ProtoField.float("xplane.objl.psi","True Heading") +xplane.fields.objl_theta = ProtoField.float("xplane.objl.theta","Pitch") +xplane.fields.objl_phi = ProtoField.float("xplane.objl.phi","Roll") +xplane.fields.objl_onground = ProtoField.int32("xplane.objl.onground","Is On Ground") +xplane.fields.objl_smokesize = ProtoField.float("xplane.objl.smokesize","Smoke Size") +xplane.fields.objl_padding2 = ProtoField.bytes("xplane.objl.padding2","Padding 2") + +xplane.fields.objn_header = ProtoField.string("xplane.objn","Header") +xplane.fields.objn_index = ProtoField.int32("xplane.objn.index","Index") +xplane.fields.objn_filename = ProtoField.string("xplane.objn.filename","Filename") + +xplane.fields.prel_header = ProtoField.string("xplane.prel","Header") +xplane.fields.prel_starttype = ProtoField.int32("xplane.prel.starttype","Start Type",base.DEC,VALS_StartType) +xplane.fields.prel_aircraftindex = ProtoField.int32("xplane.prel.aircraftindex","Aircraft Index") +xplane.fields.prel_ICAO = ProtoField.string("xplane.prel.ICAO","ICAO") +xplane.fields.prel_runwayindex = ProtoField.int32("xplane.prel.runwayindex","Runway Index") +xplane.fields.prel_runwaydirection = ProtoField.int32("xplane.prel.runwaydirection","Runway Direction") +xplane.fields.prel_latitude = ProtoField.double("xplane.prel.latitude","Latitude") +xplane.fields.prel_longitude = ProtoField.double("xplane.prel.longitude","Longitude") +xplane.fields.prel_elevation = ProtoField.double("xplane.prel.elevation","Elevation") +xplane.fields.prel_trueheading = ProtoField.double("xplane.prel.trueheading","True Heading") +xplane.fields.prel_speed = ProtoField.double("xplane.prel.speed","Speed") + +xplane.fields.quit_header = ProtoField.string("xplane.quit","Header") + +xplane.fields.radr_in_header = ProtoField.string("xplane.radr","Header") +xplane.fields.radr_in_pointcount = ProtoField.string("xplane.rpos.pointcount","Points Per Frame") + +xplane.fields.radr_out_header = ProtoField.string("xplane.radr", "Header") +xplane.fields.radr_out_longitude = ProtoField.float("xplane.radr.longitude", "Longitude") +xplane.fields.radr_out_latitude = ProtoField.float("xplane.radr.latitude", "Latitude") +xplane.fields.radr_out_precipitation = ProtoField.int8("xplane.radr.precipitation", "Precipitation") +xplane.fields.radr_out_height = ProtoField.float("xplane.radr.height", "Storm Top") + +xplane.fields.reco_header = ProtoField.string("xplane.reco","Header") +xplane.fields.reco_systemid = ProtoField.string("xplane.reco.systemid","System ID") + +xplane.fields.rese_header = ProtoField.string("xplane.rese","Header") + +xplane.fields.rpos_in_header = ProtoField.string("xplane.rpos","Header") +xplane.fields.rpos_in_frequency = ProtoField.string("xplane.rpos.frequency","Frequency") + +xplane.fields.rpos_out_header = ProtoField.string("xplane.rpos", "Header") +xplane.fields.rpos_out_longitude = ProtoField.double("xplane.rpos.longitude", "Longitude") +xplane.fields.rpos_out_latitude = ProtoField.double("xplane.rpos.latitude", "Latitude") +xplane.fields.rpos_out_elevation = ProtoField.double("xplane.rpos.elevation", "Altitude (metres above mean sea level)") +xplane.fields.rpos_out_height = ProtoField.float("xplane.rpos.height", "Height (metres above ground)") +xplane.fields.rpos_out_theta = ProtoField.float("xplane.rpos.theta", "Pitch (degrees)") +xplane.fields.rpos_out_psi = ProtoField.float("xplane.rpos.psi", "True Heading (degrees)") +xplane.fields.rpos_out_phi = ProtoField.float("xplane.rpos.phi", "Roll (degrees)") +xplane.fields.rpos_out_vx = ProtoField.float("xplane.rpos.vx", "Velocity (east)") +xplane.fields.rpos_out_vy = ProtoField.float("xplane.rpos.vy", "Velocity (vertical)") +xplane.fields.rpos_out_vz = ProtoField.float("xplane.rpos.vz", "Velocity (south)") +xplane.fields.rpos_out_rollrate = ProtoField.float("xplane.rpos.rollrate", "Roll Rate") +xplane.fields.rpos_out_pitchrate = ProtoField.float("xplane.rpos.pitchrate", "Pitch Rate") +xplane.fields.rpos_out_yawrate = ProtoField.float("xplane.rpos.yawrate", "Yaw Rate") + +xplane.fields.rref_in_header = ProtoField.string("xplane.rref","Header") +xplane.fields.rref_in_frequency = ProtoField.int32("xplane.rref.value", "Value") +xplane.fields.rref_in_id = ProtoField.int32("xplane.rref.id", "RREF ID") +xplane.fields.rref_in_dataref = ProtoField.string("xplane.rref.dataref","DataRef") + +xplane.fields.rref_out_header = ProtoField.string("xplane.rref", "Header") +xplane.fields.rref_out_id = ProtoField.int32("xplane.rref.id", "RREF ID") +xplane.fields.rref_out_value = ProtoField.float("xplane.rref.value", "Value") + +xplane.fields.shut_header = ProtoField.string("xplane.shut","Header") + +xplane.fields.simo_header = ProtoField.string("xplane.simo","Header") +xplane.fields.simo_action = ProtoField.int32("xplane.simo.action","ActionID", base.DEC, VALS_Situation) +xplane.fields.simo_filename = ProtoField.string("xplane.simo.filename","Filename") + +xplane.fields.soun_header = ProtoField.string("xplane.soun","Header") +xplane.fields.soun_speed = ProtoField.float("xplane.soun.speed","Relative Speed (0->1)") +xplane.fields.soun_volume = ProtoField.float("xplane.soun.volume","Relative Volume (0->1)") +xplane.fields.soun_filename = ProtoField.string("xplane.soun.filename","Filename") + +xplane.fields.ssnd_header = ProtoField.string("xplane.ssnd","Header") +xplane.fields.ssnd_index = ProtoField.int32("xplane.ssnd.index","Index (0-4)") +xplane.fields.ssnd_speed = ProtoField.float("xplane.ssnd.speed","Relative Speed (0->1)") +xplane.fields.ssnd_volume = ProtoField.float("xplane.ssnd.volume","Relative Volume (0->1") +xplane.fields.ssnd_filename = ProtoField.string("xplane.ssnd.filename","Filename") + +xplane.fields.ucoc_header = ProtoField.string("xplane.ucoc","Header") +xplane.fields.ucoc_id = ProtoField.int32("xplane.ucoc.id","ID") + +xplane.fields.usel_header = ProtoField.string("xplane.usel","Header") +xplane.fields.usel_id = ProtoField.int32("xplane.usel.id","ID") + +xplane.fields.vehx_header = ProtoField.string("xplane.vehx","Header") +xplane.fields.vehx_id = ProtoField.int32("xplane.vehx.id","ID") +xplane.fields.vehx_latitude = ProtoField.double("xplane.vehx.latitude","Latitude") +xplane.fields.vehx_longitude = ProtoField.double("xplane.vehx.longitude","Longitude") +xplane.fields.vehx_elevation = ProtoField.double("xplane.vehx.elevation","Elevation") +xplane.fields.vehx_heading = ProtoField.float("xplane.vehx.heading","Heading") +xplane.fields.vehx_pitch = ProtoField.float("xplane.vehx.pitch","Pitch") +xplane.fields.vehx_roll = ProtoField.float("xplane.vehx.roll","Roll") + +local function dissectACFN(buffer, pinfo, tree) + + pinfo.cols.info = "ACFN - Set Aircraft" + local tvb_content = buffer(5) + tree:add(xplane.fields.acfn_header, buffer(0,4)) + tree:add_le(xplane.fields.acfn_index, tvb_content(0,4)) + tree:add_le(xplane.fields.acfn_path, tvb_content(4,150)) + tree:add_le(xplane.fields.acfn_livery, tvb_content(156,4)) + + return true +end + +local function dissectACPR(buffer, pinfo, tree) + + pinfo.cols.info = "ACPR - Load and Position Aircraft" + local tvb_content = buffer(5) + tree:add(xplane.fields.acpr_header, buffer(0,4)) + tree:add_le(xplane.fields.acpr_index,tvb_content(0,4)) + tree:add_le(xplane.fields.acpr_path,tvb_content(4,150)) + tree:add_le(xplane.fields.acpr_livery, tvb_content(156,4)) + tree:add_le(xplane.fields.acpr_starttype,tvb_content(160,4)) + tree:add_le(xplane.fields.acpr_aircraftindex,tvb_content(164,4)) + tree:add_le(xplane.fields.acpr_ICAO,tvb_content(168,8)) + tree:add_le(xplane.fields.acpr_runwayindex,tvb_content(176,4)) + tree:add_le(xplane.fields.acpr_runwaydirection ,tvb_content(180,4)) + tree:add_le(xplane.fields.acpr_latitude ,tvb_content(184,8)) + tree:add_le(xplane.fields.acpr_longitude ,tvb_content(192,8)) + tree:add_le(xplane.fields.acpr_elevation ,tvb_content(200,8)) + tree:add_le(xplane.fields.acpr_trueheading ,tvb_content(208,8)) + tree:add_le(xplane.fields.acpr_speed ,tvb_content(216,8)) + + return true +end + +local function dissectALRT(buffer, pinfo, tree) + + pinfo.cols.info = "ALRT - Display Alert" + local tvb_content = buffer(5) + tree:add(xplane.fields.alrt_header, buffer(0,4)) + tree:add(xplane.fields.alrt_line1,tvb_content(0,240)) + tree:add(xplane.fields.alrt_line1,tvb_content(240,240)) + tree:add(xplane.fields.alrt_line1,tvb_content(480,240)) + tree:add(xplane.fields.alrt_line1,tvb_content(720,240)) + + return true +end + +local function dissectBECN(buffer, pinfo, tree) + + pinfo.cols.info = "BECN - Beacon Packet" + local tvb_content = buffer(5) + local major = tvb_content(0,1):le_int() + local minor = tvb_content(1,1):le_int() + tree:add(xplane.fields.becn_header, buffer(0,5)) + tree:add_le(xplane.fields.becn_major,tvb_content(0,1)) + tree:add_le(xplane.fields.becn_minor , tvb_content(1,1)) + tree:add_le(xplane.fields.becn_appid ,tvb_content(2,4)) + tree:add_le(xplane.fields.becn_version ,tvb_content(6,4)) + tree:add_le(xplane.fields.becn_role ,tvb_content(10,4)) + tree:add_le(xplane.fields.becn_port ,tvb_content(14,2)) + tree:add_le(xplane.fields.becn_name ,tvb_content(16,tvb_content:len()-16)) + if (major == 1 and minor == 2) then + tree:add_le(xplane.fields.becn_newport ,tvb_content(tvb_content:len()-2,2)) + end + + return true +end + +local function dissectCMND(buffer, pinfo, tree) + pinfo.cols.info = "CMND - Execute Command" + local tvb_content = buffer(5) + tree:add(xplane.fields.cmnd_header, buffer(0,4)) + tree:add(xplane.fields.cmnd_command, tvb_content) + + return true +end + +local function dissectDATA(buffer, pinfo, tree) + pinfo.cols.info = "DATA - Send/Receive Data struct(s)" + local tvb_content = buffer(5) + local count = tvb_content:len() / 36 + tree:add(xplane.fields.data_header, buffer(0,4)):append_text(" .. Count = " .. count) + for i=0, count-1, 1 do + local index = tvb_content(i*36,4):le_uint() + local desc = xplane_DataIdLookup[index][0] + if desc == nil then + desc = "Unknown - " .. index + end + local branch = tree:add(tvb_content(i*36,36), "Index: " .. index .. " " .. desc) + branch:add_le(xplane.fields.data_index,tvb_content(i*36,4)):append_text(" " .. desc) + for j=1,8,1 do + local offset = (i*36) + j*4 + branch:add_le(tvb_content(offset,4), "[" .. j .. "]: " .. tvb_content(offset, 4):le_float() .. " " .. xplane_DataIdLookup[index][j]) + end + end + + return true +end + +local function dissectDCOC(buffer, pinfo, tree) + + pinfo.cols.info = "DCOC - Enable Cockpit Data Output" + local tvb_content = buffer(5) + local count = tvb_content:len() / 4 + tree:add(xplane.fields.dcoc_header, buffer(0,4)):append_text(" Count = " .. count) + for i=0,count-1, 1 do + tree:add_le(xplane.fields.dcoc_id,tvb_content(i*4,4)) + end + + return true +end + +local function dissectDREF(buffer, pinfo, tree) + pinfo.cols.info = "DREF - Send/Receive Dataref" + local tvb_content = buffer(5) + tree:add(xplane.fields.dref_header, buffer(0,4)) + tree:add_le(xplane.fields.dref_value,tvb_content(0,4)) + tree:add_le(xplane.fields.dref_dataref, tvb_content(4)) + + return true +end + +local function dissectDSEL(buffer, pinfo, tree) + pinfo.cols.info = "DSEL - Disable UDP Data Output" + local tvb_content = buffer(5) + local count = tvb_content:len() / 4 + tree:add(xplane.fields.dsel_header, buffer(0,4)):append_text(" Count = " .. count) + for i=0,count-1, 1 do + tree:add_le(xplane.fields.dsel_id,tvb_content(i*4,4)) + end + + return true +end + +local function dissectFAIL(buffer, pinfo, tree) + pinfo.cols.info = "FAIL - Fail a system" + local tvb_content = buffer(5) + tree:add(xplane.fields.fail_header, buffer(0,4)) + tree:add(xplane.fields.fail_id, tvb_content) + + return true +end + +local function dissectFLIR_IN(buffer, pinfo, tree) + pinfo.cols.info = "FLIR - Infra-Red image (IN)" + local tvb_content = buffer(5) + tree:add(xplane.fields.flir_header, buffer(0,4)) + tree:add_le(xplane.fields.flir_framerate, tvb_content) + + return true +end + +local function dissectFLIR_OUT(buffer, pinfo, tree) + pinfo.cols.info = "FLIR - Infra-Red image (OUT)" + local tvb_content = buffer(5) + tree:add(xplane.fields.flir_header, buffer(0,4)):append_text(" Obsolete in 11.50 onwards") + tree:add_le(xplane.fields.flir_height,tvb_content(0,2)) + tree:add_le(xplane.fields.flir_width,tvb_content(2,2)) + tree:add_le(xplane.fields.flir_frameindex,tvb_content(4,1)) + tree:add_le(xplane.fields.flir_framecount,tvb_content(5,1)) + --tree:add_le(xplane.fields.flir_imagedata,buffer(6) + return true +end + +local function dissectFLIR(buffer, pinfo, tree) + if buffer:len() < 20 then + return dissectFLIR_IN(buffer,pinfo,tree) + else + return dissectFLIR_OUT(buffer,pinfo,tree) + end +end + +local function dissectISE4(buffer, pinfo, tree) + pinfo.cols.info = "ISE4 - Network setup (ip4)" + local tvb_content = buffer(5) + tree:add(xplane.fields.ise4_header, buffer(0,4)) + tree:add_le(xplane.fields.ise4_machinetype,tvb_content(0,4)) + tree:add_le(xplane.fields.ise4_address, tvb_content(4,16)) + tree:add_le(xplane.fields.ise4_port, tvb_content(20,8)) + tree:add_le(xplane.fields.ise4_useip, tvb_content(28,4)) + + return true +end + +local function dissectISE6(buffer, pinfo, tree) + pinfo.cols.info = "ISE6 - Network setup (ip6)" + local tvb_content = buffer(5) + tree:add(xplane.fields.ise6_header, buffer(0,4)) + tree:add_le(xplane.fields.ise6_machinetype,tvb_content(0,4)) + tree:add_le(xplane.fields.ise6_address, tvb_content(4,65)) + tree:add_le(xplane.fields.ise6_port, tvb_content(69,6)) + tree:add_le(xplane.fields.ise6_useip, tvb_content(76,4)) + + return true +end + +local function dissectLSND(buffer, pinfo, tree) + pinfo.cols.info = "LSND - Start looping a sound" + local tvb_content = buffer(5) + tree:add(xplane.fields.lsnd_header, buffer(0,4)) + tree:add_le(xplane.fields.lsnd_index,tvb_content(0,4)) + tree:add_le(xplane.fields.lsnd_speed, tvb_content(4,4)) + tree:add_le(xplane.fields.lsnd_volume, tvb_content(8,4)) + tree:add(xplane.fields.lsnd_filename, tvb_content(12)) + + return true +end + +local function dissectNFAL(buffer, pinfo, tree) + pinfo.cols.info = "NFAL - Fail a navaid" + local tvb_content = buffer(5) + tree:add(xplane.fields.nfal_header, buffer(0,4)) + tree:add(xplane.fields.nfal_navaidcode, tvb_content) + + return true +end + +local function dissectNREC(buffer, pinfo, tree) + pinfo.cols.info = "NREC - Recover a navaid" + local tvb_content = buffer(5) + tree:add(xplane.fields.nrec_header, buffer(0,4)) + tree:add(xplane.fields.nrec_navaidcode, tvb_content) + return true +end + +local function dissectOBJL(buffer, pinfo, tree) + pinfo.cols.info = "OBJL - Position an object" + local tvb_content = buffer(5) + tree:add(xplane.fields.objl_header, buffer(0,4)) + tree:add_le(xplane.fields.objl_index ,tvb_content(0,4 )) + tree:add_le(xplane.fields.objl_padding1 ,tvb_content(4,4 )) + tree:add_le(xplane.fields.objl_latitude ,tvb_content(8,8 )) + tree:add_le(xplane.fields.objl_longitude ,tvb_content(16,8)) + tree:add_le(xplane.fields.objl_elevation ,tvb_content(24,8)) + tree:add_le(xplane.fields.objl_psi ,tvb_content(32,4)) + tree:add_le(xplane.fields.objl_theta ,tvb_content(36,4)) + tree:add_le(xplane.fields.objl_phi ,tvb_content(40,4)) + tree:add_le(xplane.fields.objl_onground ,tvb_content(44,4)) + tree:add_le(xplane.fields.objl_smokesize ,tvb_content(48,4)) + tree:add_le(xplane.fields.objl_padding2 ,tvb_content(52,4)) + + return true +end + +local function dissectOBJN(buffer, pinfo, tree) + pinfo.cols.info = "OBJN - Load an object" + local tvb_content = buffer(5) + tree:add(xplane.fields.objn_header, buffer(0,4)) + tree:add_le(xplane.fields.objn_index ,tvb_content(0,4)) + tree:add(xplane.fields.objn_filename,tvb_content(4)) + + return true +end + +local function dissectPREL(buffer, pinfo, tree) + pinfo.cols.info = "PREL - Position Aircraft)" + local tvb_content = buffer(5) + tree:add(xplane.fields.prel_header, buffer(0,4)) + tree:add_le(xplane.fields.prel_starttype,tvb_content(0,4)) + tree:add_le(xplane.fields.prel_aircraftindex,tvb_content(4,4)) + tree:add_le(xplane.fields.prel_ICAO,tvb_content(8,8)) + tree:add_le(xplane.fields.prel_runwayindex,tvb_content(16,4)) + tree:add_le(xplane.fields.prel_runwaydirection ,tvb_content(20,4)) + tree:add_le(xplane.fields.prel_latitude ,tvb_content(24,8)) + tree:add_le(xplane.fields.prel_longitude ,tvb_content(32,8)) + tree:add_le(xplane.fields.prel_elevation ,tvb_content(40,8)) + tree:add_le(xplane.fields.prel_trueheading ,tvb_content(48,8)) + tree:add_le(xplane.fields.prel_speed ,tvb_content(56,8)) + + return true +end + +local function dissectQUIT(buffer, pinfo, tree) + pinfo.cols.info = "QUIT - Quit X-Plane" + tree:add(xplane.fields.quit_header, buffer(0,4)) + + return true +end + +local function dissectRADR_IN(buffer, pinfo, tree) + pinfo.cols.info = "RADR - Weather Radar (IN)" + local tvb_content = buffer(5) + tree:add(xplane.fields.radr_in_header, buffer(0,4)) + tree:add(xplane.fields.radr_in_pointcount, tvb_content) + + return true +end + +local function dissectRADR_OUT(buffer, pinfo, tree) + pinfo.cols.info = "RADR - Weather Radar (OUT)" + local tvb_content = buffer(5) + local count = tvb_content:len() / 13 + tree:add(xplane.fields.radr_out_header, buffer(0,4)):append_text(" Count = " .. count) + for i = 0, count - 1, 1 do + local branch = tree:add(tvb_content(i * 13,13),"Radr " .. i) + branch:add_le(xplane.fields.radr_out_longitude, tvb_content(i * 13,4)) + branch:add_le(xplane.fields.radr_out_latitude, tvb_content((i * 13) + 4,4)) + branch:add(xplane.fields.radr_out_precipitation, tvb_content((i * 13) + 8,1)) + branch:add_le(xplane.fields.radr_out_height, tvb_content((i * 13) + 9,4)) + end + return true +end + +local function dissectRADR(buffer, pinfo, tree) + if buffer:len() < 12 then + return dissectRADR_IN(buffer,pinfo,tree) + else + return dissectRADR_OUT(buffer,pinfo,tree) + end +end + +local function dissectRECO(buffer, pinfo, tree) + pinfo.cols.info = "RECO - Recover a plane system" + local tvb_content = buffer(5) + tree:add(xplane.fields.reco_header, buffer(0,4)) + tree:add(xplane.fields.reco_systemid, tvb_content) + + return true +end + +local function dissectRESE(buffer, pinfo, tree) + pinfo.cols.info = "RESE - Reset all failed systems" + tree:add(xplane.fields.rese_header, buffer(0,4)) + + return true +end + +local function dissectRPOS_IN(buffer, pinfo, tree) + pinfo.cols.info = "RPOS - Request Positional Data" + local tvb_content = buffer(5) + tree:add(xplane.fields.rpos_in_header, buffer(0,4)) + tree:add(xplane.fields.rpos_in_frequency, tvb_content) + + return true +end + +local function dissectRPOS_OUT(buffer, pinfo, tree) + pinfo.cols.info = "RPOS - Positional Data)" + local tvb_content = buffer(5) + tree:add(xplane.fields.rpos_out_header, buffer(0,4)) + tree:add_le(xplane.fields.rpos_out_longitude, tvb_content(0, 8)) + tree:add_le(xplane.fields.rpos_out_latitude, tvb_content(8, 8)) + tree:add_le(xplane.fields.rpos_out_elevation, tvb_content(16, 8)) + tree:add_le(xplane.fields.rpos_out_height, tvb_content(24, 4)) + tree:add_le(xplane.fields.rpos_out_theta, tvb_content(28, 4)) + tree:add_le(xplane.fields.rpos_out_psi, tvb_content(32, 4)) + tree:add_le(xplane.fields.rpos_out_phi, tvb_content(36, 4)) + tree:add_le(xplane.fields.rpos_out_vx, tvb_content(40, 4)) + tree:add_le(xplane.fields.rpos_out_vy, tvb_content(44, 4)) + tree:add_le(xplane.fields.rpos_out_vz, tvb_content(48, 4)) + tree:add_le(xplane.fields.rpos_out_rollrate, tvb_content(52, 4)) + tree:add_le(xplane.fields.rpos_out_pitchrate, tvb_content(56, 4)) + tree:add_le(xplane.fields.rpos_out_yawrate, tvb_content(60, 4)) + + return true +end + +local function dissectRPOS(buffer, pinfo, tree) + if buffer:len() == 69 then + return dissectRPOS_OUT(buffer,pinfo,tree) + else + return dissectRPOS_IN(buffer,pinfo,tree) + end +end + +local function dissectRREF_IN(buffer, pinfo, tree) + pinfo.cols.info = "RREF - Request Dataref" + local tvb_content = buffer(5) + tree:add(xplane.fields.rref_in_header, buffer(0,4)) + tree:add_le(xplane.fields.rref_in_frequency, tvb_content(0, 4)) + tree:add_le(xplane.fields.rref_in_id, tvb_content(4, 4)) + tree:add_le(xplane.fields.rref_in_dataref, tvb_content(8, 400)) + + return true +end + +local function dissectRREF_OUT(buffer, pinfo, tree) + pinfo.cols.info = "RREF - Dataref Array" + local tvb_content = buffer(5) + local count = tvb_content:len() / 8 + tree:add(xplane.fields.rref_out_header, buffer(0,4)):append_text(" Count = " .. count) + for i = 0, count - 1, 1 do + local branch = tree:add(tvb_content(i*8,8), "RREF [" .. i .. "]") + branch:add_le(xplane.fields.rref_out_id, tvb_content(i*8, 4)) + branch:add_le(xplane.fields.rref_out_value, tvb_content((i*8) + 4, 4)) + end + + return true +end + +local function dissectRREF(buffer, pinfo, tree) + if buffer:len() == 413 then + return dissectRREF_IN(buffer, pinfo, tree) + else + return dissectRREF_OUT(buffer, pinfo, tree) + end +end + +local function dissectSHUT(buffer, pinfo, tree) + pinfo.cols.info = "SHUT - Shutdown the computer" + local tvb_content = buffer(5) + tree:add(xplane.fields.shut_header, buffer(0,4)) + + return true +end + +local function dissectSIMO(buffer, pinfo, tree) + pinfo.cols.info = "SIMO - Load/Save a Movie/Situation" + local tvb_content = buffer(5) + tree:add(xplane.fields.simo_header, buffer(0,4)) + tree:add_le(xplane.fields.simo_action, tvb_content(0, 4)) + tree:add(xplane.fields.simo_filename, tvb_content(4)) + + return true +end + +local function dissectSOUN(buffer, pinfo, tree) + pinfo.cols.info = "SOUN - Play a Sound Once" + local tvb_content = buffer(5) + tree:add(xplane.fields.soun_header, buffer(0,4)) + tree:add_le(xplane.fields.soun_speed, tvb_content(0,4)) + tree:add_le(xplane.fields.soun_volume, tvb_content(4,4)) + tree:add(xplane.fields.soun_filename, tvb_content(8)) + + return true +end + +local function dissectSSND(buffer, pinfo, tree) + pinfo.cols.info = "SSND - Stop looping a sound" + local tvb_content = buffer(5) + tree:add(xplane.fields.ssnd_header, buffer(0,4)) + tree:add_le(xplane.fields.ssnd_index,tvb_content(0,4)) + tree:add_le(xplane.fields.ssnd_speed, tvb_content(4,4)) + tree:add_le(xplane.fields.ssnd_volume, tvb_content(8,4)) + tree:add(xplane.fields.ssnd_filename, tvb_content(12)) + + return true +end + +local function dissectUCOC(buffer, pinfo, tree) + pinfo.cols.info = "UCOC - Disable Cockpit Output" + local tvb_content = buffer(5) + local count = tvb_content:len() / 4 + tree:add(xplane.fields.ucoc_header, buffer(0,4)):append_text(" Count = " .. count) + for i=0,count-1, 1 do + tree:add_le(xplane.fields.ucoc_id,tvb_content(i*4,4)) + end + + return true +end + +local function dissectUSEL(buffer, pinfo, tree) + pinfo.cols.info = "USEL - Disable Network data row" + local tvb_content = buffer(5) + local count = tvb_content:len() / 4 + tree:add(xplane.fields.usel_header, buffer(0,4)):append_text(" Count = " .. count) + for i=0,count-1, 1 do + tree:add_le(xplane.fields.usel_id,tvb_content(i*4,4)) + end + + return true +end + +local function dissectVEHX(buffer, pinfo, tree) + pinfo.cols.info = "VEHX - Position Aircraft)" + local tvb_content = buffer(5) + tree:add(xplane.fields.vehx_header, buffer(0,4)) + tree:add_le(xplane.fields.vehx_id,tvb_content(0,4)) + tree:add_le(xplane.fields.vehx_latitude ,tvb_content(4,8)) + tree:add_le(xplane.fields.vehx_longitude ,tvb_content(12,8)) + tree:add_le(xplane.fields.vehx_elevation ,tvb_content(20,8)) + tree:add_le(xplane.fields.vehx_heading ,tvb_content(28,4)) + tree:add_le(xplane.fields.vehx_pitch ,tvb_content(32,4)) + tree:add_le(xplane.fields.vehx_roll ,tvb_content(36,4)) + + return true +end + +local subdissectors = { + ACFN = dissectACFN, -- Checked - Note: Picks up the ACFN packet sent to LR ControlPad App on port 48003 + ACPR = dissectACPR, -- Checked + ALRT = dissectALRT, -- Checked + BECN = dissectBECN, -- Checked + CMND = dissectCMND, -- Checked + DATA = dissectDATA, -- Checked (Both Ways) + DCOC = dissectDCOC, -- Checked + DREF = dissectDREF, -- Checked (Both Ways) + DSEL = dissectDSEL, -- Checked + FAIL = dissectFAIL, -- Checked + FLIR = dissectFLIR, -- Checked (Both ways) - Note: Obsolete as of 11.50. FLIR last worked in 11.41 + ISE4 = dissectISE4, -- Checked + ISE6 = dissectISE6, -- Not Checked + LSND = dissectLSND, -- Displays packet as expected but doesn't loop any audio - bug submitted - Ben replied no plan to fix in 11.50. + NFAL = dissectNFAL, -- Checked + NREC = dissectNREC, -- Checked + OBJL = dissectOBJL, -- Checked + OBJN = dissectOBJN, -- Checked + PREL = dissectPREL, -- Checked + QUIT = dissectQUIT, -- Checked + RADR = dissectRADR, -- Checked (Both Ways) + RECO = dissectRECO, -- Checked + RESE = dissectRESE, -- Checked + RPOS = dissectRPOS, -- Checked (Both Ways) + RREF = dissectRREF, -- Checked (Both Ways) + SHUT = dissectSHUT, -- Checked (Note: doesn't show up in wireshark live as shutdown is in progress before Wireshark has time to show it :p) + SIMO = dissectSIMO, -- Checked + SOUN = dissectSOUN, -- Checked + SSND = dissectSSND, -- Displays Packet as expected but no way to check if the audio stops looping as LSND doesn't work. + UCOC = dissectUCOC, -- Checked + USEL = dissectUSEL, -- Checked + VEHX = dissectVEHX, -- Checked +} + +local function ValidatePacket(buffer, pinfo) + + local header = buffer(0, 4):string() + if subdissectors[header] == nil then + return false + end + if header == "ACFN" and (buffer:len() ~= 165 or pinfo.dst_port == xplane.prefs.controlpad_port) then + return false + end + if header == "ACPR" and buffer:len() ~= 229 then + return false + end + if header == "ALRT" and buffer:len() ~= 965 then + return false + end + if header == "BECN" and pinfo.dst_port ~= xplane.prefs.becn_port then + return false + end + if header == "DATA" and ((buffer:len() - 5) % 36 ~=0) then + return false + end + if (header == "DCOC" or header == "DSEL" or header == "UCOC" or header == "USEL") and ((buffer:len()-5) % 4 ~= 0) then + return false + end + if header == "DREF" and buffer:len() ~= 509 then + return false + end + + return true +end + +function xplane.dissector(buffer, pinfo, tree) + + if buffer:len() < 5 then + return false + end + + if ValidatePacket(buffer, pinfo) == false then + return false + end + + local header = buffer(0, 4):string() + pinfo.cols.protocol = "xplane." .. header:lower() + local subtree = tree:add(xplane, buffer(), "X-Plane (" .. header .. ") Packet Length " .. buffer:len()) + return subdissectors[header](buffer, pinfo, subtree) +end + +xplane:register_heuristic("udp", xplane.dissector) + +-- ut = DissectorTable.get("udp.port") +-- ut:add(49000, xplane); -- Default value - must match X-Plane->Settings->Network->UDP Ports->Port we receive on (legacy) + +-- ut = DissectorTable.get("udp.port") +-- ut:add(49001, xplane); -- Default value - must match X-Plane->Settings->Network->UDP Ports->Port we send from (legacy) +-- ut:add(49002, xplane); -- FLIR is emitted from 49002 +-- ut:add(49707, xplane); -- BECN is multicast to 239.255.1.1:49707 \ No newline at end of file diff --git a/dissectors/xplane11-sectoidman/LICENSE b/dissectors/xplane11-sectoidman/LICENSE new file mode 100644 index 0000000..23cb790 --- /dev/null +++ b/dissectors/xplane11-sectoidman/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. + + {description} + Copyright (C) {year} {fullname} + + 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. + +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) year 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. + + {signature of Ty Coon}, 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 Lesser General +Public License instead of this License. diff --git a/dissectors/xplane11-sectoidman/README.md b/dissectors/xplane11-sectoidman/README.md new file mode 100644 index 0000000..ee2e9ff --- /dev/null +++ b/dissectors/xplane11-sectoidman/README.md @@ -0,0 +1,75 @@ +# X-Plane 11 — paquets UDP « DATA » (sectoidman) + +Dissecteur Wireshark Lua des paquets UDP « DATA » du simulateur de vol +X-Plane 11. Ces paquets transportent, par blocs de 36 octets, les +groupes de données choisis dans le simulateur (vitesse, attitude, +position, moteurs…). Chaque bloc contient un numéro de groupe et huit +valeurs flottantes ; le script donne au numéro le nom du groupe (136 +noms, de « Frame Rate » à « Motion platform stats ») (issue #774). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/sectoidman/literate-spork (`x-plane.lua`) | +| Commit importé | `7dcfd7daa7da4fb44c5b630e040dba9f2e386a7b` du 11/08/2017 (dernier commit de la branche par défaut) ; dernière modification du script : commit `fcd39c19d46d09d7d1ca7a428e088f3b17202019` du 11/08/2017 | +| Licence amont | GPLv2 (fichier `LICENSE` du dépôt, sans clause « or later » ; le script ne porte aucune mention de licence). Déclarée `GPL-2.0-only`, comme pour `dissectors/avionique` et `dissectors/gdl90-kyser` | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur X-Plane dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). + +Autres dissecteurs X-Plane de ce dépôt : `dissectors/xplane11-wegylexy/` +(#534, port 49001, paquets BECN, RPOS, RADR, RREF…) et +`dissectors/xplane-avacee/` (#535, heuristique, nombreux types de +paquets). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/x-plane.lua` | Protocole `x-plane` (« X-Plane UDP Data Protocol », ligne 6), table des 136 noms de groupes (lignes 8 à 145), dissecteur ligne 154 ; inscrit sur le port UDP 49000 (ligne 192) | + +## Utilisation + +Copier `src/x-plane.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis recharger +avec Ctrl+Maj+L. Les paquets sont reconnus sur le port UDP 49000 ; pour +le port de sortie réglé dans X-Plane (« Settings › Data Output »), +utiliser « Décoder comme » › X-PLANE. Le filtre `x-plane` sélectionne +les paquets ; le script ne déclare aucun champ filtrable. + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. Le +dépôt amont ne contient aucune capture. Essais sur une capture +synthétique (« DATA », octet interne, blocs de 36 octets en +petit-boutiste, valeurs inutilisées à -999), non commitée : + +| Essai | Résultat | +|---|---| +| DATA avec les groupes 3, 17 et 20 | « Airspeed » (120.5, 121.0, 118.25, 140.0), « Attitude » (2.5, -1.25, 270.0), « Global Position » (48.815601348877, 7.790500164032, 1500.0) ; valeurs -999 masquées | +| Groupe inconnu (200) | « Unknown - 200 » | +| Paquet `RREF` | type, octet interne et longueur seulement | +| DATA dont la longueur n'est pas 5 + n × 36 | blocs complets décodés, puis **erreur Lua** ligne 177 (`Range is out of bounds`) | +| Paquet de 2 octets | **erreur Lua** ligne 157 | +| Chargé avec `xplane11-wegylexy` et `xplane-avacee` | le port 49000 revient à ce script (colonne « X-PLANE ») | + +## Limites constatées + +- Seuls les paquets « DATA » sont détaillés (ligne 164) ; les autres + types (RREF, DREF, BECN…) n'affichent que leur en-tête. +- Le script n'ajoute que du texte (lignes 157 à 185) : aucun champ + `ProtoField`, donc aucun filtre sur une valeur. Les huit valeurs d'un + bloc s'appellent toutes « Data », sans unité ni nom. +- Pas de contrôle de longueur : erreur Lua sur un paquet court ou un + bloc incomplet. +- « Length » donne la longueur totale du paquet, mais la ligne couvre + les octets à partir du sixième (ligne 160). +- Fautes de frappe dans les noms : « GPS tatus » (ligne 112), « Marker + staus » (ligne 114). `xplane_proto` et `udp_table` sont des variables + globales. +- Seul le port 49000 est inscrit, sans préférence ni heuristique. diff --git a/dissectors/xplane11-sectoidman/src/x-plane.lua b/dissectors/xplane11-sectoidman/src/x-plane.lua new file mode 100644 index 0000000..e836032 --- /dev/null +++ b/dissectors/xplane11-sectoidman/src/x-plane.lua @@ -0,0 +1,192 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/sectoidman/literate-spork (x-plane.lua), +-- commit 7dcfd7daa7da4fb44c5b630e040dba9f2e386a7b du 11/08/2017 (dernière modification du fichier : +-- commit fcd39c19d46d09d7d1ca7a428e088f3b17202019 du 11/08/2017). +-- Licence amont : GPL-2.0, LICENSE du dépôt — voir README.md et LICENSE. +xplane_proto = Proto("x-plane","X-Plane UDP Data Protocol") + +local vs_index_num = { + [0] = "Frame Rate", + [1] = "Times", + [2] = "Sim Stats", + [3] = "Airspeed", + [4] = "G loads", + [5] = "Weather", + [6] = "Aircraft atmosphere", + [7] = "System pressures", + [8] = "Joystick aileron/elevator/rudder", + [9] = "Other flight controls", + [10] = "Artificial Stability", + [11] = "Flight controls aileron/elevator/rudder", + [12] = "Wing sweep and thrust vectoring", + [13] = "Trim, flap, slats and speedbrakes", + [14] = "Gear and Brakes", + [15] = "Angular Moments", + [16] = "Angular Velocities", + [17] = "Attitude", + [18] = "AOA", + [19] = "Compass", + [20] = "Global Position", + [21] = "Sim Position", + [22] = "All planes latitude", + [23] = "All planes longitude", + [24] = "All planes altitude", + [25] = "Throttle command", + [26] = "Throttle actual", + [27] = "Engine feather, normal, beta and reverse", + [28] = "Prop setting", + [29] = "Mixture setting", + [30] = "Carb heat", + [31] = "Cowl flaps", + [32] = "Magnetos", + [33] = "Starter timeout", + [34] = "Engine power", + [35] = "Engine thrust", + [36] = "Engine torque", + [37] = "Engine RPM", + [38] = "Propeller RPM", + [39] = "Propeller Pitch", + [40] = "Engine Wash", + [41] = "N1", + [42] = "N2", + [43] = "Manifold pressure", + [44] = "EPR", + [45] = "Fuel Flow", + [46] = "ITT", + [47] = "EGT", + [48] = "CHT", + [49] = "Oil pressure", + [50] = "Oil temperature", + [51] = "Fuel pressure", + [52] = "Generator amps", + [53] = "Battery amps", + [54] = "Battery volts", + [55] = "Electric fuel pump on/off", + [56] = "Idle speed low/high", + [57] = "Battery on/off", + [58] = "Generator on/off", + [59] = "Inverter on/off", + [60] = "FADEC on/off", + [61] = "Igniter on/off", + [62] = "Fuel weights", + [63] = "Payload weights and CoG", + [64] = "Aerodynamic force", + [65] = "Engine force", + [66] = "Landing gear vertical force", + [67] = "Landing gear deployment", + [68] = "Lift over drag and coefficients", + [69] = "Prop efficiency", + [70] = "Aileron deflections 1", + [71] = "Aileron deflections 2", + [72] = "Roll spoiler deflections 1", + [73] = "Roll spoiler deflections 2", + [74] = "Elevator deflections", + [75] = "Rudder deflections", + [76] = "Yaw and brake deflections", + [77] = "Control forces", + [78] = "Total vertical thrust vectors", + [79] = "Total lateral thrust vectors", + [80] = "Pitch cyclic disc tilts", + [81] = "Roll cyclic disc tilts", + [82] = "Pitch cyclic flapping", + [83] = "Roll cyclic flapping", + [84] = "Wing ground effect lift", + [85] = "Wing ground effect drag", + [86] = "Wing ground effect wash", + [87] = "Stabilizer ground effect lift", + [88] = "Stabilizer ground effect drag", + [89] = "Stabilizer ground effect wash", + [90] = "Propeller ground effect lift", + [91] = "Propeller ground effect drag", + [92] = "Wing lift", + [93] = "Wing drag", + [94] = "Stabilizer lift", + [95] = "Stabilizer drag", + [96] = "COM1 and COM2 radio freqs", + [97] = "NAV1 and NAV2 radio freqs", + [98] = "NAV1 and NAV2 OBS", + [99] = "NAV1 deflection", + [100] = "NAV2 deflection", + [101] = "ADF1 and ADF2 statuses", + [102] = "DME status", + [103] = "GPS tatus", + [104] = "Xpdr status", + [105] = "Marker staus", + [106] = "Electrical switches", + [107] = "EFIS switches", + [108] = "AP, FD, HUD switches", + [109] = "Anti-ice switches", + [110] = "Anti-ice and fuel switches", + [111] = "Clutch and artificial stability switches", + [112] = "Misc switches", + [113] = "Gen. Annunciations 1", + [114] = "Gen. Annunciations 2", + [115] = "Engine annunciations", + [116] = "Autopilot armed status", + [117] = "Autopilot modes", + [118] = "Autopilot values", + [119] = "Weapon status", + [120] = "Pressurization status", + [121] = "APU and GPU status", + [122] = "Radar status", + [123] = "Hydraulic status", + [124] = "Electrical and solar systems", + [125] = "Icing status 1", + [126] = "Icing status 2", + [127] = "Warning status", + [128] = "Flight plan legs", + [129] = "Hardware options", + [130] = "Camera location", + [131] = "Ground location", + [132] = "Climb stats", + [133] = "Cruise stats", + [134] = "Landing gear steering", + [135] = "Motion platform stats" +} + +-- Processes 'DATA' packets from X-Plane 11 +-- Formatted as follows: +-- 4 byte packet type string +-- 1 byte 'internal use' +-- 14x 36 byte messages +-- -- 4 byte index number +-- -- 8x 4 byte single-precision floats +function xplane_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "X-PLANE" + local subtree = tree:add(xplane_proto,buffer(),"X-Plane Protocol Data") + subtree:add(buffer(0,4),"Packet Type: " .. buffer(0,4):string()) + subtree:add(buffer(4,1), + "Internal Use Byte: " .. buffer(4,1):bytes():tohex()) + subtree:add(buffer(5), "Length: " .. buffer:len()) + + -- Too lazy to implement processing for non-data packet types + -- right now. + if (buffer(0,4):string() ~= "DATA") then + return + end + + subtree = subtree:add(buffer(5),"Messages") + for i=5,buffer:len()-1,36 do + + local d_idx = buffer(i,4):le_uint() + local d_str = vs_index_num[d_idx] + if d_str == nil then + d_str = "Unknown - " .. d_idx + end + + local branch = subtree:add(buffer(i,36), d_str) + + for j=i+4,i+32,4 do + local d_value = buffer(j, 4):le_float() + if (d_value ~= -999) then -- "-999" indicates padding / unused + branch:add(buffer(j,4), + "Data: " .. d_value) + end + end + end +end + +-- load the udp.port table +udp_table = DissectorTable.get("udp.port") +-- register our protocol to handle udp port 49000 +udp_table:add(49000,xplane_proto) diff --git a/dissectors/xplane11-wegylexy/LICENSE b/dissectors/xplane11-wegylexy/LICENSE new file mode 100644 index 0000000..70fca8f --- /dev/null +++ b/dissectors/xplane11-wegylexy/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 TimTim + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/xplane11-wegylexy/README.md b/dissectors/xplane11-wegylexy/README.md new file mode 100644 index 0000000..4a1cd7a --- /dev/null +++ b/dissectors/xplane11-wegylexy/README.md @@ -0,0 +1,75 @@ +# X-Plane 11 UDP (wegylexy) + +Dissecteur Wireshark Lua du protocole UDP du simulateur de vol X-Plane 11. +Le message est reconnu par son prologue de quatre lettres suivi d'un +octet nul. Quatre messages sont décodés (issue #534) : + +- `BECN` : balise de découverte (version, application, rôle, port, nom + de machine) ; +- `RPOS` : position de l'avion (longitude, latitude, altitude MSL et AGL, + assiette, cap, inclinaison, vitesses et taux de rotation) ; +- `RADR` : points du radar météo ; +- `RREF` : valeur d'une référence de données (dataref). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/wegylexy/xplane11-dissector (`xp11.lua`) | +| Commit importé | `08658938dc910d6139e1100974d5fdc69c8d8917` du 16/10/2018 (dernier commit de `master`, qui est aussi la dernière modification du script) | +| Licence amont | MIT (`LICENSE` amont, © 2017 TimTim ; aucune mention de licence dans le script). Compatible avec la GPL-3.0 de ce dépôt | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur X-Plane dans `tshark -G protocols` | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code, fins de ligne CRLF d'origine conservées) ; seule +l'en-tête de provenance de cinq lignes est ajoutée en tête (convention du +dépôt, issue #563). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/xp11.lua` | Protocole `xp11` (« X-Plane 11 », ligne 6), sous-protocoles `xp11.becn`, `xp11.rpos`, `xp11.radr` et `xp11.rref` (lignes 9, 18, 33 et 39) ; table des messages (lignes 71, 102, 126 et 144) ; inscrit sur UDP 49001 (ligne 164) | + +## Utilisation + +Copier `src/xp11.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis recharger +avec Ctrl+Maj+L. Filtres : `xp11`, `xp11.prolog == "RPOS"`, +`xp11.rpos.lat`, `xp11.becn.name`. Le port 49001 est fixé dans le code. +Pour le port 49000 (données reçues par X-Plane) ou la balise multicast +49707, utiliser « Décoder comme… ». + +## Vérification à l'import + +`luac5.4 -p` : OK. tshark 4.6.4, script chargé par `-X lua_script:`, +puis copié dans le dossier des plugins : aucun message au chargement. +Captures synthétiques sur UDP 49001, construites d'après le code et la +documentation UDP d'X-Plane : + +| Essai | Résultat | +|---|---| +| `RPOS` (lon 7,75, lat 48,8166, 1200 m, vitesses 60 / 1 / −60 m/s) | décodé : « E7°45.0' », « N48°48.996' », « 3937.0078740157 ft MSL », assiette, cap, « Linear Velocity: 45°/164 kt, +3 fpm », taux de rotation | +| `RADR` avec deux points | décodé : deux points avec position, précipitations (40 % et 80 %) et sommet | +| `RREF` (n° d'écho 3, valeur 0,5) | « Data Reference: 0.5 » ; « Echo Number: 4.2039e-45 » (voir Limites) | +| `BECN` (version 113000) | octets de version, application, numéro de version, puis **erreur Lua** ligne 97 (`bad argument #2 to 'format' (number has no integer representation)`) | +| `DATA` (prologue non géré) | **erreur Lua** ligne 159 (`attempt to call a nil value`) | +| Datagramme de 2 octets | **erreur Lua** ligne 154 (`Range is out of bounds`) | + +## Limites constatées + +- `BECN` : sous Lua 5.4, `string.format("%d", version / 10000)` échoue + dès que la version n'est pas un multiple de 10000, c'est-à-dire pour + presque toutes les versions réelles (ligne 97). Le rôle, le port et le + nom de machine ne sont alors pas affichés. +- Les prologues non gérés (`DATA`, `DREF`, `CMND`, `VEHX`, etc.) + provoquent une erreur Lua : il n'y a pas de repli (ligne 159). +- `RREF` : le numéro d'écho est déclaré en `float` au lieu d'un entier, + donc la valeur affichée est fausse. Seule la première paire est + décodée, alors qu'un `RREF` en contient souvent plusieurs. +- `RPOS` : la plage du sous-arbre ne couvre que 16 octets (ligne 104). + Les sous-arbres `RPOS`, `RADR` et `RREF` sont ajoutés à la racine, + hors de l'arbre `xp11`. +- Pas de contrôle de longueur ; un seul port (49001). +- Pas de capture réelle dans le dépôt amont. diff --git a/dissectors/xplane11-wegylexy/src/xp11.lua b/dissectors/xplane11-wegylexy/src/xp11.lua new file mode 100644 index 0000000..917d0a6 --- /dev/null +++ b/dissectors/xplane11-wegylexy/src/xp11.lua @@ -0,0 +1,164 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/wegylexy/xplane11-dissector (xp11.lua), +-- commit 08658938dc910d6139e1100974d5fdc69c8d8917 du 16/10/2018 (dernière modification du fichier : +-- commit 08658938dc910d6139e1100974d5fdc69c8d8917 du 16/10/2018). +-- Licence amont : MIT (LICENSE amont) — voir README.md et LICENSE. +xp11 = Proto("xp11","X-Plane 11") +xp11.fields.prolog = ProtoField.string("xp11.prolog", "Prolog") + +xp11_becn = Proto("xp11.becn", "X-Plane 11 Beacon") +xp11_becn.fields.major = ProtoField.uint8("xp11.becn.major", "Beacon Major Version") +xp11_becn.fields.minor = ProtoField.uint8("xp11.becn.minor", "Beacon Minor Version") +xp11_becn.fields.appid = ProtoField.int32("xp11.becn.appid", "Applciation Host ID") +xp11_becn.fields.version = ProtoField.int32("xp11.becn.version", "Version Number") +xp11_becn.fields.role = ProtoField.uint32("xp11.becn.role", "Role") +xp11_becn.fields.port = ProtoField.uint16("xp11.becn.port", "Port") +xp11_becn.fields.name = ProtoField.stringz("xp11.becn.name", "Computer Name") + +xp11_rpos = Proto("xp11.rpos", "X-Plane 11 Position Report") +xp11_rpos.fields.lon = ProtoField.double("xp11.rpos.lon", "Longitude") +xp11_rpos.fields.lat = ProtoField.double("xp11.rpos.lat", "Latitude") +xp11_rpos.fields.ele = ProtoField.double("xp11.rpos.ele", "Altitude") +xp11_rpos.fields.agl = ProtoField.float("xp11.rpos.agl", "Height") +xp11_rpos.fields.the = ProtoField.float("xp11.rpos.the", "Pitch") +xp11_rpos.fields.psi = ProtoField.float("xp11.rpos.psi", "True Heading") +xp11_rpos.fields.phi = ProtoField.float("xp11.rpos.phi", "Roll") +xp11_rpos.fields.vx = ProtoField.float("xp11.rpos.vx", "Eastern Velocity") +xp11_rpos.fields.vy = ProtoField.float("xp11.rpos.vy", "Vertical Velocity") +xp11_rpos.fields.vz = ProtoField.float("xp11.rpos.vz", "Southern Velocity") +xp11_rpos.fields.p = ProtoField.float("xp11.rpos.p", "Roll Rate") +xp11_rpos.fields.q = ProtoField.float("xp11.rpos.q", "Pitch Rate") +xp11_rpos.fields.r = ProtoField.float("xp11.rpos.r", "Yaw Rate") + +xp11_radr = Proto("xp11.radr", "X-Plane 11 Weather Radar Data Points") +xp11_radr.fields.lon = ProtoField.float("xp11.radr.lon", "Longitude") +xp11_radr.fields.lat = ProtoField.float("xp11.radr.lat", "Latitude") +xp11_radr.fields.level = ProtoField.uint8("xp11.radr.level", "Precipitation") +xp11_radr.fields.height = ProtoField.float("xp11.radr.height", "Storm Top") + +xp11_rref = Proto("xp11.rref", "X-Plane 11 Received Reference") +xp11_rref.fields.en = ProtoField.float("xp11.rref.en", "Echo Number") +xp11_rref.fields.flt = ProtoField.float("xp11.rref.flt", "Data Reference") + +local function truncate(value) + return value < 0 and math.ceil(value) or math.floor(value) +end + +local function degreeMinute(degree) + local m = math.abs(degree) % 1 * 60 + return truncate(degree) .. "\xc2\xb0" .. (m < 10 and "0" or "") .. m .. "'" +end + +local function degreeMinuteSecond(degree) + local m = math.abs(degree) % 1 * 60 + local s = m % 1 * 60 + return truncate(degree) .. "\xc2\xb0" .. (m < 10 and "0" or "") .. truncate(m) .. "'" .. (s < 10 and "0" or "") .. s .. '"' +end + +local function longitude(degree) + return (degree < 0 and "W" or "E") .. degreeMinute(math.abs(degree)) +end + +local function latitude(degree) + return (degree < 0 and "S" or "N") .. degreeMinute(math.abs(degree)) +end + +local function knot(mps) + return mps * 900 / 463 +end + +local subdissectors = { + BECN = + function (buffer, pinfo, tree) + local bl = buffer:len(); + local appid = buffer(2, 4):le_int(); + local apps = { + [1] = "X-Plane", + [2] = "Plane Maker", + [3] = "World Maker", + [4] = "Briefer", + [5] = "Part Maker", + [6] = "Young's Mod", + [7] = "X-Auto" + } + local version = buffer(6, 4):le_int(); + local role = buffer(10, 4):le_int(); + local roles = { + [1] = "Master", + [2] = "External Visual", + [3] = "IOS" + } + local subtree = tree:add(xp11_becn, buffer(0, math.min(bl, 516)), "X-System Beacon Version", + buffer(0, 1):uint() .. "." .. buffer(1, 1):uint()) + subtree:add_le(xp11_becn.fields.major, buffer(0, 1)) + subtree:add_le(xp11_becn.fields.minor, buffer(1, 1)) + subtree:add_le(xp11_becn.fields.appid, buffer(2, 4)):set_text("Application Host: " .. apps[appid]) + subtree:add_le(xp11_becn.fields.version, buffer(6, 4)): + set_text("Version: " .. string.format("%d.%02dr%d", version / 10000, version / 100 % 100, version % 100)) + subtree:add_le(xp11_becn.fields.role, buffer(10, 4)):set_text("Role: " .. roles[role]) + subtree:add_le(xp11_becn.fields.port, buffer(14, 2)) + subtree:add_le(xp11_becn.fields.name, buffer(16, math.min(bl - 16, 500))) + end, + RPOS = + function (buffer, pinfo, tree) + local subtree = tree:add(xp11_rpos, buffer(0, 16)) + subtree:add_le(xp11_rpos.fields.lon, buffer(0, 8)):set_text("Longitude: " .. longitude(buffer(0, 8):le_float())) + subtree:add_le(xp11_rpos.fields.lat, buffer(8, 8)):set_text("Latitude: " .. latitude(buffer(8, 8):le_float())) + subtree:add_le(xp11_rpos.fields.ele, buffer(16, 8)):set_text("Altitude: " .. buffer(16, 8):le_float() / .3048 .. " ft MSL") + subtree:add_le(xp11_rpos.fields.agl, buffer(24, 4)):set_text("Height: " .. buffer(24, 4):le_float() / .3048 .. " ft AGL") + subtree:add_le(xp11_rpos.fields.the, buffer(28, 4)):set_text("Pitch: " .. degreeMinuteSecond(buffer(28, 4):le_float())) + subtree:add_le(xp11_rpos.fields.psi, buffer(32, 4)):set_text("True Heading: " .. degreeMinuteSecond(buffer(32, 4):le_float())) + subtree:add_le(xp11_rpos.fields.phi, buffer(36, 4)):set_text("Roll: " .. degreeMinuteSecond(buffer(36, 4):le_float())) + local vx = buffer(40, 4):le_float() + local vy = buffer(44, 4):le_float() + local vz = buffer(48, 4):le_float() + local vt = subtree:add(buffer(40, 12), "Linear Velocity: " .. + truncate((450 - math.atan2(-vz, vx) * 180 / math.pi) % 360) .. "\xc2\xb0/" .. + truncate(knot(math.sqrt(math.pow(vx, 2) + math.pow(vz, 2)))) .. " kt, " .. + (vy >= 0 and "+" or "") .. truncate(vy / .3048) .. " fpm") + vt:add_le(xp11_rpos.fields.vx, buffer(40, 4)):set_text("Eastern Velocity: " .. vx .. " m/s") + vt:add_le(xp11_rpos.fields.vy, buffer(44, 4)):set_text("Vertical Velocity: " .. vy .. " m/s") + vt:add_le(xp11_rpos.fields.vz, buffer(48, 4)):set_text("Southern Velocity: " .. vz .. " m/s") + subtree:add_le(xp11_rpos.fields.p, buffer(52, 4)):set_text("Roll Rate: " .. buffer(52, 4):le_float() * 180 / math.pi .. "\xc2\xb0/s") + subtree:add_le(xp11_rpos.fields.q, buffer(56, 4)):set_text("Pitch Rate: " .. buffer(56, 4):le_float() * 180 / math.pi .. "\xc2\xb0/s") + subtree:add_le(xp11_rpos.fields.r, buffer(60, 4)):set_text("Yaw Rate: " .. buffer(60, 4):le_float() * 180 / math.pi .. "\xc2\xb0/s") + end, + RADR = + function (buffer, pinfo, tree) + local subtree = tree:add(xp11_radr, buffer()) + local count = buffer:len() / 13 + subtree:add("[Count: " .. count .. "]") + for i = 0, count - 1 do + local b = buffer(13 * i, 13) + local lon = longitude(b(0, 4):le_float()) + local lat = latitude(b(4, 4):le_float()) + local level = b(8, 1):uint() + local height = b(9, 4):le_float() + local st = subtree:add(xp11_radr, b, "[" .. i .. "]", lat, lon, level .. "%", truncate(height / .3048) .. "ft MSL") + st:add_le(xp11_radr.fields.lon, b(0, 4)):set_text("Longitude: " .. lon) + st:add_le(xp11_radr.fields.lat, b(4, 4)):set_text("Latitude: " .. lat) + st:add_le(xp11_radr.fields.level, b(8, 1)):set_text("Precipitation: " .. level .. " %") + st:add_le(xp11_radr.fields.height, b(9, 4)):set_text("Storm Top: " .. height .. " m MSL") + end + end, + RREF = + function (buffer, pinfo, tree) + local subtree = tree:add(xp11_rref, buffer(0, 8)) + subtree:add_le(xp11_rref.fields.en, buffer(0, 4)) + subtree:add_le(xp11_rref.fields.flt, buffer(4, 4)) + end, +} + +function xp11.dissector(buffer, pinfo, tree) + pinfo.cols.protocol = "X-Plane 11" + local _prolog = buffer(0, 4) + local prolog = _prolog:string() + local subtree = tree:add(xp11, buffer(), "X-Plane 11, Prolog:", prolog) + subtree:add(xp11.fields.prolog, _prolog) + local db = buffer(5) + subdissectors[prolog](db, pinfo, tree) + subtree:add(db, "[Data Length: " .. db:len() .. "]") +end + +ut = DissectorTable.get("udp.port") +ut:add(49001, xp11); diff --git a/dissectors/zab/LICENSE b/dissectors/zab/LICENSE new file mode 100644 index 0000000..091a3c8 --- /dev/null +++ b/dissectors/zab/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Charles-Henri de Boysson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dissectors/zab/README.md b/dissectors/zab/README.md new file mode 100644 index 0000000..d4e5491 --- /dev/null +++ b/dissectors/zab/README.md @@ -0,0 +1,85 @@ +# ZAB — ZooKeeper (client ↔ serveur) + +Dissecteur Wireshark Lua des messages échangés entre un client et un +serveur **Apache ZooKeeper** (l'amont l'appelle « ZAB 1.0 ») : connexion +et réponse (version, zxid, délai, session, mot de passe, lecture seule), +requêtes et réponses par code d'opération (`CREATE`, `DELETE`, `EXISTS`, +`GETDATA`, `SETDATA`, `GETACL`, `SETACL`, `GETCHILDREN`/`GETCHILDREN2`, +`SYNC`, `PING`, `CHECK`, `MULTI`, `CREATE2`, `RECONFIG`…) avec les structures `Stat`, +ACL, chemins et données, événements de surveillance (`WATCH EVENT`), +`SETWATCHES`, `AUTH`, et commandes « quatre lettres » (`ruok`, `stat`, +`mntr`…). Les échanges internes entre serveurs (le protocole ZAB +proprement dit) ne sont pas pris en charge (issue #448). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/ceache/zab_dissector (`zab.lua`) | +| Commit importé | `e949a7fe14e95982462c2b7434b75b0579d2a324` du 20/08/2026 (dernier commit de la branche par défaut `master`) ; dernière modification de `zab.lua` : commit `55b8f51de964ef5eaf4525b9adf23ef37109e65a` du 20/08/2026 | +| Licence amont | MIT, « Copyright (c) 2020 Charles-Henri de Boysson » (`LICENSE` du dépôt), compatible avec la licence de ce dépôt (GPL-3.0-or-later) | +| Natif Wireshark 4.6.4 | Non : aucun dissecteur ZooKeeper (`tshark -G protocols` ne donne que `zabbix`) | + +Texte complet de la licence : fichier `LICENSE` de ce dossier (copie +conforme du `LICENSE` amont). Le script est repris tel quel (aucune +modification de code) ; seule l'en-tête de provenance de cinq lignes est +ajoutée en tête (convention du dépôt, issue #563). Les captures de test +amont (`tests/fixtures//instance_.pcapng`) et leurs sorties +de référence (`.txt`) sont copiées telles quelles dans `captures/`, sous +le nom `_`. Les scripts de test Nix et Python amont ne sont +pas importés. + +Autre copie connue : `zookeeper/zookeeper_dissector.lua` du dépôt +hezhangjian (voir `dissectors/pulsar-hezhangjian/README.md`), copie de +ce script restée dans ce dépôt-là et non importée. + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `src/zab.lua` | Protocole `zab` (« ZAB 1.0 ») sur TCP 2181 (préférence « Port number », `Decode As…` possible) ; réassemblage TCP et plusieurs messages par segment ; suivi des `xid` par client pour apparier les réponses aux requêtes | +| `captures/*.pcapng` | 19 captures amont : `connect`, `create` (4), `delete` (2), `exists` (3), `get_data` (4), `multi` (2), `ping`, `reconfig`, `set_data` | +| `captures/*.txt` | Champs `zab.*` attendus par paquet ZAB (référence amont) | + +## Utilisation + +Copier `src/zab.lua` dans le dossier des plugins Lua personnels de +Wireshark (« Aide › À propos de Wireshark › Dossiers »), puis Ctrl+Maj+L. +Port par défaut 2181 ; autre port : préférence du protocole, `Decode As…`, +ou en ligne de commande : + +```sh +tshark -X lua_script:zab.lua -X lua_script1:ports=2181,2182,20000 -r capture.pcapng -Y zab +``` + +Filtres : `zab`, `zab.opcode`, `zab.xid`, `zab.err`, `zab.path`, +`zab.zxid`, `zab.session`… + +## Vérification à l'import + +Avec tshark 4.6.4, le fichier se charge sans erreur (`luac5.4 -p` : OK). + +| Essai | Résultat | +|---|---| +| 19 captures amont, champs `zab.*` comparés aux `.txt` de référence | 18 identiques ; `multi_2` : la trame 3 contient deux messages, que la référence amont regroupe (un seul `zab.xid`) alors que tshark liste les champs des deux. Ce n'est pas une erreur de décodage | +| Synthétique : `GETDATA` coupé en deux segments TCP (10 + 107 octets) | réassemblé (« 2 Reassembled TCP Segments ») ; chemin et réponse (`Error: Success (0)`) décodés | +| Synthétique : `ruok` / `imok` | `4LW ruok request` / `4LW reply` | +| Synthétique sur TCP 20000 | rien sans option ; décodé avec `-X lua_script1:ports=2181,20000` | +| `exists_3` (trame 3, client dont la connexion n'est pas dans la capture) | seuls `zab.length` et `zab.xid` sont décodés (comme dans la référence amont) ; le reste de la trame est pris par l'heuristique SMPP (`Replace_sm`, « Malformed Packet ») | + +## Limites constatées + +- Le sens (requête ou réponse) dépend du message `CONNECT` vu en début de + connexion (table `CLIENTS`, ligne 173 de `src/zab.lua`, 168 en amont) : + une capture qui commence en cours de session n'est décodée que + partiellement, et le reste de la trame peut être attribué à un autre + dissecteur heuristique (cas `exists_3`). +- La colonne Info n'est renseignée que pour `CONNECT`, `AUTH`, + `SETWATCHES`, `WATCH EVENT` et les commandes « quatre lettres » ; les + autres opérations gardent l'Info TCP. +- Données de longueur nulle affichées `Data: `. +- SASL non pris en charge (TODO amont) ; échanges entre serveurs + (élection, réplication) non pris en charge. +- Variable globale `ZabProto` (ligne 2137, 2132 en amont). +- Captures amont produites en conteneur (adresses 172.18.0.x) par la suite + de tests kazoo, pas sur un ensemble ZooKeeper de production. diff --git a/dissectors/zab/captures/connect_1.pcapng b/dissectors/zab/captures/connect_1.pcapng new file mode 100644 index 0000000..341934c Binary files /dev/null and b/dissectors/zab/captures/connect_1.pcapng differ diff --git a/dissectors/zab/captures/connect_1.txt b/dissectors/zab/captures/connect_1.txt new file mode 100644 index 0000000..0a0910b --- /dev/null +++ b/dissectors/zab/captures/connect_1.txt @@ -0,0 +1,16 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.length 37 +zab.passwd 15:36:f4:2b:7e:16:83:fd:7b:93:2e:5f:f7:95:5b:94 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0100000406d10000 +zab.timeout 10000 diff --git a/dissectors/zab/captures/create_1.pcapng b/dissectors/zab/captures/create_1.pcapng new file mode 100644 index 0000000..235eea2 Binary files /dev/null and b/dissectors/zab/captures/create_1.pcapng differ diff --git a/dissectors/zab/captures/create_1.txt b/dissectors/zab/captures/create_1.txt new file mode 100644 index 0000000..e11d678 --- /dev/null +++ b/dissectors/zab/captures/create_1.txt @@ -0,0 +1,32 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.container 0 +zab.credential anyone +zab.data +zab.ephemeral 0 +zab.flags 0x00000000 +zab.length 114 +zab.opcode 1 +zab.path /test_barrier.py::TestKazooBarrier::test_barrier_not_exist-421efe80 +zab.permissions 31 +zab.scheme world +zab.sequence 0 +zab.xid 3 + +=== Packet 3 === +zab.err 0 +zab.length 87 +zab.opcode 1 +zab.path /test_barrier.py::TestKazooBarrier::test_barrier_not_exist-421efe80 +zab.xid 3 +zab.zxid 0x0000000100000002 +zab.zxid.count 2 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/create_2.pcapng b/dissectors/zab/captures/create_2.pcapng new file mode 100644 index 0000000..1bdc82b Binary files /dev/null and b/dissectors/zab/captures/create_2.pcapng differ diff --git a/dissectors/zab/captures/create_2.txt b/dissectors/zab/captures/create_2.txt new file mode 100644 index 0000000..70a8516 --- /dev/null +++ b/dissectors/zab/captures/create_2.txt @@ -0,0 +1,32 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.container 0 +zab.credential anyone +zab.data +zab.ephemeral 0 +zab.flags 0x00000000 +zab.length 111 +zab.opcode 1 +zab.path /test_barrier.py::TestKazooBarrier::test_barrier_exists-6b1329f7 +zab.permissions 31 +zab.scheme world +zab.sequence 0 +zab.xid 3 + +=== Packet 3 === +zab.err 0 +zab.length 84 +zab.opcode 1 +zab.path /test_barrier.py::TestKazooBarrier::test_barrier_exists-6b1329f7 +zab.xid 3 +zab.zxid 0x0000000100000005 +zab.zxid.count 5 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/create_3.pcapng b/dissectors/zab/captures/create_3.pcapng new file mode 100644 index 0000000..8b4ee77 Binary files /dev/null and b/dissectors/zab/captures/create_3.pcapng differ diff --git a/dissectors/zab/captures/create_3.txt b/dissectors/zab/captures/create_3.txt new file mode 100644 index 0000000..083e873 --- /dev/null +++ b/dissectors/zab/captures/create_3.txt @@ -0,0 +1,21 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.err -110 +zab.length 16 +zab.xid 18 +zab.zxid 0x0000000100000172 +zab.zxid.count 370 +zab.zxid.epoch 1 + +=== Packet 3 === +zab.length 8 +zab.opcode -11 +zab.xid 19 diff --git a/dissectors/zab/captures/create_4.pcapng b/dissectors/zab/captures/create_4.pcapng new file mode 100644 index 0000000..1da1275 Binary files /dev/null and b/dissectors/zab/captures/create_4.pcapng differ diff --git a/dissectors/zab/captures/create_4.txt b/dissectors/zab/captures/create_4.txt new file mode 100644 index 0000000..63a499c --- /dev/null +++ b/dissectors/zab/captures/create_4.txt @@ -0,0 +1,23 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.err -108 +zab.length 16 +zab.xid 7 +zab.zxid 0x000000010000003e +zab.zxid.count 62 +zab.zxid.epoch 1 + +=== Packet 3 === +zab.length 148 +zab.opcode 2 +zab.path /test_barrier.py::TestKazooDoubleBarrierTests::test_barrier_existing_parent_node-0bcbd817/some/path/4c26caf5d4e14ccea1272b56b84bfdc8 +zab.version 4294967295 +zab.xid 8 diff --git a/dissectors/zab/captures/delete_1.pcapng b/dissectors/zab/captures/delete_1.pcapng new file mode 100644 index 0000000..3ede4cf Binary files /dev/null and b/dissectors/zab/captures/delete_1.pcapng differ diff --git a/dissectors/zab/captures/delete_1.txt b/dissectors/zab/captures/delete_1.txt new file mode 100644 index 0000000..f302217 --- /dev/null +++ b/dissectors/zab/captures/delete_1.txt @@ -0,0 +1,24 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.length 90 +zab.opcode 2 +zab.path /test_barrier.py::TestKazooBarrier::test_barrier_exists-6b1329f7/some/path +zab.version 4294967295 +zab.xid 10 + +=== Packet 3 === +zab.err 0 +zab.length 16 +zab.opcode 2 +zab.xid 10 +zab.zxid 0x0000000100000008 +zab.zxid.count 8 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/delete_2.pcapng b/dissectors/zab/captures/delete_2.pcapng new file mode 100644 index 0000000..4b30d7e Binary files /dev/null and b/dissectors/zab/captures/delete_2.pcapng differ diff --git a/dissectors/zab/captures/delete_2.txt b/dissectors/zab/captures/delete_2.txt new file mode 100644 index 0000000..4749d4b --- /dev/null +++ b/dissectors/zab/captures/delete_2.txt @@ -0,0 +1,23 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.err -101 +zab.length 16 +zab.xid 27 +zab.zxid 0x0000000100000022 +zab.zxid.count 34 +zab.zxid.epoch 1 + +=== Packet 3 === +zab.length 95 +zab.opcode 8 +zab.path /test_barrier.py::TestKazooDoubleBarrierTests::test_two_barrier-28c04530/some/path +zab.watch 0 +zab.xid 29 diff --git a/dissectors/zab/captures/exists_1.pcapng b/dissectors/zab/captures/exists_1.pcapng new file mode 100644 index 0000000..2de06e1 Binary files /dev/null and b/dissectors/zab/captures/exists_1.pcapng differ diff --git a/dissectors/zab/captures/exists_1.txt b/dissectors/zab/captures/exists_1.txt new file mode 100644 index 0000000..ecd9973 --- /dev/null +++ b/dissectors/zab/captures/exists_1.txt @@ -0,0 +1,41 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.length 14 +zab.opcode 3 +zab.path / +zab.watch 0 +zab.xid 2 + +=== Packet 3 === +zab.aversion 0 +zab.ctime 0 +zab.cversion 0 +zab.czxid 0x0000000000000000 +zab.czxid.count 0 +zab.czxid.epoch 0 +zab.datalength 0 +zab.ephemeralowner 0x0000000000000000 +zab.err 0 +zab.length 84 +zab.mtime 0 +zab.mzxid 0x0000000000000000 +zab.mzxid.count 0 +zab.mzxid.epoch 0 +zab.numchildren 2 +zab.opcode 3 +zab.pzxid 0x0000000100000002 +zab.pzxid.count 2 +zab.pzxid.epoch 1 +zab.version 0 +zab.xid 2 +zab.zxid 0x0000000100000004 +zab.zxid.count 4 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/exists_2.pcapng b/dissectors/zab/captures/exists_2.pcapng new file mode 100644 index 0000000..5dda989 Binary files /dev/null and b/dissectors/zab/captures/exists_2.pcapng differ diff --git a/dissectors/zab/captures/exists_2.txt b/dissectors/zab/captures/exists_2.txt new file mode 100644 index 0000000..10e504a --- /dev/null +++ b/dissectors/zab/captures/exists_2.txt @@ -0,0 +1,23 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.err -101 +zab.length 16 +zab.xid 1 +zab.zxid 0x000000010000004e +zab.zxid.count 78 +zab.zxid.epoch 1 + +=== Packet 3 === +zab.length 14 +zab.opcode 3 +zab.path / +zab.watch 0 +zab.xid 2 diff --git a/dissectors/zab/captures/exists_3.pcapng b/dissectors/zab/captures/exists_3.pcapng new file mode 100644 index 0000000..74f6e0b Binary files /dev/null and b/dissectors/zab/captures/exists_3.pcapng differ diff --git a/dissectors/zab/captures/exists_3.txt b/dissectors/zab/captures/exists_3.txt new file mode 100644 index 0000000..a97ea7c --- /dev/null +++ b/dissectors/zab/captures/exists_3.txt @@ -0,0 +1,20 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.err -102 +zab.length 16 +zab.xid 7 +zab.zxid 0x000000010000017a +zab.zxid.count 378 +zab.zxid.epoch 1 + +=== Packet 3 === +zab.length 89 +zab.xid 7 diff --git a/dissectors/zab/captures/get_data_1.pcapng b/dissectors/zab/captures/get_data_1.pcapng new file mode 100644 index 0000000..0f25685 Binary files /dev/null and b/dissectors/zab/captures/get_data_1.pcapng differ diff --git a/dissectors/zab/captures/get_data_1.txt b/dissectors/zab/captures/get_data_1.txt new file mode 100644 index 0000000..6155a91 --- /dev/null +++ b/dissectors/zab/captures/get_data_1.txt @@ -0,0 +1,42 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.length 113 +zab.opcode 4 +zab.path /test_cache.py::TestKazooTreeCache::test_subtree_operation-fc90dbcb/759a55cb2cf4492382d361c2b248054d +zab.watch 1 +zab.xid 7 + +=== Packet 3 === +zab.aversion 0 +zab.ctime 1787186924401 +zab.cversion 0 +zab.czxid 0x0000000100000072 +zab.czxid.count 114 +zab.czxid.epoch 1 +zab.data +zab.datalength 0 +zab.ephemeralowner 0x0000000000000000 +zab.err 0 +zab.length 88 +zab.mtime 1787186924401 +zab.mzxid 0x0000000100000072 +zab.mzxid.count 114 +zab.mzxid.epoch 1 +zab.numchildren 0 +zab.opcode 4 +zab.pzxid 0x0000000100000072 +zab.pzxid.count 114 +zab.pzxid.epoch 1 +zab.version 0 +zab.xid 7 +zab.zxid 0x0000000100000072 +zab.zxid.count 114 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/get_data_2.pcapng b/dissectors/zab/captures/get_data_2.pcapng new file mode 100644 index 0000000..4b0e07a Binary files /dev/null and b/dissectors/zab/captures/get_data_2.pcapng differ diff --git a/dissectors/zab/captures/get_data_2.txt b/dissectors/zab/captures/get_data_2.txt new file mode 100644 index 0000000..af289b3 --- /dev/null +++ b/dissectors/zab/captures/get_data_2.txt @@ -0,0 +1,17 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.data 00:00:00:00:00:00:00:01:00:00:00:75:00:00:00:01:00:00:00:75:00:00:01:a0:1c:a4:4b:79:00:00:01:a0:1c:a4:4b:79:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01:00:00:00:01:00:00:00:76 +zab.err 0 +zab.length 88 +zab.xid 19 +zab.zxid 0x0000000100000076 +zab.zxid.count 118 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/get_data_3.pcapng b/dissectors/zab/captures/get_data_3.pcapng new file mode 100644 index 0000000..2f907f4 Binary files /dev/null and b/dissectors/zab/captures/get_data_3.pcapng differ diff --git a/dissectors/zab/captures/get_data_3.txt b/dissectors/zab/captures/get_data_3.txt new file mode 100644 index 0000000..f66c44f --- /dev/null +++ b/dissectors/zab/captures/get_data_3.txt @@ -0,0 +1,16 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.err -101 +zab.length 16 +zab.xid 4 +zab.zxid 0x00000001000003af +zab.zxid.count 943 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/get_data_4.pcapng b/dissectors/zab/captures/get_data_4.pcapng new file mode 100644 index 0000000..22b4fe3 Binary files /dev/null and b/dissectors/zab/captures/get_data_4.pcapng differ diff --git a/dissectors/zab/captures/get_data_4.txt b/dissectors/zab/captures/get_data_4.txt new file mode 100644 index 0000000..f24166e --- /dev/null +++ b/dissectors/zab/captures/get_data_4.txt @@ -0,0 +1,24 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.err -102 +zab.length 16 +zab.xid 2 +zab.zxid 0x00000001000000bd +zab.zxid.count 189 +zab.zxid.epoch 1 + +=== Packet 3 === +zab.authtype 0 +zab.credential badbad:bad +zab.length 36 +zab.opcode 100 +zab.scheme digest +zab.xid -4 diff --git a/dissectors/zab/captures/multi_1.pcapng b/dissectors/zab/captures/multi_1.pcapng new file mode 100644 index 0000000..b236cbd Binary files /dev/null and b/dissectors/zab/captures/multi_1.pcapng differ diff --git a/dissectors/zab/captures/multi_1.txt b/dissectors/zab/captures/multi_1.txt new file mode 100644 index 0000000..59384a6 --- /dev/null +++ b/dissectors/zab/captures/multi_1.txt @@ -0,0 +1,30 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.done 0 +zab.err -1 +zab.length 106 +zab.opcode 14 +zab.opcode 2 +zab.path /test_client.py::TestClientTransactions::test_basic_delete-8ada3142/fred +zab.version 4294967295 +zab.xid 5 + +=== Packet 3 === +zab.done 0 +zab.err 0 +zab.err 0 +zab.length 34 +zab.opcode 14 +zab.opcode 2 +zab.xid 5 +zab.zxid 0x0000000100000236 +zab.zxid.count 566 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/multi_2.pcapng b/dissectors/zab/captures/multi_2.pcapng new file mode 100644 index 0000000..60e4514 Binary files /dev/null and b/dissectors/zab/captures/multi_2.pcapng differ diff --git a/dissectors/zab/captures/multi_2.txt b/dissectors/zab/captures/multi_2.txt new file mode 100644 index 0000000..0d7c4fc --- /dev/null +++ b/dissectors/zab/captures/multi_2.txt @@ -0,0 +1,31 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.data 6f:6f:70:73 +zab.done 0 +zab.err -1 +zab.length 105 +zab.opcode 14 +zab.opcode 5 +zab.path /test_client.py::TestClientTransactions::test_set-d1cd40bb/fred +zab.version 4294967295 +zab.xid 5 + +=== Packet 3 === +zab.done 0 +zab.err 0 +zab.err 0 +zab.length 102 +zab.opcode 14 +zab.opcode 5 +zab.xid 5 +zab.zxid 0x000000010000023e +zab.zxid.count 574 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/ping_1.pcapng b/dissectors/zab/captures/ping_1.pcapng new file mode 100644 index 0000000..e42b26e Binary files /dev/null and b/dissectors/zab/captures/ping_1.pcapng differ diff --git a/dissectors/zab/captures/ping_1.txt b/dissectors/zab/captures/ping_1.txt new file mode 100644 index 0000000..b0abca8 --- /dev/null +++ b/dissectors/zab/captures/ping_1.txt @@ -0,0 +1,18 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.length 8 +zab.opcode 11 +zab.xid -2 + +=== Packet 3 === +zab.data 00:00:00:01:00:00:01:11:00:00:00:00 +zab.length 16 +zab.xid -2 diff --git a/dissectors/zab/captures/reconfig_1.pcapng b/dissectors/zab/captures/reconfig_1.pcapng new file mode 100644 index 0000000..bbbbe47 Binary files /dev/null and b/dissectors/zab/captures/reconfig_1.pcapng differ diff --git a/dissectors/zab/captures/reconfig_1.txt b/dissectors/zab/captures/reconfig_1.txt new file mode 100644 index 0000000..b6a6678 --- /dev/null +++ b/dissectors/zab/captures/reconfig_1.txt @@ -0,0 +1,49 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.container 0 +zab.credential anyone +zab.data 62:79:74:65:73 +zab.ephemeral 0 +zab.flags 0x00000000 +zab.length 108 +zab.opcode 15 +zab.path /test_client.py::TestClient::test_create_stat-fde1be85/1 +zab.permissions 31 +zab.scheme world +zab.sequence 0 +zab.xid 4 + +=== Packet 3 === +zab.aversion 0 +zab.ctime 1787188114745 +zab.cversion 0 +zab.czxid 0x0000000100000194 +zab.czxid.count 404 +zab.czxid.epoch 1 +zab.datalength 5 +zab.ephemeralowner 0x0000000000000000 +zab.err 0 +zab.length 144 +zab.mtime 1787188114745 +zab.mzxid 0x0000000100000194 +zab.mzxid.count 404 +zab.mzxid.epoch 1 +zab.numchildren 0 +zab.opcode 15 +zab.path /test_client.py::TestClient::test_create_stat-fde1be85/1 +zab.pzxid 0x0000000100000194 +zab.pzxid.count 404 +zab.pzxid.epoch 1 +zab.version 0 +zab.xid 4 +zab.zxid 0x0000000100000194 +zab.zxid.count 404 +zab.zxid.epoch 1 diff --git a/dissectors/zab/captures/set_data_1.pcapng b/dissectors/zab/captures/set_data_1.pcapng new file mode 100644 index 0000000..136a9f0 Binary files /dev/null and b/dissectors/zab/captures/set_data_1.pcapng differ diff --git a/dissectors/zab/captures/set_data_1.txt b/dissectors/zab/captures/set_data_1.txt new file mode 100644 index 0000000..0cc0105 --- /dev/null +++ b/dissectors/zab/captures/set_data_1.txt @@ -0,0 +1,42 @@ +=== Packet 1 === +zab.length 45 +zab.passwd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 +zab.protocolversion 0 +zab.readonly 0 +zab.session 0x0000000000000000 +zab.timeout 10000 +zab.zxid 0x0000000000000000 + +=== Packet 2 === +zab.data 68:61:74:73 +zab.length 86 +zab.opcode 5 +zab.path /test_client.py::TestClient::test_create_get_set-8ba16222/test +zab.version 0 +zab.xid 6 + +=== Packet 3 === +zab.aversion 0 +zab.ctime 1787186953380 +zab.cversion 0 +zab.czxid 0x0000000100000195 +zab.czxid.count 405 +zab.czxid.epoch 1 +zab.datalength 4 +zab.ephemeralowner 0x0100000406d10021 +zab.err 0 +zab.length 84 +zab.mtime 1787186953383 +zab.mzxid 0x0000000100000196 +zab.mzxid.count 406 +zab.mzxid.epoch 1 +zab.numchildren 0 +zab.opcode 5 +zab.pzxid 0x0000000100000195 +zab.pzxid.count 405 +zab.pzxid.epoch 1 +zab.version 1 +zab.xid 6 +zab.zxid 0x0000000100000196 +zab.zxid.count 406 +zab.zxid.epoch 1 diff --git a/dissectors/zab/src/zab.lua b/dissectors/zab/src/zab.lua new file mode 100644 index 0000000..1854b34 --- /dev/null +++ b/dissectors/zab/src/zab.lua @@ -0,0 +1,2362 @@ +-- SPDX-License-Identifier: MIT +-- Importé de https://github.com/ceache/zab_dissector (zab.lua), +-- commit e949a7fe14e95982462c2b7434b75b0579d2a324 du 20/08/2026 (dernière modification du fichier : +-- commit 55b8f51de964ef5eaf4525b9adf23ef37109e65a du 20/08/2026). +-- Licence amont : MIT, « Copyright (c) 2020 Charles-Henri de Boysson » (LICENSE du dépôt) — voir README.md et LICENSE. +-------------------------------------------------------------------------------- +-- zab.lua +-- +-- Works as of Wireshark v2.0.2 +-- This is a Lua dissector for ZAB 1.0 validation. +-- Only the messages exchanged between the client and the server are supported. +-- +-- Notice: +-- The default port is set to 2181, but keep in mind that clients can connect to +-- the Zookeeper server using any port configured in the configuration file. +-- +-- Setup +-- Windows: +-- 1. Copy 'zab.lua' to somewhere in your wireshark directory. For example, C:\Program Files\Wireshark. +-- 2. Open 'init.lua' in your wireshark root directory. Comment the line 'disable_lua = true' or change it to 'disable_lua = false'. +-- Linux/MacOS +-- 1. Open/Create 'init.lua' in your Wireshark config directory, '~/.config/wireshark', with the line 'disable_lua = false' +-- 2. Copy 'zab.lua' to your plugins directory '~/.config/wireshark/plugins' (you may have to create it) +-- +-------------------------------------------------------------------------------- + +-- TODOs: +-- SASL packets +-- Logging config and functions, and replace all prints + +local DEFAULT_ZAB_PORT = 2181 +local MAX_REQUEST_SIZE = 100 * 1024 * 1024 -- luacheck: ignore MAX_REQUEST_SIZE + +local FOUR_LETTER_WORDS = { + ["conf"] = true, + ["cons"] = true, + ["crst"] = true, + ["dump"] = true, + ["envi"] = true, + ["ruok"] = true, + ["srst"] = true, + ["srvr"] = true, + ["stat"] = true, + ["wchs"] = true, + ["wchc"] = true, + ["wchp"] = true, + ["mntr"] = true, +} + +local FIXED_XIDS = { + [0] = "CONNECT_XID", + [-1] = "WATCH_XID", + [-2] = "PING_XID", + [-4] = "AUTH_XID", + [-8] = "SET_WATCHES_XID", +} + +local opCodes = { + -- [0] = "CONNECT", unused? + [1] = "CREATE", + [2] = "DELETE", + [3] = "EXISTS", + [4] = "GETDATA", + [5] = "SETDATA", + [6] = "GETACL", + [7] = "SETACL", + [8] = "GETCHILDREN", + [9] = "SYNC", + [11] = "PING", + [12] = "GETCHILDREN2", + [13] = "CHECK", + [14] = "MULTI", + [15] = "CREATE2", + [16] = "RECONFIG", + [19] = "CREATE_CONTAINER", + [21] = "CREATE_TTL", + [-10] = "CREATESESSION", + [-11] = "CLOSE", + [100] = "SETAUTH", + [101] = "SETWATCHES", +} + +local watchEventTypes = { + [-1] = "None", + [1] = "NodeCreated", + [2] = "NodeDeleted", + [3] = "NodeDataChanged", + [4] = "NodeChildrenChanged", +} + +local errorCodes = { + [0] = "Success", + [-1] = "SystemZookeeperError", + [-2] = "RuntimeInconsistencyError", + [-3] = "DataInconsistencyError", + [-4] = "ConnectionLossError", + [-5] = "MarshallingError", + [-6] = "UnimplementedError", + [-7] = "OperationTimeoutError", + [-8] = "BadArgumentsError", + [-13] = "NewConfigNoQuorumError", + [-14] = "ReconfigInProcessError", + [-100] = "APIError", + [-101] = "NoNodeError", + [-102] = "NoAuthError", + [-103] = "BadVersionError", + [-108] = "NoChildrenForEphemeralsError", + [-110] = "NodeExistsError", + [-111] = "NotEmptyError", + [-112] = "SessionExpiredError", + [-113] = "InvalidCallbackError", + [-114] = "InvalidACLError", + [-115] = "AuthFailedError", + [-118] = "NotReadOnlyCallError", + [-119] = "ConnectionClosedError", +} + +local f_pkt = ProtoField.none("zab.pkt", "Packet") +local f_op = ProtoField.none("zab.op", "Operation") + +local f_4lw = ProtoField.string("zab.4lw", "4LW message") +local f_protoversion = ProtoField.uint64("zab.protocolversion", "Protocol Version") +local f_zxid = ProtoField.uint64("zab.zxid", "ZxID", base.HEX) +local f_zxid_epoch = ProtoField.uint32("zab.zxid.epoch", "Epoch") +local f_zxid_count = ProtoField.uint32("zab.zxid.count", "Count") +local f_czxid = ProtoField.uint64("zab.czxid", "Created ZxID", base.HEX) +local f_czxid_epoch = ProtoField.uint32("zab.czxid.epoch", "Epoch") +local f_czxid_count = ProtoField.uint32("zab.czxid.count", "Count") +local f_mzxid = ProtoField.uint64("zab.mzxid", "Last Modified ZxID", base.HEX) +local f_mzxid_epoch = ProtoField.uint32("zab.mzxid.epoch", "Epoch") +local f_mzxid_count = ProtoField.uint32("zab.mzxid.count", "Count") +local f_pzxid = ProtoField.uint64("zab.pzxid", "Last Modified Children ZxID", base.HEX) +local f_pzxid_epoch = ProtoField.uint32("zab.pzxid.epoch", "Epoch") +local f_pzxid_count = ProtoField.uint32("zab.pzxid.count", "Count") +local f_timeout = ProtoField.uint32("zab.timeout", "Timeout") +local f_session = ProtoField.uint64("zab.session", "Session ID", base.HEX) +local f_len = ProtoField.uint32("zab.length", "Length", base.INT) +local f_passwd = ProtoField.bytes("zab.passwd", "Password") +local f_xid = ProtoField.int32("zab.xid", "Transaction ID", base.INT) +local f_opCode = ProtoField.int32("zab.opcode", "OpCode", base.INT, opCodes) +local f_data = ProtoField.bytes("zab.data", "Data") +local f_path = ProtoField.string("zab.path", "Path") +local f_watch = ProtoField.bool("zab.watch", "Watch") +local f_ctime = ProtoField.uint64("zab.ctime", "Created", base.RELATIVE_TIME) +local f_mtime = ProtoField.uint64("zab.mtime", "Last Modified", base.RELATIVE_TIME) +local f_ephemeralowner = ProtoField.uint64("zab.ephemeralowner", "Ephemeral Owner", base.HEX) +local f_numchildren = ProtoField.uint64("zab.numchildren", "Number of Children") +local f_datalength = ProtoField.uint64("zab.datalength", "Data Length") +local f_done = ProtoField.bool("zab.done", "Done") +local f_err = ProtoField.int32("zab.err", "Error", base.INT, errorCodes) +local f_perms = ProtoField.int64("zab.permissions", "Permissions") +local f_authtype = ProtoField.int32("zab.authtype", "Authentication Type") +local f_scheme = ProtoField.string("zab.scheme", "Scheme") +local f_credential = ProtoField.string("zab.credential", "Credentials") +local f_flags = ProtoField.uint32("zab.flags", "Flags", base.HEX) +local f_ephemeral = ProtoField.bool("zab.ephemeral", "Ephemeral") +local f_sequence = ProtoField.bool("zab.sequence", "Sequence") +local f_container = ProtoField.bool("zab.container", "Container") +local f_ttl = ProtoField.uint64("zab.ttl", "TTL") +local f_joining = ProtoField.string("zab.joining", "Joining") +local f_leaving = ProtoField.string("zab.leaving", "Leaving") +local f_newmembers = ProtoField.string("zab.newmembers", "New Members") +local f_config_id = ProtoField.uint64("zab.config_id", "Config ID", base.HEX) +local f_version = ProtoField.uint64("zab.version", "Version") +local f_cversion = ProtoField.uint64("zab.cversion", "Child Version") +local f_aversion = ProtoField.uint64("zab.aversion", "ACL Version") +local f_readonly = ProtoField.bool("zab.readonly", "Readonly") +local f_eventtype = ProtoField.uint32("zab.eventtype", "Event Type", base.INT, watchEventTypes) +local f_count = ProtoField.uint32("zab.count", "Count") +local f_state = ProtoField.uint32("zab.state", "State") +local f_child = ProtoField.string("zab.child", "Child") + +local CLIENTS = {} + +local Direction = { + Client2Server = 1, + Server2Client = 2, +} + +local DissRes = { + Error = false, + Client = Direction.Client2Server, + Server = Direction.Server2Client, +} + +------------------------------------------------------------------------------ +local function defaultDissect(buf, pkt, tree, _offset, _stat) + tree:append_text(" [NO IMPL]") + if buf:len() > 0 then + tree:add(f_data, buf) + end + return true +end + +local function dispatch(table, index) + if table[index] == nil then + return defaultDissect + end + + return table[index] +end + +------------------------------------------------------------------------------ +local function parseStat(buf) + local offset = 0 + local remain = buf:len() + + if offset + 8 > remain then + return -1, nil + end + local czxid = buf(offset, 8) + offset = offset + 8 + if offset + 8 > remain then + return -1, nil + end + local mzxid = buf(offset, 8) + offset = offset + 8 + if offset + 16 > remain then + return -1, nil + end + local ctime = buf(offset, 8) + local mtime = buf(offset + 8, 8) + offset = offset + 16 + if offset + 12 > remain then + return -1, nil + end + local version = buf(offset, 4) + local cversion = buf(offset + 4, 4) + local aversion = buf(offset + 8, 4) + offset = offset + 12 + if offset + 16 > remain then + return -1, nil + end + local ephemeralowner = buf(offset, 8) + local datalength = buf(offset + 8, 4) + local numchildren = buf(offset + 12, 4) + offset = offset + 16 + if offset + 8 > remain then + return -1, nil + end + local pzxid = buf(offset, 8) + offset = offset + 8 + + return offset, + { + czxid = czxid, + mzxid = mzxid, + ctime = ctime, + mtime = mtime, + version = version, + cversion = cversion, + aversion = aversion, + ephemeralowner = ephemeralowner, + datalength = datalength, + numchildren = numchildren, + pzxid = pzxid, + } +end + +local function reprStat(stat, tree) + local t_czxid = tree:add(f_czxid, stat.czxid) + t_czxid:add(f_czxid_epoch, stat.czxid(0, 4)) + t_czxid:add(f_czxid_count, stat.czxid(4, 4)) + local t_mzxid = tree:add(f_mzxid, stat.mzxid) + t_mzxid:add(f_mzxid_epoch, stat.mzxid(0, 4)) + t_mzxid:add(f_mzxid_count, stat.mzxid(4, 4)) + tree:add(f_ctime, stat.ctime) + tree:add(f_mtime, stat.mtime) + tree:add(f_version, stat.version) + tree:add(f_cversion, stat.cversion) + tree:add(f_aversion, stat.aversion) + tree:add(f_ephemeralowner, stat.ephemeralowner) + tree:add(f_datalength, stat.datalength) + tree:add(f_numchildren, stat.numchildren) + local t_pzxid = tree:add(f_pzxid, stat.pzxid) + t_pzxid:add(f_pzxid_epoch, stat.pzxid(0, 4)) + t_pzxid:add(f_pzxid_count, stat.pzxid(4, 4)) +end + +-- Reads a string, returns length,str or 0,nil +local function parseString(buf) + local offset = 0 + local remain = buf:len() + + if offset + 4 > remain then + return -1, nil + end + local str_length = buf(offset, 4):int() + offset = offset + 4 + if str_length == -1 then + str_length = 0 + end -- XXX: Is this correct?? + if offset + str_length > remain then + return -1, nil + end + local str = buf(offset, str_length) + offset = offset + str_length + + return offset, str +end + +local function parseAcl(buf) + -- 4 bytes perms, 4 bytes scheme length, scheme + local offset = 0 + local remain = buf:len() + if offset + 4 > remain then + return -1, nil + end + local perms = buf(offset, 4) + offset = offset + 4 + local scheme_offset, scheme = parseString(buf(offset)) + if scheme_offset == -1 then + return -1, nil + end + offset = offset + scheme_offset + local cred_offset, credential = parseString(buf(offset)) + if cred_offset == -1 then + return -1, nil + end + offset = offset + cred_offset + + return offset, { + perms = perms, + scheme = scheme, + credential = credential, + } +end + +local function reprAcl(acl, tree) + tree:add(f_perms, acl.perms) + tree:add(f_scheme, acl.scheme) + tree:add(f_credential, acl.credential) +end + +local function parseAclsArray(buf) + local offset = 0 + local remain = buf:len() + + if offset + 4 > remain then + return -1, nil + end + local acls_count = buf(offset, 4):int() + offset = offset + 4 + local acls = {} + for i = 0, acls_count - 1 do + local acl_offset, acl = parseAcl(buf(offset)) + if acl_offset == -1 then + return -1, nil + end + offset = offset + acl_offset + table.insert(acls, acl) + end + + return offset, acls +end + +local function reprAclsArray(acls, tree) + for i, acl in ipairs(acls) do + reprAcl(acl, tree) + end +end + +------------------------------------------------------------------------------ +local function parseResult(buf) + local offset = 0 + local remain = buf:len() + + if offset + 8 > remain then + return -1, nil + end + local zxid = buf(offset, 8) + offset = offset + 8 + if offset + 4 > remain then + return -1, nil + end + local err = buf(offset, 4) + offset = offset + 4 + + return offset, { + zxid = zxid, + err = err, + } +end + +local function reprResult(result, tree) + local t_zxid = tree:add(f_zxid, result.zxid) + t_zxid:add(f_zxid_epoch, result.zxid(0, 4)) + t_zxid:add(f_zxid_count, result.zxid(4, 4)) + tree:add(f_err, result.err) +end + +------------------------------------------------------------------------------ +-- CHECK packets + +local function parseCheckRequest(buf) + local offset = 0 + local remain = buf:len() + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + if offset + 4 > remain then + return -1, nil + end + local version = buf(offset, 4) + offset = offset + 4 + + return offset, { + path = path, + version = version, + } +end + +local function reprCheckRequest(check_req, tree) + tree:add(f_path, check_req.path) + tree:add(f_version, check_req.version) +end + +local function dissectCheckRequest(buf, pkt, tree, _state) + local offset, check_req = parseCheckRequest(buf) + if offset == -1 then + return false + end + tree:append_text(" [CHECK]") + reprCheckRequest(check_req, tree) + return DissRes.Client +end + +local function parseCheckReply(buf) + -- Nothing to do +end + +local function reprCheckReply(check_rep, tree) + -- Nothing to do +end + +-- reserved dispatch entry, currently disabled in dissectRepOpCode +local function dissectCheckReply(buf, pkt, tree, _state) -- luacheck: ignore dissectCheckReply + -- Nothing to do +end + +------------------------------------------------------------------------------ +-- GETCHILDREN / GETCHILDREN2 packets + +local function parseGetChildrenRequest(buf) + local offset = 0 + local remain = buf:len() + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + if offset + 1 > remain then + return -1, nil + end + local watch = buf(offset, 1) + offset = offset + 1 + + return offset, { + path = path, + watch = watch, + } +end + +local function dissectGetChildrenRequest(buf, pkt, tree, _state) + local offset, getchildren_req = parseGetChildrenRequest(buf) + if offset == -1 then + return false + end + tree:add(f_path, getchildren_req.path) + tree:add(f_watch, getchildren_req.watch) + return DissRes.Client +end + +local function dissectGetChildren2Request(buf, pkt, tree, _state) + local offset, getchildren_req = parseGetChildrenRequest(buf) + if offset == -1 then + return false + end + tree:add(f_path, getchildren_req.path) + tree:add(f_watch, getchildren_req.watch) + return DissRes.Client +end + +local function parseGetChildrenReply(buf) + local offset = 0 + local remain = buf:len() + + if offset + 4 > remain then + return -1, nil + end + local count = buf(offset, 4) + offset = offset + 4 + local children = {} + for i = 0, count:int() - 1 do + local child_offset, child = parseString(buf(offset)) + if child_offset == -1 then + return -1, nil + end + offset = offset + child_offset + table.insert(children, child) + end + + return offset, { + count = count, + children = children, + } +end + +local function dissectGetChildrenReply(buf, pkt, tree, _state) + local offset, getchildren_rep = parseGetChildrenReply(buf) + if offset == -1 then + return false + end + + tree:add(f_count, getchildren_rep.count) + for i, child in ipairs(getchildren_rep.children) do + tree:add(f_child, child) + end + return DissRes.Server +end + +local function parseGetChildren2Reply(buf) + local offset = 0 + local remain = buf:len() + + if offset + 4 > remain then + return -1, nil + end + local count = buf(offset, 4) + offset = offset + 4 + local children = {} + for i = 0, count:uint() - 1 do + local child_offset, child = parseString(buf(offset)) + if child_offset == -1 then + return -1, nil + end + offset = offset + child_offset + table.insert(children, child) + end + local stat_offset, stat = parseStat(buf(offset)) + if stat_offset == -1 then + return -1, nil + end + offset = offset + stat_offset + + return offset, { + count = count, + children = children, + stat = stat, + } +end + +local function dissectGetChildren2Reply(buf, pkt, tree, _state) + local offset, getchildren2_rep = parseGetChildren2Reply(buf) + if offset == -1 then + return false + end + + tree:add(f_count, getchildren2_rep.count) + for i, child in ipairs(getchildren2_rep.children) do + tree:add(f_child, child) + end + reprStat(getchildren2_rep.stat, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- SET ACLS packets + +local function parseSetAclRequest(buf) + local offset = 0 + local remain = buf:len() + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + local acls_offset, acls = parseAclsArray(buf(offset)) + if acls_offset == -1 then + return -1, nil + end + offset = offset + acls_offset + if offset + 4 > remain then + return -1, nil + end + local version = buf(offset, 4) + offset = offset + 4 + + return offset, { + path = path, + acls = acls, + version = version, + } +end + +local function dissectSetAclRequest(buf, pkt, tree, _state) + local offset, setacl_req = parseSetAclRequest(buf) + if offset == -1 then + return false + end + tree:add(f_path, setacl_req.path) + reprAclsArray(setacl_req.acls, tree) + tree:add(f_version, setacl_req.version) + return DissRes.Client +end + +local function parseSetAclReply(buf) + local offset = 0 + + local stat_offset, stat = parseStat(buf(offset)) + if stat_offset == -1 then + return -1, nil + end + offset = offset + stat_offset + + return offset, { + stat = stat, + } +end + +local function dissectSetAclReply(buf, pkt, tree, _state) + local offset, setacl_rep = parseSetAclReply(buf) + if offset == -1 then + return false + end + + reprStat(setacl_rep.stat, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- GET ACLS packets + +local function parseGetAclRequest(buf) + local offset = 0 + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + + return offset, { + path = path, + } +end + +local function dissectGetAclRequest(buf, pkt, tree, _state) + local offset, getacl_req = parseGetAclRequest(buf) + if offset == -1 then + return false + end + tree:add(f_path, getacl_req.path) + return DissRes.Client +end + +local function parseGetAclReply(buf) + local offset = 0 + + local acls_offset, acls = parseAclsArray(buf(offset)) + if acls_offset == -1 then + return -1, nil + end + offset = offset + acls_offset + local stat_offset, stat = parseStat(buf(offset)) + if stat_offset == -1 then + return -1, nil + end + offset = offset + stat_offset + + return offset, { + acls = acls, + stat = stat, + } +end + +local function dissectGetAclReply(buf, pkt, tree, _state) + local offset, getacl_rep = parseGetAclReply(buf) + if offset == -1 then + return false + end + reprAclsArray(getacl_rep.acls, tree) + reprStat(getacl_rep.stat, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- SET DATA packets + +local function parseSetDataRequest(buf) + local offset = 0 + local remain = buf:len() + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + local data_offset, data = parseString(buf(offset)) + if data_offset == -1 then + return -1, nil + end + offset = offset + data_offset + if offset + 4 > remain then + return -1, nil + end + local version = buf(offset, 4) + offset = offset + 4 + + return offset, { + path = path, + data = data, + version = version, + } +end + +local function reprSetDataRequest(setdata_req, tree) + tree:add(f_path, setdata_req.path) + tree:add(f_data, setdata_req.data) + tree:add(f_version, setdata_req.version) +end + +local function dissectSetDataRequest(buf, pkt, tree, _state) + local offset, setdata_req = parseSetDataRequest(buf) + if offset == -1 then + return false + end + reprSetDataRequest(setdata_req, tree) + return DissRes.Client +end + +local function parseSetDataReply(buf) + local offset = 0 + + local stat_offset, stat = parseStat(buf(offset)) + if stat_offset == -1 then + return -1, nil + end + offset = offset + stat_offset + + return offset, { + stat = stat, + } +end + +local reprSetDataReply = reprStat + +local function dissectSetDataReply(buf, pkt, tree, _state) + local offset, setdata_rep = parseSetDataReply(buf) + if offset == -1 then + return false + end + + reprSetDataReply(setdata_rep.stat, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- GET DATA packets + +local function parseGetDataRequest(buf) + local offset = 0 + local remain = buf:len() + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + if offset + 1 > remain then + return -1, nil + end + local watch = buf(offset, 1) + offset = offset + 1 + + return offset, { + path = path, + watch = watch, + } +end + +local function dissectGetDataRequest(buf, pkt, tree, _state) + local offset, getdata_req = parseGetDataRequest(buf) + if offset == -1 then + return false + end + tree:add(f_path, getdata_req.path) + tree:add(f_watch, getdata_req.watch) + return DissRes.Client +end + +local function parseGetDataReply(buf) + local offset = 0 + local data_offset, data = parseString(buf(offset)) + if data_offset == -1 then + return -1, nil + end + offset = offset + data_offset + local stat_offset, stat = parseStat(buf(offset)) + if stat_offset == -1 then + return -1, nil + end + offset = offset + stat_offset + + return offset, { + data = data, + stat = stat, + } +end + +local function dissectGetDataReply(buf, pkt, tree, _state) + local offset, getdata_rep = parseGetDataReply(buf) + if offset == -1 then + return false + end + tree:add(f_data, getdata_rep.data) + reprStat(getdata_rep.stat, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- CLOSE packets + +local function dissectCloseRequest(buf, pkt, tree, _state) + return DissRes.Client +end + +local function dissectCloseReply(buf, pkt, tree, state) + -- FIXME: Do this here or in top level somehow? + -- Clear all pending requests + for i, xid in ipairs(state.xids) do + state.xids[xid] = nil + end + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- DELETE packets + +local function parseDeleteRequest(buf) + local offset = 0 + local remain = buf:len() + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + if offset + 4 > remain then + return -1, nil + end + local version = buf(offset, 4) + offset = offset + 4 + + return offset, { + path = path, + version = version, + } +end + +local function reprDeleteRequest(delete_req, tree) + tree:add(f_path, delete_req.path) + tree:add(f_version, delete_req.version) +end + +local function dissectDeleteRequest(buf, pkt, tree, _state) + local offset, delete_req = parseDeleteRequest(buf) + if offset == -1 then + return false + end + reprDeleteRequest(delete_req, tree) + return DissRes.Client +end + +local function parseDeleteReply(buf) + -- Nothing to parse + return 0, {} +end + +local function reprDeleteReply(delete_rep, tree) + -- Nothing to repr + return +end + +-- reserved dispatch entry, currently disabled in dissectRepOpCode +local function dissectDeleteReply(buf, pkt, tree, _state) -- luacheck: ignore dissectDeleteReply + local offset = parseDeleteReply(buf) + if offset == -1 then + return false + end + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- EXISTS packets + +local function parseExistsRequest(buf) + local offset = 0 + local remain = buf:len() + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + if offset + 1 > remain then + return -1, nil + end + local watch = buf(offset, 1) + offset = offset + 1 + + return offset, { + path = path, + watch = watch, + } +end + +local function dissectExistsRequest(buf, pkt, tree, _state) + local offset, exists_req = parseExistsRequest(buf) + if offset == -1 then + return false + end + tree:add(f_path, exists_req.path) + tree:add(f_watch, exists_req.watch) + return DissRes.Client +end + +local function parseExistsReply(buf) + local offset = 0 + local stat_offset, stat = parseStat(buf(offset)) + if stat_offset == -1 then + return -1, nil + end + offset = offset + stat_offset + + return offset, { + stat = stat, + } +end + +local function dissectExistsReply(buf, pkt, tree, _state) + local offset, exists_rep = parseExistsReply(buf) + if offset == -1 then + return false + end + reprStat(exists_rep.stat, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- RECONFIG packets + +local function parseReconfigRequest(buf) + local offset = 0 + local remain = buf:len() + + local joining_offset, joining = parseString(buf(offset)) + if joining_offset == -1 then + return -1, nil + end + offset = offset + joining_offset + local leaving_offset, leaving = parseString(buf(offset)) + if leaving_offset == -1 then + return -1, nil + end + offset = offset + leaving_offset + local new_members_offset, new_members = parseString(buf(offset)) + if new_members_offset == -1 then + return -1, nil + end + offset = offset + new_members_offset + if offset + 8 > remain then + return -1, nil + end + local config_id = buf(offset, 8) + offset = offset + 8 + + return offset, + { + joining = joining, + leaving = leaving, + new_members = new_members, + config_id = config_id, + } +end + +local function reprReconfigRequest(reconfig_req, tree) + tree:add(f_joining, reconfig_req.joining) + tree:add(f_leaving, reconfig_req.leaving) + tree:add(f_newmembers, reconfig_req.new_members) + tree:add(f_config_id, reconfig_req.config_id) +end + +local function dissectReconfigRequest(buf, pkt, tree, _state) + local offset, reconfig_req = parseReconfigRequest(buf) + if offset == -1 then + return false + end + reprReconfigRequest(reconfig_req, tree) + return DissRes.Client +end + +local function parseReconfigReply(buf) + local offset = 0 + local data_offset, data = parseString(buf(offset)) + if data_offset == -1 then + return -1, nil + end + offset = offset + data_offset + local stat_offset, stat = parseStat(buf(offset)) + if stat_offset == -1 then + return -1, nil + end + offset = offset + stat_offset + + return offset, { + data = data, + stat = stat, + } +end + +local function reprReconfigReply(reconfig_rep, tree) + reprStat(reconfig_rep.stat, tree) +end + +local function dissectReconfigReply(buf, pkt, tree, _state) + local offset, reconfig_rep = parseReconfigReply(buf) + if offset == -1 then + return false + end + reprReconfigReply(reconfig_rep, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- SYNC packets + +local function parseSyncRequest(buf) + local offset = 0 + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + + return offset, { + path = path, + } +end + +local function reprSyncRequest(sync_req, tree) + tree:add(f_path, sync_req.path) +end + +local function dissectSyncRequest(buf, pkt, tree, _state) + local offset, sync_req = parseSyncRequest(buf) + if offset == -1 then + return false + end + tree:append_text(" [SYNC]") + reprSyncRequest(sync_req, tree) + return DissRes.Client +end + +local function parseSyncReply(buf) + local offset = 0 + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + + return offset, { + path = path, + } +end + +local function reprSyncReply(sync_rep, tree) + tree:add(f_path, sync_rep.path) +end + +local function dissectSyncReply(buf, pkt, tree, _state) + local offset, sync_rep = parseSyncReply(buf) + if offset == -1 then + return false + end + tree:append_text(" [SYNC REP]") + reprSyncReply(sync_rep, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- CREATE // CREATE2 // CREATE_TTL // CREATE_CONTAINER packets + +local function parseCreateRequest(buf) + local offset = 0 + local remain = buf:len() + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + local data_offset, data = parseString(buf(offset)) + if data_offset == -1 then + return -1, nil + end + offset = offset + data_offset + local acls_offset, acls = parseAclsArray(buf(offset)) + if acls_offset == -1 then + return -1, nil + end + offset = offset + acls_offset + if offset + 4 > remain then + return -1, nil + end + local flags = buf(offset, 4) + offset = offset + 4 + + return offset, { + path = path, + data = data, + acls = acls, + flags = flags, + } +end + +local function reprCreateRequest(create_req, tree) + tree:add(f_path, create_req.path) + tree:add(f_data, create_req.data) + reprAclsArray(create_req.acls, tree) + local t_flags = tree:add(f_flags, create_req.flags) + local ephemeral = (bit.band(create_req.flags:uint(), 0x1) == 1) + local sequence = (bit.band(create_req.flags:uint(), 0x2) == 2) + local container = (bit.band(create_req.flags:uint(), 0x4) == 4) + t_flags:add(f_ephemeral, ephemeral) + t_flags:add(f_sequence, sequence) + t_flags:add(f_container, container) +end + +local function dissectCreateRequest(buf, pkt, tree, _state) + local offset, create_req = parseCreateRequest(buf) + if offset == -1 then + return false + end + reprCreateRequest(create_req, tree) + return DissRes.Client +end + +local function parseCreateReply(buf) + local offset = 0 + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + + return offset, { + path = path, + } +end + +local function reprCreateReply(create_rep, tree) + tree:add(f_path, create_rep.path) +end + +local function dissectCreateReply(buf, pkt, tree, _state) + local offset, create_rep = parseCreateReply(buf) + if offset == -1 then + return false + end + reprCreateReply(create_rep, tree) + return DissRes.Server +end + +local parseCreate2Request = parseCreateRequest + +local reprCreate2Request = reprCreateRequest + +local function dissectCreate2Request(buf, pkt, tree, _state) + local offset, create_req = parseCreate2Request(buf) + if offset == -1 then + return false + end + reprCreate2Request(create_req, tree) + return DissRes.Client +end + +local function parseCreate2Reply(buf) + local offset = 0 + + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + + local stat_offset, stat = parseStat(buf(offset)) + if stat_offset == -1 then + return -1, nil + end + offset = offset + stat_offset + + return offset, { + path = path, + stat = stat, + } +end + +local function reprCreate2Reply(create_rep, tree) + tree:add(f_path, create_rep.path) + reprStat(create_rep.stat, tree) +end + +local function dissectCreate2Reply(buf, pkt, tree, _state) + local offset, create_rep = parseCreate2Reply(buf) + if offset == -1 then + return false + end + reprCreate2Reply(create_rep, tree) + return DissRes.Server +end + +local parseCreateContainerRequest = parseCreateRequest + +local reprCreateContainerRequest = reprCreateRequest + +local function dissectCreateContainerRequest(buf, pkt, tree, _state) + local offset, create_container_req = parseCreateContainerRequest(buf) + if offset == -1 then + return false + end + reprCreateContainerRequest(create_container_req, tree) + return DissRes.Client +end + +local parseCreateContainerReply = parseCreate2Reply + +local reprCreateContainerReply = reprCreate2Reply + +local function dissectCreateContainerReply(buf, pkt, tree, _state) + local offset, create_container_rep = parseCreateContainerReply(buf) + if offset == -1 then + return false + end + reprCreateContainerReply(create_container_rep, tree) + return DissRes.Server +end + +local function parseCreateTTLRequest(buf) + local offset = 0 + local remain = buf:len() + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + local data_offset, data = parseString(buf(offset)) + if data_offset == -1 then + return -1, nil + end + offset = offset + data_offset + local acls_offset, acls = parseAclsArray(buf(offset)) + if acls_offset == -1 then + return -1, nil + end + offset = offset + acls_offset + if offset + 4 > remain then + return -1, nil + end + local flags = buf(offset, 4) + offset = offset + 4 + if offset + 8 > remain then + return -1, nil + end + local ttl = buf(offset, 8) + offset = offset + 8 + + return offset, + { + path = path, + data = data, + acls = acls, + flags = flags, + ttl = ttl, + } +end + +local function reprCreateTTLRequest(create_ttl_req, tree) + tree:add(f_path, create_ttl_req.path) + tree:add(f_data, create_ttl_req.data) + reprAclsArray(create_ttl_req.acls, tree) + local t_flags = tree:add(f_flags, create_ttl_req.flags) + local ephemeral = (bit.band(create_ttl_req.flags:uint(), 0x1) == 1) + local sequence = (bit.band(create_ttl_req.flags:uint(), 0x2) == 2) + local container = (bit.band(create_ttl_req.flags:uint(), 0x4) == 4) + t_flags:add(f_ephemeral, ephemeral) + t_flags:add(f_sequence, sequence) + t_flags:add(f_container, container) + tree:add(f_ttl, create_ttl_req.ttl) +end + +local function dissectCreateTTLRequest(buf, pkt, tree, _state) + local offset, create_ttl_req = parseCreateTTLRequest(buf) + if offset == -1 then + return false + end + reprCreateTTLRequest(create_ttl_req, tree) + return DissRes.Client +end + +local parseCreateTTLReply = parseCreate2Reply + +local reprCreateTTLReply = reprCreate2Reply + +local function dissectCreateTTLReply(buf, pkt, tree, _state) + local offset, create_ttl_rep = parseCreateTTLReply(buf) + if offset == -1 then + return false + end + reprCreateTTLReply(create_ttl_rep, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- MULTI packets + +local parseReqOpCode = { + [1] = parseCreateRequest, + [2] = parseDeleteRequest, + [3] = parseExistsRequest, + [4] = parseGetDataRequest, + [5] = parseSetDataRequest, + [6] = parseGetAclRequest, + [7] = parseSetAclRequest, + [8] = parseGetChildrenRequest, + [9] = parseSyncRequest, + [12] = parseGetChildrenRequest, + [13] = parseCheckRequest, + [15] = parseCreate2Request, + [19] = parseCreateContainerRequest, + [21] = parseCreateTTLRequest, +} + +local parseRepOpCode = { + [1] = parseCreateReply, + [2] = parseDeleteReply, + [3] = parseExistsReply, + [4] = parseGetDataReply, + [5] = parseSetDataReply, + [6] = parseGetAclReply, + [7] = parseSetAclReply, + [8] = parseGetChildrenReply, + [9] = parseSyncReply, + [12] = parseGetChildren2Reply, + [13] = parseCheckReply, + [15] = parseCreate2Reply, + [19] = parseCreateContainerReply, + [21] = parseCreateTTLReply, +} + +local reprReqOpCode = { + [1] = reprCreateRequest, + [2] = reprDeleteRequest, + -- [3] = reprExistsRequest, + -- [4] = reprGetDataRequest, + [5] = reprSetDataRequest, + -- [6] = reprGetAclRequest, + -- [7] = reprSetAclRequest, + -- [8] = reprGetChildrenRequest, + [9] = reprSyncRequest, + -- [12] = reprGetChildrenRequest, + [13] = reprCheckRequest, + [15] = reprCreate2Request, + [19] = reprCreateContainerRequest, + [21] = reprCreateTTLRequest, +} + +local reprRepOpCode = { + [1] = reprCreateReply, + [2] = reprDeleteReply, + -- [3] = reprExistsReply, + -- [4] = reprGetDataReply, + [5] = reprSetDataReply, + -- [6] = reprGetAclReply, + -- [7] = reprSetAclReply, + -- [8] = reprGetChildrenReply, + [9] = reprSyncReply, + -- [12] = reprGetChildren2Reply, + [13] = reprCheckReply, + [15] = reprCreate2Reply, + [19] = reprCreateContainerReply, + [21] = reprCreateTTLReply, +} + +local function parseMultiRequest(buf) + local offset = 0 + local remain = buf:len() + local ops = {} + repeat + local start_offset = offset + if offset + 9 > remain then + return -1, nil + end + local opcode = buf(offset, 4) + local done = buf(offset + 4, 1) + local err = buf(offset + 5, 4) + -- print("XXX Multi opCode", offset, opcode, done, err) + offset = offset + 9 + if done:int() == 1 then + break + end + -- PARSE the opCode here + local req_parse_fun = parseReqOpCode[opcode:int()] + -- print("XXX Multi fun", req_parse_fun) + if req_parse_fun == nil then + return -1, nil + end + local req_offset, req_data = req_parse_fun(buf(offset)) + if req_offset == -1 then + return -1, nil + end + local req_raw_data = buf(offset, req_offset) + -- print("XXX Multi req_data", req_offset, req_data, req_raw_data) + offset = offset + req_offset + local op_data = buf(start_offset, 9 + req_offset) + + table.insert(ops, { + opcode = opcode, + done = done, + err = err, + req_data = req_data, + req_raw_data = req_raw_data, + op_data = op_data, + }) + until done == 1 + + return offset, { + ops = ops, + } +end + +local function dissectMultiRequest(buf, pkt, tree, _state) + local offset, multi_req = parseMultiRequest(buf) + if offset == -1 then + return false + end + + for i, op in ipairs(multi_req.ops) do + local t_multi = tree:add(f_op) + t_multi:add(f_opCode, op.opcode) + t_multi:add(f_done, op.done) + t_multi:add(f_err, op.err) + local reprFun = reprReqOpCode[op.opcode:int()] + if reprFun ~= nil then + reprFun(op.req_data, t_multi) + else + t_multi:add(f_data, op.req_raw_data) + end + end + + return DissRes.Client +end + +local function parseMultiReply(buf) + local offset = 0 + local remain = buf:len() + -- print("XXX Multi len", remain) + + local ops = {} + repeat + local start_offset = offset + if offset + 9 > remain then + return -1, nil + end + local opcode = buf(offset, 4) + local done = buf(offset + 4, 1) + local err = buf(offset + 5, 4) + -- print("XXX MultiRep opCode", offset, opcode, done, err) + offset = offset + 9 + if done:int() == 1 then + break + end + -- PARSE the opCode here + local rep_parse_fun = parseRepOpCode[opcode:int()] + -- print("XXX Multi fun", rep_parse_fun) + if rep_parse_fun == nil then + return -1, nil + end + local rep_offset, rep_data = rep_parse_fun(buf(offset)) + if rep_offset == -1 then + return -1, nil + end + local rep_raw_data = buf(offset, rep_offset) + -- print("XXX Multi rep_data", rep_offset, rep_data, rep_raw_data) + offset = offset + rep_offset + -- print("XXX Multi op_data", start_offset, offset) + local op_data = buf(start_offset, 9 + rep_offset) + + table.insert(ops, { + opcode = opcode, + done = done, + err = err, + rep_data = rep_data, + rep_raw_data = rep_raw_data, + op_data = op_data, + }) + until done == 1 + + return offset, { + ops = ops, + } +end + +local function dissectMultiReply(buf, pkt, tree, _state) + local offset, multi_rep = parseMultiReply(buf) + if offset == -1 then + return false + end + + for i, op in ipairs(multi_rep.ops) do + local t_multi = tree:add(f_op, op.op_data) + t_multi:add(f_opCode, op.opcode) + t_multi:add(f_done, op.done) + t_multi:add(f_err, op.err) + local reprFun = reprRepOpCode[op.opcode:int()] + if reprFun ~= nil then + reprFun(op.rep_data, t_multi) + else + t_multi:add(f_data, op.rep_raw_data) + end + end + + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- opCode dispatcher +local dissectReqOpCode = { + [-11] = dissectCloseRequest, + [1] = dissectCreateRequest, + [2] = dissectDeleteRequest, + [3] = dissectExistsRequest, + [4] = dissectGetDataRequest, + [5] = dissectSetDataRequest, + [6] = dissectGetAclRequest, + [7] = dissectSetAclRequest, + [8] = dissectGetChildrenRequest, + [9] = dissectSyncRequest, + [12] = dissectGetChildren2Request, + [13] = dissectCheckRequest, + [14] = dissectMultiRequest, + [15] = dissectCreate2Request, + [16] = dissectReconfigRequest, + [19] = dissectCreateContainerRequest, + [21] = dissectCreateTTLRequest, +} + +local dissectRepOpCode = { + [-11] = dissectCloseReply, + [1] = dissectCreateReply, + -- [2] = dissectDeleteReply, + [3] = dissectExistsReply, + [4] = dissectGetDataReply, + [5] = dissectSetDataReply, + [6] = dissectGetAclReply, + [7] = dissectSetAclReply, + [8] = dissectGetChildrenReply, + [9] = dissectSyncReply, + [12] = dissectGetChildren2Reply, + -- [13] = dissectCheckReply, + [14] = dissectMultiReply, + [15] = dissectCreate2Reply, + [16] = dissectReconfigReply, + [19] = dissectCreateContainerReply, + [21] = dissectCreateTTLReply, +} + +local function dispatchOpCodeDissector(buf, pkt, tree, state, opCode) + -- Dissect a request/reply based on opCode (with a default fallback) + if state.dir == Direction.Client2Server then + return dispatch(dissectReqOpCode, opCode)(buf, pkt, tree, state) + elseif state.dir == Direction.Server2Client then + return dispatch(dissectRepOpCode, opCode)(buf, pkt, tree, state) + elseif state.dir == nil then + -- Try to parse as client packet then as server packet + local res = dispatch(dissectReqOpCode, opCode)(buf, pkt, tree, state) + if res == false then + res = dispatch(dissectRepOpCode, opCode)(buf, pkt, tree, state) + end + return res + end +end + +------------------------------------------------------------------------------ +-- 4LW + +local function dissect4lw(buf, pkt, tree) + local fourlw = buf(0, 4):string() + local res + if FOUR_LETTER_WORDS[fourlw] ~= nil then + pkt.cols.info:set(string.format("4LW %s request", fourlw)) + res = Direction.Client2Server + else + pkt.cols.info:set("4LW reply") + res = true -- Direction.Server2Client + end + tree:append_text(" [4LW]") + tree:add(f_4lw, buf()) + return res +end + +------------------------------------------------------------------------------ +-- Watch Event + +local function parseWatchEvent(buf) + local offset = 0 + local remain = buf:len() + -- Result fields + local result_offset, result = parseResult(buf(offset)) + if result_offset == -1 then + return -1, nil + end + offset = offset + result_offset + if offset + 4 > remain then + return -1, nil + end + local eventtype = buf(offset, 4) + offset = offset + 4 + if offset + 4 > remain then + return -1, nil + end + local state = buf(offset, 4) + offset = offset + 4 + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + + return offset, + { + result = result, + eventtype = eventtype, + state = state, + path = path, + } +end + +local function dissectWatchEvent(buf, pkt, tree) + local _, watchevent = parseWatchEvent(buf) + pkt.cols.info:set("WATCH EVENT") + tree:append_text(string.format(" [WATCH EVENT: %s]", watchEventTypes[watchevent.eventtype:int()])) + local t_zxid = tree:add(f_zxid, watchevent.result.zxid) + t_zxid:add(f_zxid_epoch, watchevent.result.zxid(0, 4)) + t_zxid:add(f_zxid_count, watchevent.result.zxid(4, 4)) + tree:add(f_err, watchevent.result.err) + tree:add(f_eventtype, watchevent.eventtype) + tree:add(f_state, watchevent.state) + tree:add(f_path, watchevent.path) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- SETWATCHES + +-- XXX: Untested! + +local function parseSetWatchesRequest(buf) + local offset = 0 + local remain = buf:len() + + if offset + 4 > remain then + return -1, nil + end + local dataw_num = buf(offset, 4) + offset = offset + 4 + local dataw = {} + for i = 0, dataw_num:uint() - 1 do + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + table:insert(dataw, path) + end + if offset + 4 > remain then + return -1, nil + end + local existsw_num = buf(offset, 4) + offset = offset + 4 + local existsw = {} + for i = 0, existsw_num:uint() - 1 do + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + table:insert(existsw, path) + end + if offset + 4 > remain then + return -1, nil + end + local childw_num = buf(offset, 4) + offset = offset + 4 + local childw = {} + for i = 0, childw_num:uint() - 1 do + local path_offset, path = parseString(buf(offset)) + if path_offset == -1 then + return -1, nil + end + offset = offset + path_offset + table:insert(childw, path) + end + + return offset, + { + dataw_num = dataw_num, + dataw = dataw, + existsw_num = existsw_num, + existsw = existsw, + childw_num = childw_num, + childw = childw, + } +end + +local function reprSetWatchesRequest(setwatches_req, tree) + local t_dataw = tree:add(f_op) -- "Data Watches" + t_dataw:add(f_count, setwatches_req.dataw_num) + for i, path in ipairs(setwatches_req.dataw) do + t_dataw:add(f_path, path) + end + local t_existsw = tree:add(f_op) -- "Exists Watches" + t_existsw:add(f_count, setwatches_req.existsw_num) + for i, path in ipairs(setwatches_req.existsw) do + t_existsw:add(f_path, path) + end + local t_childw = tree:add(f_op) -- "Children Watches" + t_childw:add(f_count, setwatches_req.childw_num) + for i, path in ipairs(setwatches_req.childw) do + t_childw:add(f_path, path) + end +end + +local function dissectSetWatchesRequest(buf, pkt, tree, _state) + local offset, setwatches_req = parseSetWatchesRequest(buf) + if offset == -1 then + return false + end + pkt.cols.info:set("SETWATCHES REQUEST") + tree:append_text(" [SETWATCHES REQUEST]") + reprSetWatchesRequest(setwatches_req, tree) + return DissRes.Client +end + +------------------------------------------------------------------------------ +-- AUTH + +local function parseSetAuthRequest(buf) + local offset = 0 + local remain = buf:len() + + if offset + 4 > remain then + return -1, nil + end + local authtype = buf(offset, 4) + offset = offset + 4 + local scheme_offset, scheme = parseString(buf(offset)) + if scheme_offset == -1 then + return -1, nil + end + offset = offset + scheme_offset + local credential_offset, credential = parseString(buf(offset)) + if credential_offset == -1 then + return -1, nil + end + offset = offset + credential_offset + + return offset, { + authtype = authtype, + scheme = scheme, + credential = credential, + } +end + +local function reprSetAuthRequest(setauth_req, tree) + tree:add(f_authtype, setauth_req.authtype) + tree:add(f_scheme, setauth_req.scheme) + tree:add(f_credential, setauth_req.credential) +end + +local parseAuthReqOpCode = { + [100] = parseSetAuthRequest, +} + +local reprAuthReqOpCode = { + [100] = reprSetAuthRequest, +} + +local function parseAuthRequest(buf) + local offset = 0 + local remain = buf:len() + + if offset + 4 > remain then + return -1, nil + end + local opcode = buf(offset, 4) + offset = offset + 4 + + local req_parse_fun = parseAuthReqOpCode[opcode:int()] + if req_parse_fun == nil then + return -1, nil + end + + local authdata_offset, authdata = req_parse_fun(buf(offset)) + if authdata_offset == -1 then + return -1, nil + end + offset = offset + authdata_offset + + return offset, { + opcode = opcode, + authdata = authdata, + } +end + +local function dissectAuthRequest(buf, pkt, tree, _state) + local offset, auth_req = parseAuthRequest(buf) + if offset == -1 then + return false + end + + pkt.cols.info:set("AUTH REQUEST") + tree:append_text(" [AUTH REQ]") + tree:add(f_opCode, auth_req.opcode) + local req_repr_fun = reprAuthReqOpCode[auth_req.opcode:int()] + if req_repr_fun == nil then + tree:add(f_data, auth_req.authdata) + else + req_repr_fun(auth_req.authdata, tree) + end + return DissRes.Client +end + +local function parseAuthReply(buf) + local offset = 0 + + local result_offset, result = parseResult(buf(offset)) + if result_offset == -1 then + return false + end + offset = offset + result_offset + + return offset, { + result = result, + } +end + +local function dissectAuthReply(buf, pkt, tree, _state) + local offset, auth_rep = parseAuthReply(buf) + if offset == -1 then + return false + end + + pkt.cols.info:set("AUTH REPLY") + tree:append_text(" [AUTH REP]") + + reprResult(auth_rep.result, tree) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- CONNECT + +local function parseConnectRequest(buf) + local offset = 0 + local remain = buf:len() + if offset + 4 > remain then + return -1, nil + end + local protoversion = buf(offset, 4) + offset = offset + 4 + if offset + 8 > remain then + return -1, nil + end + local zxid = buf(offset, 8) + offset = offset + 8 + if offset + 4 > remain then + return -1, nil + end + local timeout = buf(offset, 4) + offset = offset + 4 + if offset + 8 > remain then + return -1, nil + end + local session = buf(offset, 8) + offset = offset + 8 + local passwd_offset, passwd = parseString(buf(offset)) + if passwd_offset == -1 then + return -1, nil + end + offset = offset + passwd_offset + if offset + 1 > remain then + return -1, nil + end + local readonly = buf(offset, 1) + offset = offset + 1 + + return offset, + { + protoversion = protoversion, + zxid = zxid, + timeout = timeout, + session = session, + passwd = passwd, + readonly = readonly, + } +end + +local function dissectConnectRequest(buf, pkt, tree) + local offset, conn_req = parseConnectRequest(buf) + if offset == -1 then + return false + end + pkt.cols.info:set("CONNECT REQUEST") + tree:append_text(" [CONNECT REQ]") + tree:add(f_protoversion, conn_req.protoversion) + tree:add(f_zxid, conn_req.zxid) + tree:add(f_timeout, conn_req.timeout) + tree:add(f_session, conn_req.session) + tree:add(f_passwd, conn_req.passwd) + tree:add(f_readonly, conn_req.readonly) + return DissRes.Client +end + +local function parseConnectReply(buf) + local offset = 0 + local remain = buf:len() + if offset + 4 > remain then + return -1, nil + end + local protoversion = buf(offset, 4) + offset = offset + 4 + if offset + 4 > remain then + return -1, nil + end + local timeout = buf(offset, 4) + offset = offset + 4 + if offset + 8 > remain then + return -1, nil + end + local session = buf(offset, 8) + offset = offset + 8 + local passwd_offset, passwd = parseString(buf(offset)) + if passwd_offset == -1 then + return -1, nil + end + offset = offset + passwd_offset + if offset + 1 > remain then + return -1, nil + end + local readonly = buf(offset, 1) + offset = offset + 1 + + return offset, + { + protoversion = protoversion, + timeout = timeout, + session = session, + passwd = passwd, + readonly = readonly, + } +end + +local function dissectConnectReply(buf, pkt, tree) + local offset, conn_rep = parseConnectReply(buf) + if offset == -1 then + return false + end + pkt.cols.info:set("CONNECT REPLY") + tree:append_text(" [CONNECT REP]") + tree:add(f_protoversion, conn_rep.protoversion) + tree:add(f_timeout, conn_rep.timeout) + tree:add(f_session, conn_rep.session) + tree:add(f_passwd, conn_rep.passwd) + tree:add(f_readonly, conn_rep.readonly) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- PING + +local function dissectPingRequest(buf, pkt, tree) + tree:append_text(" [PING]") + if buf:len() ~= 4 then + return false + end + tree:add(f_opCode, buf(0, 4)) + return DissRes.Client +end + +local function dissectPingReply(buf, pkt, tree) + tree:append_text(" [PING REP]") + if buf:len() ~= 12 then + return false + end + -- XXX: Parse ping reply payload + tree:add(f_data, buf(0, 12)) + return DissRes.Server +end + +------------------------------------------------------------------------------ +-- Special XID dispatcher +local dissectReqXID = { + [0] = dissectConnectRequest, + [-2] = dissectPingRequest, + [-4] = dissectAuthRequest, + [-8] = dissectSetWatchesRequest, +} + +local dissectRepXID = { + [0] = dissectConnectReply, + [-1] = dissectWatchEvent, + [-2] = dissectPingReply, + [-4] = dissectAuthReply, +} + +local function dispatchXIDDissector(buf, pkt, tree, state, xid) + -- print("xid", xid) + if state.dir == Direction.Client2Server then + return dispatch(dissectReqXID, xid)(buf, pkt, tree) + elseif state.dir == Direction.Server2Client then + return dispatch(dissectRepXID, xid)(buf, pkt, tree) + elseif state.dir == nil then + -- Try to parse as client packet then as server packet + local res = dispatch(dissectReqXID, xid)(buf, pkt, tree) + if res == false then + res = dispatch(dissectRepXID, xid)(buf, pkt, tree) + end + return res + end +end + +------------------------------------------------------------------------------ +local function dissect(buf, pkt, tree, state) + local offset = 0 + local remain = buf:len() + + -- We need at list 8 bytes for len+xid + if offset + 8 > remain then + return false + end + + tree:add(f_len, buf(offset, 4)) + offset = offset + 4 + local xidBuf = buf(offset, 4) + local xid = xidBuf:int() + if xid <= 0 then + if FIXED_XIDS[xid] == nil then + return false + end + -- NOTE: CONNECT packet starts *on* the xid, so for those, do not + -- extract field/update offset + if xid ~= 0 then + tree:add(f_xid, xidBuf) + offset = offset + 4 + end + return dispatchXIDDissector(buf(offset), pkt, tree, state, xid) + else + -- Regular operation + tree:add(f_xid, xidBuf) + offset = offset + 4 + local opCode + if state.dir == Direction.Client2Server then + -- New request, record the opCode + local opCodeBuf = buf(offset, 4) + tree:add(f_opCode, opCodeBuf) + offset = offset + 4 + -- record the opCode + opCode = opCodeBuf:int() + state.xids[xid] = opCode + tree:append_text(string.format(" [%s]", opCodes[opCode])) + elseif state.dir == Direction.Server2Client then + -- Reply, read return status + opCode = state.xids[xid] + -- print("opCode", opCode) + if opCode ~= nil then + -- state.xids[xid] = nil + tree:add(f_opCode, xidBuf, opCode) -- XXX.set_generated() + tree:append_text(string.format(" [%s REP]", opCodes[opCode])) + end + local result_offset, result = parseResult(buf(offset)) + if result_offset == -1 then + return false + end + offset = offset + result_offset + reprResult(result, tree) + else + -- We don't know the direction. + return false + end + if offset == remain then + return state.dir + end + -- check if we know about this XID + if opCode == nil then + -- We don't know about this request, dump the payload + tree:add(f_data, buf(offset)) + return DissRes.Server + else + return dispatchOpCodeDissector(buf(offset), pkt, tree, state, opCode) + end + end +end + +-- debugging helper, only used from commented-out PRINT statements +local function dump(o) -- luacheck: ignore dump + if type(o) == "table" then + local s = "{ " + for k, v in pairs(o) do + if type(k) ~= "number" then + k = '"' .. k .. '"' + end + s = s .. "[" .. k .. "] = " .. dump(v) .. "," + end + return s .. "} " + else + return tostring(o) + end +end + +------------------------------------------------------------------------------ +ZabProto = Proto("ZAB", "ZAB 1.0") + +local default_settings = { + port = DEFAULT_ZAB_PORT, -- Since a client may talk to many servers, on different ports, this should be the client port + ports = { DEFAULT_ZAB_PORT }, +} + +ZabProto.prefs.port = Pref.uint("Port number", default_settings.port, "The TCP port number for ZAB") + +ZabProto.fields = { + f_pkt, + f_op, -- Structural fields + f_4lw, + f_len, + f_xid, + f_data, + f_opCode, + f_path, + f_watch, + f_protoversion, + f_zxid, + f_zxid_epoch, + f_zxid_count, + f_timeout, + f_session, + f_authtype, + f_perms, + f_scheme, + f_credential, + f_datalength, + f_flags, + f_ephemeral, + f_sequence, + f_container, + f_ttl, + f_joining, + f_leaving, + f_newmembers, + f_config_id, + f_done, + f_err, + f_version, + f_eventtype, + f_state, + f_passwd, + f_readonly, + f_count, + f_child, + f_czxid, + f_czxid_epoch, + f_czxid_count, + f_mzxid, + f_mzxid_epoch, + f_mzxid_count, + f_ctime, + f_mtime, + f_cversion, + f_aversion, + f_ephemeralowner, + f_numchildren, + f_pzxid, + f_pzxid_epoch, + f_pzxid_count, +} + +function ZabProto.dissector(buf, pkt, root) + if buf:reported_len() > buf:len() then + -- Truncated capture, ignore + pkt.cols.info:set("TRUNCATED") + return 0 + end + + pkt.cols.protocol = ZabProto.name + local tree = root:add(ZabProto, buf()) + + -- Memorize the sender/recipient to categorize below + local sender = string.format("%s:%s", pkt.src, pkt.src_port) + local recipient = string.format("%s:%s", pkt.dst, pkt.dst_port) + + local state = { sender = sender, recipient = recipient, dir = nil, xids = nil } + if CLIENTS[sender] ~= nil then + state.xids = CLIENTS[sender] + state.dir = Direction.Client2Server + elseif CLIENTS[recipient] ~= nil then + state.xids = CLIENTS[recipient] + state.dir = Direction.Server2Client + end + + -- Handle fragmentation or combining of packets + -- https://wiki.wireshark.org/Lua/Dissectors#TCP_reassembly + local res + local start_offset = 0 -- current start of a packet + local remain = buf:len() + + -- Handle multiple ZK packets in the TVB + repeat + local offset = start_offset + + if (remain - offset) < 4 then + -- Didn't get enough to even read a length + -- Ask Wireshard for more data + -- print("Fragmented, too small", remain) + pkt.desegment_offset = 0 + pkt.desegment_len = DESEGMENT_ONE_MORE_SEGMENT + return + end + + local packet_length = buf(offset, 4):uint() + offset = offset + 4 + -- print("Debug", start_offset, packet_length, offset, remain) + if packet_length >= 1094795585 then + -- Looks like plain text. + -- This is 'AAAA' as int (or a length of about 1GB) + packet_length = remain -- 4lw eats the whole packet + local pktBuf = buf(start_offset) + local t_pkt = tree:add(f_pkt, pktBuf) + res = dissect4lw(pktBuf, pkt, t_pkt) + elseif packet_length > (remain - offset) then + pkt.desegment_offset = start_offset -- restart @ packet start + pkt.desegment_len = packet_length - (remain - offset) + -- print("Fragmented", pkt.desegment_offset, pkt.desegment_len) + return + else -- packet_length <= buf:len() + -- We can parse at least one packet, from start_offset, [length, packet] + local pktBuf = buf(start_offset, 4 + packet_length) + local t_pkt = tree:add(f_pkt, pktBuf) + res = dissect(pktBuf, pkt, t_pkt, state) + end + + if res == false then + -- Dissect failed + -- print("FAIL") + return 0 + elseif res == DissRes.Client then + -- Keep a hash of XIDs for that client + if CLIENTS[sender] == nil then + -- print("NEW CLIENT", sender) + CLIENTS[sender] = {} + end + elseif res == DissRes.Server then + if CLIENTS[recipient] == nil then + -- print("NEW CLIENT", recipient) + CLIENTS[recipient] = {} + end + end + -- res is anything else (e.g. true) -- nothing further to do + -- Move forward by a packet_len field + the packet length + start_offset = start_offset + 4 + packet_length + + -- Did we reach the end? + until start_offset == remain + + -- print("State:", dump(CLIENTS)) +end + +---------------------------------------- +-- a function for handling prefs being changed +function ZabProto.prefs_changed() + if default_settings.port ~= ZabProto.prefs.port then + local tcp_dissector_table = DissectorTable.get("tcp.port") + -- remove all previously registered ports + for _, port in ipairs(default_settings.ports) do + tcp_dissector_table:remove(port, ZabProto) + end + -- set our new default + default_settings.port = ZabProto.prefs.port + default_settings.ports = { default_settings.port } + -- add the new one, if not 0 + if default_settings.port ~= 0 then + tcp_dissector_table:add(default_settings.port, ZabProto) + end + end +end + +function ZabProto.init() + local tcp_dissector_table = DissectorTable.get("tcp.port") + tcp_dissector_table:add_for_decode_as(ZabProto) + for _, port in ipairs(default_settings.ports) do + tcp_dissector_table:add(port, ZabProto) + end +end + +---------------------------------------- +-- for testing purposes, we want to be able to pass in changes to the defaults +-- from the command line; because you can't set lua preferences from the command +-- line using the '-o' switch (the preferences don't exist until this script is +-- loaded, so the command line thinks they're invalid preferences being set) +-- so we pass them in as command arguments instead, and handle it here: +local function apply_cli_args(args) + for i = 1, #args do + local name, value = args[i]:match("(.+)=(.+)") + if not name or not value then + error("invalid commandline argument syntax") + end + + if name == "port" then + local port = tonumber(value) + if not port then + error("invalid commandline argument value") + end + default_settings.port = port + default_settings.ports = { port } + elseif name == "ports" then + local new_ports = {} + for port_str in string.gmatch(value, "([^,]+)") do + local port = tonumber(port_str) + if not port then + error("invalid commandline argument value") + end + table.insert(new_ports, port) + end + if #new_ports == 0 then + error("invalid commandline argument value") + end + default_settings.ports = new_ports + default_settings.port = new_ports[1] + else + error("invalid commandline argument syntax") + end + end +end + +local args = { ... } -- get passed-in args +if args and #args > 0 then + apply_cli_args(args) +end diff --git a/dissectors/zap-rpc/LICENSE b/dissectors/zap-rpc/LICENSE new file mode 100644 index 0000000..ad410e1 --- /dev/null +++ b/dissectors/zap-rpc/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/dissectors/zap-rpc/Makefile b/dissectors/zap-rpc/Makefile new file mode 100644 index 0000000..e1401b6 --- /dev/null +++ b/dissectors/zap-rpc/Makefile @@ -0,0 +1,49 @@ +CAPNP = capnp +CAT = /bin/cat +SCHEMA = /usr/local/include/capnp/schema.capnp +TARGET = $(basename $(notdir $(input))) + +define MSG +The purpose of this Makefile is to generate new schemas for the capnp dissector. + +Usage: + make schema input=/path/to/schema-file.capnp + +This will produce a plugins/schema-file_capnp.lua source file. +Any types in that schema is then loaded and used automagically +by the capnp protocol dissector. +endef +export MSG + +define HEAD +local capnp_schema = require("capnp_schema") + +-- fake atoms +local void = "void" +local empty = "empty" +local bit = "bit" +local byte = 1 +local twoBytes = 2 +local fourBytes = 4 +local eightBytes = 8 +local pointer = "pointer" +local inlineComposite = "inlineComposite" +local opaquePointer = "opaquePointer" + +capnp_schema["$(TARGET)"] = +endef +export HEAD + +all: + @echo "$$MSG" + +schema: $(input) plugins/$(TARGET)_capnp.lua + +%.lua: Makefile $(input) + echo "$$HEAD" > $@ + $(CAPNP) compile -o$(CAT) $(input) -I/ |\ + $(CAPNP) decode $(SCHEMA) CodeGeneratorRequest |\ + sed -e 's/[[(]/{/g' -e 's/[])]/}/g' \ + -e 's//opaquePointer/g' \ + -e 's/\([Ii]d = \)\([0-9][0-9]*\)/\1"\2"/g' \ + -e 's/\(StructType = \)\([0-9][0-9]*\)/\1"\2"/g' >> $@ diff --git a/dissectors/zap-rpc/README.md b/dissectors/zap-rpc/README.md new file mode 100644 index 0000000..248a175 --- /dev/null +++ b/dissectors/zap-rpc/README.md @@ -0,0 +1,56 @@ +# ZAP RPC / Cap'n Proto RPC + +Dissecteur Wireshark Lua du **protocole RPC de ZAP**, compatible au niveau +filaire avec le **protocole RPC de Cap'n Proto** : découpage en segments +de mots de 8 octets avec réassemblage TCP, décodage des pointeurs +(structures, listes, capacités) et interprétation des messages selon le +schéma RPC Cap'n Proto embarqué (`restore`, `call`, `return`, `finish`, +`release`, `disembargo`…), avec un résumé lisible dans la colonne Info. +Ports TCP et UDP 9090 par défaut, modifiables dans les préférences. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/zap-proto/wireshark (dossier `plugins/` et `Makefile`) | +| Commit importé | `0bb9036244f2ac83f52b4d3eb6f2d6af8568ec92` du 19/06/2026 (branche `main`, dernier commit : « rebrand: ZAP user-facing identity ») | +| Licence amont | Apache-2.0 (fichier `LICENSE`, copié ici ; en-tête de `capnp.lua` : « Copyright 2014, Andreas Stenius », Apache 2.0) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Cap'n Proto / ZAP natif | + +Le dépôt amont n'est pas déclaré comme fork sur GitHub, mais son code +provient de https://github.com/kaos/wireshark-plugins (Andreas Stenius, +Apache-2.0) ; la version ZAP en reprend l'historique et renomme les +libellés visibles (« ZAP RPC Protocol », colonne Protocole « ZAP »). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `capnp.lua` | Protocole `capnp` (« ZAP RPC Protocol ») : décodage du format filaire et des messages RPC | +| `capnp_schema.lua` | Module de registre des schémas, chargé par `require("capnp_schema")` | +| `rpc_capnp.lua` | Schéma `rpc.capnp` de Cap'n Proto compilé en table Lua (généré, sans commentaires) | +| `Makefile` | Génère d'autres schémas : `make schema input=/chemin/schema.capnp` (nécessite l'outil `capnp`) | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête des `.lua`. La capture d'écran amont +n'est pas importée. + +## Utilisation + +Copier les trois fichiers `.lua` **ensemble** dans le même dossier +`plugins` de Wireshark (ex. `~/.local/lib/wireshark/plugins/`) : +`capnp.lua` et `rpc_capnp.lua` chargent le module `capnp_schema` par +`require`, ce qui suppose que ce dossier figure dans `package.path`. +Recharger les plugins Lua, régler le port si besoin, puis filtrer avec +`capnp`. + +## Remarques + +- Le nom de protocole `capnp` est générique : conflit possible avec un + autre plugin Cap'n Proto installé en parallèle. +- `rpc_capnp.lua` a été généré à partir de `rpc.capnp` (projet Cap'n + Proto, licence MIT) ; il ne contient que la structure du schéma. +- Le suivi des requêtes / réponses repose sur l'ordre des paquets + (avertissement de l'amont) : les identifiants peuvent être mal associés + lors d'une re-dissection. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/zap-rpc/capnp.lua b/dissectors/zap-rpc/capnp.lua new file mode 100644 index 0000000..d8a51e1 --- /dev/null +++ b/dissectors/zap-rpc/capnp.lua @@ -0,0 +1,700 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/zap-proto/wireshark (plugins/capnp.lua), +-- commit 0bb9036244f2ac83f52b4d3eb6f2d6af8568ec92 du 19/06/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- +-- Copyright 2014, Andreas Stenius +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +local capnp_schema = require("capnp_schema") + +local proto = Proto("capnp", "ZAP RPC Protocol") +local tcp_port, udp_port +local dir_marker = {} +local dir +local reqs = {} + +proto.fields.text = ProtoField.string("capnp.text", "Text") +proto.prefs["tcp.port"] = Pref.uint( + "TCP Port", 9090, + "Set the tcp port for ZAP RPC messages.") +proto.prefs["udp.port"] = Pref.uint( + "UDP Port", 9090, + "Set the udp port for ZAP RPC messages.") +proto.prefs.to_port = Pref.string("Direction marker, to port", "->", "") +proto.prefs.from_port = Pref.string("Direction marker, from port", "<-", "") + +local dissect = {} +local fileNode, messageNode + +function proto.dissector(buf, pkt, root) + pkt.cols.protocol:set("ZAP") + + -- didn't find any reliable way to see if it is a TCP or UDP packet! + dir = pkt.dst_port == tcp_port or pkt.dst_port == udp_port + + local desc + while buf:len() > 0 do + local d + buf, d = dissect.message(buf, pkt, root) + if buf == nil then + -- More data needed + return + end + if desc then + desc = desc .. ", ..." + else + desc = d + end + end + + local marker = dir_marker[dir] or "" + pkt.cols.info:set(marker .. desc) +end + +local function unregister(name, port) + if port then + DissectorTable.get(name):remove(port, proto) + end +end + +local function register(name, port) + if port then + DissectorTable.get(name):add(port, proto) + end +end + +local function update_dissector_port(name, port) + if proto.prefs[name] ~= port then + unregister(name, port) + port = proto.prefs[name] + register(name, port) + end + return port +end + +function proto.init() + dir_marker[true] = proto.prefs.to_port .. " " + dir_marker[false] = proto.prefs.from_port .. " " + reqs[true] = {} + reqs[false] = {} + + tcp_port = update_dissector_port("tcp.port", tcp_port) + udp_port = update_dissector_port("udp.port", udp_port) +end + + +-------------------------------------------------------------------------------- +-- Dissect routines +-------------------------------------------------------------------------------- + +function dissect.message(buf, pkt, root) + local count = buf(0,4):le_uint() + 1 + local seg_table_size = 8 * (1 + count // 2) + + -- Check that the whole message is in the buffer + local message_size = seg_table_size + if message_size <= buf:len() then + -- Enough bytes to calculate the segment sizes + for i = 1, count do + local size = buf(4 * i, 4):le_uint() * 8 + message_size = message_size + size + end + end + if message_size > buf:len() then + -- Ask Wireshark to call again when enough data is available + local missing = message_size - buf:len() + pkt.desegment_len = missing + return + end + + local data = buf(seg_table_size):tvb() + local segs = {} + local tree = root:add(proto, buf(0, seg_table_size)) + local seg_tree = tree:add(buf(0,4), "Segments:", count) + + reqs.dir = dir + reqs.id = nil + + -- decode segments header + for i = 1, count do + local b_size = buf(4 * i, 4) + local size = b_size:le_uint() * 8 + segs[i - 1] = data(0, size):tvb() + seg_tree + :add(b_size, "Segment:", i - 1, "(", size / 8, "words )") + :add(data(0, size), "Data (", size, "bytes )") + data = data(size):tvb() + end + + if not fileNode then + fileNode = capnp_schema("id", capnp_schema.rpc.requestedFiles[1].id) + local messageId = capnp_schema("name", "Message", fileNode.nestedNodes).id + messageNode = capnp_schema("id", messageId) + end + + local msg = dissect.ptr( + 0, 0, segs, pkt, tree:add(segs[0](0,8), "Root"), messageNode) + local desc = dissect.describe_message(msg) + if desc then + tree:append_text(": " .. desc) + end + + return data, desc +end + +function dissect.ptr(seg, pos, segs, pkt, tree, node) + local kind = segs[seg](pos, 1):bitfield(6, 2) + local dis = function () + local ref = segs[seg](pos, 8):tvb() + print(table.concat( + {"packet", pkt.number, seg, pos, + "unknown (or NYI) pointer", tostring(ref)}, " ")) + end + + if kind == 0 then + local null = tostring(segs[seg](pos,8):le_uint64()) == "0" + if null then + tree:append_text(": " .. node.name .. " = null") + return + else + dis = dissect.struct + end + elseif kind == 1 then + dis = dissect.list + elseif kind == 2 then + -- far ptr, NYI + elseif kind == 3 then + if segs[seg](pos, 4):le_uint() == 3 then + dis = dissect.cap + end + end + + return dis(seg, pos, segs, pkt, tree, node) +end + +function dissect.struct(seg, pos, segs, pkt, tree, node, override_offset) + local buf = segs[seg] + local offset = override_offset or buf(pos, 4):le_int() / 4 + local dsize = buf(pos + 4, 2):le_uint() + local psize = buf(pos + 6, 2):le_uint() + local b_data = buf(pos + (offset + 1) * 8, dsize * 8):tvb() + local ptr_offset = pos + (dsize + offset + 1) * 8 + local b_ptr = buf(ptr_offset, psize * 8):tvb() + + local struct_tree = tree:add("(raw struct)") + struct_tree:add(buf(pos, 4), "Data offset:", offset) + local data_tree = struct_tree:add(buf(pos + 4, 2), "Data (", dsize, "words )") + if dsize > 0 then + data_tree:add(b_data(0), "Data (", b_data:len(), "bytes )") + end + local ptr_tree = struct_tree:add(buf(pos + 6, 2), "Pointers:", psize) + if psize > 0 then + ptr_tree:add(b_ptr(0), "Data (", b_ptr:len(), "bytes )") + end + + local discriminantValue, discriminantField + = dissect.struct_discriminant(b_data, node.struct, data_tree) + + + tree:append_text(": " .. node.name .. (discriminantField and ", union: " .. discriminantField.name or "")) + local fields = {} + if node.struct then + local fields_tree = tree:add( + buf(pos + (offset + 1) * 8, (dsize + psize) * 8), + "Fields") + + fields = dissect.struct_fields( + b_data, b_ptr, ptr_offset, psize, discriminantValue, + seg, segs, pkt, fields_tree, node) + else + for i = 0, psize - 1 do + dissect.ptr( + seg, ptr_offset + (i * 8), segs, pkt, + ptr_tree:add(b_ptr(i * 8, 8), "Pointer", i), + { name = "" }) + end + end + + return { struct = { + schema = node, + discriminant = discriminantField, + fields = fields + }} +end + +function dissect.struct_discriminant(buf, struct, tree, label) + local discriminant = struct and struct.discriminantCount > 0 + if not discriminant then + return false, nil, tree + end + + local data = buf(struct.discriminantOffset * 2, 2) + discriminant = data:le_uint() + + for _, f in ipairs(struct.fields) do + if f.discriminantValue == discriminant then + return discriminant, f, tree:add( + data, (label or "Union") .. ", tag:", discriminant, "(", f.name, ")") + end + end +end + +-- Notice: only default values for bool fields are currently implemented! +function dissect.struct_fields(b_data, b_ptr, ptrs, psize, discriminant, + seg, segs, pkt, tree, node) + local res = {} + local fields = node.struct.fields + + if not fields then return res end + + for _, f in ipairs(fields) do + repeat + if f.discriminantValue < 0xffff and + f.discriminantValue ~= discriminant + then break end + if f.group then + local group = capnp_schema("id", f.group.typeId) + local group_discriminantValue, group_discriminantField, group_tree + = dissect.struct_discriminant(b_data, group.struct, tree, f.name) + res[f.name] = dissect.struct_fields( + b_data, b_ptr, ptrs, psize, group_discriminantValue, + seg, segs, pkt, group_tree, group) + else + -- make sure to register this call's meta data before + -- processing the call params + if node.name == "Call" then + if f.name == "params" then + reqs.call(res, pkt) + end + elseif node.name == "Return" then + if f.name == "results" then + reqs.result(res, pkt) + end + end + + res[f.name] = dissect.data( + f.slot.type, f.slot.offset, seg, segs, b_data, b_ptr, + psize, ptrs, pkt, tree, f.name, f.slot.defaultValue) + end + until true + end + + -- Clear out call meta data when done with it. Maybe not the best + -- thing to do, but it's no good to hold on to them forever either. + if node.name == "Finish" then + reqs.finish(res, pkt) + end + + return res +end + +local list_element_size = {0, 1, 8, 16, 32, 64, "ptr", "composite"} + +function dissect.list(seg, pos, segs, pkt, tree, node) + local buf = segs[seg] + local offset = math.floor(buf(pos, 4):le_int() / 4) + local data_pos = pos + (offset + 1) * 8 + local count = math.floor(buf(pos + 4, 4):le_uint() / 8) + local esize = list_element_size[buf(pos + 4, 1):bitfield(5, 3) + 1] + local node_text + local res = {} + + tree:add(buf(pos, 4), "Offset:", offset) + tree:add(buf(pos + 4, 1), "Element size:", esize) + + if type(esize) == "number" then + tree:add(buf(pos + 4, 4), "Count:", count) + local data = buf(data_pos, (count * esize) / 8) + if esize == 8 and not node.struct then + res = string.format("%q", data:string()) + tree:add(proto.fields.text, data, res) + node_text = ": " .. node.name .. " = " .. res + elseif count > 0 and esize > 0 then + local item_tree = tree:add(data, "Data (", data:len(), "bytes )") + if node.struct then + local struct = capnp_schema("id", node.struct.typeId) + node = { ["headless-struct"] = struct } + end + for i = 0, count - 1 do + res[i + 1] = dissect.data( + node, i, seg, segs, data, nil, 0, 0, + pkt, item_tree, tostring(i)) + end + end + elseif esize == "ptr" then + tree:add(buf(pos + 4, 4), "Count:", count) + local data = buf(data_pos, count * 8) + local item_tree = tree:add(data, "Items (", data:len(), "bytes )") + for i = 0, count - 1 do + res[i + 1] = dissect.data( + node, i, seg, segs, nil, data, count, + data_pos, pkt, tree, tostring(i)) + end + elseif esize == "composite" then + local data = buf(data_pos, (count + 1) * 8):tvb() + local words = count + + count = data(0, 4):le_int() / 4 + tree:add(buf(pos + 4, 4), "Words:", words) + :add(data(0, 4), "Count:", count) + + local struct = node.struct and capnp_schema("id", node.struct.typeId) or node + tree:add(data(0, 8), "Tag:", struct.name) + + if count > 0 then + local size = words / count + local item_tree = tree:add(data(8), "Items (", words * 8, "bytes )") + for i = 0, count - 1 do + res[i + 1] = dissect.struct( + seg, data_pos, segs, pkt, + item_tree:add(tostring(i)), struct, i * size) + end + end + end + + if not node_text then + node_text = ": " .. tostring(count) .. " item" .. (count == 1 and "" or "s") + end + + return { list=res }, tree:append_text(node_text) +end + +function dissect.cap(seg, pos, segs, pkt, tree, node) + local buf = segs[seg] + local idx = buf(pos + 4, 4):le_uint() + tree:append_text(": " .. node.name .. ", index: " .. tostring(idx)) + tree:add(buf(pos + 4, 4), "capTable index:", idx) + return { cap=idx } +end + +function dissect.data(data_type, offset, seg, segs, b_data, b_ptr, psize, ptrs, + pkt, tree, name, default_value) + local typ, val = next(data_type) + + if typ == "struct" then + if offset < psize then + return dissect.ptr( + seg, ptrs + (offset * 8), segs, pkt, + tree:add(b_ptr(offset * 8, 8), name), + capnp_schema("id", val.typeId)) + end + elseif typ == "list" then + if offset < psize then + return dissect.ptr( + seg, ptrs + (offset * 8), segs, pkt, + tree:add(b_ptr(offset * 8, 8), name), + val.elementType) + end + elseif typ == "anyPointer" then + if offset < psize then + local req = reqs.get(pkt) + return dissect.ptr( + seg, ptrs + (offset * 8), segs, pkt, + tree:add(b_ptr(offset * 8, 8), name), + name == "content" and req and req.content + or { name = "AnyPointer" }) + end + elseif typ == "interface" then + return dissect.cap( + seg, ptrs + (offset * 8), segs, pkt, + tree:add(b_ptr(offset * 8, 8), name), + capnp_schema("id", val.typeId) + or { name = "(Interface)" }) + elseif typ == "void" then + return typ, tree:add(name .. ":", "(void)") + elseif typ == "bool" then + local off, bit = math.modf(offset / 8) + if off < b_data:len() then + local b = b_data(off, 1) + local v = b:bitfield(7 - (bit * 8), 1) + local value = v == 1 + if default_value and default_value.bool then + value = not value + end + return value, tree:add(b, name .. ":", tostring(value)) + end + elseif typ == "enum" then + if (offset + 1) * 2 <= b_data:len() then + local b = b_data(offset * 2, 2) + local n = capnp_schema("id", val.typeId) + local t = b:le_uint() + local v = n and n.enum.enumerants[t + 1].name or t + return v, tree:add(b, name .. ":", v) + end + elseif string.sub(typ, 1, 3) == "int" then + local size = tonumber(string.sub(typ, 4)) / 8 + if (offset + 1) * size <= b_data:len() then + local b = b_data(offset * size, size) + local v = size < 8 and b:le_int() or tostring(b:le_int64()) + return v, tree:add(b, name .. ":", v) + end + elseif string.sub(typ, 1, 4) == "uint" then + local size = tonumber(string.sub(typ, 5)) / 8 + if (offset + 1) * size <= b_data:len() then + local b = b_data(offset * size, size) + local v = size < 8 and b:le_uint() or tostring(b:le_uint64()) + return v, tree:add(b, name .. ":", v) + end + elseif string.sub(typ, 1, 5) == "float" then + local size = tonumber(string.sub(typ, 6)) / 8 + if (offset + 1) * size <= b_data:len() then + local b = b_data(offset * size, size) + local v = b:le_float() + return v, tree:add(b, name .. ":", v) + end + elseif typ == "headless-struct" then + local size = val.struct.preferredListEncoding + if (offset + 1) * size <= b_data:len() then + local data = b_data(offset * size, size) + local struct_tree = tree:add(data, name .. ":", val.name) + local discriminantValue = dissect.struct_discriminant(data, val.struct, struct_tree) + return dissect.struct_fields( + data:tvb(), nil, 0, 0, discriminantValue, seg, segs, pkt, + struct_tree, val) + end + else + return "", tree:add(name .. ":", "", typ) + end + + return "(no data)", tree:add(name .. ":", "(no data)", typ) +end + +-------------------------------------------------------------------------------- +-- request tracking +-------------------------------------------------------------------------------- + +function reqs.get(pkt, id) + if id then + reqs.id = id + else + id = reqs.id + end + + if not id then return nil end + + local req = reqs[reqs.dir][id] + if not req then + req = {} + reqs[reqs.dir][id] = req + end + + local r = req[id] + if not r then + r = {} + req[id] = r + end + + for _, v in ipairs(r) do + if v.from <= pkt.number and not v.to or v.to >= pkt.number then + return v + end + end + + local v = { from = pkt.number } + r[#r + 1] = v + return v +end + +function reqs.call(fields, pkt) + local r = reqs.get(pkt, fields.questionId) + local node = capnp_schema("id", fields.interfaceId) + if node then + r.method = node.interface.methods[fields.methodId + 1] + r.content = capnp_schema("id", r.method.paramStructType) + end +end + +function reqs.result(fields, pkt) + -- results travel in opposite direction of that of calls/finish requests. + reqs.dir = not dir + local r = reqs.get(pkt, fields.answerId) + if r.method then + r.content = capnp_schema("id", r.method.resultStructType) + end +end + +function reqs.finish(fields, pkt) + local r = reqs.get(pkt, fields.questionId) + r.to = pkt.number +end + +-------------------------------------------------------------------------------- +-- functions for describing a dissected message +-------------------------------------------------------------------------------- + +local describe = { struct = {} } + +function dissect.describe_message(msg) + return describe.value(msg) +end + +-- utility functions + +function describe.value(obj) + if type(obj) ~= "table" then + return tostring(obj) + end + + local typ, val = next(obj) + if typ == "struct" then + local fun = describe.struct[val.schema.name] or describe.any_struct + return fun and fun(val) or "" + elseif typ == "list" then + if type(val) == "table" then + return "[" .. describe.list(val) .. "]" + else + return tostring(val) + end + elseif typ == "cap" then + return "cap(" .. tostring(val) .. ")" + end + + return typ .. "=" .. describe.value(val) +end + +function describe.list(t) + local res = {} + for k, v in pairs(t) do + res[k] = describe.value(v) + end + return describe.lua_value(res) +end + +function describe.discriminant(obj) + if not obj.discriminant then return "" end + local tag = obj.discriminant.name + local val = obj.fields[tag] + return tag .. describe.value(val) +end + +function describe.any_struct(obj) + return "(" .. describe.list(obj.fields) .. ")" +end + +function describe.lua_value(o) + if type(o) == 'table' then + local s + for k,v in pairs(o) do + s = s and s .. ', ' or '' + if type(k) ~= 'number' then + s = s .. k .. '=' + end + s = s .. describe.lua_value(v) + end + return s or '' + else + return tostring(o) + end +end + +---------------------------------------- +-- rpc types, roughly in the same order +-- as defined in rpc.capnp + +function describe.struct.Message(obj) + return describe.discriminant(obj) +end + +function describe.struct.Call(obj) + local f = obj.fields + local id = f.interfaceId + local mid = f.methodId + local cap = capnp_schema("id", id) + local o = cap and cap.name or tostring(id) + local m = cap and cap.interface.methods[mid + 1].name + or "method(" .. tostring(mid) .. ") " + local t = {} + for _, k in ipairs({ "target", "params" }) do + t[k] = describe.value(f[k]) + end + return "(" .. tostring(f.questionId) .. ") " .. t.target + .. "::" .. o .. "->" .. m .. t.params + .. " return to: " .. next(f.sendResultsTo) + .. ", tail call: " .. tostring(f.allowThirdPartyTailCall) +end + +function describe.struct.Return(obj) + local f = obj.fields + local result = describe.discriminant(obj) + return "(" .. tostring(f.answerId) .. ") " .. result +end + +function describe.struct.Finish(obj) + local f = obj.fields + return "(" .. tostring(f.questionId) .. ")" +end + +function describe.struct.Resolve(obj) + local f = obj.fields + local promise = describe.discriminant(obj) + return "(" .. tostring(f.promiseId) .. ") " .. promise +end + +function describe.struct.Release(obj) + local f = obj.fields + return "(" .. tostring(f.id) .. ")" +end + +-- function describe.struct.Disembargo() +-- end + +-- function describe.struct.Save() +-- end + +function describe.struct.Restore(obj) + local f = obj.fields + local object = describe.value(f.objectId) + return "(" .. tostring(f.questionId) .. ") " .. object +end + +-- function describe.struct.Delete() +-- end + +-- function describe.struct.Provide() +-- end + +-- function describe.struct.Accept() +-- end + +-- function describe.struct.Join() +-- end + +---------------------------------------- +-- Common structures used in messages + +-- function describe.struct.MessageTarget(obj) +-- end + +-- function describe.struct.Payload(obj) +-- return "(...)" +-- end + +-- function describe.struct.CapDescriptor() +-- end + +function describe.struct.PromisedAnswer(obj) + local f = obj.fields + return "(" .. tostring(f.questionId) .. ", " .. describe.value(f.transform) .. ")" +end + +-- function describe.struct.SturdyRef() +-- end + +-- function describe.struct.ThirdPartyCapDescriptor() +-- end + +-- function describe.struct.Exception() +-- end diff --git a/dissectors/zap-rpc/capnp_schema.lua b/dissectors/zap-rpc/capnp_schema.lua new file mode 100644 index 0000000..3539cbc --- /dev/null +++ b/dissectors/zap-rpc/capnp_schema.lua @@ -0,0 +1,34 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/zap-proto/wireshark (plugins/capnp_schema.lua), +-- commit 0bb9036244f2ac83f52b4d3eb6f2d6af8568ec92 du 19/06/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +local capnp_schema = {} + +local function find(s, key, val) + for _, n in ipairs(s) do + if n[key] == val then + if n.displayName and not n.name then + n.name = string.sub( + n.displayName, + n.displayNamePrefixLength + 1) + end + return n + end + end +end + +setmetatable( + capnp_schema, + { __call = function(s, key, val, tab) + local node = tab and find(tab, key, val) + if not node then + for _, ns in pairs(s) do + node = find(ns.nodes, key, val) + if node then break end + end + end + return node + end +}) + +return capnp_schema diff --git a/dissectors/zap-rpc/rpc_capnp.lua b/dissectors/zap-rpc/rpc_capnp.lua new file mode 100644 index 0000000..90f2db3 --- /dev/null +++ b/dissectors/zap-rpc/rpc_capnp.lua @@ -0,0 +1,1189 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/zap-proto/wireshark (plugins/rpc_capnp.lua), +-- commit 0bb9036244f2ac83f52b4d3eb6f2d6af8568ec92 du 19/06/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +local capnp_schema = require("capnp_schema") + +-- fake atoms +local void = "void" +local empty = "empty" +local bit = "bit" +local byte = 1 +local twoBytes = 2 +local fourBytes = 4 +local eightBytes = 8 +local pointer = "pointer" +local inlineComposite = "inlineComposite" +local opaquePointer = "opaquePointer" + +capnp_schema["rpc"] = +{ nodes = { + { id = "15376050949367520589", + displayName = "/usr/local/include/capnp/rpc.capnp:Disembargo.context", + displayNamePrefixLength = 46, + scopeId = "17970548384007534353", + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = true, + discriminantCount = 4, + discriminantOffset = 2, + fields = { + { name = "senderLoopback", + codeOrder = 0, + discriminantValue = 0, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "receiverLoopback", + codeOrder = 1, + discriminantValue = 1, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 2} }, + { name = "accept", + codeOrder = 2, + discriminantValue = 2, + slot = { + offset = 0, + type = {void = void}, + defaultValue = {void = void}, + hadExplicitDefault = false }, + ordinal = {explicit = 3} }, + { name = "provide", + codeOrder = 3, + discriminantValue = 3, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 4} } } }, + isGeneric = false }, + { id = "15235686326393111165", + displayName = "/usr/local/include/capnp/rpc.capnp:ThirdPartyCapDescriptor", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "id", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "vineId", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 1} } } }, + isGeneric = false }, + { id = "12473400923157197975", + displayName = "/usr/local/include/capnp/rpc.capnp:Release", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 0, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "id", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "referenceCount", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 1, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 1} } } }, + isGeneric = false }, + { id = "18149955118657700271", + displayName = "/usr/local/include/capnp/rpc.capnp:Join", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 2, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "questionId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "target", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + struct = { + typeId = "10789521159760378817" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "keyPart", + codeOrder = 2, + discriminantValue = 65535, + slot = { + offset = 1, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 2} } } }, + isGeneric = false }, + { id = "15239388059401719395", + displayName = "/usr/local/include/capnp/rpc.capnp:Finish", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 0, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "questionId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "releaseResultCaps", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 32, + type = {bool = void}, + defaultValue = {bool = true}, + hadExplicitDefault = true }, + ordinal = {explicit = 1} } } }, + isGeneric = false }, + { id = "9593755465305995440", + displayName = "/usr/local/include/capnp/rpc.capnp:CapDescriptor", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 6, + discriminantOffset = 0, + fields = { + { name = "none", + codeOrder = 0, + discriminantValue = 0, + slot = { + offset = 0, + type = {void = void}, + defaultValue = {void = void}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "senderHosted", + codeOrder = 1, + discriminantValue = 1, + slot = { + offset = 1, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "senderPromise", + codeOrder = 2, + discriminantValue = 2, + slot = { + offset = 1, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 2} }, + { name = "receiverHosted", + codeOrder = 3, + discriminantValue = 3, + slot = { + offset = 1, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 3} }, + { name = "receiverAnswer", + codeOrder = 4, + discriminantValue = 4, + slot = { + offset = 0, + type = { + struct = { + typeId = "15564635848320162976" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 4} }, + { name = "thirdPartyHosted", + codeOrder = 5, + discriminantValue = 5, + slot = { + offset = 0, + type = { + struct = { + typeId = "15235686326393111165" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 5} } } }, + isGeneric = false }, + { id = "9469473312751832276", + displayName = "/usr/local/include/capnp/rpc.capnp:Call", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 3, + pointerCount = 3, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "questionId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "target", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + struct = { + typeId = "10789521159760378817" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "interfaceId", + codeOrder = 2, + discriminantValue = 65535, + slot = { + offset = 1, + type = {uint64 = void}, + defaultValue = {uint64 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 2} }, + { name = "methodId", + codeOrder = 3, + discriminantValue = 65535, + slot = { + offset = 2, + type = {uint16 = void}, + defaultValue = {uint16 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 3} }, + { name = "params", + codeOrder = 5, + discriminantValue = 65535, + slot = { + offset = 1, + type = { + struct = { + typeId = "11100916931204903995" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 4} }, + { name = "sendResultsTo", + codeOrder = 6, + discriminantValue = 65535, + group = { + typeId = "15774052265921044377" }, + ordinal = {implicit = void} }, + { name = "allowThirdPartyTailCall", + codeOrder = 4, + discriminantValue = 65535, + slot = { + offset = 128, + type = {bool = void}, + defaultValue = {bool = false}, + hadExplicitDefault = true }, + ordinal = {explicit = 8} } } }, + isGeneric = false }, + { id = "11392333052105676602", + displayName = "/usr/local/include/capnp/rpc.capnp:Return", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 2, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 6, + discriminantOffset = 3, + fields = { + { name = "answerId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "releaseParamCaps", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 32, + type = {bool = void}, + defaultValue = {bool = true}, + hadExplicitDefault = true }, + ordinal = {explicit = 1} }, + { name = "results", + codeOrder = 2, + discriminantValue = 0, + slot = { + offset = 0, + type = { + struct = { + typeId = "11100916931204903995" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 2} }, + { name = "exception", + codeOrder = 3, + discriminantValue = 1, + slot = { + offset = 0, + type = { + struct = { + typeId = "15430940935639230746" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 3} }, + { name = "canceled", + codeOrder = 4, + discriminantValue = 2, + slot = { + offset = 0, + type = {void = void}, + defaultValue = {void = void}, + hadExplicitDefault = false }, + ordinal = {explicit = 4} }, + { name = "resultsSentElsewhere", + codeOrder = 5, + discriminantValue = 3, + slot = { + offset = 0, + type = {void = void}, + defaultValue = {void = void}, + hadExplicitDefault = false }, + ordinal = {explicit = 5} }, + { name = "takeFromOtherQuestion", + codeOrder = 6, + discriminantValue = 4, + slot = { + offset = 2, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 6} }, + { name = "acceptFromThirdParty", + codeOrder = 7, + discriminantValue = 5, + slot = { + offset = 0, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 7} } } }, + isGeneric = false }, + { id = "13386661402618388268", + displayName = "capnp/c++.capnp:namespace", + displayNamePrefixLength = 16, + scopeId = "13688829037717245569", + nestedNodes = {}, + annotation = { + type = {text = void}, + targetsFile = true, + targetsConst = false, + targetsEnum = false, + targetsEnumerant = false, + targetsStruct = false, + targetsField = false, + targetsUnion = false, + targetsGroup = false, + targetsInterface = false, + targetsMethod = false, + targetsParam = false, + targetsAnnotation = false }, + isGeneric = false }, + { id = "13529541526594062446", + displayName = "/usr/local/include/capnp/rpc.capnp:Resolve", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 2, + discriminantOffset = 2, + fields = { + { name = "promiseId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "cap", + codeOrder = 1, + discriminantValue = 0, + slot = { + offset = 0, + type = { + struct = { + typeId = "9593755465305995440" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "exception", + codeOrder = 2, + discriminantValue = 1, + slot = { + offset = 0, + type = { + struct = { + typeId = "15430940935639230746" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 2} } } }, + isGeneric = false }, + { id = "17516350820840804481", + displayName = "/usr/local/include/capnp/rpc.capnp:PromisedAnswer.Op", + displayNamePrefixLength = 50, + scopeId = "15564635848320162976", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 0, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 2, + discriminantOffset = 0, + fields = { + { name = "noop", + codeOrder = 0, + discriminantValue = 0, + slot = { + offset = 0, + type = {void = void}, + defaultValue = {void = void}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "getPointerField", + codeOrder = 1, + discriminantValue = 1, + slot = { + offset = 1, + type = {uint16 = void}, + defaultValue = {uint16 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 1} } } }, + isGeneric = false }, + { id = "15430940935639230746", + displayName = "/usr/local/include/capnp/rpc.capnp:Exception", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = { + { name = "Type", + id = "12865824133959433560" } }, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "reason", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {text = void}, + defaultValue = {text = ""}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "obsoleteIsCallersFault", + codeOrder = 2, + discriminantValue = 65535, + slot = { + offset = 0, + type = {bool = void}, + defaultValue = {bool = false}, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "obsoleteDurability", + codeOrder = 3, + discriminantValue = 65535, + slot = { + offset = 1, + type = {uint16 = void}, + defaultValue = {uint16 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 2} }, + { name = "type", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 2, + type = { + enum = { + typeId = "12865824133959433560" } }, + defaultValue = {enum = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 3} } } }, + isGeneric = false }, + { id = "13688829037717245569", + displayName = "capnp/c++.capnp", + displayNamePrefixLength = 10, + scopeId = "0", + nestedNodes = { + { name = "namespace", + id = "13386661402618388268" }, + { name = "name", + id = "17466269397259751886" } }, + annotations = { + { id = "13386661402618388268", + value = { + text = "capnp::annotations" }, + brand = {} } }, + file = void, + isGeneric = false }, + { id = "10500036013887172658", + displayName = "/usr/local/include/capnp/rpc.capnp:Message", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 14, + discriminantOffset = 0, + fields = { + { name = "unimplemented", + codeOrder = 0, + discriminantValue = 0, + slot = { + offset = 0, + type = { + struct = { + typeId = "10500036013887172658" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "abort", + codeOrder = 1, + discriminantValue = 1, + slot = { + offset = 0, + type = { + struct = { + typeId = "15430940935639230746" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "call", + codeOrder = 3, + discriminantValue = 2, + slot = { + offset = 0, + type = { + struct = { + typeId = "9469473312751832276" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 2} }, + { name = "return", + codeOrder = 4, + discriminantValue = 3, + slot = { + offset = 0, + type = { + struct = { + typeId = "11392333052105676602" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 3} }, + { name = "finish", + codeOrder = 5, + discriminantValue = 4, + slot = { + offset = 0, + type = { + struct = { + typeId = "15239388059401719395" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 4} }, + { name = "resolve", + codeOrder = 6, + discriminantValue = 5, + slot = { + offset = 0, + type = { + struct = { + typeId = "13529541526594062446" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 5} }, + { name = "release", + codeOrder = 7, + discriminantValue = 6, + slot = { + offset = 0, + type = { + struct = { + typeId = "12473400923157197975" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 6} }, + { name = "obsoleteSave", + codeOrder = 9, + discriminantValue = 7, + slot = { + offset = 0, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 7} }, + { name = "bootstrap", + codeOrder = 2, + discriminantValue = 8, + slot = { + offset = 0, + type = { + struct = { + typeId = "16811039658553601732" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 8} }, + { name = "obsoleteDelete", + codeOrder = 10, + discriminantValue = 9, + slot = { + offset = 0, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 9} }, + { name = "provide", + codeOrder = 11, + discriminantValue = 10, + slot = { + offset = 0, + type = { + struct = { + typeId = "11270825879279873114" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 10} }, + { name = "accept", + codeOrder = 12, + discriminantValue = 11, + slot = { + offset = 0, + type = { + struct = { + typeId = "15332985841292492822" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 11} }, + { name = "join", + codeOrder = 13, + discriminantValue = 12, + slot = { + offset = 0, + type = { + struct = { + typeId = "18149955118657700271" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 12} }, + { name = "disembargo", + codeOrder = 8, + discriminantValue = 13, + slot = { + offset = 0, + type = { + struct = { + typeId = "17970548384007534353" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 13} } } }, + isGeneric = false }, + { id = "16811039658553601732", + displayName = "/usr/local/include/capnp/rpc.capnp:Bootstrap", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "questionId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "deprecatedObjectId", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 1} } } }, + isGeneric = false }, + { id = "11270825879279873114", + displayName = "/usr/local/include/capnp/rpc.capnp:Provide", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 2, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "questionId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "target", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + struct = { + typeId = "10789521159760378817" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "recipient", + codeOrder = 2, + discriminantValue = 65535, + slot = { + offset = 1, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 2} } } }, + isGeneric = false }, + { id = "12903543124727603792", + displayName = "/usr/local/include/capnp/rpc.capnp", + displayNamePrefixLength = 29, + scopeId = "0", + nestedNodes = { + { name = "Message", + id = "10500036013887172658" }, + { name = "Bootstrap", + id = "16811039658553601732" }, + {name = "Call", id = "9469473312751832276"}, + { name = "Return", + id = "11392333052105676602" }, + { name = "Finish", + id = "15239388059401719395" }, + { name = "Resolve", + id = "13529541526594062446" }, + { name = "Release", + id = "12473400923157197975" }, + { name = "Disembargo", + id = "17970548384007534353" }, + { name = "Provide", + id = "11270825879279873114" }, + { name = "Accept", + id = "15332985841292492822" }, + { name = "Join", + id = "18149955118657700271" }, + { name = "MessageTarget", + id = "10789521159760378817" }, + { name = "Payload", + id = "11100916931204903995" }, + {name = "CapDescriptor", id = "9593755465305995440"}, + { name = "PromisedAnswer", + id = "15564635848320162976" }, + { name = "ThirdPartyCapDescriptor", + id = "15235686326393111165" }, + { name = "Exception", + id = "15430940935639230746" } }, + annotations = { + { id = "13386661402618388268", + value = {text = "capnp::rpc"}, + brand = {} } }, + file = void, + isGeneric = false }, + { id = "17970548384007534353", + displayName = "/usr/local/include/capnp/rpc.capnp:Disembargo", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "target", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + struct = { + typeId = "10789521159760378817" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "context", + codeOrder = 1, + discriminantValue = 65535, + group = { + typeId = "15376050949367520589" }, + ordinal = {implicit = void} } } }, + isGeneric = false }, + { id = "15332985841292492822", + displayName = "/usr/local/include/capnp/rpc.capnp:Accept", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "questionId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "provision", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 1} }, + { name = "embargo", + codeOrder = 2, + discriminantValue = 65535, + slot = { + offset = 32, + type = {bool = void}, + defaultValue = {bool = false}, + hadExplicitDefault = false }, + ordinal = {explicit = 2} } } }, + isGeneric = false }, + { id = "10789521159760378817", + displayName = "/usr/local/include/capnp/rpc.capnp:MessageTarget", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 2, + discriminantOffset = 2, + fields = { + { name = "importedCap", + codeOrder = 0, + discriminantValue = 0, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "promisedAnswer", + codeOrder = 1, + discriminantValue = 1, + slot = { + offset = 0, + type = { + struct = { + typeId = "15564635848320162976" } }, + defaultValue = { + struct = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 1} } } }, + isGeneric = false }, + { id = "15774052265921044377", + displayName = "/usr/local/include/capnp/rpc.capnp:Call.sendResultsTo", + displayNamePrefixLength = 40, + scopeId = "9469473312751832276", + struct = { + dataWordCount = 3, + pointerCount = 3, + preferredListEncoding = inlineComposite, + isGroup = true, + discriminantCount = 3, + discriminantOffset = 3, + fields = { + { name = "caller", + codeOrder = 0, + discriminantValue = 0, + slot = { + offset = 0, + type = {void = void}, + defaultValue = {void = void}, + hadExplicitDefault = false }, + ordinal = {explicit = 5} }, + { name = "yourself", + codeOrder = 1, + discriminantValue = 1, + slot = { + offset = 0, + type = {void = void}, + defaultValue = {void = void}, + hadExplicitDefault = false }, + ordinal = {explicit = 6} }, + { name = "thirdParty", + codeOrder = 2, + discriminantValue = 2, + slot = { + offset = 2, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 7} } } }, + isGeneric = false }, + { id = "11100916931204903995", + displayName = "/usr/local/include/capnp/rpc.capnp:Payload", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = {}, + struct = { + dataWordCount = 0, + pointerCount = 2, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "content", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + anyPointer = { + unconstrained = {anyKind = void} } }, + defaultValue = { + anyPointer = opaquePointer }, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "capTable", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 1, + type = { + list = { + elementType = { + struct = { + typeId = "9593755465305995440" } } } }, + defaultValue = {list = opaquePointer}, + hadExplicitDefault = false }, + ordinal = {explicit = 1} } } }, + isGeneric = false }, + { id = "12865824133959433560", + displayName = "/usr/local/include/capnp/rpc.capnp:Exception.Type", + displayNamePrefixLength = 45, + scopeId = "15430940935639230746", + nestedNodes = {}, + enum = { + enumerants = { + {name = "failed", codeOrder = 0}, + {name = "overloaded", codeOrder = 1}, + {name = "disconnected", codeOrder = 2}, + {name = "unimplemented", codeOrder = 3} } }, + isGeneric = false }, + { id = "15564635848320162976", + displayName = "/usr/local/include/capnp/rpc.capnp:PromisedAnswer", + displayNamePrefixLength = 35, + scopeId = "12903543124727603792", + nestedNodes = { + { name = "Op", + id = "17516350820840804481" } }, + struct = { + dataWordCount = 1, + pointerCount = 1, + preferredListEncoding = inlineComposite, + isGroup = false, + discriminantCount = 0, + discriminantOffset = 0, + fields = { + { name = "questionId", + codeOrder = 0, + discriminantValue = 65535, + slot = { + offset = 0, + type = {uint32 = void}, + defaultValue = {uint32 = 0}, + hadExplicitDefault = false }, + ordinal = {explicit = 0} }, + { name = "transform", + codeOrder = 1, + discriminantValue = 65535, + slot = { + offset = 0, + type = { + list = { + elementType = { + struct = { + typeId = "17516350820840804481" } } } }, + defaultValue = {list = opaquePointer}, + hadExplicitDefault = false }, + ordinal = {explicit = 1} } } }, + isGeneric = false } }, + requestedFiles = { + { id = "12903543124727603792", + filename = "/usr/local/include/capnp/rpc.capnp", + imports = { + { id = "13688829037717245569", + name = "/capnp/c++.capnp" } } } } } diff --git a/dissectors/zigbee-tuya-ef00/LICENSE b/dissectors/zigbee-tuya-ef00/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/dissectors/zigbee-tuya-ef00/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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) + + 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. + +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) year 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 Lesser General +Public License instead of this License. diff --git a/dissectors/zigbee-tuya-ef00/README.md b/dissectors/zigbee-tuya-ef00/README.md new file mode 100644 index 0000000..c545fd7 --- /dev/null +++ b/dissectors/zigbee-tuya-ef00/README.md @@ -0,0 +1,45 @@ +# Zigbee ZCL 0xEF00 (cluster privé Tuya) + +Dissecteur Wireshark Lua du **cluster Zigbee 0xEF00**, cluster privé +utilisé par les appareils **Tuya** (thermostats, vannes, capteurs, +rideaux… vendus sous de nombreuses marques) pour transporter leurs « data +points » : commande, statut, identifiant de transaction, numéro de data +point, type de donnée (RAW, BOOL, VALUE, STRING, ENUM, FAULT), fonction, +longueur et valeur décodée selon le type. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/pekkasaastamoinen/wireshark_zcl_ef00_dissector (fichier `zcl_ef00.lua`) | +| Commit importé | `0190c3e1a7e049cfc0e4c70eddb9dda616933545` du 28/03/2024 (branche `main`, dernier commit, qui modifie aussi le dissecteur) | +| Licence amont | GPL-2.0-only (en-tête du fichier : « Copyright (C) 2024 psaastam@iki.fi — License: GNU General Public License v2.0 only » ; `LICENSE` amont : texte de la GPL v2) | +| Natif Wireshark 4.6.4 | Non — Zigbee ZCL est natif et connaît le code fabricant Tuya (0x125D), mais pas le contenu du cluster 0xEF00 | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `zcl_ef00.lua` | Protocole `zcl_ef00`, enregistré dans la table `zbee.zcl.cluster` pour 0xEF00 | + +Fichier importé tel quel ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête du fichier. + +## Utilisation + +Copier `zcl_ef00.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua, ouvrir +une capture Zigbee (avec la clé réseau renseignée dans les préférences +Zigbee pour déchiffrer la couche NWK/APS), puis filtrer avec `zcl_ef00`. + +## Remarques + +- Testé par l'auteur uniquement avec un appareil n'envoyant que des types + VALUE et ENUM, sous Wireshark 3.6.2 (README amont). +- La signification de chaque numéro de data point dépend du modèle Tuya et + n'est pas décodée. +- Variable globale `zcl_ef00_protocol` comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark 4.6. diff --git a/dissectors/zigbee-tuya-ef00/zcl_ef00.lua b/dissectors/zigbee-tuya-ef00/zcl_ef00.lua new file mode 100644 index 0000000..b5f7827 --- /dev/null +++ b/dissectors/zigbee-tuya-ef00/zcl_ef00.lua @@ -0,0 +1,189 @@ +-- SPDX-License-Identifier: GPL-2.0-only +-- Importé de https://github.com/pekkasaastamoinen/wireshark_zcl_ef00_dissector (zcl_ef00.lua), +-- commit 0190c3e1a7e049cfc0e4c70eddb9dda616933545 du 28/03/2024. +-- Licence amont : GPL-2.0-only (LICENSE amont) — voir README.md. +-- Zigbee 0xef00 cluster Wireshark dissector +-- +-- Copyright (C) 2024 psaastam@iki.fi +-- +-- License: +-- GNU General Public License v2.0 only +-- GPL-2.0 +-- +-- Info mostly from +-- https://github.com/zigbeefordomoticz/wiki/blob/master/en-eng/Technical/Tuya-0xEF00.md +-- +zcl_ef00_protocol = Proto("zcl_ef00", "ZCL EF00 cluster") + +-- +-----------+----------+------------------+--------------+-------------+------------+-------+-------------+ +-- | 0 command | 1 status | 2 transaction Id | 3 Data Point | 4 Data Type | 5 Function | 6 Len | 7 Data | +-- +-----------+----------+------------------+--------------+-------------+------------+-------+-------------+ +-- | uint8 | uint8 | uint8 | uint8 | uint8 | uint8 | uint8 | len * uint8 | +-- +-----------+----------+------------------+--------------+-------------+------------+-------+-------------+ + +-- Enumerate the protocol fields +Cmd = ProtoField.uint8("ef00.cmd", "Command", base.DEC) +Status = ProtoField.uint8("ef00.status", "Status", base.DEC) +TransactionID = ProtoField.uint8("ef00.transid", "TransactionID", base.DEC) +DataPoint = ProtoField.uint8("ef00.dp", "DataPoint", base.DEC) +DataType = ProtoField.uint8("ef00.dt", "DataType", base.DEC) +Function = ProtoField.uint8("ef00.func", "Function", base.DEC) +Len = ProtoField.uint8("ef00.len", "Data length", base.DEC) +Data = ProtoField.bytes("ef00.data", "Data bytes", base.NONE) + +zcl_ef00_protocol.fields = { + Cmd, Status, TransactionID, DataPoint, DataType, Function, Len, Data +} + +function zcl_ef00_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + -- skip column naming to keep parent name + -- pinfo.cols.protocol = tuya_ef00_protocol.name + + local subtree = tree:add(zcl_ef00_protocol, buffer(), + "Zigbee, 0xEF00 Cluster") + local cmd, status, transaction, data_point, data_type, func, data_len, data + local info = "ZCL 0xEF00" + + cmd = buffer(0, 1):int() + subtree:add(Cmd, buffer(0, 1)):append_text(" " .. get_command_name(cmd)) + -- skip commands other than 1 and 2, just dump rest of buffer as Data + if cmd > 0x02 then + subtree:add(Data, buffer(1, length - 1)) + goto done + end + if length > 1 then + status = buffer(1, 1):int() + subtree:add(Status, buffer(1, 1)) + end + if length > 2 then + transaction = buffer(2, 1):int() + subtree:add(TransactionID, buffer(2, 1)) + end + if length > 3 then + data_point = buffer(3, 1):int() + info = info .. (string.format(", DP: %i", data_point)) + subtree:add(DataPoint, buffer(3, 1)):append_text(string.format( + " (0x%02x)", + data_point)) + end + if length > 4 then + data_type = buffer(4, 1):int() + info = info .. + (string.format(", dtype: %s", get_datatype_name(data_type))) + subtree:add(DataType, buffer(4, 1)):append_text(" " .. + get_datatype_name( + data_type)) + end + if length > 5 then + func = buffer(5, 1):int() + subtree:add(Function, buffer(5, 1)) + end + if length > 6 then + data_len = buffer(6, 1):int() + subtree:add(Len, buffer(6, 1)) + end + if length > 7 and length > (data_len + 6) then + local buf = buffer(7, data_len) + data = buf:int() + if data_type == 1 then -- bool + if val > 0 then + info = info .. (string.format(", data: True", buf:bool())) + + subtree:add(Data, buf):append_text(" True/On/1") + else + info = info .. (string.format(", data: False", buf:bool())) + subtree:add(Data, buf):append_text(" False/Off/0") + end + elseif data_type == 0x02 then -- value + info = info .. (string.format(", data: %i", data)) + + if data_len == 4 then + + subtree:add(Data, buf):append_text(string.format( + " (dec:%d, hex:0x%02x)", + data, data)) + elseif data_len < 4 then + subtree:add(Data, buf) + else + subtree:add(Data, buf):append_text(" Unsupported data length") + end + elseif data_type == 0x03 then -- string + info = info .. (string.format(", data: %s", buf)) + subtree:add(Data, buf):append_text(string.format(" \"%s\"", buf)) + elseif data_type == 0x04 then -- enum + info = info .. (string.format(", data: %d", data)) + subtree:add(Data, buf):append_text(" (enum)") + elseif data_type == 0x05 then -- fault + info = info .. (string.format(", data: %d", data)) + subtree:add(Data, buf):append_text(" (fault)") + else + subtree:add(Data, buf) + end + end + + ::done:: + pinfo.cols.info:append(info) + +end + +-- helper functions for getting string representations of some of the enummy fields +-- + +function get_command_name(cmd) + -- 0x01 - Query and report product information, 0x02 - Device Status Query / Report + local cmd_name = string.format(" Unknown", cmd) + + if cmd == 0x01 then + cmd_name = "Query and report product info" + elseif cmd == 0x02 then + cmd_name = "Device Status Query / Report" + elseif cmd == 0x03 then + cmd_name = "Zigbee Device Reset" + elseif cmd == 0x04 then + cmd_name = "Order Issuance" + elseif cmd == 0x05 then + cmd_name = "Status Report" + elseif cmd == 0x06 then + cmd_name = "Status Search" + elseif cmd == 0x07 then + cmd_name = "Reserved" + elseif cmd == 0x08 then + cmd_name = "Zigbee Device Functional Test" + elseif cmd == 0x09 then + cmd_name = "Query key information" + elseif cmd == 0x0A then + cmd_name = "Scene wakeup" + elseif cmd > 0x0A and cmd < 0x24 then + cmd_name = "Reserved" + elseif cmd == 0x24 then + cmd_name = "Time synchonization" + end + return cmd_name +end + +function get_datatype_name(dt) + local dt_name = "Unknown" + + if dt == 0 then + dt_name = "RAW" + elseif dt == 1 then + dt_name = "BOOL" + elseif dt == 2 then + dt_name = "VALUE" + elseif dt == 3 then + dt_name = "STRING" + elseif dt == 4 then + dt_name = "ENUM" + elseif dt == 5 then + dt_name = "FAULT" + end + return dt_name +end + +-- register the dissector for zcl clusters with id 0xef00 +local wpan_dist = DissectorTable.get("zbee.zcl.cluster") +if wpan_dist then wpan_dist:add(0xef00, zcl_ef00_protocol) end + diff --git a/dissectors/zpr-zdp/LICENSE b/dissectors/zpr-zdp/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dissectors/zpr-zdp/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dissectors/zpr-zdp/README.md b/dissectors/zpr-zdp/README.md new file mode 100644 index 0000000..1efba0e --- /dev/null +++ b/dissectors/zpr-zdp/README.md @@ -0,0 +1,55 @@ +# ZPR ZDP — protocole de données de ZPR (Zero-trust Packet Routing) + +Dissecteurs Wireshark Lua du **protocole ZDP du projet ZPR** +(https://zpr.org, routage de paquets « zero trust ») — à ne pas confondre +avec le Zigbee Device Profile (`zbee_zdp`), malgré l'intitulé de l'issue : +en-tête ZDP (type, ZPI, identifiant de flux, numéro de séquence, MAC +A2A, SAID, bourrage, HMAC), paquets de transit (en-tête IP de l'agent — +version, classe de trafic, étiquette de flux, limite de sauts, fragments +—, puis passage au dissecteur `ip` natif), et paquets de gestion +(inaccessibilité, MTU, demandes / réponses d'identifiant de flux, liaison +d'adresses d'acteur, ARP ZPR, gestion de clés, écho, rapports, hello, +configuration, attribution / révocation d'adresses ZPR, authentification, +acquittement). Un second script décode l'octet de sens (entrant / +sortant) d'un lien point à point. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/org-zpr/zpr-common (dossier `tools/`) | +| Commit importé | `59c225a5a6e87be2f5253ae82c111d28078fda72` du 05/10/2026 (branche `main`, dernier commit ; dernière modification des scripts : `c0805cf` du 02/03/2026) | +| Licence amont | Apache-2.0 (`LICENSE` amont ; aucun fichier `NOTICE`) | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur ZPR natif (le `zbee_zdp` natif est un autre protocole) | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme de l'amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `zdp_dissector.lua` | Protocole `zdp` : en-tête ZDP, paquets de transit et de gestion | +| `link_header_dissector.lua` | Protocole `zdp_link_p2p` : octet de sens d'un lien point à point | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de +quatre lignes a été ajoutée en tête. Le reste du dépôt (bibliothèque +Rust, schémas IDL) n'est pas importé. + +## Utilisation + +Les scripts ne s'enregistrent sur aucun port ni aucune table : après les +avoir copiés dans le dossier `plugins` de Wireshark, les associer à un +type de lien utilisateur (Préférences › Protocols › DLT_USER, par exemple +`USER0` → `zdp`, ou `zdp_link_p2p` en en-tête avec `zdp` en charge +utile), puis filtrer avec `zdp`. Champs filtrables : `zdp.type`, +`zdp.streamid`, `zdp.seq_num`… + +## Remarques + +- Le README amont avertit d'un code en pré-version, susceptible de + changer sans préavis. +- Utilise `bit.band` / `bit.rshift` (bibliothèque `bit` fournie par + Wireshark 4.4 et plus) ; nombreuses fonctions et tables globales, + comme dans l'amont. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/zpr-zdp/link_header_dissector.lua b/dissectors/zpr-zdp/link_header_dissector.lua new file mode 100644 index 0000000..852a3d1 --- /dev/null +++ b/dissectors/zpr-zdp/link_header_dissector.lua @@ -0,0 +1,36 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/org-zpr/zpr-common (tools/link_header_dissector.lua), +-- commit 59c225a5a6e87be2f5253ae82c111d28078fda72 du 05/10/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- Dissector for link header to determine direction + +zdp_link_p2p_proto = Proto("ZDP_Link_P2P", "ZDP point-to-point message data") + +in_out = ProtoField.uint8("zdp_link_p2p.zdp_link_p2p", "ZDP Link P2P", base.DEC) + +zdp_link_p2p_proto.fields = { in_out } + +function zdp_link_p2p_proto.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = zdp_link_p2p_proto.name + + local subtree = tree:add(zdp_link_p2p_proto, buffer(), "ZDP Link Layer Data") + local direction = buffer(0,1):uint() + subtree:add(in_out, buffer(0,1)):append_text(" (" .. direction_name[direction] .. ")") + pinfo.cols.src = location_name[direction] + pinfo.cols.dst = location_name[math.fmod(direction + 1, 2)] +end + +direction_name = +{ + [0] = "Inbound", + [1] = "Outbound", +} + +location_name = +{ + [0] = "Remote", + [1] = "Local", +} \ No newline at end of file diff --git a/dissectors/zpr-zdp/zdp_dissector.lua b/dissectors/zpr-zdp/zdp_dissector.lua new file mode 100644 index 0000000..b51c4da --- /dev/null +++ b/dissectors/zpr-zdp/zdp_dissector.lua @@ -0,0 +1,739 @@ +-- SPDX-License-Identifier: Apache-2.0 +-- Importé de https://github.com/org-zpr/zpr-common (tools/zdp_dissector.lua), +-- commit 59c225a5a6e87be2f5253ae82c111d28078fda72 du 05/10/2026. +-- Licence amont : Apache-2.0 (LICENSE amont) — voir README.md. +-- Dissector for ZDP Packet + +zdp_proto = Proto("zdp", "ZDP Header Dissector") + +-- ZDP Headers +local a2a_mac = ProtoField.uint64("zdp.a2a_mac", "A2A MAC", base.HEX) +local a2a_said = ProtoField.uint8("zdp.a2a_said", "A2A SAID", base.HEX) +local agent_packet = ProtoField.bytes("zdp.agent_packet", "Agent Packet") +local excess_len = ProtoField.uint8("zdp.excess_len", "Excess Length", base.DEC) +local hmac = ProtoField.bytes("zdp.mac", "HMAC") +local management_packet = ProtoField.bytes("zdp.management", "Management Packet") +local pad = ProtoField.bytes("zdp.pad", "Pad") +local seq_num = ProtoField.uint64("zdp.seq_num", "Sequence Number", base.DEC) +local stream_id = ProtoField.uint32("zdp.streamid", "Stream ID", base.DEC) +local zdp_type = ProtoField.uint8("zdp.type", "Type", base.DEC) +local zpi_val = ProtoField.uint8("zdp.zpi", "ZPI", base.DEC) + +-- Agent Packet Headers +local fl = ProtoField.uint32("zdp.fl", "Flow Label", base.DEC) +local frag_id = ProtoField.uint16("zdp.frag_id", "Fragment ID", base.DEC) +local frag_offset = ProtoField.uint16("zdp.frag_offset", "Fragment Offset", base.DEC) +local hop_limit = ProtoField.uint8("zdp.hop_limit", "Hop Limit", base.DEC) +local ihl = ProtoField.uint8("zdp.ihl", "Internet Header Length", base.DEC) +local ip_version = ProtoField.uint8("zdp.ip_version", "IP Version", base.DEC) +local tc = ProtoField.uint8("zdp.tc", "Traffic Class", base.DEC) +local ttl = ProtoField.uint8("zdp.ttl", "Time to Live", base.DEC) +-- dscp = ProtoField.uint8("zdp.dscp", "Differentiated Services Code Point", base.DEC) +-- ip_options = ProtoField.bytes("zdp.ip_options", "IP Options") + +-- Management Data +local additional_data = ProtoField.bytes("zdp.additional", "Optional Additional Data") +local addr_count = ProtoField.uint8("zdp.addr_count", "Address Count", base.DEC) +local adl = ProtoField.uint16("zdp.adl", "Additional Data Length", base.DEC) +local blob = ProtoField.bytes("zdp.blob", "Blob") +local blob_len = ProtoField.uint16("zdp.blob_len", "Blob Length", base.DEC) +local bootstrap_support = ProtoField.uint8("zdp.bootstrap", "Bootstrap Support Flag") +local comp_mode = ProtoField.uint8("zdp.comp_mode", "Compression Mode", base.HEX) +local ctime = ProtoField.uint64("zdp.ctime", "CTime", base.DEC) +local data_length_u8 = ProtoField.uint8("zdp.data_len_t", "Data Length", base.DEC) +local data_length_u16 = ProtoField.uint16("zdp.data_len_i", "Data Length", base.DEC) +local dest_addr_v4 = ProtoField.ipv4("zdp.dest_addr_v4", "Destination IP Address") +local dest_addr_v6 = ProtoField.ipv6("zdp.dest_addr_v6", "Destination IP Address") +local dest_info = ProtoField.uint16("zdp.dest_info", "Destination Port Information", base.DEC) +local info_len = ProtoField.uint8("zdp.info_len", "Information Length", base.DEC) +local ip_protocol = ProtoField.uint8("zdp.ip_protocol", "IP Protocol", base.DEC) +local ipv4_addr = ProtoField.ipv4("zdp.ipv4", "IP Address") +local ipv6_addr = ProtoField.ipv6("zdp.ipv6", "IP Address") +local nonce = ProtoField.uint64("zdp.nonce", "Nonce", base.HEX) +local pkt_len = ProtoField.uint16("zdp.pkt_len", "Endpoint Packet Length", base.DEC) +local reason_code = ProtoField.uint8("zdp.reason_code", "Reason Code", base.DEC) +local response_code = ProtoField.uint8("zdp.response_code", "Response Code", base.DEC) +local source_addr_v4 = ProtoField.ipv4("zdp.source_addr_v4", "Source IP Address") +local source_addr_v6 = ProtoField.ipv6("zdp.source_addr_v6", "Source IP Address") +local source_info = ProtoField.uint16("zdp.source_info", "Source Port Information", base.DEC) +local status_code = ProtoField.uint8("zdp.status_code", "Status Code", base.DEC) +local status_info = ProtoField.bytes("zdp.status_info", "Optional Additional Status Information") +local tcst = ProtoField.uint8("zdp.tcst", "TCST", base.DEC) +local tlv_len = ProtoField.uint8("zdp.tlv_length", "TLV Length", base.DEC) +local tlv_type = ProtoField.uint8("zdp.tlv_type", "TLV Type", base.DEC) +local tlv_val_bytes = ProtoField.bytes("zdp.tlv_bytes", "TLV Value") +local tlv_val_i64 = ProtoField.int64("zdp.tlv_i64", "TLV Value", base.DEC) +local tlv_val_ipv4 = ProtoField.ipv4("zdp.tlv_ipv4", "TLV Value", base.DEC) +local tlv_val_ipv6 = ProtoField.ipv6("zdp.tlv_ipv6", "TLV Value", base.DEC) +local tlv_val_str = ProtoField.string("zdp.tlv_string", "TLV Value", base.ASCII) +local tlv_val_u16 = ProtoField.uint16("zdp.tlv_u16", "TLV Value", base.DEC) +local trans_id = ProtoField.uint16("zdp.trans_id", "Transaction ID", base.DEC) +-- dest_port_present = ProtoField.uint8("zdp.dest_port_present", "Destination Port Information Present", base.DEC) +-- ip_protocol_present = ProtoField.uint8("zdp.protocol_present", "IP Protocol Present", base.DEC) +-- req_seq_num = ProtoField.uint16("zdp.req_seq_num", "Request Sequence Number", base.DEC) +-- source_port_present = ProtoField.uint8("zdp.source_port_present", "Source Port Information Present", base.DEC) + +-- Request/response matching +local req_frame = ProtoField.framenum("zdp.request_frame", "Request", base.NONE, frametype.REQUEST) +local res_frame = ProtoField.framenum("zdp.response_frame", "Response", base.NONE, frametype.RESPONSE) + + +local acked_frame = ProtoField.framenum("zdp.ack_frame", "Acknowledged", base.NONE, frametype.ACK) +local acked_by_frame = ProtoField.framenum("zdp.acked_by", "Acknowledged By", base.NONE, frametype.ACK) + + +zdp_proto.fields = { + -- ZDP Headers + a2a_mac, a2a_said, agent_packet, excess_len, hmac, management_packet, pad, + seq_num, stream_id, zdp_type, zpi_val, + -- Agent Packet Headers + fl, frag_id, frag_offset, hop_limit, ihl, ip_version, tc, ttl, + -- Management Data + additional_data, addr_count, adl, blob, blob_len, bootstrap_support, comp_mode, + ctime, data_length_u8, data_length_u16, dest_addr_v4, dest_addr_v6, dest_info, + ip_protocol, info_len, ipv4_addr, ipv6_addr, nonce, pkt_len, + reason_code, response_code, source_addr_v4, source_addr_v6, source_info, + status_code, status_info, tcst, tlv_len, tlv_type, tlv_val_bytes, + tlv_val_i64, tlv_val_ipv4, tlv_val_ipv6, tlv_val_str, tlv_val_u16, trans_id, + req_frame, res_frame, acked_frame, acked_by_frame +} + +-- Lengths of fields when using Noise Encryption +local A2A_SAID = 1 +local ADDR_COUNT = 1 +local BOOTSTRAP = 1 +local COMP_MODE = 1 +local DL_REPORT = 1 +local DL_TERMINATE = 1 +local EXCESS_LEN = 1 +local FLAGS = 1 +local HOP_LIMIT = 1 +local IP_VERSION = 1 +local IP_PROTOCOL = 1 +local INFO_LEN = 1 +local REASON_CODE = 1 +local RESPONSE_CODE = 1 +local TC = 1 +local TCST = 1 +local TLV_LEN = 1 +local TLV_TYPE = 1 +local TTL = 1 +local TYPE = 1 +local ZPI = 1 + +local ADL = 2 +local PKT_LEN = 2 +local BLOB_LEN = 2 +local DL_INIT = 2 +local FRAG_ID = 2 +local FRAG_OFFSET = 2 +local TRANS_ID = 2 + +local IPV4_LEN = 4 +local STREAM_ID = 4 + +local A2A_MAC = 8 -- Not sure what the MAC-algorithm-specified-size is (RFC17.2 § 4.2.6.1), but believe zdp.rs 262 specified +local CTIME = 8 +local NONCE = 8 +local SEQ_NUM = 8 + +local IPV6_LEN = 16 + +local INIT_AUTH_HMAC = 32 + +local HMAC = 0 +local KEY_NOISE_PAD = 0 + +local EXCESS_LEN_START = ZPI + TYPE +local TRANSIT_NON_AGENT_DATA = ZPI + TYPE + EXCESS_LEN + STREAM_ID + KEY_NOISE_PAD + HMAC + A2A_SAID + A2A_MAC +local PKT_START = TRANSIT_NON_AGENT_DATA - A2A_MAC +local PER_FLOW_NON_AGENT_DATA = ZPI + TYPE + EXCESS_LEN + SEQ_NUM + STREAM_ID +local NON_FLOW_NON_AGENT_DATA = ZPI + TYPE + EXCESS_LEN + SEQ_NUM + +local req_frames = {} -- stream id -> request frame +local res_frames = {} -- request frame -> response frame +local seq_to_frame = {} -- seq_num -> frame that sent it +local ack_links = {} -- frame -> paired frame (bidirectional) + +function zdp_proto.dissector(buffer, pinfo, tree) + local length = buffer:len() + if length == 0 then return end + + pinfo.cols.protocol = zdp_proto.name + + -- TODO shorten main + local zdp_header_subtree = tree:add(zdp_proto, buffer(), "ZDP Header Data") + + local zdp_header = TreeBuilder(buffer, pinfo, zdp_header_subtree) + zdp_header:add_field(zpi_val, ZPI) + + local type = zdp_header:get_curr_buffer_section(TYPE):uint() + local type_name = get_type_name(type) + zdp_header:add_field_with_text(zdp_type, TYPE, type_name) + pinfo.cols.info = type_name + + zdp_header:add_field(excess_len, EXCESS_LEN) + + local real_len = length - buffer(EXCESS_LEN_START, EXCESS_LEN):uint() + -- Perform different dissections depending on type of packet + if type == 0 then + -- Transit Packet + zdp_header:add_field(stream_id, STREAM_ID) + if KEY_NOISE_PAD ~= 0 then + zdp_header:add_field(pad, KEY_NOISE_PAD) + end + if HMAC ~= 0 then + zdp_header:add_field(hmac, HMAC) + end + zdp_header:add_field(a2a_said, A2A_SAID) + zdp_header:add_field(agent_packet, real_len - TRANSIT_NON_AGENT_DATA) + zdp_header:set_pos(real_len - A2A_MAC) + zdp_header:add_field(a2a_mac, A2A_MAC) + -- zdp_header_subtree:add(compressed_pkt, buffer(curr_pos, 5)) + + local agent_header_subtree = tree:add(zdp_proto, buffer(), "Compressed Agent Packet Header Data") + local agent_header = TreeBuilder(buffer, pinfo, agent_header_subtree) + agent_header:set_pos(PKT_START) + local v4_v6 = get_first_four(buffer(PKT_START, 1):uint()) + agent_header:add_field_no_buffer(ip_version, v4_v6) + + -- NOTE/TODO No updates to this section RE size/position of values, assuming they stayed the same for now + -- Just want to get this somewhat working first + if v4_v6 == 4 then + -- TODO since the curr_pos always has to get incremented, perhaps make a func that both adds to tree and increments curr_pos + local ihl_val = get_back_four(buffer(PKT_START, 1):uint()) + agent_header:add_field_no_buffer(ihl, ihl_val) + agent_header:increase_pos(1) + agent_header:add_field(frag_id, FRAG_ID) + agent_header:add_field(frag_offset, FRAG_OFFSET) + agent_header:add_field(ttl, TTL) + -- NOTE Commented this out due to comment below - TCP packet not actually necessarily well formatted + -- according to TCP standards because of compression + -- if ihl_val > 5 then + -- local options_len = ihl_val - ((ihl_val - 5) * 4) + -- agent_header_subtree:add(ip_options, buffer(17, options_len)) + -- -- pass ip options to an options dissector here (I could not find an existing IP options dissector) + -- else + -- -- Should really be passed to a custom compressed TCP packet dissector + -- -- Perhaps forwarding to the TCP dissector should be commented out for the demo, as it will + -- -- not show accurate information about the packets. + -- Dissector.get("tcp"):call(buffer(17, real_len - IP_NON_AGENT_DATA):tvb(), pinfo, tree) + -- end + + elseif v4_v6 == 6 then + local curr_pos = PKT_START + -- still use hardcoded values here because since the values are bitpacked, if something was changed + -- within this section, these lines would need to be changed anyway + local tc_value = get_middle_eight(buffer(curr_pos, 2):uint()) + agent_header:add_field_no_buffer(tc, tc_value) + curr_pos = curr_pos + 1 + local fl_value = get_back_twelve(buffer(curr_pos, 3):uint()) + agent_header:add_field_no_buffer(fl, fl_value) + curr_pos = curr_pos + 2 + agent_header:add_field_no_buffer(hop_limit, buffer(curr_pos, HOP_LIMIT):uint()) + -- Dissector.get("tcp"):call(buffer(15, real_len - IP_NON_AGENT_DATA):tvb(), pinfo, tree) + end + elseif type <= 127 then -- Per-Flow Management Message + local sequence_num = tostring(zdp_header:add_field_and_return_u64(seq_num, SEQ_NUM)) + ack_linking(type, zdp_header, sequence_num) + + zdp_header:add_field(stream_id, STREAM_ID) + if real_len > PER_FLOW_NON_AGENT_DATA then + local mgmt_start = zdp_header:get_pos() + zdp_header:add_field(management_packet, real_len - PER_FLOW_NON_AGENT_DATA) + decode_management(type, buffer(mgmt_start, real_len - PER_FLOW_NON_AGENT_DATA), pinfo, tree) + end + -- NOTE I believe that both the Pad and the MAC are removed before the packets are captured + else -- Non-per-flow management message + -- ARP and Key Mgmt messages do not have a Sequence number + if type ~= 128 and type ~= 129 then + local sequence_num = tostring(zdp_header:add_field_and_return_u64(seq_num, SEQ_NUM)) + + ack_linking(type, zdp_header, sequence_num) + end + + if real_len > NON_FLOW_NON_AGENT_DATA then + local mgmt_start = zdp_header:get_pos() + zdp_header:add_field(management_packet, real_len - NON_FLOW_NON_AGENT_DATA) + decode_management(type, buffer(mgmt_start, real_len - NON_FLOW_NON_AGENT_DATA), pinfo, tree) + end + end +end + +-- Idiomatic way of doing this may be to actually create a whole new dissector, although that might be challenging +-- becuase we couldn't just forward the managament packet, the type would also have to be forwarded, meaning we would either +-- have to forward basically the whole packet, or create a new tvb with the type and the management packet and forward that +function decode_management(type, buffer, pinfo, tree) + local management_subtree = tree:add(zdp_proto, buffer(), "Management Packet Data") + local management = TreeBuilder(buffer, pinfo, management_subtree) + local func = management_table[type] + if(func) then + func(management) + else + management_subtree:add(management_packet, buffer(0)) + end +end + +-- Function definitions must come before table +function handle_echo(management) + local add_data_len = management:add_field_and_return(adl, ADL) + if add_data_len > 0 then + management:add_field(additional_data, add_data_len) + end +end + +function handle_terminate_ind_req(management) + management:add_field_with_text_table(reason_code, REASON_CODE, terminate_reason_table) + local data_len = management:add_field_and_return(data_length_u8, DL_TERMINATE) + if data_len > 0 then + management:add_field(additional_data, data_len) + end +end + +function handle_terminate_res(management) + management:add_field_with_text_table(response_code, RESPONSE_CODE, response_code_table) + local data_len = management:add_field_and_return(data_length_u8, DL_TERMINATE) + if data_len > 0 then + management:add_field(additional_data, data_len) + end +end + +function handle_hello_req(management) + handle_tlvs(management) +end + +function handle_hello_res(management) + management:add_field_with_text_table(response_code, RESPONSE_CODE, response_code_table) + handle_tlvs(management) +end + +function handle_tlvs(management) + while management:get_pos() < management:get_buffer_len() do + local type = management:get_curr_buffer_section(TLV_TYPE):uint() + management:add_field_with_text_table(tlv_type, TLV_TYPE, tlv_type_table) + + if type == 0 then + goto continue + end + + local len = management:get_curr_buffer_section(TLV_LEN):uint() + management:add_field(tlv_len, TLV_LEN) + + management:add_field(get_tlv_val_type(type, len), len) + + ::continue:: + end +end + +function get_tlv_val_type(type, len) + if type == 1 then + return tlv_val_i64 + elseif type == 2 then + return tlv_val_str + elseif type == 3 then + if len == IPV4_LEN then + return tlv_val_ipv4 + elseif len == IPV6_LEN then + return tlv_val_ipv6 + end + elseif type == 4 then + if len == IPV4_LEN then + return tlv_val_ipv4 + elseif len == IPV6_LEN then + return tlv_val_ipv6 + end + elseif type == 5 then + return tlv_val_bytes + elseif type == 6 then + return tlv_val_u16 + end + + return tlv_val_bytes +end + +function handle_bind_actor_addr_req(management) + local transaction_id = management:add_field_and_return(trans_id, TRANS_ID) + + add_request_frame(management, transaction_id) + + local version = management:add_field_and_return(ip_version, IP_VERSION) + local length = management:add_field_and_return(pkt_len, PKT_LEN) + + -- Save ZDP column info before handing off to IP dissector + local saved_pinfo = save_pinfo(management:get_pinfo()) + + -- Full IP packet inside, can just hand off to IP dissector + local ip_dissector = Dissector.get("ip") + ip_dissector:call(management:get_curr_buffer_section(length):tvb(), management:get_pinfo(), management:get_tree()) + + -- Restore ZDP column info + restore_pinfo(saved_pinfo, management) +end + +function handle_bind_actor_addr_res(management) + local transaction_id = management:add_field_and_return(trans_id, TRANS_ID) + + add_response_link(management, transaction_id) + + management:add_field_with_text_table(response_code, RESPONSE_CODE, response_code_table) + local info = management:add_field_and_return(info_len, INFO_LEN) + if info > 0 then + management:add_field(status_info, info) + end + management:add_field(tcst, TCST) + management:add_field(tc, TC) +end + +function handle_bind_egress_stream_req(management) + local transaction_id = management:add_field_and_return(trans_id, TRANS_ID) + add_request_frame(management, transaction_id) + management:add_field(tcst, TCST) + management:add_field(tc, TC) +end + +function handle_bind_egress_stream_res(management) + local transaction_id = management:add_field_and_return(trans_id, TRANS_ID) + add_response_link(management, transaction_id) + management:add_field_with_text_table(response_code, RESPONSE_CODE, response_code_table) + management:add_field(info_len, INFO_LEN) +end + +function handle_init_authentication_req(management) + local flags = management:get_curr_buffer_section(FLAGS):uint() + local bootstrap = get_last_bit(flags) + management:add_field_with_text(bootstrap_support, BOOTSTRAP, presence_value[bootstrap]) + management:add_field(data_length_u16, DL_INIT) + management:add_field(nonce, NONCE) + management:add_field(ctime, CTIME) + management:add_field(hmac, INIT_AUTH_HMAC) +end + +function handle_report(management) + management:add_field(data_length_u16, DL_REPORT) +end + +function handle_acquire_zpr_addr_req(management) + -- TODO function that adds value AND returns it + local len = management:add_field_and_return(blob_len, BLOB_LEN) + local version = management:add_field_and_return(ip_version, IP_VERSION) + local count = management:add_field_and_return(addr_count, ADDR_COUNT) + management:add_field(blob, len) + + while management:get_pos() < management:get_buffer_len() do + if version == 4 then + management:add_field(ipv4_addr, IPV4_LEN) + elseif version == 6 then + management:add_field(ipv6_addr, IPV6_LEN) + end + end +end + +function handle_grant_zpr_addr_req(management) + management:add_field_with_text_table(status_code, RESPONSE_CODE, response_code_table) + local version = management:add_field_and_return(ip_version, IP_VERSION) + local count = management:add_field_and_return(addr_count, ADDR_COUNT) + + while management:get_pos() < management:get_buffer_len() do + if version == 4 then + management:add_field(ipv4_addr, IPV4_LEN) + elseif version == 6 then + management:add_field(ipv6_addr, IPV6_LEN) + end + end +end + +-- "Class" that contains the tree, buffer, and current position +function TreeBuilder(init_buffer, init_pinfo, init_tree) + local dissector = { buffer = init_buffer, pinfo = init_pinfo, tree = init_tree, pos = 0, real_len = 0 } + + local methods = { + add_field = function(self, field, len) + self.tree:add(field, self.buffer(self.pos, len)) + self.pos = self.pos + len + end, + add_field_no_buffer = function(self, field, val) + self.tree:add(field, val) + end, + add_field_and_return = function(self, field, len) + local val = self.buffer(self.pos, len) + self.tree:add(field, val) + self.pos = self.pos + len + return val:uint() + end, + add_field_and_return_u64 = function(self, field, len) + local val = self.buffer(self.pos, len) + self.tree:add(field, val) + self.pos = self.pos + len + return val:uint64() + end, + add_field_with_text_table = function(self, field, len, table) + local key = self.buffer(self.pos, len):uint() + self.tree:add(field, self.buffer(self.pos, len)):append_text(" (" .. table[key] .. ")") + self.pos = self.pos + len + end, + add_field_with_text = function(self, field, len, text) + self.tree:add(field, self.buffer(self.pos, len)):append_text(" (" .. text .. ")") + self.pos = self.pos + len + end, + add_field_with_text_no_buffer = function(self, field, val, text) + self.tree:add(field, val):append_text(" (" .. text .. ")") + end, + set_pos = function(self, val) + self.pos = val + end, + increase_pos = function(self, val) + self.pos = self.pos + val + end, + get_pos = function(self) + return self.pos + end, + get_curr_buffer_section = function(self, len) + return self.buffer(self.pos, len) + end, + get_buffer_section = function(self, start, len) + return self.buffer(start, len) + end, + get_buffer_len = function(self) + return self.buffer:len() + end, + get_pinfo = function(self) + return self.pinfo + end, + get_tree = function(self) + return self.tree + end, + get_frame_num = function(self) + return self.pinfo.number + end, + is_visited = function(self) + return self.pinfo.visited + end + } + + setmetatable(dissector, {__index = methods }) + return dissector +end + +management_table = +{ + [6] = handle_bind_actor_addr_req, + [7] = handle_bind_actor_addr_res, + [8] = handle_bind_egress_stream_req, + [9] = handle_bind_egress_stream_res, + [131] = handle_echo, + [133] = handle_terminate_ind_req, + [142] = handle_terminate_res, + [143] = handle_terminate_ind_req, + [134] = handle_hello_req, + [135] = handle_hello_res, + [138] = handle_acquire_zpr_addr_req, + [132] = handle_report, + [141] = handle_init_authentication_req, + [139] = handle_grant_zpr_addr_req, +} + +presence_value = +{ + [0] = "Not Present", + [1] = "Present", +} + +function add_request_frame(management, transaction_id) + local frame_num = management:get_frame_num() + if not management:is_visited() then + req_frames[transaction_id] = frame_num + end + + local res = res_frames[frame_num] + if res then + management:add_field_no_buffer(res_frame, res) + end +end + +function add_response_link(management, transaction_id) + local frame_num = management:get_frame_num() + if not management:is_visited() then + local req = req_frames[transaction_id] + if req then + res_frames[req] = frame_num -- req -> res + res_frames[frame_num] = req -- res -> req + end + end + local req = res_frames[frame_num] + if req then + management:add_field_no_buffer(req_frame, req) + end +end + +function ack_linking(type, zdp_header, sequence_num) + local frame_num = zdp_header:get_frame_num() + if not zdp_header:is_visited() then + if not no_ack[type] then + seq_to_frame[sequence_num] = frame_num + end + end + + if type == 254 then + if not zdp_header:is_visited() then + local acked_pkt = seq_to_frame[sequence_num] + if acked_pkt then + ack_links[acked_pkt] = frame_num -- original -> ack + ack_links[frame_num] = acked_pkt -- ack -> original + end + end + end + + local linked = ack_links[frame_num] + if linked then + if type == 254 then + zdp_header:add_field_no_buffer(acked_frame, linked) + elseif not no_ack[type] then + zdp_header:add_field_no_buffer(acked_by_frame, linked) + end + end +end + +function save_pinfo(pinfo) + local p = {} + -- The src and dst are set in link_header_dissector, so it can't be saved here. + -- Would have to change the way we approach the handoff, would not be a major + -- change, I don't think + -- p.dst = tostring(pinfo.cols.dst) + -- p.src = tostring(pinfo.cols.src) + p.protocol = tostring(pinfo.cols.protocol) + p.info = tostring(pinfo.cols.info) + + return p +end + +function restore_pinfo(pinfo, management) + -- management:get_pinfo().cols.src = pinfo.src + -- management:get_pinfo().cols.dst = pinfo.dst + management:get_pinfo().cols.protocol = pinfo.protocol + management:get_pinfo().cols.info = pinfo.info +end +-- Gets type name for a packet using the table below. Will return nil if type is +-- not between 0 and 254 +function get_type_name(type) + local type_name = type_name_table[type] + + if type_name ~= nil then return type_name + elseif type >= 10 and type <= 95 then type_name = "Unallocated" + elseif type >= 96 and type <= 126 then type_name = "Reserved: Experimental and Private Use" + elseif type >= 142 and type <= 223 then type_name = "Unallocated" + elseif type >= 224 and type <= 253 then type_name = "Reserved: Experimental and Private Use" end + + return type_name +end + +type_name_table = +{ + [0] = "Transit Packet", + [1] = "Destination Unreachable", + [2] = "Set Path MTU", + [3] = "Stream ID Request", + [4] = "Stream ID Response", + [5] = "Stream ID Withdrawal", + [6] = "Bind Actor Address Request", + [7] = "Bind Actor Address Response", + [8] = "Bind Egress Stream Request", + [9] = "Bind Egress Stream Response", + [13] = "Unbind Egress Stream Indication", + [127] = "Reserved: Must not be used", + [128] = "ZPR ARP", + [129] = "Key Management", + [130] = "Discard", + [131] = "Echo", + [132] = "Report", + [133] = "Terminate Link or Docking Session", + [134] = "Hello Request", + [135] = "Hello Response", + [136] = "Configuration Request", + [137] = "Configuration Response", + [138] = "Acquire ZPR Address", + [139] = "Grant ZPR Address", + [140] = "Revoke ZPR Address", + [141] = "Init Authentication Request", + [254] = "Acknowledgement", + [255] = "Reserved: Must not be used", +} + +terminate_reason_table = +{ + [0] = "Other", + [1] = "Unused", + [2] = "Request Timed Out", + [3] = "Reset", + [4] = "Shutdown", +} + +response_code_table = +{ + [0] = "Success", + [1] = "Other", +} + +tlv_type_table = +{ + [0] = "NULL", + [1] = "Policy ID", + [2] = "Version", + [3] = "AAA", + [4] = "ASA", + [5] = "Static Addr", + [6] = "Window Size" +} + +-- The only packets that don't get ack'd are Transit Packets, Arp, Key Management, and Acknowledgements +no_ack = +{ + [0] = true, + [128] = true, + [129] = true, + [254] = true +} + +-- Bit un-packing funcs +function get_first_four(one_byte) + return bit.rshift(one_byte, 4) +end + +function get_back_four(one_byte) + return bit.band(one_byte, 0x0F) +end + +function get_middle_eight(two_bytes) + local masked = bit.band(two_bytes, 0x0FF0) + return bit.rshift(masked, 4) +end + +function get_back_twelve(three_bytes) + return bit.band(three_bytes, 0x0FFFFF) +end + +function get_first_bit(one_byte) + return bit.rshift(one_byte, 7) +end + +function get_second_bit(one_byte) + local masked = bit.band(one_byte, 0x40) + return bit.rshift(masked, 6) +end + +function get_third_bit(one_byte) + local masked = bit.band(one_byte, 0x20) + return bit.rshift(masked, 5) +end + +function get_last_bit(one_byte) + return bit.band(one_byte, 0x01) +end + +local udp_port = DissectorTable.get("udp.port") +udp_port:add(1021, zdp_proto) + +local ip_proto = DissectorTable.get("ip.proto") +ip_proto:add(253, zdp_proto) + +local eth_type = DissectorTable.get("ethertype") +eth_type:add(0x88B5, zdp_proto) \ No newline at end of file diff --git a/dissectors/zwave-serial-api/LICENSE b/dissectors/zwave-serial-api/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/dissectors/zwave-serial-api/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/dissectors/zwave-serial-api/README.md b/dissectors/zwave-serial-api/README.md new file mode 100644 index 0000000..0b01e16 --- /dev/null +++ b/dissectors/zwave-serial-api/README.md @@ -0,0 +1,57 @@ +# Z-Wave Serial API (échanges hôte ↔ puce Z-Wave) + +Dissecteur Wireshark Lua de l'**API série Z-Wave**, protocole entre une +puce / clé USB Z-Wave (contrôleur domotique) et le logiciel hôte : trames +SOF (données) et trames auxiliaires ACK / NAK / CAN, drapeau +requête / réponse, identifiant de commande, somme de contrôle. Les données +sont ensuite réparties, selon le sens (hôte → puce ou puce → hôte) et le +type (requête / réponse), vers des sous-dissecteurs par commande +(`ZW_SendData`, `ZW_GetVersion`, liste des nœuds, informations de +protocole et de routage, capacités du contrôleur et de l'interface série, +temporisations…) et, pour `ZW_SendData` / `ApplicationCommandHandler`, vers +des classes de commandes applicatives (No Operation, Multilevel Switch). + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/dottedmag/wireshark-zwave | +| Commit importé | `557c8578df4d6e70233ab39fd5d01ef39903f7e8` du 31/10/2020 (branche `master`, dernier commit) | +| Licence amont | GPL-3.0-only (README amont : « (c) 2020 Misha Gusarov — All code in this repository is licensed under GNU GPL v3. See `COPYING` file. », sans « or later » ; `COPYING` amont : texte de la GPL v3) | +| Natif Wireshark 4.6.4 | Non — Wireshark connaît le type de lien `WTAP_ENCAP_ZWAVE_SERIAL` (211, LINKTYPE 287), mais n'a pas de dissecteur Z-Wave natif | + +Texte complet de la licence amont : fichier `LICENSE` de ce dossier (copie +conforme du `COPYING` amont). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `zwave.lua` | Dissecteur `zwave_serial` (encapsulation 211 = Z-Wave série) ; crée les tables `zwave.host_request`, `zwave.host_response`, `zwave.chip_request`, `zwave.chip_response` | +| `zwave-send-data.lua` | `ZW_SendData` (requête, réponse, rappel) et `ApplicationCommandHandler` ; crée les tables `zwave.command_request` / `zwave.command_response` | +| `zwave-app-noop.lua`, `zwave-app-switch-multilevel.lua` | Classes de commandes No Operation et Multilevel Switch | +| `zwave-application-node-information.lua`, `zwave-get-controller-capabilities.lua`, `zwave-get-node-protocol-info.lua`, `zwave-get-random-word.lua`, `zwave-get-routing-info.lua`, `zwave-get-suc-node-id.lua`, `zwave-memory-get-id.lua`, `zwave-node-list.lua`, `zwave-request-node-info.lua`, `zwave-serial-get-capabilities.lua`, `zwave-set-timeouts.lua`, `zwave-version.lua` | Une commande de l'API série par fichier | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête de chaque fichier. Les sous-dissecteurs +s'enregistrent dans leur fonction `init()`, donc l'ordre de chargement des +fichiers n'a pas d'importance. + +## Utilisation + +Copier tout le dossier dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/zwave-serial-api/`), recharger les +plugins Lua, puis ouvrir une capture pcap de type de lien Z-Wave série +(LINKTYPE 287) et filtrer avec `zwave_serial`. + +## Remarques + +- **Complémentaire de `dissectors/zwave-zniffer/`** (#189) : ce dernier + décode les trames radio (Zniffer), celui-ci l'API série du contrôleur ; + les noms de protocoles ne se chevauchent pas. +- Travail en cours selon l'auteur : seules certaines commandes sont + décodées, et la structure des paquets est « glanée » dans diverses + implémentations (« à prendre avec précaution », README amont) ; la somme + de contrôle n'est pas vérifiée (FIXME amont). +- Utilise la bibliothèque `bit` (fournie par Wireshark), pas `bit32`. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/zwave-serial-api/zwave-app-noop.lua b/dissectors/zwave-serial-api/zwave-app-noop.lua new file mode 100644 index 0000000..f7540db --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-app-noop.lua @@ -0,0 +1,10 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-app-noop.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local class_id = 0x00 +local name = "No Operation" + +-- Request + +local req = Proto("zwave_req_app_noop", name.." request") diff --git a/dissectors/zwave-serial-api/zwave-app-switch-multilevel.lua b/dissectors/zwave-serial-api/zwave-app-switch-multilevel.lua new file mode 100644 index 0000000..cfb4396 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-app-switch-multilevel.lua @@ -0,0 +1,40 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-app-switch-multilevel.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local class_id = 0x26 +local name = "Multilevel Switch" + +local handler = Proto("zwave_req_app_switch_multilevel", name) + +local SET = 0x01 +local GET = 0x02 +local REPORT = 0x03 +local START_LEVEL_CHANGE = 0x04 +local STOP_LEVEL_CHANGE = 0x05 +local SUPPORTED_GET = 0x06 +local SUPPORTED_REPORT = 0x07 + +local START_LEVEL_INCREASE = 0 +local START_LEVEL_IGNORE_LEVEL = 0x20 +local START_LEVEL_DECREASE = 0x40 + +function handler.dissector(tvbuf, proto, root) + local cmd = tvbuf(0, 1):uint() + + if cmd == SET then + -- check length: 2 bytes for ver 1, 3 bytes for ver 2+ + elseif cmd == GET then + -- no args + elseif cmd == REPORT then + -- check length: 2 bytes for ver 1, 4 bytes for ver 4+ + elseif cmd == START_LEVEL_CHANGE then + -- check length: 3 bytes for ver 1, 4 bytes for ver 2, 5 bytes for ver 3+ + elseif cmd == STOP_LEVEL_CHANGE then + -- check length: 1 byte for ver 1+ + elseif cmd == SUPPORTED_GET then + -- always 1 byte + elseif cmd == SUPPORTED_REPORT then + -- always 3 bytes + end +end diff --git a/dissectors/zwave-serial-api/zwave-application-node-information.lua b/dissectors/zwave-serial-api/zwave-application-node-information.lua new file mode 100644 index 0000000..c6e2696 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-application-node-information.lua @@ -0,0 +1,54 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-application-node-information.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x03 +local name = "ApplicationNodeInformation" + +-- Request + +local req = Proto("zwave_req_applicationnodeinformation", name.." request") + +local field_options_listening = ProtoField.bool("zwave.req_applicationnodeinformation.listening", + "Node is always listening and stationary", 8, nil, 0x01) +local field_options_optional = ProtoField.bool("zwave.req_applicationnodeinformation.optional", + "Node supports optional functionality", 8, nil, 0x02) +local field_type_generic = ProtoField.uint8("zwave.req_applicationnodeinformation.type_generic", + "Generic device class", base.HEX) +local field_type_specific = ProtoField.uint8("zwave.req_applicationnodeinformation.type_specific", + "Specific device class", base.HEX) +local field_type_classes_length = ProtoField.uint8("zwave.req_applicationnodeinformation.classes_length", + "Length of list of classes in bytes") +local field_type_classes = ProtoField.bytes("zwave.req_applicationnodeinformation.classes", + "List of supported command classes", base.NONE) + +req.fields = { + field_options_listening, + field_options_optional, + field_type_generic, + field_type_specific, + field_type_classes_length, + field_type_classes, +} + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + tree:add(field_options_listening, tvbuf:range(0, 1)) + tree:add(field_options_optional, tvbuf:range(0, 1)) + tree:add(field_type_generic, tvbuf:range(1, 1)) + tree:add(field_type_specific, tvbuf:range(2, 1)) + local len = tvbuf:range(3, 1) + tree:add(field_type_classes_length, len) + tree:add(field_type_classes, tvbuf:range(4, len:uint())) + + -- FIXME: decode classes, set info + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end diff --git a/dissectors/zwave-serial-api/zwave-get-controller-capabilities.lua b/dissectors/zwave-serial-api/zwave-get-controller-capabilities.lua new file mode 100644 index 0000000..ef24c6b --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-get-controller-capabilities.lua @@ -0,0 +1,95 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-get-controller-capabilities.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x05 +local name = "ZW_GetControllerCapabilities" + +-- Request + +local req = Proto("zwave_req_zw_getcontrollercapabilities", name.." request") + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + pinfo.cols.info:set("Request capabilities of the controller") + + local tree = root:add(req, tvbuf:range()) + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_zw_getcontrollercapabilities", name.." response") + +local field_capabilities_secondary = ProtoField.bool( + "zwave.resp_zw_getcontrollercapabilities.secondary", "Secondary controller", 8, nil, 0x01) + +local field_capabilities_on_other_network = ProtoField.bool( + "zwave.resp_zw_getcontrollercapabilities.on_other_network", "Controller is on other network", 8, nil, 0x02) + +local field_capabilities_sis_present = ProtoField.bool( + "zwave.resp_zw_getcontrollercapabilities.sis_present", "SIS is present in the network", 8, nil, 0x04) + +local field_capabilities_real_primary = ProtoField.bool( + "zwave.resp_zw_getcontrollercapabilities.real_primary", "Real primary controller", 8, nil, 0x08) + +local field_capabilities_suc = ProtoField.bool( + "zwave.resp_zw_getcontrollercapabilities.suc", "SUC (static update controller)", 8, nil, 0x10) + +resp.fields = { + field_capabilities_secondary, + field_capabilities_on_other_network, + field_capabilities_sis_present, + field_capabilities_real_primary, + field_capabilities_suc, +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + local caps = tvbuf(0, 1) + tree:add(field_capabilities_secondary, caps) + tree:add(field_capabilities_on_other_network, caps) + tree:add(field_capabilities_sis_present, caps) + tree:add(field_capabilities_real_primary, caps) + tree:add(field_capabilities_suc, caps) + + local info = "Controller is " + if bit.band(caps:uint(), 0x01) == 0x01 then + info = info.."secondary" + else + info = info.."primary" + end + + if bit.band(caps:uint(), 0x02) == 0x02 then + info = info..", not using built-in home ID" + end + + if bit.band(caps:uint(), 0x04) == 0x04 then + info = info..", SUC" + end + + if bit.band(caps:uint(), 0x08) == 0x08 then + info = info..", SIS present" + end + + if bit.band(caps:uint(), 0x10) == 0x10 then + info = info..", real primary" + end + + pinfo.cols.info:set(info) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-get-node-protocol-info.lua b/dissectors/zwave-serial-api/zwave-get-node-protocol-info.lua new file mode 100644 index 0000000..6727f35 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-get-node-protocol-info.lua @@ -0,0 +1,116 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-get-node-protocol-info.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x41 +local name = "ZW_GetNodeProtocolInfo" + +-- Request + +local req = Proto("zwave_req_zw_getnodeprotocolinfo", name.." request") + +local field_node_id = ProtoField.uint8("zwave.req_zw_getnodeprotocolinfo.node_id", "Node ID", base.DEC) + +req.fields = { + field_node_id, +} + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local node_id = tvbuf(0, 1) + + pinfo.cols.info:set("Request for node "..node_id:uint()) + + local tree = root:add(req, tvbuf:range()) + tree:add(field_node_id, node_id) + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_zw_getnodeprotocolinfo", name.." response") + +local field_listening = ProtoField.uint8( + "zwave.resp_zw_getnodeprotocolinfo.listening", "Is node listening", + base.HEX, {[0x00]= "No", [0x01] = "Yes"}, 0x80) + +local field_optional_functionality = ProtoField.uint8( + "zwave.resp_zw_getnodeprotocolinfo.optional_functionality", "Device supports functionality beyond the mandatory one", + base.HEX, {[0x00] = "No", [0x01] = "Yes"}, 0x80) + +local field_sensor_1000ms = ProtoField.uint8( + "zwave.resp_zw_getnodeprotocolinfo.listening_1000ms", "Device is a 1000ms FLiRS node", + base.HEX, {[0x00] = "No", [0x01] = "Yes"}, 0x40) + +local field_sensor_250ms = ProtoField.uint8( + "zwave.resp_zw_getnodeprotocolinfo.listening_250ms", "Device is a 250ms FLiRS node", + base.HEX, {[0x00] = "No", [0x01] = "Yes"}, 0x20) + +local field_basic = ProtoField.uint8( + "zwave.resp_zw_getnodeprotocolinfo.basic_class", "Basic device class", base.HEX) + +local field_generic = ProtoField.uint8( + "zwave.resp_zw_getnodeprotocolinfo.generic_class", "Generic device class", base.HEX) + +local field_specific = ProtoField.uint8( + "zwave.resp_zw_getnodeprotocolinfo.specific_class", "Specific device class", base.HEX) + +resp.fields = { + field_listening, + field_optional_functionality, + field_sensor_1000ms, + field_sensor_250ms, + field_basic, + field_generic, + field_specific, +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + local listening = tvbuf(0, 1) + tree:add(field_listening, listening) + local caps = tvbuf(1, 1) + tree:add(field_optional_functionality, caps) + tree:add(field_sensor_1000ms, caps) + tree:add(field_sensor_250ms, caps) + local basic = tvbuf(3, 1) + tree:add(field_basic, basic) + local generic = tvbuf(4, 1) + tree:add(field_generic, generic) + local specific = tvbuf(5, 1) + tree:add(field_specific, specific) + + local info = {} + if bit.band(listening:uint(), 0x80) == 0x80 then + table.insert(info, "Listening") + end + if bit.band(caps:uint(), 0x80) == 0x80 then + table.insert(info, "Func+") + end + if bit.band(caps:uint(), 0x40) == 0x40 then + table.insert(info, "FLiRS 1000ms") + end + if bit.band(caps:uint(), 0x20) == 0x20 then + table.insert(info, "FLiRS 250ms") + end + + pinfo.cols.info:set(string.format( + "Node options: [%s], basic: 0x%x, generic: 0x%x, specific: 0x%x", + table.concat(info, ", "), basic:uint(), generic:uint(), specific:uint())) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-get-random-word.lua b/dissectors/zwave-serial-api/zwave-get-random-word.lua new file mode 100644 index 0000000..6438f6c --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-get-random-word.lua @@ -0,0 +1,78 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-get-random-word.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x1c +local name = "ZW_GetRandomWord" + +-- Request + +local req = Proto("zwave_req_getrandomword", name.." request") + +local field_n = ProtoField.uint8("zwave.req_getrandomword.n", "Number of random bytes", base.DEC) + +req.fields = { + field_n, +} + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + + local n + if tvbuf:len() > 0 then + tree:add(field_n, tvbuf(0, 1)) + n = tvbuf(0, 1):uint() + else + n = 2 + end + + pinfo.cols.info:set("Request "..n.." bytes of random data") + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_getrandomword", name.." response") + +local field_success = ProtoField.bool("zwave.resp_getrandomword.succeeded", "Generation succeeded", base.NONE) +local field_n = ProtoField.uint8("zwave.resp_getrandomword.n", "Number of random bytes", base.DEC) +local field_random = ProtoField.bytes("zwave.resp_getrandomword.data", "Random bytes", base.NONE) + +resp.fields = { + field_success, + field_n, + field_random +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + local success = tvbuf(0, 1) + tree:add(field_success, success) + local n = tvbuf(1, 1) + tree:add(field_n, n) + local random_data = tvbuf(2) + tree:add(field_random, random_data) + + if success:uint() == 1 then + pinfo.cols.info:set("Retrieved "..n:uint().." bytes of random data") + else + pinfo.cols.info:set("Failed to obtain random data") + end + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-get-routing-info.lua b/dissectors/zwave-serial-api/zwave-get-routing-info.lua new file mode 100644 index 0000000..93365f1 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-get-routing-info.lua @@ -0,0 +1,99 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-get-routing-info.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x80 +local name = "ZW_GetRoutingInfo" + +-- Request + +local req = Proto("zwave_req_getroutinginfo", name.." request") + +local field_node_id = ProtoField.uint8( + "zwave.req_getroutinginfo.node_id", "Node ID", base.DEC) + +local field_remove_bad = ProtoField.uint8( + "zwave.req_getroutinginfo.remove_bad", "Remove bad (currently unavailable) nodes", base.DEC, {[0] = "No", [1] = "Yes"}) + +local field_remove_non_reps = ProtoField.uint8( + "zwave.req_getroutinginfo.remove_non_repeaters", "Remove non-repeaters", base.DEC, {[0] = "No", [1] = "Yes"}) + +-- FIXME: check that it is set to 0 +local field_func_id = ProtoField.uint8( + "zwave.req_getroutinginfo.func_id", "Function (callback) ID", base.HEX) + +req.fields = { + field_node_id, + field_remove_bad, + field_remove_non_reps, + field_func_id, +} + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + local node_id = tvbuf:range(0, 1) + tree:add(field_node_id, node_id) + local remove_bad = tvbuf:range(1, 1) + tree:add(field_remove_bad, remove_bad) + local remove_non_reps = tvbuf:range(2, 1) + tree:add(field_remove_non_reps, remove_non_reps) + tree:add(field_func_id, tvbuf:range(3, 1)) + + local info = "Get routing info for node "..node_id:uint() + if remove_bad:uint() ~= 0 then + info = info..", without bad nodes" + end + if remove_non_reps:uint() ~= 0 then + info = info..", only repeaters" + end + + pinfo.cols.info:set(info) +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_getroutinginfo", name.." response") + +local field_nodes = ProtoField.bytes( + "zwave.resp_getroutinginfo.nodes", "Neighbour nodes") + +resp.fields = { + field_nodes, +} + +function nodes_bitmask(nodes) + out = {} + for i = 0, nodes:len()-1 do + local byte = nodes:get_index(i) + for j = 0, 8 do + local b = bit.band(bit.rshift(byte, j), 0x1) + if b ~= 0 then + table.insert(out, i*8+j+1) + end + end + end + return out +end + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + tree:add(field_nodes, tvbuf:range()) + + pinfo.cols.info:set("Neighbour nodes: ["..table.concat(nodes_bitmask(tvbuf:bytes()), ", ").."]") + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-get-suc-node-id.lua b/dissectors/zwave-serial-api/zwave-get-suc-node-id.lua new file mode 100644 index 0000000..89877c1 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-get-suc-node-id.lua @@ -0,0 +1,53 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-get-suc-node-id.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x56 +local name = "ZW_GetSUCNodeID" + +-- Request + +local req = Proto("zwave_req_getsucnodeid", name.." request") + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + + pinfo.cols.info:set("Request SUC/SIS node ID") + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_getsucnodeid", name.." response") + +local field_node_id = ProtoField.uint8( + "zwave.resp_getsucnodeid.node_id", "SUC node ID", base.DEC) + +resp.fields = { + field_node_id +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + local node_id = tvbuf(0, 1) + tree:add(field_node_id, node_id) + + pinfo.cols.info:set("SUC/SIS node ID is "..node_id:uint()) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-memory-get-id.lua b/dissectors/zwave-serial-api/zwave-memory-get-id.lua new file mode 100644 index 0000000..9b08fd8 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-memory-get-id.lua @@ -0,0 +1,56 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-memory-get-id.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x20 +local name = "MemoryGetID" + +-- Request + +local req = Proto("zwave_req_memorygetid", name.." request") + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + + pinfo.cols.info:set("Request Home ID, Node ID from the chip") + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_memorygetid", name.." response") + +local field_home_id = ProtoField.uint32("zwave.resp_memorygetid.home_id", "Home ID (network ID)", base.HEX) +local field_node_id = ProtoField.uint32("zwave.resp_memorygetid.node_id", "Node ID", base.DEC) + +resp.fields = { + field_home_id, + field_node_id, +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + local home_id = tvbuf(0, 4) + tree:add(field_home_id, home_id) + local node_id = tvbuf(4, 1) + tree:add(field_node_id, node_id) + + pinfo.cols.info:set(string.format("Home ID=0x%x, Node ID=%d", home_id:uint(), node_id:uint())) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-node-list.lua b/dissectors/zwave-serial-api/zwave-node-list.lua new file mode 100644 index 0000000..341fe19 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-node-list.lua @@ -0,0 +1,117 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-node-list.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x02 +local name = "NodeList" + +-- Request + +local req = Proto("zwave_req_nodelist", name.." request") + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + + pinfo.cols.info:set("Request node list") + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_nodelist", name.." response") + +local field_ver = ProtoField.uint8("zwave.resp_nodelist.version", "Serial API version", base.DEC) + +local field_capabilities_controller = ProtoField.bool( + "zwave.resp_nodelist.capabilities_controller", "Is this a slave API", + 8, nil, 0x01) + +local field_capabilities_timer = ProtoField.bool( + "zwave.resp_nodelist.capabilities_timer", "Are timer functions supported", + 8, nil, 0x02) + +local field_capabilities_primary = ProtoField.bool( + "zwave.resp_nodelist.capabilities_primary", "Is this a secondary controller", + 8, nil, 0x04) + +local field_capabilities_sis = ProtoField.bool( + "zwave.resp_nodelist.capabilities_sis", "Is this a SIS controller", + 8, nil, 0x08) + +local field_nodes_bitmask_len = ProtoField.uint8( + "zwave.resp_nodelist.nodes_bitmask_len", "Length of nodes bitmask (in bytes)", base.DEC) + +local field_nodes = ProtoField.none("zwave.resp_nodelist.nodes", "Present nodes") + +local field_chip_type_ver = ProtoField.uint16( + "zwave.resp_nodelist.chip_type", "Chip type", base.HEX, { + [0x0102] = "ZW0102", + [0x0201] = "ZW0201", + [0x0301] = "ZW0301", + [0x0401] = "ZW0401/ZM4102/SD3402", + [0x0500] = "ZW050x", +}) + +resp.fields = { + field_ver, + field_capabilities_controller, + field_capabilities_timer, + field_capabilities_primary, + field_capabilities_sis, + field_nodes_bitmask_len, + field_nodes, + field_chip_type_ver, +} + +function nodes_bitmask(nodes) + out = {} + for i = 0, nodes:len()-1 do + local byte = nodes:get_index(i) + for j = 0, 8 do + local b = bit.band(bit.rshift(byte, j), 0x1) + if b ~= 0 then + table.insert(out, i*8+j+1) + end + end + end + return out +end + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + tree:add(field_ver, tvbuf:range(0, 1)) + tree:add(field_capabilities_controller, tvbuf:range(1, 1)) + tree:add(field_capabilities_timer, tvbuf:range(1, 1)) + tree:add(field_capabilities_primary, tvbuf:range(1, 1)) + tree:add(field_capabilities_sis, tvbuf:range(1, 1)) + + local len = tvbuf:range(2, 1) + tree:add(field_nodes_bitmask_len, len) + + local nodes = tvbuf:range(3, len:uint()) + local tn = tree:add(field_nodes, nodes) + local node_list = "["..table.concat(nodes_bitmask(nodes:bytes()), " ").."]" + tn:append_text(": "..node_list) + + tree:add(field_chip_type_ver, tvbuf:range(3+len:uint(), 2)) + + -- FIXME expose more info + pinfo.cols.info:set("Node list "..node_list) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-request-node-info.lua b/dissectors/zwave-serial-api/zwave-request-node-info.lua new file mode 100644 index 0000000..20cc447 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-request-node-info.lua @@ -0,0 +1,65 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-request-node-info.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x60 +local name = "ZW_RequestNodeInfo" + +-- Request + +local req = Proto("zwave_req_requestnodeinfo", name.." request") + +local field_node_id = ProtoField.uint8( + "zwave.resp_getsucnodeid.node_id", "Requested node ID", base.DEC) + +req.fields = { + field_node_id, +} + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + local node_id = tvbuf(0, 1) + tree:add(field_node_id, node_id) + + pinfo.cols.info:set("Request NIF from node "..node_id:uint()) + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_requestnodeinfo", name.." response") + +local field_success = ProtoField.bool("zwave.resp_requestnodeinfo.success", base.NONE) + +resp.fields = { + field_success, +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + local success = tvbuf(0, 1) + tree:add(field_success, success) + + if success:uint() == 1 then + pinfo.cols.info:set("Request queued successfully") + else + pinfo.cols.info:set("Request queueing failed") + end + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-send-data.lua b/dissectors/zwave-serial-api/zwave-send-data.lua new file mode 100644 index 0000000..0d9316d --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-send-data.lua @@ -0,0 +1,255 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-send-data.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local cmd_request_table = DissectorTable.new("zwave.command_request", "Z-Wave Application requests", ftypes.UINT8) +local cmd_response_table = DissectorTable.new("zwave.command_response", "Z-Wave Application responses", ftypes.UINT8) + +-- ZW_SendData + +local command_id = 0x13 +local name = "ZW_SendData" + +-- Request + +local req = Proto("zwave_req_senddata", name.." request") + +local field_node_id = ProtoField.uint8("zwave.req_send_data.node_id", "Target node ID", base.DEC) +local field_data_length = ProtoField.uint8("zwave.req_send_data.length", "Data length", base.DEC) + +local field_cmd_class = ProtoField.uint8("zwave.req_send_data.cmd_class", "Command Class", base.HEX) + +local field_tx_option_ack = ProtoField.bool("zwave.req_send_data.tx_option.ack", + "Request acknowledgement", 8, nil, 0x01) +local field_tx_option_low_power = ProtoField.bool("zwave.req_send_data.tx_option.low_power", + "Transmit at low power level", 8, nil, 0x02) +local field_tx_option_auto_route = ProtoField.bool("zwave.req_send_data.tx_option.auto_route", + "Allow routing the frame", 8, nil, 0x04) +local field_tx_option_no_route = ProtoField.bool("zwave.req_send_data.tx_option.no_route", + "Send the frame directly (do not route)", 8, nil, 0x10) +local field_tx_option_explore = ProtoField.bool("zwave.req_send_data.tx_option.explore", + "Send the frame as explore as a fallback", 8, nil, 0x20) + +local field_func_id = ProtoField.uint8("zwave.req_send_data.func_id", "Function ID (Callback ID)", base.HEX) + +req.fields = { + field_node_id, + field_data_length, + field_cmd_class, + field_tx_option_ack, + field_tx_option_low_power, + field_tx_option_auto_route, + field_tx_option_no_route, + field_tx_option_explore, + field_func_id, +} + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range(0, 3)) + tree:add(field_node_id, tvbuf:range(0, 1)) + + local len = tvbuf:range(1, 1) + tree:add(field_data_length, len) + + local cmd_class_tree_item = tree:add(field_cmd_class, tvbuf:range(2, 1)) + + local tx_options = tvbuf:range(2+len:uint(), 1) + tree:add(field_tx_option_ack, tx_options) + tree:add(field_tx_option_low_power, tx_options) + tree:add(field_tx_option_auto_route, tx_options) + tree:add(field_tx_option_no_route, tx_options) + tree:add(field_tx_option_explore, tx_options) + + tree:add(field_func_id, tvbuf:range(3+len:uint(), 1)) + + cmd_request_table:try(tvbuf:range(2, 1):uint(), tvbuf:range(3, len:uint()-1):tvb(), pinfo, root) + + if pinfo.private.command_class_id ~= nil then + cmd_class_tree_item:append_text(" ("..pinfo.private.command_class_id..")") + end + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_senddata", name.." response") + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end + +-- Callback + +local callback = Proto("zwave_callback_senddata", name.." callback") + +local OK = 0x00 +local NO_ACK = 0x01 +local FAIL = 0x02 + +local field_func_id = ProtoField.uint8("zwave.callback_senddata.func_id", "Func ID (callback ID)", base.HEX) +local field_tx_status = ProtoField.uint8( + "zwave.callback_senddata.tx_status", "Transmit status", + base.HEX, {[OK] = "OK", [NO_ACK] = "Not acknowledged before timeout", [FAIL] = "Failed (network busy)"}) +local field_tx_ticks = ProtoField.uint16( + "zwave.callback_senddata.tx_ticks", "Transmit time in ticks (10ms)", base.DEC) + +callback.fields = { + field_func_id, + field_tx_status, + field_tx_ticks, +} + +function callback.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(callback, tvbuf:range()) + + local func_id = tvbuf(0, 1) + tree:add(field_func_id, func_id) + local tx_status = tvbuf(1, 1) + tree:add(field_tx_status, tx_status) + + local info + if tx_status:uint() == OK then + info = "Sent a frame" + elseif tx_status:uint() == NO_ACK then + info = "Sent a frame with no ack before timeout" + elseif tx_status:uint() == FAIL then + info = "Failed to send a frame due to busy network" + else + info = "???" + end + + info = info..string.format(", callback ID 0x%x", func_id:uint()) + + if tvbuf:len() > 2 then + local tx_ticks = tvbuf(2, 2) + tree:add(field_tx_ticks, tx_ticks) + + info = info..string.format(", tx time=%dms", 10*tx_ticks():uint()) + end + + pinfo.cols.info:set(info) + + return tvbuf:len() +end + +function callback.init() + DissectorTable.get("zwave.chip_request"):set(command_id, callback) +end + +-- ApplicationCommandHandler + +local ach_command_id = 0x04 +local ach_name = "Application Command Handler" +local promisc_ach_command_id = 0xd1 -- FIXME: implement + +-- Request + +local ach_req = Proto("zwave_req_ach", ach_name) + +local field_status_busy = ProtoField.bool("zwave.req_ach.status.busy", + "A response route is locked by the application", 8, nil, 0x01) +local field_status_low_power = ProtoField.bool("zwave.req_ach.status.low_power", + "Received at low output power level", 8, nil, 0x02) +local field_status_type = ProtoField.uint8( + "zwave.req_ach.status.type", "Frame type", base.HEX, + {[0x00] = "Unicast", [0x01] = "Broadcast", [0x02] = "Multicast"}, 0x0c) + +local field_explore = ProtoField.uint8("zwave.req_ach.status.explore", "Explorer frame", base.HEX, + {[0x10] = "Yes", [0x00] = "No"}, 0x30) + +local field_foreign = ProtoField.bool("zwave.req_ach.status.foreign", "Foreign frame", 8, nil, 0x40) + +local field_foreign_homeid = ProtoField.bool("zwave.req_ach.status.foreign_homeid", "Foreign HomeID", 8, nil, 0x80) + +local field_src_node = ProtoField.uint8("zwave.req_ach.src_node", "Source node", base.DEC) + +local field_command_length = ProtoField.uint8("zwave.req_ach.command_length", "Command length", base.DEC) + +local field_command_class = ProtoField.uint8("zwave.req_ach.command_class", "Command class", base.HEX) + +local field_rxssi = ProtoField.uint8("zwave.req_ach.rx_rssi", "Received frame power (dBms)", base.DEC) + +local field_security_key = ProtoField.uint8("zwave.req_ach.security_key", "Security key", base.HEX) + +ach_req.fields = { + field_status_busy, + field_status_low_power, + field_status_type, + field_explore, + field_foreign, + field_foreign_homeid, + field_src_node, + field_command_length, + field_command_class, + field_rxssi, + field_security_key, +} + +function ach_req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = ach_name + pinfo.cols.protocol:set(ach_name) + + local tree = root:add(ach_req, tvbuf:range()) + tree:add(field_status_busy, tvbuf:range(0, 1)) + tree:add(field_status_low_power, tvbuf:range(0, 1)) + tree:add(field_status_type, tvbuf:range(0, 1)) + tree:add(field_explore, tvbuf:range(0, 1)) + tree:add(field_foreign, tvbuf:range(0, 1)) + tree:add(field_foreign_homeid, tvbuf:range(0, 1)) + tree:add(field_src_node, tvbuf:range(1, 1)) + + local len = tvbuf:range(2, 1) + tree:add(field_command_length, len) + + local class = tvbuf:range(3, 1) + tree:add(field_command_class, class) + + local cmd = tvbuf:range(4, len:uint()-1) + + if tvbuf:len() > 3+len:uint() then + local rxssi = tvbuf:range(3+len:uint(), 1) + local tf = tree:add(field_rxssi, rxssi) + if rxssi:uint() == 125 then + tf:set("Below sensitivity - no signal detected") + elseif rxssi:uint() == 127 then + tf:set("Measurement is not available") + elseif rxssi:uint() == 126 then + tf:set("Receiver saturated, power is too high to measure precisely") + elseif rxssi:uint() >= 11 then + tf:set("Reserved value") + end + tree:add(field_security_key, tvbuf:range(4+len:uint(), 1)) + end + + cmd_response_table:try(class:uint(), cmd:tvb(), pinfo, root) + + if pinfo.private.command_class_id ~= nil then + cmd_class_tree_item:append_text(" ("..pinfo.private.command_class_id..")") + end + + return tvbuf:len() +end + +function ach_req.init() + DissectorTable.get("zwave.chip_request"):set(ach_command_id, ach_req) +end diff --git a/dissectors/zwave-serial-api/zwave-serial-get-capabilities.lua b/dissectors/zwave-serial-api/zwave-serial-get-capabilities.lua new file mode 100644 index 0000000..ed6cdcd --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-serial-get-capabilities.lua @@ -0,0 +1,72 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-serial-get-capabilities.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x07 +local name = "SerialGetCapabilities" + +-- Request + +local req = Proto("zwave_req_serialgetcapabilities", name.." request") + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + + pinfo.cols.info:set("Request serial API capabilities") + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_serialgetcapabilities", name.." response") + +local field_version = ProtoField.uint8("zwave.resp_serialgetcapabilities.version", "Serial API Version", base.DEC) +local field_revision = ProtoField.uint8("zwave.resp_serialgetcapabilities.revision", "Serial API Revision", base.DEC) + +local field_manufacturer_id = ProtoField.uint16("zwave.resp_serialgetcapabilities.manufacturer_id", + "Manufacturer ID", base.HEX) + +local field_manufacturer_product_type = ProtoField.uint16("zwave.resp_serialgetcapabilities.manufacturer_product_type", + "Manufacturer product type", base.HEX) + +local field_manufacturer_product_id = ProtoField.uint16("zwave.resp_serialgetcapabilities.manufacturer_product_id", + "Manufacturer product ID", base.HEX) + +local field_supported_functions_bitmask = ProtoField.none("zwave.resp_serialgetcapabilities.supported_functions_bitmask", + "Bitmask of supported Serial API functions") + +resp.fields = { + field_version, + field_revision, + field_manufacturer_id, + field_manufacturer_product_type, + field_manufacturer_product_id, + field_supported_functions_bitmask, +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + tree:add(field_version, tvbuf:range(0, 1)) + tree:add(field_revision, tvbuf:range(1, 1)) + tree:add(field_manufacturer_id, tvbuf:range(2, 2)) + tree:add(field_manufacturer_product_type, tvbuf:range(4, 2)) + tree:add(field_manufacturer_product_id, tvbuf:range(6, 2)) + tree:add(field_supported_functions_bitmask, tvbuf:range(8, 32)) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-set-timeouts.lua b/dissectors/zwave-serial-api/zwave-set-timeouts.lua new file mode 100644 index 0000000..2e17df1 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-set-timeouts.lua @@ -0,0 +1,74 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-set-timeouts.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x06 +local name = "SetTimeouts" + +-- Request + +local req = Proto("zwave_req_settimeouts", name.." request") + +local field_rx_ack_timeout = ProtoField.uint8( + "zwave.req_settimeouts.rx_ack", "Receive ACK timeout (in 10ms)", base.DEC) +local field_rx_byte_timeout = ProtoField.uint8( + "zwave.req_settimeouts.rx_bytes", "Receive data timeout (in 10ms)", base.DEC) + +req.fields = { + field_rx_ack_timeout, + field_rx_byte_timeout, +} + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + local rx_ack_timeout = tvbuf(0, 1) + tree:add(field_rx_ack_timeout, rx_ack_timeout) + local rx_byte_timeout = tvbuf(1, 1) + tree:add(field_rx_byte_timeout, rx_byte_timeout) + + pinfo.cols.info:set(string.format("Receive ACK timeout=%dms, receive data timeout=%dms", + 10*rx_ack_timeout:uint(), 10*rx_byte_timeout:uint())) + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_settimeouts", name.." response") + +local field_old_rx_ack_timeout = ProtoField.uint8( + "zwave.resp_settimeouts.old_rx_ack", "Previous receive ACK timeout (in 10ms)", base.DEC) +local field_old_rx_byte_timeout = ProtoField.uint8( + "zwave.req_settimeouts.old_rx_bytes", "Previous receive data timeout (in 10ms)", base.DEC) + +req.fields = { + field_old_rx_ack_timeout, + field_old_rx_byte_timeout, +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + local old_rx_ack_timeout = tvbuf(0, 1) + tree:add(field_old_rx_ack_timeout, old_rx_ack_timeout) + local old_rx_byte_timeout = tvbuf(1, 1) + tree:add(field_old_rx_byte_timeout, old_rx_byte_timeout) + + pinfo.cols.info:set(string.format("Previous RX ACK timeout=%dms, RX data timeout=%dms", + 10*old_rx_ack_timeout:uint(), 10*old_rx_byte_timeout:uint())) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave-version.lua b/dissectors/zwave-serial-api/zwave-version.lua new file mode 100644 index 0000000..f696168 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave-version.lua @@ -0,0 +1,62 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave-version.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +local command_id = 0x15 +local name = "ZW_GetVersion" + +-- Request + +local req = Proto("zwave_req_zw_version", name.." request") + +function req.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(req, tvbuf:range()) + + return tvbuf:len() +end + +function req.init() + DissectorTable.get("zwave.host_request"):set(command_id, req) +end + +-- Response + +local resp = Proto("zwave_resp_zw_version", name.." response") + +local field_resp_text = ProtoField.string("zwave.resp_zw_version.text", "Version Text", base.ASCII) + +local library_types = { + [0x01] = "Static controller", + [0x02] = "Portable controller", + [0x03] = "Enhanced slave", + [0x04] = "Slave", + [0x05] = "Installer", + [0x06] = "Routing slave", + [0x07] = "Bridge controller", +} +local field_resp_library_type = ProtoField.uint8( + "zwave.resp_zw_version.library_type", "Library Type", base.HEX, library_types) + +resp.fields = { + field_resp_text, + field_resp_library_type, +} + +function resp.dissector(tvbuf, pinfo, root) + pinfo.private.command_id = name + pinfo.cols.protocol:set(name) + + local tree = root:add(resp, tvbuf:range()) + + tree:add(field_resp_text, tvbuf(0, 12)) + tree:add(field_resp_library_type, tvbuf(12, 1)) + + return tvbuf:len() +end + +function resp.init() + DissectorTable.get("zwave.chip_response"):set(command_id, resp) +end diff --git a/dissectors/zwave-serial-api/zwave.lua b/dissectors/zwave-serial-api/zwave.lua new file mode 100644 index 0000000..1f09801 --- /dev/null +++ b/dissectors/zwave-serial-api/zwave.lua @@ -0,0 +1,154 @@ +-- SPDX-License-Identifier: GPL-3.0-only +-- Importé de https://github.com/dottedmag/wireshark-zwave (zwave.lua), +-- commit 557c8578df4d6e70233ab39fd5d01ef39903f7e8 du 31/10/2020. +-- Licence amont : GPL-3.0-only (COPYING amont) — voir README.md. +-- Serial Z-Wave protocol +-- +-- This protocol is used to communicate between Z-Wave chip and user programs, +-- either running in Z-Wave device, or on a host Z-Wave controller is plugged +-- into. +-- +-- Serial Z-Wave protocol consists of data frame SOF (Start of Frame) and +-- auxiliary frames: +-- ACK (Acknowledged) +-- NAK (Not acknowledged, malformed frame) +-- CAN (Can resend, well-formed frame arrived at unfortunate time) +-- +-- These frames are sent in both directions between the host and Z-Wave chip. +-- +-- Data frames carry a request/response flag and a "Command ID" for further +-- dispatch. +-- +-- Each Command ID might have 4 meanings, based on whether it is a request or a +-- response, and whether it is coming from a Z-Wave chip or from a host. +-- +-- Every data frame also contains a checksum. +-- + +local host_req_table = DissectorTable.new("zwave.host_request", "Z-Wave Serial API host->chip requests", ftypes.UINT8) +local host_resp_table = DissectorTable.new("zwave.host_response", "Z-Wave Serial API host->chip responses", ftypes.UINT8) +local chip_req_table = DissectorTable.new("zwave.chip_request", "Z-Wave Serial API chip->host requests", ftypes.UINT8) +local chip_resp_table = DissectorTable.new("zwave.chip_response", "Z-Wave Serial API chip->host responses", ftypes.UINT8) + +local serial = Proto("zwave_serial", "Z-Wave serial protocol") + +-- Frame types + +local SOF = 0x01 +local ACK = 0x06 +local NAK = 0x15 +local CAN = 0x18 + +local frame_type_values = { + [SOF] = "SOF", + [ACK] = "ACK", + [NAK] = "NAK", + [CAN] = "CAN", +} + +local field_frame_type = ProtoField.uint8("zwave_serial.frame_type", "Frame type", base.HEX, frame_type_values) + +-- Frame length + +local field_frame_length = ProtoField.uint8("zwave_serial.frame_length", "Frame length", base.DEC) + +-- Data frame types + +local REQ = 0x00 +local RESP = 0x01 + +local data_frame_type_values = { + [REQ] = "Request", + [RESP] = "Response", +} + +local field_data_frame_type = ProtoField.uint8("zwave_serial.data_frame_type", "Data frame type", base.DEC, + data_frame_type_values) + +-- Command IDs + +local field_command_id = ProtoField.uint8("zwave_serial.command_id", "Command ID", base.HEX) + +-- Checksum + +local field_checksum = ProtoField.uint8("zwave_serial.checksum", "Frame checksum", base.HEX) + +serial.fields = { + field_frame_type, + field_frame_length, + field_data_frame_type, + field_command_id, + field_checksum, +} + +function serial.dissector(tvbuf, pinfo, root) + local host_to_chip = pinfo.p2p_dir == 0 + + if host_to_chip then + pinfo.cols.src:set("host") + pinfo.cols.dst:set("zw-chip") + else + pinfo.cols.src:set("zw-chip") + pinfo.cols.dst:set("host") + end + + pinfo.cols.protocol:set("Serial API") + + -- FIXME: check tvbuf length + local type = tvbuf(0, 1) + + local tree + if type:uint() == SOF then + -- FIXME check tvbuf length + tree = root:add(serial, tvbuf:range(0, 4)) + else + tree = root:add(serial, tvbuf:range(0, 1)) + end + + tree:add(field_frame_type, type) + + if type:uint() ~= SOF then + pinfo.cols.info:set(frame_type_values[type:uint()]) + return + end + + local length = tvbuf(1, 1) + -- FIXME: check length / frame length + tree:add(field_frame_length, length) + + -- FIXME check tvbuf length + local data_frame_type = tvbuf(2, 1) + tree:add(field_data_frame_type, data_frame_type) + + -- FIXME check tvbuf length + local command_id = tvbuf(3, 1) + local command_id_tree_item = tree:add(field_command_id, command_id) + + local proto_table + if host_to_chip and data_frame_type:uint() == REQ then + proto_table = host_req_table + elseif host_to_chip and data_frame_type:uint() == RESP then + proto_table = host_resp_table + elseif not host_to_chip and data_frame_type:uint() == REQ then + proto_table = chip_req_table + elseif not host_to_chip and data_frame_type:uint() == RESP then + proto_table = chip_resp_table + end + + -- FIXME check wrong data_frame_type + if proto_table ~= nil then + local cmd = tvbuf:range(4, tvbuf:len()-5) + proto_table:try(command_id:uint(), cmd:tvb(), pinfo, root) + + if pinfo.private.command_id ~= nil then + command_id_tree_item:append_text(" ("..pinfo.private.command_id..")") + end + end + + -- FIXME: check tvbuf length + local checksum = tvbuf(tvbuf:len()-1) + tree:add(field_checksum, checksum) + -- FIXME: check checksum +end + +DissectorTable.get("wtap_encap"):add(211, serial) diff --git a/dissectors/zwave-zniffer/README.md b/dissectors/zwave-zniffer/README.md new file mode 100644 index 0000000..5edb62f --- /dev/null +++ b/dissectors/zwave-zniffer/README.md @@ -0,0 +1,57 @@ +# Z-Wave Zniffer (trames radio Z-Wave et classes de commandes) + +Dissecteurs Wireshark Lua du **protocole série Zniffer** de Silicon Labs +(firmware Zniffer 2.55 sur clé USB ZMEUZB1) et des **classes de commandes +Z-Wave**, pour analyser un réseau domotique Z-Wave au niveau radio : trames +Zniffer (fréquence/canal, vitesse, RSSI, horodatage), puis MPDU Z-Wave +(Home ID, nœuds source et destination, contrôle de trame, séquence, +longueur), et enfin la charge applicative (classe de commande, commande, +paramètres) avec nom de classe dans la colonne Info. + +## Import + +| | | +|---|---| +| Dépôt amont | https://github.com/alexkuehn/zwave-sniffer-suite (dossier `dissectors/`) | +| Commit importé | `8b9d61b667fd87cd00af61db694d94e5e0c840c4` du 13/07/2020 (branche `master`, dernier commit ; dernière modification des deux dissecteurs importés : `26e6231` du 12/07/2020) | +| Licence amont | LGPL-3.0-or-later — en-tête de chaque fichier importé : « Copyright C) 2020 Alexander Kühn », « GNU Lesser General Public License … either version 3 of the License, or (at your option) any later version » ; pas de fichier LICENSE dans le dépôt | +| Natif Wireshark 4.6.4 | Non — aucun dissecteur Z-Wave natif | + +L'amont ne fournit pas le texte de la licence : textes de référence +https://www.gnu.org/licenses/lgpl-3.0.html et +https://www.gnu.org/licenses/gpl-3.0.html (la LGPL v3 complète la GPL v3). + +## Fichiers + +| Fichier | Rôle | +|---|---| +| `zniffer-dissector.lua` | Dissecteur `Zniffer` (encapsulation `wtap.USER0`) ; trames Zniffer et MPDU Z-Wave, puis appel du dissecteur USER2 | +| `zwave-command.lua` | Dissecteur `ZWaveCommand` (encapsulation `wtap.USER2`) ; classes de commandes Z-Wave | + +Fichiers importés tels quels ; seule une en-tête SPDX + provenance de quatre +lignes a été ajoutée en tête de chaque fichier (les en-têtes de licence +amont sont conservées). + +**Non importé : `dissectors/zwserial.lua`** (API série Z-Wave entre +contrôleur et hôte, `wtap.USER1`) — ni en-tête de licence, ni fichier +LICENSE dans le dépôt : sans licence, il reste sous droit d'auteur exclusif. +Non importés non plus : les extcap Python (`extcap/`), l'outil +`contrib/zw-sapi-tap.py` et la documentation (sans licence). + +## Utilisation + +Copier les deux fichiers `.lua` dans le dossier `plugins` de Wireshark +(ex. `~/.local/lib/wireshark/plugins/`), recharger les plugins Lua. Les +trames sont attendues en encapsulation DLT USER0 : capture via l'extcap +Zniffer amont (non importé), ou fichier pcap avec ce type de lien. Filtrer +avec `zniffer` ou `zwavecommand`. + +## Remarques + +- Le dissecteur Zniffer affecte `pinfo.cols.rssi`, qui n'est pas un nom de + colonne standard de l'API Lua de Wireshark ; selon la version, cette ligne + peut lever une erreur Lua en fin de dissection (non vérifié). +- L'encapsulation 47 appelée en dur correspond à `wtap.USER2`. +- Décodage incomplet et sans déchiffrement des trames Z-Wave S0/S2 + (README amont) ; preuve de concept de 2020. +- Pas de capture d'exemple amont ; non vérifié dans Wireshark. diff --git a/dissectors/zwave-zniffer/zniffer-dissector.lua b/dissectors/zwave-zniffer/zniffer-dissector.lua new file mode 100644 index 0000000..23e9f07 --- /dev/null +++ b/dissectors/zwave-zniffer/zniffer-dissector.lua @@ -0,0 +1,277 @@ +-- SPDX-License-Identifier: LGPL-3.0-or-later +-- Importé de https://github.com/alexkuehn/zwave-sniffer-suite (dissectors/zniffer-dissector.lua), +-- commit 8b9d61b667fd87cd00af61db694d94e5e0c840c4 du 13/07/2020. +-- Licence amont : LGPL-3.0-or-later — voir README.md. +-- zniffer-dissector.lua +-- wireshark dissector plugin for Zniffer Zwave packet decoding +-- it expects the PCAP data on USER0 +-- +-- Copyright C) 2020 Alexander Kühn +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Lesser General Public License as published by the Free +-- Software Foundation, either version 3 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 Lesser Public License for more +-- details. +-- +-- You should have received a copy of the GNU Lesser General Public License along +-- with this program. If not, see . + +zniffer_protocol = Proto("Zniffer", "ZWave Zniffer Serial Protocol") + + +local framespeeds = { + [0x2100] = "40kbit/s, Ch1", + [0x0200] = "100kbit/s, Ch0", + [0x2000] = "9.6kbit/s, Ch1" +} + +local zniffer_frametypes = { + [0x01] = "ZWave Packet", + [0x04] = "WakeStart", + [0x05] = "WakeStop", + [0xFF] = "Unidentified Packet" +} + +local zniffer_boolprot = { + [0] = "False", + [1] = "True" +} +local mpdu_headertype = { + [0x01] = "Singlecast", + [0x02] = "Multicast", + [0x03] = "Ack", + [0x04] = "NotUsed", + [0x05] = "NotUsed", + [0x06] = "NotUsed", + [0x07] = "NotUsed", + [0x08] = "Routed", + [0x09] = "NotUsed", + [0x0A] = "NotUsed", + [0x0B] = "NotUsed", + [0x0C] = "Reserved", + [0x0D] = "Reserved", + [0x0E] = "Reserved", + [0x0F] = "Reserved" +} + +local mpdu_beamtype = { + [0x00] = "No Beam", + [0x01] = "Short continous beam", + [0x02] = "Long continous beam", + [0x03] = "Reserved", +} +zn_frametype = ProtoField.uint8("zniffer.frametype", "frameType", base.HEX, zniffer_frametypes) +zn_framefill1 = ProtoField.bytes("zniffer.framefill1", "framefill1", base.SPACE) +zn_framespeed = ProtoField.uint16("zniffer.framespeed", "frameSpeed", base.HEX, framespeeds) +zn_framefill2 = ProtoField.bytes("zniffer.framefill2", "framefill2", base.SPACE) +zn_rssi = ProtoField.uint8("zniffer.rssi", "RSSI", base.HEX) +zn_length = ProtoField.uint8("zniffer.framelength", "framelength", base.DEC) +zn_mpdu = ProtoField.bytes("zniffer.mpdu.payload", "MPDU payload", base.SPACE) + + +zn_frame_crc = ProtoField.uint8("zniffer.mpdu.crc", "CRC", base.HEX) +zn_frame_homeid = ProtoField.bytes("zniffer.mpdu.homeid", "HomeID", base.SPACE) +zn_frame_srcid = ProtoField.uint8("zniffer.mpdu.srcid", "SourceID", base.HEX) +zn_frame_ctrl = ProtoField.bytes("zniffer.mpdu.framectrl", "FrameControl", base.SPACE) +zn_frame_len = ProtoField.uint8("zniffer.mpdu.framelen", "MPDU Length", base.DEC) +zn_frame_ctrl_routed = ProtoField.uint16("zniffer.mpdu.framectrl.routed", "Routed", base.DEC,zniffer_boolprot ,0x8000) +zn_frame_ctrl_ackreq = ProtoField.uint16("zniffer.mpdu.framectrl.ackreq", "Ack Req", base.DEC,zniffer_boolprot ,0x4000) +zn_frame_ctrl_lowspeed = ProtoField.uint16("zniffer.mpdu.framectrl.lowspeed", "LowSpeed", base.DEC,zniffer_boolprot ,0x2000) +zn_frame_ctrl_speedmod = ProtoField.uint16("zniffer.mpdu.framectrl.speedmod", "SpeedModified", base.DEC,zniffer_boolprot ,0x1000) +zn_frame_ctrl_headertype = ProtoField.uint16("zniffer.mpdu.framectrl.headertype", "HeaderType", base.DEC,mpdu_headertype ,0x0F00) +zn_frame_ctrl_res1 = ProtoField.uint16("zniffer.mpdu.framectrl.res1", "Reserved1", base.DEC,zniffer_boolprot ,0x0080) +zn_frame_ctrl_beaminfo = ProtoField.uint16("zniffer.mpdu.framectrl.beaminfo", "BeamInfo", base.DEC,mpdu_beamtype ,0x0060) +zn_frame_ctrl_res2 = ProtoField.uint16("zniffer.mpdu.framectrl.res2", "Reserved2", base.DEC,zniffer_boolprot ,0x0010) +zn_frame_ctrl_seqnr = ProtoField.uint16("zniffer.mpdu.framectrl.seqnr", "Sequence Number", base.HEX,nil ,0x000F) +zn_frame_dstid = ProtoField.bytes("zniffer.mpdu.framectrl.dstid", "DestinationID", base.SPACE) + +zn_frame_route_failedhop = ProtoField.uint8("zniffer.mpdu.route.failedhop", "MPDU Route Failed Hop", base.DEC, nil, 0xF0) +zn_frame_route_flag_dir = ProtoField.uint8("zniffer.mpdu.route.flag.dir", "MPDU Route Direction", base.HEX, zniffer_boolprot, 0x01) +zn_frame_route_flag_ack = ProtoField.uint8("zniffer.mpdu.route.flag.ack", "MPDU Route Ack", base.HEX, zniffer_boolprot, 0x02) +zn_frame_route_flag_err = ProtoField.uint8("zniffer.mpdu.route.flag.err", "MPDU Route Error", base.HEX, zniffer_boolprot, 0x04) +zn_frame_route_flag_extheader = ProtoField.uint8("zniffer.mpdu.route.flag.extheader", "MPDU Route Extended Header", base.HEX, zniffer_boolprot, 0x08) + +zn_frame_route_len = ProtoField.uint8("zniffer.mpdu.route.len", "MPDU Route Length", base.HEX, nil, 0xF0) +zn_frame_route_hop = ProtoField.uint8("zniffer.mpdu.route.hop", "MPDU Route Hop", base.HEX, nil, 0x0F) +zn_frame_route_path = ProtoField.bytes("zniffer.mpdu.route.path", "MPDU Route Path", base.SPACE) + +zn_frame_extheader_len = ProtoField.uint8("zniffer.mpdu.extheader.len", "MPDU Extended Header Length", base.HEX, nil, 0xF0) +zn_frame_extheader_flags = ProtoField.uint8("zniffer.mpdu.extheader.flags", "MPDU Extended Header Flags", base.HEX, nil, 0x0F) +zn_frame_extheader_data = ProtoField.bytes("zniffer.mpdu.extheader.data", "MPDU Extended Header Data", base.SPACE) + +zniffer_protocol.fields = {zn_frametype, zn_framefill1, zn_framespeed, zn_rssi, zn_framefill2, zn_length, zn_mpdu, + zn_frame_crc, zn_frame_homeid, zn_frame_srcid, zn_frame_ctrl, zn_frame_len, + zn_frame_ctrl_routed, zn_frame_ctrl_ackreq, zn_frame_ctrl_lowspeed, zn_frame_ctrl_speedmod, zn_frame_ctrl_headertype, + zn_frame_ctrl_res1, zn_frame_ctrl_beaminfo, zn_frame_ctrl_res2, zn_frame_ctrl_seqnr, zn_frame_dstid, + zn_frame_route_failedhop, + zn_frame_route_flag_dir, zn_frame_route_flag_ack, zn_frame_route_flag_err, zn_frame_route_flag_extheader, + zn_frame_route_len, zn_frame_route_hop, zn_frame_route_path, + zn_frame_extheader_len, zn_frame_extheader_flags, zn_frame_extheader_data } + + + +function calc_fcs(buf) + local checksum = 0xFF + for index=0,buf:len()-1 do + local b = buf(index,1):uint() + checksum = bit.bxor(checksum, b) + end + return checksum +end + +function zniffer_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + local subtree = tree:add(zniffer_protocol, buffer(), "Zniffer Protocol Data") + + local frametype = buffer(0,1):uint() + local frametype_name = zniffer_frametypes[frametype] + + + subtree:add(zn_frametype, buffer(0,1) ):append_text( " (" .. frametype_name .. ")") + pinfo.cols.protocol = frametype_name + + local mpdutree = nil + + local rssi = 0 + local mpdustart = 0 + + if frametype == 0x01 then + subtree:add(zn_framefill1, buffer(1,2)) + subtree:add(zn_framespeed, buffer(3,2)) + subtree:add(zn_rssi, buffer(5,1)) + subtree:add(zn_framefill2, buffer(6,2)) + subtree:add(zn_length, buffer(8,1)) + mpdustart = 9 + rssi = buffer(5,1):uint() + elseif frametype == 0x04 then + rssi = buffer(5,1):uint() + elseif frametype == 0x05 then + rssi = buffer(3,1):uint() + elseif frametype == 0xFF then + + end + mpdutree = subtree:add(zniffer_protocol, buffer(), frametype_name .. " Protocol Data") + + if frametype == 0x01 then + local fcs = calc_fcs(buffer(mpdustart,buffer:len()-mpdustart-1)) + local crcrange = buffer(buffer:len()-1,1) + + + if fcs ~= crcrange:uint() then + pinfo.cols.protocol = "CRC Error" + else + local homeid = buffer(mpdustart,4) + pinfo.cols.net_src = homeid:bytes():tohex(false, ' ') + local srcid = buffer(mpdustart+4,1) + local framectrl = buffer(mpdustart+5,2) + local framectrlheadertype = bit.rshift(framectrl:uint(), 8) + local framectrlrouted = bit.band(framectrl:uint(), 0x8000) + framectrlheadertype = bit.band(framectrlheadertype, 0x0F) + + mpdutree:add(zn_frame_homeid, homeid) + mpdutree:add(zn_frame_srcid,srcid) + mpdutree:add(zn_frame_ctrl,framectrl) + local framectrlsubtree = mpdutree:add(mpdutree, buffer(), "Frame Control Field") + framectrlsubtree:add(zn_frame_ctrl_routed, framectrl) + framectrlsubtree:add(zn_frame_ctrl_ackreq, framectrl) + framectrlsubtree:add(zn_frame_ctrl_lowspeed, framectrl) + framectrlsubtree:add(zn_frame_ctrl_speedmod, framectrl) + framectrlsubtree:add(zn_frame_ctrl_headertype, framectrl) + framectrlsubtree:add(zn_frame_ctrl_res1, framectrl) + framectrlsubtree:add(zn_frame_ctrl_beaminfo, framectrl) + framectrlsubtree:add(zn_frame_ctrl_res2, framectrl) + framectrlsubtree:add(zn_frame_ctrl_seqnr, framectrl) + + mpdutree:add(zn_frame_len, buffer(mpdustart+7,1)) + + local dstlen = 0 + + if framectrlheadertype == 0x02 then + dstlen = 29 + else + dstlen = 1 + pinfo.cols.dst=buffer(mpdustart+8, dstlen):uint() + end + + pinfo.cols.protocol = mpdu_headertype[framectrlheadertype] + + local dstid = buffer(mpdustart+8, dstlen) + + + + mpdutree:add(zn_frame_dstid, dstid) + pinfo.cols.src=srcid:uint() + mpdutree:add(zn_frame_crc, crcrange) + + local zw_msdu_offset = mpdustart+8+dstlen + + -- determine if MDSU contains additional routing information + if framectrlheadertype == 0x08 or framectrlrouted > 0 then + if framectrlheadertype ~= 0x08 then + pinfo.cols.protocol:append("| Routed") + end + mpdutree:add(zn_frame_route_failedhop, buffer(zw_msdu_offset,1)) + mpdutree:add(zn_frame_route_flag_dir, buffer(zw_msdu_offset,1)) + mpdutree:add(zn_frame_route_flag_ack, buffer(zw_msdu_offset,1)) + mpdutree:add(zn_frame_route_flag_err, buffer(zw_msdu_offset,1)) + mpdutree:add(zn_frame_route_flag_extheader, buffer(zw_msdu_offset,1)) + mpdutree:add(zn_frame_route_len, buffer(zw_msdu_offset+1,1)) + mpdutree:add(zn_frame_route_hop, buffer(zw_msdu_offset+1,1)) + + local route_len = bit.rshift(buffer(zw_msdu_offset+1,1):uint(), 4) + mpdutree:add(zn_frame_route_path, buffer(zw_msdu_offset+2,route_len)) + local extheader = bit.band(buffer(zw_msdu_offset,1):uint(), 0x08) + local routeerr = bit.band(buffer(zw_msdu_offset,1):uint(), 0x04) + local routeack = bit.band(buffer(zw_msdu_offset,1):uint(), 0x02) + if routeack ~= 0 then + pinfo.cols.info = "Routed ACK" + end + if routeerr ~= 0 then + pinfo.cols.info = "Routing Error" + end + + -- we have additional data with routing information + zw_msdu_offset = zw_msdu_offset + 2 + route_len + + -- there is something like an extended header + -- see if its there and add dissection of it + if extheader ~= 0 then + local extheader_len = bit.rshift(buffer(zw_msdu_offset,1):uint(), 4) + mpdutree:add(zn_frame_extheader_len, buffer(zw_msdu_offset,1)) + mpdutree:add(zn_frame_extheader_flags, buffer(zw_msdu_offset,1)) + mpdutree:add(zn_frame_extheader_data, buffer(zw_msdu_offset+1,extheader_len)) + -- we have additional data with extended header info + zw_msdu_offset = zw_msdu_offset + 1 + extheader_len + + end + + + + end + + local zw_msdu_len = buffer:len()-zw_msdu_offset-1 + + + payloaddissector=DissectorTable.get("wtap_encap"):get_dissector(47) + payloaddissector:call(buffer(zw_msdu_offset,zw_msdu_len):tvb(), pinfo, tree) + + end + + + else + mpdutree:add(zn_mpdu, buffer(mpdustart,buffer:len()-mpdustart)) + end + + pinfo.cols.rssi = rssi + +end + +local wtap_encap_table = DissectorTable.get("wtap_encap") +wtap_encap_table:add(wtap.USER0, zniffer_protocol) \ No newline at end of file diff --git a/dissectors/zwave-zniffer/zwave-command.lua b/dissectors/zwave-zniffer/zwave-command.lua new file mode 100644 index 0000000..0e10990 --- /dev/null +++ b/dissectors/zwave-zniffer/zwave-command.lua @@ -0,0 +1,173 @@ +-- SPDX-License-Identifier: LGPL-3.0-or-later +-- Importé de https://github.com/alexkuehn/zwave-sniffer-suite (dissectors/zwave-command.lua), +-- commit 8b9d61b667fd87cd00af61db694d94e5e0c840c4 du 13/07/2020. +-- Licence amont : LGPL-3.0-or-later — voir README.md. +-- zwave-command.lua +-- wireshark dissector plugin for ZWave command classes +-- it expects the PCAP data on USER2 and is used as sub dissector of Zniffer. +-- +-- Copyright C) 2020 Alexander Kühn +-- +-- This program is free software: you can redistribute it and/or modify it under +-- the terms of the GNU Lesser General Public License as published by the Free +-- Software Foundation, either version 3 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 Lesser Public License for more +-- details. +-- +-- You should have received a copy of the GNU Lesser General Public License along +-- with this program. If not, see . + +zwave_protocol = Proto("ZWaveCommand", "ZWave Command Class Protocol") + + +local cmdclasses = { + [0x5d]= "Antitheft", + [0x57]= "ApplicationCapability", + [0x22]= "ApplicationStatus", + [0x85]= "Association", + [0x9b]= "AssociationCommandConfiguration", + [0x59]= "AssociationGrpInfo", + [0x95]= "AvContentDirectoryMd", + [0x97]= "AvContentSearchMd", + [0x96]= "AvRendererStatus", + [0x99]= "AvTaggingMd", + [0x66]= "BarrierOperator", + [0x20]= "Basic", + [0x36]= "BasicTariffInfo", + [0x50]= "BasicWindowCovering", + [0x80]= "Battery", + [0x5b]= "CentralScene", + [0x2a]= "ChimneyFan", + [0x46]= "ClimateControlSchedule", + [0x81]= "Clock", + [0x70]= "Configuration", + [0x21]= "ControllerReplication", + [0x56]= "Crc16Encap", + [0x3a]= "DcpConfig", + [0x3b]= "DcpMonitor", + [0x5a]= "DeviceResetLocally", + [0x65]= "Dmx", + [0x62]= "DoorLock", + [0x4c]= "DoorLockLogging", + [0x90]= "EnergyProduction", + [0x6f]= "EntryControl", + [0x7a]= "FirmwareUpdateMd", + [0x8c]= "GeographicLocation", + [0x7b]= "GroupingName", + [0x82]= "Hail", + [0x39]= "HrvControl", + [0x37]= "HrvStatus", + [0x6d]= "HumidityControlMode", + [0x6e]= "HumidityControlOperatingState", + [0x64]= "HumidityControlSetpoint", + [0x74]= "InclusionController", + [0x87]= "Indicator", + [0x5c]= "IpAssociation", + [0x9a]= "IpConfiguration", + [0x6b]= "Irrigation", + [0x89]= "Language", + [0x76]= "Lock", + [0x69]= "Mailbox", + [0x91]= "ManufacturerProprietary", + [0x72]= "ManufacturerSpecific", + [0xef]= "Mark", + [0x32]= "Meter", + [0x35]= "MeterPulse", + [0x3c]= "MeterTblConfig", + [0x3d]= "MeterTblMonitor", + [0x3e]= "MeterTblPush", + [0x51]= "MtpWindowCovering", + [0x60]= "MultiChannel", + [0x8e]= "MultiChannelAssociation", + [0x8f]= "MultiCmd", + [0x4d]= "NetworkManagementBasic", + [0x34]= "NetworkManagementInclusion", + [0x67]= "NetworkManagementInstallationMaintenance", + [0x54]= "NetworkManagementPrimary", + [0x52]= "NetworkManagementProxy", + [0x77]= "NodeNaming", + [0xf0]= "NonInteroperable", + [0x00]= "NoOperation", + [0x71]= "Notification", + [0x73]= "Powerlevel", + [0x3f]= "Prepayment", + [0x41]= "PrepaymentEncapsulation", + [0x88]= "Proprietary", + [0x75]= "Protection", + [0x48]= "RateTblConfig", + [0x49]= "RateTblMonitor", + [0x7d]= "RemoteAssociation", + [0x7c]= "RemoteAssociationActivate", + [0x2b]= "SceneActivation", + [0x2c]= "SceneActuatorConf", + [0x2d]= "SceneControllerConf", + [0x53]= "Schedule", + [0x4e]= "ScheduleEntryLock", + [0x93]= "ScreenAttributes", + [0x92]= "ScreenMd", + [0x98]= "Security", + [0x9f]= "Security2", + [0x24]= "SecurityPanelMode", + [0x2e]= "SecurityPanelZone", + [0x2f]= "SecurityPanelZoneSensor", + [0x9c]= "SensorAlarm", + [0x30]= "SensorBinary", + [0x9e]= "SensorConfiguration", + [0x31]= "SensorMultilevel", + [0x9d]= "SilenceAlarm", + [0x94]= "SimpleAvControl", + [0x6c]= "Supervision", + [0x27]= "SwitchAll", + [0x25]= "SwitchBinary", + [0x33]= "SwitchColor", + [0x26]= "SwitchMultilevel", + [0x28]= "SwitchToggleBinary", + [0x29]= "SwitchToggleMultilevel", + [0x4a]= "TariffConfig", + [0x4b]= "TariffTblMonitor", + [0x44]= "ThermostatFanMode", + [0x45]= "ThermostatFanState", + [0x38]= "ThermostatHeating", + [0x40]= "ThermostatMode", + [0x42]= "ThermostatOperatingState", + [0x47]= "ThermostatSetback", + [0x43]= "ThermostatSetpoint", + [0x8a]= "Time", + [0x8b]= "TimeParameters", + [0x55]= "TransportService", + [0x63]= "UserCode", + [0x86]= "Version", + [0x84]= "WakeUp", + [0x6a]= "WindowCovering", + [0x02]= "ZensorNet", + [0x23]= "Zip", + [0x4f]= "Zip6lowpan", + [0x5f]= "ZipGateway", + [0x68]= "ZipNaming", + [0x58]= "ZipNd", + [0x61]= "ZipPortal", + [0x5e]= "ZwaveplusInfo" +} + +zw_cmdclass = ProtoField.uint8("zwave.cmd.class", "CommandClass", base.HEX, cmdclasses) +zw_cmd = ProtoField.uint8("zwave.cmd.cmd", "Command", base.HEX ) +zw_cmdparam = ProtoField.bytes("zwave.cmd.params", "Command Parameters", base.SPACE ) +zwave_protocol.fields = {zw_cmdclass, zw_cmd, zw_cmdparam} +function zwave_protocol.dissector(buffer, pinfo, tree) + length = buffer:len() + if length == 0 then return end + + local cmdprototree = tree:add(zwave_protocol, buffer(), "Command Class Protocol Data") + cmdprototree:add(zw_cmdclass, buffer(0,1)) + cmdprototree:add(zw_cmd, buffer(1,1)) + cmdprototree:add(zw_cmdparam, buffer(2,buffer:len()-2)) + pinfo.cols.info = cmdclasses[buffer(0,1):uint()] + +end + +local wtap_encap_table = DissectorTable.get("wtap_encap") +wtap_encap_table:add(wtap.USER2, zwave_protocol) \ No newline at end of file diff --git a/docs/maintenance.md b/docs/maintenance.md new file mode 100644 index 0000000..33300d6 --- /dev/null +++ b/docs/maintenance.md @@ -0,0 +1,81 @@ +# Maintenance des dissecteurs importés (issue #766) + +Les dissecteurs de `dissectors/` sont des copies de dépôts tiers, figées au +commit indiqué dans leur `README.md` (tableau « Import », convention #563). +Ce document décrit comment repérer les amonts qui ont bougé et comment les +reprendre. + +## Repérer les amonts modifiés + +```sh +python3 scripts/verifier_mises_a_jour.py # rapport Markdown +python3 scripts/verifier_mises_a_jour.py --json # pour un outil +python3 scripts/verifier_mises_a_jour.py --strict # code 1 s'il y a du travail +``` + +Pour chaque dissecteur, le script lit « Dépôt amont » (ou « Dépôt amont +importé ») et le premier SHA de « Commit importé ». Il interroge ensuite la +source avec `git ls-remote` : sur la branche citée (« dernier commit de +`main` », « branche `master` »…), sinon sur `HEAD`. Si la branche citée a +disparu, il se rabat sur `HEAD` et le signale. + +Les états possibles : + +- **À jour** : la pointe amont est le commit importé. +- **Amont modifié** : la branche a avancé ou a été réécrite. +- **Source injoignable** : le dépôt a été supprimé, renommé ou rendu privé, ou le réseau est en échec. +- **Hors forge git** : la source est en http/https/ftp (voir plus bas). +- **Provenance incomplète** : le README ne donne pas d'URL ou de SHA de 40 caractères. + +Le workflow `Mises à jour amont` (`.github/workflows/mises-a-jour.yml`) +lance le script chaque lundi, ou à la demande (`workflow_dispatch`). Il +publie le rapport dans le résumé du job et en artefact. Il ne bloque rien et +n'importe rien. + +## Reprendre une mise à jour + +1. Ouvrir (ou réutiliser) une issue « mise à jour de `` ». Y + citer le commit importé et la nouvelle pointe. +2. Comparer les seuls chemins importés : `git diff -- `. + Les chemins sont listés dans la colonne « Dépôt amont » et la section + « Fichiers » du README. Un monodépôt (EVerest, firedancer, bitcoin-abc…) + avance souvent sans toucher au dissecteur. Dans ce cas, mettre à jour le + seul « Commit importé » (avec la date), pour que le rapport repasse à « À jour ». +3. Revérifier la licence amont (fichier et en-têtes). Un changement de licence + suspend la mise à jour (label `ATTENTE LICENSE`). +4. Importer les fichiers modifiés, en gardant l'en-tête SPDX et la mention + « Importé de… » (convention #563). Mettre à jour « Commit importé ». + `scripts/valider_imports.py` doit passer. +5. Ouvrir une PR vers `dev`, avec `Refs #n`. + +Un dépôt injoignable n'est jamais retiré automatiquement. Le README garde la +copie importée, et l'issue documente la disparition et un éventuel miroir. + +## Sources http/https/ftp (étude) + +Aucun dissecteur du dépôt ne vient aujourd'hui d'une source hors forge git. +Les 353 imports relevés le 04/11/2026 viennent de GitHub, GitLab et Codeberg. +Pour une telle source, `git ls-remote` est sans objet. Voici ce qui est +retenu si le cas se présente : + +- **Empreinte** : noter dans le tableau « Import » une ligne + `| Empreinte SHA-256 | `<64 hex>` |` par fichier téléchargé, en plus de + l'URL et de la date de téléchargement. + La comparaison se fait sur ce contenu. Les en-têtes `ETag` et `Last-Modified` + changent sans que le fichier change (CDN, régénération), ou restent + identiques alors qu'il a changé. +- **Version** : si l'URL est versionnée (`…/proto-1.2.lua`, archive + `vX.Y.tar.gz`), noter la version importée et surveiller l'index de la page + de téléchargement, pas seulement le fichier. +- **FTP** : télécharger en mode passif, avec la même empreinte. Sans TLS, + l'intégrité ne repose que sur l'empreinte notée à l'import : une signature + amont (`.asc`, `.sig`), quand elle existe, est vérifiée et documentée. +- **Fréquence** : les sources hors forge sont rares et peu actives. + Une vérification à la main à chaque campagne de mise à jour suffit, au + rythme du workflow hebdomadaire, qui les liste à part (« Hors forge git »). +- **Disparition** : copier la page source sur une archive publique + (Software Heritage, Internet Archive) au moment de l'import, et noter le lien. + +Le script se contente de lister ces sources. Le téléchargement avec contrôle +d'empreinte ne sera ajouté que si un tel import arrive, pour ne pas maintenir +du code sans cas réel. diff --git a/scripts/verifier_mises_a_jour.py b/scripts/verifier_mises_a_jour.py new file mode 100644 index 0000000..b0af92a --- /dev/null +++ b/scripts/verifier_mises_a_jour.py @@ -0,0 +1,250 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-3.0-or-later +"""Suivi des mises à jour amont des dissecteurs importés (issue #766). + +Chaque ``dissectors//README.md`` documente sa provenance dans le +tableau « Import » (convention #563) : + +- ``| Dépôt amont | … |`` (ou ``Dépôt amont importé``) ; +- ``| Commit importé | `` … |``, avec parfois la branche suivie + (« dernier commit de `main` », « branche `master` »…). + +Pour chaque dissecteur, le script interroge la source par +``git ls-remote`` (branche citée, sinon ``HEAD``) et compare la pointe amont +au commit importé. Il ne télécharge ni n'importe rien : une mise à jour se +fait toujours par une PR d'import (convention #563), relue par un humain. + +États rapportés : + +- ``a_jour`` : la pointe amont est le commit importé ; +- ``amont_modifie`` : l'amont a avancé (ou réécrit sa branche) ; +- ``injoignable`` : dépôt supprimé, renommé, privé ou réseau en échec ; +- ``non_git`` : source http/https/ftp hors forge git (voir + ``docs/maintenance.md``, vérification manuelle) ; +- ``provenance_absente`` : tableau « Import » incomplet. + +Sortie : rapport Markdown sur la sortie standard (ou ``--sortie``), JSON +avec ``--json``. Code de retour 0, sauf ``--strict`` : 1 si un amont a +bougé ou est injoignable (utile en local, pas en CI périodique). +""" + +from __future__ import annotations + +import argparse +import concurrent.futures +import dataclasses +import json +import os +import pathlib +import re +import subprocess +import sys + +RACINE = pathlib.Path(__file__).resolve().parent.parent +DOSSIER_DISSECTORS = "dissectors" +# Forges git reconnues : une URL https de ces hôtes est un dépôt git. +FORGES_GIT = ("github.com", "gitlab.com", "codeberg.org", "bitbucket.org", "git.sr.ht") +DELAI_LS_REMOTE = 30 # secondes par dépôt + +_LIGNE_DEPOT = re.compile(r"^\|\s*Dépôt amont(?: importé)?\s*\|(?P.*)\|\s*$", re.MULTILINE) +_LIGNE_COMMIT = re.compile(r"^\|\s*Commit importé\s*\|(?P.*)\|\s*$", re.MULTILINE) +_URL = re.compile(r"(?:https?|ftp|git)://[^\s|)`>]+") +_SHA = re.compile(r"`([0-9a-f]{40})`") +# « dernier commit de `main` », « branche `master` », « branche par défaut `master` » +_BRANCHE = re.compile(r"(?:branche(?: par défaut)?|commit de(?: la branche(?: par défaut)?)?)\s+`([^`]+)`") + +ETATS = ("amont_modifie", "injoignable", "non_git", "provenance_absente", "a_jour") +LIBELLES = { + "amont_modifie": "Amont modifié depuis l'import", + "injoignable": "Source injoignable", + "non_git": "Source hors forge git (vérification manuelle)", + "provenance_absente": "Provenance incomplète dans le README", + "a_jour": "À jour", +} + + +@dataclasses.dataclass +class Provenance: + """Provenance d'un dissecteur, lue dans son README.""" + + dissecteur: str + url: str | None + commit: str | None + branche: str | None + + +@dataclasses.dataclass +class Resultat: + """État d'un dissecteur après interrogation de sa source.""" + + dissecteur: str + etat: str + url: str | None = None + commit: str | None = None + branche: str | None = None + pointe: str | None = None + detail: str = "" + + +def lire_provenance(readme: pathlib.Path) -> Provenance: + """Extrait URL amont, commit importé et branche suivie du tableau « Import ».""" + texte = readme.read_text(encoding="utf-8", errors="replace") + url = commit = branche = None + depot = _LIGNE_DEPOT.search(texte) + if depot: + trouvee = _URL.search(depot.group("cellule")) + url = trouvee.group(0).rstrip(".,;") if trouvee else None + ligne = _LIGNE_COMMIT.search(texte) + if ligne: + cellule = ligne.group("cellule") + sha = _SHA.search(cellule) + commit = sha.group(1) if sha else None + nom = _BRANCHE.search(cellule) + branche = nom.group(1) if nom else None + return Provenance(readme.parent.name, url, commit, branche) + + +def est_git(url: str) -> bool: + """URL d'un dépôt git : forge connue, schéma ``git://`` ou suffixe ``.git``.""" + if url.startswith("git://") or url.endswith(".git"): + return True + hote = re.sub(r"^[a-z]+://([^/]+).*$", r"\1", url).lower() + return hote in FORGES_GIT or hote.endswith(tuple("." + f for f in FORGES_GIT)) + + +def depot_git(url: str) -> str: + """URL du dépôt à partir d'une URL de forge (``/tree/…``, ``/blob/…`` retirés).""" + url = url.split("#", 1)[0].split("?", 1)[0].rstrip("/") + url = re.sub(r"/-/(?:tree|blob)/.*$", "", url) # GitLab + url = re.sub(r"/(?:tree|blob|src)/.*$", "", url) # GitHub, Codeberg + return url + + +def ls_remote(url: str, branche: str | None) -> tuple[str | None, str]: + """Pointe de ``branche`` (ou ``HEAD``) du dépôt ``url`` ; ``(None, erreur)`` en échec.""" + ref = f"refs/heads/{branche}" if branche else "HEAD" + env = dict(os.environ, GIT_TERMINAL_PROMPT="0", GIT_ASKPASS="true") + try: + sortie = subprocess.run( + ["git", "ls-remote", "--", url, ref], + capture_output=True, + text=True, + timeout=DELAI_LS_REMOTE, + env=env, + check=False, + ) + except (OSError, subprocess.TimeoutExpired) as exc: + return None, f"git ls-remote : {exc}" + if sortie.returncode != 0: + erreur = (sortie.stderr.strip().splitlines() or ["échec"])[-1] + return None, f"git ls-remote : {erreur}" + for ligne in sortie.stdout.splitlines(): + sha, _, nom = ligne.partition("\t") + if nom == ref: + return sha, "" + return None, f"référence {ref} absente de l'amont" + + +def verifier(provenance: Provenance, interroger=None) -> Resultat: + """Compare la pointe amont au commit importé d'un dissecteur (``interroger`` : ``ls_remote``).""" + interroger = interroger or ls_remote + res = Resultat( + provenance.dissecteur, + "provenance_absente", + provenance.url, + provenance.commit, + provenance.branche, + ) + if not provenance.url or not provenance.commit: + manque = [nom for nom, v in (("Dépôt amont", provenance.url), ("Commit importé", provenance.commit)) if not v] + res.detail = "manque : " + ", ".join(manque) + return res + if not est_git(provenance.url): + res.etat = "non_git" + res.detail = "voir docs/maintenance.md (sources http/https/ftp)" + return res + pointe, erreur = interroger(depot_git(provenance.url), provenance.branche) + if pointe is None and provenance.branche: + # Branche renommée ou supprimée : on se rabat sur la branche par défaut. + pointe, erreur_head = interroger(depot_git(provenance.url), None) + erreur = erreur if pointe is None else f"branche `{provenance.branche}` absente, comparé à HEAD" + if pointe is None and erreur_head != erreur: + erreur = f"{erreur} ; {erreur_head}" + if pointe is None: + res.etat = "injoignable" + res.detail = erreur + return res + res.pointe = pointe + res.etat = "a_jour" if pointe == provenance.commit else "amont_modifie" + res.detail = erreur + return res + + +def lister_readmes(racine: pathlib.Path) -> list[pathlib.Path]: + """README des dissecteurs, triés par nom de dossier.""" + return sorted((racine / DOSSIER_DISSECTORS).glob("*/README.md")) + + +def verifier_tous(racine: pathlib.Path, paralleles: int = 8, interroger=None) -> list[Resultat]: + """Vérifie tous les dissecteurs (interrogations en parallèle).""" + provenances = [lire_provenance(r) for r in lister_readmes(racine)] + with concurrent.futures.ThreadPoolExecutor(max_workers=max(1, paralleles)) as pool: + return list(pool.map(lambda p: verifier(p, interroger), provenances)) + + +def _court(sha: str | None) -> str: + return f"`{sha[:12]}`" if sha else "—" + + +def rapport_markdown(resultats: list[Resultat]) -> str: + """Rapport lisible : compteurs, puis un tableau par état à traiter.""" + par_etat: dict[str, list[Resultat]] = {e: [] for e in ETATS} + for r in resultats: + par_etat[r.etat].append(r) + lignes = ["# Mises à jour amont des dissecteurs", ""] + lignes += [f"- {LIBELLES[e]} : {len(par_etat[e])}" for e in ETATS] + lignes.append("") + for etat in ETATS[:-1]: + if not par_etat[etat]: + continue + lignes += [ + f"## {LIBELLES[etat]}", + "", + "| Dissecteur | Source | Importé | Amont | Détail |", + "|---|---|---|---|---|", + ] + for r in par_etat[etat]: + source = r.url or "—" + if r.branche: + source += f" (`{r.branche}`)" + lignes.append(f"| `{r.dissecteur}` | {source} | {_court(r.commit)} | {_court(r.pointe)} | {r.detail} |") + lignes.append("") + return "\n".join(lignes) + + +def main(argv: list[str] | None = None) -> int: + """Point d'entrée en ligne de commande.""" + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser.add_argument("--racine", type=pathlib.Path, default=RACINE, help="racine du dépôt") + parser.add_argument("--json", action="store_true", help="sortie JSON au lieu du Markdown") + parser.add_argument("--sortie", type=pathlib.Path, help="fichier du rapport (sinon sortie standard)") + parser.add_argument("--paralleles", type=int, default=8, help="interrogations simultanées") + parser.add_argument("--strict", action="store_true", help="code 1 si un amont a bougé ou est injoignable") + args = parser.parse_args(argv) + + resultats = verifier_tous(args.racine, args.paralleles) + if args.json: + texte = json.dumps([dataclasses.asdict(r) for r in resultats], ensure_ascii=False, indent=2) + else: + texte = rapport_markdown(resultats) + if args.sortie: + args.sortie.write_text(texte + "\n", encoding="utf-8") + else: + print(texte) + a_traiter = [r for r in resultats if r.etat in ("amont_modifie", "injoignable")] + print(f"{len(resultats)} dissecteur(s), {len(a_traiter)} à examiner", file=sys.stderr) + return 1 if args.strict and a_traiter else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tests/test_verifier_mises_a_jour.py b/tests/test_verifier_mises_a_jour.py new file mode 100644 index 0000000..dd288de --- /dev/null +++ b/tests/test_verifier_mises_a_jour.py @@ -0,0 +1,231 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +"""Tests du suivi des mises à jour amont (scripts/verifier_mises_a_jour.py, #766). + +Aucun accès réseau : ``git ls-remote`` est remplacé par une fonction de +test (paramètre ``interroger``) ou par un faux ``subprocess.run``. +""" + +from __future__ import annotations + +import importlib.util +import io +import json +import pathlib +import subprocess +import sys +import tempfile +import unittest +import unittest.mock +from contextlib import redirect_stderr, redirect_stdout + +CHEMIN_SCRIPT = pathlib.Path(__file__).resolve().parent.parent / "scripts" / "verifier_mises_a_jour.py" +_spec = importlib.util.spec_from_file_location("verifier_mises_a_jour", CHEMIN_SCRIPT) +maj = importlib.util.module_from_spec(_spec) +sys.modules[_spec.name] = maj # requis par dataclasses à l'exécution du module +_spec.loader.exec_module(maj) + +SHA_A = "a" * 40 +SHA_B = "b" * 40 + +README = """# Proto + +## Import + +| | | +|---|---| +| Dépôt amont | {url} | +| Commit importé | {commit} | +| Licence amont | MIT | +""" + + +class Base(unittest.TestCase): + def setUp(self) -> None: + self.tmp = tempfile.TemporaryDirectory() + self.racine = pathlib.Path(self.tmp.name) + (self.racine / "dissectors").mkdir() + + def tearDown(self) -> None: + self.tmp.cleanup() + + def dissecteur(self, nom: str, url: str = "", commit: str = "", texte: str | None = None) -> pathlib.Path: + rep = self.racine / "dissectors" / nom + rep.mkdir() + readme = rep / "README.md" + readme.write_text(texte if texte is not None else README.format(url=url, commit=commit), encoding="utf-8") + return readme + + +class LectureTests(Base): + def test_provenance_simple(self) -> None: + readme = self.dissecteur( + "p", "https://github.com/o/r (`p.lua`)", f"`{SHA_A}` du 01/01/2026 (dernier commit de `main`)" + ) + prov = maj.lire_provenance(readme) + self.assertEqual( + (prov.dissecteur, prov.url, prov.commit, prov.branche), ("p", "https://github.com/o/r", SHA_A, "main") + ) + + def test_depot_amont_importe_et_branches(self) -> None: + texte = ( + "| Dépôt cité par l'issue | https://github.com/x/y |\n" + "| Dépôt amont importé | https://codeberg.org/o/r (`Tools/a.lua`) |\n" + f"| Commit importé | `{SHA_A}` du 05/09/2018 (dernier commit de la branche par défaut `master`) |\n" + ) + prov = maj.lire_provenance(self.dissecteur("q", texte=texte)) + self.assertEqual((prov.url, prov.branche), ("https://codeberg.org/o/r", "master")) + texte2 = f"| Dépôt amont | https://gitlab.com/o/r. |\n| Commit importé | `{SHA_B}` (branche `stable`) |\n" + prov2 = maj.lire_provenance(self.dissecteur("r", texte=texte2)) + self.assertEqual((prov2.url, prov2.commit, prov2.branche), ("https://gitlab.com/o/r", SHA_B, "stable")) + + def test_provenance_absente(self) -> None: + prov = maj.lire_provenance(self.dissecteur("vide", texte="# Rien\n")) + self.assertEqual((prov.url, prov.commit, prov.branche), (None, None, None)) + prov2 = maj.lire_provenance(self.dissecteur("sans-url", "voir l'issue", "`court`")) + self.assertEqual((prov2.url, prov2.commit), (None, None)) + + +class UrlTests(unittest.TestCase): + def test_est_git(self) -> None: + for url in ( + "https://github.com/o/r", + "https://www.github.com/o/r", + "https://gitlab.com/g/s/r", + "git://exemple.org/r", + "https://exemple.org/r.git", + ): + self.assertTrue(maj.est_git(url), url) + for url in ("https://exemple.org/proto.lua", "ftp://ftp.exemple.org/p.lua"): + self.assertFalse(maj.est_git(url), url) + + def test_depot_git(self) -> None: + self.assertEqual(maj.depot_git("https://github.com/o/r/tree/main/tools/"), "https://github.com/o/r") + self.assertEqual(maj.depot_git("https://github.com/o/r/blob/main/a.lua#L3"), "https://github.com/o/r") + self.assertEqual(maj.depot_git("https://gitlab.com/g/r/-/tree/main?x=1"), "https://gitlab.com/g/r") + self.assertEqual(maj.depot_git("https://codeberg.org/o/r/src/branch/main"), "https://codeberg.org/o/r") + + +class LsRemoteTests(unittest.TestCase): + def _run(self, **kwargs): + return unittest.mock.patch.object(maj.subprocess, "run", **kwargs) + + def test_pointe_de_la_branche(self) -> None: + sortie = subprocess.CompletedProcess([], 0, f"{SHA_A}\trefs/heads/main\n", "") + with self._run(return_value=sortie) as run: + self.assertEqual(maj.ls_remote("https://github.com/o/r", "main"), (SHA_A, "")) + commande = run.call_args.args[0] + self.assertEqual(commande, ["git", "ls-remote", "--", "https://github.com/o/r", "refs/heads/main"]) + self.assertEqual(run.call_args.kwargs["env"]["GIT_TERMINAL_PROMPT"], "0") + + def test_head_et_reference_absente(self) -> None: + with self._run(return_value=subprocess.CompletedProcess([], 0, f"{SHA_B}\tHEAD\n", "")): + self.assertEqual(maj.ls_remote("u", None), (SHA_B, "")) + with self._run(return_value=subprocess.CompletedProcess([], 0, "", "")): + self.assertEqual(maj.ls_remote("u", "x"), (None, "référence refs/heads/x absente de l'amont")) + + def test_echecs(self) -> None: + with self._run(return_value=subprocess.CompletedProcess([], 128, "", "warning\nfatal: not found\n")): + self.assertEqual(maj.ls_remote("u", None), (None, "git ls-remote : fatal: not found")) + with self._run(return_value=subprocess.CompletedProcess([], 2, "", "")): + self.assertEqual(maj.ls_remote("u", None), (None, "git ls-remote : échec")) + with self._run(side_effect=subprocess.TimeoutExpired("git", 30)): + pointe, erreur = maj.ls_remote("u", None) + self.assertIsNone(pointe) + self.assertIn("timed out", erreur) + with self._run(side_effect=FileNotFoundError("git")): + self.assertIsNone(maj.ls_remote("u", None)[0]) + + +def _interroger(table): + """Fausse interrogation : ``table[(url, branche)]`` → pointe ou erreur.""" + + def interroger(url, branche): + valeur = table.get((url, branche)) + return (valeur, "") if valeur else (None, f"absent {url} {branche}") + + return interroger + + +class VerificationTests(Base): + def prov(self, url="https://github.com/o/r", commit=SHA_A, branche=None): + return maj.Provenance("p", url, commit, branche) + + def test_etats(self) -> None: + interroger = _interroger({("https://github.com/o/r", None): SHA_A, ("https://github.com/o/r", "dev"): SHA_B}) + self.assertEqual(maj.verifier(self.prov(), interroger).etat, "a_jour") + res = maj.verifier(self.prov(branche="dev"), interroger) + self.assertEqual((res.etat, res.pointe), ("amont_modifie", SHA_B)) + self.assertEqual(maj.verifier(self.prov(url="https://exemple.org/p.lua"), interroger).etat, "non_git") + absente = maj.verifier(self.prov(commit=None), interroger) + self.assertEqual((absente.etat, absente.detail), ("provenance_absente", "manque : Commit importé")) + res = maj.verifier(self.prov(url="https://github.com/x/y"), interroger) + self.assertEqual((res.etat, res.detail), ("injoignable", "absent https://github.com/x/y None")) + + def test_branche_disparue_repli_sur_head(self) -> None: + interroger = _interroger({("https://github.com/o/r", None): SHA_A}) + res = maj.verifier(self.prov(branche="ancienne"), interroger) + self.assertEqual(res.etat, "a_jour") + self.assertIn("branche `ancienne` absente", res.detail) + res = maj.verifier(self.prov(url="https://github.com/x/y", branche="b"), interroger) + self.assertEqual(res.etat, "injoignable") + self.assertIn(" ; ", res.detail) + meme = maj.verifier(self.prov(url="https://github.com/x/y", branche="b"), lambda u, b: (None, "panne")) + self.assertEqual(meme.detail, "panne") + + def test_verifier_tous_et_rapport(self) -> None: + self.dissecteur("b-modifie", "https://github.com/o/b", f"`{SHA_A}` (branche `dev`)") + self.dissecteur("a-ajour", "https://github.com/o/a/tree/main/x", f"`{SHA_A}` (dernier commit de `main`)") + self.dissecteur("c-http", "https://exemple.org/c.lua", f"`{SHA_A}`") + self.dissecteur("d-vide", texte="# D\n") + interroger = _interroger({("https://github.com/o/b", "dev"): SHA_B, ("https://github.com/o/a", "main"): SHA_A}) + resultats = maj.verifier_tous(self.racine, 2, interroger) + self.assertEqual( + [(r.dissecteur, r.etat) for r in resultats], + [ + ("a-ajour", "a_jour"), + ("b-modifie", "amont_modifie"), + ("c-http", "non_git"), + ("d-vide", "provenance_absente"), + ], + ) + texte = maj.rapport_markdown(resultats) + self.assertIn("- Amont modifié depuis l'import : 1", texte) + self.assertIn("- À jour : 1", texte) + self.assertIn("| `b-modifie` | https://github.com/o/b (`dev`) | `aaaaaaaaaaaa` | `bbbbbbbbbbbb` |", texte) + self.assertIn("## Source hors forge git", texte) + self.assertNotIn("## Source injoignable", texte) + self.assertNotIn("## À jour", texte) + + +class MainTests(Base): + def setUp(self) -> None: + super().setUp() + self.dissecteur("p", "https://github.com/o/r", f"`{SHA_A}`") + + def lancer(self, *args, pointe=SHA_B): + sortie, erreurs = io.StringIO(), io.StringIO() + # Pas de « with ( … ) » parenthésé : Python 3.8 du runner maison. + with unittest.mock.patch.object(maj, "ls_remote", lambda u, b: (pointe, "")): + with redirect_stdout(sortie), redirect_stderr(erreurs): + code = maj.main(["--racine", str(self.racine), *args]) + return code, sortie.getvalue(), erreurs.getvalue() + + def test_markdown_et_strict(self) -> None: + code, sortie, erreurs = self.lancer() + self.assertEqual(code, 0) + self.assertIn("# Mises à jour amont des dissecteurs", sortie) + self.assertIn("1 dissecteur(s), 1 à examiner", erreurs) + self.assertEqual(self.lancer("--strict")[0], 1) + self.assertEqual(self.lancer("--strict", pointe=SHA_A)[0], 0) + + def test_json_dans_un_fichier(self) -> None: + fichier = self.racine / "rapport.json" + code, sortie, _ = self.lancer("--json", "--sortie", str(fichier)) + self.assertEqual((code, sortie), (0, "")) + donnees = json.loads(fichier.read_text(encoding="utf-8")) + self.assertEqual(donnees[0]["etat"], "amont_modifie") + self.assertEqual(donnees[0]["pointe"], SHA_B) + + +if __name__ == "__main__": + unittest.main()